From daa4beb22c2986842fdaaca7289f8d53e2d0ee81 Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Mon, 10 Aug 2020 10:43:49 -0700 Subject: [PATCH] Update go.mod for k8s 1.19 --- go.mod | 121 +- go.sum | 722 +- .../clientset/versioned/fake/register.go | 2 +- .../listers/k3s.cattle.io/v1/addon.go | 5 + .../go/compute/metadata/.repo-metadata.json | 12 + .../go/compute/metadata/metadata.go | 24 +- .../github.com/Azure/azure-sdk-for-go/LICENSE | 2 +- .../compute/availabilitysets.go | 39 +- .../compute/client.go | 3 +- .../compute/containerservices.go | 19 +- .../compute/dedicatedhostgroups.go | 36 +- .../compute/dedicatedhosts.go | 30 +- .../compute/diskencryptionsets.go | 34 +- .../compute/disks.go | 46 +- .../compute/galleries.go | 108 +- .../compute/galleryapplications.go | 108 +- .../compute/galleryapplicationversions.go | 110 +- .../compute/galleryimages.go | 106 +- .../compute/galleryimageversions.go | 115 +- .../compute/images.go | 33 +- .../compute/loganalytics.go | 13 +- .../compute/models.go | 1304 +- .../compute/operations.go | 8 +- .../compute/proximityplacementgroups.go | 45 +- .../compute/resourceskus.go | 8 +- .../compute/snapshots.go | 45 +- .../mgmt/2019-12-01/compute/sshpublickeys.go | 652 + .../compute/usage.go | 8 +- .../compute/version.go | 2 +- .../compute/virtualmachineextensionimages.go | 18 +- .../compute/virtualmachineextensions.go | 29 +- .../compute/virtualmachineimages.go | 41 +- .../compute/virtualmachineruncommands.go | 14 +- .../compute/virtualmachines.go | 193 +- .../virtualmachinescalesetextensions.go | 107 +- .../virtualmachinescalesetrollingupgrades.go | 23 +- .../compute/virtualmachinescalesets.go | 199 +- .../virtualmachinescalesetvmextensions.go | 28 +- .../compute/virtualmachinescalesetvms.go | 152 +- .../compute/virtualmachinesizes.go | 9 +- .../2020-04-01/containerservice/agentpools.go | 609 + .../2020-04-01/containerservice/client.go | 52 + .../containerservice/containerservices.go | 618 + .../containerservice/managedclusters.go | 1367 + .../2020-04-01/containerservice/models.go | 3669 +++ .../openshiftmanagedclusters.go | 613 + .../2020-04-01/containerservice/operations.go | 109 + .../2020-04-01/containerservice/version.go | 30 + .../2019-06-01/network/applicationgateways.go | 65 +- .../network/applicationsecuritygroups.go | 22 +- .../network/availabledelegations.go | 7 +- .../network/availableendpointservices.go | 7 +- .../network/availableprivateendpointtypes.go | 9 +- .../availableresourcegroupdelegations.go | 6 +- .../network/azurefirewallfqdntags.go | 7 +- .../mgmt/2019-06-01/network/azurefirewalls.go | 21 +- .../mgmt/2019-06-01/network/bastionhosts.go | 21 +- .../network/bgpservicecommunities.go | 7 +- .../network/mgmt/2019-06-01/network/client.go | 9 +- .../2019-06-01/network/connectionmonitors.go | 28 +- .../2019-06-01/network/ddoscustompolicies.go | 16 +- .../2019-06-01/network/ddosprotectionplans.go | 22 +- .../network/defaultsecurityrules.go | 10 +- .../expressroutecircuitauthorizations.go | 15 +- .../network/expressroutecircuitconnections.go | 15 +- .../network/expressroutecircuitpeerings.go | 18 +- .../network/expressroutecircuits.go | 37 +- .../network/expressrouteconnections.go | 16 +- .../expressroutecrossconnectionpeerings.go | 17 +- .../network/expressroutecrossconnections.go | 27 +- .../network/expressroutegateways.go | 19 +- .../2019-06-01/network/expressroutelinks.go | 10 +- .../2019-06-01/network/expressrouteports.go | 22 +- .../network/expressrouteportslocations.go | 10 +- .../network/expressrouteserviceproviders.go | 6 +- .../2019-06-01/network/firewallpolicies.go | 22 +- .../network/firewallpolicyrulegroups.go | 18 +- .../network/hubvirtualnetworkconnections.go | 9 +- .../2019-06-01/network/inboundnatrules.go | 15 +- .../network/interfaceipconfigurations.go | 10 +- .../network/interfaceloadbalancers.go | 7 +- .../2019-06-01/network/interfacesgroup.go | 42 +- .../network/interfacetapconfigurations.go | 16 +- .../loadbalancerbackendaddresspools.go | 9 +- .../loadbalancerfrontendipconfigurations.go | 9 +- .../network/loadbalancerloadbalancingrules.go | 9 +- .../network/loadbalancernetworkinterfaces.go | 6 +- .../network/loadbalanceroutboundrules.go | 10 +- .../2019-06-01/network/loadbalancerprobes.go | 10 +- .../mgmt/2019-06-01/network/loadbalancers.go | 21 +- .../network/localnetworkgateways.go | 19 +- .../network/mgmt/2019-06-01/network/models.go | 4 +- .../mgmt/2019-06-01/network/natgateways.go | 21 +- .../mgmt/2019-06-01/network/operations.go | 6 +- .../mgmt/2019-06-01/network/p2svpngateways.go | 27 +- .../network/p2svpnserverconfigurations.go | 16 +- .../mgmt/2019-06-01/network/packetcaptures.go | 21 +- .../peerexpressroutecircuitconnections.go | 9 +- .../2019-06-01/network/privateendpoints.go | 19 +- .../2019-06-01/network/privatelinkservices.go | 37 +- .../mgmt/2019-06-01/network/profiles.go | 21 +- .../2019-06-01/network/publicipaddresses.go | 31 +- .../2019-06-01/network/publicipprefixes.go | 22 +- .../network/resourcenavigationlinks.go | 7 +- .../2019-06-01/network/routefilterrules.go | 19 +- .../mgmt/2019-06-01/network/routefilters.go | 21 +- .../network/mgmt/2019-06-01/network/routes.go | 15 +- .../mgmt/2019-06-01/network/routetables.go | 21 +- .../mgmt/2019-06-01/network/securitygroups.go | 21 +- .../mgmt/2019-06-01/network/securityrules.go | 15 +- .../network/serviceassociationlinks.go | 7 +- .../network/serviceendpointpolicies.go | 22 +- .../serviceendpointpolicydefinitions.go | 15 +- .../mgmt/2019-06-01/network/servicetags.go | 6 +- .../mgmt/2019-06-01/network/subnets.go | 21 +- .../network/mgmt/2019-06-01/network/usages.go | 6 +- .../mgmt/2019-06-01/network/version.go | 2 +- .../mgmt/2019-06-01/network/virtualhubs.go | 21 +- .../virtualnetworkgatewayconnections.go | 29 +- .../network/virtualnetworkgateways.go | 61 +- .../network/virtualnetworkpeerings.go | 16 +- .../2019-06-01/network/virtualnetworks.go | 27 +- .../2019-06-01/network/virtualnetworktaps.go | 22 +- .../mgmt/2019-06-01/network/virtualwans.go | 21 +- .../mgmt/2019-06-01/network/vpnconnections.go | 15 +- .../mgmt/2019-06-01/network/vpngateways.go | 24 +- .../2019-06-01/network/vpnlinkconnections.go | 7 +- .../network/vpnsitelinkconnections.go | 7 +- .../mgmt/2019-06-01/network/vpnsitelinks.go | 9 +- .../mgmt/2019-06-01/network/vpnsites.go | 21 +- .../network/vpnsitesconfiguration.go | 7 +- .../mgmt/2019-06-01/network/watchers.go | 57 +- .../network/webapplicationfirewallpolicies.go | 18 +- .../mgmt/2017-05-10/resources/client.go | 52 + .../resources/deploymentoperations.go | 264 + .../mgmt/2017-05-10/resources/deployments.go | 890 + .../mgmt/2017-05-10/resources/groups.go | 665 + .../mgmt/2017-05-10/resources/models.go | 1854 ++ .../mgmt/2017-05-10/resources/providers.go | 389 + .../mgmt/2017-05-10/resources/resources.go | 1319 + .../mgmt/2017-05-10/resources/tags.go | 450 + .../mgmt/2017-05-10/resources/version.go | 30 + .../mgmt/2019-06-01/storage/accounts.go | 141 +- .../mgmt/2019-06-01/storage/blobcontainers.go | 71 +- .../mgmt/2019-06-01/storage/blobservices.go | 28 +- .../storage/mgmt/2019-06-01/storage/client.go | 3 +- .../2019-06-01/storage/encryptionscopes.go | 476 + .../mgmt/2019-06-01/storage/fileservices.go | 24 +- .../mgmt/2019-06-01/storage/fileshares.go | 148 +- .../2019-06-01/storage/managementpolicies.go | 13 +- .../storage/mgmt/2019-06-01/storage/models.go | 1597 +- .../storage/objectreplicationpolicies.go | 428 + .../mgmt/2019-06-01/storage/operations.go | 6 +- .../storage/privateendpointconnections.go | 116 +- .../storage/privatelinkresources.go | 7 +- .../storage/mgmt/2019-06-01/storage/queue.go | 578 + .../mgmt/2019-06-01/storage/queueservices.go | 324 + .../storage/mgmt/2019-06-01/storage/skus.go | 6 +- .../storage/mgmt/2019-06-01/storage/table.go | 563 + .../mgmt/2019-06-01/storage/tableservices.go | 324 + .../storage/mgmt/2019-06-01/storage/usages.go | 6 +- .../mgmt/2019-06-01/storage/version.go | 2 +- .../Azure/azure-sdk-for-go/storage/blob.go | 2 +- .../Azure/azure-sdk-for-go/storage/client.go | 42 +- .../azure-sdk-for-go/storage/directory.go | 2 +- .../Azure/azure-sdk-for-go/storage/entity.go | 6 +- .../Azure/azure-sdk-for-go/version/version.go | 2 +- .../go-autorest/autorest/adal/devicetoken.go | 35 +- .../Azure/go-autorest/autorest/adal/go.mod | 7 +- .../Azure/go-autorest/autorest/adal/go.sum | 16 + .../autorest/adal/go_mod_tidy_hack.go | 24 + .../Azure/go-autorest/autorest/adal/token.go | 117 +- .../go-autorest/autorest/authorization.go | 31 +- .../go-autorest/autorest/authorization_sas.go | 67 + .../autorest/authorization_storage.go | 304 + .../Azure/go-autorest/autorest/azure/async.go | 12 +- .../Azure/go-autorest/autorest/azure/azure.go | 19 +- .../Azure/go-autorest/autorest/azure/rp.go | 12 +- .../Azure/go-autorest/autorest/client.go | 23 + .../Azure/go-autorest/autorest/date/go.mod | 2 + .../Azure/go-autorest/autorest/date/go.sum | 16 + .../autorest/date/go_mod_tidy_hack.go | 24 + .../Azure/go-autorest/autorest/go.mod | 6 +- .../Azure/go-autorest/autorest/go.sum | 12 + .../Azure/go-autorest/autorest/mocks/go.mod | 2 + .../Azure/go-autorest/autorest/mocks/go.sum | 16 + .../autorest/mocks/go_mod_tidy_hack.go | 24 + .../Azure/go-autorest/autorest/preparer.go | 14 +- .../Azure/go-autorest/autorest/sender.go | 20 +- .../Azure/go-autorest/autorest/utility.go | 21 +- .../Azure/go-autorest/autorest/version.go | 2 +- .../pkg/cloud/filter/filter.go | 2 +- .../k8s-cloud-provider/pkg/cloud/gen.go | 3574 ++- .../k8s-cloud-provider/pkg/cloud/meta/meta.go | 86 + .../k8s-cloud-provider/pkg/cloud/mock/mock.go | 187 + .../k8s-cloud-provider/pkg/cloud/op.go | 2 +- .../k8s-cloud-provider/pkg/cloud/service.go | 19 +- .../k8s-cloud-provider/pkg/cloud/utils.go | 14 + .../github.com/Microsoft/go-winio/vhd/vhd.go | 151 + .../github.com/Microsoft/go-winio/vhd/zvhd.go | 99 + .../github.com/Microsoft/hcsshim/CODEOWNERS | 3 + .../Microsoft/hcsshim/Protobuild.toml | 1 + vendor/github.com/Microsoft/hcsshim/README.md | 7 +- .../github.com/Microsoft/hcsshim/appveyor.yml | 22 +- .../options/next.pb.txt | 207 + .../options/runhcs.pb.go | 210 +- .../options/runhcs.proto | 17 + .../containerd-shim-runhcs-v1/stats/doc.go | 6 + .../stats/next.pb.txt | 1048 + .../stats/stats.pb.go | 2819 ++ .../stats/stats.proto | 70 + .../github.com/Microsoft/hcsshim/container.go | 2 +- vendor/github.com/Microsoft/hcsshim/go.mod | 36 +- vendor/github.com/Microsoft/hcsshim/go.sum | 97 +- .../github.com/Microsoft/hcsshim/hcn/hcn.go | 46 + .../Microsoft/hcsshim/hcn/hcnerrors.go | 76 +- .../Microsoft/hcsshim/hcn/hcnglobals.go | 35 +- .../Microsoft/hcsshim/hcn/hcnloadbalancer.go | 21 +- .../Microsoft/hcsshim/hcn/hcnnamespace.go | 18 +- .../Microsoft/hcsshim/hcn/hcnpolicy.go | 35 +- .../Microsoft/hcsshim/hcn/hcnroute.go | 266 + .../Microsoft/hcsshim/hcn/hcnsupport.go | 45 +- .../Microsoft/hcsshim/hcn/zsyscall_windows.go | 141 + .../github.com/Microsoft/hcsshim/hnspolicy.go | 3 + .../Microsoft/hcsshim/internal/cow/cow.go | 5 +- .../Microsoft/hcsshim/internal/hcs/cgo.go | 7 - .../Microsoft/hcsshim/internal/hcs/process.go | 26 +- .../Microsoft/hcsshim/internal/hcs/syscall.go | 5 + .../Microsoft/hcsshim/internal/hcs/system.go | 114 +- .../Microsoft/hcsshim/internal/hcs/utils.go | 28 + .../hcsshim/internal/hcs/zsyscall_windows.go | 54 + .../hcsshim/internal/hns/hnsendpoint.go | 21 + .../hcsshim/internal/hns/hnspolicy.go | 15 +- .../hcsshim/internal/schema1/schema1.go | 7 +- .../hcsshim/internal/schema2/devices.go | 4 + .../hcsshim/internal/schema2/memory_2.go | 24 + .../schema2/memory_information_for_vm.go | 2 +- .../hcsshim/internal/schema2/memory_stats.go | 6 +- .../internal/schema2/processor_stats.go | 6 +- .../hcsshim/internal/schema2/properties.go | 8 + .../internal/schema2/property_query.go | 2 +- .../hcsshim/internal/schema2/property_type.go | 23 + .../hcsshim/internal/schema2/statistics.go | 2 +- .../hcsshim/internal/schema2/storage_stats.go | 8 +- .../internal/schema2/virtual_pci_device.go | 16 + .../internal/schema2/virtual_pci_function.go | 18 + .../hcsshim/internal/schema2/vm_memory.go | 4 +- .../hcsshim/internal/vmcompute/vmcompute.go | 4 +- .../hcsshim/internal/wclayer/activatelayer.go | 23 +- .../hcsshim/internal/wclayer/baselayer.go | 17 +- .../hcsshim/internal/wclayer/createlayer.go | 26 +- .../internal/wclayer/createscratchlayer.go | 28 +- .../internal/wclayer/deactivatelayer.go | 23 +- .../hcsshim/internal/wclayer/destroylayer.go | 23 +- .../internal/wclayer/expandscratchsize.go | 140 +- .../hcsshim/internal/wclayer/exportlayer.go | 60 +- .../internal/wclayer/getlayermountpath.go | 29 +- .../internal/wclayer/getsharedbaseimages.go | 22 +- .../hcsshim/internal/wclayer/grantvmaccess.go | 26 +- .../hcsshim/internal/wclayer/importlayer.go | 60 +- .../hcsshim/internal/wclayer/layerexists.go | 25 +- .../hcsshim/internal/wclayer/layerid.go | 13 +- .../hcsshim/internal/wclayer/layerutils.go | 5 +- .../hcsshim/internal/wclayer/nametoguid.go | 31 +- .../hcsshim/internal/wclayer/preparelayer.go | 27 +- .../hcsshim/internal/wclayer/processimage.go | 32 +- .../internal/wclayer/unpreparelayer.go | 23 +- .../hcsshim/internal/wclayer/wclayer.go | 5 + .../internal/wclayer/zsyscall_windows.go | 59 + vendor/github.com/Microsoft/hcsshim/layer.go | 41 +- .../hcsshim/osversion/osversion_windows.go | 57 + .../hcsshim/osversion/windowsbuilds.go | 27 + .../github.com/cespare/xxhash/v2/.travis.yml | 8 + .../github.com/cespare/xxhash/v2/LICENSE.txt | 22 + vendor/github.com/cespare/xxhash/v2/README.md | 67 + vendor/github.com/cespare/xxhash/v2/go.mod | 3 + vendor/github.com/cespare/xxhash/v2/go.sum | 0 vendor/github.com/cespare/xxhash/v2/xxhash.go | 236 + .../cespare/xxhash/v2/xxhash_amd64.go | 13 + .../cespare/xxhash/v2/xxhash_amd64.s | 215 + .../cespare/xxhash/v2/xxhash_other.go | 76 + .../cespare/xxhash/v2/xxhash_safe.go | 15 + .../cespare/xxhash/v2/xxhash_unsafe.go | 46 + .../checkpoint-restore/go-criu/rpc/rpc.pb.go | 1211 - .../checkpoint-restore/go-criu/v4/.gitignore | 5 + .../checkpoint-restore/go-criu/v4/.travis.yml | 28 + .../go-criu/{ => v4}/LICENSE | 0 .../checkpoint-restore/go-criu/v4/Makefile | 60 + .../checkpoint-restore/go-criu/v4/README.md | 75 + .../checkpoint-restore/go-criu/v4/go.mod | 5 + .../checkpoint-restore/go-criu/v4/go.sum | 2 + .../checkpoint-restore/go-criu/v4/main.go | 259 + .../checkpoint-restore/go-criu/v4/notify.go | 63 + .../go-criu/v4/rpc/rpc.pb.go | 1667 ++ vendor/github.com/cilium/ebpf/abi.go | 267 +- .../github.com/cilium/ebpf/asm/instruction.go | 114 +- vendor/github.com/cilium/ebpf/asm/jump.go | 2 +- .../github.com/cilium/ebpf/asm/load_store.go | 17 +- vendor/github.com/cilium/ebpf/asm/opcode.go | 2 +- vendor/github.com/cilium/ebpf/asm/register.go | 7 + vendor/github.com/cilium/ebpf/collection.go | 178 +- vendor/github.com/cilium/ebpf/elf_reader.go | 712 +- vendor/github.com/cilium/ebpf/feature.go | 19 - vendor/github.com/cilium/ebpf/go.mod | 7 +- vendor/github.com/cilium/ebpf/go.sum | 6 +- .../cilium/ebpf/internal/btf/btf.go | 716 + .../cilium/ebpf/internal/btf/btf_types.go | 259 + .../cilium/ebpf/internal/btf/doc.go | 8 + .../cilium/ebpf/internal/btf/ext_info.go | 182 + .../cilium/ebpf/internal/btf/strings.go | 60 + .../cilium/ebpf/internal/btf/types.go | 587 + vendor/github.com/cilium/ebpf/internal/cpu.go | 60 +- .../github.com/cilium/ebpf/internal/errors.go | 47 + vendor/github.com/cilium/ebpf/internal/fd.go | 69 + .../cilium/ebpf/internal/feature.go | 122 + vendor/github.com/cilium/ebpf/internal/io.go | 16 + vendor/github.com/cilium/ebpf/internal/ptr.go | 30 + .../cilium/ebpf/{ => internal}/ptr_32_be.go | 6 +- .../cilium/ebpf/{ => internal}/ptr_32_le.go | 6 +- .../cilium/ebpf/{ => internal}/ptr_64.go | 6 +- .../cilium/ebpf/internal/syscall.go | 139 + .../cilium/ebpf/internal/syscall_string.go | 56 + .../cilium/ebpf/internal/unix/types_linux.go | 32 + .../cilium/ebpf/internal/unix/types_other.go | 34 + vendor/github.com/cilium/ebpf/linker.go | 64 +- vendor/github.com/cilium/ebpf/map.go | 431 +- vendor/github.com/cilium/ebpf/marshalers.go | 55 +- vendor/github.com/cilium/ebpf/prog.go | 421 +- vendor/github.com/cilium/ebpf/readme.md | 5 + vendor/github.com/cilium/ebpf/run-tests.sh | 50 +- vendor/github.com/cilium/ebpf/syscalls.go | 476 +- vendor/github.com/cilium/ebpf/types.go | 61 +- vendor/github.com/cilium/ebpf/types_string.go | 69 +- .../github.com/containerd/cgroups/.gitignore | 1 + .../github.com/containerd/cgroups/.travis.yml | 34 +- vendor/github.com/containerd/cgroups/Makefile | 5 +- .../containerd/cgroups/Protobuild.toml | 13 +- .../github.com/containerd/cgroups/README.md | 25 + .../github.com/containerd/cgroups/Vagrantfile | 25 + vendor/github.com/containerd/cgroups/blkio.go | 99 +- .../github.com/containerd/cgroups/cgroup.go | 33 +- .../github.com/containerd/cgroups/control.go | 6 +- vendor/github.com/containerd/cgroups/cpu.go | 8 +- .../github.com/containerd/cgroups/cpuacct.go | 4 +- vendor/github.com/containerd/cgroups/go.mod | 19 + vendor/github.com/containerd/cgroups/go.sum | 46 + .../containerd/cgroups/hierarchy.go | 2 +- .../github.com/containerd/cgroups/hugetlb.go | 7 +- .../github.com/containerd/cgroups/memory.go | 239 +- vendor/github.com/containerd/cgroups/pids.go | 5 +- vendor/github.com/containerd/cgroups/rdma.go | 13 +- .../containerd/cgroups/stats/v1/doc.go | 17 + .../cgroups/{ => stats/v1}/metrics.pb.go | 1730 +- .../cgroups/{ => stats/v1}/metrics.pb.txt | 48 +- .../cgroups/{ => stats/v1}/metrics.proto | 15 + .../containerd/cgroups/subsystem.go | 3 +- .../github.com/containerd/cgroups/systemd.go | 4 +- vendor/github.com/containerd/cgroups/utils.go | 74 +- vendor/github.com/containerd/cgroups/v1.go | 26 +- .../github.com/containerd/cgroups/v2/cpu.go | 83 + .../containerd/cgroups/v2/devicefilter.go | 199 + .../github.com/containerd/cgroups/v2/ebpf.go | 83 + .../containerd/cgroups/v2/errors.go | 50 + .../containerd/cgroups/v2/hugetlb.go | 37 + vendor/github.com/containerd/cgroups/v2/io.go | 64 + .../containerd/cgroups/v2/manager.go | 782 + .../containerd/cgroups/v2/memory.go | 52 + .../github.com/containerd/cgroups/v2/paths.go | 60 + .../github.com/containerd/cgroups/v2/pids.go | 37 + .../github.com/containerd/cgroups/v2/rdma.go | 46 + .../github.com/containerd/cgroups/v2/state.go | 65 + .../containerd/cgroups/v2/stats/doc.go | 17 + .../containerd/cgroups/v2/stats/metrics.pb.go | 3950 +++ .../cgroups/v2/stats/metrics.pb.txt | 539 + .../containerd/cgroups/v2/stats/metrics.proto | 105 + .../github.com/containerd/cgroups/v2/utils.go | 445 + .../containerd/containerd/.appveyor.yml | 63 - .../containerd/containerd/.gitignore | 1 + .../containerd/containerd/.golangci.yml | 2 +- .../github.com/containerd/containerd/.mailmap | 15 +- .../containerd/containerd/.travis.yml | 25 +- .../containerd/containerd/.zuul.yaml | 2 +- .../containerd/containerd/ADOPTERS.md | 4 + .../containerd/containerd/BUILDING.md | 24 +- .../github.com/containerd/containerd/Makefile | 23 +- .../containerd/containerd/Makefile.linux | 2 + .../containerd/containerd/Makefile.windows | 7 +- .../containerd/containerd/Protobuild.toml | 2 +- .../containerd/containerd/README.md | 43 +- .../containerd/containerd/RELEASES.md | 28 +- .../github.com/containerd/containerd/SCOPE.md | 2 +- .../containerd/containerd/Vagrantfile | 246 + .../containerd/api/events/container.pb.go | 291 +- .../containerd/api/events/content.pb.go | 103 +- .../containerd/api/events/image.pb.go | 213 +- .../containerd/api/events/namespace.pb.go | 213 +- .../containerd/api/events/snapshot.pb.go | 175 +- .../containerd/api/events/task.pb.go | 621 +- .../services/containers/v1/containers.pb.go | 709 +- .../api/services/content/v1/content.pb.go | 1009 +- .../api/services/diff/v1/diff.pb.go | 402 +- .../api/services/events/v1/events.pb.go | 287 +- .../api/services/images/v1/images.pb.go | 540 +- .../introspection/v1/introspection.pb.go | 348 +- .../api/services/leases/v1/leases.pb.go | 587 +- .../services/namespaces/v1/namespace.pb.go | 465 +- .../api/services/snapshots/v1/snapshots.pb.go | 1384 +- .../api/services/snapshots/v1/snapshots.proto | 17 + .../api/services/tasks/v1/tasks.pb.go | 1356 +- .../api/services/ttrpc/events/v1/events.pb.go | 190 +- .../api/services/version/v1/version.pb.go | 120 +- .../containerd/api/types/descriptor.pb.go | 152 +- .../containerd/api/types/metrics.pb.go | 137 +- .../containerd/api/types/mount.pb.go | 145 +- .../containerd/api/types/platform.pb.go | 123 +- .../containerd/api/types/task/task.pb.go | 243 +- .../containerd/containerd/archive/tar.go | 2 +- .../containerd/containerd/archive/tar_unix.go | 22 +- .../containerd/containerd/cio/io.go | 51 +- .../containerd/containerd/cio/io_unix.go | 2 +- .../containerd/containerd/client.go | 32 +- .../containerd/containerd/client_opts.go | 28 +- .../cmd/containerd-shim/shim_linux.go | 3 +- .../cmd/containerd/command/config.go | 8 +- .../containerd/cmd/containerd/command/main.go | 2 +- .../cmd/containerd/command/main_windows.go | 5 +- .../cmd/containerd/command/notify_linux.go | 35 +- .../cmd/containerd/command/oci-hook.go | 2 +- .../cmd/containerd/command/publish.go | 8 +- .../containerd/containerd/cmd/ctr/app/main.go | 10 +- .../containerd/cmd/ctr/commands/commands.go | 17 + .../cmd/ctr/commands/commands_unix.go | 7 + .../cmd/ctr/commands/containers/containers.go | 14 + .../cmd/ctr/commands/events/events.go | 7 +- .../cmd/ctr/commands/images/images.go | 2 + .../cmd/ctr/commands/images/mount.go | 143 + .../cmd/ctr/commands/images/push.go | 26 + .../cmd/ctr/commands/images/unmount.go | 73 + .../containerd/cmd/ctr/commands/oci/oci.go | 51 + .../cmd/ctr/commands/plugins/plugins.go | 5 +- .../containerd/cmd/ctr/commands/resolver.go | 83 +- .../cmd/ctr/commands/run/run_unix.go | 166 +- .../cmd/ctr/commands/run/run_windows.go | 4 + .../cmd/ctr/commands/tasks/metrics.go | 131 +- .../cmd/ctr/commands/tasks/start.go | 2 +- .../cmd/ctr/commands/version/version.go | 1 + .../containerd/containerd/container.go | 2 + .../containerd/containerd/container_opts.go | 2 +- .../containerd/containerd/containerd.service | 16 + .../containerd/content/local/store.go | 39 +- .../containerd/content/local/writer.go | 4 +- .../contrib/apparmor/apparmor_unsupported.go | 43 + .../contrib/seccomp/seccomp_default.go | 31 +- .../seccomp/seccomp_default_unsupported.go | 2 +- .../containerd/containerd/dialer/BUILD | 35 - .../containerd/containerd/dialer/dialer.go | 51 - .../containerd/dialer/dialer_unix.go | 36 - .../containerd/dialer/dialer_windows.go | 30 - .../containerd/diff/apply/apply_linux.go | 4 +- .../containerd/containerd/errdefs/errors.go | 16 +- .../containerd/events/exchange/exchange.go | 2 +- .../github.com/containerd/containerd/gc/gc.go | 2 +- .../github.com/containerd/containerd/go.mod | 81 + .../github.com/containerd/containerd/go.sum | 993 + .../containerd/identifiers/validate.go | 10 +- .../github.com/containerd/containerd/image.go | 6 + .../containerd/images/archive/exporter.go | 2 +- .../containerd/images/archive/importer.go | 2 +- .../containerd/images/archive/reference.go | 2 +- .../containerd/containerd/images/handlers.go | 58 +- .../containerd/containerd/images/image.go | 2 +- .../containerd/images/mediatypes.go | 31 +- .../containerd/containerd/install.go | 8 +- .../github.com/containerd/containerd/lease.go | 20 +- .../containerd/containerd/log/context.go | 30 - .../containerd/metadata/adaptors.go | 29 + .../containerd/metadata/namespaces.go | 3 +- .../containerd/metadata/snapshot.go | 284 +- .../containerd/metrics/cgroups/cgroups.go | 73 +- .../metrics/cgroups/{ => v1}/blkio.go | 2 +- .../containerd/metrics/cgroups/v1/cgroups.go | 93 + .../metrics/cgroups/{ => v1}/cpu.go | 2 +- .../metrics/cgroups/{ => v1}/hugetlb.go | 2 +- .../metrics/cgroups/{ => v1}/memory.go | 2 +- .../metrics/cgroups/{ => v1}/metric.go | 7 +- .../metrics/cgroups/{ => v1}/metrics.go | 51 +- .../metrics/cgroups/{ => v1}/oom.go | 2 +- .../metrics/cgroups/{ => v1}/pids.go | 2 +- .../containerd/metrics/cgroups/v2/cgroups.go | 55 + .../containerd/metrics/cgroups/v2/cpu.go | 124 + .../containerd/metrics/cgroups/v2/io.go | 110 + .../containerd/metrics/cgroups/v2/memory.go | 605 + .../containerd/metrics/cgroups/v2/metric.go | 64 + .../containerd/metrics/cgroups/v2/metrics.go | 163 + .../containerd/metrics/cgroups/v2/pids.go | 60 + .../containerd/metrics/types/v1/types.go | 24 +- .../containerd/metrics/types/v2/types.go | 36 + .../containerd/mount/mount_linux.go | 81 +- .../containerd/mount/mountinfo_linux.go | 12 +- .../containerd/namespaces/context.go | 3 +- .../containerd/namespaces/validate.go | 83 - .../containerd/containerd/oci/spec_opts.go | 48 +- .../containerd/oci/spec_opts_linux.go | 118 + .../containerd/oci/spec_opts_unix.go | 64 + .../containerd/oci/spec_opts_windows.go | 9 +- .../containerd/pkg/dialer/dialer_windows.go | 10 +- .../containerd/containerd/pkg/oom/oom.go | 30 + .../containerd/pkg/oom/{epoll.go => v1/v1.go} | 26 +- .../containerd/containerd/pkg/oom/v2/v2.go | 113 + .../containerd/containerd/pkg/process/init.go | 8 +- .../containerd/containerd/pkg/process/io.go | 2 +- .../containerd/pkg/process/utils.go | 2 + .../containerd/pkg/ttrpcutil/client.go | 40 +- .../pkg/ttrpcutil/client_windows.go | 59 - .../containerd/platforms/cpuinfo.go | 23 +- .../containerd/containerd/plugin/plugin.go | 2 +- .../containerd/plugin/plugin_go18.go | 2 +- .../containerd/plugin/plugin_other.go | 2 +- .../github.com/containerd/containerd/pull.go | 39 +- .../containerd/reference/docker/reference.go | 797 + .../containerd/reference/reference.go | 2 +- .../containerd/remotes/docker/authorizer.go | 2 +- .../remotes/docker/config/config_unix.go | 40 + .../remotes/docker/config/config_windows.go | 41 + .../containerd/remotes/docker/config/hosts.go | 514 + .../containerd/remotes/docker/errcode.go} | 18 +- .../containerd/remotes/docker/errdesc.go} | 18 +- .../containerd/remotes/docker/fetcher.go | 9 +- .../containerd/remotes/docker/pusher.go | 8 +- .../containerd/remotes/docker/registry.go | 10 + .../containerd/remotes/docker/resolver.go | 55 +- .../containerd/remotes/docker/scope.go | 4 +- .../containerd/containerd/rootfs/apply.go | 2 +- .../runtime/linux/runctypes/runc.pb.go | 511 +- .../containerd/runtime/opts/opts_linux.go | 11 + .../runtime/restart/monitor/change.go | 23 +- .../runtime/restart/monitor/monitor.go | 1 + .../containerd/runtime/restart/restart.go | 37 + .../containerd/runtime/v1/linux/process.go | 2 +- .../containerd/runtime/v1/linux/task.go | 2 +- .../runtime/v1/shim/client/client.go | 3 +- .../containerd/runtime/v1/shim/service.go | 82 +- .../containerd/runtime/v1/shim/v1/shim.pb.go | 1059 +- .../containerd/runtime/v2/README.md | 3 - .../containerd/runtime/v2/binary.go | 17 +- .../containerd/runtime/v2/manager.go | 10 +- .../containerd/runtime/v2/process.go | 2 +- .../containerd/runtime/v2/runc/container.go | 45 +- .../runtime/v2/runc/options/oci.pb.go | 404 +- .../containerd/runtime/v2/runc/util.go | 30 + .../containerd/runtime/v2/runc/v2/service.go | 131 +- .../containerd/containerd/runtime/v2/shim.go | 19 +- .../containerd/runtime/v2/shim/publisher.go | 22 +- .../containerd/runtime/v2/shim/shim.go | 12 + .../containerd/runtime/v2/shim/shim_linux.go | 4 +- .../containerd/runtime/v2/shim/util_unix.go | 3 +- .../containerd/runtime/v2/shim_windows.go | 2 +- .../containerd/runtime/v2/task/shim.pb.go | 1350 +- .../containerd/containerd/services.go | 28 +- .../services/introspection/introspection.go | 62 + .../services/introspection/local.go | 227 + .../services/introspection/service.go | 205 +- .../services/server/config/config.go | 6 + .../containerd/services/server/server.go | 8 +- .../services/server/server_linux.go | 34 +- .../containerd/services/services.go | 2 + .../containerd/services/snapshots/service.go | 21 +- .../containerd/services/tasks/local.go | 5 + .../containerd/containerd/signals_unix.go | 6 +- .../containerd/snapshots/native/native.go | 4 +- .../containerd/snapshots/overlay/overlay.go | 22 +- .../containerd/snapshots/proxy/proxy.go | 10 +- .../containerd/snapshots/snapshotter.go | 59 +- .../containerd/snapshots/storage/bolt.go | 44 +- .../containerd/snapshotter_opts_unix.go | 35 + .../containerd/containerd/sys/epoll.go | 21 +- .../containerd/sys/filesys_windows.go | 89 +- .../containerd/containerd/sys/oom_unix.go | 4 +- .../containerd/containerd/sys/proc.go | 80 - .../containerd/containerd/sys/reaper.go | 69 - .../containerd/sys/reaper/reaper_unix.go | 50 +- .../reaper_utils_linux.go} | 17 +- .../containerd/containerd/sys/socket_unix.go | 4 +- .../containerd/containerd/sys/userns_linux.go | 62 + .../containerd/sys/userns_unsupported.go | 25 + .../github.com/containerd/containerd/task.go | 11 +- .../containerd/containerd/task_opts_unix.go | 52 + .../containerd/containerd/unpacker.go | 328 +- .../containerd/containerd/vendor.conf | 93 - .../containerd/containerd/version/version.go | 7 +- .../github.com/containerd/cri/.appveyor.yml | 30 + .../github.com/containerd/cri/.golangci.yml | 23 + vendor/github.com/containerd/cri/.travis.yml | 50 - .../github.com/containerd/cri/CONTRIBUTING.md | 118 - vendor/github.com/containerd/cri/Makefile | 2 +- vendor/github.com/containerd/cri/OWNERS | 5 + vendor/github.com/containerd/cri/README.md | 57 +- vendor/github.com/containerd/cri/cri.go | 30 +- .../cri/pkg/annotations/annotations.go | 23 +- .../cri/pkg/api/runtimeoptions/v1/api.pb.go | 20 +- .../cri/pkg/atomic/atomic_boolean.go | 20 +- .../containerd/cri/pkg/config/config.go | 122 +- .../containerd/cri/pkg/config/config_unix.go | 75 + .../cri/pkg/config/config_windows.go | 71 + .../containerd/cri/pkg/constants/constants.go | 20 +- .../cri/pkg/containerd/opts/container.go | 20 +- .../cri/pkg/containerd/opts/spec.go | 670 +- .../cri/pkg/containerd/opts/spec_unix.go | 721 + .../cri/pkg/containerd/opts/spec_windows.go | 224 + .../cri/pkg/containerd/opts/task.go | 20 +- .../pkg/containerd/platforms/default_unix.go} | 12 +- .../containerd/platforms/default_windows.go | 77 + .../cri/pkg/containerd/util/util.go | 20 +- .../containerd/cri/pkg/ioutil/read_closer.go | 20 +- .../containerd/cri/pkg/ioutil/write_closer.go | 20 +- .../containerd/cri/pkg/ioutil/writer_group.go | 20 +- .../cri/pkg/netns/{netns.go => netns_unix.go} | 22 +- .../containerd/cri/pkg/netns/netns_windows.go | 78 + vendor/github.com/containerd/cri/pkg/os/os.go | 60 +- .../containerd/cri/pkg/os/os_unix.go | 59 + .../containerd/cri/pkg/registrar/registrar.go | 20 +- .../cri/pkg/seccomp/seccomp_linux.go | 88 + .../cri/pkg/seccomp/seccomp_unsupported.go | 23 + .../cri/pkg/server/bandwidth/doc.go | 34 + .../cri/pkg/server/bandwidth/fake_shaper.go | 72 + .../cri/pkg/server/bandwidth/interfaces.go | 56 + .../cri/pkg/server/bandwidth/linux.go | 361 + .../cri/pkg/server/bandwidth/unsupported.go | 69 + .../cri/pkg/server/bandwidth/utils.go | 82 + .../cri/pkg/server/cni_conf_syncer.go | 121 + .../cri/pkg/server/container_attach.go | 24 +- .../cri/pkg/server/container_create.go | 448 +- .../cri/pkg/server/container_create_unix.go | 460 + .../pkg/server/container_create_windows.go | 117 + .../cri/pkg/server/container_exec.go | 20 +- .../cri/pkg/server/container_execsync.go | 68 +- .../cri/pkg/server/container_list.go | 33 +- .../cri/pkg/server/container_log_reopen.go | 20 +- .../cri/pkg/server/container_remove.go | 25 +- .../cri/pkg/server/container_start.go | 30 +- .../cri/pkg/server/container_stats.go | 22 +- .../cri/pkg/server/container_stats_list.go | 91 +- .../pkg/server/container_stats_list_unix.go | 129 + .../server/container_stats_list_windows.go | 84 + .../cri/pkg/server/container_status.go | 20 +- .../cri/pkg/server/container_stop.go | 20 +- ....go => container_update_resources_unix.go} | 30 +- .../container_update_resources_windows.go | 31 + .../containerd/cri/pkg/server/events.go | 20 +- .../containerd/cri/pkg/server/helpers.go | 172 +- .../containerd/cri/pkg/server/helpers_unix.go | 258 + .../cri/pkg/server/helpers_windows.go | 219 + .../containerd/cri/pkg/server/image_list.go | 20 +- .../containerd/cri/pkg/server/image_pull.go | 144 +- .../containerd/cri/pkg/server/image_remove.go | 20 +- .../containerd/cri/pkg/server/image_status.go | 20 +- .../containerd/cri/pkg/server/imagefs_info.go | 21 +- .../cri/pkg/server/instrumented_service.go | 20 +- .../cri/pkg/server/io/container_io.go | 20 +- .../containerd/cri/pkg/server/io/exec_io.go | 20 +- .../containerd/cri/pkg/server/io/helpers.go | 27 +- .../cri/pkg/server/io/helpers_unix.go | 31 + .../cri/pkg/server/io/helpers_windows.go | 81 + .../containerd/cri/pkg/server/io/logger.go | 20 +- .../containerd/cri/pkg/server/restart.go | 27 +- .../containerd/cri/pkg/server/sandbox_list.go | 20 +- .../cri/pkg/server/sandbox_portforward.go | 108 +- .../pkg/server/sandbox_portforward_unix.go | 128 + .../pkg/server/sandbox_portforward_windows.go | 80 + .../cri/pkg/server/sandbox_remove.go | 25 +- .../containerd/cri/pkg/server/sandbox_run.go | 407 +- .../cri/pkg/server/sandbox_run_unix.go | 310 + .../cri/pkg/server/sandbox_run_windows.go | 91 + .../cri/pkg/server/sandbox_status.go | 24 +- .../containerd/cri/pkg/server/sandbox_stop.go | 16 +- .../containerd/cri/pkg/server/service.go | 140 +- .../containerd/cri/pkg/server/service_unix.go | 72 + .../cri/pkg/server/service_windows.go | 52 + .../containerd/cri/pkg/server/snapshots.go | 20 +- .../containerd/cri/pkg/server/status.go | 32 +- .../containerd/cri/pkg/server/streaming.go | 50 +- .../cri/pkg/server/update_runtime_config.go | 23 +- .../containerd/cri/pkg/server/version.go | 20 +- .../cri/pkg/store/container/container.go | 20 +- .../cri/pkg/store/container/fake_status.go | 20 +- .../cri/pkg/store/container/metadata.go | 20 +- .../cri/pkg/store/container/status.go | 20 +- .../containerd/cri/pkg/store/errors.go | 32 +- .../cri/pkg/store/image/fake_image.go | 20 +- .../containerd/cri/pkg/store/image/image.go | 22 +- .../containerd/cri/pkg/store/label/label.go | 20 +- .../cri/pkg/store/sandbox/metadata.go | 20 +- .../cri/pkg/store/sandbox/sandbox.go | 20 +- .../cri/pkg/store/sandbox/status.go | 40 +- .../cri/pkg/store/snapshot/snapshot.go | 20 +- .../containerd/cri/pkg/store/util.go | 20 +- .../containerd/cri/pkg/streaming/errors.go | 72 + .../pkg/streaming/portforward/constants.go | 40 + .../pkg/streaming/portforward/httpstream.go | 315 + .../pkg/streaming/portforward/portforward.go | 69 + .../pkg/streaming/portforward/websocket.go | 213 + .../cri/pkg/streaming/remotecommand/attach.go | 75 + .../cri/pkg/streaming/remotecommand/doc.go | 34 + .../cri/pkg/streaming/remotecommand/exec.go | 95 + .../pkg/streaming/remotecommand/httpstream.go | 463 + .../pkg/streaming/remotecommand/websocket.go | 148 + .../cri/pkg/streaming/request_cache.go | 162 + .../containerd/cri/pkg/streaming/server.go | 399 + .../containerd/cri/pkg/util/deep_copy.go | 20 +- .../github.com/containerd/cri/pkg/util/id.go | 20 +- .../containerd/cri/pkg/util/image.go | 28 +- .../containerd/cri/pkg/util/strings.go | 20 +- vendor/github.com/containerd/cri/vendor.conf | 173 +- .../github.com/containerd/go-cni/.travis.yml | 8 +- vendor/github.com/containerd/go-cni/README.md | 2 +- vendor/github.com/containerd/go-cni/errors.go | 10 +- vendor/github.com/containerd/go-cni/go.mod | 14 + vendor/github.com/containerd/go-cni/go.sum | 39 + .../containerd/go-cni/namespace_opts.go | 8 + vendor/github.com/containerd/go-cni/opts.go | 18 + vendor/github.com/containerd/go-cni/types.go | 10 + .../github.com/containerd/go-cni/vendor.conf | 6 - vendor/github.com/containerd/go-runc/go.mod | 10 + vendor/github.com/containerd/go-runc/go.sum | 9 + vendor/github.com/containerd/go-runc/runc.go | 88 +- vendor/github.com/containerd/go-runc/utils.go | 4 + .../containerd/imgcrypt/.appveyor.yml | 41 + .../github.com/containerd/imgcrypt/.gitignore | 3 + .../containerd/imgcrypt/.golangci.yml | 20 + .../containerd/imgcrypt/.travis.yml | 45 + vendor/github.com/containerd/imgcrypt/LICENSE | 191 + .../containerd/imgcrypt/MAINTAINERS | 9 + .../github.com/containerd/imgcrypt/Makefile | 56 + .../github.com/containerd/imgcrypt/README.md | 102 + vendor/github.com/containerd/imgcrypt/go.mod | 39 + vendor/github.com/containerd/imgcrypt/go.sum | 135 + .../imgcrypt/images/encryption/client.go | 83 + .../imgcrypt/images/encryption/encryption.go | 468 + .../github.com/containerd/imgcrypt/payload.go | 43 + .../containerd/imgcrypt/vendor.conf | 45 + .../github.com/containerd/ttrpc/.travis.yml | 16 +- vendor/github.com/containerd/ttrpc/client.go | 9 +- vendor/github.com/containerd/ttrpc/go.mod | 14 + vendor/github.com/containerd/ttrpc/go.sum | 85 + vendor/github.com/containerd/ttrpc/server.go | 15 + .../github.com/containerd/ttrpc/services.go | 9 + .../containernetworking/cni/libcni/api.go | 238 +- .../containernetworking/cni/libcni/conf.go | 4 +- .../cni/pkg/invoke/args.go | 6 +- .../cni/pkg/invoke/raw_exec.go | 52 +- .../cni/pkg/types/020/types.go | 14 - .../containernetworking/cni/pkg/types/args.go | 2 +- .../cni/pkg/types/current/types.go | 17 - .../cni/pkg/types/types.go | 28 +- .../cni/pkg/utils/utils.go | 84 + .../containers/ocicrypt/CODE-OF-CONDUCT.md | 3 + .../ocicrypt/LICENSE} | 2 - .../containers/ocicrypt/MAINTAINERS | 5 + .../github.com/containers/ocicrypt/Makefile | 31 + .../github.com/containers/ocicrypt/README.md | 32 + .../ocicrypt/blockcipher/blockcipher.go | 160 + .../blockcipher/blockcipher_aes_ctr.go | 193 + .../containers/ocicrypt/config/config.go | 114 + .../ocicrypt/config/constructors.go | 134 + .../containers/ocicrypt/encryption.go | 328 + vendor/github.com/containers/ocicrypt/go.mod | 18 + vendor/github.com/containers/ocicrypt/go.sum | 73 + vendor/github.com/containers/ocicrypt/gpg.go | 425 + .../containers/ocicrypt/gpgvault.go | 100 + .../ocicrypt/keywrap/jwe/keywrapper_jwe.go | 136 + .../containers/ocicrypt/keywrap/keywrap.go | 48 + .../ocicrypt/keywrap/pgp/keywrapper_gpg.go | 273 + .../keywrap/pkcs7/keywrapper_pkcs7.go | 136 + .../github.com/containers/ocicrypt/reader.go | 40 + .../containers/ocicrypt/spec/spec.go | 12 + .../ocicrypt/utils/delayedreader.go | 109 + .../containers/ocicrypt/utils/ioutils.go | 31 + .../containers/ocicrypt/utils/testing.go | 166 + .../containers/ocicrypt/utils/utils.go | 220 + .../github.com/coreos/go-systemd/v22/LICENSE | 191 + .../github.com/coreos/go-systemd/v22/NOTICE | 5 + .../coreos/go-systemd/v22/activation/files.go | 67 + .../go-systemd/v22/activation/listeners.go | 103 + .../go-systemd/v22/activation/packetconns.go | 38 + .../coreos/go-systemd/v22/daemon/sdnotify.go | 84 + .../coreos/go-systemd/v22/daemon/watchdog.go | 73 + .../coreos/go-systemd/{ => v22}/dbus/dbus.go | 2 +- .../go-systemd/{ => v22}/dbus/methods.go | 8 +- .../go-systemd/{ => v22}/dbus/properties.go | 4 +- .../coreos/go-systemd/{ => v22}/dbus/set.go | 0 .../go-systemd/{ => v22}/dbus/subscription.go | 2 +- .../{ => v22}/dbus/subscription_set.go | 0 vendor/github.com/coreos/pkg/capnslog/init.go | 2 +- .../registry/api/errcode/handler.go | 40 - .../logger/jsonfilelog/jsonlog/jsonlog.go | 25 - .../jsonfilelog/jsonlog/jsonlogbytes.go | 125 - .../jsonfilelog/jsonlog/time_marshalling.go | 20 - .../operatingsystem/operatingsystem_linux.go | 77 - .../operatingsystem/operatingsystem_unix.go | 25 - .../operatingsystem_windows.go | 51 - .../docker/docker/pkg/parsers/parsers.go | 69 - .../docker/docker/pkg/sysinfo/README.md | 1 - .../docker/docker/pkg/sysinfo/numcpu.go | 12 - .../docker/docker/pkg/sysinfo/numcpu_linux.go | 42 - .../docker/pkg/sysinfo/numcpu_windows.go | 35 - .../docker/docker/pkg/sysinfo/sysinfo.go | 144 - .../docker/pkg/sysinfo/sysinfo_linux.go | 254 - .../docker/docker/pkg/sysinfo/sysinfo_unix.go | 9 - .../docker/pkg/sysinfo/sysinfo_windows.go | 7 - .../docker/go-connections/nat/nat.go | 2 +- .../tlsconfig/certpool_other.go | 1 - .../docker/go-connections/tlsconfig/config.go | 26 +- .../github.com/evanphx/json-patch/.travis.yml | 7 +- vendor/github.com/evanphx/json-patch/LICENSE | 2 +- .../github.com/evanphx/json-patch/README.md | 11 +- vendor/github.com/evanphx/json-patch/merge.go | 13 +- vendor/github.com/evanphx/json-patch/patch.go | 28 +- .../fsnotify/fsnotify/.editorconfig | 9 +- .../fsnotify/fsnotify/.gitattributes | 1 + .../github.com/fsnotify/fsnotify/.travis.yml | 20 +- vendor/github.com/fsnotify/fsnotify/LICENSE | 2 +- vendor/github.com/fsnotify/fsnotify/README.md | 71 +- .../github.com/fsnotify/fsnotify/fsnotify.go | 4 +- vendor/github.com/fsnotify/fsnotify/go.mod | 5 + vendor/github.com/fsnotify/fsnotify/go.sum | 2 + .../fsnotify/fsnotify/inotify_poller.go | 4 +- .../fsnotify/fsnotify/open_mode_bsd.go | 2 +- .../fsnotify/fsnotify/open_mode_darwin.go | 2 +- vendor/github.com/fullsailor/pkcs7/.gitignore | 24 + .../github.com/fullsailor/pkcs7/.travis.yml | 7 + .../pkcs7}/LICENSE | 3 +- vendor/github.com/fullsailor/pkcs7/README.md | 8 + vendor/github.com/fullsailor/pkcs7/ber.go | 248 + vendor/github.com/fullsailor/pkcs7/pkcs7.go | 962 + vendor/github.com/fullsailor/pkcs7/x509.go | 133 + .../v3 => github.com/go-logr/logr}/LICENSE | 0 vendor/github.com/go-logr/logr/README.md | 181 + vendor/github.com/go-logr/logr/go.mod | 3 + vendor/github.com/go-logr/logr/logr.go | 178 + vendor/github.com/godbus/dbus/.travis.yml | 46 - vendor/github.com/godbus/dbus/go.mod | 1 - vendor/github.com/godbus/dbus/v5/.travis.yml | 50 + .../godbus/dbus/{ => v5}/CONTRIBUTING.md | 0 .../github.com/godbus/dbus/{ => v5}/LICENSE | 0 .../godbus/dbus/{ => v5}/MAINTAINERS | 0 .../godbus/dbus/{ => v5}/README.markdown | 0 .../github.com/godbus/dbus/{ => v5}/auth.go | 4 +- .../godbus/dbus/{ => v5}/auth_anonymous.go | 0 .../godbus/dbus/{ => v5}/auth_external.go | 0 .../godbus/dbus/{ => v5}/auth_sha1.go | 2 +- .../github.com/godbus/dbus/{ => v5}/call.go | 0 .../github.com/godbus/dbus/{ => v5}/conn.go | 167 +- .../godbus/dbus/{ => v5}/conn_darwin.go | 0 .../godbus/dbus/{ => v5}/conn_other.go | 6 +- .../godbus/dbus/{ => v5}/conn_unix.go | 5 +- .../godbus/dbus/{ => v5}/conn_windows.go | 0 .../github.com/godbus/dbus/{ => v5}/dbus.go | 1 + .../godbus/dbus/{ => v5}/decoder.go | 53 +- .../godbus/dbus/{ => v5}/default_handler.go | 123 +- vendor/github.com/godbus/dbus/{ => v5}/doc.go | 2 +- .../godbus/dbus/{ => v5}/encoder.go | 2 +- .../github.com/godbus/dbus/{ => v5}/export.go | 2 +- vendor/github.com/godbus/dbus/v5/go.mod | 3 + vendor/github.com/godbus/dbus/v5/go.sum | 0 .../godbus/dbus/{ => v5}/homedir.go | 0 .../godbus/dbus/{ => v5}/homedir_dynamic.go | 0 .../godbus/dbus/{ => v5}/homedir_static.go | 0 vendor/github.com/godbus/dbus/v5/match.go | 62 + .../godbus/dbus/{ => v5}/message.go | 0 .../github.com/godbus/dbus/{ => v5}/object.go | 62 +- .../godbus/dbus/{ => v5}/server_interfaces.go | 8 + vendor/github.com/godbus/dbus/{ => v5}/sig.go | 0 .../godbus/dbus/{ => v5}/transport_darwin.go | 0 .../godbus/dbus/{ => v5}/transport_generic.go | 0 .../dbus/{ => v5}/transport_nonce_tcp.go | 0 .../godbus/dbus/{ => v5}/transport_tcp.go | 2 - .../godbus/dbus/{ => v5}/transport_unix.go | 2 +- .../{ => v5}/transport_unixcred_dragonfly.go | 0 .../{ => v5}/transport_unixcred_freebsd.go | 0 .../dbus/{ => v5}/transport_unixcred_linux.go | 0 .../{ => v5}/transport_unixcred_openbsd.go | 0 .../godbus/dbus/{ => v5}/variant.go | 4 +- .../godbus/dbus/{ => v5}/variant_lexer.go | 8 +- .../godbus/dbus/{ => v5}/variant_parser.go | 0 .../googleapis/google/rpc/error_details.pb.go | 58 +- .../gogo/googleapis/google/rpc/status.pb.go | 58 +- .../golang/protobuf/jsonpb/jsonpb.go | 12 +- .../github.com/golang/protobuf/proto/lib.go | 2 +- .../github.com/golang/protobuf/proto/text.go | 6 +- .../protoc-gen-go/descriptor/descriptor.pb.go | 12 +- .../protoc-gen-go/descriptor/descriptor.proto | 140 +- .../protoc-gen-go/generator/generator.go | 8 +- .../generator/internal/remap/remap.go | 2 +- .../golang/protobuf/ptypes/any/any.pb.go | 7 +- .../golang/protobuf/ptypes/any/any.proto | 3 +- .../protobuf/ptypes/duration/duration.pb.go | 6 +- .../protobuf/ptypes/duration/duration.proto | 3 +- .../protobuf/ptypes/struct/struct.pb.go | 4 +- .../protobuf/ptypes/struct/struct.proto | 1 - .../protobuf/ptypes/timestamp/timestamp.pb.go | 40 +- .../protobuf/ptypes/timestamp/timestamp.proto | 37 +- .../protobuf/ptypes/wrappers/wrappers.pb.go | 4 +- .../protobuf/ptypes/wrappers/wrappers.proto | 5 + .../google/cadvisor/accelerators/nvidia.go | 110 +- .../google/cadvisor/cache/memory/memory.go | 56 +- .../collector/prometheus_collector.go | 15 +- .../container/common/container_hints.go | 8 +- .../cadvisor/container/common/fsHandler.go | 44 +- .../cadvisor/container/common/helpers.go | 13 +- .../google/cadvisor/container/container.go | 1 - .../cadvisor/container/containerd/client.go | 25 +- .../cadvisor/container/containerd/factory.go | 22 +- .../cadvisor/container/containerd/handler.go | 74 +- .../container/containerd/install/install.go | 2 +- .../google/cadvisor/container/crio/client.go | 44 +- .../google/cadvisor/container/crio/factory.go | 32 +- .../google/cadvisor/container/crio/handler.go | 125 +- .../container/crio/install/install.go | 2 +- .../google/cadvisor/container/crio/plugin.go | 2 +- .../cadvisor/container/docker/docker.go | 44 +- .../cadvisor/container/docker/factory.go | 70 +- .../cadvisor/container/docker/handler.go | 122 +- .../container/docker/install/install.go | 2 +- .../cadvisor/container/docker/plugin.go | 2 +- .../docker/utils}/docker.go | 5 +- .../google/cadvisor/container/factory.go | 70 +- .../container/libcontainer/handler.go | 405 +- .../container/libcontainer/helpers.go | 67 +- .../google/cadvisor/container/raw/factory.go | 18 +- .../google/cadvisor/container/raw/handler.go | 101 +- .../google/cadvisor/container/raw/watcher.go | 42 +- .../cadvisor/container/systemd/factory.go | 5 +- .../container/systemd/install/install.go | 2 +- .../cadvisor/devicemapper/dmsetup_client.go | 2 +- .../cadvisor/devicemapper/thin_ls_client.go | 2 +- .../devicemapper/thin_pool_watcher.go | 16 +- .../google/cadvisor/events/handler.go | 110 +- vendor/github.com/google/cadvisor/fs/fs.go | 203 +- vendor/github.com/google/cadvisor/fs/types.go | 2 + .../google/cadvisor/info/v1/container.go | 463 +- .../google/cadvisor/info/v1/machine.go | 128 +- .../google/cadvisor/info/v1/metric.go | 6 +- .../google/cadvisor/info/v2/container.go | 30 +- .../google/cadvisor/info/v2/conversion.go | 32 +- .../google/cadvisor/machine/info.go | 61 +- .../google/cadvisor/machine/machine.go | 470 +- .../cadvisor/machine/operatingsystem_unix.go | 54 + .../machine/operatingsystem_windows.go | 54 + .../google/cadvisor/manager/container.go | 308 +- .../google/cadvisor/manager/manager.go | 417 +- .../google/cadvisor/metrics/metrics.go | 42 + .../google/cadvisor/metrics/prometheus.go | 709 +- .../cadvisor/metrics/prometheus_fake.go | 720 + .../cadvisor/metrics/prometheus_machine.go | 349 + .../google/cadvisor/nvm/machine_libipmctl.go | 130 + .../cadvisor/nvm/machine_no_libipmctl.go | 34 + .../google/cadvisor/perf/collector_libpfm.go | 294 + .../cadvisor/perf/collector_no_libpfm.go | 33 + .../github.com/google/cadvisor/perf/config.go | 91 + .../google/cadvisor/perf/manager_libpfm.go | 74 + .../google/cadvisor/perf/manager_no_libpfm.go | 30 + .../google/cadvisor/perf/types_libpfm.go | 54 + .../google/cadvisor/perf/uncore_libpfm.go | 392 + .../google/cadvisor/resctrl/collector.go | 74 + .../google/cadvisor/resctrl/manager.go | 48 + .../github.com/google/cadvisor/stats/noop.go | 43 + .../cadvisor/{accelerators => stats}/types.go | 21 +- .../google/cadvisor/summary/percentiles.go | 69 +- .../google/cadvisor/summary/summary.go | 7 +- .../cadvisor/utils/cloudinfo/cloudinfo.go | 14 +- .../google/cadvisor/utils/cpuload/cpuload.go | 2 +- .../cadvisor/utils/cpuload/netlink/conn.go | 35 +- .../cadvisor/utils/cpuload/netlink/netlink.go | 23 +- .../cadvisor/utils/cpuload/netlink/reader.go | 22 +- .../cadvisor/utils/oomparser/oomparser.go | 59 +- .../google/cadvisor/utils/sysfs/sysfs.go | 138 +- .../google/cadvisor/utils/sysinfo/sysinfo.go | 350 +- .../google/cadvisor/utils/timed_store.go | 62 +- .../github.com/google/cadvisor/zfs/watcher.go | 2 +- .../github.com/googleapis/gax-go/v2/LICENSE | 27 + .../googleapis/gax-go/v2/call_option.go | 161 + vendor/github.com/googleapis/gax-go/v2/gax.go | 39 + vendor/github.com/googleapis/gax-go/v2/go.mod | 3 + vendor/github.com/googleapis/gax-go/v2/go.sum | 25 + .../github.com/googleapis/gax-go/v2/header.go | 53 + .../github.com/googleapis/gax-go/v2/invoke.go | 99 + .../googleapis/gnostic/compiler/reader.go | 17 + .../{OpenAPIv2 => openapiv2}/OpenAPIv2.go | 0 .../{OpenAPIv2 => openapiv2}/OpenAPIv2.pb.go | 510 +- .../{OpenAPIv2 => openapiv2}/OpenAPIv2.proto | 0 .../{OpenAPIv2 => openapiv2}/README.md | 0 .../{OpenAPIv2 => openapiv2}/openapi-2.0.json | 0 vendor/github.com/hashicorp/errwrap/README.md | 2 +- vendor/github.com/hashicorp/errwrap/go.mod | 1 + .../hashicorp/go-multierror/.travis.yml | 2 +- .../hashicorp/go-multierror/format.go | 6 +- .../github.com/hashicorp/go-multierror/go.mod | 3 + .../github.com/hashicorp/go-multierror/go.sum | 4 + .../hashicorp/go-multierror/multierror.go | 4 +- .../hashicorp/go-multierror/sort.go | 16 + vendor/github.com/imdario/mergo/.travis.yml | 2 + vendor/github.com/imdario/mergo/merge.go | 50 +- vendor/github.com/json-iterator/go/README.md | 36 +- vendor/github.com/json-iterator/go/any_str.go | 4 +- vendor/github.com/json-iterator/go/config.go | 4 +- .../json-iterator/go/iter_object.go | 4 +- .../json-iterator/go/reflect_extension.go | 4 +- .../json-iterator/go/reflect_map.go | 90 +- .../json-iterator/go/reflect_optional.go | 4 - .../go/reflect_struct_decoder.go | 22 +- .../go/reflect_struct_encoder.go | 1 + vendor/github.com/json-iterator/go/stream.go | 5 +- .../cri-tools/cmd/crictl/attach.go | 3 +- .../cri-tools/cmd/crictl/config.go | 168 +- .../cri-tools/cmd/crictl/container.go | 119 +- .../cri-tools/cmd/crictl/display.go | 33 +- .../cri-tools/cmd/crictl/exec.go | 5 +- .../cri-tools/cmd/crictl/image.go | 20 +- .../cri-tools/cmd/crictl/info.go | 5 +- .../cri-tools/cmd/crictl/main.go | 188 +- .../cri-tools/cmd/crictl/main_unix.go | 5 +- .../cri-tools/cmd/crictl/main_windows.go | 5 +- .../cri-tools/cmd/crictl/portforward.go | 3 +- .../cri-tools/cmd/crictl/sandbox.go | 100 +- .../cri-tools/cmd/crictl/stats.go | 11 +- .../cri-tools/cmd/crictl/util.go | 9 +- .../cri-tools/cmd/crictl/version.go | 3 +- .../cri-tools/pkg/common/config.go | 73 + .../cri-tools/pkg/common/file.go | 204 + .../mattn/go-shellwords/.travis.yml | 8 - .../github.com/mattn/go-shellwords/README.md | 47 - vendor/github.com/mattn/go-shellwords/go.mod | 1 - .../mattn/go-shellwords/shellwords.go | 195 - .../mattn/go-shellwords/util_go15.go | 24 - .../mattn/go-shellwords/util_posix.go | 22 - .../mattn/go-shellwords/util_windows.go | 22 - .../github.com/mistifyio/go-zfs/.travis.yml | 43 + vendor/github.com/mistifyio/go-zfs/README.md | 2 +- vendor/github.com/mistifyio/go-zfs/utils.go | 102 +- .../mistifyio/go-zfs/utils_notsolaris.go | 17 + .../mistifyio/go-zfs/utils_solaris.go | 17 + vendor/github.com/mistifyio/go-zfs/zfs.go | 82 +- vendor/github.com/mistifyio/go-zfs/zpool.go | 19 +- vendor/github.com/moby/ipvs/.gitignore | 38 + .../forked => github.com/moby}/ipvs/LICENSE | 0 vendor/github.com/moby/ipvs/README.md | 34 + .../moby}/ipvs/constants.go | 3 - vendor/github.com/moby/ipvs/doc.go | 1 + vendor/github.com/moby/ipvs/go.mod | 12 + vendor/github.com/moby/ipvs/go.sum | 35 + .../forked => github.com/moby}/ipvs/ipvs.go | 3 - .../moby}/ipvs/netlink.go | 7 +- vendor/github.com/moby/term/.gitignore | 24 + vendor/github.com/moby/term/LICENSE | 191 + vendor/github.com/moby/term/ascii.go | 66 + vendor/github.com/moby/term/go.mod | 13 + vendor/github.com/moby/term/go.sum | 33 + vendor/github.com/moby/term/proxy.go | 78 + vendor/github.com/moby/term/tc.go | 20 + vendor/github.com/moby/term/term.go | 124 + vendor/github.com/moby/term/term_windows.go | 221 + vendor/github.com/moby/term/termios_bsd.go | 42 + vendor/github.com/moby/term/termios_linux.go | 39 + .../moby/term/windows/ansi_reader.go | 263 + .../moby/term/windows/ansi_writer.go | 64 + .../github.com/moby/term/windows/console.go | 35 + .../github.com/moby/term/windows/windows.go | 34 + vendor/github.com/moby/term/winsize.go | 20 + .../github.com/mrunalp/fileutils/fileutils.go | 16 +- .../github.com/mrunalp/fileutils/idtools.go | 9 +- .../opencontainers/go-digest/.mailmap | 3 + .../opencontainers/go-digest/.pullapprove.yml | 38 +- .../opencontainers/go-digest/.travis.yml | 3 +- .../opencontainers/go-digest/LICENSE | 192 + .../opencontainers/go-digest/MAINTAINERS | 12 +- .../opencontainers/go-digest/README.md | 70 +- .../opencontainers/go-digest/algorithm.go | 1 + .../opencontainers/go-digest/digest.go | 1 + .../opencontainers/go-digest/digester.go | 1 + .../opencontainers/go-digest/digestset/set.go | 262 + .../opencontainers/go-digest/doc.go | 10 +- .../opencontainers/go-digest/go.mod | 3 + .../opencontainers/go-digest/verifiers.go | 1 + .../github.com/opencontainers/runc/.gitignore | 2 + .../opencontainers/runc/.pullapprove.yml | 10 - .../opencontainers/runc/.travis.yml | 72 +- .../github.com/opencontainers/runc/Dockerfile | 109 +- .../opencontainers/runc/MAINTAINERS | 2 + .../github.com/opencontainers/runc/Makefile | 151 +- .../github.com/opencontainers/runc/README.md | 58 +- .../opencontainers/runc/SECURITY.md | 2 +- vendor/github.com/opencontainers/runc/VERSION | 2 +- .../opencontainers/runc/Vagrantfile.centos7 | 59 + .../opencontainers/runc/Vagrantfile.fedora32 | 59 + .../opencontainers/runc/checkpoint.go | 16 +- .../runc/contrib/cmd/recvtty/recvtty.go | 19 +- .../github.com/opencontainers/runc/delete.go | 6 +- .../github.com/opencontainers/runc/events.go | 11 +- vendor/github.com/opencontainers/runc/exec.go | 1 + vendor/github.com/opencontainers/runc/go.mod | 26 + vendor/github.com/opencontainers/runc/go.sum | 87 + vendor/github.com/opencontainers/runc/kill.go | 16 +- .../runc/libcontainer/README.md | 5 +- .../runc/libcontainer/cgroups/cgroups.go | 55 +- .../cgroups/devices/devices_emulator.go | 373 + .../cgroups/ebpf/devicefilter/devicefilter.go | 7 +- .../runc/libcontainer/cgroups/fs/apply_raw.go | 411 - .../runc/libcontainer/cgroups/fs/blkio.go | 12 +- .../runc/libcontainer/cgroups/fs/cpu.go | 39 +- .../runc/libcontainer/cgroups/fs/cpuacct.go | 85 +- .../runc/libcontainer/cgroups/fs/cpuset.go | 43 +- .../runc/libcontainer/cgroups/fs/devices.go | 109 +- .../runc/libcontainer/cgroups/fs/freezer.go | 46 +- .../runc/libcontainer/cgroups/fs/fs.go | 460 + .../runc/libcontainer/cgroups/fs/hugetlb.go | 15 +- .../runc/libcontainer/cgroups/fs/kmem.go | 10 +- .../runc/libcontainer/cgroups/fs/memory.go | 120 +- .../runc/libcontainer/cgroups/fs/name.go | 11 +- .../runc/libcontainer/cgroups/fs/net_cls.go | 12 +- .../runc/libcontainer/cgroups/fs/net_prio.go | 12 +- .../libcontainer/cgroups/fs/perf_event.go | 12 +- .../runc/libcontainer/cgroups/fs/pids.go | 15 +- .../fs/{fs_unsupported.go => unsupported.go} | 0 .../runc/libcontainer/cgroups/fs2/cpu.go | 29 +- .../runc/libcontainer/cgroups/fs2/cpuset.go | 8 + .../runc/libcontainer/cgroups/fs2/create.go | 151 + .../libcontainer/cgroups/fs2/defaultpath.go | 24 +- .../runc/libcontainer/cgroups/fs2/devices.go | 42 +- .../runc/libcontainer/cgroups/fs2/freezer.go | 63 +- .../runc/libcontainer/cgroups/fs2/fs2.go | 266 +- .../runc/libcontainer/cgroups/fs2/hugetlb.go | 66 + .../runc/libcontainer/cgroups/fs2/io.go | 20 +- .../runc/libcontainer/cgroups/fs2/memory.go | 48 +- .../runc/libcontainer/cgroups/fs2/pids.go | 31 +- .../libcontainer/cgroups/fscommon/fscommon.go | 16 +- .../runc/libcontainer/cgroups/stats.go | 27 + .../cgroups/systemd/apply_systemd.go | 534 - .../libcontainer/cgroups/systemd/common.go | 427 + .../cgroups/systemd/unified_hierarchy.go | 312 - .../{apply_nosystemd.go => unsupported.go} | 32 +- .../runc/libcontainer/cgroups/systemd/user.go | 106 + .../runc/libcontainer/cgroups/systemd/v1.go | 463 + .../runc/libcontainer/cgroups/systemd/v2.go | 360 + .../runc/libcontainer/cgroups/utils.go | 357 +- .../runc/libcontainer/cgroups/v1_utils.go | 301 + .../runc/libcontainer/configs/cgroup_linux.go | 28 +- .../runc/libcontainer/configs/config.go | 87 +- .../runc/libcontainer/configs/device.go | 167 +- .../libcontainer/configs/device_defaults.go | 111 - .../runc/libcontainer/configs/device_unix.go | 16 + .../libcontainer/configs/device_windows.go | 5 + .../libcontainer/configs/validate/rootless.go | 11 +- .../configs/validate/validator.go | 25 +- .../runc/libcontainer/container_linux.go | 626 +- .../runc/libcontainer/criu_opts_linux.go | 2 +- .../runc/libcontainer/devices/devices.go | 43 +- .../runc/libcontainer/factory_linux.go | 105 +- .../runc/libcontainer/generic_error.go | 2 +- .../runc/libcontainer/init_linux.go | 17 +- .../runc/libcontainer/intelrdt/cmt.go | 22 + .../runc/libcontainer/intelrdt/intelrdt.go | 71 +- .../runc/libcontainer/intelrdt/mbm.go | 34 + .../runc/libcontainer/intelrdt/monitoring.go | 85 + .../runc/libcontainer/intelrdt/stats.go | 19 + .../runc/libcontainer/keys/keyctl.go | 3 +- .../runc/libcontainer/mount/mount.go | 23 - .../runc/libcontainer/mount/mount_linux.go | 82 - .../runc/libcontainer/mount/mountinfo.go | 40 - .../runc/libcontainer/notify_linux.go | 13 +- .../runc/libcontainer/notify_linux_v2.go | 102 + .../runc/libcontainer/nsenter/cloned_binary.c | 28 +- .../runc/libcontainer/nsenter/nsexec.c | 12 +- .../runc/libcontainer/process_linux.go | 120 +- .../runc/libcontainer/restored_process.go | 25 +- .../runc/libcontainer/rootfs_linux.go | 126 +- .../libcontainer/seccomp/seccomp_linux.go | 29 +- .../runc/libcontainer/setns_init_linux.go | 11 +- .../runc/libcontainer/specconv/example.go | 19 +- .../runc/libcontainer/specconv/spec_linux.go | 677 +- .../runc/libcontainer/standard_init_linux.go | 26 +- .../runc/libcontainer/state_linux.go | 43 +- .../opencontainers/runc/libcontainer/sync.go | 33 +- .../runc/libcontainer/system/linux.go | 39 +- .../runc/libcontainer/system/sysconfig.go | 12 - .../libcontainer/system/sysconfig_notcgo.go | 15 - .../runc/libcontainer/user/user.go | 30 +- vendor/github.com/opencontainers/runc/list.go | 3 +- vendor/github.com/opencontainers/runc/main.go | 29 +- .../opencontainers/runc/notify_socket.go | 136 +- vendor/github.com/opencontainers/runc/ps.go | 7 +- .../github.com/opencontainers/runc/restore.go | 2 +- .../opencontainers/runc/rlimit_linux.go | 52 +- .../opencontainers/runc/rootless_linux.go | 4 - .../opencontainers/runc/signalmap.go | 47 - .../opencontainers/runc/signalmap_mipsx.go | 45 - .../github.com/opencontainers/runc/signals.go | 7 +- .../github.com/opencontainers/runc/start.go | 13 +- .../opencontainers/runc/types/events.go | 18 +- .../github.com/opencontainers/runc/update.go | 41 +- .../github.com/opencontainers/runc/utils.go | 10 +- .../opencontainers/runc/utils_linux.go | 49 +- .../opencontainers/runc/vendor.conf | 31 - .../runtime-spec/specs-go/config.go | 91 +- .../runtime-spec/specs-go/state.go | 20 +- .../runtime-spec/specs-go/version.go | 2 +- .../opencontainers/selinux/go-selinux/doc.go | 21 + .../selinux/go-selinux/label/label_stub.go | 1 - .../selinux/go-selinux/selinux.go | 249 + .../selinux/go-selinux/selinux_linux.go | 485 +- .../selinux/go-selinux/selinux_stub.go | 190 +- .../opencontainers/selinux/pkg/pwalk/pwalk.go | 8 +- .../client_golang/prometheus/build_info.go | 29 + .../prometheus/build_info_pre_1.12.go | 22 + .../client_golang/prometheus/collector.go | 2 +- .../client_golang/prometheus/counter.go | 50 +- .../client_golang/prometheus/desc.go | 22 +- .../client_golang/prometheus/doc.go | 40 +- .../client_golang/prometheus/gauge.go | 11 +- .../client_golang/prometheus/go_collector.go | 123 +- .../client_golang/prometheus/histogram.go | 223 +- .../client_golang/prometheus/http.go | 504 - .../client_golang/prometheus/metric.go | 4 +- .../client_golang/prometheus/observer.go | 12 + .../prometheus/process_collector.go | 61 +- .../prometheus/process_collector_other.go | 65 + .../prometheus/process_collector_windows.go | 116 + .../prometheus/promhttp/delegator.go | 179 +- .../prometheus/promhttp/delegator_1_8.go | 181 - .../client_golang/prometheus/promhttp/http.go | 128 +- .../prometheus/promhttp/instrument_client.go | 122 + .../promhttp/instrument_client_1_8.go | 144 - .../client_golang/prometheus/registry.go | 49 +- .../client_golang/prometheus/summary.go | 153 +- .../client_golang/prometheus/testutil/lint.go | 46 + .../prometheus/testutil/promlint/promlint.go | 386 + .../prometheus/testutil/testutil.go | 51 +- .../client_golang/prometheus/value.go | 51 +- .../client_golang/prometheus/vec.go | 14 +- .../client_golang/prometheus/wrap.go | 35 +- .../prometheus/client_model/go/metrics.pb.go | 266 +- .../prometheus/common/expfmt/encode.go | 128 +- .../prometheus/common/expfmt/expfmt.go | 11 +- .../common/expfmt/openmetrics_create.go | 527 + .../prometheus/common/expfmt/text_create.go | 21 +- .../prometheus/common/expfmt/text_parse.go | 13 +- .../bitbucket.org/ww/goautoneg/autoneg.go | 6 +- .../prometheus/common/model/metric.go | 1 - .../prometheus/common/model/time.go | 12 +- .../prometheus/procfs/.golangci.yml | 4 + .../prometheus/procfs/CONTRIBUTING.md | 109 +- .../prometheus/procfs/MAINTAINERS.md | 3 +- vendor/github.com/prometheus/procfs/Makefile | 11 +- .../prometheus/procfs/Makefile.common | 173 +- vendor/github.com/prometheus/procfs/README.md | 54 +- vendor/github.com/prometheus/procfs/arp.go | 85 + .../github.com/prometheus/procfs/buddyinfo.go | 16 +- .../github.com/prometheus/procfs/cpuinfo.go | 420 + .../prometheus/procfs/cpuinfo_arm.go | 18 + .../prometheus/procfs/cpuinfo_arm64.go | 19 + .../prometheus/procfs/cpuinfo_default.go | 19 + .../prometheus/procfs/cpuinfo_mips.go | 18 + .../prometheus/procfs/cpuinfo_mips64.go | 18 + .../prometheus/procfs/cpuinfo_mips64le.go | 18 + .../prometheus/procfs/cpuinfo_mipsle.go | 18 + .../prometheus/procfs/cpuinfo_ppc64.go | 18 + .../prometheus/procfs/cpuinfo_ppc64le.go | 18 + .../prometheus/procfs/cpuinfo_s390x.go | 18 + vendor/github.com/prometheus/procfs/crypto.go | 153 + .../prometheus/procfs/fixtures.ttar | 5892 +++- vendor/github.com/prometheus/procfs/fs.go | 73 +- .../github.com/prometheus/procfs/fscache.go | 422 + vendor/github.com/prometheus/procfs/go.mod | 8 + vendor/github.com/prometheus/procfs/go.sum | 6 + .../prometheus/procfs/internal/fs/fs.go | 55 + .../prometheus/procfs/internal/util/parse.go | 38 + .../procfs/internal/util/readfile.go | 38 + .../{sysreadfile_linux.go => sysreadfile.go} | 7 +- .../internal/util/sysreadfile_compat.go | 26 + .../procfs/internal/util/valueparser.go | 91 + vendor/github.com/prometheus/procfs/ipvs.go | 42 +- .../prometheus/procfs/kernel_random.go | 62 + .../github.com/prometheus/procfs/loadavg.go | 62 + vendor/github.com/prometheus/procfs/mdstat.go | 145 +- .../github.com/prometheus/procfs/meminfo.go | 277 + .../github.com/prometheus/procfs/mountinfo.go | 180 + .../prometheus/procfs/mountstats.go | 63 +- .../prometheus/procfs/net_conntrackstat.go | 153 + .../github.com/prometheus/procfs/net_dev.go | 39 +- .../prometheus/procfs/net_sockstat.go | 163 + .../prometheus/procfs/net_softnet.go | 102 + .../github.com/prometheus/procfs/net_udp.go | 229 + .../github.com/prometheus/procfs/net_unix.go | 257 + .../github.com/prometheus/procfs/nfs/nfs.go | 263 - .../github.com/prometheus/procfs/nfs/parse.go | 317 - .../prometheus/procfs/nfs/parse_nfs.go | 67 - .../prometheus/procfs/nfs/parse_nfsd.go | 89 - vendor/github.com/prometheus/procfs/proc.go | 99 +- .../prometheus/procfs/proc_cgroup.go | 98 + .../proc_environ.go} | 39 +- .../prometheus/procfs/proc_fdinfo.go | 133 + .../github.com/prometheus/procfs/proc_io.go | 16 +- .../prometheus/procfs/proc_limits.go | 7 + .../github.com/prometheus/procfs/proc_maps.go | 209 + .../github.com/prometheus/procfs/proc_ns.go | 4 +- .../github.com/prometheus/procfs/proc_psi.go | 100 + .../prometheus/procfs/proc_smaps.go | 165 + .../github.com/prometheus/procfs/proc_stat.go | 28 +- .../prometheus/procfs/proc_status.go | 166 + .../github.com/prometheus/procfs/schedstat.go | 118 + vendor/github.com/prometheus/procfs/stat.go | 50 +- vendor/github.com/prometheus/procfs/swaps.go | 89 + vendor/github.com/prometheus/procfs/ttar | 42 +- vendor/github.com/prometheus/procfs/vm.go | 210 + vendor/github.com/prometheus/procfs/xfrm.go | 2 +- .../github.com/prometheus/procfs/xfs/parse.go | 330 - .../github.com/prometheus/procfs/xfs/xfs.go | 163 - .../github.com/prometheus/procfs/zoneinfo.go | 196 + vendor/github.com/rubiojr/go-vhd/vhd/util.go | 19 - vendor/github.com/rubiojr/go-vhd/vhd/vhd.go | 13 +- vendor/github.com/spf13/cobra/.gitignore | 5 +- vendor/github.com/spf13/cobra/.travis.yml | 28 +- vendor/github.com/spf13/cobra/Makefile | 36 + vendor/github.com/spf13/cobra/README.md | 105 +- vendor/github.com/spf13/cobra/args.go | 10 +- .../spf13/cobra/bash_completions.go | 104 +- .../spf13/cobra/bash_completions.md | 239 +- vendor/github.com/spf13/cobra/cobra.go | 4 +- vendor/github.com/spf13/cobra/command.go | 52 +- .../spf13/cobra/custom_completions.go | 384 + .../spf13/cobra/fish_completions.go | 172 + .../spf13/cobra/fish_completions.md | 7 + vendor/github.com/spf13/cobra/go.mod | 5 +- vendor/github.com/spf13/cobra/go.sum | 120 +- .../wsproxy/websocket_proxy.go | 39 +- .../github.com/vishvananda/netlink/.gitignore | 1 + .../vishvananda/netlink/.travis.yml | 6 + .../vishvananda/netlink/addr_linux.go | 105 +- .../vishvananda/netlink/bridge_linux.go | 9 +- .../github.com/vishvananda/netlink/class.go | 141 +- .../vishvananda/netlink/class_linux.go | 145 +- .../vishvananda/netlink/conntrack_linux.go | 121 +- .../vishvananda/netlink/devlink_linux.go | 272 + .../github.com/vishvananda/netlink/filter.go | 102 +- .../vishvananda/netlink/filter_linux.go | 240 +- .../vishvananda/netlink/fou_linux.go | 6 +- .../vishvananda/netlink/genetlink_linux.go | 3 + vendor/github.com/vishvananda/netlink/go.mod | 8 + vendor/github.com/vishvananda/netlink/go.sum | 4 + .../vishvananda/netlink/handle_linux.go | 2 +- .../vishvananda/netlink/handle_unspecified.go | 12 + .../vishvananda/netlink/ioctl_linux.go | 10 +- vendor/github.com/vishvananda/netlink/link.go | 242 +- .../vishvananda/netlink/link_linux.go | 1124 +- .../github.com/vishvananda/netlink/neigh.go | 7 + .../vishvananda/netlink/neigh_linux.go | 191 +- .../github.com/vishvananda/netlink/netlink.go | 3 +- .../netlink/netlink_unspecified.go | 12 + .../vishvananda/netlink/netns_linux.go | 141 + .../vishvananda/netlink/netns_unspecified.go | 19 + .../vishvananda/netlink/nl/bridge_linux.go | 4 +- .../vishvananda/netlink/nl/conntrack_linux.go | 40 +- .../vishvananda/netlink/nl/devlink_linux.go | 40 + .../vishvananda/netlink/nl/link_linux.go | 72 +- .../vishvananda/netlink/nl/nl_linux.go | 66 +- .../vishvananda/netlink/nl/rdma_link_linux.go | 35 + .../vishvananda/netlink/nl/route_linux.go | 26 + .../vishvananda/netlink/nl/seg6_linux.go | 43 + .../vishvananda/netlink/nl/seg6local_linux.go | 76 + .../vishvananda/netlink/nl/syscall.go | 11 +- .../vishvananda/netlink/nl/tc_linux.go | 166 +- .../vishvananda/netlink/nl/xfrm_linux.go | 62 +- .../vishvananda/netlink/protinfo.go | 4 + .../vishvananda/netlink/protinfo_linux.go | 7 +- .../github.com/vishvananda/netlink/qdisc.go | 48 + .../vishvananda/netlink/qdisc_linux.go | 69 +- .../vishvananda/netlink/rdma_link_linux.go | 264 + .../github.com/vishvananda/netlink/route.go | 2 + .../vishvananda/netlink/route_linux.go | 229 +- .../vishvananda/netlink/rule_linux.go | 2 +- .../vishvananda/netlink/socket_linux.go | 5 +- .../vishvananda/netlink/xfrm_monitor_linux.go | 6 +- .../vishvananda/netlink/xfrm_policy.go | 26 +- .../vishvananda/netlink/xfrm_policy_linux.go | 19 +- .../vishvananda/netlink/xfrm_state.go | 6 +- .../vishvananda/netlink/xfrm_state_linux.go | 27 +- vendor/github.com/vishvananda/netns/README.md | 1 - vendor/github.com/vishvananda/netns/go.mod | 5 + vendor/github.com/vishvananda/netns/go.sum | 2 + vendor/github.com/vishvananda/netns/netns.go | 19 +- .../vishvananda/netns/netns_linux.go | 32 +- vendor/github.com/willf/bitset/.gitignore | 26 + vendor/github.com/willf/bitset/.travis.yml | 37 + vendor/github.com/willf/bitset/LICENSE | 27 + vendor/github.com/willf/bitset/Makefile | 191 + vendor/github.com/willf/bitset/README.md | 96 + .../willf/bitset/azure-pipelines.yml | 39 + vendor/github.com/willf/bitset/bitset.go | 879 + vendor/github.com/willf/bitset/popcnt.go | 53 + vendor/github.com/willf/bitset/popcnt_19.go | 45 + .../github.com/willf/bitset/popcnt_amd64.go | 68 + vendor/github.com/willf/bitset/popcnt_amd64.s | 104 + .../github.com/willf/bitset/popcnt_generic.go | 24 + .../willf/bitset/trailing_zeros_18.go | 14 + .../willf/bitset/trailing_zeros_19.go | 9 + vendor/go.etcd.io/bbolt/.travis.yml | 2 +- vendor/go.etcd.io/bbolt/README.md | 15 +- vendor/go.etcd.io/bbolt/bolt_386.go | 3 - vendor/go.etcd.io/bbolt/bolt_amd64.go | 3 - vendor/go.etcd.io/bbolt/bolt_arm.go | 21 - vendor/go.etcd.io/bbolt/bolt_arm64.go | 3 - vendor/go.etcd.io/bbolt/bolt_mips64x.go | 3 - vendor/go.etcd.io/bbolt/bolt_mipsx.go | 3 - vendor/go.etcd.io/bbolt/bolt_ppc.go | 3 - vendor/go.etcd.io/bbolt/bolt_ppc64.go | 3 - vendor/go.etcd.io/bbolt/bolt_ppc64le.go | 3 - vendor/go.etcd.io/bbolt/bolt_riscv64.go | 3 - vendor/go.etcd.io/bbolt/bolt_s390x.go | 3 - vendor/go.etcd.io/bbolt/bolt_unix.go | 2 +- vendor/go.etcd.io/bbolt/bolt_unix_aix.go | 90 + vendor/go.etcd.io/bbolt/bucket.go | 34 +- vendor/go.etcd.io/bbolt/cursor.go | 2 +- vendor/go.etcd.io/bbolt/db.go | 4 +- vendor/go.etcd.io/bbolt/freelist.go | 38 +- vendor/go.etcd.io/bbolt/freelist_hmap.go | 2 +- vendor/go.etcd.io/bbolt/go.mod | 5 + vendor/go.etcd.io/bbolt/go.sum | 2 + vendor/go.etcd.io/bbolt/node.go | 56 +- vendor/go.etcd.io/bbolt/page.go | 41 +- vendor/go.etcd.io/bbolt/tx.go | 18 +- vendor/go.etcd.io/bbolt/unsafe.go | 39 + vendor/go.etcd.io/etcd/auth/simple_token.go | 25 +- vendor/go.etcd.io/etcd/auth/store.go | 11 +- vendor/go.etcd.io/etcd/clientv3/watch.go | 58 +- vendor/go.etcd.io/etcd/embed/config.go | 17 +- vendor/go.etcd.io/etcd/embed/etcd.go | 93 +- .../etcdserver/api/v2discovery/discovery.go | 22 +- .../etcd/etcdserver/api/v3rpc/watch.go | 19 +- vendor/go.etcd.io/etcd/etcdserver/apply_v2.go | 7 +- vendor/go.etcd.io/etcd/etcdserver/backend.go | 1 + vendor/go.etcd.io/etcd/etcdserver/config.go | 7 + .../etcdserverpb/raft_internal_stringer.go | 8 +- vendor/go.etcd.io/etcd/etcdserver/metrics.go | 24 +- vendor/go.etcd.io/etcd/etcdserver/raft.go | 7 +- vendor/go.etcd.io/etcd/etcdserver/server.go | 1 + vendor/go.etcd.io/etcd/etcdserver/storage.go | 5 +- vendor/go.etcd.io/etcd/etcdserver/util.go | 18 + .../go.etcd.io/etcd/etcdserver/v3_server.go | 3 +- .../go.etcd.io/etcd/mvcc/backend/backend.go | 4 + .../go.etcd.io/etcd/mvcc/watchable_store.go | 5 +- .../go.etcd.io/etcd/pkg/fileutil/dir_unix.go | 5 + .../etcd/pkg/fileutil/dir_windows.go | 5 + .../go.etcd.io/etcd/pkg/fileutil/fileutil.go | 43 +- .../go.etcd.io/etcd/pkg/runtime/fds_linux.go | 17 +- .../go.etcd.io/etcd/pkg/transport/listener.go | 12 +- vendor/go.etcd.io/etcd/version/version.go | 2 +- vendor/go.etcd.io/etcd/wal/decoder.go | 8 + vendor/go.etcd.io/etcd/wal/wal.go | 40 +- vendor/go.opencensus.io/Gopkg.lock | 231 - vendor/go.opencensus.io/Gopkg.toml | 36 - vendor/go.opencensus.io/README.md | 6 +- vendor/go.opencensus.io/appveyor.yml | 7 +- vendor/go.opencensus.io/go.mod | 7 +- vendor/go.opencensus.io/go.sum | 20 +- vendor/go.opencensus.io/internal/internal.go | 2 +- vendor/go.opencensus.io/opencensus.go | 2 +- .../go.opencensus.io/plugin/ochttp/server.go | 12 +- .../go.opencensus.io/plugin/ochttp/stats.go | 18 +- .../go.opencensus.io/plugin/ochttp/trace.go | 2 + vendor/go.opencensus.io/stats/units.go | 1 + .../stats/view/aggregation.go | 11 +- .../stats/view/aggregation_data.go | 6 +- vendor/go.opencensus.io/stats/view/doc.go | 2 +- vendor/go.opencensus.io/stats/view/view.go | 6 +- .../stats/view/view_to_metric.go | 11 +- vendor/go.opencensus.io/tag/key.go | 5 +- vendor/go.opencensus.io/tag/map_codec.go | 2 +- vendor/go.opencensus.io/trace/lrumap.go | 42 +- vendor/go.opencensus.io/trace/trace.go | 6 +- vendor/go.uber.org/atomic/.travis.yml | 16 +- vendor/go.uber.org/atomic/Makefile | 33 +- vendor/go.uber.org/atomic/README.md | 6 +- vendor/go.uber.org/atomic/error.go | 55 + vendor/golang.org/x/crypto/cast5/cast5.go | 533 + .../x/crypto/chacha20/chacha_arm64.go | 3 +- .../x/crypto/chacha20/chacha_arm64.s | 3 +- .../x/crypto/chacha20/chacha_generic.go | 140 +- .../x/crypto/chacha20/chacha_noasm.go | 2 +- .../x/crypto/chacha20/chacha_ppc64le.go | 2 +- .../x/crypto/chacha20/chacha_ppc64le.s | 2 +- .../x/crypto/chacha20/chacha_s390x.go | 2 +- .../x/crypto/chacha20/chacha_s390x.s | 2 +- vendor/golang.org/x/crypto/chacha20/xor.go | 17 +- vendor/golang.org/x/crypto/cryptobyte/asn1.go | 6 +- .../x/crypto/openpgp/armor/armor.go | 224 + .../x/crypto/openpgp/armor/encode.go | 160 + .../x/crypto/openpgp/canonical_text.go | 59 + .../x/crypto/openpgp/elgamal/elgamal.go | 124 + .../x/crypto/openpgp/errors/errors.go | 72 + vendor/golang.org/x/crypto/openpgp/keys.go | 693 + .../x/crypto/openpgp/packet/compressed.go | 123 + .../x/crypto/openpgp/packet/config.go | 91 + .../x/crypto/openpgp/packet/encrypted_key.go | 208 + .../x/crypto/openpgp/packet/literal.go | 89 + .../x/crypto/openpgp/packet/ocfb.go | 143 + .../openpgp/packet/one_pass_signature.go | 73 + .../x/crypto/openpgp/packet/opaque.go | 162 + .../x/crypto/openpgp/packet/packet.go | 584 + .../x/crypto/openpgp/packet/private_key.go | 385 + .../x/crypto/openpgp/packet/public_key.go | 753 + .../x/crypto/openpgp/packet/public_key_v3.go | 279 + .../x/crypto/openpgp/packet/reader.go | 76 + .../x/crypto/openpgp/packet/signature.go | 731 + .../x/crypto/openpgp/packet/signature_v3.go | 146 + .../openpgp/packet/symmetric_key_encrypted.go | 155 + .../openpgp/packet/symmetrically_encrypted.go | 290 + .../x/crypto/openpgp/packet/userattribute.go | 91 + .../x/crypto/openpgp/packet/userid.go | 160 + vendor/golang.org/x/crypto/openpgp/read.go | 442 + vendor/golang.org/x/crypto/openpgp/s2k/s2k.go | 273 + vendor/golang.org/x/crypto/openpgp/write.go | 418 + .../golang.org/x/crypto/poly1305/mac_noasm.go | 4 +- .../golang.org/x/crypto/poly1305/poly1305.go | 26 +- .../golang.org/x/crypto/poly1305/sum_amd64.go | 13 +- .../golang.org/x/crypto/poly1305/sum_amd64.s | 2 +- .../x/crypto/poly1305/sum_generic.go | 21 +- .../golang.org/x/crypto/poly1305/sum_noasm.go | 13 - .../x/crypto/poly1305/sum_ppc64le.go | 13 +- .../x/crypto/poly1305/sum_ppc64le.s | 2 +- .../golang.org/x/crypto/poly1305/sum_s390x.go | 80 +- .../golang.org/x/crypto/poly1305/sum_s390x.s | 633 +- .../x/crypto/poly1305/sum_vmsl_s390x.s | 909 - vendor/golang.org/x/crypto/ssh/certs.go | 4 +- vendor/golang.org/x/crypto/ssh/cipher.go | 2 +- vendor/golang.org/x/crypto/ssh/client_auth.go | 22 +- vendor/golang.org/x/crypto/ssh/kex.go | 4 +- vendor/golang.org/x/crypto/ssh/keys.go | 18 +- vendor/golang.org/x/crypto/ssh/mux.go | 23 +- .../x/crypto/ssh/terminal/terminal.go | 8 + vendor/golang.org/x/mod/LICENSE | 27 + vendor/golang.org/x/mod/PATENTS | 22 + .../{tools/internal => mod}/module/module.go | 394 +- .../{tools/internal => mod}/semver/semver.go | 4 +- vendor/golang.org/x/net/http2/transport.go | 67 +- vendor/golang.org/x/oauth2/transport.go | 79 +- vendor/golang.org/x/sys/cpu/byteorder.go | 11 +- vendor/golang.org/x/sys/cpu/cpu.go | 96 + .../sys/cpu/{cpu_aix_ppc64.go => cpu_aix.go} | 6 +- vendor/golang.org/x/sys/cpu/cpu_arm.go | 33 + vendor/golang.org/x/sys/cpu/cpu_arm64.go | 39 +- vendor/golang.org/x/sys/cpu/cpu_linux.go | 2 +- .../golang.org/x/sys/cpu/cpu_linux_mips64x.go | 1 + .../golang.org/x/sys/cpu/cpu_linux_ppc64x.go | 2 - .../golang.org/x/sys/cpu/cpu_linux_s390x.go | 2 - vendor/golang.org/x/sys/cpu/cpu_mips64x.go | 6 + vendor/golang.org/x/sys/cpu/cpu_mipsx.go | 2 + vendor/golang.org/x/sys/cpu/cpu_other_arm.go | 9 + vendor/golang.org/x/sys/cpu/cpu_ppc64x.go | 16 + vendor/golang.org/x/sys/cpu/cpu_riscv64.go | 2 + vendor/golang.org/x/sys/cpu/cpu_s390x.go | 30 + vendor/golang.org/x/sys/cpu/cpu_wasm.go | 4 + vendor/golang.org/x/sys/cpu/cpu_x86.go | 31 +- .../golang.org/x/sys/cpu/syscall_aix_gccgo.go | 27 + .../x/sys/unix/asm_openbsd_mips64.s | 29 + vendor/golang.org/x/sys/unix/ioctl.go | 9 + vendor/golang.org/x/sys/unix/mkall.sh | 9 + vendor/golang.org/x/sys/unix/mkerrors.sh | 9 +- vendor/golang.org/x/sys/unix/syscall_bsd.go | 17 + .../golang.org/x/sys/unix/syscall_darwin.go | 1 + .../x/sys/unix/syscall_darwin_386.go | 11 - .../x/sys/unix/syscall_darwin_amd64.go | 11 - .../x/sys/unix/syscall_darwin_arm.go | 11 - .../x/sys/unix/syscall_darwin_arm64.go | 11 - vendor/golang.org/x/sys/unix/syscall_linux.go | 123 +- .../x/sys/unix/syscall_linux_arm.go | 5 - .../x/sys/unix/syscall_linux_gc_arm.go | 13 + .../x/sys/unix/syscall_openbsd_mips64.go | 35 + .../x/sys/unix/zerrors_freebsd_386.go | 6 + .../x/sys/unix/zerrors_freebsd_amd64.go | 6 + .../x/sys/unix/zerrors_freebsd_arm.go | 6 + .../x/sys/unix/zerrors_freebsd_arm64.go | 6 + vendor/golang.org/x/sys/unix/zerrors_linux.go | 131 +- .../x/sys/unix/zerrors_linux_386.go | 2 + .../x/sys/unix/zerrors_linux_amd64.go | 2 + .../x/sys/unix/zerrors_linux_arm.go | 2 + .../x/sys/unix/zerrors_linux_arm64.go | 3 + .../x/sys/unix/zerrors_linux_mips.go | 2 + .../x/sys/unix/zerrors_linux_mips64.go | 2 + .../x/sys/unix/zerrors_linux_mips64le.go | 2 + .../x/sys/unix/zerrors_linux_mipsle.go | 2 + .../x/sys/unix/zerrors_linux_ppc64.go | 2 + .../x/sys/unix/zerrors_linux_ppc64le.go | 2 + .../x/sys/unix/zerrors_linux_riscv64.go | 2 + .../x/sys/unix/zerrors_linux_s390x.go | 2 + .../x/sys/unix/zerrors_linux_sparc64.go | 2 + .../x/sys/unix/zerrors_netbsd_386.go | 6 + .../x/sys/unix/zerrors_netbsd_amd64.go | 6 + .../x/sys/unix/zerrors_netbsd_arm.go | 6 + .../x/sys/unix/zerrors_netbsd_arm64.go | 6 + .../x/sys/unix/zerrors_openbsd_386.go | 7 + .../x/sys/unix/zerrors_openbsd_amd64.go | 7 + .../x/sys/unix/zerrors_openbsd_arm.go | 7 + .../x/sys/unix/zerrors_openbsd_arm64.go | 7 + .../x/sys/unix/zerrors_openbsd_mips64.go | 1862 ++ .../x/sys/unix/zsyscall_darwin_386.1_11.go | 22 +- .../x/sys/unix/zsyscall_darwin_386.go | 32 +- .../x/sys/unix/zsyscall_darwin_amd64.1_11.go | 22 +- .../x/sys/unix/zsyscall_darwin_amd64.go | 32 +- .../x/sys/unix/zsyscall_darwin_arm.1_11.go | 22 +- .../x/sys/unix/zsyscall_darwin_arm.go | 32 +- .../x/sys/unix/zsyscall_darwin_arm64.1_11.go | 22 +- .../x/sys/unix/zsyscall_darwin_arm64.go | 32 +- .../golang.org/x/sys/unix/zsyscall_linux.go | 61 + .../x/sys/unix/zsyscall_openbsd_mips64.go | 1692 ++ .../x/sys/unix/zsysctl_openbsd_386.go | 3 +- .../x/sys/unix/zsysctl_openbsd_amd64.go | 1 + .../x/sys/unix/zsysctl_openbsd_arm.go | 1 + .../x/sys/unix/zsysctl_openbsd_mips64.go | 279 + .../x/sys/unix/zsysnum_linux_386.go | 1 + .../x/sys/unix/zsysnum_linux_amd64.go | 1 + .../x/sys/unix/zsysnum_linux_arm.go | 1 + .../x/sys/unix/zsysnum_linux_arm64.go | 1 + .../x/sys/unix/zsysnum_linux_mips.go | 1 + .../x/sys/unix/zsysnum_linux_mips64.go | 1 + .../x/sys/unix/zsysnum_linux_mips64le.go | 1 + .../x/sys/unix/zsysnum_linux_mipsle.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 1 + .../x/sys/unix/zsysnum_linux_riscv64.go | 1 + .../x/sys/unix/zsysnum_linux_s390x.go | 1 + .../x/sys/unix/zsysnum_linux_sparc64.go | 1 + .../x/sys/unix/zsysnum_openbsd_mips64.go | 220 + .../x/sys/unix/ztypes_freebsd_arm.go | 12 +- vendor/golang.org/x/sys/unix/ztypes_linux.go | 528 +- .../golang.org/x/sys/unix/ztypes_linux_386.go | 5 + .../x/sys/unix/ztypes_linux_amd64.go | 7 + .../golang.org/x/sys/unix/ztypes_linux_arm.go | 7 + .../x/sys/unix/ztypes_linux_arm64.go | 7 + .../x/sys/unix/ztypes_linux_mips.go | 7 + .../x/sys/unix/ztypes_linux_mips64.go | 7 + .../x/sys/unix/ztypes_linux_mips64le.go | 7 + .../x/sys/unix/ztypes_linux_mipsle.go | 7 + .../x/sys/unix/ztypes_linux_ppc64.go | 7 + .../x/sys/unix/ztypes_linux_ppc64le.go | 7 + .../x/sys/unix/ztypes_linux_riscv64.go | 7 + .../x/sys/unix/ztypes_linux_s390x.go | 7 + .../x/sys/unix/ztypes_linux_sparc64.go | 7 + .../x/sys/unix/ztypes_openbsd_mips64.go | 565 + .../golang.org/x/sys/windows/dll_windows.go | 29 + .../golang.org/x/sys/windows/env_windows.go | 11 +- .../x/sys/windows/memory_windows.go | 5 + .../x/sys/windows/security_windows.go | 20 +- .../x/sys/windows/svc/mgr/config.go | 40 +- .../golang.org/x/sys/windows/svc/mgr/mgr.go | 13 +- .../x/sys/windows/svc/mgr/recovery.go | 12 +- .../golang.org/x/sys/windows/svc/security.go | 7 +- .../golang.org/x/sys/windows/svc/service.go | 11 +- .../golang.org/x/sys/windows/svc/sys_amd64.s | 10 +- .../x/sys/windows/syscall_windows.go | 39 +- .../x/sys/windows/zsyscall_windows.go | 19 + .../x/text/encoding/unicode/unicode.go | 94 +- .../golang.org/x/text/transform/transform.go | 6 +- vendor/golang.org/x/text/unicode/bidi/core.go | 8 +- .../x/text/unicode/bidi/tables11.0.0.go | 2 +- .../x/text/unicode/bidi/tables12.0.0.go | 1923 ++ .../x/text/unicode/norm/tables11.0.0.go | 2 +- .../x/text/unicode/norm/tables12.0.0.go | 7710 +++++ .../golang.org/x/text/width/tables11.0.0.go | 2 +- .../golang.org/x/text/width/tables12.0.0.go | 1350 + vendor/golang.org/x/time/rate/rate.go | 30 +- .../x/tools/go/ast/astutil/imports.go | 5 +- .../x/tools/go/gcexportdata/gcexportdata.go | 109 - .../x/tools/go/gcexportdata/importer.go | 73 - .../x/tools/go/internal/gcimporter/bexport.go | 852 - .../x/tools/go/internal/gcimporter/bimport.go | 1039 - .../go/internal/gcimporter/exportdata.go | 93 - .../go/internal/gcimporter/gcimporter.go | 1078 - .../x/tools/go/internal/gcimporter/iexport.go | 726 - .../x/tools/go/internal/gcimporter/iimport.go | 636 - .../go/internal/gcimporter/newInterface10.go | 21 - .../go/internal/gcimporter/newInterface11.go | 13 - .../tools/go/internal/packagesdriver/sizes.go | 173 - vendor/golang.org/x/tools/go/packages/doc.go | 222 - .../x/tools/go/packages/external.go | 94 - .../golang.org/x/tools/go/packages/golist.go | 1122 - .../x/tools/go/packages/golist_overlay.go | 293 - .../x/tools/go/packages/packages.go | 1113 - .../golang.org/x/tools/go/packages/visit.go | 55 - vendor/golang.org/x/tools/imports/forward.go | 10 +- .../x/tools/internal/event/core/event.go | 85 + .../x/tools/internal/event/core/export.go | 70 + .../x/tools/internal/event/core/fast.go | 77 + .../golang.org/x/tools/internal/event/doc.go | 7 + .../x/tools/internal/event/event.go | 127 + .../x/tools/internal/event/keys/keys.go | 564 + .../x/tools/internal/event/keys/standard.go | 22 + .../x/tools/internal/event/label/label.go | 213 + .../x/tools/internal/fastwalk/fastwalk.go | 10 +- .../internal/fastwalk/fastwalk_portable.go | 2 +- .../tools/internal/fastwalk/fastwalk_unix.go | 7 +- .../x/tools/internal/gocommand/invoke.go | 210 + .../x/tools/internal/gocommand/vendor.go | 102 + .../x/tools/internal/gopathwalk/walk.go | 45 +- .../x/tools/internal/imports/fix.go | 675 +- .../x/tools/internal/imports/imports.go | 63 +- .../x/tools/internal/imports/mod.go | 547 +- .../x/tools/internal/imports/mod_cache.go | 177 +- .../x/tools/internal/imports/zstdlib.go | 20829 +++++++------- .../golang.org/x/tools/internal/span/parse.go | 100 - .../golang.org/x/tools/internal/span/span.go | 285 - .../golang.org/x/tools/internal/span/token.go | 151 - .../x/tools/internal/span/token111.go | 39 - .../x/tools/internal/span/token112.go | 16 - .../golang.org/x/tools/internal/span/uri.go | 152 - .../golang.org/x/tools/internal/span/utf16.go | 94 - vendor/golang.org/x/xerrors/LICENSE | 27 + vendor/golang.org/x/xerrors/PATENTS | 22 + vendor/golang.org/x/xerrors/README | 2 + vendor/golang.org/x/xerrors/adaptor.go | 193 + vendor/golang.org/x/xerrors/codereview.cfg | 1 + vendor/golang.org/x/xerrors/doc.go | 22 + vendor/golang.org/x/xerrors/errors.go | 33 + vendor/golang.org/x/xerrors/fmt.go | 187 + vendor/golang.org/x/xerrors/format.go | 34 + vendor/golang.org/x/xerrors/frame.go | 56 + vendor/golang.org/x/xerrors/go.mod | 3 + .../golang.org/x/xerrors/internal/internal.go | 8 + vendor/golang.org/x/xerrors/wrap.go | 106 + vendor/google.golang.org/api/AUTHORS | 1 + vendor/google.golang.org/api/CONTRIBUTORS | 1 + .../api/compute/v0.alpha/compute-api.json | 5484 +++- .../api/compute/v0.alpha/compute-gen.go | 14470 ++++++++-- .../api/compute/v0.beta/compute-api.json | 3983 ++- .../api/compute/v0.beta/compute-gen.go | 10317 +++++-- .../api/compute/v1/compute-api.json | 8440 +++++- .../api/compute/v1/compute-gen.go | 23881 +++++++++++++++- .../api/container/v1/container-api.json | 785 +- .../api/container/v1/container-gen.go | 1494 +- .../api/gensupport/backoff.go | 51 - .../api/gensupport/header.go | 22 - .../google.golang.org/api/gensupport/retry.go | 84 - .../api/googleapi/googleapi.go | 21 +- .../googleapi/internal/uritemplates/LICENSE | 18 - .../api/googleapi/transport/apikey.go | 8 +- .../google.golang.org/api/googleapi/types.go | 2 +- .../google.golang.org/api/internal/creds.go | 16 +- .../api/{ => internal}/gensupport/buffer.go | 0 .../api/{ => internal}/gensupport/doc.go | 0 .../api/{ => internal}/gensupport/json.go | 0 .../{ => internal}/gensupport/jsonfloat.go | 16 +- .../api/{ => internal}/gensupport/media.go | 11 +- .../api/{ => internal}/gensupport/params.go | 0 .../{ => internal}/gensupport/resumable.go | 143 +- .../api/{ => internal}/gensupport/send.go | 0 vendor/google.golang.org/api/internal/pool.go | 16 +- .../api/internal/settings.go | 43 +- .../internal/third_party/uritemplates/LICENSE | 27 + .../third_party/uritemplates/METADATA | 14 + .../third_party}/uritemplates/uritemplates.go | 2 +- .../third_party}/uritemplates/utils.go | 0 .../api/option/credentials_go19.go | 16 +- .../api/option/credentials_notgo19.go | 16 +- vendor/google.golang.org/api/option/option.go | 31 +- .../google.golang.org/api/tpu/v1/tpu-api.json | 32 +- .../google.golang.org/api/tpu/v1/tpu-gen.go | 132 +- .../api/transport/http/dial.go | 32 +- .../api/transport/http/dial_appengine.go | 16 +- .../http/internal/propagation/http.go | 16 +- vendor/google.golang.org/appengine/go.mod | 5 +- vendor/google.golang.org/appengine/go.sum | 11 - .../appengine/internal/net.go | 2 +- .../googleapis/rpc/status/status.pb.go | 70 +- .../protobuf/field_mask/field_mask.pb.go | 2 +- vendor/google.golang.org/grpc/.travis.yml | 2 +- vendor/google.golang.org/grpc/Makefile | 3 + .../grpc/balancer/balancer.go | 5 - .../grpc/balancer/base/balancer.go | 67 +- vendor/google.golang.org/grpc/clientconn.go | 62 +- .../grpc/credentials/credentials.go | 79 +- .../google.golang.org/grpc/credentials/tls.go | 9 +- vendor/google.golang.org/grpc/dialoptions.go | 25 +- .../grpc/internal/envconfig/envconfig.go | 7 +- .../grpc/internal/internal.go | 2 - .../internal/resolver/dns/dns_resolver.go | 89 +- .../grpc/internal/transport/handler_server.go | 2 +- .../grpc/internal/transport/http2_client.go | 3 +- .../grpc/resolver/resolver.go | 10 - .../grpc/resolver_conn_wrapper.go | 14 +- vendor/google.golang.org/grpc/rpc_util.go | 3 +- .../google.golang.org/grpc/service_config.go | 4 +- vendor/google.golang.org/grpc/trace.go | 3 - vendor/google.golang.org/grpc/version.go | 2 +- vendor/google.golang.org/grpc/vet.sh | 2 +- vendor/gopkg.in/yaml.v3/.travis.yml | 17 + vendor/gopkg.in/yaml.v3/LICENSE | 50 + vendor/gopkg.in/yaml.v3/NOTICE | 13 + vendor/gopkg.in/yaml.v3/README.md | 150 + vendor/gopkg.in/yaml.v3/apic.go | 747 + vendor/gopkg.in/yaml.v3/decode.go | 948 + vendor/gopkg.in/yaml.v3/emitterc.go | 2022 ++ vendor/gopkg.in/yaml.v3/encode.go | 572 + vendor/gopkg.in/yaml.v3/go.mod | 5 + vendor/gopkg.in/yaml.v3/parserc.go | 1249 + vendor/gopkg.in/yaml.v3/readerc.go | 434 + vendor/gopkg.in/yaml.v3/resolve.go | 326 + vendor/gopkg.in/yaml.v3/scannerc.go | 3028 ++ vendor/gopkg.in/yaml.v3/sorter.go | 134 + vendor/gopkg.in/yaml.v3/writerc.go | 48 + vendor/gopkg.in/yaml.v3/yaml.go | 693 + vendor/gopkg.in/yaml.v3/yamlh.go | 807 + vendor/gopkg.in/yaml.v3/yamlprivateh.go | 198 + .../k8s.io/api/admission/v1/generated.pb.go | 165 +- .../k8s.io/api/admission/v1/generated.proto | 7 + vendor/k8s.io/api/admission/v1/types.go | 7 + .../v1/types_swagger_doc_generated.go | 1 + .../api/admission/v1/zz_generated.deepcopy.go | 5 + vendor/k8s.io/api/admission/v1beta1/BUILD | 1 + vendor/k8s.io/api/admission/v1beta1/doc.go | 1 + .../api/admission/v1beta1/generated.pb.go | 165 +- .../api/admission/v1beta1/generated.proto | 7 + vendor/k8s.io/api/admission/v1beta1/types.go | 12 + .../v1beta1/types_swagger_doc_generated.go | 1 + .../v1beta1/zz_generated.deepcopy.go | 5 + .../zz_generated.prerelease-lifecycle.go | 49 + .../admissionregistration/v1/generated.proto | 4 +- .../api/admissionregistration/v1/types.go | 4 +- .../v1/types_swagger_doc_generated.go | 2 +- .../api/admissionregistration/v1beta1/BUILD | 1 + .../api/admissionregistration/v1beta1/doc.go | 1 + .../v1beta1/generated.proto | 4 +- .../admissionregistration/v1beta1/types.go | 20 +- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../zz_generated.prerelease-lifecycle.go | 121 + vendor/k8s.io/api/apps/v1beta1/BUILD | 1 + vendor/k8s.io/api/apps/v1beta1/doc.go | 1 + vendor/k8s.io/api/apps/v1beta1/types.go | 32 + .../zz_generated.prerelease-lifecycle.go | 217 + vendor/k8s.io/api/apps/v1beta2/BUILD | 1 + vendor/k8s.io/api/apps/v1beta2/doc.go | 1 + vendor/k8s.io/api/apps/v1beta2/types.go | 44 + .../zz_generated.prerelease-lifecycle.go | 289 + .../v1alpha1/generated.pb.go | 2030 -- .../v1alpha1/generated.proto | 162 - .../api/auditregistration/v1alpha1/types.go | 198 - .../v1alpha1/types_swagger_doc_generated.go | 111 - .../v1alpha1/zz_generated.deepcopy.go | 229 - .../k8s.io/api/authentication/v1beta1/BUILD | 1 + .../k8s.io/api/authentication/v1beta1/doc.go | 1 + .../api/authentication/v1beta1/types.go | 3 + .../zz_generated.prerelease-lifecycle.go | 49 + vendor/k8s.io/api/authorization/v1beta1/BUILD | 1 + .../k8s.io/api/authorization/v1beta1/doc.go | 1 + .../k8s.io/api/authorization/v1beta1/types.go | 12 + .../zz_generated.prerelease-lifecycle.go | 121 + vendor/k8s.io/api/autoscaling/v2beta1/BUILD | 1 + vendor/k8s.io/api/autoscaling/v2beta1/doc.go | 1 + .../k8s.io/api/autoscaling/v2beta1/types.go | 6 + .../zz_generated.prerelease-lifecycle.go | 73 + vendor/k8s.io/api/autoscaling/v2beta2/BUILD | 1 + vendor/k8s.io/api/autoscaling/v2beta2/doc.go | 1 + .../k8s.io/api/autoscaling/v2beta2/types.go | 4 + .../zz_generated.prerelease-lifecycle.go | 57 + vendor/k8s.io/api/batch/v1beta1/BUILD | 1 + vendor/k8s.io/api/batch/v1beta1/doc.go | 1 + vendor/k8s.io/api/batch/v1beta1/types.go | 8 +- .../zz_generated.prerelease-lifecycle.go | 75 + .../v1alpha1 => api/certificates/v1}/BUILD | 10 +- .../v1alpha1 => certificates/v1}/doc.go | 6 +- .../api/certificates/v1/generated.pb.go | 2042 ++ .../api/certificates/v1/generated.proto | 226 + .../certificates/v1}/register.go | 26 +- vendor/k8s.io/api/certificates/v1/types.go | 284 + .../v1/types_swagger_doc_generated.go | 88 + .../certificates/v1/zz_generated.deepcopy.go | 198 + vendor/k8s.io/api/certificates/v1beta1/BUILD | 2 + vendor/k8s.io/api/certificates/v1beta1/doc.go | 1 + .../api/certificates/v1beta1/generated.pb.go | 197 +- .../api/certificates/v1beta1/generated.proto | 46 +- .../k8s.io/api/certificates/v1beta1/types.go | 51 +- .../v1beta1/types_swagger_doc_generated.go | 12 +- .../v1beta1/zz_generated.deepcopy.go | 1 + .../zz_generated.prerelease-lifecycle.go | 73 + vendor/k8s.io/api/coordination/v1beta1/BUILD | 1 + vendor/k8s.io/api/coordination/v1beta1/doc.go | 1 + .../k8s.io/api/coordination/v1beta1/types.go | 6 + .../zz_generated.prerelease-lifecycle.go | 73 + vendor/k8s.io/api/core/v1/BUILD | 1 + .../api/core/v1/annotation_key_constants.go | 27 +- vendor/k8s.io/api/core/v1/generated.pb.go | 2904 +- vendor/k8s.io/api/core/v1/generated.proto | 229 +- vendor/k8s.io/api/core/v1/lifecycle.go | 37 + vendor/k8s.io/api/core/v1/types.go | 247 +- .../core/v1/types_swagger_doc_generated.go | 79 +- .../api/core/v1/zz_generated.deepcopy.go | 80 + .../api/discovery/v1alpha1/generated.proto | 1 - vendor/k8s.io/api/discovery/v1alpha1/types.go | 1 - vendor/k8s.io/api/discovery/v1beta1/BUILD | 1 + vendor/k8s.io/api/discovery/v1beta1/doc.go | 1 + .../api/discovery/v1beta1/generated.proto | 1 - vendor/k8s.io/api/discovery/v1beta1/types.go | 5 +- .../discovery/v1beta1/well_known_labels.go | 4 + .../zz_generated.prerelease-lifecycle.go | 57 + .../v1alpha1 => events/v1}/BUILD | 5 +- .../config/v1alpha1 => api/events/v1}/doc.go | 8 +- vendor/k8s.io/api/events/v1/generated.pb.go | 1406 + vendor/k8s.io/api/events/v1/generated.proto | 125 + .../v1alpha1 => events/v1}/register.go | 25 +- vendor/k8s.io/api/events/v1/types.go | 119 + .../events/v1/types_swagger_doc_generated.go | 72 + .../api/events/v1/zz_generated.deepcopy.go | 117 + vendor/k8s.io/api/events/v1beta1/BUILD | 1 + vendor/k8s.io/api/events/v1beta1/doc.go | 1 + .../k8s.io/api/events/v1beta1/generated.pb.go | 138 +- .../k8s.io/api/events/v1beta1/generated.proto | 47 +- vendor/k8s.io/api/events/v1beta1/types.go | 60 +- .../v1beta1/types_swagger_doc_generated.go | 35 +- .../zz_generated.prerelease-lifecycle.go | 57 + vendor/k8s.io/api/extensions/v1beta1/BUILD | 1 + vendor/k8s.io/api/extensions/v1beta1/doc.go | 1 + .../api/extensions/v1beta1/generated.proto | 16 +- vendor/k8s.io/api/extensions/v1beta1/types.go | 70 +- .../v1beta1/types_swagger_doc_generated.go | 16 +- .../zz_generated.prerelease-lifecycle.go | 349 + .../api/flowcontrol/v1alpha1/generated.proto | 18 +- .../k8s.io/api/flowcontrol/v1alpha1/types.go | 18 +- .../v1alpha1/types_swagger_doc_generated.go | 16 +- .../k8s.io/api/networking/v1/generated.pb.go | 3480 ++- .../k8s.io/api/networking/v1/generated.proto | 270 +- vendor/k8s.io/api/networking/v1/register.go | 4 + vendor/k8s.io/api/networking/v1/types.go | 313 +- .../v1/types_swagger_doc_generated.go | 151 +- .../networking/v1/zz_generated.deepcopy.go | 362 + vendor/k8s.io/api/networking/v1beta1/BUILD | 1 + vendor/k8s.io/api/networking/v1beta1/doc.go | 1 + .../api/networking/v1beta1/generated.proto | 1 - vendor/k8s.io/api/networking/v1beta1/types.go | 15 +- .../zz_generated.prerelease-lifecycle.go | 121 + vendor/k8s.io/api/node/v1beta1/BUILD | 1 + vendor/k8s.io/api/node/v1beta1/doc.go | 1 + vendor/k8s.io/api/node/v1beta1/types.go | 4 + .../zz_generated.prerelease-lifecycle.go | 57 + vendor/k8s.io/api/policy/v1beta1/BUILD | 1 + vendor/k8s.io/api/policy/v1beta1/doc.go | 1 + .../k8s.io/api/policy/v1beta1/generated.proto | 16 +- vendor/k8s.io/api/policy/v1beta1/types.go | 27 +- .../v1beta1/types_swagger_doc_generated.go | 14 +- .../zz_generated.prerelease-lifecycle.go | 111 + .../k8s.io/api/rbac/v1alpha1/generated.proto | 16 +- vendor/k8s.io/api/rbac/v1alpha1/types.go | 16 +- .../v1alpha1/types_swagger_doc_generated.go | 16 +- vendor/k8s.io/api/rbac/v1beta1/BUILD | 1 + vendor/k8s.io/api/rbac/v1beta1/doc.go | 1 + .../k8s.io/api/rbac/v1beta1/generated.proto | 16 +- vendor/k8s.io/api/rbac/v1beta1/types.go | 48 +- .../v1beta1/types_swagger_doc_generated.go | 16 +- .../zz_generated.prerelease-lifecycle.go | 217 + .../k8s.io/api/scheduling/v1/generated.proto | 2 +- vendor/k8s.io/api/scheduling/v1/types.go | 2 +- .../v1/types_swagger_doc_generated.go | 2 +- .../api/scheduling/v1alpha1/generated.proto | 2 +- .../k8s.io/api/scheduling/v1alpha1/types.go | 2 +- .../v1alpha1/types_swagger_doc_generated.go | 2 +- vendor/k8s.io/api/scheduling/v1beta1/BUILD | 1 + vendor/k8s.io/api/scheduling/v1beta1/doc.go | 1 + .../api/scheduling/v1beta1/generated.proto | 2 +- vendor/k8s.io/api/scheduling/v1beta1/types.go | 10 +- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../zz_generated.prerelease-lifecycle.go | 73 + vendor/k8s.io/api/storage/v1/generated.pb.go | 254 +- vendor/k8s.io/api/storage/v1/generated.proto | 28 + vendor/k8s.io/api/storage/v1/types.go | 59 + .../storage/v1/types_swagger_doc_generated.go | 2 + .../api/storage/v1/zz_generated.deepcopy.go | 10 + vendor/k8s.io/api/storage/v1alpha1/BUILD | 1 + .../api/storage/v1alpha1/generated.pb.go | 663 +- .../api/storage/v1alpha1/generated.proto | 75 + .../k8s.io/api/storage/v1alpha1/register.go | 2 + vendor/k8s.io/api/storage/v1alpha1/types.go | 82 + .../v1alpha1/types_swagger_doc_generated.go | 22 + .../storage/v1alpha1/zz_generated.deepcopy.go | 74 +- vendor/k8s.io/api/storage/v1beta1/BUILD | 1 + vendor/k8s.io/api/storage/v1beta1/doc.go | 1 + .../api/storage/v1beta1/generated.pb.go | 254 +- .../api/storage/v1beta1/generated.proto | 28 + vendor/k8s.io/api/storage/v1beta1/types.go | 80 + .../v1beta1/types_swagger_doc_generated.go | 2 + .../storage/v1beta1/zz_generated.deepcopy.go | 10 + .../zz_generated.prerelease-lifecycle.go | 217 + .../pkg/apis/apiextensions/types.go | 9 + .../pkg/apis/apiextensions/v1/generated.pb.go | 448 +- .../pkg/apis/apiextensions/v1/generated.proto | 13 + .../pkg/apis/apiextensions/v1/types.go | 11 + .../v1/zz_generated.conversion.go | 4 + .../apiextensions/v1/zz_generated.deepcopy.go | 5 + .../pkg/apis/apiextensions/v1beta1/BUILD | 1 + .../pkg/apis/apiextensions/v1beta1/doc.go | 1 + .../apiextensions/v1beta1/generated.pb.go | 452 +- .../apiextensions/v1beta1/generated.proto | 15 +- .../pkg/apis/apiextensions/v1beta1/types.go | 26 +- .../v1beta1/zz_generated.conversion.go | 4 + .../v1beta1/zz_generated.deepcopy.go | 5 + .../zz_generated.prerelease-lifecycle.go | 97 + .../apiextensions/validation/validation.go | 57 +- .../apiextensions/zz_generated.deepcopy.go | 5 + .../pkg/apiserver/BUILD | 3 +- .../pkg/apiserver/apiserver.go | 27 +- .../customresource_discovery_controller.go | 29 +- .../pkg/apiserver/customresource_handler.go | 54 +- .../v1/customresourcedefinition.go | 3 + .../v1beta1/customresourcedefinition.go | 3 + .../pkg/cmd/server/options/options.go | 3 +- .../pkg/controller/apiapproval/BUILD | 2 +- .../apiapproval/apiapproval_controller.go | 2 +- .../pkg/controller/establish/BUILD | 2 +- .../establish/establishing_controller.go | 2 +- .../pkg/controller/finalizer/BUILD | 2 +- .../pkg/controller/finalizer/crd_finalizer.go | 2 +- .../pkg/controller/nonstructuralschema/BUILD | 2 +- .../nonstructuralschema_controller.go | 2 +- .../pkg/controller/openapi/BUILD | 2 +- .../pkg/controller/openapi/builder/builder.go | 7 +- .../pkg/controller/openapi/controller.go | 2 +- .../pkg/controller/openapi/v2/BUILD | 2 +- .../pkg/controller/status/BUILD | 2 +- .../controller/status/naming_controller.go | 2 +- .../generated/openapi/zz_generated.openapi.go | 71 +- .../pkg/registry/customresource/strategy.go | 4 +- .../customresource/tableconvertor/BUILD | 1 + .../registry/customresourcedefinition/etcd.go | 9 +- .../k8s.io/apimachinery/pkg/api/errors/OWNERS | 2 - .../apimachinery/pkg/api/errors/errors.go | 82 +- vendor/k8s.io/apimachinery/pkg/api/meta/BUILD | 4 +- .../k8s.io/apimachinery/pkg/api/meta/OWNERS | 2 - .../apimachinery/pkg/api/meta/conditions.go | 101 + .../k8s.io/apimachinery/pkg/api/meta/meta.go | 2 +- .../apimachinery/pkg/api/resource/OWNERS | 3 - .../pkg/api/validation/generic.go | 3 +- .../pkg/api/validation/objectmeta.go | 11 +- .../pkg/api/validation/path/name.go | 4 +- .../pkg/apis/meta/internalversion/BUILD | 1 + .../pkg/apis/meta/internalversion/register.go | 3 + .../pkg/apis/meta/internalversion/types.go | 16 +- .../meta/internalversion}/validation/BUILD | 14 +- .../internalversion/validation/validation.go | 46 + .../zz_generated.conversion.go | 2 + .../apimachinery/pkg/apis/meta/v1/OWNERS | 1 - .../pkg/apis/meta/v1/conversion.go | 8 + .../pkg/apis/meta/v1/generated.pb.go | 830 +- .../pkg/apis/meta/v1/generated.proto | 101 +- .../apimachinery/pkg/apis/meta/v1/meta.go | 4 +- .../apimachinery/pkg/apis/meta/v1/types.go | 119 +- .../meta/v1/types_swagger_doc_generated.go | 37 +- .../pkg/apis/meta/v1/unstructured/BUILD | 7 +- .../pkg/apis/meta/v1/unstructured/helpers.go | 2 +- .../pkg/apis/meta/v1/validation/validation.go | 76 + .../apis/meta/v1/zz_generated.conversion.go | 12 + .../pkg/apis/meta/v1/zz_generated.deepcopy.go | 17 + .../pkg/apis/meta/v1beta1/conversion.go | 27 +- .../pkg/apis/meta/v1beta1/register.go | 17 + .../k8s.io/apimachinery/pkg/conversion/BUILD | 7 +- .../apimachinery/pkg/conversion/converter.go | 10 +- .../apimachinery/pkg/fields/selector.go | 16 +- vendor/k8s.io/apimachinery/pkg/labels/BUILD | 2 +- .../k8s.io/apimachinery/pkg/labels/labels.go | 14 +- .../apimachinery/pkg/labels/selector.go | 41 +- vendor/k8s.io/apimachinery/pkg/runtime/BUILD | 5 +- .../k8s.io/apimachinery/pkg/runtime/codec.go | 2 +- .../apimachinery/pkg/runtime/codec_check.go | 10 +- .../apimachinery/pkg/runtime/converter.go | 4 +- .../pkg/runtime/schema/group_version.go | 17 +- .../k8s.io/apimachinery/pkg/runtime/scheme.go | 13 + .../apimachinery/pkg/runtime/serializer/BUILD | 3 +- .../pkg/runtime/serializer/json/BUILD | 2 +- .../pkg/runtime/serializer/json/json.go | 2 +- .../pkg/runtime/serializer/versioning/BUILD | 2 +- .../serializer/versioning/versioning.go | 2 +- .../pkg/util/duration/duration.go | 6 +- .../pkg/util/httpstream/httpstream.go | 14 +- .../pkg/util/httpstream/spdy/BUILD | 2 +- .../pkg/util/httpstream/spdy/connection.go | 2 +- .../pkg/util/httpstream/spdy/roundtripper.go | 21 +- .../k8s.io/apimachinery/pkg/util/intstr/BUILD | 2 +- .../apimachinery/pkg/util/intstr/intstr.go | 2 +- vendor/k8s.io/apimachinery/pkg/util/net/BUILD | 2 +- .../k8s.io/apimachinery/pkg/util/net/http.go | 248 +- .../apimachinery/pkg/util/net/interface.go | 2 +- .../k8s.io/apimachinery/pkg/util/net/util.go | 31 +- .../k8s.io/apimachinery/pkg/util/proxy/BUILD | 2 +- .../apimachinery/pkg/util/proxy/dial.go | 2 +- .../apimachinery/pkg/util/proxy/transport.go | 12 +- .../pkg/util/proxy/upgradeaware.go | 8 +- .../apimachinery/pkg/util/runtime/BUILD | 2 +- .../apimachinery/pkg/util/runtime/runtime.go | 2 +- .../pkg/util/strategicpatch/patch.go | 4 +- .../pkg/util/validation/validation.go | 5 + .../k8s.io/apimachinery/pkg/util/yaml/BUILD | 2 +- .../apimachinery/pkg/util/yaml/decoder.go | 6 +- vendor/k8s.io/apimachinery/pkg/watch/BUILD | 2 +- .../apimachinery/pkg/watch/streamwatcher.go | 2 +- vendor/k8s.io/apimachinery/pkg/watch/watch.go | 8 +- .../forked/golang/reflect/deep_equal.go | 4 +- vendor/k8s.io/apiserver/pkg/admission/BUILD | 2 +- .../k8s.io/apiserver/pkg/admission/config.go | 2 +- .../apiserver/pkg/admission/metrics/BUILD | 2 +- .../plugin/namespace/lifecycle/BUILD | 2 +- .../plugin/namespace/lifecycle/admission.go | 2 +- .../admission/plugin/webhook/mutating/BUILD | 3 +- .../plugin/webhook/mutating/dispatcher.go | 6 +- .../pkg/admission/plugin/webhook/object/BUILD | 2 +- .../plugin/webhook/object/matcher.go | 2 +- .../plugin/webhook/request/admissionreview.go | 3 + .../admission/plugin/webhook/validating/BUILD | 3 +- .../plugin/webhook/validating/dispatcher.go | 6 +- .../k8s.io/apiserver/pkg/admission/plugins.go | 2 +- .../pkg/apis/config/validation/validation.go | 1 + .../pkg/apis/flowcontrol/bootstrap/default.go | 2 +- vendor/k8s.io/apiserver/pkg/audit/BUILD | 5 +- vendor/k8s.io/apiserver/pkg/audit/context.go | 84 + vendor/k8s.io/apiserver/pkg/audit/event/BUILD | 39 - .../apiserver/pkg/audit/event/attributes.go | 148 - vendor/k8s.io/apiserver/pkg/audit/metrics.go | 2 +- .../k8s.io/apiserver/pkg/audit/policy/BUILD | 6 +- .../apiserver/pkg/audit/policy/dynamic.go | 54 - .../apiserver/pkg/audit/policy/reader.go | 2 +- vendor/k8s.io/apiserver/pkg/audit/request.go | 6 +- vendor/k8s.io/apiserver/pkg/audit/util/BUILD | 40 - .../apiserver/pkg/audit/util/conversion.go | 49 - .../authenticator/interfaces.go | 15 - .../request/headerrequest/BUILD | 33 +- .../headerrequest/requestheader_controller.go | 337 + .../pkg/authentication/token/cache/BUILD | 8 +- .../token/cache/cached_token_authenticator.go | 79 +- .../pkg/authentication/token/tokenfile/BUILD | 2 +- .../token/tokenfile/tokenfile.go | 2 +- vendor/k8s.io/apiserver/pkg/endpoints/BUILD | 5 + .../apiserver/pkg/endpoints/deprecation/BUILD | 40 + .../pkg/endpoints/deprecation/deprecation.go | 133 + .../apiserver/pkg/endpoints/discovery/BUILD | 2 +- .../apiserver/pkg/endpoints/discovery/util.go | 2 +- .../apiserver/pkg/endpoints/filters/BUILD | 7 +- .../endpoints/filters/audit_annotations.go | 39 + .../pkg/endpoints/filters/authentication.go | 7 +- .../pkg/endpoints/filters/authorization.go | 2 +- .../pkg/endpoints/filters/impersonation.go | 2 +- .../pkg/endpoints/filters/warning.go | 133 + .../apiserver/pkg/endpoints/handlers/BUILD | 3 +- .../pkg/endpoints/handlers/delete.go | 7 + .../pkg/endpoints/handlers/fieldmanager/BUILD | 19 +- .../handlers/fieldmanager/capmanagers.go | 2 +- .../handlers/fieldmanager/fieldmanager.go | 36 +- .../handlers/fieldmanager/internal/BUILD | 14 +- .../fieldmanager/internal/conflict.go | 4 +- .../handlers/fieldmanager/internal/fields.go | 2 +- .../fieldmanager/internal/gvkparser.go | 2 +- .../fieldmanager/internal/managedfields.go | 2 +- .../fieldmanager/internal/pathelement.go | 4 +- .../fieldmanager/internal/typeconverter.go | 4 +- .../fieldmanager/internal/versionconverter.go | 6 +- .../fieldmanager/lastappliedmanager.go | 173 + .../fieldmanager/lastappliedupdater.go | 117 + .../fieldmanager/managedfieldsupdater.go | 2 +- .../handlers/fieldmanager/stripmeta.go | 2 +- .../handlers/fieldmanager/structuredmerge.go | 26 +- .../apiserver/pkg/endpoints/handlers/get.go | 12 +- .../apiserver/pkg/endpoints/handlers/patch.go | 2 + .../apiserver/pkg/endpoints/handlers/rest.go | 2 +- .../apiserver/pkg/endpoints/installer.go | 97 +- .../apiserver/pkg/endpoints/metrics/BUILD | 1 + .../pkg/endpoints/metrics/metrics.go | 81 +- .../apiserver/pkg/endpoints/request/BUILD | 2 +- .../pkg/endpoints/request/requestinfo.go | 2 +- .../pkg/endpoints/warning}/BUILD | 12 +- .../pkg/endpoints/warning/warning.go | 39 + .../apiserver/pkg/features/kube_features.go | 37 +- .../apiserver/pkg/registry/generic/OWNERS | 1 - .../pkg/registry/generic/registry/BUILD | 3 +- .../pkg/registry/generic/registry/dryrun.go | 26 +- .../generic/registry/storage_factory.go | 28 +- .../pkg/registry/generic/registry/store.go | 62 +- .../k8s.io/apiserver/pkg/registry/rest/OWNERS | 2 - .../apiserver/pkg/registry/rest/table.go | 16 +- vendor/k8s.io/apiserver/pkg/server/BUILD | 14 +- vendor/k8s.io/apiserver/pkg/server/config.go | 29 +- .../pkg/server/deprecated_insecure_serving.go | 2 +- .../pkg/server/dynamiccertificates/BUILD | 2 +- .../configmap_cafile_content.go | 2 +- .../dynamic_cafile_content.go | 2 +- .../dynamic_serving_content.go | 2 +- .../dynamiccertificates/named_certificates.go | 2 +- .../server/dynamiccertificates/tlsconfig.go | 2 +- .../apiserver/pkg/server/egressselector/BUILD | 2 +- .../server/egressselector/egress_selector.go | 4 +- .../k8s.io/apiserver/pkg/server/filters/BUILD | 3 +- .../apiserver/pkg/server/filters/cors.go | 2 +- .../pkg/server/filters/maxinflight.go | 41 +- .../server/filters/priority-and-fairness.go | 56 +- .../apiserver/pkg/server/filters/wrap.go | 2 +- .../apiserver/pkg/server/genericapiserver.go | 15 +- vendor/k8s.io/apiserver/pkg/server/handler.go | 2 +- .../k8s.io/apiserver/pkg/server/healthz/BUILD | 2 +- .../apiserver/pkg/server/healthz/healthz.go | 33 +- vendor/k8s.io/apiserver/pkg/server/hooks.go | 2 +- .../k8s.io/apiserver/pkg/server/httplog/BUILD | 2 +- .../apiserver/pkg/server/httplog/httplog.go | 48 +- vendor/k8s.io/apiserver/pkg/server/mux/BUILD | 2 +- .../apiserver/pkg/server/mux/pathrecorder.go | 2 +- .../k8s.io/apiserver/pkg/server/options/BUILD | 66 +- .../apiserver/pkg/server/options/audit.go | 100 +- .../pkg/server/options/authentication.go | 60 +- .../authentication_dynamic_request_header.go | 79 + .../pkg/server/options/authorization.go | 2 +- .../options/deprecated_insecure_serving.go | 4 +- .../server/options/encryptionconfig/config.go | 33 +- .../apiserver/pkg/server/options/etcd.go | 30 +- .../apiserver/pkg/server/options/events.go | 56 - .../pkg/server/options/recommended.go | 9 +- .../pkg/server/options/server_run_options.go | 16 +- .../apiserver/pkg/server/options/serving.go | 33 +- .../pkg/server/options/serving_unix.go | 31 + .../pkg/server/options/serving_windows.go | 30 + .../apiserver/pkg/server/resourceconfig/BUILD | 2 +- .../pkg/server/resourceconfig/helpers.go | 2 +- .../k8s.io/apiserver/pkg/server/routes/BUILD | 2 +- .../apiserver/pkg/server/routes/flags.go | 2 +- .../apiserver/pkg/server/routes/metrics.go | 14 +- .../apiserver/pkg/server/routes/openapi.go | 11 +- .../apiserver/pkg/server/secure_serving.go | 54 +- vendor/k8s.io/apiserver/pkg/server/signal.go | 16 +- .../k8s.io/apiserver/pkg/server/storage/BUILD | 2 +- .../pkg/server/storage/storage_factory.go | 2 +- vendor/k8s.io/apiserver/pkg/storage/OWNERS | 1 - .../k8s.io/apiserver/pkg/storage/cacher/BUILD | 3 +- .../apiserver/pkg/storage/cacher/cacher.go | 145 +- .../pkg/storage/cacher/caching_object.go | 2 +- .../apiserver/pkg/storage/cacher/metrics.go | 74 + .../apiserver/pkg/storage/cacher/util.go | 14 + .../pkg/storage/cacher/watch_cache.go | 105 +- .../k8s.io/apiserver/pkg/storage/etcd3/BUILD | 3 +- .../pkg/storage/etcd3/api_object_versioner.go | 9 +- .../apiserver/pkg/storage/etcd3/compact.go | 2 +- .../apiserver/pkg/storage/etcd3/logger.go | 4 +- .../pkg/storage/etcd3/metrics/metrics.go | 14 + .../apiserver/pkg/storage/etcd3/store.go | 122 +- .../apiserver/pkg/storage/etcd3/watcher.go | 19 +- .../apiserver/pkg/storage/interfaces.go | 45 +- .../pkg/storage/storagebackend/config.go | 14 +- .../pkg/storage/storagebackend/factory/BUILD | 2 + .../storage/storagebackend/factory/etcd3.go | 78 +- .../pkg/storage/value/encrypt/envelope/BUILD | 14 +- .../value/encrypt/envelope/grpc_service.go | 2 +- .../apiserver/pkg/util/flowcontrol/BUILD | 11 +- .../pkg/util/flowcontrol/apf_controller.go | 182 +- .../util/flowcontrol/apf_controller_debug.go | 290 + .../pkg/util/flowcontrol/apf_filter.go | 32 +- .../util/{term => flowcontrol/debug}/BUILD | 8 +- .../pkg/util/flowcontrol/debug/dump.go | 47 + .../pkg/util/flowcontrol/fairqueuing/BUILD | 19 +- .../flowcontrol/fairqueuing/integrator.go | 180 + .../util/flowcontrol/fairqueuing/interface.go | 48 +- .../flowcontrol/fairqueuing/queueset/BUILD | 7 +- .../fairqueuing/queueset/queueset.go | 118 +- .../flowcontrol/fairqueuing/queueset/types.go | 38 +- .../pkg/util/flowcontrol/metrics/BUILD | 8 +- .../pkg/util/flowcontrol/metrics/metrics.go | 59 +- .../metrics/sample_and_watermark.go | 192 + .../flowcontrol/metrics/timed_observer.go | 52 + .../k8s.io/apiserver/pkg/util/openapi/BUILD | 2 +- .../apiserver/pkg/util/openapi/proto.go | 2 +- .../apiserver/pkg/util/webhook/webhook.go | 3 +- .../k8s.io/apiserver/pkg/util/wsstream/BUILD | 2 +- .../apiserver/pkg/util/wsstream/conn.go | 2 +- .../apiserver/pkg/util/wsstream/stream.go | 4 +- vendor/k8s.io/apiserver/pkg/warning/BUILD | 23 + .../k8s.io/apiserver/pkg/warning/context.go | 59 + .../apiserver/plugin/pkg/audit/dynamic/BUILD | 76 - .../plugin/pkg/audit/dynamic/defaults.go | 46 - .../plugin/pkg/audit/dynamic/dynamic.go | 365 - .../plugin/pkg/audit/dynamic/enforced/BUILD | 45 - .../pkg/audit/dynamic/enforced/enforced.go | 93 - .../plugin/pkg/audit/dynamic/factory.go | 91 - .../authenticator/password/passwordfile/BUILD | 39 - .../password/passwordfile/passwordfile.go | 95 - .../pkg/authenticator/request/basicauth/BUILD | 38 - .../request/basicauth/basicauth.go | 53 - .../plugin/pkg/authenticator/token/oidc/BUILD | 4 +- .../pkg/authenticator/token/oidc/oidc.go | 2 +- .../pkg/authenticator/token/webhook/BUILD | 2 +- .../authenticator/token/webhook/webhook.go | 2 +- .../plugin/pkg/authorizer/webhook/BUILD | 2 +- .../plugin/pkg/authorizer/webhook/webhook.go | 2 +- .../cli-runtime/pkg/genericclioptions/BUILD | 1 + .../pkg/genericclioptions/client_config.go | 71 + .../pkg/genericclioptions/config_flags.go | 47 +- .../genericclioptions/config_flags_fake.go | 2 +- .../pkg/genericclioptions/jsonpath_flags.go | 10 +- vendor/k8s.io/cli-runtime/pkg/resource/BUILD | 4 +- .../cli-runtime/pkg/resource/builder.go | 12 +- .../pkg/resource/dry_run_verifier.go | 2 +- .../k8s.io/cli-runtime/pkg/resource/helper.go | 33 +- .../cli-runtime/pkg/resource/selector.go | 5 +- .../cli-runtime/pkg/resource/visitor.go | 4 +- vendor/k8s.io/client-go/discovery/BUILD | 4 +- .../client-go/discovery/cached/disk/BUILD | 6 +- .../discovery/cached/disk/cached_discovery.go | 6 +- .../discovery/cached/disk/round_tripper.go | 2 +- .../client-go/discovery/cached/memory/BUILD | 2 +- .../discovery/cached/memory/memcache.go | 20 +- .../client-go/discovery/discovery_client.go | 2 +- vendor/k8s.io/client-go/discovery/fake/BUILD | 2 +- .../client-go/discovery/fake/discovery.go | 2 +- vendor/k8s.io/client-go/informers/BUILD | 5 +- .../informers/auditregistration/BUILD | 30 - .../auditregistration/v1alpha1/auditsink.go | 89 - .../client-go/informers/certificates/BUILD | 2 + .../informers/certificates/interface.go | 8 + .../v1alpha1 => certificates/v1}/BUILD | 10 +- .../v1/certificatesigningrequest.go | 89 + .../v1}/interface.go | 19 +- .../k8s.io/client-go/informers/events/BUILD | 2 + .../client-go/informers/events/interface.go | 8 + .../client-go/informers/events/v1/BUILD | 36 + .../client-go/informers/events/v1/event.go | 90 + .../v1alpha1 => events/v1}/interface.go | 12 +- vendor/k8s.io/client-go/informers/factory.go | 6 - vendor/k8s.io/client-go/informers/generic.go | 25 +- .../client-go/informers/networking/v1/BUILD | 2 + .../informers/networking/v1/ingress.go | 90 + .../informers/networking/v1/ingressclass.go | 89 + .../informers/networking/v1/interface.go | 14 + .../informers/storage/v1alpha1/BUILD | 1 + .../storage/v1alpha1/csistoragecapacity.go | 90 + .../informers/storage/v1alpha1/interface.go | 7 + vendor/k8s.io/client-go/kubernetes/BUILD | 6 +- .../k8s.io/client-go/kubernetes/clientset.go | 42 +- vendor/k8s.io/client-go/kubernetes/fake/BUILD | 9 +- .../kubernetes/fake/clientset_generated.go | 21 +- .../client-go/kubernetes/fake/register.go | 8 +- .../k8s.io/client-go/kubernetes/scheme/BUILD | 3 +- .../client-go/kubernetes/scheme/register.go | 6 +- .../auditregistration/v1alpha1/auditsink.go | 168 - .../v1alpha1/fake/fake_auditsink.go | 122 - .../v1alpha1 => certificates/v1}/BUILD | 12 +- .../v1/certificates_client.go} | 36 +- .../v1/certificatesigningrequest.go | 200 + .../v1alpha1 => certificates/v1}/doc.go | 2 +- .../v1alpha1 => certificates/v1}/fake/BUILD | 12 +- .../v1alpha1 => certificates/v1}/fake/doc.go | 0 .../v1/fake/fake_certificates_client.go} | 10 +- .../v1/fake/fake_certificatesigningrequest.go | 143 + .../certificates/v1/generated_expansion.go | 21 + .../kubernetes/typed/core/v1/fake/BUILD | 13 + .../typed/core/v1/fake/fake_pod_expansion.go | 26 +- .../kubernetes/typed/core/v1/pod_expansion.go | 16 + .../kubernetes/typed/events/v1/BUILD | 39 + .../kubernetes/typed/events/v1/doc.go | 20 + .../kubernetes/typed/events/v1/event.go | 178 + .../typed/events/v1/events_client.go | 89 + .../kubernetes/typed/events/v1/fake/BUILD | 38 + .../kubernetes/typed/events/v1/fake/doc.go | 20 + .../typed/events/v1/fake/fake_event.go | 130 + .../events/v1/fake/fake_events_client.go | 40 + .../v1}/generated_expansion.go | 4 +- .../kubernetes/typed/networking/v1/BUILD | 2 + .../kubernetes/typed/networking/v1/fake/BUILD | 2 + .../typed/networking/v1/fake/fake_ingress.go | 142 + .../networking/v1/fake/fake_ingressclass.go | 122 + .../v1/fake/fake_networking_client.go | 8 + .../networking/v1/generated_expansion.go | 4 + .../kubernetes/typed/networking/v1/ingress.go | 195 + .../typed/networking/v1/ingressclass.go | 168 + .../typed/networking/v1/networking_client.go | 10 + .../kubernetes/typed/storage/v1alpha1/BUILD | 1 + .../storage/v1alpha1/csistoragecapacity.go | 178 + .../typed/storage/v1alpha1/fake/BUILD | 1 + .../v1alpha1/fake/fake_csistoragecapacity.go | 130 + .../v1alpha1/fake/fake_storage_client.go | 4 + .../storage/v1alpha1/generated_expansion.go | 2 + .../typed/storage/v1alpha1/storage_client.go | 5 + .../v1/mutatingwebhookconfiguration.go | 3 + .../v1/validatingwebhookconfiguration.go | 3 + .../v1beta1/mutatingwebhookconfiguration.go | 3 + .../v1beta1/validatingwebhookconfiguration.go | 3 + .../listers/apps/v1/controllerrevision.go | 5 + .../client-go/listers/apps/v1/daemonset.go | 5 + .../client-go/listers/apps/v1/deployment.go | 5 + .../client-go/listers/apps/v1/replicaset.go | 5 + .../client-go/listers/apps/v1/statefulset.go | 5 + .../apps/v1beta1/controllerrevision.go | 5 + .../listers/apps/v1beta1/deployment.go | 5 + .../listers/apps/v1beta1/statefulset.go | 5 + .../apps/v1beta2/controllerrevision.go | 5 + .../listers/apps/v1beta2/daemonset.go | 5 + .../listers/apps/v1beta2/deployment.go | 5 + .../listers/apps/v1beta2/replicaset.go | 5 + .../listers/apps/v1beta2/statefulset.go | 5 + .../auditregistration/v1alpha1/auditsink.go | 65 - .../autoscaling/v1/horizontalpodautoscaler.go | 5 + .../v2beta1/horizontalpodautoscaler.go | 5 + .../v2beta2/horizontalpodautoscaler.go | 5 + .../k8s.io/client-go/listers/batch/v1/job.go | 5 + .../listers/batch/v1beta1/cronjob.go | 5 + .../listers/batch/v2alpha1/cronjob.go | 5 + .../v1alpha1 => certificates/v1}/BUILD | 8 +- .../v1/certificatesigningrequest.go | 68 + .../v1}/expansion_generated.go | 8 +- .../v1beta1/certificatesigningrequest.go | 3 + .../listers/coordination/v1/lease.go | 5 + .../listers/coordination/v1beta1/lease.go | 5 + .../listers/core/v1/componentstatus.go | 3 + .../client-go/listers/core/v1/configmap.go | 5 + .../client-go/listers/core/v1/endpoints.go | 5 + .../k8s.io/client-go/listers/core/v1/event.go | 5 + .../client-go/listers/core/v1/limitrange.go | 5 + .../client-go/listers/core/v1/namespace.go | 3 + .../k8s.io/client-go/listers/core/v1/node.go | 3 + .../listers/core/v1/persistentvolume.go | 3 + .../listers/core/v1/persistentvolumeclaim.go | 5 + .../k8s.io/client-go/listers/core/v1/pod.go | 5 + .../client-go/listers/core/v1/podtemplate.go | 5 + .../listers/core/v1/replicationcontroller.go | 5 + .../listers/core/v1/resourcequota.go | 5 + .../client-go/listers/core/v1/secret.go | 5 + .../client-go/listers/core/v1/service.go | 5 + .../listers/core/v1/serviceaccount.go | 5 + .../discovery/v1alpha1/endpointslice.go | 5 + .../discovery/v1beta1/endpointslice.go | 5 + .../k8s.io/client-go/listers/events/v1/BUILD | 32 + .../client-go/listers/events/v1/event.go | 99 + .../listers/events/v1/expansion_generated.go | 27 + .../client-go/listers/events/v1beta1/event.go | 5 + .../listers/extensions/v1beta1/daemonset.go | 5 + .../listers/extensions/v1beta1/deployment.go | 5 + .../listers/extensions/v1beta1/ingress.go | 5 + .../extensions/v1beta1/networkpolicy.go | 5 + .../extensions/v1beta1/podsecuritypolicy.go | 3 + .../listers/extensions/v1beta1/replicaset.go | 5 + .../flowcontrol/v1alpha1/flowschema.go | 3 + .../v1alpha1/prioritylevelconfiguration.go | 3 + .../client-go/listers/networking/v1/BUILD | 2 + .../networking/v1/expansion_generated.go | 12 + .../listers/networking/v1/ingress.go | 99 + .../listers/networking/v1/ingressclass.go | 68 + .../listers/networking/v1/networkpolicy.go | 5 + .../listers/networking/v1beta1/ingress.go | 5 + .../networking/v1beta1/ingressclass.go | 3 + .../listers/node/v1alpha1/runtimeclass.go | 3 + .../listers/node/v1beta1/runtimeclass.go | 3 + .../client-go/listers/policy/v1beta1/BUILD | 2 +- .../listers/policy/v1beta1/eviction.go | 5 + .../policy/v1beta1/poddisruptionbudget.go | 5 + .../v1beta1/poddisruptionbudget_expansion.go | 2 +- .../policy/v1beta1/podsecuritypolicy.go | 3 + .../client-go/listers/rbac/v1/clusterrole.go | 3 + .../listers/rbac/v1/clusterrolebinding.go | 3 + .../k8s.io/client-go/listers/rbac/v1/role.go | 5 + .../client-go/listers/rbac/v1/rolebinding.go | 5 + .../listers/rbac/v1alpha1/clusterrole.go | 3 + .../rbac/v1alpha1/clusterrolebinding.go | 3 + .../client-go/listers/rbac/v1alpha1/role.go | 5 + .../listers/rbac/v1alpha1/rolebinding.go | 5 + .../listers/rbac/v1beta1/clusterrole.go | 3 + .../rbac/v1beta1/clusterrolebinding.go | 3 + .../client-go/listers/rbac/v1beta1/role.go | 5 + .../listers/rbac/v1beta1/rolebinding.go | 5 + .../listers/scheduling/v1/priorityclass.go | 3 + .../scheduling/v1alpha1/priorityclass.go | 3 + .../scheduling/v1beta1/priorityclass.go | 3 + .../listers/settings/v1alpha1/podpreset.go | 5 + .../client-go/listers/storage/v1/csidriver.go | 3 + .../client-go/listers/storage/v1/csinode.go | 3 + .../listers/storage/v1/storageclass.go | 3 + .../listers/storage/v1/volumeattachment.go | 3 + .../client-go/listers/storage/v1alpha1/BUILD | 1 + .../storage/v1alpha1/csistoragecapacity.go | 99 + .../storage/v1alpha1/expansion_generated.go | 8 + .../storage/v1alpha1/volumeattachment.go | 3 + .../listers/storage/v1beta1/csidriver.go | 3 + .../listers/storage/v1beta1/csinode.go | 3 + .../listers/storage/v1beta1/storageclass.go | 3 + .../storage/v1beta1/volumeattachment.go | 3 + vendor/k8s.io/client-go/metadata/BUILD | 2 +- vendor/k8s.io/client-go/metadata/metadata.go | 2 +- .../client-go/metadata/metadatainformer/BUILD | 2 +- vendor/k8s.io/client-go/pkg/version/base.go | 8 +- .../plugin/pkg/client/auth/exec/BUILD | 4 +- .../plugin/pkg/client/auth/exec/exec.go | 104 +- vendor/k8s.io/client-go/rest/BUILD | 6 +- vendor/k8s.io/client-go/rest/client.go | 4 + vendor/k8s.io/client-go/rest/config.go | 30 +- vendor/k8s.io/client-go/rest/fake/BUILD | 33 + vendor/k8s.io/client-go/rest/fake/fake.go | 118 + vendor/k8s.io/client-go/rest/plugin.go | 2 +- vendor/k8s.io/client-go/rest/request.go | 61 +- vendor/k8s.io/client-go/rest/transport.go | 3 +- vendor/k8s.io/client-go/rest/urlbackoff.go | 2 +- vendor/k8s.io/client-go/rest/warnings.go | 144 + vendor/k8s.io/client-go/restmapper/BUILD | 4 +- .../k8s.io/client-go/restmapper/discovery.go | 2 +- .../k8s.io/client-go/restmapper/shortcut.go | 2 +- vendor/k8s.io/client-go/testing/fixture.go | 97 +- vendor/k8s.io/client-go/tools/cache/BUILD | 2 +- vendor/k8s.io/client-go/tools/cache/OWNERS | 2 - .../client-go/tools/cache/controller.go | 18 +- .../client-go/tools/cache/delta_fifo.go | 60 +- .../client-go/tools/cache/expiration_cache.go | 2 +- vendor/k8s.io/client-go/tools/cache/fifo.go | 19 +- .../k8s.io/client-go/tools/cache/listers.go | 2 +- .../client-go/tools/cache/mutation_cache.go | 2 +- .../tools/cache/mutation_detector.go | 2 +- .../k8s.io/client-go/tools/cache/reflector.go | 65 +- .../client-go/tools/cache/shared_informer.go | 73 +- vendor/k8s.io/client-go/tools/clientcmd/BUILD | 2 +- .../client-go/tools/clientcmd/api/helpers.go | 3 + .../client-go/tools/clientcmd/api/types.go | 18 +- .../client-go/tools/clientcmd/api/v1/types.go | 18 +- .../api/v1/zz_generated.conversion.go | 4 + .../tools/clientcmd/client_config.go | 104 +- .../client-go/tools/clientcmd/config.go | 29 +- .../client-go/tools/clientcmd/helpers.go | 15 + .../client-go/tools/clientcmd/loader.go | 2 +- .../tools/clientcmd/merged_client_builder.go | 37 +- .../client-go/tools/clientcmd/validation.go | 29 +- vendor/k8s.io/client-go/tools/events/BUILD | 13 +- .../tools/events/event_broadcaster.go | 132 +- .../client-go/tools/events/event_recorder.go | 14 +- .../client-go/tools/events/interfaces.go | 28 +- .../client-go/tools/leaderelection/BUILD | 2 +- .../client-go/tools/leaderelection/OWNERS | 1 - .../tools/leaderelection/leaderelection.go | 5 +- vendor/k8s.io/client-go/tools/metrics/OWNERS | 1 - vendor/k8s.io/client-go/tools/record/BUILD | 2 +- vendor/k8s.io/client-go/tools/record/OWNERS | 1 - vendor/k8s.io/client-go/tools/record/event.go | 15 +- .../client-go/tools/record/events_cache.go | 5 +- .../client-go/tools/remotecommand/BUILD | 2 +- .../tools/remotecommand/remotecommand.go | 2 +- .../client-go/tools/remotecommand/v1.go | 2 +- vendor/k8s.io/client-go/tools/watch/BUILD | 5 +- .../client-go/tools/watch/retrywatcher.go | 15 +- vendor/k8s.io/client-go/tools/watch/until.go | 71 +- vendor/k8s.io/client-go/transport/BUILD | 2 +- vendor/k8s.io/client-go/transport/cache.go | 13 +- .../client-go/transport/cert_rotation.go | 2 +- vendor/k8s.io/client-go/transport/config.go | 8 + .../client-go/transport/round_trippers.go | 10 +- .../k8s.io/client-go/transport/spdy/spdy.go | 6 +- .../client-go/transport/token_source.go | 2 +- .../k8s.io/client-go/transport/transport.go | 2 +- vendor/k8s.io/client-go/util/cert/cert.go | 6 +- .../k8s.io/client-go/util/certificate/BUILD | 11 +- .../util/certificate/certificate_manager.go | 41 +- .../util/certificate/certificate_store.go | 2 +- .../client-go/util/certificate/csr/BUILD | 11 +- .../client-go/util/certificate/csr/csr.go | 250 +- .../client-go/util/jsonpath/jsonpath.go | 78 +- .../k8s.io/client-go/util/jsonpath/parser.go | 5 +- vendor/k8s.io/client-go/util/workqueue/BUILD | 3 +- .../util/workqueue/default_rate_limiters.go | 48 - .../util/workqueue/delaying_queue.go | 13 +- .../client-go/util/workqueue/parallelizer.go | 68 +- vendor/k8s.io/cloud-provider/BUILD | 7 +- vendor/k8s.io/cloud-provider/OWNERS | 2 - vendor/k8s.io/cloud-provider/api/BUILD | 5 +- .../api}/well_known_annotations.go | 6 +- vendor/k8s.io/cloud-provider/cloud.go | 48 +- .../controllers/node}/BUILD | 26 +- .../controllers/node}/node_controller.go | 128 +- .../controllers/nodelifecycle/BUILD | 60 + .../controllers/nodelifecycle}/OWNERS | 0 .../node_lifecycle_controller.go | 120 +- .../controllers}/route/BUILD | 5 +- .../controllers}/route/OWNERS | 0 .../controllers}/route/doc.go | 2 +- .../controllers}/route/route_controller.go | 4 +- .../controllers}/service/BUILD | 18 +- .../controllers}/service/OWNERS | 0 .../controllers}/service/controller.go | 117 +- .../controllers}/service/doc.go | 2 +- vendor/k8s.io/cloud-provider/go.mod | 12 +- vendor/k8s.io/cloud-provider/go.sum | 297 +- .../k8s.io/cloud-provider/node/helpers/BUILD | 9 +- .../cloud-provider/node/helpers/labels.go | 2 +- .../cloud-provider/node/helpers/status.go | 140 + .../cloud-provider/node/helpers/taints.go | 99 + vendor/k8s.io/cloud-provider/plugins.go | 31 +- vendor/k8s.io/cloud-provider/ports.go | 23 + .../cloud-provider/volume/helpers/BUILD | 2 +- .../cloud-provider/volume/helpers/rounding.go | 100 +- .../cloud-provider/volume/helpers/zones.go | 2 +- .../cluster-bootstrap/util/secrets/BUILD | 2 +- .../cluster-bootstrap/util/secrets/secrets.go | 2 +- .../cmd/client-gen/generators/BUILD | 2 +- .../client-gen/generators/client_generator.go | 2 +- .../generators/scheme/generator_for_scheme.go | 3 +- .../cmd/informer-gen/generators/BUILD | 2 +- .../cmd/informer-gen/generators/factory.go | 2 +- .../generators/factoryinterface.go | 2 +- .../cmd/informer-gen/generators/generic.go | 8 +- .../cmd/informer-gen/generators/informer.go | 2 +- .../cmd/informer-gen/generators/packages.go | 2 +- .../cmd/lister-gen/generators/BUILD | 2 +- .../cmd/lister-gen/generators/lister.go | 10 +- vendor/k8s.io/component-base/cli/flag/BUILD | 3 +- .../cli/flag/ciphersuites_flag.go | 72 +- .../cli/flag/ciphersuites_flag_114.go | 29 + .../k8s.io/component-base/cli/flag/flags.go | 9 +- .../cli/flag/namedcertkey_flag.go | 2 +- .../component-base/cli/globalflag/BUILD | 2 +- .../cli/globalflag/globalflags.go | 4 +- vendor/k8s.io/component-base/config/BUILD | 1 + .../config/options}/BUILD | 14 +- .../config/options/leaderelectionconfig.go} | 11 +- vendor/k8s.io/component-base/config/types.go | 8 + .../config/v1alpha1/conversion.go | 8 + .../config/v1alpha1/defaults.go | 15 + .../component-base/config/v1alpha1/types.go | 8 + .../v1alpha1/zz_generated.conversion.go | 20 + .../config/v1alpha1/zz_generated.deepcopy.go | 16 + .../config/zz_generated.deepcopy.go | 16 + .../pkg/util => component-base}/configz/BUILD | 3 +- .../configz/configz.go | 0 .../k8s.io/component-base/featuregate/BUILD | 2 +- .../featuregate/feature_gate.go | 2 +- vendor/k8s.io/component-base/logs/BUILD | 16 +- vendor/k8s.io/component-base/logs/OWNERS | 8 + vendor/k8s.io/component-base/logs/json/BUILD | 43 + .../k8s.io/component-base/logs/json/json.go | 177 + .../logs}/logreduction/BUILD | 3 +- .../logs}/logreduction/logreduction.go | 0 vendor/k8s.io/component-base/logs/logs.go | 2 +- vendor/k8s.io/component-base/logs/options.go | 126 + vendor/k8s.io/component-base/logs/registry.go | 104 + vendor/k8s.io/component-base/metrics/BUILD | 8 +- .../k8s.io/component-base/metrics/counter.go | 8 + vendor/k8s.io/component-base/metrics/desc.go | 2 +- vendor/k8s.io/component-base/metrics/http.go | 14 + .../metrics/legacyregistry/registry.go | 35 +- .../k8s.io/component-base/metrics/metric.go | 2 +- .../k8s.io/component-base/metrics/options.go | 79 + vendor/k8s.io/component-base/metrics/opts.go | 6 +- .../metrics/processstarttime.go | 2 +- .../metrics/prometheus/version/metrics.go | 2 +- .../k8s.io/component-base/metrics/registry.go | 60 +- .../component-base/metrics/testutil/BUILD | 3 + .../metrics/testutil/metrics.go | 79 +- .../metrics/testutil/promlint.go | 161 + .../metrics/testutil/testutil.go | 16 + .../k8s.io/component-base/metrics/version.go | 2 +- vendor/k8s.io/component-base/term/BUILD | 24 + .../pkg/util => component-base}/term/term.go | 2 +- vendor/k8s.io/component-base/version/base.go | 8 +- .../component-base/version/verflag/verflag.go | 3 +- .../pkg/apis/runtime/v1alpha2/api.pb.go | 870 +- .../pkg/apis/runtime/v1alpha2/api.proto | 21 +- vendor/k8s.io/csi-translation-lib/go.mod | 7 +- vendor/k8s.io/csi-translation-lib/go.sum | 261 +- .../k8s.io/csi-translation-lib/plugins/BUILD | 4 +- .../csi-translation-lib/plugins/azure_disk.go | 31 + .../csi-translation-lib/plugins/azure_file.go | 17 +- .../plugins/vsphere_volume.go | 208 + .../k8s.io/csi-translation-lib/translate.go | 1 + .../deepcopy-gen/generators/deepcopy.go | 2 +- vendor/k8s.io/gengo/generator/execute.go | 2 +- .../k8s.io/gengo/generator/import_tracker.go | 2 +- vendor/k8s.io/gengo/namer/plural_namer.go | 2 +- vendor/k8s.io/gengo/parser/parse.go | 25 +- vendor/k8s.io/klog/v2/.gitignore | 17 + vendor/k8s.io/klog/v2/CONTRIBUTING.md | 22 + vendor/k8s.io/klog/v2/LICENSE | 191 + vendor/k8s.io/klog/v2/OWNERS | 19 + vendor/k8s.io/klog/v2/README.md | 99 + vendor/k8s.io/klog/v2/RELEASE.md | 9 + vendor/k8s.io/klog/v2/SECURITY_CONTACTS | 20 + vendor/k8s.io/klog/v2/code-of-conduct.md | 3 + vendor/k8s.io/klog/v2/go.mod | 5 + vendor/k8s.io/klog/v2/go.sum | 2 + vendor/k8s.io/klog/v2/klog.go | 1525 + vendor/k8s.io/klog/v2/klog_file.go | 164 + .../pkg/apis/apiregistration/types.go | 5 +- .../apis/apiregistration/v1/generated.proto | 5 +- .../pkg/apis/apiregistration/v1/types.go | 5 +- .../pkg/apis/apiregistration/v1beta1/BUILD | 1 + .../pkg/apis/apiregistration/v1beta1/doc.go | 1 + .../apiregistration/v1beta1/generated.proto | 5 +- .../pkg/apis/apiregistration/v1beta1/types.go | 11 +- .../zz_generated.prerelease-lifecycle.go | 73 + .../kube-aggregator/pkg/apiserver/BUILD | 4 +- .../pkg/apiserver/apiserver.go | 75 +- .../pkg/apiserver/apiservice_controller.go | 54 +- .../pkg/apiserver/handler_proxy.go | 20 +- .../listers/apiregistration/v1/apiservice.go | 3 + .../apiregistration/v1beta1/apiservice.go | 3 + .../kube-aggregator/pkg/controllers/BUILD | 2 +- .../pkg/controllers/autoregister/BUILD | 2 +- .../autoregister/autoregister_controller.go | 2 +- .../kube-aggregator/pkg/controllers/cache.go | 2 +- .../pkg/controllers/openapi/BUILD | 2 +- .../pkg/controllers/openapi/aggregator/BUILD | 2 +- .../openapi/aggregator/aggregator.go | 2 +- .../pkg/controllers/openapi/controller.go | 6 +- .../pkg/controllers/status/BUILD | 2 +- .../status/available_controller.go | 79 +- .../pkg/controllers/status/metrics.go | 2 +- .../pkg/registry/apiservice/etcd/etcd.go | 3 + .../config/v1alpha1/types.go | 44 + .../config/v1alpha1/zz_generated.deepcopy.go | 38 + .../kube-openapi/pkg/handler/handler.go | 4 +- .../k8s.io/kube-openapi/pkg/schemaconv/smd.go | 4 +- .../kube-openapi/pkg/util/proto/document.go | 2 +- .../kube-proxy/config/v1alpha1/types.go | 2 + .../k8s.io/kube-scheduler/config/v1/types.go | 10 +- .../config/v1/zz_generated.deepcopy.go | 54 +- .../kube-scheduler/config/v1alpha1/types.go | 228 - .../config/v1alpha1/zz_generated.deepcopy.go | 351 - .../config/v1alpha2/zz_generated.deepcopy.go | 292 - .../config/{v1alpha2 => v1beta1}/BUILD | 7 +- .../config/{v1alpha2 => v1beta1}/doc.go | 2 +- .../config/{v1alpha2 => v1beta1}/register.go | 13 +- .../config/{v1alpha2 => v1beta1}/types.go | 154 +- .../config/v1beta1/types_pluginargs.go | 172 + .../config/v1beta1/zz_generated.deepcopy.go | 627 + vendor/k8s.io/kubectl/pkg/cmd/BUILD | 1 + vendor/k8s.io/kubectl/pkg/cmd/annotate/BUILD | 3 +- .../kubectl/pkg/cmd/annotate/annotate.go | 40 +- .../pkg/cmd/apiresources/apiresources.go | 2 +- vendor/k8s.io/kubectl/pkg/cmd/apply/BUILD | 3 +- vendor/k8s.io/kubectl/pkg/cmd/apply/apply.go | 98 +- .../pkg/cmd/apply/apply_edit_last_applied.go | 1 + .../k8s.io/kubectl/pkg/cmd/apply/patcher.go | 35 +- vendor/k8s.io/kubectl/pkg/cmd/apply/prune.go | 13 +- vendor/k8s.io/kubectl/pkg/cmd/attach/BUILD | 2 +- .../k8s.io/kubectl/pkg/cmd/attach/attach.go | 14 +- vendor/k8s.io/kubectl/pkg/cmd/autoscale/BUILD | 2 +- .../kubectl/pkg/cmd/autoscale/autoscale.go | 18 +- .../k8s.io/kubectl/pkg/cmd/certificates/BUILD | 26 +- .../pkg/cmd/certificates/certificates.go | 159 +- .../pkg/cmd/clusterinfo/clusterinfo_dump.go | 2 + .../kubectl/pkg/cmd/completion/completion.go | 51 +- .../kubectl/pkg/cmd/config/create_authinfo.go | 9 +- .../kubectl/pkg/cmd/config/create_cluster.go | 7 +- .../pkg/kubectl => kubectl/pkg}/cmd/cp/BUILD | 3 +- .../pkg/kubectl => kubectl/pkg}/cmd/cp/cp.go | 43 +- vendor/k8s.io/kubectl/pkg/cmd/create/BUILD | 7 +- .../k8s.io/kubectl/pkg/cmd/create/create.go | 23 +- .../pkg/cmd/create/create_clusterrole.go | 11 + .../cmd/create/create_clusterrolebinding.go | 189 +- .../pkg/cmd/create/create_configmap.go | 1 + .../kubectl/pkg/cmd/create/create_cronjob.go | 68 +- .../pkg/cmd/create/create_deployment.go | 286 +- .../kubectl/pkg/cmd/create/create_job.go | 59 +- .../pkg/cmd/create/create_namespace.go | 1 + .../kubectl/pkg/cmd/create/create_pdb.go | 1 + .../pkg/cmd/create/create_priorityclass.go | 3 +- .../kubectl/pkg/cmd/create/create_quota.go | 1 + .../kubectl/pkg/cmd/create/create_role.go | 33 +- .../pkg/cmd/create/create_rolebinding.go | 1 + .../kubectl/pkg/cmd/create/create_secret.go | 5 +- .../kubectl/pkg/cmd/create/create_service.go | 6 +- .../pkg/cmd/create/create_serviceaccount.go | 1 + vendor/k8s.io/kubectl/pkg/cmd/debug/BUILD | 5 +- vendor/k8s.io/kubectl/pkg/cmd/debug/debug.go | 434 +- vendor/k8s.io/kubectl/pkg/cmd/delete/BUILD | 2 +- .../k8s.io/kubectl/pkg/cmd/delete/delete.go | 2 +- vendor/k8s.io/kubectl/pkg/cmd/diff/BUILD | 2 +- vendor/k8s.io/kubectl/pkg/cmd/diff/diff.go | 13 +- vendor/k8s.io/kubectl/pkg/cmd/edit/edit.go | 14 +- vendor/k8s.io/kubectl/pkg/cmd/exec/BUILD | 2 +- vendor/k8s.io/kubectl/pkg/cmd/exec/exec.go | 6 +- .../k8s.io/kubectl/pkg/cmd/explain/explain.go | 13 +- vendor/k8s.io/kubectl/pkg/cmd/expose/BUILD | 2 +- .../k8s.io/kubectl/pkg/cmd/expose/expose.go | 6 +- vendor/k8s.io/kubectl/pkg/cmd/get/BUILD | 2 +- vendor/k8s.io/kubectl/pkg/cmd/get/get.go | 11 +- vendor/k8s.io/kubectl/pkg/cmd/get/sorter.go | 2 +- .../kubectl/pkg/cmd/get/table_printer.go | 2 +- vendor/k8s.io/kubectl/pkg/cmd/label/BUILD | 2 +- vendor/k8s.io/kubectl/pkg/cmd/label/label.go | 9 +- vendor/k8s.io/kubectl/pkg/cmd/patch/BUILD | 2 +- vendor/k8s.io/kubectl/pkg/cmd/patch/patch.go | 7 +- .../k8s.io/kubectl/pkg/cmd/portforward/BUILD | 1 + .../pkg/cmd/portforward/portforward.go | 74 + vendor/k8s.io/kubectl/pkg/cmd/proxy/BUILD | 2 +- vendor/k8s.io/kubectl/pkg/cmd/proxy/proxy.go | 2 +- vendor/k8s.io/kubectl/pkg/cmd/replace/BUILD | 2 +- .../k8s.io/kubectl/pkg/cmd/replace/replace.go | 10 +- vendor/k8s.io/kubectl/pkg/cmd/rollout/BUILD | 1 - .../k8s.io/kubectl/pkg/cmd/rollout/rollout.go | 1 + .../kubectl/pkg/cmd/rollout/rollout_pause.go | 7 +- .../pkg/cmd/rollout/rollout_restart.go | 7 +- .../kubectl/pkg/cmd/rollout/rollout_resume.go | 7 +- .../kubectl/pkg/cmd/rollout/rollout_status.go | 17 +- .../kubectl/pkg/cmd/rollout/rollout_undo.go | 4 +- vendor/k8s.io/kubectl/pkg/cmd/run/BUILD | 2 +- vendor/k8s.io/kubectl/pkg/cmd/run/run.go | 95 +- vendor/k8s.io/kubectl/pkg/cmd/scale/BUILD | 2 +- vendor/k8s.io/kubectl/pkg/cmd/scale/scale.go | 34 +- vendor/k8s.io/kubectl/pkg/cmd/set/BUILD | 2 +- vendor/k8s.io/kubectl/pkg/cmd/set/helper.go | 3 +- vendor/k8s.io/kubectl/pkg/cmd/set/set_env.go | 7 +- .../k8s.io/kubectl/pkg/cmd/set/set_image.go | 5 +- .../kubectl/pkg/cmd/set/set_resources.go | 5 +- .../kubectl/pkg/cmd/set/set_selector.go | 8 +- .../kubectl/pkg/cmd/set/set_serviceaccount.go | 5 +- .../k8s.io/kubectl/pkg/cmd/set/set_subject.go | 3 + vendor/k8s.io/kubectl/pkg/cmd/taint/BUILD | 3 +- vendor/k8s.io/kubectl/pkg/cmd/taint/taint.go | 32 +- vendor/k8s.io/kubectl/pkg/cmd/top/BUILD | 5 +- vendor/k8s.io/kubectl/pkg/cmd/top/top_node.go | 57 +- vendor/k8s.io/kubectl/pkg/cmd/top/top_pod.go | 23 +- vendor/k8s.io/kubectl/pkg/cmd/util/BUILD | 2 +- .../k8s.io/kubectl/pkg/cmd/util/editor/BUILD | 13 +- .../pkg/cmd/util/editor/editoptions.go | 79 +- .../kubectl/pkg/cmd/util/editor/editor.go | 2 +- vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go | 24 +- vendor/k8s.io/kubectl/pkg/cmd/version/BUILD | 13 +- vendor/k8s.io/kubectl/pkg/describe/BUILD | 3 +- .../k8s.io/kubectl/pkg/describe/describe.go | 520 +- vendor/k8s.io/kubectl/pkg/drain/BUILD | 1 - vendor/k8s.io/kubectl/pkg/explain/BUILD | 1 + vendor/k8s.io/kubectl/pkg/explain/explain.go | 12 +- .../k8s.io/kubectl/pkg/explain/formatter.go | 70 +- .../kubectl/pkg/generate/versioned/BUILD | 1 + .../kubectl/pkg/generate/versioned/run.go | 26 +- .../pkg/generate/versioned/service_basic.go | 7 +- .../k8s.io/kubectl/pkg/generated/bindata.go | 1 + vendor/k8s.io/kubectl/pkg/metricsutil/BUILD | 11 +- .../kubectl/pkg/metricsutil/metrics_client.go | 171 - vendor/k8s.io/kubectl/pkg/proxy/BUILD | 2 +- .../k8s.io/kubectl/pkg/proxy/proxy_server.go | 2 +- vendor/k8s.io/kubectl/pkg/scale/BUILD | 1 + vendor/k8s.io/kubectl/pkg/scale/scale.go | 43 +- vendor/k8s.io/kubectl/pkg/scheme/BUILD | 1 + vendor/k8s.io/kubectl/pkg/scheme/install.go | 3 +- vendor/k8s.io/kubectl/pkg/util/BUILD | 9 + .../k8s.io/kubectl/pkg/util/certificate/BUILD | 1 - .../pkg/util/certificate/certificate.go | 6 +- vendor/k8s.io/kubectl/pkg/util/i18n/BUILD | 2 +- vendor/k8s.io/kubectl/pkg/util/i18n/i18n.go | 2 +- vendor/k8s.io/kubectl/pkg/util/openapi/BUILD | 4 +- .../kubectl/pkg/util/openapi/openapi.go | 2 +- vendor/k8s.io/kubectl/pkg/util/rbac/BUILD | 5 +- vendor/k8s.io/kubectl/pkg/util/rbac/rbac.go | 9 +- .../kubectl/pkg/util/templates/markdown.go | 35 +- vendor/k8s.io/kubectl/pkg/util/term/BUILD | 11 +- vendor/k8s.io/kubectl/pkg/util/term/resize.go | 2 +- vendor/k8s.io/kubectl/pkg/util/term/term.go | 29 +- .../kubectl/pkg/util/term/term_writer.go | 2 +- vendor/k8s.io/kubelet/config/v1beta1/BUILD | 10 +- vendor/k8s.io/kubelet/config/v1beta1/types.go | 59 +- .../config/v1beta1/zz_generated.deepcopy.go | 16 + .../pkg/apis/deviceplugin/v1beta1/api.pb.go | 1104 +- .../pkg/apis/deviceplugin/v1beta1/api.proto | 75 +- .../cmd/cloud-controller-manager/app/BUILD | 15 +- .../app/controllermanager.go | 17 +- .../cmd/cloud-controller-manager/app/core.go | 23 +- .../app/options/BUILD | 5 +- .../app/options/options.go | 10 +- .../cmd/controller-manager/app/BUILD | 6 +- .../cmd/controller-manager/app/helper.go | 2 +- .../cmd/controller-manager/app/options/BUILD | 2 +- .../controller-manager/app/options/generic.go | 4 +- .../cmd/controller-manager/app/serve.go | 8 +- .../kubernetes/cmd/kube-apiserver/app/BUILD | 20 +- .../cmd/kube-apiserver/app/aggregator.go | 26 +- .../cmd/kube-apiserver/app/options/BUILD | 5 +- .../cmd/kube-apiserver/app/options/options.go | 25 +- .../kube-apiserver/app/options/validation.go | 52 +- .../cmd/kube-apiserver/app/server.go | 78 +- .../cmd/kube-controller-manager/app/BUILD | 23 +- .../cmd/kube-controller-manager/app/batch.go | 2 +- .../app/certificates.go | 180 +- .../app/cloudproviders.go | 4 +- .../app/controllermanager.go | 26 +- .../cmd/kube-controller-manager/app/core.go | 42 +- .../kube-controller-manager/app/discovery.go | 27 +- .../kube-controller-manager/app/options/BUILD | 7 +- .../app/options/csrsigningcontroller.go | 68 +- .../endpointslicemirroringcontroller.go | 86 + .../app/options/options.go | 36 +- .../kube-controller-manager/app/plugins.go | 2 +- .../app/plugins_providers.go | 8 +- .../cmd/kube-controller-manager/app/policy.go | 2 +- .../kubernetes/cmd/kube-proxy/app/BUILD | 80 +- .../cmd/kube-proxy/app/conntrack.go | 2 +- .../kubernetes/cmd/kube-proxy/app/server.go | 124 +- .../cmd/kube-proxy/app/server_others.go | 99 +- .../cmd/kube-proxy/app/server_windows.go | 98 +- .../kubernetes/cmd/kube-scheduler/app/BUILD | 27 +- .../cmd/kube-scheduler/app/config/BUILD | 3 - .../cmd/kube-scheduler/app/config/config.go | 11 +- .../cmd/kube-scheduler/app/options/BUILD | 17 +- .../kube-scheduler/app/options/configfile.go | 29 +- .../kube-scheduler/app/options/deprecated.go | 43 +- .../cmd/kube-scheduler/app/options/options.go | 90 +- .../cmd/kube-scheduler/app/server.go | 175 +- .../k8s.io/kubernetes/cmd/kubelet/app/BUILD | 60 +- .../kubernetes/cmd/kubelet/app/options/BUILD | 3 +- .../kubelet/app/options/container_runtime.go | 1 - .../cmd/kubelet/app/options/globalflags.go | 6 +- .../app/options/globalflags_providerless.go | 27 + .../app/options/globalflags_providers.go} | 21 +- .../cmd/kubelet/app/options/options.go | 142 +- .../cmd/kubelet/app/plugins_providers.go | 5 +- .../kubernetes/cmd/kubelet/app/server.go | 183 +- .../cmd/kubelet/app/server_linux.go | 2 +- .../kubernetes/pkg/api/endpoints/OWNERS | 2 - .../pkg/api/persistentvolume/OWNERS | 1 - .../pkg/api/persistentvolumeclaim/OWNERS | 1 - vendor/k8s.io/kubernetes/pkg/api/pod/BUILD | 5 +- vendor/k8s.io/kubernetes/pkg/api/pod/OWNERS | 1 - vendor/k8s.io/kubernetes/pkg/api/pod/util.go | 135 +- .../k8s.io/kubernetes/pkg/api/service/OWNERS | 1 - vendor/k8s.io/kubernetes/pkg/api/v1/pod/BUILD | 1 + .../k8s.io/kubernetes/pkg/api/v1/pod/util.go | 63 +- vendor/k8s.io/kubernetes/pkg/apis/abac/OWNERS | 1 - .../kubernetes/pkg/apis/admission/types.go | 6 + .../admission/v1/zz_generated.conversion.go | 2 + .../v1beta1/zz_generated.conversion.go | 2 + .../apis/admission/zz_generated.deepcopy.go | 5 + vendor/k8s.io/kubernetes/pkg/apis/apps/OWNERS | 2 - .../kubernetes/pkg/apis/apps/v1/defaults.go | 6 +- .../pkg/apis/apps/v1/zz_generated.defaults.go | 29 + .../apps/v1beta1/zz_generated.defaults.go | 15 + .../apps/v1beta2/zz_generated.defaults.go | 29 + .../apis/auditregistration/install/install.go | 38 - .../pkg/apis/auditregistration/types.go | 197 - .../pkg/apis/auditregistration/v1alpha1/BUILD | 51 - .../auditregistration/v1alpha1/defaults.go | 63 - .../v1alpha1/zz_generated.conversion.go | 359 - .../v1alpha1/zz_generated.defaults.go | 49 - .../validation/validation.go | 123 - .../zz_generated.deepcopy.go | 224 - .../kubernetes/pkg/apis/autoscaling/OWNERS | 1 - .../k8s.io/kubernetes/pkg/apis/batch/OWNERS | 1 - .../apis/batch/v1/zz_generated.defaults.go | 7 + .../batch/v1beta1/zz_generated.defaults.go | 14 + .../batch/v2alpha1/zz_generated.defaults.go | 14 + .../pkg/apis/batch/validation/validation.go | 10 +- .../kubernetes/pkg/apis/certificates/BUILD | 3 + .../pkg/apis/certificates/helpers.go | 96 +- .../pkg/apis/certificates/install/BUILD | 1 + .../pkg/apis/certificates/install/install.go | 5 +- .../kubernetes/pkg/apis/certificates/types.go | 38 +- .../kubernetes/pkg/apis/certificates/v1/BUILD | 39 + .../pkg/apis/certificates/v1/conversion.go | 38 + .../pkg/apis/certificates/v1/defaults.go | 25 + .../v1alpha1 => certificates/v1}/doc.go | 12 +- .../pkg/apis/certificates/v1/helpers.go | 37 + .../certificates/v1}/register.go | 29 +- .../v1/zz_generated.conversion.go | 230 + .../certificates/v1}/zz_generated.defaults.go | 10 +- .../pkg/apis/certificates/v1beta1/BUILD | 2 + .../pkg/apis/certificates/v1beta1/defaults.go | 83 +- .../v1beta1/zz_generated.conversion.go | 12 +- .../v1beta1/zz_generated.defaults.go | 4 + .../pkg/apis/certificates/validation/BUILD | 11 + .../certificates/validation/validation.go | 424 +- .../certificates/zz_generated.deepcopy.go | 1 + vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS | 3 - .../pkg/apis/core/annotation_key_constants.go | 9 +- .../kubernetes/pkg/apis/core/install/OWNERS | 1 - .../kubernetes/pkg/apis/core/pods/helpers.go | 14 +- .../k8s.io/kubernetes/pkg/apis/core/types.go | 202 +- .../k8s.io/kubernetes/pkg/apis/core/v1/OWNERS | 2 - .../kubernetes/pkg/apis/core/v1/conversion.go | 1 + .../kubernetes/pkg/apis/core/v1/defaults.go | 8 +- .../pkg/apis/core/v1/helper/helpers.go | 13 +- .../apis/core/v1/zz_generated.conversion.go | 110 +- .../pkg/apis/core/v1/zz_generated.defaults.go | 22 + .../kubernetes/pkg/apis/core/validation/BUILD | 9 +- .../pkg/apis/core/validation/OWNERS | 2 - .../core/validation/conditional_validation.go | 84 +- .../pkg/apis/core/validation/events.go | 89 +- .../pkg/apis/core/validation/validation.go | 360 +- .../pkg/apis/core/zz_generated.deepcopy.go | 80 + .../kubernetes/pkg/apis/discovery/types.go | 1 - .../k8s.io/kubernetes/pkg/apis/events/BUILD | 1 + .../kubernetes/pkg/apis/events/install/BUILD | 1 + .../pkg/apis/events/install/install.go | 4 +- .../kubernetes/pkg/apis/events/v1/BUILD | 37 + .../pkg/apis/events/v1/conversion.go | 87 + .../kubernetes/pkg/apis/events/v1/doc.go | 24 + .../v1alpha1 => events/v1}/register.go | 19 +- .../apis/events/v1/zz_generated.conversion.go | 173 + .../events/v1}/zz_generated.defaults.go | 10 +- .../pkg/apis/events/v1beta1/conversion.go | 29 + .../pkg/apis/events/v1beta1/register.go | 2 +- .../events/v1beta1/zz_generated.conversion.go | 2 - .../kubernetes/pkg/apis/extensions/OWNERS | 1 - .../pkg/apis/extensions/v1beta1/BUILD | 8 +- .../pkg/apis/extensions/v1beta1/conversion.go | 55 + .../v1beta1/zz_generated.conversion.go | 139 +- .../v1beta1/zz_generated.defaults.go | 21 + .../kubernetes/pkg/apis/flowcontrol/types.go | 2 - .../kubernetes/pkg/apis/networking/types.go | 56 +- .../kubernetes/pkg/apis/networking/v1/BUILD | 1 + .../networking/v1/zz_generated.conversion.go | 531 + .../pkg/apis/networking/v1beta1/BUILD | 11 +- .../pkg/apis/networking/v1beta1/conversion.go | 77 + .../v1beta1/zz_generated.conversion.go | 139 +- .../pkg/apis/networking/validation/BUILD | 2 + .../apis/networking/validation/validation.go | 228 +- .../apis/networking/zz_generated.deepcopy.go | 43 +- .../kubernetes/pkg/apis/policy/types.go | 16 +- .../pkg/apis/policy/validation/BUILD | 3 +- .../pkg/apis/policy/validation/validation.go | 9 +- .../kubernetes/pkg/apis/scheduling/types.go | 2 +- .../v1alpha1/zz_generated.defaults.go | 7 + .../apis/settings/validation/validation.go | 2 +- .../k8s.io/kubernetes/pkg/apis/storage/BUILD | 1 + .../k8s.io/kubernetes/pkg/apis/storage/OWNERS | 7 +- .../kubernetes/pkg/apis/storage/register.go | 2 + .../kubernetes/pkg/apis/storage/types.go | 138 + .../kubernetes/pkg/apis/storage/v1/BUILD | 3 + .../pkg/apis/storage/v1/defaults.go | 8 + .../storage/v1/zz_generated.conversion.go | 28 +- .../pkg/apis/storage/v1alpha1/BUILD | 2 + .../v1alpha1/zz_generated.conversion.go | 80 +- .../pkg/apis/storage/v1beta1/defaults.go | 10 +- .../v1beta1/zz_generated.conversion.go | 28 +- .../pkg/apis/storage/validation/BUILD | 2 + .../pkg/apis/storage/validation/validation.go | 64 + .../pkg/apis/storage/zz_generated.deepcopy.go | 80 + .../kubernetes/pkg/auth/authorizer/abac/BUILD | 2 +- .../pkg/auth/authorizer/abac/abac.go | 2 +- .../providers/.import-restrictions | 16 +- .../pkg/controller/.import-restrictions | 16 - vendor/k8s.io/kubernetes/pkg/controller/BUILD | 86 +- .../k8s.io/kubernetes/pkg/controller/OWNERS | 3 + .../pkg/controller/apis/config/BUILD | 1 + .../pkg/controller/apis/config/types.go | 4 + .../pkg/controller/apis/config/v1alpha1/BUILD | 1 + .../apis/config/v1alpha1/defaults.go | 3 + .../controller/apis/config/v1alpha1/doc.go | 2 + .../v1alpha1/zz_generated.conversion.go | 7 + .../apis/config/zz_generated.deepcopy.go | 1 + .../kubernetes/pkg/controller/bootstrap/BUILD | 2 +- .../controller/bootstrap/bootstrapsigner.go | 2 +- .../pkg/controller/bootstrap/tokencleaner.go | 2 +- .../pkg/controller/bootstrap/util.go | 2 +- .../pkg/controller/certificates/BUILD | 12 +- .../controller/certificates/approver/BUILD | 12 +- .../certificates/approver/sarapprove.go | 29 +- .../controller/certificates/authority/BUILD | 4 +- .../certificates/authority/policies.go | 2 +- .../certificates/certificate_controller.go | 22 +- .../certificate_controller_utils.go | 15 +- .../pkg/controller/certificates/cleaner/BUILD | 12 +- .../certificates/cleaner/cleaner.go | 33 +- .../certificates/rootcacertpublisher/BUILD | 2 +- .../rootcacertpublisher/publisher.go | 2 +- .../pkg/controller/certificates/signer/BUILD | 12 +- .../certificates/signer/config/types.go | 20 + .../signer/config/v1alpha1/defaults.go | 6 - .../v1alpha1/zz_generated.conversion.go | 56 + .../signer/config/zz_generated.deepcopy.go | 20 + .../controller/certificates/signer/signer.go | 171 +- .../pkg/controller/client_builder.go | 2 +- .../pkg/controller/client_builder_dynamic.go | 2 +- .../controller/clusterroleaggregation/BUILD | 2 +- .../clusterroleaggregation_controller.go | 2 +- .../pkg/controller/controller_ref_manager.go | 2 +- .../pkg/controller/controller_utils.go | 10 +- .../kubernetes/pkg/controller/cronjob/BUILD | 2 +- .../controller/cronjob/cronjob_controller.go | 139 +- .../pkg/controller/cronjob/injection.go | 28 +- .../pkg/controller/cronjob/utils.go | 56 +- .../kubernetes/pkg/controller/daemon/BUILD | 6 +- .../controller/daemon/daemon_controller.go | 23 +- .../pkg/controller/daemon/update.go | 2 +- .../pkg/controller/deployment/BUILD | 2 +- .../deployment/deployment_controller.go | 29 +- .../pkg/controller/deployment/progress.go | 2 +- .../pkg/controller/deployment/rollback.go | 2 +- .../pkg/controller/deployment/rolling.go | 2 +- .../pkg/controller/deployment/sync.go | 7 +- .../pkg/controller/deployment/util/BUILD | 2 +- .../deployment/util/deployment_util.go | 2 +- .../pkg/controller/disruption/BUILD | 4 +- .../pkg/controller/disruption/disruption.go | 4 +- .../kubernetes/pkg/controller/endpoint/BUILD | 4 +- .../endpoint/endpoints_controller.go | 83 +- .../pkg/controller/endpointslice/BUILD | 6 +- .../endpointslice/endpointslice_controller.go | 58 +- .../endpointslice/endpointslice_tracker.go | 47 +- .../controller/endpointslice/reconciler.go | 43 +- .../pkg/controller/endpointslice/utils.go | 25 +- .../controller/endpointslicemirroring/BUILD | 97 + .../controller/endpointslicemirroring/OWNERS | 12 + .../endpointslicemirroring/config/BUILD | 30 + .../endpointslicemirroring/config}/doc.go | 5 +- .../endpointslicemirroring/config/types.go | 42 + .../config/v1alpha1}/BUILD | 18 +- .../config/v1alpha1/conversion.go | 40 + .../config/v1alpha1/defaults.go | 41 + .../config/v1alpha1/doc.go | 21 + .../config/v1alpha1/register.go | 31 +- .../v1alpha1/zz_generated.conversion.go | 95 + .../config/v1alpha1/zz_generated.deepcopy.go | 0 .../config/zz_generated.deepcopy.go | 38 + .../endpointslicemirroring/endpointset.go | 96 + .../endpointslice_tracker.go | 138 + .../endpointslicemirroring_controller.go | 509 + .../endpointslicemirroring/events.go | 33 + .../endpointslicemirroring/metrics/BUILD | 42 + .../endpointslicemirroring/metrics/cache.go | 158 + .../endpointslicemirroring/metrics/metrics.go | 149 + .../endpointslicemirroring/reconciler.go | 327 + .../reconciler_helpers.go | 137 + .../endpointslicemirroring/utils.go | 275 + .../pkg/controller/garbagecollector/BUILD | 2 +- .../garbagecollector/garbagecollector.go | 16 +- .../garbagecollector/graph_builder.go | 2 +- .../controller/garbagecollector/operations.go | 2 +- .../kubernetes/pkg/controller/job/BUILD | 2 +- .../pkg/controller/job/job_controller.go | 67 +- .../kubernetes/pkg/controller/job/utils.go | 2 + .../kubernetes/pkg/controller/namespace/BUILD | 2 +- .../pkg/controller/namespace/deletion/BUILD | 4 +- .../deletion/namespaced_resources_deleter.go | 12 +- .../namespace/namespace_controller.go | 2 +- .../kubernetes/pkg/controller/nodeipam/BUILD | 3 +- .../pkg/controller/nodeipam/ipam/BUILD | 2 +- .../pkg/controller/nodeipam/ipam/adapter.go | 23 +- .../nodeipam/ipam/cidr_allocator.go | 2 +- .../controller/nodeipam/ipam/cidrset/BUILD | 14 +- .../nodeipam/ipam/cidrset/cidr_set.go | 135 +- .../nodeipam/ipam/cidrset/metrics.go | 78 + .../nodeipam/ipam/cloud_cidr_allocator.go | 11 +- .../ipam/controller_legacyprovider.go | 2 +- .../nodeipam/ipam/range_allocator.go | 4 +- .../pkg/controller/nodeipam/ipam/sync/BUILD | 4 +- .../pkg/controller/nodeipam/ipam/sync/sync.go | 12 +- .../pkg/controller/nodeipam/legacyprovider.go | 2 +- .../nodeipam/node_ipam_controller.go | 7 +- .../controller/nodeipam/nolegacyprovider.go | 2 +- .../pkg/controller/nodelifecycle/BUILD | 2 +- .../node_lifecycle_controller.go | 48 +- .../controller/nodelifecycle/scheduler/BUILD | 3 +- .../scheduler/rate_limited_queue.go | 16 +- .../nodelifecycle/scheduler/taint_manager.go | 7 +- .../nodelifecycle/scheduler/timed_workers.go | 2 +- .../pkg/controller/podautoscaler/BUILD | 2 +- .../controller/podautoscaler/horizontal.go | 66 +- .../controller/podautoscaler/metrics/BUILD | 2 +- .../metrics/legacy_metrics_client.go | 2 +- .../metrics/rest_metrics_client.go | 2 +- .../controller/podautoscaler/rate_limiters.go | 4 + .../podautoscaler/replica_calculator.go | 4 +- .../kubernetes/pkg/controller/podgc/BUILD | 2 +- .../pkg/controller/podgc/gc_controller.go | 2 +- .../pkg/controller/replicaset/BUILD | 4 +- .../pkg/controller/replicaset/replica_set.go | 31 +- .../replicaset/replica_set_utils.go | 2 +- .../pkg/controller/replication/BUILD | 1 - .../replication/replication_controller.go | 3 +- .../pkg/controller/resourcequota/BUILD | 2 +- .../resource_quota_controller.go | 4 +- .../resourcequota/resource_quota_monitor.go | 2 +- .../pkg/controller/serviceaccount/BUILD | 4 +- .../serviceaccounts_controller.go | 2 +- .../serviceaccount/tokens_controller.go | 2 +- .../pkg/controller/statefulset/BUILD | 2 +- .../controller/statefulset/stateful_set.go | 8 +- .../statefulset/stateful_set_control.go | 2 +- .../kubernetes/pkg/controller/ttl/BUILD | 2 +- .../pkg/controller/ttl/ttl_controller.go | 6 +- .../pkg/controller/ttlafterfinished/BUILD | 2 +- .../ttlafterfinished_controller.go | 4 +- .../pkg/controller/util/endpoint/BUILD | 2 + .../util/endpoint/controller_utils.go | 52 +- .../kubernetes/pkg/controller/util/node/BUILD | 2 +- .../controller/util/node/controller_utils.go | 7 +- .../pkg/controller/volume/attachdetach/BUILD | 3 +- .../attachdetach/attach_detach_controller.go | 44 +- .../volume/attachdetach/cache/BUILD | 2 +- .../cache/actual_state_of_world.go | 2 +- .../volume/attachdetach/metrics/BUILD | 2 +- .../volume/attachdetach/metrics/metrics.go | 4 +- .../volume/attachdetach/populator/BUILD | 2 +- .../desired_state_of_world_populator.go | 2 +- .../volume/attachdetach/reconciler/BUILD | 2 +- .../attachdetach/reconciler/reconciler.go | 10 +- .../volume/attachdetach/statusupdater/BUILD | 2 +- .../statusupdater/node_status_updater.go | 2 +- .../controller/volume/attachdetach/util/BUILD | 2 +- .../volume/attachdetach/util/util.go | 44 +- .../volume/common}/BUILD | 15 +- .../pkg/controller/volume/common/common.go | 72 + .../pkg/controller/volume/ephemeral/BUILD | 62 + .../volume/ephemeral}/OWNERS | 4 +- .../controller/volume/ephemeral/controller.go | 286 + .../pkg/controller/volume/ephemeral/doc.go | 21 + .../pkg/controller/volume/events/event.go | 3 +- .../pkg/controller/volume/expand/BUILD | 2 +- .../volume/expand/expand_controller.go | 4 +- .../controller/volume/persistentvolume/BUILD | 5 +- .../volume/persistentvolume/pv_controller.go | 95 +- .../persistentvolume/pv_controller_base.go | 12 +- .../volume/persistentvolume/volume_host.go | 2 +- .../pkg/controller/volume/pvcprotection/BUILD | 6 +- .../pvc_protection_controller.go | 101 +- .../pkg/controller/volume/pvprotection/BUILD | 4 +- .../pvprotection/pv_protection_controller.go | 2 +- .../pkg/controller/volume/scheduling/BUILD | 13 +- .../volume/scheduling/metrics/metrics.go | 11 +- .../scheduling/scheduler_assume_cache.go | 12 +- .../volume/scheduling/scheduler_binder.go | 432 +- .../scheduling/scheduler_binder_cache.go | 167 - .../scheduling/scheduler_binder_fake.go | 26 +- .../kubernetes/pkg/credentialprovider/BUILD | 2 +- .../kubernetes/pkg/credentialprovider/OWNERS | 2 - .../pkg/credentialprovider/config.go | 74 +- .../pkg/credentialprovider/keyring.go | 40 +- .../pkg/credentialprovider/plugins.go | 2 +- .../pkg/credentialprovider/provider.go | 2 +- .../pkg/credentialprovider/secrets/secrets.go | 2 +- .../kubernetes/pkg/features/kube_features.go | 167 +- .../pkg/generated/openapi/openapi.go | 4 +- .../pkg/kubeapiserver/admission/BUILD | 2 +- .../pkg/kubeapiserver/admission/config.go | 2 +- .../pkg/kubeapiserver/authenticator/BUILD | 2 - .../pkg/kubeapiserver/authenticator/config.go | 29 - .../pkg/kubeapiserver/authorizer/config.go | 1 + .../default_storage_factory_builder.go | 1 + .../pkg/kubeapiserver/options/BUILD | 2 +- .../kubeapiserver/options/authentication.go | 43 +- .../kubeapiserver/server/insecure_handler.go | 1 + .../k8s.io/kubernetes/pkg/kubectl/cmd/BUILD | 5 +- .../kubernetes/pkg/kubectl/cmd/auth/BUILD | 2 +- .../pkg/kubectl/cmd/auth/reconcile.go | 2 +- .../k8s.io/kubernetes/pkg/kubectl/cmd/cmd.go | 26 +- .../kubernetes/pkg/kubectl/cmd/convert/BUILD | 2 +- .../pkg/kubectl/cmd/convert/convert.go | 2 +- vendor/k8s.io/kubernetes/pkg/kubelet/BUILD | 31 +- vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS | 3 +- .../k8s.io/kubernetes/pkg/kubelet/apis/BUILD | 1 - .../kubernetes/pkg/kubelet/apis/config/BUILD | 9 +- .../pkg/kubelet/apis/config/helpers.go | 1 + .../pkg/kubelet/apis/config/scheme/BUILD | 2 + .../pkg/kubelet/apis/config/types.go | 32 +- .../pkg/kubelet/apis/config/v1beta1/BUILD | 1 + .../kubelet/apis/config/v1beta1/defaults.go | 16 + .../config/v1beta1/zz_generated.conversion.go | 35 + .../pkg/kubelet/apis/config/validation/BUILD | 1 + .../apis/config/validation/validation.go | 14 +- .../apis/config/zz_generated.deepcopy.go | 1 + .../apis/resourcemetrics/v1alpha1/BUILD | 5 - .../apis/resourcemetrics/v1alpha1/config.go | 106 +- .../pkg/kubelet/apis/stats/v1alpha1/types.go | 12 +- .../pkg/kubelet/apis/well_known_labels.go | 8 +- .../kubernetes/pkg/kubelet/cadvisor/BUILD | 11 +- .../pkg/kubelet/cadvisor/cadvisor_linux.go | 16 +- .../kubelet/cadvisor/cadvisor_linux_docker.go | 25 + .../kubelet/cadvisor/cadvisor_unsupported.go | 4 + .../pkg/kubelet/cadvisor/cadvisor_windows.go | 4 + .../kubernetes/pkg/kubelet/cadvisor/types.go | 1 + .../kubernetes/pkg/kubelet/certificate/BUILD | 5 +- .../pkg/kubelet/certificate/bootstrap/BUILD | 12 +- .../certificate/bootstrap/bootstrap.go | 38 +- .../pkg/kubelet/certificate/kubelet.go | 32 +- .../pkg/kubelet/certificate/transport.go | 2 +- .../kubernetes/pkg/kubelet/checkpoint/BUILD | 41 - .../pkg/kubelet/checkpoint/checkpoint.go | 128 - .../pkg/kubelet/client/kubelet_client.go | 12 +- .../pkg/kubelet/cloudresource/BUILD | 2 +- .../cloudresource/cloud_request_manager.go | 2 +- vendor/k8s.io/kubernetes/pkg/kubelet/cm/BUILD | 28 +- .../k8s.io/kubernetes/pkg/kubelet/cm/OWNERS | 2 - .../pkg/kubelet/cm/cgroup_manager_linux.go | 389 +- .../kubelet/cm/cgroup_manager_unsupported.go | 6 +- .../pkg/kubelet/cm/container_manager.go | 5 +- .../pkg/kubelet/cm/container_manager_linux.go | 133 +- .../pkg/kubelet/cm/container_manager_stub.go | 6 +- .../kubelet/cm/container_manager_windows.go | 6 +- .../cm/{cpumanager => }/containermap/BUILD | 2 +- .../containermap/container_map.go | 0 .../pkg/kubelet/cm/cpumanager/BUILD | 7 +- .../pkg/kubelet/cm/cpumanager/OWNERS | 1 - .../kubelet/cm/cpumanager/cpu_assignment.go | 2 +- .../pkg/kubelet/cm/cpumanager/cpu_manager.go | 4 +- .../kubelet/cm/cpumanager/fake_cpu_manager.go | 4 +- .../pkg/kubelet/cm/cpumanager/policy_none.go | 2 +- .../kubelet/cm/cpumanager/policy_static.go | 2 +- .../pkg/kubelet/cm/cpumanager/state/BUILD | 14 +- .../cm/cpumanager/state/state_checkpoint.go | 4 +- .../kubelet/cm/cpumanager/state/state_file.go | 278 - .../kubelet/cm/cpumanager/state/state_mem.go | 2 +- .../pkg/kubelet/cm/cpumanager/topology/BUILD | 2 +- .../cm/cpumanager/topology/topology.go | 2 +- .../kubernetes/pkg/kubelet/cm/cpuset/BUILD | 2 +- .../kubernetes/pkg/kubelet/cm/cpuset/OWNERS | 1 - .../pkg/kubelet/cm/cpuset/cpuset.go | 2 +- .../pkg/kubelet/cm/devicemanager/BUILD | 6 +- .../cm/devicemanager/device_plugin_stub.go | 84 +- .../pkg/kubelet/cm/devicemanager/endpoint.go | 19 +- .../pkg/kubelet/cm/devicemanager/manager.go | 153 +- .../kubelet/cm/devicemanager/manager_stub.go | 4 +- .../kubelet/cm/devicemanager/pod_devices.go | 2 +- .../cm/devicemanager/topology_hints.go | 2 +- .../pkg/kubelet/cm/devicemanager/types.go | 4 +- .../pkg/kubelet/cm/helpers_linux.go | 23 +- .../pkg/kubelet/cm/helpers_unsupported.go | 2 +- .../cm/node_container_manager_linux.go | 2 +- .../kubelet/cm/pod_container_manager_linux.go | 12 +- .../kubelet/cm/qos_container_manager_linux.go | 2 +- .../pkg/kubelet/cm/topologymanager/BUILD | 2 +- .../topologymanager/fake_topology_manager.go | 2 +- .../pkg/kubelet/cm/topologymanager/policy.go | 2 +- .../cm/topologymanager/policy_restricted.go | 5 +- .../policy_single_numa_node.go | 5 +- .../cm/topologymanager/topology_manager.go | 2 +- .../kubernetes/pkg/kubelet/config/BUILD | 6 +- .../kubernetes/pkg/kubelet/config/common.go | 6 +- .../kubernetes/pkg/kubelet/config/config.go | 41 +- .../kubernetes/pkg/kubelet/config/file.go | 2 +- .../pkg/kubelet/config/file_linux.go | 2 +- .../pkg/kubelet/config/file_unsupported.go | 2 +- .../kubernetes/pkg/kubelet/config/flags.go | 4 - .../kubernetes/pkg/kubelet/config/http.go | 2 +- .../kubernetes/pkg/kubelet/container/BUILD | 3 +- .../pkg/kubelet/container/container_gc.go | 16 +- .../container/container_reference_manager.go | 60 - .../pkg/kubelet/container/helpers.go | 34 +- .../kubernetes/pkg/kubelet/container/os.go | 18 + .../kubernetes/pkg/kubelet/container/ref.go | 5 +- .../pkg/kubelet/container/resize.go | 2 +- .../pkg/kubelet/container/runtime.go | 89 +- .../pkg/kubelet/container/runtime_cache.go | 1 + .../kubelet/container/runtime_cache_fake.go | 5 +- .../pkg/kubelet/container/sync_result.go | 40 +- .../pkg/kubelet/{ => cri}/remote/BUILD | 13 +- .../pkg/kubelet/{ => cri}/remote/OWNERS | 0 .../pkg/kubelet/{ => cri}/remote/doc.go | 0 .../kubelet/{ => cri}/remote/remote_image.go | 4 +- .../{ => cri}/remote/remote_runtime.go | 71 +- .../pkg/kubelet/cri/remote/util/BUILD | 89 + .../pkg/kubelet/cri/remote/util/util_unix.go | 145 + .../cri/remote/util/util_unsupported.go | 55 + .../kubelet/cri/remote/util/util_windows.go | 149 + .../pkg/kubelet/{ => cri}/remote/utils.go | 0 .../kubelet/{server => cri}/streaming/BUILD | 16 +- .../{server => cri}/streaming/errors.go | 0 .../streaming}/portforward/BUILD | 8 +- .../streaming}/portforward/constants.go | 0 .../streaming}/portforward/httpstream.go | 4 +- .../streaming}/portforward/portforward.go | 0 .../streaming}/portforward/websocket.go | 4 +- .../streaming}/remotecommand/BUILD | 6 +- .../streaming}/remotecommand/attach.go | 0 .../streaming}/remotecommand/doc.go | 2 +- .../streaming}/remotecommand/exec.go | 0 .../streaming}/remotecommand/httpstream.go | 5 +- .../streaming}/remotecommand/websocket.go | 0 .../streaming/request_cache.go | 0 .../{server => cri}/streaming/server.go | 4 +- .../kubernetes/pkg/kubelet/dockershim/BUILD | 16 +- .../pkg/kubelet/dockershim/cm/BUILD | 15 +- .../dockershim/cm/container_manager.go | 2 + .../dockershim/cm/container_manager_linux.go | 37 +- .../cm/container_manager_unsupported.go | 2 +- .../cm/container_manager_windows.go | 2 +- .../pkg/kubelet/dockershim/convert.go | 2 + .../kubernetes/pkg/kubelet/dockershim/doc.go | 2 + .../kubelet/dockershim/docker_checkpoint.go | 6 +- .../kubelet/dockershim/docker_container.go | 4 +- .../docker_container_unsupported.go | 2 +- .../dockershim/docker_container_windows.go | 2 +- .../pkg/kubelet/dockershim/docker_image.go | 4 +- .../kubelet/dockershim/docker_image_linux.go | 4 +- .../dockershim/docker_image_unsupported.go | 2 +- .../dockershim/docker_image_windows.go | 4 +- .../dockershim/docker_legacy_service.go | 26 +- .../pkg/kubelet/dockershim/docker_logs.go | 2 + .../pkg/kubelet/dockershim/docker_sandbox.go | 9 +- .../pkg/kubelet/dockershim/docker_service.go | 9 +- .../pkg/kubelet/dockershim/docker_stats.go | 2 + .../kubelet/dockershim/docker_stats_linux.go | 2 +- .../dockershim/docker_stats_unsupported.go | 2 +- .../dockershim/docker_stats_windows.go | 4 +- .../kubelet/dockershim/docker_streaming.go | 4 +- .../dockershim/docker_streaming_others.go | 4 +- .../dockershim/docker_streaming_windows.go | 2 +- .../dockershim/dockershim_nodocker.go} | 6 +- .../kubernetes/pkg/kubelet/dockershim/exec.go | 4 +- .../pkg/kubelet/dockershim/helpers.go | 16 +- .../pkg/kubelet/dockershim/helpers_linux.go | 16 +- .../kubelet/dockershim/helpers_unsupported.go | 9 +- .../pkg/kubelet/dockershim/helpers_windows.go | 14 +- .../pkg/kubelet/dockershim/libdocker/BUILD | 2 +- .../kubelet/dockershim/libdocker/client.go | 6 +- .../dockershim/libdocker/fake_client.go | 2 + .../kubelet/dockershim/libdocker/helpers.go | 4 +- .../libdocker/instrumented_client.go | 2 + .../libdocker/kube_docker_client.go | 4 +- .../pkg/kubelet/dockershim/metrics/metrics.go | 2 + .../pkg/kubelet/dockershim/naming.go | 2 + .../pkg/kubelet/dockershim/network/BUILD | 2 +- .../pkg/kubelet/dockershim/network/cni/BUILD | 2 +- .../pkg/kubelet/dockershim/network/cni/cni.go | 22 +- .../dockershim/network/cni/cni_others.go | 2 +- .../dockershim/network/cni/cni_windows.go | 17 +- .../kubelet/dockershim/network/hostport/BUILD | 2 +- .../network/hostport/fake_iptables.go | 14 +- .../dockershim/network/hostport/hostport.go | 6 +- .../network/hostport/hostport_manager.go | 14 +- .../network/hostport/hostport_syncer.go | 6 +- .../kubelet/dockershim/network/kubenet/BUILD | 19 +- .../dockershim/network/kubenet/kubenet.go | 2 + .../network/kubenet/kubenet_linux.go | 8 +- .../network/kubenet/kubenet_unsupported.go | 2 +- .../dockershim/network/metrics/metrics.go | 2 + .../pkg/kubelet/dockershim/network/network.go | 2 + .../pkg/kubelet/dockershim/network/plugins.go | 4 +- .../pkg/kubelet/dockershim/remote/BUILD | 2 +- .../dockershim/remote/docker_server.go | 4 +- .../kubelet/dockershim/security_context.go | 2 + .../pkg/kubelet/dockershim/selinux_util.go | 2 + .../kubernetes/pkg/kubelet/eviction/BUILD | 2 +- .../pkg/kubelet/eviction/eviction_manager.go | 7 +- .../pkg/kubelet/eviction/helpers.go | 36 +- .../eviction/memory_threshold_notifier.go | 2 +- .../eviction/threshold_notifier_linux.go | 2 +- .../threshold_notifier_unsupported.go | 2 +- .../kubernetes/pkg/kubelet/images/BUILD | 3 +- .../kubernetes/pkg/kubelet/images/OWNERS | 4 - .../pkg/kubelet/images/image_gc_manager.go | 3 +- .../pkg/kubelet/images/image_manager.go | 24 +- .../k8s.io/kubernetes/pkg/kubelet/kubelet.go | 299 +- .../pkg/kubelet/kubelet_dockershim.go | 83 + .../kubelet/kubelet_dockershim_nodocker.go | 36 + .../kubernetes/pkg/kubelet/kubelet_getters.go | 45 +- .../kubernetes/pkg/kubelet/kubelet_network.go | 2 +- .../pkg/kubelet/kubelet_network_linux.go | 7 +- .../pkg/kubelet/kubelet_node_status.go | 72 +- .../kubernetes/pkg/kubelet/kubelet_pods.go | 181 +- .../pkg/kubelet/kubelet_resources.go | 2 +- .../kubernetes/pkg/kubelet/kubelet_volumes.go | 2 +- .../pkg/kubelet/kubeletconfig/BUILD | 2 +- .../pkg/kubelet/kubeletconfig/configsync.go | 2 +- .../kubelet/kubeletconfig/util/codec/BUILD | 2 +- .../kubelet/kubeletconfig/util/codec/codec.go | 2 +- .../pkg/kubelet/kubeletconfig/util/log/BUILD | 2 +- .../pkg/kubelet/kubeletconfig/util/log/log.go | 2 +- .../kubernetes/pkg/kubelet/kuberuntime/BUILD | 9 +- .../pkg/kubelet/kuberuntime/convert.go | 62 + .../kuberuntime/fake_kuberuntime_manager.go | 37 +- .../pkg/kubelet/kuberuntime/helpers.go | 72 +- .../kuberuntime/kuberuntime_container.go | 60 +- .../kuberuntime_container_linux.go | 2 +- .../kuberuntime_container_windows.go | 7 +- .../pkg/kubelet/kuberuntime/kuberuntime_gc.go | 50 +- .../kubelet/kuberuntime/kuberuntime_image.go | 10 +- .../kuberuntime/kuberuntime_manager.go | 33 +- .../kuberuntime/kuberuntime_sandbox.go | 20 +- .../pkg/kubelet/kuberuntime/labels.go | 2 +- .../pkg/kubelet/kuberuntime/legacy.go | 20 + .../pkg/kubelet/kuberuntime/logs/BUILD | 3 +- .../pkg/kubelet/kuberuntime/logs/logs.go | 18 +- .../kubelet/kuberuntime/security_context.go | 4 +- .../kubernetes/pkg/kubelet/legacy/BUILD | 27 + .../kubernetes/pkg/kubelet/legacy/logs.go | 53 + .../kubernetes/pkg/kubelet/lifecycle/BUILD | 6 +- .../admission_failure_handler_stub.go | 2 + .../kubernetes/pkg/kubelet/lifecycle/doc.go | 4 +- .../pkg/kubelet/lifecycle/handlers.go | 25 +- .../pkg/kubelet/lifecycle/predicate.go | 27 +- .../k8s.io/kubernetes/pkg/kubelet/logs/BUILD | 4 +- .../pkg/kubelet/logs/container_log_manager.go | 59 +- .../logs/container_log_manager_stub.go | 4 + .../kubernetes/pkg/kubelet/metrics/BUILD | 2 +- .../pkg/kubelet/metrics/collectors/BUILD | 2 +- .../kubelet/metrics/collectors/log_metrics.go | 2 +- .../metrics/collectors/resource_metrics.go | 2 +- .../kubernetes/pkg/kubelet/metrics/metrics.go | 6 +- .../kubernetes/pkg/kubelet/network/dns/BUILD | 2 +- .../kubernetes/pkg/kubelet/network/dns/dns.go | 2 +- .../kubernetes/pkg/kubelet/nodelease/BUILD | 2 +- .../pkg/kubelet/nodelease/controller.go | 2 +- .../kubernetes/pkg/kubelet/nodestatus/BUILD | 4 +- .../pkg/kubelet/nodestatus/setters.go | 26 +- .../k8s.io/kubernetes/pkg/kubelet/oom/BUILD | 13 +- .../pkg/kubelet/oom/oom_watcher_linux.go | 4 +- .../k8s.io/kubernetes/pkg/kubelet/pleg/BUILD | 2 +- .../kubernetes/pkg/kubelet/pleg/generic.go | 22 +- .../pkg/kubelet/pluginmanager/BUILD | 2 +- .../pkg/kubelet/pluginmanager/cache/BUILD | 2 +- .../cache/actual_state_of_world.go | 2 +- .../cache/desired_state_of_world.go | 2 +- .../pluginmanager/operationexecutor/BUILD | 2 +- .../operationexecutor/operation_generator.go | 2 +- .../kubelet/pluginmanager/plugin_manager.go | 2 +- .../kubelet/pluginmanager/pluginwatcher/BUILD | 4 +- .../pluginwatcher/example_handler.go | 2 +- .../pluginwatcher/example_plugin.go | 2 +- .../pluginwatcher/plugin_watcher.go | 27 +- .../kubelet/pluginmanager/reconciler/BUILD | 2 +- .../pluginmanager/reconciler/reconciler.go | 2 +- .../k8s.io/kubernetes/pkg/kubelet/pod/BUILD | 4 +- .../pkg/kubelet/pod/mirror_client.go | 2 +- .../kubernetes/pkg/kubelet/pod/pod_manager.go | 37 +- .../pkg/kubelet/pod_container_deletor.go | 10 +- .../kubernetes/pkg/kubelet/pod_workers.go | 2 +- .../kubernetes/pkg/kubelet/preemption/BUILD | 2 +- .../kubernetes/pkg/kubelet/preemption/OWNERS | 4 - .../pkg/kubelet/preemption/preemption.go | 2 +- .../kubernetes/pkg/kubelet/prober/BUILD | 4 +- .../pkg/kubelet/{eviction => prober}/OWNERS | 3 +- .../kubernetes/pkg/kubelet/prober/prober.go | 37 +- .../pkg/kubelet/prober/prober_manager.go | 7 +- .../kubernetes/pkg/kubelet/prober/worker.go | 2 +- .../k8s.io/kubernetes/pkg/kubelet/qos/doc.go | 4 +- .../k8s.io/kubernetes/pkg/kubelet/runonce.go | 2 +- .../k8s.io/kubernetes/pkg/kubelet/runtime.go | 4 +- .../kubernetes/pkg/kubelet/server/BUILD | 25 +- .../pkg/kubelet/{metrics => server}/OWNERS | 3 +- .../kubernetes/pkg/kubelet/server/auth.go | 2 +- .../kubernetes/pkg/kubelet/server/server.go | 127 +- .../kubernetes/pkg/kubelet/server/stats/BUILD | 17 +- .../server/stats/fs_resource_analyzer.go | 2 +- .../pkg/kubelet/server/stats/handler.go | 14 +- .../stats/prometheus_resource_metrics.go | 99 +- .../pkg/kubelet/server/stats/summary.go | 2 +- .../server/stats/summary_sys_containers.go | 2 +- .../server/stats/volume_stat_calculator.go | 2 +- .../k8s.io/kubernetes/pkg/kubelet/stats/BUILD | 2 +- .../kubelet/stats/cadvisor_stats_provider.go | 17 +- .../pkg/kubelet/stats/cri_stats_provider.go | 22 +- .../stats/cri_stats_provider_windows.go | 2 +- .../kubernetes/pkg/kubelet/stats/helper.go | 13 +- .../pkg/kubelet/stats/pidlimit/BUILD | 9 + .../pkg/kubelet/stats/stats_provider.go | 2 +- .../kubernetes/pkg/kubelet/status/BUILD | 2 +- .../pkg/kubelet/status/status_manager.go | 8 +- .../pkg/kubelet/sysctl/namespace.go | 20 +- .../pkg/kubelet/sysctl/whitelist.go | 12 +- .../kubernetes/pkg/kubelet/time_cache.go | 67 + .../k8s.io/kubernetes/pkg/kubelet/token/BUILD | 2 +- .../pkg/kubelet/token/token_manager.go | 6 +- .../pkg/kubelet/types/pod_update.go | 2 - .../kubernetes/pkg/kubelet/types/types.go | 11 + .../k8s.io/kubernetes/pkg/kubelet/util/BUILD | 22 +- .../kubernetes/pkg/kubelet/util/format/pod.go | 6 + .../kubernetes/pkg/kubelet/util/manager/BUILD | 2 +- .../util/manager/watch_based_manager.go | 2 +- .../kubernetes/pkg/kubelet/util/util.go | 18 + .../kubernetes/pkg/kubelet/util/util_unix.go | 4 +- .../kubernetes/pkg/kubelet/volume_host.go | 2 +- .../pkg/kubelet/volumemanager/BUILD | 2 +- .../pkg/kubelet/volumemanager/cache/BUILD | 3 +- .../cache/actual_state_of_world.go | 18 +- .../cache/desired_state_of_world.go | 2 +- .../pkg/kubelet/volumemanager/populator/BUILD | 2 +- .../desired_state_of_world_populator.go | 43 +- .../kubelet/volumemanager/reconciler/BUILD | 4 +- .../volumemanager/reconciler/reconciler.go | 2 +- .../kubelet/volumemanager/volume_manager.go | 2 +- .../kubernetes/pkg/kubelet/winstats/BUILD | 2 +- .../pkg/kubelet/winstats/network_stats.go | 2 +- .../kubelet/winstats/perfcounter_nodestats.go | 2 +- vendor/k8s.io/kubernetes/pkg/master/BUILD | 8 +- vendor/k8s.io/kubernetes/pkg/master/OWNERS | 1 - .../kubernetes/pkg/master/controller.go | 2 +- .../clusterauthenticationtrust/BUILD | 2 +- ...cluster_authentication_trust_controller.go | 2 +- .../master/controller/crdregistration/BUILD | 2 +- .../crdregistration_controller.go | 2 +- .../pkg/master/import_known_versions.go | 1 - vendor/k8s.io/kubernetes/pkg/master/master.go | 14 +- .../k8s.io/kubernetes/pkg/master/ports/BUILD | 3 + .../kubernetes/pkg/master/ports/ports.go | 18 +- .../kubernetes/pkg/master/reconcilers/BUILD | 2 +- .../master/reconcilers/endpointsadapter.go | 14 + .../pkg/master/reconcilers/lease.go | 15 +- .../pkg/master/reconcilers/mastercount.go | 10 +- .../k8s.io/kubernetes/pkg/master/services.go | 2 +- .../kubernetes/pkg/master/tunneler/BUILD | 2 +- .../kubernetes/pkg/master/tunneler/ssh.go | 2 +- .../pkg/printers/internalversion/BUILD | 3 + .../pkg/printers/internalversion/printers.go | 149 +- vendor/k8s.io/kubernetes/pkg/probe/exec/BUILD | 2 +- .../k8s.io/kubernetes/pkg/probe/exec/exec.go | 2 +- vendor/k8s.io/kubernetes/pkg/probe/http/BUILD | 2 +- .../k8s.io/kubernetes/pkg/probe/http/http.go | 2 +- vendor/k8s.io/kubernetes/pkg/probe/tcp/BUILD | 2 +- vendor/k8s.io/kubernetes/pkg/probe/tcp/tcp.go | 2 +- vendor/k8s.io/kubernetes/pkg/proxy/BUILD | 2 +- .../kubernetes/pkg/proxy/apis/config/types.go | 2 + .../proxy/apis/config/v1alpha1/defaults.go | 3 + .../v1alpha1/zz_generated.conversion.go | 2 + .../k8s.io/kubernetes/pkg/proxy/config/BUILD | 2 +- .../kubernetes/pkg/proxy/config/config.go | 6 +- .../k8s.io/kubernetes/pkg/proxy/endpoints.go | 32 +- .../pkg/proxy/endpointslicecache.go | 2 +- .../kubernetes/pkg/proxy/healthcheck/BUILD | 3 +- .../pkg/proxy/healthcheck/proxier_health.go | 45 +- .../pkg/proxy/healthcheck/service_health.go | 2 +- .../kubernetes/pkg/proxy/iptables/BUILD | 4 +- .../kubernetes/pkg/proxy/iptables/proxier.go | 127 +- vendor/k8s.io/kubernetes/pkg/proxy/ipvs/BUILD | 2 +- .../kubernetes/pkg/proxy/ipvs/README.md | 8 +- .../pkg/proxy/ipvs/graceful_termination.go | 7 +- .../k8s.io/kubernetes/pkg/proxy/ipvs/ipset.go | 2 +- .../pkg/proxy/ipvs/netlink_linux.go | 2 +- .../kubernetes/pkg/proxy/ipvs/proxier.go | 158 +- .../kubernetes/pkg/proxy/metaproxier/BUILD | 3 +- .../pkg/proxy/metaproxier/meta_proxier.go | 35 +- .../kubernetes/pkg/proxy/metrics/metrics.go | 13 + vendor/k8s.io/kubernetes/pkg/proxy/service.go | 33 +- vendor/k8s.io/kubernetes/pkg/proxy/types.go | 9 +- .../kubernetes/pkg/proxy/userspace/BUILD | 11 +- .../kubernetes/pkg/proxy/userspace/proxier.go | 35 +- .../pkg/proxy/userspace/proxysocket.go | 2 +- .../pkg/proxy/userspace/roundrobin.go | 2 +- vendor/k8s.io/kubernetes/pkg/proxy/util/BUILD | 4 +- .../kubernetes/pkg/proxy/util/endpoints.go | 2 +- .../kubernetes/pkg/proxy/util/iptables/BUILD | 2 +- .../pkg/proxy/util/iptables/traffic.go | 6 +- .../k8s.io/kubernetes/pkg/proxy/util/port.go | 2 +- .../k8s.io/kubernetes/pkg/proxy/util/utils.go | 39 +- .../kubernetes/pkg/proxy/winkernel/BUILD | 13 +- .../kubernetes/pkg/proxy/winkernel/hnsV1.go | 2 +- .../kubernetes/pkg/proxy/winkernel/hnsV2.go | 58 +- .../kubernetes/pkg/proxy/winkernel/proxier.go | 919 +- .../kubernetes/pkg/proxy/winuserspace/BUILD | 2 +- .../pkg/proxy/winuserspace/proxier.go | 26 +- .../pkg/proxy/winuserspace/proxysocket.go | 2 +- .../pkg/proxy/winuserspace/roundrobin.go | 2 +- .../kubernetes/pkg/quota/v1/generic/OWNERS | 1 - .../pkg/quota/v1/install/registry.go | 10 + .../apps/deployment/storage/storage.go | 105 +- .../apps/replicaset/storage/storage.go | 105 +- .../pkg/registry/apps/rest/storage_apps.go | 17 +- .../registry/apps/statefulset/storage/BUILD | 1 + .../apps/statefulset/storage/storage.go | 104 +- .../auditregistration/auditsink/BUILD | 36 - .../auditregistration/auditsink/storage/BUILD | 29 - .../auditsink/storage/storage.go | 51 - .../auditregistration/auditsink/strategy.go | 89 - .../pkg/registry/auditregistration/rest/BUILD | 31 - .../rest/storage_auditregistration.go | 57 - .../registry/authentication/tokenreview/BUILD | 2 +- .../authentication/tokenreview/storage.go | 2 +- .../kubernetes/pkg/registry/cachesize/BUILD | 26 - .../kubernetes/pkg/registry/cachesize/OWNERS | 9 - .../pkg/registry/cachesize/cachesize.go | 54 - .../registry/certificates/certificates/BUILD | 3 + .../certificates/storage/storage.go | 7 + .../certificates/certificates/strategy.go | 108 +- .../pkg/registry/certificates/rest/BUILD | 1 + .../certificates/rest/storage_certificates.go | 29 +- .../kubernetes/pkg/registry/core/event/BUILD | 2 + .../pkg/registry/core/event/strategy.go | 24 +- .../core/limitrange/storage/storage.go | 3 + .../core/namespace/storage/storage.go | 4 + .../pkg/registry/core/node/strategy.go | 25 +- .../kubernetes/pkg/registry/core/pod/BUILD | 3 + .../pkg/registry/core/pod/storage/BUILD | 3 + .../pkg/registry/core/pod/storage/eviction.go | 101 +- .../pkg/registry/core/pod/strategy.go | 82 +- .../replicationcontroller/storage/storage.go | 91 +- .../kubernetes/pkg/registry/core/rest/BUILD | 4 +- .../pkg/registry/core/rest/storage_core.go | 25 +- .../pkg/registry/core/service/BUILD | 1 + .../core/service/allocator/storage/BUILD | 1 + .../core/service/allocator/storage/storage.go | 56 +- .../registry/core/service/allocator/utils.go | 43 +- .../registry/core/service/ipallocator/BUILD | 1 + .../core/service/ipallocator/allocator.go | 75 +- .../registry/core/service/portallocator/BUILD | 3 +- .../core/service/portallocator/allocator.go | 2 +- .../service/portallocator/controller/BUILD | 1 + .../portallocator/controller/repair.go | 37 +- .../pkg/registry/core/service/storage/BUILD | 3 +- .../pkg/registry/core/service/storage/rest.go | 90 +- .../registry/core/service/storage/storage.go | 16 +- .../pkg/registry/core/service/strategy.go | 90 +- .../core/serviceaccount/storage/storage.go | 3 +- .../core/serviceaccount/storage/token.go | 20 +- .../kubernetes/pkg/registry/events/rest/BUILD | 1 + .../registry/events/rest/storage_events.go | 20 + .../pkg/registry/flowcontrol/rest/BUILD | 2 +- .../flowcontrol/rest/storage_flowcontrol.go | 4 +- .../pkg/registry/networking/ingress/BUILD | 1 - .../networking/rest/storage_settings.go | 15 + .../registry/rbac/clusterrole/storage/BUILD | 1 + .../rbac/clusterrole/storage/storage.go | 4 + .../kubernetes/pkg/registry/rbac/rest/BUILD | 2 +- .../pkg/registry/rbac/rest/storage_rbac.go | 2 +- .../pkg/registry/rbac/role/storage/BUILD | 1 + .../pkg/registry/rbac/role/storage/storage.go | 4 + .../pkg/registry/rbac/validation/BUILD | 2 +- .../pkg/registry/rbac/validation/rule.go | 2 +- .../pkg/registry/scheduling/rest/BUILD | 2 +- .../scheduling/rest/storage_scheduling.go | 2 +- .../registry/settings/podpreset/storage/BUILD | 1 + .../settings/podpreset/storage/storage.go | 4 + .../registry/storage/csidriver/strategy.go | 22 +- .../registry/storage/csistoragecapacity/BUILD | 53 + .../storage/csistoragecapacity/doc.go | 19 + .../storage/csistoragecapacity/storage/BUILD | 49 + .../csistoragecapacity/storage/storage.go | 59 + .../storage/csistoragecapacity/strategy.go | 78 + .../pkg/registry/storage/rest/BUILD | 1 + .../registry/storage/rest/storage_storage.go | 10 + vendor/k8s.io/kubernetes/pkg/routes/BUILD | 2 +- .../kubernetes/pkg/routes/openidmetadata.go | 2 +- vendor/k8s.io/kubernetes/pkg/scheduler/BUILD | 22 +- .../pkg/scheduler/algorithmprovider/BUILD | 9 +- .../scheduler/algorithmprovider/registry.go | 52 +- .../pkg/scheduler/apis/config/BUILD | 5 +- .../pkg/scheduler/apis/config/legacy_types.go | 99 - .../pkg/scheduler/apis/config/register.go | 9 + .../pkg/scheduler/apis/config/scheme/BUILD | 21 +- .../scheduler/apis/config/scheme/scheme.go | 8 +- .../pkg/scheduler/apis/config/types.go | 125 +- .../scheduler/apis/config/types_pluginargs.go | 160 + .../pkg/scheduler/apis/config/v1/BUILD | 15 +- .../scheduler/apis/config/v1/conversion.go | 95 + .../apis/config/v1/zz_generated.conversion.go | 87 +- .../pkg/scheduler/apis/config/v1alpha1/BUILD | 63 - .../apis/config/v1alpha1/conversion.go | 146 - .../apis/config/v1alpha1/defaults.go | 166 - .../pkg/scheduler/apis/config/v1alpha1/doc.go | 24 - .../v1alpha1/zz_generated.conversion.go | 624 - .../apis/config/v1alpha2/conversion.go | 36 - .../v1alpha2/zz_generated.conversion.go | 600 - .../apis/config/{v1alpha2 => v1beta1}/BUILD | 17 +- .../apis/config/v1beta1/conversion.go | 109 + .../config/{v1alpha2 => v1beta1}/defaults.go | 97 +- .../apis/config/{v1alpha2 => v1beta1}/doc.go | 6 +- .../config/{v1alpha2 => v1beta1}/register.go | 10 +- .../config/v1beta1/zz_generated.conversion.go | 985 + .../zz_generated.deepcopy.go | 2 +- .../config/v1beta1/zz_generated.defaults.go | 76 + .../scheduler/apis/config/validation/BUILD | 12 +- .../apis/config/validation/validation.go | 11 +- .../validation/validation_pluginargs.go | 214 + .../apis/config/zz_generated.deepcopy.go | 325 +- .../kubernetes/pkg/scheduler/core/BUILD | 32 +- .../kubernetes/pkg/scheduler/core/extender.go | 123 +- .../pkg/scheduler/core/generic_scheduler.go | 691 +- .../kubernetes/pkg/scheduler/eventhandlers.go | 15 +- .../kubernetes/pkg/scheduler/factory.go | 192 +- .../pkg/scheduler/framework/plugins/BUILD | 13 +- .../framework/plugins/defaultbinder/BUILD | 4 +- .../plugins/defaultbinder/default_binder.go | 6 +- .../framework/plugins/defaultpreemption/BUILD | 82 + .../plugins/defaultpreemption/candidate.go | 45 + .../defaultpreemption/default_preemption.go | 709 + .../framework/plugins/imagelocality/BUILD | 4 +- .../plugins/imagelocality/image_locality.go | 26 +- .../framework/plugins/interpodaffinity/BUILD | 18 +- .../plugins/interpodaffinity/filtering.go | 400 +- .../plugins/interpodaffinity/plugin.go | 69 +- .../plugins/interpodaffinity/scoring.go | 214 +- .../framework/plugins/legacy_registry.go | 147 +- .../framework/plugins/nodeaffinity/BUILD | 3 +- .../plugins/nodeaffinity/node_affinity.go | 5 +- .../framework/plugins/nodelabel/BUILD | 7 +- .../framework/plugins/nodelabel/node_label.go | 64 +- .../framework/plugins/nodename/BUILD | 2 - .../framework/plugins/nodename/node_name.go | 7 +- .../framework/plugins/nodeports/BUILD | 2 - .../framework/plugins/nodeports/node_ports.go | 12 +- .../plugins/nodepreferavoidpods/BUILD | 1 + .../node_prefer_avoid_pods.go | 2 +- .../framework/plugins/noderesources/BUILD | 12 +- .../noderesources/balanced_allocation.go | 17 +- .../framework/plugins/noderesources/fit.go | 140 +- .../plugins/noderesources/least_allocated.go | 46 +- .../plugins/noderesources/most_allocated.go | 53 +- .../requested_to_capacity_ratio.go | 81 +- .../noderesources/resource_allocation.go | 21 +- .../plugins/noderesources/resource_limits.go | 161 - .../framework/plugins/nodeunschedulable/BUILD | 2 - .../nodeunschedulable/node_unschedulable.go | 5 +- .../framework/plugins/nodevolumelimits/BUILD | 6 +- .../framework/plugins/nodevolumelimits/csi.go | 22 +- .../plugins/nodevolumelimits/non_csi.go | 23 +- .../plugins/nodevolumelimits/utils.go | 15 +- .../framework/plugins/podtopologyspread/BUILD | 14 +- .../plugins/podtopologyspread/common.go | 17 +- .../plugins/podtopologyspread/filtering.go | 107 +- .../plugins/podtopologyspread/plugin.go | 115 +- .../plugins/podtopologyspread/scoring.go | 140 +- .../plugins/queuesort/priority_sort.go | 6 +- .../scheduler/framework/plugins/registry.go | 13 +- .../BUILD | 13 +- .../selector_spread.go} | 65 +- .../framework/plugins/serviceaffinity/BUILD | 7 +- .../serviceaffinity/service_affinity.go | 88 +- .../framework/plugins/tainttoleration/BUILD | 3 +- .../tainttoleration/taint_toleration.go | 12 +- .../framework/plugins/volumebinding/BUILD | 14 +- .../framework/plugins/volumebinding/OWNERS | 6 + .../plugins/volumebinding/volume_binding.go | 213 +- .../plugins/volumerestrictions/BUILD | 2 - .../volumerestrictions/volume_restrictions.go | 24 +- .../framework/plugins/volumezone/BUILD | 7 +- .../plugins/volumezone/volume_zone.go | 19 +- .../pkg/scheduler/framework/runtime/BUILD | 67 + .../{v1alpha1 => runtime}/framework.go | 447 +- .../{v1alpha1 => runtime}/metrics_recorder.go | 5 +- .../{v1alpha1 => runtime}/registry.go | 16 +- .../{v1alpha1 => runtime}/waiting_pods_map.go | 15 +- .../pkg/scheduler/framework/v1alpha1/BUILD | 41 +- .../scheduler/framework/v1alpha1/extender.go | 70 + .../scheduler/framework/v1alpha1/interface.go | 167 +- .../scheduler/framework/v1alpha1/listers.go | 32 + .../v1alpha1/types.go} | 612 +- .../pkg/scheduler/internal/cache/BUILD | 8 +- .../pkg/scheduler/internal/cache/cache.go | 141 +- .../scheduler/internal/cache/debugger/BUILD | 6 +- .../internal/cache/debugger/comparer.go | 12 +- .../internal/cache/debugger/dumper.go | 20 +- .../pkg/scheduler/internal/cache/interface.go | 10 +- .../pkg/scheduler/internal/cache/node_tree.go | 2 +- .../pkg/scheduler/internal/cache/snapshot.go | 77 +- .../pkg/scheduler/internal/parallelize/BUILD | 32 + .../parallelize}/error_channel.go | 2 +- .../internal/parallelize/parallelism.go | 43 + .../pkg/scheduler/internal/queue/BUILD | 2 +- .../internal/queue/scheduling_queue.go | 220 +- .../pkg/scheduler/listers/listers.go | 76 - .../kubernetes/pkg/scheduler/metrics/BUILD | 1 + .../pkg/scheduler/metrics/metrics.go | 54 +- .../pkg/scheduler/metrics/profile_metrics.go | 48 + .../kubernetes/pkg/scheduler/nodeinfo/BUILD | 49 - .../pkg/scheduler/nodeinfo/host_ports.go | 135 - .../kubernetes/pkg/scheduler/profile/BUILD | 4 +- .../pkg/scheduler/profile/profile.go | 28 +- .../kubernetes/pkg/scheduler/scheduler.go | 395 +- .../kubernetes/pkg/scheduler/util/BUILD | 11 +- .../kubernetes/pkg/scheduler/util/utils.go | 80 +- .../pkg/security/apparmor/helpers.go | 28 +- .../pkg/security/apparmor/validate.go | 12 +- .../pkg/security/podsecuritypolicy/BUILD | 2 + .../security/podsecuritypolicy/apparmor/BUILD | 3 +- .../podsecuritypolicy/apparmor/strategy.go | 13 +- .../security/podsecuritypolicy/provider.go | 19 +- .../security/podsecuritypolicy/seccomp/BUILD | 2 + .../podsecuritypolicy/seccomp/strategy.go | 19 + .../pkg/security/podsecuritypolicy/util/BUILD | 1 + .../security/podsecuritypolicy/util/util.go | 28 + .../kubernetes/pkg/securitycontext/BUILD | 1 + .../kubernetes/pkg/securitycontext/util.go | 21 +- .../kubernetes/pkg/serviceaccount/BUILD | 8 +- .../kubernetes/pkg/serviceaccount/claims.go | 54 +- .../kubernetes/pkg/serviceaccount/jwt.go | 7 +- .../kubernetes/pkg/serviceaccount/legacy.go | 5 +- .../kubernetes/pkg/serviceaccount/metrics.go | 69 + vendor/k8s.io/kubernetes/pkg/ssh/BUILD | 4 +- vendor/k8s.io/kubernetes/pkg/ssh/ssh.go | 4 +- vendor/k8s.io/kubernetes/pkg/util/async/BUILD | 2 +- .../util/async/bounded_frequency_runner.go | 2 +- .../kubernetes/pkg/util/bandwidth/BUILD | 4 +- .../kubernetes/pkg/util/bandwidth/linux.go | 2 +- .../pkg/util/conntrack/conntrack.go | 11 +- .../kubernetes/pkg/util/ebtables/ebtables.go | 25 + vendor/k8s.io/kubernetes/pkg/util/flag/BUILD | 2 +- .../k8s.io/kubernetes/pkg/util/flag/flags.go | 12 +- .../kubernetes/pkg/util/goroutinemap/BUILD | 2 +- .../pkg/util/goroutinemap/goroutinemap.go | 2 +- .../k8s.io/kubernetes/pkg/util/ipconfig/BUILD | 2 +- .../kubernetes/pkg/util/ipconfig/ipconfig.go | 2 +- vendor/k8s.io/kubernetes/pkg/util/ipset/BUILD | 2 +- .../k8s.io/kubernetes/pkg/util/ipset/ipset.go | 2 +- .../k8s.io/kubernetes/pkg/util/iptables/BUILD | 2 +- .../kubernetes/pkg/util/iptables/OWNERS | 4 +- .../kubernetes/pkg/util/iptables/iptables.go | 37 +- vendor/k8s.io/kubernetes/pkg/util/ipvs/BUILD | 23 +- .../k8s.io/kubernetes/pkg/util/ipvs/ipvs.go | 6 + .../kubernetes/pkg/util/ipvs/ipvs_linux.go | 41 +- vendor/k8s.io/kubernetes/pkg/util/netsh/BUILD | 2 +- .../k8s.io/kubernetes/pkg/util/netsh/netsh.go | 2 +- vendor/k8s.io/kubernetes/pkg/util/node/BUILD | 2 +- .../k8s.io/kubernetes/pkg/util/node/node.go | 2 +- vendor/k8s.io/kubernetes/pkg/util/oom/BUILD | 4 +- .../kubernetes/pkg/util/oom/oom_linux.go | 2 +- .../kubernetes/pkg/util/parsers/parsers.go | 7 +- .../k8s.io/kubernetes/pkg/util/procfs/BUILD | 4 +- .../pkg/util/procfs/procfs_linux.go | 2 +- .../k8s.io/kubernetes/pkg/util/resizefs/BUILD | 13 +- .../pkg/util/resizefs/resizefs_linux.go | 2 +- .../pkg/util/rlimit/rlimit_linux.go | 5 +- .../pkg/util/rlimit/rlimit_unsupported.go | 3 +- .../kubernetes/pkg/util/tolerations/BUILD | 2 +- .../pkg/util/tolerations/tolerations.go | 2 +- vendor/k8s.io/kubernetes/pkg/volume/BUILD | 2 +- vendor/k8s.io/kubernetes/pkg/volume/OWNERS | 17 +- .../k8s.io/kubernetes/pkg/volume/awsebs/BUILD | 4 +- .../kubernetes/pkg/volume/awsebs/attacher.go | 2 +- .../kubernetes/pkg/volume/awsebs/aws_ebs.go | 2 +- .../pkg/volume/awsebs/aws_ebs_block.go | 2 +- .../kubernetes/pkg/volume/awsebs/aws_util.go | 2 +- .../kubernetes/pkg/volume/azure_dd/BUILD | 15 +- .../pkg/volume/azure_dd/attacher.go | 14 +- .../pkg/volume/azure_dd/azure_common.go | 21 +- .../pkg/volume/azure_dd/azure_common_linux.go | 20 +- .../volume/azure_dd/azure_common_windows.go | 4 +- .../pkg/volume/azure_dd/azure_dd.go | 6 +- .../pkg/volume/azure_dd/azure_dd_block.go | 2 +- .../azure_dd/azure_dd_max_disk_count.go | 40 + .../pkg/volume/azure_dd/azure_mounter.go | 2 +- .../pkg/volume/azure_dd/azure_provision.go | 64 +- .../kubernetes/pkg/volume/azure_file/BUILD | 3 +- .../pkg/volume/azure_file/azure_file.go | 17 +- .../pkg/volume/azure_file/azure_provision.go | 86 +- .../k8s.io/kubernetes/pkg/volume/cinder/BUILD | 4 +- .../kubernetes/pkg/volume/cinder/attacher.go | 2 +- .../kubernetes/pkg/volume/cinder/cinder.go | 6 +- .../pkg/volume/cinder/cinder_block.go | 2 +- .../pkg/volume/cinder/cinder_util.go | 2 +- .../kubernetes/pkg/volume/configmap/BUILD | 2 +- .../pkg/volume/configmap/configmap.go | 2 +- vendor/k8s.io/kubernetes/pkg/volume/csi/BUILD | 4 +- .../kubernetes/pkg/volume/csi/csi_attacher.go | 2 +- .../kubernetes/pkg/volume/csi/csi_block.go | 35 +- .../kubernetes/pkg/volume/csi/csi_client.go | 76 +- .../kubernetes/pkg/volume/csi/csi_mounter.go | 83 +- .../kubernetes/pkg/volume/csi/csi_plugin.go | 51 +- .../kubernetes/pkg/volume/csi/csi_util.go | 7 +- .../kubernetes/pkg/volume/csi/expander.go | 56 +- .../pkg/volume/csi/nodeinfomanager/BUILD | 2 +- .../csi/nodeinfomanager/nodeinfomanager.go | 2 +- .../pkg/volume/csimigration/plugin_manager.go | 4 + .../kubernetes/pkg/volume/downwardapi/BUILD | 2 +- .../pkg/volume/downwardapi/downwardapi.go | 2 +- .../kubernetes/pkg/volume/emptydir/BUILD | 2 +- .../pkg/volume/emptydir/empty_dir.go | 2 +- .../pkg/volume/emptydir/empty_dir_linux.go | 8 +- .../kubernetes/pkg/volume/flexvolume/BUILD | 2 +- .../volume/flexvolume/attacher-defaults.go | 2 +- .../pkg/volume/flexvolume/attacher.go | 2 +- .../volume/flexvolume/detacher-defaults.go | 2 +- .../pkg/volume/flexvolume/detacher.go | 2 +- .../pkg/volume/flexvolume/driver-call.go | 2 +- .../volume/flexvolume/expander-defaults.go | 2 +- .../pkg/volume/flexvolume/mounter-defaults.go | 2 +- .../pkg/volume/flexvolume/plugin-defaults.go | 2 +- .../pkg/volume/flexvolume/plugin.go | 7 +- .../kubernetes/pkg/volume/flexvolume/probe.go | 4 +- .../volume/flexvolume/unmounter-defaults.go | 2 +- .../pkg/volume/flexvolume/unmounter.go | 2 +- .../kubernetes/pkg/volume/flexvolume/util.go | 2 +- .../k8s.io/kubernetes/pkg/volume/gcepd/BUILD | 4 +- .../kubernetes/pkg/volume/gcepd/attacher.go | 2 +- .../kubernetes/pkg/volume/gcepd/gce_pd.go | 2 +- .../pkg/volume/gcepd/gce_pd_block.go | 2 +- .../kubernetes/pkg/volume/gcepd/gce_util.go | 11 +- .../pkg/volume/hostpath/host_path.go | 6 +- .../k8s.io/kubernetes/pkg/volume/iscsi/BUILD | 3 +- .../kubernetes/pkg/volume/iscsi/attacher.go | 2 +- .../pkg/volume/iscsi/disk_manager.go | 2 +- .../kubernetes/pkg/volume/iscsi/iscsi.go | 4 +- .../kubernetes/pkg/volume/iscsi/iscsi_util.go | 95 +- .../k8s.io/kubernetes/pkg/volume/local/BUILD | 2 +- .../kubernetes/pkg/volume/local/local.go | 14 +- vendor/k8s.io/kubernetes/pkg/volume/nfs/BUILD | 2 +- .../k8s.io/kubernetes/pkg/volume/nfs/nfs.go | 2 +- .../k8s.io/kubernetes/pkg/volume/plugins.go | 7 +- .../kubernetes/pkg/volume/projected/BUILD | 5 +- .../pkg/volume/projected/projected.go | 18 +- .../k8s.io/kubernetes/pkg/volume/secret/BUILD | 2 +- .../kubernetes/pkg/volume/secret/secret.go | 2 +- .../k8s.io/kubernetes/pkg/volume/util/BUILD | 4 +- .../pkg/volume/util/atomic_writer.go | 27 +- .../pkg/volume/util/device_util_linux.go | 2 +- .../kubernetes/pkg/volume/util/fs/BUILD | 9 + .../kubernetes/pkg/volume/util/fs/fs.go | 2 +- .../kubernetes/pkg/volume/util/fsquota/BUILD | 4 +- .../pkg/volume/util/fsquota/common/BUILD | 4 +- .../util/fsquota/common/quota_linux_common.go | 5 - .../fsquota/common/quota_linux_common_impl.go | 2 +- .../pkg/volume/util/fsquota/project.go | 2 +- .../pkg/volume/util/fsquota/quota_linux.go | 5 +- .../kubernetes/pkg/volume/util/hostutil/BUILD | 6 +- .../volume/util/hostutil/hostutil_linux.go | 7 +- .../volume/util/hostutil/hostutil_windows.go | 2 +- .../pkg/volume/util/nested_volumes.go | 4 +- .../volume/util/nestedpendingoperations/BUILD | 2 +- .../nestedpendingoperations.go | 2 +- .../pkg/volume/util/operationexecutor/BUILD | 2 +- .../operationexecutor/operation_executor.go | 6 +- .../operationexecutor/operation_generator.go | 127 +- .../pkg/volume/util/recyclerclient/BUILD | 2 +- .../util/recyclerclient/recycler_client.go | 2 +- .../kubernetes/pkg/volume/util/subpath/BUILD | 24 +- .../pkg/volume/util/subpath/subpath_linux.go | 23 +- .../volume/util/subpath/subpath_windows.go | 107 +- .../kubernetes/pkg/volume/util/types/types.go | 22 + .../k8s.io/kubernetes/pkg/volume/util/util.go | 26 +- .../pkg/volume/util/volumepathhandler/BUILD | 2 +- .../volumepathhandler/volume_path_handler.go | 2 +- .../volume_path_handler_linux.go | 2 +- vendor/k8s.io/kubernetes/pkg/volume/volume.go | 17 +- .../kubernetes/pkg/volume/volume_linux.go | 2 +- .../pkg/volume/vsphere_volume/BUILD | 6 +- .../pkg/volume/vsphere_volume/attacher.go | 6 +- .../volume/vsphere_volume/vsphere_volume.go | 12 +- .../vsphere_volume/vsphere_volume_block.go | 2 +- .../vsphere_volume/vsphere_volume_util.go | 36 +- .../vsphere_volume_util_windows.go | 2 +- .../kubernetes/pkg/windows/service/BUILD | 2 +- .../kubernetes/pkg/windows/service/service.go | 2 +- .../plugin/pkg/admission/admit/BUILD | 2 +- .../plugin/pkg/admission/admit/admission.go | 2 +- .../admission/alwayspullimages/admission.go | 4 +- .../plugin/pkg/admission/certificates/BUILD | 2 +- .../pkg/admission/certificates/approval/BUILD | 2 +- .../certificates/approval/admission.go | 2 +- .../pkg/admission/certificates/signing/BUILD | 3 +- .../certificates/signing/admission.go | 12 +- .../certificates/subjectrestriction/BUILD | 2 +- .../subjectrestriction/admission.go | 4 +- .../plugin/pkg/admission/certificates/util.go | 2 +- .../pkg/admission/defaultingressclass/BUILD | 8 +- .../defaultingressclass/admission.go | 38 +- .../plugin/pkg/admission/deny/BUILD | 2 +- .../plugin/pkg/admission/deny/admission.go | 2 +- .../plugin/pkg/admission/exec/BUILD | 2 +- .../plugin/pkg/admission/exec/admission.go | 4 +- .../plugin/pkg/admission/imagepolicy/BUILD | 2 +- .../pkg/admission/imagepolicy/admission.go | 2 +- .../pkg/admission/imagepolicy/config.go | 2 +- .../pkg/admission/noderestriction/BUILD | 1 - .../admission/noderestriction/admission.go | 36 +- .../pkg/admission/podnodeselector/BUILD | 2 +- .../admission/podnodeselector/admission.go | 2 +- .../plugin/pkg/admission/podpreset/BUILD | 2 +- .../pkg/admission/podpreset/admission.go | 4 +- .../admission/podtolerationrestriction/BUILD | 2 +- .../podtolerationrestriction/admission.go | 6 +- .../plugin/pkg/admission/priority/BUILD | 2 +- .../pkg/admission/priority/admission.go | 3 + .../plugin/pkg/admission/resourcequota/BUILD | 2 +- .../pkg/admission/resourcequota/controller.go | 6 +- .../plugin/pkg/admission/runtimeclass/BUILD | 9 + .../pkg/admission/runtimeclass/admission.go | 25 +- .../security/podsecuritypolicy/BUILD | 2 +- .../security/podsecuritypolicy/admission.go | 12 +- .../pkg/admission/serviceaccount/admission.go | 84 +- .../storage/persistentvolume/label/BUILD | 2 +- .../persistentvolume/label/admission.go | 2 +- .../storage/storageclass/setdefault/BUILD | 4 +- .../storageclass/setdefault/admission.go | 2 +- .../storageobjectinuseprotection/BUILD | 2 +- .../storageobjectinuseprotection/admission.go | 2 +- .../auth/authenticator/token/bootstrap/BUILD | 2 +- .../token/bootstrap/bootstrap.go | 2 +- .../plugin/pkg/auth/authorizer/node/BUILD | 3 +- .../plugin/pkg/auth/authorizer/node/graph.go | 10 +- .../auth/authorizer/node/graph_populator.go | 2 +- .../auth/authorizer/node/node_authorizer.go | 68 +- .../plugin/pkg/auth/authorizer/rbac/BUILD | 2 +- .../authorizer/rbac/bootstrappolicy/BUILD | 3 +- .../rbac/bootstrappolicy/controller_policy.go | 29 +- .../rbac/bootstrappolicy/namespace_policy.go | 2 +- .../authorizer/rbac/bootstrappolicy/policy.go | 23 +- .../plugin/pkg/auth/authorizer/rbac/rbac.go | 6 +- .../kubernetes/third_party/forked/ipvs/BUILD | 49 - .../k8s.io/legacy-cloud-providers/aws/BUILD | 5 +- .../k8s.io/legacy-cloud-providers/aws/OWNERS | 6 +- .../k8s.io/legacy-cloud-providers/aws/aws.go | 172 +- .../legacy-cloud-providers/aws/aws_fakes.go | 9 +- .../aws/aws_instancegroups.go | 5 +- .../aws/aws_loadbalancer.go | 110 +- .../legacy-cloud-providers/aws/aws_routes.go | 2 +- .../legacy-cloud-providers/aws/instances.go | 2 +- .../legacy-cloud-providers/aws/log_handler.go | 2 +- .../aws/retry_handler.go | 2 +- .../k8s.io/legacy-cloud-providers/aws/tags.go | 2 +- .../legacy-cloud-providers/aws/volumes.go | 2 +- .../k8s.io/legacy-cloud-providers/azure/BUILD | 40 +- .../legacy-cloud-providers/azure/OWNERS | 2 + .../legacy-cloud-providers/azure/auth/BUILD | 2 +- .../azure/auth/azure_auth.go | 2 +- .../legacy-cloud-providers/azure/azure.go | 48 +- .../azure/azure_backoff.go | 18 +- .../azure/azure_blobDiskController.go | 17 +- .../azure/azure_config.go | 4 +- .../azure/azure_controller_common.go | 6 +- .../azure/azure_controller_standard.go | 4 +- .../azure/azure_controller_vmss.go | 4 +- .../azure/azure_fakes.go | 753 +- .../azure/azure_file.go | 120 +- .../azure/azure_instances.go | 190 +- .../azure/azure_loadbalancer.go | 40 +- .../azure/azure_managedDiskController.go | 22 +- .../azure/azure_routes.go | 12 +- .../azure/azure_standard.go | 4 +- .../azure/azure_storage.go | 45 +- .../azure/azure_storageaccount.go | 36 +- .../azure/azure_utils.go | 41 + .../azure/azure_vmsets.go | 2 +- .../azure/azure_vmss.go | 80 +- .../azure/azure_vmss_cache.go | 7 +- .../azure/azure_wrap.go | 4 +- .../azure/azure_zones.go | 2 +- .../azure/clients/BUILD | 3 + .../azure/clients/armclient/BUILD | 2 +- .../clients/armclient/azure_armclient.go | 6 +- .../azure/clients/azure_client_config.go | 1 + .../clients/containerserviceclient/BUILD | 60 + .../azure_containerserviceclient.go | 412 + .../clients/containerserviceclient/doc.go | 20 + .../containerserviceclient/interface.go | 42 + .../azure/clients/deploymentclient/BUILD | 60 + .../azure_deploymentclient.go | 452 + .../azure/clients/deploymentclient/doc.go | 20 + .../clients/deploymentclient/interface.go | 42 + .../azure/clients/diskclient/BUILD | 7 +- .../clients/diskclient/azure_diskclient.go | 6 +- .../azure/clients/diskclient/interface.go | 4 +- .../clients/diskclient/mockdiskclient/BUILD | 31 + .../clients/diskclient/mockdiskclient/doc.go | 20 + .../diskclient/mockdiskclient/interface.go | 94 + .../azure/clients/fileclient/BUILD | 35 + .../clients/fileclient/azure_fileclient.go | 120 + .../azure/clients/fileclient/doc.go | 20 + .../azure/clients/fileclient/interface.go | 32 + .../azure/clients/interfaceclient/BUILD | 3 +- .../interfaceclient/azure_interfaceclient.go | 4 +- .../interfaceclient/mockinterfaceclient/BUILD | 31 + .../mockinterfaceclient/doc.go | 20 + .../mockinterfaceclient/interface.go | 109 + .../azure/clients/loadbalancerclient/BUILD | 3 +- .../azure_loadbalancerclient.go | 4 +- .../mockloadbalancerclient/BUILD | 31 + .../mockloadbalancerclient/doc.go | 20 + .../mockloadbalancerclient/interface.go | 109 + .../azure/clients/publicipclient/BUILD | 4 +- .../publicipclient/azure_publicipclient.go | 4 +- .../publicipclient/mockpublicipclient/BUILD | 31 + .../publicipclient/mockpublicipclient/doc.go | 20 + .../mockpublicipclient/interface.go | 124 + .../azure/clients/routeclient/BUILD | 4 +- .../clients/routeclient/azure_routeclient.go | 4 +- .../azure/clients/routetableclient/BUILD | 4 +- .../azure_routetableclient.go | 4 +- .../azure/clients/securitygroupclient/BUILD | 4 +- .../azure_securitygroupclient.go | 6 +- .../mocksecuritygroupclient/BUILD | 31 + .../mocksecuritygroupclient/doc.go | 20 + .../mocksecuritygroupclient/interface.go | 109 + .../azure/clients/snapshotclient/BUILD | 8 +- .../snapshotclient/azure_snapshotclient.go | 6 +- .../azure/clients/snapshotclient/interface.go | 2 +- .../azure/clients/storageaccountclient/BUILD | 4 +- .../azure_storageaccountclient.go | 4 +- .../azure/clients/subnetclient/BUILD | 4 +- .../subnetclient/azure_subnetclient.go | 4 +- .../azure/clients/vmclient/BUILD | 8 +- .../azure/clients/vmclient/azure_vmclient.go | 6 +- .../azure/clients/vmclient/interface.go | 2 +- .../azure/clients/vmclient/mockvmclient/BUILD | 31 + .../clients/vmclient/mockvmclient/doc.go | 20 + .../vmclient/mockvmclient/interface.go | 123 + .../azure/clients/vmsizeclient/BUILD | 9 +- .../vmsizeclient/azure_vmsizeclient.go | 6 +- .../azure/clients/vmsizeclient/interface.go | 2 +- .../azure/clients/vmssclient/BUILD | 9 +- .../clients/vmssclient/azure_vmssclient.go | 96 +- .../azure/clients/vmssclient/interface.go | 14 +- .../clients/vmssclient/mockvmssclient/BUILD | 32 + .../clients/vmssclient/mockvmssclient/doc.go | 20 + .../vmssclient/mockvmssclient/interface.go | 156 + .../azure/clients/vmssvmclient/BUILD | 8 +- .../vmssvmclient/azure_vmssvmclient.go | 6 +- .../azure/clients/vmssvmclient/interface.go | 2 +- .../vmssvmclient/mockvmssvmclient/BUILD | 31 + .../vmssvmclient/mockvmssvmclient/doc.go | 20 + .../mockvmssvmclient/interface.go | 109 + .../legacy-cloud-providers/azure/retry/BUILD | 3 +- .../azure/retry/azure_error.go | 2 +- .../azure/retry/azure_retry.go | 2 +- .../k8s.io/legacy-cloud-providers/gce/BUILD | 5 +- .../k8s.io/legacy-cloud-providers/gce/gce.go | 110 +- .../gce/gce_address_manager.go | 2 +- .../gce/gce_addresses.go | 32 +- .../legacy-cloud-providers/gce/gce_alpha.go | 5 - .../gce/gce_annotations.go | 2 +- .../gce/gce_clusterid.go | 2 +- .../gce/gce_clusters.go | 2 +- .../legacy-cloud-providers/gce/gce_disks.go | 10 +- .../legacy-cloud-providers/gce/gce_fake.go | 1 + .../gce/gce_forwardingrule.go | 9 +- .../gce/gce_healthchecks.go | 2 +- .../gce/gce_instances.go | 157 +- .../gce/gce_interfaces.go | 12 +- .../gce/gce_loadbalancer.go | 2 +- .../gce/gce_loadbalancer_external.go | 9 +- .../gce/gce_loadbalancer_internal.go | 234 +- .../gce/gce_loadbalancer_metrics.go | 181 + .../legacy-cloud-providers/gce/gce_routes.go | 2 +- .../legacy-cloud-providers/gce/gce_tpu.go | 2 +- .../legacy-cloud-providers/gce/gce_util.go | 12 - .../legacy-cloud-providers/openstack/BUILD | 2 +- .../openstack/metadata.go | 2 +- .../openstack/openstack.go | 2 +- .../openstack/openstack_instances.go | 8 +- .../openstack/openstack_loadbalancer.go | 2 +- .../openstack/openstack_routes.go | 2 +- .../openstack/openstack_volumes.go | 9 +- .../legacy-cloud-providers/vsphere/BUILD | 3 +- .../legacy-cloud-providers/vsphere/OWNERS | 4 +- .../vsphere/credentialmanager.go | 4 +- .../vsphere/nodemanager.go | 109 +- .../vsphere/vclib/BUILD | 2 +- .../vsphere/vclib/connection.go | 4 +- .../vsphere/vclib/datacenter.go | 2 +- .../vsphere/vclib/datastore.go | 2 +- .../vsphere/vclib/diskmanagers/BUILD | 2 +- .../vsphere/vclib/diskmanagers/vdm.go | 7 +- .../vsphere/vclib/diskmanagers/virtualdisk.go | 2 +- .../vsphere/vclib/diskmanagers/vmdm.go | 2 +- .../vsphere/vclib/folder.go | 2 +- .../vsphere/vclib/pbm.go | 2 +- .../vsphere/vclib/utils.go | 2 +- .../vsphere/vclib/virtualmachine.go | 2 +- .../vsphere/vclib/volumeoptions.go | 2 +- .../legacy-cloud-providers/vsphere/vsphere.go | 100 +- .../vsphere/vsphere_util.go | 2 +- vendor/k8s.io/utils/clock/README.md | 4 + vendor/k8s.io/utils/exec/README.md | 5 + vendor/k8s.io/utils/io/README.md | 4 + vendor/k8s.io/utils/mount/fake_mounter.go | 2 +- vendor/k8s.io/utils/mount/mount.go | 14 +- .../k8s.io/utils/mount/mount_helper_common.go | 2 +- .../k8s.io/utils/mount/mount_helper_unix.go | 2 +- .../utils/mount/mount_helper_windows.go | 2 +- vendor/k8s.io/utils/mount/mount_linux.go | 6 +- vendor/k8s.io/utils/mount/mount_windows.go | 52 +- vendor/k8s.io/utils/nsenter/README.md | 4 + vendor/k8s.io/utils/nsenter/nsenter.go | 2 +- vendor/k8s.io/utils/path/file.go | 2 +- vendor/k8s.io/utils/pointer/README.md | 3 + vendor/k8s.io/utils/trace/README.md | 67 + vendor/k8s.io/utils/trace/trace.go | 245 +- vendor/modules.txt | 427 +- .../konnectivity-client/pkg/client/client.go | 18 +- .../konnectivity-client/pkg/client/conn.go | 2 +- .../structured-merge-diff/v4/LICENSE | 201 + .../{v3 => v4}/fieldpath/doc.go | 0 .../{v3 => v4}/fieldpath/element.go | 2 +- .../{v3 => v4}/fieldpath/fromvalue.go | 2 +- .../{v3 => v4}/fieldpath/managers.go | 0 .../{v3 => v4}/fieldpath/path.go | 2 +- .../{v3 => v4}/fieldpath/pathelementmap.go | 2 +- .../{v3 => v4}/fieldpath/serialize-pe.go | 2 +- .../{v3 => v4}/fieldpath/serialize.go | 0 .../{v3 => v4}/fieldpath/set.go | 58 + .../{v3 => v4}/merge/conflict.go | 11 +- .../{v3 => v4}/merge/update.go | 47 +- .../{v3 => v4}/schema/doc.go | 0 .../{v3 => v4}/schema/elements.go | 0 .../{v3 => v4}/schema/equals.go | 0 .../{v3 => v4}/schema/schemaschema.go | 0 .../{v3 => v4}/typed/doc.go | 0 .../{v3 => v4}/typed/helpers.go | 6 +- .../{v3 => v4}/typed/merge.go | 6 +- .../{v3 => v4}/typed/parser.go | 4 +- .../{v3 => v4}/typed/remove.go | 13 +- .../{v3 => v4}/typed/tofieldset.go | 6 +- .../{v3 => v4}/typed/typed.go | 23 +- .../{v3 => v4}/typed/union.go | 4 +- .../{v3 => v4}/typed/validate.go | 6 +- .../{v3 => v4}/value/allocator.go | 0 .../{v3 => v4}/value/doc.go | 0 .../{v3 => v4}/value/fields.go | 0 .../{v3 => v4}/value/jsontagutil.go | 0 .../{v3 => v4}/value/list.go | 0 .../{v3 => v4}/value/listreflect.go | 0 .../{v3 => v4}/value/listunstructured.go | 0 .../{v3 => v4}/value/map.go | 0 .../{v3 => v4}/value/mapreflect.go | 0 .../{v3 => v4}/value/mapunstructured.go | 0 .../{v3 => v4}/value/reflectcache.go | 0 .../{v3 => v4}/value/scalar.go | 0 .../{v3 => v4}/value/structreflect.go | 0 .../{v3 => v4}/value/value.go | 0 .../{v3 => v4}/value/valuereflect.go | 0 .../{v3 => v4}/value/valueunstructured.go | 0 4283 files changed, 294993 insertions(+), 87353 deletions(-) create mode 100644 vendor/cloud.google.com/go/compute/metadata/.repo-metadata.json rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/availabilitysets.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/client.go (88%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/containerservices.go (96%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/dedicatedhostgroups.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/dedicatedhosts.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/diskencryptionsets.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/disks.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/galleries.go (82%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/galleryapplications.go (79%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/galleryapplicationversions.go (80%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/galleryimages.go (80%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/galleryimageversions.go (79%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/images.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/loganalytics.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/models.go (91%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/operations.go (91%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/proximityplacementgroups.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/resourceskus.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/snapshots.go (95%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/usage.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/version.go (93%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachineextensionimages.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachineextensions.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachineimages.go (93%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachineruncommands.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachines.go (92%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinescalesetextensions.go (79%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinescalesetrollingupgrades.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinescalesets.go (92%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinescalesetvmextensions.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinescalesetvms.go (91%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-07-01 => 2019-12-01}/compute/virtualmachinesizes.go (94%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/client.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/models.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/version.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/client.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deploymentoperations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/models.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/providers.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/tags.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/version.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/encryptionscopes.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/objectreplicationpolicies.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queue.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queueservices.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/table.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/tableservices.go create mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go create mode 100644 vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go create mode 100644 vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go create mode 100644 vendor/github.com/Azure/go-autorest/autorest/date/go.sum create mode 100644 vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go create mode 100644 vendor/github.com/Azure/go-autorest/autorest/mocks/go.sum create mode 100644 vendor/github.com/Azure/go-autorest/autorest/mocks/go_mod_tidy_hack.go create mode 100644 vendor/github.com/Microsoft/go-winio/vhd/vhd.go create mode 100644 vendor/github.com/Microsoft/go-winio/vhd/zvhd.go create mode 100644 vendor/github.com/Microsoft/hcsshim/CODEOWNERS create mode 100644 vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/doc.go create mode 100644 vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/next.pb.txt create mode 100644 vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.pb.go create mode 100644 vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.proto create mode 100644 vendor/github.com/Microsoft/hcsshim/hcn/hcnroute.go delete mode 100644 vendor/github.com/Microsoft/hcsshim/internal/hcs/cgo.go create mode 100644 vendor/github.com/Microsoft/hcsshim/internal/hcs/syscall.go create mode 100644 vendor/github.com/Microsoft/hcsshim/internal/hcs/zsyscall_windows.go create mode 100644 vendor/github.com/Microsoft/hcsshim/internal/schema2/property_type.go create mode 100644 vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_device.go create mode 100644 vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_function.go create mode 100644 vendor/github.com/Microsoft/hcsshim/osversion/osversion_windows.go create mode 100644 vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go create mode 100644 vendor/github.com/cespare/xxhash/v2/.travis.yml create mode 100644 vendor/github.com/cespare/xxhash/v2/LICENSE.txt create mode 100644 vendor/github.com/cespare/xxhash/v2/README.md create mode 100644 vendor/github.com/cespare/xxhash/v2/go.mod create mode 100644 vendor/github.com/cespare/xxhash/v2/go.sum create mode 100644 vendor/github.com/cespare/xxhash/v2/xxhash.go create mode 100644 vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go create mode 100644 vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s create mode 100644 vendor/github.com/cespare/xxhash/v2/xxhash_other.go create mode 100644 vendor/github.com/cespare/xxhash/v2/xxhash_safe.go create mode 100644 vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go delete mode 100644 vendor/github.com/checkpoint-restore/go-criu/rpc/rpc.pb.go create mode 100644 vendor/github.com/checkpoint-restore/go-criu/v4/.gitignore create mode 100644 vendor/github.com/checkpoint-restore/go-criu/v4/.travis.yml rename vendor/github.com/checkpoint-restore/go-criu/{ => v4}/LICENSE (100%) create mode 100644 vendor/github.com/checkpoint-restore/go-criu/v4/Makefile create mode 100644 vendor/github.com/checkpoint-restore/go-criu/v4/README.md create mode 100644 vendor/github.com/checkpoint-restore/go-criu/v4/go.mod create mode 100644 vendor/github.com/checkpoint-restore/go-criu/v4/go.sum create mode 100644 vendor/github.com/checkpoint-restore/go-criu/v4/main.go create mode 100644 vendor/github.com/checkpoint-restore/go-criu/v4/notify.go create mode 100644 vendor/github.com/checkpoint-restore/go-criu/v4/rpc/rpc.pb.go delete mode 100644 vendor/github.com/cilium/ebpf/feature.go create mode 100644 vendor/github.com/cilium/ebpf/internal/btf/btf.go create mode 100644 vendor/github.com/cilium/ebpf/internal/btf/btf_types.go create mode 100644 vendor/github.com/cilium/ebpf/internal/btf/doc.go create mode 100644 vendor/github.com/cilium/ebpf/internal/btf/ext_info.go create mode 100644 vendor/github.com/cilium/ebpf/internal/btf/strings.go create mode 100644 vendor/github.com/cilium/ebpf/internal/btf/types.go create mode 100644 vendor/github.com/cilium/ebpf/internal/errors.go create mode 100644 vendor/github.com/cilium/ebpf/internal/fd.go create mode 100644 vendor/github.com/cilium/ebpf/internal/feature.go create mode 100644 vendor/github.com/cilium/ebpf/internal/io.go create mode 100644 vendor/github.com/cilium/ebpf/internal/ptr.go rename vendor/github.com/cilium/ebpf/{ => internal}/ptr_32_be.go (59%) rename vendor/github.com/cilium/ebpf/{ => internal}/ptr_32_le.go (61%) rename vendor/github.com/cilium/ebpf/{ => internal}/ptr_64.go (65%) create mode 100644 vendor/github.com/cilium/ebpf/internal/syscall.go create mode 100644 vendor/github.com/cilium/ebpf/internal/syscall_string.go create mode 100644 vendor/github.com/containerd/cgroups/Vagrantfile create mode 100644 vendor/github.com/containerd/cgroups/go.mod create mode 100644 vendor/github.com/containerd/cgroups/go.sum create mode 100644 vendor/github.com/containerd/cgroups/stats/v1/doc.go rename vendor/github.com/containerd/cgroups/{ => stats/v1}/metrics.pb.go (66%) rename vendor/github.com/containerd/cgroups/{ => stats/v1}/metrics.pb.txt (93%) rename vendor/github.com/containerd/cgroups/{ => stats/v1}/metrics.proto (88%) create mode 100644 vendor/github.com/containerd/cgroups/v2/cpu.go create mode 100644 vendor/github.com/containerd/cgroups/v2/devicefilter.go create mode 100644 vendor/github.com/containerd/cgroups/v2/ebpf.go create mode 100644 vendor/github.com/containerd/cgroups/v2/errors.go create mode 100644 vendor/github.com/containerd/cgroups/v2/hugetlb.go create mode 100644 vendor/github.com/containerd/cgroups/v2/io.go create mode 100644 vendor/github.com/containerd/cgroups/v2/manager.go create mode 100644 vendor/github.com/containerd/cgroups/v2/memory.go create mode 100644 vendor/github.com/containerd/cgroups/v2/paths.go create mode 100644 vendor/github.com/containerd/cgroups/v2/pids.go create mode 100644 vendor/github.com/containerd/cgroups/v2/rdma.go create mode 100644 vendor/github.com/containerd/cgroups/v2/state.go create mode 100644 vendor/github.com/containerd/cgroups/v2/stats/doc.go create mode 100644 vendor/github.com/containerd/cgroups/v2/stats/metrics.pb.go create mode 100644 vendor/github.com/containerd/cgroups/v2/stats/metrics.pb.txt create mode 100644 vendor/github.com/containerd/cgroups/v2/stats/metrics.proto create mode 100644 vendor/github.com/containerd/cgroups/v2/utils.go delete mode 100644 vendor/github.com/containerd/containerd/.appveyor.yml create mode 100644 vendor/github.com/containerd/containerd/Vagrantfile create mode 100644 vendor/github.com/containerd/containerd/cmd/ctr/commands/images/mount.go create mode 100644 vendor/github.com/containerd/containerd/cmd/ctr/commands/images/unmount.go create mode 100644 vendor/github.com/containerd/containerd/cmd/ctr/commands/oci/oci.go create mode 100644 vendor/github.com/containerd/containerd/contrib/apparmor/apparmor_unsupported.go delete mode 100644 vendor/github.com/containerd/containerd/dialer/BUILD delete mode 100644 vendor/github.com/containerd/containerd/dialer/dialer.go delete mode 100644 vendor/github.com/containerd/containerd/dialer/dialer_unix.go delete mode 100644 vendor/github.com/containerd/containerd/dialer/dialer_windows.go create mode 100644 vendor/github.com/containerd/containerd/go.mod create mode 100644 vendor/github.com/containerd/containerd/go.sum rename vendor/github.com/containerd/containerd/metrics/cgroups/{ => v1}/blkio.go (99%) create mode 100644 vendor/github.com/containerd/containerd/metrics/cgroups/v1/cgroups.go rename vendor/github.com/containerd/containerd/metrics/cgroups/{ => v1}/cpu.go (99%) rename vendor/github.com/containerd/containerd/metrics/cgroups/{ => v1}/hugetlb.go (99%) rename vendor/github.com/containerd/containerd/metrics/cgroups/{ => v1}/memory.go (99%) rename vendor/github.com/containerd/containerd/metrics/cgroups/{ => v1}/metric.go (88%) rename vendor/github.com/containerd/containerd/metrics/cgroups/{ => v1}/metrics.go (75%) rename vendor/github.com/containerd/containerd/metrics/cgroups/{ => v1}/oom.go (99%) rename vendor/github.com/containerd/containerd/metrics/cgroups/{ => v1}/pids.go (98%) create mode 100644 vendor/github.com/containerd/containerd/metrics/cgroups/v2/cgroups.go create mode 100644 vendor/github.com/containerd/containerd/metrics/cgroups/v2/cpu.go create mode 100644 vendor/github.com/containerd/containerd/metrics/cgroups/v2/io.go create mode 100644 vendor/github.com/containerd/containerd/metrics/cgroups/v2/memory.go create mode 100644 vendor/github.com/containerd/containerd/metrics/cgroups/v2/metric.go create mode 100644 vendor/github.com/containerd/containerd/metrics/cgroups/v2/metrics.go create mode 100644 vendor/github.com/containerd/containerd/metrics/cgroups/v2/pids.go create mode 100644 vendor/github.com/containerd/containerd/metrics/types/v2/types.go delete mode 100644 vendor/github.com/containerd/containerd/namespaces/validate.go create mode 100644 vendor/github.com/containerd/containerd/pkg/oom/oom.go rename vendor/github.com/containerd/containerd/pkg/oom/{epoll.go => v1/v1.go} (81%) create mode 100644 vendor/github.com/containerd/containerd/pkg/oom/v2/v2.go delete mode 100644 vendor/github.com/containerd/containerd/pkg/ttrpcutil/client_windows.go create mode 100644 vendor/github.com/containerd/containerd/reference/docker/reference.go create mode 100644 vendor/github.com/containerd/containerd/remotes/docker/config/config_unix.go create mode 100644 vendor/github.com/containerd/containerd/remotes/docker/config/config_windows.go create mode 100644 vendor/github.com/containerd/containerd/remotes/docker/config/hosts.go rename vendor/github.com/{docker/distribution/registry/api/errcode/errors.go => containerd/containerd/remotes/docker/errcode.go} (91%) rename vendor/github.com/{docker/distribution/registry/api/errcode/register.go => containerd/containerd/remotes/docker/errdesc.go} (87%) create mode 100644 vendor/github.com/containerd/containerd/services/introspection/introspection.go create mode 100644 vendor/github.com/containerd/containerd/services/introspection/local.go create mode 100644 vendor/github.com/containerd/containerd/snapshotter_opts_unix.go delete mode 100644 vendor/github.com/containerd/containerd/sys/proc.go delete mode 100644 vendor/github.com/containerd/containerd/sys/reaper.go rename vendor/github.com/containerd/containerd/sys/{reaper_linux.go => reaper/reaper_utils_linux.go} (57%) create mode 100644 vendor/github.com/containerd/containerd/sys/userns_linux.go create mode 100644 vendor/github.com/containerd/containerd/sys/userns_unsupported.go delete mode 100644 vendor/github.com/containerd/containerd/vendor.conf create mode 100644 vendor/github.com/containerd/cri/.appveyor.yml create mode 100644 vendor/github.com/containerd/cri/.golangci.yml delete mode 100644 vendor/github.com/containerd/cri/.travis.yml delete mode 100644 vendor/github.com/containerd/cri/CONTRIBUTING.md create mode 100644 vendor/github.com/containerd/cri/pkg/config/config_unix.go create mode 100644 vendor/github.com/containerd/cri/pkg/config/config_windows.go create mode 100644 vendor/github.com/containerd/cri/pkg/containerd/opts/spec_unix.go create mode 100644 vendor/github.com/containerd/cri/pkg/containerd/opts/spec_windows.go rename vendor/github.com/containerd/{containerd/pkg/ttrpcutil/client_unix.go => cri/pkg/containerd/platforms/default_unix.go} (74%) create mode 100644 vendor/github.com/containerd/cri/pkg/containerd/platforms/default_windows.go rename vendor/github.com/containerd/cri/pkg/netns/{netns.go => netns_unix.go} (90%) create mode 100644 vendor/github.com/containerd/cri/pkg/netns/netns_windows.go create mode 100644 vendor/github.com/containerd/cri/pkg/os/os_unix.go create mode 100644 vendor/github.com/containerd/cri/pkg/seccomp/seccomp_linux.go create mode 100644 vendor/github.com/containerd/cri/pkg/seccomp/seccomp_unsupported.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/bandwidth/doc.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/bandwidth/fake_shaper.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/bandwidth/interfaces.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/bandwidth/linux.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/bandwidth/unsupported.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/bandwidth/utils.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/cni_conf_syncer.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/container_create_unix.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/container_create_windows.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/container_stats_list_unix.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/container_stats_list_windows.go rename vendor/github.com/containerd/cri/pkg/server/{container_update_resources.go => container_update_resources_unix.go} (81%) create mode 100644 vendor/github.com/containerd/cri/pkg/server/container_update_resources_windows.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/helpers_unix.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/helpers_windows.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/io/helpers_unix.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/io/helpers_windows.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/sandbox_portforward_unix.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/sandbox_portforward_windows.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/sandbox_run_unix.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/sandbox_run_windows.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/service_unix.go create mode 100644 vendor/github.com/containerd/cri/pkg/server/service_windows.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/errors.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/portforward/constants.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/portforward/httpstream.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/portforward/portforward.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/portforward/websocket.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/remotecommand/attach.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/remotecommand/doc.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/remotecommand/exec.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/remotecommand/httpstream.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/remotecommand/websocket.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/request_cache.go create mode 100644 vendor/github.com/containerd/cri/pkg/streaming/server.go create mode 100644 vendor/github.com/containerd/go-cni/go.mod create mode 100644 vendor/github.com/containerd/go-cni/go.sum delete mode 100644 vendor/github.com/containerd/go-cni/vendor.conf create mode 100644 vendor/github.com/containerd/go-runc/go.mod create mode 100644 vendor/github.com/containerd/go-runc/go.sum create mode 100644 vendor/github.com/containerd/imgcrypt/.appveyor.yml create mode 100644 vendor/github.com/containerd/imgcrypt/.gitignore create mode 100644 vendor/github.com/containerd/imgcrypt/.golangci.yml create mode 100644 vendor/github.com/containerd/imgcrypt/.travis.yml create mode 100644 vendor/github.com/containerd/imgcrypt/LICENSE create mode 100644 vendor/github.com/containerd/imgcrypt/MAINTAINERS create mode 100644 vendor/github.com/containerd/imgcrypt/Makefile create mode 100644 vendor/github.com/containerd/imgcrypt/README.md create mode 100644 vendor/github.com/containerd/imgcrypt/go.mod create mode 100644 vendor/github.com/containerd/imgcrypt/go.sum create mode 100644 vendor/github.com/containerd/imgcrypt/images/encryption/client.go create mode 100644 vendor/github.com/containerd/imgcrypt/images/encryption/encryption.go create mode 100644 vendor/github.com/containerd/imgcrypt/payload.go create mode 100644 vendor/github.com/containerd/imgcrypt/vendor.conf create mode 100644 vendor/github.com/containerd/ttrpc/go.mod create mode 100644 vendor/github.com/containerd/ttrpc/go.sum create mode 100644 vendor/github.com/containernetworking/cni/pkg/utils/utils.go create mode 100644 vendor/github.com/containers/ocicrypt/CODE-OF-CONDUCT.md rename vendor/github.com/{opencontainers/go-digest/LICENSE.code => containers/ocicrypt/LICENSE} (99%) create mode 100644 vendor/github.com/containers/ocicrypt/MAINTAINERS create mode 100644 vendor/github.com/containers/ocicrypt/Makefile create mode 100644 vendor/github.com/containers/ocicrypt/README.md create mode 100644 vendor/github.com/containers/ocicrypt/blockcipher/blockcipher.go create mode 100644 vendor/github.com/containers/ocicrypt/blockcipher/blockcipher_aes_ctr.go create mode 100644 vendor/github.com/containers/ocicrypt/config/config.go create mode 100644 vendor/github.com/containers/ocicrypt/config/constructors.go create mode 100644 vendor/github.com/containers/ocicrypt/encryption.go create mode 100644 vendor/github.com/containers/ocicrypt/go.mod create mode 100644 vendor/github.com/containers/ocicrypt/go.sum create mode 100644 vendor/github.com/containers/ocicrypt/gpg.go create mode 100644 vendor/github.com/containers/ocicrypt/gpgvault.go create mode 100644 vendor/github.com/containers/ocicrypt/keywrap/jwe/keywrapper_jwe.go create mode 100644 vendor/github.com/containers/ocicrypt/keywrap/keywrap.go create mode 100644 vendor/github.com/containers/ocicrypt/keywrap/pgp/keywrapper_gpg.go create mode 100644 vendor/github.com/containers/ocicrypt/keywrap/pkcs7/keywrapper_pkcs7.go create mode 100644 vendor/github.com/containers/ocicrypt/reader.go create mode 100644 vendor/github.com/containers/ocicrypt/spec/spec.go create mode 100644 vendor/github.com/containers/ocicrypt/utils/delayedreader.go create mode 100644 vendor/github.com/containers/ocicrypt/utils/ioutils.go create mode 100644 vendor/github.com/containers/ocicrypt/utils/testing.go create mode 100644 vendor/github.com/containers/ocicrypt/utils/utils.go create mode 100644 vendor/github.com/coreos/go-systemd/v22/LICENSE create mode 100644 vendor/github.com/coreos/go-systemd/v22/NOTICE create mode 100644 vendor/github.com/coreos/go-systemd/v22/activation/files.go create mode 100644 vendor/github.com/coreos/go-systemd/v22/activation/listeners.go create mode 100644 vendor/github.com/coreos/go-systemd/v22/activation/packetconns.go create mode 100644 vendor/github.com/coreos/go-systemd/v22/daemon/sdnotify.go create mode 100644 vendor/github.com/coreos/go-systemd/v22/daemon/watchdog.go rename vendor/github.com/coreos/go-systemd/{ => v22}/dbus/dbus.go (99%) rename vendor/github.com/coreos/go-systemd/{ => v22}/dbus/methods.go (98%) rename vendor/github.com/coreos/go-systemd/{ => v22}/dbus/properties.go (99%) rename vendor/github.com/coreos/go-systemd/{ => v22}/dbus/set.go (100%) rename vendor/github.com/coreos/go-systemd/{ => v22}/dbus/subscription.go (99%) rename vendor/github.com/coreos/go-systemd/{ => v22}/dbus/subscription_set.go (100%) delete mode 100644 vendor/github.com/docker/distribution/registry/api/errcode/handler.go delete mode 100644 vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/jsonlog.go delete mode 100644 vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/jsonlogbytes.go delete mode 100644 vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/time_marshalling.go delete mode 100644 vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_linux.go delete mode 100644 vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_unix.go delete mode 100644 vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_windows.go delete mode 100644 vendor/github.com/docker/docker/pkg/parsers/parsers.go delete mode 100644 vendor/github.com/docker/docker/pkg/sysinfo/README.md delete mode 100644 vendor/github.com/docker/docker/pkg/sysinfo/numcpu.go delete mode 100644 vendor/github.com/docker/docker/pkg/sysinfo/numcpu_linux.go delete mode 100644 vendor/github.com/docker/docker/pkg/sysinfo/numcpu_windows.go delete mode 100644 vendor/github.com/docker/docker/pkg/sysinfo/sysinfo.go delete mode 100644 vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_linux.go delete mode 100644 vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_unix.go delete mode 100644 vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_windows.go create mode 100644 vendor/github.com/fsnotify/fsnotify/.gitattributes create mode 100644 vendor/github.com/fsnotify/fsnotify/go.mod create mode 100644 vendor/github.com/fsnotify/fsnotify/go.sum create mode 100644 vendor/github.com/fullsailor/pkcs7/.gitignore create mode 100644 vendor/github.com/fullsailor/pkcs7/.travis.yml rename vendor/github.com/{mattn/go-shellwords => fullsailor/pkcs7}/LICENSE (96%) create mode 100644 vendor/github.com/fullsailor/pkcs7/README.md create mode 100644 vendor/github.com/fullsailor/pkcs7/ber.go create mode 100644 vendor/github.com/fullsailor/pkcs7/pkcs7.go create mode 100644 vendor/github.com/fullsailor/pkcs7/x509.go rename vendor/{sigs.k8s.io/structured-merge-diff/v3 => github.com/go-logr/logr}/LICENSE (100%) create mode 100644 vendor/github.com/go-logr/logr/README.md create mode 100644 vendor/github.com/go-logr/logr/go.mod create mode 100644 vendor/github.com/go-logr/logr/logr.go delete mode 100644 vendor/github.com/godbus/dbus/.travis.yml delete mode 100644 vendor/github.com/godbus/dbus/go.mod create mode 100644 vendor/github.com/godbus/dbus/v5/.travis.yml rename vendor/github.com/godbus/dbus/{ => v5}/CONTRIBUTING.md (100%) rename vendor/github.com/godbus/dbus/{ => v5}/LICENSE (100%) rename vendor/github.com/godbus/dbus/{ => v5}/MAINTAINERS (100%) rename vendor/github.com/godbus/dbus/{ => v5}/README.markdown (100%) rename vendor/github.com/godbus/dbus/{ => v5}/auth.go (98%) rename vendor/github.com/godbus/dbus/{ => v5}/auth_anonymous.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/auth_external.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/auth_sha1.go (96%) rename vendor/github.com/godbus/dbus/{ => v5}/call.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/conn.go (86%) rename vendor/github.com/godbus/dbus/{ => v5}/conn_darwin.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/conn_other.go (96%) rename vendor/github.com/godbus/dbus/{ => v5}/conn_unix.go (84%) rename vendor/github.com/godbus/dbus/{ => v5}/conn_windows.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/dbus.go (99%) rename vendor/github.com/godbus/dbus/{ => v5}/decoder.go (81%) rename vendor/github.com/godbus/dbus/{ => v5}/default_handler.go (82%) rename vendor/github.com/godbus/dbus/{ => v5}/doc.go (96%) rename vendor/github.com/godbus/dbus/{ => v5}/encoder.go (98%) rename vendor/github.com/godbus/dbus/{ => v5}/export.go (99%) create mode 100644 vendor/github.com/godbus/dbus/v5/go.mod create mode 100644 vendor/github.com/godbus/dbus/v5/go.sum rename vendor/github.com/godbus/dbus/{ => v5}/homedir.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/homedir_dynamic.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/homedir_static.go (100%) create mode 100644 vendor/github.com/godbus/dbus/v5/match.go rename vendor/github.com/godbus/dbus/{ => v5}/message.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/object.go (83%) rename vendor/github.com/godbus/dbus/{ => v5}/server_interfaces.go (94%) rename vendor/github.com/godbus/dbus/{ => v5}/sig.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/transport_darwin.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/transport_generic.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/transport_nonce_tcp.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/transport_tcp.go (97%) rename vendor/github.com/godbus/dbus/{ => v5}/transport_unix.go (99%) rename vendor/github.com/godbus/dbus/{ => v5}/transport_unixcred_dragonfly.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/transport_unixcred_freebsd.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/transport_unixcred_linux.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/transport_unixcred_openbsd.go (100%) rename vendor/github.com/godbus/dbus/{ => v5}/variant.go (95%) rename vendor/github.com/godbus/dbus/{ => v5}/variant_lexer.go (95%) rename vendor/github.com/godbus/dbus/{ => v5}/variant_parser.go (100%) rename vendor/github.com/google/cadvisor/{utils/docker => container/docker/utils}/docker.go (93%) create mode 100644 vendor/github.com/google/cadvisor/machine/operatingsystem_unix.go create mode 100644 vendor/github.com/google/cadvisor/machine/operatingsystem_windows.go create mode 100644 vendor/github.com/google/cadvisor/metrics/metrics.go create mode 100644 vendor/github.com/google/cadvisor/metrics/prometheus_fake.go create mode 100644 vendor/github.com/google/cadvisor/metrics/prometheus_machine.go create mode 100644 vendor/github.com/google/cadvisor/nvm/machine_libipmctl.go create mode 100644 vendor/github.com/google/cadvisor/nvm/machine_no_libipmctl.go create mode 100644 vendor/github.com/google/cadvisor/perf/collector_libpfm.go create mode 100644 vendor/github.com/google/cadvisor/perf/collector_no_libpfm.go create mode 100644 vendor/github.com/google/cadvisor/perf/config.go create mode 100644 vendor/github.com/google/cadvisor/perf/manager_libpfm.go create mode 100644 vendor/github.com/google/cadvisor/perf/manager_no_libpfm.go create mode 100644 vendor/github.com/google/cadvisor/perf/types_libpfm.go create mode 100644 vendor/github.com/google/cadvisor/perf/uncore_libpfm.go create mode 100644 vendor/github.com/google/cadvisor/resctrl/collector.go create mode 100644 vendor/github.com/google/cadvisor/resctrl/manager.go create mode 100644 vendor/github.com/google/cadvisor/stats/noop.go rename vendor/github.com/google/cadvisor/{accelerators => stats}/types.go (62%) create mode 100644 vendor/github.com/googleapis/gax-go/v2/LICENSE create mode 100644 vendor/github.com/googleapis/gax-go/v2/call_option.go create mode 100644 vendor/github.com/googleapis/gax-go/v2/gax.go create mode 100644 vendor/github.com/googleapis/gax-go/v2/go.mod create mode 100644 vendor/github.com/googleapis/gax-go/v2/go.sum create mode 100644 vendor/github.com/googleapis/gax-go/v2/header.go create mode 100644 vendor/github.com/googleapis/gax-go/v2/invoke.go rename vendor/github.com/googleapis/gnostic/{OpenAPIv2 => openapiv2}/OpenAPIv2.go (100%) rename vendor/github.com/googleapis/gnostic/{OpenAPIv2 => openapiv2}/OpenAPIv2.pb.go (87%) rename vendor/github.com/googleapis/gnostic/{OpenAPIv2 => openapiv2}/OpenAPIv2.proto (100%) rename vendor/github.com/googleapis/gnostic/{OpenAPIv2 => openapiv2}/README.md (100%) rename vendor/github.com/googleapis/gnostic/{OpenAPIv2 => openapiv2}/openapi-2.0.json (100%) create mode 100644 vendor/github.com/hashicorp/errwrap/go.mod create mode 100644 vendor/github.com/hashicorp/go-multierror/go.mod create mode 100644 vendor/github.com/hashicorp/go-multierror/go.sum create mode 100644 vendor/github.com/hashicorp/go-multierror/sort.go create mode 100644 vendor/github.com/kubernetes-sigs/cri-tools/pkg/common/config.go create mode 100644 vendor/github.com/kubernetes-sigs/cri-tools/pkg/common/file.go delete mode 100644 vendor/github.com/mattn/go-shellwords/.travis.yml delete mode 100644 vendor/github.com/mattn/go-shellwords/README.md delete mode 100644 vendor/github.com/mattn/go-shellwords/go.mod delete mode 100644 vendor/github.com/mattn/go-shellwords/shellwords.go delete mode 100644 vendor/github.com/mattn/go-shellwords/util_go15.go delete mode 100644 vendor/github.com/mattn/go-shellwords/util_posix.go delete mode 100644 vendor/github.com/mattn/go-shellwords/util_windows.go create mode 100644 vendor/github.com/mistifyio/go-zfs/.travis.yml create mode 100644 vendor/github.com/mistifyio/go-zfs/utils_notsolaris.go create mode 100644 vendor/github.com/mistifyio/go-zfs/utils_solaris.go create mode 100644 vendor/github.com/moby/ipvs/.gitignore rename vendor/{k8s.io/kubernetes/third_party/forked => github.com/moby}/ipvs/LICENSE (100%) create mode 100644 vendor/github.com/moby/ipvs/README.md rename vendor/{k8s.io/kubernetes/third_party/forked => github.com/moby}/ipvs/constants.go (96%) create mode 100644 vendor/github.com/moby/ipvs/doc.go create mode 100644 vendor/github.com/moby/ipvs/go.mod create mode 100644 vendor/github.com/moby/ipvs/go.sum rename vendor/{k8s.io/kubernetes/third_party/forked => github.com/moby}/ipvs/ipvs.go (97%) rename vendor/{k8s.io/kubernetes/third_party/forked => github.com/moby}/ipvs/netlink.go (98%) create mode 100644 vendor/github.com/moby/term/.gitignore create mode 100644 vendor/github.com/moby/term/LICENSE create mode 100644 vendor/github.com/moby/term/ascii.go create mode 100644 vendor/github.com/moby/term/go.mod create mode 100644 vendor/github.com/moby/term/go.sum create mode 100644 vendor/github.com/moby/term/proxy.go create mode 100644 vendor/github.com/moby/term/tc.go create mode 100644 vendor/github.com/moby/term/term.go create mode 100644 vendor/github.com/moby/term/term_windows.go create mode 100644 vendor/github.com/moby/term/termios_bsd.go create mode 100644 vendor/github.com/moby/term/termios_linux.go create mode 100644 vendor/github.com/moby/term/windows/ansi_reader.go create mode 100644 vendor/github.com/moby/term/windows/ansi_writer.go create mode 100644 vendor/github.com/moby/term/windows/console.go create mode 100644 vendor/github.com/moby/term/windows/windows.go create mode 100644 vendor/github.com/moby/term/winsize.go create mode 100644 vendor/github.com/opencontainers/go-digest/LICENSE create mode 100644 vendor/github.com/opencontainers/go-digest/digestset/set.go create mode 100644 vendor/github.com/opencontainers/go-digest/go.mod delete mode 100644 vendor/github.com/opencontainers/runc/.pullapprove.yml create mode 100644 vendor/github.com/opencontainers/runc/Vagrantfile.centos7 create mode 100644 vendor/github.com/opencontainers/runc/Vagrantfile.fedora32 create mode 100644 vendor/github.com/opencontainers/runc/go.mod create mode 100644 vendor/github.com/opencontainers/runc/go.sum create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/devices/devices_emulator.go delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/apply_raw.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs.go rename vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/{fs_unsupported.go => unsupported.go} (100%) create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/create.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/apply_systemd.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/unified_hierarchy.go rename vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/{apply_nosystemd.go => unsupported.go} (60%) create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v1.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v2.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/cgroups/v1_utils.go delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/configs/device_defaults.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/configs/device_windows.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/intelrdt/cmt.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/intelrdt/mbm.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/intelrdt/monitoring.go delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/mount/mount.go delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/mount/mount_linux.go delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/mount/mountinfo.go create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/notify_linux_v2.go delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig.go delete mode 100644 vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig_notcgo.go delete mode 100644 vendor/github.com/opencontainers/runc/signalmap.go delete mode 100644 vendor/github.com/opencontainers/runc/signalmap_mipsx.go delete mode 100644 vendor/github.com/opencontainers/runc/vendor.conf create mode 100644 vendor/github.com/opencontainers/selinux/go-selinux/doc.go create mode 100644 vendor/github.com/opencontainers/selinux/go-selinux/selinux.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/build_info.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/build_info_pre_1.12.go delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/http.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/process_collector_other.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/process_collector_windows.go delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/testutil/lint.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/testutil/promlint/promlint.go create mode 100644 vendor/github.com/prometheus/common/expfmt/openmetrics_create.go create mode 100644 vendor/github.com/prometheus/procfs/.golangci.yml create mode 100644 vendor/github.com/prometheus/procfs/arp.go create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo.go create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_arm.go create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_arm64.go create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_default.go create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_mips.go create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_mips64.go create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_mips64le.go create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_mipsle.go create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_ppc64.go create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_ppc64le.go create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_s390x.go create mode 100644 vendor/github.com/prometheus/procfs/crypto.go create mode 100644 vendor/github.com/prometheus/procfs/fscache.go create mode 100644 vendor/github.com/prometheus/procfs/go.sum create mode 100644 vendor/github.com/prometheus/procfs/internal/fs/fs.go create mode 100644 vendor/github.com/prometheus/procfs/internal/util/readfile.go rename vendor/github.com/prometheus/procfs/internal/util/{sysreadfile_linux.go => sysreadfile.go} (88%) create mode 100644 vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go create mode 100644 vendor/github.com/prometheus/procfs/internal/util/valueparser.go create mode 100644 vendor/github.com/prometheus/procfs/kernel_random.go create mode 100644 vendor/github.com/prometheus/procfs/loadavg.go create mode 100644 vendor/github.com/prometheus/procfs/meminfo.go create mode 100644 vendor/github.com/prometheus/procfs/mountinfo.go create mode 100644 vendor/github.com/prometheus/procfs/net_conntrackstat.go create mode 100644 vendor/github.com/prometheus/procfs/net_sockstat.go create mode 100644 vendor/github.com/prometheus/procfs/net_softnet.go create mode 100644 vendor/github.com/prometheus/procfs/net_udp.go create mode 100644 vendor/github.com/prometheus/procfs/net_unix.go delete mode 100644 vendor/github.com/prometheus/procfs/nfs/nfs.go delete mode 100644 vendor/github.com/prometheus/procfs/nfs/parse.go delete mode 100644 vendor/github.com/prometheus/procfs/nfs/parse_nfs.go delete mode 100644 vendor/github.com/prometheus/procfs/nfs/parse_nfsd.go create mode 100644 vendor/github.com/prometheus/procfs/proc_cgroup.go rename vendor/github.com/prometheus/{client_golang/prometheus/promhttp/delegator_pre_1_8.go => procfs/proc_environ.go} (50%) create mode 100644 vendor/github.com/prometheus/procfs/proc_fdinfo.go create mode 100644 vendor/github.com/prometheus/procfs/proc_maps.go create mode 100644 vendor/github.com/prometheus/procfs/proc_psi.go create mode 100644 vendor/github.com/prometheus/procfs/proc_smaps.go create mode 100644 vendor/github.com/prometheus/procfs/proc_status.go create mode 100644 vendor/github.com/prometheus/procfs/schedstat.go create mode 100644 vendor/github.com/prometheus/procfs/swaps.go create mode 100644 vendor/github.com/prometheus/procfs/vm.go delete mode 100644 vendor/github.com/prometheus/procfs/xfs/parse.go delete mode 100644 vendor/github.com/prometheus/procfs/xfs/xfs.go create mode 100644 vendor/github.com/prometheus/procfs/zoneinfo.go create mode 100644 vendor/github.com/spf13/cobra/Makefile create mode 100644 vendor/github.com/spf13/cobra/custom_completions.go create mode 100644 vendor/github.com/spf13/cobra/fish_completions.go create mode 100644 vendor/github.com/spf13/cobra/fish_completions.md create mode 100644 vendor/github.com/vishvananda/netlink/.gitignore create mode 100644 vendor/github.com/vishvananda/netlink/devlink_linux.go create mode 100644 vendor/github.com/vishvananda/netlink/go.mod create mode 100644 vendor/github.com/vishvananda/netlink/go.sum create mode 100644 vendor/github.com/vishvananda/netlink/netns_linux.go create mode 100644 vendor/github.com/vishvananda/netlink/netns_unspecified.go create mode 100644 vendor/github.com/vishvananda/netlink/nl/devlink_linux.go create mode 100644 vendor/github.com/vishvananda/netlink/nl/rdma_link_linux.go create mode 100644 vendor/github.com/vishvananda/netlink/nl/seg6local_linux.go create mode 100644 vendor/github.com/vishvananda/netlink/rdma_link_linux.go create mode 100644 vendor/github.com/vishvananda/netns/go.mod create mode 100644 vendor/github.com/vishvananda/netns/go.sum create mode 100644 vendor/github.com/willf/bitset/.gitignore create mode 100644 vendor/github.com/willf/bitset/.travis.yml create mode 100644 vendor/github.com/willf/bitset/LICENSE create mode 100644 vendor/github.com/willf/bitset/Makefile create mode 100644 vendor/github.com/willf/bitset/README.md create mode 100644 vendor/github.com/willf/bitset/azure-pipelines.yml create mode 100644 vendor/github.com/willf/bitset/bitset.go create mode 100644 vendor/github.com/willf/bitset/popcnt.go create mode 100644 vendor/github.com/willf/bitset/popcnt_19.go create mode 100644 vendor/github.com/willf/bitset/popcnt_amd64.go create mode 100644 vendor/github.com/willf/bitset/popcnt_amd64.s create mode 100644 vendor/github.com/willf/bitset/popcnt_generic.go create mode 100644 vendor/github.com/willf/bitset/trailing_zeros_18.go create mode 100644 vendor/github.com/willf/bitset/trailing_zeros_19.go create mode 100644 vendor/go.etcd.io/bbolt/bolt_unix_aix.go create mode 100644 vendor/go.etcd.io/bbolt/go.mod create mode 100644 vendor/go.etcd.io/bbolt/go.sum create mode 100644 vendor/go.etcd.io/bbolt/unsafe.go delete mode 100644 vendor/go.opencensus.io/Gopkg.lock delete mode 100644 vendor/go.opencensus.io/Gopkg.toml create mode 100644 vendor/go.uber.org/atomic/error.go create mode 100644 vendor/golang.org/x/crypto/cast5/cast5.go create mode 100644 vendor/golang.org/x/crypto/openpgp/armor/armor.go create mode 100644 vendor/golang.org/x/crypto/openpgp/armor/encode.go create mode 100644 vendor/golang.org/x/crypto/openpgp/canonical_text.go create mode 100644 vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go create mode 100644 vendor/golang.org/x/crypto/openpgp/errors/errors.go create mode 100644 vendor/golang.org/x/crypto/openpgp/keys.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/compressed.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/config.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/literal.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/ocfb.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/opaque.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/packet.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/private_key.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/public_key.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/reader.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/signature.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/userattribute.go create mode 100644 vendor/golang.org/x/crypto/openpgp/packet/userid.go create mode 100644 vendor/golang.org/x/crypto/openpgp/read.go create mode 100644 vendor/golang.org/x/crypto/openpgp/s2k/s2k.go create mode 100644 vendor/golang.org/x/crypto/openpgp/write.go delete mode 100644 vendor/golang.org/x/crypto/poly1305/sum_noasm.go delete mode 100644 vendor/golang.org/x/crypto/poly1305/sum_vmsl_s390x.s create mode 100644 vendor/golang.org/x/mod/LICENSE create mode 100644 vendor/golang.org/x/mod/PATENTS rename vendor/golang.org/x/{tools/internal => mod}/module/module.go (57%) rename vendor/golang.org/x/{tools/internal => mod}/semver/semver.go (99%) rename vendor/golang.org/x/sys/cpu/{cpu_aix_ppc64.go => cpu_aix.go} (89%) create mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_arm.go create mode 100644 vendor/golang.org/x/sys/cpu/cpu_ppc64x.go create mode 100644 vendor/golang.org/x/sys/cpu/cpu_s390x.go create mode 100644 vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go create mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go create mode 100644 vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go create mode 100644 vendor/golang.org/x/text/unicode/norm/tables12.0.0.go create mode 100644 vendor/golang.org/x/text/width/tables12.0.0.go delete mode 100644 vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go delete mode 100644 vendor/golang.org/x/tools/go/gcexportdata/importer.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go delete mode 100644 vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go delete mode 100644 vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go delete mode 100644 vendor/golang.org/x/tools/go/packages/doc.go delete mode 100644 vendor/golang.org/x/tools/go/packages/external.go delete mode 100644 vendor/golang.org/x/tools/go/packages/golist.go delete mode 100644 vendor/golang.org/x/tools/go/packages/golist_overlay.go delete mode 100644 vendor/golang.org/x/tools/go/packages/packages.go delete mode 100644 vendor/golang.org/x/tools/go/packages/visit.go create mode 100644 vendor/golang.org/x/tools/internal/event/core/event.go create mode 100644 vendor/golang.org/x/tools/internal/event/core/export.go create mode 100644 vendor/golang.org/x/tools/internal/event/core/fast.go create mode 100644 vendor/golang.org/x/tools/internal/event/doc.go create mode 100644 vendor/golang.org/x/tools/internal/event/event.go create mode 100644 vendor/golang.org/x/tools/internal/event/keys/keys.go create mode 100644 vendor/golang.org/x/tools/internal/event/keys/standard.go create mode 100644 vendor/golang.org/x/tools/internal/event/label/label.go create mode 100644 vendor/golang.org/x/tools/internal/gocommand/invoke.go create mode 100644 vendor/golang.org/x/tools/internal/gocommand/vendor.go delete mode 100644 vendor/golang.org/x/tools/internal/span/parse.go delete mode 100644 vendor/golang.org/x/tools/internal/span/span.go delete mode 100644 vendor/golang.org/x/tools/internal/span/token.go delete mode 100644 vendor/golang.org/x/tools/internal/span/token111.go delete mode 100644 vendor/golang.org/x/tools/internal/span/token112.go delete mode 100644 vendor/golang.org/x/tools/internal/span/uri.go delete mode 100644 vendor/golang.org/x/tools/internal/span/utf16.go create mode 100644 vendor/golang.org/x/xerrors/LICENSE create mode 100644 vendor/golang.org/x/xerrors/PATENTS create mode 100644 vendor/golang.org/x/xerrors/README create mode 100644 vendor/golang.org/x/xerrors/adaptor.go create mode 100644 vendor/golang.org/x/xerrors/codereview.cfg create mode 100644 vendor/golang.org/x/xerrors/doc.go create mode 100644 vendor/golang.org/x/xerrors/errors.go create mode 100644 vendor/golang.org/x/xerrors/fmt.go create mode 100644 vendor/golang.org/x/xerrors/format.go create mode 100644 vendor/golang.org/x/xerrors/frame.go create mode 100644 vendor/golang.org/x/xerrors/go.mod create mode 100644 vendor/golang.org/x/xerrors/internal/internal.go create mode 100644 vendor/golang.org/x/xerrors/wrap.go delete mode 100644 vendor/google.golang.org/api/gensupport/backoff.go delete mode 100644 vendor/google.golang.org/api/gensupport/header.go delete mode 100644 vendor/google.golang.org/api/gensupport/retry.go delete mode 100644 vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE rename vendor/google.golang.org/api/{ => internal}/gensupport/buffer.go (100%) rename vendor/google.golang.org/api/{ => internal}/gensupport/doc.go (100%) rename vendor/google.golang.org/api/{ => internal}/gensupport/json.go (100%) rename vendor/google.golang.org/api/{ => internal}/gensupport/jsonfloat.go (65%) rename vendor/google.golang.org/api/{ => internal}/gensupport/media.go (98%) rename vendor/google.golang.org/api/{ => internal}/gensupport/params.go (100%) rename vendor/google.golang.org/api/{ => internal}/gensupport/resumable.go (74%) rename vendor/google.golang.org/api/{ => internal}/gensupport/send.go (100%) create mode 100644 vendor/google.golang.org/api/internal/third_party/uritemplates/LICENSE create mode 100644 vendor/google.golang.org/api/internal/third_party/uritemplates/METADATA rename vendor/google.golang.org/api/{googleapi/internal => internal/third_party}/uritemplates/uritemplates.go (98%) rename vendor/google.golang.org/api/{googleapi/internal => internal/third_party}/uritemplates/utils.go (100%) create mode 100644 vendor/gopkg.in/yaml.v3/.travis.yml create mode 100644 vendor/gopkg.in/yaml.v3/LICENSE create mode 100644 vendor/gopkg.in/yaml.v3/NOTICE create mode 100644 vendor/gopkg.in/yaml.v3/README.md create mode 100644 vendor/gopkg.in/yaml.v3/apic.go create mode 100644 vendor/gopkg.in/yaml.v3/decode.go create mode 100644 vendor/gopkg.in/yaml.v3/emitterc.go create mode 100644 vendor/gopkg.in/yaml.v3/encode.go create mode 100644 vendor/gopkg.in/yaml.v3/go.mod create mode 100644 vendor/gopkg.in/yaml.v3/parserc.go create mode 100644 vendor/gopkg.in/yaml.v3/readerc.go create mode 100644 vendor/gopkg.in/yaml.v3/resolve.go create mode 100644 vendor/gopkg.in/yaml.v3/scannerc.go create mode 100644 vendor/gopkg.in/yaml.v3/sorter.go create mode 100644 vendor/gopkg.in/yaml.v3/writerc.go create mode 100644 vendor/gopkg.in/yaml.v3/yaml.go create mode 100644 vendor/gopkg.in/yaml.v3/yamlh.go create mode 100644 vendor/gopkg.in/yaml.v3/yamlprivateh.go create mode 100644 vendor/k8s.io/api/admission/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/apps/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/apps/v1beta2/zz_generated.prerelease-lifecycle.go delete mode 100644 vendor/k8s.io/api/auditregistration/v1alpha1/generated.pb.go delete mode 100644 vendor/k8s.io/api/auditregistration/v1alpha1/generated.proto delete mode 100644 vendor/k8s.io/api/auditregistration/v1alpha1/types.go delete mode 100644 vendor/k8s.io/api/auditregistration/v1alpha1/types_swagger_doc_generated.go delete mode 100644 vendor/k8s.io/api/auditregistration/v1alpha1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/api/authentication/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/authorization/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/batch/v1beta1/zz_generated.prerelease-lifecycle.go rename vendor/k8s.io/{kube-scheduler/config/v1alpha1 => api/certificates/v1}/BUILD (66%) rename vendor/k8s.io/api/{auditregistration/v1alpha1 => certificates/v1}/doc.go (80%) create mode 100644 vendor/k8s.io/api/certificates/v1/generated.pb.go create mode 100644 vendor/k8s.io/api/certificates/v1/generated.proto rename vendor/k8s.io/{kubernetes/pkg/apis/auditregistration => api/certificates/v1}/register.go (68%) create mode 100644 vendor/k8s.io/api/certificates/v1/types.go create mode 100644 vendor/k8s.io/api/certificates/v1/types_swagger_doc_generated.go create mode 100644 vendor/k8s.io/api/certificates/v1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/api/certificates/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/coordination/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/core/v1/lifecycle.go create mode 100644 vendor/k8s.io/api/discovery/v1beta1/zz_generated.prerelease-lifecycle.go rename vendor/k8s.io/api/{auditregistration/v1alpha1 => events/v1}/BUILD (84%) rename vendor/k8s.io/{kube-scheduler/config/v1alpha1 => api/events/v1}/doc.go (79%) create mode 100644 vendor/k8s.io/api/events/v1/generated.pb.go create mode 100644 vendor/k8s.io/api/events/v1/generated.proto rename vendor/k8s.io/api/{auditregistration/v1alpha1 => events/v1}/register.go (73%) create mode 100644 vendor/k8s.io/api/events/v1/types.go create mode 100644 vendor/k8s.io/api/events/v1/types_swagger_doc_generated.go create mode 100644 vendor/k8s.io/api/events/v1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/api/events/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/extensions/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/networking/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/node/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/policy/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/rbac/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/scheduling/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/api/storage/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.prerelease-lifecycle.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/meta/conditions.go rename vendor/k8s.io/{kubernetes/pkg/apis/auditregistration => apimachinery/pkg/apis/meta/internalversion}/validation/BUILD (54%) create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/validation/validation.go create mode 100644 vendor/k8s.io/apiserver/pkg/audit/context.go delete mode 100644 vendor/k8s.io/apiserver/pkg/audit/event/BUILD delete mode 100644 vendor/k8s.io/apiserver/pkg/audit/event/attributes.go delete mode 100644 vendor/k8s.io/apiserver/pkg/audit/policy/dynamic.go delete mode 100644 vendor/k8s.io/apiserver/pkg/audit/util/BUILD delete mode 100644 vendor/k8s.io/apiserver/pkg/audit/util/conversion.go create mode 100644 vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go create mode 100644 vendor/k8s.io/apiserver/pkg/endpoints/deprecation/BUILD create mode 100644 vendor/k8s.io/apiserver/pkg/endpoints/deprecation/deprecation.go create mode 100644 vendor/k8s.io/apiserver/pkg/endpoints/filters/audit_annotations.go create mode 100644 vendor/k8s.io/apiserver/pkg/endpoints/filters/warning.go create mode 100644 vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/lastappliedmanager.go create mode 100644 vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/lastappliedupdater.go rename vendor/k8s.io/{kubernetes/pkg/apis/auditregistration/install => apiserver/pkg/endpoints/warning}/BUILD (50%) create mode 100644 vendor/k8s.io/apiserver/pkg/endpoints/warning/warning.go create mode 100644 vendor/k8s.io/apiserver/pkg/server/options/authentication_dynamic_request_header.go delete mode 100644 vendor/k8s.io/apiserver/pkg/server/options/events.go create mode 100644 vendor/k8s.io/apiserver/pkg/server/options/serving_unix.go create mode 100644 vendor/k8s.io/apiserver/pkg/server/options/serving_windows.go create mode 100644 vendor/k8s.io/apiserver/pkg/storage/cacher/metrics.go create mode 100644 vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller_debug.go rename vendor/k8s.io/apiserver/pkg/util/{term => flowcontrol/debug}/BUILD (70%) create mode 100644 vendor/k8s.io/apiserver/pkg/util/flowcontrol/debug/dump.go create mode 100644 vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/integrator.go create mode 100644 vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/sample_and_watermark.go create mode 100644 vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/timed_observer.go create mode 100644 vendor/k8s.io/apiserver/pkg/warning/BUILD create mode 100644 vendor/k8s.io/apiserver/pkg/warning/context.go delete mode 100644 vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/BUILD delete mode 100644 vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/defaults.go delete mode 100644 vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/dynamic.go delete mode 100644 vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced/BUILD delete mode 100644 vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced/enforced.go delete mode 100644 vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/factory.go delete mode 100644 vendor/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile/BUILD delete mode 100644 vendor/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile/passwordfile.go delete mode 100644 vendor/k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth/BUILD delete mode 100644 vendor/k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth/basicauth.go create mode 100644 vendor/k8s.io/cli-runtime/pkg/genericclioptions/client_config.go delete mode 100644 vendor/k8s.io/client-go/informers/auditregistration/BUILD delete mode 100644 vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/auditsink.go rename vendor/k8s.io/client-go/informers/{auditregistration/v1alpha1 => certificates/v1}/BUILD (76%) create mode 100644 vendor/k8s.io/client-go/informers/certificates/v1/certificatesigningrequest.go rename vendor/k8s.io/client-go/informers/{auditregistration => certificates/v1}/interface.go (63%) create mode 100644 vendor/k8s.io/client-go/informers/events/v1/BUILD create mode 100644 vendor/k8s.io/client-go/informers/events/v1/event.go rename vendor/k8s.io/client-go/informers/{auditregistration/v1alpha1 => events/v1}/interface.go (81%) create mode 100644 vendor/k8s.io/client-go/informers/networking/v1/ingress.go create mode 100644 vendor/k8s.io/client-go/informers/networking/v1/ingressclass.go create mode 100644 vendor/k8s.io/client-go/informers/storage/v1alpha1/csistoragecapacity.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go delete mode 100644 vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go rename vendor/k8s.io/client-go/kubernetes/typed/{auditregistration/v1alpha1 => certificates/v1}/BUILD (72%) rename vendor/k8s.io/client-go/kubernetes/typed/{auditregistration/v1alpha1/auditregistration_client.go => certificates/v1/certificates_client.go} (58%) create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go rename vendor/k8s.io/client-go/kubernetes/typed/{auditregistration/v1alpha1 => certificates/v1}/doc.go (97%) rename vendor/k8s.io/client-go/kubernetes/typed/{auditregistration/v1alpha1 => certificates/v1}/fake/BUILD (73%) rename vendor/k8s.io/client-go/kubernetes/typed/{auditregistration/v1alpha1 => certificates/v1}/fake/doc.go (100%) rename vendor/k8s.io/client-go/kubernetes/typed/{auditregistration/v1alpha1/fake/fake_auditregistration_client.go => certificates/v1/fake/fake_certificates_client.go} (74%) create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificatesigningrequest.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/generated_expansion.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1/BUILD create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1/event.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1/events_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/BUILD create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_event.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_events_client.go rename vendor/k8s.io/client-go/kubernetes/typed/{auditregistration/v1alpha1 => events/v1}/generated_expansion.go (92%) create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingress.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingressclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_csistoragecapacity.go delete mode 100644 vendor/k8s.io/client-go/listers/auditregistration/v1alpha1/auditsink.go rename vendor/k8s.io/client-go/listers/{auditregistration/v1alpha1 => certificates/v1}/BUILD (78%) create mode 100644 vendor/k8s.io/client-go/listers/certificates/v1/certificatesigningrequest.go rename vendor/k8s.io/client-go/listers/{auditregistration/v1alpha1 => certificates/v1}/expansion_generated.go (76%) create mode 100644 vendor/k8s.io/client-go/listers/events/v1/BUILD create mode 100644 vendor/k8s.io/client-go/listers/events/v1/event.go create mode 100644 vendor/k8s.io/client-go/listers/events/v1/expansion_generated.go create mode 100644 vendor/k8s.io/client-go/listers/networking/v1/ingress.go create mode 100644 vendor/k8s.io/client-go/listers/networking/v1/ingressclass.go create mode 100644 vendor/k8s.io/client-go/listers/storage/v1alpha1/csistoragecapacity.go create mode 100644 vendor/k8s.io/client-go/rest/fake/BUILD create mode 100644 vendor/k8s.io/client-go/rest/fake/fake.go create mode 100644 vendor/k8s.io/client-go/rest/warnings.go rename vendor/k8s.io/{kubernetes/pkg/kubelet/apis => cloud-provider/api}/well_known_annotations.go (82%) rename vendor/k8s.io/{kubernetes/pkg/controller/cloud => cloud-provider/controllers/node}/BUILD (75%) rename vendor/k8s.io/{kubernetes/pkg/controller/cloud => cloud-provider/controllers/node}/node_controller.go (85%) create mode 100644 vendor/k8s.io/cloud-provider/controllers/nodelifecycle/BUILD rename vendor/k8s.io/{kubernetes/pkg/controller/cloud => cloud-provider/controllers/nodelifecycle}/OWNERS (100%) rename vendor/k8s.io/{kubernetes/pkg/controller/cloud => cloud-provider/controllers/nodelifecycle}/node_lifecycle_controller.go (64%) rename vendor/k8s.io/{kubernetes/pkg/controller => cloud-provider/controllers}/route/BUILD (92%) rename vendor/k8s.io/{kubernetes/pkg/controller => cloud-provider/controllers}/route/OWNERS (100%) rename vendor/k8s.io/{kubernetes/pkg/controller => cloud-provider/controllers}/route/doc.go (91%) rename vendor/k8s.io/{kubernetes/pkg/controller => cloud-provider/controllers}/route/route_controller.go (99%) rename vendor/k8s.io/{kubernetes/pkg/controller => cloud-provider/controllers}/service/BUILD (85%) rename vendor/k8s.io/{kubernetes/pkg/controller => cloud-provider/controllers}/service/OWNERS (100%) rename vendor/k8s.io/{kubernetes/pkg/controller => cloud-provider/controllers}/service/controller.go (92%) rename vendor/k8s.io/{kubernetes/pkg/controller => cloud-provider/controllers}/service/doc.go (90%) create mode 100644 vendor/k8s.io/cloud-provider/node/helpers/status.go create mode 100644 vendor/k8s.io/cloud-provider/ports.go create mode 100644 vendor/k8s.io/component-base/cli/flag/ciphersuites_flag_114.go rename vendor/k8s.io/{kubernetes/pkg/client/leaderelectionconfig => component-base/config/options}/BUILD (58%) rename vendor/k8s.io/{kubernetes/pkg/client/leaderelectionconfig/config.go => component-base/config/options/leaderelectionconfig.go} (87%) rename vendor/k8s.io/{kubernetes/pkg/util => component-base}/configz/BUILD (81%) rename vendor/k8s.io/{kubernetes/pkg/util => component-base}/configz/configz.go (100%) create mode 100644 vendor/k8s.io/component-base/logs/OWNERS create mode 100644 vendor/k8s.io/component-base/logs/json/BUILD create mode 100644 vendor/k8s.io/component-base/logs/json/json.go rename vendor/k8s.io/{kubernetes/pkg/kubelet/util => component-base/logs}/logreduction/BUILD (80%) rename vendor/k8s.io/{kubernetes/pkg/kubelet/util => component-base/logs}/logreduction/logreduction.go (100%) create mode 100644 vendor/k8s.io/component-base/logs/options.go create mode 100644 vendor/k8s.io/component-base/logs/registry.go create mode 100644 vendor/k8s.io/component-base/metrics/options.go create mode 100644 vendor/k8s.io/component-base/metrics/testutil/promlint.go create mode 100644 vendor/k8s.io/component-base/term/BUILD rename vendor/k8s.io/{apiserver/pkg/util => component-base}/term/term.go (96%) create mode 100644 vendor/k8s.io/csi-translation-lib/plugins/vsphere_volume.go create mode 100644 vendor/k8s.io/klog/v2/.gitignore create mode 100644 vendor/k8s.io/klog/v2/CONTRIBUTING.md create mode 100644 vendor/k8s.io/klog/v2/LICENSE create mode 100644 vendor/k8s.io/klog/v2/OWNERS create mode 100644 vendor/k8s.io/klog/v2/README.md create mode 100644 vendor/k8s.io/klog/v2/RELEASE.md create mode 100644 vendor/k8s.io/klog/v2/SECURITY_CONTACTS create mode 100644 vendor/k8s.io/klog/v2/code-of-conduct.md create mode 100644 vendor/k8s.io/klog/v2/go.mod create mode 100644 vendor/k8s.io/klog/v2/go.sum create mode 100644 vendor/k8s.io/klog/v2/klog.go create mode 100644 vendor/k8s.io/klog/v2/klog_file.go create mode 100644 vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.prerelease-lifecycle.go delete mode 100644 vendor/k8s.io/kube-scheduler/config/v1alpha1/types.go delete mode 100644 vendor/k8s.io/kube-scheduler/config/v1alpha1/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/kube-scheduler/config/v1alpha2/zz_generated.deepcopy.go rename vendor/k8s.io/kube-scheduler/config/{v1alpha2 => v1beta1}/BUILD (81%) rename vendor/k8s.io/kube-scheduler/config/{v1alpha2 => v1beta1}/doc.go (90%) rename vendor/k8s.io/kube-scheduler/config/{v1alpha2 => v1beta1}/register.go (82%) rename vendor/k8s.io/kube-scheduler/config/{v1alpha2 => v1beta1}/types.go (60%) create mode 100644 vendor/k8s.io/kube-scheduler/config/v1beta1/types_pluginargs.go create mode 100644 vendor/k8s.io/kube-scheduler/config/v1beta1/zz_generated.deepcopy.go rename vendor/k8s.io/{kubernetes/pkg/kubectl => kubectl/pkg}/cmd/cp/BUILD (94%) rename vendor/k8s.io/{kubernetes/pkg/kubectl => kubectl/pkg}/cmd/cp/cp.go (96%) delete mode 100644 vendor/k8s.io/kubectl/pkg/metricsutil/metrics_client.go create mode 100644 vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/endpointslicemirroringcontroller.go create mode 100644 vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_providerless.go rename vendor/k8s.io/{apiserver/pkg/server/options/webhook.go => kubernetes/cmd/kubelet/app/options/globalflags_providers.go} (53%) delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/auditregistration/install/install.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/auditregistration/types.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/defaults.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/zz_generated.conversion.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/zz_generated.defaults.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/auditregistration/validation/validation.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/apis/auditregistration/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/BUILD create mode 100644 vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/conversion.go create mode 100644 vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/defaults.go rename vendor/k8s.io/kubernetes/pkg/apis/{auditregistration/v1alpha1 => certificates/v1}/doc.go (59%) create mode 100644 vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/helpers.go rename vendor/k8s.io/kubernetes/pkg/{scheduler/apis/config/v1alpha1 => apis/certificates/v1}/register.go (61%) create mode 100644 vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/zz_generated.conversion.go rename vendor/k8s.io/kubernetes/pkg/{scheduler/apis/config/v1alpha1 => apis/certificates/v1}/zz_generated.defaults.go (70%) create mode 100644 vendor/k8s.io/kubernetes/pkg/apis/events/v1/BUILD create mode 100644 vendor/k8s.io/kubernetes/pkg/apis/events/v1/conversion.go create mode 100644 vendor/k8s.io/kubernetes/pkg/apis/events/v1/doc.go rename vendor/k8s.io/kubernetes/pkg/apis/{auditregistration/v1alpha1 => events/v1}/register.go (73%) create mode 100644 vendor/k8s.io/kubernetes/pkg/apis/events/v1/zz_generated.conversion.go rename vendor/k8s.io/kubernetes/pkg/{scheduler/apis/config/v1alpha2 => apis/events/v1}/zz_generated.defaults.go (70%) create mode 100644 vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/conversion.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/controller/.import-restrictions create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/BUILD create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/OWNERS create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/BUILD rename vendor/k8s.io/kubernetes/pkg/{apis/auditregistration => controller/endpointslicemirroring/config}/doc.go (77%) create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/types.go rename vendor/k8s.io/kubernetes/pkg/{apis/auditregistration => controller/endpointslicemirroring/config/v1alpha1}/BUILD (59%) create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/conversion.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/defaults.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/doc.go rename vendor/k8s.io/{kube-scheduler => kubernetes/pkg/controller/endpointslicemirroring}/config/v1alpha1/register.go (51%) create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/zz_generated.conversion.go rename vendor/k8s.io/kubernetes/pkg/{scheduler/apis => controller/endpointslicemirroring}/config/v1alpha1/zz_generated.deepcopy.go (100%) create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointset.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointslice_tracker.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointslicemirroring_controller.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/events.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/BUILD create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/cache.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/metrics.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/reconciler.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/reconciler_helpers.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/utils.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/metrics.go rename vendor/k8s.io/kubernetes/pkg/{scheduler/listers => controller/volume/common}/BUILD (54%) create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/volume/common/common.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/BUILD rename vendor/k8s.io/kubernetes/pkg/{kubelet/cadvisor => controller/volume/ephemeral}/OWNERS (67%) create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/controller.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/doc.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder_cache.go create mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux_docker.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/checkpoint/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/checkpoint/checkpoint.go rename vendor/k8s.io/kubernetes/pkg/kubelet/cm/{cpumanager => }/containermap/BUILD (88%) rename vendor/k8s.io/kubernetes/pkg/kubelet/cm/{cpumanager => }/containermap/container_map.go (100%) delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_file.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/container/container_reference_manager.go rename vendor/k8s.io/kubernetes/pkg/kubelet/{ => cri}/remote/BUILD (75%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{ => cri}/remote/OWNERS (100%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{ => cri}/remote/doc.go (100%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{ => cri}/remote/remote_image.go (98%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{ => cri}/remote/remote_runtime.go (76%) create mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/BUILD create mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_unix.go create mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_unsupported.go create mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_windows.go rename vendor/k8s.io/kubernetes/pkg/kubelet/{ => cri}/remote/utils.go (100%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri}/streaming/BUILD (78%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri}/streaming/errors.go (100%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri/streaming}/portforward/BUILD (83%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri/streaming}/portforward/constants.go (100%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri/streaming}/portforward/httpstream.go (99%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri/streaming}/portforward/portforward.go (100%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri/streaming}/portforward/websocket.go (99%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri/streaming}/remotecommand/BUILD (87%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri/streaming}/remotecommand/attach.go (100%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri/streaming}/remotecommand/doc.go (88%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri/streaming}/remotecommand/exec.go (100%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri/streaming}/remotecommand/httpstream.go (99%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri/streaming}/remotecommand/websocket.go (100%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri}/streaming/request_cache.go (100%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{server => cri}/streaming/server.go (98%) rename vendor/k8s.io/kubernetes/pkg/{registry/auditregistration/auditsink/doc.go => kubelet/dockershim/dockershim_nodocker.go} (80%) delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/images/OWNERS create mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim.go create mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim_nodocker.go create mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/convert.go create mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/legacy/BUILD create mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/legacy/logs.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/preemption/OWNERS rename vendor/k8s.io/kubernetes/pkg/kubelet/{eviction => prober}/OWNERS (65%) rename vendor/k8s.io/kubernetes/pkg/kubelet/{metrics => server}/OWNERS (72%) create mode 100644 vendor/k8s.io/kubernetes/pkg/kubelet/time_cache.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/storage/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/storage/storage.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/strategy.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/registry/auditregistration/rest/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/registry/auditregistration/rest/storage_auditregistration.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/registry/cachesize/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/registry/cachesize/OWNERS delete mode 100644 vendor/k8s.io/kubernetes/pkg/registry/cachesize/cachesize.go create mode 100644 vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/BUILD create mode 100644 vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/doc.go create mode 100644 vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/storage/BUILD create mode 100644 vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/storage/storage.go create mode 100644 vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/strategy.go create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types_pluginargs.go create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/conversion.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/conversion.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/defaults.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/doc.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/zz_generated.conversion.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/conversion.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/zz_generated.conversion.go rename vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/{v1alpha2 => v1beta1}/BUILD (68%) create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/conversion.go rename vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/{v1alpha2 => v1beta1}/defaults.go (65%) rename vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/{v1alpha2 => v1beta1}/doc.go (88%) rename vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/{v1alpha2 => v1beta1}/register.go (87%) create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/zz_generated.conversion.go rename vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/{v1alpha2 => v1beta1}/zz_generated.deepcopy.go (97%) create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/zz_generated.defaults.go create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/validation_pluginargs.go create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/BUILD create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/candidate.go create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_limits.go rename vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/{defaultpodtopologyspread => selectorspread}/BUILD (84%) rename vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/{defaultpodtopologyspread/default_pod_topology_spread.go => selectorspread/selector_spread.go} (74%) create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/OWNERS create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/BUILD rename vendor/k8s.io/kubernetes/pkg/scheduler/framework/{v1alpha1 => runtime}/framework.go (60%) rename vendor/k8s.io/kubernetes/pkg/scheduler/framework/{v1alpha1 => runtime}/metrics_recorder.go (95%) rename vendor/k8s.io/kubernetes/pkg/scheduler/framework/{v1alpha1 => runtime}/registry.go (84%) rename vendor/k8s.io/kubernetes/pkg/scheduler/framework/{v1alpha1 => runtime}/waiting_pods_map.go (91%) create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/extender.go create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/listers.go rename vendor/k8s.io/kubernetes/pkg/scheduler/{nodeinfo/node_info.go => framework/v1alpha1/types.go} (55%) create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/internal/parallelize/BUILD rename vendor/k8s.io/kubernetes/pkg/scheduler/{util => internal/parallelize}/error_channel.go (98%) create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/internal/parallelize/parallelism.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/listers/listers.go create mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/metrics/profile_metrics.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/nodeinfo/BUILD delete mode 100644 vendor/k8s.io/kubernetes/pkg/scheduler/nodeinfo/host_ports.go create mode 100644 vendor/k8s.io/kubernetes/pkg/serviceaccount/metrics.go delete mode 100644 vendor/k8s.io/kubernetes/third_party/forked/ipvs/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/azure_containerserviceclient.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/doc.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/interface.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/azure_deploymentclient.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/doc.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/interface.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/doc.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/interface.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/azure_fileclient.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/doc.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/interface.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/doc.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/interface.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/doc.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/interface.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/doc.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/interface.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/doc.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/interface.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/doc.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/interface.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/doc.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/interface.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/BUILD create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/doc.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/interface.go create mode 100644 vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_metrics.go create mode 100644 vendor/k8s.io/utils/clock/README.md create mode 100644 vendor/k8s.io/utils/exec/README.md create mode 100644 vendor/k8s.io/utils/io/README.md create mode 100644 vendor/k8s.io/utils/nsenter/README.md create mode 100644 vendor/k8s.io/utils/pointer/README.md create mode 100644 vendor/k8s.io/utils/trace/README.md create mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/LICENSE rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/fieldpath/doc.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/fieldpath/element.go (99%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/fieldpath/fromvalue.go (98%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/fieldpath/managers.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/fieldpath/path.go (98%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/fieldpath/pathelementmap.go (98%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/fieldpath/serialize-pe.go (99%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/fieldpath/serialize.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/fieldpath/set.go (83%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/merge/conflict.go (90%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/merge/update.go (87%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/schema/doc.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/schema/elements.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/schema/equals.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/schema/schemaschema.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/typed/doc.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/typed/helpers.go (97%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/typed/merge.go (98%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/typed/parser.go (98%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/typed/remove.go (93%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/typed/tofieldset.go (96%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/typed/typed.go (93%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/typed/union.go (98%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/typed/validate.go (97%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/allocator.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/doc.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/fields.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/jsontagutil.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/list.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/listreflect.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/listunstructured.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/map.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/mapreflect.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/mapunstructured.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/reflectcache.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/scalar.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/structreflect.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/value.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/valuereflect.go (100%) rename vendor/sigs.k8s.io/structured-merge-diff/{v3 => v4}/value/valueunstructured.go (100%) diff --git a/go.mod b/go.mod index 8767f90e70d..fb4b70cf931 100644 --- a/go.mod +++ b/go.mod @@ -3,61 +3,55 @@ module github.com/rancher/k3s go 1.13 replace ( - github.com/Microsoft/hcsshim => github.com/Microsoft/hcsshim v0.8.7-0.20190926181021-82c7525d98c8 + github.com/Microsoft/hcsshim => github.com/Microsoft/hcsshim v0.8.9 github.com/benmoss/go-powershell => github.com/rancher/go-powershell v0.0.0-20200701184732-233247d45373 github.com/containerd/btrfs => github.com/containerd/btrfs v0.0.0-20181101203652-af5082808c83 - github.com/containerd/cgroups => github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601 + github.com/containerd/cgroups => github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 github.com/containerd/console => github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50 - github.com/containerd/containerd => github.com/rancher/containerd v1.3.6-k3s1 + github.com/containerd/containerd => github.com/rancher/containerd v1.4.0-k3s1 github.com/containerd/continuity => github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02 - github.com/containerd/cri => github.com/rancher/cri v1.3.0-k3s.7 github.com/containerd/fifo => github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c + github.com/containerd/go-runc => github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 github.com/containerd/typeurl => github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd github.com/coreos/flannel => github.com/rancher/flannel v0.12.0-k3s1 github.com/coreos/go-systemd => github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e github.com/docker/distribution => github.com/docker/distribution v0.0.0-20190205005809-0d3efadf0154 github.com/docker/docker => github.com/docker/docker v17.12.0-ce-rc1.0.20190219214528-cbe11bdc6da8+incompatible github.com/docker/libnetwork => github.com/docker/libnetwork v0.8.0-dev.2.0.20190624125649-f0e46a78ea34 - github.com/go-critic/go-critic => github.com/go-critic/go-critic v0.3.5-0.20190526074819-1df300866540 - github.com/golangci/errcheck => github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 - github.com/golangci/go-tools => github.com/golangci/go-tools v0.0.0-20190318060251-af6baa5dc196 - github.com/golangci/gofmt => github.com/golangci/gofmt v0.0.0-20181222123516-0b8337e80d98 - github.com/golangci/gosec => github.com/golangci/gosec v0.0.0-20190211064107-66fb7fc33547 - github.com/golangci/ineffassign => github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc - github.com/golangci/lint-1 => github.com/golangci/lint-1 v0.0.0-20190420132249-ee948d087217 + github.com/golang/protobuf => github.com/golang/protobuf v1.3.5 github.com/juju/errors => github.com/rancher/nocode v0.0.0-20200630202308-cb097102c09f - github.com/kubernetes-sigs/cri-tools => github.com/rancher/cri-tools v1.18.0-k3s1 + github.com/kubernetes-sigs/cri-tools => github.com/rancher/cri-tools v1.19.0-k3s1 github.com/matryer/moq => github.com/rancher/moq v0.0.0-20190404221404-ee5226d43009 - github.com/opencontainers/runtime-spec => github.com/opencontainers/runtime-spec v0.0.0-20180911193056-5684b8af48c1 - github.com/prometheus/client_golang => github.com/prometheus/client_golang v0.9.2 - github.com/prometheus/client_model => github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 - github.com/prometheus/common => github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 - github.com/prometheus/procfs => github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a - k8s.io/api => github.com/rancher/kubernetes/staging/src/k8s.io/api v1.18.8-k3s1 - k8s.io/apiextensions-apiserver => github.com/rancher/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.18.8-k3s1 - k8s.io/apimachinery => github.com/rancher/kubernetes/staging/src/k8s.io/apimachinery v1.18.8-k3s1 - k8s.io/apiserver => github.com/rancher/kubernetes/staging/src/k8s.io/apiserver v1.18.8-k3s1 - k8s.io/cli-runtime => github.com/rancher/kubernetes/staging/src/k8s.io/cli-runtime v1.18.8-k3s1 - k8s.io/client-go => github.com/rancher/kubernetes/staging/src/k8s.io/client-go v1.18.8-k3s1 - k8s.io/cloud-provider => github.com/rancher/kubernetes/staging/src/k8s.io/cloud-provider v1.18.8-k3s1 - k8s.io/cluster-bootstrap => github.com/rancher/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.18.8-k3s1 - k8s.io/code-generator => github.com/rancher/kubernetes/staging/src/k8s.io/code-generator v1.18.8-k3s1 - k8s.io/component-base => github.com/rancher/kubernetes/staging/src/k8s.io/component-base v1.18.8-k3s1 - k8s.io/cri-api => github.com/rancher/kubernetes/staging/src/k8s.io/cri-api v1.18.8-k3s1 - k8s.io/csi-translation-lib => github.com/rancher/kubernetes/staging/src/k8s.io/csi-translation-lib v1.18.8-k3s1 - k8s.io/kube-aggregator => github.com/rancher/kubernetes/staging/src/k8s.io/kube-aggregator v1.18.8-k3s1 - k8s.io/kube-controller-manager => github.com/rancher/kubernetes/staging/src/k8s.io/kube-controller-manager v1.18.8-k3s1 - k8s.io/kube-proxy => github.com/rancher/kubernetes/staging/src/k8s.io/kube-proxy v1.18.8-k3s1 - k8s.io/kube-scheduler => github.com/rancher/kubernetes/staging/src/k8s.io/kube-scheduler v1.18.8-k3s1 - k8s.io/kubectl => github.com/rancher/kubernetes/staging/src/k8s.io/kubectl v1.18.8-k3s1 - k8s.io/kubelet => github.com/rancher/kubernetes/staging/src/k8s.io/kubelet v1.18.8-k3s1 - k8s.io/kubernetes => github.com/rancher/kubernetes v1.18.8-k3s1 - k8s.io/legacy-cloud-providers => github.com/rancher/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.18.8-k3s1 - k8s.io/metrics => github.com/rancher/kubernetes/staging/src/k8s.io/metrics v1.18.8-k3s1 - k8s.io/node-api => github.com/rancher/kubernetes/staging/src/k8s.io/node-api v1.18.8-k3s1 - k8s.io/sample-apiserver => github.com/rancher/kubernetes/staging/src/k8s.io/sample-apiserver v1.18.8-k3s1 - k8s.io/sample-cli-plugin => github.com/rancher/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.18.8-k3s1 - k8s.io/sample-controller => github.com/rancher/kubernetes/staging/src/k8s.io/sample-controller v1.18.8-k3s1 + github.com/opencontainers/runc => github.com/opencontainers/runc v1.0.0-rc92 + github.com/opencontainers/runtime-spec => github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6 + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 + google.golang.org/grpc => google.golang.org/grpc v1.27.1 + gopkg.in/square/go-jose.v2 => gopkg.in/square/go-jose.v2 v2.2.2 + k8s.io/api => github.com/rancher/kubernetes/staging/src/k8s.io/api v1.19.0-k3s1 + k8s.io/apiextensions-apiserver => github.com/rancher/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.19.0-k3s1 + k8s.io/apimachinery => github.com/rancher/kubernetes/staging/src/k8s.io/apimachinery v1.19.0-k3s1 + k8s.io/apiserver => github.com/rancher/kubernetes/staging/src/k8s.io/apiserver v1.19.0-k3s1 + k8s.io/cli-runtime => github.com/rancher/kubernetes/staging/src/k8s.io/cli-runtime v1.19.0-k3s1 + k8s.io/client-go => github.com/rancher/kubernetes/staging/src/k8s.io/client-go v1.19.0-k3s1 + k8s.io/cloud-provider => github.com/rancher/kubernetes/staging/src/k8s.io/cloud-provider v1.19.0-k3s1 + k8s.io/cluster-bootstrap => github.com/rancher/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.19.0-k3s1 + k8s.io/code-generator => github.com/rancher/kubernetes/staging/src/k8s.io/code-generator v1.19.0-k3s1 + k8s.io/component-base => github.com/rancher/kubernetes/staging/src/k8s.io/component-base v1.19.0-k3s1 + k8s.io/cri-api => github.com/rancher/kubernetes/staging/src/k8s.io/cri-api v1.19.0-k3s1 + k8s.io/csi-translation-lib => github.com/rancher/kubernetes/staging/src/k8s.io/csi-translation-lib v1.19.0-k3s1 + k8s.io/kube-aggregator => github.com/rancher/kubernetes/staging/src/k8s.io/kube-aggregator v1.19.0-k3s1 + k8s.io/kube-controller-manager => github.com/rancher/kubernetes/staging/src/k8s.io/kube-controller-manager v1.19.0-k3s1 + k8s.io/kube-proxy => github.com/rancher/kubernetes/staging/src/k8s.io/kube-proxy v1.19.0-k3s1 + k8s.io/kube-scheduler => github.com/rancher/kubernetes/staging/src/k8s.io/kube-scheduler v1.19.0-k3s1 + k8s.io/kubectl => github.com/rancher/kubernetes/staging/src/k8s.io/kubectl v1.19.0-k3s1 + k8s.io/kubelet => github.com/rancher/kubernetes/staging/src/k8s.io/kubelet v1.19.0-k3s1 + k8s.io/kubernetes => github.com/rancher/kubernetes v1.19.0-k3s1 + k8s.io/legacy-cloud-providers => github.com/rancher/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.19.0-k3s1 + k8s.io/metrics => github.com/rancher/kubernetes/staging/src/k8s.io/metrics v1.19.0-k3s1 + k8s.io/node-api => github.com/rancher/kubernetes/staging/src/k8s.io/node-api v1.19.0-k3s1 + k8s.io/sample-apiserver => github.com/rancher/kubernetes/staging/src/k8s.io/sample-apiserver v1.19.0-k3s1 + k8s.io/sample-cli-plugin => github.com/rancher/kubernetes/staging/src/k8s.io/sample-cli-plugin v1.19.0-k3s1 + k8s.io/sample-controller => github.com/rancher/kubernetes/staging/src/k8s.io/sample-controller v1.19.0-k3s1 mvdan.cc/unparam => mvdan.cc/unparam v0.0.0-20190209190245-fbb59629db34 ) @@ -65,25 +59,17 @@ require ( github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/bronze1man/goStrongswanVici v0.0.0-20190828090544-27d02f80ba40 // indirect - github.com/containerd/cgroups v0.0.0-00010101000000-000000000000 // indirect - github.com/containerd/containerd v1.3.6 - github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6 // indirect - github.com/containerd/cri v0.0.0-00010101000000-000000000000 - github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c // indirect - github.com/containerd/go-cni v0.0.0-20190813230227-49fbd9b210f3 // indirect - github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda // indirect - github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8 // indirect + github.com/containerd/containerd v1.4.0 + github.com/containerd/cri v1.11.1-0.20200820101445-b0cc07999aa5 github.com/containernetworking/plugins v0.8.2 // indirect - github.com/coreos/flannel v0.11.0 + github.com/coreos/flannel v0.12.0 github.com/coreos/go-iptables v0.4.2 github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f - github.com/docker/docker v1.4.2-0.20191205034852-d163fbba3c82 - github.com/docker/go-metrics v0.0.1 // indirect + github.com/docker/docker v17.12.0-ce-rc1.0.20200821074627-7ae5222c72cc+incompatible github.com/erikdubbelboer/gspt v0.0.0-20190125194910-e68493906b83 github.com/frankban/quicktest v1.10.2 // indirect github.com/go-bindata/go-bindata v3.1.2+incompatible github.com/go-sql-driver/mysql v1.4.1 - github.com/gogo/googleapis v1.3.0 // indirect github.com/google/tcpproxy v0.0.0-20180808230851-dfa16c61dad2 github.com/google/uuid v1.1.1 github.com/gorilla/mux v1.7.4 @@ -92,8 +78,8 @@ require ( github.com/lib/pq v1.1.1 github.com/mattn/go-sqlite3 v1.13.0 github.com/natefinch/lumberjack v2.0.0+incompatible - github.com/opencontainers/runc v1.0.0-rc10 - github.com/opencontainers/selinux v1.5.3-0.20200613095409-bb88c45a3863 + github.com/opencontainers/runc v1.0.0-rc92 + github.com/opencontainers/selinux v1.6.0 github.com/pierrec/lz4 v2.5.2+incompatible github.com/pkg/errors v0.9.1 github.com/rancher/dynamiclistener v0.2.1 @@ -108,21 +94,20 @@ require ( github.com/spf13/pflag v1.0.5 github.com/tchap/go-patricia v2.3.0+incompatible // indirect github.com/urfave/cli v1.22.2 - // 54ba958 is v3.4.9 - go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f - golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 - golang.org/x/net v0.0.0-20200506145744-7e3656a0809f - golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 - google.golang.org/grpc v1.26.0 + go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5 + golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 + golang.org/x/net v0.0.0-20200822124328-c89045814202 + golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6 + google.golang.org/grpc v1.31.1 gopkg.in/yaml.v2 v2.3.0 - k8s.io/api v0.18.5 - k8s.io/apimachinery v0.18.5 - k8s.io/apiserver v0.0.0 + k8s.io/api v0.19.0 + k8s.io/apimachinery v0.19.0 + k8s.io/apiserver v0.19.0 k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible k8s.io/cloud-provider v0.0.0 - k8s.io/component-base v0.0.0 - k8s.io/cri-api v0.0.0 + k8s.io/component-base v0.19.0 + k8s.io/cri-api v0.19.0 k8s.io/klog v1.0.0 - k8s.io/kubernetes v1.18.0 + k8s.io/kubernetes v1.19.0 sigs.k8s.io/yaml v1.2.0 ) diff --git a/go.sum b/go.sum index d4ac1a7ce05..8f3eb534594 100644 --- a/go.sum +++ b/go.sum @@ -1,21 +1,35 @@ bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690/go.mod h1:Ulb78X89vxKYgdL24HMTiXYHlyHEvruOj1ZPlqeNEZM= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -github.com/Azure/azure-sdk-for-go v35.0.0+incompatible h1:PkmdmQUmeSdQQ5258f4SyCf2Zcz0w67qztEg37cOR7U= -github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.51.0 h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v43.0.0+incompatible h1:/wSNCu0e6EsHFR4Qa3vBEBbicaprEHMyyga9g8RTULI= +github.com/Azure/azure-sdk-for-go v43.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest v0.9.6 h1:5YWtOnckcudzIw8lPPBcWOnmIFWMtHci1ZWAZulMSx0= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/to v0.2.0 h1:nQOZzFCudTh+TvquAtCRjM01VEYx85e9qbwt5ncW4L8= github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= github.com/Azure/go-autorest/autorest/validation v0.1.0 h1:ISSNzGUh+ZSzizJWOWzs8bwpXIePbGLW4z/AmUFGH5A= @@ -27,8 +41,8 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534 h1:N7lSsF+R7wSulUADi36SInSQA3RvfO/XclHQfedr0qk= -github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= +github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317 h1:JhyuWIqYrstW7KHMjk/fTqU0xtMpBOHuiTA2FVc7L4E= +github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317/go.mod h1:DF8FZRxMHMGv/vP2lQP6h+dYzzjpuRn24VeRiYn3qjQ= github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab h1:UKkYhof1njT1/xq4SEg5z+VpTgjmNeHwPGRQl7takDI= github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU= @@ -37,15 +51,16 @@ github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcy github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/hcsshim v0.8.7-0.20190926181021-82c7525d98c8 h1:gtZtklqA6kJUJ7l3aMd/qxT9PblTr808fEYnD6n25rA= -github.com/Microsoft/hcsshim v0.8.7-0.20190926181021-82c7525d98c8/go.mod h1:1+AuASoTkbeMyoDy6WXp10FyWKaYrUallNFrzRdUYBY= +github.com/Microsoft/hcsshim v0.8.9 h1:VrfodqvztU8YSOvygU+DN1BGaSGxmrNfqOv5oOuX2Bk= +github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= +github.com/Microsoft/hcsshim/test v0.0.0-20200803203718-d80bc7196cb0 h1:+qqN+HZE55Zap8OE1BmcVStbX6JHVhqeWKPi0kzF1eA= +github.com/Microsoft/hcsshim/test v0.0.0-20200803203718-d80bc7196cb0/go.mod h1:30A5igQ91GEmhYJF8TaRP79pMBOYynRsyOByfVV0dU4= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/OpenPeeDeeP/depguard v1.0.0/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= @@ -55,12 +70,14 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Rican7/retry v0.1.0 h1:FqK94z34ly8Baa6K+G8Mmza9rYWTKOJk+yckIBB5qVk= github.com/Rican7/retry v0.1.0/go.mod h1:FgOROf8P5bebcC1DS0PdOQiqGUridaZvikzUmkFW6gg= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -68,23 +85,20 @@ github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:l github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM= +github.com/aws/aws-sdk-go v1.6.10/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k= github.com/aws/aws-sdk-go v1.12.54/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k= github.com/aws/aws-sdk-go v1.28.2 h1:j5IXG9CdyLfcVfICqo1PXVv+rua+QQHbkXuvuU/JF+8= github.com/aws/aws-sdk-go v1.28.2/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/bazelbuild/bazel-gazelle v0.18.2/go.mod h1:D0ehMSbS+vesFsLGiD6JXu3mVEzOlfUl8wNnq+x/9p0= -github.com/bazelbuild/bazel-gazelle v0.19.1-0.20191105222053-70208cbdc798/go.mod h1:rPwzNHUqEzngx1iVBfO/2X2npKaT3tqPqqHW6rVsn/A= -github.com/bazelbuild/buildtools v0.0.0-20190731111112-f720930ceb60/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= -github.com/bazelbuild/buildtools v0.0.0-20190917191645-69366ca98f89/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= -github.com/bazelbuild/rules_go v0.0.0-20190719190356-6dae44dc5cab/go.mod h1:MC23Dc/wkXEyk3Wpq6lCqz0ZAYOZDw2DR5y3N1q2i7M= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.0+incompatible h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/bronze1man/goStrongswanVici v0.0.0-20171013065002-4d72634a2f11/go.mod h1:c+n7HXa5FxzR8GDsmu773UtbtrmKvMVerLVQeEbnzAE= github.com/bronze1man/goStrongswanVici v0.0.0-20190828090544-27d02f80ba40 h1:udTfdeYqe866Z5mxTaEm5irSJK2vupyxwBOHAYEVtJo= github.com/bronze1man/goStrongswanVici v0.0.0-20190828090544-27d02f80ba40/go.mod h1:fWUtBEPt2yjrr3WFhOqvajM8JSEU8bEeBcoeSCsKRpc= @@ -94,48 +108,68 @@ github.com/canonical/go-dqlite v1.5.1 h1:1YjtIrFsC1A3XlgsX38ARAiKhvkZS63PqsEd8z3 github.com/canonical/go-dqlite v1.5.1/go.mod h1:wp00vfMvPYgNCyxcPdHB5XExmDoCGoPUGymloAQT17Y= github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6ZsFhtM8HrDku0pxJ3/Lr51rwykrzgFwpmTzleatY= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 h1:7aWHqerlJ41y6FOsEUvknqgXnGmJyJSbjhAWq5pO4F8= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= -github.com/checkpoint-restore/go-criu v0.0.0-20181120144056-17b0214f6c48 h1:AQMF0Xixllgf29MKlx/TGEhRk7bEDX5kxz8Ui8lOvEs= -github.com/checkpoint-restore/go-criu v0.0.0-20181120144056-17b0214f6c48/go.mod h1:TrMrLQfeENAPYPRsJuq3jsqdlRh3lvi6trTZJG8+tho= +github.com/checkpoint-restore/go-criu/v4 v4.1.0 h1:WW2B2uxx9KWF6bGlHqhm8Okiafwwx7Y2kcpn8lCpjgo= +github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= -github.com/cilium/ebpf v0.0.0-20191025125908-95b36a581eed h1:/UgmF+cZTm9kp4uJ122y/9cVhczNJCgAgAeH2FfzPeg= -github.com/cilium/ebpf v0.0.0-20191025125908-95b36a581eed/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= +github.com/cilium/ebpf v0.0.0-20200601085316-9f1617e5c574/go.mod h1:XT+cAw5wfvsodedcijoh1l9cf7v1x9FlFB/3VmF/O8s= +github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775 h1:cHzBGGVew0ezFsq2grfy2RsB8hO/eNyBgOLHBCqfR1U= +github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= github.com/container-storage-interface/spec v1.2.0 h1:bD9KIVgaVKKkQ/UbVUY9kCaH/CJbhNxe0eeB4JeJV2s= github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4= -github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601 h1:6xW3ogNpFIly0umJGEKzFfGDNUk5rXFE1lJ3/gBmz3U= -github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= +github.com/containerd/aufs v0.0.0-20191030083217-371312c1e31c/go.mod h1:KWTFEKnST/R6wiSG+n7rid/ZQJxi73594So04IsWRpc= +github.com/containerd/btrfs v0.0.0-20181101203652-af5082808c83/go.mod h1:obwvRpZTBx8yJQ/6w+6mrVoLAiS0CedRD8CCD+U7vZQ= +github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 h1:qWj4qVYZ95vLWwqyNJCQg7rDsG5wPdze0UaPolH7DUk= +github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50 h1:WMpHmC6AxwWb9hMqhudkqG7A/p14KiMnl6d3r1iUMjU= github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02 h1:tN9D97v5A5QuKdcKHKt+UMKrkQ5YXUnD8iM7IAAjEfI= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/cri v1.11.1-0.20200810101850-4e6644c8cf7f/go.mod h1:DavH5Qa8+6jOmeOMO3dhWoqksucZDe06LfuhBz/xPZs= +github.com/containerd/cri v1.11.1-0.20200820101445-b0cc07999aa5 h1:PiJVfx4pkjk8fRItqifuGJ5uHDF9hbVL6vE04QLsV10= +github.com/containerd/cri v1.11.1-0.20200820101445-b0cc07999aa5/go.mod h1:DavH5Qa8+6jOmeOMO3dhWoqksucZDe06LfuhBz/xPZs= github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c h1:KFbqHhDeaHM7IfFtXHfUHMDaUStpM2YwBR+iJCIOsKk= github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/go-cni v0.0.0-20190813230227-49fbd9b210f3 h1:owkX+hC6Inv1XUep/pAjF7qJpnZWjbtETw5r1DVYFPo= -github.com/containerd/go-cni v0.0.0-20190813230227-49fbd9b210f3/go.mod h1:2wlRxCQdiBY+OcjNg5x8kI+5mEL1fGt25L4IzQHYJsM= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda h1:3LYDkJtHAZGbWD75PoTBJuxldc+njsz9uSfjwIoOR6c= -github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-cni v1.0.0 h1:A681A9YQ5Du9V2/gZGk/pTm6g69wF0aGd9qFN9syB1E= +github.com/containerd/go-cni v1.0.0/go.mod h1:8n8EnvP0b886Wmqum9jDXlN59aHCIBKgaNYQzcDvJbU= +github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 h1:PRTagVMbJcCezLcHXe8UJvR1oBzp2lG3CEumeFOLOds= +github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= +github.com/containerd/imgcrypt v1.0.1 h1:IyI3IIP4m6zrNFuNFT7HizGVcuD6BYJFpdM1JvPKCbQ= +github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8 h1:jYCTS/16RWXXtVHNHo1KWNegd1kKQ7lHd7BStj/0hKw= github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v1.0.0/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v1.0.1 h1:IfVOxKbjyBn9maoye2JN95pgGYOmPkQVqxtOu7rtNIc= +github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd h1:JNn81o/xG+8NEo3bC/vx9pbi/g2WI8mtP2/nXzu297Y= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/containerd/zfs v0.0.0-20191030014035-9abf673ca6ff/go.mod h1:mp4bnlceN4Zxp2fwNMzdKcPMopBajlb+VrHYSpKipcE= github.com/containernetworking/cni v0.7.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.7.1 h1:fE3r16wpSEyaqY4Z4oFrLMmIGfBYIKpPrHK31EJ9FzE= github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.0 h1:BT9lpgGoH4jw3lFC7Odz2prU5ruiYKcgAjMCbgybcKI= +github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/plugins v0.7.6/go.mod h1:dagHaAhNjXjT9QYOklkKJDGaQPTg4pf//FrUcJeb7FU= github.com/containernetworking/plugins v0.8.2 h1:5lnwfsAYO+V7yXhysJKy3E1A2Gy9oVut031zfdOzI9w= github.com/containernetworking/plugins v0.8.2/go.mod h1:TxALKWZpWL79BC3GOYKJzzXr7U8R23PdhwaLp6F3adc= -github.com/coredns/corefile-migration v1.0.6/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E= +github.com/containers/ocicrypt v1.0.1 h1:EToign46OSLTFWnb2oNj9RG3XDnkOX8r28ZIXUuk5Pc= +github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= +github.com/coredns/corefile-migration v1.0.10/go.mod h1:RMy/mXdeDlYwzt0vdMEJvT2hGJ2I86/eO0UdXmH9XNI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.1.11+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-iptables v0.4.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-iptables v0.4.2 h1:KH0EwId05JwWIfb96gWvkiT2cbuOu8ygqUaB+yPAwIg= github.com/coreos/go-iptables v0.4.2/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= @@ -146,11 +180,12 @@ github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmf github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.1.0 h1:kq/SbG2BCKLkDKkjQf5OWwKWUKj1lgs3lFI4PxnR5lg= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea h1:n2Ltr3SrfQlf/9nOna1DoGKxLx3qTSI8Ttl6Xrqp6mw= -github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -170,14 +205,16 @@ github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1 github.com/denverdino/aliyungo v0.0.0-20170629053852-f6cab0c35083/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/docker/distribution v0.0.0-20190205005809-0d3efadf0154 h1:C8WBRZDiZn3IZnBlbHVeTWF32XhVGK69Li4GC/3jL9Q= github.com/docker/distribution v0.0.0-20190205005809-0d3efadf0154/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v17.12.0-ce-rc1.0.20190219214528-cbe11bdc6da8+incompatible h1:ZZvtagdntE3LlHuNFoj0r5nVFllfu6Mn413hOu01cZI= github.com/docker/docker v17.12.0-ce-rc1.0.20190219214528-cbe11bdc6da8+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.3.0 h1:3lOnM9cSzgGwx8VfK/NGOW5fLQ0GjIlCkaktF+n1M6o= -github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= @@ -196,44 +233,50 @@ github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkg github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/erikdubbelboer/gspt v0.0.0-20190125194910-e68493906b83 h1:ngHdSomn2MyugZYKHiycad2xERwIrmMlET7A0lC0UU4= github.com/erikdubbelboer/gspt v0.0.0-20190125194910-e68493906b83/go.mod h1:v6o7m/E9bfvm79dE1iFiF+3T7zLBnrjYjkWMa1J+Hv0= github.com/euank/go-kmsg-parser v2.0.0+incompatible h1:cHD53+PLQuuQyLZeriD1V/esuG4MuU0Pjs5y6iknohY= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= -github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= -github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.10.2 h1:19ARM85nVi4xH7xPXuc5eM/udya5ieh7b/Sv+d844Tk= github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa h1:RDBNVkRviHZtvDvId8XSGPu3rmpmSe+wKRcEWNgsfWU= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-acme/lego v2.5.0+incompatible/go.mod h1:yzMNe9CasVUhkquNvti5nAtPmG94USbYxYrZfTkIn0M= github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE= github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= -github.com/go-critic/go-critic v0.3.5-0.20190526074819-1df300866540/go.mod h1:+sE8vrLDS2M0pZkBk0wy6+nLdKexVDrl/jBqQOTDThA= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.9.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-ini/ini v1.28.1/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -292,31 +335,18 @@ github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZp github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c h1:RBUpb2b14UnmRHNd2uHz20ZHLDK+SW5Us/vWF5IHRaY= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f h1:zlOR3rOlPAVvtfuxGKoghCmop5B0TRyu/ZieziZuGiM= -github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.7.1 h1:DP+LD/t0njgoPBvT5MJLeliUIVQR03hiKR6vezdwHlc= github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= -github.com/gogo/googleapis v1.3.0 h1:M695OaDJ5ipWvDPcoAg/YL9c3uORAegkEfBqTQF/fTQ= -github.com/gogo/googleapis v1.3.0/go.mod h1:d+q1s/xVJxZGKWwC/6UfPIF33J+G1Tq4GYv9Y+Tg/EU= +github.com/gogo/googleapis v1.3.2 h1:kX1es4djPJrsDhY7aZKJy7aZasdcB5oSOEphMjSB53c= +github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -324,35 +354,15 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekf github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.0.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/go-tools v0.0.0-20190318060251-af6baa5dc196/go.mod h1:unzUULGw35sjyOYjUt0jMTXqHlZPpPc6e+xfO4cd6mM= -github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= -github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= -github.com/golangci/gofmt v0.0.0-20181222123516-0b8337e80d98/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.18.0/go.mod h1:kaqo8l0OZKYPtjNmG4z4HrWLgcYNIJ9B9q3LWri9uLg= -github.com/golangci/gosec v0.0.0-20190211064107-66fb7fc33547/go.mod h1:0qUabqiIQgfmlAmulqxyiGkkyF6/tOGSnY2cnPVwrzU= -github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= -github.com/golangci/lint-1 v0.0.0-20190420132249-ee948d087217/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= -github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450 h1:7xqw01UYS+KCI25bMrPxwNYkSns2Db1ziQPpVq99FpE= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995 h1:f5gsjBiF9tRRVomCvrkGMMWI8W1f2OBFar2c5oakAP0= @@ -362,23 +372,23 @@ github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA// github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cadvisor v0.35.0 h1:qivoEm+iGqTrd0CKSmQidxfOxUxkNZovvYs/8G6B6ao= -github.com/google/cadvisor v0.35.0/go.mod h1:1nql6U13uTHaLYB8rLS5x9IJc2qT6Xd/Tr1sTX6NE48= +github.com/google/cadvisor v0.37.0 h1:t3txV4zNZZGTuwuA/Onm3HToPhg16GjigAHZHEVIz+c= +github.com/google/cadvisor v0.37.0/go.mod h1:OhDE+goNVel0eGY8mR7Ifq1QUI1in5vJBIgIpcajK/I= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-containerregistry v0.0.0-20190617215043-876b8855d23c/go.mod h1:yZAFP63pRshzrEYLXLGPmUt0Ay+2zdjmMN1loCnRLUk= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/tcpproxy v0.0.0-20180808230851-dfa16c61dad2 h1:AtvtonGEH/fZK0XPNNBdB6swgy7Iudfx88wzyIpwqJ8= github.com/google/tcpproxy v0.0.0-20180808230851-dfa16c61dad2/go.mod h1:DavVbd41y+b7ukKDmlnPR4nGYmkWXR6vHUkjQNiHPBs= @@ -386,18 +396,17 @@ github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= +github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -405,44 +414,47 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce h1:prjrVgOk2Yg6w+PflHoszQNLTUh4kaByUcEWM/9uin4= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874 h1:cAv7ZbSmyb1wjn6T4TIiyFCkpcfgpbcNNC3bM2srLaI= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/heketi/heketi v9.0.1-0.20190917153846-c2e2a4ab7ab9+incompatible/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o= github.com/heketi/tests v0.0.0-20151005000721-f3775cbcefd6/go.mod h1:xGMAM8JLi7UkZt1i4FQeQy0R2T8GLUwQhOP5M1gBhy4= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/insomniacslk/dhcp v0.0.0-20200420235442-ed3125c2efe7/go.mod h1:CfMdguCK66I5DAUJgGKyNz8aB6vO5dZzkm9Xep6WGvw= +github.com/ishidawataru/sctp v0.0.0-20190723014705-7c296d48a2b5/go.mod h1:DM4VvS+hD/kDi1U1QsX2fnZowwBhqD0Dk3bRPKF/Oc8= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jamescun/tuntap v0.0.0-20190712092105-cb1fb277045c/go.mod h1:zzwpsgcYhzzIP5WyF8g9ivCv38cY9uAV9Gu0m3lThhE= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jetstack/cert-manager v0.7.2/go.mod h1:nbddmhjWxYGt04bxvwVGUSeLhZ2PCyNvd7MpXdq+yWY= github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a/go.mod h1:wK6yTYYcgjHE1Z1QtXACPDjcFJyBskHEdagmnq3vsP8= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -452,37 +464,34 @@ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22 github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= github.com/juju/testing v0.0.0-20190613124551-e81189438503/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/karrick/godirwalk v1.7.5 h1:VbzFqwXwNbAZoA6W5odrLr+hKK197CcENcPh6E/gJ0M= github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v0.0.0-20161130080628-0de1eaf82fa3/go.mod h1:jxZFDH7ILpTPQTk+E2s+z4CUas9lVNjIuKR4c5/zKgM= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/knative/build v0.6.0/go.mod h1:/sU74ZQkwlYA5FwYDJhYTy61i/Kn+5eWfln2jDbw3Qo= github.com/knative/pkg v0.0.0-20190514205332-5e4512dcb2ca/go.mod h1:7Ijfhw7rfB+H9VtosIsDYvZQ+qYTz7auK3fHW/5z4ww= github.com/knative/serving v0.6.1/go.mod h1:ljvMfwQy2qanaM/8xnBSK4Mz3Vv2NawC2fo5kFRJS1A= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -494,13 +503,11 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhn github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lpabon/godbc v0.1.1/go.mod h1:Jo9QV0cf3U6jZABgiJ2skINAXb9j8m51r07g4KI92ZA= github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f/go.mod h1:JpH9J1c9oX6otFSgdUHwUBUizmKlrMjxWnIAjff4m04= github.com/lucas-clemente/quic-clients v0.1.0/go.mod h1:y5xVIEoObKqULIKivu+gD/LU90pL73bTdtQjPBvtCBk= github.com/lucas-clemente/quic-go v0.10.2/go.mod h1:hvaRS9IHjFLMq76puFJeWNfmn+H70QZ/CXoxqw9bzao= github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced/go.mod h1:NCcRLrOTZbzhZvixZLlERbJtDtYsmMw8Jc4vS8Z0g58= -github.com/magiconair/properties v1.7.6/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -513,39 +520,34 @@ github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7 github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= -github.com/mattn/go-shellwords v1.0.5 h1:JhhFTIOslh5ZsPrpa3Wdg8bF0WI3b44EMblmU9wIsXc= -github.com/mattn/go-shellwords v1.0.5/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.13.0 h1:LnJI81JidiW9r7pS/hXe6cFeO5EXNq7KbfvoJLRI69c= github.com/mattn/go-sqlite3 v1.13.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mesos/mesos-go v0.0.9 h1:w8V5sOEnxzHZ2kAOy273v/HgbolyI6XI+qe5jx5u+Y0= -github.com/mesos/mesos-go v0.0.9/go.mod h1:kPYCMQ9gsOXVAle1OsoY4I1+9kPu8GHkf88aV59fDr4= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mholt/certmagic v0.6.2-0.20190624175158-6a42ef9fe8c2/go.mod h1:g4cOPxcjV0oFq3qwpjSA30LReKD8AoIfwAY9VvG35NY= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.4 h1:rCMZsU2ScVSYcAsOXgmC6+AKOK+6pmQTOcw03nfwYV0= github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mindprince/gonvml v0.0.0-20190828220739-9ebdce4bb989 h1:PS1dLCGtD8bb9RPKJrc8bS7qHL6JnW1CZvwzH9dPoUs= github.com/mindprince/gonvml v0.0.0-20190828220739-9ebdce4bb989/go.mod h1:2eu9pRWp8mo84xCg6KswZ+USQHjwgRhNp06sozOdsTY= -github.com/mistifyio/go-zfs v2.1.1+incompatible h1:gAMO1HM9xBRONLHHYnu5iFsOJUiJdNZo6oqSENd4eW8= -github.com/mistifyio/go-zfs v2.1.1+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/moby/ipvs v1.0.1 h1:aoZ7fhLTXgDbzVrAnvV+XbKOU8kOET7B3+xULDF/1o0= +github.com/moby/ipvs v1.0.1/go.mod h1:2pngiyseZbIKXNv7hsKj3O9UEz30c53MT9005gt2hxQ= github.com/moby/sys/mountinfo v0.1.3 h1:KIrhRO14+AkwKvG/g2yIpNMOUVZ02xNhOw8KY1WsLOI= github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd h1:aY7OQNf2XqY/JQ6qREWamhI/81os/agb2BAGpcx5yWI= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/vpnkit v0.4.0/go.mod h1:KyjUrL9cb6ZSNNAUwZfqRjhwwgJ3BJN+kXh0t43WTUQ= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -556,23 +558,24 @@ github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mozilla/tls-observatory v0.0.0-20180409132520-8791a200eb40/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= -github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618 h1:7InQ7/zrOh6SlFjaXFubv0xX0HsuC9qJsdqm7bNQpYM= -github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= +github.com/mrunalp/fileutils v0.0.0-20200520151820-abd8a0e76976 h1:aZQToFSLH8ejFeSkTc3r3L4dPImcj7Ib/KgmkQqbGGg= +github.com/mrunalp/fileutils v0.0.0-20200520151820-abd8a0e76976/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mvdan/xurls v1.1.0/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/natefinch/lumberjack v2.0.0+incompatible h1:4QJd3OLAMgj7ph+yZTuX13Ld4UpgHp07nNdFX7mqFfM= github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk= -github.com/nbutton23/zxcvbn-go v0.0.0-20160627004424-a22cb81b2ecd/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= -github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -581,31 +584,34 @@ github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc10 h1:AbmCEuSZXVflng0/cboQkpdEOeBsPMjz6tmq4Pv8MZw= -github.com/opencontainers/runc v1.0.0-rc10/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runtime-spec v0.0.0-20180911193056-5684b8af48c1 h1:AcjCvgprf9I23wEYTHuyuHcuuQAp4hK5l+u1FUXgVaM= -github.com/opencontainers/runtime-spec v0.0.0-20180911193056-5684b8af48c1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runc v1.0.0-rc92 h1:+IczUKCRzDzFDnw99O/PAqrcBBCoRp9xN3cB1SYSNS4= +github.com/opencontainers/runc v1.0.0-rc92/go.mod h1:X1zlU4p7wOlX4+WRCz+hvlRv8phdL7UqbYD+vQwNMmE= +github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6 h1:NhsM2gc769rVWDqJvapK37r+7+CBXI8xHhnfnt8uQsg= +github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= -github.com/opencontainers/selinux v1.3.1-0.20190929122143-5215b1806f52 h1:B8hYj3NxHmjsC3T+tnlZ1UhInqUgnyF1zlGPmzNg2Qk= -github.com/opencontainers/selinux v1.3.1-0.20190929122143-5215b1806f52/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs= -github.com/opencontainers/selinux v1.5.3-0.20200613095409-bb88c45a3863 h1:pAUx/lkmegJdgEH27YJImvNLOs/ydx/NbKJ2vIJ2PHY= -github.com/opencontainers/selinux v1.5.3-0.20200613095409-bb88c45a3863/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g= +github.com/opencontainers/selinux v1.5.2/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g= +github.com/opencontainers/selinux v1.6.0 h1:+bIAS/Za3q5FTwWym4fTB0vObnfCf3G/NC7K6Jx62mY= +github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.1.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= @@ -620,26 +626,40 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021 h1:0XM1XL/OFFJjXsYXlG30spTkV/E9+gmd5GD1w2HE8xM= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20 h1:7sBb9iOkeq+O7AXlVoH/8zpIcRXX523zMkKKspHjjx8= -github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= -github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 h1:PnBWHBf+6L0jOqq0gIVUe6Yk0/QMZ640k6NvkxcBf+8= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a h1:9a8MnZMP0X2nLJdBg+pBmGgkJlSaKC2KaQmTCk1XDtE= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI= github.com/rakelkar/gonetsh v0.0.0-20190930180311-e5c5ffe4bdf0 h1:iXE9kmlAqhusXxzkXictdNgWS7p4ZBnmv9SdyMgTf6E= github.com/rakelkar/gonetsh v0.0.0-20190930180311-e5c5ffe4bdf0/go.mod h1:4XHkfaUj+URzGO9sohoAgt2V9Y8nIW7fugpu0E6gShk= -github.com/rancher/containerd v1.3.6-k3s1 h1:wSGjKMQM3TRCsgWAd+lA9zy/JM4/A9MuUxZFGIxt0+0= -github.com/rancher/containerd v1.3.6-k3s1/go.mod h1:ZMfzmqce2Z+QSEqdHMfeJs1TZ/UeJ1aDrazjpQT4ehM= -github.com/rancher/cri v1.3.0-k3s.7 h1:5V/AVFLCpYIsJMavJKjKpwrQU92e87dhWSX43N4q8Gg= -github.com/rancher/cri v1.3.0-k3s.7/go.mod h1:Ht5T1dIKzm+4NExmb7wDVG6qR+j0xeXIjjhCv1d9geY= -github.com/rancher/cri-tools v1.18.0-k3s1 h1:pLYthxpSu6k3Up9tNAMA0MK2ERqB6FC1sZQPRSW1qSg= -github.com/rancher/cri-tools v1.18.0-k3s1/go.mod h1:Ij/GWNRcEDP6zVN6eQpvN/s0nhuJVtPQFy7RAdl+Wu8= +github.com/rancher/containerd v1.4.0-k3s1 h1:3ZiF3vYP7sAuH3fTVa1P1tmUETKPpRw0rAAH3wB6xFs= +github.com/rancher/containerd v1.4.0-k3s1/go.mod h1:9GDw4Y295rEr7u9UZVleiAbsZM/d34thMi018FZStd4= +github.com/rancher/cri-tools v1.19.0-k3s1 h1:c6lqNWyoAB5+NaUREbpZxKXCuYl9he24/DZEgHywg+A= +github.com/rancher/cri-tools v1.19.0-k3s1/go.mod h1:bitvtZRi5F7t505Yw3zPzp22LOao1lqJKHfx6x0hnpw= github.com/rancher/dynamiclistener v0.2.1 h1:QiY1jxs2TOLrKB04G36vE2ehEvPMPGiWp8zEHLKB1nE= github.com/rancher/dynamiclistener v0.2.1/go.mod h1:9WusTANoiRr8cDWCTtf5txieulezHbpv4vhLADPp0zU= github.com/rancher/flannel v0.12.0-k3s1 h1:P23dWSk/9mGT1x2rDWW9JXNrF/0kjftiHwMau/+ZLGM= @@ -652,49 +672,49 @@ github.com/rancher/helm-controller v0.7.2 h1:noDPX08rnEoYhTGfgyLdEqG7DvihYbWJagb github.com/rancher/helm-controller v0.7.2/go.mod h1:ZylsxIMGNADRPRNW+NiBWhrwwks9vnKLQiCHYWb6Bi0= github.com/rancher/kine v0.4.0 h1:1IhWy3TzjExG8xnj46eyUEWdzqNAD1WrgL4eEBKm6Uc= github.com/rancher/kine v0.4.0/go.mod h1:IImtCJ68AIkE+VY/kUI0NkyJL5q5WzO8QvMsSXqbrpA= -github.com/rancher/kubernetes v1.18.8-k3s1 h1:dqukpA38pR5V7opoTDDslVYIxlM3sP5535u3Zd23W2I= -github.com/rancher/kubernetes v1.18.8-k3s1/go.mod h1:SU7bBi8ZNHRjqzNhY4U78gClS1O7Q7avCrfF5aSiDko= -github.com/rancher/kubernetes/staging/src/k8s.io/api v1.18.8-k3s1 h1:GEbvokWECNmp/nZm40JeQ/DGa1riPeKFDqJZs/VPQMU= -github.com/rancher/kubernetes/staging/src/k8s.io/api v1.18.8-k3s1/go.mod h1:oMzWB6/RPBLYAObltLVSu5Ms1ZztBe7G8s1ni2rZY7w= -github.com/rancher/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.18.8-k3s1 h1:lK7L5DnztJd9jcgfYwsXWRHq2EHPAgiD7hIX/9HUVJE= -github.com/rancher/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.18.8-k3s1/go.mod h1:BVIYewlEVCukQBRrZR3Kms8GdCsDQBsRIBCoy3rwzMk= -github.com/rancher/kubernetes/staging/src/k8s.io/apimachinery v1.18.8-k3s1 h1:LNn6Vx4nNHDc+ckqBKsRbpbm+Eh0kWHvCvpC0np3JVM= -github.com/rancher/kubernetes/staging/src/k8s.io/apimachinery v1.18.8-k3s1/go.mod h1:EWaS4Y9oElqOAwD3kKDYBACo+zW/N3epe1THeEbG72k= -github.com/rancher/kubernetes/staging/src/k8s.io/apiserver v1.18.8-k3s1 h1:FmUl8p1damR3F5GxMtXM4tteIr/a0Akx+48qlU7hOKA= -github.com/rancher/kubernetes/staging/src/k8s.io/apiserver v1.18.8-k3s1/go.mod h1:iiHJKeJoHT/SawjIpPfHQ+5o47HW8mlzjYvADYbnHrk= -github.com/rancher/kubernetes/staging/src/k8s.io/cli-runtime v1.18.8-k3s1 h1:gJ9/3Vaen+SdjVQsCScCY5/zcZ/sLOqlOhlTdPUoD8s= -github.com/rancher/kubernetes/staging/src/k8s.io/cli-runtime v1.18.8-k3s1/go.mod h1:Las5K5JupAs7RlnSvh6AiOsz0P0t3zylPnqQ9RDxaGA= -github.com/rancher/kubernetes/staging/src/k8s.io/client-go v1.18.8-k3s1 h1:KTmdV7Egc777OeJqs6F3CurMSJlUE2HSr6nomO1G900= -github.com/rancher/kubernetes/staging/src/k8s.io/client-go v1.18.8-k3s1/go.mod h1:/LATWw92UfCIu8M1NjrVaOtVJ9buBJZS9Zvj0BtY5Ac= -github.com/rancher/kubernetes/staging/src/k8s.io/cloud-provider v1.18.8-k3s1 h1:s/7BrWAaJX9ngv+q3LmkkaKpozIM3gOcWPEXbxFDqxc= -github.com/rancher/kubernetes/staging/src/k8s.io/cloud-provider v1.18.8-k3s1/go.mod h1:jW0IWD1v1cNcp/vvXbVuovmZNSieKSZBdM7VmX1lrVI= -github.com/rancher/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.18.8-k3s1 h1:ZEG20//RPRbrKX1EVpsZN8jASYKXcwVDXPk9+o0l27Q= -github.com/rancher/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.18.8-k3s1/go.mod h1:oHXhD/NqW/vlYggpTUWbP2x6disww69H1jdsyirbJl8= -github.com/rancher/kubernetes/staging/src/k8s.io/code-generator v1.18.8-k3s1 h1:DzakaPPGg9RHo81xa65tR0k6Ds8xmHpaH+OLG35y+Nk= -github.com/rancher/kubernetes/staging/src/k8s.io/code-generator v1.18.8-k3s1/go.mod h1:qBtAbyavqI3lGwEvxrQk9wwUTWntOADx38Iizyn31nw= -github.com/rancher/kubernetes/staging/src/k8s.io/component-base v1.18.8-k3s1 h1:eiuJQhX0XaU/XVFIxMKbuKUXbt5c2vAl7dsaQeuB+Zg= -github.com/rancher/kubernetes/staging/src/k8s.io/component-base v1.18.8-k3s1/go.mod h1:zRlCznOsLYdwq5DB2b/26X/n/04fhV3U3rMC60t80/Q= -github.com/rancher/kubernetes/staging/src/k8s.io/cri-api v1.18.8-k3s1 h1:G+2GcKHBfsnnyj5Fuqj6ks6DG6hEQyZrIloRxYHV1lw= -github.com/rancher/kubernetes/staging/src/k8s.io/cri-api v1.18.8-k3s1/go.mod h1:O3AtmT8iqccYwp/fsXdy3h0N9X/yfvRMD2XS48PJrBk= -github.com/rancher/kubernetes/staging/src/k8s.io/csi-translation-lib v1.18.8-k3s1 h1:x0Z1PPkojOpsrQbjIQoZQ9Tie7X5h/17YvluEtVks0Y= -github.com/rancher/kubernetes/staging/src/k8s.io/csi-translation-lib v1.18.8-k3s1/go.mod h1:/YQL/PqGdoNbC2H+w4tx2zrVdxNb541lW3PA81FdOlE= -github.com/rancher/kubernetes/staging/src/k8s.io/kube-aggregator v1.18.8-k3s1 h1:COXcOjKFrmfayOoZT4OmzTlo0JdEcbOkm5YKLa4FTg0= -github.com/rancher/kubernetes/staging/src/k8s.io/kube-aggregator v1.18.8-k3s1/go.mod h1:NcOKzNVVRhmkQmzCcBHfPPcZqgGXouc/o3Eul3saPj8= -github.com/rancher/kubernetes/staging/src/k8s.io/kube-controller-manager v1.18.8-k3s1 h1:NyD3nsuNkr6Gq/kyLJvUU941fwmtAwVSec14oSKm84g= -github.com/rancher/kubernetes/staging/src/k8s.io/kube-controller-manager v1.18.8-k3s1/go.mod h1:pABoR/v0r2aJLFC1570FaaRJbXyiHhqdGHe5W8nk0XY= -github.com/rancher/kubernetes/staging/src/k8s.io/kube-proxy v1.18.8-k3s1 h1:0LkqtqPCq8UssLzSNQo1u+r9tqXQZaXMT05RJ90SemA= -github.com/rancher/kubernetes/staging/src/k8s.io/kube-proxy v1.18.8-k3s1/go.mod h1:GLAmLACy/nOND24DRGKyPH21F89pTcevjPRxEtbLJmU= -github.com/rancher/kubernetes/staging/src/k8s.io/kube-scheduler v1.18.8-k3s1 h1:tb76wY82Q/BwvXZNt+Vdxkm+AEa6UQw47btLa2OeIGo= -github.com/rancher/kubernetes/staging/src/k8s.io/kube-scheduler v1.18.8-k3s1/go.mod h1:UNQ/Ff/Mq9mmCl0MYGl3ciCEIRQr9BT+/DSsoy6/ZMI= -github.com/rancher/kubernetes/staging/src/k8s.io/kubectl v1.18.8-k3s1 h1:ya9WTAduoFNKHsB/sMdXJPApMr58YSUyXRoJH0nhLOI= -github.com/rancher/kubernetes/staging/src/k8s.io/kubectl v1.18.8-k3s1/go.mod h1:YK9Z0Z/3MCo+LC6HsodGE8zKhQp8Z9btmCMh+Yi673g= -github.com/rancher/kubernetes/staging/src/k8s.io/kubelet v1.18.8-k3s1 h1:dhWex7SjpjQ5/iZEo+I3YjIOaQwUFudcE58Hkxgq0Z0= -github.com/rancher/kubernetes/staging/src/k8s.io/kubelet v1.18.8-k3s1/go.mod h1:Raj75cxSm9NiVBoLk/lB1D4XvpBzTG4WoJ6nIH8Cyew= -github.com/rancher/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.18.8-k3s1 h1:Sfhr2dUomwUq0b3p5/PjKBxGpz2+rz7ucp/GriEdVcA= -github.com/rancher/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.18.8-k3s1/go.mod h1:R6lK1g14jiec20OVuA1ArvsCKs5th4rxGL3eUMdQmyA= -github.com/rancher/kubernetes/staging/src/k8s.io/metrics v1.18.8-k3s1 h1:CPxpH4yeNeta/9cOdX8QGiR6v3RoJz5M9EKmYNX3rB0= -github.com/rancher/kubernetes/staging/src/k8s.io/metrics v1.18.8-k3s1/go.mod h1:xZM9EdJpWjqIWPvLiCP7vYKUEMwIgc0S8nc/MlLVK3Y= -github.com/rancher/kubernetes/staging/src/k8s.io/sample-apiserver v1.18.8-k3s1/go.mod h1:p8OmVbdzpawdZ/r9E1qcdJpzRirEg4OcSg8aZVWqvJo= +github.com/rancher/kubernetes v1.19.0-k3s1 h1:TPFj4qlQgZ2E9xE/ScFLtBQoymxPNCXAYHJpSZYRW3o= +github.com/rancher/kubernetes v1.19.0-k3s1/go.mod h1:yhT1/ltQajQsha3tnYc9QPFYSumGM45nlZdjf7WqE1A= +github.com/rancher/kubernetes/staging/src/k8s.io/api v1.19.0-k3s1 h1:204QC6VE7boSt570FipkF1fGXQeAr3s66QdRM+GJM30= +github.com/rancher/kubernetes/staging/src/k8s.io/api v1.19.0-k3s1/go.mod h1:Y4VjjNur38HL6/QxaTVK2yno1zjEQlvcvwbbRQs2DtQ= +github.com/rancher/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.19.0-k3s1 h1:7QE4c2sA3U6W3GC1mqWADTAatae023+MF/MAsvogUbw= +github.com/rancher/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.19.0-k3s1/go.mod h1:BvtZU215FgO19Oy19K6h8qwajFfjxYqGewgjuYHWGRw= +github.com/rancher/kubernetes/staging/src/k8s.io/apimachinery v1.19.0-k3s1 h1:n84FYp6F4FQJarrn8NU6aKo6v4scPxFacei7y+KVB8Y= +github.com/rancher/kubernetes/staging/src/k8s.io/apimachinery v1.19.0-k3s1/go.mod h1:4qgwPPTQvmc3E4Ub+c6I9LSsdbujYP3pIQEGuIVy8oQ= +github.com/rancher/kubernetes/staging/src/k8s.io/apiserver v1.19.0-k3s1 h1:HGOnHB7mi4OvLC1vsnSzv1q33k1r1+fCTp123fZKPT8= +github.com/rancher/kubernetes/staging/src/k8s.io/apiserver v1.19.0-k3s1/go.mod h1:lpK+uXhJTVOwW6SDiSQiL0LaQaBktrM23VG489uC/U0= +github.com/rancher/kubernetes/staging/src/k8s.io/cli-runtime v1.19.0-k3s1 h1:f5rpFUnvjmnpbOEfMKLo/eFBEwpRDO/xPqKVJmRL1IU= +github.com/rancher/kubernetes/staging/src/k8s.io/cli-runtime v1.19.0-k3s1/go.mod h1:twd45pbv7psOvyGxI8eABhpeoXWW3bCX6aB5NVS6TXs= +github.com/rancher/kubernetes/staging/src/k8s.io/client-go v1.19.0-k3s1 h1:SBTEEfzGC+zn2JLVisqjxuedrCZcZRLPiLaVi+in5I4= +github.com/rancher/kubernetes/staging/src/k8s.io/client-go v1.19.0-k3s1/go.mod h1:RHmuC9yMUmS4ypsaBCH2s9PoG2BD29/60QU9yywYWPo= +github.com/rancher/kubernetes/staging/src/k8s.io/cloud-provider v1.19.0-k3s1 h1:XJ4wKezeYpaLzw6ztC4stWL0EviDeoEk/MiUuLCFcno= +github.com/rancher/kubernetes/staging/src/k8s.io/cloud-provider v1.19.0-k3s1/go.mod h1:vXBe7m69RSxIR/m6bm820O+WYUJHP9OXtEyTZf3twRo= +github.com/rancher/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.19.0-k3s1 h1:sOyngCsalhtdoCjwynMNrTwdDun3il9XIebdhmjfftY= +github.com/rancher/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.19.0-k3s1/go.mod h1:kEUR4nHaGTacDcHrY2P4IriUdykXxPuwBg7picxa+gk= +github.com/rancher/kubernetes/staging/src/k8s.io/code-generator v1.19.0-k3s1 h1:epuEw54UiSObjYxeBU6cEnbXdECpxemiSjEelg/j7+c= +github.com/rancher/kubernetes/staging/src/k8s.io/code-generator v1.19.0-k3s1/go.mod h1:CqfZDv+BcdomYCAbV0kiIw9wyBW1Fnf/iDHBd0jEWW8= +github.com/rancher/kubernetes/staging/src/k8s.io/component-base v1.19.0-k3s1 h1:67Z69GFdwzdNw6wIPpCGk5sDzD86X1YMshwPzRX16Ic= +github.com/rancher/kubernetes/staging/src/k8s.io/component-base v1.19.0-k3s1/go.mod h1:jR+bJp7erYNUmcS7lWDm404aFVonltWE56LV8CuqKyg= +github.com/rancher/kubernetes/staging/src/k8s.io/cri-api v1.19.0-k3s1 h1:PH5Jan1WyPNkedOhfk6xqnid5KPpkEJCtHcmYHeUgkM= +github.com/rancher/kubernetes/staging/src/k8s.io/cri-api v1.19.0-k3s1/go.mod h1:5fTlfaqG0oYYb80kk4fHpqinBBSFEZb3EqHwdvNdiGQ= +github.com/rancher/kubernetes/staging/src/k8s.io/csi-translation-lib v1.19.0-k3s1 h1:SlDuoXU9W5ApWbGp/Q9nqHz8I1idywzacq6hO6ekqgI= +github.com/rancher/kubernetes/staging/src/k8s.io/csi-translation-lib v1.19.0-k3s1/go.mod h1:adA9bBHXD+K7tPn7kTpjQ3VcUzK6PFgAdNEofr4fEx4= +github.com/rancher/kubernetes/staging/src/k8s.io/kube-aggregator v1.19.0-k3s1 h1:TReCBeBB4kqDlmcnK6wLulQqbRtkCxq95qGnrMiKcpc= +github.com/rancher/kubernetes/staging/src/k8s.io/kube-aggregator v1.19.0-k3s1/go.mod h1:2k5w33TDDiX5MW45QFLk1KqByb4Su/g73InDkoC1xls= +github.com/rancher/kubernetes/staging/src/k8s.io/kube-controller-manager v1.19.0-k3s1 h1:lXouqwai4bVAnvAkHFLviTpOC99cHUY2m6nYcT1s6OU= +github.com/rancher/kubernetes/staging/src/k8s.io/kube-controller-manager v1.19.0-k3s1/go.mod h1:6CzB8GMVD+ZlCXZjHiqccHpC9FFlRTCz+rHd176Lxfc= +github.com/rancher/kubernetes/staging/src/k8s.io/kube-proxy v1.19.0-k3s1 h1:Bjx3iHHz+JT3OTUvEbyEQGQfwWmWMECFPO39THpkhPQ= +github.com/rancher/kubernetes/staging/src/k8s.io/kube-proxy v1.19.0-k3s1/go.mod h1:PWMBqO9xuXWJS8REJ8QWiouJzbiOwVVVT81ZTwYb2Nk= +github.com/rancher/kubernetes/staging/src/k8s.io/kube-scheduler v1.19.0-k3s1 h1:g2kcu5gFuVjXe97PigRPSgkLTteymsmhZM4GAqeIXA4= +github.com/rancher/kubernetes/staging/src/k8s.io/kube-scheduler v1.19.0-k3s1/go.mod h1:23iT4D9thFRxYGZ9DOa7zQ4ZyrFHyp+Bz5dXiruHNwI= +github.com/rancher/kubernetes/staging/src/k8s.io/kubectl v1.19.0-k3s1 h1:87GC1qK3Ke168AsB1rrpJn1jr8znk/+oVwHaxg6ntjQ= +github.com/rancher/kubernetes/staging/src/k8s.io/kubectl v1.19.0-k3s1/go.mod h1:jF57QafZUIyhkboHp3NUlPdpozl8NA4uvyG5FdjbEbU= +github.com/rancher/kubernetes/staging/src/k8s.io/kubelet v1.19.0-k3s1 h1:W5qGq6eE3IVTHxARj64PGjmfsdLJ73IN92Ynkfllm8M= +github.com/rancher/kubernetes/staging/src/k8s.io/kubelet v1.19.0-k3s1/go.mod h1:xgsxxK8T8eljLwrh87vAyytjDFMbBsrM95vgHrf1OUg= +github.com/rancher/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.19.0-k3s1 h1:fXsVvTy/CoDssWGAOgU/sE38SHULJ1RIsq6rkOOhMGw= +github.com/rancher/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.19.0-k3s1/go.mod h1:iv4u51XYDkRdyvp7BBP+KuQ+ZHjEjoCECFVzMJBDGZA= +github.com/rancher/kubernetes/staging/src/k8s.io/metrics v1.19.0-k3s1 h1:6YCBATOOf/iwgmpjMNhszmfVKl/5b97SDKaqIpuTlD4= +github.com/rancher/kubernetes/staging/src/k8s.io/metrics v1.19.0-k3s1/go.mod h1:HZHgmugH8oA4ZxTPt9R8HYJBWEeLDegmaGoPo3HDK3I= +github.com/rancher/kubernetes/staging/src/k8s.io/sample-apiserver v1.19.0-k3s1/go.mod h1:tl3x2SPSVsIqnioD4z87jXFemilbRh1EYDm3KirMsjI= github.com/rancher/moq v0.0.0-20190404221404-ee5226d43009/go.mod h1:wpITyDPTi/Na5h73XkbuEf2AP9fbgrIGqqxVzFhYD6U= github.com/rancher/nocode v0.0.0-20200630202308-cb097102c09f/go.mod h1:iAAt6Amgbysi6srDJs9SxGSbG2j/JSRb/xCrnEtA69g= github.com/rancher/remotedialer v0.2.0 h1:xD7t3K6JYwTdAsxmGtTHQMkEkFgKouQ1foLxVW424Dc= @@ -713,34 +733,27 @@ github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uY github.com/robfig/cron v1.1.0 h1:jk4/Hud3TTdcrJgUOBgsqrZBarcxl6ADIjSC2iniwLY= github.com/robfig/cron v1.1.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rootless-containers/rootlesskit v0.10.0 h1:62HHP8s8qYYcolEtAsuo4GU6qau6pWmcQ1Te+TZTFds= github.com/rootless-containers/rootlesskit v0.10.0/go.mod h1:OZQfuRPb+2MA1p+hmjHmSmDRv9SdTzlQ3taNA/0d7XM= -github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c h1:ht7N4d/B7Ezf58nvMNVF3OlvDlz9pp+WHVcRNS0nink= -github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= +github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021 h1:if3/24+h9Sq6eDx8UUz1SO9cT9tizyIsATfB7b4D3tc= +github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/seccomp/libseccomp-golang v0.9.1 h1:NJjM5DNFOs0s3kYE1WUOr6G8V97sdt46rlXTMfXGWBo= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -748,18 +761,14 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= -github.com/spf13/afero v1.1.0/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.2/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -767,17 +776,17 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.0.2/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= +github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= @@ -785,47 +794,42 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= +github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tchap/go-patricia v2.3.0+incompatible h1:GkY4dP3cEfEASBPPkWd+AmjYxhmDkqO9/zg7R0lSQRs= github.com/tchap/go-patricia v2.3.0+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tektoncd/pipeline v0.4.0/go.mod h1:IZzJdiX9EqEMuUcgdnElozdYYRh0/ZRC+NKMLj1K3Yw= github.com/thecodeteam/goscaleio v0.1.0/go.mod h1:68sdkZAsK8bvEwBlbQnlLS+xU+hvLYM/iQ8KXej1AwM= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/timakin/bodyclose v0.0.0-20190721030226-87058b9bfcec/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/u-root/u-root v6.0.0+incompatible/go.mod h1:RYkpo8pTHrNjW08opNd/U6p/RJE7K0D8fXO0d47+3YY= github.com/ugorji/go v0.0.0-20170107133203-ded73eae5db7/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ultraware/funlen v0.0.1/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.21.0/go.mod h1:lxDj6qX9Q6lWQxIrbrT0nwecwUtRnhVZAJjJZrVUZZQ= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.0.0 h1:+HU9SCbu8GnEUFtIBfuUNXN39ofWViIEJIp6SURMpCg= -github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4= github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= -github.com/valyala/quicktemplate v1.1.1/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vishvananda/netlink v0.0.0-20170220200719-fe3b5664d23a/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= -github.com/vishvananda/netlink v1.0.0 h1:bqNY2lgheFIu1meHUFSH3d7vG93AFyqg3oGbJCOJgSM= -github.com/vishvananda/netlink v1.0.0/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= +github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20170219233438-54f0e4339ce7/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= -github.com/vishvananda/netns v0.0.0-20171111001504-be1fbeda1936 h1:J9gO8RJCAFlln1jsvRba/CWVUnMHwObklfxxjErl1uk= -github.com/vishvananda/netns v0.0.0-20171111001504-be1fbeda1936/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= -github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc h1:R83G5ikgLMxrBvLh22JhdfI8K6YXEPHx5P03Uu3DRs4= github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/vishvananda/netns v0.0.0-20200520041808-52d707b772fe h1:mjAZxE1nh8yvuwhGHpdDqdhtNu2dgbpk93TwoXuk5so= +github.com/vishvananda/netns v0.0.0-20200520041808-52d707b772fe/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vmware/govmomi v0.20.3 h1:gpw/0Ku+6RgF3jsi7fnCLmlcikBHfKBCUcu1qgc16OU= github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243 h1:R43TdZy32XXSXjJn7M/HhALJ9imq6ztLnChfYJpVDnM= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= @@ -834,94 +838,109 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1 h1:j2hhcujLRHAg872RWAV5yaUrEjHEObwDv3aImCaNLek= github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f h1:pBCD+Z7cy5WPTq+R6MmJJvDRpn88cp7bmTypBsn91g4= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5 h1:Gqga3zA9tdAcfqobUGjSoCob5L3f8Dt5EuOp3ihNZko= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= +go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190927031335-2835ba2e683f/go.mod h1:fYw7AShPAhGMdXqA9gRadk/CcMsvLlClpE5oBwnS3dM= -golang.org/x/crypto v0.0.0-20180426230345-b49d69b5da94/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495 h1:I6A9Ag9FpEKOjcKrRNjQkPHawoXIhKyTGfvvjFAiiAk= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299 h1:zQpM52jfKHG6II1ISZY1ZcpygvuSFZpLwfluuF89XOg= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20170915142106-8351a756f30f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190502183928-7f726cade0ab/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191204025024-5ee1b9f4859a h1:+HHJiFUXVOIS9mr1ThqkQD1N8vpFCfCShqADBM12KTc= -golang.org/x/net v0.0.0-20191204025024-5ee1b9f4859a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f h1:QBjCr1Fz5kw158VqdE9JfI9cJnl/ymnJWAdMuinqL7Y= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -930,13 +949,10 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20171026204733-164713f0dfce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190122071731-054c452bb702/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -946,63 +962,83 @@ golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e h1:9vRrk9YW2BTzLP0VCB9ZDjU4cPqkg+IDWL7XgxA1yxQ= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 h1:5B6i6EAiSYyejWfvc5Rc9BbI3rzIsrrXfAQBWnYfn+w= golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 h1:sIky/MyNRSHTrdxfsiUSS4WIAMvInbeXljJz+jDjeYE= +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6 h1:DvY3Zkh7KabQE/kfzMvYvKirSiguP9Q/veMtkYyf0o8= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.0.0-20170915090833-1cbadb444a80/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20170915040203-e531a2a1c15f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190121143147-24cd39ecf745/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190122202912-9c309ee22fab/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190909030654-5b82db07426d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191017205301-920acffc3e65 h1:GwXwgmbrvlcHLDsENMqrQTTIC2C0kIPszsq929NruKI= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191017205301-920acffc3e65/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200616133436-c1934b75d054 h1:HHeAlu5H9b71C+Fx0K+1dGgVFN1DM1/wz4aoGOA5qS8= +golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= @@ -1014,31 +1050,29 @@ gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e h1:jRyg0XfpwWlhEV8mDfdNGB gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.6.1-0.20190607001116-5213b8090861 h1:ppLucX0K/60T3t6LPZQzTOkt5PytkEbQLIaSteq+TpE= -google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.1-0.20200106000736-b8fc810ca6b5/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.1 h1:5mMS6mYvK5LVB8+ujVBC33Y8gltBo/kT6HBm6kU80G4= +google.golang.org/api v0.15.1/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 h1:YzfoEYWbODU5Fbt37+h7X16BWQbad7Q4S6gclTKFXM8= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= @@ -1065,62 +1099,64 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.1.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/gotestsum v0.3.5/go.mod h1:Mnf3e5FUzXbkCfynWBGOwLssY7gTQgCHObK9tMpAriY= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= +gotest.tools/v3 v3.0.2 h1:kG1BFyqVHuQoVQiR1bWGnfz/fmHvvuiSPIV7rvl360E= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20191120174120-e74f70b9b27e/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 h1:RPscN6KhmG54S33L+lr3GS+oD1jmchIU0ll519K6FA4= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14 h1:t4L10Qfx/p7ASH3gXCdIUtPbbIuegCoUJf3TMSFekjw= +k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/heapster v1.2.0-beta.1 h1:lUsE/AHOMHpi3MLlBEkaU8Esxm5QhdyCrv1o7ot0s84= k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20190502190224-411b2483e503/go.mod h1:iU+ZGYsNlvU9XKUSso6SQfKTCCw7lFduMZy26Mgr2Fw= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/repo-infra v0.0.1-alpha.1/go.mod h1:wO1t9WaB99V80ljbeENTnayuEEwNZt7gECYh/CEyOJ8= -k8s.io/system-validators v1.0.4/go.mod h1:HgSgTg4NAGNoYYjKsUyk52gdNi2PVDswQ9Iyn66R7NI= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/system-validators v1.1.2/go.mod h1:bPldcLgkIUK22ALflnsXk8pvkTEndYdNuaHH6gRrl0Q= k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20190209190245-fbb59629db34/go.mod h1:H6SUd1XjIs+qQCyskXg5OFSrilMRUkD8ePJpHKDPaeY= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7 h1:uuHDyjllyzRyCIvvn0OBjiRB0SgBZGqHNYAmjR7fO50= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9 h1:rusRLrDhjBp6aYtl9sGEvQJr6faoHoDLd0YcUBTZguI= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff v0.0.0-20190426204423-ea680f03cc65 h1:xJNnO2qzHtgVCSPoGkkltSpyEX7D7IJw1TmbE3G/7lY= sigs.k8s.io/structured-merge-diff v0.0.0-20190426204423-ea680f03cc65/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc h1:MksmcCZQWAQJCTA5T0jgI/0sJ51AVm4Z41MrmfczEoc= vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/pkg/generated/clientset/versioned/fake/register.go b/pkg/generated/clientset/versioned/fake/register.go index 9cf6cdf008d..ec60f9be6c7 100644 --- a/pkg/generated/clientset/versioned/fake/register.go +++ b/pkg/generated/clientset/versioned/fake/register.go @@ -29,7 +29,7 @@ import ( var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) + var localSchemeBuilder = runtime.SchemeBuilder{ k3sv1.AddToScheme, } diff --git a/pkg/generated/listers/k3s.cattle.io/v1/addon.go b/pkg/generated/listers/k3s.cattle.io/v1/addon.go index 32031a11ce3..a08fb764293 100644 --- a/pkg/generated/listers/k3s.cattle.io/v1/addon.go +++ b/pkg/generated/listers/k3s.cattle.io/v1/addon.go @@ -26,8 +26,10 @@ import ( ) // AddonLister helps list Addons. +// All objects returned here must be treated as read-only. type AddonLister interface { // List lists all Addons in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Addon, err error) // Addons returns an object that can list and get Addons. Addons(namespace string) AddonNamespaceLister @@ -58,10 +60,13 @@ func (s *addonLister) Addons(namespace string) AddonNamespaceLister { } // AddonNamespaceLister helps list and get Addons. +// All objects returned here must be treated as read-only. type AddonNamespaceLister interface { // List lists all Addons in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Addon, err error) // Get retrieves the Addon from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Addon, error) AddonNamespaceListerExpansion } diff --git a/vendor/cloud.google.com/go/compute/metadata/.repo-metadata.json b/vendor/cloud.google.com/go/compute/metadata/.repo-metadata.json new file mode 100644 index 00000000000..ca022ccc41a --- /dev/null +++ b/vendor/cloud.google.com/go/compute/metadata/.repo-metadata.json @@ -0,0 +1,12 @@ +{ + "name": "metadata", + "name_pretty": "Google Compute Engine Metadata API", + "product_documentation": "https://cloud.google.com/compute/docs/storing-retrieving-metadata", + "client_documentation": "https://godoc.org/cloud.google.com/go/compute/metadata", + "release_level": "ga", + "language": "go", + "repo": "googleapis/google-cloud-go", + "distribution_name": "cloud.google.com/go/compute/metadata", + "api_id": "compute:metadata", + "requires_billing": false +} diff --git a/vendor/cloud.google.com/go/compute/metadata/metadata.go b/vendor/cloud.google.com/go/compute/metadata/metadata.go index 125b7033c96..0b50c2a7a6c 100644 --- a/vendor/cloud.google.com/go/compute/metadata/metadata.go +++ b/vendor/cloud.google.com/go/compute/metadata/metadata.go @@ -227,6 +227,9 @@ func InternalIP() (string, error) { return defaultClient.InternalIP() } // ExternalIP returns the instance's primary external (public) IP address. func ExternalIP() (string, error) { return defaultClient.ExternalIP() } +// Email calls Client.Email on the default client. +func Email(serviceAccount string) (string, error) { return defaultClient.Email(serviceAccount) } + // Hostname returns the instance's hostname. This will be of the form // ".c..internal". func Hostname() (string, error) { return defaultClient.Hostname() } @@ -301,7 +304,10 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) { host = metadataIP } u := "http://" + host + "/computeMetadata/v1/" + suffix - req, _ := http.NewRequest("GET", u, nil) + req, err := http.NewRequest("GET", u, nil) + if err != nil { + return "", "", err + } req.Header.Set("Metadata-Flavor", "Google") req.Header.Set("User-Agent", userAgent) res, err := c.hc.Do(req) @@ -367,6 +373,16 @@ func (c *Client) InternalIP() (string, error) { return c.getTrimmed("instance/network-interfaces/0/ip") } +// Email returns the email address associated with the service account. +// The account may be empty or the string "default" to use the instance's +// main account. +func (c *Client) Email(serviceAccount string) (string, error) { + if serviceAccount == "" { + serviceAccount = "default" + } + return c.getTrimmed("instance/service-accounts/" + serviceAccount + "/email") +} + // ExternalIP returns the instance's primary external (public) IP address. func (c *Client) ExternalIP() (string, error) { return c.getTrimmed("instance/network-interfaces/0/access-configs/0/external-ip") @@ -394,11 +410,7 @@ func (c *Client) InstanceTags() ([]string, error) { // InstanceName returns the current VM's instance ID string. func (c *Client) InstanceName() (string, error) { - host, err := c.Hostname() - if err != nil { - return "", err - } - return strings.Split(host, ".")[0], nil + return c.getTrimmed("instance/name") } // Zone returns the current VM's zone, such as "us-central1-b". diff --git a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE index af39a91e703..047555ec7e5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE +++ b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016 Microsoft Corporation + Copyright 2020 Microsoft Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go index 92945517338..fa23adc38c6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go @@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. +// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAvailabilitySetsClientWithBaseURI(baseURI string, subscriptionID string) AvailabilitySetsClient { return AvailabilitySetsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -85,7 +87,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -103,8 +105,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client AvailabilitySetsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -164,7 +165,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -180,8 +181,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client AvailabilitySetsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -240,7 +240,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -256,8 +256,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client AvailabilitySetsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -316,7 +315,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -332,8 +331,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client AvailabilitySetsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -431,7 +429,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -447,8 +445,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont // ListAvailableSizesSender sends the ListAvailableSizes request. The method will close the // http.Response Body if it receives an error. func (client AvailabilitySetsClient) ListAvailableSizesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always @@ -506,7 +503,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -525,8 +522,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client AvailabilitySetsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -624,7 +620,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -642,8 +638,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client AvailabilitySetsClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/client.go similarity index 88% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/client.go index b23c9ca7426..d9d0430190e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go index d3192f0de41..0d0f705daba 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go @@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -130,9 +132,8 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -210,9 +211,8 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -294,8 +294,7 @@ func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceG // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ContainerServicesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -368,8 +367,7 @@ func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.R // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ContainerServicesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -483,8 +481,7 @@ func (client ContainerServicesClient) ListByResourceGroupPreparer(ctx context.Co // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ContainerServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go index c786ffefc3f..2ae90747f6f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go @@ -36,7 +36,9 @@ func NewDedicatedHostGroupsClient(subscriptionID string) DedicatedHostGroupsClie return NewDedicatedHostGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient client. +// NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDedicatedHostGroupsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostGroupsClient { return DedicatedHostGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -63,7 +65,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, reso Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, - {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error()) @@ -98,7 +100,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -116,8 +118,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Conte // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DedicatedHostGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -177,7 +178,7 @@ func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -193,8 +194,7 @@ func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, reso // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DedicatedHostGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -253,7 +253,7 @@ func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -269,8 +269,7 @@ func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourc // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DedicatedHostGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -330,7 +329,7 @@ func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -346,8 +345,7 @@ func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context. // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client DedicatedHostGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -441,7 +439,7 @@ func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -457,8 +455,7 @@ func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.C // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client DedicatedHostGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -556,7 +553,7 @@ func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -574,8 +571,7 @@ func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, reso // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client DedicatedHostGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go index fb6ff59522b..53126ca8424 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go @@ -36,7 +36,8 @@ func NewDedicatedHostsClient(subscriptionID string) DedicatedHostsClient { return NewDedicatedHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient client. +// NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDedicatedHostsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostsClient { return DedicatedHostsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -63,7 +64,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, - {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -94,7 +95,7 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -112,9 +113,8 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (future DedicatedHostsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,7 +175,7 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -191,9 +191,8 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future DedicatedHostsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -260,7 +259,7 @@ func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -279,8 +278,7 @@ func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGrou // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DedicatedHostsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -342,7 +340,7 @@ func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -358,8 +356,7 @@ func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context, // ListByHostGroupSender sends the ListByHostGroup request. The method will close the // http.Response Body if it receives an error. func (client DedicatedHostsClient) ListByHostGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByHostGroupResponder handles the response to the ListByHostGroup request. The method always @@ -453,7 +450,7 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -471,9 +468,8 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future DedicatedHostsUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go index cb93acdde87..12874d026a5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/diskencryptionsets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go @@ -36,7 +36,9 @@ func NewDiskEncryptionSetsClient(subscriptionID string) DiskEncryptionSetsClient return NewDiskEncryptionSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiskEncryptionSetsClientWithBaseURI creates an instance of the DiskEncryptionSetsClient client. +// NewDiskEncryptionSetsClientWithBaseURI creates an instance of the DiskEncryptionSetsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDiskEncryptionSetsClientWithBaseURI(baseURI string, subscriptionID string) DiskEncryptionSetsClient { return DiskEncryptionSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -94,7 +96,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -112,9 +114,8 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (future DiskEncryptionSetsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,7 +176,7 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -191,9 +192,8 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future DiskEncryptionSetsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -259,7 +259,7 @@ func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -275,8 +275,7 @@ func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resource // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DiskEncryptionSetsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -332,7 +331,7 @@ func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -348,8 +347,7 @@ func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http. // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DiskEncryptionSetsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -445,7 +443,7 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -461,8 +459,7 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.C // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client DiskEncryptionSetsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -557,7 +554,7 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -575,9 +572,8 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future DiskEncryptionSetsUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go index 4bf33668916..420deb65479 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go @@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +// NewDisksClientWithBaseURI creates an instance of the DisksClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClient { return DisksClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -65,6 +66,8 @@ func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "disk.DiskProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, }}, {Target: "disk.DiskProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, @@ -95,12 +98,13 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } disk.ManagedBy = nil + disk.ManagedByExtended = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -114,9 +118,8 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -177,7 +180,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -193,9 +196,8 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -261,7 +263,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -277,8 +279,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DisksClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -341,7 +342,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -359,9 +360,8 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup // GrantAccessSender sends the GrantAccess request. The method will close the // http.Response Body if it receives an error. func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGrantAccessFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -422,7 +422,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -438,8 +438,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DisksClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -535,7 +534,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -551,8 +550,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client DisksClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -645,7 +643,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -661,9 +659,8 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou // RevokeAccessSender sends the RevokeAccess request. The method will close the // http.Response Body if it receives an error. func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRevokeAccessFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -724,7 +721,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -742,9 +739,8 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go index 553defda18e..e4f6dad9233 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go @@ -35,7 +35,8 @@ func NewGalleriesClient(subscriptionID string) GalleriesClient { return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client. +// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGalleriesClientWithBaseURI(baseURI string, subscriptionID string) GalleriesClient { return GalleriesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -80,7 +81,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -98,9 +99,8 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future GalleriesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -159,7 +159,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,9 +175,8 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -241,7 +240,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,8 +256,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client GalleriesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -314,7 +312,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -330,8 +328,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client GalleriesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -427,7 +424,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -443,8 +440,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client GalleriesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -496,3 +492,83 @@ func (client GalleriesClient) ListByResourceGroupComplete(ctx context.Context, r result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) return } + +// Update update a Shared Image Gallery. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery. The allowed characters are alphabets and numbers with +// dots and periods allowed in the middle. The maximum length is 80 characters. +// gallery - parameters supplied to the update Shared Image Gallery operation. +func (client GalleriesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (result GalleriesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, gallery) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryName": autorest.Encode("path", galleryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", pathParameters), + autorest.WithJSON(gallery), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GalleriesClient) UpdateResponder(resp *http.Response) (result Gallery, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go index c2c651209de..1968d2533b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplications.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go @@ -35,7 +35,9 @@ func NewGalleryApplicationsClient(subscriptionID string) GalleryApplicationsClie return NewGalleryApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient client. +// NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGalleryApplicationsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationsClient { return GalleryApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -84,7 +86,7 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -102,9 +104,8 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -166,7 +167,7 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -182,9 +183,8 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future GalleryApplicationsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -251,7 +251,7 @@ func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -267,8 +267,7 @@ func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourc // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client GalleryApplicationsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -330,7 +329,7 @@ func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -346,8 +345,7 @@ func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Contex // ListByGallerySender sends the ListByGallery request. The method will close the // http.Response Body if it receives an error. func (client GalleryApplicationsClient) ListByGallerySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByGalleryResponder handles the response to the ListByGallery request. The method always @@ -399,3 +397,87 @@ func (client GalleryApplicationsClient) ListByGalleryComplete(ctx context.Contex result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName) return } + +// Update update a gallery Application Definition. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be +// updated. +// galleryApplicationName - the name of the gallery Application Definition to be updated. The allowed +// characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum +// length is 80 characters. +// galleryApplication - parameters supplied to the update gallery Application operation. +func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (result GalleryApplicationsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryApplicationName": autorest.Encode("path", galleryApplicationName), + "galleryName": autorest.Encode("path", galleryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters), + autorest.WithJSON(galleryApplication), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future GalleryApplicationsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GalleryApplicationsClient) UpdateResponder(resp *http.Response) (result GalleryApplication, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go index 40b2dc830e9..795f6c8e8a4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go @@ -36,7 +36,9 @@ func NewGalleryApplicationVersionsClient(subscriptionID string) GalleryApplicati return NewGalleryApplicationVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient client. +// NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewGalleryApplicationVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationVersionsClient { return GalleryApplicationVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -101,7 +103,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -119,9 +121,8 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationVersionsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -185,7 +186,7 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -201,9 +202,8 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (future GalleryApplicationVersionsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -273,7 +273,7 @@ func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -292,8 +292,7 @@ func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client GalleryApplicationVersionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -357,7 +356,7 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -373,8 +372,7 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer( // ListByGalleryApplicationSender sends the ListByGalleryApplication request. The method will close the // http.Response Body if it receives an error. func (client GalleryApplicationVersionsClient) ListByGalleryApplicationSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByGalleryApplicationResponder handles the response to the ListByGalleryApplication request. The method always @@ -426,3 +424,89 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationComplete( result.page, err = client.ListByGalleryApplication(ctx, resourceGroupName, galleryName, galleryApplicationName) return } + +// Update update a gallery Application Version. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Application Gallery in which the Application Definition resides. +// galleryApplicationName - the name of the gallery Application Definition in which the Application Version is +// to be updated. +// galleryApplicationVersionName - the name of the gallery Application Version to be updated. Needs to follow +// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range +// of a 32-bit integer. Format: .. +// galleryApplicationVersion - parameters supplied to the update gallery Application Version operation. +func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (result GalleryApplicationVersionsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryApplicationName": autorest.Encode("path", galleryApplicationName), + "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName), + "galleryName": autorest.Encode("path", galleryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters), + autorest.WithJSON(galleryApplicationVersion), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (future GalleryApplicationVersionsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GalleryApplicationVersionsClient) UpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go index c4c78e5706b..c88030f69ea 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go @@ -36,7 +36,8 @@ func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client. +// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) GalleryImagesClient { return GalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -96,7 +97,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -114,9 +115,8 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (future GalleryImagesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -177,7 +177,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -193,9 +193,8 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client GalleryImagesClient) DeleteSender(req *http.Request) (future GalleryImagesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -261,7 +260,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -277,8 +276,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client GalleryImagesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -339,7 +337,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -355,8 +353,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res // ListByGallerySender sends the ListByGallery request. The method will close the // http.Response Body if it receives an error. func (client GalleryImagesClient) ListByGallerySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByGalleryResponder handles the response to the ListByGallery request. The method always @@ -408,3 +405,86 @@ func (client GalleryImagesClient) ListByGalleryComplete(ctx context.Context, res result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName) return } + +// Update update a gallery Image Definition. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be updated. +// galleryImageName - the name of the gallery Image Definition to be updated. The allowed characters are +// alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 +// characters. +// galleryImage - parameters supplied to the update gallery image operation. +func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (result GalleryImagesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryImageName": autorest.Encode("path", galleryImageName), + "galleryName": autorest.Encode("path", galleryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters), + autorest.WithJSON(galleryImage), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryImagesClient) UpdateSender(req *http.Request) (future GalleryImagesUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GalleryImagesClient) UpdateResponder(resp *http.Response) (result GalleryImage, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go index 658da5864e0..a81aa50e841 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go @@ -36,7 +36,9 @@ func NewGalleryImageVersionsClient(subscriptionID string) GalleryImageVersionsCl return NewGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient client. +// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewGalleryImageVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryImageVersionsClient { return GalleryImageVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -64,11 +66,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, res if err := validation.Validate([]validation.Validation{ {TargetValue: galleryImageVersion, Constraints: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile.Source", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile.Source.ID", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - }}}}}); err != nil { + Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("compute.GalleryImageVersionsClient", "CreateOrUpdate", err.Error()) } @@ -97,7 +95,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -115,9 +113,8 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryImageVersionsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -180,7 +177,7 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -196,9 +193,8 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future GalleryImageVersionsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -267,7 +263,7 @@ func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -286,8 +282,7 @@ func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resour // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client GalleryImageVersionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -351,7 +346,7 @@ func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -367,8 +362,7 @@ func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context. // ListByGalleryImageSender sends the ListByGalleryImage request. The method will close the // http.Response Body if it receives an error. func (client GalleryImageVersionsClient) ListByGalleryImageSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByGalleryImageResponder handles the response to the ListByGalleryImage request. The method always @@ -420,3 +414,88 @@ func (client GalleryImageVersionsClient) ListByGalleryImageComplete(ctx context. result.page, err = client.ListByGalleryImage(ctx, resourceGroupName, galleryName, galleryImageName) return } + +// Update update a gallery Image Version. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery in which the Image Definition resides. +// galleryImageName - the name of the gallery Image Definition in which the Image Version is to be updated. +// galleryImageVersionName - the name of the gallery Image Version to be updated. Needs to follow semantic +// version name pattern: The allowed characters are digit and period. Digits must be within the range of a +// 32-bit integer. Format: .. +// galleryImageVersion - parameters supplied to the update gallery Image Version operation. +func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (result GalleryImageVersionsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GalleryImageVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryImageName": autorest.Encode("path", galleryImageName), + "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName), + "galleryName": autorest.Encode("path", galleryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters), + autorest.WithJSON(galleryImageVersion), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future GalleryImageVersionsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GalleryImageVersionsClient) UpdateResponder(resp *http.Response) (result GalleryImageVersion, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go index dfb92b46b0f..aadeb452906 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go @@ -35,7 +35,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. +// NewImagesClientWithBaseURI creates an instance of the ImagesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewImagesClientWithBaseURI(baseURI string, subscriptionID string) ImagesClient { return ImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -79,7 +80,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -97,9 +98,8 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -158,7 +158,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -174,9 +174,8 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -241,7 +240,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -260,8 +259,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ImagesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -318,7 +316,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -334,8 +332,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ImagesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -431,7 +428,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -447,8 +444,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ImagesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -540,7 +536,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -558,9 +554,8 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go index 145d834d59b..e6e20676f0f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go @@ -36,7 +36,8 @@ func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient { return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client. +// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogAnalyticsClientWithBaseURI(baseURI string, subscriptionID string) LogAnalyticsClient { return LogAnalyticsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -85,7 +86,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -103,9 +104,8 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context // ExportRequestRateByIntervalSender sends the ExportRequestRateByInterval request. The method will close the // http.Response Body if it receives an error. func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -170,7 +170,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -188,9 +188,8 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con // ExportThrottledRequestsSender sends the ExportThrottledRequests request. The method will close the // http.Response Body if it receives an error. func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go similarity index 91% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go index 11e0c0a1bd2..6b5eb1bc647 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go @@ -29,7 +29,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" // AccessLevel enumerates the values for access level. type AccessLevel string @@ -266,6 +266,21 @@ func PossibleDiffDiskOptionsValues() []DiffDiskOptions { return []DiffDiskOptions{Local} } +// DiffDiskPlacement enumerates the values for diff disk placement. +type DiffDiskPlacement string + +const ( + // CacheDisk ... + CacheDisk DiffDiskPlacement = "CacheDisk" + // ResourceDisk ... + ResourceDisk DiffDiskPlacement = "ResourceDisk" +) + +// PossibleDiffDiskPlacementValues returns an array of possible values for the DiffDiskPlacement const type. +func PossibleDiffDiskPlacementValues() []DiffDiskPlacement { + return []DiffDiskPlacement{CacheDisk, ResourceDisk} +} + // DiskCreateOption enumerates the values for disk create option. type DiskCreateOption string @@ -277,7 +292,8 @@ const ( Copy DiskCreateOption = "Copy" // Empty Create an empty data disk of a size given by diskSizeGB. Empty DiskCreateOption = "Empty" - // FromImage Create a new disk from a platform image specified by the given imageReference. + // FromImage Create a new disk from a platform image specified by the given imageReference or + // galleryImageReference. FromImage DiskCreateOption = "FromImage" // Import Create a disk by importing from a blob specified by a sourceUri in a storage account specified by // storageAccountId. @@ -518,9 +534,9 @@ func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationR type OperatingSystemStateTypes string const ( - // Generalized ... + // Generalized Generalized image. Needs to be provisioned during deployment time. Generalized OperatingSystemStateTypes = "Generalized" - // Specialized ... + // Specialized Specialized image. Contains already provisioned OS Disk. Specialized OperatingSystemStateTypes = "Specialized" ) @@ -544,6 +560,51 @@ func PossibleOperatingSystemTypesValues() []OperatingSystemTypes { return []OperatingSystemTypes{Linux, Windows} } +// OrchestrationServiceNames enumerates the values for orchestration service names. +type OrchestrationServiceNames string + +const ( + // AutomaticRepairs ... + AutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs" +) + +// PossibleOrchestrationServiceNamesValues returns an array of possible values for the OrchestrationServiceNames const type. +func PossibleOrchestrationServiceNamesValues() []OrchestrationServiceNames { + return []OrchestrationServiceNames{AutomaticRepairs} +} + +// OrchestrationServiceState enumerates the values for orchestration service state. +type OrchestrationServiceState string + +const ( + // NotRunning ... + NotRunning OrchestrationServiceState = "NotRunning" + // Running ... + Running OrchestrationServiceState = "Running" + // Suspended ... + Suspended OrchestrationServiceState = "Suspended" +) + +// PossibleOrchestrationServiceStateValues returns an array of possible values for the OrchestrationServiceState const type. +func PossibleOrchestrationServiceStateValues() []OrchestrationServiceState { + return []OrchestrationServiceState{NotRunning, Running, Suspended} +} + +// OrchestrationServiceStateAction enumerates the values for orchestration service state action. +type OrchestrationServiceStateAction string + +const ( + // Resume ... + Resume OrchestrationServiceStateAction = "Resume" + // Suspend ... + Suspend OrchestrationServiceStateAction = "Suspend" +) + +// PossibleOrchestrationServiceStateActionValues returns an array of possible values for the OrchestrationServiceStateAction const type. +func PossibleOrchestrationServiceStateActionValues() []OrchestrationServiceStateAction { + return []OrchestrationServiceStateAction{Resume, Suspend} +} + // PassNames enumerates the values for pass names. type PassNames string @@ -864,6 +925,8 @@ func PossibleStatusLevelTypesValues() []StatusLevelTypes { type StorageAccountType string const ( + // StorageAccountTypePremiumLRS ... + StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS" // StorageAccountTypeStandardLRS ... StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS" // StorageAccountTypeStandardZRS ... @@ -872,7 +935,7 @@ const ( // PossibleStorageAccountTypeValues returns an array of possible values for the StorageAccountType const type. func PossibleStorageAccountTypeValues() []StorageAccountType { - return []StorageAccountType{StorageAccountTypeStandardLRS, StorageAccountTypeStandardZRS} + return []StorageAccountType{StorageAccountTypePremiumLRS, StorageAccountTypeStandardLRS, StorageAccountTypeStandardZRS} } // StorageAccountTypes enumerates the values for storage account types. @@ -970,11 +1033,13 @@ const ( Low VirtualMachinePriorityTypes = "Low" // Regular ... Regular VirtualMachinePriorityTypes = "Regular" + // Spot ... + Spot VirtualMachinePriorityTypes = "Spot" ) // PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type. func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes { - return []VirtualMachinePriorityTypes{Low, Regular} + return []VirtualMachinePriorityTypes{Low, Regular, Spot} } // VirtualMachineScaleSetScaleInRules enumerates the values for virtual machine scale set scale in rules. @@ -1429,10 +1494,8 @@ type AutomaticOSUpgradeProperties struct { type AutomaticRepairsPolicy struct { // Enabled - Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false. Enabled *bool `json:"enabled,omitempty"` - // GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The default value is 5 minutes (PT5M). + // GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M). GracePeriod *string `json:"gracePeriod,omitempty"` - // MaxInstanceRepairsPercent - The percentage (capacity of scaleset) of virtual machines that will be simultaneously repaired. The default value is 20%. - MaxInstanceRepairsPercent *int32 `json:"maxInstanceRepairsPercent,omitempty"` } // AvailabilitySet specifies information about the availability set that the virtual machine should be @@ -1785,10 +1848,10 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error { return nil } -// BillingProfile specifies the billing related details of a low priority VM or VMSS.

Minimum +// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS.

Minimum // api-version: 2019-03-01. type BillingProfile struct { - // MaxPrice - Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars.

This price will be compared with the current low priority price for the VM size. Also, the prices are compared at the time of create/update of low priority VM/VMSS and the operation will only succeed if the maxPrice is greater than the current low priority price.

The maxPrice will also be used for evicting a low priority VM/VMSS if the current low priority price goes beyond the maxPrice after creation of VM/VMSS.

Possible values are:

- Any decimal value greater than zero. Example: $0.01538

-1 – indicates default price to be up-to on-demand.

You can set the maxPrice to -1 to indicate that the low priority VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

Minimum api-version: 2019-03-01. + // MaxPrice - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.

This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.

The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.

Possible values are:

- Any decimal value greater than zero. Example: 0.01538

-1 – indicates default price to be up-to on-demand.

You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

Minimum api-version: 2019-03-01. MaxPrice *float64 `json:"maxPrice,omitempty"` } @@ -2228,10 +2291,12 @@ type ContainerServiceWindowsProfile struct { type CreationData struct { // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload' CreateOption DiskCreateOption `json:"createOption,omitempty"` - // StorageAccountID - If createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription + // StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk. StorageAccountID *string `json:"storageAccountId,omitempty"` // ImageReference - Disk source information. ImageReference *ImageDiskReference `json:"imageReference,omitempty"` + // GalleryImageReference - Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk. + GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"` // SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk. SourceURI *string `json:"sourceUri,omitempty"` // SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk. @@ -2276,6 +2341,14 @@ type DataDiskImage struct { Lun *int32 `json:"lun,omitempty"` } +// DataDiskImageEncryption contains encryption settings for a data disk image. +type DataDiskImageEncryption struct { + // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + Lun *int32 `json:"lun,omitempty"` + // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. + DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` +} + // DedicatedHost specifies information about the Dedicated host. type DedicatedHost struct { autorest.Response `json:"-"` @@ -3064,6 +3137,8 @@ type DiagnosticsProfile struct { type DiffDiskSettings struct { // Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local' Option DiffDiskOptions `json:"option,omitempty"` + // Placement - Specifies the ephemeral disk placement for operating system disk.

Possible values are:

**CacheDisk**

**ResourceDisk**

Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.

Refer to VM size documentation for Windows VM at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'CacheDisk', 'ResourceDisk' + Placement DiffDiskPlacement `json:"placement,omitempty"` } // Disallowed describes the disallowed disk types. @@ -3076,8 +3151,10 @@ type Disallowed struct { type Disk struct { autorest.Response `json:"-"` // ManagedBy - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached. - ManagedBy *string `json:"managedBy,omitempty"` - Sku *DiskSku `json:"sku,omitempty"` + ManagedBy *string `json:"managedBy,omitempty"` + // ManagedByExtended - READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. + ManagedByExtended *[]string `json:"managedByExtended,omitempty"` + Sku *DiskSku `json:"sku,omitempty"` // Zones - The Logical zone list for Disk. Zones *[]string `json:"zones,omitempty"` *DiskProperties `json:"properties,omitempty"` @@ -3132,6 +3209,15 @@ func (d *Disk) UnmarshalJSON(body []byte) error { } d.ManagedBy = &managedBy } + case "managedByExtended": + if v != nil { + var managedByExtended []string + err = json.Unmarshal(*v, &managedByExtended) + if err != nil { + return err + } + d.ManagedByExtended = &managedByExtended + } case "sku": if v != nil { var sku DiskSku @@ -3625,6 +3711,12 @@ type DiskEncryptionSetUpdateProperties struct { ActiveKey *KeyVaultAndKeyReference `json:"activeKey,omitempty"` } +// DiskImageEncryption this is the disk image encryption base class. +type DiskImageEncryption struct { + // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. + DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` +} + // DiskInstanceView the instance view of the disk. type DiskInstanceView struct { // Name - The disk name. @@ -3804,11 +3896,19 @@ type DiskProperties struct { // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` // DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. - DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"` + DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` + // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"` + // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"` // DiskState - READ-ONLY; The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload' DiskState DiskState `json:"diskState,omitempty"` // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. Encryption *Encryption `json:"encryption,omitempty"` + // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + MaxShares *int32 `json:"maxShares,omitempty"` + // ShareInfo - READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. + ShareInfo *[]ShareInfoElement `json:"shareInfo,omitempty"` } // DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running @@ -4026,7 +4126,15 @@ type DiskUpdateProperties struct { // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"` // DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. - DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"` + DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"` + // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"` + // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"` + // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + MaxShares *int32 `json:"maxShares,omitempty"` + // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + Encryption *Encryption `json:"encryption,omitempty"` } // Encryption encryption at rest settings for disk or snapshot @@ -4037,6 +4145,14 @@ type Encryption struct { Type EncryptionType `json:"type,omitempty"` } +// EncryptionImages optional. Allows users to provide customer managed keys for encrypting the OS and data +// disks in the gallery artifact. +type EncryptionImages struct { + OsDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"` + // DataDiskImages - A list of encryption specifications for data disk images. + DataDiskImages *[]DataDiskImageEncryption `json:"dataDiskImages,omitempty"` +} + // EncryptionSetIdentity the managed identity for the disk encryption set. It should be given permission on // the key vault before it can be used to encrypt disks. type EncryptionSetIdentity struct { @@ -4128,6 +4244,35 @@ func (future *GalleriesDeleteFuture) Result(client GalleriesClient) (ar autorest return } +// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GalleriesUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GalleriesUpdateFuture) Result(client GalleriesClient) (g Gallery, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.GalleriesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent { + g, err = client.UpdateResponder(g.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", g.Response.Response, "Failure responding to request") + } + } + return +} + // Gallery specifies information about the Shared Image Gallery that you want to create or update. type Gallery struct { autorest.Response `json:"-"` @@ -4543,6 +4688,121 @@ func (future *GalleryApplicationsDeleteFuture) Result(client GalleryApplications return } +// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryApplicationsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GalleryApplicationsUpdateFuture) Result(client GalleryApplicationsClient) (ga GalleryApplication, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent { + ga, err = client.UpdateResponder(ga.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", ga.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to +// update. +type GalleryApplicationUpdate struct { + *GalleryApplicationProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GalleryApplicationUpdate. +func (gau GalleryApplicationUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gau.GalleryApplicationProperties != nil { + objectMap["properties"] = gau.GalleryApplicationProperties + } + if gau.Tags != nil { + objectMap["tags"] = gau.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryApplicationUpdate struct. +func (gau *GalleryApplicationUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var galleryApplicationProperties GalleryApplicationProperties + err = json.Unmarshal(*v, &galleryApplicationProperties) + if err != nil { + return err + } + gau.GalleryApplicationProperties = &galleryApplicationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gau.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gau.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gau.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gau.Tags = tags + } + } + } + + return nil +} + // GalleryApplicationVersion specifies information about the gallery Application Version that you want to // create or update. type GalleryApplicationVersion struct { @@ -4817,7 +5077,7 @@ type GalleryApplicationVersionPublishingProfile struct { PublishedDate *date.Time `json:"publishedDate,omitempty"` // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS' + // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` } @@ -4873,6 +5133,121 @@ func (future *GalleryApplicationVersionsDeleteFuture) Result(client GalleryAppli return } +// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryApplicationVersionsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GalleryApplicationVersionsUpdateFuture) Result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent { + gav, err = client.UpdateResponder(gav.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", gav.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you +// want to update. +type GalleryApplicationVersionUpdate struct { + *GalleryApplicationVersionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GalleryApplicationVersionUpdate. +func (gavu GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gavu.GalleryApplicationVersionProperties != nil { + objectMap["properties"] = gavu.GalleryApplicationVersionProperties + } + if gavu.Tags != nil { + objectMap["tags"] = gavu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersionUpdate struct. +func (gavu *GalleryApplicationVersionUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var galleryApplicationVersionProperties GalleryApplicationVersionProperties + err = json.Unmarshal(*v, &galleryApplicationVersionProperties) + if err != nil { + return err + } + gavu.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gavu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gavu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gavu.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gavu.Tags = tags + } + } + } + + return nil +} + // GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile. type GalleryArtifactPublishingProfileBase struct { // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable. @@ -4885,7 +5260,7 @@ type GalleryArtifactPublishingProfileBase struct { PublishedDate *date.Time `json:"publishedDate,omitempty"` // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS' + // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` } @@ -5260,6 +5635,120 @@ func (future *GalleryImagesDeleteFuture) Result(client GalleryImagesClient) (ar return } +// GalleryImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GalleryImagesUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GalleryImagesUpdateFuture) Result(client GalleryImagesClient) (gi GalleryImage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent { + gi, err = client.UpdateResponder(gi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", gi.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryImageUpdate specifies information about the gallery Image Definition that you want to update. +type GalleryImageUpdate struct { + *GalleryImageProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GalleryImageUpdate. +func (giu GalleryImageUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if giu.GalleryImageProperties != nil { + objectMap["properties"] = giu.GalleryImageProperties + } + if giu.Tags != nil { + objectMap["tags"] = giu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryImageUpdate struct. +func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var galleryImageProperties GalleryImageProperties + err = json.Unmarshal(*v, &galleryImageProperties) + if err != nil { + return err + } + giu.GalleryImageProperties = &galleryImageProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + giu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + giu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + giu.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + giu.Tags = tags + } + } + } + + return nil +} + // GalleryImageVersion specifies information about the gallery Image Version that you want to create or // update. type GalleryImageVersion struct { @@ -5529,7 +6018,7 @@ type GalleryImageVersionPublishingProfile struct { PublishedDate *date.Time `json:"publishedDate,omitempty"` // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS' + // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` } @@ -5593,6 +6082,120 @@ type GalleryImageVersionStorageProfile struct { DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"` } +// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryImageVersionsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GalleryImageVersionsUpdateFuture) Result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent { + giv, err = client.UpdateResponder(giv.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", giv.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update. +type GalleryImageVersionUpdate struct { + *GalleryImageVersionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GalleryImageVersionUpdate. +func (givu GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if givu.GalleryImageVersionProperties != nil { + objectMap["properties"] = givu.GalleryImageVersionProperties + } + if givu.Tags != nil { + objectMap["tags"] = givu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryImageVersionUpdate struct. +func (givu *GalleryImageVersionUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var galleryImageVersionProperties GalleryImageVersionProperties + err = json.Unmarshal(*v, &galleryImageVersionProperties) + if err != nil { + return err + } + givu.GalleryImageVersionProperties = &galleryImageVersionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + givu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + givu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + givu.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + givu.Tags = tags + } + } + } + + return nil +} + // GalleryList the List Galleries operation response. type GalleryList struct { autorest.Response `json:"-"` @@ -5757,6 +6360,91 @@ type GalleryProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } +// GalleryUpdate specifies information about the Shared Image Gallery that you want to update. +type GalleryUpdate struct { + *GalleryProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GalleryUpdate. +func (gu GalleryUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gu.GalleryProperties != nil { + objectMap["properties"] = gu.GalleryProperties + } + if gu.Tags != nil { + objectMap["tags"] = gu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryUpdate struct. +func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var galleryProperties GalleryProperties + err = json.Unmarshal(*v, &galleryProperties) + if err != nil { + return err + } + gu.GalleryProperties = &galleryProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gu.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gu.Tags = tags + } + } + } + + return nil +} + // GrantAccessData data used for requesting a SAS. type GrantAccessData struct { // Access - Possible values include: 'None', 'Read', 'Write' @@ -6113,7 +6801,7 @@ type ImagePurchasePlan struct { // ImageReference specifies information about the image to use. You can specify information about platform // images, marketplace images, or virtual machine images. This element is required when you want to use a // platform image, marketplace image, or virtual machine image, but is not used in other creation -// operations. +// operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. type ImageReference struct { // Publisher - The image publisher. Publisher *string `json:"publisher,omitempty"` @@ -6123,6 +6811,8 @@ type ImageReference struct { Sku *string `json:"sku,omitempty"` // Version - Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Version *string `json:"version,omitempty"` + // ExactVersion - READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'. + ExactVersion *string `json:"exactVersion,omitempty"` // ID - Resource Id ID *string `json:"id,omitempty"` } @@ -6759,6 +7449,22 @@ type OperationValueDisplay struct { Provider *string `json:"provider,omitempty"` } +// OrchestrationServiceStateInput the input for OrchestrationServiceState +type OrchestrationServiceStateInput struct { + // ServiceName - The name of the service. Possible values include: 'AutomaticRepairs' + ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"` + // Action - The action to be performed. Possible values include: 'Resume', 'Suspend' + Action OrchestrationServiceStateAction `json:"action,omitempty"` +} + +// OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set. +type OrchestrationServiceSummary struct { + // ServiceName - READ-ONLY; The name of the service. Possible values include: 'AutomaticRepairs', 'DummyOrchestrationServiceName' + ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"` + // ServiceState - READ-ONLY; The current state of the service. Possible values include: 'NotRunning', 'Running', 'Suspended' + ServiceState OrchestrationServiceState `json:"serviceState,omitempty"` +} + // OSDisk specifies information about the operating system disk used by the virtual machine.

For // more information about disks, see [About disks and VHDs for Azure virtual // machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). @@ -6773,7 +7479,7 @@ type OSDisk struct { Vhd *VirtualHardDisk `json:"vhd,omitempty"` // Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. Image *VirtualHardDisk `json:"image,omitempty"` - // Caching - Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' + // Caching - Specifies the caching requirements.

Possible values are:

**None**

**ReadOnly**

**ReadWrite**

Default: **None** for Standard storage. **ReadOnly** for Premium storage. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite' Caching CachingTypes `json:"caching,omitempty"` // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk. WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"` @@ -6793,15 +7499,22 @@ type OSDiskImage struct { OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"` } -// OSProfile specifies the operating system settings for the virtual machine. +// OSDiskImageEncryption contains encryption settings for an OS disk image. +type OSDiskImageEncryption struct { + // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set. + DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"` +} + +// OSProfile specifies the operating system settings for the virtual machine. Some of the settings cannot +// be changed once VM is provisioned. type OSProfile struct { // ComputerName - Specifies the host OS name of the virtual machine.

This name cannot be updated after the VM is created.

**Max-length (Windows):** 15 characters

**Max-length (Linux):** 64 characters.

For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). ComputerName *string `json:"computerName,omitempty"` - // AdminUsername - Specifies the name of the administrator account.

**Windows-only restriction:** Cannot end in "."

**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length (Linux):** 1 character

**Max-length (Linux):** 64 characters

**Max-length (Windows):** 20 characters

  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + // AdminUsername - Specifies the name of the administrator account.

    This property cannot be updated after the VM is created.

    **Windows-only restriction:** Cannot end in "."

    **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) AdminUsername *string `json:"adminUsername,omitempty"` // AdminPassword - Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) AdminPassword *string `json:"adminPassword,omitempty"` - // CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + // CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) CustomData *string `json:"customData,omitempty"` // WindowsConfiguration - Specifies Windows operating system settings on the virtual machine. WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` @@ -6811,7 +7524,7 @@ type OSProfile struct { Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` // AllowExtensionOperations - Specifies whether extension operations should be allowed on the virtual machine.

    This may only be set to False when no extensions are present on the virtual machine. AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"` - // RequireGuestProvisionSignal - Specifies whether the guest provision signal is required from the virtual machine. + // RequireGuestProvisionSignal - Specifies whether the guest provision signal is required to infer provision success of the virtual machine. RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"` } @@ -7084,11 +7797,13 @@ type ProximityPlacementGroupProperties struct { // ProximityPlacementGroupType - Specifies the type of the proximity placement group.

    Possible values are:

    **Standard** : Co-locate resources within an Azure region or Availability Zone.

    **Ultra** : For future use. Possible values include: 'Standard', 'Ultra' ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"` // VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group. - VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"` + VirtualMachines *[]SubResourceWithColocationStatus `json:"virtualMachines,omitempty"` // VirtualMachineScaleSets - READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group. - VirtualMachineScaleSets *[]SubResource `json:"virtualMachineScaleSets,omitempty"` + VirtualMachineScaleSets *[]SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty"` // AvailabilitySets - READ-ONLY; A list of references to all availability sets in the proximity placement group. - AvailabilitySets *[]SubResource `json:"availabilitySets,omitempty"` + AvailabilitySets *[]SubResourceWithColocationStatus `json:"availabilitySets,omitempty"` + // ColocationStatus - Describes colocation status of the Proximity Placement Group. + ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"` } // ProximityPlacementGroupUpdate specifies information about the proximity placement group. @@ -7835,7 +8550,15 @@ type ScheduledEventsProfile struct { TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"` } -// Sku describes a virtual machine scale set sku. +// ShareInfoElement ... +type ShareInfoElement struct { + // VMURI - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached. + VMURI *string `json:"vmUri,omitempty"` +} + +// Sku describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware +// the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU +// name. type Sku struct { // Name - The sku name. Name *string `json:"name,omitempty"` @@ -8355,6 +9078,8 @@ type SnapshotUpdateProperties struct { DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"` + // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + Encryption *Encryption `json:"encryption,omitempty"` } // SourceVault the vault id is an Azure Resource Manager Resource id in the form @@ -8379,6 +9104,324 @@ type SSHPublicKey struct { KeyData *string `json:"keyData,omitempty"` } +// SSHPublicKeyGenerateKeyPairResult response from generation of an SSH key pair. +type SSHPublicKeyGenerateKeyPairResult struct { + autorest.Response `json:"-"` + // PrivateKey - Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret. + PrivateKey *string `json:"privateKey,omitempty"` + // PublicKey - Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format. + PublicKey *string `json:"publicKey,omitempty"` + // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName} + ID *string `json:"id,omitempty"` +} + +// SSHPublicKeyResource specifies information about the SSH public key. +type SSHPublicKeyResource struct { + autorest.Response `json:"-"` + // SSHPublicKeyResourceProperties - Properties of the SSH public key. + *SSHPublicKeyResourceProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SSHPublicKeyResource. +func (spkr SSHPublicKeyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spkr.SSHPublicKeyResourceProperties != nil { + objectMap["properties"] = spkr.SSHPublicKeyResourceProperties + } + if spkr.Location != nil { + objectMap["location"] = spkr.Location + } + if spkr.Tags != nil { + objectMap["tags"] = spkr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyResource struct. +func (spkr *SSHPublicKeyResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties + err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties) + if err != nil { + return err + } + spkr.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spkr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spkr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spkr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + spkr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + spkr.Tags = tags + } + } + } + + return nil +} + +// SSHPublicKeyResourceProperties properties of the SSH public key. +type SSHPublicKeyResourceProperties struct { + // PublicKey - SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format. + PublicKey *string `json:"publicKey,omitempty"` +} + +// SSHPublicKeysGroupListResult the list SSH public keys operation response. +type SSHPublicKeysGroupListResult struct { + autorest.Response `json:"-"` + // Value - The list of SSH public keys + Value *[]SSHPublicKeyResource `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys. + NextLink *string `json:"nextLink,omitempty"` +} + +// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource +// values. +type SSHPublicKeysGroupListResultIterator struct { + i int + page SSHPublicKeysGroupListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *SSHPublicKeysGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SSHPublicKeysGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SSHPublicKeysGroupListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter SSHPublicKeysGroupListResultIterator) Response() SSHPublicKeysGroupListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter SSHPublicKeysGroupListResultIterator) Value() SSHPublicKeyResource { + if !iter.page.NotDone() { + return SSHPublicKeyResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SSHPublicKeysGroupListResultIterator type. +func NewSSHPublicKeysGroupListResultIterator(page SSHPublicKeysGroupListResultPage) SSHPublicKeysGroupListResultIterator { + return SSHPublicKeysGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (spkglr SSHPublicKeysGroupListResult) IsEmpty() bool { + return spkglr.Value == nil || len(*spkglr.Value) == 0 +} + +// sSHPublicKeysGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (spkglr SSHPublicKeysGroupListResult) sSHPublicKeysGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if spkglr.NextLink == nil || len(to.String(spkglr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(spkglr.NextLink))) +} + +// SSHPublicKeysGroupListResultPage contains a page of SSHPublicKeyResource values. +type SSHPublicKeysGroupListResultPage struct { + fn func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error) + spkglr SSHPublicKeysGroupListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *SSHPublicKeysGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.spkglr) + if err != nil { + return err + } + page.spkglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SSHPublicKeysGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SSHPublicKeysGroupListResultPage) NotDone() bool { + return !page.spkglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SSHPublicKeysGroupListResultPage) Response() SSHPublicKeysGroupListResult { + return page.spkglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource { + if page.spkglr.IsEmpty() { + return nil + } + return *page.spkglr.Value +} + +// Creates a new instance of the SSHPublicKeysGroupListResultPage type. +func NewSSHPublicKeysGroupListResultPage(getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage { + return SSHPublicKeysGroupListResultPage{fn: getNextPage} +} + +// SSHPublicKeyUpdateResource specifies information about the SSH public key. +type SSHPublicKeyUpdateResource struct { + // SSHPublicKeyResourceProperties - Properties of the SSH public key. + *SSHPublicKeyResourceProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SSHPublicKeyUpdateResource. +func (spkur SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spkur.SSHPublicKeyResourceProperties != nil { + objectMap["properties"] = spkur.SSHPublicKeyResourceProperties + } + if spkur.Tags != nil { + objectMap["tags"] = spkur.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyUpdateResource struct. +func (spkur *SSHPublicKeyUpdateResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties + err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties) + if err != nil { + return err + } + spkur.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + spkur.Tags = tags + } + } + } + + return nil +} + // StorageProfile specifies the storage settings for the virtual machine disks. type StorageProfile struct { // ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. @@ -8401,14 +9444,23 @@ type SubResourceReadOnly struct { ID *string `json:"id,omitempty"` } +// SubResourceWithColocationStatus ... +type SubResourceWithColocationStatus struct { + // ColocationStatus - Describes colocation status of a resource in the Proximity Placement Group. + ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"` + // ID - Resource Id + ID *string `json:"id,omitempty"` +} + // TargetRegion describes the target region information. type TargetRegion struct { // Name - The name of the region. Name *string `json:"name,omitempty"` // RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable. RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS' + // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` + Encryption *EncryptionImages `json:"encryption,omitempty"` } // TerminateNotificationProfile ... @@ -8450,6 +9502,27 @@ func (ur UpdateResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// UpdateResourceDefinition the Update Resource model definition. +type UpdateResourceDefinition struct { + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for UpdateResourceDefinition. +func (urd UpdateResourceDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if urd.Tags != nil { + objectMap["tags"] = urd.Tags + } + return json.Marshal(objectMap) +} + // UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response. type UpgradeOperationHistoricalStatusInfo struct { // Properties - READ-ONLY; Information about the properties of the upgrade operation. @@ -9512,23 +10585,23 @@ type VirtualMachineProperties struct { StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine. AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` - // OsProfile - Specifies the operating system settings for the virtual machine. + // OsProfile - Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. OsProfile *OSProfile `json:"osProfile,omitempty"` // NetworkProfile - Specifies the network interfaces of the virtual machine. NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` // DiagnosticsProfile - Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15. DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` - // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).

    For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. + // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).

    For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

    Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set.

    This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. AvailabilitySet *SubResource `json:"availabilitySet,omitempty"` // VirtualMachineScaleSet - Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set.

    This property cannot exist along with a non-null properties.availabilitySet reference.

    Minimum api‐version: 2019‐03‐01 VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"` // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to.

    Minimum api-version: 2018-04-01. ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` - // Priority - Specifies the priority for the virtual machine.

    Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low' + // Priority - Specifies the priority for the virtual machine.

    Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot' Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` - // EvictionPolicy - Specifies the eviction policy for the low priority virtual machine. Only supported value is 'Deallocate'.

    Minimum api-version: 2019-03-01. Possible values include: 'Deallocate', 'Delete' + // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

    For Azure Spot virtual machines, the only supported value is 'Deallocate' and the minimum api-version is 2019-03-01.

    For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` - // BillingProfile - Specifies the billing related details of a low priority virtual machine.

    Minimum api-version: 2019-03-01. + // BillingProfile - Specifies the billing related details of a Azure Spot virtual machine.

    Minimum api-version: 2019-03-01. BillingProfile *BillingProfile `json:"billingProfile,omitempty"` // Host - Specifies information about the dedicated host that the virtual machine resides in.

    Minimum api-version: 2018-10-01. Host *SubResource `json:"host,omitempty"` @@ -9559,7 +10632,7 @@ type VirtualMachineScaleSet struct { *VirtualMachineScaleSetProperties `json:"properties,omitempty"` // Identity - The identity of the virtual machine scale set, if configured. Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` - // Zones - The virtual machine scale set zones. + // Zones - The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set Zones *[]string `json:"zones,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` @@ -9731,7 +10804,9 @@ type VirtualMachineScaleSetDataDisk struct { type VirtualMachineScaleSetExtension struct { autorest.Response `json:"-"` // Name - The name of the extension. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` @@ -9767,6 +10842,15 @@ func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error { } vmsse.Name = &name } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmsse.Type = &typeVar + } case "properties": if v != nil { var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties @@ -10019,6 +11103,106 @@ func (future *VirtualMachineScaleSetExtensionsDeleteFuture) Result(client Virtua return } +// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualMachineScaleSetExtensionsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualMachineScaleSetExtensionsUpdateFuture) Result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent { + vmsse, err = client.UpdateResponder(vmsse.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension. +type VirtualMachineScaleSetExtensionUpdate struct { + // Name - READ-ONLY; The name of the extension. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionUpdate. +func (vmsseu VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmsseu.VirtualMachineScaleSetExtensionProperties != nil { + objectMap["properties"] = vmsseu.VirtualMachineScaleSetExtensionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtensionUpdate struct. +func (vmsseu *VirtualMachineScaleSetExtensionUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmsseu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmsseu.Type = &typeVar + } + case "properties": + if v != nil { + var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties + err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties) + if err != nil { + return err + } + vmsseu.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmsseu.ID = &ID + } + } + } + + return nil +} + // VirtualMachineScaleSetIdentity identity for the virtual machine scale set. type VirtualMachineScaleSetIdentity struct { // PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity. @@ -10060,6 +11244,8 @@ type VirtualMachineScaleSetInstanceView struct { Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"` // Statuses - The resource status information. Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` + // OrchestrationServices - READ-ONLY; The orchestration services information. + OrchestrationServices *[]OrchestrationServiceSummary `json:"orchestrationServices,omitempty"` } // VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of @@ -10920,7 +12106,7 @@ type VirtualMachineScaleSetProperties struct { DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` // UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set. UniqueID *string `json:"uniqueId,omitempty"` - // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. + // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` // ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. ZoneBalance *bool `json:"zoneBalance,omitempty"` @@ -11344,6 +12530,29 @@ func (future *VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachine return } +// VirtualMachineScaleSetsSetOrchestrationServiceStateFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type VirtualMachineScaleSetsSetOrchestrationServiceStateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) Result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture") + return + } + ar.Response = future.Response() + return +} + // VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type VirtualMachineScaleSetsStartFuture struct { @@ -11524,7 +12733,8 @@ func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error { } // VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP -// configuration. +// configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the +// new subnet are in the same virtual network type VirtualMachineScaleSetUpdateIPConfiguration struct { // Name - The IP configuration name. Name *string `json:"name,omitempty"` @@ -11745,12 +12955,14 @@ type VirtualMachineScaleSetUpdateProperties struct { Overprovision *bool `json:"overprovision,omitempty"` // DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` - // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. + // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` // ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` + // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

    Minimum api-version: 2018-04-01. + ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` } // VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP @@ -11839,7 +13051,7 @@ type VirtualMachineScaleSetUpdateVMProfile struct { ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` // LicenseType - The license type, which is for bring your own license scenario. LicenseType *string `json:"licenseType,omitempty"` - // BillingProfile - Specifies the billing related details of a low priority VMSS.

    Minimum api-version: 2019-03-01. + // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.

    Minimum api-version: 2019-03-01. BillingProfile *BillingProfile `json:"billingProfile,omitempty"` // ScheduledEventsProfile - Specifies Scheduled Event related configurations. ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` @@ -12302,11 +13514,11 @@ type VirtualMachineScaleSetVMProfile struct { ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` // LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

    Possible values are:

    Windows_Client

    Windows_Server

    If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

    Minimum api-version: 2015-06-15 LicenseType *string `json:"licenseType,omitempty"` - // Priority - Specifies the priority for the virtual machines in the scale set.

    Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' + // Priority - Specifies the priority for the virtual machines in the scale set.

    Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot' Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` - // EvictionPolicy - Specifies the eviction policy for virtual machines in a low priority scale set.

    Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.

    For Azure Spot virtual machines, the only supported value is 'Deallocate' and the minimum api-version is 2019-03-01.

    For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` - // BillingProfile - Specifies the billing related details of a low priority VMSS.

    Minimum api-version: 2019-03-01. + // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.

    Minimum api-version: 2019-03-01. BillingProfile *BillingProfile `json:"billingProfile,omitempty"` // ScheduledEventsProfile - Specifies Scheduled Event related configurations. ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` @@ -13110,7 +14322,7 @@ type WindowsConfiguration struct { ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` // EnableAutomaticUpdates - Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true.

    For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"` - // TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + // TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time".

    Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.getsystemtimezones). TimeZone *string `json:"timeZone,omitempty"` // AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"` @@ -13126,7 +14338,7 @@ type WinRMConfiguration struct { // WinRMListener describes Protocol and thumbprint of Windows Remote Management listener type WinRMListener struct { - // Protocol - Specifies the protocol of listener.

    Possible values are:
    **http**

    **https**. Possible values include: 'HTTP', 'HTTPS' + // Protocol - Specifies the protocol of WinRM listener.

    Possible values are:
    **http**

    **https**. Possible values include: 'HTTP', 'HTTPS' Protocol ProtocolTypes `json:"protocol,omitempty"` // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

    {
    "data":"",
    "dataType":"pfx",
    "password":""
    } CertificateURL *string `json:"certificateUrl,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go similarity index 91% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go index 021b16328e7..891fba0f646 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -75,7 +76,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -91,8 +92,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go index a42d5268556..3abf4a32b0c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go @@ -35,7 +35,9 @@ func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacement return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client. +// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewProximityPlacementGroupsClientWithBaseURI(baseURI string, subscriptionID string) ProximityPlacementGroupsClient { return ProximityPlacementGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -85,7 +87,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -103,8 +105,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context. // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ProximityPlacementGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -164,7 +165,7 @@ func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -180,8 +181,7 @@ func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context, // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ProximityPlacementGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -200,7 +200,9 @@ func (client ProximityPlacementGroupsClient) DeleteResponder(resp *http.Response // Parameters: // resourceGroupName - the name of the resource group. // proximityPlacementGroupName - the name of the proximity placement group. -func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result ProximityPlacementGroup, err error) { +// includeColocationStatus - includeColocationStatus=true enables fetching the colocation status of all the +// resources in the proximity placement group. +func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (result ProximityPlacementGroup, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Get") defer func() { @@ -211,7 +213,7 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, resourceGroupName, proximityPlacementGroupName) + req, err := client.GetPreparer(ctx, resourceGroupName, proximityPlacementGroupName, includeColocationStatus) if err != nil { err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", nil, "Failure preparing request") return @@ -233,17 +235,20 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr } // GetPreparer prepares the Get request. -func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (*http.Request, error) { +func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (*http.Request, error) { pathParameters := map[string]interface{}{ "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(includeColocationStatus) > 0 { + queryParameters["includeColocationStatus"] = autorest.Encode("query", includeColocationStatus) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -256,8 +261,7 @@ func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, re // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ProximityPlacementGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -316,7 +320,7 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -332,8 +336,7 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx con // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ProximityPlacementGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -426,7 +429,7 @@ func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -442,8 +445,7 @@ func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx cont // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client ProximityPlacementGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -541,7 +543,7 @@ func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -559,8 +561,7 @@ func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context, // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client ProximityPlacementGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go index adb402788c8..e71328f0c6c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go @@ -35,14 +35,15 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) ResourceSkusClient { return ResourceSkusClient{NewWithBaseURI(baseURI, subscriptionID)} } // List gets the list of Microsoft.Compute SKUs available for your Subscription. // Parameters: -// filter - the filter to apply on the operation. +// filter - the filter to apply on the operation. Only **location** filter is supported currently. func (client ResourceSkusClient) List(ctx context.Context, filter string) (result ResourceSkusResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List") @@ -101,8 +102,7 @@ func (client ResourceSkusClient) ListPreparer(ctx context.Context, filter string // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ResourceSkusClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go index 3a52fe87388..e3f4980da29 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go @@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) SnapshotsClient { return SnapshotsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -64,6 +65,8 @@ func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, }}, {Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, @@ -94,7 +97,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -113,9 +116,8 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future SnapshotsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,7 +177,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -191,9 +193,8 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -258,7 +259,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -274,8 +275,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client SnapshotsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -337,7 +337,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -355,9 +355,8 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG // GrantAccessSender sends the GrantAccess request. The method will close the // http.Response Body if it receives an error. func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future SnapshotsGrantAccessFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -418,7 +417,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -434,8 +433,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client SnapshotsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -531,7 +529,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -547,8 +545,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client SnapshotsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -640,7 +637,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -656,9 +653,8 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource // RevokeAccessSender sends the RevokeAccess request. The method will close the // http.Response Body if it receives an error. func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future SnapshotsRevokeAccessFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -718,7 +714,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-11-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -736,9 +732,8 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go new file mode 100644 index 00000000000..d12c7d86766 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go @@ -0,0 +1,652 @@ +package compute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// SSHPublicKeysClient is the compute Client +type SSHPublicKeysClient struct { + BaseClient +} + +// NewSSHPublicKeysClient creates an instance of the SSHPublicKeysClient client. +func NewSSHPublicKeysClient(subscriptionID string) SSHPublicKeysClient { + return NewSSHPublicKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSSHPublicKeysClientWithBaseURI creates an instance of the SSHPublicKeysClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewSSHPublicKeysClientWithBaseURI(baseURI string, subscriptionID string) SSHPublicKeysClient { + return SSHPublicKeysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a new SSH public key resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +// parameters - parameters supplied to create the SSH public key. +func (client SSHPublicKeysClient) Create(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (result SSHPublicKeyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, resourceGroupName, SSHPublicKeyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client SSHPublicKeysClient) CreatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) CreateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) CreateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete an SSH public key. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +func (client SSHPublicKeysClient) Delete(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, SSHPublicKeyName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SSHPublicKeysClient) DeletePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// GenerateKeyPair generates and returns a public/private key pair and populates the SSH public key resource with the +// public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key +// resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +func (client SSHPublicKeysClient) GenerateKeyPair(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyGenerateKeyPairResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.GenerateKeyPair") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GenerateKeyPairPreparer(ctx, resourceGroupName, SSHPublicKeyName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", nil, "Failure preparing request") + return + } + + resp, err := client.GenerateKeyPairSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure sending request") + return + } + + result, err = client.GenerateKeyPairResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure responding to request") + } + + return +} + +// GenerateKeyPairPreparer prepares the GenerateKeyPair request. +func (client SSHPublicKeysClient) GenerateKeyPairPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GenerateKeyPairSender sends the GenerateKeyPair request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) GenerateKeyPairSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GenerateKeyPairResponder handles the response to the GenerateKeyPair request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) GenerateKeyPairResponder(resp *http.Response) (result SSHPublicKeyGenerateKeyPairResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get retrieves information about an SSH public key. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +func (client SSHPublicKeysClient) Get(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, SSHPublicKeyName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SSHPublicKeysClient) GetPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) GetResponder(resp *http.Response) (result SSHPublicKeyResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists all of the SSH public keys in the specified resource group. Use the nextLink property in +// the response to get the next page of SSH public keys. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client SSHPublicKeysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.spkglr.Response.Response != nil { + sc = result.spkglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.spkglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.spkglr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client SSHPublicKeysClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) ListByResourceGroupResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client SSHPublicKeysClient) listByResourceGroupNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) { + req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client SSHPublicKeysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// ListBySubscription lists all of the SSH public keys in the subscription. Use the nextLink property in the response +// to get the next page of SSH public keys. +func (client SSHPublicKeysClient) ListBySubscription(ctx context.Context) (result SSHPublicKeysGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListBySubscription") + defer func() { + sc := -1 + if result.spkglr.Response.Response != nil { + sc = result.spkglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.spkglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.spkglr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client SSHPublicKeysClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySubscriptionSender sends the ListBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) ListBySubscriptionResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySubscriptionNextResults retrieves the next set of results, if any. +func (client SSHPublicKeysClient) listBySubscriptionNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) { + req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client SSHPublicKeysClient) ListBySubscriptionComplete(ctx context.Context) (result SSHPublicKeysGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListBySubscription") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListBySubscription(ctx) + return +} + +// Update updates a new SSH public key resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// SSHPublicKeyName - the name of the SSH public key. +// parameters - parameters supplied to update the SSH public key. +func (client SSHPublicKeysClient) Update(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (result SSHPublicKeyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, SSHPublicKeyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client SSHPublicKeysClient) UpdatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client SSHPublicKeysClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SSHPublicKeysClient) UpdateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go index 690136c06d5..7ec1c40267e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go @@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// NewUsageClientWithBaseURI creates an instance of the UsageClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClient { return UsageClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -91,7 +92,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -107,8 +108,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client UsageClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/version.go similarity index 93% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/version.go index 7ad07e01584..69ef1e6763e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " compute/2019-07-01" + return "Azure-SDK-For-Go/" + Version() + " compute/2019-12-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go index 7a670a607c8..62d2dfefdf2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go @@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin } // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient -// client. +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). func NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -86,7 +87,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex "version": autorest.Encode("path", version), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -102,8 +103,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineExtensionImagesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -162,7 +162,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -178,8 +178,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context. // ListTypesSender sends the ListTypes request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineExtensionImagesClient) ListTypesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListTypesResponder handles the response to the ListTypes request. The method always @@ -240,7 +239,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte "type": autorest.Encode("path", typeParameter), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -265,8 +264,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte // ListVersionsSender sends the ListVersions request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineExtensionImagesClient) ListVersionsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListVersionsResponder handles the response to the ListVersions request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go index a77180ddc68..545d45a63bf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go @@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. +// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewVirtualMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionsClient { return VirtualMachineExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -81,7 +83,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context. "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -99,9 +101,8 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context. // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -162,7 +163,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -178,9 +179,8 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -247,7 +247,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -266,8 +266,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -328,7 +327,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -347,8 +346,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineExtensionsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -405,7 +403,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -423,9 +421,8 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go similarity index 93% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go index e1e830c2f43..431ac3ae3c2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go @@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. +// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualMachineImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImagesClient { return VirtualMachineImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -90,7 +92,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati "version": autorest.Encode("path", version), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -106,8 +108,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineImagesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -129,8 +130,8 @@ func (client VirtualMachineImagesClient) GetResponder(resp *http.Response) (resu // publisherName - a valid image publisher. // offer - a valid image publisher offer. // skus - a valid image SKU. -// filter - the filter to apply on the operation. -func (client VirtualMachineImagesClient) List(ctx context.Context, location string, publisherName string, offer string, skus string, filter string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) { +// expand - the expand expression to apply on the operation. +func (client VirtualMachineImagesClient) List(ctx context.Context, location string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.List") defer func() { @@ -141,7 +142,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListPreparer(ctx, location, publisherName, offer, skus, filter, top, orderby) + req, err := client.ListPreparer(ctx, location, publisherName, offer, skus, expand, top, orderby) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", nil, "Failure preparing request") return @@ -163,7 +164,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri } // ListPreparer prepares the List request. -func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, location string, publisherName string, offer string, skus string, filter string, top *int32, orderby string) (*http.Request, error) { +func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, location string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (*http.Request, error) { pathParameters := map[string]interface{}{ "location": autorest.Encode("path", location), "offer": autorest.Encode("path", offer), @@ -172,12 +173,12 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) } if top != nil { queryParameters["$top"] = autorest.Encode("query", *top) @@ -197,8 +198,7 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineImagesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -258,7 +258,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -274,8 +274,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context, // ListOffersSender sends the ListOffers request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineImagesClient) ListOffersSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListOffersResponder handles the response to the ListOffers request. The method always @@ -333,7 +332,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -349,8 +348,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont // ListPublishersSender sends the ListPublishers request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineImagesClient) ListPublishersSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListPublishersResponder handles the response to the ListPublishers request. The method always @@ -412,7 +410,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -428,8 +426,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l // ListSkusSender sends the ListSkus request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineImagesClient) ListSkusSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListSkusResponder handles the response to the ListSkus request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go index 82be43acfd4..9a670358b39 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go @@ -36,7 +36,9 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRun return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client. +// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewVirtualMachineRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineRunCommandsClient { return VirtualMachineRunCommandsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -91,7 +93,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -107,8 +109,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -173,7 +174,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -189,8 +190,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go index b329db181d9..b73c77f8477 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go @@ -36,7 +36,8 @@ func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. +// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualMachinesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachinesClient { return VirtualMachinesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -89,7 +90,7 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -107,9 +108,8 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc // CaptureSender sends the Capture request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -169,7 +169,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -185,9 +185,8 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co // ConvertToManagedDisksSender sends the ConvertToManagedDisks request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Request) (future VirtualMachinesConvertToManagedDisksFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -207,7 +206,8 @@ func (client VirtualMachinesClient) ConvertToManagedDisksResponder(resp *http.Re return } -// CreateOrUpdate the operation to create or update a virtual machine. +// CreateOrUpdate the operation to create or update a virtual machine. Please note some properties can be set only +// during virtual machine creation. // Parameters: // resourceGroupName - the name of the resource group. // VMName - the name of the virtual machine. @@ -267,7 +267,7 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -286,9 +286,8 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -348,7 +347,7 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -364,9 +363,8 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso // DeallocateSender sends the Deallocate request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -424,7 +422,7 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -440,9 +438,8 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -462,7 +459,11 @@ func (client VirtualMachinesClient) DeleteResponder(resp *http.Response) (result return } -// Generalize sets the state of the virtual machine to generalized. +// Generalize sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine +// before performing this operation.
    For Windows, please refer to [Create a managed image of a generalized VM in +// Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).
    For Linux, please +// refer to [How to create an image of a virtual machine or +// VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image). // Parameters: // resourceGroupName - the name of the resource group. // VMName - the name of the virtual machine. @@ -506,7 +507,7 @@ func (client VirtualMachinesClient) GeneralizePreparer(ctx context.Context, reso "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -522,8 +523,7 @@ func (client VirtualMachinesClient) GeneralizePreparer(ctx context.Context, reso // GeneralizeSender sends the Generalize request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) GeneralizeSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GeneralizeResponder handles the response to the Generalize request. The method always @@ -583,7 +583,7 @@ func (client VirtualMachinesClient) GetPreparer(ctx context.Context, resourceGro "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -602,8 +602,7 @@ func (client VirtualMachinesClient) GetPreparer(ctx context.Context, resourceGro // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -663,7 +662,7 @@ func (client VirtualMachinesClient) InstanceViewPreparer(ctx context.Context, re "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -679,8 +678,7 @@ func (client VirtualMachinesClient) InstanceViewPreparer(ctx context.Context, re // InstanceViewSender sends the InstanceView request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) InstanceViewSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // InstanceViewResponder handles the response to the InstanceView request. The method always @@ -740,7 +738,7 @@ func (client VirtualMachinesClient) ListPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -756,8 +754,7 @@ func (client VirtualMachinesClient) ListPreparer(ctx context.Context, resourceGr // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -853,7 +850,7 @@ func (client VirtualMachinesClient) ListAllPreparer(ctx context.Context, statusO "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -872,8 +869,7 @@ func (client VirtualMachinesClient) ListAllPreparer(ctx context.Context, statusO // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -970,7 +966,7 @@ func (client VirtualMachinesClient) ListAvailableSizesPreparer(ctx context.Conte "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -986,8 +982,7 @@ func (client VirtualMachinesClient) ListAvailableSizesPreparer(ctx context.Conte // ListAvailableSizesSender sends the ListAvailableSizes request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) ListAvailableSizesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always @@ -1052,7 +1047,7 @@ func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1068,8 +1063,7 @@ func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, // ListByLocationSender sends the ListByLocation request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) ListByLocationSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByLocationResponder handles the response to the ListByLocation request. The method always @@ -1160,7 +1154,7 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1176,9 +1170,8 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte // PerformMaintenanceSender sends the PerformMaintenance request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachinesPerformMaintenanceFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1240,7 +1233,7 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1261,9 +1254,8 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour // PowerOffSender sends the PowerOff request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1321,7 +1313,7 @@ func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1337,9 +1329,8 @@ func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourc // ReapplySender sends the Reapply request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) ReapplySender(req *http.Request) (future VirtualMachinesReapplyFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1397,7 +1388,7 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1413,9 +1404,8 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour // RedeploySender sends the Redeploy request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1474,7 +1464,7 @@ func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1495,9 +1485,8 @@ func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourc // ReimageSender sends the Reimage request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future VirtualMachinesReimageFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1555,7 +1544,7 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1571,9 +1560,8 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc // RestartSender sends the Restart request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1638,7 +1626,7 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1656,9 +1644,8 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso // RunCommandSender sends the RunCommand request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future VirtualMachinesRunCommandFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1679,6 +1666,82 @@ func (client VirtualMachinesClient) RunCommandResponder(resp *http.Response) (re return } +// SimulateEviction the operation to simulate the eviction of spot virtual machine. The eviction will occur within 30 +// minutes of calling the API +// Parameters: +// resourceGroupName - the name of the resource group. +// VMName - the name of the virtual machine. +func (client VirtualMachinesClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.SimulateEviction") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", nil, "Failure preparing request") + return + } + + resp, err := client.SimulateEvictionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure sending request") + return + } + + result, err = client.SimulateEvictionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure responding to request") + } + + return +} + +// SimulateEvictionPreparer prepares the SimulateEviction request. +func (client VirtualMachinesClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SimulateEvictionSender sends the SimulateEviction request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + // Start the operation to start a virtual machine. // Parameters: // resourceGroupName - the name of the resource group. @@ -1717,7 +1780,7 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1733,9 +1796,8 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG // StartSender sends the Start request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1794,7 +1856,7 @@ func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resource "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1812,9 +1874,8 @@ func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resource // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future VirtualMachinesUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go index 7e4d6d0a6b7..97605bcbf05 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go @@ -36,7 +36,8 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMac } // NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetExtensionsClient client. +// VirtualMachineScaleSetExtensionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetExtensionsClient { return VirtualMachineScaleSetExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -82,11 +83,12 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx "vmssExtensionName": autorest.Encode("path", vmssExtensionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + extensionParameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -100,9 +102,8 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -163,7 +164,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context. "vmssExtensionName": autorest.Encode("path", vmssExtensionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -179,9 +180,8 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context. // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetExtensionsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -248,7 +248,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con "vmssExtensionName": autorest.Encode("path", vmssExtensionName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -267,8 +267,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -329,7 +328,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -345,8 +344,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetExtensionsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -398,3 +396,86 @@ func (client VirtualMachineScaleSetExtensionsClient) ListComplete(ctx context.Co result.page, err = client.List(ctx, resourceGroupName, VMScaleSetName) return } + +// Update the operation to update an extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set where the extension should be updated. +// vmssExtensionName - the name of the VM scale set extension. +// extensionParameters - parameters supplied to the Update VM scale set Extension operation. +func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (result VirtualMachineScaleSetExtensionsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + "vmssExtensionName": autorest.Encode("path", vmssExtensionName), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + extensionParameters.Name = nil + extensionParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters), + autorest.WithJSON(extensionParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go index c20c01d515c..e5653cbc262 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go @@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) Virtu } // NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetRollingUpgradesClient client. +// VirtualMachineScaleSetRollingUpgradesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient { return VirtualMachineScaleSetRollingUpgradesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -80,7 +81,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -96,9 +97,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con // CancelSender sends the Cancel request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -162,7 +162,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -178,8 +178,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx // GetLatestSender sends the GetLatest request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetLatestResponder handles the response to the GetLatest request. The method always @@ -235,7 +234,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -251,9 +250,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP // StartExtensionUpgradeSender sends the StartExtensionUpgrade request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -312,7 +310,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -328,9 +326,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer // StartOSUpgradeSender sends the StartOSUpgrade request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go index 54b1393fe57..c95a9756695 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScale return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. +// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewVirtualMachineScaleSetsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetsClient { return VirtualMachineScaleSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -87,20 +89,25 @@ func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupPrepare "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup", pathParameters), - autorest.WithJSON(parameters)) + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // ConvertToSinglePlacementGroupSender sends the ConvertToSinglePlacementGroup request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ConvertToSinglePlacementGroupResponder handles the response to the ConvertToSinglePlacementGroup request. The method always @@ -138,15 +145,15 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, @@ -177,7 +184,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -195,9 +202,8 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -258,7 +264,7 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -279,9 +285,8 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte // DeallocateSender sends the Deallocate request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -339,7 +344,7 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -355,9 +360,8 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context, // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -422,7 +426,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -440,9 +444,8 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context. // DeleteInstancesSender sends the DeleteInstances request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -508,7 +511,7 @@ func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUp "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "platformUpdateDomain": autorest.Encode("query", platformUpdateDomain), @@ -525,8 +528,7 @@ func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUp // ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender sends the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder handles the response to the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method always @@ -586,7 +588,7 @@ func (client VirtualMachineScaleSetsClient) GetPreparer(ctx context.Context, res "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -602,8 +604,7 @@ func (client VirtualMachineScaleSetsClient) GetPreparer(ctx context.Context, res // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -663,7 +664,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -679,8 +680,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(ctx context. // GetInstanceViewSender sends the GetInstanceView request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetInstanceViewResponder handles the response to the GetInstanceView request. The method always @@ -741,7 +741,7 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryPreparer(ctx cont "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -757,8 +757,7 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryPreparer(ctx cont // GetOSUpgradeHistorySender sends the GetOSUpgradeHistory request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistorySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetOSUpgradeHistoryResponder handles the response to the GetOSUpgradeHistory request. The method always @@ -854,7 +853,7 @@ func (client VirtualMachineScaleSetsClient) ListPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -870,8 +869,7 @@ func (client VirtualMachineScaleSetsClient) ListPreparer(ctx context.Context, re // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -966,7 +964,7 @@ func (client VirtualMachineScaleSetsClient) ListAllPreparer(ctx context.Context) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -982,8 +980,7 @@ func (client VirtualMachineScaleSetsClient) ListAllPreparer(ctx context.Context) // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -1082,7 +1079,7 @@ func (client VirtualMachineScaleSetsClient) ListSkusPreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1098,8 +1095,7 @@ func (client VirtualMachineScaleSetsClient) ListSkusPreparer(ctx context.Context // ListSkusSender sends the ListSkus request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) ListSkusSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListSkusResponder handles the response to the ListSkus request. The method always @@ -1193,7 +1189,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1214,9 +1210,8 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx conte // PerformMaintenanceSender sends the PerformMaintenance request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetsPerformMaintenanceFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1279,7 +1274,7 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1305,9 +1300,8 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context // PowerOffSender sends the PowerOff request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1367,7 +1361,7 @@ func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1388,9 +1382,8 @@ func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context // RedeploySender sends the Redeploy request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetsRedeployFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1450,7 +1443,7 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1471,9 +1464,8 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context, // ReimageSender sends the Reimage request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1533,7 +1525,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1554,9 +1546,8 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte // ReimageAllSender sends the ReimageAll request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetsReimageAllFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1615,7 +1606,7 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1636,9 +1627,8 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context, // RestartSender sends the Restart request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1658,6 +1648,84 @@ func (client VirtualMachineScaleSetsClient) RestartResponder(resp *http.Response return } +// SetOrchestrationServiceState changes ServiceState property for a given service +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the virtual machine scale set to create or update. +// parameters - the input object for SetOrchestrationServiceState API. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceState(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (result VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.SetOrchestrationServiceState") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SetOrchestrationServiceStatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", nil, "Failure preparing request") + return + } + + result, err = client.SetOrchestrationServiceStateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", result.Response(), "Failure sending request") + return + } + + return +} + +// SetOrchestrationServiceStatePreparer prepares the SetOrchestrationServiceState request. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SetOrchestrationServiceStateSender sends the SetOrchestrationServiceState request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateSender(req *http.Request) (future VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// SetOrchestrationServiceStateResponder handles the response to the SetOrchestrationServiceState request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // Start starts one or more virtual machines in a VM scale set. // Parameters: // resourceGroupName - the name of the resource group. @@ -1697,7 +1765,7 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1718,9 +1786,8 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r // StartSender sends the Start request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1779,7 +1846,7 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1797,9 +1864,8 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context, // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetsUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1865,7 +1931,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1883,9 +1949,8 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context. // UpdateInstancesSender sends the UpdateInstances request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go index 3fe6bf51dd2..bf1427b1066 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvmextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go @@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string) VirtualM } // NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetVMExtensionsClient client. +// VirtualMachineScaleSetVMExtensionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMExtensionsClient { return VirtualMachineScaleSetVMExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -85,7 +86,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -103,9 +104,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -168,7 +168,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,9 +184,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -255,7 +254,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.C "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -274,8 +273,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.C // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -338,7 +336,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -357,8 +355,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context. // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMExtensionsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -417,7 +414,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -435,9 +432,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go similarity index 91% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go index 155e6eee83d..7e611cfb12b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go @@ -36,7 +36,9 @@ func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineSca return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. +// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewVirtualMachineScaleSetVMsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMsClient { return VirtualMachineScaleSetVMsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -83,7 +85,7 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -99,9 +101,8 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con // DeallocateSender sends the Deallocate request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -161,7 +162,7 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -177,9 +178,8 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -246,7 +246,7 @@ func (client VirtualMachineScaleSetVMsClient) GetPreparer(ctx context.Context, r "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -265,8 +265,7 @@ func (client VirtualMachineScaleSetVMsClient) GetPreparer(ctx context.Context, r // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -328,7 +327,7 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceViewPreparer(ctx contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -344,8 +343,7 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceViewPreparer(ctx contex // GetInstanceViewSender sends the GetInstanceView request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetInstanceViewResponder handles the response to the GetInstanceView request. The method always @@ -409,7 +407,7 @@ func (client VirtualMachineScaleSetVMsClient) ListPreparer(ctx context.Context, "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -434,8 +432,7 @@ func (client VirtualMachineScaleSetVMsClient) ListPreparer(ctx context.Context, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -528,7 +525,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -544,9 +541,8 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx con // PerformMaintenanceSender sends the PerformMaintenance request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -610,7 +606,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -631,9 +627,8 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte // PowerOffSender sends the PowerOff request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -694,7 +689,7 @@ func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -710,9 +705,8 @@ func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Conte // RedeploySender sends the Redeploy request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetVMsRedeployFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -773,7 +767,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -794,9 +788,8 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex // ReimageSender sends the Reimage request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -857,7 +850,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -873,9 +866,8 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con // ReimageAllSender sends the ReimageAll request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageAllFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -935,7 +927,7 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -951,9 +943,8 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex // RestartSender sends the Restart request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1020,7 +1011,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1038,9 +1029,8 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Con // RunCommandSender sends the RunCommand request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request) (future VirtualMachineScaleSetVMsRunCommandFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1061,6 +1051,84 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandResponder(resp *http.Res return } +// SimulateEviction the operation to simulate the eviction of spot virtual machine in a VM scale set. The eviction will +// occur within 30 minutes of calling the API +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set. +// instanceID - the instance ID of the virtual machine. +func (client VirtualMachineScaleSetVMsClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.SimulateEviction") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", nil, "Failure preparing request") + return + } + + resp, err := client.SimulateEvictionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure sending request") + return + } + + result, err = client.SimulateEvictionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure responding to request") + } + + return +} + +// SimulateEvictionPreparer prepares the SimulateEviction request. +func (client VirtualMachineScaleSetVMsClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2019-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/simulateEviction", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SimulateEvictionSender sends the SimulateEviction request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetVMsClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetVMsClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + // Start starts a virtual machine in a VM scale set. // Parameters: // resourceGroupName - the name of the resource group. @@ -1101,7 +1169,7 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1117,9 +1185,8 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context, // StartSender sends the Start request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1201,7 +1268,7 @@ func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1223,9 +1290,8 @@ func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMsUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go index 55335fe9a51..0eb7702a3b4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go @@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. +// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSizesClient { return VirtualMachineSizesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -90,7 +92,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-07-01" + const APIVersion = "2019-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -106,8 +108,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualMachineSizesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go new file mode 100644 index 00000000000..65f696ef58b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go @@ -0,0 +1,609 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// AgentPoolsClient is the the Container Service Client. +type AgentPoolsClient struct { + BaseClient +} + +// NewAgentPoolsClient creates an instance of the AgentPoolsClient client. +func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient { + return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient { + return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an agent pool in the specified managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// agentPoolName - the name of the agent pool. +// parameters - parameters supplied to the Create or Update an agent pool operation. +func (client AgentPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool) (result AgentPoolsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, agentPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client AgentPoolsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "agentPoolName": autorest.Encode("path", agentPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client AgentPoolsClient) CreateOrUpdateSender(req *http.Request) (future AgentPoolsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) CreateOrUpdateResponder(resp *http.Response) (result AgentPool, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the agent pool in the specified managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// agentPoolName - the name of the agent pool. +func (client AgentPoolsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPoolsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, agentPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AgentPoolsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "agentPoolName": autorest.Encode("path", agentPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client AgentPoolsClient) DeleteSender(req *http.Request) (future AgentPoolsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of the agent pool by managed cluster and resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// agentPoolName - the name of the agent pool. +func (client AgentPoolsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPool, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, agentPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client AgentPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "agentPoolName": autorest.Encode("path", agentPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client AgentPoolsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) GetResponder(resp *http.Response) (result AgentPool, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAvailableAgentPoolVersions gets a list of supported versions for the specified agent pool. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolAvailableVersions, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.GetAvailableAgentPoolVersions") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", err.Error()) + } + + req, err := client.GetAvailableAgentPoolVersionsPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", nil, "Failure preparing request") + return + } + + resp, err := client.GetAvailableAgentPoolVersionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", resp, "Failure sending request") + return + } + + result, err = client.GetAvailableAgentPoolVersionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", resp, "Failure responding to request") + } + + return +} + +// GetAvailableAgentPoolVersionsPreparer prepares the GetAvailableAgentPoolVersions request. +func (client AgentPoolsClient) GetAvailableAgentPoolVersionsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAvailableAgentPoolVersionsSender sends the GetAvailableAgentPoolVersions request. The method will close the +// http.Response Body if it receives an error. +func (client AgentPoolsClient) GetAvailableAgentPoolVersionsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetAvailableAgentPoolVersionsResponder handles the response to the GetAvailableAgentPoolVersions request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) GetAvailableAgentPoolVersionsResponder(resp *http.Response) (result AgentPoolAvailableVersions, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetUpgradeProfile gets the details of the upgrade profile for an agent pool with a specified resource group and +// managed cluster name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// agentPoolName - the name of the agent pool. +func (client AgentPoolsClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPoolUpgradeProfile, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.GetUpgradeProfile") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "GetUpgradeProfile", err.Error()) + } + + req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName, agentPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", nil, "Failure preparing request") + return + } + + resp, err := client.GetUpgradeProfileSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", resp, "Failure sending request") + return + } + + result, err = client.GetUpgradeProfileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", resp, "Failure responding to request") + } + + return +} + +// GetUpgradeProfilePreparer prepares the GetUpgradeProfile request. +func (client AgentPoolsClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "agentPoolName": autorest.Encode("path", agentPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetUpgradeProfileSender sends the GetUpgradeProfile request. The method will close the +// http.Response Body if it receives an error. +func (client AgentPoolsClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetUpgradeProfileResponder handles the response to the GetUpgradeProfile request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) GetUpgradeProfileResponder(resp *http.Response) (result AgentPoolUpgradeProfile, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent +// pool. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client AgentPoolsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.List") + defer func() { + sc := -1 + if result.aplr.Response.Response != nil { + sc = result.aplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.AgentPoolsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.aplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", resp, "Failure sending request") + return + } + + result.aplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client AgentPoolsClient) ListPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client AgentPoolsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AgentPoolsClient) ListResponder(resp *http.Response) (result AgentPoolListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client AgentPoolsClient) listNextResults(ctx context.Context, lastResults AgentPoolListResult) (result AgentPoolListResult, err error) { + req, err := lastResults.agentPoolListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AgentPoolsClient) ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, resourceName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/client.go new file mode 100644 index 00000000000..858e168f208 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/client.go @@ -0,0 +1,52 @@ +// Package containerservice implements the Azure ARM Containerservice service API version . +// +// The Container Service Client. +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Containerservice + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Containerservice. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go new file mode 100644 index 00000000000..c059245f0e0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go @@ -0,0 +1,618 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ContainerServicesClient is the the Container Service Client. +type ContainerServicesClient struct { + BaseClient +} + +// NewContainerServicesClient creates an instance of the ContainerServicesClient client. +func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { + return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { + return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a container service with the specified configuration of orchestrator, masters, and +// agents. +// Parameters: +// resourceGroupName - the name of the resource group. +// containerServiceName - the name of the container service in the specified subscription and resource group. +// parameters - parameters supplied to the Create or Update a Container Service operation. +func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (result ContainerServicesCreateOrUpdateFutureType, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.OrchestratorProfile", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.CustomProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.VaultID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.ServicePrincipalProfile.KeyVaultSecretRef.SecretName", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + {Target: "parameters.Properties.MasterProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}}, + {Target: "parameters.Properties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.Properties.LinuxProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, + {Target: "parameters.Properties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.Properties.DiagnosticsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + }}}}}); err != nil { + return result, validation.NewError("containerservice.ContainerServicesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, containerServiceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerServiceName": autorest.Encode("path", containerServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFutureType, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified container service in the specified subscription and resource group. The operation does +// not delete other resources created as part of creating a container service, including storage accounts, VMs, and +// availability sets. All the other resources created with the container service are part of the same resource group +// and can be deleted individually. +// Parameters: +// resourceGroupName - the name of the resource group. +// containerServiceName - the name of the container service in the specified subscription and resource group. +func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerServicesDeleteFutureType, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, containerServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerServiceName": autorest.Encode("path", containerServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFutureType, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the properties of the specified container service in the specified subscription and resource group. The +// operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters +// and agents. +// Parameters: +// resourceGroupName - the name of the resource group. +// containerServiceName - the name of the container service in the specified subscription and resource group. +func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerService, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, containerServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, containerServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerServiceName": autorest.Encode("path", containerServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) GetResponder(resp *http.Response) (result ContainerService, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of container services in the specified subscription. The operation returns properties of each +// container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. +func (client ContainerServicesClient) List(ctx context.Context) (result ListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.List") + defer func() { + sc := -1 + if result.lr.Response.Response != nil { + sc = result.lr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure sending request") + return + } + + result.lr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) ListResponder(resp *http.Response) (result ListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ContainerServicesClient) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) { + req, err := lastResults.listResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ContainerServicesClient) ListComplete(ctx context.Context) (result ListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByResourceGroup gets a list of container services in the specified subscription and resource group. The +// operation returns properties of each container service including state, orchestrator, number of masters and agents, +// and FQDNs of masters and agents. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.lr.Response.Response != nil { + sc = result.lr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ContainerServicesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client ContainerServicesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) { + req, err := lastResults.listResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ContainerServicesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// ListOrchestrators gets a list of supported orchestrators in the specified subscription. The operation returns +// properties of each orchestrator including version, available upgrades and whether that version or upgrades are in +// preview. +// Parameters: +// location - the name of a supported Azure region. +// resourceType - resource type for which the list of orchestrators needs to be returned +func (client ContainerServicesClient) ListOrchestrators(ctx context.Context, location string, resourceType string) (result OrchestratorVersionProfileListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListOrchestrators") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListOrchestratorsPreparer(ctx, location, resourceType) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", nil, "Failure preparing request") + return + } + + resp, err := client.ListOrchestratorsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", resp, "Failure sending request") + return + } + + result, err = client.ListOrchestratorsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", resp, "Failure responding to request") + } + + return +} + +// ListOrchestratorsPreparer prepares the ListOrchestrators request. +func (client ContainerServicesClient) ListOrchestratorsPreparer(ctx context.Context, location string, resourceType string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(resourceType) > 0 { + queryParameters["resource-type"] = autorest.Encode("query", resourceType) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListOrchestratorsSender sends the ListOrchestrators request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) ListOrchestratorsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListOrchestratorsResponder handles the response to the ListOrchestrators request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) ListOrchestratorsResponder(resp *http.Response) (result OrchestratorVersionProfileListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go new file mode 100644 index 00000000000..2e2955fa987 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go @@ -0,0 +1,1367 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ManagedClustersClient is the the Container Service Client. +type ManagedClustersClient struct { + BaseClient +} + +// NewManagedClustersClient creates an instance of the ManagedClustersClient client. +func NewManagedClustersClient(subscriptionID string) ManagedClustersClient { + return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient { + return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a managed cluster with the specified configuration for agents and Kubernetes +// version. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// parameters - parameters supplied to the Create or Update a Managed Cluster operation. +func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (result ManagedClustersCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.ManagedClusterProperties.WindowsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}}, + }}, + {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Pattern, Rule: `^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + }}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.InclusiveMaximum, Rule: int64(64000), Chain: nil}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMaximum, Rule: int64(120), Chain: nil}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMinimum, Rule: int64(4), Chain: nil}, + }}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future ManagedClustersCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the managed cluster with a specified resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ManagedClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) DeleteSender(req *http.Request) (future ManagedClustersDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of the managed cluster with a specified resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedCluster, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ManagedClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) GetResponder(resp *http.Response) (result ManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAccessProfile gets the accessProfile for the specified role name of the managed cluster with a specified resource +// group and name. **WARNING**: This API will be deprecated. Instead use +// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) +// or +// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) +// . +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// roleName - the name of the role for managed cluster accessProfile resource. +func (client ManagedClustersClient) GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result ManagedClusterAccessProfile, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetAccessProfile") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "GetAccessProfile", err.Error()) + } + + req, err := client.GetAccessProfilePreparer(ctx, resourceGroupName, resourceName, roleName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", nil, "Failure preparing request") + return + } + + resp, err := client.GetAccessProfileSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure sending request") + return + } + + result, err = client.GetAccessProfileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure responding to request") + } + + return +} + +// GetAccessProfilePreparer prepares the GetAccessProfile request. +func (client ManagedClustersClient) GetAccessProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "roleName": autorest.Encode("path", roleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAccessProfileSender sends the GetAccessProfile request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) GetAccessProfileSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetAccessProfileResponder handles the response to the GetAccessProfile request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) GetAccessProfileResponder(resp *http.Response) (result ManagedClusterAccessProfile, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetUpgradeProfile gets the details of the upgrade profile for a managed cluster with a specified resource group and +// name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClusterUpgradeProfile, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetUpgradeProfile") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "GetUpgradeProfile", err.Error()) + } + + req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", nil, "Failure preparing request") + return + } + + resp, err := client.GetUpgradeProfileSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure sending request") + return + } + + result, err = client.GetUpgradeProfileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure responding to request") + } + + return +} + +// GetUpgradeProfilePreparer prepares the GetUpgradeProfile request. +func (client ManagedClustersClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetUpgradeProfileSender sends the GetUpgradeProfile request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetUpgradeProfileResponder handles the response to the GetUpgradeProfile request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) GetUpgradeProfileResponder(resp *http.Response) (result ManagedClusterUpgradeProfile, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of managed clusters in the specified subscription. The operation returns properties of each managed +// cluster. +func (client ManagedClustersClient) List(ctx context.Context) (result ManagedClusterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.List") + defer func() { + sc := -1 + if result.mclr.Response.Response != nil { + sc = result.mclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.mclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure sending request") + return + } + + result.mclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ManagedClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListResponder(resp *http.Response) (result ManagedClusterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ManagedClustersClient) listNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) { + req, err := lastResults.managedClusterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ManagedClustersClient) ListComplete(ctx context.Context) (result ManagedClusterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByResourceGroup lists managed clusters in the specified subscription and resource group. The operation returns +// properties of each managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client ManagedClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.mclr.Response.Response != nil { + sc = result.mclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.mclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.mclr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ManagedClustersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListByResourceGroupResponder(resp *http.Response) (result ManagedClusterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client ManagedClustersClient) listByResourceGroupNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) { + req, err := lastResults.managedClusterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// ListClusterAdminCredentials gets cluster admin credential of the managed cluster with a specified resource group and +// name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterAdminCredentials") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterAdminCredentials", err.Error()) + } + + req, err := client.ListClusterAdminCredentialsPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", nil, "Failure preparing request") + return + } + + resp, err := client.ListClusterAdminCredentialsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", resp, "Failure sending request") + return + } + + result, err = client.ListClusterAdminCredentialsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", resp, "Failure responding to request") + } + + return +} + +// ListClusterAdminCredentialsPreparer prepares the ListClusterAdminCredentials request. +func (client ManagedClustersClient) ListClusterAdminCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListClusterAdminCredentialsSender sends the ListClusterAdminCredentials request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ListClusterAdminCredentialsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListClusterAdminCredentialsResponder handles the response to the ListClusterAdminCredentials request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListClusterAdminCredentialsResponder(resp *http.Response) (result CredentialResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListClusterMonitoringUserCredentials gets cluster monitoring user credential of the managed cluster with a specified +// resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterMonitoringUserCredentials") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", err.Error()) + } + + req, err := client.ListClusterMonitoringUserCredentialsPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", nil, "Failure preparing request") + return + } + + resp, err := client.ListClusterMonitoringUserCredentialsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure sending request") + return + } + + result, err = client.ListClusterMonitoringUserCredentialsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure responding to request") + } + + return +} + +// ListClusterMonitoringUserCredentialsPreparer prepares the ListClusterMonitoringUserCredentials request. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListClusterMonitoringUserCredentialsSender sends the ListClusterMonitoringUserCredentials request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListClusterMonitoringUserCredentialsResponder handles the response to the ListClusterMonitoringUserCredentials request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListClusterUserCredentials gets cluster user credential of the managed cluster with a specified resource group and +// name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterUserCredentials") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterUserCredentials", err.Error()) + } + + req, err := client.ListClusterUserCredentialsPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", nil, "Failure preparing request") + return + } + + resp, err := client.ListClusterUserCredentialsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", resp, "Failure sending request") + return + } + + result, err = client.ListClusterUserCredentialsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", resp, "Failure responding to request") + } + + return +} + +// ListClusterUserCredentialsPreparer prepares the ListClusterUserCredentials request. +func (client ManagedClustersClient) ListClusterUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListClusterUserCredentialsSender sends the ListClusterUserCredentials request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ListClusterUserCredentialsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListClusterUserCredentialsResponder handles the response to the ListClusterUserCredentials request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListClusterUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ResetAADProfile update the AAD Profile for a managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// parameters - parameters supplied to the Reset AAD Profile operation for a Managed Cluster. +func (client ManagedClustersClient) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile) (result ManagedClustersResetAADProfileFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ResetAADProfile") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ResetAADProfile", err.Error()) + } + + req, err := client.ResetAADProfilePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", nil, "Failure preparing request") + return + } + + result, err = client.ResetAADProfileSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", result.Response(), "Failure sending request") + return + } + + return +} + +// ResetAADProfilePreparer prepares the ResetAADProfile request. +func (client ManagedClustersClient) ResetAADProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetAADProfileSender sends the ResetAADProfile request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ResetAADProfileSender(req *http.Request) (future ManagedClustersResetAADProfileFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ResetAADProfileResponder handles the response to the ResetAADProfile request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ResetAADProfileResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ResetServicePrincipalProfile update the service principal Profile for a managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// parameters - parameters supplied to the Reset Service Principal Profile operation for a Managed Cluster. +func (client ManagedClustersClient) ResetServicePrincipalProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile) (result ManagedClustersResetServicePrincipalProfileFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ResetServicePrincipalProfile") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ClientID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", err.Error()) + } + + req, err := client.ResetServicePrincipalProfilePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", nil, "Failure preparing request") + return + } + + result, err = client.ResetServicePrincipalProfileSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", result.Response(), "Failure sending request") + return + } + + return +} + +// ResetServicePrincipalProfilePreparer prepares the ResetServicePrincipalProfile request. +func (client ManagedClustersClient) ResetServicePrincipalProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetServicePrincipalProfileSender sends the ResetServicePrincipalProfile request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ResetServicePrincipalProfileSender(req *http.Request) (future ManagedClustersResetServicePrincipalProfileFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ResetServicePrincipalProfileResponder handles the response to the ResetServicePrincipalProfile request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ResetServicePrincipalProfileResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// RotateClusterCertificates rotate certificates of a managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) RotateClusterCertificates(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersRotateClusterCertificatesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.RotateClusterCertificates") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "RotateClusterCertificates", err.Error()) + } + + req, err := client.RotateClusterCertificatesPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", nil, "Failure preparing request") + return + } + + result, err = client.RotateClusterCertificatesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", result.Response(), "Failure sending request") + return + } + + return +} + +// RotateClusterCertificatesPreparer prepares the RotateClusterCertificates request. +func (client ManagedClustersClient) RotateClusterCertificatesPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RotateClusterCertificatesSender sends the RotateClusterCertificates request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) RotateClusterCertificatesSender(req *http.Request) (future ManagedClustersRotateClusterCertificatesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RotateClusterCertificatesResponder handles the response to the RotateClusterCertificates request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) RotateClusterCertificatesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateTags updates a managed cluster with the specified tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +// parameters - parameters supplied to the Update Managed Cluster Tags operation. +func (client ManagedClustersClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (result ManagedClustersUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.UpdateTags") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "UpdateTags", err.Error()) + } + + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ManagedClustersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) UpdateTagsSender(req *http.Request) (future ManagedClustersUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) UpdateTagsResponder(resp *http.Response) (result ManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/models.go new file mode 100644 index 00000000000..3d30ed739bd --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/models.go @@ -0,0 +1,3669 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice" + +// AgentPoolMode enumerates the values for agent pool mode. +type AgentPoolMode string + +const ( + // System ... + System AgentPoolMode = "System" + // User ... + User AgentPoolMode = "User" +) + +// PossibleAgentPoolModeValues returns an array of possible values for the AgentPoolMode const type. +func PossibleAgentPoolModeValues() []AgentPoolMode { + return []AgentPoolMode{System, User} +} + +// AgentPoolType enumerates the values for agent pool type. +type AgentPoolType string + +const ( + // AvailabilitySet ... + AvailabilitySet AgentPoolType = "AvailabilitySet" + // VirtualMachineScaleSets ... + VirtualMachineScaleSets AgentPoolType = "VirtualMachineScaleSets" +) + +// PossibleAgentPoolTypeValues returns an array of possible values for the AgentPoolType const type. +func PossibleAgentPoolTypeValues() []AgentPoolType { + return []AgentPoolType{AvailabilitySet, VirtualMachineScaleSets} +} + +// Kind enumerates the values for kind. +type Kind string + +const ( + // KindAADIdentityProvider ... + KindAADIdentityProvider Kind = "AADIdentityProvider" + // KindOpenShiftManagedClusterBaseIdentityProvider ... + KindOpenShiftManagedClusterBaseIdentityProvider Kind = "OpenShiftManagedClusterBaseIdentityProvider" +) + +// PossibleKindValues returns an array of possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{KindAADIdentityProvider, KindOpenShiftManagedClusterBaseIdentityProvider} +} + +// LoadBalancerSku enumerates the values for load balancer sku. +type LoadBalancerSku string + +const ( + // Basic ... + Basic LoadBalancerSku = "basic" + // Standard ... + Standard LoadBalancerSku = "standard" +) + +// PossibleLoadBalancerSkuValues returns an array of possible values for the LoadBalancerSku const type. +func PossibleLoadBalancerSkuValues() []LoadBalancerSku { + return []LoadBalancerSku{Basic, Standard} +} + +// ManagedClusterSKUName enumerates the values for managed cluster sku name. +type ManagedClusterSKUName string + +const ( + // ManagedClusterSKUNameBasic ... + ManagedClusterSKUNameBasic ManagedClusterSKUName = "Basic" +) + +// PossibleManagedClusterSKUNameValues returns an array of possible values for the ManagedClusterSKUName const type. +func PossibleManagedClusterSKUNameValues() []ManagedClusterSKUName { + return []ManagedClusterSKUName{ManagedClusterSKUNameBasic} +} + +// ManagedClusterSKUTier enumerates the values for managed cluster sku tier. +type ManagedClusterSKUTier string + +const ( + // Free ... + Free ManagedClusterSKUTier = "Free" + // Paid ... + Paid ManagedClusterSKUTier = "Paid" +) + +// PossibleManagedClusterSKUTierValues returns an array of possible values for the ManagedClusterSKUTier const type. +func PossibleManagedClusterSKUTierValues() []ManagedClusterSKUTier { + return []ManagedClusterSKUTier{Free, Paid} +} + +// NetworkMode enumerates the values for network mode. +type NetworkMode string + +const ( + // Bridge ... + Bridge NetworkMode = "bridge" + // Transparent ... + Transparent NetworkMode = "transparent" +) + +// PossibleNetworkModeValues returns an array of possible values for the NetworkMode const type. +func PossibleNetworkModeValues() []NetworkMode { + return []NetworkMode{Bridge, Transparent} +} + +// NetworkPlugin enumerates the values for network plugin. +type NetworkPlugin string + +const ( + // Azure ... + Azure NetworkPlugin = "azure" + // Kubenet ... + Kubenet NetworkPlugin = "kubenet" +) + +// PossibleNetworkPluginValues returns an array of possible values for the NetworkPlugin const type. +func PossibleNetworkPluginValues() []NetworkPlugin { + return []NetworkPlugin{Azure, Kubenet} +} + +// NetworkPolicy enumerates the values for network policy. +type NetworkPolicy string + +const ( + // NetworkPolicyAzure ... + NetworkPolicyAzure NetworkPolicy = "azure" + // NetworkPolicyCalico ... + NetworkPolicyCalico NetworkPolicy = "calico" +) + +// PossibleNetworkPolicyValues returns an array of possible values for the NetworkPolicy const type. +func PossibleNetworkPolicyValues() []NetworkPolicy { + return []NetworkPolicy{NetworkPolicyAzure, NetworkPolicyCalico} +} + +// OpenShiftAgentPoolProfileRole enumerates the values for open shift agent pool profile role. +type OpenShiftAgentPoolProfileRole string + +const ( + // Compute ... + Compute OpenShiftAgentPoolProfileRole = "compute" + // Infra ... + Infra OpenShiftAgentPoolProfileRole = "infra" +) + +// PossibleOpenShiftAgentPoolProfileRoleValues returns an array of possible values for the OpenShiftAgentPoolProfileRole const type. +func PossibleOpenShiftAgentPoolProfileRoleValues() []OpenShiftAgentPoolProfileRole { + return []OpenShiftAgentPoolProfileRole{Compute, Infra} +} + +// OpenShiftContainerServiceVMSize enumerates the values for open shift container service vm size. +type OpenShiftContainerServiceVMSize string + +const ( + // StandardD16sV3 ... + StandardD16sV3 OpenShiftContainerServiceVMSize = "Standard_D16s_v3" + // StandardD2sV3 ... + StandardD2sV3 OpenShiftContainerServiceVMSize = "Standard_D2s_v3" + // StandardD32sV3 ... + StandardD32sV3 OpenShiftContainerServiceVMSize = "Standard_D32s_v3" + // StandardD4sV3 ... + StandardD4sV3 OpenShiftContainerServiceVMSize = "Standard_D4s_v3" + // StandardD64sV3 ... + StandardD64sV3 OpenShiftContainerServiceVMSize = "Standard_D64s_v3" + // StandardD8sV3 ... + StandardD8sV3 OpenShiftContainerServiceVMSize = "Standard_D8s_v3" + // StandardDS12V2 ... + StandardDS12V2 OpenShiftContainerServiceVMSize = "Standard_DS12_v2" + // StandardDS13V2 ... + StandardDS13V2 OpenShiftContainerServiceVMSize = "Standard_DS13_v2" + // StandardDS14V2 ... + StandardDS14V2 OpenShiftContainerServiceVMSize = "Standard_DS14_v2" + // StandardDS15V2 ... + StandardDS15V2 OpenShiftContainerServiceVMSize = "Standard_DS15_v2" + // StandardDS4V2 ... + StandardDS4V2 OpenShiftContainerServiceVMSize = "Standard_DS4_v2" + // StandardDS5V2 ... + StandardDS5V2 OpenShiftContainerServiceVMSize = "Standard_DS5_v2" + // StandardE16sV3 ... + StandardE16sV3 OpenShiftContainerServiceVMSize = "Standard_E16s_v3" + // StandardE20sV3 ... + StandardE20sV3 OpenShiftContainerServiceVMSize = "Standard_E20s_v3" + // StandardE32sV3 ... + StandardE32sV3 OpenShiftContainerServiceVMSize = "Standard_E32s_v3" + // StandardE4sV3 ... + StandardE4sV3 OpenShiftContainerServiceVMSize = "Standard_E4s_v3" + // StandardE64sV3 ... + StandardE64sV3 OpenShiftContainerServiceVMSize = "Standard_E64s_v3" + // StandardE8sV3 ... + StandardE8sV3 OpenShiftContainerServiceVMSize = "Standard_E8s_v3" + // StandardF16s ... + StandardF16s OpenShiftContainerServiceVMSize = "Standard_F16s" + // StandardF16sV2 ... + StandardF16sV2 OpenShiftContainerServiceVMSize = "Standard_F16s_v2" + // StandardF32sV2 ... + StandardF32sV2 OpenShiftContainerServiceVMSize = "Standard_F32s_v2" + // StandardF64sV2 ... + StandardF64sV2 OpenShiftContainerServiceVMSize = "Standard_F64s_v2" + // StandardF72sV2 ... + StandardF72sV2 OpenShiftContainerServiceVMSize = "Standard_F72s_v2" + // StandardF8s ... + StandardF8s OpenShiftContainerServiceVMSize = "Standard_F8s" + // StandardF8sV2 ... + StandardF8sV2 OpenShiftContainerServiceVMSize = "Standard_F8s_v2" + // StandardGS2 ... + StandardGS2 OpenShiftContainerServiceVMSize = "Standard_GS2" + // StandardGS3 ... + StandardGS3 OpenShiftContainerServiceVMSize = "Standard_GS3" + // StandardGS4 ... + StandardGS4 OpenShiftContainerServiceVMSize = "Standard_GS4" + // StandardGS5 ... + StandardGS5 OpenShiftContainerServiceVMSize = "Standard_GS5" + // StandardL16s ... + StandardL16s OpenShiftContainerServiceVMSize = "Standard_L16s" + // StandardL32s ... + StandardL32s OpenShiftContainerServiceVMSize = "Standard_L32s" + // StandardL4s ... + StandardL4s OpenShiftContainerServiceVMSize = "Standard_L4s" + // StandardL8s ... + StandardL8s OpenShiftContainerServiceVMSize = "Standard_L8s" +) + +// PossibleOpenShiftContainerServiceVMSizeValues returns an array of possible values for the OpenShiftContainerServiceVMSize const type. +func PossibleOpenShiftContainerServiceVMSizeValues() []OpenShiftContainerServiceVMSize { + return []OpenShiftContainerServiceVMSize{StandardD16sV3, StandardD2sV3, StandardD32sV3, StandardD4sV3, StandardD64sV3, StandardD8sV3, StandardDS12V2, StandardDS13V2, StandardDS14V2, StandardDS15V2, StandardDS4V2, StandardDS5V2, StandardE16sV3, StandardE20sV3, StandardE32sV3, StandardE4sV3, StandardE64sV3, StandardE8sV3, StandardF16s, StandardF16sV2, StandardF32sV2, StandardF64sV2, StandardF72sV2, StandardF8s, StandardF8sV2, StandardGS2, StandardGS3, StandardGS4, StandardGS5, StandardL16s, StandardL32s, StandardL4s, StandardL8s} +} + +// OrchestratorTypes enumerates the values for orchestrator types. +type OrchestratorTypes string + +const ( + // Custom ... + Custom OrchestratorTypes = "Custom" + // DCOS ... + DCOS OrchestratorTypes = "DCOS" + // DockerCE ... + DockerCE OrchestratorTypes = "DockerCE" + // Kubernetes ... + Kubernetes OrchestratorTypes = "Kubernetes" + // Swarm ... + Swarm OrchestratorTypes = "Swarm" +) + +// PossibleOrchestratorTypesValues returns an array of possible values for the OrchestratorTypes const type. +func PossibleOrchestratorTypesValues() []OrchestratorTypes { + return []OrchestratorTypes{Custom, DCOS, DockerCE, Kubernetes, Swarm} +} + +// OSType enumerates the values for os type. +type OSType string + +const ( + // Linux ... + Linux OSType = "Linux" + // Windows ... + Windows OSType = "Windows" +) + +// PossibleOSTypeValues returns an array of possible values for the OSType const type. +func PossibleOSTypeValues() []OSType { + return []OSType{Linux, Windows} +} + +// OutboundType enumerates the values for outbound type. +type OutboundType string + +const ( + // LoadBalancer ... + LoadBalancer OutboundType = "loadBalancer" + // UserDefinedRouting ... + UserDefinedRouting OutboundType = "userDefinedRouting" +) + +// PossibleOutboundTypeValues returns an array of possible values for the OutboundType const type. +func PossibleOutboundTypeValues() []OutboundType { + return []OutboundType{LoadBalancer, UserDefinedRouting} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // None ... + None ResourceIdentityType = "None" + // SystemAssigned ... + SystemAssigned ResourceIdentityType = "SystemAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{None, SystemAssigned} +} + +// ScaleSetEvictionPolicy enumerates the values for scale set eviction policy. +type ScaleSetEvictionPolicy string + +const ( + // Deallocate ... + Deallocate ScaleSetEvictionPolicy = "Deallocate" + // Delete ... + Delete ScaleSetEvictionPolicy = "Delete" +) + +// PossibleScaleSetEvictionPolicyValues returns an array of possible values for the ScaleSetEvictionPolicy const type. +func PossibleScaleSetEvictionPolicyValues() []ScaleSetEvictionPolicy { + return []ScaleSetEvictionPolicy{Deallocate, Delete} +} + +// ScaleSetPriority enumerates the values for scale set priority. +type ScaleSetPriority string + +const ( + // Regular ... + Regular ScaleSetPriority = "Regular" + // Spot ... + Spot ScaleSetPriority = "Spot" +) + +// PossibleScaleSetPriorityValues returns an array of possible values for the ScaleSetPriority const type. +func PossibleScaleSetPriorityValues() []ScaleSetPriority { + return []ScaleSetPriority{Regular, Spot} +} + +// StorageProfileTypes enumerates the values for storage profile types. +type StorageProfileTypes string + +const ( + // ManagedDisks ... + ManagedDisks StorageProfileTypes = "ManagedDisks" + // StorageAccount ... + StorageAccount StorageProfileTypes = "StorageAccount" +) + +// PossibleStorageProfileTypesValues returns an array of possible values for the StorageProfileTypes const type. +func PossibleStorageProfileTypesValues() []StorageProfileTypes { + return []StorageProfileTypes{ManagedDisks, StorageAccount} +} + +// VMSizeTypes enumerates the values for vm size types. +type VMSizeTypes string + +const ( + // VMSizeTypesStandardA1 ... + VMSizeTypesStandardA1 VMSizeTypes = "Standard_A1" + // VMSizeTypesStandardA10 ... + VMSizeTypesStandardA10 VMSizeTypes = "Standard_A10" + // VMSizeTypesStandardA11 ... + VMSizeTypesStandardA11 VMSizeTypes = "Standard_A11" + // VMSizeTypesStandardA1V2 ... + VMSizeTypesStandardA1V2 VMSizeTypes = "Standard_A1_v2" + // VMSizeTypesStandardA2 ... + VMSizeTypesStandardA2 VMSizeTypes = "Standard_A2" + // VMSizeTypesStandardA2mV2 ... + VMSizeTypesStandardA2mV2 VMSizeTypes = "Standard_A2m_v2" + // VMSizeTypesStandardA2V2 ... + VMSizeTypesStandardA2V2 VMSizeTypes = "Standard_A2_v2" + // VMSizeTypesStandardA3 ... + VMSizeTypesStandardA3 VMSizeTypes = "Standard_A3" + // VMSizeTypesStandardA4 ... + VMSizeTypesStandardA4 VMSizeTypes = "Standard_A4" + // VMSizeTypesStandardA4mV2 ... + VMSizeTypesStandardA4mV2 VMSizeTypes = "Standard_A4m_v2" + // VMSizeTypesStandardA4V2 ... + VMSizeTypesStandardA4V2 VMSizeTypes = "Standard_A4_v2" + // VMSizeTypesStandardA5 ... + VMSizeTypesStandardA5 VMSizeTypes = "Standard_A5" + // VMSizeTypesStandardA6 ... + VMSizeTypesStandardA6 VMSizeTypes = "Standard_A6" + // VMSizeTypesStandardA7 ... + VMSizeTypesStandardA7 VMSizeTypes = "Standard_A7" + // VMSizeTypesStandardA8 ... + VMSizeTypesStandardA8 VMSizeTypes = "Standard_A8" + // VMSizeTypesStandardA8mV2 ... + VMSizeTypesStandardA8mV2 VMSizeTypes = "Standard_A8m_v2" + // VMSizeTypesStandardA8V2 ... + VMSizeTypesStandardA8V2 VMSizeTypes = "Standard_A8_v2" + // VMSizeTypesStandardA9 ... + VMSizeTypesStandardA9 VMSizeTypes = "Standard_A9" + // VMSizeTypesStandardB2ms ... + VMSizeTypesStandardB2ms VMSizeTypes = "Standard_B2ms" + // VMSizeTypesStandardB2s ... + VMSizeTypesStandardB2s VMSizeTypes = "Standard_B2s" + // VMSizeTypesStandardB4ms ... + VMSizeTypesStandardB4ms VMSizeTypes = "Standard_B4ms" + // VMSizeTypesStandardB8ms ... + VMSizeTypesStandardB8ms VMSizeTypes = "Standard_B8ms" + // VMSizeTypesStandardD1 ... + VMSizeTypesStandardD1 VMSizeTypes = "Standard_D1" + // VMSizeTypesStandardD11 ... + VMSizeTypesStandardD11 VMSizeTypes = "Standard_D11" + // VMSizeTypesStandardD11V2 ... + VMSizeTypesStandardD11V2 VMSizeTypes = "Standard_D11_v2" + // VMSizeTypesStandardD11V2Promo ... + VMSizeTypesStandardD11V2Promo VMSizeTypes = "Standard_D11_v2_Promo" + // VMSizeTypesStandardD12 ... + VMSizeTypesStandardD12 VMSizeTypes = "Standard_D12" + // VMSizeTypesStandardD12V2 ... + VMSizeTypesStandardD12V2 VMSizeTypes = "Standard_D12_v2" + // VMSizeTypesStandardD12V2Promo ... + VMSizeTypesStandardD12V2Promo VMSizeTypes = "Standard_D12_v2_Promo" + // VMSizeTypesStandardD13 ... + VMSizeTypesStandardD13 VMSizeTypes = "Standard_D13" + // VMSizeTypesStandardD13V2 ... + VMSizeTypesStandardD13V2 VMSizeTypes = "Standard_D13_v2" + // VMSizeTypesStandardD13V2Promo ... + VMSizeTypesStandardD13V2Promo VMSizeTypes = "Standard_D13_v2_Promo" + // VMSizeTypesStandardD14 ... + VMSizeTypesStandardD14 VMSizeTypes = "Standard_D14" + // VMSizeTypesStandardD14V2 ... + VMSizeTypesStandardD14V2 VMSizeTypes = "Standard_D14_v2" + // VMSizeTypesStandardD14V2Promo ... + VMSizeTypesStandardD14V2Promo VMSizeTypes = "Standard_D14_v2_Promo" + // VMSizeTypesStandardD15V2 ... + VMSizeTypesStandardD15V2 VMSizeTypes = "Standard_D15_v2" + // VMSizeTypesStandardD16sV3 ... + VMSizeTypesStandardD16sV3 VMSizeTypes = "Standard_D16s_v3" + // VMSizeTypesStandardD16V3 ... + VMSizeTypesStandardD16V3 VMSizeTypes = "Standard_D16_v3" + // VMSizeTypesStandardD1V2 ... + VMSizeTypesStandardD1V2 VMSizeTypes = "Standard_D1_v2" + // VMSizeTypesStandardD2 ... + VMSizeTypesStandardD2 VMSizeTypes = "Standard_D2" + // VMSizeTypesStandardD2sV3 ... + VMSizeTypesStandardD2sV3 VMSizeTypes = "Standard_D2s_v3" + // VMSizeTypesStandardD2V2 ... + VMSizeTypesStandardD2V2 VMSizeTypes = "Standard_D2_v2" + // VMSizeTypesStandardD2V2Promo ... + VMSizeTypesStandardD2V2Promo VMSizeTypes = "Standard_D2_v2_Promo" + // VMSizeTypesStandardD2V3 ... + VMSizeTypesStandardD2V3 VMSizeTypes = "Standard_D2_v3" + // VMSizeTypesStandardD3 ... + VMSizeTypesStandardD3 VMSizeTypes = "Standard_D3" + // VMSizeTypesStandardD32sV3 ... + VMSizeTypesStandardD32sV3 VMSizeTypes = "Standard_D32s_v3" + // VMSizeTypesStandardD32V3 ... + VMSizeTypesStandardD32V3 VMSizeTypes = "Standard_D32_v3" + // VMSizeTypesStandardD3V2 ... + VMSizeTypesStandardD3V2 VMSizeTypes = "Standard_D3_v2" + // VMSizeTypesStandardD3V2Promo ... + VMSizeTypesStandardD3V2Promo VMSizeTypes = "Standard_D3_v2_Promo" + // VMSizeTypesStandardD4 ... + VMSizeTypesStandardD4 VMSizeTypes = "Standard_D4" + // VMSizeTypesStandardD4sV3 ... + VMSizeTypesStandardD4sV3 VMSizeTypes = "Standard_D4s_v3" + // VMSizeTypesStandardD4V2 ... + VMSizeTypesStandardD4V2 VMSizeTypes = "Standard_D4_v2" + // VMSizeTypesStandardD4V2Promo ... + VMSizeTypesStandardD4V2Promo VMSizeTypes = "Standard_D4_v2_Promo" + // VMSizeTypesStandardD4V3 ... + VMSizeTypesStandardD4V3 VMSizeTypes = "Standard_D4_v3" + // VMSizeTypesStandardD5V2 ... + VMSizeTypesStandardD5V2 VMSizeTypes = "Standard_D5_v2" + // VMSizeTypesStandardD5V2Promo ... + VMSizeTypesStandardD5V2Promo VMSizeTypes = "Standard_D5_v2_Promo" + // VMSizeTypesStandardD64sV3 ... + VMSizeTypesStandardD64sV3 VMSizeTypes = "Standard_D64s_v3" + // VMSizeTypesStandardD64V3 ... + VMSizeTypesStandardD64V3 VMSizeTypes = "Standard_D64_v3" + // VMSizeTypesStandardD8sV3 ... + VMSizeTypesStandardD8sV3 VMSizeTypes = "Standard_D8s_v3" + // VMSizeTypesStandardD8V3 ... + VMSizeTypesStandardD8V3 VMSizeTypes = "Standard_D8_v3" + // VMSizeTypesStandardDS1 ... + VMSizeTypesStandardDS1 VMSizeTypes = "Standard_DS1" + // VMSizeTypesStandardDS11 ... + VMSizeTypesStandardDS11 VMSizeTypes = "Standard_DS11" + // VMSizeTypesStandardDS11V2 ... + VMSizeTypesStandardDS11V2 VMSizeTypes = "Standard_DS11_v2" + // VMSizeTypesStandardDS11V2Promo ... + VMSizeTypesStandardDS11V2Promo VMSizeTypes = "Standard_DS11_v2_Promo" + // VMSizeTypesStandardDS12 ... + VMSizeTypesStandardDS12 VMSizeTypes = "Standard_DS12" + // VMSizeTypesStandardDS12V2 ... + VMSizeTypesStandardDS12V2 VMSizeTypes = "Standard_DS12_v2" + // VMSizeTypesStandardDS12V2Promo ... + VMSizeTypesStandardDS12V2Promo VMSizeTypes = "Standard_DS12_v2_Promo" + // VMSizeTypesStandardDS13 ... + VMSizeTypesStandardDS13 VMSizeTypes = "Standard_DS13" + // VMSizeTypesStandardDS132V2 ... + VMSizeTypesStandardDS132V2 VMSizeTypes = "Standard_DS13-2_v2" + // VMSizeTypesStandardDS134V2 ... + VMSizeTypesStandardDS134V2 VMSizeTypes = "Standard_DS13-4_v2" + // VMSizeTypesStandardDS13V2 ... + VMSizeTypesStandardDS13V2 VMSizeTypes = "Standard_DS13_v2" + // VMSizeTypesStandardDS13V2Promo ... + VMSizeTypesStandardDS13V2Promo VMSizeTypes = "Standard_DS13_v2_Promo" + // VMSizeTypesStandardDS14 ... + VMSizeTypesStandardDS14 VMSizeTypes = "Standard_DS14" + // VMSizeTypesStandardDS144V2 ... + VMSizeTypesStandardDS144V2 VMSizeTypes = "Standard_DS14-4_v2" + // VMSizeTypesStandardDS148V2 ... + VMSizeTypesStandardDS148V2 VMSizeTypes = "Standard_DS14-8_v2" + // VMSizeTypesStandardDS14V2 ... + VMSizeTypesStandardDS14V2 VMSizeTypes = "Standard_DS14_v2" + // VMSizeTypesStandardDS14V2Promo ... + VMSizeTypesStandardDS14V2Promo VMSizeTypes = "Standard_DS14_v2_Promo" + // VMSizeTypesStandardDS15V2 ... + VMSizeTypesStandardDS15V2 VMSizeTypes = "Standard_DS15_v2" + // VMSizeTypesStandardDS1V2 ... + VMSizeTypesStandardDS1V2 VMSizeTypes = "Standard_DS1_v2" + // VMSizeTypesStandardDS2 ... + VMSizeTypesStandardDS2 VMSizeTypes = "Standard_DS2" + // VMSizeTypesStandardDS2V2 ... + VMSizeTypesStandardDS2V2 VMSizeTypes = "Standard_DS2_v2" + // VMSizeTypesStandardDS2V2Promo ... + VMSizeTypesStandardDS2V2Promo VMSizeTypes = "Standard_DS2_v2_Promo" + // VMSizeTypesStandardDS3 ... + VMSizeTypesStandardDS3 VMSizeTypes = "Standard_DS3" + // VMSizeTypesStandardDS3V2 ... + VMSizeTypesStandardDS3V2 VMSizeTypes = "Standard_DS3_v2" + // VMSizeTypesStandardDS3V2Promo ... + VMSizeTypesStandardDS3V2Promo VMSizeTypes = "Standard_DS3_v2_Promo" + // VMSizeTypesStandardDS4 ... + VMSizeTypesStandardDS4 VMSizeTypes = "Standard_DS4" + // VMSizeTypesStandardDS4V2 ... + VMSizeTypesStandardDS4V2 VMSizeTypes = "Standard_DS4_v2" + // VMSizeTypesStandardDS4V2Promo ... + VMSizeTypesStandardDS4V2Promo VMSizeTypes = "Standard_DS4_v2_Promo" + // VMSizeTypesStandardDS5V2 ... + VMSizeTypesStandardDS5V2 VMSizeTypes = "Standard_DS5_v2" + // VMSizeTypesStandardDS5V2Promo ... + VMSizeTypesStandardDS5V2Promo VMSizeTypes = "Standard_DS5_v2_Promo" + // VMSizeTypesStandardE16sV3 ... + VMSizeTypesStandardE16sV3 VMSizeTypes = "Standard_E16s_v3" + // VMSizeTypesStandardE16V3 ... + VMSizeTypesStandardE16V3 VMSizeTypes = "Standard_E16_v3" + // VMSizeTypesStandardE2sV3 ... + VMSizeTypesStandardE2sV3 VMSizeTypes = "Standard_E2s_v3" + // VMSizeTypesStandardE2V3 ... + VMSizeTypesStandardE2V3 VMSizeTypes = "Standard_E2_v3" + // VMSizeTypesStandardE3216sV3 ... + VMSizeTypesStandardE3216sV3 VMSizeTypes = "Standard_E32-16s_v3" + // VMSizeTypesStandardE328sV3 ... + VMSizeTypesStandardE328sV3 VMSizeTypes = "Standard_E32-8s_v3" + // VMSizeTypesStandardE32sV3 ... + VMSizeTypesStandardE32sV3 VMSizeTypes = "Standard_E32s_v3" + // VMSizeTypesStandardE32V3 ... + VMSizeTypesStandardE32V3 VMSizeTypes = "Standard_E32_v3" + // VMSizeTypesStandardE4sV3 ... + VMSizeTypesStandardE4sV3 VMSizeTypes = "Standard_E4s_v3" + // VMSizeTypesStandardE4V3 ... + VMSizeTypesStandardE4V3 VMSizeTypes = "Standard_E4_v3" + // VMSizeTypesStandardE6416sV3 ... + VMSizeTypesStandardE6416sV3 VMSizeTypes = "Standard_E64-16s_v3" + // VMSizeTypesStandardE6432sV3 ... + VMSizeTypesStandardE6432sV3 VMSizeTypes = "Standard_E64-32s_v3" + // VMSizeTypesStandardE64sV3 ... + VMSizeTypesStandardE64sV3 VMSizeTypes = "Standard_E64s_v3" + // VMSizeTypesStandardE64V3 ... + VMSizeTypesStandardE64V3 VMSizeTypes = "Standard_E64_v3" + // VMSizeTypesStandardE8sV3 ... + VMSizeTypesStandardE8sV3 VMSizeTypes = "Standard_E8s_v3" + // VMSizeTypesStandardE8V3 ... + VMSizeTypesStandardE8V3 VMSizeTypes = "Standard_E8_v3" + // VMSizeTypesStandardF1 ... + VMSizeTypesStandardF1 VMSizeTypes = "Standard_F1" + // VMSizeTypesStandardF16 ... + VMSizeTypesStandardF16 VMSizeTypes = "Standard_F16" + // VMSizeTypesStandardF16s ... + VMSizeTypesStandardF16s VMSizeTypes = "Standard_F16s" + // VMSizeTypesStandardF16sV2 ... + VMSizeTypesStandardF16sV2 VMSizeTypes = "Standard_F16s_v2" + // VMSizeTypesStandardF1s ... + VMSizeTypesStandardF1s VMSizeTypes = "Standard_F1s" + // VMSizeTypesStandardF2 ... + VMSizeTypesStandardF2 VMSizeTypes = "Standard_F2" + // VMSizeTypesStandardF2s ... + VMSizeTypesStandardF2s VMSizeTypes = "Standard_F2s" + // VMSizeTypesStandardF2sV2 ... + VMSizeTypesStandardF2sV2 VMSizeTypes = "Standard_F2s_v2" + // VMSizeTypesStandardF32sV2 ... + VMSizeTypesStandardF32sV2 VMSizeTypes = "Standard_F32s_v2" + // VMSizeTypesStandardF4 ... + VMSizeTypesStandardF4 VMSizeTypes = "Standard_F4" + // VMSizeTypesStandardF4s ... + VMSizeTypesStandardF4s VMSizeTypes = "Standard_F4s" + // VMSizeTypesStandardF4sV2 ... + VMSizeTypesStandardF4sV2 VMSizeTypes = "Standard_F4s_v2" + // VMSizeTypesStandardF64sV2 ... + VMSizeTypesStandardF64sV2 VMSizeTypes = "Standard_F64s_v2" + // VMSizeTypesStandardF72sV2 ... + VMSizeTypesStandardF72sV2 VMSizeTypes = "Standard_F72s_v2" + // VMSizeTypesStandardF8 ... + VMSizeTypesStandardF8 VMSizeTypes = "Standard_F8" + // VMSizeTypesStandardF8s ... + VMSizeTypesStandardF8s VMSizeTypes = "Standard_F8s" + // VMSizeTypesStandardF8sV2 ... + VMSizeTypesStandardF8sV2 VMSizeTypes = "Standard_F8s_v2" + // VMSizeTypesStandardG1 ... + VMSizeTypesStandardG1 VMSizeTypes = "Standard_G1" + // VMSizeTypesStandardG2 ... + VMSizeTypesStandardG2 VMSizeTypes = "Standard_G2" + // VMSizeTypesStandardG3 ... + VMSizeTypesStandardG3 VMSizeTypes = "Standard_G3" + // VMSizeTypesStandardG4 ... + VMSizeTypesStandardG4 VMSizeTypes = "Standard_G4" + // VMSizeTypesStandardG5 ... + VMSizeTypesStandardG5 VMSizeTypes = "Standard_G5" + // VMSizeTypesStandardGS1 ... + VMSizeTypesStandardGS1 VMSizeTypes = "Standard_GS1" + // VMSizeTypesStandardGS2 ... + VMSizeTypesStandardGS2 VMSizeTypes = "Standard_GS2" + // VMSizeTypesStandardGS3 ... + VMSizeTypesStandardGS3 VMSizeTypes = "Standard_GS3" + // VMSizeTypesStandardGS4 ... + VMSizeTypesStandardGS4 VMSizeTypes = "Standard_GS4" + // VMSizeTypesStandardGS44 ... + VMSizeTypesStandardGS44 VMSizeTypes = "Standard_GS4-4" + // VMSizeTypesStandardGS48 ... + VMSizeTypesStandardGS48 VMSizeTypes = "Standard_GS4-8" + // VMSizeTypesStandardGS5 ... + VMSizeTypesStandardGS5 VMSizeTypes = "Standard_GS5" + // VMSizeTypesStandardGS516 ... + VMSizeTypesStandardGS516 VMSizeTypes = "Standard_GS5-16" + // VMSizeTypesStandardGS58 ... + VMSizeTypesStandardGS58 VMSizeTypes = "Standard_GS5-8" + // VMSizeTypesStandardH16 ... + VMSizeTypesStandardH16 VMSizeTypes = "Standard_H16" + // VMSizeTypesStandardH16m ... + VMSizeTypesStandardH16m VMSizeTypes = "Standard_H16m" + // VMSizeTypesStandardH16mr ... + VMSizeTypesStandardH16mr VMSizeTypes = "Standard_H16mr" + // VMSizeTypesStandardH16r ... + VMSizeTypesStandardH16r VMSizeTypes = "Standard_H16r" + // VMSizeTypesStandardH8 ... + VMSizeTypesStandardH8 VMSizeTypes = "Standard_H8" + // VMSizeTypesStandardH8m ... + VMSizeTypesStandardH8m VMSizeTypes = "Standard_H8m" + // VMSizeTypesStandardL16s ... + VMSizeTypesStandardL16s VMSizeTypes = "Standard_L16s" + // VMSizeTypesStandardL32s ... + VMSizeTypesStandardL32s VMSizeTypes = "Standard_L32s" + // VMSizeTypesStandardL4s ... + VMSizeTypesStandardL4s VMSizeTypes = "Standard_L4s" + // VMSizeTypesStandardL8s ... + VMSizeTypesStandardL8s VMSizeTypes = "Standard_L8s" + // VMSizeTypesStandardM12832ms ... + VMSizeTypesStandardM12832ms VMSizeTypes = "Standard_M128-32ms" + // VMSizeTypesStandardM12864ms ... + VMSizeTypesStandardM12864ms VMSizeTypes = "Standard_M128-64ms" + // VMSizeTypesStandardM128ms ... + VMSizeTypesStandardM128ms VMSizeTypes = "Standard_M128ms" + // VMSizeTypesStandardM128s ... + VMSizeTypesStandardM128s VMSizeTypes = "Standard_M128s" + // VMSizeTypesStandardM6416ms ... + VMSizeTypesStandardM6416ms VMSizeTypes = "Standard_M64-16ms" + // VMSizeTypesStandardM6432ms ... + VMSizeTypesStandardM6432ms VMSizeTypes = "Standard_M64-32ms" + // VMSizeTypesStandardM64ms ... + VMSizeTypesStandardM64ms VMSizeTypes = "Standard_M64ms" + // VMSizeTypesStandardM64s ... + VMSizeTypesStandardM64s VMSizeTypes = "Standard_M64s" + // VMSizeTypesStandardNC12 ... + VMSizeTypesStandardNC12 VMSizeTypes = "Standard_NC12" + // VMSizeTypesStandardNC12sV2 ... + VMSizeTypesStandardNC12sV2 VMSizeTypes = "Standard_NC12s_v2" + // VMSizeTypesStandardNC12sV3 ... + VMSizeTypesStandardNC12sV3 VMSizeTypes = "Standard_NC12s_v3" + // VMSizeTypesStandardNC24 ... + VMSizeTypesStandardNC24 VMSizeTypes = "Standard_NC24" + // VMSizeTypesStandardNC24r ... + VMSizeTypesStandardNC24r VMSizeTypes = "Standard_NC24r" + // VMSizeTypesStandardNC24rsV2 ... + VMSizeTypesStandardNC24rsV2 VMSizeTypes = "Standard_NC24rs_v2" + // VMSizeTypesStandardNC24rsV3 ... + VMSizeTypesStandardNC24rsV3 VMSizeTypes = "Standard_NC24rs_v3" + // VMSizeTypesStandardNC24sV2 ... + VMSizeTypesStandardNC24sV2 VMSizeTypes = "Standard_NC24s_v2" + // VMSizeTypesStandardNC24sV3 ... + VMSizeTypesStandardNC24sV3 VMSizeTypes = "Standard_NC24s_v3" + // VMSizeTypesStandardNC6 ... + VMSizeTypesStandardNC6 VMSizeTypes = "Standard_NC6" + // VMSizeTypesStandardNC6sV2 ... + VMSizeTypesStandardNC6sV2 VMSizeTypes = "Standard_NC6s_v2" + // VMSizeTypesStandardNC6sV3 ... + VMSizeTypesStandardNC6sV3 VMSizeTypes = "Standard_NC6s_v3" + // VMSizeTypesStandardND12s ... + VMSizeTypesStandardND12s VMSizeTypes = "Standard_ND12s" + // VMSizeTypesStandardND24rs ... + VMSizeTypesStandardND24rs VMSizeTypes = "Standard_ND24rs" + // VMSizeTypesStandardND24s ... + VMSizeTypesStandardND24s VMSizeTypes = "Standard_ND24s" + // VMSizeTypesStandardND6s ... + VMSizeTypesStandardND6s VMSizeTypes = "Standard_ND6s" + // VMSizeTypesStandardNV12 ... + VMSizeTypesStandardNV12 VMSizeTypes = "Standard_NV12" + // VMSizeTypesStandardNV24 ... + VMSizeTypesStandardNV24 VMSizeTypes = "Standard_NV24" + // VMSizeTypesStandardNV6 ... + VMSizeTypesStandardNV6 VMSizeTypes = "Standard_NV6" +) + +// PossibleVMSizeTypesValues returns an array of possible values for the VMSizeTypes const type. +func PossibleVMSizeTypesValues() []VMSizeTypes { + return []VMSizeTypes{VMSizeTypesStandardA1, VMSizeTypesStandardA10, VMSizeTypesStandardA11, VMSizeTypesStandardA1V2, VMSizeTypesStandardA2, VMSizeTypesStandardA2mV2, VMSizeTypesStandardA2V2, VMSizeTypesStandardA3, VMSizeTypesStandardA4, VMSizeTypesStandardA4mV2, VMSizeTypesStandardA4V2, VMSizeTypesStandardA5, VMSizeTypesStandardA6, VMSizeTypesStandardA7, VMSizeTypesStandardA8, VMSizeTypesStandardA8mV2, VMSizeTypesStandardA8V2, VMSizeTypesStandardA9, VMSizeTypesStandardB2ms, VMSizeTypesStandardB2s, VMSizeTypesStandardB4ms, VMSizeTypesStandardB8ms, VMSizeTypesStandardD1, VMSizeTypesStandardD11, VMSizeTypesStandardD11V2, VMSizeTypesStandardD11V2Promo, VMSizeTypesStandardD12, VMSizeTypesStandardD12V2, VMSizeTypesStandardD12V2Promo, VMSizeTypesStandardD13, VMSizeTypesStandardD13V2, VMSizeTypesStandardD13V2Promo, VMSizeTypesStandardD14, VMSizeTypesStandardD14V2, VMSizeTypesStandardD14V2Promo, VMSizeTypesStandardD15V2, VMSizeTypesStandardD16sV3, VMSizeTypesStandardD16V3, VMSizeTypesStandardD1V2, VMSizeTypesStandardD2, VMSizeTypesStandardD2sV3, VMSizeTypesStandardD2V2, VMSizeTypesStandardD2V2Promo, VMSizeTypesStandardD2V3, VMSizeTypesStandardD3, VMSizeTypesStandardD32sV3, VMSizeTypesStandardD32V3, VMSizeTypesStandardD3V2, VMSizeTypesStandardD3V2Promo, VMSizeTypesStandardD4, VMSizeTypesStandardD4sV3, VMSizeTypesStandardD4V2, VMSizeTypesStandardD4V2Promo, VMSizeTypesStandardD4V3, VMSizeTypesStandardD5V2, VMSizeTypesStandardD5V2Promo, VMSizeTypesStandardD64sV3, VMSizeTypesStandardD64V3, VMSizeTypesStandardD8sV3, VMSizeTypesStandardD8V3, VMSizeTypesStandardDS1, VMSizeTypesStandardDS11, VMSizeTypesStandardDS11V2, VMSizeTypesStandardDS11V2Promo, VMSizeTypesStandardDS12, VMSizeTypesStandardDS12V2, VMSizeTypesStandardDS12V2Promo, VMSizeTypesStandardDS13, VMSizeTypesStandardDS132V2, VMSizeTypesStandardDS134V2, VMSizeTypesStandardDS13V2, VMSizeTypesStandardDS13V2Promo, VMSizeTypesStandardDS14, VMSizeTypesStandardDS144V2, VMSizeTypesStandardDS148V2, VMSizeTypesStandardDS14V2, VMSizeTypesStandardDS14V2Promo, VMSizeTypesStandardDS15V2, VMSizeTypesStandardDS1V2, VMSizeTypesStandardDS2, VMSizeTypesStandardDS2V2, VMSizeTypesStandardDS2V2Promo, VMSizeTypesStandardDS3, VMSizeTypesStandardDS3V2, VMSizeTypesStandardDS3V2Promo, VMSizeTypesStandardDS4, VMSizeTypesStandardDS4V2, VMSizeTypesStandardDS4V2Promo, VMSizeTypesStandardDS5V2, VMSizeTypesStandardDS5V2Promo, VMSizeTypesStandardE16sV3, VMSizeTypesStandardE16V3, VMSizeTypesStandardE2sV3, VMSizeTypesStandardE2V3, VMSizeTypesStandardE3216sV3, VMSizeTypesStandardE328sV3, VMSizeTypesStandardE32sV3, VMSizeTypesStandardE32V3, VMSizeTypesStandardE4sV3, VMSizeTypesStandardE4V3, VMSizeTypesStandardE6416sV3, VMSizeTypesStandardE6432sV3, VMSizeTypesStandardE64sV3, VMSizeTypesStandardE64V3, VMSizeTypesStandardE8sV3, VMSizeTypesStandardE8V3, VMSizeTypesStandardF1, VMSizeTypesStandardF16, VMSizeTypesStandardF16s, VMSizeTypesStandardF16sV2, VMSizeTypesStandardF1s, VMSizeTypesStandardF2, VMSizeTypesStandardF2s, VMSizeTypesStandardF2sV2, VMSizeTypesStandardF32sV2, VMSizeTypesStandardF4, VMSizeTypesStandardF4s, VMSizeTypesStandardF4sV2, VMSizeTypesStandardF64sV2, VMSizeTypesStandardF72sV2, VMSizeTypesStandardF8, VMSizeTypesStandardF8s, VMSizeTypesStandardF8sV2, VMSizeTypesStandardG1, VMSizeTypesStandardG2, VMSizeTypesStandardG3, VMSizeTypesStandardG4, VMSizeTypesStandardG5, VMSizeTypesStandardGS1, VMSizeTypesStandardGS2, VMSizeTypesStandardGS3, VMSizeTypesStandardGS4, VMSizeTypesStandardGS44, VMSizeTypesStandardGS48, VMSizeTypesStandardGS5, VMSizeTypesStandardGS516, VMSizeTypesStandardGS58, VMSizeTypesStandardH16, VMSizeTypesStandardH16m, VMSizeTypesStandardH16mr, VMSizeTypesStandardH16r, VMSizeTypesStandardH8, VMSizeTypesStandardH8m, VMSizeTypesStandardL16s, VMSizeTypesStandardL32s, VMSizeTypesStandardL4s, VMSizeTypesStandardL8s, VMSizeTypesStandardM12832ms, VMSizeTypesStandardM12864ms, VMSizeTypesStandardM128ms, VMSizeTypesStandardM128s, VMSizeTypesStandardM6416ms, VMSizeTypesStandardM6432ms, VMSizeTypesStandardM64ms, VMSizeTypesStandardM64s, VMSizeTypesStandardNC12, VMSizeTypesStandardNC12sV2, VMSizeTypesStandardNC12sV3, VMSizeTypesStandardNC24, VMSizeTypesStandardNC24r, VMSizeTypesStandardNC24rsV2, VMSizeTypesStandardNC24rsV3, VMSizeTypesStandardNC24sV2, VMSizeTypesStandardNC24sV3, VMSizeTypesStandardNC6, VMSizeTypesStandardNC6sV2, VMSizeTypesStandardNC6sV3, VMSizeTypesStandardND12s, VMSizeTypesStandardND24rs, VMSizeTypesStandardND24s, VMSizeTypesStandardND6s, VMSizeTypesStandardNV12, VMSizeTypesStandardNV24, VMSizeTypesStandardNV6} +} + +// AccessProfile profile for enabling a user to access a managed cluster. +type AccessProfile struct { + // KubeConfig - Base64-encoded Kubernetes configuration file. + KubeConfig *[]byte `json:"kubeConfig,omitempty"` +} + +// AgentPool agent Pool. +type AgentPool struct { + autorest.Response `json:"-"` + // ManagedClusterAgentPoolProfileProperties - Properties of an agent pool. + *ManagedClusterAgentPoolProfileProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AgentPool. +func (ap AgentPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ap.ManagedClusterAgentPoolProfileProperties != nil { + objectMap["properties"] = ap.ManagedClusterAgentPoolProfileProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AgentPool struct. +func (ap *AgentPool) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var managedClusterAgentPoolProfileProperties ManagedClusterAgentPoolProfileProperties + err = json.Unmarshal(*v, &managedClusterAgentPoolProfileProperties) + if err != nil { + return err + } + ap.ManagedClusterAgentPoolProfileProperties = &managedClusterAgentPoolProfileProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ap.Type = &typeVar + } + } + } + + return nil +} + +// AgentPoolAvailableVersions the list of available versions for an agent pool. +type AgentPoolAvailableVersions struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of the agent pool available versions. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the agent pool available versions. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the agent pool available versions. + Type *string `json:"type,omitempty"` + // AgentPoolAvailableVersionsProperties - Properties of agent pool available versions. + *AgentPoolAvailableVersionsProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AgentPoolAvailableVersions. +func (apav AgentPoolAvailableVersions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if apav.AgentPoolAvailableVersionsProperties != nil { + objectMap["properties"] = apav.AgentPoolAvailableVersionsProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AgentPoolAvailableVersions struct. +func (apav *AgentPoolAvailableVersions) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + apav.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + apav.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + apav.Type = &typeVar + } + case "properties": + if v != nil { + var agentPoolAvailableVersionsProperties AgentPoolAvailableVersionsProperties + err = json.Unmarshal(*v, &agentPoolAvailableVersionsProperties) + if err != nil { + return err + } + apav.AgentPoolAvailableVersionsProperties = &agentPoolAvailableVersionsProperties + } + } + } + + return nil +} + +// AgentPoolAvailableVersionsProperties the list of available agent pool versions. +type AgentPoolAvailableVersionsProperties struct { + // AgentPoolVersions - List of versions available for agent pool. + AgentPoolVersions *[]AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem `json:"agentPoolVersions,omitempty"` +} + +// AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem ... +type AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem struct { + // Default - Whether this version is the default agent pool version. + Default *bool `json:"default,omitempty"` + // KubernetesVersion - Kubernetes version (major, minor, patch). + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // IsPreview - Whether Kubernetes version is currently in preview. + IsPreview *bool `json:"isPreview,omitempty"` +} + +// AgentPoolListResult the response from the List Agent Pools operation. +type AgentPoolListResult struct { + autorest.Response `json:"-"` + // Value - The list of agent pools. + Value *[]AgentPool `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of agent pool results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AgentPoolListResultIterator provides access to a complete listing of AgentPool values. +type AgentPoolListResultIterator struct { + i int + page AgentPoolListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *AgentPoolListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *AgentPoolListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AgentPoolListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter AgentPoolListResultIterator) Response() AgentPoolListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter AgentPoolListResultIterator) Value() AgentPool { + if !iter.page.NotDone() { + return AgentPool{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AgentPoolListResultIterator type. +func NewAgentPoolListResultIterator(page AgentPoolListResultPage) AgentPoolListResultIterator { + return AgentPoolListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (aplr AgentPoolListResult) IsEmpty() bool { + return aplr.Value == nil || len(*aplr.Value) == 0 +} + +// agentPoolListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (aplr AgentPoolListResult) agentPoolListResultPreparer(ctx context.Context) (*http.Request, error) { + if aplr.NextLink == nil || len(to.String(aplr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(aplr.NextLink))) +} + +// AgentPoolListResultPage contains a page of AgentPool values. +type AgentPoolListResultPage struct { + fn func(context.Context, AgentPoolListResult) (AgentPoolListResult, error) + aplr AgentPoolListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *AgentPoolListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.aplr) + if err != nil { + return err + } + page.aplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AgentPoolListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AgentPoolListResultPage) NotDone() bool { + return !page.aplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AgentPoolListResultPage) Response() AgentPoolListResult { + return page.aplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AgentPoolListResultPage) Values() []AgentPool { + if page.aplr.IsEmpty() { + return nil + } + return *page.aplr.Value +} + +// Creates a new instance of the AgentPoolListResultPage type. +func NewAgentPoolListResultPage(getNextPage func(context.Context, AgentPoolListResult) (AgentPoolListResult, error)) AgentPoolListResultPage { + return AgentPoolListResultPage{fn: getNextPage} +} + +// AgentPoolProfile profile for the container service agent pool. +type AgentPoolProfile struct { + // Name - Unique name of the agent pool profile in the context of the subscription and resource group. + Name *string `json:"name,omitempty"` + // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + Count *int32 `json:"count,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' + VMSize VMSizeTypes `json:"vmSize,omitempty"` + // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` + // DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool. + DNSPrefix *string `json:"dnsPrefix,omitempty"` + // Fqdn - READ-ONLY; FQDN for the agent pool. + Fqdn *string `json:"fqdn,omitempty"` + // Ports - Ports number array used to expose on this agent pool. The default opened ports are different based on your choice of orchestrator. + Ports *[]int32 `json:"ports,omitempty"` + // StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks' + StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"` + // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. + VnetSubnetID *string `json:"vnetSubnetID,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` +} + +// AgentPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AgentPoolsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *AgentPoolsCreateOrUpdateFuture) Result(client AgentPoolsClient) (ap AgentPool, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ap.Response.Response, err = future.GetResult(sender); err == nil && ap.Response.Response.StatusCode != http.StatusNoContent { + ap, err = client.CreateOrUpdateResponder(ap.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", ap.Response.Response, "Failure responding to request") + } + } + return +} + +// AgentPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type AgentPoolsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *AgentPoolsDeleteFuture) Result(client AgentPoolsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// AgentPoolUpgradeProfile the list of available upgrades for an agent pool. +type AgentPoolUpgradeProfile struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of the agent pool upgrade profile. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the agent pool upgrade profile. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the agent pool upgrade profile. + Type *string `json:"type,omitempty"` + // AgentPoolUpgradeProfileProperties - Properties of agent pool upgrade profile. + *AgentPoolUpgradeProfileProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AgentPoolUpgradeProfile. +func (apup AgentPoolUpgradeProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if apup.AgentPoolUpgradeProfileProperties != nil { + objectMap["properties"] = apup.AgentPoolUpgradeProfileProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for AgentPoolUpgradeProfile struct. +func (apup *AgentPoolUpgradeProfile) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + apup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + apup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + apup.Type = &typeVar + } + case "properties": + if v != nil { + var agentPoolUpgradeProfileProperties AgentPoolUpgradeProfileProperties + err = json.Unmarshal(*v, &agentPoolUpgradeProfileProperties) + if err != nil { + return err + } + apup.AgentPoolUpgradeProfileProperties = &agentPoolUpgradeProfileProperties + } + } + } + + return nil +} + +// AgentPoolUpgradeProfileProperties the list of available upgrade versions. +type AgentPoolUpgradeProfileProperties struct { + // KubernetesVersion - Kubernetes version (major, minor, patch). + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` + // Upgrades - List of orchestrator types and versions available for upgrade. + Upgrades *[]AgentPoolUpgradeProfilePropertiesUpgradesItem `json:"upgrades,omitempty"` + // LatestNodeImageVersion - LatestNodeImageVersion is the latest AKS supported node image version. + LatestNodeImageVersion *string `json:"latestNodeImageVersion,omitempty"` +} + +// AgentPoolUpgradeProfilePropertiesUpgradesItem ... +type AgentPoolUpgradeProfilePropertiesUpgradesItem struct { + // KubernetesVersion - Kubernetes version (major, minor, patch). + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // IsPreview - Whether Kubernetes version is currently in preview. + IsPreview *bool `json:"isPreview,omitempty"` +} + +// AgentPoolUpgradeSettings settings for upgrading an agentpool +type AgentPoolUpgradeSettings struct { + // MaxSurge - Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default + MaxSurge *string `json:"maxSurge,omitempty"` +} + +// CloudError an error response from the Container service. +type CloudError struct { + // Error - Details about the error. + Error *CloudErrorBody `json:"error,omitempty"` +} + +// CloudErrorBody an error response from the Container service. +type CloudErrorBody struct { + // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + Code *string `json:"code,omitempty"` + // Message - A message describing the error, intended to be suitable for display in a user interface. + Message *string `json:"message,omitempty"` + // Target - The target of the particular error. For example, the name of the property in error. + Target *string `json:"target,omitempty"` + // Details - A list of additional details about the error. + Details *[]CloudErrorBody `json:"details,omitempty"` +} + +// ContainerService container service. +type ContainerService struct { + autorest.Response `json:"-"` + // Properties - Properties of the container service. + *Properties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ContainerService. +func (cs ContainerService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cs.Properties != nil { + objectMap["properties"] = cs.Properties + } + if cs.Location != nil { + objectMap["location"] = cs.Location + } + if cs.Tags != nil { + objectMap["tags"] = cs.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ContainerService struct. +func (cs *ContainerService) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var properties Properties + err = json.Unmarshal(*v, &properties) + if err != nil { + return err + } + cs.Properties = &properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cs.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cs.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cs.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cs.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cs.Tags = tags + } + } + } + + return nil +} + +// ContainerServicesCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ContainerServicesCreateOrUpdateFutureType struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent { + cs, err = client.CreateOrUpdateResponder(cs.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request") + } + } + return +} + +// ContainerServicesDeleteFutureType an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ContainerServicesDeleteFutureType struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType") + return + } + ar.Response = future.Response() + return +} + +// CredentialResult the credential result response. +type CredentialResult struct { + // Name - READ-ONLY; The name of the credential. + Name *string `json:"name,omitempty"` + // Value - READ-ONLY; Base64-encoded Kubernetes configuration file. + Value *[]byte `json:"value,omitempty"` +} + +// CredentialResults the list of credential result response. +type CredentialResults struct { + autorest.Response `json:"-"` + // Kubeconfigs - READ-ONLY; Base64-encoded Kubernetes configuration file. + Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"` +} + +// CustomProfile properties to configure a custom container service cluster. +type CustomProfile struct { + // Orchestrator - The name of the custom orchestrator to use. + Orchestrator *string `json:"orchestrator,omitempty"` +} + +// DiagnosticsProfile profile for diagnostics on the container service cluster. +type DiagnosticsProfile struct { + // VMDiagnostics - Profile for diagnostics on the container service VMs. + VMDiagnostics *VMDiagnostics `json:"vmDiagnostics,omitempty"` +} + +// KeyVaultSecretRef reference to a secret stored in Azure Key Vault. +type KeyVaultSecretRef struct { + // VaultID - Key vault identifier. + VaultID *string `json:"vaultID,omitempty"` + // SecretName - The secret name. + SecretName *string `json:"secretName,omitempty"` + // Version - The secret version. + Version *string `json:"version,omitempty"` +} + +// LinuxProfile profile for Linux VMs in the container service cluster. +type LinuxProfile struct { + // AdminUsername - The administrator username to use for Linux VMs. + AdminUsername *string `json:"adminUsername,omitempty"` + // SSH - SSH configuration for Linux-based VMs running on Azure. + SSH *SSHConfiguration `json:"ssh,omitempty"` +} + +// ListResult the response from the List Container Services operation. +type ListResult struct { + autorest.Response `json:"-"` + // Value - The list of container services. + Value *[]ContainerService `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of container service results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListResultIterator provides access to a complete listing of ContainerService values. +type ListResultIterator struct { + i int + page ListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ListResultIterator) Response() ListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListResultIterator) Value() ContainerService { + if !iter.page.NotDone() { + return ContainerService{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListResultIterator type. +func NewListResultIterator(page ListResultPage) ListResultIterator { + return ListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lr ListResult) IsEmpty() bool { + return lr.Value == nil || len(*lr.Value) == 0 +} + +// listResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) { + if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lr.NextLink))) +} + +// ListResultPage contains a page of ContainerService values. +type ListResultPage struct { + fn func(context.Context, ListResult) (ListResult, error) + lr ListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.lr) + if err != nil { + return err + } + page.lr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListResultPage) NotDone() bool { + return !page.lr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListResultPage) Response() ListResult { + return page.lr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListResultPage) Values() []ContainerService { + if page.lr.IsEmpty() { + return nil + } + return *page.lr.Value +} + +// Creates a new instance of the ListResultPage type. +func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { + return ListResultPage{fn: getNextPage} +} + +// ManagedCluster managed cluster. +type ManagedCluster struct { + autorest.Response `json:"-"` + // ManagedClusterProperties - Properties of a managed cluster. + *ManagedClusterProperties `json:"properties,omitempty"` + // Identity - The identity of the managed cluster, if configured. + Identity *ManagedClusterIdentity `json:"identity,omitempty"` + // Sku - The managed cluster SKU. + Sku *ManagedClusterSKU `json:"sku,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ManagedCluster. +func (mc ManagedCluster) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mc.ManagedClusterProperties != nil { + objectMap["properties"] = mc.ManagedClusterProperties + } + if mc.Identity != nil { + objectMap["identity"] = mc.Identity + } + if mc.Sku != nil { + objectMap["sku"] = mc.Sku + } + if mc.Location != nil { + objectMap["location"] = mc.Location + } + if mc.Tags != nil { + objectMap["tags"] = mc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ManagedCluster struct. +func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var managedClusterProperties ManagedClusterProperties + err = json.Unmarshal(*v, &managedClusterProperties) + if err != nil { + return err + } + mc.ManagedClusterProperties = &managedClusterProperties + } + case "identity": + if v != nil { + var identity ManagedClusterIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + mc.Identity = &identity + } + case "sku": + if v != nil { + var sku ManagedClusterSKU + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + mc.Sku = &sku + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mc.Tags = tags + } + } + } + + return nil +} + +// ManagedClusterAADProfile aADProfile specifies attributes for Azure Active Directory integration. +type ManagedClusterAADProfile struct { + // Managed - Whether to enable managed AAD. + Managed *bool `json:"managed,omitempty"` + // AdminGroupObjectIDs - AAD group object IDs that will have admin role of the cluster. + AdminGroupObjectIDs *[]string `json:"adminGroupObjectIDs,omitempty"` + // ClientAppID - The client AAD application ID. + ClientAppID *string `json:"clientAppID,omitempty"` + // ServerAppID - The server AAD application ID. + ServerAppID *string `json:"serverAppID,omitempty"` + // ServerAppSecret - The server AAD application secret. + ServerAppSecret *string `json:"serverAppSecret,omitempty"` + // TenantID - The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. + TenantID *string `json:"tenantID,omitempty"` +} + +// ManagedClusterAccessProfile managed cluster Access Profile. +type ManagedClusterAccessProfile struct { + autorest.Response `json:"-"` + // AccessProfile - AccessProfile of a managed cluster. + *AccessProfile `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ManagedClusterAccessProfile. +func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcap.AccessProfile != nil { + objectMap["properties"] = mcap.AccessProfile + } + if mcap.Location != nil { + objectMap["location"] = mcap.Location + } + if mcap.Tags != nil { + objectMap["tags"] = mcap.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ManagedClusterAccessProfile struct. +func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var accessProfile AccessProfile + err = json.Unmarshal(*v, &accessProfile) + if err != nil { + return err + } + mcap.AccessProfile = &accessProfile + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mcap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mcap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mcap.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + mcap.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + mcap.Tags = tags + } + } + } + + return nil +} + +// ManagedClusterAddonProfile a Kubernetes add-on profile for a managed cluster. +type ManagedClusterAddonProfile struct { + // Enabled - Whether the add-on is enabled or not. + Enabled *bool `json:"enabled,omitempty"` + // Config - Key-value pairs for configuring an add-on. + Config map[string]*string `json:"config"` + // Identity - READ-ONLY; Information of user assigned identity used by this add-on. + Identity *ManagedClusterAddonProfileIdentity `json:"identity,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedClusterAddonProfile. +func (mcap ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcap.Enabled != nil { + objectMap["enabled"] = mcap.Enabled + } + if mcap.Config != nil { + objectMap["config"] = mcap.Config + } + return json.Marshal(objectMap) +} + +// ManagedClusterAddonProfileIdentity information of user assigned identity used by this add-on. +type ManagedClusterAddonProfileIdentity struct { + // ResourceID - The resource id of the user assigned identity. + ResourceID *string `json:"resourceId,omitempty"` + // ClientID - The client id of the user assigned identity. + ClientID *string `json:"clientId,omitempty"` + // ObjectID - The object id of the user assigned identity. + ObjectID *string `json:"objectId,omitempty"` +} + +// ManagedClusterAgentPoolProfile profile for the container service agent pool. +type ManagedClusterAgentPoolProfile struct { + // Name - Unique name of the agent pool profile in the context of the subscription and resource group. + Name *string `json:"name,omitempty"` + // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. + Count *int32 `json:"count,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' + VMSize VMSizeTypes `json:"vmSize,omitempty"` + // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` + // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. + VnetSubnetID *string `json:"vnetSubnetID,omitempty"` + // MaxPods - Maximum number of pods that can run on a node. + MaxPods *int32 `json:"maxPods,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` + // MaxCount - Maximum number of nodes for auto-scaling + MaxCount *int32 `json:"maxCount,omitempty"` + // MinCount - Minimum number of nodes for auto-scaling + MinCount *int32 `json:"minCount,omitempty"` + // EnableAutoScaling - Whether to enable auto-scaler + EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` + // Type - AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' + Type AgentPoolType `json:"type,omitempty"` + // Mode - AgentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User' + Mode AgentPoolMode `json:"mode,omitempty"` + // OrchestratorVersion - Version of orchestrator specified when creating the managed cluster. + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` + // NodeImageVersion - Version of node image + NodeImageVersion *string `json:"nodeImageVersion,omitempty"` + // UpgradeSettings - Settings for upgrading the agentpool + UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"` + // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // AvailabilityZones - Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + AvailabilityZones *[]string `json:"availabilityZones,omitempty"` + // EnableNodePublicIP - Enable public IP for nodes + EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` + // ScaleSetPriority - ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Spot', 'Regular' + ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"` + // ScaleSetEvictionPolicy - ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate' + ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"` + // SpotMaxPrice - SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"` + // Tags - Agent pool tags to be persisted on the agent pool virtual machine scale set. + Tags map[string]*string `json:"tags"` + // NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool. + NodeLabels map[string]*string `json:"nodeLabels"` + // NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + NodeTaints *[]string `json:"nodeTaints,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfile. +func (mcapp ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcapp.Name != nil { + objectMap["name"] = mcapp.Name + } + if mcapp.Count != nil { + objectMap["count"] = mcapp.Count + } + if mcapp.VMSize != "" { + objectMap["vmSize"] = mcapp.VMSize + } + if mcapp.OsDiskSizeGB != nil { + objectMap["osDiskSizeGB"] = mcapp.OsDiskSizeGB + } + if mcapp.VnetSubnetID != nil { + objectMap["vnetSubnetID"] = mcapp.VnetSubnetID + } + if mcapp.MaxPods != nil { + objectMap["maxPods"] = mcapp.MaxPods + } + if mcapp.OsType != "" { + objectMap["osType"] = mcapp.OsType + } + if mcapp.MaxCount != nil { + objectMap["maxCount"] = mcapp.MaxCount + } + if mcapp.MinCount != nil { + objectMap["minCount"] = mcapp.MinCount + } + if mcapp.EnableAutoScaling != nil { + objectMap["enableAutoScaling"] = mcapp.EnableAutoScaling + } + if mcapp.Type != "" { + objectMap["type"] = mcapp.Type + } + if mcapp.Mode != "" { + objectMap["mode"] = mcapp.Mode + } + if mcapp.OrchestratorVersion != nil { + objectMap["orchestratorVersion"] = mcapp.OrchestratorVersion + } + if mcapp.NodeImageVersion != nil { + objectMap["nodeImageVersion"] = mcapp.NodeImageVersion + } + if mcapp.UpgradeSettings != nil { + objectMap["upgradeSettings"] = mcapp.UpgradeSettings + } + if mcapp.AvailabilityZones != nil { + objectMap["availabilityZones"] = mcapp.AvailabilityZones + } + if mcapp.EnableNodePublicIP != nil { + objectMap["enableNodePublicIP"] = mcapp.EnableNodePublicIP + } + if mcapp.ScaleSetPriority != "" { + objectMap["scaleSetPriority"] = mcapp.ScaleSetPriority + } + if mcapp.ScaleSetEvictionPolicy != "" { + objectMap["scaleSetEvictionPolicy"] = mcapp.ScaleSetEvictionPolicy + } + if mcapp.SpotMaxPrice != nil { + objectMap["spotMaxPrice"] = mcapp.SpotMaxPrice + } + if mcapp.Tags != nil { + objectMap["tags"] = mcapp.Tags + } + if mcapp.NodeLabels != nil { + objectMap["nodeLabels"] = mcapp.NodeLabels + } + if mcapp.NodeTaints != nil { + objectMap["nodeTaints"] = mcapp.NodeTaints + } + return json.Marshal(objectMap) +} + +// ManagedClusterAgentPoolProfileProperties properties for the container service agent pool profile. +type ManagedClusterAgentPoolProfileProperties struct { + // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. + Count *int32 `json:"count,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' + VMSize VMSizeTypes `json:"vmSize,omitempty"` + // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` + // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. + VnetSubnetID *string `json:"vnetSubnetID,omitempty"` + // MaxPods - Maximum number of pods that can run on a node. + MaxPods *int32 `json:"maxPods,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` + // MaxCount - Maximum number of nodes for auto-scaling + MaxCount *int32 `json:"maxCount,omitempty"` + // MinCount - Minimum number of nodes for auto-scaling + MinCount *int32 `json:"minCount,omitempty"` + // EnableAutoScaling - Whether to enable auto-scaler + EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` + // Type - AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' + Type AgentPoolType `json:"type,omitempty"` + // Mode - AgentPoolMode represents mode of an agent pool. Possible values include: 'System', 'User' + Mode AgentPoolMode `json:"mode,omitempty"` + // OrchestratorVersion - Version of orchestrator specified when creating the managed cluster. + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` + // NodeImageVersion - Version of node image + NodeImageVersion *string `json:"nodeImageVersion,omitempty"` + // UpgradeSettings - Settings for upgrading the agentpool + UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"` + // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // AvailabilityZones - Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. + AvailabilityZones *[]string `json:"availabilityZones,omitempty"` + // EnableNodePublicIP - Enable public IP for nodes + EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"` + // ScaleSetPriority - ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. Possible values include: 'Spot', 'Regular' + ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"` + // ScaleSetEvictionPolicy - ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. Possible values include: 'Delete', 'Deallocate' + ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"` + // SpotMaxPrice - SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. + SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"` + // Tags - Agent pool tags to be persisted on the agent pool virtual machine scale set. + Tags map[string]*string `json:"tags"` + // NodeLabels - Agent pool node labels to be persisted across all nodes in agent pool. + NodeLabels map[string]*string `json:"nodeLabels"` + // NodeTaints - Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + NodeTaints *[]string `json:"nodeTaints,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfileProperties. +func (mcappp ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcappp.Count != nil { + objectMap["count"] = mcappp.Count + } + if mcappp.VMSize != "" { + objectMap["vmSize"] = mcappp.VMSize + } + if mcappp.OsDiskSizeGB != nil { + objectMap["osDiskSizeGB"] = mcappp.OsDiskSizeGB + } + if mcappp.VnetSubnetID != nil { + objectMap["vnetSubnetID"] = mcappp.VnetSubnetID + } + if mcappp.MaxPods != nil { + objectMap["maxPods"] = mcappp.MaxPods + } + if mcappp.OsType != "" { + objectMap["osType"] = mcappp.OsType + } + if mcappp.MaxCount != nil { + objectMap["maxCount"] = mcappp.MaxCount + } + if mcappp.MinCount != nil { + objectMap["minCount"] = mcappp.MinCount + } + if mcappp.EnableAutoScaling != nil { + objectMap["enableAutoScaling"] = mcappp.EnableAutoScaling + } + if mcappp.Type != "" { + objectMap["type"] = mcappp.Type + } + if mcappp.Mode != "" { + objectMap["mode"] = mcappp.Mode + } + if mcappp.OrchestratorVersion != nil { + objectMap["orchestratorVersion"] = mcappp.OrchestratorVersion + } + if mcappp.NodeImageVersion != nil { + objectMap["nodeImageVersion"] = mcappp.NodeImageVersion + } + if mcappp.UpgradeSettings != nil { + objectMap["upgradeSettings"] = mcappp.UpgradeSettings + } + if mcappp.AvailabilityZones != nil { + objectMap["availabilityZones"] = mcappp.AvailabilityZones + } + if mcappp.EnableNodePublicIP != nil { + objectMap["enableNodePublicIP"] = mcappp.EnableNodePublicIP + } + if mcappp.ScaleSetPriority != "" { + objectMap["scaleSetPriority"] = mcappp.ScaleSetPriority + } + if mcappp.ScaleSetEvictionPolicy != "" { + objectMap["scaleSetEvictionPolicy"] = mcappp.ScaleSetEvictionPolicy + } + if mcappp.SpotMaxPrice != nil { + objectMap["spotMaxPrice"] = mcappp.SpotMaxPrice + } + if mcappp.Tags != nil { + objectMap["tags"] = mcappp.Tags + } + if mcappp.NodeLabels != nil { + objectMap["nodeLabels"] = mcappp.NodeLabels + } + if mcappp.NodeTaints != nil { + objectMap["nodeTaints"] = mcappp.NodeTaints + } + return json.Marshal(objectMap) +} + +// ManagedClusterAPIServerAccessProfile access profile for managed cluster API server. +type ManagedClusterAPIServerAccessProfile struct { + // AuthorizedIPRanges - Authorized IP Ranges to kubernetes API server. + AuthorizedIPRanges *[]string `json:"authorizedIPRanges,omitempty"` + // EnablePrivateCluster - Whether to create the cluster as a private cluster or not. + EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"` +} + +// ManagedClusterIdentity identity for the managed cluster. +type ManagedClusterIdentity struct { + // PrincipalID - READ-ONLY; The principal id of the system assigned identity which is used by master components. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant id of the system assigned identity which is used by master components. + TenantID *string `json:"tenantId,omitempty"` + // Type - The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service principal will be used instead. Possible values include: 'SystemAssigned', 'None' + Type ResourceIdentityType `json:"type,omitempty"` +} + +// ManagedClusterListResult the response from the List Managed Clusters operation. +type ManagedClusterListResult struct { + autorest.Response `json:"-"` + // Value - The list of managed clusters. + Value *[]ManagedCluster `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of managed cluster results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ManagedClusterListResultIterator provides access to a complete listing of ManagedCluster values. +type ManagedClusterListResultIterator struct { + i int + page ManagedClusterListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ManagedClusterListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ManagedClusterListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ManagedClusterListResultIterator) Response() ManagedClusterListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ManagedClusterListResultIterator) Value() ManagedCluster { + if !iter.page.NotDone() { + return ManagedCluster{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ManagedClusterListResultIterator type. +func NewManagedClusterListResultIterator(page ManagedClusterListResultPage) ManagedClusterListResultIterator { + return ManagedClusterListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (mclr ManagedClusterListResult) IsEmpty() bool { + return mclr.Value == nil || len(*mclr.Value) == 0 +} + +// managedClusterListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (mclr ManagedClusterListResult) managedClusterListResultPreparer(ctx context.Context) (*http.Request, error) { + if mclr.NextLink == nil || len(to.String(mclr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(mclr.NextLink))) +} + +// ManagedClusterListResultPage contains a page of ManagedCluster values. +type ManagedClusterListResultPage struct { + fn func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error) + mclr ManagedClusterListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.mclr) + if err != nil { + return err + } + page.mclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ManagedClusterListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ManagedClusterListResultPage) NotDone() bool { + return !page.mclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ManagedClusterListResultPage) Response() ManagedClusterListResult { + return page.mclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ManagedClusterListResultPage) Values() []ManagedCluster { + if page.mclr.IsEmpty() { + return nil + } + return *page.mclr.Value +} + +// Creates a new instance of the ManagedClusterListResultPage type. +func NewManagedClusterListResultPage(getNextPage func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)) ManagedClusterListResultPage { + return ManagedClusterListResultPage{fn: getNextPage} +} + +// ManagedClusterLoadBalancerProfile profile of the managed cluster load balancer. +type ManagedClusterLoadBalancerProfile struct { + // ManagedOutboundIPs - Desired managed outbound IPs for the cluster load balancer. + ManagedOutboundIPs *ManagedClusterLoadBalancerProfileManagedOutboundIPs `json:"managedOutboundIPs,omitempty"` + // OutboundIPPrefixes - Desired outbound IP Prefix resources for the cluster load balancer. + OutboundIPPrefixes *ManagedClusterLoadBalancerProfileOutboundIPPrefixes `json:"outboundIPPrefixes,omitempty"` + // OutboundIPs - Desired outbound IP resources for the cluster load balancer. + OutboundIPs *ManagedClusterLoadBalancerProfileOutboundIPs `json:"outboundIPs,omitempty"` + // EffectiveOutboundIPs - The effective outbound IP resources of the cluster load balancer. + EffectiveOutboundIPs *[]ResourceReference `json:"effectiveOutboundIPs,omitempty"` + // AllocatedOutboundPorts - Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. + AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` + // IdleTimeoutInMinutes - Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` +} + +// ManagedClusterLoadBalancerProfileManagedOutboundIPs desired managed outbound IPs for the cluster load +// balancer. +type ManagedClusterLoadBalancerProfileManagedOutboundIPs struct { + // Count - Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + Count *int32 `json:"count,omitempty"` +} + +// ManagedClusterLoadBalancerProfileOutboundIPPrefixes desired outbound IP Prefix resources for the cluster +// load balancer. +type ManagedClusterLoadBalancerProfileOutboundIPPrefixes struct { + // PublicIPPrefixes - A list of public IP prefix resources. + PublicIPPrefixes *[]ResourceReference `json:"publicIPPrefixes,omitempty"` +} + +// ManagedClusterLoadBalancerProfileOutboundIPs desired outbound IP resources for the cluster load +// balancer. +type ManagedClusterLoadBalancerProfileOutboundIPs struct { + // PublicIPs - A list of public IP resources. + PublicIPs *[]ResourceReference `json:"publicIPs,omitempty"` +} + +// ManagedClusterPoolUpgradeProfile the list of available upgrade versions. +type ManagedClusterPoolUpgradeProfile struct { + // KubernetesVersion - Kubernetes version (major, minor, patch). + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // Name - Pool name. + Name *string `json:"name,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` + // Upgrades - List of orchestrator types and versions available for upgrade. + Upgrades *[]ManagedClusterPoolUpgradeProfileUpgradesItem `json:"upgrades,omitempty"` +} + +// ManagedClusterPoolUpgradeProfileUpgradesItem ... +type ManagedClusterPoolUpgradeProfileUpgradesItem struct { + // KubernetesVersion - Kubernetes version (major, minor, patch). + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // IsPreview - Whether Kubernetes version is currently in preview. + IsPreview *bool `json:"isPreview,omitempty"` +} + +// ManagedClusterProperties properties of the managed cluster. +type ManagedClusterProperties struct { + // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // MaxAgentPools - READ-ONLY; The max number of agent pools for the managed cluster. + MaxAgentPools *int32 `json:"maxAgentPools,omitempty"` + // KubernetesVersion - Version of Kubernetes specified when creating the managed cluster. + KubernetesVersion *string `json:"kubernetesVersion,omitempty"` + // DNSPrefix - DNS prefix specified when creating the managed cluster. + DNSPrefix *string `json:"dnsPrefix,omitempty"` + // Fqdn - READ-ONLY; FQDN for the master pool. + Fqdn *string `json:"fqdn,omitempty"` + // PrivateFQDN - READ-ONLY; FQDN of private cluster. + PrivateFQDN *string `json:"privateFQDN,omitempty"` + // AgentPoolProfiles - Properties of the agent pool. + AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` + // LinuxProfile - Profile for Linux VMs in the container service cluster. + LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"` + // WindowsProfile - Profile for Windows VMs in the container service cluster. + WindowsProfile *ManagedClusterWindowsProfile `json:"windowsProfile,omitempty"` + // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. + ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` + // AddonProfiles - Profile of managed cluster add-on. + AddonProfiles map[string]*ManagedClusterAddonProfile `json:"addonProfiles"` + // NodeResourceGroup - Name of the resource group containing agent pool nodes. + NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"` + // EnableRBAC - Whether to enable Kubernetes Role-Based Access Control. + EnableRBAC *bool `json:"enableRBAC,omitempty"` + // EnablePodSecurityPolicy - (PREVIEW) Whether to enable Kubernetes Pod security policy. + EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"` + // NetworkProfile - Profile of network configuration. + NetworkProfile *NetworkProfileType `json:"networkProfile,omitempty"` + // AadProfile - Profile of Azure Active Directory configuration. + AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"` + // AutoScalerProfile - Parameters to be applied to the cluster-autoscaler when enabled + AutoScalerProfile *ManagedClusterPropertiesAutoScalerProfile `json:"autoScalerProfile,omitempty"` + // APIServerAccessProfile - Access profile for managed cluster API server. + APIServerAccessProfile *ManagedClusterAPIServerAccessProfile `json:"apiServerAccessProfile,omitempty"` + // DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest. + DiskEncryptionSetID *string `json:"diskEncryptionSetID,omitempty"` + // IdentityProfile - Identities associated with the cluster. + IdentityProfile map[string]*ManagedClusterPropertiesIdentityProfileValue `json:"identityProfile"` +} + +// MarshalJSON is the custom marshaler for ManagedClusterProperties. +func (mcp ManagedClusterProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcp.KubernetesVersion != nil { + objectMap["kubernetesVersion"] = mcp.KubernetesVersion + } + if mcp.DNSPrefix != nil { + objectMap["dnsPrefix"] = mcp.DNSPrefix + } + if mcp.AgentPoolProfiles != nil { + objectMap["agentPoolProfiles"] = mcp.AgentPoolProfiles + } + if mcp.LinuxProfile != nil { + objectMap["linuxProfile"] = mcp.LinuxProfile + } + if mcp.WindowsProfile != nil { + objectMap["windowsProfile"] = mcp.WindowsProfile + } + if mcp.ServicePrincipalProfile != nil { + objectMap["servicePrincipalProfile"] = mcp.ServicePrincipalProfile + } + if mcp.AddonProfiles != nil { + objectMap["addonProfiles"] = mcp.AddonProfiles + } + if mcp.NodeResourceGroup != nil { + objectMap["nodeResourceGroup"] = mcp.NodeResourceGroup + } + if mcp.EnableRBAC != nil { + objectMap["enableRBAC"] = mcp.EnableRBAC + } + if mcp.EnablePodSecurityPolicy != nil { + objectMap["enablePodSecurityPolicy"] = mcp.EnablePodSecurityPolicy + } + if mcp.NetworkProfile != nil { + objectMap["networkProfile"] = mcp.NetworkProfile + } + if mcp.AadProfile != nil { + objectMap["aadProfile"] = mcp.AadProfile + } + if mcp.AutoScalerProfile != nil { + objectMap["autoScalerProfile"] = mcp.AutoScalerProfile + } + if mcp.APIServerAccessProfile != nil { + objectMap["apiServerAccessProfile"] = mcp.APIServerAccessProfile + } + if mcp.DiskEncryptionSetID != nil { + objectMap["diskEncryptionSetID"] = mcp.DiskEncryptionSetID + } + if mcp.IdentityProfile != nil { + objectMap["identityProfile"] = mcp.IdentityProfile + } + return json.Marshal(objectMap) +} + +// ManagedClusterPropertiesAutoScalerProfile parameters to be applied to the cluster-autoscaler when +// enabled +type ManagedClusterPropertiesAutoScalerProfile struct { + BalanceSimilarNodeGroups *string `json:"balance-similar-node-groups,omitempty"` + ScanInterval *string `json:"scan-interval,omitempty"` + ScaleDownDelayAfterAdd *string `json:"scale-down-delay-after-add,omitempty"` + ScaleDownDelayAfterDelete *string `json:"scale-down-delay-after-delete,omitempty"` + ScaleDownDelayAfterFailure *string `json:"scale-down-delay-after-failure,omitempty"` + ScaleDownUnneededTime *string `json:"scale-down-unneeded-time,omitempty"` + ScaleDownUnreadyTime *string `json:"scale-down-unready-time,omitempty"` + ScaleDownUtilizationThreshold *string `json:"scale-down-utilization-threshold,omitempty"` + MaxGracefulTerminationSec *string `json:"max-graceful-termination-sec,omitempty"` +} + +// ManagedClusterPropertiesIdentityProfileValue ... +type ManagedClusterPropertiesIdentityProfileValue struct { + // ResourceID - The resource id of the user assigned identity. + ResourceID *string `json:"resourceId,omitempty"` + // ClientID - The client id of the user assigned identity. + ClientID *string `json:"clientId,omitempty"` + // ObjectID - The object id of the user assigned identity. + ObjectID *string `json:"objectId,omitempty"` +} + +// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ManagedClustersCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { + mc, err = client.CreateOrUpdateResponder(mc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", mc.Response.Response, "Failure responding to request") + } + } + return +} + +// ManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ManagedClustersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersDeleteFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ManagedClusterServicePrincipalProfile information about a service principal identity for the cluster to +// use for manipulating Azure APIs. +type ManagedClusterServicePrincipalProfile struct { + // ClientID - The ID for the service principal. + ClientID *string `json:"clientId,omitempty"` + // Secret - The secret password associated with the service principal in plain text. + Secret *string `json:"secret,omitempty"` +} + +// ManagedClusterSKU ... +type ManagedClusterSKU struct { + // Name - Name of a managed cluster SKU. Possible values include: 'ManagedClusterSKUNameBasic' + Name ManagedClusterSKUName `json:"name,omitempty"` + // Tier - Tier of a managed cluster SKU. Possible values include: 'Paid', 'Free' + Tier ManagedClusterSKUTier `json:"tier,omitempty"` +} + +// ManagedClustersResetAADProfileFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ManagedClustersResetAADProfileFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetAADProfileFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture") + return + } + ar.Response = future.Response() + return +} + +// ManagedClustersResetServicePrincipalProfileFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ManagedClustersResetServicePrincipalProfileFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetServicePrincipalProfileFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture") + return + } + ar.Response = future.Response() + return +} + +// ManagedClustersRotateClusterCertificatesFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ManagedClustersRotateClusterCertificatesFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersRotateClusterCertificatesFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersRotateClusterCertificatesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersRotateClusterCertificatesFuture") + return + } + ar.Response = future.Response() + return +} + +// ManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ManagedClustersUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ManagedClustersUpdateTagsFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { + mc, err = client.UpdateTagsResponder(mc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", mc.Response.Response, "Failure responding to request") + } + } + return +} + +// ManagedClusterUpgradeProfile the list of available upgrades for compute pools. +type ManagedClusterUpgradeProfile struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of upgrade profile. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of upgrade profile. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of upgrade profile. + Type *string `json:"type,omitempty"` + // ManagedClusterUpgradeProfileProperties - Properties of upgrade profile. + *ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile. +func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mcup.ManagedClusterUpgradeProfileProperties != nil { + objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct. +func (mcup *ManagedClusterUpgradeProfile) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mcup.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mcup.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mcup.Type = &typeVar + } + case "properties": + if v != nil { + var managedClusterUpgradeProfileProperties ManagedClusterUpgradeProfileProperties + err = json.Unmarshal(*v, &managedClusterUpgradeProfileProperties) + if err != nil { + return err + } + mcup.ManagedClusterUpgradeProfileProperties = &managedClusterUpgradeProfileProperties + } + } + } + + return nil +} + +// ManagedClusterUpgradeProfileProperties control plane and agent pool upgrade profiles. +type ManagedClusterUpgradeProfileProperties struct { + // ControlPlaneProfile - The list of available upgrade versions for the control plane. + ControlPlaneProfile *ManagedClusterPoolUpgradeProfile `json:"controlPlaneProfile,omitempty"` + // AgentPoolProfiles - The list of available upgrade versions for agent pools. + AgentPoolProfiles *[]ManagedClusterPoolUpgradeProfile `json:"agentPoolProfiles,omitempty"` +} + +// ManagedClusterWindowsProfile profile for Windows VMs in the container service cluster. +type ManagedClusterWindowsProfile struct { + // AdminUsername - The administrator username to use for Windows VMs. + AdminUsername *string `json:"adminUsername,omitempty"` + // AdminPassword - The administrator password to use for Windows VMs. + AdminPassword *string `json:"adminPassword,omitempty"` +} + +// MasterProfile profile for the container service master. +type MasterProfile struct { + // Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. + Count *int32 `json:"count,omitempty"` + // DNSPrefix - DNS prefix to be used to create the FQDN for the master pool. + DNSPrefix *string `json:"dnsPrefix,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' + VMSize VMSizeTypes `json:"vmSize,omitempty"` + // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` + // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. + VnetSubnetID *string `json:"vnetSubnetID,omitempty"` + // FirstConsecutiveStaticIP - FirstConsecutiveStaticIP used to specify the first static ip of masters. + FirstConsecutiveStaticIP *string `json:"firstConsecutiveStaticIP,omitempty"` + // StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks' + StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"` + // Fqdn - READ-ONLY; FQDN for the master pool. + Fqdn *string `json:"fqdn,omitempty"` +} + +// NetworkProfile represents the OpenShift networking configuration +type NetworkProfile struct { + // VnetCidr - CIDR for the OpenShift Vnet. + VnetCidr *string `json:"vnetCidr,omitempty"` + // PeerVnetID - CIDR of the Vnet to peer. + PeerVnetID *string `json:"peerVnetId,omitempty"` + // VnetID - ID of the Vnet created for OSA cluster. + VnetID *string `json:"vnetId,omitempty"` +} + +// NetworkProfileType profile of network configuration. +type NetworkProfileType struct { + // NetworkPlugin - Network plugin used for building Kubernetes network. Possible values include: 'Azure', 'Kubenet' + NetworkPlugin NetworkPlugin `json:"networkPlugin,omitempty"` + // NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'NetworkPolicyCalico', 'NetworkPolicyAzure' + NetworkPolicy NetworkPolicy `json:"networkPolicy,omitempty"` + // NetworkMode - Network mode used for building Kubernetes network. Possible values include: 'Transparent', 'Bridge' + NetworkMode NetworkMode `json:"networkMode,omitempty"` + // PodCidr - A CIDR notation IP range from which to assign pod IPs when kubenet is used. + PodCidr *string `json:"podCidr,omitempty"` + // ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. + ServiceCidr *string `json:"serviceCidr,omitempty"` + // DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. + DNSServiceIP *string `json:"dnsServiceIP,omitempty"` + // DockerBridgeCidr - A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. + DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"` + // OutboundType - The outbound (egress) routing method. Possible values include: 'LoadBalancer', 'UserDefinedRouting' + OutboundType OutboundType `json:"outboundType,omitempty"` + // LoadBalancerSku - The load balancer sku for the managed cluster. Possible values include: 'Standard', 'Basic' + LoadBalancerSku LoadBalancerSku `json:"loadBalancerSku,omitempty"` + // LoadBalancerProfile - Profile of the cluster load balancer. + LoadBalancerProfile *ManagedClusterLoadBalancerProfile `json:"loadBalancerProfile,omitempty"` +} + +// OpenShiftManagedCluster openShift Managed cluster. +type OpenShiftManagedCluster struct { + autorest.Response `json:"-"` + // Plan - Define the resource plan as required by ARM for billing purposes + Plan *PurchasePlan `json:"plan,omitempty"` + // OpenShiftManagedClusterProperties - Properties of a OpenShift managed cluster. + *OpenShiftManagedClusterProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for OpenShiftManagedCluster. +func (osmc OpenShiftManagedCluster) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if osmc.Plan != nil { + objectMap["plan"] = osmc.Plan + } + if osmc.OpenShiftManagedClusterProperties != nil { + objectMap["properties"] = osmc.OpenShiftManagedClusterProperties + } + if osmc.Location != nil { + objectMap["location"] = osmc.Location + } + if osmc.Tags != nil { + objectMap["tags"] = osmc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedCluster struct. +func (osmc *OpenShiftManagedCluster) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "plan": + if v != nil { + var plan PurchasePlan + err = json.Unmarshal(*v, &plan) + if err != nil { + return err + } + osmc.Plan = &plan + } + case "properties": + if v != nil { + var openShiftManagedClusterProperties OpenShiftManagedClusterProperties + err = json.Unmarshal(*v, &openShiftManagedClusterProperties) + if err != nil { + return err + } + osmc.OpenShiftManagedClusterProperties = &openShiftManagedClusterProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + osmc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + osmc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + osmc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + osmc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + osmc.Tags = tags + } + } + } + + return nil +} + +// OpenShiftManagedClusterAADIdentityProvider defines the Identity provider for MS AAD. +type OpenShiftManagedClusterAADIdentityProvider struct { + // ClientID - The clientId password associated with the provider. + ClientID *string `json:"clientId,omitempty"` + // Secret - The secret password associated with the provider. + Secret *string `json:"secret,omitempty"` + // TenantID - The tenantId associated with the provider. + TenantID *string `json:"tenantId,omitempty"` + // CustomerAdminGroupID - The groupId to be granted cluster admin role. + CustomerAdminGroupID *string `json:"customerAdminGroupId,omitempty"` + // Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider' + Kind Kind `json:"kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for OpenShiftManagedClusterAADIdentityProvider. +func (osmcaip OpenShiftManagedClusterAADIdentityProvider) MarshalJSON() ([]byte, error) { + osmcaip.Kind = KindAADIdentityProvider + objectMap := make(map[string]interface{}) + if osmcaip.ClientID != nil { + objectMap["clientId"] = osmcaip.ClientID + } + if osmcaip.Secret != nil { + objectMap["secret"] = osmcaip.Secret + } + if osmcaip.TenantID != nil { + objectMap["tenantId"] = osmcaip.TenantID + } + if osmcaip.CustomerAdminGroupID != nil { + objectMap["customerAdminGroupId"] = osmcaip.CustomerAdminGroupID + } + if osmcaip.Kind != "" { + objectMap["kind"] = osmcaip.Kind + } + return json.Marshal(objectMap) +} + +// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. +func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) { + return &osmcaip, true +} + +// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. +func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) { + return nil, false +} + +// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. +func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) { + return &osmcaip, true +} + +// OpenShiftManagedClusterAgentPoolProfile defines the configuration of the OpenShift cluster VMs. +type OpenShiftManagedClusterAgentPoolProfile struct { + // Name - Unique name of the pool profile in the context of the subscription and resource group. + Name *string `json:"name,omitempty"` + // Count - Number of agents (VMs) to host docker containers. + Count *int32 `json:"count,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s' + VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"` + // SubnetCidr - Subnet CIDR for the peering. + SubnetCidr *string `json:"subnetCidr,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` + // Role - Define the role of the AgentPoolProfile. Possible values include: 'Compute', 'Infra' + Role OpenShiftAgentPoolProfileRole `json:"role,omitempty"` +} + +// OpenShiftManagedClusterAuthProfile defines all possible authentication profiles for the OpenShift +// cluster. +type OpenShiftManagedClusterAuthProfile struct { + // IdentityProviders - Type of authentication profile to use. + IdentityProviders *[]OpenShiftManagedClusterIdentityProvider `json:"identityProviders,omitempty"` +} + +// BasicOpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider. +type BasicOpenShiftManagedClusterBaseIdentityProvider interface { + AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) + AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) +} + +// OpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider. +type OpenShiftManagedClusterBaseIdentityProvider struct { + // Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider' + Kind Kind `json:"kind,omitempty"` +} + +func unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(body []byte) (BasicOpenShiftManagedClusterBaseIdentityProvider, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindAADIdentityProvider): + var osmcaip OpenShiftManagedClusterAADIdentityProvider + err := json.Unmarshal(body, &osmcaip) + return osmcaip, err + default: + var osmcbip OpenShiftManagedClusterBaseIdentityProvider + err := json.Unmarshal(body, &osmcbip) + return osmcbip, err + } +} +func unmarshalBasicOpenShiftManagedClusterBaseIdentityProviderArray(body []byte) ([]BasicOpenShiftManagedClusterBaseIdentityProvider, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + osmcbipArray := make([]BasicOpenShiftManagedClusterBaseIdentityProvider, len(rawMessages)) + + for index, rawMessage := range rawMessages { + osmcbip, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*rawMessage) + if err != nil { + return nil, err + } + osmcbipArray[index] = osmcbip + } + return osmcbipArray, nil +} + +// MarshalJSON is the custom marshaler for OpenShiftManagedClusterBaseIdentityProvider. +func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) MarshalJSON() ([]byte, error) { + osmcbip.Kind = KindOpenShiftManagedClusterBaseIdentityProvider + objectMap := make(map[string]interface{}) + if osmcbip.Kind != "" { + objectMap["kind"] = osmcbip.Kind + } + return json.Marshal(objectMap) +} + +// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. +func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) { + return nil, false +} + +// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. +func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) { + return &osmcbip, true +} + +// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. +func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) { + return &osmcbip, true +} + +// OpenShiftManagedClusterIdentityProvider defines the configuration of the identity providers to be used +// in the OpenShift cluster. +type OpenShiftManagedClusterIdentityProvider struct { + // Name - Name of the provider. + Name *string `json:"name,omitempty"` + // Provider - Configuration of the provider. + Provider BasicOpenShiftManagedClusterBaseIdentityProvider `json:"provider,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedClusterIdentityProvider struct. +func (osmcip *OpenShiftManagedClusterIdentityProvider) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + osmcip.Name = &name + } + case "provider": + if v != nil { + provider, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*v) + if err != nil { + return err + } + osmcip.Provider = provider + } + } + } + + return nil +} + +// OpenShiftManagedClusterListResult the response from the List OpenShift Managed Clusters operation. +type OpenShiftManagedClusterListResult struct { + autorest.Response `json:"-"` + // Value - The list of OpenShift managed clusters. + Value *[]OpenShiftManagedCluster `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of OpenShift managed cluster results. + NextLink *string `json:"nextLink,omitempty"` +} + +// OpenShiftManagedClusterListResultIterator provides access to a complete listing of +// OpenShiftManagedCluster values. +type OpenShiftManagedClusterListResultIterator struct { + i int + page OpenShiftManagedClusterListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *OpenShiftManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *OpenShiftManagedClusterListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OpenShiftManagedClusterListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter OpenShiftManagedClusterListResultIterator) Response() OpenShiftManagedClusterListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter OpenShiftManagedClusterListResultIterator) Value() OpenShiftManagedCluster { + if !iter.page.NotDone() { + return OpenShiftManagedCluster{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OpenShiftManagedClusterListResultIterator type. +func NewOpenShiftManagedClusterListResultIterator(page OpenShiftManagedClusterListResultPage) OpenShiftManagedClusterListResultIterator { + return OpenShiftManagedClusterListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (osmclr OpenShiftManagedClusterListResult) IsEmpty() bool { + return osmclr.Value == nil || len(*osmclr.Value) == 0 +} + +// openShiftManagedClusterListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (osmclr OpenShiftManagedClusterListResult) openShiftManagedClusterListResultPreparer(ctx context.Context) (*http.Request, error) { + if osmclr.NextLink == nil || len(to.String(osmclr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(osmclr.NextLink))) +} + +// OpenShiftManagedClusterListResultPage contains a page of OpenShiftManagedCluster values. +type OpenShiftManagedClusterListResultPage struct { + fn func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error) + osmclr OpenShiftManagedClusterListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *OpenShiftManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.osmclr) + if err != nil { + return err + } + page.osmclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OpenShiftManagedClusterListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OpenShiftManagedClusterListResultPage) NotDone() bool { + return !page.osmclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OpenShiftManagedClusterListResultPage) Response() OpenShiftManagedClusterListResult { + return page.osmclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OpenShiftManagedClusterListResultPage) Values() []OpenShiftManagedCluster { + if page.osmclr.IsEmpty() { + return nil + } + return *page.osmclr.Value +} + +// Creates a new instance of the OpenShiftManagedClusterListResultPage type. +func NewOpenShiftManagedClusterListResultPage(getNextPage func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error)) OpenShiftManagedClusterListResultPage { + return OpenShiftManagedClusterListResultPage{fn: getNextPage} +} + +// OpenShiftManagedClusterMasterPoolProfile openShiftManagedClusterMaterPoolProfile contains configuration +// for OpenShift master VMs. +type OpenShiftManagedClusterMasterPoolProfile struct { + // Name - Unique name of the master pool profile in the context of the subscription and resource group. + Name *string `json:"name,omitempty"` + // Count - Number of masters (VMs) to host docker containers. The default value is 3. + Count *int32 `json:"count,omitempty"` + // VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s' + VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"` + // SubnetCidr - Subnet CIDR for the peering. + SubnetCidr *string `json:"subnetCidr,omitempty"` + // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' + OsType OSType `json:"osType,omitempty"` +} + +// OpenShiftManagedClusterProperties properties of the OpenShift managed cluster. +type OpenShiftManagedClusterProperties struct { + // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // OpenShiftVersion - Version of OpenShift specified when creating the cluster. + OpenShiftVersion *string `json:"openShiftVersion,omitempty"` + // ClusterVersion - READ-ONLY; Version of OpenShift specified when creating the cluster. + ClusterVersion *string `json:"clusterVersion,omitempty"` + // PublicHostname - READ-ONLY; Service generated FQDN for OpenShift API server. + PublicHostname *string `json:"publicHostname,omitempty"` + // Fqdn - READ-ONLY; Service generated FQDN for OpenShift API server loadbalancer internal hostname. + Fqdn *string `json:"fqdn,omitempty"` + // NetworkProfile - Configuration for OpenShift networking. + NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` + // RouterProfiles - Configuration for OpenShift router(s). + RouterProfiles *[]OpenShiftRouterProfile `json:"routerProfiles,omitempty"` + // MasterPoolProfile - Configuration for OpenShift master VMs. + MasterPoolProfile *OpenShiftManagedClusterMasterPoolProfile `json:"masterPoolProfile,omitempty"` + // AgentPoolProfiles - Configuration of OpenShift cluster VMs. + AgentPoolProfiles *[]OpenShiftManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` + // AuthProfile - Configures OpenShift authentication. + AuthProfile *OpenShiftManagedClusterAuthProfile `json:"authProfile,omitempty"` +} + +// OpenShiftManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type OpenShiftManagedClustersCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *OpenShiftManagedClustersCreateOrUpdateFuture) Result(client OpenShiftManagedClustersClient) (osmc OpenShiftManagedCluster, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if osmc.Response.Response, err = future.GetResult(sender); err == nil && osmc.Response.Response.StatusCode != http.StatusNoContent { + osmc, err = client.CreateOrUpdateResponder(osmc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersCreateOrUpdateFuture", "Result", osmc.Response.Response, "Failure responding to request") + } + } + return +} + +// OpenShiftManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type OpenShiftManagedClustersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *OpenShiftManagedClustersDeleteFuture) Result(client OpenShiftManagedClustersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// OpenShiftManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type OpenShiftManagedClustersUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *OpenShiftManagedClustersUpdateTagsFuture) Result(client OpenShiftManagedClustersClient) (osmc OpenShiftManagedCluster, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if osmc.Response.Response, err = future.GetResult(sender); err == nil && osmc.Response.Response.StatusCode != http.StatusNoContent { + osmc, err = client.UpdateTagsResponder(osmc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersUpdateTagsFuture", "Result", osmc.Response.Response, "Failure responding to request") + } + } + return +} + +// OpenShiftRouterProfile represents an OpenShift router +type OpenShiftRouterProfile struct { + // Name - Name of the router profile. + Name *string `json:"name,omitempty"` + // PublicSubdomain - READ-ONLY; DNS subdomain for OpenShift router. + PublicSubdomain *string `json:"publicSubdomain,omitempty"` + // Fqdn - READ-ONLY; Auto-allocated FQDN for the OpenShift router. + Fqdn *string `json:"fqdn,omitempty"` +} + +// OperationListResult the List Compute Operation operation response. +type OperationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; The list of compute operations + Value *[]OperationValue `json:"value,omitempty"` +} + +// OperationValue describes the properties of a Compute Operation value. +type OperationValue struct { + // Origin - READ-ONLY; The origin of the compute operation. + Origin *string `json:"origin,omitempty"` + // Name - READ-ONLY; The name of the compute operation. + Name *string `json:"name,omitempty"` + // OperationValueDisplay - Describes the properties of a Compute Operation Value Display. + *OperationValueDisplay `json:"display,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationValue. +func (ov OperationValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ov.OperationValueDisplay != nil { + objectMap["display"] = ov.OperationValueDisplay + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for OperationValue struct. +func (ov *OperationValue) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "origin": + if v != nil { + var origin string + err = json.Unmarshal(*v, &origin) + if err != nil { + return err + } + ov.Origin = &origin + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ov.Name = &name + } + case "display": + if v != nil { + var operationValueDisplay OperationValueDisplay + err = json.Unmarshal(*v, &operationValueDisplay) + if err != nil { + return err + } + ov.OperationValueDisplay = &operationValueDisplay + } + } + } + + return nil +} + +// OperationValueDisplay describes the properties of a Compute Operation Value Display. +type OperationValueDisplay struct { + // Operation - READ-ONLY; The display name of the compute operation. + Operation *string `json:"operation,omitempty"` + // Resource - READ-ONLY; The display name of the resource the operation applies to. + Resource *string `json:"resource,omitempty"` + // Description - READ-ONLY; The description of the operation. + Description *string `json:"description,omitempty"` + // Provider - READ-ONLY; The resource provider for the operation. + Provider *string `json:"provider,omitempty"` +} + +// OrchestratorProfile contains information about orchestrator. +type OrchestratorProfile struct { + // OrchestratorType - Orchestrator type. + OrchestratorType *string `json:"orchestratorType,omitempty"` + // OrchestratorVersion - Orchestrator version (major, minor, patch). + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` + // IsPreview - Whether Kubernetes version is currently in preview. + IsPreview *bool `json:"isPreview,omitempty"` +} + +// OrchestratorProfileType profile for the container service orchestrator. +type OrchestratorProfileType struct { + // OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom' + OrchestratorType OrchestratorTypes `json:"orchestratorType,omitempty"` + // OrchestratorVersion - The version of the orchestrator to use. You can specify the major.minor.patch part of the actual version.For example, you can specify version as "1.6.11". + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` +} + +// OrchestratorVersionProfile the profile of an orchestrator and its available versions. +type OrchestratorVersionProfile struct { + // OrchestratorType - Orchestrator type. + OrchestratorType *string `json:"orchestratorType,omitempty"` + // OrchestratorVersion - Orchestrator version (major, minor, patch). + OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` + // Default - Installed by default if version is not specified. + Default *bool `json:"default,omitempty"` + // IsPreview - Whether Kubernetes version is currently in preview. + IsPreview *bool `json:"isPreview,omitempty"` + // Upgrades - The list of available upgrade versions. + Upgrades *[]OrchestratorProfile `json:"upgrades,omitempty"` +} + +// OrchestratorVersionProfileListResult the list of versions for supported orchestrators. +type OrchestratorVersionProfileListResult struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Id of the orchestrator version profile list result. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Name of the orchestrator version profile list result. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the orchestrator version profile list result. + Type *string `json:"type,omitempty"` + // OrchestratorVersionProfileProperties - The properties of an orchestrator version profile. + *OrchestratorVersionProfileProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for OrchestratorVersionProfileListResult. +func (ovplr OrchestratorVersionProfileListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ovplr.OrchestratorVersionProfileProperties != nil { + objectMap["properties"] = ovplr.OrchestratorVersionProfileProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for OrchestratorVersionProfileListResult struct. +func (ovplr *OrchestratorVersionProfileListResult) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ovplr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ovplr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ovplr.Type = &typeVar + } + case "properties": + if v != nil { + var orchestratorVersionProfileProperties OrchestratorVersionProfileProperties + err = json.Unmarshal(*v, &orchestratorVersionProfileProperties) + if err != nil { + return err + } + ovplr.OrchestratorVersionProfileProperties = &orchestratorVersionProfileProperties + } + } + } + + return nil +} + +// OrchestratorVersionProfileProperties the properties of an orchestrator version profile. +type OrchestratorVersionProfileProperties struct { + // Orchestrators - List of orchestrator version profiles. + Orchestrators *[]OrchestratorVersionProfile `json:"orchestrators,omitempty"` +} + +// Properties properties of the container service. +type Properties struct { + // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // OrchestratorProfile - Profile for the container service orchestrator. + OrchestratorProfile *OrchestratorProfileType `json:"orchestratorProfile,omitempty"` + // CustomProfile - Properties to configure a custom container service cluster. + CustomProfile *CustomProfile `json:"customProfile,omitempty"` + // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be specified. + ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` + // MasterProfile - Profile for the container service master. + MasterProfile *MasterProfile `json:"masterProfile,omitempty"` + // AgentPoolProfiles - Properties of the agent pool. + AgentPoolProfiles *[]AgentPoolProfile `json:"agentPoolProfiles,omitempty"` + // WindowsProfile - Profile for Windows VMs in the container service cluster. + WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"` + // LinuxProfile - Profile for Linux VMs in the container service cluster. + LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"` + // DiagnosticsProfile - Profile for diagnostics in the container service cluster. + DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` +} + +// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace. +type PurchasePlan struct { + // Name - The plan ID. + Name *string `json:"name,omitempty"` + // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. + Product *string `json:"product,omitempty"` + // PromotionCode - The promotion code. + PromotionCode *string `json:"promotionCode,omitempty"` + // Publisher - The plan ID. + Publisher *string `json:"publisher,omitempty"` +} + +// Resource the Resource model definition. +type Resource struct { + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.Location != nil { + objectMap["location"] = r.Location + } + if r.Tags != nil { + objectMap["tags"] = r.Tags + } + return json.Marshal(objectMap) +} + +// ResourceReference a reference to an Azure resource. +type ResourceReference struct { + // ID - The fully qualified Azure resource id. + ID *string `json:"id,omitempty"` +} + +// ServicePrincipalProfile information about a service principal identity for the cluster to use for +// manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified. +type ServicePrincipalProfile struct { + // ClientID - The ID for the service principal. + ClientID *string `json:"clientId,omitempty"` + // Secret - The secret password associated with the service principal in plain text. + Secret *string `json:"secret,omitempty"` + // KeyVaultSecretRef - Reference to a secret stored in Azure Key Vault. + KeyVaultSecretRef *KeyVaultSecretRef `json:"keyVaultSecretRef,omitempty"` +} + +// SSHConfiguration SSH configuration for Linux-based VMs running on Azure. +type SSHConfiguration struct { + // PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. + PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"` +} + +// SSHPublicKey contains information about SSH certificate public key data. +type SSHPublicKey struct { + // KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. + KeyData *string `json:"keyData,omitempty"` +} + +// SubResource reference to another subresource. +type SubResource struct { + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// TagsObject tags object for patch operations. +type TagsObject struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for TagsObject. +func (toVar TagsObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if toVar.Tags != nil { + objectMap["tags"] = toVar.Tags + } + return json.Marshal(objectMap) +} + +// UserAssignedIdentity ... +type UserAssignedIdentity struct { + // ResourceID - The resource id of the user assigned identity. + ResourceID *string `json:"resourceId,omitempty"` + // ClientID - The client id of the user assigned identity. + ClientID *string `json:"clientId,omitempty"` + // ObjectID - The object id of the user assigned identity. + ObjectID *string `json:"objectId,omitempty"` +} + +// VMDiagnostics profile for diagnostics on the container service VMs. +type VMDiagnostics struct { + // Enabled - Whether the VM diagnostic agent is provisioned on the VM. + Enabled *bool `json:"enabled,omitempty"` + // StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored. + StorageURI *string `json:"storageUri,omitempty"` +} + +// WindowsProfile profile for Windows VMs in the container service cluster. +type WindowsProfile struct { + // AdminUsername - The administrator username to use for Windows VMs. + AdminUsername *string `json:"adminUsername,omitempty"` + // AdminPassword - The administrator password to use for Windows VMs. + AdminPassword *string `json:"adminPassword,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go new file mode 100644 index 00000000000..bec338c6523 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go @@ -0,0 +1,613 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OpenShiftManagedClustersClient is the the Container Service Client. +type OpenShiftManagedClustersClient struct { + BaseClient +} + +// NewOpenShiftManagedClustersClient creates an instance of the OpenShiftManagedClustersClient client. +func NewOpenShiftManagedClustersClient(subscriptionID string) OpenShiftManagedClustersClient { + return NewOpenShiftManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOpenShiftManagedClustersClientWithBaseURI creates an instance of the OpenShiftManagedClustersClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewOpenShiftManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) OpenShiftManagedClustersClient { + return OpenShiftManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a OpenShift managed cluster with the specified configuration for agents and +// OpenShift version. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the OpenShift managed cluster resource. +// parameters - parameters supplied to the Create or Update an OpenShift Managed Cluster operation. +func (client OpenShiftManagedClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters OpenShiftManagedCluster) (result OpenShiftManagedClustersCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties.OpenShiftVersion", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.OpenShiftManagedClusterProperties.MasterPoolProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.OpenShiftManagedClusterProperties.MasterPoolProfile.Count", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client OpenShiftManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters OpenShiftManagedCluster) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client OpenShiftManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future OpenShiftManagedClustersCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) CreateOrUpdateResponder(resp *http.Response) (result OpenShiftManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the OpenShift managed cluster with a specified resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the OpenShift managed cluster resource. +func (client OpenShiftManagedClustersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result OpenShiftManagedClustersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client OpenShiftManagedClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client OpenShiftManagedClustersClient) DeleteSender(req *http.Request) (future OpenShiftManagedClustersDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of the managed OpenShift cluster with a specified resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the OpenShift managed cluster resource. +func (client OpenShiftManagedClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result OpenShiftManagedCluster, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client OpenShiftManagedClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client OpenShiftManagedClustersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) GetResponder(resp *http.Response) (result OpenShiftManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of OpenShift managed clusters in the specified subscription. The operation returns properties of +// each OpenShift managed cluster. +func (client OpenShiftManagedClustersClient) List(ctx context.Context) (result OpenShiftManagedClusterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.List") + defer func() { + sc := -1 + if result.osmclr.Response.Response != nil { + sc = result.osmclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.osmclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", resp, "Failure sending request") + return + } + + result.osmclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OpenShiftManagedClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/openShiftManagedClusters", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OpenShiftManagedClustersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) ListResponder(resp *http.Response) (result OpenShiftManagedClusterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OpenShiftManagedClustersClient) listNextResults(ctx context.Context, lastResults OpenShiftManagedClusterListResult) (result OpenShiftManagedClusterListResult, err error) { + req, err := lastResults.openShiftManagedClusterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client OpenShiftManagedClustersClient) ListComplete(ctx context.Context) (result OpenShiftManagedClusterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByResourceGroup lists OpenShift managed clusters in the specified subscription and resource group. The operation +// returns properties of each OpenShift managed cluster. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client OpenShiftManagedClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result OpenShiftManagedClusterListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.osmclr.Response.Response != nil { + sc = result.osmclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.osmclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.osmclr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client OpenShiftManagedClustersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client OpenShiftManagedClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) ListByResourceGroupResponder(resp *http.Response) (result OpenShiftManagedClusterListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client OpenShiftManagedClustersClient) listByResourceGroupNextResults(ctx context.Context, lastResults OpenShiftManagedClusterListResult) (result OpenShiftManagedClusterListResult, err error) { + req, err := lastResults.openShiftManagedClusterListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client OpenShiftManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result OpenShiftManagedClusterListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// UpdateTags updates an OpenShift managed cluster with the specified tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the OpenShift managed cluster resource. +// parameters - parameters supplied to the Update OpenShift Managed Cluster Tags operation. +func (client OpenShiftManagedClustersClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (result OpenShiftManagedClustersUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClustersClient.UpdateTags") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.OpenShiftManagedClustersClient", "UpdateTags", err.Error()) + } + + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client OpenShiftManagedClustersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-04-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client OpenShiftManagedClustersClient) UpdateTagsSender(req *http.Request) (future OpenShiftManagedClustersUpdateTagsFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client OpenShiftManagedClustersClient) UpdateTagsResponder(resp *http.Response) (result OpenShiftManagedCluster, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/operations.go new file mode 100644 index 00000000000..a090960e690 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/operations.go @@ -0,0 +1,109 @@ +package containerservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the the Container Service Client. +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets a list of compute operations. +func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2020-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.ContainerService/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/version.go new file mode 100644 index 00000000000..57f38f2e70b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/version.go @@ -0,0 +1,30 @@ +package containerservice + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + Version() + " containerservice/2020-04-01" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go index b3c1d5aa88b..8c65f4bef46 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go @@ -36,7 +36,9 @@ func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClie return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. +// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewApplicationGatewaysClientWithBaseURI(baseURI string, subscriptionID string) ApplicationGatewaysClient { return ApplicationGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -99,9 +101,8 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex // BackendHealthSender sends the BackendHealth request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -184,9 +185,8 @@ func (client ApplicationGatewaysClient) BackendHealthOnDemandPreparer(ctx contex // BackendHealthOnDemandSender sends the BackendHealthOnDemand request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) BackendHealthOnDemandSender(req *http.Request) (future ApplicationGatewaysBackendHealthOnDemandFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -232,20 +232,20 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) @@ -292,9 +292,8 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -369,9 +368,8 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -451,8 +449,7 @@ func (client ApplicationGatewaysClient) GetPreparer(ctx context.Context, resourc // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -526,8 +523,7 @@ func (client ApplicationGatewaysClient) GetSslPredefinedPolicyPreparer(ctx conte // GetSslPredefinedPolicySender sends the GetSslPredefinedPolicy request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) GetSslPredefinedPolicySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetSslPredefinedPolicyResponder handles the response to the GetSslPredefinedPolicy request. The method always @@ -602,8 +598,7 @@ func (client ApplicationGatewaysClient) ListPreparer(ctx context.Context, resour // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -712,8 +707,7 @@ func (client ApplicationGatewaysClient) ListAllPreparer(ctx context.Context) (*h // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -821,8 +815,7 @@ func (client ApplicationGatewaysClient) ListAvailableRequestHeadersPreparer(ctx // ListAvailableRequestHeadersSender sends the ListAvailableRequestHeaders request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) ListAvailableRequestHeadersSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAvailableRequestHeadersResponder handles the response to the ListAvailableRequestHeaders request. The method always @@ -893,8 +886,7 @@ func (client ApplicationGatewaysClient) ListAvailableResponseHeadersPreparer(ctx // ListAvailableResponseHeadersSender sends the ListAvailableResponseHeaders request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) ListAvailableResponseHeadersSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAvailableResponseHeadersResponder handles the response to the ListAvailableResponseHeaders request. The method always @@ -965,8 +957,7 @@ func (client ApplicationGatewaysClient) ListAvailableServerVariablesPreparer(ctx // ListAvailableServerVariablesSender sends the ListAvailableServerVariables request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) ListAvailableServerVariablesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAvailableServerVariablesResponder handles the response to the ListAvailableServerVariables request. The method always @@ -1037,8 +1028,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslOptionsPreparer(ctx cont // ListAvailableSslOptionsSender sends the ListAvailableSslOptions request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) ListAvailableSslOptionsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAvailableSslOptionsResponder handles the response to the ListAvailableSslOptions request. The method always @@ -1110,8 +1100,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesPrepar // ListAvailableSslPredefinedPoliciesSender sends the ListAvailableSslPredefinedPolicies request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAvailableSslPredefinedPoliciesResponder handles the response to the ListAvailableSslPredefinedPolicies request. The method always @@ -1219,8 +1208,7 @@ func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsPreparer(ctx con // ListAvailableWafRuleSetsSender sends the ListAvailableWafRuleSets request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAvailableWafRuleSetsResponder handles the response to the ListAvailableWafRuleSets request. The method always @@ -1290,9 +1278,8 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou // StartSender sends the Start request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1366,9 +1353,8 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour // StopSender sends the Stop request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1445,9 +1431,8 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context, // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (future ApplicationGatewaysUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go index 41a47cf0f5f..706a092aaea 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go @@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewApplicationSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationSecurityGroupsClient { return ApplicationSecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +100,8 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +176,8 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (future ApplicationSecurityGroupsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -257,8 +257,7 @@ func (client ApplicationSecurityGroupsClient) GetPreparer(ctx context.Context, r // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ApplicationSecurityGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -333,8 +332,7 @@ func (client ApplicationSecurityGroupsClient) ListPreparer(ctx context.Context, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ApplicationSecurityGroupsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -443,8 +441,7 @@ func (client ApplicationSecurityGroupsClient) ListAllPreparer(ctx context.Contex // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client ApplicationSecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -554,9 +551,8 @@ func (client ApplicationSecurityGroupsClient) UpdateTagsPreparer(ctx context.Con // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client ApplicationSecurityGroupsClient) UpdateTagsSender(req *http.Request) (future ApplicationSecurityGroupsUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go index 747fd724a50..7a04f311e39 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go @@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. +// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAvailableDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableDelegationsClient { return AvailableDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -99,8 +101,7 @@ func (client AvailableDelegationsClient) ListPreparer(ctx context.Context, locat // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client AvailableDelegationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go index 79b645fbcb0..69d99c04af0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go @@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewAvailableEndpointServicesClientWithBaseURI(baseURI string, subscriptionID string) AvailableEndpointServicesClient { return AvailableEndpointServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -99,8 +101,7 @@ func (client AvailableEndpointServicesClient) ListPreparer(ctx context.Context, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client AvailableEndpointServicesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go index b7de98c4a6c..2f796046190 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go @@ -36,7 +36,8 @@ func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePriv } // NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient -// client. +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). func NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient { return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -100,8 +101,7 @@ func (client AvailablePrivateEndpointTypesClient) ListPreparer(ctx context.Conte // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client AvailablePrivateEndpointTypesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -216,8 +216,7 @@ func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupPreparer(ct // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go index 32069f2daaf..31fa824c023 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go @@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available } // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the -// AvailableResourceGroupDelegationsClient client. +// AvailableResourceGroupDelegationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAvailableResourceGroupDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableResourceGroupDelegationsClient { return AvailableResourceGroupDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -103,8 +104,7 @@ func (client AvailableResourceGroupDelegationsClient) ListPreparer(ctx context.C // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client AvailableResourceGroupDelegationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go index cf0d2a97dfa..6b4f3afced5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go @@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. +// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewAzureFirewallFqdnTagsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallFqdnTagsClient { return AzureFirewallFqdnTagsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -96,8 +98,7 @@ func (client AzureFirewallFqdnTagsClient) ListAllPreparer(ctx context.Context) ( // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client AzureFirewallFqdnTagsClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go index c85a97dd9a5..74ee61bbe9d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go @@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. +// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAzureFirewallsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallsClient { return AzureFirewallsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +99,8 @@ func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, r // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client AzureFirewallsClient) CreateOrUpdateSender(req *http.Request) (future AzureFirewallsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +175,8 @@ func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceG // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client AzureFirewallsClient) DeleteSender(req *http.Request) (future AzureFirewallsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -257,8 +256,7 @@ func (client AzureFirewallsClient) GetPreparer(ctx context.Context, resourceGrou // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client AzureFirewallsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -333,8 +331,7 @@ func (client AzureFirewallsClient) ListPreparer(ctx context.Context, resourceGro // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client AzureFirewallsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -443,8 +440,7 @@ func (client AzureFirewallsClient) ListAllPreparer(ctx context.Context) (*http.R // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client AzureFirewallsClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -561,8 +557,7 @@ func (client AzureFirewallsClient) UpdateTagsPreparer(ctx context.Context, resou // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client AzureFirewallsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go index 7d2f594dfc0..fe68d8a4109 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go @@ -35,7 +35,8 @@ func NewBastionHostsClient(subscriptionID string) BastionHostsClient { return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client. +// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBastionHostsClientWithBaseURI(baseURI string, subscriptionID string) BastionHostsClient { return BastionHostsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +99,8 @@ func (client BastionHostsClient) CreateOrUpdatePreparer(ctx context.Context, res // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client BastionHostsClient) CreateOrUpdateSender(req *http.Request) (future BastionHostsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +175,8 @@ func (client BastionHostsClient) DeletePreparer(ctx context.Context, resourceGro // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client BastionHostsClient) DeleteSender(req *http.Request) (future BastionHostsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -257,8 +256,7 @@ func (client BastionHostsClient) GetPreparer(ctx context.Context, resourceGroupN // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client BastionHostsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -330,8 +328,7 @@ func (client BastionHostsClient) ListPreparer(ctx context.Context) (*http.Reques // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client BastionHostsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -443,8 +440,7 @@ func (client BastionHostsClient) ListByResourceGroupPreparer(ctx context.Context // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client BastionHostsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -554,9 +550,8 @@ func (client BastionHostsClient) UpdateTagsPreparer(ctx context.Context, resourc // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client BastionHostsClient) UpdateTagsSender(req *http.Request) (future BastionHostsUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go index 5d93b851fdf..d5964f2a5ad 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go @@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. +// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewBgpServiceCommunitiesClientWithBaseURI(baseURI string, subscriptionID string) BgpServiceCommunitiesClient { return BgpServiceCommunitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -96,8 +98,7 @@ func (client BgpServiceCommunitiesClient) ListPreparer(ctx context.Context) (*ht // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client BgpServiceCommunitiesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go index 14cd48cfb9e..26209bf396f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go @@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), @@ -115,8 +116,7 @@ func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, l // CheckDNSNameAvailabilitySender sends the CheckDNSNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client BaseClient) CheckDNSNameAvailabilitySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckDNSNameAvailabilityResponder handles the response to the CheckDNSNameAvailability request. The method always @@ -192,8 +192,7 @@ func (client BaseClient) SupportedSecurityProvidersPreparer(ctx context.Context, // SupportedSecurityProvidersSender sends the SupportedSecurityProviders request. The method will close the // http.Response Body if it receives an error. func (client BaseClient) SupportedSecurityProvidersSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // SupportedSecurityProvidersResponder handles the response to the SupportedSecurityProviders request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go index ca171615eb0..86b7360f700 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go @@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. +// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewConnectionMonitorsClientWithBaseURI(baseURI string, subscriptionID string) ConnectionMonitorsClient { return ConnectionMonitorsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -110,9 +112,8 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -189,9 +190,8 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -273,8 +273,7 @@ func (client ConnectionMonitorsClient) GetPreparer(ctx context.Context, resource // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ConnectionMonitorsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -350,8 +349,7 @@ func (client ConnectionMonitorsClient) ListPreparer(ctx context.Context, resourc // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ConnectionMonitorsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -423,9 +421,8 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour // QuerySender sends the Query request. The method will close the // http.Response Body if it receives an error. func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -502,9 +499,8 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour // StartSender sends the Start request. The method will close the // http.Response Body if it receives an error. func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -580,9 +576,8 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc // StopSender sends the Stop request. The method will close the // http.Response Body if it receives an error. func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -667,8 +662,7 @@ func (client ConnectionMonitorsClient) UpdateTagsPreparer(ctx context.Context, r // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client ConnectionMonitorsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go index f8d645460d6..21d6819fd75 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go @@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client. +// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDdosCustomPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DdosCustomPoliciesClient { return DdosCustomPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +100,8 @@ func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DdosCustomPoliciesClient) CreateOrUpdateSender(req *http.Request) (future DdosCustomPoliciesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +176,8 @@ func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DdosCustomPoliciesClient) DeleteSender(req *http.Request) (future DdosCustomPoliciesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -257,8 +257,7 @@ func (client DdosCustomPoliciesClient) GetPreparer(ctx context.Context, resource // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DdosCustomPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -331,9 +330,8 @@ func (client DdosCustomPoliciesClient) UpdateTagsPreparer(ctx context.Context, r // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client DdosCustomPoliciesClient) UpdateTagsSender(req *http.Request) (future DdosCustomPoliciesUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go index efd5f7635c3..5b6b270ce4e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go @@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. +// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDdosProtectionPlansClientWithBaseURI(baseURI string, subscriptionID string) DdosProtectionPlansClient { return DdosProtectionPlansClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -101,9 +103,8 @@ func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Conte // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -178,9 +179,8 @@ func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, reso // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -260,8 +260,7 @@ func (client DdosProtectionPlansClient) GetPreparer(ctx context.Context, resourc // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DdosProtectionPlansClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -333,8 +332,7 @@ func (client DdosProtectionPlansClient) ListPreparer(ctx context.Context) (*http // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DdosProtectionPlansClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -446,8 +444,7 @@ func (client DdosProtectionPlansClient) ListByResourceGroupPreparer(ctx context. // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client DdosProtectionPlansClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -557,9 +554,8 @@ func (client DdosProtectionPlansClient) UpdateTagsPreparer(ctx context.Context, // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client DdosProtectionPlansClient) UpdateTagsSender(req *http.Request) (future DdosProtectionPlansUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go index 0c38bd8fd24..9265ce27693 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go @@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDefaultSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) DefaultSecurityRulesClient { return DefaultSecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +104,7 @@ func (client DefaultSecurityRulesClient) GetPreparer(ctx context.Context, resour // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DefaultSecurityRulesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -180,8 +181,7 @@ func (client DefaultSecurityRulesClient) ListPreparer(ctx context.Context, resou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DefaultSecurityRulesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go index 7211b209a48..4777865f11d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go @@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo } // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// ExpressRouteCircuitAuthorizationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitAuthorizationsClient { return ExpressRouteCircuitAuthorizationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -104,9 +105,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -183,9 +183,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -267,8 +266,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(ctx context.Co // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitAuthorizationsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -345,8 +343,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(ctx context.C // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitAuthorizationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go index a27357867a9..9ff6529f50c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute } // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient -// client. +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). func NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -105,9 +106,8 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx co // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -186,9 +186,8 @@ func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Co // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -272,8 +271,7 @@ func (client ExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Conte // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -352,8 +350,7 @@ func (client ExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Cont // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go index 42e165667b9..9645fefdb72 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go @@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. +// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitPeeringsClient { return ExpressRouteCircuitPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -63,7 +65,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) @@ -113,9 +115,8 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -192,9 +193,8 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -276,8 +276,7 @@ func (client ExpressRouteCircuitPeeringsClient) GetPreparer(ctx context.Context, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitPeeringsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -354,8 +353,7 @@ func (client ExpressRouteCircuitPeeringsClient) ListPreparer(ctx context.Context // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitPeeringsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go index b54c9b0ca39..6089db21844 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go @@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. +// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitsClient { return ExpressRouteCircuitsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +100,8 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +176,8 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -257,8 +257,7 @@ func (client ExpressRouteCircuitsClient) GetPreparer(ctx context.Context, resour // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -336,8 +335,7 @@ func (client ExpressRouteCircuitsClient) GetPeeringStatsPreparer(ctx context.Con // GetPeeringStatsSender sends the GetPeeringStats request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) GetPeeringStatsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetPeeringStatsResponder handles the response to the GetPeeringStats request. The method always @@ -413,8 +411,7 @@ func (client ExpressRouteCircuitsClient) GetStatsPreparer(ctx context.Context, r // GetStatsSender sends the GetStats request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) GetStatsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetStatsResponder handles the response to the GetStats request. The method always @@ -489,8 +486,7 @@ func (client ExpressRouteCircuitsClient) ListPreparer(ctx context.Context, resou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -599,8 +595,7 @@ func (client ExpressRouteCircuitsClient) ListAllPreparer(ctx context.Context) (* // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -711,9 +706,8 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex // ListArpTableSender sends the ListArpTable request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -793,9 +787,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con // ListRoutesTableSender sends the ListRoutesTable request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -875,9 +868,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont // ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -955,9 +947,8 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context, // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go index 6e30029ed5f..5f68a3567d0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go @@ -36,7 +36,9 @@ func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnect return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client. +// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewExpressRouteConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteConnectionsClient { return ExpressRouteConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -108,9 +110,8 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdatePreparer(ctx context.C // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteConnectionsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -187,9 +188,8 @@ func (client ExpressRouteConnectionsClient) DeletePreparer(ctx context.Context, // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteConnectionsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -271,8 +271,7 @@ func (client ExpressRouteConnectionsClient) GetPreparer(ctx context.Context, res // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -348,8 +347,7 @@ func (client ExpressRouteConnectionsClient) ListPreparer(ctx context.Context, re // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go index c0b32ea762d..afbad2436d6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go @@ -38,7 +38,8 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) Express } // NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCrossConnectionPeeringsClient client. +// ExpressRouteCrossConnectionPeeringsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionPeeringsClient { return ExpressRouteCrossConnectionPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -66,7 +67,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) @@ -115,9 +116,8 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(c // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -194,9 +194,8 @@ func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx conte // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -278,8 +277,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) GetPreparer(ctx context. // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionPeeringsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -356,8 +354,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) ListPreparer(ctx context // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionPeeringsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go index 71bff3a1512..17b5c2b19db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go @@ -36,7 +36,8 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCr } // NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient -// client. +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). func NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient { return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -99,9 +100,8 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx cont // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -182,8 +182,7 @@ func (client ExpressRouteCrossConnectionsClient) GetPreparer(ctx context.Context // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -255,8 +254,7 @@ func (client ExpressRouteCrossConnectionsClient) ListPreparer(ctx context.Contex // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -368,9 +366,8 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx contex // ListArpTableSender sends the ListArpTable request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListArpTableFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -450,8 +447,7 @@ func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupPreparer(ctx // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -563,9 +559,8 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx con // ListRoutesTableSender sends the ListRoutesTable request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -645,9 +640,8 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer( // ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -725,9 +719,8 @@ func (client ExpressRouteCrossConnectionsClient) UpdateTagsPreparer(ctx context. // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteCrossConnectionsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCrossConnectionsUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go index 77c3777c5c0..8759ccf752e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go @@ -36,7 +36,9 @@ func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysCl return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client. +// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewExpressRouteGatewaysClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteGatewaysClient { return ExpressRouteGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -106,9 +108,8 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteGatewaysCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -184,9 +185,8 @@ func (client ExpressRouteGatewaysClient) DeletePreparer(ctx context.Context, res // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteGatewaysClient) DeleteSender(req *http.Request) (future ExpressRouteGatewaysDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -266,8 +266,7 @@ func (client ExpressRouteGatewaysClient) GetPreparer(ctx context.Context, resour // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -341,8 +340,7 @@ func (client ExpressRouteGatewaysClient) ListByResourceGroupPreparer(ctx context // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteGatewaysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -413,8 +411,7 @@ func (client ExpressRouteGatewaysClient) ListBySubscriptionPreparer(ctx context. // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteGatewaysClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go index f295fafc24e..630607dc87d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go @@ -35,7 +35,9 @@ func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient { return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client. +// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewExpressRouteLinksClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteLinksClient { return ExpressRouteLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +104,7 @@ func (client ExpressRouteLinksClient) GetPreparer(ctx context.Context, resourceG // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteLinksClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -180,8 +181,7 @@ func (client ExpressRouteLinksClient) ListPreparer(ctx context.Context, resource // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteLinksClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go index 1c5547cdee7..24319267a55 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient { return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client. +// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewExpressRoutePortsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortsClient { return ExpressRoutePortsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +100,8 @@ func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ExpressRoutePortsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRoutePortsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +176,8 @@ func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resour // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ExpressRoutePortsClient) DeleteSender(req *http.Request) (future ExpressRoutePortsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -257,8 +257,7 @@ func (client ExpressRoutePortsClient) GetPreparer(ctx context.Context, resourceG // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRoutePortsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -330,8 +329,7 @@ func (client ExpressRoutePortsClient) ListPreparer(ctx context.Context) (*http.R // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRoutePortsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -443,8 +441,7 @@ func (client ExpressRoutePortsClient) ListByResourceGroupPreparer(ctx context.Co // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ExpressRoutePortsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -554,9 +551,8 @@ func (client ExpressRoutePortsClient) UpdateTagsPreparer(ctx context.Context, re // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client ExpressRoutePortsClient) UpdateTagsSender(req *http.Request) (future ExpressRoutePortsUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go index 7e07586b4db..c688c98e059 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go @@ -35,7 +35,9 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePort return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client. +// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewExpressRoutePortsLocationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortsLocationsClient { return ExpressRoutePortsLocationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -99,8 +101,7 @@ func (client ExpressRoutePortsLocationsClient) GetPreparer(ctx context.Context, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ExpressRoutePortsLocationsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -173,8 +174,7 @@ func (client ExpressRoutePortsLocationsClient) ListPreparer(ctx context.Context) // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRoutePortsLocationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go index e50a7843006..262a38bad3b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go @@ -36,7 +36,8 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteSe } // NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient -// client. +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -97,8 +98,7 @@ func (client ExpressRouteServiceProvidersClient) ListPreparer(ctx context.Contex // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ExpressRouteServiceProvidersClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go index a15914a1543..bb43fc93317 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go @@ -35,7 +35,9 @@ func NewFirewallPoliciesClient(subscriptionID string) FirewallPoliciesClient { return NewFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallPoliciesClientWithBaseURI creates an instance of the FirewallPoliciesClient client. +// NewFirewallPoliciesClientWithBaseURI creates an instance of the FirewallPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) FirewallPoliciesClient { return FirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +100,8 @@ func (client FirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client FirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (future FirewallPoliciesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +176,8 @@ func (client FirewallPoliciesClient) DeletePreparer(ctx context.Context, resourc // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client FirewallPoliciesClient) DeleteSender(req *http.Request) (future FirewallPoliciesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -261,8 +261,7 @@ func (client FirewallPoliciesClient) GetPreparer(ctx context.Context, resourceGr // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client FirewallPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -337,8 +336,7 @@ func (client FirewallPoliciesClient) ListPreparer(ctx context.Context, resourceG // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client FirewallPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -447,8 +445,7 @@ func (client FirewallPoliciesClient) ListAllPreparer(ctx context.Context) (*http // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client FirewallPoliciesClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -564,8 +561,7 @@ func (client FirewallPoliciesClient) UpdateTagsPreparer(ctx context.Context, res // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client FirewallPoliciesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go index 989c3d1635d..a7e13ab452e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go @@ -36,7 +36,9 @@ func NewFirewallPolicyRuleGroupsClient(subscriptionID string) FirewallPolicyRule return NewFirewallPolicyRuleGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client. +// NewFirewallPolicyRuleGroupsClientWithBaseURI creates an instance of the FirewallPolicyRuleGroupsClient client using +// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewFirewallPolicyRuleGroupsClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyRuleGroupsClient { return FirewallPolicyRuleGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -63,7 +65,7 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdate(ctx context.Context, Constraints: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMaximum, Rule: int64(65000), Chain: nil}, - {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: 100, Chain: nil}, + {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: int64(100), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", err.Error()) @@ -113,9 +115,8 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdatePreparer(ctx context. // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client FirewallPolicyRuleGroupsClient) CreateOrUpdateSender(req *http.Request) (future FirewallPolicyRuleGroupsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -192,9 +193,8 @@ func (client FirewallPolicyRuleGroupsClient) DeletePreparer(ctx context.Context, // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client FirewallPolicyRuleGroupsClient) DeleteSender(req *http.Request) (future FirewallPolicyRuleGroupsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -276,8 +276,7 @@ func (client FirewallPolicyRuleGroupsClient) GetPreparer(ctx context.Context, re // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client FirewallPolicyRuleGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -354,8 +353,7 @@ func (client FirewallPolicyRuleGroupsClient) ListPreparer(ctx context.Context, r // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client FirewallPolicyRuleGroupsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go index 4535ac1ebd1..6bf6d94f0eb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go @@ -36,7 +36,8 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetw } // NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient -// client. +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). func NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient { return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -103,8 +104,7 @@ func (client HubVirtualNetworkConnectionsClient) GetPreparer(ctx context.Context // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client HubVirtualNetworkConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -181,8 +181,7 @@ func (client HubVirtualNetworkConnectionsClient) ListPreparer(ctx context.Contex // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client HubVirtualNetworkConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go index 0f05a47e393..41f109bbe89 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go @@ -36,7 +36,8 @@ func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInboundNatRulesClientWithBaseURI(baseURI string, subscriptionID string) InboundNatRulesClient { return InboundNatRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -120,9 +121,8 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (future InboundNatRulesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -199,9 +199,8 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client InboundNatRulesClient) DeleteSender(req *http.Request) (future InboundNatRulesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -287,8 +286,7 @@ func (client InboundNatRulesClient) GetPreparer(ctx context.Context, resourceGro // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client InboundNatRulesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -365,8 +363,7 @@ func (client InboundNatRulesClient) ListPreparer(ctx context.Context, resourceGr // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client InboundNatRulesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go index 51832734299..879c23b8cec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go @@ -35,7 +35,9 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfig return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewInterfaceIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceIPConfigurationsClient { return InterfaceIPConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +104,7 @@ func (client InterfaceIPConfigurationsClient) GetPreparer(ctx context.Context, r // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client InterfaceIPConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -180,8 +181,7 @@ func (client InterfaceIPConfigurationsClient) ListPreparer(ctx context.Context, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client InterfaceIPConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go index 75a6aa9e325..50434af08de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go @@ -35,7 +35,9 @@ func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalance return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewInterfaceLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) InterfaceLoadBalancersClient { return InterfaceLoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -101,8 +103,7 @@ func (client InterfaceLoadBalancersClient) ListPreparer(ctx context.Context, res // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client InterfaceLoadBalancersClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go index be36ebebf82..865ff564fb9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go @@ -35,7 +35,8 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. +// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { return InterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -97,9 +98,8 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -174,9 +174,8 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -260,8 +259,7 @@ func (client InterfacesClient) GetPreparer(ctx context.Context, resourceGroupNam // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -331,9 +329,8 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex // GetEffectiveRouteTableSender sends the GetEffectiveRouteTable request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -425,8 +422,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationPreparer( // GetVirtualMachineScaleSetIPConfigurationSender sends the GetVirtualMachineScaleSetIPConfiguration request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetVirtualMachineScaleSetIPConfigurationResponder handles the response to the GetVirtualMachineScaleSetIPConfiguration request. The method always @@ -510,8 +506,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfacePreparer // GetVirtualMachineScaleSetNetworkInterfaceSender sends the GetVirtualMachineScaleSetNetworkInterface request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetVirtualMachineScaleSetNetworkInterfaceResponder handles the response to the GetVirtualMachineScaleSetNetworkInterface request. The method always @@ -586,8 +581,7 @@ func (client InterfacesClient) ListPreparer(ctx context.Context, resourceGroupNa // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -696,8 +690,7 @@ func (client InterfacesClient) ListAllPreparer(ctx context.Context) (*http.Reque // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -804,9 +797,8 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co // ListEffectiveNetworkSecurityGroupsSender sends the ListEffectiveNetworkSecurityGroups request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -897,8 +889,7 @@ func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsPrepare // ListVirtualMachineScaleSetIPConfigurationsSender sends the ListVirtualMachineScaleSetIPConfigurations request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListVirtualMachineScaleSetIPConfigurationsResponder handles the response to the ListVirtualMachineScaleSetIPConfigurations request. The method always @@ -1012,8 +1003,7 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesPrepar // ListVirtualMachineScaleSetNetworkInterfacesSender sends the ListVirtualMachineScaleSetNetworkInterfaces request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListVirtualMachineScaleSetNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetNetworkInterfaces request. The method always @@ -1130,8 +1120,7 @@ func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesPrep // ListVirtualMachineScaleSetVMNetworkInterfacesSender sends the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListVirtualMachineScaleSetVMNetworkInterfacesResponder handles the response to the ListVirtualMachineScaleSetVMNetworkInterfaces request. The method always @@ -1241,9 +1230,8 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future InterfacesUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go index ca11aecf166..fdd5f43b095 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go @@ -36,7 +36,9 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConf return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client. +// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewInterfaceTapConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceTapConfigurationsClient { return InterfaceTapConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -136,9 +138,8 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdatePreparer(ctx contex // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client InterfaceTapConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future InterfaceTapConfigurationsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -215,9 +216,8 @@ func (client InterfaceTapConfigurationsClient) DeletePreparer(ctx context.Contex // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client InterfaceTapConfigurationsClient) DeleteSender(req *http.Request) (future InterfaceTapConfigurationsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -299,8 +299,7 @@ func (client InterfaceTapConfigurationsClient) GetPreparer(ctx context.Context, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client InterfaceTapConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -377,8 +376,7 @@ func (client InterfaceTapConfigurationsClient) ListPreparer(ctx context.Context, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client InterfaceTapConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go index 0f7c54d714c..bdf93fadfad 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go @@ -36,7 +36,8 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalance } // NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient -// client. +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). func NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -103,8 +104,7 @@ func (client LoadBalancerBackendAddressPoolsClient) GetPreparer(ctx context.Cont // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancerBackendAddressPoolsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -181,8 +181,7 @@ func (client LoadBalancerBackendAddressPoolsClient) ListPreparer(ctx context.Con // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancerBackendAddressPoolsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go index eb2e34cf936..f6fc524ed5a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go @@ -37,7 +37,8 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBa } // NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the -// LoadBalancerFrontendIPConfigurationsClient client. +// LoadBalancerFrontendIPConfigurationsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerFrontendIPConfigurationsClient { return LoadBalancerFrontendIPConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -104,8 +105,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) GetPreparer(ctx context // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancerFrontendIPConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -182,8 +182,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) ListPreparer(ctx contex // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancerFrontendIPConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go index 96d493f8efd..f3af8009d3b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go @@ -36,7 +36,8 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancer } // NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient -// client. +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). func NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -103,8 +104,7 @@ func (client LoadBalancerLoadBalancingRulesClient) GetPreparer(ctx context.Conte // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancerLoadBalancingRulesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -181,8 +181,7 @@ func (client LoadBalancerLoadBalancingRulesClient) ListPreparer(ctx context.Cont // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancerLoadBalancingRulesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go index 7b8a52bdbf4..84947bb17c7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go @@ -36,7 +36,8 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerN } // NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient -// client. +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). func NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +103,7 @@ func (client LoadBalancerNetworkInterfacesClient) ListPreparer(ctx context.Conte // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancerNetworkInterfacesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go index 550f2980c6b..7ef578d8f81 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go @@ -35,7 +35,9 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutbo return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client. +// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewLoadBalancerOutboundRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerOutboundRulesClient { return LoadBalancerOutboundRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +104,7 @@ func (client LoadBalancerOutboundRulesClient) GetPreparer(ctx context.Context, r // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancerOutboundRulesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -180,8 +181,7 @@ func (client LoadBalancerOutboundRulesClient) ListPreparer(ctx context.Context, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancerOutboundRulesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go index 4f872bde255..977dcb00e2f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go @@ -35,7 +35,9 @@ func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewLoadBalancerProbesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerProbesClient { return LoadBalancerProbesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +104,7 @@ func (client LoadBalancerProbesClient) GetPreparer(ctx context.Context, resource // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancerProbesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -180,8 +181,7 @@ func (client LoadBalancerProbesClient) ListPreparer(ctx context.Context, resourc // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancerProbesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go index 2897a040892..7c373eb55ce 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go @@ -35,7 +35,8 @@ func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. +// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancersClient { return LoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -97,9 +98,8 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -174,9 +174,8 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -260,8 +259,7 @@ func (client LoadBalancersClient) GetPreparer(ctx context.Context, resourceGroup // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancersClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -336,8 +334,7 @@ func (client LoadBalancersClient) ListPreparer(ctx context.Context, resourceGrou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancersClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -446,8 +443,7 @@ func (client LoadBalancersClient) ListAllPreparer(ctx context.Context) (*http.Re // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancersClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -557,9 +553,8 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go index 5a08cb4216d..0f438358602 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go @@ -36,7 +36,9 @@ func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysCl return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. +// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewLocalNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) LocalNetworkGatewaysClient { return LocalNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -106,9 +108,8 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -189,9 +190,8 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -277,8 +277,7 @@ func (client LocalNetworkGatewaysClient) GetPreparer(ctx context.Context, resour // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client LocalNetworkGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -353,8 +352,7 @@ func (client LocalNetworkGatewaysClient) ListPreparer(ctx context.Context, resou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LocalNetworkGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -470,9 +468,8 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context, // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go index 49f667bf9a3..c5d93eac225 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go @@ -23123,8 +23123,8 @@ type PrivateLinkServiceConnectionState struct { Status *string `json:"status,omitempty"` // Description - The reason for approval/rejection of the connection. Description *string `json:"description,omitempty"` - // ActionRequired - A message indicating if changes on the service provider require any updates on the consumer. - ActionRequired *string `json:"actionRequired,omitempty"` + // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *string `json:"actionsRequired,omitempty"` } // PrivateLinkServiceIPConfiguration the private link service ip configuration. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go index 97e31a4ffc7..aa99dbc4ccb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go @@ -35,7 +35,8 @@ func NewNatGatewaysClient(subscriptionID string) NatGatewaysClient { return NewNatGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient client. +// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNatGatewaysClientWithBaseURI(baseURI string, subscriptionID string) NatGatewaysClient { return NatGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -97,9 +98,8 @@ func (client NatGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client NatGatewaysClient) CreateOrUpdateSender(req *http.Request) (future NatGatewaysCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -174,9 +174,8 @@ func (client NatGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client NatGatewaysClient) DeleteSender(req *http.Request) (future NatGatewaysDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -260,8 +259,7 @@ func (client NatGatewaysClient) GetPreparer(ctx context.Context, resourceGroupNa // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client NatGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -336,8 +334,7 @@ func (client NatGatewaysClient) ListPreparer(ctx context.Context, resourceGroupN // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client NatGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -446,8 +443,7 @@ func (client NatGatewaysClient) ListAllPreparer(ctx context.Context) (*http.Requ // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client NatGatewaysClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -563,8 +559,7 @@ func (client NatGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client NatGatewaysClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go index 588855d36b3..760f8b77312 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -92,8 +93,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go index e7537aad486..409be904d93 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go @@ -35,7 +35,8 @@ func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient { return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client. +// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewP2sVpnGatewaysClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnGatewaysClient { return P2sVpnGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +99,8 @@ func (client P2sVpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, r // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future P2sVpnGatewaysCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +175,8 @@ func (client P2sVpnGatewaysClient) DeletePreparer(ctx context.Context, resourceG // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnGatewaysClient) DeleteSender(req *http.Request) (future P2sVpnGatewaysDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -254,9 +253,8 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfilePreparer(ctx context.Contex // GenerateVpnProfileSender sends the GenerateVpnProfile request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future P2sVpnGatewaysGenerateVpnProfileFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -337,8 +335,7 @@ func (client P2sVpnGatewaysClient) GetPreparer(ctx context.Context, resourceGrou // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -409,9 +406,8 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthPreparer(ctx context // GetP2sVpnConnectionHealthSender sends the GetP2sVpnConnectionHealth request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthSender(req *http.Request) (future P2sVpnGatewaysGetP2sVpnConnectionHealthFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -488,8 +484,7 @@ func (client P2sVpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Requ // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -601,8 +596,7 @@ func (client P2sVpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Conte // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnGatewaysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -712,9 +706,8 @@ func (client P2sVpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resou // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnGatewaysClient) UpdateTagsSender(req *http.Request) (future P2sVpnGatewaysUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go index e1cc2d0abc5..f51d562a8e6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go @@ -35,7 +35,9 @@ func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConf return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client. +// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnServerConfigurationsClient { return P2sVpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -101,9 +103,8 @@ func (client P2sVpnServerConfigurationsClient) CreateOrUpdatePreparer(ctx contex // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnServerConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future P2sVpnServerConfigurationsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -180,9 +181,8 @@ func (client P2sVpnServerConfigurationsClient) DeletePreparer(ctx context.Contex // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnServerConfigurationsClient) DeleteSender(req *http.Request) (future P2sVpnServerConfigurationsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -264,8 +264,7 @@ func (client P2sVpnServerConfigurationsClient) GetPreparer(ctx context.Context, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnServerConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -342,8 +341,7 @@ func (client P2sVpnServerConfigurationsClient) ListByVirtualWanPreparer(ctx cont // ListByVirtualWanSender sends the ListByVirtualWan request. The method will close the // http.Response Body if it receives an error. func (client P2sVpnServerConfigurationsClient) ListByVirtualWanSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByVirtualWanResponder handles the response to the ListByVirtualWan request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go index b6661c05640..2d8408f5add 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go @@ -36,7 +36,8 @@ func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. +// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPacketCapturesClientWithBaseURI(baseURI string, subscriptionID string) PacketCapturesClient { return PacketCapturesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -109,9 +110,8 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG // CreateSender sends the Create request. The method will close the // http.Response Body if it receives an error. func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -188,9 +188,8 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -272,8 +271,7 @@ func (client PacketCapturesClient) GetPreparer(ctx context.Context, resourceGrou // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client PacketCapturesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -345,9 +343,8 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour // GetStatusSender sends the GetStatus request. The method will close the // http.Response Body if it receives an error. func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -428,8 +425,7 @@ func (client PacketCapturesClient) ListPreparer(ctx context.Context, resourceGro // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client PacketCapturesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -501,9 +497,8 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro // StopSender sends the Stop request. The method will close the // http.Response Body if it receives an error. func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go index 14a291ff3b2..300bbdee4ac 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go @@ -37,7 +37,8 @@ func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpr } // NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the -// PeerExpressRouteCircuitConnectionsClient client. +// PeerExpressRouteCircuitConnectionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PeerExpressRouteCircuitConnectionsClient { return PeerExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -106,8 +107,7 @@ func (client PeerExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.C // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client PeerExpressRouteCircuitConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -186,8 +186,7 @@ func (client PeerExpressRouteCircuitConnectionsClient) ListPreparer(ctx context. // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client PeerExpressRouteCircuitConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go index d2a9b848938..2fb5f307b60 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go @@ -35,7 +35,9 @@ func NewPrivateEndpointsClient(subscriptionID string) PrivateEndpointsClient { return NewPrivateEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient client. +// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPrivateEndpointsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointsClient { return PrivateEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -97,9 +99,8 @@ func (client PrivateEndpointsClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client PrivateEndpointsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -174,9 +175,8 @@ func (client PrivateEndpointsClient) DeletePreparer(ctx context.Context, resourc // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client PrivateEndpointsClient) DeleteSender(req *http.Request) (future PrivateEndpointsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -260,8 +260,7 @@ func (client PrivateEndpointsClient) GetPreparer(ctx context.Context, resourceGr // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client PrivateEndpointsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -336,8 +335,7 @@ func (client PrivateEndpointsClient) ListPreparer(ctx context.Context, resourceG // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client PrivateEndpointsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -446,8 +444,7 @@ func (client PrivateEndpointsClient) ListBySubscriptionPreparer(ctx context.Cont // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client PrivateEndpointsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go index 98ed330c4f6..3562ec31d87 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go @@ -35,7 +35,9 @@ func NewPrivateLinkServicesClient(subscriptionID string) PrivateLinkServicesClie return NewPrivateLinkServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient client. +// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPrivateLinkServicesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkServicesClient { return PrivateLinkServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -101,8 +103,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityPrepare // CheckPrivateLinkServiceVisibilitySender sends the CheckPrivateLinkServiceVisibility request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilitySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckPrivateLinkServiceVisibilityResponder handles the response to the CheckPrivateLinkServiceVisibility request. The method always @@ -181,8 +182,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou // CheckPrivateLinkServiceVisibilityByResourceGroupSender sends the CheckPrivateLinkServiceVisibilityByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckPrivateLinkServiceVisibilityByResourceGroupResponder handles the response to the CheckPrivateLinkServiceVisibilityByResourceGroup request. The method always @@ -255,9 +255,8 @@ func (client PrivateLinkServicesClient) CreateOrUpdatePreparer(ctx context.Conte // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkServicesClient) CreateOrUpdateSender(req *http.Request) (future PrivateLinkServicesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -332,9 +331,8 @@ func (client PrivateLinkServicesClient) DeletePreparer(ctx context.Context, reso // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkServicesClient) DeleteSender(req *http.Request) (future PrivateLinkServicesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -410,9 +408,8 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionPreparer( // DeletePrivateEndpointConnectionSender sends the DeletePrivateEndpointConnection request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionSender(req *http.Request) (future PrivateLinkServicesDeletePrivateEndpointConnectionFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -496,8 +493,7 @@ func (client PrivateLinkServicesClient) GetPreparer(ctx context.Context, resourc // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkServicesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -572,8 +568,7 @@ func (client PrivateLinkServicesClient) ListPreparer(ctx context.Context, resour // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkServicesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -686,8 +681,7 @@ func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesPrepa // ListAutoApprovedPrivateLinkServicesSender sends the ListAutoApprovedPrivateLinkServices request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAutoApprovedPrivateLinkServicesResponder handles the response to the ListAutoApprovedPrivateLinkServices request. The method always @@ -802,8 +796,7 @@ func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByRes // ListAutoApprovedPrivateLinkServicesByResourceGroupSender sends the ListAutoApprovedPrivateLinkServicesByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAutoApprovedPrivateLinkServicesByResourceGroupResponder handles the response to the ListAutoApprovedPrivateLinkServicesByResourceGroup request. The method always @@ -912,8 +905,7 @@ func (client PrivateLinkServicesClient) ListBySubscriptionPreparer(ctx context.C // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkServicesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -1034,8 +1026,7 @@ func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionPreparer( // UpdatePrivateEndpointConnectionSender sends the UpdatePrivateEndpointConnection request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdatePrivateEndpointConnectionResponder handles the response to the UpdatePrivateEndpointConnection request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go index 876800a52f7..1065bca51a2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go @@ -35,7 +35,8 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. +// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) ProfilesClient { return ProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -103,8 +104,7 @@ func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourc // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ProfilesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -174,9 +174,8 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -260,8 +259,7 @@ func (client ProfilesClient) GetPreparer(ctx context.Context, resourceGroupName // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ProfilesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -336,8 +334,7 @@ func (client ProfilesClient) ListPreparer(ctx context.Context, resourceGroupName // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ProfilesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -446,8 +443,7 @@ func (client ProfilesClient) ListAllPreparer(ctx context.Context) (*http.Request // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client ProfilesClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -563,8 +559,7 @@ func (client ProfilesClient) UpdateTagsPreparer(ctx context.Context, resourceGro // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client ProfilesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go index 89e48d9cd56..fc38f44ddcd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go @@ -36,7 +36,9 @@ func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. +// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPublicIPAddressesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPAddressesClient { return PublicIPAddressesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -109,9 +111,8 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -186,9 +187,8 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -272,8 +272,7 @@ func (client PublicIPAddressesClient) GetPreparer(ctx context.Context, resourceG // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -361,8 +360,7 @@ func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressPr // GetVirtualMachineScaleSetPublicIPAddressSender sends the GetVirtualMachineScaleSetPublicIPAddress request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetVirtualMachineScaleSetPublicIPAddressResponder handles the response to the GetVirtualMachineScaleSetPublicIPAddress request. The method always @@ -437,8 +435,7 @@ func (client PublicIPAddressesClient) ListPreparer(ctx context.Context, resource // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -547,8 +544,7 @@ func (client PublicIPAddressesClient) ListAllPreparer(ctx context.Context) (*htt // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -663,8 +659,7 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresse // ListVirtualMachineScaleSetPublicIPAddressesSender sends the ListVirtualMachineScaleSetPublicIPAddresses request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListVirtualMachineScaleSetPublicIPAddressesResponder handles the response to the ListVirtualMachineScaleSetPublicIPAddresses request. The method always @@ -785,8 +780,7 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddres // ListVirtualMachineScaleSetVMPublicIPAddressesSender sends the ListVirtualMachineScaleSetVMPublicIPAddresses request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListVirtualMachineScaleSetVMPublicIPAddressesResponder handles the response to the ListVirtualMachineScaleSetVMPublicIPAddresses request. The method always @@ -896,9 +890,8 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go index 307dc426ac0..c4ca5fb5dcc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go @@ -35,7 +35,9 @@ func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient { return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client. +// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPublicIPPrefixesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPPrefixesClient { return PublicIPPrefixesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -97,9 +99,8 @@ func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client PublicIPPrefixesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPPrefixesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -174,9 +175,8 @@ func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourc // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client PublicIPPrefixesClient) DeleteSender(req *http.Request) (future PublicIPPrefixesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -260,8 +260,7 @@ func (client PublicIPPrefixesClient) GetPreparer(ctx context.Context, resourceGr // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client PublicIPPrefixesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -336,8 +335,7 @@ func (client PublicIPPrefixesClient) ListPreparer(ctx context.Context, resourceG // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client PublicIPPrefixesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -446,8 +444,7 @@ func (client PublicIPPrefixesClient) ListAllPreparer(ctx context.Context) (*http // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client PublicIPPrefixesClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -557,9 +554,8 @@ func (client PublicIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, res // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client PublicIPPrefixesClient) UpdateTagsSender(req *http.Request) (future PublicIPPrefixesUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go index 489f7abeeae..af9de96b585 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go @@ -35,7 +35,9 @@ func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationL return NewResourceNavigationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient client. +// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewResourceNavigationLinksClientWithBaseURI(baseURI string, subscriptionID string) ResourceNavigationLinksClient { return ResourceNavigationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +104,7 @@ func (client ResourceNavigationLinksClient) ListPreparer(ctx context.Context, re // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ResourceNavigationLinksClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go index e31ba18c89a..4dcb6313a6a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go @@ -36,7 +36,9 @@ func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. +// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewRouteFilterRulesClientWithBaseURI(baseURI string, subscriptionID string) RouteFilterRulesClient { return RouteFilterRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -110,9 +112,8 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -189,9 +190,8 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -273,8 +273,7 @@ func (client RouteFilterRulesClient) GetPreparer(ctx context.Context, resourceGr // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client RouteFilterRulesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -351,8 +350,7 @@ func (client RouteFilterRulesClient) ListByRouteFilterPreparer(ctx context.Conte // ListByRouteFilterSender sends the ListByRouteFilter request. The method will close the // http.Response Body if it receives an error. func (client RouteFilterRulesClient) ListByRouteFilterSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByRouteFilterResponder handles the response to the ListByRouteFilter request. The method always @@ -466,9 +464,8 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go index 3dcc02fb418..9fa46f80884 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go @@ -35,7 +35,8 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. +// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRouteFiltersClientWithBaseURI(baseURI string, subscriptionID string) RouteFiltersClient { return RouteFiltersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +99,8 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +175,8 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -261,8 +260,7 @@ func (client RouteFiltersClient) GetPreparer(ctx context.Context, resourceGroupN // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client RouteFiltersClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -334,8 +332,7 @@ func (client RouteFiltersClient) ListPreparer(ctx context.Context) (*http.Reques // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client RouteFiltersClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -447,8 +444,7 @@ func (client RouteFiltersClient) ListByResourceGroupPreparer(ctx context.Context // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client RouteFiltersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -561,9 +557,8 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go index 937a076f0db..683a73c5857 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go @@ -35,7 +35,8 @@ func NewRoutesClient(subscriptionID string) RoutesClient { return NewRoutesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client. +// NewRoutesClientWithBaseURI creates an instance of the RoutesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRoutesClientWithBaseURI(baseURI string, subscriptionID string) RoutesClient { return RoutesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -99,9 +100,8 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -178,9 +178,8 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -262,8 +261,7 @@ func (client RoutesClient) GetPreparer(ctx context.Context, resourceGroupName st // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client RoutesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -340,8 +338,7 @@ func (client RoutesClient) ListPreparer(ctx context.Context, resourceGroupName s // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client RoutesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go index a66a1e05198..8c1e0a73993 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go @@ -35,7 +35,8 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. +// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRouteTablesClientWithBaseURI(baseURI string, subscriptionID string) RouteTablesClient { return RouteTablesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -97,9 +98,8 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -174,9 +174,8 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -260,8 +259,7 @@ func (client RouteTablesClient) GetPreparer(ctx context.Context, resourceGroupNa // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client RouteTablesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -336,8 +334,7 @@ func (client RouteTablesClient) ListPreparer(ctx context.Context, resourceGroupN // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client RouteTablesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -446,8 +443,7 @@ func (client RouteTablesClient) ListAllPreparer(ctx context.Context) (*http.Requ // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client RouteTablesClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -557,9 +553,8 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go index 84a24cee467..d50d4e1b145 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go @@ -35,7 +35,8 @@ func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. +// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) SecurityGroupsClient { return SecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -97,9 +98,8 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -174,9 +174,8 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -260,8 +259,7 @@ func (client SecurityGroupsClient) GetPreparer(ctx context.Context, resourceGrou // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client SecurityGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -336,8 +334,7 @@ func (client SecurityGroupsClient) ListPreparer(ctx context.Context, resourceGro // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client SecurityGroupsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -446,8 +443,7 @@ func (client SecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.R // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client SecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -557,9 +553,8 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go index 1dbcf670338..8ac672da35e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go @@ -35,7 +35,8 @@ func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. +// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) SecurityRulesClient { return SecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -99,9 +100,8 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -178,9 +178,8 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -262,8 +261,7 @@ func (client SecurityRulesClient) GetPreparer(ctx context.Context, resourceGroup // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client SecurityRulesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -340,8 +338,7 @@ func (client SecurityRulesClient) ListPreparer(ctx context.Context, resourceGrou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client SecurityRulesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go index 2f20bb324ed..30e88928f7c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go @@ -35,7 +35,9 @@ func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationL return NewServiceAssociationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient client. +// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewServiceAssociationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServiceAssociationLinksClient { return ServiceAssociationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +104,7 @@ func (client ServiceAssociationLinksClient) ListPreparer(ctx context.Context, re // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ServiceAssociationLinksClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go index 09c5054b7e6..6ca72e59370 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go @@ -35,7 +35,9 @@ func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoli return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client. +// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewServiceEndpointPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServiceEndpointPoliciesClient { return ServiceEndpointPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -97,9 +99,8 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdatePreparer(ctx context.C // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ServiceEndpointPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPoliciesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -174,9 +175,8 @@ func (client ServiceEndpointPoliciesClient) DeletePreparer(ctx context.Context, // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ServiceEndpointPoliciesClient) DeleteSender(req *http.Request) (future ServiceEndpointPoliciesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -260,8 +260,7 @@ func (client ServiceEndpointPoliciesClient) GetPreparer(ctx context.Context, res // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ServiceEndpointPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -333,8 +332,7 @@ func (client ServiceEndpointPoliciesClient) ListPreparer(ctx context.Context) (* // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ServiceEndpointPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -446,8 +444,7 @@ func (client ServiceEndpointPoliciesClient) ListByResourceGroupPreparer(ctx cont // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ServiceEndpointPoliciesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -557,9 +554,8 @@ func (client ServiceEndpointPoliciesClient) UpdatePreparer(ctx context.Context, // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client ServiceEndpointPoliciesClient) UpdateSender(req *http.Request) (future ServiceEndpointPoliciesUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go index fd7a8bcc27f..d819d08ec2e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go @@ -36,7 +36,8 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEnd } // NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the -// ServiceEndpointPolicyDefinitionsClient client. +// ServiceEndpointPolicyDefinitionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceEndpointPolicyDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) ServiceEndpointPolicyDefinitionsClient { return ServiceEndpointPolicyDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -101,9 +102,8 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdatePreparer(ctx // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -180,9 +180,8 @@ func (client ServiceEndpointPolicyDefinitionsClient) DeletePreparer(ctx context. // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ServiceEndpointPolicyDefinitionsClient) DeleteSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -264,8 +263,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) GetPreparer(ctx context.Con // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ServiceEndpointPolicyDefinitionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -342,8 +340,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupPreparer // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go index f7d39cf5565..7c1ecee5395 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go @@ -35,7 +35,8 @@ func NewServiceTagsClient(subscriptionID string) ServiceTagsClient { return NewServiceTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient client. +// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewServiceTagsClientWithBaseURI(baseURI string, subscriptionID string) ServiceTagsClient { return ServiceTagsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -100,8 +101,7 @@ func (client ServiceTagsClient) ListPreparer(ctx context.Context, location strin // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ServiceTagsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go index a2f917cad06..1839538c5ed 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go @@ -35,7 +35,8 @@ func NewSubnetsClient(subscriptionID string) SubnetsClient { return NewSubnetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client. +// NewSubnetsClientWithBaseURI creates an instance of the SubnetsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSubnetsClientWithBaseURI(baseURI string, subscriptionID string) SubnetsClient { return SubnetsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -99,9 +100,8 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -178,9 +178,8 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -266,8 +265,7 @@ func (client SubnetsClient) GetPreparer(ctx context.Context, resourceGroupName s // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client SubnetsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -344,8 +342,7 @@ func (client SubnetsClient) ListPreparer(ctx context.Context, resourceGroupName // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client SubnetsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -458,9 +455,8 @@ func (client SubnetsClient) PrepareNetworkPoliciesPreparer(ctx context.Context, // PrepareNetworkPoliciesSender sends the PrepareNetworkPolicies request. The method will close the // http.Response Body if it receives an error. func (client SubnetsClient) PrepareNetworkPoliciesSender(req *http.Request) (future SubnetsPrepareNetworkPoliciesFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -540,9 +536,8 @@ func (client SubnetsClient) UnprepareNetworkPoliciesPreparer(ctx context.Context // UnprepareNetworkPoliciesSender sends the UnprepareNetworkPolicies request. The method will close the // http.Response Body if it receives an error. func (client SubnetsClient) UnprepareNetworkPoliciesSender(req *http.Request) (future SubnetsUnprepareNetworkPoliciesFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go index 69e4fba8a00..a73e8b911c2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -106,8 +107,7 @@ func (client UsagesClient) ListPreparer(ctx context.Context, location string) (* // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client UsagesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go index 3b472ba57e6..74c7d35e831 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " network/2019-06-01" + return "Azure-SDK-For-Go/" + Version() + " network/2019-06-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go index 6a86528d1ad..16fdbc9ef55 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go @@ -35,7 +35,8 @@ func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient { return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client. +// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualHubsClientWithBaseURI(baseURI string, subscriptionID string) VirtualHubsClient { return VirtualHubsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +99,8 @@ func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, reso // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualHubsClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +175,8 @@ func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGrou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualHubsClient) DeleteSender(req *http.Request) (future VirtualHubsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -257,8 +256,7 @@ func (client VirtualHubsClient) GetPreparer(ctx context.Context, resourceGroupNa // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualHubsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -330,8 +328,7 @@ func (client VirtualHubsClient) ListPreparer(ctx context.Context) (*http.Request // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualHubsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -443,8 +440,7 @@ func (client VirtualHubsClient) ListByResourceGroupPreparer(ctx context.Context, // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client VirtualHubsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -554,9 +550,8 @@ func (client VirtualHubsClient) UpdateTagsPreparer(ctx context.Context, resource // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client VirtualHubsClient) UpdateTagsSender(req *http.Request) (future VirtualHubsUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go index 7875cf5ea19..b0a58ff25b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go @@ -37,7 +37,8 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNet } // NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// VirtualNetworkGatewayConnectionsClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewayConnectionsClient { return VirtualNetworkGatewayConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -112,9 +113,8 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -189,9 +189,8 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context. // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -271,8 +270,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetPreparer(ctx context.Con // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -349,8 +347,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx co // GetSharedKeySender sends the GetSharedKey request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetSharedKeyResponder handles the response to the GetSharedKey request. The method always @@ -426,8 +423,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ListPreparer(ctx context.Co // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -503,7 +499,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } @@ -549,9 +545,8 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx // ResetSharedKeySender sends the ResetSharedKey request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -638,9 +633,8 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co // SetSharedKeySender sends the SetSharedKey request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -718,9 +712,8 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go index cd31f47b633..c841611e5d0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go @@ -36,7 +36,9 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewa return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. +// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewVirtualNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewaysClient { return VirtualNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -104,9 +106,8 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -181,9 +182,8 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -261,9 +261,8 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx // GeneratevpnclientpackageSender sends the Generatevpnclientpackage request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *http.Request) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -342,9 +341,8 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex // GenerateVpnProfileSender sends the GenerateVpnProfile request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -425,8 +423,7 @@ func (client VirtualNetworkGatewaysClient) GetPreparer(ctx context.Context, reso // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -499,9 +496,8 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte // GetAdvertisedRoutesSender sends the GetAdvertisedRoutes request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -580,9 +576,8 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context. // GetBgpPeerStatusSender sends the GetBgpPeerStatus request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -658,9 +653,8 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context. // GetLearnedRoutesSender sends the GetLearnedRoutes request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -736,9 +730,8 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthPreparer( // GetVpnclientConnectionHealthSender sends the GetVpnclientConnectionHealth request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -815,9 +808,8 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(c // GetVpnclientIpsecParametersSender sends the GetVpnclientIpsecParameters request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -893,9 +885,8 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c // GetVpnProfilePackageURLSender sends the GetVpnProfilePackageURL request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -975,8 +966,7 @@ func (client VirtualNetworkGatewaysClient) ListPreparer(ctx context.Context, res // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -1090,8 +1080,7 @@ func (client VirtualNetworkGatewaysClient) ListConnectionsPreparer(ctx context.C // ListConnectionsSender sends the ListConnections request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) ListConnectionsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListConnectionsResponder handles the response to the ListConnections request. The method always @@ -1203,9 +1192,8 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re // ResetSender sends the Reset request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1281,9 +1269,8 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyPreparer(ctx c // ResetVpnClientSharedKeySender sends the ResetVpnClientSharedKey request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeySender(req *http.Request) (future VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1369,9 +1356,8 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(c // SetVpnclientIpsecParametersSender sends the SetVpnclientIpsecParameters request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1452,8 +1438,7 @@ func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesPreparer(ctx conte // SupportedVpnDevicesSender sends the SupportedVpnDevices request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // SupportedVpnDevicesResponder handles the response to the SupportedVpnDevices request. The method always @@ -1526,9 +1511,8 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1613,8 +1597,7 @@ func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptPreparer( // VpnDeviceConfigurationScriptSender sends the VpnDeviceConfigurationScript request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // VpnDeviceConfigurationScriptResponder handles the response to the VpnDeviceConfigurationScript request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go index fe6d6b5435a..bd0380b24fa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go @@ -35,7 +35,9 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeerin return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. +// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewVirtualNetworkPeeringsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkPeeringsClient { return VirtualNetworkPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -100,9 +102,8 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -179,9 +180,8 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -263,8 +263,7 @@ func (client VirtualNetworkPeeringsClient) GetPreparer(ctx context.Context, reso // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkPeeringsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -341,8 +340,7 @@ func (client VirtualNetworkPeeringsClient) ListPreparer(ctx context.Context, res // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkPeeringsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go index 023a9e8600b..48350c1d1a1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go @@ -35,7 +35,8 @@ func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. +// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworksClient { return VirtualNetworksClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +103,7 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityPreparer(ctx conte // CheckIPAddressAvailabilitySender sends the CheckIPAddressAvailability request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) CheckIPAddressAvailabilitySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckIPAddressAvailabilityResponder handles the response to the CheckIPAddressAvailability request. The method always @@ -176,9 +176,8 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -253,9 +252,8 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -339,8 +337,7 @@ func (client VirtualNetworksClient) GetPreparer(ctx context.Context, resourceGro // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -415,8 +412,7 @@ func (client VirtualNetworksClient) ListPreparer(ctx context.Context, resourceGr // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -525,8 +521,7 @@ func (client VirtualNetworksClient) ListAllPreparer(ctx context.Context) (*http. // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -640,8 +635,7 @@ func (client VirtualNetworksClient) ListUsagePreparer(ctx context.Context, resou // ListUsageSender sends the ListUsage request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) ListUsageSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListUsageResponder handles the response to the ListUsage request. The method always @@ -751,9 +745,8 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go index 98756f901db..d92b7724cb8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go @@ -36,7 +36,9 @@ func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client. +// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVirtualNetworkTapsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkTapsClient { return VirtualNetworkTapsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -129,9 +131,8 @@ func (client VirtualNetworkTapsClient) CreateOrUpdatePreparer(ctx context.Contex // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkTapsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkTapsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -206,9 +207,8 @@ func (client VirtualNetworkTapsClient) DeletePreparer(ctx context.Context, resou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkTapsClient) DeleteSender(req *http.Request) (future VirtualNetworkTapsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -288,8 +288,7 @@ func (client VirtualNetworkTapsClient) GetPreparer(ctx context.Context, resource // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkTapsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -361,8 +360,7 @@ func (client VirtualNetworkTapsClient) ListAllPreparer(ctx context.Context) (*ht // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkTapsClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -474,8 +472,7 @@ func (client VirtualNetworkTapsClient) ListByResourceGroupPreparer(ctx context.C // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkTapsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -585,9 +582,8 @@ func (client VirtualNetworkTapsClient) UpdateTagsPreparer(ctx context.Context, r // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkTapsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkTapsUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go index 8f07a0cf22d..afbb5e75ee5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go @@ -35,7 +35,8 @@ func NewVirtualWansClient(subscriptionID string) VirtualWansClient { return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client. +// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVirtualWansClientWithBaseURI(baseURI string, subscriptionID string) VirtualWansClient { return VirtualWansClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +99,8 @@ func (client VirtualWansClient) CreateOrUpdatePreparer(ctx context.Context, reso // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VirtualWansClient) CreateOrUpdateSender(req *http.Request) (future VirtualWansCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +175,8 @@ func (client VirtualWansClient) DeletePreparer(ctx context.Context, resourceGrou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VirtualWansClient) DeleteSender(req *http.Request) (future VirtualWansDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -257,8 +256,7 @@ func (client VirtualWansClient) GetPreparer(ctx context.Context, resourceGroupNa // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VirtualWansClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -330,8 +328,7 @@ func (client VirtualWansClient) ListPreparer(ctx context.Context) (*http.Request // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VirtualWansClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -443,8 +440,7 @@ func (client VirtualWansClient) ListByResourceGroupPreparer(ctx context.Context, // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client VirtualWansClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -554,9 +550,8 @@ func (client VirtualWansClient) UpdateTagsPreparer(ctx context.Context, resource // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client VirtualWansClient) UpdateTagsSender(req *http.Request) (future VirtualWansUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go index 37ff6797c29..df32537c53d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go @@ -35,7 +35,8 @@ func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient { return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client. +// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVpnConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnConnectionsClient { return VpnConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -101,9 +102,8 @@ func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, r // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VpnConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VpnConnectionsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -180,9 +180,8 @@ func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceG // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VpnConnectionsClient) DeleteSender(req *http.Request) (future VpnConnectionsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -264,8 +263,7 @@ func (client VpnConnectionsClient) GetPreparer(ctx context.Context, resourceGrou // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VpnConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -342,8 +340,7 @@ func (client VpnConnectionsClient) ListByVpnGatewayPreparer(ctx context.Context, // ListByVpnGatewaySender sends the ListByVpnGateway request. The method will close the // http.Response Body if it receives an error. func (client VpnConnectionsClient) ListByVpnGatewaySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByVpnGatewayResponder handles the response to the ListByVpnGateway request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go index ab7bd39c304..7b62842cf7b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go @@ -35,7 +35,8 @@ func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient { return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client. +// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVpnGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VpnGatewaysClient { return VpnGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +99,8 @@ func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VpnGatewaysCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +175,8 @@ func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VpnGatewaysClient) DeleteSender(req *http.Request) (future VpnGatewaysDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -257,8 +256,7 @@ func (client VpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupNa // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VpnGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -330,8 +328,7 @@ func (client VpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VpnGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -443,8 +440,7 @@ func (client VpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Context, // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client VpnGatewaysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -551,9 +547,8 @@ func (client VpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGroup // ResetSender sends the Reset request. The method will close the // http.Response Body if it receives an error. func (client VpnGatewaysClient) ResetSender(req *http.Request) (future VpnGatewaysResetFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -631,9 +626,8 @@ func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client VpnGatewaysClient) UpdateTagsSender(req *http.Request) (future VpnGatewaysUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go index 3e8da0eec67..994d65ea56f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go @@ -35,7 +35,9 @@ func NewVpnLinkConnectionsClient(subscriptionID string) VpnLinkConnectionsClient return NewVpnLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnLinkConnectionsClientWithBaseURI creates an instance of the VpnLinkConnectionsClient client. +// NewVpnLinkConnectionsClientWithBaseURI creates an instance of the VpnLinkConnectionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewVpnLinkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnLinkConnectionsClient { return VpnLinkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -103,8 +105,7 @@ func (client VpnLinkConnectionsClient) ListByVpnConnectionPreparer(ctx context.C // ListByVpnConnectionSender sends the ListByVpnConnection request. The method will close the // http.Response Body if it receives an error. func (client VpnLinkConnectionsClient) ListByVpnConnectionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByVpnConnectionResponder handles the response to the ListByVpnConnection request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go index 5ded318f622..040fe4f0908 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go @@ -35,7 +35,9 @@ func NewVpnSiteLinkConnectionsClient(subscriptionID string) VpnSiteLinkConnectio return NewVpnSiteLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSiteLinkConnectionsClientWithBaseURI creates an instance of the VpnSiteLinkConnectionsClient client. +// NewVpnSiteLinkConnectionsClientWithBaseURI creates an instance of the VpnSiteLinkConnectionsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewVpnSiteLinkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnSiteLinkConnectionsClient { return VpnSiteLinkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -104,8 +106,7 @@ func (client VpnSiteLinkConnectionsClient) GetPreparer(ctx context.Context, reso // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VpnSiteLinkConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go index e84e41efb2f..e29d38557fd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go @@ -35,7 +35,8 @@ func NewVpnSiteLinksClient(subscriptionID string) VpnSiteLinksClient { return NewVpnSiteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSiteLinksClientWithBaseURI creates an instance of the VpnSiteLinksClient client. +// NewVpnSiteLinksClientWithBaseURI creates an instance of the VpnSiteLinksClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVpnSiteLinksClientWithBaseURI(baseURI string, subscriptionID string) VpnSiteLinksClient { return VpnSiteLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +103,7 @@ func (client VpnSiteLinksClient) GetPreparer(ctx context.Context, resourceGroupN // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VpnSiteLinksClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -180,8 +180,7 @@ func (client VpnSiteLinksClient) ListByVpnSitePreparer(ctx context.Context, reso // ListByVpnSiteSender sends the ListByVpnSite request. The method will close the // http.Response Body if it receives an error. func (client VpnSiteLinksClient) ListByVpnSiteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByVpnSiteResponder handles the response to the ListByVpnSite request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go index 99f004ea198..b8ccbd91b52 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go @@ -35,7 +35,8 @@ func NewVpnSitesClient(subscriptionID string) VpnSitesClient { return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client. +// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVpnSitesClientWithBaseURI(baseURI string, subscriptionID string) VpnSitesClient { return VpnSitesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,9 +99,8 @@ func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourc // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client VpnSitesClient) CreateOrUpdateSender(req *http.Request) (future VpnSitesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -175,9 +175,8 @@ func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupNa // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client VpnSitesClient) DeleteSender(req *http.Request) (future VpnSitesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -257,8 +256,7 @@ func (client VpnSitesClient) GetPreparer(ctx context.Context, resourceGroupName // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client VpnSitesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -330,8 +328,7 @@ func (client VpnSitesClient) ListPreparer(ctx context.Context) (*http.Request, e // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client VpnSitesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -443,8 +440,7 @@ func (client VpnSitesClient) ListByResourceGroupPreparer(ctx context.Context, re // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client VpnSitesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -554,9 +550,8 @@ func (client VpnSitesClient) UpdateTagsPreparer(ctx context.Context, resourceGro // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client VpnSitesClient) UpdateTagsSender(req *http.Request) (future VpnSitesUpdateTagsFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go index 65d1a24ff3d..2c03500d611 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go @@ -36,7 +36,9 @@ func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfiguration return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client. +// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewVpnSitesConfigurationClientWithBaseURI(baseURI string, subscriptionID string) VpnSitesConfigurationClient { return VpnSitesConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -104,9 +106,8 @@ func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context, // DownloadSender sends the Download request. The method will close the // http.Response Body if it receives an error. func (client VpnSitesConfigurationClient) DownloadSender(req *http.Request) (future VpnSitesConfigurationDownloadFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go index e330a1b979b..bd9125a5072 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go @@ -36,7 +36,8 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. +// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWatchersClientWithBaseURI(baseURI string, subscriptionID string) WatchersClient { return WatchersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -107,9 +108,8 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso // CheckConnectivitySender sends the CheckConnectivity request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) CheckConnectivitySender(req *http.Request) (future WatchersCheckConnectivityFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -193,8 +193,7 @@ func (client WatchersClient) CreateOrUpdatePreparer(ctx context.Context, resourc // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -264,9 +263,8 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -346,8 +344,7 @@ func (client WatchersClient) GetPreparer(ctx context.Context, resourceGroupName // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -430,9 +427,8 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont // GetAzureReachabilityReportSender sends the GetAzureReachabilityReport request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request) (future WatchersGetAzureReachabilityReportFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -516,9 +512,8 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou // GetFlowLogStatusSender sends the GetFlowLogStatus request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -603,9 +598,8 @@ func (client WatchersClient) GetNetworkConfigurationDiagnosticPreparer(ctx conte // GetNetworkConfigurationDiagnosticSender sends the GetNetworkConfigurationDiagnostic request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) GetNetworkConfigurationDiagnosticSender(req *http.Request) (future WatchersGetNetworkConfigurationDiagnosticFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -691,9 +685,8 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro // GetNextHopSender sends the GetNextHop request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -777,8 +770,7 @@ func (client WatchersClient) GetTopologyPreparer(ctx context.Context, resourceGr // GetTopologySender sends the GetTopology request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) GetTopologySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetTopologyResponder handles the response to the GetTopology request. The method always @@ -861,9 +853,8 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res // GetTroubleshootingSender sends the GetTroubleshooting request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -947,9 +938,8 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex // GetTroubleshootingResultSender sends the GetTroubleshootingResult request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1033,9 +1023,8 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res // GetVMSecurityRulesSender sends the GetVMSecurityRules request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1114,8 +1103,7 @@ func (client WatchersClient) ListPreparer(ctx context.Context, resourceGroupName // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -1186,8 +1174,7 @@ func (client WatchersClient) ListAllPreparer(ctx context.Context) (*http.Request // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always @@ -1260,9 +1247,8 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context, // ListAvailableProvidersSender sends the ListAvailableProviders request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (future WatchersListAvailableProvidersFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1358,9 +1344,8 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context // SetFlowLogConfigurationSender sends the SetFlowLogConfiguration request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1444,8 +1429,7 @@ func (client WatchersClient) UpdateTagsPreparer(ctx context.Context, resourceGro // UpdateTagsSender sends the UpdateTags request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateTagsResponder handles the response to the UpdateTags request. The method always @@ -1528,9 +1512,8 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG // VerifyIPFlowSender sends the VerifyIPFlow request. The method will close the // http.Response Body if it receives an error. func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go index f250d223997..5e04b478354 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go @@ -37,7 +37,8 @@ func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicati } // NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient -// client. +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). func NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient { return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -111,8 +112,7 @@ func (client WebApplicationFirewallPoliciesClient) CreateOrUpdatePreparer(ctx co // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client WebApplicationFirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -188,9 +188,8 @@ func (client WebApplicationFirewallPoliciesClient) DeletePreparer(ctx context.Co // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client WebApplicationFirewallPoliciesClient) DeleteSender(req *http.Request) (future WebApplicationFirewallPoliciesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -276,8 +275,7 @@ func (client WebApplicationFirewallPoliciesClient) GetPreparer(ctx context.Conte // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client WebApplicationFirewallPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -352,8 +350,7 @@ func (client WebApplicationFirewallPoliciesClient) ListPreparer(ctx context.Cont // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client WebApplicationFirewallPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -462,8 +459,7 @@ func (client WebApplicationFirewallPoliciesClient) ListAllPreparer(ctx context.C // ListAllSender sends the ListAll request. The method will close the // http.Response Body if it receives an error. func (client WebApplicationFirewallPoliciesClient) ListAllSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAllResponder handles the response to the ListAll request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/client.go new file mode 100644 index 00000000000..c3f35599a77 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/client.go @@ -0,0 +1,52 @@ +// Package resources implements the Azure ARM Resources service API version 2017-05-10. +// +// Provides operations for working with resources and resource groups. +package resources + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Resources + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Resources. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deploymentoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deploymentoperations.go new file mode 100644 index 00000000000..cca1c62267d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deploymentoperations.go @@ -0,0 +1,264 @@ +package resources + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DeploymentOperationsClient is the provides operations for working with resources and resource groups. +type DeploymentOperationsClient struct { + BaseClient +} + +// NewDeploymentOperationsClient creates an instance of the DeploymentOperationsClient client. +func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsClient { + return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { + return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a deployments operation. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// deploymentName - the name of the deployment. +// operationID - the ID of the operation to get. +func (client DeploymentOperationsClient) Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result DeploymentOperation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: deploymentName, + Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.DeploymentOperationsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, deploymentName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DeploymentOperationsClient) GetPreparer(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": autorest.Encode("path", deploymentName), + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentOperationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DeploymentOperationsClient) GetResponder(resp *http.Response) (result DeploymentOperation, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all deployments operations for a deployment. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// deploymentName - the name of the deployment with the operation to get. +// top - the number of results to return. +func (client DeploymentOperationsClient) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result DeploymentOperationsListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.List") + defer func() { + sc := -1 + if result.dolr.Response.Response != nil { + sc = result.dolr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: deploymentName, + Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.DeploymentOperationsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, deploymentName, top) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.dolr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", resp, "Failure sending request") + return + } + + result.dolr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client DeploymentOperationsClient) ListPreparer(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": autorest.Encode("path", deploymentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentOperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DeploymentOperationsClient) ListResponder(resp *http.Response) (result DeploymentOperationsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client DeploymentOperationsClient) listNextResults(ctx context.Context, lastResults DeploymentOperationsListResult) (result DeploymentOperationsListResult, err error) { + req, err := lastResults.deploymentOperationsListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client DeploymentOperationsClient) ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result DeploymentOperationsListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, deploymentName, top) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go new file mode 100644 index 00000000000..3146ab9f26d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go @@ -0,0 +1,890 @@ +package resources + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DeploymentsClient is the provides operations for working with resources and resource groups. +type DeploymentsClient struct { + BaseClient +} + +// NewDeploymentsClient creates an instance of the DeploymentsClient client. +func NewDeploymentsClient(subscriptionID string) DeploymentsClient { + return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { + return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CalculateTemplateHash calculate the hash of the given template. +// Parameters: +// templateParameter - the template provided to calculate hash. +func (client DeploymentsClient) CalculateTemplateHash(ctx context.Context, templateParameter interface{}) (result TemplateHashResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CalculateTemplateHash") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CalculateTemplateHashPreparer(ctx, templateParameter) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", nil, "Failure preparing request") + return + } + + resp, err := client.CalculateTemplateHashSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", resp, "Failure sending request") + return + } + + result, err = client.CalculateTemplateHashResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", resp, "Failure responding to request") + } + + return +} + +// CalculateTemplateHashPreparer prepares the CalculateTemplateHash request. +func (client DeploymentsClient) CalculateTemplateHashPreparer(ctx context.Context, templateParameter interface{}) (*http.Request, error) { + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Resources/calculateTemplateHash"), + autorest.WithJSON(templateParameter), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CalculateTemplateHashSender sends the CalculateTemplateHash request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentsClient) CalculateTemplateHashSender(req *http.Request) (*http.Response, error) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// CalculateTemplateHashResponder handles the response to the CalculateTemplateHash request. The method always +// closes the http.Response Body. +func (client DeploymentsClient) CalculateTemplateHashResponder(resp *http.Response) (result TemplateHashResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Cancel you can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is +// canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running +// template deployment and leaves the resource group partially deployed. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// deploymentName - the name of the deployment to cancel. +func (client DeploymentsClient) Cancel(ctx context.Context, resourceGroupName string, deploymentName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.Cancel") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: deploymentName, + Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.DeploymentsClient", "Cancel", err.Error()) + } + + req, err := client.CancelPreparer(ctx, resourceGroupName, deploymentName) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", nil, "Failure preparing request") + return + } + + resp, err := client.CancelSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", resp, "Failure sending request") + return + } + + result, err = client.CancelResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", resp, "Failure responding to request") + } + + return +} + +// CancelPreparer prepares the Cancel request. +func (client DeploymentsClient) CancelPreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": autorest.Encode("path", deploymentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CancelSender sends the Cancel request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentsClient) CancelSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CancelResponder handles the response to the Cancel request. The method always +// closes the http.Response Body. +func (client DeploymentsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// CheckExistence checks whether the deployment exists. +// Parameters: +// resourceGroupName - the name of the resource group with the deployment to check. The name is case +// insensitive. +// deploymentName - the name of the deployment to check. +func (client DeploymentsClient) CheckExistence(ctx context.Context, resourceGroupName string, deploymentName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CheckExistence") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: deploymentName, + Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.DeploymentsClient", "CheckExistence", err.Error()) + } + + req, err := client.CheckExistencePreparer(ctx, resourceGroupName, deploymentName) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", nil, "Failure preparing request") + return + } + + resp, err := client.CheckExistenceSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", resp, "Failure sending request") + return + } + + result, err = client.CheckExistenceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", resp, "Failure responding to request") + } + + return +} + +// CheckExistencePreparer prepares the CheckExistence request. +func (client DeploymentsClient) CheckExistencePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": autorest.Encode("path", deploymentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsHead(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckExistenceSender sends the CheckExistence request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentsClient) CheckExistenceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckExistenceResponder handles the response to the CheckExistence request. The method always +// closes the http.Response Body. +func (client DeploymentsClient) CheckExistenceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateOrUpdate you can provide the template and parameters directly in the request or link to JSON files. +// Parameters: +// resourceGroupName - the name of the resource group to deploy the resources to. The name is case insensitive. +// The resource group must already exist. +// deploymentName - the name of the deployment. +// parameters - additional parameters supplied to the operation. +func (client DeploymentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (result DeploymentsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: deploymentName, + Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("resources.DeploymentsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, deploymentName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": autorest.Encode("path", deploymentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DeploymentsClient) CreateOrUpdateResponder(resp *http.Response) (result DeploymentExtended, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete a template deployment that is currently running cannot be deleted. Deleting a template deployment removes the +// associated deployment operations. Deleting a template deployment does not affect the state of the resource group. +// This is an asynchronous operation that returns a status of 202 until the template deployment is successfully +// deleted. The Location response header contains the URI that is used to obtain the status of the process. While the +// process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the +// URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the +// Location header returns an error-level status code. +// Parameters: +// resourceGroupName - the name of the resource group with the deployment to delete. The name is case +// insensitive. +// deploymentName - the name of the deployment to delete. +func (client DeploymentsClient) Delete(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: deploymentName, + Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.DeploymentsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, deploymentName) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": autorest.Encode("path", deploymentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DeploymentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// ExportTemplate exports the template used for specified deployment. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// deploymentName - the name of the deployment from which to get the template. +func (client DeploymentsClient) ExportTemplate(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentExportResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ExportTemplate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: deploymentName, + Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.DeploymentsClient", "ExportTemplate", err.Error()) + } + + req, err := client.ExportTemplatePreparer(ctx, resourceGroupName, deploymentName) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", nil, "Failure preparing request") + return + } + + resp, err := client.ExportTemplateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", resp, "Failure sending request") + return + } + + result, err = client.ExportTemplateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", resp, "Failure responding to request") + } + + return +} + +// ExportTemplatePreparer prepares the ExportTemplate request. +func (client DeploymentsClient) ExportTemplatePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": autorest.Encode("path", deploymentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ExportTemplateSender sends the ExportTemplate request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentsClient) ExportTemplateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ExportTemplateResponder handles the response to the ExportTemplate request. The method always +// closes the http.Response Body. +func (client DeploymentsClient) ExportTemplateResponder(resp *http.Response) (result DeploymentExportResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a deployment. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// deploymentName - the name of the deployment to get. +func (client DeploymentsClient) Get(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentExtended, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: deploymentName, + Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.DeploymentsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, deploymentName) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DeploymentsClient) GetPreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": autorest.Encode("path", deploymentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DeploymentsClient) GetResponder(resp *http.Response) (result DeploymentExtended, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup get all the deployments for a resource group. +// Parameters: +// resourceGroupName - the name of the resource group with the deployments to get. The name is case +// insensitive. +// filter - the filter to apply on the operation. For example, you can use $filter=provisioningState eq +// '{state}'. +// top - the number of results to get. If null is passed, returns all deployments. +func (client DeploymentsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result DeploymentListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.dlr.Response.Response != nil { + sc = result.dlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.DeploymentsClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, filter, top) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.dlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.dlr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client DeploymentsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string, top *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client DeploymentsClient) ListByResourceGroupResponder(resp *http.Response) (result DeploymentListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client DeploymentsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DeploymentListResult) (result DeploymentListResult, err error) { + req, err := lastResults.deploymentListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client DeploymentsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result DeploymentListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, filter, top) + return +} + +// Validate validates whether the specified template is syntactically correct and will be accepted by Azure Resource +// Manager.. +// Parameters: +// resourceGroupName - the name of the resource group the template will be deployed to. The name is case +// insensitive. +// deploymentName - the name of the deployment. +// parameters - parameters to validate. +func (client DeploymentsClient) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (result DeploymentValidateResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.Validate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: deploymentName, + Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("resources.DeploymentsClient", "Validate", err.Error()) + } + + req, err := client.ValidatePreparer(ctx, resourceGroupName, deploymentName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", nil, "Failure preparing request") + return + } + + resp, err := client.ValidateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", resp, "Failure sending request") + return + } + + result, err = client.ValidateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", resp, "Failure responding to request") + } + + return +} + +// ValidatePreparer prepares the Validate request. +func (client DeploymentsClient) ValidatePreparer(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": autorest.Encode("path", deploymentName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateSender sends the Validate request. The method will close the +// http.Response Body if it receives an error. +func (client DeploymentsClient) ValidateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ValidateResponder handles the response to the Validate request. The method always +// closes the http.Response Body. +func (client DeploymentsClient) ValidateResponder(resp *http.Response) (result DeploymentValidateResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go new file mode 100644 index 00000000000..2bf3bb986b3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go @@ -0,0 +1,665 @@ +package resources + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// GroupsClient is the provides operations for working with resources and resource groups. +type GroupsClient struct { + BaseClient +} + +// NewGroupsClient creates an instance of the GroupsClient client. +func NewGroupsClient(subscriptionID string) GroupsClient { + return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { + return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckExistence checks whether a resource group exists. +// Parameters: +// resourceGroupName - the name of the resource group to check. The name is case insensitive. +func (client GroupsClient) CheckExistence(ctx context.Context, resourceGroupName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.CheckExistence") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.GroupsClient", "CheckExistence", err.Error()) + } + + req, err := client.CheckExistencePreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", nil, "Failure preparing request") + return + } + + resp, err := client.CheckExistenceSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", resp, "Failure sending request") + return + } + + result, err = client.CheckExistenceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", resp, "Failure responding to request") + } + + return +} + +// CheckExistencePreparer prepares the CheckExistence request. +func (client GroupsClient) CheckExistencePreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsHead(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckExistenceSender sends the CheckExistence request. The method will close the +// http.Response Body if it receives an error. +func (client GroupsClient) CheckExistenceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckExistenceResponder handles the response to the CheckExistence request. The method always +// closes the http.Response Body. +func (client GroupsClient) CheckExistenceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateOrUpdate creates or updates a resource group. +// Parameters: +// resourceGroupName - the name of the resource group to create or update. +// parameters - parameters supplied to the create or update a resource group. +func (client GroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, parameters Group) (result Group, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.GroupsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client GroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, parameters Group) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.ID = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client GroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client GroupsClient) CreateOrUpdateResponder(resp *http.Response) (result Group, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete when you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes +// all of its template deployments and currently stored operations. +// Parameters: +// resourceGroupName - the name of the resource group to delete. The name is case insensitive. +func (client GroupsClient) Delete(ctx context.Context, resourceGroupName string) (result GroupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.GroupsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client GroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ExportTemplate captures the specified resource group as a template. +// Parameters: +// resourceGroupName - the name of the resource group to export as a template. +// parameters - parameters for exporting the template. +func (client GroupsClient) ExportTemplate(ctx context.Context, resourceGroupName string, parameters ExportTemplateRequest) (result GroupExportResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.ExportTemplate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.GroupsClient", "ExportTemplate", err.Error()) + } + + req, err := client.ExportTemplatePreparer(ctx, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ExportTemplate", nil, "Failure preparing request") + return + } + + resp, err := client.ExportTemplateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ExportTemplate", resp, "Failure sending request") + return + } + + result, err = client.ExportTemplateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ExportTemplate", resp, "Failure responding to request") + } + + return +} + +// ExportTemplatePreparer prepares the ExportTemplate request. +func (client GroupsClient) ExportTemplatePreparer(ctx context.Context, resourceGroupName string, parameters ExportTemplateRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ExportTemplateSender sends the ExportTemplate request. The method will close the +// http.Response Body if it receives an error. +func (client GroupsClient) ExportTemplateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ExportTemplateResponder handles the response to the ExportTemplate request. The method always +// closes the http.Response Body. +func (client GroupsClient) ExportTemplateResponder(resp *http.Response) (result GroupExportResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a resource group. +// Parameters: +// resourceGroupName - the name of the resource group to get. The name is case insensitive. +func (client GroupsClient) Get(ctx context.Context, resourceGroupName string) (result Group, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.GroupsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client GroupsClient) GetPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client GroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client GroupsClient) GetResponder(resp *http.Response) (result Group, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the resource groups for a subscription. +// Parameters: +// filter - the filter to apply on the operation. +// top - the number of results to return. If null is passed, returns all resource groups. +func (client GroupsClient) List(ctx context.Context, filter string, top *int32) (result GroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.List") + defer func() { + sc := -1 + if result.glr.Response.Response != nil { + sc = result.glr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, filter, top) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.glr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", resp, "Failure sending request") + return + } + + result.glr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client GroupsClient) ListPreparer(ctx context.Context, filter string, top *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client GroupsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client GroupsClient) ListResponder(resp *http.Response) (result GroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client GroupsClient) listNextResults(ctx context.Context, lastResults GroupListResult) (result GroupListResult, err error) { + req, err := lastResults.groupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "resources.GroupsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "resources.GroupsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client GroupsClient) ListComplete(ctx context.Context, filter string, top *int32) (result GroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, filter, top) + return +} + +// Update resource groups can be updated through a simple PATCH operation to a group address. The format of the request +// is the same as that for creating a resource group. If a field is unspecified, the current value is retained. +// Parameters: +// resourceGroupName - the name of the resource group to update. The name is case insensitive. +// parameters - parameters supplied to update a resource group. +func (client GroupsClient) Update(ctx context.Context, resourceGroupName string, parameters GroupPatchable) (result Group, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.GroupsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, parameters GroupPatchable) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client GroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GroupsClient) UpdateResponder(resp *http.Response) (result Group, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/models.go new file mode 100644 index 00000000000..9434555ff89 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/models.go @@ -0,0 +1,1854 @@ +package resources + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources" + +// DeploymentMode enumerates the values for deployment mode. +type DeploymentMode string + +const ( + // Complete ... + Complete DeploymentMode = "Complete" + // Incremental ... + Incremental DeploymentMode = "Incremental" +) + +// PossibleDeploymentModeValues returns an array of possible values for the DeploymentMode const type. +func PossibleDeploymentModeValues() []DeploymentMode { + return []DeploymentMode{Complete, Incremental} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // SystemAssigned ... + SystemAssigned ResourceIdentityType = "SystemAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{SystemAssigned} +} + +// AliasPathType the type of the paths for alias. +type AliasPathType struct { + // Path - The path of an alias. + Path *string `json:"path,omitempty"` + // APIVersions - The API versions. + APIVersions *[]string `json:"apiVersions,omitempty"` +} + +// AliasType the alias type. +type AliasType struct { + // Name - The alias name. + Name *string `json:"name,omitempty"` + // Paths - The paths for an alias. + Paths *[]AliasPathType `json:"paths,omitempty"` +} + +// BasicDependency deployment dependency information. +type BasicDependency struct { + // ID - The ID of the dependency. + ID *string `json:"id,omitempty"` + // ResourceType - The dependency resource type. + ResourceType *string `json:"resourceType,omitempty"` + // ResourceName - The dependency resource name. + ResourceName *string `json:"resourceName,omitempty"` +} + +// CloudError an error response for a resource management request. +type CloudError struct { + Error *ErrorResponse `json:"error,omitempty"` +} + +// CreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CreateOrUpdateByIDFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent { + gr, err = client.CreateOrUpdateByIDResponder(gr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request") + } + } + return +} + +// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type CreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *CreateOrUpdateFuture) Result(client Client) (gr GenericResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent { + gr, err = client.CreateOrUpdateResponder(gr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", gr.Response.Response, "Failure responding to request") + } + } + return +} + +// DebugSetting ... +type DebugSetting struct { + // DetailLevel - Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information you are passing in during deployment. By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations. + DetailLevel *string `json:"detailLevel,omitempty"` +} + +// DeleteByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type DeleteByIDFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DeleteByIDFuture) Result(client Client) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture") + return + } + ar.Response = future.Response() + return +} + +// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type DeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resources.DeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// Dependency deployment dependency information. +type Dependency struct { + // DependsOn - The list of dependencies. + DependsOn *[]BasicDependency `json:"dependsOn,omitempty"` + // ID - The ID of the dependency. + ID *string `json:"id,omitempty"` + // ResourceType - The dependency resource type. + ResourceType *string `json:"resourceType,omitempty"` + // ResourceName - The dependency resource name. + ResourceName *string `json:"resourceName,omitempty"` +} + +// Deployment deployment operation parameters. +type Deployment struct { + // Properties - The deployment properties. + Properties *DeploymentProperties `json:"properties,omitempty"` +} + +// DeploymentExportResult the deployment export result. +type DeploymentExportResult struct { + autorest.Response `json:"-"` + // Template - The template content. + Template interface{} `json:"template,omitempty"` +} + +// DeploymentExtended deployment information. +type DeploymentExtended struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; The ID of the deployment. + ID *string `json:"id,omitempty"` + // Name - The name of the deployment. + Name *string `json:"name,omitempty"` + // Properties - Deployment properties. + Properties *DeploymentPropertiesExtended `json:"properties,omitempty"` +} + +// DeploymentExtendedFilter deployment filter. +type DeploymentExtendedFilter struct { + // ProvisioningState - The provisioning state. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// DeploymentListResult list of deployments. +type DeploymentListResult struct { + autorest.Response `json:"-"` + // Value - An array of deployments. + Value *[]DeploymentExtended `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to use for getting the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// DeploymentListResultIterator provides access to a complete listing of DeploymentExtended values. +type DeploymentListResultIterator struct { + i int + page DeploymentListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *DeploymentListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *DeploymentListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DeploymentListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter DeploymentListResultIterator) Response() DeploymentListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter DeploymentListResultIterator) Value() DeploymentExtended { + if !iter.page.NotDone() { + return DeploymentExtended{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DeploymentListResultIterator type. +func NewDeploymentListResultIterator(page DeploymentListResultPage) DeploymentListResultIterator { + return DeploymentListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dlr DeploymentListResult) IsEmpty() bool { + return dlr.Value == nil || len(*dlr.Value) == 0 +} + +// deploymentListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dlr DeploymentListResult) deploymentListResultPreparer(ctx context.Context) (*http.Request, error) { + if dlr.NextLink == nil || len(to.String(dlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dlr.NextLink))) +} + +// DeploymentListResultPage contains a page of DeploymentExtended values. +type DeploymentListResultPage struct { + fn func(context.Context, DeploymentListResult) (DeploymentListResult, error) + dlr DeploymentListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *DeploymentListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.dlr) + if err != nil { + return err + } + page.dlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *DeploymentListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DeploymentListResultPage) NotDone() bool { + return !page.dlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DeploymentListResultPage) Response() DeploymentListResult { + return page.dlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DeploymentListResultPage) Values() []DeploymentExtended { + if page.dlr.IsEmpty() { + return nil + } + return *page.dlr.Value +} + +// Creates a new instance of the DeploymentListResultPage type. +func NewDeploymentListResultPage(getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage { + return DeploymentListResultPage{fn: getNextPage} +} + +// DeploymentOperation deployment operation information. +type DeploymentOperation struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Full deployment operation ID. + ID *string `json:"id,omitempty"` + // OperationID - READ-ONLY; Deployment operation ID. + OperationID *string `json:"operationId,omitempty"` + // Properties - Deployment properties. + Properties *DeploymentOperationProperties `json:"properties,omitempty"` +} + +// DeploymentOperationProperties deployment operation properties. +type DeploymentOperationProperties struct { + // ProvisioningState - READ-ONLY; The state of the provisioning. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Timestamp - READ-ONLY; The date and time of the operation. + Timestamp *date.Time `json:"timestamp,omitempty"` + // ServiceRequestID - READ-ONLY; Deployment operation service request id. + ServiceRequestID *string `json:"serviceRequestId,omitempty"` + // StatusCode - READ-ONLY; Operation status code. + StatusCode *string `json:"statusCode,omitempty"` + // StatusMessage - READ-ONLY; Operation status message. + StatusMessage interface{} `json:"statusMessage,omitempty"` + // TargetResource - READ-ONLY; The target resource. + TargetResource *TargetResource `json:"targetResource,omitempty"` + // Request - READ-ONLY; The HTTP request message. + Request *HTTPMessage `json:"request,omitempty"` + // Response - READ-ONLY; The HTTP response message. + Response *HTTPMessage `json:"response,omitempty"` +} + +// DeploymentOperationsListResult list of deployment operations. +type DeploymentOperationsListResult struct { + autorest.Response `json:"-"` + // Value - An array of deployment operations. + Value *[]DeploymentOperation `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to use for getting the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation +// values. +type DeploymentOperationsListResultIterator struct { + i int + page DeploymentOperationsListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *DeploymentOperationsListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *DeploymentOperationsListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter DeploymentOperationsListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter DeploymentOperationsListResultIterator) Response() DeploymentOperationsListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter DeploymentOperationsListResultIterator) Value() DeploymentOperation { + if !iter.page.NotDone() { + return DeploymentOperation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the DeploymentOperationsListResultIterator type. +func NewDeploymentOperationsListResultIterator(page DeploymentOperationsListResultPage) DeploymentOperationsListResultIterator { + return DeploymentOperationsListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (dolr DeploymentOperationsListResult) IsEmpty() bool { + return dolr.Value == nil || len(*dolr.Value) == 0 +} + +// deploymentOperationsListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (dolr DeploymentOperationsListResult) deploymentOperationsListResultPreparer(ctx context.Context) (*http.Request, error) { + if dolr.NextLink == nil || len(to.String(dolr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(dolr.NextLink))) +} + +// DeploymentOperationsListResultPage contains a page of DeploymentOperation values. +type DeploymentOperationsListResultPage struct { + fn func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error) + dolr DeploymentOperationsListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *DeploymentOperationsListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.dolr) + if err != nil { + return err + } + page.dolr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *DeploymentOperationsListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DeploymentOperationsListResultPage) NotDone() bool { + return !page.dolr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DeploymentOperationsListResultPage) Response() DeploymentOperationsListResult { + return page.dolr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DeploymentOperationsListResultPage) Values() []DeploymentOperation { + if page.dolr.IsEmpty() { + return nil + } + return *page.dolr.Value +} + +// Creates a new instance of the DeploymentOperationsListResultPage type. +func NewDeploymentOperationsListResultPage(getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage { + return DeploymentOperationsListResultPage{fn: getNextPage} +} + +// DeploymentProperties deployment properties. +type DeploymentProperties struct { + // Template - The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. + Template interface{} `json:"template,omitempty"` + // TemplateLink - The URI of the template. Use either the templateLink property or the template property, but not both. + TemplateLink *TemplateLink `json:"templateLink,omitempty"` + // Parameters - Name and value pairs that define the deployment parameters for the template. You use this element when you want to provide the parameter values directly in the request rather than link to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. It can be a JObject or a well formed JSON string. + Parameters interface{} `json:"parameters,omitempty"` + // ParametersLink - The URI of parameters file. You use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both. + ParametersLink *ParametersLink `json:"parametersLink,omitempty"` + // Mode - The mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, resources are deployed without deleting existing resources that are not included in the template. In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted. Be careful when using Complete mode as you may unintentionally delete resources. Possible values include: 'Incremental', 'Complete' + Mode DeploymentMode `json:"mode,omitempty"` + // DebugSetting - The debug setting of the deployment. + DebugSetting *DebugSetting `json:"debugSetting,omitempty"` +} + +// DeploymentPropertiesExtended deployment properties with additional details. +type DeploymentPropertiesExtended struct { + // ProvisioningState - READ-ONLY; The state of the provisioning. + ProvisioningState *string `json:"provisioningState,omitempty"` + // CorrelationID - READ-ONLY; The correlation ID of the deployment. + CorrelationID *string `json:"correlationId,omitempty"` + // Timestamp - READ-ONLY; The timestamp of the template deployment. + Timestamp *date.Time `json:"timestamp,omitempty"` + // Outputs - Key/value pairs that represent deployment output. + Outputs interface{} `json:"outputs,omitempty"` + // Providers - The list of resource providers needed for the deployment. + Providers *[]Provider `json:"providers,omitempty"` + // Dependencies - The list of deployment dependencies. + Dependencies *[]Dependency `json:"dependencies,omitempty"` + // Template - The template content. Use only one of Template or TemplateLink. + Template interface{} `json:"template,omitempty"` + // TemplateLink - The URI referencing the template. Use only one of Template or TemplateLink. + TemplateLink *TemplateLink `json:"templateLink,omitempty"` + // Parameters - Deployment parameters. Use only one of Parameters or ParametersLink. + Parameters interface{} `json:"parameters,omitempty"` + // ParametersLink - The URI referencing the parameters. Use only one of Parameters or ParametersLink. + ParametersLink *ParametersLink `json:"parametersLink,omitempty"` + // Mode - The deployment mode. Possible values are Incremental and Complete. Possible values include: 'Incremental', 'Complete' + Mode DeploymentMode `json:"mode,omitempty"` + // DebugSetting - The debug setting of the deployment. + DebugSetting *DebugSetting `json:"debugSetting,omitempty"` +} + +// DeploymentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DeploymentsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent { + de, err = client.CreateOrUpdateResponder(de.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request") + } + } + return +} + +// DeploymentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type DeploymentsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DeploymentValidateResult information from validate template deployment response. +type DeploymentValidateResult struct { + autorest.Response `json:"-"` + // Error - Validation error. + Error *ManagementErrorWithDetails `json:"error,omitempty"` + // Properties - The template deployment properties. + Properties *DeploymentPropertiesExtended `json:"properties,omitempty"` +} + +// ErrorAdditionalInfo the resource management error additional info. +type ErrorAdditionalInfo struct { + // Type - READ-ONLY; The additional info type. + Type *string `json:"type,omitempty"` + // Info - READ-ONLY; The additional info. + Info interface{} `json:"info,omitempty"` +} + +// ErrorResponse the resource management error response. +type ErrorResponse struct { + // Code - READ-ONLY; The error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; The error message. + Message *string `json:"message,omitempty"` + // Target - READ-ONLY; The error target. + Target *string `json:"target,omitempty"` + // Details - READ-ONLY; The error details. + Details *[]ErrorResponse `json:"details,omitempty"` + // AdditionalInfo - READ-ONLY; The error additional info. + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` +} + +// ExportTemplateRequest export resource group template request parameters. +type ExportTemplateRequest struct { + // ResourcesProperty - The IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'. + ResourcesProperty *[]string `json:"resources,omitempty"` + // Options - The export template options. A CSV-formatted list containing zero or more of the following: 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 'SkipAllParameterization' + Options *string `json:"options,omitempty"` +} + +// GenericResource resource information. +type GenericResource struct { + autorest.Response `json:"-"` + // Plan - The plan of the resource. + Plan *Plan `json:"plan,omitempty"` + // Properties - The resource properties. + Properties interface{} `json:"properties,omitempty"` + // Kind - The kind of the resource. + Kind *string `json:"kind,omitempty"` + // ManagedBy - ID of the resource that manages this resource. + ManagedBy *string `json:"managedBy,omitempty"` + // Sku - The SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Identity - The identity of the resource. + Identity *Identity `json:"identity,omitempty"` + // ID - READ-ONLY; Resource ID + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GenericResource. +func (gr GenericResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gr.Plan != nil { + objectMap["plan"] = gr.Plan + } + if gr.Properties != nil { + objectMap["properties"] = gr.Properties + } + if gr.Kind != nil { + objectMap["kind"] = gr.Kind + } + if gr.ManagedBy != nil { + objectMap["managedBy"] = gr.ManagedBy + } + if gr.Sku != nil { + objectMap["sku"] = gr.Sku + } + if gr.Identity != nil { + objectMap["identity"] = gr.Identity + } + if gr.Location != nil { + objectMap["location"] = gr.Location + } + if gr.Tags != nil { + objectMap["tags"] = gr.Tags + } + return json.Marshal(objectMap) +} + +// GenericResourceExpanded resource information. +type GenericResourceExpanded struct { + // CreatedTime - READ-ONLY; The created time of the resource. This is only present if requested via the $expand query parameter. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // ChangedTime - READ-ONLY; The changed time of the resource. This is only present if requested via the $expand query parameter. + ChangedTime *date.Time `json:"changedTime,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource. This is only present if requested via the $expand query parameter. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Plan - The plan of the resource. + Plan *Plan `json:"plan,omitempty"` + // Properties - The resource properties. + Properties interface{} `json:"properties,omitempty"` + // Kind - The kind of the resource. + Kind *string `json:"kind,omitempty"` + // ManagedBy - ID of the resource that manages this resource. + ManagedBy *string `json:"managedBy,omitempty"` + // Sku - The SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Identity - The identity of the resource. + Identity *Identity `json:"identity,omitempty"` + // ID - READ-ONLY; Resource ID + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GenericResourceExpanded. +func (gre GenericResourceExpanded) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gre.Plan != nil { + objectMap["plan"] = gre.Plan + } + if gre.Properties != nil { + objectMap["properties"] = gre.Properties + } + if gre.Kind != nil { + objectMap["kind"] = gre.Kind + } + if gre.ManagedBy != nil { + objectMap["managedBy"] = gre.ManagedBy + } + if gre.Sku != nil { + objectMap["sku"] = gre.Sku + } + if gre.Identity != nil { + objectMap["identity"] = gre.Identity + } + if gre.Location != nil { + objectMap["location"] = gre.Location + } + if gre.Tags != nil { + objectMap["tags"] = gre.Tags + } + return json.Marshal(objectMap) +} + +// GenericResourceFilter resource filter. +type GenericResourceFilter struct { + // ResourceType - The resource type. + ResourceType *string `json:"resourceType,omitempty"` + // Tagname - The tag name. + Tagname *string `json:"tagname,omitempty"` + // Tagvalue - The tag value. + Tagvalue *string `json:"tagvalue,omitempty"` +} + +// Group resource group information. +type Group struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; The ID of the resource group. + ID *string `json:"id,omitempty"` + // Name - The name of the resource group. + Name *string `json:"name,omitempty"` + Properties *GroupProperties `json:"properties,omitempty"` + // Location - The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations. + Location *string `json:"location,omitempty"` + // ManagedBy - The ID of the resource that manages this resource group. + ManagedBy *string `json:"managedBy,omitempty"` + // Tags - The tags attached to the resource group. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for Group. +func (g Group) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if g.Name != nil { + objectMap["name"] = g.Name + } + if g.Properties != nil { + objectMap["properties"] = g.Properties + } + if g.Location != nil { + objectMap["location"] = g.Location + } + if g.ManagedBy != nil { + objectMap["managedBy"] = g.ManagedBy + } + if g.Tags != nil { + objectMap["tags"] = g.Tags + } + return json.Marshal(objectMap) +} + +// GroupExportResult resource group export result. +type GroupExportResult struct { + autorest.Response `json:"-"` + // Template - The template content. + Template interface{} `json:"template,omitempty"` + // Error - The error. + Error *ManagementErrorWithDetails `json:"error,omitempty"` +} + +// GroupFilter resource group filter. +type GroupFilter struct { + // TagName - The tag name. + TagName *string `json:"tagName,omitempty"` + // TagValue - The tag value. + TagValue *string `json:"tagValue,omitempty"` +} + +// GroupListResult list of resource groups. +type GroupListResult struct { + autorest.Response `json:"-"` + // Value - An array of resource groups. + Value *[]Group `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to use for getting the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// GroupListResultIterator provides access to a complete listing of Group values. +type GroupListResultIterator struct { + i int + page GroupListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *GroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GroupListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *GroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter GroupListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter GroupListResultIterator) Response() GroupListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter GroupListResultIterator) Value() Group { + if !iter.page.NotDone() { + return Group{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the GroupListResultIterator type. +func NewGroupListResultIterator(page GroupListResultPage) GroupListResultIterator { + return GroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (glr GroupListResult) IsEmpty() bool { + return glr.Value == nil || len(*glr.Value) == 0 +} + +// groupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (glr GroupListResult) groupListResultPreparer(ctx context.Context) (*http.Request, error) { + if glr.NextLink == nil || len(to.String(glr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(glr.NextLink))) +} + +// GroupListResultPage contains a page of Group values. +type GroupListResultPage struct { + fn func(context.Context, GroupListResult) (GroupListResult, error) + glr GroupListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *GroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.glr) + if err != nil { + return err + } + page.glr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *GroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page GroupListResultPage) NotDone() bool { + return !page.glr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page GroupListResultPage) Response() GroupListResult { + return page.glr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page GroupListResultPage) Values() []Group { + if page.glr.IsEmpty() { + return nil + } + return *page.glr.Value +} + +// Creates a new instance of the GroupListResultPage type. +func NewGroupListResultPage(getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage { + return GroupListResultPage{fn: getNextPage} +} + +// GroupPatchable resource group information. +type GroupPatchable struct { + // Name - The name of the resource group. + Name *string `json:"name,omitempty"` + Properties *GroupProperties `json:"properties,omitempty"` + // ManagedBy - The ID of the resource that manages this resource group. + ManagedBy *string `json:"managedBy,omitempty"` + // Tags - The tags attached to the resource group. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GroupPatchable. +func (gp GroupPatchable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gp.Name != nil { + objectMap["name"] = gp.Name + } + if gp.Properties != nil { + objectMap["properties"] = gp.Properties + } + if gp.ManagedBy != nil { + objectMap["managedBy"] = gp.ManagedBy + } + if gp.Tags != nil { + objectMap["tags"] = gp.Tags + } + return json.Marshal(objectMap) +} + +// GroupProperties the resource group properties. +type GroupProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type GroupsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// HTTPMessage HTTP message. +type HTTPMessage struct { + // Content - HTTP message content. + Content interface{} `json:"content,omitempty"` +} + +// Identity identity for the resource. +type Identity struct { + // PrincipalID - READ-ONLY; The principal ID of resource identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant ID of resource. + TenantID *string `json:"tenantId,omitempty"` + // Type - The identity type. Possible values include: 'SystemAssigned' + Type ResourceIdentityType `json:"type,omitempty"` +} + +// ListResult list of resource groups. +type ListResult struct { + autorest.Response `json:"-"` + // Value - An array of resources. + Value *[]GenericResourceExpanded `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to use for getting the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListResultIterator provides access to a complete listing of GenericResourceExpanded values. +type ListResultIterator struct { + i int + page ListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ListResultIterator) Response() ListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListResultIterator) Value() GenericResourceExpanded { + if !iter.page.NotDone() { + return GenericResourceExpanded{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListResultIterator type. +func NewListResultIterator(page ListResultPage) ListResultIterator { + return ListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lr ListResult) IsEmpty() bool { + return lr.Value == nil || len(*lr.Value) == 0 +} + +// listResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) { + if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lr.NextLink))) +} + +// ListResultPage contains a page of GenericResourceExpanded values. +type ListResultPage struct { + fn func(context.Context, ListResult) (ListResult, error) + lr ListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.lr) + if err != nil { + return err + } + page.lr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListResultPage) NotDone() bool { + return !page.lr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListResultPage) Response() ListResult { + return page.lr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListResultPage) Values() []GenericResourceExpanded { + if page.lr.IsEmpty() { + return nil + } + return *page.lr.Value +} + +// Creates a new instance of the ListResultPage type. +func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { + return ListResultPage{fn: getNextPage} +} + +// ManagementErrorWithDetails the detailed error message of resource management. +type ManagementErrorWithDetails struct { + // Code - READ-ONLY; The error code returned when exporting the template. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; The error message describing the export error. + Message *string `json:"message,omitempty"` + // Target - READ-ONLY; The target of the error. + Target *string `json:"target,omitempty"` + // Details - READ-ONLY; Validation error. + Details *[]ManagementErrorWithDetails `json:"details,omitempty"` +} + +// MoveInfo parameters of move resources. +type MoveInfo struct { + // ResourcesProperty - The IDs of the resources. + ResourcesProperty *[]string `json:"resources,omitempty"` + // TargetResourceGroup - The target resource group. + TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` +} + +// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type MoveResourcesFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture") + return + } + ar.Response = future.Response() + return +} + +// ParametersLink entity representing the reference to the deployment parameters. +type ParametersLink struct { + // URI - The URI of the parameters file. + URI *string `json:"uri,omitempty"` + // ContentVersion - If included, must match the ContentVersion in the template. + ContentVersion *string `json:"contentVersion,omitempty"` +} + +// Plan plan for the resource. +type Plan struct { + // Name - The plan ID. + Name *string `json:"name,omitempty"` + // Publisher - The publisher ID. + Publisher *string `json:"publisher,omitempty"` + // Product - The offer ID. + Product *string `json:"product,omitempty"` + // PromotionCode - The promotion code. + PromotionCode *string `json:"promotionCode,omitempty"` + // Version - The plan's version. + Version *string `json:"version,omitempty"` +} + +// Provider resource provider information. +type Provider struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; The provider ID. + ID *string `json:"id,omitempty"` + // Namespace - The namespace of the resource provider. + Namespace *string `json:"namespace,omitempty"` + // RegistrationState - READ-ONLY; The registration state of the provider. + RegistrationState *string `json:"registrationState,omitempty"` + // ResourceTypes - READ-ONLY; The collection of provider resource types. + ResourceTypes *[]ProviderResourceType `json:"resourceTypes,omitempty"` +} + +// ProviderListResult list of resource providers. +type ProviderListResult struct { + autorest.Response `json:"-"` + // Value - An array of resource providers. + Value *[]Provider `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to use for getting the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProviderListResultIterator provides access to a complete listing of Provider values. +type ProviderListResultIterator struct { + i int + page ProviderListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProviderListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProviderListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProviderListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProviderListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProviderListResultIterator) Response() ProviderListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProviderListResultIterator) Value() Provider { + if !iter.page.NotDone() { + return Provider{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProviderListResultIterator type. +func NewProviderListResultIterator(page ProviderListResultPage) ProviderListResultIterator { + return ProviderListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (plr ProviderListResult) IsEmpty() bool { + return plr.Value == nil || len(*plr.Value) == 0 +} + +// providerListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (plr ProviderListResult) providerListResultPreparer(ctx context.Context) (*http.Request, error) { + if plr.NextLink == nil || len(to.String(plr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(plr.NextLink))) +} + +// ProviderListResultPage contains a page of Provider values. +type ProviderListResultPage struct { + fn func(context.Context, ProviderListResult) (ProviderListResult, error) + plr ProviderListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProviderListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProviderListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.plr) + if err != nil { + return err + } + page.plr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProviderListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProviderListResultPage) NotDone() bool { + return !page.plr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProviderListResultPage) Response() ProviderListResult { + return page.plr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProviderListResultPage) Values() []Provider { + if page.plr.IsEmpty() { + return nil + } + return *page.plr.Value +} + +// Creates a new instance of the ProviderListResultPage type. +func NewProviderListResultPage(getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage { + return ProviderListResultPage{fn: getNextPage} +} + +// ProviderOperationDisplayProperties resource provider operation's display properties. +type ProviderOperationDisplayProperties struct { + // Publisher - Operation description. + Publisher *string `json:"publisher,omitempty"` + // Provider - Operation provider. + Provider *string `json:"provider,omitempty"` + // Resource - Operation resource. + Resource *string `json:"resource,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Description - Operation description. + Description *string `json:"description,omitempty"` +} + +// ProviderResourceType resource type managed by the resource provider. +type ProviderResourceType struct { + // ResourceType - The resource type. + ResourceType *string `json:"resourceType,omitempty"` + // Locations - The collection of locations where this resource type can be created. + Locations *[]string `json:"locations,omitempty"` + // Aliases - The aliases that are supported by this resource type. + Aliases *[]AliasType `json:"aliases,omitempty"` + // APIVersions - The API version. + APIVersions *[]string `json:"apiVersions,omitempty"` + // Properties - The properties. + Properties map[string]*string `json:"properties"` +} + +// MarshalJSON is the custom marshaler for ProviderResourceType. +func (prt ProviderResourceType) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if prt.ResourceType != nil { + objectMap["resourceType"] = prt.ResourceType + } + if prt.Locations != nil { + objectMap["locations"] = prt.Locations + } + if prt.Aliases != nil { + objectMap["aliases"] = prt.Aliases + } + if prt.APIVersions != nil { + objectMap["apiVersions"] = prt.APIVersions + } + if prt.Properties != nil { + objectMap["properties"] = prt.Properties + } + return json.Marshal(objectMap) +} + +// Resource basic set of the resource properties. +type Resource struct { + // ID - READ-ONLY; Resource ID + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.Location != nil { + objectMap["location"] = r.Location + } + if r.Tags != nil { + objectMap["tags"] = r.Tags + } + return json.Marshal(objectMap) +} + +// Sku SKU for the resource. +type Sku struct { + // Name - The SKU name. + Name *string `json:"name,omitempty"` + // Tier - The SKU tier. + Tier *string `json:"tier,omitempty"` + // Size - The SKU size. + Size *string `json:"size,omitempty"` + // Family - The SKU family. + Family *string `json:"family,omitempty"` + // Model - The SKU model. + Model *string `json:"model,omitempty"` + // Capacity - The SKU capacity. + Capacity *int32 `json:"capacity,omitempty"` +} + +// SubResource sub-resource. +type SubResource struct { + // ID - Resource ID + ID *string `json:"id,omitempty"` +} + +// TagCount tag count. +type TagCount struct { + // Type - Type of count. + Type *string `json:"type,omitempty"` + // Value - Value of count. + Value *int32 `json:"value,omitempty"` +} + +// TagDetails tag details. +type TagDetails struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; The tag ID. + ID *string `json:"id,omitempty"` + // TagName - The tag name. + TagName *string `json:"tagName,omitempty"` + // Count - The total number of resources that use the resource tag. When a tag is initially created and has no associated resources, the value is 0. + Count *TagCount `json:"count,omitempty"` + // Values - The list of tag values. + Values *[]TagValue `json:"values,omitempty"` +} + +// TagsListResult list of subscription tags. +type TagsListResult struct { + autorest.Response `json:"-"` + // Value - An array of tags. + Value *[]TagDetails `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to use for getting the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// TagsListResultIterator provides access to a complete listing of TagDetails values. +type TagsListResultIterator struct { + i int + page TagsListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *TagsListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagsListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *TagsListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter TagsListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter TagsListResultIterator) Response() TagsListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter TagsListResultIterator) Value() TagDetails { + if !iter.page.NotDone() { + return TagDetails{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the TagsListResultIterator type. +func NewTagsListResultIterator(page TagsListResultPage) TagsListResultIterator { + return TagsListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (tlr TagsListResult) IsEmpty() bool { + return tlr.Value == nil || len(*tlr.Value) == 0 +} + +// tagsListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (tlr TagsListResult) tagsListResultPreparer(ctx context.Context) (*http.Request, error) { + if tlr.NextLink == nil || len(to.String(tlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(tlr.NextLink))) +} + +// TagsListResultPage contains a page of TagDetails values. +type TagsListResultPage struct { + fn func(context.Context, TagsListResult) (TagsListResult, error) + tlr TagsListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *TagsListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagsListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.tlr) + if err != nil { + return err + } + page.tlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *TagsListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page TagsListResultPage) NotDone() bool { + return !page.tlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page TagsListResultPage) Response() TagsListResult { + return page.tlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page TagsListResultPage) Values() []TagDetails { + if page.tlr.IsEmpty() { + return nil + } + return *page.tlr.Value +} + +// Creates a new instance of the TagsListResultPage type. +func NewTagsListResultPage(getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage { + return TagsListResultPage{fn: getNextPage} +} + +// TagValue tag information. +type TagValue struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; The tag ID. + ID *string `json:"id,omitempty"` + // TagValue - The tag value. + TagValue *string `json:"tagValue,omitempty"` + // Count - The tag value count. + Count *TagCount `json:"count,omitempty"` +} + +// TargetResource target resource. +type TargetResource struct { + // ID - The ID of the resource. + ID *string `json:"id,omitempty"` + // ResourceName - The name of the resource. + ResourceName *string `json:"resourceName,omitempty"` + // ResourceType - The type of the resource. + ResourceType *string `json:"resourceType,omitempty"` +} + +// TemplateHashResult result of the request to calculate template hash. It contains a string of minified +// template and its hash. +type TemplateHashResult struct { + autorest.Response `json:"-"` + // MinifiedTemplate - The minified template string. + MinifiedTemplate *string `json:"minifiedTemplate,omitempty"` + // TemplateHash - The template hash. + TemplateHash *string `json:"templateHash,omitempty"` +} + +// TemplateLink entity representing the reference to the template. +type TemplateLink struct { + // URI - The URI of the template to deploy. + URI *string `json:"uri,omitempty"` + // ContentVersion - If included, must match the ContentVersion in the template. + ContentVersion *string `json:"contentVersion,omitempty"` +} + +// UpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type UpdateByIDFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *UpdateByIDFuture) Result(client Client) (gr GenericResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent { + gr, err = client.UpdateByIDResponder(gr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request") + } + } + return +} + +// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type UpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *UpdateFuture) Result(client Client) (gr GenericResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent { + gr, err = client.UpdateResponder(gr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request") + } + } + return +} + +// ValidateMoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ValidateMoveResourcesFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ValidateMoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resources.ValidateMoveResourcesFuture") + return + } + ar.Response = future.Response() + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/providers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/providers.go new file mode 100644 index 00000000000..f6f17c97ba0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/providers.go @@ -0,0 +1,389 @@ +package resources + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProvidersClient is the provides operations for working with resources and resource groups. +type ProvidersClient struct { + BaseClient +} + +// NewProvidersClient creates an instance of the ProvidersClient client. +func NewProvidersClient(subscriptionID string) ProvidersClient { + return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { + return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the specified resource provider. +// Parameters: +// resourceProviderNamespace - the namespace of the resource provider. +// expand - the $expand query parameter. For example, to include property aliases in response, use +// $expand=resourceTypes/aliases. +func (client ProvidersClient) Get(ctx context.Context, resourceProviderNamespace string, expand string) (result Provider, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProvidersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceProviderNamespace, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProvidersClient) GetPreparer(ctx context.Context, resourceProviderNamespace string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProvidersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProvidersClient) GetResponder(resp *http.Response) (result Provider, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all resource providers for a subscription. +// Parameters: +// top - the number of results to return. If null is passed returns all deployments. +// expand - the properties to include in the results. For example, use &$expand=metadata in the query string to +// retrieve resource provider metadata. To include property aliases in response, use +// $expand=resourceTypes/aliases. +func (client ProvidersClient) List(ctx context.Context, top *int32, expand string) (result ProviderListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProvidersClient.List") + defer func() { + sc := -1 + if result.plr.Response.Response != nil { + sc = result.plr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, top, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.plr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "List", resp, "Failure sending request") + return + } + + result.plr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProvidersClient) ListPreparer(ctx context.Context, top *int32, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ProvidersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProvidersClient) ListResponder(resp *http.Response) (result ProviderListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ProvidersClient) listNextResults(ctx context.Context, lastResults ProviderListResult) (result ProviderListResult, err error) { + req, err := lastResults.providerListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "resources.ProvidersClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "resources.ProvidersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProvidersClient) ListComplete(ctx context.Context, top *int32, expand string) (result ProviderListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProvidersClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, top, expand) + return +} + +// Register registers a subscription with a resource provider. +// Parameters: +// resourceProviderNamespace - the namespace of the resource provider to register. +func (client ProvidersClient) Register(ctx context.Context, resourceProviderNamespace string) (result Provider, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProvidersClient.Register") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RegisterPreparer(ctx, resourceProviderNamespace) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", nil, "Failure preparing request") + return + } + + resp, err := client.RegisterSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", resp, "Failure sending request") + return + } + + result, err = client.RegisterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", resp, "Failure responding to request") + } + + return +} + +// RegisterPreparer prepares the Register request. +func (client ProvidersClient) RegisterPreparer(ctx context.Context, resourceProviderNamespace string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegisterSender sends the Register request. The method will close the +// http.Response Body if it receives an error. +func (client ProvidersClient) RegisterSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// RegisterResponder handles the response to the Register request. The method always +// closes the http.Response Body. +func (client ProvidersClient) RegisterResponder(resp *http.Response) (result Provider, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Unregister unregisters a subscription from a resource provider. +// Parameters: +// resourceProviderNamespace - the namespace of the resource provider to unregister. +func (client ProvidersClient) Unregister(ctx context.Context, resourceProviderNamespace string) (result Provider, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProvidersClient.Unregister") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UnregisterPreparer(ctx, resourceProviderNamespace) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", nil, "Failure preparing request") + return + } + + resp, err := client.UnregisterSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", resp, "Failure sending request") + return + } + + result, err = client.UnregisterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", resp, "Failure responding to request") + } + + return +} + +// UnregisterPreparer prepares the Unregister request. +func (client ProvidersClient) UnregisterPreparer(ctx context.Context, resourceProviderNamespace string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UnregisterSender sends the Unregister request. The method will close the +// http.Response Body if it receives an error. +func (client ProvidersClient) UnregisterSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UnregisterResponder handles the response to the Unregister request. The method always +// closes the http.Response Body. +func (client ProvidersClient) UnregisterResponder(resp *http.Response) (result Provider, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go new file mode 100644 index 00000000000..372114f85e0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go @@ -0,0 +1,1319 @@ +package resources + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// Client is the provides operations for working with resources and resource groups. +type Client struct { + BaseClient +} + +// NewClient creates an instance of the Client client. +func NewClient(subscriptionID string) Client { + return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewClientWithBaseURI creates an instance of the Client client using a custom endpoint. Use this when interacting +// with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { + return Client{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckExistence checks whether a resource exists. +// Parameters: +// resourceGroupName - the name of the resource group containing the resource to check. The name is case +// insensitive. +// resourceProviderNamespace - the resource provider of the resource to check. +// parentResourcePath - the parent resource identity. +// resourceType - the resource type. +// resourceName - the name of the resource to check whether it exists. +// APIVersion - the API version to use for the operation. +func (client Client) CheckExistence(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.CheckExistence") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.Client", "CheckExistence", err.Error()) + } + + req, err := client.CheckExistencePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", nil, "Failure preparing request") + return + } + + resp, err := client.CheckExistenceSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", resp, "Failure sending request") + return + } + + result, err = client.CheckExistenceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", resp, "Failure responding to request") + } + + return +} + +// CheckExistencePreparer prepares the CheckExistence request. +func (client Client) CheckExistencePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "parentResourcePath": parentResourcePath, + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace), + "resourceType": resourceType, + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsHead(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckExistenceSender sends the CheckExistence request. The method will close the +// http.Response Body if it receives an error. +func (client Client) CheckExistenceSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CheckExistenceResponder handles the response to the CheckExistence request. The method always +// closes the http.Response Body. +func (client Client) CheckExistenceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// CheckExistenceByID checks by ID whether a resource exists. +// Parameters: +// resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the +// format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} +// APIVersion - the API version to use for the operation. +func (client Client) CheckExistenceByID(ctx context.Context, resourceID string, APIVersion string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.CheckExistenceByID") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckExistenceByIDPreparer(ctx, resourceID, APIVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", nil, "Failure preparing request") + return + } + + resp, err := client.CheckExistenceByIDSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", resp, "Failure sending request") + return + } + + result, err = client.CheckExistenceByIDResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", resp, "Failure responding to request") + } + + return +} + +// CheckExistenceByIDPreparer prepares the CheckExistenceByID request. +func (client Client) CheckExistenceByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceId": resourceID, + } + + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsHead(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckExistenceByIDSender sends the CheckExistenceByID request. The method will close the +// http.Response Body if it receives an error. +func (client Client) CheckExistenceByIDSender(req *http.Request) (*http.Response, error) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// CheckExistenceByIDResponder handles the response to the CheckExistenceByID request. The method always +// closes the http.Response Body. +func (client Client) CheckExistenceByIDResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateOrUpdate creates a resource. +// Parameters: +// resourceGroupName - the name of the resource group for the resource. The name is case insensitive. +// resourceProviderNamespace - the namespace of the resource provider. +// parentResourcePath - the parent resource identity. +// resourceType - the resource type of the resource to create. +// resourceName - the name of the resource to create. +// APIVersion - the API version to use for the operation. +// parameters - parameters for creating or updating the resource. +func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (result CreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Pattern, Rule: `^[-\w\._,\(\)]+$`, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("resources.Client", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "parentResourcePath": parentResourcePath, + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace), + "resourceType": resourceType, + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client Client) CreateOrUpdateResponder(resp *http.Response) (result GenericResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdateByID create a resource by ID. +// Parameters: +// resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the +// format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} +// APIVersion - the API version to use for the operation. +// parameters - create or update resource parameters. +func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (result CreateOrUpdateByIDFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdateByID") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Pattern, Rule: `^[-\w\._,\(\)]+$`, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("resources.Client", "CreateOrUpdateByID", err.Error()) + } + + req, err := client.CreateOrUpdateByIDPreparer(ctx, resourceID, APIVersion, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateByIDSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdateByIDPreparer prepares the CreateOrUpdateByID request. +func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceId": resourceID, + } + + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceId}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the +// http.Response Body if it receives an error. +func (client Client) CreateOrUpdateByIDSender(req *http.Request) (future CreateOrUpdateByIDFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateByIDResponder handles the response to the CreateOrUpdateByID request. The method always +// closes the http.Response Body. +func (client Client) CreateOrUpdateByIDResponder(resp *http.Response) (result GenericResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a resource. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource to delete. The name is case +// insensitive. +// resourceProviderNamespace - the namespace of the resource provider. +// parentResourcePath - the parent resource identity. +// resourceType - the resource type. +// resourceName - the name of the resource to delete. +// APIVersion - the API version to use for the operation. +func (client Client) Delete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result DeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.Client", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client Client) DeletePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "parentResourcePath": parentResourcePath, + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace), + "resourceType": resourceType, + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteByID deletes a resource by ID. +// Parameters: +// resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the +// format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} +// APIVersion - the API version to use for the operation. +func (client Client) DeleteByID(ctx context.Context, resourceID string, APIVersion string) (result DeleteByIDFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.DeleteByID") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeleteByIDPreparer(ctx, resourceID, APIVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", nil, "Failure preparing request") + return + } + + result, err = client.DeleteByIDSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteByIDPreparer prepares the DeleteByID request. +func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceId": resourceID, + } + + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteByIDSender sends the DeleteByID request. The method will close the +// http.Response Body if it receives an error. +func (client Client) DeleteByIDSender(req *http.Request) (future DeleteByIDFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteByIDResponder handles the response to the DeleteByID request. The method always +// closes the http.Response Body. +func (client Client) DeleteByIDResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a resource. +// Parameters: +// resourceGroupName - the name of the resource group containing the resource to get. The name is case +// insensitive. +// resourceProviderNamespace - the namespace of the resource provider. +// parentResourcePath - the parent resource identity. +// resourceType - the resource type of the resource. +// resourceName - the name of the resource to get. +// APIVersion - the API version to use for the operation. +func (client Client) Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result GenericResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.Client", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.Client", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "parentResourcePath": parentResourcePath, + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace), + "resourceType": resourceType, + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client Client) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client Client) GetResponder(resp *http.Response) (result GenericResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetByID gets a resource by ID. +// Parameters: +// resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the +// format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} +// APIVersion - the API version to use for the operation. +func (client Client) GetByID(ctx context.Context, resourceID string, APIVersion string) (result GenericResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetByID") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetByIDPreparer(ctx, resourceID, APIVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", nil, "Failure preparing request") + return + } + + resp, err := client.GetByIDSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", resp, "Failure sending request") + return + } + + result, err = client.GetByIDResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", resp, "Failure responding to request") + } + + return +} + +// GetByIDPreparer prepares the GetByID request. +func (client Client) GetByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceId": resourceID, + } + + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetByIDSender sends the GetByID request. The method will close the +// http.Response Body if it receives an error. +func (client Client) GetByIDSender(req *http.Request) (*http.Response, error) { + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) +} + +// GetByIDResponder handles the response to the GetByID request. The method always +// closes the http.Response Body. +func (client Client) GetByIDResponder(resp *http.Response) (result GenericResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get all the resources in a subscription. +// Parameters: +// filter - the filter to apply on the operation. +// expand - comma-separated list of additional properties to be included in the response. Valid values include +// `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. +// top - the number of results to return. If null is passed, returns all resource groups. +func (client Client) List(ctx context.Context, filter string, expand string, top *int32) (result ListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.List") + defer func() { + sc := -1 + if result.lr.Response.Response != nil { + sc = result.lr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, filter, expand, top) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.Client", "List", resp, "Failure sending request") + return + } + + result.lr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client Client) ListPreparer(ctx context.Context, filter string, expand string, top *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resources", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client Client) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client Client) ListResponder(resp *http.Response) (result ListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client Client) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) { + req, err := lastResults.listResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "resources.Client", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "resources.Client", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client Client) ListComplete(ctx context.Context, filter string, expand string, top *int32) (result ListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, filter, expand, top) + return +} + +// ListByResourceGroup get all the resources for a resource group. +// Parameters: +// resourceGroupName - the resource group with the resources to get. +// filter - the filter to apply on the operation. +// expand - comma-separated list of additional properties to be included in the response. Valid values include +// `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. +// top - the number of results to return. If null is passed, returns all resources. +func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result ListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListByResourceGroup") + defer func() { + sc := -1 + if result.lr.Response.Response != nil { + sc = result.lr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.Client", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, filter, expand, top) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.lr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.lr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client Client) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client Client) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client Client) listByResourceGroupNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) { + req, err := lastResults.listResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "resources.Client", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "resources.Client", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result ListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, filter, expand, top) + return +} + +// MoveResources the resources to move must be in the same source resource group. The target resource group may be in a +// different subscription. When moving resources, both the source group and the target group are locked for the +// duration of the operation. Write and delete operations are blocked on the groups until the move completes. +// Parameters: +// sourceResourceGroupName - the name of the resource group containing the resources to move. +// parameters - parameters for moving resources. +func (client Client) MoveResources(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (result MoveResourcesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.MoveResources") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: sourceResourceGroupName, + Constraints: []validation.Constraint{{Target: "sourceResourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "sourceResourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "sourceResourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.Client", "MoveResources", err.Error()) + } + + req, err := client.MoveResourcesPreparer(ctx, sourceResourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", nil, "Failure preparing request") + return + } + + result, err = client.MoveResourcesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", result.Response(), "Failure sending request") + return + } + + return +} + +// MoveResourcesPreparer prepares the MoveResources request. +func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "sourceResourceGroupName": autorest.Encode("path", sourceResourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// MoveResourcesSender sends the MoveResources request. The method will close the +// http.Response Body if it receives an error. +func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// MoveResourcesResponder handles the response to the MoveResources request. The method always +// closes the http.Response Body. +func (client Client) MoveResourcesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update updates a resource. +// Parameters: +// resourceGroupName - the name of the resource group for the resource. The name is case insensitive. +// resourceProviderNamespace - the namespace of the resource provider. +// parentResourcePath - the parent resource identity. +// resourceType - the resource type of the resource to update. +// resourceName - the name of the resource to update. +// APIVersion - the API version to use for the operation. +// parameters - parameters for updating the resource. +func (client Client) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (result UpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.Client", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "parentResourcePath": parentResourcePath, + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "resourceProviderNamespace": autorest.Encode("path", resourceProviderNamespace), + "resourceType": resourceType, + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client Client) UpdateResponder(resp *http.Response) (result GenericResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateByID updates a resource by ID. +// Parameters: +// resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the +// format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} +// APIVersion - the API version to use for the operation. +// parameters - update resource parameters. +func (client Client) UpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (result UpdateByIDFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.UpdateByID") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateByIDPreparer(ctx, resourceID, APIVersion, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", nil, "Failure preparing request") + return + } + + result, err = client.UpdateByIDSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateByIDPreparer prepares the UpdateByID request. +func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceId": resourceID, + } + + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceId}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateByIDSender sends the UpdateByID request. The method will close the +// http.Response Body if it receives an error. +func (client Client) UpdateByIDSender(req *http.Request) (future UpdateByIDFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateByIDResponder handles the response to the UpdateByID request. The method always +// closes the http.Response Body. +func (client Client) UpdateByIDResponder(resp *http.Response) (result GenericResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ValidateMoveResources this operation checks whether the specified resources can be moved to the target. The +// resources to move must be in the same source resource group. The target resource group may be in a different +// subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it +// returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to +// check the result of the long-running operation. +// Parameters: +// sourceResourceGroupName - the name of the resource group containing the resources to validate for move. +// parameters - parameters for moving resources. +func (client Client) ValidateMoveResources(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (result ValidateMoveResourcesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/Client.ValidateMoveResources") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: sourceResourceGroupName, + Constraints: []validation.Constraint{{Target: "sourceResourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "sourceResourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "sourceResourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("resources.Client", "ValidateMoveResources", err.Error()) + } + + req, err := client.ValidateMoveResourcesPreparer(ctx, sourceResourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", nil, "Failure preparing request") + return + } + + result, err = client.ValidateMoveResourcesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", result.Response(), "Failure sending request") + return + } + + return +} + +// ValidateMoveResourcesPreparer prepares the ValidateMoveResources request. +func (client Client) ValidateMoveResourcesPreparer(ctx context.Context, sourceResourceGroupName string, parameters MoveInfo) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "sourceResourceGroupName": autorest.Encode("path", sourceResourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/validateMoveResources", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateMoveResourcesSender sends the ValidateMoveResources request. The method will close the +// http.Response Body if it receives an error. +func (client Client) ValidateMoveResourcesSender(req *http.Request) (future ValidateMoveResourcesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ValidateMoveResourcesResponder handles the response to the ValidateMoveResources request. The method always +// closes the http.Response Body. +func (client Client) ValidateMoveResourcesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusConflict), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/tags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/tags.go new file mode 100644 index 00000000000..c8df47e692c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/tags.go @@ -0,0 +1,450 @@ +package resources + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// TagsClient is the provides operations for working with resources and resource groups. +type TagsClient struct { + BaseClient +} + +// NewTagsClient creates an instance of the TagsClient client. +func NewTagsClient(subscriptionID string) TagsClient { + return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { + return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the tag name can have a maximum of 512 characters and is case insensitive. Tag names created by Azure +// have prefixes of microsoft, azure, or windows. You cannot create tags with one of these prefixes. +// Parameters: +// tagName - the name of the tag to create. +func (client TagsClient) CreateOrUpdate(ctx context.Context, tagName string) (result TagDetails, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, tagName) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client TagsClient) CreateOrUpdatePreparer(ctx context.Context, tagName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tagName": autorest.Encode("path", tagName), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client TagsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client TagsClient) CreateOrUpdateResponder(resp *http.Response) (result TagDetails, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdateValue creates a tag value. The name of the tag must already exist. +// Parameters: +// tagName - the name of the tag. +// tagValue - the value of the tag to create. +func (client TagsClient) CreateOrUpdateValue(ctx context.Context, tagName string, tagValue string) (result TagValue, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.CreateOrUpdateValue") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdateValuePreparer(ctx, tagName, tagValue) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateValueSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateValueResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdateValuePreparer prepares the CreateOrUpdateValue request. +func (client TagsClient) CreateOrUpdateValuePreparer(ctx context.Context, tagName string, tagValue string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tagName": autorest.Encode("path", tagName), + "tagValue": autorest.Encode("path", tagValue), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateValueSender sends the CreateOrUpdateValue request. The method will close the +// http.Response Body if it receives an error. +func (client TagsClient) CreateOrUpdateValueSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateValueResponder handles the response to the CreateOrUpdateValue request. The method always +// closes the http.Response Body. +func (client TagsClient) CreateOrUpdateValueResponder(resp *http.Response) (result TagValue, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete you must remove all values from a resource tag before you can delete it. +// Parameters: +// tagName - the name of the tag. +func (client TagsClient) Delete(ctx context.Context, tagName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, tagName) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client TagsClient) DeletePreparer(ctx context.Context, tagName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tagName": autorest.Encode("path", tagName), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client TagsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client TagsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteValue deletes a tag value. +// Parameters: +// tagName - the name of the tag. +// tagValue - the value of the tag to delete. +func (client TagsClient) DeleteValue(ctx context.Context, tagName string, tagValue string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.DeleteValue") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeleteValuePreparer(ctx, tagName, tagValue) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteValueSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", resp, "Failure sending request") + return + } + + result, err = client.DeleteValueResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", resp, "Failure responding to request") + } + + return +} + +// DeleteValuePreparer prepares the DeleteValue request. +func (client TagsClient) DeleteValuePreparer(ctx context.Context, tagName string, tagValue string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tagName": autorest.Encode("path", tagName), + "tagValue": autorest.Encode("path", tagValue), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteValueSender sends the DeleteValue request. The method will close the +// http.Response Body if it receives an error. +func (client TagsClient) DeleteValueSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteValueResponder handles the response to the DeleteValue request. The method always +// closes the http.Response Body. +func (client TagsClient) DeleteValueResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// List gets the names and values of all resource tags that are defined in a subscription. +func (client TagsClient) List(ctx context.Context) (result TagsListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.List") + defer func() { + sc := -1 + if result.tlr.Response.Response != nil { + sc = result.tlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.tlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", resp, "Failure sending request") + return + } + + result.tlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client TagsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/tagNames", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client TagsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client TagsClient) ListResponder(resp *http.Response) (result TagsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client TagsClient) listNextResults(ctx context.Context, lastResults TagsListResult) (result TagsListResult, err error) { + req, err := lastResults.tagsListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "resources.TagsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "resources.TagsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.TagsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client TagsClient) ListComplete(ctx context.Context) (result TagsListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TagsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/version.go new file mode 100644 index 00000000000..49538e1fc09 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/version.go @@ -0,0 +1,30 @@ +package resources + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + Version() + " resources/2017-05-10" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go index 2ac4600dc91..6ac5d323546 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -110,8 +111,7 @@ func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context, // CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always @@ -221,9 +221,8 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa // CreateSender sends the Create request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -319,8 +318,7 @@ func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupNa // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -406,9 +404,8 @@ func (client AccountsClient) FailoverPreparer(ctx context.Context, resourceGroup // FailoverSender sends the Failover request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) FailoverSender(req *http.Request) (future AccountsFailoverFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -436,7 +433,7 @@ func (client AccountsClient) FailoverResponder(resp *http.Response) (result auto // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. // expand - may be used to expand the properties within account's properties. By default, data is not included -// when fetching properties. Currently we only support geoReplicationStats. +// when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. func (client AccountsClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string, expand AccountExpand) (result Account, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.GetProperties") @@ -509,8 +506,7 @@ func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resource // GetPropertiesSender sends the GetProperties request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) GetPropertiesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetPropertiesResponder handles the response to the GetProperties request. The method always @@ -589,8 +585,7 @@ func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, e // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -723,8 +718,7 @@ func (client AccountsClient) ListAccountSASPreparer(ctx context.Context, resourc // ListAccountSASSender sends the ListAccountSAS request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListAccountSASSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAccountSASResponder handles the response to the ListAccountSAS request. The method always @@ -810,8 +804,7 @@ func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, re // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -906,8 +899,7 @@ func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroup // ListKeysSender sends the ListKeys request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListKeysSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListKeysResponder handles the response to the ListKeys request. The method always @@ -1005,8 +997,7 @@ func (client AccountsClient) ListServiceSASPreparer(ctx context.Context, resourc // ListServiceSASSender sends the ListServiceSAS request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListServiceSASSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListServiceSASResponder handles the response to the ListServiceSAS request. The method always @@ -1102,8 +1093,7 @@ func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resource // RegenerateKeySender sends the RegenerateKey request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) RegenerateKeySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // RegenerateKeyResponder handles the response to the RegenerateKey request. The method always @@ -1119,6 +1109,103 @@ func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result return } +// RestoreBlobRanges restore blobs in the specified blob ranges +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// parameters - the parameters to provide for restore blob ranges. +func (client AccountsClient) RestoreBlobRanges(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters) (result AccountsRestoreBlobRangesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.RestoreBlobRanges") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.TimeToRestore", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.BlobRanges", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.AccountsClient", "RestoreBlobRanges", err.Error()) + } + + req, err := client.RestoreBlobRangesPreparer(ctx, resourceGroupName, accountName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", nil, "Failure preparing request") + return + } + + result, err = client.RestoreBlobRangesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", result.Response(), "Failure sending request") + return + } + + return +} + +// RestoreBlobRangesPreparer prepares the RestoreBlobRanges request. +func (client AccountsClient) RestoreBlobRangesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters BlobRestoreParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restoreBlobRanges", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RestoreBlobRangesSender sends the RestoreBlobRanges request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) RestoreBlobRangesSender(req *http.Request) (future AccountsRestoreBlobRangesFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RestoreBlobRangesResponder handles the response to the RestoreBlobRanges request. The method always +// closes the http.Response Body. +func (client AccountsClient) RestoreBlobRangesResponder(resp *http.Response) (result BlobRestoreStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // RevokeUserDelegationKeys revoke user delegation keys. // Parameters: // resourceGroupName - the name of the resource group within the user's subscription. The name is case @@ -1194,8 +1281,7 @@ func (client AccountsClient) RevokeUserDelegationKeysPreparer(ctx context.Contex // RevokeUserDelegationKeysSender sends the RevokeUserDelegationKeys request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) RevokeUserDelegationKeysSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // RevokeUserDelegationKeysResponder handles the response to the RevokeUserDelegationKeys request. The method always @@ -1293,8 +1379,7 @@ func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupNa // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go index 402a0135ada..79cd2688269 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobcontainers.go @@ -36,7 +36,8 @@ func NewBlobContainersClient(subscriptionID string) BlobContainersClient { return NewBlobContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client. +// NewBlobContainersClientWithBaseURI creates an instance of the BlobContainersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBlobContainersClientWithBaseURI(baseURI string, subscriptionID string) BlobContainersClient { return BlobContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -130,8 +131,7 @@ func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, r // ClearLegalHoldSender sends the ClearLegalHold request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) ClearLegalHoldSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ClearLegalHoldResponder handles the response to the ClearLegalHold request. The method always @@ -181,13 +181,6 @@ func (client BlobContainersClient) Create(ctx context.Context, resourceGroupName {TargetValue: containerName, Constraints: []validation.Constraint{{Target: "containerName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "containerName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, - {TargetValue: blobContainer, - Constraints: []validation.Constraint{{Target: "blobContainer.ContainerProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "blobContainer.ContainerProperties.ImmutabilityPolicy", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "blobContainer.ContainerProperties.ImmutabilityPolicy.ImmutabilityPolicyProperty", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "blobContainer.ContainerProperties.ImmutabilityPolicy.ImmutabilityPolicyProperty.ImmutabilityPeriodSinceCreationInDays", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - }}}}, {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("storage.BlobContainersClient", "Create", err.Error()) @@ -241,8 +234,7 @@ func (client BlobContainersClient) CreatePreparer(ctx context.Context, resourceG // CreateSender sends the Create request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) CreateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateResponder handles the response to the Create request. The method always @@ -298,9 +290,7 @@ func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicy(ctx context. Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty.ImmutabilityPeriodSinceCreationInDays", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("storage.BlobContainersClient", "CreateOrUpdateImmutabilityPolicy", err.Error()) } @@ -360,8 +350,7 @@ func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicyPreparer(ctx // CreateOrUpdateImmutabilityPolicySender sends the CreateOrUpdateImmutabilityPolicy request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateImmutabilityPolicyResponder handles the response to the CreateOrUpdateImmutabilityPolicy request. The method always @@ -459,8 +448,7 @@ func (client BlobContainersClient) DeletePreparer(ctx context.Context, resourceG // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -565,8 +553,7 @@ func (client BlobContainersClient) DeleteImmutabilityPolicyPreparer(ctx context. // DeleteImmutabilityPolicySender sends the DeleteImmutabilityPolicy request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) DeleteImmutabilityPolicySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteImmutabilityPolicyResponder handles the response to the DeleteImmutabilityPolicy request. The method always @@ -622,9 +609,7 @@ func (client BlobContainersClient) ExtendImmutabilityPolicy(ctx context.Context, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty.ImmutabilityPeriodSinceCreationInDays", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.ImmutabilityPolicyProperty", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { return result, validation.NewError("storage.BlobContainersClient", "ExtendImmutabilityPolicy", err.Error()) } @@ -680,8 +665,7 @@ func (client BlobContainersClient) ExtendImmutabilityPolicyPreparer(ctx context. // ExtendImmutabilityPolicySender sends the ExtendImmutabilityPolicy request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) ExtendImmutabilityPolicySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ExtendImmutabilityPolicyResponder handles the response to the ExtendImmutabilityPolicy request. The method always @@ -779,8 +763,7 @@ func (client BlobContainersClient) GetPreparer(ctx context.Context, resourceGrou // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -887,8 +870,7 @@ func (client BlobContainersClient) GetImmutabilityPolicyPreparer(ctx context.Con // GetImmutabilityPolicySender sends the GetImmutabilityPolicy request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) GetImmutabilityPolicySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetImmutabilityPolicyResponder handles the response to the GetImmutabilityPolicy request. The method always @@ -993,8 +975,7 @@ func (client BlobContainersClient) LeasePreparer(ctx context.Context, resourceGr // LeaseSender sends the Lease request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) LeaseSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // LeaseResponder handles the response to the Lease request. The method always @@ -1019,7 +1000,8 @@ func (client BlobContainersClient) LeaseResponder(resp *http.Response) (result L // must be between 3 and 24 characters in length and use numbers and lower-case letters only. // maxpagesize - optional. Specified maximum number of containers that can be included in the list. // filter - optional. When specified, only container names starting with the filter will be listed. -func (client BlobContainersClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListContainerItemsPage, err error) { +// include - optional, used to include the properties for soft deleted blob containers. +func (client BlobContainersClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, include ListContainersInclude) (result ListContainerItemsPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.List") defer func() { @@ -1044,7 +1026,7 @@ func (client BlobContainersClient) List(ctx context.Context, resourceGroupName s } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter) + req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter, include) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "List", nil, "Failure preparing request") return @@ -1066,7 +1048,7 @@ func (client BlobContainersClient) List(ctx context.Context, resourceGroupName s } // ListPreparer prepares the List request. -func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (*http.Request, error) { +func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, include ListContainersInclude) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -1083,6 +1065,9 @@ func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGro if len(filter) > 0 { queryParameters["$filter"] = autorest.Encode("query", filter) } + if len(string(include)) > 0 { + queryParameters["$include"] = autorest.Encode("query", include) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -1095,8 +1080,7 @@ func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGro // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -1134,7 +1118,7 @@ func (client BlobContainersClient) listNextResults(ctx context.Context, lastResu } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client BlobContainersClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListContainerItemsIterator, err error) { +func (client BlobContainersClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, include ListContainersInclude) (result ListContainerItemsIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.List") defer func() { @@ -1145,7 +1129,7 @@ func (client BlobContainersClient) ListComplete(ctx context.Context, resourceGro tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, accountName, maxpagesize, filter) + result.page, err = client.List(ctx, resourceGroupName, accountName, maxpagesize, filter, include) return } @@ -1236,8 +1220,7 @@ func (client BlobContainersClient) LockImmutabilityPolicyPreparer(ctx context.Co // LockImmutabilityPolicySender sends the LockImmutabilityPolicy request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) LockImmutabilityPolicySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // LockImmutabilityPolicyResponder handles the response to the LockImmutabilityPolicy request. The method always @@ -1342,8 +1325,7 @@ func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, res // SetLegalHoldSender sends the SetLegalHold request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) SetLegalHoldSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // SetLegalHoldResponder handles the response to the SetLegalHold request. The method always @@ -1445,8 +1427,7 @@ func (client BlobContainersClient) UpdatePreparer(ctx context.Context, resourceG // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client BlobContainersClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go index bd3dc1ea0b2..198ef47b203 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/blobservices.go @@ -36,7 +36,8 @@ func NewBlobServicesClient(subscriptionID string) BlobServicesClient { return NewBlobServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBlobServicesClientWithBaseURI creates an instance of the BlobServicesClient client. +// NewBlobServicesClientWithBaseURI creates an instance of the BlobServicesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBlobServicesClientWithBaseURI(baseURI string, subscriptionID string) BlobServicesClient { return BlobServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -118,8 +119,7 @@ func (client BlobServicesClient) GetServicePropertiesPreparer(ctx context.Contex // GetServicePropertiesSender sends the GetServiceProperties request. The method will close the // http.Response Body if it receives an error. func (client BlobServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always @@ -210,8 +210,7 @@ func (client BlobServicesClient) ListPreparer(ctx context.Context, resourceGroup // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client BlobServicesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -262,9 +261,22 @@ func (client BlobServicesClient) SetServiceProperties(ctx context.Context, resou Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, - {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, + {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Enabled", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, + {Target: "parameters.BlobServicePropertiesProperties.RestorePolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + }}, + {Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, + {Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + }}, }}}}}); err != nil { return result, validation.NewError("storage.BlobServicesClient", "SetServiceProperties", err.Error()) } @@ -304,6 +316,7 @@ func (client BlobServicesClient) SetServicePropertiesPreparer(ctx context.Contex "api-version": APIVersion, } + parameters.Sku = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -317,8 +330,7 @@ func (client BlobServicesClient) SetServicePropertiesPreparer(ctx context.Contex // SetServicePropertiesSender sends the SetServiceProperties request. The method will close the // http.Response Body if it receives an error. func (client BlobServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go index 98630b5d4e1..af6ab21c698 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/encryptionscopes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/encryptionscopes.go new file mode 100644 index 00000000000..23176009fd5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/encryptionscopes.go @@ -0,0 +1,476 @@ +package storage + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// EncryptionScopesClient is the the Azure Storage Management API. +type EncryptionScopesClient struct { + BaseClient +} + +// NewEncryptionScopesClient creates an instance of the EncryptionScopesClient client. +func NewEncryptionScopesClient(subscriptionID string) EncryptionScopesClient { + return NewEncryptionScopesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewEncryptionScopesClientWithBaseURI creates an instance of the EncryptionScopesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewEncryptionScopesClientWithBaseURI(baseURI string, subscriptionID string) EncryptionScopesClient { + return EncryptionScopesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get returns the properties for the specified encryption scope. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// encryptionScopeName - the name of the encryption scope within the specified storage account. Encryption +// scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) +// only. Every dash (-) character must be immediately preceded and followed by a letter or number. +func (client EncryptionScopesClient) Get(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string) (result EncryptionScope, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: encryptionScopeName, + Constraints: []validation.Constraint{{Target: "encryptionScopeName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "encryptionScopeName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.EncryptionScopesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, encryptionScopeName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client EncryptionScopesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "encryptionScopeName": autorest.Encode("path", encryptionScopeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client EncryptionScopesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client EncryptionScopesClient) GetResponder(resp *http.Response) (result EncryptionScope, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the encryption scopes available under the specified storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client EncryptionScopesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result EncryptionScopeListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.List") + defer func() { + sc := -1 + if result.eslr.Response.Response != nil { + sc = result.eslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.EncryptionScopesClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.eslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "List", resp, "Failure sending request") + return + } + + result.eslr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client EncryptionScopesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client EncryptionScopesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client EncryptionScopesClient) ListResponder(resp *http.Response) (result EncryptionScopeListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client EncryptionScopesClient) listNextResults(ctx context.Context, lastResults EncryptionScopeListResult) (result EncryptionScopeListResult, err error) { + req, err := lastResults.encryptionScopeListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client EncryptionScopesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result EncryptionScopeListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, accountName) + return +} + +// Patch update encryption scope properties as specified in the request body. Update fails if the specified encryption +// scope does not already exist. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// encryptionScopeName - the name of the encryption scope within the specified storage account. Encryption +// scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) +// only. Every dash (-) character must be immediately preceded and followed by a letter or number. +// encryptionScope - encryption scope properties to be used for the update. +func (client EncryptionScopesClient) Patch(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (result EncryptionScope, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.Patch") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: encryptionScopeName, + Constraints: []validation.Constraint{{Target: "encryptionScopeName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "encryptionScopeName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.EncryptionScopesClient", "Patch", err.Error()) + } + + req, err := client.PatchPreparer(ctx, resourceGroupName, accountName, encryptionScopeName, encryptionScope) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Patch", nil, "Failure preparing request") + return + } + + resp, err := client.PatchSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Patch", resp, "Failure sending request") + return + } + + result, err = client.PatchResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Patch", resp, "Failure responding to request") + } + + return +} + +// PatchPreparer prepares the Patch request. +func (client EncryptionScopesClient) PatchPreparer(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "encryptionScopeName": autorest.Encode("path", encryptionScopeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", pathParameters), + autorest.WithJSON(encryptionScope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PatchSender sends the Patch request. The method will close the +// http.Response Body if it receives an error. +func (client EncryptionScopesClient) PatchSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// PatchResponder handles the response to the Patch request. The method always +// closes the http.Response Body. +func (client EncryptionScopesClient) PatchResponder(resp *http.Response) (result EncryptionScope, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Put synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope +// is already created and a subsequent request is issued with different properties, the encryption scope properties +// will be updated per the specified request. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// encryptionScopeName - the name of the encryption scope within the specified storage account. Encryption +// scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) +// only. Every dash (-) character must be immediately preceded and followed by a letter or number. +// encryptionScope - encryption scope properties to be used for the create or update. +func (client EncryptionScopesClient) Put(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (result EncryptionScope, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopesClient.Put") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: encryptionScopeName, + Constraints: []validation.Constraint{{Target: "encryptionScopeName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "encryptionScopeName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.EncryptionScopesClient", "Put", err.Error()) + } + + req, err := client.PutPreparer(ctx, resourceGroupName, accountName, encryptionScopeName, encryptionScope) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Put", nil, "Failure preparing request") + return + } + + resp, err := client.PutSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Put", resp, "Failure sending request") + return + } + + result, err = client.PutResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.EncryptionScopesClient", "Put", resp, "Failure responding to request") + } + + return +} + +// PutPreparer prepares the Put request. +func (client EncryptionScopesClient) PutPreparer(ctx context.Context, resourceGroupName string, accountName string, encryptionScopeName string, encryptionScope EncryptionScope) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "encryptionScopeName": autorest.Encode("path", encryptionScopeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", pathParameters), + autorest.WithJSON(encryptionScope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PutSender sends the Put request. The method will close the +// http.Response Body if it receives an error. +func (client EncryptionScopesClient) PutSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// PutResponder handles the response to the Put request. The method always +// closes the http.Response Body. +func (client EncryptionScopesClient) PutResponder(resp *http.Response) (result EncryptionScope, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go index 8e51cb0cb25..7c3e7689b40 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileservices.go @@ -36,7 +36,8 @@ func NewFileServicesClient(subscriptionID string) FileServicesClient { return NewFileServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFileServicesClientWithBaseURI creates an instance of the FileServicesClient client. +// NewFileServicesClientWithBaseURI creates an instance of the FileServicesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileServicesClientWithBaseURI(baseURI string, subscriptionID string) FileServicesClient { return FileServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -118,8 +119,7 @@ func (client FileServicesClient) GetServicePropertiesPreparer(ctx context.Contex // GetServicePropertiesSender sends the GetServiceProperties request. The method will close the // http.Response Body if it receives an error. func (client FileServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always @@ -210,8 +210,7 @@ func (client FileServicesClient) ListPreparer(ctx context.Context, resourceGroup // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client FileServicesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -256,7 +255,16 @@ func (client FileServicesClient) SetServiceProperties(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, + {Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + }}, + }}}}}); err != nil { return result, validation.NewError("storage.FileServicesClient", "SetServiceProperties", err.Error()) } @@ -295,6 +303,7 @@ func (client FileServicesClient) SetServicePropertiesPreparer(ctx context.Contex "api-version": APIVersion, } + parameters.Sku = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -308,8 +317,7 @@ func (client FileServicesClient) SetServicePropertiesPreparer(ctx context.Contex // SetServicePropertiesSender sends the SetServiceProperties request. The method will close the // http.Response Body if it receives an error. func (client FileServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go index eb5ca77d05a..5991c6ffb42 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/fileshares.go @@ -36,7 +36,8 @@ func NewFileSharesClient(subscriptionID string) FileSharesClient { return NewFileSharesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFileSharesClientWithBaseURI creates an instance of the FileSharesClient client. +// NewFileSharesClientWithBaseURI creates an instance of the FileSharesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewFileSharesClientWithBaseURI(baseURI string, subscriptionID string) FileSharesClient { return FileSharesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -77,8 +78,8 @@ func (client FileSharesClient) Create(ctx context.Context, resourceGroupName str {TargetValue: fileShare, Constraints: []validation.Constraint{{Target: "fileShare.FileShareProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMaximum, Rule: int64(5120), Chain: nil}, - {Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMaximum, Rule: int64(102400), Chain: nil}, + {Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}, {TargetValue: client.SubscriptionID, @@ -134,8 +135,7 @@ func (client FileSharesClient) CreatePreparer(ctx context.Context, resourceGroup // CreateSender sends the Create request. The method will close the // http.Response Body if it receives an error. func (client FileSharesClient) CreateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateResponder handles the response to the Create request. The method always @@ -233,8 +233,7 @@ func (client FileSharesClient) DeletePreparer(ctx context.Context, resourceGroup // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client FileSharesClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -258,7 +257,8 @@ func (client FileSharesClient) DeleteResponder(resp *http.Response) (result auto // shareName - the name of the file share within the specified storage account. File share names must be // between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) // character must be immediately preceded and followed by a letter or number. -func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string) (result FileShare, err error) { +// expand - optional, used to expand the properties within share's properties. +func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string, accountName string, shareName string, expand GetShareExpand) (result FileShare, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Get") defer func() { @@ -285,7 +285,7 @@ func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string return result, validation.NewError("storage.FileSharesClient", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, accountName, shareName) + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, shareName, expand) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Get", nil, "Failure preparing request") return @@ -307,7 +307,7 @@ func (client FileSharesClient) Get(ctx context.Context, resourceGroupName string } // GetPreparer prepares the Get request. -func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string) (*http.Request, error) { +func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, expand GetShareExpand) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -319,6 +319,9 @@ func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupNam queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(string(expand)) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -331,8 +334,7 @@ func (client FileSharesClient) GetPreparer(ctx context.Context, resourceGroupNam // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client FileSharesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -356,7 +358,8 @@ func (client FileSharesClient) GetResponder(resp *http.Response) (result FileSha // must be between 3 and 24 characters in length and use numbers and lower-case letters only. // maxpagesize - optional. Specified maximum number of shares that can be included in the list. // filter - optional. When specified, only share names starting with the filter will be listed. -func (client FileSharesClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result FileShareItemsPage, err error) { +// expand - optional, used to expand the properties within share's properties. +func (client FileSharesClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (result FileShareItemsPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.List") defer func() { @@ -381,7 +384,7 @@ func (client FileSharesClient) List(ctx context.Context, resourceGroupName strin } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter) + req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter, expand) if err != nil { err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "List", nil, "Failure preparing request") return @@ -403,7 +406,7 @@ func (client FileSharesClient) List(ctx context.Context, resourceGroupName strin } // ListPreparer prepares the List request. -func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (*http.Request, error) { +func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -420,6 +423,9 @@ func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupNa if len(filter) > 0 { queryParameters["$filter"] = autorest.Encode("query", filter) } + if len(string(expand)) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -432,8 +438,7 @@ func (client FileSharesClient) ListPreparer(ctx context.Context, resourceGroupNa // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client FileSharesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -471,7 +476,7 @@ func (client FileSharesClient) listNextResults(ctx context.Context, lastResults } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result FileShareItemsIterator, err error) { +func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string, expand ListSharesExpand) (result FileShareItemsIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.List") defer func() { @@ -482,7 +487,109 @@ func (client FileSharesClient) ListComplete(ctx context.Context, resourceGroupNa tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, resourceGroupName, accountName, maxpagesize, filter) + result.page, err = client.List(ctx, resourceGroupName, accountName, maxpagesize, filter, expand) + return +} + +// Restore restore a file share within a valid retention days if share soft delete is enabled +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// shareName - the name of the file share within the specified storage account. File share names must be +// between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) +// character must be immediately preceded and followed by a letter or number. +func (client FileSharesClient) Restore(ctx context.Context, resourceGroupName string, accountName string, shareName string, deletedShare DeletedShare) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FileSharesClient.Restore") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: shareName, + Constraints: []validation.Constraint{{Target: "shareName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "shareName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: deletedShare, + Constraints: []validation.Constraint{{Target: "deletedShare.DeletedShareName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "deletedShare.DeletedShareVersion", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.FileSharesClient", "Restore", err.Error()) + } + + req, err := client.RestorePreparer(ctx, resourceGroupName, accountName, shareName, deletedShare) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Restore", nil, "Failure preparing request") + return + } + + resp, err := client.RestoreSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Restore", resp, "Failure sending request") + return + } + + result, err = client.RestoreResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.FileSharesClient", "Restore", resp, "Failure responding to request") + } + + return +} + +// RestorePreparer prepares the Restore request. +func (client FileSharesClient) RestorePreparer(ctx context.Context, resourceGroupName string, accountName string, shareName string, deletedShare DeletedShare) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "shareName": autorest.Encode("path", shareName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/restore", pathParameters), + autorest.WithJSON(deletedShare), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RestoreSender sends the Restore request. The method will close the +// http.Response Body if it receives an error. +func (client FileSharesClient) RestoreSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// RestoreResponder handles the response to the Restore request. The method always +// closes the http.Response Body. +func (client FileSharesClient) RestoreResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp return } @@ -572,8 +679,7 @@ func (client FileSharesClient) UpdatePreparer(ctx context.Context, resourceGroup // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client FileSharesClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go index c91d84c2062..bce44a99753 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/managementpolicies.go @@ -36,7 +36,9 @@ func NewManagementPoliciesClient(subscriptionID string) ManagementPoliciesClient return NewManagementPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagementPoliciesClientWithBaseURI creates an instance of the ManagementPoliciesClient client. +// NewManagementPoliciesClientWithBaseURI creates an instance of the ManagementPoliciesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewManagementPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ManagementPoliciesClient { return ManagementPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -125,8 +127,7 @@ func (client ManagementPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ManagementPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -218,8 +219,7 @@ func (client ManagementPoliciesClient) DeletePreparer(ctx context.Context, resou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ManagementPoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -310,8 +310,7 @@ func (client ManagementPoliciesClient) GetPreparer(ctx context.Context, resource // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ManagementPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go index 7a0a714f741..57db327f83b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/models.go @@ -50,13 +50,15 @@ func PossibleAccessTierValues() []AccessTier { type AccountExpand string const ( + // AccountExpandBlobRestoreStatus ... + AccountExpandBlobRestoreStatus AccountExpand = "blobRestoreStatus" // AccountExpandGeoReplicationStats ... AccountExpandGeoReplicationStats AccountExpand = "geoReplicationStats" ) // PossibleAccountExpandValues returns an array of possible values for the AccountExpand const type. func PossibleAccountExpandValues() []AccountExpand { - return []AccountExpand{AccountExpandGeoReplicationStats} + return []AccountExpand{AccountExpandBlobRestoreStatus, AccountExpandGeoReplicationStats} } // AccountStatus enumerates the values for account status. @@ -108,6 +110,23 @@ func PossibleAction1Values() []Action1 { return []Action1{Acquire, Break, Change, Release, Renew} } +// BlobRestoreProgressStatus enumerates the values for blob restore progress status. +type BlobRestoreProgressStatus string + +const ( + // Complete ... + Complete BlobRestoreProgressStatus = "Complete" + // Failed ... + Failed BlobRestoreProgressStatus = "Failed" + // InProgress ... + InProgress BlobRestoreProgressStatus = "InProgress" +) + +// PossibleBlobRestoreProgressStatusValues returns an array of possible values for the BlobRestoreProgressStatus const type. +func PossibleBlobRestoreProgressStatusValues() []BlobRestoreProgressStatus { + return []BlobRestoreProgressStatus{Complete, Failed, InProgress} +} + // Bypass enumerates the values for bypass. type Bypass string @@ -159,6 +178,51 @@ func PossibleDirectoryServiceOptionsValues() []DirectoryServiceOptions { return []DirectoryServiceOptions{DirectoryServiceOptionsAADDS, DirectoryServiceOptionsAD, DirectoryServiceOptionsNone} } +// EnabledProtocols enumerates the values for enabled protocols. +type EnabledProtocols string + +const ( + // NFS ... + NFS EnabledProtocols = "NFS" + // SMB ... + SMB EnabledProtocols = "SMB" +) + +// PossibleEnabledProtocolsValues returns an array of possible values for the EnabledProtocols const type. +func PossibleEnabledProtocolsValues() []EnabledProtocols { + return []EnabledProtocols{NFS, SMB} +} + +// EncryptionScopeSource enumerates the values for encryption scope source. +type EncryptionScopeSource string + +const ( + // MicrosoftKeyVault ... + MicrosoftKeyVault EncryptionScopeSource = "Microsoft.KeyVault" + // MicrosoftStorage ... + MicrosoftStorage EncryptionScopeSource = "Microsoft.Storage" +) + +// PossibleEncryptionScopeSourceValues returns an array of possible values for the EncryptionScopeSource const type. +func PossibleEncryptionScopeSourceValues() []EncryptionScopeSource { + return []EncryptionScopeSource{MicrosoftKeyVault, MicrosoftStorage} +} + +// EncryptionScopeState enumerates the values for encryption scope state. +type EncryptionScopeState string + +const ( + // Disabled ... + Disabled EncryptionScopeState = "Disabled" + // Enabled ... + Enabled EncryptionScopeState = "Enabled" +) + +// PossibleEncryptionScopeStateValues returns an array of possible values for the EncryptionScopeState const type. +func PossibleEncryptionScopeStateValues() []EncryptionScopeState { + return []EncryptionScopeState{Disabled, Enabled} +} + // GeoReplicationStatus enumerates the values for geo replication status. type GeoReplicationStatus string @@ -176,6 +240,19 @@ func PossibleGeoReplicationStatusValues() []GeoReplicationStatus { return []GeoReplicationStatus{GeoReplicationStatusBootstrap, GeoReplicationStatusLive, GeoReplicationStatusUnavailable} } +// GetShareExpand enumerates the values for get share expand. +type GetShareExpand string + +const ( + // Stats ... + Stats GetShareExpand = "stats" +) + +// PossibleGetShareExpandValues returns an array of possible values for the GetShareExpand const type. +func PossibleGetShareExpandValues() []GetShareExpand { + return []GetShareExpand{Stats} +} + // HTTPProtocol enumerates the values for http protocol. type HTTPProtocol string @@ -242,15 +319,30 @@ func PossibleKeyPermissionValues() []KeyPermission { type KeySource string const ( - // MicrosoftKeyvault ... - MicrosoftKeyvault KeySource = "Microsoft.Keyvault" - // MicrosoftStorage ... - MicrosoftStorage KeySource = "Microsoft.Storage" + // KeySourceMicrosoftKeyvault ... + KeySourceMicrosoftKeyvault KeySource = "Microsoft.Keyvault" + // KeySourceMicrosoftStorage ... + KeySourceMicrosoftStorage KeySource = "Microsoft.Storage" ) // PossibleKeySourceValues returns an array of possible values for the KeySource const type. func PossibleKeySourceValues() []KeySource { - return []KeySource{MicrosoftKeyvault, MicrosoftStorage} + return []KeySource{KeySourceMicrosoftKeyvault, KeySourceMicrosoftStorage} +} + +// KeyType enumerates the values for key type. +type KeyType string + +const ( + // KeyTypeAccount ... + KeyTypeAccount KeyType = "Account" + // KeyTypeService ... + KeyTypeService KeyType = "Service" +) + +// PossibleKeyTypeValues returns an array of possible values for the KeyType const type. +func PossibleKeyTypeValues() []KeyType { + return []KeyType{KeyTypeAccount, KeyTypeService} } // Kind enumerates the values for kind. @@ -278,15 +370,15 @@ func PossibleKindValues() []Kind { type LargeFileSharesState string const ( - // Disabled ... - Disabled LargeFileSharesState = "Disabled" - // Enabled ... - Enabled LargeFileSharesState = "Enabled" + // LargeFileSharesStateDisabled ... + LargeFileSharesStateDisabled LargeFileSharesState = "Disabled" + // LargeFileSharesStateEnabled ... + LargeFileSharesStateEnabled LargeFileSharesState = "Enabled" ) // PossibleLargeFileSharesStateValues returns an array of possible values for the LargeFileSharesState const type. func PossibleLargeFileSharesStateValues() []LargeFileSharesState { - return []LargeFileSharesState{Disabled, Enabled} + return []LargeFileSharesState{LargeFileSharesStateDisabled, LargeFileSharesStateEnabled} } // LeaseDuration enumerates the values for lease duration. @@ -340,6 +432,19 @@ func PossibleLeaseStatusValues() []LeaseStatus { return []LeaseStatus{LeaseStatusLocked, LeaseStatusUnlocked} } +// ListContainersInclude enumerates the values for list containers include. +type ListContainersInclude string + +const ( + // Deleted ... + Deleted ListContainersInclude = "deleted" +) + +// PossibleListContainersIncludeValues returns an array of possible values for the ListContainersInclude const type. +func PossibleListContainersIncludeValues() []ListContainersInclude { + return []ListContainersInclude{Deleted} +} + // ListKeyExpand enumerates the values for list key expand. type ListKeyExpand string @@ -353,6 +458,19 @@ func PossibleListKeyExpandValues() []ListKeyExpand { return []ListKeyExpand{Kerb} } +// ListSharesExpand enumerates the values for list shares expand. +type ListSharesExpand string + +const ( + // ListSharesExpandDeleted ... + ListSharesExpandDeleted ListSharesExpand = "deleted" +) + +// PossibleListSharesExpandValues returns an array of possible values for the ListSharesExpand const type. +func PossibleListSharesExpandValues() []ListSharesExpand { + return []ListSharesExpand{ListSharesExpandDeleted} +} + // Permissions enumerates the values for permissions. type Permissions string @@ -385,19 +503,19 @@ func PossiblePermissionsValues() []Permissions { type PrivateEndpointConnectionProvisioningState string const ( - // Creating ... - Creating PrivateEndpointConnectionProvisioningState = "Creating" - // Deleting ... - Deleting PrivateEndpointConnectionProvisioningState = "Deleting" - // Failed ... - Failed PrivateEndpointConnectionProvisioningState = "Failed" - // Succeeded ... - Succeeded PrivateEndpointConnectionProvisioningState = "Succeeded" + // PrivateEndpointConnectionProvisioningStateCreating ... + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + // PrivateEndpointConnectionProvisioningStateDeleting ... + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + // PrivateEndpointConnectionProvisioningStateFailed ... + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + // PrivateEndpointConnectionProvisioningStateSucceeded ... + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" ) // PossiblePrivateEndpointConnectionProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProvisioningState const type. func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { - return []PrivateEndpointConnectionProvisioningState{Creating, Deleting, Failed, Succeeded} + return []PrivateEndpointConnectionProvisioningState{PrivateEndpointConnectionProvisioningStateCreating, PrivateEndpointConnectionProvisioningStateDeleting, PrivateEndpointConnectionProvisioningStateFailed, PrivateEndpointConnectionProvisioningStateSucceeded} } // PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status. @@ -421,17 +539,17 @@ func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointSer type ProvisioningState string const ( - // ProvisioningStateCreating ... - ProvisioningStateCreating ProvisioningState = "Creating" - // ProvisioningStateResolvingDNS ... - ProvisioningStateResolvingDNS ProvisioningState = "ResolvingDNS" - // ProvisioningStateSucceeded ... - ProvisioningStateSucceeded ProvisioningState = "Succeeded" + // Creating ... + Creating ProvisioningState = "Creating" + // ResolvingDNS ... + ResolvingDNS ProvisioningState = "ResolvingDNS" + // Succeeded ... + Succeeded ProvisioningState = "Succeeded" ) // PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ProvisioningStateCreating, ProvisioningStateResolvingDNS, ProvisioningStateSucceeded} + return []ProvisioningState{Creating, ResolvingDNS, Succeeded} } // PublicAccess enumerates the values for public access. @@ -481,6 +599,38 @@ func PossibleReasonCodeValues() []ReasonCode { return []ReasonCode{NotAvailableForSubscription, QuotaID} } +// RootSquashType enumerates the values for root squash type. +type RootSquashType string + +const ( + // AllSquash ... + AllSquash RootSquashType = "AllSquash" + // NoRootSquash ... + NoRootSquash RootSquashType = "NoRootSquash" + // RootSquash ... + RootSquash RootSquashType = "RootSquash" +) + +// PossibleRootSquashTypeValues returns an array of possible values for the RootSquashType const type. +func PossibleRootSquashTypeValues() []RootSquashType { + return []RootSquashType{AllSquash, NoRootSquash, RootSquash} +} + +// RoutingChoice enumerates the values for routing choice. +type RoutingChoice string + +const ( + // InternetRouting ... + InternetRouting RoutingChoice = "InternetRouting" + // MicrosoftRouting ... + MicrosoftRouting RoutingChoice = "MicrosoftRouting" +) + +// PossibleRoutingChoiceValues returns an array of possible values for the RoutingChoice const type. +func PossibleRoutingChoiceValues() []RoutingChoice { + return []RoutingChoice{InternetRouting, MicrosoftRouting} +} + // Services enumerates the values for services. type Services string @@ -500,6 +650,25 @@ func PossibleServicesValues() []Services { return []Services{B, F, Q, T} } +// ShareAccessTier enumerates the values for share access tier. +type ShareAccessTier string + +const ( + // ShareAccessTierCool ... + ShareAccessTierCool ShareAccessTier = "Cool" + // ShareAccessTierHot ... + ShareAccessTierHot ShareAccessTier = "Hot" + // ShareAccessTierPremium ... + ShareAccessTierPremium ShareAccessTier = "Premium" + // ShareAccessTierTransactionOptimized ... + ShareAccessTierTransactionOptimized ShareAccessTier = "TransactionOptimized" +) + +// PossibleShareAccessTierValues returns an array of possible values for the ShareAccessTier const type. +func PossibleShareAccessTierValues() []ShareAccessTier { + return []ShareAccessTier{ShareAccessTierCool, ShareAccessTierHot, ShareAccessTierPremium, ShareAccessTierTransactionOptimized} +} + // SignedResource enumerates the values for signed resource. type SignedResource string @@ -877,6 +1046,19 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { return nil } +// AccountInternetEndpoints the URIs that are used to perform a retrieval of a public blob, file, web or +// dfs object via a internet routing endpoint. +type AccountInternetEndpoints struct { + // Blob - READ-ONLY; Gets the blob endpoint. + Blob *string `json:"blob,omitempty"` + // File - READ-ONLY; Gets the file endpoint. + File *string `json:"file,omitempty"` + // Web - READ-ONLY; Gets the web endpoint. + Web *string `json:"web,omitempty"` + // Dfs - READ-ONLY; Gets the dfs endpoint. + Dfs *string `json:"dfs,omitempty"` +} + // AccountKey an access key for the storage account. type AccountKey struct { // KeyName - READ-ONLY; Name of the key. @@ -1040,9 +1222,26 @@ func NewAccountListResultPage(getNextPage func(context.Context, AccountListResul return AccountListResultPage{fn: getNextPage} } +// AccountMicrosoftEndpoints the URIs that are used to perform a retrieval of a public blob, queue, table, +// web or dfs object via a microsoft routing endpoint. +type AccountMicrosoftEndpoints struct { + // Blob - READ-ONLY; Gets the blob endpoint. + Blob *string `json:"blob,omitempty"` + // Queue - READ-ONLY; Gets the queue endpoint. + Queue *string `json:"queue,omitempty"` + // Table - READ-ONLY; Gets the table endpoint. + Table *string `json:"table,omitempty"` + // File - READ-ONLY; Gets the file endpoint. + File *string `json:"file,omitempty"` + // Web - READ-ONLY; Gets the web endpoint. + Web *string `json:"web,omitempty"` + // Dfs - READ-ONLY; Gets the dfs endpoint. + Dfs *string `json:"dfs,omitempty"` +} + // AccountProperties properties of the storage account. type AccountProperties struct { - // ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateResolvingDNS', 'ProvisioningStateSucceeded' + // ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Succeeded' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // PrimaryEndpoints - READ-ONLY; Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint. PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty"` @@ -1078,10 +1277,14 @@ type AccountProperties struct { GeoReplicationStats *GeoReplicationStats `json:"geoReplicationStats,omitempty"` // FailoverInProgress - READ-ONLY; If the failover is in progress, the value will be true, otherwise, it will be null. FailoverInProgress *bool `json:"failoverInProgress,omitempty"` - // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled' + // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` // PrivateEndpointConnections - READ-ONLY; List of private endpoint connection associated with the specified storage account PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer + RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` + // BlobRestoreStatus - READ-ONLY; Blob restore status + BlobRestoreStatus *BlobRestoreStatus `json:"blobRestoreStatus,omitempty"` } // AccountPropertiesCreateParameters the parameters used to create the storage account. @@ -1100,8 +1303,10 @@ type AccountPropertiesCreateParameters struct { EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` - // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled' + // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` + // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer + RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` } // AccountPropertiesUpdateParameters the parameters used when updating a storage account. @@ -1118,8 +1323,10 @@ type AccountPropertiesUpdateParameters struct { EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` // NetworkRuleSet - Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` - // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled' + // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'LargeFileSharesStateDisabled', 'LargeFileSharesStateEnabled' LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` + // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer + RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` } // AccountRegenerateKeyParameters the parameters used to regenerate the storage account key. @@ -1200,6 +1407,35 @@ func (future *AccountsFailoverFuture) Result(client AccountsClient) (ar autorest return } +// AccountsRestoreBlobRangesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type AccountsRestoreBlobRangesFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *AccountsRestoreBlobRangesFuture) Result(client AccountsClient) (brs BlobRestoreStatus, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsRestoreBlobRangesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("storage.AccountsRestoreBlobRangesFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if brs.Response.Response, err = future.GetResult(sender); err == nil && brs.Response.Response.StatusCode != http.StatusNoContent { + brs, err = client.RestoreBlobRangesResponder(brs.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsRestoreBlobRangesFuture", "Result", brs.Response.Response, "Failure responding to request") + } + } + return +} + // AccountUpdateParameters the parameters that can be provided when updating the storage account // properties. type AccountUpdateParameters struct { @@ -1416,6 +1652,35 @@ func (bc *BlobContainer) UnmarshalJSON(body []byte) error { return nil } +// BlobRestoreParameters blob restore parameters +type BlobRestoreParameters struct { + // TimeToRestore - Restore blob to the specified time. + TimeToRestore *date.Time `json:"timeToRestore,omitempty"` + // BlobRanges - Blob ranges to restore. + BlobRanges *[]BlobRestoreRange `json:"blobRanges,omitempty"` +} + +// BlobRestoreRange blob range +type BlobRestoreRange struct { + // StartRange - Blob start range. This is inclusive. Empty means account start. + StartRange *string `json:"startRange,omitempty"` + // EndRange - Blob end range. This is exclusive. Empty means account end. + EndRange *string `json:"endRange,omitempty"` +} + +// BlobRestoreStatus blob restore status. +type BlobRestoreStatus struct { + autorest.Response `json:"-"` + // Status - READ-ONLY; The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed. Possible values include: 'InProgress', 'Complete', 'Failed' + Status BlobRestoreProgressStatus `json:"status,omitempty"` + // FailureReason - READ-ONLY; Failure reason when blob restore is failed. + FailureReason *string `json:"failureReason,omitempty"` + // RestoreID - READ-ONLY; Id for tracking blob restore request. + RestoreID *string `json:"restoreId,omitempty"` + // Parameters - READ-ONLY; Blob restore request parameters. + Parameters *BlobRestoreParameters `json:"parameters,omitempty"` +} + // BlobServiceItems ... type BlobServiceItems struct { autorest.Response `json:"-"` @@ -1428,6 +1693,8 @@ type BlobServiceProperties struct { autorest.Response `json:"-"` // BlobServicePropertiesProperties - The properties of a storage account’s Blob service. *BlobServicePropertiesProperties `json:"properties,omitempty"` + // Sku - READ-ONLY; Sku name and tier. + Sku *Sku `json:"sku,omitempty"` // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource @@ -1463,6 +1730,15 @@ func (bsp *BlobServiceProperties) UnmarshalJSON(body []byte) error { } bsp.BlobServicePropertiesProperties = &blobServiceProperties } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + bsp.Sku = &sku + } case "id": if v != nil { var ID string @@ -1502,12 +1778,18 @@ type BlobServicePropertiesProperties struct { Cors *CorsRules `json:"cors,omitempty"` // DefaultServiceVersion - DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"` - // DeleteRetentionPolicy - The blob service properties for soft delete. + // DeleteRetentionPolicy - The blob service properties for blob soft delete. DeleteRetentionPolicy *DeleteRetentionPolicy `json:"deleteRetentionPolicy,omitempty"` - // AutomaticSnapshotPolicyEnabled - Automatic Snapshot is enabled if set to true. + // IsVersioningEnabled - Versioning is enabled if set to true. + IsVersioningEnabled *bool `json:"isVersioningEnabled,omitempty"` + // AutomaticSnapshotPolicyEnabled - Deprecated in favor of isVersioningEnabled property. AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` // ChangeFeed - The blob service properties for change feed events. ChangeFeed *ChangeFeed `json:"changeFeed,omitempty"` + // RestorePolicy - The blob service properties for blob restore policy. + RestorePolicy *RestorePolicyProperties `json:"restorePolicy,omitempty"` + // ContainerDeleteRetentionPolicy - The blob service properties for container soft delete. + ContainerDeleteRetentionPolicy *DeleteRetentionPolicy `json:"containerDeleteRetentionPolicy,omitempty"` } // ChangeFeed the blob service properties for change feed events. @@ -1546,6 +1828,18 @@ type CloudErrorBody struct { // ContainerProperties the properties of a container. type ContainerProperties struct { + // Version - READ-ONLY; The version of the deleted blob container. + Version *string `json:"version,omitempty"` + // Deleted - READ-ONLY; Indicates whether the blob container was deleted. + Deleted *bool `json:"deleted,omitempty"` + // DeletedTime - READ-ONLY; Blob container deletion time. + DeletedTime *date.Time `json:"deletedTime,omitempty"` + // RemainingRetentionDays - READ-ONLY; Remaining retention days for soft deleted blob container. + RemainingRetentionDays *int32 `json:"remainingRetentionDays,omitempty"` + // DefaultEncryptionScope - Default the container to use specified encryption scope for all writes. + DefaultEncryptionScope *string `json:"defaultEncryptionScope,omitempty"` + // DenyEncryptionScopeOverride - Block override of encryption scope from the container default. + DenyEncryptionScopeOverride *bool `json:"denyEncryptionScopeOverride,omitempty"` // PublicAccess - Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'PublicAccessContainer', 'PublicAccessBlob', 'PublicAccessNone' PublicAccess PublicAccess `json:"publicAccess,omitempty"` // LastModifiedTime - READ-ONLY; Returns the date and time the container was last modified. @@ -1571,6 +1865,12 @@ type ContainerProperties struct { // MarshalJSON is the custom marshaler for ContainerProperties. func (cp ContainerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if cp.DefaultEncryptionScope != nil { + objectMap["defaultEncryptionScope"] = cp.DefaultEncryptionScope + } + if cp.DenyEncryptionScopeOverride != nil { + objectMap["denyEncryptionScopeOverride"] = cp.DenyEncryptionScopeOverride + } if cp.PublicAccess != "" { objectMap["publicAccess"] = cp.PublicAccess } @@ -1620,11 +1920,19 @@ type DateAfterModification struct { DaysAfterModificationGreaterThan *float64 `json:"daysAfterModificationGreaterThan,omitempty"` } -// DeleteRetentionPolicy the blob service properties for soft delete. +// DeletedShare the deleted share to be restored. +type DeletedShare struct { + // DeletedShareName - Required. Identify the name of the deleted share that will be restored. + DeletedShareName *string `json:"deletedShareName,omitempty"` + // DeletedShareVersion - Required. Identify the version of the deleted share that will be restored. + DeletedShareVersion *string `json:"deletedShareVersion,omitempty"` +} + +// DeleteRetentionPolicy the service properties for soft delete. type DeleteRetentionPolicy struct { - // Enabled - Indicates whether DeleteRetentionPolicy is enabled for the Blob service. + // Enabled - Indicates whether DeleteRetentionPolicy is enabled. Enabled *bool `json:"enabled,omitempty"` - // Days - Indicates the number of days that the deleted blob should be retained. The minimum specified value can be 1 and the maximum value can be 365. + // Days - Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365. Days *int32 `json:"days,omitempty"` } @@ -1640,18 +1948,263 @@ type Dimension struct { type Encryption struct { // Services - List of services which support encryption. Services *EncryptionServices `json:"services,omitempty"` - // KeySource - The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'MicrosoftStorage', 'MicrosoftKeyvault' + // KeySource - The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. Possible values include: 'KeySourceMicrosoftStorage', 'KeySourceMicrosoftKeyvault' KeySource KeySource `json:"keySource,omitempty"` + // RequireInfrastructureEncryption - A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest. + RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"` // KeyVaultProperties - Properties provided by key vault. KeyVaultProperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"` } +// EncryptionScope the Encryption Scope resource. +type EncryptionScope struct { + autorest.Response `json:"-"` + // EncryptionScopeProperties - Properties of the encryption scope. + *EncryptionScopeProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for EncryptionScope. +func (es EncryptionScope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if es.EncryptionScopeProperties != nil { + objectMap["properties"] = es.EncryptionScopeProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for EncryptionScope struct. +func (es *EncryptionScope) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var encryptionScopeProperties EncryptionScopeProperties + err = json.Unmarshal(*v, &encryptionScopeProperties) + if err != nil { + return err + } + es.EncryptionScopeProperties = &encryptionScopeProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + es.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + es.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + es.Type = &typeVar + } + } + } + + return nil +} + +// EncryptionScopeKeyVaultProperties the key vault properties for the encryption scope. This is a required +// field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'. +type EncryptionScopeKeyVaultProperties struct { + // KeyURI - The object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the identifier to enable customer-managed key support on this encryption scope. + KeyURI *string `json:"keyUri,omitempty"` +} + +// EncryptionScopeListResult list of encryption scopes requested, and if paging is required, a URL to the +// next page of encryption scopes. +type EncryptionScopeListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of encryption scopes requested. + Value *[]EncryptionScope `json:"value,omitempty"` + // NextLink - READ-ONLY; Request URL that can be used to query next page of encryption scopes. Returned when total number of requested encryption scopes exceeds the maximum page size. + NextLink *string `json:"nextLink,omitempty"` +} + +// EncryptionScopeListResultIterator provides access to a complete listing of EncryptionScope values. +type EncryptionScopeListResultIterator struct { + i int + page EncryptionScopeListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *EncryptionScopeListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopeListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *EncryptionScopeListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter EncryptionScopeListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter EncryptionScopeListResultIterator) Response() EncryptionScopeListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter EncryptionScopeListResultIterator) Value() EncryptionScope { + if !iter.page.NotDone() { + return EncryptionScope{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the EncryptionScopeListResultIterator type. +func NewEncryptionScopeListResultIterator(page EncryptionScopeListResultPage) EncryptionScopeListResultIterator { + return EncryptionScopeListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (eslr EncryptionScopeListResult) IsEmpty() bool { + return eslr.Value == nil || len(*eslr.Value) == 0 +} + +// encryptionScopeListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (eslr EncryptionScopeListResult) encryptionScopeListResultPreparer(ctx context.Context) (*http.Request, error) { + if eslr.NextLink == nil || len(to.String(eslr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(eslr.NextLink))) +} + +// EncryptionScopeListResultPage contains a page of EncryptionScope values. +type EncryptionScopeListResultPage struct { + fn func(context.Context, EncryptionScopeListResult) (EncryptionScopeListResult, error) + eslr EncryptionScopeListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *EncryptionScopeListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionScopeListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.eslr) + if err != nil { + return err + } + page.eslr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *EncryptionScopeListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page EncryptionScopeListResultPage) NotDone() bool { + return !page.eslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page EncryptionScopeListResultPage) Response() EncryptionScopeListResult { + return page.eslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page EncryptionScopeListResultPage) Values() []EncryptionScope { + if page.eslr.IsEmpty() { + return nil + } + return *page.eslr.Value +} + +// Creates a new instance of the EncryptionScopeListResultPage type. +func NewEncryptionScopeListResultPage(getNextPage func(context.Context, EncryptionScopeListResult) (EncryptionScopeListResult, error)) EncryptionScopeListResultPage { + return EncryptionScopeListResultPage{fn: getNextPage} +} + +// EncryptionScopeProperties properties of the encryption scope. +type EncryptionScopeProperties struct { + // Source - The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible values include: 'MicrosoftStorage', 'MicrosoftKeyVault' + Source EncryptionScopeSource `json:"source,omitempty"` + // State - The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Possible values include: 'Enabled', 'Disabled' + State EncryptionScopeState `json:"state,omitempty"` + // CreationTime - READ-ONLY; Gets the creation date and time of the encryption scope in UTC. + CreationTime *date.Time `json:"creationTime,omitempty"` + // LastModifiedTime - READ-ONLY; Gets the last modification date and time of the encryption scope in UTC. + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // KeyVaultProperties - The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'. + KeyVaultProperties *EncryptionScopeKeyVaultProperties `json:"keyVaultProperties,omitempty"` +} + // EncryptionService a service that allows server-side encryption to be used. type EncryptionService struct { // Enabled - A boolean indicating whether or not the service encrypts the data as it is stored. Enabled *bool `json:"enabled,omitempty"` // LastEnabledTime - READ-ONLY; Gets a rough estimate of the date/time when the encryption was last enabled by the user. Only returned when encryption is enabled. There might be some unencrypted blobs which were written after this time, as it is just a rough estimate. LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"` + // KeyType - Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used. Possible values include: 'KeyTypeService', 'KeyTypeAccount' + KeyType KeyType `json:"keyType,omitempty"` } // EncryptionServices a list of services that support encryption. @@ -1660,9 +2213,9 @@ type EncryptionServices struct { Blob *EncryptionService `json:"blob,omitempty"` // File - The encryption function of the file storage service. File *EncryptionService `json:"file,omitempty"` - // Table - READ-ONLY; The encryption function of the table storage service. + // Table - The encryption function of the table storage service. Table *EncryptionService `json:"table,omitempty"` - // Queue - READ-ONLY; The encryption function of the queue storage service. + // Queue - The encryption function of the queue storage service. Queue *EncryptionService `json:"queue,omitempty"` } @@ -1681,6 +2234,10 @@ type Endpoints struct { Web *string `json:"web,omitempty"` // Dfs - READ-ONLY; Gets the dfs endpoint. Dfs *string `json:"dfs,omitempty"` + // MicrosoftEndpoints - Gets the microsoft routing storage endpoints. + MicrosoftEndpoints *AccountMicrosoftEndpoints `json:"microsoftEndpoints,omitempty"` + // InternetEndpoints - Gets the internet routing storage endpoints + InternetEndpoints *AccountInternetEndpoints `json:"internetEndpoints,omitempty"` } // ErrorResponse an error response from the storage resource provider. @@ -1703,6 +2260,8 @@ type FileServiceProperties struct { autorest.Response `json:"-"` // FileServicePropertiesProperties - The properties of File services in storage account. *FileServicePropertiesProperties `json:"properties,omitempty"` + // Sku - READ-ONLY; Sku name and tier. + Sku *Sku `json:"sku,omitempty"` // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource @@ -1738,6 +2297,15 @@ func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error { } fsp.FileServicePropertiesProperties = &fileServiceProperties } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + fsp.Sku = &sku + } case "id": if v != nil { var ID string @@ -1775,6 +2343,8 @@ func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error { type FileServicePropertiesProperties struct { // Cors - Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. Cors *CorsRules `json:"cors,omitempty"` + // ShareDeleteRetentionPolicy - The file service properties for share soft delete. + ShareDeleteRetentionPolicy *DeleteRetentionPolicy `json:"shareDeleteRetentionPolicy,omitempty"` } // FileShare properties of the file share, including Id, resource name, resource type, Etag. @@ -2097,8 +2667,28 @@ type FileShareProperties struct { LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` // Metadata - A name-value pair to associate with the share as metadata. Metadata map[string]*string `json:"metadata"` - // ShareQuota - The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + // ShareQuota - The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. ShareQuota *int32 `json:"shareQuota,omitempty"` + // EnabledProtocols - The authentication protocol that is used for the file share. Can only be specified when creating a share. Possible values include: 'SMB', 'NFS' + EnabledProtocols EnabledProtocols `json:"enabledProtocols,omitempty"` + // RootSquash - The property is for NFS share only. The default is NoRootSquash. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash' + RootSquash RootSquashType `json:"rootSquash,omitempty"` + // Version - READ-ONLY; The version of the share. + Version *string `json:"version,omitempty"` + // Deleted - READ-ONLY; Indicates whether the share was deleted. + Deleted *bool `json:"deleted,omitempty"` + // DeletedTime - READ-ONLY; The deleted time if the share was deleted. + DeletedTime *date.Time `json:"deletedTime,omitempty"` + // RemainingRetentionDays - READ-ONLY; Remaining retention days for share that was soft deleted. + RemainingRetentionDays *int32 `json:"remainingRetentionDays,omitempty"` + // AccessTier - Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. Possible values include: 'ShareAccessTierTransactionOptimized', 'ShareAccessTierHot', 'ShareAccessTierCool', 'ShareAccessTierPremium' + AccessTier ShareAccessTier `json:"accessTier,omitempty"` + // AccessTierChangeTime - READ-ONLY; Indicates the last modification time for share access tier. + AccessTierChangeTime *date.Time `json:"accessTierChangeTime,omitempty"` + // AccessTierStatus - READ-ONLY; Indicates if there is a pending transition for access tier. + AccessTierStatus *string `json:"accessTierStatus,omitempty"` + // ShareUsageBytes - READ-ONLY; The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files. + ShareUsageBytes *int64 `json:"shareUsageBytes,omitempty"` } // MarshalJSON is the custom marshaler for FileShareProperties. @@ -2110,6 +2700,15 @@ func (fsp FileShareProperties) MarshalJSON() ([]byte, error) { if fsp.ShareQuota != nil { objectMap["shareQuota"] = fsp.ShareQuota } + if fsp.EnabledProtocols != "" { + objectMap["enabledProtocols"] = fsp.EnabledProtocols + } + if fsp.RootSquash != "" { + objectMap["rootSquash"] = fsp.RootSquash + } + if fsp.AccessTier != "" { + objectMap["accessTier"] = fsp.AccessTier + } return json.Marshal(objectMap) } @@ -2286,6 +2885,8 @@ type ImmutabilityPolicyProperty struct { ImmutabilityPeriodSinceCreationInDays *int32 `json:"immutabilityPeriodSinceCreationInDays,omitempty"` // State - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked' State ImmutabilityPolicyState `json:"state,omitempty"` + // AllowProtectedAppendWrites - This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API + AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty"` } // IPRule IP rule with specific IP or IP range in CIDR format. @@ -2304,6 +2905,10 @@ type KeyVaultProperties struct { KeyVersion *string `json:"keyversion,omitempty"` // KeyVaultURI - The Uri of KeyVault. KeyVaultURI *string `json:"keyvaulturi,omitempty"` + // CurrentVersionedKeyIdentifier - READ-ONLY; The object identifier of the current versioned Key Vault Key in use. + CurrentVersionedKeyIdentifier *string `json:"currentVersionedKeyIdentifier,omitempty"` + // LastKeyRotationTimestamp - READ-ONLY; Timestamp of last rotation of the Key Vault Key. + LastKeyRotationTimestamp *date.Time `json:"lastKeyRotationTimestamp,omitempty"` } // LeaseContainerRequest lease Container request schema. @@ -2583,6 +3188,246 @@ func NewListContainerItemsPage(getNextPage func(context.Context, ListContainerIt return ListContainerItemsPage{fn: getNextPage} } +// ListQueue ... +type ListQueue struct { + // ListQueueProperties - List Queue resource properties. + *ListQueueProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ListQueue. +func (lq ListQueue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lq.ListQueueProperties != nil { + objectMap["properties"] = lq.ListQueueProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ListQueue struct. +func (lq *ListQueue) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var queueProperties ListQueueProperties + err = json.Unmarshal(*v, &queueProperties) + if err != nil { + return err + } + lq.ListQueueProperties = &queueProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lq.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lq.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + lq.Type = &typeVar + } + } + } + + return nil +} + +// ListQueueProperties ... +type ListQueueProperties struct { + // Metadata - A name-value pair that represents queue metadata. + Metadata map[string]*string `json:"metadata"` +} + +// MarshalJSON is the custom marshaler for ListQueueProperties. +func (lqp ListQueueProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lqp.Metadata != nil { + objectMap["metadata"] = lqp.Metadata + } + return json.Marshal(objectMap) +} + +// ListQueueResource response schema. Contains list of queues returned +type ListQueueResource struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of queues returned. + Value *[]ListQueue `json:"value,omitempty"` + // NextLink - READ-ONLY; Request URL that can be used to list next page of queues + NextLink *string `json:"nextLink,omitempty"` +} + +// ListQueueResourceIterator provides access to a complete listing of ListQueue values. +type ListQueueResourceIterator struct { + i int + page ListQueueResourcePage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ListQueueResourceIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListQueueResourceIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ListQueueResourceIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListQueueResourceIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ListQueueResourceIterator) Response() ListQueueResource { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListQueueResourceIterator) Value() ListQueue { + if !iter.page.NotDone() { + return ListQueue{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListQueueResourceIterator type. +func NewListQueueResourceIterator(page ListQueueResourcePage) ListQueueResourceIterator { + return ListQueueResourceIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lqr ListQueueResource) IsEmpty() bool { + return lqr.Value == nil || len(*lqr.Value) == 0 +} + +// listQueueResourcePreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lqr ListQueueResource) listQueueResourcePreparer(ctx context.Context) (*http.Request, error) { + if lqr.NextLink == nil || len(to.String(lqr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lqr.NextLink))) +} + +// ListQueueResourcePage contains a page of ListQueue values. +type ListQueueResourcePage struct { + fn func(context.Context, ListQueueResource) (ListQueueResource, error) + lqr ListQueueResource +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ListQueueResourcePage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListQueueResourcePage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.lqr) + if err != nil { + return err + } + page.lqr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListQueueResourcePage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListQueueResourcePage) NotDone() bool { + return !page.lqr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListQueueResourcePage) Response() ListQueueResource { + return page.lqr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListQueueResourcePage) Values() []ListQueue { + if page.lqr.IsEmpty() { + return nil + } + return *page.lqr.Value +} + +// Creates a new instance of the ListQueueResourcePage type. +func NewListQueueResourcePage(getNextPage func(context.Context, ListQueueResource) (ListQueueResource, error)) ListQueueResourcePage { + return ListQueueResourcePage{fn: getNextPage} +} + +// ListQueueServices ... +type ListQueueServices struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of queue services returned. + Value *[]QueueServiceProperties `json:"value,omitempty"` +} + // ListServiceSasResponse the List service SAS credentials operation response. type ListServiceSasResponse struct { autorest.Response `json:"-"` @@ -2590,6 +3435,159 @@ type ListServiceSasResponse struct { ServiceSasToken *string `json:"serviceSasToken,omitempty"` } +// ListTableResource response schema. Contains list of tables returned +type ListTableResource struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of tables returned. + Value *[]Table `json:"value,omitempty"` + // NextLink - READ-ONLY; Request URL that can be used to query next page of tables + NextLink *string `json:"nextLink,omitempty"` +} + +// ListTableResourceIterator provides access to a complete listing of Table values. +type ListTableResourceIterator struct { + i int + page ListTableResourcePage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ListTableResourceIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListTableResourceIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ListTableResourceIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListTableResourceIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ListTableResourceIterator) Response() ListTableResource { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListTableResourceIterator) Value() Table { + if !iter.page.NotDone() { + return Table{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListTableResourceIterator type. +func NewListTableResourceIterator(page ListTableResourcePage) ListTableResourceIterator { + return ListTableResourceIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ltr ListTableResource) IsEmpty() bool { + return ltr.Value == nil || len(*ltr.Value) == 0 +} + +// listTableResourcePreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ltr ListTableResource) listTableResourcePreparer(ctx context.Context) (*http.Request, error) { + if ltr.NextLink == nil || len(to.String(ltr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ltr.NextLink))) +} + +// ListTableResourcePage contains a page of Table values. +type ListTableResourcePage struct { + fn func(context.Context, ListTableResource) (ListTableResource, error) + ltr ListTableResource +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ListTableResourcePage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListTableResourcePage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ltr) + if err != nil { + return err + } + page.ltr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListTableResourcePage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListTableResourcePage) NotDone() bool { + return !page.ltr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListTableResourcePage) Response() ListTableResource { + return page.ltr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListTableResourcePage) Values() []Table { + if page.ltr.IsEmpty() { + return nil + } + return *page.ltr.Value +} + +// Creates a new instance of the ListTableResourcePage type. +func NewListTableResourcePage(getNextPage func(context.Context, ListTableResource) (ListTableResource, error)) ListTableResourcePage { + return ListTableResourcePage{fn: getNextPage} +} + +// ListTableServices ... +type ListTableServices struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of table services returned. + Value *[]TableServiceProperties `json:"value,omitempty"` +} + // ManagementPolicy the Get Storage Account ManagementPolicies operation response. type ManagementPolicy struct { autorest.Response `json:"-"` @@ -2697,6 +3695,8 @@ type ManagementPolicyFilter struct { PrefixMatch *[]string `json:"prefixMatch,omitempty"` // BlobTypes - An array of predefined enum values. Only blockBlob is supported. BlobTypes *[]string `json:"blobTypes,omitempty"` + // BlobIndexMatch - An array of blob index tag based filters, there can be at most 10 tag filters + BlobIndexMatch *[]TagFilter `json:"blobIndexMatch,omitempty"` } // ManagementPolicyProperties the Storage Account ManagementPolicy properties. @@ -2766,6 +3766,123 @@ type NetworkRuleSet struct { DefaultAction DefaultAction `json:"defaultAction,omitempty"` } +// ObjectReplicationPolicies list storage account object replication policies. +type ObjectReplicationPolicies struct { + autorest.Response `json:"-"` + // Value - The replication policy between two storage accounts. + Value *[]ObjectReplicationPolicy `json:"value,omitempty"` +} + +// ObjectReplicationPolicy the replication policy between two storage accounts. Multiple rules can be +// defined in one policy. +type ObjectReplicationPolicy struct { + autorest.Response `json:"-"` + // ObjectReplicationPolicyProperties - Returns the Storage Account Object Replication Policy. + *ObjectReplicationPolicyProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ObjectReplicationPolicy. +func (orp ObjectReplicationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if orp.ObjectReplicationPolicyProperties != nil { + objectMap["properties"] = orp.ObjectReplicationPolicyProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ObjectReplicationPolicy struct. +func (orp *ObjectReplicationPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var objectReplicationPolicyProperties ObjectReplicationPolicyProperties + err = json.Unmarshal(*v, &objectReplicationPolicyProperties) + if err != nil { + return err + } + orp.ObjectReplicationPolicyProperties = &objectReplicationPolicyProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + orp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + orp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + orp.Type = &typeVar + } + } + } + + return nil +} + +// ObjectReplicationPolicyFilter filters limit replication to a subset of blobs within the storage account. +// A logical OR is performed on values in the filter. If multiple filters are defined, a logical AND is +// performed on all filters. +type ObjectReplicationPolicyFilter struct { + // PrefixMatch - Optional. Filters the results to replicate only blobs whose names begin with the specified prefix. + PrefixMatch *[]string `json:"prefixMatch,omitempty"` + // MinCreationTime - Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z + MinCreationTime *string `json:"minCreationTime,omitempty"` +} + +// ObjectReplicationPolicyProperties the Storage Account ObjectReplicationPolicy properties. +type ObjectReplicationPolicyProperties struct { + // PolicyID - READ-ONLY; A unique id for object replication policy. + PolicyID *string `json:"policyId,omitempty"` + // EnabledTime - READ-ONLY; Indicates when the policy is enabled on the source account. + EnabledTime *date.Time `json:"enabledTime,omitempty"` + // SourceAccount - Required. Source account name. + SourceAccount *string `json:"sourceAccount,omitempty"` + // DestinationAccount - Required. Destination account name. + DestinationAccount *string `json:"destinationAccount,omitempty"` + // Rules - The storage account object replication rules. + Rules *[]ObjectReplicationPolicyRule `json:"rules,omitempty"` +} + +// ObjectReplicationPolicyRule the replication policy rule between two containers. +type ObjectReplicationPolicyRule struct { + // RuleID - Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account. + RuleID *string `json:"ruleId,omitempty"` + // SourceContainer - Required. Source container name. + SourceContainer *string `json:"sourceContainer,omitempty"` + // DestinationContainer - Required. Destination container name. + DestinationContainer *string `json:"destinationContainer,omitempty"` + // Filters - Optional. An object that defines the filter set. + Filters *ObjectReplicationPolicyFilter `json:"filters,omitempty"` +} + // Operation storage REST API operation definition. type Operation struct { // Name - Operation name: {provider}/{resource}/{operation} @@ -2952,13 +4069,21 @@ func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error { return nil } +// PrivateEndpointConnectionListResult list of private endpoint connection associated with the specified +// storage account +type PrivateEndpointConnectionListResult struct { + autorest.Response `json:"-"` + // Value - Array of private endpoint connections + Value *[]PrivateEndpointConnection `json:"value,omitempty"` +} + // PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties. type PrivateEndpointConnectionProperties struct { // PrivateEndpoint - The resource of private end point. PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed' ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` } @@ -3073,6 +4198,175 @@ type ProxyResource struct { Type *string `json:"type,omitempty"` } +// Queue ... +type Queue struct { + autorest.Response `json:"-"` + // QueueProperties - Queue resource properties. + *QueueProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Queue. +func (q Queue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if q.QueueProperties != nil { + objectMap["properties"] = q.QueueProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Queue struct. +func (q *Queue) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var queueProperties QueueProperties + err = json.Unmarshal(*v, &queueProperties) + if err != nil { + return err + } + q.QueueProperties = &queueProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + q.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + q.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + q.Type = &typeVar + } + } + } + + return nil +} + +// QueueProperties ... +type QueueProperties struct { + // Metadata - A name-value pair that represents queue metadata. + Metadata map[string]*string `json:"metadata"` + // ApproximateMessageCount - READ-ONLY; Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher. + ApproximateMessageCount *int32 `json:"approximateMessageCount,omitempty"` +} + +// MarshalJSON is the custom marshaler for QueueProperties. +func (qp QueueProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if qp.Metadata != nil { + objectMap["metadata"] = qp.Metadata + } + return json.Marshal(objectMap) +} + +// QueueServiceProperties the properties of a storage account’s Queue service. +type QueueServiceProperties struct { + autorest.Response `json:"-"` + // QueueServicePropertiesProperties - The properties of a storage account’s Queue service. + *QueueServicePropertiesProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for QueueServiceProperties. +func (qsp QueueServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if qsp.QueueServicePropertiesProperties != nil { + objectMap["properties"] = qsp.QueueServicePropertiesProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for QueueServiceProperties struct. +func (qsp *QueueServiceProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var queueServiceProperties QueueServicePropertiesProperties + err = json.Unmarshal(*v, &queueServiceProperties) + if err != nil { + return err + } + qsp.QueueServicePropertiesProperties = &queueServiceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + qsp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + qsp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + qsp.Type = &typeVar + } + } + } + + return nil +} + +// QueueServicePropertiesProperties the properties of a storage account’s Queue service. +type QueueServicePropertiesProperties struct { + // Cors - Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Queue service. + Cors *CorsRules `json:"cors,omitempty"` +} + // Resource ... type Resource struct { // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -3083,6 +4377,16 @@ type Resource struct { Type *string `json:"type,omitempty"` } +// RestorePolicyProperties the blob service properties for blob restore policy +type RestorePolicyProperties struct { + // Enabled - Blob restore is enabled if set to true. + Enabled *bool `json:"enabled,omitempty"` + // Days - how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. + Days *int32 `json:"days,omitempty"` + // LastEnabledTime - READ-ONLY; Returns the date and time the restore policy was last enabled. + LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"` +} + // Restriction the restriction because of which SKU cannot be used. type Restriction struct { // Type - READ-ONLY; The type of restrictions. As of now only possible value for this is location. @@ -3093,6 +4397,17 @@ type Restriction struct { ReasonCode ReasonCode `json:"reasonCode,omitempty"` } +// RoutingPreference routing preference defines the type of network, either microsoft or internet routing +// to be used to deliver the user data, the default option is microsoft routing +type RoutingPreference struct { + // RoutingChoice - Routing Choice defines the kind of network routing opted by the user. Possible values include: 'MicrosoftRouting', 'InternetRouting' + RoutingChoice RoutingChoice `json:"routingChoice,omitempty"` + // PublishMicrosoftEndpoints - A boolean flag which indicates whether microsoft routing storage endpoints are to be published + PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` + // PublishInternetEndpoints - A boolean flag which indicates whether internet routing storage endpoints are to be published + PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` +} + // ServiceSasParameters the parameters to list service SAS credentials of a specific resource. type ServiceSasParameters struct { // CanonicalizedResource - The canonical path to the signed resource. @@ -3141,9 +4456,26 @@ type ServiceSpecification struct { // Sku the SKU of the storage account. type Sku struct { - // Name - Gets or sets the SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType. Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' + // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' Name SkuName `json:"name,omitempty"` - // Tier - READ-ONLY; Gets the SKU tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium' + // Tier - Possible values include: 'Standard', 'Premium' + Tier SkuTier `json:"tier,omitempty"` +} + +// SKUCapability the capability information in the specified SKU, including file encryption, network ACLs, +// change notification, etc. +type SKUCapability struct { + // Name - READ-ONLY; The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. + Name *string `json:"name,omitempty"` + // Value - READ-ONLY; A string value to indicate states of given capability. Possibly 'true' or 'false'. + Value *string `json:"value,omitempty"` +} + +// SkuInformation storage SKU and its properties +type SkuInformation struct { + // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' + Name SkuName `json:"name,omitempty"` + // Tier - Possible values include: 'Standard', 'Premium' Tier SkuTier `json:"tier,omitempty"` // ResourceType - READ-ONLY; The type of the resource, usually it is 'storageAccounts'. ResourceType *string `json:"resourceType,omitempty"` @@ -3157,20 +4489,179 @@ type Sku struct { Restrictions *[]Restriction `json:"restrictions,omitempty"` } -// SKUCapability the capability information in the specified SKU, including file encryption, network ACLs, -// change notification, etc. -type SKUCapability struct { - // Name - READ-ONLY; The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. - Name *string `json:"name,omitempty"` - // Value - READ-ONLY; A string value to indicate states of given capability. Possibly 'true' or 'false'. - Value *string `json:"value,omitempty"` -} - // SkuListResult the response from the List Storage SKUs operation. type SkuListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; Get the list result of storage SKUs and their properties. - Value *[]Sku `json:"value,omitempty"` + Value *[]SkuInformation `json:"value,omitempty"` +} + +// Table properties of the table, including Id, resource name, resource type. +type Table struct { + autorest.Response `json:"-"` + // TableProperties - Table resource properties. + *TableProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Table. +func (t Table) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if t.TableProperties != nil { + objectMap["properties"] = t.TableProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Table struct. +func (t *Table) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var tableProperties TableProperties + err = json.Unmarshal(*v, &tableProperties) + if err != nil { + return err + } + t.TableProperties = &tableProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + t.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + t.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + t.Type = &typeVar + } + } + } + + return nil +} + +// TableProperties ... +type TableProperties struct { + // TableName - READ-ONLY; Table name under the specified account + TableName *string `json:"tableName,omitempty"` +} + +// TableServiceProperties the properties of a storage account’s Table service. +type TableServiceProperties struct { + autorest.Response `json:"-"` + // TableServicePropertiesProperties - The properties of a storage account’s Table service. + *TableServicePropertiesProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for TableServiceProperties. +func (tsp TableServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tsp.TableServicePropertiesProperties != nil { + objectMap["properties"] = tsp.TableServicePropertiesProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for TableServiceProperties struct. +func (tsp *TableServiceProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var tableServiceProperties TableServicePropertiesProperties + err = json.Unmarshal(*v, &tableServiceProperties) + if err != nil { + return err + } + tsp.TableServicePropertiesProperties = &tableServiceProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + tsp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + tsp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + tsp.Type = &typeVar + } + } + } + + return nil +} + +// TableServicePropertiesProperties the properties of a storage account’s Table service. +type TableServicePropertiesProperties struct { + // Cors - Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Table service. + Cors *CorsRules `json:"cors,omitempty"` +} + +// TagFilter blob index tag based filtering for blob objects +type TagFilter struct { + // Name - This is the filter tag name, it can have 1 - 128 characters + Name *string `json:"name,omitempty"` + // Op - This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is currently supported + Op *string `json:"op,omitempty"` + // Value - This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters + Value *string `json:"value,omitempty"` } // TagProperty a tag of the LegalHold of a blob container. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/objectreplicationpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/objectreplicationpolicies.go new file mode 100644 index 00000000000..4e7a97eeabc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/objectreplicationpolicies.go @@ -0,0 +1,428 @@ +package storage + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ObjectReplicationPoliciesClient is the the Azure Storage Management API. +type ObjectReplicationPoliciesClient struct { + BaseClient +} + +// NewObjectReplicationPoliciesClient creates an instance of the ObjectReplicationPoliciesClient client. +func NewObjectReplicationPoliciesClient(subscriptionID string) ObjectReplicationPoliciesClient { + return NewObjectReplicationPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewObjectReplicationPoliciesClientWithBaseURI creates an instance of the ObjectReplicationPoliciesClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewObjectReplicationPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ObjectReplicationPoliciesClient { + return ObjectReplicationPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update the object replication policy of the storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. +// properties - the object replication policy set to a storage account. A unique policy ID will be created if +// absent. +func (client ObjectReplicationPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy) (result ObjectReplicationPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: objectReplicationPolicyID, + Constraints: []validation.Constraint{{Target: "objectReplicationPolicyID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: properties, + Constraints: []validation.Constraint{{Target: "properties.ObjectReplicationPolicyProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "properties.ObjectReplicationPolicyProperties.SourceAccount", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "properties.ObjectReplicationPolicyProperties.DestinationAccount", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, accountName, objectReplicationPolicyID, properties) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ObjectReplicationPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string, properties ObjectReplicationPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "objectReplicationPolicyId": autorest.Encode("path", objectReplicationPolicyID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", pathParameters), + autorest.WithJSON(properties), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ObjectReplicationPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ObjectReplicationPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ObjectReplicationPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the object replication policy associated with the specified storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. +func (client ObjectReplicationPoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: objectReplicationPolicyID, + Constraints: []validation.Constraint{{Target: "objectReplicationPolicyID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, objectReplicationPolicyID) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ObjectReplicationPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "objectReplicationPolicyId": autorest.Encode("path", objectReplicationPolicyID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ObjectReplicationPoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ObjectReplicationPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the object replication policy of the storage account by policy ID. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// objectReplicationPolicyID - the ID of object replication policy or 'default' if the policy ID is unknown. +func (client ObjectReplicationPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (result ObjectReplicationPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: objectReplicationPolicyID, + Constraints: []validation.Constraint{{Target: "objectReplicationPolicyID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, objectReplicationPolicyID) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ObjectReplicationPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, objectReplicationPolicyID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "objectReplicationPolicyId": autorest.Encode("path", objectReplicationPolicyID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ObjectReplicationPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ObjectReplicationPoliciesClient) GetResponder(resp *http.Response) (result ObjectReplicationPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list the object replication policies associated with the storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client ObjectReplicationPoliciesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ObjectReplicationPolicies, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ObjectReplicationPoliciesClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.ObjectReplicationPoliciesClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.ObjectReplicationPoliciesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ObjectReplicationPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ObjectReplicationPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ObjectReplicationPoliciesClient) ListResponder(resp *http.Response) (result ObjectReplicationPolicies, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go index cd01bf13559..7a5a9c7dfe6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -91,8 +92,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go index 4cad9cb301b..326ba923a45 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privateendpointconnections.go @@ -36,7 +36,9 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointC return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client. +// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -47,8 +49,8 @@ func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscription // insensitive. // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// privateEndpointConnectionName - the name of the private endpoint connection associated with the Storage -// Account +// privateEndpointConnectionName - the name of the private endpoint connection associated with the Azure +// resource func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Delete") @@ -119,8 +121,7 @@ func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Contex // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client PrivateEndpointConnectionsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -141,8 +142,8 @@ func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Respon // insensitive. // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// privateEndpointConnectionName - the name of the private endpoint connection associated with the Storage -// Account +// privateEndpointConnectionName - the name of the private endpoint connection associated with the Azure +// resource func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Get") @@ -213,8 +214,7 @@ func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client PrivateEndpointConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -230,14 +230,105 @@ func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) return } +// List list all the private endpoint connections associated with the storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, accountName string) (result PrivateEndpointConnectionListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.PrivateEndpointConnectionsClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.PrivateEndpointConnectionsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateEndpointConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) ListResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // Put update the state of specified private endpoint connection associated with the storage account. // Parameters: // resourceGroupName - the name of the resource group within the user's subscription. The name is case // insensitive. // accountName - the name of the storage account within the specified resource group. Storage account names // must be between 3 and 24 characters in length and use numbers and lower-case letters only. -// privateEndpointConnectionName - the name of the private endpoint connection associated with the Storage -// Account +// privateEndpointConnectionName - the name of the private endpoint connection associated with the Azure +// resource // properties - the private endpoint connection properties. func (client PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, accountName string, privateEndpointConnectionName string, properties PrivateEndpointConnection) (result PrivateEndpointConnection, err error) { if tracing.IsEnabled() { @@ -314,8 +405,7 @@ func (client PrivateEndpointConnectionsClient) PutPreparer(ctx context.Context, // PutSender sends the Put request. The method will close the // http.Response Body if it receives an error. func (client PrivateEndpointConnectionsClient) PutSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // PutResponder handles the response to the Put request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go index 369db691e30..db93be64287 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/privatelinkresources.go @@ -36,7 +36,9 @@ func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesCl return NewPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient client. +// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient { return PrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -116,8 +118,7 @@ func (client PrivateLinkResourcesClient) ListByStorageAccountPreparer(ctx contex // ListByStorageAccountSender sends the ListByStorageAccount request. The method will close the // http.Response Body if it receives an error. func (client PrivateLinkResourcesClient) ListByStorageAccountSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByStorageAccountResponder handles the response to the ListByStorageAccount request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queue.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queue.go new file mode 100644 index 00000000000..d44aaac7d1d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queue.go @@ -0,0 +1,578 @@ +package storage + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// QueueClient is the the Azure Storage Management API. +type QueueClient struct { + BaseClient +} + +// NewQueueClient creates an instance of the QueueClient client. +func NewQueueClient(subscriptionID string) QueueClient { + return NewQueueClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewQueueClientWithBaseURI creates an instance of the QueueClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewQueueClientWithBaseURI(baseURI string, subscriptionID string) QueueClient { + return QueueClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a new queue with the specified queue name, under the specified account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The +// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an +// alphanumeric character and it cannot have two consecutive dash(-) characters. +// queue - queue properties and metadata to be created with +func (client QueueClient) Create(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (result Queue, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: queueName, + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.QueueClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, queueName, queue) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client QueueClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "queueName": autorest.Encode("path", queueName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", pathParameters), + autorest.WithJSON(queue), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client QueueClient) CreateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client QueueClient) CreateResponder(resp *http.Response) (result Queue, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the queue with the specified queue name, under the specified account if it exists. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The +// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an +// alphanumeric character and it cannot have two consecutive dash(-) characters. +func (client QueueClient) Delete(ctx context.Context, resourceGroupName string, accountName string, queueName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: queueName, + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.QueueClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, queueName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client QueueClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "queueName": autorest.Encode("path", queueName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client QueueClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client QueueClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the queue with the specified queue name, under the specified account if it exists. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The +// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an +// alphanumeric character and it cannot have two consecutive dash(-) characters. +func (client QueueClient) Get(ctx context.Context, resourceGroupName string, accountName string, queueName string) (result Queue, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: queueName, + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.QueueClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, queueName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client QueueClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "queueName": autorest.Encode("path", queueName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client QueueClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client QueueClient) GetResponder(resp *http.Response) (result Queue, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of all the queues under the specified storage account +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// maxpagesize - optional, a maximum number of queues that should be included in a list queue response +// filter - optional, When specified, only the queues with a name starting with the given filter will be +// listed. +func (client QueueClient) List(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListQueueResourcePage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.List") + defer func() { + sc := -1 + if result.lqr.Response.Response != nil { + sc = result.lqr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.QueueClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, accountName, maxpagesize, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lqr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.QueueClient", "List", resp, "Failure sending request") + return + } + + result.lqr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client QueueClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(maxpagesize) > 0 { + queryParameters["$maxpagesize"] = autorest.Encode("query", maxpagesize) + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client QueueClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client QueueClient) ListResponder(resp *http.Response) (result ListQueueResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client QueueClient) listNextResults(ctx context.Context, lastResults ListQueueResource) (result ListQueueResource, err error) { + req, err := lastResults.listQueueResourcePreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "storage.QueueClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "storage.QueueClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client QueueClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxpagesize string, filter string) (result ListQueueResourceIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, accountName, maxpagesize, filter) + return +} + +// Update creates a new queue with the specified queue name, under the specified account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// queueName - a queue name must be unique within a storage account and must be between 3 and 63 characters.The +// name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an +// alphanumeric character and it cannot have two consecutive dash(-) characters. +// queue - queue properties and metadata to be created with +func (client QueueClient) Update(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (result Queue, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueueClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: queueName, + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "queueName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.QueueClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, queueName, queue) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client QueueClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, queueName string, queue Queue) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "queueName": autorest.Encode("path", queueName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", pathParameters), + autorest.WithJSON(queue), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client QueueClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client QueueClient) UpdateResponder(resp *http.Response) (result Queue, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queueservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queueservices.go new file mode 100644 index 00000000000..100131162fa --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/queueservices.go @@ -0,0 +1,324 @@ +package storage + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// QueueServicesClient is the the Azure Storage Management API. +type QueueServicesClient struct { + BaseClient +} + +// NewQueueServicesClient creates an instance of the QueueServicesClient client. +func NewQueueServicesClient(subscriptionID string) QueueServicesClient { + return NewQueueServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewQueueServicesClientWithBaseURI creates an instance of the QueueServicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewQueueServicesClientWithBaseURI(baseURI string, subscriptionID string) QueueServicesClient { + return QueueServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// GetServiceProperties gets the properties of a storage account’s Queue service, including properties for Storage +// Analytics and CORS (Cross-Origin Resource Sharing) rules. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client QueueServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string) (result QueueServiceProperties, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueueServicesClient.GetServiceProperties") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.QueueServicesClient", "GetServiceProperties", err.Error()) + } + + req, err := client.GetServicePropertiesPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "GetServiceProperties", nil, "Failure preparing request") + return + } + + resp, err := client.GetServicePropertiesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "GetServiceProperties", resp, "Failure sending request") + return + } + + result, err = client.GetServicePropertiesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "GetServiceProperties", resp, "Failure responding to request") + } + + return +} + +// GetServicePropertiesPreparer prepares the GetServiceProperties request. +func (client QueueServicesClient) GetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "queueServiceName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/{queueServiceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServicePropertiesSender sends the GetServiceProperties request. The method will close the +// http.Response Body if it receives an error. +func (client QueueServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always +// closes the http.Response Body. +func (client QueueServicesClient) GetServicePropertiesResponder(resp *http.Response) (result QueueServiceProperties, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all queue services for the storage account +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client QueueServicesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ListQueueServices, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueueServicesClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.QueueServicesClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client QueueServicesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client QueueServicesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client QueueServicesClient) ListResponder(resp *http.Response) (result ListQueueServices, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SetServiceProperties sets the properties of a storage account’s Queue service, including properties for Storage +// Analytics and CORS (Cross-Origin Resource Sharing) rules. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// parameters - the properties of a storage account’s Queue service, only properties for Storage Analytics and +// CORS (Cross-Origin Resource Sharing) rules can be specified. +func (client QueueServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters QueueServiceProperties) (result QueueServiceProperties, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/QueueServicesClient.SetServiceProperties") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.QueueServicesClient", "SetServiceProperties", err.Error()) + } + + req, err := client.SetServicePropertiesPreparer(ctx, resourceGroupName, accountName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "SetServiceProperties", nil, "Failure preparing request") + return + } + + resp, err := client.SetServicePropertiesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "SetServiceProperties", resp, "Failure sending request") + return + } + + result, err = client.SetServicePropertiesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.QueueServicesClient", "SetServiceProperties", resp, "Failure responding to request") + } + + return +} + +// SetServicePropertiesPreparer prepares the SetServiceProperties request. +func (client QueueServicesClient) SetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters QueueServiceProperties) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "queueServiceName": autorest.Encode("path", "default"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/{queueServiceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SetServicePropertiesSender sends the SetServiceProperties request. The method will close the +// http.Response Body if it receives an error. +func (client QueueServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always +// closes the http.Response Body. +func (client QueueServicesClient) SetServicePropertiesResponder(resp *http.Response) (result QueueServiceProperties, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go index db346f8fbb5..a207bb305a9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/skus.go @@ -36,7 +36,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +103,7 @@ func (client SkusClient) ListPreparer(ctx context.Context) (*http.Request, error // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client SkusClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/table.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/table.go new file mode 100644 index 00000000000..c484e37580a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/table.go @@ -0,0 +1,563 @@ +package storage + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// TableClient is the the Azure Storage Management API. +type TableClient struct { + BaseClient +} + +// NewTableClient creates an instance of the TableClient client. +func NewTableClient(subscriptionID string) TableClient { + return NewTableClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewTableClientWithBaseURI creates an instance of the TableClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewTableClientWithBaseURI(baseURI string, subscriptionID string) TableClient { + return TableClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a new table with the specified table name, under the specified account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The +// name must comprise of only alphanumeric characters and it cannot begin with a numeric character. +func (client TableClient) Create(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: tableName, + Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.TableClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, accountName, tableName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.TableClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client TableClient) CreatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client TableClient) CreateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client TableClient) CreateResponder(resp *http.Response) (result Table, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the table with the specified table name, under the specified account if it exists. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The +// name must comprise of only alphanumeric characters and it cannot begin with a numeric character. +func (client TableClient) Delete(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: tableName, + Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.TableClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, tableName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "storage.TableClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client TableClient) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client TableClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client TableClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the table with the specified table name, under the specified account if it exists. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The +// name must comprise of only alphanumeric characters and it cannot begin with a numeric character. +func (client TableClient) Get(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: tableName, + Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.TableClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, accountName, tableName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.TableClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client TableClient) GetPreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client TableClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client TableClient) GetResponder(resp *http.Response) (result Table, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of all the tables under the specified storage account +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client TableClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ListTableResourcePage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.List") + defer func() { + sc := -1 + if result.ltr.Response.Response != nil { + sc = result.ltr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.TableClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ltr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.TableClient", "List", resp, "Failure sending request") + return + } + + result.ltr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client TableClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client TableClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client TableClient) ListResponder(resp *http.Response) (result ListTableResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client TableClient) listNextResults(ctx context.Context, lastResults ListTableResource) (result ListTableResource, err error) { + req, err := lastResults.listTableResourcePreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "storage.TableClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "storage.TableClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client TableClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string) (result ListTableResourceIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, accountName) + return +} + +// Update creates a new table with the specified table name, under the specified account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// tableName - a table name must be unique within a storage account and must be between 3 and 63 characters.The +// name must comprise of only alphanumeric characters and it cannot begin with a numeric character. +func (client TableClient) Update(ctx context.Context, resourceGroupName string, accountName string, tableName string) (result Table, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: tableName, + Constraints: []validation.Constraint{{Target: "tableName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "tableName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "tableName", Name: validation.Pattern, Rule: `^[A-Za-z][A-Za-z0-9]{2,62}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.TableClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, tableName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.TableClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client TableClient) UpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, tableName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableName": autorest.Encode("path", tableName), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client TableClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client TableClient) UpdateResponder(resp *http.Response) (result Table, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/tableservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/tableservices.go new file mode 100644 index 00000000000..371904a222d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/tableservices.go @@ -0,0 +1,324 @@ +package storage + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// 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. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// TableServicesClient is the the Azure Storage Management API. +type TableServicesClient struct { + BaseClient +} + +// NewTableServicesClient creates an instance of the TableServicesClient client. +func NewTableServicesClient(subscriptionID string) TableServicesClient { + return NewTableServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewTableServicesClientWithBaseURI creates an instance of the TableServicesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewTableServicesClientWithBaseURI(baseURI string, subscriptionID string) TableServicesClient { + return TableServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// GetServiceProperties gets the properties of a storage account’s Table service, including properties for Storage +// Analytics and CORS (Cross-Origin Resource Sharing) rules. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client TableServicesClient) GetServiceProperties(ctx context.Context, resourceGroupName string, accountName string) (result TableServiceProperties, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableServicesClient.GetServiceProperties") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.TableServicesClient", "GetServiceProperties", err.Error()) + } + + req, err := client.GetServicePropertiesPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "GetServiceProperties", nil, "Failure preparing request") + return + } + + resp, err := client.GetServicePropertiesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "GetServiceProperties", resp, "Failure sending request") + return + } + + result, err = client.GetServicePropertiesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "GetServiceProperties", resp, "Failure responding to request") + } + + return +} + +// GetServicePropertiesPreparer prepares the GetServiceProperties request. +func (client TableServicesClient) GetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableServiceName": autorest.Encode("path", "default"), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServicePropertiesSender sends the GetServiceProperties request. The method will close the +// http.Response Body if it receives an error. +func (client TableServicesClient) GetServicePropertiesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetServicePropertiesResponder handles the response to the GetServiceProperties request. The method always +// closes the http.Response Body. +func (client TableServicesClient) GetServicePropertiesResponder(resp *http.Response) (result TableServiceProperties, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all table services for the storage account. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +func (client TableServicesClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ListTableServices, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableServicesClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.TableServicesClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client TableServicesClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client TableServicesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client TableServicesClient) ListResponder(resp *http.Response) (result ListTableServices, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SetServiceProperties sets the properties of a storage account’s Table service, including properties for Storage +// Analytics and CORS (Cross-Origin Resource Sharing) rules. +// Parameters: +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +// accountName - the name of the storage account within the specified resource group. Storage account names +// must be between 3 and 24 characters in length and use numbers and lower-case letters only. +// parameters - the properties of a storage account’s Table service, only properties for Storage Analytics and +// CORS (Cross-Origin Resource Sharing) rules can be specified. +func (client TableServicesClient) SetServiceProperties(ctx context.Context, resourceGroupName string, accountName string, parameters TableServiceProperties) (result TableServiceProperties, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TableServicesClient.SetServiceProperties") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: accountName, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("storage.TableServicesClient", "SetServiceProperties", err.Error()) + } + + req, err := client.SetServicePropertiesPreparer(ctx, resourceGroupName, accountName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "SetServiceProperties", nil, "Failure preparing request") + return + } + + resp, err := client.SetServicePropertiesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "SetServiceProperties", resp, "Failure sending request") + return + } + + result, err = client.SetServicePropertiesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.TableServicesClient", "SetServiceProperties", resp, "Failure responding to request") + } + + return +} + +// SetServicePropertiesPreparer prepares the SetServiceProperties request. +func (client TableServicesClient) SetServicePropertiesPreparer(ctx context.Context, resourceGroupName string, accountName string, parameters TableServiceProperties) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "tableServiceName": autorest.Encode("path", "default"), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SetServicePropertiesSender sends the SetServiceProperties request. The method will close the +// http.Response Body if it receives an error. +func (client TableServicesClient) SetServicePropertiesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// SetServicePropertiesResponder handles the response to the SetServiceProperties request. The method always +// closes the http.Response Body. +func (client TableServicesClient) SetServicePropertiesResponder(resp *http.Response) (result TableServiceProperties, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go index 60d0d4bdc5d..bea70e107b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/usages.go @@ -36,7 +36,8 @@ func NewUsagesClient(subscriptionID string) UsagesClient { return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -105,8 +106,7 @@ func (client UsagesClient) ListByLocationPreparer(ctx context.Context, location // ListByLocationSender sends the ListByLocation request. The method will close the // http.Response Body if it receives an error. func (client UsagesClient) ListByLocationSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByLocationResponder handles the response to the ListByLocation request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go index 7f2a6a74305..78053be1100 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " storage/2019-06-01" + return "Azure-SDK-For-Go/" + Version() + " storage/2019-06-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go index 1d2248625b3..0b02e52bd7a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go @@ -566,7 +566,7 @@ type DeleteBlobOptions struct { } // Delete deletes the given blob from the specified container. -// If the blob does not exists at the time of the Delete Blob operation, it +// If the blob does not exist at the time of the Delete Blob operation, it // returns error. // See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-Blob func (b *Blob) Delete(options *DeleteBlobOptions) error { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go index 99702effe1e..98ca9bbaa89 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go @@ -141,15 +141,16 @@ type Client struct { // automatic retry strategy built in. The Sender can be customized. Sender Sender - accountName string - accountKey []byte - useHTTPS bool - UseSharedKeyLite bool - baseURL string - apiVersion string - userAgent string - sasClient bool - accountSASToken url.Values + accountName string + accountKey []byte + useHTTPS bool + UseSharedKeyLite bool + baseURL string + apiVersion string + userAgent string + sasClient bool + accountSASToken url.Values + additionalHeaders map[string]string } type odataResponse struct { @@ -432,6 +433,16 @@ func (c *Client) AddToUserAgent(extension string) error { return fmt.Errorf("Extension was empty, User Agent stayed as %s", c.userAgent) } +// AddAdditionalHeaders adds additional standard headers +func (c *Client) AddAdditionalHeaders(headers map[string]string) { + if headers != nil { + c.additionalHeaders = map[string]string{} + for k, v := range headers { + c.additionalHeaders[k] = v + } + } +} + // protectUserAgent is used in funcs that include extraheaders as a parameter. // It prevents the User-Agent header to be overwritten, instead if it happens to // be present, it gets added to the current User-Agent. Use it before getStandardHeaders @@ -696,11 +707,16 @@ func (c Client) GetFileService() FileServiceClient { } func (c Client) getStandardHeaders() map[string]string { - return map[string]string{ - userAgentHeader: c.userAgent, - "x-ms-version": c.apiVersion, - "x-ms-date": currentTimeRfc1123Formatted(), + headers := map[string]string{} + for k, v := range c.additionalHeaders { + headers[k] = v } + + headers[userAgentHeader] = c.userAgent + headers["x-ms-version"] = c.apiVersion + headers["x-ms-date"] = currentTimeRfc1123Formatted() + + return headers } func (c Client) exec(verb, url string, headers map[string]string, body io.Reader, auth authentication) (*http.Response, error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go index 2e805e7dff3..6c0c6caf7d3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go @@ -94,7 +94,7 @@ func (d *Directory) Create(options *FileRequestOptions) error { } // CreateIfNotExists creates this directory under the associated share if the -// directory does not exists. Returns true if the directory is newly created or +// directory does not exist. Returns true if the directory is newly created or // false if the directory already exists. // // See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Create-Directory diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go index 38525352713..07dc0df1f52 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go @@ -207,7 +207,7 @@ func (e *Entity) Delete(force bool, options *EntityOptions) error { uri := e.Table.tsc.client.getEndpoint(tableServiceName, e.buildPath(), query) resp, err := e.Table.tsc.client.exec(http.MethodDelete, uri, headers, nil, e.Table.tsc.auth) if err != nil { - if resp.StatusCode == http.StatusPreconditionFailed { + if resp != nil && resp.StatusCode == http.StatusPreconditionFailed { return fmt.Errorf(etagErrorTemplate, err) } return err @@ -234,7 +234,7 @@ func (e *Entity) InsertOrMerge(options *EntityOptions) error { } func (e *Entity) buildPath() string { - return fmt.Sprintf("%s(PartitionKey='%s', RowKey='%s')", e.Table.buildPath(), e.PartitionKey, e.RowKey) + return fmt.Sprintf("%s(PartitionKey='%s',RowKey='%s')", e.Table.buildPath(), e.PartitionKey, e.RowKey) } // MarshalJSON is a custom marshaller for entity @@ -433,7 +433,7 @@ func (e *Entity) updateMerge(force bool, verb string, options *EntityOptions) er uri := e.Table.tsc.client.getEndpoint(tableServiceName, e.buildPath(), query) resp, err := e.Table.tsc.client.exec(verb, uri, headers, bytes.NewReader(body), e.Table.tsc.auth) if err != nil { - if resp.StatusCode == http.StatusPreconditionFailed { + if resp != nil && resp.StatusCode == http.StatusPreconditionFailed { return fmt.Errorf(etagErrorTemplate, err) } return err diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go index 38c89d8f8d5..ae1ef97e166 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go @@ -18,4 +18,4 @@ package version // Changes may cause incorrect behavior and will be lost if the code is regenerated. // Number contains the semantic version of this SDK. -const Number = "v35.0.0" +const Number = "v43.0.0" diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go b/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go index b38f4c24589..914f8af5e4e 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go @@ -24,6 +24,7 @@ package adal */ import ( + "context" "encoding/json" "fmt" "io/ioutil" @@ -101,7 +102,14 @@ type deviceToken struct { // InitiateDeviceAuth initiates a device auth flow. It returns a DeviceCode // that can be used with CheckForUserCompletion or WaitForUserCompletion. +// Deprecated: use InitiateDeviceAuthWithContext() instead. func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resource string) (*DeviceCode, error) { + return InitiateDeviceAuthWithContext(context.Background(), sender, oauthConfig, clientID, resource) +} + +// InitiateDeviceAuthWithContext initiates a device auth flow. It returns a DeviceCode +// that can be used with CheckForUserCompletion or WaitForUserCompletion. +func InitiateDeviceAuthWithContext(ctx context.Context, sender Sender, oauthConfig OAuthConfig, clientID, resource string) (*DeviceCode, error) { v := url.Values{ "client_id": []string{clientID}, "resource": []string{resource}, @@ -117,7 +125,7 @@ func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resour req.ContentLength = int64(len(s)) req.Header.Set(contentType, mimeTypeFormPost) - resp, err := sender.Do(req) + resp, err := sender.Do(req.WithContext(ctx)) if err != nil { return nil, fmt.Errorf("%s %s: %s", logPrefix, errCodeSendingFails, err.Error()) } @@ -151,7 +159,14 @@ func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resour // CheckForUserCompletion takes a DeviceCode and checks with the Azure AD OAuth endpoint // to see if the device flow has: been completed, timed out, or otherwise failed +// Deprecated: use CheckForUserCompletionWithContext() instead. func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { + return CheckForUserCompletionWithContext(context.Background(), sender, code) +} + +// CheckForUserCompletionWithContext takes a DeviceCode and checks with the Azure AD OAuth endpoint +// to see if the device flow has: been completed, timed out, or otherwise failed +func CheckForUserCompletionWithContext(ctx context.Context, sender Sender, code *DeviceCode) (*Token, error) { v := url.Values{ "client_id": []string{code.ClientID}, "code": []string{*code.DeviceCode}, @@ -169,7 +184,7 @@ func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { req.ContentLength = int64(len(s)) req.Header.Set(contentType, mimeTypeFormPost) - resp, err := sender.Do(req) + resp, err := sender.Do(req.WithContext(ctx)) if err != nil { return nil, fmt.Errorf("%s %s: %s", logPrefix, errTokenSendingFails, err.Error()) } @@ -213,12 +228,19 @@ func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { // WaitForUserCompletion calls CheckForUserCompletion repeatedly until a token is granted or an error state occurs. // This prevents the user from looping and checking against 'ErrDeviceAuthorizationPending'. +// Deprecated: use WaitForUserCompletionWithContext() instead. func WaitForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { + return WaitForUserCompletionWithContext(context.Background(), sender, code) +} + +// WaitForUserCompletionWithContext calls CheckForUserCompletion repeatedly until a token is granted or an error +// state occurs. This prevents the user from looping and checking against 'ErrDeviceAuthorizationPending'. +func WaitForUserCompletionWithContext(ctx context.Context, sender Sender, code *DeviceCode) (*Token, error) { intervalDuration := time.Duration(*code.Interval) * time.Second waitDuration := intervalDuration for { - token, err := CheckForUserCompletion(sender, code) + token, err := CheckForUserCompletionWithContext(ctx, sender, code) if err == nil { return token, nil @@ -237,6 +259,11 @@ func WaitForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { return nil, fmt.Errorf("%s Error waiting for user to complete device flow. Server told us to slow_down too much", logPrefix) } - time.Sleep(waitDuration) + select { + case <-time.After(waitDuration): + // noop + case <-ctx.Done(): + return nil, ctx.Err() + } } } diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod b/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod index 66db8b9e2dc..a030eb42da8 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod @@ -3,9 +3,10 @@ module github.com/Azure/go-autorest/autorest/adal go 1.12 require ( - github.com/Azure/go-autorest/autorest/date v0.1.0 - github.com/Azure/go-autorest/autorest/mocks v0.1.0 + github.com/Azure/go-autorest/autorest v0.9.0 + github.com/Azure/go-autorest/autorest/date v0.2.0 + github.com/Azure/go-autorest/autorest/mocks v0.3.0 github.com/Azure/go-autorest/tracing v0.5.0 github.com/dgrijalva/jwt-go v3.2.0+incompatible - golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 + golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 ) diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum b/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum index 9525ff736a5..e43cf6498d0 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum @@ -1,12 +1,28 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go new file mode 100644 index 00000000000..28a4bfc4c43 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package adal + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go index b7275349836..b65b2c8b206 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go @@ -24,11 +24,12 @@ import ( "encoding/json" "errors" "fmt" + "io" "io/ioutil" "math" - "net" "net/http" "net/url" + "os" "strings" "sync" "time" @@ -63,6 +64,12 @@ const ( // the default number of attempts to refresh an MSI authentication token defaultMaxMSIRefreshAttempts = 5 + + // asMSIEndpointEnv is the environment variable used to store the endpoint on App Service and Functions + asMSIEndpointEnv = "MSI_ENDPOINT" + + // asMSISecretEnv is the environment variable used to store the request secret on App Service and Functions + asMSISecretEnv = "MSI_SECRET" ) // OAuthTokenProvider is an interface which should be implemented by an access token retriever @@ -100,6 +107,9 @@ type RefresherWithContext interface { // a successful token refresh type TokenRefreshCallback func(Token) error +// TokenRefresh is a type representing a custom callback to refresh a token +type TokenRefresh func(ctx context.Context, resource string) (*Token, error) + // Token encapsulates the access token used to authorize Azure requests. // https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow#service-to-service-access-token-response type Token struct { @@ -239,7 +249,7 @@ func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalTo "sub": spt.inner.ClientID, "jti": base64.URLEncoding.EncodeToString(jti), "nbf": time.Now().Unix(), - "exp": time.Now().Add(time.Hour * 24).Unix(), + "exp": time.Now().Add(24 * time.Hour).Unix(), } signedString, err := token.SignedString(secret.PrivateKey) @@ -338,10 +348,11 @@ func (secret ServicePrincipalAuthorizationCodeSecret) MarshalJSON() ([]byte, err // ServicePrincipalToken encapsulates a Token created for a Service Principal. type ServicePrincipalToken struct { - inner servicePrincipalToken - refreshLock *sync.RWMutex - sender Sender - refreshCallbacks []TokenRefreshCallback + inner servicePrincipalToken + refreshLock *sync.RWMutex + sender Sender + customRefreshFunc TokenRefresh + refreshCallbacks []TokenRefreshCallback // MaxMSIRefreshAttempts is the maximum number of attempts to refresh an MSI token. MaxMSIRefreshAttempts int } @@ -356,6 +367,11 @@ func (spt *ServicePrincipalToken) SetRefreshCallbacks(callbacks []TokenRefreshCa spt.refreshCallbacks = callbacks } +// SetCustomRefreshFunc sets a custom refresh function used to refresh the token. +func (spt *ServicePrincipalToken) SetCustomRefreshFunc(customRefreshFunc TokenRefresh) { + spt.customRefreshFunc = customRefreshFunc +} + // MarshalJSON implements the json.Marshaler interface. func (spt ServicePrincipalToken) MarshalJSON() ([]byte, error) { return json.Marshal(spt.inner) @@ -634,6 +650,31 @@ func GetMSIVMEndpoint() (string, error) { return msiEndpoint, nil } +func isAppService() bool { + _, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv) + _, asMSISecretEnvExists := os.LookupEnv(asMSISecretEnv) + + return asMSIEndpointEnvExists && asMSISecretEnvExists +} + +// GetMSIAppServiceEndpoint get the MSI endpoint for App Service and Functions +func GetMSIAppServiceEndpoint() (string, error) { + asMSIEndpoint, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv) + + if asMSIEndpointEnvExists { + return asMSIEndpoint, nil + } + return "", errors.New("MSI endpoint not found") +} + +// GetMSIEndpoint get the appropriate MSI endpoint depending on the runtime environment +func GetMSIEndpoint() (string, error) { + if isAppService() { + return GetMSIAppServiceEndpoint() + } + return GetMSIVMEndpoint() +} + // NewServicePrincipalTokenFromMSI creates a ServicePrincipalToken via the MSI VM Extension. // It will use the system assigned identity when creating the token. func NewServicePrincipalTokenFromMSI(msiEndpoint, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { @@ -666,7 +707,12 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI v := url.Values{} v.Set("resource", resource) - v.Set("api-version", "2018-02-01") + // App Service MSI currently only supports token API version 2017-09-01 + if isAppService() { + v.Set("api-version", "2017-09-01") + } else { + v.Set("api-version", "2018-02-01") + } if userAssignedID != nil { v.Set("client_id", *userAssignedID) } @@ -750,13 +796,13 @@ func (spt *ServicePrincipalToken) InvokeRefreshCallbacks(token Token) error { } // Refresh obtains a fresh token for the Service Principal. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) Refresh() error { return spt.RefreshWithContext(context.Background()) } // RefreshWithContext obtains a fresh token for the Service Principal. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) RefreshWithContext(ctx context.Context) error { spt.refreshLock.Lock() defer spt.refreshLock.Unlock() @@ -764,13 +810,13 @@ func (spt *ServicePrincipalToken) RefreshWithContext(ctx context.Context) error } // RefreshExchange refreshes the token, but for a different resource. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) RefreshExchange(resource string) error { return spt.RefreshExchangeWithContext(context.Background(), resource) } // RefreshExchangeWithContext refreshes the token, but for a different resource. -// This method is not safe for concurrent use and should be syncrhonized. +// This method is safe for concurrent use. func (spt *ServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error { spt.refreshLock.Lock() defer spt.refreshLock.Unlock() @@ -793,15 +839,29 @@ func isIMDS(u url.URL) bool { if err != nil { return false } - return u.Host == imds.Host && u.Path == imds.Path + return (u.Host == imds.Host && u.Path == imds.Path) || isAppService() } func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource string) error { + if spt.customRefreshFunc != nil { + token, err := spt.customRefreshFunc(ctx, resource) + if err != nil { + return err + } + spt.inner.Token = *token + return spt.InvokeRefreshCallbacks(spt.inner.Token) + } + req, err := http.NewRequest(http.MethodPost, spt.inner.OauthConfig.TokenEndpoint.String(), nil) if err != nil { return fmt.Errorf("adal: Failed to build the refresh request. Error = '%v'", err) } req.Header.Add("User-Agent", UserAgent()) + // Add header when runtime is on App Service or Functions + if isAppService() { + asMSISecret, _ := os.LookupEnv(asMSISecretEnv) + req.Header.Add("Secret", asMSISecret) + } req = req.WithContext(ctx) if !isIMDS(spt.inner.OauthConfig.TokenEndpoint) { v := url.Values{} @@ -846,7 +906,8 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource resp, err = spt.sender.Do(req) } if err != nil { - return newTokenRefreshError(fmt.Sprintf("adal: Failed to execute the refresh request. Error = '%v'", err), nil) + // don't return a TokenRefreshError here; this will allow retry logic to apply + return fmt.Errorf("adal: Failed to execute the refresh request. Error = '%v'", err) } defer resp.Body.Close() @@ -912,11 +973,13 @@ func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http delay := time.Duration(0) for attempt < maxAttempts { + if resp != nil && resp.Body != nil { + io.Copy(ioutil.Discard, resp.Body) + resp.Body.Close() + } resp, err = sender.Do(req) - // retry on temporary network errors, e.g. transient network failures. - // if we don't receive a response then assume we can't connect to the - // endpoint so we're likely not running on an Azure VM so don't retry. - if (err != nil && !isTemporaryNetworkError(err)) || resp == nil || resp.StatusCode == http.StatusOK || !containsInt(retries, resp.StatusCode) { + // we want to retry if err is not nil or the status code is in the list of retry codes + if err == nil && !responseHasStatusCode(resp, retries...) { return } @@ -940,20 +1003,12 @@ func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http return } -// returns true if the specified error is a temporary network error or false if it's not. -// if the error doesn't implement the net.Error interface the return value is true. -func isTemporaryNetworkError(err error) bool { - if netErr, ok := err.(net.Error); !ok || (ok && netErr.Temporary()) { - return true - } - return false -} - -// returns true if slice ints contains the value n -func containsInt(ints []int, n int) bool { - for _, i := range ints { - if i == n { - return true +func responseHasStatusCode(resp *http.Response, codes ...int) bool { + if resp != nil { + for _, i := range codes { + if i == resp.StatusCode { + return true + } } } return false diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization.go b/vendor/github.com/Azure/go-autorest/autorest/authorization.go index 54e87b5b648..f43e1a6ed5a 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization.go +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization.go @@ -171,20 +171,21 @@ func (bacb *BearerAuthorizerCallback) WithAuthorization() PrepareDecorator { removeRequestBody(&rCopy) resp, err := bacb.sender.Do(&rCopy) - if err == nil && resp.StatusCode == 401 { - defer resp.Body.Close() - if hasBearerChallenge(resp) { - bc, err := newBearerChallenge(resp) + if err != nil { + return r, err + } + DrainResponseBody(resp) + if resp.StatusCode == 401 && hasBearerChallenge(resp.Header) { + bc, err := newBearerChallenge(resp.Header) + if err != nil { + return r, err + } + if bacb.callback != nil { + ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"]) if err != nil { return r, err } - if bacb.callback != nil { - ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"]) - if err != nil { - return r, err - } - return Prepare(r, ba.WithAuthorization()) - } + return Prepare(r, ba.WithAuthorization()) } } } @@ -194,8 +195,8 @@ func (bacb *BearerAuthorizerCallback) WithAuthorization() PrepareDecorator { } // returns true if the HTTP response contains a bearer challenge -func hasBearerChallenge(resp *http.Response) bool { - authHeader := resp.Header.Get(bearerChallengeHeader) +func hasBearerChallenge(header http.Header) bool { + authHeader := header.Get(bearerChallengeHeader) if len(authHeader) == 0 || strings.Index(authHeader, bearer) < 0 { return false } @@ -206,8 +207,8 @@ type bearerChallenge struct { values map[string]string } -func newBearerChallenge(resp *http.Response) (bc bearerChallenge, err error) { - challenge := strings.TrimSpace(resp.Header.Get(bearerChallengeHeader)) +func newBearerChallenge(header http.Header) (bc bearerChallenge, err error) { + challenge := strings.TrimSpace(header.Get(bearerChallengeHeader)) trimmedChallenge := challenge[len(bearer)+1:] // challenge is a set of key=value pairs that are comma delimited diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go new file mode 100644 index 00000000000..89a659cb664 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go @@ -0,0 +1,67 @@ +package autorest + +// Copyright 2017 Microsoft Corporation +// +// 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 ( + "fmt" + "net/http" + "strings" +) + +// SASTokenAuthorizer implements an authorization for SAS Token Authentication +// this can be used for interaction with Blob Storage Endpoints +type SASTokenAuthorizer struct { + sasToken string +} + +// NewSASTokenAuthorizer creates a SASTokenAuthorizer using the given credentials +func NewSASTokenAuthorizer(sasToken string) (*SASTokenAuthorizer, error) { + if strings.TrimSpace(sasToken) == "" { + return nil, fmt.Errorf("sasToken cannot be empty") + } + + token := sasToken + if strings.HasPrefix(sasToken, "?") { + token = strings.TrimPrefix(sasToken, "?") + } + + return &SASTokenAuthorizer{ + sasToken: token, + }, nil +} + +// WithAuthorization returns a PrepareDecorator that adds a shared access signature token to the +// URI's query parameters. This can be used for the Blob, Queue, and File Services. +// +// See https://docs.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature +func (sas *SASTokenAuthorizer) WithAuthorization() PrepareDecorator { + return func(p Preparer) Preparer { + return PreparerFunc(func(r *http.Request) (*http.Request, error) { + r, err := p.Prepare(r) + if err != nil { + return r, err + } + + if r.URL.RawQuery != "" { + r.URL.RawQuery = fmt.Sprintf("%s&%s", r.URL.RawQuery, sas.sasToken) + } else { + r.URL.RawQuery = sas.sasToken + } + + r.RequestURI = r.URL.String() + return Prepare(r) + }) + } +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go new file mode 100644 index 00000000000..b844a3df418 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go @@ -0,0 +1,304 @@ +package autorest + +// Copyright 2017 Microsoft Corporation +// +// 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 ( + "bytes" + "crypto/hmac" + "crypto/sha256" + "encoding/base64" + "fmt" + "net/http" + "net/url" + "sort" + "strings" + "time" +) + +// SharedKeyType defines the enumeration for the various shared key types. +// See https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key for details on the shared key types. +type SharedKeyType string + +const ( + // SharedKey is used to authorize against blobs, files and queues services. + SharedKey SharedKeyType = "sharedKey" + + // SharedKeyForTable is used to authorize against the table service. + SharedKeyForTable SharedKeyType = "sharedKeyTable" + + // SharedKeyLite is used to authorize against blobs, files and queues services. It's provided for + // backwards compatibility with API versions before 2009-09-19. Prefer SharedKey instead. + SharedKeyLite SharedKeyType = "sharedKeyLite" + + // SharedKeyLiteForTable is used to authorize against the table service. It's provided for + // backwards compatibility with older table API versions. Prefer SharedKeyForTable instead. + SharedKeyLiteForTable SharedKeyType = "sharedKeyLiteTable" +) + +const ( + headerAccept = "Accept" + headerAcceptCharset = "Accept-Charset" + headerContentEncoding = "Content-Encoding" + headerContentLength = "Content-Length" + headerContentMD5 = "Content-MD5" + headerContentLanguage = "Content-Language" + headerIfModifiedSince = "If-Modified-Since" + headerIfMatch = "If-Match" + headerIfNoneMatch = "If-None-Match" + headerIfUnmodifiedSince = "If-Unmodified-Since" + headerDate = "Date" + headerXMSDate = "X-Ms-Date" + headerXMSVersion = "x-ms-version" + headerRange = "Range" +) + +const storageEmulatorAccountName = "devstoreaccount1" + +// SharedKeyAuthorizer implements an authorization for Shared Key +// this can be used for interaction with Blob, File and Queue Storage Endpoints +type SharedKeyAuthorizer struct { + accountName string + accountKey []byte + keyType SharedKeyType +} + +// NewSharedKeyAuthorizer creates a SharedKeyAuthorizer using the provided credentials and shared key type. +func NewSharedKeyAuthorizer(accountName, accountKey string, keyType SharedKeyType) (*SharedKeyAuthorizer, error) { + key, err := base64.StdEncoding.DecodeString(accountKey) + if err != nil { + return nil, fmt.Errorf("malformed storage account key: %v", err) + } + return &SharedKeyAuthorizer{ + accountName: accountName, + accountKey: key, + keyType: keyType, + }, nil +} + +// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose +// value is " " followed by the computed key. +// This can be used for the Blob, Queue, and File Services +// +// from: https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key +// You may use Shared Key authorization to authorize a request made against the +// 2009-09-19 version and later of the Blob and Queue services, +// and version 2014-02-14 and later of the File services. +func (sk *SharedKeyAuthorizer) WithAuthorization() PrepareDecorator { + return func(p Preparer) Preparer { + return PreparerFunc(func(r *http.Request) (*http.Request, error) { + r, err := p.Prepare(r) + if err != nil { + return r, err + } + + sk, err := buildSharedKey(sk.accountName, sk.accountKey, r, sk.keyType) + if err != nil { + return r, err + } + return Prepare(r, WithHeader(headerAuthorization, sk)) + }) + } +} + +func buildSharedKey(accName string, accKey []byte, req *http.Request, keyType SharedKeyType) (string, error) { + canRes, err := buildCanonicalizedResource(accName, req.URL.String(), keyType) + if err != nil { + return "", err + } + + if req.Header == nil { + req.Header = http.Header{} + } + + // ensure date is set + if req.Header.Get(headerDate) == "" && req.Header.Get(headerXMSDate) == "" { + date := time.Now().UTC().Format(http.TimeFormat) + req.Header.Set(headerXMSDate, date) + } + canString, err := buildCanonicalizedString(req.Method, req.Header, canRes, keyType) + if err != nil { + return "", err + } + return createAuthorizationHeader(accName, accKey, canString, keyType), nil +} + +func buildCanonicalizedResource(accountName, uri string, keyType SharedKeyType) (string, error) { + errMsg := "buildCanonicalizedResource error: %s" + u, err := url.Parse(uri) + if err != nil { + return "", fmt.Errorf(errMsg, err.Error()) + } + + cr := bytes.NewBufferString("") + if accountName != storageEmulatorAccountName { + cr.WriteString("/") + cr.WriteString(getCanonicalizedAccountName(accountName)) + } + + if len(u.Path) > 0 { + // Any portion of the CanonicalizedResource string that is derived from + // the resource's URI should be encoded exactly as it is in the URI. + // -- https://msdn.microsoft.com/en-gb/library/azure/dd179428.aspx + cr.WriteString(u.EscapedPath()) + } + + params, err := url.ParseQuery(u.RawQuery) + if err != nil { + return "", fmt.Errorf(errMsg, err.Error()) + } + + // See https://github.com/Azure/azure-storage-net/blob/master/Lib/Common/Core/Util/AuthenticationUtility.cs#L277 + if keyType == SharedKey { + if len(params) > 0 { + cr.WriteString("\n") + + keys := []string{} + for key := range params { + keys = append(keys, key) + } + sort.Strings(keys) + + completeParams := []string{} + for _, key := range keys { + if len(params[key]) > 1 { + sort.Strings(params[key]) + } + + completeParams = append(completeParams, fmt.Sprintf("%s:%s", key, strings.Join(params[key], ","))) + } + cr.WriteString(strings.Join(completeParams, "\n")) + } + } else { + // search for "comp" parameter, if exists then add it to canonicalizedresource + if v, ok := params["comp"]; ok { + cr.WriteString("?comp=" + v[0]) + } + } + + return string(cr.Bytes()), nil +} + +func getCanonicalizedAccountName(accountName string) string { + // since we may be trying to access a secondary storage account, we need to + // remove the -secondary part of the storage name + return strings.TrimSuffix(accountName, "-secondary") +} + +func buildCanonicalizedString(verb string, headers http.Header, canonicalizedResource string, keyType SharedKeyType) (string, error) { + contentLength := headers.Get(headerContentLength) + if contentLength == "0" { + contentLength = "" + } + date := headers.Get(headerDate) + if v := headers.Get(headerXMSDate); v != "" { + if keyType == SharedKey || keyType == SharedKeyLite { + date = "" + } else { + date = v + } + } + var canString string + switch keyType { + case SharedKey: + canString = strings.Join([]string{ + verb, + headers.Get(headerContentEncoding), + headers.Get(headerContentLanguage), + contentLength, + headers.Get(headerContentMD5), + headers.Get(headerContentType), + date, + headers.Get(headerIfModifiedSince), + headers.Get(headerIfMatch), + headers.Get(headerIfNoneMatch), + headers.Get(headerIfUnmodifiedSince), + headers.Get(headerRange), + buildCanonicalizedHeader(headers), + canonicalizedResource, + }, "\n") + case SharedKeyForTable: + canString = strings.Join([]string{ + verb, + headers.Get(headerContentMD5), + headers.Get(headerContentType), + date, + canonicalizedResource, + }, "\n") + case SharedKeyLite: + canString = strings.Join([]string{ + verb, + headers.Get(headerContentMD5), + headers.Get(headerContentType), + date, + buildCanonicalizedHeader(headers), + canonicalizedResource, + }, "\n") + case SharedKeyLiteForTable: + canString = strings.Join([]string{ + date, + canonicalizedResource, + }, "\n") + default: + return "", fmt.Errorf("key type '%s' is not supported", keyType) + } + return canString, nil +} + +func buildCanonicalizedHeader(headers http.Header) string { + cm := make(map[string]string) + + for k := range headers { + headerName := strings.TrimSpace(strings.ToLower(k)) + if strings.HasPrefix(headerName, "x-ms-") { + cm[headerName] = headers.Get(k) + } + } + + if len(cm) == 0 { + return "" + } + + keys := []string{} + for key := range cm { + keys = append(keys, key) + } + + sort.Strings(keys) + + ch := bytes.NewBufferString("") + + for _, key := range keys { + ch.WriteString(key) + ch.WriteRune(':') + ch.WriteString(cm[key]) + ch.WriteRune('\n') + } + + return strings.TrimSuffix(string(ch.Bytes()), "\n") +} + +func createAuthorizationHeader(accountName string, accountKey []byte, canonicalizedString string, keyType SharedKeyType) string { + h := hmac.New(sha256.New, accountKey) + h.Write([]byte(canonicalizedString)) + signature := base64.StdEncoding.EncodeToString(h.Sum(nil)) + var key string + switch keyType { + case SharedKey, SharedKeyForTable: + key = "SharedKey" + case SharedKeyLite, SharedKeyLiteForTable: + key = "SharedKeyLite" + } + return fmt.Sprintf("%s %s:%s", key, getCanonicalizedAccountName(accountName), signature) +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go index 1cb41cbeb1b..c5fc511f67c 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go @@ -258,7 +258,17 @@ func (f Future) GetResult(sender autorest.Sender) (*http.Response, error) { if err != nil { return nil, err } - return sender.Do(req) + resp, err := sender.Do(req) + if err == nil && resp.Body != nil { + // copy the body and close it so callers don't have to + defer resp.Body.Close() + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + return resp, err + } + resp.Body = ioutil.NopCloser(bytes.NewReader(b)) + } + return resp, err } type pollingTracker interface { diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go b/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go index 3a0a439ff93..26be936b7e5 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go @@ -17,6 +17,7 @@ package azure // limitations under the License. import ( + "bytes" "encoding/json" "fmt" "io/ioutil" @@ -143,7 +144,7 @@ type RequestError struct { autorest.DetailedError // The error returned by the Azure service. - ServiceError *ServiceError `json:"error"` + ServiceError *ServiceError `json:"error" xml:"Error"` // The request id (from the x-ms-request-id-header) of the request. RequestID string @@ -285,26 +286,34 @@ func WithErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator { var e RequestError defer resp.Body.Close() + encodedAs := autorest.EncodedAsJSON + if strings.Contains(resp.Header.Get("Content-Type"), "xml") { + encodedAs = autorest.EncodedAsXML + } + // Copy and replace the Body in case it does not contain an error object. // This will leave the Body available to the caller. - b, decodeErr := autorest.CopyAndDecode(autorest.EncodedAsJSON, resp.Body, &e) + b, decodeErr := autorest.CopyAndDecode(encodedAs, resp.Body, &e) resp.Body = ioutil.NopCloser(&b) if decodeErr != nil { return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b.String(), decodeErr) } if e.ServiceError == nil { // Check if error is unwrapped ServiceError - if err := json.Unmarshal(b.Bytes(), &e.ServiceError); err != nil { + decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes())) + if err := decoder.Decode(&e.ServiceError); err != nil { return err } } if e.ServiceError.Message == "" { // if we're here it means the returned error wasn't OData v4 compliant. - // try to unmarshal the body as raw JSON in hopes of getting something. + // try to unmarshal the body in hopes of getting something. rawBody := map[string]interface{}{} - if err := json.Unmarshal(b.Bytes(), &rawBody); err != nil { + decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes())) + if err := decoder.Decode(&rawBody); err != nil { return err } + e.ServiceError = &ServiceError{ Code: "Unknown", Message: "Unknown service error", diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go b/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go index 86ce9f2b5b1..c6d39f68665 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go @@ -47,11 +47,15 @@ func DoRetryWithRegistration(client autorest.Client) autorest.SendDecorator { if resp.StatusCode != http.StatusConflict || client.SkipResourceProviderRegistration { return resp, err } + var re RequestError - err = autorest.Respond( - resp, - autorest.ByUnmarshallingJSON(&re), - ) + if strings.Contains(r.Header.Get("Content-Type"), "xml") { + // XML errors (e.g. Storage Data Plane) only return the inner object + err = autorest.Respond(resp, autorest.ByUnmarshallingXML(&re.ServiceError)) + } else { + err = autorest.Respond(resp, autorest.ByUnmarshallingJSON(&re)) + } + if err != nil { return resp, err } diff --git a/vendor/github.com/Azure/go-autorest/autorest/client.go b/vendor/github.com/Azure/go-autorest/autorest/client.go index 1c6a0617a1f..e04f9fd4ecd 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/client.go +++ b/vendor/github.com/Azure/go-autorest/autorest/client.go @@ -179,6 +179,11 @@ type Client struct { // Set to true to skip attempted registration of resource providers (false by default). SkipResourceProviderRegistration bool + + // SendDecorators can be used to override the default chain of SendDecorators. + // This can be used to specify things like a custom retry SendDecorator. + // Set this to an empty slice to use no SendDecorators. + SendDecorators []SendDecorator } // NewClientWithUserAgent returns an instance of a Client with the UserAgent set to the passed @@ -298,3 +303,21 @@ func (c Client) ByInspecting() RespondDecorator { } return c.ResponseInspector } + +// Send sends the provided http.Request using the client's Sender or the default sender. +// It returns the http.Response and possible error. It also accepts a, possibly empty, +// default set of SendDecorators used when sending the request. +// SendDecorators have the following precedence: +// 1. In a request's context via WithSendDecorators() +// 2. Specified on the client in SendDecorators +// 3. The default values specified in this method +func (c Client) Send(req *http.Request, decorators ...SendDecorator) (*http.Response, error) { + if c.SendDecorators != nil { + decorators = c.SendDecorators + } + inCtx := req.Context().Value(ctxSendDecorators{}) + if sd, ok := inCtx.([]SendDecorator); ok { + decorators = sd + } + return SendWithSender(c, req, decorators...) +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go.mod b/vendor/github.com/Azure/go-autorest/autorest/date/go.mod index 13a1e980338..3adc4804c3d 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/date/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/date/go.mod @@ -1,3 +1,5 @@ module github.com/Azure/go-autorest/autorest/date go 1.12 + +require github.com/Azure/go-autorest/autorest v0.9.0 diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go.sum b/vendor/github.com/Azure/go-autorest/autorest/date/go.sum new file mode 100644 index 00000000000..9e2ee7a9484 --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/date/go.sum @@ -0,0 +1,16 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go new file mode 100644 index 00000000000..55adf930f4a --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package date + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.mod b/vendor/github.com/Azure/go-autorest/autorest/go.mod index ab2ae66acec..499c56de48a 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/go.mod @@ -3,9 +3,9 @@ module github.com/Azure/go-autorest/autorest go 1.12 require ( - github.com/Azure/go-autorest/autorest/adal v0.5.0 - github.com/Azure/go-autorest/autorest/mocks v0.2.0 + github.com/Azure/go-autorest/autorest/adal v0.8.2 + github.com/Azure/go-autorest/autorest/mocks v0.3.0 github.com/Azure/go-autorest/logger v0.1.0 github.com/Azure/go-autorest/tracing v0.5.0 - golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 + golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 ) diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.sum b/vendor/github.com/Azure/go-autorest/autorest/go.sum index 729b99cd099..37398d1d48a 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/go.sum +++ b/vendor/github.com/Azure/go-autorest/autorest/go.sum @@ -1,11 +1,18 @@ +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= @@ -14,5 +21,10 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/vendor/github.com/Azure/go-autorest/autorest/mocks/go.mod b/vendor/github.com/Azure/go-autorest/autorest/mocks/go.mod index 4d726a44e4b..f1dfdbeb52b 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/mocks/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/mocks/go.mod @@ -1,3 +1,5 @@ module github.com/Azure/go-autorest/autorest/mocks go 1.12 + +require github.com/Azure/go-autorest/autorest v0.9.0 diff --git a/vendor/github.com/Azure/go-autorest/autorest/mocks/go.sum b/vendor/github.com/Azure/go-autorest/autorest/mocks/go.sum new file mode 100644 index 00000000000..7d96b7ed87d --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/mocks/go.sum @@ -0,0 +1,16 @@ +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/Azure/go-autorest/autorest/mocks/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/mocks/go_mod_tidy_hack.go new file mode 100644 index 00000000000..b828eed70ee --- /dev/null +++ b/vendor/github.com/Azure/go-autorest/autorest/mocks/go_mod_tidy_hack.go @@ -0,0 +1,24 @@ +// +build modhack + +package mocks + +// Copyright 2017 Microsoft Corporation +// +// 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. + +// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of +// the resultant binary. + +// Necessary for safely adding multi-module repo. +// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository +import _ "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/go-autorest/autorest/preparer.go b/vendor/github.com/Azure/go-autorest/autorest/preparer.go index 9f864ab1a15..6e8ed64eba1 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/preparer.go +++ b/vendor/github.com/Azure/go-autorest/autorest/preparer.go @@ -523,7 +523,7 @@ func parseURL(u *url.URL, path string) (*url.URL, error) { // WithQueryParameters returns a PrepareDecorators that encodes and applies the query parameters // given in the supplied map (i.e., key=value). func WithQueryParameters(queryParameters map[string]interface{}) PrepareDecorator { - parameters := ensureValueStrings(queryParameters) + parameters := MapToValues(queryParameters) return func(p Preparer) Preparer { return PreparerFunc(func(r *http.Request) (*http.Request, error) { r, err := p.Prepare(r) @@ -531,14 +531,16 @@ func WithQueryParameters(queryParameters map[string]interface{}) PrepareDecorato if r.URL == nil { return r, NewError("autorest", "WithQueryParameters", "Invoked with a nil URL") } - v := r.URL.Query() for key, value := range parameters { - d, err := url.QueryUnescape(value) - if err != nil { - return r, err + for i := range value { + d, err := url.QueryUnescape(value[i]) + if err != nil { + return r, err + } + value[i] = d } - v.Add(key, d) + v[key] = value } r.URL.RawQuery = v.Encode() } diff --git a/vendor/github.com/Azure/go-autorest/autorest/sender.go b/vendor/github.com/Azure/go-autorest/autorest/sender.go index e582489b326..a07670b8cea 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/sender.go +++ b/vendor/github.com/Azure/go-autorest/autorest/sender.go @@ -243,6 +243,7 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator { if err != nil { return resp, err } + DrainResponseBody(resp) resp, err = s.Do(rr.Request()) if err == nil { return resp, err @@ -283,23 +284,26 @@ func DoRetryForStatusCodesWithCap(attempts int, backoff, cap time.Duration, code func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempts int, backoff, cap time.Duration, codes ...int) (resp *http.Response, err error) { rr := NewRetriableRequest(r) // Increment to add the first call (attempts denotes number of retries) - for attempt := 0; attempt < attempts+1; { + for attempt, delayCount := 0, 0; attempt < attempts+1; { err = rr.Prepare() if err != nil { return } + DrainResponseBody(resp) resp, err = s.Do(rr.Request()) - // if the error isn't temporary don't bother retrying - if err != nil && !IsTemporaryNetworkError(err) { - return - } // we want to retry if err is not nil (e.g. transient network failure). note that for failed authentication // resp and err will both have a value, so in this case we don't want to retry as it will never succeed. if err == nil && !ResponseHasStatusCode(resp, codes...) || IsTokenRefreshError(err) { return resp, err } delayed := DelayWithRetryAfter(resp, r.Context().Done()) - if !delayed && !DelayForBackoffWithCap(backoff, cap, attempt, r.Context().Done()) { + // enforce a 2 minute cap between requests when 429 status codes are + // not going to be counted as an attempt and when the cap is 0. + // this should only happen in the absence of a retry-after header. + if !count429 && cap == 0 { + cap = 2 * time.Minute + } + if !delayed && !DelayForBackoffWithCap(backoff, cap, delayCount, r.Context().Done()) { return resp, r.Context().Err() } // when count429 == false don't count a 429 against the number @@ -307,6 +311,9 @@ func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempt if count429 || (resp == nil || resp.StatusCode != http.StatusTooManyRequests) { attempt++ } + // delay count is tracked separately from attempts to + // ensure that 429 participates in exponential back-off + delayCount++ } return resp, err } @@ -351,6 +358,7 @@ func DoRetryForDuration(d time.Duration, backoff time.Duration) SendDecorator { if err != nil { return resp, err } + DrainResponseBody(resp) resp, err = s.Do(rr.Request()) if err == nil { return resp, err diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility.go b/vendor/github.com/Azure/go-autorest/autorest/utility.go index 08cf11c1189..67baab2cee2 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/utility.go +++ b/vendor/github.com/Azure/go-autorest/autorest/utility.go @@ -20,6 +20,7 @@ import ( "encoding/xml" "fmt" "io" + "io/ioutil" "net" "net/http" "net/url" @@ -140,18 +141,18 @@ func MapToValues(m map[string]interface{}) url.Values { return v } -// AsStringSlice method converts interface{} to []string. This expects a -//that the parameter passed to be a slice or array of a type that has the underlying -//type a string. +// AsStringSlice method converts interface{} to []string. +// s must be of type slice or array or an error is returned. +// Each element of s will be converted to its string representation. func AsStringSlice(s interface{}) ([]string, error) { v := reflect.ValueOf(s) if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { - return nil, NewError("autorest", "AsStringSlice", "the value's type is not an array.") + return nil, NewError("autorest", "AsStringSlice", "the value's type is not a slice or array.") } stringSlice := make([]string, 0, v.Len()) for i := 0; i < v.Len(); i++ { - stringSlice = append(stringSlice, v.Index(i).String()) + stringSlice = append(stringSlice, fmt.Sprintf("%v", v.Index(i))) } return stringSlice, nil } @@ -226,3 +227,13 @@ func IsTemporaryNetworkError(err error) bool { } return false } + +// DrainResponseBody reads the response body then closes it. +func DrainResponseBody(resp *http.Response) error { + if resp != nil && resp.Body != nil { + _, err := io.Copy(ioutil.Discard, resp.Body) + resp.Body.Close() + return err + } + return nil +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/version.go b/vendor/github.com/Azure/go-autorest/autorest/version.go index cb851937a11..a42f705d376 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/version.go +++ b/vendor/github.com/Azure/go-autorest/autorest/version.go @@ -19,7 +19,7 @@ import ( "runtime" ) -const number = "v13.0.0" +const number = "v13.4.0" var ( userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s", diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter/filter.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter/filter.go index e005c8fc3a6..fbf0f508d0b 100644 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter/filter.go +++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter/filter.go @@ -34,7 +34,7 @@ import ( "regexp" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" ) var ( diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go index da514d2d62a..44bdba5a805 100644 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go +++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen.go @@ -1,5 +1,5 @@ /* -Copyright 2019 Google LLC +Copyright 2020 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import ( "sync" "google.golang.org/api/googleapi" - "k8s.io/klog" + "k8s.io/klog/v2" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" @@ -51,6 +51,8 @@ type Cloud interface { BetaRegionBackendServices() BetaRegionBackendServices Disks() Disks RegionDisks() RegionDisks + AlphaFirewalls() AlphaFirewalls + BetaFirewalls() BetaFirewalls Firewalls() Firewalls ForwardingRules() ForwardingRules AlphaForwardingRules() AlphaForwardingRules @@ -63,6 +65,7 @@ type Cloud interface { BetaHealthChecks() BetaHealthChecks AlphaRegionHealthChecks() AlphaRegionHealthChecks BetaRegionHealthChecks() BetaRegionHealthChecks + RegionHealthChecks() RegionHealthChecks HttpHealthChecks() HttpHealthChecks HttpsHealthChecks() HttpsHealthChecks InstanceGroups() InstanceGroups @@ -84,6 +87,8 @@ type Cloud interface { AlphaSslCertificates() AlphaSslCertificates AlphaRegionSslCertificates() AlphaRegionSslCertificates BetaRegionSslCertificates() BetaRegionSslCertificates + RegionSslCertificates() RegionSslCertificates + SslPolicies() SslPolicies AlphaSubnetworks() AlphaSubnetworks BetaSubnetworks() BetaSubnetworks Subnetworks() Subnetworks @@ -92,17 +97,20 @@ type Cloud interface { TargetHttpProxies() TargetHttpProxies AlphaRegionTargetHttpProxies() AlphaRegionTargetHttpProxies BetaRegionTargetHttpProxies() BetaRegionTargetHttpProxies + RegionTargetHttpProxies() RegionTargetHttpProxies TargetHttpsProxies() TargetHttpsProxies AlphaTargetHttpsProxies() AlphaTargetHttpsProxies BetaTargetHttpsProxies() BetaTargetHttpsProxies AlphaRegionTargetHttpsProxies() AlphaRegionTargetHttpsProxies BetaRegionTargetHttpsProxies() BetaRegionTargetHttpsProxies + RegionTargetHttpsProxies() RegionTargetHttpsProxies TargetPools() TargetPools AlphaUrlMaps() AlphaUrlMaps BetaUrlMaps() BetaUrlMaps UrlMaps() UrlMaps AlphaRegionUrlMaps() AlphaRegionUrlMaps BetaRegionUrlMaps() BetaRegionUrlMaps + RegionUrlMaps() RegionUrlMaps Zones() Zones } @@ -122,6 +130,8 @@ func NewGCE(s *Service) *GCE { gceBetaRegionBackendServices: &GCEBetaRegionBackendServices{s}, gceDisks: &GCEDisks{s}, gceRegionDisks: &GCERegionDisks{s}, + gceAlphaFirewalls: &GCEAlphaFirewalls{s}, + gceBetaFirewalls: &GCEBetaFirewalls{s}, gceFirewalls: &GCEFirewalls{s}, gceForwardingRules: &GCEForwardingRules{s}, gceAlphaForwardingRules: &GCEAlphaForwardingRules{s}, @@ -134,6 +144,7 @@ func NewGCE(s *Service) *GCE { gceBetaHealthChecks: &GCEBetaHealthChecks{s}, gceAlphaRegionHealthChecks: &GCEAlphaRegionHealthChecks{s}, gceBetaRegionHealthChecks: &GCEBetaRegionHealthChecks{s}, + gceRegionHealthChecks: &GCERegionHealthChecks{s}, gceHttpHealthChecks: &GCEHttpHealthChecks{s}, gceHttpsHealthChecks: &GCEHttpsHealthChecks{s}, gceInstanceGroups: &GCEInstanceGroups{s}, @@ -155,6 +166,8 @@ func NewGCE(s *Service) *GCE { gceAlphaSslCertificates: &GCEAlphaSslCertificates{s}, gceAlphaRegionSslCertificates: &GCEAlphaRegionSslCertificates{s}, gceBetaRegionSslCertificates: &GCEBetaRegionSslCertificates{s}, + gceRegionSslCertificates: &GCERegionSslCertificates{s}, + gceSslPolicies: &GCESslPolicies{s}, gceAlphaSubnetworks: &GCEAlphaSubnetworks{s}, gceBetaSubnetworks: &GCEBetaSubnetworks{s}, gceSubnetworks: &GCESubnetworks{s}, @@ -163,17 +176,20 @@ func NewGCE(s *Service) *GCE { gceTargetHttpProxies: &GCETargetHttpProxies{s}, gceAlphaRegionTargetHttpProxies: &GCEAlphaRegionTargetHttpProxies{s}, gceBetaRegionTargetHttpProxies: &GCEBetaRegionTargetHttpProxies{s}, + gceRegionTargetHttpProxies: &GCERegionTargetHttpProxies{s}, gceTargetHttpsProxies: &GCETargetHttpsProxies{s}, gceAlphaTargetHttpsProxies: &GCEAlphaTargetHttpsProxies{s}, gceBetaTargetHttpsProxies: &GCEBetaTargetHttpsProxies{s}, gceAlphaRegionTargetHttpsProxies: &GCEAlphaRegionTargetHttpsProxies{s}, gceBetaRegionTargetHttpsProxies: &GCEBetaRegionTargetHttpsProxies{s}, + gceRegionTargetHttpsProxies: &GCERegionTargetHttpsProxies{s}, gceTargetPools: &GCETargetPools{s}, gceAlphaUrlMaps: &GCEAlphaUrlMaps{s}, gceBetaUrlMaps: &GCEBetaUrlMaps{s}, gceUrlMaps: &GCEUrlMaps{s}, gceAlphaRegionUrlMaps: &GCEAlphaRegionUrlMaps{s}, gceBetaRegionUrlMaps: &GCEBetaRegionUrlMaps{s}, + gceRegionUrlMaps: &GCERegionUrlMaps{s}, gceZones: &GCEZones{s}, } return g @@ -197,6 +213,8 @@ type GCE struct { gceBetaRegionBackendServices *GCEBetaRegionBackendServices gceDisks *GCEDisks gceRegionDisks *GCERegionDisks + gceAlphaFirewalls *GCEAlphaFirewalls + gceBetaFirewalls *GCEBetaFirewalls gceFirewalls *GCEFirewalls gceForwardingRules *GCEForwardingRules gceAlphaForwardingRules *GCEAlphaForwardingRules @@ -209,6 +227,7 @@ type GCE struct { gceBetaHealthChecks *GCEBetaHealthChecks gceAlphaRegionHealthChecks *GCEAlphaRegionHealthChecks gceBetaRegionHealthChecks *GCEBetaRegionHealthChecks + gceRegionHealthChecks *GCERegionHealthChecks gceHttpHealthChecks *GCEHttpHealthChecks gceHttpsHealthChecks *GCEHttpsHealthChecks gceInstanceGroups *GCEInstanceGroups @@ -230,6 +249,8 @@ type GCE struct { gceAlphaSslCertificates *GCEAlphaSslCertificates gceAlphaRegionSslCertificates *GCEAlphaRegionSslCertificates gceBetaRegionSslCertificates *GCEBetaRegionSslCertificates + gceRegionSslCertificates *GCERegionSslCertificates + gceSslPolicies *GCESslPolicies gceAlphaSubnetworks *GCEAlphaSubnetworks gceBetaSubnetworks *GCEBetaSubnetworks gceSubnetworks *GCESubnetworks @@ -238,17 +259,20 @@ type GCE struct { gceTargetHttpProxies *GCETargetHttpProxies gceAlphaRegionTargetHttpProxies *GCEAlphaRegionTargetHttpProxies gceBetaRegionTargetHttpProxies *GCEBetaRegionTargetHttpProxies + gceRegionTargetHttpProxies *GCERegionTargetHttpProxies gceTargetHttpsProxies *GCETargetHttpsProxies gceAlphaTargetHttpsProxies *GCEAlphaTargetHttpsProxies gceBetaTargetHttpsProxies *GCEBetaTargetHttpsProxies gceAlphaRegionTargetHttpsProxies *GCEAlphaRegionTargetHttpsProxies gceBetaRegionTargetHttpsProxies *GCEBetaRegionTargetHttpsProxies + gceRegionTargetHttpsProxies *GCERegionTargetHttpsProxies gceTargetPools *GCETargetPools gceAlphaUrlMaps *GCEAlphaUrlMaps gceBetaUrlMaps *GCEBetaUrlMaps gceUrlMaps *GCEUrlMaps gceAlphaRegionUrlMaps *GCEAlphaRegionUrlMaps gceBetaRegionUrlMaps *GCEBetaRegionUrlMaps + gceRegionUrlMaps *GCERegionUrlMaps gceZones *GCEZones } @@ -317,6 +341,16 @@ func (gce *GCE) RegionDisks() RegionDisks { return gce.gceRegionDisks } +// AlphaFirewalls returns the interface for the alpha Firewalls. +func (gce *GCE) AlphaFirewalls() AlphaFirewalls { + return gce.gceAlphaFirewalls +} + +// BetaFirewalls returns the interface for the beta Firewalls. +func (gce *GCE) BetaFirewalls() BetaFirewalls { + return gce.gceBetaFirewalls +} + // Firewalls returns the interface for the ga Firewalls. func (gce *GCE) Firewalls() Firewalls { return gce.gceFirewalls @@ -377,6 +411,11 @@ func (gce *GCE) BetaRegionHealthChecks() BetaRegionHealthChecks { return gce.gceBetaRegionHealthChecks } +// RegionHealthChecks returns the interface for the ga RegionHealthChecks. +func (gce *GCE) RegionHealthChecks() RegionHealthChecks { + return gce.gceRegionHealthChecks +} + // HttpHealthChecks returns the interface for the ga HttpHealthChecks. func (gce *GCE) HttpHealthChecks() HttpHealthChecks { return gce.gceHttpHealthChecks @@ -482,6 +521,16 @@ func (gce *GCE) BetaRegionSslCertificates() BetaRegionSslCertificates { return gce.gceBetaRegionSslCertificates } +// RegionSslCertificates returns the interface for the ga RegionSslCertificates. +func (gce *GCE) RegionSslCertificates() RegionSslCertificates { + return gce.gceRegionSslCertificates +} + +// SslPolicies returns the interface for the ga SslPolicies. +func (gce *GCE) SslPolicies() SslPolicies { + return gce.gceSslPolicies +} + // AlphaSubnetworks returns the interface for the alpha Subnetworks. func (gce *GCE) AlphaSubnetworks() AlphaSubnetworks { return gce.gceAlphaSubnetworks @@ -522,6 +571,11 @@ func (gce *GCE) BetaRegionTargetHttpProxies() BetaRegionTargetHttpProxies { return gce.gceBetaRegionTargetHttpProxies } +// RegionTargetHttpProxies returns the interface for the ga RegionTargetHttpProxies. +func (gce *GCE) RegionTargetHttpProxies() RegionTargetHttpProxies { + return gce.gceRegionTargetHttpProxies +} + // TargetHttpsProxies returns the interface for the ga TargetHttpsProxies. func (gce *GCE) TargetHttpsProxies() TargetHttpsProxies { return gce.gceTargetHttpsProxies @@ -547,6 +601,11 @@ func (gce *GCE) BetaRegionTargetHttpsProxies() BetaRegionTargetHttpsProxies { return gce.gceBetaRegionTargetHttpsProxies } +// RegionTargetHttpsProxies returns the interface for the ga RegionTargetHttpsProxies. +func (gce *GCE) RegionTargetHttpsProxies() RegionTargetHttpsProxies { + return gce.gceRegionTargetHttpsProxies +} + // TargetPools returns the interface for the ga TargetPools. func (gce *GCE) TargetPools() TargetPools { return gce.gceTargetPools @@ -577,6 +636,11 @@ func (gce *GCE) BetaRegionUrlMaps() BetaRegionUrlMaps { return gce.gceBetaRegionUrlMaps } +// RegionUrlMaps returns the interface for the ga RegionUrlMaps. +func (gce *GCE) RegionUrlMaps() RegionUrlMaps { + return gce.gceRegionUrlMaps +} + // Zones returns the interface for the ga Zones. func (gce *GCE) Zones() Zones { return gce.gceZones @@ -610,6 +674,7 @@ func NewMockGCE(projectRouter ProjectRouter) *MockGCE { mockRoutesObjs := map[meta.Key]*MockRoutesObj{} mockSecurityPoliciesObjs := map[meta.Key]*MockSecurityPoliciesObj{} mockSslCertificatesObjs := map[meta.Key]*MockSslCertificatesObj{} + mockSslPoliciesObjs := map[meta.Key]*MockSslPoliciesObj{} mockSubnetworksObjs := map[meta.Key]*MockSubnetworksObj{} mockTargetHttpProxiesObjs := map[meta.Key]*MockTargetHttpProxiesObj{} mockTargetHttpsProxiesObjs := map[meta.Key]*MockTargetHttpsProxiesObj{} @@ -631,6 +696,8 @@ func NewMockGCE(projectRouter ProjectRouter) *MockGCE { MockBetaRegionBackendServices: NewMockBetaRegionBackendServices(projectRouter, mockRegionBackendServicesObjs), MockDisks: NewMockDisks(projectRouter, mockDisksObjs), MockRegionDisks: NewMockRegionDisks(projectRouter, mockRegionDisksObjs), + MockAlphaFirewalls: NewMockAlphaFirewalls(projectRouter, mockFirewallsObjs), + MockBetaFirewalls: NewMockBetaFirewalls(projectRouter, mockFirewallsObjs), MockFirewalls: NewMockFirewalls(projectRouter, mockFirewallsObjs), MockForwardingRules: NewMockForwardingRules(projectRouter, mockForwardingRulesObjs), MockAlphaForwardingRules: NewMockAlphaForwardingRules(projectRouter, mockForwardingRulesObjs), @@ -643,6 +710,7 @@ func NewMockGCE(projectRouter ProjectRouter) *MockGCE { MockBetaHealthChecks: NewMockBetaHealthChecks(projectRouter, mockHealthChecksObjs), MockAlphaRegionHealthChecks: NewMockAlphaRegionHealthChecks(projectRouter, mockRegionHealthChecksObjs), MockBetaRegionHealthChecks: NewMockBetaRegionHealthChecks(projectRouter, mockRegionHealthChecksObjs), + MockRegionHealthChecks: NewMockRegionHealthChecks(projectRouter, mockRegionHealthChecksObjs), MockHttpHealthChecks: NewMockHttpHealthChecks(projectRouter, mockHttpHealthChecksObjs), MockHttpsHealthChecks: NewMockHttpsHealthChecks(projectRouter, mockHttpsHealthChecksObjs), MockInstanceGroups: NewMockInstanceGroups(projectRouter, mockInstanceGroupsObjs), @@ -664,6 +732,8 @@ func NewMockGCE(projectRouter ProjectRouter) *MockGCE { MockAlphaSslCertificates: NewMockAlphaSslCertificates(projectRouter, mockSslCertificatesObjs), MockAlphaRegionSslCertificates: NewMockAlphaRegionSslCertificates(projectRouter, mockRegionSslCertificatesObjs), MockBetaRegionSslCertificates: NewMockBetaRegionSslCertificates(projectRouter, mockRegionSslCertificatesObjs), + MockRegionSslCertificates: NewMockRegionSslCertificates(projectRouter, mockRegionSslCertificatesObjs), + MockSslPolicies: NewMockSslPolicies(projectRouter, mockSslPoliciesObjs), MockAlphaSubnetworks: NewMockAlphaSubnetworks(projectRouter, mockSubnetworksObjs), MockBetaSubnetworks: NewMockBetaSubnetworks(projectRouter, mockSubnetworksObjs), MockSubnetworks: NewMockSubnetworks(projectRouter, mockSubnetworksObjs), @@ -672,17 +742,20 @@ func NewMockGCE(projectRouter ProjectRouter) *MockGCE { MockTargetHttpProxies: NewMockTargetHttpProxies(projectRouter, mockTargetHttpProxiesObjs), MockAlphaRegionTargetHttpProxies: NewMockAlphaRegionTargetHttpProxies(projectRouter, mockRegionTargetHttpProxiesObjs), MockBetaRegionTargetHttpProxies: NewMockBetaRegionTargetHttpProxies(projectRouter, mockRegionTargetHttpProxiesObjs), + MockRegionTargetHttpProxies: NewMockRegionTargetHttpProxies(projectRouter, mockRegionTargetHttpProxiesObjs), MockTargetHttpsProxies: NewMockTargetHttpsProxies(projectRouter, mockTargetHttpsProxiesObjs), MockAlphaTargetHttpsProxies: NewMockAlphaTargetHttpsProxies(projectRouter, mockTargetHttpsProxiesObjs), MockBetaTargetHttpsProxies: NewMockBetaTargetHttpsProxies(projectRouter, mockTargetHttpsProxiesObjs), MockAlphaRegionTargetHttpsProxies: NewMockAlphaRegionTargetHttpsProxies(projectRouter, mockRegionTargetHttpsProxiesObjs), MockBetaRegionTargetHttpsProxies: NewMockBetaRegionTargetHttpsProxies(projectRouter, mockRegionTargetHttpsProxiesObjs), + MockRegionTargetHttpsProxies: NewMockRegionTargetHttpsProxies(projectRouter, mockRegionTargetHttpsProxiesObjs), MockTargetPools: NewMockTargetPools(projectRouter, mockTargetPoolsObjs), MockAlphaUrlMaps: NewMockAlphaUrlMaps(projectRouter, mockUrlMapsObjs), MockBetaUrlMaps: NewMockBetaUrlMaps(projectRouter, mockUrlMapsObjs), MockUrlMaps: NewMockUrlMaps(projectRouter, mockUrlMapsObjs), MockAlphaRegionUrlMaps: NewMockAlphaRegionUrlMaps(projectRouter, mockRegionUrlMapsObjs), MockBetaRegionUrlMaps: NewMockBetaRegionUrlMaps(projectRouter, mockRegionUrlMapsObjs), + MockRegionUrlMaps: NewMockRegionUrlMaps(projectRouter, mockRegionUrlMapsObjs), MockZones: NewMockZones(projectRouter, mockZonesObjs), } return mock @@ -706,6 +779,8 @@ type MockGCE struct { MockBetaRegionBackendServices *MockBetaRegionBackendServices MockDisks *MockDisks MockRegionDisks *MockRegionDisks + MockAlphaFirewalls *MockAlphaFirewalls + MockBetaFirewalls *MockBetaFirewalls MockFirewalls *MockFirewalls MockForwardingRules *MockForwardingRules MockAlphaForwardingRules *MockAlphaForwardingRules @@ -718,6 +793,7 @@ type MockGCE struct { MockBetaHealthChecks *MockBetaHealthChecks MockAlphaRegionHealthChecks *MockAlphaRegionHealthChecks MockBetaRegionHealthChecks *MockBetaRegionHealthChecks + MockRegionHealthChecks *MockRegionHealthChecks MockHttpHealthChecks *MockHttpHealthChecks MockHttpsHealthChecks *MockHttpsHealthChecks MockInstanceGroups *MockInstanceGroups @@ -739,6 +815,8 @@ type MockGCE struct { MockAlphaSslCertificates *MockAlphaSslCertificates MockAlphaRegionSslCertificates *MockAlphaRegionSslCertificates MockBetaRegionSslCertificates *MockBetaRegionSslCertificates + MockRegionSslCertificates *MockRegionSslCertificates + MockSslPolicies *MockSslPolicies MockAlphaSubnetworks *MockAlphaSubnetworks MockBetaSubnetworks *MockBetaSubnetworks MockSubnetworks *MockSubnetworks @@ -747,17 +825,20 @@ type MockGCE struct { MockTargetHttpProxies *MockTargetHttpProxies MockAlphaRegionTargetHttpProxies *MockAlphaRegionTargetHttpProxies MockBetaRegionTargetHttpProxies *MockBetaRegionTargetHttpProxies + MockRegionTargetHttpProxies *MockRegionTargetHttpProxies MockTargetHttpsProxies *MockTargetHttpsProxies MockAlphaTargetHttpsProxies *MockAlphaTargetHttpsProxies MockBetaTargetHttpsProxies *MockBetaTargetHttpsProxies MockAlphaRegionTargetHttpsProxies *MockAlphaRegionTargetHttpsProxies MockBetaRegionTargetHttpsProxies *MockBetaRegionTargetHttpsProxies + MockRegionTargetHttpsProxies *MockRegionTargetHttpsProxies MockTargetPools *MockTargetPools MockAlphaUrlMaps *MockAlphaUrlMaps MockBetaUrlMaps *MockBetaUrlMaps MockUrlMaps *MockUrlMaps MockAlphaRegionUrlMaps *MockAlphaRegionUrlMaps MockBetaRegionUrlMaps *MockBetaRegionUrlMaps + MockRegionUrlMaps *MockRegionUrlMaps MockZones *MockZones } @@ -826,6 +907,16 @@ func (mock *MockGCE) RegionDisks() RegionDisks { return mock.MockRegionDisks } +// AlphaFirewalls returns the interface for the alpha Firewalls. +func (mock *MockGCE) AlphaFirewalls() AlphaFirewalls { + return mock.MockAlphaFirewalls +} + +// BetaFirewalls returns the interface for the beta Firewalls. +func (mock *MockGCE) BetaFirewalls() BetaFirewalls { + return mock.MockBetaFirewalls +} + // Firewalls returns the interface for the ga Firewalls. func (mock *MockGCE) Firewalls() Firewalls { return mock.MockFirewalls @@ -886,6 +977,11 @@ func (mock *MockGCE) BetaRegionHealthChecks() BetaRegionHealthChecks { return mock.MockBetaRegionHealthChecks } +// RegionHealthChecks returns the interface for the ga RegionHealthChecks. +func (mock *MockGCE) RegionHealthChecks() RegionHealthChecks { + return mock.MockRegionHealthChecks +} + // HttpHealthChecks returns the interface for the ga HttpHealthChecks. func (mock *MockGCE) HttpHealthChecks() HttpHealthChecks { return mock.MockHttpHealthChecks @@ -991,6 +1087,16 @@ func (mock *MockGCE) BetaRegionSslCertificates() BetaRegionSslCertificates { return mock.MockBetaRegionSslCertificates } +// RegionSslCertificates returns the interface for the ga RegionSslCertificates. +func (mock *MockGCE) RegionSslCertificates() RegionSslCertificates { + return mock.MockRegionSslCertificates +} + +// SslPolicies returns the interface for the ga SslPolicies. +func (mock *MockGCE) SslPolicies() SslPolicies { + return mock.MockSslPolicies +} + // AlphaSubnetworks returns the interface for the alpha Subnetworks. func (mock *MockGCE) AlphaSubnetworks() AlphaSubnetworks { return mock.MockAlphaSubnetworks @@ -1031,6 +1137,11 @@ func (mock *MockGCE) BetaRegionTargetHttpProxies() BetaRegionTargetHttpProxies { return mock.MockBetaRegionTargetHttpProxies } +// RegionTargetHttpProxies returns the interface for the ga RegionTargetHttpProxies. +func (mock *MockGCE) RegionTargetHttpProxies() RegionTargetHttpProxies { + return mock.MockRegionTargetHttpProxies +} + // TargetHttpsProxies returns the interface for the ga TargetHttpsProxies. func (mock *MockGCE) TargetHttpsProxies() TargetHttpsProxies { return mock.MockTargetHttpsProxies @@ -1056,6 +1167,11 @@ func (mock *MockGCE) BetaRegionTargetHttpsProxies() BetaRegionTargetHttpsProxies return mock.MockBetaRegionTargetHttpsProxies } +// RegionTargetHttpsProxies returns the interface for the ga RegionTargetHttpsProxies. +func (mock *MockGCE) RegionTargetHttpsProxies() RegionTargetHttpsProxies { + return mock.MockRegionTargetHttpsProxies +} + // TargetPools returns the interface for the ga TargetPools. func (mock *MockGCE) TargetPools() TargetPools { return mock.MockTargetPools @@ -1086,6 +1202,11 @@ func (mock *MockGCE) BetaRegionUrlMaps() BetaRegionUrlMaps { return mock.MockBetaRegionUrlMaps } +// RegionUrlMaps returns the interface for the ga RegionUrlMaps. +func (mock *MockGCE) RegionUrlMaps() RegionUrlMaps { + return mock.MockRegionUrlMaps +} + // Zones returns the interface for the ga Zones. func (mock *MockGCE) Zones() Zones { return mock.MockZones @@ -1210,6 +1331,32 @@ type MockFirewallsObj struct { Obj interface{} } +// ToAlpha retrieves the given version of the object. +func (m *MockFirewallsObj) ToAlpha() *alpha.Firewall { + if ret, ok := m.Obj.(*alpha.Firewall); ok { + return ret + } + // Convert the object via JSON copying to the type that was requested. + ret := &alpha.Firewall{} + if err := copyViaJSON(ret, m.Obj); err != nil { + klog.Errorf("Could not convert %T to *alpha.Firewall via JSON: %v", m.Obj, err) + } + return ret +} + +// ToBeta retrieves the given version of the object. +func (m *MockFirewallsObj) ToBeta() *beta.Firewall { + if ret, ok := m.Obj.(*beta.Firewall); ok { + return ret + } + // Convert the object via JSON copying to the type that was requested. + ret := &beta.Firewall{} + if err := copyViaJSON(ret, m.Obj); err != nil { + klog.Errorf("Could not convert %T to *beta.Firewall via JSON: %v", m.Obj, err) + } + return ret +} + // ToGA retrieves the given version of the object. func (m *MockFirewallsObj) ToGA() *ga.Firewall { if ret, ok := m.Obj.(*ga.Firewall); ok { @@ -1711,6 +1858,19 @@ func (m *MockRegionHealthChecksObj) ToBeta() *beta.HealthCheck { return ret } +// ToGA retrieves the given version of the object. +func (m *MockRegionHealthChecksObj) ToGA() *ga.HealthCheck { + if ret, ok := m.Obj.(*ga.HealthCheck); ok { + return ret + } + // Convert the object via JSON copying to the type that was requested. + ret := &ga.HealthCheck{} + if err := copyViaJSON(ret, m.Obj); err != nil { + klog.Errorf("Could not convert %T to *ga.HealthCheck via JSON: %v", m.Obj, err) + } + return ret +} + // MockRegionSslCertificatesObj is used to store the various object versions in the shared // map of mocked objects. This allows for multiple API versions to co-exist and // share the same "view" of the objects in the backend. @@ -1744,6 +1904,19 @@ func (m *MockRegionSslCertificatesObj) ToBeta() *beta.SslCertificate { return ret } +// ToGA retrieves the given version of the object. +func (m *MockRegionSslCertificatesObj) ToGA() *ga.SslCertificate { + if ret, ok := m.Obj.(*ga.SslCertificate); ok { + return ret + } + // Convert the object via JSON copying to the type that was requested. + ret := &ga.SslCertificate{} + if err := copyViaJSON(ret, m.Obj); err != nil { + klog.Errorf("Could not convert %T to *ga.SslCertificate via JSON: %v", m.Obj, err) + } + return ret +} + // MockRegionTargetHttpProxiesObj is used to store the various object versions in the shared // map of mocked objects. This allows for multiple API versions to co-exist and // share the same "view" of the objects in the backend. @@ -1777,6 +1950,19 @@ func (m *MockRegionTargetHttpProxiesObj) ToBeta() *beta.TargetHttpProxy { return ret } +// ToGA retrieves the given version of the object. +func (m *MockRegionTargetHttpProxiesObj) ToGA() *ga.TargetHttpProxy { + if ret, ok := m.Obj.(*ga.TargetHttpProxy); ok { + return ret + } + // Convert the object via JSON copying to the type that was requested. + ret := &ga.TargetHttpProxy{} + if err := copyViaJSON(ret, m.Obj); err != nil { + klog.Errorf("Could not convert %T to *ga.TargetHttpProxy via JSON: %v", m.Obj, err) + } + return ret +} + // MockRegionTargetHttpsProxiesObj is used to store the various object versions in the shared // map of mocked objects. This allows for multiple API versions to co-exist and // share the same "view" of the objects in the backend. @@ -1810,6 +1996,19 @@ func (m *MockRegionTargetHttpsProxiesObj) ToBeta() *beta.TargetHttpsProxy { return ret } +// ToGA retrieves the given version of the object. +func (m *MockRegionTargetHttpsProxiesObj) ToGA() *ga.TargetHttpsProxy { + if ret, ok := m.Obj.(*ga.TargetHttpsProxy); ok { + return ret + } + // Convert the object via JSON copying to the type that was requested. + ret := &ga.TargetHttpsProxy{} + if err := copyViaJSON(ret, m.Obj); err != nil { + klog.Errorf("Could not convert %T to *ga.TargetHttpsProxy via JSON: %v", m.Obj, err) + } + return ret +} + // MockRegionUrlMapsObj is used to store the various object versions in the shared // map of mocked objects. This allows for multiple API versions to co-exist and // share the same "view" of the objects in the backend. @@ -1843,6 +2042,19 @@ func (m *MockRegionUrlMapsObj) ToBeta() *beta.UrlMap { return ret } +// ToGA retrieves the given version of the object. +func (m *MockRegionUrlMapsObj) ToGA() *ga.UrlMap { + if ret, ok := m.Obj.(*ga.UrlMap); ok { + return ret + } + // Convert the object via JSON copying to the type that was requested. + ret := &ga.UrlMap{} + if err := copyViaJSON(ret, m.Obj); err != nil { + klog.Errorf("Could not convert %T to *ga.UrlMap via JSON: %v", m.Obj, err) + } + return ret +} + // MockRegionsObj is used to store the various object versions in the shared // map of mocked objects. This allows for multiple API versions to co-exist and // share the same "view" of the objects in the backend. @@ -1949,6 +2161,26 @@ func (m *MockSslCertificatesObj) ToGA() *ga.SslCertificate { return ret } +// MockSslPoliciesObj is used to store the various object versions in the shared +// map of mocked objects. This allows for multiple API versions to co-exist and +// share the same "view" of the objects in the backend. +type MockSslPoliciesObj struct { + Obj interface{} +} + +// ToGA retrieves the given version of the object. +func (m *MockSslPoliciesObj) ToGA() *ga.SslPolicy { + if ret, ok := m.Obj.(*ga.SslPolicy); ok { + return ret + } + // Convert the object via JSON copying to the type that was requested. + ret := &ga.SslPolicy{} + if err := copyViaJSON(ret, m.Obj); err != nil { + klog.Errorf("Could not convert %T to *ga.SslPolicy via JSON: %v", m.Obj, err) + } + return ret +} + // MockSubnetworksObj is used to store the various object versions in the shared // map of mocked objects. This allows for multiple API versions to co-exist and // share the same "view" of the objects in the backend. @@ -2385,7 +2617,6 @@ func (m *MockAddresses) AggregatedList(ctx context.Context, fl *filter.F) (map[s objs := map[string][]*ga.Address{} for _, obj := range m.Objects { res, err := ParseResourceURL(obj.ToGA().SelfLink) - location := res.Key.Region if err != nil { klog.V(5).Infof("MockAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) return nil, err @@ -2393,6 +2624,7 @@ func (m *MockAddresses) AggregatedList(ctx context.Context, fl *filter.F) (map[s if !fl.Match(obj.ToGA()) { continue } + location := aggregatedListKey(res.Key) objs[location] = append(objs[location], obj.ToGA()) } klog.V(5).Infof("MockAddresses.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) @@ -2465,9 +2697,9 @@ func (g *GCEAddresses) List(ctx context.Context, region string, fl *filter.F) ([ return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -2581,9 +2813,9 @@ func (g *GCEAddresses) AggregatedList(ctx context.Context, fl *filter.F) (map[st klog.V(4).Infof("GCEAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -2805,7 +3037,6 @@ func (m *MockAlphaAddresses) AggregatedList(ctx context.Context, fl *filter.F) ( objs := map[string][]*alpha.Address{} for _, obj := range m.Objects { res, err := ParseResourceURL(obj.ToAlpha().SelfLink) - location := res.Key.Region if err != nil { klog.V(5).Infof("MockAlphaAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) return nil, err @@ -2813,6 +3044,7 @@ func (m *MockAlphaAddresses) AggregatedList(ctx context.Context, fl *filter.F) ( if !fl.Match(obj.ToAlpha()) { continue } + location := aggregatedListKey(res.Key) objs[location] = append(objs[location], obj.ToAlpha()) } klog.V(5).Infof("MockAlphaAddresses.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) @@ -2885,9 +3117,9 @@ func (g *GCEAlphaAddresses) List(ctx context.Context, region string, fl *filter. return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -3001,9 +3233,9 @@ func (g *GCEAlphaAddresses) AggregatedList(ctx context.Context, fl *filter.F) (m klog.V(4).Infof("GCEAlphaAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -3225,7 +3457,6 @@ func (m *MockBetaAddresses) AggregatedList(ctx context.Context, fl *filter.F) (m objs := map[string][]*beta.Address{} for _, obj := range m.Objects { res, err := ParseResourceURL(obj.ToBeta().SelfLink) - location := res.Key.Region if err != nil { klog.V(5).Infof("MockBetaAddresses.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) return nil, err @@ -3233,6 +3464,7 @@ func (m *MockBetaAddresses) AggregatedList(ctx context.Context, fl *filter.F) (m if !fl.Match(obj.ToBeta()) { continue } + location := aggregatedListKey(res.Key) objs[location] = append(objs[location], obj.ToBeta()) } klog.V(5).Infof("MockBetaAddresses.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) @@ -3305,9 +3537,9 @@ func (g *GCEBetaAddresses) List(ctx context.Context, region string, fl *filter.F return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -3421,9 +3653,9 @@ func (g *GCEBetaAddresses) AggregatedList(ctx context.Context, fl *filter.F) (ma klog.V(4).Infof("GCEBetaAddresses.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaAddresses.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -3684,9 +3916,9 @@ func (g *GCEAlphaGlobalAddresses) List(ctx context.Context, fl *filter.F) ([]*al return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaGlobalAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -4016,9 +4248,9 @@ func (g *GCEGlobalAddresses) List(ctx context.Context, fl *filter.F) ([]*ga.Addr return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEGlobalAddresses.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -4378,9 +4610,9 @@ func (g *GCEBackendServices) List(ctx context.Context, fl *filter.F) ([]*ga.Back return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -4824,9 +5056,9 @@ func (g *GCEBetaBackendServices) List(ctx context.Context, fl *filter.F) ([]*bet return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -5242,9 +5474,9 @@ func (g *GCEAlphaBackendServices) List(ctx context.Context, fl *filter.F) ([]*al return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -5663,9 +5895,9 @@ func (g *GCERegionBackendServices) List(ctx context.Context, region string, fl * return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCERegionBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -6078,9 +6310,9 @@ func (g *GCEAlphaRegionBackendServices) List(ctx context.Context, region string, return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaRegionBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -6493,9 +6725,9 @@ func (g *GCEBetaRegionBackendServices) List(ctx context.Context, region string, return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaRegionBackendServices.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -6898,9 +7130,9 @@ func (g *GCEDisks) List(ctx context.Context, zone string, fl *filter.F) ([]*ga.D return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEDisks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -7275,9 +7507,9 @@ func (g *GCERegionDisks) List(ctx context.Context, region string, fl *filter.F) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCERegionDisks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -7388,6 +7620,756 @@ func (g *GCERegionDisks) Resize(ctx context.Context, key *meta.Key, arg0 *ga.Reg return err } +// AlphaFirewalls is an interface that allows for mocking of Firewalls. +type AlphaFirewalls interface { + Get(ctx context.Context, key *meta.Key) (*alpha.Firewall, error) + List(ctx context.Context, fl *filter.F) ([]*alpha.Firewall, error) + Insert(ctx context.Context, key *meta.Key, obj *alpha.Firewall) error + Delete(ctx context.Context, key *meta.Key) error + Update(context.Context, *meta.Key, *alpha.Firewall) error +} + +// NewMockAlphaFirewalls returns a new mock for Firewalls. +func NewMockAlphaFirewalls(pr ProjectRouter, objs map[meta.Key]*MockFirewallsObj) *MockAlphaFirewalls { + mock := &MockAlphaFirewalls{ + ProjectRouter: pr, + + Objects: objs, + GetError: map[meta.Key]error{}, + InsertError: map[meta.Key]error{}, + DeleteError: map[meta.Key]error{}, + } + return mock +} + +// MockAlphaFirewalls is the mock for Firewalls. +type MockAlphaFirewalls struct { + Lock sync.Mutex + + ProjectRouter ProjectRouter + + // Objects maintained by the mock. + Objects map[meta.Key]*MockFirewallsObj + + // If an entry exists for the given key and operation, then the error + // will be returned instead of the operation. + GetError map[meta.Key]error + ListError *error + InsertError map[meta.Key]error + DeleteError map[meta.Key]error + + // xxxHook allow you to intercept the standard processing of the mock in + // order to add your own logic. Return (true, _, _) to prevent the normal + // execution flow of the mock. Return (false, nil, nil) to continue with + // normal mock behavior/ after the hook function executes. + GetHook func(ctx context.Context, key *meta.Key, m *MockAlphaFirewalls) (bool, *alpha.Firewall, error) + ListHook func(ctx context.Context, fl *filter.F, m *MockAlphaFirewalls) (bool, []*alpha.Firewall, error) + InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.Firewall, m *MockAlphaFirewalls) (bool, error) + DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaFirewalls) (bool, error) + UpdateHook func(context.Context, *meta.Key, *alpha.Firewall, *MockAlphaFirewalls) error + + // X is extra state that can be used as part of the mock. Generated code + // will not use this field. + X interface{} +} + +// Get returns the object from the mock. +func (m *MockAlphaFirewalls) Get(ctx context.Context, key *meta.Key) (*alpha.Firewall, error) { + if m.GetHook != nil { + if intercept, obj, err := m.GetHook(ctx, key, m); intercept { + klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = %+v, %v", ctx, key, obj, err) + return obj, err + } + } + if !key.Valid() { + return nil, fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.GetError[*key]; ok { + klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err + } + if obj, ok := m.Objects[*key]; ok { + typedObj := obj.ToAlpha() + klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = %+v, nil", ctx, key, typedObj) + return typedObj, nil + } + + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockAlphaFirewalls %v not found", key), + } + klog.V(5).Infof("MockAlphaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err +} + +// List all of the objects in the mock. +func (m *MockAlphaFirewalls) List(ctx context.Context, fl *filter.F) ([]*alpha.Firewall, error) { + if m.ListHook != nil { + if intercept, objs, err := m.ListHook(ctx, fl, m); intercept { + klog.V(5).Infof("MockAlphaFirewalls.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) + return objs, err + } + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if m.ListError != nil { + err := *m.ListError + klog.V(5).Infof("MockAlphaFirewalls.List(%v, %v) = nil, %v", ctx, fl, err) + + return nil, *m.ListError + } + + var objs []*alpha.Firewall + for _, obj := range m.Objects { + if !fl.Match(obj.ToAlpha()) { + continue + } + objs = append(objs, obj.ToAlpha()) + } + + klog.V(5).Infof("MockAlphaFirewalls.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) + return objs, nil +} + +// Insert is a mock for inserting/creating a new object. +func (m *MockAlphaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *alpha.Firewall) error { + if m.InsertHook != nil { + if intercept, err := m.InsertHook(ctx, key, obj, m); intercept { + klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.InsertError[*key]; ok { + klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + if _, ok := m.Objects[*key]; ok { + err := &googleapi.Error{ + Code: http.StatusConflict, + Message: fmt.Sprintf("MockAlphaFirewalls %v exists", key), + } + klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "firewalls") + obj.SelfLink = SelfLink(meta.VersionAlpha, projectID, "firewalls", key) + + m.Objects[*key] = &MockFirewallsObj{obj} + klog.V(5).Infof("MockAlphaFirewalls.Insert(%v, %v, %+v) = nil", ctx, key, obj) + return nil +} + +// Delete is a mock for deleting the object. +func (m *MockAlphaFirewalls) Delete(ctx context.Context, key *meta.Key) error { + if m.DeleteHook != nil { + if intercept, err := m.DeleteHook(ctx, key, m); intercept { + klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.DeleteError[*key]; ok { + klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err) + return err + } + if _, ok := m.Objects[*key]; !ok { + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockAlphaFirewalls %v not found", key), + } + klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + delete(m.Objects, *key) + klog.V(5).Infof("MockAlphaFirewalls.Delete(%v, %v) = nil", ctx, key) + return nil +} + +// Obj wraps the object for use in the mock. +func (m *MockAlphaFirewalls) Obj(o *alpha.Firewall) *MockFirewallsObj { + return &MockFirewallsObj{o} +} + +// Update is a mock for the corresponding method. +func (m *MockAlphaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *alpha.Firewall) error { + if m.UpdateHook != nil { + return m.UpdateHook(ctx, key, arg0, m) + } + return nil +} + +// GCEAlphaFirewalls is a simplifying adapter for the GCE Firewalls. +type GCEAlphaFirewalls struct { + s *Service +} + +// Get the Firewall named by key. +func (g *GCEAlphaFirewalls) Get(ctx context.Context, key *meta.Key) (*alpha.Firewall, error) { + klog.V(5).Infof("GCEAlphaFirewalls.Get(%v, %v): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCEAlphaFirewalls.Get(%v, %v): key is invalid (%#v)", ctx, key, key) + return nil, fmt.Errorf("invalid GCE key (%#v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Firewalls") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Get", + Version: meta.Version("alpha"), + Service: "Firewalls", + } + klog.V(5).Infof("GCEAlphaFirewalls.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCEAlphaFirewalls.Get(%v, %v): RateLimiter error: %v", ctx, key, err) + return nil, err + } + call := g.s.Alpha.Firewalls.Get(projectID, key.Name) + call.Context(ctx) + v, err := call.Do() + klog.V(4).Infof("GCEAlphaFirewalls.Get(%v, %v) = %+v, %v", ctx, key, v, err) + return v, err +} + +// List all Firewall objects. +func (g *GCEAlphaFirewalls) List(ctx context.Context, fl *filter.F) ([]*alpha.Firewall, error) { + klog.V(5).Infof("GCEAlphaFirewalls.List(%v, %v) called", ctx, fl) + projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Firewalls") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "List", + Version: meta.Version("alpha"), + Service: "Firewalls", + } + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + return nil, err + } + klog.V(5).Infof("GCEAlphaFirewalls.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk) + call := g.s.Alpha.Firewalls.List(projectID) + if fl != filter.None { + call.Filter(fl.String()) + } + var all []*alpha.Firewall + f := func(l *alpha.FirewallList) error { + klog.V(5).Infof("GCEAlphaFirewalls.List(%v, ..., %v): page %+v", ctx, fl, l) + all = append(all, l.Items...) + return nil + } + if err := call.Pages(ctx, f); err != nil { + klog.V(4).Infof("GCEAlphaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) + return nil, err + } + + if klog.V(4).Enabled() { + klog.V(4).Infof("GCEAlphaFirewalls.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) + } else if klog.V(5).Enabled() { + var asStr []string + for _, o := range all { + asStr = append(asStr, fmt.Sprintf("%+v", o)) + } + klog.V(5).Infof("GCEAlphaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) + } + + return all, nil +} + +// Insert Firewall with key of value obj. +func (g *GCEAlphaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *alpha.Firewall) error { + klog.V(5).Infof("GCEAlphaFirewalls.Insert(%v, %v, %+v): called", ctx, key, obj) + if !key.Valid() { + klog.V(2).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Firewalls") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Insert", + Version: meta.Version("alpha"), + Service: "Firewalls", + } + klog.V(5).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + obj.Name = key.Name + call := g.s.Alpha.Firewalls.Insert(projectID, obj) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCEAlphaFirewalls.Insert(%v, %v, ...) = %+v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCEAlphaFirewalls.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) + return err +} + +// Delete the Firewall referenced by key. +func (g *GCEAlphaFirewalls) Delete(ctx context.Context, key *meta.Key) error { + klog.V(5).Infof("GCEAlphaFirewalls.Delete(%v, %v): called", ctx, key) + if !key.Valid() { + klog.V(2).Infof("GCEAlphaFirewalls.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Firewalls") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Delete", + Version: meta.Version("alpha"), + Service: "Firewalls", + } + klog.V(5).Infof("GCEAlphaFirewalls.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCEAlphaFirewalls.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.Alpha.Firewalls.Delete(projectID, key.Name) + + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCEAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCEAlphaFirewalls.Delete(%v, %v) = %v", ctx, key, err) + return err +} + +// Update is a method on GCEAlphaFirewalls. +func (g *GCEAlphaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *alpha.Firewall) error { + klog.V(5).Infof("GCEAlphaFirewalls.Update(%v, %v, ...): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCEAlphaFirewalls.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "Firewalls") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Update", + Version: meta.Version("alpha"), + Service: "Firewalls", + } + klog.V(5).Infof("GCEAlphaFirewalls.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCEAlphaFirewalls.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.Alpha.Firewalls.Update(projectID, key.Name, arg0) + call.Context(ctx) + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCEAlphaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err) + return err + } + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCEAlphaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err) + return err +} + +// BetaFirewalls is an interface that allows for mocking of Firewalls. +type BetaFirewalls interface { + Get(ctx context.Context, key *meta.Key) (*beta.Firewall, error) + List(ctx context.Context, fl *filter.F) ([]*beta.Firewall, error) + Insert(ctx context.Context, key *meta.Key, obj *beta.Firewall) error + Delete(ctx context.Context, key *meta.Key) error + Update(context.Context, *meta.Key, *beta.Firewall) error +} + +// NewMockBetaFirewalls returns a new mock for Firewalls. +func NewMockBetaFirewalls(pr ProjectRouter, objs map[meta.Key]*MockFirewallsObj) *MockBetaFirewalls { + mock := &MockBetaFirewalls{ + ProjectRouter: pr, + + Objects: objs, + GetError: map[meta.Key]error{}, + InsertError: map[meta.Key]error{}, + DeleteError: map[meta.Key]error{}, + } + return mock +} + +// MockBetaFirewalls is the mock for Firewalls. +type MockBetaFirewalls struct { + Lock sync.Mutex + + ProjectRouter ProjectRouter + + // Objects maintained by the mock. + Objects map[meta.Key]*MockFirewallsObj + + // If an entry exists for the given key and operation, then the error + // will be returned instead of the operation. + GetError map[meta.Key]error + ListError *error + InsertError map[meta.Key]error + DeleteError map[meta.Key]error + + // xxxHook allow you to intercept the standard processing of the mock in + // order to add your own logic. Return (true, _, _) to prevent the normal + // execution flow of the mock. Return (false, nil, nil) to continue with + // normal mock behavior/ after the hook function executes. + GetHook func(ctx context.Context, key *meta.Key, m *MockBetaFirewalls) (bool, *beta.Firewall, error) + ListHook func(ctx context.Context, fl *filter.F, m *MockBetaFirewalls) (bool, []*beta.Firewall, error) + InsertHook func(ctx context.Context, key *meta.Key, obj *beta.Firewall, m *MockBetaFirewalls) (bool, error) + DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaFirewalls) (bool, error) + UpdateHook func(context.Context, *meta.Key, *beta.Firewall, *MockBetaFirewalls) error + + // X is extra state that can be used as part of the mock. Generated code + // will not use this field. + X interface{} +} + +// Get returns the object from the mock. +func (m *MockBetaFirewalls) Get(ctx context.Context, key *meta.Key) (*beta.Firewall, error) { + if m.GetHook != nil { + if intercept, obj, err := m.GetHook(ctx, key, m); intercept { + klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = %+v, %v", ctx, key, obj, err) + return obj, err + } + } + if !key.Valid() { + return nil, fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.GetError[*key]; ok { + klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err + } + if obj, ok := m.Objects[*key]; ok { + typedObj := obj.ToBeta() + klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = %+v, nil", ctx, key, typedObj) + return typedObj, nil + } + + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockBetaFirewalls %v not found", key), + } + klog.V(5).Infof("MockBetaFirewalls.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err +} + +// List all of the objects in the mock. +func (m *MockBetaFirewalls) List(ctx context.Context, fl *filter.F) ([]*beta.Firewall, error) { + if m.ListHook != nil { + if intercept, objs, err := m.ListHook(ctx, fl, m); intercept { + klog.V(5).Infof("MockBetaFirewalls.List(%v, %v) = [%v items], %v", ctx, fl, len(objs), err) + return objs, err + } + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if m.ListError != nil { + err := *m.ListError + klog.V(5).Infof("MockBetaFirewalls.List(%v, %v) = nil, %v", ctx, fl, err) + + return nil, *m.ListError + } + + var objs []*beta.Firewall + for _, obj := range m.Objects { + if !fl.Match(obj.ToBeta()) { + continue + } + objs = append(objs, obj.ToBeta()) + } + + klog.V(5).Infof("MockBetaFirewalls.List(%v, %v) = [%v items], nil", ctx, fl, len(objs)) + return objs, nil +} + +// Insert is a mock for inserting/creating a new object. +func (m *MockBetaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *beta.Firewall) error { + if m.InsertHook != nil { + if intercept, err := m.InsertHook(ctx, key, obj, m); intercept { + klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.InsertError[*key]; ok { + klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + if _, ok := m.Objects[*key]; ok { + err := &googleapi.Error{ + Code: http.StatusConflict, + Message: fmt.Sprintf("MockBetaFirewalls %v exists", key), + } + klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "beta", "firewalls") + obj.SelfLink = SelfLink(meta.VersionBeta, projectID, "firewalls", key) + + m.Objects[*key] = &MockFirewallsObj{obj} + klog.V(5).Infof("MockBetaFirewalls.Insert(%v, %v, %+v) = nil", ctx, key, obj) + return nil +} + +// Delete is a mock for deleting the object. +func (m *MockBetaFirewalls) Delete(ctx context.Context, key *meta.Key) error { + if m.DeleteHook != nil { + if intercept, err := m.DeleteHook(ctx, key, m); intercept { + klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.DeleteError[*key]; ok { + klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err) + return err + } + if _, ok := m.Objects[*key]; !ok { + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockBetaFirewalls %v not found", key), + } + klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + delete(m.Objects, *key) + klog.V(5).Infof("MockBetaFirewalls.Delete(%v, %v) = nil", ctx, key) + return nil +} + +// Obj wraps the object for use in the mock. +func (m *MockBetaFirewalls) Obj(o *beta.Firewall) *MockFirewallsObj { + return &MockFirewallsObj{o} +} + +// Update is a mock for the corresponding method. +func (m *MockBetaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *beta.Firewall) error { + if m.UpdateHook != nil { + return m.UpdateHook(ctx, key, arg0, m) + } + return nil +} + +// GCEBetaFirewalls is a simplifying adapter for the GCE Firewalls. +type GCEBetaFirewalls struct { + s *Service +} + +// Get the Firewall named by key. +func (g *GCEBetaFirewalls) Get(ctx context.Context, key *meta.Key) (*beta.Firewall, error) { + klog.V(5).Infof("GCEBetaFirewalls.Get(%v, %v): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCEBetaFirewalls.Get(%v, %v): key is invalid (%#v)", ctx, key, key) + return nil, fmt.Errorf("invalid GCE key (%#v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Firewalls") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Get", + Version: meta.Version("beta"), + Service: "Firewalls", + } + klog.V(5).Infof("GCEBetaFirewalls.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCEBetaFirewalls.Get(%v, %v): RateLimiter error: %v", ctx, key, err) + return nil, err + } + call := g.s.Beta.Firewalls.Get(projectID, key.Name) + call.Context(ctx) + v, err := call.Do() + klog.V(4).Infof("GCEBetaFirewalls.Get(%v, %v) = %+v, %v", ctx, key, v, err) + return v, err +} + +// List all Firewall objects. +func (g *GCEBetaFirewalls) List(ctx context.Context, fl *filter.F) ([]*beta.Firewall, error) { + klog.V(5).Infof("GCEBetaFirewalls.List(%v, %v) called", ctx, fl) + projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Firewalls") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "List", + Version: meta.Version("beta"), + Service: "Firewalls", + } + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + return nil, err + } + klog.V(5).Infof("GCEBetaFirewalls.List(%v, %v): projectID = %v, rk = %+v", ctx, fl, projectID, rk) + call := g.s.Beta.Firewalls.List(projectID) + if fl != filter.None { + call.Filter(fl.String()) + } + var all []*beta.Firewall + f := func(l *beta.FirewallList) error { + klog.V(5).Infof("GCEBetaFirewalls.List(%v, ..., %v): page %+v", ctx, fl, l) + all = append(all, l.Items...) + return nil + } + if err := call.Pages(ctx, f); err != nil { + klog.V(4).Infof("GCEBetaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) + return nil, err + } + + if klog.V(4).Enabled() { + klog.V(4).Infof("GCEBetaFirewalls.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) + } else if klog.V(5).Enabled() { + var asStr []string + for _, o := range all { + asStr = append(asStr, fmt.Sprintf("%+v", o)) + } + klog.V(5).Infof("GCEBetaFirewalls.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) + } + + return all, nil +} + +// Insert Firewall with key of value obj. +func (g *GCEBetaFirewalls) Insert(ctx context.Context, key *meta.Key, obj *beta.Firewall) error { + klog.V(5).Infof("GCEBetaFirewalls.Insert(%v, %v, %+v): called", ctx, key, obj) + if !key.Valid() { + klog.V(2).Infof("GCEBetaFirewalls.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Firewalls") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Insert", + Version: meta.Version("beta"), + Service: "Firewalls", + } + klog.V(5).Infof("GCEBetaFirewalls.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCEBetaFirewalls.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + obj.Name = key.Name + call := g.s.Beta.Firewalls.Insert(projectID, obj) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCEBetaFirewalls.Insert(%v, %v, ...) = %+v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCEBetaFirewalls.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) + return err +} + +// Delete the Firewall referenced by key. +func (g *GCEBetaFirewalls) Delete(ctx context.Context, key *meta.Key) error { + klog.V(5).Infof("GCEBetaFirewalls.Delete(%v, %v): called", ctx, key) + if !key.Valid() { + klog.V(2).Infof("GCEBetaFirewalls.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Firewalls") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Delete", + Version: meta.Version("beta"), + Service: "Firewalls", + } + klog.V(5).Infof("GCEBetaFirewalls.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCEBetaFirewalls.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.Beta.Firewalls.Delete(projectID, key.Name) + + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCEBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCEBetaFirewalls.Delete(%v, %v) = %v", ctx, key, err) + return err +} + +// Update is a method on GCEBetaFirewalls. +func (g *GCEBetaFirewalls) Update(ctx context.Context, key *meta.Key, arg0 *beta.Firewall) error { + klog.V(5).Infof("GCEBetaFirewalls.Update(%v, %v, ...): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCEBetaFirewalls.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "Firewalls") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Update", + Version: meta.Version("beta"), + Service: "Firewalls", + } + klog.V(5).Infof("GCEBetaFirewalls.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCEBetaFirewalls.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.Beta.Firewalls.Update(projectID, key.Name, arg0) + call.Context(ctx) + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCEBetaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err) + return err + } + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCEBetaFirewalls.Update(%v, %v, ...) = %+v", ctx, key, err) + return err +} + // Firewalls is an interface that allows for mocking of Firewalls. type Firewalls interface { Get(ctx context.Context, key *meta.Key) (*ga.Firewall, error) @@ -7649,9 +8631,9 @@ func (g *GCEFirewalls) List(ctx context.Context, fl *filter.F) ([]*ga.Firewall, return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEFirewalls.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -8027,9 +9009,9 @@ func (g *GCEForwardingRules) List(ctx context.Context, region string, fl *filter return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -8404,9 +9386,9 @@ func (g *GCEAlphaForwardingRules) List(ctx context.Context, region string, fl *f return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -8781,9 +9763,9 @@ func (g *GCEBetaForwardingRules) List(ctx context.Context, region string, fl *fi return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -9155,9 +10137,9 @@ func (g *GCEAlphaGlobalForwardingRules) List(ctx context.Context, fl *filter.F) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -9530,9 +10512,9 @@ func (g *GCEBetaGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ( return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -9905,9 +10887,9 @@ func (g *GCEGlobalForwardingRules) List(ctx context.Context, fl *filter.F) ([]*g return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEGlobalForwardingRules.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -10280,9 +11262,9 @@ func (g *GCEHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.HealthC return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -10655,9 +11637,9 @@ func (g *GCEAlphaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*alpha return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -11030,9 +12012,9 @@ func (g *GCEBetaHealthChecks) List(ctx context.Context, fl *filter.F) ([]*beta.H return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -11408,9 +12390,9 @@ func (g *GCEAlphaRegionHealthChecks) List(ctx context.Context, region string, fl return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaRegionHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -11785,9 +12767,9 @@ func (g *GCEBetaRegionHealthChecks) List(ctx context.Context, region string, fl return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaRegionHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -11898,6 +12880,383 @@ func (g *GCEBetaRegionHealthChecks) Update(ctx context.Context, key *meta.Key, a return err } +// RegionHealthChecks is an interface that allows for mocking of RegionHealthChecks. +type RegionHealthChecks interface { + Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error) + List(ctx context.Context, region string, fl *filter.F) ([]*ga.HealthCheck, error) + Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error + Delete(ctx context.Context, key *meta.Key) error + Update(context.Context, *meta.Key, *ga.HealthCheck) error +} + +// NewMockRegionHealthChecks returns a new mock for RegionHealthChecks. +func NewMockRegionHealthChecks(pr ProjectRouter, objs map[meta.Key]*MockRegionHealthChecksObj) *MockRegionHealthChecks { + mock := &MockRegionHealthChecks{ + ProjectRouter: pr, + + Objects: objs, + GetError: map[meta.Key]error{}, + InsertError: map[meta.Key]error{}, + DeleteError: map[meta.Key]error{}, + } + return mock +} + +// MockRegionHealthChecks is the mock for RegionHealthChecks. +type MockRegionHealthChecks struct { + Lock sync.Mutex + + ProjectRouter ProjectRouter + + // Objects maintained by the mock. + Objects map[meta.Key]*MockRegionHealthChecksObj + + // If an entry exists for the given key and operation, then the error + // will be returned instead of the operation. + GetError map[meta.Key]error + ListError *error + InsertError map[meta.Key]error + DeleteError map[meta.Key]error + + // xxxHook allow you to intercept the standard processing of the mock in + // order to add your own logic. Return (true, _, _) to prevent the normal + // execution flow of the mock. Return (false, nil, nil) to continue with + // normal mock behavior/ after the hook function executes. + GetHook func(ctx context.Context, key *meta.Key, m *MockRegionHealthChecks) (bool, *ga.HealthCheck, error) + ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionHealthChecks) (bool, []*ga.HealthCheck, error) + InsertHook func(ctx context.Context, key *meta.Key, obj *ga.HealthCheck, m *MockRegionHealthChecks) (bool, error) + DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionHealthChecks) (bool, error) + UpdateHook func(context.Context, *meta.Key, *ga.HealthCheck, *MockRegionHealthChecks) error + + // X is extra state that can be used as part of the mock. Generated code + // will not use this field. + X interface{} +} + +// Get returns the object from the mock. +func (m *MockRegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error) { + if m.GetHook != nil { + if intercept, obj, err := m.GetHook(ctx, key, m); intercept { + klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = %+v, %v", ctx, key, obj, err) + return obj, err + } + } + if !key.Valid() { + return nil, fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.GetError[*key]; ok { + klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err + } + if obj, ok := m.Objects[*key]; ok { + typedObj := obj.ToGA() + klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = %+v, nil", ctx, key, typedObj) + return typedObj, nil + } + + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockRegionHealthChecks %v not found", key), + } + klog.V(5).Infof("MockRegionHealthChecks.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err +} + +// List all of the objects in the mock in the given region. +func (m *MockRegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*ga.HealthCheck, error) { + if m.ListHook != nil { + if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept { + klog.V(5).Infof("MockRegionHealthChecks.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) + return objs, err + } + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if m.ListError != nil { + err := *m.ListError + klog.V(5).Infof("MockRegionHealthChecks.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) + + return nil, *m.ListError + } + + var objs []*ga.HealthCheck + for key, obj := range m.Objects { + if key.Region != region { + continue + } + if !fl.Match(obj.ToGA()) { + continue + } + objs = append(objs, obj.ToGA()) + } + + klog.V(5).Infof("MockRegionHealthChecks.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) + return objs, nil +} + +// Insert is a mock for inserting/creating a new object. +func (m *MockRegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error { + if m.InsertHook != nil { + if intercept, err := m.InsertHook(ctx, key, obj, m); intercept { + klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.InsertError[*key]; ok { + klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + if _, ok := m.Objects[*key]; ok { + err := &googleapi.Error{ + Code: http.StatusConflict, + Message: fmt.Sprintf("MockRegionHealthChecks %v exists", key), + } + klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "ga", "healthChecks") + obj.SelfLink = SelfLink(meta.VersionGA, projectID, "healthChecks", key) + + m.Objects[*key] = &MockRegionHealthChecksObj{obj} + klog.V(5).Infof("MockRegionHealthChecks.Insert(%v, %v, %+v) = nil", ctx, key, obj) + return nil +} + +// Delete is a mock for deleting the object. +func (m *MockRegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error { + if m.DeleteHook != nil { + if intercept, err := m.DeleteHook(ctx, key, m); intercept { + klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.DeleteError[*key]; ok { + klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) + return err + } + if _, ok := m.Objects[*key]; !ok { + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockRegionHealthChecks %v not found", key), + } + klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + delete(m.Objects, *key) + klog.V(5).Infof("MockRegionHealthChecks.Delete(%v, %v) = nil", ctx, key) + return nil +} + +// Obj wraps the object for use in the mock. +func (m *MockRegionHealthChecks) Obj(o *ga.HealthCheck) *MockRegionHealthChecksObj { + return &MockRegionHealthChecksObj{o} +} + +// Update is a mock for the corresponding method. +func (m *MockRegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HealthCheck) error { + if m.UpdateHook != nil { + return m.UpdateHook(ctx, key, arg0, m) + } + return nil +} + +// GCERegionHealthChecks is a simplifying adapter for the GCE RegionHealthChecks. +type GCERegionHealthChecks struct { + s *Service +} + +// Get the HealthCheck named by key. +func (g *GCERegionHealthChecks) Get(ctx context.Context, key *meta.Key) (*ga.HealthCheck, error) { + klog.V(5).Infof("GCERegionHealthChecks.Get(%v, %v): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCERegionHealthChecks.Get(%v, %v): key is invalid (%#v)", ctx, key, key) + return nil, fmt.Errorf("invalid GCE key (%#v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionHealthChecks") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Get", + Version: meta.Version("ga"), + Service: "RegionHealthChecks", + } + klog.V(5).Infof("GCERegionHealthChecks.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionHealthChecks.Get(%v, %v): RateLimiter error: %v", ctx, key, err) + return nil, err + } + call := g.s.GA.RegionHealthChecks.Get(projectID, key.Region, key.Name) + call.Context(ctx) + v, err := call.Do() + klog.V(4).Infof("GCERegionHealthChecks.Get(%v, %v) = %+v, %v", ctx, key, v, err) + return v, err +} + +// List all HealthCheck objects. +func (g *GCERegionHealthChecks) List(ctx context.Context, region string, fl *filter.F) ([]*ga.HealthCheck, error) { + klog.V(5).Infof("GCERegionHealthChecks.List(%v, %v, %v) called", ctx, region, fl) + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionHealthChecks") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "List", + Version: meta.Version("ga"), + Service: "RegionHealthChecks", + } + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + return nil, err + } + klog.V(5).Infof("GCERegionHealthChecks.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk) + call := g.s.GA.RegionHealthChecks.List(projectID, region) + if fl != filter.None { + call.Filter(fl.String()) + } + var all []*ga.HealthCheck + f := func(l *ga.HealthCheckList) error { + klog.V(5).Infof("GCERegionHealthChecks.List(%v, ..., %v): page %+v", ctx, fl, l) + all = append(all, l.Items...) + return nil + } + if err := call.Pages(ctx, f); err != nil { + klog.V(4).Infof("GCERegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) + return nil, err + } + + if klog.V(4).Enabled() { + klog.V(4).Infof("GCERegionHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) + } else if klog.V(5).Enabled() { + var asStr []string + for _, o := range all { + asStr = append(asStr, fmt.Sprintf("%+v", o)) + } + klog.V(5).Infof("GCERegionHealthChecks.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) + } + + return all, nil +} + +// Insert HealthCheck with key of value obj. +func (g *GCERegionHealthChecks) Insert(ctx context.Context, key *meta.Key, obj *ga.HealthCheck) error { + klog.V(5).Infof("GCERegionHealthChecks.Insert(%v, %v, %+v): called", ctx, key, obj) + if !key.Valid() { + klog.V(2).Infof("GCERegionHealthChecks.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionHealthChecks") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Insert", + Version: meta.Version("ga"), + Service: "RegionHealthChecks", + } + klog.V(5).Infof("GCERegionHealthChecks.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionHealthChecks.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + obj.Name = key.Name + call := g.s.GA.RegionHealthChecks.Insert(projectID, key.Region, obj) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionHealthChecks.Insert(%v, %v, ...) = %+v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionHealthChecks.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) + return err +} + +// Delete the HealthCheck referenced by key. +func (g *GCERegionHealthChecks) Delete(ctx context.Context, key *meta.Key) error { + klog.V(5).Infof("GCERegionHealthChecks.Delete(%v, %v): called", ctx, key) + if !key.Valid() { + klog.V(2).Infof("GCERegionHealthChecks.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionHealthChecks") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Delete", + Version: meta.Version("ga"), + Service: "RegionHealthChecks", + } + klog.V(5).Infof("GCERegionHealthChecks.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionHealthChecks.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.RegionHealthChecks.Delete(projectID, key.Region, key.Name) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionHealthChecks.Delete(%v, %v) = %v", ctx, key, err) + return err +} + +// Update is a method on GCERegionHealthChecks. +func (g *GCERegionHealthChecks) Update(ctx context.Context, key *meta.Key, arg0 *ga.HealthCheck) error { + klog.V(5).Infof("GCERegionHealthChecks.Update(%v, %v, ...): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCERegionHealthChecks.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionHealthChecks") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Update", + Version: meta.Version("ga"), + Service: "RegionHealthChecks", + } + klog.V(5).Infof("GCERegionHealthChecks.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionHealthChecks.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.RegionHealthChecks.Update(projectID, key.Region, key.Name, arg0) + call.Context(ctx) + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) + return err + } + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionHealthChecks.Update(%v, %v, ...) = %+v", ctx, key, err) + return err +} + // HttpHealthChecks is an interface that allows for mocking of HttpHealthChecks. type HttpHealthChecks interface { Get(ctx context.Context, key *meta.Key) (*ga.HttpHealthCheck, error) @@ -12159,9 +13518,9 @@ func (g *GCEHttpHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.Htt return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEHttpHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -12534,9 +13893,9 @@ func (g *GCEHttpsHealthChecks) List(ctx context.Context, fl *filter.F) ([]*ga.Ht return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEHttpsHealthChecks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -12942,9 +14301,9 @@ func (g *GCEInstanceGroups) List(ctx context.Context, zone string, fl *filter.F) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEInstanceGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -13087,9 +14446,9 @@ func (g *GCEInstanceGroups) ListInstances(ctx context.Context, key *meta.Key, ar klog.V(4).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...) = %v, %v", ctx, key, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEInstanceGroups.ListInstances(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -13439,9 +14798,9 @@ func (g *GCEInstances) List(ctx context.Context, zone string, fl *filter.F) ([]* return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -13869,9 +15228,9 @@ func (g *GCEBetaInstances) List(ctx context.Context, zone string, fl *filter.F) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -14332,9 +15691,9 @@ func (g *GCEAlphaInstances) List(ctx context.Context, zone string, fl *filter.F) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaInstances.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -14762,9 +16121,9 @@ func (g *GCEAlphaNetworks) List(ctx context.Context, fl *filter.F) ([]*alpha.Net return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaNetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -15094,9 +16453,9 @@ func (g *GCEBetaNetworks) List(ctx context.Context, fl *filter.F) ([]*beta.Netwo return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaNetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -15426,9 +16785,9 @@ func (g *GCENetworks) List(ctx context.Context, fl *filter.F) ([]*ga.Network, er return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCENetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -15725,7 +17084,6 @@ func (m *MockAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl objs := map[string][]*alpha.NetworkEndpointGroup{} for _, obj := range m.Objects { res, err := ParseResourceURL(obj.ToAlpha().SelfLink) - location := res.Key.Zone if err != nil { klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) return nil, err @@ -15733,6 +17091,7 @@ func (m *MockAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl if !fl.Match(obj.ToAlpha()) { continue } + location := aggregatedListKey(res.Key) objs[location] = append(objs[location], obj.ToAlpha()) } klog.V(5).Infof("MockAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) @@ -15829,9 +17188,9 @@ func (g *GCEAlphaNetworkEndpointGroups) List(ctx context.Context, zone string, f return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -15945,9 +17304,9 @@ func (g *GCEAlphaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl * klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -16055,9 +17414,9 @@ func (g *GCEAlphaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -16285,7 +17644,6 @@ func (m *MockBetaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl * objs := map[string][]*beta.NetworkEndpointGroup{} for _, obj := range m.Objects { res, err := ParseResourceURL(obj.ToBeta().SelfLink) - location := res.Key.Zone if err != nil { klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) return nil, err @@ -16293,6 +17651,7 @@ func (m *MockBetaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl * if !fl.Match(obj.ToBeta()) { continue } + location := aggregatedListKey(res.Key) objs[location] = append(objs[location], obj.ToBeta()) } klog.V(5).Infof("MockBetaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) @@ -16389,9 +17748,9 @@ func (g *GCEBetaNetworkEndpointGroups) List(ctx context.Context, zone string, fl return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaNetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -16505,9 +17864,9 @@ func (g *GCEBetaNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *f klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -16615,9 +17974,9 @@ func (g *GCEBetaNetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, klog.V(4).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaNetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -16845,7 +18204,6 @@ func (m *MockNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filt objs := map[string][]*ga.NetworkEndpointGroup{} for _, obj := range m.Objects { res, err := ParseResourceURL(obj.ToGA().SelfLink) - location := res.Key.Zone if err != nil { klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = nil, %v", ctx, fl, err) return nil, err @@ -16853,6 +18211,7 @@ func (m *MockNetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filt if !fl.Match(obj.ToGA()) { continue } + location := aggregatedListKey(res.Key) objs[location] = append(objs[location], obj.ToGA()) } klog.V(5).Infof("MockNetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], nil", ctx, fl, len(objs)) @@ -16949,9 +18308,9 @@ func (g *GCENetworkEndpointGroups) List(ctx context.Context, zone string, fl *fi return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCENetworkEndpointGroups.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -17065,9 +18424,9 @@ func (g *GCENetworkEndpointGroups) AggregatedList(ctx context.Context, fl *filte klog.V(4).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCENetworkEndpointGroups.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -17175,9 +18534,9 @@ func (g *GCENetworkEndpointGroups) ListNetworkEndpoints(ctx context.Context, key klog.V(4).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = %v, %v", ctx, key, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCENetworkEndpointGroups.ListNetworkEndpoints(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -17409,9 +18768,9 @@ func (g *GCERegions) List(ctx context.Context, fl *filter.F) ([]*ga.Region, erro return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCERegions.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -17673,9 +19032,9 @@ func (g *GCERoutes) List(ctx context.Context, fl *filter.F) ([]*ga.Route, error) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCERoutes.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -18055,9 +19414,9 @@ func (g *GCEBetaSecurityPolicies) List(ctx context.Context, fl *filter.F) ([]*be return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaSecurityPolicies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -18547,9 +19906,9 @@ func (g *GCESslCertificates) List(ctx context.Context, fl *filter.F) ([]*ga.SslC return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCESslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -18879,9 +20238,9 @@ func (g *GCEBetaSslCertificates) List(ctx context.Context, fl *filter.F) ([]*bet return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -19211,9 +20570,9 @@ func (g *GCEAlphaSslCertificates) List(ctx context.Context, fl *filter.F) ([]*al return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -19546,9 +20905,9 @@ func (g *GCEAlphaRegionSslCertificates) List(ctx context.Context, region string, return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaRegionSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -19880,9 +21239,9 @@ func (g *GCEBetaRegionSslCertificates) List(ctx context.Context, region string, return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaRegionSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -19960,6 +21319,596 @@ func (g *GCEBetaRegionSslCertificates) Delete(ctx context.Context, key *meta.Key return err } +// RegionSslCertificates is an interface that allows for mocking of RegionSslCertificates. +type RegionSslCertificates interface { + Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error) + List(ctx context.Context, region string, fl *filter.F) ([]*ga.SslCertificate, error) + Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error + Delete(ctx context.Context, key *meta.Key) error +} + +// NewMockRegionSslCertificates returns a new mock for RegionSslCertificates. +func NewMockRegionSslCertificates(pr ProjectRouter, objs map[meta.Key]*MockRegionSslCertificatesObj) *MockRegionSslCertificates { + mock := &MockRegionSslCertificates{ + ProjectRouter: pr, + + Objects: objs, + GetError: map[meta.Key]error{}, + InsertError: map[meta.Key]error{}, + DeleteError: map[meta.Key]error{}, + } + return mock +} + +// MockRegionSslCertificates is the mock for RegionSslCertificates. +type MockRegionSslCertificates struct { + Lock sync.Mutex + + ProjectRouter ProjectRouter + + // Objects maintained by the mock. + Objects map[meta.Key]*MockRegionSslCertificatesObj + + // If an entry exists for the given key and operation, then the error + // will be returned instead of the operation. + GetError map[meta.Key]error + ListError *error + InsertError map[meta.Key]error + DeleteError map[meta.Key]error + + // xxxHook allow you to intercept the standard processing of the mock in + // order to add your own logic. Return (true, _, _) to prevent the normal + // execution flow of the mock. Return (false, nil, nil) to continue with + // normal mock behavior/ after the hook function executes. + GetHook func(ctx context.Context, key *meta.Key, m *MockRegionSslCertificates) (bool, *ga.SslCertificate, error) + ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionSslCertificates) (bool, []*ga.SslCertificate, error) + InsertHook func(ctx context.Context, key *meta.Key, obj *ga.SslCertificate, m *MockRegionSslCertificates) (bool, error) + DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionSslCertificates) (bool, error) + + // X is extra state that can be used as part of the mock. Generated code + // will not use this field. + X interface{} +} + +// Get returns the object from the mock. +func (m *MockRegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error) { + if m.GetHook != nil { + if intercept, obj, err := m.GetHook(ctx, key, m); intercept { + klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = %+v, %v", ctx, key, obj, err) + return obj, err + } + } + if !key.Valid() { + return nil, fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.GetError[*key]; ok { + klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err + } + if obj, ok := m.Objects[*key]; ok { + typedObj := obj.ToGA() + klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = %+v, nil", ctx, key, typedObj) + return typedObj, nil + } + + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockRegionSslCertificates %v not found", key), + } + klog.V(5).Infof("MockRegionSslCertificates.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err +} + +// List all of the objects in the mock in the given region. +func (m *MockRegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*ga.SslCertificate, error) { + if m.ListHook != nil { + if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept { + klog.V(5).Infof("MockRegionSslCertificates.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) + return objs, err + } + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if m.ListError != nil { + err := *m.ListError + klog.V(5).Infof("MockRegionSslCertificates.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) + + return nil, *m.ListError + } + + var objs []*ga.SslCertificate + for key, obj := range m.Objects { + if key.Region != region { + continue + } + if !fl.Match(obj.ToGA()) { + continue + } + objs = append(objs, obj.ToGA()) + } + + klog.V(5).Infof("MockRegionSslCertificates.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) + return objs, nil +} + +// Insert is a mock for inserting/creating a new object. +func (m *MockRegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error { + if m.InsertHook != nil { + if intercept, err := m.InsertHook(ctx, key, obj, m); intercept { + klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.InsertError[*key]; ok { + klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + if _, ok := m.Objects[*key]; ok { + err := &googleapi.Error{ + Code: http.StatusConflict, + Message: fmt.Sprintf("MockRegionSslCertificates %v exists", key), + } + klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "ga", "sslCertificates") + obj.SelfLink = SelfLink(meta.VersionGA, projectID, "sslCertificates", key) + + m.Objects[*key] = &MockRegionSslCertificatesObj{obj} + klog.V(5).Infof("MockRegionSslCertificates.Insert(%v, %v, %+v) = nil", ctx, key, obj) + return nil +} + +// Delete is a mock for deleting the object. +func (m *MockRegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error { + if m.DeleteHook != nil { + if intercept, err := m.DeleteHook(ctx, key, m); intercept { + klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.DeleteError[*key]; ok { + klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) + return err + } + if _, ok := m.Objects[*key]; !ok { + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockRegionSslCertificates %v not found", key), + } + klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + delete(m.Objects, *key) + klog.V(5).Infof("MockRegionSslCertificates.Delete(%v, %v) = nil", ctx, key) + return nil +} + +// Obj wraps the object for use in the mock. +func (m *MockRegionSslCertificates) Obj(o *ga.SslCertificate) *MockRegionSslCertificatesObj { + return &MockRegionSslCertificatesObj{o} +} + +// GCERegionSslCertificates is a simplifying adapter for the GCE RegionSslCertificates. +type GCERegionSslCertificates struct { + s *Service +} + +// Get the SslCertificate named by key. +func (g *GCERegionSslCertificates) Get(ctx context.Context, key *meta.Key) (*ga.SslCertificate, error) { + klog.V(5).Infof("GCERegionSslCertificates.Get(%v, %v): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCERegionSslCertificates.Get(%v, %v): key is invalid (%#v)", ctx, key, key) + return nil, fmt.Errorf("invalid GCE key (%#v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionSslCertificates") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Get", + Version: meta.Version("ga"), + Service: "RegionSslCertificates", + } + klog.V(5).Infof("GCERegionSslCertificates.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionSslCertificates.Get(%v, %v): RateLimiter error: %v", ctx, key, err) + return nil, err + } + call := g.s.GA.RegionSslCertificates.Get(projectID, key.Region, key.Name) + call.Context(ctx) + v, err := call.Do() + klog.V(4).Infof("GCERegionSslCertificates.Get(%v, %v) = %+v, %v", ctx, key, v, err) + return v, err +} + +// List all SslCertificate objects. +func (g *GCERegionSslCertificates) List(ctx context.Context, region string, fl *filter.F) ([]*ga.SslCertificate, error) { + klog.V(5).Infof("GCERegionSslCertificates.List(%v, %v, %v) called", ctx, region, fl) + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionSslCertificates") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "List", + Version: meta.Version("ga"), + Service: "RegionSslCertificates", + } + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + return nil, err + } + klog.V(5).Infof("GCERegionSslCertificates.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk) + call := g.s.GA.RegionSslCertificates.List(projectID, region) + if fl != filter.None { + call.Filter(fl.String()) + } + var all []*ga.SslCertificate + f := func(l *ga.SslCertificateList) error { + klog.V(5).Infof("GCERegionSslCertificates.List(%v, ..., %v): page %+v", ctx, fl, l) + all = append(all, l.Items...) + return nil + } + if err := call.Pages(ctx, f); err != nil { + klog.V(4).Infof("GCERegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) + return nil, err + } + + if klog.V(4).Enabled() { + klog.V(4).Infof("GCERegionSslCertificates.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) + } else if klog.V(5).Enabled() { + var asStr []string + for _, o := range all { + asStr = append(asStr, fmt.Sprintf("%+v", o)) + } + klog.V(5).Infof("GCERegionSslCertificates.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) + } + + return all, nil +} + +// Insert SslCertificate with key of value obj. +func (g *GCERegionSslCertificates) Insert(ctx context.Context, key *meta.Key, obj *ga.SslCertificate) error { + klog.V(5).Infof("GCERegionSslCertificates.Insert(%v, %v, %+v): called", ctx, key, obj) + if !key.Valid() { + klog.V(2).Infof("GCERegionSslCertificates.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionSslCertificates") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Insert", + Version: meta.Version("ga"), + Service: "RegionSslCertificates", + } + klog.V(5).Infof("GCERegionSslCertificates.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionSslCertificates.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + obj.Name = key.Name + call := g.s.GA.RegionSslCertificates.Insert(projectID, key.Region, obj) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionSslCertificates.Insert(%v, %v, ...) = %+v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionSslCertificates.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) + return err +} + +// Delete the SslCertificate referenced by key. +func (g *GCERegionSslCertificates) Delete(ctx context.Context, key *meta.Key) error { + klog.V(5).Infof("GCERegionSslCertificates.Delete(%v, %v): called", ctx, key) + if !key.Valid() { + klog.V(2).Infof("GCERegionSslCertificates.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionSslCertificates") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Delete", + Version: meta.Version("ga"), + Service: "RegionSslCertificates", + } + klog.V(5).Infof("GCERegionSslCertificates.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionSslCertificates.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.RegionSslCertificates.Delete(projectID, key.Region, key.Name) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionSslCertificates.Delete(%v, %v) = %v", ctx, key, err) + return err +} + +// SslPolicies is an interface that allows for mocking of SslPolicies. +type SslPolicies interface { + Get(ctx context.Context, key *meta.Key) (*ga.SslPolicy, error) + Insert(ctx context.Context, key *meta.Key, obj *ga.SslPolicy) error + Delete(ctx context.Context, key *meta.Key) error +} + +// NewMockSslPolicies returns a new mock for SslPolicies. +func NewMockSslPolicies(pr ProjectRouter, objs map[meta.Key]*MockSslPoliciesObj) *MockSslPolicies { + mock := &MockSslPolicies{ + ProjectRouter: pr, + + Objects: objs, + GetError: map[meta.Key]error{}, + InsertError: map[meta.Key]error{}, + DeleteError: map[meta.Key]error{}, + } + return mock +} + +// MockSslPolicies is the mock for SslPolicies. +type MockSslPolicies struct { + Lock sync.Mutex + + ProjectRouter ProjectRouter + + // Objects maintained by the mock. + Objects map[meta.Key]*MockSslPoliciesObj + + // If an entry exists for the given key and operation, then the error + // will be returned instead of the operation. + GetError map[meta.Key]error + InsertError map[meta.Key]error + DeleteError map[meta.Key]error + + // xxxHook allow you to intercept the standard processing of the mock in + // order to add your own logic. Return (true, _, _) to prevent the normal + // execution flow of the mock. Return (false, nil, nil) to continue with + // normal mock behavior/ after the hook function executes. + GetHook func(ctx context.Context, key *meta.Key, m *MockSslPolicies) (bool, *ga.SslPolicy, error) + InsertHook func(ctx context.Context, key *meta.Key, obj *ga.SslPolicy, m *MockSslPolicies) (bool, error) + DeleteHook func(ctx context.Context, key *meta.Key, m *MockSslPolicies) (bool, error) + + // X is extra state that can be used as part of the mock. Generated code + // will not use this field. + X interface{} +} + +// Get returns the object from the mock. +func (m *MockSslPolicies) Get(ctx context.Context, key *meta.Key) (*ga.SslPolicy, error) { + if m.GetHook != nil { + if intercept, obj, err := m.GetHook(ctx, key, m); intercept { + klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) + return obj, err + } + } + if !key.Valid() { + return nil, fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.GetError[*key]; ok { + klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err + } + if obj, ok := m.Objects[*key]; ok { + typedObj := obj.ToGA() + klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) + return typedObj, nil + } + + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockSslPolicies %v not found", key), + } + klog.V(5).Infof("MockSslPolicies.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err +} + +// Insert is a mock for inserting/creating a new object. +func (m *MockSslPolicies) Insert(ctx context.Context, key *meta.Key, obj *ga.SslPolicy) error { + if m.InsertHook != nil { + if intercept, err := m.InsertHook(ctx, key, obj, m); intercept { + klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.InsertError[*key]; ok { + klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + if _, ok := m.Objects[*key]; ok { + err := &googleapi.Error{ + Code: http.StatusConflict, + Message: fmt.Sprintf("MockSslPolicies %v exists", key), + } + klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "ga", "sslPolicies") + obj.SelfLink = SelfLink(meta.VersionGA, projectID, "sslPolicies", key) + + m.Objects[*key] = &MockSslPoliciesObj{obj} + klog.V(5).Infof("MockSslPolicies.Insert(%v, %v, %+v) = nil", ctx, key, obj) + return nil +} + +// Delete is a mock for deleting the object. +func (m *MockSslPolicies) Delete(ctx context.Context, key *meta.Key) error { + if m.DeleteHook != nil { + if intercept, err := m.DeleteHook(ctx, key, m); intercept { + klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.DeleteError[*key]; ok { + klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + if _, ok := m.Objects[*key]; !ok { + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockSslPolicies %v not found", key), + } + klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + delete(m.Objects, *key) + klog.V(5).Infof("MockSslPolicies.Delete(%v, %v) = nil", ctx, key) + return nil +} + +// Obj wraps the object for use in the mock. +func (m *MockSslPolicies) Obj(o *ga.SslPolicy) *MockSslPoliciesObj { + return &MockSslPoliciesObj{o} +} + +// GCESslPolicies is a simplifying adapter for the GCE SslPolicies. +type GCESslPolicies struct { + s *Service +} + +// Get the SslPolicy named by key. +func (g *GCESslPolicies) Get(ctx context.Context, key *meta.Key) (*ga.SslPolicy, error) { + klog.V(5).Infof("GCESslPolicies.Get(%v, %v): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCESslPolicies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) + return nil, fmt.Errorf("invalid GCE key (%#v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslPolicies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Get", + Version: meta.Version("ga"), + Service: "SslPolicies", + } + klog.V(5).Infof("GCESslPolicies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCESslPolicies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) + return nil, err + } + call := g.s.GA.SslPolicies.Get(projectID, key.Name) + call.Context(ctx) + v, err := call.Do() + klog.V(4).Infof("GCESslPolicies.Get(%v, %v) = %+v, %v", ctx, key, v, err) + return v, err +} + +// Insert SslPolicy with key of value obj. +func (g *GCESslPolicies) Insert(ctx context.Context, key *meta.Key, obj *ga.SslPolicy) error { + klog.V(5).Infof("GCESslPolicies.Insert(%v, %v, %+v): called", ctx, key, obj) + if !key.Valid() { + klog.V(2).Infof("GCESslPolicies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslPolicies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Insert", + Version: meta.Version("ga"), + Service: "SslPolicies", + } + klog.V(5).Infof("GCESslPolicies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCESslPolicies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + obj.Name = key.Name + call := g.s.GA.SslPolicies.Insert(projectID, obj) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCESslPolicies.Insert(%v, %v, ...) = %+v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCESslPolicies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) + return err +} + +// Delete the SslPolicy referenced by key. +func (g *GCESslPolicies) Delete(ctx context.Context, key *meta.Key) error { + klog.V(5).Infof("GCESslPolicies.Delete(%v, %v): called", ctx, key) + if !key.Valid() { + klog.V(2).Infof("GCESslPolicies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "SslPolicies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Delete", + Version: meta.Version("ga"), + Service: "SslPolicies", + } + klog.V(5).Infof("GCESslPolicies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCESslPolicies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.SslPolicies.Delete(projectID, key.Name) + + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCESslPolicies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCESslPolicies.Delete(%v, %v) = %v", ctx, key, err) + return err +} + // AlphaSubnetworks is an interface that allows for mocking of Subnetworks. type AlphaSubnetworks interface { Get(ctx context.Context, key *meta.Key) (*alpha.Subnetwork, error) @@ -20214,9 +22163,9 @@ func (g *GCEAlphaSubnetworks) List(ctx context.Context, region string, fl *filte return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaSubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -20548,9 +22497,9 @@ func (g *GCEBetaSubnetworks) List(ctx context.Context, region string, fl *filter return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaSubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -20882,9 +22831,9 @@ func (g *GCESubnetworks) List(ctx context.Context, region string, fl *filter.F) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCESubnetworks.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -21223,9 +23172,9 @@ func (g *GCEAlphaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]* return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -21598,9 +23547,9 @@ func (g *GCEBetaTargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*b return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -21973,9 +23922,9 @@ func (g *GCETargetHttpProxies) List(ctx context.Context, fl *filter.F) ([]*ga.Ta return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCETargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -22351,9 +24300,9 @@ func (g *GCEAlphaRegionTargetHttpProxies) List(ctx context.Context, region strin return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaRegionTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -22728,9 +24677,9 @@ func (g *GCEBetaRegionTargetHttpProxies) List(ctx context.Context, region string return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaRegionTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -22841,6 +24790,383 @@ func (g *GCEBetaRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *met return err } +// RegionTargetHttpProxies is an interface that allows for mocking of RegionTargetHttpProxies. +type RegionTargetHttpProxies interface { + Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error) + List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpProxy, error) + Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error + Delete(ctx context.Context, key *meta.Key) error + SetUrlMap(context.Context, *meta.Key, *ga.UrlMapReference) error +} + +// NewMockRegionTargetHttpProxies returns a new mock for RegionTargetHttpProxies. +func NewMockRegionTargetHttpProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpProxiesObj) *MockRegionTargetHttpProxies { + mock := &MockRegionTargetHttpProxies{ + ProjectRouter: pr, + + Objects: objs, + GetError: map[meta.Key]error{}, + InsertError: map[meta.Key]error{}, + DeleteError: map[meta.Key]error{}, + } + return mock +} + +// MockRegionTargetHttpProxies is the mock for RegionTargetHttpProxies. +type MockRegionTargetHttpProxies struct { + Lock sync.Mutex + + ProjectRouter ProjectRouter + + // Objects maintained by the mock. + Objects map[meta.Key]*MockRegionTargetHttpProxiesObj + + // If an entry exists for the given key and operation, then the error + // will be returned instead of the operation. + GetError map[meta.Key]error + ListError *error + InsertError map[meta.Key]error + DeleteError map[meta.Key]error + + // xxxHook allow you to intercept the standard processing of the mock in + // order to add your own logic. Return (true, _, _) to prevent the normal + // execution flow of the mock. Return (false, nil, nil) to continue with + // normal mock behavior/ after the hook function executes. + GetHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpProxies) (bool, *ga.TargetHttpProxy, error) + ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionTargetHttpProxies) (bool, []*ga.TargetHttpProxy, error) + InsertHook func(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy, m *MockRegionTargetHttpProxies) (bool, error) + DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpProxies) (bool, error) + SetUrlMapHook func(context.Context, *meta.Key, *ga.UrlMapReference, *MockRegionTargetHttpProxies) error + + // X is extra state that can be used as part of the mock. Generated code + // will not use this field. + X interface{} +} + +// Get returns the object from the mock. +func (m *MockRegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error) { + if m.GetHook != nil { + if intercept, obj, err := m.GetHook(ctx, key, m); intercept { + klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) + return obj, err + } + } + if !key.Valid() { + return nil, fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.GetError[*key]; ok { + klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err + } + if obj, ok := m.Objects[*key]; ok { + typedObj := obj.ToGA() + klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) + return typedObj, nil + } + + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockRegionTargetHttpProxies %v not found", key), + } + klog.V(5).Infof("MockRegionTargetHttpProxies.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err +} + +// List all of the objects in the mock in the given region. +func (m *MockRegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpProxy, error) { + if m.ListHook != nil { + if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept { + klog.V(5).Infof("MockRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) + return objs, err + } + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if m.ListError != nil { + err := *m.ListError + klog.V(5).Infof("MockRegionTargetHttpProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) + + return nil, *m.ListError + } + + var objs []*ga.TargetHttpProxy + for key, obj := range m.Objects { + if key.Region != region { + continue + } + if !fl.Match(obj.ToGA()) { + continue + } + objs = append(objs, obj.ToGA()) + } + + klog.V(5).Infof("MockRegionTargetHttpProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) + return objs, nil +} + +// Insert is a mock for inserting/creating a new object. +func (m *MockRegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error { + if m.InsertHook != nil { + if intercept, err := m.InsertHook(ctx, key, obj, m); intercept { + klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.InsertError[*key]; ok { + klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + if _, ok := m.Objects[*key]; ok { + err := &googleapi.Error{ + Code: http.StatusConflict, + Message: fmt.Sprintf("MockRegionTargetHttpProxies %v exists", key), + } + klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "ga", "targetHttpProxies") + obj.SelfLink = SelfLink(meta.VersionGA, projectID, "targetHttpProxies", key) + + m.Objects[*key] = &MockRegionTargetHttpProxiesObj{obj} + klog.V(5).Infof("MockRegionTargetHttpProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) + return nil +} + +// Delete is a mock for deleting the object. +func (m *MockRegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error { + if m.DeleteHook != nil { + if intercept, err := m.DeleteHook(ctx, key, m); intercept { + klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.DeleteError[*key]; ok { + klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + if _, ok := m.Objects[*key]; !ok { + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockRegionTargetHttpProxies %v not found", key), + } + klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + delete(m.Objects, *key) + klog.V(5).Infof("MockRegionTargetHttpProxies.Delete(%v, %v) = nil", ctx, key) + return nil +} + +// Obj wraps the object for use in the mock. +func (m *MockRegionTargetHttpProxies) Obj(o *ga.TargetHttpProxy) *MockRegionTargetHttpProxiesObj { + return &MockRegionTargetHttpProxiesObj{o} +} + +// SetUrlMap is a mock for the corresponding method. +func (m *MockRegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error { + if m.SetUrlMapHook != nil { + return m.SetUrlMapHook(ctx, key, arg0, m) + } + return nil +} + +// GCERegionTargetHttpProxies is a simplifying adapter for the GCE RegionTargetHttpProxies. +type GCERegionTargetHttpProxies struct { + s *Service +} + +// Get the TargetHttpProxy named by key. +func (g *GCERegionTargetHttpProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpProxy, error) { + klog.V(5).Infof("GCERegionTargetHttpProxies.Get(%v, %v): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCERegionTargetHttpProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) + return nil, fmt.Errorf("invalid GCE key (%#v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Get", + Version: meta.Version("ga"), + Service: "RegionTargetHttpProxies", + } + klog.V(5).Infof("GCERegionTargetHttpProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionTargetHttpProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) + return nil, err + } + call := g.s.GA.RegionTargetHttpProxies.Get(projectID, key.Region, key.Name) + call.Context(ctx) + v, err := call.Do() + klog.V(4).Infof("GCERegionTargetHttpProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) + return v, err +} + +// List all TargetHttpProxy objects. +func (g *GCERegionTargetHttpProxies) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpProxy, error) { + klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, %v, %v) called", ctx, region, fl) + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "List", + Version: meta.Version("ga"), + Service: "RegionTargetHttpProxies", + } + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + return nil, err + } + klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk) + call := g.s.GA.RegionTargetHttpProxies.List(projectID, region) + if fl != filter.None { + call.Filter(fl.String()) + } + var all []*ga.TargetHttpProxy + f := func(l *ga.TargetHttpProxyList) error { + klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v): page %+v", ctx, fl, l) + all = append(all, l.Items...) + return nil + } + if err := call.Pages(ctx, f); err != nil { + klog.V(4).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) + return nil, err + } + + if klog.V(4).Enabled() { + klog.V(4).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) + } else if klog.V(5).Enabled() { + var asStr []string + for _, o := range all { + asStr = append(asStr, fmt.Sprintf("%+v", o)) + } + klog.V(5).Infof("GCERegionTargetHttpProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) + } + + return all, nil +} + +// Insert TargetHttpProxy with key of value obj. +func (g *GCERegionTargetHttpProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpProxy) error { + klog.V(5).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, %+v): called", ctx, key, obj) + if !key.Valid() { + klog.V(2).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Insert", + Version: meta.Version("ga"), + Service: "RegionTargetHttpProxies", + } + klog.V(5).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + obj.Name = key.Name + call := g.s.GA.RegionTargetHttpProxies.Insert(projectID, key.Region, obj) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionTargetHttpProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) + return err +} + +// Delete the TargetHttpProxy referenced by key. +func (g *GCERegionTargetHttpProxies) Delete(ctx context.Context, key *meta.Key) error { + klog.V(5).Infof("GCERegionTargetHttpProxies.Delete(%v, %v): called", ctx, key) + if !key.Valid() { + klog.V(2).Infof("GCERegionTargetHttpProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Delete", + Version: meta.Version("ga"), + Service: "RegionTargetHttpProxies", + } + klog.V(5).Infof("GCERegionTargetHttpProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionTargetHttpProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.RegionTargetHttpProxies.Delete(projectID, key.Region, key.Name) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionTargetHttpProxies.Delete(%v, %v) = %v", ctx, key, err) + return err +} + +// SetUrlMap is a method on GCERegionTargetHttpProxies. +func (g *GCERegionTargetHttpProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error { + klog.V(5).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "SetUrlMap", + Version: meta.Version("ga"), + Service: "RegionTargetHttpProxies", + } + klog.V(5).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.RegionTargetHttpProxies.SetUrlMap(projectID, key.Region, key.Name, arg0) + call.Context(ctx) + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) + return err + } + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionTargetHttpProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) + return err +} + // TargetHttpsProxies is an interface that allows for mocking of TargetHttpsProxies. type TargetHttpsProxies interface { Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error) @@ -22848,6 +25174,7 @@ type TargetHttpsProxies interface { Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error Delete(ctx context.Context, key *meta.Key) error SetSslCertificates(context.Context, *meta.Key, *ga.TargetHttpsProxiesSetSslCertificatesRequest) error + SetSslPolicy(context.Context, *meta.Key, *ga.SslPolicyReference) error SetUrlMap(context.Context, *meta.Key, *ga.UrlMapReference) error } @@ -22889,6 +25216,7 @@ type MockTargetHttpsProxies struct { InsertHook func(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy, m *MockTargetHttpsProxies) (bool, error) DeleteHook func(ctx context.Context, key *meta.Key, m *MockTargetHttpsProxies) (bool, error) SetSslCertificatesHook func(context.Context, *meta.Key, *ga.TargetHttpsProxiesSetSslCertificatesRequest, *MockTargetHttpsProxies) error + SetSslPolicyHook func(context.Context, *meta.Key, *ga.SslPolicyReference, *MockTargetHttpsProxies) error SetUrlMapHook func(context.Context, *meta.Key, *ga.UrlMapReference, *MockTargetHttpsProxies) error // X is extra state that can be used as part of the mock. Generated code @@ -23043,6 +25371,14 @@ func (m *MockTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *me return nil } +// SetSslPolicy is a mock for the corresponding method. +func (m *MockTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *ga.SslPolicyReference) error { + if m.SetSslPolicyHook != nil { + return m.SetSslPolicyHook(ctx, key, arg0, m) + } + return nil +} + // SetUrlMap is a mock for the corresponding method. func (m *MockTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error { if m.SetUrlMapHook != nil { @@ -23112,9 +25448,9 @@ func (g *GCETargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]*ga.T return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCETargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -23226,6 +25562,39 @@ func (g *GCETargetHttpsProxies) SetSslCertificates(ctx context.Context, key *met return err } +// SetSslPolicy is a method on GCETargetHttpsProxies. +func (g *GCETargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *ga.SslPolicyReference) error { + klog.V(5).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "TargetHttpsProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "SetSslPolicy", + Version: meta.Version("ga"), + Service: "TargetHttpsProxies", + } + klog.V(5).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.TargetHttpsProxies.SetSslPolicy(projectID, key.Name, arg0) + call.Context(ctx) + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) + return err + } + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCETargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) + return err +} + // SetUrlMap is a method on GCETargetHttpsProxies. func (g *GCETargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error { klog.V(5).Infof("GCETargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key) @@ -23266,6 +25635,7 @@ type AlphaTargetHttpsProxies interface { Insert(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy) error Delete(ctx context.Context, key *meta.Key) error SetSslCertificates(context.Context, *meta.Key, *alpha.TargetHttpsProxiesSetSslCertificatesRequest) error + SetSslPolicy(context.Context, *meta.Key, *alpha.SslPolicyReference) error SetUrlMap(context.Context, *meta.Key, *alpha.UrlMapReference) error } @@ -23307,6 +25677,7 @@ type MockAlphaTargetHttpsProxies struct { InsertHook func(ctx context.Context, key *meta.Key, obj *alpha.TargetHttpsProxy, m *MockAlphaTargetHttpsProxies) (bool, error) DeleteHook func(ctx context.Context, key *meta.Key, m *MockAlphaTargetHttpsProxies) (bool, error) SetSslCertificatesHook func(context.Context, *meta.Key, *alpha.TargetHttpsProxiesSetSslCertificatesRequest, *MockAlphaTargetHttpsProxies) error + SetSslPolicyHook func(context.Context, *meta.Key, *alpha.SslPolicyReference, *MockAlphaTargetHttpsProxies) error SetUrlMapHook func(context.Context, *meta.Key, *alpha.UrlMapReference, *MockAlphaTargetHttpsProxies) error // X is extra state that can be used as part of the mock. Generated code @@ -23461,6 +25832,14 @@ func (m *MockAlphaTargetHttpsProxies) SetSslCertificates(ctx context.Context, ke return nil } +// SetSslPolicy is a mock for the corresponding method. +func (m *MockAlphaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *alpha.SslPolicyReference) error { + if m.SetSslPolicyHook != nil { + return m.SetSslPolicyHook(ctx, key, arg0, m) + } + return nil +} + // SetUrlMap is a mock for the corresponding method. func (m *MockAlphaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error { if m.SetUrlMapHook != nil { @@ -23530,9 +25909,9 @@ func (g *GCEAlphaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([] return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -23644,6 +26023,39 @@ func (g *GCEAlphaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key return err } +// SetSslPolicy is a method on GCEAlphaTargetHttpsProxies. +func (g *GCEAlphaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *alpha.SslPolicyReference) error { + klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "alpha", "TargetHttpsProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "SetSslPolicy", + Version: meta.Version("alpha"), + Service: "TargetHttpsProxies", + } + klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.Alpha.TargetHttpsProxies.SetSslPolicy(projectID, key.Name, arg0) + call.Context(ctx) + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) + return err + } + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCEAlphaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) + return err +} + // SetUrlMap is a method on GCEAlphaTargetHttpsProxies. func (g *GCEAlphaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *alpha.UrlMapReference) error { klog.V(5).Infof("GCEAlphaTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key) @@ -23684,6 +26096,7 @@ type BetaTargetHttpsProxies interface { Insert(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy) error Delete(ctx context.Context, key *meta.Key) error SetSslCertificates(context.Context, *meta.Key, *beta.TargetHttpsProxiesSetSslCertificatesRequest) error + SetSslPolicy(context.Context, *meta.Key, *beta.SslPolicyReference) error SetUrlMap(context.Context, *meta.Key, *beta.UrlMapReference) error } @@ -23725,6 +26138,7 @@ type MockBetaTargetHttpsProxies struct { InsertHook func(ctx context.Context, key *meta.Key, obj *beta.TargetHttpsProxy, m *MockBetaTargetHttpsProxies) (bool, error) DeleteHook func(ctx context.Context, key *meta.Key, m *MockBetaTargetHttpsProxies) (bool, error) SetSslCertificatesHook func(context.Context, *meta.Key, *beta.TargetHttpsProxiesSetSslCertificatesRequest, *MockBetaTargetHttpsProxies) error + SetSslPolicyHook func(context.Context, *meta.Key, *beta.SslPolicyReference, *MockBetaTargetHttpsProxies) error SetUrlMapHook func(context.Context, *meta.Key, *beta.UrlMapReference, *MockBetaTargetHttpsProxies) error // X is extra state that can be used as part of the mock. Generated code @@ -23879,6 +26293,14 @@ func (m *MockBetaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key return nil } +// SetSslPolicy is a mock for the corresponding method. +func (m *MockBetaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *beta.SslPolicyReference) error { + if m.SetSslPolicyHook != nil { + return m.SetSslPolicyHook(ctx, key, arg0, m) + } + return nil +} + // SetUrlMap is a mock for the corresponding method. func (m *MockBetaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error { if m.SetUrlMapHook != nil { @@ -23948,9 +26370,9 @@ func (g *GCEBetaTargetHttpsProxies) List(ctx context.Context, fl *filter.F) ([]* return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -24062,6 +26484,39 @@ func (g *GCEBetaTargetHttpsProxies) SetSslCertificates(ctx context.Context, key return err } +// SetSslPolicy is a method on GCEBetaTargetHttpsProxies. +func (g *GCEBetaTargetHttpsProxies) SetSslPolicy(ctx context.Context, key *meta.Key, arg0 *beta.SslPolicyReference) error { + klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "beta", "TargetHttpsProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "SetSslPolicy", + Version: meta.Version("beta"), + Service: "TargetHttpsProxies", + } + klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.Beta.TargetHttpsProxies.SetSslPolicy(projectID, key.Name, arg0) + call.Context(ctx) + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) + return err + } + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCEBetaTargetHttpsProxies.SetSslPolicy(%v, %v, ...) = %+v", ctx, key, err) + return err +} + // SetUrlMap is a method on GCEBetaTargetHttpsProxies. func (g *GCEBetaTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *beta.UrlMapReference) error { klog.V(5).Infof("GCEBetaTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key) @@ -24369,9 +26824,9 @@ func (g *GCEAlphaRegionTargetHttpsProxies) List(ctx context.Context, region stri return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaRegionTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -24789,9 +27244,9 @@ func (g *GCEBetaRegionTargetHttpsProxies) List(ctx context.Context, region strin return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaRegionTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -24935,6 +27390,426 @@ func (g *GCEBetaRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *me return err } +// RegionTargetHttpsProxies is an interface that allows for mocking of RegionTargetHttpsProxies. +type RegionTargetHttpsProxies interface { + Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error) + List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpsProxy, error) + Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error + Delete(ctx context.Context, key *meta.Key) error + SetSslCertificates(context.Context, *meta.Key, *ga.RegionTargetHttpsProxiesSetSslCertificatesRequest) error + SetUrlMap(context.Context, *meta.Key, *ga.UrlMapReference) error +} + +// NewMockRegionTargetHttpsProxies returns a new mock for RegionTargetHttpsProxies. +func NewMockRegionTargetHttpsProxies(pr ProjectRouter, objs map[meta.Key]*MockRegionTargetHttpsProxiesObj) *MockRegionTargetHttpsProxies { + mock := &MockRegionTargetHttpsProxies{ + ProjectRouter: pr, + + Objects: objs, + GetError: map[meta.Key]error{}, + InsertError: map[meta.Key]error{}, + DeleteError: map[meta.Key]error{}, + } + return mock +} + +// MockRegionTargetHttpsProxies is the mock for RegionTargetHttpsProxies. +type MockRegionTargetHttpsProxies struct { + Lock sync.Mutex + + ProjectRouter ProjectRouter + + // Objects maintained by the mock. + Objects map[meta.Key]*MockRegionTargetHttpsProxiesObj + + // If an entry exists for the given key and operation, then the error + // will be returned instead of the operation. + GetError map[meta.Key]error + ListError *error + InsertError map[meta.Key]error + DeleteError map[meta.Key]error + + // xxxHook allow you to intercept the standard processing of the mock in + // order to add your own logic. Return (true, _, _) to prevent the normal + // execution flow of the mock. Return (false, nil, nil) to continue with + // normal mock behavior/ after the hook function executes. + GetHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpsProxies) (bool, *ga.TargetHttpsProxy, error) + ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionTargetHttpsProxies) (bool, []*ga.TargetHttpsProxy, error) + InsertHook func(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy, m *MockRegionTargetHttpsProxies) (bool, error) + DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionTargetHttpsProxies) (bool, error) + SetSslCertificatesHook func(context.Context, *meta.Key, *ga.RegionTargetHttpsProxiesSetSslCertificatesRequest, *MockRegionTargetHttpsProxies) error + SetUrlMapHook func(context.Context, *meta.Key, *ga.UrlMapReference, *MockRegionTargetHttpsProxies) error + + // X is extra state that can be used as part of the mock. Generated code + // will not use this field. + X interface{} +} + +// Get returns the object from the mock. +func (m *MockRegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error) { + if m.GetHook != nil { + if intercept, obj, err := m.GetHook(ctx, key, m); intercept { + klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = %+v, %v", ctx, key, obj, err) + return obj, err + } + } + if !key.Valid() { + return nil, fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.GetError[*key]; ok { + klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err + } + if obj, ok := m.Objects[*key]; ok { + typedObj := obj.ToGA() + klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = %+v, nil", ctx, key, typedObj) + return typedObj, nil + } + + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockRegionTargetHttpsProxies %v not found", key), + } + klog.V(5).Infof("MockRegionTargetHttpsProxies.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err +} + +// List all of the objects in the mock in the given region. +func (m *MockRegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpsProxy, error) { + if m.ListHook != nil { + if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept { + klog.V(5).Infof("MockRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) + return objs, err + } + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if m.ListError != nil { + err := *m.ListError + klog.V(5).Infof("MockRegionTargetHttpsProxies.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) + + return nil, *m.ListError + } + + var objs []*ga.TargetHttpsProxy + for key, obj := range m.Objects { + if key.Region != region { + continue + } + if !fl.Match(obj.ToGA()) { + continue + } + objs = append(objs, obj.ToGA()) + } + + klog.V(5).Infof("MockRegionTargetHttpsProxies.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) + return objs, nil +} + +// Insert is a mock for inserting/creating a new object. +func (m *MockRegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error { + if m.InsertHook != nil { + if intercept, err := m.InsertHook(ctx, key, obj, m); intercept { + klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.InsertError[*key]; ok { + klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + if _, ok := m.Objects[*key]; ok { + err := &googleapi.Error{ + Code: http.StatusConflict, + Message: fmt.Sprintf("MockRegionTargetHttpsProxies %v exists", key), + } + klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "ga", "targetHttpsProxies") + obj.SelfLink = SelfLink(meta.VersionGA, projectID, "targetHttpsProxies", key) + + m.Objects[*key] = &MockRegionTargetHttpsProxiesObj{obj} + klog.V(5).Infof("MockRegionTargetHttpsProxies.Insert(%v, %v, %+v) = nil", ctx, key, obj) + return nil +} + +// Delete is a mock for deleting the object. +func (m *MockRegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error { + if m.DeleteHook != nil { + if intercept, err := m.DeleteHook(ctx, key, m); intercept { + klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.DeleteError[*key]; ok { + klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + if _, ok := m.Objects[*key]; !ok { + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockRegionTargetHttpsProxies %v not found", key), + } + klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + delete(m.Objects, *key) + klog.V(5).Infof("MockRegionTargetHttpsProxies.Delete(%v, %v) = nil", ctx, key) + return nil +} + +// Obj wraps the object for use in the mock. +func (m *MockRegionTargetHttpsProxies) Obj(o *ga.TargetHttpsProxy) *MockRegionTargetHttpsProxiesObj { + return &MockRegionTargetHttpsProxiesObj{o} +} + +// SetSslCertificates is a mock for the corresponding method. +func (m *MockRegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *ga.RegionTargetHttpsProxiesSetSslCertificatesRequest) error { + if m.SetSslCertificatesHook != nil { + return m.SetSslCertificatesHook(ctx, key, arg0, m) + } + return nil +} + +// SetUrlMap is a mock for the corresponding method. +func (m *MockRegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error { + if m.SetUrlMapHook != nil { + return m.SetUrlMapHook(ctx, key, arg0, m) + } + return nil +} + +// GCERegionTargetHttpsProxies is a simplifying adapter for the GCE RegionTargetHttpsProxies. +type GCERegionTargetHttpsProxies struct { + s *Service +} + +// Get the TargetHttpsProxy named by key. +func (g *GCERegionTargetHttpsProxies) Get(ctx context.Context, key *meta.Key) (*ga.TargetHttpsProxy, error) { + klog.V(5).Infof("GCERegionTargetHttpsProxies.Get(%v, %v): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCERegionTargetHttpsProxies.Get(%v, %v): key is invalid (%#v)", ctx, key, key) + return nil, fmt.Errorf("invalid GCE key (%#v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Get", + Version: meta.Version("ga"), + Service: "RegionTargetHttpsProxies", + } + klog.V(5).Infof("GCERegionTargetHttpsProxies.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionTargetHttpsProxies.Get(%v, %v): RateLimiter error: %v", ctx, key, err) + return nil, err + } + call := g.s.GA.RegionTargetHttpsProxies.Get(projectID, key.Region, key.Name) + call.Context(ctx) + v, err := call.Do() + klog.V(4).Infof("GCERegionTargetHttpsProxies.Get(%v, %v) = %+v, %v", ctx, key, v, err) + return v, err +} + +// List all TargetHttpsProxy objects. +func (g *GCERegionTargetHttpsProxies) List(ctx context.Context, region string, fl *filter.F) ([]*ga.TargetHttpsProxy, error) { + klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, %v, %v) called", ctx, region, fl) + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "List", + Version: meta.Version("ga"), + Service: "RegionTargetHttpsProxies", + } + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + return nil, err + } + klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk) + call := g.s.GA.RegionTargetHttpsProxies.List(projectID, region) + if fl != filter.None { + call.Filter(fl.String()) + } + var all []*ga.TargetHttpsProxy + f := func(l *ga.TargetHttpsProxyList) error { + klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v): page %+v", ctx, fl, l) + all = append(all, l.Items...) + return nil + } + if err := call.Pages(ctx, f); err != nil { + klog.V(4).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) + return nil, err + } + + if klog.V(4).Enabled() { + klog.V(4).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) + } else if klog.V(5).Enabled() { + var asStr []string + for _, o := range all { + asStr = append(asStr, fmt.Sprintf("%+v", o)) + } + klog.V(5).Infof("GCERegionTargetHttpsProxies.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) + } + + return all, nil +} + +// Insert TargetHttpsProxy with key of value obj. +func (g *GCERegionTargetHttpsProxies) Insert(ctx context.Context, key *meta.Key, obj *ga.TargetHttpsProxy) error { + klog.V(5).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, %+v): called", ctx, key, obj) + if !key.Valid() { + klog.V(2).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Insert", + Version: meta.Version("ga"), + Service: "RegionTargetHttpsProxies", + } + klog.V(5).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + obj.Name = key.Name + call := g.s.GA.RegionTargetHttpsProxies.Insert(projectID, key.Region, obj) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, ...) = %+v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionTargetHttpsProxies.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) + return err +} + +// Delete the TargetHttpsProxy referenced by key. +func (g *GCERegionTargetHttpsProxies) Delete(ctx context.Context, key *meta.Key) error { + klog.V(5).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v): called", ctx, key) + if !key.Valid() { + klog.V(2).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Delete", + Version: meta.Version("ga"), + Service: "RegionTargetHttpsProxies", + } + klog.V(5).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.RegionTargetHttpsProxies.Delete(projectID, key.Region, key.Name) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionTargetHttpsProxies.Delete(%v, %v) = %v", ctx, key, err) + return err +} + +// SetSslCertificates is a method on GCERegionTargetHttpsProxies. +func (g *GCERegionTargetHttpsProxies) SetSslCertificates(ctx context.Context, key *meta.Key, arg0 *ga.RegionTargetHttpsProxiesSetSslCertificatesRequest) error { + klog.V(5).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "SetSslCertificates", + Version: meta.Version("ga"), + Service: "RegionTargetHttpsProxies", + } + klog.V(5).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.RegionTargetHttpsProxies.SetSslCertificates(projectID, key.Region, key.Name, arg0) + call.Context(ctx) + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) + return err + } + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionTargetHttpsProxies.SetSslCertificates(%v, %v, ...) = %+v", ctx, key, err) + return err +} + +// SetUrlMap is a method on GCERegionTargetHttpsProxies. +func (g *GCERegionTargetHttpsProxies) SetUrlMap(ctx context.Context, key *meta.Key, arg0 *ga.UrlMapReference) error { + klog.V(5).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionTargetHttpsProxies") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "SetUrlMap", + Version: meta.Version("ga"), + Service: "RegionTargetHttpsProxies", + } + klog.V(5).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.RegionTargetHttpsProxies.SetUrlMap(projectID, key.Region, key.Name, arg0) + call.Context(ctx) + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) + return err + } + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionTargetHttpsProxies.SetUrlMap(%v, %v, ...) = %+v", ctx, key, err) + return err +} + // TargetPools is an interface that allows for mocking of TargetPools. type TargetPools interface { Get(ctx context.Context, key *meta.Key) (*ga.TargetPool, error) @@ -25209,9 +28084,9 @@ func (g *GCETargetPools) List(ctx context.Context, region string, fl *filter.F) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCETargetPools.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -25616,9 +28491,9 @@ func (g *GCEAlphaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*alpha.UrlM return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -25991,9 +28866,9 @@ func (g *GCEBetaUrlMaps) List(ctx context.Context, fl *filter.F) ([]*beta.UrlMap return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -26366,9 +29241,9 @@ func (g *GCEUrlMaps) List(ctx context.Context, fl *filter.F) ([]*ga.UrlMap, erro return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -26744,9 +29619,9 @@ func (g *GCEAlphaRegionUrlMaps) List(ctx context.Context, region string, fl *fil return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEAlphaRegionUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -27121,9 +29996,9 @@ func (g *GCEBetaRegionUrlMaps) List(ctx context.Context, region string, fl *filt return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEBetaRegionUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -27234,6 +30109,383 @@ func (g *GCEBetaRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 * return err } +// RegionUrlMaps is an interface that allows for mocking of RegionUrlMaps. +type RegionUrlMaps interface { + Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error) + List(ctx context.Context, region string, fl *filter.F) ([]*ga.UrlMap, error) + Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error + Delete(ctx context.Context, key *meta.Key) error + Update(context.Context, *meta.Key, *ga.UrlMap) error +} + +// NewMockRegionUrlMaps returns a new mock for RegionUrlMaps. +func NewMockRegionUrlMaps(pr ProjectRouter, objs map[meta.Key]*MockRegionUrlMapsObj) *MockRegionUrlMaps { + mock := &MockRegionUrlMaps{ + ProjectRouter: pr, + + Objects: objs, + GetError: map[meta.Key]error{}, + InsertError: map[meta.Key]error{}, + DeleteError: map[meta.Key]error{}, + } + return mock +} + +// MockRegionUrlMaps is the mock for RegionUrlMaps. +type MockRegionUrlMaps struct { + Lock sync.Mutex + + ProjectRouter ProjectRouter + + // Objects maintained by the mock. + Objects map[meta.Key]*MockRegionUrlMapsObj + + // If an entry exists for the given key and operation, then the error + // will be returned instead of the operation. + GetError map[meta.Key]error + ListError *error + InsertError map[meta.Key]error + DeleteError map[meta.Key]error + + // xxxHook allow you to intercept the standard processing of the mock in + // order to add your own logic. Return (true, _, _) to prevent the normal + // execution flow of the mock. Return (false, nil, nil) to continue with + // normal mock behavior/ after the hook function executes. + GetHook func(ctx context.Context, key *meta.Key, m *MockRegionUrlMaps) (bool, *ga.UrlMap, error) + ListHook func(ctx context.Context, region string, fl *filter.F, m *MockRegionUrlMaps) (bool, []*ga.UrlMap, error) + InsertHook func(ctx context.Context, key *meta.Key, obj *ga.UrlMap, m *MockRegionUrlMaps) (bool, error) + DeleteHook func(ctx context.Context, key *meta.Key, m *MockRegionUrlMaps) (bool, error) + UpdateHook func(context.Context, *meta.Key, *ga.UrlMap, *MockRegionUrlMaps) error + + // X is extra state that can be used as part of the mock. Generated code + // will not use this field. + X interface{} +} + +// Get returns the object from the mock. +func (m *MockRegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error) { + if m.GetHook != nil { + if intercept, obj, err := m.GetHook(ctx, key, m); intercept { + klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = %+v, %v", ctx, key, obj, err) + return obj, err + } + } + if !key.Valid() { + return nil, fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.GetError[*key]; ok { + klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err + } + if obj, ok := m.Objects[*key]; ok { + typedObj := obj.ToGA() + klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = %+v, nil", ctx, key, typedObj) + return typedObj, nil + } + + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockRegionUrlMaps %v not found", key), + } + klog.V(5).Infof("MockRegionUrlMaps.Get(%v, %s) = nil, %v", ctx, key, err) + return nil, err +} + +// List all of the objects in the mock in the given region. +func (m *MockRegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*ga.UrlMap, error) { + if m.ListHook != nil { + if intercept, objs, err := m.ListHook(ctx, region, fl, m); intercept { + klog.V(5).Infof("MockRegionUrlMaps.List(%v, %q, %v) = [%v items], %v", ctx, region, fl, len(objs), err) + return objs, err + } + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if m.ListError != nil { + err := *m.ListError + klog.V(5).Infof("MockRegionUrlMaps.List(%v, %q, %v) = nil, %v", ctx, region, fl, err) + + return nil, *m.ListError + } + + var objs []*ga.UrlMap + for key, obj := range m.Objects { + if key.Region != region { + continue + } + if !fl.Match(obj.ToGA()) { + continue + } + objs = append(objs, obj.ToGA()) + } + + klog.V(5).Infof("MockRegionUrlMaps.List(%v, %q, %v) = [%v items], nil", ctx, region, fl, len(objs)) + return objs, nil +} + +// Insert is a mock for inserting/creating a new object. +func (m *MockRegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error { + if m.InsertHook != nil { + if intercept, err := m.InsertHook(ctx, key, obj, m); intercept { + klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.InsertError[*key]; ok { + klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + if _, ok := m.Objects[*key]; ok { + err := &googleapi.Error{ + Code: http.StatusConflict, + Message: fmt.Sprintf("MockRegionUrlMaps %v exists", key), + } + klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = %v", ctx, key, obj, err) + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "ga", "urlMaps") + obj.SelfLink = SelfLink(meta.VersionGA, projectID, "urlMaps", key) + + m.Objects[*key] = &MockRegionUrlMapsObj{obj} + klog.V(5).Infof("MockRegionUrlMaps.Insert(%v, %v, %+v) = nil", ctx, key, obj) + return nil +} + +// Delete is a mock for deleting the object. +func (m *MockRegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error { + if m.DeleteHook != nil { + if intercept, err := m.DeleteHook(ctx, key, m); intercept { + klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) + return err + } + } + if !key.Valid() { + return fmt.Errorf("invalid GCE key (%+v)", key) + } + + m.Lock.Lock() + defer m.Lock.Unlock() + + if err, ok := m.DeleteError[*key]; ok { + klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) + return err + } + if _, ok := m.Objects[*key]; !ok { + err := &googleapi.Error{ + Code: http.StatusNotFound, + Message: fmt.Sprintf("MockRegionUrlMaps %v not found", key), + } + klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + delete(m.Objects, *key) + klog.V(5).Infof("MockRegionUrlMaps.Delete(%v, %v) = nil", ctx, key) + return nil +} + +// Obj wraps the object for use in the mock. +func (m *MockRegionUrlMaps) Obj(o *ga.UrlMap) *MockRegionUrlMapsObj { + return &MockRegionUrlMapsObj{o} +} + +// Update is a mock for the corresponding method. +func (m *MockRegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *ga.UrlMap) error { + if m.UpdateHook != nil { + return m.UpdateHook(ctx, key, arg0, m) + } + return nil +} + +// GCERegionUrlMaps is a simplifying adapter for the GCE RegionUrlMaps. +type GCERegionUrlMaps struct { + s *Service +} + +// Get the UrlMap named by key. +func (g *GCERegionUrlMaps) Get(ctx context.Context, key *meta.Key) (*ga.UrlMap, error) { + klog.V(5).Infof("GCERegionUrlMaps.Get(%v, %v): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCERegionUrlMaps.Get(%v, %v): key is invalid (%#v)", ctx, key, key) + return nil, fmt.Errorf("invalid GCE key (%#v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionUrlMaps") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Get", + Version: meta.Version("ga"), + Service: "RegionUrlMaps", + } + klog.V(5).Infof("GCERegionUrlMaps.Get(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionUrlMaps.Get(%v, %v): RateLimiter error: %v", ctx, key, err) + return nil, err + } + call := g.s.GA.RegionUrlMaps.Get(projectID, key.Region, key.Name) + call.Context(ctx) + v, err := call.Do() + klog.V(4).Infof("GCERegionUrlMaps.Get(%v, %v) = %+v, %v", ctx, key, v, err) + return v, err +} + +// List all UrlMap objects. +func (g *GCERegionUrlMaps) List(ctx context.Context, region string, fl *filter.F) ([]*ga.UrlMap, error) { + klog.V(5).Infof("GCERegionUrlMaps.List(%v, %v, %v) called", ctx, region, fl) + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionUrlMaps") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "List", + Version: meta.Version("ga"), + Service: "RegionUrlMaps", + } + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + return nil, err + } + klog.V(5).Infof("GCERegionUrlMaps.List(%v, %v, %v): projectID = %v, rk = %+v", ctx, region, fl, projectID, rk) + call := g.s.GA.RegionUrlMaps.List(projectID, region) + if fl != filter.None { + call.Filter(fl.String()) + } + var all []*ga.UrlMap + f := func(l *ga.UrlMapList) error { + klog.V(5).Infof("GCERegionUrlMaps.List(%v, ..., %v): page %+v", ctx, fl, l) + all = append(all, l.Items...) + return nil + } + if err := call.Pages(ctx, f); err != nil { + klog.V(4).Infof("GCERegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, nil, err) + return nil, err + } + + if klog.V(4).Enabled() { + klog.V(4).Infof("GCERegionUrlMaps.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) + } else if klog.V(5).Enabled() { + var asStr []string + for _, o := range all { + asStr = append(asStr, fmt.Sprintf("%+v", o)) + } + klog.V(5).Infof("GCERegionUrlMaps.List(%v, ..., %v) = %v, %v", ctx, fl, asStr, nil) + } + + return all, nil +} + +// Insert UrlMap with key of value obj. +func (g *GCERegionUrlMaps) Insert(ctx context.Context, key *meta.Key, obj *ga.UrlMap) error { + klog.V(5).Infof("GCERegionUrlMaps.Insert(%v, %v, %+v): called", ctx, key, obj) + if !key.Valid() { + klog.V(2).Infof("GCERegionUrlMaps.Insert(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionUrlMaps") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Insert", + Version: meta.Version("ga"), + Service: "RegionUrlMaps", + } + klog.V(5).Infof("GCERegionUrlMaps.Insert(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionUrlMaps.Insert(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + obj.Name = key.Name + call := g.s.GA.RegionUrlMaps.Insert(projectID, key.Region, obj) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionUrlMaps.Insert(%v, %v, ...) = %+v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionUrlMaps.Insert(%v, %v, %+v) = %+v", ctx, key, obj, err) + return err +} + +// Delete the UrlMap referenced by key. +func (g *GCERegionUrlMaps) Delete(ctx context.Context, key *meta.Key) error { + klog.V(5).Infof("GCERegionUrlMaps.Delete(%v, %v): called", ctx, key) + if !key.Valid() { + klog.V(2).Infof("GCERegionUrlMaps.Delete(%v, %v): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionUrlMaps") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Delete", + Version: meta.Version("ga"), + Service: "RegionUrlMaps", + } + klog.V(5).Infof("GCERegionUrlMaps.Delete(%v, %v): projectID = %v, rk = %+v", ctx, key, projectID, rk) + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionUrlMaps.Delete(%v, %v): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.RegionUrlMaps.Delete(projectID, key.Region, key.Name) + call.Context(ctx) + + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) + return err + } + + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionUrlMaps.Delete(%v, %v) = %v", ctx, key, err) + return err +} + +// Update is a method on GCERegionUrlMaps. +func (g *GCERegionUrlMaps) Update(ctx context.Context, key *meta.Key, arg0 *ga.UrlMap) error { + klog.V(5).Infof("GCERegionUrlMaps.Update(%v, %v, ...): called", ctx, key) + + if !key.Valid() { + klog.V(2).Infof("GCERegionUrlMaps.Update(%v, %v, ...): key is invalid (%#v)", ctx, key, key) + return fmt.Errorf("invalid GCE key (%+v)", key) + } + projectID := g.s.ProjectRouter.ProjectID(ctx, "ga", "RegionUrlMaps") + rk := &RateLimitKey{ + ProjectID: projectID, + Operation: "Update", + Version: meta.Version("ga"), + Service: "RegionUrlMaps", + } + klog.V(5).Infof("GCERegionUrlMaps.Update(%v, %v, ...): projectID = %v, rk = %+v", ctx, key, projectID, rk) + + if err := g.s.RateLimiter.Accept(ctx, rk); err != nil { + klog.V(4).Infof("GCERegionUrlMaps.Update(%v, %v, ...): RateLimiter error: %v", ctx, key, err) + return err + } + call := g.s.GA.RegionUrlMaps.Update(projectID, key.Region, key.Name, arg0) + call.Context(ctx) + op, err := call.Do() + if err != nil { + klog.V(4).Infof("GCERegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) + return err + } + err = g.s.WaitForCompletion(ctx, op) + klog.V(4).Infof("GCERegionUrlMaps.Update(%v, %v, ...) = %+v", ctx, key, err) + return err +} + // Zones is an interface that allows for mocking of Zones. type Zones interface { Get(ctx context.Context, key *meta.Key) (*ga.Zone, error) @@ -27407,9 +30659,9 @@ func (g *GCEZones) List(ctx context.Context, fl *filter.F) ([]*ga.Zone, error) { return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("GCEZones.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -27576,6 +30828,12 @@ func NewSslCertificatesResourceID(project, name string) *ResourceID { return &ResourceID{project, "sslCertificates", key} } +// NewSslPoliciesResourceID creates a ResourceID for the SslPolicies resource. +func NewSslPoliciesResourceID(project, name string) *ResourceID { + key := meta.GlobalKey(name) + return &ResourceID{project, "sslPolicies", key} +} + // NewSubnetworksResourceID creates a ResourceID for the Subnetworks resource. func NewSubnetworksResourceID(project, region, name string) *ResourceID { key := meta.RegionalKey(name, region) diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go index d5ef72a75f5..7b5db45e4f7 100644 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go +++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta/meta.go @@ -199,6 +199,28 @@ var AllServices = []*ServiceInfo{ "Resize", }, }, + { + Object: "Firewall", + Service: "Firewalls", + Resource: "firewalls", + version: VersionAlpha, + keyType: Global, + serviceType: reflect.TypeOf(&alpha.FirewallsService{}), + additionalMethods: []string{ + "Update", + }, + }, + { + Object: "Firewall", + Service: "Firewalls", + Resource: "firewalls", + version: VersionBeta, + keyType: Global, + serviceType: reflect.TypeOf(&beta.FirewallsService{}), + additionalMethods: []string{ + "Update", + }, + }, { Object: "Firewall", Service: "Firewalls", @@ -327,6 +349,17 @@ var AllServices = []*ServiceInfo{ "Update", }, }, + { + Object: "HealthCheck", + Service: "RegionHealthChecks", + Resource: "healthChecks", + version: VersionGA, + keyType: Regional, + serviceType: reflect.TypeOf(&ga.RegionHealthChecksService{}), + additionalMethods: []string{ + "Update", + }, + }, { Object: "HttpHealthCheck", Service: "HttpHealthChecks", @@ -541,6 +574,22 @@ var AllServices = []*ServiceInfo{ keyType: Regional, serviceType: reflect.TypeOf(&beta.RegionSslCertificatesService{}), }, + { + Object: "SslCertificate", + Service: "RegionSslCertificates", + Resource: "sslCertificates", + version: VersionGA, + keyType: Regional, + serviceType: reflect.TypeOf(&ga.RegionSslCertificatesService{}), + }, + { + Object: "SslPolicy", + Service: "SslPolicies", + Resource: "sslPolicies", + keyType: Global, + serviceType: reflect.TypeOf(&ga.SslPoliciesService{}), + options: NoList, // List() naming convention is different in GCE API for this resource + }, { Object: "Subnetwork", Service: "Subnetworks", @@ -619,6 +668,17 @@ var AllServices = []*ServiceInfo{ "SetUrlMap", }, }, + { + Object: "TargetHttpProxy", + Service: "RegionTargetHttpProxies", + Resource: "targetHttpProxies", + version: VersionGA, + keyType: Regional, + serviceType: reflect.TypeOf(&ga.RegionTargetHttpProxiesService{}), + additionalMethods: []string{ + "SetUrlMap", + }, + }, { Object: "TargetHttpsProxy", Service: "TargetHttpsProxies", @@ -627,6 +687,7 @@ var AllServices = []*ServiceInfo{ serviceType: reflect.TypeOf(&ga.TargetHttpsProxiesService{}), additionalMethods: []string{ "SetSslCertificates", + "SetSslPolicy", "SetUrlMap", }, }, @@ -639,6 +700,7 @@ var AllServices = []*ServiceInfo{ serviceType: reflect.TypeOf(&alpha.TargetHttpsProxiesService{}), additionalMethods: []string{ "SetSslCertificates", + "SetSslPolicy", "SetUrlMap", }, }, @@ -651,6 +713,7 @@ var AllServices = []*ServiceInfo{ serviceType: reflect.TypeOf(&beta.TargetHttpsProxiesService{}), additionalMethods: []string{ "SetSslCertificates", + "SetSslPolicy", "SetUrlMap", }, }, @@ -678,6 +741,18 @@ var AllServices = []*ServiceInfo{ "SetUrlMap", }, }, + { + Object: "TargetHttpsProxy", + Service: "RegionTargetHttpsProxies", + Resource: "targetHttpsProxies", + version: VersionGA, + keyType: Regional, + serviceType: reflect.TypeOf(&ga.RegionTargetHttpsProxiesService{}), + additionalMethods: []string{ + "SetSslCertificates", + "SetUrlMap", + }, + }, { Object: "TargetPool", Service: "TargetPools", @@ -743,6 +818,17 @@ var AllServices = []*ServiceInfo{ "Update", }, }, + { + Object: "UrlMap", + Service: "RegionUrlMaps", + Resource: "urlMaps", + version: VersionGA, + keyType: Regional, + serviceType: reflect.TypeOf(&ga.RegionUrlMapsService{}), + additionalMethods: []string{ + "Update", + }, + }, { Object: "Zone", Service: "Zones", diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go index 9be80d35feb..3fb6cd29113 100644 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go +++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock/mock.go @@ -415,6 +415,38 @@ func UpdateFirewallHook(ctx context.Context, key *meta.Key, obj *ga.Firewall, m return nil } +// UpdateAlphaFirewallHook defines the hook for updating an alpha Firewall. It replaces the +// object with the same key in the mock with the updated object. +func UpdateAlphaFirewallHook(ctx context.Context, key *meta.Key, obj *alpha.Firewall, m *cloud.MockAlphaFirewalls) error { + _, err := m.Get(ctx, key) + if err != nil { + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "alpha", "firewalls") + obj.SelfLink = cloud.SelfLink(meta.VersionAlpha, projectID, "firewalls", key) + + m.Objects[*key] = &cloud.MockFirewallsObj{Obj: obj} + return nil +} + +// UpdateBetaFirewallHook defines the hook for updating a beta Firewall. It replaces the +// object with the same key in the mock with the updated object. +func UpdateBetaFirewallHook(ctx context.Context, key *meta.Key, obj *ga.Firewall, m *cloud.MockBetaFirewalls) error { + _, err := m.Get(ctx, key) + if err != nil { + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "beta", "firewalls") + obj.SelfLink = cloud.SelfLink(meta.VersionBeta, projectID, "firewalls", key) + + m.Objects[*key] = &cloud.MockFirewallsObj{Obj: obj} + return nil +} + // UpdateHealthCheckHook defines the hook for updating a HealthCheck. It // replaces the object with the same key in the mock with the updated object. func UpdateHealthCheckHook(ctx context.Context, key *meta.Key, obj *ga.HealthCheck, m *cloud.MockHealthChecks) error { @@ -492,6 +524,21 @@ func UpdateBetaRegionHealthCheckHook(ctx context.Context, key *meta.Key, obj *be return nil } +// UpdateRegionHealthCheckHook defines the hook for updating a HealthCheck. It +// replaces the object with the same key in the mock with the updated object. +func UpdateRegionHealthCheckHook(ctx context.Context, key *meta.Key, obj *ga.HealthCheck, m *cloud.MockRegionHealthChecks) error { + if _, err := m.Get(ctx, key); err != nil { + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "ga", "healthChecks") + obj.SelfLink = cloud.SelfLink(meta.VersionGA, projectID, "healthChecks", key) + + m.Objects[*key] = &cloud.MockRegionHealthChecksObj{Obj: obj} + return nil +} + // UpdateRegionBackendServiceHook defines the hook for updating a Region // BackendsService. It replaces the object with the same key in the mock with // the updated object. @@ -623,6 +670,22 @@ func UpdateAlphaURLMapHook(ctx context.Context, key *meta.Key, obj *alpha.UrlMap return nil } +// UpdateBetaURLMapHook defines the hook for updating a beta UrlMap. +// It replaces the object with the same key in the mock with the updated object. +func UpdateBetaURLMapHook(ctx context.Context, key *meta.Key, obj *beta.UrlMap, m *cloud.MockBetaUrlMaps) error { + _, err := m.Get(ctx, key) + if err != nil { + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "beta", "urlMaps") + obj.SelfLink = cloud.SelfLink(meta.VersionBeta, projectID, "urlMaps", key) + + m.Objects[*key] = &cloud.MockUrlMapsObj{Obj: obj} + return nil +} + // UpdateAlphaRegionURLMapHook defines the hook for updating an alpha UrlMap. // It replaces the object with the same key in the mock with the updated object. func UpdateAlphaRegionURLMapHook(ctx context.Context, key *meta.Key, obj *alpha.UrlMap, m *cloud.MockAlphaRegionUrlMaps) error { @@ -655,6 +718,22 @@ func UpdateBetaRegionURLMapHook(ctx context.Context, key *meta.Key, obj *alpha.U return nil } +// UpdateRegionURLMapHook defines the hook for updating a GA Regional UrlMap. +// It replaces the object with the same key in the mock with the updated object. +func UpdateRegionURLMapHook(ctx context.Context, key *meta.Key, obj *ga.UrlMap, m *cloud.MockRegionUrlMaps) error { + _, err := m.Get(ctx, key) + if err != nil { + return err + } + + obj.Name = key.Name + projectID := m.ProjectRouter.ProjectID(ctx, "ga", "urlMaps") + obj.SelfLink = cloud.SelfLink(meta.VersionGA, projectID, "urlMaps", key) + + m.Objects[*key] = &cloud.MockRegionUrlMapsObj{Obj: obj} + return nil +} + // SetTargetGlobalForwardingRuleHook defines the hook for setting the target proxy for a GlobalForwardingRule. func SetTargetGlobalForwardingRuleHook(ctx context.Context, key *meta.Key, obj *ga.TargetReference, m *cloud.MockGlobalForwardingRules) error { fw, err := m.Get(ctx, key) @@ -710,6 +789,17 @@ func SetTargetAlphaGlobalForwardingRuleHook(ctx context.Context, key *meta.Key, return nil } +// SetTargetBetaGlobalForwardingRuleHook defines the hook for setting the target proxy for a beta GlobalForwardingRule. +func SetTargetBetaGlobalForwardingRuleHook(ctx context.Context, key *meta.Key, obj *beta.TargetReference, m *cloud.MockBetaGlobalForwardingRules) error { + fw, err := m.Get(ctx, key) + if err != nil { + return err + } + + fw.Target = obj.Target + return nil +} + // SetURLMapTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy. func SetURLMapTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockTargetHttpProxies) error { tp, err := m.Get(ctx, key) @@ -754,6 +844,17 @@ func SetURLMapBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, return nil } +// SetURLMapRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy. +func SetURLMapRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockRegionTargetHttpsProxies) error { + tp, err := m.Get(ctx, key) + if err != nil { + return err + } + + tp.UrlMap = ref.UrlMap + return nil +} + // SetURLMapAlphaTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy. func SetURLMapAlphaTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *alpha.UrlMapReference, m *cloud.MockAlphaTargetHttpProxies) error { tp, err := m.Get(ctx, key) @@ -765,6 +866,28 @@ func SetURLMapAlphaTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref * return nil } +// SetURLMapBetaTargetHTTPProxyHook defines the hook for setting the url map for a beta TargetHttpProxy. +func SetURLMapBetaTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *beta.UrlMapReference, m *cloud.MockBetaTargetHttpProxies) error { + tp, err := m.Get(ctx, key) + if err != nil { + return err + } + + tp.UrlMap = ref.UrlMap + return nil +} + +// SetURLMapBetaTargetHTTPSProxyHook defines the hook for setting the url map for a beta TargetHttpsProxy. +func SetURLMapBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *beta.UrlMapReference, m *cloud.MockBetaTargetHttpsProxies) error { + tp, err := m.Get(ctx, key) + if err != nil { + return err + } + + tp.UrlMap = ref.UrlMap + return nil +} + // SetURLMapAlphaRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy. func SetURLMapAlphaRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *alpha.UrlMapReference, m *cloud.MockAlphaRegionTargetHttpProxies) error { tp, err := m.Get(ctx, key) @@ -787,6 +910,17 @@ func SetURLMapBetaRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key, return nil } +// SetURLMapRegionTargetHTTPProxyHook defines the hook for setting the url map for a TargetHttpProxy. +func SetURLMapRegionTargetHTTPProxyHook(ctx context.Context, key *meta.Key, ref *ga.UrlMapReference, m *cloud.MockRegionTargetHttpProxies) error { + tp, err := m.Get(ctx, key) + if err != nil { + return err + } + + tp.UrlMap = ref.UrlMap + return nil +} + // SetSslCertificateTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. func SetSslCertificateTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *ga.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockTargetHttpsProxies) error { tp, err := m.Get(ctx, key) @@ -808,6 +942,16 @@ func SetSslCertificateAlphaTargetHTTPSProxyHook(ctx context.Context, key *meta.K return nil } +// SetSslCertificateAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. +func SetSslCertificateBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *beta.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockBetaTargetHttpsProxies) error { + tp, err := m.Get(ctx, key) + if err != nil { + return err + } + tp.SslCertificates = req.SslCertificates + return nil +} + // SetSslCertificateAlphaRegionTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. func SetSslCertificateAlphaRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *alpha.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockAlphaRegionTargetHttpsProxies) error { tp, err := m.Get(ctx, key) @@ -830,6 +974,49 @@ func SetSslCertificateBetaRegionTargetHTTPSProxyHook(ctx context.Context, key *m return nil } +// SetSslCertificateRegionTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. +func SetSslCertificateRegionTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, req *ga.TargetHttpsProxiesSetSslCertificatesRequest, m *cloud.MockRegionTargetHttpsProxies) error { + tp, err := m.Get(ctx, key) + if err != nil { + return err + } + + tp.SslCertificates = req.SslCertificates + return nil +} + +// SetSslCertificateTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. +func SetSslPolicyTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *ga.SslPolicyReference, m *cloud.MockTargetHttpsProxies) error { + tp, err := m.Get(ctx, key) + if err != nil { + return err + } + + tp.SslPolicy = ref.SslPolicy + return nil +} + +// SetSslCertificateAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. +func SetSslPolicyAlphaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *alpha.SslPolicyReference, m *cloud.MockAlphaTargetHttpsProxies) error { + tp, err := m.Get(ctx, key) + if err != nil { + return err + } + tp.SslPolicy = ref.SslPolicy + return nil +} + +// SetSslCertificateAlphaTargetHTTPSProxyHook defines the hook for setting ssl certificates on a TargetHttpsProxy. +func SetSslPolicyBetaTargetHTTPSProxyHook(ctx context.Context, key *meta.Key, ref *beta.SslPolicyReference, m *cloud.MockBetaTargetHttpsProxies) error { + tp, err := m.Get(ctx, key) + if err != nil { + return err + } + tp.SslPolicy = ref.SslPolicy + return nil +} + + // InsertFirewallsUnauthorizedErrHook mocks firewall insertion. A forbidden error will be thrown as return. func InsertFirewallsUnauthorizedErrHook(ctx context.Context, key *meta.Key, obj *ga.Firewall, m *cloud.MockFirewalls) (bool, error) { return true, &googleapi.Error{Code: http.StatusForbidden} diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op.go index e0caf5f315e..e8516bb73ea 100644 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op.go +++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/op.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" alpha "google.golang.org/api/compute/v0.alpha" beta "google.golang.org/api/compute/v0.beta" diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/service.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/service.go index 839eb15f8d1..842fe5391a9 100644 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/service.go +++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/service.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" alpha "google.golang.org/api/compute/v0.alpha" beta "google.golang.org/api/compute/v0.beta" @@ -86,7 +86,7 @@ func (s *Service) pollOperation(ctx context.Context, op operation) error { // returning ctx.Err(). select { case <-ctx.Done(): - klog.V(5).Infof("op.pollOperation(%v, %v) not completed, poll count = %d, ctx.Err = %v", ctx, op, pollCount, ctx.Err()) + klog.V(5).Infof("op.pollOperation(%v, %v) not completed, poll count = %d, ctx.Err = %v", ctx, op, pollCount, ctx.Err()) return ctx.Err() default: // ctx is not canceled, continue immediately @@ -95,16 +95,13 @@ func (s *Service) pollOperation(ctx context.Context, op operation) error { pollCount++ klog.V(5).Infof("op.isDone(%v) waiting; op = %v, poll count = %d", ctx, op, pollCount) s.RateLimiter.Accept(ctx, op.rateLimitKey()) - done, err := op.isDone(ctx) - if err != nil { + switch done, err := op.isDone(ctx); { + case err != nil: klog.V(5).Infof("op.isDone(%v) error; op = %v, poll count = %d, err = %v, retrying", ctx, op, pollCount, err) - } - - if done { - break + return err + case done: + klog.V(5).Infof("op.isDone(%v) complete; op = %v, poll count = %d, op.err = %v", ctx, op, pollCount, op.error()) + return op.error() } } - - klog.V(5).Infof("op.isDone(%v) complete; op = %v, poll count = %d, op.err = %v", ctx, op, pollCount, op.error()) - return op.error() } diff --git a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go index 71b60ab818a..8767e6f82d5 100644 --- a/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go +++ b/vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/utils.go @@ -199,3 +199,17 @@ func SelfLink(ver meta.Version, project, resource string, key *meta.Key) string return fmt.Sprintf("%s/%s", prefix, RelativeResourceName(project, resource, key)) } + +// aggregatedListKey return the aggregated list key based on the resource key. +func aggregatedListKey(k *meta.Key) string { + switch k.Type() { + case meta.Regional: + return fmt.Sprintf("regions/%s", k.Region) + case meta.Zonal: + return fmt.Sprintf("zones/%s", k.Zone) + case meta.Global: + return "global" + default: + return "unknownScope" + } +} diff --git a/vendor/github.com/Microsoft/go-winio/vhd/vhd.go b/vendor/github.com/Microsoft/go-winio/vhd/vhd.go new file mode 100644 index 00000000000..229ac25565a --- /dev/null +++ b/vendor/github.com/Microsoft/go-winio/vhd/vhd.go @@ -0,0 +1,151 @@ +// +build windows + +package vhd + +import "syscall" + +//go:generate go run mksyscall_windows.go -output zvhd.go vhd.go + +//sys createVirtualDisk(virtualStorageType *virtualStorageType, path string, virtualDiskAccessMask uint32, securityDescriptor *uintptr, flags uint32, providerSpecificFlags uint32, parameters *createVirtualDiskParameters, o *syscall.Overlapped, handle *syscall.Handle) (err error) [failretval != 0] = VirtDisk.CreateVirtualDisk +//sys openVirtualDisk(virtualStorageType *virtualStorageType, path string, virtualDiskAccessMask uint32, flags uint32, parameters *openVirtualDiskParameters, handle *syscall.Handle) (err error) [failretval != 0] = VirtDisk.OpenVirtualDisk +//sys detachVirtualDisk(handle syscall.Handle, flags uint32, providerSpecificFlags uint32) (err error) [failretval != 0] = VirtDisk.DetachVirtualDisk + +type virtualStorageType struct { + DeviceID uint32 + VendorID [16]byte +} + +type ( + createVirtualDiskFlag uint32 + VirtualDiskAccessMask uint32 + VirtualDiskFlag uint32 +) + +const ( + // Flags for creating a VHD (not exported) + createVirtualDiskFlagNone createVirtualDiskFlag = 0 + createVirtualDiskFlagFullPhysicalAllocation createVirtualDiskFlag = 1 + createVirtualDiskFlagPreventWritesToSourceDisk createVirtualDiskFlag = 2 + createVirtualDiskFlagDoNotCopyMetadataFromParent createVirtualDiskFlag = 4 + + // Access Mask for opening a VHD + VirtualDiskAccessNone VirtualDiskAccessMask = 0 + VirtualDiskAccessAttachRO VirtualDiskAccessMask = 65536 + VirtualDiskAccessAttachRW VirtualDiskAccessMask = 131072 + VirtualDiskAccessDetach VirtualDiskAccessMask = 262144 + VirtualDiskAccessGetInfo VirtualDiskAccessMask = 524288 + VirtualDiskAccessCreate VirtualDiskAccessMask = 1048576 + VirtualDiskAccessMetaOps VirtualDiskAccessMask = 2097152 + VirtualDiskAccessRead VirtualDiskAccessMask = 851968 + VirtualDiskAccessAll VirtualDiskAccessMask = 4128768 + VirtualDiskAccessWritable VirtualDiskAccessMask = 3276800 + + // Flags for opening a VHD + OpenVirtualDiskFlagNone VirtualDiskFlag = 0 + OpenVirtualDiskFlagNoParents VirtualDiskFlag = 0x1 + OpenVirtualDiskFlagBlankFile VirtualDiskFlag = 0x2 + OpenVirtualDiskFlagBootDrive VirtualDiskFlag = 0x4 + OpenVirtualDiskFlagCachedIO VirtualDiskFlag = 0x8 + OpenVirtualDiskFlagCustomDiffChain VirtualDiskFlag = 0x10 + OpenVirtualDiskFlagParentCachedIO VirtualDiskFlag = 0x20 + OpenVirtualDiskFlagVhdSetFileOnly VirtualDiskFlag = 0x40 + OpenVirtualDiskFlagIgnoreRelativeParentLocator VirtualDiskFlag = 0x80 + OpenVirtualDiskFlagNoWriteHardening VirtualDiskFlag = 0x100 +) + +type createVersion2 struct { + UniqueID [16]byte // GUID + MaximumSize uint64 + BlockSizeInBytes uint32 + SectorSizeInBytes uint32 + ParentPath *uint16 // string + SourcePath *uint16 // string + OpenFlags uint32 + ParentVirtualStorageType virtualStorageType + SourceVirtualStorageType virtualStorageType + ResiliencyGUID [16]byte // GUID +} + +type createVirtualDiskParameters struct { + Version uint32 // Must always be set to 2 + Version2 createVersion2 +} + +type openVersion2 struct { + GetInfoOnly int32 // bool but 4-byte aligned + ReadOnly int32 // bool but 4-byte aligned + ResiliencyGUID [16]byte // GUID +} + +type openVirtualDiskParameters struct { + Version uint32 // Must always be set to 2 + Version2 openVersion2 +} + +// CreateVhdx will create a simple vhdx file at the given path using default values. +func CreateVhdx(path string, maxSizeInGb, blockSizeInMb uint32) error { + var ( + defaultType virtualStorageType + handle syscall.Handle + ) + + parameters := createVirtualDiskParameters{ + Version: 2, + Version2: createVersion2{ + MaximumSize: uint64(maxSizeInGb) * 1024 * 1024 * 1024, + BlockSizeInBytes: blockSizeInMb * 1024 * 1024, + }, + } + + if err := createVirtualDisk( + &defaultType, + path, + uint32(VirtualDiskAccessNone), + nil, + uint32(createVirtualDiskFlagNone), + 0, + ¶meters, + nil, + &handle); err != nil { + return err + } + + if err := syscall.CloseHandle(handle); err != nil { + return err + } + + return nil +} + +// DetachVhd detaches a mounted container layer vhd found at `path`. +func DetachVhd(path string) error { + handle, err := OpenVirtualDisk( + path, + VirtualDiskAccessNone, + OpenVirtualDiskFlagCachedIO|OpenVirtualDiskFlagIgnoreRelativeParentLocator) + + if err != nil { + return err + } + defer syscall.CloseHandle(handle) + return detachVirtualDisk(handle, 0, 0) +} + +// OpenVirtualDisk obtains a handle to a VHD opened with supplied access mask and flags. +func OpenVirtualDisk(path string, accessMask VirtualDiskAccessMask, flag VirtualDiskFlag) (syscall.Handle, error) { + var ( + defaultType virtualStorageType + handle syscall.Handle + ) + parameters := openVirtualDiskParameters{Version: 2} + if err := openVirtualDisk( + &defaultType, + path, + uint32(accessMask), + uint32(flag), + ¶meters, + &handle); err != nil { + return 0, err + } + return handle, nil +} diff --git a/vendor/github.com/Microsoft/go-winio/vhd/zvhd.go b/vendor/github.com/Microsoft/go-winio/vhd/zvhd.go new file mode 100644 index 00000000000..00599ea497e --- /dev/null +++ b/vendor/github.com/Microsoft/go-winio/vhd/zvhd.go @@ -0,0 +1,99 @@ +// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT + +package vhd + +import ( + "syscall" + "unsafe" + + "golang.org/x/sys/windows" +) + +var _ unsafe.Pointer + +// Do the interface allocations only once for common +// Errno values. +const ( + errnoERROR_IO_PENDING = 997 +) + +var ( + errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) +) + +// errnoErr returns common boxed Errno values, to prevent +// allocations at runtime. +func errnoErr(e syscall.Errno) error { + switch e { + case 0: + return nil + case errnoERROR_IO_PENDING: + return errERROR_IO_PENDING + } + // TODO: add more here, after collecting data on the common + // error values see on Windows. (perhaps when running + // all.bat?) + return e +} + +var ( + modVirtDisk = windows.NewLazySystemDLL("VirtDisk.dll") + + procCreateVirtualDisk = modVirtDisk.NewProc("CreateVirtualDisk") + procOpenVirtualDisk = modVirtDisk.NewProc("OpenVirtualDisk") + procDetachVirtualDisk = modVirtDisk.NewProc("DetachVirtualDisk") +) + +func createVirtualDisk(virtualStorageType *virtualStorageType, path string, virtualDiskAccessMask uint32, securityDescriptor *uintptr, flags uint32, providerSpecificFlags uint32, parameters *createVirtualDiskParameters, o *syscall.Overlapped, handle *syscall.Handle) (err error) { + var _p0 *uint16 + _p0, err = syscall.UTF16PtrFromString(path) + if err != nil { + return + } + return _createVirtualDisk(virtualStorageType, _p0, virtualDiskAccessMask, securityDescriptor, flags, providerSpecificFlags, parameters, o, handle) +} + +func _createVirtualDisk(virtualStorageType *virtualStorageType, path *uint16, virtualDiskAccessMask uint32, securityDescriptor *uintptr, flags uint32, providerSpecificFlags uint32, parameters *createVirtualDiskParameters, o *syscall.Overlapped, handle *syscall.Handle) (err error) { + r1, _, e1 := syscall.Syscall9(procCreateVirtualDisk.Addr(), 9, uintptr(unsafe.Pointer(virtualStorageType)), uintptr(unsafe.Pointer(path)), uintptr(virtualDiskAccessMask), uintptr(unsafe.Pointer(securityDescriptor)), uintptr(flags), uintptr(providerSpecificFlags), uintptr(unsafe.Pointer(parameters)), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(handle))) + if r1 != 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func openVirtualDisk(virtualStorageType *virtualStorageType, path string, virtualDiskAccessMask uint32, flags uint32, parameters *openVirtualDiskParameters, handle *syscall.Handle) (err error) { + var _p0 *uint16 + _p0, err = syscall.UTF16PtrFromString(path) + if err != nil { + return + } + return _openVirtualDisk(virtualStorageType, _p0, virtualDiskAccessMask, flags, parameters, handle) +} + +func _openVirtualDisk(virtualStorageType *virtualStorageType, path *uint16, virtualDiskAccessMask uint32, flags uint32, parameters *openVirtualDiskParameters, handle *syscall.Handle) (err error) { + r1, _, e1 := syscall.Syscall6(procOpenVirtualDisk.Addr(), 6, uintptr(unsafe.Pointer(virtualStorageType)), uintptr(unsafe.Pointer(path)), uintptr(virtualDiskAccessMask), uintptr(flags), uintptr(unsafe.Pointer(parameters)), uintptr(unsafe.Pointer(handle))) + if r1 != 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func detachVirtualDisk(handle syscall.Handle, flags uint32, providerSpecificFlags uint32) (err error) { + r1, _, e1 := syscall.Syscall(procDetachVirtualDisk.Addr(), 3, uintptr(handle), uintptr(flags), uintptr(providerSpecificFlags)) + if r1 != 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} diff --git a/vendor/github.com/Microsoft/hcsshim/CODEOWNERS b/vendor/github.com/Microsoft/hcsshim/CODEOWNERS new file mode 100644 index 00000000000..1a59c8021d5 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/CODEOWNERS @@ -0,0 +1,3 @@ +* @microsoft/containerplat + +/hcn/* @nagiesek \ No newline at end of file diff --git a/vendor/github.com/Microsoft/hcsshim/Protobuild.toml b/vendor/github.com/Microsoft/hcsshim/Protobuild.toml index e2dd2d3a7af..47d7650fb72 100644 --- a/vendor/github.com/Microsoft/hcsshim/Protobuild.toml +++ b/vendor/github.com/Microsoft/hcsshim/Protobuild.toml @@ -29,6 +29,7 @@ plugins = ["grpc", "fieldpath"] "google/protobuf/field_mask.proto" = "github.com/gogo/protobuf/types" "google/protobuf/timestamp.proto" = "github.com/gogo/protobuf/types" "google/protobuf/duration.proto" = "github.com/gogo/protobuf/types" + "github/containerd/cgroups/stats/v1/metrics.proto" = "github.com/containerd/cgroups/stats/v1" [[overrides]] prefixes = ["github.com/Microsoft/hcsshim/internal/shimdiag"] diff --git a/vendor/github.com/Microsoft/hcsshim/README.md b/vendor/github.com/Microsoft/hcsshim/README.md index 15b39181a5d..d504f188932 100644 --- a/vendor/github.com/Microsoft/hcsshim/README.md +++ b/vendor/github.com/Microsoft/hcsshim/README.md @@ -2,7 +2,7 @@ [![Build status](https://ci.appveyor.com/api/projects/status/nbcw28mnkqml0loa/branch/master?svg=true)](https://ci.appveyor.com/project/WindowsVirtualization/hcsshim/branch/master) -This package contains the Golang interface for using the Windows [Host Compute Service](https://blogs.technet.microsoft.com/virtualization/2017/01/27/introducing-the-host-compute-service-hcs/) (HCS) to launch and manage [Windows Containers](https://docs.microsoft.com/en-us/virtualization/windowscontainers/about/). It also contains other helpers and functions for managing Windows Containers such as the Golang interface for the Host Network Service (HNS). +This package contains the Golang interface for using the Windows [Host Compute Service](https://techcommunity.microsoft.com/t5/containers/introducing-the-host-compute-service-hcs/ba-p/382332) (HCS) to launch and manage [Windows Containers](https://docs.microsoft.com/en-us/virtualization/windowscontainers/about/). It also contains other helpers and functions for managing Windows Containers such as the Golang interface for the Host Network Service (HNS). It is primarily used in the [Moby Project](https://github.com/moby/moby), but it can be freely used by other projects as well. @@ -16,6 +16,11 @@ When you submit a pull request, a CLA-bot will automatically determine whether y a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. +We also ask that contributors [sign their commits](https://git-scm.com/docs/git-commit) using `git commit -s` or `git commit --signoff` to certify they either authored the work themselves or otherwise have permission to use it in this project. + + +## Code of Conduct + This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/vendor/github.com/Microsoft/hcsshim/appveyor.yml b/vendor/github.com/Microsoft/hcsshim/appveyor.yml index 7f0f816329d..6617fade0f5 100644 --- a/vendor/github.com/Microsoft/hcsshim/appveyor.yml +++ b/vendor/github.com/Microsoft/hcsshim/appveyor.yml @@ -6,9 +6,9 @@ clone_folder: c:\gopath\src\github.com\Microsoft\hcsshim environment: GOPATH: c:\gopath - PATH: C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;%GOPATH%\bin;C:\gometalinter-2.0.12-windows-amd64;%PATH% + PATH: "%GOPATH%\\bin;C:\\gometalinter-2.0.12-windows-amd64;%PATH%" -stack: go 1.12.9 +stack: go 1.13.4 build_script: - appveyor DownloadFile https://github.com/alecthomas/gometalinter/releases/download/v2.0.12/gometalinter-2.0.12-windows-amd64.zip @@ -22,10 +22,12 @@ build_script: - go build ./internal/tools/uvmboot - go build ./internal/tools/zapdir - go test -v ./... -tags admin - - go test -c ./test/containerd-shim-runhcs-v1/ -tags functional - - go test -c ./test/cri-containerd/ -tags functional - - go test -c ./test/functional/ -tags functional - - go test -c ./test/runhcs/ -tags functional + - cd test + - go test -v ./internal -tags admin + - go test -c ./containerd-shim-runhcs-v1/ -tags functional + - go test -c ./cri-containerd/ -tags functional + - go test -c ./functional/ -tags functional + - go test -c ./runhcs/ -tags functional artifacts: - path: 'containerd-shim-runhcs-v1.exe' @@ -35,7 +37,7 @@ artifacts: - path: 'grantvmgroupaccess.exe' - path: 'uvmboot.exe' - path: 'zapdir.exe' - - path: 'containerd-shim-runhcs-v1.test.exe' - - path: 'cri-containerd.test.exe' - - path: 'functional.test.exe' - - path: 'runhcs.test.exe' \ No newline at end of file + - path: './test/containerd-shim-runhcs-v1.test.exe' + - path: './test/cri-containerd.test.exe' + - path: './test/functional.test.exe' + - path: './test/runhcs.test.exe' diff --git a/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/next.pb.txt b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/next.pb.txt index e69de29bb2d..fee15d6b5c9 100644 --- a/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/next.pb.txt +++ b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/next.pb.txt @@ -0,0 +1,207 @@ +file { + name: "google/protobuf/timestamp.proto" + package: "google.protobuf" + message_type { + name: "Timestamp" + field { + name: "seconds" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "seconds" + } + field { + name: "nanos" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "nanos" + } + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "TimestampProto" + java_multiple_files: true + go_package: "github.com/golang/protobuf/ptypes/timestamp" + cc_enable_arenas: true + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.WellKnownTypes" + } + syntax: "proto3" +} +file { + name: "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto" + package: "containerd.runhcs.v1" + dependency: "gogoproto/gogo.proto" + dependency: "google/protobuf/timestamp.proto" + message_type { + name: "Options" + field { + name: "debug" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "debug" + } + field { + name: "debug_type" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".containerd.runhcs.v1.Options.DebugType" + json_name: "debugType" + } + field { + name: "registry_root" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "registryRoot" + } + field { + name: "sandbox_image" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "sandboxImage" + } + field { + name: "sandbox_platform" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "sandboxPlatform" + } + field { + name: "sandbox_isolation" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_ENUM + type_name: ".containerd.runhcs.v1.Options.SandboxIsolation" + json_name: "sandboxIsolation" + } + field { + name: "boot_files_root_path" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "bootFilesRootPath" + } + field { + name: "vm_processor_count" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "vmProcessorCount" + } + field { + name: "vm_memory_size_in_mb" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "vmMemorySizeInMb" + } + enum_type { + name: "DebugType" + value { + name: "NPIPE" + number: 0 + } + value { + name: "FILE" + number: 1 + } + value { + name: "ETW" + number: 2 + } + } + enum_type { + name: "SandboxIsolation" + value { + name: "PROCESS" + number: 0 + } + value { + name: "HYPERVISOR" + number: 1 + } + } + } + message_type { + name: "ProcessDetails" + field { + name: "image_name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "imageName" + } + field { + name: "created_at" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + options { + 65001: 0 + 65010: 1 + } + json_name: "createdAt" + } + field { + name: "kernel_time_100_ns" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "kernelTime100Ns" + } + field { + name: "memory_commit_bytes" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "memoryCommitBytes" + } + field { + name: "memory_working_set_private_bytes" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "memoryWorkingSetPrivateBytes" + } + field { + name: "memory_working_set_shared_bytes" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "memoryWorkingSetSharedBytes" + } + field { + name: "process_id" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "processId" + } + field { + name: "user_time_100_ns" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "userTime100Ns" + } + field { + name: "exec_id" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "execId" + } + } + options { + go_package: "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options;options" + } + weak_dependency: 0 + syntax: "proto3" +} \ No newline at end of file diff --git a/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go index e805b3e5f6d..2190e56a792 100644 --- a/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go +++ b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go @@ -101,7 +101,21 @@ type Options struct { SandboxIsolation Options_SandboxIsolation `protobuf:"varint,6,opt,name=sandbox_isolation,json=sandboxIsolation,proto3,enum=containerd.runhcs.v1.Options_SandboxIsolation" json:"sandbox_isolation,omitempty"` // boot_files_root_path is the path to the directory containing the LCOW // kernel and root FS files. - BootFilesRootPath string `protobuf:"bytes,7,opt,name=boot_files_root_path,json=bootFilesRootPath,proto3" json:"boot_files_root_path,omitempty"` + BootFilesRootPath string `protobuf:"bytes,7,opt,name=boot_files_root_path,json=bootFilesRootPath,proto3" json:"boot_files_root_path,omitempty"` + // vm_processor_count is the default number of processors to create for the + // hypervisor isolated utility vm. + // + // The platform default if omitted is 2, unless the host only has a single + // core in which case it is 1. + VmProcessorCount int32 `protobuf:"varint,8,opt,name=vm_processor_count,json=vmProcessorCount,proto3" json:"vm_processor_count,omitempty"` + // vm_memory_size_in_mb is the default amount of memory to assign to the + // hypervisor isolated utility vm. + // + // The platform default is 1024MB if omitted. + VmMemorySizeInMb int32 `protobuf:"varint,9,opt,name=vm_memory_size_in_mb,json=vmMemorySizeInMb,proto3" json:"vm_memory_size_in_mb,omitempty"` + // GPUVHDPath is the path to the gpu vhd to add to the uvm + // when a container requests a gpu + GPUVHDPath string `protobuf:"bytes,10,opt,name=GPUVHDPath,json=gPUVHDPath,proto3" json:"GPUVHDPath,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -200,51 +214,56 @@ func init() { } var fileDescriptor_b643df6839c75082 = []byte{ - // 704 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0xda, 0x48, - 0x18, 0xc6, 0xe1, 0xd3, 0x6f, 0x96, 0xc4, 0x99, 0xe5, 0x80, 0xb2, 0xbb, 0x80, 0xc8, 0x21, 0x89, - 0x76, 0x63, 0x43, 0xf6, 0xd8, 0x53, 0x09, 0xa0, 0xba, 0x6a, 0x83, 0x65, 0xa2, 0xa6, 0x1f, 0x07, - 0xcb, 0xd8, 0x83, 0xb1, 0x82, 0x3d, 0xd6, 0xcc, 0x90, 0x86, 0x5b, 0x7f, 0x42, 0x7f, 0x55, 0x95, - 0x63, 0x8f, 0x95, 0x2a, 0xa5, 0x0d, 0xbf, 0xa4, 0x9a, 0xb1, 0x49, 0xd4, 0x28, 0xea, 0xa5, 0x27, - 0xc6, 0xcf, 0xf3, 0xbc, 0xcf, 0xfb, 0x29, 0x60, 0x14, 0x84, 0x7c, 0xb6, 0x98, 0xe8, 0x1e, 0x89, - 0x8c, 0x97, 0xa1, 0x47, 0x09, 0x23, 0x53, 0x6e, 0xcc, 0x3c, 0xc6, 0x66, 0x61, 0x64, 0x78, 0x91, - 0x6f, 0x78, 0x24, 0xe6, 0x6e, 0x18, 0x63, 0xea, 0x1f, 0x09, 0xec, 0x88, 0x2e, 0xe2, 0x99, 0xc7, - 0x8e, 0x2e, 0xbb, 0x06, 0x49, 0x78, 0x48, 0x62, 0x66, 0xa4, 0x88, 0x9e, 0x50, 0xc2, 0x09, 0xaa, - 0xdd, 0xeb, 0xf5, 0x8c, 0xb8, 0xec, 0xee, 0xd6, 0x02, 0x12, 0x10, 0x29, 0x30, 0xc4, 0x2b, 0xd5, - 0xee, 0x36, 0x03, 0x42, 0x82, 0x39, 0x36, 0xe4, 0xd7, 0x64, 0x31, 0x35, 0x78, 0x18, 0x61, 0xc6, - 0xdd, 0x28, 0x49, 0x05, 0xed, 0x4f, 0x79, 0x28, 0x8f, 0xd2, 0x2c, 0xa8, 0x06, 0x45, 0x1f, 0x4f, - 0x16, 0x41, 0x5d, 0x69, 0x29, 0x07, 0x15, 0x3b, 0xfd, 0x40, 0x43, 0x00, 0xf9, 0x70, 0xf8, 0x32, - 0xc1, 0xf5, 0x8d, 0x96, 0x72, 0xb0, 0x75, 0xbc, 0xaf, 0x3f, 0x56, 0x83, 0x9e, 0x19, 0xe9, 0x7d, - 0xa1, 0x3f, 0x5b, 0x26, 0xd8, 0x56, 0xfd, 0xf5, 0x13, 0xed, 0x41, 0x95, 0xe2, 0x20, 0x64, 0x9c, - 0x2e, 0x1d, 0x4a, 0x08, 0xaf, 0xe7, 0x5b, 0xca, 0x81, 0x6a, 0xff, 0xb1, 0x06, 0x6d, 0x42, 0xb8, - 0x10, 0x31, 0x37, 0xf6, 0x27, 0xe4, 0xca, 0x09, 0x23, 0x37, 0xc0, 0xf5, 0x42, 0x2a, 0xca, 0x40, - 0x53, 0x60, 0xe8, 0x10, 0xb4, 0xb5, 0x28, 0x99, 0xbb, 0x7c, 0x4a, 0x68, 0x54, 0x2f, 0x4a, 0xdd, - 0x76, 0x86, 0x5b, 0x19, 0x8c, 0xde, 0xc1, 0xce, 0x9d, 0x1f, 0x23, 0x73, 0x57, 0xd4, 0x57, 0x2f, - 0xc9, 0x1e, 0xf4, 0x5f, 0xf7, 0x30, 0xce, 0x32, 0xae, 0xa3, 0xec, 0x75, 0xce, 0x3b, 0x04, 0x19, - 0x50, 0x9b, 0x10, 0xc2, 0x9d, 0x69, 0x38, 0xc7, 0x4c, 0xf6, 0xe4, 0x24, 0x2e, 0x9f, 0xd5, 0xcb, - 0xb2, 0x96, 0x1d, 0xc1, 0x0d, 0x05, 0x25, 0x3a, 0xb3, 0x5c, 0x3e, 0x6b, 0x1f, 0x82, 0x7a, 0x37, - 0x1a, 0xa4, 0x42, 0xf1, 0xd4, 0x32, 0xad, 0x81, 0x96, 0x43, 0x15, 0x28, 0x0c, 0xcd, 0x17, 0x03, - 0x4d, 0x41, 0x65, 0xc8, 0x0f, 0xce, 0xce, 0xb5, 0x8d, 0xb6, 0x01, 0xda, 0xc3, 0x0a, 0xd0, 0x26, - 0x94, 0x2d, 0x7b, 0x74, 0x32, 0x18, 0x8f, 0xb5, 0x1c, 0xda, 0x02, 0x78, 0xf6, 0xc6, 0x1a, 0xd8, - 0xaf, 0xcc, 0xf1, 0xc8, 0xd6, 0x94, 0xf6, 0xd7, 0x3c, 0x6c, 0x59, 0x94, 0x78, 0x98, 0xb1, 0x3e, - 0xe6, 0x6e, 0x38, 0x67, 0xe8, 0x1f, 0x00, 0x39, 0x44, 0x27, 0x76, 0x23, 0x2c, 0x97, 0xaa, 0xda, - 0xaa, 0x44, 0x4e, 0xdd, 0x08, 0xa3, 0x13, 0x00, 0x8f, 0x62, 0x97, 0x63, 0xdf, 0x71, 0xb9, 0x5c, - 0xec, 0xe6, 0xf1, 0xae, 0x9e, 0x1e, 0x8c, 0xbe, 0x3e, 0x18, 0xfd, 0x6c, 0x7d, 0x30, 0xbd, 0xca, - 0xf5, 0x4d, 0x33, 0xf7, 0xf1, 0x5b, 0x53, 0xb1, 0xd5, 0x2c, 0xee, 0x29, 0x47, 0xff, 0x02, 0xba, - 0xc0, 0x34, 0xc6, 0x73, 0x47, 0x5c, 0x96, 0xd3, 0xed, 0x74, 0x9c, 0x98, 0xc9, 0xd5, 0x16, 0xec, - 0xed, 0x94, 0x11, 0x0e, 0xdd, 0x4e, 0xe7, 0x94, 0x21, 0x1d, 0xfe, 0x8c, 0x70, 0x44, 0xe8, 0xd2, - 0xf1, 0x48, 0x14, 0x85, 0xdc, 0x99, 0x2c, 0x39, 0x66, 0x72, 0xc7, 0x05, 0x7b, 0x27, 0xa5, 0x4e, - 0x24, 0xd3, 0x13, 0x04, 0x1a, 0x42, 0x2b, 0xd3, 0xbf, 0x27, 0xf4, 0x22, 0x8c, 0x03, 0x87, 0x61, - 0xee, 0x24, 0x34, 0xbc, 0x74, 0x39, 0xce, 0x82, 0x8b, 0x32, 0xf8, 0xef, 0x54, 0x77, 0x9e, 0xca, - 0xc6, 0x98, 0x5b, 0xa9, 0x28, 0xf5, 0xe9, 0x43, 0xf3, 0x11, 0x1f, 0x36, 0x73, 0x29, 0xf6, 0x33, - 0x9b, 0x92, 0xb4, 0xf9, 0xeb, 0xa1, 0xcd, 0x58, 0x6a, 0x52, 0x97, 0xff, 0x00, 0x92, 0x74, 0xc0, - 0x4e, 0xe8, 0xcb, 0x25, 0x57, 0x7b, 0xd5, 0xd5, 0x4d, 0x53, 0xcd, 0xc6, 0x6e, 0xf6, 0x6d, 0x35, - 0x13, 0x98, 0x3e, 0xda, 0x07, 0x6d, 0xc1, 0x30, 0xfd, 0x69, 0x2c, 0x15, 0x99, 0xa4, 0x2a, 0xf0, - 0xfb, 0xa1, 0xec, 0x41, 0x19, 0x5f, 0x61, 0x4f, 0x78, 0xaa, 0x62, 0x45, 0x3d, 0x58, 0xdd, 0x34, - 0x4b, 0x83, 0x2b, 0xec, 0x99, 0x7d, 0xbb, 0x24, 0x28, 0xd3, 0xef, 0xf9, 0xd7, 0xb7, 0x8d, 0xdc, - 0x97, 0xdb, 0x46, 0xee, 0xc3, 0xaa, 0xa1, 0x5c, 0xaf, 0x1a, 0xca, 0xe7, 0x55, 0x43, 0xf9, 0xbe, - 0x6a, 0x28, 0x6f, 0x9f, 0xff, 0xfe, 0xdf, 0xcb, 0x93, 0xec, 0xf7, 0x75, 0x6e, 0x52, 0x92, 0x7b, - 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x9a, 0x54, 0x17, 0xb5, 0x04, 0x00, 0x00, + // 777 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6f, 0xdb, 0x36, + 0x1c, 0xb5, 0x9a, 0xf8, 0x43, 0xbf, 0x2e, 0xa9, 0xc2, 0xf9, 0x20, 0x64, 0x9b, 0x6d, 0xa4, 0x87, + 0xa6, 0x58, 0x23, 0x25, 0xdd, 0x71, 0xa7, 0x39, 0x76, 0x56, 0x0d, 0x4b, 0x22, 0xc8, 0x59, 0xbb, + 0x8f, 0x03, 0xa1, 0x0f, 0x46, 0x26, 0x6a, 0x8a, 0x02, 0x49, 0x7b, 0x71, 0x4f, 0xfb, 0x13, 0xf6, + 0x47, 0xed, 0x90, 0xe3, 0x8e, 0x03, 0x06, 0x64, 0xab, 0xff, 0x92, 0x81, 0x94, 0x94, 0x62, 0x45, + 0xb1, 0xcb, 0x4e, 0xa6, 0xde, 0x7b, 0x7c, 0xbf, 0x0f, 0x3e, 0x18, 0x2e, 0x73, 0xaa, 0xe6, 0xcb, + 0xc4, 0x4b, 0x39, 0xf3, 0xcf, 0x69, 0x2a, 0xb8, 0xe4, 0xd7, 0xca, 0x9f, 0xa7, 0x52, 0xce, 0x29, + 0xf3, 0x53, 0x96, 0xf9, 0x29, 0x2f, 0x54, 0x4c, 0x0b, 0x22, 0xb2, 0x23, 0x8d, 0x1d, 0x89, 0x65, + 0x31, 0x4f, 0xe5, 0xd1, 0xea, 0xc4, 0xe7, 0xa5, 0xa2, 0xbc, 0x90, 0x7e, 0x85, 0x78, 0xa5, 0xe0, + 0x8a, 0xa3, 0xfe, 0x3b, 0xbd, 0x57, 0x13, 0xab, 0x93, 0xfd, 0x7e, 0xce, 0x73, 0x6e, 0x04, 0xbe, + 0x3e, 0x55, 0xda, 0xfd, 0x61, 0xce, 0x79, 0xbe, 0x20, 0xbe, 0xf9, 0x4a, 0x96, 0xd7, 0xbe, 0xa2, + 0x8c, 0x48, 0x15, 0xb3, 0xb2, 0x12, 0x1c, 0xfc, 0xb6, 0x0d, 0xdd, 0xcb, 0xaa, 0x0a, 0xea, 0x43, + 0x3b, 0x23, 0xc9, 0x32, 0x77, 0xad, 0x91, 0x75, 0xd8, 0x8b, 0xaa, 0x0f, 0x74, 0x06, 0x60, 0x0e, + 0x58, 0xad, 0x4b, 0xe2, 0x3e, 0x18, 0x59, 0x87, 0xbb, 0xcf, 0x9f, 0x78, 0x1f, 0xea, 0xc1, 0xab, + 0x8d, 0xbc, 0x89, 0xd6, 0x5f, 0xad, 0x4b, 0x12, 0xd9, 0x59, 0x73, 0x44, 0x8f, 0x61, 0x47, 0x90, + 0x9c, 0x4a, 0x25, 0xd6, 0x58, 0x70, 0xae, 0xdc, 0xad, 0x91, 0x75, 0x68, 0x47, 0x1f, 0x35, 0x60, + 0xc4, 0xb9, 0xd2, 0x22, 0x19, 0x17, 0x59, 0xc2, 0x6f, 0x30, 0x65, 0x71, 0x4e, 0xdc, 0xed, 0x4a, + 0x54, 0x83, 0x81, 0xc6, 0xd0, 0x53, 0x70, 0x1a, 0x51, 0xb9, 0x88, 0xd5, 0x35, 0x17, 0xcc, 0x6d, + 0x1b, 0xdd, 0xa3, 0x1a, 0x0f, 0x6b, 0x18, 0xfd, 0x04, 0x7b, 0xf7, 0x7e, 0x92, 0x2f, 0x62, 0xdd, + 0x9f, 0xdb, 0x31, 0x33, 0x78, 0xff, 0x3d, 0xc3, 0xac, 0xae, 0xd8, 0xdc, 0x8a, 0x9a, 0x9a, 0xf7, + 0x08, 0xf2, 0xa1, 0x9f, 0x70, 0xae, 0xf0, 0x35, 0x5d, 0x10, 0x69, 0x66, 0xc2, 0x65, 0xac, 0xe6, + 0x6e, 0xd7, 0xf4, 0xb2, 0xa7, 0xb9, 0x33, 0x4d, 0xe9, 0xc9, 0xc2, 0x58, 0xcd, 0xd1, 0x33, 0x40, + 0x2b, 0x86, 0x4b, 0xc1, 0x53, 0x22, 0x25, 0x17, 0x38, 0xe5, 0xcb, 0x42, 0xb9, 0xbd, 0x91, 0x75, + 0xd8, 0x8e, 0x9c, 0x15, 0x0b, 0x1b, 0xe2, 0x54, 0xe3, 0xc8, 0x83, 0xfe, 0x8a, 0x61, 0x46, 0x18, + 0x17, 0x6b, 0x2c, 0xe9, 0x1b, 0x82, 0x69, 0x81, 0x59, 0xe2, 0xda, 0x8d, 0xfe, 0xdc, 0x50, 0x33, + 0xfa, 0x86, 0x04, 0xc5, 0x79, 0x82, 0x06, 0x00, 0x5f, 0x87, 0xdf, 0xbd, 0x7c, 0x31, 0xd1, 0xb5, + 0x5c, 0x30, 0x4d, 0x40, 0x7e, 0x8f, 0x1c, 0x3c, 0x05, 0xfb, 0xfe, 0x61, 0x90, 0x0d, 0xed, 0x8b, + 0x30, 0x08, 0xa7, 0x4e, 0x0b, 0xf5, 0x60, 0xfb, 0x2c, 0xf8, 0x76, 0xea, 0x58, 0xa8, 0x0b, 0x5b, + 0xd3, 0xab, 0x57, 0xce, 0x83, 0x03, 0x1f, 0x9c, 0xf7, 0xe7, 0x47, 0x0f, 0xa1, 0x1b, 0x46, 0x97, + 0xa7, 0xd3, 0xd9, 0xcc, 0x69, 0xa1, 0x5d, 0x80, 0x17, 0x3f, 0x84, 0xd3, 0xe8, 0x65, 0x30, 0xbb, + 0x8c, 0x1c, 0xeb, 0xe0, 0xcf, 0x2d, 0xd8, 0xad, 0xdb, 0x9f, 0x10, 0x15, 0xd3, 0x85, 0x44, 0x9f, + 0x01, 0x98, 0x27, 0xc4, 0x45, 0xcc, 0x88, 0x89, 0x94, 0x1d, 0xd9, 0x06, 0xb9, 0x88, 0x19, 0x41, + 0xa7, 0x00, 0xa9, 0x20, 0xb1, 0x22, 0x19, 0x8e, 0x95, 0x89, 0xd5, 0xc3, 0xe7, 0xfb, 0x5e, 0x15, + 0x57, 0xaf, 0x89, 0xab, 0x77, 0xd5, 0xc4, 0x75, 0xdc, 0xbb, 0xbd, 0x1b, 0xb6, 0x7e, 0xfd, 0x6b, + 0x68, 0x45, 0x76, 0x7d, 0xef, 0x2b, 0x85, 0x3e, 0x07, 0xf4, 0x9a, 0x88, 0x82, 0x2c, 0xb0, 0xce, + 0x35, 0x3e, 0x39, 0x3e, 0xc6, 0x85, 0x34, 0xc1, 0xda, 0x8e, 0x1e, 0x55, 0x8c, 0x76, 0x38, 0x39, + 0x3e, 0xbe, 0x90, 0xc8, 0x83, 0x8f, 0xeb, 0x65, 0xa6, 0x9c, 0x31, 0xaa, 0x70, 0xb2, 0x56, 0x44, + 0x9a, 0x84, 0x6d, 0x47, 0x7b, 0x15, 0x75, 0x6a, 0x98, 0xb1, 0x26, 0xd0, 0x19, 0x8c, 0x6a, 0xfd, + 0xcf, 0x5c, 0xbc, 0xa6, 0x45, 0x8e, 0x25, 0x51, 0xb8, 0x14, 0x74, 0x15, 0x2b, 0x52, 0x5f, 0x6e, + 0x9b, 0xcb, 0x9f, 0x56, 0xba, 0x57, 0x95, 0x6c, 0x46, 0x54, 0x58, 0x89, 0x2a, 0x9f, 0x09, 0x0c, + 0x3f, 0xe0, 0x23, 0xe7, 0xb1, 0x20, 0x59, 0x6d, 0xd3, 0x31, 0x36, 0x9f, 0xbc, 0x6f, 0x33, 0x33, + 0x9a, 0xca, 0xe5, 0x19, 0x40, 0x1d, 0x1c, 0x4c, 0x33, 0x13, 0xb1, 0x9d, 0xf1, 0xce, 0xe6, 0x6e, + 0x68, 0xd7, 0x6b, 0x0f, 0x26, 0x91, 0x5d, 0x0b, 0x82, 0x0c, 0x3d, 0x01, 0x67, 0x29, 0x89, 0xf8, + 0xd7, 0x5a, 0x7a, 0xa6, 0xc8, 0x8e, 0xc6, 0xdf, 0x2d, 0xe5, 0x31, 0x74, 0xc9, 0x0d, 0x49, 0xb5, + 0xa7, 0xce, 0x95, 0x3d, 0x86, 0xcd, 0xdd, 0xb0, 0x33, 0xbd, 0x21, 0x69, 0x30, 0x89, 0x3a, 0x9a, + 0x0a, 0xb2, 0x71, 0x76, 0xfb, 0x76, 0xd0, 0xfa, 0xe3, 0xed, 0xa0, 0xf5, 0xcb, 0x66, 0x60, 0xdd, + 0x6e, 0x06, 0xd6, 0xef, 0x9b, 0x81, 0xf5, 0xf7, 0x66, 0x60, 0xfd, 0xf8, 0xcd, 0xff, 0xff, 0x73, + 0xfb, 0xb2, 0xfe, 0xfd, 0xbe, 0x95, 0x74, 0xcc, 0xbb, 0x7f, 0xf1, 0x4f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xc9, 0xeb, 0xae, 0x6f, 0x33, 0x05, 0x00, 0x00, } func (m *Options) Marshal() (dAtA []byte, err error) { @@ -306,6 +325,22 @@ func (m *Options) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintRunhcs(dAtA, i, uint64(len(m.BootFilesRootPath))) i += copy(dAtA[i:], m.BootFilesRootPath) } + if m.VmProcessorCount != 0 { + dAtA[i] = 0x40 + i++ + i = encodeVarintRunhcs(dAtA, i, uint64(m.VmProcessorCount)) + } + if m.VmMemorySizeInMb != 0 { + dAtA[i] = 0x48 + i++ + i = encodeVarintRunhcs(dAtA, i, uint64(m.VmMemorySizeInMb)) + } + if len(m.GPUVHDPath) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintRunhcs(dAtA, i, uint64(len(m.GPUVHDPath))) + i += copy(dAtA[i:], m.GPUVHDPath) + } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -423,6 +458,16 @@ func (m *Options) Size() (n int) { if l > 0 { n += 1 + l + sovRunhcs(uint64(l)) } + if m.VmProcessorCount != 0 { + n += 1 + sovRunhcs(uint64(m.VmProcessorCount)) + } + if m.VmMemorySizeInMb != 0 { + n += 1 + sovRunhcs(uint64(m.VmMemorySizeInMb)) + } + l = len(m.GPUVHDPath) + if l > 0 { + n += 1 + l + sovRunhcs(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -494,6 +539,9 @@ func (this *Options) String() string { `SandboxPlatform:` + fmt.Sprintf("%v", this.SandboxPlatform) + `,`, `SandboxIsolation:` + fmt.Sprintf("%v", this.SandboxIsolation) + `,`, `BootFilesRootPath:` + fmt.Sprintf("%v", this.BootFilesRootPath) + `,`, + `VmProcessorCount:` + fmt.Sprintf("%v", this.VmProcessorCount) + `,`, + `VmMemorySizeInMb:` + fmt.Sprintf("%v", this.VmMemorySizeInMb) + `,`, + `GPUVHDPath:` + fmt.Sprintf("%v", this.GPUVHDPath) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -741,6 +789,76 @@ func (m *Options) Unmarshal(dAtA []byte) error { } m.BootFilesRootPath = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VmProcessorCount", wireType) + } + m.VmProcessorCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRunhcs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VmProcessorCount |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VmMemorySizeInMb", wireType) + } + m.VmMemorySizeInMb = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRunhcs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VmMemorySizeInMb |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GPUVHDPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRunhcs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRunhcs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRunhcs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GPUVHDPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRunhcs(dAtA[iNdEx:]) diff --git a/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto index 9d6852a0a07..ed6132f76af 100644 --- a/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto +++ b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.proto @@ -46,6 +46,23 @@ message Options { // boot_files_root_path is the path to the directory containing the LCOW // kernel and root FS files. string boot_files_root_path = 7; + + // vm_processor_count is the default number of processors to create for the + // hypervisor isolated utility vm. + // + // The platform default if omitted is 2, unless the host only has a single + // core in which case it is 1. + int32 vm_processor_count = 8; + + // vm_memory_size_in_mb is the default amount of memory to assign to the + // hypervisor isolated utility vm. + // + // The platform default is 1024MB if omitted. + int32 vm_memory_size_in_mb = 9; + + // GPUVHDPath is the path to the gpu vhd to add to the uvm + // when a container requests a gpu + string GPUVHDPath = 10; } // ProcessDetails contains additional information about a process. This is the additional diff --git a/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/doc.go b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/doc.go new file mode 100644 index 00000000000..26b4d6b3401 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/doc.go @@ -0,0 +1,6 @@ +package stats + +import ( + // go mod will not vendor without an import for metrics.proto + _ "github.com/containerd/cgroups/stats/v1" +) diff --git a/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/next.pb.txt b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/next.pb.txt new file mode 100644 index 00000000000..0b3b84d28ef --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/next.pb.txt @@ -0,0 +1,1048 @@ +file { + name: "google/protobuf/timestamp.proto" + package: "google.protobuf" + message_type { + name: "Timestamp" + field { + name: "seconds" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT64 + json_name: "seconds" + } + field { + name: "nanos" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "nanos" + } + } + options { + java_package: "com.google.protobuf" + java_outer_classname: "TimestampProto" + java_multiple_files: true + go_package: "github.com/golang/protobuf/ptypes/timestamp" + cc_enable_arenas: true + objc_class_prefix: "GPB" + csharp_namespace: "Google.Protobuf.WellKnownTypes" + } + syntax: "proto3" +} +file { + name: "github.com/containerd/cgroups/stats/v1/metrics.proto" + package: "io.containerd.cgroups.v1" + dependency: "gogoproto/gogo.proto" + message_type { + name: "Metrics" + field { + name: "hugetlb" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.HugetlbStat" + json_name: "hugetlb" + } + field { + name: "pids" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.PidsStat" + json_name: "pids" + } + field { + name: "cpu" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.CPUStat" + options { + 65004: "CPU" + } + json_name: "cpu" + } + field { + name: "memory" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.MemoryStat" + json_name: "memory" + } + field { + name: "blkio" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.BlkIOStat" + json_name: "blkio" + } + field { + name: "rdma" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.RdmaStat" + json_name: "rdma" + } + field { + name: "network" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.NetworkStat" + json_name: "network" + } + } + message_type { + name: "HugetlbStat" + field { + name: "usage" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "usage" + } + field { + name: "max" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "max" + } + field { + name: "failcnt" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "failcnt" + } + field { + name: "pagesize" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "pagesize" + } + } + message_type { + name: "PidsStat" + field { + name: "current" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "current" + } + field { + name: "limit" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "limit" + } + } + message_type { + name: "CPUStat" + field { + name: "usage" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.CPUUsage" + json_name: "usage" + } + field { + name: "throttling" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.Throttle" + json_name: "throttling" + } + } + message_type { + name: "CPUUsage" + field { + name: "total" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "total" + } + field { + name: "kernel" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "kernel" + } + field { + name: "user" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "user" + } + field { + name: "per_cpu" + number: 4 + label: LABEL_REPEATED + type: TYPE_UINT64 + options { + 65004: "PerCPU" + } + json_name: "perCpu" + } + } + message_type { + name: "Throttle" + field { + name: "periods" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "periods" + } + field { + name: "throttled_periods" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "throttledPeriods" + } + field { + name: "throttled_time" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "throttledTime" + } + } + message_type { + name: "MemoryStat" + field { + name: "cache" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "cache" + } + field { + name: "rss" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65004: "RSS" + } + json_name: "rss" + } + field { + name: "rss_huge" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65004: "RSSHuge" + } + json_name: "rssHuge" + } + field { + name: "mapped_file" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "mappedFile" + } + field { + name: "dirty" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "dirty" + } + field { + name: "writeback" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "writeback" + } + field { + name: "pg_pg_in" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pgPgIn" + } + field { + name: "pg_pg_out" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pgPgOut" + } + field { + name: "pg_fault" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pgFault" + } + field { + name: "pg_maj_fault" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pgMajFault" + } + field { + name: "inactive_anon" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "inactiveAnon" + } + field { + name: "active_anon" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "activeAnon" + } + field { + name: "inactive_file" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "inactiveFile" + } + field { + name: "active_file" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "activeFile" + } + field { + name: "unevictable" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "unevictable" + } + field { + name: "hierarchical_memory_limit" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "hierarchicalMemoryLimit" + } + field { + name: "hierarchical_swap_limit" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "hierarchicalSwapLimit" + } + field { + name: "total_cache" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalCache" + } + field { + name: "total_rss" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65004: "TotalRSS" + } + json_name: "totalRss" + } + field { + name: "total_rss_huge" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65004: "TotalRSSHuge" + } + json_name: "totalRssHuge" + } + field { + name: "total_mapped_file" + number: 21 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalMappedFile" + } + field { + name: "total_dirty" + number: 22 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalDirty" + } + field { + name: "total_writeback" + number: 23 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalWriteback" + } + field { + name: "total_pg_pg_in" + number: 24 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalPgPgIn" + } + field { + name: "total_pg_pg_out" + number: 25 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalPgPgOut" + } + field { + name: "total_pg_fault" + number: 26 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalPgFault" + } + field { + name: "total_pg_maj_fault" + number: 27 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalPgMajFault" + } + field { + name: "total_inactive_anon" + number: 28 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalInactiveAnon" + } + field { + name: "total_active_anon" + number: 29 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalActiveAnon" + } + field { + name: "total_inactive_file" + number: 30 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalInactiveFile" + } + field { + name: "total_active_file" + number: 31 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalActiveFile" + } + field { + name: "total_unevictable" + number: 32 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "totalUnevictable" + } + field { + name: "usage" + number: 33 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.MemoryEntry" + json_name: "usage" + } + field { + name: "swap" + number: 34 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.MemoryEntry" + json_name: "swap" + } + field { + name: "kernel" + number: 35 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.MemoryEntry" + json_name: "kernel" + } + field { + name: "kernel_tcp" + number: 36 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.MemoryEntry" + options { + 65004: "KernelTCP" + } + json_name: "kernelTcp" + } + } + message_type { + name: "MemoryEntry" + field { + name: "limit" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "limit" + } + field { + name: "usage" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "usage" + } + field { + name: "max" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "max" + } + field { + name: "failcnt" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "failcnt" + } + } + message_type { + name: "BlkIOStat" + field { + name: "io_service_bytes_recursive" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.BlkIOEntry" + json_name: "ioServiceBytesRecursive" + } + field { + name: "io_serviced_recursive" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.BlkIOEntry" + json_name: "ioServicedRecursive" + } + field { + name: "io_queued_recursive" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.BlkIOEntry" + json_name: "ioQueuedRecursive" + } + field { + name: "io_service_time_recursive" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.BlkIOEntry" + json_name: "ioServiceTimeRecursive" + } + field { + name: "io_wait_time_recursive" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.BlkIOEntry" + json_name: "ioWaitTimeRecursive" + } + field { + name: "io_merged_recursive" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.BlkIOEntry" + json_name: "ioMergedRecursive" + } + field { + name: "io_time_recursive" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.BlkIOEntry" + json_name: "ioTimeRecursive" + } + field { + name: "sectors_recursive" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.BlkIOEntry" + json_name: "sectorsRecursive" + } + } + message_type { + name: "BlkIOEntry" + field { + name: "op" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "op" + } + field { + name: "device" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "device" + } + field { + name: "major" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "major" + } + field { + name: "minor" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "minor" + } + field { + name: "value" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "value" + } + } + message_type { + name: "RdmaStat" + field { + name: "current" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.RdmaEntry" + json_name: "current" + } + field { + name: "limit" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.RdmaEntry" + json_name: "limit" + } + } + message_type { + name: "RdmaEntry" + field { + name: "device" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "device" + } + field { + name: "hca_handles" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "hcaHandles" + } + field { + name: "hca_objects" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "hcaObjects" + } + } + message_type { + name: "NetworkStat" + field { + name: "name" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "name" + } + field { + name: "rx_bytes" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "rxBytes" + } + field { + name: "rx_packets" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "rxPackets" + } + field { + name: "rx_errors" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "rxErrors" + } + field { + name: "rx_dropped" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "rxDropped" + } + field { + name: "tx_bytes" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "txBytes" + } + field { + name: "tx_packets" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "txPackets" + } + field { + name: "tx_errors" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "txErrors" + } + field { + name: "tx_dropped" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "txDropped" + } + } + syntax: "proto3" +} +file { + name: "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.proto" + package: "containerd.runhcs.stats.v1" + dependency: "gogoproto/gogo.proto" + dependency: "google/protobuf/timestamp.proto" + dependency: "github.com/containerd/cgroups/stats/v1/metrics.proto" + message_type { + name: "Statistics" + field { + name: "windows" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".containerd.runhcs.stats.v1.WindowsContainerStatistics" + oneof_index: 0 + json_name: "windows" + } + field { + name: "linux" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.Metrics" + oneof_index: 0 + json_name: "linux" + } + field { + name: "vm" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".containerd.runhcs.stats.v1.VirtualMachineStatistics" + options { + 65004: "VM" + } + json_name: "vm" + } + oneof_decl { + name: "container" + } + } + message_type { + name: "WindowsContainerStatistics" + field { + name: "timestamp" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + options { + 65001: 0 + 65010: 1 + } + json_name: "timestamp" + } + field { + name: "container_start_time" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.protobuf.Timestamp" + options { + 65001: 0 + 65010: 1 + } + json_name: "containerStartTime" + } + field { + name: "uptime_ns" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65004: "UptimeNS" + } + json_name: "uptimeNs" + } + field { + name: "processor" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".containerd.runhcs.stats.v1.WindowsContainerProcessorStatistics" + json_name: "processor" + } + field { + name: "memory" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".containerd.runhcs.stats.v1.WindowsContainerMemoryStatistics" + json_name: "memory" + } + field { + name: "storage" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".containerd.runhcs.stats.v1.WindowsContainerStorageStatistics" + json_name: "storage" + } + } + message_type { + name: "WindowsContainerProcessorStatistics" + field { + name: "total_runtime_ns" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65004: "TotalRuntimeNS" + } + json_name: "totalRuntimeNs" + } + field { + name: "runtime_user_ns" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65004: "RuntimeUserNS" + } + json_name: "runtimeUserNs" + } + field { + name: "runtime_kernel_ns" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65004: "RuntimeKernelNS" + } + json_name: "runtimeKernelNs" + } + } + message_type { + name: "WindowsContainerMemoryStatistics" + field { + name: "memory_usage_commit_bytes" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "memoryUsageCommitBytes" + } + field { + name: "memory_usage_commit_peak_bytes" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "memoryUsageCommitPeakBytes" + } + field { + name: "memory_usage_private_working_set_bytes" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "memoryUsagePrivateWorkingSetBytes" + } + } + message_type { + name: "WindowsContainerStorageStatistics" + field { + name: "read_count_normalized" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "readCountNormalized" + } + field { + name: "read_size_bytes" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "readSizeBytes" + } + field { + name: "write_count_normalized" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "writeCountNormalized" + } + field { + name: "write_size_bytes" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "writeSizeBytes" + } + } + message_type { + name: "VirtualMachineStatistics" + field { + name: "processor" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".containerd.runhcs.stats.v1.VirtualMachineProcessorStatistics" + json_name: "processor" + } + field { + name: "memory" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".containerd.runhcs.stats.v1.VirtualMachineMemoryStatistics" + json_name: "memory" + } + } + message_type { + name: "VirtualMachineProcessorStatistics" + field { + name: "total_runtime_ns" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + options { + 65004: "TotalRuntimeNS" + } + json_name: "totalRuntimeNs" + } + } + message_type { + name: "VirtualMachineMemoryStatistics" + field { + name: "working_set_bytes" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "workingSetBytes" + } + field { + name: "virtual_node_count" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "virtualNodeCount" + } + field { + name: "vm_memory" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".containerd.runhcs.stats.v1.VirtualMachineMemory" + json_name: "vmMemory" + } + } + message_type { + name: "VirtualMachineMemory" + field { + name: "available_memory" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "availableMemory" + } + field { + name: "available_memory_buffer" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_INT32 + json_name: "availableMemoryBuffer" + } + field { + name: "reserved_memory" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "reservedMemory" + } + field { + name: "assigned_memory" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "assignedMemory" + } + field { + name: "slp_active" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "slpActive" + } + field { + name: "balancing_enabled" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "balancingEnabled" + } + field { + name: "dm_operation_in_progress" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "dmOperationInProgress" + } + } + options { + go_package: "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats;stats" + } + weak_dependency: 0 + syntax: "proto3" +} diff --git a/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.pb.go b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.pb.go new file mode 100644 index 00000000000..0b41b11b0c4 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.pb.go @@ -0,0 +1,2819 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.proto + +package stats + +import ( + fmt "fmt" + v1 "github.com/containerd/cgroups/stats/v1" + proto "github.com/gogo/protobuf/proto" + _ "github.com/gogo/protobuf/types" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + io "io" + math "math" + reflect "reflect" + strings "strings" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Statistics struct { + // Types that are valid to be assigned to Container: + // *Statistics_Windows + // *Statistics_Linux + Container isStatistics_Container `protobuf_oneof:"container"` + VM *VirtualMachineStatistics `protobuf:"bytes,3,opt,name=vm,proto3" json:"vm,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Statistics) Reset() { *m = Statistics{} } +func (*Statistics) ProtoMessage() {} +func (*Statistics) Descriptor() ([]byte, []int) { + return fileDescriptor_23217f96da3a05cc, []int{0} +} +func (m *Statistics) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Statistics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Statistics.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Statistics) XXX_Merge(src proto.Message) { + xxx_messageInfo_Statistics.Merge(m, src) +} +func (m *Statistics) XXX_Size() int { + return m.Size() +} +func (m *Statistics) XXX_DiscardUnknown() { + xxx_messageInfo_Statistics.DiscardUnknown(m) +} + +var xxx_messageInfo_Statistics proto.InternalMessageInfo + +type isStatistics_Container interface { + isStatistics_Container() + MarshalTo([]byte) (int, error) + Size() int +} + +type Statistics_Windows struct { + Windows *WindowsContainerStatistics `protobuf:"bytes,1,opt,name=windows,proto3,oneof"` +} +type Statistics_Linux struct { + Linux *v1.Metrics `protobuf:"bytes,2,opt,name=linux,proto3,oneof"` +} + +func (*Statistics_Windows) isStatistics_Container() {} +func (*Statistics_Linux) isStatistics_Container() {} + +func (m *Statistics) GetContainer() isStatistics_Container { + if m != nil { + return m.Container + } + return nil +} + +func (m *Statistics) GetWindows() *WindowsContainerStatistics { + if x, ok := m.GetContainer().(*Statistics_Windows); ok { + return x.Windows + } + return nil +} + +func (m *Statistics) GetLinux() *v1.Metrics { + if x, ok := m.GetContainer().(*Statistics_Linux); ok { + return x.Linux + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Statistics) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Statistics_OneofMarshaler, _Statistics_OneofUnmarshaler, _Statistics_OneofSizer, []interface{}{ + (*Statistics_Windows)(nil), + (*Statistics_Linux)(nil), + } +} + +func _Statistics_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Statistics) + // container + switch x := m.Container.(type) { + case *Statistics_Windows: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Windows); err != nil { + return err + } + case *Statistics_Linux: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Linux); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Statistics.Container has unexpected type %T", x) + } + return nil +} + +func _Statistics_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Statistics) + switch tag { + case 1: // container.windows + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(WindowsContainerStatistics) + err := b.DecodeMessage(msg) + m.Container = &Statistics_Windows{msg} + return true, err + case 2: // container.linux + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(v1.Metrics) + err := b.DecodeMessage(msg) + m.Container = &Statistics_Linux{msg} + return true, err + default: + return false, nil + } +} + +func _Statistics_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Statistics) + // container + switch x := m.Container.(type) { + case *Statistics_Windows: + s := proto.Size(x.Windows) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *Statistics_Linux: + s := proto.Size(x.Linux) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type WindowsContainerStatistics struct { + Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + ContainerStartTime time.Time `protobuf:"bytes,2,opt,name=container_start_time,json=containerStartTime,proto3,stdtime" json:"container_start_time"` + UptimeNS uint64 `protobuf:"varint,3,opt,name=uptime_ns,json=uptimeNs,proto3" json:"uptime_ns,omitempty"` + Processor *WindowsContainerProcessorStatistics `protobuf:"bytes,4,opt,name=processor,proto3" json:"processor,omitempty"` + Memory *WindowsContainerMemoryStatistics `protobuf:"bytes,5,opt,name=memory,proto3" json:"memory,omitempty"` + Storage *WindowsContainerStorageStatistics `protobuf:"bytes,6,opt,name=storage,proto3" json:"storage,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WindowsContainerStatistics) Reset() { *m = WindowsContainerStatistics{} } +func (*WindowsContainerStatistics) ProtoMessage() {} +func (*WindowsContainerStatistics) Descriptor() ([]byte, []int) { + return fileDescriptor_23217f96da3a05cc, []int{1} +} +func (m *WindowsContainerStatistics) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WindowsContainerStatistics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WindowsContainerStatistics.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WindowsContainerStatistics) XXX_Merge(src proto.Message) { + xxx_messageInfo_WindowsContainerStatistics.Merge(m, src) +} +func (m *WindowsContainerStatistics) XXX_Size() int { + return m.Size() +} +func (m *WindowsContainerStatistics) XXX_DiscardUnknown() { + xxx_messageInfo_WindowsContainerStatistics.DiscardUnknown(m) +} + +var xxx_messageInfo_WindowsContainerStatistics proto.InternalMessageInfo + +type WindowsContainerProcessorStatistics struct { + TotalRuntimeNS uint64 `protobuf:"varint,1,opt,name=total_runtime_ns,json=totalRuntimeNs,proto3" json:"total_runtime_ns,omitempty"` + RuntimeUserNS uint64 `protobuf:"varint,2,opt,name=runtime_user_ns,json=runtimeUserNs,proto3" json:"runtime_user_ns,omitempty"` + RuntimeKernelNS uint64 `protobuf:"varint,3,opt,name=runtime_kernel_ns,json=runtimeKernelNs,proto3" json:"runtime_kernel_ns,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WindowsContainerProcessorStatistics) Reset() { *m = WindowsContainerProcessorStatistics{} } +func (*WindowsContainerProcessorStatistics) ProtoMessage() {} +func (*WindowsContainerProcessorStatistics) Descriptor() ([]byte, []int) { + return fileDescriptor_23217f96da3a05cc, []int{2} +} +func (m *WindowsContainerProcessorStatistics) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WindowsContainerProcessorStatistics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WindowsContainerProcessorStatistics.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WindowsContainerProcessorStatistics) XXX_Merge(src proto.Message) { + xxx_messageInfo_WindowsContainerProcessorStatistics.Merge(m, src) +} +func (m *WindowsContainerProcessorStatistics) XXX_Size() int { + return m.Size() +} +func (m *WindowsContainerProcessorStatistics) XXX_DiscardUnknown() { + xxx_messageInfo_WindowsContainerProcessorStatistics.DiscardUnknown(m) +} + +var xxx_messageInfo_WindowsContainerProcessorStatistics proto.InternalMessageInfo + +type WindowsContainerMemoryStatistics struct { + MemoryUsageCommitBytes uint64 `protobuf:"varint,1,opt,name=memory_usage_commit_bytes,json=memoryUsageCommitBytes,proto3" json:"memory_usage_commit_bytes,omitempty"` + MemoryUsageCommitPeakBytes uint64 `protobuf:"varint,2,opt,name=memory_usage_commit_peak_bytes,json=memoryUsageCommitPeakBytes,proto3" json:"memory_usage_commit_peak_bytes,omitempty"` + MemoryUsagePrivateWorkingSetBytes uint64 `protobuf:"varint,3,opt,name=memory_usage_private_working_set_bytes,json=memoryUsagePrivateWorkingSetBytes,proto3" json:"memory_usage_private_working_set_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WindowsContainerMemoryStatistics) Reset() { *m = WindowsContainerMemoryStatistics{} } +func (*WindowsContainerMemoryStatistics) ProtoMessage() {} +func (*WindowsContainerMemoryStatistics) Descriptor() ([]byte, []int) { + return fileDescriptor_23217f96da3a05cc, []int{3} +} +func (m *WindowsContainerMemoryStatistics) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WindowsContainerMemoryStatistics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WindowsContainerMemoryStatistics.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WindowsContainerMemoryStatistics) XXX_Merge(src proto.Message) { + xxx_messageInfo_WindowsContainerMemoryStatistics.Merge(m, src) +} +func (m *WindowsContainerMemoryStatistics) XXX_Size() int { + return m.Size() +} +func (m *WindowsContainerMemoryStatistics) XXX_DiscardUnknown() { + xxx_messageInfo_WindowsContainerMemoryStatistics.DiscardUnknown(m) +} + +var xxx_messageInfo_WindowsContainerMemoryStatistics proto.InternalMessageInfo + +type WindowsContainerStorageStatistics struct { + ReadCountNormalized uint64 `protobuf:"varint,1,opt,name=read_count_normalized,json=readCountNormalized,proto3" json:"read_count_normalized,omitempty"` + ReadSizeBytes uint64 `protobuf:"varint,2,opt,name=read_size_bytes,json=readSizeBytes,proto3" json:"read_size_bytes,omitempty"` + WriteCountNormalized uint64 `protobuf:"varint,3,opt,name=write_count_normalized,json=writeCountNormalized,proto3" json:"write_count_normalized,omitempty"` + WriteSizeBytes uint64 `protobuf:"varint,4,opt,name=write_size_bytes,json=writeSizeBytes,proto3" json:"write_size_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WindowsContainerStorageStatistics) Reset() { *m = WindowsContainerStorageStatistics{} } +func (*WindowsContainerStorageStatistics) ProtoMessage() {} +func (*WindowsContainerStorageStatistics) Descriptor() ([]byte, []int) { + return fileDescriptor_23217f96da3a05cc, []int{4} +} +func (m *WindowsContainerStorageStatistics) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WindowsContainerStorageStatistics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WindowsContainerStorageStatistics.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WindowsContainerStorageStatistics) XXX_Merge(src proto.Message) { + xxx_messageInfo_WindowsContainerStorageStatistics.Merge(m, src) +} +func (m *WindowsContainerStorageStatistics) XXX_Size() int { + return m.Size() +} +func (m *WindowsContainerStorageStatistics) XXX_DiscardUnknown() { + xxx_messageInfo_WindowsContainerStorageStatistics.DiscardUnknown(m) +} + +var xxx_messageInfo_WindowsContainerStorageStatistics proto.InternalMessageInfo + +type VirtualMachineStatistics struct { + Processor *VirtualMachineProcessorStatistics `protobuf:"bytes,1,opt,name=processor,proto3" json:"processor,omitempty"` + Memory *VirtualMachineMemoryStatistics `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VirtualMachineStatistics) Reset() { *m = VirtualMachineStatistics{} } +func (*VirtualMachineStatistics) ProtoMessage() {} +func (*VirtualMachineStatistics) Descriptor() ([]byte, []int) { + return fileDescriptor_23217f96da3a05cc, []int{5} +} +func (m *VirtualMachineStatistics) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VirtualMachineStatistics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VirtualMachineStatistics.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VirtualMachineStatistics) XXX_Merge(src proto.Message) { + xxx_messageInfo_VirtualMachineStatistics.Merge(m, src) +} +func (m *VirtualMachineStatistics) XXX_Size() int { + return m.Size() +} +func (m *VirtualMachineStatistics) XXX_DiscardUnknown() { + xxx_messageInfo_VirtualMachineStatistics.DiscardUnknown(m) +} + +var xxx_messageInfo_VirtualMachineStatistics proto.InternalMessageInfo + +type VirtualMachineProcessorStatistics struct { + TotalRuntimeNS uint64 `protobuf:"varint,1,opt,name=total_runtime_ns,json=totalRuntimeNs,proto3" json:"total_runtime_ns,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VirtualMachineProcessorStatistics) Reset() { *m = VirtualMachineProcessorStatistics{} } +func (*VirtualMachineProcessorStatistics) ProtoMessage() {} +func (*VirtualMachineProcessorStatistics) Descriptor() ([]byte, []int) { + return fileDescriptor_23217f96da3a05cc, []int{6} +} +func (m *VirtualMachineProcessorStatistics) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VirtualMachineProcessorStatistics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VirtualMachineProcessorStatistics.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VirtualMachineProcessorStatistics) XXX_Merge(src proto.Message) { + xxx_messageInfo_VirtualMachineProcessorStatistics.Merge(m, src) +} +func (m *VirtualMachineProcessorStatistics) XXX_Size() int { + return m.Size() +} +func (m *VirtualMachineProcessorStatistics) XXX_DiscardUnknown() { + xxx_messageInfo_VirtualMachineProcessorStatistics.DiscardUnknown(m) +} + +var xxx_messageInfo_VirtualMachineProcessorStatistics proto.InternalMessageInfo + +type VirtualMachineMemoryStatistics struct { + WorkingSetBytes uint64 `protobuf:"varint,1,opt,name=working_set_bytes,json=workingSetBytes,proto3" json:"working_set_bytes,omitempty"` + VirtualNodeCount uint32 `protobuf:"varint,2,opt,name=virtual_node_count,json=virtualNodeCount,proto3" json:"virtual_node_count,omitempty"` + VmMemory *VirtualMachineMemory `protobuf:"bytes,3,opt,name=vm_memory,json=vmMemory,proto3" json:"vm_memory,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VirtualMachineMemoryStatistics) Reset() { *m = VirtualMachineMemoryStatistics{} } +func (*VirtualMachineMemoryStatistics) ProtoMessage() {} +func (*VirtualMachineMemoryStatistics) Descriptor() ([]byte, []int) { + return fileDescriptor_23217f96da3a05cc, []int{7} +} +func (m *VirtualMachineMemoryStatistics) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VirtualMachineMemoryStatistics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VirtualMachineMemoryStatistics.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VirtualMachineMemoryStatistics) XXX_Merge(src proto.Message) { + xxx_messageInfo_VirtualMachineMemoryStatistics.Merge(m, src) +} +func (m *VirtualMachineMemoryStatistics) XXX_Size() int { + return m.Size() +} +func (m *VirtualMachineMemoryStatistics) XXX_DiscardUnknown() { + xxx_messageInfo_VirtualMachineMemoryStatistics.DiscardUnknown(m) +} + +var xxx_messageInfo_VirtualMachineMemoryStatistics proto.InternalMessageInfo + +type VirtualMachineMemory struct { + AvailableMemory int32 `protobuf:"varint,1,opt,name=available_memory,json=availableMemory,proto3" json:"available_memory,omitempty"` + AvailableMemoryBuffer int32 `protobuf:"varint,2,opt,name=available_memory_buffer,json=availableMemoryBuffer,proto3" json:"available_memory_buffer,omitempty"` + ReservedMemory uint64 `protobuf:"varint,3,opt,name=reserved_memory,json=reservedMemory,proto3" json:"reserved_memory,omitempty"` + AssignedMemory uint64 `protobuf:"varint,4,opt,name=assigned_memory,json=assignedMemory,proto3" json:"assigned_memory,omitempty"` + SlpActive bool `protobuf:"varint,5,opt,name=slp_active,json=slpActive,proto3" json:"slp_active,omitempty"` + BalancingEnabled bool `protobuf:"varint,6,opt,name=balancing_enabled,json=balancingEnabled,proto3" json:"balancing_enabled,omitempty"` + DmOperationInProgress bool `protobuf:"varint,7,opt,name=dm_operation_in_progress,json=dmOperationInProgress,proto3" json:"dm_operation_in_progress,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VirtualMachineMemory) Reset() { *m = VirtualMachineMemory{} } +func (*VirtualMachineMemory) ProtoMessage() {} +func (*VirtualMachineMemory) Descriptor() ([]byte, []int) { + return fileDescriptor_23217f96da3a05cc, []int{8} +} +func (m *VirtualMachineMemory) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VirtualMachineMemory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VirtualMachineMemory.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VirtualMachineMemory) XXX_Merge(src proto.Message) { + xxx_messageInfo_VirtualMachineMemory.Merge(m, src) +} +func (m *VirtualMachineMemory) XXX_Size() int { + return m.Size() +} +func (m *VirtualMachineMemory) XXX_DiscardUnknown() { + xxx_messageInfo_VirtualMachineMemory.DiscardUnknown(m) +} + +var xxx_messageInfo_VirtualMachineMemory proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Statistics)(nil), "containerd.runhcs.stats.v1.Statistics") + proto.RegisterType((*WindowsContainerStatistics)(nil), "containerd.runhcs.stats.v1.WindowsContainerStatistics") + proto.RegisterType((*WindowsContainerProcessorStatistics)(nil), "containerd.runhcs.stats.v1.WindowsContainerProcessorStatistics") + proto.RegisterType((*WindowsContainerMemoryStatistics)(nil), "containerd.runhcs.stats.v1.WindowsContainerMemoryStatistics") + proto.RegisterType((*WindowsContainerStorageStatistics)(nil), "containerd.runhcs.stats.v1.WindowsContainerStorageStatistics") + proto.RegisterType((*VirtualMachineStatistics)(nil), "containerd.runhcs.stats.v1.VirtualMachineStatistics") + proto.RegisterType((*VirtualMachineProcessorStatistics)(nil), "containerd.runhcs.stats.v1.VirtualMachineProcessorStatistics") + proto.RegisterType((*VirtualMachineMemoryStatistics)(nil), "containerd.runhcs.stats.v1.VirtualMachineMemoryStatistics") + proto.RegisterType((*VirtualMachineMemory)(nil), "containerd.runhcs.stats.v1.VirtualMachineMemory") +} + +func init() { + proto.RegisterFile("github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.proto", fileDescriptor_23217f96da3a05cc) +} + +var fileDescriptor_23217f96da3a05cc = []byte{ + // 1037 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x6d, 0x6f, 0xdb, 0x44, + 0x1c, 0x8f, 0xb3, 0x3e, 0x24, 0x37, 0xda, 0xb4, 0xb7, 0x76, 0x84, 0x48, 0x24, 0x6b, 0x90, 0xf6, + 0x00, 0x34, 0xa1, 0xa3, 0x1a, 0x1a, 0x0c, 0x4d, 0xa4, 0x02, 0x0d, 0xb1, 0x84, 0x72, 0xe9, 0x03, + 0x02, 0x21, 0x73, 0xb1, 0xaf, 0xee, 0xa9, 0xb6, 0xcf, 0xba, 0x3b, 0xbb, 0xac, 0xaf, 0xf8, 0x08, + 0x7c, 0xac, 0x22, 0xde, 0xec, 0x25, 0xaf, 0x32, 0x96, 0x6f, 0x80, 0x84, 0x78, 0x3d, 0xf9, 0xee, + 0x9c, 0xb8, 0xed, 0xba, 0xb6, 0xda, 0x9b, 0xc8, 0xfe, 0xff, 0x1e, 0xee, 0xff, 0x70, 0xe7, 0x0b, + 0x78, 0xea, 0x51, 0xb9, 0x1f, 0x0f, 0x5a, 0x0e, 0x0b, 0xda, 0x5d, 0xea, 0x70, 0x26, 0xd8, 0x9e, + 0x6c, 0xef, 0x3b, 0x42, 0xec, 0xd3, 0xa0, 0xed, 0x04, 0x6e, 0xdb, 0x61, 0xa1, 0xc4, 0x34, 0x24, + 0xdc, 0x5d, 0x4d, 0x63, 0xab, 0x3c, 0x0e, 0xf7, 0x1d, 0xb1, 0x9a, 0xac, 0xb5, 0x85, 0xc4, 0x52, + 0xe8, 0xdf, 0x56, 0xc4, 0x99, 0x64, 0xb0, 0x36, 0x21, 0xb7, 0x34, 0xaf, 0xa5, 0xe1, 0x64, 0xad, + 0xb6, 0xe4, 0x31, 0x8f, 0x29, 0x5a, 0x3b, 0x7d, 0xd2, 0x8a, 0x5a, 0xc3, 0x63, 0xcc, 0xf3, 0x49, + 0x5b, 0xbd, 0x0d, 0xe2, 0xbd, 0xb6, 0xa4, 0x01, 0x11, 0x12, 0x07, 0x91, 0x21, 0xac, 0xe7, 0x12, + 0x9c, 0xb8, 0xb7, 0x1d, 0x8f, 0xb3, 0x38, 0x32, 0xab, 0xb7, 0x93, 0xb5, 0x76, 0x40, 0x24, 0xa7, + 0x8e, 0x49, 0xa4, 0xf9, 0xbf, 0x05, 0x40, 0x5f, 0x62, 0x49, 0x85, 0xa4, 0x8e, 0x80, 0x08, 0xcc, + 0x1e, 0xd2, 0xd0, 0x65, 0x87, 0xa2, 0x6a, 0xdd, 0xb2, 0xee, 0x5e, 0xbf, 0xff, 0xa0, 0x75, 0x7e, + 0xa6, 0xad, 0x5d, 0x4d, 0xdd, 0xc8, 0x18, 0x13, 0xa3, 0x27, 0x05, 0x94, 0x19, 0xc1, 0x87, 0x60, + 0xda, 0xa7, 0x61, 0xfc, 0x5b, 0xb5, 0xa8, 0x1c, 0x57, 0x5a, 0x94, 0xe5, 0x4d, 0x4d, 0x82, 0xa9, + 0x5f, 0x57, 0xa7, 0xf6, 0xa4, 0x80, 0xb4, 0x02, 0x3e, 0x05, 0xc5, 0x24, 0xa8, 0x5e, 0x53, 0xba, + 0xf5, 0x37, 0x65, 0xb2, 0x43, 0xb9, 0x8c, 0xb1, 0xdf, 0xc5, 0xce, 0x3e, 0x0d, 0xc9, 0x24, 0x8f, + 0xce, 0xcc, 0x68, 0xd8, 0x28, 0xee, 0x74, 0x51, 0x31, 0x09, 0x3a, 0xd7, 0x41, 0x79, 0x6c, 0xd1, + 0xfc, 0xf7, 0x1a, 0xa8, 0x9d, 0x9f, 0x3f, 0xec, 0x80, 0xf2, 0xb8, 0xc1, 0xa6, 0x15, 0xb5, 0x96, + 0x1e, 0x41, 0x2b, 0x1b, 0x41, 0x6b, 0x2b, 0x63, 0x74, 0x4a, 0xc7, 0xc3, 0x46, 0xe1, 0x8f, 0x17, + 0x0d, 0x0b, 0x4d, 0x64, 0x70, 0x07, 0x2c, 0x8d, 0xd7, 0xb3, 0x85, 0xc4, 0x5c, 0xda, 0x29, 0x68, + 0xfa, 0x70, 0x39, 0x3b, 0xe8, 0xe4, 0x92, 0xe3, 0x32, 0xa5, 0xc0, 0x7b, 0xa0, 0x1c, 0x47, 0xa9, + 0x93, 0x1d, 0x0a, 0xd5, 0x9c, 0xa9, 0xce, 0x3b, 0xa3, 0x61, 0xa3, 0xb4, 0xad, 0x82, 0xbd, 0x3e, + 0x2a, 0x69, 0xb8, 0x27, 0xe0, 0x2f, 0xa0, 0x1c, 0x71, 0xe6, 0x10, 0x21, 0x18, 0xaf, 0x4e, 0xa9, + 0x75, 0x1f, 0x5f, 0x65, 0xa2, 0x9b, 0x99, 0x78, 0xd2, 0x1a, 0x34, 0x71, 0x84, 0x5b, 0x60, 0x26, + 0x20, 0x01, 0xe3, 0xcf, 0xaa, 0xd3, 0xca, 0xfb, 0xd1, 0x55, 0xbc, 0xbb, 0x4a, 0x99, 0x33, 0x36, + 0x5e, 0x70, 0x17, 0xcc, 0x0a, 0xc9, 0x38, 0xf6, 0x48, 0x75, 0x46, 0xd9, 0x7e, 0x79, 0xb5, 0x4d, + 0xa8, 0xa4, 0x39, 0xdf, 0xcc, 0xad, 0xf9, 0xc2, 0x02, 0x1f, 0x5c, 0xa2, 0x42, 0xf8, 0x08, 0x2c, + 0x48, 0x26, 0xb1, 0x6f, 0xf3, 0x38, 0xcc, 0xfa, 0x6c, 0xa9, 0x3e, 0xc3, 0xd1, 0xb0, 0x31, 0xbf, + 0x95, 0x62, 0x48, 0x43, 0xbd, 0x3e, 0x9a, 0x97, 0xf9, 0xf7, 0x74, 0xbf, 0x57, 0x32, 0x5d, 0x2c, + 0x08, 0x4f, 0xc5, 0x45, 0x25, 0x5e, 0x1c, 0x0d, 0x1b, 0x73, 0x86, 0xb7, 0x2d, 0x08, 0xef, 0xf5, + 0xd1, 0x1c, 0xcf, 0xbd, 0x0a, 0xf8, 0x18, 0x2c, 0x66, 0xd2, 0x03, 0xc2, 0x43, 0xe2, 0x4f, 0x26, + 0x7c, 0x63, 0x34, 0x6c, 0x54, 0x8c, 0xf8, 0x3b, 0x85, 0xf5, 0xfa, 0x28, 0x5b, 0xc8, 0x04, 0x44, + 0xf3, 0x3f, 0x0b, 0xdc, 0xba, 0xa8, 0xcf, 0xf0, 0x21, 0x78, 0x4f, 0x77, 0xda, 0x8e, 0x05, 0xf6, + 0x88, 0xed, 0xb0, 0x20, 0xa0, 0xd2, 0x1e, 0x3c, 0x93, 0xc4, 0xd4, 0x89, 0x6e, 0x6a, 0xc2, 0x76, + 0x8a, 0x6f, 0x28, 0xb8, 0x93, 0xa2, 0xb0, 0x03, 0xea, 0xaf, 0x93, 0x46, 0x04, 0x1f, 0x18, 0xbd, + 0x2a, 0x15, 0xd5, 0xce, 0xe8, 0x37, 0x09, 0x3e, 0xd0, 0x1e, 0x3f, 0x80, 0xdb, 0x27, 0x3c, 0x22, + 0x4e, 0x13, 0x2c, 0x89, 0x7d, 0xc8, 0xf8, 0x01, 0x0d, 0x3d, 0x5b, 0x90, 0x2c, 0x17, 0x55, 0x39, + 0x5a, 0xc9, 0x79, 0x6d, 0x6a, 0xee, 0xae, 0xa6, 0xf6, 0x89, 0x4e, 0x2b, 0x1d, 0xec, 0xca, 0x85, + 0xfb, 0x00, 0xde, 0x07, 0xcb, 0x9c, 0x60, 0xd7, 0x76, 0x58, 0x1c, 0x4a, 0x3b, 0x64, 0x3c, 0xc0, + 0x3e, 0x3d, 0x22, 0xae, 0xa9, 0xf9, 0x46, 0x0a, 0x6e, 0xa4, 0x58, 0x6f, 0x0c, 0xc1, 0xdb, 0xa0, + 0xa2, 0x34, 0x82, 0x1e, 0x91, 0x13, 0x15, 0xce, 0xa5, 0xe1, 0x3e, 0x3d, 0x22, 0xba, 0xa8, 0x75, + 0x70, 0xf3, 0x90, 0x53, 0x49, 0xce, 0x9a, 0xeb, 0x22, 0x96, 0x14, 0x7a, 0xda, 0xfd, 0x2e, 0x58, + 0xd0, 0xaa, 0x9c, 0xfd, 0x94, 0xe2, 0xcf, 0xab, 0xf8, 0xd8, 0xbf, 0xf9, 0x97, 0x05, 0xaa, 0xe7, + 0x7d, 0xe4, 0xe0, 0xcf, 0xf9, 0x53, 0x6e, 0x5d, 0x7c, 0x64, 0x4e, 0x1a, 0x5d, 0x70, 0xc6, 0xd1, + 0xf8, 0x8c, 0xeb, 0xef, 0xd6, 0xe7, 0x97, 0x77, 0x3e, 0xef, 0x84, 0x37, 0x31, 0x58, 0xb9, 0x30, + 0x87, 0xb7, 0x3b, 0x85, 0xcd, 0x3f, 0x2d, 0x50, 0x7f, 0x73, 0x36, 0xf0, 0x43, 0xb0, 0x78, 0x76, + 0xcf, 0xe9, 0xbd, 0x50, 0x39, 0x3c, 0xb9, 0xc3, 0xe0, 0xc7, 0x00, 0x26, 0xda, 0xcd, 0x0e, 0x99, + 0x6b, 0xc6, 0xac, 0x3a, 0x32, 0x87, 0x16, 0x0c, 0xd2, 0x63, 0xae, 0x9e, 0x30, 0xec, 0x82, 0x72, + 0x12, 0xd8, 0xa6, 0x6d, 0xfa, 0xfa, 0xfa, 0xe4, 0xaa, 0x6d, 0x43, 0xa5, 0x24, 0xd0, 0x4f, 0xcd, + 0xe7, 0x45, 0xb0, 0xf4, 0x3a, 0x0a, 0xbc, 0x07, 0x16, 0x70, 0x82, 0xa9, 0x8f, 0x07, 0x3e, 0xc9, + 0x96, 0x4b, 0x0b, 0x98, 0x46, 0x95, 0x71, 0xdc, 0x50, 0x1f, 0x80, 0x77, 0x4f, 0x53, 0xed, 0x41, + 0xbc, 0xb7, 0x47, 0xb8, 0xaa, 0x62, 0x1a, 0x2d, 0x9f, 0x52, 0x74, 0x14, 0x08, 0xef, 0xa4, 0x07, + 0x40, 0x10, 0x9e, 0x10, 0x37, 0x5f, 0xd0, 0x14, 0x9a, 0xcf, 0xc2, 0x66, 0x81, 0x3b, 0xa0, 0x82, + 0x85, 0xa0, 0x5e, 0x38, 0x21, 0x9a, 0xad, 0x9c, 0x85, 0x0d, 0xf1, 0x7d, 0x00, 0x84, 0x1f, 0xd9, + 0xd8, 0x91, 0x34, 0x21, 0xea, 0xe2, 0x28, 0xa1, 0xb2, 0xf0, 0xa3, 0xaf, 0x54, 0x00, 0x7e, 0x04, + 0x16, 0x07, 0xd8, 0xc7, 0xa1, 0x93, 0xce, 0x85, 0x84, 0x69, 0x42, 0xae, 0xba, 0x07, 0x4a, 0x68, + 0x61, 0x0c, 0x7c, 0xad, 0xe3, 0xf0, 0x33, 0x50, 0x75, 0x03, 0x9b, 0x45, 0x84, 0x63, 0x49, 0x59, + 0x68, 0xd3, 0xd0, 0x8e, 0x38, 0xf3, 0x38, 0x11, 0xa2, 0x3a, 0xab, 0x34, 0xcb, 0x6e, 0xf0, 0x7d, + 0x06, 0x7f, 0x1b, 0x6e, 0x1a, 0xb0, 0xf3, 0xeb, 0xf1, 0xcb, 0x7a, 0xe1, 0xef, 0x97, 0xf5, 0xc2, + 0xef, 0xa3, 0xba, 0x75, 0x3c, 0xaa, 0x5b, 0xcf, 0x47, 0x75, 0xeb, 0x9f, 0x51, 0xdd, 0xfa, 0xe9, + 0x9b, 0xb7, 0xfd, 0xa3, 0xf7, 0x85, 0xfa, 0xfd, 0xb1, 0x30, 0x98, 0x51, 0x37, 0xfb, 0xa7, 0xaf, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xe8, 0x0f, 0x6d, 0x3b, 0x0a, 0x00, 0x00, +} + +func (m *Statistics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Statistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Container != nil { + nn1, err := m.Container.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.VM != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintStats(dAtA, i, uint64(m.VM.Size())) + n2, err := m.VM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Statistics_Windows) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Windows != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStats(dAtA, i, uint64(m.Windows.Size())) + n3, err := m.Windows.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} +func (m *Statistics_Linux) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Linux != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.Linux.Size())) + n4, err := m.Linux.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} +func (m *WindowsContainerStatistics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WindowsContainerStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintStats(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) + n5, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + dAtA[i] = 0x12 + i++ + i = encodeVarintStats(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ContainerStartTime))) + n6, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ContainerStartTime, dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + if m.UptimeNS != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.UptimeNS)) + } + if m.Processor != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.Processor.Size())) + n7, err := m.Processor.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.Memory != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintStats(dAtA, i, uint64(m.Memory.Size())) + n8, err := m.Memory.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if m.Storage != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.Storage.Size())) + n9, err := m.Storage.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *WindowsContainerProcessorStatistics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WindowsContainerProcessorStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TotalRuntimeNS != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.TotalRuntimeNS)) + } + if m.RuntimeUserNS != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.RuntimeUserNS)) + } + if m.RuntimeKernelNS != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.RuntimeKernelNS)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *WindowsContainerMemoryStatistics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WindowsContainerMemoryStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MemoryUsageCommitBytes != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.MemoryUsageCommitBytes)) + } + if m.MemoryUsageCommitPeakBytes != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.MemoryUsageCommitPeakBytes)) + } + if m.MemoryUsagePrivateWorkingSetBytes != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.MemoryUsagePrivateWorkingSetBytes)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *WindowsContainerStorageStatistics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WindowsContainerStorageStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ReadCountNormalized != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.ReadCountNormalized)) + } + if m.ReadSizeBytes != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.ReadSizeBytes)) + } + if m.WriteCountNormalized != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.WriteCountNormalized)) + } + if m.WriteSizeBytes != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.WriteSizeBytes)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *VirtualMachineStatistics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VirtualMachineStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Processor != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStats(dAtA, i, uint64(m.Processor.Size())) + n10, err := m.Processor.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.Memory != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.Memory.Size())) + n11, err := m.Memory.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *VirtualMachineProcessorStatistics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VirtualMachineProcessorStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TotalRuntimeNS != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.TotalRuntimeNS)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *VirtualMachineMemoryStatistics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VirtualMachineMemoryStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.WorkingSetBytes != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.WorkingSetBytes)) + } + if m.VirtualNodeCount != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.VirtualNodeCount)) + } + if m.VmMemory != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintStats(dAtA, i, uint64(m.VmMemory.Size())) + n12, err := m.VmMemory.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *VirtualMachineMemory) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VirtualMachineMemory) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.AvailableMemory != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.AvailableMemory)) + } + if m.AvailableMemoryBuffer != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.AvailableMemoryBuffer)) + } + if m.ReservedMemory != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.ReservedMemory)) + } + if m.AssignedMemory != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintStats(dAtA, i, uint64(m.AssignedMemory)) + } + if m.SlpActive { + dAtA[i] = 0x28 + i++ + if m.SlpActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.BalancingEnabled { + dAtA[i] = 0x30 + i++ + if m.BalancingEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.DmOperationInProgress { + dAtA[i] = 0x38 + i++ + if m.DmOperationInProgress { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintStats(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *Statistics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Container != nil { + n += m.Container.Size() + } + if m.VM != nil { + l = m.VM.Size() + n += 1 + l + sovStats(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Statistics_Windows) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Windows != nil { + l = m.Windows.Size() + n += 1 + l + sovStats(uint64(l)) + } + return n +} +func (m *Statistics_Linux) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Linux != nil { + l = m.Linux.Size() + n += 1 + l + sovStats(uint64(l)) + } + return n +} +func (m *WindowsContainerStatistics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovStats(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ContainerStartTime) + n += 1 + l + sovStats(uint64(l)) + if m.UptimeNS != 0 { + n += 1 + sovStats(uint64(m.UptimeNS)) + } + if m.Processor != nil { + l = m.Processor.Size() + n += 1 + l + sovStats(uint64(l)) + } + if m.Memory != nil { + l = m.Memory.Size() + n += 1 + l + sovStats(uint64(l)) + } + if m.Storage != nil { + l = m.Storage.Size() + n += 1 + l + sovStats(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *WindowsContainerProcessorStatistics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TotalRuntimeNS != 0 { + n += 1 + sovStats(uint64(m.TotalRuntimeNS)) + } + if m.RuntimeUserNS != 0 { + n += 1 + sovStats(uint64(m.RuntimeUserNS)) + } + if m.RuntimeKernelNS != 0 { + n += 1 + sovStats(uint64(m.RuntimeKernelNS)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *WindowsContainerMemoryStatistics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MemoryUsageCommitBytes != 0 { + n += 1 + sovStats(uint64(m.MemoryUsageCommitBytes)) + } + if m.MemoryUsageCommitPeakBytes != 0 { + n += 1 + sovStats(uint64(m.MemoryUsageCommitPeakBytes)) + } + if m.MemoryUsagePrivateWorkingSetBytes != 0 { + n += 1 + sovStats(uint64(m.MemoryUsagePrivateWorkingSetBytes)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *WindowsContainerStorageStatistics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ReadCountNormalized != 0 { + n += 1 + sovStats(uint64(m.ReadCountNormalized)) + } + if m.ReadSizeBytes != 0 { + n += 1 + sovStats(uint64(m.ReadSizeBytes)) + } + if m.WriteCountNormalized != 0 { + n += 1 + sovStats(uint64(m.WriteCountNormalized)) + } + if m.WriteSizeBytes != 0 { + n += 1 + sovStats(uint64(m.WriteSizeBytes)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *VirtualMachineStatistics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Processor != nil { + l = m.Processor.Size() + n += 1 + l + sovStats(uint64(l)) + } + if m.Memory != nil { + l = m.Memory.Size() + n += 1 + l + sovStats(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *VirtualMachineProcessorStatistics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TotalRuntimeNS != 0 { + n += 1 + sovStats(uint64(m.TotalRuntimeNS)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *VirtualMachineMemoryStatistics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.WorkingSetBytes != 0 { + n += 1 + sovStats(uint64(m.WorkingSetBytes)) + } + if m.VirtualNodeCount != 0 { + n += 1 + sovStats(uint64(m.VirtualNodeCount)) + } + if m.VmMemory != nil { + l = m.VmMemory.Size() + n += 1 + l + sovStats(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *VirtualMachineMemory) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AvailableMemory != 0 { + n += 1 + sovStats(uint64(m.AvailableMemory)) + } + if m.AvailableMemoryBuffer != 0 { + n += 1 + sovStats(uint64(m.AvailableMemoryBuffer)) + } + if m.ReservedMemory != 0 { + n += 1 + sovStats(uint64(m.ReservedMemory)) + } + if m.AssignedMemory != 0 { + n += 1 + sovStats(uint64(m.AssignedMemory)) + } + if m.SlpActive { + n += 2 + } + if m.BalancingEnabled { + n += 2 + } + if m.DmOperationInProgress { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovStats(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozStats(x uint64) (n int) { + return sovStats(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Statistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Statistics{`, + `Container:` + fmt.Sprintf("%v", this.Container) + `,`, + `VM:` + strings.Replace(fmt.Sprintf("%v", this.VM), "VirtualMachineStatistics", "VirtualMachineStatistics", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Statistics_Windows) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Statistics_Windows{`, + `Windows:` + strings.Replace(fmt.Sprintf("%v", this.Windows), "WindowsContainerStatistics", "WindowsContainerStatistics", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Statistics_Linux) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Statistics_Linux{`, + `Linux:` + strings.Replace(fmt.Sprintf("%v", this.Linux), "Metrics", "v1.Metrics", 1) + `,`, + `}`, + }, "") + return s +} +func (this *WindowsContainerStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WindowsContainerStatistics{`, + `Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `ContainerStartTime:` + strings.Replace(strings.Replace(this.ContainerStartTime.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `UptimeNS:` + fmt.Sprintf("%v", this.UptimeNS) + `,`, + `Processor:` + strings.Replace(fmt.Sprintf("%v", this.Processor), "WindowsContainerProcessorStatistics", "WindowsContainerProcessorStatistics", 1) + `,`, + `Memory:` + strings.Replace(fmt.Sprintf("%v", this.Memory), "WindowsContainerMemoryStatistics", "WindowsContainerMemoryStatistics", 1) + `,`, + `Storage:` + strings.Replace(fmt.Sprintf("%v", this.Storage), "WindowsContainerStorageStatistics", "WindowsContainerStorageStatistics", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *WindowsContainerProcessorStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WindowsContainerProcessorStatistics{`, + `TotalRuntimeNS:` + fmt.Sprintf("%v", this.TotalRuntimeNS) + `,`, + `RuntimeUserNS:` + fmt.Sprintf("%v", this.RuntimeUserNS) + `,`, + `RuntimeKernelNS:` + fmt.Sprintf("%v", this.RuntimeKernelNS) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *WindowsContainerMemoryStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WindowsContainerMemoryStatistics{`, + `MemoryUsageCommitBytes:` + fmt.Sprintf("%v", this.MemoryUsageCommitBytes) + `,`, + `MemoryUsageCommitPeakBytes:` + fmt.Sprintf("%v", this.MemoryUsageCommitPeakBytes) + `,`, + `MemoryUsagePrivateWorkingSetBytes:` + fmt.Sprintf("%v", this.MemoryUsagePrivateWorkingSetBytes) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *WindowsContainerStorageStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WindowsContainerStorageStatistics{`, + `ReadCountNormalized:` + fmt.Sprintf("%v", this.ReadCountNormalized) + `,`, + `ReadSizeBytes:` + fmt.Sprintf("%v", this.ReadSizeBytes) + `,`, + `WriteCountNormalized:` + fmt.Sprintf("%v", this.WriteCountNormalized) + `,`, + `WriteSizeBytes:` + fmt.Sprintf("%v", this.WriteSizeBytes) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *VirtualMachineStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VirtualMachineStatistics{`, + `Processor:` + strings.Replace(fmt.Sprintf("%v", this.Processor), "VirtualMachineProcessorStatistics", "VirtualMachineProcessorStatistics", 1) + `,`, + `Memory:` + strings.Replace(fmt.Sprintf("%v", this.Memory), "VirtualMachineMemoryStatistics", "VirtualMachineMemoryStatistics", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *VirtualMachineProcessorStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VirtualMachineProcessorStatistics{`, + `TotalRuntimeNS:` + fmt.Sprintf("%v", this.TotalRuntimeNS) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *VirtualMachineMemoryStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VirtualMachineMemoryStatistics{`, + `WorkingSetBytes:` + fmt.Sprintf("%v", this.WorkingSetBytes) + `,`, + `VirtualNodeCount:` + fmt.Sprintf("%v", this.VirtualNodeCount) + `,`, + `VmMemory:` + strings.Replace(fmt.Sprintf("%v", this.VmMemory), "VirtualMachineMemory", "VirtualMachineMemory", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *VirtualMachineMemory) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VirtualMachineMemory{`, + `AvailableMemory:` + fmt.Sprintf("%v", this.AvailableMemory) + `,`, + `AvailableMemoryBuffer:` + fmt.Sprintf("%v", this.AvailableMemoryBuffer) + `,`, + `ReservedMemory:` + fmt.Sprintf("%v", this.ReservedMemory) + `,`, + `AssignedMemory:` + fmt.Sprintf("%v", this.AssignedMemory) + `,`, + `SlpActive:` + fmt.Sprintf("%v", this.SlpActive) + `,`, + `BalancingEnabled:` + fmt.Sprintf("%v", this.BalancingEnabled) + `,`, + `DmOperationInProgress:` + fmt.Sprintf("%v", this.DmOperationInProgress) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringStats(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Statistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Statistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Statistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Windows", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &WindowsContainerStatistics{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Container = &Statistics_Windows{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &v1.Metrics{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Container = &Statistics_Linux{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VM == nil { + m.VM = &VirtualMachineStatistics{} + } + if err := m.VM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStats(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WindowsContainerStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WindowsContainerStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WindowsContainerStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerStartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ContainerStartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UptimeNS", wireType) + } + m.UptimeNS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UptimeNS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Processor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Processor == nil { + m.Processor = &WindowsContainerProcessorStatistics{} + } + if err := m.Processor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Memory == nil { + m.Memory = &WindowsContainerMemoryStatistics{} + } + if err := m.Memory.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Storage == nil { + m.Storage = &WindowsContainerStorageStatistics{} + } + if err := m.Storage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStats(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WindowsContainerProcessorStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WindowsContainerProcessorStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WindowsContainerProcessorStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalRuntimeNS", wireType) + } + m.TotalRuntimeNS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalRuntimeNS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeUserNS", wireType) + } + m.RuntimeUserNS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RuntimeUserNS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeKernelNS", wireType) + } + m.RuntimeKernelNS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RuntimeKernelNS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipStats(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WindowsContainerMemoryStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WindowsContainerMemoryStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WindowsContainerMemoryStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryUsageCommitBytes", wireType) + } + m.MemoryUsageCommitBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryUsageCommitBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryUsageCommitPeakBytes", wireType) + } + m.MemoryUsageCommitPeakBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryUsageCommitPeakBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryUsagePrivateWorkingSetBytes", wireType) + } + m.MemoryUsagePrivateWorkingSetBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryUsagePrivateWorkingSetBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipStats(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WindowsContainerStorageStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WindowsContainerStorageStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WindowsContainerStorageStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadCountNormalized", wireType) + } + m.ReadCountNormalized = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReadCountNormalized |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadSizeBytes", wireType) + } + m.ReadSizeBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReadSizeBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WriteCountNormalized", wireType) + } + m.WriteCountNormalized = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WriteCountNormalized |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WriteSizeBytes", wireType) + } + m.WriteSizeBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WriteSizeBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipStats(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VirtualMachineStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VirtualMachineStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VirtualMachineStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Processor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Processor == nil { + m.Processor = &VirtualMachineProcessorStatistics{} + } + if err := m.Processor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Memory == nil { + m.Memory = &VirtualMachineMemoryStatistics{} + } + if err := m.Memory.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStats(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VirtualMachineProcessorStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VirtualMachineProcessorStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VirtualMachineProcessorStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalRuntimeNS", wireType) + } + m.TotalRuntimeNS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalRuntimeNS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipStats(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VirtualMachineMemoryStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VirtualMachineMemoryStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VirtualMachineMemoryStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WorkingSetBytes", wireType) + } + m.WorkingSetBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WorkingSetBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VirtualNodeCount", wireType) + } + m.VirtualNodeCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VirtualNodeCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VmMemory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VmMemory == nil { + m.VmMemory = &VirtualMachineMemory{} + } + if err := m.VmMemory.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStats(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VirtualMachineMemory) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VirtualMachineMemory: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VirtualMachineMemory: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AvailableMemory", wireType) + } + m.AvailableMemory = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AvailableMemory |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AvailableMemoryBuffer", wireType) + } + m.AvailableMemoryBuffer = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AvailableMemoryBuffer |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReservedMemory", wireType) + } + m.ReservedMemory = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReservedMemory |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AssignedMemory", wireType) + } + m.AssignedMemory = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AssignedMemory |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SlpActive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SlpActive = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BalancingEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.BalancingEnabled = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DmOperationInProgress", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DmOperationInProgress = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipStats(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStats + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipStats(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStats + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStats + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStats + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthStats + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthStats + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStats + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipStats(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthStats + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthStats = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStats = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.proto b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.proto new file mode 100644 index 00000000000..ea0b6b6b384 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.proto @@ -0,0 +1,70 @@ +syntax = "proto3"; + +package containerd.runhcs.stats.v1; + +import weak "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "github.com/containerd/cgroups/stats/v1/metrics.proto"; + +option go_package = "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats;stats"; + +message Statistics { + oneof container { + WindowsContainerStatistics windows = 1; + io.containerd.cgroups.v1.Metrics linux = 2; + } + VirtualMachineStatistics vm = 3 [(gogoproto.customname) = "VM"]; +} + +message WindowsContainerStatistics { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Timestamp container_start_time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + uint64 uptime_ns = 3 [(gogoproto.customname) = "UptimeNS"]; + WindowsContainerProcessorStatistics processor = 4; + WindowsContainerMemoryStatistics memory = 5; + WindowsContainerStorageStatistics storage = 6; +} + +message WindowsContainerProcessorStatistics { + uint64 total_runtime_ns = 1 [(gogoproto.customname) = "TotalRuntimeNS"]; + uint64 runtime_user_ns = 2 [(gogoproto.customname) = "RuntimeUserNS"]; + uint64 runtime_kernel_ns = 3 [(gogoproto.customname) = "RuntimeKernelNS"]; +} + +message WindowsContainerMemoryStatistics { + uint64 memory_usage_commit_bytes = 1; + uint64 memory_usage_commit_peak_bytes = 2; + uint64 memory_usage_private_working_set_bytes = 3; +} + +message WindowsContainerStorageStatistics { + uint64 read_count_normalized = 1; + uint64 read_size_bytes = 2; + uint64 write_count_normalized = 3; + uint64 write_size_bytes = 4; +} + +message VirtualMachineStatistics { + VirtualMachineProcessorStatistics processor = 1; + VirtualMachineMemoryStatistics memory = 2; +} + +message VirtualMachineProcessorStatistics { + uint64 total_runtime_ns = 1 [(gogoproto.customname) = "TotalRuntimeNS"]; +} + +message VirtualMachineMemoryStatistics { + uint64 working_set_bytes = 1; + uint32 virtual_node_count = 2; + VirtualMachineMemory vm_memory = 3; +} + +message VirtualMachineMemory { + int32 available_memory = 1; + int32 available_memory_buffer = 2; + uint64 reserved_memory = 3; + uint64 assigned_memory = 4; + bool slp_active = 5; + bool balancing_enabled = 6; + bool dm_operation_in_progress = 7; +} \ No newline at end of file diff --git a/vendor/github.com/Microsoft/hcsshim/container.go b/vendor/github.com/Microsoft/hcsshim/container.go index 53c0a3854a4..7205a62c5ed 100644 --- a/vendor/github.com/Microsoft/hcsshim/container.go +++ b/vendor/github.com/Microsoft/hcsshim/container.go @@ -196,7 +196,7 @@ func (container *container) MappedVirtualDisks() (map[int]MappedVirtualDiskContr // CreateProcess launches a new process within the container. func (container *container) CreateProcess(c *ProcessConfig) (Process, error) { - p, err := container.system.CreateProcessNoStdio(c) + p, err := container.system.CreateProcess(context.Background(), c) if err != nil { return nil, convertSystemError(err, container) } diff --git a/vendor/github.com/Microsoft/hcsshim/go.mod b/vendor/github.com/Microsoft/hcsshim/go.mod index 42540f7e505..5255b93f14e 100644 --- a/vendor/github.com/Microsoft/hcsshim/go.mod +++ b/vendor/github.com/Microsoft/hcsshim/go.mod @@ -1,39 +1,35 @@ module github.com/Microsoft/hcsshim -go 1.12 +go 1.13 require ( github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 - github.com/blang/semver v3.1.0+incompatible // indirect + github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 - github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69 + github.com/containerd/containerd v1.3.2 github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc // indirect github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448 // indirect github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3 github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd - github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect - github.com/gogo/googleapis v1.2.0 // indirect - github.com/gogo/protobuf v1.2.1 - github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce // indirect - github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874 // indirect + github.com/gogo/protobuf v1.3.1 + github.com/golang/protobuf v1.3.2 // indirect + github.com/kr/pretty v0.1.0 // indirect github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2 // indirect - github.com/opencontainers/image-spec v1.0.1 // indirect github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f // indirect - github.com/opencontainers/runtime-spec v0.0.0-20190207185410-29686dbc5559 - github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39 + github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700 github.com/pkg/errors v0.8.1 - github.com/sirupsen/logrus v1.4.1 - github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8 // indirect + github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7 // indirect + github.com/sirupsen/logrus v1.4.2 + github.com/stretchr/testify v1.4.0 // indirect github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5 - github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f // indirect go.opencensus.io v0.22.0 - golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 + golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 // indirect + golang.org/x/sync v0.0.0-20190423024810-112230192c58 golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 - google.golang.org/grpc v1.20.1 + google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 // indirect + google.golang.org/grpc v1.23.1 + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + gopkg.in/yaml.v2 v2.2.8 // indirect gotest.tools v2.2.0+incompatible // indirect - k8s.io/kubernetes v1.13.0 ) diff --git a/vendor/github.com/Microsoft/hcsshim/go.sum b/vendor/github.com/Microsoft/hcsshim/go.sum index 2e5291fdad7..8ab4318ed53 100644 --- a/vendor/github.com/Microsoft/hcsshim/go.sum +++ b/vendor/github.com/Microsoft/hcsshim/go.sum @@ -1,47 +1,38 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/blang/semver v3.1.0+incompatible h1:7hqmJYuaEK3qwVjWubYiht3j93YI0WQBuysxHIfUriU= -github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 h1:uict5mhHFTzKLUCufdSLym7z/J0CbBJT59lYbP9wtbg= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/containerd v0.0.0-20190214164719-faec567304bb h1:TeJqRxMMwB7ex9yxtnc18AV+vVnjMePVQEhT6cQFhUU= -github.com/containerd/containerd v0.0.0-20190214164719-faec567304bb/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.2.8 h1:oM84oDW6+A0FQ4aWW5wnnexazvrQA5Hw6iXAi4rczWw= -github.com/containerd/containerd v1.3.0-beta.2.0.20190826204247-d618c80077fe h1:rqBP1w6ViOtCCAFKMerm0U9e/hEmTrJXStmQph9YbOQ= -github.com/containerd/containerd v1.3.0-beta.2.0.20190826204247-d618c80077fe/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69 h1:rG1clvJbgsUcmb50J82YUJhUMopWNtZvyMZjb+4fqGw= -github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.2 h1:ForxmXkA6tPIvffbrDAcPUIB32QgXkt2XFj+F0UxetA= +github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc h1:TP+534wVlf61smEIq1nwLLAjQVEK2EADoW3CX9AuT+8= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448 h1:PUD50EuOMkXVcpBIA/R95d56duJR9VxhwncsFbNnxW4= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3 h1:esQOJREg8nw8aXj6uCN5dfW5cKUBiEJ/+nni1Q/D/sw= github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/ttrpc v0.0.0-20180920185216-2a805f718635 h1:Hh9KYLzbpTyhtCnW4p0Iy+bJNO4fGKFZp1ylELZw6TI= -github.com/containerd/ttrpc v0.0.0-20180920185216-2a805f718635/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20190613183316-1fb3814edf44 h1:vG5QXCUakUhR2CRI44aD3joCWcvb5mfZRxcwVqBVGeU= -github.com/containerd/ttrpc v0.0.0-20190613183316-1fb3814edf44/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20190826154248-f969a7f076a2 h1:uR0Zz83OrfOhXWwDdwVYirFZI/LMdZXMzCHzfnQFO9w= -github.com/containerd/ttrpc v0.0.0-20190826154248-f969a7f076a2/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de h1:dlfGmNcE3jDAecLqwKPMNX6nk2qh1c1Vg1/YTzpOOF4= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd h1:JNn81o/xG+8NEo3bC/vx9pbi/g2WI8mtP2/nXzu297Y= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/gogo/googleapis v1.2.0 h1:Z0v3OJDotX9ZBpdz2V+AI7F4fITSZhVE5mg6GQppwMM= -github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -49,47 +40,47 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce h1:prjrVgOk2Yg6w+PflHoszQNLTUh4kaByUcEWM/9uin4= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874 h1:cAv7ZbSmyb1wjn6T4TIiyFCkpcfgpbcNNC3bM2srLaI= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2 h1:QhPf3A2AZW3tTGvHPg0TA+CR3oHbVLlXUhlghqISp1I= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f h1:a969LJ4IQFwRHYqonHtUDMSh9i54WcKggeEkQ3fZMl4= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runtime-spec v0.0.0-20190207185410-29686dbc5559 h1:pVIiB5BBYCSqbku9gTus5uZ+dmmZiWtmHAaI8Y1hpb4= -github.com/opencontainers/runtime-spec v0.0.0-20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39 h1:H7DMc6FAjgwZZi8BRqjrAAHWoqEr5e5L6pS4V0ezet4= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700 h1:eNUVfm/RFLIi1G7flU5/ZRTHvd4kcVuzfRnL6OFlzCI= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7 h1:hhvfGDVThBnd4kYisSFmYuHYeUhglxcwag7FhVPH9zM= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8 h1:zLV6q4e8Jv9EHjNg/iHfzwDkCve6Ua5jCygptrtXHvI= -github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5 h1:MCfT24H3f//U5+UCrZp1/riVO3B50BovxtDiNn0XKkk= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f h1:mvXjJIHRZyhNuGassLTcXTwjiWq7NmjdavZsUnmFybQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -104,17 +95,21 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJV golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09 h1:KaQtG+aDELoNmXYas3TVkGNYRuq8JQ1aa7LJt8EXVyo= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 h1:7TYNF4UdlohbFwpNH04CoPMp1cHUZgO1Ebq5r2hIjfo= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= @@ -123,20 +118,32 @@ golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb h1:i1Ppqkc3WQXikh8bXiwHqAN5Rv3/qDCcRk0/Otx73BY= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 h1:nfPFGzJkUDX6uBmpN/pSw7MbOAWegH5QDQuoXFHedLg= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go index da741449b87..810dd85ed1b 100644 --- a/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go +++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcn.go @@ -55,6 +55,15 @@ import ( //sys hcnDeleteLoadBalancer(id *_guid, result **uint16) (hr error) = computenetwork.HcnDeleteLoadBalancer? //sys hcnCloseLoadBalancer(loadBalancer hcnLoadBalancer) (hr error) = computenetwork.HcnCloseLoadBalancer? +// SDN Routes +//sys hcnEnumerateRoutes(query string, routes **uint16, result **uint16) (hr error) = computenetwork.HcnEnumerateSdnRoutes? +//sys hcnCreateRoute(id *_guid, settings string, route *hcnRoute, result **uint16) (hr error) = computenetwork.HcnCreateSdnRoute? +//sys hcnOpenRoute(id *_guid, route *hcnRoute, result **uint16) (hr error) = computenetwork.HcnOpenSdnRoute? +//sys hcnModifyRoute(route hcnRoute, settings string, result **uint16) (hr error) = computenetwork.HcnModifySdnRoute? +//sys hcnQueryRouteProperties(route hcnRoute, query string, properties **uint16, result **uint16) (hr error) = computenetwork.HcnQuerySdnRouteProperties? +//sys hcnDeleteRoute(id *_guid, result **uint16) (hr error) = computenetwork.HcnDeleteSdnRoute? +//sys hcnCloseRoute(route hcnRoute) (hr error) = computenetwork.HcnCloseSdnRoute? + // Service //sys hcnOpenService(service *hcnService, result **uint16) (hr error) = computenetwork.HcnOpenService? //sys hcnRegisterServiceCallback(service hcnService, callback int32, context int32, callbackHandle *hcnCallbackHandle) (hr error) = computenetwork.HcnRegisterServiceCallback? @@ -67,6 +76,7 @@ type hcnNetwork syscall.Handle type hcnEndpoint syscall.Handle type hcnNamespace syscall.Handle type hcnLoadBalancer syscall.Handle +type hcnRoute syscall.Handle type hcnService syscall.Handle type hcnCallbackHandle syscall.Handle @@ -161,6 +171,42 @@ func DSRSupported() error { return platformDoesNotSupportError("Direct Server Return (DSR)") } +// Slash32EndpointPrefixesSupported returns an error if the HCN version does not support configuring endpoints with /32 prefixes. +func Slash32EndpointPrefixesSupported() error { + supported := GetSupportedFeatures() + if supported.Slash32EndpointPrefixes { + return nil + } + return platformDoesNotSupportError("Slash 32 Endpoint prefixes") +} + +// AclSupportForProtocol252Supported returns an error if the HCN version does not support HNS ACL Policies to support protocol 252 for VXLAN. +func AclSupportForProtocol252Supported() error { + supported := GetSupportedFeatures() + if supported.AclSupportForProtocol252 { + return nil + } + return platformDoesNotSupportError("HNS ACL Policies to support protocol 252 for VXLAN") +} + +// SessionAffinitySupported returns an error if the HCN version does not support Session Affinity. +func SessionAffinitySupported() error { + supported := GetSupportedFeatures() + if supported.SessionAffinity { + return nil + } + return platformDoesNotSupportError("Session Affinity") +} + +// IPv6DualStackSupported returns an error if the HCN version does not support IPv6DualStack. +func IPv6DualStackSupported() error { + supported := GetSupportedFeatures() + if supported.IPv6DualStack { + return nil + } + return platformDoesNotSupportError("IPv6 DualStack") +} + // RequestType are the different operations performed to settings. // Used to update the settings of Endpoint/Namespace objects. type RequestType string diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go index dd029502eeb..ad30d320d97 100644 --- a/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go +++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnerrors.go @@ -17,6 +17,7 @@ var ( errInvalidEndpointID = errors.New("invalid endpoint ID") errInvalidNamespaceID = errors.New("invalid namespace ID") errInvalidLoadBalancerID = errors.New("invalid load balancer ID") + errInvalidRouteID = errors.New("invalid route ID") ) func checkForErrors(methodName string, hr error, resultBuffer *uint16) error { @@ -35,7 +36,7 @@ func checkForErrors(methodName string, hr error, resultBuffer *uint16) error { } if errorFound { - returnError := hcserror.New(hr, methodName, result) + returnError := new(hr, methodName, result) logrus.Debugf(returnError.Error()) // HCN errors logged for debugging. return returnError } @@ -43,6 +44,52 @@ func checkForErrors(methodName string, hr error, resultBuffer *uint16) error { return nil } +type ErrorCode uint32 + +// For common errors, define the error as it is in windows, so we can quickly determine it later +const ( + ERROR_NOT_FOUND = 0x490 + HCN_E_PORT_ALREADY_EXISTS ErrorCode = 0x803b0013 +) + +type HcnError struct { + *hcserror.HcsError + code ErrorCode +} + +func (e *HcnError) Error() string { + return e.HcsError.Error() +} + +func CheckErrorWithCode(err error, code ErrorCode) bool { + hcnError, ok := err.(*HcnError) + if ok { + return hcnError.code == code + } + return false +} + +func IsElementNotFoundError(err error) bool { + return CheckErrorWithCode(err, ERROR_NOT_FOUND) +} + +func IsPortAlreadyExistsError(err error) bool { + return CheckErrorWithCode(err, HCN_E_PORT_ALREADY_EXISTS) +} + +func new(hr error, title string, rest string) error { + err := &HcnError{} + hcsError := hcserror.New(hr, title, rest) + err.HcsError = hcsError.(*hcserror.HcsError) + err.code = ErrorCode(hcserror.Win32FromError(hr)) + return err +} + +// +// Note that the below errors are not errors returned by hcn itself +// we wish to seperate them as they are shim usage error +// + // NetworkNotFoundError results from a failed seach for a network by Id or Name type NetworkNotFoundError struct { NetworkName string @@ -50,10 +97,10 @@ type NetworkNotFoundError struct { } func (e NetworkNotFoundError) Error() string { - if e.NetworkName == "" { - return fmt.Sprintf("Network Name %s not found", e.NetworkName) + if e.NetworkName != "" { + return fmt.Sprintf("Network name %q not found", e.NetworkName) } - return fmt.Sprintf("Network Id %s not found", e.NetworkID) + return fmt.Sprintf("Network ID %q not found", e.NetworkID) } // EndpointNotFoundError results from a failed seach for an endpoint by Id or Name @@ -63,10 +110,10 @@ type EndpointNotFoundError struct { } func (e EndpointNotFoundError) Error() string { - if e.EndpointName == "" { - return fmt.Sprintf("Endpoint Name %s not found", e.EndpointName) + if e.EndpointName != "" { + return fmt.Sprintf("Endpoint name %q not found", e.EndpointName) } - return fmt.Sprintf("Endpoint Id %s not found", e.EndpointID) + return fmt.Sprintf("Endpoint ID %q not found", e.EndpointID) } // NamespaceNotFoundError results from a failed seach for a namsepace by Id @@ -75,7 +122,7 @@ type NamespaceNotFoundError struct { } func (e NamespaceNotFoundError) Error() string { - return fmt.Sprintf("Namespace %s not found", e.NamespaceID) + return fmt.Sprintf("Namespace ID %q not found", e.NamespaceID) } // LoadBalancerNotFoundError results from a failed seach for a loadbalancer by Id @@ -84,7 +131,16 @@ type LoadBalancerNotFoundError struct { } func (e LoadBalancerNotFoundError) Error() string { - return fmt.Sprintf("LoadBalancer %s not found", e.LoadBalancerId) + return fmt.Sprintf("LoadBalancer %q not found", e.LoadBalancerId) +} + +// RouteNotFoundError results from a failed seach for a route by Id +type RouteNotFoundError struct { + RouteId string +} + +func (e RouteNotFoundError) Error() string { + return fmt.Sprintf("SDN Route %q not found", e.RouteId) } // IsNotFoundError returns a boolean indicating whether the error was caused by @@ -99,6 +155,8 @@ func IsNotFoundError(err error) bool { return true case LoadBalancerNotFoundError: return true + case RouteNotFoundError: + return true case *hcserror.HcsError: return pe.Err == hcs.ErrElementNotFound } diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go index 5ac0ed5659d..1438497d8eb 100644 --- a/vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go +++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnglobals.go @@ -3,6 +3,7 @@ package hcn import ( "encoding/json" "fmt" + "math" "github.com/Microsoft/hcsshim/internal/hcserror" "github.com/Microsoft/hcsshim/internal/interop" @@ -20,17 +21,41 @@ type Version struct { Minor int `json:"Minor"` } +type VersionRange struct { + MinVersion Version + MaxVersion Version +} + +type VersionRanges []VersionRange + var ( // HNSVersion1803 added ACL functionality. - HNSVersion1803 = Version{Major: 7, Minor: 2} + HNSVersion1803 = VersionRanges{VersionRange{MinVersion: Version{Major: 7, Minor: 2}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}} // V2ApiSupport allows the use of V2 Api calls and V2 Schema. - V2ApiSupport = Version{Major: 9, Minor: 2} + V2ApiSupport = VersionRanges{VersionRange{MinVersion: Version{Major: 9, Minor: 2}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}} // Remote Subnet allows for Remote Subnet policies on Overlay networks - RemoteSubnetVersion = Version{Major: 9, Minor: 2} + RemoteSubnetVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 9, Minor: 2}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}} // A Host Route policy allows for local container to local host communication Overlay networks - HostRouteVersion = Version{Major: 9, Minor: 2} + HostRouteVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 9, Minor: 2}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}} // HNS 10.2 allows for Direct Server Return for loadbalancing - DSRVersion = Version{Major: 10, Minor: 2} + DSRVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 10, Minor: 2}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}} + // HNS 9.3 through 10.0 (not included) and, 10.4+ provide support for configuring endpoints with /32 prefixes + Slash32EndpointPrefixesVersion = VersionRanges{ + VersionRange{MinVersion: Version{Major: 9, Minor: 3}, MaxVersion: Version{Major: 9, Minor: math.MaxInt32}}, + VersionRange{MinVersion: Version{Major: 10, Minor: 4}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}, + } + // HNS 9.3 through 10.0 (not included) and, 10.4+ allow for HNS ACL Policies to support protocol 252 for VXLAN + AclSupportForProtocol252Version = VersionRanges{ + VersionRange{MinVersion: Version{Major: 9, Minor: 3}, MaxVersion: Version{Major: 9, Minor: math.MaxInt32}}, + VersionRange{MinVersion: Version{Major: 10, Minor: 4}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}, + } + // HNS 12.0 allows for session affinity for loadbalancing + SessionAffinityVersion = VersionRanges{VersionRange{MinVersion: Version{Major: 12, Minor: 0}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}} + // HNS 10.5 through 11 (not included) and 12.0+ supports Ipv6 dual stack. + IPv6DualStackVersion = VersionRanges{ + VersionRange{MinVersion: Version{Major: 10, Minor: 5}, MaxVersion: Version{Major: 10, Minor: math.MaxInt32}}, + VersionRange{MinVersion: Version{Major: 12, Minor: 0}, MaxVersion: Version{Major: math.MaxInt32, Minor: math.MaxInt32}}, + } ) // GetGlobals returns the global properties of the HCN Service. diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnloadbalancer.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnloadbalancer.go index 898e02a8010..9ed59a669a8 100644 --- a/vendor/github.com/Microsoft/hcsshim/hcn/hcnloadbalancer.go +++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnloadbalancer.go @@ -10,10 +10,11 @@ import ( // LoadBalancerPortMapping is associated with HostComputeLoadBalancer type LoadBalancerPortMapping struct { - Protocol uint32 `json:",omitempty"` // EX: TCP = 6, UDP = 17 - InternalPort uint16 `json:",omitempty"` - ExternalPort uint16 `json:",omitempty"` - Flags LoadBalancerPortMappingFlags `json:",omitempty"` + Protocol uint32 `json:",omitempty"` // EX: TCP = 6, UDP = 17 + InternalPort uint16 `json:",omitempty"` + ExternalPort uint16 `json:",omitempty"` + DistributionType LoadBalancerDistribution `json:",omitempty"` // EX: Distribute per connection = 0, distribute traffic of the same protocol per client IP = 1, distribute per client IP = 2 + Flags LoadBalancerPortMappingFlags `json:",omitempty"` } // HostComputeLoadBalancer represents software load balancer. @@ -53,6 +54,18 @@ var ( LoadBalancerPortMappingFlagsPreserveDIP LoadBalancerPortMappingFlags = 8 ) +// LoadBalancerDistribution specifies how the loadbalancer distributes traffic. +type LoadBalancerDistribution uint32 + +var ( + // LoadBalancerDistributionNone is the default and loadbalances each connection to the same pod. + LoadBalancerDistributionNone LoadBalancerDistribution + // LoadBalancerDistributionSourceIPProtocol loadbalances all traffic of the same protocol from a client IP to the same pod. + LoadBalancerDistributionSourceIPProtocol LoadBalancerDistribution = 1 + // LoadBalancerDistributionSourceIP loadbalances all traffic from a client IP to the same pod. + LoadBalancerDistributionSourceIP LoadBalancerDistribution = 2 +) + func getLoadBalancer(loadBalancerGuid guid.GUID, query string) (*HostComputeLoadBalancer, error) { // Open loadBalancer. var ( diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go index f99ff8754c1..22c7cf95f66 100644 --- a/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go +++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnnamespace.go @@ -247,11 +247,23 @@ func ListNamespacesQuery(query HostComputeQuery) ([]HostComputeNamespace, error) // GetNamespaceByID returns the Namespace specified by Id. func GetNamespaceByID(namespaceId string) (*HostComputeNamespace, error) { - g, err := guid.FromString(namespaceId) + hcnQuery := defaultQuery() + mapA := map[string]string{"ID": namespaceId} + filter, err := json.Marshal(mapA) if err != nil { - return nil, errInvalidNamespaceID + return nil, err } - return getNamespace(g, defaultQueryJson()) + hcnQuery.Filter = string(filter) + + namespaces, err := ListNamespacesQuery(hcnQuery) + if err != nil { + return nil, err + } + if len(namespaces) == 0 { + return nil, NamespaceNotFoundError{NamespaceID: namespaceId} + } + + return &namespaces[0], err } // GetNamespaceEndpointIds returns the endpoints of the Namespace specified by Id. diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnpolicy.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnpolicy.go index d05398f2542..d0fb6e49e1d 100644 --- a/vendor/github.com/Microsoft/hcsshim/hcn/hcnpolicy.go +++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnpolicy.go @@ -16,6 +16,7 @@ const ( OutBoundNAT EndpointPolicyType = "OutBoundNAT" SDNRoute EndpointPolicyType = "SDNRoute" L4Proxy EndpointPolicyType = "L4Proxy" + L4WFPPROXY EndpointPolicyType = "L4WFPPROXY" PortName EndpointPolicyType = "PortName" EncapOverhead EndpointPolicyType = "EncapOverhead" // Endpoint and Network have InterfaceConstraint and ProviderAddress @@ -126,8 +127,9 @@ type QosPolicySetting struct { // OutboundNatPolicySetting sets outbound Network Address Translation on an Endpoint. type OutboundNatPolicySetting struct { - VirtualIP string `json:",omitempty"` - Exceptions []string `json:",omitempty"` + VirtualIP string `json:",omitempty"` + Exceptions []string `json:",omitempty"` + Destinations []string `json:",omitempty"` } // SDNRoutePolicySetting sets SDN Route on an Endpoint. @@ -137,16 +139,6 @@ type SDNRoutePolicySetting struct { NeedEncap bool `json:",omitempty"` } -// A ProxyType is a type of proxy used by the L4 proxy policy. -type ProxyType int - -const ( - // ProxyTypeVFP specifies a Virtual Filtering Protocol proxy. - ProxyTypeVFP ProxyType = iota - // ProxyTypeWFP specifies a Windows Filtering Platform proxy. - ProxyTypeWFP -) - // FiveTuple is nested in L4ProxyPolicySetting for WFP support. type FiveTuple struct { Protocols string `json:",omitempty"` @@ -157,20 +149,11 @@ type FiveTuple struct { Priority uint16 `json:",omitempty"` } -// L4ProxyPolicySetting sets Layer-4 Proxy on an endpoint. -type L4ProxyPolicySetting struct { - IP string `json:",omitempty"` - Port string `json:",omitempty"` - Protocol uint32 `json:",omitempty"` // EX: TCP = 6, UDP = 17 - ExceptionList []string `json:",omitempty"` - Destination string `json:","` - OutboundNat bool `json:",omitempty"` - - // For the WFP proxy - FilterTuple FiveTuple `json:",omitempty"` - ProxyType ProxyType `json:",omitempty"` - UserSID string `json:",omitempty"` - CompartmentID uint32 `json:",omitempty"` +// L4WfpProxyPolicySetting sets Layer-4 Proxy on an endpoint. +type L4WfpProxyPolicySetting struct { + Port string `json:",omitempty"` + FilterTuple FiveTuple `json:",omitempty"` + UserSID string `json:",omitempty"` } // PortnameEndpointPolicySetting sets the port name for an endpoint. diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnroute.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnroute.go new file mode 100644 index 00000000000..d6d27079bca --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnroute.go @@ -0,0 +1,266 @@ +package hcn + +import ( + "encoding/json" + "errors" + + "github.com/Microsoft/go-winio/pkg/guid" + "github.com/Microsoft/hcsshim/internal/interop" + "github.com/sirupsen/logrus" +) + +// HostComputeRoute represents SDN routes. +type HostComputeRoute struct { + ID string `json:"ID,omitempty"` + HostComputeEndpoints []string `json:",omitempty"` + Setting []SDNRoutePolicySetting `json:",omitempty"` + SchemaVersion SchemaVersion `json:",omitempty"` +} + +// ListRoutes makes a call to list all available routes. +func ListRoutes() ([]HostComputeRoute, error) { + hcnQuery := defaultQuery() + routes, err := ListRoutesQuery(hcnQuery) + if err != nil { + return nil, err + } + return routes, nil +} + +// ListRoutesQuery makes a call to query the list of available routes. +func ListRoutesQuery(query HostComputeQuery) ([]HostComputeRoute, error) { + queryJSON, err := json.Marshal(query) + if err != nil { + return nil, err + } + + routes, err := enumerateRoutes(string(queryJSON)) + if err != nil { + return nil, err + } + return routes, nil +} + +// GetRouteByID returns the route specified by Id. +func GetRouteByID(routeID string) (*HostComputeRoute, error) { + hcnQuery := defaultQuery() + mapA := map[string]string{"ID": routeID} + filter, err := json.Marshal(mapA) + if err != nil { + return nil, err + } + hcnQuery.Filter = string(filter) + + routes, err := ListRoutesQuery(hcnQuery) + if err != nil { + return nil, err + } + if len(routes) == 0 { + return nil, RouteNotFoundError{RouteId: routeID} + } + return &routes[0], err +} + +// Create Route. +func (route *HostComputeRoute) Create() (*HostComputeRoute, error) { + logrus.Debugf("hcn::HostComputeRoute::Create id=%s", route.ID) + + jsonString, err := json.Marshal(route) + if err != nil { + return nil, err + } + + logrus.Debugf("hcn::HostComputeRoute::Create JSON: %s", jsonString) + route, hcnErr := createRoute(string(jsonString)) + if hcnErr != nil { + return nil, hcnErr + } + return route, nil +} + +// Delete Route. +func (route *HostComputeRoute) Delete() error { + logrus.Debugf("hcn::HostComputeRoute::Delete id=%s", route.ID) + + existingRoute, _ := GetRouteByID(route.ID) + + if existingRoute != nil { + if err := deleteRoute(route.ID); err != nil { + return err + } + } + + return nil +} + +// AddEndpoint add an endpoint to a route +// Since HCNRoute doesn't implement modify functionality, add operation is essentially delete and add +func (route *HostComputeRoute) AddEndpoint(endpoint *HostComputeEndpoint) (*HostComputeRoute, error) { + logrus.Debugf("hcn::HostComputeRoute::AddEndpoint route=%s endpoint=%s", route.ID, endpoint.Id) + + err := route.Delete() + if err != nil { + return nil, err + } + + // Add Endpoint to the Existing List + route.HostComputeEndpoints = append(route.HostComputeEndpoints, endpoint.Id) + + return route.Create() +} + +// RemoveEndpoint removes an endpoint from a route +// Since HCNRoute doesn't implement modify functionality, remove operation is essentially delete and add +func (route *HostComputeRoute) RemoveEndpoint(endpoint *HostComputeEndpoint) (*HostComputeRoute, error) { + logrus.Debugf("hcn::HostComputeRoute::RemoveEndpoint route=%s endpoint=%s", route.ID, endpoint.Id) + + err := route.Delete() + if err != nil { + return nil, err + } + + // Create a list of all the endpoints besides the one being removed + i := 0 + for index, endpointReference := range route.HostComputeEndpoints { + if endpointReference == endpoint.Id { + i = index + break + } + } + + route.HostComputeEndpoints = append(route.HostComputeEndpoints[0:i], route.HostComputeEndpoints[i+1:]...) + return route.Create() +} + +// AddRoute for the specified endpoints and SDN Route setting +func AddRoute(endpoints []HostComputeEndpoint, destinationPrefix string, nextHop string, needEncapsulation bool) (*HostComputeRoute, error) { + logrus.Debugf("hcn::HostComputeRoute::AddRoute endpointId=%v, destinationPrefix=%v, nextHop=%v, needEncapsulation=%v", endpoints, destinationPrefix, nextHop, needEncapsulation) + + if len(endpoints) <= 0 { + return nil, errors.New("Missing endpoints") + } + + route := &HostComputeRoute{ + SchemaVersion: V2SchemaVersion(), + Setting: []SDNRoutePolicySetting{ + { + DestinationPrefix: destinationPrefix, + NextHop: nextHop, + NeedEncap: needEncapsulation, + }, + }, + } + + for _, endpoint := range endpoints { + route.HostComputeEndpoints = append(route.HostComputeEndpoints, endpoint.Id) + } + + return route.Create() +} + +func enumerateRoutes(query string) ([]HostComputeRoute, error) { + // Enumerate all routes Guids + var ( + resultBuffer *uint16 + routeBuffer *uint16 + ) + hr := hcnEnumerateRoutes(query, &routeBuffer, &resultBuffer) + if err := checkForErrors("hcnEnumerateRoutes", hr, resultBuffer); err != nil { + return nil, err + } + + routes := interop.ConvertAndFreeCoTaskMemString(routeBuffer) + var routeIds []guid.GUID + if err := json.Unmarshal([]byte(routes), &routeIds); err != nil { + return nil, err + } + + var outputRoutes []HostComputeRoute + for _, routeGUID := range routeIds { + route, err := getRoute(routeGUID, query) + if err != nil { + return nil, err + } + outputRoutes = append(outputRoutes, *route) + } + return outputRoutes, nil +} + +func getRoute(routeGUID guid.GUID, query string) (*HostComputeRoute, error) { + // Open routes. + var ( + routeHandle hcnRoute + resultBuffer *uint16 + propertiesBuffer *uint16 + ) + hr := hcnOpenRoute(&routeGUID, &routeHandle, &resultBuffer) + if err := checkForErrors("hcnOpenRoute", hr, resultBuffer); err != nil { + return nil, err + } + // Query routes. + hr = hcnQueryRouteProperties(routeHandle, query, &propertiesBuffer, &resultBuffer) + if err := checkForErrors("hcnQueryRouteProperties", hr, resultBuffer); err != nil { + return nil, err + } + properties := interop.ConvertAndFreeCoTaskMemString(propertiesBuffer) + // Close routes. + hr = hcnCloseRoute(routeHandle) + if err := checkForErrors("hcnCloseRoute", hr, nil); err != nil { + return nil, err + } + // Convert output to HostComputeRoute + var outputRoute HostComputeRoute + if err := json.Unmarshal([]byte(properties), &outputRoute); err != nil { + return nil, err + } + return &outputRoute, nil +} + +func createRoute(settings string) (*HostComputeRoute, error) { + // Create new route. + var ( + routeHandle hcnRoute + resultBuffer *uint16 + propertiesBuffer *uint16 + ) + routeGUID := guid.GUID{} + hr := hcnCreateRoute(&routeGUID, settings, &routeHandle, &resultBuffer) + if err := checkForErrors("hcnCreateRoute", hr, resultBuffer); err != nil { + return nil, err + } + // Query route. + hcnQuery := defaultQuery() + query, err := json.Marshal(hcnQuery) + if err != nil { + return nil, err + } + hr = hcnQueryRouteProperties(routeHandle, string(query), &propertiesBuffer, &resultBuffer) + if err := checkForErrors("hcnQueryRouteProperties", hr, resultBuffer); err != nil { + return nil, err + } + properties := interop.ConvertAndFreeCoTaskMemString(propertiesBuffer) + // Close Route. + hr = hcnCloseRoute(routeHandle) + if err := checkForErrors("hcnCloseRoute", hr, nil); err != nil { + return nil, err + } + // Convert output to HostComputeRoute + var outputRoute HostComputeRoute + if err := json.Unmarshal([]byte(properties), &outputRoute); err != nil { + return nil, err + } + return &outputRoute, nil +} + +func deleteRoute(routeID string) error { + routeGUID, err := guid.FromString(routeID) + if err != nil { + return errInvalidRouteID + } + var resultBuffer *uint16 + hr := hcnDeleteRoute(&routeGUID, &resultBuffer) + if err := checkForErrors("hcnDeleteRoute", hr, resultBuffer); err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go b/vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go index 9b5df20301d..401bda40dd9 100644 --- a/vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go +++ b/vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport.go @@ -6,11 +6,15 @@ import ( // SupportedFeatures are the features provided by the Service. type SupportedFeatures struct { - Acl AclFeatures `json:"ACL"` - Api ApiSupport `json:"API"` - RemoteSubnet bool `json:"RemoteSubnet"` - HostRoute bool `json:"HostRoute"` - DSR bool `json:"DSR"` + Acl AclFeatures `json:"ACL"` + Api ApiSupport `json:"API"` + RemoteSubnet bool `json:"RemoteSubnet"` + HostRoute bool `json:"HostRoute"` + DSR bool `json:"DSR"` + Slash32EndpointPrefixes bool `json:"Slash32EndpointPrefixes"` + AclSupportForProtocol252 bool `json:"AclSupportForProtocol252"` + SessionAffinity bool `json:"SessionAffinity"` + IPv6DualStack bool `json:"IPv6DualStack"` } // AclFeatures are the supported ACL possibilities. @@ -53,18 +57,39 @@ func GetSupportedFeatures() SupportedFeatures { features.RemoteSubnet = isFeatureSupported(globals.Version, RemoteSubnetVersion) features.HostRoute = isFeatureSupported(globals.Version, HostRouteVersion) features.DSR = isFeatureSupported(globals.Version, DSRVersion) + features.Slash32EndpointPrefixes = isFeatureSupported(globals.Version, Slash32EndpointPrefixesVersion) + features.AclSupportForProtocol252 = isFeatureSupported(globals.Version, AclSupportForProtocol252Version) + features.SessionAffinity = isFeatureSupported(globals.Version, SessionAffinityVersion) + features.IPv6DualStack = isFeatureSupported(globals.Version, IPv6DualStackVersion) return features } -func isFeatureSupported(currentVersion Version, minVersionSupported Version) bool { - if currentVersion.Major < minVersionSupported.Major { +func isFeatureSupported(currentVersion Version, versionsSupported VersionRanges) bool { + isFeatureSupported := false + + for _, versionRange := range versionsSupported { + isFeatureSupported = isFeatureSupported || isFeatureInRange(currentVersion, versionRange) + } + + return isFeatureSupported +} + +func isFeatureInRange(currentVersion Version, versionRange VersionRange) bool { + if currentVersion.Major < versionRange.MinVersion.Major { + logrus.Infof("currentVersion.Major < versionRange.MinVersion.Major: %v, %v", currentVersion.Major, versionRange.MinVersion.Major) return false } - if currentVersion.Major > minVersionSupported.Major { - return true + if currentVersion.Major > versionRange.MaxVersion.Major { + logrus.Infof("currentVersion.Major > versionRange.MaxVersion.Major: %v, %v", currentVersion.Major, versionRange.MaxVersion.Major) + return false } - if currentVersion.Minor < minVersionSupported.Minor { + if currentVersion.Major == versionRange.MinVersion.Major && currentVersion.Minor < versionRange.MinVersion.Minor { + logrus.Infof("currentVersion.Minor < versionRange.MinVersion.Major: %v, %v", currentVersion.Minor, versionRange.MinVersion.Minor) + return false + } + if currentVersion.Major == versionRange.MaxVersion.Major && currentVersion.Minor > versionRange.MaxVersion.Minor { + logrus.Infof("currentVersion.Minor > versionRange.MaxVersion.Major: %v, %v", currentVersion.Minor, versionRange.MaxVersion.Minor) return false } return true diff --git a/vendor/github.com/Microsoft/hcsshim/hcn/zsyscall_windows.go b/vendor/github.com/Microsoft/hcsshim/hcn/zsyscall_windows.go index 856b2c1408c..466d304572e 100644 --- a/vendor/github.com/Microsoft/hcsshim/hcn/zsyscall_windows.go +++ b/vendor/github.com/Microsoft/hcsshim/hcn/zsyscall_windows.go @@ -71,6 +71,13 @@ var ( procHcnQueryLoadBalancerProperties = modcomputenetwork.NewProc("HcnQueryLoadBalancerProperties") procHcnDeleteLoadBalancer = modcomputenetwork.NewProc("HcnDeleteLoadBalancer") procHcnCloseLoadBalancer = modcomputenetwork.NewProc("HcnCloseLoadBalancer") + procHcnEnumerateSdnRoutes = modcomputenetwork.NewProc("HcnEnumerateSdnRoutes") + procHcnCreateSdnRoute = modcomputenetwork.NewProc("HcnCreateSdnRoute") + procHcnOpenSdnRoute = modcomputenetwork.NewProc("HcnOpenSdnRoute") + procHcnModifySdnRoute = modcomputenetwork.NewProc("HcnModifySdnRoute") + procHcnQuerySdnRouteProperties = modcomputenetwork.NewProc("HcnQuerySdnRouteProperties") + procHcnDeleteSdnRoute = modcomputenetwork.NewProc("HcnDeleteSdnRoute") + procHcnCloseSdnRoute = modcomputenetwork.NewProc("HcnCloseSdnRoute") procHcnOpenService = modcomputenetwork.NewProc("HcnOpenService") procHcnRegisterServiceCallback = modcomputenetwork.NewProc("HcnRegisterServiceCallback") procHcnUnregisterServiceCallback = modcomputenetwork.NewProc("HcnUnregisterServiceCallback") @@ -657,6 +664,140 @@ func hcnCloseLoadBalancer(loadBalancer hcnLoadBalancer) (hr error) { return } +func hcnEnumerateRoutes(query string, routes **uint16, result **uint16) (hr error) { + var _p0 *uint16 + _p0, hr = syscall.UTF16PtrFromString(query) + if hr != nil { + return + } + return _hcnEnumerateRoutes(_p0, routes, result) +} + +func _hcnEnumerateRoutes(query *uint16, routes **uint16, result **uint16) (hr error) { + if hr = procHcnEnumerateSdnRoutes.Find(); hr != nil { + return + } + r0, _, _ := syscall.Syscall(procHcnEnumerateSdnRoutes.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(routes)), uintptr(unsafe.Pointer(result))) + if int32(r0) < 0 { + if r0&0x1fff0000 == 0x00070000 { + r0 &= 0xffff + } + hr = syscall.Errno(r0) + } + return +} + +func hcnCreateRoute(id *_guid, settings string, route *hcnRoute, result **uint16) (hr error) { + var _p0 *uint16 + _p0, hr = syscall.UTF16PtrFromString(settings) + if hr != nil { + return + } + return _hcnCreateRoute(id, _p0, route, result) +} + +func _hcnCreateRoute(id *_guid, settings *uint16, route *hcnRoute, result **uint16) (hr error) { + if hr = procHcnCreateSdnRoute.Find(); hr != nil { + return + } + r0, _, _ := syscall.Syscall6(procHcnCreateSdnRoute.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(route)), uintptr(unsafe.Pointer(result)), 0, 0) + if int32(r0) < 0 { + if r0&0x1fff0000 == 0x00070000 { + r0 &= 0xffff + } + hr = syscall.Errno(r0) + } + return +} + +func hcnOpenRoute(id *_guid, route *hcnRoute, result **uint16) (hr error) { + if hr = procHcnOpenSdnRoute.Find(); hr != nil { + return + } + r0, _, _ := syscall.Syscall(procHcnOpenSdnRoute.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(route)), uintptr(unsafe.Pointer(result))) + if int32(r0) < 0 { + if r0&0x1fff0000 == 0x00070000 { + r0 &= 0xffff + } + hr = syscall.Errno(r0) + } + return +} + +func hcnModifyRoute(route hcnRoute, settings string, result **uint16) (hr error) { + var _p0 *uint16 + _p0, hr = syscall.UTF16PtrFromString(settings) + if hr != nil { + return + } + return _hcnModifyRoute(route, _p0, result) +} + +func _hcnModifyRoute(route hcnRoute, settings *uint16, result **uint16) (hr error) { + if hr = procHcnModifySdnRoute.Find(); hr != nil { + return + } + r0, _, _ := syscall.Syscall(procHcnModifySdnRoute.Addr(), 3, uintptr(route), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result))) + if int32(r0) < 0 { + if r0&0x1fff0000 == 0x00070000 { + r0 &= 0xffff + } + hr = syscall.Errno(r0) + } + return +} + +func hcnQueryRouteProperties(route hcnRoute, query string, properties **uint16, result **uint16) (hr error) { + var _p0 *uint16 + _p0, hr = syscall.UTF16PtrFromString(query) + if hr != nil { + return + } + return _hcnQueryRouteProperties(route, _p0, properties, result) +} + +func _hcnQueryRouteProperties(route hcnRoute, query *uint16, properties **uint16, result **uint16) (hr error) { + if hr = procHcnQuerySdnRouteProperties.Find(); hr != nil { + return + } + r0, _, _ := syscall.Syscall6(procHcnQuerySdnRouteProperties.Addr(), 4, uintptr(route), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0) + if int32(r0) < 0 { + if r0&0x1fff0000 == 0x00070000 { + r0 &= 0xffff + } + hr = syscall.Errno(r0) + } + return +} + +func hcnDeleteRoute(id *_guid, result **uint16) (hr error) { + if hr = procHcnDeleteSdnRoute.Find(); hr != nil { + return + } + r0, _, _ := syscall.Syscall(procHcnDeleteSdnRoute.Addr(), 2, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)), 0) + if int32(r0) < 0 { + if r0&0x1fff0000 == 0x00070000 { + r0 &= 0xffff + } + hr = syscall.Errno(r0) + } + return +} + +func hcnCloseRoute(route hcnRoute) (hr error) { + if hr = procHcnCloseSdnRoute.Find(); hr != nil { + return + } + r0, _, _ := syscall.Syscall(procHcnCloseSdnRoute.Addr(), 1, uintptr(route), 0, 0) + if int32(r0) < 0 { + if r0&0x1fff0000 == 0x00070000 { + r0 &= 0xffff + } + hr = syscall.Errno(r0) + } + return +} + func hcnOpenService(service *hcnService, result **uint16) (hr error) { if hr = procHcnOpenService.Find(); hr != nil { return diff --git a/vendor/github.com/Microsoft/hcsshim/hnspolicy.go b/vendor/github.com/Microsoft/hcsshim/hnspolicy.go index a3e03ff8fcf..00ab2636449 100644 --- a/vendor/github.com/Microsoft/hcsshim/hnspolicy.go +++ b/vendor/github.com/Microsoft/hcsshim/hnspolicy.go @@ -21,8 +21,11 @@ const ( OutboundNat = hns.OutboundNat ExternalLoadBalancer = hns.ExternalLoadBalancer Route = hns.Route + Proxy = hns.Proxy ) +type ProxyPolicy = hns.ProxyPolicy + type NatPolicy = hns.NatPolicy type QosPolicy = hns.QosPolicy diff --git a/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go b/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go index c0158269f08..8193315f062 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/cow/cow.go @@ -5,6 +5,7 @@ import ( "io" "github.com/Microsoft/hcsshim/internal/schema1" + hcsschema "github.com/Microsoft/hcsshim/internal/schema2" ) // Process is the interface for an OS process running in a container or utility VM. @@ -63,8 +64,10 @@ type Container interface { Close() error // ID returns the container ID. ID() string - // Properties returns the requested container properties. + // Properties returns the requested container properties targeting a V1 schema container. Properties(ctx context.Context, types ...schema1.PropertyType) (*schema1.ContainerProperties, error) + // PropertiesV2 returns the requested container properties targeting a V2 schema container. + PropertiesV2(ctx context.Context, types ...hcsschema.PropertyType) (*hcsschema.Properties, error) // Start starts a container. Start(ctx context.Context) error // Shutdown sends a shutdown request to the container (but does not wait for diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/cgo.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/cgo.go deleted file mode 100644 index 3669c34aa2c..00000000000 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/cgo.go +++ /dev/null @@ -1,7 +0,0 @@ -package hcs - -import "C" - -// This import is needed to make the library compile as CGO because HCSSHIM -// only works with CGO due to callbacks from HCS comming back from a C thread -// which is not supported without CGO. See https://github.com/golang/go/issues/10973 diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go index d366f629f6e..2ad978f2908 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/process.go @@ -20,6 +20,8 @@ type Process struct { handle vmcompute.HcsProcess processID int system *System + hasCachedStdio bool + stdioLock sync.Mutex stdin io.WriteCloser stdout io.ReadCloser stderr io.ReadCloser @@ -272,8 +274,8 @@ func (process *Process) ExitCode() (int, error) { } // StdioLegacy returns the stdin, stdout, and stderr pipes, respectively. Closing -// these pipes does not close the underlying pipes; but this function can only -// be called once on each Process. +// these pipes does not close the underlying pipes. Once returned, these pipes +// are the responsibility of the caller to close. func (process *Process) StdioLegacy() (_ io.WriteCloser, _ io.ReadCloser, _ io.ReadCloser, err error) { operation := "hcsshim::Process::StdioLegacy" ctx, span := trace.StartSpan(context.Background(), operation) @@ -290,6 +292,15 @@ func (process *Process) StdioLegacy() (_ io.WriteCloser, _ io.ReadCloser, _ io.R return nil, nil, nil, makeProcessError(process, operation, ErrAlreadyClosed, nil) } + process.stdioLock.Lock() + defer process.stdioLock.Unlock() + if process.hasCachedStdio { + stdin, stdout, stderr := process.stdin, process.stdout, process.stderr + process.stdin, process.stdout, process.stderr = nil, nil, nil + process.hasCachedStdio = false + return stdin, stdout, stderr, nil + } + processInfo, resultJSON, err := vmcompute.HcsGetProcessInfo(ctx, process.handle) events := processHcsResult(ctx, resultJSON) if err != nil { @@ -307,6 +318,8 @@ func (process *Process) StdioLegacy() (_ io.WriteCloser, _ io.ReadCloser, _ io.R // Stdio returns the stdin, stdout, and stderr pipes, respectively. // To close them, close the process handle. func (process *Process) Stdio() (stdin io.Writer, stdout, stderr io.Reader) { + process.stdioLock.Lock() + defer process.stdioLock.Unlock() return process.stdin, process.stdout, process.stderr } @@ -340,9 +353,13 @@ func (process *Process) CloseStdin(ctx context.Context) error { return makeProcessError(process, operation, err, events) } + process.stdioLock.Lock() if process.stdin != nil { process.stdin.Close() + process.stdin = nil } + process.stdioLock.Unlock() + return nil } @@ -365,15 +382,20 @@ func (process *Process) Close() (err error) { return nil } + process.stdioLock.Lock() if process.stdin != nil { process.stdin.Close() + process.stdin = nil } if process.stdout != nil { process.stdout.Close() + process.stdout = nil } if process.stderr != nil { process.stderr.Close() + process.stderr = nil } + process.stdioLock.Unlock() if err = process.unregisterCallback(ctx); err != nil { return makeProcessError(process, operation, err, nil) diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/syscall.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/syscall.go new file mode 100644 index 00000000000..ded2175c50d --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/syscall.go @@ -0,0 +1,5 @@ +package hcs + +//go:generate go run ../../mksyscall_windows.go -output zsyscall_windows.go syscall.go + +//sys hcsFormatWritableLayerVhd(handle uintptr) (hr error) = computestorage.HcsFormatWritableLayerVhd diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go index f7d4ba87a3d..67a5f7176f3 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go @@ -4,43 +4,20 @@ import ( "context" "encoding/json" "errors" - "os" - "strconv" "strings" "sync" "syscall" - "time" "github.com/Microsoft/hcsshim/internal/cow" "github.com/Microsoft/hcsshim/internal/log" "github.com/Microsoft/hcsshim/internal/oc" "github.com/Microsoft/hcsshim/internal/schema1" + hcsschema "github.com/Microsoft/hcsshim/internal/schema2" "github.com/Microsoft/hcsshim/internal/timeout" "github.com/Microsoft/hcsshim/internal/vmcompute" "go.opencensus.io/trace" ) -// currentContainerStarts is used to limit the number of concurrent container -// starts. -var currentContainerStarts containerStarts - -type containerStarts struct { - maxParallel int - inProgress int - sync.Mutex -} - -func init() { - mpsS := os.Getenv("HCSSHIM_MAX_PARALLEL_START") - if len(mpsS) > 0 { - mpsI, err := strconv.Atoi(mpsS) - if err != nil || mpsI < 0 { - return - } - currentContainerStarts.maxParallel = mpsI - } -} - type System struct { handleLock sync.RWMutex handle vmcompute.HcsSystem @@ -214,32 +191,6 @@ func (computeSystem *System) Start(ctx context.Context) (err error) { return makeSystemError(computeSystem, operation, "", ErrAlreadyClosed, nil) } - // This is a very simple backoff-retry loop to limit the number - // of parallel container starts if environment variable - // HCSSHIM_MAX_PARALLEL_START is set to a positive integer. - // It should generally only be used as a workaround to various - // platform issues that exist between RS1 and RS4 as of Aug 2018 - if currentContainerStarts.maxParallel > 0 { - for { - currentContainerStarts.Lock() - if currentContainerStarts.inProgress < currentContainerStarts.maxParallel { - currentContainerStarts.inProgress++ - currentContainerStarts.Unlock() - break - } - if currentContainerStarts.inProgress == currentContainerStarts.maxParallel { - currentContainerStarts.Unlock() - time.Sleep(100 * time.Millisecond) - } - } - // Make sure we decrement the count when we are done. - defer func() { - currentContainerStarts.Lock() - currentContainerStarts.inProgress-- - currentContainerStarts.Unlock() - }() - } - resultJSON, err := vmcompute.HcsStartComputeSystem(ctx, computeSystem.handle, "") events, err := processAsyncHcsResult(ctx, err, resultJSON, computeSystem.callbackNumber, hcsNotificationSystemStartCompleted, &timeout.SystemStart) if err != nil { @@ -345,6 +296,7 @@ func (computeSystem *System) ExitError() error { } } +// Properties returns the requested container properties targeting a V1 schema container. func (computeSystem *System) Properties(ctx context.Context, types ...schema1.PropertyType) (*schema1.ContainerProperties, error) { computeSystem.handleLock.RLock() defer computeSystem.handleLock.RUnlock() @@ -373,6 +325,35 @@ func (computeSystem *System) Properties(ctx context.Context, types ...schema1.Pr return properties, nil } +// PropertiesV2 returns the requested container properties targeting a V2 schema container. +func (computeSystem *System) PropertiesV2(ctx context.Context, types ...hcsschema.PropertyType) (*hcsschema.Properties, error) { + computeSystem.handleLock.RLock() + defer computeSystem.handleLock.RUnlock() + + operation := "hcsshim::System::PropertiesV2" + + queryBytes, err := json.Marshal(hcsschema.PropertyQuery{PropertyTypes: types}) + if err != nil { + return nil, makeSystemError(computeSystem, operation, "", err, nil) + } + + propertiesJSON, resultJSON, err := vmcompute.HcsGetComputeSystemProperties(ctx, computeSystem.handle, string(queryBytes)) + events := processHcsResult(ctx, resultJSON) + if err != nil { + return nil, makeSystemError(computeSystem, operation, "", err, events) + } + + if propertiesJSON == "" { + return nil, ErrUnexpectedValue + } + properties := &hcsschema.Properties{} + if err := json.Unmarshal([]byte(propertiesJSON), properties); err != nil { + return nil, makeSystemError(computeSystem, operation, "", err, nil) + } + + return properties, nil +} + // Pause pauses the execution of the computeSystem. This feature is not enabled in TP5. func (computeSystem *System) Pause(ctx context.Context) (err error) { operation := "hcsshim::System::Pause" @@ -451,38 +432,6 @@ func (computeSystem *System) createProcess(ctx context.Context, operation string return newProcess(processHandle, int(processInfo.ProcessId), computeSystem), &processInfo, nil } -// CreateProcessNoStdio launches a new process within the computeSystem. The -// Stdio handles are not cached on the process struct. -func (computeSystem *System) CreateProcessNoStdio(c interface{}) (_ cow.Process, err error) { - operation := "hcsshim::System::CreateProcessNoStdio" - ctx, span := trace.StartSpan(context.Background(), operation) - defer span.End() - defer func() { oc.SetSpanStatus(span, err) }() - span.AddAttributes(trace.StringAttribute("cid", computeSystem.id)) - - process, processInfo, err := computeSystem.createProcess(ctx, operation, c) - if err != nil { - return nil, err - } - defer func() { - if err != nil { - process.Close() - } - }() - - // We don't do anything with these handles. Close them so they don't leak. - syscall.Close(processInfo.StdInput) - syscall.Close(processInfo.StdOutput) - syscall.Close(processInfo.StdError) - - if err = process.registerCallback(ctx); err != nil { - return nil, makeSystemError(computeSystem, operation, "", err, nil) - } - go process.waitBackground() - - return process, nil -} - // CreateProcess launches a new process within the computeSystem. func (computeSystem *System) CreateProcess(ctx context.Context, c interface{}) (cow.Process, error) { operation := "hcsshim::System::CreateProcess" @@ -503,6 +452,7 @@ func (computeSystem *System) CreateProcess(ctx context.Context, c interface{}) ( process.stdin = pipes[0] process.stdout = pipes[1] process.stderr = pipes[2] + process.hasCachedStdio = true if err = process.registerCallback(ctx); err != nil { return nil, makeSystemError(computeSystem, operation, "", err, nil) diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/utils.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/utils.go index a638677ed5a..b474604bd20 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/utils.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/utils.go @@ -1,10 +1,14 @@ package hcs import ( + "context" "io" "syscall" "github.com/Microsoft/go-winio" + diskutil "github.com/Microsoft/go-winio/vhd" + "github.com/pkg/errors" + "golang.org/x/sys/windows" ) // makeOpenFiles calls winio.MakeOpenFile for each handle in a slice but closes all the handles @@ -31,3 +35,27 @@ func makeOpenFiles(hs []syscall.Handle) (_ []io.ReadWriteCloser, err error) { } return fs, nil } + +// creates a VHD formatted with NTFS of size `sizeGB` at the given `vhdPath`. +func CreateNTFSVHD(ctx context.Context, vhdPath string, sizeGB uint32) (err error) { + if err := diskutil.CreateVhdx(vhdPath, sizeGB, 1); err != nil { + return errors.Wrap(err, "failed to create VHD") + } + + vhd, err := diskutil.OpenVirtualDisk(vhdPath, diskutil.VirtualDiskAccessNone, diskutil.OpenVirtualDiskFlagNone) + if err != nil { + return errors.Wrap(err, "failed to open VHD") + } + defer func() { + err2 := windows.CloseHandle(windows.Handle(vhd)) + if err == nil { + err = errors.Wrap(err2, "failed to close VHD") + } + }() + + if err := hcsFormatWritableLayerVhd(uintptr(vhd)); err != nil { + return errors.Wrap(err, "failed to format VHD") + } + + return nil +} diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/zsyscall_windows.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/zsyscall_windows.go new file mode 100644 index 00000000000..39396d27267 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/zsyscall_windows.go @@ -0,0 +1,54 @@ +// Code generated mksyscall_windows.exe DO NOT EDIT + +package hcs + +import ( + "syscall" + "unsafe" + + "golang.org/x/sys/windows" +) + +var _ unsafe.Pointer + +// Do the interface allocations only once for common +// Errno values. +const ( + errnoERROR_IO_PENDING = 997 +) + +var ( + errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) +) + +// errnoErr returns common boxed Errno values, to prevent +// allocations at runtime. +func errnoErr(e syscall.Errno) error { + switch e { + case 0: + return nil + case errnoERROR_IO_PENDING: + return errERROR_IO_PENDING + } + // TODO: add more here, after collecting data on the common + // error values see on Windows. (perhaps when running + // all.bat?) + return e +} + +var ( + modcomputestorage = windows.NewLazySystemDLL("computestorage.dll") + + procHcsFormatWritableLayerVhd = modcomputestorage.NewProc("HcsFormatWritableLayerVhd") +) + +func hcsFormatWritableLayerVhd(handle uintptr) (hr error) { + r0, _, _ := syscall.Syscall(procHcsFormatWritableLayerVhd.Addr(), 1, uintptr(handle), 0, 0) + if int32(r0) < 0 { + if r0&0x1fff0000 == 0x00070000 { + r0 &= 0xffff + } + hr = syscall.Errno(r0) + } + return +} diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hns/hnsendpoint.go b/vendor/github.com/Microsoft/hcsshim/internal/hns/hnsendpoint.go index 6a1c41e1592..e0e1a471004 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hns/hnsendpoint.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hns/hnsendpoint.go @@ -173,6 +173,27 @@ func (endpoint *HNSEndpoint) ApplyACLPolicy(policies ...*ACLPolicy) error { return err } +// ApplyProxyPolicy applies a set of Proxy Policies on the Endpoint +func (endpoint *HNSEndpoint) ApplyProxyPolicy(policies ...*ProxyPolicy) error { + operation := "ApplyProxyPolicy" + title := "hcsshim::HNSEndpoint::" + operation + logrus.Debugf(title+" id=%s", endpoint.Id) + + for _, policy := range policies { + if policy == nil { + continue + } + jsonString, err := json.Marshal(policy) + if err != nil { + return err + } + endpoint.Policies = append(endpoint.Policies, jsonString) + } + + _, err := endpoint.Update() + return err +} + // ContainerAttach attaches an endpoint to container func (endpoint *HNSEndpoint) ContainerAttach(containerID string, compartmentID uint16) error { operation := "ContainerAttach" diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hns/hnspolicy.go b/vendor/github.com/Microsoft/hcsshim/internal/hns/hnspolicy.go index 2318a4fce2b..6765aaead5e 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hns/hnspolicy.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hns/hnspolicy.go @@ -17,6 +17,7 @@ const ( OutboundNat PolicyType = "OutBoundNAT" ExternalLoadBalancer PolicyType = "ELB" Route PolicyType = "ROUTE" + Proxy PolicyType = "PROXY" ) type NatPolicy struct { @@ -55,8 +56,18 @@ type PaPolicy struct { type OutboundNatPolicy struct { Policy - VIP string `json:"VIP,omitempty"` - Exceptions []string `json:"ExceptionList,omitempty"` + VIP string `json:"VIP,omitempty"` + Exceptions []string `json:"ExceptionList,omitempty"` + Destinations []string `json:",omitempty"` +} + +type ProxyPolicy struct { + Type PolicyType `json:"Type"` + IP string `json:",omitempty"` + Port string `json:",omitempty"` + ExceptionList []string `json:",omitempty"` + Destination string `json:",omitempty"` + OutboundNat bool `json:",omitempty"` } type ActionType string diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema1/schema1.go b/vendor/github.com/Microsoft/hcsshim/internal/schema1/schema1.go index fb23617f547..24bb3b46b4c 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema1/schema1.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema1/schema1.go @@ -214,9 +214,10 @@ type MappedVirtualDiskController struct { // GuestDefinedCapabilities is part of the GuestConnectionInfo returned by a GuestConnection call on a utility VM type GuestDefinedCapabilities struct { - NamespaceAddRequestSupported bool `json:",omitempty"` - SignalProcessSupported bool `json:",omitempty"` - DumpStacksSupported bool `json:",omitempty"` + NamespaceAddRequestSupported bool `json:",omitempty"` + SignalProcessSupported bool `json:",omitempty"` + DumpStacksSupported bool `json:",omitempty"` + DeleteContainerStateSupported bool `json:",omitempty"` } // GuestConnectionInfo is the structure of an iterm return by a GuestConnection call on a utility VM diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/devices.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/devices.go index 781a8840157..e985d96d228 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/devices.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/devices.go @@ -39,4 +39,8 @@ type Devices struct { FlexibleIov map[string]FlexibleIoDevice `json:"FlexibleIov,omitempty"` SharedMemory *SharedMemoryConfiguration `json:"SharedMemory,omitempty"` + + // TODO: This is pre-release support in schema 2.3. Need to add build number + // docs when a public build with this is out. + VirtualPci map[string]VirtualPciDevice `json:",omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_2.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_2.go index 27d0b8c4838..95328ec301b 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_2.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_2.go @@ -22,4 +22,28 @@ type Memory2 struct { // EnableDeferredCommit is private in the schema. If regenerated need to add back. EnableDeferredCommit bool `json:"EnableDeferredCommit,omitempty"` + + // EnableColdDiscardHint if enabled, then the memory cold discard hint feature is exposed + // to the VM, allowing it to trim non-zeroed pages from the working set (if supported by + // the guest operating system). + EnableColdDiscardHint bool `json:"EnableColdDiscardHint,omitempty"` + + // LowMmioGapInMB is the low MMIO region allocated below 4GB. + // + // TODO: This is pre-release support in schema 2.3. Need to add build number + // docs when a public build with this is out. + LowMMIOGapInMB uint64 `json:"LowMmioGapInMB,omitempty"` + + // HighMmioBaseInMB is the high MMIO region allocated above 4GB (base and + // size). + // + // TODO: This is pre-release support in schema 2.3. Need to add build number + // docs when a public build with this is out. + HighMMIOBaseInMB uint64 `json:"HighMmioBaseInMB,omitempty"` + + // HighMmioGapInMB is the high MMIO region. + // + // TODO: This is pre-release support in schema 2.3. Need to add build number + // docs when a public build with this is out. + HighMMIOGapInMB uint64 `json:"HighMmioGapInMB,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_information_for_vm.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_information_for_vm.go index b2c2a05a0ce..811779b04b2 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_information_for_vm.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_information_for_vm.go @@ -10,7 +10,7 @@ package hcsschema type MemoryInformationForVm struct { - VirtualNodeCount int32 `json:"VirtualNodeCount,omitempty"` + VirtualNodeCount uint32 `json:"VirtualNodeCount,omitempty"` VirtualMachineMemory *VmMemory `json:"VirtualMachineMemory,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_stats.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_stats.go index 625bc8bbef3..906ba597f9f 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_stats.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/memory_stats.go @@ -11,9 +11,9 @@ package hcsschema // Memory runtime statistics type MemoryStats struct { - MemoryUsageCommitBytes int32 `json:"MemoryUsageCommitBytes,omitempty"` + MemoryUsageCommitBytes uint64 `json:"MemoryUsageCommitBytes,omitempty"` - MemoryUsageCommitPeakBytes int32 `json:"MemoryUsageCommitPeakBytes,omitempty"` + MemoryUsageCommitPeakBytes uint64 `json:"MemoryUsageCommitPeakBytes,omitempty"` - MemoryUsagePrivateWorkingSetBytes int32 `json:"MemoryUsagePrivateWorkingSetBytes,omitempty"` + MemoryUsagePrivateWorkingSetBytes uint64 `json:"MemoryUsagePrivateWorkingSetBytes,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_stats.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_stats.go index 41f83a5458f..6157e252256 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_stats.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/processor_stats.go @@ -11,9 +11,9 @@ package hcsschema // CPU runtime statistics type ProcessorStats struct { - TotalRuntime100ns int32 `json:"TotalRuntime100ns,omitempty"` + TotalRuntime100ns uint64 `json:"TotalRuntime100ns,omitempty"` - RuntimeUser100ns int32 `json:"RuntimeUser100ns,omitempty"` + RuntimeUser100ns uint64 `json:"RuntimeUser100ns,omitempty"` - RuntimeKernel100ns int32 `json:"RuntimeKernel100ns,omitempty"` + RuntimeKernel100ns uint64 `json:"RuntimeKernel100ns,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/properties.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/properties.go index ac7f870007c..17558cba0f2 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/properties.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/properties.go @@ -9,6 +9,10 @@ package hcsschema +import ( + v1 "github.com/containerd/cgroups/stats/v1" +) + type Properties struct { Id string `json:"Id,omitempty"` @@ -43,4 +47,8 @@ type Properties struct { SharedMemoryRegionInfo []SharedMemoryRegionInfo `json:"SharedMemoryRegionInfo,omitempty"` GuestConnectionInfo *GuestConnectionInfo `json:"GuestConnectionInfo,omitempty"` + + // Metrics is not part of the API for HCS but this is used for LCOW v2 to + // return the full cgroup metrics from the guest. + Metrics *v1.Metrics `json:"LCOWMetrics,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_query.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_query.go index 877e13503e0..d6d80df1314 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_query.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_query.go @@ -11,5 +11,5 @@ package hcsschema // By default the basic properties will be returned. This query provides a way to request specific properties. type PropertyQuery struct { - PropertyTypes []string `json:"PropertyTypes,omitempty"` + PropertyTypes []PropertyType `json:"PropertyTypes,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_type.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_type.go new file mode 100644 index 00000000000..f092b737f48 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/property_type.go @@ -0,0 +1,23 @@ +/* + * HCS API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 2.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package hcsschema + +type PropertyType string + +const ( + PTMemory PropertyType = "Memory" + PTGuestMemory PropertyType = "GuestMemory" + PTStatistics PropertyType = "Statistics" + PTProcessList PropertyType = "ProcessList" + PTTerminateOnLastHandleClosed PropertyType = "TerminateOnLastHandleClosed" + PTSharedMemoryRegion PropertyType = "SharedMemoryRegion" + PTGuestConnection PropertyType = "GuestConnection" + PTICHeartbeatStatus PropertyType = "ICHeartbeatStatus" +) diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/statistics.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/statistics.go index aedcd1c16c3..ba7a6b3963b 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/statistics.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/statistics.go @@ -19,7 +19,7 @@ type Statistics struct { ContainerStartTime time.Time `json:"ContainerStartTime,omitempty"` - Uptime100ns int32 `json:"Uptime100ns,omitempty"` + Uptime100ns uint64 `json:"Uptime100ns,omitempty"` Processor *ProcessorStats `json:"Processor,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/storage_stats.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/storage_stats.go index 092ed6605fd..4f042ffd937 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/storage_stats.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/storage_stats.go @@ -11,11 +11,11 @@ package hcsschema // Storage runtime statistics type StorageStats struct { - ReadCountNormalized int32 `json:"ReadCountNormalized,omitempty"` + ReadCountNormalized uint64 `json:"ReadCountNormalized,omitempty"` - ReadSizeBytes int32 `json:"ReadSizeBytes,omitempty"` + ReadSizeBytes uint64 `json:"ReadSizeBytes,omitempty"` - WriteCountNormalized int32 `json:"WriteCountNormalized,omitempty"` + WriteCountNormalized uint64 `json:"WriteCountNormalized,omitempty"` - WriteSizeBytes int32 `json:"WriteSizeBytes,omitempty"` + WriteSizeBytes uint64 `json:"WriteSizeBytes,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_device.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_device.go new file mode 100644 index 00000000000..f5e05903c54 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_device.go @@ -0,0 +1,16 @@ +/* + * HCS API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 2.3 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package hcsschema + +// TODO: This is pre-release support in schema 2.3. Need to add build number +// docs when a public build with this is out. +type VirtualPciDevice struct { + Functions []VirtualPciFunction `json:",omitempty"` +} diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_function.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_function.go new file mode 100644 index 00000000000..cedb7d18bc2 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/virtual_pci_function.go @@ -0,0 +1,18 @@ +/* + * HCS API + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * API version: 2.3 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package hcsschema + +// TODO: This is pre-release support in schema 2.3. Need to add build number +// docs when a public build with this is out. +type VirtualPciFunction struct { + DeviceInstancePath string `json:",omitempty"` + + VirtualFunction uint16 `json:",omitempty"` +} diff --git a/vendor/github.com/Microsoft/hcsshim/internal/schema2/vm_memory.go b/vendor/github.com/Microsoft/hcsshim/internal/schema2/vm_memory.go index 6a09c03109f..8e1836dd6be 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/schema2/vm_memory.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/schema2/vm_memory.go @@ -14,9 +14,9 @@ type VmMemory struct { AvailableMemoryBuffer int32 `json:"AvailableMemoryBuffer,omitempty"` - ReservedMemory int32 `json:"ReservedMemory,omitempty"` + ReservedMemory uint64 `json:"ReservedMemory,omitempty"` - AssignedMemory int32 `json:"AssignedMemory,omitempty"` + AssignedMemory uint64 `json:"AssignedMemory,omitempty"` SlpActive bool `json:"SlpActive,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/vmcompute.go b/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/vmcompute.go index 9e4f9d42bc3..7c2a0dc280d 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/vmcompute.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/vmcompute/vmcompute.go @@ -204,7 +204,9 @@ func HcsShutdownComputeSystem(ctx gcontext.Context, computeSystem HcsSystem, opt if result != "" { span.AddAttributes(trace.StringAttribute("result", result)) } - oc.SetSpanStatus(span, hr) + if hr != errVmcomputeOperationPending { + oc.SetSpanStatus(span, hr) + } }() span.AddAttributes(trace.StringAttribute("options", options)) diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/activatelayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/activatelayer.go index dcb9192685a..81e454956a6 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/activatelayer.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/activatelayer.go @@ -1,28 +1,23 @@ package wclayer import ( + "context" + "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // ActivateLayer will find the layer with the given id and mount it's filesystem. // For a read/write layer, the mounted filesystem will appear as a volume on the // host, while a read-only layer is generally expected to be a no-op. // An activated layer must later be deactivated via DeactivateLayer. -func ActivateLayer(path string) (err error) { +func ActivateLayer(ctx context.Context, path string) (err error) { title := "hcsshim::ActivateLayer" - fields := logrus.Fields{ - "path": path, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes(trace.StringAttribute("path", path)) err = activateLayer(&stdDriverInfo, path) if err != nil { diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/baselayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/baselayer.go index 5784241dfa0..f907a7044d6 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/baselayer.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/baselayer.go @@ -1,6 +1,7 @@ package wclayer import ( + "context" "errors" "os" "path/filepath" @@ -8,10 +9,15 @@ import ( "github.com/Microsoft/go-winio" "github.com/Microsoft/hcsshim/internal/hcserror" + "github.com/Microsoft/hcsshim/internal/oc" "github.com/Microsoft/hcsshim/internal/safefile" + "go.opencensus.io/trace" ) type baseLayerWriter struct { + ctx context.Context + s *trace.Span + root *os.File f *os.File bw *winio.BackupFileWriter @@ -136,12 +142,15 @@ func (w *baseLayerWriter) Write(b []byte) (int, error) { return n, err } -func (w *baseLayerWriter) Close() error { +func (w *baseLayerWriter) Close() (err error) { + defer w.s.End() + defer func() { oc.SetSpanStatus(w.s, err) }() defer func() { w.root.Close() w.root = nil }() - err := w.closeCurrentFile() + + err = w.closeCurrentFile() if err != nil { return err } @@ -153,7 +162,7 @@ func (w *baseLayerWriter) Close() error { return err } - err = ProcessBaseLayer(w.root.Name()) + err = ProcessBaseLayer(w.ctx, w.root.Name()) if err != nil { return err } @@ -163,7 +172,7 @@ func (w *baseLayerWriter) Close() error { if err != nil { return err } - err = ProcessUtilityVMImage(filepath.Join(w.root.Name(), "UtilityVM")) + err = ProcessUtilityVMImage(w.ctx, filepath.Join(w.root.Name(), "UtilityVM")) if err != nil { return err } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createlayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createlayer.go index be2bc3fd650..41e5e6731e0 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createlayer.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createlayer.go @@ -1,27 +1,23 @@ package wclayer import ( + "context" + "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // CreateLayer creates a new, empty, read-only layer on the filesystem based on // the parent layer provided. -func CreateLayer(path, parent string) (err error) { +func CreateLayer(ctx context.Context, path, parent string) (err error) { title := "hcsshim::CreateLayer" - fields := logrus.Fields{ - "parent": parent, - "path": path, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes( + trace.StringAttribute("path", path), + trace.StringAttribute("parent", parent)) err = createLayer(&stdDriverInfo, path, parent) if err != nil { diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createscratchlayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createscratchlayer.go index 7e3351289e6..e3ff952a7b5 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createscratchlayer.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/createscratchlayer.go @@ -1,31 +1,29 @@ package wclayer import ( + "context" + "strings" + "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // CreateScratchLayer creates and populates new read-write layer for use by a container. // This requires both the id of the direct parent layer, as well as the full list // of paths to all parent layers up to the base (and including the direct parent // whose id was provided). -func CreateScratchLayer(path string, parentLayerPaths []string) (err error) { +func CreateScratchLayer(ctx context.Context, path string, parentLayerPaths []string) (err error) { title := "hcsshim::CreateScratchLayer" - fields := logrus.Fields{ - "path": path, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes( + trace.StringAttribute("path", path), + trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", "))) // Generate layer descriptors - layers, err := layerPathsToDescriptors(parentLayerPaths) + layers, err := layerPathsToDescriptors(ctx, parentLayerPaths) if err != nil { return err } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/deactivatelayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/deactivatelayer.go index 2dd5d571592..70a711cf5d5 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/deactivatelayer.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/deactivatelayer.go @@ -1,25 +1,20 @@ package wclayer import ( + "context" + "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // DeactivateLayer will dismount a layer that was mounted via ActivateLayer. -func DeactivateLayer(path string) (err error) { +func DeactivateLayer(ctx context.Context, path string) (err error) { title := "hcsshim::DeactivateLayer" - fields := logrus.Fields{ - "path": path, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes(trace.StringAttribute("path", path)) err = deactivateLayer(&stdDriverInfo, path) if err != nil { diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/destroylayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/destroylayer.go index 4da690c2030..bf197e3b0a3 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/destroylayer.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/destroylayer.go @@ -1,26 +1,21 @@ package wclayer import ( + "context" + "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // DestroyLayer will remove the on-disk files representing the layer with the given // path, including that layer's containing folder, if any. -func DestroyLayer(path string) (err error) { +func DestroyLayer(ctx context.Context, path string) (err error) { title := "hcsshim::DestroyLayer" - fields := logrus.Fields{ - "path": path, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes(trace.StringAttribute("path", path)) err = destroyLayer(&stdDriverInfo, path) if err != nil { diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go index 651676fb25e..93f27da8a0a 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go @@ -1,30 +1,140 @@ package wclayer import ( + "context" + "os" + "path/filepath" + "syscall" + "unsafe" + "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "github.com/Microsoft/hcsshim/osversion" + "go.opencensus.io/trace" ) // ExpandScratchSize expands the size of a layer to at least size bytes. -func ExpandScratchSize(path string, size uint64) (err error) { +func ExpandScratchSize(ctx context.Context, path string, size uint64) (err error) { title := "hcsshim::ExpandScratchSize" - fields := logrus.Fields{ - "path": path, - "size": size, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes( + trace.StringAttribute("path", path), + trace.Int64Attribute("size", int64(size))) err = expandSandboxSize(&stdDriverInfo, path, size) if err != nil { return hcserror.New(err, title+" - failed", "") } + + // Manually expand the volume now in order to work around bugs in 19H1 and + // prerelease versions of Vb. Remove once this is fixed in Windows. + if build := osversion.Get().Build; build >= osversion.V19H1 && build < 19020 { + err = expandSandboxVolume(ctx, path) + if err != nil { + return err + } + } + return nil +} + +type virtualStorageType struct { + DeviceID uint32 + VendorID [16]byte +} + +type openVersion2 struct { + GetInfoOnly int32 // bool but 4-byte aligned + ReadOnly int32 // bool but 4-byte aligned + ResiliencyGUID [16]byte // GUID +} + +type openVirtualDiskParameters struct { + Version uint32 // Must always be set to 2 + Version2 openVersion2 +} + +func attachVhd(path string) (syscall.Handle, error) { + var ( + defaultType virtualStorageType + handle syscall.Handle + ) + parameters := openVirtualDiskParameters{Version: 2} + err := openVirtualDisk( + &defaultType, + path, + 0, + 0, + ¶meters, + &handle) + if err != nil { + return 0, &os.PathError{Op: "OpenVirtualDisk", Path: path, Err: err} + } + err = attachVirtualDisk(handle, 0, 0, 0, 0, 0) + if err != nil { + syscall.Close(handle) + return 0, &os.PathError{Op: "AttachVirtualDisk", Path: path, Err: err} + } + return handle, nil +} + +func expandSandboxVolume(ctx context.Context, path string) error { + // Mount the sandbox VHD temporarily. + vhdPath := filepath.Join(path, "sandbox.vhdx") + vhd, err := attachVhd(vhdPath) + if err != nil { + return &os.PathError{Op: "OpenVirtualDisk", Path: vhdPath, Err: err} + } + defer syscall.Close(vhd) + + // Open the volume. + volumePath, err := GetLayerMountPath(ctx, path) + if err != nil { + return err + } + if volumePath[len(volumePath)-1] == '\\' { + volumePath = volumePath[:len(volumePath)-1] + } + volume, err := os.OpenFile(volumePath, os.O_RDWR, 0) + if err != nil { + return err + } + defer volume.Close() + + // Get the volume's underlying partition size in NTFS clusters. + var ( + partitionSize int64 + bytes uint32 + ) + const _IOCTL_DISK_GET_LENGTH_INFO = 0x0007405C + err = syscall.DeviceIoControl(syscall.Handle(volume.Fd()), _IOCTL_DISK_GET_LENGTH_INFO, nil, 0, (*byte)(unsafe.Pointer(&partitionSize)), 8, &bytes, nil) + if err != nil { + return &os.PathError{Op: "IOCTL_DISK_GET_LENGTH_INFO", Path: volume.Name(), Err: err} + } + const ( + clusterSize = 4096 + sectorSize = 512 + ) + targetClusters := partitionSize / clusterSize + + // Get the volume's current size in NTFS clusters. + var volumeSize int64 + err = getDiskFreeSpaceEx(volume.Name()+"\\", nil, &volumeSize, nil) + if err != nil { + return &os.PathError{Op: "GetDiskFreeSpaceEx", Path: volume.Name(), Err: err} + } + volumeClusters := volumeSize / clusterSize + + // Only resize the volume if there is space to grow, otherwise this will + // fail with invalid parameter. NTFS reserves one cluster. + if volumeClusters+1 < targetClusters { + targetSectors := targetClusters * (clusterSize / sectorSize) + const _FSCTL_EXTEND_VOLUME = 0x000900F0 + err = syscall.DeviceIoControl(syscall.Handle(volume.Fd()), _FSCTL_EXTEND_VOLUME, (*byte)(unsafe.Pointer(&targetSectors)), 8, nil, 0, &bytes, nil) + if err != nil { + return &os.PathError{Op: "FSCTL_EXTEND_VOLUME", Path: volume.Name(), Err: err} + } + } return nil } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go index 0425b339554..09f0de1a446 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go @@ -1,12 +1,15 @@ package wclayer import ( + "context" "io/ioutil" "os" + "strings" "github.com/Microsoft/go-winio" "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // ExportLayer will create a folder at exportFolderPath and fill that folder with @@ -14,24 +17,18 @@ import ( // format includes any metadata required for later importing the layer (using // ImportLayer), and requires the full list of parent layer paths in order to // perform the export. -func ExportLayer(path string, exportFolderPath string, parentLayerPaths []string) (err error) { +func ExportLayer(ctx context.Context, path string, exportFolderPath string, parentLayerPaths []string) (err error) { title := "hcsshim::ExportLayer" - fields := logrus.Fields{ - "path": path, - "exportFolderPath": exportFolderPath, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes( + trace.StringAttribute("path", path), + trace.StringAttribute("exportFolderPath", exportFolderPath), + trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", "))) // Generate layer descriptors - layers, err := layerPathsToDescriptors(parentLayerPaths) + layers, err := layerPathsToDescriptors(ctx, parentLayerPaths) if err != nil { return err } @@ -52,25 +49,46 @@ type LayerReader interface { // NewLayerReader returns a new layer reader for reading the contents of an on-disk layer. // The caller must have taken the SeBackupPrivilege privilege // to call this and any methods on the resulting LayerReader. -func NewLayerReader(path string, parentLayerPaths []string) (LayerReader, error) { +func NewLayerReader(ctx context.Context, path string, parentLayerPaths []string) (_ LayerReader, err error) { + ctx, span := trace.StartSpan(ctx, "hcsshim::NewLayerReader") + defer func() { + if err != nil { + oc.SetSpanStatus(span, err) + span.End() + } + }() + span.AddAttributes( + trace.StringAttribute("path", path), + trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", "))) + exportPath, err := ioutil.TempDir("", "hcs") if err != nil { return nil, err } - err = ExportLayer(path, exportPath, parentLayerPaths) + err = ExportLayer(ctx, path, exportPath, parentLayerPaths) if err != nil { os.RemoveAll(exportPath) return nil, err } - return &legacyLayerReaderWrapper{newLegacyLayerReader(exportPath)}, nil + return &legacyLayerReaderWrapper{ + ctx: ctx, + s: span, + legacyLayerReader: newLegacyLayerReader(exportPath), + }, nil } type legacyLayerReaderWrapper struct { + ctx context.Context + s *trace.Span + *legacyLayerReader } -func (r *legacyLayerReaderWrapper) Close() error { - err := r.legacyLayerReader.Close() +func (r *legacyLayerReaderWrapper) Close() (err error) { + defer r.s.End() + defer func() { oc.SetSpanStatus(r.s, err) }() + + err = r.legacyLayerReader.Close() os.RemoveAll(r.root) return err } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getlayermountpath.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getlayermountpath.go index d60b6ed5315..942e3bbf9df 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getlayermountpath.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getlayermountpath.go @@ -1,36 +1,31 @@ package wclayer import ( + "context" "syscall" "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/log" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // GetLayerMountPath will look for a mounted layer with the given path and return // the path at which that layer can be accessed. This path may be a volume path // if the layer is a mounted read-write layer, otherwise it is expected to be the // folder path at which the layer is stored. -func GetLayerMountPath(path string) (_ string, err error) { +func GetLayerMountPath(ctx context.Context, path string) (_ string, err error) { title := "hcsshim::GetLayerMountPath" - fields := logrus.Fields{ - "path": path, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes(trace.StringAttribute("path", path)) var mountPathLength uintptr mountPathLength = 0 // Call the procedure itself. - logrus.WithFields(fields).Debug("Calling proc (1)") + log.G(ctx).Debug("Calling proc (1)") err = getLayerMountPath(&stdDriverInfo, path, &mountPathLength, nil) if err != nil { return "", hcserror.New(err, title+" - failed", "(first call)") @@ -44,13 +39,13 @@ func GetLayerMountPath(path string) (_ string, err error) { mountPathp[0] = 0 // Call the procedure again - logrus.WithFields(fields).Debug("Calling proc (2)") + log.G(ctx).Debug("Calling proc (2)") err = getLayerMountPath(&stdDriverInfo, path, &mountPathLength, &mountPathp[0]) if err != nil { return "", hcserror.New(err, title+" - failed", "(second call)") } mountPath := syscall.UTF16ToString(mountPathp[0:]) - fields["mountPath"] = mountPath + span.AddAttributes(trace.StringAttribute("mountPath", mountPath)) return mountPath, nil } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getsharedbaseimages.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getsharedbaseimages.go index dbd83ef2bcc..a50378f492e 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getsharedbaseimages.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/getsharedbaseimages.go @@ -1,29 +1,29 @@ package wclayer import ( + "context" + "github.com/Microsoft/hcsshim/internal/hcserror" "github.com/Microsoft/hcsshim/internal/interop" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // GetSharedBaseImages will enumerate the images stored in the common central // image store and return descriptive info about those images for the purpose // of registering them with the graphdriver, graph, and tagstore. -func GetSharedBaseImages() (imageData string, err error) { +func GetSharedBaseImages(ctx context.Context) (_ string, err error) { title := "hcsshim::GetSharedBaseImages" - logrus.Debug(title) - defer func() { - if err != nil { - logrus.WithError(err).Error(err) - } else { - logrus.WithField("imageData", imageData).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() var buffer *uint16 err = getBaseImages(&buffer) if err != nil { return "", hcserror.New(err, title+" - failed", "") } - return interop.ConvertAndFreeCoTaskMemString(buffer), nil + imageData := interop.ConvertAndFreeCoTaskMemString(buffer) + span.AddAttributes(trace.StringAttribute("imageData", imageData)) + return imageData, nil } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/grantvmaccess.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/grantvmaccess.go index 05735df6cdc..aa7c8ae1fd5 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/grantvmaccess.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/grantvmaccess.go @@ -1,26 +1,22 @@ package wclayer import ( + "context" + "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // GrantVmAccess adds access to a file for a given VM -func GrantVmAccess(vmid string, filepath string) (err error) { +func GrantVmAccess(ctx context.Context, vmid string, filepath string) (err error) { title := "hcsshim::GrantVmAccess" - fields := logrus.Fields{ - "vm-id": vmid, - "path": filepath, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes( + trace.StringAttribute("vm-id", vmid), + trace.StringAttribute("path", filepath)) err = grantVmAccess(vmid, filepath) if err != nil { diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/importlayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/importlayer.go index 76a804f2af2..16800b39438 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/importlayer.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/importlayer.go @@ -1,38 +1,35 @@ package wclayer import ( + "context" "io/ioutil" "os" "path/filepath" + "strings" "github.com/Microsoft/go-winio" "github.com/Microsoft/hcsshim/internal/hcserror" + "github.com/Microsoft/hcsshim/internal/oc" "github.com/Microsoft/hcsshim/internal/safefile" - "github.com/sirupsen/logrus" + "go.opencensus.io/trace" ) // ImportLayer will take the contents of the folder at importFolderPath and import // that into a layer with the id layerId. Note that in order to correctly populate // the layer and interperet the transport format, all parent layers must already // be present on the system at the paths provided in parentLayerPaths. -func ImportLayer(path string, importFolderPath string, parentLayerPaths []string) (err error) { +func ImportLayer(ctx context.Context, path string, importFolderPath string, parentLayerPaths []string) (err error) { title := "hcsshim::ImportLayer" - fields := logrus.Fields{ - "path": path, - "importFolderPath": importFolderPath, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes( + trace.StringAttribute("path", path), + trace.StringAttribute("importFolderPath", importFolderPath), + trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", "))) // Generate layer descriptors - layers, err := layerPathsToDescriptors(parentLayerPaths) + layers, err := layerPathsToDescriptors(ctx, parentLayerPaths) if err != nil { return err } @@ -60,20 +57,26 @@ type LayerWriter interface { } type legacyLayerWriterWrapper struct { + ctx context.Context + s *trace.Span + *legacyLayerWriter path string parentLayerPaths []string } -func (r *legacyLayerWriterWrapper) Close() error { +func (r *legacyLayerWriterWrapper) Close() (err error) { + defer r.s.End() + defer func() { oc.SetSpanStatus(r.s, err) }() defer os.RemoveAll(r.root.Name()) defer r.legacyLayerWriter.CloseRoots() - err := r.legacyLayerWriter.Close() + + err = r.legacyLayerWriter.Close() if err != nil { return err } - if err = ImportLayer(r.destRoot.Name(), r.path, r.parentLayerPaths); err != nil { + if err = ImportLayer(r.ctx, r.destRoot.Name(), r.path, r.parentLayerPaths); err != nil { return err } for _, name := range r.Tombstones { @@ -96,7 +99,7 @@ func (r *legacyLayerWriterWrapper) Close() error { if err != nil { return err } - err = ProcessUtilityVMImage(filepath.Join(r.destRoot.Name(), "UtilityVM")) + err = ProcessUtilityVMImage(r.ctx, filepath.Join(r.destRoot.Name(), "UtilityVM")) if err != nil { return err } @@ -107,7 +110,18 @@ func (r *legacyLayerWriterWrapper) Close() error { // NewLayerWriter returns a new layer writer for creating a layer on disk. // The caller must have taken the SeBackupPrivilege and SeRestorePrivilege privileges // to call this and any methods on the resulting LayerWriter. -func NewLayerWriter(path string, parentLayerPaths []string) (LayerWriter, error) { +func NewLayerWriter(ctx context.Context, path string, parentLayerPaths []string) (_ LayerWriter, err error) { + ctx, span := trace.StartSpan(ctx, "hcsshim::NewLayerWriter") + defer func() { + if err != nil { + oc.SetSpanStatus(span, err) + span.End() + } + }() + span.AddAttributes( + trace.StringAttribute("path", path), + trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", "))) + if len(parentLayerPaths) == 0 { // This is a base layer. It gets imported differently. f, err := safefile.OpenRoot(path) @@ -115,6 +129,8 @@ func NewLayerWriter(path string, parentLayerPaths []string) (LayerWriter, error) return nil, err } return &baseLayerWriter{ + ctx: ctx, + s: span, root: f, }, nil } @@ -128,6 +144,8 @@ func NewLayerWriter(path string, parentLayerPaths []string) (LayerWriter, error) return nil, err } return &legacyLayerWriterWrapper{ + ctx: ctx, + s: span, legacyLayerWriter: w, path: importPath, parentLayerPaths: parentLayerPaths, diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerexists.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerexists.go index 258167a5793..6dd6f2d5750 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerexists.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerexists.go @@ -1,26 +1,21 @@ package wclayer import ( + "context" + "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // LayerExists will return true if a layer with the given id exists and is known // to the system. -func LayerExists(path string) (_ bool, err error) { +func LayerExists(ctx context.Context, path string) (_ bool, err error) { title := "hcsshim::LayerExists" - fields := logrus.Fields{ - "path": path, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes(trace.StringAttribute("path", path)) // Call the procedure itself. var exists uint32 @@ -28,6 +23,6 @@ func LayerExists(path string) (_ bool, err error) { if err != nil { return false, hcserror.New(err, title+" - failed", "") } - fields["layer-exists"] = exists != 0 + span.AddAttributes(trace.BoolAttribute("layer-exists", exists != 0)) return exists != 0, nil } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go index 443596fbaaf..0ce34a30f86 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerid.go @@ -1,13 +1,22 @@ package wclayer import ( + "context" "path/filepath" "github.com/Microsoft/go-winio/pkg/guid" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // LayerID returns the layer ID of a layer on disk. -func LayerID(path string) (guid.GUID, error) { +func LayerID(ctx context.Context, path string) (_ guid.GUID, err error) { + title := "hcsshim::LayerID" + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes(trace.StringAttribute("path", path)) + _, file := filepath.Split(path) - return NameToGuid(file) + return NameToGuid(ctx, file) } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerutils.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerutils.go index 06671309d15..1ec893c6af7 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerutils.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/layerutils.go @@ -4,6 +4,7 @@ package wclayer // functionality. import ( + "context" "syscall" "github.com/Microsoft/go-winio/pkg/guid" @@ -68,12 +69,12 @@ type WC_LAYER_DESCRIPTOR struct { Pathp *uint16 } -func layerPathsToDescriptors(parentLayerPaths []string) ([]WC_LAYER_DESCRIPTOR, error) { +func layerPathsToDescriptors(ctx context.Context, parentLayerPaths []string) ([]WC_LAYER_DESCRIPTOR, error) { // Array of descriptors that gets constructed. var layers []WC_LAYER_DESCRIPTOR for i := 0; i < len(parentLayerPaths); i++ { - g, err := LayerID(parentLayerPaths[i]) + g, err := LayerID(ctx, parentLayerPaths[i]) if err != nil { logrus.WithError(err).Debug("Failed to convert name to guid") return nil, err diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/nametoguid.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/nametoguid.go index a259c1b8287..b732857b32e 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/nametoguid.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/nametoguid.go @@ -1,34 +1,29 @@ package wclayer import ( + "context" + "github.com/Microsoft/go-winio/pkg/guid" "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // NameToGuid converts the given string into a GUID using the algorithm in the // Host Compute Service, ensuring GUIDs generated with the same string are common // across all clients. -func NameToGuid(name string) (id guid.GUID, err error) { +func NameToGuid(ctx context.Context, name string) (_ guid.GUID, err error) { title := "hcsshim::NameToGuid" - fields := logrus.Fields{ - "name": name, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes(trace.StringAttribute("name", name)) + var id guid.GUID err = nameToGuid(name, &id) if err != nil { - err = hcserror.New(err, title+" - failed", "") - return + return guid.GUID{}, hcserror.New(err, title+" - failed", "") } - fields["guid"] = id.String() - return + span.AddAttributes(trace.StringAttribute("guid", id.String())) + return id, nil } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/preparelayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/preparelayer.go index 2b65b018623..55f7730d0c1 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/preparelayer.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/preparelayer.go @@ -1,10 +1,13 @@ package wclayer import ( + "context" + "strings" "sync" "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) var prepareLayerLock sync.Mutex @@ -14,23 +17,17 @@ var prepareLayerLock sync.Mutex // parent layers, and is necessary in order to view or interact with the layer // as an actual filesystem (reading and writing files, creating directories, etc). // Disabling the filter must be done via UnprepareLayer. -func PrepareLayer(path string, parentLayerPaths []string) (err error) { +func PrepareLayer(ctx context.Context, path string, parentLayerPaths []string) (err error) { title := "hcsshim::PrepareLayer" - fields := logrus.Fields{ - "path": path, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes( + trace.StringAttribute("path", path), + trace.StringAttribute("parentLayerPaths", strings.Join(parentLayerPaths, ", "))) // Generate layer descriptors - layers, err := layerPathsToDescriptors(parentLayerPaths) + layers, err := layerPathsToDescriptors(ctx, parentLayerPaths) if err != nil { return err } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go index 884207c3edb..aabb3136843 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go @@ -1,23 +1,41 @@ package wclayer -import "os" +import ( + "context" + "os" + + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" +) // ProcessBaseLayer post-processes a base layer that has had its files extracted. // The files should have been extracted to \Files. -func ProcessBaseLayer(path string) error { - err := processBaseImage(path) +func ProcessBaseLayer(ctx context.Context, path string) (err error) { + title := "hcsshim::ProcessBaseLayer" + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes(trace.StringAttribute("path", path)) + + err = processBaseImage(path) if err != nil { - return &os.PathError{Op: "ProcessBaseLayer", Path: path, Err: err} + return &os.PathError{Op: title, Path: path, Err: err} } return nil } // ProcessUtilityVMImage post-processes a utility VM image that has had its files extracted. // The files should have been extracted to \Files. -func ProcessUtilityVMImage(path string) error { - err := processUtilityImage(path) +func ProcessUtilityVMImage(ctx context.Context, path string) (err error) { + title := "hcsshim::ProcessUtilityVMImage" + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes(trace.StringAttribute("path", path)) + + err = processUtilityImage(path) if err != nil { - return &os.PathError{Op: "ProcessUtilityVMImage", Path: path, Err: err} + return &os.PathError{Op: title, Path: path, Err: err} } return nil } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/unpreparelayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/unpreparelayer.go index bccd4596914..84f81848ff5 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/unpreparelayer.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/unpreparelayer.go @@ -1,26 +1,21 @@ package wclayer import ( + "context" + "github.com/Microsoft/hcsshim/internal/hcserror" - "github.com/sirupsen/logrus" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" ) // UnprepareLayer disables the filesystem filter for the read-write layer with // the given id. -func UnprepareLayer(path string) (err error) { +func UnprepareLayer(ctx context.Context, path string) (err error) { title := "hcsshim::UnprepareLayer" - fields := logrus.Fields{ - "path": path, - } - logrus.WithFields(fields).Debug(title) - defer func() { - if err != nil { - fields[logrus.ErrorKey] = err - logrus.WithFields(fields).Error(err) - } else { - logrus.WithFields(fields).Debug(title + " - succeeded") - } - }() + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + span.AddAttributes(trace.StringAttribute("path", path)) err = unprepareLayer(&stdDriverInfo, path) if err != nil { diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/wclayer.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/wclayer.go index 04cb4e7ab4a..dc40bf51943 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/wclayer.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/wclayer.go @@ -24,4 +24,9 @@ import "github.com/Microsoft/go-winio/pkg/guid" //sys grantVmAccess(vmid string, filepath string) (hr error) = vmcompute.GrantVmAccess? +//sys openVirtualDisk(virtualStorageType *virtualStorageType, path string, virtualDiskAccessMask uint32, flags uint32, parameters *openVirtualDiskParameters, handle *syscall.Handle) (err error) [failretval != 0] = virtdisk.OpenVirtualDisk +//sys attachVirtualDisk(handle syscall.Handle, sd uintptr, flags uint32, providerFlags uint32, params uintptr, overlapped uintptr) (err error) [failretval != 0] = virtdisk.AttachVirtualDisk + +//sys getDiskFreeSpaceEx(directoryName string, freeBytesAvailableToCaller *int64, totalNumberOfBytes *int64, totalNumberOfFreeBytes *int64) (err error) = GetDiskFreeSpaceExW + type _guid = guid.GUID diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/zsyscall_windows.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/zsyscall_windows.go index d853ab25951..67f917f07e6 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/zsyscall_windows.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/zsyscall_windows.go @@ -38,6 +38,8 @@ func errnoErr(e syscall.Errno) error { var ( modvmcompute = windows.NewLazySystemDLL("vmcompute.dll") + modvirtdisk = windows.NewLazySystemDLL("virtdisk.dll") + modkernel32 = windows.NewLazySystemDLL("kernel32.dll") procActivateLayer = modvmcompute.NewProc("ActivateLayer") procCopyLayer = modvmcompute.NewProc("CopyLayer") @@ -57,6 +59,9 @@ var ( procProcessBaseImage = modvmcompute.NewProc("ProcessBaseImage") procProcessUtilityImage = modvmcompute.NewProc("ProcessUtilityImage") procGrantVmAccess = modvmcompute.NewProc("GrantVmAccess") + procOpenVirtualDisk = modvirtdisk.NewProc("OpenVirtualDisk") + procAttachVirtualDisk = modvirtdisk.NewProc("AttachVirtualDisk") + procGetDiskFreeSpaceExW = modkernel32.NewProc("GetDiskFreeSpaceExW") ) func activateLayer(info *driverInfo, id string) (hr error) { @@ -508,3 +513,57 @@ func _grantVmAccess(vmid *uint16, filepath *uint16) (hr error) { } return } + +func openVirtualDisk(virtualStorageType *virtualStorageType, path string, virtualDiskAccessMask uint32, flags uint32, parameters *openVirtualDiskParameters, handle *syscall.Handle) (err error) { + var _p0 *uint16 + _p0, err = syscall.UTF16PtrFromString(path) + if err != nil { + return + } + return _openVirtualDisk(virtualStorageType, _p0, virtualDiskAccessMask, flags, parameters, handle) +} + +func _openVirtualDisk(virtualStorageType *virtualStorageType, path *uint16, virtualDiskAccessMask uint32, flags uint32, parameters *openVirtualDiskParameters, handle *syscall.Handle) (err error) { + r1, _, e1 := syscall.Syscall6(procOpenVirtualDisk.Addr(), 6, uintptr(unsafe.Pointer(virtualStorageType)), uintptr(unsafe.Pointer(path)), uintptr(virtualDiskAccessMask), uintptr(flags), uintptr(unsafe.Pointer(parameters)), uintptr(unsafe.Pointer(handle))) + if r1 != 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func attachVirtualDisk(handle syscall.Handle, sd uintptr, flags uint32, providerFlags uint32, params uintptr, overlapped uintptr) (err error) { + r1, _, e1 := syscall.Syscall6(procAttachVirtualDisk.Addr(), 6, uintptr(handle), uintptr(sd), uintptr(flags), uintptr(providerFlags), uintptr(params), uintptr(overlapped)) + if r1 != 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func getDiskFreeSpaceEx(directoryName string, freeBytesAvailableToCaller *int64, totalNumberOfBytes *int64, totalNumberOfFreeBytes *int64) (err error) { + var _p0 *uint16 + _p0, err = syscall.UTF16PtrFromString(directoryName) + if err != nil { + return + } + return _getDiskFreeSpaceEx(_p0, freeBytesAvailableToCaller, totalNumberOfBytes, totalNumberOfFreeBytes) +} + +func _getDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *int64, totalNumberOfBytes *int64, totalNumberOfFreeBytes *int64) (err error) { + r1, _, e1 := syscall.Syscall6(procGetDiskFreeSpaceExW.Addr(), 4, uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} diff --git a/vendor/github.com/Microsoft/hcsshim/layer.go b/vendor/github.com/Microsoft/hcsshim/layer.go index f60ba550105..8916163706c 100644 --- a/vendor/github.com/Microsoft/hcsshim/layer.go +++ b/vendor/github.com/Microsoft/hcsshim/layer.go @@ -1,6 +1,7 @@ package hcsshim import ( + "context" "crypto/sha1" "path/filepath" @@ -13,59 +14,59 @@ func layerPath(info *DriverInfo, id string) string { } func ActivateLayer(info DriverInfo, id string) error { - return wclayer.ActivateLayer(layerPath(&info, id)) + return wclayer.ActivateLayer(context.Background(), layerPath(&info, id)) } func CreateLayer(info DriverInfo, id, parent string) error { - return wclayer.CreateLayer(layerPath(&info, id), parent) + return wclayer.CreateLayer(context.Background(), layerPath(&info, id), parent) } // New clients should use CreateScratchLayer instead. Kept in to preserve API compatibility. func CreateSandboxLayer(info DriverInfo, layerId, parentId string, parentLayerPaths []string) error { - return wclayer.CreateScratchLayer(layerPath(&info, layerId), parentLayerPaths) + return wclayer.CreateScratchLayer(context.Background(), layerPath(&info, layerId), parentLayerPaths) } func CreateScratchLayer(info DriverInfo, layerId, parentId string, parentLayerPaths []string) error { - return wclayer.CreateScratchLayer(layerPath(&info, layerId), parentLayerPaths) + return wclayer.CreateScratchLayer(context.Background(), layerPath(&info, layerId), parentLayerPaths) } func DeactivateLayer(info DriverInfo, id string) error { - return wclayer.DeactivateLayer(layerPath(&info, id)) + return wclayer.DeactivateLayer(context.Background(), layerPath(&info, id)) } func DestroyLayer(info DriverInfo, id string) error { - return wclayer.DestroyLayer(layerPath(&info, id)) + return wclayer.DestroyLayer(context.Background(), layerPath(&info, id)) } // New clients should use ExpandScratchSize instead. Kept in to preserve API compatibility. func ExpandSandboxSize(info DriverInfo, layerId string, size uint64) error { - return wclayer.ExpandScratchSize(layerPath(&info, layerId), size) + return wclayer.ExpandScratchSize(context.Background(), layerPath(&info, layerId), size) } func ExpandScratchSize(info DriverInfo, layerId string, size uint64) error { - return wclayer.ExpandScratchSize(layerPath(&info, layerId), size) + return wclayer.ExpandScratchSize(context.Background(), layerPath(&info, layerId), size) } func ExportLayer(info DriverInfo, layerId string, exportFolderPath string, parentLayerPaths []string) error { - return wclayer.ExportLayer(layerPath(&info, layerId), exportFolderPath, parentLayerPaths) + return wclayer.ExportLayer(context.Background(), layerPath(&info, layerId), exportFolderPath, parentLayerPaths) } func GetLayerMountPath(info DriverInfo, id string) (string, error) { - return wclayer.GetLayerMountPath(layerPath(&info, id)) + return wclayer.GetLayerMountPath(context.Background(), layerPath(&info, id)) } func GetSharedBaseImages() (imageData string, err error) { - return wclayer.GetSharedBaseImages() + return wclayer.GetSharedBaseImages(context.Background()) } func ImportLayer(info DriverInfo, layerID string, importFolderPath string, parentLayerPaths []string) error { - return wclayer.ImportLayer(layerPath(&info, layerID), importFolderPath, parentLayerPaths) + return wclayer.ImportLayer(context.Background(), layerPath(&info, layerID), importFolderPath, parentLayerPaths) } func LayerExists(info DriverInfo, id string) (bool, error) { - return wclayer.LayerExists(layerPath(&info, id)) + return wclayer.LayerExists(context.Background(), layerPath(&info, id)) } func PrepareLayer(info DriverInfo, layerId string, parentLayerPaths []string) error { - return wclayer.PrepareLayer(layerPath(&info, layerId), parentLayerPaths) + return wclayer.PrepareLayer(context.Background(), layerPath(&info, layerId), parentLayerPaths) } func ProcessBaseLayer(path string) error { - return wclayer.ProcessBaseLayer(path) + return wclayer.ProcessBaseLayer(context.Background(), path) } func ProcessUtilityVMImage(path string) error { - return wclayer.ProcessUtilityVMImage(path) + return wclayer.ProcessUtilityVMImage(context.Background(), path) } func UnprepareLayer(info DriverInfo, layerId string) error { - return wclayer.UnprepareLayer(layerPath(&info, layerId)) + return wclayer.UnprepareLayer(context.Background(), layerPath(&info, layerId)) } type DriverInfo struct { @@ -76,7 +77,7 @@ type DriverInfo struct { type GUID [16]byte func NameToGuid(name string) (id GUID, err error) { - g, err := wclayer.NameToGuid(name) + g, err := wclayer.NameToGuid(context.Background(), name) return g.ToWindowsArray(), err } @@ -94,13 +95,13 @@ func (g *GUID) ToString() string { type LayerReader = wclayer.LayerReader func NewLayerReader(info DriverInfo, layerID string, parentLayerPaths []string) (LayerReader, error) { - return wclayer.NewLayerReader(layerPath(&info, layerID), parentLayerPaths) + return wclayer.NewLayerReader(context.Background(), layerPath(&info, layerID), parentLayerPaths) } type LayerWriter = wclayer.LayerWriter func NewLayerWriter(info DriverInfo, layerID string, parentLayerPaths []string) (LayerWriter, error) { - return wclayer.NewLayerWriter(layerPath(&info, layerID), parentLayerPaths) + return wclayer.NewLayerWriter(context.Background(), layerPath(&info, layerID), parentLayerPaths) } type WC_LAYER_DESCRIPTOR = wclayer.WC_LAYER_DESCRIPTOR diff --git a/vendor/github.com/Microsoft/hcsshim/osversion/osversion_windows.go b/vendor/github.com/Microsoft/hcsshim/osversion/osversion_windows.go new file mode 100644 index 00000000000..477fe70783d --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/osversion/osversion_windows.go @@ -0,0 +1,57 @@ +package osversion + +import ( + "fmt" + + "golang.org/x/sys/windows" +) + +// OSVersion is a wrapper for Windows version information +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx +type OSVersion struct { + Version uint32 + MajorVersion uint8 + MinorVersion uint8 + Build uint16 +} + +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833(v=vs.85).aspx +type osVersionInfoEx struct { + OSVersionInfoSize uint32 + MajorVersion uint32 + MinorVersion uint32 + BuildNumber uint32 + PlatformID uint32 + CSDVersion [128]uint16 + ServicePackMajor uint16 + ServicePackMinor uint16 + SuiteMask uint16 + ProductType byte + Reserve byte +} + +// Get gets the operating system version on Windows. +// The calling application must be manifested to get the correct version information. +func Get() OSVersion { + var err error + osv := OSVersion{} + osv.Version, err = windows.GetVersion() + if err != nil { + // GetVersion never fails. + panic(err) + } + osv.MajorVersion = uint8(osv.Version & 0xFF) + osv.MinorVersion = uint8(osv.Version >> 8 & 0xFF) + osv.Build = uint16(osv.Version >> 16) + return osv +} + +// Build gets the build-number on Windows +// The calling application must be manifested to get the correct version information. +func Build() uint16 { + return Get().Build +} + +func (osv OSVersion) ToString() string { + return fmt.Sprintf("%d.%d.%d", osv.MajorVersion, osv.MinorVersion, osv.Build) +} diff --git a/vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go b/vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go new file mode 100644 index 00000000000..726d1c8c122 --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/osversion/windowsbuilds.go @@ -0,0 +1,27 @@ +package osversion + +const ( + // RS1 (version 1607, codename "Redstone 1") corresponds to Windows Server + // 2016 (ltsc2016) and Windows 10 (Anniversary Update). + RS1 = 14393 + + // RS2 (version 1703, codename "Redstone 2") was a client-only update, and + // corresponds to Windows 10 (Creators Update). + RS2 = 15063 + + // RS3 (version 1709, codename "Redstone 3") corresponds to Windows Server + // 1709 (Semi-Annual Channel (SAC)), and Windows 10 (Fall Creators Update). + RS3 = 16299 + + // RS4 (version 1803, codename "Redstone 4") corresponds to Windows Server + // 1803 (Semi-Annual Channel (SAC)), and Windows 10 (April 2018 Update). + RS4 = 17134 + + // RS5 (version 1809, codename "Redstone 5") corresponds to Windows Server + // 2019 (ltsc2019), and Windows 10 (October 2018 Update). + RS5 = 17763 + + // V19H1 (version 1903) corresponds to Windows Server 1903 (semi-annual + // channel). + V19H1 = 18362 +) diff --git a/vendor/github.com/cespare/xxhash/v2/.travis.yml b/vendor/github.com/cespare/xxhash/v2/.travis.yml new file mode 100644 index 00000000000..c516ea88da7 --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/.travis.yml @@ -0,0 +1,8 @@ +language: go +go: + - "1.x" + - master +env: + - TAGS="" + - TAGS="-tags purego" +script: go test $TAGS -v ./... diff --git a/vendor/github.com/cespare/xxhash/v2/LICENSE.txt b/vendor/github.com/cespare/xxhash/v2/LICENSE.txt new file mode 100644 index 00000000000..24b53065f40 --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2016 Caleb Spare + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/cespare/xxhash/v2/README.md b/vendor/github.com/cespare/xxhash/v2/README.md new file mode 100644 index 00000000000..2fd8693c21b --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/README.md @@ -0,0 +1,67 @@ +# xxhash + +[![GoDoc](https://godoc.org/github.com/cespare/xxhash?status.svg)](https://godoc.org/github.com/cespare/xxhash) +[![Build Status](https://travis-ci.org/cespare/xxhash.svg?branch=master)](https://travis-ci.org/cespare/xxhash) + +xxhash is a Go implementation of the 64-bit +[xxHash](http://cyan4973.github.io/xxHash/) algorithm, XXH64. This is a +high-quality hashing algorithm that is much faster than anything in the Go +standard library. + +This package provides a straightforward API: + +``` +func Sum64(b []byte) uint64 +func Sum64String(s string) uint64 +type Digest struct{ ... } + func New() *Digest +``` + +The `Digest` type implements hash.Hash64. Its key methods are: + +``` +func (*Digest) Write([]byte) (int, error) +func (*Digest) WriteString(string) (int, error) +func (*Digest) Sum64() uint64 +``` + +This implementation provides a fast pure-Go implementation and an even faster +assembly implementation for amd64. + +## Compatibility + +This package is in a module and the latest code is in version 2 of the module. +You need a version of Go with at least "minimal module compatibility" to use +github.com/cespare/xxhash/v2: + +* 1.9.7+ for Go 1.9 +* 1.10.3+ for Go 1.10 +* Go 1.11 or later + +I recommend using the latest release of Go. + +## Benchmarks + +Here are some quick benchmarks comparing the pure-Go and assembly +implementations of Sum64. + +| input size | purego | asm | +| --- | --- | --- | +| 5 B | 979.66 MB/s | 1291.17 MB/s | +| 100 B | 7475.26 MB/s | 7973.40 MB/s | +| 4 KB | 17573.46 MB/s | 17602.65 MB/s | +| 10 MB | 17131.46 MB/s | 17142.16 MB/s | + +These numbers were generated on Ubuntu 18.04 with an Intel i7-8700K CPU using +the following commands under Go 1.11.2: + +``` +$ go test -tags purego -benchtime 10s -bench '/xxhash,direct,bytes' +$ go test -benchtime 10s -bench '/xxhash,direct,bytes' +``` + +## Projects using this package + +- [InfluxDB](https://github.com/influxdata/influxdb) +- [Prometheus](https://github.com/prometheus/prometheus) +- [FreeCache](https://github.com/coocood/freecache) diff --git a/vendor/github.com/cespare/xxhash/v2/go.mod b/vendor/github.com/cespare/xxhash/v2/go.mod new file mode 100644 index 00000000000..49f67608bf6 --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/go.mod @@ -0,0 +1,3 @@ +module github.com/cespare/xxhash/v2 + +go 1.11 diff --git a/vendor/github.com/cespare/xxhash/v2/go.sum b/vendor/github.com/cespare/xxhash/v2/go.sum new file mode 100644 index 00000000000..e69de29bb2d diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash.go b/vendor/github.com/cespare/xxhash/v2/xxhash.go new file mode 100644 index 00000000000..db0b35fbe39 --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/xxhash.go @@ -0,0 +1,236 @@ +// Package xxhash implements the 64-bit variant of xxHash (XXH64) as described +// at http://cyan4973.github.io/xxHash/. +package xxhash + +import ( + "encoding/binary" + "errors" + "math/bits" +) + +const ( + prime1 uint64 = 11400714785074694791 + prime2 uint64 = 14029467366897019727 + prime3 uint64 = 1609587929392839161 + prime4 uint64 = 9650029242287828579 + prime5 uint64 = 2870177450012600261 +) + +// NOTE(caleb): I'm using both consts and vars of the primes. Using consts where +// possible in the Go code is worth a small (but measurable) performance boost +// by avoiding some MOVQs. Vars are needed for the asm and also are useful for +// convenience in the Go code in a few places where we need to intentionally +// avoid constant arithmetic (e.g., v1 := prime1 + prime2 fails because the +// result overflows a uint64). +var ( + prime1v = prime1 + prime2v = prime2 + prime3v = prime3 + prime4v = prime4 + prime5v = prime5 +) + +// Digest implements hash.Hash64. +type Digest struct { + v1 uint64 + v2 uint64 + v3 uint64 + v4 uint64 + total uint64 + mem [32]byte + n int // how much of mem is used +} + +// New creates a new Digest that computes the 64-bit xxHash algorithm. +func New() *Digest { + var d Digest + d.Reset() + return &d +} + +// Reset clears the Digest's state so that it can be reused. +func (d *Digest) Reset() { + d.v1 = prime1v + prime2 + d.v2 = prime2 + d.v3 = 0 + d.v4 = -prime1v + d.total = 0 + d.n = 0 +} + +// Size always returns 8 bytes. +func (d *Digest) Size() int { return 8 } + +// BlockSize always returns 32 bytes. +func (d *Digest) BlockSize() int { return 32 } + +// Write adds more data to d. It always returns len(b), nil. +func (d *Digest) Write(b []byte) (n int, err error) { + n = len(b) + d.total += uint64(n) + + if d.n+n < 32 { + // This new data doesn't even fill the current block. + copy(d.mem[d.n:], b) + d.n += n + return + } + + if d.n > 0 { + // Finish off the partial block. + copy(d.mem[d.n:], b) + d.v1 = round(d.v1, u64(d.mem[0:8])) + d.v2 = round(d.v2, u64(d.mem[8:16])) + d.v3 = round(d.v3, u64(d.mem[16:24])) + d.v4 = round(d.v4, u64(d.mem[24:32])) + b = b[32-d.n:] + d.n = 0 + } + + if len(b) >= 32 { + // One or more full blocks left. + nw := writeBlocks(d, b) + b = b[nw:] + } + + // Store any remaining partial block. + copy(d.mem[:], b) + d.n = len(b) + + return +} + +// Sum appends the current hash to b and returns the resulting slice. +func (d *Digest) Sum(b []byte) []byte { + s := d.Sum64() + return append( + b, + byte(s>>56), + byte(s>>48), + byte(s>>40), + byte(s>>32), + byte(s>>24), + byte(s>>16), + byte(s>>8), + byte(s), + ) +} + +// Sum64 returns the current hash. +func (d *Digest) Sum64() uint64 { + var h uint64 + + if d.total >= 32 { + v1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4 + h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4) + h = mergeRound(h, v1) + h = mergeRound(h, v2) + h = mergeRound(h, v3) + h = mergeRound(h, v4) + } else { + h = d.v3 + prime5 + } + + h += d.total + + i, end := 0, d.n + for ; i+8 <= end; i += 8 { + k1 := round(0, u64(d.mem[i:i+8])) + h ^= k1 + h = rol27(h)*prime1 + prime4 + } + if i+4 <= end { + h ^= uint64(u32(d.mem[i:i+4])) * prime1 + h = rol23(h)*prime2 + prime3 + i += 4 + } + for i < end { + h ^= uint64(d.mem[i]) * prime5 + h = rol11(h) * prime1 + i++ + } + + h ^= h >> 33 + h *= prime2 + h ^= h >> 29 + h *= prime3 + h ^= h >> 32 + + return h +} + +const ( + magic = "xxh\x06" + marshaledSize = len(magic) + 8*5 + 32 +) + +// MarshalBinary implements the encoding.BinaryMarshaler interface. +func (d *Digest) MarshalBinary() ([]byte, error) { + b := make([]byte, 0, marshaledSize) + b = append(b, magic...) + b = appendUint64(b, d.v1) + b = appendUint64(b, d.v2) + b = appendUint64(b, d.v3) + b = appendUint64(b, d.v4) + b = appendUint64(b, d.total) + b = append(b, d.mem[:d.n]...) + b = b[:len(b)+len(d.mem)-d.n] + return b, nil +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. +func (d *Digest) UnmarshalBinary(b []byte) error { + if len(b) < len(magic) || string(b[:len(magic)]) != magic { + return errors.New("xxhash: invalid hash state identifier") + } + if len(b) != marshaledSize { + return errors.New("xxhash: invalid hash state size") + } + b = b[len(magic):] + b, d.v1 = consumeUint64(b) + b, d.v2 = consumeUint64(b) + b, d.v3 = consumeUint64(b) + b, d.v4 = consumeUint64(b) + b, d.total = consumeUint64(b) + copy(d.mem[:], b) + b = b[len(d.mem):] + d.n = int(d.total % uint64(len(d.mem))) + return nil +} + +func appendUint64(b []byte, x uint64) []byte { + var a [8]byte + binary.LittleEndian.PutUint64(a[:], x) + return append(b, a[:]...) +} + +func consumeUint64(b []byte) ([]byte, uint64) { + x := u64(b) + return b[8:], x +} + +func u64(b []byte) uint64 { return binary.LittleEndian.Uint64(b) } +func u32(b []byte) uint32 { return binary.LittleEndian.Uint32(b) } + +func round(acc, input uint64) uint64 { + acc += input * prime2 + acc = rol31(acc) + acc *= prime1 + return acc +} + +func mergeRound(acc, val uint64) uint64 { + val = round(0, val) + acc ^= val + acc = acc*prime1 + prime4 + return acc +} + +func rol1(x uint64) uint64 { return bits.RotateLeft64(x, 1) } +func rol7(x uint64) uint64 { return bits.RotateLeft64(x, 7) } +func rol11(x uint64) uint64 { return bits.RotateLeft64(x, 11) } +func rol12(x uint64) uint64 { return bits.RotateLeft64(x, 12) } +func rol18(x uint64) uint64 { return bits.RotateLeft64(x, 18) } +func rol23(x uint64) uint64 { return bits.RotateLeft64(x, 23) } +func rol27(x uint64) uint64 { return bits.RotateLeft64(x, 27) } +func rol31(x uint64) uint64 { return bits.RotateLeft64(x, 31) } diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go new file mode 100644 index 00000000000..ad14b807f4d --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go @@ -0,0 +1,13 @@ +// +build !appengine +// +build gc +// +build !purego + +package xxhash + +// Sum64 computes the 64-bit xxHash digest of b. +// +//go:noescape +func Sum64(b []byte) uint64 + +//go:noescape +func writeBlocks(d *Digest, b []byte) int diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s new file mode 100644 index 00000000000..d580e32aed4 --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s @@ -0,0 +1,215 @@ +// +build !appengine +// +build gc +// +build !purego + +#include "textflag.h" + +// Register allocation: +// AX h +// CX pointer to advance through b +// DX n +// BX loop end +// R8 v1, k1 +// R9 v2 +// R10 v3 +// R11 v4 +// R12 tmp +// R13 prime1v +// R14 prime2v +// R15 prime4v + +// round reads from and advances the buffer pointer in CX. +// It assumes that R13 has prime1v and R14 has prime2v. +#define round(r) \ + MOVQ (CX), R12 \ + ADDQ $8, CX \ + IMULQ R14, R12 \ + ADDQ R12, r \ + ROLQ $31, r \ + IMULQ R13, r + +// mergeRound applies a merge round on the two registers acc and val. +// It assumes that R13 has prime1v, R14 has prime2v, and R15 has prime4v. +#define mergeRound(acc, val) \ + IMULQ R14, val \ + ROLQ $31, val \ + IMULQ R13, val \ + XORQ val, acc \ + IMULQ R13, acc \ + ADDQ R15, acc + +// func Sum64(b []byte) uint64 +TEXT ·Sum64(SB), NOSPLIT, $0-32 + // Load fixed primes. + MOVQ ·prime1v(SB), R13 + MOVQ ·prime2v(SB), R14 + MOVQ ·prime4v(SB), R15 + + // Load slice. + MOVQ b_base+0(FP), CX + MOVQ b_len+8(FP), DX + LEAQ (CX)(DX*1), BX + + // The first loop limit will be len(b)-32. + SUBQ $32, BX + + // Check whether we have at least one block. + CMPQ DX, $32 + JLT noBlocks + + // Set up initial state (v1, v2, v3, v4). + MOVQ R13, R8 + ADDQ R14, R8 + MOVQ R14, R9 + XORQ R10, R10 + XORQ R11, R11 + SUBQ R13, R11 + + // Loop until CX > BX. +blockLoop: + round(R8) + round(R9) + round(R10) + round(R11) + + CMPQ CX, BX + JLE blockLoop + + MOVQ R8, AX + ROLQ $1, AX + MOVQ R9, R12 + ROLQ $7, R12 + ADDQ R12, AX + MOVQ R10, R12 + ROLQ $12, R12 + ADDQ R12, AX + MOVQ R11, R12 + ROLQ $18, R12 + ADDQ R12, AX + + mergeRound(AX, R8) + mergeRound(AX, R9) + mergeRound(AX, R10) + mergeRound(AX, R11) + + JMP afterBlocks + +noBlocks: + MOVQ ·prime5v(SB), AX + +afterBlocks: + ADDQ DX, AX + + // Right now BX has len(b)-32, and we want to loop until CX > len(b)-8. + ADDQ $24, BX + + CMPQ CX, BX + JG fourByte + +wordLoop: + // Calculate k1. + MOVQ (CX), R8 + ADDQ $8, CX + IMULQ R14, R8 + ROLQ $31, R8 + IMULQ R13, R8 + + XORQ R8, AX + ROLQ $27, AX + IMULQ R13, AX + ADDQ R15, AX + + CMPQ CX, BX + JLE wordLoop + +fourByte: + ADDQ $4, BX + CMPQ CX, BX + JG singles + + MOVL (CX), R8 + ADDQ $4, CX + IMULQ R13, R8 + XORQ R8, AX + + ROLQ $23, AX + IMULQ R14, AX + ADDQ ·prime3v(SB), AX + +singles: + ADDQ $4, BX + CMPQ CX, BX + JGE finalize + +singlesLoop: + MOVBQZX (CX), R12 + ADDQ $1, CX + IMULQ ·prime5v(SB), R12 + XORQ R12, AX + + ROLQ $11, AX + IMULQ R13, AX + + CMPQ CX, BX + JL singlesLoop + +finalize: + MOVQ AX, R12 + SHRQ $33, R12 + XORQ R12, AX + IMULQ R14, AX + MOVQ AX, R12 + SHRQ $29, R12 + XORQ R12, AX + IMULQ ·prime3v(SB), AX + MOVQ AX, R12 + SHRQ $32, R12 + XORQ R12, AX + + MOVQ AX, ret+24(FP) + RET + +// writeBlocks uses the same registers as above except that it uses AX to store +// the d pointer. + +// func writeBlocks(d *Digest, b []byte) int +TEXT ·writeBlocks(SB), NOSPLIT, $0-40 + // Load fixed primes needed for round. + MOVQ ·prime1v(SB), R13 + MOVQ ·prime2v(SB), R14 + + // Load slice. + MOVQ b_base+8(FP), CX + MOVQ b_len+16(FP), DX + LEAQ (CX)(DX*1), BX + SUBQ $32, BX + + // Load vN from d. + MOVQ d+0(FP), AX + MOVQ 0(AX), R8 // v1 + MOVQ 8(AX), R9 // v2 + MOVQ 16(AX), R10 // v3 + MOVQ 24(AX), R11 // v4 + + // We don't need to check the loop condition here; this function is + // always called with at least one block of data to process. +blockLoop: + round(R8) + round(R9) + round(R10) + round(R11) + + CMPQ CX, BX + JLE blockLoop + + // Copy vN back to d. + MOVQ R8, 0(AX) + MOVQ R9, 8(AX) + MOVQ R10, 16(AX) + MOVQ R11, 24(AX) + + // The number of bytes written is CX minus the old base pointer. + SUBQ b_base+8(FP), CX + MOVQ CX, ret+32(FP) + + RET diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_other.go b/vendor/github.com/cespare/xxhash/v2/xxhash_other.go new file mode 100644 index 00000000000..4a5a821603e --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_other.go @@ -0,0 +1,76 @@ +// +build !amd64 appengine !gc purego + +package xxhash + +// Sum64 computes the 64-bit xxHash digest of b. +func Sum64(b []byte) uint64 { + // A simpler version would be + // d := New() + // d.Write(b) + // return d.Sum64() + // but this is faster, particularly for small inputs. + + n := len(b) + var h uint64 + + if n >= 32 { + v1 := prime1v + prime2 + v2 := prime2 + v3 := uint64(0) + v4 := -prime1v + for len(b) >= 32 { + v1 = round(v1, u64(b[0:8:len(b)])) + v2 = round(v2, u64(b[8:16:len(b)])) + v3 = round(v3, u64(b[16:24:len(b)])) + v4 = round(v4, u64(b[24:32:len(b)])) + b = b[32:len(b):len(b)] + } + h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4) + h = mergeRound(h, v1) + h = mergeRound(h, v2) + h = mergeRound(h, v3) + h = mergeRound(h, v4) + } else { + h = prime5 + } + + h += uint64(n) + + i, end := 0, len(b) + for ; i+8 <= end; i += 8 { + k1 := round(0, u64(b[i:i+8:len(b)])) + h ^= k1 + h = rol27(h)*prime1 + prime4 + } + if i+4 <= end { + h ^= uint64(u32(b[i:i+4:len(b)])) * prime1 + h = rol23(h)*prime2 + prime3 + i += 4 + } + for ; i < end; i++ { + h ^= uint64(b[i]) * prime5 + h = rol11(h) * prime1 + } + + h ^= h >> 33 + h *= prime2 + h ^= h >> 29 + h *= prime3 + h ^= h >> 32 + + return h +} + +func writeBlocks(d *Digest, b []byte) int { + v1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4 + n := len(b) + for len(b) >= 32 { + v1 = round(v1, u64(b[0:8:len(b)])) + v2 = round(v2, u64(b[8:16:len(b)])) + v3 = round(v3, u64(b[16:24:len(b)])) + v4 = round(v4, u64(b[24:32:len(b)])) + b = b[32:len(b):len(b)] + } + d.v1, d.v2, d.v3, d.v4 = v1, v2, v3, v4 + return n - len(b) +} diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go new file mode 100644 index 00000000000..fc9bea7a31f --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go @@ -0,0 +1,15 @@ +// +build appengine + +// This file contains the safe implementations of otherwise unsafe-using code. + +package xxhash + +// Sum64String computes the 64-bit xxHash digest of s. +func Sum64String(s string) uint64 { + return Sum64([]byte(s)) +} + +// WriteString adds more data to d. It always returns len(s), nil. +func (d *Digest) WriteString(s string) (n int, err error) { + return d.Write([]byte(s)) +} diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go new file mode 100644 index 00000000000..53bf76efbc2 --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go @@ -0,0 +1,46 @@ +// +build !appengine + +// This file encapsulates usage of unsafe. +// xxhash_safe.go contains the safe implementations. + +package xxhash + +import ( + "reflect" + "unsafe" +) + +// Notes: +// +// See https://groups.google.com/d/msg/golang-nuts/dcjzJy-bSpw/tcZYBzQqAQAJ +// for some discussion about these unsafe conversions. +// +// In the future it's possible that compiler optimizations will make these +// unsafe operations unnecessary: https://golang.org/issue/2205. +// +// Both of these wrapper functions still incur function call overhead since they +// will not be inlined. We could write Go/asm copies of Sum64 and Digest.Write +// for strings to squeeze out a bit more speed. Mid-stack inlining should +// eventually fix this. + +// Sum64String computes the 64-bit xxHash digest of s. +// It may be faster than Sum64([]byte(s)) by avoiding a copy. +func Sum64String(s string) uint64 { + var b []byte + bh := (*reflect.SliceHeader)(unsafe.Pointer(&b)) + bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data + bh.Len = len(s) + bh.Cap = len(s) + return Sum64(b) +} + +// WriteString adds more data to d. It always returns len(s), nil. +// It may be faster than Write([]byte(s)) by avoiding a copy. +func (d *Digest) WriteString(s string) (n int, err error) { + var b []byte + bh := (*reflect.SliceHeader)(unsafe.Pointer(&b)) + bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data + bh.Len = len(s) + bh.Cap = len(s) + return d.Write(b) +} diff --git a/vendor/github.com/checkpoint-restore/go-criu/rpc/rpc.pb.go b/vendor/github.com/checkpoint-restore/go-criu/rpc/rpc.pb.go deleted file mode 100644 index 230faace556..00000000000 --- a/vendor/github.com/checkpoint-restore/go-criu/rpc/rpc.pb.go +++ /dev/null @@ -1,1211 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: rpc/rpc.proto - -/* -Package rpc is a generated protocol buffer package. - -It is generated from these files: - rpc/rpc.proto - -It has these top-level messages: - CriuPageServerInfo - CriuVethPair - ExtMountMap - JoinNamespace - InheritFd - CgroupRoot - UnixSk - CriuOpts - CriuDumpResp - CriuRestoreResp - CriuNotify - CriuFeatures - CriuReq - CriuResp - CriuVersion -*/ -package rpc - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type CriuCgMode int32 - -const ( - CriuCgMode_IGNORE CriuCgMode = 0 - CriuCgMode_CG_NONE CriuCgMode = 1 - CriuCgMode_PROPS CriuCgMode = 2 - CriuCgMode_SOFT CriuCgMode = 3 - CriuCgMode_FULL CriuCgMode = 4 - CriuCgMode_STRICT CriuCgMode = 5 - CriuCgMode_DEFAULT CriuCgMode = 6 -) - -var CriuCgMode_name = map[int32]string{ - 0: "IGNORE", - 1: "CG_NONE", - 2: "PROPS", - 3: "SOFT", - 4: "FULL", - 5: "STRICT", - 6: "DEFAULT", -} -var CriuCgMode_value = map[string]int32{ - "IGNORE": 0, - "CG_NONE": 1, - "PROPS": 2, - "SOFT": 3, - "FULL": 4, - "STRICT": 5, - "DEFAULT": 6, -} - -func (x CriuCgMode) Enum() *CriuCgMode { - p := new(CriuCgMode) - *p = x - return p -} -func (x CriuCgMode) String() string { - return proto.EnumName(CriuCgMode_name, int32(x)) -} -func (x *CriuCgMode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(CriuCgMode_value, data, "CriuCgMode") - if err != nil { - return err - } - *x = CriuCgMode(value) - return nil -} -func (CriuCgMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -type CriuReqType int32 - -const ( - CriuReqType_EMPTY CriuReqType = 0 - CriuReqType_DUMP CriuReqType = 1 - CriuReqType_RESTORE CriuReqType = 2 - CriuReqType_CHECK CriuReqType = 3 - CriuReqType_PRE_DUMP CriuReqType = 4 - CriuReqType_PAGE_SERVER CriuReqType = 5 - CriuReqType_NOTIFY CriuReqType = 6 - CriuReqType_CPUINFO_DUMP CriuReqType = 7 - CriuReqType_CPUINFO_CHECK CriuReqType = 8 - CriuReqType_FEATURE_CHECK CriuReqType = 9 - CriuReqType_VERSION CriuReqType = 10 - CriuReqType_WAIT_PID CriuReqType = 11 - CriuReqType_PAGE_SERVER_CHLD CriuReqType = 12 -) - -var CriuReqType_name = map[int32]string{ - 0: "EMPTY", - 1: "DUMP", - 2: "RESTORE", - 3: "CHECK", - 4: "PRE_DUMP", - 5: "PAGE_SERVER", - 6: "NOTIFY", - 7: "CPUINFO_DUMP", - 8: "CPUINFO_CHECK", - 9: "FEATURE_CHECK", - 10: "VERSION", - 11: "WAIT_PID", - 12: "PAGE_SERVER_CHLD", -} -var CriuReqType_value = map[string]int32{ - "EMPTY": 0, - "DUMP": 1, - "RESTORE": 2, - "CHECK": 3, - "PRE_DUMP": 4, - "PAGE_SERVER": 5, - "NOTIFY": 6, - "CPUINFO_DUMP": 7, - "CPUINFO_CHECK": 8, - "FEATURE_CHECK": 9, - "VERSION": 10, - "WAIT_PID": 11, - "PAGE_SERVER_CHLD": 12, -} - -func (x CriuReqType) Enum() *CriuReqType { - p := new(CriuReqType) - *p = x - return p -} -func (x CriuReqType) String() string { - return proto.EnumName(CriuReqType_name, int32(x)) -} -func (x *CriuReqType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(CriuReqType_value, data, "CriuReqType") - if err != nil { - return err - } - *x = CriuReqType(value) - return nil -} -func (CriuReqType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -type CriuPageServerInfo struct { - Address *string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` - Port *int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"` - Pid *int32 `protobuf:"varint,3,opt,name=pid" json:"pid,omitempty"` - Fd *int32 `protobuf:"varint,4,opt,name=fd" json:"fd,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CriuPageServerInfo) Reset() { *m = CriuPageServerInfo{} } -func (m *CriuPageServerInfo) String() string { return proto.CompactTextString(m) } -func (*CriuPageServerInfo) ProtoMessage() {} -func (*CriuPageServerInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *CriuPageServerInfo) GetAddress() string { - if m != nil && m.Address != nil { - return *m.Address - } - return "" -} - -func (m *CriuPageServerInfo) GetPort() int32 { - if m != nil && m.Port != nil { - return *m.Port - } - return 0 -} - -func (m *CriuPageServerInfo) GetPid() int32 { - if m != nil && m.Pid != nil { - return *m.Pid - } - return 0 -} - -func (m *CriuPageServerInfo) GetFd() int32 { - if m != nil && m.Fd != nil { - return *m.Fd - } - return 0 -} - -type CriuVethPair struct { - IfIn *string `protobuf:"bytes,1,req,name=if_in,json=ifIn" json:"if_in,omitempty"` - IfOut *string `protobuf:"bytes,2,req,name=if_out,json=ifOut" json:"if_out,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CriuVethPair) Reset() { *m = CriuVethPair{} } -func (m *CriuVethPair) String() string { return proto.CompactTextString(m) } -func (*CriuVethPair) ProtoMessage() {} -func (*CriuVethPair) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *CriuVethPair) GetIfIn() string { - if m != nil && m.IfIn != nil { - return *m.IfIn - } - return "" -} - -func (m *CriuVethPair) GetIfOut() string { - if m != nil && m.IfOut != nil { - return *m.IfOut - } - return "" -} - -type ExtMountMap struct { - Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` - Val *string `protobuf:"bytes,2,req,name=val" json:"val,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ExtMountMap) Reset() { *m = ExtMountMap{} } -func (m *ExtMountMap) String() string { return proto.CompactTextString(m) } -func (*ExtMountMap) ProtoMessage() {} -func (*ExtMountMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -func (m *ExtMountMap) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *ExtMountMap) GetVal() string { - if m != nil && m.Val != nil { - return *m.Val - } - return "" -} - -type JoinNamespace struct { - Ns *string `protobuf:"bytes,1,req,name=ns" json:"ns,omitempty"` - NsFile *string `protobuf:"bytes,2,req,name=ns_file,json=nsFile" json:"ns_file,omitempty"` - ExtraOpt *string `protobuf:"bytes,3,opt,name=extra_opt,json=extraOpt" json:"extra_opt,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *JoinNamespace) Reset() { *m = JoinNamespace{} } -func (m *JoinNamespace) String() string { return proto.CompactTextString(m) } -func (*JoinNamespace) ProtoMessage() {} -func (*JoinNamespace) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *JoinNamespace) GetNs() string { - if m != nil && m.Ns != nil { - return *m.Ns - } - return "" -} - -func (m *JoinNamespace) GetNsFile() string { - if m != nil && m.NsFile != nil { - return *m.NsFile - } - return "" -} - -func (m *JoinNamespace) GetExtraOpt() string { - if m != nil && m.ExtraOpt != nil { - return *m.ExtraOpt - } - return "" -} - -type InheritFd struct { - Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` - Fd *int32 `protobuf:"varint,2,req,name=fd" json:"fd,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *InheritFd) Reset() { *m = InheritFd{} } -func (m *InheritFd) String() string { return proto.CompactTextString(m) } -func (*InheritFd) ProtoMessage() {} -func (*InheritFd) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } - -func (m *InheritFd) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *InheritFd) GetFd() int32 { - if m != nil && m.Fd != nil { - return *m.Fd - } - return 0 -} - -type CgroupRoot struct { - Ctrl *string `protobuf:"bytes,1,opt,name=ctrl" json:"ctrl,omitempty"` - Path *string `protobuf:"bytes,2,req,name=path" json:"path,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CgroupRoot) Reset() { *m = CgroupRoot{} } -func (m *CgroupRoot) String() string { return proto.CompactTextString(m) } -func (*CgroupRoot) ProtoMessage() {} -func (*CgroupRoot) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } - -func (m *CgroupRoot) GetCtrl() string { - if m != nil && m.Ctrl != nil { - return *m.Ctrl - } - return "" -} - -func (m *CgroupRoot) GetPath() string { - if m != nil && m.Path != nil { - return *m.Path - } - return "" -} - -type UnixSk struct { - Inode *uint32 `protobuf:"varint,1,req,name=inode" json:"inode,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UnixSk) Reset() { *m = UnixSk{} } -func (m *UnixSk) String() string { return proto.CompactTextString(m) } -func (*UnixSk) ProtoMessage() {} -func (*UnixSk) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } - -func (m *UnixSk) GetInode() uint32 { - if m != nil && m.Inode != nil { - return *m.Inode - } - return 0 -} - -type CriuOpts struct { - ImagesDirFd *int32 `protobuf:"varint,1,req,name=images_dir_fd,json=imagesDirFd" json:"images_dir_fd,omitempty"` - Pid *int32 `protobuf:"varint,2,opt,name=pid" json:"pid,omitempty"` - LeaveRunning *bool `protobuf:"varint,3,opt,name=leave_running,json=leaveRunning" json:"leave_running,omitempty"` - ExtUnixSk *bool `protobuf:"varint,4,opt,name=ext_unix_sk,json=extUnixSk" json:"ext_unix_sk,omitempty"` - TcpEstablished *bool `protobuf:"varint,5,opt,name=tcp_established,json=tcpEstablished" json:"tcp_established,omitempty"` - EvasiveDevices *bool `protobuf:"varint,6,opt,name=evasive_devices,json=evasiveDevices" json:"evasive_devices,omitempty"` - ShellJob *bool `protobuf:"varint,7,opt,name=shell_job,json=shellJob" json:"shell_job,omitempty"` - FileLocks *bool `protobuf:"varint,8,opt,name=file_locks,json=fileLocks" json:"file_locks,omitempty"` - LogLevel *int32 `protobuf:"varint,9,opt,name=log_level,json=logLevel,def=2" json:"log_level,omitempty"` - LogFile *string `protobuf:"bytes,10,opt,name=log_file,json=logFile" json:"log_file,omitempty"` - Ps *CriuPageServerInfo `protobuf:"bytes,11,opt,name=ps" json:"ps,omitempty"` - NotifyScripts *bool `protobuf:"varint,12,opt,name=notify_scripts,json=notifyScripts" json:"notify_scripts,omitempty"` - Root *string `protobuf:"bytes,13,opt,name=root" json:"root,omitempty"` - ParentImg *string `protobuf:"bytes,14,opt,name=parent_img,json=parentImg" json:"parent_img,omitempty"` - TrackMem *bool `protobuf:"varint,15,opt,name=track_mem,json=trackMem" json:"track_mem,omitempty"` - AutoDedup *bool `protobuf:"varint,16,opt,name=auto_dedup,json=autoDedup" json:"auto_dedup,omitempty"` - WorkDirFd *int32 `protobuf:"varint,17,opt,name=work_dir_fd,json=workDirFd" json:"work_dir_fd,omitempty"` - LinkRemap *bool `protobuf:"varint,18,opt,name=link_remap,json=linkRemap" json:"link_remap,omitempty"` - Veths []*CriuVethPair `protobuf:"bytes,19,rep,name=veths" json:"veths,omitempty"` - CpuCap *uint32 `protobuf:"varint,20,opt,name=cpu_cap,json=cpuCap,def=4294967295" json:"cpu_cap,omitempty"` - ForceIrmap *bool `protobuf:"varint,21,opt,name=force_irmap,json=forceIrmap" json:"force_irmap,omitempty"` - ExecCmd []string `protobuf:"bytes,22,rep,name=exec_cmd,json=execCmd" json:"exec_cmd,omitempty"` - ExtMnt []*ExtMountMap `protobuf:"bytes,23,rep,name=ext_mnt,json=extMnt" json:"ext_mnt,omitempty"` - ManageCgroups *bool `protobuf:"varint,24,opt,name=manage_cgroups,json=manageCgroups" json:"manage_cgroups,omitempty"` - CgRoot []*CgroupRoot `protobuf:"bytes,25,rep,name=cg_root,json=cgRoot" json:"cg_root,omitempty"` - RstSibling *bool `protobuf:"varint,26,opt,name=rst_sibling,json=rstSibling" json:"rst_sibling,omitempty"` - InheritFd []*InheritFd `protobuf:"bytes,27,rep,name=inherit_fd,json=inheritFd" json:"inherit_fd,omitempty"` - AutoExtMnt *bool `protobuf:"varint,28,opt,name=auto_ext_mnt,json=autoExtMnt" json:"auto_ext_mnt,omitempty"` - ExtSharing *bool `protobuf:"varint,29,opt,name=ext_sharing,json=extSharing" json:"ext_sharing,omitempty"` - ExtMasters *bool `protobuf:"varint,30,opt,name=ext_masters,json=extMasters" json:"ext_masters,omitempty"` - SkipMnt []string `protobuf:"bytes,31,rep,name=skip_mnt,json=skipMnt" json:"skip_mnt,omitempty"` - EnableFs []string `protobuf:"bytes,32,rep,name=enable_fs,json=enableFs" json:"enable_fs,omitempty"` - UnixSkIno []*UnixSk `protobuf:"bytes,33,rep,name=unix_sk_ino,json=unixSkIno" json:"unix_sk_ino,omitempty"` - ManageCgroupsMode *CriuCgMode `protobuf:"varint,34,opt,name=manage_cgroups_mode,json=manageCgroupsMode,enum=CriuCgMode" json:"manage_cgroups_mode,omitempty"` - GhostLimit *uint32 `protobuf:"varint,35,opt,name=ghost_limit,json=ghostLimit,def=1048576" json:"ghost_limit,omitempty"` - IrmapScanPaths []string `protobuf:"bytes,36,rep,name=irmap_scan_paths,json=irmapScanPaths" json:"irmap_scan_paths,omitempty"` - External []string `protobuf:"bytes,37,rep,name=external" json:"external,omitempty"` - EmptyNs *uint32 `protobuf:"varint,38,opt,name=empty_ns,json=emptyNs" json:"empty_ns,omitempty"` - JoinNs []*JoinNamespace `protobuf:"bytes,39,rep,name=join_ns,json=joinNs" json:"join_ns,omitempty"` - CgroupProps *string `protobuf:"bytes,41,opt,name=cgroup_props,json=cgroupProps" json:"cgroup_props,omitempty"` - CgroupPropsFile *string `protobuf:"bytes,42,opt,name=cgroup_props_file,json=cgroupPropsFile" json:"cgroup_props_file,omitempty"` - CgroupDumpController []string `protobuf:"bytes,43,rep,name=cgroup_dump_controller,json=cgroupDumpController" json:"cgroup_dump_controller,omitempty"` - FreezeCgroup *string `protobuf:"bytes,44,opt,name=freeze_cgroup,json=freezeCgroup" json:"freeze_cgroup,omitempty"` - Timeout *uint32 `protobuf:"varint,45,opt,name=timeout" json:"timeout,omitempty"` - TcpSkipInFlight *bool `protobuf:"varint,46,opt,name=tcp_skip_in_flight,json=tcpSkipInFlight" json:"tcp_skip_in_flight,omitempty"` - WeakSysctls *bool `protobuf:"varint,47,opt,name=weak_sysctls,json=weakSysctls" json:"weak_sysctls,omitempty"` - LazyPages *bool `protobuf:"varint,48,opt,name=lazy_pages,json=lazyPages" json:"lazy_pages,omitempty"` - StatusFd *int32 `protobuf:"varint,49,opt,name=status_fd,json=statusFd" json:"status_fd,omitempty"` - OrphanPtsMaster *bool `protobuf:"varint,50,opt,name=orphan_pts_master,json=orphanPtsMaster" json:"orphan_pts_master,omitempty"` - ConfigFile *string `protobuf:"bytes,51,opt,name=config_file,json=configFile" json:"config_file,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CriuOpts) Reset() { *m = CriuOpts{} } -func (m *CriuOpts) String() string { return proto.CompactTextString(m) } -func (*CriuOpts) ProtoMessage() {} -func (*CriuOpts) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } - -const Default_CriuOpts_LogLevel int32 = 2 -const Default_CriuOpts_CpuCap uint32 = 4294967295 -const Default_CriuOpts_GhostLimit uint32 = 1048576 - -func (m *CriuOpts) GetImagesDirFd() int32 { - if m != nil && m.ImagesDirFd != nil { - return *m.ImagesDirFd - } - return 0 -} - -func (m *CriuOpts) GetPid() int32 { - if m != nil && m.Pid != nil { - return *m.Pid - } - return 0 -} - -func (m *CriuOpts) GetLeaveRunning() bool { - if m != nil && m.LeaveRunning != nil { - return *m.LeaveRunning - } - return false -} - -func (m *CriuOpts) GetExtUnixSk() bool { - if m != nil && m.ExtUnixSk != nil { - return *m.ExtUnixSk - } - return false -} - -func (m *CriuOpts) GetTcpEstablished() bool { - if m != nil && m.TcpEstablished != nil { - return *m.TcpEstablished - } - return false -} - -func (m *CriuOpts) GetEvasiveDevices() bool { - if m != nil && m.EvasiveDevices != nil { - return *m.EvasiveDevices - } - return false -} - -func (m *CriuOpts) GetShellJob() bool { - if m != nil && m.ShellJob != nil { - return *m.ShellJob - } - return false -} - -func (m *CriuOpts) GetFileLocks() bool { - if m != nil && m.FileLocks != nil { - return *m.FileLocks - } - return false -} - -func (m *CriuOpts) GetLogLevel() int32 { - if m != nil && m.LogLevel != nil { - return *m.LogLevel - } - return Default_CriuOpts_LogLevel -} - -func (m *CriuOpts) GetLogFile() string { - if m != nil && m.LogFile != nil { - return *m.LogFile - } - return "" -} - -func (m *CriuOpts) GetPs() *CriuPageServerInfo { - if m != nil { - return m.Ps - } - return nil -} - -func (m *CriuOpts) GetNotifyScripts() bool { - if m != nil && m.NotifyScripts != nil { - return *m.NotifyScripts - } - return false -} - -func (m *CriuOpts) GetRoot() string { - if m != nil && m.Root != nil { - return *m.Root - } - return "" -} - -func (m *CriuOpts) GetParentImg() string { - if m != nil && m.ParentImg != nil { - return *m.ParentImg - } - return "" -} - -func (m *CriuOpts) GetTrackMem() bool { - if m != nil && m.TrackMem != nil { - return *m.TrackMem - } - return false -} - -func (m *CriuOpts) GetAutoDedup() bool { - if m != nil && m.AutoDedup != nil { - return *m.AutoDedup - } - return false -} - -func (m *CriuOpts) GetWorkDirFd() int32 { - if m != nil && m.WorkDirFd != nil { - return *m.WorkDirFd - } - return 0 -} - -func (m *CriuOpts) GetLinkRemap() bool { - if m != nil && m.LinkRemap != nil { - return *m.LinkRemap - } - return false -} - -func (m *CriuOpts) GetVeths() []*CriuVethPair { - if m != nil { - return m.Veths - } - return nil -} - -func (m *CriuOpts) GetCpuCap() uint32 { - if m != nil && m.CpuCap != nil { - return *m.CpuCap - } - return Default_CriuOpts_CpuCap -} - -func (m *CriuOpts) GetForceIrmap() bool { - if m != nil && m.ForceIrmap != nil { - return *m.ForceIrmap - } - return false -} - -func (m *CriuOpts) GetExecCmd() []string { - if m != nil { - return m.ExecCmd - } - return nil -} - -func (m *CriuOpts) GetExtMnt() []*ExtMountMap { - if m != nil { - return m.ExtMnt - } - return nil -} - -func (m *CriuOpts) GetManageCgroups() bool { - if m != nil && m.ManageCgroups != nil { - return *m.ManageCgroups - } - return false -} - -func (m *CriuOpts) GetCgRoot() []*CgroupRoot { - if m != nil { - return m.CgRoot - } - return nil -} - -func (m *CriuOpts) GetRstSibling() bool { - if m != nil && m.RstSibling != nil { - return *m.RstSibling - } - return false -} - -func (m *CriuOpts) GetInheritFd() []*InheritFd { - if m != nil { - return m.InheritFd - } - return nil -} - -func (m *CriuOpts) GetAutoExtMnt() bool { - if m != nil && m.AutoExtMnt != nil { - return *m.AutoExtMnt - } - return false -} - -func (m *CriuOpts) GetExtSharing() bool { - if m != nil && m.ExtSharing != nil { - return *m.ExtSharing - } - return false -} - -func (m *CriuOpts) GetExtMasters() bool { - if m != nil && m.ExtMasters != nil { - return *m.ExtMasters - } - return false -} - -func (m *CriuOpts) GetSkipMnt() []string { - if m != nil { - return m.SkipMnt - } - return nil -} - -func (m *CriuOpts) GetEnableFs() []string { - if m != nil { - return m.EnableFs - } - return nil -} - -func (m *CriuOpts) GetUnixSkIno() []*UnixSk { - if m != nil { - return m.UnixSkIno - } - return nil -} - -func (m *CriuOpts) GetManageCgroupsMode() CriuCgMode { - if m != nil && m.ManageCgroupsMode != nil { - return *m.ManageCgroupsMode - } - return CriuCgMode_IGNORE -} - -func (m *CriuOpts) GetGhostLimit() uint32 { - if m != nil && m.GhostLimit != nil { - return *m.GhostLimit - } - return Default_CriuOpts_GhostLimit -} - -func (m *CriuOpts) GetIrmapScanPaths() []string { - if m != nil { - return m.IrmapScanPaths - } - return nil -} - -func (m *CriuOpts) GetExternal() []string { - if m != nil { - return m.External - } - return nil -} - -func (m *CriuOpts) GetEmptyNs() uint32 { - if m != nil && m.EmptyNs != nil { - return *m.EmptyNs - } - return 0 -} - -func (m *CriuOpts) GetJoinNs() []*JoinNamespace { - if m != nil { - return m.JoinNs - } - return nil -} - -func (m *CriuOpts) GetCgroupProps() string { - if m != nil && m.CgroupProps != nil { - return *m.CgroupProps - } - return "" -} - -func (m *CriuOpts) GetCgroupPropsFile() string { - if m != nil && m.CgroupPropsFile != nil { - return *m.CgroupPropsFile - } - return "" -} - -func (m *CriuOpts) GetCgroupDumpController() []string { - if m != nil { - return m.CgroupDumpController - } - return nil -} - -func (m *CriuOpts) GetFreezeCgroup() string { - if m != nil && m.FreezeCgroup != nil { - return *m.FreezeCgroup - } - return "" -} - -func (m *CriuOpts) GetTimeout() uint32 { - if m != nil && m.Timeout != nil { - return *m.Timeout - } - return 0 -} - -func (m *CriuOpts) GetTcpSkipInFlight() bool { - if m != nil && m.TcpSkipInFlight != nil { - return *m.TcpSkipInFlight - } - return false -} - -func (m *CriuOpts) GetWeakSysctls() bool { - if m != nil && m.WeakSysctls != nil { - return *m.WeakSysctls - } - return false -} - -func (m *CriuOpts) GetLazyPages() bool { - if m != nil && m.LazyPages != nil { - return *m.LazyPages - } - return false -} - -func (m *CriuOpts) GetStatusFd() int32 { - if m != nil && m.StatusFd != nil { - return *m.StatusFd - } - return 0 -} - -func (m *CriuOpts) GetOrphanPtsMaster() bool { - if m != nil && m.OrphanPtsMaster != nil { - return *m.OrphanPtsMaster - } - return false -} - -func (m *CriuOpts) GetConfigFile() string { - if m != nil && m.ConfigFile != nil { - return *m.ConfigFile - } - return "" -} - -type CriuDumpResp struct { - Restored *bool `protobuf:"varint,1,opt,name=restored" json:"restored,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CriuDumpResp) Reset() { *m = CriuDumpResp{} } -func (m *CriuDumpResp) String() string { return proto.CompactTextString(m) } -func (*CriuDumpResp) ProtoMessage() {} -func (*CriuDumpResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } - -func (m *CriuDumpResp) GetRestored() bool { - if m != nil && m.Restored != nil { - return *m.Restored - } - return false -} - -type CriuRestoreResp struct { - Pid *int32 `protobuf:"varint,1,req,name=pid" json:"pid,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CriuRestoreResp) Reset() { *m = CriuRestoreResp{} } -func (m *CriuRestoreResp) String() string { return proto.CompactTextString(m) } -func (*CriuRestoreResp) ProtoMessage() {} -func (*CriuRestoreResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } - -func (m *CriuRestoreResp) GetPid() int32 { - if m != nil && m.Pid != nil { - return *m.Pid - } - return 0 -} - -type CriuNotify struct { - Script *string `protobuf:"bytes,1,opt,name=script" json:"script,omitempty"` - Pid *int32 `protobuf:"varint,2,opt,name=pid" json:"pid,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CriuNotify) Reset() { *m = CriuNotify{} } -func (m *CriuNotify) String() string { return proto.CompactTextString(m) } -func (*CriuNotify) ProtoMessage() {} -func (*CriuNotify) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } - -func (m *CriuNotify) GetScript() string { - if m != nil && m.Script != nil { - return *m.Script - } - return "" -} - -func (m *CriuNotify) GetPid() int32 { - if m != nil && m.Pid != nil { - return *m.Pid - } - return 0 -} - -// -// List of features which can queried via -// CRIU_REQ_TYPE__FEATURE_CHECK -type CriuFeatures struct { - MemTrack *bool `protobuf:"varint,1,opt,name=mem_track,json=memTrack" json:"mem_track,omitempty"` - LazyPages *bool `protobuf:"varint,2,opt,name=lazy_pages,json=lazyPages" json:"lazy_pages,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CriuFeatures) Reset() { *m = CriuFeatures{} } -func (m *CriuFeatures) String() string { return proto.CompactTextString(m) } -func (*CriuFeatures) ProtoMessage() {} -func (*CriuFeatures) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } - -func (m *CriuFeatures) GetMemTrack() bool { - if m != nil && m.MemTrack != nil { - return *m.MemTrack - } - return false -} - -func (m *CriuFeatures) GetLazyPages() bool { - if m != nil && m.LazyPages != nil { - return *m.LazyPages - } - return false -} - -type CriuReq struct { - Type *CriuReqType `protobuf:"varint,1,req,name=type,enum=CriuReqType" json:"type,omitempty"` - Opts *CriuOpts `protobuf:"bytes,2,opt,name=opts" json:"opts,omitempty"` - NotifySuccess *bool `protobuf:"varint,3,opt,name=notify_success,json=notifySuccess" json:"notify_success,omitempty"` - // - // When set service won't close the connection but - // will wait for more req-s to appear. Works not - // for all request types. - KeepOpen *bool `protobuf:"varint,4,opt,name=keep_open,json=keepOpen" json:"keep_open,omitempty"` - // - // 'features' can be used to query which features - // are supported by the installed criu/kernel - // via RPC. - Features *CriuFeatures `protobuf:"bytes,5,opt,name=features" json:"features,omitempty"` - // 'pid' is used for WAIT_PID - Pid *uint32 `protobuf:"varint,6,opt,name=pid" json:"pid,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CriuReq) Reset() { *m = CriuReq{} } -func (m *CriuReq) String() string { return proto.CompactTextString(m) } -func (*CriuReq) ProtoMessage() {} -func (*CriuReq) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } - -func (m *CriuReq) GetType() CriuReqType { - if m != nil && m.Type != nil { - return *m.Type - } - return CriuReqType_EMPTY -} - -func (m *CriuReq) GetOpts() *CriuOpts { - if m != nil { - return m.Opts - } - return nil -} - -func (m *CriuReq) GetNotifySuccess() bool { - if m != nil && m.NotifySuccess != nil { - return *m.NotifySuccess - } - return false -} - -func (m *CriuReq) GetKeepOpen() bool { - if m != nil && m.KeepOpen != nil { - return *m.KeepOpen - } - return false -} - -func (m *CriuReq) GetFeatures() *CriuFeatures { - if m != nil { - return m.Features - } - return nil -} - -func (m *CriuReq) GetPid() uint32 { - if m != nil && m.Pid != nil { - return *m.Pid - } - return 0 -} - -type CriuResp struct { - Type *CriuReqType `protobuf:"varint,1,req,name=type,enum=CriuReqType" json:"type,omitempty"` - Success *bool `protobuf:"varint,2,req,name=success" json:"success,omitempty"` - Dump *CriuDumpResp `protobuf:"bytes,3,opt,name=dump" json:"dump,omitempty"` - Restore *CriuRestoreResp `protobuf:"bytes,4,opt,name=restore" json:"restore,omitempty"` - Notify *CriuNotify `protobuf:"bytes,5,opt,name=notify" json:"notify,omitempty"` - Ps *CriuPageServerInfo `protobuf:"bytes,6,opt,name=ps" json:"ps,omitempty"` - CrErrno *int32 `protobuf:"varint,7,opt,name=cr_errno,json=crErrno" json:"cr_errno,omitempty"` - Features *CriuFeatures `protobuf:"bytes,8,opt,name=features" json:"features,omitempty"` - CrErrmsg *string `protobuf:"bytes,9,opt,name=cr_errmsg,json=crErrmsg" json:"cr_errmsg,omitempty"` - Version *CriuVersion `protobuf:"bytes,10,opt,name=version" json:"version,omitempty"` - Status *int32 `protobuf:"varint,11,opt,name=status" json:"status,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CriuResp) Reset() { *m = CriuResp{} } -func (m *CriuResp) String() string { return proto.CompactTextString(m) } -func (*CriuResp) ProtoMessage() {} -func (*CriuResp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } - -func (m *CriuResp) GetType() CriuReqType { - if m != nil && m.Type != nil { - return *m.Type - } - return CriuReqType_EMPTY -} - -func (m *CriuResp) GetSuccess() bool { - if m != nil && m.Success != nil { - return *m.Success - } - return false -} - -func (m *CriuResp) GetDump() *CriuDumpResp { - if m != nil { - return m.Dump - } - return nil -} - -func (m *CriuResp) GetRestore() *CriuRestoreResp { - if m != nil { - return m.Restore - } - return nil -} - -func (m *CriuResp) GetNotify() *CriuNotify { - if m != nil { - return m.Notify - } - return nil -} - -func (m *CriuResp) GetPs() *CriuPageServerInfo { - if m != nil { - return m.Ps - } - return nil -} - -func (m *CriuResp) GetCrErrno() int32 { - if m != nil && m.CrErrno != nil { - return *m.CrErrno - } - return 0 -} - -func (m *CriuResp) GetFeatures() *CriuFeatures { - if m != nil { - return m.Features - } - return nil -} - -func (m *CriuResp) GetCrErrmsg() string { - if m != nil && m.CrErrmsg != nil { - return *m.CrErrmsg - } - return "" -} - -func (m *CriuResp) GetVersion() *CriuVersion { - if m != nil { - return m.Version - } - return nil -} - -func (m *CriuResp) GetStatus() int32 { - if m != nil && m.Status != nil { - return *m.Status - } - return 0 -} - -// Answer for criu_req_type.VERSION requests -type CriuVersion struct { - Major *int32 `protobuf:"varint,1,req,name=major" json:"major,omitempty"` - Minor *int32 `protobuf:"varint,2,req,name=minor" json:"minor,omitempty"` - Gitid *string `protobuf:"bytes,3,opt,name=gitid" json:"gitid,omitempty"` - Sublevel *int32 `protobuf:"varint,4,opt,name=sublevel" json:"sublevel,omitempty"` - Extra *int32 `protobuf:"varint,5,opt,name=extra" json:"extra,omitempty"` - Name *string `protobuf:"bytes,6,opt,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CriuVersion) Reset() { *m = CriuVersion{} } -func (m *CriuVersion) String() string { return proto.CompactTextString(m) } -func (*CriuVersion) ProtoMessage() {} -func (*CriuVersion) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } - -func (m *CriuVersion) GetMajor() int32 { - if m != nil && m.Major != nil { - return *m.Major - } - return 0 -} - -func (m *CriuVersion) GetMinor() int32 { - if m != nil && m.Minor != nil { - return *m.Minor - } - return 0 -} - -func (m *CriuVersion) GetGitid() string { - if m != nil && m.Gitid != nil { - return *m.Gitid - } - return "" -} - -func (m *CriuVersion) GetSublevel() int32 { - if m != nil && m.Sublevel != nil { - return *m.Sublevel - } - return 0 -} - -func (m *CriuVersion) GetExtra() int32 { - if m != nil && m.Extra != nil { - return *m.Extra - } - return 0 -} - -func (m *CriuVersion) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func init() { - proto.RegisterType((*CriuPageServerInfo)(nil), "criu_page_server_info") - proto.RegisterType((*CriuVethPair)(nil), "criu_veth_pair") - proto.RegisterType((*ExtMountMap)(nil), "ext_mount_map") - proto.RegisterType((*JoinNamespace)(nil), "join_namespace") - proto.RegisterType((*InheritFd)(nil), "inherit_fd") - proto.RegisterType((*CgroupRoot)(nil), "cgroup_root") - proto.RegisterType((*UnixSk)(nil), "unix_sk") - proto.RegisterType((*CriuOpts)(nil), "criu_opts") - proto.RegisterType((*CriuDumpResp)(nil), "criu_dump_resp") - proto.RegisterType((*CriuRestoreResp)(nil), "criu_restore_resp") - proto.RegisterType((*CriuNotify)(nil), "criu_notify") - proto.RegisterType((*CriuFeatures)(nil), "criu_features") - proto.RegisterType((*CriuReq)(nil), "criu_req") - proto.RegisterType((*CriuResp)(nil), "criu_resp") - proto.RegisterType((*CriuVersion)(nil), "criu_version") - proto.RegisterEnum("CriuCgMode", CriuCgMode_name, CriuCgMode_value) - proto.RegisterEnum("CriuReqType", CriuReqType_name, CriuReqType_value) -} - -func init() { proto.RegisterFile("rpc/rpc.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 1835 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xeb, 0x72, 0x5b, 0xb7, - 0x11, 0x0e, 0x29, 0xf1, 0x06, 0x5e, 0x7c, 0x0c, 0x5f, 0x02, 0xc7, 0xb5, 0xad, 0xd0, 0x51, 0xa2, - 0x2a, 0x2e, 0x93, 0x30, 0x76, 0x5c, 0x67, 0xda, 0x1f, 0x1e, 0x8a, 0x74, 0xd8, 0x48, 0x22, 0x07, - 0xa4, 0xdc, 0xc9, 0x2f, 0xcc, 0xd1, 0x39, 0x20, 0x05, 0xf3, 0xdc, 0x0a, 0x80, 0x8a, 0xe4, 0x97, - 0xe8, 0xbf, 0x3e, 0x57, 0xde, 0xa4, 0xaf, 0xd0, 0xd9, 0x05, 0x28, 0x4b, 0x49, 0x66, 0xd2, 0x7f, - 0xd8, 0x0f, 0xbb, 0xc0, 0xde, 0x77, 0x49, 0x5b, 0x17, 0xd1, 0x57, 0xba, 0x88, 0x7a, 0x85, 0xce, - 0x6d, 0xde, 0x5d, 0x92, 0x7b, 0x91, 0x56, 0x6b, 0x51, 0x84, 0x4b, 0x29, 0x8c, 0xd4, 0xe7, 0x52, - 0x0b, 0x95, 0x2d, 0x72, 0xca, 0x48, 0x2d, 0x8c, 0x63, 0x2d, 0x8d, 0x61, 0xa5, 0x9d, 0xd2, 0x5e, - 0x83, 0x6f, 0x48, 0x4a, 0xc9, 0x76, 0x91, 0x6b, 0xcb, 0xca, 0x3b, 0xa5, 0xbd, 0x0a, 0xc7, 0x33, - 0x0d, 0xc8, 0x56, 0xa1, 0x62, 0xb6, 0x85, 0x10, 0x1c, 0x69, 0x87, 0x94, 0x17, 0x31, 0xdb, 0x46, - 0xa0, 0xbc, 0x88, 0xbb, 0x7f, 0x23, 0x1d, 0xfc, 0xe8, 0x5c, 0xda, 0x33, 0x51, 0x84, 0x4a, 0xd3, - 0x3b, 0xa4, 0xa2, 0x16, 0x42, 0x65, 0xac, 0xb4, 0x53, 0xde, 0x6b, 0xf0, 0x6d, 0xb5, 0x18, 0x67, - 0xf4, 0x1e, 0xa9, 0xaa, 0x85, 0xc8, 0xd7, 0xf0, 0x3c, 0xa0, 0x15, 0xb5, 0x98, 0xac, 0x6d, 0xf7, - 0x5b, 0xd2, 0x96, 0x17, 0x56, 0xa4, 0xf9, 0x3a, 0xb3, 0x22, 0x0d, 0x0b, 0xf8, 0x70, 0x25, 0x2f, - 0xbd, 0x28, 0x1c, 0x01, 0x39, 0x0f, 0x13, 0x2f, 0x06, 0xc7, 0xee, 0x5b, 0xd2, 0x79, 0x97, 0xab, - 0x4c, 0x64, 0x61, 0x2a, 0x4d, 0x11, 0x46, 0x12, 0x94, 0xca, 0x8c, 0x17, 0x2a, 0x67, 0x86, 0x7e, - 0x4c, 0x6a, 0x99, 0x11, 0x0b, 0x95, 0x48, 0x2f, 0x57, 0xcd, 0xcc, 0x48, 0x25, 0x92, 0x3e, 0x24, - 0x0d, 0x79, 0x61, 0x75, 0x28, 0xf2, 0xc2, 0xa2, 0x55, 0x0d, 0x5e, 0x47, 0x60, 0x52, 0xd8, 0x6e, - 0x8f, 0x10, 0x95, 0x9d, 0x49, 0xad, 0xac, 0x58, 0xc4, 0xbf, 0xa3, 0x89, 0x33, 0x1d, 0x1e, 0x74, - 0xa6, 0xbf, 0x20, 0xcd, 0x68, 0xa9, 0xf3, 0x75, 0x21, 0x74, 0x9e, 0x5b, 0xf0, 0x5f, 0x64, 0x75, - 0xe2, 0xdd, 0x8a, 0x67, 0xf4, 0x69, 0x68, 0xcf, 0xbc, 0x16, 0x78, 0xee, 0x3e, 0x21, 0xb5, 0x75, - 0xa6, 0x2e, 0x84, 0x59, 0xd1, 0xbb, 0xa4, 0xa2, 0xb2, 0x3c, 0x96, 0xf8, 0x4b, 0x9b, 0x3b, 0xa2, - 0xfb, 0xdf, 0x36, 0x69, 0xa0, 0x4f, 0xf3, 0xc2, 0x1a, 0xda, 0x25, 0x6d, 0x95, 0x86, 0x4b, 0x69, - 0x44, 0xac, 0xb4, 0x58, 0xc4, 0xc8, 0x5b, 0xe1, 0x4d, 0x07, 0x1e, 0x28, 0x3d, 0x8a, 0x37, 0x61, - 0x2a, 0x7f, 0x08, 0xd3, 0x53, 0xd2, 0x4e, 0x64, 0x78, 0x2e, 0x85, 0x5e, 0x67, 0x99, 0xca, 0x96, - 0x68, 0x6c, 0x9d, 0xb7, 0x10, 0xe4, 0x0e, 0xa3, 0x8f, 0x49, 0x13, 0xbc, 0xef, 0xb5, 0xc1, 0xa0, - 0xd6, 0x39, 0x38, 0xe8, 0x24, 0x53, 0x17, 0xb3, 0x15, 0xfd, 0x82, 0xdc, 0xb2, 0x51, 0x21, 0xa4, - 0xb1, 0xe1, 0x69, 0xa2, 0xcc, 0x99, 0x8c, 0x59, 0x05, 0x79, 0x3a, 0x36, 0x2a, 0x86, 0x1f, 0x50, - 0x60, 0x94, 0xe7, 0xa1, 0x51, 0xe7, 0x52, 0xc4, 0xf2, 0x5c, 0x45, 0xd2, 0xb0, 0xaa, 0x63, 0xf4, - 0xf0, 0x81, 0x43, 0xc1, 0xff, 0xe6, 0x4c, 0x26, 0x89, 0x78, 0x97, 0x9f, 0xb2, 0x1a, 0xb2, 0xd4, - 0x11, 0xf8, 0x47, 0x7e, 0x4a, 0x1f, 0x11, 0x02, 0x21, 0x13, 0x49, 0x1e, 0xad, 0x0c, 0xab, 0x3b, - 0x6d, 0x00, 0x39, 0x04, 0x80, 0x3e, 0x26, 0x8d, 0x24, 0x5f, 0x8a, 0x44, 0x9e, 0xcb, 0x84, 0x35, - 0xc0, 0xd4, 0xef, 0x4b, 0x7d, 0x5e, 0x4f, 0xf2, 0xe5, 0x21, 0x40, 0xf4, 0x01, 0x81, 0xb3, 0x8b, - 0x3a, 0x71, 0xa9, 0x9d, 0xe4, 0x4b, 0x0c, 0xfb, 0xe7, 0xa4, 0x5c, 0x18, 0xd6, 0xdc, 0x29, 0xed, - 0x35, 0xfb, 0xf7, 0x7b, 0xbf, 0x5b, 0x18, 0xbc, 0x5c, 0x18, 0xba, 0x4b, 0x3a, 0x59, 0x6e, 0xd5, - 0xe2, 0x52, 0x98, 0x48, 0xab, 0xc2, 0x1a, 0xd6, 0x42, 0x2d, 0xda, 0x0e, 0x9d, 0x39, 0x10, 0xa2, - 0x0a, 0x11, 0x67, 0x6d, 0x17, 0x69, 0x8c, 0xfe, 0x23, 0x42, 0x8a, 0x50, 0xcb, 0xcc, 0x0a, 0x95, - 0x2e, 0x59, 0x07, 0x6f, 0x1a, 0x0e, 0x19, 0xa7, 0x4b, 0x30, 0xdc, 0xea, 0x30, 0x5a, 0x89, 0x54, - 0xa6, 0xec, 0x96, 0x33, 0x1c, 0x81, 0x23, 0x99, 0x82, 0x6c, 0xb8, 0xb6, 0xb9, 0x88, 0x65, 0xbc, - 0x2e, 0x58, 0xe0, 0x0c, 0x07, 0xe4, 0x00, 0x00, 0x08, 0xd3, 0xcf, 0xb9, 0x5e, 0x6d, 0xe2, 0x7f, - 0x1b, 0xa3, 0xdc, 0x00, 0xc8, 0x45, 0xff, 0x11, 0x21, 0x89, 0xca, 0x56, 0x42, 0xcb, 0x34, 0x2c, - 0x18, 0x75, 0xe2, 0x80, 0x70, 0x00, 0xe8, 0x2e, 0xa9, 0x40, 0x71, 0x1a, 0x76, 0x67, 0x67, 0x6b, - 0xaf, 0xd9, 0xbf, 0xd5, 0xbb, 0x59, 0xaf, 0xdc, 0xdd, 0xd2, 0xa7, 0xa4, 0x16, 0x15, 0x6b, 0x11, - 0x85, 0x05, 0xbb, 0xbb, 0x53, 0xda, 0x6b, 0x7f, 0x4f, 0x9e, 0xf7, 0x5f, 0x3d, 0x7f, 0xf5, 0xdd, - 0xcb, 0xfe, 0xab, 0x17, 0xbc, 0x1a, 0x15, 0xeb, 0x41, 0x58, 0xd0, 0x27, 0xa4, 0xb9, 0xc8, 0x75, - 0x24, 0x85, 0xd2, 0xf0, 0xd7, 0x3d, 0xfc, 0x8b, 0x20, 0x34, 0x06, 0x04, 0x82, 0x20, 0x2f, 0x64, - 0x24, 0xa2, 0x34, 0x66, 0xf7, 0x77, 0xb6, 0x20, 0x08, 0x40, 0x0f, 0x52, 0x48, 0x92, 0x1a, 0xd6, - 0x7a, 0x66, 0xd9, 0xc7, 0xa8, 0x49, 0xa7, 0x77, 0xa3, 0xf6, 0x79, 0x55, 0x5e, 0xd8, 0xa3, 0xcc, - 0x42, 0x14, 0xd2, 0x30, 0x83, 0xf8, 0xb8, 0xf2, 0x32, 0x8c, 0xb9, 0x28, 0x38, 0x74, 0xe0, 0x40, - 0xba, 0x4b, 0x6a, 0xd1, 0x12, 0x4b, 0x8f, 0x3d, 0xc0, 0xf7, 0x5a, 0xbd, 0x6b, 0xe5, 0xc8, 0xab, - 0xd1, 0x92, 0x43, 0x60, 0x9e, 0x90, 0xa6, 0x36, 0x56, 0x18, 0x75, 0x9a, 0x40, 0x1d, 0x7c, 0xe2, - 0x54, 0xd6, 0xc6, 0xce, 0x1c, 0x42, 0xf7, 0xaf, 0x97, 0x3d, 0x7b, 0x88, 0x4f, 0x35, 0x7b, 0x1f, - 0x20, 0xde, 0xf0, 0xe7, 0x51, 0x4c, 0x77, 0x48, 0x0b, 0x23, 0xb5, 0x31, 0xe4, 0x4f, 0xee, 0x35, - 0xc0, 0x86, 0x4e, 0xf9, 0x27, 0xae, 0xa6, 0xcc, 0x59, 0xa8, 0xe1, 0xbb, 0x47, 0x8e, 0x41, 0x5e, - 0xd8, 0x99, 0x43, 0x36, 0x0c, 0x69, 0x68, 0xac, 0xd4, 0x86, 0x3d, 0xbe, 0x62, 0x38, 0x72, 0x08, - 0xb8, 0xd0, 0xac, 0x54, 0x81, 0xef, 0x3f, 0x71, 0x2e, 0x04, 0x1a, 0x1e, 0x87, 0xf6, 0x95, 0x85, - 0xa7, 0x89, 0x14, 0x0b, 0xc3, 0x76, 0xf0, 0xae, 0xee, 0x80, 0x91, 0xa1, 0x7b, 0xa4, 0xe9, 0x2b, - 0x59, 0xa8, 0x2c, 0x67, 0x9f, 0xa2, 0x21, 0xf5, 0x9e, 0xc7, 0x78, 0x63, 0x8d, 0x45, 0x3d, 0xce, - 0x72, 0xfa, 0x77, 0x72, 0xe7, 0xa6, 0x83, 0x45, 0x0a, 0x4d, 0xa8, 0xbb, 0x53, 0xda, 0xeb, 0xf4, - 0xdb, 0x2e, 0x3f, 0xa2, 0x25, 0x82, 0xfc, 0xf6, 0x0d, 0xa7, 0x1f, 0xe5, 0xb1, 0x84, 0x8f, 0x96, - 0x67, 0xb9, 0xb1, 0x22, 0x51, 0xa9, 0xb2, 0xec, 0x29, 0x66, 0x4b, 0xed, 0x9b, 0xaf, 0x9f, 0xff, - 0xf5, 0xc5, 0xcb, 0xef, 0x38, 0xc1, 0xbb, 0x43, 0xb8, 0xa2, 0x7b, 0x24, 0xc0, 0x44, 0x11, 0x26, - 0x0a, 0x33, 0x01, 0xdd, 0xcf, 0xb0, 0xcf, 0x50, 0xed, 0x0e, 0xe2, 0xb3, 0x28, 0xcc, 0xa6, 0x80, - 0xd2, 0x4f, 0x20, 0x6f, 0xac, 0xd4, 0x59, 0x98, 0xb0, 0x5d, 0x6f, 0x98, 0xa7, 0x31, 0xa7, 0xd2, - 0xc2, 0x5e, 0x8a, 0xcc, 0xb0, 0xcf, 0xe1, 0x33, 0x5e, 0x43, 0xfa, 0x18, 0x6c, 0xae, 0xb9, 0x51, - 0x60, 0xd8, 0x17, 0x3e, 0xbb, 0x6f, 0x8e, 0x06, 0x5e, 0x05, 0xfa, 0xd8, 0xd0, 0x4f, 0x49, 0xcb, - 0x67, 0x47, 0xa1, 0xf3, 0xc2, 0xb0, 0x3f, 0x63, 0x85, 0xfa, 0x06, 0x3e, 0x05, 0x88, 0xee, 0x93, - 0xdb, 0xd7, 0x59, 0x5c, 0x27, 0xd9, 0x47, 0xbe, 0x5b, 0xd7, 0xf8, 0xb0, 0xa3, 0x3c, 0x27, 0xf7, - 0x3d, 0x6f, 0xbc, 0x4e, 0x0b, 0x11, 0xe5, 0x99, 0xd5, 0x79, 0x92, 0x48, 0xcd, 0xbe, 0x44, 0xed, - 0xef, 0xba, 0xdb, 0x83, 0x75, 0x5a, 0x0c, 0xae, 0xee, 0xa0, 0x2b, 0x2f, 0xb4, 0x94, 0xef, 0x37, - 0x8e, 0x67, 0xcf, 0xf0, 0xf5, 0x96, 0x03, 0x9d, 0x8f, 0x61, 0x42, 0x5b, 0x95, 0x4a, 0x98, 0x95, - 0x7f, 0x71, 0xd6, 0x7a, 0x92, 0x7e, 0x49, 0x28, 0xf4, 0x63, 0xcc, 0x0e, 0x95, 0x89, 0x45, 0xa2, - 0x96, 0x67, 0x96, 0xf5, 0x30, 0x83, 0xa0, 0x53, 0xcf, 0x56, 0xaa, 0x18, 0x67, 0x23, 0x84, 0xc1, - 0xe0, 0x9f, 0x65, 0xb8, 0x12, 0xe6, 0xd2, 0x44, 0x36, 0x31, 0xec, 0x2b, 0x64, 0x6b, 0x02, 0x36, - 0x73, 0x10, 0x36, 0x8e, 0xf0, 0xfd, 0x25, 0xf6, 0x42, 0xc3, 0xbe, 0xf6, 0x8d, 0x23, 0x7c, 0x7f, - 0x39, 0x05, 0x00, 0x9b, 0xb5, 0x0d, 0xed, 0xda, 0x40, 0x5d, 0x7c, 0x83, 0x5d, 0xa7, 0xee, 0x80, - 0x51, 0x0c, 0xce, 0xca, 0x75, 0x71, 0x06, 0x61, 0xb5, 0xc6, 0x67, 0x33, 0xeb, 0x3b, 0x55, 0xdc, - 0xc5, 0xd4, 0x1a, 0x97, 0xd2, 0x90, 0xf2, 0x51, 0x9e, 0x2d, 0x94, 0x6f, 0xce, 0xdf, 0xa2, 0xd1, - 0xc4, 0x41, 0xe0, 0xcd, 0xee, 0x33, 0xbf, 0x44, 0xa0, 0x2f, 0xb5, 0x34, 0x05, 0xe4, 0x83, 0x96, - 0xc6, 0xe6, 0x5a, 0xc6, 0x38, 0x50, 0xeb, 0xfc, 0x8a, 0xee, 0xee, 0x92, 0xdb, 0xc8, 0xed, 0x01, - 0x27, 0xe0, 0x47, 0xa0, 0x1b, 0x8e, 0x70, 0xec, 0xbe, 0x24, 0x4d, 0x64, 0x73, 0xbd, 0x9b, 0xde, - 0x27, 0x55, 0xd7, 0xd4, 0xfd, 0x80, 0xf6, 0xd4, 0x6f, 0x67, 0x67, 0xf7, 0x47, 0xd2, 0x46, 0xc1, - 0x85, 0x0c, 0xed, 0x5a, 0x3b, 0x47, 0xa4, 0x32, 0x15, 0xd8, 0xaf, 0x37, 0xda, 0xa4, 0x32, 0x9d, - 0x03, 0xfd, 0x2b, 0x27, 0x96, 0x7f, 0xe5, 0xc4, 0xee, 0x2f, 0x25, 0x52, 0xf7, 0xda, 0xfe, 0x8b, - 0x76, 0xc9, 0xb6, 0xbd, 0x2c, 0xdc, 0xb8, 0xef, 0xf4, 0x3b, 0xbd, 0xcd, 0x85, 0x00, 0x94, 0xe3, - 0x1d, 0x7d, 0x4c, 0xb6, 0x61, 0xee, 0xe3, 0x4b, 0xcd, 0x3e, 0xe9, 0x5d, 0x6d, 0x02, 0x1c, 0xf1, - 0xeb, 0x33, 0x6a, 0x1d, 0x45, 0xb0, 0xc7, 0x6d, 0xdd, 0x98, 0x51, 0x0e, 0x04, 0x9d, 0x57, 0x52, - 0x16, 0x22, 0x2f, 0x64, 0xe6, 0x27, 0x7b, 0x1d, 0x80, 0x49, 0x21, 0x33, 0xba, 0x4f, 0xea, 0x1b, - 0xe3, 0x70, 0xa2, 0x37, 0x37, 0xba, 0x6c, 0x50, 0x7e, 0x75, 0xbf, 0xf1, 0x4f, 0x15, 0x53, 0x11, - 0xfd, 0xf3, 0xef, 0x2d, 0xbf, 0x9f, 0xa0, 0xe3, 0xff, 0x1f, 0x9b, 0x18, 0xa9, 0x6d, 0x94, 0x85, - 0x4d, 0xa8, 0xce, 0x37, 0x24, 0x7d, 0x4a, 0xb6, 0x21, 0xe8, 0x68, 0xc3, 0xd5, 0x6c, 0xba, 0x4a, - 0x03, 0x8e, 0x97, 0xf4, 0x19, 0xa9, 0xf9, 0x58, 0xa3, 0x25, 0xcd, 0x3e, 0xed, 0xfd, 0x26, 0x01, - 0xf8, 0x86, 0x85, 0x7e, 0x46, 0xaa, 0xce, 0x15, 0xde, 0xb4, 0x56, 0xef, 0x5a, 0x1a, 0x70, 0x7f, - 0xe7, 0x57, 0x82, 0xea, 0x1f, 0xae, 0x04, 0x0f, 0x20, 0x7c, 0x42, 0x6a, 0x9d, 0xe5, 0xb8, 0xb0, - 0x54, 0x78, 0x2d, 0xd2, 0x43, 0x20, 0x6f, 0x78, 0xb1, 0xfe, 0x07, 0x5e, 0x7c, 0x08, 0x2e, 0x83, - 0x67, 0x52, 0xb3, 0xc4, 0xe5, 0xa5, 0xc1, 0xeb, 0xf8, 0x4e, 0x6a, 0x96, 0x30, 0x19, 0xcf, 0xa5, - 0x36, 0x2a, 0xcf, 0x70, 0x71, 0x69, 0x6e, 0x7a, 0xb0, 0x07, 0xf9, 0xe6, 0x16, 0x73, 0x18, 0x0b, - 0x10, 0x77, 0x99, 0x0a, 0xf7, 0x54, 0xf7, 0x3f, 0x25, 0xd2, 0xba, 0x2e, 0x01, 0x8b, 0x65, 0x1a, - 0xbe, 0xcb, 0xb5, 0xaf, 0x07, 0x47, 0x20, 0xaa, 0xb2, 0x5c, 0xfb, 0x1d, 0xd6, 0x11, 0x80, 0x2e, - 0x95, 0xf5, 0x5b, 0x7e, 0x83, 0x3b, 0x02, 0x0a, 0xd0, 0xac, 0x4f, 0xdd, 0xb2, 0xb5, 0xed, 0x6b, - 0xdf, 0xd3, 0x20, 0x81, 0x4b, 0x33, 0x3a, 0xb8, 0xc2, 0x1d, 0x01, 0x5b, 0x11, 0xb4, 0x5d, 0xf4, - 0x69, 0x83, 0xe3, 0x79, 0x5f, 0x78, 0xbd, 0xfc, 0x34, 0xa1, 0x84, 0x54, 0xc7, 0x6f, 0x8e, 0x27, - 0x7c, 0x18, 0x7c, 0x44, 0x9b, 0xa4, 0x36, 0x78, 0x23, 0x8e, 0x27, 0xc7, 0xc3, 0xa0, 0x44, 0x1b, - 0xa4, 0x32, 0xe5, 0x93, 0xe9, 0x2c, 0x28, 0xd3, 0x3a, 0xd9, 0x9e, 0x4d, 0x46, 0xf3, 0x60, 0x0b, - 0x4e, 0xa3, 0x93, 0xc3, 0xc3, 0x60, 0x1b, 0xe4, 0x66, 0x73, 0x3e, 0x1e, 0xcc, 0x83, 0x0a, 0xc8, - 0x1d, 0x0c, 0x47, 0xaf, 0x4f, 0x0e, 0xe7, 0x41, 0x75, 0xff, 0x97, 0x92, 0x2f, 0xd6, 0x4d, 0xc6, - 0xc1, 0x4b, 0xc3, 0xa3, 0xe9, 0xfc, 0xa7, 0xe0, 0x23, 0x90, 0x3f, 0x38, 0x39, 0x9a, 0x06, 0x25, - 0x90, 0xe1, 0xc3, 0xd9, 0x1c, 0x3e, 0x2e, 0x03, 0xc7, 0xe0, 0x87, 0xe1, 0xe0, 0xc7, 0x60, 0x8b, - 0xb6, 0x48, 0x7d, 0xca, 0x87, 0x02, 0xb9, 0xb6, 0xe9, 0x2d, 0xd2, 0x9c, 0xbe, 0x7e, 0x33, 0x14, - 0xb3, 0x21, 0x7f, 0x3b, 0xe4, 0x41, 0x05, 0xbe, 0x3d, 0x9e, 0xcc, 0xc7, 0xa3, 0x9f, 0x82, 0x2a, - 0x0d, 0x48, 0x6b, 0x30, 0x3d, 0x19, 0x1f, 0x8f, 0x26, 0x8e, 0xbd, 0x46, 0x6f, 0x93, 0xf6, 0x06, - 0x71, 0xef, 0xd5, 0x01, 0x1a, 0x0d, 0x5f, 0xcf, 0x4f, 0xf8, 0xd0, 0x43, 0x0d, 0xf8, 0xfa, 0xed, - 0x90, 0xcf, 0xc6, 0x93, 0xe3, 0x80, 0xc0, 0x7f, 0xff, 0x7c, 0x3d, 0x9e, 0x8b, 0xe9, 0xf8, 0x20, - 0x68, 0xd2, 0xbb, 0x24, 0xb8, 0xf6, 0x9f, 0x18, 0xfc, 0x70, 0x78, 0x10, 0xb4, 0xfe, 0x17, 0x00, - 0x00, 0xff, 0xff, 0xf8, 0x9f, 0x0e, 0x7d, 0xca, 0x0d, 0x00, 0x00, -} diff --git a/vendor/github.com/checkpoint-restore/go-criu/v4/.gitignore b/vendor/github.com/checkpoint-restore/go-criu/v4/.gitignore new file mode 100644 index 00000000000..f1c90e3d5ff --- /dev/null +++ b/vendor/github.com/checkpoint-restore/go-criu/v4/.gitignore @@ -0,0 +1,5 @@ +test/test +test/piggie +test/phaul +image +rpc/rpc.proto diff --git a/vendor/github.com/checkpoint-restore/go-criu/v4/.travis.yml b/vendor/github.com/checkpoint-restore/go-criu/v4/.travis.yml new file mode 100644 index 00000000000..85e0cde3790 --- /dev/null +++ b/vendor/github.com/checkpoint-restore/go-criu/v4/.travis.yml @@ -0,0 +1,28 @@ +language: go +dist: bionic +os: + - linux +go: + - "1.14.x" + - "1.13.x" + - tip +env: + # Run the tests with CRIU master and criu-dev + - CRIU_BRANCH="master" + - CRIU_BRANCH="criu-dev" +install: + - sudo apt-get update + - sudo apt-get install -y libprotobuf-dev libprotobuf-c0-dev protobuf-c-compiler protobuf-compiler python-protobuf libnl-3-dev libnet-dev libcap-dev + - make install.tools + - go get github.com/checkpoint-restore/go-criu + - git clone --single-branch -b ${CRIU_BRANCH} https://github.com/checkpoint-restore/criu.git + - cd criu; make + - sudo install -D -m 755 criu/criu /usr/sbin/ + - cd .. +script: + # This builds the code without running the tests. + - make lint build phaul test/test test/phaul test/piggie + # Run actual test as root as it uses CRIU. + - sudo make test phaul-test + # This builds crit-go + - make -C crit-go/magic-gen lint build magicgen test diff --git a/vendor/github.com/checkpoint-restore/go-criu/LICENSE b/vendor/github.com/checkpoint-restore/go-criu/v4/LICENSE similarity index 100% rename from vendor/github.com/checkpoint-restore/go-criu/LICENSE rename to vendor/github.com/checkpoint-restore/go-criu/v4/LICENSE diff --git a/vendor/github.com/checkpoint-restore/go-criu/v4/Makefile b/vendor/github.com/checkpoint-restore/go-criu/v4/Makefile new file mode 100644 index 00000000000..10356304b1f --- /dev/null +++ b/vendor/github.com/checkpoint-restore/go-criu/v4/Makefile @@ -0,0 +1,60 @@ +GO ?= go +CC ?= gcc +ifeq ($(GOPATH),) +export GOPATH := $(shell $(GO) env GOPATH) +endif +FIRST_GOPATH := $(firstword $(subst :, ,$(GOPATH))) +GOBIN := $(shell $(GO) env GOBIN) +ifeq ($(GOBIN),) + GOBIN := $(FIRST_GOPATH)/bin +endif + +all: build test phaul phaul-test + +lint: + @golint -set_exit_status . test phaul +build: + @$(GO) build -v + +test/piggie: test/piggie.c + @$(CC) $^ -o $@ + +test/test: test/main.go + @$(GO) build -v -o test/test test/main.go + +test: test/test test/piggie + mkdir -p image + test/piggie + test/test dump `pidof piggie` image + test/test restore image + pkill -9 piggie || : + +phaul: + @cd phaul; go build -v + +test/phaul: test/phaul-main.go + @$(GO) build -v -o test/phaul test/phaul-main.go + +phaul-test: test/phaul test/piggie + rm -rf image + test/piggie + test/phaul `pidof piggie` + pkill -9 piggie || : + +clean: + @rm -f test/test test/piggie test/phaul + @rm -rf image + @rm -f rpc/rpc.proto + +install.tools: + if [ ! -x "$(GOBIN)/golint" ]; then \ + $(GO) get -u golang.org/x/lint/golint; \ + fi + +rpc/rpc.proto: + curl -s https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/rpc.proto -o $@ + +rpc/rpc.pb.go: rpc/rpc.proto + protoc --go_out=. $^ + +.PHONY: build test clean lint phaul diff --git a/vendor/github.com/checkpoint-restore/go-criu/v4/README.md b/vendor/github.com/checkpoint-restore/go-criu/v4/README.md new file mode 100644 index 00000000000..ace01564c55 --- /dev/null +++ b/vendor/github.com/checkpoint-restore/go-criu/v4/README.md @@ -0,0 +1,75 @@ +[![master](https://travis-ci.org/checkpoint-restore/go-criu.svg?branch=master)](https://travis-ci.org/checkpoint-restore/go-criu) + +## go-criu -- Go bindings for [CRIU](https://criu.org/) + +This repository provides Go bindings for CRIU. The code is based on the Go based PHaul +implementation from the CRIU repository. For easier inclusion into other Go projects the +CRIU Go bindings have been moved to this repository. + +The Go bindings provide an easy way to use the CRIU RPC calls from Go without the need +to set up all the infrastructure to make the actual RPC connection to CRIU. + +The following example would print the version of CRIU: +``` + c := criu.MakeCriu() + version, err := c.GetCriuVersion() + fmt.Println(version) +``` +or to just check if at least a certain CRIU version is installed: +``` + c := criu.MakeCriu() + result, err := c.IsCriuAtLeast(31100) +``` + +## Releases + +The first go-criu release was 3.11 based on CRIU 3.11. The initial plan +was to follow CRIU so that go-criu would carry the same version number as +CRIU. + +As go-criu is imported in other projects and as Go modules are expected +to follow Semantic Versioning go-criu will also follow Semantic Versioning +starting with the 4.0.0 release. + +4.0.0 is based on CRIU 3.14 + +## How to contribute + +While bug fixes can first be identified via an "issue", that is not required. +It's ok to just open up a PR with the fix, but make sure you include the same +information you would have included in an issue - like how to reproduce it. + +PRs for new features should include some background on what use cases the +new code is trying to address. When possible and when it makes sense, try to +break-up larger PRs into smaller ones - it's easier to review smaller +code changes. But only if those smaller ones make sense as stand-alone PRs. + +Regardless of the type of PR, all PRs should include: +* well documented code changes +* additional testcases. Ideally, they should fail w/o your code change applied +* documentation changes + +Squash your commits into logical pieces of work that might want to be reviewed +separate from the rest of the PRs. Ideally, each commit should implement a +single idea, and the PR branch should pass the tests at every commit. GitHub +makes it easy to review the cumulative effect of many commits; so, when in +doubt, use smaller commits. + +PRs that fix issues should include a reference like `Closes #XXXX` in the +commit message so that github will automatically close the referenced issue +when the PR is merged. + +Contributors must assert that they are in compliance with the [Developer +Certificate of Origin 1.1](http://developercertificate.org/). This is achieved +by adding a "Signed-off-by" line containing the contributor's name and e-mail +to every commit message. Your signature certifies that you wrote the patch or +otherwise have the right to pass it on as an open-source patch. + +### License and copyright + +Unless mentioned otherwise in a specific file's header, all code in +this project is released under the Apache 2.0 license. + +The author of a change remains the copyright holder of their code +(no copyright assignment). The list of authors and contributors can be +retrieved from the git commit history and in some cases, the file headers. diff --git a/vendor/github.com/checkpoint-restore/go-criu/v4/go.mod b/vendor/github.com/checkpoint-restore/go-criu/v4/go.mod new file mode 100644 index 00000000000..4966669068f --- /dev/null +++ b/vendor/github.com/checkpoint-restore/go-criu/v4/go.mod @@ -0,0 +1,5 @@ +module github.com/checkpoint-restore/go-criu/v4 + +go 1.13 + +require github.com/golang/protobuf v1.3.5 diff --git a/vendor/github.com/checkpoint-restore/go-criu/v4/go.sum b/vendor/github.com/checkpoint-restore/go-criu/v4/go.sum new file mode 100644 index 00000000000..6124ed3e451 --- /dev/null +++ b/vendor/github.com/checkpoint-restore/go-criu/v4/go.sum @@ -0,0 +1,2 @@ +github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= diff --git a/vendor/github.com/checkpoint-restore/go-criu/v4/main.go b/vendor/github.com/checkpoint-restore/go-criu/v4/main.go new file mode 100644 index 00000000000..d0a6da47837 --- /dev/null +++ b/vendor/github.com/checkpoint-restore/go-criu/v4/main.go @@ -0,0 +1,259 @@ +package criu + +import ( + "errors" + "fmt" + "os" + "os/exec" + "strconv" + "syscall" + + "github.com/checkpoint-restore/go-criu/v4/rpc" + "github.com/golang/protobuf/proto" +) + +// Criu struct +type Criu struct { + swrkCmd *exec.Cmd + swrkSk *os.File + swrkPath string +} + +// MakeCriu returns the Criu object required for most operations +func MakeCriu() *Criu { + return &Criu{ + swrkPath: "criu", + } +} + +// SetCriuPath allows setting the path to the CRIU binary +// if it is in a non standard location +func (c *Criu) SetCriuPath(path string) { + c.swrkPath = path +} + +// Prepare sets up everything for the RPC communication to CRIU +func (c *Criu) Prepare() error { + fds, err := syscall.Socketpair(syscall.AF_LOCAL, syscall.SOCK_SEQPACKET, 0) + if err != nil { + return err + } + + cln := os.NewFile(uintptr(fds[0]), "criu-xprt-cln") + syscall.CloseOnExec(fds[0]) + srv := os.NewFile(uintptr(fds[1]), "criu-xprt-srv") + defer srv.Close() + + args := []string{"swrk", strconv.Itoa(fds[1])} + cmd := exec.Command(c.swrkPath, args...) + + err = cmd.Start() + if err != nil { + cln.Close() + return err + } + + c.swrkCmd = cmd + c.swrkSk = cln + + return nil +} + +// Cleanup cleans up +func (c *Criu) Cleanup() { + if c.swrkCmd != nil { + c.swrkSk.Close() + c.swrkSk = nil + c.swrkCmd.Wait() + c.swrkCmd = nil + } +} + +func (c *Criu) sendAndRecv(reqB []byte) ([]byte, int, error) { + cln := c.swrkSk + _, err := cln.Write(reqB) + if err != nil { + return nil, 0, err + } + + respB := make([]byte, 2*4096) + n, err := cln.Read(respB) + if err != nil { + return nil, 0, err + } + + return respB, n, nil +} + +func (c *Criu) doSwrk(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify) error { + resp, err := c.doSwrkWithResp(reqType, opts, nfy) + if err != nil { + return err + } + respType := resp.GetType() + if respType != reqType { + return errors.New("unexpected responce") + } + + return nil +} + +func (c *Criu) doSwrkWithResp(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify) (*rpc.CriuResp, error) { + var resp *rpc.CriuResp + + req := rpc.CriuReq{ + Type: &reqType, + Opts: opts, + } + + if nfy != nil { + opts.NotifyScripts = proto.Bool(true) + } + + if c.swrkCmd == nil { + err := c.Prepare() + if err != nil { + return nil, err + } + + defer c.Cleanup() + } + + for { + reqB, err := proto.Marshal(&req) + if err != nil { + return nil, err + } + + respB, respS, err := c.sendAndRecv(reqB) + if err != nil { + return nil, err + } + + resp = &rpc.CriuResp{} + err = proto.Unmarshal(respB[:respS], resp) + if err != nil { + return nil, err + } + + if !resp.GetSuccess() { + return resp, fmt.Errorf("operation failed (msg:%s err:%d)", + resp.GetCrErrmsg(), resp.GetCrErrno()) + } + + respType := resp.GetType() + if respType != rpc.CriuReqType_NOTIFY { + break + } + if nfy == nil { + return resp, errors.New("unexpected notify") + } + + notify := resp.GetNotify() + switch notify.GetScript() { + case "pre-dump": + err = nfy.PreDump() + case "post-dump": + err = nfy.PostDump() + case "pre-restore": + err = nfy.PreRestore() + case "post-restore": + err = nfy.PostRestore(notify.GetPid()) + case "network-lock": + err = nfy.NetworkLock() + case "network-unlock": + err = nfy.NetworkUnlock() + case "setup-namespaces": + err = nfy.SetupNamespaces(notify.GetPid()) + case "post-setup-namespaces": + err = nfy.PostSetupNamespaces() + case "post-resume": + err = nfy.PostResume() + default: + err = nil + } + + if err != nil { + return resp, err + } + + req = rpc.CriuReq{ + Type: &respType, + NotifySuccess: proto.Bool(true), + } + } + + return resp, nil +} + +// Dump dumps a process +func (c *Criu) Dump(opts rpc.CriuOpts, nfy Notify) error { + return c.doSwrk(rpc.CriuReqType_DUMP, &opts, nfy) +} + +// Restore restores a process +func (c *Criu) Restore(opts rpc.CriuOpts, nfy Notify) error { + return c.doSwrk(rpc.CriuReqType_RESTORE, &opts, nfy) +} + +// PreDump does a pre-dump +func (c *Criu) PreDump(opts rpc.CriuOpts, nfy Notify) error { + return c.doSwrk(rpc.CriuReqType_PRE_DUMP, &opts, nfy) +} + +// StartPageServer starts the page server +func (c *Criu) StartPageServer(opts rpc.CriuOpts) error { + return c.doSwrk(rpc.CriuReqType_PAGE_SERVER, &opts, nil) +} + +// StartPageServerChld starts the page server and returns PID and port +func (c *Criu) StartPageServerChld(opts rpc.CriuOpts) (int, int, error) { + resp, err := c.doSwrkWithResp(rpc.CriuReqType_PAGE_SERVER_CHLD, &opts, nil) + if err != nil { + return 0, 0, err + } + + return int(resp.Ps.GetPid()), int(resp.Ps.GetPort()), nil +} + +// GetCriuVersion executes the VERSION RPC call and returns the version +// as an integer. Major * 10000 + Minor * 100 + SubLevel +func (c *Criu) GetCriuVersion() (int, error) { + resp, err := c.doSwrkWithResp(rpc.CriuReqType_VERSION, nil, nil) + if err != nil { + return 0, err + } + + if resp.GetType() != rpc.CriuReqType_VERSION { + return 0, fmt.Errorf("Unexpected CRIU RPC response") + } + + version := int(*resp.GetVersion().MajorNumber) * 10000 + version += int(*resp.GetVersion().MinorNumber) * 100 + if resp.GetVersion().Sublevel != nil { + version += int(*resp.GetVersion().Sublevel) + } + + if resp.GetVersion().Gitid != nil { + // taken from runc: if it is a git release -> increase minor by 1 + version -= (version % 100) + version += 100 + } + + return version, nil +} + +// IsCriuAtLeast checks if the version is at least the same +// as the parameter version +func (c *Criu) IsCriuAtLeast(version int) (bool, error) { + criuVersion, err := c.GetCriuVersion() + if err != nil { + return false, err + } + + if criuVersion >= version { + return true, nil + } + + return false, nil +} diff --git a/vendor/github.com/checkpoint-restore/go-criu/v4/notify.go b/vendor/github.com/checkpoint-restore/go-criu/v4/notify.go new file mode 100644 index 00000000000..1c8547b435a --- /dev/null +++ b/vendor/github.com/checkpoint-restore/go-criu/v4/notify.go @@ -0,0 +1,63 @@ +package criu + +//Notify interface +type Notify interface { + PreDump() error + PostDump() error + PreRestore() error + PostRestore(pid int32) error + NetworkLock() error + NetworkUnlock() error + SetupNamespaces(pid int32) error + PostSetupNamespaces() error + PostResume() error +} + +// NoNotify struct +type NoNotify struct { +} + +// PreDump NoNotify +func (c NoNotify) PreDump() error { + return nil +} + +// PostDump NoNotify +func (c NoNotify) PostDump() error { + return nil +} + +// PreRestore NoNotify +func (c NoNotify) PreRestore() error { + return nil +} + +// PostRestore NoNotify +func (c NoNotify) PostRestore(pid int32) error { + return nil +} + +// NetworkLock NoNotify +func (c NoNotify) NetworkLock() error { + return nil +} + +// NetworkUnlock NoNotify +func (c NoNotify) NetworkUnlock() error { + return nil +} + +// SetupNamespaces NoNotify +func (c NoNotify) SetupNamespaces(pid int32) error { + return nil +} + +// PostSetupNamespaces NoNotify +func (c NoNotify) PostSetupNamespaces() error { + return nil +} + +// PostResume NoNotify +func (c NoNotify) PostResume() error { + return nil +} diff --git a/vendor/github.com/checkpoint-restore/go-criu/v4/rpc/rpc.pb.go b/vendor/github.com/checkpoint-restore/go-criu/v4/rpc/rpc.pb.go new file mode 100644 index 00000000000..f9baece4edb --- /dev/null +++ b/vendor/github.com/checkpoint-restore/go-criu/v4/rpc/rpc.pb.go @@ -0,0 +1,1667 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: rpc/rpc.proto + +package rpc + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type CriuCgMode int32 + +const ( + CriuCgMode_IGNORE CriuCgMode = 0 + CriuCgMode_CG_NONE CriuCgMode = 1 + CriuCgMode_PROPS CriuCgMode = 2 + CriuCgMode_SOFT CriuCgMode = 3 + CriuCgMode_FULL CriuCgMode = 4 + CriuCgMode_STRICT CriuCgMode = 5 + CriuCgMode_DEFAULT CriuCgMode = 6 +) + +var CriuCgMode_name = map[int32]string{ + 0: "IGNORE", + 1: "CG_NONE", + 2: "PROPS", + 3: "SOFT", + 4: "FULL", + 5: "STRICT", + 6: "DEFAULT", +} + +var CriuCgMode_value = map[string]int32{ + "IGNORE": 0, + "CG_NONE": 1, + "PROPS": 2, + "SOFT": 3, + "FULL": 4, + "STRICT": 5, + "DEFAULT": 6, +} + +func (x CriuCgMode) Enum() *CriuCgMode { + p := new(CriuCgMode) + *p = x + return p +} + +func (x CriuCgMode) String() string { + return proto.EnumName(CriuCgMode_name, int32(x)) +} + +func (x *CriuCgMode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(CriuCgMode_value, data, "CriuCgMode") + if err != nil { + return err + } + *x = CriuCgMode(value) + return nil +} + +func (CriuCgMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{0} +} + +type CriuPreDumpMode int32 + +const ( + CriuPreDumpMode_SPLICE CriuPreDumpMode = 1 + CriuPreDumpMode_VM_READ CriuPreDumpMode = 2 +) + +var CriuPreDumpMode_name = map[int32]string{ + 1: "SPLICE", + 2: "VM_READ", +} + +var CriuPreDumpMode_value = map[string]int32{ + "SPLICE": 1, + "VM_READ": 2, +} + +func (x CriuPreDumpMode) Enum() *CriuPreDumpMode { + p := new(CriuPreDumpMode) + *p = x + return p +} + +func (x CriuPreDumpMode) String() string { + return proto.EnumName(CriuPreDumpMode_name, int32(x)) +} + +func (x *CriuPreDumpMode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(CriuPreDumpMode_value, data, "CriuPreDumpMode") + if err != nil { + return err + } + *x = CriuPreDumpMode(value) + return nil +} + +func (CriuPreDumpMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{1} +} + +type CriuReqType int32 + +const ( + CriuReqType_EMPTY CriuReqType = 0 + CriuReqType_DUMP CriuReqType = 1 + CriuReqType_RESTORE CriuReqType = 2 + CriuReqType_CHECK CriuReqType = 3 + CriuReqType_PRE_DUMP CriuReqType = 4 + CriuReqType_PAGE_SERVER CriuReqType = 5 + CriuReqType_NOTIFY CriuReqType = 6 + CriuReqType_CPUINFO_DUMP CriuReqType = 7 + CriuReqType_CPUINFO_CHECK CriuReqType = 8 + CriuReqType_FEATURE_CHECK CriuReqType = 9 + CriuReqType_VERSION CriuReqType = 10 + CriuReqType_WAIT_PID CriuReqType = 11 + CriuReqType_PAGE_SERVER_CHLD CriuReqType = 12 +) + +var CriuReqType_name = map[int32]string{ + 0: "EMPTY", + 1: "DUMP", + 2: "RESTORE", + 3: "CHECK", + 4: "PRE_DUMP", + 5: "PAGE_SERVER", + 6: "NOTIFY", + 7: "CPUINFO_DUMP", + 8: "CPUINFO_CHECK", + 9: "FEATURE_CHECK", + 10: "VERSION", + 11: "WAIT_PID", + 12: "PAGE_SERVER_CHLD", +} + +var CriuReqType_value = map[string]int32{ + "EMPTY": 0, + "DUMP": 1, + "RESTORE": 2, + "CHECK": 3, + "PRE_DUMP": 4, + "PAGE_SERVER": 5, + "NOTIFY": 6, + "CPUINFO_DUMP": 7, + "CPUINFO_CHECK": 8, + "FEATURE_CHECK": 9, + "VERSION": 10, + "WAIT_PID": 11, + "PAGE_SERVER_CHLD": 12, +} + +func (x CriuReqType) Enum() *CriuReqType { + p := new(CriuReqType) + *p = x + return p +} + +func (x CriuReqType) String() string { + return proto.EnumName(CriuReqType_name, int32(x)) +} + +func (x *CriuReqType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(CriuReqType_value, data, "CriuReqType") + if err != nil { + return err + } + *x = CriuReqType(value) + return nil +} + +func (CriuReqType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{2} +} + +type CriuPageServerInfo struct { + Address *string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` + Port *int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"` + Pid *int32 `protobuf:"varint,3,opt,name=pid" json:"pid,omitempty"` + Fd *int32 `protobuf:"varint,4,opt,name=fd" json:"fd,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CriuPageServerInfo) Reset() { *m = CriuPageServerInfo{} } +func (m *CriuPageServerInfo) String() string { return proto.CompactTextString(m) } +func (*CriuPageServerInfo) ProtoMessage() {} +func (*CriuPageServerInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{0} +} + +func (m *CriuPageServerInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CriuPageServerInfo.Unmarshal(m, b) +} +func (m *CriuPageServerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CriuPageServerInfo.Marshal(b, m, deterministic) +} +func (m *CriuPageServerInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CriuPageServerInfo.Merge(m, src) +} +func (m *CriuPageServerInfo) XXX_Size() int { + return xxx_messageInfo_CriuPageServerInfo.Size(m) +} +func (m *CriuPageServerInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CriuPageServerInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_CriuPageServerInfo proto.InternalMessageInfo + +func (m *CriuPageServerInfo) GetAddress() string { + if m != nil && m.Address != nil { + return *m.Address + } + return "" +} + +func (m *CriuPageServerInfo) GetPort() int32 { + if m != nil && m.Port != nil { + return *m.Port + } + return 0 +} + +func (m *CriuPageServerInfo) GetPid() int32 { + if m != nil && m.Pid != nil { + return *m.Pid + } + return 0 +} + +func (m *CriuPageServerInfo) GetFd() int32 { + if m != nil && m.Fd != nil { + return *m.Fd + } + return 0 +} + +type CriuVethPair struct { + IfIn *string `protobuf:"bytes,1,req,name=if_in,json=ifIn" json:"if_in,omitempty"` + IfOut *string `protobuf:"bytes,2,req,name=if_out,json=ifOut" json:"if_out,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CriuVethPair) Reset() { *m = CriuVethPair{} } +func (m *CriuVethPair) String() string { return proto.CompactTextString(m) } +func (*CriuVethPair) ProtoMessage() {} +func (*CriuVethPair) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{1} +} + +func (m *CriuVethPair) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CriuVethPair.Unmarshal(m, b) +} +func (m *CriuVethPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CriuVethPair.Marshal(b, m, deterministic) +} +func (m *CriuVethPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_CriuVethPair.Merge(m, src) +} +func (m *CriuVethPair) XXX_Size() int { + return xxx_messageInfo_CriuVethPair.Size(m) +} +func (m *CriuVethPair) XXX_DiscardUnknown() { + xxx_messageInfo_CriuVethPair.DiscardUnknown(m) +} + +var xxx_messageInfo_CriuVethPair proto.InternalMessageInfo + +func (m *CriuVethPair) GetIfIn() string { + if m != nil && m.IfIn != nil { + return *m.IfIn + } + return "" +} + +func (m *CriuVethPair) GetIfOut() string { + if m != nil && m.IfOut != nil { + return *m.IfOut + } + return "" +} + +type ExtMountMap struct { + Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` + Val *string `protobuf:"bytes,2,req,name=val" json:"val,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtMountMap) Reset() { *m = ExtMountMap{} } +func (m *ExtMountMap) String() string { return proto.CompactTextString(m) } +func (*ExtMountMap) ProtoMessage() {} +func (*ExtMountMap) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{2} +} + +func (m *ExtMountMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtMountMap.Unmarshal(m, b) +} +func (m *ExtMountMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtMountMap.Marshal(b, m, deterministic) +} +func (m *ExtMountMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtMountMap.Merge(m, src) +} +func (m *ExtMountMap) XXX_Size() int { + return xxx_messageInfo_ExtMountMap.Size(m) +} +func (m *ExtMountMap) XXX_DiscardUnknown() { + xxx_messageInfo_ExtMountMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtMountMap proto.InternalMessageInfo + +func (m *ExtMountMap) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *ExtMountMap) GetVal() string { + if m != nil && m.Val != nil { + return *m.Val + } + return "" +} + +type JoinNamespace struct { + Ns *string `protobuf:"bytes,1,req,name=ns" json:"ns,omitempty"` + NsFile *string `protobuf:"bytes,2,req,name=ns_file,json=nsFile" json:"ns_file,omitempty"` + ExtraOpt *string `protobuf:"bytes,3,opt,name=extra_opt,json=extraOpt" json:"extra_opt,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *JoinNamespace) Reset() { *m = JoinNamespace{} } +func (m *JoinNamespace) String() string { return proto.CompactTextString(m) } +func (*JoinNamespace) ProtoMessage() {} +func (*JoinNamespace) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{3} +} + +func (m *JoinNamespace) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_JoinNamespace.Unmarshal(m, b) +} +func (m *JoinNamespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_JoinNamespace.Marshal(b, m, deterministic) +} +func (m *JoinNamespace) XXX_Merge(src proto.Message) { + xxx_messageInfo_JoinNamespace.Merge(m, src) +} +func (m *JoinNamespace) XXX_Size() int { + return xxx_messageInfo_JoinNamespace.Size(m) +} +func (m *JoinNamespace) XXX_DiscardUnknown() { + xxx_messageInfo_JoinNamespace.DiscardUnknown(m) +} + +var xxx_messageInfo_JoinNamespace proto.InternalMessageInfo + +func (m *JoinNamespace) GetNs() string { + if m != nil && m.Ns != nil { + return *m.Ns + } + return "" +} + +func (m *JoinNamespace) GetNsFile() string { + if m != nil && m.NsFile != nil { + return *m.NsFile + } + return "" +} + +func (m *JoinNamespace) GetExtraOpt() string { + if m != nil && m.ExtraOpt != nil { + return *m.ExtraOpt + } + return "" +} + +type InheritFd struct { + Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` + Fd *int32 `protobuf:"varint,2,req,name=fd" json:"fd,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InheritFd) Reset() { *m = InheritFd{} } +func (m *InheritFd) String() string { return proto.CompactTextString(m) } +func (*InheritFd) ProtoMessage() {} +func (*InheritFd) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{4} +} + +func (m *InheritFd) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InheritFd.Unmarshal(m, b) +} +func (m *InheritFd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InheritFd.Marshal(b, m, deterministic) +} +func (m *InheritFd) XXX_Merge(src proto.Message) { + xxx_messageInfo_InheritFd.Merge(m, src) +} +func (m *InheritFd) XXX_Size() int { + return xxx_messageInfo_InheritFd.Size(m) +} +func (m *InheritFd) XXX_DiscardUnknown() { + xxx_messageInfo_InheritFd.DiscardUnknown(m) +} + +var xxx_messageInfo_InheritFd proto.InternalMessageInfo + +func (m *InheritFd) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *InheritFd) GetFd() int32 { + if m != nil && m.Fd != nil { + return *m.Fd + } + return 0 +} + +type CgroupRoot struct { + Ctrl *string `protobuf:"bytes,1,opt,name=ctrl" json:"ctrl,omitempty"` + Path *string `protobuf:"bytes,2,req,name=path" json:"path,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CgroupRoot) Reset() { *m = CgroupRoot{} } +func (m *CgroupRoot) String() string { return proto.CompactTextString(m) } +func (*CgroupRoot) ProtoMessage() {} +func (*CgroupRoot) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{5} +} + +func (m *CgroupRoot) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CgroupRoot.Unmarshal(m, b) +} +func (m *CgroupRoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CgroupRoot.Marshal(b, m, deterministic) +} +func (m *CgroupRoot) XXX_Merge(src proto.Message) { + xxx_messageInfo_CgroupRoot.Merge(m, src) +} +func (m *CgroupRoot) XXX_Size() int { + return xxx_messageInfo_CgroupRoot.Size(m) +} +func (m *CgroupRoot) XXX_DiscardUnknown() { + xxx_messageInfo_CgroupRoot.DiscardUnknown(m) +} + +var xxx_messageInfo_CgroupRoot proto.InternalMessageInfo + +func (m *CgroupRoot) GetCtrl() string { + if m != nil && m.Ctrl != nil { + return *m.Ctrl + } + return "" +} + +func (m *CgroupRoot) GetPath() string { + if m != nil && m.Path != nil { + return *m.Path + } + return "" +} + +type UnixSk struct { + Inode *uint32 `protobuf:"varint,1,req,name=inode" json:"inode,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnixSk) Reset() { *m = UnixSk{} } +func (m *UnixSk) String() string { return proto.CompactTextString(m) } +func (*UnixSk) ProtoMessage() {} +func (*UnixSk) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{6} +} + +func (m *UnixSk) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnixSk.Unmarshal(m, b) +} +func (m *UnixSk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnixSk.Marshal(b, m, deterministic) +} +func (m *UnixSk) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnixSk.Merge(m, src) +} +func (m *UnixSk) XXX_Size() int { + return xxx_messageInfo_UnixSk.Size(m) +} +func (m *UnixSk) XXX_DiscardUnknown() { + xxx_messageInfo_UnixSk.DiscardUnknown(m) +} + +var xxx_messageInfo_UnixSk proto.InternalMessageInfo + +func (m *UnixSk) GetInode() uint32 { + if m != nil && m.Inode != nil { + return *m.Inode + } + return 0 +} + +type CriuOpts struct { + ImagesDirFd *int32 `protobuf:"varint,1,req,name=images_dir_fd,json=imagesDirFd" json:"images_dir_fd,omitempty"` + Pid *int32 `protobuf:"varint,2,opt,name=pid" json:"pid,omitempty"` + LeaveRunning *bool `protobuf:"varint,3,opt,name=leave_running,json=leaveRunning" json:"leave_running,omitempty"` + ExtUnixSk *bool `protobuf:"varint,4,opt,name=ext_unix_sk,json=extUnixSk" json:"ext_unix_sk,omitempty"` + TcpEstablished *bool `protobuf:"varint,5,opt,name=tcp_established,json=tcpEstablished" json:"tcp_established,omitempty"` + EvasiveDevices *bool `protobuf:"varint,6,opt,name=evasive_devices,json=evasiveDevices" json:"evasive_devices,omitempty"` + ShellJob *bool `protobuf:"varint,7,opt,name=shell_job,json=shellJob" json:"shell_job,omitempty"` + FileLocks *bool `protobuf:"varint,8,opt,name=file_locks,json=fileLocks" json:"file_locks,omitempty"` + LogLevel *int32 `protobuf:"varint,9,opt,name=log_level,json=logLevel,def=2" json:"log_level,omitempty"` + LogFile *string `protobuf:"bytes,10,opt,name=log_file,json=logFile" json:"log_file,omitempty"` + Ps *CriuPageServerInfo `protobuf:"bytes,11,opt,name=ps" json:"ps,omitempty"` + NotifyScripts *bool `protobuf:"varint,12,opt,name=notify_scripts,json=notifyScripts" json:"notify_scripts,omitempty"` + Root *string `protobuf:"bytes,13,opt,name=root" json:"root,omitempty"` + ParentImg *string `protobuf:"bytes,14,opt,name=parent_img,json=parentImg" json:"parent_img,omitempty"` + TrackMem *bool `protobuf:"varint,15,opt,name=track_mem,json=trackMem" json:"track_mem,omitempty"` + AutoDedup *bool `protobuf:"varint,16,opt,name=auto_dedup,json=autoDedup" json:"auto_dedup,omitempty"` + WorkDirFd *int32 `protobuf:"varint,17,opt,name=work_dir_fd,json=workDirFd" json:"work_dir_fd,omitempty"` + LinkRemap *bool `protobuf:"varint,18,opt,name=link_remap,json=linkRemap" json:"link_remap,omitempty"` + Veths []*CriuVethPair `protobuf:"bytes,19,rep,name=veths" json:"veths,omitempty"` + CpuCap *uint32 `protobuf:"varint,20,opt,name=cpu_cap,json=cpuCap,def=4294967295" json:"cpu_cap,omitempty"` + ForceIrmap *bool `protobuf:"varint,21,opt,name=force_irmap,json=forceIrmap" json:"force_irmap,omitempty"` + ExecCmd []string `protobuf:"bytes,22,rep,name=exec_cmd,json=execCmd" json:"exec_cmd,omitempty"` + ExtMnt []*ExtMountMap `protobuf:"bytes,23,rep,name=ext_mnt,json=extMnt" json:"ext_mnt,omitempty"` + ManageCgroups *bool `protobuf:"varint,24,opt,name=manage_cgroups,json=manageCgroups" json:"manage_cgroups,omitempty"` + CgRoot []*CgroupRoot `protobuf:"bytes,25,rep,name=cg_root,json=cgRoot" json:"cg_root,omitempty"` + RstSibling *bool `protobuf:"varint,26,opt,name=rst_sibling,json=rstSibling" json:"rst_sibling,omitempty"` + InheritFd []*InheritFd `protobuf:"bytes,27,rep,name=inherit_fd,json=inheritFd" json:"inherit_fd,omitempty"` + AutoExtMnt *bool `protobuf:"varint,28,opt,name=auto_ext_mnt,json=autoExtMnt" json:"auto_ext_mnt,omitempty"` + ExtSharing *bool `protobuf:"varint,29,opt,name=ext_sharing,json=extSharing" json:"ext_sharing,omitempty"` + ExtMasters *bool `protobuf:"varint,30,opt,name=ext_masters,json=extMasters" json:"ext_masters,omitempty"` + SkipMnt []string `protobuf:"bytes,31,rep,name=skip_mnt,json=skipMnt" json:"skip_mnt,omitempty"` + EnableFs []string `protobuf:"bytes,32,rep,name=enable_fs,json=enableFs" json:"enable_fs,omitempty"` + UnixSkIno []*UnixSk `protobuf:"bytes,33,rep,name=unix_sk_ino,json=unixSkIno" json:"unix_sk_ino,omitempty"` + ManageCgroupsMode *CriuCgMode `protobuf:"varint,34,opt,name=manage_cgroups_mode,json=manageCgroupsMode,enum=CriuCgMode" json:"manage_cgroups_mode,omitempty"` + GhostLimit *uint32 `protobuf:"varint,35,opt,name=ghost_limit,json=ghostLimit,def=1048576" json:"ghost_limit,omitempty"` + IrmapScanPaths []string `protobuf:"bytes,36,rep,name=irmap_scan_paths,json=irmapScanPaths" json:"irmap_scan_paths,omitempty"` + External []string `protobuf:"bytes,37,rep,name=external" json:"external,omitempty"` + EmptyNs *uint32 `protobuf:"varint,38,opt,name=empty_ns,json=emptyNs" json:"empty_ns,omitempty"` + JoinNs []*JoinNamespace `protobuf:"bytes,39,rep,name=join_ns,json=joinNs" json:"join_ns,omitempty"` + CgroupProps *string `protobuf:"bytes,41,opt,name=cgroup_props,json=cgroupProps" json:"cgroup_props,omitempty"` + CgroupPropsFile *string `protobuf:"bytes,42,opt,name=cgroup_props_file,json=cgroupPropsFile" json:"cgroup_props_file,omitempty"` + CgroupDumpController []string `protobuf:"bytes,43,rep,name=cgroup_dump_controller,json=cgroupDumpController" json:"cgroup_dump_controller,omitempty"` + FreezeCgroup *string `protobuf:"bytes,44,opt,name=freeze_cgroup,json=freezeCgroup" json:"freeze_cgroup,omitempty"` + Timeout *uint32 `protobuf:"varint,45,opt,name=timeout" json:"timeout,omitempty"` + TcpSkipInFlight *bool `protobuf:"varint,46,opt,name=tcp_skip_in_flight,json=tcpSkipInFlight" json:"tcp_skip_in_flight,omitempty"` + WeakSysctls *bool `protobuf:"varint,47,opt,name=weak_sysctls,json=weakSysctls" json:"weak_sysctls,omitempty"` + LazyPages *bool `protobuf:"varint,48,opt,name=lazy_pages,json=lazyPages" json:"lazy_pages,omitempty"` + StatusFd *int32 `protobuf:"varint,49,opt,name=status_fd,json=statusFd" json:"status_fd,omitempty"` + OrphanPtsMaster *bool `protobuf:"varint,50,opt,name=orphan_pts_master,json=orphanPtsMaster" json:"orphan_pts_master,omitempty"` + ConfigFile *string `protobuf:"bytes,51,opt,name=config_file,json=configFile" json:"config_file,omitempty"` + TcpClose *bool `protobuf:"varint,52,opt,name=tcp_close,json=tcpClose" json:"tcp_close,omitempty"` + LsmProfile *string `protobuf:"bytes,53,opt,name=lsm_profile,json=lsmProfile" json:"lsm_profile,omitempty"` + TlsCacert *string `protobuf:"bytes,54,opt,name=tls_cacert,json=tlsCacert" json:"tls_cacert,omitempty"` + TlsCacrl *string `protobuf:"bytes,55,opt,name=tls_cacrl,json=tlsCacrl" json:"tls_cacrl,omitempty"` + TlsCert *string `protobuf:"bytes,56,opt,name=tls_cert,json=tlsCert" json:"tls_cert,omitempty"` + TlsKey *string `protobuf:"bytes,57,opt,name=tls_key,json=tlsKey" json:"tls_key,omitempty"` + Tls *bool `protobuf:"varint,58,opt,name=tls" json:"tls,omitempty"` + TlsNoCnVerify *bool `protobuf:"varint,59,opt,name=tls_no_cn_verify,json=tlsNoCnVerify" json:"tls_no_cn_verify,omitempty"` + CgroupYard *string `protobuf:"bytes,60,opt,name=cgroup_yard,json=cgroupYard" json:"cgroup_yard,omitempty"` + PreDumpMode *CriuPreDumpMode `protobuf:"varint,61,opt,name=pre_dump_mode,json=preDumpMode,enum=CriuPreDumpMode,def=1" json:"pre_dump_mode,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CriuOpts) Reset() { *m = CriuOpts{} } +func (m *CriuOpts) String() string { return proto.CompactTextString(m) } +func (*CriuOpts) ProtoMessage() {} +func (*CriuOpts) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{7} +} + +func (m *CriuOpts) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CriuOpts.Unmarshal(m, b) +} +func (m *CriuOpts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CriuOpts.Marshal(b, m, deterministic) +} +func (m *CriuOpts) XXX_Merge(src proto.Message) { + xxx_messageInfo_CriuOpts.Merge(m, src) +} +func (m *CriuOpts) XXX_Size() int { + return xxx_messageInfo_CriuOpts.Size(m) +} +func (m *CriuOpts) XXX_DiscardUnknown() { + xxx_messageInfo_CriuOpts.DiscardUnknown(m) +} + +var xxx_messageInfo_CriuOpts proto.InternalMessageInfo + +const Default_CriuOpts_LogLevel int32 = 2 +const Default_CriuOpts_CpuCap uint32 = 4294967295 +const Default_CriuOpts_GhostLimit uint32 = 1048576 +const Default_CriuOpts_PreDumpMode CriuPreDumpMode = CriuPreDumpMode_SPLICE + +func (m *CriuOpts) GetImagesDirFd() int32 { + if m != nil && m.ImagesDirFd != nil { + return *m.ImagesDirFd + } + return 0 +} + +func (m *CriuOpts) GetPid() int32 { + if m != nil && m.Pid != nil { + return *m.Pid + } + return 0 +} + +func (m *CriuOpts) GetLeaveRunning() bool { + if m != nil && m.LeaveRunning != nil { + return *m.LeaveRunning + } + return false +} + +func (m *CriuOpts) GetExtUnixSk() bool { + if m != nil && m.ExtUnixSk != nil { + return *m.ExtUnixSk + } + return false +} + +func (m *CriuOpts) GetTcpEstablished() bool { + if m != nil && m.TcpEstablished != nil { + return *m.TcpEstablished + } + return false +} + +func (m *CriuOpts) GetEvasiveDevices() bool { + if m != nil && m.EvasiveDevices != nil { + return *m.EvasiveDevices + } + return false +} + +func (m *CriuOpts) GetShellJob() bool { + if m != nil && m.ShellJob != nil { + return *m.ShellJob + } + return false +} + +func (m *CriuOpts) GetFileLocks() bool { + if m != nil && m.FileLocks != nil { + return *m.FileLocks + } + return false +} + +func (m *CriuOpts) GetLogLevel() int32 { + if m != nil && m.LogLevel != nil { + return *m.LogLevel + } + return Default_CriuOpts_LogLevel +} + +func (m *CriuOpts) GetLogFile() string { + if m != nil && m.LogFile != nil { + return *m.LogFile + } + return "" +} + +func (m *CriuOpts) GetPs() *CriuPageServerInfo { + if m != nil { + return m.Ps + } + return nil +} + +func (m *CriuOpts) GetNotifyScripts() bool { + if m != nil && m.NotifyScripts != nil { + return *m.NotifyScripts + } + return false +} + +func (m *CriuOpts) GetRoot() string { + if m != nil && m.Root != nil { + return *m.Root + } + return "" +} + +func (m *CriuOpts) GetParentImg() string { + if m != nil && m.ParentImg != nil { + return *m.ParentImg + } + return "" +} + +func (m *CriuOpts) GetTrackMem() bool { + if m != nil && m.TrackMem != nil { + return *m.TrackMem + } + return false +} + +func (m *CriuOpts) GetAutoDedup() bool { + if m != nil && m.AutoDedup != nil { + return *m.AutoDedup + } + return false +} + +func (m *CriuOpts) GetWorkDirFd() int32 { + if m != nil && m.WorkDirFd != nil { + return *m.WorkDirFd + } + return 0 +} + +func (m *CriuOpts) GetLinkRemap() bool { + if m != nil && m.LinkRemap != nil { + return *m.LinkRemap + } + return false +} + +func (m *CriuOpts) GetVeths() []*CriuVethPair { + if m != nil { + return m.Veths + } + return nil +} + +func (m *CriuOpts) GetCpuCap() uint32 { + if m != nil && m.CpuCap != nil { + return *m.CpuCap + } + return Default_CriuOpts_CpuCap +} + +func (m *CriuOpts) GetForceIrmap() bool { + if m != nil && m.ForceIrmap != nil { + return *m.ForceIrmap + } + return false +} + +func (m *CriuOpts) GetExecCmd() []string { + if m != nil { + return m.ExecCmd + } + return nil +} + +func (m *CriuOpts) GetExtMnt() []*ExtMountMap { + if m != nil { + return m.ExtMnt + } + return nil +} + +func (m *CriuOpts) GetManageCgroups() bool { + if m != nil && m.ManageCgroups != nil { + return *m.ManageCgroups + } + return false +} + +func (m *CriuOpts) GetCgRoot() []*CgroupRoot { + if m != nil { + return m.CgRoot + } + return nil +} + +func (m *CriuOpts) GetRstSibling() bool { + if m != nil && m.RstSibling != nil { + return *m.RstSibling + } + return false +} + +func (m *CriuOpts) GetInheritFd() []*InheritFd { + if m != nil { + return m.InheritFd + } + return nil +} + +func (m *CriuOpts) GetAutoExtMnt() bool { + if m != nil && m.AutoExtMnt != nil { + return *m.AutoExtMnt + } + return false +} + +func (m *CriuOpts) GetExtSharing() bool { + if m != nil && m.ExtSharing != nil { + return *m.ExtSharing + } + return false +} + +func (m *CriuOpts) GetExtMasters() bool { + if m != nil && m.ExtMasters != nil { + return *m.ExtMasters + } + return false +} + +func (m *CriuOpts) GetSkipMnt() []string { + if m != nil { + return m.SkipMnt + } + return nil +} + +func (m *CriuOpts) GetEnableFs() []string { + if m != nil { + return m.EnableFs + } + return nil +} + +func (m *CriuOpts) GetUnixSkIno() []*UnixSk { + if m != nil { + return m.UnixSkIno + } + return nil +} + +func (m *CriuOpts) GetManageCgroupsMode() CriuCgMode { + if m != nil && m.ManageCgroupsMode != nil { + return *m.ManageCgroupsMode + } + return CriuCgMode_IGNORE +} + +func (m *CriuOpts) GetGhostLimit() uint32 { + if m != nil && m.GhostLimit != nil { + return *m.GhostLimit + } + return Default_CriuOpts_GhostLimit +} + +func (m *CriuOpts) GetIrmapScanPaths() []string { + if m != nil { + return m.IrmapScanPaths + } + return nil +} + +func (m *CriuOpts) GetExternal() []string { + if m != nil { + return m.External + } + return nil +} + +func (m *CriuOpts) GetEmptyNs() uint32 { + if m != nil && m.EmptyNs != nil { + return *m.EmptyNs + } + return 0 +} + +func (m *CriuOpts) GetJoinNs() []*JoinNamespace { + if m != nil { + return m.JoinNs + } + return nil +} + +func (m *CriuOpts) GetCgroupProps() string { + if m != nil && m.CgroupProps != nil { + return *m.CgroupProps + } + return "" +} + +func (m *CriuOpts) GetCgroupPropsFile() string { + if m != nil && m.CgroupPropsFile != nil { + return *m.CgroupPropsFile + } + return "" +} + +func (m *CriuOpts) GetCgroupDumpController() []string { + if m != nil { + return m.CgroupDumpController + } + return nil +} + +func (m *CriuOpts) GetFreezeCgroup() string { + if m != nil && m.FreezeCgroup != nil { + return *m.FreezeCgroup + } + return "" +} + +func (m *CriuOpts) GetTimeout() uint32 { + if m != nil && m.Timeout != nil { + return *m.Timeout + } + return 0 +} + +func (m *CriuOpts) GetTcpSkipInFlight() bool { + if m != nil && m.TcpSkipInFlight != nil { + return *m.TcpSkipInFlight + } + return false +} + +func (m *CriuOpts) GetWeakSysctls() bool { + if m != nil && m.WeakSysctls != nil { + return *m.WeakSysctls + } + return false +} + +func (m *CriuOpts) GetLazyPages() bool { + if m != nil && m.LazyPages != nil { + return *m.LazyPages + } + return false +} + +func (m *CriuOpts) GetStatusFd() int32 { + if m != nil && m.StatusFd != nil { + return *m.StatusFd + } + return 0 +} + +func (m *CriuOpts) GetOrphanPtsMaster() bool { + if m != nil && m.OrphanPtsMaster != nil { + return *m.OrphanPtsMaster + } + return false +} + +func (m *CriuOpts) GetConfigFile() string { + if m != nil && m.ConfigFile != nil { + return *m.ConfigFile + } + return "" +} + +func (m *CriuOpts) GetTcpClose() bool { + if m != nil && m.TcpClose != nil { + return *m.TcpClose + } + return false +} + +func (m *CriuOpts) GetLsmProfile() string { + if m != nil && m.LsmProfile != nil { + return *m.LsmProfile + } + return "" +} + +func (m *CriuOpts) GetTlsCacert() string { + if m != nil && m.TlsCacert != nil { + return *m.TlsCacert + } + return "" +} + +func (m *CriuOpts) GetTlsCacrl() string { + if m != nil && m.TlsCacrl != nil { + return *m.TlsCacrl + } + return "" +} + +func (m *CriuOpts) GetTlsCert() string { + if m != nil && m.TlsCert != nil { + return *m.TlsCert + } + return "" +} + +func (m *CriuOpts) GetTlsKey() string { + if m != nil && m.TlsKey != nil { + return *m.TlsKey + } + return "" +} + +func (m *CriuOpts) GetTls() bool { + if m != nil && m.Tls != nil { + return *m.Tls + } + return false +} + +func (m *CriuOpts) GetTlsNoCnVerify() bool { + if m != nil && m.TlsNoCnVerify != nil { + return *m.TlsNoCnVerify + } + return false +} + +func (m *CriuOpts) GetCgroupYard() string { + if m != nil && m.CgroupYard != nil { + return *m.CgroupYard + } + return "" +} + +func (m *CriuOpts) GetPreDumpMode() CriuPreDumpMode { + if m != nil && m.PreDumpMode != nil { + return *m.PreDumpMode + } + return Default_CriuOpts_PreDumpMode +} + +type CriuDumpResp struct { + Restored *bool `protobuf:"varint,1,opt,name=restored" json:"restored,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CriuDumpResp) Reset() { *m = CriuDumpResp{} } +func (m *CriuDumpResp) String() string { return proto.CompactTextString(m) } +func (*CriuDumpResp) ProtoMessage() {} +func (*CriuDumpResp) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{8} +} + +func (m *CriuDumpResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CriuDumpResp.Unmarshal(m, b) +} +func (m *CriuDumpResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CriuDumpResp.Marshal(b, m, deterministic) +} +func (m *CriuDumpResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_CriuDumpResp.Merge(m, src) +} +func (m *CriuDumpResp) XXX_Size() int { + return xxx_messageInfo_CriuDumpResp.Size(m) +} +func (m *CriuDumpResp) XXX_DiscardUnknown() { + xxx_messageInfo_CriuDumpResp.DiscardUnknown(m) +} + +var xxx_messageInfo_CriuDumpResp proto.InternalMessageInfo + +func (m *CriuDumpResp) GetRestored() bool { + if m != nil && m.Restored != nil { + return *m.Restored + } + return false +} + +type CriuRestoreResp struct { + Pid *int32 `protobuf:"varint,1,req,name=pid" json:"pid,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CriuRestoreResp) Reset() { *m = CriuRestoreResp{} } +func (m *CriuRestoreResp) String() string { return proto.CompactTextString(m) } +func (*CriuRestoreResp) ProtoMessage() {} +func (*CriuRestoreResp) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{9} +} + +func (m *CriuRestoreResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CriuRestoreResp.Unmarshal(m, b) +} +func (m *CriuRestoreResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CriuRestoreResp.Marshal(b, m, deterministic) +} +func (m *CriuRestoreResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_CriuRestoreResp.Merge(m, src) +} +func (m *CriuRestoreResp) XXX_Size() int { + return xxx_messageInfo_CriuRestoreResp.Size(m) +} +func (m *CriuRestoreResp) XXX_DiscardUnknown() { + xxx_messageInfo_CriuRestoreResp.DiscardUnknown(m) +} + +var xxx_messageInfo_CriuRestoreResp proto.InternalMessageInfo + +func (m *CriuRestoreResp) GetPid() int32 { + if m != nil && m.Pid != nil { + return *m.Pid + } + return 0 +} + +type CriuNotify struct { + Script *string `protobuf:"bytes,1,opt,name=script" json:"script,omitempty"` + Pid *int32 `protobuf:"varint,2,opt,name=pid" json:"pid,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CriuNotify) Reset() { *m = CriuNotify{} } +func (m *CriuNotify) String() string { return proto.CompactTextString(m) } +func (*CriuNotify) ProtoMessage() {} +func (*CriuNotify) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{10} +} + +func (m *CriuNotify) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CriuNotify.Unmarshal(m, b) +} +func (m *CriuNotify) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CriuNotify.Marshal(b, m, deterministic) +} +func (m *CriuNotify) XXX_Merge(src proto.Message) { + xxx_messageInfo_CriuNotify.Merge(m, src) +} +func (m *CriuNotify) XXX_Size() int { + return xxx_messageInfo_CriuNotify.Size(m) +} +func (m *CriuNotify) XXX_DiscardUnknown() { + xxx_messageInfo_CriuNotify.DiscardUnknown(m) +} + +var xxx_messageInfo_CriuNotify proto.InternalMessageInfo + +func (m *CriuNotify) GetScript() string { + if m != nil && m.Script != nil { + return *m.Script + } + return "" +} + +func (m *CriuNotify) GetPid() int32 { + if m != nil && m.Pid != nil { + return *m.Pid + } + return 0 +} + +// +// List of features which can queried via +// CRIU_REQ_TYPE__FEATURE_CHECK +type CriuFeatures struct { + MemTrack *bool `protobuf:"varint,1,opt,name=mem_track,json=memTrack" json:"mem_track,omitempty"` + LazyPages *bool `protobuf:"varint,2,opt,name=lazy_pages,json=lazyPages" json:"lazy_pages,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CriuFeatures) Reset() { *m = CriuFeatures{} } +func (m *CriuFeatures) String() string { return proto.CompactTextString(m) } +func (*CriuFeatures) ProtoMessage() {} +func (*CriuFeatures) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{11} +} + +func (m *CriuFeatures) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CriuFeatures.Unmarshal(m, b) +} +func (m *CriuFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CriuFeatures.Marshal(b, m, deterministic) +} +func (m *CriuFeatures) XXX_Merge(src proto.Message) { + xxx_messageInfo_CriuFeatures.Merge(m, src) +} +func (m *CriuFeatures) XXX_Size() int { + return xxx_messageInfo_CriuFeatures.Size(m) +} +func (m *CriuFeatures) XXX_DiscardUnknown() { + xxx_messageInfo_CriuFeatures.DiscardUnknown(m) +} + +var xxx_messageInfo_CriuFeatures proto.InternalMessageInfo + +func (m *CriuFeatures) GetMemTrack() bool { + if m != nil && m.MemTrack != nil { + return *m.MemTrack + } + return false +} + +func (m *CriuFeatures) GetLazyPages() bool { + if m != nil && m.LazyPages != nil { + return *m.LazyPages + } + return false +} + +type CriuReq struct { + Type *CriuReqType `protobuf:"varint,1,req,name=type,enum=CriuReqType" json:"type,omitempty"` + Opts *CriuOpts `protobuf:"bytes,2,opt,name=opts" json:"opts,omitempty"` + NotifySuccess *bool `protobuf:"varint,3,opt,name=notify_success,json=notifySuccess" json:"notify_success,omitempty"` + // + // When set service won't close the connection but + // will wait for more req-s to appear. Works not + // for all request types. + KeepOpen *bool `protobuf:"varint,4,opt,name=keep_open,json=keepOpen" json:"keep_open,omitempty"` + // + // 'features' can be used to query which features + // are supported by the installed criu/kernel + // via RPC. + Features *CriuFeatures `protobuf:"bytes,5,opt,name=features" json:"features,omitempty"` + // 'pid' is used for WAIT_PID + Pid *uint32 `protobuf:"varint,6,opt,name=pid" json:"pid,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CriuReq) Reset() { *m = CriuReq{} } +func (m *CriuReq) String() string { return proto.CompactTextString(m) } +func (*CriuReq) ProtoMessage() {} +func (*CriuReq) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{12} +} + +func (m *CriuReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CriuReq.Unmarshal(m, b) +} +func (m *CriuReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CriuReq.Marshal(b, m, deterministic) +} +func (m *CriuReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_CriuReq.Merge(m, src) +} +func (m *CriuReq) XXX_Size() int { + return xxx_messageInfo_CriuReq.Size(m) +} +func (m *CriuReq) XXX_DiscardUnknown() { + xxx_messageInfo_CriuReq.DiscardUnknown(m) +} + +var xxx_messageInfo_CriuReq proto.InternalMessageInfo + +func (m *CriuReq) GetType() CriuReqType { + if m != nil && m.Type != nil { + return *m.Type + } + return CriuReqType_EMPTY +} + +func (m *CriuReq) GetOpts() *CriuOpts { + if m != nil { + return m.Opts + } + return nil +} + +func (m *CriuReq) GetNotifySuccess() bool { + if m != nil && m.NotifySuccess != nil { + return *m.NotifySuccess + } + return false +} + +func (m *CriuReq) GetKeepOpen() bool { + if m != nil && m.KeepOpen != nil { + return *m.KeepOpen + } + return false +} + +func (m *CriuReq) GetFeatures() *CriuFeatures { + if m != nil { + return m.Features + } + return nil +} + +func (m *CriuReq) GetPid() uint32 { + if m != nil && m.Pid != nil { + return *m.Pid + } + return 0 +} + +type CriuResp struct { + Type *CriuReqType `protobuf:"varint,1,req,name=type,enum=CriuReqType" json:"type,omitempty"` + Success *bool `protobuf:"varint,2,req,name=success" json:"success,omitempty"` + Dump *CriuDumpResp `protobuf:"bytes,3,opt,name=dump" json:"dump,omitempty"` + Restore *CriuRestoreResp `protobuf:"bytes,4,opt,name=restore" json:"restore,omitempty"` + Notify *CriuNotify `protobuf:"bytes,5,opt,name=notify" json:"notify,omitempty"` + Ps *CriuPageServerInfo `protobuf:"bytes,6,opt,name=ps" json:"ps,omitempty"` + CrErrno *int32 `protobuf:"varint,7,opt,name=cr_errno,json=crErrno" json:"cr_errno,omitempty"` + Features *CriuFeatures `protobuf:"bytes,8,opt,name=features" json:"features,omitempty"` + CrErrmsg *string `protobuf:"bytes,9,opt,name=cr_errmsg,json=crErrmsg" json:"cr_errmsg,omitempty"` + Version *CriuVersion `protobuf:"bytes,10,opt,name=version" json:"version,omitempty"` + Status *int32 `protobuf:"varint,11,opt,name=status" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CriuResp) Reset() { *m = CriuResp{} } +func (m *CriuResp) String() string { return proto.CompactTextString(m) } +func (*CriuResp) ProtoMessage() {} +func (*CriuResp) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{13} +} + +func (m *CriuResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CriuResp.Unmarshal(m, b) +} +func (m *CriuResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CriuResp.Marshal(b, m, deterministic) +} +func (m *CriuResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_CriuResp.Merge(m, src) +} +func (m *CriuResp) XXX_Size() int { + return xxx_messageInfo_CriuResp.Size(m) +} +func (m *CriuResp) XXX_DiscardUnknown() { + xxx_messageInfo_CriuResp.DiscardUnknown(m) +} + +var xxx_messageInfo_CriuResp proto.InternalMessageInfo + +func (m *CriuResp) GetType() CriuReqType { + if m != nil && m.Type != nil { + return *m.Type + } + return CriuReqType_EMPTY +} + +func (m *CriuResp) GetSuccess() bool { + if m != nil && m.Success != nil { + return *m.Success + } + return false +} + +func (m *CriuResp) GetDump() *CriuDumpResp { + if m != nil { + return m.Dump + } + return nil +} + +func (m *CriuResp) GetRestore() *CriuRestoreResp { + if m != nil { + return m.Restore + } + return nil +} + +func (m *CriuResp) GetNotify() *CriuNotify { + if m != nil { + return m.Notify + } + return nil +} + +func (m *CriuResp) GetPs() *CriuPageServerInfo { + if m != nil { + return m.Ps + } + return nil +} + +func (m *CriuResp) GetCrErrno() int32 { + if m != nil && m.CrErrno != nil { + return *m.CrErrno + } + return 0 +} + +func (m *CriuResp) GetFeatures() *CriuFeatures { + if m != nil { + return m.Features + } + return nil +} + +func (m *CriuResp) GetCrErrmsg() string { + if m != nil && m.CrErrmsg != nil { + return *m.CrErrmsg + } + return "" +} + +func (m *CriuResp) GetVersion() *CriuVersion { + if m != nil { + return m.Version + } + return nil +} + +func (m *CriuResp) GetStatus() int32 { + if m != nil && m.Status != nil { + return *m.Status + } + return 0 +} + +// Answer for criu_req_type.VERSION requests +type CriuVersion struct { + MajorNumber *int32 `protobuf:"varint,1,req,name=major_number,json=majorNumber" json:"major_number,omitempty"` + MinorNumber *int32 `protobuf:"varint,2,req,name=minor_number,json=minorNumber" json:"minor_number,omitempty"` + Gitid *string `protobuf:"bytes,3,opt,name=gitid" json:"gitid,omitempty"` + Sublevel *int32 `protobuf:"varint,4,opt,name=sublevel" json:"sublevel,omitempty"` + Extra *int32 `protobuf:"varint,5,opt,name=extra" json:"extra,omitempty"` + Name *string `protobuf:"bytes,6,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CriuVersion) Reset() { *m = CriuVersion{} } +func (m *CriuVersion) String() string { return proto.CompactTextString(m) } +func (*CriuVersion) ProtoMessage() {} +func (*CriuVersion) Descriptor() ([]byte, []int) { + return fileDescriptor_d9874a201429861e, []int{14} +} + +func (m *CriuVersion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CriuVersion.Unmarshal(m, b) +} +func (m *CriuVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CriuVersion.Marshal(b, m, deterministic) +} +func (m *CriuVersion) XXX_Merge(src proto.Message) { + xxx_messageInfo_CriuVersion.Merge(m, src) +} +func (m *CriuVersion) XXX_Size() int { + return xxx_messageInfo_CriuVersion.Size(m) +} +func (m *CriuVersion) XXX_DiscardUnknown() { + xxx_messageInfo_CriuVersion.DiscardUnknown(m) +} + +var xxx_messageInfo_CriuVersion proto.InternalMessageInfo + +func (m *CriuVersion) GetMajorNumber() int32 { + if m != nil && m.MajorNumber != nil { + return *m.MajorNumber + } + return 0 +} + +func (m *CriuVersion) GetMinorNumber() int32 { + if m != nil && m.MinorNumber != nil { + return *m.MinorNumber + } + return 0 +} + +func (m *CriuVersion) GetGitid() string { + if m != nil && m.Gitid != nil { + return *m.Gitid + } + return "" +} + +func (m *CriuVersion) GetSublevel() int32 { + if m != nil && m.Sublevel != nil { + return *m.Sublevel + } + return 0 +} + +func (m *CriuVersion) GetExtra() int32 { + if m != nil && m.Extra != nil { + return *m.Extra + } + return 0 +} + +func (m *CriuVersion) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func init() { + proto.RegisterEnum("CriuCgMode", CriuCgMode_name, CriuCgMode_value) + proto.RegisterEnum("CriuPreDumpMode", CriuPreDumpMode_name, CriuPreDumpMode_value) + proto.RegisterEnum("CriuReqType", CriuReqType_name, CriuReqType_value) + proto.RegisterType((*CriuPageServerInfo)(nil), "criu_page_server_info") + proto.RegisterType((*CriuVethPair)(nil), "criu_veth_pair") + proto.RegisterType((*ExtMountMap)(nil), "ext_mount_map") + proto.RegisterType((*JoinNamespace)(nil), "join_namespace") + proto.RegisterType((*InheritFd)(nil), "inherit_fd") + proto.RegisterType((*CgroupRoot)(nil), "cgroup_root") + proto.RegisterType((*UnixSk)(nil), "unix_sk") + proto.RegisterType((*CriuOpts)(nil), "criu_opts") + proto.RegisterType((*CriuDumpResp)(nil), "criu_dump_resp") + proto.RegisterType((*CriuRestoreResp)(nil), "criu_restore_resp") + proto.RegisterType((*CriuNotify)(nil), "criu_notify") + proto.RegisterType((*CriuFeatures)(nil), "criu_features") + proto.RegisterType((*CriuReq)(nil), "criu_req") + proto.RegisterType((*CriuResp)(nil), "criu_resp") + proto.RegisterType((*CriuVersion)(nil), "criu_version") +} + +func init() { proto.RegisterFile("rpc/rpc.proto", fileDescriptor_d9874a201429861e) } + +var fileDescriptor_d9874a201429861e = []byte{ + // 2033 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0xe9, 0x72, 0x1b, 0x37, + 0x12, 0x0e, 0x29, 0xf1, 0x02, 0x45, 0x79, 0x0c, 0x5f, 0x70, 0xbc, 0xb6, 0x15, 0x3a, 0x8e, 0xb5, + 0x8a, 0xc3, 0x24, 0x8a, 0x8f, 0xd8, 0x9b, 0xd4, 0x96, 0x8b, 0x22, 0x1d, 0xae, 0x75, 0xb0, 0x40, + 0xc9, 0x5b, 0xfe, 0x85, 0x1a, 0xcd, 0x80, 0x14, 0xac, 0x19, 0xcc, 0x2c, 0x00, 0x2a, 0x92, 0x5f, + 0x62, 0x5f, 0x65, 0x7f, 0xef, 0x53, 0xe4, 0x91, 0xb6, 0xba, 0x01, 0xca, 0x52, 0x9c, 0xaa, 0xec, + 0xbf, 0xe9, 0xaf, 0xbb, 0x81, 0xbe, 0xd1, 0x43, 0x3a, 0xa6, 0x4c, 0xbe, 0x35, 0x65, 0xd2, 0x2b, + 0x4d, 0xe1, 0x8a, 0xee, 0x8c, 0xdc, 0x48, 0x8c, 0x9a, 0x8b, 0x32, 0x9e, 0x49, 0x61, 0xa5, 0x39, + 0x91, 0x46, 0x28, 0x3d, 0x2d, 0x28, 0x23, 0x8d, 0x38, 0x4d, 0x8d, 0xb4, 0x96, 0x55, 0xd6, 0x2a, + 0xeb, 0x2d, 0xbe, 0x20, 0x29, 0x25, 0xcb, 0x65, 0x61, 0x1c, 0xab, 0xae, 0x55, 0xd6, 0x6b, 0x1c, + 0xbf, 0x69, 0x44, 0x96, 0x4a, 0x95, 0xb2, 0x25, 0x84, 0xe0, 0x93, 0xae, 0x92, 0xea, 0x34, 0x65, + 0xcb, 0x08, 0x54, 0xa7, 0x69, 0xf7, 0x27, 0xb2, 0x8a, 0x17, 0x9d, 0x48, 0x77, 0x24, 0xca, 0x58, + 0x19, 0x7a, 0x8d, 0xd4, 0xd4, 0x54, 0x28, 0xcd, 0x2a, 0x6b, 0xd5, 0xf5, 0x16, 0x5f, 0x56, 0xd3, + 0x91, 0xa6, 0x37, 0x48, 0x5d, 0x4d, 0x45, 0x31, 0x87, 0xe3, 0x01, 0xad, 0xa9, 0xe9, 0xde, 0xdc, + 0x75, 0x7f, 0x20, 0x1d, 0x79, 0xea, 0x44, 0x5e, 0xcc, 0xb5, 0x13, 0x79, 0x5c, 0xc2, 0x85, 0xc7, + 0xf2, 0x2c, 0xa8, 0xc2, 0x27, 0x20, 0x27, 0x71, 0x16, 0xd4, 0xe0, 0xb3, 0xfb, 0x96, 0xac, 0xbe, + 0x2f, 0x94, 0x16, 0x3a, 0xce, 0xa5, 0x2d, 0xe3, 0x44, 0x82, 0x51, 0xda, 0x06, 0xa5, 0xaa, 0xb6, + 0xf4, 0x16, 0x69, 0x68, 0x2b, 0xa6, 0x2a, 0x93, 0x41, 0xaf, 0xae, 0xed, 0x50, 0x65, 0x92, 0xde, + 0x21, 0x2d, 0x79, 0xea, 0x4c, 0x2c, 0x8a, 0xd2, 0xa1, 0x57, 0x2d, 0xde, 0x44, 0x60, 0xaf, 0x74, + 0xdd, 0x1e, 0x21, 0x4a, 0x1f, 0x49, 0xa3, 0x9c, 0x98, 0xa6, 0x7f, 0x60, 0x89, 0x77, 0x1d, 0x0e, + 0xf4, 0xae, 0x3f, 0x25, 0xed, 0x64, 0x66, 0x8a, 0x79, 0x29, 0x4c, 0x51, 0x38, 0x88, 0x5f, 0xe2, + 0x4c, 0x16, 0xc2, 0x8a, 0xdf, 0x18, 0xd3, 0xd8, 0x1d, 0x05, 0x2b, 0xf0, 0xbb, 0x7b, 0x9f, 0x34, + 0xe6, 0x5a, 0x9d, 0x0a, 0x7b, 0x4c, 0xaf, 0x93, 0x9a, 0xd2, 0x45, 0x2a, 0xf1, 0x96, 0x0e, 0xf7, + 0x44, 0xf7, 0xbf, 0x11, 0x69, 0x61, 0x4c, 0x8b, 0xd2, 0x59, 0xda, 0x25, 0x1d, 0x95, 0xc7, 0x33, + 0x69, 0x45, 0xaa, 0x8c, 0x98, 0xa6, 0x28, 0x5b, 0xe3, 0x6d, 0x0f, 0x6e, 0x29, 0x33, 0x4c, 0x17, + 0x69, 0xaa, 0x7e, 0x4c, 0xd3, 0x03, 0xd2, 0xc9, 0x64, 0x7c, 0x22, 0x85, 0x99, 0x6b, 0xad, 0xf4, + 0x0c, 0x9d, 0x6d, 0xf2, 0x15, 0x04, 0xb9, 0xc7, 0xe8, 0x3d, 0xd2, 0x86, 0xe8, 0x07, 0x6b, 0x30, + 0xa9, 0x4d, 0x0e, 0x01, 0x3a, 0xd0, 0xea, 0x74, 0x72, 0x4c, 0x1f, 0x91, 0x2b, 0x2e, 0x29, 0x85, + 0xb4, 0x2e, 0x3e, 0xcc, 0x94, 0x3d, 0x92, 0x29, 0xab, 0xa1, 0xcc, 0xaa, 0x4b, 0xca, 0xc1, 0x47, + 0x14, 0x04, 0xe5, 0x49, 0x6c, 0xd5, 0x89, 0x14, 0xa9, 0x3c, 0x51, 0x89, 0xb4, 0xac, 0xee, 0x05, + 0x03, 0xbc, 0xe5, 0x51, 0x88, 0xbf, 0x3d, 0x92, 0x59, 0x26, 0xde, 0x17, 0x87, 0xac, 0x81, 0x22, + 0x4d, 0x04, 0xfe, 0x51, 0x1c, 0xd2, 0xbb, 0x84, 0x40, 0xca, 0x44, 0x56, 0x24, 0xc7, 0x96, 0x35, + 0xbd, 0x35, 0x80, 0x6c, 0x03, 0x40, 0xef, 0x91, 0x56, 0x56, 0xcc, 0x44, 0x26, 0x4f, 0x64, 0xc6, + 0x5a, 0xe0, 0xea, 0xcb, 0xca, 0x26, 0x6f, 0x66, 0xc5, 0x6c, 0x1b, 0x20, 0x7a, 0x9b, 0xc0, 0xb7, + 0xcf, 0x3a, 0xf1, 0xa5, 0x9d, 0x15, 0x33, 0x4c, 0xfb, 0x57, 0xa4, 0x5a, 0x5a, 0xd6, 0x5e, 0xab, + 0xac, 0xb7, 0x37, 0x6f, 0xf6, 0xfe, 0xb0, 0x31, 0x78, 0xb5, 0xb4, 0xf4, 0x21, 0x59, 0xd5, 0x85, + 0x53, 0xd3, 0x33, 0x61, 0x13, 0xa3, 0x4a, 0x67, 0xd9, 0x0a, 0x5a, 0xd1, 0xf1, 0xe8, 0xc4, 0x83, + 0x90, 0x55, 0xc8, 0x38, 0xeb, 0xf8, 0x4c, 0x63, 0xf6, 0xef, 0x12, 0x52, 0xc6, 0x46, 0x6a, 0x27, + 0x54, 0x3e, 0x63, 0xab, 0xc8, 0x69, 0x79, 0x64, 0x94, 0xcf, 0xc0, 0x71, 0x67, 0xe2, 0xe4, 0x58, + 0xe4, 0x32, 0x67, 0x57, 0xbc, 0xe3, 0x08, 0xec, 0xc8, 0x1c, 0x74, 0xe3, 0xb9, 0x2b, 0x44, 0x2a, + 0xd3, 0x79, 0xc9, 0x22, 0xef, 0x38, 0x20, 0x5b, 0x00, 0x40, 0x9a, 0x7e, 0x2d, 0xcc, 0xf1, 0x22, + 0xff, 0x57, 0x31, 0xcb, 0x2d, 0x80, 0x7c, 0xf6, 0xef, 0x12, 0x92, 0x29, 0x7d, 0x2c, 0x8c, 0xcc, + 0xe3, 0x92, 0x51, 0xaf, 0x0e, 0x08, 0x07, 0x80, 0x3e, 0x24, 0x35, 0x68, 0x4e, 0xcb, 0xae, 0xad, + 0x2d, 0xad, 0xb7, 0x37, 0xaf, 0xf4, 0x2e, 0xf7, 0x2b, 0xf7, 0x5c, 0xfa, 0x80, 0x34, 0x92, 0x72, + 0x2e, 0x92, 0xb8, 0x64, 0xd7, 0xd7, 0x2a, 0xeb, 0x9d, 0x97, 0xe4, 0xc9, 0xe6, 0x8b, 0x27, 0x2f, + 0x9e, 0x3d, 0xdf, 0x7c, 0xf1, 0x94, 0xd7, 0x93, 0x72, 0xde, 0x8f, 0x4b, 0x7a, 0x9f, 0xb4, 0xa7, + 0x85, 0x49, 0xa4, 0x50, 0x06, 0xee, 0xba, 0x81, 0x77, 0x11, 0x84, 0x46, 0x80, 0x40, 0x12, 0xe4, + 0xa9, 0x4c, 0x44, 0x92, 0xa7, 0xec, 0xe6, 0xda, 0x12, 0x24, 0x01, 0xe8, 0x7e, 0x0e, 0x45, 0xd2, + 0xc0, 0x5e, 0xd7, 0x8e, 0xdd, 0x42, 0x4b, 0x56, 0x7b, 0x97, 0x7a, 0x9f, 0xd7, 0xe5, 0xa9, 0xdb, + 0xd1, 0x0e, 0xb2, 0x90, 0xc7, 0x1a, 0xf2, 0xe3, 0xdb, 0xcb, 0x32, 0xe6, 0xb3, 0xe0, 0xd1, 0xbe, + 0x07, 0xe9, 0x43, 0xd2, 0x48, 0x66, 0xd8, 0x7a, 0xec, 0x36, 0x9e, 0xb7, 0xd2, 0xbb, 0xd0, 0x8e, + 0xbc, 0x9e, 0xcc, 0x38, 0x24, 0xe6, 0x3e, 0x69, 0x1b, 0xeb, 0x84, 0x55, 0x87, 0x19, 0xf4, 0xc1, + 0xe7, 0xde, 0x64, 0x63, 0xdd, 0xc4, 0x23, 0x74, 0xe3, 0x62, 0xdb, 0xb3, 0x3b, 0x78, 0x54, 0xbb, + 0xf7, 0x11, 0xe2, 0xad, 0xf0, 0x3d, 0x4c, 0xe9, 0x1a, 0x59, 0xc1, 0x4c, 0x2d, 0x1c, 0xf9, 0x8b, + 0x3f, 0x0d, 0xb0, 0x81, 0x37, 0xfe, 0xbe, 0xef, 0x29, 0x7b, 0x14, 0x1b, 0xb8, 0xee, 0xae, 0x17, + 0x90, 0xa7, 0x6e, 0xe2, 0x91, 0x85, 0x40, 0x1e, 0x5b, 0x27, 0x8d, 0x65, 0xf7, 0xce, 0x05, 0x76, + 0x3c, 0x02, 0x21, 0xb4, 0xc7, 0xaa, 0xc4, 0xf3, 0xef, 0xfb, 0x10, 0x02, 0x0d, 0x87, 0xc3, 0xf8, + 0xd2, 0xf1, 0x61, 0x26, 0xc5, 0xd4, 0xb2, 0x35, 0xe4, 0x35, 0x3d, 0x30, 0xb4, 0x74, 0x9d, 0xb4, + 0x43, 0x27, 0x0b, 0xa5, 0x0b, 0xf6, 0x05, 0x3a, 0xd2, 0xec, 0x05, 0x8c, 0xb7, 0xe6, 0xd8, 0xd4, + 0x23, 0x5d, 0xd0, 0x9f, 0xc9, 0xb5, 0xcb, 0x01, 0x16, 0x39, 0x0c, 0xa1, 0xee, 0x5a, 0x65, 0x7d, + 0x75, 0xb3, 0xe3, 0xeb, 0x23, 0x99, 0x21, 0xc8, 0xaf, 0x5e, 0x0a, 0xfa, 0x4e, 0x91, 0x4a, 0xb8, + 0x68, 0x76, 0x54, 0x58, 0x27, 0x32, 0x95, 0x2b, 0xc7, 0x1e, 0x60, 0xb5, 0x34, 0xbe, 0xff, 0xee, + 0xc9, 0x8f, 0x4f, 0x9f, 0x3f, 0xe3, 0x04, 0x79, 0xdb, 0xc0, 0xa2, 0xeb, 0x24, 0xc2, 0x42, 0x11, + 0x36, 0x89, 0xb5, 0x80, 0xe9, 0x67, 0xd9, 0x97, 0x68, 0xf6, 0x2a, 0xe2, 0x93, 0x24, 0xd6, 0x63, + 0x40, 0xe9, 0xe7, 0x50, 0x37, 0x4e, 0x1a, 0x1d, 0x67, 0xec, 0x61, 0x70, 0x2c, 0xd0, 0x58, 0x53, + 0x79, 0xe9, 0xce, 0x84, 0xb6, 0xec, 0x2b, 0xb8, 0x8c, 0x37, 0x90, 0xde, 0x05, 0x9f, 0x1b, 0xfe, + 0x29, 0xb0, 0xec, 0x51, 0xa8, 0xee, 0xcb, 0x4f, 0x03, 0xaf, 0x03, 0xbd, 0x6b, 0xe9, 0x17, 0x64, + 0x25, 0x54, 0x47, 0x69, 0x8a, 0xd2, 0xb2, 0xbf, 0x62, 0x87, 0x86, 0x01, 0x3e, 0x06, 0x88, 0x6e, + 0x90, 0xab, 0x17, 0x45, 0xfc, 0x24, 0xd9, 0x40, 0xb9, 0x2b, 0x17, 0xe4, 0x70, 0xa2, 0x3c, 0x21, + 0x37, 0x83, 0x6c, 0x3a, 0xcf, 0x4b, 0x91, 0x14, 0xda, 0x99, 0x22, 0xcb, 0xa4, 0x61, 0x5f, 0xa3, + 0xf5, 0xd7, 0x3d, 0x77, 0x6b, 0x9e, 0x97, 0xfd, 0x73, 0x1e, 0x4c, 0xe5, 0xa9, 0x91, 0xf2, 0xc3, + 0x22, 0xf0, 0xec, 0x31, 0x9e, 0xbe, 0xe2, 0x41, 0x1f, 0x63, 0x78, 0xa1, 0x9d, 0xca, 0x25, 0xbc, + 0x95, 0xdf, 0x78, 0x6f, 0x03, 0x49, 0xbf, 0x26, 0x14, 0xe6, 0x31, 0x56, 0x87, 0xd2, 0x62, 0x9a, + 0xa9, 0xd9, 0x91, 0x63, 0x3d, 0xac, 0x20, 0x98, 0xd4, 0x93, 0x63, 0x55, 0x8e, 0xf4, 0x10, 0x61, + 0x70, 0xf8, 0x57, 0x19, 0x1f, 0x0b, 0x7b, 0x66, 0x13, 0x97, 0x59, 0xf6, 0x2d, 0x8a, 0xb5, 0x01, + 0x9b, 0x78, 0x08, 0x07, 0x47, 0xfc, 0xe1, 0x0c, 0x67, 0xa1, 0x65, 0xdf, 0x85, 0xc1, 0x11, 0x7f, + 0x38, 0x1b, 0x03, 0x80, 0xc3, 0xda, 0xc5, 0x6e, 0x6e, 0xa1, 0x2f, 0xbe, 0xc7, 0xa9, 0xd3, 0xf4, + 0xc0, 0x30, 0x85, 0x60, 0x15, 0xa6, 0x3c, 0x82, 0xb4, 0x3a, 0x1b, 0xaa, 0x99, 0x6d, 0x7a, 0x53, + 0x3c, 0x63, 0xec, 0xac, 0x2f, 0x69, 0x28, 0xf9, 0xa4, 0xd0, 0x53, 0x15, 0x86, 0xf3, 0x0f, 0xe8, + 0x34, 0xf1, 0xd0, 0xe2, 0x59, 0x06, 0xc7, 0x92, 0xac, 0xb0, 0x92, 0x3d, 0x09, 0xd3, 0x31, 0x29, + 0xfb, 0x40, 0x83, 0x76, 0x66, 0x73, 0xc8, 0x09, 0x6a, 0x3f, 0xf5, 0xda, 0x99, 0xcd, 0xc7, 0x1e, + 0x01, 0x37, 0x5c, 0x66, 0x45, 0x12, 0x27, 0xd2, 0x38, 0xf6, 0xcc, 0x8f, 0x5e, 0x97, 0xd9, 0x3e, + 0x02, 0x78, 0xb8, 0x67, 0x9b, 0x8c, 0x3d, 0xf7, 0x6f, 0xbe, 0xe7, 0x1a, 0xac, 0x2d, 0x64, 0x82, + 0xe6, 0x8f, 0xfe, 0xd1, 0x00, 0x1e, 0xe8, 0xdd, 0x22, 0xf0, 0x29, 0x60, 0x09, 0x78, 0x81, 0x9c, + 0xba, 0xcb, 0xec, 0x1b, 0xbf, 0x91, 0x40, 0x40, 0x5f, 0xa2, 0x9d, 0xf0, 0x49, 0x1f, 0x91, 0x08, + 0x44, 0x75, 0x21, 0x12, 0x2d, 0x4e, 0xa4, 0x51, 0xd3, 0x33, 0xf6, 0x37, 0x3f, 0xb3, 0x5c, 0x66, + 0x77, 0x8b, 0xbe, 0x7e, 0x8b, 0x20, 0x46, 0xc2, 0x97, 0xcd, 0x59, 0x6c, 0x52, 0xf6, 0x53, 0x88, + 0x04, 0x42, 0xef, 0x62, 0x93, 0xd2, 0xbf, 0x93, 0x4e, 0x69, 0xa4, 0x2f, 0x2a, 0x6c, 0xca, 0x9f, + 0xb1, 0x29, 0xaf, 0x85, 0x47, 0xeb, 0x22, 0xeb, 0x65, 0x7d, 0x32, 0xde, 0x1e, 0xf5, 0x07, 0xbc, + 0x5d, 0x1a, 0x09, 0x85, 0x06, 0xcd, 0xd9, 0x7d, 0x1c, 0xf6, 0x31, 0x14, 0x33, 0xd2, 0x96, 0xd0, + 0x5a, 0x46, 0x5a, 0x57, 0x18, 0x99, 0xe2, 0x6e, 0xd2, 0xe4, 0xe7, 0x74, 0xf7, 0x21, 0xb9, 0x8a, + 0xd2, 0x01, 0xf0, 0x0a, 0x61, 0x9b, 0xf0, 0x7b, 0x06, 0x7c, 0x76, 0x9f, 0x93, 0x36, 0x8a, 0xf9, + 0x67, 0x90, 0xde, 0x24, 0x75, 0xff, 0x3e, 0x86, 0x5d, 0x27, 0x50, 0x9f, 0xae, 0x21, 0xdd, 0x37, + 0xa4, 0x83, 0x8a, 0x53, 0x19, 0xbb, 0xb9, 0xf1, 0x35, 0x95, 0xcb, 0x5c, 0xe0, 0xd3, 0xb7, 0xb0, + 0x26, 0x97, 0xf9, 0x3e, 0xd0, 0xbf, 0xab, 0xc7, 0xea, 0xef, 0xea, 0xb1, 0xfb, 0x5b, 0x85, 0x34, + 0x83, 0xb5, 0xff, 0xa2, 0x5d, 0xb2, 0xec, 0xce, 0x4a, 0xbf, 0x39, 0xad, 0x6e, 0xae, 0xf6, 0x16, + 0x0c, 0x01, 0x28, 0x47, 0x1e, 0xbd, 0x47, 0x96, 0x61, 0x85, 0xc2, 0x93, 0xda, 0x9b, 0xa4, 0x77, + 0xbe, 0x54, 0x71, 0xc4, 0x2f, 0x3e, 0xf7, 0xf3, 0x24, 0x81, 0x95, 0x78, 0xe9, 0xd2, 0x73, 0xef, + 0x41, 0xb0, 0xf9, 0x58, 0xca, 0x52, 0x14, 0xa5, 0xd4, 0x61, 0x49, 0x6a, 0x02, 0xb0, 0x57, 0x4a, + 0x4d, 0x37, 0x48, 0x73, 0xe1, 0x1c, 0x2e, 0x47, 0xed, 0x85, 0x2d, 0x0b, 0x94, 0x9f, 0xf3, 0x17, + 0xf1, 0xa9, 0x63, 0x57, 0x63, 0x7c, 0xfe, 0xbd, 0x14, 0x56, 0x3d, 0x0c, 0xfc, 0xff, 0xe3, 0x13, + 0x23, 0x8d, 0x85, 0xb1, 0xb0, 0x54, 0x36, 0xf9, 0x82, 0xa4, 0x0f, 0xc8, 0x32, 0x24, 0x1d, 0x7d, + 0x38, 0x7f, 0xe6, 0xcf, 0xcb, 0x80, 0x23, 0x93, 0x3e, 0x26, 0x8d, 0x90, 0x6b, 0xf4, 0xa4, 0xbd, + 0x49, 0x7b, 0x9f, 0x14, 0x00, 0x5f, 0x88, 0xd0, 0x2f, 0x49, 0xdd, 0x87, 0x22, 0xb8, 0xb6, 0xd2, + 0xbb, 0x50, 0x06, 0x3c, 0xf0, 0xc2, 0x76, 0x55, 0xff, 0xd3, 0xed, 0xea, 0x36, 0xa4, 0x4f, 0x48, + 0x63, 0x74, 0x81, 0xbb, 0x5f, 0x8d, 0x37, 0x12, 0x33, 0x00, 0xf2, 0x52, 0x14, 0x9b, 0x7f, 0x12, + 0xc5, 0x3b, 0x10, 0x32, 0x38, 0x26, 0xb7, 0x33, 0xdc, 0x03, 0x5b, 0xbc, 0x89, 0xe7, 0xe4, 0x76, + 0x06, 0x4b, 0xc6, 0x89, 0x34, 0x56, 0x15, 0x1a, 0x77, 0xc0, 0xf6, 0xe2, 0x39, 0x0b, 0x20, 0x5f, + 0x70, 0xb1, 0x86, 0x71, 0x96, 0xe1, 0x5a, 0x58, 0xe3, 0x81, 0xea, 0xfe, 0xa7, 0x42, 0x56, 0x2e, + 0x6a, 0xc0, 0x1c, 0xcd, 0xe3, 0xf7, 0x85, 0x11, 0x7a, 0x9e, 0x1f, 0x4a, 0xb3, 0x58, 0xbf, 0x11, + 0xdb, 0x45, 0x08, 0x45, 0x94, 0xfe, 0x28, 0x52, 0x0d, 0x22, 0x80, 0x05, 0x91, 0xeb, 0xa4, 0x36, + 0x53, 0x2e, 0xfc, 0x4a, 0xb5, 0xb8, 0x27, 0xa0, 0x35, 0xed, 0xfc, 0xd0, 0x6f, 0xb4, 0xcb, 0x61, + 0xc0, 0x06, 0x1a, 0x34, 0xf0, 0xcf, 0x04, 0x43, 0x5f, 0xe3, 0x9e, 0x80, 0xd5, 0x13, 0xde, 0x36, + 0x8c, 0x76, 0x8b, 0xe3, 0xf7, 0x86, 0x08, 0x16, 0x87, 0x27, 0x9b, 0x12, 0x52, 0x1f, 0xbd, 0xde, + 0xdd, 0xe3, 0x83, 0xe8, 0x33, 0xda, 0x26, 0x8d, 0xfe, 0x6b, 0xb1, 0xbb, 0xb7, 0x3b, 0x88, 0x2a, + 0xb4, 0x45, 0x6a, 0x63, 0xbe, 0x37, 0x9e, 0x44, 0x55, 0xda, 0x24, 0xcb, 0x93, 0xbd, 0xe1, 0x7e, + 0xb4, 0x04, 0x5f, 0xc3, 0x83, 0xed, 0xed, 0x68, 0x19, 0xf4, 0x26, 0xfb, 0x7c, 0xd4, 0xdf, 0x8f, + 0x6a, 0xa0, 0xb7, 0x35, 0x18, 0xbe, 0x3a, 0xd8, 0xde, 0x8f, 0xea, 0x1b, 0xdf, 0x10, 0xfa, 0xe9, + 0xf8, 0x41, 0x71, 0x1c, 0x40, 0x51, 0x05, 0xc4, 0xdf, 0xee, 0x08, 0x3e, 0x78, 0xb5, 0x15, 0x55, + 0x37, 0x7e, 0xab, 0x84, 0xae, 0x5f, 0x94, 0x2e, 0x5c, 0x3c, 0xd8, 0x19, 0xef, 0xbf, 0x8b, 0x3e, + 0x83, 0xeb, 0xb6, 0x0e, 0x76, 0xc6, 0x5e, 0x87, 0x0f, 0x26, 0xfb, 0x60, 0x67, 0x15, 0x24, 0xfa, + 0xbf, 0x0c, 0xfa, 0x6f, 0xa2, 0x25, 0xba, 0x42, 0x9a, 0x63, 0x3e, 0x10, 0x28, 0xb5, 0x4c, 0xaf, + 0x90, 0xf6, 0xf8, 0xd5, 0xeb, 0x81, 0x98, 0x0c, 0xf8, 0xdb, 0x01, 0x8f, 0x6a, 0x70, 0xed, 0xee, + 0xde, 0xfe, 0x68, 0xf8, 0x2e, 0xaa, 0xd3, 0x88, 0xac, 0xf4, 0xc7, 0x07, 0xa3, 0xdd, 0xe1, 0x9e, + 0x17, 0x6f, 0xd0, 0xab, 0xa4, 0xb3, 0x40, 0xfc, 0x79, 0x4d, 0x80, 0x86, 0x83, 0x57, 0xfb, 0x07, + 0x7c, 0x10, 0xa0, 0x16, 0x9a, 0x3b, 0xe0, 0x93, 0xd1, 0xde, 0x6e, 0x44, 0xe0, 0xbe, 0x7f, 0xbe, + 0x1a, 0xed, 0x8b, 0xf1, 0x68, 0x2b, 0x6a, 0xd3, 0xeb, 0x24, 0xba, 0x70, 0x9f, 0xe8, 0xff, 0xb2, + 0xbd, 0x15, 0xad, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x45, 0x96, 0x6d, 0x5e, 0x0f, 0x00, + 0x00, +} diff --git a/vendor/github.com/cilium/ebpf/abi.go b/vendor/github.com/cilium/ebpf/abi.go index 999b8cc8597..d432eb46f42 100644 --- a/vendor/github.com/cilium/ebpf/abi.go +++ b/vendor/github.com/cilium/ebpf/abi.go @@ -1,143 +1,89 @@ package ebpf import ( - "github.com/pkg/errors" + "bufio" + "bytes" + "errors" + "fmt" + "io" + "os" + "syscall" + + "github.com/cilium/ebpf/internal" ) -// CollectionABI describes the interface of an eBPF collection. -type CollectionABI struct { - Maps map[string]*MapABI - Programs map[string]*ProgramABI -} - -// CheckSpec verifies that all maps and programs mentioned -// in the ABI are present in the spec. -func (abi *CollectionABI) CheckSpec(cs *CollectionSpec) error { - for name := range abi.Maps { - if cs.Maps[name] == nil { - return errors.Errorf("missing map %s", name) - } - } - - for name := range abi.Programs { - if cs.Programs[name] == nil { - return errors.Errorf("missing program %s", name) - } - } - - return nil -} - -// Check verifies that all items in a collection conform to this ABI. -func (abi *CollectionABI) Check(coll *Collection) error { - for name, mapABI := range abi.Maps { - m := coll.Maps[name] - if m == nil { - return errors.Errorf("missing map %s", name) - } - if err := mapABI.Check(m); err != nil { - return errors.Wrapf(err, "map %s", name) - } - } - - for name, progABI := range abi.Programs { - p := coll.Programs[name] - if p == nil { - return errors.Errorf("missing program %s", name) - } - if err := progABI.Check(p); err != nil { - return errors.Wrapf(err, "program %s", name) - } - } - - return nil -} - -// MapABI describes a Map. -// -// Use it to assert that a Map matches what your code expects. +// MapABI are the attributes of a Map which are available across all supported kernels. type MapABI struct { Type MapType KeySize uint32 ValueSize uint32 MaxEntries uint32 - InnerMap *MapABI + Flags uint32 } func newMapABIFromSpec(spec *MapSpec) *MapABI { - var inner *MapABI - if spec.InnerMap != nil { - inner = newMapABIFromSpec(spec.InnerMap) - } - return &MapABI{ spec.Type, spec.KeySize, spec.ValueSize, spec.MaxEntries, - inner, + spec.Flags, } } -func newMapABIFromFd(fd *bpfFD) (*MapABI, error) { +func newMapABIFromFd(fd *internal.FD) (string, *MapABI, error) { info, err := bpfGetMapInfoByFD(fd) if err != nil { - return nil, err + if errors.Is(err, syscall.EINVAL) { + abi, err := newMapABIFromProc(fd) + return "", abi, err + } + return "", nil, err } - mapType := MapType(info.mapType) - if mapType == ArrayOfMaps || mapType == HashOfMaps { - return nil, errors.New("can't get map info for nested maps") - } - - return &MapABI{ - mapType, + return "", &MapABI{ + MapType(info.mapType), info.keySize, info.valueSize, info.maxEntries, - nil, + info.flags, }, nil } -// Check verifies that a Map conforms to the ABI. -// -// Members of ABI which have the zero value of their type are not checked. -func (abi *MapABI) Check(m *Map) error { - return abi.check(&m.abi) +func newMapABIFromProc(fd *internal.FD) (*MapABI, error) { + var abi MapABI + err := scanFdInfo(fd, map[string]interface{}{ + "map_type": &abi.Type, + "key_size": &abi.KeySize, + "value_size": &abi.ValueSize, + "max_entries": &abi.MaxEntries, + "map_flags": &abi.Flags, + }) + if err != nil { + return nil, err + } + return &abi, nil } -func (abi *MapABI) check(other *MapABI) error { - if abi.Type != UnspecifiedMap && other.Type != abi.Type { - return errors.Errorf("expected map type %s, have %s", abi.Type, other.Type) +// Equal returns true if two ABIs have the same values. +func (abi *MapABI) Equal(other *MapABI) bool { + switch { + case abi.Type != other.Type: + return false + case abi.KeySize != other.KeySize: + return false + case abi.ValueSize != other.ValueSize: + return false + case abi.MaxEntries != other.MaxEntries: + return false + case abi.Flags != other.Flags: + return false + default: + return true } - if err := checkUint32("key size", abi.KeySize, other.KeySize); err != nil { - return err - } - if err := checkUint32("value size", abi.ValueSize, other.ValueSize); err != nil { - return err - } - if err := checkUint32("max entries", abi.MaxEntries, other.MaxEntries); err != nil { - return err - } - - if abi.InnerMap == nil { - if abi.Type == ArrayOfMaps || abi.Type == HashOfMaps { - return errors.New("missing inner map ABI") - } - - return nil - } - - if other.InnerMap == nil { - return errors.New("missing inner map") - } - - return errors.Wrap(abi.InnerMap.check(other.InnerMap), "inner map") } -// ProgramABI describes a Program. -// -// Use it to assert that a Program matches what your code expects. +// ProgramABI are the attributes of a Program which are available across all supported kernels. type ProgramABI struct { Type ProgramType } @@ -148,36 +94,113 @@ func newProgramABIFromSpec(spec *ProgramSpec) *ProgramABI { } } -func newProgramABIFromFd(fd *bpfFD) (*ProgramABI, error) { +func newProgramABIFromFd(fd *internal.FD) (string, *ProgramABI, error) { info, err := bpfGetProgInfoByFD(fd) if err != nil { - return nil, err + if errors.Is(err, syscall.EINVAL) { + return newProgramABIFromProc(fd) + } + + return "", nil, err } - return newProgramABIFromInfo(info), nil -} + var name string + if bpfName := internal.CString(info.name[:]); bpfName != "" { + name = bpfName + } else { + name = internal.CString(info.tag[:]) + } -func newProgramABIFromInfo(info *bpfProgInfo) *ProgramABI { - return &ProgramABI{ + return name, &ProgramABI{ Type: ProgramType(info.progType), - } + }, nil } -// Check verifies that a Program conforms to the ABI. -// -// Members which have the zero value of their type -// are not checked. -func (abi *ProgramABI) Check(prog *Program) error { - if abi.Type != UnspecifiedProgram && prog.abi.Type != abi.Type { - return errors.Errorf("expected program type %s, have %s", abi.Type, prog.abi.Type) +func newProgramABIFromProc(fd *internal.FD) (string, *ProgramABI, error) { + var ( + abi ProgramABI + name string + ) + + err := scanFdInfo(fd, map[string]interface{}{ + "prog_type": &abi.Type, + "prog_tag": &name, + }) + if errors.Is(err, errMissingFields) { + return "", nil, &internal.UnsupportedFeatureError{ + Name: "reading ABI from /proc/self/fdinfo", + MinimumVersion: internal.Version{4, 11, 0}, + } + } + if err != nil { + return "", nil, err + } + + return name, &abi, nil +} + +func scanFdInfo(fd *internal.FD, fields map[string]interface{}) error { + raw, err := fd.Value() + if err != nil { + return err + } + + fh, err := os.Open(fmt.Sprintf("/proc/self/fdinfo/%d", raw)) + if err != nil { + return err + } + defer fh.Close() + + if err := scanFdInfoReader(fh, fields); err != nil { + return fmt.Errorf("%s: %w", fh.Name(), err) + } + return nil +} + +var errMissingFields = errors.New("missing fields") + +func scanFdInfoReader(r io.Reader, fields map[string]interface{}) error { + var ( + scanner = bufio.NewScanner(r) + scanned int + ) + + for scanner.Scan() { + parts := bytes.SplitN(scanner.Bytes(), []byte("\t"), 2) + if len(parts) != 2 { + continue + } + + name := bytes.TrimSuffix(parts[0], []byte(":")) + field, ok := fields[string(name)] + if !ok { + continue + } + + if n, err := fmt.Fscanln(bytes.NewReader(parts[1]), field); err != nil || n != 1 { + return fmt.Errorf("can't parse field %s: %v", name, err) + } + + scanned++ + } + + if err := scanner.Err(); err != nil { + return err + } + + if scanned != len(fields) { + return errMissingFields } return nil } -func checkUint32(name string, want, have uint32) error { - if want != 0 && have != want { - return errors.Errorf("expected %s to be %d, have %d", name, want, have) +// Equal returns true if two ABIs have the same values. +func (abi *ProgramABI) Equal(other *ProgramABI) bool { + switch { + case abi.Type != other.Type: + return false + default: + return true } - return nil } diff --git a/vendor/github.com/cilium/ebpf/asm/instruction.go b/vendor/github.com/cilium/ebpf/asm/instruction.go index c8ed6cfb494..8fbcf56647c 100644 --- a/vendor/github.com/cilium/ebpf/asm/instruction.go +++ b/vendor/github.com/cilium/ebpf/asm/instruction.go @@ -2,12 +2,11 @@ package asm import ( "encoding/binary" + "errors" "fmt" "io" "math" "strings" - - "github.com/pkg/errors" ) // InstructionSize is the size of a BPF instruction in bytes @@ -39,10 +38,12 @@ func (ins *Instruction) Unmarshal(r io.Reader, bo binary.ByteOrder) (uint64, err } ins.OpCode = bi.OpCode - ins.Dst = bi.Registers.Dst() - ins.Src = bi.Registers.Src() ins.Offset = bi.Offset ins.Constant = int64(bi.Constant) + ins.Dst, ins.Src, err = bi.Registers.Unmarshal(bo) + if err != nil { + return 0, fmt.Errorf("can't unmarshal registers: %s", err) + } if !bi.OpCode.isDWordLoad() { return InstructionSize, nil @@ -75,9 +76,14 @@ func (ins Instruction) Marshal(w io.Writer, bo binary.ByteOrder) (uint64, error) cons = int32(uint32(ins.Constant)) } + regs, err := newBPFRegisters(ins.Dst, ins.Src, bo) + if err != nil { + return 0, fmt.Errorf("can't marshal registers: %s", err) + } + bpfi := bpfInstruction{ ins.OpCode, - newBPFRegisters(ins.Dst, ins.Src), + regs, ins.Offset, cons, } @@ -103,22 +109,52 @@ func (ins Instruction) Marshal(w io.Writer, bo binary.ByteOrder) (uint64, error) // RewriteMapPtr changes an instruction to use a new map fd. // -// Returns an error if the fd is invalid, or the instruction -// is incorrect. +// Returns an error if the instruction doesn't load a map. func (ins *Instruction) RewriteMapPtr(fd int) error { if !ins.OpCode.isDWordLoad() { - return errors.Errorf("%s is not a 64 bit load", ins.OpCode) + return fmt.Errorf("%s is not a 64 bit load", ins.OpCode) } - if fd < 0 { - return errors.New("invalid fd") + if ins.Src != PseudoMapFD && ins.Src != PseudoMapValue { + return errors.New("not a load from a map") } - ins.Src = R1 - ins.Constant = int64(fd) + // Preserve the offset value for direct map loads. + offset := uint64(ins.Constant) & (math.MaxUint32 << 32) + rawFd := uint64(uint32(fd)) + ins.Constant = int64(offset | rawFd) return nil } +func (ins *Instruction) mapPtr() uint32 { + return uint32(uint64(ins.Constant) & math.MaxUint32) +} + +// RewriteMapOffset changes the offset of a direct load from a map. +// +// Returns an error if the instruction is not a direct load. +func (ins *Instruction) RewriteMapOffset(offset uint32) error { + if !ins.OpCode.isDWordLoad() { + return fmt.Errorf("%s is not a 64 bit load", ins.OpCode) + } + + if ins.Src != PseudoMapValue { + return errors.New("not a direct load from a map") + } + + fd := uint64(ins.Constant) & math.MaxUint32 + ins.Constant = int64(uint64(offset)<<32 | fd) + return nil +} + +func (ins *Instruction) mapOffset() uint32 { + return uint32(uint64(ins.Constant) >> 32) +} + +func (ins *Instruction) isLoadFromMap() bool { + return ins.OpCode == LoadImmOp(DWord) && (ins.Src == PseudoMapFD || ins.Src == PseudoMapValue) +} + // Format implements fmt.Formatter. func (ins Instruction) Format(f fmt.State, c rune) { if c != 'v' { @@ -139,6 +175,19 @@ func (ins Instruction) Format(f fmt.State, c rune) { return } + if ins.isLoadFromMap() { + fd := int32(ins.mapPtr()) + switch ins.Src { + case PseudoMapFD: + fmt.Fprintf(f, "LoadMapPtr dst: %s fd: %d", ins.Dst, fd) + + case PseudoMapValue: + fmt.Fprintf(f, "LoadMapValue dst: %s, fd: %d off: %d", ins.Dst, fd, ins.mapOffset()) + } + + goto ref + } + fmt.Fprintf(f, "%v ", op) switch cls := op.Class(); cls { case LdClass, LdXClass, StClass, StXClass: @@ -166,7 +215,7 @@ func (ins Instruction) Format(f fmt.State, c rune) { case JumpClass: switch jop := op.JumpOp(); jop { case Call: - if ins.Src == R1 { + if ins.Src == PseudoCall { // bpf-to-bpf call fmt.Fprint(f, ins.Constant) } else { @@ -183,6 +232,7 @@ func (ins Instruction) Format(f fmt.State, c rune) { } } +ref: if ins.Reference != "" { fmt.Fprintf(f, " <%s>", ins.Reference) } @@ -235,7 +285,7 @@ func (insns Instructions) SymbolOffsets() (map[string]int, error) { } if _, ok := offsets[ins.Symbol]; ok { - return nil, errors.Errorf("duplicate symbol %s", ins.Symbol) + return nil, fmt.Errorf("duplicate symbol %s", ins.Symbol) } offsets[ins.Symbol] = i @@ -273,7 +323,7 @@ func (insns Instructions) marshalledOffsets() (map[string]int, error) { } if _, ok := symbols[ins.Symbol]; ok { - return nil, errors.Errorf("duplicate symbol %s", ins.Symbol) + return nil, fmt.Errorf("duplicate symbol %s", ins.Symbol) } symbols[ins.Symbol] = currentPos @@ -350,11 +400,11 @@ func (insns Instructions) Marshal(w io.Writer, bo binary.ByteOrder) error { num := 0 for i, ins := range insns { switch { - case ins.OpCode.JumpOp() == Call && ins.Constant == -1: + case ins.OpCode.JumpOp() == Call && ins.Src == PseudoCall && ins.Constant == -1: // Rewrite bpf to bpf call offset, ok := absoluteOffsets[ins.Reference] if !ok { - return errors.Errorf("instruction %d: reference to missing symbol %s", i, ins.Reference) + return fmt.Errorf("instruction %d: reference to missing symbol %s", i, ins.Reference) } ins.Constant = int64(offset - num - 1) @@ -363,7 +413,7 @@ func (insns Instructions) Marshal(w io.Writer, bo binary.ByteOrder) error { // Rewrite jump to label offset, ok := absoluteOffsets[ins.Reference] if !ok { - return errors.Errorf("instruction %d: reference to missing symbol %s", i, ins.Reference) + return fmt.Errorf("instruction %d: reference to missing symbol %s", i, ins.Reference) } ins.Offset = int16(offset - num - 1) @@ -371,7 +421,7 @@ func (insns Instructions) Marshal(w io.Writer, bo binary.ByteOrder) error { n, err := ins.Marshal(w, bo) if err != nil { - return errors.Wrapf(err, "instruction %d", i) + return fmt.Errorf("instruction %d: %w", i, err) } num += int(n / InstructionSize) @@ -388,16 +438,26 @@ type bpfInstruction struct { type bpfRegisters uint8 -func newBPFRegisters(dst, src Register) bpfRegisters { - return bpfRegisters((src << 4) | (dst & 0xF)) +func newBPFRegisters(dst, src Register, bo binary.ByteOrder) (bpfRegisters, error) { + switch bo { + case binary.LittleEndian: + return bpfRegisters((src << 4) | (dst & 0xF)), nil + case binary.BigEndian: + return bpfRegisters((dst << 4) | (src & 0xF)), nil + default: + return 0, fmt.Errorf("unrecognized ByteOrder %T", bo) + } } -func (r bpfRegisters) Dst() Register { - return Register(r & 0xF) -} - -func (r bpfRegisters) Src() Register { - return Register(r >> 4) +func (r bpfRegisters) Unmarshal(bo binary.ByteOrder) (dst, src Register, err error) { + switch bo { + case binary.LittleEndian: + return Register(r & 0xF), Register(r >> 4), nil + case binary.BigEndian: + return Register(r >> 4), Register(r & 0xf), nil + default: + return 0, 0, fmt.Errorf("unrecognized ByteOrder %T", bo) + } } type unreferencedSymbolError struct { diff --git a/vendor/github.com/cilium/ebpf/asm/jump.go b/vendor/github.com/cilium/ebpf/asm/jump.go index 33c9b565621..7757179de64 100644 --- a/vendor/github.com/cilium/ebpf/asm/jump.go +++ b/vendor/github.com/cilium/ebpf/asm/jump.go @@ -95,7 +95,7 @@ func (op JumpOp) Label(label string) Instruction { if op == Call { return Instruction{ OpCode: OpCode(JumpClass).SetJumpOp(Call), - Src: R1, + Src: PseudoCall, Constant: -1, Reference: label, } diff --git a/vendor/github.com/cilium/ebpf/asm/load_store.go b/vendor/github.com/cilium/ebpf/asm/load_store.go index ab0e92fc3cb..2d0ec648e88 100644 --- a/vendor/github.com/cilium/ebpf/asm/load_store.go +++ b/vendor/github.com/cilium/ebpf/asm/load_store.go @@ -110,11 +110,26 @@ func LoadMapPtr(dst Register, fd int) Instruction { return Instruction{ OpCode: LoadImmOp(DWord), Dst: dst, - Src: R1, + Src: PseudoMapFD, Constant: int64(fd), } } +// LoadMapValue stores a pointer to the value at a certain offset of a map. +func LoadMapValue(dst Register, fd int, offset uint32) Instruction { + if fd < 0 { + return Instruction{OpCode: InvalidOpCode} + } + + fdAndOffset := (uint64(offset) << 32) | uint64(uint32(fd)) + return Instruction{ + OpCode: LoadImmOp(DWord), + Dst: dst, + Src: PseudoMapValue, + Constant: int64(fdAndOffset), + } +} + // LoadIndOp returns the OpCode for loading a value of given size from an sk_buff. func LoadIndOp(size Size) OpCode { return OpCode(LdClass).SetMode(IndMode).SetSize(size) diff --git a/vendor/github.com/cilium/ebpf/asm/opcode.go b/vendor/github.com/cilium/ebpf/asm/opcode.go index d796de3fe0c..c99b6595ac5 100644 --- a/vendor/github.com/cilium/ebpf/asm/opcode.go +++ b/vendor/github.com/cilium/ebpf/asm/opcode.go @@ -225,7 +225,7 @@ func (op OpCode) String() string { } default: - fmt.Fprintf(&f, "%#x", op) + fmt.Fprintf(&f, "OpCode(%#x)", uint8(op)) } return f.String() diff --git a/vendor/github.com/cilium/ebpf/asm/register.go b/vendor/github.com/cilium/ebpf/asm/register.go index 4f284fbe7d9..76cb44bffc7 100644 --- a/vendor/github.com/cilium/ebpf/asm/register.go +++ b/vendor/github.com/cilium/ebpf/asm/register.go @@ -33,6 +33,13 @@ const ( RFP = R10 ) +// Pseudo registers used by 64bit loads and jumps +const ( + PseudoMapFD = R1 // BPF_PSEUDO_MAP_FD + PseudoMapValue = R2 // BPF_PSEUDO_MAP_VALUE + PseudoCall = R1 // BPF_PSEUDO_CALL +) + func (r Register) String() string { v := uint8(r) if v == 10 { diff --git a/vendor/github.com/cilium/ebpf/collection.go b/vendor/github.com/cilium/ebpf/collection.go index 5ad1a5ec4b7..0c8b65d94de 100644 --- a/vendor/github.com/cilium/ebpf/collection.go +++ b/vendor/github.com/cilium/ebpf/collection.go @@ -1,8 +1,13 @@ package ebpf import ( + "errors" + "fmt" + "math" + "github.com/cilium/ebpf/asm" - "github.com/pkg/errors" + "github.com/cilium/ebpf/internal" + "github.com/cilium/ebpf/internal/btf" ) // CollectionOptions control loading a collection into the kernel. @@ -38,6 +43,89 @@ func (cs *CollectionSpec) Copy() *CollectionSpec { return &cpy } +// RewriteMaps replaces all references to specific maps. +// +// Use this function to use pre-existing maps instead of creating new ones +// when calling NewCollection. Any named maps are removed from CollectionSpec.Maps. +// +// Returns an error if a named map isn't used in at least one program. +func (cs *CollectionSpec) RewriteMaps(maps map[string]*Map) error { + for symbol, m := range maps { + // have we seen a program that uses this symbol / map + seen := false + fd := m.FD() + for progName, progSpec := range cs.Programs { + err := progSpec.Instructions.RewriteMapPtr(symbol, fd) + + switch { + case err == nil: + seen = true + + case asm.IsUnreferencedSymbol(err): + // Not all programs need to use the map + + default: + return fmt.Errorf("program %s: %w", progName, err) + } + } + + if !seen { + return fmt.Errorf("map %s not referenced by any programs", symbol) + } + + // Prevent NewCollection from creating rewritten maps + delete(cs.Maps, symbol) + } + + return nil +} + +// RewriteConstants replaces the value of multiple constants. +// +// The constant must be defined like so in the C program: +// +// static volatile const type foobar; +// static volatile const type foobar = default; +// +// Replacement values must be of the same length as the C sizeof(type). +// If necessary, they are marshalled according to the same rules as +// map values. +// +// From Linux 5.5 the verifier will use constants to eliminate dead code. +// +// Returns an error if a constant doesn't exist. +func (cs *CollectionSpec) RewriteConstants(consts map[string]interface{}) error { + rodata := cs.Maps[".rodata"] + if rodata == nil { + return errors.New("missing .rodata section") + } + + if rodata.BTF == nil { + return errors.New(".rodata section has no BTF") + } + + if n := len(rodata.Contents); n != 1 { + return fmt.Errorf("expected one key in .rodata, found %d", n) + } + + kv := rodata.Contents[0] + value, ok := kv.Value.([]byte) + if !ok { + return fmt.Errorf("first value in .rodata is %T not []byte", kv.Value) + } + + buf := make([]byte, len(value)) + copy(buf, value) + + err := patchValue(buf, btf.MapValue(rodata.BTF), consts) + if err != nil { + return err + } + + rodata.Contents[0] = MapKV{kv.Key, buf} + return nil +} + // Collection is a collection of Programs and Maps associated // with their symbols type Collection struct { @@ -55,45 +143,103 @@ func NewCollection(spec *CollectionSpec) (*Collection, error) { // NewCollectionWithOptions creates a Collection from a specification. // // Only maps referenced by at least one of the programs are initialized. -func NewCollectionWithOptions(spec *CollectionSpec, opts CollectionOptions) (*Collection, error) { - maps := make(map[string]*Map) - for mapName, mapSpec := range spec.Maps { - m, err := NewMap(mapSpec) +func NewCollectionWithOptions(spec *CollectionSpec, opts CollectionOptions) (coll *Collection, err error) { + var ( + maps = make(map[string]*Map) + progs = make(map[string]*Program) + btfs = make(map[*btf.Spec]*btf.Handle) + ) + + defer func() { + for _, btf := range btfs { + btf.Close() + } + + if err == nil { + return + } + + for _, m := range maps { + m.Close() + } + + for _, p := range progs { + p.Close() + } + }() + + loadBTF := func(spec *btf.Spec) (*btf.Handle, error) { + if btfs[spec] != nil { + return btfs[spec], nil + } + + handle, err := btf.NewHandle(spec) if err != nil { - return nil, errors.Wrapf(err, "map %s", mapName) + return nil, err + } + + btfs[spec] = handle + return handle, nil + } + + for mapName, mapSpec := range spec.Maps { + var handle *btf.Handle + if mapSpec.BTF != nil { + handle, err = loadBTF(btf.MapSpec(mapSpec.BTF)) + if err != nil && !errors.Is(err, btf.ErrNotSupported) { + return nil, err + } + } + + m, err := newMapWithBTF(mapSpec, handle) + if err != nil { + return nil, fmt.Errorf("map %s: %w", mapName, err) } maps[mapName] = m } - progs := make(map[string]*Program) for progName, origProgSpec := range spec.Programs { progSpec := origProgSpec.Copy() // Rewrite any reference to a valid map. for i := range progSpec.Instructions { - var ( - ins = &progSpec.Instructions[i] - m = maps[ins.Reference] - ) + ins := &progSpec.Instructions[i] - if ins.Reference == "" || m == nil { + if ins.OpCode != asm.LoadImmOp(asm.DWord) || ins.Reference == "" { continue } - if ins.Src == asm.R1 { + if uint32(ins.Constant) != math.MaxUint32 { // Don't overwrite maps already rewritten, users can // rewrite programs in the spec themselves continue } + m := maps[ins.Reference] + if m == nil { + return nil, fmt.Errorf("program %s: missing map %s", progName, ins.Reference) + } + + fd := m.FD() + if fd < 0 { + return nil, fmt.Errorf("map %s: %w", ins.Reference, internal.ErrClosedFd) + } if err := ins.RewriteMapPtr(m.FD()); err != nil { - return nil, errors.Wrapf(err, "progam %s: map %s", progName, ins.Reference) + return nil, fmt.Errorf("progam %s: map %s: %w", progName, ins.Reference, err) } } - prog, err := NewProgramWithOptions(progSpec, opts.Programs) + var handle *btf.Handle + if progSpec.BTF != nil { + handle, err = loadBTF(btf.ProgramSpec(progSpec.BTF)) + if err != nil && !errors.Is(err, btf.ErrNotSupported) { + return nil, err + } + } + + prog, err := newProgramWithBTF(progSpec, handle, opts.Programs) if err != nil { - return nil, errors.Wrapf(err, "program %s", progName) + return nil, fmt.Errorf("program %s: %w", progName, err) } progs[progName] = prog } diff --git a/vendor/github.com/cilium/ebpf/elf_reader.go b/vendor/github.com/cilium/ebpf/elf_reader.go index 3bdc0849bdd..77acaed8d96 100644 --- a/vendor/github.com/cilium/ebpf/elf_reader.go +++ b/vendor/github.com/cilium/ebpf/elf_reader.go @@ -4,20 +4,25 @@ import ( "bytes" "debug/elf" "encoding/binary" + "errors" "fmt" "io" + "math" "os" "strings" "github.com/cilium/ebpf/asm" - - "github.com/pkg/errors" + "github.com/cilium/ebpf/internal" + "github.com/cilium/ebpf/internal/btf" + "github.com/cilium/ebpf/internal/unix" ) type elfCode struct { *elf.File symbols []elf.Symbol - symbolsPerSection map[elf.SectionIndex]map[uint64]string + symbolsPerSection map[elf.SectionIndex]map[uint64]elf.Symbol + license string + version uint32 } // LoadCollectionSpec parses an ELF file into a CollectionSpec. @@ -29,12 +34,15 @@ func LoadCollectionSpec(file string) (*CollectionSpec, error) { defer f.Close() spec, err := LoadCollectionSpecFromReader(f) - return spec, errors.Wrapf(err, "file %s", file) + if err != nil { + return nil, fmt.Errorf("file %s: %w", file, err) + } + return spec, nil } // LoadCollectionSpecFromReader parses an ELF file into a CollectionSpec. -func LoadCollectionSpecFromReader(code io.ReaderAt) (*CollectionSpec, error) { - f, err := elf.NewFile(code) +func LoadCollectionSpecFromReader(rd io.ReaderAt) (*CollectionSpec, error) { + f, err := elf.NewFile(rd) if err != nil { return nil, err } @@ -42,15 +50,21 @@ func LoadCollectionSpecFromReader(code io.ReaderAt) (*CollectionSpec, error) { symbols, err := f.Symbols() if err != nil { - return nil, errors.Wrap(err, "load symbols") + return nil, fmt.Errorf("load symbols: %v", err) } - ec := &elfCode{f, symbols, symbolsPerSection(symbols)} + ec := &elfCode{f, symbols, symbolsPerSection(symbols), "", 0} + + var ( + licenseSection *elf.Section + versionSection *elf.Section + btfMaps = make(map[elf.SectionIndex]*elf.Section) + progSections = make(map[elf.SectionIndex]*elf.Section) + relSections = make(map[elf.SectionIndex]*elf.Section) + mapSections = make(map[elf.SectionIndex]*elf.Section) + dataSections = make(map[elf.SectionIndex]*elf.Section) + ) - var licenseSection, versionSection *elf.Section - progSections := make(map[elf.SectionIndex]*elf.Section) - relSections := make(map[elf.SectionIndex]*elf.Section) - mapSections := make(map[elf.SectionIndex]*elf.Section) for i, sec := range ec.Sections { switch { case strings.HasPrefix(sec.Name, "license"): @@ -59,15 +73,19 @@ func LoadCollectionSpecFromReader(code io.ReaderAt) (*CollectionSpec, error) { versionSection = sec case strings.HasPrefix(sec.Name, "maps"): mapSections[elf.SectionIndex(i)] = sec + case sec.Name == ".maps": + btfMaps[elf.SectionIndex(i)] = sec + case sec.Name == ".bss" || sec.Name == ".rodata" || sec.Name == ".data": + dataSections[elf.SectionIndex(i)] = sec case sec.Type == elf.SHT_REL: if int(sec.Info) >= len(ec.Sections) { - return nil, errors.Errorf("found relocation section %v for missing section %v", i, sec.Info) + return nil, fmt.Errorf("found relocation section %v for missing section %v", i, sec.Info) } // Store relocations under the section index of the target idx := elf.SectionIndex(sec.Info) if relSections[idx] != nil { - return nil, errors.Errorf("section %d has multiple relocation sections", idx) + return nil, fmt.Errorf("section %d has multiple relocation sections", sec.Info) } relSections[idx] = sec case sec.Type == elf.SHT_PROGBITS && (sec.Flags&elf.SHF_EXECINSTR) != 0 && sec.Size > 0: @@ -75,33 +93,54 @@ func LoadCollectionSpecFromReader(code io.ReaderAt) (*CollectionSpec, error) { } } - license, err := loadLicense(licenseSection) + ec.license, err = loadLicense(licenseSection) if err != nil { - return nil, errors.Wrap(err, "load license") + return nil, fmt.Errorf("load license: %w", err) } - version, err := loadVersion(versionSection, ec.ByteOrder) + ec.version, err = loadVersion(versionSection, ec.ByteOrder) if err != nil { - return nil, errors.Wrap(err, "load version") + return nil, fmt.Errorf("load version: %w", err) } - maps, err := ec.loadMaps(mapSections) + btfSpec, err := btf.LoadSpecFromReader(rd) if err != nil { - return nil, errors.Wrap(err, "load maps") + return nil, fmt.Errorf("load BTF: %w", err) } - progs, libs, err := ec.loadPrograms(progSections, relSections, license, version) + relocations, referencedSections, err := ec.loadRelocations(relSections) if err != nil { - return nil, errors.Wrap(err, "load programs") + return nil, fmt.Errorf("load relocations: %w", err) } - if len(libs) > 0 { - for name, prog := range progs { - prog.Instructions, err = link(prog.Instructions, libs...) - if err != nil { - return nil, errors.Wrapf(err, "program %s", name) + maps := make(map[string]*MapSpec) + if err := ec.loadMaps(maps, mapSections); err != nil { + return nil, fmt.Errorf("load maps: %w", err) + } + + if len(btfMaps) > 0 { + if err := ec.loadBTFMaps(maps, btfMaps, btfSpec); err != nil { + return nil, fmt.Errorf("load BTF maps: %w", err) + } + } + + if len(dataSections) > 0 { + for idx := range dataSections { + if !referencedSections[idx] { + // Prune data sections which are not referenced by any + // instructions. + delete(dataSections, idx) } } + + if err := ec.loadDataSections(maps, dataSections, btfSpec); err != nil { + return nil, fmt.Errorf("load data sections: %w", err) + } + } + + progs, err := ec.loadPrograms(progSections, relocations, btfSpec) + if err != nil { + return nil, fmt.Errorf("load programs: %w", err) } return &CollectionSpec{maps, progs}, nil @@ -109,11 +148,12 @@ func LoadCollectionSpecFromReader(code io.ReaderAt) (*CollectionSpec, error) { func loadLicense(sec *elf.Section) (string, error) { if sec == nil { - return "", errors.Errorf("missing license section") + return "", nil } + data, err := sec.Data() if err != nil { - return "", errors.Wrapf(err, "section %s", sec.Name) + return "", fmt.Errorf("section %s: %v", sec.Name, err) } return string(bytes.TrimRight(data, "\000")), nil } @@ -124,92 +164,228 @@ func loadVersion(sec *elf.Section, bo binary.ByteOrder) (uint32, error) { } var version uint32 - err := binary.Read(sec.Open(), bo, &version) - return version, errors.Wrapf(err, "section %s", sec.Name) + if err := binary.Read(sec.Open(), bo, &version); err != nil { + return 0, fmt.Errorf("section %s: %v", sec.Name, err) + } + return version, nil } -func (ec *elfCode) loadPrograms(progSections, relSections map[elf.SectionIndex]*elf.Section, license string, version uint32) (map[string]*ProgramSpec, []asm.Instructions, error) { +func (ec *elfCode) loadPrograms(progSections map[elf.SectionIndex]*elf.Section, relocations map[elf.SectionIndex]map[uint64]elf.Symbol, btfSpec *btf.Spec) (map[string]*ProgramSpec, error) { var ( - progs = make(map[string]*ProgramSpec) - libs []asm.Instructions + progs []*ProgramSpec + libs []*ProgramSpec ) - for idx, prog := range progSections { + + for idx, sec := range progSections { syms := ec.symbolsPerSection[idx] if len(syms) == 0 { - return nil, nil, errors.Errorf("section %v: missing symbols", prog.Name) + return nil, fmt.Errorf("section %v: missing symbols", sec.Name) } - funcSym := syms[0] - if funcSym == "" { - return nil, nil, errors.Errorf("section %v: no label at start", prog.Name) + funcSym, ok := syms[0] + if !ok { + return nil, fmt.Errorf("section %v: no label at start", sec.Name) } - rels, err := ec.loadRelocations(relSections[idx]) + insns, length, err := ec.loadInstructions(sec, syms, relocations[idx]) if err != nil { - return nil, nil, errors.Wrapf(err, "program %s: can't load relocations", funcSym) + return nil, fmt.Errorf("program %s: can't unmarshal instructions: %w", funcSym.Name, err) } - insns, err := ec.loadInstructions(prog, syms, rels) - if err != nil { - return nil, nil, errors.Wrapf(err, "program %s: can't unmarshal instructions", funcSym) + progType, attachType, attachTo := getProgType(sec.Name) + + spec := &ProgramSpec{ + Name: funcSym.Name, + Type: progType, + AttachType: attachType, + AttachTo: attachTo, + License: ec.license, + KernelVersion: ec.version, + Instructions: insns, + ByteOrder: ec.ByteOrder, } - if progType, attachType := getProgType(prog.Name); progType == UnspecifiedProgram { + if btfSpec != nil { + spec.BTF, err = btfSpec.Program(sec.Name, length) + if err != nil && !errors.Is(err, btf.ErrNoExtendedInfo) { + return nil, fmt.Errorf("program %s: %w", funcSym.Name, err) + } + } + + if spec.Type == UnspecifiedProgram { // There is no single name we can use for "library" sections, // since they may contain multiple functions. We'll decode the // labels they contain later on, and then link sections that way. - libs = append(libs, insns) + libs = append(libs, spec) } else { - progs[funcSym] = &ProgramSpec{ - Name: funcSym, - Type: progType, - AttachType: attachType, - License: license, - KernelVersion: version, - Instructions: insns, - } + progs = append(progs, spec) } } - return progs, libs, nil + + res := make(map[string]*ProgramSpec, len(progs)) + for _, prog := range progs { + err := link(prog, libs) + if err != nil { + return nil, fmt.Errorf("program %s: %w", prog.Name, err) + } + res[prog.Name] = prog + } + + return res, nil } -func (ec *elfCode) loadInstructions(section *elf.Section, symbols, relocations map[uint64]string) (asm.Instructions, error) { +func (ec *elfCode) loadInstructions(section *elf.Section, symbols, relocations map[uint64]elf.Symbol) (asm.Instructions, uint64, error) { var ( r = section.Open() insns asm.Instructions - ins asm.Instruction offset uint64 ) for { + var ins asm.Instruction n, err := ins.Unmarshal(r, ec.ByteOrder) if err == io.EOF { - return insns, nil + return insns, offset, nil } if err != nil { - return nil, errors.Wrapf(err, "offset %d", offset) + return nil, 0, fmt.Errorf("offset %d: %w", offset, err) } - ins.Symbol = symbols[offset] - ins.Reference = relocations[offset] + ins.Symbol = symbols[offset].Name + + if rel, ok := relocations[offset]; ok { + if err = ec.relocateInstruction(&ins, rel); err != nil { + return nil, 0, fmt.Errorf("offset %d: can't relocate instruction: %w", offset, err) + } + } insns = append(insns, ins) offset += n } } -func (ec *elfCode) loadMaps(mapSections map[elf.SectionIndex]*elf.Section) (map[string]*MapSpec, error) { +func (ec *elfCode) relocateInstruction(ins *asm.Instruction, rel elf.Symbol) error { var ( - maps = make(map[string]*MapSpec) - b = make([]byte, 1) + typ = elf.ST_TYPE(rel.Info) + bind = elf.ST_BIND(rel.Info) + name = rel.Name ) + + if typ == elf.STT_SECTION { + // Symbols with section type do not have a name set. Get it + // from the section itself. + idx := int(rel.Section) + if idx > len(ec.Sections) { + return errors.New("out-of-bounds section index") + } + + name = ec.Sections[idx].Name + } + +outer: + switch { + case ins.OpCode == asm.LoadImmOp(asm.DWord): + // There are two distinct types of a load from a map: + // a direct one, where the value is extracted without + // a call to map_lookup_elem in eBPF, and an indirect one + // that goes via the helper. They are distinguished by + // different relocations. + switch typ { + case elf.STT_SECTION: + // This is a direct load since the referenced symbol is a + // section. Weirdly, the offset of the real symbol in the + // section is encoded in the instruction stream. + if bind != elf.STB_LOCAL { + return fmt.Errorf("direct load: %s: unsupported relocation %s", name, bind) + } + + // For some reason, clang encodes the offset of the symbol its + // section in the first basic BPF instruction, while the kernel + // expects it in the second one. + ins.Constant <<= 32 + ins.Src = asm.PseudoMapValue + + case elf.STT_NOTYPE: + if bind == elf.STB_GLOBAL && rel.Section == elf.SHN_UNDEF { + // This is a relocation generated by inline assembly. + // We can't do more than assigning ins.Reference. + break outer + } + + // This is an ELF generated on clang < 8, which doesn't tag + // relocations appropriately. + fallthrough + + case elf.STT_OBJECT: + if bind != elf.STB_GLOBAL { + return fmt.Errorf("load: %s: unsupported binding: %s", name, bind) + } + + ins.Src = asm.PseudoMapFD + + default: + return fmt.Errorf("load: %s: unsupported relocation: %s", name, typ) + } + + // Mark the instruction as needing an update when creating the + // collection. + if err := ins.RewriteMapPtr(-1); err != nil { + return err + } + + case ins.OpCode.JumpOp() == asm.Call: + if ins.Src != asm.PseudoCall { + return fmt.Errorf("call: %s: incorrect source register", name) + } + + switch typ { + case elf.STT_NOTYPE, elf.STT_FUNC: + if bind != elf.STB_GLOBAL { + return fmt.Errorf("call: %s: unsupported binding: %s", name, bind) + } + + case elf.STT_SECTION: + if bind != elf.STB_LOCAL { + return fmt.Errorf("call: %s: unsupported binding: %s", name, bind) + } + + // The function we want to call is in the indicated section, + // at the offset encoded in the instruction itself. Reverse + // the calculation to find the real function we're looking for. + // A value of -1 references the first instruction in the section. + offset := int64(int32(ins.Constant)+1) * asm.InstructionSize + if offset < 0 { + return fmt.Errorf("call: %s: invalid offset %d", name, offset) + } + + sym, ok := ec.symbolsPerSection[rel.Section][uint64(offset)] + if !ok { + return fmt.Errorf("call: %s: no symbol at offset %d", name, offset) + } + + ins.Constant = -1 + name = sym.Name + + default: + return fmt.Errorf("call: %s: invalid symbol type %s", name, typ) + } + + default: + return fmt.Errorf("relocation for unsupported instruction: %s", ins.OpCode) + } + + ins.Reference = name + return nil +} + +func (ec *elfCode) loadMaps(maps map[string]*MapSpec, mapSections map[elf.SectionIndex]*elf.Section) error { for idx, sec := range mapSections { syms := ec.symbolsPerSection[idx] if len(syms) == 0 { - return nil, errors.Errorf("section %v: no symbols", sec.Name) + return fmt.Errorf("section %v: no symbols", sec.Name) } if sec.Size%uint64(len(syms)) != 0 { - return nil, errors.Errorf("section %v: map descriptors are not of equal size", sec.Name) + return fmt.Errorf("section %v: map descriptors are not of equal size", sec.Name) } var ( @@ -217,154 +393,324 @@ func (ec *elfCode) loadMaps(mapSections map[elf.SectionIndex]*elf.Section) (map[ size = sec.Size / uint64(len(syms)) ) for i, offset := 0, uint64(0); i < len(syms); i, offset = i+1, offset+size { - mapSym := syms[offset] - if mapSym == "" { - fmt.Println(syms) - return nil, errors.Errorf("section %s: missing symbol for map at offset %d", sec.Name, offset) + mapSym, ok := syms[offset] + if !ok { + return fmt.Errorf("section %s: missing symbol for map at offset %d", sec.Name, offset) } - if maps[mapSym] != nil { - return nil, errors.Errorf("section %v: map %v already exists", sec.Name, mapSym) + if maps[mapSym.Name] != nil { + return fmt.Errorf("section %v: map %v already exists", sec.Name, mapSym) } lr := io.LimitReader(r, int64(size)) - var spec MapSpec + spec := MapSpec{ + Name: SanitizeName(mapSym.Name, -1), + } switch { case binary.Read(lr, ec.ByteOrder, &spec.Type) != nil: - return nil, errors.Errorf("map %v: missing type", mapSym) + return fmt.Errorf("map %v: missing type", mapSym) case binary.Read(lr, ec.ByteOrder, &spec.KeySize) != nil: - return nil, errors.Errorf("map %v: missing key size", mapSym) + return fmt.Errorf("map %v: missing key size", mapSym) case binary.Read(lr, ec.ByteOrder, &spec.ValueSize) != nil: - return nil, errors.Errorf("map %v: missing value size", mapSym) + return fmt.Errorf("map %v: missing value size", mapSym) case binary.Read(lr, ec.ByteOrder, &spec.MaxEntries) != nil: - return nil, errors.Errorf("map %v: missing max entries", mapSym) + return fmt.Errorf("map %v: missing max entries", mapSym) case binary.Read(lr, ec.ByteOrder, &spec.Flags) != nil: - return nil, errors.Errorf("map %v: missing flags", mapSym) + return fmt.Errorf("map %v: missing flags", mapSym) } - for { - _, err := lr.Read(b) - if err == io.EOF { - break - } - if err != nil { - return nil, err - } - if b[0] != 0 { - return nil, errors.Errorf("map %v: unknown and non-zero fields in definition", mapSym) - } + if _, err := io.Copy(internal.DiscardZeroes{}, lr); err != nil { + return fmt.Errorf("map %v: unknown and non-zero fields in definition", mapSym) } - maps[mapSym] = &spec + maps[mapSym.Name] = &spec } } - return maps, nil + + return nil } -func getProgType(v string) (ProgramType, AttachType) { - types := map[string]ProgramType{ - // From https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/bpf/libbpf.c#n3568 - "socket": SocketFilter, - "seccomp": SocketFilter, - "kprobe/": Kprobe, - "kretprobe/": Kprobe, - "tracepoint/": TracePoint, - "xdp": XDP, - "perf_event": PerfEvent, - "sockops": SockOps, - "sk_skb": SkSKB, - "sk_msg": SkMsg, - "lirc_mode2": LircMode2, - "flow_dissector": FlowDissector, +func (ec *elfCode) loadBTFMaps(maps map[string]*MapSpec, mapSections map[elf.SectionIndex]*elf.Section, spec *btf.Spec) error { + if spec == nil { + return fmt.Errorf("missing BTF") + } - "cgroup_skb/": CGroupSKB, - "cgroup/dev": CGroupDevice, - "cgroup/skb": CGroupSKB, - "cgroup/sock": CGroupSock, - "cgroup/post_bind": CGroupSock, - "cgroup/bind": CGroupSockAddr, - "cgroup/connect": CGroupSockAddr, - "cgroup/sendmsg": CGroupSockAddr, - "cgroup/recvmsg": CGroupSockAddr, - "cgroup/sysctl": CGroupSysctl, - "cgroup/getsockopt": CGroupSockopt, - "cgroup/setsockopt": CGroupSockopt, - "classifier": SchedCLS, - "action": SchedACT, - } - attachTypes := map[string]AttachType{ - "cgroup_skb/ingress": AttachCGroupInetIngress, - "cgroup_skb/egress": AttachCGroupInetEgress, - "cgroup/sock": AttachCGroupInetSockCreate, - "cgroup/post_bind4": AttachCGroupInet4PostBind, - "cgroup/post_bind6": AttachCGroupInet6PostBind, - "cgroup/dev": AttachCGroupDevice, - "sockops": AttachCGroupSockOps, - "sk_skb/stream_parser": AttachSkSKBStreamParser, - "sk_skb/stream_verdict": AttachSkSKBStreamVerdict, - "sk_msg": AttachSkSKBStreamVerdict, - "lirc_mode2": AttachLircMode2, - "flow_dissector": AttachFlowDissector, - "cgroup/bind4": AttachCGroupInet4Bind, - "cgroup/bind6": AttachCGroupInet6Bind, - "cgroup/connect4": AttachCGroupInet4Connect, - "cgroup/connect6": AttachCGroupInet6Connect, - "cgroup/sendmsg4": AttachCGroupUDP4Sendmsg, - "cgroup/sendmsg6": AttachCGroupUDP6Sendmsg, - "cgroup/recvmsg4": AttachCGroupUDP4Recvmsg, - "cgroup/recvmsg6": AttachCGroupUDP6Recvmsg, - "cgroup/sysctl": AttachCGroupSysctl, - "cgroup/getsockopt": AttachCGroupGetsockopt, - "cgroup/setsockopt": AttachCGroupSetsockopt, - } - attachType := AttachNone - for k, t := range attachTypes { - if strings.HasPrefix(v, k) { - attachType = t + for idx, sec := range mapSections { + syms := ec.symbolsPerSection[idx] + if len(syms) == 0 { + return fmt.Errorf("section %v: no symbols", sec.Name) + } + + for _, sym := range syms { + name := sym.Name + if maps[name] != nil { + return fmt.Errorf("section %v: map %v already exists", sec.Name, sym) + } + + mapSpec, err := mapSpecFromBTF(spec, name) + if err != nil { + return fmt.Errorf("map %v: %w", name, err) + } + + maps[name] = mapSpec } } - for k, t := range types { - if strings.HasPrefix(v, k) { - return t, attachType - } - } - return UnspecifiedProgram, AttachNone + return nil } -func (ec *elfCode) loadRelocations(sec *elf.Section) (map[uint64]string, error) { - rels := make(map[uint64]string) - if sec == nil { - return rels, nil +func mapSpecFromBTF(spec *btf.Spec, name string) (*MapSpec, error) { + btfMap, btfMapMembers, err := spec.Map(name) + if err != nil { + return nil, fmt.Errorf("can't get BTF: %w", err) } - if sec.Entsize < 16 { - return nil, errors.New("rels are less than 16 bytes") + keyType := btf.MapKey(btfMap) + size, err := btf.Sizeof(keyType) + if err != nil { + return nil, fmt.Errorf("can't get size of BTF key: %w", err) } + keySize := uint32(size) - r := sec.Open() - for off := uint64(0); off < sec.Size; off += sec.Entsize { - ent := io.LimitReader(r, int64(sec.Entsize)) + valueType := btf.MapValue(btfMap) + size, err = btf.Sizeof(valueType) + if err != nil { + return nil, fmt.Errorf("can't get size of BTF value: %w", err) + } + valueSize := uint32(size) - var rel elf.Rel64 - if binary.Read(ent, ec.ByteOrder, &rel) != nil { - return nil, errors.Errorf("can't parse relocation at offset %v", off) + var ( + mapType, flags, maxEntries uint32 + ) + for _, member := range btfMapMembers { + switch member.Name { + case "type": + mapType, err = uintFromBTF(member.Type) + if err != nil { + return nil, fmt.Errorf("can't get type: %w", err) + } + + case "map_flags": + flags, err = uintFromBTF(member.Type) + if err != nil { + return nil, fmt.Errorf("can't get BTF map flags: %w", err) + } + + case "max_entries": + maxEntries, err = uintFromBTF(member.Type) + if err != nil { + return nil, fmt.Errorf("can't get BTF map max entries: %w", err) + } + + case "key_size": + if _, isVoid := keyType.(*btf.Void); !isVoid { + return nil, errors.New("both key and key_size given") + } + + keySize, err = uintFromBTF(member.Type) + if err != nil { + return nil, fmt.Errorf("can't get BTF key size: %w", err) + } + + case "value_size": + if _, isVoid := valueType.(*btf.Void); !isVoid { + return nil, errors.New("both value and value_size given") + } + + valueSize, err = uintFromBTF(member.Type) + if err != nil { + return nil, fmt.Errorf("can't get BTF value size: %w", err) + } + + case "pinning": + pinning, err := uintFromBTF(member.Type) + if err != nil { + return nil, fmt.Errorf("can't get pinning: %w", err) + } + + if pinning != 0 { + return nil, fmt.Errorf("'pinning' attribute not supported: %w", ErrNotSupported) + } + + case "key", "value": + default: + return nil, fmt.Errorf("unrecognized field %s in BTF map definition", member.Name) } - - symNo := int(elf.R_SYM64(rel.Info) - 1) - if symNo >= len(ec.symbols) { - return nil, errors.Errorf("relocation at offset %d: symbol %v doesnt exist", off, symNo) - } - - rels[rel.Off] = ec.symbols[symNo].Name } - return rels, nil + + return &MapSpec{ + Type: MapType(mapType), + KeySize: keySize, + ValueSize: valueSize, + MaxEntries: maxEntries, + Flags: flags, + BTF: btfMap, + }, nil } -func symbolsPerSection(symbols []elf.Symbol) map[elf.SectionIndex]map[uint64]string { - result := make(map[elf.SectionIndex]map[uint64]string) - for i, sym := range symbols { +// uintFromBTF resolves the __uint macro, which is a pointer to a sized +// array, e.g. for int (*foo)[10], this function will return 10. +func uintFromBTF(typ btf.Type) (uint32, error) { + ptr, ok := typ.(*btf.Pointer) + if !ok { + return 0, fmt.Errorf("not a pointer: %v", typ) + } + + arr, ok := ptr.Target.(*btf.Array) + if !ok { + return 0, fmt.Errorf("not a pointer to array: %v", typ) + } + + return arr.Nelems, nil +} + +func (ec *elfCode) loadDataSections(maps map[string]*MapSpec, dataSections map[elf.SectionIndex]*elf.Section, spec *btf.Spec) error { + if spec == nil { + return errors.New("data sections require BTF, make sure all consts are marked as static") + } + + for _, sec := range dataSections { + btfMap, err := spec.Datasec(sec.Name) + if err != nil { + return err + } + + data, err := sec.Data() + if err != nil { + return fmt.Errorf("data section %s: can't get contents: %w", sec.Name, err) + } + + if uint64(len(data)) > math.MaxUint32 { + return fmt.Errorf("data section %s: contents exceed maximum size", sec.Name) + } + + mapSpec := &MapSpec{ + Name: SanitizeName(sec.Name, -1), + Type: Array, + KeySize: 4, + ValueSize: uint32(len(data)), + MaxEntries: 1, + Contents: []MapKV{{uint32(0), data}}, + BTF: btfMap, + } + + switch sec.Name { + case ".rodata": + mapSpec.Flags = unix.BPF_F_RDONLY_PROG + mapSpec.Freeze = true + case ".bss": + // The kernel already zero-initializes the map + mapSpec.Contents = nil + } + + maps[sec.Name] = mapSpec + } + return nil +} + +func getProgType(sectionName string) (ProgramType, AttachType, string) { + types := map[string]struct { + progType ProgramType + attachType AttachType + }{ + // From https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/bpf/libbpf.c + "socket": {SocketFilter, AttachNone}, + "seccomp": {SocketFilter, AttachNone}, + "kprobe/": {Kprobe, AttachNone}, + "uprobe/": {Kprobe, AttachNone}, + "kretprobe/": {Kprobe, AttachNone}, + "uretprobe/": {Kprobe, AttachNone}, + "tracepoint/": {TracePoint, AttachNone}, + "raw_tracepoint/": {RawTracepoint, AttachNone}, + "xdp": {XDP, AttachNone}, + "perf_event": {PerfEvent, AttachNone}, + "lwt_in": {LWTIn, AttachNone}, + "lwt_out": {LWTOut, AttachNone}, + "lwt_xmit": {LWTXmit, AttachNone}, + "lwt_seg6local": {LWTSeg6Local, AttachNone}, + "sockops": {SockOps, AttachCGroupSockOps}, + "sk_skb/stream_parser": {SkSKB, AttachSkSKBStreamParser}, + "sk_skb/stream_verdict": {SkSKB, AttachSkSKBStreamParser}, + "sk_msg": {SkMsg, AttachSkSKBStreamVerdict}, + "lirc_mode2": {LircMode2, AttachLircMode2}, + "flow_dissector": {FlowDissector, AttachFlowDissector}, + "iter/": {Tracing, AttachTraceIter}, + + "cgroup_skb/ingress": {CGroupSKB, AttachCGroupInetIngress}, + "cgroup_skb/egress": {CGroupSKB, AttachCGroupInetEgress}, + "cgroup/dev": {CGroupDevice, AttachCGroupDevice}, + "cgroup/skb": {CGroupSKB, AttachNone}, + "cgroup/sock": {CGroupSock, AttachCGroupInetSockCreate}, + "cgroup/post_bind4": {CGroupSock, AttachCGroupInet4PostBind}, + "cgroup/post_bind6": {CGroupSock, AttachCGroupInet6PostBind}, + "cgroup/bind4": {CGroupSockAddr, AttachCGroupInet4Bind}, + "cgroup/bind6": {CGroupSockAddr, AttachCGroupInet6Bind}, + "cgroup/connect4": {CGroupSockAddr, AttachCGroupInet4Connect}, + "cgroup/connect6": {CGroupSockAddr, AttachCGroupInet6Connect}, + "cgroup/sendmsg4": {CGroupSockAddr, AttachCGroupUDP4Sendmsg}, + "cgroup/sendmsg6": {CGroupSockAddr, AttachCGroupUDP6Sendmsg}, + "cgroup/recvmsg4": {CGroupSockAddr, AttachCGroupUDP4Recvmsg}, + "cgroup/recvmsg6": {CGroupSockAddr, AttachCGroupUDP6Recvmsg}, + "cgroup/sysctl": {CGroupSysctl, AttachCGroupSysctl}, + "cgroup/getsockopt": {CGroupSockopt, AttachCGroupGetsockopt}, + "cgroup/setsockopt": {CGroupSockopt, AttachCGroupSetsockopt}, + "classifier": {SchedCLS, AttachNone}, + "action": {SchedACT, AttachNone}, + } + + for prefix, t := range types { + if !strings.HasPrefix(sectionName, prefix) { + continue + } + + if !strings.HasSuffix(prefix, "/") { + return t.progType, t.attachType, "" + } + + return t.progType, t.attachType, sectionName[len(prefix):] + } + + return UnspecifiedProgram, AttachNone, "" +} + +func (ec *elfCode) loadRelocations(sections map[elf.SectionIndex]*elf.Section) (map[elf.SectionIndex]map[uint64]elf.Symbol, map[elf.SectionIndex]bool, error) { + result := make(map[elf.SectionIndex]map[uint64]elf.Symbol) + targets := make(map[elf.SectionIndex]bool) + for idx, sec := range sections { + rels := make(map[uint64]elf.Symbol) + + if sec.Entsize < 16 { + return nil, nil, fmt.Errorf("section %s: relocations are less than 16 bytes", sec.Name) + } + + r := sec.Open() + for off := uint64(0); off < sec.Size; off += sec.Entsize { + ent := io.LimitReader(r, int64(sec.Entsize)) + + var rel elf.Rel64 + if binary.Read(ent, ec.ByteOrder, &rel) != nil { + return nil, nil, fmt.Errorf("can't parse relocation at offset %v", off) + } + + symNo := int(elf.R_SYM64(rel.Info) - 1) + if symNo >= len(ec.symbols) { + return nil, nil, fmt.Errorf("relocation at offset %d: symbol %v doesnt exist", off, symNo) + } + + symbol := ec.symbols[symNo] + targets[symbol.Section] = true + rels[rel.Off] = ec.symbols[symNo] + } + + result[idx] = rels + } + return result, targets, nil +} + +func symbolsPerSection(symbols []elf.Symbol) map[elf.SectionIndex]map[uint64]elf.Symbol { + result := make(map[elf.SectionIndex]map[uint64]elf.Symbol) + for _, sym := range symbols { switch elf.ST_TYPE(sym.Info) { case elf.STT_NOTYPE: // Older versions of LLVM doesn't tag @@ -378,15 +724,19 @@ func symbolsPerSection(symbols []elf.Symbol) map[elf.SectionIndex]map[uint64]str continue } + if sym.Section == elf.SHN_UNDEF || sym.Section >= elf.SHN_LORESERVE { + continue + } + if sym.Name == "" { continue } idx := sym.Section if _, ok := result[idx]; !ok { - result[idx] = make(map[uint64]string) + result[idx] = make(map[uint64]elf.Symbol) } - result[idx][sym.Value] = symbols[i].Name + result[idx][sym.Value] = sym } return result } diff --git a/vendor/github.com/cilium/ebpf/feature.go b/vendor/github.com/cilium/ebpf/feature.go deleted file mode 100644 index 9104bc9c4ce..00000000000 --- a/vendor/github.com/cilium/ebpf/feature.go +++ /dev/null @@ -1,19 +0,0 @@ -package ebpf - -import ( - "sync" -) - -type featureTest struct { - Fn func() bool - - once sync.Once - result bool -} - -func (ft *featureTest) Result() bool { - ft.once.Do(func() { - ft.result = ft.Fn() - }) - return ft.result -} diff --git a/vendor/github.com/cilium/ebpf/go.mod b/vendor/github.com/cilium/ebpf/go.mod index 687bdec9f66..a05cf85eddd 100644 --- a/vendor/github.com/cilium/ebpf/go.mod +++ b/vendor/github.com/cilium/ebpf/go.mod @@ -1,8 +1,5 @@ module github.com/cilium/ebpf -go 1.12 +go 1.13 -require ( - github.com/pkg/errors v0.8.1 - golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 -) +require golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 diff --git a/vendor/github.com/cilium/ebpf/go.sum b/vendor/github.com/cilium/ebpf/go.sum index 9edd97934c5..e8b62417e81 100644 --- a/vendor/github.com/cilium/ebpf/go.sum +++ b/vendor/github.com/cilium/ebpf/go.sum @@ -1,4 +1,2 @@ -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 h1:HmbHVPwrPEKPGLAcHSrMe6+hqSUlvZU0rab6x5EXfGU= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9 h1:1/DFK4b7JH8DmkqhUk48onnSfrPzImPoVxuomtbT2nk= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/cilium/ebpf/internal/btf/btf.go b/vendor/github.com/cilium/ebpf/internal/btf/btf.go new file mode 100644 index 00000000000..3dd000a284e --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/btf/btf.go @@ -0,0 +1,716 @@ +package btf + +import ( + "bytes" + "debug/elf" + "encoding/binary" + "errors" + "fmt" + "io" + "io/ioutil" + "math" + "os" + "reflect" + "sync" + "unsafe" + + "github.com/cilium/ebpf/internal" + "github.com/cilium/ebpf/internal/unix" +) + +const btfMagic = 0xeB9F + +// Errors returned by BTF functions. +var ( + ErrNotSupported = internal.ErrNotSupported + ErrNotFound = errors.New("not found") + ErrNoExtendedInfo = errors.New("no extended info") +) + +// Spec represents decoded BTF. +type Spec struct { + rawTypes []rawType + strings stringTable + types map[string][]Type + funcInfos map[string]extInfo + lineInfos map[string]extInfo + byteOrder binary.ByteOrder +} + +type btfHeader struct { + Magic uint16 + Version uint8 + Flags uint8 + HdrLen uint32 + + TypeOff uint32 + TypeLen uint32 + StringOff uint32 + StringLen uint32 +} + +// LoadSpecFromReader reads BTF sections from an ELF. +// +// Returns a nil Spec and no error if no BTF was present. +func LoadSpecFromReader(rd io.ReaderAt) (*Spec, error) { + file, err := elf.NewFile(rd) + if err != nil { + return nil, err + } + defer file.Close() + + var ( + btfSection *elf.Section + btfExtSection *elf.Section + sectionSizes = make(map[string]uint32) + ) + + for _, sec := range file.Sections { + switch sec.Name { + case ".BTF": + btfSection = sec + case ".BTF.ext": + btfExtSection = sec + default: + if sec.Type != elf.SHT_PROGBITS && sec.Type != elf.SHT_NOBITS { + break + } + + if sec.Size > math.MaxUint32 { + return nil, fmt.Errorf("section %s exceeds maximum size", sec.Name) + } + + sectionSizes[sec.Name] = uint32(sec.Size) + } + } + + if btfSection == nil { + return nil, nil + } + + symbols, err := file.Symbols() + if err != nil { + return nil, fmt.Errorf("can't read symbols: %v", err) + } + + variableOffsets := make(map[variable]uint32) + for _, symbol := range symbols { + if idx := symbol.Section; idx >= elf.SHN_LORESERVE && idx <= elf.SHN_HIRESERVE { + // Ignore things like SHN_ABS + continue + } + + secName := file.Sections[symbol.Section].Name + if _, ok := sectionSizes[secName]; !ok { + continue + } + + if symbol.Value > math.MaxUint32 { + return nil, fmt.Errorf("section %s: symbol %s: size exceeds maximum", secName, symbol.Name) + } + + variableOffsets[variable{secName, symbol.Name}] = uint32(symbol.Value) + } + + spec, err := loadNakedSpec(btfSection.Open(), file.ByteOrder, sectionSizes, variableOffsets) + if err != nil { + return nil, err + } + + if btfExtSection == nil { + return spec, nil + } + + spec.funcInfos, spec.lineInfos, err = parseExtInfos(btfExtSection.Open(), file.ByteOrder, spec.strings) + if err != nil { + return nil, fmt.Errorf("can't read ext info: %w", err) + } + + return spec, nil +} + +func loadNakedSpec(btf io.ReadSeeker, bo binary.ByteOrder, sectionSizes map[string]uint32, variableOffsets map[variable]uint32) (*Spec, error) { + rawTypes, rawStrings, err := parseBTF(btf, bo) + if err != nil { + return nil, err + } + + err = fixupDatasec(rawTypes, rawStrings, sectionSizes, variableOffsets) + if err != nil { + return nil, err + } + + types, err := inflateRawTypes(rawTypes, rawStrings) + if err != nil { + return nil, err + } + + return &Spec{ + rawTypes: rawTypes, + types: types, + strings: rawStrings, + byteOrder: bo, + }, nil +} + +var kernelBTF struct { + sync.Mutex + *Spec +} + +// LoadKernelSpec returns the current kernel's BTF information. +// +// Requires a >= 5.5 kernel with CONFIG_DEBUG_INFO_BTF enabled. Returns +// ErrNotSupported if BTF is not enabled. +func LoadKernelSpec() (*Spec, error) { + kernelBTF.Lock() + defer kernelBTF.Unlock() + + if kernelBTF.Spec != nil { + return kernelBTF.Spec, nil + } + + var err error + kernelBTF.Spec, err = loadKernelSpec() + return kernelBTF.Spec, err +} + +func loadKernelSpec() (*Spec, error) { + fh, err := os.Open("/sys/kernel/btf/vmlinux") + if os.IsNotExist(err) { + return nil, fmt.Errorf("can't open kernel BTF at /sys/kernel/btf/vmlinux: %w", ErrNotFound) + } + if err != nil { + return nil, fmt.Errorf("can't read kernel BTF: %s", err) + } + defer fh.Close() + + return loadNakedSpec(fh, internal.NativeEndian, nil, nil) +} + +func parseBTF(btf io.ReadSeeker, bo binary.ByteOrder) ([]rawType, stringTable, error) { + rawBTF, err := ioutil.ReadAll(btf) + if err != nil { + return nil, nil, fmt.Errorf("can't read BTF: %v", err) + } + + rd := bytes.NewReader(rawBTF) + + var header btfHeader + if err := binary.Read(rd, bo, &header); err != nil { + return nil, nil, fmt.Errorf("can't read header: %v", err) + } + + if header.Magic != btfMagic { + return nil, nil, fmt.Errorf("incorrect magic value %v", header.Magic) + } + + if header.Version != 1 { + return nil, nil, fmt.Errorf("unexpected version %v", header.Version) + } + + if header.Flags != 0 { + return nil, nil, fmt.Errorf("unsupported flags %v", header.Flags) + } + + remainder := int64(header.HdrLen) - int64(binary.Size(&header)) + if remainder < 0 { + return nil, nil, errors.New("header is too short") + } + + if _, err := io.CopyN(internal.DiscardZeroes{}, rd, remainder); err != nil { + return nil, nil, fmt.Errorf("header padding: %v", err) + } + + if _, err := rd.Seek(int64(header.HdrLen+header.StringOff), io.SeekStart); err != nil { + return nil, nil, fmt.Errorf("can't seek to start of string section: %v", err) + } + + rawStrings, err := readStringTable(io.LimitReader(rd, int64(header.StringLen))) + if err != nil { + return nil, nil, fmt.Errorf("can't read type names: %w", err) + } + + if _, err := rd.Seek(int64(header.HdrLen+header.TypeOff), io.SeekStart); err != nil { + return nil, nil, fmt.Errorf("can't seek to start of type section: %v", err) + } + + rawTypes, err := readTypes(io.LimitReader(rd, int64(header.TypeLen)), bo) + if err != nil { + return nil, nil, fmt.Errorf("can't read types: %w", err) + } + + return rawTypes, rawStrings, nil +} + +type variable struct { + section string + name string +} + +func fixupDatasec(rawTypes []rawType, rawStrings stringTable, sectionSizes map[string]uint32, variableOffsets map[variable]uint32) error { + for i, rawType := range rawTypes { + if rawType.Kind() != kindDatasec { + continue + } + + name, err := rawStrings.Lookup(rawType.NameOff) + if err != nil { + return err + } + + if name == ".kconfig" || name == ".ksym" { + return fmt.Errorf("reference to %s: %w", name, ErrNotSupported) + } + + size, ok := sectionSizes[name] + if !ok { + return fmt.Errorf("data section %s: missing size", name) + } + + rawTypes[i].SizeType = size + + secinfos := rawType.data.([]btfVarSecinfo) + for j, secInfo := range secinfos { + id := int(secInfo.Type - 1) + if id >= len(rawTypes) { + return fmt.Errorf("data section %s: invalid type id %d for variable %d", name, id, j) + } + + varName, err := rawStrings.Lookup(rawTypes[id].NameOff) + if err != nil { + return fmt.Errorf("data section %s: can't get name for type %d: %w", name, id, err) + } + + offset, ok := variableOffsets[variable{name, varName}] + if !ok { + return fmt.Errorf("data section %s: missing offset for variable %s", name, varName) + } + + secinfos[j].Offset = offset + } + } + + return nil +} + +type marshalOpts struct { + ByteOrder binary.ByteOrder + StripFuncLinkage bool +} + +func (s *Spec) marshal(opts marshalOpts) ([]byte, error) { + var ( + buf bytes.Buffer + header = new(btfHeader) + headerLen = binary.Size(header) + ) + + // Reserve space for the header. We have to write it last since + // we don't know the size of the type section yet. + _, _ = buf.Write(make([]byte, headerLen)) + + // Write type section, just after the header. + for _, raw := range s.rawTypes { + switch { + case opts.StripFuncLinkage && raw.Kind() == kindFunc: + raw.SetLinkage(linkageStatic) + } + + if err := raw.Marshal(&buf, opts.ByteOrder); err != nil { + return nil, fmt.Errorf("can't marshal BTF: %w", err) + } + } + + typeLen := uint32(buf.Len() - headerLen) + + // Write string section after type section. + _, _ = buf.Write(s.strings) + + // Fill out the header, and write it out. + header = &btfHeader{ + Magic: btfMagic, + Version: 1, + Flags: 0, + HdrLen: uint32(headerLen), + TypeOff: 0, + TypeLen: typeLen, + StringOff: typeLen, + StringLen: uint32(len(s.strings)), + } + + raw := buf.Bytes() + err := binary.Write(sliceWriter(raw[:headerLen]), opts.ByteOrder, header) + if err != nil { + return nil, fmt.Errorf("can't write header: %v", err) + } + + return raw, nil +} + +type sliceWriter []byte + +func (sw sliceWriter) Write(p []byte) (int, error) { + if len(p) != len(sw) { + return 0, errors.New("size doesn't match") + } + + return copy(sw, p), nil +} + +// Program finds the BTF for a specific section. +// +// Length is the number of bytes in the raw BPF instruction stream. +// +// Returns an error which may wrap ErrNoExtendedInfo if the Spec doesn't +// contain extended BTF info. +func (s *Spec) Program(name string, length uint64) (*Program, error) { + if length == 0 { + return nil, errors.New("length musn't be zero") + } + + if s.funcInfos == nil && s.lineInfos == nil { + return nil, fmt.Errorf("BTF for section %s: %w", name, ErrNoExtendedInfo) + } + + funcInfos, funcOK := s.funcInfos[name] + lineInfos, lineOK := s.lineInfos[name] + + if !funcOK && !lineOK { + return nil, fmt.Errorf("no extended BTF info for section %s", name) + } + + return &Program{s, length, funcInfos, lineInfos}, nil +} + +// Map finds the BTF for a map. +// +// Returns an error if there is no BTF for the given name. +func (s *Spec) Map(name string) (*Map, []Member, error) { + var mapVar Var + if err := s.FindType(name, &mapVar); err != nil { + return nil, nil, err + } + + mapStruct, ok := mapVar.Type.(*Struct) + if !ok { + return nil, nil, fmt.Errorf("expected struct, have %s", mapVar.Type) + } + + var key, value Type + for _, member := range mapStruct.Members { + switch member.Name { + case "key": + key = member.Type + + case "value": + value = member.Type + } + } + + if key == nil { + key = (*Void)(nil) + } + + if value == nil { + value = (*Void)(nil) + } + + return &Map{s, key, value}, mapStruct.Members, nil +} + +// Datasec returns the BTF required to create maps which represent data sections. +func (s *Spec) Datasec(name string) (*Map, error) { + var datasec Datasec + if err := s.FindType(name, &datasec); err != nil { + return nil, fmt.Errorf("data section %s: can't get BTF: %w", name, err) + } + + return &Map{s, &Void{}, &datasec}, nil +} + +// FindType searches for a type with a specific name. +// +// hint determines the type of the returned Type. +// +// Returns an error wrapping ErrNotFound if no matching +// type exists in spec. +func (s *Spec) FindType(name string, typ Type) error { + var ( + wanted = reflect.TypeOf(typ) + candidate Type + ) + + for _, typ := range s.types[name] { + if reflect.TypeOf(typ) != wanted { + continue + } + + if candidate != nil { + return fmt.Errorf("type %s: multiple candidates for %T", name, typ) + } + + candidate = typ + } + + if candidate == nil { + return fmt.Errorf("type %s: %w", name, ErrNotFound) + } + + value := reflect.Indirect(reflect.ValueOf(copyType(candidate))) + reflect.Indirect(reflect.ValueOf(typ)).Set(value) + return nil +} + +// Handle is a reference to BTF loaded into the kernel. +type Handle struct { + fd *internal.FD +} + +// NewHandle loads BTF into the kernel. +// +// Returns ErrNotSupported if BTF is not supported. +func NewHandle(spec *Spec) (*Handle, error) { + if err := haveBTF(); err != nil { + return nil, err + } + + if spec.byteOrder != internal.NativeEndian { + return nil, fmt.Errorf("can't load %s BTF on %s", spec.byteOrder, internal.NativeEndian) + } + + btf, err := spec.marshal(marshalOpts{ + ByteOrder: internal.NativeEndian, + StripFuncLinkage: haveFuncLinkage() != nil, + }) + if err != nil { + return nil, fmt.Errorf("can't marshal BTF: %w", err) + } + + if uint64(len(btf)) > math.MaxUint32 { + return nil, errors.New("BTF exceeds the maximum size") + } + + attr := &bpfLoadBTFAttr{ + btf: internal.NewSlicePointer(btf), + btfSize: uint32(len(btf)), + } + + fd, err := bpfLoadBTF(attr) + if err != nil { + logBuf := make([]byte, 64*1024) + attr.logBuf = internal.NewSlicePointer(logBuf) + attr.btfLogSize = uint32(len(logBuf)) + attr.btfLogLevel = 1 + _, logErr := bpfLoadBTF(attr) + return nil, internal.ErrorWithLog(err, logBuf, logErr) + } + + return &Handle{fd}, nil +} + +// Close destroys the handle. +// +// Subsequent calls to FD will return an invalid value. +func (h *Handle) Close() error { + return h.fd.Close() +} + +// FD returns the file descriptor for the handle. +func (h *Handle) FD() int { + value, err := h.fd.Value() + if err != nil { + return -1 + } + + return int(value) +} + +// Map is the BTF for a map. +type Map struct { + spec *Spec + key, value Type +} + +// MapSpec should be a method on Map, but is a free function +// to hide it from users of the ebpf package. +func MapSpec(m *Map) *Spec { + return m.spec +} + +// MapKey should be a method on Map, but is a free function +// to hide it from users of the ebpf package. +func MapKey(m *Map) Type { + return m.key +} + +// MapValue should be a method on Map, but is a free function +// to hide it from users of the ebpf package. +func MapValue(m *Map) Type { + return m.value +} + +// Program is the BTF information for a stream of instructions. +type Program struct { + spec *Spec + length uint64 + funcInfos, lineInfos extInfo +} + +// ProgramSpec returns the Spec needed for loading function and line infos into the kernel. +// +// This is a free function instead of a method to hide it from users +// of package ebpf. +func ProgramSpec(s *Program) *Spec { + return s.spec +} + +// ProgramAppend the information from other to the Program. +// +// This is a free function instead of a method to hide it from users +// of package ebpf. +func ProgramAppend(s, other *Program) error { + funcInfos, err := s.funcInfos.append(other.funcInfos, s.length) + if err != nil { + return fmt.Errorf("func infos: %w", err) + } + + lineInfos, err := s.lineInfos.append(other.lineInfos, s.length) + if err != nil { + return fmt.Errorf("line infos: %w", err) + } + + s.length += other.length + s.funcInfos = funcInfos + s.lineInfos = lineInfos + return nil +} + +// ProgramFuncInfos returns the binary form of BTF function infos. +// +// This is a free function instead of a method to hide it from users +// of package ebpf. +func ProgramFuncInfos(s *Program) (recordSize uint32, bytes []byte, err error) { + bytes, err = s.funcInfos.MarshalBinary() + if err != nil { + return 0, nil, err + } + + return s.funcInfos.recordSize, bytes, nil +} + +// ProgramLineInfos returns the binary form of BTF line infos. +// +// This is a free function instead of a method to hide it from users +// of package ebpf. +func ProgramLineInfos(s *Program) (recordSize uint32, bytes []byte, err error) { + bytes, err = s.lineInfos.MarshalBinary() + if err != nil { + return 0, nil, err + } + + return s.lineInfos.recordSize, bytes, nil +} + +type bpfLoadBTFAttr struct { + btf internal.Pointer + logBuf internal.Pointer + btfSize uint32 + btfLogSize uint32 + btfLogLevel uint32 +} + +func bpfLoadBTF(attr *bpfLoadBTFAttr) (*internal.FD, error) { + const _BTFLoad = 18 + + fd, err := internal.BPF(_BTFLoad, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) + if err != nil { + return nil, err + } + + return internal.NewFD(uint32(fd)), nil +} + +func marshalBTF(types interface{}, strings []byte, bo binary.ByteOrder) []byte { + const minHeaderLength = 24 + + typesLen := uint32(binary.Size(types)) + header := btfHeader{ + Magic: btfMagic, + Version: 1, + HdrLen: minHeaderLength, + TypeOff: 0, + TypeLen: typesLen, + StringOff: typesLen, + StringLen: uint32(len(strings)), + } + + buf := new(bytes.Buffer) + _ = binary.Write(buf, bo, &header) + _ = binary.Write(buf, bo, types) + buf.Write(strings) + + return buf.Bytes() +} + +var haveBTF = internal.FeatureTest("BTF", "5.1", func() (bool, error) { + var ( + types struct { + Integer btfType + Var btfType + btfVar struct{ Linkage uint32 } + } + strings = []byte{0, 'a', 0} + ) + + // We use a BTF_KIND_VAR here, to make sure that + // the kernel understands BTF at least as well as we + // do. BTF_KIND_VAR was introduced ~5.1. + types.Integer.SetKind(kindPointer) + types.Var.NameOff = 1 + types.Var.SetKind(kindVar) + types.Var.SizeType = 1 + + btf := marshalBTF(&types, strings, internal.NativeEndian) + + fd, err := bpfLoadBTF(&bpfLoadBTFAttr{ + btf: internal.NewSlicePointer(btf), + btfSize: uint32(len(btf)), + }) + if err == nil { + fd.Close() + } + // Check for EINVAL specifically, rather than err != nil since we + // otherwise misdetect due to insufficient permissions. + return !errors.Is(err, unix.EINVAL), nil +}) + +var haveFuncLinkage = internal.FeatureTest("BTF func linkage", "5.6", func() (bool, error) { + var ( + types struct { + FuncProto btfType + Func btfType + } + strings = []byte{0, 'a', 0} + ) + + types.FuncProto.SetKind(kindFuncProto) + types.Func.SetKind(kindFunc) + types.Func.SizeType = 1 // aka FuncProto + types.Func.NameOff = 1 + types.Func.SetLinkage(linkageGlobal) + + btf := marshalBTF(&types, strings, internal.NativeEndian) + + fd, err := bpfLoadBTF(&bpfLoadBTFAttr{ + btf: internal.NewSlicePointer(btf), + btfSize: uint32(len(btf)), + }) + if err == nil { + fd.Close() + } + + // Check for EINVAL specifically, rather than err != nil since we + // otherwise misdetect due to insufficient permissions. + return !errors.Is(err, unix.EINVAL), nil +}) diff --git a/vendor/github.com/cilium/ebpf/internal/btf/btf_types.go b/vendor/github.com/cilium/ebpf/internal/btf/btf_types.go new file mode 100644 index 00000000000..e34a87ecb45 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/btf/btf_types.go @@ -0,0 +1,259 @@ +package btf + +import ( + "encoding/binary" + "fmt" + "io" +) + +// btfKind describes a Type. +type btfKind uint8 + +// Equivalents of the BTF_KIND_* constants. +const ( + kindUnknown btfKind = iota + kindInt + kindPointer + kindArray + kindStruct + kindUnion + kindEnum + kindForward + kindTypedef + kindVolatile + kindConst + kindRestrict + // Added ~4.20 + kindFunc + kindFuncProto + // Added ~5.1 + kindVar + kindDatasec +) + +type btfFuncLinkage uint8 + +const ( + linkageStatic btfFuncLinkage = iota + linkageGlobal + linkageExtern +) + +const ( + btfTypeKindShift = 24 + btfTypeKindLen = 4 + btfTypeVlenShift = 0 + btfTypeVlenMask = 16 +) + +// btfType is equivalent to struct btf_type in Documentation/bpf/btf.rst. +type btfType struct { + NameOff uint32 + /* "info" bits arrangement + * bits 0-15: vlen (e.g. # of struct's members), linkage + * bits 16-23: unused + * bits 24-27: kind (e.g. int, ptr, array...etc) + * bits 28-30: unused + * bit 31: kind_flag, currently used by + * struct, union and fwd + */ + Info uint32 + /* "size" is used by INT, ENUM, STRUCT and UNION. + * "size" tells the size of the type it is describing. + * + * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT, + * FUNC and FUNC_PROTO. + * "type" is a type_id referring to another type. + */ + SizeType uint32 +} + +func (k btfKind) String() string { + switch k { + case kindUnknown: + return "Unknown" + case kindInt: + return "Integer" + case kindPointer: + return "Pointer" + case kindArray: + return "Array" + case kindStruct: + return "Struct" + case kindUnion: + return "Union" + case kindEnum: + return "Enumeration" + case kindForward: + return "Forward" + case kindTypedef: + return "Typedef" + case kindVolatile: + return "Volatile" + case kindConst: + return "Const" + case kindRestrict: + return "Restrict" + case kindFunc: + return "Function" + case kindFuncProto: + return "Function Proto" + case kindVar: + return "Variable" + case kindDatasec: + return "Section" + default: + return fmt.Sprintf("Unknown (%d)", k) + } +} + +func mask(len uint32) uint32 { + return (1 << len) - 1 +} + +func (bt *btfType) info(len, shift uint32) uint32 { + return (bt.Info >> shift) & mask(len) +} + +func (bt *btfType) setInfo(value, len, shift uint32) { + bt.Info &^= mask(len) << shift + bt.Info |= (value & mask(len)) << shift +} + +func (bt *btfType) Kind() btfKind { + return btfKind(bt.info(btfTypeKindLen, btfTypeKindShift)) +} + +func (bt *btfType) SetKind(kind btfKind) { + bt.setInfo(uint32(kind), btfTypeKindLen, btfTypeKindShift) +} + +func (bt *btfType) Vlen() int { + return int(bt.info(btfTypeVlenMask, btfTypeVlenShift)) +} + +func (bt *btfType) SetVlen(vlen int) { + bt.setInfo(uint32(vlen), btfTypeVlenMask, btfTypeVlenShift) +} + +func (bt *btfType) Linkage() btfFuncLinkage { + return btfFuncLinkage(bt.info(btfTypeVlenMask, btfTypeVlenShift)) +} + +func (bt *btfType) SetLinkage(linkage btfFuncLinkage) { + bt.setInfo(uint32(linkage), btfTypeVlenMask, btfTypeVlenShift) +} + +func (bt *btfType) Type() TypeID { + // TODO: Panic here if wrong kind? + return TypeID(bt.SizeType) +} + +func (bt *btfType) Size() uint32 { + // TODO: Panic here if wrong kind? + return bt.SizeType +} + +type rawType struct { + btfType + data interface{} +} + +func (rt *rawType) Marshal(w io.Writer, bo binary.ByteOrder) error { + if err := binary.Write(w, bo, &rt.btfType); err != nil { + return err + } + + if rt.data == nil { + return nil + } + + return binary.Write(w, bo, rt.data) +} + +type btfArray struct { + Type TypeID + IndexType TypeID + Nelems uint32 +} + +type btfMember struct { + NameOff uint32 + Type TypeID + Offset uint32 +} + +type btfVarSecinfo struct { + Type TypeID + Offset uint32 + Size uint32 +} + +type btfVariable struct { + Linkage uint32 +} + +type btfEnum struct { + NameOff uint32 + Val int32 +} + +type btfParam struct { + NameOff uint32 + Type TypeID +} + +func readTypes(r io.Reader, bo binary.ByteOrder) ([]rawType, error) { + var ( + header btfType + types []rawType + ) + + for id := TypeID(1); ; id++ { + if err := binary.Read(r, bo, &header); err == io.EOF { + return types, nil + } else if err != nil { + return nil, fmt.Errorf("can't read type info for id %v: %v", id, err) + } + + var data interface{} + switch header.Kind() { + case kindInt: + data = new(uint32) + case kindPointer: + case kindArray: + data = new(btfArray) + case kindStruct: + fallthrough + case kindUnion: + data = make([]btfMember, header.Vlen()) + case kindEnum: + data = make([]btfEnum, header.Vlen()) + case kindForward: + case kindTypedef: + case kindVolatile: + case kindConst: + case kindRestrict: + case kindFunc: + case kindFuncProto: + data = make([]btfParam, header.Vlen()) + case kindVar: + data = new(btfVariable) + case kindDatasec: + data = make([]btfVarSecinfo, header.Vlen()) + default: + return nil, fmt.Errorf("type id %v: unknown kind: %v", id, header.Kind()) + } + + if data == nil { + types = append(types, rawType{header, nil}) + continue + } + + if err := binary.Read(r, bo, data); err != nil { + return nil, fmt.Errorf("type id %d: kind %v: can't read %T: %v", id, header.Kind(), data, err) + } + + types = append(types, rawType{header, data}) + } +} diff --git a/vendor/github.com/cilium/ebpf/internal/btf/doc.go b/vendor/github.com/cilium/ebpf/internal/btf/doc.go new file mode 100644 index 00000000000..ad2576cb23c --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/btf/doc.go @@ -0,0 +1,8 @@ +// Package btf handles data encoded according to the BPF Type Format. +// +// The canonical documentation lives in the Linux kernel repository and is +// available at https://www.kernel.org/doc/html/latest/bpf/btf.html +// +// The API is very much unstable. You should only use this via the main +// ebpf library. +package btf diff --git a/vendor/github.com/cilium/ebpf/internal/btf/ext_info.go b/vendor/github.com/cilium/ebpf/internal/btf/ext_info.go new file mode 100644 index 00000000000..28918ae9e0c --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/btf/ext_info.go @@ -0,0 +1,182 @@ +package btf + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "io/ioutil" + + "github.com/cilium/ebpf/asm" + "github.com/cilium/ebpf/internal" +) + +type btfExtHeader struct { + Magic uint16 + Version uint8 + Flags uint8 + HdrLen uint32 + + FuncInfoOff uint32 + FuncInfoLen uint32 + LineInfoOff uint32 + LineInfoLen uint32 +} + +func parseExtInfos(r io.ReadSeeker, bo binary.ByteOrder, strings stringTable) (funcInfo, lineInfo map[string]extInfo, err error) { + var header btfExtHeader + if err := binary.Read(r, bo, &header); err != nil { + return nil, nil, fmt.Errorf("can't read header: %v", err) + } + + if header.Magic != btfMagic { + return nil, nil, fmt.Errorf("incorrect magic value %v", header.Magic) + } + + if header.Version != 1 { + return nil, nil, fmt.Errorf("unexpected version %v", header.Version) + } + + if header.Flags != 0 { + return nil, nil, fmt.Errorf("unsupported flags %v", header.Flags) + } + + remainder := int64(header.HdrLen) - int64(binary.Size(&header)) + if remainder < 0 { + return nil, nil, errors.New("header is too short") + } + + // Of course, the .BTF.ext header has different semantics than the + // .BTF ext header. We need to ignore non-null values. + _, err = io.CopyN(ioutil.Discard, r, remainder) + if err != nil { + return nil, nil, fmt.Errorf("header padding: %v", err) + } + + if _, err := r.Seek(int64(header.HdrLen+header.FuncInfoOff), io.SeekStart); err != nil { + return nil, nil, fmt.Errorf("can't seek to function info section: %v", err) + } + + funcInfo, err = parseExtInfo(io.LimitReader(r, int64(header.FuncInfoLen)), bo, strings) + if err != nil { + return nil, nil, fmt.Errorf("function info: %w", err) + } + + if _, err := r.Seek(int64(header.HdrLen+header.LineInfoOff), io.SeekStart); err != nil { + return nil, nil, fmt.Errorf("can't seek to line info section: %v", err) + } + + lineInfo, err = parseExtInfo(io.LimitReader(r, int64(header.LineInfoLen)), bo, strings) + if err != nil { + return nil, nil, fmt.Errorf("line info: %w", err) + } + + return funcInfo, lineInfo, nil +} + +type btfExtInfoSec struct { + SecNameOff uint32 + NumInfo uint32 +} + +type extInfoRecord struct { + InsnOff uint64 + Opaque []byte +} + +type extInfo struct { + recordSize uint32 + records []extInfoRecord +} + +func (ei extInfo) append(other extInfo, offset uint64) (extInfo, error) { + if other.recordSize != ei.recordSize { + return extInfo{}, fmt.Errorf("ext_info record size mismatch, want %d (got %d)", ei.recordSize, other.recordSize) + } + + records := make([]extInfoRecord, 0, len(ei.records)+len(other.records)) + records = append(records, ei.records...) + for _, info := range other.records { + records = append(records, extInfoRecord{ + InsnOff: info.InsnOff + offset, + Opaque: info.Opaque, + }) + } + return extInfo{ei.recordSize, records}, nil +} + +func (ei extInfo) MarshalBinary() ([]byte, error) { + if len(ei.records) == 0 { + return nil, nil + } + + buf := bytes.NewBuffer(make([]byte, 0, int(ei.recordSize)*len(ei.records))) + for _, info := range ei.records { + // The kernel expects offsets in number of raw bpf instructions, + // while the ELF tracks it in bytes. + insnOff := uint32(info.InsnOff / asm.InstructionSize) + if err := binary.Write(buf, internal.NativeEndian, insnOff); err != nil { + return nil, fmt.Errorf("can't write instruction offset: %v", err) + } + + buf.Write(info.Opaque) + } + + return buf.Bytes(), nil +} + +func parseExtInfo(r io.Reader, bo binary.ByteOrder, strings stringTable) (map[string]extInfo, error) { + var recordSize uint32 + if err := binary.Read(r, bo, &recordSize); err != nil { + return nil, fmt.Errorf("can't read record size: %v", err) + } + + if recordSize < 4 { + // Need at least insnOff + return nil, errors.New("record size too short") + } + + result := make(map[string]extInfo) + for { + var infoHeader btfExtInfoSec + if err := binary.Read(r, bo, &infoHeader); err == io.EOF { + return result, nil + } else if err != nil { + return nil, fmt.Errorf("can't read ext info header: %v", err) + } + + secName, err := strings.Lookup(infoHeader.SecNameOff) + if err != nil { + return nil, fmt.Errorf("can't get section name: %w", err) + } + + if infoHeader.NumInfo == 0 { + return nil, fmt.Errorf("section %s has invalid number of records", secName) + } + + var records []extInfoRecord + for i := uint32(0); i < infoHeader.NumInfo; i++ { + var byteOff uint32 + if err := binary.Read(r, bo, &byteOff); err != nil { + return nil, fmt.Errorf("section %v: can't read extended info offset: %v", secName, err) + } + + buf := make([]byte, int(recordSize-4)) + if _, err := io.ReadFull(r, buf); err != nil { + return nil, fmt.Errorf("section %v: can't read record: %v", secName, err) + } + + if byteOff%asm.InstructionSize != 0 { + return nil, fmt.Errorf("section %v: offset %v is not aligned with instruction size", secName, byteOff) + } + + records = append(records, extInfoRecord{uint64(byteOff), buf}) + } + + result[secName] = extInfo{ + recordSize, + records, + } + } +} diff --git a/vendor/github.com/cilium/ebpf/internal/btf/strings.go b/vendor/github.com/cilium/ebpf/internal/btf/strings.go new file mode 100644 index 00000000000..8782643a043 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/btf/strings.go @@ -0,0 +1,60 @@ +package btf + +import ( + "bytes" + "errors" + "fmt" + "io" + "io/ioutil" +) + +type stringTable []byte + +func readStringTable(r io.Reader) (stringTable, error) { + contents, err := ioutil.ReadAll(r) + if err != nil { + return nil, fmt.Errorf("can't read string table: %v", err) + } + + if len(contents) < 1 { + return nil, errors.New("string table is empty") + } + + if contents[0] != '\x00' { + return nil, errors.New("first item in string table is non-empty") + } + + if contents[len(contents)-1] != '\x00' { + return nil, errors.New("string table isn't null terminated") + } + + return stringTable(contents), nil +} + +func (st stringTable) Lookup(offset uint32) (string, error) { + if int64(offset) > int64(^uint(0)>>1) { + return "", fmt.Errorf("offset %d overflows int", offset) + } + + pos := int(offset) + if pos >= len(st) { + return "", fmt.Errorf("offset %d is out of bounds", offset) + } + + if pos > 0 && st[pos-1] != '\x00' { + return "", fmt.Errorf("offset %d isn't start of a string", offset) + } + + str := st[pos:] + end := bytes.IndexByte(str, '\x00') + if end == -1 { + return "", fmt.Errorf("offset %d isn't null terminated", offset) + } + + return string(str[:end]), nil +} + +func (st stringTable) LookupName(offset uint32) (Name, error) { + str, err := st.Lookup(offset) + return Name(str), err +} diff --git a/vendor/github.com/cilium/ebpf/internal/btf/types.go b/vendor/github.com/cilium/ebpf/internal/btf/types.go new file mode 100644 index 00000000000..264142abc0a --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/btf/types.go @@ -0,0 +1,587 @@ +package btf + +import ( + "errors" + "fmt" + "math" +) + +const maxTypeDepth = 32 + +// TypeID identifies a type in a BTF section. +type TypeID uint32 + +// ID implements part of the Type interface. +func (tid TypeID) ID() TypeID { + return tid +} + +// Type represents a type described by BTF. +type Type interface { + ID() TypeID + + // Make a copy of the type, without copying Type members. + copy() Type + + walk(*copyStack) +} + +// Name identifies a type. +// +// Anonymous types have an empty name. +type Name string + +func (n Name) name() string { + return string(n) +} + +// Void is the unit type of BTF. +type Void struct{} + +func (v *Void) ID() TypeID { return 0 } +func (v *Void) size() uint32 { return 0 } +func (v *Void) copy() Type { return (*Void)(nil) } +func (v *Void) walk(*copyStack) {} + +// Int is an integer of a given length. +type Int struct { + TypeID + Name + + // The size of the integer in bytes. + Size uint32 +} + +func (i *Int) size() uint32 { return i.Size } +func (i *Int) walk(*copyStack) {} +func (i *Int) copy() Type { + cpy := *i + return &cpy +} + +// Pointer is a pointer to another type. +type Pointer struct { + TypeID + Target Type +} + +func (p *Pointer) size() uint32 { return 8 } +func (p *Pointer) walk(cs *copyStack) { cs.push(&p.Target) } +func (p *Pointer) copy() Type { + cpy := *p + return &cpy +} + +// Array is an array with a fixed number of elements. +type Array struct { + TypeID + Type Type + Nelems uint32 +} + +func (arr *Array) walk(cs *copyStack) { cs.push(&arr.Type) } +func (arr *Array) copy() Type { + cpy := *arr + return &cpy +} + +// Struct is a compound type of consecutive members. +type Struct struct { + TypeID + Name + // The size of the struct including padding, in bytes + Size uint32 + Members []Member +} + +func (s *Struct) size() uint32 { return s.Size } + +func (s *Struct) walk(cs *copyStack) { + for i := range s.Members { + cs.push(&s.Members[i].Type) + } +} + +func (s *Struct) copy() Type { + cpy := *s + cpy.Members = make([]Member, len(s.Members)) + copy(cpy.Members, s.Members) + return &cpy +} + +// Union is a compound type where members occupy the same memory. +type Union struct { + TypeID + Name + // The size of the union including padding, in bytes. + Size uint32 + Members []Member +} + +func (u *Union) size() uint32 { return u.Size } + +func (u *Union) walk(cs *copyStack) { + for i := range u.Members { + cs.push(&u.Members[i].Type) + } +} + +func (u *Union) copy() Type { + cpy := *u + cpy.Members = make([]Member, len(u.Members)) + copy(cpy.Members, u.Members) + return &cpy +} + +// Member is part of a Struct or Union. +// +// It is not a valid Type. +type Member struct { + Name + Type Type + Offset uint32 +} + +// Enum lists possible values. +type Enum struct { + TypeID + Name +} + +func (e *Enum) size() uint32 { return 4 } +func (e *Enum) walk(*copyStack) {} +func (e *Enum) copy() Type { + cpy := *e + return &cpy +} + +// Fwd is a forward declaration of a Type. +type Fwd struct { + TypeID + Name +} + +func (f *Fwd) walk(*copyStack) {} +func (f *Fwd) copy() Type { + cpy := *f + return &cpy +} + +// Typedef is an alias of a Type. +type Typedef struct { + TypeID + Name + Type Type +} + +func (td *Typedef) walk(cs *copyStack) { cs.push(&td.Type) } +func (td *Typedef) copy() Type { + cpy := *td + return &cpy +} + +// Volatile is a modifier. +type Volatile struct { + TypeID + Type Type +} + +func (v *Volatile) walk(cs *copyStack) { cs.push(&v.Type) } +func (v *Volatile) copy() Type { + cpy := *v + return &cpy +} + +// Const is a modifier. +type Const struct { + TypeID + Type Type +} + +func (c *Const) walk(cs *copyStack) { cs.push(&c.Type) } +func (c *Const) copy() Type { + cpy := *c + return &cpy +} + +// Restrict is a modifier. +type Restrict struct { + TypeID + Type Type +} + +func (r *Restrict) walk(cs *copyStack) { cs.push(&r.Type) } +func (r *Restrict) copy() Type { + cpy := *r + return &cpy +} + +// Func is a function definition. +type Func struct { + TypeID + Name + Type Type +} + +func (f *Func) walk(cs *copyStack) { cs.push(&f.Type) } +func (f *Func) copy() Type { + cpy := *f + return &cpy +} + +// FuncProto is a function declaration. +type FuncProto struct { + TypeID + Return Type + // Parameters not supported yet +} + +func (fp *FuncProto) walk(cs *copyStack) { cs.push(&fp.Return) } +func (fp *FuncProto) copy() Type { + cpy := *fp + return &cpy +} + +// Var is a global variable. +type Var struct { + TypeID + Name + Type Type +} + +func (v *Var) walk(cs *copyStack) { cs.push(&v.Type) } +func (v *Var) copy() Type { + cpy := *v + return &cpy +} + +// Datasec is a global program section containing data. +type Datasec struct { + TypeID + Name + Size uint32 + Vars []VarSecinfo +} + +func (ds *Datasec) size() uint32 { return ds.Size } + +func (ds *Datasec) walk(cs *copyStack) { + for i := range ds.Vars { + cs.push(&ds.Vars[i].Type) + } +} + +func (ds *Datasec) copy() Type { + cpy := *ds + cpy.Vars = make([]VarSecinfo, len(ds.Vars)) + copy(cpy.Vars, ds.Vars) + return &cpy +} + +// VarSecinfo describes variable in a Datasec +type VarSecinfo struct { + Type Type + Offset uint32 + Size uint32 +} + +type sizer interface { + size() uint32 +} + +var ( + _ sizer = (*Int)(nil) + _ sizer = (*Pointer)(nil) + _ sizer = (*Struct)(nil) + _ sizer = (*Union)(nil) + _ sizer = (*Enum)(nil) + _ sizer = (*Datasec)(nil) +) + +// Sizeof returns the size of a type in bytes. +// +// Returns an error if the size can't be computed. +func Sizeof(typ Type) (int, error) { + var ( + n = int64(1) + elem int64 + ) + + for i := 0; i < maxTypeDepth; i++ { + switch v := typ.(type) { + case *Array: + if n > 0 && int64(v.Nelems) > math.MaxInt64/n { + return 0, errors.New("overflow") + } + + // Arrays may be of zero length, which allows + // n to be zero as well. + n *= int64(v.Nelems) + typ = v.Type + continue + + case sizer: + elem = int64(v.size()) + + case *Typedef: + typ = v.Type + continue + case *Volatile: + typ = v.Type + continue + case *Const: + typ = v.Type + continue + case *Restrict: + typ = v.Type + continue + + default: + return 0, fmt.Errorf("unrecognized type %T", typ) + } + + if n > 0 && elem > math.MaxInt64/n { + return 0, errors.New("overflow") + } + + size := n * elem + if int64(int(size)) != size { + return 0, errors.New("overflow") + } + + return int(size), nil + } + + return 0, errors.New("exceeded type depth") +} + +// copy a Type recursively. +// +// typ may form a cycle. +func copyType(typ Type) Type { + var ( + copies = make(map[Type]Type) + work copyStack + ) + + for t := &typ; t != nil; t = work.pop() { + // *t is the identity of the type. + if cpy := copies[*t]; cpy != nil { + *t = cpy + continue + } + + cpy := (*t).copy() + copies[*t] = cpy + *t = cpy + + // Mark any nested types for copying. + cpy.walk(&work) + } + + return typ +} + +// copyStack keeps track of pointers to types which still +// need to be copied. +type copyStack []*Type + +// push adds a type to the stack. +func (cs *copyStack) push(t *Type) { + *cs = append(*cs, t) +} + +// pop returns the topmost Type, or nil. +func (cs *copyStack) pop() *Type { + n := len(*cs) + if n == 0 { + return nil + } + + t := (*cs)[n-1] + *cs = (*cs)[:n-1] + return t +} + +type namer interface { + name() string +} + +var _ namer = Name("") + +// inflateRawTypes takes a list of raw btf types linked via type IDs, and turns +// it into a graph of Types connected via pointers. +// +// Returns a map of named types (so, where NameOff is non-zero). Since BTF ignores +// compilation units, multiple types may share the same name. A Type may form a +// cyclic graph by pointing at itself. +func inflateRawTypes(rawTypes []rawType, rawStrings stringTable) (namedTypes map[string][]Type, err error) { + type fixupDef struct { + id TypeID + expectedKind btfKind + typ *Type + } + + var fixups []fixupDef + fixup := func(id TypeID, expectedKind btfKind, typ *Type) { + fixups = append(fixups, fixupDef{id, expectedKind, typ}) + } + + convertMembers := func(raw []btfMember) ([]Member, error) { + // NB: The fixup below relies on pre-allocating this array to + // work, since otherwise append might re-allocate members. + members := make([]Member, 0, len(raw)) + for i, btfMember := range raw { + name, err := rawStrings.LookupName(btfMember.NameOff) + if err != nil { + return nil, fmt.Errorf("can't get name for member %d: %w", i, err) + } + members = append(members, Member{ + Name: name, + Offset: btfMember.Offset, + }) + } + for i := range members { + fixup(raw[i].Type, kindUnknown, &members[i].Type) + } + return members, nil + } + + types := make([]Type, 0, len(rawTypes)) + types = append(types, (*Void)(nil)) + namedTypes = make(map[string][]Type) + + for i, raw := range rawTypes { + var ( + // Void is defined to always be type ID 0, and is thus + // omitted from BTF. + id = TypeID(i + 1) + typ Type + ) + + name, err := rawStrings.LookupName(raw.NameOff) + if err != nil { + return nil, fmt.Errorf("can't get name for type id %d: %w", id, err) + } + + switch raw.Kind() { + case kindInt: + typ = &Int{id, name, raw.Size()} + + case kindPointer: + ptr := &Pointer{id, nil} + fixup(raw.Type(), kindUnknown, &ptr.Target) + typ = ptr + + case kindArray: + btfArr := raw.data.(*btfArray) + + // IndexType is unused according to btf.rst. + // Don't make it available right now. + arr := &Array{id, nil, btfArr.Nelems} + fixup(btfArr.Type, kindUnknown, &arr.Type) + typ = arr + + case kindStruct: + members, err := convertMembers(raw.data.([]btfMember)) + if err != nil { + return nil, fmt.Errorf("struct %s (id %d): %w", name, id, err) + } + typ = &Struct{id, name, raw.Size(), members} + + case kindUnion: + members, err := convertMembers(raw.data.([]btfMember)) + if err != nil { + return nil, fmt.Errorf("union %s (id %d): %w", name, id, err) + } + typ = &Union{id, name, raw.Size(), members} + + case kindEnum: + typ = &Enum{id, name} + + case kindForward: + typ = &Fwd{id, name} + + case kindTypedef: + typedef := &Typedef{id, name, nil} + fixup(raw.Type(), kindUnknown, &typedef.Type) + typ = typedef + + case kindVolatile: + volatile := &Volatile{id, nil} + fixup(raw.Type(), kindUnknown, &volatile.Type) + typ = volatile + + case kindConst: + cnst := &Const{id, nil} + fixup(raw.Type(), kindUnknown, &cnst.Type) + typ = cnst + + case kindRestrict: + restrict := &Restrict{id, nil} + fixup(raw.Type(), kindUnknown, &restrict.Type) + typ = restrict + + case kindFunc: + fn := &Func{id, name, nil} + fixup(raw.Type(), kindFuncProto, &fn.Type) + typ = fn + + case kindFuncProto: + fp := &FuncProto{id, nil} + fixup(raw.Type(), kindUnknown, &fp.Return) + typ = fp + + case kindVar: + v := &Var{id, name, nil} + fixup(raw.Type(), kindUnknown, &v.Type) + typ = v + + case kindDatasec: + btfVars := raw.data.([]btfVarSecinfo) + vars := make([]VarSecinfo, 0, len(btfVars)) + for _, btfVar := range btfVars { + vars = append(vars, VarSecinfo{ + Offset: btfVar.Offset, + Size: btfVar.Size, + }) + } + for i := range vars { + fixup(btfVars[i].Type, kindVar, &vars[i].Type) + } + typ = &Datasec{id, name, raw.SizeType, vars} + + default: + return nil, fmt.Errorf("type id %d: unknown kind: %v", id, raw.Kind()) + } + + types = append(types, typ) + + if namer, ok := typ.(namer); ok { + if name := namer.name(); name != "" { + namedTypes[name] = append(namedTypes[name], typ) + } + } + } + + for _, fixup := range fixups { + i := int(fixup.id) + if i >= len(types) { + return nil, fmt.Errorf("reference to invalid type id: %d", fixup.id) + } + + // Default void (id 0) to unknown + rawKind := kindUnknown + if i > 0 { + rawKind = rawTypes[i-1].Kind() + } + + if expected := fixup.expectedKind; expected != kindUnknown && rawKind != expected { + return nil, fmt.Errorf("expected type id %d to have kind %s, found %s", fixup.id, expected, rawKind) + } + + *fixup.typ = types[i] + } + + return namedTypes, nil +} diff --git a/vendor/github.com/cilium/ebpf/internal/cpu.go b/vendor/github.com/cilium/ebpf/internal/cpu.go index ce3cab730a3..d3424ba4345 100644 --- a/vendor/github.com/cilium/ebpf/internal/cpu.go +++ b/vendor/github.com/cilium/ebpf/internal/cpu.go @@ -2,10 +2,9 @@ package internal import ( "fmt" - "os" + "io/ioutil" + "strings" "sync" - - "github.com/pkg/errors" ) var sysCPU struct { @@ -18,45 +17,44 @@ var sysCPU struct { // Logical CPU numbers must be of the form 0-n func PossibleCPUs() (int, error) { sysCPU.once.Do(func() { - sysCPU.num, sysCPU.err = parseCPUs("/sys/devices/system/cpu/possible") + sysCPU.num, sysCPU.err = parseCPUsFromFile("/sys/devices/system/cpu/possible") }) return sysCPU.num, sysCPU.err } -var onlineCPU struct { - once sync.Once - err error - num int -} - -// OnlineCPUs returns the number of currently online CPUs -// Logical CPU numbers must be of the form 0-n -func OnlineCPUs() (int, error) { - onlineCPU.once.Do(func() { - onlineCPU.num, onlineCPU.err = parseCPUs("/sys/devices/system/cpu/online") - }) - - return onlineCPU.num, onlineCPU.err -} - -// parseCPUs parses the number of cpus from sysfs, -// in the format of "/sys/devices/system/cpu/{possible,online,..}. -// Logical CPU numbers must be of the form 0-n -func parseCPUs(path string) (int, error) { - file, err := os.Open(path) +func parseCPUsFromFile(path string) (int, error) { + spec, err := ioutil.ReadFile(path) if err != nil { return 0, err } - defer file.Close() + + n, err := parseCPUs(string(spec)) + if err != nil { + return 0, fmt.Errorf("can't parse %s: %v", path, err) + } + + return n, nil +} + +// parseCPUs parses the number of cpus from a string produced +// by bitmap_list_string() in the Linux kernel. +// Multiple ranges are rejected, since they can't be unified +// into a single number. +// This is the format of /sys/devices/system/cpu/possible, it +// is not suitable for /sys/devices/system/cpu/online, etc. +func parseCPUs(spec string) (int, error) { + if strings.Trim(spec, "\n") == "0" { + return 1, nil + } var low, high int - n, _ := fmt.Fscanf(file, "%d-%d", &low, &high) - if n < 1 || low != 0 { - return 0, errors.Wrapf(err, "%s has unknown format", path) + n, err := fmt.Sscanf(spec, "%d-%d\n", &low, &high) + if n != 2 || err != nil { + return 0, fmt.Errorf("invalid format: %s", spec) } - if n == 1 { - high = low + if low != 0 { + return 0, fmt.Errorf("CPU spec doesn't start at zero: %s", spec) } // cpus is 0 indexed diff --git a/vendor/github.com/cilium/ebpf/internal/errors.go b/vendor/github.com/cilium/ebpf/internal/errors.go new file mode 100644 index 00000000000..b6aee81f7de --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/errors.go @@ -0,0 +1,47 @@ +package internal + +import ( + "bytes" + "errors" + "fmt" + "strings" + + "github.com/cilium/ebpf/internal/unix" +) + +// ErrorWithLog returns an error that includes logs from the +// kernel verifier. +// +// logErr should be the error returned by the syscall that generated +// the log. It is used to check for truncation of the output. +func ErrorWithLog(err error, log []byte, logErr error) error { + logStr := strings.Trim(CString(log), "\t\r\n ") + if errors.Is(logErr, unix.ENOSPC) { + logStr += " (truncated...)" + } + + return &VerifierError{err, logStr} +} + +// VerifierError includes information from the eBPF verifier. +type VerifierError struct { + cause error + log string +} + +func (le *VerifierError) Error() string { + if le.log == "" { + return le.cause.Error() + } + + return fmt.Sprintf("%s: %s", le.cause, le.log) +} + +// CString turns a NUL / zero terminated byte buffer into a string. +func CString(in []byte) string { + inLen := bytes.IndexByte(in, 0) + if inLen == -1 { + return "" + } + return string(in[:inLen]) +} diff --git a/vendor/github.com/cilium/ebpf/internal/fd.go b/vendor/github.com/cilium/ebpf/internal/fd.go new file mode 100644 index 00000000000..af04955bd53 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/fd.go @@ -0,0 +1,69 @@ +package internal + +import ( + "errors" + "fmt" + "os" + "runtime" + "strconv" + + "github.com/cilium/ebpf/internal/unix" +) + +var ErrClosedFd = errors.New("use of closed file descriptor") + +type FD struct { + raw int64 +} + +func NewFD(value uint32) *FD { + fd := &FD{int64(value)} + runtime.SetFinalizer(fd, (*FD).Close) + return fd +} + +func (fd *FD) String() string { + return strconv.FormatInt(fd.raw, 10) +} + +func (fd *FD) Value() (uint32, error) { + if fd.raw < 0 { + return 0, ErrClosedFd + } + + return uint32(fd.raw), nil +} + +func (fd *FD) Close() error { + if fd.raw < 0 { + return nil + } + + value := int(fd.raw) + fd.raw = -1 + + fd.Forget() + return unix.Close(value) +} + +func (fd *FD) Forget() { + runtime.SetFinalizer(fd, nil) +} + +func (fd *FD) Dup() (*FD, error) { + if fd.raw < 0 { + return nil, ErrClosedFd + } + + dup, err := unix.FcntlInt(uintptr(fd.raw), unix.F_DUPFD_CLOEXEC, 0) + if err != nil { + return nil, fmt.Errorf("can't dup fd: %v", err) + } + + return NewFD(uint32(dup)), nil +} + +func (fd *FD) File(name string) *os.File { + fd.Forget() + return os.NewFile(uintptr(fd.raw), name) +} diff --git a/vendor/github.com/cilium/ebpf/internal/feature.go b/vendor/github.com/cilium/ebpf/internal/feature.go new file mode 100644 index 00000000000..7375b21ef98 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/feature.go @@ -0,0 +1,122 @@ +package internal + +import ( + "errors" + "fmt" + "sync" +) + +// ErrNotSupported indicates that a feature is not supported by the current kernel. +var ErrNotSupported = errors.New("not supported") + +// UnsupportedFeatureError is returned by FeatureTest() functions. +type UnsupportedFeatureError struct { + // The minimum Linux mainline version required for this feature. + // Used for the error string, and for sanity checking during testing. + MinimumVersion Version + + // The name of the feature that isn't supported. + Name string +} + +func (ufe *UnsupportedFeatureError) Error() string { + return fmt.Sprintf("%s not supported (requires >= %s)", ufe.Name, ufe.MinimumVersion) +} + +// Is indicates that UnsupportedFeatureError is ErrNotSupported. +func (ufe *UnsupportedFeatureError) Is(target error) bool { + return target == ErrNotSupported +} + +type featureTest struct { + sync.Mutex + successful bool + result error +} + +// FeatureTestFn is used to determine whether the kernel supports +// a certain feature. +// +// The return values have the following semantics: +// +// err != nil: the test couldn't be executed +// err == nil && available: the feature is available +// err == nil && !available: the feature isn't available +type FeatureTestFn func() (available bool, err error) + +// FeatureTest wraps a function so that it is run at most once. +// +// name should identify the tested feature, while version must be in the +// form Major.Minor[.Patch]. +// +// Returns an error wrapping ErrNotSupported if the feature is not supported. +func FeatureTest(name, version string, fn FeatureTestFn) func() error { + v, err := NewVersion(version) + if err != nil { + return func() error { return err } + } + + ft := new(featureTest) + return func() error { + ft.Lock() + defer ft.Unlock() + + if ft.successful { + return ft.result + } + + available, err := fn() + if errors.Is(err, ErrNotSupported) { + // The feature test aborted because a dependent feature + // is missing, which we should cache. + available = false + } else if err != nil { + // We couldn't execute the feature test to a point + // where it could make a determination. + // Don't cache the result, just return it. + return fmt.Errorf("can't detect support for %s: %w", name, err) + } + + ft.successful = true + if !available { + ft.result = &UnsupportedFeatureError{ + MinimumVersion: v, + Name: name, + } + } + return ft.result + } +} + +// A Version in the form Major.Minor.Patch. +type Version [3]uint16 + +// NewVersion creates a version from a string like "Major.Minor.Patch". +// +// Patch is optional. +func NewVersion(ver string) (Version, error) { + var major, minor, patch uint16 + n, _ := fmt.Sscanf(ver, "%d.%d.%d", &major, &minor, &patch) + if n < 2 { + return Version{}, fmt.Errorf("invalid version: %s", ver) + } + return Version{major, minor, patch}, nil +} + +func (v Version) String() string { + if v[2] == 0 { + return fmt.Sprintf("v%d.%d", v[0], v[1]) + } + return fmt.Sprintf("v%d.%d.%d", v[0], v[1], v[2]) +} + +// Less returns true if the version is less than another version. +func (v Version) Less(other Version) bool { + for i, a := range v { + if a == other[i] { + continue + } + return a < other[i] + } + return false +} diff --git a/vendor/github.com/cilium/ebpf/internal/io.go b/vendor/github.com/cilium/ebpf/internal/io.go new file mode 100644 index 00000000000..fa7402782d7 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/io.go @@ -0,0 +1,16 @@ +package internal + +import "errors" + +// DiscardZeroes makes sure that all written bytes are zero +// before discarding them. +type DiscardZeroes struct{} + +func (DiscardZeroes) Write(p []byte) (int, error) { + for _, b := range p { + if b != 0 { + return 0, errors.New("encountered non-zero byte") + } + } + return len(p), nil +} diff --git a/vendor/github.com/cilium/ebpf/internal/ptr.go b/vendor/github.com/cilium/ebpf/internal/ptr.go new file mode 100644 index 00000000000..a7f12b2db4f --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/ptr.go @@ -0,0 +1,30 @@ +package internal + +import "unsafe" + +// NewPointer creates a 64-bit pointer from an unsafe Pointer. +func NewPointer(ptr unsafe.Pointer) Pointer { + return Pointer{ptr: ptr} +} + +// NewSlicePointer creates a 64-bit pointer from a byte slice. +func NewSlicePointer(buf []byte) Pointer { + if len(buf) == 0 { + return Pointer{} + } + + return Pointer{ptr: unsafe.Pointer(&buf[0])} +} + +// NewStringPointer creates a 64-bit pointer from a string. +func NewStringPointer(str string) Pointer { + if str == "" { + return Pointer{} + } + + // The kernel expects strings to be zero terminated + buf := make([]byte, len(str)+1) + copy(buf, str) + + return Pointer{ptr: unsafe.Pointer(&buf[0])} +} diff --git a/vendor/github.com/cilium/ebpf/ptr_32_be.go b/vendor/github.com/cilium/ebpf/internal/ptr_32_be.go similarity index 59% rename from vendor/github.com/cilium/ebpf/ptr_32_be.go rename to vendor/github.com/cilium/ebpf/internal/ptr_32_be.go index 775774436a1..a56fbcc8e01 100644 --- a/vendor/github.com/cilium/ebpf/ptr_32_be.go +++ b/vendor/github.com/cilium/ebpf/internal/ptr_32_be.go @@ -1,14 +1,14 @@ // +build armbe mips mips64p32 -package ebpf +package internal import ( "unsafe" ) -// ptr wraps an unsafe.Pointer to be 64bit to +// Pointer wraps an unsafe.Pointer to be 64bit to // conform to the syscall specification. -type syscallPtr struct { +type Pointer struct { pad uint32 ptr unsafe.Pointer } diff --git a/vendor/github.com/cilium/ebpf/ptr_32_le.go b/vendor/github.com/cilium/ebpf/internal/ptr_32_le.go similarity index 61% rename from vendor/github.com/cilium/ebpf/ptr_32_le.go rename to vendor/github.com/cilium/ebpf/internal/ptr_32_le.go index 14b805e92cc..be2ecfca731 100644 --- a/vendor/github.com/cilium/ebpf/ptr_32_le.go +++ b/vendor/github.com/cilium/ebpf/internal/ptr_32_le.go @@ -1,14 +1,14 @@ // +build 386 amd64p32 arm mipsle mips64p32le -package ebpf +package internal import ( "unsafe" ) -// ptr wraps an unsafe.Pointer to be 64bit to +// Pointer wraps an unsafe.Pointer to be 64bit to // conform to the syscall specification. -type syscallPtr struct { +type Pointer struct { ptr unsafe.Pointer pad uint32 } diff --git a/vendor/github.com/cilium/ebpf/ptr_64.go b/vendor/github.com/cilium/ebpf/internal/ptr_64.go similarity index 65% rename from vendor/github.com/cilium/ebpf/ptr_64.go rename to vendor/github.com/cilium/ebpf/internal/ptr_64.go index c897d7273bc..69452dceb9a 100644 --- a/vendor/github.com/cilium/ebpf/ptr_64.go +++ b/vendor/github.com/cilium/ebpf/internal/ptr_64.go @@ -1,14 +1,14 @@ // +build !386,!amd64p32,!arm,!mipsle,!mips64p32le // +build !armbe,!mips,!mips64p32 -package ebpf +package internal import ( "unsafe" ) -// ptr wraps an unsafe.Pointer to be 64bit to +// Pointer wraps an unsafe.Pointer to be 64bit to // conform to the syscall specification. -type syscallPtr struct { +type Pointer struct { ptr unsafe.Pointer } diff --git a/vendor/github.com/cilium/ebpf/internal/syscall.go b/vendor/github.com/cilium/ebpf/internal/syscall.go new file mode 100644 index 00000000000..efbf40327c6 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/syscall.go @@ -0,0 +1,139 @@ +package internal + +import ( + "fmt" + "path/filepath" + "runtime" + "unsafe" + + "github.com/cilium/ebpf/internal/unix" +) + +//go:generate stringer -output syscall_string.go -type=BPFCmd + +// BPFCmd identifies a subcommand of the bpf syscall. +type BPFCmd int + +// Well known BPF commands. +const ( + BPF_MAP_CREATE BPFCmd = iota + BPF_MAP_LOOKUP_ELEM + BPF_MAP_UPDATE_ELEM + BPF_MAP_DELETE_ELEM + BPF_MAP_GET_NEXT_KEY + BPF_PROG_LOAD + BPF_OBJ_PIN + BPF_OBJ_GET + BPF_PROG_ATTACH + BPF_PROG_DETACH + BPF_PROG_TEST_RUN + BPF_PROG_GET_NEXT_ID + BPF_MAP_GET_NEXT_ID + BPF_PROG_GET_FD_BY_ID + BPF_MAP_GET_FD_BY_ID + BPF_OBJ_GET_INFO_BY_FD + BPF_PROG_QUERY + BPF_RAW_TRACEPOINT_OPEN + BPF_BTF_LOAD + BPF_BTF_GET_FD_BY_ID + BPF_TASK_FD_QUERY + BPF_MAP_LOOKUP_AND_DELETE_ELEM + BPF_MAP_FREEZE + BPF_BTF_GET_NEXT_ID + BPF_MAP_LOOKUP_BATCH + BPF_MAP_LOOKUP_AND_DELETE_BATCH + BPF_MAP_UPDATE_BATCH + BPF_MAP_DELETE_BATCH + BPF_LINK_CREATE + BPF_LINK_UPDATE + BPF_LINK_GET_FD_BY_ID + BPF_LINK_GET_NEXT_ID + BPF_ENABLE_STATS + BPF_ITER_CREATE +) + +// BPF wraps SYS_BPF. +// +// Any pointers contained in attr must use the Pointer type from this package. +func BPF(cmd BPFCmd, attr unsafe.Pointer, size uintptr) (uintptr, error) { + r1, _, errNo := unix.Syscall(unix.SYS_BPF, uintptr(cmd), uintptr(attr), size) + runtime.KeepAlive(attr) + + var err error + if errNo != 0 { + err = errNo + } + + return r1, err +} + +type BPFProgAttachAttr struct { + TargetFd uint32 + AttachBpfFd uint32 + AttachType uint32 + AttachFlags uint32 + ReplaceBpfFd uint32 +} + +func BPFProgAttach(attr *BPFProgAttachAttr) error { + _, err := BPF(BPF_PROG_ATTACH, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) + return err +} + +type BPFProgDetachAttr struct { + TargetFd uint32 + AttachBpfFd uint32 + AttachType uint32 +} + +func BPFProgDetach(attr *BPFProgDetachAttr) error { + _, err := BPF(BPF_PROG_DETACH, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) + return err +} + +type bpfObjAttr struct { + fileName Pointer + fd uint32 + fileFlags uint32 +} + +const bpfFSType = 0xcafe4a11 + +// BPFObjPin wraps BPF_OBJ_PIN. +func BPFObjPin(fileName string, fd *FD) error { + dirName := filepath.Dir(fileName) + var statfs unix.Statfs_t + if err := unix.Statfs(dirName, &statfs); err != nil { + return err + } + if uint64(statfs.Type) != bpfFSType { + return fmt.Errorf("%s is not on a bpf filesystem", fileName) + } + + value, err := fd.Value() + if err != nil { + return err + } + + attr := bpfObjAttr{ + fileName: NewStringPointer(fileName), + fd: value, + } + _, err = BPF(BPF_OBJ_PIN, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + if err != nil { + return fmt.Errorf("pin object %s: %w", fileName, err) + } + return nil +} + +// BPFObjGet wraps BPF_OBJ_GET. +func BPFObjGet(fileName string) (*FD, error) { + attr := bpfObjAttr{ + fileName: NewStringPointer(fileName), + } + ptr, err := BPF(BPF_OBJ_GET, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + if err != nil { + return nil, fmt.Errorf("get object %s: %w", fileName, err) + } + return NewFD(uint32(ptr)), nil +} diff --git a/vendor/github.com/cilium/ebpf/internal/syscall_string.go b/vendor/github.com/cilium/ebpf/internal/syscall_string.go new file mode 100644 index 00000000000..85df0477973 --- /dev/null +++ b/vendor/github.com/cilium/ebpf/internal/syscall_string.go @@ -0,0 +1,56 @@ +// Code generated by "stringer -output syscall_string.go -type=BPFCmd"; DO NOT EDIT. + +package internal + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[BPF_MAP_CREATE-0] + _ = x[BPF_MAP_LOOKUP_ELEM-1] + _ = x[BPF_MAP_UPDATE_ELEM-2] + _ = x[BPF_MAP_DELETE_ELEM-3] + _ = x[BPF_MAP_GET_NEXT_KEY-4] + _ = x[BPF_PROG_LOAD-5] + _ = x[BPF_OBJ_PIN-6] + _ = x[BPF_OBJ_GET-7] + _ = x[BPF_PROG_ATTACH-8] + _ = x[BPF_PROG_DETACH-9] + _ = x[BPF_PROG_TEST_RUN-10] + _ = x[BPF_PROG_GET_NEXT_ID-11] + _ = x[BPF_MAP_GET_NEXT_ID-12] + _ = x[BPF_PROG_GET_FD_BY_ID-13] + _ = x[BPF_MAP_GET_FD_BY_ID-14] + _ = x[BPF_OBJ_GET_INFO_BY_FD-15] + _ = x[BPF_PROG_QUERY-16] + _ = x[BPF_RAW_TRACEPOINT_OPEN-17] + _ = x[BPF_BTF_LOAD-18] + _ = x[BPF_BTF_GET_FD_BY_ID-19] + _ = x[BPF_TASK_FD_QUERY-20] + _ = x[BPF_MAP_LOOKUP_AND_DELETE_ELEM-21] + _ = x[BPF_MAP_FREEZE-22] + _ = x[BPF_BTF_GET_NEXT_ID-23] + _ = x[BPF_MAP_LOOKUP_BATCH-24] + _ = x[BPF_MAP_LOOKUP_AND_DELETE_BATCH-25] + _ = x[BPF_MAP_UPDATE_BATCH-26] + _ = x[BPF_MAP_DELETE_BATCH-27] + _ = x[BPF_LINK_CREATE-28] + _ = x[BPF_LINK_UPDATE-29] + _ = x[BPF_LINK_GET_FD_BY_ID-30] + _ = x[BPF_LINK_GET_NEXT_ID-31] + _ = x[BPF_ENABLE_STATS-32] + _ = x[BPF_ITER_CREATE-33] +} + +const _BPFCmd_name = "BPF_MAP_CREATEBPF_MAP_LOOKUP_ELEMBPF_MAP_UPDATE_ELEMBPF_MAP_DELETE_ELEMBPF_MAP_GET_NEXT_KEYBPF_PROG_LOADBPF_OBJ_PINBPF_OBJ_GETBPF_PROG_ATTACHBPF_PROG_DETACHBPF_PROG_TEST_RUNBPF_PROG_GET_NEXT_IDBPF_MAP_GET_NEXT_IDBPF_PROG_GET_FD_BY_IDBPF_MAP_GET_FD_BY_IDBPF_OBJ_GET_INFO_BY_FDBPF_PROG_QUERYBPF_RAW_TRACEPOINT_OPENBPF_BTF_LOADBPF_BTF_GET_FD_BY_IDBPF_TASK_FD_QUERYBPF_MAP_LOOKUP_AND_DELETE_ELEMBPF_MAP_FREEZEBPF_BTF_GET_NEXT_IDBPF_MAP_LOOKUP_BATCHBPF_MAP_LOOKUP_AND_DELETE_BATCHBPF_MAP_UPDATE_BATCHBPF_MAP_DELETE_BATCHBPF_LINK_CREATEBPF_LINK_UPDATEBPF_LINK_GET_FD_BY_IDBPF_LINK_GET_NEXT_IDBPF_ENABLE_STATSBPF_ITER_CREATE" + +var _BPFCmd_index = [...]uint16{0, 14, 33, 52, 71, 91, 104, 115, 126, 141, 156, 173, 193, 212, 233, 253, 275, 289, 312, 324, 344, 361, 391, 405, 424, 444, 475, 495, 515, 530, 545, 566, 586, 602, 617} + +func (i BPFCmd) String() string { + if i < 0 || i >= BPFCmd(len(_BPFCmd_index)-1) { + return "BPFCmd(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _BPFCmd_name[_BPFCmd_index[i]:_BPFCmd_index[i+1]] +} diff --git a/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go b/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go index 49c6be5b0e6..9363d0be81c 100644 --- a/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go +++ b/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go @@ -10,10 +10,17 @@ import ( const ( ENOENT = linux.ENOENT + EEXIST = linux.EEXIST EAGAIN = linux.EAGAIN ENOSPC = linux.ENOSPC EINVAL = linux.EINVAL EPOLLIN = linux.EPOLLIN + EINTR = linux.EINTR + EPERM = linux.EPERM + ESRCH = linux.ESRCH + ENODEV = linux.ENODEV + BPF_F_RDONLY_PROG = linux.BPF_F_RDONLY_PROG + BPF_F_WRONLY_PROG = linux.BPF_F_WRONLY_PROG BPF_OBJ_NAME_LEN = linux.BPF_OBJ_NAME_LEN BPF_TAG_SIZE = linux.BPF_TAG_SIZE SYS_BPF = linux.SYS_BPF @@ -30,6 +37,8 @@ const ( PerfBitWatermark = linux.PerfBitWatermark PERF_SAMPLE_RAW = linux.PERF_SAMPLE_RAW PERF_FLAG_FD_CLOEXEC = linux.PERF_FLAG_FD_CLOEXEC + RLIM_INFINITY = linux.RLIM_INFINITY + RLIMIT_MEMLOCK = linux.RLIMIT_MEMLOCK ) // Statfs_t is a wrapper @@ -116,3 +125,26 @@ type PerfEventAttr = linux.PerfEventAttr func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { return linux.PerfEventOpen(attr, pid, cpu, groupFd, flags) } + +// Utsname is a wrapper +type Utsname = linux.Utsname + +// Uname is a wrapper +func Uname(buf *Utsname) (err error) { + return linux.Uname(buf) +} + +// Getpid is a wrapper +func Getpid() int { + return linux.Getpid() +} + +// Gettid is a wrapper +func Gettid() int { + return linux.Gettid() +} + +// Tgkill is a wrapper +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + return linux.Tgkill(tgid, tid, sig) +} diff --git a/vendor/github.com/cilium/ebpf/internal/unix/types_other.go b/vendor/github.com/cilium/ebpf/internal/unix/types_other.go index a327f2a5991..2dea950f888 100644 --- a/vendor/github.com/cilium/ebpf/internal/unix/types_other.go +++ b/vendor/github.com/cilium/ebpf/internal/unix/types_other.go @@ -12,9 +12,16 @@ var errNonLinux = fmt.Errorf("unsupported platform %s/%s", runtime.GOOS, runtime const ( ENOENT = syscall.ENOENT + EEXIST = syscall.EEXIST EAGAIN = syscall.EAGAIN ENOSPC = syscall.ENOSPC EINVAL = syscall.EINVAL + EINTR = syscall.EINTR + EPERM = syscall.EPERM + ESRCH = syscall.ESRCH + ENODEV = syscall.ENODEV + BPF_F_RDONLY_PROG = 0 + BPF_F_WRONLY_PROG = 0 BPF_OBJ_NAME_LEN = 0x10 BPF_TAG_SIZE = 0x8 SYS_BPF = 321 @@ -32,6 +39,8 @@ const ( PerfBitWatermark = 0x4000 PERF_SAMPLE_RAW = 0x400 PERF_FLAG_FD_CLOEXEC = 0x8 + RLIM_INFINITY = 0x7fffffffffffffff + RLIMIT_MEMLOCK = 8 ) // Statfs_t is a wrapper @@ -181,3 +190,28 @@ type PerfEventAttr struct { func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { return 0, errNonLinux } + +// Utsname is a wrapper +type Utsname struct { + Release [65]byte +} + +// Uname is a wrapper +func Uname(buf *Utsname) (err error) { + return errNonLinux +} + +// Getpid is a wrapper +func Getpid() int { + return -1 +} + +// Gettid is a wrapper +func Gettid() int { + return -1 +} + +// Tgkill is a wrapper +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + return errNonLinux +} diff --git a/vendor/github.com/cilium/ebpf/linker.go b/vendor/github.com/cilium/ebpf/linker.go index da556c2269e..1bb8f61c25a 100644 --- a/vendor/github.com/cilium/ebpf/linker.go +++ b/vendor/github.com/cilium/ebpf/linker.go @@ -1,31 +1,60 @@ package ebpf import ( + "fmt" + "github.com/cilium/ebpf/asm" + "github.com/cilium/ebpf/internal/btf" ) // link resolves bpf-to-bpf calls. // -// Each section may contain multiple functions / labels, and is only linked -// if the program being edited references one of these functions. +// Each library may contain multiple functions / labels, and is only linked +// if prog references one of these functions. // -// Sections must not require linking themselves. -func link(insns asm.Instructions, sections ...asm.Instructions) (asm.Instructions, error) { - for _, section := range sections { - var err error - insns, err = linkSection(insns, section) - if err != nil { - return nil, err +// Libraries also linked. +func link(prog *ProgramSpec, libs []*ProgramSpec) error { + var ( + linked = make(map[*ProgramSpec]bool) + pending = []asm.Instructions{prog.Instructions} + insns asm.Instructions + ) + for len(pending) > 0 { + insns, pending = pending[0], pending[1:] + for _, lib := range libs { + if linked[lib] { + continue + } + + needed, err := needSection(insns, lib.Instructions) + if err != nil { + return fmt.Errorf("linking %s: %w", lib.Name, err) + } + + if !needed { + continue + } + + linked[lib] = true + prog.Instructions = append(prog.Instructions, lib.Instructions...) + pending = append(pending, lib.Instructions) + + if prog.BTF != nil && lib.BTF != nil { + if err := btf.ProgramAppend(prog.BTF, lib.BTF); err != nil { + return fmt.Errorf("linking BTF of %s: %w", lib.Name, err) + } + } } } - return insns, nil + + return nil } -func linkSection(insns, section asm.Instructions) (asm.Instructions, error) { +func needSection(insns, section asm.Instructions) (bool, error) { // A map of symbols to the libraries which contain them. symbols, err := section.SymbolOffsets() if err != nil { - return nil, err + return false, err } for _, ins := range insns { @@ -33,7 +62,7 @@ func linkSection(insns, section asm.Instructions) (asm.Instructions, error) { continue } - if ins.OpCode.JumpOp() != asm.Call || ins.Src != asm.R1 { + if ins.OpCode.JumpOp() != asm.Call || ins.Src != asm.PseudoCall { continue } @@ -48,11 +77,10 @@ func linkSection(insns, section asm.Instructions) (asm.Instructions, error) { } // At this point we know that at least one function in the - // library is called from insns. Merge the two sections. - // The rewrite of ins.Constant happens in asm.Instruction.Marshal. - return append(insns, section...), nil + // library is called from insns, so we have to link it. + return true, nil } - // None of the functions in the section are called. Do nothing. - return insns, nil + // None of the functions in the section are called. + return false, nil } diff --git a/vendor/github.com/cilium/ebpf/map.go b/vendor/github.com/cilium/ebpf/map.go index 028a9135202..461b995a54b 100644 --- a/vendor/github.com/cilium/ebpf/map.go +++ b/vendor/github.com/cilium/ebpf/map.go @@ -1,15 +1,25 @@ package ebpf import ( + "errors" "fmt" - "unsafe" + "strings" "github.com/cilium/ebpf/internal" + "github.com/cilium/ebpf/internal/btf" "github.com/cilium/ebpf/internal/unix" - - "github.com/pkg/errors" ) +// Errors returned by Map and MapIterator methods. +var ( + ErrKeyNotExist = errors.New("key does not exist") + ErrKeyExist = errors.New("key already exists") + ErrIterationAborted = errors.New("iteration aborted") +) + +// MapID represents the unique ID of an eBPF map +type MapID uint32 + // MapSpec defines a Map. type MapSpec struct { // Name is passed to the kernel as a debug aid. Must only contain @@ -20,8 +30,18 @@ type MapSpec struct { ValueSize uint32 MaxEntries uint32 Flags uint32 + + // The initial contents of the map. May be nil. + Contents []MapKV + + // Whether to freeze a map after setting its initial contents. + Freeze bool + // InnerMap is used as a template for ArrayOfMaps and HashOfMaps InnerMap *MapSpec + + // The BTF associated with this map. + BTF *btf.Map } func (ms *MapSpec) String() string { @@ -29,16 +49,26 @@ func (ms *MapSpec) String() string { } // Copy returns a copy of the spec. +// +// MapSpec.Contents is a shallow copy. func (ms *MapSpec) Copy() *MapSpec { if ms == nil { return nil } cpy := *ms + cpy.Contents = make([]MapKV, len(ms.Contents)) + copy(cpy.Contents, ms.Contents) cpy.InnerMap = ms.InnerMap.Copy() return &cpy } +// MapKV is used to initialize the contents of a Map. +type MapKV struct { + Key interface{} + Value interface{} +} + // Map represents a Map file descriptor. // // It is not safe to close a map which is used by other goroutines. @@ -49,8 +79,9 @@ func (ms *MapSpec) Copy() *MapSpec { // Implement encoding.BinaryMarshaler or encoding.BinaryUnmarshaler // if you require custom encoding. type Map struct { - fd *bpfFD - abi MapABI + name string + fd *internal.FD + abi MapABI // Per CPU maps return values larger than the size in the spec fullValueSize int } @@ -62,104 +93,151 @@ func NewMapFromFD(fd int) (*Map, error) { if fd < 0 { return nil, errors.New("invalid fd") } - bpfFd := newBPFFD(uint32(fd)) + bpfFd := internal.NewFD(uint32(fd)) - abi, err := newMapABIFromFd(bpfFd) + name, abi, err := newMapABIFromFd(bpfFd) if err != nil { - bpfFd.forget() + bpfFd.Forget() return nil, err } - return newMap(bpfFd, abi) + return newMap(bpfFd, name, abi) } // NewMap creates a new Map. // // Creating a map for the first time will perform feature detection // by creating small, temporary maps. +// +// The caller is responsible for ensuring the process' rlimit is set +// sufficiently high for locking memory during map creation. This can be done +// by calling unix.Setrlimit with unix.RLIMIT_MEMLOCK prior to calling NewMap. func NewMap(spec *MapSpec) (*Map, error) { + if spec.BTF == nil { + return newMapWithBTF(spec, nil) + } + + handle, err := btf.NewHandle(btf.MapSpec(spec.BTF)) + if err != nil && !errors.Is(err, btf.ErrNotSupported) { + return nil, fmt.Errorf("can't load BTF: %w", err) + } + + return newMapWithBTF(spec, handle) +} + +func newMapWithBTF(spec *MapSpec, handle *btf.Handle) (*Map, error) { if spec.Type != ArrayOfMaps && spec.Type != HashOfMaps { - return createMap(spec, nil) + return createMap(spec, nil, handle) } if spec.InnerMap == nil { - return nil, errors.Errorf("%s requires InnerMap", spec.Type) + return nil, fmt.Errorf("%s requires InnerMap", spec.Type) } - template, err := createMap(spec.InnerMap, nil) + template, err := createMap(spec.InnerMap, nil, handle) if err != nil { return nil, err } defer template.Close() - return createMap(spec, template.fd) + return createMap(spec, template.fd, handle) } -func createMap(spec *MapSpec, inner *bpfFD) (*Map, error) { - spec = spec.Copy() +func createMap(spec *MapSpec, inner *internal.FD, handle *btf.Handle) (*Map, error) { + abi := newMapABIFromSpec(spec) switch spec.Type { case ArrayOfMaps: fallthrough case HashOfMaps: - if spec.ValueSize != 0 && spec.ValueSize != 4 { - return nil, errors.Errorf("ValueSize must be zero or four for map of map") + if err := haveNestedMaps(); err != nil { + return nil, err } - spec.ValueSize = 4 + + if abi.ValueSize != 0 && abi.ValueSize != 4 { + return nil, errors.New("ValueSize must be zero or four for map of map") + } + abi.ValueSize = 4 case PerfEventArray: - if spec.KeySize != 0 { - return nil, errors.Errorf("KeySize must be zero for perf event array") - } - if spec.ValueSize != 0 { - return nil, errors.Errorf("ValueSize must be zero for perf event array") - } - if spec.MaxEntries == 0 { - n, err := internal.OnlineCPUs() - if err != nil { - return nil, errors.Wrap(err, "perf event array") - } - spec.MaxEntries = uint32(n) + if abi.KeySize != 0 && abi.KeySize != 4 { + return nil, errors.New("KeySize must be zero or four for perf event array") } + abi.KeySize = 4 - spec.KeySize = 4 - spec.ValueSize = 4 + if abi.ValueSize != 0 && abi.ValueSize != 4 { + return nil, errors.New("ValueSize must be zero or four for perf event array") + } + abi.ValueSize = 4 + + if abi.MaxEntries == 0 { + n, err := internal.PossibleCPUs() + if err != nil { + return nil, fmt.Errorf("perf event array: %w", err) + } + abi.MaxEntries = uint32(n) + } + } + + if abi.Flags&(unix.BPF_F_RDONLY_PROG|unix.BPF_F_WRONLY_PROG) > 0 || spec.Freeze { + if err := haveMapMutabilityModifiers(); err != nil { + return nil, fmt.Errorf("map create: %w", err) + } } attr := bpfMapCreateAttr{ - mapType: spec.Type, - keySize: spec.KeySize, - valueSize: spec.ValueSize, - maxEntries: spec.MaxEntries, - flags: spec.Flags, + mapType: abi.Type, + keySize: abi.KeySize, + valueSize: abi.ValueSize, + maxEntries: abi.MaxEntries, + flags: abi.Flags, } if inner != nil { var err error - attr.innerMapFd, err = inner.value() + attr.innerMapFd, err = inner.Value() if err != nil { - return nil, errors.Wrap(err, "map create") + return nil, fmt.Errorf("map create: %w", err) } } - name, err := newBPFObjName(spec.Name) - if err != nil { - return nil, errors.Wrap(err, "map create") + if handle != nil && spec.BTF != nil { + attr.btfFd = uint32(handle.FD()) + attr.btfKeyTypeID = btf.MapKey(spec.BTF).ID() + attr.btfValueTypeID = btf.MapValue(spec.BTF).ID() } - if haveObjName.Result() { - attr.mapName = name + if haveObjName() == nil { + attr.mapName = newBPFObjName(spec.Name) } fd, err := bpfMapCreate(&attr) if err != nil { - return nil, errors.Wrap(err, "map create") + return nil, fmt.Errorf("map create: %w", err) } - return newMap(fd, newMapABIFromSpec(spec)) + m, err := newMap(fd, spec.Name, abi) + if err != nil { + return nil, err + } + + if err := m.populate(spec.Contents); err != nil { + m.Close() + return nil, fmt.Errorf("map create: can't set initial contents: %w", err) + } + + if spec.Freeze { + if err := m.Freeze(); err != nil { + m.Close() + return nil, fmt.Errorf("can't freeze map: %w", err) + } + } + + return m, nil } -func newMap(fd *bpfFD, abi *MapABI) (*Map, error) { +func newMap(fd *internal.FD, name string, abi *MapABI) (*Map, error) { m := &Map{ + name, fd, *abi, int(abi.ValueSize), @@ -179,7 +257,10 @@ func newMap(fd *bpfFD, abi *MapABI) (*Map, error) { } func (m *Map) String() string { - return fmt.Sprintf("%s#%d", m.abi.Type, m.fd) + if m.name != "" { + return fmt.Sprintf("%s(%s)#%v", m.abi.Type, m.name, m.fd) + } + return fmt.Sprintf("%s#%v", m.abi.Type, m.fd) } // ABI gets the ABI of the Map @@ -219,9 +300,9 @@ func (m *Map) Lookup(key, valueOut interface{}) error { *value = m return nil case *Map: - return errors.Errorf("can't unmarshal into %T, need %T", value, (**Map)(nil)) + return fmt.Errorf("can't unmarshal into %T, need %T", value, (**Map)(nil)) case Map: - return errors.Errorf("can't unmarshal into %T, need %T", value, (**Map)(nil)) + return fmt.Errorf("can't unmarshal into %T, need %T", value, (**Map)(nil)) case **Program: p, err := unmarshalProgram(valueBytes) @@ -233,38 +314,58 @@ func (m *Map) Lookup(key, valueOut interface{}) error { *value = p return nil case *Program: - return errors.Errorf("can't unmarshal into %T, need %T", value, (**Program)(nil)) + return fmt.Errorf("can't unmarshal into %T, need %T", value, (**Program)(nil)) case Program: - return errors.Errorf("can't unmarshal into %T, need %T", value, (**Program)(nil)) + return fmt.Errorf("can't unmarshal into %T, need %T", value, (**Program)(nil)) default: return unmarshalBytes(valueOut, valueBytes) } } +// LookupAndDelete retrieves and deletes a value from a Map. +// +// Returns ErrKeyNotExist if the key doesn't exist. +func (m *Map) LookupAndDelete(key, valueOut interface{}) error { + valuePtr, valueBytes := makeBuffer(valueOut, m.fullValueSize) + + keyPtr, err := marshalPtr(key, int(m.abi.KeySize)) + if err != nil { + return fmt.Errorf("can't marshal key: %w", err) + } + + if err := bpfMapLookupAndDelete(m.fd, keyPtr, valuePtr); err != nil { + return fmt.Errorf("lookup and delete failed: %w", err) + } + + return unmarshalBytes(valueOut, valueBytes) +} + // LookupBytes gets a value from Map. // // Returns a nil value if a key doesn't exist. func (m *Map) LookupBytes(key interface{}) ([]byte, error) { valueBytes := make([]byte, m.fullValueSize) - valuePtr := newPtr(unsafe.Pointer(&valueBytes[0])) + valuePtr := internal.NewSlicePointer(valueBytes) err := m.lookup(key, valuePtr) - if IsNotExist(err) { + if errors.Is(err, ErrKeyNotExist) { return nil, nil } return valueBytes, err } -func (m *Map) lookup(key interface{}, valueOut syscallPtr) error { +func (m *Map) lookup(key interface{}, valueOut internal.Pointer) error { keyPtr, err := marshalPtr(key, int(m.abi.KeySize)) if err != nil { - return errors.WithMessage(err, "can't marshal key") + return fmt.Errorf("can't marshal key: %w", err) } - err = bpfMapLookupElem(m.fd, keyPtr, valueOut) - return errors.WithMessage(err, "lookup failed") + if err = bpfMapLookupElem(m.fd, keyPtr, valueOut); err != nil { + return fmt.Errorf("lookup failed: %w", err) + } + return nil } // MapUpdateFlags controls the behaviour of the Map.Update call. @@ -292,38 +393,46 @@ func (m *Map) Put(key, value interface{}) error { func (m *Map) Update(key, value interface{}, flags MapUpdateFlags) error { keyPtr, err := marshalPtr(key, int(m.abi.KeySize)) if err != nil { - return errors.WithMessage(err, "can't marshal key") + return fmt.Errorf("can't marshal key: %w", err) } - var valuePtr syscallPtr + var valuePtr internal.Pointer if m.abi.Type.hasPerCPUValue() { valuePtr, err = marshalPerCPUValue(value, int(m.abi.ValueSize)) } else { valuePtr, err = marshalPtr(value, int(m.abi.ValueSize)) } if err != nil { - return errors.WithMessage(err, "can't marshal value") + return fmt.Errorf("can't marshal value: %w", err) } - return bpfMapUpdateElem(m.fd, keyPtr, valuePtr, uint64(flags)) + if err = bpfMapUpdateElem(m.fd, keyPtr, valuePtr, uint64(flags)); err != nil { + return fmt.Errorf("update failed: %w", err) + } + + return nil } // Delete removes a value. // -// Returns an error if the key does not exist, see IsNotExist. +// Returns ErrKeyNotExist if the key does not exist. func (m *Map) Delete(key interface{}) error { keyPtr, err := marshalPtr(key, int(m.abi.KeySize)) if err != nil { - return errors.WithMessage(err, "can't marshal key") + return fmt.Errorf("can't marshal key: %w", err) } - err = bpfMapDeleteElem(m.fd, keyPtr) - return errors.WithMessage(err, "can't delete key") + if err = bpfMapDeleteElem(m.fd, keyPtr); err != nil { + return fmt.Errorf("delete failed: %w", err) + } + return nil } // NextKey finds the key following an initial key. // // See NextKeyBytes for details. +// +// Returns ErrKeyNotExist if there is no next key. func (m *Map) NextKey(key, nextKeyOut interface{}) error { nextKeyPtr, nextKeyBytes := makeBuffer(nextKeyOut, int(m.abi.KeySize)) @@ -335,8 +444,10 @@ func (m *Map) NextKey(key, nextKeyOut interface{}) error { return nil } - err := unmarshalBytes(nextKeyOut, nextKeyBytes) - return errors.WithMessage(err, "can't unmarshal next key") + if err := unmarshalBytes(nextKeyOut, nextKeyBytes); err != nil { + return fmt.Errorf("can't unmarshal next key: %w", err) + } + return nil } // NextKeyBytes returns the key following an initial key as a byte slice. @@ -344,33 +455,37 @@ func (m *Map) NextKey(key, nextKeyOut interface{}) error { // Passing nil will return the first key. // // Use Iterate if you want to traverse all entries in the map. +// +// Returns nil if there are no more keys. func (m *Map) NextKeyBytes(key interface{}) ([]byte, error) { nextKey := make([]byte, m.abi.KeySize) - nextKeyPtr := newPtr(unsafe.Pointer(&nextKey[0])) + nextKeyPtr := internal.NewSlicePointer(nextKey) err := m.nextKey(key, nextKeyPtr) - if IsNotExist(err) { + if errors.Is(err, ErrKeyNotExist) { return nil, nil } return nextKey, err } -func (m *Map) nextKey(key interface{}, nextKeyOut syscallPtr) error { +func (m *Map) nextKey(key interface{}, nextKeyOut internal.Pointer) error { var ( - keyPtr syscallPtr + keyPtr internal.Pointer err error ) if key != nil { keyPtr, err = marshalPtr(key, int(m.abi.KeySize)) if err != nil { - return errors.WithMessage(err, "can't marshal key") + return fmt.Errorf("can't marshal key: %w", err) } } - err = bpfMapGetNextKey(m.fd, keyPtr, nextKeyOut) - return errors.WithMessage(err, "can't get next key") + if err = bpfMapGetNextKey(m.fd, keyPtr, nextKeyOut); err != nil { + return fmt.Errorf("next key failed: %w", err) + } + return nil } // Iterate traverses a map. @@ -391,14 +506,14 @@ func (m *Map) Close() error { return nil } - return m.fd.close() + return m.fd.Close() } // FD gets the file descriptor of the Map. // // Calling this function is invalid after Close has been called. func (m *Map) FD() int { - fd, err := m.fd.value() + fd, err := m.fd.Value() if err != nil { // Best effort: -1 is the number most likely to be an // invalid file descriptor. @@ -419,45 +534,68 @@ func (m *Map) Clone() (*Map, error) { return nil, nil } - dup, err := m.fd.dup() + dup, err := m.fd.Dup() if err != nil { - return nil, errors.Wrap(err, "can't clone map") + return nil, fmt.Errorf("can't clone map: %w", err) } - return newMap(dup, &m.abi) + return newMap(dup, m.name, &m.abi) } // Pin persists the map past the lifetime of the process that created it. // // This requires bpffs to be mounted above fileName. See http://cilium.readthedocs.io/en/doc-1.0/kubernetes/install/#mounting-the-bpf-fs-optional func (m *Map) Pin(fileName string) error { - return bpfPinObject(fileName, m.fd) + return internal.BPFObjPin(fileName, m.fd) +} + +// Freeze prevents a map to be modified from user space. +// +// It makes no changes to kernel-side restrictions. +func (m *Map) Freeze() error { + if err := haveMapMutabilityModifiers(); err != nil { + return fmt.Errorf("can't freeze map: %w", err) + } + + if err := bpfMapFreeze(m.fd); err != nil { + return fmt.Errorf("can't freeze map: %w", err) + } + return nil +} + +func (m *Map) populate(contents []MapKV) error { + for _, kv := range contents { + if err := m.Put(kv.Key, kv.Value); err != nil { + return fmt.Errorf("key %v: %w", kv.Key, err) + } + } + return nil } // LoadPinnedMap load a Map from a BPF file. // -// Requires at least Linux 4.13, and is not compatible with -// nested maps. Use LoadPinnedMapExplicit in these situations. +// The function is not compatible with nested maps. +// Use LoadPinnedMapExplicit in these situations. func LoadPinnedMap(fileName string) (*Map, error) { - fd, err := bpfGetObject(fileName) + fd, err := internal.BPFObjGet(fileName) if err != nil { return nil, err } - abi, err := newMapABIFromFd(fd) + name, abi, err := newMapABIFromFd(fd) if err != nil { - _ = fd.close() + _ = fd.Close() return nil, err } - return newMap(fd, abi) + return newMap(fd, name, abi) } // LoadPinnedMapExplicit loads a map with explicit parameters. func LoadPinnedMapExplicit(fileName string, abi *MapABI) (*Map, error) { - fd, err := bpfGetObject(fileName) + fd, err := internal.BPFObjGet(fileName) if err != nil { return nil, err } - return newMap(fd, abi) + return newMap(fd, "", abi) } func unmarshalMap(buf []byte) (*Map, error) { @@ -468,23 +606,12 @@ func unmarshalMap(buf []byte) (*Map, error) { // Looking up an entry in a nested map or prog array returns an id, // not an fd. id := internal.NativeEndian.Uint32(buf) - fd, err := bpfGetMapFDByID(id) - if err != nil { - return nil, err - } - - abi, err := newMapABIFromFd(fd) - if err != nil { - _ = fd.close() - return nil, err - } - - return newMap(fd, abi) + return NewMapFromID(MapID(id)) } // MarshalBinary implements BinaryMarshaler. func (m *Map) MarshalBinary() ([]byte, error) { - fd, err := m.fd.value() + fd, err := m.fd.Value() if err != nil { return nil, err } @@ -494,6 +621,60 @@ func (m *Map) MarshalBinary() ([]byte, error) { return buf, nil } +func patchValue(value []byte, typ btf.Type, replacements map[string]interface{}) error { + replaced := make(map[string]bool) + replace := func(name string, offset, size int, replacement interface{}) error { + if offset+size > len(value) { + return fmt.Errorf("%s: offset %d(+%d) is out of bounds", name, offset, size) + } + + buf, err := marshalBytes(replacement, size) + if err != nil { + return fmt.Errorf("marshal %s: %w", name, err) + } + + copy(value[offset:offset+size], buf) + replaced[name] = true + return nil + } + + switch parent := typ.(type) { + case *btf.Datasec: + for _, secinfo := range parent.Vars { + name := string(secinfo.Type.(*btf.Var).Name) + replacement, ok := replacements[name] + if !ok { + continue + } + + err := replace(name, int(secinfo.Offset), int(secinfo.Size), replacement) + if err != nil { + return err + } + } + + default: + return fmt.Errorf("patching %T is not supported", typ) + } + + if len(replaced) == len(replacements) { + return nil + } + + var missing []string + for name := range replacements { + if !replaced[name] { + missing = append(missing, name) + } + } + + if len(missing) == 1 { + return fmt.Errorf("unknown field: %s", missing[0]) + } + + return fmt.Errorf("unknown fields: %s", strings.Join(missing, ",")) +} + // MapIterator iterates a Map. // // See Map.Iterate. @@ -514,8 +695,6 @@ func newMapIterator(target *Map) *MapIterator { } } -var errIterationAborted = errors.New("iteration aborted") - // Next decodes the next key and value. // // Iterating a hash map from which keys are being deleted is not @@ -551,7 +730,7 @@ func (mi *MapIterator) Next(keyOut, valueOut interface{}) bool { mi.prevKey = mi.prevBytes mi.err = mi.target.Lookup(nextBytes, valueOut) - if IsNotExist(mi.err) { + if errors.Is(mi.err, ErrKeyNotExist) { // Even though the key should be valid, we couldn't look up // its value. If we're iterating a hash map this is probably // because a concurrent delete removed the value before we @@ -570,26 +749,50 @@ func (mi *MapIterator) Next(keyOut, valueOut interface{}) bool { return mi.err == nil } - mi.err = errIterationAborted + mi.err = fmt.Errorf("%w", ErrIterationAborted) return false } // Err returns any encountered error. // // The method must be called after Next returns nil. +// +// Returns ErrIterationAborted if it wasn't possible to do a full iteration. func (mi *MapIterator) Err() error { return mi.err } -// IsNotExist returns true if the error indicates that a -// key doesn't exist. -func IsNotExist(err error) bool { - return errors.Cause(err) == unix.ENOENT +// MapGetNextID returns the ID of the next eBPF map. +// +// Returns ErrNotExist, if there is no next eBPF map. +func MapGetNextID(startID MapID) (MapID, error) { + id, err := objGetNextID(internal.BPF_MAP_GET_NEXT_ID, uint32(startID)) + return MapID(id), err } -// IsIterationAborted returns true if the iteration was aborted. +// NewMapFromID returns the map for a given id. // -// This occurs when keys are deleted from a hash map during iteration. -func IsIterationAborted(err error) bool { - return errors.Cause(err) == errIterationAborted +// Returns ErrNotExist, if there is no eBPF map with the given id. +func NewMapFromID(id MapID) (*Map, error) { + fd, err := bpfObjGetFDByID(internal.BPF_MAP_GET_FD_BY_ID, uint32(id)) + if err != nil { + return nil, err + } + + name, abi, err := newMapABIFromFd(fd) + if err != nil { + _ = fd.Close() + return nil, err + } + + return newMap(fd, name, abi) +} + +// ID returns the systemwide unique ID of the map. +func (m *Map) ID() (MapID, error) { + info, err := bpfGetMapInfoByFD(m.fd) + if err != nil { + return MapID(0), err + } + return MapID(info.id), nil } diff --git a/vendor/github.com/cilium/ebpf/marshalers.go b/vendor/github.com/cilium/ebpf/marshalers.go index 44ba2733056..c0db2f6b0b1 100644 --- a/vendor/github.com/cilium/ebpf/marshalers.go +++ b/vendor/github.com/cilium/ebpf/marshalers.go @@ -4,26 +4,33 @@ import ( "bytes" "encoding" "encoding/binary" + "errors" + "fmt" "reflect" "runtime" "unsafe" "github.com/cilium/ebpf/internal" - - "github.com/pkg/errors" ) -func marshalPtr(data interface{}, length int) (syscallPtr, error) { +func marshalPtr(data interface{}, length int) (internal.Pointer, error) { + if data == nil { + if length == 0 { + return internal.NewPointer(nil), nil + } + return internal.Pointer{}, errors.New("can't use nil as key of map") + } + if ptr, ok := data.(unsafe.Pointer); ok { - return newPtr(ptr), nil + return internal.NewPointer(ptr), nil } buf, err := marshalBytes(data, length) if err != nil { - return syscallPtr{}, err + return internal.Pointer{}, err } - return newPtr(unsafe.Pointer(&buf[0])), nil + return internal.NewSlicePointer(buf), nil } func marshalBytes(data interface{}, length int) (buf []byte, err error) { @@ -39,7 +46,9 @@ func marshalBytes(data interface{}, length int) (buf []byte, err error) { default: var wr bytes.Buffer err = binary.Write(&wr, internal.NativeEndian, value) - err = errors.Wrapf(err, "encoding %T", value) + if err != nil { + err = fmt.Errorf("encoding %T: %v", value, err) + } buf = wr.Bytes() } if err != nil { @@ -47,18 +56,18 @@ func marshalBytes(data interface{}, length int) (buf []byte, err error) { } if len(buf) != length { - return nil, errors.Errorf("%T doesn't marshal to %d bytes", data, length) + return nil, fmt.Errorf("%T doesn't marshal to %d bytes", data, length) } return buf, nil } -func makeBuffer(dst interface{}, length int) (syscallPtr, []byte) { +func makeBuffer(dst interface{}, length int) (internal.Pointer, []byte) { if ptr, ok := dst.(unsafe.Pointer); ok { - return newPtr(ptr), nil + return internal.NewPointer(ptr), nil } buf := make([]byte, length) - return newPtr(unsafe.Pointer(&buf[0])), buf + return internal.NewSlicePointer(buf), buf } func unmarshalBytes(data interface{}, buf []byte) error { @@ -88,8 +97,10 @@ func unmarshalBytes(data interface{}, buf []byte) error { return errors.New("require pointer to []byte") default: rd := bytes.NewReader(buf) - err := binary.Read(rd, internal.NativeEndian, value) - return errors.Wrapf(err, "decoding %T", value) + if err := binary.Read(rd, internal.NativeEndian, value); err != nil { + return fmt.Errorf("decoding %T: %v", value, err) + } + return nil } } @@ -99,21 +110,21 @@ func unmarshalBytes(data interface{}, buf []byte) error { // Values are initialized to zero if the slice has less elements than CPUs. // // slice must have a type like []elementType. -func marshalPerCPUValue(slice interface{}, elemLength int) (syscallPtr, error) { +func marshalPerCPUValue(slice interface{}, elemLength int) (internal.Pointer, error) { sliceType := reflect.TypeOf(slice) if sliceType.Kind() != reflect.Slice { - return syscallPtr{}, errors.New("per-CPU value requires slice") + return internal.Pointer{}, errors.New("per-CPU value requires slice") } possibleCPUs, err := internal.PossibleCPUs() if err != nil { - return syscallPtr{}, err + return internal.Pointer{}, err } sliceValue := reflect.ValueOf(slice) sliceLen := sliceValue.Len() if sliceLen > possibleCPUs { - return syscallPtr{}, errors.Errorf("per-CPU value exceeds number of CPUs") + return internal.Pointer{}, fmt.Errorf("per-CPU value exceeds number of CPUs") } alignedElemLength := align(elemLength, 8) @@ -123,14 +134,14 @@ func marshalPerCPUValue(slice interface{}, elemLength int) (syscallPtr, error) { elem := sliceValue.Index(i).Interface() elemBytes, err := marshalBytes(elem, elemLength) if err != nil { - return syscallPtr{}, err + return internal.Pointer{}, err } offset := i * alignedElemLength copy(buf[offset:offset+elemLength], elemBytes) } - return newPtr(unsafe.Pointer(&buf[0])), nil + return internal.NewSlicePointer(buf), nil } // unmarshalPerCPUValue decodes a buffer into a slice containing one value per @@ -140,7 +151,7 @@ func marshalPerCPUValue(slice interface{}, elemLength int) (syscallPtr, error) { func unmarshalPerCPUValue(slicePtr interface{}, elemLength int, buf []byte) error { slicePtrType := reflect.TypeOf(slicePtr) if slicePtrType.Kind() != reflect.Ptr || slicePtrType.Elem().Kind() != reflect.Slice { - return errors.Errorf("per-cpu value requires pointer to slice") + return fmt.Errorf("per-cpu value requires pointer to slice") } possibleCPUs, err := internal.PossibleCPUs() @@ -159,7 +170,7 @@ func unmarshalPerCPUValue(slicePtr interface{}, elemLength int, buf []byte) erro step := len(buf) / possibleCPUs if step < elemLength { - return errors.Errorf("per-cpu element length is larger than available data") + return fmt.Errorf("per-cpu element length is larger than available data") } for i := 0; i < possibleCPUs; i++ { var elem interface{} @@ -177,7 +188,7 @@ func unmarshalPerCPUValue(slicePtr interface{}, elemLength int, buf []byte) erro err := unmarshalBytes(elem, elemBytes) if err != nil { - return errors.Wrapf(err, "cpu %d", i) + return fmt.Errorf("cpu %d: %w", i, err) } buf = buf[step:] diff --git a/vendor/github.com/cilium/ebpf/prog.go b/vendor/github.com/cilium/ebpf/prog.go index 03b24fb950a..429203f07e8 100644 --- a/vendor/github.com/cilium/ebpf/prog.go +++ b/vendor/github.com/cilium/ebpf/prog.go @@ -2,23 +2,24 @@ package ebpf import ( "bytes" + "encoding/binary" + "errors" "fmt" "math" - "path/filepath" "strings" "time" - "unsafe" "github.com/cilium/ebpf/asm" "github.com/cilium/ebpf/internal" + "github.com/cilium/ebpf/internal/btf" "github.com/cilium/ebpf/internal/unix" - - "github.com/pkg/errors" ) -var ( - errNotSupported = errors.New("ebpf: not supported by kernel") -) +// ErrNotSupported is returned whenever the kernel doesn't support a feature. +var ErrNotSupported = internal.ErrNotSupported + +// ProgramID represents the unique ID of an eBPF program +type ProgramID uint32 const ( // Number of bytes to pad the output buffer for BPF_PROG_TEST_RUN. @@ -45,12 +46,33 @@ type ProgramOptions struct { type ProgramSpec struct { // Name is passed to the kernel as a debug aid. Must only contain // alpha numeric and '_' characters. - Name string - Type ProgramType - AttachType AttachType - Instructions asm.Instructions - License string + Name string + // Type determines at which hook in the kernel a program will run. + Type ProgramType + AttachType AttachType + // Name of a kernel data structure to attach to. It's interpretation + // depends on Type and AttachType. + AttachTo string + Instructions asm.Instructions + + // License of the program. Some helpers are only available if + // the license is deemed compatible with the GPL. + // + // See https://www.kernel.org/doc/html/latest/process/license-rules.html#id1 + License string + + // Version used by tracing programs. + // + // Deprecated: superseded by BTF. KernelVersion uint32 + + // The BTF associated with this program. Changing Instructions + // will most likely invalidate the contained data, and may + // result in errors when attempting to load it into the kernel. + BTF *btf.Program + + // The byte order this program was compiled for, may be nil. + ByteOrder binary.ByteOrder } // Copy returns a copy of the spec. @@ -73,9 +95,10 @@ type Program struct { // otherwise it is empty. VerifierLog string - fd *bpfFD - name string - abi ProgramABI + fd *internal.FD + name string + abi ProgramABI + attachType AttachType } // NewProgram creates a new Program. @@ -91,7 +114,20 @@ func NewProgram(spec *ProgramSpec) (*Program, error) { // Loading a program for the first time will perform // feature detection by loading small, temporary programs. func NewProgramWithOptions(spec *ProgramSpec, opts ProgramOptions) (*Program, error) { - attr, err := convertProgramSpec(spec, haveObjName.Result()) + if spec.BTF == nil { + return newProgramWithBTF(spec, nil, opts) + } + + handle, err := btf.NewHandle(btf.ProgramSpec(spec.BTF)) + if err != nil && !errors.Is(err, btf.ErrNotSupported) { + return nil, fmt.Errorf("can't load BTF: %w", err) + } + + return newProgramWithBTF(spec, handle, opts) +} + +func newProgramWithBTF(spec *ProgramSpec, btf *btf.Handle, opts ProgramOptions) (*Program, error) { + attr, err := convertProgramSpec(spec, btf) if err != nil { return nil, err } @@ -106,62 +142,52 @@ func NewProgramWithOptions(spec *ProgramSpec, opts ProgramOptions) (*Program, er logBuf = make([]byte, logSize) attr.logLevel = opts.LogLevel attr.logSize = uint32(len(logBuf)) - attr.logBuf = newPtr(unsafe.Pointer(&logBuf[0])) + attr.logBuf = internal.NewSlicePointer(logBuf) } fd, err := bpfProgLoad(attr) if err == nil { prog := newProgram(fd, spec.Name, &ProgramABI{spec.Type}) - prog.VerifierLog = convertCString(logBuf) + prog.VerifierLog = internal.CString(logBuf) return prog, nil } - truncated := errors.Cause(err) == unix.ENOSPC + logErr := err if opts.LogLevel == 0 { // Re-run with the verifier enabled to get better error messages. logBuf = make([]byte, logSize) attr.logLevel = 1 attr.logSize = uint32(len(logBuf)) - attr.logBuf = newPtr(unsafe.Pointer(&logBuf[0])) + attr.logBuf = internal.NewSlicePointer(logBuf) - _, nerr := bpfProgLoad(attr) - truncated = errors.Cause(nerr) == unix.ENOSPC + _, logErr = bpfProgLoad(attr) } - logs := convertCString(logBuf) - if truncated { - logs += "\n(truncated...)" - } - - return nil, &loadError{err, logs} + err = internal.ErrorWithLog(err, logBuf, logErr) + return nil, fmt.Errorf("can't load program: %w", err) } // NewProgramFromFD creates a program from a raw fd. // // You should not use fd after calling this function. +// +// Requires at least Linux 4.11. func NewProgramFromFD(fd int) (*Program, error) { if fd < 0 { return nil, errors.New("invalid fd") } - bpfFd := newBPFFD(uint32(fd)) + bpfFd := internal.NewFD(uint32(fd)) - info, err := bpfGetProgInfoByFD(bpfFd) + name, abi, err := newProgramABIFromFd(bpfFd) if err != nil { - bpfFd.forget() + bpfFd.Forget() return nil, err } - var name string - if bpfName := convertCString(info.name[:]); bpfName != "" { - name = bpfName - } else { - name = convertCString(info.tag[:]) - } - - return newProgram(bpfFd, name, newProgramABIFromInfo(info)), nil + return newProgram(bpfFd, name, abi), nil } -func newProgram(fd *bpfFD, name string, abi *ProgramABI) *Program { +func newProgram(fd *internal.FD, name string, abi *ProgramABI) *Program { return &Program{ name: name, fd: fd, @@ -169,7 +195,7 @@ func newProgram(fd *bpfFD, name string, abi *ProgramABI) *Program { } } -func convertProgramSpec(spec *ProgramSpec, includeName bool) (*bpfProgLoadAttr, error) { +func convertProgramSpec(spec *ProgramSpec, handle *btf.Handle) (*bpfProgLoadAttr, error) { if len(spec.Instructions) == 0 { return nil, errors.New("Instructions cannot be empty") } @@ -178,6 +204,10 @@ func convertProgramSpec(spec *ProgramSpec, includeName bool) (*bpfProgLoadAttr, return nil, errors.New("License cannot be empty") } + if spec.ByteOrder != nil && spec.ByteOrder != internal.NativeEndian { + return nil, fmt.Errorf("can't load %s program on %s", spec.ByteOrder, internal.NativeEndian) + } + buf := bytes.NewBuffer(make([]byte, 0, len(spec.Instructions)*asm.InstructionSize)) err := spec.Instructions.Marshal(buf, internal.NativeEndian) if err != nil { @@ -186,22 +216,47 @@ func convertProgramSpec(spec *ProgramSpec, includeName bool) (*bpfProgLoadAttr, bytecode := buf.Bytes() insCount := uint32(len(bytecode) / asm.InstructionSize) - lic := []byte(spec.License) attr := &bpfProgLoadAttr{ progType: spec.Type, expectedAttachType: spec.AttachType, insCount: insCount, - instructions: newPtr(unsafe.Pointer(&bytecode[0])), - license: newPtr(unsafe.Pointer(&lic[0])), + instructions: internal.NewSlicePointer(bytecode), + license: internal.NewStringPointer(spec.License), + kernelVersion: spec.KernelVersion, } - name, err := newBPFObjName(spec.Name) - if err != nil { - return nil, err + if haveObjName() == nil { + attr.progName = newBPFObjName(spec.Name) } - if includeName { - attr.progName = name + if handle != nil && spec.BTF != nil { + attr.progBTFFd = uint32(handle.FD()) + + recSize, bytes, err := btf.ProgramLineInfos(spec.BTF) + if err != nil { + return nil, fmt.Errorf("can't get BTF line infos: %w", err) + } + attr.lineInfoRecSize = recSize + attr.lineInfoCnt = uint32(uint64(len(bytes)) / uint64(recSize)) + attr.lineInfo = internal.NewSlicePointer(bytes) + + recSize, bytes, err = btf.ProgramFuncInfos(spec.BTF) + if err != nil { + return nil, fmt.Errorf("can't get BTF function infos: %w", err) + } + attr.funcInfoRecSize = recSize + attr.funcInfoCnt = uint32(uint64(len(bytes)) / uint64(recSize)) + attr.funcInfo = internal.NewSlicePointer(bytes) + } + + if spec.AttachTo != "" { + target, err := resolveBTFType(spec.AttachTo, spec.Type, spec.AttachType) + if err != nil { + return nil, err + } + if target != nil { + attr.attachBTFID = target.ID() + } } return attr, nil @@ -209,9 +264,9 @@ func convertProgramSpec(spec *ProgramSpec, includeName bool) (*bpfProgLoadAttr, func (p *Program) String() string { if p.name != "" { - return fmt.Sprintf("%s(%s)#%s", p.abi.Type, p.name, p.fd) + return fmt.Sprintf("%s(%s)#%v", p.abi.Type, p.name, p.fd) } - return fmt.Sprintf("%s#%s", p.abi.Type, p.fd) + return fmt.Sprintf("%s#%v", p.abi.Type, p.fd) } // ABI gets the ABI of the Program @@ -223,7 +278,7 @@ func (p *Program) ABI() ProgramABI { // // It is invalid to call this function after Close has been called. func (p *Program) FD() int { - fd, err := p.fd.value() + fd, err := p.fd.Value() if err != nil { // Best effort: -1 is the number most likely to be an // invalid file descriptor. @@ -243,9 +298,9 @@ func (p *Program) Clone() (*Program, error) { return nil, nil } - dup, err := p.fd.dup() + dup, err := p.fd.Dup() if err != nil { - return nil, errors.Wrap(err, "can't clone program") + return nil, fmt.Errorf("can't clone program: %w", err) } return newProgram(dup, p.name, &p.abi), nil @@ -255,7 +310,10 @@ func (p *Program) Clone() (*Program, error) { // // This requires bpffs to be mounted above fileName. See http://cilium.readthedocs.io/en/doc-1.0/kubernetes/install/#mounting-the-bpf-fs-optional func (p *Program) Pin(fileName string) error { - return errors.Wrap(bpfPinObject(fileName, p.fd), "can't pin program") + if err := internal.BPFObjPin(fileName, p.fd); err != nil { + return fmt.Errorf("can't pin program: %w", err) + } + return nil } // Close unloads the program from the kernel. @@ -264,7 +322,7 @@ func (p *Program) Close() error { return nil } - return p.fd.close() + return p.fd.Close() } // Test runs the Program in the kernel with the given input and returns the @@ -275,57 +333,63 @@ func (p *Program) Close() error { // // This function requires at least Linux 4.12. func (p *Program) Test(in []byte) (uint32, []byte, error) { - ret, out, _, err := p.testRun(in, 1) - return ret, out, err + ret, out, _, err := p.testRun(in, 1, nil) + if err != nil { + return ret, nil, fmt.Errorf("can't test program: %w", err) + } + return ret, out, nil } // Benchmark runs the Program with the given input for a number of times // and returns the time taken per iteration. // -// The returned value is the return value of the last execution of -// the program. +// Returns the result of the last execution of the program and the time per +// run or an error. reset is called whenever the benchmark syscall is +// interrupted, and should be set to testing.B.ResetTimer or similar. +// +// Note: profiling a call to this function will skew it's results, see +// https://github.com/cilium/ebpf/issues/24 // // This function requires at least Linux 4.12. -func (p *Program) Benchmark(in []byte, repeat int) (uint32, time.Duration, error) { - ret, _, total, err := p.testRun(in, repeat) - return ret, total, err +func (p *Program) Benchmark(in []byte, repeat int, reset func()) (uint32, time.Duration, error) { + ret, _, total, err := p.testRun(in, repeat, reset) + if err != nil { + return ret, total, fmt.Errorf("can't benchmark program: %w", err) + } + return ret, total, nil } -var noProgTestRun = featureTest{ - Fn: func() bool { - prog, err := NewProgram(&ProgramSpec{ - Type: SocketFilter, - Instructions: asm.Instructions{ - asm.LoadImm(asm.R0, 0, asm.DWord), - asm.Return(), - }, - License: "MIT", - }) - if err != nil { - // This may be because we lack sufficient permissions, etc. - return false - } - defer prog.Close() +var haveProgTestRun = internal.FeatureTest("BPF_PROG_TEST_RUN", "4.12", func() (bool, error) { + prog, err := NewProgram(&ProgramSpec{ + Type: SocketFilter, + Instructions: asm.Instructions{ + asm.LoadImm(asm.R0, 0, asm.DWord), + asm.Return(), + }, + License: "MIT", + }) + if err != nil { + // This may be because we lack sufficient permissions, etc. + return false, err + } + defer prog.Close() - fd, err := prog.fd.value() - if err != nil { - return false - } + // Programs require at least 14 bytes input + in := make([]byte, 14) + attr := bpfProgTestRunAttr{ + fd: uint32(prog.FD()), + dataSizeIn: uint32(len(in)), + dataIn: internal.NewSlicePointer(in), + } - // Programs require at least 14 bytes input - in := make([]byte, 14) - attr := bpfProgTestRunAttr{ - fd: fd, - dataSizeIn: uint32(len(in)), - dataIn: newPtr(unsafe.Pointer(&in[0])), - } + err = bpfProgTestRun(&attr) - _, err = bpfCall(_ProgTestRun, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) - return errors.Cause(err) == unix.EINVAL - }, -} + // Check for EINVAL specifically, rather than err != nil since we + // otherwise misdetect due to insufficient permissions. + return !errors.Is(err, unix.EINVAL), nil +}) -func (p *Program) testRun(in []byte, repeat int) (uint32, []byte, time.Duration, error) { +func (p *Program) testRun(in []byte, repeat int, reset func()) (uint32, []byte, time.Duration, error) { if uint(repeat) > math.MaxUint32 { return 0, nil, 0, fmt.Errorf("repeat is too high") } @@ -338,8 +402,8 @@ func (p *Program) testRun(in []byte, repeat int) (uint32, []byte, time.Duration, return 0, nil, 0, fmt.Errorf("input is too long") } - if noProgTestRun.Result() { - return 0, nil, 0, errNotSupported + if err := haveProgTestRun(); err != nil { + return 0, nil, 0, err } // Older kernels ignore the dataSizeOut argument when copying to user space. @@ -349,7 +413,7 @@ func (p *Program) testRun(in []byte, repeat int) (uint32, []byte, time.Duration, // See https://patchwork.ozlabs.org/cover/1006822/ out := make([]byte, len(in)+outputPad) - fd, err := p.fd.value() + fd, err := p.fd.Value() if err != nil { return 0, nil, 0, err } @@ -358,14 +422,25 @@ func (p *Program) testRun(in []byte, repeat int) (uint32, []byte, time.Duration, fd: fd, dataSizeIn: uint32(len(in)), dataSizeOut: uint32(len(out)), - dataIn: newPtr(unsafe.Pointer(&in[0])), - dataOut: newPtr(unsafe.Pointer(&out[0])), + dataIn: internal.NewSlicePointer(in), + dataOut: internal.NewSlicePointer(out), repeat: uint32(repeat), } - _, err = bpfCall(_ProgTestRun, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) - if err != nil { - return 0, nil, 0, errors.Wrap(err, "can't run test") + for { + err = bpfProgTestRun(&attr) + if err == nil { + break + } + + if errors.Is(err, unix.EINTR) { + if reset != nil { + reset() + } + continue + } + + return 0, nil, 0, fmt.Errorf("can't run test: %w", err) } if int(attr.dataSizeOut) > cap(out) { @@ -387,23 +462,12 @@ func unmarshalProgram(buf []byte) (*Program, error) { // Looking up an entry in a nested map or prog array returns an id, // not an fd. id := internal.NativeEndian.Uint32(buf) - fd, err := bpfGetProgramFDByID(id) - if err != nil { - return nil, err - } - - abi, err := newProgramABIFromFd(fd) - if err != nil { - _ = fd.close() - return nil, err - } - - return newProgram(fd, "", abi), nil + return NewProgramFromID(ProgramID(id)) } // MarshalBinary implements BinaryMarshaler. func (p *Program) MarshalBinary() ([]byte, error) { - value, err := p.fd.value() + value, err := p.fd.Value() if err != nil { return nil, err } @@ -413,75 +477,71 @@ func (p *Program) MarshalBinary() ([]byte, error) { return buf, nil } -// Attach a Program to a container object fd +// Attach a Program. +// +// Deprecated: use link.RawAttachProgram instead. func (p *Program) Attach(fd int, typ AttachType, flags AttachFlags) error { if fd < 0 { return errors.New("invalid fd") } - pfd, err := p.fd.value() + pfd, err := p.fd.Value() if err != nil { return err } - attr := bpfProgAlterAttr{ - targetFd: uint32(fd), - attachBpfFd: pfd, - attachType: uint32(typ), - attachFlags: uint32(flags), + attr := internal.BPFProgAttachAttr{ + TargetFd: uint32(fd), + AttachBpfFd: pfd, + AttachType: uint32(typ), + AttachFlags: uint32(flags), } - return bpfProgAlter(_ProgAttach, &attr) + return internal.BPFProgAttach(&attr) } -// Detach a Program from a container object fd +// Detach a Program. +// +// Deprecated: use link.RawDetachProgram instead. func (p *Program) Detach(fd int, typ AttachType, flags AttachFlags) error { if fd < 0 { return errors.New("invalid fd") } - pfd, err := p.fd.value() + if flags != 0 { + return errors.New("flags must be zero") + } + + pfd, err := p.fd.Value() if err != nil { return err } - attr := bpfProgAlterAttr{ - targetFd: uint32(fd), - attachBpfFd: pfd, - attachType: uint32(typ), - attachFlags: uint32(flags), + attr := internal.BPFProgDetachAttr{ + TargetFd: uint32(fd), + AttachBpfFd: pfd, + AttachType: uint32(typ), } - return bpfProgAlter(_ProgDetach, &attr) + return internal.BPFProgDetach(&attr) } // LoadPinnedProgram loads a Program from a BPF file. // -// Requires at least Linux 4.13, use LoadPinnedProgramExplicit on -// earlier versions. +// Requires at least Linux 4.11. func LoadPinnedProgram(fileName string) (*Program, error) { - fd, err := bpfGetObject(fileName) + fd, err := internal.BPFObjGet(fileName) if err != nil { return nil, err } - abi, err := newProgramABIFromFd(fd) + name, abi, err := newProgramABIFromFd(fd) if err != nil { - _ = fd.close() - return nil, err + _ = fd.Close() + return nil, fmt.Errorf("can't get ABI for %s: %w", fileName, err) } - return newProgram(fd, filepath.Base(fileName), abi), nil -} - -// LoadPinnedProgramExplicit loads a program with explicit parameters. -func LoadPinnedProgramExplicit(fileName string, abi *ProgramABI) (*Program, error) { - fd, err := bpfGetObject(fileName) - if err != nil { - return nil, err - } - - return newProgram(fd, filepath.Base(fileName), abi), nil + return newProgram(fd, name, abi), nil } // SanitizeName replaces all invalid characters in name. @@ -500,24 +560,63 @@ func SanitizeName(name string, replacement rune) string { }, name) } -type loadError struct { - cause error - verifierLog string +// ProgramGetNextID returns the ID of the next eBPF program. +// +// Returns ErrNotExist, if there is no next eBPF program. +func ProgramGetNextID(startID ProgramID) (ProgramID, error) { + id, err := objGetNextID(internal.BPF_PROG_GET_NEXT_ID, uint32(startID)) + return ProgramID(id), err } -func (le *loadError) Error() string { - if le.verifierLog == "" { - return fmt.Sprintf("failed to load program: %s", le.cause) +// NewProgramFromID returns the program for a given id. +// +// Returns ErrNotExist, if there is no eBPF program with the given id. +func NewProgramFromID(id ProgramID) (*Program, error) { + fd, err := bpfObjGetFDByID(internal.BPF_PROG_GET_FD_BY_ID, uint32(id)) + if err != nil { + return nil, err } - return fmt.Sprintf("failed to load program: %s: %s", le.cause, le.verifierLog) + + name, abi, err := newProgramABIFromFd(fd) + if err != nil { + _ = fd.Close() + return nil, err + } + + return newProgram(fd, name, abi), nil } -func (le *loadError) Cause() error { - return le.cause +// ID returns the systemwide unique ID of the program. +func (p *Program) ID() (ProgramID, error) { + info, err := bpfGetProgInfoByFD(p.fd) + if err != nil { + return ProgramID(0), err + } + return ProgramID(info.id), nil } -// IsNotSupported returns true if an error occurred because -// the kernel does not have support for a specific feature. -func IsNotSupported(err error) bool { - return errors.Cause(err) == errNotSupported +func resolveBTFType(name string, progType ProgramType, attachType AttachType) (btf.Type, error) { + kernel, err := btf.LoadKernelSpec() + if err != nil { + return nil, fmt.Errorf("can't resolve BTF type %s: %w", name, err) + } + + type match struct { + p ProgramType + a AttachType + } + + target := match{progType, attachType} + switch target { + case match{Tracing, AttachTraceIter}: + var target btf.Func + if err := kernel.FindType("bpf_iter_"+name, &target); err != nil { + return nil, fmt.Errorf("can't resolve BTF for iterator %s: %w", name, err) + } + + return &target, nil + + default: + return nil, nil + } } diff --git a/vendor/github.com/cilium/ebpf/readme.md b/vendor/github.com/cilium/ebpf/readme.md index 26ab2b9045f..cc8e89c75a9 100644 --- a/vendor/github.com/cilium/ebpf/readme.md +++ b/vendor/github.com/cilium/ebpf/readme.md @@ -13,6 +13,11 @@ The library is maintained by [Cloudflare](https://www.cloudflare.com) and [Ciliu The package is production ready, but **the API is explicitly unstable right now**. Expect to update your code if you want to follow along. +## Requirements + +* A version of Go that is [supported by upstream](https://golang.org/doc/devel/release.html#policy) +* Linux 4.9, 4.19 or 5.4 (versions in-between should work, but are not tested) + ## Useful resources * [Cilium eBPF documentation](https://cilium.readthedocs.io/en/latest/bpf/#bpf-guide) (recommended) diff --git a/vendor/github.com/cilium/ebpf/run-tests.sh b/vendor/github.com/cilium/ebpf/run-tests.sh index f92d489932d..c43a90ddd0d 100644 --- a/vendor/github.com/cilium/ebpf/run-tests.sh +++ b/vendor/github.com/cilium/ebpf/run-tests.sh @@ -8,24 +8,27 @@ set -o pipefail if [[ "${1:-}" = "--in-vm" ]]; then shift - readonly home="$(mktemp --directory)" - mount -t bpf bpf /sys/fs/bpf export CGO_ENABLED=0 - export HOME="$home" + export GOFLAGS=-mod=readonly + export GOPATH=/run/go-path + export GOPROXY=file:///run/go-root/pkg/mod/cache/download + export GOCACHE=/run/go-cache + + elfs="" + if [[ -d "/run/input/bpf" ]]; then + elfs="/run/input/bpf" + fi echo Running tests... - /usr/local/bin/go test -mod=vendor -coverprofile="$1/coverage.txt" -covermode=atomic -v ./... + /usr/local/bin/go test -coverprofile="$1/coverage.txt" -covermode=atomic -v -elfs "$elfs" ./... touch "$1/success" exit 0 fi -# Force Go modules, so that vendoring and building are easier. -export GO111MODULE=on - # Pull all dependencies, so that we can run tests without the # vm having network access. -go mod vendor +go mod download # Use sudo if /dev/kvm isn't accessible by the current user. sudo="" @@ -41,16 +44,34 @@ if [[ -z "${kernel_version}" ]]; then fi readonly kernel="linux-${kernel_version}.bz" +readonly selftests="linux-${kernel_version}-selftests-bpf.bz" +readonly input="$(mktemp -d)" readonly output="$(mktemp -d)" -readonly tmp_dir="$(mktemp -d)" +readonly tmp_dir="${TMPDIR:-/tmp}" +readonly branch="${BRANCH:-master}" -test -e "${tmp_dir}/${kernel}" || { - echo Fetching ${kernel} - curl --fail -L "https://github.com/newtools/ci-kernels/blob/master/${kernel}?raw=true" -o "${tmp_dir}/${kernel}" +fetch() { + echo Fetching "${1}" + wget -nv -N -P "${tmp_dir}" "https://github.com/cilium/ci-kernels/raw/${branch}/${1}" } -echo Testing on ${kernel_version} -$sudo virtme-run --kimg "${tmp_dir}/${kernel}" --memory 256M --pwd --rwdir=/run/output="${output}" --script-sh "$(realpath "$0") --in-vm /run/output" +fetch "${kernel}" + +if fetch "${selftests}"; then + mkdir "${input}/bpf" + tar --strip-components=4 -xjf "${tmp_dir}/${selftests}" -C "${input}/bpf" +else + echo "No selftests found, disabling" +fi + +echo Testing on "${kernel_version}" +$sudo virtme-run --kimg "${tmp_dir}/${kernel}" --memory 512M --pwd \ + --rwdir=/run/input="${input}" \ + --rwdir=/run/output="${output}" \ + --rodir=/run/go-path="$(go env GOPATH)" \ + --rwdir=/run/go-cache="$(go env GOCACHE)" \ + --script-sh "$(realpath "$0") --in-vm /run/output" \ + --qemu-opts -smp 2 # need at least two CPUs for some tests if [[ ! -e "${output}/success" ]]; then echo "Test failed on ${kernel_version}" @@ -64,4 +85,5 @@ else fi fi +$sudo rm -r "${input}" $sudo rm -r "${output}" diff --git a/vendor/github.com/cilium/ebpf/syscalls.go b/vendor/github.com/cilium/ebpf/syscalls.go index 68abd3bc675..2b713d06a0c 100644 --- a/vendor/github.com/cilium/ebpf/syscalls.go +++ b/vendor/github.com/cilium/ebpf/syscalls.go @@ -1,88 +1,35 @@ package ebpf import ( - "bytes" - "path/filepath" - "runtime" - "strconv" - "strings" + "errors" + "fmt" + "os" "unsafe" + "github.com/cilium/ebpf/internal" + "github.com/cilium/ebpf/internal/btf" "github.com/cilium/ebpf/internal/unix" - - "github.com/pkg/errors" ) -var errClosedFd = errors.New("use of closed file descriptor") - -type bpfFD struct { - raw int64 -} - -func newBPFFD(value uint32) *bpfFD { - fd := &bpfFD{int64(value)} - runtime.SetFinalizer(fd, (*bpfFD).close) - return fd -} - -func (fd *bpfFD) String() string { - return strconv.FormatInt(fd.raw, 10) -} - -func (fd *bpfFD) value() (uint32, error) { - if fd.raw < 0 { - return 0, errClosedFd - } - - return uint32(fd.raw), nil -} - -func (fd *bpfFD) close() error { - if fd.raw < 0 { - return nil - } - - value := int(fd.raw) - fd.raw = -1 - - fd.forget() - return unix.Close(value) -} - -func (fd *bpfFD) forget() { - runtime.SetFinalizer(fd, nil) -} - -func (fd *bpfFD) dup() (*bpfFD, error) { - if fd.raw < 0 { - return nil, errClosedFd - } - - dup, err := unix.FcntlInt(uintptr(fd.raw), unix.F_DUPFD_CLOEXEC, 0) - if err != nil { - return nil, errors.Wrap(err, "can't dup fd") - } - - return newBPFFD(uint32(dup)), nil -} +// Generic errors returned by BPF syscalls. +var ( + ErrNotExist = errors.New("requested object does not exist") +) // bpfObjName is a null-terminated string made up of // 'A-Za-z0-9_' characters. type bpfObjName [unix.BPF_OBJ_NAME_LEN]byte // newBPFObjName truncates the result if it is too long. -func newBPFObjName(name string) (bpfObjName, error) { - idx := strings.IndexFunc(name, invalidBPFObjNameChar) - if idx != -1 { - return bpfObjName{}, errors.Errorf("invalid character '%c' in name '%s'", name[idx], name) - } - +func newBPFObjName(name string) bpfObjName { var result bpfObjName copy(result[:unix.BPF_OBJ_NAME_LEN-1], name) - return result, nil + return result } func invalidBPFObjNameChar(char rune) bool { + dotAllowed := objNameAllowsDot() == nil + switch { case char >= 'A' && char <= 'Z': fallthrough @@ -90,6 +37,8 @@ func invalidBPFObjNameChar(char rune) bool { fallthrough case char >= '0' && char <= '9': fallthrough + case dotAllowed && char == '.': + fallthrough case char == '_': return false default: @@ -98,21 +47,25 @@ func invalidBPFObjNameChar(char rune) bool { } type bpfMapCreateAttr struct { - mapType MapType - keySize uint32 - valueSize uint32 - maxEntries uint32 - flags uint32 - innerMapFd uint32 // since 4.12 56f668dfe00d - numaNode uint32 // since 4.14 96eabe7a40aa - mapName bpfObjName // since 4.15 ad5b177bd73f + mapType MapType + keySize uint32 + valueSize uint32 + maxEntries uint32 + flags uint32 + innerMapFd uint32 // since 4.12 56f668dfe00d + numaNode uint32 // since 4.14 96eabe7a40aa + mapName bpfObjName // since 4.15 ad5b177bd73f + mapIfIndex uint32 + btfFd uint32 + btfKeyTypeID btf.TypeID + btfValueTypeID btf.TypeID } type bpfMapOpAttr struct { mapFd uint32 padding uint32 - key syscallPtr - value syscallPtr + key internal.Pointer + value internal.Pointer flags uint64 } @@ -126,25 +79,28 @@ type bpfMapInfo struct { mapName bpfObjName // since 4.15 ad5b177bd73f } -type bpfPinObjAttr struct { - fileName syscallPtr - fd uint32 - padding uint32 -} - type bpfProgLoadAttr struct { progType ProgramType insCount uint32 - instructions syscallPtr - license syscallPtr + instructions internal.Pointer + license internal.Pointer logLevel uint32 logSize uint32 - logBuf syscallPtr + logBuf internal.Pointer kernelVersion uint32 // since 4.1 2541517c32be progFlags uint32 // since 4.11 e07b98d9bffe progName bpfObjName // since 4.15 067cae47771c progIfIndex uint32 // since 4.15 1f6f4cb7ba21 expectedAttachType AttachType // since 4.17 5e43f899b03a + progBTFFd uint32 + funcInfoRecSize uint32 + funcInfo internal.Pointer + funcInfoCnt uint32 + lineInfoRecSize uint32 + lineInfo internal.Pointer + lineInfoCnt uint32 + attachBTFID btf.TypeID + attachProgFd uint32 } type bpfProgInfo struct { @@ -153,12 +109,12 @@ type bpfProgInfo struct { tag [unix.BPF_TAG_SIZE]byte jitedLen uint32 xlatedLen uint32 - jited syscallPtr - xlated syscallPtr + jited internal.Pointer + xlated internal.Pointer loadTime uint64 // since 4.15 cb4d2b3f03d8 createdByUID uint32 nrMapIDs uint32 - mapIds syscallPtr + mapIds internal.Pointer name bpfObjName } @@ -167,23 +123,16 @@ type bpfProgTestRunAttr struct { retval uint32 dataSizeIn uint32 dataSizeOut uint32 - dataIn syscallPtr - dataOut syscallPtr + dataIn internal.Pointer + dataOut internal.Pointer repeat uint32 duration uint32 } -type bpfProgAlterAttr struct { - targetFd uint32 - attachBpfFd uint32 - attachType uint32 - attachFlags uint32 -} - type bpfObjGetInfoByFDAttr struct { fd uint32 infoLen uint32 - info syscallPtr // May be either bpfMapInfo or bpfProgInfo + info internal.Pointer // May be either bpfMapInfo or bpfProgInfo } type bpfGetFDByIDAttr struct { @@ -191,13 +140,19 @@ type bpfGetFDByIDAttr struct { next uint32 } -func newPtr(ptr unsafe.Pointer) syscallPtr { - return syscallPtr{ptr: ptr} +type bpfMapFreezeAttr struct { + mapFd uint32 } -func bpfProgLoad(attr *bpfProgLoadAttr) (*bpfFD, error) { +type bpfObjGetNextIDAttr struct { + startID uint32 + nextID uint32 + openFlags uint32 +} + +func bpfProgLoad(attr *bpfProgLoadAttr) (*internal.FD, error) { for { - fd, err := bpfCall(_ProgLoad, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) + fd, err := internal.BPF(internal.BPF_PROG_LOAD, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) // As of ~4.20 the verifier can be interrupted by a signal, // and returns EAGAIN in that case. if err == unix.EAGAIN { @@ -208,26 +163,75 @@ func bpfProgLoad(attr *bpfProgLoadAttr) (*bpfFD, error) { return nil, err } - return newBPFFD(uint32(fd)), nil + return internal.NewFD(uint32(fd)), nil } } -func bpfProgAlter(cmd int, attr *bpfProgAlterAttr) error { - _, err := bpfCall(cmd, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) +func bpfProgTestRun(attr *bpfProgTestRunAttr) error { + _, err := internal.BPF(internal.BPF_PROG_TEST_RUN, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) return err } -func bpfMapCreate(attr *bpfMapCreateAttr) (*bpfFD, error) { - fd, err := bpfCall(_MapCreate, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) +func bpfMapCreate(attr *bpfMapCreateAttr) (*internal.FD, error) { + fd, err := internal.BPF(internal.BPF_MAP_CREATE, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) + if errors.Is(err, os.ErrPermission) { + return nil, errors.New("permission denied or insufficient rlimit to lock memory for map") + } + if err != nil { return nil, err } - return newBPFFD(uint32(fd)), nil + return internal.NewFD(uint32(fd)), nil } -func bpfMapLookupElem(m *bpfFD, key, valueOut syscallPtr) error { - fd, err := m.value() +var haveNestedMaps = internal.FeatureTest("nested maps", "4.12", func() (bool, error) { + inner, err := bpfMapCreate(&bpfMapCreateAttr{ + mapType: Array, + keySize: 4, + valueSize: 4, + maxEntries: 1, + }) + if err != nil { + return false, err + } + defer inner.Close() + + innerFd, _ := inner.Value() + nested, err := bpfMapCreate(&bpfMapCreateAttr{ + mapType: ArrayOfMaps, + keySize: 4, + valueSize: 4, + maxEntries: 1, + innerMapFd: innerFd, + }) + if err != nil { + return false, nil + } + + _ = nested.Close() + return true, nil +}) + +var haveMapMutabilityModifiers = internal.FeatureTest("read- and write-only maps", "5.2", func() (bool, error) { + // This checks BPF_F_RDONLY_PROG and BPF_F_WRONLY_PROG. Since + // BPF_MAP_FREEZE appeared in 5.2 as well we don't do a separate check. + m, err := bpfMapCreate(&bpfMapCreateAttr{ + mapType: Array, + keySize: 4, + valueSize: 4, + maxEntries: 1, + flags: unix.BPF_F_RDONLY_PROG, + }) + if err != nil { + return false, nil + } + _ = m.Close() + return true, nil +}) + +func bpfMapLookupElem(m *internal.FD, key, valueOut internal.Pointer) error { + fd, err := m.Value() if err != nil { return err } @@ -237,12 +241,27 @@ func bpfMapLookupElem(m *bpfFD, key, valueOut syscallPtr) error { key: key, value: valueOut, } - _, err = bpfCall(_MapLookupElem, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) - return err + _, err = internal.BPF(internal.BPF_MAP_LOOKUP_ELEM, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + return wrapMapError(err) } -func bpfMapUpdateElem(m *bpfFD, key, valueOut syscallPtr, flags uint64) error { - fd, err := m.value() +func bpfMapLookupAndDelete(m *internal.FD, key, valueOut internal.Pointer) error { + fd, err := m.Value() + if err != nil { + return err + } + + attr := bpfMapOpAttr{ + mapFd: fd, + key: key, + value: valueOut, + } + _, err = internal.BPF(internal.BPF_MAP_LOOKUP_AND_DELETE_ELEM, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + return wrapMapError(err) +} + +func bpfMapUpdateElem(m *internal.FD, key, valueOut internal.Pointer, flags uint64) error { + fd, err := m.Value() if err != nil { return err } @@ -253,12 +272,12 @@ func bpfMapUpdateElem(m *bpfFD, key, valueOut syscallPtr, flags uint64) error { value: valueOut, flags: flags, } - _, err = bpfCall(_MapUpdateElem, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) - return err + _, err = internal.BPF(internal.BPF_MAP_UPDATE_ELEM, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + return wrapMapError(err) } -func bpfMapDeleteElem(m *bpfFD, key syscallPtr) error { - fd, err := m.value() +func bpfMapDeleteElem(m *internal.FD, key internal.Pointer) error { + fd, err := m.Value() if err != nil { return err } @@ -267,12 +286,12 @@ func bpfMapDeleteElem(m *bpfFD, key syscallPtr) error { mapFd: fd, key: key, } - _, err = bpfCall(_MapDeleteElem, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) - return err + _, err = internal.BPF(internal.BPF_MAP_DELETE_ELEM, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + return wrapMapError(err) } -func bpfMapGetNextKey(m *bpfFD, key, nextKeyOut syscallPtr) error { - fd, err := m.value() +func bpfMapGetNextKey(m *internal.FD, key, nextKeyOut internal.Pointer) error { + fd, err := m.Value() if err != nil { return err } @@ -282,46 +301,60 @@ func bpfMapGetNextKey(m *bpfFD, key, nextKeyOut syscallPtr) error { key: key, value: nextKeyOut, } - _, err = bpfCall(_MapGetNextKey, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + _, err = internal.BPF(internal.BPF_MAP_GET_NEXT_KEY, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + return wrapMapError(err) +} + +func objGetNextID(cmd internal.BPFCmd, start uint32) (uint32, error) { + attr := bpfObjGetNextIDAttr{ + startID: start, + } + _, err := internal.BPF(cmd, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + return attr.nextID, wrapObjError(err) +} + +func wrapObjError(err error) error { + if err == nil { + return nil + } + if errors.Is(err, unix.ENOENT) { + return fmt.Errorf("%w", ErrNotExist) + } + + return errors.New(err.Error()) +} + +func wrapMapError(err error) error { + if err == nil { + return nil + } + + if errors.Is(err, unix.ENOENT) { + return ErrKeyNotExist + } + + if errors.Is(err, unix.EEXIST) { + return ErrKeyExist + } + + return errors.New(err.Error()) +} + +func bpfMapFreeze(m *internal.FD) error { + fd, err := m.Value() + if err != nil { + return err + } + + attr := bpfMapFreezeAttr{ + mapFd: fd, + } + _, err = internal.BPF(internal.BPF_MAP_FREEZE, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) return err } -const bpfFSType = 0xcafe4a11 - -func bpfPinObject(fileName string, fd *bpfFD) error { - dirName := filepath.Dir(fileName) - var statfs unix.Statfs_t - if err := unix.Statfs(dirName, &statfs); err != nil { - return err - } - if uint64(statfs.Type) != bpfFSType { - return errors.Errorf("%s is not on a bpf filesystem", fileName) - } - - value, err := fd.value() - if err != nil { - return err - } - - _, err = bpfCall(_ObjPin, unsafe.Pointer(&bpfPinObjAttr{ - fileName: newPtr(unsafe.Pointer(&[]byte(fileName)[0])), - fd: value, - }), 16) - return errors.Wrapf(err, "pin object %s", fileName) -} - -func bpfGetObject(fileName string) (*bpfFD, error) { - ptr, err := bpfCall(_ObjGet, unsafe.Pointer(&bpfPinObjAttr{ - fileName: newPtr(unsafe.Pointer(&[]byte(fileName)[0])), - }), 16) - if err != nil { - return nil, errors.Wrapf(err, "get object %s", fileName) - } - return newBPFFD(uint32(ptr)), nil -} - -func bpfGetObjectInfoByFD(fd *bpfFD, info unsafe.Pointer, size uintptr) error { - value, err := fd.value() +func bpfGetObjectInfoByFD(fd *internal.FD, info unsafe.Pointer, size uintptr) error { + value, err := fd.Value() if err != nil { return err } @@ -330,91 +363,76 @@ func bpfGetObjectInfoByFD(fd *bpfFD, info unsafe.Pointer, size uintptr) error { attr := bpfObjGetInfoByFDAttr{ fd: value, infoLen: uint32(size), - info: newPtr(info), + info: internal.NewPointer(info), } - _, err = bpfCall(_ObjGetInfoByFD, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) - return errors.Wrapf(err, "fd %d", value) + _, err = internal.BPF(internal.BPF_OBJ_GET_INFO_BY_FD, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + if err != nil { + return fmt.Errorf("fd %d: %w", fd, err) + } + return nil } -func bpfGetProgInfoByFD(fd *bpfFD) (*bpfProgInfo, error) { +func bpfGetProgInfoByFD(fd *internal.FD) (*bpfProgInfo, error) { var info bpfProgInfo - err := bpfGetObjectInfoByFD(fd, unsafe.Pointer(&info), unsafe.Sizeof(info)) - return &info, errors.Wrap(err, "can't get program info") + if err := bpfGetObjectInfoByFD(fd, unsafe.Pointer(&info), unsafe.Sizeof(info)); err != nil { + return nil, fmt.Errorf("can't get program info: %w", err) + } + return &info, nil } -func bpfGetMapInfoByFD(fd *bpfFD) (*bpfMapInfo, error) { +func bpfGetMapInfoByFD(fd *internal.FD) (*bpfMapInfo, error) { var info bpfMapInfo err := bpfGetObjectInfoByFD(fd, unsafe.Pointer(&info), unsafe.Sizeof(info)) - return &info, errors.Wrap(err, "can't get map info:") + if err != nil { + return nil, fmt.Errorf("can't get map info: %w", err) + } + return &info, nil } -var haveObjName = featureTest{ - Fn: func() bool { - name, err := newBPFObjName("feature_test") - if err != nil { - // This really is a fatal error, but it should be caught - // by the unit tests not working. - return false - } +var haveObjName = internal.FeatureTest("object names", "4.15", func() (bool, error) { + attr := bpfMapCreateAttr{ + mapType: Array, + keySize: 4, + valueSize: 4, + maxEntries: 1, + mapName: newBPFObjName("feature_test"), + } - attr := bpfMapCreateAttr{ - mapType: Array, - keySize: 4, - valueSize: 4, - maxEntries: 1, - mapName: name, - } + fd, err := bpfMapCreate(&attr) + if err != nil { + return false, nil + } - fd, err := bpfMapCreate(&attr) - if err != nil { - return false - } + _ = fd.Close() + return true, nil +}) - _ = fd.close() - return true - }, -} +var objNameAllowsDot = internal.FeatureTest("dot in object names", "5.2", func() (bool, error) { + if err := haveObjName(); err != nil { + return false, err + } -func bpfGetMapFDByID(id uint32) (*bpfFD, error) { - // available from 4.13 + attr := bpfMapCreateAttr{ + mapType: Array, + keySize: 4, + valueSize: 4, + maxEntries: 1, + mapName: newBPFObjName(".test"), + } + + fd, err := bpfMapCreate(&attr) + if err != nil { + return false, nil + } + + _ = fd.Close() + return true, nil +}) + +func bpfObjGetFDByID(cmd internal.BPFCmd, id uint32) (*internal.FD, error) { attr := bpfGetFDByIDAttr{ id: id, } - ptr, err := bpfCall(_MapGetFDByID, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) - if err != nil { - return nil, errors.Wrapf(err, "can't get fd for map id %d", id) - } - return newBPFFD(uint32(ptr)), nil -} - -func bpfGetProgramFDByID(id uint32) (*bpfFD, error) { - // available from 4.13 - attr := bpfGetFDByIDAttr{ - id: id, - } - ptr, err := bpfCall(_ProgGetFDByID, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) - if err != nil { - return nil, errors.Wrapf(err, "can't get fd for program id %d", id) - } - return newBPFFD(uint32(ptr)), nil -} - -func bpfCall(cmd int, attr unsafe.Pointer, size uintptr) (uintptr, error) { - r1, _, errNo := unix.Syscall(unix.SYS_BPF, uintptr(cmd), uintptr(attr), size) - runtime.KeepAlive(attr) - - var err error - if errNo != 0 { - err = errNo - } - - return r1, err -} - -func convertCString(in []byte) string { - inLen := bytes.IndexByte(in, 0) - if inLen == -1 { - return "" - } - return string(in[:inLen]) + ptr, err := internal.BPF(cmd, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + return internal.NewFD(uint32(ptr)), wrapObjError(err) } diff --git a/vendor/github.com/cilium/ebpf/types.go b/vendor/github.com/cilium/ebpf/types.go index 0daf9a71527..1ffc62123be 100644 --- a/vendor/github.com/cilium/ebpf/types.go +++ b/vendor/github.com/cilium/ebpf/types.go @@ -1,6 +1,6 @@ package ebpf -//go:generate stringer -output types_string.go -type=MapType,ProgramType +//go:generate stringer -output types_string.go -type=MapType,ProgramType,AttachType // MapType indicates the type map structure // that will be initialized in the kernel. @@ -57,41 +57,40 @@ const ( // HashOfMaps - Each item in the hash map is another map. The inner map mustn't be a map of maps // itself. HashOfMaps + // DevMap - Specialized map to store references to network devices. + DevMap + // SockMap - Specialized map to store references to sockets. + SockMap + // CPUMap - Specialized map to store references to CPUs. + CPUMap + // XSKMap - Specialized map for XDP programs to store references to open sockets. + XSKMap + // SockHash - Specialized hash to store references to sockets. + SockHash + // CGroupStorage - Special map for CGroups. + CGroupStorage + // ReusePortSockArray - Specialized map to store references to sockets that can be reused. + ReusePortSockArray + // PerCPUCGroupStorage - Special per CPU map for CGroups. + PerCPUCGroupStorage + // Queue - FIFO storage for BPF programs. + Queue + // Stack - LIFO storage for BPF programs. + Stack + // SkStorage - Specialized map for local storage at SK for BPF programs. + SkStorage + // DevMapHash - Hash-based indexing scheme for references to network devices. + DevMapHash ) // hasPerCPUValue returns true if the Map stores a value per CPU. func (mt MapType) hasPerCPUValue() bool { - if mt == PerCPUHash || mt == PerCPUArray { + if mt == PerCPUHash || mt == PerCPUArray || mt == LRUCPUHash { return true } return false } -const ( - _MapCreate = iota - _MapLookupElem - _MapUpdateElem - _MapDeleteElem - _MapGetNextKey - _ProgLoad - _ObjPin - _ObjGet - _ProgAttach - _ProgDetach - _ProgTestRun - _ProgGetNextID - _MapGetNextID - _ProgGetFDByID - _MapGetFDByID - _ObjGetInfoByFD -) - -const ( - _Any = iota - _NoExist - _Exist -) - // ProgramType of the eBPF program type ProgramType uint32 @@ -149,6 +148,8 @@ const ( RawTracepointWritable // CGroupSockopt program CGroupSockopt + // Tracing program + Tracing ) // AttachType of the eBPF program, needed to differentiate allowed context accesses in @@ -183,6 +184,12 @@ const ( AttachCGroupUDP6Recvmsg AttachCGroupGetsockopt AttachCGroupSetsockopt + AttachTraceRawTp + AttachTraceFEntry + AttachTraceFExit + AttachModifyReturn + AttachLSMMac + AttachTraceIter ) // AttachFlags of the eBPF program used in BPF_PROG_ATTACH command diff --git a/vendor/github.com/cilium/ebpf/types_string.go b/vendor/github.com/cilium/ebpf/types_string.go index 4813437ec2a..c7139578ec6 100644 --- a/vendor/github.com/cilium/ebpf/types_string.go +++ b/vendor/github.com/cilium/ebpf/types_string.go @@ -1,4 +1,4 @@ -// Code generated by "stringer -output types_string.go -type=MapType,ProgramType"; DO NOT EDIT. +// Code generated by "stringer -output types_string.go -type=MapType,ProgramType,AttachType"; DO NOT EDIT. package ebpf @@ -22,11 +22,23 @@ func _() { _ = x[LPMTrie-11] _ = x[ArrayOfMaps-12] _ = x[HashOfMaps-13] + _ = x[DevMap-14] + _ = x[SockMap-15] + _ = x[CPUMap-16] + _ = x[XSKMap-17] + _ = x[SockHash-18] + _ = x[CGroupStorage-19] + _ = x[ReusePortSockArray-20] + _ = x[PerCPUCGroupStorage-21] + _ = x[Queue-22] + _ = x[Stack-23] + _ = x[SkStorage-24] + _ = x[DevMapHash-25] } -const _MapType_name = "UnspecifiedMapHashArrayProgramArrayPerfEventArrayPerCPUHashPerCPUArrayStackTraceCGroupArrayLRUHashLRUCPUHashLPMTrieArrayOfMapsHashOfMaps" +const _MapType_name = "UnspecifiedMapHashArrayProgramArrayPerfEventArrayPerCPUHashPerCPUArrayStackTraceCGroupArrayLRUHashLRUCPUHashLPMTrieArrayOfMapsHashOfMapsDevMapSockMapCPUMapXSKMapSockHashCGroupStorageReusePortSockArrayPerCPUCGroupStorageQueueStackSkStorageDevMapHash" -var _MapType_index = [...]uint8{0, 14, 18, 23, 35, 49, 59, 70, 80, 91, 98, 108, 115, 126, 136} +var _MapType_index = [...]uint8{0, 14, 18, 23, 35, 49, 59, 70, 80, 91, 98, 108, 115, 126, 136, 142, 149, 155, 161, 169, 182, 200, 219, 224, 229, 238, 248} func (i MapType) String() string { if i >= MapType(len(_MapType_index)-1) { @@ -64,11 +76,12 @@ func _() { _ = x[CGroupSysctl-23] _ = x[RawTracepointWritable-24] _ = x[CGroupSockopt-25] + _ = x[Tracing-26] } -const _ProgramType_name = "UnspecifiedProgramSocketFilterKprobeSchedCLSSchedACTTracePointXDPPerfEventCGroupSKBCGroupSockLWTInLWTOutLWTXmitSockOpsSkSKBCGroupDeviceSkMsgRawTracepointCGroupSockAddrLWTSeg6LocalLircMode2SkReuseportFlowDissectorCGroupSysctlRawTracepointWritableCGroupSockopt" +const _ProgramType_name = "UnspecifiedProgramSocketFilterKprobeSchedCLSSchedACTTracePointXDPPerfEventCGroupSKBCGroupSockLWTInLWTOutLWTXmitSockOpsSkSKBCGroupDeviceSkMsgRawTracepointCGroupSockAddrLWTSeg6LocalLircMode2SkReuseportFlowDissectorCGroupSysctlRawTracepointWritableCGroupSockoptTracing" -var _ProgramType_index = [...]uint16{0, 18, 30, 36, 44, 52, 62, 65, 74, 83, 93, 98, 104, 111, 118, 123, 135, 140, 153, 167, 179, 188, 199, 212, 224, 245, 258} +var _ProgramType_index = [...]uint16{0, 18, 30, 36, 44, 52, 62, 65, 74, 83, 93, 98, 104, 111, 118, 123, 135, 140, 153, 167, 179, 188, 199, 212, 224, 245, 258, 265} func (i ProgramType) String() string { if i >= ProgramType(len(_ProgramType_index)-1) { @@ -76,3 +89,49 @@ func (i ProgramType) String() string { } return _ProgramType_name[_ProgramType_index[i]:_ProgramType_index[i+1]] } +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[AttachNone-0] + _ = x[AttachCGroupInetIngress-0] + _ = x[AttachCGroupInetEgress-1] + _ = x[AttachCGroupInetSockCreate-2] + _ = x[AttachCGroupSockOps-3] + _ = x[AttachSkSKBStreamParser-4] + _ = x[AttachSkSKBStreamVerdict-5] + _ = x[AttachCGroupDevice-6] + _ = x[AttachSkMsgVerdict-7] + _ = x[AttachCGroupInet4Bind-8] + _ = x[AttachCGroupInet6Bind-9] + _ = x[AttachCGroupInet4Connect-10] + _ = x[AttachCGroupInet6Connect-11] + _ = x[AttachCGroupInet4PostBind-12] + _ = x[AttachCGroupInet6PostBind-13] + _ = x[AttachCGroupUDP4Sendmsg-14] + _ = x[AttachCGroupUDP6Sendmsg-15] + _ = x[AttachLircMode2-16] + _ = x[AttachFlowDissector-17] + _ = x[AttachCGroupSysctl-18] + _ = x[AttachCGroupUDP4Recvmsg-19] + _ = x[AttachCGroupUDP6Recvmsg-20] + _ = x[AttachCGroupGetsockopt-21] + _ = x[AttachCGroupSetsockopt-22] + _ = x[AttachTraceRawTp-23] + _ = x[AttachTraceFEntry-24] + _ = x[AttachTraceFExit-25] + _ = x[AttachModifyReturn-26] + _ = x[AttachLSMMac-27] + _ = x[AttachTraceIter-28] +} + +const _AttachType_name = "AttachNoneAttachCGroupInetEgressAttachCGroupInetSockCreateAttachCGroupSockOpsAttachSkSKBStreamParserAttachSkSKBStreamVerdictAttachCGroupDeviceAttachSkMsgVerdictAttachCGroupInet4BindAttachCGroupInet6BindAttachCGroupInet4ConnectAttachCGroupInet6ConnectAttachCGroupInet4PostBindAttachCGroupInet6PostBindAttachCGroupUDP4SendmsgAttachCGroupUDP6SendmsgAttachLircMode2AttachFlowDissectorAttachCGroupSysctlAttachCGroupUDP4RecvmsgAttachCGroupUDP6RecvmsgAttachCGroupGetsockoptAttachCGroupSetsockoptAttachTraceRawTpAttachTraceFEntryAttachTraceFExitAttachModifyReturnAttachLSMMacAttachTraceIter" + +var _AttachType_index = [...]uint16{0, 10, 32, 58, 77, 100, 124, 142, 160, 181, 202, 226, 250, 275, 300, 323, 346, 361, 380, 398, 421, 444, 466, 488, 504, 521, 537, 555, 567, 582} + +func (i AttachType) String() string { + if i >= AttachType(len(_AttachType_index)-1) { + return "AttachType(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _AttachType_name[_AttachType_index[i]:_AttachType_index[i+1]] +} diff --git a/vendor/github.com/containerd/cgroups/.gitignore b/vendor/github.com/containerd/cgroups/.gitignore index 528cd5b39b7..54f3c5db2bc 100644 --- a/vendor/github.com/containerd/cgroups/.gitignore +++ b/vendor/github.com/containerd/cgroups/.gitignore @@ -1 +1,2 @@ example/example +cmd/cgctl diff --git a/vendor/github.com/containerd/cgroups/.travis.yml b/vendor/github.com/containerd/cgroups/.travis.yml index 98eaf8ddaf3..af56f120675 100644 --- a/vendor/github.com/containerd/cgroups/.travis.yml +++ b/vendor/github.com/containerd/cgroups/.travis.yml @@ -1,17 +1,29 @@ +dist: bionic language: go go: - - 1.11.x - - 1.12.x - -go_import_path: github.com/containerd/cgroups + - 1.13.x +cache: + directories: + - /home/travis/.vagrant.d/boxes +matrix: + include: + - name: "cgroup-v2" + env: + - VAGRANT_VERSION=2.2.7 + - FEDORA_VERSION=32 +# https://github.com/opencontainers/runc/blob/b207d578ec2d70e20ca6cfa8a32e49ef59dd48dd/.travis.yml#L23-L42 + install: + - cat /proc/cpuinfo + - sudo apt-get install -q -y bridge-utils dnsmasq-base ebtables libvirt-bin libvirt-dev qemu-kvm qemu-utils ruby-dev && wget https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}_$(uname -m).deb && sudo dpkg -i vagrant_${VAGRANT_VERSION}_$(uname -m).deb && rm -f vagrant_${VAGRANT_VERSION}_$(uname -m).deb + - sudo vagrant plugin install vagrant-libvirt + - sudo vagrant up && sudo mkdir -p /root/.ssh && sudo sh -c "vagrant ssh-config >> /root/.ssh/config" + script: + - sudo ssh default sudo mkdir -p /go/src/github.com/containerd/cgroups + - ( cd $GOPATH/src/github.com/containerd/cgroups && tar c . ) | sudo ssh default sudo tar Cxv /go/src/github.com/containerd/cgroups +# see https://unix.stackexchange.com/questions/80821/why-does-cd-command-not-work-via-ssh + - sudo ssh default sudo 'bash -xec "cd /go/src/github.com/containerd/cgroups && pwd && ls -la && GOPATH=/go go test -v ./..."' install: - - mkdir -p $GOPATH/src/github.com/prometheus $GOPATH/src/github.com/opencontainers $GOPATH/src/github.com/coreos $GOPATH/src/github.com/godbus - - cd $GOPATH/src/github.com/opencontainers && git clone https://github.com/opencontainers/runtime-spec && cd runtime-spec && git checkout fa4b36aa9c99e00c2ef7b5c0013c84100ede5f4e - - cd $GOPATH/src/github.com/coreos && git clone https://github.com/coreos/go-systemd && cd go-systemd && git checkout 48702e0da86bd25e76cfef347e2adeb434a0d0a6 - - cd $GOPATH/src/github.com/godbus && git clone https://github.com/godbus/dbus && cd dbus && git checkout c7fdd8b5cd55e87b4e1f4e372cdb1db61dd6c66f - - cd $GOPATH/src/github.com/containerd/cgroups - - go get -d -t ./... - go get -u github.com/vbatts/git-validation - go get -u github.com/kunalkushwaha/ltag @@ -21,7 +33,7 @@ before_script: script: - DCO_VERBOSITY=-q ../project/script/validate/dco - ../project/script/validate/fileheader ../project/ - - go test -race -coverprofile=coverage.txt -covermode=atomic + - go test -v -race -coverprofile=coverage.txt -covermode=atomic ./... after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/containerd/cgroups/Makefile b/vendor/github.com/containerd/cgroups/Makefile index d7f2628ae5d..19e6607561d 100644 --- a/vendor/github.com/containerd/cgroups/Makefile +++ b/vendor/github.com/containerd/cgroups/Makefile @@ -14,8 +14,11 @@ PACKAGES=$(shell go list ./... | grep -v /vendor/) -all: +all: cgutil go build -v +cgutil: + cd cmd/cgctl && go build -v + proto: protobuild --quiet ${PACKAGES} diff --git a/vendor/github.com/containerd/cgroups/Protobuild.toml b/vendor/github.com/containerd/cgroups/Protobuild.toml index 0d462b50751..1c4c802fe12 100644 --- a/vendor/github.com/containerd/cgroups/Protobuild.toml +++ b/vendor/github.com/containerd/cgroups/Protobuild.toml @@ -18,7 +18,7 @@ plugins = ["grpc"] # Paths that will be added untouched to the end of the includes. We use # `/usr/local/include` to pickup the common install location of protobuf. # This is the default. - after = ["/usr/local/include"] + after = ["/usr/local/include", "/usr/include"] # This section maps protobuf imports to Go packages. These will become # `-M` directives in the call to the go protobuf generator. @@ -31,8 +31,15 @@ plugins = ["grpc"] # Aggregrate the API descriptors to lock down API changes. [[descriptors]] -prefix = "github.com/containerd/cgroups" -target = "metrics.pb.txt" +prefix = "github.com/containerd/cgroups/stats/v1" +target = "stats/v1/metrics.pb.txt" +ignore_files = [ + "google/protobuf/descriptor.proto", + "gogoproto/gogo.proto" +] +[[descriptors]] +prefix = "github.com/containerd/cgroups/v2/stats" +target = "v2/stats/metrics.pb.txt" ignore_files = [ "google/protobuf/descriptor.proto", "gogoproto/gogo.proto" diff --git a/vendor/github.com/containerd/cgroups/README.md b/vendor/github.com/containerd/cgroups/README.md index 81ad11cc7f4..8fbed248224 100644 --- a/vendor/github.com/containerd/cgroups/README.md +++ b/vendor/github.com/containerd/cgroups/README.md @@ -112,6 +112,31 @@ err := control.MoveTo(destination) subCgroup, err := control.New("child", resources) ``` +### Registering for memory events + +This allows you to get notified by an eventfd for v1 memory cgroups events. + +```go +event := cgroups.MemoryThresholdEvent(50 * 1024 * 1024, false) +efd, err := control.RegisterMemoryEvent(event) +``` + +```go +event := cgroups.MemoryPressureEvent(cgroups.MediumPressure, cgroups.DefaultMode) +efd, err := control.RegisterMemoryEvent(event) +``` + +```go +efd, err := control.OOMEventFD() +// or by using RegisterMemoryEvent +event := cgroups.OOMEvent() +efd, err := control.RegisterMemoryEvent(event) +``` + +### Attention + +All static path should not include `/sys/fs/cgroup/` prefix, it should start with your own cgroups name + ## Project details Cgroups is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). diff --git a/vendor/github.com/containerd/cgroups/Vagrantfile b/vendor/github.com/containerd/cgroups/Vagrantfile new file mode 100644 index 00000000000..8bfa16cd78b --- /dev/null +++ b/vendor/github.com/containerd/cgroups/Vagrantfile @@ -0,0 +1,25 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| +# Fedora box is used for testing cgroup v2 support + config.vm.box = "fedora/32-cloud-base" + config.vm.provider :virtualbox do |v| + v.memory = 2048 + v.cpus = 2 + end + config.vm.provider :libvirt do |v| + v.memory = 2048 + v.cpus = 2 + end + config.vm.provision "shell", inline: <<-SHELL + cat << EOF | dnf -y shell +config exclude kernel,kernel-core +config install_weak_deps false +update +install git golang-go +ts run +EOF + dnf clean all + SHELL +end diff --git a/vendor/github.com/containerd/cgroups/blkio.go b/vendor/github.com/containerd/cgroups/blkio.go index 7c498def65b..3f7dc91cba3 100644 --- a/vendor/github.com/containerd/cgroups/blkio.go +++ b/vendor/github.com/containerd/cgroups/blkio.go @@ -26,17 +26,33 @@ import ( "strconv" "strings" + v1 "github.com/containerd/cgroups/stats/v1" specs "github.com/opencontainers/runtime-spec/specs-go" ) -func NewBlkio(root string) *blkioController { - return &blkioController{ - root: filepath.Join(root, string(Blkio)), +// NewBlkio returns a Blkio controller given the root folder of cgroups. +// It may optionally accept other configuration options, such as ProcRoot(path) +func NewBlkio(root string, options ...func(controller *blkioController)) *blkioController { + ctrl := &blkioController{ + root: filepath.Join(root, string(Blkio)), + procRoot: "/proc", + } + for _, opt := range options { + opt(ctrl) + } + return ctrl +} + +// ProcRoot overrides the default location of the "/proc" filesystem +func ProcRoot(path string) func(controller *blkioController) { + return func(c *blkioController) { + c.procRoot = path } } type blkioController struct { - root string + root string + procRoot string } func (b *blkioController) Name() Name { @@ -72,57 +88,50 @@ func (b *blkioController) Update(path string, resources *specs.LinuxResources) e return b.Create(path, resources) } -func (b *blkioController) Stat(path string, stats *Metrics) error { - stats.Blkio = &BlkIOStat{} - settings := []blkioStatSettings{ - { - name: "throttle.io_serviced", - entry: &stats.Blkio.IoServicedRecursive, - }, - { - name: "throttle.io_service_bytes", - entry: &stats.Blkio.IoServiceBytesRecursive, - }, - } +func (b *blkioController) Stat(path string, stats *v1.Metrics) error { + stats.Blkio = &v1.BlkIOStat{} + + var settings []blkioStatSettings + // Try to read CFQ stats available on all CFQ enabled kernels first if _, err := os.Lstat(filepath.Join(b.Path(path), fmt.Sprintf("blkio.io_serviced_recursive"))); err == nil { - settings = []blkioStatSettings{} - settings = append(settings, - blkioStatSettings{ + settings = []blkioStatSettings{ + { name: "sectors_recursive", entry: &stats.Blkio.SectorsRecursive, }, - blkioStatSettings{ + { name: "io_service_bytes_recursive", entry: &stats.Blkio.IoServiceBytesRecursive, }, - blkioStatSettings{ + { name: "io_serviced_recursive", entry: &stats.Blkio.IoServicedRecursive, }, - blkioStatSettings{ + { name: "io_queued_recursive", entry: &stats.Blkio.IoQueuedRecursive, }, - blkioStatSettings{ + { name: "io_service_time_recursive", entry: &stats.Blkio.IoServiceTimeRecursive, }, - blkioStatSettings{ + { name: "io_wait_time_recursive", entry: &stats.Blkio.IoWaitTimeRecursive, }, - blkioStatSettings{ + { name: "io_merged_recursive", entry: &stats.Blkio.IoMergedRecursive, }, - blkioStatSettings{ + { name: "time_recursive", entry: &stats.Blkio.IoTimeRecursive, }, - ) + } } - f, err := os.Open("/proc/diskstats") + + f, err := os.Open(filepath.Join(b.procRoot, "diskstats")) if err != nil { return err } @@ -133,6 +142,29 @@ func (b *blkioController) Stat(path string, stats *Metrics) error { return err } + var size int + for _, t := range settings { + if err := b.readEntry(devices, path, t.name, t.entry); err != nil { + return err + } + size += len(*t.entry) + } + if size > 0 { + return nil + } + + // Even the kernel is compiled with the CFQ scheduler, the cgroup may not use + // block devices with the CFQ scheduler. If so, we should fallback to throttle.* files. + settings = []blkioStatSettings{ + { + name: "throttle.io_serviced", + entry: &stats.Blkio.IoServicedRecursive, + }, + { + name: "throttle.io_service_bytes", + entry: &stats.Blkio.IoServiceBytesRecursive, + }, + } for _, t := range settings { if err := b.readEntry(devices, path, t.name, t.entry); err != nil { return err @@ -141,7 +173,7 @@ func (b *blkioController) Stat(path string, stats *Metrics) error { return nil } -func (b *blkioController) readEntry(devices map[deviceKey]string, path, name string, entry *[]*BlkIOEntry) error { +func (b *blkioController) readEntry(devices map[deviceKey]string, path, name string, entry *[]*v1.BlkIOEntry) error { f, err := os.Open(filepath.Join(b.Path(path), fmt.Sprintf("blkio.%s", name))) if err != nil { return err @@ -149,9 +181,6 @@ func (b *blkioController) readEntry(devices map[deviceKey]string, path, name str defer f.Close() sc := bufio.NewScanner(f) for sc.Scan() { - if err := sc.Err(); err != nil { - return err - } // format: dev type amount fields := strings.FieldsFunc(sc.Text(), splitBlkIOStatLine) if len(fields) < 3 { @@ -180,7 +209,7 @@ func (b *blkioController) readEntry(devices map[deviceKey]string, path, name str if err != nil { return err } - *entry = append(*entry, &BlkIOEntry{ + *entry = append(*entry, &v1.BlkIOEntry{ Device: devices[deviceKey{major, minor}], Major: major, Minor: minor, @@ -188,7 +217,7 @@ func (b *blkioController) readEntry(devices map[deviceKey]string, path, name str Value: v, }) } - return nil + return sc.Err() } func createBlkioSettings(blkio *specs.LinuxBlockIO) []blkioSettings { @@ -268,7 +297,7 @@ type blkioSettings struct { type blkioStatSettings struct { name string - entry *[]*BlkIOEntry + entry *[]*v1.BlkIOEntry } func uintf(v interface{}) []byte { diff --git a/vendor/github.com/containerd/cgroups/cgroup.go b/vendor/github.com/containerd/cgroups/cgroup.go index 53866685b36..263f5438a7a 100644 --- a/vendor/github.com/containerd/cgroups/cgroup.go +++ b/vendor/github.com/containerd/cgroups/cgroup.go @@ -25,6 +25,7 @@ import ( "strings" "sync" + v1 "github.com/containerd/cgroups/stats/v1" specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) @@ -66,6 +67,7 @@ func New(hierarchy Hierarchy, path Path, resources *specs.LinuxResources, opts . } // Load will load an existing cgroup and allow it to be controlled +// All static path should not include `/sys/fs/cgroup/` prefix, it should start with your own cgroups name func Load(hierarchy Hierarchy, path Path, opts ...InitOpts) (Cgroup, error) { config := newInitConfig() for _, o := range opts { @@ -246,7 +248,7 @@ func (c *cgroup) Delete() error { } // Stat returns the current metrics for the cgroup -func (c *cgroup) Stat(handlers ...ErrorHandler) (*Metrics, error) { +func (c *cgroup) Stat(handlers ...ErrorHandler) (*v1.Metrics, error) { c.mu.Lock() defer c.mu.Unlock() if c.err != nil { @@ -256,10 +258,10 @@ func (c *cgroup) Stat(handlers ...ErrorHandler) (*Metrics, error) { handlers = append(handlers, errPassthrough) } var ( - stats = &Metrics{ - CPU: &CPUStat{ - Throttling: &Throttle{}, - Usage: &CPUUsage{}, + stats = &v1.Metrics{ + CPU: &v1.CPUStat{ + Throttling: &v1.Throttle{}, + Usage: &v1.CPUUsage{}, }, } wg = &sync.WaitGroup{} @@ -456,7 +458,26 @@ func (c *cgroup) OOMEventFD() (uintptr, error) { if err != nil { return 0, err } - return s.(*memoryController).OOMEventFD(sp) + return s.(*memoryController).memoryEvent(sp, OOMEvent()) +} + +// RegisterMemoryEvent allows the ability to register for all v1 memory cgroups +// notifications. +func (c *cgroup) RegisterMemoryEvent(event MemoryEvent) (uintptr, error) { + c.mu.Lock() + defer c.mu.Unlock() + if c.err != nil { + return 0, c.err + } + s := c.getSubsystem(Memory) + if s == nil { + return 0, ErrMemoryNotSupported + } + sp, err := c.path(Memory) + if err != nil { + return 0, err + } + return s.(*memoryController).memoryEvent(sp, event) } // State returns the state of the cgroup and its processes diff --git a/vendor/github.com/containerd/cgroups/control.go b/vendor/github.com/containerd/cgroups/control.go index 1f62c54f3bf..a4cb9b83246 100644 --- a/vendor/github.com/containerd/cgroups/control.go +++ b/vendor/github.com/containerd/cgroups/control.go @@ -19,6 +19,7 @@ package cgroups import ( "os" + v1 "github.com/containerd/cgroups/stats/v1" specs "github.com/opencontainers/runtime-spec/specs-go" ) @@ -68,7 +69,7 @@ type Cgroup interface { // subsystems are moved one at a time MoveTo(Cgroup) error // Stat returns the stats for all subsystems in the cgroup - Stat(...ErrorHandler) (*Metrics, error) + Stat(...ErrorHandler) (*v1.Metrics, error) // Update updates all the subsystems with the provided resource changes Update(resources *specs.LinuxResources) error // Processes returns all the processes in a select subsystem for the cgroup @@ -81,6 +82,9 @@ type Cgroup interface { Thaw() error // OOMEventFD returns the memory subsystem's event fd for OOM events OOMEventFD() (uintptr, error) + // RegisterMemoryEvent returns the memory subsystems event fd for whatever memory event was + // registered for. Can alternatively register for the oom event with this method. + RegisterMemoryEvent(MemoryEvent) (uintptr, error) // State returns the cgroups current state State() State // Subsystems returns all the subsystems in the cgroup diff --git a/vendor/github.com/containerd/cgroups/cpu.go b/vendor/github.com/containerd/cgroups/cpu.go index 431cd3e51e4..ba8dda83443 100644 --- a/vendor/github.com/containerd/cgroups/cpu.go +++ b/vendor/github.com/containerd/cgroups/cpu.go @@ -24,6 +24,7 @@ import ( "path/filepath" "strconv" + v1 "github.com/containerd/cgroups/stats/v1" specs "github.com/opencontainers/runtime-spec/specs-go" ) @@ -100,7 +101,7 @@ func (c *cpuController) Update(path string, resources *specs.LinuxResources) err return c.Create(path, resources) } -func (c *cpuController) Stat(path string, stats *Metrics) error { +func (c *cpuController) Stat(path string, stats *v1.Metrics) error { f, err := os.Open(filepath.Join(c.Path(path), "cpu.stat")) if err != nil { return err @@ -109,9 +110,6 @@ func (c *cpuController) Stat(path string, stats *Metrics) error { // get or create the cpu field because cpuacct can also set values on this struct sc := bufio.NewScanner(f) for sc.Scan() { - if err := sc.Err(); err != nil { - return err - } key, v, err := parseKV(sc.Text()) if err != nil { return err @@ -125,5 +123,5 @@ func (c *cpuController) Stat(path string, stats *Metrics) error { stats.CPU.Throttling.ThrottledTime = v } } - return nil + return sc.Err() } diff --git a/vendor/github.com/containerd/cgroups/cpuacct.go b/vendor/github.com/containerd/cgroups/cpuacct.go index 42a490a87e7..e5fc864bd75 100644 --- a/vendor/github.com/containerd/cgroups/cpuacct.go +++ b/vendor/github.com/containerd/cgroups/cpuacct.go @@ -22,6 +22,8 @@ import ( "path/filepath" "strconv" "strings" + + v1 "github.com/containerd/cgroups/stats/v1" ) const nanosecondsInSecond = 1000000000 @@ -46,7 +48,7 @@ func (c *cpuacctController) Path(path string) string { return filepath.Join(c.root, path) } -func (c *cpuacctController) Stat(path string, stats *Metrics) error { +func (c *cpuacctController) Stat(path string, stats *v1.Metrics) error { user, kernel, err := c.getUsage(path) if err != nil { return err diff --git a/vendor/github.com/containerd/cgroups/go.mod b/vendor/github.com/containerd/cgroups/go.mod new file mode 100644 index 00000000000..c58a3ae21fa --- /dev/null +++ b/vendor/github.com/containerd/cgroups/go.mod @@ -0,0 +1,19 @@ +module github.com/containerd/cgroups + +go 1.13 + +require ( + github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3 + github.com/coreos/go-systemd/v22 v22.0.0 + github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect + github.com/docker/go-units v0.4.0 + github.com/godbus/dbus/v5 v5.0.3 + github.com/gogo/protobuf v1.3.1 + github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect + github.com/opencontainers/runtime-spec v1.0.2 + github.com/pkg/errors v0.9.1 + github.com/sirupsen/logrus v1.4.2 + github.com/stretchr/testify v1.2.2 + github.com/urfave/cli v1.22.2 + golang.org/x/sys v0.0.0-20200120151820-655fe14d7479 +) diff --git a/vendor/github.com/containerd/cgroups/go.sum b/vendor/github.com/containerd/cgroups/go.sum new file mode 100644 index 00000000000..666bbd42d94 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/go.sum @@ -0,0 +1,46 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3 h1:i8+1fuPLjSgAYXUyBlHNhFwjcfAsP4ufiuH1+PWkyDU= +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= +github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28= +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/opencontainers/runtime-spec v1.0.2 h1:UfAcuLBJB9Coz72x1hgl8O5RVzTdNiaglX6v2DM6FI0= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479 h1:LhLiKguPgZL+Tglay4GhVtfF0kb8cvOJ0dHTCBO8YNI= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/containerd/cgroups/hierarchy.go b/vendor/github.com/containerd/cgroups/hierarchy.go index 9221bf3f15c..ca3f1b9380b 100644 --- a/vendor/github.com/containerd/cgroups/hierarchy.go +++ b/vendor/github.com/containerd/cgroups/hierarchy.go @@ -16,5 +16,5 @@ package cgroups -// Hierarchy enableds both unified and split hierarchy for cgroups +// Hierarchy enables both unified and split hierarchy for cgroups type Hierarchy func() ([]Subsystem, error) diff --git a/vendor/github.com/containerd/cgroups/hugetlb.go b/vendor/github.com/containerd/cgroups/hugetlb.go index 3718706d7b4..e5def58151a 100644 --- a/vendor/github.com/containerd/cgroups/hugetlb.go +++ b/vendor/github.com/containerd/cgroups/hugetlb.go @@ -23,6 +23,7 @@ import ( "strconv" "strings" + v1 "github.com/containerd/cgroups/stats/v1" specs "github.com/opencontainers/runtime-spec/specs-go" ) @@ -67,7 +68,7 @@ func (h *hugetlbController) Create(path string, resources *specs.LinuxResources) return nil } -func (h *hugetlbController) Stat(path string, stats *Metrics) error { +func (h *hugetlbController) Stat(path string, stats *v1.Metrics) error { for _, size := range h.sizes { s, err := h.readSizeStat(path, size) if err != nil { @@ -78,8 +79,8 @@ func (h *hugetlbController) Stat(path string, stats *Metrics) error { return nil } -func (h *hugetlbController) readSizeStat(path, size string) (*HugetlbStat, error) { - s := HugetlbStat{ +func (h *hugetlbController) readSizeStat(path, size string) (*v1.HugetlbStat, error) { + s := v1.HugetlbStat{ Pagesize: size, } for _, t := range []struct { diff --git a/vendor/github.com/containerd/cgroups/memory.go b/vendor/github.com/containerd/cgroups/memory.go index b8b5fe7ea0e..74ad3714d82 100644 --- a/vendor/github.com/containerd/cgroups/memory.go +++ b/vendor/github.com/containerd/cgroups/memory.go @@ -27,19 +27,170 @@ import ( "strings" "syscall" - "golang.org/x/sys/unix" - + v1 "github.com/containerd/cgroups/stats/v1" specs "github.com/opencontainers/runtime-spec/specs-go" + "golang.org/x/sys/unix" ) -func NewMemory(root string) *memoryController { - return &memoryController{ - root: filepath.Join(root, string(Memory)), +// MemoryEvent is an interface that V1 memory Cgroup notifications implement. Arg returns the +// file name whose fd should be written to "cgroups.event_control". EventFile returns the name of +// the file that supports the notification api e.g. "memory.usage_in_bytes". +type MemoryEvent interface { + Arg() string + EventFile() string +} + +type memoryThresholdEvent struct { + threshold uint64 + swap bool +} + +// MemoryThresholdEvent returns a new memory threshold event to be used with RegisterMemoryEvent. +// If swap is true, the event will be registered using memory.memsw.usage_in_bytes +func MemoryThresholdEvent(threshold uint64, swap bool) MemoryEvent { + return &memoryThresholdEvent{ + threshold, + swap, + } +} + +func (m *memoryThresholdEvent) Arg() string { + return strconv.FormatUint(m.threshold, 10) +} + +func (m *memoryThresholdEvent) EventFile() string { + if m.swap { + return "memory.memsw.usage_in_bytes" + } + return "memory.usage_in_bytes" +} + +type oomEvent struct{} + +// OOMEvent returns a new oom event to be used with RegisterMemoryEvent. +func OOMEvent() MemoryEvent { + return &oomEvent{} +} + +func (oom *oomEvent) Arg() string { + return "" +} + +func (oom *oomEvent) EventFile() string { + return "memory.oom_control" +} + +type memoryPressureEvent struct { + pressureLevel MemoryPressureLevel + hierarchy EventNotificationMode +} + +// MemoryPressureEvent returns a new memory pressure event to be used with RegisterMemoryEvent. +func MemoryPressureEvent(pressureLevel MemoryPressureLevel, hierarchy EventNotificationMode) MemoryEvent { + return &memoryPressureEvent{ + pressureLevel, + hierarchy, + } +} + +func (m *memoryPressureEvent) Arg() string { + return string(m.pressureLevel) + "," + string(m.hierarchy) +} + +func (m *memoryPressureEvent) EventFile() string { + return "memory.pressure_level" +} + +// MemoryPressureLevel corresponds to the memory pressure levels defined +// for memory cgroups. +type MemoryPressureLevel string + +// The three memory pressure levels are as follows. +// - The "low" level means that the system is reclaiming memory for new +// allocations. Monitoring this reclaiming activity might be useful for +// maintaining cache level. Upon notification, the program (typically +// "Activity Manager") might analyze vmstat and act in advance (i.e. +// prematurely shutdown unimportant services). +// - The "medium" level means that the system is experiencing medium memory +// pressure, the system might be making swap, paging out active file caches, +// etc. Upon this event applications may decide to further analyze +// vmstat/zoneinfo/memcg or internal memory usage statistics and free any +// resources that can be easily reconstructed or re-read from a disk. +// - The "critical" level means that the system is actively thrashing, it is +// about to out of memory (OOM) or even the in-kernel OOM killer is on its +// way to trigger. Applications should do whatever they can to help the +// system. It might be too late to consult with vmstat or any other +// statistics, so it is advisable to take an immediate action. +// "https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt" Section 11 +const ( + LowPressure MemoryPressureLevel = "low" + MediumPressure MemoryPressureLevel = "medium" + CriticalPressure MemoryPressureLevel = "critical" +) + +// EventNotificationMode corresponds to the notification modes +// for the memory cgroups pressure level notifications. +type EventNotificationMode string + +// There are three optional modes that specify different propagation behavior: +// - "default": this is the default behavior specified above. This mode is the +// same as omitting the optional mode parameter, preserved by backwards +// compatibility. +// - "hierarchy": events always propagate up to the root, similar to the default +// behavior, except that propagation continues regardless of whether there are +// event listeners at each level, with the "hierarchy" mode. In the above +// example, groups A, B, and C will receive notification of memory pressure. +// - "local": events are pass-through, i.e. they only receive notifications when +// memory pressure is experienced in the memcg for which the notification is +// registered. In the above example, group C will receive notification if +// registered for "local" notification and the group experiences memory +// pressure. However, group B will never receive notification, regardless if +// there is an event listener for group C or not, if group B is registered for +// local notification. +// "https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt" Section 11 +const ( + DefaultMode EventNotificationMode = "default" + LocalMode EventNotificationMode = "local" + HierarchyMode EventNotificationMode = "hierarchy" +) + +// NewMemory returns a Memory controller given the root folder of cgroups. +// It may optionally accept other configuration options, such as IgnoreModules(...) +func NewMemory(root string, options ...func(*memoryController)) *memoryController { + mc := &memoryController{ + root: filepath.Join(root, string(Memory)), + ignored: map[string]struct{}{}, + } + for _, opt := range options { + opt(mc) + } + return mc +} + +// IgnoreModules configure the memory controller to not read memory metrics for some +// module names (e.g. passing "memsw" would avoid all the memory.memsw.* entries) +func IgnoreModules(names ...string) func(*memoryController) { + return func(mc *memoryController) { + for _, name := range names { + mc.ignored[name] = struct{}{} + } + } +} + +// OptionalSwap allows the memory controller to not fail if cgroups is not accounting +// Swap memory (there are no memory.memsw.* entries) +func OptionalSwap() func(*memoryController) { + return func(mc *memoryController) { + _, err := os.Stat(filepath.Join(mc.root, "memory.memsw.usage_in_bytes")) + if os.IsNotExist(err) { + mc.ignored["memsw"] = struct{}{} + } } } type memoryController struct { - root string + root string + ignored map[string]struct{} } func (m *memoryController) Name() Name { @@ -97,24 +248,24 @@ func (m *memoryController) Update(path string, resources *specs.LinuxResources) return m.set(path, settings) } -func (m *memoryController) Stat(path string, stats *Metrics) error { +func (m *memoryController) Stat(path string, stats *v1.Metrics) error { f, err := os.Open(filepath.Join(m.Path(path), "memory.stat")) if err != nil { return err } defer f.Close() - stats.Memory = &MemoryStat{ - Usage: &MemoryEntry{}, - Swap: &MemoryEntry{}, - Kernel: &MemoryEntry{}, - KernelTCP: &MemoryEntry{}, + stats.Memory = &v1.MemoryStat{ + Usage: &v1.MemoryEntry{}, + Swap: &v1.MemoryEntry{}, + Kernel: &v1.MemoryEntry{}, + KernelTCP: &v1.MemoryEntry{}, } if err := m.parseStats(f, stats.Memory); err != nil { return err } for _, t := range []struct { module string - entry *MemoryEntry + entry *v1.MemoryEntry }{ { module: "", @@ -133,6 +284,9 @@ func (m *memoryController) Stat(path string, stats *Metrics) error { entry: stats.Memory.KernelTCP, }, } { + if _, ok := m.ignored[t.module]; ok { + continue + } for _, tt := range []struct { name string value *uint64 @@ -169,44 +323,13 @@ func (m *memoryController) Stat(path string, stats *Metrics) error { return nil } -func (m *memoryController) OOMEventFD(path string) (uintptr, error) { - root := m.Path(path) - f, err := os.Open(filepath.Join(root, "memory.oom_control")) - if err != nil { - return 0, err - } - defer f.Close() - fd, _, serr := unix.RawSyscall(unix.SYS_EVENTFD2, 0, unix.EFD_CLOEXEC, 0) - if serr != 0 { - return 0, serr - } - if err := writeEventFD(root, f.Fd(), fd); err != nil { - unix.Close(int(fd)) - return 0, err - } - return fd, nil -} - -func writeEventFD(root string, cfd, efd uintptr) error { - f, err := os.OpenFile(filepath.Join(root, "cgroup.event_control"), os.O_WRONLY, 0) - if err != nil { - return err - } - _, err = f.WriteString(fmt.Sprintf("%d %d", efd, cfd)) - f.Close() - return err -} - -func (m *memoryController) parseStats(r io.Reader, stat *MemoryStat) error { +func (m *memoryController) parseStats(r io.Reader, stat *v1.MemoryStat) error { var ( raw = make(map[string]uint64) sc = bufio.NewScanner(r) line int ) for sc.Scan() { - if err := sc.Err(); err != nil { - return err - } key, v, err := parseKV(sc.Text()) if err != nil { return fmt.Errorf("%d: %v", line, err) @@ -214,6 +337,9 @@ func (m *memoryController) parseStats(r io.Reader, stat *MemoryStat) error { raw[key] = v line++ } + if err := sc.Err(); err != nil { + return err + } stat.Cache = raw["cache"] stat.RSS = raw["rss"] stat.RSSHuge = raw["rss_huge"] @@ -282,7 +408,7 @@ func getMemorySettings(resources *specs.LinuxResources) []memorySettings { value: mem.Limit, }, { - name: "soft_limit_in_bytes", + name: "soft_limit_in_bytes", value: mem.Reservation, }, { @@ -327,3 +453,24 @@ func getOomControlValue(mem *specs.LinuxMemory) *int64 { } return nil } + +func (m *memoryController) memoryEvent(path string, event MemoryEvent) (uintptr, error) { + root := m.Path(path) + efd, err := unix.Eventfd(0, unix.EFD_CLOEXEC) + if err != nil { + return 0, err + } + evtFile, err := os.Open(filepath.Join(root, event.EventFile())) + if err != nil { + unix.Close(efd) + return 0, err + } + defer evtFile.Close() + data := fmt.Sprintf("%d %d %s", efd, evtFile.Fd(), event.Arg()) + evctlPath := filepath.Join(root, "cgroup.event_control") + if err := ioutil.WriteFile(evctlPath, []byte(data), 0700); err != nil { + unix.Close(efd) + return 0, err + } + return uintptr(efd), nil +} diff --git a/vendor/github.com/containerd/cgroups/pids.go b/vendor/github.com/containerd/cgroups/pids.go index a1cfcb88d40..6297f24970c 100644 --- a/vendor/github.com/containerd/cgroups/pids.go +++ b/vendor/github.com/containerd/cgroups/pids.go @@ -23,6 +23,7 @@ import ( "strconv" "strings" + v1 "github.com/containerd/cgroups/stats/v1" specs "github.com/opencontainers/runtime-spec/specs-go" ) @@ -62,7 +63,7 @@ func (p *pidsController) Update(path string, resources *specs.LinuxResources) er return p.Create(path, resources) } -func (p *pidsController) Stat(path string, stats *Metrics) error { +func (p *pidsController) Stat(path string, stats *v1.Metrics) error { current, err := readUint(filepath.Join(p.Path(path), "pids.current")) if err != nil { return err @@ -77,7 +78,7 @@ func (p *pidsController) Stat(path string, stats *Metrics) error { return err } } - stats.Pids = &PidsStat{ + stats.Pids = &v1.PidsStat{ Current: current, Limit: max, } diff --git a/vendor/github.com/containerd/cgroups/rdma.go b/vendor/github.com/containerd/cgroups/rdma.go index 4f423d33a0c..f5085aa6309 100644 --- a/vendor/github.com/containerd/cgroups/rdma.go +++ b/vendor/github.com/containerd/cgroups/rdma.go @@ -24,6 +24,7 @@ import ( "strconv" "strings" + v1 "github.com/containerd/cgroups/stats/v1" specs "github.com/opencontainers/runtime-spec/specs-go" ) @@ -80,7 +81,7 @@ func (p *rdmaController) Update(path string, resources *specs.LinuxResources) er return p.Create(path, resources) } -func parseRdmaKV(raw string, entry *RdmaEntry) { +func parseRdmaKV(raw string, entry *v1.RdmaEntry) { var value uint64 var err error @@ -103,13 +104,13 @@ func parseRdmaKV(raw string, entry *RdmaEntry) { } } -func toRdmaEntry(strEntries []string) []*RdmaEntry { - var rdmaEntries []*RdmaEntry +func toRdmaEntry(strEntries []string) []*v1.RdmaEntry { + var rdmaEntries []*v1.RdmaEntry for i := range strEntries { parts := strings.Fields(strEntries[i]) switch len(parts) { case 3: - entry := new(RdmaEntry) + entry := new(v1.RdmaEntry) entry.Device = parts[0] parseRdmaKV(parts[1], entry) parseRdmaKV(parts[2], entry) @@ -122,7 +123,7 @@ func toRdmaEntry(strEntries []string) []*RdmaEntry { return rdmaEntries } -func (p *rdmaController) Stat(path string, stats *Metrics) error { +func (p *rdmaController) Stat(path string, stats *v1.Metrics) error { currentData, err := ioutil.ReadFile(filepath.Join(p.Path(path), "rdma.current")) if err != nil { @@ -145,7 +146,7 @@ func (p *rdmaController) Stat(path string, stats *Metrics) error { currentEntries := toRdmaEntry(currentPerDevices) maxEntries := toRdmaEntry(maxPerDevices) - stats.Rdma = &RdmaStat{ + stats.Rdma = &v1.RdmaStat{ Current: currentEntries, Limit: maxEntries, } diff --git a/vendor/github.com/containerd/cgroups/stats/v1/doc.go b/vendor/github.com/containerd/cgroups/stats/v1/doc.go new file mode 100644 index 00000000000..23f3cdd4b37 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/stats/v1/doc.go @@ -0,0 +1,17 @@ +/* + Copyright The containerd 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 v1 diff --git a/vendor/github.com/containerd/cgroups/metrics.pb.go b/vendor/github.com/containerd/cgroups/stats/v1/metrics.pb.go similarity index 66% rename from vendor/github.com/containerd/cgroups/metrics.pb.go rename to vendor/github.com/containerd/cgroups/stats/v1/metrics.pb.go index 7dd7f6f3c40..713376d5ec9 100644 --- a/vendor/github.com/containerd/cgroups/metrics.pb.go +++ b/vendor/github.com/containerd/cgroups/stats/v1/metrics.pb.go @@ -1,38 +1,17 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/containerd/cgroups/metrics.proto +// source: github.com/containerd/cgroups/stats/v1/metrics.proto -/* - Package cgroups is a generated protocol buffer package. +package v1 - It is generated from these files: - github.com/containerd/cgroups/metrics.proto - - It has these top-level messages: - Metrics - HugetlbStat - PidsStat - CPUStat - CPUUsage - Throttle - MemoryStat - MemoryEntry - BlkIOStat - BlkIOEntry - RdmaStat - RdmaEntry - NetworkStat -*/ -package cgroups - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import strings "strings" -import reflect "reflect" - -import io "io" +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + reflect "reflect" + strings "strings" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -46,69 +25,256 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Metrics struct { - Hugetlb []*HugetlbStat `protobuf:"bytes,1,rep,name=hugetlb" json:"hugetlb,omitempty"` - Pids *PidsStat `protobuf:"bytes,2,opt,name=pids" json:"pids,omitempty"` - CPU *CPUStat `protobuf:"bytes,3,opt,name=cpu" json:"cpu,omitempty"` - Memory *MemoryStat `protobuf:"bytes,4,opt,name=memory" json:"memory,omitempty"` - Blkio *BlkIOStat `protobuf:"bytes,5,opt,name=blkio" json:"blkio,omitempty"` - Rdma *RdmaStat `protobuf:"bytes,6,opt,name=rdma" json:"rdma,omitempty"` - Network []*NetworkStat `protobuf:"bytes,7,rep,name=network" json:"network,omitempty"` + Hugetlb []*HugetlbStat `protobuf:"bytes,1,rep,name=hugetlb,proto3" json:"hugetlb,omitempty"` + Pids *PidsStat `protobuf:"bytes,2,opt,name=pids,proto3" json:"pids,omitempty"` + CPU *CPUStat `protobuf:"bytes,3,opt,name=cpu,proto3" json:"cpu,omitempty"` + Memory *MemoryStat `protobuf:"bytes,4,opt,name=memory,proto3" json:"memory,omitempty"` + Blkio *BlkIOStat `protobuf:"bytes,5,opt,name=blkio,proto3" json:"blkio,omitempty"` + Rdma *RdmaStat `protobuf:"bytes,6,opt,name=rdma,proto3" json:"rdma,omitempty"` + Network []*NetworkStat `protobuf:"bytes,7,rep,name=network,proto3" json:"network,omitempty"` + CgroupStats *CgroupStats `protobuf:"bytes,8,opt,name=cgroup_stats,json=cgroupStats,proto3" json:"cgroup_stats,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Metrics) Reset() { *m = Metrics{} } -func (*Metrics) ProtoMessage() {} -func (*Metrics) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{0} } +func (m *Metrics) Reset() { *m = Metrics{} } +func (*Metrics) ProtoMessage() {} +func (*Metrics) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{0} +} +func (m *Metrics) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Metrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Metrics.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Metrics) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metrics.Merge(m, src) +} +func (m *Metrics) XXX_Size() int { + return m.Size() +} +func (m *Metrics) XXX_DiscardUnknown() { + xxx_messageInfo_Metrics.DiscardUnknown(m) +} + +var xxx_messageInfo_Metrics proto.InternalMessageInfo type HugetlbStat struct { - Usage uint64 `protobuf:"varint,1,opt,name=usage,proto3" json:"usage,omitempty"` - Max uint64 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"` - Failcnt uint64 `protobuf:"varint,3,opt,name=failcnt,proto3" json:"failcnt,omitempty"` - Pagesize string `protobuf:"bytes,4,opt,name=pagesize,proto3" json:"pagesize,omitempty"` + Usage uint64 `protobuf:"varint,1,opt,name=usage,proto3" json:"usage,omitempty"` + Max uint64 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"` + Failcnt uint64 `protobuf:"varint,3,opt,name=failcnt,proto3" json:"failcnt,omitempty"` + Pagesize string `protobuf:"bytes,4,opt,name=pagesize,proto3" json:"pagesize,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *HugetlbStat) Reset() { *m = HugetlbStat{} } -func (*HugetlbStat) ProtoMessage() {} -func (*HugetlbStat) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{1} } +func (m *HugetlbStat) Reset() { *m = HugetlbStat{} } +func (*HugetlbStat) ProtoMessage() {} +func (*HugetlbStat) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{1} +} +func (m *HugetlbStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HugetlbStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HugetlbStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HugetlbStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_HugetlbStat.Merge(m, src) +} +func (m *HugetlbStat) XXX_Size() int { + return m.Size() +} +func (m *HugetlbStat) XXX_DiscardUnknown() { + xxx_messageInfo_HugetlbStat.DiscardUnknown(m) +} + +var xxx_messageInfo_HugetlbStat proto.InternalMessageInfo type PidsStat struct { - Current uint64 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"` - Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + Current uint64 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"` + Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PidsStat) Reset() { *m = PidsStat{} } -func (*PidsStat) ProtoMessage() {} -func (*PidsStat) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{2} } +func (m *PidsStat) Reset() { *m = PidsStat{} } +func (*PidsStat) ProtoMessage() {} +func (*PidsStat) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{2} +} +func (m *PidsStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PidsStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PidsStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PidsStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_PidsStat.Merge(m, src) +} +func (m *PidsStat) XXX_Size() int { + return m.Size() +} +func (m *PidsStat) XXX_DiscardUnknown() { + xxx_messageInfo_PidsStat.DiscardUnknown(m) +} + +var xxx_messageInfo_PidsStat proto.InternalMessageInfo type CPUStat struct { - Usage *CPUUsage `protobuf:"bytes,1,opt,name=usage" json:"usage,omitempty"` - Throttling *Throttle `protobuf:"bytes,2,opt,name=throttling" json:"throttling,omitempty"` + Usage *CPUUsage `protobuf:"bytes,1,opt,name=usage,proto3" json:"usage,omitempty"` + Throttling *Throttle `protobuf:"bytes,2,opt,name=throttling,proto3" json:"throttling,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CPUStat) Reset() { *m = CPUStat{} } -func (*CPUStat) ProtoMessage() {} -func (*CPUStat) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{3} } +func (m *CPUStat) Reset() { *m = CPUStat{} } +func (*CPUStat) ProtoMessage() {} +func (*CPUStat) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{3} +} +func (m *CPUStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CPUStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CPUStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CPUStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_CPUStat.Merge(m, src) +} +func (m *CPUStat) XXX_Size() int { + return m.Size() +} +func (m *CPUStat) XXX_DiscardUnknown() { + xxx_messageInfo_CPUStat.DiscardUnknown(m) +} + +var xxx_messageInfo_CPUStat proto.InternalMessageInfo type CPUUsage struct { // values in nanoseconds - Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - Kernel uint64 `protobuf:"varint,2,opt,name=kernel,proto3" json:"kernel,omitempty"` - User uint64 `protobuf:"varint,3,opt,name=user,proto3" json:"user,omitempty"` - PerCPU []uint64 `protobuf:"varint,4,rep,packed,name=per_cpu,json=perCpu" json:"per_cpu,omitempty"` + Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + Kernel uint64 `protobuf:"varint,2,opt,name=kernel,proto3" json:"kernel,omitempty"` + User uint64 `protobuf:"varint,3,opt,name=user,proto3" json:"user,omitempty"` + PerCPU []uint64 `protobuf:"varint,4,rep,packed,name=per_cpu,json=perCpu,proto3" json:"per_cpu,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CPUUsage) Reset() { *m = CPUUsage{} } -func (*CPUUsage) ProtoMessage() {} -func (*CPUUsage) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{4} } +func (m *CPUUsage) Reset() { *m = CPUUsage{} } +func (*CPUUsage) ProtoMessage() {} +func (*CPUUsage) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{4} +} +func (m *CPUUsage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CPUUsage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CPUUsage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CPUUsage) XXX_Merge(src proto.Message) { + xxx_messageInfo_CPUUsage.Merge(m, src) +} +func (m *CPUUsage) XXX_Size() int { + return m.Size() +} +func (m *CPUUsage) XXX_DiscardUnknown() { + xxx_messageInfo_CPUUsage.DiscardUnknown(m) +} + +var xxx_messageInfo_CPUUsage proto.InternalMessageInfo type Throttle struct { - Periods uint64 `protobuf:"varint,1,opt,name=periods,proto3" json:"periods,omitempty"` - ThrottledPeriods uint64 `protobuf:"varint,2,opt,name=throttled_periods,json=throttledPeriods,proto3" json:"throttled_periods,omitempty"` - ThrottledTime uint64 `protobuf:"varint,3,opt,name=throttled_time,json=throttledTime,proto3" json:"throttled_time,omitempty"` + Periods uint64 `protobuf:"varint,1,opt,name=periods,proto3" json:"periods,omitempty"` + ThrottledPeriods uint64 `protobuf:"varint,2,opt,name=throttled_periods,json=throttledPeriods,proto3" json:"throttled_periods,omitempty"` + ThrottledTime uint64 `protobuf:"varint,3,opt,name=throttled_time,json=throttledTime,proto3" json:"throttled_time,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Throttle) Reset() { *m = Throttle{} } -func (*Throttle) ProtoMessage() {} -func (*Throttle) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{5} } +func (m *Throttle) Reset() { *m = Throttle{} } +func (*Throttle) ProtoMessage() {} +func (*Throttle) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{5} +} +func (m *Throttle) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Throttle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Throttle.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Throttle) XXX_Merge(src proto.Message) { + xxx_messageInfo_Throttle.Merge(m, src) +} +func (m *Throttle) XXX_Size() int { + return m.Size() +} +func (m *Throttle) XXX_DiscardUnknown() { + xxx_messageInfo_Throttle.DiscardUnknown(m) +} + +var xxx_messageInfo_Throttle proto.InternalMessageInfo type MemoryStat struct { Cache uint64 `protobuf:"varint,1,opt,name=cache,proto3" json:"cache,omitempty"` @@ -143,88 +309,354 @@ type MemoryStat struct { TotalInactiveFile uint64 `protobuf:"varint,30,opt,name=total_inactive_file,json=totalInactiveFile,proto3" json:"total_inactive_file,omitempty"` TotalActiveFile uint64 `protobuf:"varint,31,opt,name=total_active_file,json=totalActiveFile,proto3" json:"total_active_file,omitempty"` TotalUnevictable uint64 `protobuf:"varint,32,opt,name=total_unevictable,json=totalUnevictable,proto3" json:"total_unevictable,omitempty"` - Usage *MemoryEntry `protobuf:"bytes,33,opt,name=usage" json:"usage,omitempty"` - Swap *MemoryEntry `protobuf:"bytes,34,opt,name=swap" json:"swap,omitempty"` - Kernel *MemoryEntry `protobuf:"bytes,35,opt,name=kernel" json:"kernel,omitempty"` - KernelTCP *MemoryEntry `protobuf:"bytes,36,opt,name=kernel_tcp,json=kernelTcp" json:"kernel_tcp,omitempty"` + Usage *MemoryEntry `protobuf:"bytes,33,opt,name=usage,proto3" json:"usage,omitempty"` + Swap *MemoryEntry `protobuf:"bytes,34,opt,name=swap,proto3" json:"swap,omitempty"` + Kernel *MemoryEntry `protobuf:"bytes,35,opt,name=kernel,proto3" json:"kernel,omitempty"` + KernelTCP *MemoryEntry `protobuf:"bytes,36,opt,name=kernel_tcp,json=kernelTcp,proto3" json:"kernel_tcp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *MemoryStat) Reset() { *m = MemoryStat{} } -func (*MemoryStat) ProtoMessage() {} -func (*MemoryStat) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{6} } +func (m *MemoryStat) Reset() { *m = MemoryStat{} } +func (*MemoryStat) ProtoMessage() {} +func (*MemoryStat) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{6} +} +func (m *MemoryStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MemoryStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MemoryStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MemoryStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemoryStat.Merge(m, src) +} +func (m *MemoryStat) XXX_Size() int { + return m.Size() +} +func (m *MemoryStat) XXX_DiscardUnknown() { + xxx_messageInfo_MemoryStat.DiscardUnknown(m) +} + +var xxx_messageInfo_MemoryStat proto.InternalMessageInfo type MemoryEntry struct { - Limit uint64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` - Usage uint64 `protobuf:"varint,2,opt,name=usage,proto3" json:"usage,omitempty"` - Max uint64 `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty"` - Failcnt uint64 `protobuf:"varint,4,opt,name=failcnt,proto3" json:"failcnt,omitempty"` + Limit uint64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + Usage uint64 `protobuf:"varint,2,opt,name=usage,proto3" json:"usage,omitempty"` + Max uint64 `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty"` + Failcnt uint64 `protobuf:"varint,4,opt,name=failcnt,proto3" json:"failcnt,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *MemoryEntry) Reset() { *m = MemoryEntry{} } -func (*MemoryEntry) ProtoMessage() {} -func (*MemoryEntry) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{7} } +func (m *MemoryEntry) Reset() { *m = MemoryEntry{} } +func (*MemoryEntry) ProtoMessage() {} +func (*MemoryEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{7} +} +func (m *MemoryEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MemoryEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MemoryEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MemoryEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemoryEntry.Merge(m, src) +} +func (m *MemoryEntry) XXX_Size() int { + return m.Size() +} +func (m *MemoryEntry) XXX_DiscardUnknown() { + xxx_messageInfo_MemoryEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_MemoryEntry proto.InternalMessageInfo type BlkIOStat struct { - IoServiceBytesRecursive []*BlkIOEntry `protobuf:"bytes,1,rep,name=io_service_bytes_recursive,json=ioServiceBytesRecursive" json:"io_service_bytes_recursive,omitempty"` - IoServicedRecursive []*BlkIOEntry `protobuf:"bytes,2,rep,name=io_serviced_recursive,json=ioServicedRecursive" json:"io_serviced_recursive,omitempty"` - IoQueuedRecursive []*BlkIOEntry `protobuf:"bytes,3,rep,name=io_queued_recursive,json=ioQueuedRecursive" json:"io_queued_recursive,omitempty"` - IoServiceTimeRecursive []*BlkIOEntry `protobuf:"bytes,4,rep,name=io_service_time_recursive,json=ioServiceTimeRecursive" json:"io_service_time_recursive,omitempty"` - IoWaitTimeRecursive []*BlkIOEntry `protobuf:"bytes,5,rep,name=io_wait_time_recursive,json=ioWaitTimeRecursive" json:"io_wait_time_recursive,omitempty"` - IoMergedRecursive []*BlkIOEntry `protobuf:"bytes,6,rep,name=io_merged_recursive,json=ioMergedRecursive" json:"io_merged_recursive,omitempty"` - IoTimeRecursive []*BlkIOEntry `protobuf:"bytes,7,rep,name=io_time_recursive,json=ioTimeRecursive" json:"io_time_recursive,omitempty"` - SectorsRecursive []*BlkIOEntry `protobuf:"bytes,8,rep,name=sectors_recursive,json=sectorsRecursive" json:"sectors_recursive,omitempty"` + IoServiceBytesRecursive []*BlkIOEntry `protobuf:"bytes,1,rep,name=io_service_bytes_recursive,json=ioServiceBytesRecursive,proto3" json:"io_service_bytes_recursive,omitempty"` + IoServicedRecursive []*BlkIOEntry `protobuf:"bytes,2,rep,name=io_serviced_recursive,json=ioServicedRecursive,proto3" json:"io_serviced_recursive,omitempty"` + IoQueuedRecursive []*BlkIOEntry `protobuf:"bytes,3,rep,name=io_queued_recursive,json=ioQueuedRecursive,proto3" json:"io_queued_recursive,omitempty"` + IoServiceTimeRecursive []*BlkIOEntry `protobuf:"bytes,4,rep,name=io_service_time_recursive,json=ioServiceTimeRecursive,proto3" json:"io_service_time_recursive,omitempty"` + IoWaitTimeRecursive []*BlkIOEntry `protobuf:"bytes,5,rep,name=io_wait_time_recursive,json=ioWaitTimeRecursive,proto3" json:"io_wait_time_recursive,omitempty"` + IoMergedRecursive []*BlkIOEntry `protobuf:"bytes,6,rep,name=io_merged_recursive,json=ioMergedRecursive,proto3" json:"io_merged_recursive,omitempty"` + IoTimeRecursive []*BlkIOEntry `protobuf:"bytes,7,rep,name=io_time_recursive,json=ioTimeRecursive,proto3" json:"io_time_recursive,omitempty"` + SectorsRecursive []*BlkIOEntry `protobuf:"bytes,8,rep,name=sectors_recursive,json=sectorsRecursive,proto3" json:"sectors_recursive,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *BlkIOStat) Reset() { *m = BlkIOStat{} } -func (*BlkIOStat) ProtoMessage() {} -func (*BlkIOStat) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{8} } +func (m *BlkIOStat) Reset() { *m = BlkIOStat{} } +func (*BlkIOStat) ProtoMessage() {} +func (*BlkIOStat) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{8} +} +func (m *BlkIOStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlkIOStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlkIOStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BlkIOStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlkIOStat.Merge(m, src) +} +func (m *BlkIOStat) XXX_Size() int { + return m.Size() +} +func (m *BlkIOStat) XXX_DiscardUnknown() { + xxx_messageInfo_BlkIOStat.DiscardUnknown(m) +} + +var xxx_messageInfo_BlkIOStat proto.InternalMessageInfo type BlkIOEntry struct { - Op string `protobuf:"bytes,1,opt,name=op,proto3" json:"op,omitempty"` - Device string `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"` - Major uint64 `protobuf:"varint,3,opt,name=major,proto3" json:"major,omitempty"` - Minor uint64 `protobuf:"varint,4,opt,name=minor,proto3" json:"minor,omitempty"` - Value uint64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"` + Op string `protobuf:"bytes,1,opt,name=op,proto3" json:"op,omitempty"` + Device string `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"` + Major uint64 `protobuf:"varint,3,opt,name=major,proto3" json:"major,omitempty"` + Minor uint64 `protobuf:"varint,4,opt,name=minor,proto3" json:"minor,omitempty"` + Value uint64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *BlkIOEntry) Reset() { *m = BlkIOEntry{} } -func (*BlkIOEntry) ProtoMessage() {} -func (*BlkIOEntry) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{9} } +func (m *BlkIOEntry) Reset() { *m = BlkIOEntry{} } +func (*BlkIOEntry) ProtoMessage() {} +func (*BlkIOEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{9} +} +func (m *BlkIOEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlkIOEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlkIOEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BlkIOEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlkIOEntry.Merge(m, src) +} +func (m *BlkIOEntry) XXX_Size() int { + return m.Size() +} +func (m *BlkIOEntry) XXX_DiscardUnknown() { + xxx_messageInfo_BlkIOEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_BlkIOEntry proto.InternalMessageInfo type RdmaStat struct { - Current []*RdmaEntry `protobuf:"bytes,1,rep,name=current" json:"current,omitempty"` - Limit []*RdmaEntry `protobuf:"bytes,2,rep,name=limit" json:"limit,omitempty"` + Current []*RdmaEntry `protobuf:"bytes,1,rep,name=current,proto3" json:"current,omitempty"` + Limit []*RdmaEntry `protobuf:"bytes,2,rep,name=limit,proto3" json:"limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RdmaStat) Reset() { *m = RdmaStat{} } -func (*RdmaStat) ProtoMessage() {} -func (*RdmaStat) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{10} } +func (m *RdmaStat) Reset() { *m = RdmaStat{} } +func (*RdmaStat) ProtoMessage() {} +func (*RdmaStat) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{10} +} +func (m *RdmaStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RdmaStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RdmaStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RdmaStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_RdmaStat.Merge(m, src) +} +func (m *RdmaStat) XXX_Size() int { + return m.Size() +} +func (m *RdmaStat) XXX_DiscardUnknown() { + xxx_messageInfo_RdmaStat.DiscardUnknown(m) +} + +var xxx_messageInfo_RdmaStat proto.InternalMessageInfo type RdmaEntry struct { - Device string `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` - HcaHandles uint32 `protobuf:"varint,2,opt,name=hca_handles,json=hcaHandles,proto3" json:"hca_handles,omitempty"` - HcaObjects uint32 `protobuf:"varint,3,opt,name=hca_objects,json=hcaObjects,proto3" json:"hca_objects,omitempty"` + Device string `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` + HcaHandles uint32 `protobuf:"varint,2,opt,name=hca_handles,json=hcaHandles,proto3" json:"hca_handles,omitempty"` + HcaObjects uint32 `protobuf:"varint,3,opt,name=hca_objects,json=hcaObjects,proto3" json:"hca_objects,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RdmaEntry) Reset() { *m = RdmaEntry{} } -func (*RdmaEntry) ProtoMessage() {} -func (*RdmaEntry) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{11} } +func (m *RdmaEntry) Reset() { *m = RdmaEntry{} } +func (*RdmaEntry) ProtoMessage() {} +func (*RdmaEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{11} +} +func (m *RdmaEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RdmaEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RdmaEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RdmaEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_RdmaEntry.Merge(m, src) +} +func (m *RdmaEntry) XXX_Size() int { + return m.Size() +} +func (m *RdmaEntry) XXX_DiscardUnknown() { + xxx_messageInfo_RdmaEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_RdmaEntry proto.InternalMessageInfo type NetworkStat struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - RxBytes uint64 `protobuf:"varint,2,opt,name=rx_bytes,json=rxBytes,proto3" json:"rx_bytes,omitempty"` - RxPackets uint64 `protobuf:"varint,3,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"` - RxErrors uint64 `protobuf:"varint,4,opt,name=rx_errors,json=rxErrors,proto3" json:"rx_errors,omitempty"` - RxDropped uint64 `protobuf:"varint,5,opt,name=rx_dropped,json=rxDropped,proto3" json:"rx_dropped,omitempty"` - TxBytes uint64 `protobuf:"varint,6,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"` - TxPackets uint64 `protobuf:"varint,7,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"` - TxErrors uint64 `protobuf:"varint,8,opt,name=tx_errors,json=txErrors,proto3" json:"tx_errors,omitempty"` - TxDropped uint64 `protobuf:"varint,9,opt,name=tx_dropped,json=txDropped,proto3" json:"tx_dropped,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + RxBytes uint64 `protobuf:"varint,2,opt,name=rx_bytes,json=rxBytes,proto3" json:"rx_bytes,omitempty"` + RxPackets uint64 `protobuf:"varint,3,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"` + RxErrors uint64 `protobuf:"varint,4,opt,name=rx_errors,json=rxErrors,proto3" json:"rx_errors,omitempty"` + RxDropped uint64 `protobuf:"varint,5,opt,name=rx_dropped,json=rxDropped,proto3" json:"rx_dropped,omitempty"` + TxBytes uint64 `protobuf:"varint,6,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"` + TxPackets uint64 `protobuf:"varint,7,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"` + TxErrors uint64 `protobuf:"varint,8,opt,name=tx_errors,json=txErrors,proto3" json:"tx_errors,omitempty"` + TxDropped uint64 `protobuf:"varint,9,opt,name=tx_dropped,json=txDropped,proto3" json:"tx_dropped,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *NetworkStat) Reset() { *m = NetworkStat{} } -func (*NetworkStat) ProtoMessage() {} -func (*NetworkStat) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{12} } +func (m *NetworkStat) Reset() { *m = NetworkStat{} } +func (*NetworkStat) ProtoMessage() {} +func (*NetworkStat) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{12} +} +func (m *NetworkStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NetworkStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NetworkStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NetworkStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkStat.Merge(m, src) +} +func (m *NetworkStat) XXX_Size() int { + return m.Size() +} +func (m *NetworkStat) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkStat.DiscardUnknown(m) +} + +var xxx_messageInfo_NetworkStat proto.InternalMessageInfo + +// CgroupStats exports per-cgroup statistics. +type CgroupStats struct { + // number of tasks sleeping + NrSleeping uint64 `protobuf:"varint,1,opt,name=nr_sleeping,json=nrSleeping,proto3" json:"nr_sleeping,omitempty"` + // number of tasks running + NrRunning uint64 `protobuf:"varint,2,opt,name=nr_running,json=nrRunning,proto3" json:"nr_running,omitempty"` + // number of tasks in stopped state + NrStopped uint64 `protobuf:"varint,3,opt,name=nr_stopped,json=nrStopped,proto3" json:"nr_stopped,omitempty"` + // number of tasks in uninterruptible state + NrUninterruptible uint64 `protobuf:"varint,4,opt,name=nr_uninterruptible,json=nrUninterruptible,proto3" json:"nr_uninterruptible,omitempty"` + // number of tasks waiting on IO + NrIoWait uint64 `protobuf:"varint,5,opt,name=nr_io_wait,json=nrIoWait,proto3" json:"nr_io_wait,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CgroupStats) Reset() { *m = CgroupStats{} } +func (*CgroupStats) ProtoMessage() {} +func (*CgroupStats) Descriptor() ([]byte, []int) { + return fileDescriptor_a17b2d87c332bfaa, []int{13} +} +func (m *CgroupStats) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CgroupStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CgroupStats.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CgroupStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_CgroupStats.Merge(m, src) +} +func (m *CgroupStats) XXX_Size() int { + return m.Size() +} +func (m *CgroupStats) XXX_DiscardUnknown() { + xxx_messageInfo_CgroupStats.DiscardUnknown(m) +} + +var xxx_messageInfo_CgroupStats proto.InternalMessageInfo func init() { proto.RegisterType((*Metrics)(nil), "io.containerd.cgroups.v1.Metrics") @@ -240,7 +672,122 @@ func init() { proto.RegisterType((*RdmaStat)(nil), "io.containerd.cgroups.v1.RdmaStat") proto.RegisterType((*RdmaEntry)(nil), "io.containerd.cgroups.v1.RdmaEntry") proto.RegisterType((*NetworkStat)(nil), "io.containerd.cgroups.v1.NetworkStat") + proto.RegisterType((*CgroupStats)(nil), "io.containerd.cgroups.v1.CgroupStats") } + +func init() { + proto.RegisterFile("github.com/containerd/cgroups/stats/v1/metrics.proto", fileDescriptor_a17b2d87c332bfaa) +} + +var fileDescriptor_a17b2d87c332bfaa = []byte{ + // 1669 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x58, 0x4f, 0x73, 0x1b, 0xb7, + 0x15, 0x0f, 0xc5, 0x95, 0xc8, 0x7d, 0x94, 0x6c, 0x09, 0xfe, 0xb7, 0x52, 0x1c, 0x51, 0xa1, 0xec, + 0xd6, 0xad, 0xa7, 0xd2, 0x24, 0xed, 0x78, 0xea, 0x34, 0x99, 0x4e, 0xa4, 0x24, 0x63, 0x4f, 0xab, + 0x9a, 0x59, 0x4a, 0x93, 0xf6, 0xb4, 0x03, 0x2e, 0xe1, 0x25, 0xac, 0xe5, 0x62, 0x83, 0xc5, 0x52, + 0x74, 0x4f, 0x3d, 0x74, 0xa6, 0xa7, 0x7e, 0xa0, 0x7e, 0x83, 0x1c, 0x7b, 0xe9, 0x4c, 0x7b, 0xd1, + 0x34, 0xfc, 0x1c, 0x3d, 0x74, 0x80, 0x87, 0xfd, 0x43, 0xc7, 0xb2, 0xc2, 0xdb, 0xe2, 0xe1, 0xf7, + 0x7e, 0xef, 0xe1, 0xe1, 0x07, 0xe0, 0x91, 0xf0, 0xab, 0x88, 0xab, 0x71, 0x3e, 0x3c, 0x08, 0xc5, + 0xe4, 0x30, 0x14, 0x89, 0xa2, 0x3c, 0x61, 0x72, 0x74, 0x18, 0x46, 0x52, 0xe4, 0x69, 0x76, 0x98, + 0x29, 0xaa, 0xb2, 0xc3, 0xe9, 0x47, 0x87, 0x13, 0xa6, 0x24, 0x0f, 0xb3, 0x83, 0x54, 0x0a, 0x25, + 0x88, 0xc7, 0xc5, 0x41, 0x85, 0x3e, 0xb0, 0xe8, 0x83, 0xe9, 0x47, 0x3b, 0xb7, 0x23, 0x11, 0x09, + 0x03, 0x3a, 0xd4, 0x5f, 0x88, 0xef, 0xfd, 0xaf, 0x09, 0xad, 0x13, 0x64, 0x20, 0xbf, 0x85, 0xd6, + 0x38, 0x8f, 0x98, 0x8a, 0x87, 0x5e, 0x63, 0xaf, 0xf9, 0xa8, 0xf3, 0xf1, 0xc3, 0x83, 0xab, 0xd8, + 0x0e, 0x9e, 0x21, 0x70, 0xa0, 0xa8, 0xf2, 0x0b, 0x2f, 0xf2, 0x04, 0x9c, 0x94, 0x8f, 0x32, 0x6f, + 0x65, 0xaf, 0xf1, 0xa8, 0xf3, 0x71, 0xef, 0x6a, 0xef, 0x3e, 0x1f, 0x65, 0xc6, 0xd5, 0xe0, 0xc9, + 0xa7, 0xd0, 0x0c, 0xd3, 0xdc, 0x6b, 0x1a, 0xb7, 0x0f, 0xaf, 0x76, 0x3b, 0xee, 0x9f, 0x69, 0xaf, + 0xa3, 0xd6, 0xfc, 0xb2, 0xdb, 0x3c, 0xee, 0x9f, 0xf9, 0xda, 0x8d, 0x7c, 0x0a, 0x6b, 0x13, 0x36, + 0x11, 0xf2, 0xb5, 0xe7, 0x18, 0x82, 0x07, 0x57, 0x13, 0x9c, 0x18, 0x9c, 0x89, 0x6c, 0x7d, 0xc8, + 0x53, 0x58, 0x1d, 0xc6, 0xe7, 0x5c, 0x78, 0xab, 0xc6, 0x79, 0xff, 0x6a, 0xe7, 0xa3, 0xf8, 0xfc, + 0xf9, 0x0b, 0xe3, 0x8b, 0x1e, 0x7a, 0xb9, 0x72, 0x34, 0xa1, 0xde, 0xda, 0x75, 0xcb, 0xf5, 0x47, + 0x13, 0x8a, 0xcb, 0xd5, 0x78, 0x5d, 0xe7, 0x84, 0xa9, 0x0b, 0x21, 0xcf, 0xbd, 0xd6, 0x75, 0x75, + 0xfe, 0x03, 0x02, 0xb1, 0xce, 0xd6, 0x8b, 0x3c, 0x83, 0x75, 0x84, 0x04, 0x46, 0x05, 0x5e, 0xdb, + 0x24, 0xf0, 0x0e, 0x96, 0x63, 0xf3, 0xa9, 0x49, 0x32, 0xbf, 0x13, 0x56, 0x83, 0xde, 0x39, 0x74, + 0x6a, 0x3b, 0x49, 0x6e, 0xc3, 0x6a, 0x9e, 0xd1, 0x88, 0x79, 0x8d, 0xbd, 0xc6, 0x23, 0xc7, 0xc7, + 0x01, 0xd9, 0x84, 0xe6, 0x84, 0xce, 0xcc, 0xae, 0x3a, 0xbe, 0xfe, 0x24, 0x1e, 0xb4, 0x5e, 0x52, + 0x1e, 0x87, 0x89, 0x32, 0x9b, 0xe6, 0xf8, 0xc5, 0x90, 0xec, 0x40, 0x3b, 0xa5, 0x11, 0xcb, 0xf8, + 0x9f, 0x99, 0xd9, 0x0e, 0xd7, 0x2f, 0xc7, 0xbd, 0x4f, 0xa0, 0x5d, 0x6c, 0xbc, 0x66, 0x08, 0x73, + 0x29, 0x59, 0xa2, 0x6c, 0xac, 0x62, 0xa8, 0x73, 0x88, 0xf9, 0x84, 0x2b, 0x1b, 0x0f, 0x07, 0xbd, + 0xbf, 0x35, 0xa0, 0x65, 0xb7, 0x9f, 0xfc, 0xba, 0x9e, 0xe5, 0x3b, 0x0b, 0x7f, 0xdc, 0x3f, 0x3b, + 0xd3, 0xc8, 0x62, 0x25, 0x47, 0x00, 0x6a, 0x2c, 0x85, 0x52, 0x31, 0x4f, 0xa2, 0xeb, 0x65, 0x7a, + 0x8a, 0x58, 0xe6, 0xd7, 0xbc, 0x7a, 0xdf, 0x42, 0xbb, 0xa0, 0xd5, 0xb9, 0x2a, 0xa1, 0x68, 0x5c, + 0xd4, 0xcb, 0x0c, 0xc8, 0x5d, 0x58, 0x3b, 0x67, 0x32, 0x61, 0xb1, 0x5d, 0x82, 0x1d, 0x11, 0x02, + 0x4e, 0x9e, 0x31, 0x69, 0x4b, 0x66, 0xbe, 0xc9, 0x3e, 0xb4, 0x52, 0x26, 0x03, 0x2d, 0x7f, 0x67, + 0xaf, 0xf9, 0xc8, 0x39, 0x82, 0xf9, 0x65, 0x77, 0xad, 0xcf, 0xa4, 0x96, 0xf7, 0x5a, 0xca, 0xe4, + 0x71, 0x9a, 0xf7, 0x66, 0xd0, 0x2e, 0x52, 0xd1, 0x85, 0x4b, 0x99, 0xe4, 0x62, 0x94, 0x15, 0x85, + 0xb3, 0x43, 0xf2, 0x18, 0xb6, 0x6c, 0x9a, 0x6c, 0x14, 0x14, 0x18, 0xcc, 0x60, 0xb3, 0x9c, 0xe8, + 0x5b, 0xf0, 0x43, 0xb8, 0x51, 0x81, 0x15, 0x9f, 0x30, 0x9b, 0xd5, 0x46, 0x69, 0x3d, 0xe5, 0x13, + 0xd6, 0xfb, 0x4f, 0x07, 0xa0, 0x3a, 0x34, 0x7a, 0xbd, 0x21, 0x0d, 0xc7, 0xa5, 0x3e, 0xcc, 0x80, + 0x6c, 0x43, 0x53, 0x66, 0x36, 0x14, 0x9e, 0x4d, 0x7f, 0x30, 0xf0, 0xb5, 0x8d, 0xfc, 0x04, 0xda, + 0x32, 0xcb, 0x02, 0x7d, 0x41, 0x60, 0x80, 0xa3, 0xce, 0xfc, 0xb2, 0xdb, 0xf2, 0x07, 0x03, 0x2d, + 0x3b, 0xbf, 0x25, 0xb3, 0x4c, 0x7f, 0x90, 0x2e, 0x74, 0x26, 0x34, 0x4d, 0xd9, 0x28, 0x78, 0xc9, + 0x63, 0x54, 0x8e, 0xe3, 0x03, 0x9a, 0xbe, 0xe2, 0xb1, 0xa9, 0xf4, 0x88, 0x4b, 0xf5, 0xda, 0x1c, + 0x53, 0xc7, 0xc7, 0x01, 0xb9, 0x0f, 0xee, 0x85, 0xe4, 0x8a, 0x0d, 0x69, 0x78, 0x6e, 0x8e, 0xa1, + 0xe3, 0x57, 0x06, 0xe2, 0x41, 0x3b, 0x8d, 0x82, 0x34, 0x0a, 0x78, 0xe2, 0xb5, 0x70, 0x27, 0xd2, + 0xa8, 0x1f, 0x3d, 0x4f, 0xc8, 0x0e, 0xb8, 0x38, 0x23, 0x72, 0x65, 0x4e, 0x8f, 0x2e, 0x63, 0xd4, + 0x8f, 0x5e, 0xe4, 0x8a, 0x6c, 0x1b, 0xaf, 0x97, 0x34, 0x8f, 0x95, 0xe7, 0x16, 0x53, 0x5f, 0xe9, + 0x21, 0xd9, 0x83, 0xf5, 0x34, 0x0a, 0x26, 0xf4, 0x95, 0x9d, 0x06, 0x4c, 0x33, 0x8d, 0x4e, 0xe8, + 0x2b, 0x44, 0xec, 0xc3, 0x06, 0x4f, 0x68, 0xa8, 0xf8, 0x94, 0x05, 0x34, 0x11, 0x89, 0xd7, 0x31, + 0x90, 0xf5, 0xc2, 0xf8, 0x79, 0x22, 0x12, 0xbd, 0xd8, 0x3a, 0x64, 0x1d, 0x59, 0x6a, 0x80, 0x3a, + 0x8b, 0xa9, 0xc7, 0xc6, 0x22, 0x8b, 0xa9, 0x48, 0xc5, 0x62, 0x20, 0x37, 0xea, 0x2c, 0x06, 0xb0, + 0x07, 0x9d, 0x3c, 0x61, 0x53, 0x1e, 0x2a, 0x3a, 0x8c, 0x99, 0x77, 0xd3, 0x00, 0xea, 0x26, 0xf2, + 0x09, 0x6c, 0x8f, 0x39, 0x93, 0x54, 0x86, 0x63, 0x1e, 0xd2, 0x38, 0xc0, 0x2b, 0x31, 0xc0, 0xe3, + 0xb7, 0x69, 0xf0, 0xf7, 0xea, 0x00, 0x54, 0xc2, 0xef, 0xf5, 0x34, 0x79, 0x02, 0x0b, 0x53, 0x41, + 0x76, 0x41, 0x53, 0xeb, 0xb9, 0x65, 0x3c, 0xef, 0xd4, 0xa7, 0x07, 0x17, 0x34, 0x45, 0xbf, 0x2e, + 0x74, 0xcc, 0x29, 0x09, 0x50, 0x48, 0x04, 0xd3, 0x36, 0xa6, 0x63, 0xa3, 0xa6, 0x9f, 0x81, 0x8b, + 0x00, 0xad, 0xa9, 0x5b, 0x46, 0x33, 0xeb, 0xf3, 0xcb, 0x6e, 0xfb, 0x54, 0x1b, 0xb5, 0xb0, 0xda, + 0x66, 0xda, 0xcf, 0x32, 0xf2, 0x04, 0x6e, 0x94, 0x50, 0xd4, 0xd8, 0x6d, 0x83, 0xdf, 0x9c, 0x5f, + 0x76, 0xd7, 0x0b, 0xbc, 0x11, 0xda, 0x7a, 0xe1, 0x63, 0xd4, 0xf6, 0x73, 0xd8, 0x42, 0xbf, 0xba, + 0xe6, 0xee, 0x98, 0x4c, 0x6e, 0x9a, 0x89, 0x93, 0x4a, 0x78, 0x65, 0xbe, 0x28, 0xbf, 0xbb, 0xb5, + 0x7c, 0xbf, 0x30, 0x1a, 0xfc, 0x29, 0xa0, 0x4f, 0x50, 0x29, 0xf1, 0x9e, 0x01, 0x61, 0x6e, 0xdf, + 0x94, 0x72, 0xdc, 0x2f, 0xb2, 0x2d, 0x45, 0xe9, 0xe1, 0x96, 0x18, 0x6b, 0x1f, 0x95, 0xf9, 0xb0, + 0x60, 0xab, 0xf4, 0xb9, 0x8d, 0x9b, 0x5f, 0xa2, 0xb4, 0x48, 0x1f, 0xd4, 0xb8, 0x50, 0x8b, 0x3b, + 0x0b, 0x28, 0x54, 0xe3, 0x63, 0x20, 0x25, 0xaa, 0x52, 0xed, 0xfb, 0xb5, 0x85, 0xf6, 0x2b, 0xe9, + 0x1e, 0xc0, 0x2d, 0x04, 0x2f, 0x0a, 0xf8, 0xbe, 0x41, 0x63, 0xbd, 0x9e, 0xd7, 0x55, 0x5c, 0x16, + 0xb1, 0x8e, 0xfe, 0xa0, 0xc6, 0xfd, 0x79, 0x85, 0xfd, 0x21, 0xb7, 0x29, 0xf9, 0xee, 0x5b, 0xb8, + 0x4d, 0xd1, 0xdf, 0xe4, 0x36, 0xe8, 0xee, 0x0f, 0xb8, 0x0d, 0xf6, 0x71, 0x81, 0xad, 0x8b, 0x7d, + 0xcf, 0x5e, 0x7b, 0x7a, 0xe2, 0xac, 0xa6, 0xf8, 0xdf, 0x14, 0x4f, 0xc7, 0x87, 0xd7, 0x3d, 0x99, + 0xa8, 0xf5, 0x2f, 0x13, 0x25, 0x5f, 0x17, 0xaf, 0xc7, 0x53, 0x70, 0xb4, 0xca, 0xbd, 0xde, 0x32, + 0xbe, 0xc6, 0x85, 0x7c, 0x56, 0x3e, 0x09, 0xfb, 0xcb, 0x38, 0x17, 0x2f, 0xc7, 0x00, 0x00, 0xbf, + 0x02, 0x15, 0xa6, 0xde, 0x83, 0x25, 0x28, 0x8e, 0x36, 0xe6, 0x97, 0x5d, 0xf7, 0x77, 0xc6, 0xf9, + 0xf4, 0xb8, 0xef, 0xbb, 0xc8, 0x73, 0x1a, 0xa6, 0x3d, 0x06, 0x9d, 0x1a, 0xb0, 0x7a, 0x77, 0x1b, + 0xb5, 0x77, 0xb7, 0xea, 0x08, 0x56, 0xde, 0xd2, 0x11, 0x34, 0xdf, 0xda, 0x11, 0x38, 0x0b, 0x1d, + 0x41, 0xef, 0x5f, 0xab, 0xe0, 0x96, 0xad, 0x13, 0xa1, 0xb0, 0xc3, 0x45, 0x90, 0x31, 0x39, 0xe5, + 0x21, 0x0b, 0x86, 0xaf, 0x15, 0xcb, 0x02, 0xc9, 0xc2, 0x5c, 0x66, 0x7c, 0xca, 0x6c, 0xdb, 0xf9, + 0xe0, 0x9a, 0x1e, 0x0c, 0x6b, 0x73, 0x8f, 0x8b, 0x01, 0xd2, 0x1c, 0x69, 0x16, 0xbf, 0x20, 0x21, + 0x7f, 0x84, 0x3b, 0x55, 0x88, 0x51, 0x8d, 0x7d, 0x65, 0x09, 0xf6, 0x5b, 0x25, 0xfb, 0xa8, 0x62, + 0x3e, 0x85, 0x5b, 0x5c, 0x04, 0xdf, 0xe6, 0x2c, 0x5f, 0xe0, 0x6d, 0x2e, 0xc1, 0xbb, 0xc5, 0xc5, + 0xd7, 0xc6, 0xbf, 0x62, 0x0d, 0x60, 0xbb, 0x56, 0x12, 0xfd, 0x16, 0xd7, 0xb8, 0x9d, 0x25, 0xb8, + 0xef, 0x96, 0x39, 0xeb, 0xb7, 0xbb, 0x0a, 0xf0, 0x27, 0xb8, 0xcb, 0x45, 0x70, 0x41, 0xb9, 0x7a, + 0x93, 0x7d, 0x75, 0xb9, 0x8a, 0x7c, 0x43, 0xb9, 0x5a, 0xa4, 0xc6, 0x8a, 0x4c, 0x98, 0x8c, 0x16, + 0x2a, 0xb2, 0xb6, 0x5c, 0x45, 0x4e, 0x8c, 0x7f, 0xc5, 0xda, 0x87, 0x2d, 0x2e, 0xde, 0xcc, 0xb5, + 0xb5, 0x04, 0xe7, 0x4d, 0x2e, 0x16, 0xf3, 0xfc, 0x1a, 0xb6, 0x32, 0x16, 0x2a, 0x21, 0xeb, 0x6a, + 0x6b, 0x2f, 0xc1, 0xb8, 0x69, 0xdd, 0x4b, 0xca, 0xde, 0x14, 0xa0, 0x9a, 0x27, 0x37, 0x60, 0x45, + 0xa4, 0xe6, 0xe8, 0xb8, 0xfe, 0x8a, 0x48, 0x75, 0x0f, 0x38, 0xd2, 0xd7, 0x0e, 0x1e, 0x1c, 0xd7, + 0xb7, 0x23, 0x7d, 0x9e, 0x26, 0xf4, 0x95, 0x28, 0x9a, 0x40, 0x1c, 0x18, 0x2b, 0x4f, 0x84, 0xb4, + 0x67, 0x07, 0x07, 0xda, 0x3a, 0xa5, 0x71, 0xce, 0x8a, 0x9e, 0xc7, 0x0c, 0x7a, 0x7f, 0x6d, 0x40, + 0xbb, 0xf8, 0x41, 0x41, 0x3e, 0xab, 0xb7, 0xd1, 0xcd, 0x77, 0xff, 0x7e, 0xd1, 0x4e, 0xb8, 0x98, + 0xb2, 0xd7, 0x7e, 0x5a, 0xf5, 0xda, 0x3f, 0xda, 0xd9, 0x36, 0xe4, 0x0c, 0xdc, 0xd2, 0x56, 0x5b, + 0x6d, 0x63, 0x61, 0xb5, 0x5d, 0xe8, 0x8c, 0x43, 0x1a, 0x8c, 0x69, 0x32, 0x8a, 0x19, 0x76, 0x88, + 0x1b, 0x3e, 0x8c, 0x43, 0xfa, 0x0c, 0x2d, 0x05, 0x40, 0x0c, 0x5f, 0xb1, 0x50, 0x65, 0xa6, 0x28, + 0x08, 0x78, 0x81, 0x96, 0xde, 0xdf, 0x57, 0xa0, 0x53, 0xfb, 0x0d, 0xa4, 0x7b, 0xe8, 0x84, 0x4e, + 0x8a, 0x38, 0xe6, 0x5b, 0x77, 0x6c, 0x72, 0x86, 0x77, 0x89, 0xbd, 0xa6, 0x5a, 0x72, 0x66, 0x2e, + 0x05, 0xf2, 0x01, 0x80, 0x9c, 0x05, 0x29, 0x0d, 0xcf, 0x99, 0xa5, 0x77, 0x7c, 0x57, 0xce, 0xfa, + 0x68, 0x20, 0xef, 0x83, 0x2b, 0x67, 0x01, 0x93, 0x52, 0xc8, 0xcc, 0xd6, 0xbe, 0x2d, 0x67, 0x5f, + 0x9a, 0xb1, 0xf5, 0x1d, 0x49, 0xa1, 0x7b, 0x01, 0xbb, 0x07, 0xae, 0x9c, 0x7d, 0x81, 0x06, 0x1d, + 0x55, 0x15, 0x51, 0xb1, 0xf5, 0x6c, 0xa9, 0x2a, 0xaa, 0xaa, 0xa2, 0x62, 0xeb, 0xe9, 0xaa, 0x7a, + 0x54, 0x55, 0x46, 0xc5, 0xee, 0xb3, 0xad, 0x6a, 0x51, 0x55, 0x15, 0xd5, 0x2d, 0x7c, 0x6d, 0xd4, + 0xde, 0x3f, 0x1a, 0xd0, 0xa9, 0xfd, 0x9a, 0xd3, 0x05, 0x4c, 0x64, 0x90, 0xc5, 0x8c, 0xa5, 0xfa, + 0x27, 0x0d, 0xde, 0xdd, 0x90, 0xc8, 0x81, 0xb5, 0x68, 0xbe, 0x44, 0x06, 0x32, 0x4f, 0x92, 0xe2, + 0x27, 0x8f, 0xe3, 0xbb, 0x89, 0xf4, 0xd1, 0x60, 0xa7, 0x33, 0x85, 0xe1, 0x9a, 0xc5, 0xf4, 0x00, + 0x0d, 0xe4, 0x17, 0x40, 0x12, 0x19, 0xe4, 0x09, 0x4f, 0x14, 0x93, 0x32, 0x4f, 0x15, 0x1f, 0x96, + 0xed, 0xf9, 0x56, 0x22, 0xcf, 0x16, 0x27, 0xc8, 0x7d, 0xc3, 0x66, 0x2f, 0x1b, 0x5b, 0xb2, 0x76, + 0x22, 0x9f, 0x9b, 0x9b, 0xe3, 0xc8, 0xfb, 0xee, 0xfb, 0xdd, 0xf7, 0xfe, 0xfd, 0xfd, 0xee, 0x7b, + 0x7f, 0x99, 0xef, 0x36, 0xbe, 0x9b, 0xef, 0x36, 0xfe, 0x39, 0xdf, 0x6d, 0xfc, 0x77, 0xbe, 0xdb, + 0x18, 0xae, 0x99, 0x3f, 0x23, 0x7e, 0xf9, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x78, 0x66, + 0x06, 0xf4, 0x10, 0x00, 0x00, +} + func (m *Metrics) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -330,6 +877,19 @@ func (m *Metrics) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.CgroupStats != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.CgroupStats.Size())) + n6, err := m.CgroupStats.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -369,6 +929,9 @@ func (m *HugetlbStat) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintMetrics(dAtA, i, uint64(len(m.Pagesize))) i += copy(dAtA[i:], m.Pagesize) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -397,6 +960,9 @@ func (m *PidsStat) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintMetrics(dAtA, i, uint64(m.Limit)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -419,21 +985,24 @@ func (m *CPUStat) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintMetrics(dAtA, i, uint64(m.Usage.Size())) - n6, err := m.Usage.MarshalTo(dAtA[i:]) + n7, err := m.Usage.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n6 + i += n7 } if m.Throttling != nil { dAtA[i] = 0x12 i++ i = encodeVarintMetrics(dAtA, i, uint64(m.Throttling.Size())) - n7, err := m.Throttling.MarshalTo(dAtA[i:]) + n8, err := m.Throttling.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n7 + i += n8 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } @@ -469,21 +1038,24 @@ func (m *CPUUsage) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintMetrics(dAtA, i, uint64(m.User)) } if len(m.PerCPU) > 0 { - dAtA9 := make([]byte, len(m.PerCPU)*10) - var j8 int + dAtA10 := make([]byte, len(m.PerCPU)*10) + var j9 int for _, num := range m.PerCPU { for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j8++ + j9++ } - dAtA9[j8] = uint8(num) - j8++ + dAtA10[j9] = uint8(num) + j9++ } dAtA[i] = 0x22 i++ - i = encodeVarintMetrics(dAtA, i, uint64(j8)) - i += copy(dAtA[i:], dAtA9[:j8]) + i = encodeVarintMetrics(dAtA, i, uint64(j9)) + i += copy(dAtA[i:], dAtA10[:j9]) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } @@ -518,6 +1090,9 @@ func (m *Throttle) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintMetrics(dAtA, i, uint64(m.ThrottledTime)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -736,11 +1311,11 @@ func (m *MemoryStat) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2 i++ i = encodeVarintMetrics(dAtA, i, uint64(m.Usage.Size())) - n10, err := m.Usage.MarshalTo(dAtA[i:]) + n11, err := m.Usage.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n11 } if m.Swap != nil { dAtA[i] = 0x92 @@ -748,11 +1323,11 @@ func (m *MemoryStat) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2 i++ i = encodeVarintMetrics(dAtA, i, uint64(m.Swap.Size())) - n11, err := m.Swap.MarshalTo(dAtA[i:]) + n12, err := m.Swap.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n12 } if m.Kernel != nil { dAtA[i] = 0x9a @@ -760,11 +1335,11 @@ func (m *MemoryStat) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2 i++ i = encodeVarintMetrics(dAtA, i, uint64(m.Kernel.Size())) - n12, err := m.Kernel.MarshalTo(dAtA[i:]) + n13, err := m.Kernel.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n13 } if m.KernelTCP != nil { dAtA[i] = 0xa2 @@ -772,11 +1347,14 @@ func (m *MemoryStat) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2 i++ i = encodeVarintMetrics(dAtA, i, uint64(m.KernelTCP.Size())) - n13, err := m.KernelTCP.MarshalTo(dAtA[i:]) + n14, err := m.KernelTCP.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n14 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) } return i, nil } @@ -816,6 +1394,9 @@ func (m *MemoryEntry) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintMetrics(dAtA, i, uint64(m.Failcnt)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -930,6 +1511,9 @@ func (m *BlkIOStat) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -975,6 +1559,9 @@ func (m *BlkIOEntry) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintMetrics(dAtA, i, uint64(m.Value)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -1017,6 +1604,9 @@ func (m *RdmaStat) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -1051,6 +1641,9 @@ func (m *RdmaEntry) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintMetrics(dAtA, i, uint64(m.HcaObjects)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -1115,6 +1708,55 @@ func (m *NetworkStat) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintMetrics(dAtA, i, uint64(m.TxDropped)) } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CgroupStats) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CgroupStats) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NrSleeping != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.NrSleeping)) + } + if m.NrRunning != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.NrRunning)) + } + if m.NrStopped != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.NrStopped)) + } + if m.NrUninterruptible != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.NrUninterruptible)) + } + if m.NrIoWait != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.NrIoWait)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } return i, nil } @@ -1128,6 +1770,9 @@ func encodeVarintMetrics(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *Metrics) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Hugetlb) > 0 { @@ -1162,10 +1807,20 @@ func (m *Metrics) Size() (n int) { n += 1 + l + sovMetrics(uint64(l)) } } + if m.CgroupStats != nil { + l = m.CgroupStats.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *HugetlbStat) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Usage != 0 { @@ -1181,10 +1836,16 @@ func (m *HugetlbStat) Size() (n int) { if l > 0 { n += 1 + l + sovMetrics(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *PidsStat) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Current != 0 { @@ -1193,10 +1854,16 @@ func (m *PidsStat) Size() (n int) { if m.Limit != 0 { n += 1 + sovMetrics(uint64(m.Limit)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *CPUStat) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Usage != nil { @@ -1207,10 +1874,16 @@ func (m *CPUStat) Size() (n int) { l = m.Throttling.Size() n += 1 + l + sovMetrics(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *CPUUsage) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Total != 0 { @@ -1229,10 +1902,16 @@ func (m *CPUUsage) Size() (n int) { } n += 1 + sovMetrics(uint64(l)) + l } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *Throttle) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Periods != 0 { @@ -1244,10 +1923,16 @@ func (m *Throttle) Size() (n int) { if m.ThrottledTime != 0 { n += 1 + sovMetrics(uint64(m.ThrottledTime)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *MemoryStat) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Cache != 0 { @@ -1362,10 +2047,16 @@ func (m *MemoryStat) Size() (n int) { l = m.KernelTCP.Size() n += 2 + l + sovMetrics(uint64(l)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *MemoryEntry) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Limit != 0 { @@ -1380,10 +2071,16 @@ func (m *MemoryEntry) Size() (n int) { if m.Failcnt != 0 { n += 1 + sovMetrics(uint64(m.Failcnt)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *BlkIOStat) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.IoServiceBytesRecursive) > 0 { @@ -1434,10 +2131,16 @@ func (m *BlkIOStat) Size() (n int) { n += 1 + l + sovMetrics(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *BlkIOEntry) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Op) @@ -1457,10 +2160,16 @@ func (m *BlkIOEntry) Size() (n int) { if m.Value != 0 { n += 1 + sovMetrics(uint64(m.Value)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *RdmaStat) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Current) > 0 { @@ -1475,10 +2184,16 @@ func (m *RdmaStat) Size() (n int) { n += 1 + l + sovMetrics(uint64(l)) } } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *RdmaEntry) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Device) @@ -1491,10 +2206,16 @@ func (m *RdmaEntry) Size() (n int) { if m.HcaObjects != 0 { n += 1 + sovMetrics(uint64(m.HcaObjects)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } func (m *NetworkStat) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -1525,6 +2246,36 @@ func (m *NetworkStat) Size() (n int) { if m.TxDropped != 0 { n += 1 + sovMetrics(uint64(m.TxDropped)) } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CgroupStats) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NrSleeping != 0 { + n += 1 + sovMetrics(uint64(m.NrSleeping)) + } + if m.NrRunning != 0 { + n += 1 + sovMetrics(uint64(m.NrRunning)) + } + if m.NrStopped != 0 { + n += 1 + sovMetrics(uint64(m.NrStopped)) + } + if m.NrUninterruptible != 0 { + n += 1 + sovMetrics(uint64(m.NrUninterruptible)) + } + if m.NrIoWait != 0 { + n += 1 + sovMetrics(uint64(m.NrIoWait)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } return n } @@ -1553,6 +2304,8 @@ func (this *Metrics) String() string { `Blkio:` + strings.Replace(fmt.Sprintf("%v", this.Blkio), "BlkIOStat", "BlkIOStat", 1) + `,`, `Rdma:` + strings.Replace(fmt.Sprintf("%v", this.Rdma), "RdmaStat", "RdmaStat", 1) + `,`, `Network:` + strings.Replace(fmt.Sprintf("%v", this.Network), "NetworkStat", "NetworkStat", 1) + `,`, + `CgroupStats:` + strings.Replace(fmt.Sprintf("%v", this.CgroupStats), "CgroupStats", "CgroupStats", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1566,6 +2319,7 @@ func (this *HugetlbStat) String() string { `Max:` + fmt.Sprintf("%v", this.Max) + `,`, `Failcnt:` + fmt.Sprintf("%v", this.Failcnt) + `,`, `Pagesize:` + fmt.Sprintf("%v", this.Pagesize) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1577,6 +2331,7 @@ func (this *PidsStat) String() string { s := strings.Join([]string{`&PidsStat{`, `Current:` + fmt.Sprintf("%v", this.Current) + `,`, `Limit:` + fmt.Sprintf("%v", this.Limit) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1588,6 +2343,7 @@ func (this *CPUStat) String() string { s := strings.Join([]string{`&CPUStat{`, `Usage:` + strings.Replace(fmt.Sprintf("%v", this.Usage), "CPUUsage", "CPUUsage", 1) + `,`, `Throttling:` + strings.Replace(fmt.Sprintf("%v", this.Throttling), "Throttle", "Throttle", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1601,6 +2357,7 @@ func (this *CPUUsage) String() string { `Kernel:` + fmt.Sprintf("%v", this.Kernel) + `,`, `User:` + fmt.Sprintf("%v", this.User) + `,`, `PerCPU:` + fmt.Sprintf("%v", this.PerCPU) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1613,6 +2370,7 @@ func (this *Throttle) String() string { `Periods:` + fmt.Sprintf("%v", this.Periods) + `,`, `ThrottledPeriods:` + fmt.Sprintf("%v", this.ThrottledPeriods) + `,`, `ThrottledTime:` + fmt.Sprintf("%v", this.ThrottledTime) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1658,6 +2416,7 @@ func (this *MemoryStat) String() string { `Swap:` + strings.Replace(fmt.Sprintf("%v", this.Swap), "MemoryEntry", "MemoryEntry", 1) + `,`, `Kernel:` + strings.Replace(fmt.Sprintf("%v", this.Kernel), "MemoryEntry", "MemoryEntry", 1) + `,`, `KernelTCP:` + strings.Replace(fmt.Sprintf("%v", this.KernelTCP), "MemoryEntry", "MemoryEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1671,6 +2430,7 @@ func (this *MemoryEntry) String() string { `Usage:` + fmt.Sprintf("%v", this.Usage) + `,`, `Max:` + fmt.Sprintf("%v", this.Max) + `,`, `Failcnt:` + fmt.Sprintf("%v", this.Failcnt) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1688,6 +2448,7 @@ func (this *BlkIOStat) String() string { `IoMergedRecursive:` + strings.Replace(fmt.Sprintf("%v", this.IoMergedRecursive), "BlkIOEntry", "BlkIOEntry", 1) + `,`, `IoTimeRecursive:` + strings.Replace(fmt.Sprintf("%v", this.IoTimeRecursive), "BlkIOEntry", "BlkIOEntry", 1) + `,`, `SectorsRecursive:` + strings.Replace(fmt.Sprintf("%v", this.SectorsRecursive), "BlkIOEntry", "BlkIOEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1702,6 +2463,7 @@ func (this *BlkIOEntry) String() string { `Major:` + fmt.Sprintf("%v", this.Major) + `,`, `Minor:` + fmt.Sprintf("%v", this.Minor) + `,`, `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1713,6 +2475,7 @@ func (this *RdmaStat) String() string { s := strings.Join([]string{`&RdmaStat{`, `Current:` + strings.Replace(fmt.Sprintf("%v", this.Current), "RdmaEntry", "RdmaEntry", 1) + `,`, `Limit:` + strings.Replace(fmt.Sprintf("%v", this.Limit), "RdmaEntry", "RdmaEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1725,6 +2488,7 @@ func (this *RdmaEntry) String() string { `Device:` + fmt.Sprintf("%v", this.Device) + `,`, `HcaHandles:` + fmt.Sprintf("%v", this.HcaHandles) + `,`, `HcaObjects:` + fmt.Sprintf("%v", this.HcaObjects) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1743,6 +2507,22 @@ func (this *NetworkStat) String() string { `TxPackets:` + fmt.Sprintf("%v", this.TxPackets) + `,`, `TxErrors:` + fmt.Sprintf("%v", this.TxErrors) + `,`, `TxDropped:` + fmt.Sprintf("%v", this.TxDropped) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CgroupStats) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CgroupStats{`, + `NrSleeping:` + fmt.Sprintf("%v", this.NrSleeping) + `,`, + `NrRunning:` + fmt.Sprintf("%v", this.NrRunning) + `,`, + `NrStopped:` + fmt.Sprintf("%v", this.NrStopped) + `,`, + `NrUninterruptible:` + fmt.Sprintf("%v", this.NrUninterruptible) + `,`, + `NrIoWait:` + fmt.Sprintf("%v", this.NrIoWait) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s @@ -1770,7 +2550,7 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1798,7 +2578,7 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1807,6 +2587,9 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1829,7 +2612,7 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1838,6 +2621,9 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1862,7 +2648,7 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1871,6 +2657,9 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1895,7 +2684,7 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1904,6 +2693,9 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1928,7 +2720,7 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1937,6 +2729,9 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1961,7 +2756,7 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -1970,6 +2765,9 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -1994,7 +2792,7 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2003,6 +2801,9 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2011,6 +2812,42 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CgroupStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CgroupStats == nil { + m.CgroupStats = &CgroupStats{} + } + if err := m.CgroupStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMetrics(dAtA[iNdEx:]) @@ -2020,9 +2857,13 @@ func (m *Metrics) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2047,7 +2888,7 @@ func (m *HugetlbStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2075,7 +2916,7 @@ func (m *HugetlbStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Usage |= (uint64(b) & 0x7F) << shift + m.Usage |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2094,7 +2935,7 @@ func (m *HugetlbStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Max |= (uint64(b) & 0x7F) << shift + m.Max |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2113,7 +2954,7 @@ func (m *HugetlbStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Failcnt |= (uint64(b) & 0x7F) << shift + m.Failcnt |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2132,7 +2973,7 @@ func (m *HugetlbStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2142,6 +2983,9 @@ func (m *HugetlbStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2156,9 +3000,13 @@ func (m *HugetlbStat) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2183,7 +3031,7 @@ func (m *PidsStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2211,7 +3059,7 @@ func (m *PidsStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Current |= (uint64(b) & 0x7F) << shift + m.Current |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2230,7 +3078,7 @@ func (m *PidsStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Limit |= (uint64(b) & 0x7F) << shift + m.Limit |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2244,9 +3092,13 @@ func (m *PidsStat) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2271,7 +3123,7 @@ func (m *CPUStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2299,7 +3151,7 @@ func (m *CPUStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2308,6 +3160,9 @@ func (m *CPUStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2332,7 +3187,7 @@ func (m *CPUStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2341,6 +3196,9 @@ func (m *CPUStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -2360,9 +3218,13 @@ func (m *CPUStat) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2387,7 +3249,7 @@ func (m *CPUUsage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2415,7 +3277,7 @@ func (m *CPUUsage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= (uint64(b) & 0x7F) << shift + m.Total |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2434,7 +3296,7 @@ func (m *CPUUsage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Kernel |= (uint64(b) & 0x7F) << shift + m.Kernel |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2453,7 +3315,7 @@ func (m *CPUUsage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.User |= (uint64(b) & 0x7F) << shift + m.User |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2470,7 +3332,7 @@ func (m *CPUUsage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2487,7 +3349,7 @@ func (m *CPUUsage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= (int(b) & 0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -2496,9 +3358,23 @@ func (m *CPUUsage) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.PerCPU) == 0 { + m.PerCPU = make([]uint64, 0, elementCount) + } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -2510,7 +3386,7 @@ func (m *CPUUsage) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (uint64(b) & 0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2529,9 +3405,13 @@ func (m *CPUUsage) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2556,7 +3436,7 @@ func (m *Throttle) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2584,7 +3464,7 @@ func (m *Throttle) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Periods |= (uint64(b) & 0x7F) << shift + m.Periods |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2603,7 +3483,7 @@ func (m *Throttle) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ThrottledPeriods |= (uint64(b) & 0x7F) << shift + m.ThrottledPeriods |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2622,7 +3502,7 @@ func (m *Throttle) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ThrottledTime |= (uint64(b) & 0x7F) << shift + m.ThrottledTime |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2636,9 +3516,13 @@ func (m *Throttle) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -2663,7 +3547,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2691,7 +3575,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Cache |= (uint64(b) & 0x7F) << shift + m.Cache |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2710,7 +3594,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RSS |= (uint64(b) & 0x7F) << shift + m.RSS |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2729,7 +3613,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RSSHuge |= (uint64(b) & 0x7F) << shift + m.RSSHuge |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2748,7 +3632,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MappedFile |= (uint64(b) & 0x7F) << shift + m.MappedFile |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2767,7 +3651,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Dirty |= (uint64(b) & 0x7F) << shift + m.Dirty |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2786,7 +3670,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Writeback |= (uint64(b) & 0x7F) << shift + m.Writeback |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2805,7 +3689,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PgPgIn |= (uint64(b) & 0x7F) << shift + m.PgPgIn |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2824,7 +3708,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PgPgOut |= (uint64(b) & 0x7F) << shift + m.PgPgOut |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2843,7 +3727,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PgFault |= (uint64(b) & 0x7F) << shift + m.PgFault |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2862,7 +3746,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PgMajFault |= (uint64(b) & 0x7F) << shift + m.PgMajFault |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2881,7 +3765,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.InactiveAnon |= (uint64(b) & 0x7F) << shift + m.InactiveAnon |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2900,7 +3784,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ActiveAnon |= (uint64(b) & 0x7F) << shift + m.ActiveAnon |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2919,7 +3803,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.InactiveFile |= (uint64(b) & 0x7F) << shift + m.InactiveFile |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2938,7 +3822,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ActiveFile |= (uint64(b) & 0x7F) << shift + m.ActiveFile |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2957,7 +3841,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Unevictable |= (uint64(b) & 0x7F) << shift + m.Unevictable |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2976,7 +3860,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HierarchicalMemoryLimit |= (uint64(b) & 0x7F) << shift + m.HierarchicalMemoryLimit |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2995,7 +3879,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HierarchicalSwapLimit |= (uint64(b) & 0x7F) << shift + m.HierarchicalSwapLimit |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3014,7 +3898,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalCache |= (uint64(b) & 0x7F) << shift + m.TotalCache |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3033,7 +3917,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalRSS |= (uint64(b) & 0x7F) << shift + m.TotalRSS |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3052,7 +3936,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalRSSHuge |= (uint64(b) & 0x7F) << shift + m.TotalRSSHuge |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3071,7 +3955,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalMappedFile |= (uint64(b) & 0x7F) << shift + m.TotalMappedFile |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3090,7 +3974,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalDirty |= (uint64(b) & 0x7F) << shift + m.TotalDirty |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3109,7 +3993,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalWriteback |= (uint64(b) & 0x7F) << shift + m.TotalWriteback |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3128,7 +4012,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalPgPgIn |= (uint64(b) & 0x7F) << shift + m.TotalPgPgIn |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3147,7 +4031,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalPgPgOut |= (uint64(b) & 0x7F) << shift + m.TotalPgPgOut |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3166,7 +4050,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalPgFault |= (uint64(b) & 0x7F) << shift + m.TotalPgFault |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3185,7 +4069,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalPgMajFault |= (uint64(b) & 0x7F) << shift + m.TotalPgMajFault |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3204,7 +4088,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalInactiveAnon |= (uint64(b) & 0x7F) << shift + m.TotalInactiveAnon |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3223,7 +4107,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalActiveAnon |= (uint64(b) & 0x7F) << shift + m.TotalActiveAnon |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3242,7 +4126,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalInactiveFile |= (uint64(b) & 0x7F) << shift + m.TotalInactiveFile |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3261,7 +4145,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalActiveFile |= (uint64(b) & 0x7F) << shift + m.TotalActiveFile |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3280,7 +4164,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalUnevictable |= (uint64(b) & 0x7F) << shift + m.TotalUnevictable |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3299,7 +4183,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3308,6 +4192,9 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3332,7 +4219,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3341,6 +4228,9 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3365,7 +4255,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3374,6 +4264,9 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3398,7 +4291,7 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3407,6 +4300,9 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3426,9 +4322,13 @@ func (m *MemoryStat) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3453,7 +4353,7 @@ func (m *MemoryEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3481,7 +4381,7 @@ func (m *MemoryEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Limit |= (uint64(b) & 0x7F) << shift + m.Limit |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3500,7 +4400,7 @@ func (m *MemoryEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Usage |= (uint64(b) & 0x7F) << shift + m.Usage |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3519,7 +4419,7 @@ func (m *MemoryEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Max |= (uint64(b) & 0x7F) << shift + m.Max |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3538,7 +4438,7 @@ func (m *MemoryEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Failcnt |= (uint64(b) & 0x7F) << shift + m.Failcnt |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3552,9 +4452,13 @@ func (m *MemoryEntry) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3579,7 +4483,7 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3607,7 +4511,7 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3616,6 +4520,9 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3638,7 +4545,7 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3647,6 +4554,9 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3669,7 +4579,7 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3678,6 +4588,9 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3700,7 +4613,7 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3709,6 +4622,9 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3731,7 +4647,7 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3740,6 +4656,9 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3762,7 +4681,7 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3771,6 +4690,9 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3793,7 +4715,7 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3802,6 +4724,9 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3824,7 +4749,7 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -3833,6 +4758,9 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3850,9 +4778,13 @@ func (m *BlkIOStat) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -3877,7 +4809,7 @@ func (m *BlkIOEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3905,7 +4837,7 @@ func (m *BlkIOEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3915,6 +4847,9 @@ func (m *BlkIOEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3934,7 +4869,7 @@ func (m *BlkIOEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3944,6 +4879,9 @@ func (m *BlkIOEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -3963,7 +4901,7 @@ func (m *BlkIOEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Major |= (uint64(b) & 0x7F) << shift + m.Major |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3982,7 +4920,7 @@ func (m *BlkIOEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Minor |= (uint64(b) & 0x7F) << shift + m.Minor |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4001,7 +4939,7 @@ func (m *BlkIOEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Value |= (uint64(b) & 0x7F) << shift + m.Value |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4015,9 +4953,13 @@ func (m *BlkIOEntry) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4042,7 +4984,7 @@ func (m *RdmaStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4070,7 +5012,7 @@ func (m *RdmaStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4079,6 +5021,9 @@ func (m *RdmaStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4101,7 +5046,7 @@ func (m *RdmaStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } @@ -4110,6 +5055,9 @@ func (m *RdmaStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4127,9 +5075,13 @@ func (m *RdmaStat) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4154,7 +5106,7 @@ func (m *RdmaEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4182,7 +5134,7 @@ func (m *RdmaEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4192,6 +5144,9 @@ func (m *RdmaEntry) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4211,7 +5166,7 @@ func (m *RdmaEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HcaHandles |= (uint32(b) & 0x7F) << shift + m.HcaHandles |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -4230,7 +5185,7 @@ func (m *RdmaEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HcaObjects |= (uint32(b) & 0x7F) << shift + m.HcaObjects |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -4244,9 +5199,13 @@ func (m *RdmaEntry) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4271,7 +5230,7 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= (uint64(b) & 0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4299,7 +5258,7 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4309,6 +5268,9 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { return ErrInvalidLengthMetrics } postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } if postIndex > l { return io.ErrUnexpectedEOF } @@ -4328,7 +5290,7 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RxBytes |= (uint64(b) & 0x7F) << shift + m.RxBytes |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4347,7 +5309,7 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RxPackets |= (uint64(b) & 0x7F) << shift + m.RxPackets |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4366,7 +5328,7 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RxErrors |= (uint64(b) & 0x7F) << shift + m.RxErrors |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4385,7 +5347,7 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RxDropped |= (uint64(b) & 0x7F) << shift + m.RxDropped |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4404,7 +5366,7 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TxBytes |= (uint64(b) & 0x7F) << shift + m.TxBytes |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4423,7 +5385,7 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TxPackets |= (uint64(b) & 0x7F) << shift + m.TxPackets |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4442,7 +5404,7 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TxErrors |= (uint64(b) & 0x7F) << shift + m.TxErrors |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4461,7 +5423,7 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TxDropped |= (uint64(b) & 0x7F) << shift + m.TxDropped |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -4475,9 +5437,162 @@ func (m *NetworkStat) Unmarshal(dAtA []byte) error { if skippy < 0 { return ErrInvalidLengthMetrics } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CgroupStats) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CgroupStats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CgroupStats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NrSleeping", wireType) + } + m.NrSleeping = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NrSleeping |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NrRunning", wireType) + } + m.NrRunning = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NrRunning |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NrStopped", wireType) + } + m.NrStopped = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NrStopped |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NrUninterruptible", wireType) + } + m.NrUninterruptible = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NrUninterruptible |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NrIoWait", wireType) + } + m.NrIoWait = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NrIoWait |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMetrics(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } @@ -4541,10 +5656,13 @@ func skipMetrics(dAtA []byte) (n int, err error) { break } } - iNdEx += length if length < 0 { return 0, ErrInvalidLengthMetrics } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthMetrics + } return iNdEx, nil case 3: for { @@ -4573,6 +5691,9 @@ func skipMetrics(dAtA []byte) (n int, err error) { return 0, err } iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthMetrics + } } return iNdEx, nil case 4: @@ -4591,106 +5712,3 @@ var ( ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow") ) - -func init() { proto.RegisterFile("github.com/containerd/cgroups/metrics.proto", fileDescriptorMetrics) } - -var fileDescriptorMetrics = []byte{ - // 1549 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x57, 0x4d, 0x6f, 0x1b, 0xb7, - 0x16, 0x8d, 0x2c, 0xd9, 0xd2, 0x5c, 0xd9, 0x8e, 0x4d, 0x27, 0xce, 0xd8, 0x49, 0x2c, 0x47, 0xb6, - 0xdf, 0xf3, 0x7b, 0x06, 0x64, 0xbc, 0x3c, 0x20, 0x68, 0xd2, 0x04, 0x45, 0xe4, 0x24, 0x48, 0xd0, - 0xba, 0x51, 0x46, 0x36, 0xd2, 0xae, 0x06, 0xd4, 0x88, 0x19, 0xd1, 0x96, 0x86, 0x13, 0x0e, 0xc7, - 0x96, 0xbb, 0xea, 0xa2, 0x40, 0x57, 0xfd, 0x33, 0xfd, 0x15, 0x59, 0x76, 0x53, 0xa0, 0xdd, 0x18, - 0x8d, 0x7e, 0x49, 0x41, 0x72, 0x3e, 0xa8, 0x24, 0x8e, 0xab, 0xdd, 0x90, 0x3c, 0xe7, 0xdc, 0xcb, - 0x3b, 0x87, 0xc3, 0x3b, 0xb0, 0xe3, 0x53, 0xd1, 0x8b, 0x3b, 0x0d, 0x8f, 0x0d, 0x76, 0x3d, 0x16, - 0x08, 0x4c, 0x03, 0xc2, 0xbb, 0xbb, 0x9e, 0xcf, 0x59, 0x1c, 0x46, 0xbb, 0x03, 0x22, 0x38, 0xf5, - 0xa2, 0x46, 0xc8, 0x99, 0x60, 0xc8, 0xa6, 0xac, 0x91, 0x83, 0x1a, 0x09, 0xa8, 0x71, 0xf2, 0xbf, - 0xd5, 0x6b, 0x3e, 0xf3, 0x99, 0x02, 0xed, 0xca, 0x27, 0x8d, 0xaf, 0xff, 0x5a, 0x84, 0xf2, 0xbe, - 0x56, 0x40, 0x5f, 0x41, 0xb9, 0x17, 0xfb, 0x44, 0xf4, 0x3b, 0x76, 0x61, 0xbd, 0xb8, 0x5d, 0xbd, - 0xbb, 0xd5, 0xb8, 0x48, 0xad, 0xf1, 0x5c, 0x03, 0xdb, 0x02, 0x0b, 0x27, 0x65, 0xa1, 0x7b, 0x50, - 0x0a, 0x69, 0x37, 0xb2, 0xa7, 0xd6, 0x0b, 0xdb, 0xd5, 0xbb, 0xf5, 0x8b, 0xd9, 0x2d, 0xda, 0x8d, - 0x14, 0x55, 0xe1, 0xd1, 0x43, 0x28, 0x7a, 0x61, 0x6c, 0x17, 0x15, 0xed, 0xce, 0xc5, 0xb4, 0xbd, - 0xd6, 0xa1, 0x64, 0x35, 0xcb, 0xa3, 0xf3, 0x5a, 0x71, 0xaf, 0x75, 0xe8, 0x48, 0x1a, 0x7a, 0x08, - 0x33, 0x03, 0x32, 0x60, 0xfc, 0xcc, 0x2e, 0x29, 0x81, 0xcd, 0x8b, 0x05, 0xf6, 0x15, 0x4e, 0x45, - 0x4e, 0x38, 0xe8, 0x3e, 0x4c, 0x77, 0xfa, 0xc7, 0x94, 0xd9, 0xd3, 0x8a, 0xbc, 0x71, 0x31, 0xb9, - 0xd9, 0x3f, 0x7e, 0xf1, 0x52, 0x71, 0x35, 0x43, 0x6e, 0x97, 0x77, 0x07, 0xd8, 0x9e, 0xb9, 0x6c, - 0xbb, 0x4e, 0x77, 0x80, 0xf5, 0x76, 0x25, 0x5e, 0xd6, 0x39, 0x20, 0xe2, 0x94, 0xf1, 0x63, 0xbb, - 0x7c, 0x59, 0x9d, 0xbf, 0xd5, 0x40, 0x5d, 0xe7, 0x84, 0x55, 0x3f, 0x86, 0xaa, 0x51, 0x7f, 0x74, - 0x0d, 0xa6, 0xe3, 0x08, 0xfb, 0xc4, 0x2e, 0xac, 0x17, 0xb6, 0x4b, 0x8e, 0x1e, 0xa0, 0x05, 0x28, - 0x0e, 0xf0, 0x50, 0xbd, 0x8b, 0x92, 0x23, 0x1f, 0x91, 0x0d, 0xe5, 0x37, 0x98, 0xf6, 0xbd, 0x40, - 0xa8, 0x52, 0x97, 0x9c, 0x74, 0x88, 0x56, 0xa1, 0x12, 0x62, 0x9f, 0x44, 0xf4, 0x07, 0xa2, 0x8a, - 0x68, 0x39, 0xd9, 0xb8, 0xfe, 0x00, 0x2a, 0xe9, 0xeb, 0x92, 0x0a, 0x5e, 0xcc, 0x39, 0x09, 0x44, - 0x12, 0x2b, 0x1d, 0xca, 0x1c, 0xfa, 0x74, 0x40, 0x45, 0x12, 0x4f, 0x0f, 0xea, 0x3f, 0x17, 0xa0, - 0x9c, 0xbc, 0x34, 0xf4, 0x85, 0x99, 0xe5, 0x67, 0xcb, 0xb5, 0xd7, 0x3a, 0x3c, 0x94, 0xc8, 0x74, - 0x27, 0x4d, 0x00, 0xd1, 0xe3, 0x4c, 0x88, 0x3e, 0x0d, 0xfc, 0xcb, 0xcd, 0x75, 0xa0, 0xb1, 0xc4, - 0x31, 0x58, 0xf5, 0xb7, 0x50, 0x49, 0x65, 0x65, 0xae, 0x82, 0x09, 0xdc, 0x4f, 0xeb, 0xa5, 0x06, - 0x68, 0x19, 0x66, 0x8e, 0x09, 0x0f, 0x48, 0x3f, 0xd9, 0x42, 0x32, 0x42, 0x08, 0x4a, 0x71, 0x44, - 0x78, 0x52, 0x32, 0xf5, 0x8c, 0x36, 0xa0, 0x1c, 0x12, 0xee, 0x4a, 0xd3, 0x96, 0xd6, 0x8b, 0xdb, - 0xa5, 0x26, 0x8c, 0xce, 0x6b, 0x33, 0x2d, 0xc2, 0xa5, 0x29, 0x67, 0x42, 0xc2, 0xf7, 0xc2, 0xb8, - 0x3e, 0x84, 0x4a, 0x9a, 0x8a, 0x2c, 0x5c, 0x48, 0x38, 0x65, 0xdd, 0x28, 0x2d, 0x5c, 0x32, 0x44, - 0x3b, 0xb0, 0x98, 0xa4, 0x49, 0xba, 0x6e, 0x8a, 0xd1, 0x19, 0x2c, 0x64, 0x0b, 0xad, 0x04, 0xbc, - 0x05, 0xf3, 0x39, 0x58, 0xd0, 0x01, 0x49, 0xb2, 0x9a, 0xcb, 0x66, 0x0f, 0xe8, 0x80, 0xd4, 0xff, - 0xac, 0x02, 0xe4, 0x56, 0x97, 0xfb, 0xf5, 0xb0, 0xd7, 0xcb, 0xfc, 0xa1, 0x06, 0x68, 0x05, 0x8a, - 0x3c, 0x4a, 0x42, 0xe9, 0x13, 0xe5, 0xb4, 0xdb, 0x8e, 0x9c, 0x43, 0xff, 0x82, 0x0a, 0x8f, 0x22, - 0x57, 0x1e, 0x6b, 0x1d, 0xa0, 0x59, 0x1d, 0x9d, 0xd7, 0xca, 0x4e, 0xbb, 0x2d, 0x6d, 0xe7, 0x94, - 0x79, 0x14, 0xc9, 0x07, 0x54, 0x83, 0xea, 0x00, 0x87, 0x21, 0xe9, 0xba, 0x6f, 0x68, 0x5f, 0x3b, - 0xa7, 0xe4, 0x80, 0x9e, 0x7a, 0x46, 0xfb, 0xaa, 0xd2, 0x5d, 0xca, 0xc5, 0x99, 0x3a, 0x5c, 0x25, - 0x47, 0x0f, 0xd0, 0x2d, 0xb0, 0x4e, 0x39, 0x15, 0xa4, 0x83, 0xbd, 0x63, 0x75, 0x78, 0x4a, 0x4e, - 0x3e, 0x81, 0x6c, 0xa8, 0x84, 0xbe, 0x1b, 0xfa, 0x2e, 0x0d, 0xec, 0xb2, 0x7e, 0x13, 0xa1, 0xdf, - 0xf2, 0x5f, 0x04, 0x68, 0x15, 0x2c, 0xbd, 0xc2, 0x62, 0x61, 0x57, 0x92, 0x32, 0xfa, 0x2d, 0xff, - 0x65, 0x2c, 0xd0, 0x8a, 0x62, 0xbd, 0xc1, 0x71, 0x5f, 0xd8, 0x56, 0xba, 0xf4, 0x4c, 0x0e, 0xd1, - 0x3a, 0xcc, 0x86, 0xbe, 0x3b, 0xc0, 0x47, 0xc9, 0x32, 0xe8, 0x34, 0x43, 0x7f, 0x1f, 0x1f, 0x69, - 0xc4, 0x06, 0xcc, 0xd1, 0x00, 0x7b, 0x82, 0x9e, 0x10, 0x17, 0x07, 0x2c, 0xb0, 0xab, 0x0a, 0x32, - 0x9b, 0x4e, 0x3e, 0x0e, 0x58, 0x20, 0x37, 0x6b, 0x42, 0x66, 0xb5, 0x8a, 0x01, 0x30, 0x55, 0x54, - 0x3d, 0xe6, 0xc6, 0x55, 0x54, 0x45, 0x72, 0x15, 0x05, 0x99, 0x37, 0x55, 0x14, 0x60, 0x1d, 0xaa, - 0x71, 0x40, 0x4e, 0xa8, 0x27, 0x70, 0xa7, 0x4f, 0xec, 0xab, 0x0a, 0x60, 0x4e, 0xa1, 0x07, 0xb0, - 0xd2, 0xa3, 0x84, 0x63, 0xee, 0xf5, 0xa8, 0x87, 0xfb, 0xae, 0xfe, 0x90, 0xb9, 0xfa, 0xf8, 0x2d, - 0x28, 0xfc, 0x0d, 0x13, 0xa0, 0x9d, 0xf0, 0x8d, 0x5c, 0x46, 0xf7, 0x60, 0x6c, 0xc9, 0x8d, 0x4e, - 0x71, 0x98, 0x30, 0x17, 0x15, 0xf3, 0xba, 0xb9, 0xdc, 0x3e, 0xc5, 0xa1, 0xe6, 0xd5, 0xa0, 0xaa, - 0x4e, 0x89, 0xab, 0x8d, 0x84, 0x74, 0xda, 0x6a, 0x6a, 0x4f, 0xb9, 0xe9, 0x3f, 0x60, 0x69, 0x80, - 0xf4, 0xd4, 0x92, 0xf2, 0xcc, 0xec, 0xe8, 0xbc, 0x56, 0x39, 0x90, 0x93, 0xd2, 0x58, 0x15, 0xb5, - 0xec, 0x44, 0x11, 0xba, 0x07, 0xf3, 0x19, 0x54, 0x7b, 0xec, 0x9a, 0xc2, 0x2f, 0x8c, 0xce, 0x6b, - 0xb3, 0x29, 0x5e, 0x19, 0x6d, 0x36, 0xe5, 0x28, 0xb7, 0xfd, 0x17, 0x16, 0x35, 0xcf, 0xf4, 0xdc, - 0x75, 0x95, 0xc9, 0x55, 0xb5, 0xb0, 0x9f, 0x1b, 0x2f, 0xcb, 0x57, 0xdb, 0x6f, 0xd9, 0xc8, 0xf7, - 0x89, 0xf2, 0xe0, 0xbf, 0x41, 0x73, 0xdc, 0xdc, 0x89, 0x37, 0x14, 0x48, 0xe7, 0xf6, 0x3a, 0xb3, - 0xe3, 0x46, 0x9a, 0x6d, 0x66, 0x4a, 0x5b, 0xbf, 0x12, 0x35, 0xdb, 0xd2, 0xce, 0xdc, 0x4a, 0xd5, - 0x72, 0x7f, 0xae, 0xe8, 0x97, 0x9f, 0xa1, 0xa4, 0x49, 0x37, 0x0d, 0x2d, 0xed, 0xc5, 0xd5, 0x31, - 0x94, 0x76, 0xe3, 0x0e, 0xa0, 0x0c, 0x95, 0xbb, 0xf6, 0xa6, 0xb1, 0xd1, 0x56, 0x6e, 0xdd, 0x06, - 0x2c, 0x69, 0xf0, 0xb8, 0x81, 0x6f, 0x29, 0xb4, 0xae, 0xd7, 0x0b, 0xd3, 0xc5, 0x59, 0x11, 0x4d, - 0xf4, 0x6d, 0x43, 0xfb, 0x71, 0x8e, 0xfd, 0x58, 0x5b, 0x95, 0x7c, 0xed, 0x13, 0xda, 0xaa, 0xe8, - 0x1f, 0x6a, 0x2b, 0x74, 0xed, 0x23, 0x6d, 0x85, 0xdd, 0x49, 0xb1, 0xa6, 0xd9, 0xd7, 0x93, 0xcf, - 0x9e, 0x5c, 0x38, 0x34, 0x1c, 0xff, 0x65, 0x7a, 0x75, 0xdc, 0x51, 0xdf, 0xfe, 0xad, 0xcb, 0x2e, - 0xf8, 0xa7, 0x81, 0xe0, 0x67, 0xe9, 0xed, 0x71, 0x1f, 0x4a, 0xd2, 0xe5, 0x76, 0x7d, 0x12, 0xae, - 0xa2, 0xa0, 0x47, 0xd9, 0x95, 0xb0, 0x31, 0x09, 0x39, 0xbd, 0x39, 0xda, 0x00, 0xfa, 0xc9, 0x15, - 0x5e, 0x68, 0x6f, 0x4e, 0x20, 0xd1, 0x9c, 0x1b, 0x9d, 0xd7, 0xac, 0xaf, 0x15, 0xf9, 0x60, 0xaf, - 0xe5, 0x58, 0x5a, 0xe7, 0xc0, 0x0b, 0xeb, 0x04, 0xaa, 0x06, 0x30, 0xbf, 0x77, 0x0b, 0xc6, 0xbd, - 0x9b, 0x77, 0x04, 0x53, 0x9f, 0xe8, 0x08, 0x8a, 0x9f, 0xec, 0x08, 0x4a, 0x63, 0x1d, 0x41, 0xfd, - 0xf7, 0x69, 0xb0, 0xb2, 0x86, 0x07, 0x61, 0x58, 0xa5, 0xcc, 0x8d, 0x08, 0x3f, 0xa1, 0x1e, 0x71, - 0x3b, 0x67, 0x82, 0x44, 0x2e, 0x27, 0x5e, 0xcc, 0x23, 0x7a, 0x42, 0x92, 0x66, 0x71, 0xf3, 0x92, - 0xce, 0x49, 0xd7, 0xe6, 0x06, 0x65, 0x6d, 0x2d, 0xd3, 0x94, 0x2a, 0x4e, 0x2a, 0x82, 0xbe, 0x83, - 0xeb, 0x79, 0x88, 0xae, 0xa1, 0x3e, 0x35, 0x81, 0xfa, 0x52, 0xa6, 0xde, 0xcd, 0x95, 0x0f, 0x60, - 0x89, 0x32, 0xf7, 0x6d, 0x4c, 0xe2, 0x31, 0xdd, 0xe2, 0x04, 0xba, 0x8b, 0x94, 0xbd, 0x52, 0xfc, - 0x5c, 0xd5, 0x85, 0x15, 0xa3, 0x24, 0xf2, 0x2e, 0x36, 0xb4, 0x4b, 0x13, 0x68, 0x2f, 0x67, 0x39, - 0xcb, 0xbb, 0x3b, 0x0f, 0xf0, 0x3d, 0x2c, 0x53, 0xe6, 0x9e, 0x62, 0x2a, 0x3e, 0x54, 0x9f, 0x9e, - 0xac, 0x22, 0xaf, 0x31, 0x15, 0xe3, 0xd2, 0xba, 0x22, 0x03, 0xc2, 0xfd, 0xb1, 0x8a, 0xcc, 0x4c, - 0x56, 0x91, 0x7d, 0xc5, 0xcf, 0x55, 0x5b, 0xb0, 0x48, 0xd9, 0x87, 0xb9, 0x96, 0x27, 0xd0, 0xbc, - 0x4a, 0xd9, 0x78, 0x9e, 0xaf, 0x60, 0x31, 0x22, 0x9e, 0x60, 0xdc, 0x74, 0x5b, 0x65, 0x02, 0xc5, - 0x85, 0x84, 0x9e, 0x49, 0xd6, 0x4f, 0x00, 0xf2, 0x75, 0x34, 0x0f, 0x53, 0x2c, 0x54, 0x47, 0xc7, - 0x72, 0xa6, 0x58, 0x28, 0x7b, 0xc0, 0xae, 0xfc, 0xec, 0xe8, 0x83, 0x63, 0x39, 0xc9, 0x48, 0x9e, - 0xa7, 0x01, 0x3e, 0x62, 0x69, 0x13, 0xa8, 0x07, 0x6a, 0x96, 0x06, 0x8c, 0x27, 0x67, 0x47, 0x0f, - 0xe4, 0xec, 0x09, 0xee, 0xc7, 0x24, 0xed, 0x79, 0xd4, 0xa0, 0xfe, 0x53, 0x01, 0x2a, 0xe9, 0x6f, - 0x00, 0x7a, 0x64, 0xb6, 0xd1, 0xc5, 0xcf, 0xff, 0x75, 0x48, 0x92, 0xde, 0x4c, 0xd6, 0x6b, 0xdf, - 0xcf, 0x7b, 0xed, 0x7f, 0x4c, 0x4e, 0x1a, 0x72, 0x02, 0x56, 0x36, 0x67, 0xec, 0xb6, 0x30, 0xb6, - 0xdb, 0x1a, 0x54, 0x7b, 0x1e, 0x76, 0x7b, 0x38, 0xe8, 0xf6, 0x89, 0xee, 0x10, 0xe7, 0x1c, 0xe8, - 0x79, 0xf8, 0xb9, 0x9e, 0x49, 0x01, 0xac, 0x73, 0x44, 0x3c, 0x11, 0xa9, 0xa2, 0x68, 0xc0, 0x4b, - 0x3d, 0x53, 0xff, 0x65, 0x0a, 0xaa, 0xc6, 0x9f, 0x8b, 0xec, 0xa1, 0x03, 0x3c, 0x48, 0xe3, 0xa8, - 0x67, 0xd9, 0xb1, 0xf1, 0xa1, 0xfe, 0x96, 0x24, 0x9f, 0xa9, 0x32, 0x1f, 0xaa, 0x8f, 0x02, 0xba, - 0x0d, 0xc0, 0x87, 0x6e, 0x88, 0xbd, 0x63, 0x92, 0xc8, 0x97, 0x1c, 0x8b, 0x0f, 0x5b, 0x7a, 0x02, - 0xdd, 0x04, 0x8b, 0x0f, 0x5d, 0xc2, 0x39, 0xe3, 0x51, 0x52, 0xfb, 0x0a, 0x1f, 0x3e, 0x55, 0xe3, - 0x84, 0xdb, 0xe5, 0x4c, 0xf6, 0x02, 0xc9, 0x3b, 0xb0, 0xf8, 0xf0, 0x89, 0x9e, 0x90, 0x51, 0x45, - 0x1a, 0x55, 0xb7, 0x9e, 0x65, 0x91, 0x47, 0x15, 0x79, 0x54, 0xdd, 0x7a, 0x5a, 0xc2, 0x8c, 0x2a, - 0xb2, 0xa8, 0xba, 0xfb, 0xac, 0x08, 0x23, 0xaa, 0xc8, 0xa3, 0x5a, 0x29, 0x37, 0x89, 0xda, 0xb4, - 0xdf, 0xbd, 0x5f, 0xbb, 0xf2, 0xc7, 0xfb, 0xb5, 0x2b, 0x3f, 0x8e, 0xd6, 0x0a, 0xef, 0x46, 0x6b, - 0x85, 0xdf, 0x46, 0x6b, 0x85, 0xbf, 0x46, 0x6b, 0x85, 0xce, 0x8c, 0xfa, 0x0d, 0xff, 0xff, 0xdf, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x19, 0x9d, 0xe2, 0xd3, 0xe5, 0x0f, 0x00, 0x00, -} diff --git a/vendor/github.com/containerd/cgroups/metrics.pb.txt b/vendor/github.com/containerd/cgroups/stats/v1/metrics.pb.txt similarity index 93% rename from vendor/github.com/containerd/cgroups/metrics.pb.txt rename to vendor/github.com/containerd/cgroups/stats/v1/metrics.pb.txt index 5b0f10a34cb..b7e87f00aed 100644 --- a/vendor/github.com/containerd/cgroups/metrics.pb.txt +++ b/vendor/github.com/containerd/cgroups/stats/v1/metrics.pb.txt @@ -1,5 +1,5 @@ file { - name: "github.com/containerd/cgroups/metrics.proto" + name: "github.com/containerd/cgroups/stats/v1/metrics.proto" package: "io.containerd.cgroups.v1" dependency: "gogoproto/gogo.proto" message_type { @@ -63,6 +63,14 @@ file { type_name: ".io.containerd.cgroups.v1.NetworkStat" json_name: "network" } + field { + name: "cgroup_stats" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v1.CgroupStats" + json_name: "cgroupStats" + } } message_type { name: "HugetlbStat" @@ -708,5 +716,43 @@ file { json_name: "txDropped" } } + message_type { + name: "CgroupStats" + field { + name: "nr_sleeping" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "nrSleeping" + } + field { + name: "nr_running" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "nrRunning" + } + field { + name: "nr_stopped" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "nrStopped" + } + field { + name: "nr_uninterruptible" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "nrUninterruptible" + } + field { + name: "nr_io_wait" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "nrIoWait" + } + } syntax: "proto3" } diff --git a/vendor/github.com/containerd/cgroups/metrics.proto b/vendor/github.com/containerd/cgroups/stats/v1/metrics.proto similarity index 88% rename from vendor/github.com/containerd/cgroups/metrics.proto rename to vendor/github.com/containerd/cgroups/stats/v1/metrics.proto index 62b519806c3..ba6be851d95 100644 --- a/vendor/github.com/containerd/cgroups/metrics.proto +++ b/vendor/github.com/containerd/cgroups/stats/v1/metrics.proto @@ -12,6 +12,7 @@ message Metrics { BlkIOStat blkio = 5; RdmaStat rdma = 6; repeated NetworkStat network = 7; + CgroupStats cgroup_stats = 8; } message HugetlbStat { @@ -134,3 +135,17 @@ message NetworkStat { uint64 tx_errors = 8; uint64 tx_dropped = 9; } + +// CgroupStats exports per-cgroup statistics. +message CgroupStats { + // number of tasks sleeping + uint64 nr_sleeping = 1; + // number of tasks running + uint64 nr_running = 2; + // number of tasks in stopped state + uint64 nr_stopped = 3; + // number of tasks in uninterruptible state + uint64 nr_uninterruptible = 4; + // number of tasks waiting on IO + uint64 nr_io_wait = 5; +} diff --git a/vendor/github.com/containerd/cgroups/subsystem.go b/vendor/github.com/containerd/cgroups/subsystem.go index 23de04d494f..1349fc6675b 100644 --- a/vendor/github.com/containerd/cgroups/subsystem.go +++ b/vendor/github.com/containerd/cgroups/subsystem.go @@ -19,6 +19,7 @@ package cgroups import ( "fmt" + v1 "github.com/containerd/cgroups/stats/v1" specs "github.com/opencontainers/runtime-spec/specs-go" ) @@ -85,7 +86,7 @@ type deleter interface { type stater interface { Subsystem - Stat(path string, stats *Metrics) error + Stat(path string, stats *v1.Metrics) error } type updater interface { diff --git a/vendor/github.com/containerd/cgroups/systemd.go b/vendor/github.com/containerd/cgroups/systemd.go index c5d4e30811e..4bae17f168e 100644 --- a/vendor/github.com/containerd/cgroups/systemd.go +++ b/vendor/github.com/containerd/cgroups/systemd.go @@ -22,8 +22,8 @@ import ( "strings" "sync" - systemdDbus "github.com/coreos/go-systemd/dbus" - "github.com/godbus/dbus" + systemdDbus "github.com/coreos/go-systemd/v22/dbus" + "github.com/godbus/dbus/v5" specs "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/vendor/github.com/containerd/cgroups/utils.go b/vendor/github.com/containerd/cgroups/utils.go index 8a97d04ddfe..1e169d67a37 100644 --- a/vendor/github.com/containerd/cgroups/utils.go +++ b/vendor/github.com/containerd/cgroups/utils.go @@ -25,13 +25,59 @@ import ( "path/filepath" "strconv" "strings" + "sync" "time" units "github.com/docker/go-units" specs "github.com/opencontainers/runtime-spec/specs-go" + "golang.org/x/sys/unix" ) -var isUserNS = runningInUserNS() +var ( + isUserNS = runningInUserNS() + checkMode sync.Once + cgMode CGMode +) + +const unifiedMountpoint = "/sys/fs/cgroup" + +// CGMode is the cgroups mode of the host system +type CGMode int + +const ( + // Unavailable cgroup mountpoint + Unavailable CGMode = iota + // Legacy cgroups v1 + Legacy + // Hybrid with cgroups v1 and v2 controllers mounted + Hybrid + // Unified with only cgroups v2 mounted + Unified +) + +// Mode returns the cgroups mode running on the host +func Mode() CGMode { + checkMode.Do(func() { + var st unix.Statfs_t + if err := unix.Statfs(unifiedMountpoint, &st); err != nil { + cgMode = Unavailable + return + } + switch st.Type { + case unix.CGROUP2_SUPER_MAGIC: + cgMode = Unified + default: + cgMode = Legacy + if err := unix.Statfs(filepath.Join(unifiedMountpoint, "unified"), &st); err != nil { + return + } + if st.Type == unix.CGROUP2_SUPER_MAGIC { + cgMode = Hybrid + } + } + }) + return cgMode +} // runningInUserNS detects whether we are currently running in a user namespace. // Copied from github.com/lxc/lxd/shared/util.go @@ -135,6 +181,10 @@ func readPids(path string, subsystem Name) ([]Process, error) { }) } } + if err := s.Err(); err != nil { + // failed to read all pids? + return nil, err + } return out, nil } @@ -162,6 +212,9 @@ func readTasksPids(path string, subsystem Name) ([]Task, error) { }) } } + if err := s.Err(); err != nil { + return nil, err + } return out, nil } @@ -240,9 +293,6 @@ func parseCgroupFromReader(r io.Reader) (map[string]string, error) { s = bufio.NewScanner(r) ) for s.Scan() { - if err := s.Err(); err != nil { - return nil, err - } var ( text = s.Text() parts = strings.SplitN(text, ":", 3) @@ -256,6 +306,9 @@ func parseCgroupFromReader(r io.Reader) (map[string]string, error) { } } } + if err := s.Err(); err != nil { + return nil, err + } return cgroups, nil } @@ -267,16 +320,23 @@ func getCgroupDestination(subsystem string) (string, error) { defer f.Close() s := bufio.NewScanner(f) for s.Scan() { - if err := s.Err(); err != nil { - return "", err + fields := strings.Split(s.Text(), " ") + if len(fields) < 10 { + // broken mountinfo? + continue + } + if fields[len(fields)-3] != "cgroup" { + continue } - fields := strings.Fields(s.Text()) for _, opt := range strings.Split(fields[len(fields)-1], ",") { if opt == subsystem { return fields[3], nil } } } + if err := s.Err(); err != nil { + return "", err + } return "", ErrNoCgroupMountDestination } diff --git a/vendor/github.com/containerd/cgroups/v1.go b/vendor/github.com/containerd/cgroups/v1.go index a076d4692ef..2ec215c06f4 100644 --- a/vendor/github.com/containerd/cgroups/v1.go +++ b/vendor/github.com/containerd/cgroups/v1.go @@ -54,28 +54,20 @@ func v1MountPoint() (string, error) { defer f.Close() scanner := bufio.NewScanner(f) for scanner.Scan() { - if err := scanner.Err(); err != nil { - return "", err - } var ( - text = scanner.Text() - fields = strings.Split(text, " ") - // safe as mountinfo encodes mountpoints with spaces as \040. - index = strings.Index(text, " - ") - postSeparatorFields = strings.Fields(text[index+3:]) - numPostFields = len(postSeparatorFields) + text = scanner.Text() + fields = strings.Split(text, " ") + numFields = len(fields) ) - // this is an error as we can't detect if the mount is for "cgroup" - if numPostFields == 0 { - return "", fmt.Errorf("Found no fields post '-' in %q", text) + if numFields < 10 { + return "", fmt.Errorf("mountinfo: bad entry %q", text) } - if postSeparatorFields[0] == "cgroup" { - // check that the mount is properly formated. - if numPostFields < 3 { - return "", fmt.Errorf("Error found less than 3 fields post '-' in %q", text) - } + if fields[numFields-3] == "cgroup" { return filepath.Dir(fields[4]), nil } } + if err := scanner.Err(); err != nil { + return "", err + } return "", ErrMountPointNotExist } diff --git a/vendor/github.com/containerd/cgroups/v2/cpu.go b/vendor/github.com/containerd/cgroups/v2/cpu.go new file mode 100644 index 00000000000..65282ff082d --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/cpu.go @@ -0,0 +1,83 @@ +/* + Copyright The containerd 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 v2 + +import ( + "math" + "strconv" + "strings" +) + +type CPUMax string + +func NewCPUMax(quota *int64, period *uint64) CPUMax { + max := "max" + if quota != nil { + max = strconv.FormatInt(*quota, 10) + } + return CPUMax(strings.Join([]string{max, strconv.FormatUint(*period, 10)}, " ")) +} + +type CPU struct { + Weight *uint64 + Max CPUMax + Cpus string + Mems string +} + +func (c CPUMax) extractQuotaAndPeriod() (int64, uint64) { + var ( + quota int64 + period uint64 + ) + values := strings.Split(string(c), " ") + if values[0] == "max" { + quota = math.MaxInt64 + } else { + quota, _ = strconv.ParseInt(values[0], 10, 64) + } + period, _ = strconv.ParseUint(values[1], 10, 64) + return quota, period +} + +func (r *CPU) Values() (o []Value) { + if r.Weight != nil { + o = append(o, Value{ + filename: "cpu.weight", + value: *r.Weight, + }) + } + if r.Max != "" { + o = append(o, Value{ + filename: "cpu.max", + value: r.Max, + }) + } + if r.Cpus != "" { + o = append(o, Value{ + filename: "cpuset.cpus", + value: r.Cpus, + }) + } + if r.Mems != "" { + o = append(o, Value{ + filename: "cpuset.mems", + value: r.Mems, + }) + } + return o +} diff --git a/vendor/github.com/containerd/cgroups/v2/devicefilter.go b/vendor/github.com/containerd/cgroups/v2/devicefilter.go new file mode 100644 index 00000000000..4b8c32be928 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/devicefilter.go @@ -0,0 +1,199 @@ +/* + Copyright The containerd 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. +*/ + +// Devicefilter containes eBPF device filter program +// +// The implementation is based on https://github.com/containers/crun/blob/0.10.2/src/libcrun/ebpf.c +// +// Although ebpf.c is originally licensed under LGPL-3.0-or-later, the author (Giuseppe Scrivano) +// agreed to relicense the file in Apache License 2.0: https://github.com/opencontainers/runc/issues/2144#issuecomment-543116397 +// +// This particular Go implementation based on runc version +// https://github.com/opencontainers/runc/blob/master/libcontainer/cgroups/ebpf/devicefilter/devicefilter.go +package v2 + +import ( + "fmt" + "math" + + "github.com/cilium/ebpf/asm" + "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" + "golang.org/x/sys/unix" +) + +const ( + // license string format is same as kernel MODULE_LICENSE macro + license = "Apache" +) + +// DeviceFilter returns eBPF device filter program and its license string +func DeviceFilter(devices []specs.LinuxDeviceCgroup) (asm.Instructions, string, error) { + p := &program{} + p.init() + for i := len(devices) - 1; i >= 0; i-- { + if err := p.appendDevice(devices[i]); err != nil { + return nil, "", err + } + } + insts, err := p.finalize() + return insts, license, err +} + +type program struct { + insts asm.Instructions + hasWildCard bool + blockID int +} + +func (p *program) init() { + // struct bpf_cgroup_dev_ctx: https://elixir.bootlin.com/linux/v5.3.6/source/include/uapi/linux/bpf.h#L3423 + /* + u32 access_type + u32 major + u32 minor + */ + // R2 <- type (lower 16 bit of u32 access_type at R1[0]) + p.insts = append(p.insts, + asm.LoadMem(asm.R2, asm.R1, 0, asm.Half)) + + // R3 <- access (upper 16 bit of u32 access_type at R1[0]) + p.insts = append(p.insts, + asm.LoadMem(asm.R3, asm.R1, 0, asm.Word), + // RSh: bitwise shift right + asm.RSh.Imm32(asm.R3, 16)) + + // R4 <- major (u32 major at R1[4]) + p.insts = append(p.insts, + asm.LoadMem(asm.R4, asm.R1, 4, asm.Word)) + + // R5 <- minor (u32 minor at R1[8]) + p.insts = append(p.insts, + asm.LoadMem(asm.R5, asm.R1, 8, asm.Word)) +} + +// appendDevice needs to be called from the last element of OCI linux.resources.devices to the head element. +func (p *program) appendDevice(dev specs.LinuxDeviceCgroup) error { + if p.blockID < 0 { + return errors.New("the program is finalized") + } + if p.hasWildCard { + // All entries after wildcard entry are ignored + return nil + } + + bpfType := int32(-1) + hasType := true + switch dev.Type { + case string('c'): + bpfType = int32(unix.BPF_DEVCG_DEV_CHAR) + case string('b'): + bpfType = int32(unix.BPF_DEVCG_DEV_BLOCK) + case string('a'): + hasType = false + default: + // if not specified in OCI json, typ is set to DeviceTypeAll + return errors.Errorf("invalid DeviceType %q", dev.Type) + } + if *dev.Major > math.MaxUint32 { + return errors.Errorf("invalid major %d", *dev.Major) + } + if *dev.Minor > math.MaxUint32 { + return errors.Errorf("invalid minor %d", *dev.Major) + } + hasMajor := *dev.Major >= 0 // if not specified in OCI json, major is set to -1 + hasMinor := *dev.Minor >= 0 + bpfAccess := int32(0) + for _, r := range dev.Access { + switch r { + case 'r': + bpfAccess |= unix.BPF_DEVCG_ACC_READ + case 'w': + bpfAccess |= unix.BPF_DEVCG_ACC_WRITE + case 'm': + bpfAccess |= unix.BPF_DEVCG_ACC_MKNOD + default: + return errors.Errorf("unknown device access %v", r) + } + } + // If the access is rwm, skip the check. + hasAccess := bpfAccess != (unix.BPF_DEVCG_ACC_READ | unix.BPF_DEVCG_ACC_WRITE | unix.BPF_DEVCG_ACC_MKNOD) + + blockSym := fmt.Sprintf("block-%d", p.blockID) + nextBlockSym := fmt.Sprintf("block-%d", p.blockID+1) + prevBlockLastIdx := len(p.insts) - 1 + if hasType { + p.insts = append(p.insts, + // if (R2 != bpfType) goto next + asm.JNE.Imm(asm.R2, bpfType, nextBlockSym), + ) + } + if hasAccess { + p.insts = append(p.insts, + // if (R3 & bpfAccess == 0 /* use R1 as a temp var */) goto next + asm.Mov.Reg32(asm.R1, asm.R3), + asm.And.Imm32(asm.R1, bpfAccess), + asm.JEq.Imm(asm.R1, 0, nextBlockSym), + ) + } + if hasMajor { + p.insts = append(p.insts, + // if (R4 != major) goto next + asm.JNE.Imm(asm.R4, int32(*dev.Major), nextBlockSym), + ) + } + if hasMinor { + p.insts = append(p.insts, + // if (R5 != minor) goto next + asm.JNE.Imm(asm.R5, int32(*dev.Minor), nextBlockSym), + ) + } + if !hasType && !hasAccess && !hasMajor && !hasMinor { + p.hasWildCard = true + } + p.insts = append(p.insts, acceptBlock(dev.Allow)...) + // set blockSym to the first instruction we added in this iteration + p.insts[prevBlockLastIdx+1] = p.insts[prevBlockLastIdx+1].Sym(blockSym) + p.blockID++ + return nil +} + +func (p *program) finalize() (asm.Instructions, error) { + if p.hasWildCard { + // acceptBlock with asm.Return() is already inserted + return p.insts, nil + } + blockSym := fmt.Sprintf("block-%d", p.blockID) + p.insts = append(p.insts, + // R0 <- 0 + asm.Mov.Imm32(asm.R0, 0).Sym(blockSym), + asm.Return(), + ) + p.blockID = -1 + return p.insts, nil +} + +func acceptBlock(accept bool) asm.Instructions { + v := int32(0) + if accept { + v = 1 + } + return []asm.Instruction{ + // R0 <- v + asm.Mov.Imm32(asm.R0, v), + asm.Return(), + } +} diff --git a/vendor/github.com/containerd/cgroups/v2/ebpf.go b/vendor/github.com/containerd/cgroups/v2/ebpf.go new file mode 100644 index 00000000000..adda7550896 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/ebpf.go @@ -0,0 +1,83 @@ +/* + Copyright The containerd 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 v2 + +import ( + "github.com/cilium/ebpf" + "github.com/cilium/ebpf/asm" + "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" + "golang.org/x/sys/unix" +) + +// LoadAttachCgroupDeviceFilter installs eBPF device filter program to /sys/fs/cgroup/ directory. +// +// Requires the system to be running in cgroup2 unified-mode with kernel >= 4.15 . +// +// https://github.com/torvalds/linux/commit/ebc614f687369f9df99828572b1d85a7c2de3d92 +func LoadAttachCgroupDeviceFilter(insts asm.Instructions, license string, dirFD int) (func() error, error) { + nilCloser := func() error { + return nil + } + spec := &ebpf.ProgramSpec{ + Type: ebpf.CGroupDevice, + Instructions: insts, + License: license, + } + prog, err := ebpf.NewProgram(spec) + if err != nil { + return nilCloser, err + } + if err := prog.Attach(dirFD, ebpf.AttachCGroupDevice, unix.BPF_F_ALLOW_MULTI); err != nil { + return nilCloser, errors.Wrap(err, "failed to call BPF_PROG_ATTACH (BPF_CGROUP_DEVICE, BPF_F_ALLOW_MULTI)") + } + closer := func() error { + if err := prog.Detach(dirFD, ebpf.AttachCGroupDevice, unix.BPF_F_ALLOW_MULTI); err != nil { + return errors.Wrap(err, "failed to call BPF_PROG_DETACH (BPF_CGROUP_DEVICE, BPF_F_ALLOW_MULTI)") + } + return nil + } + return closer, nil +} + +func isRWM(cgroupPermissions string) bool { + r := false + w := false + m := false + for _, rn := range cgroupPermissions { + switch rn { + case 'r': + r = true + case 'w': + w = true + case 'm': + m = true + } + } + return r && w && m +} + +// the logic is from runc +// https://github.com/opencontainers/runc/blob/master/libcontainer/cgroups/fs/devices_v2.go#L44 +func canSkipEBPFError(devices []specs.LinuxDeviceCgroup) bool { + for _, dev := range devices { + if dev.Allow || !isRWM(dev.Access) { + return false + } + } + return true +} diff --git a/vendor/github.com/containerd/cgroups/v2/errors.go b/vendor/github.com/containerd/cgroups/v2/errors.go new file mode 100644 index 00000000000..46d2d9c2e18 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/errors.go @@ -0,0 +1,50 @@ +/* + Copyright The containerd 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 v2 + +import ( + "errors" + "os" +) + +var ( + ErrInvalidPid = errors.New("cgroups: pid must be greater than 0") + ErrMountPointNotExist = errors.New("cgroups: cgroup mountpoint does not exist") + ErrInvalidFormat = errors.New("cgroups: parsing file with invalid format failed") + ErrFreezerNotSupported = errors.New("cgroups: freezer cgroup (v2) not supported on this system") + ErrMemoryNotSupported = errors.New("cgroups: memory cgroup (v2) not supported on this system") + ErrPidsNotSupported = errors.New("cgroups: pids cgroup (v2) not supported on this system") + ErrCPUNotSupported = errors.New("cgroups: cpu cgroup (v2) not supported on this system") + ErrCgroupDeleted = errors.New("cgroups: cgroup deleted") + ErrNoCgroupMountDestination = errors.New("cgroups: cannot find cgroup mount destination") + ErrInvalidGroupPath = errors.New("cgroups: invalid group path") +) + +// ErrorHandler is a function that handles and acts on errors +type ErrorHandler func(err error) error + +// IgnoreNotExist ignores any errors that are for not existing files +func IgnoreNotExist(err error) error { + if os.IsNotExist(err) { + return nil + } + return err +} + +func errPassthrough(err error) error { + return err +} diff --git a/vendor/github.com/containerd/cgroups/v2/hugetlb.go b/vendor/github.com/containerd/cgroups/v2/hugetlb.go new file mode 100644 index 00000000000..16b35bd780b --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/hugetlb.go @@ -0,0 +1,37 @@ +/* + Copyright The containerd 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 v2 + +import "strings" + +type HugeTlb []HugeTlbEntry + +type HugeTlbEntry struct { + HugePageSize string + Limit uint64 +} + +func (r *HugeTlb) Values() (o []Value) { + for _, e := range *r { + o = append(o, Value{ + filename: strings.Join([]string{"hugetlb", e.HugePageSize, "max"}, "."), + value: e.Limit, + }) + } + + return o +} diff --git a/vendor/github.com/containerd/cgroups/v2/io.go b/vendor/github.com/containerd/cgroups/v2/io.go new file mode 100644 index 00000000000..70078d576ec --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/io.go @@ -0,0 +1,64 @@ +/* + Copyright The containerd 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 v2 + +import "fmt" + +type IOType string + +const ( + ReadBPS IOType = "rbps" + WriteBPS IOType = "wbps" + ReadIOPS IOType = "riops" + WriteIOPS IOType = "wiops" +) + +type BFQ struct { + Weight uint16 +} + +type Entry struct { + Type IOType + Major int64 + Minor int64 + Rate uint64 +} + +func (e Entry) String() string { + return fmt.Sprintf("%d:%d %s=%d", e.Major, e.Minor, e.Type, e.Rate) +} + +type IO struct { + BFQ BFQ + Max []Entry +} + +func (i *IO) Values() (o []Value) { + if i.BFQ.Weight != 0 { + o = append(o, Value{ + filename: "io.bfq.weight", + value: i.BFQ.Weight, + }) + } + for _, e := range i.Max { + o = append(o, Value{ + filename: "io.max", + value: e.String(), + }) + } + return o +} diff --git a/vendor/github.com/containerd/cgroups/v2/manager.go b/vendor/github.com/containerd/cgroups/v2/manager.go new file mode 100644 index 00000000000..b1ec69ba45b --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/manager.go @@ -0,0 +1,782 @@ +/* + Copyright The containerd 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 v2 + +import ( + "bufio" + "fmt" + "io/ioutil" + "math" + "os" + "path/filepath" + "strconv" + "strings" + "sync" + "syscall" + "time" + + "golang.org/x/sys/unix" + + "github.com/containerd/cgroups/v2/stats" + "github.com/godbus/dbus/v5" + "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + + systemdDbus "github.com/coreos/go-systemd/v22/dbus" +) + +const ( + subtreeControl = "cgroup.subtree_control" + controllersFile = "cgroup.controllers" + defaultCgroup2Path = "/sys/fs/cgroup" + defaultSlice = "system.slice" +) + +var ( + canDelegate bool + once sync.Once +) + +type cgValuer interface { + Values() []Value +} + +type Event struct { + Low uint64 + High uint64 + Max uint64 + OOM uint64 + OOMKill uint64 +} + +// Resources for a cgroups v2 unified hierarchy +type Resources struct { + CPU *CPU + Memory *Memory + Pids *Pids + IO *IO + RDMA *RDMA + HugeTlb *HugeTlb + // When len(Devices) is zero, devices are not controlled + Devices []specs.LinuxDeviceCgroup +} + +// Values returns the raw filenames and values that +// can be written to the unified hierarchy +func (r *Resources) Values() (o []Value) { + if r.CPU != nil { + o = append(o, r.CPU.Values()...) + } + if r.Memory != nil { + o = append(o, r.Memory.Values()...) + } + if r.Pids != nil { + o = append(o, r.Pids.Values()...) + } + if r.IO != nil { + o = append(o, r.IO.Values()...) + } + if r.RDMA != nil { + o = append(o, r.RDMA.Values()...) + } + if r.HugeTlb != nil { + o = append(o, r.HugeTlb.Values()...) + } + return o +} + +// EnabledControllers returns the list of all not nil resource controllers +func (r *Resources) EnabledControllers() (c []string) { + if r.CPU != nil { + c = append(c, "cpu") + c = append(c, "cpuset") + } + if r.Memory != nil { + c = append(c, "memory") + } + if r.Pids != nil { + c = append(c, "pids") + } + if r.IO != nil { + c = append(c, "io") + } + if r.RDMA != nil { + c = append(c, "rdma") + } + if r.HugeTlb != nil { + c = append(c, "hugetlb") + } + return +} + +// Value of a cgroup setting +type Value struct { + filename string + value interface{} +} + +// write the value to the full, absolute path, of a unified hierarchy +func (c *Value) write(path string, perm os.FileMode) error { + var data []byte + switch t := c.value.(type) { + case uint64: + data = []byte(strconv.FormatUint(t, 10)) + case uint16: + data = []byte(strconv.FormatUint(uint64(t), 10)) + case int64: + data = []byte(strconv.FormatInt(t, 10)) + case []byte: + data = t + case string: + data = []byte(t) + case CPUMax: + data = []byte(t) + default: + return ErrInvalidFormat + } + return ioutil.WriteFile( + filepath.Join(path, c.filename), + data, + perm, + ) +} + +func writeValues(path string, values []Value) error { + for _, o := range values { + if err := o.write(path, defaultFilePerm); err != nil { + return err + } + } + return nil +} + +func NewManager(mountpoint string, group string, resources *Resources) (*Manager, error) { + if resources == nil { + return nil, errors.New("resources reference is nil") + } + if err := VerifyGroupPath(group); err != nil { + return nil, err + } + path := filepath.Join(mountpoint, group) + if err := os.MkdirAll(path, defaultDirPerm); err != nil { + return nil, err + } + m := Manager{ + unifiedMountpoint: mountpoint, + path: path, + } + if err := m.ToggleControllers(resources.EnabledControllers(), Enable); err != nil { + // clean up cgroup dir on failure + os.Remove(path) + return nil, err + } + if err := setResources(path, resources); err != nil { + os.Remove(path) + return nil, err + } + return &m, nil +} + +func LoadManager(mountpoint string, group string) (*Manager, error) { + if err := VerifyGroupPath(group); err != nil { + return nil, err + } + path := filepath.Join(mountpoint, group) + return &Manager{ + unifiedMountpoint: mountpoint, + path: path, + }, nil +} + +type Manager struct { + unifiedMountpoint string + path string +} + +func setResources(path string, resources *Resources) error { + if resources != nil { + if err := writeValues(path, resources.Values()); err != nil { + return err + } + if err := setDevices(path, resources.Devices); err != nil { + return err + } + } + return nil +} + +func (c *Manager) RootControllers() ([]string, error) { + b, err := ioutil.ReadFile(filepath.Join(c.unifiedMountpoint, controllersFile)) + if err != nil { + return nil, err + } + return strings.Fields(string(b)), nil +} + +func (c *Manager) Controllers() ([]string, error) { + b, err := ioutil.ReadFile(filepath.Join(c.path, controllersFile)) + if err != nil { + return nil, err + } + return strings.Fields(string(b)), nil +} + +type ControllerToggle int + +const ( + Enable ControllerToggle = iota + 1 + Disable +) + +func toggleFunc(controllers []string, prefix string) []string { + out := make([]string, len(controllers)) + for i, c := range controllers { + out[i] = prefix + c + } + return out +} + +func (c *Manager) ToggleControllers(controllers []string, t ControllerToggle) error { + // when c.path is like /foo/bar/baz, the following files need to be written: + // * /sys/fs/cgroup/cgroup.subtree_control + // * /sys/fs/cgroup/foo/cgroup.subtree_control + // * /sys/fs/cgroup/foo/bar/cgroup.subtree_control + // Note that /sys/fs/cgroup/foo/bar/baz/cgroup.subtree_control does not need to be written. + split := strings.Split(c.path, "/") + var lastErr error + for i, _ := range split { + f := strings.Join(split[:i], "/") + if !strings.HasPrefix(f, c.unifiedMountpoint) || f == c.path { + continue + } + filePath := filepath.Join(f, subtreeControl) + if err := c.writeSubtreeControl(filePath, controllers, t); err != nil { + // When running as rootless, the user may face EPERM on parent groups, but it is neglible when the + // controller is already written. + // So we only return the last error. + lastErr = errors.Wrapf(err, "failed to write subtree controllers %+v to %q", controllers, filePath) + } + } + return lastErr +} + +func (c *Manager) writeSubtreeControl(filePath string, controllers []string, t ControllerToggle) error { + f, err := os.OpenFile(filePath, os.O_WRONLY, 0) + if err != nil { + return err + } + defer f.Close() + switch t { + case Enable: + controllers = toggleFunc(controllers, "+") + case Disable: + controllers = toggleFunc(controllers, "-") + } + _, err = f.WriteString(strings.Join(controllers, " ")) + return err +} + +func (c *Manager) NewChild(name string, resources *Resources) (*Manager, error) { + if strings.HasPrefix(name, "/") { + return nil, errors.New("name must be relative") + } + path := filepath.Join(c.path, name) + if err := os.MkdirAll(path, defaultDirPerm); err != nil { + return nil, err + } + if err := setResources(path, resources); err != nil { + // clean up cgroup dir on failure + os.Remove(path) + return nil, err + } + return &Manager{ + unifiedMountpoint: c.unifiedMountpoint, + path: path, + }, nil +} + +func (c *Manager) AddProc(pid uint64) error { + v := Value{ + filename: cgroupProcs, + value: pid, + } + return writeValues(c.path, []Value{v}) +} + +func (c *Manager) Delete() error { + return remove(c.path) +} + +func (c *Manager) Procs(recursive bool) ([]uint64, error) { + var processes []uint64 + err := filepath.Walk(c.path, func(p string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if !recursive && info.IsDir() { + if p == c.path { + return nil + } + return filepath.SkipDir + } + _, name := filepath.Split(p) + if name != cgroupProcs { + return nil + } + procs, err := parseCgroupProcsFile(p) + if err != nil { + return err + } + processes = append(processes, procs...) + return nil + }) + return processes, err +} + +var singleValueFiles = []string{ + "pids.current", + "pids.max", +} + +func (c *Manager) Stat() (*stats.Metrics, error) { + controllers, err := c.Controllers() + if err != nil { + return nil, err + } + out := make(map[string]interface{}) + for _, controller := range controllers { + switch controller { + case "cpu", "memory": + filename := fmt.Sprintf("%s.stat", controller) + if err := readKVStatsFile(c.path, filename, out); err != nil { + if os.IsNotExist(err) { + continue + } + return nil, err + } + } + } + for _, name := range singleValueFiles { + if err := readSingleFile(c.path, name, out); err != nil { + if os.IsNotExist(err) { + continue + } + return nil, err + } + } + memoryEvents := make(map[string]interface{}) + if err := readKVStatsFile(c.path, "memory.events", memoryEvents); err != nil { + if !os.IsNotExist(err) { + return nil, err + } + } + var metrics stats.Metrics + + metrics.Pids = &stats.PidsStat{ + Current: getPidValue("pids.current", out), + Limit: getPidValue("pids.max", out), + } + metrics.CPU = &stats.CPUStat{ + UsageUsec: getUint64Value("usage_usec", out), + UserUsec: getUint64Value("user_usec", out), + SystemUsec: getUint64Value("system_usec", out), + NrPeriods: getUint64Value("nr_periods", out), + NrThrottled: getUint64Value("nr_throttled", out), + ThrottledUsec: getUint64Value("throttled_usec", out), + } + metrics.Memory = &stats.MemoryStat{ + Anon: getUint64Value("anon", out), + File: getUint64Value("file", out), + KernelStack: getUint64Value("kernel_stack", out), + Slab: getUint64Value("slab", out), + Sock: getUint64Value("sock", out), + Shmem: getUint64Value("shmem", out), + FileMapped: getUint64Value("file_mapped", out), + FileDirty: getUint64Value("file_dirty", out), + FileWriteback: getUint64Value("file_writeback", out), + AnonThp: getUint64Value("anon_thp", out), + InactiveAnon: getUint64Value("inactive_anon", out), + ActiveAnon: getUint64Value("active_anon", out), + InactiveFile: getUint64Value("inactive_file", out), + ActiveFile: getUint64Value("active_file", out), + Unevictable: getUint64Value("unevictable", out), + SlabReclaimable: getUint64Value("slab_reclaimable", out), + SlabUnreclaimable: getUint64Value("slab_unreclaimable", out), + Pgfault: getUint64Value("pgfault", out), + Pgmajfault: getUint64Value("pgmajfault", out), + WorkingsetRefault: getUint64Value("workingset_refault", out), + WorkingsetActivate: getUint64Value("workingset_activate", out), + WorkingsetNodereclaim: getUint64Value("workingset_nodereclaim", out), + Pgrefill: getUint64Value("pgrefill", out), + Pgscan: getUint64Value("pgscan", out), + Pgsteal: getUint64Value("pgsteal", out), + Pgactivate: getUint64Value("pgactivate", out), + Pgdeactivate: getUint64Value("pgdeactivate", out), + Pglazyfree: getUint64Value("pglazyfree", out), + Pglazyfreed: getUint64Value("pglazyfreed", out), + ThpFaultAlloc: getUint64Value("thp_fault_alloc", out), + ThpCollapseAlloc: getUint64Value("thp_collapse_alloc", out), + Usage: getStatFileContentUint64(filepath.Join(c.path, "memory.current")), + UsageLimit: getStatFileContentUint64(filepath.Join(c.path, "memory.max")), + SwapUsage: getStatFileContentUint64(filepath.Join(c.path, "memory.swap.current")), + SwapLimit: getStatFileContentUint64(filepath.Join(c.path, "memory.swap.max")), + } + if len(memoryEvents) > 0 { + metrics.MemoryEvents = &stats.MemoryEvents{ + Low: getUint64Value("low", memoryEvents), + High: getUint64Value("high", memoryEvents), + Max: getUint64Value("max", memoryEvents), + Oom: getUint64Value("oom", memoryEvents), + OomKill: getUint64Value("oom_kill", memoryEvents), + } + } + metrics.Io = &stats.IOStat{Usage: readIoStats(c.path)} + metrics.Rdma = &stats.RdmaStat{ + Current: rdmaStats(filepath.Join(c.path, "rdma.current")), + Limit: rdmaStats(filepath.Join(c.path, "rdma.max")), + } + metrics.Hugetlb = readHugeTlbStats(c.path) + + return &metrics, nil +} + +func getUint64Value(key string, out map[string]interface{}) uint64 { + v, ok := out[key] + if !ok { + return 0 + } + switch t := v.(type) { + case uint64: + return t + } + return 0 +} + +func getPidValue(key string, out map[string]interface{}) uint64 { + v, ok := out[key] + if !ok { + return 0 + } + switch t := v.(type) { + case uint64: + return t + case string: + if t == "max" { + return math.MaxUint64 + } + } + return 0 +} + +func readSingleFile(path string, file string, out map[string]interface{}) error { + f, err := os.Open(filepath.Join(path, file)) + if err != nil { + return err + } + defer f.Close() + data, err := ioutil.ReadAll(f) + if err != nil { + return err + } + s := strings.TrimSpace(string(data)) + v, err := parseUint(s, 10, 64) + if err != nil { + // if we cannot parse as a uint, parse as a string + out[file] = s + return nil + } + out[file] = v + return nil +} + +func readKVStatsFile(path string, file string, out map[string]interface{}) error { + f, err := os.Open(filepath.Join(path, file)) + if err != nil { + return err + } + defer f.Close() + + s := bufio.NewScanner(f) + for s.Scan() { + name, value, err := parseKV(s.Text()) + if err != nil { + return errors.Wrapf(err, "error while parsing %s (line=%q)", filepath.Join(path, file), s.Text()) + } + out[name] = value + } + return s.Err() +} + +func (c *Manager) Freeze() error { + return c.freeze(c.path, Frozen) +} + +func (c *Manager) Thaw() error { + return c.freeze(c.path, Thawed) +} + +func (c *Manager) freeze(path string, state State) error { + values := state.Values() + for { + if err := writeValues(path, values); err != nil { + return err + } + current, err := fetchState(path) + if err != nil { + return err + } + if current == state { + return nil + } + time.Sleep(1 * time.Millisecond) + } +} + +// MemoryEventFD returns inotify file descriptor and 'memory.events' inotify watch descriptor +func (c *Manager) MemoryEventFD() (int, uint32, error) { + fpath := filepath.Join(c.path, "memory.events") + fd, err := syscall.InotifyInit() + if err != nil { + return 0, 0, errors.Errorf("Failed to create inotify fd") + } + wd, err := syscall.InotifyAddWatch(fd, fpath, unix.IN_MODIFY) + if wd < 0 { + syscall.Close(fd) + return 0, 0, errors.Errorf("Failed to add inotify watch for %q", fpath) + } + + return fd, uint32(wd), nil +} + +func (c *Manager) EventChan() (<-chan Event, <-chan error) { + ec := make(chan Event) + errCh := make(chan error) + go c.waitForEvents(ec, errCh) + + return ec, nil +} + +func (c *Manager) waitForEvents(ec chan<- Event, errCh chan<- error) { + fd, wd, err := c.MemoryEventFD() + + defer syscall.InotifyRmWatch(fd, wd) + defer syscall.Close(fd) + + if err != nil { + errCh <- err + return + } + + for { + buffer := make([]byte, syscall.SizeofInotifyEvent*10) + bytesRead, err := syscall.Read(fd, buffer) + if err != nil { + errCh <- err + return + } + if bytesRead >= syscall.SizeofInotifyEvent { + out := make(map[string]interface{}) + if err := readKVStatsFile(c.path, "memory.events", out); err == nil { + e := Event{} + if v, ok := out["high"]; ok { + e.High, ok = v.(uint64) + if !ok { + errCh <- errors.Errorf("cannot convert high to uint64: %+v", v) + return + } + } + if v, ok := out["low"]; ok { + e.Low, ok = v.(uint64) + if !ok { + errCh <- errors.Errorf("cannot convert low to uint64: %+v", v) + return + } + } + if v, ok := out["max"]; ok { + e.Max, ok = v.(uint64) + if !ok { + errCh <- errors.Errorf("cannot convert max to uint64: %+v", v) + return + } + } + if v, ok := out["oom"]; ok { + e.OOM, ok = v.(uint64) + if !ok { + errCh <- errors.Errorf("cannot convert oom to uint64: %+v", v) + return + } + } + if v, ok := out["oom_kill"]; ok { + e.OOMKill, ok = v.(uint64) + if !ok { + errCh <- errors.Errorf("cannot convert oom_kill to uint64: %+v", v) + return + } + } + ec <- e + } else { + errCh <- err + return + } + } + } +} + +func setDevices(path string, devices []specs.LinuxDeviceCgroup) error { + if len(devices) == 0 { + return nil + } + insts, license, err := DeviceFilter(devices) + if err != nil { + return err + } + dirFD, err := unix.Open(path, unix.O_DIRECTORY|unix.O_RDONLY, 0600) + if err != nil { + return errors.Errorf("cannot get dir FD for %s", path) + } + defer unix.Close(dirFD) + if _, err := LoadAttachCgroupDeviceFilter(insts, license, dirFD); err != nil { + if !canSkipEBPFError(devices) { + return err + } + } + return nil +} + +func NewSystemd(slice, group string, pid int, resources *Resources) (*Manager, error) { + if slice == "" { + slice = defaultSlice + } + path := filepath.Join(defaultCgroup2Path, slice, group) + conn, err := systemdDbus.New() + if err != nil { + return &Manager{}, err + } + defer conn.Close() + + properties := []systemdDbus.Property{ + systemdDbus.PropDescription(fmt.Sprintf("cgroup %s", group)), + newSystemdProperty("DefaultDependencies", false), + newSystemdProperty("MemoryAccounting", true), + newSystemdProperty("CPUAccounting", true), + newSystemdProperty("IOAccounting", true), + } + + // if we create a slice, the parent is defined via a Wants= + if strings.HasSuffix(group, ".slice") { + properties = append(properties, systemdDbus.PropWants(defaultSlice)) + } else { + // otherwise, we use Slice= + properties = append(properties, systemdDbus.PropSlice(defaultSlice)) + } + + // only add pid if its valid, -1 is used w/ general slice creation. + if pid != -1 { + properties = append(properties, newSystemdProperty("PIDs", []uint32{uint32(pid)})) + } + + if resources.Memory != nil && *resources.Memory.Max != 0 { + properties = append(properties, + newSystemdProperty("MemoryMax", uint64(*resources.Memory.Max))) + } + + if resources.CPU != nil && *resources.CPU.Weight != 0 { + properties = append(properties, + newSystemdProperty("CPUWeight", *resources.CPU.Weight)) + } + + if resources.CPU != nil && resources.CPU.Max != "" { + quota, period := resources.CPU.Max.extractQuotaAndPeriod() + // cpu.cfs_quota_us and cpu.cfs_period_us are controlled by systemd. + // corresponds to USEC_INFINITY in systemd + // if USEC_INFINITY is provided, CPUQuota is left unbound by systemd + // always setting a property value ensures we can apply a quota and remove it later + cpuQuotaPerSecUSec := uint64(math.MaxUint64) + if quota > 0 { + // systemd converts CPUQuotaPerSecUSec (microseconds per CPU second) to CPUQuota + // (integer percentage of CPU) internally. This means that if a fractional percent of + // CPU is indicated by Resources.CpuQuota, we need to round up to the nearest + // 10ms (1% of a second) such that child cgroups can set the cpu.cfs_quota_us they expect. + cpuQuotaPerSecUSec = uint64(quota*1000000) / period + if cpuQuotaPerSecUSec%10000 != 0 { + cpuQuotaPerSecUSec = ((cpuQuotaPerSecUSec / 10000) + 1) * 10000 + } + } + properties = append(properties, + newSystemdProperty("CPUQuotaPerSecUSec", cpuQuotaPerSecUSec)) + } + + // If we can delegate, we add the property back in + if canDelegate { + properties = append(properties, newSystemdProperty("Delegate", true)) + } + + if resources.Pids != nil && resources.Pids.Max > 0 { + properties = append(properties, + newSystemdProperty("TasksAccounting", true), + newSystemdProperty("TasksMax", uint64(resources.Pids.Max))) + } + + statusChan := make(chan string, 1) + if _, err := conn.StartTransientUnit(group, "replace", properties, statusChan); err == nil { + select { + case <-statusChan: + case <-time.After(time.Second): + logrus.Warnf("Timed out while waiting for StartTransientUnit(%s) completion signal from dbus. Continuing...", group) + } + } else if !isUnitExists(err) { + return &Manager{}, err + } + + return &Manager{ + path: path, + }, nil +} + +func LoadSystemd(slice, group string) (*Manager, error) { + if slice == "" { + slice = defaultSlice + } + group = filepath.Join(defaultCgroup2Path, slice, group) + return &Manager{ + path: group, + }, nil +} + +func (c *Manager) DeleteSystemd() error { + conn, err := systemdDbus.New() + if err != nil { + return err + } + defer conn.Close() + group := systemdUnitFromPath(c.path) + ch := make(chan string) + _, err = conn.StopUnit(group, "replace", ch) + if err != nil { + return err + } + <-ch + return nil +} + +func newSystemdProperty(name string, units interface{}) systemdDbus.Property { + return systemdDbus.Property{ + Name: name, + Value: dbus.MakeVariant(units), + } +} diff --git a/vendor/github.com/containerd/cgroups/v2/memory.go b/vendor/github.com/containerd/cgroups/v2/memory.go new file mode 100644 index 00000000000..72f94b738b8 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/memory.go @@ -0,0 +1,52 @@ +/* + Copyright The containerd 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 v2 + +type Memory struct { + Swap *int64 + Max *int64 + Low *int64 + High *int64 +} + +func (r *Memory) Values() (o []Value) { + if r.Swap != nil { + o = append(o, Value{ + filename: "memory.swap.max", + value: *r.Swap, + }) + } + if r.Max != nil { + o = append(o, Value{ + filename: "memory.max", + value: *r.Max, + }) + } + if r.Low != nil { + o = append(o, Value{ + filename: "memory.low", + value: *r.Low, + }) + } + if r.High != nil { + o = append(o, Value{ + filename: "memory.high", + value: *r.High, + }) + } + return o +} diff --git a/vendor/github.com/containerd/cgroups/v2/paths.go b/vendor/github.com/containerd/cgroups/v2/paths.go new file mode 100644 index 00000000000..6f2f5edb3d9 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/paths.go @@ -0,0 +1,60 @@ +/* + Copyright The containerd 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 v2 + +import ( + "fmt" + "path/filepath" + "strings" +) + +// NestedGroupPath will nest the cgroups based on the calling processes cgroup +// placing its child processes inside its own path +func NestedGroupPath(suffix string) (string, error) { + path, err := parseCgroupFile("/proc/self/cgroup") + if err != nil { + return "", err + } + return filepath.Join(string(path), suffix), nil +} + +// PidGroupPath will return the correct cgroup paths for an existing process running inside a cgroup +// This is commonly used for the Load function to restore an existing container +func PidGroupPath(pid int) (string, error) { + p := fmt.Sprintf("/proc/%d/cgroup", pid) + return parseCgroupFile(p) +} + +// VerifyGroupPath verifies the format of group path string g. +// The format is same as the third field in /proc/PID/cgroup. +// e.g. "/user.slice/user-1001.slice/session-1.scope" +// +// g must be a "clean" absolute path starts with "/", and must not contain "/sys/fs/cgroup" prefix. +// +// VerifyGroupPath doesn't verify whether g actually exists on the system. +func VerifyGroupPath(g string) error { + if !strings.HasPrefix(g, "/") { + return ErrInvalidGroupPath + } + if filepath.Clean(g) != g { + return ErrInvalidGroupPath + } + if strings.HasPrefix(g, "/sys/fs/cgroup") { + return ErrInvalidGroupPath + } + return nil +} diff --git a/vendor/github.com/containerd/cgroups/v2/pids.go b/vendor/github.com/containerd/cgroups/v2/pids.go new file mode 100644 index 00000000000..0b5aa0c3bf7 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/pids.go @@ -0,0 +1,37 @@ +/* + Copyright The containerd 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 v2 + +import "strconv" + +type Pids struct { + Max int64 +} + +func (r *Pids) Values() (o []Value) { + if r.Max != 0 { + limit := "max" + if r.Max > 0 { + limit = strconv.FormatInt(r.Max, 10) + } + o = append(o, Value{ + filename: "pids.max", + value: limit, + }) + } + return o +} diff --git a/vendor/github.com/containerd/cgroups/v2/rdma.go b/vendor/github.com/containerd/cgroups/v2/rdma.go new file mode 100644 index 00000000000..44caa4f57a3 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/rdma.go @@ -0,0 +1,46 @@ +/* + Copyright The containerd 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 v2 + +import ( + "fmt" +) + +type RDMA struct { + Limit []RDMAEntry +} + +type RDMAEntry struct { + Device string + HcaHandles uint32 + HcaObjects uint32 +} + +func (r RDMAEntry) String() string { + return fmt.Sprintf("%s hca_handle=%d hca_object=%d", r.Device, r.HcaHandles, r.HcaObjects) +} + +func (r *RDMA) Values() (o []Value) { + for _, e := range r.Limit { + o = append(o, Value{ + filename: "rdma.max", + value: e.String(), + }) + } + + return o +} diff --git a/vendor/github.com/containerd/cgroups/v2/state.go b/vendor/github.com/containerd/cgroups/v2/state.go new file mode 100644 index 00000000000..09b75b6c3dd --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/state.go @@ -0,0 +1,65 @@ +/* + Copyright The containerd 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 v2 + +import ( + "io/ioutil" + "path/filepath" + "strings" +) + +// State is a type that represents the state of the current cgroup +type State string + +const ( + Unknown State = "" + Thawed State = "thawed" + Frozen State = "frozen" + Deleted State = "deleted" + + cgroupFreeze = "cgroup.freeze" +) + +func (s State) Values() []Value { + v := Value{ + filename: cgroupFreeze, + } + switch s { + case Frozen: + v.value = "1" + case Thawed: + v.value = "0" + } + return []Value{ + v, + } +} + +func fetchState(path string) (State, error) { + current, err := ioutil.ReadFile(filepath.Join(path, cgroupFreeze)) + if err != nil { + return Unknown, err + } + switch strings.TrimSpace(string(current)) { + case "1": + return Frozen, nil + case "0": + return Thawed, nil + default: + return Unknown, nil + } +} diff --git a/vendor/github.com/containerd/cgroups/v2/stats/doc.go b/vendor/github.com/containerd/cgroups/v2/stats/doc.go new file mode 100644 index 00000000000..e51e12f8004 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/stats/doc.go @@ -0,0 +1,17 @@ +/* + Copyright The containerd 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 stats diff --git a/vendor/github.com/containerd/cgroups/v2/stats/metrics.pb.go b/vendor/github.com/containerd/cgroups/v2/stats/metrics.pb.go new file mode 100644 index 00000000000..dd54edb69a1 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/stats/metrics.pb.go @@ -0,0 +1,3950 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: github.com/containerd/cgroups/v2/stats/metrics.proto + +package stats + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Metrics struct { + Pids *PidsStat `protobuf:"bytes,1,opt,name=pids,proto3" json:"pids,omitempty"` + CPU *CPUStat `protobuf:"bytes,2,opt,name=cpu,proto3" json:"cpu,omitempty"` + Memory *MemoryStat `protobuf:"bytes,4,opt,name=memory,proto3" json:"memory,omitempty"` + Rdma *RdmaStat `protobuf:"bytes,5,opt,name=rdma,proto3" json:"rdma,omitempty"` + Io *IOStat `protobuf:"bytes,6,opt,name=io,proto3" json:"io,omitempty"` + Hugetlb []*HugeTlbStat `protobuf:"bytes,7,rep,name=hugetlb,proto3" json:"hugetlb,omitempty"` + MemoryEvents *MemoryEvents `protobuf:"bytes,8,opt,name=memory_events,json=memoryEvents,proto3" json:"memory_events,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Metrics) Reset() { *m = Metrics{} } +func (*Metrics) ProtoMessage() {} +func (*Metrics) Descriptor() ([]byte, []int) { + return fileDescriptor_2fc6005842049e6b, []int{0} +} +func (m *Metrics) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Metrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Metrics.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Metrics) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metrics.Merge(m, src) +} +func (m *Metrics) XXX_Size() int { + return m.Size() +} +func (m *Metrics) XXX_DiscardUnknown() { + xxx_messageInfo_Metrics.DiscardUnknown(m) +} + +var xxx_messageInfo_Metrics proto.InternalMessageInfo + +type PidsStat struct { + Current uint64 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"` + Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PidsStat) Reset() { *m = PidsStat{} } +func (*PidsStat) ProtoMessage() {} +func (*PidsStat) Descriptor() ([]byte, []int) { + return fileDescriptor_2fc6005842049e6b, []int{1} +} +func (m *PidsStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PidsStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PidsStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PidsStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_PidsStat.Merge(m, src) +} +func (m *PidsStat) XXX_Size() int { + return m.Size() +} +func (m *PidsStat) XXX_DiscardUnknown() { + xxx_messageInfo_PidsStat.DiscardUnknown(m) +} + +var xxx_messageInfo_PidsStat proto.InternalMessageInfo + +type CPUStat struct { + UsageUsec uint64 `protobuf:"varint,1,opt,name=usage_usec,json=usageUsec,proto3" json:"usage_usec,omitempty"` + UserUsec uint64 `protobuf:"varint,2,opt,name=user_usec,json=userUsec,proto3" json:"user_usec,omitempty"` + SystemUsec uint64 `protobuf:"varint,3,opt,name=system_usec,json=systemUsec,proto3" json:"system_usec,omitempty"` + NrPeriods uint64 `protobuf:"varint,4,opt,name=nr_periods,json=nrPeriods,proto3" json:"nr_periods,omitempty"` + NrThrottled uint64 `protobuf:"varint,5,opt,name=nr_throttled,json=nrThrottled,proto3" json:"nr_throttled,omitempty"` + ThrottledUsec uint64 `protobuf:"varint,6,opt,name=throttled_usec,json=throttledUsec,proto3" json:"throttled_usec,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CPUStat) Reset() { *m = CPUStat{} } +func (*CPUStat) ProtoMessage() {} +func (*CPUStat) Descriptor() ([]byte, []int) { + return fileDescriptor_2fc6005842049e6b, []int{2} +} +func (m *CPUStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CPUStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CPUStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CPUStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_CPUStat.Merge(m, src) +} +func (m *CPUStat) XXX_Size() int { + return m.Size() +} +func (m *CPUStat) XXX_DiscardUnknown() { + xxx_messageInfo_CPUStat.DiscardUnknown(m) +} + +var xxx_messageInfo_CPUStat proto.InternalMessageInfo + +type MemoryStat struct { + Anon uint64 `protobuf:"varint,1,opt,name=anon,proto3" json:"anon,omitempty"` + File uint64 `protobuf:"varint,2,opt,name=file,proto3" json:"file,omitempty"` + KernelStack uint64 `protobuf:"varint,3,opt,name=kernel_stack,json=kernelStack,proto3" json:"kernel_stack,omitempty"` + Slab uint64 `protobuf:"varint,4,opt,name=slab,proto3" json:"slab,omitempty"` + Sock uint64 `protobuf:"varint,5,opt,name=sock,proto3" json:"sock,omitempty"` + Shmem uint64 `protobuf:"varint,6,opt,name=shmem,proto3" json:"shmem,omitempty"` + FileMapped uint64 `protobuf:"varint,7,opt,name=file_mapped,json=fileMapped,proto3" json:"file_mapped,omitempty"` + FileDirty uint64 `protobuf:"varint,8,opt,name=file_dirty,json=fileDirty,proto3" json:"file_dirty,omitempty"` + FileWriteback uint64 `protobuf:"varint,9,opt,name=file_writeback,json=fileWriteback,proto3" json:"file_writeback,omitempty"` + AnonThp uint64 `protobuf:"varint,10,opt,name=anon_thp,json=anonThp,proto3" json:"anon_thp,omitempty"` + InactiveAnon uint64 `protobuf:"varint,11,opt,name=inactive_anon,json=inactiveAnon,proto3" json:"inactive_anon,omitempty"` + ActiveAnon uint64 `protobuf:"varint,12,opt,name=active_anon,json=activeAnon,proto3" json:"active_anon,omitempty"` + InactiveFile uint64 `protobuf:"varint,13,opt,name=inactive_file,json=inactiveFile,proto3" json:"inactive_file,omitempty"` + ActiveFile uint64 `protobuf:"varint,14,opt,name=active_file,json=activeFile,proto3" json:"active_file,omitempty"` + Unevictable uint64 `protobuf:"varint,15,opt,name=unevictable,proto3" json:"unevictable,omitempty"` + SlabReclaimable uint64 `protobuf:"varint,16,opt,name=slab_reclaimable,json=slabReclaimable,proto3" json:"slab_reclaimable,omitempty"` + SlabUnreclaimable uint64 `protobuf:"varint,17,opt,name=slab_unreclaimable,json=slabUnreclaimable,proto3" json:"slab_unreclaimable,omitempty"` + Pgfault uint64 `protobuf:"varint,18,opt,name=pgfault,proto3" json:"pgfault,omitempty"` + Pgmajfault uint64 `protobuf:"varint,19,opt,name=pgmajfault,proto3" json:"pgmajfault,omitempty"` + WorkingsetRefault uint64 `protobuf:"varint,20,opt,name=workingset_refault,json=workingsetRefault,proto3" json:"workingset_refault,omitempty"` + WorkingsetActivate uint64 `protobuf:"varint,21,opt,name=workingset_activate,json=workingsetActivate,proto3" json:"workingset_activate,omitempty"` + WorkingsetNodereclaim uint64 `protobuf:"varint,22,opt,name=workingset_nodereclaim,json=workingsetNodereclaim,proto3" json:"workingset_nodereclaim,omitempty"` + Pgrefill uint64 `protobuf:"varint,23,opt,name=pgrefill,proto3" json:"pgrefill,omitempty"` + Pgscan uint64 `protobuf:"varint,24,opt,name=pgscan,proto3" json:"pgscan,omitempty"` + Pgsteal uint64 `protobuf:"varint,25,opt,name=pgsteal,proto3" json:"pgsteal,omitempty"` + Pgactivate uint64 `protobuf:"varint,26,opt,name=pgactivate,proto3" json:"pgactivate,omitempty"` + Pgdeactivate uint64 `protobuf:"varint,27,opt,name=pgdeactivate,proto3" json:"pgdeactivate,omitempty"` + Pglazyfree uint64 `protobuf:"varint,28,opt,name=pglazyfree,proto3" json:"pglazyfree,omitempty"` + Pglazyfreed uint64 `protobuf:"varint,29,opt,name=pglazyfreed,proto3" json:"pglazyfreed,omitempty"` + ThpFaultAlloc uint64 `protobuf:"varint,30,opt,name=thp_fault_alloc,json=thpFaultAlloc,proto3" json:"thp_fault_alloc,omitempty"` + ThpCollapseAlloc uint64 `protobuf:"varint,31,opt,name=thp_collapse_alloc,json=thpCollapseAlloc,proto3" json:"thp_collapse_alloc,omitempty"` + Usage uint64 `protobuf:"varint,32,opt,name=usage,proto3" json:"usage,omitempty"` + UsageLimit uint64 `protobuf:"varint,33,opt,name=usage_limit,json=usageLimit,proto3" json:"usage_limit,omitempty"` + SwapUsage uint64 `protobuf:"varint,34,opt,name=swap_usage,json=swapUsage,proto3" json:"swap_usage,omitempty"` + SwapLimit uint64 `protobuf:"varint,35,opt,name=swap_limit,json=swapLimit,proto3" json:"swap_limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemoryStat) Reset() { *m = MemoryStat{} } +func (*MemoryStat) ProtoMessage() {} +func (*MemoryStat) Descriptor() ([]byte, []int) { + return fileDescriptor_2fc6005842049e6b, []int{3} +} +func (m *MemoryStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MemoryStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MemoryStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MemoryStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemoryStat.Merge(m, src) +} +func (m *MemoryStat) XXX_Size() int { + return m.Size() +} +func (m *MemoryStat) XXX_DiscardUnknown() { + xxx_messageInfo_MemoryStat.DiscardUnknown(m) +} + +var xxx_messageInfo_MemoryStat proto.InternalMessageInfo + +type MemoryEvents struct { + Low uint64 `protobuf:"varint,1,opt,name=low,proto3" json:"low,omitempty"` + High uint64 `protobuf:"varint,2,opt,name=high,proto3" json:"high,omitempty"` + Max uint64 `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty"` + Oom uint64 `protobuf:"varint,4,opt,name=oom,proto3" json:"oom,omitempty"` + OomKill uint64 `protobuf:"varint,5,opt,name=oom_kill,json=oomKill,proto3" json:"oom_kill,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemoryEvents) Reset() { *m = MemoryEvents{} } +func (*MemoryEvents) ProtoMessage() {} +func (*MemoryEvents) Descriptor() ([]byte, []int) { + return fileDescriptor_2fc6005842049e6b, []int{4} +} +func (m *MemoryEvents) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MemoryEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MemoryEvents.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MemoryEvents) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemoryEvents.Merge(m, src) +} +func (m *MemoryEvents) XXX_Size() int { + return m.Size() +} +func (m *MemoryEvents) XXX_DiscardUnknown() { + xxx_messageInfo_MemoryEvents.DiscardUnknown(m) +} + +var xxx_messageInfo_MemoryEvents proto.InternalMessageInfo + +type RdmaStat struct { + Current []*RdmaEntry `protobuf:"bytes,1,rep,name=current,proto3" json:"current,omitempty"` + Limit []*RdmaEntry `protobuf:"bytes,2,rep,name=limit,proto3" json:"limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RdmaStat) Reset() { *m = RdmaStat{} } +func (*RdmaStat) ProtoMessage() {} +func (*RdmaStat) Descriptor() ([]byte, []int) { + return fileDescriptor_2fc6005842049e6b, []int{5} +} +func (m *RdmaStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RdmaStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RdmaStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RdmaStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_RdmaStat.Merge(m, src) +} +func (m *RdmaStat) XXX_Size() int { + return m.Size() +} +func (m *RdmaStat) XXX_DiscardUnknown() { + xxx_messageInfo_RdmaStat.DiscardUnknown(m) +} + +var xxx_messageInfo_RdmaStat proto.InternalMessageInfo + +type RdmaEntry struct { + Device string `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` + HcaHandles uint32 `protobuf:"varint,2,opt,name=hca_handles,json=hcaHandles,proto3" json:"hca_handles,omitempty"` + HcaObjects uint32 `protobuf:"varint,3,opt,name=hca_objects,json=hcaObjects,proto3" json:"hca_objects,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RdmaEntry) Reset() { *m = RdmaEntry{} } +func (*RdmaEntry) ProtoMessage() {} +func (*RdmaEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_2fc6005842049e6b, []int{6} +} +func (m *RdmaEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RdmaEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RdmaEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RdmaEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_RdmaEntry.Merge(m, src) +} +func (m *RdmaEntry) XXX_Size() int { + return m.Size() +} +func (m *RdmaEntry) XXX_DiscardUnknown() { + xxx_messageInfo_RdmaEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_RdmaEntry proto.InternalMessageInfo + +type IOStat struct { + Usage []*IOEntry `protobuf:"bytes,1,rep,name=usage,proto3" json:"usage,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IOStat) Reset() { *m = IOStat{} } +func (*IOStat) ProtoMessage() {} +func (*IOStat) Descriptor() ([]byte, []int) { + return fileDescriptor_2fc6005842049e6b, []int{7} +} +func (m *IOStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IOStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IOStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *IOStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_IOStat.Merge(m, src) +} +func (m *IOStat) XXX_Size() int { + return m.Size() +} +func (m *IOStat) XXX_DiscardUnknown() { + xxx_messageInfo_IOStat.DiscardUnknown(m) +} + +var xxx_messageInfo_IOStat proto.InternalMessageInfo + +type IOEntry struct { + Major uint64 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"` + Minor uint64 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"` + Rbytes uint64 `protobuf:"varint,3,opt,name=rbytes,proto3" json:"rbytes,omitempty"` + Wbytes uint64 `protobuf:"varint,4,opt,name=wbytes,proto3" json:"wbytes,omitempty"` + Rios uint64 `protobuf:"varint,5,opt,name=rios,proto3" json:"rios,omitempty"` + Wios uint64 `protobuf:"varint,6,opt,name=wios,proto3" json:"wios,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IOEntry) Reset() { *m = IOEntry{} } +func (*IOEntry) ProtoMessage() {} +func (*IOEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_2fc6005842049e6b, []int{8} +} +func (m *IOEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IOEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IOEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *IOEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_IOEntry.Merge(m, src) +} +func (m *IOEntry) XXX_Size() int { + return m.Size() +} +func (m *IOEntry) XXX_DiscardUnknown() { + xxx_messageInfo_IOEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_IOEntry proto.InternalMessageInfo + +type HugeTlbStat struct { + Current uint64 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"` + Max uint64 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"` + Pagesize string `protobuf:"bytes,3,opt,name=pagesize,proto3" json:"pagesize,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HugeTlbStat) Reset() { *m = HugeTlbStat{} } +func (*HugeTlbStat) ProtoMessage() {} +func (*HugeTlbStat) Descriptor() ([]byte, []int) { + return fileDescriptor_2fc6005842049e6b, []int{9} +} +func (m *HugeTlbStat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HugeTlbStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HugeTlbStat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HugeTlbStat) XXX_Merge(src proto.Message) { + xxx_messageInfo_HugeTlbStat.Merge(m, src) +} +func (m *HugeTlbStat) XXX_Size() int { + return m.Size() +} +func (m *HugeTlbStat) XXX_DiscardUnknown() { + xxx_messageInfo_HugeTlbStat.DiscardUnknown(m) +} + +var xxx_messageInfo_HugeTlbStat proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Metrics)(nil), "io.containerd.cgroups.v2.Metrics") + proto.RegisterType((*PidsStat)(nil), "io.containerd.cgroups.v2.PidsStat") + proto.RegisterType((*CPUStat)(nil), "io.containerd.cgroups.v2.CPUStat") + proto.RegisterType((*MemoryStat)(nil), "io.containerd.cgroups.v2.MemoryStat") + proto.RegisterType((*MemoryEvents)(nil), "io.containerd.cgroups.v2.MemoryEvents") + proto.RegisterType((*RdmaStat)(nil), "io.containerd.cgroups.v2.RdmaStat") + proto.RegisterType((*RdmaEntry)(nil), "io.containerd.cgroups.v2.RdmaEntry") + proto.RegisterType((*IOStat)(nil), "io.containerd.cgroups.v2.IOStat") + proto.RegisterType((*IOEntry)(nil), "io.containerd.cgroups.v2.IOEntry") + proto.RegisterType((*HugeTlbStat)(nil), "io.containerd.cgroups.v2.HugeTlbStat") +} + +func init() { + proto.RegisterFile("github.com/containerd/cgroups/v2/stats/metrics.proto", fileDescriptor_2fc6005842049e6b) +} + +var fileDescriptor_2fc6005842049e6b = []byte{ + // 1198 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4d, 0x73, 0xd4, 0x46, + 0x13, 0x66, 0xed, 0xc5, 0xeb, 0xed, 0xb5, 0xc1, 0x0c, 0x86, 0x57, 0xc0, 0xcb, 0xda, 0x5e, 0x02, + 0x45, 0xaa, 0x92, 0xdd, 0x94, 0xf3, 0x55, 0x49, 0x91, 0x4a, 0x19, 0x02, 0x45, 0x8a, 0x10, 0x5c, + 0x02, 0x57, 0x8e, 0xaa, 0x59, 0x69, 0x2c, 0x0d, 0x96, 0x34, 0xaa, 0x99, 0x91, 0x1d, 0x73, 0xca, + 0x21, 0xd7, 0x54, 0x7e, 0x4d, 0xfe, 0x03, 0xb7, 0xe4, 0x98, 0x53, 0x2a, 0xf8, 0x97, 0xa4, 0xba, + 0x67, 0x64, 0x29, 0x07, 0x43, 0x6e, 0xd3, 0x4f, 0x3f, 0xdd, 0xea, 0x8f, 0x99, 0x6e, 0xc1, 0x27, + 0xa9, 0xb4, 0x59, 0x3d, 0x9f, 0xc6, 0xaa, 0x98, 0xc5, 0xaa, 0xb4, 0x5c, 0x96, 0x42, 0x27, 0xb3, + 0x38, 0xd5, 0xaa, 0xae, 0xcc, 0xec, 0x70, 0x7b, 0x66, 0x2c, 0xb7, 0x66, 0x56, 0x08, 0xab, 0x65, + 0x6c, 0xa6, 0x95, 0x56, 0x56, 0xb1, 0x40, 0xaa, 0x69, 0xcb, 0x9e, 0x7a, 0xf6, 0xf4, 0x70, 0xfb, + 0xfa, 0x7a, 0xaa, 0x52, 0x45, 0xa4, 0x19, 0x9e, 0x1c, 0x7f, 0xf2, 0xdb, 0x22, 0x0c, 0x9e, 0x3a, + 0x0f, 0xec, 0x33, 0xe8, 0x57, 0x32, 0x31, 0x41, 0x6f, 0xb3, 0x77, 0x77, 0xb4, 0x3d, 0x99, 0x9e, + 0xe5, 0x6a, 0xba, 0x2b, 0x13, 0xf3, 0xdc, 0x72, 0x1b, 0x12, 0x9f, 0xdd, 0x83, 0xc5, 0xb8, 0xaa, + 0x83, 0x05, 0x32, 0xdb, 0x3a, 0xdb, 0xec, 0xc1, 0xee, 0x1e, 0x5a, 0xdd, 0x1f, 0x9c, 0xfc, 0xb5, + 0xb1, 0xf8, 0x60, 0x77, 0x2f, 0x44, 0x33, 0x76, 0x0f, 0x96, 0x0a, 0x51, 0x28, 0x7d, 0x1c, 0xf4, + 0xc9, 0xc1, 0x7b, 0x67, 0x3b, 0x78, 0x4a, 0x3c, 0xfa, 0xb2, 0xb7, 0xc1, 0x98, 0x75, 0x52, 0xf0, + 0xe0, 0xfc, 0xbb, 0x62, 0x0e, 0x93, 0x82, 0xbb, 0x98, 0x91, 0xcf, 0x3e, 0x82, 0x05, 0xa9, 0x82, + 0x25, 0xb2, 0xda, 0x3c, 0xdb, 0xea, 0xdb, 0x67, 0x64, 0xb3, 0x20, 0x15, 0xfb, 0x1a, 0x06, 0x59, + 0x9d, 0x0a, 0x9b, 0xcf, 0x83, 0xc1, 0xe6, 0xe2, 0xdd, 0xd1, 0xf6, 0xed, 0xb3, 0xcd, 0x1e, 0xd7, + 0xa9, 0x78, 0x91, 0xcf, 0xc9, 0xb6, 0xb1, 0x62, 0x4f, 0x60, 0xd5, 0x05, 0x1d, 0x89, 0x43, 0x51, + 0x5a, 0x13, 0x2c, 0xd3, 0xd7, 0xef, 0xbc, 0x2b, 0xdf, 0x87, 0xc4, 0x0e, 0x57, 0x8a, 0x8e, 0x34, + 0xf9, 0x12, 0x96, 0x9b, 0x2e, 0xb0, 0x00, 0x06, 0x71, 0xad, 0xb5, 0x28, 0x2d, 0xb5, 0xae, 0x1f, + 0x36, 0x22, 0x5b, 0x87, 0xf3, 0xb9, 0x2c, 0xa4, 0xa5, 0xde, 0xf4, 0x43, 0x27, 0x4c, 0x7e, 0xef, + 0xc1, 0xc0, 0xf7, 0x82, 0xdd, 0x04, 0xa8, 0x0d, 0x4f, 0x45, 0x54, 0x1b, 0x11, 0x7b, 0xf3, 0x21, + 0x21, 0x7b, 0x46, 0xc4, 0xec, 0x06, 0x0c, 0x6b, 0x23, 0xb4, 0xd3, 0x3a, 0x27, 0xcb, 0x08, 0x90, + 0x72, 0x03, 0x46, 0xe6, 0xd8, 0x58, 0x51, 0x38, 0xf5, 0x22, 0xa9, 0xc1, 0x41, 0x44, 0xb8, 0x09, + 0x50, 0xea, 0xa8, 0x12, 0x5a, 0xaa, 0xc4, 0x50, 0x7b, 0xfb, 0xe1, 0xb0, 0xd4, 0xbb, 0x0e, 0x60, + 0x5b, 0xb0, 0x52, 0xea, 0xc8, 0x66, 0x5a, 0x59, 0x9b, 0x8b, 0x84, 0x7a, 0xd8, 0x0f, 0x47, 0xa5, + 0x7e, 0xd1, 0x40, 0xec, 0x36, 0x5c, 0x38, 0xd5, 0xbb, 0xaf, 0x2c, 0x11, 0x69, 0xf5, 0x14, 0xc5, + 0x0f, 0x4d, 0x7e, 0x1d, 0x02, 0xb4, 0x97, 0x83, 0x31, 0xe8, 0xf3, 0x52, 0x95, 0x3e, 0x1d, 0x3a, + 0x23, 0xb6, 0x2f, 0x73, 0xe1, 0x93, 0xa0, 0x33, 0x06, 0x70, 0x20, 0x74, 0x29, 0xf2, 0xc8, 0x58, + 0x1e, 0x1f, 0xf8, 0x0c, 0x46, 0x0e, 0x7b, 0x8e, 0x10, 0x9a, 0x99, 0x9c, 0xcf, 0x7d, 0xf0, 0x74, + 0x26, 0x4c, 0xc5, 0x07, 0x3e, 0x5e, 0x3a, 0x63, 0xa5, 0x4d, 0x56, 0x88, 0xc2, 0xc7, 0xe7, 0x04, + 0xac, 0x10, 0x7e, 0x28, 0x2a, 0x78, 0x55, 0x89, 0x24, 0x18, 0xb8, 0x0a, 0x21, 0xf4, 0x94, 0x10, + 0xac, 0x10, 0x11, 0x12, 0xa9, 0xed, 0x31, 0x5d, 0x88, 0x7e, 0x38, 0x44, 0xe4, 0x1b, 0x04, 0x30, + 0x7d, 0x52, 0x1f, 0x69, 0x69, 0xc5, 0x1c, 0x43, 0x1c, 0xba, 0xf4, 0x11, 0xfd, 0xa1, 0x01, 0xd9, + 0x35, 0x58, 0xc6, 0x1c, 0x23, 0x9b, 0x55, 0x01, 0xb8, 0x1b, 0x80, 0xf2, 0x8b, 0xac, 0x62, 0xb7, + 0x60, 0x55, 0x96, 0x3c, 0xb6, 0xf2, 0x50, 0x44, 0x54, 0x93, 0x11, 0xe9, 0x57, 0x1a, 0x70, 0x07, + 0x6b, 0xb3, 0x01, 0xa3, 0x2e, 0x65, 0xc5, 0x85, 0xd9, 0x21, 0x74, 0xbd, 0x50, 0x15, 0x57, 0xff, + 0xed, 0xe5, 0x11, 0x56, 0xb3, 0xf5, 0x42, 0x94, 0x0b, 0x5d, 0x2f, 0x44, 0xd8, 0x84, 0x51, 0x5d, + 0x8a, 0x43, 0x19, 0x5b, 0x3e, 0xcf, 0x45, 0x70, 0xd1, 0x55, 0xbb, 0x03, 0xb1, 0xf7, 0x61, 0x0d, + 0x2b, 0x1c, 0x69, 0x11, 0xe7, 0x5c, 0x16, 0x44, 0x5b, 0x23, 0xda, 0x45, 0xc4, 0xc3, 0x16, 0x66, + 0x1f, 0x02, 0x23, 0x6a, 0x5d, 0x76, 0xc9, 0x97, 0x88, 0x7c, 0x09, 0x35, 0x7b, 0x5d, 0x05, 0xbe, + 0x91, 0x2a, 0xdd, 0xe7, 0x75, 0x6e, 0x03, 0xe6, 0x2a, 0xe4, 0x45, 0x36, 0x06, 0xa8, 0xd2, 0x82, + 0xbf, 0x74, 0xca, 0xcb, 0x2e, 0xea, 0x16, 0xc1, 0x0f, 0x1d, 0x29, 0x7d, 0x20, 0xcb, 0xd4, 0x08, + 0x1b, 0x69, 0xe1, 0x78, 0xeb, 0xee, 0x43, 0xad, 0x26, 0x74, 0x0a, 0x36, 0x83, 0xcb, 0x1d, 0x3a, + 0x65, 0xcf, 0xad, 0x08, 0xae, 0x10, 0xbf, 0xe3, 0x69, 0xc7, 0x6b, 0xd8, 0xa7, 0x70, 0xb5, 0x63, + 0x50, 0xaa, 0x44, 0xf8, 0xb8, 0x83, 0xab, 0x64, 0x73, 0xa5, 0xd5, 0x7e, 0xdf, 0x2a, 0xd9, 0x75, + 0x58, 0xae, 0x52, 0x2d, 0xf6, 0x65, 0x9e, 0x07, 0xff, 0x73, 0x0f, 0xb3, 0x91, 0xd9, 0x55, 0x58, + 0xaa, 0x52, 0x13, 0xf3, 0x32, 0x08, 0x48, 0xe3, 0x25, 0x57, 0x04, 0x63, 0x05, 0xcf, 0x83, 0x6b, + 0x4d, 0x11, 0x48, 0x74, 0x45, 0x38, 0x0d, 0xf6, 0x7a, 0x53, 0x84, 0x06, 0x61, 0x13, 0x58, 0xa9, + 0xd2, 0x44, 0x9c, 0x32, 0x6e, 0xb8, 0xfe, 0x77, 0x31, 0xe7, 0x23, 0xe7, 0xaf, 0x8e, 0xf7, 0xb5, + 0x10, 0xc1, 0xff, 0x1b, 0x1f, 0x0d, 0x82, 0xed, 0x6f, 0xa5, 0x24, 0xb8, 0xe9, 0xda, 0xdf, 0x81, + 0xd8, 0x1d, 0xb8, 0x68, 0xb3, 0x2a, 0xa2, 0x42, 0x46, 0x3c, 0xcf, 0x55, 0x1c, 0x8c, 0x9b, 0xe7, + 0x5e, 0x3d, 0x42, 0x74, 0x07, 0x41, 0xf6, 0x01, 0x30, 0xe4, 0xc5, 0x2a, 0xcf, 0x79, 0x65, 0x84, + 0xa7, 0x6e, 0x10, 0x75, 0xcd, 0x66, 0xd5, 0x03, 0xaf, 0x70, 0xec, 0x75, 0x38, 0x4f, 0x03, 0x2d, + 0xd8, 0x74, 0x4f, 0x93, 0x04, 0xbc, 0xad, 0x6e, 0xf0, 0xb9, 0x01, 0xb9, 0xe5, 0xc2, 0x25, 0xe8, + 0x3b, 0x44, 0xf0, 0x69, 0x9a, 0x23, 0x5e, 0x45, 0xce, 0x76, 0xe2, 0x9e, 0x26, 0x22, 0x7b, 0x64, + 0xdf, 0xa8, 0x9d, 0xf9, 0xad, 0x56, 0x4d, 0xd6, 0x13, 0x03, 0x2b, 0xdd, 0xe9, 0xcd, 0xd6, 0x60, + 0x31, 0x57, 0x47, 0x7e, 0x22, 0xe1, 0x11, 0xa7, 0x48, 0x26, 0xd3, 0xac, 0x19, 0x48, 0x78, 0x46, + 0x56, 0xc1, 0x7f, 0xf4, 0x73, 0x08, 0x8f, 0x88, 0x28, 0x55, 0xf8, 0xf1, 0x83, 0x47, 0x7c, 0xec, + 0x4a, 0x15, 0xd1, 0x01, 0x36, 0xde, 0x4d, 0xa0, 0x81, 0x52, 0xc5, 0x13, 0x99, 0xe7, 0x93, 0x9f, + 0x7b, 0xb0, 0xdc, 0xec, 0x39, 0xf6, 0x55, 0x77, 0x2b, 0xe0, 0xbe, 0xba, 0xf5, 0xf6, 0xe5, 0xf8, + 0xb0, 0xb4, 0xfa, 0xb8, 0x5d, 0x1d, 0x5f, 0xb4, 0xab, 0xe3, 0x3f, 0x1b, 0xfb, 0xfd, 0x22, 0x60, + 0x78, 0x8a, 0xe1, 0x5d, 0x4c, 0xf0, 0x81, 0x0b, 0xca, 0x7d, 0x18, 0x7a, 0x09, 0xeb, 0x9f, 0xc5, + 0x3c, 0xca, 0x78, 0x99, 0xe4, 0xc2, 0x50, 0x15, 0x56, 0x43, 0xc8, 0x62, 0xfe, 0xd8, 0x21, 0x0d, + 0x41, 0xcd, 0x5f, 0x8a, 0xd8, 0x1a, 0xaa, 0x89, 0x23, 0x3c, 0x73, 0xc8, 0x64, 0x07, 0x96, 0xdc, + 0x7a, 0x66, 0x9f, 0x37, 0x1d, 0x76, 0x89, 0x6e, 0xbd, 0x6d, 0x9f, 0xfb, 0x48, 0x89, 0x3f, 0xf9, + 0xa5, 0x07, 0x03, 0x0f, 0xe1, 0x35, 0x29, 0xf8, 0x4b, 0xa5, 0x7d, 0x8f, 0x9c, 0x40, 0xa8, 0x2c, + 0x95, 0x6e, 0x36, 0x28, 0x09, 0x98, 0x94, 0x9e, 0x1f, 0x5b, 0x61, 0x7c, 0xab, 0xbc, 0x84, 0xf8, + 0x91, 0xc3, 0x5d, 0xc3, 0xbc, 0x84, 0xbd, 0xd6, 0x52, 0x99, 0x66, 0x63, 0xe0, 0x19, 0xb1, 0x23, + 0xc4, 0xdc, 0xc2, 0xa0, 0xf3, 0x64, 0x0f, 0x46, 0x9d, 0x5f, 0x87, 0xb7, 0x2c, 0x76, 0x7f, 0x51, + 0x16, 0xda, 0x8b, 0x82, 0xf3, 0x80, 0xa7, 0xc2, 0xc8, 0x57, 0x82, 0x82, 0x1a, 0x86, 0xa7, 0xf2, + 0xfd, 0xe0, 0xf5, 0x9b, 0xf1, 0xb9, 0x3f, 0xdf, 0x8c, 0xcf, 0xfd, 0x74, 0x32, 0xee, 0xbd, 0x3e, + 0x19, 0xf7, 0xfe, 0x38, 0x19, 0xf7, 0xfe, 0x3e, 0x19, 0xf7, 0xe6, 0x4b, 0xf4, 0x17, 0xf8, 0xf1, + 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4f, 0x2b, 0x30, 0xd6, 0x6d, 0x0a, 0x00, 0x00, +} + +func (m *Metrics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Metrics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Pids != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Pids.Size())) + n1, err := m.Pids.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.CPU != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.CPU.Size())) + n2, err := m.CPU.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.Memory != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Memory.Size())) + n3, err := m.Memory.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.Rdma != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Rdma.Size())) + n4, err := m.Rdma.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.Io != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Io.Size())) + n5, err := m.Io.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if len(m.Hugetlb) > 0 { + for _, msg := range m.Hugetlb { + dAtA[i] = 0x3a + i++ + i = encodeVarintMetrics(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.MemoryEvents != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.MemoryEvents.Size())) + n6, err := m.MemoryEvents.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *PidsStat) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PidsStat) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Current != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Current)) + } + if m.Limit != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Limit)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CPUStat) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CPUStat) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.UsageUsec != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.UsageUsec)) + } + if m.UserUsec != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.UserUsec)) + } + if m.SystemUsec != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.SystemUsec)) + } + if m.NrPeriods != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.NrPeriods)) + } + if m.NrThrottled != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.NrThrottled)) + } + if m.ThrottledUsec != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.ThrottledUsec)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MemoryStat) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MemoryStat) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Anon != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Anon)) + } + if m.File != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.File)) + } + if m.KernelStack != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.KernelStack)) + } + if m.Slab != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Slab)) + } + if m.Sock != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Sock)) + } + if m.Shmem != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Shmem)) + } + if m.FileMapped != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.FileMapped)) + } + if m.FileDirty != 0 { + dAtA[i] = 0x40 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.FileDirty)) + } + if m.FileWriteback != 0 { + dAtA[i] = 0x48 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.FileWriteback)) + } + if m.AnonThp != 0 { + dAtA[i] = 0x50 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.AnonThp)) + } + if m.InactiveAnon != 0 { + dAtA[i] = 0x58 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.InactiveAnon)) + } + if m.ActiveAnon != 0 { + dAtA[i] = 0x60 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.ActiveAnon)) + } + if m.InactiveFile != 0 { + dAtA[i] = 0x68 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.InactiveFile)) + } + if m.ActiveFile != 0 { + dAtA[i] = 0x70 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.ActiveFile)) + } + if m.Unevictable != 0 { + dAtA[i] = 0x78 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Unevictable)) + } + if m.SlabReclaimable != 0 { + dAtA[i] = 0x80 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.SlabReclaimable)) + } + if m.SlabUnreclaimable != 0 { + dAtA[i] = 0x88 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.SlabUnreclaimable)) + } + if m.Pgfault != 0 { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Pgfault)) + } + if m.Pgmajfault != 0 { + dAtA[i] = 0x98 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Pgmajfault)) + } + if m.WorkingsetRefault != 0 { + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.WorkingsetRefault)) + } + if m.WorkingsetActivate != 0 { + dAtA[i] = 0xa8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.WorkingsetActivate)) + } + if m.WorkingsetNodereclaim != 0 { + dAtA[i] = 0xb0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.WorkingsetNodereclaim)) + } + if m.Pgrefill != 0 { + dAtA[i] = 0xb8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Pgrefill)) + } + if m.Pgscan != 0 { + dAtA[i] = 0xc0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Pgscan)) + } + if m.Pgsteal != 0 { + dAtA[i] = 0xc8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Pgsteal)) + } + if m.Pgactivate != 0 { + dAtA[i] = 0xd0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Pgactivate)) + } + if m.Pgdeactivate != 0 { + dAtA[i] = 0xd8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Pgdeactivate)) + } + if m.Pglazyfree != 0 { + dAtA[i] = 0xe0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Pglazyfree)) + } + if m.Pglazyfreed != 0 { + dAtA[i] = 0xe8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Pglazyfreed)) + } + if m.ThpFaultAlloc != 0 { + dAtA[i] = 0xf0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.ThpFaultAlloc)) + } + if m.ThpCollapseAlloc != 0 { + dAtA[i] = 0xf8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.ThpCollapseAlloc)) + } + if m.Usage != 0 { + dAtA[i] = 0x80 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Usage)) + } + if m.UsageLimit != 0 { + dAtA[i] = 0x88 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.UsageLimit)) + } + if m.SwapUsage != 0 { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.SwapUsage)) + } + if m.SwapLimit != 0 { + dAtA[i] = 0x98 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.SwapLimit)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MemoryEvents) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MemoryEvents) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Low != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Low)) + } + if m.High != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.High)) + } + if m.Max != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Max)) + } + if m.Oom != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Oom)) + } + if m.OomKill != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.OomKill)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *RdmaStat) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RdmaStat) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Current) > 0 { + for _, msg := range m.Current { + dAtA[i] = 0xa + i++ + i = encodeVarintMetrics(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Limit) > 0 { + for _, msg := range m.Limit { + dAtA[i] = 0x12 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *RdmaEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RdmaEntry) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Device) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMetrics(dAtA, i, uint64(len(m.Device))) + i += copy(dAtA[i:], m.Device) + } + if m.HcaHandles != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.HcaHandles)) + } + if m.HcaObjects != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.HcaObjects)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *IOStat) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IOStat) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Usage) > 0 { + for _, msg := range m.Usage { + dAtA[i] = 0xa + i++ + i = encodeVarintMetrics(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *IOEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IOEntry) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Major != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Major)) + } + if m.Minor != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Minor)) + } + if m.Rbytes != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Rbytes)) + } + if m.Wbytes != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Wbytes)) + } + if m.Rios != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Rios)) + } + if m.Wios != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Wios)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *HugeTlbStat) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HugeTlbStat) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Current != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Current)) + } + if m.Max != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMetrics(dAtA, i, uint64(m.Max)) + } + if len(m.Pagesize) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMetrics(dAtA, i, uint64(len(m.Pagesize))) + i += copy(dAtA[i:], m.Pagesize) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintMetrics(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *Metrics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pids != nil { + l = m.Pids.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + if m.CPU != nil { + l = m.CPU.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + if m.Memory != nil { + l = m.Memory.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + if m.Rdma != nil { + l = m.Rdma.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + if m.Io != nil { + l = m.Io.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + if len(m.Hugetlb) > 0 { + for _, e := range m.Hugetlb { + l = e.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + } + if m.MemoryEvents != nil { + l = m.MemoryEvents.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PidsStat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Current != 0 { + n += 1 + sovMetrics(uint64(m.Current)) + } + if m.Limit != 0 { + n += 1 + sovMetrics(uint64(m.Limit)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CPUStat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UsageUsec != 0 { + n += 1 + sovMetrics(uint64(m.UsageUsec)) + } + if m.UserUsec != 0 { + n += 1 + sovMetrics(uint64(m.UserUsec)) + } + if m.SystemUsec != 0 { + n += 1 + sovMetrics(uint64(m.SystemUsec)) + } + if m.NrPeriods != 0 { + n += 1 + sovMetrics(uint64(m.NrPeriods)) + } + if m.NrThrottled != 0 { + n += 1 + sovMetrics(uint64(m.NrThrottled)) + } + if m.ThrottledUsec != 0 { + n += 1 + sovMetrics(uint64(m.ThrottledUsec)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MemoryStat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Anon != 0 { + n += 1 + sovMetrics(uint64(m.Anon)) + } + if m.File != 0 { + n += 1 + sovMetrics(uint64(m.File)) + } + if m.KernelStack != 0 { + n += 1 + sovMetrics(uint64(m.KernelStack)) + } + if m.Slab != 0 { + n += 1 + sovMetrics(uint64(m.Slab)) + } + if m.Sock != 0 { + n += 1 + sovMetrics(uint64(m.Sock)) + } + if m.Shmem != 0 { + n += 1 + sovMetrics(uint64(m.Shmem)) + } + if m.FileMapped != 0 { + n += 1 + sovMetrics(uint64(m.FileMapped)) + } + if m.FileDirty != 0 { + n += 1 + sovMetrics(uint64(m.FileDirty)) + } + if m.FileWriteback != 0 { + n += 1 + sovMetrics(uint64(m.FileWriteback)) + } + if m.AnonThp != 0 { + n += 1 + sovMetrics(uint64(m.AnonThp)) + } + if m.InactiveAnon != 0 { + n += 1 + sovMetrics(uint64(m.InactiveAnon)) + } + if m.ActiveAnon != 0 { + n += 1 + sovMetrics(uint64(m.ActiveAnon)) + } + if m.InactiveFile != 0 { + n += 1 + sovMetrics(uint64(m.InactiveFile)) + } + if m.ActiveFile != 0 { + n += 1 + sovMetrics(uint64(m.ActiveFile)) + } + if m.Unevictable != 0 { + n += 1 + sovMetrics(uint64(m.Unevictable)) + } + if m.SlabReclaimable != 0 { + n += 2 + sovMetrics(uint64(m.SlabReclaimable)) + } + if m.SlabUnreclaimable != 0 { + n += 2 + sovMetrics(uint64(m.SlabUnreclaimable)) + } + if m.Pgfault != 0 { + n += 2 + sovMetrics(uint64(m.Pgfault)) + } + if m.Pgmajfault != 0 { + n += 2 + sovMetrics(uint64(m.Pgmajfault)) + } + if m.WorkingsetRefault != 0 { + n += 2 + sovMetrics(uint64(m.WorkingsetRefault)) + } + if m.WorkingsetActivate != 0 { + n += 2 + sovMetrics(uint64(m.WorkingsetActivate)) + } + if m.WorkingsetNodereclaim != 0 { + n += 2 + sovMetrics(uint64(m.WorkingsetNodereclaim)) + } + if m.Pgrefill != 0 { + n += 2 + sovMetrics(uint64(m.Pgrefill)) + } + if m.Pgscan != 0 { + n += 2 + sovMetrics(uint64(m.Pgscan)) + } + if m.Pgsteal != 0 { + n += 2 + sovMetrics(uint64(m.Pgsteal)) + } + if m.Pgactivate != 0 { + n += 2 + sovMetrics(uint64(m.Pgactivate)) + } + if m.Pgdeactivate != 0 { + n += 2 + sovMetrics(uint64(m.Pgdeactivate)) + } + if m.Pglazyfree != 0 { + n += 2 + sovMetrics(uint64(m.Pglazyfree)) + } + if m.Pglazyfreed != 0 { + n += 2 + sovMetrics(uint64(m.Pglazyfreed)) + } + if m.ThpFaultAlloc != 0 { + n += 2 + sovMetrics(uint64(m.ThpFaultAlloc)) + } + if m.ThpCollapseAlloc != 0 { + n += 2 + sovMetrics(uint64(m.ThpCollapseAlloc)) + } + if m.Usage != 0 { + n += 2 + sovMetrics(uint64(m.Usage)) + } + if m.UsageLimit != 0 { + n += 2 + sovMetrics(uint64(m.UsageLimit)) + } + if m.SwapUsage != 0 { + n += 2 + sovMetrics(uint64(m.SwapUsage)) + } + if m.SwapLimit != 0 { + n += 2 + sovMetrics(uint64(m.SwapLimit)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MemoryEvents) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Low != 0 { + n += 1 + sovMetrics(uint64(m.Low)) + } + if m.High != 0 { + n += 1 + sovMetrics(uint64(m.High)) + } + if m.Max != 0 { + n += 1 + sovMetrics(uint64(m.Max)) + } + if m.Oom != 0 { + n += 1 + sovMetrics(uint64(m.Oom)) + } + if m.OomKill != 0 { + n += 1 + sovMetrics(uint64(m.OomKill)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RdmaStat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Current) > 0 { + for _, e := range m.Current { + l = e.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + } + if len(m.Limit) > 0 { + for _, e := range m.Limit { + l = e.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RdmaEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Device) + if l > 0 { + n += 1 + l + sovMetrics(uint64(l)) + } + if m.HcaHandles != 0 { + n += 1 + sovMetrics(uint64(m.HcaHandles)) + } + if m.HcaObjects != 0 { + n += 1 + sovMetrics(uint64(m.HcaObjects)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *IOStat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Usage) > 0 { + for _, e := range m.Usage { + l = e.Size() + n += 1 + l + sovMetrics(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *IOEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Major != 0 { + n += 1 + sovMetrics(uint64(m.Major)) + } + if m.Minor != 0 { + n += 1 + sovMetrics(uint64(m.Minor)) + } + if m.Rbytes != 0 { + n += 1 + sovMetrics(uint64(m.Rbytes)) + } + if m.Wbytes != 0 { + n += 1 + sovMetrics(uint64(m.Wbytes)) + } + if m.Rios != 0 { + n += 1 + sovMetrics(uint64(m.Rios)) + } + if m.Wios != 0 { + n += 1 + sovMetrics(uint64(m.Wios)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HugeTlbStat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Current != 0 { + n += 1 + sovMetrics(uint64(m.Current)) + } + if m.Max != 0 { + n += 1 + sovMetrics(uint64(m.Max)) + } + l = len(m.Pagesize) + if l > 0 { + n += 1 + l + sovMetrics(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMetrics(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMetrics(x uint64) (n int) { + return sovMetrics(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Metrics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Metrics{`, + `Pids:` + strings.Replace(fmt.Sprintf("%v", this.Pids), "PidsStat", "PidsStat", 1) + `,`, + `CPU:` + strings.Replace(fmt.Sprintf("%v", this.CPU), "CPUStat", "CPUStat", 1) + `,`, + `Memory:` + strings.Replace(fmt.Sprintf("%v", this.Memory), "MemoryStat", "MemoryStat", 1) + `,`, + `Rdma:` + strings.Replace(fmt.Sprintf("%v", this.Rdma), "RdmaStat", "RdmaStat", 1) + `,`, + `Io:` + strings.Replace(fmt.Sprintf("%v", this.Io), "IOStat", "IOStat", 1) + `,`, + `Hugetlb:` + strings.Replace(fmt.Sprintf("%v", this.Hugetlb), "HugeTlbStat", "HugeTlbStat", 1) + `,`, + `MemoryEvents:` + strings.Replace(fmt.Sprintf("%v", this.MemoryEvents), "MemoryEvents", "MemoryEvents", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *PidsStat) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PidsStat{`, + `Current:` + fmt.Sprintf("%v", this.Current) + `,`, + `Limit:` + fmt.Sprintf("%v", this.Limit) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CPUStat) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CPUStat{`, + `UsageUsec:` + fmt.Sprintf("%v", this.UsageUsec) + `,`, + `UserUsec:` + fmt.Sprintf("%v", this.UserUsec) + `,`, + `SystemUsec:` + fmt.Sprintf("%v", this.SystemUsec) + `,`, + `NrPeriods:` + fmt.Sprintf("%v", this.NrPeriods) + `,`, + `NrThrottled:` + fmt.Sprintf("%v", this.NrThrottled) + `,`, + `ThrottledUsec:` + fmt.Sprintf("%v", this.ThrottledUsec) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MemoryStat) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MemoryStat{`, + `Anon:` + fmt.Sprintf("%v", this.Anon) + `,`, + `File:` + fmt.Sprintf("%v", this.File) + `,`, + `KernelStack:` + fmt.Sprintf("%v", this.KernelStack) + `,`, + `Slab:` + fmt.Sprintf("%v", this.Slab) + `,`, + `Sock:` + fmt.Sprintf("%v", this.Sock) + `,`, + `Shmem:` + fmt.Sprintf("%v", this.Shmem) + `,`, + `FileMapped:` + fmt.Sprintf("%v", this.FileMapped) + `,`, + `FileDirty:` + fmt.Sprintf("%v", this.FileDirty) + `,`, + `FileWriteback:` + fmt.Sprintf("%v", this.FileWriteback) + `,`, + `AnonThp:` + fmt.Sprintf("%v", this.AnonThp) + `,`, + `InactiveAnon:` + fmt.Sprintf("%v", this.InactiveAnon) + `,`, + `ActiveAnon:` + fmt.Sprintf("%v", this.ActiveAnon) + `,`, + `InactiveFile:` + fmt.Sprintf("%v", this.InactiveFile) + `,`, + `ActiveFile:` + fmt.Sprintf("%v", this.ActiveFile) + `,`, + `Unevictable:` + fmt.Sprintf("%v", this.Unevictable) + `,`, + `SlabReclaimable:` + fmt.Sprintf("%v", this.SlabReclaimable) + `,`, + `SlabUnreclaimable:` + fmt.Sprintf("%v", this.SlabUnreclaimable) + `,`, + `Pgfault:` + fmt.Sprintf("%v", this.Pgfault) + `,`, + `Pgmajfault:` + fmt.Sprintf("%v", this.Pgmajfault) + `,`, + `WorkingsetRefault:` + fmt.Sprintf("%v", this.WorkingsetRefault) + `,`, + `WorkingsetActivate:` + fmt.Sprintf("%v", this.WorkingsetActivate) + `,`, + `WorkingsetNodereclaim:` + fmt.Sprintf("%v", this.WorkingsetNodereclaim) + `,`, + `Pgrefill:` + fmt.Sprintf("%v", this.Pgrefill) + `,`, + `Pgscan:` + fmt.Sprintf("%v", this.Pgscan) + `,`, + `Pgsteal:` + fmt.Sprintf("%v", this.Pgsteal) + `,`, + `Pgactivate:` + fmt.Sprintf("%v", this.Pgactivate) + `,`, + `Pgdeactivate:` + fmt.Sprintf("%v", this.Pgdeactivate) + `,`, + `Pglazyfree:` + fmt.Sprintf("%v", this.Pglazyfree) + `,`, + `Pglazyfreed:` + fmt.Sprintf("%v", this.Pglazyfreed) + `,`, + `ThpFaultAlloc:` + fmt.Sprintf("%v", this.ThpFaultAlloc) + `,`, + `ThpCollapseAlloc:` + fmt.Sprintf("%v", this.ThpCollapseAlloc) + `,`, + `Usage:` + fmt.Sprintf("%v", this.Usage) + `,`, + `UsageLimit:` + fmt.Sprintf("%v", this.UsageLimit) + `,`, + `SwapUsage:` + fmt.Sprintf("%v", this.SwapUsage) + `,`, + `SwapLimit:` + fmt.Sprintf("%v", this.SwapLimit) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MemoryEvents) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MemoryEvents{`, + `Low:` + fmt.Sprintf("%v", this.Low) + `,`, + `High:` + fmt.Sprintf("%v", this.High) + `,`, + `Max:` + fmt.Sprintf("%v", this.Max) + `,`, + `Oom:` + fmt.Sprintf("%v", this.Oom) + `,`, + `OomKill:` + fmt.Sprintf("%v", this.OomKill) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *RdmaStat) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RdmaStat{`, + `Current:` + strings.Replace(fmt.Sprintf("%v", this.Current), "RdmaEntry", "RdmaEntry", 1) + `,`, + `Limit:` + strings.Replace(fmt.Sprintf("%v", this.Limit), "RdmaEntry", "RdmaEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *RdmaEntry) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RdmaEntry{`, + `Device:` + fmt.Sprintf("%v", this.Device) + `,`, + `HcaHandles:` + fmt.Sprintf("%v", this.HcaHandles) + `,`, + `HcaObjects:` + fmt.Sprintf("%v", this.HcaObjects) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *IOStat) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IOStat{`, + `Usage:` + strings.Replace(fmt.Sprintf("%v", this.Usage), "IOEntry", "IOEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *IOEntry) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IOEntry{`, + `Major:` + fmt.Sprintf("%v", this.Major) + `,`, + `Minor:` + fmt.Sprintf("%v", this.Minor) + `,`, + `Rbytes:` + fmt.Sprintf("%v", this.Rbytes) + `,`, + `Wbytes:` + fmt.Sprintf("%v", this.Wbytes) + `,`, + `Rios:` + fmt.Sprintf("%v", this.Rios) + `,`, + `Wios:` + fmt.Sprintf("%v", this.Wios) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *HugeTlbStat) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HugeTlbStat{`, + `Current:` + fmt.Sprintf("%v", this.Current) + `,`, + `Max:` + fmt.Sprintf("%v", this.Max) + `,`, + `Pagesize:` + fmt.Sprintf("%v", this.Pagesize) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMetrics(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Metrics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Metrics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Metrics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pids", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pids == nil { + m.Pids = &PidsStat{} + } + if err := m.Pids.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CPU", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CPU == nil { + m.CPU = &CPUStat{} + } + if err := m.CPU.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Memory == nil { + m.Memory = &MemoryStat{} + } + if err := m.Memory.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rdma", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Rdma == nil { + m.Rdma = &RdmaStat{} + } + if err := m.Rdma.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Io", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Io == nil { + m.Io = &IOStat{} + } + if err := m.Io.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hugetlb", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hugetlb = append(m.Hugetlb, &HugeTlbStat{}) + if err := m.Hugetlb[len(m.Hugetlb)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryEvents", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MemoryEvents == nil { + m.MemoryEvents = &MemoryEvents{} + } + if err := m.MemoryEvents.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMetrics(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PidsStat) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PidsStat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PidsStat: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Current", wireType) + } + m.Current = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Current |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMetrics(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CPUStat) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CPUStat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CPUStat: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UsageUsec", wireType) + } + m.UsageUsec = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UsageUsec |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UserUsec", wireType) + } + m.UserUsec = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UserUsec |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SystemUsec", wireType) + } + m.SystemUsec = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SystemUsec |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NrPeriods", wireType) + } + m.NrPeriods = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NrPeriods |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NrThrottled", wireType) + } + m.NrThrottled = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NrThrottled |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ThrottledUsec", wireType) + } + m.ThrottledUsec = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ThrottledUsec |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMetrics(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MemoryStat) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MemoryStat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MemoryStat: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Anon", wireType) + } + m.Anon = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Anon |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field File", wireType) + } + m.File = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.File |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KernelStack", wireType) + } + m.KernelStack = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KernelStack |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Slab", wireType) + } + m.Slab = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Slab |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sock", wireType) + } + m.Sock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Shmem", wireType) + } + m.Shmem = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Shmem |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FileMapped", wireType) + } + m.FileMapped = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FileMapped |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FileDirty", wireType) + } + m.FileDirty = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FileDirty |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FileWriteback", wireType) + } + m.FileWriteback = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FileWriteback |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AnonThp", wireType) + } + m.AnonThp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AnonThp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InactiveAnon", wireType) + } + m.InactiveAnon = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InactiveAnon |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveAnon", wireType) + } + m.ActiveAnon = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ActiveAnon |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InactiveFile", wireType) + } + m.InactiveFile = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InactiveFile |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveFile", wireType) + } + m.ActiveFile = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ActiveFile |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Unevictable", wireType) + } + m.Unevictable = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Unevictable |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SlabReclaimable", wireType) + } + m.SlabReclaimable = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SlabReclaimable |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SlabUnreclaimable", wireType) + } + m.SlabUnreclaimable = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SlabUnreclaimable |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Pgfault", wireType) + } + m.Pgfault = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Pgfault |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Pgmajfault", wireType) + } + m.Pgmajfault = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Pgmajfault |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WorkingsetRefault", wireType) + } + m.WorkingsetRefault = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WorkingsetRefault |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WorkingsetActivate", wireType) + } + m.WorkingsetActivate = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WorkingsetActivate |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WorkingsetNodereclaim", wireType) + } + m.WorkingsetNodereclaim = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WorkingsetNodereclaim |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Pgrefill", wireType) + } + m.Pgrefill = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Pgrefill |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 24: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Pgscan", wireType) + } + m.Pgscan = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Pgscan |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Pgsteal", wireType) + } + m.Pgsteal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Pgsteal |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Pgactivate", wireType) + } + m.Pgactivate = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Pgactivate |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Pgdeactivate", wireType) + } + m.Pgdeactivate = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Pgdeactivate |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 28: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Pglazyfree", wireType) + } + m.Pglazyfree = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Pglazyfree |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 29: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Pglazyfreed", wireType) + } + m.Pglazyfreed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Pglazyfreed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 30: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ThpFaultAlloc", wireType) + } + m.ThpFaultAlloc = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ThpFaultAlloc |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 31: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ThpCollapseAlloc", wireType) + } + m.ThpCollapseAlloc = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ThpCollapseAlloc |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 32: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Usage", wireType) + } + m.Usage = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Usage |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 33: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UsageLimit", wireType) + } + m.UsageLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UsageLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 34: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SwapUsage", wireType) + } + m.SwapUsage = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SwapUsage |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 35: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SwapLimit", wireType) + } + m.SwapLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SwapLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMetrics(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MemoryEvents) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MemoryEvents: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MemoryEvents: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Low", wireType) + } + m.Low = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Low |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field High", wireType) + } + m.High = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.High |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + } + m.Max = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Max |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Oom", wireType) + } + m.Oom = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Oom |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OomKill", wireType) + } + m.OomKill = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OomKill |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMetrics(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RdmaStat) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RdmaStat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RdmaStat: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Current", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Current = append(m.Current, &RdmaEntry{}) + if err := m.Current[len(m.Current)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Limit = append(m.Limit, &RdmaEntry{}) + if err := m.Limit[len(m.Limit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMetrics(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RdmaEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RdmaEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RdmaEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Device = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HcaHandles", wireType) + } + m.HcaHandles = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HcaHandles |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HcaObjects", wireType) + } + m.HcaObjects = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HcaObjects |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMetrics(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IOStat) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IOStat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IOStat: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Usage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Usage = append(m.Usage, &IOEntry{}) + if err := m.Usage[len(m.Usage)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMetrics(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IOEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IOEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IOEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Major", wireType) + } + m.Major = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Major |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Minor", wireType) + } + m.Minor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Minor |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Rbytes", wireType) + } + m.Rbytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Rbytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Wbytes", wireType) + } + m.Wbytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Wbytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Rios", wireType) + } + m.Rios = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Rios |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Wios", wireType) + } + m.Wios = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Wios |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMetrics(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HugeTlbStat) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HugeTlbStat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HugeTlbStat: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Current", wireType) + } + m.Current = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Current |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + } + m.Max = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Max |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagesize", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetrics + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMetrics + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMetrics + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pagesize = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMetrics(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMetrics + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMetrics(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMetrics + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMetrics + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMetrics + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMetrics + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthMetrics + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMetrics + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipMetrics(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthMetrics + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/github.com/containerd/cgroups/v2/stats/metrics.pb.txt b/vendor/github.com/containerd/cgroups/v2/stats/metrics.pb.txt new file mode 100644 index 00000000000..59fe27cbffb --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/stats/metrics.pb.txt @@ -0,0 +1,539 @@ +file { + name: "github.com/containerd/cgroups/v2/stats/metrics.proto" + package: "io.containerd.cgroups.v2" + dependency: "gogoproto/gogo.proto" + message_type { + name: "Metrics" + field { + name: "pids" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v2.PidsStat" + json_name: "pids" + } + field { + name: "cpu" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v2.CPUStat" + options { + 65004: "CPU" + } + json_name: "cpu" + } + field { + name: "memory" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v2.MemoryStat" + json_name: "memory" + } + field { + name: "rdma" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v2.RdmaStat" + json_name: "rdma" + } + field { + name: "io" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v2.IOStat" + json_name: "io" + } + field { + name: "hugetlb" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v2.HugeTlbStat" + json_name: "hugetlb" + } + field { + name: "memory_events" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v2.MemoryEvents" + json_name: "memoryEvents" + } + } + message_type { + name: "PidsStat" + field { + name: "current" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "current" + } + field { + name: "limit" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "limit" + } + } + message_type { + name: "CPUStat" + field { + name: "usage_usec" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "usageUsec" + } + field { + name: "user_usec" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "userUsec" + } + field { + name: "system_usec" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "systemUsec" + } + field { + name: "nr_periods" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "nrPeriods" + } + field { + name: "nr_throttled" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "nrThrottled" + } + field { + name: "throttled_usec" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "throttledUsec" + } + } + message_type { + name: "MemoryStat" + field { + name: "anon" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "anon" + } + field { + name: "file" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "file" + } + field { + name: "kernel_stack" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "kernelStack" + } + field { + name: "slab" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "slab" + } + field { + name: "sock" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "sock" + } + field { + name: "shmem" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "shmem" + } + field { + name: "file_mapped" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "fileMapped" + } + field { + name: "file_dirty" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "fileDirty" + } + field { + name: "file_writeback" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "fileWriteback" + } + field { + name: "anon_thp" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "anonThp" + } + field { + name: "inactive_anon" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "inactiveAnon" + } + field { + name: "active_anon" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "activeAnon" + } + field { + name: "inactive_file" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "inactiveFile" + } + field { + name: "active_file" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "activeFile" + } + field { + name: "unevictable" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "unevictable" + } + field { + name: "slab_reclaimable" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "slabReclaimable" + } + field { + name: "slab_unreclaimable" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "slabUnreclaimable" + } + field { + name: "pgfault" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pgfault" + } + field { + name: "pgmajfault" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pgmajfault" + } + field { + name: "workingset_refault" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "workingsetRefault" + } + field { + name: "workingset_activate" + number: 21 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "workingsetActivate" + } + field { + name: "workingset_nodereclaim" + number: 22 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "workingsetNodereclaim" + } + field { + name: "pgrefill" + number: 23 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pgrefill" + } + field { + name: "pgscan" + number: 24 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pgscan" + } + field { + name: "pgsteal" + number: 25 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pgsteal" + } + field { + name: "pgactivate" + number: 26 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pgactivate" + } + field { + name: "pgdeactivate" + number: 27 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pgdeactivate" + } + field { + name: "pglazyfree" + number: 28 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pglazyfree" + } + field { + name: "pglazyfreed" + number: 29 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "pglazyfreed" + } + field { + name: "thp_fault_alloc" + number: 30 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "thpFaultAlloc" + } + field { + name: "thp_collapse_alloc" + number: 31 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "thpCollapseAlloc" + } + field { + name: "usage" + number: 32 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "usage" + } + field { + name: "usage_limit" + number: 33 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "usageLimit" + } + field { + name: "swap_usage" + number: 34 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "swapUsage" + } + field { + name: "swap_limit" + number: 35 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "swapLimit" + } + } + message_type { + name: "MemoryEvents" + field { + name: "low" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "low" + } + field { + name: "high" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "high" + } + field { + name: "max" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "max" + } + field { + name: "oom" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "oom" + } + field { + name: "oom_kill" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "oomKill" + } + } + message_type { + name: "RdmaStat" + field { + name: "current" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v2.RdmaEntry" + json_name: "current" + } + field { + name: "limit" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v2.RdmaEntry" + json_name: "limit" + } + } + message_type { + name: "RdmaEntry" + field { + name: "device" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "device" + } + field { + name: "hca_handles" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "hcaHandles" + } + field { + name: "hca_objects" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT32 + json_name: "hcaObjects" + } + } + message_type { + name: "IOStat" + field { + name: "usage" + number: 1 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".io.containerd.cgroups.v2.IOEntry" + json_name: "usage" + } + } + message_type { + name: "IOEntry" + field { + name: "major" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "major" + } + field { + name: "minor" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "minor" + } + field { + name: "rbytes" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "rbytes" + } + field { + name: "wbytes" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "wbytes" + } + field { + name: "rios" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "rios" + } + field { + name: "wios" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "wios" + } + } + message_type { + name: "HugeTlbStat" + field { + name: "current" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "current" + } + field { + name: "max" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_UINT64 + json_name: "max" + } + field { + name: "pagesize" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "pagesize" + } + } + syntax: "proto3" +} diff --git a/vendor/github.com/containerd/cgroups/v2/stats/metrics.proto b/vendor/github.com/containerd/cgroups/v2/stats/metrics.proto new file mode 100644 index 00000000000..8ac472e4645 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/stats/metrics.proto @@ -0,0 +1,105 @@ +syntax = "proto3"; + +package io.containerd.cgroups.v2; + + import "gogoproto/gogo.proto"; + +message Metrics { + PidsStat pids = 1; + CPUStat cpu = 2 [(gogoproto.customname) = "CPU"]; + MemoryStat memory = 4; + RdmaStat rdma = 5; + IOStat io = 6; + repeated HugeTlbStat hugetlb = 7; + MemoryEvents memory_events = 8; +} + +message PidsStat { + uint64 current = 1; + uint64 limit = 2; +} + +message CPUStat { + uint64 usage_usec = 1; + uint64 user_usec = 2; + uint64 system_usec = 3; + uint64 nr_periods = 4; + uint64 nr_throttled = 5; + uint64 throttled_usec = 6; +} + +message MemoryStat { + uint64 anon = 1; + uint64 file = 2; + uint64 kernel_stack = 3; + uint64 slab = 4; + uint64 sock = 5; + uint64 shmem = 6; + uint64 file_mapped = 7; + uint64 file_dirty = 8; + uint64 file_writeback = 9; + uint64 anon_thp = 10; + uint64 inactive_anon = 11; + uint64 active_anon = 12; + uint64 inactive_file = 13; + uint64 active_file = 14; + uint64 unevictable = 15; + uint64 slab_reclaimable = 16; + uint64 slab_unreclaimable = 17; + uint64 pgfault = 18; + uint64 pgmajfault = 19; + uint64 workingset_refault = 20; + uint64 workingset_activate = 21; + uint64 workingset_nodereclaim = 22; + uint64 pgrefill = 23; + uint64 pgscan = 24; + uint64 pgsteal = 25; + uint64 pgactivate = 26; + uint64 pgdeactivate = 27; + uint64 pglazyfree = 28; + uint64 pglazyfreed = 29; + uint64 thp_fault_alloc = 30; + uint64 thp_collapse_alloc = 31; + uint64 usage = 32; + uint64 usage_limit = 33; + uint64 swap_usage = 34; + uint64 swap_limit = 35; +} + +message MemoryEvents { + uint64 low = 1; + uint64 high = 2; + uint64 max = 3; + uint64 oom = 4; + uint64 oom_kill = 5; +} + +message RdmaStat { + repeated RdmaEntry current = 1; + repeated RdmaEntry limit = 2; +} + +message RdmaEntry { + string device = 1; + uint32 hca_handles = 2; + uint32 hca_objects = 3; +} + +message IOStat { + repeated IOEntry usage = 1; +} + +message IOEntry { + uint64 major = 1; + uint64 minor = 2; + uint64 rbytes = 3; + uint64 wbytes = 4; + uint64 rios = 5; + uint64 wios = 6; +} + +message HugeTlbStat { + uint64 current = 1; + uint64 max = 2; + string pagesize = 3; +} diff --git a/vendor/github.com/containerd/cgroups/v2/utils.go b/vendor/github.com/containerd/cgroups/v2/utils.go new file mode 100644 index 00000000000..d20c15cd6e0 --- /dev/null +++ b/vendor/github.com/containerd/cgroups/v2/utils.go @@ -0,0 +1,445 @@ +/* + Copyright The containerd 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 v2 + +import ( + "bufio" + "fmt" + "io" + "io/ioutil" + "math" + "os" + "path/filepath" + "strconv" + "strings" + "time" + + "github.com/godbus/dbus/v5" + + "github.com/containerd/cgroups/v2/stats" + "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +const ( + cgroupProcs = "cgroup.procs" + defaultDirPerm = 0755 +) + +// defaultFilePerm is a var so that the test framework can change the filemode +// of all files created when the tests are running. The difference between the +// tests and real world use is that files like "cgroup.procs" will exist when writing +// to a read cgroup filesystem and do not exist prior when running in the tests. +// this is set to a non 0 value in the test code +var defaultFilePerm = os.FileMode(0) + +// remove will remove a cgroup path handling EAGAIN and EBUSY errors and +// retrying the remove after a exp timeout +func remove(path string) error { + var err error + delay := 10 * time.Millisecond + for i := 0; i < 5; i++ { + if i != 0 { + time.Sleep(delay) + delay *= 2 + } + if err = os.RemoveAll(path); err == nil { + return nil + } + } + return errors.Wrapf(err, "cgroups: unable to remove path %q", path) +} + +// parseCgroupProcsFile parses /sys/fs/cgroup/$GROUPPATH/cgroup.procs +func parseCgroupProcsFile(path string) ([]uint64, error) { + f, err := os.Open(path) + if err != nil { + return nil, err + } + defer f.Close() + var ( + out []uint64 + s = bufio.NewScanner(f) + ) + for s.Scan() { + if t := s.Text(); t != "" { + pid, err := strconv.ParseUint(t, 10, 0) + if err != nil { + return nil, err + } + out = append(out, pid) + } + } + if err := s.Err(); err != nil { + return nil, err + } + return out, nil +} + +func parseKV(raw string) (string, interface{}, error) { + parts := strings.Fields(raw) + switch len(parts) { + case 2: + v, err := parseUint(parts[1], 10, 64) + if err != nil { + // if we cannot parse as a uint, parse as a string + return parts[0], parts[1], nil + } + return parts[0], v, nil + default: + return "", 0, ErrInvalidFormat + } +} + +func readUint(path string) (uint64, error) { + v, err := ioutil.ReadFile(path) + if err != nil { + return 0, err + } + return parseUint(strings.TrimSpace(string(v)), 10, 64) +} + +func parseUint(s string, base, bitSize int) (uint64, error) { + v, err := strconv.ParseUint(s, base, bitSize) + if err != nil { + intValue, intErr := strconv.ParseInt(s, base, bitSize) + // 1. Handle negative values greater than MinInt64 (and) + // 2. Handle negative values lesser than MinInt64 + if intErr == nil && intValue < 0 { + return 0, nil + } else if intErr != nil && + intErr.(*strconv.NumError).Err == strconv.ErrRange && + intValue < 0 { + return 0, nil + } + return 0, err + } + return v, nil +} + +// parseCgroupFile parses /proc/PID/cgroup file and return string +func parseCgroupFile(path string) (string, error) { + f, err := os.Open(path) + if err != nil { + return "", err + } + defer f.Close() + return parseCgroupFromReader(f) +} + +func parseCgroupFromReader(r io.Reader) (string, error) { + var ( + s = bufio.NewScanner(r) + ) + for s.Scan() { + var ( + text = s.Text() + parts = strings.SplitN(text, ":", 3) + ) + if len(parts) < 3 { + return "", fmt.Errorf("invalid cgroup entry: %q", text) + } + // text is like "0::/user.slice/user-1001.slice/session-1.scope" + if parts[0] == "0" && parts[1] == "" { + return parts[2], nil + } + } + if err := s.Err(); err != nil { + return "", err + } + return "", fmt.Errorf("cgroup path not found") +} + +// ToResources converts the oci LinuxResources struct into a +// v2 Resources type for use with this package. +// +// converting cgroups configuration from v1 to v2 +// ref: https://github.com/containers/crun/blob/master/crun.1.md#cgroup-v2 +func ToResources(spec *specs.LinuxResources) *Resources { + var resources Resources + if cpu := spec.CPU; cpu != nil { + resources.CPU = &CPU{ + Cpus: cpu.Cpus, + Mems: cpu.Mems, + } + if shares := cpu.Shares; shares != nil { + convertedWeight := (1 + ((*shares-2)*9999)/262142) + resources.CPU.Weight = &convertedWeight + } + if period := cpu.Period; period != nil { + resources.CPU.Max = NewCPUMax(cpu.Quota, period) + } + } + if mem := spec.Memory; mem != nil { + resources.Memory = &Memory{} + if swap := mem.Swap; swap != nil { + resources.Memory.Swap = swap + } + if l := mem.Limit; l != nil { + resources.Memory.Max = l + } + if l := mem.Reservation; l != nil { + resources.Memory.Low = l + } + } + if hugetlbs := spec.HugepageLimits; hugetlbs != nil { + hugeTlbUsage := HugeTlb{} + for _, hugetlb := range hugetlbs { + hugeTlbUsage = append(hugeTlbUsage, HugeTlbEntry{ + HugePageSize: hugetlb.Pagesize, + Limit: hugetlb.Limit, + }) + } + resources.HugeTlb = &hugeTlbUsage + } + if pids := spec.Pids; pids != nil { + resources.Pids = &Pids{ + Max: pids.Limit, + } + } + if i := spec.BlockIO; i != nil { + resources.IO = &IO{} + if i.Weight != nil { + resources.IO.BFQ.Weight = 1 + (*i.Weight-10)*9999/990 + } + for t, devices := range map[IOType][]specs.LinuxThrottleDevice{ + ReadBPS: i.ThrottleReadBpsDevice, + WriteBPS: i.ThrottleWriteBpsDevice, + ReadIOPS: i.ThrottleReadIOPSDevice, + WriteIOPS: i.ThrottleWriteIOPSDevice, + } { + for _, d := range devices { + resources.IO.Max = append(resources.IO.Max, Entry{ + Type: t, + Major: d.Major, + Minor: d.Minor, + Rate: d.Rate, + }) + } + } + } + if i := spec.Rdma; i != nil { + resources.RDMA = &RDMA{} + for device, value := range spec.Rdma { + if device != "" && (value.HcaHandles != nil || value.HcaObjects != nil) { + resources.RDMA.Limit = append(resources.RDMA.Limit, RDMAEntry{ + Device: device, + HcaHandles: *value.HcaHandles, + HcaObjects: *value.HcaObjects, + }) + } + } + } + + return &resources +} + +// Gets uint64 parsed content of single value cgroup stat file +func getStatFileContentUint64(filePath string) uint64 { + contents, err := ioutil.ReadFile(filePath) + if err != nil { + return 0 + } + trimmed := strings.TrimSpace(string(contents)) + if trimmed == "max" { + return math.MaxUint64 + } + + res, err := parseUint(trimmed, 10, 64) + if err != nil { + logrus.Errorf("unable to parse %q as a uint from Cgroup file %q", string(contents), filePath) + return res + } + + return res +} + +func readIoStats(path string) []*stats.IOEntry { + // more details on the io.stat file format: https://www.kernel.org/doc/Documentation/cgroup-v2.txt + var usage []*stats.IOEntry + fpath := filepath.Join(path, "io.stat") + currentData, err := ioutil.ReadFile(fpath) + if err != nil { + return usage + } + entries := strings.Split(string(currentData), "\n") + + for _, entry := range entries { + parts := strings.Split(entry, " ") + if len(parts) < 2 { + continue + } + majmin := strings.Split(parts[0], ":") + if len(majmin) != 2 { + continue + } + major, err := strconv.ParseUint(majmin[0], 10, 0) + if err != nil { + return usage + } + minor, err := strconv.ParseUint(majmin[1], 10, 0) + if err != nil { + return usage + } + parts = parts[1:] + ioEntry := stats.IOEntry{ + Major: major, + Minor: minor, + } + for _, stats := range parts { + keyPairValue := strings.Split(stats, "=") + if len(keyPairValue) != 2 { + continue + } + v, err := strconv.ParseUint(keyPairValue[1], 10, 0) + if err != nil { + continue + } + switch keyPairValue[0] { + case "rbytes": + ioEntry.Rbytes = v + case "wbytes": + ioEntry.Wbytes = v + case "rios": + ioEntry.Rios = v + case "wios": + ioEntry.Wios = v + } + } + usage = append(usage, &ioEntry) + } + return usage +} + +func rdmaStats(filepath string) []*stats.RdmaEntry { + currentData, err := ioutil.ReadFile(filepath) + if err != nil { + return []*stats.RdmaEntry{} + } + return toRdmaEntry(strings.Split(string(currentData), "\n")) +} + +func parseRdmaKV(raw string, entry *stats.RdmaEntry) { + var value uint64 + var err error + + parts := strings.Split(raw, "=") + switch len(parts) { + case 2: + if parts[1] == "max" { + value = math.MaxUint32 + } else { + value, err = parseUint(parts[1], 10, 32) + if err != nil { + return + } + } + if parts[0] == "hca_handle" { + entry.HcaHandles = uint32(value) + } else if parts[0] == "hca_object" { + entry.HcaObjects = uint32(value) + } + } +} + +func toRdmaEntry(strEntries []string) []*stats.RdmaEntry { + var rdmaEntries []*stats.RdmaEntry + for i := range strEntries { + parts := strings.Fields(strEntries[i]) + switch len(parts) { + case 3: + entry := new(stats.RdmaEntry) + entry.Device = parts[0] + parseRdmaKV(parts[1], entry) + parseRdmaKV(parts[2], entry) + + rdmaEntries = append(rdmaEntries, entry) + default: + continue + } + } + return rdmaEntries +} + +// isUnitExists returns true if the error is that a systemd unit already exists. +func isUnitExists(err error) bool { + if err != nil { + if dbusError, ok := err.(dbus.Error); ok { + return strings.Contains(dbusError.Name, "org.freedesktop.systemd1.UnitExists") + } + } + return false +} + +func systemdUnitFromPath(path string) string { + _, unit := filepath.Split(path) + return unit +} + +func readHugeTlbStats(path string) []*stats.HugeTlbStat { + var usage = []*stats.HugeTlbStat{} + var keyUsage = make(map[string]*stats.HugeTlbStat) + f, err := os.Open(path) + if err != nil { + return usage + } + files, err := f.Readdir(-1) + f.Close() + if err != nil { + return usage + } + + for _, file := range files { + if strings.Contains(file.Name(), "hugetlb") && + (strings.HasSuffix(file.Name(), "max") || strings.HasSuffix(file.Name(), "current")) { + var hugeTlb *stats.HugeTlbStat + var ok bool + fileName := strings.Split(file.Name(), ".") + pageSize := fileName[1] + if hugeTlb, ok = keyUsage[pageSize]; !ok { + hugeTlb = &stats.HugeTlbStat{} + } + hugeTlb.Pagesize = pageSize + out, err := ioutil.ReadFile(filepath.Join(path, file.Name())) + if err != nil { + continue + } + var value uint64 + stringVal := strings.TrimSpace(string(out)) + if stringVal == "max" { + value = math.MaxUint64 + } else { + value, err = strconv.ParseUint(stringVal, 10, 64) + } + if err != nil { + continue + } + switch fileName[2] { + case "max": + hugeTlb.Max = value + case "current": + hugeTlb.Current = value + } + keyUsage[pageSize] = hugeTlb + } + } + for _, entry := range keyUsage { + usage = append(usage, entry) + } + return usage +} diff --git a/vendor/github.com/containerd/containerd/.appveyor.yml b/vendor/github.com/containerd/containerd/.appveyor.yml deleted file mode 100644 index 86a7e3457b2..00000000000 --- a/vendor/github.com/containerd/containerd/.appveyor.yml +++ /dev/null @@ -1,63 +0,0 @@ -version: "{build}" - -image: Visual Studio 2017 - -clone_folder: c:\gopath\src\github.com\containerd\containerd - -branches: - only: - - master - - /release\/.*/ - -environment: - GOPATH: C:\gopath - CGO_ENABLED: 1 - matrix: - - GO_VERSION: 1.13.12 - -before_build: - - choco install -y mingw --version 5.3.0 - # Install Go - - rd C:\Go /s /q - - appveyor DownloadFile https://storage.googleapis.com/golang/go%GO_VERSION%.windows-amd64.zip - - 7z x go%GO_VERSION%.windows-amd64.zip -oC:\ >nul - - go version - - choco install codecov - # Clone hcsshim at the vendored version - - bash.exe -elc "export PATH=/c/tools/mingw64/bin:$PATH; - rm -rf /c/gopath/src/github.com/Microsoft/hcsshim; - git clone -q https://github.com/Microsoft/hcsshim.git /c/gopath/src/github.com/Microsoft/hcsshim; - export HCSSHIM_VERSION=`grep Microsoft/hcsshim vendor.conf | awk '{print $2}'`; - echo Using Microsoft/hcsshim $HCSSHIM_VERSION; - pushd /c/gopath/src/github.com/Microsoft/hcsshim; - git checkout $HCSSHIM_VERSION; - popd" - # Print host version. TODO: Remove this when containerd has a way to get host version - - ps: $psversiontable - -build_script: - # Build containerd-shim-runhcs-v1.exe and runhcs.exe from Microsoft/hcsshim - - bash.exe -elc "export PATH=/c/tools/mingw64/bin:$PATH; - export GOBIN=/c/gopath/src/github.com/Microsoft/hcsshim/bin; - mkdir $GOBIN; - pushd /c/gopath/src/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1; - go install; - cd ../runhcs; - go install; - ls -al $GOBIN; - popd" - - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/bin:$PATH; - script/setup/install-dev-tools; - mingw32-make.exe check" - - bash.exe -elc "export PATH=/c/tools/mingw64/bin:$PATH ; mingw32-make.exe build binaries" - -test_script: - # TODO: need an equivalent of TRAVIS_COMMIT_RANGE - # - GIT_CHECK_EXCLUDE="./vendor" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE/.../..}" C:\MinGW\bin\mingw32-make.exe dco - - bash.exe -lc "export PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH ; mingw32-make.exe coverage root-coverage" - # - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH ; mingw32-make.exe integration" - # Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759 - # - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH; TESTFLAGS_PARALLEL=1 mingw32-make.exe integration" - -on_success: - codecov --flag windows -f coverage.txt diff --git a/vendor/github.com/containerd/containerd/.gitignore b/vendor/github.com/containerd/containerd/.gitignore index d41d474aa8f..0f7a0998c0e 100644 --- a/vendor/github.com/containerd/containerd/.gitignore +++ b/vendor/github.com/containerd/containerd/.gitignore @@ -4,3 +4,4 @@ coverage.txt profile.out containerd.test _site/ +.vagrant/ diff --git a/vendor/github.com/containerd/containerd/.golangci.yml b/vendor/github.com/containerd/containerd/.golangci.yml index ded222c9339..fd7a1da3cab 100644 --- a/vendor/github.com/containerd/containerd/.golangci.yml +++ b/vendor/github.com/containerd/containerd/.golangci.yml @@ -15,7 +15,7 @@ linters: - errcheck run: - deadline: 3m + timeout: 3m skip-dirs: - api - design diff --git a/vendor/github.com/containerd/containerd/.mailmap b/vendor/github.com/containerd/containerd/.mailmap index f2a4b24efe2..10e9a96e034 100644 --- a/vendor/github.com/containerd/containerd/.mailmap +++ b/vendor/github.com/containerd/containerd/.mailmap @@ -19,11 +19,16 @@ Carlos Eduardo Cristian Staretu Cristian Staretu Daniel Dao +Derek McGowan Edgar Lee -Eric Ren +Eric Ernst +Eric Ren +Eric Ren +Eric Ren Fahed Dorgaa Frank Yang Fupan Li +Fupan Li Georgia Panoutsakopoulou Guangming Wang Haiyan Meng @@ -53,12 +58,15 @@ Kohei Tokunaga Krasi Georgiev Lantao Liu Lantao Liu +Li Yuxuan Lifubang Lu Jingxiao Maksym Pavlenko Mario Hros Mario Hros +Mario Macias Mark Gordon +Michael Crosby Michael Katsoulis Mike Brown Nishchay Kumar @@ -71,11 +79,15 @@ Rui Cao Sakeven Jiang Seth Pellegrino <30441101+sethp-nr@users.noreply.github.com> Shengbo Song +Shengjing Zhu +SiYu Zhao +Stefan Berger Stephen J Day Stephen J Day Stephen J Day Sudeesh John Su Fei +Ted Yu Tõnis Tiigi Wei Fu Xiaodong Zhang @@ -84,6 +96,7 @@ Yue Zhang Yuxing Liu Zhang Wei Zhenguang Zhu +Zhiyu Li <404977848@qq.com> Zhongming Chang Zhoulin Xie Zhoulin Xie <42261994+JoeWrightss@users.noreply.github.com> diff --git a/vendor/github.com/containerd/containerd/.travis.yml b/vendor/github.com/containerd/containerd/.travis.yml index f3defaf5c89..663cc803dfd 100644 --- a/vendor/github.com/containerd/containerd/.travis.yml +++ b/vendor/github.com/containerd/containerd/.travis.yml @@ -1,13 +1,13 @@ dist: bionic sudo: required -# setup travis so that we can run containers for integration tests -services: - - docker branches: except: - master - - release/1.3 + +# setup travis so that we can run containers for integration tests +services: + - docker language: go @@ -15,13 +15,13 @@ os: - linux go: - - "1.13.12" + - "1.13.15" env: - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v1 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic GOPROXY=direct - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic TRAVIS_RELEASE=yes GOPROXY=direct + - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runc.v2 TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic GOPROXY=direct RUNC_FLAVOR=crun - TRAVIS_GOOS=linux TEST_RUNTIME=io.containerd.runtime.v1.linux TRAVIS_CGO_ENABLED=1 TRAVIS_DISTRO=bionic GOPROXY=direct - - TRAVIS_GOOS=darwin TRAVIS_CGO_ENABLED=0 GOPROXY=direct matrix: include: @@ -46,7 +46,6 @@ addons: - libaio-dev - libprotobuf-c-dev - libprotobuf-dev - - socat before_install: - uname -r @@ -57,9 +56,6 @@ install: - sudo chmod og+rx /usr/local/include/google /usr/local/include/google/protobuf /usr/local/include/google/protobuf/compiler - sudo chmod -R og+r /usr/local/include/google/protobuf/ - protoc --version - - go get -u github.com/vbatts/git-validation - - go get -u github.com/kunalkushwaha/ltag - - go get -u github.com/LK4D4/vndr - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-seccomp ; fi - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-runc ; fi - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-cni ; fi @@ -69,20 +65,11 @@ install: - if [ "$TRAVIS_GOOS" = "linux" ]; then cd /tmp/criu-3.13 && sudo make install-criu ; fi - cd $TRAVIS_BUILD_DIR -before_script: - - pushd ..; git clone https://github.com/containerd/project; popd - script: - export GOOS=$TRAVIS_GOOS - export CGO_ENABLED=$TRAVIS_CGO_ENABLED - - DCO_VERBOSITY=-q ../project/script/validate/dco - - ../project/script/validate/fileheader ../project/ - - travis_wait ../project/script/validate/vendor - GOOS=linux GO111MODULE=off script/setup/install-dev-tools - go build -i . - - make check - - if [ "$GOOS" = "linux" ]; then make check-protos check-api-descriptors; fi - - if [ "$TRAVIS_GOOS" = "linux" ]; then make man ; fi - make build - make binaries - if [ "$TRAVIS_GOOS" = "linux" ]; then sudo make install ; fi diff --git a/vendor/github.com/containerd/containerd/.zuul.yaml b/vendor/github.com/containerd/containerd/.zuul.yaml index ad513f6fdda..b45797d363b 100644 --- a/vendor/github.com/containerd/containerd/.zuul.yaml +++ b/vendor/github.com/containerd/containerd/.zuul.yaml @@ -10,5 +10,5 @@ description: | Containerd build in openlab cluster. run: .zuul/playbooks/containerd-build/run.yaml - nodeset: ubuntu-xenial-arm64 + nodeset: ubuntu-xenial-arm64-openlab voting: false diff --git a/vendor/github.com/containerd/containerd/ADOPTERS.md b/vendor/github.com/containerd/containerd/ADOPTERS.md index 31d355b8dd9..af0bb85493f 100644 --- a/vendor/github.com/containerd/containerd/ADOPTERS.md +++ b/vendor/github.com/containerd/containerd/ADOPTERS.md @@ -14,10 +14,14 @@ including the Balena project listed below. **_[Google Cloud Kubernetes Engine (GKE)](https://cloud.google.com/kubernetes-engine/)_** - offers containerd as the CRI runtime in **beta** for recent versions of Kubernetes. +**_[AWS Fargate](https://aws.amazon.com/fargate)_** - uses containerd + Firecracker (noted below) as the runtime and isolation technology for containers run in the Fargate platform. Fargate is a serverless, container-native compute offering from Amazon Web Services. + **_Cloud Foundry_** - The [Guardian container manager](https://github.com/cloudfoundry/guardian) for CF has been using OCI runC directly with additional code from CF managing the container image and filesystem interactions, but have recently migrated to use containerd as a replacement for the extra code they had written around runC. **_Alibaba's PouchContainer_** - The Alibaba [PouchContainer](https://github.com/alibaba/pouch) project uses containerd as its runtime for a cloud native offering that has unique isolation and image distribution capabilities. +**_Rancher's k3s project_** - Rancher Labs [k3s](https://github.com/rancher/k3s) is a lightweight Kubernetes distribution; in their words: "Easy to install, half the memory, all in a binary less than 40mb." k8s uses containerd as the embedded runtime for this popular lightweight Kubernetes variant. + **_Rancher's Rio project_** - Rancher Labs [Rio](https://github.com/rancher/rio) project uses containerd as the runtime for a combined Kubernetes, Istio, and container "Cloud Native Container Distribution" platform. **_Eliot_** - The [Eliot](https://github.com/ernoaapa/eliot) container project for IoT device container management uses containerd as the runtime. diff --git a/vendor/github.com/containerd/containerd/BUILDING.md b/vendor/github.com/containerd/containerd/BUILDING.md index 07420a04b4a..7a37e1602a9 100644 --- a/vendor/github.com/containerd/containerd/BUILDING.md +++ b/vendor/github.com/containerd/containerd/BUILDING.md @@ -14,10 +14,9 @@ This doc includes: To build the `containerd` daemon, and the `ctr` simple test client, the following build system dependencies are required: -* Go 1.10.x or above +* Go 1.13.x or above except 1.14.x * Protoc 3.x compiler and headers (download at the [Google protobuf releases page](https://github.com/google/protobuf/releases)) * Btrfs headers and libraries for your distribution. Note that building the btrfs driver can be disabled via the build tag `no_btrfs`, removing this dependency. -* `libseccomp` is required if you're building with seccomp support ## Build the development environment @@ -31,11 +30,11 @@ At this point you can use `go` to checkout `containerd` in your `GOPATH`: go get github.com/containerd/containerd ``` -For proper results, install the `protoc` release into `/usr/local` on your build system. For example, the following commands will download and install the 3.5.0 release for a 64-bit Linux host: +For proper results, install the `protoc` release into `/usr/local` on your build system. For example, the following commands will download and install the 3.11.4 release for a 64-bit Linux host: ``` -$ wget -c https://github.com/google/protobuf/releases/download/v3.5.0/protoc-3.5.0-linux-x86_64.zip -$ sudo unzip protoc-3.5.0-linux-x86_64.zip -d /usr/local +$ wget -c https://github.com/google/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip +$ sudo unzip protoc-3.11.4-linux-x86_64.zip -d /usr/local ``` `containerd` uses [Btrfs](https://en.wikipedia.org/wiki/Btrfs) it means that you @@ -43,11 +42,8 @@ need to satisfy this dependencies in your system: * CentOS/Fedora: `yum install btrfs-progs-devel` * Debian/Ubuntu: `apt-get install btrfs-tools` - -If you're building with seccomp, you'll need to install it with the following: - -* CentOS/Fedora: `yum install libseccomp-devel` -* Debian/Ubuntu: `apt install libseccomp-dev` + * Debian Buster/Ubuntu 19.10: + `apt-get install btrfs-progs libbtrfs-dev` At this point you are ready to build `containerd` yourself! @@ -105,6 +101,8 @@ make generate > * `no_cri`: A build tag disables building Kubernetes [CRI](http://blog.kubernetes.io/2016/12/container-runtime-interface-cri-in-kubernetes.html) support into containerd. > See [here](https://github.com/containerd/cri-containerd#build-tags) for build tags of CRI plugin. > * `no_devmapper`: A build tag disables building the device mapper snapshot driver. +> * `apparmor`: Enables apparmor support in the cri plugin +> * `selinux`: Enables selinux support in the cri plugin > > For example, adding `BUILDTAGS=no_btrfs` to your environment before calling the **binaries** > Makefile target will disable the btrfs driver within the containerd Go build. @@ -138,7 +136,7 @@ You can build an image from this `Dockerfile`: FROM golang RUN apt-get update && \ - apt-get install -y btrfs-tools libseccomp-dev + apt-get install -y libbtrfs-dev ``` Let's suppose that you built an image called `containerd/build`. From the @@ -160,7 +158,7 @@ You are now ready to [build](#build-containerd): ``` ## Build containerd and runc -To have complete core container runtime, you will both `containerd` and `runc`. It is possible to build both of these via Docker container. +To have complete core container runtime, you will need both `containerd` and `runc`. It is possible to build both of these via Docker container. You can use `go` to checkout `runc` in your `GOPATH`: @@ -174,7 +172,7 @@ We can build an image from this `Dockerfile`: FROM golang RUN apt-get update && \ - apt-get install -y btrfs-tools libseccomp-dev + apt-get install -y libbtrfs-dev libseccomp-dev ``` diff --git a/vendor/github.com/containerd/containerd/Makefile b/vendor/github.com/containerd/containerd/Makefile index c1ea1dde9b4..76795bef576 100644 --- a/vendor/github.com/containerd/containerd/Makefile +++ b/vendor/github.com/containerd/containerd/Makefile @@ -23,6 +23,7 @@ DESTDIR ?= /usr/local VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always) REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi) PACKAGE=github.com/containerd/containerd +SHIM_CGO_ENABLED ?= 0 ifneq "$(strip $(shell command -v go 2>/dev/null))" "" GOOS ?= $(shell go env GOOS) @@ -92,8 +93,8 @@ MANPAGES=ctr.8 containerd.8 containerd-config.8 containerd-config.toml.5 ifdef BUILDTAGS GO_BUILDTAGS = ${BUILDTAGS} endif -# Build tags seccomp and apparmor are needed by CRI plugin. -GO_BUILDTAGS ?= seccomp apparmor +# Build tags apparmor and selinux are needed by CRI plugin. +GO_BUILDTAGS ?= apparmor selinux GO_BUILDTAGS += ${DEBUG_TAGS} GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(GO_BUILDTAGS)",) GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) $(EXTRA_LDFLAGS)' @@ -110,11 +111,11 @@ GO_GCFLAGS=$(shell \ echo "-gcflags=-trimpath=$${1}/src"; \ ) +BINARIES=$(addprefix bin/,$(COMMANDS)) + #include platform specific makefile -include Makefile.$(GOOS) -BINARIES=$(addprefix bin/,$(COMMANDS)) - # Flags passed to `go test` TESTFLAGS ?= $(TESTFLAGS_RACE) $(EXTRA_TESTFLAGS) TESTFLAGS_PARALLEL ?= 8 @@ -182,22 +183,26 @@ benchmark: ## run benchmarks tests FORCE: +define BUILD_BINARY = +@echo "$(WHALE) $@" +@go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@ ${GO_LDFLAGS} ${GO_TAGS} ./$< +endef + # Build a binary from a cmd. bin/%: cmd/% FORCE - @echo "$(WHALE) $@${BINARY_SUFFIX}" - @go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ./$< + $(BUILD_BINARY) bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 @echo "$(WHALE) bin/containerd-shim" - @CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim + @CGO_ENABLED=${SHIM_CGO_ENABLED} go build ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim bin/containerd-shim-runc-v1: cmd/containerd-shim-runc-v1 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 @echo "$(WHALE) bin/containerd-shim-runc-v1" - @CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1 + @CGO_ENABLED=${SHIM_CGO_ENABLED} go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1 bin/containerd-shim-runc-v2: cmd/containerd-shim-runc-v2 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 @echo "$(WHALE) bin/containerd-shim-runc-v2" - @CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v2 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2 + @CGO_ENABLED=${SHIM_CGO_ENABLED} go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v2 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2 binaries: $(BINARIES) ## build binaries @echo "$(WHALE) $@" diff --git a/vendor/github.com/containerd/containerd/Makefile.linux b/vendor/github.com/containerd/containerd/Makefile.linux index 7b2700897ba..c3385313d67 100644 --- a/vendor/github.com/containerd/containerd/Makefile.linux +++ b/vendor/github.com/containerd/containerd/Makefile.linux @@ -20,7 +20,9 @@ COMMANDS += containerd-shim containerd-shim-runc-v1 containerd-shim-runc-v2 # check GOOS for cross compile builds ifeq ($(GOOS),linux) + ifneq ($(GOARCH),$(filter $(GOARCH),mips mipsle mips64 mips64le ppc64 riscv64)) GO_GCFLAGS += -buildmode=pie + endif endif # amd64 supports go test -race diff --git a/vendor/github.com/containerd/containerd/Makefile.windows b/vendor/github.com/containerd/containerd/Makefile.windows index 5dbb1f8a5bc..56164e4247b 100644 --- a/vendor/github.com/containerd/containerd/Makefile.windows +++ b/vendor/github.com/containerd/containerd/Makefile.windows @@ -17,9 +17,12 @@ WHALE = "+" ONI = "-" -BINARY_SUFFIX=".exe" - # amd64 supports go test -race ifeq ($(GOARCH),amd64) TESTFLAGS_RACE= -race endif + +BINARIES:=$(addsuffix .exe,$(BINARIES)) + +bin/%.exe: cmd/% FORCE + $(BUILD_BINARY) diff --git a/vendor/github.com/containerd/containerd/Protobuild.toml b/vendor/github.com/containerd/containerd/Protobuild.toml index 990ff83cf09..d88fcd68d40 100644 --- a/vendor/github.com/containerd/containerd/Protobuild.toml +++ b/vendor/github.com/containerd/containerd/Protobuild.toml @@ -17,7 +17,7 @@ plugins = ["grpc", "fieldpath"] # Paths that will be added untouched to the end of the includes. We use # `/usr/local/include` to pickup the common install location of protobuf. # This is the default. - after = ["/usr/local/include"] + after = ["/usr/local/include", "/usr/include"] # This section maps protobuf imports to Go packages. These will become # `-M` directives in the call to the go protobuf generator. diff --git a/vendor/github.com/containerd/containerd/README.md b/vendor/github.com/containerd/containerd/README.md index 2323f26f623..a973d5156ea 100644 --- a/vendor/github.com/containerd/containerd/README.md +++ b/vendor/github.com/containerd/containerd/README.md @@ -1,8 +1,9 @@ ![containerd banner](https://raw.githubusercontent.com/cncf/artwork/master/projects/containerd/horizontal/color/containerd-horizontal-color.png) [![GoDoc](https://godoc.org/github.com/containerd/containerd?status.svg)](https://godoc.org/github.com/containerd/containerd) -[![Build Status](https://travis-ci.org/containerd/containerd.svg?branch=master)](https://travis-ci.org/containerd/containerd) +[![Build Status](https://github.com/containerd/containerd/workflows/CI/badge.svg)](https://github.com/containerd/containerd/actions?query=workflow%3ACI) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/containerd/containerd?branch=master&svg=true)](https://ci.appveyor.com/project/mlaventure/containerd-3g73f?branch=master) +[![Nightlies](https://github.com/containerd/containerd/workflows/Nightly/badge.svg)](https://github.com/containerd/containerd/actions?query=workflow%3ANightly) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fcontainerd%2Fcontainerd.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fcontainerd%2Fcontainerd?ref=badge_shield) [![Go Report Card](https://goreportcard.com/badge/github.com/containerd/containerd)](https://goreportcard.com/report/github.com/containerd/containerd) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1271/badge)](https://bestpractices.coreinfrastructure.org/projects/1271) @@ -24,6 +25,12 @@ See how to build containerd from source at [BUILDING](BUILDING.md). If you are interested in trying out containerd see our example at [Getting Started](docs/getting-started.md). +## Nightly builds + +There are nightly builds available for download [here](https://github.com/containerd/containerd/actions?query=workflow%3ANightly). +Binaries are generated from `master` branch every night for `Linux` and `Windows`. + +Please be aware: nightly builds might have critical bugs, it's not recommended for use in prodution and no support provided. ## Runtime Requirements @@ -147,7 +154,7 @@ Taking a container object and turning it into a runnable process on a system is ```go // create a new task -task, err := redis.NewTask(context, cio.Stdio) +task, err := redis.NewTask(context, cio.NewCreator(cio.WithStdio)) defer task.Delete(context) // the task is now running and has a pid that can be use to setup networking @@ -177,7 +184,7 @@ checkpoint, err := client.Pull(context, "myregistry/checkpoints/redis:master") redis, err = client.NewContainer(context, "redis-master", containerd.WithNewSnapshot("redis-rootfs", checkpoint)) defer container.Delete(context) -task, err = redis.NewTask(context, cio.Stdio, containerd.WithTaskCheckpoint(checkpoint)) +task, err = redis.NewTask(context, cio.NewCreator(cio.WithStdio), containerd.WithTaskCheckpoint(checkpoint)) defer task.Delete(context) err := task.Start(context) @@ -210,6 +217,34 @@ See [PLUGINS.md](PLUGINS.md) for how to create plugins Please see [RELEASES.md](RELEASES.md) for details on versioning and stability of containerd components. +Downloadable 64-bit Intel/AMD binaries of all official releases are available on +our [releases page](https://github.com/containerd/containerd/releases), as well as +auto-published to the [cri-containerd-release storage bucket](https://console.cloud.google.com/storage/browser/cri-containerd-release?pli=1). + +For other architectures and distribution support, you will find that many +Linux distributions package their own containerd and provide it across several +architectures, such as [Canonical's Ubuntu packaging](https://launchpad.net/ubuntu/bionic/+package/containerd). + +#### Enabling command auto-completion + +Starting with containerd 1.4, the urfave client feature for auto-creation of bash and zsh +autocompletion data is enabled. To use the autocomplete feature in a bash shell for example, source +the autocomplete/ctr file in your `.bashrc`, or manually like: + +``` +$ source ./contrib/autocomplete/ctr +``` + +#### Distribution of `ctr` autocomplete for bash and zsh + +For bash, copy the `contrib/autocomplete/ctr` script into +`/etc/bash_completion.d/` and rename it to `ctr`. The `zsh_autocomplete` +file is also available and can be used similarly for zsh users. + +Provide documentation to users to `source` this file into their shell if +you don't place the autocomplete file in a location where it is automatically +loaded for the user's shell environment. + ### Communication For async communication and long running discussions please use issues and pull requests on the github repo. @@ -230,7 +265,7 @@ __If you are reporting a security issue, please reach out discreetly at security ## Licenses -The containerd codebase is released under the [Apache 2.0 license](LICENSE.code). +The containerd codebase is released under the [Apache 2.0 license](LICENSE). The README.md file, and files in the "docs" folder are licensed under the Creative Commons Attribution 4.0 International License. You may obtain a copy of the license, titled CC-BY-4.0, at http://creativecommons.org/licenses/by/4.0/. diff --git a/vendor/github.com/containerd/containerd/RELEASES.md b/vendor/github.com/containerd/containerd/RELEASES.md index 735366eeab0..c75d9fef2da 100644 --- a/vendor/github.com/containerd/containerd/RELEASES.md +++ b/vendor/github.com/containerd/containerd/RELEASES.md @@ -93,14 +93,15 @@ The current state is available in the following table: | Release | Status | Start | End of Life | |---------|-------------|------------------|-------------------| -| [0.0](https://github.com/containerd/containerd/releases/tag/0.0.5) | End of Life | Dec 4, 2015 | - | -| [0.1](https://github.com/containerd/containerd/releases/tag/v0.1.0) | End of Life | Mar 21, 2016 | - | -| [0.2](https://github.com/containerd/containerd/tree/v0.2.x) | End of Life | Apr 21, 2016 | December 5, 2017 | -| [1.0](https://github.com/containerd/containerd/releases/tag/v1.0.3) | End of Life | December 5, 2017 | December 5, 2018 | -| [1.1](https://github.com/containerd/containerd/releases/tag/v1.1.8) | Extended | April 23, 2018 | October 23, 2019 | -| [1.2](https://github.com/containerd/containerd/releases/tag/v1.2.10) | Active | October 24, 2018 | March 26, 2020 | -| [1.3](https://github.com/containerd/containerd/releases/tag/v1.3.0) | Active | September 26, 2019 | max(September 26, 2020, release of 1.4.0 + 6 months) | -| [1.4](https://github.com/containerd/containerd/milestone/27) | Next | TBD | max(TBD+1 year, release of 1.5.0 + 6 months) | +| [0.0](https://github.com/containerd/containerd/releases/tag/0.0.5) | End of Life | Dec 4, 2015 | - | +| [0.1](https://github.com/containerd/containerd/releases/tag/v0.1.0) | End of Life | Mar 21, 2016 | - | +| [0.2](https://github.com/containerd/containerd/tree/v0.2.x) | End of Life | Apr 21, 2016 | December 5, 2017 | +| [1.0](https://github.com/containerd/containerd/releases/tag/v1.0.3) | End of Life | December 5, 2017 | December 5, 2018 | +| [1.1](https://github.com/containerd/containerd/releases/tag/v1.1.8) | End of Life | April 23, 2018 | October 23, 2019 | +| [1.2](https://github.com/containerd/containerd/releases/tag/v1.2.13) | Extended | October 24, 2018 | September 26, 2020 | +| [1.3](https://github.com/containerd/containerd/releases/tag/v1.3.7) | Active | September 26, 2019 | February 17, 2021 | +| [1.4](https://github.com/containerd/containerd/releases/tag/v1.4.0) | Active | August 17, 2020 | max(August 17, 2021, release of 1.5.0 + 6 months) | +| [1.5](https://github.com/containerd/containerd/milestone/30) | Next | TBD | max(TBD+1 year, release of 1.6.0 + 6 months) | Note that branches and release from before 1.0 may not follow these rules. @@ -176,7 +177,7 @@ containerd versions: | Runtime Shim API | Stable | 1.2 | - | | Daemon Config | Stable | 1.0 | - | | Go client API | Unstable | _future_ | [godoc](https://godoc.org/github.com/containerd/containerd) | -| CRI GRPC API | Unstable | v1alpha2 _current_ | [api/](https://github.com/kubernetes/kubernetes/tree/master/pkg/kubelet/apis/cri/runtime/v1alpha2) | +| CRI GRPC API | Unstable | v1alpha2 _current_ | [cri-api](https://github.com/kubernetes/cri-api/tree/master/pkg/apis/runtime/v1alpha2) | | `ctr` tool | Unstable | Out of scope | - | From the version stated in the above table, that component must adhere to the @@ -309,3 +310,12 @@ in that process. Container root file systems will be maintained on upgrade. We may make exceptions in the interest of __security patches__. If a break is required, it will be communicated clearly and the solution will be considered against total impact. + +## Deprecated features + +The deprecated features are shown in the following table: + +| Component | Deprecation release | Target release for removal | +|----------------------------------------------------------------------|---------------------|----------------------------| +| Runtime V1 API and implementation (`io.containerd.runtime.v1.linux`) | containerd v1.4 | containerd v2.0 | +| Runc V1 implementation of Runtime V2 (`io.containerd.runc.v1`) | containerd v1.4 | containerd v2.0 | diff --git a/vendor/github.com/containerd/containerd/SCOPE.md b/vendor/github.com/containerd/containerd/SCOPE.md index aac7a19d07b..aec9da9158b 100644 --- a/vendor/github.com/containerd/containerd/SCOPE.md +++ b/vendor/github.com/containerd/containerd/SCOPE.md @@ -52,6 +52,6 @@ containerd is designed to be embedded into a larger system, hence it only includ ### How is the scope changed? -The scope of this project is a whitelist. +The scope of this project is an allowed list. If it's not mentioned as being in scope, it is out of scope. For the scope of this project to change it requires a 100% vote from all maintainers of the project. diff --git a/vendor/github.com/containerd/containerd/Vagrantfile b/vendor/github.com/containerd/containerd/Vagrantfile new file mode 100644 index 00000000000..fac9586fa28 --- /dev/null +++ b/vendor/github.com/containerd/containerd/Vagrantfile @@ -0,0 +1,246 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Copyright The containerd 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. + +# Vagrantfile for cgroup2 and SELinux +Vagrant.configure("2") do |config| + config.vm.box = "fedora/32-cloud-base" + memory = 4096 + cpus = 2 + config.vm.provider :virtualbox do |v| + v.memory = memory + v.cpus = cpus + end + config.vm.provider :libvirt do |v| + v.memory = memory + v.cpus = cpus + end + + # Disabled by default. To run: + # vagrant up --provision-with=upgrade-packages + # To upgrade only specific packages: + # UPGRADE_PACKAGES=selinux vagrant up --provision-with=upgrade-packages + # + config.vm.provision "upgrade-packages", type: "shell", run: "never" do |sh| + sh.upload_path = "/tmp/vagrant-upgrade-packages" + sh.env = { + 'UPGRADE_PACKAGES': ENV['UPGRADE_PACKAGES'], + } + sh.inline = <<~SHELL + #!/usr/bin/env bash + set -eux -o pipefail + dnf -y upgrade ${UPGRADE_PACKAGES} + SHELL + end + + # To re-run, installing CNI from RPM: + # INSTALL_PACKAGES="containernetworking-plugins" vagrant up --provision-with=install-packages + # + config.vm.provision "install-packages", type: "shell", run: "once" do |sh| + sh.upload_path = "/tmp/vagrant-install-packages" + sh.env = { + 'INSTALL_PACKAGES': ENV['INSTALL_PACKAGES'], + } + sh.inline = <<~SHELL + #!/usr/bin/env bash + set -eux -o pipefail + dnf -y install \ + container-selinux \ + curl \ + gcc \ + git \ + iptables \ + libseccomp-devel \ + libselinux-devel \ + lsof \ + make \ + ${INSTALL_PACKAGES} + SHELL + end + + # To re-run this provisioner, installing a different version of go: + # GO_VERSION="1.14.6" vagrant up --provision-with=install-golang + # + config.vm.provision "install-golang", type: "shell", run: "once" do |sh| + sh.upload_path = "/tmp/vagrant-install-golang" + sh.env = { + 'GO_VERSION': ENV['GO_VERSION'] || "1.13.15", + } + sh.inline = <<~SHELL + #!/usr/bin/env bash + set -eux -o pipefail + curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar Cxz /usr/local + cat >> /etc/environment <> /etc/profile.d/sh.local < /tmp/containerd.log + systemctl stop containerd + } + selinux=$(getenforce) + if [[ $selinux == Enforcing ]]; then + setenforce 0 + fi + systemctl enable --now ${GOPATH}/src/github.com/containerd/containerd/containerd.service + if [[ $selinux == Enforcing ]]; then + setenforce 1 + fi + trap cleanup EXIT + ctr version + critest --parallel=$(nproc) ${CRITEST_ARGS} + SHELL + end + +end diff --git a/vendor/github.com/containerd/containerd/api/events/container.pb.go b/vendor/github.com/containerd/containerd/api/events/container.pb.go index 2d0d1fa6206..0c1e0a93964 100644 --- a/vendor/github.com/containerd/containerd/api/events/container.pb.go +++ b/vendor/github.com/containerd/containerd/api/events/container.pb.go @@ -11,6 +11,7 @@ import ( types "github.com/gogo/protobuf/types" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -24,7 +25,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ContainerCreate struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -48,7 +49,7 @@ func (m *ContainerCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_ContainerCreate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -88,7 +89,7 @@ func (m *ContainerCreate_Runtime) XXX_Marshal(b []byte, deterministic bool) ([]b return xxx_messageInfo_ContainerCreate_Runtime.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -130,7 +131,7 @@ func (m *ContainerUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_ContainerUpdate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -169,7 +170,7 @@ func (m *ContainerDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_ContainerDelete.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -325,7 +326,7 @@ func (m *ContainerDelete) Field(fieldpath []string) (string, bool) { func (m *ContainerCreate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -333,42 +334,52 @@ func (m *ContainerCreate) Marshal() (dAtA []byte, err error) { } func (m *ContainerCreate) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContainerCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - if len(m.Image) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintContainer(dAtA, i, uint64(len(m.Image))) - i += copy(dAtA[i:], m.Image) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Runtime != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintContainer(dAtA, i, uint64(m.Runtime.Size())) - n1, err := m.Runtime.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Runtime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainer(dAtA, i, uint64(size)) } - i += n1 + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Image) > 0 { + i -= len(m.Image) + copy(dAtA[i:], m.Image) + i = encodeVarintContainer(dAtA, i, uint64(len(m.Image))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ContainerCreate_Runtime) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -376,36 +387,45 @@ func (m *ContainerCreate_Runtime) Marshal() (dAtA []byte, err error) { } func (m *ContainerCreate_Runtime) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContainerCreate_Runtime) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContainer(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Options != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintContainer(dAtA, i, uint64(m.Options.Size())) - n2, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainer(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintContainer(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ContainerUpdate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -413,55 +433,66 @@ func (m *ContainerUpdate) Marshal() (dAtA []byte, err error) { } func (m *ContainerUpdate) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContainerUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - if len(m.Image) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintContainer(dAtA, i, uint64(len(m.Image))) - i += copy(dAtA[i:], m.Image) - } - if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x1a - i++ - v := m.Labels[k] - mapSize := 1 + len(k) + sovContainer(uint64(len(k))) + 1 + len(v) + sovContainer(uint64(len(v))) - i = encodeVarintContainer(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintContainer(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintContainer(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.SnapshotKey) > 0 { - dAtA[i] = 0x22 - i++ + i -= len(m.SnapshotKey) + copy(dAtA[i:], m.SnapshotKey) i = encodeVarintContainer(dAtA, i, uint64(len(m.SnapshotKey))) - i += copy(dAtA[i:], m.SnapshotKey) + i-- + dAtA[i] = 0x22 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Labels) > 0 { + for k := range m.Labels { + v := m.Labels[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintContainer(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintContainer(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintContainer(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } } - return i, nil + if len(m.Image) > 0 { + i -= len(m.Image) + copy(dAtA[i:], m.Image) + i = encodeVarintContainer(dAtA, i, uint64(len(m.Image))) + i-- + dAtA[i] = 0x12 + } + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ContainerDelete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -469,30 +500,39 @@ func (m *ContainerDelete) Marshal() (dAtA []byte, err error) { } func (m *ContainerDelete) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContainerDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintContainer(dAtA []byte, offset int, v uint64) int { + offset -= sovContainer(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *ContainerCreate) Size() (n int) { if m == nil { @@ -587,14 +627,7 @@ func (m *ContainerDelete) Size() (n int) { } func sovContainer(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozContainer(x uint64) (n int) { return sovContainer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1309,6 +1342,7 @@ func (m *ContainerDelete) Unmarshal(dAtA []byte) error { func skipContainer(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1340,10 +1374,8 @@ func skipContainer(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1364,55 +1396,30 @@ func skipContainer(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthContainer } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthContainer - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowContainer - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipContainer(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthContainer - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupContainer + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthContainer + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthContainer = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowContainer = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthContainer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowContainer = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupContainer = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/events/content.pb.go b/vendor/github.com/containerd/containerd/api/events/content.pb.go index c6ae8a5f2fe..959ea72d8e6 100644 --- a/vendor/github.com/containerd/containerd/api/events/content.pb.go +++ b/vendor/github.com/containerd/containerd/api/events/content.pb.go @@ -9,6 +9,7 @@ import ( github_com_opencontainers_go_digest "github.com/opencontainers/go-digest" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -22,7 +23,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ContentDelete struct { Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` @@ -44,7 +45,7 @@ func (m *ContentDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_ContentDelete.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -106,7 +107,7 @@ func (m *ContentDelete) Field(fieldpath []string) (string, bool) { func (m *ContentDelete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -114,30 +115,39 @@ func (m *ContentDelete) Marshal() (dAtA []byte, err error) { } func (m *ContentDelete) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContentDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Digest) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) - i += copy(dAtA[i:], m.Digest) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Digest) > 0 { + i -= len(m.Digest) + copy(dAtA[i:], m.Digest) + i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintContent(dAtA []byte, offset int, v uint64) int { + offset -= sovContent(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *ContentDelete) Size() (n int) { if m == nil { @@ -156,14 +166,7 @@ func (m *ContentDelete) Size() (n int) { } func sovContent(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozContent(x uint64) (n int) { return sovContent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -276,6 +279,7 @@ func (m *ContentDelete) Unmarshal(dAtA []byte) error { func skipContent(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -307,10 +311,8 @@ func skipContent(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -331,55 +333,30 @@ func skipContent(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthContent } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthContent - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowContent - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipContent(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthContent - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupContent + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthContent + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthContent = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowContent = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthContent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowContent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupContent = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/events/image.pb.go b/vendor/github.com/containerd/containerd/api/events/image.pb.go index e0c58aa49e1..13f60b01797 100644 --- a/vendor/github.com/containerd/containerd/api/events/image.pb.go +++ b/vendor/github.com/containerd/containerd/api/events/image.pb.go @@ -9,6 +9,7 @@ import ( github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -22,7 +23,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ImageCreate struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -45,7 +46,7 @@ func (m *ImageCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ImageCreate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -85,7 +86,7 @@ func (m *ImageUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ImageUpdate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -124,7 +125,7 @@ func (m *ImageDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ImageDelete.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -238,7 +239,7 @@ func (m *ImageDelete) Field(fieldpath []string) (string, bool) { func (m *ImageCreate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -246,43 +247,52 @@ func (m *ImageCreate) Marshal() (dAtA []byte, err error) { } func (m *ImageCreate) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ImageCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x12 - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v))) - i = encodeVarintImage(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintImage(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintImage(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintImage(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintImage(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ImageUpdate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -290,43 +300,52 @@ func (m *ImageUpdate) Marshal() (dAtA []byte, err error) { } func (m *ImageUpdate) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ImageUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x12 - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v))) - i = encodeVarintImage(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintImage(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintImage(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintImage(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintImage(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ImageDelete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -334,30 +353,39 @@ func (m *ImageDelete) Marshal() (dAtA []byte, err error) { } func (m *ImageDelete) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ImageDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintImage(dAtA []byte, offset int, v uint64) int { + offset -= sovImage(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *ImageCreate) Size() (n int) { if m == nil { @@ -424,14 +452,7 @@ func (m *ImageDelete) Size() (n int) { } func sovImage(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozImage(x uint64) (n int) { return sovImage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1014,6 +1035,7 @@ func (m *ImageDelete) Unmarshal(dAtA []byte) error { func skipImage(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1045,10 +1067,8 @@ func skipImage(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1069,55 +1089,30 @@ func skipImage(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthImage } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthImage - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowImage - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipImage(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthImage - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupImage + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthImage + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthImage = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowImage = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthImage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowImage = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupImage = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/events/namespace.pb.go b/vendor/github.com/containerd/containerd/api/events/namespace.pb.go index 84882e5735c..37c3b78cf3b 100644 --- a/vendor/github.com/containerd/containerd/api/events/namespace.pb.go +++ b/vendor/github.com/containerd/containerd/api/events/namespace.pb.go @@ -9,6 +9,7 @@ import ( github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -22,7 +23,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type NamespaceCreate struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -45,7 +46,7 @@ func (m *NamespaceCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_NamespaceCreate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -85,7 +86,7 @@ func (m *NamespaceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_NamespaceUpdate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -124,7 +125,7 @@ func (m *NamespaceDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_NamespaceDelete.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -238,7 +239,7 @@ func (m *NamespaceDelete) Field(fieldpath []string) (string, bool) { func (m *NamespaceCreate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -246,43 +247,52 @@ func (m *NamespaceCreate) Marshal() (dAtA []byte, err error) { } func (m *NamespaceCreate) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x12 - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) - i = encodeVarintNamespace(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintNamespace(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintNamespace(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintNamespace(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *NamespaceUpdate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -290,43 +300,52 @@ func (m *NamespaceUpdate) Marshal() (dAtA []byte, err error) { } func (m *NamespaceUpdate) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x12 - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) - i = encodeVarintNamespace(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintNamespace(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintNamespace(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintNamespace(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *NamespaceDelete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -334,30 +353,39 @@ func (m *NamespaceDelete) Marshal() (dAtA []byte, err error) { } func (m *NamespaceDelete) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int { + offset -= sovNamespace(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *NamespaceCreate) Size() (n int) { if m == nil { @@ -424,14 +452,7 @@ func (m *NamespaceDelete) Size() (n int) { } func sovNamespace(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozNamespace(x uint64) (n int) { return sovNamespace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1014,6 +1035,7 @@ func (m *NamespaceDelete) Unmarshal(dAtA []byte) error { func skipNamespace(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1045,10 +1067,8 @@ func skipNamespace(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1069,55 +1089,30 @@ func skipNamespace(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthNamespace } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthNamespace - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNamespace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipNamespace(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthNamespace - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupNamespace + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthNamespace + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNamespace = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/events/snapshot.pb.go b/vendor/github.com/containerd/containerd/api/events/snapshot.pb.go index 0dbdfdbd62f..5392970040f 100644 --- a/vendor/github.com/containerd/containerd/api/events/snapshot.pb.go +++ b/vendor/github.com/containerd/containerd/api/events/snapshot.pb.go @@ -8,6 +8,7 @@ import ( proto "github.com/gogo/protobuf/proto" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -21,7 +22,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type SnapshotPrepare struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` @@ -44,7 +45,7 @@ func (m *SnapshotPrepare) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_SnapshotPrepare.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -84,7 +85,7 @@ func (m *SnapshotCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_SnapshotCommit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -123,7 +124,7 @@ func (m *SnapshotRemove) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_SnapshotRemove.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -219,7 +220,7 @@ func (m *SnapshotRemove) Field(fieldpath []string) (string, bool) { func (m *SnapshotPrepare) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -227,32 +228,40 @@ func (m *SnapshotPrepare) Marshal() (dAtA []byte, err error) { } func (m *SnapshotPrepare) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotPrepare) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Parent) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Parent) + copy(dAtA[i:], m.Parent) i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Parent))) - i += copy(dAtA[i:], m.Parent) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *SnapshotCommit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -260,32 +269,40 @@ func (m *SnapshotCommit) Marshal() (dAtA []byte, err error) { } func (m *SnapshotCommit) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotCommit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Name) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Name) + copy(dAtA[i:], m.Name) i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *SnapshotRemove) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -293,30 +310,39 @@ func (m *SnapshotRemove) Marshal() (dAtA []byte, err error) { } func (m *SnapshotRemove) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int { + offset -= sovSnapshot(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *SnapshotPrepare) Size() (n int) { if m == nil { @@ -375,14 +401,7 @@ func (m *SnapshotRemove) Size() (n int) { } func sovSnapshot(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozSnapshot(x uint64) (n int) { return sovSnapshot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -755,6 +774,7 @@ func (m *SnapshotRemove) Unmarshal(dAtA []byte) error { func skipSnapshot(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -786,10 +806,8 @@ func skipSnapshot(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -810,55 +828,30 @@ func skipSnapshot(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthSnapshot } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthSnapshot - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipSnapshot(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthSnapshot - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSnapshot + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthSnapshot + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSnapshot = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/events/task.pb.go b/vendor/github.com/containerd/containerd/api/events/task.pb.go index fb653d028b5..0f16695e39c 100644 --- a/vendor/github.com/containerd/containerd/api/events/task.pb.go +++ b/vendor/github.com/containerd/containerd/api/events/task.pb.go @@ -11,6 +11,7 @@ import ( github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -26,7 +27,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type TaskCreate struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` @@ -53,7 +54,7 @@ func (m *TaskCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TaskCreate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -93,7 +94,7 @@ func (m *TaskStart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TaskStart.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -138,7 +139,7 @@ func (m *TaskDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TaskDelete.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -180,7 +181,7 @@ func (m *TaskIO) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TaskIO.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -223,7 +224,7 @@ func (m *TaskExit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TaskExit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -262,7 +263,7 @@ func (m *TaskOOM) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TaskOOM.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -302,7 +303,7 @@ func (m *TaskExecAdded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_TaskExecAdded.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -343,7 +344,7 @@ func (m *TaskExecStarted) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_TaskExecStarted.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -382,7 +383,7 @@ func (m *TaskPaused) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TaskPaused.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -421,7 +422,7 @@ func (m *TaskResumed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_TaskResumed.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -461,7 +462,7 @@ func (m *TaskCheckpointed) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_TaskCheckpointed.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -741,7 +742,7 @@ func (m *TaskCheckpointed) Field(fieldpath []string) (string, bool) { func (m *TaskCreate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -749,65 +750,78 @@ func (m *TaskCreate) Marshal() (dAtA []byte, err error) { } func (m *TaskCreate) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TaskCreate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Bundle) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.Bundle))) - i += copy(dAtA[i:], m.Bundle) + if m.Pid != 0 { + i = encodeVarintTask(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x30 } - if len(m.Rootfs) > 0 { - for _, msg := range m.Rootfs { - dAtA[i] = 0x1a - i++ - i = encodeVarintTask(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if len(m.Checkpoint) > 0 { + i -= len(m.Checkpoint) + copy(dAtA[i:], m.Checkpoint) + i = encodeVarintTask(dAtA, i, uint64(len(m.Checkpoint))) + i-- + dAtA[i] = 0x2a + } + if m.IO != nil { + { + size, err := m.IO.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintTask(dAtA, i, uint64(size)) } - } - if m.IO != nil { + i-- dAtA[i] = 0x22 - i++ - i = encodeVarintTask(dAtA, i, uint64(m.IO.Size())) - n1, err := m.IO.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + } + if len(m.Rootfs) > 0 { + for iNdEx := len(m.Rootfs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rootfs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTask(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - i += n1 } - if len(m.Checkpoint) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.Checkpoint))) - i += copy(dAtA[i:], m.Checkpoint) + if len(m.Bundle) > 0 { + i -= len(m.Bundle) + copy(dAtA[i:], m.Bundle) + i = encodeVarintTask(dAtA, i, uint64(len(m.Bundle))) + i-- + dAtA[i] = 0x12 } - if m.Pid != 0 { - dAtA[i] = 0x30 - i++ - i = encodeVarintTask(dAtA, i, uint64(m.Pid)) + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *TaskStart) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -815,31 +829,38 @@ func (m *TaskStart) Marshal() (dAtA []byte, err error) { } func (m *TaskStart) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TaskStart) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Pid != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintTask(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *TaskDelete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -847,50 +868,58 @@ func (m *TaskDelete) Marshal() (dAtA []byte, err error) { } func (m *TaskDelete) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TaskDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0x2a + } + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintTask(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x22 + if m.ExitStatus != 0 { + i = encodeVarintTask(dAtA, i, uint64(m.ExitStatus)) + i-- + dAtA[i] = 0x18 } if m.Pid != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintTask(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x10 } - if m.ExitStatus != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintTask(dAtA, i, uint64(m.ExitStatus)) + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - dAtA[i] = 0x22 - i++ - i = encodeVarintTask(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) - n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - if len(m.ID) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *TaskIO) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -898,48 +927,57 @@ func (m *TaskIO) Marshal() (dAtA []byte, err error) { } func (m *TaskIO) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TaskIO) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Stdin) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.Stdin))) - i += copy(dAtA[i:], m.Stdin) - } - if len(m.Stdout) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.Stdout))) - i += copy(dAtA[i:], m.Stdout) - } - if len(m.Stderr) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.Stderr))) - i += copy(dAtA[i:], m.Stderr) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Terminal { - dAtA[i] = 0x20 - i++ + i-- if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Stderr) > 0 { + i -= len(m.Stderr) + copy(dAtA[i:], m.Stderr) + i = encodeVarintTask(dAtA, i, uint64(len(m.Stderr))) + i-- + dAtA[i] = 0x1a } - return i, nil + if len(m.Stdout) > 0 { + i -= len(m.Stdout) + copy(dAtA[i:], m.Stdout) + i = encodeVarintTask(dAtA, i, uint64(len(m.Stdout))) + i-- + dAtA[i] = 0x12 + } + if len(m.Stdin) > 0 { + i -= len(m.Stdin) + copy(dAtA[i:], m.Stdin) + i = encodeVarintTask(dAtA, i, uint64(len(m.Stdin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TaskExit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -947,50 +985,58 @@ func (m *TaskExit) Marshal() (dAtA []byte, err error) { } func (m *TaskExit) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TaskExit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.ID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintTask(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x2a + if m.ExitStatus != 0 { + i = encodeVarintTask(dAtA, i, uint64(m.ExitStatus)) + i-- + dAtA[i] = 0x20 } if m.Pid != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintTask(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x18 } - if m.ExitStatus != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintTask(dAtA, i, uint64(m.ExitStatus)) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0x12 } - dAtA[i] = 0x2a - i++ - i = encodeVarintTask(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) - n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) - if err != nil { - return 0, err + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - i += n3 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *TaskOOM) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -998,26 +1044,33 @@ func (m *TaskOOM) Marshal() (dAtA []byte, err error) { } func (m *TaskOOM) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TaskOOM) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TaskExecAdded) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1025,32 +1078,40 @@ func (m *TaskExecAdded) Marshal() (dAtA []byte, err error) { } func (m *TaskExecAdded) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TaskExecAdded) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) i = encodeVarintTask(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *TaskExecStarted) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1058,37 +1119,45 @@ func (m *TaskExecStarted) Marshal() (dAtA []byte, err error) { } func (m *TaskExecStarted) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TaskExecStarted) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } - if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Pid != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintTask(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TaskPaused) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1096,26 +1165,33 @@ func (m *TaskPaused) Marshal() (dAtA []byte, err error) { } func (m *TaskPaused) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TaskPaused) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TaskResumed) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1123,26 +1199,33 @@ func (m *TaskResumed) Marshal() (dAtA []byte, err error) { } func (m *TaskResumed) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TaskResumed) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TaskCheckpointed) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1150,36 +1233,46 @@ func (m *TaskCheckpointed) Marshal() (dAtA []byte, err error) { } func (m *TaskCheckpointed) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TaskCheckpointed) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Checkpoint) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Checkpoint) + copy(dAtA[i:], m.Checkpoint) i = encodeVarintTask(dAtA, i, uint64(len(m.Checkpoint))) - i += copy(dAtA[i:], m.Checkpoint) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintTask(dAtA []byte, offset int, v uint64) int { + offset -= sovTask(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *TaskCreate) Size() (n int) { if m == nil { @@ -1432,14 +1525,7 @@ func (m *TaskCheckpointed) Size() (n int) { } func sovTask(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTask(x uint64) (n int) { return sovTask(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1448,11 +1534,16 @@ func (this *TaskCreate) String() string { if this == nil { return "nil" } + repeatedStringForRootfs := "[]*Mount{" + for _, f := range this.Rootfs { + repeatedStringForRootfs += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + "," + } + repeatedStringForRootfs += "}" s := strings.Join([]string{`&TaskCreate{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Bundle:` + fmt.Sprintf("%v", this.Bundle) + `,`, - `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "types.Mount", 1) + `,`, - `IO:` + strings.Replace(fmt.Sprintf("%v", this.IO), "TaskIO", "TaskIO", 1) + `,`, + `Rootfs:` + repeatedStringForRootfs + `,`, + `IO:` + strings.Replace(this.IO.String(), "TaskIO", "TaskIO", 1) + `,`, `Checkpoint:` + fmt.Sprintf("%v", this.Checkpoint) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, @@ -1480,7 +1571,7 @@ func (this *TaskDelete) String() string { `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, - `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `ExitedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExitedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -1510,7 +1601,7 @@ func (this *TaskExit) String() string { `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, - `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `ExitedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExitedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3120,6 +3211,7 @@ func (m *TaskCheckpointed) Unmarshal(dAtA []byte) error { func skipTask(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -3151,10 +3243,8 @@ func skipTask(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -3175,55 +3265,30 @@ func skipTask(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthTask } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthTask - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTask - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTask(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthTask - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTask + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthTask + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthTask = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTask = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthTask = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTask = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTask = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.pb.go b/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.pb.go index ce3cef07d56..d951b268325 100644 --- a/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.pb.go @@ -11,8 +11,11 @@ import ( github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" types "github.com/gogo/protobuf/types" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -28,7 +31,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Container struct { // ID is the user-specified identifier. @@ -96,7 +99,7 @@ func (m *Container) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Container.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -138,7 +141,7 @@ func (m *Container_Runtime) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_Container_Runtime.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -177,7 +180,7 @@ func (m *GetContainerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_GetContainerRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -216,7 +219,7 @@ func (m *GetContainerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_GetContainerResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -265,7 +268,7 @@ func (m *ListContainersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_ListContainersRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -304,7 +307,7 @@ func (m *ListContainersResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_ListContainersResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -343,7 +346,7 @@ func (m *CreateContainerRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_CreateContainerRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -382,7 +385,7 @@ func (m *CreateContainerResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return xxx_messageInfo_CreateContainerResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -432,7 +435,7 @@ func (m *UpdateContainerRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_UpdateContainerRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -471,7 +474,7 @@ func (m *UpdateContainerResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return xxx_messageInfo_UpdateContainerResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -510,7 +513,7 @@ func (m *DeleteContainerRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_DeleteContainerRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -549,7 +552,7 @@ func (m *ListContainerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_ListContainerMessage.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -760,6 +763,29 @@ type ContainersServer interface { Delete(context.Context, *DeleteContainerRequest) (*types.Empty, error) } +// UnimplementedContainersServer can be embedded to have forward compatible implementations. +type UnimplementedContainersServer struct { +} + +func (*UnimplementedContainersServer) Get(ctx context.Context, req *GetContainerRequest) (*GetContainerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (*UnimplementedContainersServer) List(ctx context.Context, req *ListContainersRequest) (*ListContainersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedContainersServer) ListStream(req *ListContainersRequest, srv Containers_ListStreamServer) error { + return status.Errorf(codes.Unimplemented, "method ListStream not implemented") +} +func (*UnimplementedContainersServer) Create(ctx context.Context, req *CreateContainerRequest) (*CreateContainerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (*UnimplementedContainersServer) Update(ctx context.Context, req *UpdateContainerRequest) (*UpdateContainerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (*UnimplementedContainersServer) Delete(ctx context.Context, req *DeleteContainerRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + func RegisterContainersServer(s *grpc.Server, srv ContainersServer) { s.RegisterService(&_Containers_serviceDesc, srv) } @@ -913,7 +939,7 @@ var _Containers_serviceDesc = grpc.ServiceDesc{ func (m *Container) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -921,123 +947,137 @@ func (m *Container) Marshal() (dAtA []byte, err error) { } func (m *Container) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Container) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Labels) > 0 { - for k, _ := range m.Labels { + if len(m.Extensions) > 0 { + for k := range m.Extensions { + v := m.Extensions[k] + baseI := i + { + size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - v := m.Labels[k] - mapSize := 1 + len(k) + sovContainers(uint64(len(k))) + 1 + len(v) + sovContainers(uint64(len(v))) - i = encodeVarintContainers(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ + i -= len(k) + copy(dAtA[i:], k) i = encodeVarintContainers(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintContainers(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0xa + i = encodeVarintContainers(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x52 } } - if len(m.Image) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintContainers(dAtA, i, uint64(len(m.Image))) - i += copy(dAtA[i:], m.Image) + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt):]) + if err2 != nil { + return 0, err2 } - if m.Runtime != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintContainers(dAtA, i, uint64(m.Runtime.Size())) - n1, err := m.Runtime.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 + i -= n2 + i = encodeVarintContainers(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x4a + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) + if err3 != nil { + return 0, err3 } - if m.Spec != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintContainers(dAtA, i, uint64(m.Spec.Size())) - n2, err := m.Spec.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 + i -= n3 + i = encodeVarintContainers(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x42 + if len(m.SnapshotKey) > 0 { + i -= len(m.SnapshotKey) + copy(dAtA[i:], m.SnapshotKey) + i = encodeVarintContainers(dAtA, i, uint64(len(m.SnapshotKey))) + i-- + dAtA[i] = 0x3a } if len(m.Snapshotter) > 0 { - dAtA[i] = 0x32 - i++ + i -= len(m.Snapshotter) + copy(dAtA[i:], m.Snapshotter) i = encodeVarintContainers(dAtA, i, uint64(len(m.Snapshotter))) - i += copy(dAtA[i:], m.Snapshotter) + i-- + dAtA[i] = 0x32 } - if len(m.SnapshotKey) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintContainers(dAtA, i, uint64(len(m.SnapshotKey))) - i += copy(dAtA[i:], m.SnapshotKey) - } - dAtA[i] = 0x42 - i++ - i = encodeVarintContainers(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) - n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - dAtA[i] = 0x4a - i++ - i = encodeVarintContainers(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) - n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - if len(m.Extensions) > 0 { - for k, _ := range m.Extensions { - dAtA[i] = 0x52 - i++ - v := m.Extensions[k] - msgSize := 0 - if (&v) != nil { - msgSize = (&v).Size() - msgSize += 1 + sovContainers(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovContainers(uint64(len(k))) + msgSize - i = encodeVarintContainers(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintContainers(dAtA, i, uint64((&v).Size())) - n5, err := (&v).MarshalTo(dAtA[i:]) + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n5 + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.Runtime != nil { + { + size, err := m.Runtime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Image) > 0 { + i -= len(m.Image) + copy(dAtA[i:], m.Image) + i = encodeVarintContainers(dAtA, i, uint64(len(m.Image))) + i-- + dAtA[i] = 0x1a + } + if len(m.Labels) > 0 { + for k := range m.Labels { + v := m.Labels[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintContainers(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintContainers(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintContainers(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintContainers(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Container_Runtime) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1045,36 +1085,45 @@ func (m *Container_Runtime) Marshal() (dAtA []byte, err error) { } func (m *Container_Runtime) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Container_Runtime) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Options != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintContainers(dAtA, i, uint64(m.Options.Size())) - n6, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) } - i += n6 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintContainers(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *GetContainerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1082,26 +1131,33 @@ func (m *GetContainerRequest) Marshal() (dAtA []byte, err error) { } func (m *GetContainerRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetContainerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintContainers(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *GetContainerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1109,28 +1165,36 @@ func (m *GetContainerResponse) Marshal() (dAtA []byte, err error) { } func (m *GetContainerResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetContainerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) - n7, err := m.Container.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Container.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *ListContainersRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1138,35 +1202,35 @@ func (m *ListContainersRequest) Marshal() (dAtA []byte, err error) { } func (m *ListContainersRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListContainersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Filters) > 0 { - for _, s := range m.Filters { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Filters[iNdEx]) + copy(dAtA[i:], m.Filters[iNdEx]) + i = encodeVarintContainers(dAtA, i, uint64(len(m.Filters[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ListContainersResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1174,32 +1238,40 @@ func (m *ListContainersResponse) Marshal() (dAtA []byte, err error) { } func (m *ListContainersResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListContainersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Containers) > 0 { - for _, msg := range m.Containers { - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Containers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Containers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *CreateContainerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1207,28 +1279,36 @@ func (m *CreateContainerRequest) Marshal() (dAtA []byte, err error) { } func (m *CreateContainerRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateContainerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) - n8, err := m.Container.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Container.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *CreateContainerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1236,28 +1316,36 @@ func (m *CreateContainerResponse) Marshal() (dAtA []byte, err error) { } func (m *CreateContainerResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateContainerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) - n9, err := m.Container.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Container.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *UpdateContainerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1265,38 +1353,48 @@ func (m *UpdateContainerRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateContainerRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateContainerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) - n10, err := m.Container.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n10 if m.UpdateMask != nil { + { + size, err := m.UpdateMask.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintContainers(dAtA, i, uint64(m.UpdateMask.Size())) - n11, err := m.UpdateMask.MarshalTo(dAtA[i:]) + } + { + size, err := m.Container.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n11 + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *UpdateContainerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1304,28 +1402,36 @@ func (m *UpdateContainerResponse) Marshal() (dAtA []byte, err error) { } func (m *UpdateContainerResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateContainerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) - n12, err := m.Container.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Container.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *DeleteContainerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1333,26 +1439,33 @@ func (m *DeleteContainerRequest) Marshal() (dAtA []byte, err error) { } func (m *DeleteContainerRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteContainerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintContainers(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ListContainerMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1360,34 +1473,44 @@ func (m *ListContainerMessage) Marshal() (dAtA []byte, err error) { } func (m *ListContainerMessage) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListContainerMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Container != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) - n13, err := m.Container.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Container != nil { + { + size, err := m.Container.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContainers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintContainers(dAtA []byte, offset int, v uint64) int { + offset -= sovContainers(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Container) Size() (n int) { if m == nil { @@ -1625,14 +1748,7 @@ func (m *ListContainerMessage) Size() (n int) { } func sovContainers(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozContainers(x uint64) (n int) { return sovContainers(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1669,8 +1785,8 @@ func (this *Container) String() string { `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "types.Any", 1) + `,`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, `SnapshotKey:` + fmt.Sprintf("%v", this.SnapshotKey) + `,`, - `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, - `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `CreatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CreatedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `UpdatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.UpdatedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `Extensions:` + mapStringForExtensions + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -1726,8 +1842,13 @@ func (this *ListContainersResponse) String() string { if this == nil { return "nil" } + repeatedStringForContainers := "[]Container{" + for _, f := range this.Containers { + repeatedStringForContainers += strings.Replace(strings.Replace(f.String(), "Container", "Container", 1), `&`, ``, 1) + "," + } + repeatedStringForContainers += "}" s := strings.Join([]string{`&ListContainersResponse{`, - `Containers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Containers), "Container", "Container", 1), `&`, ``, 1) + `,`, + `Containers:` + repeatedStringForContainers + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -1794,7 +1915,7 @@ func (this *ListContainerMessage) String() string { return "nil" } s := strings.Join([]string{`&ListContainerMessage{`, - `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "Container", "Container", 1) + `,`, + `Container:` + strings.Replace(this.Container.String(), "Container", "Container", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3416,6 +3537,7 @@ func (m *ListContainerMessage) Unmarshal(dAtA []byte) error { func skipContainers(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -3447,10 +3569,8 @@ func skipContainers(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -3471,55 +3591,30 @@ func skipContainers(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthContainers } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthContainers - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowContainers - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipContainers(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthContainers - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupContainers + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthContainers + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthContainers = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowContainers = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthContainers = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowContainers = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupContainers = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/content/v1/content.pb.go b/vendor/github.com/containerd/containerd/api/services/content/v1/content.pb.go index 3e4580024e4..1cf0aaa9101 100644 --- a/vendor/github.com/containerd/containerd/api/services/content/v1/content.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/content/v1/content.pb.go @@ -12,8 +12,11 @@ import ( types "github.com/gogo/protobuf/types" github_com_opencontainers_go_digest "github.com/opencontainers/go-digest" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -29,7 +32,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // WriteAction defines the behavior of a WriteRequest. type WriteAction int32 @@ -106,7 +109,7 @@ func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Info.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -145,7 +148,7 @@ func (m *InfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_InfoRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -184,7 +187,7 @@ func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_InfoResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -230,7 +233,7 @@ func (m *UpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_UpdateRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -269,7 +272,7 @@ func (m *UpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_UpdateResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -318,7 +321,7 @@ func (m *ListContentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ListContentRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -357,7 +360,7 @@ func (m *ListContentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ListContentResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -397,7 +400,7 @@ func (m *DeleteContentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_DeleteContentRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -446,7 +449,7 @@ func (m *ReadContentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ReadContentRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -487,7 +490,7 @@ func (m *ReadContentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ReadContentResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -531,7 +534,7 @@ func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Status.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -570,7 +573,7 @@ func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_StatusRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -609,7 +612,7 @@ func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_StatusResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -648,7 +651,7 @@ func (m *ListStatusesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ListStatusesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -687,7 +690,7 @@ func (m *ListStatusesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_ListStatusesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -779,7 +782,7 @@ func (m *WriteContentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_WriteContentRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -844,7 +847,7 @@ func (m *WriteContentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_WriteContentResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -883,7 +886,7 @@ func (m *AbortRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_AbortRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1283,6 +1286,38 @@ type ContentServer interface { Abort(context.Context, *AbortRequest) (*types.Empty, error) } +// UnimplementedContentServer can be embedded to have forward compatible implementations. +type UnimplementedContentServer struct { +} + +func (*UnimplementedContentServer) Info(ctx context.Context, req *InfoRequest) (*InfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") +} +func (*UnimplementedContentServer) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (*UnimplementedContentServer) List(req *ListContentRequest, srv Content_ListServer) error { + return status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedContentServer) Delete(ctx context.Context, req *DeleteContentRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (*UnimplementedContentServer) Read(req *ReadContentRequest, srv Content_ReadServer) error { + return status.Errorf(codes.Unimplemented, "method Read not implemented") +} +func (*UnimplementedContentServer) Status(ctx context.Context, req *StatusRequest) (*StatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") +} +func (*UnimplementedContentServer) ListStatuses(ctx context.Context, req *ListStatusesRequest) (*ListStatusesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListStatuses not implemented") +} +func (*UnimplementedContentServer) Write(srv Content_WriteServer) error { + return status.Errorf(codes.Unimplemented, "method Write not implemented") +} +func (*UnimplementedContentServer) Abort(ctx context.Context, req *AbortRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Abort not implemented") +} + func RegisterContentServer(s *grpc.Server, srv ContentServer) { s.RegisterService(&_Content_serviceDesc, srv) } @@ -1516,7 +1551,7 @@ var _Content_serviceDesc = grpc.ServiceDesc{ func (m *Info) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1524,64 +1559,73 @@ func (m *Info) Marshal() (dAtA []byte, err error) { } func (m *Info) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Info) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Digest) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) - i += copy(dAtA[i:], m.Digest) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.Size_ != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Size_)) - } - dAtA[i] = 0x1a - i++ - i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) - n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - dAtA[i] = 0x22 - i++ - i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) - n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x2a - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovContent(uint64(len(k))) + 1 + len(v) + sovContent(uint64(len(v))) - i = encodeVarintContent(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintContent(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintContent(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintContent(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt):]) + if err1 != nil { + return 0, err1 } - return i, nil + i -= n1 + i = encodeVarintContent(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x22 + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintContent(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x1a + if m.Size_ != 0 { + i = encodeVarintContent(dAtA, i, uint64(m.Size_)) + i-- + dAtA[i] = 0x10 + } + if len(m.Digest) > 0 { + i -= len(m.Digest) + copy(dAtA[i:], m.Digest) + i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *InfoRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1589,26 +1633,33 @@ func (m *InfoRequest) Marshal() (dAtA []byte, err error) { } func (m *InfoRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Digest) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) - i += copy(dAtA[i:], m.Digest) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Digest) > 0 { + i -= len(m.Digest) + copy(dAtA[i:], m.Digest) + i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *InfoResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1616,28 +1667,36 @@ func (m *InfoResponse) Marshal() (dAtA []byte, err error) { } func (m *InfoResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Info.Size())) - n3, err := m.Info.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *UpdateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1645,38 +1704,48 @@ func (m *UpdateRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Info.Size())) - n4, err := m.Info.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n4 if m.UpdateMask != nil { + { + size, err := m.UpdateMask.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContent(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.UpdateMask.Size())) - n5, err := m.UpdateMask.MarshalTo(dAtA[i:]) + } + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n5 + i -= size + i = encodeVarintContent(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *UpdateResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1684,28 +1753,36 @@ func (m *UpdateResponse) Marshal() (dAtA []byte, err error) { } func (m *UpdateResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Info.Size())) - n6, err := m.Info.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *ListContentRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1713,35 +1790,35 @@ func (m *ListContentRequest) Marshal() (dAtA []byte, err error) { } func (m *ListContentRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListContentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Filters) > 0 { - for _, s := range m.Filters { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Filters[iNdEx]) + copy(dAtA[i:], m.Filters[iNdEx]) + i = encodeVarintContent(dAtA, i, uint64(len(m.Filters[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ListContentResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1749,32 +1826,40 @@ func (m *ListContentResponse) Marshal() (dAtA []byte, err error) { } func (m *ListContentResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListContentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Info) > 0 { - for _, msg := range m.Info { - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Info) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Info[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContent(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *DeleteContentRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1782,26 +1867,33 @@ func (m *DeleteContentRequest) Marshal() (dAtA []byte, err error) { } func (m *DeleteContentRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteContentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Digest) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) - i += copy(dAtA[i:], m.Digest) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Digest) > 0 { + i -= len(m.Digest) + copy(dAtA[i:], m.Digest) + i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ReadContentRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1809,36 +1901,43 @@ func (m *ReadContentRequest) Marshal() (dAtA []byte, err error) { } func (m *ReadContentRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadContentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Digest) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) - i += copy(dAtA[i:], m.Digest) - } - if m.Offset != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Offset)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Size_ != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintContent(dAtA, i, uint64(m.Size_)) + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Offset != 0 { + i = encodeVarintContent(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x10 } - return i, nil + if len(m.Digest) > 0 { + i -= len(m.Digest) + copy(dAtA[i:], m.Digest) + i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ReadContentResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1846,31 +1945,38 @@ func (m *ReadContentResponse) Marshal() (dAtA []byte, err error) { } func (m *ReadContentResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadContentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Offset != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Offset)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Data) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Data) + copy(dAtA[i:], m.Data) i = encodeVarintContent(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Offset != 0 { + i = encodeVarintContent(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Status) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1878,58 +1984,66 @@ func (m *Status) Marshal() (dAtA []byte, err error) { } func (m *Status) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Status) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt))) - n7, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - dAtA[i] = 0x12 - i++ - i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) - n8, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - if len(m.Ref) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) - i += copy(dAtA[i:], m.Ref) - } - if m.Offset != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Offset)) - } - if m.Total != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Total)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Expected) > 0 { - dAtA[i] = 0x32 - i++ + i -= len(m.Expected) + copy(dAtA[i:], m.Expected) i = encodeVarintContent(dAtA, i, uint64(len(m.Expected))) - i += copy(dAtA[i:], m.Expected) + i-- + dAtA[i] = 0x32 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Total != 0 { + i = encodeVarintContent(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x28 } - return i, nil + if m.Offset != 0 { + i = encodeVarintContent(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x20 + } + if len(m.Ref) > 0 { + i -= len(m.Ref) + copy(dAtA[i:], m.Ref) + i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) + i-- + dAtA[i] = 0x1a + } + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintContent(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x12 + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt):]) + if err8 != nil { + return 0, err8 + } + i -= n8 + i = encodeVarintContent(dAtA, i, uint64(n8)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *StatusRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1937,26 +2051,33 @@ func (m *StatusRequest) Marshal() (dAtA []byte, err error) { } func (m *StatusRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Ref) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) - i += copy(dAtA[i:], m.Ref) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Ref) > 0 { + i -= len(m.Ref) + copy(dAtA[i:], m.Ref) + i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *StatusResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1964,30 +2085,38 @@ func (m *StatusResponse) Marshal() (dAtA []byte, err error) { } func (m *StatusResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Status != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Status.Size())) - n9, err := m.Status.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Status != nil { + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ListStatusesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1995,35 +2124,35 @@ func (m *ListStatusesRequest) Marshal() (dAtA []byte, err error) { } func (m *ListStatusesRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListStatusesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Filters) > 0 { - for _, s := range m.Filters { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Filters[iNdEx]) + copy(dAtA[i:], m.Filters[iNdEx]) + i = encodeVarintContent(dAtA, i, uint64(len(m.Filters[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ListStatusesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2031,32 +2160,40 @@ func (m *ListStatusesResponse) Marshal() (dAtA []byte, err error) { } func (m *ListStatusesResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListStatusesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Statuses) > 0 { - for _, msg := range m.Statuses { - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Statuses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Statuses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintContent(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *WriteContentRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2064,70 +2201,81 @@ func (m *WriteContentRequest) Marshal() (dAtA []byte, err error) { } func (m *WriteContentRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WriteContentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Action != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Action)) - } - if len(m.Ref) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) - i += copy(dAtA[i:], m.Ref) - } - if m.Total != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Total)) - } - if len(m.Expected) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Expected))) - i += copy(dAtA[i:], m.Expected) - } - if m.Offset != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Offset)) - } - if len(m.Data) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Data))) - i += copy(dAtA[i:], m.Data) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x3a - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovContent(uint64(len(k))) + 1 + len(v) + sovContent(uint64(len(v))) - i = encodeVarintContent(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintContent(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintContent(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintContent(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x3a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintContent(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x32 } - return i, nil + if m.Offset != 0 { + i = encodeVarintContent(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x28 + } + if len(m.Expected) > 0 { + i -= len(m.Expected) + copy(dAtA[i:], m.Expected) + i = encodeVarintContent(dAtA, i, uint64(len(m.Expected))) + i-- + dAtA[i] = 0x22 + } + if m.Total != 0 { + i = encodeVarintContent(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x18 + } + if len(m.Ref) > 0 { + i -= len(m.Ref) + copy(dAtA[i:], m.Ref) + i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) + i-- + dAtA[i] = 0x12 + } + if m.Action != 0 { + i = encodeVarintContent(dAtA, i, uint64(m.Action)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *WriteContentResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2135,57 +2283,64 @@ func (m *WriteContentResponse) Marshal() (dAtA []byte, err error) { } func (m *WriteContentResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WriteContentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Action != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Action)) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt))) - n10, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - dAtA[i] = 0x1a - i++ - i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) - n11, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - if m.Offset != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Offset)) - } - if m.Total != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintContent(dAtA, i, uint64(m.Total)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Digest) > 0 { - dAtA[i] = 0x32 - i++ + i -= len(m.Digest) + copy(dAtA[i:], m.Digest) i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) - i += copy(dAtA[i:], m.Digest) + i-- + dAtA[i] = 0x32 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Total != 0 { + i = encodeVarintContent(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x28 } - return i, nil + if m.Offset != 0 { + i = encodeVarintContent(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x20 + } + n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt):]) + if err10 != nil { + return 0, err10 + } + i -= n10 + i = encodeVarintContent(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0x1a + n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt):]) + if err11 != nil { + return 0, err11 + } + i -= n11 + i = encodeVarintContent(dAtA, i, uint64(n11)) + i-- + dAtA[i] = 0x12 + if m.Action != 0 { + i = encodeVarintContent(dAtA, i, uint64(m.Action)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *AbortRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2193,30 +2348,39 @@ func (m *AbortRequest) Marshal() (dAtA []byte, err error) { } func (m *AbortRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AbortRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Ref) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) - i += copy(dAtA[i:], m.Ref) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Ref) > 0 { + i -= len(m.Ref) + copy(dAtA[i:], m.Ref) + i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintContent(dAtA []byte, offset int, v uint64) int { + offset -= sovContent(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Info) Size() (n int) { if m == nil { @@ -2589,14 +2753,7 @@ func (m *AbortRequest) Size() (n int) { } func sovContent(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozContent(x uint64) (n int) { return sovContent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -2618,8 +2775,8 @@ func (this *Info) String() string { s := strings.Join([]string{`&Info{`, `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`, - `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, - `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `CreatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CreatedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `UpdatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.UpdatedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `Labels:` + mapStringForLabels + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -2686,8 +2843,13 @@ func (this *ListContentResponse) String() string { if this == nil { return "nil" } + repeatedStringForInfo := "[]Info{" + for _, f := range this.Info { + repeatedStringForInfo += strings.Replace(strings.Replace(f.String(), "Info", "Info", 1), `&`, ``, 1) + "," + } + repeatedStringForInfo += "}" s := strings.Join([]string{`&ListContentResponse{`, - `Info:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Info), "Info", "Info", 1), `&`, ``, 1) + `,`, + `Info:` + repeatedStringForInfo + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2734,8 +2896,8 @@ func (this *Status) String() string { return "nil" } s := strings.Join([]string{`&Status{`, - `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, - `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `StartedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.StartedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `UpdatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.UpdatedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, `Offset:` + fmt.Sprintf("%v", this.Offset) + `,`, `Total:` + fmt.Sprintf("%v", this.Total) + `,`, @@ -2761,7 +2923,7 @@ func (this *StatusResponse) String() string { return "nil" } s := strings.Join([]string{`&StatusResponse{`, - `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "Status", "Status", 1) + `,`, + `Status:` + strings.Replace(this.Status.String(), "Status", "Status", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2782,8 +2944,13 @@ func (this *ListStatusesResponse) String() string { if this == nil { return "nil" } + repeatedStringForStatuses := "[]Status{" + for _, f := range this.Statuses { + repeatedStringForStatuses += strings.Replace(strings.Replace(f.String(), "Status", "Status", 1), `&`, ``, 1) + "," + } + repeatedStringForStatuses += "}" s := strings.Join([]string{`&ListStatusesResponse{`, - `Statuses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Statuses), "Status", "Status", 1), `&`, ``, 1) + `,`, + `Statuses:` + repeatedStringForStatuses + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2822,8 +2989,8 @@ func (this *WriteContentResponse) String() string { } s := strings.Join([]string{`&WriteContentResponse{`, `Action:` + fmt.Sprintf("%v", this.Action) + `,`, - `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, - `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `StartedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.StartedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `UpdatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.UpdatedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `Offset:` + fmt.Sprintf("%v", this.Offset) + `,`, `Total:` + fmt.Sprintf("%v", this.Total) + `,`, `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, @@ -5229,6 +5396,7 @@ func (m *AbortRequest) Unmarshal(dAtA []byte) error { func skipContent(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -5260,10 +5428,8 @@ func skipContent(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -5284,55 +5450,30 @@ func skipContent(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthContent } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthContent - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowContent - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipContent(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthContent - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupContent + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthContent + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthContent = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowContent = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthContent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowContent = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupContent = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/diff/v1/diff.pb.go b/vendor/github.com/containerd/containerd/api/services/diff/v1/diff.pb.go index 6c7920004fc..48379234d02 100644 --- a/vendor/github.com/containerd/containerd/api/services/diff/v1/diff.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/diff/v1/diff.pb.go @@ -11,8 +11,11 @@ import ( github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" types1 "github.com/gogo/protobuf/types" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -26,7 +29,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ApplyRequest struct { // Diff is the descriptor of the diff to be extracted @@ -51,7 +54,7 @@ func (m *ApplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ApplyRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -93,7 +96,7 @@ func (m *ApplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_ApplyResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -146,7 +149,7 @@ func (m *DiffRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_DiffRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -186,7 +189,7 @@ func (m *DiffResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_DiffResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -313,6 +316,17 @@ type DiffServer interface { Diff(context.Context, *DiffRequest) (*DiffResponse, error) } +// UnimplementedDiffServer can be embedded to have forward compatible implementations. +type UnimplementedDiffServer struct { +} + +func (*UnimplementedDiffServer) Apply(ctx context.Context, req *ApplyRequest) (*ApplyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Apply not implemented") +} +func (*UnimplementedDiffServer) Diff(ctx context.Context, req *DiffRequest) (*DiffResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Diff not implemented") +} + func RegisterDiffServer(s *grpc.Server, srv DiffServer) { s.RegisterService(&_Diff_serviceDesc, srv) } @@ -373,7 +387,7 @@ var _Diff_serviceDesc = grpc.ServiceDesc{ func (m *ApplyRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -381,70 +395,78 @@ func (m *ApplyRequest) Marshal() (dAtA []byte, err error) { } func (m *ApplyRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ApplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Diff != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintDiff(dAtA, i, uint64(m.Diff.Size())) - n1, err := m.Diff.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if len(m.Mounts) > 0 { - for _, msg := range m.Mounts { - dAtA[i] = 0x12 - i++ - i = encodeVarintDiff(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Payloads) > 0 { - for k, _ := range m.Payloads { - dAtA[i] = 0x1a - i++ + for k := range m.Payloads { v := m.Payloads[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovDiff(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovDiff(uint64(len(k))) + msgSize - i = encodeVarintDiff(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintDiff(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) + baseI := i if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDiff(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintDiff(dAtA, i, uint64(v.Size())) - n2, err := v.MarshalTo(dAtA[i:]) + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintDiff(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintDiff(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Mounts) > 0 { + for iNdEx := len(m.Mounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n2 + i -= size + i = encodeVarintDiff(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Diff != nil { + { + size, err := m.Diff.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDiff(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ApplyResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -452,30 +474,38 @@ func (m *ApplyResponse) Marshal() (dAtA []byte, err error) { } func (m *ApplyResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ApplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Applied != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintDiff(dAtA, i, uint64(m.Applied.Size())) - n3, err := m.Applied.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Applied != nil { + { + size, err := m.Applied.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDiff(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *DiffRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -483,73 +513,87 @@ func (m *DiffRequest) Marshal() (dAtA []byte, err error) { } func (m *DiffRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DiffRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Left) > 0 { - for _, msg := range m.Left { - dAtA[i] = 0xa - i++ - i = encodeVarintDiff(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Right) > 0 { - for _, msg := range m.Right { - dAtA[i] = 0x12 - i++ - i = encodeVarintDiff(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.MediaType) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintDiff(dAtA, i, uint64(len(m.MediaType))) - i += copy(dAtA[i:], m.MediaType) - } - if len(m.Ref) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintDiff(dAtA, i, uint64(len(m.Ref))) - i += copy(dAtA[i:], m.Ref) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x2a - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovDiff(uint64(len(k))) + 1 + len(v) + sovDiff(uint64(len(v))) - i = encodeVarintDiff(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintDiff(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintDiff(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintDiff(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintDiff(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Ref) > 0 { + i -= len(m.Ref) + copy(dAtA[i:], m.Ref) + i = encodeVarintDiff(dAtA, i, uint64(len(m.Ref))) + i-- + dAtA[i] = 0x22 } - return i, nil + if len(m.MediaType) > 0 { + i -= len(m.MediaType) + copy(dAtA[i:], m.MediaType) + i = encodeVarintDiff(dAtA, i, uint64(len(m.MediaType))) + i-- + dAtA[i] = 0x1a + } + if len(m.Right) > 0 { + for iNdEx := len(m.Right) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Right[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDiff(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Left) > 0 { + for iNdEx := len(m.Left) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Left[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDiff(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } func (m *DiffResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -557,34 +601,44 @@ func (m *DiffResponse) Marshal() (dAtA []byte, err error) { } func (m *DiffResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DiffResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Diff != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintDiff(dAtA, i, uint64(m.Diff.Size())) - n4, err := m.Diff.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Diff != nil { + { + size, err := m.Diff.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDiff(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil } func encodeVarintDiff(dAtA []byte, offset int, v uint64) int { + offset -= sovDiff(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *ApplyRequest) Size() (n int) { if m == nil { @@ -694,14 +748,7 @@ func (m *DiffResponse) Size() (n int) { } func sovDiff(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozDiff(x uint64) (n int) { return sovDiff(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -710,6 +757,11 @@ func (this *ApplyRequest) String() string { if this == nil { return "nil" } + repeatedStringForMounts := "[]*Mount{" + for _, f := range this.Mounts { + repeatedStringForMounts += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + "," + } + repeatedStringForMounts += "}" keysForPayloads := make([]string, 0, len(this.Payloads)) for k, _ := range this.Payloads { keysForPayloads = append(keysForPayloads, k) @@ -722,7 +774,7 @@ func (this *ApplyRequest) String() string { mapStringForPayloads += "}" s := strings.Join([]string{`&ApplyRequest{`, `Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Descriptor", "types.Descriptor", 1) + `,`, - `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "types.Mount", 1) + `,`, + `Mounts:` + repeatedStringForMounts + `,`, `Payloads:` + mapStringForPayloads + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -744,6 +796,16 @@ func (this *DiffRequest) String() string { if this == nil { return "nil" } + repeatedStringForLeft := "[]*Mount{" + for _, f := range this.Left { + repeatedStringForLeft += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + "," + } + repeatedStringForLeft += "}" + repeatedStringForRight := "[]*Mount{" + for _, f := range this.Right { + repeatedStringForRight += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + "," + } + repeatedStringForRight += "}" keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) @@ -755,8 +817,8 @@ func (this *DiffRequest) String() string { } mapStringForLabels += "}" s := strings.Join([]string{`&DiffRequest{`, - `Left:` + strings.Replace(fmt.Sprintf("%v", this.Left), "Mount", "types.Mount", 1) + `,`, - `Right:` + strings.Replace(fmt.Sprintf("%v", this.Right), "Mount", "types.Mount", 1) + `,`, + `Left:` + repeatedStringForLeft + `,`, + `Right:` + repeatedStringForRight + `,`, `MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`, `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, `Labels:` + mapStringForLabels + `,`, @@ -1533,6 +1595,7 @@ func (m *DiffResponse) Unmarshal(dAtA []byte) error { func skipDiff(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1564,10 +1627,8 @@ func skipDiff(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1588,55 +1649,30 @@ func skipDiff(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthDiff } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthDiff - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDiff - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipDiff(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthDiff - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDiff + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthDiff + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthDiff = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDiff = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthDiff = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDiff = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDiff = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/events/v1/events.pb.go b/vendor/github.com/containerd/containerd/api/services/events/v1/events.pb.go index dcaebbf2d03..a1674f8623d 100644 --- a/vendor/github.com/containerd/containerd/api/services/events/v1/events.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/events/v1/events.pb.go @@ -11,8 +11,11 @@ import ( github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" types "github.com/gogo/protobuf/types" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -28,7 +31,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type PublishRequest struct { Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` @@ -51,7 +54,7 @@ func (m *PublishRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_PublishRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -90,7 +93,7 @@ func (m *ForwardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_ForwardRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -129,7 +132,7 @@ func (m *SubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_SubscribeRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -171,7 +174,7 @@ func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Envelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -377,6 +380,20 @@ type EventsServer interface { Subscribe(*SubscribeRequest, Events_SubscribeServer) error } +// UnimplementedEventsServer can be embedded to have forward compatible implementations. +type UnimplementedEventsServer struct { +} + +func (*UnimplementedEventsServer) Publish(ctx context.Context, req *PublishRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Publish not implemented") +} +func (*UnimplementedEventsServer) Forward(ctx context.Context, req *ForwardRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Forward not implemented") +} +func (*UnimplementedEventsServer) Subscribe(req *SubscribeRequest, srv Events_SubscribeServer) error { + return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") +} + func RegisterEventsServer(s *grpc.Server, srv EventsServer) { s.RegisterService(&_Events_serviceDesc, srv) } @@ -464,7 +481,7 @@ var _Events_serviceDesc = grpc.ServiceDesc{ func (m *PublishRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -472,36 +489,45 @@ func (m *PublishRequest) Marshal() (dAtA []byte, err error) { } func (m *PublishRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PublishRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Topic) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintEvents(dAtA, i, uint64(len(m.Topic))) - i += copy(dAtA[i:], m.Topic) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Event != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintEvents(dAtA, i, uint64(m.Event.Size())) - n1, err := m.Event.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) } - i += n1 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Topic) > 0 { + i -= len(m.Topic) + copy(dAtA[i:], m.Topic) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Topic))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ForwardRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -509,30 +535,38 @@ func (m *ForwardRequest) Marshal() (dAtA []byte, err error) { } func (m *ForwardRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ForwardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Envelope != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintEvents(dAtA, i, uint64(m.Envelope.Size())) - n2, err := m.Envelope.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Envelope != nil { + { + size, err := m.Envelope.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *SubscribeRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -540,35 +574,35 @@ func (m *SubscribeRequest) Marshal() (dAtA []byte, err error) { } func (m *SubscribeRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubscribeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Filters) > 0 { - for _, s := range m.Filters { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Filters[iNdEx]) + copy(dAtA[i:], m.Filters[iNdEx]) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Filters[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *Envelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -576,54 +610,66 @@ func (m *Envelope) Marshal() (dAtA []byte, err error) { } func (m *Envelope) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Envelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintEvents(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) - n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - if len(m.Namespace) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) - i += copy(dAtA[i:], m.Namespace) - } - if len(m.Topic) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintEvents(dAtA, i, uint64(len(m.Topic))) - i += copy(dAtA[i:], m.Topic) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Event != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintEvents(dAtA, i, uint64(m.Event.Size())) - n4, err := m.Event.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) } - i += n4 + i-- + dAtA[i] = 0x22 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Topic) > 0 { + i -= len(m.Topic) + copy(dAtA[i:], m.Topic) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Topic))) + i-- + dAtA[i] = 0x1a } - return i, nil + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + } + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintEvents(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *PublishRequest) Size() (n int) { if m == nil { @@ -706,14 +752,7 @@ func (m *Envelope) Size() (n int) { } func sovEvents(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozEvents(x uint64) (n int) { return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -735,7 +774,7 @@ func (this *ForwardRequest) String() string { return "nil" } s := strings.Join([]string{`&ForwardRequest{`, - `Envelope:` + strings.Replace(fmt.Sprintf("%v", this.Envelope), "Envelope", "Envelope", 1) + `,`, + `Envelope:` + strings.Replace(this.Envelope.String(), "Envelope", "Envelope", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -757,7 +796,7 @@ func (this *Envelope) String() string { return "nil" } s := strings.Join([]string{`&Envelope{`, - `Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, `Topic:` + fmt.Sprintf("%v", this.Topic) + `,`, `Event:` + strings.Replace(fmt.Sprintf("%v", this.Event), "Any", "types.Any", 1) + `,`, @@ -1262,6 +1301,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1293,10 +1333,8 @@ func skipEvents(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1317,55 +1355,30 @@ func skipEvents(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthEvents } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthEvents - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipEvents(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthEvents - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/images/v1/images.pb.go b/vendor/github.com/containerd/containerd/api/services/images/v1/images.pb.go index eaa1d175088..db912b68bb1 100644 --- a/vendor/github.com/containerd/containerd/api/services/images/v1/images.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/images/v1/images.pb.go @@ -12,8 +12,11 @@ import ( github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" types1 "github.com/gogo/protobuf/types" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -29,7 +32,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Image struct { // Name provides a unique name for the image. @@ -66,7 +69,7 @@ func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Image.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -105,7 +108,7 @@ func (m *GetImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_GetImageRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -144,7 +147,7 @@ func (m *GetImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_GetImageResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -183,7 +186,7 @@ func (m *CreateImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_CreateImageRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -222,7 +225,7 @@ func (m *CreateImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_CreateImageResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -267,7 +270,7 @@ func (m *UpdateImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_UpdateImageRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -306,7 +309,7 @@ func (m *UpdateImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_UpdateImageResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -355,7 +358,7 @@ func (m *ListImagesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_ListImagesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -394,7 +397,7 @@ func (m *ListImagesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ListImagesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -438,7 +441,7 @@ func (m *DeleteImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_DeleteImageRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -618,6 +621,26 @@ type ImagesServer interface { Delete(context.Context, *DeleteImageRequest) (*types1.Empty, error) } +// UnimplementedImagesServer can be embedded to have forward compatible implementations. +type UnimplementedImagesServer struct { +} + +func (*UnimplementedImagesServer) Get(ctx context.Context, req *GetImageRequest) (*GetImageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (*UnimplementedImagesServer) List(ctx context.Context, req *ListImagesRequest) (*ListImagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedImagesServer) Create(ctx context.Context, req *CreateImageRequest) (*CreateImageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (*UnimplementedImagesServer) Update(ctx context.Context, req *UpdateImageRequest) (*UpdateImageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (*UnimplementedImagesServer) Delete(ctx context.Context, req *DeleteImageRequest) (*types1.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + func RegisterImagesServer(s *grpc.Server, srv ImagesServer) { s.RegisterService(&_Images_serviceDesc, srv) } @@ -744,7 +767,7 @@ var _Images_serviceDesc = grpc.ServiceDesc{ func (m *Image) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -752,67 +775,78 @@ func (m *Image) Marshal() (dAtA []byte, err error) { } func (m *Image) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Image) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintImages(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintImages(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x42 + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintImages(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x3a + { + size, err := m.Target.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintImages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x12 - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovImages(uint64(len(k))) + 1 + len(v) + sovImages(uint64(len(v))) - i = encodeVarintImages(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintImages(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintImages(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintImages(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintImages(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 } } - dAtA[i] = 0x1a - i++ - i = encodeVarintImages(dAtA, i, uint64(m.Target.Size())) - n1, err := m.Target.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintImages(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - i += n1 - dAtA[i] = 0x3a - i++ - i = encodeVarintImages(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) - n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - dAtA[i] = 0x42 - i++ - i = encodeVarintImages(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) - n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *GetImageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -820,26 +854,33 @@ func (m *GetImageRequest) Marshal() (dAtA []byte, err error) { } func (m *GetImageRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetImageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintImages(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintImages(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *GetImageResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -847,30 +888,38 @@ func (m *GetImageResponse) Marshal() (dAtA []byte, err error) { } func (m *GetImageResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetImageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Image != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintImages(dAtA, i, uint64(m.Image.Size())) - n4, err := m.Image.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Image != nil { + { + size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintImages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CreateImageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -878,28 +927,36 @@ func (m *CreateImageRequest) Marshal() (dAtA []byte, err error) { } func (m *CreateImageRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateImageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintImages(dAtA, i, uint64(m.Image.Size())) - n5, err := m.Image.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintImages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *CreateImageResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -907,28 +964,36 @@ func (m *CreateImageResponse) Marshal() (dAtA []byte, err error) { } func (m *CreateImageResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateImageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintImages(dAtA, i, uint64(m.Image.Size())) - n6, err := m.Image.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintImages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *UpdateImageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -936,38 +1001,48 @@ func (m *UpdateImageRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateImageRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateImageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintImages(dAtA, i, uint64(m.Image.Size())) - n7, err := m.Image.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n7 if m.UpdateMask != nil { + { + size, err := m.UpdateMask.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintImages(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintImages(dAtA, i, uint64(m.UpdateMask.Size())) - n8, err := m.UpdateMask.MarshalTo(dAtA[i:]) + } + { + size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n8 + i -= size + i = encodeVarintImages(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *UpdateImageResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -975,28 +1050,36 @@ func (m *UpdateImageResponse) Marshal() (dAtA []byte, err error) { } func (m *UpdateImageResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateImageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintImages(dAtA, i, uint64(m.Image.Size())) - n9, err := m.Image.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintImages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *ListImagesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1004,35 +1087,35 @@ func (m *ListImagesRequest) Marshal() (dAtA []byte, err error) { } func (m *ListImagesRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListImagesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Filters) > 0 { - for _, s := range m.Filters { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Filters[iNdEx]) + copy(dAtA[i:], m.Filters[iNdEx]) + i = encodeVarintImages(dAtA, i, uint64(len(m.Filters[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ListImagesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1040,32 +1123,40 @@ func (m *ListImagesResponse) Marshal() (dAtA []byte, err error) { } func (m *ListImagesResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListImagesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Images) > 0 { - for _, msg := range m.Images { - dAtA[i] = 0xa - i++ - i = encodeVarintImages(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Images) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Images[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintImages(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *DeleteImageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1073,40 +1164,49 @@ func (m *DeleteImageRequest) Marshal() (dAtA []byte, err error) { } func (m *DeleteImageRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteImageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintImages(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Sync { - dAtA[i] = 0x10 - i++ + i-- if m.Sync { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintImages(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintImages(dAtA []byte, offset int, v uint64) int { + offset -= sovImages(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Image) Size() (n int) { if m == nil { @@ -1286,14 +1386,7 @@ func (m *DeleteImageRequest) Size() (n int) { } func sovImages(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozImages(x uint64) (n int) { return sovImages(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1315,9 +1408,9 @@ func (this *Image) String() string { s := strings.Join([]string{`&Image{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Labels:` + mapStringForLabels + `,`, - `Target:` + strings.Replace(strings.Replace(this.Target.String(), "Descriptor", "types.Descriptor", 1), `&`, ``, 1) + `,`, - `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, - `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `Target:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Target), "Descriptor", "types.Descriptor", 1), `&`, ``, 1) + `,`, + `CreatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CreatedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `UpdatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.UpdatedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -1339,7 +1432,7 @@ func (this *GetImageResponse) String() string { return "nil" } s := strings.Join([]string{`&GetImageResponse{`, - `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "Image", "Image", 1) + `,`, + `Image:` + strings.Replace(this.Image.String(), "Image", "Image", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -1405,8 +1498,13 @@ func (this *ListImagesResponse) String() string { if this == nil { return "nil" } + repeatedStringForImages := "[]Image{" + for _, f := range this.Images { + repeatedStringForImages += strings.Replace(strings.Replace(f.String(), "Image", "Image", 1), `&`, ``, 1) + "," + } + repeatedStringForImages += "}" s := strings.Join([]string{`&ListImagesResponse{`, - `Images:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Images), "Image", "Image", 1), `&`, ``, 1) + `,`, + `Images:` + repeatedStringForImages + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2587,6 +2685,7 @@ func (m *DeleteImageRequest) Unmarshal(dAtA []byte) error { func skipImages(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2618,10 +2717,8 @@ func skipImages(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2642,55 +2739,30 @@ func skipImages(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthImages } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthImages - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowImages - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipImages(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthImages - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupImages + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthImages + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthImages = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowImages = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthImages = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowImages = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupImages = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.pb.go b/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.pb.go index a4e238685ef..b9f912b09d2 100644 --- a/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.pb.go @@ -12,8 +12,11 @@ import ( github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" types1 "github.com/gogo/protobuf/types" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -27,7 +30,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Plugin struct { // Type defines the type of plugin. @@ -85,7 +88,7 @@ func (m *Plugin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Plugin.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -134,7 +137,7 @@ func (m *PluginsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_PluginsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -173,7 +176,7 @@ func (m *PluginsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_PluginsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -212,7 +215,7 @@ func (m *ServerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_ServerResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -340,6 +343,17 @@ type IntrospectionServer interface { Server(context.Context, *types1.Empty) (*ServerResponse, error) } +// UnimplementedIntrospectionServer can be embedded to have forward compatible implementations. +type UnimplementedIntrospectionServer struct { +} + +func (*UnimplementedIntrospectionServer) Plugins(ctx context.Context, req *PluginsRequest) (*PluginsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Plugins not implemented") +} +func (*UnimplementedIntrospectionServer) Server(ctx context.Context, req *types1.Empty) (*ServerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Server not implemented") +} + func RegisterIntrospectionServer(s *grpc.Server, srv IntrospectionServer) { s.RegisterService(&_Introspection_serviceDesc, srv) } @@ -400,7 +414,7 @@ var _Introspection_serviceDesc = grpc.ServiceDesc{ func (m *Plugin) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -408,101 +422,103 @@ func (m *Plugin) Marshal() (dAtA []byte, err error) { } func (m *Plugin) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Plugin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Type) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintIntrospection(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.ID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintIntrospection(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - if len(m.Requires) > 0 { - for _, s := range m.Requires { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.Platforms) > 0 { - for _, msg := range m.Platforms { - dAtA[i] = 0x22 - i++ - i = encodeVarintIntrospection(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.InitErr != nil { + { + size, err := m.InitErr.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintIntrospection(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if len(m.Capabilities) > 0 { + for iNdEx := len(m.Capabilities) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Capabilities[iNdEx]) + copy(dAtA[i:], m.Capabilities[iNdEx]) + i = encodeVarintIntrospection(dAtA, i, uint64(len(m.Capabilities[iNdEx]))) + i-- + dAtA[i] = 0x32 } } if len(m.Exports) > 0 { - for k, _ := range m.Exports { - dAtA[i] = 0x2a - i++ + for k := range m.Exports { v := m.Exports[k] - mapSize := 1 + len(k) + sovIntrospection(uint64(len(k))) + 1 + len(v) + sovIntrospection(uint64(len(v))) - i = encodeVarintIntrospection(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintIntrospection(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintIntrospection(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintIntrospection(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintIntrospection(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a } } - if len(m.Capabilities) > 0 { - for _, s := range m.Capabilities { - dAtA[i] = 0x32 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ + if len(m.Platforms) > 0 { + for iNdEx := len(m.Platforms) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Platforms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIntrospection(dAtA, i, uint64(size)) } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) + i-- + dAtA[i] = 0x22 } } - if m.InitErr != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintIntrospection(dAtA, i, uint64(m.InitErr.Size())) - n1, err := m.InitErr.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Requires) > 0 { + for iNdEx := len(m.Requires) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Requires[iNdEx]) + copy(dAtA[i:], m.Requires[iNdEx]) + i = encodeVarintIntrospection(dAtA, i, uint64(len(m.Requires[iNdEx]))) + i-- + dAtA[i] = 0x1a } - i += n1 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintIntrospection(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintIntrospection(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *PluginsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -510,35 +526,35 @@ func (m *PluginsRequest) Marshal() (dAtA []byte, err error) { } func (m *PluginsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PluginsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Filters) > 0 { - for _, s := range m.Filters { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Filters[iNdEx]) + copy(dAtA[i:], m.Filters[iNdEx]) + i = encodeVarintIntrospection(dAtA, i, uint64(len(m.Filters[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *PluginsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -546,32 +562,40 @@ func (m *PluginsResponse) Marshal() (dAtA []byte, err error) { } func (m *PluginsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PluginsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Plugins) > 0 { - for _, msg := range m.Plugins { - dAtA[i] = 0xa - i++ - i = encodeVarintIntrospection(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Plugins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Plugins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIntrospection(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ServerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -579,30 +603,39 @@ func (m *ServerResponse) Marshal() (dAtA []byte, err error) { } func (m *ServerResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.UUID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintIntrospection(dAtA, i, uint64(len(m.UUID))) - i += copy(dAtA[i:], m.UUID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.UUID) > 0 { + i -= len(m.UUID) + copy(dAtA[i:], m.UUID) + i = encodeVarintIntrospection(dAtA, i, uint64(len(m.UUID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintIntrospection(dAtA []byte, offset int, v uint64) int { + offset -= sovIntrospection(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Plugin) Size() (n int) { if m == nil { @@ -707,14 +740,7 @@ func (m *ServerResponse) Size() (n int) { } func sovIntrospection(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozIntrospection(x uint64) (n int) { return sovIntrospection(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -723,6 +749,11 @@ func (this *Plugin) String() string { if this == nil { return "nil" } + repeatedStringForPlatforms := "[]Platform{" + for _, f := range this.Platforms { + repeatedStringForPlatforms += fmt.Sprintf("%v", f) + "," + } + repeatedStringForPlatforms += "}" keysForExports := make([]string, 0, len(this.Exports)) for k, _ := range this.Exports { keysForExports = append(keysForExports, k) @@ -737,7 +768,7 @@ func (this *Plugin) String() string { `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Requires:` + fmt.Sprintf("%v", this.Requires) + `,`, - `Platforms:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Platforms), "Platform", "types.Platform", 1), `&`, ``, 1) + `,`, + `Platforms:` + repeatedStringForPlatforms + `,`, `Exports:` + mapStringForExports + `,`, `Capabilities:` + fmt.Sprintf("%v", this.Capabilities) + `,`, `InitErr:` + strings.Replace(fmt.Sprintf("%v", this.InitErr), "Status", "rpc.Status", 1) + `,`, @@ -761,8 +792,13 @@ func (this *PluginsResponse) String() string { if this == nil { return "nil" } + repeatedStringForPlugins := "[]Plugin{" + for _, f := range this.Plugins { + repeatedStringForPlugins += strings.Replace(strings.Replace(f.String(), "Plugin", "Plugin", 1), `&`, ``, 1) + "," + } + repeatedStringForPlugins += "}" s := strings.Join([]string{`&PluginsResponse{`, - `Plugins:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Plugins), "Plugin", "Plugin", 1), `&`, ``, 1) + `,`, + `Plugins:` + repeatedStringForPlugins + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -1429,6 +1465,7 @@ func (m *ServerResponse) Unmarshal(dAtA []byte) error { func skipIntrospection(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1460,10 +1497,8 @@ func skipIntrospection(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1484,55 +1519,30 @@ func skipIntrospection(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthIntrospection } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthIntrospection - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIntrospection - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipIntrospection(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthIntrospection - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupIntrospection + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthIntrospection + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthIntrospection = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIntrospection = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthIntrospection = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIntrospection = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupIntrospection = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/leases/v1/leases.pb.go b/vendor/github.com/containerd/containerd/api/services/leases/v1/leases.pb.go index 9a3313ef5b3..4dbac3e09db 100644 --- a/vendor/github.com/containerd/containerd/api/services/leases/v1/leases.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/leases/v1/leases.pb.go @@ -11,8 +11,11 @@ import ( github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" types "github.com/gogo/protobuf/types" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -28,7 +31,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Lease is an object which retains resources while it exists. type Lease struct { @@ -53,7 +56,7 @@ func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Lease.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -95,7 +98,7 @@ func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_CreateRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -134,7 +137,7 @@ func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_CreateResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -178,7 +181,7 @@ func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -217,7 +220,7 @@ func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ListRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -256,7 +259,7 @@ func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -299,7 +302,7 @@ func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Resource.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -339,7 +342,7 @@ func (m *AddResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_AddResourceRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -379,7 +382,7 @@ func (m *DeleteResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_DeleteResourceRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -418,7 +421,7 @@ func (m *ListResourcesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_ListResourcesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -457,7 +460,7 @@ func (m *ListResourcesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_ListResourcesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -653,6 +656,29 @@ type LeasesServer interface { ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error) } +// UnimplementedLeasesServer can be embedded to have forward compatible implementations. +type UnimplementedLeasesServer struct { +} + +func (*UnimplementedLeasesServer) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (*UnimplementedLeasesServer) Delete(ctx context.Context, req *DeleteRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (*UnimplementedLeasesServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedLeasesServer) AddResource(ctx context.Context, req *AddResourceRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddResource not implemented") +} +func (*UnimplementedLeasesServer) DeleteResource(ctx context.Context, req *DeleteResourceRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteResource not implemented") +} +func (*UnimplementedLeasesServer) ListResources(ctx context.Context, req *ListResourcesRequest) (*ListResourcesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListResources not implemented") +} + func RegisterLeasesServer(s *grpc.Server, srv LeasesServer) { s.RegisterService(&_Leases_serviceDesc, srv) } @@ -801,7 +827,7 @@ var _Leases_serviceDesc = grpc.ServiceDesc{ func (m *Lease) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -809,51 +835,60 @@ func (m *Lease) Marshal() (dAtA []byte, err error) { } func (m *Lease) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Lease) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - dAtA[i] = 0x12 - i++ - i = encodeVarintLeases(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) - n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x1a - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovLeases(uint64(len(k))) + 1 + len(v) + sovLeases(uint64(len(v))) - i = encodeVarintLeases(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintLeases(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintLeases(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintLeases(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) + if err1 != nil { + return 0, err1 } - return i, nil + i -= n1 + i = encodeVarintLeases(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x12 + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CreateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -861,43 +896,52 @@ func (m *CreateRequest) Marshal() (dAtA []byte, err error) { } func (m *CreateRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x1a - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovLeases(uint64(len(k))) + 1 + len(v) + sovLeases(uint64(len(v))) - i = encodeVarintLeases(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintLeases(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintLeases(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintLeases(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *CreateResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -905,30 +949,38 @@ func (m *CreateResponse) Marshal() (dAtA []byte, err error) { } func (m *CreateResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Lease != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(m.Lease.Size())) - n2, err := m.Lease.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Lease != nil { + { + size, err := m.Lease.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLeases(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -936,36 +988,43 @@ func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { } func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Sync { - dAtA[i] = 0x10 - i++ + i-- if m.Sync { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ListRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -973,35 +1032,35 @@ func (m *ListRequest) Marshal() (dAtA []byte, err error) { } func (m *ListRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Filters) > 0 { - for _, s := range m.Filters { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Filters[iNdEx]) + copy(dAtA[i:], m.Filters[iNdEx]) + i = encodeVarintLeases(dAtA, i, uint64(len(m.Filters[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ListResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1009,32 +1068,40 @@ func (m *ListResponse) Marshal() (dAtA []byte, err error) { } func (m *ListResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Leases) > 0 { - for _, msg := range m.Leases { - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Leases) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Leases[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLeases(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *Resource) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1042,32 +1109,40 @@ func (m *Resource) Marshal() (dAtA []byte, err error) { } func (m *Resource) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Type) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Type) + copy(dAtA[i:], m.Type) i = encodeVarintLeases(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *AddResourceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1075,34 +1150,43 @@ func (m *AddResourceRequest) Marshal() (dAtA []byte, err error) { } func (m *AddResourceRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AddResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintLeases(dAtA, i, uint64(m.Resource.Size())) - n3, err := m.Resource.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLeases(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *DeleteResourceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1110,34 +1194,43 @@ func (m *DeleteResourceRequest) Marshal() (dAtA []byte, err error) { } func (m *DeleteResourceRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintLeases(dAtA, i, uint64(m.Resource.Size())) - n4, err := m.Resource.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLeases(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ListResourcesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1145,26 +1238,33 @@ func (m *ListResourcesRequest) Marshal() (dAtA []byte, err error) { } func (m *ListResourcesRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListResourcesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ListResourcesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1172,36 +1272,46 @@ func (m *ListResourcesResponse) Marshal() (dAtA []byte, err error) { } func (m *ListResourcesResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListResourcesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Resources) > 0 { - for _, msg := range m.Resources { - dAtA[i] = 0xa - i++ - i = encodeVarintLeases(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLeases(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func encodeVarintLeases(dAtA []byte, offset int, v uint64) int { + offset -= sovLeases(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Lease) Size() (n int) { if m == nil { @@ -1415,14 +1525,7 @@ func (m *ListResourcesResponse) Size() (n int) { } func sovLeases(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozLeases(x uint64) (n int) { return sovLeases(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1443,7 +1546,7 @@ func (this *Lease) String() string { mapStringForLabels += "}" s := strings.Join([]string{`&Lease{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, - `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `CreatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CreatedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `Labels:` + mapStringForLabels + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -1477,7 +1580,7 @@ func (this *CreateResponse) String() string { return "nil" } s := strings.Join([]string{`&CreateResponse{`, - `Lease:` + strings.Replace(fmt.Sprintf("%v", this.Lease), "Lease", "Lease", 1) + `,`, + `Lease:` + strings.Replace(this.Lease.String(), "Lease", "Lease", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -1510,8 +1613,13 @@ func (this *ListResponse) String() string { if this == nil { return "nil" } + repeatedStringForLeases := "[]*Lease{" + for _, f := range this.Leases { + repeatedStringForLeases += strings.Replace(f.String(), "Lease", "Lease", 1) + "," + } + repeatedStringForLeases += "}" s := strings.Join([]string{`&ListResponse{`, - `Leases:` + strings.Replace(fmt.Sprintf("%v", this.Leases), "Lease", "Lease", 1) + `,`, + `Leases:` + repeatedStringForLeases + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -1568,8 +1676,13 @@ func (this *ListResourcesResponse) String() string { if this == nil { return "nil" } + repeatedStringForResources := "[]Resource{" + for _, f := range this.Resources { + repeatedStringForResources += strings.Replace(strings.Replace(f.String(), "Resource", "Resource", 1), `&`, ``, 1) + "," + } + repeatedStringForResources += "}" s := strings.Join([]string{`&ListResourcesResponse{`, - `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `Resources:` + repeatedStringForResources + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2945,6 +3058,7 @@ func (m *ListResourcesResponse) Unmarshal(dAtA []byte) error { func skipLeases(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2976,10 +3090,8 @@ func skipLeases(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -3000,55 +3112,30 @@ func skipLeases(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthLeases } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthLeases - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLeases - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipLeases(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthLeases - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupLeases + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthLeases + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthLeases = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowLeases = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthLeases = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowLeases = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupLeases = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.pb.go b/vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.pb.go index 3c6cdd7af22..0d1d650ba4a 100644 --- a/vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.pb.go @@ -10,8 +10,11 @@ import ( github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" types "github.com/gogo/protobuf/types" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -25,7 +28,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Namespace struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -54,7 +57,7 @@ func (m *Namespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Namespace.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -93,7 +96,7 @@ func (m *GetNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_GetNamespaceRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -132,7 +135,7 @@ func (m *GetNamespaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_GetNamespaceResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -171,7 +174,7 @@ func (m *ListNamespacesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_ListNamespacesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -210,7 +213,7 @@ func (m *ListNamespacesResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_ListNamespacesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -249,7 +252,7 @@ func (m *CreateNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_CreateNamespaceRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -288,7 +291,7 @@ func (m *CreateNamespaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return xxx_messageInfo_CreateNamespaceResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -342,7 +345,7 @@ func (m *UpdateNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_UpdateNamespaceRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -381,7 +384,7 @@ func (m *UpdateNamespaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return xxx_messageInfo_UpdateNamespaceResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -420,7 +423,7 @@ func (m *DeleteNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_DeleteNamespaceRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -577,6 +580,26 @@ type NamespacesServer interface { Delete(context.Context, *DeleteNamespaceRequest) (*types.Empty, error) } +// UnimplementedNamespacesServer can be embedded to have forward compatible implementations. +type UnimplementedNamespacesServer struct { +} + +func (*UnimplementedNamespacesServer) Get(ctx context.Context, req *GetNamespaceRequest) (*GetNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (*UnimplementedNamespacesServer) List(ctx context.Context, req *ListNamespacesRequest) (*ListNamespacesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedNamespacesServer) Create(ctx context.Context, req *CreateNamespaceRequest) (*CreateNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (*UnimplementedNamespacesServer) Update(ctx context.Context, req *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (*UnimplementedNamespacesServer) Delete(ctx context.Context, req *DeleteNamespaceRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} + func RegisterNamespacesServer(s *grpc.Server, srv NamespacesServer) { s.RegisterService(&_Namespaces_serviceDesc, srv) } @@ -703,7 +726,7 @@ var _Namespaces_serviceDesc = grpc.ServiceDesc{ func (m *Namespace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -711,43 +734,52 @@ func (m *Namespace) Marshal() (dAtA []byte, err error) { } func (m *Namespace) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Namespace) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x12 - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) - i = encodeVarintNamespace(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintNamespace(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintNamespace(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintNamespace(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *GetNamespaceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -755,26 +787,33 @@ func (m *GetNamespaceRequest) Marshal() (dAtA []byte, err error) { } func (m *GetNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *GetNamespaceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -782,28 +821,36 @@ func (m *GetNamespaceResponse) Marshal() (dAtA []byte, err error) { } func (m *GetNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.Namespace.Size())) - n1, err := m.Namespace.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Namespace.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *ListNamespacesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -811,26 +858,33 @@ func (m *ListNamespacesRequest) Marshal() (dAtA []byte, err error) { } func (m *ListNamespacesRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListNamespacesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Filter) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Filter))) - i += copy(dAtA[i:], m.Filter) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Filter) > 0 { + i -= len(m.Filter) + copy(dAtA[i:], m.Filter) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Filter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ListNamespacesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -838,32 +892,40 @@ func (m *ListNamespacesResponse) Marshal() (dAtA []byte, err error) { } func (m *ListNamespacesResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListNamespacesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Namespaces) > 0 { - for _, msg := range m.Namespaces { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Namespaces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *CreateNamespaceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -871,28 +933,36 @@ func (m *CreateNamespaceRequest) Marshal() (dAtA []byte, err error) { } func (m *CreateNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.Namespace.Size())) - n2, err := m.Namespace.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Namespace.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *CreateNamespaceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -900,28 +970,36 @@ func (m *CreateNamespaceResponse) Marshal() (dAtA []byte, err error) { } func (m *CreateNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.Namespace.Size())) - n3, err := m.Namespace.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Namespace.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *UpdateNamespaceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -929,38 +1007,48 @@ func (m *UpdateNamespaceRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.Namespace.Size())) - n4, err := m.Namespace.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - i += n4 if m.UpdateMask != nil { + { + size, err := m.UpdateMask.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.UpdateMask.Size())) - n5, err := m.UpdateMask.MarshalTo(dAtA[i:]) + } + { + size, err := m.Namespace.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n5 + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *UpdateNamespaceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -968,28 +1056,36 @@ func (m *UpdateNamespaceResponse) Marshal() (dAtA []byte, err error) { } func (m *UpdateNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateNamespaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(m.Namespace.Size())) - n6, err := m.Namespace.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Namespace.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNamespace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *DeleteNamespaceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -997,30 +1093,39 @@ func (m *DeleteNamespaceRequest) Marshal() (dAtA []byte, err error) { } func (m *DeleteNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteNamespaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int { + offset -= sovNamespace(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Namespace) Size() (n int) { if m == nil { @@ -1187,14 +1292,7 @@ func (m *DeleteNamespaceRequest) Size() (n int) { } func sovNamespace(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozNamespace(x uint64) (n int) { return sovNamespace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1258,8 +1356,13 @@ func (this *ListNamespacesResponse) String() string { if this == nil { return "nil" } + repeatedStringForNamespaces := "[]Namespace{" + for _, f := range this.Namespaces { + repeatedStringForNamespaces += strings.Replace(strings.Replace(f.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + "," + } + repeatedStringForNamespaces += "}" s := strings.Join([]string{`&ListNamespacesResponse{`, - `Namespaces:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Namespaces), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`, + `Namespaces:` + repeatedStringForNamespaces + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2362,6 +2465,7 @@ func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error { func skipNamespace(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -2393,10 +2497,8 @@ func skipNamespace(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -2417,55 +2519,30 @@ func skipNamespace(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthNamespace } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthNamespace - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNamespace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipNamespace(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthNamespace - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupNamespace + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthNamespace + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNamespace = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.pb.go b/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.pb.go index 1aa7585be0e..1877afdedc0 100644 --- a/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.pb.go @@ -12,8 +12,11 @@ import ( github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" types1 "github.com/gogo/protobuf/types" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -29,7 +32,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Kind int32 @@ -88,7 +91,7 @@ func (m *PrepareSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_PrepareSnapshotRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -127,7 +130,7 @@ func (m *PrepareSnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return xxx_messageInfo_PrepareSnapshotResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -172,7 +175,7 @@ func (m *ViewSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ViewSnapshotRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -211,7 +214,7 @@ func (m *ViewSnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_ViewSnapshotResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -251,7 +254,7 @@ func (m *MountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_MountsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -290,7 +293,7 @@ func (m *MountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_MountsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -330,7 +333,7 @@ func (m *RemoveSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_RemoveSnapshotRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -375,7 +378,7 @@ func (m *CommitSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_CommitSnapshotRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -415,7 +418,7 @@ func (m *StatSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_StatSnapshotRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -464,7 +467,7 @@ func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Info.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -503,7 +506,7 @@ func (m *StatSnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_StatSnapshotResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -550,7 +553,7 @@ func (m *UpdateSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_UpdateSnapshotRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -589,7 +592,7 @@ func (m *UpdateSnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_UpdateSnapshotResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -609,7 +612,18 @@ func (m *UpdateSnapshotResponse) XXX_DiscardUnknown() { var xxx_messageInfo_UpdateSnapshotResponse proto.InternalMessageInfo type ListSnapshotsRequest struct { - Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` + Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, images that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + Filters []string `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -628,7 +642,7 @@ func (m *ListSnapshotsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_ListSnapshotsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -667,7 +681,7 @@ func (m *ListSnapshotsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_ListSnapshotsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -707,7 +721,7 @@ func (m *UsageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_UsageRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -747,7 +761,7 @@ func (m *UsageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_UsageResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -766,6 +780,45 @@ func (m *UsageResponse) XXX_DiscardUnknown() { var xxx_messageInfo_UsageResponse proto.InternalMessageInfo +type CleanupRequest struct { + Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CleanupRequest) Reset() { *m = CleanupRequest{} } +func (*CleanupRequest) ProtoMessage() {} +func (*CleanupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cfc0ddf12791f168, []int{17} +} +func (m *CleanupRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CleanupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CleanupRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CleanupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CleanupRequest.Merge(m, src) +} +func (m *CleanupRequest) XXX_Size() int { + return m.Size() +} +func (m *CleanupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CleanupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CleanupRequest proto.InternalMessageInfo + func init() { proto.RegisterEnum("containerd.services.snapshots.v1.Kind", Kind_name, Kind_value) proto.RegisterType((*PrepareSnapshotRequest)(nil), "containerd.services.snapshots.v1.PrepareSnapshotRequest") @@ -789,6 +842,7 @@ func init() { proto.RegisterType((*ListSnapshotsResponse)(nil), "containerd.services.snapshots.v1.ListSnapshotsResponse") proto.RegisterType((*UsageRequest)(nil), "containerd.services.snapshots.v1.UsageRequest") proto.RegisterType((*UsageResponse)(nil), "containerd.services.snapshots.v1.UsageResponse") + proto.RegisterType((*CleanupRequest)(nil), "containerd.services.snapshots.v1.CleanupRequest") } func init() { @@ -796,70 +850,73 @@ func init() { } var fileDescriptor_cfc0ddf12791f168 = []byte{ - // 1007 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1a, 0x47, - 0x14, 0x67, 0x60, 0x8d, 0xe3, 0x87, 0xed, 0xd2, 0x09, 0x26, 0x68, 0x5b, 0xe1, 0x15, 0x87, 0xca, - 0xea, 0x61, 0x37, 0xa1, 0x6a, 0xe2, 0xc4, 0x97, 0x62, 0x4c, 0x2b, 0xec, 0xd8, 0xa9, 0x36, 0xb6, - 0x13, 0xa7, 0x55, 0xa3, 0x35, 0x8c, 0xf1, 0x0a, 0x76, 0x97, 0x32, 0x03, 0x11, 0xad, 0x54, 0xf5, - 0x18, 0xf9, 0xd4, 0x2f, 0xe0, 0x53, 0xfb, 0x21, 0xaa, 0x7e, 0x02, 0x1f, 0x7b, 0xec, 0xa9, 0x6d, - 0xfc, 0x25, 0x7a, 0xea, 0x1f, 0xcd, 0xec, 0x2c, 0x60, 0x4c, 0xc5, 0x82, 0xc9, 0x6d, 0x66, 0x67, - 0x7e, 0xef, 0xfd, 0xe6, 0xf7, 0xe6, 0xbd, 0x37, 0x0b, 0xdb, 0x35, 0x9b, 0x9d, 0xb6, 0x8f, 0xf5, - 0x8a, 0xe7, 0x18, 0x15, 0xcf, 0x65, 0x96, 0xed, 0x92, 0x56, 0x75, 0x70, 0x68, 0x35, 0x6d, 0x83, - 0x92, 0x56, 0xc7, 0xae, 0x10, 0x6a, 0x50, 0xd7, 0x6a, 0xd2, 0x53, 0x8f, 0x51, 0xa3, 0x73, 0xaf, - 0x3f, 0xd1, 0x9b, 0x2d, 0x8f, 0x79, 0x58, 0xeb, 0xa3, 0xf4, 0x00, 0xa1, 0xf7, 0x37, 0x75, 0xee, - 0xa9, 0xa9, 0x9a, 0x57, 0xf3, 0xc4, 0x66, 0x83, 0x8f, 0x7c, 0x9c, 0xfa, 0x5e, 0xcd, 0xf3, 0x6a, - 0x0d, 0x62, 0x88, 0xd9, 0x71, 0xfb, 0xc4, 0x20, 0x4e, 0x93, 0x75, 0xe5, 0xa2, 0x36, 0xbc, 0x78, - 0x62, 0x93, 0x46, 0xf5, 0xa5, 0x63, 0xd1, 0xba, 0xdc, 0xb1, 0x3a, 0xbc, 0x83, 0xd9, 0x0e, 0xa1, - 0xcc, 0x72, 0x9a, 0x72, 0xc3, 0xfd, 0x50, 0x67, 0x64, 0xdd, 0x26, 0xa1, 0x86, 0xe3, 0xb5, 0x5d, - 0xe6, 0xe3, 0x72, 0x7f, 0x23, 0x48, 0x7f, 0xde, 0x22, 0x4d, 0xab, 0x45, 0x9e, 0xca, 0x53, 0x98, - 0xe4, 0xeb, 0x36, 0xa1, 0x0c, 0x6b, 0x90, 0x08, 0x0e, 0xc6, 0x48, 0x2b, 0x83, 0x34, 0xb4, 0xb6, - 0x60, 0x0e, 0x7e, 0xc2, 0x49, 0x88, 0xd5, 0x49, 0x37, 0x13, 0x15, 0x2b, 0x7c, 0x88, 0xd3, 0x10, - 0xe7, 0xa6, 0x5c, 0x96, 0x89, 0x89, 0x8f, 0x72, 0x86, 0xbf, 0x84, 0x78, 0xc3, 0x3a, 0x26, 0x0d, - 0x9a, 0x51, 0xb4, 0xd8, 0x5a, 0x22, 0xbf, 0xa5, 0x8f, 0xd3, 0x51, 0x1f, 0xcd, 0x4a, 0x7f, 0x2c, - 0xcc, 0x94, 0x5c, 0xd6, 0xea, 0x9a, 0xd2, 0xa6, 0xfa, 0x10, 0x12, 0x03, 0x9f, 0x03, 0x5a, 0xa8, - 0x4f, 0x2b, 0x05, 0x73, 0x1d, 0xab, 0xd1, 0x26, 0x92, 0xaa, 0x3f, 0x79, 0x14, 0x5d, 0x47, 0xb9, - 0x6d, 0xb8, 0x73, 0xcd, 0x11, 0x6d, 0x7a, 0x2e, 0x25, 0xd8, 0x80, 0xb8, 0x50, 0x8a, 0x66, 0x90, - 0xe0, 0x7c, 0x67, 0x90, 0xb3, 0x50, 0x52, 0xdf, 0xe5, 0xeb, 0xa6, 0xdc, 0x96, 0xfb, 0x0b, 0xc1, - 0xed, 0x43, 0x9b, 0xbc, 0x7a, 0x9b, 0x42, 0x1e, 0x0d, 0x09, 0x59, 0x18, 0x2f, 0xe4, 0x08, 0x4a, - 0xb3, 0x56, 0xf1, 0x33, 0x48, 0x5d, 0xf5, 0x32, 0xad, 0x84, 0x45, 0x58, 0x12, 0x1f, 0xe8, 0x0d, - 0xb4, 0xcb, 0x15, 0x60, 0x39, 0x30, 0x32, 0x2d, 0x8f, 0x1d, 0x58, 0x31, 0x89, 0xe3, 0x75, 0x66, - 0x91, 0x14, 0xfc, 0x5e, 0xac, 0x14, 0x3d, 0xc7, 0xb1, 0xd9, 0xe4, 0xd6, 0x30, 0x28, 0xae, 0xe5, - 0x04, 0x92, 0x8b, 0x71, 0xe0, 0x21, 0xd6, 0x8f, 0xcc, 0x17, 0x43, 0xb7, 0xa2, 0x38, 0xfe, 0x56, - 0x8c, 0x24, 0x34, 0xeb, 0x7b, 0x51, 0x86, 0xdb, 0x4f, 0x99, 0xc5, 0x66, 0x21, 0xe2, 0xbf, 0x51, - 0x50, 0xca, 0xee, 0x89, 0xd7, 0x53, 0x04, 0x0d, 0x28, 0xd2, 0xcf, 0x96, 0xe8, 0x95, 0x6c, 0x79, - 0x04, 0x4a, 0xdd, 0x76, 0xab, 0x42, 0xaa, 0xe5, 0xfc, 0x07, 0xe3, 0x55, 0xd9, 0xb1, 0xdd, 0xaa, - 0x29, 0x30, 0xb8, 0x08, 0x50, 0x69, 0x11, 0x8b, 0x91, 0xea, 0x4b, 0x8b, 0x65, 0x14, 0x0d, 0xad, - 0x25, 0xf2, 0xaa, 0xee, 0xd7, 0x61, 0x3d, 0xa8, 0xc3, 0xfa, 0x7e, 0x50, 0x87, 0x37, 0x6f, 0x5d, - 0xfc, 0xbe, 0x1a, 0xf9, 0xe1, 0x8f, 0x55, 0x64, 0x2e, 0x48, 0x5c, 0x81, 0x71, 0x23, 0xed, 0x66, - 0x35, 0x30, 0x32, 0x37, 0x89, 0x11, 0x89, 0x2b, 0x30, 0xbc, 0xdd, 0x8b, 0x6e, 0x5c, 0x44, 0x37, - 0x3f, 0xfe, 0x1c, 0x5c, 0xa9, 0x59, 0x07, 0xf3, 0x39, 0xa4, 0xae, 0x06, 0x53, 0x26, 0xd7, 0x27, - 0xa0, 0xd8, 0xee, 0x89, 0x27, 0x8c, 0x24, 0xc2, 0x88, 0xcc, 0xc9, 0x6d, 0x2a, 0xfc, 0xa4, 0xa6, - 0x40, 0xe6, 0x7e, 0x46, 0xb0, 0x72, 0x20, 0x8e, 0x3b, 0xf9, 0x4d, 0x09, 0xbc, 0x47, 0xa7, 0xf5, - 0x8e, 0x37, 0x20, 0xe1, 0x6b, 0x2d, 0x1a, 0xae, 0xb8, 0x2b, 0xa3, 0x82, 0xf4, 0x29, 0xef, 0xc9, - 0xbb, 0x16, 0xad, 0x9b, 0x32, 0xa4, 0x7c, 0x9c, 0x7b, 0x01, 0xe9, 0x61, 0xe6, 0x33, 0x93, 0x65, - 0x1d, 0x52, 0x8f, 0x6d, 0xda, 0x13, 0x3c, 0x7c, 0x4d, 0xcc, 0x1d, 0xc1, 0xca, 0x10, 0xf2, 0x1a, - 0xa9, 0xd8, 0x94, 0xa4, 0x36, 0x61, 0xf1, 0x80, 0x5a, 0x35, 0x72, 0x93, 0x5c, 0xde, 0x80, 0x25, - 0x69, 0x43, 0xd2, 0xc2, 0xa0, 0x50, 0xfb, 0x1b, 0x3f, 0xa7, 0x63, 0xa6, 0x18, 0xf3, 0x9c, 0xb6, - 0x5d, 0xaf, 0x4a, 0xa8, 0x40, 0xc6, 0x4c, 0x39, 0xfb, 0xf0, 0x35, 0x02, 0x85, 0xa7, 0x29, 0x7e, - 0x1f, 0xe6, 0x0f, 0xf6, 0x76, 0xf6, 0x9e, 0x3c, 0xdb, 0x4b, 0x46, 0xd4, 0x77, 0xce, 0xce, 0xb5, - 0x04, 0xff, 0x7c, 0xe0, 0xd6, 0x5d, 0xef, 0x95, 0x8b, 0xd3, 0xa0, 0x1c, 0x96, 0x4b, 0xcf, 0x92, - 0x48, 0x5d, 0x3c, 0x3b, 0xd7, 0x6e, 0xf1, 0x25, 0xde, 0xa2, 0xb0, 0x0a, 0xf1, 0x42, 0x71, 0xbf, - 0x7c, 0x58, 0x4a, 0x46, 0xd5, 0xe5, 0xb3, 0x73, 0x0d, 0xf8, 0x4a, 0xa1, 0xc2, 0xec, 0x0e, 0xc1, - 0x1a, 0x2c, 0x14, 0x9f, 0xec, 0xee, 0x96, 0xf7, 0xf7, 0x4b, 0x5b, 0xc9, 0x98, 0xfa, 0xee, 0xd9, - 0xb9, 0xb6, 0xc4, 0x97, 0xfd, 0x5a, 0xc9, 0x48, 0x55, 0x5d, 0x7c, 0xfd, 0x63, 0x36, 0xf2, 0xcb, - 0x4f, 0x59, 0xc1, 0x20, 0xff, 0xcf, 0x3c, 0x2c, 0xf4, 0x34, 0xc6, 0xdf, 0xc1, 0xbc, 0x7c, 0x4a, - 0xe0, 0xf5, 0x69, 0x9f, 0x37, 0xea, 0xc3, 0x29, 0x90, 0x52, 0xc4, 0x36, 0x28, 0xe2, 0x84, 0x1f, - 0x4f, 0xf5, 0x24, 0x50, 0xef, 0x4f, 0x0a, 0x93, 0x6e, 0xeb, 0x10, 0xf7, 0xbb, 0x2d, 0x36, 0xc6, - 0x5b, 0xb8, 0xd2, 0xdc, 0xd5, 0xbb, 0xe1, 0x01, 0xd2, 0xd9, 0x11, 0xc4, 0xfd, 0x60, 0xe0, 0x07, - 0x53, 0xb6, 0x38, 0x35, 0x7d, 0x2d, 0xb3, 0x4b, 0xfc, 0x29, 0xce, 0x4d, 0xfb, 0x2d, 0x3f, 0x8c, - 0xe9, 0x91, 0x8f, 0x83, 0xff, 0x35, 0xdd, 0x06, 0x85, 0x57, 0xce, 0x30, 0x91, 0x19, 0xd1, 0x2e, - 0xc3, 0x44, 0x66, 0x64, 0x61, 0xfe, 0x16, 0xe2, 0x7e, 0x6d, 0x0a, 0x73, 0xa2, 0x91, 0xf5, 0x57, - 0x5d, 0x9f, 0x1c, 0x28, 0x9d, 0x77, 0x41, 0xe1, 0x25, 0x08, 0x87, 0x20, 0x3f, 0xaa, 0xc8, 0xa9, - 0x0f, 0x26, 0xc6, 0xf9, 0x8e, 0xef, 0x22, 0x7c, 0x0a, 0x73, 0xa2, 0xbc, 0x60, 0x3d, 0x04, 0xfb, - 0x81, 0x5a, 0xa6, 0x1a, 0xa1, 0xf7, 0xfb, 0xbe, 0x36, 0xbf, 0xba, 0x78, 0x93, 0x8d, 0xfc, 0xf6, - 0x26, 0x1b, 0xf9, 0xfe, 0x32, 0x8b, 0x2e, 0x2e, 0xb3, 0xe8, 0xd7, 0xcb, 0x2c, 0xfa, 0xf3, 0x32, - 0x8b, 0x5e, 0x6c, 0x4d, 0xff, 0xcf, 0xb9, 0xd1, 0x9b, 0x3c, 0x8f, 0x1c, 0xc7, 0xc5, 0x55, 0xfa, - 0xe8, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xa0, 0xb2, 0xda, 0xc4, 0x0e, 0x00, 0x00, + // 1047 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xda, 0x5b, 0x27, 0x79, 0x4e, 0x82, 0x99, 0x3a, 0xae, 0xb5, 0x20, 0x67, 0xe5, 0x03, + 0x8a, 0x38, 0xec, 0xb6, 0x46, 0xb4, 0x69, 0x73, 0xc1, 0x71, 0x0c, 0x72, 0xd2, 0xa4, 0x68, 0xf3, + 0xa7, 0x4d, 0x41, 0x54, 0x1b, 0x7b, 0xec, 0xac, 0xec, 0xfd, 0x83, 0x67, 0xec, 0xca, 0x20, 0x21, + 0x8e, 0x55, 0x4e, 0x7c, 0x81, 0x9c, 0xe0, 0x43, 0x20, 0x3e, 0x41, 0x8e, 0x48, 0x5c, 0x38, 0x01, + 0xcd, 0x97, 0xe0, 0x84, 0x40, 0x33, 0x3b, 0xeb, 0x7f, 0x71, 0xe5, 0xb5, 0x6b, 0x6e, 0x33, 0x3b, + 0xf3, 0xde, 0xfb, 0xbd, 0xdf, 0x9b, 0xf7, 0x9b, 0x59, 0xd8, 0xad, 0x5b, 0xf4, 0xbc, 0x7d, 0xa6, + 0x55, 0x5c, 0x5b, 0xaf, 0xb8, 0x0e, 0x35, 0x2d, 0x07, 0xb7, 0xaa, 0x83, 0x43, 0xd3, 0xb3, 0x74, + 0x82, 0x5b, 0x1d, 0xab, 0x82, 0x89, 0x4e, 0x1c, 0xd3, 0x23, 0xe7, 0x2e, 0x25, 0x7a, 0xe7, 0x5e, + 0x7f, 0xa2, 0x79, 0x2d, 0x97, 0xba, 0x48, 0xed, 0x5b, 0x69, 0x81, 0x85, 0xd6, 0xdf, 0xd4, 0xb9, + 0xa7, 0xa4, 0xea, 0x6e, 0xdd, 0xe5, 0x9b, 0x75, 0x36, 0xf2, 0xed, 0x94, 0xf7, 0xea, 0xae, 0x5b, + 0x6f, 0x62, 0x9d, 0xcf, 0xce, 0xda, 0x35, 0x1d, 0xdb, 0x1e, 0xed, 0x8a, 0x45, 0x75, 0x74, 0xb1, + 0x66, 0xe1, 0x66, 0xf5, 0x85, 0x6d, 0x92, 0x86, 0xd8, 0xb1, 0x3e, 0xba, 0x83, 0x5a, 0x36, 0x26, + 0xd4, 0xb4, 0x3d, 0xb1, 0xe1, 0x7e, 0xa8, 0x1c, 0x69, 0xd7, 0xc3, 0x44, 0xb7, 0xdd, 0xb6, 0x43, + 0x7d, 0xbb, 0xdc, 0x3f, 0x12, 0xa4, 0x3f, 0x6f, 0x61, 0xcf, 0x6c, 0xe1, 0x43, 0x91, 0x85, 0x81, + 0xbf, 0x6e, 0x63, 0x42, 0x91, 0x0a, 0x89, 0x20, 0x31, 0x8a, 0x5b, 0x19, 0x49, 0x95, 0x36, 0x96, + 0x8c, 0xc1, 0x4f, 0x28, 0x09, 0xb1, 0x06, 0xee, 0x66, 0xa2, 0x7c, 0x85, 0x0d, 0x51, 0x1a, 0xe2, + 0xcc, 0x95, 0x43, 0x33, 0x31, 0xfe, 0x51, 0xcc, 0xd0, 0x97, 0x10, 0x6f, 0x9a, 0x67, 0xb8, 0x49, + 0x32, 0xb2, 0x1a, 0xdb, 0x48, 0xe4, 0x77, 0xb4, 0x49, 0x3c, 0x6a, 0xe3, 0x51, 0x69, 0x8f, 0xb9, + 0x9b, 0x92, 0x43, 0x5b, 0x5d, 0x43, 0xf8, 0x54, 0x1e, 0x42, 0x62, 0xe0, 0x73, 0x00, 0x4b, 0xea, + 0xc3, 0x4a, 0xc1, 0xad, 0x8e, 0xd9, 0x6c, 0x63, 0x01, 0xd5, 0x9f, 0x3c, 0x8a, 0x6e, 0x4a, 0xb9, + 0x5d, 0xb8, 0x73, 0x23, 0x10, 0xf1, 0x5c, 0x87, 0x60, 0xa4, 0x43, 0x9c, 0x33, 0x45, 0x32, 0x12, + 0xc7, 0x7c, 0x67, 0x10, 0x33, 0x67, 0x52, 0xdb, 0x67, 0xeb, 0x86, 0xd8, 0x96, 0xfb, 0x5b, 0x82, + 0xdb, 0x27, 0x16, 0x7e, 0xf9, 0x7f, 0x12, 0x79, 0x3a, 0x42, 0x64, 0x61, 0x32, 0x91, 0x63, 0x20, + 0xcd, 0x9b, 0xc5, 0xcf, 0x20, 0x35, 0x1c, 0x65, 0x56, 0x0a, 0x8b, 0xb0, 0xc2, 0x3f, 0x90, 0xb7, + 0xe0, 0x2e, 0x57, 0x80, 0xd5, 0xc0, 0xc9, 0xac, 0x38, 0xf6, 0x60, 0xcd, 0xc0, 0xb6, 0xdb, 0x99, + 0x47, 0x53, 0xb0, 0x73, 0xb1, 0x56, 0x74, 0x6d, 0xdb, 0xa2, 0xd3, 0x7b, 0x43, 0x20, 0x3b, 0xa6, + 0x1d, 0x50, 0xce, 0xc7, 0x41, 0x84, 0x58, 0xbf, 0x32, 0x5f, 0x8c, 0x9c, 0x8a, 0xe2, 0xe4, 0x53, + 0x31, 0x16, 0xd0, 0xbc, 0xcf, 0x45, 0x19, 0x6e, 0x1f, 0x52, 0x93, 0xce, 0x83, 0xc4, 0x7f, 0xa3, + 0x20, 0x97, 0x9d, 0x9a, 0xdb, 0x63, 0x44, 0x1a, 0x60, 0xa4, 0xdf, 0x2d, 0xd1, 0xa1, 0x6e, 0x79, + 0x04, 0x72, 0xc3, 0x72, 0xaa, 0x9c, 0xaa, 0xd5, 0xfc, 0x07, 0x93, 0x59, 0xd9, 0xb3, 0x9c, 0xaa, + 0xc1, 0x6d, 0x50, 0x11, 0xa0, 0xd2, 0xc2, 0x26, 0xc5, 0xd5, 0x17, 0x26, 0xcd, 0xc8, 0xaa, 0xb4, + 0x91, 0xc8, 0x2b, 0x9a, 0xaf, 0xc3, 0x5a, 0xa0, 0xc3, 0xda, 0x51, 0xa0, 0xc3, 0xdb, 0x8b, 0x57, + 0x7f, 0xac, 0x47, 0x7e, 0xf8, 0x73, 0x5d, 0x32, 0x96, 0x84, 0x5d, 0x81, 0x32, 0x27, 0x6d, 0xaf, + 0x1a, 0x38, 0xb9, 0x35, 0x8d, 0x13, 0x61, 0x57, 0xa0, 0x68, 0xb7, 0x57, 0xdd, 0x38, 0xaf, 0x6e, + 0x7e, 0x72, 0x1e, 0x8c, 0xa9, 0x79, 0x17, 0xf3, 0x19, 0xa4, 0x86, 0x8b, 0x29, 0x9a, 0xeb, 0x13, + 0x90, 0x2d, 0xa7, 0xe6, 0x72, 0x27, 0x89, 0x30, 0x24, 0x33, 0x70, 0xdb, 0x32, 0xcb, 0xd4, 0xe0, + 0x96, 0xb9, 0x9f, 0x25, 0x58, 0x3b, 0xe6, 0xe9, 0x4e, 0x7f, 0x52, 0x82, 0xe8, 0xd1, 0x59, 0xa3, + 0xa3, 0x2d, 0x48, 0xf8, 0x5c, 0xf3, 0x0b, 0x97, 0x9f, 0x95, 0x71, 0x45, 0xfa, 0x94, 0xdd, 0xc9, + 0xfb, 0x26, 0x69, 0x18, 0xa2, 0xa4, 0x6c, 0x9c, 0x7b, 0x0e, 0xe9, 0x51, 0xe4, 0x73, 0xa3, 0xc5, + 0x80, 0xd4, 0x63, 0x8b, 0xf4, 0x08, 0x9f, 0x42, 0x13, 0x33, 0xb0, 0x50, 0xb3, 0x9a, 0x14, 0xb7, + 0x48, 0x26, 0xaa, 0xc6, 0x36, 0x96, 0x8c, 0x60, 0x9a, 0x3b, 0x85, 0xb5, 0x11, 0x9f, 0x37, 0xe0, + 0xc6, 0x66, 0x84, 0xbb, 0x0d, 0xcb, 0xc7, 0xc4, 0xac, 0xe3, 0xb7, 0xe9, 0xf2, 0x2d, 0x58, 0x11, + 0x3e, 0x04, 0x2c, 0x04, 0x32, 0xb1, 0xbe, 0xf1, 0xbb, 0x3d, 0x66, 0xf0, 0x31, 0xeb, 0x76, 0xcb, + 0x71, 0xab, 0x98, 0x70, 0xcb, 0x98, 0x21, 0x66, 0xb9, 0x3c, 0xac, 0x16, 0x9b, 0xd8, 0x74, 0xda, + 0x5e, 0x68, 0x08, 0x1f, 0xbe, 0x92, 0x40, 0x66, 0x4d, 0x8f, 0xde, 0x87, 0x85, 0xe3, 0x83, 0xbd, + 0x83, 0x27, 0x4f, 0x0f, 0x92, 0x11, 0xe5, 0x9d, 0x8b, 0x4b, 0x35, 0xc1, 0x3e, 0x1f, 0x3b, 0x0d, + 0xc7, 0x7d, 0xe9, 0xa0, 0x34, 0xc8, 0x27, 0xe5, 0xd2, 0xd3, 0xa4, 0xa4, 0x2c, 0x5f, 0x5c, 0xaa, + 0x8b, 0x6c, 0x89, 0x5d, 0x78, 0x48, 0x81, 0x78, 0xa1, 0x78, 0x54, 0x3e, 0x29, 0x25, 0xa3, 0xca, + 0xea, 0xc5, 0xa5, 0x0a, 0x6c, 0xa5, 0x50, 0xa1, 0x56, 0x07, 0x23, 0x15, 0x96, 0x8a, 0x4f, 0xf6, + 0xf7, 0xcb, 0x47, 0x47, 0xa5, 0x9d, 0x64, 0x4c, 0x79, 0xf7, 0xe2, 0x52, 0x5d, 0x61, 0xcb, 0xbe, + 0xf2, 0x52, 0x5c, 0x55, 0x96, 0x5f, 0xfd, 0x98, 0x8d, 0xfc, 0xf2, 0x53, 0x96, 0x23, 0xc8, 0xff, + 0xb6, 0x08, 0x4b, 0xbd, 0xba, 0xa0, 0xef, 0x60, 0x41, 0x3c, 0x4c, 0xd0, 0xe6, 0xac, 0x8f, 0x25, + 0xe5, 0xe1, 0x0c, 0x96, 0x82, 0xf8, 0x36, 0xc8, 0x3c, 0xc3, 0x8f, 0x67, 0x7a, 0x60, 0x28, 0xf7, + 0xa7, 0x35, 0x13, 0x61, 0x1b, 0x10, 0xf7, 0xef, 0x6e, 0xa4, 0x4f, 0xf6, 0x30, 0xf4, 0x54, 0x50, + 0xee, 0x86, 0x37, 0x10, 0xc1, 0x4e, 0x21, 0xee, 0x17, 0x03, 0x3d, 0x98, 0xf1, 0xc2, 0x54, 0xd2, + 0x37, 0x74, 0xa2, 0xc4, 0x1e, 0xf6, 0xcc, 0xb5, 0xff, 0x80, 0x08, 0xe3, 0x7a, 0xec, 0x53, 0xe3, + 0x8d, 0xae, 0xdb, 0x20, 0x33, 0x1d, 0x0e, 0x53, 0x99, 0x31, 0x97, 0x6f, 0x98, 0xca, 0x8c, 0x95, + 0xf9, 0x6f, 0x21, 0xee, 0x2b, 0x5d, 0x98, 0x8c, 0xc6, 0xaa, 0xb9, 0xb2, 0x39, 0xbd, 0xa1, 0x08, + 0xde, 0x05, 0x99, 0xc9, 0x16, 0x0a, 0x01, 0x7e, 0x9c, 0x64, 0x2a, 0x0f, 0xa6, 0xb6, 0xf3, 0x03, + 0xdf, 0x95, 0xd0, 0x39, 0xdc, 0xe2, 0x92, 0x84, 0xb4, 0x10, 0xe8, 0x07, 0xf4, 0x4f, 0xd1, 0x43, + 0xef, 0x17, 0x49, 0x1e, 0xc2, 0x82, 0xd0, 0x2f, 0x14, 0xe2, 0x2c, 0x0f, 0x4b, 0xdd, 0x9b, 0x4e, + 0xcb, 0xf6, 0x57, 0x57, 0xaf, 0xb3, 0x91, 0xdf, 0x5f, 0x67, 0x23, 0xdf, 0x5f, 0x67, 0xa5, 0xab, + 0xeb, 0xac, 0xf4, 0xeb, 0x75, 0x56, 0xfa, 0xeb, 0x3a, 0x2b, 0x3d, 0xdf, 0x99, 0xfd, 0xb7, 0x78, + 0xab, 0x37, 0x79, 0x16, 0x39, 0x8b, 0xf3, 0x88, 0x1f, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0x20, + 0x9c, 0x85, 0x7f, 0x67, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -883,6 +940,7 @@ type SnapshotsClient interface { Update(ctx context.Context, in *UpdateSnapshotRequest, opts ...grpc.CallOption) (*UpdateSnapshotResponse, error) List(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (Snapshots_ListClient, error) Usage(ctx context.Context, in *UsageRequest, opts ...grpc.CallOption) (*UsageResponse, error) + Cleanup(ctx context.Context, in *CleanupRequest, opts ...grpc.CallOption) (*types1.Empty, error) } type snapshotsClient struct { @@ -997,6 +1055,15 @@ func (c *snapshotsClient) Usage(ctx context.Context, in *UsageRequest, opts ...g return out, nil } +func (c *snapshotsClient) Cleanup(ctx context.Context, in *CleanupRequest, opts ...grpc.CallOption) (*types1.Empty, error) { + out := new(types1.Empty) + err := c.cc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Cleanup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SnapshotsServer is the server API for Snapshots service. type SnapshotsServer interface { Prepare(context.Context, *PrepareSnapshotRequest) (*PrepareSnapshotResponse, error) @@ -1008,6 +1075,42 @@ type SnapshotsServer interface { Update(context.Context, *UpdateSnapshotRequest) (*UpdateSnapshotResponse, error) List(*ListSnapshotsRequest, Snapshots_ListServer) error Usage(context.Context, *UsageRequest) (*UsageResponse, error) + Cleanup(context.Context, *CleanupRequest) (*types1.Empty, error) +} + +// UnimplementedSnapshotsServer can be embedded to have forward compatible implementations. +type UnimplementedSnapshotsServer struct { +} + +func (*UnimplementedSnapshotsServer) Prepare(ctx context.Context, req *PrepareSnapshotRequest) (*PrepareSnapshotResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Prepare not implemented") +} +func (*UnimplementedSnapshotsServer) View(ctx context.Context, req *ViewSnapshotRequest) (*ViewSnapshotResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method View not implemented") +} +func (*UnimplementedSnapshotsServer) Mounts(ctx context.Context, req *MountsRequest) (*MountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Mounts not implemented") +} +func (*UnimplementedSnapshotsServer) Commit(ctx context.Context, req *CommitSnapshotRequest) (*types1.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Commit not implemented") +} +func (*UnimplementedSnapshotsServer) Remove(ctx context.Context, req *RemoveSnapshotRequest) (*types1.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Remove not implemented") +} +func (*UnimplementedSnapshotsServer) Stat(ctx context.Context, req *StatSnapshotRequest) (*StatSnapshotResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stat not implemented") +} +func (*UnimplementedSnapshotsServer) Update(ctx context.Context, req *UpdateSnapshotRequest) (*UpdateSnapshotResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (*UnimplementedSnapshotsServer) List(req *ListSnapshotsRequest, srv Snapshots_ListServer) error { + return status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedSnapshotsServer) Usage(ctx context.Context, req *UsageRequest) (*UsageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Usage not implemented") +} +func (*UnimplementedSnapshotsServer) Cleanup(ctx context.Context, req *CleanupRequest) (*types1.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Cleanup not implemented") } func RegisterSnapshotsServer(s *grpc.Server, srv SnapshotsServer) { @@ -1179,6 +1282,24 @@ func _Snapshots_Usage_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Snapshots_Cleanup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CleanupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SnapshotsServer).Cleanup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/containerd.services.snapshots.v1.Snapshots/Cleanup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SnapshotsServer).Cleanup(ctx, req.(*CleanupRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Snapshots_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.snapshots.v1.Snapshots", HandlerType: (*SnapshotsServer)(nil), @@ -1215,6 +1336,10 @@ var _Snapshots_serviceDesc = grpc.ServiceDesc{ MethodName: "Usage", Handler: _Snapshots_Usage_Handler, }, + { + MethodName: "Cleanup", + Handler: _Snapshots_Cleanup_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -1229,7 +1354,7 @@ var _Snapshots_serviceDesc = grpc.ServiceDesc{ func (m *PrepareSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1237,55 +1362,66 @@ func (m *PrepareSnapshotRequest) Marshal() (dAtA []byte, err error) { } func (m *PrepareSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PrepareSnapshotRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Snapshotter) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) - i += copy(dAtA[i:], m.Snapshotter) - } - if len(m.Key) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if len(m.Parent) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Parent))) - i += copy(dAtA[i:], m.Parent) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x22 - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) - i = encodeVarintSnapshots(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintSnapshots(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSnapshots(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x22 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Parent) > 0 { + i -= len(m.Parent) + copy(dAtA[i:], m.Parent) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Parent))) + i-- + dAtA[i] = 0x1a } - return i, nil + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 + } + if len(m.Snapshotter) > 0 { + i -= len(m.Snapshotter) + copy(dAtA[i:], m.Snapshotter) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *PrepareSnapshotResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1293,32 +1429,40 @@ func (m *PrepareSnapshotResponse) Marshal() (dAtA []byte, err error) { } func (m *PrepareSnapshotResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PrepareSnapshotResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Mounts) > 0 { - for _, msg := range m.Mounts { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Mounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshots(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ViewSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1326,55 +1470,66 @@ func (m *ViewSnapshotRequest) Marshal() (dAtA []byte, err error) { } func (m *ViewSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ViewSnapshotRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Snapshotter) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) - i += copy(dAtA[i:], m.Snapshotter) - } - if len(m.Key) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if len(m.Parent) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Parent))) - i += copy(dAtA[i:], m.Parent) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x22 - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) - i = encodeVarintSnapshots(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintSnapshots(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSnapshots(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x22 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Parent) > 0 { + i -= len(m.Parent) + copy(dAtA[i:], m.Parent) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Parent))) + i-- + dAtA[i] = 0x1a } - return i, nil + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 + } + if len(m.Snapshotter) > 0 { + i -= len(m.Snapshotter) + copy(dAtA[i:], m.Snapshotter) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ViewSnapshotResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1382,32 +1537,40 @@ func (m *ViewSnapshotResponse) Marshal() (dAtA []byte, err error) { } func (m *ViewSnapshotResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ViewSnapshotResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Mounts) > 0 { - for _, msg := range m.Mounts { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Mounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshots(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *MountsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1415,32 +1578,40 @@ func (m *MountsRequest) Marshal() (dAtA []byte, err error) { } func (m *MountsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Snapshotter) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) - i += copy(dAtA[i:], m.Snapshotter) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Key) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Key) + copy(dAtA[i:], m.Key) i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Snapshotter) > 0 { + i -= len(m.Snapshotter) + copy(dAtA[i:], m.Snapshotter) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *MountsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1448,32 +1619,40 @@ func (m *MountsResponse) Marshal() (dAtA []byte, err error) { } func (m *MountsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Mounts) > 0 { - for _, msg := range m.Mounts { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Mounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshots(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *RemoveSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1481,32 +1660,40 @@ func (m *RemoveSnapshotRequest) Marshal() (dAtA []byte, err error) { } func (m *RemoveSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemoveSnapshotRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Snapshotter) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) - i += copy(dAtA[i:], m.Snapshotter) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Key) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Key) + copy(dAtA[i:], m.Key) i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Snapshotter) > 0 { + i -= len(m.Snapshotter) + copy(dAtA[i:], m.Snapshotter) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *CommitSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1514,55 +1701,66 @@ func (m *CommitSnapshotRequest) Marshal() (dAtA []byte, err error) { } func (m *CommitSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitSnapshotRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Snapshotter) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) - i += copy(dAtA[i:], m.Snapshotter) - } - if len(m.Name) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.Key) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x22 - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) - i = encodeVarintSnapshots(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintSnapshots(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSnapshots(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x22 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x1a } - return i, nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Snapshotter) > 0 { + i -= len(m.Snapshotter) + copy(dAtA[i:], m.Snapshotter) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *StatSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1570,32 +1768,40 @@ func (m *StatSnapshotRequest) Marshal() (dAtA []byte, err error) { } func (m *StatSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StatSnapshotRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Snapshotter) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) - i += copy(dAtA[i:], m.Snapshotter) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Key) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Key) + copy(dAtA[i:], m.Key) i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Snapshotter) > 0 { + i -= len(m.Snapshotter) + copy(dAtA[i:], m.Snapshotter) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Info) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1603,70 +1809,80 @@ func (m *Info) Marshal() (dAtA []byte, err error) { } func (m *Info) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Info) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Parent) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Parent))) - i += copy(dAtA[i:], m.Parent) - } - if m.Kind != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(m.Kind)) - } - dAtA[i] = 0x22 - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) - n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - dAtA[i] = 0x2a - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) - n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 if len(m.Labels) > 0 { - for k, _ := range m.Labels { - dAtA[i] = 0x32 - i++ + for k := range m.Labels { v := m.Labels[k] - mapSize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) - i = encodeVarintSnapshots(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintSnapshots(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintSnapshots(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt):]) + if err1 != nil { + return 0, err1 } - return i, nil + i -= n1 + i = encodeVarintSnapshots(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x2a + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintSnapshots(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x22 + if m.Kind != 0 { + i = encodeVarintSnapshots(dAtA, i, uint64(m.Kind)) + i-- + dAtA[i] = 0x18 + } + if len(m.Parent) > 0 { + i -= len(m.Parent) + copy(dAtA[i:], m.Parent) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Parent))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *StatSnapshotResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1674,28 +1890,36 @@ func (m *StatSnapshotResponse) Marshal() (dAtA []byte, err error) { } func (m *StatSnapshotResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StatSnapshotResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(m.Info.Size())) - n3, err := m.Info.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshots(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *UpdateSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1703,44 +1927,55 @@ func (m *UpdateSnapshotRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateSnapshotRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Snapshotter) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) - i += copy(dAtA[i:], m.Snapshotter) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - dAtA[i] = 0x12 - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(m.Info.Size())) - n4, err := m.Info.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 if m.UpdateMask != nil { + { + size, err := m.UpdateMask.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshots(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(m.UpdateMask.Size())) - n5, err := m.UpdateMask.MarshalTo(dAtA[i:]) + } + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n5 + i -= size + i = encodeVarintSnapshots(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i-- + dAtA[i] = 0x12 + if len(m.Snapshotter) > 0 { + i -= len(m.Snapshotter) + copy(dAtA[i:], m.Snapshotter) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *UpdateSnapshotResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1748,28 +1983,36 @@ func (m *UpdateSnapshotResponse) Marshal() (dAtA []byte, err error) { } func (m *UpdateSnapshotResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateSnapshotResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(m.Info.Size())) - n6, err := m.Info.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshots(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *ListSnapshotsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1777,26 +2020,42 @@ func (m *ListSnapshotsRequest) Marshal() (dAtA []byte, err error) { } func (m *ListSnapshotsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListSnapshotsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Snapshotter) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) - i += copy(dAtA[i:], m.Snapshotter) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Filters) > 0 { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Filters[iNdEx]) + copy(dAtA[i:], m.Filters[iNdEx]) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Filters[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Snapshotter) > 0 { + i -= len(m.Snapshotter) + copy(dAtA[i:], m.Snapshotter) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ListSnapshotsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1804,32 +2063,40 @@ func (m *ListSnapshotsResponse) Marshal() (dAtA []byte, err error) { } func (m *ListSnapshotsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListSnapshotsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Info) > 0 { - for _, msg := range m.Info { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Info) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Info[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshots(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *UsageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1837,32 +2104,40 @@ func (m *UsageRequest) Marshal() (dAtA []byte, err error) { } func (m *UsageRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UsageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Snapshotter) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) - i += copy(dAtA[i:], m.Snapshotter) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Key) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Key) + copy(dAtA[i:], m.Key) i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Snapshotter) > 0 { + i -= len(m.Snapshotter) + copy(dAtA[i:], m.Snapshotter) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *UsageResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1870,34 +2145,76 @@ func (m *UsageResponse) Marshal() (dAtA []byte, err error) { } func (m *UsageResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UsageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Size_ != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintSnapshots(dAtA, i, uint64(m.Size_)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Inodes != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintSnapshots(dAtA, i, uint64(m.Inodes)) + i-- + dAtA[i] = 0x10 } + if m.Size_ != 0 { + i = encodeVarintSnapshots(dAtA, i, uint64(m.Size_)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *CleanupRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CleanupRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CleanupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Snapshotter) > 0 { + i -= len(m.Snapshotter) + copy(dAtA[i:], m.Snapshotter) + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintSnapshots(dAtA []byte, offset int, v uint64) int { + offset -= sovSnapshots(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *PrepareSnapshotRequest) Size() (n int) { if m == nil { @@ -2204,6 +2521,12 @@ func (m *ListSnapshotsRequest) Size() (n int) { if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } + if len(m.Filters) > 0 { + for _, s := range m.Filters { + l = len(s) + n += 1 + l + sovSnapshots(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -2266,16 +2589,25 @@ func (m *UsageResponse) Size() (n int) { return n } -func sovSnapshots(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } +func (m *CleanupRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Snapshotter) + if l > 0 { + n += 1 + l + sovSnapshots(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } return n } + +func sovSnapshots(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} func sozSnapshots(x uint64) (n int) { return sovSnapshots(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } @@ -2307,8 +2639,13 @@ func (this *PrepareSnapshotResponse) String() string { if this == nil { return "nil" } + repeatedStringForMounts := "[]*Mount{" + for _, f := range this.Mounts { + repeatedStringForMounts += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + "," + } + repeatedStringForMounts += "}" s := strings.Join([]string{`&PrepareSnapshotResponse{`, - `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "types.Mount", 1) + `,`, + `Mounts:` + repeatedStringForMounts + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2342,8 +2679,13 @@ func (this *ViewSnapshotResponse) String() string { if this == nil { return "nil" } + repeatedStringForMounts := "[]*Mount{" + for _, f := range this.Mounts { + repeatedStringForMounts += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + "," + } + repeatedStringForMounts += "}" s := strings.Join([]string{`&ViewSnapshotResponse{`, - `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "types.Mount", 1) + `,`, + `Mounts:` + repeatedStringForMounts + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2365,8 +2707,13 @@ func (this *MountsResponse) String() string { if this == nil { return "nil" } + repeatedStringForMounts := "[]*Mount{" + for _, f := range this.Mounts { + repeatedStringForMounts += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + "," + } + repeatedStringForMounts += "}" s := strings.Join([]string{`&MountsResponse{`, - `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "types.Mount", 1) + `,`, + `Mounts:` + repeatedStringForMounts + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2438,8 +2785,8 @@ func (this *Info) String() string { `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Parent:` + fmt.Sprintf("%v", this.Parent) + `,`, `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, - `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `CreatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CreatedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `UpdatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.UpdatedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `Labels:` + mapStringForLabels + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -2487,6 +2834,7 @@ func (this *ListSnapshotsRequest) String() string { } s := strings.Join([]string{`&ListSnapshotsRequest{`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, + `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2496,8 +2844,13 @@ func (this *ListSnapshotsResponse) String() string { if this == nil { return "nil" } + repeatedStringForInfo := "[]Info{" + for _, f := range this.Info { + repeatedStringForInfo += strings.Replace(strings.Replace(f.String(), "Info", "Info", 1), `&`, ``, 1) + "," + } + repeatedStringForInfo += "}" s := strings.Join([]string{`&ListSnapshotsResponse{`, - `Info:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Info), "Info", "Info", 1), `&`, ``, 1) + `,`, + `Info:` + repeatedStringForInfo + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2527,6 +2880,17 @@ func (this *UsageResponse) String() string { }, "") return s } +func (this *CleanupRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CleanupRequest{`, + `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} func valueToStringSnapshots(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -4704,6 +5068,38 @@ func (m *ListSnapshotsRequest) Unmarshal(dAtA []byte) error { } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshots + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSnapshots + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSnapshots + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) @@ -5027,9 +5423,96 @@ func (m *UsageResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *CleanupRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshots + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CleanupRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CleanupRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshots + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSnapshots + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSnapshots + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Snapshotter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshots(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSnapshots + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthSnapshots + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipSnapshots(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -5061,10 +5544,8 @@ func skipSnapshots(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -5085,55 +5566,30 @@ func skipSnapshots(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthSnapshots } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthSnapshots - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshots - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipSnapshots(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthSnapshots - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSnapshots + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthSnapshots + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthSnapshots = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSnapshots = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthSnapshots = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSnapshots = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSnapshots = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto b/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto index 0e62add3bf0..981d8a6bac7 100644 --- a/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto +++ b/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto @@ -21,6 +21,7 @@ service Snapshots { rpc Update(UpdateSnapshotRequest) returns (UpdateSnapshotResponse); rpc List(ListSnapshotsRequest) returns (stream ListSnapshotsResponse); rpc Usage(UsageRequest) returns (UsageResponse); + rpc Cleanup(CleanupRequest) returns (google.protobuf.Empty); } message PrepareSnapshotRequest { @@ -133,6 +134,18 @@ message UpdateSnapshotResponse { message ListSnapshotsRequest{ string snapshotter = 1; + + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, images that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 2; } message ListSnapshotsResponse { @@ -148,3 +161,7 @@ message UsageResponse { int64 size = 1; int64 inodes = 2; } + +message CleanupRequest { + string snapshotter = 1; +} diff --git a/vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.pb.go b/vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.pb.go index cadaf745f19..5ac5af11b92 100644 --- a/vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.pb.go @@ -13,8 +13,11 @@ import ( types1 "github.com/gogo/protobuf/types" github_com_opencontainers_go_digest "github.com/opencontainers/go-digest" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -30,7 +33,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type CreateTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` @@ -65,7 +68,7 @@ func (m *CreateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_CreateTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -105,7 +108,7 @@ func (m *CreateTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_CreateTaskResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -145,7 +148,7 @@ func (m *StartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_StartRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -184,7 +187,7 @@ func (m *StartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_StartResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -223,7 +226,7 @@ func (m *DeleteTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_DeleteTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -265,7 +268,7 @@ func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -305,7 +308,7 @@ func (m *DeleteProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_DeleteProcessRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -345,7 +348,7 @@ func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -384,7 +387,7 @@ func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -423,7 +426,7 @@ func (m *ListTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_ListTasksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -462,7 +465,7 @@ func (m *ListTasksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_ListTasksResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -504,7 +507,7 @@ func (m *KillRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_KillRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -553,7 +556,7 @@ func (m *ExecProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ExecProcessRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -591,7 +594,7 @@ func (m *ExecProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ExecProcessResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -633,7 +636,7 @@ func (m *ResizePtyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_ResizePtyRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -674,7 +677,7 @@ func (m *CloseIORequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_CloseIORequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -713,7 +716,7 @@ func (m *PauseTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_PauseTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -752,7 +755,7 @@ func (m *ResumeTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_ResumeTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -791,7 +794,7 @@ func (m *ListPidsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_ListPidsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -831,7 +834,7 @@ func (m *ListPidsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_ListPidsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -872,7 +875,7 @@ func (m *CheckpointTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_CheckpointTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -911,7 +914,7 @@ func (m *CheckpointTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return xxx_messageInfo_CheckpointTaskResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -951,7 +954,7 @@ func (m *UpdateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_UpdateTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -990,7 +993,7 @@ func (m *MetricsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_MetricsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1029,7 +1032,7 @@ func (m *MetricsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_MetricsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1069,7 +1072,7 @@ func (m *WaitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_WaitRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1109,7 +1112,7 @@ func (m *WaitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_WaitResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1470,6 +1473,62 @@ type TasksServer interface { Wait(context.Context, *WaitRequest) (*WaitResponse, error) } +// UnimplementedTasksServer can be embedded to have forward compatible implementations. +type UnimplementedTasksServer struct { +} + +func (*UnimplementedTasksServer) Create(ctx context.Context, req *CreateTaskRequest) (*CreateTaskResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (*UnimplementedTasksServer) Start(ctx context.Context, req *StartRequest) (*StartResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Start not implemented") +} +func (*UnimplementedTasksServer) Delete(ctx context.Context, req *DeleteTaskRequest) (*DeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (*UnimplementedTasksServer) DeleteProcess(ctx context.Context, req *DeleteProcessRequest) (*DeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteProcess not implemented") +} +func (*UnimplementedTasksServer) Get(ctx context.Context, req *GetRequest) (*GetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (*UnimplementedTasksServer) List(ctx context.Context, req *ListTasksRequest) (*ListTasksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedTasksServer) Kill(ctx context.Context, req *KillRequest) (*types1.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Kill not implemented") +} +func (*UnimplementedTasksServer) Exec(ctx context.Context, req *ExecProcessRequest) (*types1.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented") +} +func (*UnimplementedTasksServer) ResizePty(ctx context.Context, req *ResizePtyRequest) (*types1.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResizePty not implemented") +} +func (*UnimplementedTasksServer) CloseIO(ctx context.Context, req *CloseIORequest) (*types1.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseIO not implemented") +} +func (*UnimplementedTasksServer) Pause(ctx context.Context, req *PauseTaskRequest) (*types1.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Pause not implemented") +} +func (*UnimplementedTasksServer) Resume(ctx context.Context, req *ResumeTaskRequest) (*types1.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Resume not implemented") +} +func (*UnimplementedTasksServer) ListPids(ctx context.Context, req *ListPidsRequest) (*ListPidsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPids not implemented") +} +func (*UnimplementedTasksServer) Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*CheckpointTaskResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Checkpoint not implemented") +} +func (*UnimplementedTasksServer) Update(ctx context.Context, req *UpdateTaskRequest) (*types1.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (*UnimplementedTasksServer) Metrics(ctx context.Context, req *MetricsRequest) (*MetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Metrics not implemented") +} +func (*UnimplementedTasksServer) Wait(ctx context.Context, req *WaitRequest) (*WaitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Wait not implemented") +} + func RegisterTasksServer(s *grpc.Server, srv TasksServer) { s.RegisterService(&_Tasks_serviceDesc, srv) } @@ -1860,7 +1919,7 @@ var _Tasks_serviceDesc = grpc.ServiceDesc{ func (m *CreateTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1868,86 +1927,102 @@ func (m *CreateTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *CreateTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Rootfs) > 0 { - for _, msg := range m.Rootfs { - dAtA[i] = 0x1a - i++ - i = encodeVarintTasks(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.Options != nil { + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintTasks(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x4a } - if len(m.Stdin) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdin))) - i += copy(dAtA[i:], m.Stdin) - } - if len(m.Stdout) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdout))) - i += copy(dAtA[i:], m.Stdout) - } - if len(m.Stderr) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.Stderr))) - i += copy(dAtA[i:], m.Stderr) + if m.Checkpoint != nil { + { + size, err := m.Checkpoint.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTasks(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 } if m.Terminal { - dAtA[i] = 0x38 - i++ + i-- if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x38 } - if m.Checkpoint != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintTasks(dAtA, i, uint64(m.Checkpoint.Size())) - n1, err := m.Checkpoint.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Stderr) > 0 { + i -= len(m.Stderr) + copy(dAtA[i:], m.Stderr) + i = encodeVarintTasks(dAtA, i, uint64(len(m.Stderr))) + i-- + dAtA[i] = 0x32 + } + if len(m.Stdout) > 0 { + i -= len(m.Stdout) + copy(dAtA[i:], m.Stdout) + i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdout))) + i-- + dAtA[i] = 0x2a + } + if len(m.Stdin) > 0 { + i -= len(m.Stdin) + copy(dAtA[i:], m.Stdin) + i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdin))) + i-- + dAtA[i] = 0x22 + } + if len(m.Rootfs) > 0 { + for iNdEx := len(m.Rootfs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rootfs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTasks(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - i += n1 } - if m.Options != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintTasks(dAtA, i, uint64(m.Options.Size())) - n2, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *CreateTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1955,31 +2030,38 @@ func (m *CreateTaskResponse) Marshal() (dAtA []byte, err error) { } func (m *CreateTaskResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateTaskResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Pid != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintTasks(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *StartRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1987,32 +2069,40 @@ func (m *StartRequest) Marshal() (dAtA []byte, err error) { } func (m *StartRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StartRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *StartResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2020,25 +2110,31 @@ func (m *StartResponse) Marshal() (dAtA []byte, err error) { } func (m *StartResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StartResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Pid != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintTasks(dAtA, i, uint64(m.Pid)) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Pid != 0 { + i = encodeVarintTasks(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *DeleteTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2046,26 +2142,33 @@ func (m *DeleteTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *DeleteTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *DeleteResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2073,44 +2176,51 @@ func (m *DeleteResponse) Marshal() (dAtA []byte, err error) { } func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintTasks(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x22 + if m.ExitStatus != 0 { + i = encodeVarintTasks(dAtA, i, uint64(m.ExitStatus)) + i-- + dAtA[i] = 0x18 } if m.Pid != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintTasks(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x10 } - if m.ExitStatus != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintTasks(dAtA, i, uint64(m.ExitStatus)) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - dAtA[i] = 0x22 - i++ - i = encodeVarintTasks(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) - n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *DeleteProcessRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2118,32 +2228,40 @@ func (m *DeleteProcessRequest) Marshal() (dAtA []byte, err error) { } func (m *DeleteProcessRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteProcessRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *GetRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2151,32 +2269,40 @@ func (m *GetRequest) Marshal() (dAtA []byte, err error) { } func (m *GetRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *GetResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2184,30 +2310,38 @@ func (m *GetResponse) Marshal() (dAtA []byte, err error) { } func (m *GetResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Process != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(m.Process.Size())) - n4, err := m.Process.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Process != nil { + { + size, err := m.Process.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTasks(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ListTasksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2215,26 +2349,33 @@ func (m *ListTasksRequest) Marshal() (dAtA []byte, err error) { } func (m *ListTasksRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListTasksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Filter) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.Filter))) - i += copy(dAtA[i:], m.Filter) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.Filter) > 0 { + i -= len(m.Filter) + copy(dAtA[i:], m.Filter) + i = encodeVarintTasks(dAtA, i, uint64(len(m.Filter))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ListTasksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2242,32 +2383,40 @@ func (m *ListTasksResponse) Marshal() (dAtA []byte, err error) { } func (m *ListTasksResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListTasksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Tasks) > 0 { - for _, msg := range m.Tasks { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Tasks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Tasks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTasks(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *KillRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2275,47 +2424,55 @@ func (m *KillRequest) Marshal() (dAtA []byte, err error) { } func (m *KillRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KillRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } - if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) - } - if m.Signal != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintTasks(dAtA, i, uint64(m.Signal)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.All { - dAtA[i] = 0x20 - i++ + i-- if m.All { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Signal != 0 { + i = encodeVarintTasks(dAtA, i, uint64(m.Signal)) + i-- + dAtA[i] = 0x18 } - return i, nil + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ExecProcessRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2323,70 +2480,83 @@ func (m *ExecProcessRequest) Marshal() (dAtA []byte, err error) { } func (m *ExecProcessRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecProcessRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Stdin) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdin))) - i += copy(dAtA[i:], m.Stdin) + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0x3a } - if len(m.Stdout) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdout))) - i += copy(dAtA[i:], m.Stdout) - } - if len(m.Stderr) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.Stderr))) - i += copy(dAtA[i:], m.Stderr) + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTasks(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 } if m.Terminal { - dAtA[i] = 0x28 - i++ + i-- if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x28 } - if m.Spec != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintTasks(dAtA, i, uint64(m.Spec.Size())) - n5, err := m.Spec.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 + if len(m.Stderr) > 0 { + i -= len(m.Stderr) + copy(dAtA[i:], m.Stderr) + i = encodeVarintTasks(dAtA, i, uint64(len(m.Stderr))) + i-- + dAtA[i] = 0x22 } - if len(m.ExecID) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + if len(m.Stdout) > 0 { + i -= len(m.Stdout) + copy(dAtA[i:], m.Stdout) + i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdout))) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Stdin) > 0 { + i -= len(m.Stdin) + copy(dAtA[i:], m.Stdin) + i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdin))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ExecProcessResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2394,20 +2564,26 @@ func (m *ExecProcessResponse) Marshal() (dAtA []byte, err error) { } func (m *ExecProcessResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecProcessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + return len(dAtA) - i, nil } func (m *ResizePtyRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2415,42 +2591,50 @@ func (m *ResizePtyRequest) Marshal() (dAtA []byte, err error) { } func (m *ResizePtyRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResizePtyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } - if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) - } - if m.Width != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintTasks(dAtA, i, uint64(m.Width)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Height != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintTasks(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x20 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Width != 0 { + i = encodeVarintTasks(dAtA, i, uint64(m.Width)) + i-- + dAtA[i] = 0x18 } - return i, nil + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CloseIORequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2458,42 +2642,50 @@ func (m *CloseIORequest) Marshal() (dAtA []byte, err error) { } func (m *CloseIORequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CloseIORequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } - if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Stdin { - dAtA[i] = 0x18 - i++ + i-- if m.Stdin { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *PauseTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2501,26 +2693,33 @@ func (m *PauseTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *PauseTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PauseTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ResumeTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2528,26 +2727,33 @@ func (m *ResumeTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *ResumeTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResumeTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ListPidsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2555,26 +2761,33 @@ func (m *ListPidsRequest) Marshal() (dAtA []byte, err error) { } func (m *ListPidsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListPidsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ListPidsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2582,32 +2795,40 @@ func (m *ListPidsResponse) Marshal() (dAtA []byte, err error) { } func (m *ListPidsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListPidsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Processes) > 0 { - for _, msg := range m.Processes { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Processes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Processes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTasks(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *CheckpointTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2615,42 +2836,52 @@ func (m *CheckpointTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *CheckpointTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CheckpointTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) - } - if len(m.ParentCheckpoint) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ParentCheckpoint))) - i += copy(dAtA[i:], m.ParentCheckpoint) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Options != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintTasks(dAtA, i, uint64(m.Options.Size())) - n6, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTasks(dAtA, i, uint64(size)) } - i += n6 + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ParentCheckpoint) > 0 { + i -= len(m.ParentCheckpoint) + copy(dAtA[i:], m.ParentCheckpoint) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ParentCheckpoint))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CheckpointTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2658,32 +2889,40 @@ func (m *CheckpointTaskResponse) Marshal() (dAtA []byte, err error) { } func (m *CheckpointTaskResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CheckpointTaskResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Descriptors) > 0 { - for _, msg := range m.Descriptors { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Descriptors) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Descriptors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTasks(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *UpdateTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2691,36 +2930,45 @@ func (m *UpdateTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Resources != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTasks(dAtA, i, uint64(m.Resources.Size())) - n7, err := m.Resources.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTasks(dAtA, i, uint64(size)) } - i += n7 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *MetricsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2728,35 +2976,35 @@ func (m *MetricsRequest) Marshal() (dAtA []byte, err error) { } func (m *MetricsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MetricsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Filters) > 0 { - for _, s := range m.Filters { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Filters[iNdEx]) + copy(dAtA[i:], m.Filters[iNdEx]) + i = encodeVarintTasks(dAtA, i, uint64(len(m.Filters[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *MetricsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2764,32 +3012,40 @@ func (m *MetricsResponse) Marshal() (dAtA []byte, err error) { } func (m *MetricsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MetricsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Metrics) > 0 { - for _, msg := range m.Metrics { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Metrics) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Metrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTasks(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *WaitRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2797,32 +3053,40 @@ func (m *WaitRequest) Marshal() (dAtA []byte, err error) { } func (m *WaitRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WaitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *WaitResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2830,37 +3094,45 @@ func (m *WaitResponse) Marshal() (dAtA []byte, err error) { } func (m *WaitResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WaitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ExitStatus != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintTasks(dAtA, i, uint64(m.ExitStatus)) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintTasks(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) - n8, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt):]) + if err8 != nil { + return 0, err8 + } + i -= n8 + i = encodeVarintTasks(dAtA, i, uint64(n8)) + i-- + dAtA[i] = 0x12 + if m.ExitStatus != 0 { + i = encodeVarintTasks(dAtA, i, uint64(m.ExitStatus)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func encodeVarintTasks(dAtA []byte, offset int, v uint64) int { + offset -= sovTasks(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *CreateTaskRequest) Size() (n int) { if m == nil { @@ -3419,14 +3691,7 @@ func (m *WaitResponse) Size() (n int) { } func sovTasks(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTasks(x uint64) (n int) { return sovTasks(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -3435,9 +3700,14 @@ func (this *CreateTaskRequest) String() string { if this == nil { return "nil" } + repeatedStringForRootfs := "[]*Mount{" + for _, f := range this.Rootfs { + repeatedStringForRootfs += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + "," + } + repeatedStringForRootfs += "}" s := strings.Join([]string{`&CreateTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, - `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "types.Mount", 1) + `,`, + `Rootfs:` + repeatedStringForRootfs + `,`, `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, @@ -3503,7 +3773,7 @@ func (this *DeleteResponse) String() string { `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, - `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `ExitedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExitedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3559,8 +3829,13 @@ func (this *ListTasksResponse) String() string { if this == nil { return "nil" } + repeatedStringForTasks := "[]*Process{" + for _, f := range this.Tasks { + repeatedStringForTasks += strings.Replace(fmt.Sprintf("%v", f), "Process", "task.Process", 1) + "," + } + repeatedStringForTasks += "}" s := strings.Join([]string{`&ListTasksResponse{`, - `Tasks:` + strings.Replace(fmt.Sprintf("%v", this.Tasks), "Process", "task.Process", 1) + `,`, + `Tasks:` + repeatedStringForTasks + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3671,8 +3946,13 @@ func (this *ListPidsResponse) String() string { if this == nil { return "nil" } + repeatedStringForProcesses := "[]*ProcessInfo{" + for _, f := range this.Processes { + repeatedStringForProcesses += strings.Replace(fmt.Sprintf("%v", f), "ProcessInfo", "task.ProcessInfo", 1) + "," + } + repeatedStringForProcesses += "}" s := strings.Join([]string{`&ListPidsResponse{`, - `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "ProcessInfo", "task.ProcessInfo", 1) + `,`, + `Processes:` + repeatedStringForProcesses + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3695,8 +3975,13 @@ func (this *CheckpointTaskResponse) String() string { if this == nil { return "nil" } + repeatedStringForDescriptors := "[]*Descriptor{" + for _, f := range this.Descriptors { + repeatedStringForDescriptors += strings.Replace(fmt.Sprintf("%v", f), "Descriptor", "types.Descriptor", 1) + "," + } + repeatedStringForDescriptors += "}" s := strings.Join([]string{`&CheckpointTaskResponse{`, - `Descriptors:` + strings.Replace(fmt.Sprintf("%v", this.Descriptors), "Descriptor", "types.Descriptor", 1) + `,`, + `Descriptors:` + repeatedStringForDescriptors + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3729,8 +4014,13 @@ func (this *MetricsResponse) String() string { if this == nil { return "nil" } + repeatedStringForMetrics := "[]*Metric{" + for _, f := range this.Metrics { + repeatedStringForMetrics += strings.Replace(fmt.Sprintf("%v", f), "Metric", "types.Metric", 1) + "," + } + repeatedStringForMetrics += "}" s := strings.Join([]string{`&MetricsResponse{`, - `Metrics:` + strings.Replace(fmt.Sprintf("%v", this.Metrics), "Metric", "types.Metric", 1) + `,`, + `Metrics:` + repeatedStringForMetrics + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3754,7 +4044,7 @@ func (this *WaitResponse) String() string { } s := strings.Join([]string{`&WaitResponse{`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, - `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `ExitedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExitedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -7001,6 +7291,7 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error { func skipTasks(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -7032,10 +7323,8 @@ func skipTasks(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -7056,55 +7345,30 @@ func skipTasks(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthTasks } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthTasks - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTasks - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTasks(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthTasks - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTasks + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthTasks + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthTasks = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTasks = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthTasks = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTasks = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTasks = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.pb.go b/vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.pb.go index 4bd5828a4bb..0e61351d5fe 100644 --- a/vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.pb.go @@ -13,6 +13,7 @@ import ( types "github.com/gogo/protobuf/types" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -28,7 +29,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ForwardRequest struct { Envelope *Envelope `protobuf:"bytes,1,opt,name=envelope,proto3" json:"envelope,omitempty"` @@ -50,7 +51,7 @@ func (m *ForwardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_ForwardRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -92,7 +93,7 @@ func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Envelope.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -179,7 +180,7 @@ func (m *Envelope) Field(fieldpath []string) (string, bool) { func (m *ForwardRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -187,30 +188,38 @@ func (m *ForwardRequest) Marshal() (dAtA []byte, err error) { } func (m *ForwardRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ForwardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Envelope != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintEvents(dAtA, i, uint64(m.Envelope.Size())) - n1, err := m.Envelope.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Envelope != nil { + { + size, err := m.Envelope.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *Envelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -218,54 +227,66 @@ func (m *Envelope) Marshal() (dAtA []byte, err error) { } func (m *Envelope) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Envelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintEvents(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) - n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - if len(m.Namespace) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) - i += copy(dAtA[i:], m.Namespace) - } - if len(m.Topic) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintEvents(dAtA, i, uint64(len(m.Topic))) - i += copy(dAtA[i:], m.Topic) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Event != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintEvents(dAtA, i, uint64(m.Event.Size())) - n3, err := m.Event.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) } - i += n3 + i-- + dAtA[i] = 0x22 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Topic) > 0 { + i -= len(m.Topic) + copy(dAtA[i:], m.Topic) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Topic))) + i-- + dAtA[i] = 0x1a } - return i, nil + if len(m.Namespace) > 0 { + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + } + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintEvents(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *ForwardRequest) Size() (n int) { if m == nil { @@ -310,14 +331,7 @@ func (m *Envelope) Size() (n int) { } func sovEvents(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozEvents(x uint64) (n int) { return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -327,7 +341,7 @@ func (this *ForwardRequest) String() string { return "nil" } s := strings.Join([]string{`&ForwardRequest{`, - `Envelope:` + strings.Replace(fmt.Sprintf("%v", this.Envelope), "Envelope", "Envelope", 1) + `,`, + `Envelope:` + strings.Replace(this.Envelope.String(), "Envelope", "Envelope", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -338,7 +352,7 @@ func (this *Envelope) String() string { return "nil" } s := strings.Join([]string{`&Envelope{`, - `Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, `Topic:` + fmt.Sprintf("%v", this.Topic) + `,`, `Event:` + strings.Replace(fmt.Sprintf("%v", this.Event), "Any", "types.Any", 1) + `,`, @@ -669,6 +683,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error { func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -700,10 +715,8 @@ func skipEvents(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -724,55 +737,30 @@ func skipEvents(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthEvents } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthEvents - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvents - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipEvents(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthEvents - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/services/version/v1/version.pb.go b/vendor/github.com/containerd/containerd/api/services/version/v1/version.pb.go index cc392889bdc..81b8c339539 100644 --- a/vendor/github.com/containerd/containerd/api/services/version/v1/version.pb.go +++ b/vendor/github.com/containerd/containerd/api/services/version/v1/version.pb.go @@ -9,8 +9,11 @@ import ( proto "github.com/gogo/protobuf/proto" types "github.com/gogo/protobuf/types" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -24,7 +27,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type VersionResponse struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` @@ -47,7 +50,7 @@ func (m *VersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_VersionResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -131,6 +134,14 @@ type VersionServer interface { Version(context.Context, *types.Empty) (*VersionResponse, error) } +// UnimplementedVersionServer can be embedded to have forward compatible implementations. +type UnimplementedVersionServer struct { +} + +func (*UnimplementedVersionServer) Version(ctx context.Context, req *types.Empty) (*VersionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") +} + func RegisterVersionServer(s *grpc.Server, srv VersionServer) { s.RegisterService(&_Version_serviceDesc, srv) } @@ -169,7 +180,7 @@ var _Version_serviceDesc = grpc.ServiceDesc{ func (m *VersionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -177,36 +188,46 @@ func (m *VersionResponse) Marshal() (dAtA []byte, err error) { } func (m *VersionResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VersionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Version) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintVersion(dAtA, i, uint64(len(m.Version))) - i += copy(dAtA[i:], m.Version) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Revision) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Revision) + copy(dAtA[i:], m.Revision) i = encodeVarintVersion(dAtA, i, uint64(len(m.Revision))) - i += copy(dAtA[i:], m.Revision) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintVersion(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintVersion(dAtA []byte, offset int, v uint64) int { + offset -= sovVersion(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *VersionResponse) Size() (n int) { if m == nil { @@ -229,14 +250,7 @@ func (m *VersionResponse) Size() (n int) { } func sovVersion(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozVersion(x uint64) (n int) { return sovVersion(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -382,6 +396,7 @@ func (m *VersionResponse) Unmarshal(dAtA []byte) error { func skipVersion(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -413,10 +428,8 @@ func skipVersion(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -437,55 +450,30 @@ func skipVersion(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthVersion } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthVersion - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowVersion - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipVersion(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthVersion - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupVersion + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthVersion + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthVersion = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowVersion = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthVersion = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVersion = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupVersion = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/types/descriptor.pb.go b/vendor/github.com/containerd/containerd/api/types/descriptor.pb.go index c0179d297be..437d41f23ad 100644 --- a/vendor/github.com/containerd/containerd/api/types/descriptor.pb.go +++ b/vendor/github.com/containerd/containerd/api/types/descriptor.pb.go @@ -10,6 +10,7 @@ import ( github_com_opencontainers_go_digest "github.com/opencontainers/go-digest" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -23,7 +24,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Descriptor describes a blob in a content store. // @@ -53,7 +54,7 @@ func (m *Descriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Descriptor.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -108,7 +109,7 @@ var fileDescriptor_37f958df3707db9e = []byte{ func (m *Descriptor) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -116,58 +117,70 @@ func (m *Descriptor) Marshal() (dAtA []byte, err error) { } func (m *Descriptor) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Descriptor) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.MediaType) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintDescriptor(dAtA, i, uint64(len(m.MediaType))) - i += copy(dAtA[i:], m.MediaType) - } - if len(m.Digest) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintDescriptor(dAtA, i, uint64(len(m.Digest))) - i += copy(dAtA[i:], m.Digest) - } - if m.Size_ != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintDescriptor(dAtA, i, uint64(m.Size_)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Annotations) > 0 { - for k, _ := range m.Annotations { - dAtA[i] = 0x2a - i++ + for k := range m.Annotations { v := m.Annotations[k] - mapSize := 1 + len(k) + sovDescriptor(uint64(len(k))) + 1 + len(v) + sovDescriptor(uint64(len(v))) - i = encodeVarintDescriptor(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintDescriptor(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintDescriptor(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintDescriptor(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintDescriptor(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Size_ != 0 { + i = encodeVarintDescriptor(dAtA, i, uint64(m.Size_)) + i-- + dAtA[i] = 0x18 } - return i, nil + if len(m.Digest) > 0 { + i -= len(m.Digest) + copy(dAtA[i:], m.Digest) + i = encodeVarintDescriptor(dAtA, i, uint64(len(m.Digest))) + i-- + dAtA[i] = 0x12 + } + if len(m.MediaType) > 0 { + i -= len(m.MediaType) + copy(dAtA[i:], m.MediaType) + i = encodeVarintDescriptor(dAtA, i, uint64(len(m.MediaType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintDescriptor(dAtA []byte, offset int, v uint64) int { + offset -= sovDescriptor(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Descriptor) Size() (n int) { if m == nil { @@ -201,14 +214,7 @@ func (m *Descriptor) Size() (n int) { } func sovDescriptor(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozDescriptor(x uint64) (n int) { return sovDescriptor(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -512,6 +518,7 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error { func skipDescriptor(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -543,10 +550,8 @@ func skipDescriptor(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -567,55 +572,30 @@ func skipDescriptor(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthDescriptor } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthDescriptor - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDescriptor - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipDescriptor(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthDescriptor - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDescriptor + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthDescriptor + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthDescriptor = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDescriptor = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthDescriptor = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDescriptor = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDescriptor = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/types/metrics.pb.go b/vendor/github.com/containerd/containerd/api/types/metrics.pb.go index c231d343a0f..89a8d9cd6ff 100644 --- a/vendor/github.com/containerd/containerd/api/types/metrics.pb.go +++ b/vendor/github.com/containerd/containerd/api/types/metrics.pb.go @@ -10,6 +10,7 @@ import ( types "github.com/gogo/protobuf/types" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -25,7 +26,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Metric struct { Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"` @@ -49,7 +50,7 @@ func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Metric.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -100,7 +101,7 @@ var fileDescriptor_8d594d87edf6e6bc = []byte{ func (m *Metric) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -108,48 +109,59 @@ func (m *Metric) Marshal() (dAtA []byte, err error) { } func (m *Metric) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Metric) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintMetrics(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) - n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - if len(m.ID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintMetrics(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Data != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintMetrics(dAtA, i, uint64(m.Data.Size())) - n2, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMetrics(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintMetrics(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0x12 } - return i, nil + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintMetrics(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func encodeVarintMetrics(dAtA []byte, offset int, v uint64) int { + offset -= sovMetrics(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Metric) Size() (n int) { if m == nil { @@ -174,14 +186,7 @@ func (m *Metric) Size() (n int) { } func sovMetrics(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozMetrics(x uint64) (n int) { return sovMetrics(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -191,7 +196,7 @@ func (this *Metric) String() string { return "nil" } s := strings.Join([]string{`&Metric{`, - `Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Data:` + strings.Replace(fmt.Sprintf("%v", this.Data), "Any", "types.Any", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, @@ -365,6 +370,7 @@ func (m *Metric) Unmarshal(dAtA []byte) error { func skipMetrics(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -396,10 +402,8 @@ func skipMetrics(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -420,55 +424,30 @@ func skipMetrics(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthMetrics } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthMetrics - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMetrics(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthMetrics - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMetrics + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthMetrics + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMetrics = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/types/mount.pb.go b/vendor/github.com/containerd/containerd/api/types/mount.pb.go index 54af8ea2f89..6872e4120e1 100644 --- a/vendor/github.com/containerd/containerd/api/types/mount.pb.go +++ b/vendor/github.com/containerd/containerd/api/types/mount.pb.go @@ -8,6 +8,7 @@ import ( proto "github.com/gogo/protobuf/proto" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -21,7 +22,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Mount describes mounts for a container. // @@ -58,7 +59,7 @@ func (m *Mount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Mount.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -105,7 +106,7 @@ var fileDescriptor_920196890d4a7b9f = []byte{ func (m *Mount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -113,57 +114,62 @@ func (m *Mount) Marshal() (dAtA []byte, err error) { } func (m *Mount) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Mount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Type) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintMount(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) - } - if len(m.Source) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintMount(dAtA, i, uint64(len(m.Source))) - i += copy(dAtA[i:], m.Source) - } - if len(m.Target) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintMount(dAtA, i, uint64(len(m.Target))) - i += copy(dAtA[i:], m.Target) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Options) > 0 { - for _, s := range m.Options { + for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Options[iNdEx]) + copy(dAtA[i:], m.Options[iNdEx]) + i = encodeVarintMount(dAtA, i, uint64(len(m.Options[iNdEx]))) + i-- dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Target) > 0 { + i -= len(m.Target) + copy(dAtA[i:], m.Target) + i = encodeVarintMount(dAtA, i, uint64(len(m.Target))) + i-- + dAtA[i] = 0x1a } - return i, nil + if len(m.Source) > 0 { + i -= len(m.Source) + copy(dAtA[i:], m.Source) + i = encodeVarintMount(dAtA, i, uint64(len(m.Source))) + i-- + dAtA[i] = 0x12 + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintMount(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintMount(dAtA []byte, offset int, v uint64) int { + offset -= sovMount(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Mount) Size() (n int) { if m == nil { @@ -196,14 +202,7 @@ func (m *Mount) Size() (n int) { } func sovMount(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozMount(x uint64) (n int) { return sovMount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -415,6 +414,7 @@ func (m *Mount) Unmarshal(dAtA []byte) error { func skipMount(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -446,10 +446,8 @@ func skipMount(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -470,55 +468,30 @@ func skipMount(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthMount } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthMount - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMount(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthMount - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMount + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthMount + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthMount = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMount = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthMount = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMount = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMount = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/types/platform.pb.go b/vendor/github.com/containerd/containerd/api/types/platform.pb.go index 558f94732b6..c03d8b077bf 100644 --- a/vendor/github.com/containerd/containerd/api/types/platform.pb.go +++ b/vendor/github.com/containerd/containerd/api/types/platform.pb.go @@ -8,6 +8,7 @@ import ( proto "github.com/gogo/protobuf/proto" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -21,7 +22,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Platform follows the structure of the OCI platform specification, from // descriptors. @@ -47,7 +48,7 @@ func (m *Platform) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Platform.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -94,7 +95,7 @@ var fileDescriptor_24ba7a4b83e2367e = []byte{ func (m *Platform) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -102,42 +103,53 @@ func (m *Platform) Marshal() (dAtA []byte, err error) { } func (m *Platform) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Platform) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.OS) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintPlatform(dAtA, i, uint64(len(m.OS))) - i += copy(dAtA[i:], m.OS) - } - if len(m.Architecture) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintPlatform(dAtA, i, uint64(len(m.Architecture))) - i += copy(dAtA[i:], m.Architecture) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Variant) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Variant) + copy(dAtA[i:], m.Variant) i = encodeVarintPlatform(dAtA, i, uint64(len(m.Variant))) - i += copy(dAtA[i:], m.Variant) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Architecture) > 0 { + i -= len(m.Architecture) + copy(dAtA[i:], m.Architecture) + i = encodeVarintPlatform(dAtA, i, uint64(len(m.Architecture))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.OS) > 0 { + i -= len(m.OS) + copy(dAtA[i:], m.OS) + i = encodeVarintPlatform(dAtA, i, uint64(len(m.OS))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintPlatform(dAtA []byte, offset int, v uint64) int { + offset -= sovPlatform(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Platform) Size() (n int) { if m == nil { @@ -164,14 +176,7 @@ func (m *Platform) Size() (n int) { } func sovPlatform(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPlatform(x uint64) (n int) { return sovPlatform(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -350,6 +355,7 @@ func (m *Platform) Unmarshal(dAtA []byte) error { func skipPlatform(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -381,10 +387,8 @@ func skipPlatform(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -405,55 +409,30 @@ func skipPlatform(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthPlatform } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthPlatform - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPlatform - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPlatform(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthPlatform - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPlatform + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPlatform + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPlatform = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPlatform = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPlatform = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPlatform = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPlatform = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/api/types/task/task.pb.go b/vendor/github.com/containerd/containerd/api/types/task/task.pb.go index 69d851c938e..ae824ff45c4 100644 --- a/vendor/github.com/containerd/containerd/api/types/task/task.pb.go +++ b/vendor/github.com/containerd/containerd/api/types/task/task.pb.go @@ -10,6 +10,7 @@ import ( types "github.com/gogo/protobuf/types" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -25,7 +26,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Status int32 @@ -93,7 +94,7 @@ func (m *Process) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Process.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -137,7 +138,7 @@ func (m *ProcessInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ProcessInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -208,7 +209,7 @@ var fileDescriptor_391ef18c8ab0dc16 = []byte{ func (m *Process) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -216,83 +217,94 @@ func (m *Process) Marshal() (dAtA []byte, err error) { } func (m *Process) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Process) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) - i += copy(dAtA[i:], m.ContainerID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.ID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt):]) + if err1 != nil { + return 0, err1 } - if m.Pid != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintTask(dAtA, i, uint64(m.Pid)) - } - if m.Status != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintTask(dAtA, i, uint64(m.Status)) - } - if len(m.Stdin) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.Stdin))) - i += copy(dAtA[i:], m.Stdin) - } - if len(m.Stdout) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.Stdout))) - i += copy(dAtA[i:], m.Stdout) - } - if len(m.Stderr) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintTask(dAtA, i, uint64(len(m.Stderr))) - i += copy(dAtA[i:], m.Stderr) + i -= n1 + i = encodeVarintTask(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x52 + if m.ExitStatus != 0 { + i = encodeVarintTask(dAtA, i, uint64(m.ExitStatus)) + i-- + dAtA[i] = 0x48 } if m.Terminal { - dAtA[i] = 0x40 - i++ + i-- if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x40 } - if m.ExitStatus != 0 { - dAtA[i] = 0x48 - i++ - i = encodeVarintTask(dAtA, i, uint64(m.ExitStatus)) + if len(m.Stderr) > 0 { + i -= len(m.Stderr) + copy(dAtA[i:], m.Stderr) + i = encodeVarintTask(dAtA, i, uint64(len(m.Stderr))) + i-- + dAtA[i] = 0x3a } - dAtA[i] = 0x52 - i++ - i = encodeVarintTask(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) - n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) - if err != nil { - return 0, err + if len(m.Stdout) > 0 { + i -= len(m.Stdout) + copy(dAtA[i:], m.Stdout) + i = encodeVarintTask(dAtA, i, uint64(len(m.Stdout))) + i-- + dAtA[i] = 0x32 } - i += n1 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Stdin) > 0 { + i -= len(m.Stdin) + copy(dAtA[i:], m.Stdin) + i = encodeVarintTask(dAtA, i, uint64(len(m.Stdin))) + i-- + dAtA[i] = 0x2a } - return i, nil + if m.Status != 0 { + i = encodeVarintTask(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x20 + } + if m.Pid != 0 { + i = encodeVarintTask(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x18 + } + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0x12 + } + if len(m.ContainerID) > 0 { + i -= len(m.ContainerID) + copy(dAtA[i:], m.ContainerID) + i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ProcessInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -300,39 +312,49 @@ func (m *ProcessInfo) Marshal() (dAtA []byte, err error) { } func (m *ProcessInfo) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProcessInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Pid != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintTask(dAtA, i, uint64(m.Pid)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Info != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTask(dAtA, i, uint64(m.Info.Size())) - n2, err := m.Info.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Info.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTask(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Pid != 0 { + i = encodeVarintTask(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func encodeVarintTask(dAtA []byte, offset int, v uint64) int { + offset -= sovTask(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Process) Size() (n int) { if m == nil { @@ -400,14 +422,7 @@ func (m *ProcessInfo) Size() (n int) { } func sovTask(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozTask(x uint64) (n int) { return sovTask(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -426,7 +441,7 @@ func (this *Process) String() string { `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, - `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `ExitedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExitedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -888,6 +903,7 @@ func (m *ProcessInfo) Unmarshal(dAtA []byte) error { func skipTask(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -919,10 +935,8 @@ func skipTask(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -943,55 +957,30 @@ func skipTask(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthTask } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthTask - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTask - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipTask(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthTask - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTask + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthTask + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthTask = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTask = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthTask = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTask = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTask = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/archive/tar.go b/vendor/github.com/containerd/containerd/archive/tar.go index 7ec46575647..580e6e76f62 100644 --- a/vendor/github.com/containerd/containerd/archive/tar.go +++ b/vendor/github.com/containerd/containerd/archive/tar.go @@ -361,7 +361,7 @@ func createTarFile(ctx context.Context, path, extractDir string, hdr *tar.Header if strings.HasPrefix(key, paxSchilyXattr) { key = key[len(paxSchilyXattr):] if err := setxattr(path, key, value); err != nil { - if errors.Cause(err) == syscall.ENOTSUP { + if errors.Is(err, syscall.ENOTSUP) { log.G(ctx).WithError(err).Warnf("ignored xattr %s in archive", key) continue } diff --git a/vendor/github.com/containerd/containerd/archive/tar_unix.go b/vendor/github.com/containerd/containerd/archive/tar_unix.go index e872187530d..6e89d2fdbc9 100644 --- a/vendor/github.com/containerd/containerd/archive/tar_unix.go +++ b/vendor/github.com/containerd/containerd/archive/tar_unix.go @@ -22,12 +22,11 @@ import ( "archive/tar" "os" "strings" - "sync" "syscall" + "github.com/containerd/containerd/sys" "github.com/containerd/continuity/fs" "github.com/containerd/continuity/sysx" - "github.com/opencontainers/runc/libcontainer/system" "github.com/pkg/errors" "golang.org/x/sys/unix" ) @@ -84,21 +83,11 @@ func mkdir(path string, perm os.FileMode) error { return os.Chmod(path, perm) } -var ( - inUserNS bool - nsOnce sync.Once -) - -func setInUserNS() { - inUserNS = system.RunningInUserNS() -} - func skipFile(hdr *tar.Header) bool { switch hdr.Typeflag { case tar.TypeBlock, tar.TypeChar: // cannot create a device if running in user namespace - nsOnce.Do(setInUserNS) - return inUserNS + return sys.RunningInUserNS() default: return false } @@ -125,7 +114,7 @@ func handleTarTypeBlockCharFifo(hdr *tar.Header, path string) error { func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo) error { if hdr.Typeflag == tar.TypeLink { if fi, err := os.Lstat(hdr.Linkname); err == nil && (fi.Mode()&os.ModeSymlink == 0) { - if err := os.Chmod(path, hdrInfo.Mode()); err != nil { + if err := os.Chmod(path, hdrInfo.Mode()); err != nil && !os.IsNotExist(err) { return err } } @@ -176,7 +165,10 @@ func copyDirInfo(fi os.FileInfo, path string) error { return errors.Wrapf(err, "failed to chmod %s", path) } - timespec := []unix.Timespec{unix.Timespec(fs.StatAtime(st)), unix.Timespec(fs.StatMtime(st))} + timespec := []unix.Timespec{ + unix.NsecToTimespec(syscall.TimespecToNsec(fs.StatAtime(st))), + unix.NsecToTimespec(syscall.TimespecToNsec(fs.StatMtime(st))), + } if err := unix.UtimesNanoAt(unix.AT_FDCWD, path, timespec, unix.AT_SYMLINK_NOFOLLOW); err != nil { return errors.Wrapf(err, "failed to utime %s", path) } diff --git a/vendor/github.com/containerd/containerd/cio/io.go b/vendor/github.com/containerd/containerd/cio/io.go index c7cf4f0bcb9..66379994167 100644 --- a/vendor/github.com/containerd/containerd/cio/io.go +++ b/vendor/github.com/containerd/containerd/cio/io.go @@ -245,19 +245,11 @@ func LogURI(uri *url.URL) Creator { // BinaryIO forwards container STDOUT|STDERR directly to a logging binary func BinaryIO(binary string, args map[string]string) Creator { return func(_ string) (IO, error) { - binary = filepath.Clean(binary) - if !strings.HasPrefix(binary, "/") { - return nil, errors.New("absolute path needed") + uri, err := LogURIGenerator("binary", binary, args) + if err != nil { + return nil, err } - uri := &url.URL{ - Scheme: "binary", - Path: binary, - } - q := uri.Query() - for k, v := range args { - q.Set(k, v) - } - uri.RawQuery = q.Encode() + res := uri.String() return &logURI{ config: Config{ @@ -272,14 +264,11 @@ func BinaryIO(binary string, args map[string]string) Creator { // If the log file already exists, the logs will be appended to the file. func LogFile(path string) Creator { return func(_ string) (IO, error) { - path = filepath.Clean(path) - if !strings.HasPrefix(path, "/") { - return nil, errors.New("absolute path needed") - } - uri := &url.URL{ - Scheme: "file", - Path: path, + uri, err := LogURIGenerator("file", path, nil) + if err != nil { + return nil, err } + res := uri.String() return &logURI{ config: Config{ @@ -290,6 +279,30 @@ func LogFile(path string) Creator { } } +// LogURIGenerator is the helper to generate log uri with specific scheme. +func LogURIGenerator(scheme string, path string, args map[string]string) (*url.URL, error) { + path = filepath.Clean(path) + if !strings.HasPrefix(path, "/") { + return nil, errors.New("absolute path needed") + } + + uri := &url.URL{ + Scheme: scheme, + Path: path, + } + + if len(args) == 0 { + return uri, nil + } + + q := uri.Query() + for k, v := range args { + q.Set(k, v) + } + uri.RawQuery = q.Encode() + return uri, nil +} + type logURI struct { config Config } diff --git a/vendor/github.com/containerd/containerd/cio/io_unix.go b/vendor/github.com/containerd/containerd/cio/io_unix.go index 42d320933bf..a92d929785a 100644 --- a/vendor/github.com/containerd/containerd/cio/io_unix.go +++ b/vendor/github.com/containerd/containerd/cio/io_unix.go @@ -132,7 +132,7 @@ func openFifos(ctx context.Context, fifos *FIFOSet) (pipes, error) { } }() } - if fifos.Stderr != "" { + if !fifos.Terminal && fifos.Stderr != "" { if f.Stderr, err = fifo.OpenFifo(ctx, fifos.Stderr, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { return f, errors.Wrapf(err, "failed to open stderr fifo") } diff --git a/vendor/github.com/containerd/containerd/client.go b/vendor/github.com/containerd/containerd/client.go index 99141e2db52..e72433c9bf4 100644 --- a/vendor/github.com/containerd/containerd/client.go +++ b/vendor/github.com/containerd/containerd/client.go @@ -54,15 +54,16 @@ import ( "github.com/containerd/containerd/plugin" "github.com/containerd/containerd/remotes" "github.com/containerd/containerd/remotes/docker" + "github.com/containerd/containerd/services/introspection" "github.com/containerd/containerd/snapshots" snproxy "github.com/containerd/containerd/snapshots/proxy" "github.com/containerd/typeurl" - "github.com/gogo/protobuf/types" ptypes "github.com/gogo/protobuf/types" ocispec "github.com/opencontainers/image-spec/specs-go/v1" specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "google.golang.org/grpc" + "google.golang.org/grpc/backoff" "google.golang.org/grpc/health/grpc_health_v1" ) @@ -109,11 +110,16 @@ func New(address string, opts ...ClientOpt) (*Client, error) { c.services = *copts.services } if address != "" { + backoffConfig := backoff.DefaultConfig + backoffConfig.MaxDelay = 3 * time.Second + connParams := grpc.ConnectParams{ + Backoff: backoffConfig, + } gopts := []grpc.DialOption{ grpc.WithBlock(), grpc.WithInsecure(), grpc.FailOnNonTempDialError(true), - grpc.WithBackoffMaxDelay(3 * time.Second), + grpc.WithConnectParams(connParams), grpc.WithContextDialer(dialer.ContextDialer), // TODO(stevvooe): We may need to allow configuration of this on the client. @@ -312,6 +318,9 @@ type RemoteContext struct { // Snapshotter used for unpacking Snapshotter string + // SnapshotterOpts are additional options to be passed to a snapshotter during pull + SnapshotterOpts []snapshots.Opt + // Labels to be applied to the created image Labels map[string]string @@ -342,6 +351,10 @@ type RemoteContext struct { // AllMetadata downloads all manifests and known-configuration files AllMetadata bool + + // ChildLabelMap sets the labels used to reference child objects in the content + // store. By default, all GC reference labels will be set for all fetched content. + ChildLabelMap func(ocispec.Descriptor) []string } func defaultRemoteContext() *RemoteContext { @@ -389,7 +402,11 @@ func (c *Client) Fetch(ctx context.Context, ref string, opts ...RemoteOpt) (imag } defer done(ctx) - return c.fetch(ctx, fetchCtx, ref, 0) + img, err := c.fetch(ctx, fetchCtx, ref, 0) + if err != nil { + return images.Image{}, err + } + return c.createNewImage(ctx, img) } // Push uploads the provided content to a remote resource @@ -621,10 +638,13 @@ func (c *Client) DiffService() DiffService { } // IntrospectionService returns the underlying Introspection Client -func (c *Client) IntrospectionService() introspectionapi.IntrospectionClient { +func (c *Client) IntrospectionService() introspection.Service { + if c.introspectionService != nil { + return c.introspectionService + } c.connMu.Lock() defer c.connMu.Unlock() - return introspectionapi.NewIntrospectionClient(c.conn) + return introspection.NewIntrospectionServiceFromClient(introspectionapi.NewIntrospectionClient(c.conn)) } // LeasesService returns the underlying Leases Client @@ -706,7 +726,7 @@ func (c *Client) Server(ctx context.Context) (ServerInfo, error) { } c.connMu.Unlock() - response, err := c.IntrospectionService().Server(ctx, &types.Empty{}) + response, err := c.IntrospectionService().Server(ctx, &ptypes.Empty{}) if err != nil { return ServerInfo{}, err } diff --git a/vendor/github.com/containerd/containerd/client_opts.go b/vendor/github.com/containerd/containerd/client_opts.go index 6f485c18dcb..5271b94ee1e 100644 --- a/vendor/github.com/containerd/containerd/client_opts.go +++ b/vendor/github.com/containerd/containerd/client_opts.go @@ -22,6 +22,9 @@ import ( "github.com/containerd/containerd/images" "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/remotes" + "github.com/containerd/containerd/snapshots" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "google.golang.org/grpc" ) @@ -130,10 +133,19 @@ func WithPullUnpack(_ *Client, c *RemoteContext) error { return nil } -// WithPullSnapshotter specifies snapshotter name used for unpacking -func WithPullSnapshotter(snapshotterName string) RemoteOpt { +// WithUnpackOpts is used to add unpack options to the unpacker. +func WithUnpackOpts(opts []UnpackOpt) RemoteOpt { + return func(_ *Client, c *RemoteContext) error { + c.UnpackOpts = append(c.UnpackOpts, opts...) + return nil + } +} + +// WithPullSnapshotter specifies snapshotter name used for unpacking. +func WithPullSnapshotter(snapshotterName string, opts ...snapshots.Opt) RemoteOpt { return func(_ *Client, c *RemoteContext) error { c.Snapshotter = snapshotterName + c.SnapshotterOpts = opts return nil } } @@ -164,6 +176,18 @@ func WithPullLabels(labels map[string]string) RemoteOpt { } } +// WithChildLabelMap sets the map function used to define the labels set +// on referenced child content in the content store. This can be used +// to overwrite the default GC labels or filter which labels get set +// for content. +// The default is `images.ChildGCLabels`. +func WithChildLabelMap(fn func(ocispec.Descriptor) []string) RemoteOpt { + return func(_ *Client, c *RemoteContext) error { + c.ChildLabelMap = fn + return nil + } +} + // WithSchema1Conversion is used to convert Docker registry schema 1 // manifests to oci manifests on pull. Without this option schema 1 // manifests will return a not supported error. diff --git a/vendor/github.com/containerd/containerd/cmd/containerd-shim/shim_linux.go b/vendor/github.com/containerd/containerd/cmd/containerd-shim/shim_linux.go index 4d81aa6d549..66ebe36c68c 100644 --- a/vendor/github.com/containerd/containerd/cmd/containerd-shim/shim_linux.go +++ b/vendor/github.com/containerd/containerd/cmd/containerd-shim/shim_linux.go @@ -23,7 +23,6 @@ import ( "github.com/containerd/containerd/sys/reaper" runc "github.com/containerd/go-runc" "github.com/containerd/ttrpc" - "github.com/opencontainers/runc/libcontainer/system" "golang.org/x/sys/unix" ) @@ -36,7 +35,7 @@ func setupSignals() (chan os.Signal, error) { // for waiting on processes runc.Monitor = reaper.Default // set the shim as the subreaper for all orphaned processes created by the container - if err := system.SetSubreaper(1); err != nil { + if err := reaper.SetSubreaper(1); err != nil { return nil, err } return signals, nil diff --git a/vendor/github.com/containerd/containerd/cmd/containerd/command/config.go b/vendor/github.com/containerd/containerd/cmd/containerd/command/config.go index 1e5710d4297..f1d590d9f2f 100644 --- a/vendor/github.com/containerd/containerd/cmd/containerd/command/config.go +++ b/vendor/github.com/containerd/containerd/cmd/containerd/command/config.go @@ -65,10 +65,14 @@ func outputConfig(cfg *srvconfig.Config) error { } } + if config.Timeouts == nil { + config.Timeouts = make(map[string]string) + } timeouts := timeout.All() - config.Timeouts = make(map[string]string) for k, v := range timeouts { - config.Timeouts[k] = v.String() + if config.Timeouts[k] == "" { + config.Timeouts[k] = v.String() + } } // for the time being, keep the defaultConfig's version set at 1 so that diff --git a/vendor/github.com/containerd/containerd/cmd/containerd/command/main.go b/vendor/github.com/containerd/containerd/cmd/containerd/command/main.go index 1974ba8623a..de507042307 100644 --- a/vendor/github.com/containerd/containerd/cmd/containerd/command/main.go +++ b/vendor/github.com/containerd/containerd/cmd/containerd/command/main.go @@ -288,7 +288,7 @@ func setLevel(context *cli.Context, config *srvconfig.Config) error { l = config.Debug.Level } if l != "" { - lvl, err := log.ParseLevel(l) + lvl, err := logrus.ParseLevel(l) if err != nil { return err } diff --git a/vendor/github.com/containerd/containerd/cmd/containerd/command/main_windows.go b/vendor/github.com/containerd/containerd/cmd/containerd/command/main_windows.go index 612cb40d4f8..7e3430bb60e 100644 --- a/vendor/github.com/containerd/containerd/cmd/containerd/command/main_windows.go +++ b/vendor/github.com/containerd/containerd/cmd/containerd/command/main_windows.go @@ -23,7 +23,6 @@ import ( "path/filepath" "unsafe" - winio "github.com/Microsoft/go-winio" "github.com/Microsoft/go-winio/pkg/etw" "github.com/Microsoft/go-winio/pkg/etwlogrus" "github.com/Microsoft/go-winio/pkg/guid" @@ -75,7 +74,7 @@ func setupDumpStacks() { // signaled. ACL'd to builtin administrators and local system event := "Global\\stackdump-" + fmt.Sprint(os.Getpid()) ev, _ := windows.UTF16PtrFromString(event) - sd, err := winio.SddlToSecurityDescriptor("D:P(A;;GA;;;BA)(A;;GA;;;SY)") + sd, err := windows.SecurityDescriptorFromString("D:P(A;;GA;;;BA)(A;;GA;;;SY)") if err != nil { logrus.Errorf("failed to get security descriptor for debug stackdump event %s: %s", event, err.Error()) return @@ -83,7 +82,7 @@ func setupDumpStacks() { var sa windows.SecurityAttributes sa.Length = uint32(unsafe.Sizeof(sa)) sa.InheritHandle = 1 - sa.SecurityDescriptor = uintptr(unsafe.Pointer(&sd[0])) + sa.SecurityDescriptor = sd h, err := windows.CreateEvent(&sa, 0, 0, ev) if h == 0 || err != nil { logrus.Errorf("failed to create debug stackdump event %s: %s", event, err.Error()) diff --git a/vendor/github.com/containerd/containerd/cmd/containerd/command/notify_linux.go b/vendor/github.com/containerd/containerd/cmd/containerd/command/notify_linux.go index 9dd0a666482..be3d580f266 100644 --- a/vendor/github.com/containerd/containerd/cmd/containerd/command/notify_linux.go +++ b/vendor/github.com/containerd/containerd/cmd/containerd/command/notify_linux.go @@ -20,43 +20,28 @@ package command import ( "context" - "os" - sd "github.com/coreos/go-systemd/daemon" + sd "github.com/coreos/go-systemd/v22/daemon" "github.com/containerd/containerd/log" ) -const ( - // SdNotifyReady tells the service manager that service startup is finished - // or the service finished loading its configuration. - SdNotifyReady = "READY=1" - - // SdNotifyStopping tells the service manager that the service is beginning - // its shutdown. - SdNotifyStopping = "STOPPING=1" -) - // notifyReady notifies systemd that the daemon is ready to serve requests func notifyReady(ctx context.Context) error { - return sdNotify(ctx, SdNotifyReady) + return sdNotify(ctx, sd.SdNotifyReady) } // notifyStopping notifies systemd that the daemon is about to be stopped func notifyStopping(ctx context.Context) error { - return sdNotify(ctx, SdNotifyStopping) + return sdNotify(ctx, sd.SdNotifyStopping) } func sdNotify(ctx context.Context, state string) error { - if os.Getenv("NOTIFY_SOCKET") != "" { - notified, err := sd.SdNotify(false, state) - log.G(ctx). - WithError(err). - WithField("notified", notified). - WithField("state", state). - Debug("sd notification") - return err - } - - return nil + notified, err := sd.SdNotify(false, state) + log.G(ctx). + WithError(err). + WithField("notified", notified). + WithField("state", state). + Debug("sd notification") + return err } diff --git a/vendor/github.com/containerd/containerd/cmd/containerd/command/oci-hook.go b/vendor/github.com/containerd/containerd/cmd/containerd/command/oci-hook.go index f47f8e3ac0e..df626abbfcf 100644 --- a/vendor/github.com/containerd/containerd/cmd/containerd/command/oci-hook.go +++ b/vendor/github.com/containerd/containerd/cmd/containerd/command/oci-hook.go @@ -129,7 +129,7 @@ func (t *templateContext) annotation(k string) string { } func (t *templateContext) status() string { - return t.state.Status + return string(t.state.Status) } func render(ctx *templateContext, source string, out io.Writer) error { diff --git a/vendor/github.com/containerd/containerd/cmd/containerd/command/publish.go b/vendor/github.com/containerd/containerd/cmd/containerd/command/publish.go index fda424b18ba..82e75f35e40 100644 --- a/vendor/github.com/containerd/containerd/cmd/containerd/command/publish.go +++ b/vendor/github.com/containerd/containerd/cmd/containerd/command/publish.go @@ -32,6 +32,7 @@ import ( "github.com/pkg/errors" "github.com/urfave/cli" "google.golang.org/grpc" + "google.golang.org/grpc/backoff" ) var publishCommand = cli.Command{ @@ -92,12 +93,17 @@ func connectEvents(address string) (eventsapi.EventsClient, error) { } func connect(address string, d func(gocontext.Context, string) (net.Conn, error)) (*grpc.ClientConn, error) { + backoffConfig := backoff.DefaultConfig + backoffConfig.MaxDelay = 3 * time.Second + connParams := grpc.ConnectParams{ + Backoff: backoffConfig, + } gopts := []grpc.DialOption{ grpc.WithBlock(), grpc.WithInsecure(), grpc.WithContextDialer(d), grpc.FailOnNonTempDialError(true), - grpc.WithBackoffMaxDelay(3 * time.Second), + grpc.WithConnectParams(connParams), } ctx, cancel := gocontext.WithTimeout(gocontext.Background(), 2*time.Second) defer cancel() diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/app/main.go b/vendor/github.com/containerd/containerd/cmd/ctr/app/main.go index d0b277cf28c..bf274385c0b 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/app/main.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/app/main.go @@ -27,6 +27,7 @@ import ( "github.com/containerd/containerd/cmd/ctr/commands/install" "github.com/containerd/containerd/cmd/ctr/commands/leases" namespacesCmd "github.com/containerd/containerd/cmd/ctr/commands/namespaces" + ociCmd "github.com/containerd/containerd/cmd/ctr/commands/oci" "github.com/containerd/containerd/cmd/ctr/commands/plugins" "github.com/containerd/containerd/cmd/ctr/commands/pprof" "github.com/containerd/containerd/cmd/ctr/commands/run" @@ -71,15 +72,17 @@ stable from release to release of the containerd project.` containerd CLI ` + app.EnableBashCompletion = true app.Flags = []cli.Flag{ cli.BoolFlag{ Name: "debug", Usage: "enable debug output in logs", }, cli.StringFlag{ - Name: "address, a", - Usage: "address for containerd's GRPC server", - Value: defaults.DefaultAddress, + Name: "address, a", + Usage: "address for containerd's GRPC server", + Value: defaults.DefaultAddress, + EnvVar: "CONTAINERD_ADDRESS", }, cli.DurationFlag{ Name: "timeout", @@ -110,6 +113,7 @@ containerd CLI snapshots.Command, tasks.Command, install.Command, + ociCmd.Command, }, extraCmds...) app.Before = func(context *cli.Context) error { if context.GlobalBool("debug") { diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/commands.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/commands.go index 808ea37d7b5..9156b0b1349 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/commands.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/commands.go @@ -61,6 +61,23 @@ var ( Name: "refresh", Usage: "refresh token for authorization server", }, + cli.StringFlag{ + Name: "hosts-dir", + // compatible with "/etc/docker/certs.d" + Usage: "Custom hosts configuration directory", + }, + cli.StringFlag{ + Name: "tlscacert", + Usage: "path to TLS root CA", + }, + cli.StringFlag{ + Name: "tlscert", + Usage: "path to TLS client certificate", + }, + cli.StringFlag{ + Name: "tlskey", + Usage: "path to TLS client key", + }, } // ContainerFlags are cli flags specifying container options diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/commands_unix.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/commands_unix.go index a67fa8f6a1e..38ee594f00e 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/commands_unix.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/commands_unix.go @@ -29,5 +29,12 @@ func init() { }, cli.BoolFlag{ Name: "no-pivot", Usage: "disable use of pivot-root (linux only)", + }, cli.Int64Flag{ + Name: "cpu-quota", + Usage: "Limit CPU CFS quota", + Value: -1, + }, cli.Uint64Flag{ + Name: "cpu-period", + Usage: "Limit CPU CFS period", }) } diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/containers/containers.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/containers/containers.go index f087106cca2..f87b0c6ba81 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/containers/containers.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/containers/containers.go @@ -248,6 +248,12 @@ var infoCommand = cli.Command{ Name: "info", Usage: "get info about a container", ArgsUsage: "CONTAINER", + Flags: []cli.Flag{ + cli.BoolFlag{ + Name: "spec", + Usage: "only display the spec", + }, + }, Action: func(context *cli.Context) error { id := context.Args().First() if id == "" { @@ -266,6 +272,14 @@ var infoCommand = cli.Command{ if err != nil { return err } + if context.Bool("spec") { + v, err := typeurl.UnmarshalAny(info.Spec) + if err != nil { + return err + } + commands.PrintAsJSON(v) + return nil + } if info.Spec != nil && info.Spec.Value != nil { v, err := typeurl.UnmarshalAny(info.Spec) diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/events/events.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/events/events.go index dae7a9f16ff..709b1a66fdc 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/events/events.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/events/events.go @@ -22,6 +22,7 @@ import ( "github.com/containerd/containerd/cmd/ctr/commands" "github.com/containerd/containerd/events" + "github.com/containerd/containerd/log" "github.com/containerd/typeurl" "github.com/urfave/cli" @@ -54,11 +55,13 @@ var Command = cli.Command{ if e.Event != nil { v, err := typeurl.UnmarshalAny(e.Event) if err != nil { - return err + log.G(ctx).WithError(err).Warn("cannot unmarshal an event from Any") + continue } out, err = json.Marshal(v) if err != nil { - return err + log.G(ctx).WithError(err).Warn("cannot marshal Any into JSON") + continue } } if _, err := fmt.Println( diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/images.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/images.go index 44e5fca9153..49cc2149b4d 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/images.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/images.go @@ -43,6 +43,8 @@ var Command = cli.Command{ exportCommand, importCommand, listCommand, + mountCommand, + unmountCommand, pullCommand, pushCommand, removeCommand, diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/mount.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/mount.go new file mode 100644 index 00000000000..c0e03dc23fe --- /dev/null +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/mount.go @@ -0,0 +1,143 @@ +/* + Copyright The containerd 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 images + +import ( + "fmt" + "time" + + "github.com/containerd/containerd" + "github.com/containerd/containerd/cmd/ctr/commands" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/leases" + "github.com/containerd/containerd/mount" + "github.com/containerd/containerd/platforms" + "github.com/opencontainers/image-spec/identity" + "github.com/pkg/errors" + "github.com/urfave/cli" +) + +var mountCommand = cli.Command{ + Name: "mount", + Usage: "mount an image to a target path", + ArgsUsage: "[flags] ", + Description: `Mount an image rootfs to a specified path. + +When you are done, use the unmount command. +`, + Flags: append(append(commands.RegistryFlags, append(commands.SnapshotterFlags, commands.LabelFlag)...), + cli.BoolFlag{ + Name: "rw", + Usage: "Enable write support on the mount", + }, + cli.StringFlag{ + Name: "platform", + Usage: "Mount the image for the specified platform", + Value: platforms.DefaultString(), + }, + ), + Action: func(context *cli.Context) (retErr error) { + var ( + ref = context.Args().First() + target = context.Args().Get(1) + ) + if ref == "" { + return fmt.Errorf("please provide an image reference to mount") + } + if target == "" { + return fmt.Errorf("please provide a target path to mount to") + } + + client, ctx, cancel, err := commands.NewClient(context) + if err != nil { + return err + } + defer cancel() + + snapshotter := context.GlobalString("snapshotter") + if snapshotter == "" { + snapshotter = containerd.DefaultSnapshotter + } + + ctx, done, err := client.WithLease(ctx, + leases.WithID(target), + leases.WithExpiration(24*time.Hour), + leases.WithLabels(map[string]string{ + "containerd.io/gc.ref.snapshot." + snapshotter: target, + }), + ) + if err != nil && !errdefs.IsAlreadyExists(err) { + return err + } + + defer func() { + if retErr != nil && done != nil { + done(ctx) + } + }() + + ps := context.String("platform") + p, err := platforms.Parse(ps) + if err != nil { + return errors.Wrapf(err, "unable to parse platform %s", ps) + } + + img, err := client.ImageService().Get(ctx, ref) + if err != nil { + return err + } + + i := containerd.NewImageWithPlatform(client, img, platforms.Only(p)) + if err := i.Unpack(ctx, snapshotter); err != nil { + return errors.Wrap(err, "error unpacking image") + } + + diffIDs, err := i.RootFS(ctx) + if err != nil { + return err + } + chainID := identity.ChainID(diffIDs).String() + fmt.Println(chainID) + + s := client.SnapshotService(snapshotter) + + var mounts []mount.Mount + if context.Bool("rw") { + mounts, err = s.Prepare(ctx, target, chainID) + } else { + mounts, err = s.View(ctx, target, chainID) + } + if err != nil { + if errdefs.IsAlreadyExists(err) { + mounts, err = s.Mounts(ctx, target) + } + if err != nil { + return err + } + } + + if err := mount.All(mounts, target); err != nil { + if err := s.Remove(ctx, target); err != nil && !errdefs.IsNotFound(err) { + fmt.Fprintln(context.App.ErrWriter, "Error cleaning up snapshot after mount error:", err) + } + return err + } + + fmt.Fprintln(context.App.Writer, target) + return nil + }, +} diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/push.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/push.go index cce2a009f97..13857235edf 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/push.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/push.go @@ -29,6 +29,7 @@ import ( "github.com/containerd/containerd/images" "github.com/containerd/containerd/log" "github.com/containerd/containerd/pkg/progress" + "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/remotes" "github.com/containerd/containerd/remotes/docker" digest "github.com/opencontainers/go-digest" @@ -58,6 +59,10 @@ var pushCommand = cli.Command{ Name: "manifest-type", Usage: "media type of manifest digest", Value: ocispec.MediaTypeImageManifest, + }, cli.StringSliceFlag{ + Name: "platform", + Usage: "push content from a specific platform", + Value: &cli.StringSlice{}, }), Action: func(context *cli.Context) error { var ( @@ -91,6 +96,27 @@ var pushCommand = cli.Command{ return errors.Wrap(err, "unable to resolve image to manifest") } desc = img.Target + + if pss := context.StringSlice("platform"); len(pss) == 1 { + p, err := platforms.Parse(pss[0]) + if err != nil { + return errors.Wrapf(err, "invalid platform %q", pss[0]) + } + + cs := client.ContentStore() + if manifests, err := images.Children(ctx, cs, desc); err == nil && len(manifests) > 0 { + matcher := platforms.NewMatcher(p) + for _, manifest := range manifests { + if manifest.Platform != nil && matcher.Match(*manifest.Platform) { + if _, err := images.Children(ctx, cs, manifest); err != nil { + return errors.Wrap(err, "no matching manifest") + } + desc = manifest + break + } + } + } + } } resolver, err := commands.GetResolver(ctx, context) diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/unmount.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/unmount.go new file mode 100644 index 00000000000..440c0af1e35 --- /dev/null +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/images/unmount.go @@ -0,0 +1,73 @@ +/* + Copyright The containerd 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 images + +import ( + "fmt" + + "github.com/containerd/containerd/cmd/ctr/commands" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/leases" + "github.com/containerd/containerd/mount" + "github.com/pkg/errors" + "github.com/urfave/cli" +) + +var unmountCommand = cli.Command{ + Name: "unmount", + Usage: "unmount the image from the target", + ArgsUsage: "[flags] ", + Description: "Unmount the image rootfs from the specified target.", + Flags: append(append(commands.RegistryFlags, append(commands.SnapshotterFlags, commands.LabelFlag)...), + cli.BoolFlag{ + Name: "rm", + Usage: "remove the snapshot after a successful unmount", + }, + ), + Action: func(context *cli.Context) error { + var ( + target = context.Args().First() + ) + if target == "" { + return fmt.Errorf("please provide a target path to mount to") + } + + client, ctx, cancel, err := commands.NewClient(context) + if err != nil { + return err + } + defer cancel() + + if err := mount.UnmountAll(target, 0); err != nil { + return err + } + + if context.Bool("rm") { + snapshotter := context.String("snapshotter") + s := client.SnapshotService(snapshotter) + if err := client.LeasesService().Delete(ctx, leases.Lease{ID: target}); err != nil && !errdefs.IsNotFound(err) { + return errors.Wrap(err, "error deleting lease") + } + if err := s.Remove(ctx, target); err != nil && !errdefs.IsNotFound(err) { + return errors.Wrap(err, "error removing snapshot") + } + } + + fmt.Fprintln(context.App.Writer, target) + return nil + }, +} diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/oci/oci.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/oci/oci.go new file mode 100644 index 00000000000..697bf3699d2 --- /dev/null +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/oci/oci.go @@ -0,0 +1,51 @@ +/* + Copyright The containerd 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 oci + +import ( + "github.com/pkg/errors" + "github.com/urfave/cli" + + "github.com/containerd/containerd/cmd/ctr/commands" + "github.com/containerd/containerd/containers" + "github.com/containerd/containerd/oci" +) + +var Command = cli.Command{ + Name: "oci", + Usage: "OCI tools", + Subcommands: []cli.Command{ + defaultSpecCommand, + }, +} + +var defaultSpecCommand = cli.Command{ + Name: "spec", + Usage: "see the output of the default OCI spec", + Action: func(context *cli.Context) error { + ctx, cancel := commands.AppContext(context) + defer cancel() + + spec, err := oci.GenerateSpec(ctx, nil, &containers.Container{}) + if err != nil { + return errors.Wrap(err, "failed to generate spec") + } + + commands.PrintAsJSON(spec) + return nil + }, +} diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/plugins/plugins.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/plugins/plugins.go index a7f42192c1b..c4c44907905 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/plugins/plugins.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/plugins/plugins.go @@ -23,7 +23,6 @@ import ( "strings" "text/tabwriter" - introspection "github.com/containerd/containerd/api/services/introspection/v1" "github.com/containerd/containerd/api/types" "github.com/containerd/containerd/cmd/ctr/commands" "github.com/containerd/containerd/platforms" @@ -67,9 +66,7 @@ var listCommand = cli.Command{ } defer cancel() ps := client.IntrospectionService() - response, err := ps.Plugins(ctx, &introspection.PluginsRequest{ - Filters: context.Args(), - }) + response, err := ps.Plugins(ctx, context.Args()) if err != nil { return err } diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/resolver.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/resolver.go index 1b3c30a862d..bc6f97be0fd 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/resolver.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/resolver.go @@ -20,15 +20,15 @@ import ( "bufio" gocontext "context" "crypto/tls" + "crypto/x509" "fmt" - "net" - "net/http" + "io/ioutil" "strings" - "time" "github.com/containerd/console" "github.com/containerd/containerd/remotes" "github.com/containerd/containerd/remotes/docker" + "github.com/containerd/containerd/remotes/docker/config" "github.com/pkg/errors" "github.com/urfave/cli" ) @@ -60,8 +60,7 @@ func GetResolver(ctx gocontext.Context, clicontext *cli.Context) (remotes.Resolv username = username[0:i] } options := docker.ResolverOptions{ - PlainHTTP: clicontext.Bool("plain-http"), - Tracker: PushTracker, + Tracker: PushTracker, } if username != "" { if secret == "" { @@ -79,32 +78,60 @@ func GetResolver(ctx gocontext.Context, clicontext *cli.Context) (remotes.Resolv secret = rt } - tr := &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - DualStack: true, - }).DialContext, - MaxIdleConns: 10, - IdleConnTimeout: 30 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - TLSClientConfig: &tls.Config{ - InsecureSkipVerify: clicontext.Bool("skip-verify"), - }, - ExpectContinueTimeout: 5 * time.Second, - } - - options.Client = &http.Client{ - Transport: tr, - } - - credentials := func(host string) (string, string, error) { + hostOptions := config.HostOptions{} + hostOptions.Credentials = func(host string) (string, string, error) { + // If host doesn't match... // Only one host return username, secret, nil } - authOpts := []docker.AuthorizerOpt{docker.WithAuthClient(options.Client), docker.WithAuthCreds(credentials)} - options.Authorizer = docker.NewDockerAuthorizer(authOpts...) + if clicontext.Bool("plain-http") { + hostOptions.DefaultScheme = "http" + } + defaultTLS, err := resolverDefaultTLS(clicontext) + if err != nil { + return nil, err + } + hostOptions.DefaultTLS = defaultTLS + if hostDir := clicontext.String("hosts-dir"); hostDir != "" { + hostOptions.HostDir = config.HostDirFromRoot(hostDir) + } + + options.Hosts = config.ConfigureHosts(ctx, hostOptions) return docker.NewResolver(options), nil } + +func resolverDefaultTLS(clicontext *cli.Context) (*tls.Config, error) { + config := &tls.Config{} + + if clicontext.Bool("skip-verify") { + config.InsecureSkipVerify = true + } + + if tlsRootPath := clicontext.String("tlscacert"); tlsRootPath != "" { + tlsRootData, err := ioutil.ReadFile(tlsRootPath) + if err != nil { + return nil, errors.Wrapf(err, "failed to read %q", tlsRootPath) + } + + config.RootCAs = x509.NewCertPool() + if !config.RootCAs.AppendCertsFromPEM(tlsRootData) { + return nil, fmt.Errorf("failed to load TLS CAs from %q: invalid data", tlsRootPath) + } + } + + tlsCertPath := clicontext.String("tlscert") + tlsKeyPath := clicontext.String("tlskey") + if tlsCertPath != "" || tlsKeyPath != "" { + if tlsCertPath == "" || tlsKeyPath == "" { + return nil, errors.New("flags --tlscert and --tlskey must be set together") + } + keyPair, err := tls.LoadX509KeyPair(tlsCertPath, tlsKeyPath) + if err != nil { + return nil, errors.Wrapf(err, "failed to load TLS client credentials (cert=%q, key=%q)", tlsCertPath, tlsKeyPath) + } + config.Certificates = []tls.Certificate{keyPair} + } + + return config, nil +} diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/run/run_unix.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/run/run_unix.go index 2ba015cd011..45b8781abc2 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/run/run_unix.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/run/run_unix.go @@ -21,6 +21,7 @@ package run import ( gocontext "context" "path/filepath" + "strconv" "strings" "github.com/containerd/containerd" @@ -29,12 +30,40 @@ import ( "github.com/containerd/containerd/contrib/seccomp" "github.com/containerd/containerd/oci" "github.com/containerd/containerd/platforms" + "github.com/containerd/containerd/runtime/v2/runc/options" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" + "github.com/sirupsen/logrus" "github.com/urfave/cli" ) -var platformRunFlags []cli.Flag +var platformRunFlags = []cli.Flag{ + cli.StringFlag{ + Name: "runc-binary", + Usage: "specify runc-compatible binary", + }, + cli.BoolFlag{ + Name: "runc-systemd-cgroup", + Usage: "start runc with systemd cgroup manager", + }, + cli.StringFlag{ + Name: "uidmap", + Usage: "run inside a user namespace with the specified UID mapping range; specified with the format `container-uid:host-uid:length`", + }, + cli.StringFlag{ + Name: "gidmap", + Usage: "run inside a user namespace with the specified GID mapping range; specified with the format `container-gid:host-gid:length`", + }, + cli.BoolFlag{ + Name: "remap-labels", + Usage: "provide the user namespace ID remapping to the snapshotter via label options; requires snapshotter support", + }, + cli.Float64Flag{ + Name: "cpus", + Usage: "set the CFS cpu qouta", + Value: 0.0, + }, +} // NewContainer creates a new container func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli.Context) (containerd.Container, error) { @@ -105,14 +134,36 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli opts = append(opts, oci.WithImageConfig(image)) cOpts = append(cOpts, containerd.WithImage(image), - containerd.WithSnapshotter(snapshotter), - // Even when "readonly" is set, we don't use KindView snapshot here. (#1495) + containerd.WithSnapshotter(snapshotter)) + if uidmap, gidmap := context.String("uidmap"), context.String("gidmap"); uidmap != "" && gidmap != "" { + uidMap, err := parseIDMapping(uidmap) + if err != nil { + return nil, err + } + gidMap, err := parseIDMapping(gidmap) + if err != nil { + return nil, err + } + opts = append(opts, + oci.WithUserNamespace([]specs.LinuxIDMapping{uidMap}, []specs.LinuxIDMapping{gidMap})) + // use snapshotter opts or the remapped snapshot support to shift the filesystem + // currently the only snapshotter known to support the labels is fuse-overlayfs: + // https://github.com/AkihiroSuda/containerd-fuse-overlayfs + if context.Bool("remap-labels") { + cOpts = append(cOpts, containerd.WithNewSnapshot(id, image, + containerd.WithRemapperLabels(0, uidMap.HostID, 0, gidMap.HostID, uidMap.Size))) + } else { + cOpts = append(cOpts, containerd.WithRemappedSnapshot(id, image, uidMap.HostID, gidMap.HostID)) + } + } else { + // Even when "read-only" is set, we don't use KindView snapshot here. (#1495) // We pass writable snapshot to the OCI runtime, and the runtime remounts it as read-only, // after creating some mount points on demand. - containerd.WithNewSnapshot(id, image), - containerd.WithImageStopSignal(image, "SIGTERM")) + cOpts = append(cOpts, containerd.WithNewSnapshot(id, image)) + } + cOpts = append(cOpts, containerd.WithImageStopSignal(image, "SIGTERM")) } - if context.Bool("readonly") { + if context.Bool("read-only") { opts = append(opts, oci.WithRootFSReadonly()) } if len(args) > 0 { @@ -125,7 +176,7 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli opts = append(opts, oci.WithTTY) } if context.Bool("privileged") { - opts = append(opts, oci.WithPrivileged) + opts = append(opts, oci.WithPrivileged, oci.WithAllDevicesAllowed, oci.WithHostDevices) } if context.Bool("net-host") { opts = append(opts, oci.WithHostNamespace(specs.NetworkNamespace), oci.WithHostHostsFile, oci.WithHostResolvconf) @@ -133,6 +184,22 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli if context.Bool("seccomp") { opts = append(opts, seccomp.WithDefaultProfile()) } + if cpus := context.Float64("cpus"); cpus > 0.0 { + var ( + period = uint64(100000) + quota = int64(cpus * 100000.0) + ) + opts = append(opts, oci.WithCPUCFS(quota, period)) + } + + quota := context.Int64("cpu-quota") + period := context.Uint64("cpu-period") + if quota != -1 || period != 0 { + if cpus := context.Float64("cpus"); cpus > 0.0 { + return nil, errors.New("cpus and quota/period should be used separately") + } + opts = append(opts, oci.WithCPUCFS(quota, period)) + } joinNs := context.StringSlice("with-ns") for _, ns := range joinNs { @@ -167,7 +234,11 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli } } - cOpts = append(cOpts, containerd.WithRuntime(context.String("runtime"), nil)) + runtimeOpts, err := getRuntimeOptions(context) + if err != nil { + return nil, err + } + cOpts = append(cOpts, containerd.WithRuntime(context.String("runtime"), runtimeOpts)) opts = append(opts, oci.WithAnnotations(commands.LabelArgs(context.StringSlice("label")))) var s specs.Spec @@ -180,11 +251,82 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli return client.NewContainer(ctx, id, cOpts...) } -func getNewTaskOpts(context *cli.Context) []containerd.NewTaskOpts { - if context.Bool("no-pivot") { - return []containerd.NewTaskOpts{containerd.WithNoPivotRoot} +func getRuncOptions(context *cli.Context) (*options.Options, error) { + runtimeOpts := &options.Options{} + if runcBinary := context.String("runc-binary"); runcBinary != "" { + runtimeOpts.BinaryName = runcBinary } - return nil + if context.Bool("runc-systemd-cgroup") { + if context.String("cgroup") == "" { + // runc maps "machine.slice:foo:deadbeef" to "/machine.slice/foo-deadbeef.scope" + return nil, errors.New("option --runc-systemd-cgroup requires --cgroup to be set, e.g. \"machine.slice:foo:deadbeef\"") + } + runtimeOpts.SystemdCgroup = true + } + + return runtimeOpts, nil +} + +func getRuntimeOptions(context *cli.Context) (interface{}, error) { + // validate first + if (context.String("runc-binary") != "" || context.Bool("runc-systemd-cgroup")) && + context.String("runtime") != "io.containerd.runc.v2" { + return nil, errors.New("specifying runc-binary and runc-systemd-cgroup is only supported for \"io.containerd.runc.v2\" runtime") + } + + if context.String("runtime") == "io.containerd.runc.v2" { + return getRuncOptions(context) + } + + return nil, nil +} + +func getNewTaskOpts(context *cli.Context) []containerd.NewTaskOpts { + var ( + tOpts []containerd.NewTaskOpts + ) + if context.Bool("no-pivot") { + tOpts = append(tOpts, containerd.WithNoPivotRoot) + } + if uidmap := context.String("uidmap"); uidmap != "" { + uidMap, err := parseIDMapping(uidmap) + if err != nil { + logrus.WithError(err).Warn("unable to parse uidmap; defaulting to uid 0 IO ownership") + } + tOpts = append(tOpts, containerd.WithUIDOwner(uidMap.HostID)) + } + if gidmap := context.String("gidmap"); gidmap != "" { + gidMap, err := parseIDMapping(gidmap) + if err != nil { + logrus.WithError(err).Warn("unable to parse gidmap; defaulting to gid 0 IO ownership") + } + tOpts = append(tOpts, containerd.WithGIDOwner(gidMap.HostID)) + } + return tOpts +} + +func parseIDMapping(mapping string) (specs.LinuxIDMapping, error) { + parts := strings.Split(mapping, ":") + if len(parts) != 3 { + return specs.LinuxIDMapping{}, errors.New("user namespace mappings require the format `container-id:host-id:size`") + } + cID, err := strconv.ParseUint(parts[0], 0, 32) + if err != nil { + return specs.LinuxIDMapping{}, errors.Wrapf(err, "invalid container id for user namespace remapping") + } + hID, err := strconv.ParseUint(parts[1], 0, 32) + if err != nil { + return specs.LinuxIDMapping{}, errors.Wrapf(err, "invalid host id for user namespace remapping") + } + size, err := strconv.ParseUint(parts[2], 0, 32) + if err != nil { + return specs.LinuxIDMapping{}, errors.Wrapf(err, "invalid size for user namespace remapping") + } + return specs.LinuxIDMapping{ + ContainerID: uint32(cID), + HostID: uint32(hID), + Size: uint32(size), + }, nil } func validNamespace(ns string) bool { diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/run/run_windows.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/run/run_windows.go index d0e4ad934cc..1fc9904abc7 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/run/run_windows.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/run/run_windows.go @@ -25,6 +25,7 @@ import ( "github.com/containerd/containerd/cmd/ctr/commands" "github.com/containerd/containerd/oci" specs "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli" ) @@ -107,6 +108,9 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli } opts = append(opts, oci.WithTTYSize(int(size.Width), int(size.Height))) } + if context.Bool("net-host") { + return nil, errors.New("Cannot use host mode networking with Windows containers") + } if context.Bool("isolated") { opts = append(opts, oci.WithWindowsHyperV) } diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/tasks/metrics.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/tasks/metrics.go index 2330482b42a..263f183a351 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/tasks/metrics.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/tasks/metrics.go @@ -25,7 +25,9 @@ import ( "os" "text/tabwriter" - "github.com/containerd/cgroups" + wstats "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats" + v1 "github.com/containerd/cgroups/stats/v1" + v2 "github.com/containerd/cgroups/v2/stats" "github.com/containerd/containerd/cmd/ctr/commands" "github.com/containerd/typeurl" "github.com/urfave/cli" @@ -77,9 +79,20 @@ var metricsCommand = cli.Command{ if err != nil { return err } - data, ok := anydata.(*cgroups.Metrics) - if !ok { - return errors.New("cannot convert metric data to cgroups.Metrics") + var ( + data *v1.Metrics + data2 *v2.Metrics + windowsStats *wstats.Statistics + ) + switch v := anydata.(type) { + case *v1.Metrics: + data = v + case *v2.Metrics: + data2 = v + case *wstats.Statistics: + windowsStats = v + default: + return errors.New("cannot convert metric data to cgroups.Metrics or windows.Statistics") } switch context.String(formatFlag) { @@ -87,24 +100,24 @@ var metricsCommand = cli.Command{ w := tabwriter.NewWriter(os.Stdout, 1, 8, 4, ' ', 0) fmt.Fprintf(w, "ID\tTIMESTAMP\t\n") fmt.Fprintf(w, "%s\t%s\t\n\n", metric.ID, metric.Timestamp) - - fmt.Fprintf(w, "METRIC\tVALUE\t\n") - if data.Memory != nil { - fmt.Fprintf(w, "memory.usage_in_bytes\t%d\t\n", data.Memory.Usage.Usage) - fmt.Fprintf(w, "memory.limit_in_bytes\t%d\t\n", data.Memory.Usage.Limit) - fmt.Fprintf(w, "memory.stat.cache\t%d\t\n", data.Memory.TotalCache) - } - if data.CPU != nil { - fmt.Fprintf(w, "cpuacct.usage\t%d\t\n", data.CPU.Usage.Total) - fmt.Fprintf(w, "cpuacct.usage_percpu\t%v\t\n", data.CPU.Usage.PerCPU) - } - if data.Pids != nil { - fmt.Fprintf(w, "pids.current\t%v\t\n", data.Pids.Current) - fmt.Fprintf(w, "pids.limit\t%v\t\n", data.Pids.Limit) + if data != nil { + printCgroupMetricsTable(w, data) + } else if data2 != nil { + printCgroup2MetricsTable(w, data2) + } else { + if windowsStats.GetLinux() != nil { + printCgroupMetricsTable(w, windowsStats.GetLinux()) + } else if windowsStats.GetWindows() != nil { + printWindowsContainerStatistics(w, windowsStats.GetWindows()) + } + // Print VM stats if its isolated + if windowsStats.VM != nil { + printWindowsVMStatistics(w, windowsStats.VM) + } } return w.Flush() case formatJSON: - marshaledJSON, err := json.MarshalIndent(data, "", " ") + marshaledJSON, err := json.MarshalIndent(anydata, "", " ") if err != nil { return err } @@ -115,3 +128,83 @@ var metricsCommand = cli.Command{ } }, } + +func printCgroupMetricsTable(w *tabwriter.Writer, data *v1.Metrics) { + fmt.Fprintf(w, "METRIC\tVALUE\t\n") + if data.Memory != nil { + fmt.Fprintf(w, "memory.usage_in_bytes\t%d\t\n", data.Memory.Usage.Usage) + fmt.Fprintf(w, "memory.limit_in_bytes\t%d\t\n", data.Memory.Usage.Limit) + fmt.Fprintf(w, "memory.stat.cache\t%d\t\n", data.Memory.TotalCache) + } + if data.CPU != nil { + fmt.Fprintf(w, "cpuacct.usage\t%d\t\n", data.CPU.Usage.Total) + fmt.Fprintf(w, "cpuacct.usage_percpu\t%v\t\n", data.CPU.Usage.PerCPU) + } + if data.Pids != nil { + fmt.Fprintf(w, "pids.current\t%v\t\n", data.Pids.Current) + fmt.Fprintf(w, "pids.limit\t%v\t\n", data.Pids.Limit) + } +} + +func printCgroup2MetricsTable(w *tabwriter.Writer, data *v2.Metrics) { + fmt.Fprintf(w, "METRIC\tVALUE\t\n") + if data.Pids != nil { + fmt.Fprintf(w, "pids.current\t%v\t\n", data.Pids.Current) + fmt.Fprintf(w, "pids.limit\t%v\t\n", data.Pids.Limit) + } + if data.CPU != nil { + fmt.Fprintf(w, "cpu.usage_usec\t%v\t\n", data.CPU.UsageUsec) + fmt.Fprintf(w, "cpu.user_usec\t%v\t\n", data.CPU.UserUsec) + fmt.Fprintf(w, "cpu.system_usec\t%v\t\n", data.CPU.SystemUsec) + fmt.Fprintf(w, "cpu.nr_periods\t%v\t\n", data.CPU.NrPeriods) + fmt.Fprintf(w, "cpu.nr_throttled\t%v\t\n", data.CPU.NrThrottled) + fmt.Fprintf(w, "cpu.throttled_usec\t%v\t\n", data.CPU.ThrottledUsec) + } + if data.Memory != nil { + fmt.Fprintf(w, "memory.usage\t%v\t\n", data.Memory.Usage) + fmt.Fprintf(w, "memory.usage_limit\t%v\t\n", data.Memory.UsageLimit) + fmt.Fprintf(w, "memory.swap_usage\t%v\t\n", data.Memory.SwapUsage) + fmt.Fprintf(w, "memory.swap_limit\t%v\t\n", data.Memory.SwapLimit) + } +} + +func printWindowsContainerStatistics(w *tabwriter.Writer, stats *wstats.WindowsContainerStatistics) { + fmt.Fprintf(w, "METRIC\tVALUE\t\n") + fmt.Fprintf(w, "timestamp\t%s\t\n", stats.Timestamp) + fmt.Fprintf(w, "start_time\t%s\t\n", stats.ContainerStartTime) + fmt.Fprintf(w, "uptime_ns\t%d\t\n", stats.UptimeNS) + if stats.Processor != nil { + fmt.Fprintf(w, "cpu.total_runtime_ns\t%d\t\n", stats.Processor.TotalRuntimeNS) + fmt.Fprintf(w, "cpu.runtime_user_ns\t%d\t\n", stats.Processor.RuntimeUserNS) + fmt.Fprintf(w, "cpu.runtime_kernel_ns\t%d\t\n", stats.Processor.RuntimeUserNS) + } + if stats.Memory != nil { + fmt.Fprintf(w, "memory.commit_bytes\t%d\t\n", stats.Memory.MemoryUsageCommitBytes) + fmt.Fprintf(w, "memory.commit_peak_bytes\t%d\t\n", stats.Memory.MemoryUsageCommitPeakBytes) + fmt.Fprintf(w, "memory.private_working_set_bytes\t%d\t\n", stats.Memory.MemoryUsagePrivateWorkingSetBytes) + } + if stats.Storage != nil { + fmt.Fprintf(w, "storage.read_count_normalized\t%d\t\n", stats.Storage.ReadCountNormalized) + fmt.Fprintf(w, "storage.read_size_bytes\t%d\t\n", stats.Storage.ReadSizeBytes) + fmt.Fprintf(w, "storage.write_count_normalized\t%d\t\n", stats.Storage.WriteCountNormalized) + fmt.Fprintf(w, "storage.write_size_bytes\t%d\t\n", stats.Storage.WriteSizeBytes) + } +} + +func printWindowsVMStatistics(w *tabwriter.Writer, stats *wstats.VirtualMachineStatistics) { + fmt.Fprintf(w, "METRIC\tVALUE\t\n") + if stats.Processor != nil { + fmt.Fprintf(w, "vm.cpu.total_runtime_ns\t%d\t\n", stats.Processor.TotalRuntimeNS) + } + if stats.Memory != nil { + fmt.Fprintf(w, "vm.memory.working_set_bytes\t%d\t\n", stats.Memory.WorkingSetBytes) + fmt.Fprintf(w, "vm.memory.virtual_node_count\t%d\t\n", stats.Memory.VirtualNodeCount) + fmt.Fprintf(w, "vm.memory.available\t%d\t\n", stats.Memory.VmMemory.AvailableMemory) + fmt.Fprintf(w, "vm.memory.available_buffer\t%d\t\n", stats.Memory.VmMemory.AvailableMemoryBuffer) + fmt.Fprintf(w, "vm.memory.reserved\t%d\t\n", stats.Memory.VmMemory.ReservedMemory) + fmt.Fprintf(w, "vm.memory.assigned\t%d\t\n", stats.Memory.VmMemory.AssignedMemory) + fmt.Fprintf(w, "vm.memory.slp_active\t%t\t\n", stats.Memory.VmMemory.SlpActive) + fmt.Fprintf(w, "vm.memory.balancing_enabled\t%t\t\n", stats.Memory.VmMemory.BalancingEnabled) + fmt.Fprintf(w, "vm.memory.dm_operation_in_progress\t%t\t\n", stats.Memory.VmMemory.DmOperationInProgress) + } +} diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/tasks/start.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/tasks/start.go index 0255cb999f3..de55767ee83 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/tasks/start.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/tasks/start.go @@ -28,7 +28,7 @@ import ( var startCommand = cli.Command{ Name: "start", - Usage: "start a container that have been created", + Usage: "start a container that has been created", ArgsUsage: "CONTAINER", Flags: []cli.Flag{ cli.BoolFlag{ diff --git a/vendor/github.com/containerd/containerd/cmd/ctr/commands/version/version.go b/vendor/github.com/containerd/containerd/cmd/ctr/commands/version/version.go index 9ed3f18969e..46732969e3a 100644 --- a/vendor/github.com/containerd/containerd/cmd/ctr/commands/version/version.go +++ b/vendor/github.com/containerd/containerd/cmd/ctr/commands/version/version.go @@ -33,6 +33,7 @@ var Command = cli.Command{ fmt.Println("Client:") fmt.Println(" Version: ", version.Version) fmt.Println(" Revision:", version.Revision) + fmt.Println(" Go version:", version.GoVersion) fmt.Println("") client, ctx, cancel, err := commands.NewClient(context) if err != nil { diff --git a/vendor/github.com/containerd/containerd/container.go b/vendor/github.com/containerd/containerd/container.go index a893364c56c..8384a481fc6 100644 --- a/vendor/github.com/containerd/containerd/container.go +++ b/vendor/github.com/containerd/containerd/container.go @@ -290,6 +290,7 @@ func (c *container) NewTask(ctx context.Context, ioCreate cio.Creator, opts ...N client: c.client, io: i, id: c.id, + c: c, } if info.Checkpoint != nil { request.Checkpoint = info.Checkpoint @@ -407,6 +408,7 @@ func (c *container) loadTask(ctx context.Context, ioAttach cio.Attach) (Task, er io: i, id: response.Process.ID, pid: response.Process.Pid, + c: c, } return t, nil } diff --git a/vendor/github.com/containerd/containerd/container_opts.go b/vendor/github.com/containerd/containerd/container_opts.go index 8954840235d..5ffd5282e41 100644 --- a/vendor/github.com/containerd/containerd/container_opts.go +++ b/vendor/github.com/containerd/containerd/container_opts.go @@ -226,7 +226,7 @@ func WithContainerExtension(name string, extension interface{}) NewContainerOpts any, err := typeurl.MarshalAny(extension) if err != nil { - if errors.Cause(err) == typeurl.ErrNotFound { + if errors.Is(err, typeurl.ErrNotFound) { return errors.Wrapf(err, "extension %q is not registered with the typeurl package, see `typeurl.Register`", name) } return errors.Wrap(err, "error marshalling extension") diff --git a/vendor/github.com/containerd/containerd/containerd.service b/vendor/github.com/containerd/containerd/containerd.service index cae30ec7ce0..d0f3be7b31d 100644 --- a/vendor/github.com/containerd/containerd/containerd.service +++ b/vendor/github.com/containerd/containerd/containerd.service @@ -1,3 +1,17 @@ +# Copyright The containerd 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. + [Unit] Description=containerd container runtime Documentation=https://containerd.io @@ -11,6 +25,7 @@ Type=notify Delegate=yes KillMode=process Restart=always +RestartSec=5 # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. LimitNPROC=infinity @@ -19,6 +34,7 @@ LimitNOFILE=1048576 # Comment TasksMax if your systemd version does not supports it. # Only systemd 226 and above support this version. TasksMax=infinity +OOMScoreAdjust=-999 [Install] WantedBy=multi-user.target diff --git a/vendor/github.com/containerd/containerd/content/local/store.go b/vendor/github.com/containerd/containerd/content/local/store.go index efc58ea79ec..87056814ab8 100644 --- a/vendor/github.com/containerd/containerd/content/local/store.go +++ b/vendor/github.com/containerd/containerd/content/local/store.go @@ -92,7 +92,11 @@ func NewLabeledStore(root string, ls LabelStore) (content.Store, error) { } func (s *store) Info(ctx context.Context, dgst digest.Digest) (content.Info, error) { - p := s.blobPath(dgst) + p, err := s.blobPath(dgst) + if err != nil { + return content.Info{}, errors.Wrapf(err, "calculating blob info path") + } + fi, err := os.Stat(p) if err != nil { if os.IsNotExist(err) { @@ -123,7 +127,10 @@ func (s *store) info(dgst digest.Digest, fi os.FileInfo, labels map[string]strin // ReaderAt returns an io.ReaderAt for the blob. func (s *store) ReaderAt(ctx context.Context, desc ocispec.Descriptor) (content.ReaderAt, error) { - p := s.blobPath(desc.Digest) + p, err := s.blobPath(desc.Digest) + if err != nil { + return nil, errors.Wrapf(err, "calculating blob path for ReaderAt") + } fi, err := os.Stat(p) if err != nil { if !os.IsNotExist(err) { @@ -150,7 +157,12 @@ func (s *store) ReaderAt(ctx context.Context, desc ocispec.Descriptor) (content. // While this is safe to do concurrently, safe exist-removal logic must hold // some global lock on the store. func (s *store) Delete(ctx context.Context, dgst digest.Digest) error { - if err := os.RemoveAll(s.blobPath(dgst)); err != nil { + bp, err := s.blobPath(dgst) + if err != nil { + return errors.Wrapf(err, "calculating blob path for delete") + } + + if err := os.RemoveAll(bp); err != nil { if !os.IsNotExist(err) { return err } @@ -166,7 +178,11 @@ func (s *store) Update(ctx context.Context, info content.Info, fieldpaths ...str return content.Info{}, errors.Wrapf(errdefs.ErrFailedPrecondition, "update not supported on immutable content store") } - p := s.blobPath(info.Digest) + p, err := s.blobPath(info.Digest) + if err != nil { + return content.Info{}, errors.Wrapf(err, "calculating blob path for update") + } + fi, err := os.Stat(p) if err != nil { if os.IsNotExist(err) { @@ -512,7 +528,10 @@ func (s *store) writer(ctx context.Context, ref string, total int64, expected di // TODO(stevvooe): Need to actually store expected here. We have // code in the service that shouldn't be dealing with this. if expected != "" { - p := s.blobPath(expected) + p, err := s.blobPath(expected) + if err != nil { + return nil, errors.Wrap(err, "calculating expected blob path for writer") + } if _, err := os.Stat(p); err == nil { return nil, errors.Wrapf(errdefs.ErrAlreadyExists, "content %v", expected) } @@ -607,11 +626,17 @@ func (s *store) Abort(ctx context.Context, ref string) error { return nil } -func (s *store) blobPath(dgst digest.Digest) string { - return filepath.Join(s.root, "blobs", dgst.Algorithm().String(), dgst.Hex()) +func (s *store) blobPath(dgst digest.Digest) (string, error) { + if err := dgst.Validate(); err != nil { + return "", errors.Wrapf(errdefs.ErrInvalidArgument, "cannot calculate blob path from invalid digest: %v", err) + } + + return filepath.Join(s.root, "blobs", dgst.Algorithm().String(), dgst.Hex()), nil } func (s *store) ingestRoot(ref string) string { + // we take a digest of the ref to keep the ingest paths constant length. + // Note that this is not the current or potential digest of incoming content. dgst := digest.FromString(ref) return filepath.Join(s.root, "ingest", dgst.Hex()) } diff --git a/vendor/github.com/containerd/containerd/content/local/writer.go b/vendor/github.com/containerd/containerd/content/local/writer.go index 3a94744e72d..0a11f4d912e 100644 --- a/vendor/github.com/containerd/containerd/content/local/writer.go +++ b/vendor/github.com/containerd/containerd/content/local/writer.go @@ -115,8 +115,8 @@ func (w *writer) Commit(ctx context.Context, size int64, expected digest.Digest, } var ( - ingest = filepath.Join(w.path, "data") - target = w.s.blobPath(dgst) + ingest = filepath.Join(w.path, "data") + target, _ = w.s.blobPath(dgst) // ignore error because we calculated this dgst ) // make sure parent directories of blob exist diff --git a/vendor/github.com/containerd/containerd/contrib/apparmor/apparmor_unsupported.go b/vendor/github.com/containerd/containerd/contrib/apparmor/apparmor_unsupported.go new file mode 100644 index 00000000000..0429954eadc --- /dev/null +++ b/vendor/github.com/containerd/containerd/contrib/apparmor/apparmor_unsupported.go @@ -0,0 +1,43 @@ +// +build !linux + +/* + Copyright The containerd 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 apparmor + +import ( + "context" + + "github.com/containerd/containerd/containers" + "github.com/containerd/containerd/oci" + specs "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" +) + +// WithProfile sets the provided apparmor profile to the spec +func WithProfile(profile string) oci.SpecOpts { + return func(_ context.Context, _ oci.Client, _ *containers.Container, s *specs.Spec) error { + return errors.New("apparmor is not supported") + } +} + +// WithDefaultProfile will generate a default apparmor profile under the provided name +// for the container. It is only generated if a profile under that name does not exist. +func WithDefaultProfile(name string) oci.SpecOpts { + return func(_ context.Context, _ oci.Client, _ *containers.Container, s *specs.Spec) error { + return errors.New("apparmor is not supported") + } +} diff --git a/vendor/github.com/containerd/containerd/contrib/seccomp/seccomp_default.go b/vendor/github.com/containerd/containerd/contrib/seccomp/seccomp_default.go index af40395de04..7da95a0c305 100644 --- a/vendor/github.com/containerd/containerd/contrib/seccomp/seccomp_default.go +++ b/vendor/github.com/containerd/containerd/contrib/seccomp/seccomp_default.go @@ -47,7 +47,7 @@ func arches() []specs.Arch { } } -// DefaultProfile defines the whitelist for the default seccomp profile. +// DefaultProfile defines the allowed syscalls for the default seccomp profile. func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { syscalls := []specs.LinuxSyscall{ { @@ -56,7 +56,6 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "accept4", "access", "alarm", - "alarm", "bind", "brk", "capget", @@ -65,9 +64,14 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "chmod", "chown", "chown32", + "clock_adjtime", + "clock_adjtime64", "clock_getres", + "clock_getres_time64", "clock_gettime", + "clock_gettime64", "clock_nanosleep", + "clock_nanosleep_time64", "close", "connect", "copy_file_range", @@ -117,6 +121,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "ftruncate", "ftruncate64", "futex", + "futex_time64", "futimesat", "getcpu", "getcwd", @@ -163,6 +168,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "io_destroy", "io_getevents", "io_pgetevents", + "io_pgetevents_time64", "ioprio_get", "ioprio_set", "io_setup", @@ -200,7 +206,9 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "mq_notify", "mq_open", "mq_timedreceive", + "mq_timedreceive_time64", "mq_timedsend", + "mq_timedsend_time64", "mq_unlink", "mremap", "msgctl", @@ -221,11 +229,13 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "pipe2", "poll", "ppoll", + "ppoll_time64", "prctl", "pread64", "preadv", "prlimit64", "pselect6", + "pselect6_time64", "pwrite64", "pwritev", "read", @@ -236,6 +246,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "recv", "recvfrom", "recvmmsg", + "recvmmsg_time64", "recvmsg", "remap_file_pages", "removexattr", @@ -244,6 +255,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "renameat2", "restart_syscall", "rmdir", + "rseq", "rt_sigaction", "rt_sigpending", "rt_sigprocmask", @@ -251,6 +263,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "rt_sigreturn", "rt_sigsuspend", "rt_sigtimedwait", + "rt_sigtimedwait_time64", "rt_tgsigqueueinfo", "sched_getaffinity", "sched_getattr", @@ -259,6 +272,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "sched_get_priority_min", "sched_getscheduler", "sched_rr_get_interval", + "sched_rr_get_interval_time64", "sched_setaffinity", "sched_setattr", "sched_setparam", @@ -270,6 +284,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "semget", "semop", "semtimedop", + "semtimedop_time64", "send", "sendfile", "sendfile64", @@ -335,12 +350,16 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "time", "timer_create", "timer_delete", - "timerfd_create", - "timerfd_gettime", - "timerfd_settime", "timer_getoverrun", "timer_gettime", + "timer_gettime64", "timer_settime", + "timer_settime64", + "timerfd_create", + "timerfd_gettime", + "timerfd_gettime64", + "timerfd_settime", + "timerfd_settime64", "times", "tkill", "truncate", @@ -352,6 +371,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "unlinkat", "utime", "utimensat", + "utimensat_time64", "utimes", "vfork", "vmsplice", @@ -496,7 +516,6 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { "delete_module", "init_module", "finit_module", - "query_module", }, Action: specs.ActAllow, Args: []specs.LinuxSeccompArg{}, diff --git a/vendor/github.com/containerd/containerd/contrib/seccomp/seccomp_default_unsupported.go b/vendor/github.com/containerd/containerd/contrib/seccomp/seccomp_default_unsupported.go index 14d7b75e18e..6d70510588d 100644 --- a/vendor/github.com/containerd/containerd/contrib/seccomp/seccomp_default_unsupported.go +++ b/vendor/github.com/containerd/containerd/contrib/seccomp/seccomp_default_unsupported.go @@ -20,7 +20,7 @@ package seccomp import specs "github.com/opencontainers/runtime-spec/specs-go" -// DefaultProfile defines the whitelist for the default seccomp profile. +// DefaultProfile defines the allowed syscalls for the default seccomp profile. func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp { return &specs.LinuxSeccomp{} } diff --git a/vendor/github.com/containerd/containerd/dialer/BUILD b/vendor/github.com/containerd/containerd/dialer/BUILD deleted file mode 100644 index d80ac24eb30..00000000000 --- a/vendor/github.com/containerd/containerd/dialer/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "dialer.go", - "dialer_unix.go", - "dialer_windows.go", - ], - importmap = "k8s.io/kubernetes/vendor/github.com/containerd/containerd/dialer", - importpath = "github.com/containerd/containerd/dialer", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/pkg/errors:go_default_library", - ] + select({ - "@io_bazel_rules_go//go/platform:windows": [ - "//vendor/github.com/Microsoft/go-winio:go_default_library", - ], - "//conditions:default": [], - }), -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/containerd/containerd/dialer/dialer.go b/vendor/github.com/containerd/containerd/dialer/dialer.go deleted file mode 100644 index 1ad4ab71830..00000000000 --- a/vendor/github.com/containerd/containerd/dialer/dialer.go +++ /dev/null @@ -1,51 +0,0 @@ -package dialer - -import ( - "net" - "time" - - "github.com/pkg/errors" -) - -type dialResult struct { - c net.Conn - err error -} - -// Dialer returns a GRPC net.Conn connected to the provided address -func Dialer(address string, timeout time.Duration) (net.Conn, error) { - var ( - stopC = make(chan struct{}) - synC = make(chan *dialResult) - ) - go func() { - defer close(synC) - for { - select { - case <-stopC: - return - default: - c, err := dialer(address, timeout) - if isNoent(err) { - <-time.After(10 * time.Millisecond) - continue - } - synC <- &dialResult{c, err} - return - } - } - }() - select { - case dr := <-synC: - return dr.c, dr.err - case <-time.After(timeout): - close(stopC) - go func() { - dr := <-synC - if dr != nil && dr.c != nil { - dr.c.Close() - } - }() - return nil, errors.Errorf("dial %s: timeout", address) - } -} diff --git a/vendor/github.com/containerd/containerd/dialer/dialer_unix.go b/vendor/github.com/containerd/containerd/dialer/dialer_unix.go deleted file mode 100644 index 7f8d43b0310..00000000000 --- a/vendor/github.com/containerd/containerd/dialer/dialer_unix.go +++ /dev/null @@ -1,36 +0,0 @@ -// +build !windows - -package dialer - -import ( - "fmt" - "net" - "os" - "strings" - "syscall" - "time" -) - -// DialAddress returns the address with unix:// prepended to the -// provided address -func DialAddress(address string) string { - return fmt.Sprintf("unix://%s", address) -} - -func isNoent(err error) bool { - if err != nil { - if nerr, ok := err.(*net.OpError); ok { - if serr, ok := nerr.Err.(*os.SyscallError); ok { - if serr.Err == syscall.ENOENT { - return true - } - } - } - } - return false -} - -func dialer(address string, timeout time.Duration) (net.Conn, error) { - address = strings.TrimPrefix(address, "unix://") - return net.DialTimeout("unix", address, timeout) -} diff --git a/vendor/github.com/containerd/containerd/dialer/dialer_windows.go b/vendor/github.com/containerd/containerd/dialer/dialer_windows.go deleted file mode 100644 index 2aac03898a3..00000000000 --- a/vendor/github.com/containerd/containerd/dialer/dialer_windows.go +++ /dev/null @@ -1,30 +0,0 @@ -package dialer - -import ( - "net" - "os" - "syscall" - "time" - - winio "github.com/Microsoft/go-winio" -) - -func isNoent(err error) bool { - if err != nil { - if oerr, ok := err.(*os.PathError); ok { - if oerr.Err == syscall.ENOENT { - return true - } - } - } - return false -} - -func dialer(address string, timeout time.Duration) (net.Conn, error) { - return winio.DialPipe(address, &timeout) -} - -// DialAddress returns the dial address -func DialAddress(address string) string { - return address -} diff --git a/vendor/github.com/containerd/containerd/diff/apply/apply_linux.go b/vendor/github.com/containerd/containerd/diff/apply/apply_linux.go index bbe9c17d957..5eeeced5c52 100644 --- a/vendor/github.com/containerd/containerd/diff/apply/apply_linux.go +++ b/vendor/github.com/containerd/containerd/diff/apply/apply_linux.go @@ -26,7 +26,7 @@ import ( "github.com/containerd/containerd/archive" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/mount" - "github.com/opencontainers/runc/libcontainer/system" + "github.com/containerd/containerd/sys" "github.com/pkg/errors" ) @@ -35,7 +35,7 @@ func apply(ctx context.Context, mounts []mount.Mount, r io.Reader) error { case len(mounts) == 1 && mounts[0].Type == "overlay": // OverlayConvertWhiteout (mknod c 0 0) doesn't work in userns. // https://github.com/containerd/containerd/issues/3762 - if system.RunningInUserNS() { + if sys.RunningInUserNS() { break } path, parents, err := getOverlayPath(mounts[0].Options) diff --git a/vendor/github.com/containerd/containerd/errdefs/errors.go b/vendor/github.com/containerd/containerd/errdefs/errors.go index b5200afc0ee..05a35228ca4 100644 --- a/vendor/github.com/containerd/containerd/errdefs/errors.go +++ b/vendor/github.com/containerd/containerd/errdefs/errors.go @@ -51,43 +51,43 @@ var ( // IsInvalidArgument returns true if the error is due to an invalid argument func IsInvalidArgument(err error) bool { - return errors.Cause(err) == ErrInvalidArgument + return errors.Is(err, ErrInvalidArgument) } // IsNotFound returns true if the error is due to a missing object func IsNotFound(err error) bool { - return errors.Cause(err) == ErrNotFound + return errors.Is(err, ErrNotFound) } // IsAlreadyExists returns true if the error is due to an already existing // metadata item func IsAlreadyExists(err error) bool { - return errors.Cause(err) == ErrAlreadyExists + return errors.Is(err, ErrAlreadyExists) } // IsFailedPrecondition returns true if an operation could not proceed to the // lack of a particular condition func IsFailedPrecondition(err error) bool { - return errors.Cause(err) == ErrFailedPrecondition + return errors.Is(err, ErrFailedPrecondition) } // IsUnavailable returns true if the error is due to a resource being unavailable func IsUnavailable(err error) bool { - return errors.Cause(err) == ErrUnavailable + return errors.Is(err, ErrUnavailable) } // IsNotImplemented returns true if the error is due to not being implemented func IsNotImplemented(err error) bool { - return errors.Cause(err) == ErrNotImplemented + return errors.Is(err, ErrNotImplemented) } // IsCanceled returns true if the error is due to `context.Canceled`. func IsCanceled(err error) bool { - return errors.Cause(err) == context.Canceled + return errors.Is(err, context.Canceled) } // IsDeadlineExceeded returns true if the error is due to // `context.DeadlineExceeded`. func IsDeadlineExceeded(err error) bool { - return errors.Cause(err) == context.DeadlineExceeded + return errors.Is(err, context.DeadlineExceeded) } diff --git a/vendor/github.com/containerd/containerd/events/exchange/exchange.go b/vendor/github.com/containerd/containerd/events/exchange/exchange.go index 59273c952f5..eb27bf29b30 100644 --- a/vendor/github.com/containerd/containerd/events/exchange/exchange.go +++ b/vendor/github.com/containerd/containerd/events/exchange/exchange.go @@ -225,7 +225,7 @@ func validateTopic(topic string) error { } func validateEnvelope(envelope *events.Envelope) error { - if err := namespaces.Validate(envelope.Namespace); err != nil { + if err := identifiers.Validate(envelope.Namespace); err != nil { return errors.Wrapf(err, "event envelope has invalid namespace") } diff --git a/vendor/github.com/containerd/containerd/gc/gc.go b/vendor/github.com/containerd/containerd/gc/gc.go index c6fcf79103c..4f71cb305c5 100644 --- a/vendor/github.com/containerd/containerd/gc/gc.go +++ b/vendor/github.com/containerd/containerd/gc/gc.go @@ -172,7 +172,7 @@ func ConcurrentMark(ctx context.Context, root <-chan Node, refs func(context.Con return seen, nil } -// Sweep removes all nodes returned through the channel which are not in +// Sweep removes all nodes returned through the slice which are not in // the reachable set by calling the provided remove function. func Sweep(reachable map[Node]struct{}, all []Node, remove func(Node) error) error { // All black objects are now reachable, and all white objects are diff --git a/vendor/github.com/containerd/containerd/go.mod b/vendor/github.com/containerd/containerd/go.mod new file mode 100644 index 00000000000..1f1543d8baa --- /dev/null +++ b/vendor/github.com/containerd/containerd/go.mod @@ -0,0 +1,81 @@ +module github.com/containerd/containerd + +go 1.14 + +replace ( + k8s.io/api => k8s.io/api v0.19.0 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.19.0 + k8s.io/apimachinery => k8s.io/apimachinery v0.19.0 + k8s.io/apiserver => k8s.io/apiserver v0.19.0 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.19.0 + k8s.io/client-go => k8s.io/client-go v0.19.0 + k8s.io/cloud-provider => k8s.io/cloud-provider v0.19.0 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.19.0 + k8s.io/code-generator => k8s.io/code-generator v0.19.0 + k8s.io/component-base => k8s.io/component-base v0.19.0 + k8s.io/cri-api => k8s.io/cri-api v0.19.0 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.19.0 + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.19.0 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.19.0 + k8s.io/kube-proxy => k8s.io/kube-proxy v0.19.0 + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.19.0 + k8s.io/kubectl => k8s.io/kubectl v0.19.0 + k8s.io/kubelet => k8s.io/kubelet v0.19.0 + k8s.io/kubernetes => k8s.io/kubernetes v1.19.0-rc.3 + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.19.0 + k8s.io/metrics => k8s.io/metrics v0.19.0 + k8s.io/node-api => k8s.io/node-api v0.19.0 + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.19.0 + k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.19.0 + k8s.io/sample-controller => k8s.io/sample-controller v0.19.0 +) + +require ( + github.com/BurntSushi/toml v0.3.1 + github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 + github.com/Microsoft/hcsshim v0.8.10-0.20200715222032-5eafd1556990 + github.com/Microsoft/hcsshim/test v0.0.0-20200803203718-d80bc7196cb0 + github.com/containerd/aufs v0.0.0-20191030083217-371312c1e31c + github.com/containerd/btrfs v0.0.0-20200117014249-153935315f4a + github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340 + github.com/containerd/console v1.0.0 + github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe + github.com/containerd/cri v1.11.1-0.20200810101850-4e6644c8cf7f + github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b + github.com/containerd/go-cni v1.0.0 // indirect + github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 + github.com/containerd/imgcrypt v1.0.1 // indirect + github.com/containerd/ttrpc v1.0.1 + github.com/containerd/typeurl v1.0.1 + github.com/containerd/zfs v0.0.0-20191030014035-9abf673ca6ff + github.com/containernetworking/plugins v0.7.6 // indirect + github.com/coreos/go-systemd/v22 v22.1.0 + github.com/docker/docker v17.12.0-ce-rc1.0.20200310163718-4634ce647cf2+incompatible // indirect + github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c + github.com/docker/go-metrics v0.0.1 + github.com/docker/go-units v0.4.0 + github.com/gogo/googleapis v1.3.2 + github.com/gogo/protobuf v1.3.1 + github.com/google/go-cmp v0.4.0 + github.com/google/uuid v1.1.1 + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 + github.com/hashicorp/go-multierror v1.0.0 + github.com/imdario/mergo v0.3.8 + github.com/opencontainers/go-digest v1.0.0 + github.com/opencontainers/image-spec v1.0.1 + github.com/opencontainers/runc v1.0.0-rc92 + github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6 + github.com/opencontainers/selinux v1.6.0 + github.com/pkg/errors v0.9.1 + github.com/prometheus/client_golang v1.7.1 + github.com/sirupsen/logrus v1.6.0 + github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 + github.com/tchap/go-patricia v2.2.6+incompatible // indirect + github.com/urfave/cli v1.22.2 + go.etcd.io/bbolt v1.3.5 + golang.org/x/net v0.0.0-20200707034311-ab3426394381 + golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e + golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 + google.golang.org/grpc v1.27.1 + gotest.tools/v3 v3.0.2 +) diff --git a/vendor/github.com/containerd/containerd/go.sum b/vendor/github.com/containerd/containerd/go.sum new file mode 100644 index 00000000000..21cfd47d88f --- /dev/null +++ b/vendor/github.com/containerd/containerd/go.sum @@ -0,0 +1,993 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= +bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690/go.mod h1:Ulb78X89vxKYgdL24HMTiXYHlyHEvruOj1ZPlqeNEZM= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v43.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= +github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317/go.mod h1:DF8FZRxMHMGv/vP2lQP6h+dYzzjpuRn24VeRiYn3qjQ= +github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA= +github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= +github.com/Microsoft/hcsshim v0.8.10-0.20200715222032-5eafd1556990 h1:1xpVY4dSUSbW3PcSGxZJhI8Z+CJiqbd933kM7HIinTc= +github.com/Microsoft/hcsshim v0.8.10-0.20200715222032-5eafd1556990/go.mod h1:ay/0dTb7NsG8QMDfsRfLHgZo/6xAJShLe1+ePPflihk= +github.com/Microsoft/hcsshim/test v0.0.0-20200803203718-d80bc7196cb0 h1:+qqN+HZE55Zap8OE1BmcVStbX6JHVhqeWKPi0kzF1eA= +github.com/Microsoft/hcsshim/test v0.0.0-20200803203718-d80bc7196cb0/go.mod h1:30A5igQ91GEmhYJF8TaRP79pMBOYynRsyOByfVV0dU4= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM= +github.com/aws/aws-sdk-go v1.6.10/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k= +github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/aws/aws-sdk-go v1.28.2/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E= +github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= +github.com/checkpoint-restore/go-criu/v4 v4.0.2/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= +github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= +github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= +github.com/cilium/ebpf v0.0.0-20200507155900-a9f01edf17e3/go.mod h1:XT+cAw5wfvsodedcijoh1l9cf7v1x9FlFB/3VmF/O8s= +github.com/cilium/ebpf v0.0.0-20200601085316-9f1617e5c574/go.mod h1:XT+cAw5wfvsodedcijoh1l9cf7v1x9FlFB/3VmF/O8s= +github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775 h1:cHzBGGVew0ezFsq2grfy2RsB8hO/eNyBgOLHBCqfR1U= +github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= +github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4= +github.com/containerd/aufs v0.0.0-20191030083217-371312c1e31c h1:s8l4MEuQWwBbV7OjkQwd6C1y1pad61wH4VbfBNVE8sw= +github.com/containerd/aufs v0.0.0-20191030083217-371312c1e31c/go.mod h1:KWTFEKnST/R6wiSG+n7rid/ZQJxi73594So04IsWRpc= +github.com/containerd/btrfs v0.0.0-20200117014249-153935315f4a h1:u5X1yvVEsXLcuTWYsFSpTgQKRvo2VTB5gOHcERpF9ZI= +github.com/containerd/btrfs v0.0.0-20200117014249-153935315f4a/go.mod h1:9afkRVryuhYLCslfHT9CTHD26H9fzpBG298BNYnrnoI= +github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= +github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340 h1:9atoWyI9RtXFwf7UDbme/6M8Ud0rFrx+Q3ZWgSnsxtw= +github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/containerd/console v1.0.0 h1:fU3UuQapBs+zLJu82NhR11Rif1ny2zfMMAyPJzSN5tQ= +github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe h1:PEmIrUvwG9Yyv+0WKZqjXfSFDeZjs/q15g0m08BYS9k= +github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= +github.com/containerd/cri v1.11.1-0.20200810101850-4e6644c8cf7f h1:ykLRc6z/7ezblpYiNjJ3NnvbTcdF9wczim62jYP3Ncg= +github.com/containerd/cri v1.11.1-0.20200810101850-4e6644c8cf7f/go.mod h1:DavH5Qa8+6jOmeOMO3dhWoqksucZDe06LfuhBz/xPZs= +github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b h1:qUtCegLdOUVfVJOw+KDg6eJyE1TGvLlkGEd1091kSSQ= +github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= +github.com/containerd/go-cni v1.0.0 h1:A681A9YQ5Du9V2/gZGk/pTm6g69wF0aGd9qFN9syB1E= +github.com/containerd/go-cni v1.0.0/go.mod h1:8n8EnvP0b886Wmqum9jDXlN59aHCIBKgaNYQzcDvJbU= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 h1:PRTagVMbJcCezLcHXe8UJvR1oBzp2lG3CEumeFOLOds= +github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= +github.com/containerd/imgcrypt v1.0.1 h1:IyI3IIP4m6zrNFuNFT7HizGVcuD6BYJFpdM1JvPKCbQ= +github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v1.0.0/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v1.0.1 h1:IfVOxKbjyBn9maoye2JN95pgGYOmPkQVqxtOu7rtNIc= +github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/containerd/typeurl v1.0.0/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/containerd/typeurl v1.0.1 h1:PvuK4E3D5S5q6IqsPDCy928FhP0LUIGcmZ/Yhgp5Djw= +github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= +github.com/containerd/zfs v0.0.0-20191030014035-9abf673ca6ff h1:MirPpzlw+X8agatYAj4bwvdghOBRN6DYkwwiSnVtHc8= +github.com/containerd/zfs v0.0.0-20191030014035-9abf673ca6ff/go.mod h1:mp4bnlceN4Zxp2fwNMzdKcPMopBajlb+VrHYSpKipcE= +github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.0 h1:BT9lpgGoH4jw3lFC7Odz2prU5ruiYKcgAjMCbgybcKI= +github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/plugins v0.7.6 h1:ls5oA8x1GrdkoREBg0j/97U9P6SX75UaXb++req5kIo= +github.com/containernetworking/plugins v0.7.6/go.mod h1:dagHaAhNjXjT9QYOklkKJDGaQPTg4pf//FrUcJeb7FU= +github.com/containers/ocicrypt v1.0.1 h1:EToign46OSLTFWnb2oNj9RG3XDnkOX8r28ZIXUuk5Pc= +github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= +github.com/coredns/corefile-migration v1.0.10/go.mod h1:RMy/mXdeDlYwzt0vdMEJvT2hGJ2I86/eO0UdXmH9XNI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.1.0 h1:kq/SbG2BCKLkDKkjQf5OWwKWUKj1lgs3lFI4PxnR5lg= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= +github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= +github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= +github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v1.4.2-0.20200309214505-aa6a9891b09c/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v17.12.0-ce-rc1.0.20200310163718-4634ce647cf2+incompatible h1:ax4NateCD5bjRTqLvQBlFrSUPOoZRgEXWpJ6Bmu6OO0= +github.com/docker/docker v17.12.0-ce-rc1.0.20200310163718-4634ce647cf2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= +github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= +github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= +github.com/evanphx/json-patch v0.0.0-20190815234213-e83c0a1c26c8/go.mod h1:pmLOTb3x90VhIKxsA9yeQG5yfOkkKnkk1h+Ql8NDYDw= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= +github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa h1:RDBNVkRviHZtvDvId8XSGPu3rmpmSe+wKRcEWNgsfWU= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-acme/lego v2.5.0+incompatible/go.mod h1:yzMNe9CasVUhkquNvti5nAtPmG94USbYxYrZfTkIn0M= +github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.9.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= +github.com/gogo/googleapis v1.3.2 h1:kX1es4djPJrsDhY7aZKJy7aZasdcB5oSOEphMjSB53c= +github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= +github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= +github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/cadvisor v0.37.0/go.mod h1:OhDE+goNVel0eGY8mR7Ifq1QUI1in5vJBIgIpcajK/I= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/heketi/heketi v9.0.1-0.20190917153846-c2e2a4ab7ab9+incompatible/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o= +github.com/heketi/tests v0.0.0-20151005000721-f3775cbcefd6/go.mod h1:xGMAM8JLi7UkZt1i4FQeQy0R2T8GLUwQhOP5M1gBhy4= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/ishidawataru/sctp v0.0.0-20190723014705-7c296d48a2b5/go.mod h1:DM4VvS+hD/kDi1U1QsX2fnZowwBhqD0Dk3bRPKF/Oc8= +github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a/go.mod h1:wK6yTYYcgjHE1Z1QtXACPDjcFJyBskHEdagmnq3vsP8= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/libopenstorage/openstorage v1.0.0/go.mod h1:Sp1sIObHjat1BeXhfMqLZ14wnOzEhNx2YQedreMcUyc= +github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= +github.com/lpabon/godbc v0.1.1/go.mod h1:Jo9QV0cf3U6jZABgiJ2skINAXb9j8m51r07g4KI92ZA= +github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f/go.mod h1:JpH9J1c9oX6otFSgdUHwUBUizmKlrMjxWnIAjff4m04= +github.com/lucas-clemente/quic-clients v0.1.0/go.mod h1:y5xVIEoObKqULIKivu+gD/LU90pL73bTdtQjPBvtCBk= +github.com/lucas-clemente/quic-go v0.10.2/go.mod h1:hvaRS9IHjFLMq76puFJeWNfmn+H70QZ/CXoxqw9bzao= +github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced/go.mod h1:NCcRLrOTZbzhZvixZLlERbJtDtYsmMw8Jc4vS8Z0g58= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= +github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mholt/certmagic v0.6.2-0.20190624175158-6a42ef9fe8c2/go.mod h1:g4cOPxcjV0oFq3qwpjSA30LReKD8AoIfwAY9VvG35NY= +github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mindprince/gonvml v0.0.0-20190828220739-9ebdce4bb989/go.mod h1:2eu9pRWp8mo84xCg6KswZ+USQHjwgRhNp06sozOdsTY= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= +github.com/moby/ipvs v1.0.1/go.mod h1:2pngiyseZbIKXNv7hsKj3O9UEz30c53MT9005gt2hxQ= +github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= +github.com/mrunalp/fileutils v0.0.0-20200520151820-abd8a0e76976/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mvdan/xurls v1.1.0/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc90.0.20200616040943-82d2fa4eb069/go.mod h1:3Sm6Dt7OT8z88EbdQqqcRN2oCT54jbi72tT/HqgflT8= +github.com/opencontainers/runc v1.0.0-rc91.0.20200707015106-819fcc687efb/go.mod h1:ZuXhqlr4EiRYgDrBDNfSbE4+n9JX4+V107NwAmF7sZA= +github.com/opencontainers/runc v1.0.0-rc92 h1:+IczUKCRzDzFDnw99O/PAqrcBBCoRp9xN3cB1SYSNS4= +github.com/opencontainers/runc v1.0.0-rc92/go.mod h1:X1zlU4p7wOlX4+WRCz+hvlRv8phdL7UqbYD+vQwNMmE= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20200520003142-237cc4f519e2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6 h1:NhsM2gc769rVWDqJvapK37r+7+CBXI8xHhnfnt8uQsg= +github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/opencontainers/selinux v1.5.1/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g= +github.com/opencontainers/selinux v1.5.2/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g= +github.com/opencontainers/selinux v1.6.0 h1:+bIAS/Za3q5FTwWym4fTB0vObnfCf3G/NC7K6Jx62mY= +github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI= +github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= +github.com/robfig/cron v1.1.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= +github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= +github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8= +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/tchap/go-patricia v2.2.6+incompatible h1:JvoDL7JSoIP2HDE8AbDH3zC8QBPxmzYe32HHy5yQ+Ck= +github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/thecodeteam/goscaleio v0.1.0/go.mod h1:68sdkZAsK8bvEwBlbQnlLS+xU+hvLYM/iQ8KXej1AwM= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/vishvananda/netns v0.0.0-20200520041808-52d707b772fe/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243 h1:R43TdZy32XXSXjJn7M/HhALJ9imq6ztLnChfYJpVDnM= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200716221620-18dfb9cca345/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 h1:sIky/MyNRSHTrdxfsiUSS4WIAMvInbeXljJz+jDjeYE= +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= +gonum.org/v1/gonum v0.6.2/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.1-0.20200106000736-b8fc810ca6b5/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.1/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/mcuadros/go-syslog.v2 v2.2.1/go.mod h1:l5LPIyOOyIdQquNg+oU6Z3524YwrcqEm0aKH+5zpt2U= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2 h1:kG1BFyqVHuQoVQiR1bWGnfz/fmHvvuiSPIV7rvl360E= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.19.0 h1:XyrFIJqTYZJ2DU7FBE/bSPz7b1HvbVBuBf07oeo6eTc= +k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= +k8s.io/apiextensions-apiserver v0.19.0/go.mod h1:znfQxNpjqz/ZehvbfMg5N6fvBJW5Lqu5HVLTJQdP4Fs= +k8s.io/apimachinery v0.19.0 h1:gjKnAda/HZp5k4xQYjL0K/Yb66IvNqjthCb03QlKpaQ= +k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apiserver v0.19.0 h1:jLhrL06wGAADbLUUQm8glSLnAGP6c7y5R3p19grkBoY= +k8s.io/apiserver v0.19.0/go.mod h1:XvzqavYj73931x7FLtyagh8WibHpePJ1QwWrSJs2CLk= +k8s.io/cli-runtime v0.19.0/go.mod h1:tun9l0eUklT8IHIM0jors17KmUjcrAxn0myoBYwuNuo= +k8s.io/client-go v0.19.0 h1:1+0E0zfWFIWeyRhQYWzimJOyAk2UT7TiARaLNwJCf7k= +k8s.io/client-go v0.19.0/go.mod h1:H9E/VT95blcFQnlyShFgnFT9ZnJOAceiUHM3MlRC+mU= +k8s.io/cloud-provider v0.19.0/go.mod h1:TYh7b7kQ6wiqF7Ftb+u3lN4IwvgOPbBrcvC3TDAW4cw= +k8s.io/cluster-bootstrap v0.19.0/go.mod h1:kBn1DKyqoM245wzz+AAnGkuysJ+9GqVbPYveTo4KiaA= +k8s.io/code-generator v0.19.0/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= +k8s.io/component-base v0.19.0/go.mod h1:dKsY8BxkA+9dZIAh2aWJLL/UdASFDNtGYTCItL4LM7Y= +k8s.io/cri-api v0.19.0 h1:E7pzljbF7nF3DPHUAURy8ATCMaXV0RjmG2bKcvpd6iU= +k8s.io/cri-api v0.19.0/go.mod h1:UN/iU9Ua0iYdDREBXNE9vqCJ7MIh/FW3VIL0d8pw7Fw= +k8s.io/csi-translation-lib v0.19.0/go.mod h1:zGS1YqV8U2So/t4Hz8SoRXMx5y5/KSKnA6BXXxGuo4A= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-aggregator v0.19.0/go.mod h1:1Ln45PQggFAG8xOqWPIYMxUq8WNtpPnYsbUJ39DpF/A= +k8s.io/kube-controller-manager v0.19.0/go.mod h1:uGZyiHK73NxNEN5EZv/Esm3fbCOzeq4ndttMexVZ1L0= +k8s.io/kube-openapi v0.0.0-20200427153329-656914f816f9/go.mod h1:bfCVj+qXcEaE5SCvzBaqpOySr6tuCcpPKqF6HD8nyCw= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/kube-proxy v0.19.0/go.mod h1:7NoJCFgsWb7iiMB1F6bW1St5rEXC+ir2aWiJehASmTU= +k8s.io/kube-scheduler v0.19.0/go.mod h1:1XGjJUgstM0/0x8to+bSGSyCs3Dp3dbCEr3Io/mvd4s= +k8s.io/kubectl v0.19.0/go.mod h1:gPCjjsmE6unJzgaUNXIFGZGafiUp5jh0If3F/x7/rRg= +k8s.io/kubelet v0.19.0/go.mod h1:cGds22piF/LnFzfAaIT+efvOYBHVYdunqka6NVuNw9g= +k8s.io/kubernetes v1.19.0-rc.3/go.mod h1:/Rn3K3klFcLlygTY7b1HJpwMhJYQQe5LWSixTAfFh0c= +k8s.io/legacy-cloud-providers v0.19.0/go.mod h1:Q5czDCPnStdpFohMpcbnqL+MLR75kUhIDIsnmwEm0/o= +k8s.io/metrics v0.19.0/go.mod h1:WykpW8B60OeAJx1imdwUgyOID2kDljr/Q+1zrPJ98Wo= +k8s.io/sample-apiserver v0.19.0/go.mod h1:Bq9UulNoKnT72JqlkWF2JS14cXxJqcmvLtb5+EcwiNA= +k8s.io/system-validators v1.1.2/go.mod h1:bPldcLgkIUK22ALflnsXk8pvkTEndYdNuaHH6gRrl0Q= +k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200720150651-0bdb4ca86cbc/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= +modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= +modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= +modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= +modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= +sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/vendor/github.com/containerd/containerd/identifiers/validate.go b/vendor/github.com/containerd/containerd/identifiers/validate.go index c0dd820ff6e..f52317b491b 100644 --- a/vendor/github.com/containerd/containerd/identifiers/validate.go +++ b/vendor/github.com/containerd/containerd/identifiers/validate.go @@ -42,13 +42,13 @@ var ( identifierRe = regexp.MustCompile(reAnchor(alphanum + reGroup(separators+reGroup(alphanum)) + "*")) ) -// Validate return nil if the string s is a valid identifier. +// Validate returns nil if the string s is a valid identifier. // -// identifiers must be valid domain names according to RFC 1035, section 2.3.1. To -// enforce case insensitivity, all characters must be lower case. +// identifiers are similar to the domain name rules according to RFC 1035, section 2.3.1. However +// rules in this package are relaxed to allow numerals to follow period (".") and mixed case is +// allowed. // -// In general, identifiers that pass this validation, should be safe for use as -// a domain names or filesystem path component. +// In general identifiers that pass this validation should be safe for use as filesystem path components. func Validate(s string) error { if len(s) == 0 { return errors.Wrapf(errdefs.ErrInvalidArgument, "identifier must not be empty") diff --git a/vendor/github.com/containerd/containerd/image.go b/vendor/github.com/containerd/containerd/image.go index 6b72ed4b8d9..c96b7930171 100644 --- a/vendor/github.com/containerd/containerd/image.go +++ b/vendor/github.com/containerd/containerd/image.go @@ -58,6 +58,8 @@ type Image interface { IsUnpacked(context.Context, string) (bool, error) // ContentStore provides a content store which contains image blob data ContentStore() content.Store + // Metadata returns the underlying image metadata + Metadata() images.Image } type usageOptions struct { @@ -130,6 +132,10 @@ type image struct { platform platforms.MatchComparer } +func (i *image) Metadata() images.Image { + return i.i +} + func (i *image) Name() string { return i.i.Name } diff --git a/vendor/github.com/containerd/containerd/images/archive/exporter.go b/vendor/github.com/containerd/containerd/images/archive/exporter.go index 244ef322450..c9d3f6ec7e2 100644 --- a/vendor/github.com/containerd/containerd/images/archive/exporter.go +++ b/vendor/github.com/containerd/containerd/images/archive/exporter.go @@ -263,7 +263,7 @@ func getRecords(ctx context.Context, store content.Provider, desc ocispec.Descri images.HandlerFunc(exportHandler), ) - // Walk sequentially since the number of fetchs is likely one and doing in + // Walk sequentially since the number of fetches is likely one and doing in // parallel requires locking the export handler if err := images.Walk(ctx, handlers, desc); err != nil { return nil, err diff --git a/vendor/github.com/containerd/containerd/images/archive/importer.go b/vendor/github.com/containerd/containerd/images/archive/importer.go index 5bc887130f5..2d046589f8d 100644 --- a/vendor/github.com/containerd/containerd/images/archive/importer.go +++ b/vendor/github.com/containerd/containerd/images/archive/importer.go @@ -181,7 +181,7 @@ func ImportIndex(ctx context.Context, store content.Store, reader io.Reader, opt Layers: layers, } - desc, err := writeManifest(ctx, store, manifest, ocispec.MediaTypeImageManifest) + desc, err := writeManifest(ctx, store, manifest, manifest.MediaType) if err != nil { return ocispec.Descriptor{}, errors.Wrap(err, "write docker manifest") } diff --git a/vendor/github.com/containerd/containerd/images/archive/reference.go b/vendor/github.com/containerd/containerd/images/archive/reference.go index cd63517e535..ce9fe98f91b 100644 --- a/vendor/github.com/containerd/containerd/images/archive/reference.go +++ b/vendor/github.com/containerd/containerd/images/archive/reference.go @@ -20,7 +20,7 @@ import ( "strings" "github.com/containerd/containerd/reference" - distref "github.com/docker/distribution/reference" + distref "github.com/containerd/containerd/reference/docker" "github.com/opencontainers/go-digest" "github.com/pkg/errors" ) diff --git a/vendor/github.com/containerd/containerd/images/handlers.go b/vendor/github.com/containerd/containerd/images/handlers.go index 04c2d5a6055..05a9017bc27 100644 --- a/vendor/github.com/containerd/containerd/images/handlers.go +++ b/vendor/github.com/containerd/containerd/images/handlers.go @@ -22,6 +22,7 @@ import ( "sort" "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/platforms" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" @@ -63,7 +64,7 @@ func Handlers(handlers ...Handler) HandlerFunc { for _, handler := range handlers { ch, err := handler.Handle(ctx, desc) if err != nil { - if errors.Cause(err) == ErrStopHandler { + if errors.Is(err, ErrStopHandler) { break } return nil, err @@ -86,7 +87,7 @@ func Walk(ctx context.Context, handler Handler, descs ...ocispec.Descriptor) err children, err := handler.Handle(ctx, desc) if err != nil { - if errors.Cause(err) == ErrSkipDesc { + if errors.Is(err, ErrSkipDesc) { continue // don't traverse the children. } return err @@ -135,7 +136,7 @@ func Dispatch(ctx context.Context, handler Handler, limiter *semaphore.Weighted, limiter.Release(1) } if err != nil { - if errors.Cause(err) == ErrSkipDesc { + if errors.Is(err, ErrSkipDesc) { return nil // don't traverse the children. } return err @@ -169,6 +170,19 @@ func ChildrenHandler(provider content.Provider) HandlerFunc { // the children returned by the handler and passes through the children. // Must follow a handler that returns the children to be labeled. func SetChildrenLabels(manager content.Manager, f HandlerFunc) HandlerFunc { + return SetChildrenMappedLabels(manager, f, nil) +} + +// SetChildrenMappedLabels is a handler wrapper which sets labels for the content on +// the children returned by the handler and passes through the children. +// Must follow a handler that returns the children to be labeled. +// The label map allows the caller to control the labels per child descriptor. +// For returned labels, the index of the child will be appended to the end +// except for the first index when the returned label does not end with '.'. +func SetChildrenMappedLabels(manager content.Manager, f HandlerFunc, labelMap func(ocispec.Descriptor) []string) HandlerFunc { + if labelMap == nil { + labelMap = ChildGCLabels + } return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { children, err := f(ctx, desc) if err != nil { @@ -176,14 +190,26 @@ func SetChildrenLabels(manager content.Manager, f HandlerFunc) HandlerFunc { } if len(children) > 0 { - info := content.Info{ - Digest: desc.Digest, - Labels: map[string]string{}, - } - fields := []string{} - for i, ch := range children { - info.Labels[fmt.Sprintf("containerd.io/gc.ref.content.%d", i)] = ch.Digest.String() - fields = append(fields, fmt.Sprintf("labels.containerd.io/gc.ref.content.%d", i)) + var ( + info = content.Info{ + Digest: desc.Digest, + Labels: map[string]string{}, + } + fields = []string{} + keys = map[string]uint{} + ) + for _, ch := range children { + labelKeys := labelMap(ch) + for _, key := range labelKeys { + idx := keys[key] + keys[key] = idx + 1 + if idx > 0 || key[len(key)-1] == '.' { + key = fmt.Sprintf("%s%d", key, idx) + } + + info.Labels[key] = ch.Digest.String() + fields = append(fields, "labels."+key) + } } _, err := manager.Update(ctx, info, fields...) @@ -226,6 +252,7 @@ func FilterPlatforms(f HandlerFunc, m platforms.Matcher) HandlerFunc { // The results will be ordered according to the comparison operator and // use the ordering in the manifests for equal matches. // A limit of 0 or less is considered no limit. +// A not found error is returned if no manifest is matched. func LimitManifests(f HandlerFunc, m platforms.MatchComparer, n int) HandlerFunc { return func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { children, err := f(ctx, desc) @@ -245,8 +272,13 @@ func LimitManifests(f HandlerFunc, m platforms.MatchComparer, n int) HandlerFunc return m.Less(*children[i].Platform, *children[j].Platform) }) - if n > 0 && len(children) > n { - children = children[:n] + if n > 0 { + if len(children) == 0 { + return children, errors.Wrap(errdefs.ErrNotFound, "no match for platform in manifest") + } + if len(children) > n { + children = children[:n] + } } default: // only limit manifests from an index diff --git a/vendor/github.com/containerd/containerd/images/image.go b/vendor/github.com/containerd/containerd/images/image.go index ee5778d249f..1868ee88dd1 100644 --- a/vendor/github.com/containerd/containerd/images/image.go +++ b/vendor/github.com/containerd/containerd/images/image.go @@ -362,7 +362,7 @@ func Children(ctx context.Context, provider content.Provider, desc ocispec.Descr // childless data types. return nil, nil } - log.G(ctx).Warnf("encountered unknown type %v; children may not be fetched", desc.MediaType) + log.G(ctx).Debugf("encountered unknown type %v; children may not be fetched", desc.MediaType) } return descs, nil diff --git a/vendor/github.com/containerd/containerd/images/mediatypes.go b/vendor/github.com/containerd/containerd/images/mediatypes.go index 2f47b0e682d..c51897d25c8 100644 --- a/vendor/github.com/containerd/containerd/images/mediatypes.go +++ b/vendor/github.com/containerd/containerd/images/mediatypes.go @@ -23,6 +23,7 @@ import ( "github.com/containerd/containerd/errdefs" ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" ) // mediatype definitions for image components handled in containerd. @@ -81,7 +82,7 @@ func DiffCompression(ctx context.Context, mediaType string) (string, error) { } return "", nil default: - return "", errdefs.ErrNotImplemented + return "", errors.Wrapf(errdefs.ErrNotImplemented, "unrecognised mediatype %s", mediaType) } } @@ -124,3 +125,31 @@ func IsKnownConfig(mt string) bool { } return false } + +// ChildGCLabels returns the label for a given descriptor to reference it +func ChildGCLabels(desc ocispec.Descriptor) []string { + mt := desc.MediaType + if IsKnownConfig(mt) { + return []string{"containerd.io/gc.ref.content.config"} + } + + switch mt { + case MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest: + return []string{"containerd.io/gc.ref.content.m."} + } + + if IsLayerType(mt) { + return []string{"containerd.io/gc.ref.content.l."} + } + + return []string{"containerd.io/gc.ref.content."} +} + +// ChildGCLabelsFilterLayers returns the labels for a given descriptor to +// reference it, skipping layer media types +func ChildGCLabelsFilterLayers(desc ocispec.Descriptor) []string { + if IsLayerType(desc.MediaType) { + return nil + } + return ChildGCLabels(desc) +} diff --git a/vendor/github.com/containerd/containerd/install.go b/vendor/github.com/containerd/containerd/install.go index df6c8bc8ad7..7a8311c8321 100644 --- a/vendor/github.com/containerd/containerd/install.go +++ b/vendor/github.com/containerd/containerd/install.go @@ -24,7 +24,6 @@ import ( "runtime" "strings" - introspectionapi "github.com/containerd/containerd/api/services/introspection/v1" "github.com/containerd/containerd/archive" "github.com/containerd/containerd/archive/compression" "github.com/containerd/containerd/content" @@ -99,11 +98,8 @@ func (c *Client) getInstallPath(ctx context.Context, config InstallConfig) (stri if config.Path != "" { return config.Path, nil } - resp, err := c.IntrospectionService().Plugins(ctx, &introspectionapi.PluginsRequest{ - Filters: []string{ - "id==opt", - }, - }) + filters := []string{"id==opt"} + resp, err := c.IntrospectionService().Plugins(ctx, filters) if err != nil { return "", err } diff --git a/vendor/github.com/containerd/containerd/lease.go b/vendor/github.com/containerd/containerd/lease.go index d46b79d9f15..07ea6d93241 100644 --- a/vendor/github.com/containerd/containerd/lease.go +++ b/vendor/github.com/containerd/containerd/lease.go @@ -24,19 +24,27 @@ import ( ) // WithLease attaches a lease on the context -func (c *Client) WithLease(ctx context.Context) (context.Context, func(context.Context) error, error) { +func (c *Client) WithLease(ctx context.Context, opts ...leases.Opt) (context.Context, func(context.Context) error, error) { + nop := func(context.Context) error { return nil } + _, ok := leases.FromContext(ctx) if ok { - return ctx, func(context.Context) error { - return nil - }, nil + return ctx, nop, nil } ls := c.LeasesService() - l, err := ls.Create(ctx, leases.WithRandomID(), leases.WithExpiration(24*time.Hour)) + if len(opts) == 0 { + // Use default lease configuration if no options provided + opts = []leases.Opt{ + leases.WithRandomID(), + leases.WithExpiration(24 * time.Hour), + } + } + + l, err := ls.Create(ctx, opts...) if err != nil { - return nil, nil, err + return ctx, nop, err } ctx = leases.WithLease(ctx, l.ID) diff --git a/vendor/github.com/containerd/containerd/log/context.go b/vendor/github.com/containerd/containerd/log/context.go index 31f1a3ac09b..21599c4fd64 100644 --- a/vendor/github.com/containerd/containerd/log/context.go +++ b/vendor/github.com/containerd/containerd/log/context.go @@ -18,7 +18,6 @@ package log import ( "context" - "sync/atomic" "github.com/sirupsen/logrus" ) @@ -38,23 +37,10 @@ type ( loggerKey struct{} ) -// TraceLevel is the log level for tracing. Trace level is lower than debug level, -// and is usually used to trace detailed behavior of the program. -const TraceLevel = logrus.Level(uint32(logrus.DebugLevel + 1)) - // RFC3339NanoFixed is time.RFC3339Nano with nanoseconds padded using zeros to // ensure the formatted time is always the same number of characters. const RFC3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00" -// ParseLevel takes a string level and returns the Logrus log level constant. -// It supports trace level. -func ParseLevel(lvl string) (logrus.Level, error) { - if lvl == "trace" { - return TraceLevel, nil - } - return logrus.ParseLevel(lvl) -} - // WithLogger returns a new context with the provided logger. Use in // combination with logger.WithField(s) for great effect. func WithLogger(ctx context.Context, logger *logrus.Entry) context.Context { @@ -72,19 +58,3 @@ func GetLogger(ctx context.Context) *logrus.Entry { return logger.(*logrus.Entry) } - -// Trace logs a message at level Trace with the log entry passed-in. -func Trace(e *logrus.Entry, args ...interface{}) { - level := logrus.Level(atomic.LoadUint32((*uint32)(&e.Logger.Level))) - if level >= TraceLevel { - e.Debug(args...) - } -} - -// Tracef logs a message at level Trace with the log entry passed-in. -func Tracef(e *logrus.Entry, format string, args ...interface{}) { - level := logrus.Level(atomic.LoadUint32((*uint32)(&e.Logger.Level))) - if level >= TraceLevel { - e.Debugf(format, args...) - } -} diff --git a/vendor/github.com/containerd/containerd/metadata/adaptors.go b/vendor/github.com/containerd/containerd/metadata/adaptors.go index 4fd4c824396..b165c38e033 100644 --- a/vendor/github.com/containerd/containerd/metadata/adaptors.go +++ b/vendor/github.com/containerd/containerd/metadata/adaptors.go @@ -24,6 +24,7 @@ import ( "github.com/containerd/containerd/filters" "github.com/containerd/containerd/images" "github.com/containerd/containerd/leases" + "github.com/containerd/containerd/snapshots" ) func adaptImage(o interface{}) filters.Adaptor { @@ -139,6 +140,34 @@ func adaptLease(lease leases.Lease) filters.Adaptor { }) } +func adaptSnapshot(info snapshots.Info) filters.Adaptor { + return filters.AdapterFunc(func(fieldpath []string) (string, bool) { + if len(fieldpath) == 0 { + return "", false + } + + switch fieldpath[0] { + case "kind": + switch info.Kind { + case snapshots.KindActive: + return "active", true + case snapshots.KindView: + return "view", true + case snapshots.KindCommitted: + return "committed", true + } + case "name": + return info.Name, true + case "parent": + return info.Parent, true + case "labels": + return checkMap(fieldpath[1:], info.Labels) + } + + return "", false + }) +} + func checkMap(fieldpath []string, m map[string]string) (string, bool) { if len(m) == 0 { return "", false diff --git a/vendor/github.com/containerd/containerd/metadata/namespaces.go b/vendor/github.com/containerd/containerd/metadata/namespaces.go index 25d0e1578b2..23615e48faf 100644 --- a/vendor/github.com/containerd/containerd/metadata/namespaces.go +++ b/vendor/github.com/containerd/containerd/metadata/namespaces.go @@ -20,6 +20,7 @@ import ( "context" "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/identifiers" l "github.com/containerd/containerd/labels" "github.com/containerd/containerd/namespaces" "github.com/pkg/errors" @@ -41,7 +42,7 @@ func (s *namespaceStore) Create(ctx context.Context, namespace string, labels ma return err } - if err := namespaces.Validate(namespace); err != nil { + if err := identifiers.Validate(namespace); err != nil { return err } diff --git a/vendor/github.com/containerd/containerd/metadata/snapshot.go b/vendor/github.com/containerd/containerd/metadata/snapshot.go index 4c38b41d770..389aeda45ec 100644 --- a/vendor/github.com/containerd/containerd/metadata/snapshot.go +++ b/vendor/github.com/containerd/containerd/metadata/snapshot.go @@ -25,6 +25,7 @@ import ( "time" "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/filters" "github.com/containerd/containerd/labels" "github.com/containerd/containerd/log" "github.com/containerd/containerd/metadata/boltutil" @@ -37,6 +38,7 @@ import ( const ( inheritedLabelsPrefix = "containerd.io/snapshot/" + labelSnapshotRef = "containerd.io/snapshot.ref" ) type snapshotter struct { @@ -158,6 +160,7 @@ func (s *snapshotter) Update(ctx context.Context, info snapshots.Info, fieldpath local = snapshots.Info{ Name: info.Name, } + updated bool ) if err := update(ctx, s.db, func(tx *bolt.Tx) error { bkt := getSnapshotterBucket(tx, ns, s.name) @@ -216,20 +219,22 @@ func (s *snapshotter) Update(ctx context.Context, info snapshots.Info, fieldpath inner := snapshots.Info{ Name: bkey, - Labels: filterInheritedLabels(local.Labels), + Labels: snapshots.FilterInheritedLabels(local.Labels), } - if _, err := s.Snapshotter.Update(ctx, inner, fieldpaths...); err != nil { + // NOTE: Perform this inside the transaction to reduce the + // chances of out of sync data. The backend snapshotters + // should perform the Update as fast as possible. + if info, err = s.Snapshotter.Update(ctx, inner, fieldpaths...); err != nil { return err } + updated = true return nil }); err != nil { - return snapshots.Info{}, err - } - - info, err = s.Snapshotter.Stat(ctx, bkey) - if err != nil { + if updated { + log.G(ctx).WithField("snapshotter", s.name).WithField("key", local.Name).WithError(err).Error("transaction failed after updating snapshot backend") + } return snapshots.Info{}, err } @@ -296,31 +301,158 @@ func (s *snapshotter) createSnapshot(ctx context.Context, key, parent string, re return nil, err } - var m []mount.Mount + var ( + target = base.Labels[labelSnapshotRef] + bparent string + bkey string + bopts = []snapshots.Opt{ + snapshots.WithLabels(snapshots.FilterInheritedLabels(base.Labels)), + } + ) + if err := update(ctx, s.db, func(tx *bolt.Tx) error { bkt, err := createSnapshotterBucket(tx, ns, s.name) if err != nil { return err } - bbkt, err := bkt.CreateBucket([]byte(key)) - if err != nil { - if err == bolt.ErrBucketExists { - err = errors.Wrapf(errdefs.ErrAlreadyExists, "snapshot %q", key) + // Check if target exists, if so, return already exists + if target != "" { + if tbkt := bkt.Bucket([]byte(target)); tbkt != nil { + return errors.Wrapf(errdefs.ErrAlreadyExists, "target snapshot %q", target) } - return err - } - if err := addSnapshotLease(ctx, tx, s.name, key); err != nil { - return err } - var bparent string + if bbkt := bkt.Bucket([]byte(key)); bbkt != nil { + return errors.Wrapf(errdefs.ErrAlreadyExists, "snapshot %q", key) + } + if parent != "" { pbkt := bkt.Bucket([]byte(parent)) if pbkt == nil { return errors.Wrapf(errdefs.ErrNotFound, "parent snapshot %v does not exist", parent) } bparent = string(pbkt.Get(bucketKeyName)) + } + + sid, err := bkt.NextSequence() + if err != nil { + return err + } + bkey = createKey(sid, ns, key) + + return err + }); err != nil { + return nil, err + } + + var ( + m []mount.Mount + created string + rerr error + ) + if readonly { + m, err = s.Snapshotter.View(ctx, bkey, bparent, bopts...) + } else { + m, err = s.Snapshotter.Prepare(ctx, bkey, bparent, bopts...) + } + + // An already exists error should indicate the backend found a snapshot + // matching a provided target reference. + if errdefs.IsAlreadyExists(err) { + if target != "" { + var tinfo *snapshots.Info + filter := fmt.Sprintf(`labels."containerd.io/snapshot.ref"==%s,parent==%q`, target, bparent) + if err := s.Snapshotter.Walk(ctx, func(ctx context.Context, i snapshots.Info) error { + if tinfo == nil && i.Kind == snapshots.KindCommitted { + if i.Labels["containerd.io/snapshot.ref"] != target { + // Walk did not respect filter + return nil + } + if i.Parent != bparent { + // Walk did not respect filter + return nil + } + tinfo = &i + } + return nil + + }, filter); err != nil { + return nil, errors.Wrap(err, "failed walking backend snapshots") + } + + if tinfo == nil { + return nil, errors.Wrapf(errdefs.ErrNotFound, "target snapshot %q in backend", target) + } + + key = target + bkey = tinfo.Name + bparent = tinfo.Parent + base.Created = tinfo.Created + base.Updated = tinfo.Updated + if base.Labels == nil { + base.Labels = tinfo.Labels + } else { + for k, v := range tinfo.Labels { + if _, ok := base.Labels[k]; !ok { + base.Labels[k] = v + } + } + } + + // Propagate this error after the final update + rerr = errors.Wrapf(errdefs.ErrAlreadyExists, "target snapshot %q from snapshotter", target) + } else { + // This condition is unexpected as the key provided is expected + // to be new and unique, return as unknown response from backend + // to avoid confusing callers handling already exists. + return nil, errors.Wrapf(errdefs.ErrUnknown, "unexpected error from snapshotter: %v", err) + } + } else if err != nil { + return nil, err + } else { + ts := time.Now().UTC() + base.Created = ts + base.Updated = ts + created = bkey + } + + if txerr := update(ctx, s.db, func(tx *bolt.Tx) error { + bkt := getSnapshotterBucket(tx, ns, s.name) + if bkt == nil { + return errors.Wrapf(errdefs.ErrNotFound, "can not find snapshotter %q", s.name) + } + + if err := addSnapshotLease(ctx, tx, s.name, key); err != nil { + return err + } + + bbkt, err := bkt.CreateBucket([]byte(key)) + if err != nil { + if err != bolt.ErrBucketExists { + return err + } + if rerr == nil { + rerr = errors.Wrapf(errdefs.ErrAlreadyExists, "snapshot %q", key) + } + return nil + } + + if parent != "" { + pbkt := bkt.Bucket([]byte(parent)) + if pbkt == nil { + return errors.Wrapf(errdefs.ErrNotFound, "parent snapshot %v does not exist", parent) + } + + // Ensure the backend's parent matches the metadata store's parent + // If it is mismatched, then a target was provided for a snapshotter + // which has a different parent then requested. + // NOTE: The backend snapshotter is responsible for enforcing the + // uniqueness of the reference relationships, the metadata store + // can only error out to prevent inconsistent data. + if bparent != string(pbkt.Get(bucketKeyName)) { + return errors.Wrapf(errdefs.ErrInvalidArgument, "mismatched parent %s from target %s", parent, target) + } cbkt, err := pbkt.CreateBucketIfNotExists(bucketKeyChildren) if err != nil { @@ -335,36 +467,28 @@ func (s *snapshotter) createSnapshot(ctx context.Context, key, parent string, re } } - sid, err := bkt.NextSequence() - if err != nil { - return err - } - bkey := createKey(sid, ns, key) - if err := bbkt.Put(bucketKeyName, []byte(bkey)); err != nil { - return err - } - - ts := time.Now().UTC() - if err := boltutil.WriteTimestamps(bbkt, ts, ts); err != nil { + if err := boltutil.WriteTimestamps(bbkt, base.Created, base.Updated); err != nil { return err } if err := boltutil.WriteLabels(bbkt, base.Labels); err != nil { return err } - inheritedOpt := snapshots.WithLabels(filterInheritedLabels(base.Labels)) - - // TODO: Consider doing this outside of transaction to lessen - // metadata lock time - if readonly { - m, err = s.Snapshotter.View(ctx, bkey, bparent, inheritedOpt) - } else { - m, err = s.Snapshotter.Prepare(ctx, bkey, bparent, inheritedOpt) - } - return err - }); err != nil { - return nil, err + return bbkt.Put(bucketKeyName, []byte(bkey)) + }); txerr != nil { + rerr = txerr } + + if rerr != nil { + // If the created reference is not stored, attempt clean up + if created != "" { + if err := s.Snapshotter.Remove(ctx, created); err != nil { + log.G(ctx).WithField("snapshotter", s.name).WithField("key", created).WithError(err).Error("failed to cleanup unreferenced snapshot") + } + } + return nil, rerr + } + return m, nil } @@ -388,7 +512,8 @@ func (s *snapshotter) Commit(ctx context.Context, name, key string, opts ...snap return err } - return update(ctx, s.db, func(tx *bolt.Tx) error { + var bname string + if err := update(ctx, s.db, func(tx *bolt.Tx) error { bkt := getSnapshotterBucket(tx, ns, s.name) if bkt == nil { return errors.Wrapf(errdefs.ErrNotFound, @@ -461,12 +586,40 @@ func (s *snapshotter) Commit(ctx context.Context, name, key string, opts ...snap return err } - inheritedOpt := snapshots.WithLabels(filterInheritedLabels(base.Labels)) + inheritedOpt := snapshots.WithLabels(snapshots.FilterInheritedLabels(base.Labels)) - // TODO: Consider doing this outside of transaction to lessen - // metadata lock time - return s.Snapshotter.Commit(ctx, nameKey, bkey, inheritedOpt) - }) + // NOTE: Backend snapshotters should commit fast and reliably to + // prevent metadata store locking and minimizing rollbacks. + // This operation should be done in the transaction to minimize the + // risk of the committed keys becoming out of sync. If this operation + // succeed and the overall transaction fails then the risk of out of + // sync data is higher and may require manual cleanup. + if err := s.Snapshotter.Commit(ctx, nameKey, bkey, inheritedOpt); err != nil { + if errdefs.IsNotFound(err) { + log.G(ctx).WithField("snapshotter", s.name).WithField("key", key).WithError(err).Error("uncommittable snapshot: missing in backend, snapshot should be removed") + } + // NOTE: Consider handling already exists here from the backend. Currently + // already exists from the backend may be confusing to the client since it + // may require the client to re-attempt from prepare. However, if handling + // here it is not clear what happened with the existing backend key and + // whether the already prepared snapshot would still be used or must be + // discarded. It is best that all implementations of the snapshotter + // interface behave the same, in which case the backend should handle the + // mapping of duplicates and not error. + return err + } + bname = nameKey + + return nil + }); err != nil { + if bname != "" { + log.G(ctx).WithField("snapshotter", s.name).WithField("key", key).WithField("bname", bname).WithError(err).Error("uncommittable snapshot: transaction failed after commit, snapshot should be removed") + + } + return err + } + + return nil } @@ -530,7 +683,7 @@ type infoPair struct { info snapshots.Info } -func (s *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func (s *snapshotter) Walk(ctx context.Context, fn snapshots.WalkFunc, fs ...string) error { ns, err := namespaces.NamespaceRequired(ctx) if err != nil { return err @@ -542,6 +695,11 @@ func (s *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapsho lastKey string ) + filter, err := filters.ParseAll(fs...) + if err != nil { + return err + } + for { if err := view(ctx, s.db, func(tx *bolt.Tx) error { bkt := getSnapshotterBucket(tx, ns, s.name) @@ -604,8 +762,11 @@ func (s *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapsho return err } - if err := fn(ctx, overlayInfo(info, pair.info)); err != nil { - return err + info = overlayInfo(info, pair.info) + if filter.Match(adaptSnapshot(info)) { + if err := fn(ctx, info); err != nil { + return err + } } } @@ -630,18 +791,17 @@ func validateSnapshot(info *snapshots.Info) error { return nil } -type cleaner interface { - Cleanup(ctx context.Context) error -} - func (s *snapshotter) garbageCollect(ctx context.Context) (d time.Duration, err error) { s.l.Lock() t1 := time.Now() defer func() { s.l.Unlock() if err == nil { - if c, ok := s.Snapshotter.(cleaner); ok { + if c, ok := s.Snapshotter.(snapshots.Cleaner); ok { err = c.Cleanup(ctx) + if errdefs.IsNotImplemented(err) { + err = nil + } } } if err == nil { @@ -778,19 +938,3 @@ func (s *snapshotter) pruneBranch(ctx context.Context, node *treeNode) error { func (s *snapshotter) Close() error { return s.Snapshotter.Close() } - -// filterInheritedLabels filters the provided labels by removing any key which doesn't have -// a prefix of "containerd.io/snapshot/". -func filterInheritedLabels(labels map[string]string) map[string]string { - if labels == nil { - return nil - } - - filtered := make(map[string]string) - for k, v := range labels { - if strings.HasPrefix(k, inheritedLabelsPrefix) { - filtered[k] = v - } - } - return filtered -} diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/cgroups.go b/vendor/github.com/containerd/containerd/metrics/cgroups/cgroups.go index 830df8b240e..6807b19b869 100644 --- a/vendor/github.com/containerd/containerd/metrics/cgroups/cgroups.go +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/cgroups.go @@ -19,20 +19,13 @@ package cgroups import ( - "context" - "github.com/containerd/cgroups" - eventstypes "github.com/containerd/containerd/api/events" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/events" - "github.com/containerd/containerd/log" - "github.com/containerd/containerd/namespaces" + v1 "github.com/containerd/containerd/metrics/cgroups/v1" + v2 "github.com/containerd/containerd/metrics/cgroups/v2" "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/plugin" "github.com/containerd/containerd/runtime" - "github.com/containerd/containerd/runtime/v1/linux" metrics "github.com/docker/go-metrics" - "github.com/sirupsen/logrus" ) // Config for the cgroups monitor @@ -56,8 +49,15 @@ func New(ic *plugin.InitContext) (interface{}, error) { if !config.NoPrometheus { ns = metrics.NewNamespace("container", "", nil) } - collector := newCollector(ns) - oom, err := newOOMCollector(ns) + var ( + tm runtime.TaskMonitor + err error + ) + if cgroups.Mode() == cgroups.Unified { + tm, err = v2.NewTaskMonitor(ic.Context, ic.Events, ns) + } else { + tm, err = v1.NewTaskMonitor(ic.Context, ic.Events, ns) + } if err != nil { return nil, err } @@ -65,54 +65,5 @@ func New(ic *plugin.InitContext) (interface{}, error) { metrics.Register(ns) } ic.Meta.Platforms = append(ic.Meta.Platforms, platforms.DefaultSpec()) - return &cgroupsMonitor{ - collector: collector, - oom: oom, - context: ic.Context, - publisher: ic.Events, - }, nil -} - -type cgroupsMonitor struct { - collector *collector - oom *oomCollector - context context.Context - publisher events.Publisher -} - -func (m *cgroupsMonitor) Monitor(c runtime.Task) error { - if err := m.collector.Add(c); err != nil { - return err - } - t, ok := c.(*linux.Task) - if !ok { - return nil - } - cg, err := t.Cgroup() - if err != nil { - if errdefs.IsNotFound(err) { - return nil - } - return err - } - err = m.oom.Add(c.ID(), c.Namespace(), cg, m.trigger) - if err == cgroups.ErrMemoryNotSupported { - logrus.WithError(err).Warn("OOM monitoring failed") - return nil - } - return err -} - -func (m *cgroupsMonitor) Stop(c runtime.Task) error { - m.collector.Remove(c) - return nil -} - -func (m *cgroupsMonitor) trigger(id, namespace string, cg cgroups.Cgroup) { - ctx := namespaces.WithNamespace(m.context, namespace) - if err := m.publisher.Publish(ctx, runtime.TaskOOMEventTopic, &eventstypes.TaskOOM{ - ContainerID: id, - }); err != nil { - log.G(m.context).WithError(err).Error("post OOM event") - } + return tm, nil } diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/blkio.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/blkio.go similarity index 99% rename from vendor/github.com/containerd/containerd/metrics/cgroups/blkio.go rename to vendor/github.com/containerd/containerd/metrics/cgroups/v1/blkio.go index 1d1f0a999fb..d532bc7a7ed 100644 --- a/vendor/github.com/containerd/containerd/metrics/cgroups/blkio.go +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/blkio.go @@ -16,7 +16,7 @@ limitations under the License. */ -package cgroups +package v1 import ( "strconv" diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/v1/cgroups.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/cgroups.go new file mode 100644 index 00000000000..80cf20ac08f --- /dev/null +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/cgroups.go @@ -0,0 +1,93 @@ +// +build linux + +/* + Copyright The containerd 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 v1 + +import ( + "context" + + "github.com/containerd/cgroups" + eventstypes "github.com/containerd/containerd/api/events" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/events" + "github.com/containerd/containerd/log" + "github.com/containerd/containerd/namespaces" + "github.com/containerd/containerd/runtime" + "github.com/containerd/containerd/runtime/v1/linux" + metrics "github.com/docker/go-metrics" + "github.com/sirupsen/logrus" +) + +// NewTaskMonitor returns a new cgroups monitor +func NewTaskMonitor(ctx context.Context, publisher events.Publisher, ns *metrics.Namespace) (runtime.TaskMonitor, error) { + collector := NewCollector(ns) + oom, err := newOOMCollector(ns) + if err != nil { + return nil, err + } + return &cgroupsMonitor{ + collector: collector, + oom: oom, + context: ctx, + publisher: publisher, + }, nil +} + +type cgroupsMonitor struct { + collector *Collector + oom *oomCollector + context context.Context + publisher events.Publisher +} + +func (m *cgroupsMonitor) Monitor(c runtime.Task) error { + if err := m.collector.Add(c); err != nil { + return err + } + t, ok := c.(*linux.Task) + if !ok { + return nil + } + cg, err := t.Cgroup() + if err != nil { + if errdefs.IsNotFound(err) { + return nil + } + return err + } + err = m.oom.Add(c.ID(), c.Namespace(), cg, m.trigger) + if err == cgroups.ErrMemoryNotSupported { + logrus.WithError(err).Warn("OOM monitoring failed") + return nil + } + return err +} + +func (m *cgroupsMonitor) Stop(c runtime.Task) error { + m.collector.Remove(c) + return nil +} + +func (m *cgroupsMonitor) trigger(id, namespace string, cg cgroups.Cgroup) { + ctx := namespaces.WithNamespace(m.context, namespace) + if err := m.publisher.Publish(ctx, runtime.TaskOOMEventTopic, &eventstypes.TaskOOM{ + ContainerID: id, + }); err != nil { + log.G(m.context).WithError(err).Error("post OOM event") + } +} diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/cpu.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/cpu.go similarity index 99% rename from vendor/github.com/containerd/containerd/metrics/cgroups/cpu.go rename to vendor/github.com/containerd/containerd/metrics/cgroups/v1/cpu.go index 686977b3d99..0abe0fb7f16 100644 --- a/vendor/github.com/containerd/containerd/metrics/cgroups/cpu.go +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/cpu.go @@ -16,7 +16,7 @@ limitations under the License. */ -package cgroups +package v1 import ( "strconv" diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/hugetlb.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/hugetlb.go similarity index 99% rename from vendor/github.com/containerd/containerd/metrics/cgroups/hugetlb.go rename to vendor/github.com/containerd/containerd/metrics/cgroups/v1/hugetlb.go index fbd5d3ba7bf..97ca890a697 100644 --- a/vendor/github.com/containerd/containerd/metrics/cgroups/hugetlb.go +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/hugetlb.go @@ -16,7 +16,7 @@ limitations under the License. */ -package cgroups +package v1 import ( v1 "github.com/containerd/containerd/metrics/types/v1" diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/memory.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/memory.go similarity index 99% rename from vendor/github.com/containerd/containerd/metrics/cgroups/memory.go rename to vendor/github.com/containerd/containerd/metrics/cgroups/v1/memory.go index 9925f01e355..915a36c7f68 100644 --- a/vendor/github.com/containerd/containerd/metrics/cgroups/memory.go +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/memory.go @@ -16,7 +16,7 @@ limitations under the License. */ -package cgroups +package v1 import ( v1 "github.com/containerd/containerd/metrics/types/v1" diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/metric.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/metric.go similarity index 88% rename from vendor/github.com/containerd/containerd/metrics/cgroups/metric.go rename to vendor/github.com/containerd/containerd/metrics/cgroups/v1/metric.go index c242bc85a67..dd9c303140f 100644 --- a/vendor/github.com/containerd/containerd/metrics/cgroups/metric.go +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/metric.go @@ -16,7 +16,7 @@ limitations under the License. */ -package cgroups +package v1 import ( v1 "github.com/containerd/containerd/metrics/types/v1" @@ -24,6 +24,9 @@ import ( "github.com/prometheus/client_golang/prometheus" ) +// IDName is the name that is used to identify the id being collected in the metric +var IDName = "container_id" + type value struct { v float64 l []string @@ -41,7 +44,7 @@ type metric struct { func (m *metric) desc(ns *metrics.Namespace) *prometheus.Desc { // the namespace label is for containerd namespaces - return ns.NewDesc(m.name, m.help, m.unit, append([]string{"container_id", "namespace"}, m.labels...)...) + return ns.NewDesc(m.name, m.help, m.unit, append([]string{IDName, "namespace"}, m.labels...)...) } func (m *metric) collect(id, namespace string, stats *v1.Metrics, ns *metrics.Namespace, ch chan<- prometheus.Metric, block bool) { diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/metrics.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/metrics.go similarity index 75% rename from vendor/github.com/containerd/containerd/metrics/cgroups/metrics.go rename to vendor/github.com/containerd/containerd/metrics/cgroups/v1/metrics.go index 23808731f32..eac3e26dba5 100644 --- a/vendor/github.com/containerd/containerd/metrics/cgroups/metrics.go +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/metrics.go @@ -16,7 +16,7 @@ limitations under the License. */ -package cgroups +package v1 import ( "context" @@ -27,26 +27,33 @@ import ( "github.com/containerd/containerd/log" v1 "github.com/containerd/containerd/metrics/types/v1" "github.com/containerd/containerd/namespaces" - "github.com/containerd/containerd/runtime" "github.com/containerd/typeurl" metrics "github.com/docker/go-metrics" + "github.com/gogo/protobuf/types" "github.com/prometheus/client_golang/prometheus" ) +// Statable type that returns cgroup metrics +type Statable interface { + ID() string + Namespace() string + Stats(context.Context) (*types.Any, error) +} + // Trigger will be called when an event happens and provides the cgroup // where the event originated from type Trigger func(string, string, cgroups.Cgroup) -// newCollector registers the collector with the provided namespace and returns it so +// NewCollector registers the collector with the provided namespace and returns it so // that cgroups can be added for collection -func newCollector(ns *metrics.Namespace) *collector { +func NewCollector(ns *metrics.Namespace) *Collector { if ns == nil { - return &collector{} + return &Collector{} } // add machine cpus and memory info - c := &collector{ + c := &Collector{ ns: ns, - tasks: make(map[string]runtime.Task), + tasks: make(map[string]Statable), } c.metrics = append(c.metrics, pidMetrics...) c.metrics = append(c.metrics, cpuMetrics...) @@ -62,24 +69,26 @@ func taskID(id, namespace string) string { return fmt.Sprintf("%s-%s", id, namespace) } -// collector provides the ability to collect container stats and export +// Collector provides the ability to collect container stats and export // them in the prometheus format -type collector struct { +type Collector struct { mu sync.RWMutex - tasks map[string]runtime.Task + tasks map[string]Statable ns *metrics.Namespace metrics []*metric storedMetrics chan prometheus.Metric } -func (c *collector) Describe(ch chan<- *prometheus.Desc) { +// Describe prometheus metrics +func (c *Collector) Describe(ch chan<- *prometheus.Desc) { for _, m := range c.metrics { ch <- m.desc(c.ns) } } -func (c *collector) Collect(ch chan<- prometheus.Metric) { +// Collect prometheus metrics +func (c *Collector) Collect(ch chan<- prometheus.Metric) { c.mu.RLock() wg := &sync.WaitGroup{} for _, t := range c.tasks { @@ -100,7 +109,7 @@ storedLoop: wg.Wait() } -func (c *collector) collect(t runtime.Task, ch chan<- prometheus.Metric, block bool, wg *sync.WaitGroup) { +func (c *Collector) collect(t Statable, ch chan<- prometheus.Metric, block bool, wg *sync.WaitGroup) { if wg != nil { defer wg.Done() } @@ -126,7 +135,7 @@ func (c *collector) collect(t runtime.Task, ch chan<- prometheus.Metric, block b } // Add adds the provided cgroup and id so that metrics are collected and exported -func (c *collector) Add(t runtime.Task) error { +func (c *Collector) Add(t Statable) error { if c.ns == nil { return nil } @@ -141,11 +150,21 @@ func (c *collector) Add(t runtime.Task) error { } // Remove removes the provided cgroup by id from the collector -func (c *collector) Remove(t runtime.Task) { +func (c *Collector) Remove(t Statable) { if c.ns == nil { return } c.mu.Lock() - defer c.mu.Unlock() delete(c.tasks, taskID(t.ID(), t.Namespace())) + c.mu.Unlock() +} + +// RemoveAll statable items from the collector +func (c *Collector) RemoveAll() { + if c.ns == nil { + return + } + c.mu.Lock() + c.tasks = make(map[string]Statable) + c.mu.Unlock() } diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/oom.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/oom.go similarity index 99% rename from vendor/github.com/containerd/containerd/metrics/cgroups/oom.go rename to vendor/github.com/containerd/containerd/metrics/cgroups/v1/oom.go index 212dfb510ea..a31b813f2a4 100644 --- a/vendor/github.com/containerd/containerd/metrics/cgroups/oom.go +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/oom.go @@ -16,7 +16,7 @@ limitations under the License. */ -package cgroups +package v1 import ( "sync" diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/pids.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/pids.go similarity index 98% rename from vendor/github.com/containerd/containerd/metrics/cgroups/pids.go rename to vendor/github.com/containerd/containerd/metrics/cgroups/v1/pids.go index c61fd6a97df..6bb1876e61f 100644 --- a/vendor/github.com/containerd/containerd/metrics/cgroups/pids.go +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v1/pids.go @@ -16,7 +16,7 @@ limitations under the License. */ -package cgroups +package v1 import ( v1 "github.com/containerd/containerd/metrics/types/v1" diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/v2/cgroups.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/cgroups.go new file mode 100644 index 00000000000..4159190e683 --- /dev/null +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/cgroups.go @@ -0,0 +1,55 @@ +// +build linux + +/* + Copyright The containerd 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 v2 + +import ( + "context" + + "github.com/containerd/containerd/events" + "github.com/containerd/containerd/runtime" + metrics "github.com/docker/go-metrics" +) + +// NewTaskMonitor returns a new cgroups monitor +func NewTaskMonitor(ctx context.Context, publisher events.Publisher, ns *metrics.Namespace) (runtime.TaskMonitor, error) { + collector := NewCollector(ns) + return &cgroupsMonitor{ + collector: collector, + context: ctx, + publisher: publisher, + }, nil +} + +type cgroupsMonitor struct { + collector *Collector + context context.Context + publisher events.Publisher +} + +func (m *cgroupsMonitor) Monitor(c runtime.Task) error { + if err := m.collector.Add(c); err != nil { + return err + } + return nil +} + +func (m *cgroupsMonitor) Stop(c runtime.Task) error { + m.collector.Remove(c) + return nil +} diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/v2/cpu.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/cpu.go new file mode 100644 index 00000000000..c9a48ad3371 --- /dev/null +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/cpu.go @@ -0,0 +1,124 @@ +// +build linux + +/* + Copyright The containerd 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 v2 + +import ( + v2 "github.com/containerd/containerd/metrics/types/v2" + metrics "github.com/docker/go-metrics" + "github.com/prometheus/client_golang/prometheus" +) + +var cpuMetrics = []*metric{ + { + name: "cpu_usage_usec", + help: "Total cpu usage (cgroup v2)", + unit: metrics.Unit("microseconds"), + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.CPU == nil { + return nil + } + return []value{ + { + v: float64(stats.CPU.UsageUsec), + }, + } + }, + }, + { + name: "cpu_user_usec", + help: "Current cpu usage in user space (cgroup v2)", + unit: metrics.Unit("microseconds"), + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.CPU == nil { + return nil + } + return []value{ + { + v: float64(stats.CPU.UserUsec), + }, + } + }, + }, + { + name: "cpu_system_usec", + help: "Current cpu usage in kernel space (cgroup v2)", + unit: metrics.Unit("microseconds"), + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.CPU == nil { + return nil + } + return []value{ + { + v: float64(stats.CPU.SystemUsec), + }, + } + }, + }, + { + name: "cpu_nr_periods", + help: "Current cpu number of periods (only if controller is enabled)", + unit: metrics.Total, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.CPU == nil { + return nil + } + return []value{ + { + v: float64(stats.CPU.NrPeriods), + }, + } + }, + }, + { + name: "cpu_nr_throttled", + help: "Total number of times tasks have been throttled (only if controller is enabled)", + unit: metrics.Total, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.CPU == nil { + return nil + } + return []value{ + { + v: float64(stats.CPU.NrThrottled), + }, + } + }, + }, + { + name: "cpu_throttled_usec", + help: "Total time duration for which tasks have been throttled. (only if controller is enabled)", + unit: metrics.Unit("microseconds"), + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.CPU == nil { + return nil + } + return []value{ + { + v: float64(stats.CPU.ThrottledUsec), + }, + } + }, + }, +} diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/v2/io.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/io.go new file mode 100644 index 00000000000..79980a580e9 --- /dev/null +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/io.go @@ -0,0 +1,110 @@ +// +build linux + +/* + Copyright The containerd 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 v2 + +import ( + "strconv" + + v2 "github.com/containerd/containerd/metrics/types/v2" + metrics "github.com/docker/go-metrics" + "github.com/prometheus/client_golang/prometheus" +) + +var ioMetrics = []*metric{ + { + name: "io_rbytes", + help: "IO bytes read", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + labels: []string{"major", "minor"}, + getValues: func(stats *v2.Metrics) []value { + if stats.Io == nil { + return nil + } + var out []value + for _, e := range stats.Io.Usage { + out = append(out, value{ + v: float64(e.Rbytes), + l: []string{strconv.FormatUint(e.Major, 10), strconv.FormatUint(e.Minor, 10)}, + }) + } + return out + }, + }, + { + name: "io_wbytes", + help: "IO bytes written", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + labels: []string{"major", "minor"}, + getValues: func(stats *v2.Metrics) []value { + if stats.Io == nil { + return nil + } + var out []value + for _, e := range stats.Io.Usage { + out = append(out, value{ + v: float64(e.Wbytes), + l: []string{strconv.FormatUint(e.Major, 10), strconv.FormatUint(e.Minor, 10)}, + }) + } + return out + }, + }, + { + name: "io_rios", + help: "Number of read IOs", + unit: metrics.Total, + vt: prometheus.GaugeValue, + labels: []string{"major", "minor"}, + getValues: func(stats *v2.Metrics) []value { + if stats.Io == nil { + return nil + } + var out []value + for _, e := range stats.Io.Usage { + out = append(out, value{ + v: float64(e.Rios), + l: []string{strconv.FormatUint(e.Major, 10), strconv.FormatUint(e.Minor, 10)}, + }) + } + return out + }, + }, + { + name: "io_wios", + help: "Number of write IOs", + unit: metrics.Total, + vt: prometheus.GaugeValue, + labels: []string{"major", "minor"}, + getValues: func(stats *v2.Metrics) []value { + if stats.Io == nil { + return nil + } + var out []value + for _, e := range stats.Io.Usage { + out = append(out, value{ + v: float64(e.Wios), + l: []string{strconv.FormatUint(e.Major, 10), strconv.FormatUint(e.Minor, 10)}, + }) + } + return out + }, + }, +} diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/v2/memory.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/memory.go new file mode 100644 index 00000000000..7d0332a2909 --- /dev/null +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/memory.go @@ -0,0 +1,605 @@ +// +build linux + +/* + Copyright The containerd 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 v2 + +import ( + v2 "github.com/containerd/containerd/metrics/types/v2" + metrics "github.com/docker/go-metrics" + "github.com/prometheus/client_golang/prometheus" +) + +var memoryMetrics = []*metric{ + { + name: "memory_usage", + help: "Current memory usage (cgroup v2)", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Usage), + }, + } + }, + }, + { + name: "memory_usage_limit", + help: "Current memory usage limit (cgroup v2)", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.UsageLimit), + }, + } + }, + }, + { + name: "memory_swap_usage", + help: "Current swap usage (cgroup v2)", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.SwapUsage), + }, + } + }, + }, + { + name: "memory_swap_limit", + help: "Current swap usage limit (cgroup v2)", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.SwapLimit), + }, + } + }, + }, + + { + name: "memory_file_mapped", + help: "The file_mapped amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.FileMapped), + }, + } + }, + }, + { + name: "memory_file_dirty", + help: "The file_dirty amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.FileDirty), + }, + } + }, + }, + { + name: "memory_file_writeback", + help: "The file_writeback amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.FileWriteback), + }, + } + }, + }, + { + name: "memory_pgactivate", + help: "The pgactivate amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Pgactivate), + }, + } + }, + }, + { + name: "memory_pgdeactivate", + help: "The pgdeactivate amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Pgdeactivate), + }, + } + }, + }, + { + name: "memory_pgfault", + help: "The pgfault amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Pgfault), + }, + } + }, + }, + { + name: "memory_pgmajfault", + help: "The pgmajfault amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Pgmajfault), + }, + } + }, + }, + { + name: "memory_pglazyfree", + help: "The pglazyfree amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Pglazyfree), + }, + } + }, + }, + { + name: "memory_pgrefill", + help: "The pgrefill amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Pgrefill), + }, + } + }, + }, + { + name: "memory_pglazyfreed", + help: "The pglazyfreed amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Pglazyfreed), + }, + } + }, + }, + { + name: "memory_pgscan", + help: "The pgscan amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Pgscan), + }, + } + }, + }, + { + name: "memory_pgsteal", + help: "The pgsteal amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Pgsteal), + }, + } + }, + }, + { + name: "memory_inactive_anon", + help: "The inactive_anon amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.InactiveAnon), + }, + } + }, + }, + { + name: "memory_active_anon", + help: "The active_anon amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.ActiveAnon), + }, + } + }, + }, + { + name: "memory_inactive_file", + help: "The inactive_file amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.InactiveFile), + }, + } + }, + }, + { + name: "memory_active_file", + help: "The active_file amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.ActiveFile), + }, + } + }, + }, + { + name: "memory_unevictable", + help: "The unevictable amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Unevictable), + }, + } + }, + }, + { + name: "memory_anon", + help: "The anon amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Anon), + }, + } + }, + }, + { + name: "memory_file", + help: "The file amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.File), + }, + } + }, + }, + { + name: "memory_kernel_stack", + help: "The kernel_stack amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.KernelStack), + }, + } + }, + }, + { + name: "memory_slab", + help: "The slab amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Slab), + }, + } + }, + }, + { + name: "memory_sock", + help: "The sock amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Sock), + }, + } + }, + }, + { + name: "memory_shmem", + help: "The shmem amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.Shmem), + }, + } + }, + }, + { + name: "memory_anon_thp", + help: "The anon_thp amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.AnonThp), + }, + } + }, + }, + { + name: "memory_slab_reclaimable", + help: "The slab_reclaimable amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.SlabReclaimable), + }, + } + }, + }, + { + name: "memory_slab_unreclaimable", + help: "The slab_unreclaimable amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.SlabUnreclaimable), + }, + } + }, + }, + { + name: "memory_workingset_refault", + help: "The workingset_refault amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.WorkingsetRefault), + }, + } + }, + }, + { + name: "memory_workingset_activate", + help: "The workingset_activate amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.WorkingsetActivate), + }, + } + }, + }, + { + name: "memory_workingset_nodereclaim", + help: "The workingset_nodereclaim amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.WorkingsetNodereclaim), + }, + } + }, + }, + { + name: "memory_thp_fault_alloc", + help: "The thp_fault_alloc amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.ThpFaultAlloc), + }, + } + }, + }, + { + name: "memory_thp_collapse_alloc", + help: "The thp_collapse_alloc amount", + unit: metrics.Bytes, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Memory == nil { + return nil + } + return []value{ + { + v: float64(stats.Memory.ThpCollapseAlloc), + }, + } + }, + }, + { + name: "memory_oom", + help: "The number of times a container has received an oom event", + unit: metrics.Total, + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.MemoryEvents == nil { + return nil + } + return []value{ + { + v: float64(stats.MemoryEvents.Oom), + }, + } + }, + }, +} diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/v2/metric.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/metric.go new file mode 100644 index 00000000000..ea995d24313 --- /dev/null +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/metric.go @@ -0,0 +1,64 @@ +// +build linux + +/* + Copyright The containerd 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 v2 + +import ( + v2 "github.com/containerd/containerd/metrics/types/v2" + metrics "github.com/docker/go-metrics" + "github.com/prometheus/client_golang/prometheus" +) + +// IDName is the name that is used to identify the id being collected in the metric +var IDName = "container_id" + +type value struct { + v float64 + l []string +} + +type metric struct { + name string + help string + unit metrics.Unit + vt prometheus.ValueType + labels []string + // getValues returns the value and labels for the data + getValues func(stats *v2.Metrics) []value +} + +func (m *metric) desc(ns *metrics.Namespace) *prometheus.Desc { + // the namespace label is for containerd namespaces + return ns.NewDesc(m.name, m.help, m.unit, append([]string{IDName, "namespace"}, m.labels...)...) +} + +func (m *metric) collect(id, namespace string, stats *v2.Metrics, ns *metrics.Namespace, ch chan<- prometheus.Metric, block bool) { + values := m.getValues(stats) + for _, v := range values { + // block signals to block on the sending the metrics so none are missed + if block { + ch <- prometheus.MustNewConstMetric(m.desc(ns), m.vt, v.v, append([]string{id, namespace}, v.l...)...) + continue + } + // non-blocking metrics can be dropped if the chan is full + select { + case ch <- prometheus.MustNewConstMetric(m.desc(ns), m.vt, v.v, append([]string{id, namespace}, v.l...)...): + default: + } + } +} diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/v2/metrics.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/metrics.go new file mode 100644 index 00000000000..e8bade1a601 --- /dev/null +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/metrics.go @@ -0,0 +1,163 @@ +// +build linux + +/* + Copyright The containerd 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 v2 + +import ( + "context" + "fmt" + "sync" + + "github.com/containerd/containerd/log" + v2 "github.com/containerd/containerd/metrics/types/v2" + "github.com/containerd/containerd/namespaces" + "github.com/containerd/typeurl" + metrics "github.com/docker/go-metrics" + "github.com/gogo/protobuf/types" + "github.com/prometheus/client_golang/prometheus" +) + +// Statable type that returns cgroup metrics +type Statable interface { + ID() string + Namespace() string + Stats(context.Context) (*types.Any, error) +} + +// NewCollector registers the collector with the provided namespace and returns it so +// that cgroups can be added for collection +func NewCollector(ns *metrics.Namespace) *Collector { + if ns == nil { + return &Collector{} + } + c := &Collector{ + ns: ns, + tasks: make(map[string]Statable), + } + c.metrics = append(c.metrics, pidMetrics...) + c.metrics = append(c.metrics, cpuMetrics...) + c.metrics = append(c.metrics, memoryMetrics...) + c.metrics = append(c.metrics, ioMetrics...) + c.storedMetrics = make(chan prometheus.Metric, 100*len(c.metrics)) + ns.Add(c) + return c +} + +func taskID(id, namespace string) string { + return fmt.Sprintf("%s-%s", id, namespace) +} + +// Collector provides the ability to collect container stats and export +// them in the prometheus format +type Collector struct { + mu sync.RWMutex + + tasks map[string]Statable + ns *metrics.Namespace + metrics []*metric + storedMetrics chan prometheus.Metric +} + +// Describe prometheus metrics +func (c *Collector) Describe(ch chan<- *prometheus.Desc) { + for _, m := range c.metrics { + ch <- m.desc(c.ns) + } +} + +// Collect prometheus metrics +func (c *Collector) Collect(ch chan<- prometheus.Metric) { + c.mu.RLock() + wg := &sync.WaitGroup{} + for _, t := range c.tasks { + wg.Add(1) + go c.collect(t, ch, true, wg) + } +storedLoop: + for { + // read stored metrics until the channel is flushed + select { + case m := <-c.storedMetrics: + ch <- m + default: + break storedLoop + } + } + c.mu.RUnlock() + wg.Wait() +} + +func (c *Collector) collect(t Statable, ch chan<- prometheus.Metric, block bool, wg *sync.WaitGroup) { + if wg != nil { + defer wg.Done() + } + ctx := namespaces.WithNamespace(context.Background(), t.Namespace()) + stats, err := t.Stats(ctx) + if err != nil { + log.L.WithError(err).Errorf("stat task %s", t.ID()) + return + } + data, err := typeurl.UnmarshalAny(stats) + if err != nil { + log.L.WithError(err).Errorf("unmarshal stats for %s", t.ID()) + return + } + s, ok := data.(*v2.Metrics) + if !ok { + log.L.WithError(err).Errorf("invalid metric type for %s", t.ID()) + return + } + for _, m := range c.metrics { + m.collect(t.ID(), t.Namespace(), s, c.ns, ch, block) + } +} + +// Add adds the provided cgroup and id so that metrics are collected and exported +func (c *Collector) Add(t Statable) error { + if c.ns == nil { + return nil + } + c.mu.Lock() + defer c.mu.Unlock() + id := taskID(t.ID(), t.Namespace()) + if _, ok := c.tasks[id]; ok { + return nil // requests to collect metrics should be idempotent + } + c.tasks[id] = t + return nil +} + +// Remove removes the provided cgroup by id from the collector +func (c *Collector) Remove(t Statable) { + if c.ns == nil { + return + } + c.mu.Lock() + defer c.mu.Unlock() + delete(c.tasks, taskID(t.ID(), t.Namespace())) +} + +// RemoveAll statable items from the collector +func (c *Collector) RemoveAll() { + if c.ns == nil { + return + } + c.mu.Lock() + c.tasks = make(map[string]Statable) + c.mu.Unlock() +} diff --git a/vendor/github.com/containerd/containerd/metrics/cgroups/v2/pids.go b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/pids.go new file mode 100644 index 00000000000..f1028b0678a --- /dev/null +++ b/vendor/github.com/containerd/containerd/metrics/cgroups/v2/pids.go @@ -0,0 +1,60 @@ +// +build linux + +/* + Copyright The containerd 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 v2 + +import ( + v2 "github.com/containerd/containerd/metrics/types/v2" + metrics "github.com/docker/go-metrics" + "github.com/prometheus/client_golang/prometheus" +) + +var pidMetrics = []*metric{ + { + name: "pids", + help: "The limit to the number of pids allowed (cgroup v2)", + unit: metrics.Unit("limit"), + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Pids == nil { + return nil + } + return []value{ + { + v: float64(stats.Pids.Limit), + }, + } + }, + }, + { + name: "pids", + help: "The current number of pids (cgroup v2)", + unit: metrics.Unit("current"), + vt: prometheus.GaugeValue, + getValues: func(stats *v2.Metrics) []value { + if stats.Pids == nil { + return nil + } + return []value{ + { + v: float64(stats.Pids.Current), + }, + } + }, + }, +} diff --git a/vendor/github.com/containerd/containerd/metrics/types/v1/types.go b/vendor/github.com/containerd/containerd/metrics/types/v1/types.go index 512f0359523..025c1f4d344 100644 --- a/vendor/github.com/containerd/containerd/metrics/types/v1/types.go +++ b/vendor/github.com/containerd/containerd/metrics/types/v1/types.go @@ -18,27 +18,29 @@ package v1 -import "github.com/containerd/cgroups" +import ( + v1 "github.com/containerd/cgroups/stats/v1" +) type ( // Metrics alias - Metrics = cgroups.Metrics + Metrics = v1.Metrics // BlkIOEntry alias - BlkIOEntry = cgroups.BlkIOEntry + BlkIOEntry = v1.BlkIOEntry // MemoryStat alias - MemoryStat = cgroups.MemoryStat + MemoryStat = v1.MemoryStat // CPUStat alias - CPUStat = cgroups.CPUStat + CPUStat = v1.CPUStat // CPUUsage alias - CPUUsage = cgroups.CPUUsage + CPUUsage = v1.CPUUsage // BlkIOStat alias - BlkIOStat = cgroups.BlkIOStat + BlkIOStat = v1.BlkIOStat // PidsStat alias - PidsStat = cgroups.PidsStat + PidsStat = v1.PidsStat // RdmaStat alias - RdmaStat = cgroups.RdmaStat + RdmaStat = v1.RdmaStat // RdmaEntry alias - RdmaEntry = cgroups.RdmaEntry + RdmaEntry = v1.RdmaEntry // HugetlbStat alias - HugetlbStat = cgroups.HugetlbStat + HugetlbStat = v1.HugetlbStat ) diff --git a/vendor/github.com/containerd/containerd/metrics/types/v2/types.go b/vendor/github.com/containerd/containerd/metrics/types/v2/types.go new file mode 100644 index 00000000000..eac8d460210 --- /dev/null +++ b/vendor/github.com/containerd/containerd/metrics/types/v2/types.go @@ -0,0 +1,36 @@ +// +build linux + +/* + Copyright The containerd 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 v2 + +import ( + v2 "github.com/containerd/cgroups/v2/stats" +) + +type ( + // Metrics alias + Metrics = v2.Metrics + // MemoryStat alias + MemoryStat = v2.MemoryStat + // CPUStat alias + CPUStat = v2.CPUStat + // PidsStat alias + PidsStat = v2.PidsStat + // IOStat alias + IOStat = v2.IOStat +) diff --git a/vendor/github.com/containerd/containerd/mount/mount_linux.go b/vendor/github.com/containerd/containerd/mount/mount_linux.go index 6bbc50bbf1a..d12a9c5a23f 100644 --- a/vendor/github.com/containerd/containerd/mount/mount_linux.go +++ b/vendor/github.com/containerd/containerd/mount/mount_linux.go @@ -19,6 +19,7 @@ package mount import ( "fmt" "os" + "os/exec" "path" "strings" "time" @@ -28,14 +29,27 @@ import ( "golang.org/x/sys/unix" ) -var pagesize = 4096 +var ( + pagesize = 4096 + allowedHelperBinaries = []string{"mount.fuse", "mount.fuse3"} +) func init() { pagesize = os.Getpagesize() } -// Mount to the provided target path +// Mount to the provided target path. +// +// If m.Type starts with "fuse." or "fuse3.", "mount.fuse" or "mount.fuse3" +// helper binary is called. func (m *Mount) Mount(target string) error { + for _, helperBinary := range allowedHelperBinaries { + // helperBinary = "mount.fuse", typePrefix = "fuse." + typePrefix := strings.TrimPrefix(helperBinary, "mount.") + "." + if strings.HasPrefix(m.Type, typePrefix) { + return m.mountWithHelper(helperBinary, typePrefix, target) + } + } var ( chdir string options = m.Options @@ -92,7 +106,28 @@ func Unmount(target string, flags int) error { return nil } +func isFUSE(dir string) (bool, error) { + // fuseSuperMagic is defined in statfs(2) + const fuseSuperMagic = 0x65735546 + var st unix.Statfs_t + if err := unix.Statfs(dir, &st); err != nil { + return false, err + } + return st.Type == fuseSuperMagic, nil +} + func unmount(target string, flags int) error { + // For FUSE mounts, attempting to execute fusermount helper binary is preferred + // https://github.com/containerd/containerd/pull/3765#discussion_r342083514 + if ok, err := isFUSE(target); err == nil && ok { + for _, helperBinary := range []string{"fusermount3", "fusermount"} { + cmd := exec.Command(helperBinary, "-u", target) + if err := cmd.Run(); err == nil { + return nil + } + // ignore error and try unix.Unmount + } + } for i := 0; i < 50; i++ { if err := unix.Unmount(target, flags); err != nil { switch err { @@ -317,3 +352,45 @@ func mountAt(chdir string, source, target, fstype string, flags uintptr, data st } return errors.Wrap(sys.FMountat(f.Fd(), source, target, fstype, flags, data), "failed to mountat") } + +func (m *Mount) mountWithHelper(helperBinary, typePrefix, target string) error { + // helperBinary: "mount.fuse3" + // target: "/foo/merged" + // m.Type: "fuse3.fuse-overlayfs" + // command: "mount.fuse3 overlay /foo/merged -o lowerdir=/foo/lower2:/foo/lower1,upperdir=/foo/upper,workdir=/foo/work -t fuse-overlayfs" + args := []string{m.Source, target} + for _, o := range m.Options { + args = append(args, "-o", o) + } + args = append(args, "-t", strings.TrimPrefix(m.Type, typePrefix)) + + infoBeforeMount, err := Lookup(target) + if err != nil { + return err + } + + // cmd.CombinedOutput() may intermittently return ECHILD because of our signal handling in shim. + // See #4387 and wait(2). + const retriesOnECHILD = 10 + for i := 0; i < retriesOnECHILD; i++ { + cmd := exec.Command(helperBinary, args...) + out, err := cmd.CombinedOutput() + if err == nil { + return nil + } + if !errors.Is(err, unix.ECHILD) { + return errors.Wrapf(err, "mount helper [%s %v] failed: %q", helperBinary, args, string(out)) + } + // We got ECHILD, we are not sure whether the mount was successful. + // If the mount ID has changed, we are sure we got some new mount, but still not sure it is fully completed. + // So we attempt to unmount the new mount before retrying. + infoAfterMount, err := Lookup(target) + if err != nil { + return err + } + if infoAfterMount.ID != infoBeforeMount.ID { + _ = unmount(target, 0) + } + } + return errors.Errorf("mount helper [%s %v] failed with ECHILD (retired %d times)", helperBinary, args, retriesOnECHILD) +} diff --git a/vendor/github.com/containerd/containerd/mount/mountinfo_linux.go b/vendor/github.com/containerd/containerd/mount/mountinfo_linux.go index a7407c50ed6..a8f2cc68cef 100644 --- a/vendor/github.com/containerd/containerd/mount/mountinfo_linux.go +++ b/vendor/github.com/containerd/containerd/mount/mountinfo_linux.go @@ -45,10 +45,6 @@ func parseInfoFile(r io.Reader) ([]Info, error) { out := []Info{} var err error for s.Scan() { - if err = s.Err(); err != nil { - return nil, err - } - /* See http://man7.org/linux/man-pages/man5/proc.5.html @@ -85,11 +81,11 @@ func parseInfoFile(r io.Reader) ([]Info, error) { p.Major, _ = strconv.Atoi(mm[0]) p.Minor, _ = strconv.Atoi(mm[1]) - p.Root, err = strconv.Unquote(`"` + fields[3] + `"`) + p.Root, err = strconv.Unquote(`"` + strings.Replace(fields[3], `"`, `\"`, -1) + `"`) if err != nil { return nil, errors.Wrapf(err, "parsing '%s' failed: unable to unquote root field", fields[3]) } - p.Mountpoint, err = strconv.Unquote(`"` + fields[4] + `"`) + p.Mountpoint, err = strconv.Unquote(`"` + strings.Replace(fields[4], `"`, `\"`, -1) + `"`) if err != nil { return nil, errors.Wrapf(err, "parsing '%s' failed: unable to unquote mount point field", fields[4]) } @@ -128,6 +124,10 @@ func parseInfoFile(r io.Reader) ([]Info, error) { out = append(out, p) } + if err = s.Err(); err != nil { + return nil, err + } + return out, nil } diff --git a/vendor/github.com/containerd/containerd/namespaces/context.go b/vendor/github.com/containerd/containerd/namespaces/context.go index 20596f09dd0..b53c9012c1b 100644 --- a/vendor/github.com/containerd/containerd/namespaces/context.go +++ b/vendor/github.com/containerd/containerd/namespaces/context.go @@ -21,6 +21,7 @@ import ( "os" "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/identifiers" "github.com/pkg/errors" ) @@ -70,7 +71,7 @@ func NamespaceRequired(ctx context.Context) (string, error) { if !ok || namespace == "" { return "", errors.Wrapf(errdefs.ErrFailedPrecondition, "namespace is required") } - if err := Validate(namespace); err != nil { + if err := identifiers.Validate(namespace); err != nil { return "", errors.Wrap(err, "namespace validation") } return namespace, nil diff --git a/vendor/github.com/containerd/containerd/namespaces/validate.go b/vendor/github.com/containerd/containerd/namespaces/validate.go deleted file mode 100644 index 222da3ea435..00000000000 --- a/vendor/github.com/containerd/containerd/namespaces/validate.go +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright The containerd 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 namespaces provides tools for working with namespaces across -// containerd. -// -// Namespaces collect resources such as containers and images, into a unique -// identifier space. This means that two applications can use the same -// identifiers and not conflict while using containerd. -// -// This package can be used to ensure that client and server functions -// correctly store the namespace on the context. -package namespaces - -import ( - "regexp" - - "github.com/containerd/containerd/errdefs" - "github.com/pkg/errors" -) - -const ( - maxLength = 76 - alpha = `[A-Za-z]` - alphanum = `[A-Za-z0-9]+` - label = alpha + alphanum + `(:?[-]+` + alpha + alphanum + `)*` -) - -var ( - // namespaceRe validates that a namespace matches valid identifiers. - // - // Rules for domains, defined in RFC 1035, section 2.3.1, are used for - // namespaces. - namespaceRe = regexp.MustCompile(reAnchor(label + reGroup("[.]"+reGroup(label)) + "*")) -) - -// Validate returns nil if the string s is a valid namespace. -// -// To allow such namespace identifiers to be used across various contexts -// safely, the character set has been restricted to that defined for domains in -// RFC 1035, section 2.3.1. This will make namespace identifiers safe for use -// across networks, filesystems and other media. -// -// The identifier specification departs from RFC 1035 in that it allows -// "labels" to start with number and only enforces a total length restriction -// of 76 characters. -// -// While the character set may be expanded in the future, namespace identifiers -// are guaranteed to be safely used as filesystem path components. -// -// For the most part, this doesn't need to be called directly when using the -// context-oriented functions. -func Validate(s string) error { - if len(s) > maxLength { - return errors.Wrapf(errdefs.ErrInvalidArgument, "namespace %q greater than maximum length (%d characters)", s, maxLength) - } - - if !namespaceRe.MatchString(s) { - return errors.Wrapf(errdefs.ErrInvalidArgument, "namespace %q must match %v", s, namespaceRe) - } - return nil -} - -func reGroup(s string) string { - return `(?:` + s + `)` -} - -func reAnchor(s string) string { - return `^` + s + `$` -} diff --git a/vendor/github.com/containerd/containerd/oci/spec_opts.go b/vendor/github.com/containerd/containerd/oci/spec_opts.go index ad6b52a9f51..89346fe8bf3 100644 --- a/vendor/github.com/containerd/containerd/oci/spec_opts.go +++ b/vendor/github.com/containerd/containerd/oci/spec_opts.go @@ -91,6 +91,21 @@ func setResources(s *Spec) { } } +// nolint +func setCPU(s *Spec) { + setResources(s) + if s.Linux != nil { + if s.Linux.Resources.CPU == nil { + s.Linux.Resources.CPU = &specs.LinuxCPU{} + } + } + if s.Windows != nil { + if s.Windows.Resources.CPU == nil { + s.Windows.Resources.CPU = &specs.WindowsCPUResources{} + } + } +} + // setCapabilities sets Linux Capabilities to empty if unset func setCapabilities(s *Spec) { setProcess(s) @@ -439,7 +454,7 @@ func WithHostLocaltime(_ context.Context, _ Client, _ *containers.Container, s * // WithUserNamespace sets the uid and gid mappings for the task // this can be called multiple times to add more mappings to the generated spec -func WithUserNamespace(container, host, size uint32) SpecOpts { +func WithUserNamespace(uidMap, gidMap []specs.LinuxIDMapping) SpecOpts { return func(_ context.Context, _ Client, _ *containers.Container, s *Spec) error { var hasUserns bool setLinux(s) @@ -454,13 +469,8 @@ func WithUserNamespace(container, host, size uint32) SpecOpts { Type: specs.UserNamespace, }) } - mapping := specs.LinuxIDMapping{ - ContainerID: container, - HostID: host, - Size: size, - } - s.Linux.UIDMappings = append(s.Linux.UIDMappings, mapping) - s.Linux.GIDMappings = append(s.Linux.GIDMappings, mapping) + s.Linux.UIDMappings = append(s.Linux.UIDMappings, uidMap...) + s.Linux.GIDMappings = append(s.Linux.GIDMappings, gidMap...) return nil } } @@ -1006,6 +1016,21 @@ func WithParentCgroupDevices(_ context.Context, _ Client, _ *containers.Containe return nil } +// WithAllDevicesAllowed permits READ WRITE MKNOD on all devices nodes for the container +func WithAllDevicesAllowed(_ context.Context, _ Client, _ *containers.Container, s *Spec) error { + setLinux(s) + if s.Linux.Resources == nil { + s.Linux.Resources = &specs.LinuxResources{} + } + s.Linux.Resources.Devices = []specs.LinuxDeviceCgroup{ + { + Allow: true, + Access: rwm, + }, + } + return nil +} + // WithDefaultUnixDevices adds the default devices for unix such as /dev/null, /dev/random to // the container's resource cgroup spec func WithDefaultUnixDevices(_ context.Context, _ Client, _ *containers.Container, s *Spec) error { @@ -1100,7 +1125,6 @@ func WithDefaultUnixDevices(_ context.Context, _ Client, _ *containers.Container } // WithPrivileged sets up options for a privileged container -// TODO(justincormack) device handling var WithPrivileged = Compose( WithAllCapabilities, WithMaskedPaths(nil), @@ -1214,11 +1238,11 @@ func WithEnvFile(path string) SpecOpts { sc := bufio.NewScanner(f) for sc.Scan() { - if sc.Err() != nil { - return sc.Err() - } vars = append(vars, sc.Text()) } + if err = sc.Err(); err != nil { + return err + } return WithEnv(vars)(nil, nil, nil, s) } } diff --git a/vendor/github.com/containerd/containerd/oci/spec_opts_linux.go b/vendor/github.com/containerd/containerd/oci/spec_opts_linux.go index 918c8f4ec3c..b1eab6f9f85 100644 --- a/vendor/github.com/containerd/containerd/oci/spec_opts_linux.go +++ b/vendor/github.com/containerd/containerd/oci/spec_opts_linux.go @@ -19,12 +19,69 @@ package oci import ( + "context" + "io/ioutil" "os" + "path/filepath" + "github.com/containerd/containerd/containers" specs "github.com/opencontainers/runtime-spec/specs-go" "golang.org/x/sys/unix" ) +// WithHostDevices adds all the hosts device nodes to the container's spec +func WithHostDevices(_ context.Context, _ Client, _ *containers.Container, s *Spec) error { + setLinux(s) + + devs, err := getDevices("/dev") + if err != nil { + return err + } + s.Linux.Devices = append(s.Linux.Devices, devs...) + return nil +} + +func getDevices(path string) ([]specs.LinuxDevice, error) { + files, err := ioutil.ReadDir(path) + if err != nil { + return nil, err + } + var out []specs.LinuxDevice + for _, f := range files { + switch { + case f.IsDir(): + switch f.Name() { + // ".lxc" & ".lxd-mounts" added to address https://github.com/lxc/lxd/issues/2825 + // ".udev" added to address https://github.com/opencontainers/runc/issues/2093 + case "pts", "shm", "fd", "mqueue", ".lxc", ".lxd-mounts", ".udev": + continue + default: + sub, err := getDevices(filepath.Join(path, f.Name())) + if err != nil { + return nil, err + } + + out = append(out, sub...) + continue + } + case f.Name() == "console": + continue + } + device, err := deviceFromPath(filepath.Join(path, f.Name()), "rwm") + if err != nil { + if err == ErrNotADevice { + continue + } + if os.IsNotExist(err) { + continue + } + return nil, err + } + out = append(out, *device) + } + return out, nil +} + func deviceFromPath(path, permissions string) (*specs.LinuxDevice, error) { var stat unix.Stat_t if err := unix.Lstat(path, &stat); err != nil { @@ -62,3 +119,64 @@ func deviceFromPath(path, permissions string) (*specs.LinuxDevice, error) { GID: &stat.Gid, }, nil } + +// WithMemorySwap sets the container's swap in bytes +func WithMemorySwap(swap int64) SpecOpts { + return func(ctx context.Context, _ Client, c *containers.Container, s *Spec) error { + setResources(s) + if s.Linux.Resources.Memory == nil { + s.Linux.Resources.Memory = &specs.LinuxMemory{} + } + s.Linux.Resources.Memory.Swap = &swap + return nil + } +} + +// WithPidsLimit sets the container's pid limit or maximum +func WithPidsLimit(limit int64) SpecOpts { + return func(ctx context.Context, _ Client, c *containers.Container, s *Spec) error { + setResources(s) + if s.Linux.Resources.Pids == nil { + s.Linux.Resources.Pids = &specs.LinuxPids{} + } + s.Linux.Resources.Pids.Limit = limit + return nil + } +} + +// WithCPUShares sets the container's cpu shares +func WithCPUShares(shares uint64) SpecOpts { + return func(ctx context.Context, _ Client, c *containers.Container, s *Spec) error { + setCPU(s) + s.Linux.Resources.CPU.Shares = &shares + return nil + } +} + +// WithCPUs sets the container's cpus/cores for use by the container +func WithCPUs(cpus string) SpecOpts { + return func(ctx context.Context, _ Client, c *containers.Container, s *Spec) error { + setCPU(s) + s.Linux.Resources.CPU.Cpus = cpus + return nil + } +} + +// WithCPUsMems sets the container's cpu mems for use by the container +func WithCPUsMems(mems string) SpecOpts { + return func(ctx context.Context, _ Client, c *containers.Container, s *Spec) error { + setCPU(s) + s.Linux.Resources.CPU.Mems = mems + return nil + } +} + +// WithCPUCFS sets the container's Completely fair scheduling (CFS) quota and period +func WithCPUCFS(quota int64, period uint64) SpecOpts { + return func(ctx context.Context, _ Client, c *containers.Container, s *Spec) error { + setCPU(s) + s.Linux.Resources.CPU.Quota = "a + s.Linux.Resources.CPU.Period = &period + return nil + } +} diff --git a/vendor/github.com/containerd/containerd/oci/spec_opts_unix.go b/vendor/github.com/containerd/containerd/oci/spec_opts_unix.go index 3f63dfd162b..972c11c8f85 100644 --- a/vendor/github.com/containerd/containerd/oci/spec_opts_unix.go +++ b/vendor/github.com/containerd/containerd/oci/spec_opts_unix.go @@ -19,12 +19,69 @@ package oci import ( + "context" + "io/ioutil" "os" + "path/filepath" + "github.com/containerd/containerd/containers" specs "github.com/opencontainers/runtime-spec/specs-go" "golang.org/x/sys/unix" ) +// WithHostDevices adds all the hosts device nodes to the container's spec +func WithHostDevices(_ context.Context, _ Client, _ *containers.Container, s *Spec) error { + setLinux(s) + + devs, err := getDevices("/dev") + if err != nil { + return err + } + s.Linux.Devices = append(s.Linux.Devices, devs...) + return nil +} + +func getDevices(path string) ([]specs.LinuxDevice, error) { + files, err := ioutil.ReadDir(path) + if err != nil { + return nil, err + } + var out []specs.LinuxDevice + for _, f := range files { + switch { + case f.IsDir(): + switch f.Name() { + // ".lxc" & ".lxd-mounts" added to address https://github.com/lxc/lxd/issues/2825 + // ".udev" added to address https://github.com/opencontainers/runc/issues/2093 + case "pts", "shm", "fd", "mqueue", ".lxc", ".lxd-mounts", ".udev": + continue + default: + sub, err := getDevices(filepath.Join(path, f.Name())) + if err != nil { + return nil, err + } + + out = append(out, sub...) + continue + } + case f.Name() == "console": + continue + } + device, err := deviceFromPath(filepath.Join(path, f.Name()), "rwm") + if err != nil { + if err == ErrNotADevice { + continue + } + if os.IsNotExist(err) { + continue + } + return nil, err + } + out = append(out, *device) + } + return out, nil +} + func deviceFromPath(path, permissions string) (*specs.LinuxDevice, error) { var stat unix.Stat_t if err := unix.Lstat(path, &stat); err != nil { @@ -61,3 +118,10 @@ func deviceFromPath(path, permissions string) (*specs.LinuxDevice, error) { GID: &stat.Gid, }, nil } + +// WithCPUCFS sets the container's Completely fair scheduling (CFS) quota and period +func WithCPUCFS(quota int64, period uint64) SpecOpts { + return func(ctx context.Context, _ Client, c *containers.Container, s *Spec) error { + return nil + } +} diff --git a/vendor/github.com/containerd/containerd/oci/spec_opts_windows.go b/vendor/github.com/containerd/containerd/oci/spec_opts_windows.go index d265d544def..d5004abb115 100644 --- a/vendor/github.com/containerd/containerd/oci/spec_opts_windows.go +++ b/vendor/github.com/containerd/containerd/oci/spec_opts_windows.go @@ -52,7 +52,7 @@ func WithWindowsIgnoreFlushesDuringBoot() SpecOpts { } } -// WithWindowNetworksAllowUnqualifiedDNSQuery sets `Windows.IgnoreFlushesDuringBoot`. +// WithWindowNetworksAllowUnqualifiedDNSQuery sets `Windows.Network.AllowUnqualifiedDNSQuery`. func WithWindowNetworksAllowUnqualifiedDNSQuery() SpecOpts { return func(_ context.Context, _ Client, _ *containers.Container, s *Spec) error { if s.Windows == nil { @@ -67,6 +67,13 @@ func WithWindowNetworksAllowUnqualifiedDNSQuery() SpecOpts { } } +// WithHostDevices adds all the hosts device nodes to the container's spec +// +// Not supported on windows +func WithHostDevices(_ context.Context, _ Client, _ *containers.Container, s *Spec) error { + return nil +} + func deviceFromPath(path, permissions string) (*specs.LinuxDevice, error) { return nil, errors.New("device from path not supported on Windows") } diff --git a/vendor/github.com/containerd/containerd/pkg/dialer/dialer_windows.go b/vendor/github.com/containerd/containerd/pkg/dialer/dialer_windows.go index 64d30dea0cd..4dd296ebc3e 100644 --- a/vendor/github.com/containerd/containerd/pkg/dialer/dialer_windows.go +++ b/vendor/github.com/containerd/containerd/pkg/dialer/dialer_windows.go @@ -19,21 +19,13 @@ package dialer import ( "net" "os" - "syscall" "time" winio "github.com/Microsoft/go-winio" ) func isNoent(err error) bool { - if err != nil { - if oerr, ok := err.(*os.PathError); ok { - if oerr.Err == syscall.ENOENT { - return true - } - } - } - return false + return os.IsNotExist(err) } func dialer(address string, timeout time.Duration) (net.Conn, error) { diff --git a/vendor/github.com/containerd/containerd/pkg/oom/oom.go b/vendor/github.com/containerd/containerd/pkg/oom/oom.go new file mode 100644 index 00000000000..6d5bf270c09 --- /dev/null +++ b/vendor/github.com/containerd/containerd/pkg/oom/oom.go @@ -0,0 +1,30 @@ +// +build linux + +/* + Copyright The containerd 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 oom + +import ( + "context" +) + +// Watcher watches OOM events +type Watcher interface { + Close() error + Run(ctx context.Context) + Add(id string, cg interface{}) error +} diff --git a/vendor/github.com/containerd/containerd/pkg/oom/epoll.go b/vendor/github.com/containerd/containerd/pkg/oom/v1/v1.go similarity index 81% rename from vendor/github.com/containerd/containerd/pkg/oom/epoll.go rename to vendor/github.com/containerd/containerd/pkg/oom/v1/v1.go index 6675603328b..be8de74db62 100644 --- a/vendor/github.com/containerd/containerd/pkg/oom/epoll.go +++ b/vendor/github.com/containerd/containerd/pkg/oom/v1/v1.go @@ -16,7 +16,7 @@ limitations under the License. */ -package oom +package v1 import ( "context" @@ -24,28 +24,30 @@ import ( "github.com/containerd/cgroups" eventstypes "github.com/containerd/containerd/api/events" + "github.com/containerd/containerd/pkg/oom" "github.com/containerd/containerd/runtime" "github.com/containerd/containerd/runtime/v2/shim" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" ) // New returns an epoll implementation that listens to OOM events // from a container's cgroups. -func New(publisher shim.Publisher) (*Epoller, error) { +func New(publisher shim.Publisher) (oom.Watcher, error) { fd, err := unix.EpollCreate1(unix.EPOLL_CLOEXEC) if err != nil { return nil, err } - return &Epoller{ + return &epoller{ fd: fd, publisher: publisher, set: make(map[uintptr]*item), }, nil } -// Epoller implementation for handling OOM events from a container's cgroup -type Epoller struct { +// epoller implementation for handling OOM events from a container's cgroup +type epoller struct { mu sync.Mutex fd int @@ -59,12 +61,12 @@ type item struct { } // Close the epoll fd -func (e *Epoller) Close() error { +func (e *epoller) Close() error { return unix.Close(e.fd) } // Run the epoll loop -func (e *Epoller) Run(ctx context.Context) { +func (e *epoller) Run(ctx context.Context) { var events [128]unix.EpollEvent for { select { @@ -86,8 +88,12 @@ func (e *Epoller) Run(ctx context.Context) { } } -// Add the cgroup to the epoll monitor -func (e *Epoller) Add(id string, cg cgroups.Cgroup) error { +// Add cgroups.Cgroup to the epoll monitor +func (e *epoller) Add(id string, cgx interface{}) error { + cg, ok := cgx.(cgroups.Cgroup) + if !ok { + return errors.Errorf("expected cgroups.Cgroup, got: %T", cgx) + } e.mu.Lock() defer e.mu.Unlock() fd, err := cg.OOMEventFD() @@ -105,7 +111,7 @@ func (e *Epoller) Add(id string, cg cgroups.Cgroup) error { return unix.EpollCtl(e.fd, unix.EPOLL_CTL_ADD, int(fd), &event) } -func (e *Epoller) process(ctx context.Context, fd uintptr) { +func (e *epoller) process(ctx context.Context, fd uintptr) { flush(fd) e.mu.Lock() i, ok := e.set[fd] diff --git a/vendor/github.com/containerd/containerd/pkg/oom/v2/v2.go b/vendor/github.com/containerd/containerd/pkg/oom/v2/v2.go new file mode 100644 index 00000000000..a956b1c8667 --- /dev/null +++ b/vendor/github.com/containerd/containerd/pkg/oom/v2/v2.go @@ -0,0 +1,113 @@ +// +build linux + +/* + Copyright The containerd 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 v2 + +import ( + "context" + + cgroupsv2 "github.com/containerd/cgroups/v2" + eventstypes "github.com/containerd/containerd/api/events" + "github.com/containerd/containerd/pkg/oom" + "github.com/containerd/containerd/runtime" + "github.com/containerd/containerd/runtime/v2/shim" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +// New returns an implementation that listens to OOM events +// from a container's cgroups. +func New(publisher shim.Publisher) (oom.Watcher, error) { + return &watcher{ + itemCh: make(chan item), + publisher: publisher, + }, nil +} + +// watcher implementation for handling OOM events from a container's cgroup +type watcher struct { + itemCh chan item + publisher shim.Publisher +} + +type item struct { + id string + ev cgroupsv2.Event + err error +} + +// Close closes the watcher +func (w *watcher) Close() error { + return nil +} + +// Run the loop +func (w *watcher) Run(ctx context.Context) { + lastOOMMap := make(map[string]uint64) // key: id, value: ev.OOM + for { + select { + case <-ctx.Done(): + w.Close() + return + case i := <-w.itemCh: + if i.err != nil { + delete(lastOOMMap, i.id) + continue + } + lastOOM := lastOOMMap[i.id] + if i.ev.OOM > lastOOM { + if err := w.publisher.Publish(ctx, runtime.TaskOOMEventTopic, &eventstypes.TaskOOM{ + ContainerID: i.id, + }); err != nil { + logrus.WithError(err).Error("publish OOM event") + } + } + if i.ev.OOM > 0 { + lastOOMMap[i.id] = i.ev.OOM + } + } + } +} + +// Add cgroups.Cgroup to the epoll monitor +func (w *watcher) Add(id string, cgx interface{}) error { + cg, ok := cgx.(*cgroupsv2.Manager) + if !ok { + return errors.Errorf("expected *cgroupsv2.Manager, got: %T", cgx) + } + // FIXME: cgroupsv2.Manager does not support closing eventCh routine currently. + // The routine shuts down when an error happens, mostly when the cgroup is deleted. + eventCh, errCh := cg.EventChan() + go func() { + for { + i := item{id: id} + select { + case ev := <-eventCh: + i.ev = ev + w.itemCh <- i + case err := <-errCh: + i.err = err + w.itemCh <- i + // we no longer get any event/err when we got an err + logrus.WithError(err).Warn("error from *cgroupsv2.Manager.EventChan") + return + } + } + }() + return nil +} diff --git a/vendor/github.com/containerd/containerd/pkg/process/init.go b/vendor/github.com/containerd/containerd/pkg/process/init.go index e94a39a0d97..5cb22460a54 100644 --- a/vendor/github.com/containerd/containerd/pkg/process/init.go +++ b/vendor/github.com/containerd/containerd/pkg/process/init.go @@ -27,7 +27,6 @@ import ( "path/filepath" "strings" "sync" - "syscall" "time" "github.com/containerd/console" @@ -39,6 +38,7 @@ import ( google_protobuf "github.com/gogo/protobuf/types" specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" + "golang.org/x/sys/unix" ) // Init represents an initial process for a container @@ -87,7 +87,7 @@ func NewRunc(root, path, namespace, runtime, criu string, systemd bool) *runc.Ru Command: runtime, Log: filepath.Join(path, "log.json"), LogFormat: runc.JSON, - PdeathSignal: syscall.SIGKILL, + PdeathSignal: unix.SIGKILL, Root: filepath.Join(root, namespace), Criu: criu, SystemdCgroup: systemd, @@ -176,7 +176,7 @@ func (p *Init) Create(ctx context.Context, r *CreateConfig) error { } func (p *Init) openStdin(path string) error { - sc, err := fifo.OpenFifo(context.Background(), path, syscall.O_WRONLY|syscall.O_NONBLOCK, 0) + sc, err := fifo.OpenFifo(context.Background(), path, unix.O_WRONLY|unix.O_NONBLOCK, 0) if err != nil { return errors.Wrapf(err, "failed to open stdin fifo %s", path) } @@ -361,7 +361,7 @@ func (p *Init) KillAll(ctx context.Context) error { p.mu.Lock() defer p.mu.Unlock() - err := p.runtime.Kill(ctx, p.id, int(syscall.SIGKILL), &runc.KillOpts{ + err := p.runtime.Kill(ctx, p.id, int(unix.SIGKILL), &runc.KillOpts{ All: true, }) return p.runtimeError(err, "OCI runtime killall failed") diff --git a/vendor/github.com/containerd/containerd/pkg/process/io.go b/vendor/github.com/containerd/containerd/pkg/process/io.go index 9b5503497a9..40172a70e1d 100644 --- a/vendor/github.com/containerd/containerd/pkg/process/io.go +++ b/vendor/github.com/containerd/containerd/pkg/process/io.go @@ -381,7 +381,7 @@ func (b *binaryIO) cancel() error { return result.ErrorOrNil() } - done := make(chan error) + done := make(chan error, 1) go func() { done <- b.cmd.Wait() }() diff --git a/vendor/github.com/containerd/containerd/pkg/process/utils.go b/vendor/github.com/containerd/containerd/pkg/process/utils.go index 3c4661770b6..444dbb6572c 100644 --- a/vendor/github.com/containerd/containerd/pkg/process/utils.go +++ b/vendor/github.com/containerd/containerd/pkg/process/utils.go @@ -137,6 +137,8 @@ func checkKillError(err error) error { strings.Contains(strings.ToLower(err.Error()), "no such process") || err == unix.ESRCH { return errors.Wrapf(errdefs.ErrNotFound, "process already finished") + } else if strings.Contains(err.Error(), "does not exist") { + return errors.Wrapf(errdefs.ErrNotFound, "no such container") } return errors.Wrapf(err, "unknown error after kill") } diff --git a/vendor/github.com/containerd/containerd/pkg/ttrpcutil/client.go b/vendor/github.com/containerd/containerd/pkg/ttrpcutil/client.go index ba3d51d5109..8b4d925d28e 100644 --- a/vendor/github.com/containerd/containerd/pkg/ttrpcutil/client.go +++ b/vendor/github.com/containerd/containerd/pkg/ttrpcutil/client.go @@ -21,6 +21,7 @@ import ( "time" v1 "github.com/containerd/containerd/api/services/ttrpc/events/v1" + "github.com/containerd/containerd/pkg/dialer" "github.com/containerd/ttrpc" "github.com/pkg/errors" ) @@ -40,7 +41,7 @@ type Client struct { // NewClient returns a new containerd TTRPC client that is connected to the containerd instance provided by address func NewClient(address string, opts ...ttrpc.ClientOpts) (*Client, error) { connector := func() (*ttrpc.Client, error) { - conn, err := ttrpcDial(address, ttrpcDialTimeout) + conn, err := dialer.Dialer(address, ttrpcDialTimeout) if err != nil { return nil, errors.Wrap(err, "failed to connect") } @@ -49,14 +50,8 @@ func NewClient(address string, opts ...ttrpc.ClientOpts) (*Client, error) { return client, nil } - client, err := connector() - if err != nil { - return nil, err - } - return &Client{ connector: connector, - client: client, }, nil } @@ -73,6 +68,12 @@ func (c *Client) Reconnect() error { return errors.New("client is closed") } + if c.client != nil { + if err := c.client.Close(); err != nil { + return err + } + } + client, err := c.connector() if err != nil { return err @@ -83,16 +84,26 @@ func (c *Client) Reconnect() error { } // EventsService creates an EventsService client -func (c *Client) EventsService() v1.EventsService { - return v1.NewEventsClient(c.Client()) +func (c *Client) EventsService() (v1.EventsService, error) { + client, err := c.Client() + if err != nil { + return nil, err + } + return v1.NewEventsClient(client), nil } // Client returns the underlying TTRPC client object -func (c *Client) Client() *ttrpc.Client { +func (c *Client) Client() (*ttrpc.Client, error) { c.mu.Lock() defer c.mu.Unlock() - - return c.client + if c.client == nil { + client, err := c.connector() + if err != nil { + return nil, err + } + c.client = client + } + return c.client, nil } // Close closes the clients TTRPC connection to containerd @@ -101,5 +112,8 @@ func (c *Client) Close() error { defer c.mu.Unlock() c.closed = true - return c.client.Close() + if c.client != nil { + return c.client.Close() + } + return nil } diff --git a/vendor/github.com/containerd/containerd/pkg/ttrpcutil/client_windows.go b/vendor/github.com/containerd/containerd/pkg/ttrpcutil/client_windows.go deleted file mode 100644 index b8c69ef0ad9..00000000000 --- a/vendor/github.com/containerd/containerd/pkg/ttrpcutil/client_windows.go +++ /dev/null @@ -1,59 +0,0 @@ -// +build windows - -/* - Copyright The containerd 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 ttrpcutil - -import ( - "context" - "net" - "os" - "time" - - winio "github.com/Microsoft/go-winio" - "github.com/pkg/errors" -) - -func ttrpcDial(address string, timeout time.Duration) (net.Conn, error) { - ctx, cancel := context.WithTimeout(context.Background(), timeout) - defer cancel() - - // If there is nobody serving the pipe we limit the timeout for this case to - // 5 seconds because any shim that would serve this endpoint should serve it - // within 5 seconds. - serveTimer := time.NewTimer(5 * time.Second) - defer serveTimer.Stop() - for { - c, err := winio.DialPipeContext(ctx, address) - if err != nil { - if os.IsNotExist(err) { - select { - case <-serveTimer.C: - return nil, errors.Wrap(os.ErrNotExist, "pipe not found before timeout") - default: - // Wait 10ms for the shim to serve and try again. - time.Sleep(10 * time.Millisecond) - continue - } - } else if err == context.DeadlineExceeded { - return nil, errors.Wrapf(err, "timed out waiting for npipe %s", address) - } - return nil, err - } - return c, nil - } -} diff --git a/vendor/github.com/containerd/containerd/platforms/cpuinfo.go b/vendor/github.com/containerd/containerd/platforms/cpuinfo.go index 69b336d67f7..db65a726b90 100644 --- a/vendor/github.com/containerd/containerd/platforms/cpuinfo.go +++ b/vendor/github.com/containerd/containerd/platforms/cpuinfo.go @@ -74,8 +74,8 @@ func getCPUInfo(pattern string) (info string, err error) { } func getCPUVariant() string { - if runtime.GOOS == "windows" { - // Windows only supports v7 for ARM32 and v8 for ARM64 and so we can use + if runtime.GOOS == "windows" || runtime.GOOS == "darwin" { + // Windows/Darwin only supports v7 for ARM32 and v8 for ARM64 and so we can use // runtime.GOARCH to determine the variants var variant string switch runtime.GOARCH { @@ -96,16 +96,21 @@ func getCPUVariant() string { return "" } - switch variant { - case "8", "AArch64": - variant = "v8" - case "7", "7M", "?(12)", "?(13)", "?(14)", "?(15)", "?(16)", "?(17)": + switch strings.ToLower(variant) { + case "8", "aarch64": + // special case: if running a 32-bit userspace on aarch64, the variant should be "v7" + if runtime.GOARCH == "arm" { + variant = "v7" + } else { + variant = "v8" + } + case "7", "7m", "?(12)", "?(13)", "?(14)", "?(15)", "?(16)", "?(17)": variant = "v7" - case "6", "6TEJ": + case "6", "6tej": variant = "v6" - case "5", "5T", "5TE", "5TEJ": + case "5", "5t", "5te", "5tej": variant = "v5" - case "4", "4T": + case "4", "4t": variant = "v4" case "3": variant = "v3" diff --git a/vendor/github.com/containerd/containerd/plugin/plugin.go b/vendor/github.com/containerd/containerd/plugin/plugin.go index c7d27241405..2674edeb1b9 100644 --- a/vendor/github.com/containerd/containerd/plugin/plugin.go +++ b/vendor/github.com/containerd/containerd/plugin/plugin.go @@ -44,7 +44,7 @@ var ( // IsSkipPlugin returns true if the error is skipping the plugin func IsSkipPlugin(err error) bool { - return errors.Cause(err) == ErrSkipPlugin + return errors.Is(err, ErrSkipPlugin) } // Type is the type of the plugin diff --git a/vendor/github.com/containerd/containerd/plugin/plugin_go18.go b/vendor/github.com/containerd/containerd/plugin/plugin_go18.go index 5b82db86858..927fe61965a 100644 --- a/vendor/github.com/containerd/containerd/plugin/plugin_go18.go +++ b/vendor/github.com/containerd/containerd/plugin/plugin_go18.go @@ -1,4 +1,4 @@ -// +build go1.8,!windows,amd64,!static_build +// +build go1.8,!windows,amd64,!static_build,!gccgo /* Copyright The containerd Authors. diff --git a/vendor/github.com/containerd/containerd/plugin/plugin_other.go b/vendor/github.com/containerd/containerd/plugin/plugin_other.go index 2978f60fd3b..0c5e14165cf 100644 --- a/vendor/github.com/containerd/containerd/plugin/plugin_other.go +++ b/vendor/github.com/containerd/containerd/plugin/plugin_other.go @@ -1,4 +1,4 @@ -// +build !go1.8 windows !amd64 static_build +// +build !go1.8 windows !amd64 static_build gccgo /* Copyright The containerd Authors. diff --git a/vendor/github.com/containerd/containerd/pull.go b/vendor/github.com/containerd/containerd/pull.go index b5c50d94fd5..36365513f69 100644 --- a/vendor/github.com/containerd/containerd/pull.go +++ b/vendor/github.com/containerd/containerd/pull.go @@ -27,6 +27,7 @@ import ( "github.com/containerd/containerd/remotes/docker/schema1" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" + "golang.org/x/sync/errgroup" "golang.org/x/sync/semaphore" ) @@ -62,20 +63,18 @@ func (c *Client) Pull(ctx context.Context, ref string, opts ...RemoteOpt) (_ Ima defer done(ctx) var unpacks int32 + var unpackEg *errgroup.Group + var unpackWrapper func(f images.Handler) images.Handler + if pullCtx.Unpack { // unpacker only supports schema 2 image, for schema 1 this is noop. u, err := c.newUnpacker(ctx, pullCtx) if err != nil { return nil, errors.Wrap(err, "create unpacker") } - unpackWrapper, eg := u.handlerWrapper(ctx, &unpacks) + unpackWrapper, unpackEg = u.handlerWrapper(ctx, pullCtx, &unpacks) defer func() { - if retErr != nil { - // Forcibly stop the unpacker if there is - // an error. - eg.Cancel() - } - if err := eg.Wait(); err != nil { + if err := unpackEg.Wait(); err != nil { if retErr == nil { retErr = errors.Wrap(err, "unpack") } @@ -86,7 +85,7 @@ func (c *Client) Pull(ctx context.Context, ref string, opts ...RemoteOpt) (_ Ima if wrapper == nil { return unpackWrapper(h) } - return wrapper(unpackWrapper(h)) + return unpackWrapper(wrapper(h)) } } @@ -95,6 +94,22 @@ func (c *Client) Pull(ctx context.Context, ref string, opts ...RemoteOpt) (_ Ima return nil, err } + // NOTE(fuweid): unpacker defers blobs download. before create image + // record in ImageService, should wait for unpacking(including blobs + // download). + if pullCtx.Unpack { + if unpackEg != nil { + if err := unpackEg.Wait(); err != nil { + return nil, err + } + } + } + + img, err = c.createNewImage(ctx, img) + if err != nil { + return nil, err + } + i := NewImageWithPlatform(c, img, pullCtx.PlatformMatcher) if pullCtx.Unpack { @@ -144,7 +159,7 @@ func (c *Client) fetch(ctx context.Context, rCtx *RemoteContext, ref string, lim // Get all the children for a descriptor childrenHandler := images.ChildrenHandler(store) // Set any children labels for that content - childrenHandler = images.SetChildrenLabels(store, childrenHandler) + childrenHandler = images.SetChildrenMappedLabels(store, childrenHandler, rCtx.ChildLabelMap) if rCtx.AllMetadata { // Filter manifests by platforms but allow to handle manifest // and configuration for not-target platforms @@ -206,12 +221,14 @@ func (c *Client) fetch(ctx context.Context, rCtx *RemoteContext, ref string, lim } } - img := images.Image{ + return images.Image{ Name: name, Target: desc, Labels: rCtx.Labels, - } + }, nil +} +func (c *Client) createNewImage(ctx context.Context, img images.Image) (images.Image, error) { is := c.ImageService() for { if created, err := is.Create(ctx, img); err != nil { diff --git a/vendor/github.com/containerd/containerd/reference/docker/reference.go b/vendor/github.com/containerd/containerd/reference/docker/reference.go new file mode 100644 index 00000000000..0998639b030 --- /dev/null +++ b/vendor/github.com/containerd/containerd/reference/docker/reference.go @@ -0,0 +1,797 @@ +/* + Copyright The containerd 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 docker provides a general type to represent any way of referencing images within the registry. +// Its main purpose is to abstract tags and digests (content-addressable hash). +// +// Grammar +// +// reference := name [ ":" tag ] [ "@" digest ] +// name := [domain '/'] path-component ['/' path-component]* +// domain := domain-component ['.' domain-component]* [':' port-number] +// domain-component := /([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])/ +// port-number := /[0-9]+/ +// path-component := alpha-numeric [separator alpha-numeric]* +// alpha-numeric := /[a-z0-9]+/ +// separator := /[_.]|__|[-]*/ +// +// tag := /[\w][\w.-]{0,127}/ +// +// digest := digest-algorithm ":" digest-hex +// digest-algorithm := digest-algorithm-component [ digest-algorithm-separator digest-algorithm-component ]* +// digest-algorithm-separator := /[+.-_]/ +// digest-algorithm-component := /[A-Za-z][A-Za-z0-9]*/ +// digest-hex := /[0-9a-fA-F]{32,}/ ; At least 128 bit digest value +// +// identifier := /[a-f0-9]{64}/ +// short-identifier := /[a-f0-9]{6,64}/ +package docker + +import ( + "errors" + "fmt" + "path" + "regexp" + "strings" + + "github.com/opencontainers/go-digest" +) + +const ( + // NameTotalLengthMax is the maximum total number of characters in a repository name. + NameTotalLengthMax = 255 +) + +var ( + // ErrReferenceInvalidFormat represents an error while trying to parse a string as a reference. + ErrReferenceInvalidFormat = errors.New("invalid reference format") + + // ErrTagInvalidFormat represents an error while trying to parse a string as a tag. + ErrTagInvalidFormat = errors.New("invalid tag format") + + // ErrDigestInvalidFormat represents an error while trying to parse a string as a tag. + ErrDigestInvalidFormat = errors.New("invalid digest format") + + // ErrNameContainsUppercase is returned for invalid repository names that contain uppercase characters. + ErrNameContainsUppercase = errors.New("repository name must be lowercase") + + // ErrNameEmpty is returned for empty, invalid repository names. + ErrNameEmpty = errors.New("repository name must have at least one component") + + // ErrNameTooLong is returned when a repository name is longer than NameTotalLengthMax. + ErrNameTooLong = fmt.Errorf("repository name must not be more than %v characters", NameTotalLengthMax) + + // ErrNameNotCanonical is returned when a name is not canonical. + ErrNameNotCanonical = errors.New("repository name must be canonical") +) + +// Reference is an opaque object reference identifier that may include +// modifiers such as a hostname, name, tag, and digest. +type Reference interface { + // String returns the full reference + String() string +} + +// Field provides a wrapper type for resolving correct reference types when +// working with encoding. +type Field struct { + reference Reference +} + +// AsField wraps a reference in a Field for encoding. +func AsField(reference Reference) Field { + return Field{reference} +} + +// Reference unwraps the reference type from the field to +// return the Reference object. This object should be +// of the appropriate type to further check for different +// reference types. +func (f Field) Reference() Reference { + return f.reference +} + +// MarshalText serializes the field to byte text which +// is the string of the reference. +func (f Field) MarshalText() (p []byte, err error) { + return []byte(f.reference.String()), nil +} + +// UnmarshalText parses text bytes by invoking the +// reference parser to ensure the appropriately +// typed reference object is wrapped by field. +func (f *Field) UnmarshalText(p []byte) error { + r, err := Parse(string(p)) + if err != nil { + return err + } + + f.reference = r + return nil +} + +// Named is an object with a full name +type Named interface { + Reference + Name() string +} + +// Tagged is an object which has a tag +type Tagged interface { + Reference + Tag() string +} + +// NamedTagged is an object including a name and tag. +type NamedTagged interface { + Named + Tag() string +} + +// Digested is an object which has a digest +// in which it can be referenced by +type Digested interface { + Reference + Digest() digest.Digest +} + +// Canonical reference is an object with a fully unique +// name including a name with domain and digest +type Canonical interface { + Named + Digest() digest.Digest +} + +// namedRepository is a reference to a repository with a name. +// A namedRepository has both domain and path components. +type namedRepository interface { + Named + Domain() string + Path() string +} + +// Domain returns the domain part of the Named reference +func Domain(named Named) string { + if r, ok := named.(namedRepository); ok { + return r.Domain() + } + domain, _ := splitDomain(named.Name()) + return domain +} + +// Path returns the name without the domain part of the Named reference +func Path(named Named) (name string) { + if r, ok := named.(namedRepository); ok { + return r.Path() + } + _, path := splitDomain(named.Name()) + return path +} + +func splitDomain(name string) (string, string) { + match := anchoredNameRegexp.FindStringSubmatch(name) + if len(match) != 3 { + return "", name + } + return match[1], match[2] +} + +// SplitHostname splits a named reference into a +// hostname and name string. If no valid hostname is +// found, the hostname is empty and the full value +// is returned as name +// DEPRECATED: Use Domain or Path +func SplitHostname(named Named) (string, string) { + if r, ok := named.(namedRepository); ok { + return r.Domain(), r.Path() + } + return splitDomain(named.Name()) +} + +// Parse parses s and returns a syntactically valid Reference. +// If an error was encountered it is returned, along with a nil Reference. +// NOTE: Parse will not handle short digests. +func Parse(s string) (Reference, error) { + matches := ReferenceRegexp.FindStringSubmatch(s) + if matches == nil { + if s == "" { + return nil, ErrNameEmpty + } + if ReferenceRegexp.FindStringSubmatch(strings.ToLower(s)) != nil { + return nil, ErrNameContainsUppercase + } + return nil, ErrReferenceInvalidFormat + } + + if len(matches[1]) > NameTotalLengthMax { + return nil, ErrNameTooLong + } + + var repo repository + + nameMatch := anchoredNameRegexp.FindStringSubmatch(matches[1]) + if len(nameMatch) == 3 { + repo.domain = nameMatch[1] + repo.path = nameMatch[2] + } else { + repo.domain = "" + repo.path = matches[1] + } + + ref := reference{ + namedRepository: repo, + tag: matches[2], + } + if matches[3] != "" { + var err error + ref.digest, err = digest.Parse(matches[3]) + if err != nil { + return nil, err + } + } + + r := getBestReferenceType(ref) + if r == nil { + return nil, ErrNameEmpty + } + + return r, nil +} + +// ParseNamed parses s and returns a syntactically valid reference implementing +// the Named interface. The reference must have a name and be in the canonical +// form, otherwise an error is returned. +// If an error was encountered it is returned, along with a nil Reference. +// NOTE: ParseNamed will not handle short digests. +func ParseNamed(s string) (Named, error) { + named, err := ParseNormalizedNamed(s) + if err != nil { + return nil, err + } + if named.String() != s { + return nil, ErrNameNotCanonical + } + return named, nil +} + +// WithName returns a named object representing the given string. If the input +// is invalid ErrReferenceInvalidFormat will be returned. +func WithName(name string) (Named, error) { + if len(name) > NameTotalLengthMax { + return nil, ErrNameTooLong + } + + match := anchoredNameRegexp.FindStringSubmatch(name) + if match == nil || len(match) != 3 { + return nil, ErrReferenceInvalidFormat + } + return repository{ + domain: match[1], + path: match[2], + }, nil +} + +// WithTag combines the name from "name" and the tag from "tag" to form a +// reference incorporating both the name and the tag. +func WithTag(name Named, tag string) (NamedTagged, error) { + if !anchoredTagRegexp.MatchString(tag) { + return nil, ErrTagInvalidFormat + } + var repo repository + if r, ok := name.(namedRepository); ok { + repo.domain = r.Domain() + repo.path = r.Path() + } else { + repo.path = name.Name() + } + if canonical, ok := name.(Canonical); ok { + return reference{ + namedRepository: repo, + tag: tag, + digest: canonical.Digest(), + }, nil + } + return taggedReference{ + namedRepository: repo, + tag: tag, + }, nil +} + +// WithDigest combines the name from "name" and the digest from "digest" to form +// a reference incorporating both the name and the digest. +func WithDigest(name Named, digest digest.Digest) (Canonical, error) { + if !anchoredDigestRegexp.MatchString(digest.String()) { + return nil, ErrDigestInvalidFormat + } + var repo repository + if r, ok := name.(namedRepository); ok { + repo.domain = r.Domain() + repo.path = r.Path() + } else { + repo.path = name.Name() + } + if tagged, ok := name.(Tagged); ok { + return reference{ + namedRepository: repo, + tag: tagged.Tag(), + digest: digest, + }, nil + } + return canonicalReference{ + namedRepository: repo, + digest: digest, + }, nil +} + +// TrimNamed removes any tag or digest from the named reference. +func TrimNamed(ref Named) Named { + domain, path := SplitHostname(ref) + return repository{ + domain: domain, + path: path, + } +} + +func getBestReferenceType(ref reference) Reference { + if ref.Name() == "" { + // Allow digest only references + if ref.digest != "" { + return digestReference(ref.digest) + } + return nil + } + if ref.tag == "" { + if ref.digest != "" { + return canonicalReference{ + namedRepository: ref.namedRepository, + digest: ref.digest, + } + } + return ref.namedRepository + } + if ref.digest == "" { + return taggedReference{ + namedRepository: ref.namedRepository, + tag: ref.tag, + } + } + + return ref +} + +type reference struct { + namedRepository + tag string + digest digest.Digest +} + +func (r reference) String() string { + return r.Name() + ":" + r.tag + "@" + r.digest.String() +} + +func (r reference) Tag() string { + return r.tag +} + +func (r reference) Digest() digest.Digest { + return r.digest +} + +type repository struct { + domain string + path string +} + +func (r repository) String() string { + return r.Name() +} + +func (r repository) Name() string { + if r.domain == "" { + return r.path + } + return r.domain + "/" + r.path +} + +func (r repository) Domain() string { + return r.domain +} + +func (r repository) Path() string { + return r.path +} + +type digestReference digest.Digest + +func (d digestReference) String() string { + return digest.Digest(d).String() +} + +func (d digestReference) Digest() digest.Digest { + return digest.Digest(d) +} + +type taggedReference struct { + namedRepository + tag string +} + +func (t taggedReference) String() string { + return t.Name() + ":" + t.tag +} + +func (t taggedReference) Tag() string { + return t.tag +} + +type canonicalReference struct { + namedRepository + digest digest.Digest +} + +func (c canonicalReference) String() string { + return c.Name() + "@" + c.digest.String() +} + +func (c canonicalReference) Digest() digest.Digest { + return c.digest +} + +var ( + // alphaNumericRegexp defines the alpha numeric atom, typically a + // component of names. This only allows lower case characters and digits. + alphaNumericRegexp = match(`[a-z0-9]+`) + + // separatorRegexp defines the separators allowed to be embedded in name + // components. This allow one period, one or two underscore and multiple + // dashes. + separatorRegexp = match(`(?:[._]|__|[-]*)`) + + // nameComponentRegexp restricts registry path component names to start + // with at least one letter or number, with following parts able to be + // separated by one period, one or two underscore and multiple dashes. + nameComponentRegexp = expression( + alphaNumericRegexp, + optional(repeated(separatorRegexp, alphaNumericRegexp))) + + // domainComponentRegexp restricts the registry domain component of a + // repository name to start with a component as defined by DomainRegexp + // and followed by an optional port. + domainComponentRegexp = match(`(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])`) + + // DomainRegexp defines the structure of potential domain components + // that may be part of image names. This is purposely a subset of what is + // allowed by DNS to ensure backwards compatibility with Docker image + // names. + DomainRegexp = expression( + domainComponentRegexp, + optional(repeated(literal(`.`), domainComponentRegexp)), + optional(literal(`:`), match(`[0-9]+`))) + + // TagRegexp matches valid tag names. From docker/docker:graph/tags.go. + TagRegexp = match(`[\w][\w.-]{0,127}`) + + // anchoredTagRegexp matches valid tag names, anchored at the start and + // end of the matched string. + anchoredTagRegexp = anchored(TagRegexp) + + // DigestRegexp matches valid digests. + DigestRegexp = match(`[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}`) + + // anchoredDigestRegexp matches valid digests, anchored at the start and + // end of the matched string. + anchoredDigestRegexp = anchored(DigestRegexp) + + // NameRegexp is the format for the name component of references. The + // regexp has capturing groups for the domain and name part omitting + // the separating forward slash from either. + NameRegexp = expression( + optional(DomainRegexp, literal(`/`)), + nameComponentRegexp, + optional(repeated(literal(`/`), nameComponentRegexp))) + + // anchoredNameRegexp is used to parse a name value, capturing the + // domain and trailing components. + anchoredNameRegexp = anchored( + optional(capture(DomainRegexp), literal(`/`)), + capture(nameComponentRegexp, + optional(repeated(literal(`/`), nameComponentRegexp)))) + + // ReferenceRegexp is the full supported format of a reference. The regexp + // is anchored and has capturing groups for name, tag, and digest + // components. + ReferenceRegexp = anchored(capture(NameRegexp), + optional(literal(":"), capture(TagRegexp)), + optional(literal("@"), capture(DigestRegexp))) + + // IdentifierRegexp is the format for string identifier used as a + // content addressable identifier using sha256. These identifiers + // are like digests without the algorithm, since sha256 is used. + IdentifierRegexp = match(`([a-f0-9]{64})`) + + // ShortIdentifierRegexp is the format used to represent a prefix + // of an identifier. A prefix may be used to match a sha256 identifier + // within a list of trusted identifiers. + ShortIdentifierRegexp = match(`([a-f0-9]{6,64})`) + + // anchoredIdentifierRegexp is used to check or match an + // identifier value, anchored at start and end of string. + anchoredIdentifierRegexp = anchored(IdentifierRegexp) +) + +// match compiles the string to a regular expression. +var match = regexp.MustCompile + +// literal compiles s into a literal regular expression, escaping any regexp +// reserved characters. +func literal(s string) *regexp.Regexp { + re := match(regexp.QuoteMeta(s)) + + if _, complete := re.LiteralPrefix(); !complete { + panic("must be a literal") + } + + return re +} + +// expression defines a full expression, where each regular expression must +// follow the previous. +func expression(res ...*regexp.Regexp) *regexp.Regexp { + var s string + for _, re := range res { + s += re.String() + } + + return match(s) +} + +// optional wraps the expression in a non-capturing group and makes the +// production optional. +func optional(res ...*regexp.Regexp) *regexp.Regexp { + return match(group(expression(res...)).String() + `?`) +} + +// repeated wraps the regexp in a non-capturing group to get one or more +// matches. +func repeated(res ...*regexp.Regexp) *regexp.Regexp { + return match(group(expression(res...)).String() + `+`) +} + +// group wraps the regexp in a non-capturing group. +func group(res ...*regexp.Regexp) *regexp.Regexp { + return match(`(?:` + expression(res...).String() + `)`) +} + +// capture wraps the expression in a capturing group. +func capture(res ...*regexp.Regexp) *regexp.Regexp { + return match(`(` + expression(res...).String() + `)`) +} + +// anchored anchors the regular expression by adding start and end delimiters. +func anchored(res ...*regexp.Regexp) *regexp.Regexp { + return match(`^` + expression(res...).String() + `$`) +} + +var ( + legacyDefaultDomain = "index.docker.io" + defaultDomain = "docker.io" + officialRepoName = "library" + defaultTag = "latest" +) + +// normalizedNamed represents a name which has been +// normalized and has a familiar form. A familiar name +// is what is used in Docker UI. An example normalized +// name is "docker.io/library/ubuntu" and corresponding +// familiar name of "ubuntu". +type normalizedNamed interface { + Named + Familiar() Named +} + +// ParseNormalizedNamed parses a string into a named reference +// transforming a familiar name from Docker UI to a fully +// qualified reference. If the value may be an identifier +// use ParseAnyReference. +func ParseNormalizedNamed(s string) (Named, error) { + if ok := anchoredIdentifierRegexp.MatchString(s); ok { + return nil, fmt.Errorf("invalid repository name (%s), cannot specify 64-byte hexadecimal strings", s) + } + domain, remainder := splitDockerDomain(s) + var remoteName string + if tagSep := strings.IndexRune(remainder, ':'); tagSep > -1 { + remoteName = remainder[:tagSep] + } else { + remoteName = remainder + } + if strings.ToLower(remoteName) != remoteName { + return nil, errors.New("invalid reference format: repository name must be lowercase") + } + + ref, err := Parse(domain + "/" + remainder) + if err != nil { + return nil, err + } + named, isNamed := ref.(Named) + if !isNamed { + return nil, fmt.Errorf("reference %s has no name", ref.String()) + } + return named, nil +} + +// ParseDockerRef normalizes the image reference following the docker convention. This is added +// mainly for backward compatibility. +// The reference returned can only be either tagged or digested. For reference contains both tag +// and digest, the function returns digested reference, e.g. docker.io/library/busybox:latest@ +// sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa will be returned as +// docker.io/library/busybox@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa. +func ParseDockerRef(ref string) (Named, error) { + named, err := ParseNormalizedNamed(ref) + if err != nil { + return nil, err + } + if _, ok := named.(NamedTagged); ok { + if canonical, ok := named.(Canonical); ok { + // The reference is both tagged and digested, only + // return digested. + newNamed, err := WithName(canonical.Name()) + if err != nil { + return nil, err + } + newCanonical, err := WithDigest(newNamed, canonical.Digest()) + if err != nil { + return nil, err + } + return newCanonical, nil + } + } + return TagNameOnly(named), nil +} + +// splitDockerDomain splits a repository name to domain and remotename string. +// If no valid domain is found, the default domain is used. Repository name +// needs to be already validated before. +func splitDockerDomain(name string) (domain, remainder string) { + i := strings.IndexRune(name, '/') + if i == -1 || (!strings.ContainsAny(name[:i], ".:") && name[:i] != "localhost") { + domain, remainder = defaultDomain, name + } else { + domain, remainder = name[:i], name[i+1:] + } + if domain == legacyDefaultDomain { + domain = defaultDomain + } + if domain == defaultDomain && !strings.ContainsRune(remainder, '/') { + remainder = officialRepoName + "/" + remainder + } + return +} + +// familiarizeName returns a shortened version of the name familiar +// to to the Docker UI. Familiar names have the default domain +// "docker.io" and "library/" repository prefix removed. +// For example, "docker.io/library/redis" will have the familiar +// name "redis" and "docker.io/dmcgowan/myapp" will be "dmcgowan/myapp". +// Returns a familiarized named only reference. +func familiarizeName(named namedRepository) repository { + repo := repository{ + domain: named.Domain(), + path: named.Path(), + } + + if repo.domain == defaultDomain { + repo.domain = "" + // Handle official repositories which have the pattern "library/" + if split := strings.Split(repo.path, "/"); len(split) == 2 && split[0] == officialRepoName { + repo.path = split[1] + } + } + return repo +} + +func (r reference) Familiar() Named { + return reference{ + namedRepository: familiarizeName(r.namedRepository), + tag: r.tag, + digest: r.digest, + } +} + +func (r repository) Familiar() Named { + return familiarizeName(r) +} + +func (t taggedReference) Familiar() Named { + return taggedReference{ + namedRepository: familiarizeName(t.namedRepository), + tag: t.tag, + } +} + +func (c canonicalReference) Familiar() Named { + return canonicalReference{ + namedRepository: familiarizeName(c.namedRepository), + digest: c.digest, + } +} + +// TagNameOnly adds the default tag "latest" to a reference if it only has +// a repo name. +func TagNameOnly(ref Named) Named { + if IsNameOnly(ref) { + namedTagged, err := WithTag(ref, defaultTag) + if err != nil { + // Default tag must be valid, to create a NamedTagged + // type with non-validated input the WithTag function + // should be used instead + panic(err) + } + return namedTagged + } + return ref +} + +// ParseAnyReference parses a reference string as a possible identifier, +// full digest, or familiar name. +func ParseAnyReference(ref string) (Reference, error) { + if ok := anchoredIdentifierRegexp.MatchString(ref); ok { + return digestReference("sha256:" + ref), nil + } + if dgst, err := digest.Parse(ref); err == nil { + return digestReference(dgst), nil + } + + return ParseNormalizedNamed(ref) +} + +// IsNameOnly returns true if reference only contains a repo name. +func IsNameOnly(ref Named) bool { + if _, ok := ref.(NamedTagged); ok { + return false + } + if _, ok := ref.(Canonical); ok { + return false + } + return true +} + +// FamiliarName returns the familiar name string +// for the given named, familiarizing if needed. +func FamiliarName(ref Named) string { + if nn, ok := ref.(normalizedNamed); ok { + return nn.Familiar().Name() + } + return ref.Name() +} + +// FamiliarString returns the familiar string representation +// for the given reference, familiarizing if needed. +func FamiliarString(ref Reference) string { + if nn, ok := ref.(normalizedNamed); ok { + return nn.Familiar().String() + } + return ref.String() +} + +// FamiliarMatch reports whether ref matches the specified pattern. +// See https://godoc.org/path#Match for supported patterns. +func FamiliarMatch(pattern string, ref Reference) (bool, error) { + matched, err := path.Match(pattern, FamiliarString(ref)) + if namedRef, isNamed := ref.(Named); isNamed && !matched { + matched, _ = path.Match(pattern, FamiliarName(namedRef)) + } + return matched, err +} diff --git a/vendor/github.com/containerd/containerd/reference/reference.go b/vendor/github.com/containerd/containerd/reference/reference.go index 79f165de026..562ab0d4917 100644 --- a/vendor/github.com/containerd/containerd/reference/reference.go +++ b/vendor/github.com/containerd/containerd/reference/reference.go @@ -124,7 +124,7 @@ func (r Spec) Hostname() string { i := strings.Index(r.Locator, "/") if i < 0 { - i = len(r.Locator) + 1 + return r.Locator } return r.Locator[:i] } diff --git a/vendor/github.com/containerd/containerd/remotes/docker/authorizer.go b/vendor/github.com/containerd/containerd/remotes/docker/authorizer.go index 59d989effaf..001423a0d1c 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/authorizer.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/authorizer.go @@ -273,7 +273,7 @@ func (ah *authHandler) doBearerAuth(ctx context.Context) (string, error) { // copy common tokenOptions to := ah.common - to.scopes = getTokenScopes(ctx, to.scopes) + to.scopes = GetTokenScopes(ctx, to.scopes) // Docs: https://docs.docker.com/registry/spec/auth/scope scoped := strings.Join(to.scopes, " ") diff --git a/vendor/github.com/containerd/containerd/remotes/docker/config/config_unix.go b/vendor/github.com/containerd/containerd/remotes/docker/config/config_unix.go new file mode 100644 index 00000000000..8245c4d70b9 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/config/config_unix.go @@ -0,0 +1,40 @@ +// +build !windows + +/* + Copyright The containerd 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 config + +import ( + "crypto/x509" + "path/filepath" +) + +func hostPaths(root, host string) []string { + ch := hostDirectory(host) + if ch == host { + return []string{filepath.Join(root, host)} + } + + return []string{ + filepath.Join(root, ch), + filepath.Join(root, host), + } +} + +func rootSystemPool() (*x509.CertPool, error) { + return x509.SystemCertPool() +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/config/config_windows.go b/vendor/github.com/containerd/containerd/remotes/docker/config/config_windows.go new file mode 100644 index 00000000000..948b6539638 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/config/config_windows.go @@ -0,0 +1,41 @@ +// +build windows + +/* + Copyright The containerd 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 config + +import ( + "crypto/x509" + "path/filepath" + "strings" +) + +func hostPaths(root, host string) []string { + ch := hostDirectory(host) + if ch == host { + return []string{filepath.Join(root, host)} + } + + return []string{ + filepath.Join(root, strings.Replace(ch, ":", "", -1)), + filepath.Join(root, strings.Replace(host, ":", "", -1)), + } +} + +func rootSystemPool() (*x509.CertPool, error) { + return x509.NewCertPool(), nil +} diff --git a/vendor/github.com/containerd/containerd/remotes/docker/config/hosts.go b/vendor/github.com/containerd/containerd/remotes/docker/config/hosts.go new file mode 100644 index 00000000000..60bf9148e31 --- /dev/null +++ b/vendor/github.com/containerd/containerd/remotes/docker/config/hosts.go @@ -0,0 +1,514 @@ +/* + Copyright The containerd 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. +*/ + +// config package containers utilities for helping configure the Docker resolver +package config + +import ( + "context" + "crypto/tls" + "io/ioutil" + "net" + "net/http" + "net/url" + "os" + "path" + "path/filepath" + "strings" + "time" + + "github.com/BurntSushi/toml" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/log" + "github.com/containerd/containerd/remotes/docker" + "github.com/pkg/errors" +) + +type hostConfig struct { + scheme string + host string + path string + + capabilities docker.HostCapabilities + + caCerts []string + clientPairs [][2]string + skipVerify *bool + + header http.Header + + // TODO: API ("docker" or "oci") + // TODO: API Version ("v1", "v2") + // TODO: Add credential configuration (domain alias, username) +} + +// HostOptions is used to configure registry hosts +type HostOptions struct { + HostDir func(string) (string, error) + Credentials func(host string) (string, string, error) + DefaultTLS *tls.Config + DefaultScheme string +} + +// ConfigureHosts creates a registry hosts function from the provided +// host creation options. The host directory can read hosts.toml or +// certificate files laid out in the Docker specific layout. +// If a `HostDir` function is not required, defaults are used. +func ConfigureHosts(ctx context.Context, options HostOptions) docker.RegistryHosts { + return func(host string) ([]docker.RegistryHost, error) { + var hosts []hostConfig + if options.HostDir != nil { + dir, err := options.HostDir(host) + if err != nil && !errdefs.IsNotFound(err) { + return nil, err + } + if dir != "" { + log.G(ctx).WithField("dir", dir).Debug("loading host directory") + hosts, err = loadHostDir(ctx, dir) + if err != nil { + return nil, err + } + } + + } + + // If hosts was not set, add a default host + // NOTE: Check nil here and not empty, the host may be + // intentionally configured to not have any endpoints + if hosts == nil { + hosts = make([]hostConfig, 1) + } + if len(hosts) > 0 && hosts[len(hosts)-1].host == "" { + if host == "docker.io" { + hosts[len(hosts)-1].scheme = "https" + hosts[len(hosts)-1].host = "registry-1.docker.io" + } else { + hosts[len(hosts)-1].host = host + if options.DefaultScheme != "" { + hosts[len(hosts)-1].scheme = options.DefaultScheme + } else { + hosts[len(hosts)-1].scheme = "https" + } + } + hosts[len(hosts)-1].path = "/v2" + hosts[len(hosts)-1].capabilities = docker.HostCapabilityPull | docker.HostCapabilityResolve | docker.HostCapabilityPush + } + + var defaultTLSConfig *tls.Config + if options.DefaultTLS != nil { + defaultTLSConfig = options.DefaultTLS + } else { + defaultTLSConfig = &tls.Config{} + } + + defaultTransport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, + DialContext: (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + FallbackDelay: 300 * time.Millisecond, + }).DialContext, + MaxIdleConns: 10, + IdleConnTimeout: 30 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + TLSClientConfig: defaultTLSConfig, + ExpectContinueTimeout: 5 * time.Second, + } + + client := &http.Client{ + Transport: defaultTransport, + } + + authOpts := []docker.AuthorizerOpt{docker.WithAuthClient(client)} + if options.Credentials != nil { + authOpts = append(authOpts, docker.WithAuthCreds(options.Credentials)) + } + authorizer := docker.NewDockerAuthorizer(authOpts...) + + rhosts := make([]docker.RegistryHost, len(hosts)) + for i, host := range hosts { + + rhosts[i].Scheme = host.scheme + rhosts[i].Host = host.host + rhosts[i].Path = host.path + rhosts[i].Capabilities = host.capabilities + rhosts[i].Header = host.header + + if host.caCerts != nil || host.clientPairs != nil || host.skipVerify != nil { + tr := defaultTransport.Clone() + tlsConfig := tr.TLSClientConfig + if host.skipVerify != nil { + tlsConfig.InsecureSkipVerify = *host.skipVerify + } + if host.caCerts != nil { + if tlsConfig.RootCAs == nil { + rootPool, err := rootSystemPool() + if err != nil { + return nil, errors.Wrap(err, "unable to initialize cert pool") + } + tlsConfig.RootCAs = rootPool + } + for _, f := range host.caCerts { + data, err := ioutil.ReadFile(f) + if err != nil { + return nil, errors.Wrapf(err, "unable to read CA cert %q", f) + } + if !tlsConfig.RootCAs.AppendCertsFromPEM(data) { + return nil, errors.Errorf("unable to load CA cert %q", f) + } + } + } + + if host.clientPairs != nil { + for _, pair := range host.clientPairs { + certPEMBlock, err := ioutil.ReadFile(pair[0]) + if err != nil { + return nil, errors.Wrapf(err, "unable to read CERT file %q", pair[0]) + } + var keyPEMBlock []byte + if pair[1] != "" { + keyPEMBlock, err = ioutil.ReadFile(pair[1]) + if err != nil { + return nil, errors.Wrapf(err, "unable to read CERT file %q", pair[1]) + } + } else { + // Load key block from same PEM file + keyPEMBlock = certPEMBlock + } + cert, err := tls.X509KeyPair(certPEMBlock, keyPEMBlock) + if err != nil { + return nil, errors.Wrap(err, "failed to load X509 key pair") + } + + tlsConfig.Certificates = append(tlsConfig.Certificates, cert) + } + } + + c := *client + c.Transport = tr + + rhosts[i].Client = &c + rhosts[i].Authorizer = docker.NewDockerAuthorizer(append(authOpts, docker.WithAuthClient(&c))...) + } else { + rhosts[i].Client = client + rhosts[i].Authorizer = authorizer + } + } + + return rhosts, nil + } + +} + +// HostDirFromRoot returns a function which finds a host directory +// based at the given root. +func HostDirFromRoot(root string) func(string) (string, error) { + return func(host string) (string, error) { + for _, p := range hostPaths(root, host) { + if _, err := os.Stat(p); err == nil { + return p, nil + } else if !os.IsNotExist(err) { + return "", err + } + } + return "", errdefs.ErrNotFound + } +} + +// hostDirectory converts ":port" to "_port_" in directory names +func hostDirectory(host string) string { + idx := strings.LastIndex(host, ":") + if idx > 0 { + return host[:idx] + "_" + host[idx+1:] + "_" + } + return host +} + +func loadHostDir(ctx context.Context, hostsDir string) ([]hostConfig, error) { + b, err := ioutil.ReadFile(filepath.Join(hostsDir, "hosts.toml")) + if err != nil && !os.IsNotExist(err) { + return nil, err + } + + if len(b) == 0 { + // If hosts.toml does not exist, fallback to checking for + // certificate files based on Docker's certificate file + // pattern (".crt", ".cert", ".key" files) + return loadCertFiles(ctx, hostsDir) + } + + hosts, err := parseHostsFile(ctx, hostsDir, b) + if err != nil { + log.G(ctx).WithError(err).Error("failed to decode hosts.toml") + // Fallback to checking certificate files + return loadCertFiles(ctx, hostsDir) + } + + return hosts, nil +} + +type hostFileConfig struct { + // Capabilities determine what operations a host is + // capable of performing. Allowed values + // - pull + // - resolve + // - push + Capabilities []string `toml:"capabilities"` + + // CACert can be a string or an array of strings + CACert toml.Primitive `toml:"ca"` + + // TODO: Make this an array (two key types, one for pairs (multiple files), one for single file?) + Client toml.Primitive `toml:"client"` + + SkipVerify *bool `toml:"skip_verify"` + + Header map[string]toml.Primitive `toml:"header"` + + // API (default: "docker") + // API Version (default: "v2") + // Credentials: helper? name? username? alternate domain? token? +} + +type configFile struct { + // hostConfig holds defaults for all hosts as well as + // for the default server + hostFileConfig + + // Server specifies the default server. When `host` is + // also specified, those hosts are tried first. + Server string `toml:"server"` + + // HostConfigs store the per-host configuration + HostConfigs map[string]hostFileConfig `toml:"host"` +} + +func parseHostsFile(ctx context.Context, baseDir string, b []byte) ([]hostConfig, error) { + var c configFile + md, err := toml.Decode(string(b), &c) + if err != nil { + return nil, err + } + + var orderedHosts []string + for _, key := range md.Keys() { + if len(key) >= 2 { + if key[0] == "host" && (len(orderedHosts) == 0 || orderedHosts[len(orderedHosts)-1] != key[1]) { + orderedHosts = append(orderedHosts, key[1]) + } + } + } + + if c.HostConfigs == nil { + c.HostConfigs = map[string]hostFileConfig{} + } + if c.Server != "" { + c.HostConfigs[c.Server] = c.hostFileConfig + orderedHosts = append(orderedHosts, c.Server) + } else if len(orderedHosts) == 0 { + c.HostConfigs[""] = c.hostFileConfig + orderedHosts = append(orderedHosts, "") + } + hosts := make([]hostConfig, len(orderedHosts)) + for i, server := range orderedHosts { + hostConfig := c.HostConfigs[server] + + if server != "" { + if !strings.HasPrefix(server, "http") { + server = "https://" + server + } + u, err := url.Parse(server) + if err != nil { + return nil, errors.Errorf("unable to parse server %v", server) + } + hosts[i].scheme = u.Scheme + hosts[i].host = u.Host + + // TODO: Handle path based on registry protocol + // Define a registry protocol type + // OCI v1 - Always use given path as is + // Docker v2 - Always ensure ends with /v2/ + if len(u.Path) > 0 { + u.Path = path.Clean(u.Path) + if !strings.HasSuffix(u.Path, "/v2") { + u.Path = u.Path + "/v2" + } + } else { + u.Path = "/v2" + } + hosts[i].path = u.Path + } + hosts[i].skipVerify = hostConfig.SkipVerify + + if len(hostConfig.Capabilities) > 0 { + for _, c := range hostConfig.Capabilities { + switch strings.ToLower(c) { + case "pull": + hosts[i].capabilities |= docker.HostCapabilityPull + case "resolve": + hosts[i].capabilities |= docker.HostCapabilityResolve + case "push": + hosts[i].capabilities |= docker.HostCapabilityPush + default: + return nil, errors.Errorf("unknown capability %v", c) + } + } + } else { + hosts[i].capabilities = docker.HostCapabilityPull | docker.HostCapabilityResolve | docker.HostCapabilityPush + } + + baseKey := []string{} + if server != "" && server != c.Server { + baseKey = append(baseKey, "host", server) + } + caKey := append(baseKey, "ca") + if md.IsDefined(caKey...) { + switch t := md.Type(caKey...); t { + case "String": + var caCert string + if err := md.PrimitiveDecode(hostConfig.CACert, &caCert); err != nil { + return nil, errors.Wrap(err, "failed to decode \"ca\"") + } + hosts[i].caCerts = []string{makeAbsPath(caCert, baseDir)} + case "Array": + var caCerts []string + if err := md.PrimitiveDecode(hostConfig.CACert, &caCerts); err != nil { + return nil, errors.Wrap(err, "failed to decode \"ca\"") + } + for i, p := range caCerts { + caCerts[i] = makeAbsPath(p, baseDir) + } + + hosts[i].caCerts = caCerts + default: + return nil, errors.Errorf("invalid type %v for \"ca\"", t) + } + } + + clientKey := append(baseKey, "client") + if md.IsDefined(clientKey...) { + switch t := md.Type(clientKey...); t { + case "String": + var clientCert string + if err := md.PrimitiveDecode(hostConfig.Client, &clientCert); err != nil { + return nil, errors.Wrap(err, "failed to decode \"ca\"") + } + hosts[i].clientPairs = [][2]string{{makeAbsPath(clientCert, baseDir), ""}} + case "Array": + var clientCerts []interface{} + if err := md.PrimitiveDecode(hostConfig.Client, &clientCerts); err != nil { + return nil, errors.Wrap(err, "failed to decode \"ca\"") + } + for _, pairs := range clientCerts { + switch p := pairs.(type) { + case string: + hosts[i].clientPairs = append(hosts[i].clientPairs, [2]string{makeAbsPath(p, baseDir), ""}) + case []interface{}: + var pair [2]string + if len(p) > 2 { + return nil, errors.Errorf("invalid pair %v for \"client\"", p) + } + for pi, cp := range p { + s, ok := cp.(string) + if !ok { + return nil, errors.Errorf("invalid type %T for \"client\"", cp) + } + pair[pi] = makeAbsPath(s, baseDir) + } + hosts[i].clientPairs = append(hosts[i].clientPairs, pair) + default: + return nil, errors.Errorf("invalid type %T for \"client\"", p) + } + } + default: + return nil, errors.Errorf("invalid type %v for \"client\"", t) + } + } + + headerKey := append(baseKey, "header") + if md.IsDefined(headerKey...) { + header := http.Header{} + for key, prim := range hostConfig.Header { + switch t := md.Type(append(headerKey, key)...); t { + case "String": + var value string + if err := md.PrimitiveDecode(prim, &value); err != nil { + return nil, errors.Wrapf(err, "failed to decode header %q", key) + } + header[key] = []string{value} + case "Array": + var value []string + if err := md.PrimitiveDecode(prim, &value); err != nil { + return nil, errors.Wrapf(err, "failed to decode header %q", key) + } + + header[key] = value + default: + return nil, errors.Errorf("invalid type %v for header %q", t, key) + } + } + hosts[i].header = header + } + } + + return hosts, nil +} + +func makeAbsPath(p string, base string) string { + if filepath.IsAbs(p) { + return p + } + return filepath.Join(base, p) +} + +// loadCertsDir loads certs from certsDir like "/etc/docker/certs.d" . +// Compatible with Docker file layout +// - files ending with ".crt" are treated as CA certificate files +// - files ending with ".cert" are treated as client certificates, and +// files with the same name but ending with ".key" are treated as the +// corresponding private key. +// NOTE: If a ".key" file is missing, this function will just return +// the ".cert", which may contain the private key. If the ".cert" file +// does not contain the private key, the caller should detect and error. +func loadCertFiles(ctx context.Context, certsDir string) ([]hostConfig, error) { + fs, err := ioutil.ReadDir(certsDir) + if err != nil && !os.IsNotExist(err) { + return nil, err + } + hosts := make([]hostConfig, 1) + for _, f := range fs { + if !f.IsDir() { + continue + } + if strings.HasSuffix(f.Name(), ".crt") { + hosts[0].caCerts = append(hosts[0].caCerts, filepath.Join(certsDir, f.Name())) + } + if strings.HasSuffix(f.Name(), ".cert") { + var pair [2]string + certFile := f.Name() + pair[0] = filepath.Join(certsDir, certFile) + // Check if key also exists + keyFile := certFile[:len(certFile)-5] + ".key" + if _, err := os.Stat(keyFile); err == nil { + pair[1] = filepath.Join(certsDir, keyFile) + } else if !os.IsNotExist(err) { + return nil, err + } + hosts[0].clientPairs = append(hosts[0].clientPairs, pair) + } + } + return hosts, nil +} diff --git a/vendor/github.com/docker/distribution/registry/api/errcode/errors.go b/vendor/github.com/containerd/containerd/remotes/docker/errcode.go similarity index 91% rename from vendor/github.com/docker/distribution/registry/api/errcode/errors.go rename to vendor/github.com/containerd/containerd/remotes/docker/errcode.go index 4c35b879afd..7d1e54f2a15 100644 --- a/vendor/github.com/docker/distribution/registry/api/errcode/errors.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/errcode.go @@ -1,4 +1,20 @@ -package errcode +/* + Copyright The containerd 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 docker import ( "encoding/json" diff --git a/vendor/github.com/docker/distribution/registry/api/errcode/register.go b/vendor/github.com/containerd/containerd/remotes/docker/errdesc.go similarity index 87% rename from vendor/github.com/docker/distribution/registry/api/errcode/register.go rename to vendor/github.com/containerd/containerd/remotes/docker/errdesc.go index d1e8826c6d7..b2bd4d82bd8 100644 --- a/vendor/github.com/docker/distribution/registry/api/errcode/register.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/errdesc.go @@ -1,4 +1,20 @@ -package errcode +/* + Copyright The containerd 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 docker import ( "fmt" diff --git a/vendor/github.com/containerd/containerd/remotes/docker/fetcher.go b/vendor/github.com/containerd/containerd/remotes/docker/fetcher.go index 0896eea92a7..cd0168be5b9 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/fetcher.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/fetcher.go @@ -29,7 +29,6 @@ import ( "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" "github.com/containerd/containerd/log" - "github.com/docker/distribution/registry/api/errcode" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" ) @@ -99,6 +98,9 @@ func (r dockerFetcher) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.R var firstErr error for _, host := range r.hosts { req := r.request(host, http.MethodGet, "manifests", desc.Digest.String()) + if err := req.addNamespace(r.refspec.Hostname()); err != nil { + return nil, err + } rc, err := r.open(ctx, req, desc.MediaType, offset) if err != nil { @@ -119,6 +121,9 @@ func (r dockerFetcher) Fetch(ctx context.Context, desc ocispec.Descriptor) (io.R var firstErr error for _, host := range r.hosts { req := r.request(host, http.MethodGet, "blobs", desc.Digest.String()) + if err := req.addNamespace(r.refspec.Hostname()); err != nil { + return nil, err + } rc, err := r.open(ctx, req, desc.MediaType, offset) if err != nil { @@ -168,7 +173,7 @@ func (r dockerFetcher) open(ctx context.Context, req *request, mediatype string, if resp.StatusCode == http.StatusNotFound { return nil, errors.Wrapf(errdefs.ErrNotFound, "content at %v not found", req.String()) } - var registryErr errcode.Errors + var registryErr Errors if err := json.NewDecoder(resp.Body).Decode(®istryErr); err != nil || registryErr.Len() < 1 { return nil, errors.Errorf("unexpected status code %v: %v", req.String(), resp.Status) } diff --git a/vendor/github.com/containerd/containerd/remotes/docker/pusher.go b/vendor/github.com/containerd/containerd/remotes/docker/pusher.go index a89ecefba65..98ea515d591 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/pusher.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/pusher.go @@ -86,7 +86,7 @@ func (p dockerPusher) Push(ctx context.Context, desc ocispec.Descriptor) (conten resp, err := req.doWithRetries(ctx, nil) if err != nil { - if errors.Cause(err) != ErrInvalidAuthorization { + if !errors.Is(err, ErrInvalidAuthorization) { return nil, err } log.G(ctx).WithError(err).Debugf("Unable to check existence, continuing with push") @@ -235,7 +235,7 @@ func (p dockerPusher) Push(ctx context.Context, desc ocispec.Descriptor) (conten go func() { defer close(respC) - resp, err = req.do(ctx) + resp, err := req.do(ctx) if err != nil { pr.CloseWithError(err) return @@ -340,9 +340,9 @@ func (pw *pushWriter) Commit(ctx context.Context, size int64, expected digest.Di } // 201 is specified return status, some registries return - // 200 or 204. + // 200, 202 or 204. switch resp.StatusCode { - case http.StatusOK, http.StatusCreated, http.StatusNoContent: + case http.StatusOK, http.StatusCreated, http.StatusNoContent, http.StatusAccepted: default: return errors.Errorf("unexpected status: %s", resp.Status) } diff --git a/vendor/github.com/containerd/containerd/remotes/docker/registry.go b/vendor/github.com/containerd/containerd/remotes/docker/registry.go index ae24f41e105..7c231d92846 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/registry.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/registry.go @@ -70,6 +70,16 @@ type RegistryHost struct { Scheme string Path string Capabilities HostCapabilities + Header http.Header +} + +func (h RegistryHost) isProxy(refhost string) bool { + if refhost != h.Host { + if refhost != "docker.io" || h.Host != "registry-1.docker.io" { + return true + } + } + return false } // RegistryHosts fetches the registry hosts for a given namespace, diff --git a/vendor/github.com/containerd/containerd/remotes/docker/resolver.go b/vendor/github.com/containerd/containerd/remotes/docker/resolver.go index 90a0e34de69..53e42ecc5a5 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/resolver.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/resolver.go @@ -22,6 +22,7 @@ import ( "io" "io/ioutil" "net/http" + "net/url" "path" "strings" @@ -276,6 +277,10 @@ func (r *dockerResolver) Resolve(ctx context.Context, ref string) (string, ocisp ctx := log.WithLogger(ctx, log.G(ctx).WithField("host", host.Host)) req := base.request(host, http.MethodHead, u...) + if err := req.addNamespace(base.refspec.Hostname()); err != nil { + return "", ocispec.Descriptor{}, err + } + for key, value := range r.resolveHeader { req.header[key] = append(req.header[key], value...) } @@ -283,7 +288,7 @@ func (r *dockerResolver) Resolve(ctx context.Context, ref string) (string, ocisp log.G(ctx).Debug("resolving") resp, err := req.doWithRetries(ctx, nil) if err != nil { - if errors.Cause(err) == ErrInvalidAuthorization { + if errors.Is(err, ErrInvalidAuthorization) { err = errors.Wrapf(err, "pull access denied, repository does not exist or may require authorization") } // Store the error for referencing later @@ -323,6 +328,10 @@ func (r *dockerResolver) Resolve(ctx context.Context, ref string) (string, ocisp log.G(ctx).Debug("no Docker-Content-Digest header, fetching manifest instead") req = base.request(host, http.MethodGet, u...) + if err := req.addNamespace(base.refspec.Hostname()); err != nil { + return "", ocispec.Descriptor{}, err + } + for key, value := range r.resolveHeader { req.header[key] = append(req.header[key], value...) } @@ -416,10 +425,10 @@ func (r *dockerResolver) Pusher(ctx context.Context, ref string) (remotes.Pusher } type dockerBase struct { - refspec reference.Spec - namespace string - hosts []RegistryHost - header http.Header + refspec reference.Spec + repository string + hosts []RegistryHost + header http.Header } func (r *dockerResolver) base(refspec reference.Spec) (*dockerBase, error) { @@ -429,10 +438,10 @@ func (r *dockerResolver) base(refspec reference.Spec) (*dockerBase, error) { return nil, err } return &dockerBase{ - refspec: refspec, - namespace: strings.TrimPrefix(refspec.Locator, host+"/"), - hosts: hosts, - header: r.header, + refspec: refspec, + repository: strings.TrimPrefix(refspec.Locator, host+"/"), + hosts: hosts, + header: r.header, }, nil } @@ -450,7 +459,10 @@ func (r *dockerBase) request(host RegistryHost, method string, ps ...string) *re for key, value := range r.header { header[key] = append(header[key], value...) } - parts := append([]string{"/", host.Path, r.namespace}, ps...) + for key, value := range host.Header { + header[key] = append(header[key], value...) + } + parts := append([]string{"/", host.Path, r.repository}, ps...) p := path.Join(parts...) // Join strips trailing slash, re-add ending "/" if included if len(parts) > 0 && strings.HasSuffix(parts[len(parts)-1], "/") { @@ -475,6 +487,29 @@ func (r *request) authorize(ctx context.Context, req *http.Request) error { return nil } +func (r *request) addNamespace(ns string) (err error) { + if !r.host.isProxy(ns) { + return nil + } + var q url.Values + // Parse query + if i := strings.IndexByte(r.path, '?'); i > 0 { + r.path = r.path[:i+1] + q, err = url.ParseQuery(r.path[i+1:]) + if err != nil { + return + } + } else { + r.path = r.path + "?" + q = url.Values{} + } + q.Add("ns", ns) + + r.path = r.path + q.Encode() + + return +} + type request struct { method string path string diff --git a/vendor/github.com/containerd/containerd/remotes/docker/scope.go b/vendor/github.com/containerd/containerd/remotes/docker/scope.go index fa840143371..c8541c455c0 100644 --- a/vendor/github.com/containerd/containerd/remotes/docker/scope.go +++ b/vendor/github.com/containerd/containerd/remotes/docker/scope.go @@ -72,8 +72,8 @@ func contextWithAppendPullRepositoryScope(ctx context.Context, repo string) cont return WithScope(ctx, fmt.Sprintf("repository:%s:pull", repo)) } -// getTokenScopes returns deduplicated and sorted scopes from ctx.Value(tokenScopesKey{}) and common scopes. -func getTokenScopes(ctx context.Context, common []string) []string { +// GetTokenScopes returns deduplicated and sorted scopes from ctx.Value(tokenScopesKey{}) and common scopes. +func GetTokenScopes(ctx context.Context, common []string) []string { var scopes []string if x := ctx.Value(tokenScopesKey{}); x != nil { scopes = append(scopes, x.([]string)...) diff --git a/vendor/github.com/containerd/containerd/rootfs/apply.go b/vendor/github.com/containerd/containerd/rootfs/apply.go index 73d4ccca52e..1db1bf14cfd 100644 --- a/vendor/github.com/containerd/containerd/rootfs/apply.go +++ b/vendor/github.com/containerd/containerd/rootfs/apply.go @@ -129,7 +129,7 @@ func applyLayers(ctx context.Context, layers []Layer, chain []digest.Digest, sn mounts, err = sn.Prepare(ctx, key, parent.String(), opts...) if err != nil { if errdefs.IsNotFound(err) && len(layers) > 1 { - if err := applyLayers(ctx, layers[:len(layers)-1], chain[:len(chain)-1], sn, a, nil, applyOpts); err != nil { + if err := applyLayers(ctx, layers[:len(layers)-1], chain[:len(chain)-1], sn, a, opts, applyOpts); err != nil { if !errdefs.IsAlreadyExists(err) { return err } diff --git a/vendor/github.com/containerd/containerd/runtime/linux/runctypes/runc.pb.go b/vendor/github.com/containerd/containerd/runtime/linux/runctypes/runc.pb.go index 96dfebe6b6c..26306e59485 100644 --- a/vendor/github.com/containerd/containerd/runtime/linux/runctypes/runc.pb.go +++ b/vendor/github.com/containerd/containerd/runtime/linux/runctypes/runc.pb.go @@ -8,6 +8,7 @@ import ( proto "github.com/gogo/protobuf/proto" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -21,7 +22,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type RuncOptions struct { Runtime string `protobuf:"bytes,1,opt,name=runtime,proto3" json:"runtime,omitempty"` @@ -46,7 +47,7 @@ func (m *RuncOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_RuncOptions.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -97,7 +98,7 @@ func (m *CreateOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_CreateOptions.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -144,7 +145,7 @@ func (m *CheckpointOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_CheckpointOptions.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -183,7 +184,7 @@ func (m *ProcessDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_ProcessDetails.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -258,7 +259,7 @@ var fileDescriptor_d20e2ba8b3cc58b9 = []byte{ func (m *RuncOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -266,48 +267,57 @@ func (m *RuncOptions) Marshal() (dAtA []byte, err error) { } func (m *RuncOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RuncOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Runtime) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRunc(dAtA, i, uint64(len(m.Runtime))) - i += copy(dAtA[i:], m.Runtime) - } - if len(m.RuntimeRoot) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintRunc(dAtA, i, uint64(len(m.RuntimeRoot))) - i += copy(dAtA[i:], m.RuntimeRoot) - } - if len(m.CriuPath) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintRunc(dAtA, i, uint64(len(m.CriuPath))) - i += copy(dAtA[i:], m.CriuPath) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.SystemdCgroup { - dAtA[i] = 0x20 - i++ + i-- if m.SystemdCgroup { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.CriuPath) > 0 { + i -= len(m.CriuPath) + copy(dAtA[i:], m.CriuPath) + i = encodeVarintRunc(dAtA, i, uint64(len(m.CriuPath))) + i-- + dAtA[i] = 0x1a } - return i, nil + if len(m.RuntimeRoot) > 0 { + i -= len(m.RuntimeRoot) + copy(dAtA[i:], m.RuntimeRoot) + i = encodeVarintRunc(dAtA, i, uint64(len(m.RuntimeRoot))) + i-- + dAtA[i] = 0x12 + } + if len(m.Runtime) > 0 { + i -= len(m.Runtime) + copy(dAtA[i:], m.Runtime) + i = encodeVarintRunc(dAtA, i, uint64(len(m.Runtime))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CreateOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -315,129 +325,133 @@ func (m *CreateOptions) Marshal() (dAtA []byte, err error) { } func (m *CreateOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.NoPivotRoot { - dAtA[i] = 0x8 - i++ - if m.NoPivotRoot { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.OpenTcp { - dAtA[i] = 0x10 - i++ - if m.OpenTcp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if len(m.CriuImagePath) > 0 { + i -= len(m.CriuImagePath) + copy(dAtA[i:], m.CriuImagePath) + i = encodeVarintRunc(dAtA, i, uint64(len(m.CriuImagePath))) + i-- + dAtA[i] = 0x6a } - if m.ExternalUnixSockets { - dAtA[i] = 0x18 - i++ - if m.ExternalUnixSockets { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if len(m.CriuWorkPath) > 0 { + i -= len(m.CriuWorkPath) + copy(dAtA[i:], m.CriuWorkPath) + i = encodeVarintRunc(dAtA, i, uint64(len(m.CriuWorkPath))) + i-- + dAtA[i] = 0x62 } - if m.Terminal { - dAtA[i] = 0x20 - i++ - if m.Terminal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if m.IoGid != 0 { + i = encodeVarintRunc(dAtA, i, uint64(m.IoGid)) + i-- + dAtA[i] = 0x58 } - if m.FileLocks { - dAtA[i] = 0x28 - i++ - if m.FileLocks { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if m.IoUid != 0 { + i = encodeVarintRunc(dAtA, i, uint64(m.IoUid)) + i-- + dAtA[i] = 0x50 } - if len(m.EmptyNamespaces) > 0 { - for _, s := range m.EmptyNamespaces { - dAtA[i] = 0x32 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.CgroupsMode) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintRunc(dAtA, i, uint64(len(m.CgroupsMode))) - i += copy(dAtA[i:], m.CgroupsMode) + if len(m.ShimCgroup) > 0 { + i -= len(m.ShimCgroup) + copy(dAtA[i:], m.ShimCgroup) + i = encodeVarintRunc(dAtA, i, uint64(len(m.ShimCgroup))) + i-- + dAtA[i] = 0x4a } if m.NoNewKeyring { - dAtA[i] = 0x40 - i++ + i-- if m.NoNewKeyring { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x40 } - if len(m.ShimCgroup) > 0 { - dAtA[i] = 0x4a - i++ - i = encodeVarintRunc(dAtA, i, uint64(len(m.ShimCgroup))) - i += copy(dAtA[i:], m.ShimCgroup) + if len(m.CgroupsMode) > 0 { + i -= len(m.CgroupsMode) + copy(dAtA[i:], m.CgroupsMode) + i = encodeVarintRunc(dAtA, i, uint64(len(m.CgroupsMode))) + i-- + dAtA[i] = 0x3a } - if m.IoUid != 0 { - dAtA[i] = 0x50 - i++ - i = encodeVarintRunc(dAtA, i, uint64(m.IoUid)) + if len(m.EmptyNamespaces) > 0 { + for iNdEx := len(m.EmptyNamespaces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.EmptyNamespaces[iNdEx]) + copy(dAtA[i:], m.EmptyNamespaces[iNdEx]) + i = encodeVarintRunc(dAtA, i, uint64(len(m.EmptyNamespaces[iNdEx]))) + i-- + dAtA[i] = 0x32 + } } - if m.IoGid != 0 { - dAtA[i] = 0x58 - i++ - i = encodeVarintRunc(dAtA, i, uint64(m.IoGid)) + if m.FileLocks { + i-- + if m.FileLocks { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 } - if len(m.CriuWorkPath) > 0 { - dAtA[i] = 0x62 - i++ - i = encodeVarintRunc(dAtA, i, uint64(len(m.CriuWorkPath))) - i += copy(dAtA[i:], m.CriuWorkPath) + if m.Terminal { + i-- + if m.Terminal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 } - if len(m.CriuImagePath) > 0 { - dAtA[i] = 0x6a - i++ - i = encodeVarintRunc(dAtA, i, uint64(len(m.CriuImagePath))) - i += copy(dAtA[i:], m.CriuImagePath) + if m.ExternalUnixSockets { + i-- + if m.ExternalUnixSockets { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.OpenTcp { + i-- + if m.OpenTcp { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - return i, nil + if m.NoPivotRoot { + i-- + if m.NoPivotRoot { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *CheckpointOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -445,103 +459,106 @@ func (m *CheckpointOptions) Marshal() (dAtA []byte, err error) { } func (m *CheckpointOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CheckpointOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Exit { - dAtA[i] = 0x8 - i++ - if m.Exit { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.OpenTcp { - dAtA[i] = 0x10 - i++ - if m.OpenTcp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if len(m.ImagePath) > 0 { + i -= len(m.ImagePath) + copy(dAtA[i:], m.ImagePath) + i = encodeVarintRunc(dAtA, i, uint64(len(m.ImagePath))) + i-- + dAtA[i] = 0x4a } - if m.ExternalUnixSockets { - dAtA[i] = 0x18 - i++ - if m.ExternalUnixSockets { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if len(m.WorkPath) > 0 { + i -= len(m.WorkPath) + copy(dAtA[i:], m.WorkPath) + i = encodeVarintRunc(dAtA, i, uint64(len(m.WorkPath))) + i-- + dAtA[i] = 0x42 } - if m.Terminal { - dAtA[i] = 0x20 - i++ - if m.Terminal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.CgroupsMode) > 0 { + i -= len(m.CgroupsMode) + copy(dAtA[i:], m.CgroupsMode) + i = encodeVarintRunc(dAtA, i, uint64(len(m.CgroupsMode))) + i-- + dAtA[i] = 0x3a + } + if len(m.EmptyNamespaces) > 0 { + for iNdEx := len(m.EmptyNamespaces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.EmptyNamespaces[iNdEx]) + copy(dAtA[i:], m.EmptyNamespaces[iNdEx]) + i = encodeVarintRunc(dAtA, i, uint64(len(m.EmptyNamespaces[iNdEx]))) + i-- + dAtA[i] = 0x32 } - i++ } if m.FileLocks { - dAtA[i] = 0x28 - i++ + i-- if m.FileLocks { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x28 } - if len(m.EmptyNamespaces) > 0 { - for _, s := range m.EmptyNamespaces { - dAtA[i] = 0x32 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) + if m.Terminal { + i-- + if m.Terminal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x20 } - if len(m.CgroupsMode) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintRunc(dAtA, i, uint64(len(m.CgroupsMode))) - i += copy(dAtA[i:], m.CgroupsMode) + if m.ExternalUnixSockets { + i-- + if m.ExternalUnixSockets { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - if len(m.WorkPath) > 0 { - dAtA[i] = 0x42 - i++ - i = encodeVarintRunc(dAtA, i, uint64(len(m.WorkPath))) - i += copy(dAtA[i:], m.WorkPath) + if m.OpenTcp { + i-- + if m.OpenTcp { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - if len(m.ImagePath) > 0 { - dAtA[i] = 0x4a - i++ - i = encodeVarintRunc(dAtA, i, uint64(len(m.ImagePath))) - i += copy(dAtA[i:], m.ImagePath) + if m.Exit { + i-- + if m.Exit { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ProcessDetails) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -549,30 +566,39 @@ func (m *ProcessDetails) Marshal() (dAtA []byte, err error) { } func (m *ProcessDetails) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProcessDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ExecID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintRunc(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintRunc(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintRunc(dAtA []byte, offset int, v uint64) int { + offset -= sovRunc(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *RuncOptions) Size() (n int) { if m == nil { @@ -721,14 +747,7 @@ func (m *ProcessDetails) Size() (n int) { } func sovRunc(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozRunc(x uint64) (n int) { return sovRunc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1721,6 +1740,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error { func skipRunc(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1752,10 +1772,8 @@ func skipRunc(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1776,55 +1794,30 @@ func skipRunc(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthRunc } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthRunc - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRunc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipRunc(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthRunc - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRunc + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthRunc + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthRunc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRunc = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthRunc = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRunc = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRunc = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/runtime/opts/opts_linux.go b/vendor/github.com/containerd/containerd/runtime/opts/opts_linux.go index 012bdb2b832..eb509dadb45 100644 --- a/vendor/github.com/containerd/containerd/runtime/opts/opts_linux.go +++ b/vendor/github.com/containerd/containerd/runtime/opts/opts_linux.go @@ -20,11 +20,22 @@ import ( "context" "github.com/containerd/cgroups" + cgroupsv2 "github.com/containerd/cgroups/v2" "github.com/containerd/containerd/namespaces" ) // WithNamespaceCgroupDeletion removes the cgroup directory that was created for the namespace func WithNamespaceCgroupDeletion(ctx context.Context, i *namespaces.DeleteInfo) error { + if cgroups.Mode() == cgroups.Unified { + cg, err := cgroupsv2.LoadManager("/sys/fs/cgroup", i.Name) + if err != nil { + if err == cgroupsv2.ErrCgroupDeleted { + return nil + } + return err + } + return cg.Delete() + } cg, err := cgroups.Load(cgroups.V1, cgroups.StaticPath(i.Name)) if err != nil { if err == cgroups.ErrCgroupDeleted { diff --git a/vendor/github.com/containerd/containerd/runtime/restart/monitor/change.go b/vendor/github.com/containerd/containerd/runtime/restart/monitor/change.go index f3e1a0b2d11..7de6f67c316 100644 --- a/vendor/github.com/containerd/containerd/runtime/restart/monitor/change.go +++ b/vendor/github.com/containerd/containerd/runtime/restart/monitor/change.go @@ -18,10 +18,13 @@ package monitor import ( "context" + "net/url" "syscall" "github.com/containerd/containerd" "github.com/containerd/containerd/cio" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) type stopChange struct { @@ -34,14 +37,30 @@ func (s *stopChange) apply(ctx context.Context, client *containerd.Client) error type startChange struct { container containerd.Container - logPath string + logURI string + + // Deprecated(in release 1.5): but recognized now, prefer to use logURI + logPath string } func (s *startChange) apply(ctx context.Context, client *containerd.Client) error { log := cio.NullIO - if s.logPath != "" { + + if s.logURI != "" { + uri, err := url.Parse(s.logURI) + if err != nil { + return errors.Wrapf(err, "failed to parse %v into url", s.logURI) + } + log = cio.LogURI(uri) + } else if s.logPath != "" { log = cio.LogFile(s.logPath) } + + if s.logURI != "" && s.logPath != "" { + logrus.Warnf("LogPathLabel=%v has been deprecated, using LogURILabel=%v", + s.logPath, s.logURI) + } + killTask(ctx, s.container) task, err := s.container.NewTask(ctx, log) if err != nil { diff --git a/vendor/github.com/containerd/containerd/runtime/restart/monitor/monitor.go b/vendor/github.com/containerd/containerd/runtime/restart/monitor/monitor.go index 7b293fead58..3123f24a6e8 100644 --- a/vendor/github.com/containerd/containerd/runtime/restart/monitor/monitor.go +++ b/vendor/github.com/containerd/containerd/runtime/restart/monitor/monitor.go @@ -200,6 +200,7 @@ func (m *monitor) monitor(ctx context.Context) ([]change, error) { changes = append(changes, &startChange{ container: c, logPath: labels[restart.LogPathLabel], + logURI: labels[restart.LogURILabel], }) case containerd.Stopped: changes = append(changes, &stopChange{ diff --git a/vendor/github.com/containerd/containerd/runtime/restart/restart.go b/vendor/github.com/containerd/containerd/runtime/restart/restart.go index 47b98e003eb..54f56a47d35 100644 --- a/vendor/github.com/containerd/containerd/runtime/restart/restart.go +++ b/vendor/github.com/containerd/containerd/runtime/restart/restart.go @@ -33,17 +33,53 @@ import ( "context" "github.com/containerd/containerd" + "github.com/containerd/containerd/cio" "github.com/containerd/containerd/containers" ) const ( // StatusLabel sets the restart status label for a container StatusLabel = "containerd.io/restart.status" + // LogURILabel sets the restart log uri label for a container + LogURILabel = "containerd.io/restart.loguri" + // LogPathLabel sets the restart log path label for a container + // + // Deprecated(in release 1.5): use LogURILabel LogPathLabel = "containerd.io/restart.logpath" ) +// WithBinaryLogURI sets the binary-type log uri for a container. +func WithBinaryLogURI(binary string, args map[string]string) func(context.Context, *containerd.Client, *containers.Container) error { + return func(_ context.Context, _ *containerd.Client, c *containers.Container) error { + uri, err := cio.LogURIGenerator("binary", binary, args) + if err != nil { + return err + } + + ensureLabels(c) + c.Labels[LogURILabel] = uri.String() + return nil + } +} + +// WithFileLogURI sets the file-type log uri for a container. +func WithFileLogURI(path string) func(context.Context, *containerd.Client, *containers.Container) error { + return func(_ context.Context, _ *containerd.Client, c *containers.Container) error { + uri, err := cio.LogURIGenerator("file", path, nil) + if err != nil { + return err + } + + ensureLabels(c) + c.Labels[LogURILabel] = uri.String() + return nil + } +} + // WithLogPath sets the log path for a container +// +// Deprecated(in release 1.5): use WithFileLogURI. func WithLogPath(path string) func(context.Context, *containerd.Client, *containers.Container) error { return func(_ context.Context, _ *containerd.Client, c *containers.Container) error { ensureLabels(c) @@ -68,6 +104,7 @@ func WithNoRestarts(_ context.Context, _ *containerd.Client, c *containers.Conta } delete(c.Labels, StatusLabel) delete(c.Labels, LogPathLabel) + delete(c.Labels, LogURILabel) return nil } diff --git a/vendor/github.com/containerd/containerd/runtime/v1/linux/process.go b/vendor/github.com/containerd/containerd/runtime/v1/linux/process.go index 2c60b674a9f..c2777452d2b 100644 --- a/vendor/github.com/containerd/containerd/runtime/v1/linux/process.go +++ b/vendor/github.com/containerd/containerd/runtime/v1/linux/process.go @@ -62,7 +62,7 @@ func (p *Process) State(ctx context.Context) (runtime.State, error) { ID: p.id, }) if err != nil { - if errors.Cause(err) != ttrpc.ErrClosed { + if !errors.Is(err, ttrpc.ErrClosed) { return runtime.State{}, errdefs.FromGRPC(err) } diff --git a/vendor/github.com/containerd/containerd/runtime/v1/linux/task.go b/vendor/github.com/containerd/containerd/runtime/v1/linux/task.go index 6e7f592b82e..89390b06ab4 100644 --- a/vendor/github.com/containerd/containerd/runtime/v1/linux/task.go +++ b/vendor/github.com/containerd/containerd/runtime/v1/linux/task.go @@ -159,7 +159,7 @@ func (t *Task) State(ctx context.Context) (runtime.State, error) { ID: t.id, }) if err != nil { - if errors.Cause(err) != ttrpc.ErrClosed { + if !errors.Is(err, ttrpc.ErrClosed) { return runtime.State{}, errdefs.FromGRPC(err) } return runtime.State{}, errdefs.ErrNotFound diff --git a/vendor/github.com/containerd/containerd/runtime/v1/shim/client/client.go b/vendor/github.com/containerd/containerd/runtime/v1/shim/client/client.go index 72f6cc8d4f9..562ee6ca487 100644 --- a/vendor/github.com/containerd/containerd/runtime/v1/shim/client/client.go +++ b/vendor/github.com/containerd/containerd/runtime/v1/shim/client/client.go @@ -40,6 +40,7 @@ import ( "github.com/containerd/containerd/events" "github.com/containerd/containerd/log" + "github.com/containerd/containerd/pkg/dialer" v1 "github.com/containerd/containerd/runtime/v1" "github.com/containerd/containerd/runtime/v1/shim" shimapi "github.com/containerd/containerd/runtime/v1/shim/v1" @@ -228,7 +229,7 @@ func connect(address string, d func(string, time.Duration) (net.Conn, error)) (n func annonDialer(address string, timeout time.Duration) (net.Conn, error) { address = strings.TrimPrefix(address, "unix://") - return net.DialTimeout("unix", "\x00"+address, timeout) + return dialer.Dialer("\x00"+address, timeout) } // WithConnect connects to an existing shim diff --git a/vendor/github.com/containerd/containerd/runtime/v1/shim/service.go b/vendor/github.com/containerd/containerd/runtime/v1/shim/service.go index f3e1f4b7c61..6bd6aefa226 100644 --- a/vendor/github.com/containerd/containerd/runtime/v1/shim/service.go +++ b/vendor/github.com/containerd/containerd/runtime/v1/shim/service.go @@ -503,67 +503,59 @@ func (s *Service) processExits() { } } -func (s *Service) allProcesses() []process.Process { - s.mu.Lock() - defer s.mu.Unlock() - - res := make([]process.Process, 0, len(s.processes)) - for _, p := range s.processes { - res = append(res, p) - } - return res -} - func (s *Service) checkProcesses(e runc.Exit) { - for _, p := range s.allProcesses() { - if p.Pid() != e.Pid { - continue - } - - if ip, ok := p.(*process.Init); ok { - shouldKillAll, err := shouldKillAllOnExit(s.bundle) - if err != nil { - log.G(s.context).WithError(err).Error("failed to check shouldKillAll") - } - - // Ensure all children are killed - if shouldKillAll { - if err := ip.KillAll(s.context); err != nil { - log.G(s.context).WithError(err).WithField("id", ip.ID()). - Error("failed to kill init's children") - } - } - } - - p.SetExited(e.Status) - s.events <- &eventstypes.TaskExit{ - ContainerID: s.id, - ID: p.ID(), - Pid: uint32(e.Pid), - ExitStatus: uint32(e.Status), - ExitedAt: p.ExitedAt(), + var p process.Process + s.mu.Lock() + for _, proc := range s.processes { + if proc.Pid() == e.Pid { + p = proc + break } + } + s.mu.Unlock() + if p == nil { + log.G(s.context).Infof("process with id:%d wasn't found", e.Pid) return } + if ip, ok := p.(*process.Init); ok { + // Ensure all children are killed + if shouldKillAllOnExit(s.context, s.bundle) { + if err := ip.KillAll(s.context); err != nil { + log.G(s.context).WithError(err).WithField("id", ip.ID()). + Error("failed to kill init's children") + } + } + } + + p.SetExited(e.Status) + s.events <- &eventstypes.TaskExit{ + ContainerID: s.id, + ID: p.ID(), + Pid: uint32(e.Pid), + ExitStatus: uint32(e.Status), + ExitedAt: p.ExitedAt(), + } } -func shouldKillAllOnExit(bundlePath string) (bool, error) { +func shouldKillAllOnExit(ctx context.Context, bundlePath string) bool { var bundleSpec specs.Spec bundleConfigContents, err := ioutil.ReadFile(filepath.Join(bundlePath, "config.json")) if err != nil { - return false, err + log.G(ctx).WithError(err).Error("shouldKillAllOnExit: failed to read config.json") + return true + } + if err := json.Unmarshal(bundleConfigContents, &bundleSpec); err != nil { + log.G(ctx).WithError(err).Error("shouldKillAllOnExit: failed to unmarshal bundle json") + return true } - json.Unmarshal(bundleConfigContents, &bundleSpec) - if bundleSpec.Linux != nil { for _, ns := range bundleSpec.Linux.Namespaces { if ns.Type == specs.PIDNamespace && ns.Path == "" { - return false, nil + return false } } } - - return true, nil + return true } func (s *Service) getContainerPids(ctx context.Context, id string) ([]uint32, error) { diff --git a/vendor/github.com/containerd/containerd/runtime/v1/shim/v1/shim.pb.go b/vendor/github.com/containerd/containerd/runtime/v1/shim/v1/shim.pb.go index 7cc57803c34..27f3349669d 100644 --- a/vendor/github.com/containerd/containerd/runtime/v1/shim/v1/shim.pb.go +++ b/vendor/github.com/containerd/containerd/runtime/v1/shim/v1/shim.pb.go @@ -14,6 +14,7 @@ import ( types1 "github.com/gogo/protobuf/types" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -29,7 +30,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type CreateTaskRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -61,7 +62,7 @@ func (m *CreateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_CreateTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -100,7 +101,7 @@ func (m *CreateTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_CreateTaskResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -141,7 +142,7 @@ func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -180,7 +181,7 @@ func (m *DeleteProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_DeleteProcessRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -224,7 +225,7 @@ func (m *ExecProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ExecProcessRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -262,7 +263,7 @@ func (m *ExecProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ExecProcessResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -303,7 +304,7 @@ func (m *ResizePtyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_ResizePtyRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -342,7 +343,7 @@ func (m *StateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_StateRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -390,7 +391,7 @@ func (m *StateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_StateResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -431,7 +432,7 @@ func (m *KillRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_KillRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -471,7 +472,7 @@ func (m *CloseIORequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_CloseIORequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -510,7 +511,7 @@ func (m *ListPidsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_ListPidsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -549,7 +550,7 @@ func (m *ListPidsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_ListPidsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -589,7 +590,7 @@ func (m *CheckpointTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_CheckpointTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -628,7 +629,7 @@ func (m *ShimInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_ShimInfoResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -667,7 +668,7 @@ func (m *UpdateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_UpdateTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -706,7 +707,7 @@ func (m *StartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_StartRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -746,7 +747,7 @@ func (m *StartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_StartResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -785,7 +786,7 @@ func (m *WaitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_WaitRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -825,7 +826,7 @@ func (m *WaitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_WaitResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -949,7 +950,7 @@ var fileDescriptor_be1b2ef30ea3b8ef = []byte{ func (m *CreateTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -957,100 +958,118 @@ func (m *CreateTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *CreateTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Bundle) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Bundle))) - i += copy(dAtA[i:], m.Bundle) - } - if len(m.Runtime) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Runtime))) - i += copy(dAtA[i:], m.Runtime) - } - if len(m.Rootfs) > 0 { - for _, msg := range m.Rootfs { - dAtA[i] = 0x22 - i++ - i = encodeVarintShim(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.Options != nil { + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x5a + } + if len(m.ParentCheckpoint) > 0 { + i -= len(m.ParentCheckpoint) + copy(dAtA[i:], m.ParentCheckpoint) + i = encodeVarintShim(dAtA, i, uint64(len(m.ParentCheckpoint))) + i-- + dAtA[i] = 0x52 + } + if len(m.Checkpoint) > 0 { + i -= len(m.Checkpoint) + copy(dAtA[i:], m.Checkpoint) + i = encodeVarintShim(dAtA, i, uint64(len(m.Checkpoint))) + i-- + dAtA[i] = 0x4a + } + if len(m.Stderr) > 0 { + i -= len(m.Stderr) + copy(dAtA[i:], m.Stderr) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) + i-- + dAtA[i] = 0x42 + } + if len(m.Stdout) > 0 { + i -= len(m.Stdout) + copy(dAtA[i:], m.Stdout) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) + i-- + dAtA[i] = 0x3a + } + if len(m.Stdin) > 0 { + i -= len(m.Stdin) + copy(dAtA[i:], m.Stdin) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) + i-- + dAtA[i] = 0x32 } if m.Terminal { - dAtA[i] = 0x28 - i++ + i-- if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x28 } - if len(m.Stdin) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) - i += copy(dAtA[i:], m.Stdin) - } - if len(m.Stdout) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) - i += copy(dAtA[i:], m.Stdout) - } - if len(m.Stderr) > 0 { - dAtA[i] = 0x42 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) - i += copy(dAtA[i:], m.Stderr) - } - if len(m.Checkpoint) > 0 { - dAtA[i] = 0x4a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Checkpoint))) - i += copy(dAtA[i:], m.Checkpoint) - } - if len(m.ParentCheckpoint) > 0 { - dAtA[i] = 0x52 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ParentCheckpoint))) - i += copy(dAtA[i:], m.ParentCheckpoint) - } - if m.Options != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Options.Size())) - n1, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Rootfs) > 0 { + for iNdEx := len(m.Rootfs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rootfs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } - i += n1 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Runtime) > 0 { + i -= len(m.Runtime) + copy(dAtA[i:], m.Runtime) + i = encodeVarintShim(dAtA, i, uint64(len(m.Runtime))) + i-- + dAtA[i] = 0x1a } - return i, nil + if len(m.Bundle) > 0 { + i -= len(m.Bundle) + copy(dAtA[i:], m.Bundle) + i = encodeVarintShim(dAtA, i, uint64(len(m.Bundle))) + i-- + dAtA[i] = 0x12 + } + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CreateTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1058,25 +1077,31 @@ func (m *CreateTaskResponse) Marshal() (dAtA []byte, err error) { } func (m *CreateTaskResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateTaskResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Pid != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Pid)) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Pid != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *DeleteResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1084,38 +1109,44 @@ func (m *DeleteResponse) Marshal() (dAtA []byte, err error) { } func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Pid != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Pid)) - } - if m.ExitStatus != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) - } - dAtA[i] = 0x1a - i++ - i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) - n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintShim(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x1a + if m.ExitStatus != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) + i-- + dAtA[i] = 0x10 + } + if m.Pid != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *DeleteProcessRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1123,26 +1154,33 @@ func (m *DeleteProcessRequest) Marshal() (dAtA []byte, err error) { } func (m *DeleteProcessRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteProcessRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ExecProcessRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1150,64 +1188,76 @@ func (m *ExecProcessRequest) Marshal() (dAtA []byte, err error) { } func (m *ExecProcessRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecProcessRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.Stderr) > 0 { + i -= len(m.Stderr) + copy(dAtA[i:], m.Stderr) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) + i-- + dAtA[i] = 0x2a + } + if len(m.Stdout) > 0 { + i -= len(m.Stdout) + copy(dAtA[i:], m.Stdout) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) + i-- + dAtA[i] = 0x22 + } + if len(m.Stdin) > 0 { + i -= len(m.Stdin) + copy(dAtA[i:], m.Stdin) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) + i-- + dAtA[i] = 0x1a } if m.Terminal { - dAtA[i] = 0x10 - i++ + i-- if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if len(m.Stdin) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) - i += copy(dAtA[i:], m.Stdin) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - if len(m.Stdout) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) - i += copy(dAtA[i:], m.Stdout) - } - if len(m.Stderr) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) - i += copy(dAtA[i:], m.Stderr) - } - if m.Spec != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Spec.Size())) - n3, err := m.Spec.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ExecProcessResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1215,20 +1265,26 @@ func (m *ExecProcessResponse) Marshal() (dAtA []byte, err error) { } func (m *ExecProcessResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecProcessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + return len(dAtA) - i, nil } func (m *ResizePtyRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1236,36 +1292,43 @@ func (m *ResizePtyRequest) Marshal() (dAtA []byte, err error) { } func (m *ResizePtyRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResizePtyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - if m.Width != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Width)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Height != 0 { - dAtA[i] = 0x18 - i++ i = encodeVarintShim(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Width != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Width)) + i-- + dAtA[i] = 0x10 } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *StateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1273,26 +1336,33 @@ func (m *StateRequest) Marshal() (dAtA []byte, err error) { } func (m *StateRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *StateResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1300,83 +1370,94 @@ func (m *StateResponse) Marshal() (dAtA []byte, err error) { } func (m *StateResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Bundle) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Bundle))) - i += copy(dAtA[i:], m.Bundle) + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt):]) + if err4 != nil { + return 0, err4 } - if m.Pid != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Pid)) - } - if m.Status != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Status)) - } - if len(m.Stdin) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) - i += copy(dAtA[i:], m.Stdin) - } - if len(m.Stdout) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) - i += copy(dAtA[i:], m.Stdout) - } - if len(m.Stderr) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) - i += copy(dAtA[i:], m.Stderr) + i -= n4 + i = encodeVarintShim(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x52 + if m.ExitStatus != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) + i-- + dAtA[i] = 0x48 } if m.Terminal { - dAtA[i] = 0x40 - i++ + i-- if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x40 } - if m.ExitStatus != 0 { - dAtA[i] = 0x48 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) + if len(m.Stderr) > 0 { + i -= len(m.Stderr) + copy(dAtA[i:], m.Stderr) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) + i-- + dAtA[i] = 0x3a } - dAtA[i] = 0x52 - i++ - i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) - n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) - if err != nil { - return 0, err + if len(m.Stdout) > 0 { + i -= len(m.Stdout) + copy(dAtA[i:], m.Stdout) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) + i-- + dAtA[i] = 0x32 } - i += n4 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Stdin) > 0 { + i -= len(m.Stdin) + copy(dAtA[i:], m.Stdin) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) + i-- + dAtA[i] = 0x2a } - return i, nil + if m.Status != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x20 + } + if m.Pid != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x18 + } + if len(m.Bundle) > 0 { + i -= len(m.Bundle) + copy(dAtA[i:], m.Bundle) + i = encodeVarintShim(dAtA, i, uint64(len(m.Bundle))) + i-- + dAtA[i] = 0x12 + } + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *KillRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1384,41 +1465,48 @@ func (m *KillRequest) Marshal() (dAtA []byte, err error) { } func (m *KillRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KillRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - if m.Signal != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Signal)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.All { - dAtA[i] = 0x18 - i++ + i-- if m.All { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Signal != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Signal)) + i-- + dAtA[i] = 0x10 } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CloseIORequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1426,36 +1514,43 @@ func (m *CloseIORequest) Marshal() (dAtA []byte, err error) { } func (m *CloseIORequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CloseIORequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Stdin { - dAtA[i] = 0x10 - i++ + i-- if m.Stdin { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ListPidsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1463,26 +1558,33 @@ func (m *ListPidsRequest) Marshal() (dAtA []byte, err error) { } func (m *ListPidsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListPidsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ListPidsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1490,32 +1592,40 @@ func (m *ListPidsResponse) Marshal() (dAtA []byte, err error) { } func (m *ListPidsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListPidsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Processes) > 0 { - for _, msg := range m.Processes { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Processes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Processes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *CheckpointTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1523,36 +1633,45 @@ func (m *CheckpointTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *CheckpointTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CheckpointTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Path) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Options != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Options.Size())) - n5, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Path) > 0 { + i -= len(m.Path) + copy(dAtA[i:], m.Path) + i = encodeVarintShim(dAtA, i, uint64(len(m.Path))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ShimInfoResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1560,25 +1679,31 @@ func (m *ShimInfoResponse) Marshal() (dAtA []byte, err error) { } func (m *ShimInfoResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ShimInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ShimPid != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.ShimPid)) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.ShimPid != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.ShimPid)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *UpdateTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1586,30 +1711,38 @@ func (m *UpdateTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Resources != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Resources.Size())) - n6, err := m.Resources.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Resources != nil { + { + size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *StartRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1617,26 +1750,33 @@ func (m *StartRequest) Marshal() (dAtA []byte, err error) { } func (m *StartRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StartRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *StartResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1644,31 +1784,38 @@ func (m *StartResponse) Marshal() (dAtA []byte, err error) { } func (m *StartResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StartResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Pid != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintShim(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *WaitRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1676,26 +1823,33 @@ func (m *WaitRequest) Marshal() (dAtA []byte, err error) { } func (m *WaitRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WaitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *WaitResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1703,37 +1857,45 @@ func (m *WaitResponse) Marshal() (dAtA []byte, err error) { } func (m *WaitResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WaitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ExitStatus != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) - n7, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintShim(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x12 + if m.ExitStatus != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func encodeVarintShim(dAtA []byte, offset int, v uint64) int { + offset -= sovShim(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *CreateTaskRequest) Size() (n int) { if m == nil { @@ -2169,14 +2331,7 @@ func (m *WaitResponse) Size() (n int) { } func sovShim(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozShim(x uint64) (n int) { return sovShim(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -2185,11 +2340,16 @@ func (this *CreateTaskRequest) String() string { if this == nil { return "nil" } + repeatedStringForRootfs := "[]*Mount{" + for _, f := range this.Rootfs { + repeatedStringForRootfs += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + "," + } + repeatedStringForRootfs += "}" s := strings.Join([]string{`&CreateTaskRequest{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Bundle:` + fmt.Sprintf("%v", this.Bundle) + `,`, `Runtime:` + fmt.Sprintf("%v", this.Runtime) + `,`, - `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "types.Mount", 1) + `,`, + `Rootfs:` + repeatedStringForRootfs + `,`, `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, @@ -2220,7 +2380,7 @@ func (this *DeleteResponse) String() string { s := strings.Join([]string{`&DeleteResponse{`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, - `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `ExitedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExitedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2301,7 +2461,7 @@ func (this *StateResponse) String() string { `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, - `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `ExitedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExitedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2347,8 +2507,13 @@ func (this *ListPidsResponse) String() string { if this == nil { return "nil" } + repeatedStringForProcesses := "[]*ProcessInfo{" + for _, f := range this.Processes { + repeatedStringForProcesses += strings.Replace(fmt.Sprintf("%v", f), "ProcessInfo", "task.ProcessInfo", 1) + "," + } + repeatedStringForProcesses += "}" s := strings.Join([]string{`&ListPidsResponse{`, - `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "ProcessInfo", "task.ProcessInfo", 1) + `,`, + `Processes:` + repeatedStringForProcesses + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2428,7 +2593,7 @@ func (this *WaitResponse) String() string { } s := strings.Join([]string{`&WaitResponse{`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, - `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `ExitedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExitedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -5302,6 +5467,7 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error { func skipShim(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -5333,10 +5499,8 @@ func skipShim(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -5357,55 +5521,30 @@ func skipShim(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthShim } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthShim - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowShim - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipShim(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthShim - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupShim + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthShim + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthShim = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowShim = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthShim = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowShim = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupShim = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/runtime/v2/README.md b/vendor/github.com/containerd/containerd/runtime/v2/README.md index 76d30373fdf..aaa878bfde7 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/README.md +++ b/vendor/github.com/containerd/containerd/runtime/v2/README.md @@ -227,9 +227,6 @@ func copy(wg *sync.WaitGroup, r io.Reader, pri journal.Priority, vars map[string defer wg.Done() s := bufio.NewScanner(r) for s.Scan() { - if s.Err() != nil { - return - } journal.Send(s.Text(), pri, vars) } } diff --git a/vendor/github.com/containerd/containerd/runtime/v2/binary.go b/vendor/github.com/containerd/containerd/runtime/v2/binary.go index 4e43e1bcfa7..4b3f4ab93d9 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/binary.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/binary.go @@ -26,6 +26,7 @@ import ( "github.com/containerd/containerd/events/exchange" "github.com/containerd/containerd/log" + "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/runtime" client "github.com/containerd/containerd/runtime/v2/shim" "github.com/containerd/containerd/runtime/v2/task" @@ -74,7 +75,15 @@ func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_ if err != nil { return nil, err } - f, err := openShimLog(ctx, b.bundle, client.AnonDialer) + // Windows needs a namespace when openShimLog + ns, _ := namespaces.Namespace(ctx) + shimCtx, cancelShimLog := context.WithCancel(namespaces.WithNamespace(context.Background(), ns)) + defer func() { + if err != nil { + cancelShimLog() + } + }() + f, err := openShimLog(shimCtx, b.bundle, client.AnonDialer) if err != nil { return nil, errors.Wrap(err, "open shim log pipe") } @@ -103,7 +112,11 @@ func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_ if err != nil { return nil, err } - client := ttrpc.NewClient(conn, ttrpc.WithOnClose(onClose)) + onCloseWithShimLog := func() { + onClose() + cancelShimLog() + } + client := ttrpc.NewClient(conn, ttrpc.WithOnClose(onCloseWithShimLog)) return &shim{ bundle: b.bundle, client: client, diff --git a/vendor/github.com/containerd/containerd/runtime/v2/manager.go b/vendor/github.com/containerd/containerd/runtime/v2/manager.go index 0e110f7bfa3..9ae6d31b2e7 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/manager.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/manager.go @@ -29,6 +29,7 @@ import ( "github.com/containerd/containerd/metadata" "github.com/containerd/containerd/mount" "github.com/containerd/containerd/namespaces" + "github.com/containerd/containerd/pkg/timeout" "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/plugin" "github.com/containerd/containerd/runtime" @@ -154,8 +155,13 @@ func (m *TaskManager) Create(ctx context.Context, id string, opts runtime.Create } defer func() { if err != nil { - shim.Shutdown(ctx) - shim.Close() + dctx, cancel := timeout.WithContext(context.Background(), cleanupTimeout) + defer cancel() + _, errShim := shim.Delete(dctx) + if errShim != nil { + shim.Shutdown(ctx) + shim.Close() + } } }() t, err := shim.Create(ctx, opts) diff --git a/vendor/github.com/containerd/containerd/runtime/v2/process.go b/vendor/github.com/containerd/containerd/runtime/v2/process.go index b41935f6a74..903a4282b32 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/process.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/process.go @@ -54,7 +54,7 @@ func (p *process) State(ctx context.Context) (runtime.State, error) { ExecID: p.id, }) if err != nil { - if errors.Cause(err) != ttrpc.ErrClosed { + if !errors.Is(err, ttrpc.ErrClosed) { return runtime.State{}, errdefs.FromGRPC(err) } return runtime.State{}, errdefs.ErrNotFound diff --git a/vendor/github.com/containerd/containerd/runtime/v2/runc/container.go b/vendor/github.com/containerd/containerd/runtime/v2/runc/container.go index 189f004e807..27d434a29dc 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/runc/container.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/runc/container.go @@ -27,6 +27,7 @@ import ( "sync" "github.com/containerd/cgroups" + cgroupsv2 "github.com/containerd/cgroups/v2" "github.com/containerd/console" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/mount" @@ -138,9 +139,22 @@ func NewContainer(ctx context.Context, platform stdio.Platform, r *task.CreateTa } pid := p.Pid() if pid > 0 { - cg, err := cgroups.Load(cgroups.V1, cgroups.PidPath(pid)) - if err != nil { - logrus.WithError(err).Errorf("loading cgroup for %d", pid) + var cg interface{} + if cgroups.Mode() == cgroups.Unified { + g, err := cgroupsv2.PidGroupPath(pid) + if err != nil { + logrus.WithError(err).Errorf("loading cgroup2 for %d", pid) + return container, nil + } + cg, err = cgroupsv2.LoadManager("/sys/fs/cgroup", g) + if err != nil { + logrus.WithError(err).Errorf("loading cgroup2 for %d", pid) + } + } else { + cg, err = cgroups.Load(cgroups.V1, cgroups.PidPath(pid)) + if err != nil { + logrus.WithError(err).Errorf("loading cgroup for %d", pid) + } } container.cgroup = cg } @@ -228,7 +242,8 @@ type Container struct { // Bundle path Bundle string - cgroup cgroups.Cgroup + // cgroup is either cgroups.Cgroup or *cgroupsv2.Manager + cgroup interface{} process process.Process processes map[string]process.Process reservedProcess map[string]struct{} @@ -266,14 +281,14 @@ func (c *Container) Pid() int { } // Cgroup of the container -func (c *Container) Cgroup() cgroups.Cgroup { +func (c *Container) Cgroup() interface{} { c.mu.Lock() defer c.mu.Unlock() return c.cgroup } // CgroupSet sets the cgroup to the container -func (c *Container) CgroupSet(cg cgroups.Cgroup) { +func (c *Container) CgroupSet(cg interface{}) { c.mu.Lock() c.cgroup = cg c.mu.Unlock() @@ -345,9 +360,21 @@ func (c *Container) Start(ctx context.Context, r *task.StartRequest) (process.Pr return nil, err } if c.Cgroup() == nil && p.Pid() > 0 { - cg, err := cgroups.Load(cgroups.V1, cgroups.PidPath(p.Pid())) - if err != nil { - logrus.WithError(err).Errorf("loading cgroup for %d", p.Pid()) + var cg interface{} + if cgroups.Mode() == cgroups.Unified { + g, err := cgroupsv2.PidGroupPath(p.Pid()) + if err != nil { + logrus.WithError(err).Errorf("loading cgroup2 for %d", p.Pid()) + } + cg, err = cgroupsv2.LoadManager("/sys/fs/cgroup", g) + if err != nil { + logrus.WithError(err).Errorf("loading cgroup2 for %d", p.Pid()) + } + } else { + cg, err = cgroups.Load(cgroups.V1, cgroups.PidPath(p.Pid())) + if err != nil { + logrus.WithError(err).Errorf("loading cgroup for %d", p.Pid()) + } } c.cgroup = cg } diff --git a/vendor/github.com/containerd/containerd/runtime/v2/runc/options/oci.pb.go b/vendor/github.com/containerd/containerd/runtime/v2/runc/options/oci.pb.go index a24dbad7112..f298452b688 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/runc/options/oci.pb.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/runc/options/oci.pb.go @@ -8,6 +8,7 @@ import ( proto "github.com/gogo/protobuf/proto" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" ) @@ -21,7 +22,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Options struct { // disable pivot root when creating a container @@ -64,7 +65,7 @@ func (m *Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Options.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -120,7 +121,7 @@ func (m *CheckpointOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_CheckpointOptions.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -160,7 +161,7 @@ func (m *ProcessDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_ProcessDetails.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -233,7 +234,7 @@ var fileDescriptor_4e5440d739e9a863 = []byte{ func (m *Options) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -241,96 +242,108 @@ func (m *Options) Marshal() (dAtA []byte, err error) { } func (m *Options) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Options) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.NoPivotRoot { - dAtA[i] = 0x8 - i++ - if m.NoPivotRoot { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.NoNewKeyring { - dAtA[i] = 0x10 - i++ - if m.NoNewKeyring { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if len(m.CriuWorkPath) > 0 { + i -= len(m.CriuWorkPath) + copy(dAtA[i:], m.CriuWorkPath) + i = encodeVarintOci(dAtA, i, uint64(len(m.CriuWorkPath))) + i-- + dAtA[i] = 0x5a } - if len(m.ShimCgroup) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintOci(dAtA, i, uint64(len(m.ShimCgroup))) - i += copy(dAtA[i:], m.ShimCgroup) - } - if m.IoUid != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintOci(dAtA, i, uint64(m.IoUid)) - } - if m.IoGid != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintOci(dAtA, i, uint64(m.IoGid)) - } - if len(m.BinaryName) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintOci(dAtA, i, uint64(len(m.BinaryName))) - i += copy(dAtA[i:], m.BinaryName) - } - if len(m.Root) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintOci(dAtA, i, uint64(len(m.Root))) - i += copy(dAtA[i:], m.Root) - } - if len(m.CriuPath) > 0 { - dAtA[i] = 0x42 - i++ - i = encodeVarintOci(dAtA, i, uint64(len(m.CriuPath))) - i += copy(dAtA[i:], m.CriuPath) + if len(m.CriuImagePath) > 0 { + i -= len(m.CriuImagePath) + copy(dAtA[i:], m.CriuImagePath) + i = encodeVarintOci(dAtA, i, uint64(len(m.CriuImagePath))) + i-- + dAtA[i] = 0x52 } if m.SystemdCgroup { - dAtA[i] = 0x48 - i++ + i-- if m.SystemdCgroup { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x48 } - if len(m.CriuImagePath) > 0 { - dAtA[i] = 0x52 - i++ - i = encodeVarintOci(dAtA, i, uint64(len(m.CriuImagePath))) - i += copy(dAtA[i:], m.CriuImagePath) + if len(m.CriuPath) > 0 { + i -= len(m.CriuPath) + copy(dAtA[i:], m.CriuPath) + i = encodeVarintOci(dAtA, i, uint64(len(m.CriuPath))) + i-- + dAtA[i] = 0x42 } - if len(m.CriuWorkPath) > 0 { - dAtA[i] = 0x5a - i++ - i = encodeVarintOci(dAtA, i, uint64(len(m.CriuWorkPath))) - i += copy(dAtA[i:], m.CriuWorkPath) + if len(m.Root) > 0 { + i -= len(m.Root) + copy(dAtA[i:], m.Root) + i = encodeVarintOci(dAtA, i, uint64(len(m.Root))) + i-- + dAtA[i] = 0x3a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.BinaryName) > 0 { + i -= len(m.BinaryName) + copy(dAtA[i:], m.BinaryName) + i = encodeVarintOci(dAtA, i, uint64(len(m.BinaryName))) + i-- + dAtA[i] = 0x32 } - return i, nil + if m.IoGid != 0 { + i = encodeVarintOci(dAtA, i, uint64(m.IoGid)) + i-- + dAtA[i] = 0x28 + } + if m.IoUid != 0 { + i = encodeVarintOci(dAtA, i, uint64(m.IoUid)) + i-- + dAtA[i] = 0x20 + } + if len(m.ShimCgroup) > 0 { + i -= len(m.ShimCgroup) + copy(dAtA[i:], m.ShimCgroup) + i = encodeVarintOci(dAtA, i, uint64(len(m.ShimCgroup))) + i-- + dAtA[i] = 0x1a + } + if m.NoNewKeyring { + i-- + if m.NoNewKeyring { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.NoPivotRoot { + i-- + if m.NoPivotRoot { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *CheckpointOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -338,103 +351,106 @@ func (m *CheckpointOptions) Marshal() (dAtA []byte, err error) { } func (m *CheckpointOptions) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CheckpointOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Exit { - dAtA[i] = 0x8 - i++ - if m.Exit { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if m.OpenTcp { - dAtA[i] = 0x10 - i++ - if m.OpenTcp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if len(m.WorkPath) > 0 { + i -= len(m.WorkPath) + copy(dAtA[i:], m.WorkPath) + i = encodeVarintOci(dAtA, i, uint64(len(m.WorkPath))) + i-- + dAtA[i] = 0x4a } - if m.ExternalUnixSockets { - dAtA[i] = 0x18 - i++ - if m.ExternalUnixSockets { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ + if len(m.ImagePath) > 0 { + i -= len(m.ImagePath) + copy(dAtA[i:], m.ImagePath) + i = encodeVarintOci(dAtA, i, uint64(len(m.ImagePath))) + i-- + dAtA[i] = 0x42 } - if m.Terminal { - dAtA[i] = 0x20 - i++ - if m.Terminal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.CgroupsMode) > 0 { + i -= len(m.CgroupsMode) + copy(dAtA[i:], m.CgroupsMode) + i = encodeVarintOci(dAtA, i, uint64(len(m.CgroupsMode))) + i-- + dAtA[i] = 0x3a + } + if len(m.EmptyNamespaces) > 0 { + for iNdEx := len(m.EmptyNamespaces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.EmptyNamespaces[iNdEx]) + copy(dAtA[i:], m.EmptyNamespaces[iNdEx]) + i = encodeVarintOci(dAtA, i, uint64(len(m.EmptyNamespaces[iNdEx]))) + i-- + dAtA[i] = 0x32 } - i++ } if m.FileLocks { - dAtA[i] = 0x28 - i++ + i-- if m.FileLocks { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x28 } - if len(m.EmptyNamespaces) > 0 { - for _, s := range m.EmptyNamespaces { - dAtA[i] = 0x32 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) + if m.Terminal { + i-- + if m.Terminal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x20 } - if len(m.CgroupsMode) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintOci(dAtA, i, uint64(len(m.CgroupsMode))) - i += copy(dAtA[i:], m.CgroupsMode) + if m.ExternalUnixSockets { + i-- + if m.ExternalUnixSockets { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - if len(m.ImagePath) > 0 { - dAtA[i] = 0x42 - i++ - i = encodeVarintOci(dAtA, i, uint64(len(m.ImagePath))) - i += copy(dAtA[i:], m.ImagePath) + if m.OpenTcp { + i-- + if m.OpenTcp { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } - if len(m.WorkPath) > 0 { - dAtA[i] = 0x4a - i++ - i = encodeVarintOci(dAtA, i, uint64(len(m.WorkPath))) - i += copy(dAtA[i:], m.WorkPath) + if m.Exit { + i-- + if m.Exit { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ProcessDetails) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -442,30 +458,39 @@ func (m *ProcessDetails) Marshal() (dAtA []byte, err error) { } func (m *ProcessDetails) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProcessDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ExecID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintOci(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintOci(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintOci(dAtA []byte, offset int, v uint64) int { + offset -= sovOci(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Options) Size() (n int) { if m == nil { @@ -580,14 +605,7 @@ func (m *ProcessDetails) Size() (n int) { } func sovOci(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozOci(x uint64) (n int) { return sovOci(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1366,6 +1384,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error { func skipOci(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1397,10 +1416,8 @@ func skipOci(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1421,55 +1438,30 @@ func skipOci(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthOci } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthOci - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOci - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipOci(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthOci - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupOci + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthOci + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthOci = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOci = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthOci = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOci = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupOci = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/runtime/v2/runc/util.go b/vendor/github.com/containerd/containerd/runtime/v2/runc/util.go index 51ca04864e9..166597d492c 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/runc/util.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/runc/util.go @@ -19,8 +19,15 @@ package runc import ( + "context" + "encoding/json" + "io/ioutil" + "path/filepath" + "github.com/containerd/containerd/api/events" + "github.com/containerd/containerd/log" "github.com/containerd/containerd/runtime" + specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/sirupsen/logrus" ) @@ -53,3 +60,26 @@ func GetTopic(e interface{}) string { } return runtime.TaskUnknownTopic } + +// ShouldKillAllOnExit reads the bundle's OCI spec and returns true if +// there is an error reading the spec or if the container has a private PID namespace +func ShouldKillAllOnExit(ctx context.Context, bundlePath string) bool { + var bundleSpec specs.Spec + bundleConfigContents, err := ioutil.ReadFile(filepath.Join(bundlePath, "config.json")) + if err != nil { + log.G(ctx).WithError(err).Error("shouldKillAllOnExit: failed to read config.json") + return true + } + if err := json.Unmarshal(bundleConfigContents, &bundleSpec); err != nil { + log.G(ctx).WithError(err).Error("shouldKillAllOnExit: failed to unmarshal bundle json") + return true + } + if bundleSpec.Linux != nil { + for _, ns := range bundleSpec.Linux.Namespaces { + if ns.Type == specs.PIDNamespace && ns.Path == "" { + return false + } + } + } + return true +} diff --git a/vendor/github.com/containerd/containerd/runtime/v2/runc/v2/service.go b/vendor/github.com/containerd/containerd/runtime/v2/runc/v2/service.go index 40484a96b2b..d3ea1e8ffbe 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/runc/v2/service.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/runc/v2/service.go @@ -31,26 +31,27 @@ import ( "time" "github.com/containerd/cgroups" + cgroupsv2 "github.com/containerd/cgroups/v2" eventstypes "github.com/containerd/containerd/api/events" "github.com/containerd/containerd/api/types/task" "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/log" "github.com/containerd/containerd/mount" "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/pkg/oom" + oomv1 "github.com/containerd/containerd/pkg/oom/v1" + oomv2 "github.com/containerd/containerd/pkg/oom/v2" "github.com/containerd/containerd/pkg/process" "github.com/containerd/containerd/pkg/stdio" "github.com/containerd/containerd/runtime/v2/runc" "github.com/containerd/containerd/runtime/v2/runc/options" "github.com/containerd/containerd/runtime/v2/shim" taskAPI "github.com/containerd/containerd/runtime/v2/task" + "github.com/containerd/containerd/sys" "github.com/containerd/containerd/sys/reaper" runcC "github.com/containerd/go-runc" "github.com/containerd/typeurl" "github.com/gogo/protobuf/proto" - "github.com/gogo/protobuf/types" ptypes "github.com/gogo/protobuf/types" - specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" @@ -75,7 +76,15 @@ type spec struct { // New returns a new shim service that can be used via GRPC func New(ctx context.Context, id string, publisher shim.Publisher, shutdown func()) (shim.Shim, error) { - ep, err := oom.New(publisher) + var ( + ep oom.Watcher + err error + ) + if cgroups.Mode() == cgroups.Unified { + ep, err = oomv2.New(publisher) + } else { + ep, err = oomv1.New(publisher) + } if err != nil { return nil, err } @@ -108,7 +117,7 @@ type service struct { events chan interface{} platform stdio.Platform ec chan runcC.Exit - ep *oom.Epoller + ep oom.Watcher // id only used in cleanup case id string @@ -158,7 +167,7 @@ func readSpec() (*spec, error) { return &s, nil } -func (s *service) StartShim(ctx context.Context, id, containerdBinary, containerdAddress, containerdTTRPCAddress string) (string, error) { +func (s *service) StartShim(ctx context.Context, id, containerdBinary, containerdAddress, containerdTTRPCAddress string) (_ string, retErr error) { cmd, err := newCommand(ctx, id, containerdBinary, containerdAddress, containerdTTRPCAddress) if err != nil { return "", err @@ -201,7 +210,7 @@ func (s *service) StartShim(ctx context.Context, id, containerdBinary, container return "", err } defer func() { - if err != nil { + if retErr != nil { cmd.Process.Kill() } }() @@ -212,7 +221,7 @@ func (s *service) StartShim(ctx context.Context, id, containerdBinary, container } if data, err := ioutil.ReadAll(os.Stdin); err == nil { if len(data) > 0 { - var any types.Any + var any ptypes.Any if err := proto.Unmarshal(data, &any); err != nil { return "", err } @@ -222,14 +231,27 @@ func (s *service) StartShim(ctx context.Context, id, containerdBinary, container } if opts, ok := v.(*options.Options); ok { if opts.ShimCgroup != "" { - cg, err := cgroups.Load(cgroups.V1, cgroups.StaticPath(opts.ShimCgroup)) - if err != nil { - return "", errors.Wrapf(err, "failed to load cgroup %s", opts.ShimCgroup) - } - if err := cg.Add(cgroups.Process{ - Pid: cmd.Process.Pid, - }); err != nil { - return "", errors.Wrapf(err, "failed to join cgroup %s", opts.ShimCgroup) + if cgroups.Mode() == cgroups.Unified { + if err := cgroupsv2.VerifyGroupPath(opts.ShimCgroup); err != nil { + return "", errors.Wrapf(err, "failed to verify cgroup path %q", opts.ShimCgroup) + } + cg, err := cgroupsv2.LoadManager("/sys/fs/cgroup", opts.ShimCgroup) + if err != nil { + return "", errors.Wrapf(err, "failed to load cgroup %s", opts.ShimCgroup) + } + if err := cg.AddProc(uint64(cmd.Process.Pid)); err != nil { + return "", errors.Wrapf(err, "failed to join cgroup %s", opts.ShimCgroup) + } + } else { + cg, err := cgroups.Load(cgroups.V1, cgroups.StaticPath(opts.ShimCgroup)) + if err != nil { + return "", errors.Wrapf(err, "failed to load cgroup %s", opts.ShimCgroup) + } + if err := cg.Add(cgroups.Process{ + Pid: cmd.Process.Pid, + }); err != nil { + return "", errors.Wrapf(err, "failed to join cgroup %s", opts.ShimCgroup) + } } } } @@ -325,10 +347,30 @@ func (s *service) Start(ctx context.Context, r *taskAPI.StartRequest) (*taskAPI. s.eventSendMu.Unlock() return nil, errdefs.ToGRPC(err) } + switch r.ExecID { case "": - if err := s.ep.Add(container.ID, container.Cgroup()); err != nil { - logrus.WithError(err).Error("add cg to OOM monitor") + switch cg := container.Cgroup().(type) { + case cgroups.Cgroup: + if err := s.ep.Add(container.ID, cg); err != nil { + logrus.WithError(err).Error("add cg to OOM monitor") + } + case *cgroupsv2.Manager: + allControllers, err := cg.RootControllers() + if err != nil { + logrus.WithError(err).Error("failed to get root controllers") + } else { + if err := cg.ToggleControllers(allControllers, cgroupsv2.Enable); err != nil { + if sys.RunningInUserNS() { + logrus.WithError(err).Debugf("failed to enable controllers (%v)", allControllers) + } else { + logrus.WithError(err).Errorf("failed to enable controllers (%v)", allControllers) + } + } + } + if err := s.ep.Add(container.ID, cg); err != nil { + logrus.WithError(err).Error("add cg to OOM monitor") + } } s.send(&eventstypes.TaskStart{ @@ -619,15 +661,28 @@ func (s *service) Stats(ctx context.Context, r *taskAPI.StatsRequest) (*taskAPI. if err != nil { return nil, err } - cg := container.Cgroup() - if cg == nil { + cgx := container.Cgroup() + if cgx == nil { return nil, errdefs.ToGRPCf(errdefs.ErrNotFound, "cgroup does not exist") } - stats, err := cg.Stat(cgroups.IgnoreNotExist) - if err != nil { - return nil, err + var statsx interface{} + switch cg := cgx.(type) { + case cgroups.Cgroup: + stats, err := cg.Stat(cgroups.IgnoreNotExist) + if err != nil { + return nil, err + } + statsx = stats + case *cgroupsv2.Manager: + stats, err := cg.Stat() + if err != nil { + return nil, err + } + statsx = stats + default: + return nil, errdefs.ToGRPCf(errdefs.ErrNotImplemented, "unsupported cgroup type %T", cg) } - data, err := typeurl.MarshalAny(stats) + data, err := typeurl.MarshalAny(statsx) if err != nil { return nil, err } @@ -667,13 +722,8 @@ func (s *service) checkProcesses(e runcC.Exit) { } if ip, ok := p.(*process.Init); ok { - shouldKillAll, err := shouldKillAllOnExit(container.Bundle) - if err != nil { - log.G(s.context).WithError(err).Error("failed to check shouldKillAll") - } - // Ensure all children are killed - if shouldKillAll { + if runc.ShouldKillAllOnExit(s.context, container.Bundle) { if err := ip.KillAll(s.context); err != nil { logrus.WithError(err).WithField("id", ip.ID()). Error("failed to kill init's children") @@ -695,25 +745,6 @@ func (s *service) checkProcesses(e runcC.Exit) { } } -func shouldKillAllOnExit(bundlePath string) (bool, error) { - var bundleSpec specs.Spec - bundleConfigContents, err := ioutil.ReadFile(filepath.Join(bundlePath, "config.json")) - if err != nil { - return false, err - } - json.Unmarshal(bundleConfigContents, &bundleSpec) - - if bundleSpec.Linux != nil { - for _, ns := range bundleSpec.Linux.Namespaces { - if ns.Type == specs.PIDNamespace && ns.Path == "" { - return false, nil - } - } - } - - return true, nil -} - func (s *service) getContainerPids(ctx context.Context, id string) ([]uint32, error) { container, err := s.getContainer(id) if err != nil { @@ -738,9 +769,7 @@ func (s *service) forward(ctx context.Context, publisher shim.Publisher) { ns, _ := namespaces.Namespace(ctx) ctx = namespaces.WithNamespace(context.Background(), ns) for e := range s.events { - ctx, cancel := context.WithTimeout(ctx, 5*time.Second) err := publisher.Publish(ctx, runc.GetTopic(e), e) - cancel() if err != nil { logrus.WithError(err).Error("post event") } diff --git a/vendor/github.com/containerd/containerd/runtime/v2/shim.go b/vendor/github.com/containerd/containerd/runtime/v2/shim.go index 47e927437e0..152a1e85bb0 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/shim.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/shim.go @@ -94,7 +94,7 @@ func loadShim(ctx context.Context, bundle *Bundle, events *exchange.Exchange, rt // When using a multi-container shim the 2nd to Nth container in the // shim will not have a separate log pipe. Ignore the failure log // message here when the shim connect times out. - if !os.IsNotExist(errors.Cause(err)) { + if !errors.Is(err, os.ErrNotExist) { log.G(ctx).WithError(err).Error("copy shim log") } } @@ -191,7 +191,7 @@ func (s *shim) Shutdown(ctx context.Context) error { _, err := s.task.Shutdown(ctx, &task.ShutdownRequest{ ID: s.ID(), }) - if err != nil && errors.Cause(err) != ttrpc.ErrClosed { + if err != nil && !errors.Is(err, ttrpc.ErrClosed) { return errdefs.FromGRPC(err) } return nil @@ -226,20 +226,23 @@ func (s *shim) Delete(ctx context.Context) (*runtime.Exit, error) { ID: s.ID(), }) if shimErr != nil { - shimErr = errdefs.FromGRPC(shimErr) - if !errdefs.IsNotFound(shimErr) { - return nil, shimErr + log.G(ctx).WithField("id", s.ID()).WithError(shimErr).Debug("failed to delete task") + if !errors.Is(shimErr, ttrpc.ErrClosed) { + shimErr = errdefs.FromGRPC(shimErr) + if !errdefs.IsNotFound(shimErr) { + return nil, shimErr + } } } // remove self from the runtime task list // this seems dirty but it cleans up the API across runtimes, tasks, and the service s.rtTasks.Delete(ctx, s.ID()) if err := s.waitShutdown(ctx); err != nil { - log.G(ctx).WithError(err).Error("failed to shutdown shim") + log.G(ctx).WithField("id", s.ID()).WithError(err).Error("failed to shutdown shim") } s.Close() if err := s.bundle.Delete(); err != nil { - log.G(ctx).WithError(err).Error("failed to delete bundle") + log.G(ctx).WithField("id", s.ID()).WithError(err).Error("failed to delete bundle") } if shimErr != nil { return nil, shimErr @@ -441,7 +444,7 @@ func (s *shim) State(ctx context.Context) (runtime.State, error) { ID: s.ID(), }) if err != nil { - if errors.Cause(err) != ttrpc.ErrClosed { + if !errors.Is(err, ttrpc.ErrClosed) { return runtime.State{}, errdefs.FromGRPC(err) } return runtime.State{}, errdefs.ErrNotFound diff --git a/vendor/github.com/containerd/containerd/runtime/v2/shim/publisher.go b/vendor/github.com/containerd/containerd/runtime/v2/shim/publisher.go index 3dbd0e045be..cf27a6bc7a5 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/shim/publisher.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/shim/publisher.go @@ -128,9 +128,14 @@ func (l *RemoteEventsPublisher) Publish(ctx context.Context, topic string, event } func (l *RemoteEventsPublisher) forwardRequest(ctx context.Context, req *v1.ForwardRequest) error { - _, err := l.client.EventsService().Forward(ctx, req) + service, err := l.client.EventsService() if err == nil { - return nil + fCtx, cancel := context.WithTimeout(ctx, 5*time.Second) + _, err = service.Forward(fCtx, req) + cancel() + if err == nil { + return nil + } } if err != ttrpc.ErrClosed { @@ -138,11 +143,20 @@ func (l *RemoteEventsPublisher) forwardRequest(ctx context.Context, req *v1.Forw } // Reconnect and retry request - if err := l.client.Reconnect(); err != nil { + if err = l.client.Reconnect(); err != nil { return err } - if _, err := l.client.EventsService().Forward(ctx, req); err != nil { + service, err = l.client.EventsService() + if err != nil { + return err + } + + // try again with a fresh context, otherwise we may get a context timeout unexpectedly. + fCtx, cancel := context.WithTimeout(ctx, 5*time.Second) + _, err = service.Forward(fCtx, req) + cancel() + if err != nil { return err } diff --git a/vendor/github.com/containerd/containerd/runtime/v2/shim/shim.go b/vendor/github.com/containerd/containerd/runtime/v2/shim/shim.go index d540aa87e05..026ebb4e24c 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/shim/shim.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/shim/shim.go @@ -31,6 +31,7 @@ import ( "github.com/containerd/containerd/log" "github.com/containerd/containerd/namespaces" shimapi "github.com/containerd/containerd/runtime/v2/task" + "github.com/containerd/containerd/version" "github.com/containerd/ttrpc" "github.com/gogo/protobuf/proto" "github.com/pkg/errors" @@ -84,6 +85,7 @@ type Config struct { var ( debugFlag bool + versionFlag bool idFlag string namespaceFlag string socketFlag string @@ -99,6 +101,7 @@ const ( func parseFlags() { flag.BoolVar(&debugFlag, "debug", false, "enable debug output in logs") + flag.BoolVar(&versionFlag, "v", false, "show the shim version and exit") flag.StringVar(&namespaceFlag, "namespace", "", "namespace that owns the shim") flag.StringVar(&idFlag, "id", "", "id of the task") flag.StringVar(&socketFlag, "socket", "", "abstract socket path to serve") @@ -155,6 +158,15 @@ func Run(id string, initFunc Init, opts ...BinaryOpts) { func run(id string, initFunc Init, config Config) error { parseFlags() + if versionFlag { + fmt.Printf("%s:\n", os.Args[0]) + fmt.Println(" Version: ", version.Version) + fmt.Println(" Revision:", version.Revision) + fmt.Println(" Go version:", version.GoVersion) + fmt.Println("") + return nil + } + setRuntime() signals, err := setupSignals(config) diff --git a/vendor/github.com/containerd/containerd/runtime/v2/shim/shim_linux.go b/vendor/github.com/containerd/containerd/runtime/v2/shim/shim_linux.go index 7ad2a72620c..06266a5334e 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/shim/shim_linux.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/shim/shim_linux.go @@ -17,7 +17,7 @@ package shim import ( - "github.com/containerd/containerd/sys" + "github.com/containerd/containerd/sys/reaper" "github.com/containerd/ttrpc" ) @@ -26,5 +26,5 @@ func newServer() (*ttrpc.Server, error) { } func subreaper() error { - return sys.SetSubreaper(1) + return reaper.SetSubreaper(1) } diff --git a/vendor/github.com/containerd/containerd/runtime/v2/shim/util_unix.go b/vendor/github.com/containerd/containerd/runtime/v2/shim/util_unix.go index 7ca65033f97..093a6623978 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/shim/util_unix.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/shim/util_unix.go @@ -30,6 +30,7 @@ import ( "time" "github.com/containerd/containerd/namespaces" + "github.com/containerd/containerd/pkg/dialer" "github.com/containerd/containerd/sys" "github.com/pkg/errors" ) @@ -75,7 +76,7 @@ func SocketAddress(ctx context.Context, id string) (string, error) { // AnonDialer returns a dialer for an abstract socket func AnonDialer(address string, timeout time.Duration) (net.Conn, error) { address = strings.TrimPrefix(address, "unix://") - return net.DialTimeout("unix", "\x00"+address, timeout) + return dialer.Dialer("\x00"+address, timeout) } func AnonReconnectDialer(address string, timeout time.Duration) (net.Conn, error) { diff --git a/vendor/github.com/containerd/containerd/runtime/v2/shim_windows.go b/vendor/github.com/containerd/containerd/runtime/v2/shim_windows.go index e82e623f6c8..dc007c349ca 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/shim_windows.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/shim_windows.go @@ -90,7 +90,7 @@ func checkCopyShimLogError(ctx context.Context, err error) error { // When using a multi-container shim the 2nd to Nth container in the // shim will not have a separate log pipe. Ignore the failure log // message here when the shim connect times out. - if os.IsNotExist(errors.Cause(err)) { + if errors.Is(err, os.ErrNotExist) { return nil } return err diff --git a/vendor/github.com/containerd/containerd/runtime/v2/task/shim.pb.go b/vendor/github.com/containerd/containerd/runtime/v2/task/shim.pb.go index 7ba9e677aa3..3cf11d8e3d8 100644 --- a/vendor/github.com/containerd/containerd/runtime/v2/task/shim.pb.go +++ b/vendor/github.com/containerd/containerd/runtime/v2/task/shim.pb.go @@ -14,6 +14,7 @@ import ( types1 "github.com/gogo/protobuf/types" io "io" math "math" + math_bits "math/bits" reflect "reflect" strings "strings" time "time" @@ -29,7 +30,7 @@ var _ = time.Kitchen // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type CreateTaskRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -60,7 +61,7 @@ func (m *CreateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_CreateTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -99,7 +100,7 @@ func (m *CreateTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_CreateTaskResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -139,7 +140,7 @@ func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -180,7 +181,7 @@ func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -225,7 +226,7 @@ func (m *ExecProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ExecProcessRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -263,7 +264,7 @@ func (m *ExecProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ExecProcessResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -305,7 +306,7 @@ func (m *ResizePtyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_ResizePtyRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -345,7 +346,7 @@ func (m *StateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_StateRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -394,7 +395,7 @@ func (m *StateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_StateResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -436,7 +437,7 @@ func (m *KillRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_KillRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -477,7 +478,7 @@ func (m *CloseIORequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_CloseIORequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -516,7 +517,7 @@ func (m *PidsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_PidsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -555,7 +556,7 @@ func (m *PidsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_PidsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -596,7 +597,7 @@ func (m *CheckpointTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return xxx_messageInfo_CheckpointTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -636,7 +637,7 @@ func (m *UpdateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_UpdateTaskRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -676,7 +677,7 @@ func (m *StartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_StartRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -715,7 +716,7 @@ func (m *StartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_StartResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -755,7 +756,7 @@ func (m *WaitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_WaitRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -795,7 +796,7 @@ func (m *WaitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_WaitResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -834,7 +835,7 @@ func (m *StatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_StatsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -873,7 +874,7 @@ func (m *StatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_StatsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -912,7 +913,7 @@ func (m *ConnectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_ConnectRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -953,7 +954,7 @@ func (m *ConnectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_ConnectResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -993,7 +994,7 @@ func (m *ShutdownRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return xxx_messageInfo_ShutdownRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1032,7 +1033,7 @@ func (m *PauseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_PauseRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1071,7 +1072,7 @@ func (m *ResumeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return xxx_messageInfo_ResumeRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1208,7 +1209,7 @@ var fileDescriptor_9202ee34bc3ad8ca = []byte{ func (m *CreateTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1216,94 +1217,111 @@ func (m *CreateTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *CreateTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Bundle) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Bundle))) - i += copy(dAtA[i:], m.Bundle) - } - if len(m.Rootfs) > 0 { - for _, msg := range m.Rootfs { - dAtA[i] = 0x1a - i++ - i = encodeVarintShim(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) + if m.Options != nil { + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x52 + } + if len(m.ParentCheckpoint) > 0 { + i -= len(m.ParentCheckpoint) + copy(dAtA[i:], m.ParentCheckpoint) + i = encodeVarintShim(dAtA, i, uint64(len(m.ParentCheckpoint))) + i-- + dAtA[i] = 0x4a + } + if len(m.Checkpoint) > 0 { + i -= len(m.Checkpoint) + copy(dAtA[i:], m.Checkpoint) + i = encodeVarintShim(dAtA, i, uint64(len(m.Checkpoint))) + i-- + dAtA[i] = 0x42 + } + if len(m.Stderr) > 0 { + i -= len(m.Stderr) + copy(dAtA[i:], m.Stderr) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) + i-- + dAtA[i] = 0x3a + } + if len(m.Stdout) > 0 { + i -= len(m.Stdout) + copy(dAtA[i:], m.Stdout) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) + i-- + dAtA[i] = 0x32 + } + if len(m.Stdin) > 0 { + i -= len(m.Stdin) + copy(dAtA[i:], m.Stdin) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) + i-- + dAtA[i] = 0x2a } if m.Terminal { - dAtA[i] = 0x20 - i++ + i-- if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - if len(m.Stdin) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) - i += copy(dAtA[i:], m.Stdin) - } - if len(m.Stdout) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) - i += copy(dAtA[i:], m.Stdout) - } - if len(m.Stderr) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) - i += copy(dAtA[i:], m.Stderr) - } - if len(m.Checkpoint) > 0 { - dAtA[i] = 0x42 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Checkpoint))) - i += copy(dAtA[i:], m.Checkpoint) - } - if len(m.ParentCheckpoint) > 0 { - dAtA[i] = 0x4a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ParentCheckpoint))) - i += copy(dAtA[i:], m.ParentCheckpoint) - } - if m.Options != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Options.Size())) - n1, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Rootfs) > 0 { + for iNdEx := len(m.Rootfs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rootfs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - i += n1 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Bundle) > 0 { + i -= len(m.Bundle) + copy(dAtA[i:], m.Bundle) + i = encodeVarintShim(dAtA, i, uint64(len(m.Bundle))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CreateTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1311,25 +1329,31 @@ func (m *CreateTaskResponse) Marshal() (dAtA []byte, err error) { } func (m *CreateTaskResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateTaskResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Pid != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Pid)) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Pid != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1337,32 +1361,40 @@ func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { } func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *DeleteResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1370,38 +1402,44 @@ func (m *DeleteResponse) Marshal() (dAtA []byte, err error) { } func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Pid != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Pid)) - } - if m.ExitStatus != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) - } - dAtA[i] = 0x1a - i++ - i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) - n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintShim(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x1a + if m.ExitStatus != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) + i-- + dAtA[i] = 0x10 + } + if m.Pid != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *ExecProcessRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1409,70 +1447,83 @@ func (m *ExecProcessRequest) Marshal() (dAtA []byte, err error) { } func (m *ExecProcessRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecProcessRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if len(m.Stderr) > 0 { + i -= len(m.Stderr) + copy(dAtA[i:], m.Stderr) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) + i-- + dAtA[i] = 0x32 + } + if len(m.Stdout) > 0 { + i -= len(m.Stdout) + copy(dAtA[i:], m.Stdout) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) + i-- + dAtA[i] = 0x2a + } + if len(m.Stdin) > 0 { + i -= len(m.Stdin) + copy(dAtA[i:], m.Stdin) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) + i-- + dAtA[i] = 0x22 } if m.Terminal { - dAtA[i] = 0x18 - i++ + i-- if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 } - if len(m.Stdin) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) - i += copy(dAtA[i:], m.Stdin) + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0x12 } - if len(m.Stdout) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) - i += copy(dAtA[i:], m.Stdout) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - if len(m.Stderr) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) - i += copy(dAtA[i:], m.Stderr) - } - if m.Spec != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Spec.Size())) - n3, err := m.Spec.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *ExecProcessResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1480,20 +1531,26 @@ func (m *ExecProcessResponse) Marshal() (dAtA []byte, err error) { } func (m *ExecProcessResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecProcessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + return len(dAtA) - i, nil } func (m *ResizePtyRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1501,42 +1558,50 @@ func (m *ResizePtyRequest) Marshal() (dAtA []byte, err error) { } func (m *ResizePtyRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResizePtyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) - } - if m.Width != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Width)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Height != 0 { - dAtA[i] = 0x20 - i++ i = encodeVarintShim(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x20 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Width != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Width)) + i-- + dAtA[i] = 0x18 } - return i, nil + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0x12 + } + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *StateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1544,32 +1609,40 @@ func (m *StateRequest) Marshal() (dAtA []byte, err error) { } func (m *StateRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *StateResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1577,89 +1650,101 @@ func (m *StateResponse) Marshal() (dAtA []byte, err error) { } func (m *StateResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Bundle) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Bundle))) - i += copy(dAtA[i:], m.Bundle) + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0x5a } - if m.Pid != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Pid)) + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt):]) + if err4 != nil { + return 0, err4 } - if m.Status != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Status)) - } - if len(m.Stdin) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) - i += copy(dAtA[i:], m.Stdin) - } - if len(m.Stdout) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) - i += copy(dAtA[i:], m.Stdout) - } - if len(m.Stderr) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) - i += copy(dAtA[i:], m.Stderr) + i -= n4 + i = encodeVarintShim(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x52 + if m.ExitStatus != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) + i-- + dAtA[i] = 0x48 } if m.Terminal { - dAtA[i] = 0x40 - i++ + i-- if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x40 } - if m.ExitStatus != 0 { - dAtA[i] = 0x48 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) + if len(m.Stderr) > 0 { + i -= len(m.Stderr) + copy(dAtA[i:], m.Stderr) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stderr))) + i-- + dAtA[i] = 0x3a } - dAtA[i] = 0x52 - i++ - i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) - n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) - if err != nil { - return 0, err + if len(m.Stdout) > 0 { + i -= len(m.Stdout) + copy(dAtA[i:], m.Stdout) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdout))) + i-- + dAtA[i] = 0x32 } - i += n4 - if len(m.ExecID) > 0 { - dAtA[i] = 0x5a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + if len(m.Stdin) > 0 { + i -= len(m.Stdin) + copy(dAtA[i:], m.Stdin) + i = encodeVarintShim(dAtA, i, uint64(len(m.Stdin))) + i-- + dAtA[i] = 0x2a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Status != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x20 } - return i, nil + if m.Pid != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x18 + } + if len(m.Bundle) > 0 { + i -= len(m.Bundle) + copy(dAtA[i:], m.Bundle) + i = encodeVarintShim(dAtA, i, uint64(len(m.Bundle))) + i-- + dAtA[i] = 0x12 + } + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *KillRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1667,47 +1752,55 @@ func (m *KillRequest) Marshal() (dAtA []byte, err error) { } func (m *KillRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KillRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) - } - if m.Signal != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Signal)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.All { - dAtA[i] = 0x20 - i++ + i-- if m.All { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x20 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.Signal != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Signal)) + i-- + dAtA[i] = 0x18 } - return i, nil + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0x12 + } + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CloseIORequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1715,42 +1808,50 @@ func (m *CloseIORequest) Marshal() (dAtA []byte, err error) { } func (m *CloseIORequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CloseIORequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Stdin { - dAtA[i] = 0x18 - i++ + i-- if m.Stdin { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x18 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ExecID) > 0 { + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *PidsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1758,26 +1859,33 @@ func (m *PidsRequest) Marshal() (dAtA []byte, err error) { } func (m *PidsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PidsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *PidsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1785,32 +1893,40 @@ func (m *PidsResponse) Marshal() (dAtA []byte, err error) { } func (m *PidsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PidsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Processes) > 0 { - for _, msg := range m.Processes { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Processes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Processes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil + return len(dAtA) - i, nil } func (m *CheckpointTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1818,42 +1934,52 @@ func (m *CheckpointTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *CheckpointTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CheckpointTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } - if len(m.Path) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Options != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Options.Size())) - n5, err := m.Options.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) } - i += n5 + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.Path) > 0 { + i -= len(m.Path) + copy(dAtA[i:], m.Path) + i = encodeVarintShim(dAtA, i, uint64(len(m.Path))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *UpdateTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1861,36 +1987,45 @@ func (m *UpdateTaskRequest) Marshal() (dAtA []byte, err error) { } func (m *UpdateTaskRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateTaskRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Resources != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Resources.Size())) - n6, err := m.Resources.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) } - i += n6 + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *StartRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1898,32 +2033,40 @@ func (m *StartRequest) Marshal() (dAtA []byte, err error) { } func (m *StartRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StartRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *StartResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1931,25 +2074,31 @@ func (m *StartResponse) Marshal() (dAtA []byte, err error) { } func (m *StartResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StartResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Pid != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Pid)) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Pid != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.Pid)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *WaitRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1957,32 +2106,40 @@ func (m *WaitRequest) Marshal() (dAtA []byte, err error) { } func (m *WaitRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WaitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.ExecID) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.ExecID) + copy(dAtA[i:], m.ExecID) i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID))) - i += copy(dAtA[i:], m.ExecID) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *WaitResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1990,33 +2147,39 @@ func (m *WaitResponse) Marshal() (dAtA []byte, err error) { } func (m *WaitResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WaitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ExitStatus != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) - } - dAtA[i] = 0x12 - i++ - i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) - n7, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintShim(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x12 + if m.ExitStatus != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.ExitStatus)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *StatsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2024,26 +2187,33 @@ func (m *StatsRequest) Marshal() (dAtA []byte, err error) { } func (m *StatsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StatsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *StatsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2051,30 +2221,38 @@ func (m *StatsResponse) Marshal() (dAtA []byte, err error) { } func (m *StatsResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StatsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Stats != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(m.Stats.Size())) - n8, err := m.Stats.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if m.Stats != nil { + { + size, err := m.Stats.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintShim(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ConnectRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2082,26 +2260,33 @@ func (m *ConnectRequest) Marshal() (dAtA []byte, err error) { } func (m *ConnectRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConnectRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ConnectResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2109,36 +2294,43 @@ func (m *ConnectResponse) Marshal() (dAtA []byte, err error) { } func (m *ConnectResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConnectResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ShimPid != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.ShimPid)) - } - if m.TaskPid != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintShim(dAtA, i, uint64(m.TaskPid)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Version) > 0 { - dAtA[i] = 0x1a - i++ + i -= len(m.Version) + copy(dAtA[i:], m.Version) i = encodeVarintShim(dAtA, i, uint64(len(m.Version))) - i += copy(dAtA[i:], m.Version) + i-- + dAtA[i] = 0x1a } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if m.TaskPid != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.TaskPid)) + i-- + dAtA[i] = 0x10 } - return i, nil + if m.ShimPid != 0 { + i = encodeVarintShim(dAtA, i, uint64(m.ShimPid)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *ShutdownRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2146,36 +2338,43 @@ func (m *ShutdownRequest) Marshal() (dAtA []byte, err error) { } func (m *ShutdownRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ShutdownRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if m.Now { - dAtA[i] = 0x10 - i++ + i-- if m.Now { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ + i-- + dAtA[i] = 0x10 } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *PauseRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2183,26 +2382,33 @@ func (m *PauseRequest) Marshal() (dAtA []byte, err error) { } func (m *PauseRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PauseRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ResumeRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2210,30 +2416,39 @@ func (m *ResumeRequest) Marshal() (dAtA []byte, err error) { } func (m *ResumeRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResumeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - } if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return i, nil + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintShim(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintShim(dAtA []byte, offset int, v uint64) int { + offset -= sovShim(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *CreateTaskRequest) Size() (n int) { if m == nil { @@ -2811,14 +3026,7 @@ func (m *ResumeRequest) Size() (n int) { } func sovShim(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozShim(x uint64) (n int) { return sovShim(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -2827,10 +3035,15 @@ func (this *CreateTaskRequest) String() string { if this == nil { return "nil" } + repeatedStringForRootfs := "[]*Mount{" + for _, f := range this.Rootfs { + repeatedStringForRootfs += strings.Replace(fmt.Sprintf("%v", f), "Mount", "types.Mount", 1) + "," + } + repeatedStringForRootfs += "}" s := strings.Join([]string{`&CreateTaskRequest{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Bundle:` + fmt.Sprintf("%v", this.Bundle) + `,`, - `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "types.Mount", 1) + `,`, + `Rootfs:` + repeatedStringForRootfs + `,`, `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, @@ -2873,7 +3086,7 @@ func (this *DeleteResponse) String() string { s := strings.Join([]string{`&DeleteResponse{`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, - `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `ExitedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExitedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -2946,7 +3159,7 @@ func (this *StateResponse) String() string { `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, - `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `ExitedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExitedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, @@ -2995,8 +3208,13 @@ func (this *PidsResponse) String() string { if this == nil { return "nil" } + repeatedStringForProcesses := "[]*ProcessInfo{" + for _, f := range this.Processes { + repeatedStringForProcesses += strings.Replace(fmt.Sprintf("%v", f), "ProcessInfo", "task.ProcessInfo", 1) + "," + } + repeatedStringForProcesses += "}" s := strings.Join([]string{`&PidsResponse{`, - `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "ProcessInfo", "task.ProcessInfo", 1) + `,`, + `Processes:` + repeatedStringForProcesses + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -3068,7 +3286,7 @@ func (this *WaitResponse) String() string { } s := strings.Join([]string{`&WaitResponse{`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, - `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, + `ExitedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExitedAt), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -6917,6 +7135,7 @@ func (m *ResumeRequest) Unmarshal(dAtA []byte) error { func skipShim(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -6948,10 +7167,8 @@ func skipShim(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -6972,55 +7189,30 @@ func skipShim(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthShim } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthShim - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowShim - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipShim(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthShim - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupShim + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthShim + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthShim = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowShim = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthShim = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowShim = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupShim = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/containerd/containerd/services.go b/vendor/github.com/containerd/containerd/services.go index 395fc306510..d8fced55917 100644 --- a/vendor/github.com/containerd/containerd/services.go +++ b/vendor/github.com/containerd/containerd/services.go @@ -20,6 +20,7 @@ import ( containersapi "github.com/containerd/containerd/api/services/containers/v1" "github.com/containerd/containerd/api/services/diff/v1" imagesapi "github.com/containerd/containerd/api/services/images/v1" + introspectionapi "github.com/containerd/containerd/api/services/introspection/v1" namespacesapi "github.com/containerd/containerd/api/services/namespaces/v1" "github.com/containerd/containerd/api/services/tasks/v1" "github.com/containerd/containerd/containers" @@ -27,19 +28,21 @@ import ( "github.com/containerd/containerd/images" "github.com/containerd/containerd/leases" "github.com/containerd/containerd/namespaces" + "github.com/containerd/containerd/services/introspection" "github.com/containerd/containerd/snapshots" ) type services struct { - contentStore content.Store - imageStore images.Store - containerStore containers.Store - namespaceStore namespaces.Store - snapshotters map[string]snapshots.Snapshotter - taskService tasks.TasksClient - diffService DiffService - eventService EventService - leasesService leases.Manager + contentStore content.Store + imageStore images.Store + containerStore containers.Store + namespaceStore namespaces.Store + snapshotters map[string]snapshots.Snapshotter + taskService tasks.TasksClient + diffService DiffService + eventService EventService + leasesService leases.Manager + introspectionService introspection.Service } // ServicesOpt allows callers to set options on the services @@ -110,3 +113,10 @@ func WithLeasesService(leasesService leases.Manager) ServicesOpt { s.leasesService = leasesService } } + +// WithIntrospectionService sets the introspection service. +func WithIntrospectionService(in introspectionapi.IntrospectionClient) ServicesOpt { + return func(s *services) { + s.introspectionService = introspection.NewIntrospectionServiceFromClient(in) + } +} diff --git a/vendor/github.com/containerd/containerd/services/introspection/introspection.go b/vendor/github.com/containerd/containerd/services/introspection/introspection.go new file mode 100644 index 00000000000..5024788b5f0 --- /dev/null +++ b/vendor/github.com/containerd/containerd/services/introspection/introspection.go @@ -0,0 +1,62 @@ +/* + Copyright The containerd 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 introspection + +import ( + context "context" + + api "github.com/containerd/containerd/api/services/introspection/v1" + "github.com/containerd/containerd/errdefs" + ptypes "github.com/gogo/protobuf/types" +) + +type Service interface { + Plugins(context.Context, []string) (*api.PluginsResponse, error) + Server(context.Context, *ptypes.Empty) (*api.ServerResponse, error) +} + +type introspectionRemote struct { + client api.IntrospectionClient +} + +var _ = (Service)(&introspectionRemote{}) + +func NewIntrospectionServiceFromClient(c api.IntrospectionClient) Service { + return &introspectionRemote{client: c} +} + +func (i *introspectionRemote) Plugins(ctx context.Context, filters []string) (*api.PluginsResponse, error) { + resp, err := i.client.Plugins(ctx, &api.PluginsRequest{ + Filters: filters, + }) + + if err != nil { + return nil, errdefs.FromGRPC(err) + } + + return resp, nil +} + +func (i *introspectionRemote) Server(ctx context.Context, in *ptypes.Empty) (*api.ServerResponse, error) { + resp, err := i.client.Server(ctx, in) + + if err != nil { + return nil, errdefs.FromGRPC(err) + } + + return resp, nil +} diff --git a/vendor/github.com/containerd/containerd/services/introspection/local.go b/vendor/github.com/containerd/containerd/services/introspection/local.go new file mode 100644 index 00000000000..9b6875a0001 --- /dev/null +++ b/vendor/github.com/containerd/containerd/services/introspection/local.go @@ -0,0 +1,227 @@ +/* + Copyright The containerd 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 introspection + +import ( + context "context" + "io/ioutil" + "os" + "path/filepath" + "sync" + + api "github.com/containerd/containerd/api/services/introspection/v1" + "github.com/containerd/containerd/api/types" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/filters" + "github.com/containerd/containerd/plugin" + "github.com/containerd/containerd/services" + "github.com/gogo/googleapis/google/rpc" + ptypes "github.com/gogo/protobuf/types" + "github.com/google/uuid" + "google.golang.org/grpc" + "google.golang.org/grpc/status" +) + +func init() { + plugin.Register(&plugin.Registration{ + Type: plugin.ServicePlugin, + ID: services.IntrospectionService, + Requires: []plugin.Type{}, + InitFn: func(ic *plugin.InitContext) (interface{}, error) { + // this service works by using the plugin context up till the point + // this service is initialized. Since we require this service last, + // it should provide the full set of plugins. + pluginsPB := pluginsToPB(ic.GetAll()) + return &Local{ + plugins: pluginsPB, + root: ic.Root, + }, nil + }, + }) +} + +type Local struct { + mu sync.Mutex + plugins []api.Plugin + root string +} + +var _ = (api.IntrospectionClient)(&Local{}) + +func (l *Local) UpdateLocal(root string, plugins []api.Plugin) { + l.mu.Lock() + defer l.mu.Unlock() + l.root = root + l.plugins = plugins +} + +func (l *Local) Plugins(ctx context.Context, req *api.PluginsRequest, _ ...grpc.CallOption) (*api.PluginsResponse, error) { + filter, err := filters.ParseAll(req.Filters...) + if err != nil { + return nil, errdefs.ToGRPCf(errdefs.ErrInvalidArgument, err.Error()) + } + + var plugins []api.Plugin + allPlugins := l.getPlugins() + for _, p := range allPlugins { + if !filter.Match(adaptPlugin(p)) { + continue + } + + plugins = append(plugins, p) + } + + return &api.PluginsResponse{ + Plugins: plugins, + }, nil +} + +func (l *Local) getPlugins() []api.Plugin { + l.mu.Lock() + defer l.mu.Unlock() + return l.plugins +} + +func (l *Local) Server(ctx context.Context, _ *ptypes.Empty, _ ...grpc.CallOption) (*api.ServerResponse, error) { + u, err := l.getUUID() + if err != nil { + return nil, errdefs.ToGRPC(err) + } + return &api.ServerResponse{ + UUID: u, + }, nil +} + +func (l *Local) getUUID() (string, error) { + l.mu.Lock() + defer l.mu.Unlock() + + data, err := ioutil.ReadFile(l.uuidPath()) + if err != nil { + if os.IsNotExist(err) { + return l.generateUUID() + } + return "", err + } + u := string(data) + if _, err := uuid.Parse(u); err != nil { + return "", err + } + return u, nil +} + +func (l *Local) generateUUID() (string, error) { + u, err := uuid.NewRandom() + if err != nil { + return "", err + } + path := l.uuidPath() + if err := os.MkdirAll(filepath.Dir(path), 0700); err != nil { + return "", err + } + uu := u.String() + if err := ioutil.WriteFile(path, []byte(uu), 0666); err != nil { + return "", err + } + return uu, nil +} + +func (l *Local) uuidPath() string { + return filepath.Join(l.root, "uuid") +} + +func adaptPlugin(o interface{}) filters.Adaptor { + obj := o.(api.Plugin) + return filters.AdapterFunc(func(fieldpath []string) (string, bool) { + if len(fieldpath) == 0 { + return "", false + } + + switch fieldpath[0] { + case "type": + return obj.Type, len(obj.Type) > 0 + case "id": + return obj.ID, len(obj.ID) > 0 + case "platforms": + // TODO(stevvooe): Another case here where have multiple values. + // May need to refactor the filter system to allow filtering by + // platform, if this is required. + case "capabilities": + // TODO(stevvooe): Need a better way to match against + // collections. We can only return "the value" but really it + // would be best if we could return a set of values for the + // path, any of which could match. + } + + return "", false + }) +} + +func pluginsToPB(plugins []*plugin.Plugin) []api.Plugin { + var pluginsPB []api.Plugin + for _, p := range plugins { + var platforms []types.Platform + for _, p := range p.Meta.Platforms { + platforms = append(platforms, types.Platform{ + OS: p.OS, + Architecture: p.Architecture, + Variant: p.Variant, + }) + } + + var requires []string + for _, r := range p.Registration.Requires { + requires = append(requires, r.String()) + } + + var initErr *rpc.Status + if err := p.Err(); err != nil { + st, ok := status.FromError(errdefs.ToGRPC(err)) + if ok { + var details []*ptypes.Any + for _, d := range st.Proto().Details { + details = append(details, &ptypes.Any{ + TypeUrl: d.TypeUrl, + Value: d.Value, + }) + } + initErr = &rpc.Status{ + Code: int32(st.Code()), + Message: st.Message(), + Details: details, + } + } else { + initErr = &rpc.Status{ + Code: int32(rpc.UNKNOWN), + Message: err.Error(), + } + } + } + + pluginsPB = append(pluginsPB, api.Plugin{ + Type: p.Registration.Type.String(), + ID: p.Registration.ID, + Requires: requires, + Platforms: platforms, + Capabilities: p.Meta.Capabilities, + Exports: p.Meta.Exports, + InitErr: initErr, + }) + } + + return pluginsPB +} diff --git a/vendor/github.com/containerd/containerd/services/introspection/service.go b/vendor/github.com/containerd/containerd/services/introspection/service.go index 404ffe481c0..b8c54afc028 100644 --- a/vendor/github.com/containerd/containerd/services/introspection/service.go +++ b/vendor/github.com/containerd/containerd/services/introspection/service.go @@ -18,21 +18,13 @@ package introspection import ( context "context" - "io/ioutil" - "os" - "path/filepath" - "sync" api "github.com/containerd/containerd/api/services/introspection/v1" - "github.com/containerd/containerd/api/types" - "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/filters" "github.com/containerd/containerd/plugin" - "github.com/gogo/googleapis/google/rpc" + "github.com/containerd/containerd/services" ptypes "github.com/gogo/protobuf/types" - "github.com/google/uuid" + "github.com/pkg/errors" "google.golang.org/grpc" - "google.golang.org/grpc/status" ) func init() { @@ -44,177 +36,50 @@ func init() { // this service works by using the plugin context up till the point // this service is initialized. Since we require this service last, // it should provide the full set of plugins. - pluginsPB := pluginsToPB(ic.GetAll()) - return NewService(pluginsPB, ic.Root), nil + plugins, err := ic.GetByType(plugin.ServicePlugin) + if err != nil { + return nil, err + } + p, ok := plugins[services.IntrospectionService] + if !ok { + return nil, errors.New("introspection service not found") + } + + i, err := p.Instance() + if err != nil { + return nil, err + } + + allPluginsPB := pluginsToPB(ic.GetAll()) + + localClient, ok := i.(*Local) + if !ok { + return nil, errors.Errorf("Could not create a local client for introspection service") + } + localClient.UpdateLocal(ic.Root, allPluginsPB) + + return &server{ + local: localClient, + }, nil }, }) } -type service struct { - mu sync.Mutex - plugins []api.Plugin - root string +type server struct { + local api.IntrospectionClient } -// NewService returns the GRPC introspection server -func NewService(plugins []api.Plugin, root string) api.IntrospectionServer { - return &service{ - plugins: plugins, - root: root, - } -} +var _ = (api.IntrospectionServer)(&server{}) -func (s *service) Register(server *grpc.Server) error { +func (s *server) Register(server *grpc.Server) error { api.RegisterIntrospectionServer(server, s) return nil } -func (s *service) Plugins(ctx context.Context, req *api.PluginsRequest) (*api.PluginsResponse, error) { - filter, err := filters.ParseAll(req.Filters...) - if err != nil { - return nil, errdefs.ToGRPCf(errdefs.ErrInvalidArgument, err.Error()) - } - - var plugins []api.Plugin - for _, p := range s.plugins { - if !filter.Match(adaptPlugin(p)) { - continue - } - - plugins = append(plugins, p) - } - - return &api.PluginsResponse{ - Plugins: plugins, - }, nil +func (s *server) Plugins(ctx context.Context, req *api.PluginsRequest) (*api.PluginsResponse, error) { + return s.local.Plugins(ctx, req) } -func (s *service) Server(ctx context.Context, _ *ptypes.Empty) (*api.ServerResponse, error) { - u, err := s.getUUID() - if err != nil { - return nil, errdefs.ToGRPC(err) - } - return &api.ServerResponse{ - UUID: u, - }, nil -} - -func (s *service) getUUID() (string, error) { - s.mu.Lock() - defer s.mu.Unlock() - - data, err := ioutil.ReadFile(s.uuidPath()) - if err != nil { - if os.IsNotExist(err) { - return s.generateUUID() - } - return "", err - } - u := string(data) - if _, err := uuid.Parse(u); err != nil { - return "", err - } - return u, nil -} - -func (s *service) generateUUID() (string, error) { - u, err := uuid.NewRandom() - if err != nil { - return "", err - } - path := s.uuidPath() - if err := os.MkdirAll(filepath.Dir(path), 0700); err != nil { - return "", err - } - uu := u.String() - if err := ioutil.WriteFile(path, []byte(uu), 0666); err != nil { - return "", err - } - return uu, nil -} - -func (s *service) uuidPath() string { - return filepath.Join(s.root, "uuid") -} - -func adaptPlugin(o interface{}) filters.Adaptor { - obj := o.(api.Plugin) - return filters.AdapterFunc(func(fieldpath []string) (string, bool) { - if len(fieldpath) == 0 { - return "", false - } - - switch fieldpath[0] { - case "type": - return obj.Type, len(obj.Type) > 0 - case "id": - return obj.ID, len(obj.ID) > 0 - case "platforms": - // TODO(stevvooe): Another case here where have multiple values. - // May need to refactor the filter system to allow filtering by - // platform, if this is required. - case "capabilities": - // TODO(stevvooe): Need a better way to match against - // collections. We can only return "the value" but really it - // would be best if we could return a set of values for the - // path, any of which could match. - } - - return "", false - }) -} - -func pluginsToPB(plugins []*plugin.Plugin) []api.Plugin { - var pluginsPB []api.Plugin - for _, p := range plugins { - var platforms []types.Platform - for _, p := range p.Meta.Platforms { - platforms = append(platforms, types.Platform{ - OS: p.OS, - Architecture: p.Architecture, - Variant: p.Variant, - }) - } - - var requires []string - for _, r := range p.Registration.Requires { - requires = append(requires, r.String()) - } - - var initErr *rpc.Status - if err := p.Err(); err != nil { - st, ok := status.FromError(errdefs.ToGRPC(err)) - if ok { - var details []*ptypes.Any - for _, d := range st.Proto().Details { - details = append(details, &ptypes.Any{ - TypeUrl: d.TypeUrl, - Value: d.Value, - }) - } - initErr = &rpc.Status{ - Code: int32(st.Code()), - Message: st.Message(), - Details: details, - } - } else { - initErr = &rpc.Status{ - Code: int32(rpc.UNKNOWN), - Message: err.Error(), - } - } - } - - pluginsPB = append(pluginsPB, api.Plugin{ - Type: p.Registration.Type.String(), - ID: p.Registration.ID, - Requires: requires, - Platforms: platforms, - Capabilities: p.Meta.Capabilities, - Exports: p.Meta.Exports, - InitErr: initErr, - }) - } - - return pluginsPB +func (s *server) Server(ctx context.Context, empty *ptypes.Empty) (*api.ServerResponse, error) { + return s.local.Server(ctx, empty) } diff --git a/vendor/github.com/containerd/containerd/services/server/config/config.go b/vendor/github.com/containerd/containerd/services/server/config/config.go index ff37716085c..dbe42128b34 100644 --- a/vendor/github.com/containerd/containerd/services/server/config/config.go +++ b/vendor/github.com/containerd/containerd/services/server/config/config.go @@ -28,6 +28,8 @@ import ( "github.com/containerd/containerd/plugin" ) +// NOTE: Any new map fields added also need to be handled in mergeConfig. + // Config provides containerd configuration data for the server type Config struct { // Version of the config file @@ -321,6 +323,10 @@ func mergeConfig(to, from *Config) error { to.ProxyPlugins[k] = v } + for k, v := range from.Timeouts { + to.Timeouts[k] = v + } + return nil } diff --git a/vendor/github.com/containerd/containerd/services/server/server.go b/vendor/github.com/containerd/containerd/services/server/server.go index e31fec5dfe1..1294253824a 100644 --- a/vendor/github.com/containerd/containerd/services/server/server.go +++ b/vendor/github.com/containerd/containerd/services/server/server.go @@ -52,6 +52,7 @@ import ( "github.com/pkg/errors" bolt "go.etcd.io/bbolt" "google.golang.org/grpc" + "google.golang.org/grpc/backoff" "google.golang.org/grpc/credentials" ) @@ -456,9 +457,14 @@ func (pc *proxyClients) getClient(address string) (*grpc.ClientConn, error) { return c, nil } + backoffConfig := backoff.DefaultConfig + backoffConfig.MaxDelay = 3 * time.Second + connParams := grpc.ConnectParams{ + Backoff: backoffConfig, + } gopts := []grpc.DialOption{ grpc.WithInsecure(), - grpc.WithBackoffMaxDelay(3 * time.Second), + grpc.WithConnectParams(connParams), grpc.WithContextDialer(dialer.ContextDialer), // TODO(stevvooe): We may need to allow configuration of this on the client. diff --git a/vendor/github.com/containerd/containerd/services/server/server_linux.go b/vendor/github.com/containerd/containerd/services/server/server_linux.go index 47692fed2c8..cbb2b0f3327 100644 --- a/vendor/github.com/containerd/containerd/services/server/server_linux.go +++ b/vendor/github.com/containerd/containerd/services/server/server_linux.go @@ -21,6 +21,7 @@ import ( "os" "github.com/containerd/cgroups" + cgroupsv2 "github.com/containerd/cgroups/v2" "github.com/containerd/containerd/log" srvconfig "github.com/containerd/containerd/services/server/config" "github.com/containerd/containerd/sys" @@ -37,20 +38,35 @@ func apply(ctx context.Context, config *srvconfig.Config) error { } } if config.Cgroup.Path != "" { - cg, err := cgroups.Load(cgroups.V1, cgroups.StaticPath(config.Cgroup.Path)) - if err != nil { - if err != cgroups.ErrCgroupDeleted { + if cgroups.Mode() == cgroups.Unified { + cg, err := cgroupsv2.LoadManager("/sys/fs/cgroup", config.Cgroup.Path) + if err != nil { + if err != cgroupsv2.ErrCgroupDeleted { + return err + } + if cg, err = cgroupsv2.NewManager("/sys/fs/cgroup", config.Cgroup.Path, nil); err != nil { + return err + } + } + if err := cg.AddProc(uint64(os.Getpid())); err != nil { return err } - if cg, err = cgroups.New(cgroups.V1, cgroups.StaticPath(config.Cgroup.Path), &specs.LinuxResources{}); err != nil { + } else { + cg, err := cgroups.Load(cgroups.V1, cgroups.StaticPath(config.Cgroup.Path)) + if err != nil { + if err != cgroups.ErrCgroupDeleted { + return err + } + if cg, err = cgroups.New(cgroups.V1, cgroups.StaticPath(config.Cgroup.Path), &specs.LinuxResources{}); err != nil { + return err + } + } + if err := cg.Add(cgroups.Process{ + Pid: os.Getpid(), + }); err != nil { return err } } - if err := cg.Add(cgroups.Process{ - Pid: os.Getpid(), - }); err != nil { - return err - } } return nil } diff --git a/vendor/github.com/containerd/containerd/services/services.go b/vendor/github.com/containerd/containerd/services/services.go index efc920093e9..27f47a5cef4 100644 --- a/vendor/github.com/containerd/containerd/services/services.go +++ b/vendor/github.com/containerd/containerd/services/services.go @@ -33,4 +33,6 @@ const ( LeasesService = "leases-service" // DiffService is id of diff service. DiffService = "diff-service" + // IntrospectionService is the id of introspection service + IntrospectionService = "introspection-service" ) diff --git a/vendor/github.com/containerd/containerd/services/snapshots/service.go b/vendor/github.com/containerd/containerd/services/snapshots/service.go index 8ef7a47f562..1b58ac02c96 100644 --- a/vendor/github.com/containerd/containerd/services/snapshots/service.go +++ b/vendor/github.com/containerd/containerd/services/snapshots/service.go @@ -227,7 +227,7 @@ func (s *service) List(sr *snapshotsapi.ListSnapshotsRequest, ss snapshotsapi.Sn } return nil - }) + }, sr.Filters...) if err != nil { return err } @@ -255,6 +255,25 @@ func (s *service) Usage(ctx context.Context, ur *snapshotsapi.UsageRequest) (*sn return fromUsage(usage), nil } +func (s *service) Cleanup(ctx context.Context, cr *snapshotsapi.CleanupRequest) (*ptypes.Empty, error) { + sn, err := s.getSnapshotter(cr.Snapshotter) + if err != nil { + return nil, err + } + + c, ok := sn.(snapshots.Cleaner) + if !ok { + return nil, errdefs.ToGRPCf(errdefs.ErrNotImplemented, "snapshotter does not implement Cleanup method") + } + + err = c.Cleanup(ctx) + if err != nil { + return nil, errdefs.ToGRPC(err) + } + + return empty, nil +} + func fromKind(kind snapshots.Kind) snapshotsapi.Kind { if kind == snapshots.KindActive { return snapshotsapi.KindActive diff --git a/vendor/github.com/containerd/containerd/services/tasks/local.go b/vendor/github.com/containerd/containerd/services/tasks/local.go index c93421d1fc8..e33c30d987d 100644 --- a/vendor/github.com/containerd/containerd/services/tasks/local.go +++ b/vendor/github.com/containerd/containerd/services/tasks/local.go @@ -184,6 +184,11 @@ func (l *local) Create(ctx context.Context, r *api.CreateTaskRequest, _ ...grpc. Options: m.Options, }) } + if strings.HasPrefix(container.Runtime.Name, "io.containerd.runtime.v1.") { + log.G(ctx).Warn("runtime v1 is deprecated since containerd v1.4, consider using runtime v2") + } else if container.Runtime.Name == plugin.RuntimeRuncV1 { + log.G(ctx).Warnf("%q is deprecated since containerd v1.4, consider using %q", plugin.RuntimeRuncV1, plugin.RuntimeRuncV2) + } rtime, err := l.getRuntime(container.Runtime.Name) if err != nil { return nil, err diff --git a/vendor/github.com/containerd/containerd/signals_unix.go b/vendor/github.com/containerd/containerd/signals_unix.go index 00aa7ca4b3b..14916a9ff3a 100644 --- a/vendor/github.com/containerd/containerd/signals_unix.go +++ b/vendor/github.com/containerd/containerd/signals_unix.go @@ -33,11 +33,7 @@ import ( func ParseSignal(rawSignal string) (syscall.Signal, error) { s, err := strconv.Atoi(rawSignal) if err == nil { - signal := syscall.Signal(s) - if unix.SignalName(signal) != "" { - return signal, nil - } - return -1, fmt.Errorf("unknown signal %q", rawSignal) + return syscall.Signal(s), nil } signal := unix.SignalNum(strings.ToUpper(rawSignal)) if signal == 0 { diff --git a/vendor/github.com/containerd/containerd/snapshots/native/native.go b/vendor/github.com/containerd/containerd/snapshots/native/native.go index aac26d37b04..50d87577c4c 100644 --- a/vendor/github.com/containerd/containerd/snapshots/native/native.go +++ b/vendor/github.com/containerd/containerd/snapshots/native/native.go @@ -232,13 +232,13 @@ func (o *snapshotter) Remove(ctx context.Context, key string) (err error) { } // Walk the committed snapshots. -func (o *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func (o *snapshotter) Walk(ctx context.Context, fn snapshots.WalkFunc, fs ...string) error { ctx, t, err := o.ms.TransactionContext(ctx, false) if err != nil { return err } defer t.Rollback() - return storage.WalkInfo(ctx, fn) + return storage.WalkInfo(ctx, fn, fs...) } func (o *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, key, parent string, opts []snapshots.Opt) (_ []mount.Mount, err error) { diff --git a/vendor/github.com/containerd/containerd/snapshots/overlay/overlay.go b/vendor/github.com/containerd/containerd/snapshots/overlay/overlay.go index 9ad82c7f343..153e7aa819c 100644 --- a/vendor/github.com/containerd/containerd/snapshots/overlay/overlay.go +++ b/vendor/github.com/containerd/containerd/snapshots/overlay/overlay.go @@ -70,6 +70,7 @@ type snapshotter struct { root string ms *storage.MetaStore asyncRemove bool + indexOff bool } // NewSnapshotter returns a Snapshotter which uses overlayfs. The overlayfs @@ -102,10 +103,17 @@ func NewSnapshotter(root string, opts ...Opt) (snapshots.Snapshotter, error) { return nil, err } + // figure out whether "index=off" option is recognized by the kernel + var indexOff bool + if _, err = os.Stat("/sys/module/overlay/parameters/index"); err == nil { + indexOff = true + } + return &snapshotter{ root: root, ms: ms, asyncRemove: config.asyncRemove, + indexOff: indexOff, }, nil } @@ -165,9 +173,8 @@ func (o *snapshotter) Usage(ctx context.Context, key string) (snapshots.Usage, e return snapshots.Usage{}, err } - upperPath := o.upperPath(id) - if info.Kind == snapshots.KindActive { + upperPath := o.upperPath(id) du, err := fs.DiskUsage(ctx, upperPath) if err != nil { // TODO(stevvooe): Consider not reporting an error in this case. @@ -282,14 +289,14 @@ func (o *snapshotter) Remove(ctx context.Context, key string) (err error) { return t.Commit() } -// Walk the committed snapshots. -func (o *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +// Walk the snapshots. +func (o *snapshotter) Walk(ctx context.Context, fn snapshots.WalkFunc, fs ...string) error { ctx, t, err := o.ms.TransactionContext(ctx, false) if err != nil { return err } defer t.Rollback() - return storage.WalkInfo(ctx, fn) + return storage.WalkInfo(ctx, fn, fs...) } // Cleanup cleans up disk resources from removed or abandoned snapshots @@ -466,6 +473,11 @@ func (o *snapshotter) mounts(s storage.Snapshot) []mount.Mount { } var options []string + // set index=off when mount overlayfs + if o.indexOff { + options = append(options, "index=off") + } + if s.Kind == snapshots.KindActive { options = append(options, fmt.Sprintf("workdir=%s", o.workPath(s.ID)), diff --git a/vendor/github.com/containerd/containerd/snapshots/proxy/proxy.go b/vendor/github.com/containerd/containerd/snapshots/proxy/proxy.go index 1e8c2634c08..00c320c6087 100644 --- a/vendor/github.com/containerd/containerd/snapshots/proxy/proxy.go +++ b/vendor/github.com/containerd/containerd/snapshots/proxy/proxy.go @@ -153,9 +153,10 @@ func (p *proxySnapshotter) Remove(ctx context.Context, key string) error { return errdefs.FromGRPC(err) } -func (p *proxySnapshotter) Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func (p *proxySnapshotter) Walk(ctx context.Context, fn snapshots.WalkFunc, fs ...string) error { sc, err := p.client.List(ctx, &snapshotsapi.ListSnapshotsRequest{ Snapshotter: p.snapshotterName, + Filters: fs, }) if err != nil { return errdefs.FromGRPC(err) @@ -183,6 +184,13 @@ func (p *proxySnapshotter) Close() error { return nil } +func (p *proxySnapshotter) Cleanup(ctx context.Context) error { + _, err := p.client.Cleanup(ctx, &snapshotsapi.CleanupRequest{ + Snapshotter: p.snapshotterName, + }) + return errdefs.FromGRPC(err) +} + func toKind(kind snapshotsapi.Kind) snapshots.Kind { if kind == snapshotsapi.KindActive { return snapshots.KindActive diff --git a/vendor/github.com/containerd/containerd/snapshots/snapshotter.go b/vendor/github.com/containerd/containerd/snapshots/snapshotter.go index 514538f7ecc..168560e1425 100644 --- a/vendor/github.com/containerd/containerd/snapshots/snapshotter.go +++ b/vendor/github.com/containerd/containerd/snapshots/snapshotter.go @@ -25,6 +25,11 @@ import ( "github.com/containerd/containerd/mount" ) +const ( + inheritedLabelsPrefix = "containerd.io/snapshot/" + labelSnapshotRef = "containerd.io/snapshot.ref" +) + // Kind identifies the kind of snapshot. type Kind uint8 @@ -118,6 +123,9 @@ func (u *Usage) Add(other Usage) { u.Inodes += other.Inodes } +// WalkFunc defines the callback for a snapshot walk. +type WalkFunc func(context.Context, Info) error + // Snapshotter defines the methods required to implement a snapshot snapshotter for // allocating, snapshotting and mounting filesystem changesets. The model works // by building up sets of changes with parent-child relationships. @@ -314,9 +322,15 @@ type Snapshotter interface { // removed before proceeding. Remove(ctx context.Context, key string) error - // Walk all snapshots in the snapshotter. For each snapshot in the - // snapshotter, the function will be called. - Walk(ctx context.Context, fn func(context.Context, Info) error) error + // Walk will call the provided function for each snapshot in the + // snapshotter which match the provided filters. If no filters are + // given all items will be walked. + // Filters: + // name + // parent + // kind (active,view,committed) + // labels.(label) + Walk(ctx context.Context, fn WalkFunc, filters ...string) error // Close releases the internal resources. // @@ -327,13 +341,48 @@ type Snapshotter interface { Close() error } +// Cleaner defines a type capable of performing asynchronous resource cleanup. +// The Cleaner interface should be used by snapshotters which implement fast +// removal and deferred resource cleanup. This prevents snapshots from needing +// to perform lengthy resource cleanup before acknowledging a snapshot key +// has been removed and available for re-use. This is also useful when +// performing multi-key removal with the intent of cleaning up all the +// resources after each snapshot key has been removed. +type Cleaner interface { + Cleanup(ctx context.Context) error +} + // Opt allows setting mutable snapshot properties on creation type Opt func(info *Info) error -// WithLabels adds labels to a created snapshot +// WithLabels appends labels to a created snapshot func WithLabels(labels map[string]string) Opt { return func(info *Info) error { - info.Labels = labels + if info.Labels == nil { + info.Labels = make(map[string]string) + } + + for k, v := range labels { + info.Labels[k] = v + } + return nil } } + +// FilterInheritedLabels filters the provided labels by removing any key which +// isn't a snapshot label. Snapshot labels have a prefix of "containerd.io/snapshot/" +// or are the "containerd.io/snapshot.ref" label. +func FilterInheritedLabels(labels map[string]string) map[string]string { + if labels == nil { + return nil + } + + filtered := make(map[string]string) + for k, v := range labels { + if k == labelSnapshotRef || strings.HasPrefix(k, inheritedLabelsPrefix) { + filtered[k] = v + } + } + return filtered +} diff --git a/vendor/github.com/containerd/containerd/snapshots/storage/bolt.go b/vendor/github.com/containerd/containerd/snapshots/storage/bolt.go index 3568c0cee29..712c71f72e8 100644 --- a/vendor/github.com/containerd/containerd/snapshots/storage/bolt.go +++ b/vendor/github.com/containerd/containerd/snapshots/storage/bolt.go @@ -24,6 +24,7 @@ import ( "time" "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/filters" "github.com/containerd/containerd/metadata/boltutil" "github.com/containerd/containerd/snapshots" "github.com/pkg/errors" @@ -144,7 +145,12 @@ func UpdateInfo(ctx context.Context, info snapshots.Info, fieldpaths ...string) // WalkInfo iterates through all metadata Info for the stored snapshots and // calls the provided function for each. Requires a context with a storage // transaction. -func WalkInfo(ctx context.Context, fn func(context.Context, snapshots.Info) error) error { +func WalkInfo(ctx context.Context, fn snapshots.WalkFunc, fs ...string) error { + filter, err := filters.ParseAll(fs...) + if err != nil { + return err + } + // TODO: allow indexes (name, parent, specific labels) return withBucket(ctx, func(ctx context.Context, bkt, pbkt *bolt.Bucket) error { return bkt.ForEach(func(k, v []byte) error { // skip non buckets @@ -160,6 +166,9 @@ func WalkInfo(ctx context.Context, fn func(context.Context, snapshots.Info) erro if err := readSnapshot(sbkt, nil, &si); err != nil { return err } + if !filter.Match(adaptSnapshot(si)) { + return nil + } return fn(ctx, si) }) @@ -604,3 +613,36 @@ func encodeID(id uint64) ([]byte, error) { } return idEncoded, nil } + +func adaptSnapshot(info snapshots.Info) filters.Adaptor { + return filters.AdapterFunc(func(fieldpath []string) (string, bool) { + if len(fieldpath) == 0 { + return "", false + } + + switch fieldpath[0] { + case "kind": + switch info.Kind { + case snapshots.KindActive: + return "active", true + case snapshots.KindView: + return "view", true + case snapshots.KindCommitted: + return "committed", true + } + case "name": + return info.Name, true + case "parent": + return info.Parent, true + case "labels": + if len(info.Labels) == 0 { + return "", false + } + + v, ok := info.Labels[strings.Join(fieldpath[1:], ".")] + return v, ok + } + + return "", false + }) +} diff --git a/vendor/github.com/containerd/containerd/snapshotter_opts_unix.go b/vendor/github.com/containerd/containerd/snapshotter_opts_unix.go new file mode 100644 index 00000000000..1964379d491 --- /dev/null +++ b/vendor/github.com/containerd/containerd/snapshotter_opts_unix.go @@ -0,0 +1,35 @@ +// +build !windows + +/* + Copyright The containerd 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 containerd + +import ( + "fmt" + + "github.com/containerd/containerd/snapshots" +) + +// WithRemapperLabels creates the labels used by any supporting snapshotter +// to shift the filesystem ownership (user namespace mapping) automatically; currently +// supported by the fuse-overlayfs snapshotter +func WithRemapperLabels(ctrUID, hostUID, ctrGID, hostGID, length uint32) snapshots.Opt { + return snapshots.WithLabels(map[string]string{ + "containerd.io/snapshot/uidmapping": fmt.Sprintf("%d:%d:%d", ctrUID, hostUID, length), + "containerd.io/snapshot/gidmapping": fmt.Sprintf("%d:%d:%d", ctrGID, hostGID, length), + }) +} diff --git a/vendor/github.com/containerd/containerd/sys/epoll.go b/vendor/github.com/containerd/containerd/sys/epoll.go index 683f38eea86..28d6c2cabc6 100644 --- a/vendor/github.com/containerd/containerd/sys/epoll.go +++ b/vendor/github.com/containerd/containerd/sys/epoll.go @@ -20,17 +20,14 @@ package sys import "golang.org/x/sys/unix" -// EpollCreate1 directly calls unix.EpollCreate1 -func EpollCreate1(flag int) (int, error) { - return unix.EpollCreate1(flag) -} +// EpollCreate1 is an alias for unix.EpollCreate1 +// Deprecated: use golang.org/x/sys/unix.EpollCreate1 +var EpollCreate1 = unix.EpollCreate1 -// EpollCtl directly calls unix.EpollCtl -func EpollCtl(epfd int, op int, fd int, event *unix.EpollEvent) error { - return unix.EpollCtl(epfd, op, fd, event) -} +// EpollCtl is an alias for unix.EpollCtl +// Deprecated: use golang.org/x/sys/unix.EpollCtl +var EpollCtl = unix.EpollCtl -// EpollWait directly calls unix.EpollWait -func EpollWait(epfd int, events []unix.EpollEvent, msec int) (int, error) { - return unix.EpollWait(epfd, events, msec) -} +// EpollWait is an alias for unix.EpollWait +// Deprecated: use golang.org/x/sys/unix.EpollWait +var EpollWait = unix.EpollWait diff --git a/vendor/github.com/containerd/containerd/sys/filesys_windows.go b/vendor/github.com/containerd/containerd/sys/filesys_windows.go index 1bdc5317a9d..2eaee2ca297 100644 --- a/vendor/github.com/containerd/containerd/sys/filesys_windows.go +++ b/vendor/github.com/containerd/containerd/sys/filesys_windows.go @@ -26,8 +26,8 @@ import ( "syscall" "unsafe" - winio "github.com/Microsoft/go-winio" "github.com/Microsoft/hcsshim" + "golang.org/x/sys/windows" ) const ( @@ -41,7 +41,8 @@ func MkdirAllWithACL(path string, perm os.FileMode) error { return mkdirall(path, true) } -// MkdirAll implementation that is volume path aware for Windows. +// MkdirAll implementation that is volume path aware for Windows. It can be used +// as a drop-in replacement for os.MkdirAll() func MkdirAll(path string, _ os.FileMode) error { return mkdirall(path, false) } @@ -111,26 +112,26 @@ func mkdirall(path string, adminAndLocalSystem bool) error { // mkdirWithACL creates a new directory. If there is an error, it will be of // type *PathError. . // -// This is a modified and combined version of os.Mkdir and syscall.Mkdir +// This is a modified and combined version of os.Mkdir and windows.Mkdir // in golang to cater for creating a directory am ACL permitting full // access, with inheritance, to any subfolder/file for Built-in Administrators // and Local System. func mkdirWithACL(name string) error { - sa := syscall.SecurityAttributes{Length: 0} - sd, err := winio.SddlToSecurityDescriptor(SddlAdministratorsLocalSystem) + sa := windows.SecurityAttributes{Length: 0} + sd, err := windows.SecurityDescriptorFromString(SddlAdministratorsLocalSystem) if err != nil { return &os.PathError{Op: "mkdir", Path: name, Err: err} } sa.Length = uint32(unsafe.Sizeof(sa)) sa.InheritHandle = 1 - sa.SecurityDescriptor = uintptr(unsafe.Pointer(&sd[0])) + sa.SecurityDescriptor = sd - namep, err := syscall.UTF16PtrFromString(name) + namep, err := windows.UTF16PtrFromString(name) if err != nil { return &os.PathError{Op: "mkdir", Path: name, Err: err} } - e := syscall.CreateDirectory(namep, &sa) + e := windows.CreateDirectory(namep, &sa) if e != nil { return &os.PathError{Op: "mkdir", Path: name, Err: e} } @@ -153,7 +154,7 @@ func IsAbs(path string) bool { return true } -// The origin of the functions below here are the golang OS and syscall packages, +// The origin of the functions below here are the golang OS and windows packages, // slightly modified to only cope with files, not directories due to the // specific use case. // @@ -185,74 +186,74 @@ func OpenFileSequential(name string, flag int, _ os.FileMode) (*os.File, error) if name == "" { return nil, &os.PathError{Op: "open", Path: name, Err: syscall.ENOENT} } - r, errf := syscallOpenFileSequential(name, flag, 0) + r, errf := windowsOpenFileSequential(name, flag, 0) if errf == nil { return r, nil } return nil, &os.PathError{Op: "open", Path: name, Err: errf} } -func syscallOpenFileSequential(name string, flag int, _ os.FileMode) (file *os.File, err error) { - r, e := syscallOpenSequential(name, flag|syscall.O_CLOEXEC, 0) +func windowsOpenFileSequential(name string, flag int, _ os.FileMode) (file *os.File, err error) { + r, e := windowsOpenSequential(name, flag|windows.O_CLOEXEC, 0) if e != nil { return nil, e } return os.NewFile(uintptr(r), name), nil } -func makeInheritSa() *syscall.SecurityAttributes { - var sa syscall.SecurityAttributes +func makeInheritSa() *windows.SecurityAttributes { + var sa windows.SecurityAttributes sa.Length = uint32(unsafe.Sizeof(sa)) sa.InheritHandle = 1 return &sa } -func syscallOpenSequential(path string, mode int, _ uint32) (fd syscall.Handle, err error) { +func windowsOpenSequential(path string, mode int, _ uint32) (fd windows.Handle, err error) { if len(path) == 0 { - return syscall.InvalidHandle, syscall.ERROR_FILE_NOT_FOUND + return windows.InvalidHandle, windows.ERROR_FILE_NOT_FOUND } - pathp, err := syscall.UTF16PtrFromString(path) + pathp, err := windows.UTF16PtrFromString(path) if err != nil { - return syscall.InvalidHandle, err + return windows.InvalidHandle, err } var access uint32 - switch mode & (syscall.O_RDONLY | syscall.O_WRONLY | syscall.O_RDWR) { - case syscall.O_RDONLY: - access = syscall.GENERIC_READ - case syscall.O_WRONLY: - access = syscall.GENERIC_WRITE - case syscall.O_RDWR: - access = syscall.GENERIC_READ | syscall.GENERIC_WRITE + switch mode & (windows.O_RDONLY | windows.O_WRONLY | windows.O_RDWR) { + case windows.O_RDONLY: + access = windows.GENERIC_READ + case windows.O_WRONLY: + access = windows.GENERIC_WRITE + case windows.O_RDWR: + access = windows.GENERIC_READ | windows.GENERIC_WRITE } - if mode&syscall.O_CREAT != 0 { - access |= syscall.GENERIC_WRITE + if mode&windows.O_CREAT != 0 { + access |= windows.GENERIC_WRITE } - if mode&syscall.O_APPEND != 0 { - access &^= syscall.GENERIC_WRITE - access |= syscall.FILE_APPEND_DATA + if mode&windows.O_APPEND != 0 { + access &^= windows.GENERIC_WRITE + access |= windows.FILE_APPEND_DATA } - sharemode := uint32(syscall.FILE_SHARE_READ | syscall.FILE_SHARE_WRITE) - var sa *syscall.SecurityAttributes - if mode&syscall.O_CLOEXEC == 0 { + sharemode := uint32(windows.FILE_SHARE_READ | windows.FILE_SHARE_WRITE) + var sa *windows.SecurityAttributes + if mode&windows.O_CLOEXEC == 0 { sa = makeInheritSa() } var createmode uint32 switch { - case mode&(syscall.O_CREAT|syscall.O_EXCL) == (syscall.O_CREAT | syscall.O_EXCL): - createmode = syscall.CREATE_NEW - case mode&(syscall.O_CREAT|syscall.O_TRUNC) == (syscall.O_CREAT | syscall.O_TRUNC): - createmode = syscall.CREATE_ALWAYS - case mode&syscall.O_CREAT == syscall.O_CREAT: - createmode = syscall.OPEN_ALWAYS - case mode&syscall.O_TRUNC == syscall.O_TRUNC: - createmode = syscall.TRUNCATE_EXISTING + case mode&(windows.O_CREAT|windows.O_EXCL) == (windows.O_CREAT | windows.O_EXCL): + createmode = windows.CREATE_NEW + case mode&(windows.O_CREAT|windows.O_TRUNC) == (windows.O_CREAT | windows.O_TRUNC): + createmode = windows.CREATE_ALWAYS + case mode&windows.O_CREAT == windows.O_CREAT: + createmode = windows.OPEN_ALWAYS + case mode&windows.O_TRUNC == windows.O_TRUNC: + createmode = windows.TRUNCATE_EXISTING default: - createmode = syscall.OPEN_EXISTING + createmode = windows.OPEN_EXISTING } // Use FILE_FLAG_SEQUENTIAL_SCAN rather than FILE_ATTRIBUTE_NORMAL as implemented in golang. - //https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx + // https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx const fileFlagSequentialScan = 0x08000000 // FILE_FLAG_SEQUENTIAL_SCAN - h, e := syscall.CreateFile(pathp, access, sharemode, sa, createmode, fileFlagSequentialScan, 0) + h, e := windows.CreateFile(pathp, access, sharemode, sa, createmode, fileFlagSequentialScan, 0) return h, e } diff --git a/vendor/github.com/containerd/containerd/sys/oom_unix.go b/vendor/github.com/containerd/containerd/sys/oom_unix.go index 54412e9c3ce..d49d5bc8dd8 100644 --- a/vendor/github.com/containerd/containerd/sys/oom_unix.go +++ b/vendor/github.com/containerd/containerd/sys/oom_unix.go @@ -24,8 +24,6 @@ import ( "os" "strconv" "strings" - - "github.com/opencontainers/runc/libcontainer/system" ) // OOMScoreMaxKillable is the maximum score keeping the process killable by the oom killer @@ -40,7 +38,7 @@ func SetOOMScore(pid, score int) error { } defer f.Close() if _, err = f.WriteString(strconv.Itoa(score)); err != nil { - if os.IsPermission(err) && (system.RunningInUserNS() || RunningUnprivileged()) { + if os.IsPermission(err) && (RunningInUserNS() || RunningUnprivileged()) { return nil } return err diff --git a/vendor/github.com/containerd/containerd/sys/proc.go b/vendor/github.com/containerd/containerd/sys/proc.go deleted file mode 100644 index 496eb1fea19..00000000000 --- a/vendor/github.com/containerd/containerd/sys/proc.go +++ /dev/null @@ -1,80 +0,0 @@ -// +build linux - -/* - Copyright The containerd 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 sys - -import ( - "bufio" - "fmt" - "os" - "strconv" - "strings" - - "github.com/opencontainers/runc/libcontainer/system" -) - -const nanoSecondsPerSecond = 1e9 - -var clockTicksPerSecond = uint64(system.GetClockTicks()) - -// GetSystemCPUUsage returns the host system's cpu usage in -// nanoseconds. An error is returned if the format of the underlying -// file does not match. -// -// Uses /proc/stat defined by POSIX. Looks for the cpu -// statistics line and then sums up the first seven fields -// provided. See `man 5 proc` for details on specific field -// information. -func GetSystemCPUUsage() (uint64, error) { - var line string - f, err := os.Open("/proc/stat") - if err != nil { - return 0, err - } - bufReader := bufio.NewReaderSize(nil, 128) - defer func() { - bufReader.Reset(nil) - f.Close() - }() - bufReader.Reset(f) - err = nil - for err == nil { - line, err = bufReader.ReadString('\n') - if err != nil { - break - } - parts := strings.Fields(line) - switch parts[0] { - case "cpu": - if len(parts) < 8 { - return 0, fmt.Errorf("bad format of cpu stats") - } - var totalClockTicks uint64 - for _, i := range parts[1:8] { - v, err := strconv.ParseUint(i, 10, 64) - if err != nil { - return 0, fmt.Errorf("error parsing cpu stats") - } - totalClockTicks += v - } - return (totalClockTicks * nanoSecondsPerSecond) / - clockTicksPerSecond, nil - } - } - return 0, fmt.Errorf("bad stats format") -} diff --git a/vendor/github.com/containerd/containerd/sys/reaper.go b/vendor/github.com/containerd/containerd/sys/reaper.go deleted file mode 100644 index d08ccccfbca..00000000000 --- a/vendor/github.com/containerd/containerd/sys/reaper.go +++ /dev/null @@ -1,69 +0,0 @@ -// +build !windows - -/* - Copyright The containerd 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 sys - -import ( - "golang.org/x/sys/unix" -) - -// Exit is the wait4 information from an exited process -type Exit struct { - Pid int - Status int -} - -// Reap reaps all child processes for the calling process and returns their -// exit information -func Reap(wait bool) (exits []Exit, err error) { - var ( - ws unix.WaitStatus - rus unix.Rusage - ) - flag := unix.WNOHANG - if wait { - flag = 0 - } - for { - pid, err := unix.Wait4(-1, &ws, flag, &rus) - if err != nil { - if err == unix.ECHILD { - return exits, nil - } - return exits, err - } - if pid <= 0 { - return exits, nil - } - exits = append(exits, Exit{ - Pid: pid, - Status: exitStatus(ws), - }) - } -} - -const exitSignalOffset = 128 - -// exitStatus returns the correct exit status for a process based on if it -// was signaled or exited cleanly -func exitStatus(status unix.WaitStatus) int { - if status.Signaled() { - return exitSignalOffset + int(status.Signal()) - } - return status.ExitStatus() -} diff --git a/vendor/github.com/containerd/containerd/sys/reaper/reaper_unix.go b/vendor/github.com/containerd/containerd/sys/reaper/reaper_unix.go index baab9740b25..0033178dfa7 100644 --- a/vendor/github.com/containerd/containerd/sys/reaper/reaper_unix.go +++ b/vendor/github.com/containerd/containerd/sys/reaper/reaper_unix.go @@ -23,9 +23,9 @@ import ( "sync" "time" - "github.com/containerd/containerd/sys" runc "github.com/containerd/go-runc" "github.com/pkg/errors" + "golang.org/x/sys/unix" ) // ErrNoSuchProcess is returned when the process no longer exists @@ -60,7 +60,7 @@ func (s *subscriber) do(fn func()) { // all exited processes and close their wait channels func Reap() error { now := time.Now() - exits, err := sys.Reap(false) + exits, err := reap(false) for _, e := range exits { done := Default.notify(runc.Exit{ Timestamp: now, @@ -200,3 +200,49 @@ func stop(timer *time.Timer, recv bool) { <-timer.C } } + +// exit is the wait4 information from an exited process +type exit struct { + Pid int + Status int +} + +// reap reaps all child processes for the calling process and returns their +// exit information +func reap(wait bool) (exits []exit, err error) { + var ( + ws unix.WaitStatus + rus unix.Rusage + ) + flag := unix.WNOHANG + if wait { + flag = 0 + } + for { + pid, err := unix.Wait4(-1, &ws, flag, &rus) + if err != nil { + if err == unix.ECHILD { + return exits, nil + } + return exits, err + } + if pid <= 0 { + return exits, nil + } + exits = append(exits, exit{ + Pid: pid, + Status: exitStatus(ws), + }) + } +} + +const exitSignalOffset = 128 + +// exitStatus returns the correct exit status for a process based on if it +// was signaled or exited cleanly +func exitStatus(status unix.WaitStatus) int { + if status.Signaled() { + return exitSignalOffset + int(status.Signal()) + } + return status.ExitStatus() +} diff --git a/vendor/github.com/containerd/containerd/sys/reaper_linux.go b/vendor/github.com/containerd/containerd/sys/reaper/reaper_utils_linux.go similarity index 57% rename from vendor/github.com/containerd/containerd/sys/reaper_linux.go rename to vendor/github.com/containerd/containerd/sys/reaper/reaper_utils_linux.go index ecb0bd031ed..cadcdc42c38 100644 --- a/vendor/github.com/containerd/containerd/sys/reaper_linux.go +++ b/vendor/github.com/containerd/containerd/sys/reaper/reaper_utils_linux.go @@ -14,7 +14,7 @@ limitations under the License. */ -package sys +package reaper import ( "unsafe" @@ -22,22 +22,9 @@ import ( "golang.org/x/sys/unix" ) -// If arg2 is nonzero, set the "child subreaper" attribute of the -// calling process; if arg2 is zero, unset the attribute. When a -// process is marked as a child subreaper, all of the children -// that it creates, and their descendants, will be marked as -// having a subreaper. In effect, a subreaper fulfills the role -// of init(1) for its descendant processes. Upon termination of -// a process that is orphaned (i.e., its immediate parent has -// already terminated) and marked as having a subreaper, the -// nearest still living ancestor subreaper will receive a SIGCHLD -// signal and be able to wait(2) on the process to discover its -// termination status. -const setChildSubreaper = 36 - // SetSubreaper sets the value i as the subreaper setting for the calling process func SetSubreaper(i int) error { - return unix.Prctl(setChildSubreaper, uintptr(i), 0, 0, 0) + return unix.Prctl(unix.PR_SET_CHILD_SUBREAPER, uintptr(i), 0, 0, 0) } // GetSubreaper returns the subreaper setting for the calling process diff --git a/vendor/github.com/containerd/containerd/sys/socket_unix.go b/vendor/github.com/containerd/containerd/sys/socket_unix.go index 90fa55c482f..b67cc1fa3a7 100644 --- a/vendor/github.com/containerd/containerd/sys/socket_unix.go +++ b/vendor/github.com/containerd/containerd/sys/socket_unix.go @@ -68,11 +68,11 @@ func GetLocalListener(path string, uid, gid int) (net.Listener, error) { } func mkdirAs(path string, uid, gid int) error { - if _, err := os.Stat(path); err == nil || !os.IsNotExist(err) { + if _, err := os.Stat(path); !os.IsNotExist(err) { return err } - if err := os.Mkdir(path, 0770); err != nil { + if err := os.MkdirAll(path, 0770); err != nil { return err } diff --git a/vendor/github.com/containerd/containerd/sys/userns_linux.go b/vendor/github.com/containerd/containerd/sys/userns_linux.go new file mode 100644 index 00000000000..3cd1a222208 --- /dev/null +++ b/vendor/github.com/containerd/containerd/sys/userns_linux.go @@ -0,0 +1,62 @@ +/* + Copyright The containerd 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 sys + +import ( + "bufio" + "fmt" + "os" + "sync" +) + +var ( + inUserNS bool + nsOnce sync.Once +) + +// RunningInUserNS detects whether we are currently running in a user namespace. +// Originally copied from github.com/lxc/lxd/shared/util.go +func RunningInUserNS() bool { + nsOnce.Do(func() { + file, err := os.Open("/proc/self/uid_map") + if err != nil { + // This kernel-provided file only exists if user namespaces are supported + return + } + defer file.Close() + + buf := bufio.NewReader(file) + l, _, err := buf.ReadLine() + if err != nil { + return + } + + line := string(l) + var a, b, c int64 + fmt.Sscanf(line, "%d %d %d", &a, &b, &c) + + /* + * We assume we are in the initial user namespace if we have a full + * range - 4294967295 uids starting at uid 0. + */ + if a == 0 && b == 0 && c == 4294967295 { + return + } + inUserNS = true + }) + return inUserNS +} diff --git a/vendor/github.com/containerd/containerd/sys/userns_unsupported.go b/vendor/github.com/containerd/containerd/sys/userns_unsupported.go new file mode 100644 index 00000000000..549b50200c5 --- /dev/null +++ b/vendor/github.com/containerd/containerd/sys/userns_unsupported.go @@ -0,0 +1,25 @@ +// +build !linux + +/* + Copyright The containerd 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 sys + +// RunningInUserNS is a stub for non-Linux systems +// Always returns false +func RunningInUserNS() bool { + return false +} diff --git a/vendor/github.com/containerd/containerd/task.go b/vendor/github.com/containerd/containerd/task.go index fadb2db45b6..ae966ffc4b5 100644 --- a/vendor/github.com/containerd/containerd/task.go +++ b/vendor/github.com/containerd/containerd/task.go @@ -35,6 +35,7 @@ import ( "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" "github.com/containerd/containerd/mount" + "github.com/containerd/containerd/oci" "github.com/containerd/containerd/plugin" "github.com/containerd/containerd/rootfs" "github.com/containerd/containerd/runtime/linux/runctypes" @@ -159,7 +160,7 @@ type Task interface { // Pids returns a list of system specific process ids inside the task Pids(context.Context) ([]ProcessInfo, error) // Checkpoint serializes the runtime and memory information of a task into an - // OCI Index that can be push and pulled from a remote resource. + // OCI Index that can be pushed and pulled from a remote resource. // // Additional software like CRIU maybe required to checkpoint and restore tasks // NOTE: Checkpoint supports to dump task information to a directory, in this way, @@ -175,18 +176,26 @@ type Task interface { // For the built in Linux runtime, github.com/containerd/cgroups.Metrics // are returned in protobuf format Metrics(context.Context) (*types.Metric, error) + // Spec returns the current OCI specification for the task + Spec(context.Context) (*oci.Spec, error) } var _ = (Task)(&task{}) type task struct { client *Client + c Container io cio.IO id string pid uint32 } +// Spec returns the current OCI specification for the task +func (t *task) Spec(ctx context.Context) (*oci.Spec, error) { + return t.c.Spec(ctx) +} + // ID of the task func (t *task) ID() string { return t.id diff --git a/vendor/github.com/containerd/containerd/task_opts_unix.go b/vendor/github.com/containerd/containerd/task_opts_unix.go index 8b498d47efc..a710b358fce 100644 --- a/vendor/github.com/containerd/containerd/task_opts_unix.go +++ b/vendor/github.com/containerd/containerd/task_opts_unix.go @@ -103,3 +103,55 @@ func WithShimCgroup(path string) NewTaskOpts { return nil } } + +// WithUIDOwner allows console I/O to work with the remapped UID in user namespace +func WithUIDOwner(uid uint32) NewTaskOpts { + return func(ctx context.Context, c *Client, ti *TaskInfo) error { + if CheckRuntime(ti.Runtime(), "io.containerd.runc") { + if ti.Options == nil { + ti.Options = &options.Options{} + } + opts, ok := ti.Options.(*options.Options) + if !ok { + return errors.New("invalid v2 shim create options format") + } + opts.IoUid = uid + } else { + if ti.Options == nil { + ti.Options = &runctypes.CreateOptions{} + } + opts, ok := ti.Options.(*runctypes.CreateOptions) + if !ok { + return errors.New("could not cast TaskInfo Options to CreateOptions") + } + opts.IoUid = uid + } + return nil + } +} + +// WithGIDOwner allows console I/O to work with the remapped GID in user namespace +func WithGIDOwner(gid uint32) NewTaskOpts { + return func(ctx context.Context, c *Client, ti *TaskInfo) error { + if CheckRuntime(ti.Runtime(), "io.containerd.runc") { + if ti.Options == nil { + ti.Options = &options.Options{} + } + opts, ok := ti.Options.(*options.Options) + if !ok { + return errors.New("invalid v2 shim create options format") + } + opts.IoGid = gid + } else { + if ti.Options == nil { + ti.Options = &runctypes.CreateOptions{} + } + opts, ok := ti.Options.(*runctypes.CreateOptions) + if !ok { + return errors.New("could not cast TaskInfo Options to CreateOptions") + } + opts.IoGid = gid + } + return nil + } +} diff --git a/vendor/github.com/containerd/containerd/unpacker.go b/vendor/github.com/containerd/containerd/unpacker.go index 6955129c74f..11f7b8ddbc3 100644 --- a/vendor/github.com/containerd/containerd/unpacker.go +++ b/vendor/github.com/containerd/containerd/unpacker.go @@ -18,34 +18,39 @@ package containerd import ( "context" + "encoding/base64" "encoding/json" "fmt" + "math/rand" "sync" "sync/atomic" + "time" "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" "github.com/containerd/containerd/log" - "github.com/containerd/containerd/rootfs" + "github.com/containerd/containerd/mount" + "github.com/containerd/containerd/snapshots" "github.com/opencontainers/go-digest" "github.com/opencontainers/image-spec/identity" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" + "golang.org/x/sync/semaphore" ) -type layerState struct { - layer rootfs.Layer - downloaded bool - unpacked bool -} +const ( + labelSnapshotRef = "containerd.io/snapshot.ref" +) type unpacker struct { updateCh chan ocispec.Descriptor snapshotter string config UnpackConfig c *Client + limiter *semaphore.Weighted } func (c *Client) newUnpacker(ctx context.Context, rCtx *RemoteContext) (*unpacker, error) { @@ -67,7 +72,13 @@ func (c *Client) newUnpacker(ctx context.Context, rCtx *RemoteContext) (*unpacke }, nil } -func (u *unpacker) unpack(ctx context.Context, config ocispec.Descriptor, layers []ocispec.Descriptor) error { +func (u *unpacker) unpack( + ctx context.Context, + rCtx *RemoteContext, + h images.Handler, + config ocispec.Descriptor, + layers []ocispec.Descriptor, +) error { p, err := content.ReadBlob(ctx, u.c.ContentStore(), config) if err != nil { return err @@ -87,85 +98,135 @@ func (u *unpacker) unpack(ctx context.Context, config ocispec.Descriptor, layers a = u.c.DiffService() cs = u.c.ContentStore() - states []layerState - chain []digest.Digest + chain []digest.Digest + + fetchOffset int + fetchC []chan struct{} + fetchErr chan error ) + + // If there is an early return, ensure any ongoing + // fetches get their context cancelled + ctx, cancel := context.WithCancel(ctx) + defer cancel() + +EachLayer: for i, desc := range layers { - states = append(states, layerState{ - layer: rootfs.Layer{ - Blob: desc, - Diff: ocispec.Descriptor{ - MediaType: ocispec.MediaTypeImageLayer, - Digest: diffIDs[i], - }, - }, - }) - } - for { - var layer ocispec.Descriptor - select { - case layer = <-u.updateCh: - case <-ctx.Done(): - return ctx.Err() + parent := identity.ChainID(chain) + chain = append(chain, diffIDs[i]) + + chainID := identity.ChainID(chain).String() + if _, err := sn.Stat(ctx, chainID); err == nil { + // no need to handle + continue + } else if !errdefs.IsNotFound(err) { + return errors.Wrapf(err, "failed to stat snapshot %s", chainID) } - log.G(ctx).WithField("desc", layer).Debug("layer downloaded") - for i := range states { - if states[i].layer.Blob.Digest != layer.Digest { - continue - } - // Different layers may have the same digest. When that - // happens, we should continue marking the next layer - // as downloaded. - if states[i].downloaded { - continue - } - states[i].downloaded = true - break + + // inherits annotations which are provided as snapshot labels. + labels := snapshots.FilterInheritedLabels(desc.Annotations) + if labels == nil { + labels = make(map[string]string) } - for i := range states { - if !states[i].downloaded { + labels[labelSnapshotRef] = chainID + + var ( + key string + mounts []mount.Mount + opts = append(rCtx.SnapshotterOpts, snapshots.WithLabels(labels)) + ) + + for try := 1; try <= 3; try++ { + // Prepare snapshot with from parent, label as root + key = fmt.Sprintf("extract-%s %s", uniquePart(), chainID) + mounts, err = sn.Prepare(ctx, key, parent.String(), opts...) + if err != nil { + if errdefs.IsAlreadyExists(err) { + if _, err := sn.Stat(ctx, chainID); err != nil { + if !errdefs.IsNotFound(err) { + return errors.Wrapf(err, "failed to stat snapshot %s", chainID) + } + // Try again, this should be rare, log it + log.G(ctx).WithField("key", key).WithField("chainid", chainID).Debug("extraction snapshot already exists, chain id not found") + } else { + // no need to handle, snapshot now found with chain id + continue EachLayer + } + } else { + return errors.Wrapf(err, "failed to prepare extraction snapshot %q", key) + } + } else { break } - if states[i].unpacked { - continue + } + if err != nil { + return errors.Wrap(err, "unable to prepare extraction snapshot") + } + + // Abort the snapshot if commit does not happen + abort := func() { + if err := sn.Remove(ctx, key); err != nil { + log.G(ctx).WithError(err).Errorf("failed to cleanup %q", key) + } + } + + if fetchErr == nil { + fetchErr = make(chan error, 1) + fetchOffset = i + fetchC = make([]chan struct{}, len(layers)-fetchOffset) + for i := range fetchC { + fetchC[i] = make(chan struct{}) } - log.G(ctx).WithFields(logrus.Fields{ - "desc": states[i].layer.Blob, - "diff": states[i].layer.Diff, - }).Debug("unpack layer") + go func(i int) { + err := u.fetch(ctx, h, layers[i:], fetchC) + if err != nil { + fetchErr <- err + } + close(fetchErr) + }(i) + } - unpacked, err := rootfs.ApplyLayerWithOpts(ctx, states[i].layer, chain, sn, a, - u.config.SnapshotOpts, u.config.ApplyOpts) + select { + case <-ctx.Done(): + return ctx.Err() + case err := <-fetchErr: if err != nil { return err } + case <-fetchC[i-fetchOffset]: + } - if unpacked { - // Set the uncompressed label after the uncompressed - // digest has been verified through apply. - cinfo := content.Info{ - Digest: states[i].layer.Blob.Digest, - Labels: map[string]string{ - "containerd.io/uncompressed": states[i].layer.Diff.Digest.String(), - }, - } - if _, err := cs.Update(ctx, cinfo, "labels.containerd.io/uncompressed"); err != nil { - return err - } + diff, err := a.Apply(ctx, desc, mounts, u.config.ApplyOpts...) + if err != nil { + abort() + return errors.Wrapf(err, "failed to extract layer %s", diffIDs[i]) + } + if diff.Digest != diffIDs[i] { + abort() + return errors.Errorf("wrong diff id calculated on extraction %q", diffIDs[i]) + } + + if err = sn.Commit(ctx, chainID, key, opts...); err != nil { + abort() + if errdefs.IsAlreadyExists(err) { + continue } + return errors.Wrapf(err, "failed to commit snapshot %s", key) + } - chain = append(chain, states[i].layer.Diff.Digest) - states[i].unpacked = true - log.G(ctx).WithFields(logrus.Fields{ - "desc": states[i].layer.Blob, - "diff": states[i].layer.Diff, - }).Debug("layer unpacked") + // Set the uncompressed label after the uncompressed + // digest has been verified through apply. + cinfo := content.Info{ + Digest: desc.Digest, + Labels: map[string]string{ + "containerd.io/uncompressed": diff.Digest.String(), + }, } - // Check whether all layers are unpacked. - if states[len(states)-1].unpacked { - break + if _, err := cs.Update(ctx, cinfo, "labels.containerd.io/uncompressed"); err != nil { + return err } + } chainID := identity.ChainID(chain).String() @@ -183,40 +244,49 @@ func (u *unpacker) unpack(ctx context.Context, config ocispec.Descriptor, layers "config": config.Digest, "chainID": chainID, }).Debug("image unpacked") + return nil } -type errGroup struct { - *errgroup.Group - cancel context.CancelFunc +func (u *unpacker) fetch(ctx context.Context, h images.Handler, layers []ocispec.Descriptor, done []chan struct{}) error { + eg, ctx2 := errgroup.WithContext(ctx) + for i, desc := range layers { + desc := desc + i := i + + if u.limiter != nil { + if err := u.limiter.Acquire(ctx, 1); err != nil { + return err + } + } + + eg.Go(func() error { + _, err := h.Handle(ctx2, desc) + if u.limiter != nil { + u.limiter.Release(1) + } + if err != nil && !errors.Is(err, images.ErrSkipDesc) { + return err + } + close(done[i]) + + return nil + }) + } + + return eg.Wait() } -func newErrGroup(ctx context.Context) (*errGroup, context.Context) { - ctx, cancel := context.WithCancel(ctx) - eg, ctx := errgroup.WithContext(ctx) - return &errGroup{ - Group: eg, - cancel: cancel, - }, ctx -} - -func (e *errGroup) Cancel() { - e.cancel() -} - -func (e *errGroup) Wait() error { - err := e.Group.Wait() - e.cancel() - return err -} - -func (u *unpacker) handlerWrapper(uctx context.Context, unpacks *int32) (func(images.Handler) images.Handler, *errGroup) { - eg, uctx := newErrGroup(uctx) +func (u *unpacker) handlerWrapper( + uctx context.Context, + rCtx *RemoteContext, + unpacks *int32, +) (func(images.Handler) images.Handler, *errgroup.Group) { + eg, uctx := errgroup.WithContext(uctx) return func(f images.Handler) images.Handler { var ( - lock sync.Mutex - layers []ocispec.Descriptor - schema1 bool + lock sync.Mutex + layers = map[digest.Digest][]ocispec.Descriptor{} ) return images.HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { children, err := f.Handle(ctx, desc) @@ -224,56 +294,48 @@ func (u *unpacker) handlerWrapper(uctx context.Context, unpacks *int32) (func(im return children, err } - // `Pull` only supports one platform, so there is only - // one manifest to handle, and manifest list can be - // safely skipped. - // TODO: support multi-platform unpack. - switch mt := desc.MediaType; { - case mt == images.MediaTypeDockerSchema1Manifest: - lock.Lock() - schema1 = true - lock.Unlock() - case mt == images.MediaTypeDockerSchema2Manifest || mt == ocispec.MediaTypeImageManifest: - lock.Lock() + switch desc.MediaType { + case images.MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest: + var nonLayers []ocispec.Descriptor + var manifestLayers []ocispec.Descriptor + + // Split layers from non-layers, layers will be handled after + // the config for _, child := range children { - if child.MediaType == images.MediaTypeDockerSchema2Config || - child.MediaType == ocispec.MediaTypeImageConfig { - continue + if images.IsLayerType(child.MediaType) { + manifestLayers = append(manifestLayers, child) + } else { + nonLayers = append(nonLayers, child) } - layers = append(layers, child) + } + + lock.Lock() + for _, nl := range nonLayers { + layers[nl.Digest] = manifestLayers } lock.Unlock() - case mt == images.MediaTypeDockerSchema2Config || mt == ocispec.MediaTypeImageConfig: + + children = nonLayers + case images.MediaTypeDockerSchema2Config, ocispec.MediaTypeImageConfig: lock.Lock() - l := append([]ocispec.Descriptor{}, layers...) + l := layers[desc.Digest] lock.Unlock() if len(l) > 0 { atomic.AddInt32(unpacks, 1) eg.Go(func() error { - return u.unpack(uctx, desc, l) + return u.unpack(uctx, rCtx, f, desc, l) }) } - case images.IsLayerType(mt): - lock.Lock() - update := !schema1 - lock.Unlock() - if update { - select { - case <-uctx.Done(): - // Do not send update if unpacker is not running. - default: - select { - case u.updateCh <- desc: - case <-uctx.Done(): - // Do not send update if unpacker is not running. - } - } - // Checking ctx.Done() prevents the case that unpacker - // exits unexpectedly, but update continues to be generated, - // and eventually fills up updateCh and blocks forever. - } } return children, nil }) }, eg } + +func uniquePart() string { + t := time.Now() + var b [3]byte + // Ignore read failures, just decreases uniqueness + rand.Read(b[:]) + return fmt.Sprintf("%d-%s", t.Nanosecond(), base64.URLEncoding.EncodeToString(b[:])) +} diff --git a/vendor/github.com/containerd/containerd/vendor.conf b/vendor/github.com/containerd/containerd/vendor.conf deleted file mode 100644 index 3288f53b105..00000000000 --- a/vendor/github.com/containerd/containerd/vendor.conf +++ /dev/null @@ -1,93 +0,0 @@ -github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9 -github.com/BurntSushi/toml v0.3.1 -github.com/containerd/btrfs af5082808c833de0e79c1e72eea9fea239364877 -github.com/containerd/cgroups 9f1c62dddf4bc7cc72822ebe353bae7006141b1b -github.com/containerd/console v1.0.0 -github.com/containerd/continuity f2a389ac0a02ce21c09edd7344677a601970f41c -github.com/containerd/fifo bda0ff6ed73c67bfb5e62bc9c697f146b7fd7f13 -github.com/containerd/go-runc e029b79d8cda8374981c64eba71f28ec38e5526f -github.com/containerd/ttrpc v1.0.0 -github.com/containerd/typeurl v1.0.0 -github.com/coreos/go-systemd 48702e0da86bd25e76cfef347e2adeb434a0d0a6 -github.com/cpuguy83/go-md2man v1.0.10 -github.com/docker/go-events e31b211e4f1cd09aa76fe4ac244571fab96ae47f -github.com/docker/go-metrics 4ea375f7759c82740c893fc030bc37088d2ec098 -github.com/docker/go-units v0.4.0 -github.com/godbus/dbus v3 -github.com/gogo/googleapis v1.2.0 -github.com/gogo/protobuf v1.2.1 -github.com/golang/protobuf v1.2.0 -github.com/google/go-cmp v0.2.0 -github.com/google/uuid v1.1.1 -github.com/grpc-ecosystem/go-grpc-prometheus 6b7015e65d366bf3f19b2b2a000a831940f0f7e0 -github.com/hashicorp/errwrap v1.0.0 -github.com/hashicorp/go-multierror v1.0.0 -github.com/hashicorp/golang-lru v0.5.3 -github.com/imdario/mergo v0.3.7 -github.com/konsorten/go-windows-terminal-sequences v1.0.1 -github.com/matttproud/golang_protobuf_extensions v1.0.1 -github.com/Microsoft/go-winio v0.4.14 -github.com/Microsoft/hcsshim 9e921883ac929bbe515b39793ece99ce3a9d7706 -github.com/opencontainers/go-digest c9281466c8b2f606084ac71339773efd177436e7 -github.com/opencontainers/image-spec v1.0.1 -github.com/opencontainers/runc v1.0.0-rc10 -github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db -github.com/pkg/errors v0.8.1 -github.com/prometheus/client_golang f4fb1b73fb099f396a7f0036bf86aa8def4ed823 -github.com/prometheus/client_model 99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c -github.com/prometheus/common 89604d197083d4781071d3c65855d24ecfb0a563 -github.com/prometheus/procfs cb4147076ac75738c9a7d279075a253c0cc5acbd -github.com/russross/blackfriday v1.5.2 -github.com/sirupsen/logrus v1.4.1 -github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2 -github.com/urfave/cli v1.22.0 -go.etcd.io/bbolt v1.3.3 -go.opencensus.io v0.22.0 -golang.org/x/net f3200d17e092c607f615320ecaad13d87ad9a2b3 -golang.org/x/sync 42b317875d0fa942474b76e1b46a6060d720ae6e -golang.org/x/sys 9eafafc0a87e0fd0aeeba439a4573537970c44c7 -golang.org/x/text 19e51611da83d6be54ddafce4a4af510cb3e9ea4 -google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944 -google.golang.org/grpc v1.23.0 -gotest.tools v2.3.0 - -# cri dependencies -github.com/containerd/cri f864905c93b97db15503c217dc9a43eb65670b53 # release/1.3 branch -github.com/davecgh/go-spew v1.1.1 -github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580 -github.com/docker/docker 86f080cff0914e9694068ed78d503701667c4c00 -github.com/docker/spdystream 449fdfce4d962303d702fec724ef0ad181c92528 -github.com/emicklei/go-restful v2.9.5 -github.com/google/gofuzz v1.0.0 -github.com/json-iterator/go v1.1.8 -github.com/modern-go/concurrent 1.0.3 -github.com/modern-go/reflect2 1.0.1 -github.com/opencontainers/selinux 5215b1806f52b1fcc2070a8826c542c9d33cd3cf -github.com/seccomp/libseccomp-golang v0.9.1 -github.com/tchap/go-patricia v2.2.6 -golang.org/x/crypto 69ecbb4d6d5dab05e49161c6e77ea40a030884e1 -golang.org/x/oauth2 0f29369cfe4552d0e4bcddc57cc75f4d7e672a33 -golang.org/x/time 9d24e82272b4f38b78bc8cff74fa936d31ccd8ef -gopkg.in/inf.v0 v0.9.1 -gopkg.in/yaml.v2 v2.2.8 -k8s.io/api v0.16.6 -k8s.io/apimachinery v0.16.6 -k8s.io/apiserver v0.16.6 -k8s.io/client-go v0.16.6 -k8s.io/cri-api v0.16.6 -k8s.io/klog v1.0.0 -k8s.io/kubernetes v1.16.6 -k8s.io/utils e782cd3c129fc98ee807f3c889c0f26eb7c9daf5 -sigs.k8s.io/yaml v1.1.0 - -# cni dependencies -github.com/containerd/go-cni 49fbd9b210f3c8ee3b7fd3cd797aabaf364627c1 -github.com/containernetworking/cni v0.7.1 -github.com/containernetworking/plugins v0.7.6 - -# zfs dependencies -github.com/containerd/zfs 2ceb2dbb8154202ed1b8fd32e4ea25b491d7b251 -github.com/mistifyio/go-zfs f784269be439d704d3dfa1906f45dd848fed2beb - -# aufs dependencies -github.com/containerd/aufs f894a800659b6e11c1a13084abd1712f346e349c diff --git a/vendor/github.com/containerd/containerd/version/version.go b/vendor/github.com/containerd/containerd/version/version.go index 687978b2498..3eb8c902bf4 100644 --- a/vendor/github.com/containerd/containerd/version/version.go +++ b/vendor/github.com/containerd/containerd/version/version.go @@ -16,14 +16,19 @@ package version +import "runtime" + var ( // Package is filled at linking time Package = "github.com/containerd/containerd" // Version holds the complete version number. Filled in at linking time. - Version = "1.3.6+unknown" + Version = "1.4.0+unknown" // Revision is filled with the VCS (e.g. git) revision being used to build // the program at linking time. Revision = "" + + // GoVersion is Go tree's version. + GoVersion = runtime.Version() ) diff --git a/vendor/github.com/containerd/cri/.appveyor.yml b/vendor/github.com/containerd/cri/.appveyor.yml new file mode 100644 index 00000000000..4912045ffad --- /dev/null +++ b/vendor/github.com/containerd/cri/.appveyor.yml @@ -0,0 +1,30 @@ +version: "{build}" + +image: Visual Studio 2019 + +clone_folder: c:\gopath\src\github.com\containerd\cri + +environment: + GOPATH: C:\gopath + PATH: C:\go\bin;C:\tools\mingw64\bin;$(PATH) + CGO_ENABLED: 1 + GO111MODULE: off + matrix: + - GO_VERSION: 1.13.15 + +install: + # Install Mingw + - choco install -y mingw --version 5.3.0 + # Install Go + - rd C:\Go /s /q + - appveyor DownloadFile https://storage.googleapis.com/golang/go%GO_VERSION%.windows-amd64.zip + - 7z x go%GO_VERSION%.windows-amd64.zip -oC:\ >nul + - go version + # Print powershell version + - ps: $psversiontable + +build_script: + - bash.exe -elc "mingw32-make.exe" + +test_script: + - bash.exe -elc "mingw32-make.exe test" diff --git a/vendor/github.com/containerd/cri/.golangci.yml b/vendor/github.com/containerd/cri/.golangci.yml new file mode 100644 index 00000000000..38aee5a42e5 --- /dev/null +++ b/vendor/github.com/containerd/cri/.golangci.yml @@ -0,0 +1,23 @@ +linters: + enable: + - structcheck + - varcheck + - staticcheck + - unconvert + - gofmt + - goimports + - golint + - ineffassign + - vet + - unused + - misspell + disable: + - errcheck + +run: + deadline: 2m + skip-dirs: + - integration + - pkg/api + skip-files: + - ".*_test.go" diff --git a/vendor/github.com/containerd/cri/.travis.yml b/vendor/github.com/containerd/cri/.travis.yml deleted file mode 100644 index 90ac1745e5a..00000000000 --- a/vendor/github.com/containerd/cri/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -git: - depth: 150 - -language: go -go: - - 1.12.x - - tip - - -matrix: - allow_failures: - - go: tip - -sudo: required - -services: - - docker - -cache: - directories: - - "${HOME}/google-cloud-sdk/" - -before_install: - - sudo apt-get update - # Enable ipv6 for dualstack integration test. - - sudo sysctl net.ipv6.conf.all.disable_ipv6=0 - -install: - - sudo apt-get install btrfs-tools - - sudo apt-get install libseccomp2 - - sudo apt-get install libseccomp-dev - - sudo apt-get install socat - -before_script: - - export PATH=$HOME/gopath/bin:$PATH - -script: - - make .install.gitvalidation - - make .gitvalidation - - make binaries - - make install.deps - - make containerd - - sudo PATH=$PATH GOPATH=$GOPATH make install-containerd - - make test - - make test-integration - - make test-cri -after_script: - # Abuse travis to preserve the log. - - cat /tmp/test-integration/containerd.log - - cat /tmp/test-cri/containerd.log diff --git a/vendor/github.com/containerd/cri/CONTRIBUTING.md b/vendor/github.com/containerd/cri/CONTRIBUTING.md deleted file mode 100644 index a6f2458e55f..00000000000 --- a/vendor/github.com/containerd/cri/CONTRIBUTING.md +++ /dev/null @@ -1,118 +0,0 @@ -# Contributing - -Contributions should be made via pull requests. Pull requests will be reviewed -by one or more maintainers and merged when acceptable. - -This project is in an early state, making the impact of contributions much -greater than at other stages. In this respect, it is important to consider any -changes or additions for their future impact more so than their current impact. - -## Successful Changes - -We ask that before contributing, please make the effort to coordinate with the -maintainers of the project before submitting large or high impact PRs. This -will prevent you from doing extra work that may or may not be merged. - -PRs that are just submitted without any prior communication will likely be -summarily closed. - -While pull requests are the methodology for submitting changes to code, changes -are much more likely to be accepted if they are accompanied by additional -engineering work. While we don't define this explicitly, most of these goals -are accomplished through communication of the design goals and subsequent -solutions. Often times, it helps to first state the problem before presenting -solutions. - -Typically, the best methods of accomplishing this are to submit an issue, -stating the problem. This issue can include a problem statement and a -checklist with requirements. If solutions are proposed, alternatives should be -listed and eliminated. Even if the criteria for elimination of a solution is -frivolous, say so. - -Larger changes typically work best with design documents, similar to those found -in `design/`. These are focused on providing context to the design at the time -the feature was conceived and can inform future documentation contributions. - -Make sure that new tests are added for bugs in order to catch regressions and tests -with new features to exercise the new functionality that is added. - -## Commit Messages - -There are times for one line commit messages and this is not one of them. -Commit messages should follow best practices, including explaining the context -of the problem and how it was solved, including in caveats or follow up changes -required. They should tell the story of the change and provide readers -understanding of what led to it. - -If you're lost about what this even means, please see [How to Write a Git -Commit Message](http://chris.beams.io/posts/git-commit/) for a start. - -In practice, the best approach to maintaining a nice commit message is to -leverage a `git add -p` and `git commit --amend` to formulate a solid -changeset. This allows one to piece together a change, as information becomes -available. - -If you squash a series of commits, don't just submit that. Re-write the commit -message, as if the series of commits was a single stroke of brilliance. - -That said, there is no requirement to have a single commit for a PR, as long as -each commit tells the story. For example, if there is a feature that requires a -package, it might make sense to have the package in a separate commit then have -a subsequent commit that uses it. - -Remember, you're telling part of the story with the commit message. Don't make -your chapter weird. - -## Sign your work - -The sign-off is a simple line at the end of the explanation for the patch. Your -signature certifies that you wrote the patch or otherwise have the right to pass -it on as an open-source patch. The rules are pretty simple: if you can certify -the below (from [developercertificate.org](http://developercertificate.org/)): - -``` -Developer Certificate of Origin -Version 1.1 - -Copyright (C) 2004, 2006 The Linux Foundation and its contributors. -660 York Street, Suite 102, -San Francisco, CA 94110 USA - -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. - -Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -(a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -(b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -(c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -(d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. -``` - -Then you just add a line to every git commit message: - - Signed-off-by: Joe Smith - -Use your real name (sorry, no pseudonyms or anonymous contributions.) - -If you set your `user.name` and `user.email` git configs, you can sign your -commit automatically with `git commit -s`. diff --git a/vendor/github.com/containerd/cri/Makefile b/vendor/github.com/containerd/cri/Makefile index 1be851f4048..eea9d42539e 100644 --- a/vendor/github.com/containerd/cri/Makefile +++ b/vendor/github.com/containerd/cri/Makefile @@ -31,7 +31,7 @@ VERSION := $(shell git rev-parse --short HEAD) TARBALL_PREFIX := cri-containerd TARBALL := $(TARBALL_PREFIX)-$(VERSION).$(GOOS)-$(GOARCH).tar.gz ifneq ($(GOOS),windows) - BUILD_TAGS := seccomp apparmor selinux no_btrfs + BUILD_TAGS := seccomp apparmor selinux endif export BUILDTAGS := $(BUILD_TAGS) # Add `-TEST` suffix to indicate that all binaries built from this repo are for test. diff --git a/vendor/github.com/containerd/cri/OWNERS b/vendor/github.com/containerd/cri/OWNERS index a59152dbee4..7e07404199d 100644 --- a/vendor/github.com/containerd/cri/OWNERS +++ b/vendor/github.com/containerd/cri/OWNERS @@ -1,3 +1,8 @@ +# cri approvers and reviewers +# +# As a containerd sub-project, containerd maintainers are also included from https://github.com/containerd/project/blob/master/MAINTAINERS. +# See https://github.com/containerd/project/blob/master/GOVERNANCE.md for description of maintainer role +# approvers: - Random-Liu - mikebrow diff --git a/vendor/github.com/containerd/cri/README.md b/vendor/github.com/containerd/cri/README.md index 67d16536f6d..45adba23d88 100644 --- a/vendor/github.com/containerd/cri/README.md +++ b/vendor/github.com/containerd/cri/README.md @@ -25,9 +25,9 @@ With it, you could run Kubernetes using containerd as the container runtime. `cri` is in GA: * It is feature complete. * It (the GA version) works with Kubernetes 1.10 and above. -* It has passed all [CRI validation tests](https://github.com/kubernetes/community/blob/master/contributors/devel/cri-validation.md). -* It has passed all [node e2e tests](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-node-tests.md). -* It has passed all [e2e tests](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md). +* It has passed all [CRI validation tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/cri-validation.md). +* It has passed all [node e2e tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/e2e-node-tests.md). +* It has passed all [e2e tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/e2e-tests.md). See [test dashboard](https://k8s-testgrid.appspot.com/sig-node-containerd) ## Support Metrics @@ -35,22 +35,20 @@ See [test dashboard](https://k8s-testgrid.appspot.com/sig-node-containerd) |:----------------------:|:------------------:|:------------------:|:-----------:| | v1.0.0-alpha.x | | 1.7, 1.8 | v1alpha1 | | v1.0.0-beta.x | | 1.9 | v1alpha1 | -| End-Of-Life | v1.1 | 1.10+ | v1alpha2 | -| | v1.2 | 1.10+ | v1alpha2 | -| | HEAD | 1.10+ | v1alpha2 | +| End-Of-Life | v1.1 (End-Of-Life) | 1.10+ | v1alpha2 | +| | v1.2 (Extended) | 1.10+ | v1alpha2 | +| | v1.3 | 1.12+ | v1alpha2 | +| | v1.4 | 1.19+ (rc) | v1alpha2 | **Note:** The support table above specifies the Kubernetes Version that was supported at time of release of the containerd - cri integration. -The following is the current support table for containerd CRI integration taking into account that Kubernetes only supports n-3 minor release versions and 1.10 and 1.11 are now end-of-life. +The following is the current support table for containerd CRI integration taking into account that Kubernetes only supports n-3 minor release versions. | Containerd Version | Kubernetes Version | CRI Version | |:------------------:|:------------------:|:-----------:| -| v1.1 | 1.12+ | v1alpha2 | -| v1.2 | 1.12+ | v1alpha2 | -| HEAD | 1.12+ | v1alpha2 | - -***Although not recommended, if you still plan to use containerd 1.2+ with Kubernetes -<=1.11, please be sure to set `disable_proc_mount=true`.*** +| v1.2 | 1.15+ | v1alpha2 | +| v1.3 | 1.15+ | v1alpha2 | +| v1.4 | 1.19+ (rc) | v1alpha2 | ## Production Quality Cluster on GCE For a production quality cluster on GCE brought up with `kube-up.sh` refer [here](docs/kube-up.md). @@ -81,10 +79,10 @@ specifications as appropriate. (Fedora, CentOS, RHEL). On releases of Ubuntu <=Trusty and Debian <=jessie a backport version of `libseccomp-dev` is required. See [travis.yml](.travis.yml) for an example on trusty. * **btrfs development library.** Required by containerd btrfs support. `btrfs-tools`(Ubuntu, Debian) / `btrfs-progs-devel`(Fedora, CentOS, RHEL) -2. Install **`socat`** (required by portforward). -2. Install and setup a go 1.10 development environment. -3. Make a local clone of this repository. -4. Install binary dependencies by running the following command from your cloned `cri/` project directory: +2. Install **`pkg-config`** (required for linking with `libseccomp`). +3. Install and setup a Go 1.13.15 development environment. +4. Make a local clone of this repository. +5. Install binary dependencies by running the following command from your cloned `cri/` project directory: ```bash # Note: install.deps installs the above mentioned runc, containerd, and CNI # binary dependencies. install.deps is only provided for general use and ease of @@ -106,7 +104,7 @@ testing purposes. The version tag carries the suffix "-TEST".* To add build tags to the make option the `BUILD_TAGS` variable must be set. ```bash -make BUILD_TAGS='seccomp apparmor' +make BUILD_TAGS='seccomp apparmor selinux' ``` | Build Tag | Feature | Dependency | @@ -118,7 +116,7 @@ make BUILD_TAGS='seccomp apparmor' A Kubernetes incubator project called [cri-tools](https://github.com/kubernetes-sigs/cri-tools) includes programs for exercising CRI implementations such as the `cri` plugin. More importantly, cri-tools includes the program `critest` which is used for running -[CRI Validation Testing](https://github.com/kubernetes/community/blob/master/contributors/devel/cri-validation.md). +[CRI Validation Testing](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/cri-validation.md). Run the CRI Validation test to validate your installation of `containerd` with `cri` built in: ```bash @@ -144,18 +142,11 @@ See [here](./docs/crictl.md) for information about using `crictl` to debug pods, containers, and images. ## Configurations See [here](./docs/config.md) for information about how to configure cri plugins -and [here](https://github.com/containerd/containerd/blob/master/docs/man/containerd-config.1.md) +and [here](https://github.com/containerd/containerd/blob/master/docs/man/containerd-config.8.md) for information about how to configure containerd ## Documentation See [here](./docs) for additional documentation. -## Contributing -Interested in contributing? Check out the [documentation](./CONTRIBUTING.md). - ## Communication -This project was originally established in April of 2017 in the Kubernetes -Incubator program. After reaching the Beta stage, In January of 2018, the -project was merged into [containerd](https://github.com/containerd/containerd). - For async communication and long running discussions please use issues and pull requests on this github repo. This will be the best place to discuss design and implementation. @@ -187,5 +178,13 @@ Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file "[LICENSE.docs](https://github.com/containerd/containerd/blob/master/LICENSE.docs)". You may obtain a duplicate copy of the same license, titled CC-BY-4.0, at http://creativecommons.org/licenses/by/4.0/. -## Code of Conduct -This project follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). +## Project details +cri is a containerd sub-project. This project was originally established in +April of 2017 in the Kubernetes Incubator program. After reaching the Beta +stage, In January of 2018, the project was merged into [containerd](https://github.com/containerd/containerd). +As a containerd sub-project, you will find the: +* [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md), +* [Maintainers](https://github.com/containerd/project/blob/master/MAINTAINERS), +* and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md) + +information in our [`containerd/project`](https://github.com/containerd/project) repository. diff --git a/vendor/github.com/containerd/cri/cri.go b/vendor/github.com/containerd/cri/cri.go index a74413ea651..7d9cc5fc7c8 100644 --- a/vendor/github.com/containerd/cri/cri.go +++ b/vendor/github.com/containerd/cri/cri.go @@ -1,17 +1,17 @@ /* -Copyright 2018 The containerd Authors. + Copyright The containerd 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 + 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 + 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. + 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 cri @@ -24,6 +24,7 @@ import ( "github.com/containerd/containerd/api/services/containers/v1" "github.com/containerd/containerd/api/services/diff/v1" "github.com/containerd/containerd/api/services/images/v1" + introspectionapi "github.com/containerd/containerd/api/services/introspection/v1" "github.com/containerd/containerd/api/services/namespaces/v1" "github.com/containerd/containerd/api/services/tasks/v1" "github.com/containerd/containerd/content" @@ -36,10 +37,11 @@ import ( imagespec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "k8s.io/klog" + "k8s.io/klog/v2" criconfig "github.com/containerd/cri/pkg/config" "github.com/containerd/cri/pkg/constants" + criplatforms "github.com/containerd/cri/pkg/containerd/platforms" "github.com/containerd/cri/pkg/server" ) @@ -89,6 +91,7 @@ func initCRIService(ic *plugin.InitContext) (interface{}, error) { client, err := containerd.New( "", containerd.WithDefaultNamespace(constants.K8sContainerdNamespace), + containerd.WithDefaultPlatform(criplatforms.Default()), containerd.WithServices(servicesOpts...), ) if err != nil { @@ -144,6 +147,9 @@ func getServicesOpts(ic *plugin.InitContext) ([]containerd.ServicesOpt, error) { services.LeasesService: func(s interface{}) containerd.ServicesOpt { return containerd.WithLeasesService(s.(leases.Manager)) }, + services.IntrospectionService: func(s interface{}) containerd.ServicesOpt { + return containerd.WithIntrospectionService(s.(introspectionapi.IntrospectionClient)) + }, } { p := plugins[s] if p == nil { @@ -170,7 +176,7 @@ func setGLogLevel() error { return err } switch l { - case log.TraceLevel: + case logrus.TraceLevel: return fs.Set("v", "5") case logrus.DebugLevel: return fs.Set("v", "4") diff --git a/vendor/github.com/containerd/cri/pkg/annotations/annotations.go b/vendor/github.com/containerd/cri/pkg/annotations/annotations.go index 2178df138de..122c4c48975 100644 --- a/vendor/github.com/containerd/cri/pkg/annotations/annotations.go +++ b/vendor/github.com/containerd/cri/pkg/annotations/annotations.go @@ -1,17 +1,17 @@ /* -Copyright 2018 The Containerd Authors. + Copyright The containerd 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 + 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 + 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. + 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 annotations @@ -44,4 +44,7 @@ const ( // UntrustedWorkload is the sandbox annotation for untrusted workload. Untrusted // workload can only run on dedicated runtime for untrusted workload. UntrustedWorkload = "io.kubernetes.cri.untrusted-workload" + + // containerName is the name of the container in the pod + ContainerName = "io.kubernetes.cri.container-name" ) diff --git a/vendor/github.com/containerd/cri/pkg/api/runtimeoptions/v1/api.pb.go b/vendor/github.com/containerd/cri/pkg/api/runtimeoptions/v1/api.pb.go index 71341ec78da..bf0cf3d41be 100644 --- a/vendor/github.com/containerd/cri/pkg/api/runtimeoptions/v1/api.pb.go +++ b/vendor/github.com/containerd/cri/pkg/api/runtimeoptions/v1/api.pb.go @@ -1,17 +1,17 @@ /* -Copyright 2019 The containerd Authors. + Copyright The containerd 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 + 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 + 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. + 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. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: api.proto diff --git a/vendor/github.com/containerd/cri/pkg/atomic/atomic_boolean.go b/vendor/github.com/containerd/cri/pkg/atomic/atomic_boolean.go index 5efc188b062..507e063dc78 100644 --- a/vendor/github.com/containerd/cri/pkg/atomic/atomic_boolean.go +++ b/vendor/github.com/containerd/cri/pkg/atomic/atomic_boolean.go @@ -1,17 +1,17 @@ /* -Copyright 2018 The Containerd Authors. + Copyright The containerd 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 + 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 + 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. + 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 atomic diff --git a/vendor/github.com/containerd/cri/pkg/config/config.go b/vendor/github.com/containerd/cri/pkg/config/config.go index 7c5f9ebea1e..a0c86fa76c7 100644 --- a/vendor/github.com/containerd/cri/pkg/config/config.go +++ b/vendor/github.com/containerd/cri/pkg/config/config.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 config @@ -21,11 +21,9 @@ import ( "time" "github.com/BurntSushi/toml" - "github.com/containerd/containerd" "github.com/containerd/containerd/log" "github.com/containerd/containerd/plugin" "github.com/pkg/errors" - "k8s.io/kubernetes/pkg/kubelet/server/streaming" ) // Runtime struct to contain the type(ID), engine, and root variables for a default runtime @@ -40,6 +38,10 @@ type Runtime struct { // PodAnnotations is a list of pod annotations passed to both pod sandbox as well as // container OCI annotations. PodAnnotations []string `toml:"pod_annotations" json:"PodAnnotations"` + // ContainerAnnotations is a list of container annotations passed through to the OCI config of the containers. + // Container annotations in CRI are usually generated by other Kubernetes node components (i.e., not users). + // Currently, only device plugins populate the annotations. + ContainerAnnotations []string `toml:"container_annotations" json:"ContainerAnnotations"` // Root is the directory used by containerd for runtime state. // DEPRECATED: use Options instead. Remove when shim v1 is deprecated. // This only works for runtime type "io.containerd.runtime.v1.linux". @@ -50,6 +52,8 @@ type Runtime struct { // PrivilegedWithoutHostDevices overloads the default behaviour for adding host devices to the // runtime spec when the container is privileged. Defaults to false. PrivilegedWithoutHostDevices bool `toml:"privileged_without_host_devices" json:"privileged_without_host_devices"` + // BaseRuntimeSpec is a json file with OCI spec to use as base spec that all container's will be created from. + BaseRuntimeSpec string `toml:"base_runtime_spec" json:"baseRuntimeSpec"` } // ContainerdConfig contains toml config related to containerd @@ -71,6 +75,16 @@ type ContainerdConfig struct { // NoPivot disables pivot-root (linux only), required when running a container in a RamDisk with runc // This only works for runtime type "io.containerd.runtime.v1.linux". NoPivot bool `toml:"no_pivot" json:"noPivot"` + + // DisableSnapshotAnnotations disables to pass additional annotations (image + // related information) to snapshotters. These annotations are required by + // stargz snapshotter (https://github.com/containerd/stargz-snapshotter). + DisableSnapshotAnnotations bool `toml:"disable_snapshot_annotations" json:"disableSnapshotAnnotations"` + + // DiscardUnpackedLayers is a boolean flag to specify whether to allow GC to + // remove layers from the content store after successfully unpacking these + // layers to the snapshotter. + DiscardUnpackedLayers bool `toml:"discard_unpacked_layers" json:"discardUnpackedLayers"` } // CniConfig contains toml config related to cni @@ -133,13 +147,15 @@ type Registry struct { // Mirrors are namespace to mirror mapping for all namespaces. Mirrors map[string]Mirror `toml:"mirrors" json:"mirrors"` // Configs are configs for each registry. - // The key is the FDQN or IP of the registry. + // The key is the domain name or IP of the registry. Configs map[string]RegistryConfig `toml:"configs" json:"configs"` // Auths are registry endpoint to auth config mapping. The registry endpoint must // be a valid url with host specified. // DEPRECATED: Use Configs instead. Remove in containerd 1.4. Auths map[string]AuthConfig `toml:"auths" json:"auths"` + // Headers adds additional HTTP headers that get sent to all registries + Headers map[string][]string `toml:"headers" json:"headers"` } // RegistryConfig contains configuration used to communicate with the registry. @@ -151,6 +167,18 @@ type RegistryConfig struct { TLS *TLSConfig `toml:"tls" json:"tls"` } +// ImageDecryption contains configuration to handling decryption of encrypted container images. +type ImageDecryption struct { + // KeyModel specifies the trust model of where keys should reside. + // + // Details of field usage can be found in: + // https://github.com/containerd/cri/tree/master/docs/config.md + // + // Details of key models can be found in: + // https://github.com/containerd/cri/tree/master/docs/decryption.md + KeyModel string `toml:"key_model" json:"keyModel"` +} + // PluginConfig contains toml config related to CRI plugin, // it is a subset of Config. type PluginConfig struct { @@ -160,6 +188,8 @@ type PluginConfig struct { CniConfig `toml:"cni" json:"cni"` // Registry contains config related to the registry Registry Registry `toml:"registry" json:"registry"` + // ImageDecryption contains config related to handling decryption of encrypted container images + ImageDecryption `toml:"image_decryption" json:"imageDecryption"` // DisableTCPService disables serving CRI on the TCP server. DisableTCPService bool `toml:"disable_tcp_service" json:"disableTCPService"` // StreamServerAddress is the ip address streaming server is listening on. @@ -173,6 +203,9 @@ type PluginConfig struct { StreamIdleTimeout string `toml:"stream_idle_timeout" json:"streamIdleTimeout"` // EnableSelinux indicates to enable the selinux support. EnableSelinux bool `toml:"enable_selinux" json:"enableSelinux"` + // SelinuxCategoryRange allows the upper bound on the category range to be set. + // If not specified or set to 0, defaults to 1024 from the selinux package. + SelinuxCategoryRange int `toml:"selinux_category_range" json:"selinuxCategoryRange"` // SandboxImage is the image used by sandbox container. SandboxImage string `toml:"sandbox_image" json:"sandboxImage"` // StatsCollectPeriod is the period (in seconds) of snapshots stats collection. @@ -204,6 +237,21 @@ type PluginConfig struct { // DisableProcMount disables Kubernetes ProcMount support. This MUST be set to `true` // when using containerd with Kubernetes <=1.11. DisableProcMount bool `toml:"disable_proc_mount" json:"disableProcMount"` + // UnsetSeccompProfile is the profile containerd/cri will use If the provided seccomp profile is + // unset (`""`) for a container (default is `unconfined`) + UnsetSeccompProfile string `toml:"unset_seccomp_profile" json:"unsetSeccompProfile"` + // TolerateMissingHugetlbController if set to false will error out on create/update + // container requests with huge page limits if the cgroup controller for hugepages is not present. + // This helps with supporting Kubernetes <=1.18 out of the box. (default is `true`) + TolerateMissingHugetlbController bool `toml:"tolerate_missing_hugetlb_controller" json:"tolerateMissingHugetlbController"` + // DisableHugetlbController indicates to silently disable the hugetlb controller, even when it is + // present in /sys/fs/cgroup/cgroup.controllers. + // This helps with running rootless mode + cgroup v2 + systemd but without hugetlb delegation. + DisableHugetlbController bool `toml:"disable_hugetlb_controller" json:"disableHugetlbController"` + // IgnoreImageDefinedVolumes ignores volumes defined by the image. Useful for better resource + // isolation, security and early detection of issues in the mount configuration when using + // ReadOnlyRootFilesystem since containers won't silently mount a temporary volume. + IgnoreImageDefinedVolumes bool `toml:"ignore_image_defined_volumes" json:"ignoreImageDefinedVolumes"` } // X509KeyPairStreaming contains the x509 configuration for streaming @@ -229,56 +277,14 @@ type Config struct { StateDir string `json:"stateDir"` } -// DefaultConfig returns default configurations of cri plugin. -func DefaultConfig() PluginConfig { - return PluginConfig{ - CniConfig: CniConfig{ - NetworkPluginBinDir: "/opt/cni/bin", - NetworkPluginConfDir: "/etc/cni/net.d", - NetworkPluginMaxConfNum: 1, // only one CNI plugin config file will be loaded - NetworkPluginConfTemplate: "", - }, - ContainerdConfig: ContainerdConfig{ - Snapshotter: containerd.DefaultSnapshotter, - DefaultRuntimeName: "runc", - NoPivot: false, - Runtimes: map[string]Runtime{ - "runc": { - Type: "io.containerd.runc.v1", - }, - }, - }, - DisableTCPService: true, - StreamServerAddress: "127.0.0.1", - StreamServerPort: "0", - StreamIdleTimeout: streaming.DefaultConfig.StreamIdleTimeout.String(), // 4 hour - EnableSelinux: false, - EnableTLSStreaming: false, - X509KeyPairStreaming: X509KeyPairStreaming{ - TLSKeyFile: "", - TLSCertFile: "", - }, - SandboxImage: "k8s.gcr.io/pause:3.1", - StatsCollectPeriod: 10, - SystemdCgroup: false, - MaxContainerLogLineSize: 16 * 1024, - Registry: Registry{ - Mirrors: map[string]Mirror{ - "docker.io": { - Endpoints: []string{"https://registry-1.docker.io"}, - }, - }, - }, - MaxConcurrentDownloads: 3, - DisableProcMount: false, - } -} - const ( // RuntimeUntrusted is the implicit runtime defined for ContainerdConfig.UntrustedWorkloadRuntime RuntimeUntrusted = "untrusted" // RuntimeDefault is the implicit runtime defined for ContainerdConfig.DefaultRuntime RuntimeDefault = "default" + // KeyModelNode is the key model where key for encrypted images reside + // on the worker nodes + KeyModelNode = "node" ) // ValidatePluginConfig validates the given plugin configuration. diff --git a/vendor/github.com/containerd/cri/pkg/config/config_unix.go b/vendor/github.com/containerd/cri/pkg/config/config_unix.go new file mode 100644 index 00000000000..9df456b53a8 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/config/config_unix.go @@ -0,0 +1,75 @@ +// +build !windows + +/* + Copyright The containerd 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 config + +import ( + "github.com/BurntSushi/toml" + "github.com/containerd/containerd" + "github.com/containerd/cri/pkg/streaming" +) + +// DefaultConfig returns default configurations of cri plugin. +func DefaultConfig() PluginConfig { + return PluginConfig{ + CniConfig: CniConfig{ + NetworkPluginBinDir: "/opt/cni/bin", + NetworkPluginConfDir: "/etc/cni/net.d", + NetworkPluginMaxConfNum: 1, // only one CNI plugin config file will be loaded + NetworkPluginConfTemplate: "", + }, + ContainerdConfig: ContainerdConfig{ + Snapshotter: containerd.DefaultSnapshotter, + DefaultRuntimeName: "runc", + NoPivot: false, + Runtimes: map[string]Runtime{ + "runc": { + Type: "io.containerd.runc.v2", + Options: new(toml.Primitive), + }, + }, + }, + DisableTCPService: true, + StreamServerAddress: "127.0.0.1", + StreamServerPort: "0", + StreamIdleTimeout: streaming.DefaultConfig.StreamIdleTimeout.String(), // 4 hour + EnableSelinux: false, + SelinuxCategoryRange: 1024, + EnableTLSStreaming: false, + X509KeyPairStreaming: X509KeyPairStreaming{ + TLSKeyFile: "", + TLSCertFile: "", + }, + SandboxImage: "k8s.gcr.io/pause:3.2", + StatsCollectPeriod: 10, + SystemdCgroup: false, + MaxContainerLogLineSize: 16 * 1024, + Registry: Registry{ + Mirrors: map[string]Mirror{ + "docker.io": { + Endpoints: []string{"https://registry-1.docker.io"}, + }, + }, + }, + MaxConcurrentDownloads: 3, + DisableProcMount: false, + TolerateMissingHugetlbController: true, + DisableHugetlbController: true, + IgnoreImageDefinedVolumes: false, + } +} diff --git a/vendor/github.com/containerd/cri/pkg/config/config_windows.go b/vendor/github.com/containerd/cri/pkg/config/config_windows.go new file mode 100644 index 00000000000..d559b416076 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/config/config_windows.go @@ -0,0 +1,71 @@ +// +build windows + +/* + Copyright The containerd 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 config + +import ( + "os" + "path/filepath" + + "github.com/containerd/containerd" + "github.com/containerd/cri/pkg/streaming" +) + +// DefaultConfig returns default configurations of cri plugin. +func DefaultConfig() PluginConfig { + return PluginConfig{ + CniConfig: CniConfig{ + NetworkPluginBinDir: filepath.Join(os.Getenv("ProgramFiles"), "containerd", "cni", "bin"), + NetworkPluginConfDir: filepath.Join(os.Getenv("ProgramFiles"), "containerd", "cni", "conf"), + NetworkPluginMaxConfNum: 1, + NetworkPluginConfTemplate: "", + }, + ContainerdConfig: ContainerdConfig{ + Snapshotter: containerd.DefaultSnapshotter, + DefaultRuntimeName: "runhcs-wcow-process", + NoPivot: false, + Runtimes: map[string]Runtime{ + "runhcs-wcow-process": { + Type: "io.containerd.runhcs.v1", + }, + }, + }, + DisableTCPService: true, + StreamServerAddress: "127.0.0.1", + StreamServerPort: "0", + StreamIdleTimeout: streaming.DefaultConfig.StreamIdleTimeout.String(), // 4 hour + EnableTLSStreaming: false, + X509KeyPairStreaming: X509KeyPairStreaming{ + TLSKeyFile: "", + TLSCertFile: "", + }, + SandboxImage: "mcr.microsoft.com/oss/kubernetes/pause:1.4.0", + StatsCollectPeriod: 10, + MaxContainerLogLineSize: 16 * 1024, + Registry: Registry{ + Mirrors: map[string]Mirror{ + "docker.io": { + Endpoints: []string{"https://registry-1.docker.io"}, + }, + }, + }, + MaxConcurrentDownloads: 3, + IgnoreImageDefinedVolumes: false, + // TODO(windows): Add platform specific config, so that most common defaults can be shared. + } +} diff --git a/vendor/github.com/containerd/cri/pkg/constants/constants.go b/vendor/github.com/containerd/cri/pkg/constants/constants.go index 7b71b6f9a03..b382215025d 100644 --- a/vendor/github.com/containerd/cri/pkg/constants/constants.go +++ b/vendor/github.com/containerd/cri/pkg/constants/constants.go @@ -1,17 +1,17 @@ /* -Copyright 2018 The Containerd Authors. + Copyright The containerd 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 + 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 + 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. + 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 constants diff --git a/vendor/github.com/containerd/cri/pkg/containerd/opts/container.go b/vendor/github.com/containerd/cri/pkg/containerd/opts/container.go index c705fd4dc84..fe199d5fb5e 100644 --- a/vendor/github.com/containerd/cri/pkg/containerd/opts/container.go +++ b/vendor/github.com/containerd/cri/pkg/containerd/opts/container.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 opts diff --git a/vendor/github.com/containerd/cri/pkg/containerd/opts/spec.go b/vendor/github.com/containerd/cri/pkg/containerd/opts/spec.go index 621e8748182..1afb4fc1a95 100644 --- a/vendor/github.com/containerd/cri/pkg/containerd/opts/spec.go +++ b/vendor/github.com/containerd/cri/pkg/containerd/opts/spec.go @@ -1,116 +1,39 @@ /* -Copyright 2018 The containerd Authors. + Copyright The containerd 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 + 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 + 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. + 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 opts import ( "context" - "fmt" - "io/ioutil" "os" "path/filepath" - "sort" - "strconv" "strings" "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/log" - "github.com/containerd/containerd/mount" "github.com/containerd/containerd/oci" imagespec "github.com/opencontainers/image-spec/specs-go/v1" - "github.com/opencontainers/runc/libcontainer/devices" runtimespec "github.com/opencontainers/runtime-spec/specs-go" - "github.com/opencontainers/selinux/go-selinux/label" "github.com/pkg/errors" - "golang.org/x/sys/unix" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - - osinterface "github.com/containerd/cri/pkg/os" - "github.com/containerd/cri/pkg/util" ) -const ( - // DefaultSandboxCPUshares is default cpu shares for sandbox container. - DefaultSandboxCPUshares = 2 -) - -// WithAdditionalGIDs adds any additional groups listed for a particular user in the -// /etc/groups file of the image's root filesystem to the OCI spec's additionalGids array. -func WithAdditionalGIDs(userstr string) oci.SpecOpts { - return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) (err error) { - if s.Process == nil { - s.Process = &runtimespec.Process{} - } - gids := s.Process.User.AdditionalGids - if err := oci.WithAdditionalGIDs(userstr)(ctx, client, c, s); err != nil { - return err - } - // Merge existing gids and new gids. - s.Process.User.AdditionalGids = mergeGids(s.Process.User.AdditionalGids, gids) - return nil - } -} - -func mergeGids(gids1, gids2 []uint32) []uint32 { - gidsMap := make(map[uint32]struct{}) - for _, gid1 := range gids1 { - gidsMap[gid1] = struct{}{} - } - for _, gid2 := range gids2 { - gidsMap[gid2] = struct{}{} - } - var gids []uint32 - for gid := range gidsMap { - gids = append(gids, gid) - } - sort.Slice(gids, func(i, j int) bool { return gids[i] < gids[j] }) - return gids -} - -// WithoutRunMount removes the `/run` inside the spec -func WithoutRunMount(_ context.Context, _ oci.Client, c *containers.Container, s *runtimespec.Spec) error { - var ( - mounts []runtimespec.Mount - current = s.Mounts - ) - for _, m := range current { - if filepath.Clean(m.Destination) == "/run" { - continue - } - mounts = append(mounts, m) - } - s.Mounts = mounts - return nil -} - -// WithoutDefaultSecuritySettings removes the default security settings generated on a spec -func WithoutDefaultSecuritySettings(_ context.Context, _ oci.Client, c *containers.Container, s *runtimespec.Spec) error { - if s.Process == nil { - s.Process = &runtimespec.Process{} - } - // Make sure no default seccomp/apparmor is specified - s.Process.ApparmorProfile = "" - if s.Linux != nil { - s.Linux.Seccomp = nil - } - // Remove default rlimits (See issue #515) - s.Process.Rlimits = nil - return nil -} +// DefaultSandboxCPUshares is default cpu shares for sandbox container. +// TODO(windows): Revisit cpu shares for windows (https://github.com/containerd/cri/issues/1297) +const DefaultSandboxCPUshares = 2 // WithRelativeRoot sets the root for the container func WithRelativeRoot(root string) oci.SpecOpts { @@ -123,6 +46,12 @@ func WithRelativeRoot(root string) oci.SpecOpts { } } +// WithoutRoot sets the root to nil for the container. +func WithoutRoot(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { + s.Root = nil + return nil +} + // WithProcessArgs sets the process args on the spec based on the image and runtime config func WithProcessArgs(config *runtime.ContainerConfig, image *imagespec.ImageConfig) oci.SpecOpts { return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) (err error) { @@ -145,141 +74,6 @@ func WithProcessArgs(config *runtime.ContainerConfig, image *imagespec.ImageConf } } -// WithMounts sorts and adds runtime and CRI mounts to the spec -func WithMounts(osi osinterface.OS, config *runtime.ContainerConfig, extra []*runtime.Mount, mountLabel string) oci.SpecOpts { - return func(ctx context.Context, client oci.Client, _ *containers.Container, s *runtimespec.Spec) (err error) { - // mergeMounts merge CRI mounts with extra mounts. If a mount destination - // is mounted by both a CRI mount and an extra mount, the CRI mount will - // be kept. - var ( - criMounts = config.GetMounts() - mounts = append([]*runtime.Mount{}, criMounts...) - ) - // Copy all mounts from extra mounts, except for mounts overriden by CRI. - for _, e := range extra { - found := false - for _, c := range criMounts { - if filepath.Clean(e.ContainerPath) == filepath.Clean(c.ContainerPath) { - found = true - break - } - } - if !found { - mounts = append(mounts, e) - } - } - // --- - - // Sort mounts in number of parts. This ensures that high level mounts don't - // shadow other mounts. - sort.Sort(orderedMounts(mounts)) - - // Mount cgroup into the container as readonly, which inherits docker's behavior. - s.Mounts = append(s.Mounts, runtimespec.Mount{ - Source: "cgroup", - Destination: "/sys/fs/cgroup", - Type: "cgroup", - Options: []string{"nosuid", "noexec", "nodev", "relatime", "ro"}, - }) - - // Copy all mounts from default mounts, except for - // - mounts overriden by supplied mount; - // - all mounts under /dev if a supplied /dev is present. - mountSet := make(map[string]struct{}) - for _, m := range mounts { - mountSet[filepath.Clean(m.ContainerPath)] = struct{}{} - } - - defaultMounts := s.Mounts - s.Mounts = nil - - for _, m := range defaultMounts { - dst := filepath.Clean(m.Destination) - if _, ok := mountSet[dst]; ok { - // filter out mount overridden by a supplied mount - continue - } - if _, mountDev := mountSet["/dev"]; mountDev && strings.HasPrefix(dst, "/dev/") { - // filter out everything under /dev if /dev is a supplied mount - continue - } - s.Mounts = append(s.Mounts, m) - } - - for _, mount := range mounts { - var ( - dst = mount.GetContainerPath() - src = mount.GetHostPath() - ) - // Create the host path if it doesn't exist. - // TODO(random-liu): Add CRI validation test for this case. - if _, err := osi.Stat(src); err != nil { - if !os.IsNotExist(err) { - return errors.Wrapf(err, "failed to stat %q", src) - } - if err := osi.MkdirAll(src, 0755); err != nil { - return errors.Wrapf(err, "failed to mkdir %q", src) - } - } - // TODO(random-liu): Add cri-containerd integration test or cri validation test - // for this. - src, err := osi.ResolveSymbolicLink(src) - if err != nil { - return errors.Wrapf(err, "failed to resolve symlink %q", src) - } - if s.Linux == nil { - s.Linux = &runtimespec.Linux{} - } - options := []string{"rbind"} - switch mount.GetPropagation() { - case runtime.MountPropagation_PROPAGATION_PRIVATE: - options = append(options, "rprivate") - // Since default root propogation in runc is rprivate ignore - // setting the root propagation - case runtime.MountPropagation_PROPAGATION_BIDIRECTIONAL: - if err := ensureShared(src, osi.LookupMount); err != nil { - return err - } - options = append(options, "rshared") - s.Linux.RootfsPropagation = "rshared" - case runtime.MountPropagation_PROPAGATION_HOST_TO_CONTAINER: - if err := ensureSharedOrSlave(src, osi.LookupMount); err != nil { - return err - } - options = append(options, "rslave") - if s.Linux.RootfsPropagation != "rshared" && - s.Linux.RootfsPropagation != "rslave" { - s.Linux.RootfsPropagation = "rslave" - } - default: - log.G(ctx).Warnf("Unknown propagation mode for hostPath %q", mount.HostPath) - options = append(options, "rprivate") - } - - // NOTE(random-liu): we don't change all mounts to `ro` when root filesystem - // is readonly. This is different from docker's behavior, but make more sense. - if mount.GetReadonly() { - options = append(options, "ro") - } else { - options = append(options, "rw") - } - - if mount.GetSelinuxRelabel() { - if err := label.Relabel(src, mountLabel, false); err != nil && err != unix.ENOTSUP { - return errors.Wrapf(err, "relabel %q with %q failed", src, mountLabel) - } - } - s.Mounts = append(s.Mounts, runtimespec.Mount{ - Source: src, - Destination: dst, - Type: "bind", - Options: options, - }) - } - return nil - } -} - // mounts defines how to sort runtime.Mount. // This is the same with the Docker implementation: // https://github.com/moby/moby/blob/17.05.x/daemon/volumes.go#L26 @@ -307,325 +101,6 @@ func (m orderedMounts) parts(i int) int { return strings.Count(filepath.Clean(m[i].ContainerPath), string(os.PathSeparator)) } -// Ensure mount point on which path is mounted, is shared. -func ensureShared(path string, lookupMount func(string) (mount.Info, error)) error { - mountInfo, err := lookupMount(path) - if err != nil { - return err - } - - // Make sure source mount point is shared. - optsSplit := strings.Split(mountInfo.Optional, " ") - for _, opt := range optsSplit { - if strings.HasPrefix(opt, "shared:") { - return nil - } - } - - return errors.Errorf("path %q is mounted on %q but it is not a shared mount", path, mountInfo.Mountpoint) -} - -// ensure mount point on which path is mounted, is either shared or slave. -func ensureSharedOrSlave(path string, lookupMount func(string) (mount.Info, error)) error { - mountInfo, err := lookupMount(path) - if err != nil { - return err - } - // Make sure source mount point is shared. - optsSplit := strings.Split(mountInfo.Optional, " ") - for _, opt := range optsSplit { - if strings.HasPrefix(opt, "shared:") { - return nil - } else if strings.HasPrefix(opt, "master:") { - return nil - } - } - return errors.Errorf("path %q is mounted on %q but it is not a shared or slave mount", path, mountInfo.Mountpoint) -} - -// WithPrivilegedDevices allows all host devices inside the container -func WithPrivilegedDevices(_ context.Context, _ oci.Client, _ *containers.Container, s *runtimespec.Spec) error { - if s.Linux == nil { - s.Linux = &runtimespec.Linux{} - } - if s.Linux.Resources == nil { - s.Linux.Resources = &runtimespec.LinuxResources{} - } - hostDevices, err := devices.HostDevices() - if err != nil { - return err - } - for _, hostDevice := range hostDevices { - rd := runtimespec.LinuxDevice{ - Path: hostDevice.Path, - Type: string(hostDevice.Type), - Major: hostDevice.Major, - Minor: hostDevice.Minor, - UID: &hostDevice.Uid, - GID: &hostDevice.Gid, - } - if hostDevice.Major == 0 && hostDevice.Minor == 0 { - // Invalid device, most likely a symbolic link, skip it. - continue - } - addDevice(s, rd) - } - s.Linux.Resources.Devices = []runtimespec.LinuxDeviceCgroup{ - { - Allow: true, - Access: "rwm", - }, - } - return nil -} - -func addDevice(s *runtimespec.Spec, rd runtimespec.LinuxDevice) { - for i, dev := range s.Linux.Devices { - if dev.Path == rd.Path { - s.Linux.Devices[i] = rd - return - } - } - s.Linux.Devices = append(s.Linux.Devices, rd) -} - -// WithDevices sets the provided devices onto the container spec -func WithDevices(osi osinterface.OS, config *runtime.ContainerConfig) oci.SpecOpts { - return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) (err error) { - if s.Linux == nil { - s.Linux = &runtimespec.Linux{} - } - if s.Linux.Resources == nil { - s.Linux.Resources = &runtimespec.LinuxResources{} - } - for _, device := range config.GetDevices() { - path, err := osi.ResolveSymbolicLink(device.HostPath) - if err != nil { - return err - } - dev, err := devices.DeviceFromPath(path, device.Permissions) - if err != nil { - return err - } - rd := runtimespec.LinuxDevice{ - Path: device.ContainerPath, - Type: string(dev.Type), - Major: dev.Major, - Minor: dev.Minor, - UID: &dev.Uid, - GID: &dev.Gid, - } - - addDevice(s, rd) - - s.Linux.Resources.Devices = append(s.Linux.Resources.Devices, runtimespec.LinuxDeviceCgroup{ - Allow: true, - Type: string(dev.Type), - Major: &dev.Major, - Minor: &dev.Minor, - Access: dev.Permissions, - }) - } - return nil - } -} - -// WithCapabilities sets the provided capabilties from the security context -func WithCapabilities(sc *runtime.LinuxContainerSecurityContext) oci.SpecOpts { - capabilities := sc.GetCapabilities() - if capabilities == nil { - return nullOpt - } - - var opts []oci.SpecOpts - // Add/drop all capabilities if "all" is specified, so that - // following individual add/drop could still work. E.g. - // AddCapabilities: []string{"ALL"}, DropCapabilities: []string{"CHOWN"} - // will be all capabilities without `CAP_CHOWN`. - if util.InStringSlice(capabilities.GetAddCapabilities(), "ALL") { - opts = append(opts, oci.WithAllCapabilities) - } - if util.InStringSlice(capabilities.GetDropCapabilities(), "ALL") { - opts = append(opts, oci.WithCapabilities(nil)) - } - - var caps []string - for _, c := range capabilities.GetAddCapabilities() { - if strings.ToUpper(c) == "ALL" { - continue - } - // Capabilities in CRI doesn't have `CAP_` prefix, so add it. - caps = append(caps, "CAP_"+strings.ToUpper(c)) - } - opts = append(opts, oci.WithAddedCapabilities(caps)) - - caps = []string{} - for _, c := range capabilities.GetDropCapabilities() { - if strings.ToUpper(c) == "ALL" { - continue - } - caps = append(caps, "CAP_"+strings.ToUpper(c)) - } - opts = append(opts, oci.WithDroppedCapabilities(caps)) - return oci.Compose(opts...) -} - -// WithoutAmbientCaps removes the ambient caps from the spec -func WithoutAmbientCaps(_ context.Context, _ oci.Client, c *containers.Container, s *runtimespec.Spec) error { - if s.Process == nil { - s.Process = &runtimespec.Process{} - } - if s.Process.Capabilities == nil { - s.Process.Capabilities = &runtimespec.LinuxCapabilities{} - } - s.Process.Capabilities.Ambient = nil - return nil -} - -// WithDisabledCgroups clears the Cgroups Path from the spec -func WithDisabledCgroups(_ context.Context, _ oci.Client, c *containers.Container, s *runtimespec.Spec) error { - if s.Linux == nil { - s.Linux = &runtimespec.Linux{} - } - s.Linux.CgroupsPath = "" - return nil -} - -// WithSelinuxLabels sets the mount and process labels -func WithSelinuxLabels(process, mount string) oci.SpecOpts { - return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) (err error) { - if s.Linux == nil { - s.Linux = &runtimespec.Linux{} - } - if s.Process == nil { - s.Process = &runtimespec.Process{} - } - s.Linux.MountLabel = mount - s.Process.SelinuxLabel = process - return nil - } -} - -// WithResources sets the provided resource restrictions -func WithResources(resources *runtime.LinuxContainerResources) oci.SpecOpts { - return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) (err error) { - if resources == nil { - return nil - } - if s.Linux == nil { - s.Linux = &runtimespec.Linux{} - } - if s.Linux.Resources == nil { - s.Linux.Resources = &runtimespec.LinuxResources{} - } - if s.Linux.Resources.CPU == nil { - s.Linux.Resources.CPU = &runtimespec.LinuxCPU{} - } - if s.Linux.Resources.Memory == nil { - s.Linux.Resources.Memory = &runtimespec.LinuxMemory{} - } - var ( - p = uint64(resources.GetCpuPeriod()) - q = resources.GetCpuQuota() - shares = uint64(resources.GetCpuShares()) - limit = resources.GetMemoryLimitInBytes() - ) - - if p != 0 { - s.Linux.Resources.CPU.Period = &p - } - if q != 0 { - s.Linux.Resources.CPU.Quota = &q - } - if shares != 0 { - s.Linux.Resources.CPU.Shares = &shares - } - if cpus := resources.GetCpusetCpus(); cpus != "" { - s.Linux.Resources.CPU.Cpus = cpus - } - if mems := resources.GetCpusetMems(); mems != "" { - s.Linux.Resources.CPU.Mems = resources.GetCpusetMems() - } - if limit != 0 { - s.Linux.Resources.Memory.Limit = &limit - } - return nil - } -} - -// WithOOMScoreAdj sets the oom score -func WithOOMScoreAdj(config *runtime.ContainerConfig, restrict bool) oci.SpecOpts { - return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { - if s.Process == nil { - s.Process = &runtimespec.Process{} - } - - resources := config.GetLinux().GetResources() - if resources == nil { - return nil - } - adj := int(resources.GetOomScoreAdj()) - if restrict { - var err error - adj, err = restrictOOMScoreAdj(adj) - if err != nil { - return err - } - } - s.Process.OOMScoreAdj = &adj - return nil - } -} - -// WithSysctls sets the provided sysctls onto the spec -func WithSysctls(sysctls map[string]string) oci.SpecOpts { - return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { - if s.Linux == nil { - s.Linux = &runtimespec.Linux{} - } - if s.Linux.Sysctl == nil { - s.Linux.Sysctl = make(map[string]string) - } - for k, v := range sysctls { - s.Linux.Sysctl[k] = v - } - return nil - } -} - -// WithPodOOMScoreAdj sets the oom score for the pod sandbox -func WithPodOOMScoreAdj(adj int, restrict bool) oci.SpecOpts { - return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { - if s.Process == nil { - s.Process = &runtimespec.Process{} - } - if restrict { - var err error - adj, err = restrictOOMScoreAdj(adj) - if err != nil { - return err - } - } - s.Process.OOMScoreAdj = &adj - return nil - } -} - -// WithSupplementalGroups sets the supplemental groups for the process -func WithSupplementalGroups(groups []int64) oci.SpecOpts { - return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { - if s.Process == nil { - s.Process = &runtimespec.Process{} - } - var guids []uint32 - for _, g := range groups { - guids = append(guids, uint32(g)) - } - s.Process.User.AdditionalGids = mergeGids(s.Process.User.AdditionalGids, guids) - return nil - } -} - // WithAnnotation sets the provided annotation func WithAnnotation(k, v string) oci.SpecOpts { return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { @@ -636,110 +111,3 @@ func WithAnnotation(k, v string) oci.SpecOpts { return nil } } - -// WithPodNamespaces sets the pod namespaces for the container -func WithPodNamespaces(config *runtime.LinuxContainerSecurityContext, pid uint32) oci.SpecOpts { - namespaces := config.GetNamespaceOptions() - - opts := []oci.SpecOpts{ - oci.WithLinuxNamespace(runtimespec.LinuxNamespace{Type: runtimespec.NetworkNamespace, Path: GetNetworkNamespace(pid)}), - oci.WithLinuxNamespace(runtimespec.LinuxNamespace{Type: runtimespec.IPCNamespace, Path: GetIPCNamespace(pid)}), - oci.WithLinuxNamespace(runtimespec.LinuxNamespace{Type: runtimespec.UTSNamespace, Path: GetUTSNamespace(pid)}), - } - if namespaces.GetPid() != runtime.NamespaceMode_CONTAINER { - opts = append(opts, oci.WithLinuxNamespace(runtimespec.LinuxNamespace{Type: runtimespec.PIDNamespace, Path: GetPIDNamespace(pid)})) - } - return oci.Compose(opts...) -} - -// WithDefaultSandboxShares sets the default sandbox CPU shares -func WithDefaultSandboxShares(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { - if s.Linux == nil { - s.Linux = &runtimespec.Linux{} - } - if s.Linux.Resources == nil { - s.Linux.Resources = &runtimespec.LinuxResources{} - } - if s.Linux.Resources.CPU == nil { - s.Linux.Resources.CPU = &runtimespec.LinuxCPU{} - } - i := uint64(DefaultSandboxCPUshares) - s.Linux.Resources.CPU.Shares = &i - return nil -} - -// WithoutNamespace removes the provided namespace -func WithoutNamespace(t runtimespec.LinuxNamespaceType) oci.SpecOpts { - return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { - if s.Linux == nil { - return nil - } - var namespaces []runtimespec.LinuxNamespace - for i, ns := range s.Linux.Namespaces { - if ns.Type != t { - namespaces = append(namespaces, s.Linux.Namespaces[i]) - } - } - s.Linux.Namespaces = namespaces - return nil - } -} - -func nullOpt(_ context.Context, _ oci.Client, _ *containers.Container, _ *runtimespec.Spec) error { - return nil -} - -func getCurrentOOMScoreAdj() (int, error) { - b, err := ioutil.ReadFile("/proc/self/oom_score_adj") - if err != nil { - return 0, errors.Wrap(err, "could not get the daemon oom_score_adj") - } - s := strings.TrimSpace(string(b)) - i, err := strconv.Atoi(s) - if err != nil { - return 0, errors.Wrap(err, "could not get the daemon oom_score_adj") - } - return i, nil -} - -func restrictOOMScoreAdj(preferredOOMScoreAdj int) (int, error) { - currentOOMScoreAdj, err := getCurrentOOMScoreAdj() - if err != nil { - return preferredOOMScoreAdj, err - } - if preferredOOMScoreAdj < currentOOMScoreAdj { - return currentOOMScoreAdj, nil - } - return preferredOOMScoreAdj, nil -} - -const ( - // netNSFormat is the format of network namespace of a process. - netNSFormat = "/proc/%v/ns/net" - // ipcNSFormat is the format of ipc namespace of a process. - ipcNSFormat = "/proc/%v/ns/ipc" - // utsNSFormat is the format of uts namespace of a process. - utsNSFormat = "/proc/%v/ns/uts" - // pidNSFormat is the format of pid namespace of a process. - pidNSFormat = "/proc/%v/ns/pid" -) - -// GetNetworkNamespace returns the network namespace of a process. -func GetNetworkNamespace(pid uint32) string { - return fmt.Sprintf(netNSFormat, pid) -} - -// GetIPCNamespace returns the ipc namespace of a process. -func GetIPCNamespace(pid uint32) string { - return fmt.Sprintf(ipcNSFormat, pid) -} - -// GetUTSNamespace returns the uts namespace of a process. -func GetUTSNamespace(pid uint32) string { - return fmt.Sprintf(utsNSFormat, pid) -} - -// GetPIDNamespace returns the pid namespace of a process. -func GetPIDNamespace(pid uint32) string { - return fmt.Sprintf(pidNSFormat, pid) -} diff --git a/vendor/github.com/containerd/cri/pkg/containerd/opts/spec_unix.go b/vendor/github.com/containerd/cri/pkg/containerd/opts/spec_unix.go new file mode 100644 index 00000000000..d644962d579 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/containerd/opts/spec_unix.go @@ -0,0 +1,721 @@ +// +build !windows + +/* + Copyright The containerd 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 opts + +import ( + "context" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "sort" + "strconv" + "strings" + "sync" + "syscall" + + "github.com/containerd/containerd/containers" + "github.com/containerd/containerd/log" + "github.com/containerd/containerd/mount" + "github.com/containerd/containerd/oci" + "github.com/opencontainers/runc/libcontainer/devices" + runtimespec "github.com/opencontainers/runtime-spec/specs-go" + "github.com/opencontainers/selinux/go-selinux/label" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "golang.org/x/sys/unix" + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + osinterface "github.com/containerd/cri/pkg/os" + "github.com/containerd/cri/pkg/util" +) + +// WithAdditionalGIDs adds any additional groups listed for a particular user in the +// /etc/groups file of the image's root filesystem to the OCI spec's additionalGids array. +func WithAdditionalGIDs(userstr string) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) (err error) { + if s.Process == nil { + s.Process = &runtimespec.Process{} + } + gids := s.Process.User.AdditionalGids + if err := oci.WithAdditionalGIDs(userstr)(ctx, client, c, s); err != nil { + return err + } + // Merge existing gids and new gids. + s.Process.User.AdditionalGids = mergeGids(s.Process.User.AdditionalGids, gids) + return nil + } +} + +func mergeGids(gids1, gids2 []uint32) []uint32 { + gidsMap := make(map[uint32]struct{}) + for _, gid1 := range gids1 { + gidsMap[gid1] = struct{}{} + } + for _, gid2 := range gids2 { + gidsMap[gid2] = struct{}{} + } + var gids []uint32 + for gid := range gidsMap { + gids = append(gids, gid) + } + sort.Slice(gids, func(i, j int) bool { return gids[i] < gids[j] }) + return gids +} + +// WithoutRunMount removes the `/run` inside the spec +func WithoutRunMount(_ context.Context, _ oci.Client, c *containers.Container, s *runtimespec.Spec) error { + var ( + mounts []runtimespec.Mount + current = s.Mounts + ) + for _, m := range current { + if filepath.Clean(m.Destination) == "/run" { + continue + } + mounts = append(mounts, m) + } + s.Mounts = mounts + return nil +} + +// WithoutDefaultSecuritySettings removes the default security settings generated on a spec +func WithoutDefaultSecuritySettings(_ context.Context, _ oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Process == nil { + s.Process = &runtimespec.Process{} + } + // Make sure no default seccomp/apparmor is specified + s.Process.ApparmorProfile = "" + if s.Linux != nil { + s.Linux.Seccomp = nil + } + // Remove default rlimits (See issue #515) + s.Process.Rlimits = nil + return nil +} + +// WithMounts sorts and adds runtime and CRI mounts to the spec +func WithMounts(osi osinterface.OS, config *runtime.ContainerConfig, extra []*runtime.Mount, mountLabel string) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, _ *containers.Container, s *runtimespec.Spec) (err error) { + // mergeMounts merge CRI mounts with extra mounts. If a mount destination + // is mounted by both a CRI mount and an extra mount, the CRI mount will + // be kept. + var ( + criMounts = config.GetMounts() + mounts = append([]*runtime.Mount{}, criMounts...) + ) + // Copy all mounts from extra mounts, except for mounts overridden by CRI. + for _, e := range extra { + found := false + for _, c := range criMounts { + if filepath.Clean(e.ContainerPath) == filepath.Clean(c.ContainerPath) { + found = true + break + } + } + if !found { + mounts = append(mounts, e) + } + } + + // Sort mounts in number of parts. This ensures that high level mounts don't + // shadow other mounts. + sort.Sort(orderedMounts(mounts)) + + // Mount cgroup into the container as readonly, which inherits docker's behavior. + s.Mounts = append(s.Mounts, runtimespec.Mount{ + Source: "cgroup", + Destination: "/sys/fs/cgroup", + Type: "cgroup", + Options: []string{"nosuid", "noexec", "nodev", "relatime", "ro"}, + }) + + // Copy all mounts from default mounts, except for + // - mounts overridden by supplied mount; + // - all mounts under /dev if a supplied /dev is present. + mountSet := make(map[string]struct{}) + for _, m := range mounts { + mountSet[filepath.Clean(m.ContainerPath)] = struct{}{} + } + + defaultMounts := s.Mounts + s.Mounts = nil + + for _, m := range defaultMounts { + dst := filepath.Clean(m.Destination) + if _, ok := mountSet[dst]; ok { + // filter out mount overridden by a supplied mount + continue + } + if _, mountDev := mountSet["/dev"]; mountDev && strings.HasPrefix(dst, "/dev/") { + // filter out everything under /dev if /dev is a supplied mount + continue + } + s.Mounts = append(s.Mounts, m) + } + + for _, mount := range mounts { + var ( + dst = mount.GetContainerPath() + src = mount.GetHostPath() + ) + // Create the host path if it doesn't exist. + // TODO(random-liu): Add CRI validation test for this case. + if _, err := osi.Stat(src); err != nil { + if !os.IsNotExist(err) { + return errors.Wrapf(err, "failed to stat %q", src) + } + if err := osi.MkdirAll(src, 0755); err != nil { + return errors.Wrapf(err, "failed to mkdir %q", src) + } + } + // TODO(random-liu): Add cri-containerd integration test or cri validation test + // for this. + src, err := osi.ResolveSymbolicLink(src) + if err != nil { + return errors.Wrapf(err, "failed to resolve symlink %q", src) + } + if s.Linux == nil { + s.Linux = &runtimespec.Linux{} + } + options := []string{"rbind"} + switch mount.GetPropagation() { + case runtime.MountPropagation_PROPAGATION_PRIVATE: + options = append(options, "rprivate") + // Since default root propagation in runc is rprivate ignore + // setting the root propagation + case runtime.MountPropagation_PROPAGATION_BIDIRECTIONAL: + if err := ensureShared(src, osi.(osinterface.UNIX).LookupMount); err != nil { + return err + } + options = append(options, "rshared") + s.Linux.RootfsPropagation = "rshared" + case runtime.MountPropagation_PROPAGATION_HOST_TO_CONTAINER: + if err := ensureSharedOrSlave(src, osi.(osinterface.UNIX).LookupMount); err != nil { + return err + } + options = append(options, "rslave") + if s.Linux.RootfsPropagation != "rshared" && + s.Linux.RootfsPropagation != "rslave" { + s.Linux.RootfsPropagation = "rslave" + } + default: + log.G(ctx).Warnf("Unknown propagation mode for hostPath %q", mount.HostPath) + options = append(options, "rprivate") + } + + // NOTE(random-liu): we don't change all mounts to `ro` when root filesystem + // is readonly. This is different from docker's behavior, but make more sense. + if mount.GetReadonly() { + options = append(options, "ro") + } else { + options = append(options, "rw") + } + + if mount.GetSelinuxRelabel() { + if err := label.Relabel(src, mountLabel, false); err != nil && err != unix.ENOTSUP { + return errors.Wrapf(err, "relabel %q with %q failed", src, mountLabel) + } + } + s.Mounts = append(s.Mounts, runtimespec.Mount{ + Source: src, + Destination: dst, + Type: "bind", + Options: options, + }) + } + return nil + } +} + +// Ensure mount point on which path is mounted, is shared. +func ensureShared(path string, lookupMount func(string) (mount.Info, error)) error { + mountInfo, err := lookupMount(path) + if err != nil { + return err + } + + // Make sure source mount point is shared. + optsSplit := strings.Split(mountInfo.Optional, " ") + for _, opt := range optsSplit { + if strings.HasPrefix(opt, "shared:") { + return nil + } + } + + return errors.Errorf("path %q is mounted on %q but it is not a shared mount", path, mountInfo.Mountpoint) +} + +// ensure mount point on which path is mounted, is either shared or slave. +func ensureSharedOrSlave(path string, lookupMount func(string) (mount.Info, error)) error { + mountInfo, err := lookupMount(path) + if err != nil { + return err + } + // Make sure source mount point is shared. + optsSplit := strings.Split(mountInfo.Optional, " ") + for _, opt := range optsSplit { + if strings.HasPrefix(opt, "shared:") { + return nil + } else if strings.HasPrefix(opt, "master:") { + return nil + } + } + return errors.Errorf("path %q is mounted on %q but it is not a shared or slave mount", path, mountInfo.Mountpoint) +} + +func addDevice(s *runtimespec.Spec, rd runtimespec.LinuxDevice) { + for i, dev := range s.Linux.Devices { + if dev.Path == rd.Path { + s.Linux.Devices[i] = rd + return + } + } + s.Linux.Devices = append(s.Linux.Devices, rd) +} + +// WithDevices sets the provided devices onto the container spec +func WithDevices(osi osinterface.OS, config *runtime.ContainerConfig) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) (err error) { + if s.Linux == nil { + s.Linux = &runtimespec.Linux{} + } + if s.Linux.Resources == nil { + s.Linux.Resources = &runtimespec.LinuxResources{} + } + for _, device := range config.GetDevices() { + path, err := osi.ResolveSymbolicLink(device.HostPath) + if err != nil { + return err + } + dev, err := devices.DeviceFromPath(path, device.Permissions) + if err != nil { + return err + } + rd := runtimespec.LinuxDevice{ + Path: device.ContainerPath, + Type: string(dev.Type), + Major: dev.Major, + Minor: dev.Minor, + UID: &dev.Uid, + GID: &dev.Gid, + } + + addDevice(s, rd) + + s.Linux.Resources.Devices = append(s.Linux.Resources.Devices, runtimespec.LinuxDeviceCgroup{ + Allow: true, + Type: string(dev.Type), + Major: &dev.Major, + Minor: &dev.Minor, + Access: string(dev.Permissions), + }) + } + return nil + } +} + +// WithCapabilities sets the provided capabilties from the security context +func WithCapabilities(sc *runtime.LinuxContainerSecurityContext) oci.SpecOpts { + capabilities := sc.GetCapabilities() + if capabilities == nil { + return nullOpt + } + + var opts []oci.SpecOpts + // Add/drop all capabilities if "all" is specified, so that + // following individual add/drop could still work. E.g. + // AddCapabilities: []string{"ALL"}, DropCapabilities: []string{"CHOWN"} + // will be all capabilities without `CAP_CHOWN`. + if util.InStringSlice(capabilities.GetAddCapabilities(), "ALL") { + opts = append(opts, oci.WithAllCapabilities) + } + if util.InStringSlice(capabilities.GetDropCapabilities(), "ALL") { + opts = append(opts, oci.WithCapabilities(nil)) + } + + var caps []string + for _, c := range capabilities.GetAddCapabilities() { + if strings.ToUpper(c) == "ALL" { + continue + } + // Capabilities in CRI doesn't have `CAP_` prefix, so add it. + caps = append(caps, "CAP_"+strings.ToUpper(c)) + } + opts = append(opts, oci.WithAddedCapabilities(caps)) + + caps = []string{} + for _, c := range capabilities.GetDropCapabilities() { + if strings.ToUpper(c) == "ALL" { + continue + } + caps = append(caps, "CAP_"+strings.ToUpper(c)) + } + opts = append(opts, oci.WithDroppedCapabilities(caps)) + return oci.Compose(opts...) +} + +// WithoutAmbientCaps removes the ambient caps from the spec +func WithoutAmbientCaps(_ context.Context, _ oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Process == nil { + s.Process = &runtimespec.Process{} + } + if s.Process.Capabilities == nil { + s.Process.Capabilities = &runtimespec.LinuxCapabilities{} + } + s.Process.Capabilities.Ambient = nil + return nil +} + +// WithDisabledCgroups clears the Cgroups Path from the spec +func WithDisabledCgroups(_ context.Context, _ oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Linux == nil { + s.Linux = &runtimespec.Linux{} + } + s.Linux.CgroupsPath = "" + return nil +} + +// WithSelinuxLabels sets the mount and process labels +func WithSelinuxLabels(process, mount string) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) (err error) { + if s.Linux == nil { + s.Linux = &runtimespec.Linux{} + } + if s.Process == nil { + s.Process = &runtimespec.Process{} + } + s.Linux.MountLabel = mount + s.Process.SelinuxLabel = process + return nil + } +} + +// WithResources sets the provided resource restrictions +func WithResources(resources *runtime.LinuxContainerResources, tolerateMissingHugetlbController, disableHugetlbController bool) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) (err error) { + if resources == nil { + return nil + } + if s.Linux == nil { + s.Linux = &runtimespec.Linux{} + } + if s.Linux.Resources == nil { + s.Linux.Resources = &runtimespec.LinuxResources{} + } + if s.Linux.Resources.CPU == nil { + s.Linux.Resources.CPU = &runtimespec.LinuxCPU{} + } + if s.Linux.Resources.Memory == nil { + s.Linux.Resources.Memory = &runtimespec.LinuxMemory{} + } + var ( + p = uint64(resources.GetCpuPeriod()) + q = resources.GetCpuQuota() + shares = uint64(resources.GetCpuShares()) + limit = resources.GetMemoryLimitInBytes() + hugepages = resources.GetHugepageLimits() + ) + + if p != 0 { + s.Linux.Resources.CPU.Period = &p + } + if q != 0 { + s.Linux.Resources.CPU.Quota = &q + } + if shares != 0 { + s.Linux.Resources.CPU.Shares = &shares + } + if cpus := resources.GetCpusetCpus(); cpus != "" { + s.Linux.Resources.CPU.Cpus = cpus + } + if mems := resources.GetCpusetMems(); mems != "" { + s.Linux.Resources.CPU.Mems = resources.GetCpusetMems() + } + if limit != 0 { + s.Linux.Resources.Memory.Limit = &limit + } + if !disableHugetlbController { + if isHugetlbControllerPresent() { + for _, limit := range hugepages { + s.Linux.Resources.HugepageLimits = append(s.Linux.Resources.HugepageLimits, runtimespec.LinuxHugepageLimit{ + Pagesize: limit.PageSize, + Limit: limit.Limit, + }) + } + } else { + if !tolerateMissingHugetlbController { + return errors.Errorf("huge pages limits are specified but hugetlb cgroup controller is missing. " + + "Please set tolerate_missing_hugetlb_controller to `true` to ignore this error") + } + logrus.Warn("hugetlb cgroup controller is absent. skipping huge pages limits") + } + } + return nil + } +} + +var ( + supportsHugetlbOnce sync.Once + supportsHugetlb bool +) + +func isHugetlbControllerPresent() bool { + supportsHugetlbOnce.Do(func() { + supportsHugetlb = false + if IsCgroup2UnifiedMode() { + supportsHugetlb, _ = cgroupv2HasHugetlb() + } else { + supportsHugetlb, _ = cgroupv1HasHugetlb() + } + }) + return supportsHugetlb +} + +var ( + _cgroupv1HasHugetlbOnce sync.Once + _cgroupv1HasHugetlb bool + _cgroupv1HasHugetlbErr error + _cgroupv2HasHugetlbOnce sync.Once + _cgroupv2HasHugetlb bool + _cgroupv2HasHugetlbErr error + isUnifiedOnce sync.Once + isUnified bool +) + +// cgroupv1HasHugetlb returns whether the hugetlb controller is present on +// cgroup v1. +func cgroupv1HasHugetlb() (bool, error) { + _cgroupv1HasHugetlbOnce.Do(func() { + if _, err := ioutil.ReadDir("/sys/fs/cgroup/hugetlb"); err != nil { + _cgroupv1HasHugetlbErr = errors.Wrap(err, "readdir /sys/fs/cgroup/hugetlb") + _cgroupv1HasHugetlb = false + } else { + _cgroupv1HasHugetlbErr = nil + _cgroupv1HasHugetlb = true + } + }) + return _cgroupv1HasHugetlb, _cgroupv1HasHugetlbErr +} + +// cgroupv2HasHugetlb returns whether the hugetlb controller is present on +// cgroup v2. +func cgroupv2HasHugetlb() (bool, error) { + _cgroupv2HasHugetlbOnce.Do(func() { + controllers, err := ioutil.ReadFile("/sys/fs/cgroup/cgroup.controllers") + if err != nil { + _cgroupv2HasHugetlbErr = errors.Wrap(err, "read /sys/fs/cgroup/cgroup.controllers") + return + } + _cgroupv2HasHugetlb = strings.Contains(string(controllers), "hugetlb") + }) + return _cgroupv2HasHugetlb, _cgroupv2HasHugetlbErr +} + +// IsCgroup2UnifiedMode returns whether we are running in cgroup v2 unified mode. +func IsCgroup2UnifiedMode() bool { + isUnifiedOnce.Do(func() { + var st syscall.Statfs_t + if err := syscall.Statfs("/sys/fs/cgroup", &st); err != nil { + panic("cannot statfs cgroup root") + } + isUnified = st.Type == unix.CGROUP2_SUPER_MAGIC + }) + return isUnified +} + +// WithOOMScoreAdj sets the oom score +func WithOOMScoreAdj(config *runtime.ContainerConfig, restrict bool) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Process == nil { + s.Process = &runtimespec.Process{} + } + + resources := config.GetLinux().GetResources() + if resources == nil { + return nil + } + adj := int(resources.GetOomScoreAdj()) + if restrict { + var err error + adj, err = restrictOOMScoreAdj(adj) + if err != nil { + return err + } + } + s.Process.OOMScoreAdj = &adj + return nil + } +} + +// WithSysctls sets the provided sysctls onto the spec +func WithSysctls(sysctls map[string]string) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Linux == nil { + s.Linux = &runtimespec.Linux{} + } + if s.Linux.Sysctl == nil { + s.Linux.Sysctl = make(map[string]string) + } + for k, v := range sysctls { + s.Linux.Sysctl[k] = v + } + return nil + } +} + +// WithPodOOMScoreAdj sets the oom score for the pod sandbox +func WithPodOOMScoreAdj(adj int, restrict bool) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Process == nil { + s.Process = &runtimespec.Process{} + } + if restrict { + var err error + adj, err = restrictOOMScoreAdj(adj) + if err != nil { + return err + } + } + s.Process.OOMScoreAdj = &adj + return nil + } +} + +// WithSupplementalGroups sets the supplemental groups for the process +func WithSupplementalGroups(groups []int64) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Process == nil { + s.Process = &runtimespec.Process{} + } + var guids []uint32 + for _, g := range groups { + guids = append(guids, uint32(g)) + } + s.Process.User.AdditionalGids = mergeGids(s.Process.User.AdditionalGids, guids) + return nil + } +} + +// WithPodNamespaces sets the pod namespaces for the container +func WithPodNamespaces(config *runtime.LinuxContainerSecurityContext, pid uint32) oci.SpecOpts { + namespaces := config.GetNamespaceOptions() + + opts := []oci.SpecOpts{ + oci.WithLinuxNamespace(runtimespec.LinuxNamespace{Type: runtimespec.NetworkNamespace, Path: GetNetworkNamespace(pid)}), + oci.WithLinuxNamespace(runtimespec.LinuxNamespace{Type: runtimespec.IPCNamespace, Path: GetIPCNamespace(pid)}), + oci.WithLinuxNamespace(runtimespec.LinuxNamespace{Type: runtimespec.UTSNamespace, Path: GetUTSNamespace(pid)}), + } + if namespaces.GetPid() != runtime.NamespaceMode_CONTAINER { + opts = append(opts, oci.WithLinuxNamespace(runtimespec.LinuxNamespace{Type: runtimespec.PIDNamespace, Path: GetPIDNamespace(pid)})) + } + return oci.Compose(opts...) +} + +// WithDefaultSandboxShares sets the default sandbox CPU shares +func WithDefaultSandboxShares(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Linux == nil { + s.Linux = &runtimespec.Linux{} + } + if s.Linux.Resources == nil { + s.Linux.Resources = &runtimespec.LinuxResources{} + } + if s.Linux.Resources.CPU == nil { + s.Linux.Resources.CPU = &runtimespec.LinuxCPU{} + } + i := uint64(DefaultSandboxCPUshares) + s.Linux.Resources.CPU.Shares = &i + return nil +} + +// WithoutNamespace removes the provided namespace +func WithoutNamespace(t runtimespec.LinuxNamespaceType) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Linux == nil { + return nil + } + var namespaces []runtimespec.LinuxNamespace + for i, ns := range s.Linux.Namespaces { + if ns.Type != t { + namespaces = append(namespaces, s.Linux.Namespaces[i]) + } + } + s.Linux.Namespaces = namespaces + return nil + } +} + +func nullOpt(_ context.Context, _ oci.Client, _ *containers.Container, _ *runtimespec.Spec) error { + return nil +} + +func getCurrentOOMScoreAdj() (int, error) { + b, err := ioutil.ReadFile("/proc/self/oom_score_adj") + if err != nil { + return 0, errors.Wrap(err, "could not get the daemon oom_score_adj") + } + s := strings.TrimSpace(string(b)) + i, err := strconv.Atoi(s) + if err != nil { + return 0, errors.Wrap(err, "could not get the daemon oom_score_adj") + } + return i, nil +} + +func restrictOOMScoreAdj(preferredOOMScoreAdj int) (int, error) { + currentOOMScoreAdj, err := getCurrentOOMScoreAdj() + if err != nil { + return preferredOOMScoreAdj, err + } + if preferredOOMScoreAdj < currentOOMScoreAdj { + return currentOOMScoreAdj, nil + } + return preferredOOMScoreAdj, nil +} + +const ( + // netNSFormat is the format of network namespace of a process. + netNSFormat = "/proc/%v/ns/net" + // ipcNSFormat is the format of ipc namespace of a process. + ipcNSFormat = "/proc/%v/ns/ipc" + // utsNSFormat is the format of uts namespace of a process. + utsNSFormat = "/proc/%v/ns/uts" + // pidNSFormat is the format of pid namespace of a process. + pidNSFormat = "/proc/%v/ns/pid" +) + +// GetNetworkNamespace returns the network namespace of a process. +func GetNetworkNamespace(pid uint32) string { + return fmt.Sprintf(netNSFormat, pid) +} + +// GetIPCNamespace returns the ipc namespace of a process. +func GetIPCNamespace(pid uint32) string { + return fmt.Sprintf(ipcNSFormat, pid) +} + +// GetUTSNamespace returns the uts namespace of a process. +func GetUTSNamespace(pid uint32) string { + return fmt.Sprintf(utsNSFormat, pid) +} + +// GetPIDNamespace returns the pid namespace of a process. +func GetPIDNamespace(pid uint32) string { + return fmt.Sprintf(pidNSFormat, pid) +} diff --git a/vendor/github.com/containerd/cri/pkg/containerd/opts/spec_windows.go b/vendor/github.com/containerd/cri/pkg/containerd/opts/spec_windows.go new file mode 100644 index 00000000000..50ee19d4832 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/containerd/opts/spec_windows.go @@ -0,0 +1,224 @@ +// +build windows + +/* + Copyright The containerd 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 opts + +import ( + "context" + "path/filepath" + "sort" + "strings" + + "github.com/containerd/containerd/containers" + "github.com/containerd/containerd/oci" + runtimespec "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + osinterface "github.com/containerd/cri/pkg/os" +) + +// WithWindowsNetworkNamespace sets windows network namespace for container. +// TODO(windows): Move this into container/containerd. +func WithWindowsNetworkNamespace(path string) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Windows == nil { + s.Windows = &runtimespec.Windows{} + } + if s.Windows.Network == nil { + s.Windows.Network = &runtimespec.WindowsNetwork{} + } + s.Windows.Network.NetworkNamespace = path + return nil + } +} + +// namedPipePath returns true if the given path is to a named pipe. +func namedPipePath(p string) bool { + return strings.HasPrefix(p, `\\.\pipe\`) +} + +// cleanMount returns a cleaned version of the mount path. The input is returned +// as-is if it is a named pipe path. +func cleanMount(p string) string { + if namedPipePath(p) { + return p + } + return filepath.Clean(p) +} + +// WithWindowsMounts sorts and adds runtime and CRI mounts to the spec for +// windows container. +func WithWindowsMounts(osi osinterface.OS, config *runtime.ContainerConfig, extra []*runtime.Mount) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, _ *containers.Container, s *runtimespec.Spec) error { + // mergeMounts merge CRI mounts with extra mounts. If a mount destination + // is mounted by both a CRI mount and an extra mount, the CRI mount will + // be kept. + var ( + criMounts = config.GetMounts() + mounts = append([]*runtime.Mount{}, criMounts...) + ) + // Copy all mounts from extra mounts, except for mounts overridden by CRI. + for _, e := range extra { + found := false + for _, c := range criMounts { + if cleanMount(e.ContainerPath) == cleanMount(c.ContainerPath) { + found = true + break + } + } + if !found { + mounts = append(mounts, e) + } + } + + // Sort mounts in number of parts. This ensures that high level mounts don't + // shadow other mounts. + sort.Sort(orderedMounts(mounts)) + + // Copy all mounts from default mounts, except for + // mounts overridden by supplied mount; + mountSet := make(map[string]struct{}) + for _, m := range mounts { + mountSet[cleanMount(m.ContainerPath)] = struct{}{} + } + + defaultMounts := s.Mounts + s.Mounts = nil + + for _, m := range defaultMounts { + dst := cleanMount(m.Destination) + if _, ok := mountSet[dst]; ok { + // filter out mount overridden by a supplied mount + continue + } + s.Mounts = append(s.Mounts, m) + } + + for _, mount := range mounts { + var ( + dst = mount.GetContainerPath() + src = mount.GetHostPath() + ) + // In the case of a named pipe mount on Windows, don't stat the file + // or do other operations that open it, as that could interfere with + // the listening process. filepath.Clean also breaks named pipe + // paths, so don't use it. + if !namedPipePath(src) { + if _, err := osi.Stat(src); err != nil { + // If the source doesn't exist, return an error instead + // of creating the source. This aligns with Docker's + // behavior on windows. + return errors.Wrapf(err, "failed to stat %q", src) + } + var err error + src, err = osi.ResolveSymbolicLink(src) + if err != nil { + return errors.Wrapf(err, "failed to resolve symlink %q", src) + } + // hcsshim requires clean path, especially '/' -> '\'. + src = filepath.Clean(src) + dst = filepath.Clean(dst) + } + + var options []string + // NOTE(random-liu): we don't change all mounts to `ro` when root filesystem + // is readonly. This is different from docker's behavior, but make more sense. + if mount.GetReadonly() { + options = append(options, "ro") + } else { + options = append(options, "rw") + } + s.Mounts = append(s.Mounts, runtimespec.Mount{ + Source: src, + Destination: dst, + Options: options, + }) + } + return nil + } +} + +// WithWindowsResources sets the provided resource restrictions for windows. +func WithWindowsResources(resources *runtime.WindowsContainerResources) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if resources == nil { + return nil + } + if s.Windows == nil { + s.Windows = &runtimespec.Windows{} + } + if s.Windows.Resources == nil { + s.Windows.Resources = &runtimespec.WindowsResources{} + } + if s.Windows.Resources.CPU == nil { + s.Windows.Resources.CPU = &runtimespec.WindowsCPUResources{} + } + if s.Windows.Resources.Memory == nil { + s.Windows.Resources.Memory = &runtimespec.WindowsMemoryResources{} + } + + var ( + count = uint64(resources.GetCpuCount()) + shares = uint16(resources.GetCpuShares()) + max = uint16(resources.GetCpuMaximum()) + limit = uint64(resources.GetMemoryLimitInBytes()) + ) + if count != 0 { + s.Windows.Resources.CPU.Count = &count + } + if shares != 0 { + s.Windows.Resources.CPU.Shares = &shares + } + if max != 0 { + s.Windows.Resources.CPU.Maximum = &max + } + if limit != 0 { + s.Windows.Resources.Memory.Limit = &limit + } + return nil + } +} + +// WithWindowsDefaultSandboxShares sets the default sandbox CPU shares +func WithWindowsDefaultSandboxShares(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Windows == nil { + s.Windows = &runtimespec.Windows{} + } + if s.Windows.Resources == nil { + s.Windows.Resources = &runtimespec.WindowsResources{} + } + if s.Windows.Resources.CPU == nil { + s.Windows.Resources.CPU = &runtimespec.WindowsCPUResources{} + } + i := uint16(DefaultSandboxCPUshares) + s.Windows.Resources.CPU.Shares = &i + return nil +} + +// WithWindowsCredentialSpec assigns `credentialSpec` to the +// `runtime.Spec.Windows.CredentialSpec` field. +func WithWindowsCredentialSpec(credentialSpec string) oci.SpecOpts { + return func(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error { + if s.Windows == nil { + s.Windows = &runtimespec.Windows{} + } + s.Windows.CredentialSpec = credentialSpec + return nil + } +} diff --git a/vendor/github.com/containerd/cri/pkg/containerd/opts/task.go b/vendor/github.com/containerd/cri/pkg/containerd/opts/task.go index 7cac8ca0c2d..622e3e9ce0d 100644 --- a/vendor/github.com/containerd/cri/pkg/containerd/opts/task.go +++ b/vendor/github.com/containerd/cri/pkg/containerd/opts/task.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 opts diff --git a/vendor/github.com/containerd/containerd/pkg/ttrpcutil/client_unix.go b/vendor/github.com/containerd/cri/pkg/containerd/platforms/default_unix.go similarity index 74% rename from vendor/github.com/containerd/containerd/pkg/ttrpcutil/client_unix.go rename to vendor/github.com/containerd/cri/pkg/containerd/platforms/default_unix.go index 16fb64954d3..ca7de553cf8 100644 --- a/vendor/github.com/containerd/containerd/pkg/ttrpcutil/client_unix.go +++ b/vendor/github.com/containerd/cri/pkg/containerd/platforms/default_unix.go @@ -16,15 +16,13 @@ limitations under the License. */ -package ttrpcutil +package platforms import ( - "net" - "strings" - "time" + "github.com/containerd/containerd/platforms" ) -func ttrpcDial(address string, timeout time.Duration) (net.Conn, error) { - address = strings.TrimPrefix(address, "unix://") - return net.DialTimeout("unix", address, timeout) +// Default returns the current platform's default platform specification. +func Default() platforms.MatchComparer { + return platforms.Default() } diff --git a/vendor/github.com/containerd/cri/pkg/containerd/platforms/default_windows.go b/vendor/github.com/containerd/cri/pkg/containerd/platforms/default_windows.go new file mode 100644 index 00000000000..f8679f21f2d --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/containerd/platforms/default_windows.go @@ -0,0 +1,77 @@ +// +build windows + +/* + Copyright The containerd 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 platforms + +import ( + "fmt" + "strconv" + "strings" + + "github.com/containerd/containerd/platforms" + imagespec "github.com/opencontainers/image-spec/specs-go/v1" + "golang.org/x/sys/windows" +) + +type matchComparer struct { + defaults platforms.Matcher + osVersionPrefix string +} + +// Match matches platform with the same windows major, minor +// and build version. +func (m matchComparer) Match(p imagespec.Platform) bool { + if m.defaults.Match(p) { + // TODO(windows): Figure out whether OSVersion is deprecated. + return strings.HasPrefix(p.OSVersion, m.osVersionPrefix) + } + return false +} + +// Less sorts matched platforms in front of other platforms. +// For matched platforms, it puts platforms with larger revision +// number in front. +func (m matchComparer) Less(p1, p2 imagespec.Platform) bool { + m1, m2 := m.Match(p1), m.Match(p2) + if m1 && m2 { + r1, r2 := revision(p1.OSVersion), revision(p2.OSVersion) + return r1 > r2 + } + return m1 && !m2 +} + +func revision(v string) int { + parts := strings.Split(v, ".") + if len(parts) < 4 { + return 0 + } + r, err := strconv.Atoi(parts[3]) + if err != nil { + return 0 + } + return r +} + +// Default returns the current platform's default platform specification. +func Default() platforms.MatchComparer { + major, minor, build := windows.RtlGetNtVersionNumbers() + return matchComparer{ + defaults: platforms.Only(platforms.DefaultSpec()), + osVersionPrefix: fmt.Sprintf("%d.%d.%d", major, minor, build), + } +} diff --git a/vendor/github.com/containerd/cri/pkg/containerd/util/util.go b/vendor/github.com/containerd/cri/pkg/containerd/util/util.go index 7c50f2c6527..ec062df0d11 100644 --- a/vendor/github.com/containerd/cri/pkg/containerd/util/util.go +++ b/vendor/github.com/containerd/cri/pkg/containerd/util/util.go @@ -1,17 +1,17 @@ /* -Copyright 2018 The containerd Authors. + Copyright The containerd 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 + 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 + 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. + 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 util diff --git a/vendor/github.com/containerd/cri/pkg/ioutil/read_closer.go b/vendor/github.com/containerd/cri/pkg/ioutil/read_closer.go index b9d5591e629..fbc30a6f730 100644 --- a/vendor/github.com/containerd/cri/pkg/ioutil/read_closer.go +++ b/vendor/github.com/containerd/cri/pkg/ioutil/read_closer.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 ioutil diff --git a/vendor/github.com/containerd/cri/pkg/ioutil/write_closer.go b/vendor/github.com/containerd/cri/pkg/ioutil/write_closer.go index 987169fe1a0..c816c514ad1 100644 --- a/vendor/github.com/containerd/cri/pkg/ioutil/write_closer.go +++ b/vendor/github.com/containerd/cri/pkg/ioutil/write_closer.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 ioutil diff --git a/vendor/github.com/containerd/cri/pkg/ioutil/writer_group.go b/vendor/github.com/containerd/cri/pkg/ioutil/writer_group.go index ea69ce88b22..0ed550497b7 100644 --- a/vendor/github.com/containerd/cri/pkg/ioutil/writer_group.go +++ b/vendor/github.com/containerd/cri/pkg/ioutil/writer_group.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 ioutil diff --git a/vendor/github.com/containerd/cri/pkg/netns/netns.go b/vendor/github.com/containerd/cri/pkg/netns/netns_unix.go similarity index 90% rename from vendor/github.com/containerd/cri/pkg/netns/netns.go rename to vendor/github.com/containerd/cri/pkg/netns/netns_unix.go index 56da0b6f29b..7449e2350e2 100644 --- a/vendor/github.com/containerd/cri/pkg/netns/netns.go +++ b/vendor/github.com/containerd/cri/pkg/netns/netns_unix.go @@ -1,17 +1,19 @@ +// +build !windows + /* -Copyright 2018 The Containerd Authors. + Copyright The containerd 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 + 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 + 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. + 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. */ // Copyright 2018 CNI authors diff --git a/vendor/github.com/containerd/cri/pkg/netns/netns_windows.go b/vendor/github.com/containerd/cri/pkg/netns/netns_windows.go new file mode 100644 index 00000000000..62dac415168 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/netns/netns_windows.go @@ -0,0 +1,78 @@ +// +build windows + +/* + Copyright The containerd 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 netns + +import "github.com/Microsoft/hcsshim/hcn" + +// NetNS holds network namespace for sandbox +type NetNS struct { + path string +} + +// NewNetNS creates a network namespace for the sandbox +func NewNetNS() (*NetNS, error) { + temp := hcn.HostComputeNamespace{} + hcnNamespace, err := temp.Create() + if err != nil { + return nil, err + } + + return &NetNS{path: hcnNamespace.Id}, nil +} + +// LoadNetNS loads existing network namespace. +func LoadNetNS(path string) *NetNS { + return &NetNS{path: path} +} + +// Remove removes network namepace if it exists and not closed. Remove is idempotent, +// meaning it might be invoked multiple times and provides consistent result. +func (n *NetNS) Remove() error { + hcnNamespace, err := hcn.GetNamespaceByID(n.path) + if err != nil { + if hcn.IsNotFoundError(err) { + return nil + } + return err + } + err = hcnNamespace.Delete() + if err == nil || hcn.IsNotFoundError(err) { + return nil + } + return err +} + +// Closed checks whether the network namespace has been closed. +func (n *NetNS) Closed() (bool, error) { + _, err := hcn.GetNamespaceByID(n.path) + if err == nil { + return false, nil + } + if hcn.IsNotFoundError(err) { + return true, nil + } + return false, err +} + +// GetPath returns network namespace path for sandbox container +func (n *NetNS) GetPath() string { + return n.path +} + +// NOTE: Do function is not supported. diff --git a/vendor/github.com/containerd/cri/pkg/os/os.go b/vendor/github.com/containerd/cri/pkg/os/os.go index f77515a112a..807a34d92fd 100644 --- a/vendor/github.com/containerd/cri/pkg/os/os.go +++ b/vendor/github.com/containerd/cri/pkg/os/os.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 os @@ -22,11 +22,7 @@ import ( "os" "path/filepath" - "github.com/containerd/containerd/mount" - "github.com/containerd/fifo" "github.com/docker/docker/pkg/symlink" - "golang.org/x/net/context" - "golang.org/x/sys/unix" ) // OS collects system level operations that need to be mocked out @@ -34,15 +30,11 @@ import ( type OS interface { MkdirAll(path string, perm os.FileMode) error RemoveAll(path string) error - OpenFifo(ctx context.Context, fn string, flag int, perm os.FileMode) (io.ReadWriteCloser, error) Stat(name string) (os.FileInfo, error) ResolveSymbolicLink(name string) (string, error) FollowSymlinkInScope(path, scope string) (string, error) CopyFile(src, dest string, perm os.FileMode) error WriteFile(filename string, data []byte, perm os.FileMode) error - Mount(source string, target string, fstype string, flags uintptr, data string) error - Unmount(target string) error - LookupMount(path string) (mount.Info, error) Hostname() (string, error) } @@ -59,11 +51,6 @@ func (RealOS) RemoveAll(path string) error { return os.RemoveAll(path) } -// OpenFifo will call fifo.OpenFifo to open a fifo. -func (RealOS) OpenFifo(ctx context.Context, fn string, flag int, perm os.FileMode) (io.ReadWriteCloser, error) { - return fifo.OpenFifo(ctx, fn, flag, perm) -} - // Stat will call os.Stat to get the status of the given file. func (RealOS) Stat(name string) (os.FileInfo, error) { return os.Stat(name) @@ -109,33 +96,6 @@ func (RealOS) WriteFile(filename string, data []byte, perm os.FileMode) error { return ioutil.WriteFile(filename, data, perm) } -// Mount will call unix.Mount to mount the file. -func (RealOS) Mount(source string, target string, fstype string, flags uintptr, data string) error { - return unix.Mount(source, target, fstype, flags, data) -} - -// Unmount will call Unmount to unmount the file. -func (RealOS) Unmount(target string) error { - return Unmount(target) -} - -// LookupMount gets mount info of a given path. -func (RealOS) LookupMount(path string) (mount.Info, error) { - return mount.Lookup(path) -} - -// Unmount unmounts the target. It does not return an error in case the target is not mounted. -// In case the target does not exist, the appropriate error is returned. -func Unmount(target string) error { - err := unix.Unmount(target, unix.MNT_DETACH) - if err == unix.EINVAL { - // ignore "not mounted" error - err = nil - } - - return err -} - // Hostname will call os.Hostname to get the hostname of the host. func (RealOS) Hostname() (string, error) { return os.Hostname() diff --git a/vendor/github.com/containerd/cri/pkg/os/os_unix.go b/vendor/github.com/containerd/cri/pkg/os/os_unix.go new file mode 100644 index 00000000000..51f57871de5 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/os/os_unix.go @@ -0,0 +1,59 @@ +// +build !windows + +/* + Copyright The containerd 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 os + +import ( + "github.com/containerd/containerd/mount" + "golang.org/x/sys/unix" +) + +// UNIX collects unix system level operations that need to be +// mocked out during tests. +type UNIX interface { + Mount(source string, target string, fstype string, flags uintptr, data string) error + Unmount(target string) error + LookupMount(path string) (mount.Info, error) +} + +// Mount will call unix.Mount to mount the file. +func (RealOS) Mount(source string, target string, fstype string, flags uintptr, data string) error { + return unix.Mount(source, target, fstype, flags, data) +} + +// Unmount will call Unmount to unmount the file. +func (RealOS) Unmount(target string) error { + return Unmount(target) +} + +// LookupMount gets mount info of a given path. +func (RealOS) LookupMount(path string) (mount.Info, error) { + return mount.Lookup(path) +} + +// Unmount unmounts the target. It does not return an error in case the target is not mounted. +// In case the target does not exist, the appropriate error is returned. +func Unmount(target string) error { + err := unix.Unmount(target, unix.MNT_DETACH) + if err == unix.EINVAL { + // ignore "not mounted" error + err = nil + } + + return err +} diff --git a/vendor/github.com/containerd/cri/pkg/registrar/registrar.go b/vendor/github.com/containerd/cri/pkg/registrar/registrar.go index 4df5f14608e..b83e7ce8501 100644 --- a/vendor/github.com/containerd/cri/pkg/registrar/registrar.go +++ b/vendor/github.com/containerd/cri/pkg/registrar/registrar.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 registrar diff --git a/vendor/github.com/containerd/cri/pkg/seccomp/seccomp_linux.go b/vendor/github.com/containerd/cri/pkg/seccomp/seccomp_linux.go new file mode 100644 index 00000000000..d41a98bf125 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/seccomp/seccomp_linux.go @@ -0,0 +1,88 @@ +/* + Copyright The containerd 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. +*/ + +/* + Copyright The runc 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 seccomp + +import ( + "bufio" + "os" + "strings" + + "golang.org/x/sys/unix" +) + +// IsEnabled returns if the kernel has been configured to support seccomp. +// From https://github.com/opencontainers/runc/blob/v1.0.0-rc91/libcontainer/seccomp/seccomp_linux.go#L86-L102 +func IsEnabled() bool { + // Try to read from /proc/self/status for kernels > 3.8 + s, err := parseStatusFile("/proc/self/status") + if err != nil { + // Check if Seccomp is supported, via CONFIG_SECCOMP. + if err := unix.Prctl(unix.PR_GET_SECCOMP, 0, 0, 0, 0); err != unix.EINVAL { + // Make sure the kernel has CONFIG_SECCOMP_FILTER. + if err := unix.Prctl(unix.PR_SET_SECCOMP, unix.SECCOMP_MODE_FILTER, 0, 0, 0); err != unix.EINVAL { + return true + } + } + return false + } + _, ok := s["Seccomp"] + return ok +} + +// parseStatusFile is from https://github.com/opencontainers/runc/blob/v1.0.0-rc91/libcontainer/seccomp/seccomp_linux.go#L243-L268 +func parseStatusFile(path string) (map[string]string, error) { + f, err := os.Open(path) + if err != nil { + return nil, err + } + defer f.Close() + + s := bufio.NewScanner(f) + status := make(map[string]string) + + for s.Scan() { + text := s.Text() + parts := strings.Split(text, ":") + + if len(parts) <= 1 { + continue + } + + status[parts[0]] = parts[1] + } + if err := s.Err(); err != nil { + return nil, err + } + + return status, nil +} diff --git a/vendor/github.com/containerd/cri/pkg/seccomp/seccomp_unsupported.go b/vendor/github.com/containerd/cri/pkg/seccomp/seccomp_unsupported.go new file mode 100644 index 00000000000..3f756260504 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/seccomp/seccomp_unsupported.go @@ -0,0 +1,23 @@ +// +build !linux + +/* + Copyright The containerd 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 seccomp + +func IsEnabled() bool { + return false +} diff --git a/vendor/github.com/containerd/cri/pkg/server/bandwidth/doc.go b/vendor/github.com/containerd/cri/pkg/server/bandwidth/doc.go new file mode 100644 index 00000000000..1fd55229d2c --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/bandwidth/doc.go @@ -0,0 +1,34 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 bandwidth provides utilities for bandwidth shaping +package bandwidth diff --git a/vendor/github.com/containerd/cri/pkg/server/bandwidth/fake_shaper.go b/vendor/github.com/containerd/cri/pkg/server/bandwidth/fake_shaper.go new file mode 100644 index 00000000000..e987ceca699 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/bandwidth/fake_shaper.go @@ -0,0 +1,72 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 bandwidth + +import ( + "errors" + + "k8s.io/apimachinery/pkg/api/resource" +) + +// FakeShaper provides an implementation of the bandwith.Shaper. +// Beware this is implementation has no features besides Reset and GetCIDRs. +type FakeShaper struct { + CIDRs []string + ResetCIDRs []string +} + +// Limit is not implemented +func (f *FakeShaper) Limit(cidr string, egress, ingress *resource.Quantity) error { + return errors.New("unimplemented") +} + +// Reset appends a particular CIDR to the set of ResetCIDRs being managed by this shaper +func (f *FakeShaper) Reset(cidr string) error { + f.ResetCIDRs = append(f.ResetCIDRs, cidr) + return nil +} + +// ReconcileInterface is not implemented +func (f *FakeShaper) ReconcileInterface() error { + return errors.New("unimplemented") +} + +// ReconcileCIDR is not implemented +func (f *FakeShaper) ReconcileCIDR(cidr string, egress, ingress *resource.Quantity) error { + return errors.New("unimplemented") +} + +// GetCIDRs returns the set of CIDRs that are being managed by this shaper +func (f *FakeShaper) GetCIDRs() ([]string, error) { + return f.CIDRs, nil +} diff --git a/vendor/github.com/containerd/cri/pkg/server/bandwidth/interfaces.go b/vendor/github.com/containerd/cri/pkg/server/bandwidth/interfaces.go new file mode 100644 index 00000000000..9eb4bfb60cf --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/bandwidth/interfaces.go @@ -0,0 +1,56 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 bandwidth + +import "k8s.io/apimachinery/pkg/api/resource" + +// Shaper is designed so that the shaper structs created +// satisfy the Shaper interface. +type Shaper interface { + // Limit the bandwidth for a particular CIDR on a particular interface + // * ingress and egress are in bits/second + // * cidr is expected to be a valid network CIDR (e.g. '1.2.3.4/32' or '10.20.0.1/16') + // 'egress' bandwidth limit applies to all packets on the interface whose source matches 'cidr' + // 'ingress' bandwidth limit applies to all packets on the interface whose destination matches 'cidr' + // Limits are aggregate limits for the CIDR, not per IP address. CIDRs must be unique, but can be overlapping, traffic + // that matches multiple CIDRs counts against all limits. + Limit(cidr string, egress, ingress *resource.Quantity) error + // Remove a bandwidth limit for a particular CIDR on a particular network interface + Reset(cidr string) error + // Reconcile the interface managed by this shaper with the state on the ground. + ReconcileInterface() error + // Reconcile a CIDR managed by this shaper with the state on the ground + ReconcileCIDR(cidr string, egress, ingress *resource.Quantity) error + // GetCIDRs returns the set of CIDRs that are being managed by this shaper + GetCIDRs() ([]string, error) +} diff --git a/vendor/github.com/containerd/cri/pkg/server/bandwidth/linux.go b/vendor/github.com/containerd/cri/pkg/server/bandwidth/linux.go new file mode 100644 index 00000000000..e8d71082595 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/bandwidth/linux.go @@ -0,0 +1,361 @@ +// +build linux + +/* + Copyright The containerd 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. +*/ + +/* +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 bandwidth + +import ( + "bufio" + "bytes" + "encoding/hex" + "fmt" + "net" + "regexp" + "strings" + + "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/utils/exec" + + "k8s.io/klog/v2" +) + +var ( + classShowMatcher = regexp.MustCompile(`class htb (1:\d+)`) + classAndHandleMatcher = regexp.MustCompile(`filter parent 1:.*fh (\d+::\d+).*flowid (\d+:\d+)`) +) + +// tcShaper provides an implementation of the Shaper interface on Linux using the 'tc' tool. +// In general, using this requires that the caller posses the NET_CAP_ADMIN capability, though if you +// do this within an container, it only requires the NS_CAPABLE capability for manipulations to that +// container's network namespace. +// Uses the hierarchical token bucket queuing discipline (htb), this requires Linux 2.4.20 or newer +// or a custom kernel with that queuing discipline backported. +type tcShaper struct { + e exec.Interface + iface string +} + +// NewTCShaper makes a new tcShaper for the given interface +func NewTCShaper(iface string) Shaper { + shaper := &tcShaper{ + e: exec.New(), + iface: iface, + } + return shaper +} + +func (t *tcShaper) execAndLog(cmdStr string, args ...string) error { + klog.V(6).Infof("Running: %s %s", cmdStr, strings.Join(args, " ")) + cmd := t.e.Command(cmdStr, args...) + out, err := cmd.CombinedOutput() + klog.V(6).Infof("Output from tc: %s", string(out)) + return err +} + +func (t *tcShaper) nextClassID() (int, error) { + data, err := t.e.Command("tc", "class", "show", "dev", t.iface).CombinedOutput() + if err != nil { + return -1, err + } + + scanner := bufio.NewScanner(bytes.NewBuffer(data)) + classes := sets.String{} + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + // skip empty lines + if len(line) == 0 { + continue + } + // expected tc line: + // class htb 1:1 root prio 0 rate 1000Kbit ceil 1000Kbit burst 1600b cburst 1600b + matches := classShowMatcher.FindStringSubmatch(line) + if len(matches) != 2 { + return -1, fmt.Errorf("unexpected output from tc: %s (%v)", scanner.Text(), matches) + } + classes.Insert(matches[1]) + } + + // Make sure it doesn't go forever + for nextClass := 1; nextClass < 10000; nextClass++ { + if !classes.Has(fmt.Sprintf("1:%d", nextClass)) { + return nextClass, nil + } + } + // This should really never happen + return -1, fmt.Errorf("exhausted class space, please try again") +} + +// Convert a CIDR from text to a hex representation +// Strips any masked parts of the IP, so 1.2.3.4/16 becomes hex(1.2.0.0)/ffffffff +func hexCIDR(cidr string) (string, error) { + ip, ipnet, err := net.ParseCIDR(cidr) + if err != nil { + return "", err + } + ip = ip.Mask(ipnet.Mask) + hexIP := hex.EncodeToString([]byte(ip)) + hexMask := ipnet.Mask.String() + return hexIP + "/" + hexMask, nil +} + +// Convert a CIDR from hex representation to text, opposite of the above. +func asciiCIDR(cidr string) (string, error) { + parts := strings.Split(cidr, "/") + if len(parts) != 2 { + return "", fmt.Errorf("unexpected CIDR format: %s", cidr) + } + ipData, err := hex.DecodeString(parts[0]) + if err != nil { + return "", err + } + ip := net.IP(ipData) + + maskData, err := hex.DecodeString(parts[1]) + if err != nil { + return "", err + } + mask := net.IPMask(maskData) + size, _ := mask.Size() + + return fmt.Sprintf("%s/%d", ip.String(), size), nil +} + +func (t *tcShaper) findCIDRClass(cidr string) (classAndHandleList [][]string, found bool, err error) { + data, err := t.e.Command("tc", "filter", "show", "dev", t.iface).CombinedOutput() + if err != nil { + return classAndHandleList, false, err + } + + hex, err := hexCIDR(cidr) + if err != nil { + return classAndHandleList, false, err + } + spec := fmt.Sprintf("match %s", hex) + + scanner := bufio.NewScanner(bytes.NewBuffer(data)) + filter := "" + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + if len(line) == 0 { + continue + } + if strings.HasPrefix(line, "filter") { + filter = line + continue + } + if strings.Contains(line, spec) { + // expected tc line: + // `filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1` (old version) or + // `filter parent 1: protocol ip pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 not_in_hw` (new version) + matches := classAndHandleMatcher.FindStringSubmatch(filter) + if len(matches) != 3 { + return classAndHandleList, false, fmt.Errorf("unexpected output from tc: %s %d (%v)", filter, len(matches), matches) + } + resultTmp := []string{matches[2], matches[1]} + classAndHandleList = append(classAndHandleList, resultTmp) + } + } + if len(classAndHandleList) > 0 { + return classAndHandleList, true, nil + } + return classAndHandleList, false, nil +} + +func makeKBitString(rsrc *resource.Quantity) string { + return fmt.Sprintf("%dkbit", (rsrc.Value() / 1000)) +} + +func (t *tcShaper) makeNewClass(rate string) (int, error) { + class, err := t.nextClassID() + if err != nil { + return -1, err + } + if err := t.execAndLog("tc", "class", "add", + "dev", t.iface, + "parent", "1:", + "classid", fmt.Sprintf("1:%d", class), + "htb", "rate", rate); err != nil { + return -1, err + } + return class, nil +} + +func (t *tcShaper) Limit(cidr string, upload, download *resource.Quantity) (err error) { + var downloadClass, uploadClass int + if download != nil { + if downloadClass, err = t.makeNewClass(makeKBitString(download)); err != nil { + return err + } + if err := t.execAndLog("tc", "filter", "add", + "dev", t.iface, + "protocol", "ip", + "parent", "1:0", + "prio", "1", "u32", + "match", "ip", "dst", cidr, + "flowid", fmt.Sprintf("1:%d", downloadClass)); err != nil { + return err + } + } + if upload != nil { + if uploadClass, err = t.makeNewClass(makeKBitString(upload)); err != nil { + return err + } + if err := t.execAndLog("tc", "filter", "add", + "dev", t.iface, + "protocol", "ip", + "parent", "1:0", + "prio", "1", "u32", + "match", "ip", "src", cidr, + "flowid", fmt.Sprintf("1:%d", uploadClass)); err != nil { + return err + } + } + return nil +} + +// tests to see if an interface exists, if it does, return true and the status line for the interface +// returns false, "", if an error occurs. +func (t *tcShaper) interfaceExists() (bool, string, error) { + data, err := t.e.Command("tc", "qdisc", "show", "dev", t.iface).CombinedOutput() + if err != nil { + return false, "", err + } + value := strings.TrimSpace(string(data)) + if len(value) == 0 { + return false, "", nil + } + // Newer versions of tc and/or the kernel return the following instead of nothing: + // qdisc noqueue 0: root refcnt 2 + fields := strings.Fields(value) + if len(fields) > 1 && fields[1] == "noqueue" { + return false, "", nil + } + return true, value, nil +} + +func (t *tcShaper) ReconcileCIDR(cidr string, upload, download *resource.Quantity) error { + _, found, err := t.findCIDRClass(cidr) + if err != nil { + return err + } + if !found { + return t.Limit(cidr, upload, download) + } + // TODO: actually check bandwidth limits here + return nil +} + +func (t *tcShaper) ReconcileInterface() error { + exists, output, err := t.interfaceExists() + if err != nil { + return err + } + if !exists { + klog.V(4).Info("Didn't find bandwidth interface, creating") + return t.initializeInterface() + } + fields := strings.Split(output, " ") + if len(fields) < 12 || fields[1] != "htb" || fields[2] != "1:" { + if err := t.deleteInterface(fields[2]); err != nil { + return err + } + return t.initializeInterface() + } + return nil +} + +func (t *tcShaper) initializeInterface() error { + return t.execAndLog("tc", "qdisc", "add", "dev", t.iface, "root", "handle", "1:", "htb", "default", "30") +} + +func (t *tcShaper) Reset(cidr string) error { + classAndHandle, found, err := t.findCIDRClass(cidr) + if err != nil { + return err + } + if !found { + return fmt.Errorf("Failed to find cidr: %s on interface: %s", cidr, t.iface) + } + for i := 0; i < len(classAndHandle); i++ { + if err := t.execAndLog("tc", "filter", "del", + "dev", t.iface, + "parent", "1:", + "proto", "ip", + "prio", "1", + "handle", classAndHandle[i][1], "u32"); err != nil { + return err + } + if err := t.execAndLog("tc", "class", "del", + "dev", t.iface, + "parent", "1:", + "classid", classAndHandle[i][0]); err != nil { + return err + } + } + return nil +} + +func (t *tcShaper) deleteInterface(class string) error { + return t.execAndLog("tc", "qdisc", "delete", "dev", t.iface, "root", "handle", class) +} + +func (t *tcShaper) GetCIDRs() ([]string, error) { + data, err := t.e.Command("tc", "filter", "show", "dev", t.iface).CombinedOutput() + if err != nil { + return nil, err + } + + result := []string{} + scanner := bufio.NewScanner(bytes.NewBuffer(data)) + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + if len(line) == 0 { + continue + } + if strings.Contains(line, "match") { + parts := strings.Split(line, " ") + // expected tc line: + // match at + if len(parts) != 4 { + return nil, fmt.Errorf("unexpected output: %v", parts) + } + cidr, err := asciiCIDR(parts[1]) + if err != nil { + return nil, err + } + result = append(result, cidr) + } + } + return result, nil +} diff --git a/vendor/github.com/containerd/cri/pkg/server/bandwidth/unsupported.go b/vendor/github.com/containerd/cri/pkg/server/bandwidth/unsupported.go new file mode 100644 index 00000000000..12c5ad83bec --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/bandwidth/unsupported.go @@ -0,0 +1,69 @@ +// +build !linux + +/* + Copyright The containerd 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. +*/ + +/* +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 bandwidth + +import ( + "errors" + + "k8s.io/apimachinery/pkg/api/resource" +) + +type unsupportedShaper struct { +} + +// NewTCShaper makes a new unsupportedShapper for the given interface +func NewTCShaper(iface string) Shaper { + return &unsupportedShaper{} +} + +func (f *unsupportedShaper) Limit(cidr string, egress, ingress *resource.Quantity) error { + return errors.New("unimplemented") +} + +func (f *unsupportedShaper) Reset(cidr string) error { + return nil +} + +func (f *unsupportedShaper) ReconcileInterface() error { + return errors.New("unimplemented") +} + +func (f *unsupportedShaper) ReconcileCIDR(cidr string, egress, ingress *resource.Quantity) error { + return errors.New("unimplemented") +} + +func (f *unsupportedShaper) GetCIDRs() ([]string, error) { + return []string{}, nil +} diff --git a/vendor/github.com/containerd/cri/pkg/server/bandwidth/utils.go b/vendor/github.com/containerd/cri/pkg/server/bandwidth/utils.go new file mode 100644 index 00000000000..f90718b6b1d --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/bandwidth/utils.go @@ -0,0 +1,82 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 bandwidth + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/api/resource" +) + +var minRsrc = resource.MustParse("1k") +var maxRsrc = resource.MustParse("1P") + +func validateBandwidthIsReasonable(rsrc *resource.Quantity) error { + if rsrc.Value() < minRsrc.Value() { + return fmt.Errorf("resource is unreasonably small (< 1kbit)") + } + if rsrc.Value() > maxRsrc.Value() { + return fmt.Errorf("resoruce is unreasonably large (> 1Pbit)") + } + return nil +} + +// ExtractPodBandwidthResources extracts the ingress and egress from the given pod annotations +func ExtractPodBandwidthResources(podAnnotations map[string]string) (ingress, egress *resource.Quantity, err error) { + if podAnnotations == nil { + return nil, nil, nil + } + str, found := podAnnotations["kubernetes.io/ingress-bandwidth"] + if found { + ingressValue, err := resource.ParseQuantity(str) + if err != nil { + return nil, nil, err + } + ingress = &ingressValue + if err := validateBandwidthIsReasonable(ingress); err != nil { + return nil, nil, err + } + } + str, found = podAnnotations["kubernetes.io/egress-bandwidth"] + if found { + egressValue, err := resource.ParseQuantity(str) + if err != nil { + return nil, nil, err + } + egress = &egressValue + if err := validateBandwidthIsReasonable(egress); err != nil { + return nil, nil, err + } + } + return ingress, egress, nil +} diff --git a/vendor/github.com/containerd/cri/pkg/server/cni_conf_syncer.go b/vendor/github.com/containerd/cri/pkg/server/cni_conf_syncer.go new file mode 100644 index 00000000000..03131a9bea7 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/cni_conf_syncer.go @@ -0,0 +1,121 @@ +/* + Copyright The containerd 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 server + +import ( + "os" + "sync" + + cni "github.com/containerd/go-cni" + "github.com/fsnotify/fsnotify" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +// cniNetConfSyncer is used to reload cni network conf triggered by fs change +// events. +type cniNetConfSyncer struct { + // only used for lastSyncStatus + sync.RWMutex + lastSyncStatus error + + watcher *fsnotify.Watcher + confDir string + netPlugin cni.CNI + loadOpts []cni.CNIOpt +} + +// newCNINetConfSyncer creates cni network conf syncer. +func newCNINetConfSyncer(confDir string, netPlugin cni.CNI, loadOpts []cni.CNIOpt) (*cniNetConfSyncer, error) { + watcher, err := fsnotify.NewWatcher() + if err != nil { + return nil, errors.Wrap(err, "failed to create fsnotify watcher") + } + + if err := os.MkdirAll(confDir, 0700); err != nil { + return nil, errors.Wrapf(err, "failed to create cni conf dir=%s for watch", confDir) + } + + if err := watcher.Add(confDir); err != nil { + return nil, errors.Wrapf(err, "failed to watch cni conf dir %s", confDir) + } + + syncer := &cniNetConfSyncer{ + watcher: watcher, + confDir: confDir, + netPlugin: netPlugin, + loadOpts: loadOpts, + } + + if err := syncer.netPlugin.Load(syncer.loadOpts...); err != nil { + logrus.WithError(err).Error("failed to load cni during init, please check CRI plugin status before setting up network for pods") + syncer.updateLastStatus(err) + } + return syncer, nil +} + +// syncLoop monitors any fs change events from cni conf dir and tries to reload +// cni configuration. +func (syncer *cniNetConfSyncer) syncLoop() error { + for { + select { + case event := <-syncer.watcher.Events: + // Only reload config when receiving write/rename/remove + // events + // + // TODO(fuweid): Might only reload target cni config + // files to prevent no-ops. + if event.Op&(fsnotify.Chmod|fsnotify.Create) > 0 { + logrus.Debugf("ignore event from cni conf dir: %s", event) + continue + } + logrus.Debugf("receiving change event from cni conf dir: %s", event) + + lerr := syncer.netPlugin.Load(syncer.loadOpts...) + if lerr != nil { + logrus.WithError(lerr). + Errorf("failed to reload cni configuration after receiving fs change event(%s)", event) + } + syncer.updateLastStatus(lerr) + + case err := <-syncer.watcher.Errors: + if err != nil { + logrus.WithError(err).Error("failed to continue sync cni conf change") + return err + } + } + } +} + +// lastStatus retrieves last sync status. +func (syncer *cniNetConfSyncer) lastStatus() error { + syncer.RLock() + defer syncer.RUnlock() + return syncer.lastSyncStatus +} + +// updateLastStatus will be called after every single cni load. +func (syncer *cniNetConfSyncer) updateLastStatus(err error) { + syncer.Lock() + defer syncer.Unlock() + syncer.lastSyncStatus = err +} + +// stop stops watcher in the syncLoop. +func (syncer *cniNetConfSyncer) stop() error { + return syncer.watcher.Close() +} diff --git a/vendor/github.com/containerd/cri/pkg/server/container_attach.go b/vendor/github.com/containerd/cri/pkg/server/container_attach.go index 79aed7bb1be..c8101ff7ce1 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_attach.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_attach.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -44,6 +44,8 @@ func (c *criService) Attach(ctx context.Context, r *runtime.AttachRequest) (*run func (c *criService) attachContainer(ctx context.Context, id string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error { + ctx, cancel := context.WithCancel(ctx) + defer cancel() // Get container from our container store. cntr, err := c.containerStore.Get(id) if err != nil { @@ -60,7 +62,7 @@ func (c *criService) attachContainer(ctx context.Context, id string, stdin io.Re if err != nil { return errors.Wrap(err, "failed to load task") } - handleResizing(resize, func(size remotecommand.TerminalSize) { + handleResizing(ctx, resize, func(size remotecommand.TerminalSize) { if err := task.Resize(ctx, uint32(size.Width), uint32(size.Height)); err != nil { log.G(ctx).WithError(err).Errorf("Failed to resize task %q console", id) } diff --git a/vendor/github.com/containerd/cri/pkg/server/container_create.go b/vendor/github.com/containerd/cri/pkg/server/container_create.go index 878cd13e3ad..12c0685181a 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_create.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_create.go @@ -1,64 +1,43 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server import ( "path/filepath" - "strconv" - "strings" "time" "github.com/containerd/containerd" "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/contrib/apparmor" - "github.com/containerd/containerd/contrib/seccomp" "github.com/containerd/containerd/log" "github.com/containerd/containerd/oci" - "github.com/containerd/cri/pkg/annotations" - "github.com/containerd/cri/pkg/config" - customopts "github.com/containerd/cri/pkg/containerd/opts" - ctrdutil "github.com/containerd/cri/pkg/containerd/util" - cio "github.com/containerd/cri/pkg/server/io" - containerstore "github.com/containerd/cri/pkg/store/container" - "github.com/containerd/cri/pkg/util" "github.com/containerd/typeurl" "github.com/davecgh/go-spew/spew" imagespec "github.com/opencontainers/image-spec/specs-go/v1" runtimespec "github.com/opencontainers/runtime-spec/specs-go" selinux "github.com/opencontainers/selinux/go-selinux" - "github.com/opencontainers/selinux/go-selinux/label" "github.com/pkg/errors" "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" -) -const ( - // profileNamePrefix is the prefix for loading profiles on a localhost. Eg. AppArmor localhost/profileName. - profileNamePrefix = "localhost/" // TODO (mikebrow): get localhost/ & runtime/default from CRI kubernetes/kubernetes#51747 - // runtimeDefault indicates that we should use or create a runtime default profile. - runtimeDefault = "runtime/default" - // dockerDefault indicates that we should use or create a docker default profile. - dockerDefault = "docker/default" - // appArmorDefaultProfileName is name to use when creating a default apparmor profile. - appArmorDefaultProfileName = "cri-containerd.apparmor.d" - // unconfinedProfile is a string indicating one should run a pod/containerd without a security profile - unconfinedProfile = "unconfined" - // seccompDefaultProfile is the default seccomp profile. - seccompDefaultProfile = dockerDefault + customopts "github.com/containerd/cri/pkg/containerd/opts" + ctrdutil "github.com/containerd/cri/pkg/containerd/util" + cio "github.com/containerd/cri/pkg/server/io" + containerstore "github.com/containerd/cri/pkg/store/container" + "github.com/containerd/cri/pkg/util" ) func init() { @@ -90,6 +69,7 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta if metadata == nil { return nil, errors.New("container config must include metadata") } + containerName := metadata.Name name := makeContainerName(metadata, sandboxConfig.GetMetadata()) log.G(ctx).Debugf("Generated id %q for container %q", id, name) if err = c.containerNameIndex.Reserve(name, id); err != nil { @@ -157,11 +137,16 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta } }() - // Create container volumes mounts. - volumeMounts := c.generateVolumeMounts(containerRootDir, config.GetMounts(), &image.ImageSpec.Config) + var volumeMounts []*runtime.Mount + if !c.config.IgnoreImageDefinedVolumes { + // Create container image volumes mounts. + volumeMounts = c.volumeMounts(containerRootDir, config.GetMounts(), &image.ImageSpec.Config) + } else if len(image.ImageSpec.Config.Volumes) != 0 { + log.G(ctx).Debugf("Ignoring volumes defined in image %v because IgnoreImageDefinedVolumes is set", image.ID) + } - // Generate container runtime spec. - mounts := c.generateContainerMounts(sandboxID, config) + // Generate container mounts. + mounts := c.containerMounts(sandboxID, config) ociRuntime, err := c.getSandboxRuntime(sandboxConfig, sandbox.Metadata.RuntimeHandler) if err != nil { @@ -169,7 +154,7 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta } log.G(ctx).Debugf("Use OCI runtime %+v for sandbox %q and container %q", ociRuntime, sandboxID, id) - spec, err := c.generateContainerSpec(id, sandboxID, sandboxPid, config, sandboxConfig, + spec, err := c.containerSpec(id, sandboxID, sandboxPid, sandbox.NetNSPath, containerName, config, sandboxConfig, &image.ImageSpec.Config, append(mounts, volumeMounts...), ociRuntime) if err != nil { return nil, errors.Wrapf(err, "failed to generate container %q spec", id) @@ -199,7 +184,6 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta // rootfs readonly (requested by spec.Root.Readonly). customopts.WithNewSnapshot(id, containerdImage), } - if len(volumeMounts) > 0 { mountMap := make(map[string]string) for _, v := range volumeMounts { @@ -233,58 +217,11 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta } }() - var specOpts []oci.SpecOpts - securityContext := config.GetLinux().GetSecurityContext() - // Set container username. This could only be done by containerd, because it needs - // access to the container rootfs. Pass user name to containerd, and let it overwrite - // the spec for us. - userstr, err := generateUserString( - securityContext.GetRunAsUsername(), - securityContext.GetRunAsUser(), - securityContext.GetRunAsGroup()) - + specOpts, err := c.containerSpecOpts(config, &image.ImageSpec.Config) if err != nil { - return nil, errors.Wrap(err, "failed to generate user string") - } - if userstr == "" { - // Lastly, since no user override was passed via CRI try to set via OCI - // Image - userstr = image.ImageSpec.Config.User - } - if userstr != "" { - specOpts = append(specOpts, oci.WithUser(userstr)) + return nil, errors.Wrap(err, "") } - if securityContext.GetRunAsUsername() != "" { - userstr = securityContext.GetRunAsUsername() - } else { - // Even if RunAsUser is not set, we still call `GetValue` to get uid 0. - // Because it is still useful to get additional gids for uid 0. - userstr = strconv.FormatInt(securityContext.GetRunAsUser().GetValue(), 10) - } - specOpts = append(specOpts, customopts.WithAdditionalGIDs(userstr)) - - apparmorSpecOpts, err := generateApparmorSpecOpts( - securityContext.GetApparmorProfile(), - securityContext.GetPrivileged(), - c.apparmorEnabled) - if err != nil { - return nil, errors.Wrap(err, "failed to generate apparmor spec opts") - } - if apparmorSpecOpts != nil { - specOpts = append(specOpts, apparmorSpecOpts) - } - - seccompSpecOpts, err := generateSeccompSpecOpts( - securityContext.GetSeccompProfilePath(), - securityContext.GetPrivileged(), - c.seccompEnabled) - if err != nil { - return nil, errors.Wrap(err, "failed to generate seccomp spec opts") - } - if seccompSpecOpts != nil { - specOpts = append(specOpts, seccompSpecOpts) - } containerLabels := buildLabels(config.Labels, containerKindContainer) runtimeOptions, err := getRuntimeOptions(sandboxInfo) @@ -336,147 +273,10 @@ func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateConta return &runtime.CreateContainerResponse{ContainerId: id}, nil } -func (c *criService) generateContainerSpec(id string, sandboxID string, sandboxPid uint32, config *runtime.ContainerConfig, - sandboxConfig *runtime.PodSandboxConfig, imageConfig *imagespec.ImageConfig, extraMounts []*runtime.Mount, - ociRuntime config.Runtime) (retSpec *runtimespec.Spec, retErr error) { - - specOpts := []oci.SpecOpts{ - customopts.WithoutRunMount, - customopts.WithoutDefaultSecuritySettings, - customopts.WithRelativeRoot(relativeRootfsPath), - customopts.WithProcessArgs(config, imageConfig), - oci.WithDefaultPathEnv, - // this will be set based on the security context below - oci.WithNewPrivileges, - } - if config.GetWorkingDir() != "" { - specOpts = append(specOpts, oci.WithProcessCwd(config.GetWorkingDir())) - } else if imageConfig.WorkingDir != "" { - specOpts = append(specOpts, oci.WithProcessCwd(imageConfig.WorkingDir)) - } - - if config.GetTty() { - specOpts = append(specOpts, oci.WithTTY) - } - - // Add HOSTNAME env. - var ( - err error - hostname = sandboxConfig.GetHostname() - ) - if hostname == "" { - if hostname, err = c.os.Hostname(); err != nil { - return nil, err - } - } - specOpts = append(specOpts, oci.WithEnv([]string{hostnameEnv + "=" + hostname})) - - // Apply envs from image config first, so that envs from container config - // can override them. - env := imageConfig.Env - for _, e := range config.GetEnvs() { - env = append(env, e.GetKey()+"="+e.GetValue()) - } - specOpts = append(specOpts, oci.WithEnv(env)) - - securityContext := config.GetLinux().GetSecurityContext() - labelOptions, err := toLabel(securityContext.GetSelinuxOptions()) - if err != nil { - return nil, err - } - if len(labelOptions) == 0 { // Use pod level SELinux config - if sandbox, err := c.sandboxStore.Get(sandboxID); err == nil { - labelOptions, err = selinux.DupSecOpt(sandbox.ProcessLabel) - if err != nil { - return nil, err - } - } - } - - processLabel, mountLabel, err := label.InitLabels(labelOptions) - if err != nil { - return nil, errors.Wrapf(err, "failed to init selinux options %+v", securityContext.GetSelinuxOptions()) - } - defer func() { - if retErr != nil { - selinux.ReleaseLabel(processLabel) - } - }() - - specOpts = append(specOpts, customopts.WithMounts(c.os, config, extraMounts, mountLabel)) - - if !c.config.DisableProcMount { - // Apply masked paths if specified. - // If the container is privileged, this will be cleared later on. - specOpts = append(specOpts, oci.WithMaskedPaths(securityContext.GetMaskedPaths())) - - // Apply readonly paths if specified. - // If the container is privileged, this will be cleared later on. - specOpts = append(specOpts, oci.WithReadonlyPaths(securityContext.GetReadonlyPaths())) - } - - if securityContext.GetPrivileged() { - if !sandboxConfig.GetLinux().GetSecurityContext().GetPrivileged() { - return nil, errors.New("no privileged container allowed in sandbox") - } - specOpts = append(specOpts, oci.WithPrivileged) - if !ociRuntime.PrivilegedWithoutHostDevices { - specOpts = append(specOpts, customopts.WithPrivilegedDevices) - } - } else { // not privileged - specOpts = append(specOpts, customopts.WithDevices(c.os, config), customopts.WithCapabilities(securityContext)) - } - - // Clear all ambient capabilities. The implication of non-root + caps - // is not clearly defined in Kubernetes. - // See https://github.com/kubernetes/kubernetes/issues/56374 - // Keep docker's behavior for now. - specOpts = append(specOpts, - customopts.WithoutAmbientCaps, - customopts.WithSelinuxLabels(processLabel, mountLabel), - ) - - // TODO: Figure out whether we should set no new privilege for sandbox container by default - if securityContext.GetNoNewPrivs() { - specOpts = append(specOpts, oci.WithNoNewPrivileges) - } - // TODO(random-liu): [P1] Set selinux options (privileged or not). - if securityContext.GetReadonlyRootfs() { - specOpts = append(specOpts, oci.WithRootFSReadonly()) - } - - if c.config.DisableCgroup { - specOpts = append(specOpts, customopts.WithDisabledCgroups) - } else { - specOpts = append(specOpts, customopts.WithResources(config.GetLinux().GetResources())) - if sandboxConfig.GetLinux().GetCgroupParent() != "" { - cgroupsPath := getCgroupsPath(sandboxConfig.GetLinux().GetCgroupParent(), id) - specOpts = append(specOpts, oci.WithCgroup(cgroupsPath)) - } - } - - supplementalGroups := securityContext.GetSupplementalGroups() - - for pKey, pValue := range getPassthroughAnnotations(sandboxConfig.Annotations, - ociRuntime.PodAnnotations) { - specOpts = append(specOpts, customopts.WithAnnotation(pKey, pValue)) - } - - specOpts = append(specOpts, - customopts.WithOOMScoreAdj(config, c.config.RestrictOOMScoreAdj), - customopts.WithPodNamespaces(securityContext, sandboxPid), - customopts.WithSupplementalGroups(supplementalGroups), - customopts.WithAnnotation(annotations.ContainerType, annotations.ContainerTypeContainer), - customopts.WithAnnotation(annotations.SandboxID, sandboxID), - ) - - return runtimeSpec(id, specOpts...) -} - -// generateVolumeMounts sets up image volumes for container. Rely on the removal of container +// volumeMounts sets up image volumes for container. Rely on the removal of container // root directory to do cleanup. Note that image volume will be skipped, if there is criMounts // specified with the same destination. -func (c *criService) generateVolumeMounts(containerRootDir string, criMounts []*runtime.Mount, config *imagespec.ImageConfig) []*runtime.Mount { +func (c *criService) volumeMounts(containerRootDir string, criMounts []*runtime.Mount, config *imagespec.ImageConfig) []*runtime.Mount { if len(config.Volumes) == 0 { return nil } @@ -496,174 +296,42 @@ func (c *criService) generateVolumeMounts(containerRootDir string, criMounts []* ContainerPath: dst, HostPath: src, SelinuxRelabel: true, - // Use default mount propagation. - }) - } - return mounts -} - -// generateContainerMounts sets up necessary container mounts including /dev/shm, /etc/hosts -// and /etc/resolv.conf. -func (c *criService) generateContainerMounts(sandboxID string, config *runtime.ContainerConfig) []*runtime.Mount { - var mounts []*runtime.Mount - securityContext := config.GetLinux().GetSecurityContext() - if !isInCRIMounts(etcHostname, config.GetMounts()) { - // /etc/hostname is added since 1.1.6, 1.2.4 and 1.3. - // For in-place upgrade, the old sandbox doesn't have the hostname file, - // do not mount this in that case. - // TODO(random-liu): Remove the check and always mount this when - // containerd 1.1 and 1.2 are deprecated. - hostpath := c.getSandboxHostname(sandboxID) - if _, err := c.os.Stat(hostpath); err == nil { - mounts = append(mounts, &runtime.Mount{ - ContainerPath: etcHostname, - HostPath: hostpath, - Readonly: securityContext.GetReadonlyRootfs(), - }) - } - } - - if !isInCRIMounts(etcHosts, config.GetMounts()) { - mounts = append(mounts, &runtime.Mount{ - ContainerPath: etcHosts, - HostPath: c.getSandboxHosts(sandboxID), - Readonly: securityContext.GetReadonlyRootfs(), - }) - } - - // Mount sandbox resolv.config. - // TODO: Need to figure out whether we should always mount it as read-only - if !isInCRIMounts(resolvConfPath, config.GetMounts()) { - mounts = append(mounts, &runtime.Mount{ - ContainerPath: resolvConfPath, - HostPath: c.getResolvPath(sandboxID), - Readonly: securityContext.GetReadonlyRootfs(), - }) - } - - if !isInCRIMounts(devShm, config.GetMounts()) { - sandboxDevShm := c.getSandboxDevShm(sandboxID) - if securityContext.GetNamespaceOptions().GetIpc() == runtime.NamespaceMode_NODE { - sandboxDevShm = devShm - } - mounts = append(mounts, &runtime.Mount{ - ContainerPath: devShm, - HostPath: sandboxDevShm, - Readonly: false, }) } return mounts } // runtimeSpec returns a default runtime spec used in cri-containerd. -func runtimeSpec(id string, opts ...oci.SpecOpts) (*runtimespec.Spec, error) { +func (c *criService) runtimeSpec(id string, baseSpecFile string, opts ...oci.SpecOpts) (*runtimespec.Spec, error) { // GenerateSpec needs namespace. ctx := ctrdutil.NamespacedContext() - spec, err := oci.GenerateSpec(ctx, nil, &containers.Container{ID: id}, opts...) - if err != nil { - return nil, err + container := &containers.Container{ID: id} + + if baseSpecFile != "" { + baseSpec, ok := c.baseOCISpecs[baseSpecFile] + if !ok { + return nil, errors.Errorf("can't find base OCI spec %q", baseSpecFile) + } + + spec := oci.Spec{} + if err := util.DeepCopy(&spec, &baseSpec); err != nil { + return nil, errors.Wrap(err, "failed to clone OCI spec") + } + + // Fix up cgroups path + applyOpts := append([]oci.SpecOpts{oci.WithNamespacedCgroup()}, opts...) + + if err := oci.ApplyOpts(ctx, nil, container, &spec, applyOpts...); err != nil { + return nil, errors.Wrap(err, "failed to apply OCI options") + } + + return &spec, nil } + + spec, err := oci.GenerateSpec(ctx, nil, container, opts...) + if err != nil { + return nil, errors.Wrap(err, "failed to generate spec") + } + return spec, nil } - -// generateSeccompSpecOpts generates containerd SpecOpts for seccomp. -func generateSeccompSpecOpts(seccompProf string, privileged, seccompEnabled bool) (oci.SpecOpts, error) { - if privileged { - // Do not set seccomp profile when container is privileged - return nil, nil - } - // Set seccomp profile - if seccompProf == runtimeDefault || seccompProf == dockerDefault { - // use correct default profile (Eg. if not configured otherwise, the default is docker/default) - seccompProf = seccompDefaultProfile - } - if !seccompEnabled { - if seccompProf != "" && seccompProf != unconfinedProfile { - return nil, errors.New("seccomp is not supported") - } - return nil, nil - } - switch seccompProf { - case "", unconfinedProfile: - // Do not set seccomp profile. - return nil, nil - case dockerDefault: - // Note: WithDefaultProfile specOpts must be added after capabilities - return seccomp.WithDefaultProfile(), nil - default: - // Require and Trim default profile name prefix - if !strings.HasPrefix(seccompProf, profileNamePrefix) { - return nil, errors.Errorf("invalid seccomp profile %q", seccompProf) - } - return seccomp.WithProfile(strings.TrimPrefix(seccompProf, profileNamePrefix)), nil - } -} - -// generateApparmorSpecOpts generates containerd SpecOpts for apparmor. -func generateApparmorSpecOpts(apparmorProf string, privileged, apparmorEnabled bool) (oci.SpecOpts, error) { - if !apparmorEnabled { - // Should fail loudly if user try to specify apparmor profile - // but we don't support it. - if apparmorProf != "" && apparmorProf != unconfinedProfile { - return nil, errors.New("apparmor is not supported") - } - return nil, nil - } - switch apparmorProf { - // Based on kubernetes#51746, default apparmor profile should be applied - // for when apparmor is not specified. - case runtimeDefault, "": - if privileged { - // Do not set apparmor profile when container is privileged - return nil, nil - } - // TODO (mikebrow): delete created apparmor default profile - return apparmor.WithDefaultProfile(appArmorDefaultProfileName), nil - case unconfinedProfile: - return nil, nil - default: - // Require and Trim default profile name prefix - if !strings.HasPrefix(apparmorProf, profileNamePrefix) { - return nil, errors.Errorf("invalid apparmor profile %q", apparmorProf) - } - return apparmor.WithProfile(strings.TrimPrefix(apparmorProf, profileNamePrefix)), nil - } -} - -// generateUserString generates valid user string based on OCI Image Spec -// v1.0.0. -// -// CRI defines that the following combinations are valid: -// -// (none) -> "" -// username -> username -// username, uid -> username -// username, uid, gid -> username:gid -// username, gid -> username:gid -// uid -> uid -// uid, gid -> uid:gid -// gid -> error -// -// TODO(random-liu): Add group name support in CRI. -func generateUserString(username string, uid, gid *runtime.Int64Value) (string, error) { - var userstr, groupstr string - if uid != nil { - userstr = strconv.FormatInt(uid.GetValue(), 10) - } - if username != "" { - userstr = username - } - if gid != nil { - groupstr = strconv.FormatInt(gid.GetValue(), 10) - } - if userstr == "" { - if groupstr != "" { - return "", errors.Errorf("user group %q is specified without user", groupstr) - } - return "", nil - } - if groupstr != "" { - userstr = userstr + ":" + groupstr - } - return userstr, nil -} diff --git a/vendor/github.com/containerd/cri/pkg/server/container_create_unix.go b/vendor/github.com/containerd/cri/pkg/server/container_create_unix.go new file mode 100644 index 00000000000..28863cb0c00 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/container_create_unix.go @@ -0,0 +1,460 @@ +// +build !windows + +/* + Copyright The containerd 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 server + +import ( + "bufio" + "io" + "os" + "strconv" + "strings" + + "github.com/containerd/cgroups" + "github.com/containerd/containerd/contrib/apparmor" + "github.com/containerd/containerd/contrib/seccomp" + "github.com/containerd/containerd/oci" + imagespec "github.com/opencontainers/image-spec/specs-go/v1" + runtimespec "github.com/opencontainers/runtime-spec/specs-go" + selinux "github.com/opencontainers/selinux/go-selinux" + "github.com/opencontainers/selinux/go-selinux/label" + "github.com/pkg/errors" + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + "github.com/containerd/cri/pkg/annotations" + "github.com/containerd/cri/pkg/config" + customopts "github.com/containerd/cri/pkg/containerd/opts" +) + +const ( + // profileNamePrefix is the prefix for loading profiles on a localhost. Eg. AppArmor localhost/profileName. + profileNamePrefix = "localhost/" // TODO (mikebrow): get localhost/ & runtime/default from CRI kubernetes/kubernetes#51747 + // runtimeDefault indicates that we should use or create a runtime default profile. + runtimeDefault = "runtime/default" + // dockerDefault indicates that we should use or create a docker default profile. + dockerDefault = "docker/default" + // appArmorDefaultProfileName is name to use when creating a default apparmor profile. + appArmorDefaultProfileName = "cri-containerd.apparmor.d" + // unconfinedProfile is a string indicating one should run a pod/containerd without a security profile + unconfinedProfile = "unconfined" + // seccompDefaultProfile is the default seccomp profile. + seccompDefaultProfile = dockerDefault +) + +// containerMounts sets up necessary container system file mounts +// including /dev/shm, /etc/hosts and /etc/resolv.conf. +func (c *criService) containerMounts(sandboxID string, config *runtime.ContainerConfig) []*runtime.Mount { + var mounts []*runtime.Mount + securityContext := config.GetLinux().GetSecurityContext() + if !isInCRIMounts(etcHostname, config.GetMounts()) { + // /etc/hostname is added since 1.1.6, 1.2.4 and 1.3. + // For in-place upgrade, the old sandbox doesn't have the hostname file, + // do not mount this in that case. + // TODO(random-liu): Remove the check and always mount this when + // containerd 1.1 and 1.2 are deprecated. + hostpath := c.getSandboxHostname(sandboxID) + if _, err := c.os.Stat(hostpath); err == nil { + mounts = append(mounts, &runtime.Mount{ + ContainerPath: etcHostname, + HostPath: hostpath, + Readonly: securityContext.GetReadonlyRootfs(), + }) + } + } + + if !isInCRIMounts(etcHosts, config.GetMounts()) { + mounts = append(mounts, &runtime.Mount{ + ContainerPath: etcHosts, + HostPath: c.getSandboxHosts(sandboxID), + Readonly: securityContext.GetReadonlyRootfs(), + }) + } + + // Mount sandbox resolv.config. + // TODO: Need to figure out whether we should always mount it as read-only + if !isInCRIMounts(resolvConfPath, config.GetMounts()) { + mounts = append(mounts, &runtime.Mount{ + ContainerPath: resolvConfPath, + HostPath: c.getResolvPath(sandboxID), + Readonly: securityContext.GetReadonlyRootfs(), + }) + } + + if !isInCRIMounts(devShm, config.GetMounts()) { + sandboxDevShm := c.getSandboxDevShm(sandboxID) + if securityContext.GetNamespaceOptions().GetIpc() == runtime.NamespaceMode_NODE { + sandboxDevShm = devShm + } + mounts = append(mounts, &runtime.Mount{ + ContainerPath: devShm, + HostPath: sandboxDevShm, + Readonly: false, + }) + } + return mounts +} + +func (c *criService) containerSpec(id string, sandboxID string, sandboxPid uint32, netNSPath string, containerName string, + config *runtime.ContainerConfig, sandboxConfig *runtime.PodSandboxConfig, imageConfig *imagespec.ImageConfig, + extraMounts []*runtime.Mount, ociRuntime config.Runtime) (_ *runtimespec.Spec, retErr error) { + + specOpts := []oci.SpecOpts{ + customopts.WithoutRunMount, + customopts.WithoutDefaultSecuritySettings, + customopts.WithRelativeRoot(relativeRootfsPath), + customopts.WithProcessArgs(config, imageConfig), + oci.WithDefaultPathEnv, + // this will be set based on the security context below + oci.WithNewPrivileges, + } + if config.GetWorkingDir() != "" { + specOpts = append(specOpts, oci.WithProcessCwd(config.GetWorkingDir())) + } else if imageConfig.WorkingDir != "" { + specOpts = append(specOpts, oci.WithProcessCwd(imageConfig.WorkingDir)) + } + + if config.GetTty() { + specOpts = append(specOpts, oci.WithTTY) + } + + // Add HOSTNAME env. + var ( + err error + hostname = sandboxConfig.GetHostname() + ) + if hostname == "" { + if hostname, err = c.os.Hostname(); err != nil { + return nil, err + } + } + specOpts = append(specOpts, oci.WithEnv([]string{hostnameEnv + "=" + hostname})) + + // Apply envs from image config first, so that envs from container config + // can override them. + env := imageConfig.Env + for _, e := range config.GetEnvs() { + env = append(env, e.GetKey()+"="+e.GetValue()) + } + specOpts = append(specOpts, oci.WithEnv(env)) + + securityContext := config.GetLinux().GetSecurityContext() + labelOptions, err := toLabel(securityContext.GetSelinuxOptions()) + if err != nil { + return nil, err + } + if len(labelOptions) == 0 { + // Use pod level SELinux config + if sandbox, err := c.sandboxStore.Get(sandboxID); err == nil { + labelOptions, err = selinux.DupSecOpt(sandbox.ProcessLabel) + if err != nil { + return nil, err + } + } + } + + processLabel, mountLabel, err := label.InitLabels(labelOptions) + if err != nil { + return nil, errors.Wrapf(err, "failed to init selinux options %+v", securityContext.GetSelinuxOptions()) + } + defer func() { + if retErr != nil { + _ = label.ReleaseLabel(processLabel) + } + }() + + specOpts = append(specOpts, customopts.WithMounts(c.os, config, extraMounts, mountLabel)) + + if !c.config.DisableProcMount { + // Apply masked paths if specified. + // If the container is privileged, this will be cleared later on. + specOpts = append(specOpts, oci.WithMaskedPaths(securityContext.GetMaskedPaths())) + + // Apply readonly paths if specified. + // If the container is privileged, this will be cleared later on. + specOpts = append(specOpts, oci.WithReadonlyPaths(securityContext.GetReadonlyPaths())) + } + + if securityContext.GetPrivileged() { + if !sandboxConfig.GetLinux().GetSecurityContext().GetPrivileged() { + return nil, errors.New("no privileged container allowed in sandbox") + } + specOpts = append(specOpts, oci.WithPrivileged) + if !ociRuntime.PrivilegedWithoutHostDevices { + specOpts = append(specOpts, oci.WithHostDevices, oci.WithAllDevicesAllowed) + } else { + // add requested devices by the config as host devices are not automatically added + specOpts = append(specOpts, customopts.WithDevices(c.os, config), customopts.WithCapabilities(securityContext)) + } + } else { // not privileged + specOpts = append(specOpts, customopts.WithDevices(c.os, config), customopts.WithCapabilities(securityContext)) + } + + // Clear all ambient capabilities. The implication of non-root + caps + // is not clearly defined in Kubernetes. + // See https://github.com/kubernetes/kubernetes/issues/56374 + // Keep docker's behavior for now. + specOpts = append(specOpts, + customopts.WithoutAmbientCaps, + customopts.WithSelinuxLabels(processLabel, mountLabel), + ) + + // TODO: Figure out whether we should set no new privilege for sandbox container by default + if securityContext.GetNoNewPrivs() { + specOpts = append(specOpts, oci.WithNoNewPrivileges) + } + // TODO(random-liu): [P1] Set selinux options (privileged or not). + if securityContext.GetReadonlyRootfs() { + specOpts = append(specOpts, oci.WithRootFSReadonly()) + } + + if c.config.DisableCgroup { + specOpts = append(specOpts, customopts.WithDisabledCgroups) + } else { + specOpts = append(specOpts, customopts.WithResources(config.GetLinux().GetResources(), c.config.TolerateMissingHugetlbController, c.config.DisableHugetlbController)) + if sandboxConfig.GetLinux().GetCgroupParent() != "" { + cgroupsPath := getCgroupsPath(sandboxConfig.GetLinux().GetCgroupParent(), id) + specOpts = append(specOpts, oci.WithCgroup(cgroupsPath)) + } + } + + supplementalGroups := securityContext.GetSupplementalGroups() + + for pKey, pValue := range getPassthroughAnnotations(sandboxConfig.Annotations, + ociRuntime.PodAnnotations) { + specOpts = append(specOpts, customopts.WithAnnotation(pKey, pValue)) + } + + for pKey, pValue := range getPassthroughAnnotations(config.Annotations, + ociRuntime.ContainerAnnotations) { + specOpts = append(specOpts, customopts.WithAnnotation(pKey, pValue)) + } + + specOpts = append(specOpts, + customopts.WithOOMScoreAdj(config, c.config.RestrictOOMScoreAdj), + customopts.WithPodNamespaces(securityContext, sandboxPid), + customopts.WithSupplementalGroups(supplementalGroups), + customopts.WithAnnotation(annotations.ContainerType, annotations.ContainerTypeContainer), + customopts.WithAnnotation(annotations.SandboxID, sandboxID), + customopts.WithAnnotation(annotations.ContainerName, containerName), + ) + // cgroupns is used for hiding /sys/fs/cgroup from containers. + // For compatibility, cgroupns is not used when running in cgroup v1 mode or in privileged. + // https://github.com/containers/libpod/issues/4363 + // https://github.com/kubernetes/enhancements/blob/0e409b47497e398b369c281074485c8de129694f/keps/sig-node/20191118-cgroups-v2.md#cgroup-namespace + if cgroups.Mode() == cgroups.Unified && !securityContext.GetPrivileged() { + specOpts = append(specOpts, oci.WithLinuxNamespace( + runtimespec.LinuxNamespace{ + Type: runtimespec.CgroupNamespace, + })) + } + return c.runtimeSpec(id, ociRuntime.BaseRuntimeSpec, specOpts...) +} + +func (c *criService) containerSpecOpts(config *runtime.ContainerConfig, imageConfig *imagespec.ImageConfig) ([]oci.SpecOpts, error) { + var specOpts []oci.SpecOpts + securityContext := config.GetLinux().GetSecurityContext() + // Set container username. This could only be done by containerd, because it needs + // access to the container rootfs. Pass user name to containerd, and let it overwrite + // the spec for us. + userstr, err := generateUserString( + securityContext.GetRunAsUsername(), + securityContext.GetRunAsUser(), + securityContext.GetRunAsGroup()) + if err != nil { + return nil, errors.Wrap(err, "failed to generate user string") + } + if userstr == "" { + // Lastly, since no user override was passed via CRI try to set via OCI + // Image + userstr = imageConfig.User + } + if userstr != "" { + specOpts = append(specOpts, oci.WithUser(userstr)) + } + + if securityContext.GetRunAsUsername() != "" { + userstr = securityContext.GetRunAsUsername() + } else { + // Even if RunAsUser is not set, we still call `GetValue` to get uid 0. + // Because it is still useful to get additional gids for uid 0. + userstr = strconv.FormatInt(securityContext.GetRunAsUser().GetValue(), 10) + } + specOpts = append(specOpts, customopts.WithAdditionalGIDs(userstr)) + + apparmorSpecOpts, err := generateApparmorSpecOpts( + securityContext.GetApparmorProfile(), + securityContext.GetPrivileged(), + c.apparmorEnabled()) + if err != nil { + return nil, errors.Wrap(err, "failed to generate apparmor spec opts") + } + if apparmorSpecOpts != nil { + specOpts = append(specOpts, apparmorSpecOpts) + } + + seccompSpecOpts, err := c.generateSeccompSpecOpts( + securityContext.GetSeccompProfilePath(), + securityContext.GetPrivileged(), + c.seccompEnabled()) + if err != nil { + return nil, errors.Wrap(err, "failed to generate seccomp spec opts") + } + if seccompSpecOpts != nil { + specOpts = append(specOpts, seccompSpecOpts) + } + return specOpts, nil +} + +// generateSeccompSpecOpts generates containerd SpecOpts for seccomp. +func (c *criService) generateSeccompSpecOpts(seccompProf string, privileged, seccompEnabled bool) (oci.SpecOpts, error) { + if privileged { + // Do not set seccomp profile when container is privileged + return nil, nil + } + if seccompProf == "" { + seccompProf = c.config.UnsetSeccompProfile + } + // Set seccomp profile + if seccompProf == runtimeDefault || seccompProf == dockerDefault { + // use correct default profile (Eg. if not configured otherwise, the default is docker/default) + seccompProf = seccompDefaultProfile + } + if !seccompEnabled { + if seccompProf != "" && seccompProf != unconfinedProfile { + return nil, errors.New("seccomp is not supported") + } + return nil, nil + } + switch seccompProf { + case "", unconfinedProfile: + // Do not set seccomp profile. + return nil, nil + case dockerDefault: + // Note: WithDefaultProfile specOpts must be added after capabilities + return seccomp.WithDefaultProfile(), nil + default: + // Require and Trim default profile name prefix + if !strings.HasPrefix(seccompProf, profileNamePrefix) { + return nil, errors.Errorf("invalid seccomp profile %q", seccompProf) + } + return seccomp.WithProfile(strings.TrimPrefix(seccompProf, profileNamePrefix)), nil + } +} + +// generateApparmorSpecOpts generates containerd SpecOpts for apparmor. +func generateApparmorSpecOpts(apparmorProf string, privileged, apparmorEnabled bool) (oci.SpecOpts, error) { + if !apparmorEnabled { + // Should fail loudly if user try to specify apparmor profile + // but we don't support it. + if apparmorProf != "" && apparmorProf != unconfinedProfile { + return nil, errors.New("apparmor is not supported") + } + return nil, nil + } + switch apparmorProf { + // Based on kubernetes#51746, default apparmor profile should be applied + // for when apparmor is not specified. + case runtimeDefault, "": + if privileged { + // Do not set apparmor profile when container is privileged + return nil, nil + } + // TODO (mikebrow): delete created apparmor default profile + return apparmor.WithDefaultProfile(appArmorDefaultProfileName), nil + case unconfinedProfile: + return nil, nil + default: + // Require and Trim default profile name prefix + if !strings.HasPrefix(apparmorProf, profileNamePrefix) { + return nil, errors.Errorf("invalid apparmor profile %q", apparmorProf) + } + appArmorProfile := strings.TrimPrefix(apparmorProf, profileNamePrefix) + if profileExists, err := appArmorProfileExists(appArmorProfile); !profileExists { + if err != nil { + return nil, errors.Wrap(err, "failed to generate apparmor spec opts") + } + return nil, errors.Errorf("apparmor profile not found %s", appArmorProfile) + } + return apparmor.WithProfile(appArmorProfile), nil + } +} + +// appArmorProfileExists scans apparmor/profiles for the requested profile +func appArmorProfileExists(profile string) (bool, error) { + if profile == "" { + return false, errors.New("nil apparmor profile is not supported") + } + profiles, err := os.Open("/sys/kernel/security/apparmor/profiles") + if err != nil { + return false, err + } + defer profiles.Close() + + rbuff := bufio.NewReader(profiles) + for { + line, err := rbuff.ReadString('\n') + switch err { + case nil: + if strings.HasPrefix(line, profile+" (") { + return true, nil + } + case io.EOF: + return false, nil + default: + return false, err + } + } +} + +// generateUserString generates valid user string based on OCI Image Spec +// v1.0.0. +// +// CRI defines that the following combinations are valid: +// +// (none) -> "" +// username -> username +// username, uid -> username +// username, uid, gid -> username:gid +// username, gid -> username:gid +// uid -> uid +// uid, gid -> uid:gid +// gid -> error +// +// TODO(random-liu): Add group name support in CRI. +func generateUserString(username string, uid, gid *runtime.Int64Value) (string, error) { + var userstr, groupstr string + if uid != nil { + userstr = strconv.FormatInt(uid.GetValue(), 10) + } + if username != "" { + userstr = username + } + if gid != nil { + groupstr = strconv.FormatInt(gid.GetValue(), 10) + } + if userstr == "" { + if groupstr != "" { + return "", errors.Errorf("user group %q is specified without user", groupstr) + } + return "", nil + } + if groupstr != "" { + userstr = userstr + ":" + groupstr + } + return userstr, nil +} diff --git a/vendor/github.com/containerd/cri/pkg/server/container_create_windows.go b/vendor/github.com/containerd/cri/pkg/server/container_create_windows.go new file mode 100644 index 00000000000..86a08d89ec3 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/container_create_windows.go @@ -0,0 +1,117 @@ +// +build windows + +/* + Copyright The containerd 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 server + +import ( + "github.com/containerd/containerd/oci" + imagespec "github.com/opencontainers/image-spec/specs-go/v1" + runtimespec "github.com/opencontainers/runtime-spec/specs-go" + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + "github.com/containerd/cri/pkg/annotations" + "github.com/containerd/cri/pkg/config" + customopts "github.com/containerd/cri/pkg/containerd/opts" +) + +// No container mounts for windows. +func (c *criService) containerMounts(sandboxID string, config *runtime.ContainerConfig) []*runtime.Mount { + return nil +} + +func (c *criService) containerSpec(id string, sandboxID string, sandboxPid uint32, netNSPath string, containerName string, + config *runtime.ContainerConfig, sandboxConfig *runtime.PodSandboxConfig, imageConfig *imagespec.ImageConfig, + extraMounts []*runtime.Mount, ociRuntime config.Runtime) (*runtimespec.Spec, error) { + specOpts := []oci.SpecOpts{ + customopts.WithProcessArgs(config, imageConfig), + } + if config.GetWorkingDir() != "" { + specOpts = append(specOpts, oci.WithProcessCwd(config.GetWorkingDir())) + } else if imageConfig.WorkingDir != "" { + specOpts = append(specOpts, oci.WithProcessCwd(imageConfig.WorkingDir)) + } + + if config.GetTty() { + specOpts = append(specOpts, oci.WithTTY) + } + + // Apply envs from image config first, so that envs from container config + // can override them. + env := imageConfig.Env + for _, e := range config.GetEnvs() { + env = append(env, e.GetKey()+"="+e.GetValue()) + } + specOpts = append(specOpts, oci.WithEnv(env)) + + specOpts = append(specOpts, + // Clear the root location since hcsshim expects it. + // NOTE: readonly rootfs doesn't work on windows. + customopts.WithoutRoot, + customopts.WithWindowsNetworkNamespace(netNSPath), + oci.WithHostname(sandboxConfig.GetHostname()), + ) + + specOpts = append(specOpts, customopts.WithWindowsMounts(c.os, config, extraMounts)) + + // Start with the image config user and override below if RunAsUsername is not "". + username := imageConfig.User + + windowsConfig := config.GetWindows() + if windowsConfig != nil { + specOpts = append(specOpts, customopts.WithWindowsResources(windowsConfig.GetResources())) + securityCtx := windowsConfig.GetSecurityContext() + if securityCtx != nil { + runAsUser := securityCtx.GetRunAsUsername() + if runAsUser != "" { + username = runAsUser + } + cs := securityCtx.GetCredentialSpec() + if cs != "" { + specOpts = append(specOpts, customopts.WithWindowsCredentialSpec(cs)) + } + } + } + + // There really isn't a good Windows way to verify that the username is available in the + // image as early as here like there is for Linux. Later on in the stack hcsshim + // will handle the behavior of erroring out if the user isn't available in the image + // when trying to run the init process. + specOpts = append(specOpts, oci.WithUser(username)) + + for pKey, pValue := range getPassthroughAnnotations(sandboxConfig.Annotations, + ociRuntime.PodAnnotations) { + specOpts = append(specOpts, customopts.WithAnnotation(pKey, pValue)) + } + + for pKey, pValue := range getPassthroughAnnotations(config.Annotations, + ociRuntime.ContainerAnnotations) { + specOpts = append(specOpts, customopts.WithAnnotation(pKey, pValue)) + } + + specOpts = append(specOpts, + customopts.WithAnnotation(annotations.ContainerType, annotations.ContainerTypeContainer), + customopts.WithAnnotation(annotations.SandboxID, sandboxID), + customopts.WithAnnotation(annotations.ContainerName, containerName), + ) + return c.runtimeSpec(id, ociRuntime.BaseRuntimeSpec, specOpts...) +} + +// No extra spec options needed for windows. +func (c *criService) containerSpecOpts(config *runtime.ContainerConfig, imageConfig *imagespec.ImageConfig) ([]oci.SpecOpts, error) { + return nil, nil +} diff --git a/vendor/github.com/containerd/cri/pkg/server/container_exec.go b/vendor/github.com/containerd/cri/pkg/server/container_exec.go index 7cff6973598..ae5498ff745 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_exec.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_exec.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/server/container_execsync.go b/vendor/github.com/containerd/cri/pkg/server/container_execsync.go index b46e6e562f0..1c019f6516d 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_execsync.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_execsync.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -70,28 +70,13 @@ type execOptions struct { timeout time.Duration } -// execInContainer executes a command inside the container synchronously, and -// redirects stdio stream properly. -func (c *criService) execInContainer(ctx context.Context, id string, opts execOptions) (*uint32, error) { +func (c *criService) execInternal(ctx context.Context, container containerd.Container, id string, opts execOptions) (*uint32, error) { // Cancel the context before returning to ensure goroutines are stopped. // This is important, because if `Start` returns error, `Wait` will hang // forever unless we cancel the context. ctx, cancel := context.WithCancel(ctx) defer cancel() - // Get container from our container store. - cntr, err := c.containerStore.Get(id) - if err != nil { - return nil, errors.Wrapf(err, "failed to find container %q in store", id) - } - id = cntr.ID - - state := cntr.Status.Get().State() - if state != runtime.ContainerState_CONTAINER_RUNNING { - return nil, errors.Errorf("container is in %s state", criContainerStateToString(state)) - } - - container := cntr.Container spec, err := container.Spec(ctx) if err != nil { return nil, errors.Wrap(err, "failed to get container spec") @@ -147,7 +132,7 @@ func (c *criService) execInContainer(ctx context.Context, id string, opts execOp return nil, errors.Wrapf(err, "failed to start exec %q", execID) } - handleResizing(opts.resize, func(size remotecommand.TerminalSize) { + handleResizing(ctx, opts.resize, func(size remotecommand.TerminalSize) { if err := process.Resize(ctx, uint32(size.Width), uint32(size.Height)); err != nil { log.G(ctx).WithError(err).Errorf("Failed to resize process %q console for container %q", execID, id) } @@ -195,3 +180,32 @@ func (c *criService) execInContainer(ctx context.Context, id string, opts execOp return &code, nil } } + +// execInContainer executes a command inside the container synchronously, and +// redirects stdio stream properly. +// This function only returns when the exec process exits, this means that: +// 1) As long as the exec process is running, the goroutine in the cri plugin +// will be running and wait for the exit code; +// 2) `kubectl exec -it` will hang until the exec process exits, even after io +// is detached. This is different from dockershim, which leaves the exec process +// running in background after io is detached. +// https://github.com/kubernetes/kubernetes/blob/v1.15.0/pkg/kubelet/dockershim/exec.go#L127 +// For example, if the `kubectl exec -it` process is killed, IO will be closed. In +// this case, the CRI plugin will still have a goroutine waiting for the exec process +// to exit and log the exit code, but dockershim won't. +func (c *criService) execInContainer(ctx context.Context, id string, opts execOptions) (*uint32, error) { + // Get container from our container store. + cntr, err := c.containerStore.Get(id) + + if err != nil { + return nil, errors.Wrapf(err, "failed to find container %q in store", id) + } + id = cntr.ID + + state := cntr.Status.Get().State() + if state != runtime.ContainerState_CONTAINER_RUNNING { + return nil, errors.Errorf("container is in %s state", criContainerStateToString(state)) + } + + return c.execInternal(ctx, cntr.Container, id, opts) +} diff --git a/vendor/github.com/containerd/cri/pkg/server/container_list.go b/vendor/github.com/containerd/cri/pkg/server/container_list.go index 2b53a2ad279..c9e88d13dfa 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_list.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_list.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -69,13 +69,24 @@ func (c *criService) filterCRIContainers(containers []*runtime.Container, filter return containers } + // The containerd cri plugin supports short ids so long as there is only one + // match. So we do a lookup against the store here if a pod id has been + // included in the filter. + sb := filter.GetPodSandboxId() + if sb != "" { + sandbox, err := c.sandboxStore.Get(sb) + if err == nil { + sb = sandbox.ID + } + } + c.normalizeContainerFilter(filter) filtered := []*runtime.Container{} for _, cntr := range containers { if filter.GetId() != "" && filter.GetId() != cntr.Id { continue } - if filter.GetPodSandboxId() != "" && filter.GetPodSandboxId() != cntr.PodSandboxId { + if sb != "" && sb != cntr.PodSandboxId { continue } if filter.GetState() != nil && filter.GetState().GetState() != cntr.State { diff --git a/vendor/github.com/containerd/cri/pkg/server/container_log_reopen.go b/vendor/github.com/containerd/cri/pkg/server/container_log_reopen.go index a0a7c1edfbc..b15bb623839 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_log_reopen.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_log_reopen.go @@ -1,17 +1,17 @@ /* -Copyright 2018 The Containerd Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/server/container_remove.go b/vendor/github.com/containerd/cri/pkg/server/container_remove.go index 8f39cf9a228..6426635ddab 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_remove.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_remove.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -20,7 +20,6 @@ import ( "github.com/containerd/containerd" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/log" - "github.com/docker/docker/pkg/system" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/net/context" @@ -87,12 +86,12 @@ func (c *criService) RemoveContainer(ctx context.Context, r *runtime.RemoveConta } containerRootDir := c.getContainerRootDir(id) - if err := system.EnsureRemoveAll(containerRootDir); err != nil { + if err := ensureRemoveAll(ctx, containerRootDir); err != nil { return nil, errors.Wrapf(err, "failed to remove container root directory %q", containerRootDir) } volatileContainerRootDir := c.getVolatileContainerRootDir(id) - if err := system.EnsureRemoveAll(volatileContainerRootDir); err != nil { + if err := ensureRemoveAll(ctx, volatileContainerRootDir); err != nil { return nil, errors.Wrapf(err, "failed to remove volatile container root directory %q", volatileContainerRootDir) } diff --git a/vendor/github.com/containerd/cri/pkg/server/container_start.go b/vendor/github.com/containerd/cri/pkg/server/container_start.go index 402a77ae588..c1f860d59b4 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_start.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_start.go @@ -1,31 +1,29 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server import ( "io" - "os" "time" "github.com/containerd/containerd" containerdio "github.com/containerd/containerd/cio" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/log" - "github.com/containerd/containerd/plugin" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/net/context" @@ -99,11 +97,7 @@ func (c *criService) StartContainer(ctx context.Context, r *runtime.StartContain return nil, errors.Wrap(err, "failed to get container info") } - var taskOpts []containerd.NewTaskOpts - // TODO(random-liu): Remove this after shim v1 is deprecated. - if c.config.NoPivot && ctrInfo.Runtime.Name == plugin.RuntimeLinuxV1 { - taskOpts = append(taskOpts, containerd.WithNoPivotRoot) - } + taskOpts := c.taskOpts(ctrInfo.Runtime.Name) task, err := container.NewTask(ctx, ioCreation, taskOpts...) if err != nil { return nil, errors.Wrap(err, "failed to create containerd task") @@ -180,7 +174,7 @@ func resetContainerStarting(container containerstore.Container) error { func (c *criService) createContainerLoggers(logPath string, tty bool) (stdout io.WriteCloser, stderr io.WriteCloser, err error) { if logPath != "" { // Only generate container log when log path is specified. - f, err := os.OpenFile(logPath, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0640) + f, err := openLogFile(logPath) if err != nil { return nil, nil, errors.Wrap(err, "failed to create and open log file") } diff --git a/vendor/github.com/containerd/cri/pkg/server/container_stats.go b/vendor/github.com/containerd/cri/pkg/server/container_stats.go index 1580c040004..22607cdd84a 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_stats.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_stats.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -39,7 +39,7 @@ func (c *criService) ContainerStats(ctx context.Context, in *runtime.ContainerSt return nil, errors.Errorf("unexpected metrics response: %+v", resp.Metrics) } - cs, err := c.getContainerMetrics(cntr.Metadata, resp.Metrics[0]) + cs, err := c.containerMetrics(cntr.Metadata, resp.Metrics[0]) if err != nil { return nil, errors.Wrap(err, "failed to decode container metrics") } diff --git a/vendor/github.com/containerd/cri/pkg/server/container_stats_list.go b/vendor/github.com/containerd/cri/pkg/server/container_stats_list.go index ed697c26968..0a9be8741f7 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_stats_list.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_stats_list.go @@ -1,26 +1,24 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server import ( - "github.com/containerd/cgroups" tasks "github.com/containerd/containerd/api/services/tasks/v1" "github.com/containerd/containerd/api/types" - "github.com/containerd/typeurl" "github.com/pkg/errors" "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" @@ -58,7 +56,7 @@ func (c *criService) toCRIContainerStats( } containerStats := new(runtime.ListContainerStatsResponse) for _, cntr := range containers { - cs, err := c.getContainerMetrics(cntr.Metadata, statsMap[cntr.ID]) + cs, err := c.containerMetrics(cntr.Metadata, statsMap[cntr.ID]) if err != nil { return nil, errors.Wrapf(err, "failed to decode container metrics for %q", cntr.ID) } @@ -67,59 +65,6 @@ func (c *criService) toCRIContainerStats( return containerStats, nil } -func (c *criService) getContainerMetrics( - meta containerstore.Metadata, - stats *types.Metric, -) (*runtime.ContainerStats, error) { - var cs runtime.ContainerStats - var usedBytes, inodesUsed uint64 - sn, err := c.snapshotStore.Get(meta.ID) - // If snapshotstore doesn't have cached snapshot information - // set WritableLayer usage to zero - if err == nil { - usedBytes = sn.Size - inodesUsed = sn.Inodes - } - cs.WritableLayer = &runtime.FilesystemUsage{ - Timestamp: sn.Timestamp, - FsId: &runtime.FilesystemIdentifier{ - Mountpoint: c.imageFSPath, - }, - UsedBytes: &runtime.UInt64Value{Value: usedBytes}, - InodesUsed: &runtime.UInt64Value{Value: inodesUsed}, - } - cs.Attributes = &runtime.ContainerAttributes{ - Id: meta.ID, - Metadata: meta.Config.GetMetadata(), - Labels: meta.Config.GetLabels(), - Annotations: meta.Config.GetAnnotations(), - } - - if stats != nil { - s, err := typeurl.UnmarshalAny(stats.Data) - if err != nil { - return nil, errors.Wrap(err, "failed to extract container metrics") - } - metrics := s.(*cgroups.Metrics) - if metrics.CPU != nil && metrics.CPU.Usage != nil { - cs.Cpu = &runtime.CpuUsage{ - Timestamp: stats.Timestamp.UnixNano(), - UsageCoreNanoSeconds: &runtime.UInt64Value{Value: metrics.CPU.Usage.Total}, - } - } - if metrics.Memory != nil && metrics.Memory.Usage != nil { - cs.Memory = &runtime.MemoryUsage{ - Timestamp: stats.Timestamp.UnixNano(), - WorkingSetBytes: &runtime.UInt64Value{ - Value: getWorkingSet(metrics.Memory), - }, - } - } - } - - return &cs, nil -} - func (c *criService) normalizeContainerStatsFilter(filter *runtime.ContainerStatsFilter) { if cntr, err := c.containerStore.Get(filter.GetId()); err == nil { filter.Id = cntr.ID @@ -169,17 +114,3 @@ func matchLabelSelector(selector, labels map[string]string) bool { } return true } - -// getWorkingSet calculates workingset memory from cgroup memory stats. -// The caller should make sure memory is not nil. -// workingset = usage - total_inactive_file -func getWorkingSet(memory *cgroups.MemoryStat) uint64 { - if memory.Usage == nil { - return 0 - } - var workingSet uint64 - if memory.TotalInactiveFile < memory.Usage.Usage { - workingSet = memory.Usage.Usage - memory.TotalInactiveFile - } - return workingSet -} diff --git a/vendor/github.com/containerd/cri/pkg/server/container_stats_list_unix.go b/vendor/github.com/containerd/cri/pkg/server/container_stats_list_unix.go new file mode 100644 index 00000000000..ad398bc7a61 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/container_stats_list_unix.go @@ -0,0 +1,129 @@ +// +build !windows + +/* + Copyright The containerd 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 server + +import ( + "fmt" + + "github.com/containerd/containerd/api/types" + v1 "github.com/containerd/containerd/metrics/types/v1" + v2 "github.com/containerd/containerd/metrics/types/v2" + "github.com/containerd/typeurl" + "github.com/pkg/errors" + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + containerstore "github.com/containerd/cri/pkg/store/container" +) + +func (c *criService) containerMetrics( + meta containerstore.Metadata, + stats *types.Metric, +) (*runtime.ContainerStats, error) { + var cs runtime.ContainerStats + var usedBytes, inodesUsed uint64 + sn, err := c.snapshotStore.Get(meta.ID) + // If snapshotstore doesn't have cached snapshot information + // set WritableLayer usage to zero + if err == nil { + usedBytes = sn.Size + inodesUsed = sn.Inodes + } + cs.WritableLayer = &runtime.FilesystemUsage{ + Timestamp: sn.Timestamp, + FsId: &runtime.FilesystemIdentifier{ + Mountpoint: c.imageFSPath, + }, + UsedBytes: &runtime.UInt64Value{Value: usedBytes}, + InodesUsed: &runtime.UInt64Value{Value: inodesUsed}, + } + cs.Attributes = &runtime.ContainerAttributes{ + Id: meta.ID, + Metadata: meta.Config.GetMetadata(), + Labels: meta.Config.GetLabels(), + Annotations: meta.Config.GetAnnotations(), + } + + if stats != nil { + s, err := typeurl.UnmarshalAny(stats.Data) + if err != nil { + return nil, errors.Wrap(err, "failed to extract container metrics") + } + switch metrics := s.(type) { + case *v1.Metrics: + if metrics.CPU != nil && metrics.CPU.Usage != nil { + cs.Cpu = &runtime.CpuUsage{ + Timestamp: stats.Timestamp.UnixNano(), + UsageCoreNanoSeconds: &runtime.UInt64Value{Value: metrics.CPU.Usage.Total}, + } + } + if metrics.Memory != nil && metrics.Memory.Usage != nil { + cs.Memory = &runtime.MemoryUsage{ + Timestamp: stats.Timestamp.UnixNano(), + WorkingSetBytes: &runtime.UInt64Value{ + Value: getWorkingSet(metrics.Memory), + }, + } + } + case *v2.Metrics: + if metrics.CPU != nil { + cs.Cpu = &runtime.CpuUsage{ + Timestamp: stats.Timestamp.UnixNano(), + UsageCoreNanoSeconds: &runtime.UInt64Value{Value: metrics.CPU.UsageUsec * 1000}, + } + } + if metrics.Memory != nil { + cs.Memory = &runtime.MemoryUsage{ + Timestamp: stats.Timestamp.UnixNano(), + WorkingSetBytes: &runtime.UInt64Value{ + Value: getWorkingSetV2(metrics.Memory), + }, + } + } + default: + return &cs, errors.New(fmt.Sprintf("unxpected metrics type: %v", metrics)) + } + } + + return &cs, nil +} + +// getWorkingSet calculates workingset memory from cgroup memory stats. +// The caller should make sure memory is not nil. +// workingset = usage - total_inactive_file +func getWorkingSet(memory *v1.MemoryStat) uint64 { + if memory.Usage == nil { + return 0 + } + var workingSet uint64 + if memory.TotalInactiveFile < memory.Usage.Usage { + workingSet = memory.Usage.Usage - memory.TotalInactiveFile + } + return workingSet +} + +// getWorkingSetV2 calculates workingset memory from cgroupv2 memory stats. +// The caller should make sure memory is not nil. +// workingset = usage - inactive_file +func getWorkingSetV2(memory *v2.MemoryStat) uint64 { + var workingSet uint64 + if memory.InactiveFile < memory.Usage { + workingSet = memory.Usage - memory.InactiveFile + } + return workingSet +} diff --git a/vendor/github.com/containerd/cri/pkg/server/container_stats_list_windows.go b/vendor/github.com/containerd/cri/pkg/server/container_stats_list_windows.go new file mode 100644 index 00000000000..4bd3b64c19a --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/container_stats_list_windows.go @@ -0,0 +1,84 @@ +// +build windows + +/* + Copyright The containerd 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 server + +import ( + wstats "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats" + "github.com/containerd/containerd/api/types" + "github.com/containerd/typeurl" + "github.com/pkg/errors" + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + containerstore "github.com/containerd/cri/pkg/store/container" +) + +func (c *criService) containerMetrics( + meta containerstore.Metadata, + stats *types.Metric, +) (*runtime.ContainerStats, error) { + var cs runtime.ContainerStats + var usedBytes, inodesUsed uint64 + sn, err := c.snapshotStore.Get(meta.ID) + // If snapshotstore doesn't have cached snapshot information + // set WritableLayer usage to zero + if err == nil { + usedBytes = sn.Size + inodesUsed = sn.Inodes + } + cs.WritableLayer = &runtime.FilesystemUsage{ + Timestamp: sn.Timestamp, + FsId: &runtime.FilesystemIdentifier{ + Mountpoint: c.imageFSPath, + }, + UsedBytes: &runtime.UInt64Value{Value: usedBytes}, + InodesUsed: &runtime.UInt64Value{Value: inodesUsed}, + } + cs.Attributes = &runtime.ContainerAttributes{ + Id: meta.ID, + Metadata: meta.Config.GetMetadata(), + Labels: meta.Config.GetLabels(), + Annotations: meta.Config.GetAnnotations(), + } + + if stats != nil { + s, err := typeurl.UnmarshalAny(stats.Data) + if err != nil { + return nil, errors.Wrap(err, "failed to extract container metrics") + } + wstats := s.(*wstats.Statistics).GetWindows() + if wstats == nil { + return nil, errors.New("windows stats is empty") + } + if wstats.Processor != nil { + cs.Cpu = &runtime.CpuUsage{ + Timestamp: wstats.Timestamp.UnixNano(), + UsageCoreNanoSeconds: &runtime.UInt64Value{Value: wstats.Processor.TotalRuntimeNS}, + } + } + if wstats.Memory != nil { + cs.Memory = &runtime.MemoryUsage{ + Timestamp: wstats.Timestamp.UnixNano(), + WorkingSetBytes: &runtime.UInt64Value{ + Value: wstats.Memory.MemoryUsagePrivateWorkingSetBytes, + }, + } + } + } + return &cs, nil +} diff --git a/vendor/github.com/containerd/cri/pkg/server/container_status.go b/vendor/github.com/containerd/cri/pkg/server/container_status.go index bfd0e1d2801..aeeb76db3cb 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_status.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_status.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/server/container_stop.go b/vendor/github.com/containerd/cri/pkg/server/container_stop.go index 633cbb56ab6..92075d6b6ce 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_stop.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_stop.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/server/container_update_resources.go b/vendor/github.com/containerd/cri/pkg/server/container_update_resources_unix.go similarity index 81% rename from vendor/github.com/containerd/cri/pkg/server/container_update_resources.go rename to vendor/github.com/containerd/cri/pkg/server/container_update_resources_unix.go index 2c9d03389e8..23e0d409b08 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_update_resources.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_update_resources_unix.go @@ -1,17 +1,19 @@ +// +build !windows + /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -70,7 +72,8 @@ func (c *criService) updateContainerResources(ctx context.Context, if err != nil { return errors.Wrap(err, "failed to get container spec") } - newSpec, err := updateOCILinuxResource(ctx, oldSpec, resources) + newSpec, err := updateOCILinuxResource(ctx, oldSpec, resources, + c.config.TolerateMissingHugetlbController, c.config.DisableHugetlbController) if err != nil { return errors.Wrap(err, "failed to update resource in spec") } @@ -130,7 +133,8 @@ func updateContainerSpec(ctx context.Context, cntr containerd.Container, spec *r } // updateOCILinuxResource updates container resource limit. -func updateOCILinuxResource(ctx context.Context, spec *runtimespec.Spec, new *runtime.LinuxContainerResources) (*runtimespec.Spec, error) { +func updateOCILinuxResource(ctx context.Context, spec *runtimespec.Spec, new *runtime.LinuxContainerResources, + tolerateMissingHugetlbController, disableHugetlbController bool) (*runtimespec.Spec, error) { // Copy to make sure old spec is not changed. var cloned runtimespec.Spec if err := util.DeepCopy(&cloned, spec); err != nil { @@ -139,7 +143,7 @@ func updateOCILinuxResource(ctx context.Context, spec *runtimespec.Spec, new *ru if cloned.Linux == nil { cloned.Linux = &runtimespec.Linux{} } - if err := opts.WithResources(new)(ctx, nil, nil, &cloned); err != nil { + if err := opts.WithResources(new, tolerateMissingHugetlbController, disableHugetlbController)(ctx, nil, nil, &cloned); err != nil { return nil, errors.Wrap(err, "unable to set linux container resources") } return &cloned, nil diff --git a/vendor/github.com/containerd/cri/pkg/server/container_update_resources_windows.go b/vendor/github.com/containerd/cri/pkg/server/container_update_resources_windows.go new file mode 100644 index 00000000000..72d0d459ead --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/container_update_resources_windows.go @@ -0,0 +1,31 @@ +// +build windows + +/* + Copyright The containerd 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 server + +import ( + "github.com/containerd/containerd/errdefs" + "golang.org/x/net/context" + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +// UpdateContainerResources updates ContainerConfig of the container. +// TODO(windows): Figure out whether windows support this. +func (c *criService) UpdateContainerResources(ctx context.Context, r *runtime.UpdateContainerResourcesRequest) (*runtime.UpdateContainerResourcesResponse, error) { + return nil, errdefs.ErrNotImplemented +} diff --git a/vendor/github.com/containerd/cri/pkg/server/events.go b/vendor/github.com/containerd/cri/pkg/server/events.go index fcbf0a3cab1..df465f22c13 100644 --- a/vendor/github.com/containerd/cri/pkg/server/events.go +++ b/vendor/github.com/containerd/cri/pkg/server/events.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/server/helpers.go b/vendor/github.com/containerd/cri/pkg/server/helpers.go index e8e8c501dda..34da9a2543f 100644 --- a/vendor/github.com/containerd/cri/pkg/server/helpers.go +++ b/vendor/github.com/containerd/cri/pkg/server/helpers.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -20,20 +20,19 @@ import ( "fmt" "path" "path/filepath" - "regexp" "strconv" "strings" "github.com/BurntSushi/toml" + runhcsoptions "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options" "github.com/containerd/containerd" "github.com/containerd/containerd/containers" "github.com/containerd/containerd/plugin" + "github.com/containerd/containerd/reference/docker" "github.com/containerd/containerd/runtime/linux/runctypes" runcoptions "github.com/containerd/containerd/runtime/v2/runc/options" "github.com/containerd/typeurl" - "github.com/docker/distribution/reference" imagedigest "github.com/opencontainers/go-digest" - "github.com/opencontainers/selinux/go-selinux/label" "github.com/pkg/errors" "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" @@ -51,6 +50,7 @@ const ( errorStartReason = "StartError" // errorStartExitCode is the exit code when fails to start container. // 128 is the same with Docker's behavior. + // TODO(windows): Figure out what should be used for windows. errorStartExitCode = 128 // completeExitReason is the exit reason when container exits with code 0. completeExitReason = "Completed" @@ -58,39 +58,16 @@ const ( errorExitReason = "Error" // oomExitReason is the exit reason when process in container is oom killed. oomExitReason = "OOMKilled" -) -const ( - // defaultSandboxOOMAdj is default omm adj for sandbox container. (kubernetes#47938). - defaultSandboxOOMAdj = -998 - // defaultShmSize is the default size of the sandbox shm. - defaultShmSize = int64(1024 * 1024 * 64) - // relativeRootfsPath is the rootfs path relative to bundle path. - relativeRootfsPath = "rootfs" // sandboxesDir contains all sandbox root. A sandbox root is the running // directory of the sandbox, all files created for the sandbox will be // placed under this directory. sandboxesDir = "sandboxes" // containersDir contains all container root. containersDir = "containers" - // According to http://man7.org/linux/man-pages/man5/resolv.conf.5.html: - // "The search list is currently limited to six domains with a total of 256 characters." - maxDNSSearches = 6 // Delimiter used to construct container/sandbox names. nameDelimiter = "_" - // devShm is the default path of /dev/shm. - devShm = "/dev/shm" - // etcHosts is the default path of /etc/hosts file. - etcHosts = "/etc/hosts" - // etcHostname is the default path of /etc/hostname file. - etcHostname = "/etc/hostname" - // resolvConfPath is the abs path of resolv.conf on host or container. - resolvConfPath = "/etc/resolv.conf" - // hostnameEnv is the key for HOSTNAME env. - hostnameEnv = "HOSTNAME" -) -const ( // criContainerdPrefix is common prefix for cri-containerd criContainerdPrefix = "io.cri-containerd" // containerKindLabel is a label key indicating container is sandbox container or application container @@ -107,14 +84,12 @@ const ( sandboxMetadataExtension = criContainerdPrefix + ".sandbox.metadata" // containerMetadataExtension is an extension name that identify metadata of container in CreateContainerRequest containerMetadataExtension = criContainerdPrefix + ".container.metadata" -) -const ( // defaultIfName is the default network interface for the pods defaultIfName = "eth0" - // networkAttachCount is the minimum number of networks the PodSandbox - // attaches to - networkAttachCount = 2 + + // runtimeRunhcsV1 is the runtime type for runhcs. + runtimeRunhcsV1 = "io.containerd.runhcs.v1" ) // makeSandboxName generates sandbox name from sandbox metadata. The name @@ -141,17 +116,6 @@ func makeContainerName(c *runtime.ContainerMetadata, s *runtime.PodSandboxMetada }, nameDelimiter) } -// getCgroupsPath generates container cgroups path. -func getCgroupsPath(cgroupsParent, id string) string { - base := path.Base(cgroupsParent) - if strings.HasSuffix(base, ".slice") { - // For a.slice/b.slice/c.slice, base is c.slice. - // runc systemd cgroup path format is "slice:prefix:name". - return strings.Join([]string{base, "cri-containerd", id}, ":") - } - return filepath.Join(cgroupsParent, id) -} - // getSandboxRootDir returns the root directory for managing sandbox files, // e.g. hosts files. func (c *criService) getSandboxRootDir(id string) string { @@ -176,38 +140,18 @@ func (c *criService) getVolatileContainerRootDir(id string) string { return filepath.Join(c.config.StateDir, containersDir, id) } -// getSandboxHostname returns the hostname file path inside the sandbox root directory. -func (c *criService) getSandboxHostname(id string) string { - return filepath.Join(c.getSandboxRootDir(id), "hostname") -} - -// getSandboxHosts returns the hosts file path inside the sandbox root directory. -func (c *criService) getSandboxHosts(id string) string { - return filepath.Join(c.getSandboxRootDir(id), "hosts") -} - -// getResolvPath returns resolv.conf filepath for specified sandbox. -func (c *criService) getResolvPath(id string) string { - return filepath.Join(c.getSandboxRootDir(id), "resolv.conf") -} - -// getSandboxDevShm returns the shm file path inside the sandbox root directory. -func (c *criService) getSandboxDevShm(id string) string { - return filepath.Join(c.getVolatileSandboxRootDir(id), "shm") -} - // criContainerStateToString formats CRI container state to string. func criContainerStateToString(state runtime.ContainerState) string { return runtime.ContainerState_name[int32(state)] } // getRepoDigestAngTag returns image repoDigest and repoTag of the named image reference. -func getRepoDigestAndTag(namedRef reference.Named, digest imagedigest.Digest, schema1 bool) (string, string) { +func getRepoDigestAndTag(namedRef docker.Named, digest imagedigest.Digest, schema1 bool) (string, string) { var repoTag, repoDigest string - if _, ok := namedRef.(reference.NamedTagged); ok { + if _, ok := namedRef.(docker.NamedTagged); ok { repoTag = namedRef.String() } - if _, ok := namedRef.(reference.Canonical); ok { + if _, ok := namedRef.(docker.Canonical); ok { repoDigest = namedRef.String() } else if !schema1 { // digest is not actual repo digest for schema1 image. @@ -226,7 +170,7 @@ func (c *criService) localResolve(refOrID string) (imagestore.Image, error) { return func(ref string) string { // ref is not image id, try to resolve it locally. // TODO(random-liu): Handle this error better for debugging. - normalized, err := reference.ParseDockerRef(ref) + normalized, err := docker.ParseDockerRef(ref) if err != nil { return "" } @@ -298,65 +242,6 @@ func (c *criService) ensureImageExists(ctx context.Context, ref string, config * return &newImage, nil } -func toLabel(selinuxOptions *runtime.SELinuxOption) ([]string, error) { - var labels []string - - if selinuxOptions == nil { - return nil, nil - } - if err := checkSelinuxLevel(selinuxOptions.Level); err != nil { - return nil, err - } - if selinuxOptions.User != "" { - labels = append(labels, "user:"+selinuxOptions.User) - } - if selinuxOptions.Role != "" { - labels = append(labels, "role:"+selinuxOptions.Role) - } - if selinuxOptions.Type != "" { - labels = append(labels, "type:"+selinuxOptions.Type) - } - if selinuxOptions.Level != "" { - labels = append(labels, "level:"+selinuxOptions.Level) - } - - return labels, nil -} - -func initLabelsFromOpt(selinuxOpts *runtime.SELinuxOption) (string, string, error) { - labels, err := toLabel(selinuxOpts) - if err != nil { - return "", "", err - } - return label.InitLabels(labels) -} - -func initLabels(options []string) (string, string, error) { - for _, opt := range options { - if strings.HasPrefix(opt, "level:") { - if err := checkSelinuxLevel(strings.TrimPrefix(opt, "level:")); err != nil { - return "", "", err - } - } - } - return label.InitLabels(options) -} - -func checkSelinuxLevel(level string) error { - if len(level) == 0 { - return nil - } - - matched, err := regexp.MatchString(`^s\d(-s\d)??(:c\d{1,4}(\.c\d{1,4})?(,c\d{1,4}(\.c\d{1,4})?)*)?$`, level) - if err != nil { - return errors.Wrapf(err, "the format of 'level' %q is not correct", level) - } - if !matched { - return fmt.Errorf("the format of 'level' %q is not correct", level) - } - return nil -} - // isInCRIMounts checks whether a destination is in CRI mount list. func isInCRIMounts(dst string, mounts []*runtime.Mount) bool { for _, m := range mounts { @@ -383,15 +268,6 @@ func buildLabels(configLabels map[string]string, containerType string) map[strin return labels } -func getPodCNILabels(id string, config *runtime.PodSandboxConfig) map[string]string { - return map[string]string{ - "K8S_POD_NAMESPACE": config.GetMetadata().GetNamespace(), - "K8S_POD_NAME": config.GetMetadata().GetName(), - "K8S_POD_INFRA_CONTAINER_ID": id, - "IgnoreUnknown": "1", - } -} - // toRuntimeAuthConfig converts cri plugin auth config to runtime auth config. func toRuntimeAuthConfig(a criconfig.AuthConfig) *runtime.AuthConfig { return &runtime.AuthConfig{ @@ -407,13 +283,13 @@ func toRuntimeAuthConfig(a criconfig.AuthConfig) *runtime.AuthConfig { func parseImageReferences(refs []string) ([]string, []string) { var tags, digests []string for _, ref := range refs { - parsed, err := reference.ParseAnyReference(ref) + parsed, err := docker.ParseAnyReference(ref) if err != nil { continue } - if _, ok := parsed.(reference.Canonical); ok { + if _, ok := parsed.(docker.Canonical); ok { digests = append(digests, parsed.String()) - } else if _, ok := parsed.(reference.Tagged); ok { + } else if _, ok := parsed.(docker.Tagged); ok { tags = append(tags, parsed.String()) } } @@ -449,6 +325,8 @@ func getRuntimeOptionsType(t string) interface{} { return &runcoptions.Options{} case plugin.RuntimeLinuxV1: return &runctypes.RuncOptions{} + case runtimeRunhcsV1: + return &runhcsoptions.Options{} default: return &runtimeoptions.Options{} } diff --git a/vendor/github.com/containerd/cri/pkg/server/helpers_unix.go b/vendor/github.com/containerd/cri/pkg/server/helpers_unix.go new file mode 100644 index 00000000000..b96af1c5aa4 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/helpers_unix.go @@ -0,0 +1,258 @@ +// +build !windows + +/* + Copyright The containerd 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 server + +import ( + "context" + "fmt" + "os" + "path" + "path/filepath" + "regexp" + "sort" + "strings" + "syscall" + "time" + + "github.com/containerd/containerd/log" + "github.com/containerd/containerd/mount" + "github.com/containerd/cri/pkg/seccomp" + runcapparmor "github.com/opencontainers/runc/libcontainer/apparmor" + "github.com/opencontainers/selinux/go-selinux/label" + "github.com/pkg/errors" + "golang.org/x/sys/unix" + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +const ( + // defaultSandboxOOMAdj is default omm adj for sandbox container. (kubernetes#47938). + defaultSandboxOOMAdj = -998 + // defaultShmSize is the default size of the sandbox shm. + defaultShmSize = int64(1024 * 1024 * 64) + // relativeRootfsPath is the rootfs path relative to bundle path. + relativeRootfsPath = "rootfs" + // According to http://man7.org/linux/man-pages/man5/resolv.conf.5.html: + // "The search list is currently limited to six domains with a total of 256 characters." + maxDNSSearches = 6 + // devShm is the default path of /dev/shm. + devShm = "/dev/shm" + // etcHosts is the default path of /etc/hosts file. + etcHosts = "/etc/hosts" + // etcHostname is the default path of /etc/hostname file. + etcHostname = "/etc/hostname" + // resolvConfPath is the abs path of resolv.conf on host or container. + resolvConfPath = "/etc/resolv.conf" + // hostnameEnv is the key for HOSTNAME env. + hostnameEnv = "HOSTNAME" +) + +// getCgroupsPath generates container cgroups path. +func getCgroupsPath(cgroupsParent, id string) string { + base := path.Base(cgroupsParent) + if strings.HasSuffix(base, ".slice") { + // For a.slice/b.slice/c.slice, base is c.slice. + // runc systemd cgroup path format is "slice:prefix:name". + return strings.Join([]string{base, "cri-containerd", id}, ":") + } + return filepath.Join(cgroupsParent, id) +} + +// getSandboxHostname returns the hostname file path inside the sandbox root directory. +func (c *criService) getSandboxHostname(id string) string { + return filepath.Join(c.getSandboxRootDir(id), "hostname") +} + +// getSandboxHosts returns the hosts file path inside the sandbox root directory. +func (c *criService) getSandboxHosts(id string) string { + return filepath.Join(c.getSandboxRootDir(id), "hosts") +} + +// getResolvPath returns resolv.conf filepath for specified sandbox. +func (c *criService) getResolvPath(id string) string { + return filepath.Join(c.getSandboxRootDir(id), "resolv.conf") +} + +// getSandboxDevShm returns the shm file path inside the sandbox root directory. +func (c *criService) getSandboxDevShm(id string) string { + return filepath.Join(c.getVolatileSandboxRootDir(id), "shm") +} + +func toLabel(selinuxOptions *runtime.SELinuxOption) ([]string, error) { + var labels []string + + if selinuxOptions == nil { + return nil, nil + } + if err := checkSelinuxLevel(selinuxOptions.Level); err != nil { + return nil, err + } + if selinuxOptions.User != "" { + labels = append(labels, "user:"+selinuxOptions.User) + } + if selinuxOptions.Role != "" { + labels = append(labels, "role:"+selinuxOptions.Role) + } + if selinuxOptions.Type != "" { + labels = append(labels, "type:"+selinuxOptions.Type) + } + if selinuxOptions.Level != "" { + labels = append(labels, "level:"+selinuxOptions.Level) + } + + return labels, nil +} + +func initLabelsFromOpt(selinuxOpts *runtime.SELinuxOption) (string, string, error) { + labels, err := toLabel(selinuxOpts) + if err != nil { + return "", "", err + } + return label.InitLabels(labels) +} + +func checkSelinuxLevel(level string) error { + if len(level) == 0 { + return nil + } + + matched, err := regexp.MatchString(`^s\d(-s\d)??(:c\d{1,4}(\.c\d{1,4})?(,c\d{1,4}(\.c\d{1,4})?)*)?$`, level) + if err != nil { + return errors.Wrapf(err, "the format of 'level' %q is not correct", level) + } + if !matched { + return fmt.Errorf("the format of 'level' %q is not correct", level) + } + return nil +} + +func (c *criService) apparmorEnabled() bool { + return runcapparmor.IsEnabled() && !c.config.DisableApparmor +} + +func (c *criService) seccompEnabled() bool { + return seccomp.IsEnabled() +} + +// openLogFile opens/creates a container log file. +func openLogFile(path string) (*os.File, error) { + return os.OpenFile(path, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0640) +} + +// unmountRecursive unmounts the target and all mounts underneath, starting with +// the deepest mount first. +func unmountRecursive(ctx context.Context, target string) error { + mounts, err := mount.Self() + if err != nil { + return err + } + + var toUnmount []string + for _, m := range mounts { + p, err := filepath.Rel(target, m.Mountpoint) + if err != nil { + return err + } + if !strings.HasPrefix(p, "..") { + toUnmount = append(toUnmount, m.Mountpoint) + } + } + + // Make the deepest mount be first + sort.Slice(toUnmount, func(i, j int) bool { + return len(toUnmount[i]) > len(toUnmount[j]) + }) + + for i, mountPath := range toUnmount { + if err := mount.UnmountAll(mountPath, unix.MNT_DETACH); err != nil { + if i == len(toUnmount)-1 { // last mount + return err + } + // This is some submount, we can ignore this error for now, the final unmount will fail if this is a real problem + log.G(ctx).WithError(err).Debugf("failed to unmount submount %s", mountPath) + } + } + return nil +} + +// ensureRemoveAll wraps `os.RemoveAll` to check for specific errors that can +// often be remedied. +// Only use `ensureRemoveAll` if you really want to make every effort to remove +// a directory. +// +// Because of the way `os.Remove` (and by extension `os.RemoveAll`) works, there +// can be a race between reading directory entries and then actually attempting +// to remove everything in the directory. +// These types of errors do not need to be returned since it's ok for the dir to +// be gone we can just retry the remove operation. +// +// This should not return a `os.ErrNotExist` kind of error under any circumstances +func ensureRemoveAll(ctx context.Context, dir string) error { + notExistErr := make(map[string]bool) + + // track retries + exitOnErr := make(map[string]int) + maxRetry := 50 + + // Attempt to unmount anything beneath this dir first. + if err := unmountRecursive(ctx, dir); err != nil { + log.G(ctx).WithError(err).Debugf("failed to do initial unmount of %s", dir) + } + + for { + err := os.RemoveAll(dir) + if err == nil { + return nil + } + + pe, ok := err.(*os.PathError) + if !ok { + return err + } + + if os.IsNotExist(err) { + if notExistErr[pe.Path] { + return err + } + notExistErr[pe.Path] = true + + // There is a race where some subdir can be removed but after the + // parent dir entries have been read. + // So the path could be from `os.Remove(subdir)` + // If the reported non-existent path is not the passed in `dir` we + // should just retry, but otherwise return with no error. + if pe.Path == dir { + return nil + } + continue + } + + if pe.Err != syscall.EBUSY { + return err + } + if e := mount.Unmount(pe.Path, unix.MNT_DETACH); e != nil { + return errors.Wrapf(e, "error while removing %s", dir) + } + + if exitOnErr[pe.Path] == maxRetry { + return err + } + exitOnErr[pe.Path]++ + time.Sleep(100 * time.Millisecond) + } +} diff --git a/vendor/github.com/containerd/cri/pkg/server/helpers_windows.go b/vendor/github.com/containerd/cri/pkg/server/helpers_windows.go new file mode 100644 index 00000000000..df5aa6d5993 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/helpers_windows.go @@ -0,0 +1,219 @@ +// +build windows + +/* + Copyright The containerd 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 server + +import ( + "context" + "os" + "path/filepath" + "syscall" + "time" +) + +// openLogFile opens/creates a container log file. +// It specifies `FILE_SHARE_DELETE` option to make sure +// log files can be rotated by kubelet. +// TODO(windows): Use golang support after 1.14. (https://github.com/golang/go/issues/32088) +func openLogFile(path string) (*os.File, error) { + path = fixLongPath(path) + if len(path) == 0 { + return nil, syscall.ERROR_FILE_NOT_FOUND + } + pathp, err := syscall.UTF16PtrFromString(path) + if err != nil { + return nil, err + } + createmode := uint32(syscall.OPEN_ALWAYS) + access := uint32(syscall.FILE_APPEND_DATA) + sharemode := uint32(syscall.FILE_SHARE_READ | syscall.FILE_SHARE_WRITE | syscall.FILE_SHARE_DELETE) + h, err := syscall.CreateFile(pathp, access, sharemode, nil, createmode, syscall.FILE_ATTRIBUTE_NORMAL, 0) + if err != nil { + return nil, err + } + return os.NewFile(uintptr(h), path), nil +} + +// Copyright (c) 2009 The Go Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// fixLongPath returns the extended-length (\\?\-prefixed) form of +// path when needed, in order to avoid the default 260 character file +// path limit imposed by Windows. If path is not easily converted to +// the extended-length form (for example, if path is a relative path +// or contains .. elements), or is short enough, fixLongPath returns +// path unmodified. +// +// See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath +// +// This is copied from https://golang.org/src/path/filepath/path_windows.go. +func fixLongPath(path string) string { + // Do nothing (and don't allocate) if the path is "short". + // Empirically (at least on the Windows Server 2013 builder), + // the kernel is arbitrarily okay with < 248 bytes. That + // matches what the docs above say: + // "When using an API to create a directory, the specified + // path cannot be so long that you cannot append an 8.3 file + // name (that is, the directory name cannot exceed MAX_PATH + // minus 12)." Since MAX_PATH is 260, 260 - 12 = 248. + // + // The MSDN docs appear to say that a normal path that is 248 bytes long + // will work; empirically the path must be less then 248 bytes long. + if len(path) < 248 { + // Don't fix. (This is how Go 1.7 and earlier worked, + // not automatically generating the \\?\ form) + return path + } + + // The extended form begins with \\?\, as in + // \\?\c:\windows\foo.txt or \\?\UNC\server\share\foo.txt. + // The extended form disables evaluation of . and .. path + // elements and disables the interpretation of / as equivalent + // to \. The conversion here rewrites / to \ and elides + // . elements as well as trailing or duplicate separators. For + // simplicity it avoids the conversion entirely for relative + // paths or paths containing .. elements. For now, + // \\server\share paths are not converted to + // \\?\UNC\server\share paths because the rules for doing so + // are less well-specified. + if len(path) >= 2 && path[:2] == `\\` { + // Don't canonicalize UNC paths. + return path + } + if !filepath.IsAbs(path) { + // Relative path + return path + } + + const prefix = `\\?` + + pathbuf := make([]byte, len(prefix)+len(path)+len(`\`)) + copy(pathbuf, prefix) + n := len(path) + r, w := 0, len(prefix) + for r < n { + switch { + case os.IsPathSeparator(path[r]): + // empty block + r++ + case path[r] == '.' && (r+1 == n || os.IsPathSeparator(path[r+1])): + // /./ + r++ + case r+1 < n && path[r] == '.' && path[r+1] == '.' && (r+2 == n || os.IsPathSeparator(path[r+2])): + // /../ is currently unhandled + return path + default: + pathbuf[w] = '\\' + w++ + for ; r < n && !os.IsPathSeparator(path[r]); r++ { + pathbuf[w] = path[r] + w++ + } + } + } + // A drive's root directory needs a trailing \ + if w == len(`\\?\c:`) { + pathbuf[w] = '\\' + w++ + } + return string(pathbuf[:w]) +} + +// ensureRemoveAll wraps `os.RemoveAll` to check for specific errors that can +// often be remedied. +// Only use `ensureRemoveAll` if you really want to make every effort to remove +// a directory. +// +// Because of the way `os.Remove` (and by extension `os.RemoveAll`) works, there +// can be a race between reading directory entries and then actually attempting +// to remove everything in the directory. +// These types of errors do not need to be returned since it's ok for the dir to +// be gone we can just retry the remove operation. +// +// This should not return a `os.ErrNotExist` kind of error under any circumstances +func ensureRemoveAll(_ context.Context, dir string) error { + notExistErr := make(map[string]bool) + + // track retries + exitOnErr := make(map[string]int) + maxRetry := 50 + + for { + err := os.RemoveAll(dir) + if err == nil { + return nil + } + + pe, ok := err.(*os.PathError) + if !ok { + return err + } + + if os.IsNotExist(err) { + if notExistErr[pe.Path] { + return err + } + notExistErr[pe.Path] = true + + // There is a race where some subdir can be removed but after the + // parent dir entries have been read. + // So the path could be from `os.Remove(subdir)` + // If the reported non-existent path is not the passed in `dir` we + // should just retry, but otherwise return with no error. + if pe.Path == dir { + return nil + } + continue + } + + if pe.Err != syscall.EBUSY { + return err + } + + if exitOnErr[pe.Path] == maxRetry { + return err + } + exitOnErr[pe.Path]++ + time.Sleep(100 * time.Millisecond) + } +} diff --git a/vendor/github.com/containerd/cri/pkg/server/image_list.go b/vendor/github.com/containerd/cri/pkg/server/image_list.go index 6c0dd3ffda2..dc6aeecc2b9 100644 --- a/vendor/github.com/containerd/cri/pkg/server/image_list.go +++ b/vendor/github.com/containerd/cri/pkg/server/image_list.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/server/image_pull.go b/vendor/github.com/containerd/cri/pkg/server/image_pull.go index d12caf56745..7407edd2961 100644 --- a/vendor/github.com/containerd/cri/pkg/server/image_pull.go +++ b/vendor/github.com/containerd/cri/pkg/server/image_pull.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -20,6 +20,7 @@ import ( "crypto/tls" "crypto/x509" "encoding/base64" + "fmt" "io/ioutil" "net" "net/http" @@ -31,8 +32,10 @@ import ( "github.com/containerd/containerd/errdefs" containerdimages "github.com/containerd/containerd/images" "github.com/containerd/containerd/log" + distribution "github.com/containerd/containerd/reference/docker" "github.com/containerd/containerd/remotes/docker" - distribution "github.com/docker/distribution/reference" + "github.com/containerd/imgcrypt" + "github.com/containerd/imgcrypt/images/encryption" imagespec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" "golang.org/x/net/context" @@ -95,7 +98,8 @@ func (c *criService) PullImage(ctx context.Context, r *runtime.PullImageRequest) } var ( resolver = docker.NewResolver(docker.ResolverOptions{ - Hosts: c.registryHosts(r.GetAuth()), + Headers: c.config.Registry.Headers, + Hosts: c.registryHosts(r.GetAuth()), }) isSchema1 bool imageHandler containerdimages.HandlerFunc = func(_ context.Context, @@ -106,7 +110,8 @@ func (c *criService) PullImage(ctx context.Context, r *runtime.PullImageRequest) return nil, nil } ) - image, err := c.client.Pull(ctx, ref, + + pullOpts := []containerd.RemoteOpt{ containerd.WithSchema1Conversion, containerd.WithResolver(resolver), containerd.WithPullSnapshotter(c.config.ContainerdConfig.Snapshotter), @@ -114,7 +119,21 @@ func (c *criService) PullImage(ctx context.Context, r *runtime.PullImageRequest) containerd.WithPullLabel(imageLabelKey, imageLabelValue), containerd.WithMaxConcurrentDownloads(c.config.MaxConcurrentDownloads), containerd.WithImageHandler(imageHandler), - ) + } + + pullOpts = append(pullOpts, c.encryptedImagesPullOpts()...) + if !c.config.ContainerdConfig.DisableSnapshotAnnotations { + pullOpts = append(pullOpts, + containerd.WithImageHandlerWrapper(appendInfoHandlerWrapper(ref))) + } + + if c.config.ContainerdConfig.DiscardUnpackedLayers { + // Allows GC to clean layers up from the content store after unpacking + pullOpts = append(pullOpts, + containerd.WithChildLabelMap(containerdimages.ChildGCLabelsFilterLayers)) + } + + image, err := c.client.Pull(ctx, ref, pullOpts...) if err != nil { return nil, errors.Wrapf(err, "failed to pull and unpack image %q", ref) } @@ -271,7 +290,7 @@ func (c *criService) getTLSConfig(registryTLSConfig criconfig.TLSConfig) (*tls.C if len(cert.Certificate) != 0 { tlsConfig.Certificates = []tls.Certificate{cert} } - tlsConfig.BuildNameToCertificate() + tlsConfig.BuildNameToCertificate() // nolint:staticcheck } if registryTLSConfig.CAFile != "" { @@ -312,10 +331,6 @@ func (c *criService) registryHosts(auth *runtime.AuthConfig) docker.RegistryHost config = c.config.Registry.Configs[u.Host] ) - if u.Scheme != "https" && config.TLS != nil { - return nil, errors.Errorf("tls provided for http endpoint %q", e) - } - if config.TLS != nil { transport.TLSClientConfig, err = c.getTLSConfig(*config.TLS) if err != nil { @@ -359,6 +374,19 @@ func defaultScheme(host string) string { return "https" } +// addDefaultScheme returns the endpoint with default scheme +func addDefaultScheme(endpoint string) (string, error) { + if strings.Contains(endpoint, "://") { + return endpoint, nil + } + ue := "dummy://" + endpoint + u, err := url.Parse(ue) + if err != nil { + return "", err + } + return fmt.Sprintf("%s://%s", defaultScheme(u.Host), endpoint), nil +} + // registryEndpoints returns endpoints for a given host. // It adds default registry endpoint if it does not exist in the passed-in endpoint list. // It also supports wildcard host matching with `*`. @@ -374,6 +402,13 @@ func (c *criService) registryEndpoints(host string) ([]string, error) { if err != nil { return nil, errors.Wrap(err, "get default host") } + for i := range endpoints { + en, err := addDefaultScheme(endpoints[i]) + if err != nil { + return nil, errors.Wrap(err, "parse endpoint url") + } + endpoints[i] = en + } for _, e := range endpoints { u, err := url.Parse(e) if err != nil { @@ -393,9 +428,9 @@ func newTransport() *http.Transport { return &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - DualStack: true, + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + FallbackDelay: 300 * time.Millisecond, }).DialContext, MaxIdleConns: 10, IdleConnTimeout: 30 * time.Second, @@ -403,3 +438,68 @@ func newTransport() *http.Transport { ExpectContinueTimeout: 5 * time.Second, } } + +// encryptedImagesPullOpts returns the necessary list of pull options required +// for decryption of encrypted images based on the cri decryption configuration. +func (c *criService) encryptedImagesPullOpts() []containerd.RemoteOpt { + if c.config.ImageDecryption.KeyModel == criconfig.KeyModelNode { + ltdd := imgcrypt.Payload{} + decUnpackOpt := encryption.WithUnpackConfigApplyOpts(encryption.WithDecryptedUnpack(<dd)) + opt := containerd.WithUnpackOpts([]containerd.UnpackOpt{decUnpackOpt}) + return []containerd.RemoteOpt{opt} + } + return nil +} + +const ( + // targetRefLabel is a label which contains image reference and will be passed + // to snapshotters. + targetRefLabel = "containerd.io/snapshot/cri.image-ref" + // targetDigestLabel is a label which contains layer digest and will be passed + // to snapshotters. + targetDigestLabel = "containerd.io/snapshot/cri.layer-digest" + // targetImageLayersLabel is a label which contains layer digests contained in + // the target image and will be passed to snapshotters for preparing layers in + // parallel. + targetImageLayersLabel = "containerd.io/snapshot/cri.image-layers" +) + +// appendInfoHandlerWrapper makes a handler which appends some basic information +// of images to each layer descriptor as annotations during unpack. These +// annotations will be passed to snapshotters as labels. These labels will be +// used mainly by stargz-based snapshotters for querying image contents from the +// registry. +func appendInfoHandlerWrapper(ref string) func(f containerdimages.Handler) containerdimages.Handler { + return func(f containerdimages.Handler) containerdimages.Handler { + return containerdimages.HandlerFunc(func(ctx context.Context, desc imagespec.Descriptor) ([]imagespec.Descriptor, error) { + children, err := f.Handle(ctx, desc) + if err != nil { + return nil, err + } + switch desc.MediaType { + case imagespec.MediaTypeImageManifest, containerdimages.MediaTypeDockerSchema2Manifest: + var layers string + for _, c := range children { + if containerdimages.IsLayerType(c.MediaType) { + layers += fmt.Sprintf("%s,", c.Digest.String()) + } + } + if len(layers) >= 1 { + layers = layers[:len(layers)-1] + } + for i := range children { + c := &children[i] + if containerdimages.IsLayerType(c.MediaType) { + if c.Annotations == nil { + c.Annotations = make(map[string]string) + } + c.Annotations[targetRefLabel] = ref + c.Annotations[targetDigestLabel] = c.Digest.String() + c.Annotations[targetImageLayersLabel] = layers + } + } + } + return children, nil + }) + } +} diff --git a/vendor/github.com/containerd/cri/pkg/server/image_remove.go b/vendor/github.com/containerd/cri/pkg/server/image_remove.go index e725e6e5c23..bcd02d758b0 100644 --- a/vendor/github.com/containerd/cri/pkg/server/image_remove.go +++ b/vendor/github.com/containerd/cri/pkg/server/image_remove.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/server/image_status.go b/vendor/github.com/containerd/cri/pkg/server/image_status.go index f03739d9ac7..5ada7b0076b 100644 --- a/vendor/github.com/containerd/cri/pkg/server/image_status.go +++ b/vendor/github.com/containerd/cri/pkg/server/image_status.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/server/imagefs_info.go b/vendor/github.com/containerd/cri/pkg/server/imagefs_info.go index 30cf9623c7d..81dbd5cd015 100644 --- a/vendor/github.com/containerd/cri/pkg/server/imagefs_info.go +++ b/vendor/github.com/containerd/cri/pkg/server/imagefs_info.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -25,6 +25,7 @@ import ( ) // ImageFsInfo returns information of the filesystem that is used to store images. +// TODO(windows): Usage for windows is always 0 right now. Support this for windows. func (c *criService) ImageFsInfo(ctx context.Context, r *runtime.ImageFsInfoRequest) (*runtime.ImageFsInfoResponse, error) { snapshots := c.snapshotStore.List() timestamp := time.Now().UnixNano() diff --git a/vendor/github.com/containerd/cri/pkg/server/instrumented_service.go b/vendor/github.com/containerd/cri/pkg/server/instrumented_service.go index 8a23c139312..2c2528ab6dc 100644 --- a/vendor/github.com/containerd/cri/pkg/server/instrumented_service.go +++ b/vendor/github.com/containerd/cri/pkg/server/instrumented_service.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/server/io/container_io.go b/vendor/github.com/containerd/cri/pkg/server/io/container_io.go index 509e4993e1b..c66549ca5b1 100644 --- a/vendor/github.com/containerd/cri/pkg/server/io/container_io.go +++ b/vendor/github.com/containerd/cri/pkg/server/io/container_io.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 io diff --git a/vendor/github.com/containerd/cri/pkg/server/io/exec_io.go b/vendor/github.com/containerd/cri/pkg/server/io/exec_io.go index 3b2c36a907d..4a695030d2e 100644 --- a/vendor/github.com/containerd/cri/pkg/server/io/exec_io.go +++ b/vendor/github.com/containerd/cri/pkg/server/io/exec_io.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 io diff --git a/vendor/github.com/containerd/cri/pkg/server/io/helpers.go b/vendor/github.com/containerd/cri/pkg/server/io/helpers.go index 6ca5931f260..59d41411f23 100644 --- a/vendor/github.com/containerd/cri/pkg/server/io/helpers.go +++ b/vendor/github.com/containerd/cri/pkg/server/io/helpers.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 io @@ -24,7 +24,6 @@ import ( "syscall" "github.com/containerd/containerd/cio" - "github.com/containerd/fifo" "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ) @@ -113,7 +112,7 @@ func newStdioPipes(fifos *cio.FIFOSet) (_ *stdioPipes, _ *wgCloser, err error) { }() if fifos.Stdin != "" { - if f, err = fifo.OpenFifo(ctx, fifos.Stdin, syscall.O_WRONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { + if f, err = openPipe(ctx, fifos.Stdin, syscall.O_WRONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { return nil, nil, err } p.stdin = f @@ -121,7 +120,7 @@ func newStdioPipes(fifos *cio.FIFOSet) (_ *stdioPipes, _ *wgCloser, err error) { } if fifos.Stdout != "" { - if f, err = fifo.OpenFifo(ctx, fifos.Stdout, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { + if f, err = openPipe(ctx, fifos.Stdout, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { return nil, nil, err } p.stdout = f @@ -129,7 +128,7 @@ func newStdioPipes(fifos *cio.FIFOSet) (_ *stdioPipes, _ *wgCloser, err error) { } if fifos.Stderr != "" { - if f, err = fifo.OpenFifo(ctx, fifos.Stderr, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { + if f, err = openPipe(ctx, fifos.Stderr, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { return nil, nil, err } p.stderr = f diff --git a/vendor/github.com/containerd/cri/pkg/server/io/helpers_unix.go b/vendor/github.com/containerd/cri/pkg/server/io/helpers_unix.go new file mode 100644 index 00000000000..2780b958ab5 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/io/helpers_unix.go @@ -0,0 +1,31 @@ +// +build !windows + +/* + Copyright The containerd 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 io + +import ( + "io" + "os" + + "github.com/containerd/fifo" + "golang.org/x/net/context" +) + +func openPipe(ctx context.Context, fn string, flag int, perm os.FileMode) (io.ReadWriteCloser, error) { + return fifo.OpenFifo(ctx, fn, flag, perm) +} diff --git a/vendor/github.com/containerd/cri/pkg/server/io/helpers_windows.go b/vendor/github.com/containerd/cri/pkg/server/io/helpers_windows.go new file mode 100644 index 00000000000..f64807edf2b --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/io/helpers_windows.go @@ -0,0 +1,81 @@ +// +build windows + +/* + Copyright The containerd 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 io + +import ( + "io" + "net" + "os" + "sync" + + winio "github.com/Microsoft/go-winio" + "github.com/pkg/errors" + "golang.org/x/net/context" +) + +type pipe struct { + l net.Listener + con net.Conn + conErr error + conWg sync.WaitGroup +} + +func openPipe(ctx context.Context, fn string, flag int, perm os.FileMode) (io.ReadWriteCloser, error) { + l, err := winio.ListenPipe(fn, nil) + if err != nil { + return nil, err + } + p := &pipe{l: l} + p.conWg.Add(1) + go func() { + defer p.conWg.Done() + c, err := l.Accept() + if err != nil { + p.conErr = err + return + } + p.con = c + }() + return p, nil +} + +func (p *pipe) Write(b []byte) (int, error) { + p.conWg.Wait() + if p.conErr != nil { + return 0, errors.Wrap(p.conErr, "connection error") + } + return p.con.Write(b) +} + +func (p *pipe) Read(b []byte) (int, error) { + p.conWg.Wait() + if p.conErr != nil { + return 0, errors.Wrap(p.conErr, "connection error") + } + return p.con.Read(b) +} + +func (p *pipe) Close() error { + p.l.Close() + p.conWg.Wait() + if p.con != nil { + return p.con.Close() + } + return p.conErr +} diff --git a/vendor/github.com/containerd/cri/pkg/server/io/logger.go b/vendor/github.com/containerd/cri/pkg/server/io/logger.go index a324adf5003..f13b6f8bf38 100644 --- a/vendor/github.com/containerd/cri/pkg/server/io/logger.go +++ b/vendor/github.com/containerd/cri/pkg/server/io/logger.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 io diff --git a/vendor/github.com/containerd/cri/pkg/server/restart.go b/vendor/github.com/containerd/cri/pkg/server/restart.go index 75cbb7f3193..2480bd5eaf8 100644 --- a/vendor/github.com/containerd/cri/pkg/server/restart.go +++ b/vendor/github.com/containerd/cri/pkg/server/restart.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -20,6 +20,7 @@ import ( "io/ioutil" "os" "path/filepath" + goruntime "runtime" "time" "github.com/containerd/containerd" @@ -29,7 +30,6 @@ import ( "github.com/containerd/containerd/log" "github.com/containerd/containerd/platforms" "github.com/containerd/typeurl" - "github.com/docker/docker/pkg/system" "github.com/pkg/errors" "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" @@ -409,7 +409,8 @@ func (c *criService) loadSandbox(ctx context.Context, cntr containerd.Container) sandbox.Container = cntr // Load network namespace. - if meta.Config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetNetwork() == runtime.NamespaceMode_NODE { + if goruntime.GOOS != "windows" && + meta.Config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetNetwork() == runtime.NamespaceMode_NODE { // Don't need to load netns for host network sandbox. return sandbox, nil } @@ -472,7 +473,7 @@ func cleanupOrphanedIDDirs(ctx context.Context, cntrs []containerd.Container, ba continue } dir := filepath.Join(base, d.Name()) - if err := system.EnsureRemoveAll(dir); err != nil { + if err := ensureRemoveAll(ctx, dir); err != nil { log.G(ctx).WithError(err).Warnf("Failed to remove id directory %q", dir) } else { log.G(ctx).Debugf("Cleanup orphaned id directory %q", dir) diff --git a/vendor/github.com/containerd/cri/pkg/server/sandbox_list.go b/vendor/github.com/containerd/cri/pkg/server/sandbox_list.go index b1dcb7c3ab7..d2528b2674f 100644 --- a/vendor/github.com/containerd/cri/pkg/server/sandbox_list.go +++ b/vendor/github.com/containerd/cri/pkg/server/sandbox_list.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/server/sandbox_portforward.go b/vendor/github.com/containerd/cri/pkg/server/sandbox_portforward.go index f972ce2076c..6d382ba2b98 100644 --- a/vendor/github.com/containerd/cri/pkg/server/sandbox_portforward.go +++ b/vendor/github.com/containerd/cri/pkg/server/sandbox_portforward.go @@ -1,32 +1,23 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server import ( - "bytes" - "fmt" - "io" - "os/exec" - "strings" - - "github.com/containerd/containerd/log" - "github.com/containernetworking/plugins/pkg/ns" "github.com/pkg/errors" - "github.com/sirupsen/logrus" "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" @@ -45,82 +36,3 @@ func (c *criService) PortForward(ctx context.Context, r *runtime.PortForwardRequ // TODO(random-liu): Verify that ports are exposed. return c.streamServer.GetPortForward(r) } - -// portForward requires `socat` on the node. It uses netns to enter the sandbox namespace, -// and run `socat` insidethe namespace to forward stream for a specific port. The `socat` -// command keeps running until it exits or client disconnect. -func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriter) error { - s, err := c.sandboxStore.Get(id) - if err != nil { - return errors.Wrapf(err, "failed to find sandbox %q in store", id) - } - var netNSDo func(func(ns.NetNS) error) error - // netNSPath is the network namespace path for logging. - var netNSPath string - securityContext := s.Config.GetLinux().GetSecurityContext() - hostNet := securityContext.GetNamespaceOptions().GetNetwork() == runtime.NamespaceMode_NODE - if !hostNet { - if closed, err := s.NetNS.Closed(); err != nil { - return errors.Wrapf(err, "failed to check netwok namespace closed for sandbox %q", id) - } else if closed { - return errors.Errorf("network namespace for sandbox %q is closed", id) - } - netNSDo = s.NetNS.Do - netNSPath = s.NetNS.GetPath() - } else { - // Run the function directly for host network. - netNSDo = func(do func(_ ns.NetNS) error) error { - return do(nil) - } - netNSPath = "host" - } - - socat, err := exec.LookPath("socat") - if err != nil { - return errors.Wrap(err, "failed to find socat") - } - - // Check https://linux.die.net/man/1/socat for meaning of the options. - args := []string{socat, "-", fmt.Sprintf("TCP4:localhost:%d", port)} - - log.G(ctx).Infof("Executing port forwarding command %q in network namespace %q", strings.Join(args, " "), netNSPath) - err = netNSDo(func(_ ns.NetNS) error { - cmd := exec.Command(args[0], args[1:]...) - cmd.Stdout = stream - - stderr := new(bytes.Buffer) - cmd.Stderr = stderr - - // If we use Stdin, command.Run() won't return until the goroutine that's copying - // from stream finishes. Unfortunately, if you have a client like telnet connected - // via port forwarding, as long as the user's telnet client is connected to the user's - // local listener that port forwarding sets up, the telnet session never exits. This - // means that even if socat has finished running, command.Run() won't ever return - // (because the client still has the connection and stream open). - // - // The work around is to use StdinPipe(), as Wait() (called by Run()) closes the pipe - // when the command (socat) exits. - in, err := cmd.StdinPipe() - if err != nil { - return errors.Wrap(err, "failed to create stdin pipe") - } - go func() { - if _, err := io.Copy(in, stream); err != nil { - logrus.WithError(err).Errorf("Failed to copy port forward input for %q port %d", id, port) - } - in.Close() - logrus.Debugf("Finish copying port forward input for %q port %d", id, port) - }() - - if err := cmd.Run(); err != nil { - return errors.Errorf("socat command returns error: %v, stderr: %q", err, stderr.String()) - } - return nil - }) - if err != nil { - return errors.Wrapf(err, "failed to execute portforward in network namespace %q", netNSPath) - } - log.G(ctx).Infof("Finish port forwarding for %q port %d", id, port) - - return nil -} diff --git a/vendor/github.com/containerd/cri/pkg/server/sandbox_portforward_unix.go b/vendor/github.com/containerd/cri/pkg/server/sandbox_portforward_unix.go new file mode 100644 index 00000000000..5691c2b6196 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/sandbox_portforward_unix.go @@ -0,0 +1,128 @@ +// +build !windows + +/* + Copyright The containerd 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 server + +import ( + "fmt" + "io" + "net" + "time" + + "github.com/containerd/containerd/log" + "github.com/containernetworking/plugins/pkg/ns" + "github.com/pkg/errors" + "golang.org/x/net/context" + + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +// portForward uses netns to enter the sandbox namespace, and forwards a stream inside the +// the namespace to a specific port. It keeps forwarding until it exits or client disconnect. +func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriteCloser) error { + s, err := c.sandboxStore.Get(id) + if err != nil { + return errors.Wrapf(err, "failed to find sandbox %q in store", id) + } + + var netNSDo func(func(ns.NetNS) error) error + // netNSPath is the network namespace path for logging. + var netNSPath string + securityContext := s.Config.GetLinux().GetSecurityContext() + hostNet := securityContext.GetNamespaceOptions().GetNetwork() == runtime.NamespaceMode_NODE + if !hostNet { + if closed, err := s.NetNS.Closed(); err != nil { + return errors.Wrapf(err, "failed to check netwok namespace closed for sandbox %q", id) + } else if closed { + return errors.Errorf("network namespace for sandbox %q is closed", id) + } + netNSDo = s.NetNS.Do + netNSPath = s.NetNS.GetPath() + } else { + // Run the function directly for host network. + netNSDo = func(do func(_ ns.NetNS) error) error { + return do(nil) + } + netNSPath = "host" + } + + log.G(ctx).Infof("Executing port forwarding in network namespace %q", netNSPath) + err = netNSDo(func(_ ns.NetNS) error { + defer stream.Close() + // TODO: hardcoded to tcp4 because localhost resolves to ::1 by default if the system has IPv6 enabled. + // Theoretically happy eyeballs will try IPv6 first and fallback to IPv4 + // but resolving localhost doesn't seem to return and IPv4 address, thus failing the connection. + conn, err := net.Dial("tcp4", fmt.Sprintf("localhost:%d", port)) + if err != nil { + return errors.Wrapf(err, "failed to dial %d", port) + } + defer conn.Close() + + errCh := make(chan error, 2) + // Copy from the the namespace port connection to the client stream + go func() { + log.G(ctx).Debugf("PortForward copying data from namespace %q port %d to the client stream", id, port) + _, err := io.Copy(stream, conn) + errCh <- err + }() + + // Copy from the client stream to the namespace port connection + go func() { + log.G(ctx).Debugf("PortForward copying data from client stream to namespace %q port %d", id, port) + _, err := io.Copy(conn, stream) + errCh <- err + }() + + // Wait until the first error is returned by one of the connections + // we use errFwd to store the result of the port forwarding operation + // if the context is cancelled close everything and return + var errFwd error + select { + case errFwd = <-errCh: + log.G(ctx).Debugf("PortForward stop forwarding in one direction in network namespace %q port %d: %v", id, port, errFwd) + case <-ctx.Done(): + log.G(ctx).Debugf("PortForward cancelled in network namespace %q port %d: %v", id, port, ctx.Err()) + return ctx.Err() + } + // give a chance to terminate gracefully or timeout + // after 1s + // https://linux.die.net/man/1/socat + const timeout = time.Second + select { + case e := <-errCh: + if errFwd == nil { + errFwd = e + } + log.G(ctx).Debugf("PortForward stopped forwarding in both directions in network namespace %q port %d: %v", id, port, e) + case <-time.After(timeout): + log.G(ctx).Debugf("PortForward timed out waiting to close the connection in network namespace %q port %d", id, port) + case <-ctx.Done(): + log.G(ctx).Debugf("PortForward cancelled in network namespace %q port %d: %v", id, port, ctx.Err()) + errFwd = ctx.Err() + } + + return errFwd + }) + + if err != nil { + return errors.Wrapf(err, "failed to execute portforward in network namespace %q", netNSPath) + } + log.G(ctx).Infof("Finish port forwarding for %q port %d", id, port) + + return nil +} diff --git a/vendor/github.com/containerd/cri/pkg/server/sandbox_portforward_windows.go b/vendor/github.com/containerd/cri/pkg/server/sandbox_portforward_windows.go new file mode 100644 index 00000000000..3c328a31492 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/sandbox_portforward_windows.go @@ -0,0 +1,80 @@ +// +build windows + +/* + Copyright The containerd 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 server + +import ( + "bytes" + "fmt" + "io" + + "github.com/pkg/errors" + "golang.org/x/net/context" + "k8s.io/utils/exec" + + "github.com/containerd/cri/pkg/ioutil" + sandboxstore "github.com/containerd/cri/pkg/store/sandbox" +) + +func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriter) error { + stdout := ioutil.NewNopWriteCloser(stream) + stderrBuffer := new(bytes.Buffer) + stderr := ioutil.NewNopWriteCloser(stderrBuffer) + // localhost is resolved to 127.0.0.1 in ipv4, and ::1 in ipv6. + // Explicitly using ipv4 IP address in here to avoid flakiness. + cmd := []string{"wincat.exe", "127.0.0.1", fmt.Sprint(port)} + err := c.execInSandbox(ctx, id, cmd, stream, stdout, stderr) + if err != nil { + return errors.Wrapf(err, "failed to execute port forward in sandbox: %s", stderrBuffer.String()) + } + return nil +} + +func (c *criService) execInSandbox(ctx context.Context, sandboxID string, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser) error { + // Get sandbox from our sandbox store. + sb, err := c.sandboxStore.Get(sandboxID) + if err != nil { + return errors.Wrapf(err, "failed to find sandbox %q in store", sandboxID) + } + + // Check the sandbox state + state := sb.Status.Get().State + if state != sandboxstore.StateReady { + return errors.Errorf("sandbox is in %s state", fmt.Sprint(state)) + } + + opts := execOptions{ + cmd: cmd, + stdin: stdin, + stdout: stdout, + stderr: stderr, + tty: false, + resize: nil, + } + exitCode, err := c.execInternal(ctx, sb.Container, sandboxID, opts) + if err != nil { + return errors.Wrap(err, "failed to exec in sandbox") + } + if *exitCode == 0 { + return nil + } + return &exec.CodeExitError{ + Err: errors.Errorf("error executing command %v, exit code %d", cmd, *exitCode), + Code: int(*exitCode), + } +} diff --git a/vendor/github.com/containerd/cri/pkg/server/sandbox_remove.go b/vendor/github.com/containerd/cri/pkg/server/sandbox_remove.go index c0ef5c04b50..2c2deb2e021 100644 --- a/vendor/github.com/containerd/cri/pkg/server/sandbox_remove.go +++ b/vendor/github.com/containerd/cri/pkg/server/sandbox_remove.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -20,7 +20,6 @@ import ( "github.com/containerd/containerd" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/log" - "github.com/docker/docker/pkg/system" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/net/context" @@ -84,12 +83,12 @@ func (c *criService) RemovePodSandbox(ctx context.Context, r *runtime.RemovePodS // Cleanup the sandbox root directories. sandboxRootDir := c.getSandboxRootDir(id) - if err := system.EnsureRemoveAll(sandboxRootDir); err != nil { + if err := ensureRemoveAll(ctx, sandboxRootDir); err != nil { return nil, errors.Wrapf(err, "failed to remove sandbox root directory %q", sandboxRootDir) } volatileSandboxRootDir := c.getVolatileSandboxRootDir(id) - if err := system.EnsureRemoveAll(volatileSandboxRootDir); err != nil { + if err := ensureRemoveAll(ctx, volatileSandboxRootDir); err != nil { return nil, errors.Wrapf(err, "failed to remove volatile sandbox root directory %q", volatileSandboxRootDir) } diff --git a/vendor/github.com/containerd/cri/pkg/server/sandbox_run.go b/vendor/github.com/containerd/cri/pkg/server/sandbox_run.go index d229d14a70e..1fc92adbf03 100644 --- a/vendor/github.com/containerd/cri/pkg/server/sandbox_run.go +++ b/vendor/github.com/containerd/cri/pkg/server/sandbox_run.go @@ -1,54 +1,48 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server import ( "encoding/json" - "fmt" "math" - "os" + goruntime "runtime" "strings" "github.com/containerd/containerd" containerdio "github.com/containerd/containerd/cio" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/log" - "github.com/containerd/containerd/oci" - "github.com/containerd/containerd/plugin" cni "github.com/containerd/go-cni" "github.com/containerd/typeurl" "github.com/davecgh/go-spew/spew" - imagespec "github.com/opencontainers/image-spec/specs-go/v1" - runtimespec "github.com/opencontainers/runtime-spec/specs-go" - selinux "github.com/opencontainers/selinux/go-selinux" "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/net/context" - "golang.org/x/sys/unix" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/kubernetes/pkg/util/bandwidth" "github.com/containerd/cri/pkg/annotations" criconfig "github.com/containerd/cri/pkg/config" customopts "github.com/containerd/cri/pkg/containerd/opts" ctrdutil "github.com/containerd/cri/pkg/containerd/util" "github.com/containerd/cri/pkg/netns" + "github.com/containerd/cri/pkg/server/bandwidth" sandboxstore "github.com/containerd/cri/pkg/store/sandbox" "github.com/containerd/cri/pkg/util" + selinux "github.com/opencontainers/selinux/go-selinux" ) func init() { @@ -111,10 +105,14 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox } log.G(ctx).Debugf("Use OCI %+v for sandbox %q", ociRuntime, id) - securityContext := config.GetLinux().GetSecurityContext() - //Create Network Namespace if it is not in host network - hostNet := securityContext.GetNamespaceOptions().GetNetwork() == runtime.NamespaceMode_NODE - if !hostNet { + podNetwork := true + // Pod network is always needed on windows. + if goruntime.GOOS != "windows" && + config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetNetwork() == runtime.NamespaceMode_NODE { + // Pod network is not needed on linux with host network. + podNetwork = false + } + if podNetwork { // If it is not in host network namespace then create a namespace and set the sandbox // handle. NetNSPath in sandbox metadata and NetNS is non empty only for non host network // namespaces. If the pod is in host network namespace then both are empty and should not @@ -126,12 +124,18 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox sandbox.NetNSPath = sandbox.NetNS.GetPath() defer func() { if retErr != nil { + // Teardown network if an error is returned. + if err := c.teardownPodNetwork(ctx, sandbox); err != nil { + log.G(ctx).WithError(err).Errorf("Failed to destroy network for sandbox %q", id) + } + if err := sandbox.NetNS.Remove(); err != nil { log.G(ctx).WithError(err).Errorf("Failed to remove network namespace %s for sandbox %q", sandbox.NetNSPath, id) } sandbox.NetNSPath = "" } }() + // Setup network for sandbox. // Certain VM based solutions like clear containers (Issue containerd/cri-containerd#524) // rely on the assumption that CRI shim will not be querying the network namespace to check the @@ -143,18 +147,13 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox if err := c.setupPodNetwork(ctx, &sandbox); err != nil { return nil, errors.Wrapf(err, "failed to setup network for sandbox %q", id) } - defer func() { - if retErr != nil { - // Teardown network if an error is returned. - if err := c.teardownPodNetwork(ctx, sandbox); err != nil { - log.G(ctx).WithError(err).Errorf("Failed to destroy network for sandbox %q", id) - } - } - }() } // Create sandbox container. - spec, err := c.generateSandboxContainerSpec(id, config, &image.ImageSpec.Config, sandbox.NetNSPath, ociRuntime.PodAnnotations) + // NOTE: sandboxContainerSpec SHOULD NOT have side + // effect, e.g. accessing/creating files, so that we can test + // it safely. + spec, err := c.sandboxContainerSpec(id, config, &image.ImageSpec.Config, sandbox.NetNSPath, ociRuntime.PodAnnotations) if err != nil { return nil, errors.Wrap(err, "failed to generate sandbox container spec") } @@ -166,39 +165,16 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox } }() - if securityContext.GetPrivileged() { + if config.GetLinux().GetSecurityContext().GetPrivileged() { // If privileged don't set selinux label, but we still record the MCS label so that // the unused label can be freed later. spec.Process.SelinuxLabel = "" } - var specOpts []oci.SpecOpts - userstr, err := generateUserString( - "", - securityContext.GetRunAsUser(), - securityContext.GetRunAsGroup(), - ) + // Generate spec options that will be applied to the spec later. + specOpts, err := c.sandboxContainerSpecOpts(config, &image.ImageSpec.Config) if err != nil { - return nil, errors.Wrap(err, "failed to generate user string") - } - if userstr == "" { - // Lastly, since no user override was passed via CRI try to set via OCI - // Image - userstr = image.ImageSpec.Config.User - } - if userstr != "" { - specOpts = append(specOpts, oci.WithUser(userstr)) - } - - seccompSpecOpts, err := generateSeccompSpecOpts( - securityContext.GetSeccompProfilePath(), - securityContext.GetPrivileged(), - c.seccompEnabled) - if err != nil { - return nil, errors.Wrap(err, "failed to generate seccomp spec opts") - } - if seccompSpecOpts != nil { - specOpts = append(specOpts, seccompSpecOpts) + return nil, errors.Wrap(err, "failed to generate sanbdox container spec options") } sandboxLabels := buildLabels(config.Labels, containerKindSandbox) @@ -259,14 +235,14 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox } }() - // Setup sandbox /dev/shm, /etc/hosts, /etc/resolv.conf and /etc/hostname. + // Setup files required for the sandbox. if err = c.setupSandboxFiles(id, config); err != nil { return nil, errors.Wrapf(err, "failed to setup sandbox files") } defer func() { if retErr != nil { - if err = c.unmountSandboxFiles(id, config); err != nil { - log.G(ctx).WithError(err).Errorf("Failed to unmount sandbox files in %q", + if err = c.cleanupSandboxFiles(id, config); err != nil { + log.G(ctx).WithError(err).Errorf("Failed to cleanup sandbox files in %q", sandboxRootDir) } } @@ -282,11 +258,7 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox log.G(ctx).Tracef("Create sandbox container (id=%q, name=%q).", id, name) - var taskOpts []containerd.NewTaskOpts - // TODO(random-liu): Remove this after shim v1 is deprecated. - if c.config.NoPivot && (ociRuntime.Type == plugin.RuntimeRuncV1 || ociRuntime.Type == plugin.RuntimeRuncV2) { - taskOpts = append(taskOpts, containerd.WithNoPivotRoot) - } + taskOpts := c.taskOpts(ociRuntime.Type) // We don't need stdio for sandbox container. task, err := container.NewTask(ctx, containerdio.NullIO, taskOpts...) if err != nil { @@ -340,226 +312,6 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox return &runtime.RunPodSandboxResponse{PodSandboxId: id}, nil } -func (c *criService) generateSandboxContainerSpec(id string, config *runtime.PodSandboxConfig, - imageConfig *imagespec.ImageConfig, nsPath string, runtimePodAnnotations []string) (retSpec *runtimespec.Spec, retErr error) { - // Creates a spec Generator with the default spec. - // TODO(random-liu): [P1] Compare the default settings with docker and containerd default. - specOpts := []oci.SpecOpts{ - customopts.WithoutRunMount, - customopts.WithoutDefaultSecuritySettings, - customopts.WithRelativeRoot(relativeRootfsPath), - oci.WithEnv(imageConfig.Env), - oci.WithRootFSReadonly(), - oci.WithHostname(config.GetHostname()), - } - if imageConfig.WorkingDir != "" { - specOpts = append(specOpts, oci.WithProcessCwd(imageConfig.WorkingDir)) - } - - if len(imageConfig.Entrypoint) == 0 && len(imageConfig.Cmd) == 0 { - // Pause image must have entrypoint or cmd. - return nil, errors.Errorf("invalid empty entrypoint and cmd in image config %+v", imageConfig) - } - specOpts = append(specOpts, oci.WithProcessArgs(append(imageConfig.Entrypoint, imageConfig.Cmd...)...)) - - // TODO(random-liu): [P2] Consider whether to add labels and annotations to the container. - - // Set cgroups parent. - if c.config.DisableCgroup { - specOpts = append(specOpts, customopts.WithDisabledCgroups) - } else { - if config.GetLinux().GetCgroupParent() != "" { - cgroupsPath := getCgroupsPath(config.GetLinux().GetCgroupParent(), id) - specOpts = append(specOpts, oci.WithCgroup(cgroupsPath)) - } - } - - // When cgroup parent is not set, containerd-shim will create container in a child cgroup - // of the cgroup itself is in. - // TODO(random-liu): [P2] Set default cgroup path if cgroup parent is not specified. - - // Set namespace options. - var ( - securityContext = config.GetLinux().GetSecurityContext() - nsOptions = securityContext.GetNamespaceOptions() - ) - if nsOptions.GetNetwork() == runtime.NamespaceMode_NODE { - specOpts = append(specOpts, customopts.WithoutNamespace(runtimespec.NetworkNamespace)) - specOpts = append(specOpts, customopts.WithoutNamespace(runtimespec.UTSNamespace)) - } else { - //TODO(Abhi): May be move this to containerd spec opts (WithLinuxSpaceOption) - specOpts = append(specOpts, oci.WithLinuxNamespace( - runtimespec.LinuxNamespace{ - Type: runtimespec.NetworkNamespace, - Path: nsPath, - })) - } - if nsOptions.GetPid() == runtime.NamespaceMode_NODE { - specOpts = append(specOpts, customopts.WithoutNamespace(runtimespec.PIDNamespace)) - } - if nsOptions.GetIpc() == runtime.NamespaceMode_NODE { - specOpts = append(specOpts, customopts.WithoutNamespace(runtimespec.IPCNamespace)) - } - - // It's fine to generate the spec before the sandbox /dev/shm - // is actually created. - sandboxDevShm := c.getSandboxDevShm(id) - if nsOptions.GetIpc() == runtime.NamespaceMode_NODE { - sandboxDevShm = devShm - } - specOpts = append(specOpts, oci.WithMounts([]runtimespec.Mount{ - { - Source: sandboxDevShm, - Destination: devShm, - Type: "bind", - Options: []string{"rbind", "ro"}, - }, - })) - - processLabel, mountLabel, err := initLabelsFromOpt(securityContext.GetSelinuxOptions()) - if err != nil { - return nil, errors.Wrapf(err, "failed to init selinux options %+v", securityContext.GetSelinuxOptions()) - } - defer func() { - if retErr != nil && processLabel != "" { - selinux.ReleaseLabel(processLabel) - } - }() - - supplementalGroups := securityContext.GetSupplementalGroups() - specOpts = append(specOpts, - customopts.WithSelinuxLabels(processLabel, mountLabel), - customopts.WithSupplementalGroups(supplementalGroups), - ) - - // Add sysctls - sysctls := config.GetLinux().GetSysctls() - specOpts = append(specOpts, customopts.WithSysctls(sysctls)) - - // Note: LinuxSandboxSecurityContext does not currently provide an apparmor profile - - if !c.config.DisableCgroup { - specOpts = append(specOpts, customopts.WithDefaultSandboxShares) - } - specOpts = append(specOpts, customopts.WithPodOOMScoreAdj(int(defaultSandboxOOMAdj), c.config.RestrictOOMScoreAdj)) - - for pKey, pValue := range getPassthroughAnnotations(config.Annotations, - runtimePodAnnotations) { - specOpts = append(specOpts, customopts.WithAnnotation(pKey, pValue)) - } - - specOpts = append(specOpts, - customopts.WithAnnotation(annotations.ContainerType, annotations.ContainerTypeSandbox), - customopts.WithAnnotation(annotations.SandboxID, id), - customopts.WithAnnotation(annotations.SandboxLogDir, config.GetLogDirectory()), - ) - - return runtimeSpec(id, specOpts...) -} - -// setupSandboxFiles sets up necessary sandbox files including /dev/shm, /etc/hosts, -// /etc/resolv.conf and /etc/hostname. -func (c *criService) setupSandboxFiles(id string, config *runtime.PodSandboxConfig) error { - sandboxEtcHostname := c.getSandboxHostname(id) - hostname := config.GetHostname() - if hostname == "" { - var err error - hostname, err = c.os.Hostname() - if err != nil { - return errors.Wrap(err, "failed to get hostname") - } - } - if err := c.os.WriteFile(sandboxEtcHostname, []byte(hostname+"\n"), 0644); err != nil { - return errors.Wrapf(err, "failed to write hostname to %q", sandboxEtcHostname) - } - - // TODO(random-liu): Consider whether we should maintain /etc/hosts and /etc/resolv.conf in kubelet. - sandboxEtcHosts := c.getSandboxHosts(id) - if err := c.os.CopyFile(etcHosts, sandboxEtcHosts, 0644); err != nil { - return errors.Wrapf(err, "failed to generate sandbox hosts file %q", sandboxEtcHosts) - } - - // Set DNS options. Maintain a resolv.conf for the sandbox. - var err error - resolvContent := "" - if dnsConfig := config.GetDnsConfig(); dnsConfig != nil { - resolvContent, err = parseDNSOptions(dnsConfig.Servers, dnsConfig.Searches, dnsConfig.Options) - if err != nil { - return errors.Wrapf(err, "failed to parse sandbox DNSConfig %+v", dnsConfig) - } - } - resolvPath := c.getResolvPath(id) - if resolvContent == "" { - // copy host's resolv.conf to resolvPath - err = c.os.CopyFile(resolvConfPath, resolvPath, 0644) - if err != nil { - return errors.Wrapf(err, "failed to copy host's resolv.conf to %q", resolvPath) - } - } else { - err = c.os.WriteFile(resolvPath, []byte(resolvContent), 0644) - if err != nil { - return errors.Wrapf(err, "failed to write resolv content to %q", resolvPath) - } - } - - // Setup sandbox /dev/shm. - if config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetIpc() == runtime.NamespaceMode_NODE { - if _, err := c.os.Stat(devShm); err != nil { - return errors.Wrapf(err, "host %q is not available for host ipc", devShm) - } - } else { - sandboxDevShm := c.getSandboxDevShm(id) - if err := c.os.MkdirAll(sandboxDevShm, 0700); err != nil { - return errors.Wrap(err, "failed to create sandbox shm") - } - shmproperty := fmt.Sprintf("mode=1777,size=%d", defaultShmSize) - if err := c.os.Mount("shm", sandboxDevShm, "tmpfs", uintptr(unix.MS_NOEXEC|unix.MS_NOSUID|unix.MS_NODEV), shmproperty); err != nil { - return errors.Wrap(err, "failed to mount sandbox shm") - } - } - - return nil -} - -// parseDNSOptions parse DNS options into resolv.conf format content, -// if none option is specified, will return empty with no error. -func parseDNSOptions(servers, searches, options []string) (string, error) { - resolvContent := "" - - if len(searches) > maxDNSSearches { - return "", errors.Errorf("DNSOption.Searches has more than %d domains", maxDNSSearches) - } - - if len(searches) > 0 { - resolvContent += fmt.Sprintf("search %s\n", strings.Join(searches, " ")) - } - - if len(servers) > 0 { - resolvContent += fmt.Sprintf("nameserver %s\n", strings.Join(servers, "\nnameserver ")) - } - - if len(options) > 0 { - resolvContent += fmt.Sprintf("options %s\n", strings.Join(options, " ")) - } - - return resolvContent, nil -} - -// unmountSandboxFiles unmount some sandbox files, we rely on the removal of sandbox root directory to -// remove these files. Unmount should *NOT* return error if the mount point is already unmounted. -func (c *criService) unmountSandboxFiles(id string, config *runtime.PodSandboxConfig) error { - if config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetIpc() != runtime.NamespaceMode_NODE { - path, err := c.os.FollowSymlinkInScope(c.getSandboxDevShm(id), "/") - if err != nil { - return errors.Wrap(err, "failed to follow symlink") - } - if err := c.os.Unmount(path); err != nil && !os.IsNotExist(err) { - return errors.Wrapf(err, "failed to unmount %q", path) - } - } - return nil -} - // setupPodNetwork setups up the network for a pod func (c *criService) setupPodNetwork(ctx context.Context, sandbox *sandboxstore.Sandbox) error { var ( @@ -571,22 +323,12 @@ func (c *criService) setupPodNetwork(ctx context.Context, sandbox *sandboxstore. return errors.New("cni config not initialized") } - labels := getPodCNILabels(id, config) - - // Will return an error if the bandwidth limitation has the wrong unit - // or an unreasonable valure see validateBandwidthIsReasonable() - bandWidth, err := toCNIBandWidth(config.Annotations) + opts, err := cniNamespaceOpts(id, config) if err != nil { - return errors.Wrap(err, "failed to get bandwidth info from annotations") + return errors.Wrap(err, "get cni namespace options") } - result, err := c.netPlugin.Setup(ctx, id, - path, - cni.WithLabels(labels), - cni.WithCapabilityPortMap(toCNIPortMappings(config.GetPortMappings())), - cni.WithCapabilityBandWidth(*bandWidth), - ) - + result, err := c.netPlugin.Setup(ctx, id, path, opts...) if err != nil { return err } @@ -597,18 +339,57 @@ func (c *criService) setupPodNetwork(ctx context.Context, sandbox *sandboxstore. sandbox.CNIResult = result return nil } - // If it comes here then the result was invalid so destroy the pod network and return error - if err := c.teardownPodNetwork(ctx, *sandbox); err != nil { - log.G(ctx).WithError(err).Errorf("Failed to destroy network for sandbox %q", id) - } return errors.Errorf("failed to find network info for sandbox %q", id) } +// cniNamespaceOpts get CNI namespace options from sandbox config. +func cniNamespaceOpts(id string, config *runtime.PodSandboxConfig) ([]cni.NamespaceOpts, error) { + opts := []cni.NamespaceOpts{ + cni.WithLabels(toCNILabels(id, config)), + } + + portMappings := toCNIPortMappings(config.GetPortMappings()) + if len(portMappings) > 0 { + opts = append(opts, cni.WithCapabilityPortMap(portMappings)) + } + + // Will return an error if the bandwidth limitation has the wrong unit + // or an unreasonable value see validateBandwidthIsReasonable() + bandWidth, err := toCNIBandWidth(config.Annotations) + if err != nil { + return nil, err + } + if bandWidth != nil { + opts = append(opts, cni.WithCapabilityBandWidth(*bandWidth)) + } + + dns := toCNIDNS(config.GetDnsConfig()) + if dns != nil { + opts = append(opts, cni.WithCapabilityDNS(*dns)) + } + + return opts, nil +} + +// toCNILabels adds pod metadata into CNI labels. +func toCNILabels(id string, config *runtime.PodSandboxConfig) map[string]string { + return map[string]string{ + "K8S_POD_NAMESPACE": config.GetMetadata().GetNamespace(), + "K8S_POD_NAME": config.GetMetadata().GetName(), + "K8S_POD_INFRA_CONTAINER_ID": id, + "IgnoreUnknown": "1", + } +} + // toCNIBandWidth converts CRI annotations to CNI bandwidth. func toCNIBandWidth(annotations map[string]string) (*cni.BandWidth, error) { ingress, egress, err := bandwidth.ExtractPodBandwidthResources(annotations) if err != nil { - return nil, errors.Errorf("reading pod bandwidth annotations: %v", err) + return nil, errors.Wrap(err, "reading pod bandwidth annotations") + } + + if ingress == nil && egress == nil { + return nil, nil } bandWidth := &cni.BandWidth{} @@ -633,9 +414,6 @@ func toCNIPortMappings(criPortMappings []*runtime.PortMapping) []cni.PortMapping if mapping.HostPort <= 0 { continue } - if mapping.Protocol != runtime.Protocol_TCP && mapping.Protocol != runtime.Protocol_UDP { - continue - } portMappings = append(portMappings, cni.PortMapping{ HostPort: mapping.HostPort, ContainerPort: mapping.ContainerPort, @@ -646,6 +424,18 @@ func toCNIPortMappings(criPortMappings []*runtime.PortMapping) []cni.PortMapping return portMappings } +// toCNIDNS converts CRI DNSConfig to CNI. +func toCNIDNS(dns *runtime.DNSConfig) *cni.DNS { + if dns == nil { + return nil + } + return &cni.DNS{ + Servers: dns.GetServers(), + Searches: dns.GetSearches(), + Options: dns.GetOptions(), + } +} + // selectPodIPs select an ip from the ip list. It prefers ipv4 more than ipv6 // and returns the additional ips // TODO(random-liu): Revisit the ip order in the ipv6 beta stage. (cri#1278) @@ -705,6 +495,7 @@ func (c *criService) getSandboxRuntime(config *runtime.PodSandboxConfig, runtime // Note: If the workload is marked untrusted but requests privileged, this can be granted, as the // runtime may support this. For example, in a virtual-machine isolated runtime, privileged // is a supported option, granting the workload to access the entire guest VM instead of host. + // TODO(windows): Deprecate this so that we don't need to handle it for windows. if hostAccessingSandbox(config) { return criconfig.Runtime{}, errors.New("untrusted workload with host access is not allowed") } diff --git a/vendor/github.com/containerd/cri/pkg/server/sandbox_run_unix.go b/vendor/github.com/containerd/cri/pkg/server/sandbox_run_unix.go new file mode 100644 index 00000000000..ad0b85254c7 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/sandbox_run_unix.go @@ -0,0 +1,310 @@ +// +build !windows + +/* + Copyright The containerd 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 server + +import ( + "fmt" + "os" + "strings" + + "github.com/containerd/containerd" + "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/plugin" + imagespec "github.com/opencontainers/image-spec/specs-go/v1" + runtimespec "github.com/opencontainers/runtime-spec/specs-go" + selinux "github.com/opencontainers/selinux/go-selinux" + "github.com/pkg/errors" + "golang.org/x/sys/unix" + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + "github.com/containerd/cri/pkg/annotations" + customopts "github.com/containerd/cri/pkg/containerd/opts" + osinterface "github.com/containerd/cri/pkg/os" +) + +func (c *criService) sandboxContainerSpec(id string, config *runtime.PodSandboxConfig, + imageConfig *imagespec.ImageConfig, nsPath string, runtimePodAnnotations []string) (_ *runtimespec.Spec, retErr error) { + // Creates a spec Generator with the default spec. + // TODO(random-liu): [P1] Compare the default settings with docker and containerd default. + specOpts := []oci.SpecOpts{ + customopts.WithoutRunMount, + customopts.WithoutDefaultSecuritySettings, + customopts.WithRelativeRoot(relativeRootfsPath), + oci.WithEnv(imageConfig.Env), + oci.WithRootFSReadonly(), + oci.WithHostname(config.GetHostname()), + } + if imageConfig.WorkingDir != "" { + specOpts = append(specOpts, oci.WithProcessCwd(imageConfig.WorkingDir)) + } + + if len(imageConfig.Entrypoint) == 0 && len(imageConfig.Cmd) == 0 { + // Pause image must have entrypoint or cmd. + return nil, errors.Errorf("invalid empty entrypoint and cmd in image config %+v", imageConfig) + } + specOpts = append(specOpts, oci.WithProcessArgs(append(imageConfig.Entrypoint, imageConfig.Cmd...)...)) + + // Set cgroups parent. + if c.config.DisableCgroup { + specOpts = append(specOpts, customopts.WithDisabledCgroups) + } else { + if config.GetLinux().GetCgroupParent() != "" { + cgroupsPath := getCgroupsPath(config.GetLinux().GetCgroupParent(), id) + specOpts = append(specOpts, oci.WithCgroup(cgroupsPath)) + } + } + + // When cgroup parent is not set, containerd-shim will create container in a child cgroup + // of the cgroup itself is in. + // TODO(random-liu): [P2] Set default cgroup path if cgroup parent is not specified. + + // Set namespace options. + var ( + securityContext = config.GetLinux().GetSecurityContext() + nsOptions = securityContext.GetNamespaceOptions() + ) + if nsOptions.GetNetwork() == runtime.NamespaceMode_NODE { + specOpts = append(specOpts, customopts.WithoutNamespace(runtimespec.NetworkNamespace)) + specOpts = append(specOpts, customopts.WithoutNamespace(runtimespec.UTSNamespace)) + } else { + specOpts = append(specOpts, oci.WithLinuxNamespace( + runtimespec.LinuxNamespace{ + Type: runtimespec.NetworkNamespace, + Path: nsPath, + })) + } + if nsOptions.GetPid() == runtime.NamespaceMode_NODE { + specOpts = append(specOpts, customopts.WithoutNamespace(runtimespec.PIDNamespace)) + } + if nsOptions.GetIpc() == runtime.NamespaceMode_NODE { + specOpts = append(specOpts, customopts.WithoutNamespace(runtimespec.IPCNamespace)) + } + + // It's fine to generate the spec before the sandbox /dev/shm + // is actually created. + sandboxDevShm := c.getSandboxDevShm(id) + if nsOptions.GetIpc() == runtime.NamespaceMode_NODE { + sandboxDevShm = devShm + } + specOpts = append(specOpts, oci.WithMounts([]runtimespec.Mount{ + { + Source: sandboxDevShm, + Destination: devShm, + Type: "bind", + Options: []string{"rbind", "ro"}, + }, + // Add resolv.conf for katacontainers to setup the DNS of pod VM properly. + { + Source: c.getResolvPath(id), + Destination: resolvConfPath, + Type: "bind", + Options: []string{"rbind", "ro"}, + }, + })) + + processLabel, mountLabel, err := initLabelsFromOpt(securityContext.GetSelinuxOptions()) + if err != nil { + return nil, errors.Wrapf(err, "failed to init selinux options %+v", securityContext.GetSelinuxOptions()) + } + defer func() { + if retErr != nil { + selinux.ReleaseLabel(processLabel) + } + }() + + supplementalGroups := securityContext.GetSupplementalGroups() + specOpts = append(specOpts, + customopts.WithSelinuxLabels(processLabel, mountLabel), + customopts.WithSupplementalGroups(supplementalGroups), + ) + + // Add sysctls + sysctls := config.GetLinux().GetSysctls() + specOpts = append(specOpts, customopts.WithSysctls(sysctls)) + + // Note: LinuxSandboxSecurityContext does not currently provide an apparmor profile + + if !c.config.DisableCgroup { + specOpts = append(specOpts, customopts.WithDefaultSandboxShares) + } + specOpts = append(specOpts, customopts.WithPodOOMScoreAdj(int(defaultSandboxOOMAdj), c.config.RestrictOOMScoreAdj)) + + for pKey, pValue := range getPassthroughAnnotations(config.Annotations, + runtimePodAnnotations) { + specOpts = append(specOpts, customopts.WithAnnotation(pKey, pValue)) + } + + specOpts = append(specOpts, + customopts.WithAnnotation(annotations.ContainerType, annotations.ContainerTypeSandbox), + customopts.WithAnnotation(annotations.SandboxID, id), + customopts.WithAnnotation(annotations.SandboxLogDir, config.GetLogDirectory()), + ) + + return c.runtimeSpec(id, "", specOpts...) +} + +// sandboxContainerSpecOpts generates OCI spec options for +// the sandbox container. +func (c *criService) sandboxContainerSpecOpts(config *runtime.PodSandboxConfig, imageConfig *imagespec.ImageConfig) ([]oci.SpecOpts, error) { + var ( + securityContext = config.GetLinux().GetSecurityContext() + specOpts []oci.SpecOpts + ) + seccompSpecOpts, err := c.generateSeccompSpecOpts( + securityContext.GetSeccompProfilePath(), + securityContext.GetPrivileged(), + c.seccompEnabled()) + if err != nil { + return nil, errors.Wrap(err, "failed to generate seccomp spec opts") + } + if seccompSpecOpts != nil { + specOpts = append(specOpts, seccompSpecOpts) + } + + userstr, err := generateUserString( + "", + securityContext.GetRunAsUser(), + securityContext.GetRunAsGroup(), + ) + if err != nil { + return nil, errors.Wrap(err, "failed to generate user string") + } + if userstr == "" { + // Lastly, since no user override was passed via CRI try to set via OCI + // Image + userstr = imageConfig.User + } + if userstr != "" { + specOpts = append(specOpts, oci.WithUser(userstr)) + } + return specOpts, nil +} + +// setupSandboxFiles sets up necessary sandbox files including /dev/shm, /etc/hosts, +// /etc/resolv.conf and /etc/hostname. +func (c *criService) setupSandboxFiles(id string, config *runtime.PodSandboxConfig) error { + sandboxEtcHostname := c.getSandboxHostname(id) + hostname := config.GetHostname() + if hostname == "" { + var err error + hostname, err = c.os.Hostname() + if err != nil { + return errors.Wrap(err, "failed to get hostname") + } + } + if err := c.os.WriteFile(sandboxEtcHostname, []byte(hostname+"\n"), 0644); err != nil { + return errors.Wrapf(err, "failed to write hostname to %q", sandboxEtcHostname) + } + + // TODO(random-liu): Consider whether we should maintain /etc/hosts and /etc/resolv.conf in kubelet. + sandboxEtcHosts := c.getSandboxHosts(id) + if err := c.os.CopyFile(etcHosts, sandboxEtcHosts, 0644); err != nil { + return errors.Wrapf(err, "failed to generate sandbox hosts file %q", sandboxEtcHosts) + } + + // Set DNS options. Maintain a resolv.conf for the sandbox. + var err error + resolvContent := "" + if dnsConfig := config.GetDnsConfig(); dnsConfig != nil { + resolvContent, err = parseDNSOptions(dnsConfig.Servers, dnsConfig.Searches, dnsConfig.Options) + if err != nil { + return errors.Wrapf(err, "failed to parse sandbox DNSConfig %+v", dnsConfig) + } + } + resolvPath := c.getResolvPath(id) + if resolvContent == "" { + // copy host's resolv.conf to resolvPath + err = c.os.CopyFile(resolvConfPath, resolvPath, 0644) + if err != nil { + return errors.Wrapf(err, "failed to copy host's resolv.conf to %q", resolvPath) + } + } else { + err = c.os.WriteFile(resolvPath, []byte(resolvContent), 0644) + if err != nil { + return errors.Wrapf(err, "failed to write resolv content to %q", resolvPath) + } + } + + // Setup sandbox /dev/shm. + if config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetIpc() == runtime.NamespaceMode_NODE { + if _, err := c.os.Stat(devShm); err != nil { + return errors.Wrapf(err, "host %q is not available for host ipc", devShm) + } + } else { + sandboxDevShm := c.getSandboxDevShm(id) + if err := c.os.MkdirAll(sandboxDevShm, 0700); err != nil { + return errors.Wrap(err, "failed to create sandbox shm") + } + shmproperty := fmt.Sprintf("mode=1777,size=%d", defaultShmSize) + if err := c.os.(osinterface.UNIX).Mount("shm", sandboxDevShm, "tmpfs", uintptr(unix.MS_NOEXEC|unix.MS_NOSUID|unix.MS_NODEV), shmproperty); err != nil { + return errors.Wrap(err, "failed to mount sandbox shm") + } + } + + return nil +} + +// parseDNSOptions parse DNS options into resolv.conf format content, +// if none option is specified, will return empty with no error. +func parseDNSOptions(servers, searches, options []string) (string, error) { + resolvContent := "" + + if len(searches) > maxDNSSearches { + return "", errors.Errorf("DNSOption.Searches has more than %d domains", maxDNSSearches) + } + + if len(searches) > 0 { + resolvContent += fmt.Sprintf("search %s\n", strings.Join(searches, " ")) + } + + if len(servers) > 0 { + resolvContent += fmt.Sprintf("nameserver %s\n", strings.Join(servers, "\nnameserver ")) + } + + if len(options) > 0 { + resolvContent += fmt.Sprintf("options %s\n", strings.Join(options, " ")) + } + + return resolvContent, nil +} + +// cleanupSandboxFiles unmount some sandbox files, we rely on the removal of sandbox root directory to +// remove these files. Unmount should *NOT* return error if the mount point is already unmounted. +func (c *criService) cleanupSandboxFiles(id string, config *runtime.PodSandboxConfig) error { + if config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetIpc() != runtime.NamespaceMode_NODE { + path, err := c.os.FollowSymlinkInScope(c.getSandboxDevShm(id), "/") + if err != nil { + return errors.Wrap(err, "failed to follow symlink") + } + if err := c.os.(osinterface.UNIX).Unmount(path); err != nil && !os.IsNotExist(err) { + return errors.Wrapf(err, "failed to unmount %q", path) + } + } + return nil +} + +// taskOpts generates task options for a (sandbox) container. +func (c *criService) taskOpts(runtimeType string) []containerd.NewTaskOpts { + // TODO(random-liu): Remove this after shim v1 is deprecated. + var taskOpts []containerd.NewTaskOpts + if c.config.NoPivot && (runtimeType == plugin.RuntimeRuncV1 || runtimeType == plugin.RuntimeRuncV2) { + taskOpts = append(taskOpts, containerd.WithNoPivotRoot) + } + return taskOpts +} diff --git a/vendor/github.com/containerd/cri/pkg/server/sandbox_run_windows.go b/vendor/github.com/containerd/cri/pkg/server/sandbox_run_windows.go new file mode 100644 index 00000000000..85105c29931 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/sandbox_run_windows.go @@ -0,0 +1,91 @@ +// +build windows + +/* + Copyright The containerd 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 server + +import ( + "github.com/containerd/containerd" + "github.com/containerd/containerd/oci" + imagespec "github.com/opencontainers/image-spec/specs-go/v1" + runtimespec "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + "github.com/containerd/cri/pkg/annotations" + customopts "github.com/containerd/cri/pkg/containerd/opts" +) + +func (c *criService) sandboxContainerSpec(id string, config *runtime.PodSandboxConfig, + imageConfig *imagespec.ImageConfig, nsPath string, runtimePodAnnotations []string) (*runtimespec.Spec, error) { + // Creates a spec Generator with the default spec. + specOpts := []oci.SpecOpts{ + oci.WithEnv(imageConfig.Env), + oci.WithHostname(config.GetHostname()), + } + if imageConfig.WorkingDir != "" { + specOpts = append(specOpts, oci.WithProcessCwd(imageConfig.WorkingDir)) + } + + if len(imageConfig.Entrypoint) == 0 && len(imageConfig.Cmd) == 0 { + // Pause image must have entrypoint or cmd. + return nil, errors.Errorf("invalid empty entrypoint and cmd in image config %+v", imageConfig) + } + specOpts = append(specOpts, oci.WithProcessArgs(append(imageConfig.Entrypoint, imageConfig.Cmd...)...)) + + specOpts = append(specOpts, + // Clear the root location since hcsshim expects it. + // NOTE: readonly rootfs doesn't work on windows. + customopts.WithoutRoot, + customopts.WithWindowsNetworkNamespace(nsPath), + ) + + specOpts = append(specOpts, customopts.WithWindowsDefaultSandboxShares) + + for pKey, pValue := range getPassthroughAnnotations(config.Annotations, + runtimePodAnnotations) { + specOpts = append(specOpts, customopts.WithAnnotation(pKey, pValue)) + } + + specOpts = append(specOpts, + customopts.WithAnnotation(annotations.ContainerType, annotations.ContainerTypeSandbox), + customopts.WithAnnotation(annotations.SandboxID, id), + customopts.WithAnnotation(annotations.SandboxLogDir, config.GetLogDirectory()), + ) + + return c.runtimeSpec(id, "", specOpts...) +} + +// No sandbox container spec options for windows yet. +func (c *criService) sandboxContainerSpecOpts(config *runtime.PodSandboxConfig, imageConfig *imagespec.ImageConfig) ([]oci.SpecOpts, error) { + return nil, nil +} + +// No sandbox files needed for windows. +func (c *criService) setupSandboxFiles(id string, config *runtime.PodSandboxConfig) error { + return nil +} + +// No sandbox files needed for windows. +func (c *criService) cleanupSandboxFiles(id string, config *runtime.PodSandboxConfig) error { + return nil +} + +// No task options needed for windows. +func (c *criService) taskOpts(runtimeType string) []containerd.NewTaskOpts { + return nil +} diff --git a/vendor/github.com/containerd/cri/pkg/server/sandbox_status.go b/vendor/github.com/containerd/cri/pkg/server/sandbox_status.go index 774259d2fed..5644ab1be2d 100644 --- a/vendor/github.com/containerd/cri/pkg/server/sandbox_status.go +++ b/vendor/github.com/containerd/cri/pkg/server/sandbox_status.go @@ -1,23 +1,24 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server import ( "encoding/json" + goruntime "runtime" "github.com/containerd/containerd" "github.com/containerd/containerd/errdefs" @@ -69,7 +70,8 @@ func (c *criService) PodSandboxStatus(ctx context.Context, r *runtime.PodSandbox func (c *criService) getIPs(sandbox sandboxstore.Sandbox) (string, []string, error) { config := sandbox.Config - if config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetNetwork() == runtime.NamespaceMode_NODE { + if goruntime.GOOS != "windows" && + config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetNetwork() == runtime.NamespaceMode_NODE { // For sandboxes using the node network we are not // responsible for reporting the IP. return "", nil, nil diff --git a/vendor/github.com/containerd/cri/pkg/server/sandbox_stop.go b/vendor/github.com/containerd/cri/pkg/server/sandbox_stop.go index e8fc981cc5f..9b6e0a6ecb7 100644 --- a/vendor/github.com/containerd/cri/pkg/server/sandbox_stop.go +++ b/vendor/github.com/containerd/cri/pkg/server/sandbox_stop.go @@ -23,7 +23,6 @@ import ( eventtypes "github.com/containerd/containerd/api/events" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/log" - cni "github.com/containerd/go-cni" "github.com/pkg/errors" "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" @@ -67,8 +66,8 @@ func (c *criService) stopPodSandbox(ctx context.Context, sandbox sandboxstore.Sa } } - if err := c.unmountSandboxFiles(id, sandbox.Config); err != nil { - return errors.Wrap(err, "failed to unmount sandbox files") + if err := c.cleanupSandboxFiles(id, sandbox.Config); err != nil { + return errors.Wrap(err, "failed to cleanup sandbox files") } // Only stop sandbox container when it's running or unknown. @@ -175,11 +174,12 @@ func (c *criService) teardownPodNetwork(ctx context.Context, sandbox sandboxstor path = sandbox.NetNSPath config = sandbox.Config ) - labels := getPodCNILabels(id, config) - return c.netPlugin.Remove(ctx, id, - path, - cni.WithLabels(labels), - cni.WithCapabilityPortMap(toCNIPortMappings(config.GetPortMappings()))) + opts, err := cniNamespaceOpts(id, config) + if err != nil { + return errors.Wrap(err, "get cni namespace options") + } + + return c.netPlugin.Remove(ctx, id, path, opts...) } // cleanupUnknownSandbox cleanup stopped sandbox in unknown state. diff --git a/vendor/github.com/containerd/cri/pkg/server/service.go b/vendor/github.com/containerd/cri/pkg/server/service.go index 5b4d826a087..94e02591a41 100644 --- a/vendor/github.com/containerd/cri/pkg/server/service.go +++ b/vendor/github.com/containerd/cri/pkg/server/service.go @@ -1,41 +1,41 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server import ( + "encoding/json" "fmt" "io" "net/http" + "os" "path/filepath" "time" "github.com/containerd/containerd" + "github.com/containerd/containerd/oci" "github.com/containerd/containerd/plugin" - "github.com/containerd/cri/pkg/store/label" + "github.com/containerd/cri/pkg/streaming" cni "github.com/containerd/go-cni" - runcapparmor "github.com/opencontainers/runc/libcontainer/apparmor" - runcseccomp "github.com/opencontainers/runc/libcontainer/seccomp" - runcsystem "github.com/opencontainers/runc/libcontainer/system" - "github.com/opencontainers/selinux/go-selinux" "github.com/pkg/errors" "github.com/sirupsen/logrus" "google.golang.org/grpc" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/kubernetes/pkg/kubelet/server/streaming" + + "github.com/containerd/cri/pkg/store/label" "github.com/containerd/cri/pkg/atomic" criconfig "github.com/containerd/cri/pkg/config" @@ -69,10 +69,6 @@ type criService struct { config criconfig.Config // imageFSPath is the path to image filesystem. imageFSPath string - // apparmorEnabled indicates whether apparmor is enabled. - apparmorEnabled bool - // seccompEnabled indicates whether seccomp is enabled. - seccompEnabled bool // os is an interface for all required os operations. os osinterface.OS // sandboxStore stores all resources associated with sandboxes. @@ -100,6 +96,11 @@ type criService struct { // initialized indicates whether the server is initialized. All GRPC services // should return error before the server is initialized. initialized atomic.Bool + // cniNetConfMonitor is used to reload cni network conf if there is + // any valid fs change events from cni network conf dir. + cniNetConfMonitor *cniNetConfSyncer + // baseOCISpecs contains cached OCI specs loaded via `Runtime.BaseRuntimeSpec` + baseOCISpecs map[string]*oci.Spec } // NewCRIService returns a new instance of CRIService @@ -109,8 +110,6 @@ func NewCRIService(config criconfig.Config, client *containerd.Client) (CRIServi c := &criService{ config: config, client: client, - apparmorEnabled: runcapparmor.IsEnabled() && !config.DisableApparmor, - seccompEnabled: runcseccomp.IsEnabled(), os: osinterface.RealOS{}, sandboxStore: sandboxstore.NewStore(labels), containerStore: containerstore.NewStore(labels), @@ -121,20 +120,6 @@ func NewCRIService(config criconfig.Config, client *containerd.Client) (CRIServi initialized: atomic.NewBool(false), } - if runcsystem.RunningInUserNS() { - if !(config.DisableCgroup && !c.apparmorEnabled && config.RestrictOOMScoreAdj) { - logrus.Warn("Running containerd in a user namespace typically requires disable_cgroup, disable_apparmor, restrict_oom_score_adj set to be true") - } - } - - if c.config.EnableSelinux { - if !selinux.GetEnabled() { - logrus.Warn("Selinux is not supported") - } - } else { - selinux.SetDisabled() - } - if client.SnapshotService(c.config.ContainerdConfig.Snapshotter) == nil { return nil, errors.Errorf("failed to find snapshotter %q", c.config.ContainerdConfig.Snapshotter) } @@ -142,23 +127,10 @@ func NewCRIService(config criconfig.Config, client *containerd.Client) (CRIServi c.imageFSPath = imageFSPath(config.ContainerdRootDir, config.ContainerdConfig.Snapshotter) logrus.Infof("Get image filesystem path %q", c.imageFSPath) - // Pod needs to attach to atleast loopback network and a non host network, - // hence networkAttachCount is 2. If there are more network configs the - // pod will be attached to all the networks but we will only use the ip - // of the default network interface as the pod IP. - c.netPlugin, err = cni.New(cni.WithMinNetworkCount(networkAttachCount), - cni.WithPluginConfDir(config.NetworkPluginConfDir), - cni.WithPluginMaxConfNum(config.NetworkPluginMaxConfNum), - cni.WithPluginDir([]string{config.NetworkPluginBinDir})) - if err != nil { - return nil, errors.Wrap(err, "failed to initialize cni") + if err := c.initPlatform(); err != nil { + return nil, errors.Wrap(err, "initialize platform") } - // Try to load the config if it exists. Just log the error if load fails - // This is not disruptive for containerd to panic - if err := c.netPlugin.Load(cni.WithLoNetwork, cni.WithDefaultConf); err != nil { - logrus.WithError(err).Error("Failed to load cni during init, please check CRI plugin status before setting up network for pods") - } // prepare streaming server c.streamServer, err = newStreamServer(c, config.StreamServerAddress, config.StreamServerPort, config.StreamIdleTimeout) if err != nil { @@ -167,6 +139,17 @@ func NewCRIService(config criconfig.Config, client *containerd.Client) (CRIServi c.eventMonitor = newEventMonitor(c) + c.cniNetConfMonitor, err = newCNINetConfSyncer(c.config.NetworkPluginConfDir, c.netPlugin, c.cniLoadOptions()) + if err != nil { + return nil, errors.Wrap(err, "failed to create cni conf monitor") + } + + // Preload base OCI specs + c.baseOCISpecs, err = loadBaseOCISpecs(&config) + if err != nil { + return nil, err + } + return c, nil } @@ -208,6 +191,14 @@ func (c *criService) Run() error { ) snapshotsSyncer.start() + // Start CNI network conf syncer + logrus.Info("Start cni network conf syncer") + cniNetConfMonitorErrCh := make(chan error, 1) + go func() { + defer close(cniNetConfMonitorErrCh) + cniNetConfMonitorErrCh <- c.cniNetConfMonitor.syncLoop() + }() + // Start streaming server. logrus.Info("Start streaming server") streamServerErrCh := make(chan error) @@ -222,11 +213,12 @@ func (c *criService) Run() error { // Set the server as initialized. GRPC services could start serving traffic. c.initialized.Set() - var eventMonitorErr, streamServerErr error + var eventMonitorErr, streamServerErr, cniNetConfMonitorErr error // Stop the whole CRI service if any of the critical service exits. select { case eventMonitorErr = <-eventMonitorErrCh: case streamServerErr = <-streamServerErrCh: + case cniNetConfMonitorErr = <-cniNetConfMonitorErrCh: } if err := c.Close(); err != nil { return errors.Wrap(err, "failed to stop cri service") @@ -261,6 +253,9 @@ func (c *criService) Run() error { if streamServerErr != nil { return errors.Wrap(streamServerErr, "stream server error") } + if cniNetConfMonitorErr != nil { + return errors.Wrap(cniNetConfMonitorErr, "cni network conf monitor error") + } return nil } @@ -268,6 +263,9 @@ func (c *criService) Run() error { // TODO(random-liu): Make close synchronous. func (c *criService) Close() error { logrus.Info("Stop CRI service") + if err := c.cniNetConfMonitor.stop(); err != nil { + logrus.WithError(err).Error("failed to stop cni network conf monitor") + } c.eventMonitor.stop() if err := c.streamServer.Stop(); err != nil { return errors.Wrap(err, "failed to stop stream server") @@ -287,3 +285,41 @@ func (c *criService) register(s *grpc.Server) error { func imageFSPath(rootDir, snapshotter string) string { return filepath.Join(rootDir, fmt.Sprintf("%s.%s", plugin.SnapshotPlugin, snapshotter)) } + +func loadOCISpec(filename string) (*oci.Spec, error) { + file, err := os.Open(filename) + if err != nil { + return nil, errors.Wrapf(err, "failed to open base OCI spec: %s", filename) + } + defer file.Close() + + spec := oci.Spec{} + if err := json.NewDecoder(file).Decode(&spec); err != nil { + return nil, errors.Wrap(err, "failed to parse base OCI spec file") + } + + return &spec, nil +} + +func loadBaseOCISpecs(config *criconfig.Config) (map[string]*oci.Spec, error) { + specs := map[string]*oci.Spec{} + for _, cfg := range config.Runtimes { + if cfg.BaseRuntimeSpec == "" { + continue + } + + // Don't load same file twice + if _, ok := specs[cfg.BaseRuntimeSpec]; ok { + continue + } + + spec, err := loadOCISpec(cfg.BaseRuntimeSpec) + if err != nil { + return nil, errors.Wrapf(err, "failed to load base OCI spec from file: %s", cfg.BaseRuntimeSpec) + } + + specs[cfg.BaseRuntimeSpec] = spec + } + + return specs, nil +} diff --git a/vendor/github.com/containerd/cri/pkg/server/service_unix.go b/vendor/github.com/containerd/cri/pkg/server/service_unix.go new file mode 100644 index 00000000000..a1d9c9038d9 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/service_unix.go @@ -0,0 +1,72 @@ +// +build !windows + +/* + Copyright The containerd 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 server + +import ( + "github.com/containerd/containerd/sys" + cni "github.com/containerd/go-cni" + "github.com/opencontainers/selinux/go-selinux" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +// networkAttachCount is the minimum number of networks the PodSandbox +// attaches to +const networkAttachCount = 2 + +// initPlatform handles linux specific initialization for the CRI service. +func (c *criService) initPlatform() error { + var err error + + if sys.RunningInUserNS() { + if !(c.config.DisableCgroup && !c.apparmorEnabled() && c.config.RestrictOOMScoreAdj) { + logrus.Warn("Running containerd in a user namespace typically requires disable_cgroup, disable_apparmor, restrict_oom_score_adj set to be true") + } + } + + if c.config.EnableSelinux { + if !selinux.GetEnabled() { + logrus.Warn("Selinux is not supported") + } + if r := c.config.SelinuxCategoryRange; r > 0 { + selinux.CategoryRange = uint32(r) + } + } else { + selinux.SetDisabled() + } + + // Pod needs to attach to at least loopback network and a non host network, + // hence networkAttachCount is 2. If there are more network configs the + // pod will be attached to all the networks but we will only use the ip + // of the default network interface as the pod IP. + c.netPlugin, err = cni.New(cni.WithMinNetworkCount(networkAttachCount), + cni.WithPluginConfDir(c.config.NetworkPluginConfDir), + cni.WithPluginMaxConfNum(c.config.NetworkPluginMaxConfNum), + cni.WithPluginDir([]string{c.config.NetworkPluginBinDir})) + if err != nil { + return errors.Wrap(err, "failed to initialize cni") + } + + return nil +} + +// cniLoadOptions returns cni load options for the linux. +func (c *criService) cniLoadOptions() []cni.CNIOpt { + return []cni.CNIOpt{cni.WithLoNetwork, cni.WithDefaultConf} +} diff --git a/vendor/github.com/containerd/cri/pkg/server/service_windows.go b/vendor/github.com/containerd/cri/pkg/server/service_windows.go new file mode 100644 index 00000000000..5f764d4520b --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/server/service_windows.go @@ -0,0 +1,52 @@ +// +build windows + +/* + Copyright The containerd 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 server + +import ( + cni "github.com/containerd/go-cni" + "github.com/pkg/errors" +) + +// windowsNetworkAttachCount is the minimum number of networks the PodSandbox +// attaches to +const windowsNetworkAttachCount = 1 + +// initPlatform handles linux specific initialization for the CRI service. +func (c *criService) initPlatform() error { + var err error + // For windows, the loopback network is added as default. + // There is no need to explicitly add one hence networkAttachCount is 1. + // If there are more network configs the pod will be attached to all the + // networks but we will only use the ip of the default network interface + // as the pod IP. + c.netPlugin, err = cni.New(cni.WithMinNetworkCount(windowsNetworkAttachCount), + cni.WithPluginConfDir(c.config.NetworkPluginConfDir), + cni.WithPluginMaxConfNum(c.config.NetworkPluginMaxConfNum), + cni.WithPluginDir([]string{c.config.NetworkPluginBinDir})) + if err != nil { + return errors.Wrap(err, "failed to initialize cni") + } + + return nil +} + +// cniLoadOptions returns cni load options for the windows. +func (c *criService) cniLoadOptions() []cni.CNIOpt { + return []cni.CNIOpt{cni.WithDefaultConf} +} diff --git a/vendor/github.com/containerd/cri/pkg/server/snapshots.go b/vendor/github.com/containerd/cri/pkg/server/snapshots.go index 2e3b809da35..0c167075040 100644 --- a/vendor/github.com/containerd/cri/pkg/server/snapshots.go +++ b/vendor/github.com/containerd/cri/pkg/server/snapshots.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/server/status.go b/vendor/github.com/containerd/cri/pkg/server/status.go index a55f3d3a4ad..4283a5190cd 100644 --- a/vendor/github.com/containerd/cri/pkg/server/status.go +++ b/vendor/github.com/containerd/cri/pkg/server/status.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -22,7 +22,6 @@ import ( goruntime "runtime" "github.com/containerd/containerd/log" - cni "github.com/containerd/go-cni" "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ) @@ -42,11 +41,6 @@ func (c *criService) Status(ctx context.Context, r *runtime.StatusRequest) (*run Type: runtime.NetworkReady, Status: true, } - - // Load the latest cni configuration to be in sync with the latest network configuration - if err := c.netPlugin.Load(cni.WithLoNetwork, cni.WithDefaultConf); err != nil { - log.G(ctx).WithError(err).Errorf("Failed to load cni configuration") - } // Check the status of the cni initialization if err := c.netPlugin.Status(); err != nil { networkCondition.Status = false @@ -78,6 +72,12 @@ func (c *criService) Status(ctx context.Context, r *runtime.StatusRequest) (*run log.G(ctx).WithError(err).Errorf("Failed to marshal CNI config %v", err) } resp.Info["cniconfig"] = string(cniConfig) + + lastCNILoadStatus := "OK" + if lerr := c.cniNetConfMonitor.lastStatus(); lerr != nil { + lastCNILoadStatus = lerr.Error() + } + resp.Info["lastCNILoadStatus"] = lastCNILoadStatus } return resp, nil } diff --git a/vendor/github.com/containerd/cri/pkg/server/streaming.go b/vendor/github.com/containerd/cri/pkg/server/streaming.go index 4f243c8339a..d0089cc89e0 100644 --- a/vendor/github.com/containerd/cri/pkg/server/streaming.go +++ b/vendor/github.com/containerd/cri/pkg/server/streaming.go @@ -1,22 +1,23 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server import ( + "context" "crypto/tls" "io" "math" @@ -25,15 +26,14 @@ import ( "time" "github.com/pkg/errors" - "golang.org/x/net/context" k8snet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/remotecommand" k8scert "k8s.io/client-go/util/cert" - "k8s.io/kubernetes/pkg/kubelet/server/streaming" "k8s.io/utils/exec" ctrdutil "github.com/containerd/cri/pkg/containerd/util" + "github.com/containerd/cri/pkg/streaming" ) type streamListenerMode int @@ -68,7 +68,7 @@ func getStreamListenerMode(c *criService) (streamListenerMode, error) { func newStreamServer(c *criService, addr, port, streamIdleTimeout string) (streaming.Server, error) { if addr == "" { - a, err := k8snet.ChooseHostInterface() + a, err := k8snet.ResolveBindAddress(nil) if err != nil { return nil, errors.Wrap(err, "failed to get stream server address") } @@ -156,13 +156,13 @@ func (s *streamRuntime) PortForward(podSandboxID string, port int32, stream io.R if port <= 0 || port > math.MaxUint16 { return errors.Errorf("invalid port %d", port) } - return s.c.portForward(context.Background(), podSandboxID, port, stream) + ctx := ctrdutil.NamespacedContext() + return s.c.portForward(ctx, podSandboxID, port, stream) } // handleResizing spawns a goroutine that processes the resize channel, calling resizeFunc for each -// remotecommand.TerminalSize received from the channel. The resize channel must be closed elsewhere to stop the -// goroutine. -func handleResizing(resize <-chan remotecommand.TerminalSize, resizeFunc func(size remotecommand.TerminalSize)) { +// remotecommand.TerminalSize received from the channel. +func handleResizing(ctx context.Context, resize <-chan remotecommand.TerminalSize, resizeFunc func(size remotecommand.TerminalSize)) { if resize == nil { return } @@ -171,14 +171,18 @@ func handleResizing(resize <-chan remotecommand.TerminalSize, resizeFunc func(si defer runtime.HandleCrash() for { - size, ok := <-resize - if !ok { + select { + case <-ctx.Done(): return + case size, ok := <-resize: + if !ok { + return + } + if size.Height < 1 || size.Width < 1 { + continue + } + resizeFunc(size) } - if size.Height < 1 || size.Width < 1 { - continue - } - resizeFunc(size) } }() } diff --git a/vendor/github.com/containerd/cri/pkg/server/update_runtime_config.go b/vendor/github.com/containerd/cri/pkg/server/update_runtime_config.go index e359582aa95..6c725e234c3 100644 --- a/vendor/github.com/containerd/cri/pkg/server/update_runtime_config.go +++ b/vendor/github.com/containerd/cri/pkg/server/update_runtime_config.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server @@ -24,7 +24,6 @@ import ( "text/template" "github.com/containerd/containerd/log" - cni "github.com/containerd/go-cni" "github.com/pkg/errors" "golang.org/x/net/context" runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" @@ -73,7 +72,7 @@ func (c *criService) UpdateRuntimeConfig(ctx context.Context, r *runtime.UpdateR if err := c.netPlugin.Status(); err == nil { log.G(ctx).Infof("Network plugin is ready, skip generating cni config from template %q", confTemplate) return &runtime.UpdateRuntimeConfigResponse{}, nil - } else if err := c.netPlugin.Load(cni.WithLoNetwork, cni.WithDefaultConf); err == nil { + } else if err := c.netPlugin.Load(c.cniLoadOptions()...); err == nil { log.G(ctx).Infof("CNI config is successfully loaded, skip generating cni config from template %q", confTemplate) return &runtime.UpdateRuntimeConfigResponse{}, nil } diff --git a/vendor/github.com/containerd/cri/pkg/server/version.go b/vendor/github.com/containerd/cri/pkg/server/version.go index 4d74ef8410f..c1dea50c126 100644 --- a/vendor/github.com/containerd/cri/pkg/server/version.go +++ b/vendor/github.com/containerd/cri/pkg/server/version.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 server diff --git a/vendor/github.com/containerd/cri/pkg/store/container/container.go b/vendor/github.com/containerd/cri/pkg/store/container/container.go index 544678f8934..53c0745a511 100644 --- a/vendor/github.com/containerd/cri/pkg/store/container/container.go +++ b/vendor/github.com/containerd/cri/pkg/store/container/container.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 container diff --git a/vendor/github.com/containerd/cri/pkg/store/container/fake_status.go b/vendor/github.com/containerd/cri/pkg/store/container/fake_status.go index 3503bdc8bec..75658815258 100644 --- a/vendor/github.com/containerd/cri/pkg/store/container/fake_status.go +++ b/vendor/github.com/containerd/cri/pkg/store/container/fake_status.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 container diff --git a/vendor/github.com/containerd/cri/pkg/store/container/metadata.go b/vendor/github.com/containerd/cri/pkg/store/container/metadata.go index d0747e43ee8..ff9b5f2a3fe 100644 --- a/vendor/github.com/containerd/cri/pkg/store/container/metadata.go +++ b/vendor/github.com/containerd/cri/pkg/store/container/metadata.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 container diff --git a/vendor/github.com/containerd/cri/pkg/store/container/status.go b/vendor/github.com/containerd/cri/pkg/store/container/status.go index 9aaef6970f8..655f58806f6 100644 --- a/vendor/github.com/containerd/cri/pkg/store/container/status.go +++ b/vendor/github.com/containerd/cri/pkg/store/container/status.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 container diff --git a/vendor/github.com/containerd/cri/pkg/store/errors.go b/vendor/github.com/containerd/cri/pkg/store/errors.go index 37652b3e7ea..d8398e45fab 100644 --- a/vendor/github.com/containerd/cri/pkg/store/errors.go +++ b/vendor/github.com/containerd/cri/pkg/store/errors.go @@ -1,27 +1,33 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 store -import "errors" +import "github.com/containerd/containerd/errdefs" var ( // ErrAlreadyExist is the error returned when data added in the store // already exists. - ErrAlreadyExist = errors.New("already exists") + // + // This error has been DEPRECATED and will be removed in 1.5. Please switch + // usage directly to `errdefs.ErrAlreadyExists`. + ErrAlreadyExist = errdefs.ErrAlreadyExists // ErrNotExist is the error returned when data is not in the store. - ErrNotExist = errors.New("does not exist") + // + // This error has been DEPRECATED and will be removed in 1.5. Please switch + // usage directly to `errdefs.ErrNotFound`. + ErrNotExist = errdefs.ErrNotFound ) diff --git a/vendor/github.com/containerd/cri/pkg/store/image/fake_image.go b/vendor/github.com/containerd/cri/pkg/store/image/fake_image.go index 6d74d2417bc..e1d6b7cd46f 100644 --- a/vendor/github.com/containerd/cri/pkg/store/image/fake_image.go +++ b/vendor/github.com/containerd/cri/pkg/store/image/fake_image.go @@ -1,17 +1,17 @@ /* -Copyright 2018 The Containerd Authors. + Copyright The containerd 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 + 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 + 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. + 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 image diff --git a/vendor/github.com/containerd/cri/pkg/store/image/image.go b/vendor/github.com/containerd/cri/pkg/store/image/image.go index a956c13a5c2..208d490db64 100644 --- a/vendor/github.com/containerd/cri/pkg/store/image/image.go +++ b/vendor/github.com/containerd/cri/pkg/store/image/image.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 image @@ -24,8 +24,8 @@ import ( "github.com/containerd/containerd" "github.com/containerd/containerd/content" "github.com/containerd/containerd/errdefs" - "github.com/docker/distribution/digestset" imagedigest "github.com/opencontainers/go-digest" + "github.com/opencontainers/go-digest/digestset" imageidentity "github.com/opencontainers/image-spec/identity" imagespec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" diff --git a/vendor/github.com/containerd/cri/pkg/store/label/label.go b/vendor/github.com/containerd/cri/pkg/store/label/label.go index 7689cf5c187..c8c5ff924bc 100644 --- a/vendor/github.com/containerd/cri/pkg/store/label/label.go +++ b/vendor/github.com/containerd/cri/pkg/store/label/label.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 label diff --git a/vendor/github.com/containerd/cri/pkg/store/sandbox/metadata.go b/vendor/github.com/containerd/cri/pkg/store/sandbox/metadata.go index 3d15d4658d2..eb3aa8e83a6 100644 --- a/vendor/github.com/containerd/cri/pkg/store/sandbox/metadata.go +++ b/vendor/github.com/containerd/cri/pkg/store/sandbox/metadata.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 sandbox diff --git a/vendor/github.com/containerd/cri/pkg/store/sandbox/sandbox.go b/vendor/github.com/containerd/cri/pkg/store/sandbox/sandbox.go index 03a71cbc36c..223e883692e 100644 --- a/vendor/github.com/containerd/cri/pkg/store/sandbox/sandbox.go +++ b/vendor/github.com/containerd/cri/pkg/store/sandbox/sandbox.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 sandbox diff --git a/vendor/github.com/containerd/cri/pkg/store/sandbox/status.go b/vendor/github.com/containerd/cri/pkg/store/sandbox/status.go index c5480bb5dae..e9198eb976a 100644 --- a/vendor/github.com/containerd/cri/pkg/store/sandbox/status.go +++ b/vendor/github.com/containerd/cri/pkg/store/sandbox/status.go @@ -1,24 +1,27 @@ /* -Copyright 2018 The Containerd Authors. + Copyright The containerd 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 + 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 + 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. + 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 sandbox import ( + "strconv" "sync" "time" + + runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ) // The sandbox state machine in the CRI plugin: @@ -63,7 +66,7 @@ type State uint32 const ( // StateReady is ready state, it means sandbox container // is running. - StateReady = iota + StateReady State = iota // StateNotReady is notready state, it ONLY means sandbox // container is not running. // StopPodSandbox should still be called for NOTREADY sandbox to @@ -75,6 +78,21 @@ const ( StateUnknown ) +// String returns the string representation of the state +func (s State) String() string { + switch s { + case StateReady: + return runtime.PodSandboxState_SANDBOX_READY.String() + case StateNotReady: + return runtime.PodSandboxState_SANDBOX_NOTREADY.String() + case StateUnknown: + // PodSandboxState doesn't have an unknown state, but State does, so return a string using the same convention + return "SANDBOX_UNKNOWN" + default: + return "invalid sandbox state value: " + strconv.Itoa(int(s)) + } +} + // Status is the status of a sandbox. type Status struct { // Pid is the init process id of the sandbox container. diff --git a/vendor/github.com/containerd/cri/pkg/store/snapshot/snapshot.go b/vendor/github.com/containerd/cri/pkg/store/snapshot/snapshot.go index 1bd3337abf8..ce05f0e043a 100644 --- a/vendor/github.com/containerd/cri/pkg/store/snapshot/snapshot.go +++ b/vendor/github.com/containerd/cri/pkg/store/snapshot/snapshot.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 snapshot diff --git a/vendor/github.com/containerd/cri/pkg/store/util.go b/vendor/github.com/containerd/cri/pkg/store/util.go index 74401edf1d6..73626b1af87 100644 --- a/vendor/github.com/containerd/cri/pkg/store/util.go +++ b/vendor/github.com/containerd/cri/pkg/store/util.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 store diff --git a/vendor/github.com/containerd/cri/pkg/streaming/errors.go b/vendor/github.com/containerd/cri/pkg/streaming/errors.go new file mode 100644 index 00000000000..874064054d2 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/errors.go @@ -0,0 +1,72 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 streaming + +import ( + "net/http" + "strconv" + + "google.golang.org/grpc/codes" + grpcstatus "google.golang.org/grpc/status" +) + +// NewErrorStreamingDisabled creates an error for disabled streaming method. +func NewErrorStreamingDisabled(method string) error { + return grpcstatus.Errorf(codes.NotFound, "streaming method %s disabled", method) +} + +// NewErrorTooManyInFlight creates an error for exceeding the maximum number of in-flight requests. +func NewErrorTooManyInFlight() error { + return grpcstatus.Error(codes.ResourceExhausted, "maximum number of in-flight requests exceeded") +} + +// WriteError translates a CRI streaming error into an appropriate HTTP response. +func WriteError(err error, w http.ResponseWriter) error { + s, _ := grpcstatus.FromError(err) + var status int + switch s.Code() { + case codes.NotFound: + status = http.StatusNotFound + case codes.ResourceExhausted: + // We only expect to hit this if there is a DoS, so we just wait the full TTL. + // If this is ever hit in steady-state operations, consider increasing the maxInFlight requests, + // or plumbing through the time to next expiration. + w.Header().Set("Retry-After", strconv.Itoa(int(cacheTTL.Seconds()))) + status = http.StatusTooManyRequests + default: + status = http.StatusInternalServerError + } + w.WriteHeader(status) + _, writeErr := w.Write([]byte(err.Error())) + return writeErr +} diff --git a/vendor/github.com/containerd/cri/pkg/streaming/portforward/constants.go b/vendor/github.com/containerd/cri/pkg/streaming/portforward/constants.go new file mode 100644 index 00000000000..217a0b1148c --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/portforward/constants.go @@ -0,0 +1,40 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 portforward contains server-side logic for handling port forwarding requests. +package portforward + +// ProtocolV1Name is the name of the subprotocol used for port forwarding. +const ProtocolV1Name = "portforward.k8s.io" + +// SupportedProtocols are the supported port forwarding protocols. +var SupportedProtocols = []string{ProtocolV1Name} diff --git a/vendor/github.com/containerd/cri/pkg/streaming/portforward/httpstream.go b/vendor/github.com/containerd/cri/pkg/streaming/portforward/httpstream.go new file mode 100644 index 00000000000..f961cdb6fd3 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/portforward/httpstream.go @@ -0,0 +1,315 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 portforward + +import ( + "errors" + "fmt" + "net/http" + "strconv" + "sync" + "time" + + api "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/httpstream/spdy" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + + "k8s.io/klog/v2" +) + +func handleHTTPStreams(req *http.Request, w http.ResponseWriter, portForwarder PortForwarder, podName string, uid types.UID, supportedPortForwardProtocols []string, idleTimeout, streamCreationTimeout time.Duration) error { + _, err := httpstream.Handshake(req, w, supportedPortForwardProtocols) + // negotiated protocol isn't currently used server side, but could be in the future + if err != nil { + // Handshake writes the error to the client + return err + } + streamChan := make(chan httpstream.Stream, 1) + + klog.V(5).Infof("Upgrading port forward response") + upgrader := spdy.NewResponseUpgrader() + conn := upgrader.UpgradeResponse(w, req, httpStreamReceived(streamChan)) + if conn == nil { + return errors.New("unable to upgrade httpstream connection") + } + defer conn.Close() + + klog.V(5).Infof("(conn=%p) setting port forwarding streaming connection idle timeout to %v", conn, idleTimeout) + conn.SetIdleTimeout(idleTimeout) + + h := &httpStreamHandler{ + conn: conn, + streamChan: streamChan, + streamPairs: make(map[string]*httpStreamPair), + streamCreationTimeout: streamCreationTimeout, + pod: podName, + uid: uid, + forwarder: portForwarder, + } + h.run() + + return nil +} + +// httpStreamReceived is the httpstream.NewStreamHandler for port +// forward streams. It checks each stream's port and stream type headers, +// rejecting any streams that with missing or invalid values. Each valid +// stream is sent to the streams channel. +func httpStreamReceived(streams chan httpstream.Stream) func(httpstream.Stream, <-chan struct{}) error { + return func(stream httpstream.Stream, replySent <-chan struct{}) error { + // make sure it has a valid port header + portString := stream.Headers().Get(api.PortHeader) + if len(portString) == 0 { + return fmt.Errorf("%q header is required", api.PortHeader) + } + port, err := strconv.ParseUint(portString, 10, 16) + if err != nil { + return fmt.Errorf("unable to parse %q as a port: %v", portString, err) + } + if port < 1 { + return fmt.Errorf("port %q must be > 0", portString) + } + + // make sure it has a valid stream type header + streamType := stream.Headers().Get(api.StreamType) + if len(streamType) == 0 { + return fmt.Errorf("%q header is required", api.StreamType) + } + if streamType != api.StreamTypeError && streamType != api.StreamTypeData { + return fmt.Errorf("invalid stream type %q", streamType) + } + + streams <- stream + return nil + } +} + +// httpStreamHandler is capable of processing multiple port forward +// requests over a single httpstream.Connection. +type httpStreamHandler struct { + conn httpstream.Connection + streamChan chan httpstream.Stream + streamPairsLock sync.RWMutex + streamPairs map[string]*httpStreamPair + streamCreationTimeout time.Duration + pod string + uid types.UID + forwarder PortForwarder +} + +// getStreamPair returns a httpStreamPair for requestID. This creates a +// new pair if one does not yet exist for the requestID. The returned bool is +// true if the pair was created. +func (h *httpStreamHandler) getStreamPair(requestID string) (*httpStreamPair, bool) { + h.streamPairsLock.Lock() + defer h.streamPairsLock.Unlock() + + if p, ok := h.streamPairs[requestID]; ok { + klog.V(5).Infof("(conn=%p, request=%s) found existing stream pair", h.conn, requestID) + return p, false + } + + klog.V(5).Infof("(conn=%p, request=%s) creating new stream pair", h.conn, requestID) + + p := newPortForwardPair(requestID) + h.streamPairs[requestID] = p + + return p, true +} + +// monitorStreamPair waits for the pair to receive both its error and data +// streams, or for the timeout to expire (whichever happens first), and then +// removes the pair. +func (h *httpStreamHandler) monitorStreamPair(p *httpStreamPair, timeout <-chan time.Time) { + select { + case <-timeout: + err := fmt.Errorf("(conn=%v, request=%s) timed out waiting for streams", h.conn, p.requestID) + utilruntime.HandleError(err) + p.printError(err.Error()) + case <-p.complete: + klog.V(5).Infof("(conn=%v, request=%s) successfully received error and data streams", h.conn, p.requestID) + } + h.removeStreamPair(p.requestID) +} + +// removeStreamPair removes the stream pair identified by requestID from streamPairs. +func (h *httpStreamHandler) removeStreamPair(requestID string) { + h.streamPairsLock.Lock() + defer h.streamPairsLock.Unlock() + + delete(h.streamPairs, requestID) +} + +// requestID returns the request id for stream. +func (h *httpStreamHandler) requestID(stream httpstream.Stream) string { + requestID := stream.Headers().Get(api.PortForwardRequestIDHeader) + if len(requestID) == 0 { + klog.V(5).Infof("(conn=%p) stream received without %s header", h.conn, api.PortForwardRequestIDHeader) + // If we get here, it's because the connection came from an older client + // that isn't generating the request id header + // (https://github.com/kubernetes/kubernetes/blob/843134885e7e0b360eb5441e85b1410a8b1a7a0c/pkg/client/unversioned/portforward/portforward.go#L258-L287) + // + // This is a best-effort attempt at supporting older clients. + // + // When there aren't concurrent new forwarded connections, each connection + // will have a pair of streams (data, error), and the stream IDs will be + // consecutive odd numbers, e.g. 1 and 3 for the first connection. Convert + // the stream ID into a pseudo-request id by taking the stream type and + // using id = stream.Identifier() when the stream type is error, + // and id = stream.Identifier() - 2 when it's data. + // + // NOTE: this only works when there are not concurrent new streams from + // multiple forwarded connections; it's a best-effort attempt at supporting + // old clients that don't generate request ids. If there are concurrent + // new connections, it's possible that 1 connection gets streams whose IDs + // are not consecutive (e.g. 5 and 9 instead of 5 and 7). + streamType := stream.Headers().Get(api.StreamType) + switch streamType { + case api.StreamTypeError: + requestID = strconv.Itoa(int(stream.Identifier())) + case api.StreamTypeData: + requestID = strconv.Itoa(int(stream.Identifier()) - 2) + } + + klog.V(5).Infof("(conn=%p) automatically assigning request ID=%q from stream type=%s, stream ID=%d", h.conn, requestID, streamType, stream.Identifier()) + } + return requestID +} + +// run is the main loop for the httpStreamHandler. It processes new +// streams, invoking portForward for each complete stream pair. The loop exits +// when the httpstream.Connection is closed. +func (h *httpStreamHandler) run() { + klog.V(5).Infof("(conn=%p) waiting for port forward streams", h.conn) +Loop: + for { + select { + case <-h.conn.CloseChan(): + klog.V(5).Infof("(conn=%p) upgraded connection closed", h.conn) + break Loop + case stream := <-h.streamChan: + requestID := h.requestID(stream) + streamType := stream.Headers().Get(api.StreamType) + klog.V(5).Infof("(conn=%p, request=%s) received new stream of type %s", h.conn, requestID, streamType) + + p, created := h.getStreamPair(requestID) + if created { + go h.monitorStreamPair(p, time.After(h.streamCreationTimeout)) + } + if complete, err := p.add(stream); err != nil { + msg := fmt.Sprintf("error processing stream for request %s: %v", requestID, err) + utilruntime.HandleError(errors.New(msg)) + p.printError(msg) + } else if complete { + go h.portForward(p) + } + } + } +} + +// portForward invokes the httpStreamHandler's forwarder.PortForward +// function for the given stream pair. +func (h *httpStreamHandler) portForward(p *httpStreamPair) { + defer p.dataStream.Close() + defer p.errorStream.Close() + + portString := p.dataStream.Headers().Get(api.PortHeader) + port, _ := strconv.ParseInt(portString, 10, 32) + + klog.V(5).Infof("(conn=%p, request=%s) invoking forwarder.PortForward for port %s", h.conn, p.requestID, portString) + err := h.forwarder.PortForward(h.pod, h.uid, int32(port), p.dataStream) + klog.V(5).Infof("(conn=%p, request=%s) done invoking forwarder.PortForward for port %s", h.conn, p.requestID, portString) + + if err != nil { + msg := fmt.Errorf("error forwarding port %d to pod %s, uid %v: %v", port, h.pod, h.uid, err) + utilruntime.HandleError(msg) + fmt.Fprint(p.errorStream, msg.Error()) + } +} + +// httpStreamPair represents the error and data streams for a port +// forwarding request. +type httpStreamPair struct { + lock sync.RWMutex + requestID string + dataStream httpstream.Stream + errorStream httpstream.Stream + complete chan struct{} +} + +// newPortForwardPair creates a new httpStreamPair. +func newPortForwardPair(requestID string) *httpStreamPair { + return &httpStreamPair{ + requestID: requestID, + complete: make(chan struct{}), + } +} + +// add adds the stream to the httpStreamPair. If the pair already +// contains a stream for the new stream's type, an error is returned. add +// returns true if both the data and error streams for this pair have been +// received. +func (p *httpStreamPair) add(stream httpstream.Stream) (bool, error) { + p.lock.Lock() + defer p.lock.Unlock() + + switch stream.Headers().Get(api.StreamType) { + case api.StreamTypeError: + if p.errorStream != nil { + return false, errors.New("error stream already assigned") + } + p.errorStream = stream + case api.StreamTypeData: + if p.dataStream != nil { + return false, errors.New("data stream already assigned") + } + p.dataStream = stream + } + + complete := p.errorStream != nil && p.dataStream != nil + if complete { + close(p.complete) + } + return complete, nil +} + +// printError writes s to p.errorStream if p.errorStream has been set. +func (p *httpStreamPair) printError(s string) { + p.lock.RLock() + defer p.lock.RUnlock() + if p.errorStream != nil { + fmt.Fprint(p.errorStream, s) + } +} diff --git a/vendor/github.com/containerd/cri/pkg/streaming/portforward/portforward.go b/vendor/github.com/containerd/cri/pkg/streaming/portforward/portforward.go new file mode 100644 index 00000000000..89a39ea66d7 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/portforward/portforward.go @@ -0,0 +1,69 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 portforward + +import ( + "io" + "net/http" + "time" + + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apiserver/pkg/util/wsstream" +) + +// PortForwarder knows how to forward content from a data stream to/from a port +// in a pod. +type PortForwarder interface { + // PortForwarder copies data between a data stream and a port in a pod. + PortForward(name string, uid types.UID, port int32, stream io.ReadWriteCloser) error +} + +// ServePortForward handles a port forwarding request. A single request is +// kept alive as long as the client is still alive and the connection has not +// been timed out due to idleness. This function handles multiple forwarded +// connections; i.e., multiple `curl http://localhost:8888/` requests will be +// handled by a single invocation of ServePortForward. +func ServePortForward(w http.ResponseWriter, req *http.Request, portForwarder PortForwarder, podName string, uid types.UID, portForwardOptions *V4Options, idleTimeout time.Duration, streamCreationTimeout time.Duration, supportedProtocols []string) { + var err error + if wsstream.IsWebSocketRequest(req) { + err = handleWebSocketStreams(req, w, portForwarder, podName, uid, portForwardOptions, supportedProtocols, idleTimeout, streamCreationTimeout) + } else { + err = handleHTTPStreams(req, w, portForwarder, podName, uid, supportedProtocols, idleTimeout, streamCreationTimeout) + } + + if err != nil { + runtime.HandleError(err) + return + } +} diff --git a/vendor/github.com/containerd/cri/pkg/streaming/portforward/websocket.go b/vendor/github.com/containerd/cri/pkg/streaming/portforward/websocket.go new file mode 100644 index 00000000000..1b1c0151aef --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/portforward/websocket.go @@ -0,0 +1,213 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 portforward + +import ( + "encoding/binary" + "fmt" + "io" + "net/http" + "strconv" + "strings" + "sync" + "time" + + "k8s.io/klog/v2" + + api "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apiserver/pkg/server/httplog" + "k8s.io/apiserver/pkg/util/wsstream" +) + +const ( + dataChannel = iota + errorChannel + + v4BinaryWebsocketProtocol = "v4." + wsstream.ChannelWebSocketProtocol + v4Base64WebsocketProtocol = "v4." + wsstream.Base64ChannelWebSocketProtocol +) + +// V4Options contains details about which streams are required for port +// forwarding. +// All fields included in V4Options need to be expressed explicitly in the +// CRI (k8s.io/cri-api/pkg/apis/{version}/api.proto) PortForwardRequest. +type V4Options struct { + Ports []int32 +} + +// NewV4Options creates a new options from the Request. +func NewV4Options(req *http.Request) (*V4Options, error) { + if !wsstream.IsWebSocketRequest(req) { + return &V4Options{}, nil + } + + portStrings := req.URL.Query()[api.PortHeader] + if len(portStrings) == 0 { + return nil, fmt.Errorf("query parameter %q is required", api.PortHeader) + } + + ports := make([]int32, 0, len(portStrings)) + for _, portString := range portStrings { + if len(portString) == 0 { + return nil, fmt.Errorf("query parameter %q cannot be empty", api.PortHeader) + } + for _, p := range strings.Split(portString, ",") { + port, err := strconv.ParseUint(p, 10, 16) + if err != nil { + return nil, fmt.Errorf("unable to parse %q as a port: %v", portString, err) + } + if port < 1 { + return nil, fmt.Errorf("port %q must be > 0", portString) + } + ports = append(ports, int32(port)) + } + } + + return &V4Options{ + Ports: ports, + }, nil +} + +// BuildV4Options returns a V4Options based on the given information. +func BuildV4Options(ports []int32) (*V4Options, error) { + return &V4Options{Ports: ports}, nil +} + +// handleWebSocketStreams handles requests to forward ports to a pod via +// a PortForwarder. A pair of streams are created per port (DATA n, +// ERROR n+1). The associated port is written to each stream as a unsigned 16 +// bit integer in little endian format. +func handleWebSocketStreams(req *http.Request, w http.ResponseWriter, portForwarder PortForwarder, podName string, uid types.UID, opts *V4Options, supportedPortForwardProtocols []string, idleTimeout, streamCreationTimeout time.Duration) error { + channels := make([]wsstream.ChannelType, 0, len(opts.Ports)*2) + for i := 0; i < len(opts.Ports); i++ { + channels = append(channels, wsstream.ReadWriteChannel, wsstream.WriteChannel) + } + conn := wsstream.NewConn(map[string]wsstream.ChannelProtocolConfig{ + "": { + Binary: true, + Channels: channels, + }, + v4BinaryWebsocketProtocol: { + Binary: true, + Channels: channels, + }, + v4Base64WebsocketProtocol: { + Binary: false, + Channels: channels, + }, + }) + conn.SetIdleTimeout(idleTimeout) + _, streams, err := conn.Open(httplog.Unlogged(req, w), req) + if err != nil { + err = fmt.Errorf("unable to upgrade websocket connection: %v", err) + return err + } + defer conn.Close() + streamPairs := make([]*websocketStreamPair, len(opts.Ports)) + for i := range streamPairs { + streamPair := websocketStreamPair{ + port: opts.Ports[i], + dataStream: streams[i*2+dataChannel], + errorStream: streams[i*2+errorChannel], + } + streamPairs[i] = &streamPair + + portBytes := make([]byte, 2) + // port is always positive so conversion is allowable + binary.LittleEndian.PutUint16(portBytes, uint16(streamPair.port)) + streamPair.dataStream.Write(portBytes) + streamPair.errorStream.Write(portBytes) + } + h := &websocketStreamHandler{ + conn: conn, + streamPairs: streamPairs, + pod: podName, + uid: uid, + forwarder: portForwarder, + } + h.run() + + return nil +} + +// websocketStreamPair represents the error and data streams for a port +// forwarding request. +type websocketStreamPair struct { + port int32 + dataStream io.ReadWriteCloser + errorStream io.WriteCloser +} + +// websocketStreamHandler is capable of processing a single port forward +// request over a websocket connection +type websocketStreamHandler struct { + conn *wsstream.Conn + streamPairs []*websocketStreamPair + pod string + uid types.UID + forwarder PortForwarder +} + +// run invokes the websocketStreamHandler's forwarder.PortForward +// function for the given stream pair. +func (h *websocketStreamHandler) run() { + wg := sync.WaitGroup{} + wg.Add(len(h.streamPairs)) + + for _, pair := range h.streamPairs { + p := pair + go func() { + defer wg.Done() + h.portForward(p) + }() + } + + wg.Wait() +} + +func (h *websocketStreamHandler) portForward(p *websocketStreamPair) { + defer p.dataStream.Close() + defer p.errorStream.Close() + + klog.V(5).Infof("(conn=%p) invoking forwarder.PortForward for port %d", h.conn, p.port) + err := h.forwarder.PortForward(h.pod, h.uid, p.port, p.dataStream) + klog.V(5).Infof("(conn=%p) done invoking forwarder.PortForward for port %d", h.conn, p.port) + + if err != nil { + msg := fmt.Errorf("error forwarding port %d to pod %s, uid %v: %v", p.port, h.pod, h.uid, err) + runtime.HandleError(msg) + fmt.Fprint(p.errorStream, msg.Error()) + } +} diff --git a/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/attach.go b/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/attach.go new file mode 100644 index 00000000000..2b127bdf9dd --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/attach.go @@ -0,0 +1,75 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 remotecommand + +import ( + "fmt" + "io" + "net/http" + "time" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/tools/remotecommand" +) + +// Attacher knows how to attach to a running container in a pod. +type Attacher interface { + // AttachContainer attaches to the running container in the pod, copying data between in/out/err + // and the container's stdin/stdout/stderr. + AttachContainer(name string, uid types.UID, container string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error +} + +// ServeAttach handles requests to attach to a container. After creating/receiving the required +// streams, it delegates the actual attaching to attacher. +func ServeAttach(w http.ResponseWriter, req *http.Request, attacher Attacher, podName string, uid types.UID, container string, streamOpts *Options, idleTimeout, streamCreationTimeout time.Duration, supportedProtocols []string) { + ctx, ok := createStreams(req, w, streamOpts, supportedProtocols, idleTimeout, streamCreationTimeout) + if !ok { + // error is handled by createStreams + return + } + defer ctx.conn.Close() + + err := attacher.AttachContainer(podName, uid, container, ctx.stdinStream, ctx.stdoutStream, ctx.stderrStream, ctx.tty, ctx.resizeChan) + if err != nil { + err = fmt.Errorf("error attaching to container: %v", err) + runtime.HandleError(err) + ctx.writeStatus(apierrors.NewInternalError(err)) + } else { + ctx.writeStatus(&apierrors.StatusError{ErrStatus: metav1.Status{ + Status: metav1.StatusSuccess, + }}) + } +} diff --git a/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/doc.go b/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/doc.go new file mode 100644 index 00000000000..6034cdc8e0a --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/doc.go @@ -0,0 +1,34 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 remotecommand contains functions related to executing commands in and attaching to pods. +package remotecommand diff --git a/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/exec.go b/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/exec.go new file mode 100644 index 00000000000..5111521bae2 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/exec.go @@ -0,0 +1,95 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 remotecommand + +import ( + "fmt" + "io" + "net/http" + "time" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + remotecommandconsts "k8s.io/apimachinery/pkg/util/remotecommand" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/tools/remotecommand" + utilexec "k8s.io/utils/exec" +) + +// Executor knows how to execute a command in a container in a pod. +type Executor interface { + // ExecInContainer executes a command in a container in the pod, copying data + // between in/out/err and the container's stdin/stdout/stderr. + ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error +} + +// ServeExec handles requests to execute a command in a container. After +// creating/receiving the required streams, it delegates the actual execution +// to the executor. +func ServeExec(w http.ResponseWriter, req *http.Request, executor Executor, podName string, uid types.UID, container string, cmd []string, streamOpts *Options, idleTimeout, streamCreationTimeout time.Duration, supportedProtocols []string) { + ctx, ok := createStreams(req, w, streamOpts, supportedProtocols, idleTimeout, streamCreationTimeout) + if !ok { + // error is handled by createStreams + return + } + defer ctx.conn.Close() + + err := executor.ExecInContainer(podName, uid, container, cmd, ctx.stdinStream, ctx.stdoutStream, ctx.stderrStream, ctx.tty, ctx.resizeChan, 0) + if err != nil { + if exitErr, ok := err.(utilexec.ExitError); ok && exitErr.Exited() { + rc := exitErr.ExitStatus() + ctx.writeStatus(&apierrors.StatusError{ErrStatus: metav1.Status{ + Status: metav1.StatusFailure, + Reason: remotecommandconsts.NonZeroExitCodeReason, + Details: &metav1.StatusDetails{ + Causes: []metav1.StatusCause{ + { + Type: remotecommandconsts.ExitCodeCauseType, + Message: fmt.Sprintf("%d", rc), + }, + }, + }, + Message: fmt.Sprintf("command terminated with non-zero exit code: %v", exitErr), + }}) + } else { + err = fmt.Errorf("error executing command in container: %v", err) + runtime.HandleError(err) + ctx.writeStatus(apierrors.NewInternalError(err)) + } + } else { + ctx.writeStatus(&apierrors.StatusError{ErrStatus: metav1.Status{ + Status: metav1.StatusSuccess, + }}) + } +} diff --git a/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/httpstream.go b/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/httpstream.go new file mode 100644 index 00000000000..0417a1a9e66 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/httpstream.go @@ -0,0 +1,463 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 remotecommand + +import ( + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "time" + + api "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/httpstream/spdy" + remotecommandconsts "k8s.io/apimachinery/pkg/util/remotecommand" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apiserver/pkg/util/wsstream" + "k8s.io/client-go/tools/remotecommand" + + "k8s.io/klog/v2" +) + +// Options contains details about which streams are required for +// remote command execution. +type Options struct { + Stdin bool + Stdout bool + Stderr bool + TTY bool +} + +// NewOptions creates a new Options from the Request. +func NewOptions(req *http.Request) (*Options, error) { + tty := req.FormValue(api.ExecTTYParam) == "1" + stdin := req.FormValue(api.ExecStdinParam) == "1" + stdout := req.FormValue(api.ExecStdoutParam) == "1" + stderr := req.FormValue(api.ExecStderrParam) == "1" + if tty && stderr { + // TODO: make this an error before we reach this method + klog.V(4).Infof("Access to exec with tty and stderr is not supported, bypassing stderr") + stderr = false + } + + if !stdin && !stdout && !stderr { + return nil, fmt.Errorf("you must specify at least 1 of stdin, stdout, stderr") + } + + return &Options{ + Stdin: stdin, + Stdout: stdout, + Stderr: stderr, + TTY: tty, + }, nil +} + +// context contains the connection and streams used when +// forwarding an attach or execute session into a container. +type context struct { + conn io.Closer + stdinStream io.ReadCloser + stdoutStream io.WriteCloser + stderrStream io.WriteCloser + writeStatus func(status *apierrors.StatusError) error + resizeStream io.ReadCloser + resizeChan chan remotecommand.TerminalSize + tty bool +} + +// streamAndReply holds both a Stream and a channel that is closed when the stream's reply frame is +// enqueued. Consumers can wait for replySent to be closed prior to proceeding, to ensure that the +// replyFrame is enqueued before the connection's goaway frame is sent (e.g. if a stream was +// received and right after, the connection gets closed). +type streamAndReply struct { + httpstream.Stream + replySent <-chan struct{} +} + +// waitStreamReply waits until either replySent or stop is closed. If replySent is closed, it sends +// an empty struct to the notify channel. +func waitStreamReply(replySent <-chan struct{}, notify chan<- struct{}, stop <-chan struct{}) { + select { + case <-replySent: + notify <- struct{}{} + case <-stop: + } +} + +func createStreams(req *http.Request, w http.ResponseWriter, opts *Options, supportedStreamProtocols []string, idleTimeout, streamCreationTimeout time.Duration) (*context, bool) { + var ctx *context + var ok bool + if wsstream.IsWebSocketRequest(req) { + ctx, ok = createWebSocketStreams(req, w, opts, idleTimeout) + } else { + ctx, ok = createHTTPStreamStreams(req, w, opts, supportedStreamProtocols, idleTimeout, streamCreationTimeout) + } + if !ok { + return nil, false + } + + if ctx.resizeStream != nil { + ctx.resizeChan = make(chan remotecommand.TerminalSize) + go handleResizeEvents(ctx.resizeStream, ctx.resizeChan) + } + + return ctx, true +} + +func createHTTPStreamStreams(req *http.Request, w http.ResponseWriter, opts *Options, supportedStreamProtocols []string, idleTimeout, streamCreationTimeout time.Duration) (*context, bool) { + protocol, err := httpstream.Handshake(req, w, supportedStreamProtocols) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return nil, false + } + + streamCh := make(chan streamAndReply) + + upgrader := spdy.NewResponseUpgrader() + conn := upgrader.UpgradeResponse(w, req, func(stream httpstream.Stream, replySent <-chan struct{}) error { + streamCh <- streamAndReply{Stream: stream, replySent: replySent} + return nil + }) + // from this point on, we can no longer call methods on response + if conn == nil { + // The upgrader is responsible for notifying the client of any errors that + // occurred during upgrading. All we can do is return here at this point + // if we weren't successful in upgrading. + return nil, false + } + + conn.SetIdleTimeout(idleTimeout) + + var handler protocolHandler + switch protocol { + case remotecommandconsts.StreamProtocolV4Name: + handler = &v4ProtocolHandler{} + case remotecommandconsts.StreamProtocolV3Name: + handler = &v3ProtocolHandler{} + case remotecommandconsts.StreamProtocolV2Name: + handler = &v2ProtocolHandler{} + case "": + klog.V(4).Infof("Client did not request protocol negotiation. Falling back to %q", remotecommandconsts.StreamProtocolV1Name) + fallthrough + case remotecommandconsts.StreamProtocolV1Name: + handler = &v1ProtocolHandler{} + } + + // count the streams client asked for, starting with 1 + expectedStreams := 1 + if opts.Stdin { + expectedStreams++ + } + if opts.Stdout { + expectedStreams++ + } + if opts.Stderr { + expectedStreams++ + } + if opts.TTY && handler.supportsTerminalResizing() { + expectedStreams++ + } + + expired := time.NewTimer(streamCreationTimeout) + defer expired.Stop() + + ctx, err := handler.waitForStreams(streamCh, expectedStreams, expired.C) + if err != nil { + runtime.HandleError(err) + return nil, false + } + + ctx.conn = conn + ctx.tty = opts.TTY + + return ctx, true +} + +type protocolHandler interface { + // waitForStreams waits for the expected streams or a timeout, returning a + // remoteCommandContext if all the streams were received, or an error if not. + waitForStreams(streams <-chan streamAndReply, expectedStreams int, expired <-chan time.Time) (*context, error) + // supportsTerminalResizing returns true if the protocol handler supports terminal resizing + supportsTerminalResizing() bool +} + +// v4ProtocolHandler implements the V4 protocol version for streaming command execution. It only differs +// in from v3 in the error stream format using an json-marshaled metav1.Status which carries +// the process' exit code. +type v4ProtocolHandler struct{} + +func (*v4ProtocolHandler) waitForStreams(streams <-chan streamAndReply, expectedStreams int, expired <-chan time.Time) (*context, error) { + ctx := &context{} + receivedStreams := 0 + replyChan := make(chan struct{}) + stop := make(chan struct{}) + defer close(stop) +WaitForStreams: + for { + select { + case stream := <-streams: + streamType := stream.Headers().Get(api.StreamType) + switch streamType { + case api.StreamTypeError: + ctx.writeStatus = v4WriteStatusFunc(stream) // write json errors + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStdin: + ctx.stdinStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStdout: + ctx.stdoutStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStderr: + ctx.stderrStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeResize: + ctx.resizeStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + default: + runtime.HandleError(fmt.Errorf("unexpected stream type: %q", streamType)) + } + case <-replyChan: + receivedStreams++ + if receivedStreams == expectedStreams { + break WaitForStreams + } + case <-expired: + // TODO find a way to return the error to the user. Maybe use a separate + // stream to report errors? + return nil, errors.New("timed out waiting for client to create streams") + } + } + + return ctx, nil +} + +// supportsTerminalResizing returns true because v4ProtocolHandler supports it +func (*v4ProtocolHandler) supportsTerminalResizing() bool { return true } + +// v3ProtocolHandler implements the V3 protocol version for streaming command execution. +type v3ProtocolHandler struct{} + +func (*v3ProtocolHandler) waitForStreams(streams <-chan streamAndReply, expectedStreams int, expired <-chan time.Time) (*context, error) { + ctx := &context{} + receivedStreams := 0 + replyChan := make(chan struct{}) + stop := make(chan struct{}) + defer close(stop) +WaitForStreams: + for { + select { + case stream := <-streams: + streamType := stream.Headers().Get(api.StreamType) + switch streamType { + case api.StreamTypeError: + ctx.writeStatus = v1WriteStatusFunc(stream) + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStdin: + ctx.stdinStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStdout: + ctx.stdoutStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStderr: + ctx.stderrStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeResize: + ctx.resizeStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + default: + runtime.HandleError(fmt.Errorf("unexpected stream type: %q", streamType)) + } + case <-replyChan: + receivedStreams++ + if receivedStreams == expectedStreams { + break WaitForStreams + } + case <-expired: + // TODO find a way to return the error to the user. Maybe use a separate + // stream to report errors? + return nil, errors.New("timed out waiting for client to create streams") + } + } + + return ctx, nil +} + +// supportsTerminalResizing returns true because v3ProtocolHandler supports it +func (*v3ProtocolHandler) supportsTerminalResizing() bool { return true } + +// v2ProtocolHandler implements the V2 protocol version for streaming command execution. +type v2ProtocolHandler struct{} + +func (*v2ProtocolHandler) waitForStreams(streams <-chan streamAndReply, expectedStreams int, expired <-chan time.Time) (*context, error) { + ctx := &context{} + receivedStreams := 0 + replyChan := make(chan struct{}) + stop := make(chan struct{}) + defer close(stop) +WaitForStreams: + for { + select { + case stream := <-streams: + streamType := stream.Headers().Get(api.StreamType) + switch streamType { + case api.StreamTypeError: + ctx.writeStatus = v1WriteStatusFunc(stream) + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStdin: + ctx.stdinStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStdout: + ctx.stdoutStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStderr: + ctx.stderrStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + default: + runtime.HandleError(fmt.Errorf("unexpected stream type: %q", streamType)) + } + case <-replyChan: + receivedStreams++ + if receivedStreams == expectedStreams { + break WaitForStreams + } + case <-expired: + // TODO find a way to return the error to the user. Maybe use a separate + // stream to report errors? + return nil, errors.New("timed out waiting for client to create streams") + } + } + + return ctx, nil +} + +// supportsTerminalResizing returns false because v2ProtocolHandler doesn't support it. +func (*v2ProtocolHandler) supportsTerminalResizing() bool { return false } + +// v1ProtocolHandler implements the V1 protocol version for streaming command execution. +type v1ProtocolHandler struct{} + +func (*v1ProtocolHandler) waitForStreams(streams <-chan streamAndReply, expectedStreams int, expired <-chan time.Time) (*context, error) { + ctx := &context{} + receivedStreams := 0 + replyChan := make(chan struct{}) + stop := make(chan struct{}) + defer close(stop) +WaitForStreams: + for { + select { + case stream := <-streams: + streamType := stream.Headers().Get(api.StreamType) + switch streamType { + case api.StreamTypeError: + ctx.writeStatus = v1WriteStatusFunc(stream) + + // This defer statement shouldn't be here, but due to previous refactoring, it ended up in + // here. This is what 1.0.x kubelets do, so we're retaining that behavior. This is fixed in + // the v2ProtocolHandler. + defer stream.Reset() + + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStdin: + ctx.stdinStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStdout: + ctx.stdoutStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + case api.StreamTypeStderr: + ctx.stderrStream = stream + go waitStreamReply(stream.replySent, replyChan, stop) + default: + runtime.HandleError(fmt.Errorf("unexpected stream type: %q", streamType)) + } + case <-replyChan: + receivedStreams++ + if receivedStreams == expectedStreams { + break WaitForStreams + } + case <-expired: + // TODO find a way to return the error to the user. Maybe use a separate + // stream to report errors? + return nil, errors.New("timed out waiting for client to create streams") + } + } + + if ctx.stdinStream != nil { + ctx.stdinStream.Close() + } + + return ctx, nil +} + +// supportsTerminalResizing returns false because v1ProtocolHandler doesn't support it. +func (*v1ProtocolHandler) supportsTerminalResizing() bool { return false } + +func handleResizeEvents(stream io.Reader, channel chan<- remotecommand.TerminalSize) { + defer runtime.HandleCrash() + defer close(channel) + + decoder := json.NewDecoder(stream) + for { + size := remotecommand.TerminalSize{} + if err := decoder.Decode(&size); err != nil { + break + } + channel <- size + } +} + +func v1WriteStatusFunc(stream io.Writer) func(status *apierrors.StatusError) error { + return func(status *apierrors.StatusError) error { + if status.Status().Status == metav1.StatusSuccess { + return nil // send error messages + } + _, err := stream.Write([]byte(status.Error())) + return err + } +} + +// v4WriteStatusFunc returns a WriteStatusFunc that marshals a given api Status +// as json in the error channel. +func v4WriteStatusFunc(stream io.Writer) func(status *apierrors.StatusError) error { + return func(status *apierrors.StatusError) error { + bs, err := json.Marshal(status.Status()) + if err != nil { + return err + } + _, err = stream.Write(bs) + return err + } +} diff --git a/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/websocket.go b/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/websocket.go new file mode 100644 index 00000000000..99c0af7c3b9 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/remotecommand/websocket.go @@ -0,0 +1,148 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 remotecommand + +import ( + "fmt" + "net/http" + "time" + + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apiserver/pkg/server/httplog" + "k8s.io/apiserver/pkg/util/wsstream" +) + +const ( + stdinChannel = iota + stdoutChannel + stderrChannel + errorChannel + resizeChannel + + preV4BinaryWebsocketProtocol = wsstream.ChannelWebSocketProtocol + preV4Base64WebsocketProtocol = wsstream.Base64ChannelWebSocketProtocol + v4BinaryWebsocketProtocol = "v4." + wsstream.ChannelWebSocketProtocol + v4Base64WebsocketProtocol = "v4." + wsstream.Base64ChannelWebSocketProtocol +) + +// createChannels returns the standard channel types for a shell connection (STDIN 0, STDOUT 1, STDERR 2) +// along with the approximate duplex value. It also creates the error (3) and resize (4) channels. +func createChannels(opts *Options) []wsstream.ChannelType { + // open the requested channels, and always open the error channel + channels := make([]wsstream.ChannelType, 5) + channels[stdinChannel] = readChannel(opts.Stdin) + channels[stdoutChannel] = writeChannel(opts.Stdout) + channels[stderrChannel] = writeChannel(opts.Stderr) + channels[errorChannel] = wsstream.WriteChannel + channels[resizeChannel] = wsstream.ReadChannel + return channels +} + +// readChannel returns wsstream.ReadChannel if real is true, or wsstream.IgnoreChannel. +func readChannel(real bool) wsstream.ChannelType { + if real { + return wsstream.ReadChannel + } + return wsstream.IgnoreChannel +} + +// writeChannel returns wsstream.WriteChannel if real is true, or wsstream.IgnoreChannel. +func writeChannel(real bool) wsstream.ChannelType { + if real { + return wsstream.WriteChannel + } + return wsstream.IgnoreChannel +} + +// createWebSocketStreams returns a context containing the websocket connection and +// streams needed to perform an exec or an attach. +func createWebSocketStreams(req *http.Request, w http.ResponseWriter, opts *Options, idleTimeout time.Duration) (*context, bool) { + channels := createChannels(opts) + conn := wsstream.NewConn(map[string]wsstream.ChannelProtocolConfig{ + "": { + Binary: true, + Channels: channels, + }, + preV4BinaryWebsocketProtocol: { + Binary: true, + Channels: channels, + }, + preV4Base64WebsocketProtocol: { + Binary: false, + Channels: channels, + }, + v4BinaryWebsocketProtocol: { + Binary: true, + Channels: channels, + }, + v4Base64WebsocketProtocol: { + Binary: false, + Channels: channels, + }, + }) + conn.SetIdleTimeout(idleTimeout) + negotiatedProtocol, streams, err := conn.Open(httplog.Unlogged(req, w), req) + if err != nil { + runtime.HandleError(fmt.Errorf("unable to upgrade websocket connection: %v", err)) + return nil, false + } + + // Send an empty message to the lowest writable channel to notify the client the connection is established + // TODO: make generic to SPDY and WebSockets and do it outside of this method? + switch { + case opts.Stdout: + streams[stdoutChannel].Write([]byte{}) + case opts.Stderr: + streams[stderrChannel].Write([]byte{}) + default: + streams[errorChannel].Write([]byte{}) + } + + ctx := &context{ + conn: conn, + stdinStream: streams[stdinChannel], + stdoutStream: streams[stdoutChannel], + stderrStream: streams[stderrChannel], + tty: opts.TTY, + resizeStream: streams[resizeChannel], + } + + switch negotiatedProtocol { + case v4BinaryWebsocketProtocol, v4Base64WebsocketProtocol: + ctx.writeStatus = v4WriteStatusFunc(streams[errorChannel]) + default: + ctx.writeStatus = v1WriteStatusFunc(streams[errorChannel]) + } + + return ctx, true +} diff --git a/vendor/github.com/containerd/cri/pkg/streaming/request_cache.go b/vendor/github.com/containerd/cri/pkg/streaming/request_cache.go new file mode 100644 index 00000000000..36d6921f667 --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/request_cache.go @@ -0,0 +1,162 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 streaming + +import ( + "container/list" + "crypto/rand" + "encoding/base64" + "fmt" + "math" + "sync" + "time" + + "k8s.io/apimachinery/pkg/util/clock" +) + +var ( + // cacheTTL is the timeout after which tokens become invalid. + cacheTTL = 1 * time.Minute + // maxInFlight is the maximum number of in-flight requests to allow. + maxInFlight = 1000 + // tokenLen is the length of the random base64 encoded token identifying the request. + tokenLen = 8 +) + +// requestCache caches streaming (exec/attach/port-forward) requests and generates a single-use +// random token for their retrieval. The requestCache is used for building streaming URLs without +// the need to encode every request parameter in the URL. +type requestCache struct { + // clock is used to obtain the current time + clock clock.Clock + + // tokens maps the generate token to the request for fast retrieval. + tokens map[string]*list.Element + // ll maintains an age-ordered request list for faster garbage collection of expired requests. + ll *list.List + + lock sync.Mutex +} + +// Type representing an *ExecRequest, *AttachRequest, or *PortForwardRequest. +type request interface{} + +type cacheEntry struct { + token string + req request + expireTime time.Time +} + +func newRequestCache() *requestCache { + return &requestCache{ + clock: clock.RealClock{}, + ll: list.New(), + tokens: make(map[string]*list.Element), + } +} + +// Insert the given request into the cache and returns the token used for fetching it out. +func (c *requestCache) Insert(req request) (token string, err error) { + c.lock.Lock() + defer c.lock.Unlock() + + // Remove expired entries. + c.gc() + // If the cache is full, reject the request. + if c.ll.Len() == maxInFlight { + return "", NewErrorTooManyInFlight() + } + token, err = c.uniqueToken() + if err != nil { + return "", err + } + ele := c.ll.PushFront(&cacheEntry{token, req, c.clock.Now().Add(cacheTTL)}) + + c.tokens[token] = ele + return token, nil +} + +// Consume the token (remove it from the cache) and return the cached request, if found. +func (c *requestCache) Consume(token string) (req request, found bool) { + c.lock.Lock() + defer c.lock.Unlock() + ele, ok := c.tokens[token] + if !ok { + return nil, false + } + c.ll.Remove(ele) + delete(c.tokens, token) + + entry := ele.Value.(*cacheEntry) + if c.clock.Now().After(entry.expireTime) { + // Entry already expired. + return nil, false + } + return entry.req, true +} + +// uniqueToken generates a random URL-safe token and ensures uniqueness. +func (c *requestCache) uniqueToken() (string, error) { + const maxTries = 10 + // Number of bytes to be tokenLen when base64 encoded. + tokenSize := math.Ceil(float64(tokenLen) * 6 / 8) + rawToken := make([]byte, int(tokenSize)) + for i := 0; i < maxTries; i++ { + if _, err := rand.Read(rawToken); err != nil { + return "", err + } + encoded := base64.RawURLEncoding.EncodeToString(rawToken) + token := encoded[:tokenLen] + // If it's unique, return it. Otherwise retry. + if _, exists := c.tokens[encoded]; !exists { + return token, nil + } + } + return "", fmt.Errorf("failed to generate unique token") +} + +// Must be write-locked prior to calling. +func (c *requestCache) gc() { + now := c.clock.Now() + for c.ll.Len() > 0 { + oldest := c.ll.Back() + entry := oldest.Value.(*cacheEntry) + if !now.After(entry.expireTime) { + return + } + + // Oldest value is expired; remove it. + c.ll.Remove(oldest) + delete(c.tokens, entry.token) + } +} diff --git a/vendor/github.com/containerd/cri/pkg/streaming/server.go b/vendor/github.com/containerd/cri/pkg/streaming/server.go new file mode 100644 index 00000000000..589c9a8ca8d --- /dev/null +++ b/vendor/github.com/containerd/cri/pkg/streaming/server.go @@ -0,0 +1,399 @@ +/* + Copyright The containerd 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. +*/ + +/* +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 streaming + +import ( + "crypto/tls" + "errors" + "io" + "net" + "net/http" + "net/url" + "path" + "time" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + restful "github.com/emicklei/go-restful" + + "k8s.io/apimachinery/pkg/types" + remotecommandconsts "k8s.io/apimachinery/pkg/util/remotecommand" + "k8s.io/client-go/tools/remotecommand" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + "github.com/containerd/cri/pkg/streaming/portforward" + remotecommandserver "github.com/containerd/cri/pkg/streaming/remotecommand" +) + +// Server is the library interface to serve the stream requests. +type Server interface { + http.Handler + + // Get the serving URL for the requests. + // Requests must not be nil. Responses may be nil iff an error is returned. + GetExec(*runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error) + GetAttach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error) + GetPortForward(*runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error) + + // Start the server. + // addr is the address to serve on (address:port) stayUp indicates whether the server should + // listen until Stop() is called, or automatically stop after all expected connections are + // closed. Calling Get{Exec,Attach,PortForward} increments the expected connection count. + // Function does not return until the server is stopped. + Start(stayUp bool) error + // Stop the server, and terminate any open connections. + Stop() error +} + +// Runtime is the interface to execute the commands and provide the streams. +type Runtime interface { + Exec(containerID string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error + Attach(containerID string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error + PortForward(podSandboxID string, port int32, stream io.ReadWriteCloser) error +} + +// Config defines the options used for running the stream server. +type Config struct { + // The host:port address the server will listen on. + Addr string + // The optional base URL for constructing streaming URLs. If empty, the baseURL will be + // constructed from the serve address. + // Note that for port "0", the URL port will be set to actual port in use. + BaseURL *url.URL + + // How long to leave idle connections open for. + StreamIdleTimeout time.Duration + // How long to wait for clients to create streams. Only used for SPDY streaming. + StreamCreationTimeout time.Duration + + // The streaming protocols the server supports (understands and permits). See + // k8s.io/kubernetes/pkg/kubelet/server/remotecommand/constants.go for available protocols. + // Only used for SPDY streaming. + SupportedRemoteCommandProtocols []string + + // The streaming protocols the server supports (understands and permits). See + // k8s.io/kubernetes/pkg/kubelet/server/portforward/constants.go for available protocols. + // Only used for SPDY streaming. + SupportedPortForwardProtocols []string + + // The config for serving over TLS. If nil, TLS will not be used. + TLSConfig *tls.Config +} + +// DefaultConfig provides default values for server Config. The DefaultConfig is partial, so +// some fields like Addr must still be provided. +var DefaultConfig = Config{ + StreamIdleTimeout: 4 * time.Hour, + StreamCreationTimeout: remotecommandconsts.DefaultStreamCreationTimeout, + SupportedRemoteCommandProtocols: remotecommandconsts.SupportedStreamingProtocols, + SupportedPortForwardProtocols: portforward.SupportedProtocols, +} + +// NewServer creates a new Server for stream requests. +// TODO(tallclair): Add auth(n/z) interface & handling. +func NewServer(config Config, runtime Runtime) (Server, error) { + s := &server{ + config: config, + runtime: &criAdapter{runtime}, + cache: newRequestCache(), + } + + if s.config.BaseURL == nil { + s.config.BaseURL = &url.URL{ + Scheme: "http", + Host: s.config.Addr, + } + if s.config.TLSConfig != nil { + s.config.BaseURL.Scheme = "https" + } + } + + ws := &restful.WebService{} + endpoints := []struct { + path string + handler restful.RouteFunction + }{ + {"/exec/{token}", s.serveExec}, + {"/attach/{token}", s.serveAttach}, + {"/portforward/{token}", s.servePortForward}, + } + // If serving relative to a base path, set that here. + pathPrefix := path.Dir(s.config.BaseURL.Path) + for _, e := range endpoints { + for _, method := range []string{"GET", "POST"} { + ws.Route(ws. + Method(method). + Path(path.Join(pathPrefix, e.path)). + To(e.handler)) + } + } + handler := restful.NewContainer() + handler.Add(ws) + s.handler = handler + s.server = &http.Server{ + Addr: s.config.Addr, + Handler: s.handler, + TLSConfig: s.config.TLSConfig, + } + + return s, nil +} + +type server struct { + config Config + runtime *criAdapter + handler http.Handler + cache *requestCache + server *http.Server +} + +func validateExecRequest(req *runtimeapi.ExecRequest) error { + if req.ContainerId == "" { + return status.Errorf(codes.InvalidArgument, "missing required container_id") + } + if req.Tty && req.Stderr { + // If TTY is set, stderr cannot be true because multiplexing is not + // supported. + return status.Errorf(codes.InvalidArgument, "tty and stderr cannot both be true") + } + if !req.Stdin && !req.Stdout && !req.Stderr { + return status.Errorf(codes.InvalidArgument, "one of stdin, stdout, or stderr must be set") + } + return nil +} + +func (s *server) GetExec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error) { + if err := validateExecRequest(req); err != nil { + return nil, err + } + token, err := s.cache.Insert(req) + if err != nil { + return nil, err + } + return &runtimeapi.ExecResponse{ + Url: s.buildURL("exec", token), + }, nil +} + +func validateAttachRequest(req *runtimeapi.AttachRequest) error { + if req.ContainerId == "" { + return status.Errorf(codes.InvalidArgument, "missing required container_id") + } + if req.Tty && req.Stderr { + // If TTY is set, stderr cannot be true because multiplexing is not + // supported. + return status.Errorf(codes.InvalidArgument, "tty and stderr cannot both be true") + } + if !req.Stdin && !req.Stdout && !req.Stderr { + return status.Errorf(codes.InvalidArgument, "one of stdin, stdout, and stderr must be set") + } + return nil +} + +func (s *server) GetAttach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error) { + if err := validateAttachRequest(req); err != nil { + return nil, err + } + token, err := s.cache.Insert(req) + if err != nil { + return nil, err + } + return &runtimeapi.AttachResponse{ + Url: s.buildURL("attach", token), + }, nil +} + +func (s *server) GetPortForward(req *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error) { + if req.PodSandboxId == "" { + return nil, status.Errorf(codes.InvalidArgument, "missing required pod_sandbox_id") + } + token, err := s.cache.Insert(req) + if err != nil { + return nil, err + } + return &runtimeapi.PortForwardResponse{ + Url: s.buildURL("portforward", token), + }, nil +} + +func (s *server) Start(stayUp bool) error { + if !stayUp { + // TODO(tallclair): Implement this. + return errors.New("stayUp=false is not yet implemented") + } + + listener, err := net.Listen("tcp", s.config.Addr) + if err != nil { + return err + } + // Use the actual address as baseURL host. This handles the "0" port case. + s.config.BaseURL.Host = listener.Addr().String() + if s.config.TLSConfig != nil { + return s.server.ServeTLS(listener, "", "") // Use certs from TLSConfig. + } + return s.server.Serve(listener) +} + +func (s *server) Stop() error { + return s.server.Close() +} + +func (s *server) ServeHTTP(w http.ResponseWriter, r *http.Request) { + s.handler.ServeHTTP(w, r) +} + +func (s *server) buildURL(method, token string) string { + return s.config.BaseURL.ResolveReference(&url.URL{ + Path: path.Join(method, token), + }).String() +} + +func (s *server) serveExec(req *restful.Request, resp *restful.Response) { + token := req.PathParameter("token") + cachedRequest, ok := s.cache.Consume(token) + if !ok { + http.NotFound(resp.ResponseWriter, req.Request) + return + } + exec, ok := cachedRequest.(*runtimeapi.ExecRequest) + if !ok { + http.NotFound(resp.ResponseWriter, req.Request) + return + } + + streamOpts := &remotecommandserver.Options{ + Stdin: exec.Stdin, + Stdout: exec.Stdout, + Stderr: exec.Stderr, + TTY: exec.Tty, + } + + remotecommandserver.ServeExec( + resp.ResponseWriter, + req.Request, + s.runtime, + "", // unused: podName + "", // unusued: podUID + exec.ContainerId, + exec.Cmd, + streamOpts, + s.config.StreamIdleTimeout, + s.config.StreamCreationTimeout, + s.config.SupportedRemoteCommandProtocols) +} + +func (s *server) serveAttach(req *restful.Request, resp *restful.Response) { + token := req.PathParameter("token") + cachedRequest, ok := s.cache.Consume(token) + if !ok { + http.NotFound(resp.ResponseWriter, req.Request) + return + } + attach, ok := cachedRequest.(*runtimeapi.AttachRequest) + if !ok { + http.NotFound(resp.ResponseWriter, req.Request) + return + } + + streamOpts := &remotecommandserver.Options{ + Stdin: attach.Stdin, + Stdout: attach.Stdout, + Stderr: attach.Stderr, + TTY: attach.Tty, + } + remotecommandserver.ServeAttach( + resp.ResponseWriter, + req.Request, + s.runtime, + "", // unused: podName + "", // unusued: podUID + attach.ContainerId, + streamOpts, + s.config.StreamIdleTimeout, + s.config.StreamCreationTimeout, + s.config.SupportedRemoteCommandProtocols) +} + +func (s *server) servePortForward(req *restful.Request, resp *restful.Response) { + token := req.PathParameter("token") + cachedRequest, ok := s.cache.Consume(token) + if !ok { + http.NotFound(resp.ResponseWriter, req.Request) + return + } + pf, ok := cachedRequest.(*runtimeapi.PortForwardRequest) + if !ok { + http.NotFound(resp.ResponseWriter, req.Request) + return + } + + portForwardOptions, err := portforward.BuildV4Options(pf.Port) + if err != nil { + resp.WriteError(http.StatusBadRequest, err) + return + } + + portforward.ServePortForward( + resp.ResponseWriter, + req.Request, + s.runtime, + pf.PodSandboxId, + "", // unused: podUID + portForwardOptions, + s.config.StreamIdleTimeout, + s.config.StreamCreationTimeout, + s.config.SupportedPortForwardProtocols) +} + +// criAdapter wraps the Runtime functions to conform to the remotecommand interfaces. +// The adapter binds the container ID to the container name argument, and the pod sandbox ID to the pod name. +type criAdapter struct { + Runtime +} + +var _ remotecommandserver.Executor = &criAdapter{} +var _ remotecommandserver.Attacher = &criAdapter{} +var _ portforward.PortForwarder = &criAdapter{} + +func (a *criAdapter) ExecInContainer(podName string, podUID types.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error { + return a.Runtime.Exec(container, cmd, in, out, err, tty, resize) +} + +func (a *criAdapter) AttachContainer(podName string, podUID types.UID, container string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error { + return a.Runtime.Attach(container, in, out, err, tty, resize) +} + +func (a *criAdapter) PortForward(podName string, podUID types.UID, port int32, stream io.ReadWriteCloser) error { + return a.Runtime.PortForward(podName, port, stream) +} diff --git a/vendor/github.com/containerd/cri/pkg/util/deep_copy.go b/vendor/github.com/containerd/cri/pkg/util/deep_copy.go index 5fdee984b52..d0e0bf37efa 100644 --- a/vendor/github.com/containerd/cri/pkg/util/deep_copy.go +++ b/vendor/github.com/containerd/cri/pkg/util/deep_copy.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 util diff --git a/vendor/github.com/containerd/cri/pkg/util/id.go b/vendor/github.com/containerd/cri/pkg/util/id.go index 11b0a70a65c..90f762ba704 100644 --- a/vendor/github.com/containerd/cri/pkg/util/id.go +++ b/vendor/github.com/containerd/cri/pkg/util/id.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 util diff --git a/vendor/github.com/containerd/cri/pkg/util/image.go b/vendor/github.com/containerd/cri/pkg/util/image.go index 3a98836045f..d3abcd31a6d 100644 --- a/vendor/github.com/containerd/cri/pkg/util/image.go +++ b/vendor/github.com/containerd/cri/pkg/util/image.go @@ -1,23 +1,23 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 util import ( - "github.com/docker/distribution/reference" + "github.com/containerd/containerd/reference/docker" ) // NormalizeImageRef normalizes the image reference following the docker convention. This is added @@ -27,7 +27,7 @@ import ( // sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa will be returned as // docker.io/library/busybox@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa. // -// Deprecated: use github.com/docker/reference.ParseDockerRef() instead -func NormalizeImageRef(ref string) (reference.Named, error) { - return reference.ParseDockerRef(ref) +// Deprecated: use github.com/containerd/containerd/reference/docker.ParseDockerRef() instead +func NormalizeImageRef(ref string) (docker.Named, error) { + return docker.ParseDockerRef(ref) } diff --git a/vendor/github.com/containerd/cri/pkg/util/strings.go b/vendor/github.com/containerd/cri/pkg/util/strings.go index 4d06ecbf077..df1a5c91a46 100644 --- a/vendor/github.com/containerd/cri/pkg/util/strings.go +++ b/vendor/github.com/containerd/cri/pkg/util/strings.go @@ -1,17 +1,17 @@ /* -Copyright 2017 The Kubernetes Authors. + Copyright The containerd 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 + 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 + 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. + 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 util diff --git a/vendor/github.com/containerd/cri/vendor.conf b/vendor/github.com/containerd/cri/vendor.conf index 9080ba8931a..ab6d986d553 100644 --- a/vendor/github.com/containerd/cri/vendor.conf +++ b/vendor/github.com/containerd/cri/vendor.conf @@ -1,86 +1,101 @@ # cri dependencies -github.com/tchap/go-patricia v2.2.6 -github.com/opencontainers/selinux bb88c45a3863dc4c38320d71b890bb30ef9feba4 -github.com/docker/docker 86f080cff0914e9694068ed78d503701667c4c00 -github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580 +github.com/docker/docker 4634ce647cf2ce2c6031129ccd109e557244986f +github.com/opencontainers/selinux v1.6.0 +github.com/tchap/go-patricia v2.2.6 +github.com/willf/bitset d5bec3311243426a3c6d1b7a795f24b17c686dbb # 1.1.10+ used by selinux pkg # containerd dependencies -github.com/BurntSushi/toml v0.3.1 -github.com/Microsoft/go-winio v0.4.14 -github.com/Microsoft/hcsshim 9e921883ac929bbe515b39793ece99ce3a9d7706 -github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9 -github.com/containerd/cgroups c4b9ac5c7601384c965b9646fc515884e091ebb9 -github.com/containerd/console 0650fd9eeb50bab4fc99dceb9f2e14cf58f36e7f -github.com/containerd/containerd v1.3.6 -github.com/containerd/continuity f2a389ac0a02ce21c09edd7344677a601970f41c -github.com/containerd/fifo bda0ff6ed73c67bfb5e62bc9c697f146b7fd7f13 -github.com/containerd/go-runc e029b79d8cda8374981c64eba71f28ec38e5526f -github.com/containerd/ttrpc 92c8520ef9f86600c650dd540266a007bf03670f -github.com/containerd/typeurl a93fcdb778cd272c6e9b3028b2f42d813e785d40 -github.com/coreos/go-systemd 48702e0da86bd25e76cfef347e2adeb434a0d0a6 # v14 -github.com/cpuguy83/go-md2man 7762f7e404f8416dfa1d9bb6a8c192aa9acb4d19 # v1.0.10 -github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9 -github.com/docker/go-metrics 4ea375f7759c82740c893fc030bc37088d2ec098 -github.com/docker/go-units v0.4.0 -github.com/godbus/dbus c7fdd8b5cd55e87b4e1f4e372cdb1db61dd6c66f # v3 -github.com/gogo/googleapis v1.2.0 -github.com/gogo/protobuf v1.2.1 -github.com/golang/protobuf v1.2.0 -github.com/google/uuid 0cd6bf5da1e1c83f8b45653022c74f71af0538a4 # v1.1.1 -github.com/grpc-ecosystem/go-grpc-prometheus 6b7015e65d366bf3f19b2b2a000a831940f0f7e0 # v1.1 -github.com/hashicorp/golang-lru v0.5.3 -github.com/imdario/mergo 7c29201646fa3de8506f701213473dd407f19646 # v0.3.7 -github.com/matttproud/golang_protobuf_extensions v1.0.1 -github.com/opencontainers/go-digest c9281466c8b2f606084ac71339773efd177436e7 -github.com/opencontainers/image-spec v1.0.1 -github.com/opencontainers/runc d736ef14f0288d6993a1845745d6756cfc9ddd5a # v1.0.0-rc9 -github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db -github.com/pkg/errors v0.8.1 -github.com/prometheus/client_golang f4fb1b73fb099f396a7f0036bf86aa8def4ed823 -github.com/prometheus/client_model 99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c -github.com/prometheus/common 89604d197083d4781071d3c65855d24ecfb0a563 -github.com/prometheus/procfs cb4147076ac75738c9a7d279075a253c0cc5acbd -github.com/russross/blackfriday 05f3235734ad95d0016f6a23902f06461fcf567a # v1.5.2 -github.com/sirupsen/logrus v1.4.1 -github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2 -github.com/urfave/cli v1.22.0 -go.etcd.io/bbolt v1.3.3 -go.opencensus.io v0.22.0 -golang.org/x/net f3200d17e092c607f615320ecaad13d87ad9a2b3 -golang.org/x/sync 42b317875d0fa942474b76e1b46a6060d720ae6e -golang.org/x/sys 9eafafc0a87e0fd0aeeba439a4573537970c44c7 https://github.com/golang/sys -golang.org/x/text 19e51611da83d6be54ddafce4a4af510cb3e9ea4 -google.golang.org/appengine v1.5.0 -google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944 -google.golang.org/grpc 6eaf6f47437a6b4e2153a190160ef39a92c7eceb # v1.23.0 +github.com/beorn7/perks v1.0.1 +github.com/BurntSushi/toml v0.3.1 +github.com/cespare/xxhash/v2 v2.1.1 +github.com/containerd/cgroups 318312a373405e5e91134d8063d04d59768a1bff +github.com/containerd/console v1.0.0 +github.com/containerd/containerd v1.4.0 +github.com/containerd/continuity efbc4488d8fe1bdc16bde3b2d2990d9b3a899165 +github.com/containerd/fifo f15a3290365b9d2627d189e619ab4008e0069caf +github.com/containerd/go-runc 7016d3ce2328dd2cb1192b2076ebd565c4e8df0c +github.com/containerd/ttrpc v1.0.1 +github.com/containerd/typeurl v1.0.1 +github.com/coreos/go-systemd/v22 v22.1.0 +github.com/cpuguy83/go-md2man/v2 v2.0.0 +github.com/docker/go-events e31b211e4f1cd09aa76fe4ac244571fab96ae47f +github.com/docker/go-metrics v0.0.1 +github.com/docker/go-units v0.4.0 +github.com/godbus/dbus/v5 v5.0.3 +github.com/gogo/googleapis v1.3.2 +github.com/gogo/protobuf v1.3.1 +github.com/golang/protobuf v1.3.5 +github.com/google/uuid v1.1.1 +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 +github.com/hashicorp/errwrap v1.0.0 +github.com/hashicorp/go-multierror v1.0.0 +github.com/hashicorp/golang-lru v0.5.3 +github.com/imdario/mergo v0.3.7 +github.com/konsorten/go-windows-terminal-sequences v1.0.3 +github.com/matttproud/golang_protobuf_extensions v1.0.1 +github.com/Microsoft/go-winio v0.4.14 +github.com/Microsoft/hcsshim v0.8.9 +github.com/opencontainers/go-digest v1.0.0 +github.com/opencontainers/image-spec v1.0.1 +github.com/opencontainers/runc v1.0.0-rc92 +github.com/opencontainers/runtime-spec 4d89ac9fbff6c455f46a5bb59c6b1bb7184a5e43 # v1.0.3-0.20200728170252-4d89ac9fbff6 +github.com/pkg/errors v0.9.1 +github.com/prometheus/client_golang v1.6.0 +github.com/prometheus/client_model v0.2.0 +github.com/prometheus/common v0.9.1 +github.com/prometheus/procfs v0.0.11 +github.com/russross/blackfriday/v2 v2.0.1 +github.com/shurcooL/sanitized_anchor_name v1.0.0 +github.com/sirupsen/logrus v1.6.0 +github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2 +github.com/urfave/cli v1.22.1 # NOTE: urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092 +go.etcd.io/bbolt v1.3.5 +go.opencensus.io v0.22.0 +golang.org/x/net ab34263943818b32f575efc978a3d24e80b04bd7 +golang.org/x/sync 42b317875d0fa942474b76e1b46a6060d720ae6e +golang.org/x/sys ed371f2e16b4b305ee99df548828de367527b76b +golang.org/x/text v0.3.3 +google.golang.org/genproto e50cd9704f63023d62cd06a1994b98227fc4d21a +google.golang.org/grpc v1.27.1 + +# cgroups dependencies +github.com/cilium/ebpf 1c8d4c9ef7759622653a1d319284a44652333b28 # kubernetes dependencies -sigs.k8s.io/yaml v1.1.0 -k8s.io/utils e782cd3c129fc98ee807f3c889c0f26eb7c9daf5 -k8s.io/kubernetes v1.16.6 -k8s.io/klog v1.0.0 -k8s.io/cri-api kubernetes-1.16.6 -k8s.io/client-go kubernetes-1.16.6 -k8s.io/api kubernetes-1.16.6 -k8s.io/apiserver kubernetes-1.16.6 -k8s.io/apimachinery kubernetes-1.16.6 -gopkg.in/yaml.v2 53403b58ad1b561927d19068c655246f2db79d48 # v2.2.8 -gopkg.in/inf.v0 v0.9.1 -golang.org/x/time 9d24e82272b4f38b78bc8cff74fa936d31ccd8ef -golang.org/x/oauth2 0f29369cfe4552d0e4bcddc57cc75f4d7e672a33 -golang.org/x/crypto 60c769a6c58655dab1b9adac0d58967dd517cfba -github.com/stretchr/testify v1.4.0 -github.com/seccomp/libseccomp-golang v0.9.1 -github.com/pmezard/go-difflib v1.0.0 -github.com/modern-go/reflect2 v1.0.1 -github.com/modern-go/concurrent 1.0.3 -github.com/json-iterator/go v1.1.8 -github.com/google/gofuzz v1.0.0 -github.com/emicklei/go-restful v2.9.5 -github.com/docker/spdystream 449fdfce4d962303d702fec724ef0ad181c92528 -github.com/davecgh/go-spew v1.1.1 +github.com/davecgh/go-spew v1.1.1 +github.com/docker/spdystream 449fdfce4d962303d702fec724ef0ad181c92528 +github.com/emicklei/go-restful v2.9.5 +github.com/go-logr/logr v0.2.0 +github.com/google/gofuzz v1.1.0 +github.com/json-iterator/go v1.1.10 +github.com/modern-go/concurrent 1.0.3 +github.com/modern-go/reflect2 v1.0.1 +github.com/pmezard/go-difflib v1.0.0 +github.com/stretchr/testify v1.4.0 +golang.org/x/crypto 75b288015ac94e66e3d6715fb68a9b41bf046ec2 +golang.org/x/oauth2 858c2ad4c8b6c5d10852cb89079f6ca1c7309787 +golang.org/x/time 555d28b269f0569763d25dbe1a237ae74c6bcc82 +gopkg.in/inf.v0 v0.9.1 +gopkg.in/yaml.v2 v2.2.8 +k8s.io/api v0.19.0-rc.4 +k8s.io/apiserver v0.19.0-rc.4 +k8s.io/apimachinery v0.19.0-rc.4 +k8s.io/client-go v0.19.0-rc.4 +k8s.io/component-base v0.19.0-rc.4 +k8s.io/cri-api v0.19.0-rc.4 +k8s.io/klog/v2 v2.2.0 +k8s.io/utils 2df71ebbae66f39338aed4cd0bb82d2212ee33cc +sigs.k8s.io/structured-merge-diff/v3 v3.0.0 +sigs.k8s.io/yaml v1.2.0 # cni dependencies -github.com/containernetworking/plugins v0.7.6 -github.com/containernetworking/cni v0.7.1 -github.com/containerd/go-cni 49fbd9b210f3c8ee3b7fd3cd797aabaf364627c1 +github.com/containerd/go-cni v1.0.0 +github.com/containernetworking/cni v0.7.1 +github.com/containernetworking/plugins v0.7.6 +github.com/fsnotify/fsnotify v1.4.9 + +# image decrypt depedencies +github.com/containerd/imgcrypt v1.0.1 +github.com/containers/ocicrypt v1.0.1 +github.com/fullsailor/pkcs7 8306686428a5fe132eac8cb7c4848af725098bd4 +gopkg.in/square/go-jose.v2 v2.3.1 diff --git a/vendor/github.com/containerd/go-cni/.travis.yml b/vendor/github.com/containerd/go-cni/.travis.yml index 61bae215071..da541b4cfcd 100644 --- a/vendor/github.com/containerd/go-cni/.travis.yml +++ b/vendor/github.com/containerd/go-cni/.travis.yml @@ -1,14 +1,15 @@ language: go go: - - 1.12.x + - 1.13.x + - 1.14.x - tip go_import_path: github.com/containerd/go-cni install: - go get -d - - go get -u github.com/vbatts/git-validation - - go get -u github.com/kunalkushwaha/ltag + - env GO111MODULE=off go get -u github.com/vbatts/git-validation + - env GO111MODULE=off go get -u github.com/kunalkushwaha/ltag before_script: - pushd ..; git clone https://github.com/containerd/project; popd @@ -16,6 +17,7 @@ before_script: script: - DCO_VERBOSITY=-q ../project/script/validate/dco - ../project/script/validate/fileheader ../project/ + - env GO111MODULE=on ../project/script/validate/vendor - go test -race -coverprofile=coverage.txt -covermode=atomic after_success: diff --git a/vendor/github.com/containerd/go-cni/README.md b/vendor/github.com/containerd/go-cni/README.md index 1bd2f0013fb..3b1a4aa753c 100644 --- a/vendor/github.com/containerd/go-cni/README.md +++ b/vendor/github.com/containerd/go-cni/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/containerd/go-cni.svg?branch=master)](https://travis-ci.org/containerd/go-cni) +[![Build Status](https://travis-ci.org/containerd/go-cni.svg?branch=master)](https://travis-ci.org/containerd/go-cni) [![GoDoc](https://godoc.org/github.com/containerd/go-cni?status.svg)](https://godoc.org/github.com/containerd/go-cni) # go-cni diff --git a/vendor/github.com/containerd/go-cni/errors.go b/vendor/github.com/containerd/go-cni/errors.go index 28761711ed2..3fbdf777a85 100644 --- a/vendor/github.com/containerd/go-cni/errors.go +++ b/vendor/github.com/containerd/go-cni/errors.go @@ -31,25 +31,25 @@ var ( // IsCNINotInitialized returns true if the error is due to cni config not being initialized func IsCNINotInitialized(err error) bool { - return errors.Cause(err) == ErrCNINotInitialized + return errors.Is(err, ErrCNINotInitialized) } // IsInvalidConfig returns true if the error is invalid cni config func IsInvalidConfig(err error) bool { - return errors.Cause(err) == ErrInvalidConfig + return errors.Is(err, ErrInvalidConfig) } // IsNotFound returns true if the error is due to a missing config or result func IsNotFound(err error) bool { - return errors.Cause(err) == ErrNotFound + return errors.Is(err, ErrNotFound) } // IsReadFailure return true if the error is a config read failure func IsReadFailure(err error) bool { - return errors.Cause(err) == ErrRead + return errors.Is(err, ErrRead) } // IsInvalidResult return true if the error is due to invalid cni result func IsInvalidResult(err error) bool { - return errors.Cause(err) == ErrInvalidResult + return errors.Is(err, ErrInvalidResult) } diff --git a/vendor/github.com/containerd/go-cni/go.mod b/vendor/github.com/containerd/go-cni/go.mod new file mode 100644 index 00000000000..0040b34b7a4 --- /dev/null +++ b/vendor/github.com/containerd/go-cni/go.mod @@ -0,0 +1,14 @@ +module github.com/containerd/go-cni + +require ( + github.com/containernetworking/cni v0.7.1 + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/onsi/ginkgo v1.10.3 // indirect + github.com/onsi/gomega v1.7.1 // indirect + github.com/pkg/errors v0.9.1 + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f // indirect + github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d +) + +go 1.13 diff --git a/vendor/github.com/containerd/go-cni/go.sum b/vendor/github.com/containerd/go-cni/go.sum new file mode 100644 index 00000000000..967f986b101 --- /dev/null +++ b/vendor/github.com/containerd/go-cni/go.sum @@ -0,0 +1,39 @@ +github.com/containernetworking/cni v0.7.1 h1:fE3r16wpSEyaqY4Z4oFrLMmIGfBYIKpPrHK31EJ9FzE= +github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3 h1:OoxbjfXVZyod1fmWYhI7SEyaD8B00ynP3T+D5GiyHOY= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f h1:SrOsK2rwonEK9IsdNEU61zcTdKW68/PuV9wuHHpqngk= +github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d h1:YCdGqZILKLGzbyEYbdau30JBEXbKaKYmkBDU5JUW3D0= +github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/containerd/go-cni/namespace_opts.go b/vendor/github.com/containerd/go-cni/namespace_opts.go index e8092e85ecd..1fad5f69a50 100644 --- a/vendor/github.com/containerd/go-cni/namespace_opts.go +++ b/vendor/github.com/containerd/go-cni/namespace_opts.go @@ -42,6 +42,14 @@ func WithCapabilityBandWidth(bandWidth BandWidth) NamespaceOpts { } } +// WithCapabilityDNS adds support for dns +func WithCapabilityDNS(dns DNS) NamespaceOpts { + return func(c *Namespace) error { + c.capabilityArgs["dns"] = dns + return nil + } +} + func WithCapability(name string, capability interface{}) NamespaceOpts { return func(c *Namespace) error { c.capabilityArgs[name] = capability diff --git a/vendor/github.com/containerd/go-cni/opts.go b/vendor/github.com/containerd/go-cni/opts.go index 5222df1e9e9..1dd7869a2d6 100644 --- a/vendor/github.com/containerd/go-cni/opts.go +++ b/vendor/github.com/containerd/go-cni/opts.go @@ -142,6 +142,24 @@ func WithConfFile(fileName string) CNIOpt { } } +// WithConfListBytes can be used to load network config list directly +// from byte +func WithConfListBytes(bytes []byte) CNIOpt { + return func(c *libcni) error { + confList, err := cnilibrary.ConfListFromBytes(bytes) + if err != nil { + return err + } + i := len(c.networks) + c.networks = append(c.networks, &Network{ + cni: c.cniConfig, + config: confList, + ifName: getIfName(c.prefix, i), + }) + return nil + } +} + // WithConfListFile can be used to load network config // from an .conflist file. Supported with absolute fileName // with path only. diff --git a/vendor/github.com/containerd/go-cni/types.go b/vendor/github.com/containerd/go-cni/types.go index 8583050e48a..0b7db1ee0a6 100644 --- a/vendor/github.com/containerd/go-cni/types.go +++ b/vendor/github.com/containerd/go-cni/types.go @@ -53,3 +53,13 @@ type BandWidth struct { EgressRate uint64 EgressBurst uint64 } + +// DNS defines the dns config +type DNS struct { + // List of DNS servers of the cluster. + Servers []string + // List of DNS search domains of the cluster. + Searches []string + // List of DNS options. + Options []string +} diff --git a/vendor/github.com/containerd/go-cni/vendor.conf b/vendor/github.com/containerd/go-cni/vendor.conf deleted file mode 100644 index 31d06e0fc50..00000000000 --- a/vendor/github.com/containerd/go-cni/vendor.conf +++ /dev/null @@ -1,6 +0,0 @@ -github.com/stretchr/testify b89eecf5ca5db6d3ba60b237ffe3df7bafb7662f -github.com/davecgh/go-spew 8991bc29aa16c548c550c7ff78260e27b9ab7c73 -github.com/pmezard/go-difflib 792786c7400a136282c1664665ae0a8db921c6c2 -github.com/stretchr/objx 8a3f7159479fbc75b30357fbc48f380b7320f08e -github.com/containernetworking/cni v0.7.1 -github.com/pkg/errors v0.8.0 diff --git a/vendor/github.com/containerd/go-runc/go.mod b/vendor/github.com/containerd/go-runc/go.mod new file mode 100644 index 00000000000..d833ee16021 --- /dev/null +++ b/vendor/github.com/containerd/go-runc/go.mod @@ -0,0 +1,10 @@ +module github.com/containerd/go-runc + +go 1.13 + +require ( + github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e + github.com/opencontainers/runtime-spec v1.0.1 + github.com/pkg/errors v0.8.1 + golang.org/x/sys v0.0.0-20191210023423-ac6580df4449 +) diff --git a/vendor/github.com/containerd/go-runc/go.sum b/vendor/github.com/containerd/go-runc/go.sum new file mode 100644 index 00000000000..f7d00e37f2f --- /dev/null +++ b/vendor/github.com/containerd/go-runc/go.sum @@ -0,0 +1,9 @@ +github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e h1:GdiIYd8ZDOrT++e1NjhSD4rGt9zaJukHm4rt5F4mRQc= +github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/opencontainers/runtime-spec v1.0.1 h1:wY4pOY8fBdSIvs9+IDHC55thBuEulhzfSgKeC1yFvzQ= +github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449 h1:gSbV7h1NRL2G1xTg/owz62CST1oJBmxy4QpMMregXVQ= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/containerd/go-runc/runc.go b/vendor/github.com/containerd/go-runc/runc.go index 613cc511c68..c3a95af2548 100644 --- a/vendor/github.com/containerd/go-runc/runc.go +++ b/vendor/github.com/containerd/go-runc/runc.go @@ -17,6 +17,7 @@ package runc import ( + "bytes" "context" "encoding/json" "errors" @@ -72,11 +73,12 @@ type Runc struct { // List returns all containers created inside the provided runc root directory func (r *Runc) List(context context.Context) ([]*Container, error) { data, err := cmdOutput(r.command(context, "list", "--format=json"), false) + defer putBuf(data) if err != nil { return nil, err } var out []*Container - if err := json.Unmarshal(data, &out); err != nil { + if err := json.Unmarshal(data.Bytes(), &out); err != nil { return nil, err } return out, nil @@ -85,11 +87,12 @@ func (r *Runc) List(context context.Context) ([]*Container, error) { // State returns the state for the container provided by id func (r *Runc) State(context context.Context, id string) (*Container, error) { data, err := cmdOutput(r.command(context, "state", id), true) + defer putBuf(data) if err != nil { - return nil, fmt.Errorf("%s: %s", err, data) + return nil, fmt.Errorf("%s: %s", err, data.String()) } var c Container - if err := json.Unmarshal(data, &c); err != nil { + if err := json.Unmarshal(data.Bytes(), &c); err != nil { return nil, err } return &c, nil @@ -154,8 +157,9 @@ func (r *Runc) Create(context context.Context, id, bundle string, opts *CreateOp if cmd.Stdout == nil && cmd.Stderr == nil { data, err := cmdOutput(cmd, true) + defer putBuf(data) if err != nil { - return fmt.Errorf("%s: %s", err, data) + return fmt.Errorf("%s: %s", err, data.String()) } return nil } @@ -172,7 +176,7 @@ func (r *Runc) Create(context context.Context, id, bundle string, opts *CreateOp } status, err := Monitor.Wait(cmd, ec) if err == nil && status != 0 { - err = fmt.Errorf("%s did not terminate sucessfully", cmd.Args[0]) + err = fmt.Errorf("%s did not terminate successfully", cmd.Args[0]) } return err } @@ -233,8 +237,9 @@ func (r *Runc) Exec(context context.Context, id string, spec specs.Process, opts } if cmd.Stdout == nil && cmd.Stderr == nil { data, err := cmdOutput(cmd, true) + defer putBuf(data) if err != nil { - return fmt.Errorf("%s: %s", err, data) + return fmt.Errorf("%s: %s", err, data.String()) } return nil } @@ -251,7 +256,7 @@ func (r *Runc) Exec(context context.Context, id string, spec specs.Process, opts } status, err := Monitor.Wait(cmd, ec) if err == nil && status != 0 { - err = fmt.Errorf("%s did not terminate sucessfully", cmd.Args[0]) + err = fmt.Errorf("%s did not terminate successfully", cmd.Args[0]) } return err } @@ -277,7 +282,7 @@ func (r *Runc) Run(context context.Context, id, bundle string, opts *CreateOpts) } status, err := Monitor.Wait(cmd, ec) if err == nil && status != 0 { - err = fmt.Errorf("%s did not terminate sucessfully", cmd.Args[0]) + err = fmt.Errorf("%s did not terminate successfully", cmd.Args[0]) } return status, err } @@ -399,11 +404,12 @@ func (r *Runc) Resume(context context.Context, id string) error { // Ps lists all the processes inside the container returning their pids func (r *Runc) Ps(context context.Context, id string) ([]int, error) { data, err := cmdOutput(r.command(context, "ps", "--format", "json", id), true) + defer putBuf(data) if err != nil { - return nil, fmt.Errorf("%s: %s", err, data) + return nil, fmt.Errorf("%s: %s", err, data.String()) } var pids []int - if err := json.Unmarshal(data, &pids); err != nil { + if err := json.Unmarshal(data.Bytes(), &pids); err != nil { return nil, err } return pids, nil @@ -412,11 +418,12 @@ func (r *Runc) Ps(context context.Context, id string) ([]int, error) { // Top lists all the processes inside the container returning the full ps data func (r *Runc) Top(context context.Context, id string, psOptions string) (*TopResults, error) { data, err := cmdOutput(r.command(context, "ps", "--format", "table", id, psOptions), true) + defer putBuf(data) if err != nil { - return nil, fmt.Errorf("%s: %s", err, data) + return nil, fmt.Errorf("%s: %s", err, data.String()) } - topResults, err := ParsePSOutput(data) + topResults, err := ParsePSOutput(data.Bytes()) if err != nil { return nil, fmt.Errorf("%s: ", err) } @@ -576,7 +583,7 @@ func (r *Runc) Restore(context context.Context, id, bundle string, opts *Restore } status, err := Monitor.Wait(cmd, ec) if err == nil && status != 0 { - err = fmt.Errorf("%s did not terminate sucessfully", cmd.Args[0]) + err = fmt.Errorf("%s did not terminate successfully", cmd.Args[0]) } return status, err } @@ -606,41 +613,32 @@ type Version struct { // Version returns the runc and runtime-spec versions func (r *Runc) Version(context context.Context) (Version, error) { data, err := cmdOutput(r.command(context, "--version"), false) + defer putBuf(data) if err != nil { return Version{}, err } - return parseVersion(data) + return parseVersion(data.Bytes()) } func parseVersion(data []byte) (Version, error) { var v Version parts := strings.Split(strings.TrimSpace(string(data)), "\n") - if len(parts) != 3 { - return v, nil - } - for i, p := range []struct { - dest *string - split string - }{ - { - dest: &v.Runc, - split: "version ", - }, - { - dest: &v.Commit, - split: ": ", - }, - { - dest: &v.Spec, - split: ": ", - }, - } { - p2 := strings.Split(parts[i], p.split) - if len(p2) != 2 { - return v, fmt.Errorf("unable to parse version line %q", parts[i]) + + if len(parts) > 0 { + if !strings.HasPrefix(parts[0], "runc version ") { + return v, nil + } + v.Runc = parts[0][13:] + + for _, part := range parts[1:] { + if strings.HasPrefix(part, "commit: ") { + v.Commit = part[8:] + } else if strings.HasPrefix(part, "spec: ") { + v.Spec = part[6:] + } } - *p.dest = p2[1] } + return v, nil } @@ -682,20 +680,22 @@ func (r *Runc) runOrError(cmd *exec.Cmd) error { } status, err := Monitor.Wait(cmd, ec) if err == nil && status != 0 { - err = fmt.Errorf("%s did not terminate sucessfully", cmd.Args[0]) + err = fmt.Errorf("%s did not terminate successfully", cmd.Args[0]) } return err } data, err := cmdOutput(cmd, true) + defer putBuf(data) if err != nil { - return fmt.Errorf("%s: %s", err, data) + return fmt.Errorf("%s: %s", err, data.String()) } return nil } -func cmdOutput(cmd *exec.Cmd, combined bool) ([]byte, error) { +// callers of cmdOutput are expected to call putBuf on the returned Buffer +// to ensure it is released back to the shared pool after use. +func cmdOutput(cmd *exec.Cmd, combined bool) (*bytes.Buffer, error) { b := getBuf() - defer putBuf(b) cmd.Stdout = b if combined { @@ -708,8 +708,8 @@ func cmdOutput(cmd *exec.Cmd, combined bool) ([]byte, error) { status, err := Monitor.Wait(cmd, ec) if err == nil && status != 0 { - err = fmt.Errorf("%s did not terminate sucessfully", cmd.Args[0]) + err = fmt.Errorf("%s did not terminate successfully", cmd.Args[0]) } - return b.Bytes(), err + return b, err } diff --git a/vendor/github.com/containerd/go-runc/utils.go b/vendor/github.com/containerd/go-runc/utils.go index 69ad6ead751..948b6336a7f 100644 --- a/vendor/github.com/containerd/go-runc/utils.go +++ b/vendor/github.com/containerd/go-runc/utils.go @@ -57,6 +57,10 @@ func getBuf() *bytes.Buffer { } func putBuf(b *bytes.Buffer) { + if b == nil { + return + } + b.Reset() bytesBufferPool.Put(b) } diff --git a/vendor/github.com/containerd/imgcrypt/.appveyor.yml b/vendor/github.com/containerd/imgcrypt/.appveyor.yml new file mode 100644 index 00000000000..9ae34ab5590 --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/.appveyor.yml @@ -0,0 +1,41 @@ +version: "{build}" + +image: Visual Studio 2017 + +clone_folder: c:\gopath\src\github.com\containerd\imgcrypt + +branches: + only: + - master + +environment: + GOPATH: C:\gopath + CGO_ENABLED: 1 + matrix: + - GO_VERSION: 1.13.5 + +before_build: + - choco install -y mingw --version 5.3.0 + # Install Go + - rd C:\Go /s /q + - appveyor DownloadFile https://storage.googleapis.com/golang/go%GO_VERSION%.windows-amd64.zip + - 7z x go%GO_VERSION%.windows-amd64.zip -oC:\ >nul + - go version + # Clone hcsshim at the vendored version + - bash.exe -elc "export PATH=/c/tools/mingw64/bin:$PATH; + rm -rf /c/gopath/src/github.com/Microsoft/hcsshim; + git clone -q https://github.com/Microsoft/hcsshim.git /c/gopath/src/github.com/Microsoft/hcsshim; + export HCSSHIM_VERSION=`grep Microsoft/hcsshim vendor.conf | awk '{print $2}'`; + echo Using Microsoft/hcsshim $HCSSHIM_VERSION; + pushd /c/gopath/src/github.com/Microsoft/hcsshim; + git checkout $HCSSHIM_VERSION; + popd" + +build_script: + - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/bin:$PATH; + GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.19.1; + mingw32-make.exe check" + +test_script: + - bash.exe -elc "export PATH=/c/tools/mingw64/bin:$PATH ; mingw32-make.exe test" + - bash.exe -elc "export PATH=/c/tools/mingw64/bin:$PATH ; mingw32-make.exe" diff --git a/vendor/github.com/containerd/imgcrypt/.gitignore b/vendor/github.com/containerd/imgcrypt/.gitignore new file mode 100644 index 00000000000..814d8e18877 --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/.gitignore @@ -0,0 +1,3 @@ +*~ +/ctr +/ctd-decoder diff --git a/vendor/github.com/containerd/imgcrypt/.golangci.yml b/vendor/github.com/containerd/imgcrypt/.golangci.yml new file mode 100644 index 00000000000..9b16b5ce85d --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/.golangci.yml @@ -0,0 +1,20 @@ +linters: + enable: + - structcheck + - varcheck + - staticcheck + - unconvert + - gofmt + - goimports + - golint + - ineffassign + - vet + - unused + - misspell + +run: + skip-dirs: + - cmd/ctr/commands/run + - cmd/ctr/commands/images + - cmd\\ctr\\commands\\run + - cmd\\ctr\\commands\\images diff --git a/vendor/github.com/containerd/imgcrypt/.travis.yml b/vendor/github.com/containerd/imgcrypt/.travis.yml new file mode 100644 index 00000000000..f6d40274183 --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/.travis.yml @@ -0,0 +1,45 @@ +dist: xenial +language: go + +go: + - "1.13.x" + +env: + global: + - RUNC_VERSION=v1.0.0-rc9 + - GOLANGCI_LINT_VERSION=v1.22.2 + +addons: + apt: + packages: + - libseccomp-dev + +before_install: + - uname -r + - | + pushd .. + git clone https://github.com/containerd/containerd.git + git clone https://github.com/containerd/project + go get -u github.com/vbatts/git-validation + pushd containerd + make -j$(nproc) + sudo make install + sudo rm -f $(type -P ctr) + popd + popd + +install: + - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION} + # set up runc + - sudo curl -L https://github.com/opencontainers/runc/releases/download/${RUNC_VERSION}/runc.amd64 -o /usr/bin/runc + - sudo chmod +x /usr/bin/runc + - go get -u github.com/vbatts/git-validation + - go get -u github.com/kunalkushwaha/ltag + +script: + - DCO_VERBOSITY=-q ../project/script/validate/dco + - ../project/script/validate/fileheader ../project/ + - make check + - make test + - make + - CONTAINERD=$(type -P containerd) ./script/tests/test_encryption.sh diff --git a/vendor/github.com/containerd/imgcrypt/LICENSE b/vendor/github.com/containerd/imgcrypt/LICENSE new file mode 100644 index 00000000000..584149b6ee2 --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright The containerd 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 + + https://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. diff --git a/vendor/github.com/containerd/imgcrypt/MAINTAINERS b/vendor/github.com/containerd/imgcrypt/MAINTAINERS new file mode 100644 index 00000000000..acb227c3378 --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/MAINTAINERS @@ -0,0 +1,9 @@ +# imgcrypt maintainers +# +# As a containerd sub-project, containerd maintainers are also included from https://github.com/containerd/project/blob/master/MAINTAINERS. +# See https://github.com/containerd/project/blob/master/GOVERNANCE.md for description of maintainer role +# +# MAINTAINERS +# GitHub ID, Name, Email address +stefanberger, Stefan Berger, stefanb@linux.ibm.com +lumjjb, Brandon Lum, lumjjb@gmail.com diff --git a/vendor/github.com/containerd/imgcrypt/Makefile b/vendor/github.com/containerd/imgcrypt/Makefile new file mode 100644 index 00000000000..f3faecc8ac1 --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/Makefile @@ -0,0 +1,56 @@ +# Copyright The containerd 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. + + +# Base path used to install. +DESTDIR ?= /usr/local + +COMMANDS=ctd-decoder ctr-enc + +BINARIES=$(addprefix bin/,$(COMMANDS)) + +.PHONY: check build ctd-decoder + +all: build + +build: $(BINARIES) + +FORCE: + +bin/ctd-decoder: cmd/ctd-decoder FORCE + go build -o $@ -v ./cmd/ctd-decoder/ + +bin/ctr-enc: cmd/ctr FORCE + go build -o $@ -v ./cmd/ctr/ + +check: + @echo "$@" + @golangci-lint run + +install: + @echo "$@" + @mkdir -p $(DESTDIR)/bin + @install $(BINARIES) $(DESTDIR)/bin + +uninstall: + @echo "$@" + @rm -f $(addprefix $(DESTDIR)/bin/,$(notdir $(BINARIES))) + +clean: + @echo "$@" + @rm -f $(BINARIES) + +test: + @echo "$@" + @go test ./... diff --git a/vendor/github.com/containerd/imgcrypt/README.md b/vendor/github.com/containerd/imgcrypt/README.md new file mode 100644 index 00000000000..5e9aaf8a3cf --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/README.md @@ -0,0 +1,102 @@ +# imgcrypt image encryption library and command line lool + +Project `imgcrypt` is a non-core subproject of containerd. + +The `imgcrypt` library provides API exensions for containerd to support encryted container images and implements +the `ctd-decoder` command line tool for use by containerd to decrypt encrypted container images. An extended version +of containerd's `ctr` tool (`ctr-enc') with support for encrypting and decrypting container images is also provided. + +`imgcrypt` relies on the [`ocicrypt`](https://github.com/containers/ocicrypt) library for crypto functions on image layers. + +# Usage + +`imgcrypt` requires containerd 1.3 or later. + +Build and install `imgcrypt`: + +``` +# make +# sudo make install +``` + +Start containerd with a configuration file that looks as follows. To avoid interference with a containerd from a Docker +installation we use /tmp for directories. Also, we build containerd 1.3 from the source but do not install it. + +``` +# cat config.toml +disable_plugins = ["cri"] +root = "/tmp/var/lib/containerd" +state = "/tmp/run/containerd" +[grpc] + address = "/tmp/run/containerd/mycontainerd.sock" + uid = 0 + gid = 0 +[stream_processors] + [stream_processors."io.containerd.ocicrypt.decoder.v1.tar.gzip"] + accepts = ["application/vnd.oci.image.layer.v1.tar+gzip+encrypted"] + returns = "application/vnd.oci.image.layer.v1.tar+gzip" + path = "/usr/local/bin/ctd-decoder" + [stream_processors."io.containerd.ocicrypt.decoder.v1.tar"] + accepts = ["application/vnd.oci.image.layer.v1.tar+encrypted"] + returns = "application/vnd.oci.image.layer.v1.tar" + path = "/usr/local/bin/ctd-decoder" + +# sudo ~/src/github.com/containerd/containerd/bin/containerd -c config.toml +``` + +Create an RSA key pair using the openssl command line tool and encrypted an image: + +``` +# openssl genrsa --out mykey.pem +Generating RSA private key, 2048 bit long modulus (2 primes) +...............................................+++++ +............................+++++ +e is 65537 (0x010001) +# openssl rsa -in mykey.pem -pubout -out mypubkey.pem +writing RSA key +# sudo chmod 0666 /tmp/run/containerd/containerd.sock +# CTR="/usr/local/bin/ctr-enc -a /tmp/run/containerd/containerd.sock" +# $CTR images pull --all-platforms docker.io/library/bash:latest +[...] +# $CTR images layerinfo --platform linux/amd64 docker.io/library/bash:latest + # DIGEST PLATFORM SIZE ENCRYPTION RECIPIENTS + 0 sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609 linux/amd64 2789669 + 1 sha256:7dd01fd971d4ec7058c5636a505327b24e5fc8bd7f62816a9d518472bd9b15c0 linux/amd64 3174665 + 2 sha256:691cfbca522787898c8b37f063dd20e5524e7d103e1a3b298bd2e2b8da54faf5 linux/amd64 340 +# $CTR images encrypt --recipient jwe:mypubkey.pem --platform linux/amd64 docker.io/library/bash:latest bash.enc:latest +Encrypting docker.io/library/bash:latest to bash.enc:latest +$ $CTR images layerinfo --platform linux/amd64 bash.enc:latest + # DIGEST PLATFORM SIZE ENCRYPTION RECIPIENTS + 0 sha256:360be141b01f69b25427a9085b36ba8ad7d7a335449013fa6b32c1ecb894ab5b linux/amd64 2789669 jwe [jwe] + 1 sha256:ac601e66cdd275ee0e10afead03a2722e153a60982122d2d369880ea54fe82f8 linux/amd64 3174665 jwe [jwe] + 2 sha256:41e47064fd00424e328915ad2f7f716bd86ea2d0d8315edaf33ecaa6a2464530 linux/amd64 340 jwe [jwe] +``` + +Start a local image registry so we can push the encrypted image to it. A recent versions of the registry is required +to accept encrypted container images. +``` +# docker pull registry:latest +# docker run -d -p 5000:5000 --restart=always --name registry registry +``` + +Push the encrypted image to the local registry, pull it using `ctr-enc`, and then run the image. +``` +# $CTR images tag bash.enc:latest localhost:5000/bash.enc:latest +# $CTR images push localhost:5000/bash.enc:latest +# $CTR images rm localhost:5000/bash.enc:latest bash.enc:latest +# $CTR images pull localhost:5000/bash.enc:latest +# sudo $CTR run --rm localhost:5000/bash.enc:latest test echo 'Hello World!' +ctr: you are not authorized to use this image: missing private key needed for decryption +# sudo $CTR run --rm --key mykey.pem localhost:5000/bash.enc:latest test echo 'Hello World!' +Hello World! +``` + +## Project details + +**imgcrypt** is a non-core containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). +As a containerd sub-project, you will find the: + * [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md), + * [Maintainers](MAINTAINERS), + * and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md) + +information in our [`containerd/project`](https://github.com/containerd/project) repository. diff --git a/vendor/github.com/containerd/imgcrypt/go.mod b/vendor/github.com/containerd/imgcrypt/go.mod new file mode 100644 index 00000000000..b1df8ee4cab --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/go.mod @@ -0,0 +1,39 @@ +module github.com/containerd/imgcrypt + +go 1.13 + +require ( + github.com/Microsoft/go-winio v0.4.14 + github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4 + github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601 // indirect + github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50 + github.com/containerd/containerd v1.3.0 + github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02 // indirect + github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260 // indirect + github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda // indirect + github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8 // indirect + github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd + github.com/containers/ocicrypt v1.0.1 + github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b // indirect + github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible // indirect + github.com/docker/go-events v0.0.0-20170721190031-9461782956ad // indirect + github.com/docker/go-units v0.4.0 // indirect + github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55 // indirect + github.com/gogo/googleapis v1.2.0 // indirect + github.com/gogo/protobuf v1.2.1 + github.com/imdario/mergo v0.3.8 // indirect + github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2 + github.com/opencontainers/image-spec v1.0.1 + github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9 // indirect + github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559 + github.com/pkg/errors v0.8.1 + github.com/prometheus/procfs v0.0.8 // indirect + github.com/sirupsen/logrus v1.4.2 + github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 // indirect + github.com/urfave/cli v1.22.1 + go.etcd.io/bbolt v1.3.3 // indirect + golang.org/x/net v0.0.0-20190522155817-f3200d17e092 // indirect + golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e + golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e // indirect + google.golang.org/grpc v1.24.0 +) diff --git a/vendor/github.com/containerd/imgcrypt/go.sum b/vendor/github.com/containerd/imgcrypt/go.sum new file mode 100644 index 00000000000..9694db9f63c --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/go.sum @@ -0,0 +1,135 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4 h1:dDfdujmNy5CzUkdz+J0cgFlaSHrtmLWgMcjZugz1bBo= +github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601 h1:6xW3ogNpFIly0umJGEKzFfGDNUk5rXFE1lJ3/gBmz3U= +github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= +github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50 h1:WMpHmC6AxwWb9hMqhudkqG7A/p14KiMnl6d3r1iUMjU= +github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0 h1:xjvXQWABwS2uiv3TWgQt5Uth60Gu86LTGZXMJkjc7rY= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02 h1:tN9D97v5A5QuKdcKHKt+UMKrkQ5YXUnD8iM7IAAjEfI= +github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260 h1:XGyg7oTtD0DoRFhbpV6x1WfV0flKC4UxXU7ab1zC08U= +github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda h1:3LYDkJtHAZGbWD75PoTBJuxldc+njsz9uSfjwIoOR6c= +github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8 h1:jYCTS/16RWXXtVHNHo1KWNegd1kKQ7lHd7BStj/0hKw= +github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd h1:JNn81o/xG+8NEo3bC/vx9pbi/g2WI8mtP2/nXzu297Y= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/containers/ocicrypt v1.0.1 h1:EToign46OSLTFWnb2oNj9RG3XDnkOX8r28ZIXUuk5Pc= +github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= +github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b h1:+mtZ0WjVZwTX0RVrXMXDwuYVaNeHGvWBW1UwJeMR+2M= +github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible h1:dvc1KSkIYTVjZgHf/CTC2diTYC8PzhaA5sFISRfNVrE= +github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/go-events v0.0.0-20170721190031-9461782956ad h1:VXIse57M5C6ezDuCPyq6QmMvEJ2xclYKZ35SfkXdm3E= +github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa h1:RDBNVkRviHZtvDvId8XSGPu3rmpmSe+wKRcEWNgsfWU= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55 h1:oIgNYSrSUbNH5DJh6DMhU1PiOKOYIHNxrV3djLsLpEI= +github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/gogo/googleapis v1.2.0 h1:Z0v3OJDotX9ZBpdz2V+AI7F4fITSZhVE5mg6GQppwMM= +github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2 h1:2C93eP55foV5f0eNmXbidhKzwUZbs/Gk4PRp1zfeffs= +github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9 h1:YYXsNEXNhi+IDZlUa39wZJ3NKNjtyfGCYQtEvb2Nrh4= +github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559 h1:Cef96rKLuXxeGzERI/0ve9yAzIeTpx0qz9JKFDZALYw= +github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8= +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092 h1:4QSRKanuywn15aTZvI/mIDEgPQpswuFndXpOj3rKEco= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e h1:TsjK5I7fXk8f2FQrgu6NS7i5Qih3knl2FL1htyguLRE= +golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/containerd/imgcrypt/images/encryption/client.go b/vendor/github.com/containerd/imgcrypt/images/encryption/client.go new file mode 100644 index 00000000000..6419d5928d3 --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/images/encryption/client.go @@ -0,0 +1,83 @@ +/* + Copyright The containerd 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 encryption + +import ( + "context" + + "github.com/containerd/containerd" + "github.com/containerd/containerd/containers" + "github.com/containerd/containerd/diff" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/imgcrypt" + "github.com/containerd/typeurl" + encconfig "github.com/containers/ocicrypt/config" + "github.com/gogo/protobuf/types" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" +) + +// WithDecryptedUnpack allows to pass parameters the 'layertool' needs to the applier +func WithDecryptedUnpack(data *imgcrypt.Payload) diff.ApplyOpt { + return func(_ context.Context, desc ocispec.Descriptor, c *diff.ApplyConfig) error { + if c.ProcessorPayloads == nil { + c.ProcessorPayloads = make(map[string]*types.Any) + } + data.Descriptor = desc + any, err := typeurl.MarshalAny(data) + if err != nil { + return errors.Wrapf(err, "failed to marshal payload") + } + + for _, id := range imgcrypt.PayloadToolIDs { + c.ProcessorPayloads[id] = any + } + return nil + } +} + +// WithUnpackConfigApplyOpts allows to pass an ApplyOpt +func WithUnpackConfigApplyOpts(opt diff.ApplyOpt) containerd.UnpackOpt { + return func(_ context.Context, uc *containerd.UnpackConfig) error { + uc.ApplyOpts = append(uc.ApplyOpts, opt) + return nil + } +} + +// WithUnpackOpts is used to add unpack options to the unpacker. +func WithUnpackOpts(opts []containerd.UnpackOpt) containerd.RemoteOpt { + return func(_ *containerd.Client, c *containerd.RemoteContext) error { + c.UnpackOpts = append(c.UnpackOpts, opts...) + return nil + } +} + +// WithAuthorizationCheck checks the authorization of keys used for encrypted containers +// be checked upon creation of a container +func WithAuthorizationCheck(dc *encconfig.DecryptConfig) containerd.NewContainerOpts { + return func(ctx context.Context, client *containerd.Client, c *containers.Container) error { + image, err := client.ImageService().Get(ctx, c.Image) + if errdefs.IsNotFound(err) { + // allow creation of container without a existing image + return nil + } else if err != nil { + return err + } + + return CheckAuthorization(ctx, client.ContentStore(), image.Target, dc) + } +} diff --git a/vendor/github.com/containerd/imgcrypt/images/encryption/encryption.go b/vendor/github.com/containerd/imgcrypt/images/encryption/encryption.go new file mode 100644 index 00000000000..59bef8c970c --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/images/encryption/encryption.go @@ -0,0 +1,468 @@ +/* + Copyright The containerd 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 encryption + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "math/rand" + + "github.com/containerd/containerd/images" + "github.com/containers/ocicrypt" + encconfig "github.com/containers/ocicrypt/config" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/platforms" + encocispec "github.com/containers/ocicrypt/spec" + digest "github.com/opencontainers/go-digest" + specs "github.com/opencontainers/image-spec/specs-go" + "github.com/pkg/errors" + + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +type cryptoOp int + +const ( + cryptoOpEncrypt cryptoOp = iota + cryptoOpDecrypt = iota + cryptoOpUnwrapOnly = iota +) + +// LayerFilter allows to select Layers by certain criteria +type LayerFilter func(desc ocispec.Descriptor) bool + +// IsEncryptedDiff returns true if mediaType is a known encrypted media type. +func IsEncryptedDiff(ctx context.Context, mediaType string) bool { + switch mediaType { + case encocispec.MediaTypeLayerGzipEnc, encocispec.MediaTypeLayerEnc: + return true + } + return false +} + +// HasEncryptedLayer returns true if any LayerInfo indicates that the layer is encrypted +func HasEncryptedLayer(ctx context.Context, layerInfos []ocispec.Descriptor) bool { + for i := 0; i < len(layerInfos); i++ { + if IsEncryptedDiff(ctx, layerInfos[i].MediaType) { + return true + } + } + return false +} + +// encryptLayer encrypts the layer using the CryptoConfig and creates a new OCI Descriptor. +// A call to this function may also only manipulate the wrapped keys list. +// The caller is expected to store the returned encrypted data and OCI Descriptor +func encryptLayer(cc *encconfig.CryptoConfig, dataReader content.ReaderAt, desc ocispec.Descriptor) (ocispec.Descriptor, io.Reader, ocicrypt.EncryptLayerFinalizer, error) { + var ( + size int64 + d digest.Digest + err error + ) + + encLayerReader, encLayerFinalizer, err := ocicrypt.EncryptLayer(cc.EncryptConfig, ocicrypt.ReaderFromReaderAt(dataReader), desc) + if err != nil { + return ocispec.Descriptor{}, nil, nil, err + } + + // were data touched ? + if encLayerReader != nil { + size = 0 + d = "" + } else { + size = desc.Size + d = desc.Digest + } + + newDesc := ocispec.Descriptor{ + Digest: d, + Size: size, + Platform: desc.Platform, + } + + switch desc.MediaType { + case images.MediaTypeDockerSchema2LayerGzip: + newDesc.MediaType = encocispec.MediaTypeLayerGzipEnc + case images.MediaTypeDockerSchema2Layer: + newDesc.MediaType = encocispec.MediaTypeLayerEnc + case encocispec.MediaTypeLayerGzipEnc: + newDesc.MediaType = encocispec.MediaTypeLayerGzipEnc + case encocispec.MediaTypeLayerEnc: + newDesc.MediaType = encocispec.MediaTypeLayerEnc + + // TODO: Mediatypes to be added in ocispec + case ocispec.MediaTypeImageLayerGzip: + newDesc.MediaType = encocispec.MediaTypeLayerGzipEnc + case ocispec.MediaTypeImageLayer: + newDesc.MediaType = encocispec.MediaTypeLayerEnc + + default: + return ocispec.Descriptor{}, nil, nil, errors.Errorf("Encryption: unsupporter layer MediaType: %s\n", desc.MediaType) + } + + return newDesc, encLayerReader, encLayerFinalizer, nil +} + +// DecryptLayer decrypts the layer using the DecryptConfig and creates a new OCI Descriptor. +// The caller is expected to store the returned plain data and OCI Descriptor +func DecryptLayer(dc *encconfig.DecryptConfig, dataReader io.Reader, desc ocispec.Descriptor, unwrapOnly bool) (ocispec.Descriptor, io.Reader, digest.Digest, error) { + resultReader, layerDigest, err := ocicrypt.DecryptLayer(dc, dataReader, desc, unwrapOnly) + if err != nil || unwrapOnly { + return ocispec.Descriptor{}, nil, "", err + } + + newDesc := ocispec.Descriptor{ + Size: 0, + Platform: desc.Platform, + } + + switch desc.MediaType { + case encocispec.MediaTypeLayerGzipEnc: + newDesc.MediaType = images.MediaTypeDockerSchema2LayerGzip + case encocispec.MediaTypeLayerEnc: + newDesc.MediaType = images.MediaTypeDockerSchema2Layer + default: + return ocispec.Descriptor{}, nil, "", errors.Errorf("Decryption: unsupporter layer MediaType: %s\n", desc.MediaType) + } + return newDesc, resultReader, layerDigest, nil +} + +// decryptLayer decrypts the layer using the CryptoConfig and creates a new OCI Descriptor. +// The caller is expected to store the returned plain data and OCI Descriptor +func decryptLayer(cc *encconfig.CryptoConfig, dataReader content.ReaderAt, desc ocispec.Descriptor, unwrapOnly bool) (ocispec.Descriptor, io.Reader, error) { + resultReader, d, err := ocicrypt.DecryptLayer(cc.DecryptConfig, ocicrypt.ReaderFromReaderAt(dataReader), desc, unwrapOnly) + if err != nil || unwrapOnly { + return ocispec.Descriptor{}, nil, err + } + + newDesc := ocispec.Descriptor{ + Digest: d, + Size: 0, + Platform: desc.Platform, + } + + switch desc.MediaType { + case encocispec.MediaTypeLayerGzipEnc: + newDesc.MediaType = images.MediaTypeDockerSchema2LayerGzip + case encocispec.MediaTypeLayerEnc: + newDesc.MediaType = images.MediaTypeDockerSchema2Layer + default: + return ocispec.Descriptor{}, nil, errors.Errorf("Decryption: unsupporter layer MediaType: %s\n", desc.MediaType) + } + return newDesc, resultReader, nil +} + +// cryptLayer handles the changes due to encryption or decryption of a layer +func cryptLayer(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, cryptoOp cryptoOp) (ocispec.Descriptor, error) { + var ( + resultReader io.Reader + newDesc ocispec.Descriptor + encLayerFinalizer ocicrypt.EncryptLayerFinalizer + ) + + dataReader, err := cs.ReaderAt(ctx, desc) + if err != nil { + return ocispec.Descriptor{}, err + } + defer dataReader.Close() + + if cryptoOp == cryptoOpEncrypt { + newDesc, resultReader, encLayerFinalizer, err = encryptLayer(cc, dataReader, desc) + } else { + newDesc, resultReader, err = decryptLayer(cc, dataReader, desc, cryptoOp == cryptoOpUnwrapOnly) + } + if err != nil || cryptoOp == cryptoOpUnwrapOnly { + return ocispec.Descriptor{}, err + } + + newDesc.Annotations = ocicrypt.FilterOutAnnotations(desc.Annotations) + + // some operations, such as changing recipients, may not touch the layer at all + if resultReader != nil { + var ref string + // If we have the digest, write blob with checks + haveDigest := newDesc.Digest.String() != "" + if haveDigest { + ref = fmt.Sprintf("layer-%s", newDesc.Digest.String()) + } else { + ref = fmt.Sprintf("blob-%d-%d", rand.Int(), rand.Int()) + } + + if haveDigest { + if err := content.WriteBlob(ctx, cs, ref, resultReader, newDesc); err != nil { + return ocispec.Descriptor{}, errors.Wrap(err, "failed to write config") + } + } else { + newDesc.Digest, newDesc.Size, err = ingestReader(ctx, cs, ref, resultReader) + if err != nil { + return ocispec.Descriptor{}, err + } + } + } + + // After performing encryption, call finalizer to get annotations + if encLayerFinalizer != nil { + annotations, err := encLayerFinalizer() + if err != nil { + return ocispec.Descriptor{}, errors.Wrap(err, "Error getting annotations from encLayer finalizer") + } + for k, v := range annotations { + newDesc.Annotations[k] = v + } + } + return newDesc, err +} + +func ingestReader(ctx context.Context, cs content.Ingester, ref string, r io.Reader) (digest.Digest, int64, error) { + cw, err := content.OpenWriter(ctx, cs, content.WithRef(ref)) + if err != nil { + return "", 0, errors.Wrap(err, "failed to open writer") + } + defer cw.Close() + + if _, err := content.CopyReader(cw, r); err != nil { + return "", 0, errors.Wrap(err, "copy failed") + } + + st, err := cw.Status() + if err != nil { + return "", 0, errors.Wrap(err, "failed to get state") + } + + if err := cw.Commit(ctx, st.Offset, ""); err != nil { + if !errdefs.IsAlreadyExists(err) { + return "", 0, errors.Wrapf(err, "failed commit on ref %q", ref) + } + } + + return cw.Digest(), st.Offset, nil +} + +// Encrypt or decrypt all the Children of a given descriptor +func cryptChildren(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter, cryptoOp cryptoOp, thisPlatform *ocispec.Platform) (ocispec.Descriptor, bool, error) { + children, err := images.Children(ctx, cs, desc) + if err != nil { + if errdefs.IsNotFound(err) { + return desc, false, nil + } + return ocispec.Descriptor{}, false, err + } + + var newLayers []ocispec.Descriptor + var config ocispec.Descriptor + modified := false + + for _, child := range children { + // we only encrypt child layers and have to update their parents if encryption happened + switch child.MediaType { + case images.MediaTypeDockerSchema2Config, ocispec.MediaTypeImageConfig: + config = child + case images.MediaTypeDockerSchema2LayerGzip, images.MediaTypeDockerSchema2Layer, + ocispec.MediaTypeImageLayerGzip, ocispec.MediaTypeImageLayer: + if cryptoOp == cryptoOpEncrypt && lf(child) { + nl, err := cryptLayer(ctx, cs, child, cc, cryptoOp) + if err != nil { + return ocispec.Descriptor{}, false, err + } + modified = true + newLayers = append(newLayers, nl) + } else { + newLayers = append(newLayers, child) + } + case encocispec.MediaTypeLayerGzipEnc, encocispec.MediaTypeLayerEnc: + // this one can be decrypted but also its recipients list changed + if lf(child) { + nl, err := cryptLayer(ctx, cs, child, cc, cryptoOp) + if err != nil || cryptoOp == cryptoOpUnwrapOnly { + return ocispec.Descriptor{}, false, err + } + modified = true + newLayers = append(newLayers, nl) + } else { + newLayers = append(newLayers, child) + } + case images.MediaTypeDockerSchema2LayerForeign, images.MediaTypeDockerSchema2LayerForeignGzip: + // never encrypt/decrypt + newLayers = append(newLayers, child) + default: + return ocispec.Descriptor{}, false, errors.Errorf("bad/unhandled MediaType %s in encryptChildren\n", child.MediaType) + } + } + + if modified && len(newLayers) > 0 { + newManifest := ocispec.Manifest{ + Versioned: specs.Versioned{ + SchemaVersion: 2, + }, + Config: config, + Layers: newLayers, + } + + mb, err := json.MarshalIndent(newManifest, "", " ") + if err != nil { + return ocispec.Descriptor{}, false, errors.Wrap(err, "failed to marshal image") + } + + newDesc := ocispec.Descriptor{ + MediaType: ocispec.MediaTypeImageManifest, + Size: int64(len(mb)), + Digest: digest.Canonical.FromBytes(mb), + Platform: desc.Platform, + } + + labels := map[string]string{} + labels["containerd.io/gc.ref.content.0"] = newManifest.Config.Digest.String() + for i, ch := range newManifest.Layers { + labels[fmt.Sprintf("containerd.io/gc.ref.content.%d", i+1)] = ch.Digest.String() + } + + ref := fmt.Sprintf("manifest-%s", newDesc.Digest.String()) + + if err := content.WriteBlob(ctx, cs, ref, bytes.NewReader(mb), newDesc, content.WithLabels(labels)); err != nil { + return ocispec.Descriptor{}, false, errors.Wrap(err, "failed to write config") + } + return newDesc, true, nil + } + + return desc, modified, nil +} + +// cryptManifest encrypts or decrypts the children of a top level manifest +func cryptManifest(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter, cryptoOp cryptoOp) (ocispec.Descriptor, bool, error) { + p, err := content.ReadBlob(ctx, cs, desc) + if err != nil { + return ocispec.Descriptor{}, false, err + } + var manifest ocispec.Manifest + if err := json.Unmarshal(p, &manifest); err != nil { + return ocispec.Descriptor{}, false, err + } + platform := platforms.DefaultSpec() + newDesc, modified, err := cryptChildren(ctx, cs, desc, cc, lf, cryptoOp, &platform) + if err != nil || cryptoOp == cryptoOpUnwrapOnly { + return ocispec.Descriptor{}, false, err + } + return newDesc, modified, nil +} + +// cryptManifestList encrypts or decrypts the children of a top level manifest list +func cryptManifestList(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter, cryptoOp cryptoOp) (ocispec.Descriptor, bool, error) { + // read the index; if any layer is encrypted and any manifests change we will need to rewrite it + b, err := content.ReadBlob(ctx, cs, desc) + if err != nil { + return ocispec.Descriptor{}, false, err + } + + var index ocispec.Index + if err := json.Unmarshal(b, &index); err != nil { + return ocispec.Descriptor{}, false, err + } + + var newManifests []ocispec.Descriptor + modified := false + for _, manifest := range index.Manifests { + newManifest, m, err := cryptChildren(ctx, cs, manifest, cc, lf, cryptoOp, manifest.Platform) + if err != nil || cryptoOp == cryptoOpUnwrapOnly { + return ocispec.Descriptor{}, false, err + } + if m { + modified = true + } + newManifests = append(newManifests, newManifest) + } + + if modified { + // we need to update the index + newIndex := ocispec.Index{ + Versioned: index.Versioned, + Manifests: newManifests, + } + + mb, err := json.MarshalIndent(newIndex, "", " ") + if err != nil { + return ocispec.Descriptor{}, false, errors.Wrap(err, "failed to marshal index") + } + + newDesc := ocispec.Descriptor{ + MediaType: ocispec.MediaTypeImageIndex, + Size: int64(len(mb)), + Digest: digest.Canonical.FromBytes(mb), + } + + labels := map[string]string{} + for i, m := range newIndex.Manifests { + labels[fmt.Sprintf("containerd.io/gc.ref.content.%d", i)] = m.Digest.String() + } + + ref := fmt.Sprintf("index-%s", newDesc.Digest.String()) + + if err = content.WriteBlob(ctx, cs, ref, bytes.NewReader(mb), newDesc, content.WithLabels(labels)); err != nil { + return ocispec.Descriptor{}, false, errors.Wrap(err, "failed to write index") + } + return newDesc, true, nil + } + + return desc, false, nil +} + +// cryptImage is the dispatcher to encrypt/decrypt an image; it accepts either an OCI descriptor +// representing a manifest list or a single manifest +func cryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter, cryptoOp cryptoOp) (ocispec.Descriptor, bool, error) { + if cc == nil { + return ocispec.Descriptor{}, false, errors.Wrapf(errdefs.ErrInvalidArgument, "CryptoConfig must not be nil") + } + switch desc.MediaType { + case ocispec.MediaTypeImageIndex, images.MediaTypeDockerSchema2ManifestList: + return cryptManifestList(ctx, cs, desc, cc, lf, cryptoOp) + case ocispec.MediaTypeImageManifest, images.MediaTypeDockerSchema2Manifest: + return cryptManifest(ctx, cs, desc, cc, lf, cryptoOp) + default: + return ocispec.Descriptor{}, false, errors.Errorf("CryptImage: Unhandled media type: %s", desc.MediaType) + } +} + +// EncryptImage encrypts an image; it accepts either an OCI descriptor representing a manifest list or a single manifest +func EncryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter) (ocispec.Descriptor, bool, error) { + return cryptImage(ctx, cs, desc, cc, lf, cryptoOpEncrypt) +} + +// DecryptImage decrypts an image; it accepts either an OCI descriptor representing a manifest list or a single manifest +func DecryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter) (ocispec.Descriptor, bool, error) { + return cryptImage(ctx, cs, desc, cc, lf, cryptoOpDecrypt) +} + +// CheckAuthorization checks whether a user has the right keys to be allowed to access an image (every layer) +// It takes decrypting of the layers only as far as decrypting the asymmetrically encrypted data +// The decryption is only done for the current platform +func CheckAuthorization(ctx context.Context, cs content.Store, desc ocispec.Descriptor, dc *encconfig.DecryptConfig) error { + cc := encconfig.InitDecryption(dc.Parameters) + + lf := func(desc ocispec.Descriptor) bool { + return true + } + + _, _, err := cryptImage(ctx, cs, desc, &cc, lf, cryptoOpUnwrapOnly) + if err != nil { + return errors.Wrapf(err, "you are not authorized to use this image") + } + return nil +} diff --git a/vendor/github.com/containerd/imgcrypt/payload.go b/vendor/github.com/containerd/imgcrypt/payload.go new file mode 100644 index 00000000000..7d92543a34d --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/payload.go @@ -0,0 +1,43 @@ +/* + Copyright The containerd 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 imgcrypt + +import ( + "github.com/containerd/typeurl" + encconfig "github.com/containers/ocicrypt/config" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" +) + +const ( + PayloadURI = "io.containerd.ocicrypt.v1.Payload" +) + +var PayloadToolIDs = []string{ + "io.containerd.ocicrypt.decoder.v1.tar", + "io.containerd.ocicrypt.decoder.v1.tar.gzip", +} + +func init() { + typeurl.Register(&Payload{}, PayloadURI) +} + +// Payload holds data that the external layer decryption tool +// needs for decrypting a layer +type Payload struct { + DecryptConfig encconfig.DecryptConfig + Descriptor ocispec.Descriptor +} diff --git a/vendor/github.com/containerd/imgcrypt/vendor.conf b/vendor/github.com/containerd/imgcrypt/vendor.conf new file mode 100644 index 00000000000..a959d350010 --- /dev/null +++ b/vendor/github.com/containerd/imgcrypt/vendor.conf @@ -0,0 +1,45 @@ +github.com/containerd/containerd v1.3.0 +github.com/containerd/cgroups c4b9ac5c7601384c965b9646fc515884e091ebb9 +github.com/containerd/typeurl a93fcdb778cd272c6e9b3028b2f42d813e785d40 +github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c +github.com/containerd/continuity f2a389ac0a02ce21c09edd7344677a601970f41c +github.com/containerd/console 0650fd9eeb50bab4fc99dceb9f2e14cf58f36e7f +github.com/containerd/go-runc e029b79d8cda8374981c64eba71f28ec38e5526f +github.com/gogo/protobuf v1.2.1 +github.com/gogo/googleapis v1.2.0 +github.com/coreos/go-systemd 48702e0da86bd25e76cfef347e2adeb434a0d0a6 +github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580 +github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9 +github.com/docker/go-units v0.4.0 +github.com/godbus/dbus c7fdd8b5cd55e87b4e1f4e372cdb1db61dd6c66f +github.com/sirupsen/logrus v1.4.1 +github.com/opencontainers/go-digest c9281466c8b2f606084ac71339773efd177436e7 +github.com/opencontainers/image-spec v1.0.1 +github.com/opencontainers/runc 3e425f80a8c931f88e6d94a8c831b9d5aa481657 +github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db +golang.org/x/sys 9eafafc0a87e0fd0aeeba439a4573537970c44c7 https://github.com/golang/sys +golang.org/x/net f3200d17e092c607f615320ecaad13d87ad9a2b3 +golang.org/x/crypto 5c40567a22f818bd14a1ea7245dad9f8ef0691aa +golang.org/x/sync 42b317875d0fa942474b76e1b46a6060d720ae6e +golang.org/x/text 19e51611da83d6be54ddafce4a4af510cb3e9ea4 +github.com/pkg/errors v0.8.1 +google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944 +google.golang.org/grpc 6eaf6f47437a6b4e2153a190160ef39a92c7eceb # v1.23.0 +github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2 +github.com/golang/protobuf v1.2.0 +github.com/containerd/ttrpc 92c8520ef9f86600c650dd540266a007bf03670f +github.com/urfave/cli v1.22.0 +github.com/cpuguy83/go-md2man v1.0.10 +github.com/russross/blackfriday v1.5.2 + +# image encryption dependencies +github.com/containers/ocicrypt b87a4a69c741007e2e8c713732c3e3da76f99dab + +# windows +github.com/Microsoft/go-winio v0.4.14 +github.com/Microsoft/hcsshim 8abdbb8205e4192c68b5f84c31197156f31be517 +github.com/konsorten/go-windows-terminal-sequences v1.0.1 + +# encryption dependencies +gopkg.in/square/go-jose.v2 v2.3.1 https://github.com/square/go-jose.git +github.com/fullsailor/pkcs7 8306686428a5fe132eac8cb7c4848af725098bd4 diff --git a/vendor/github.com/containerd/ttrpc/.travis.yml b/vendor/github.com/containerd/ttrpc/.travis.yml index 4df13c9db21..345d15d1cff 100644 --- a/vendor/github.com/containerd/ttrpc/.travis.yml +++ b/vendor/github.com/containerd/ttrpc/.travis.yml @@ -1,12 +1,15 @@ +dist: bionic language: go go: - - "1.12.x" + - "1.13.x" install: - - go get -u github.com/vbatts/git-validation - - go get -u github.com/kunalkushwaha/ltag - - go get -t ./... + # Don't change local go.{mod, sum} by go get tools. + # + # ref: https://github.com/golang/go/issues/27643 + - pushd ..; go get -u github.com/vbatts/git-validation; popd + - pushd ..; go get -u github.com/kunalkushwaha/ltag; popd before_script: - pushd ..; git clone https://github.com/containerd/project; popd @@ -14,4 +17,7 @@ before_script: script: - DCO_VERBOSITY=-q ../project/script/validate/dco - ../project/script/validate/fileheader ../project/ - - go test -race -v ./... + - go test -v -race -covermode=atomic -coverprofile=coverage.txt ./... + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/containerd/ttrpc/client.go b/vendor/github.com/containerd/ttrpc/client.go index bdd1d12e7a0..e8169413810 100644 --- a/vendor/github.com/containerd/ttrpc/client.go +++ b/vendor/github.com/containerd/ttrpc/client.go @@ -338,9 +338,12 @@ func filterCloseErr(err error) error { case strings.Contains(err.Error(), "use of closed network connection"): return ErrClosed default: - // if we have an epipe on a write, we cast to errclosed - if oerr, ok := err.(*net.OpError); ok && oerr.Op == "write" { - if serr, ok := oerr.Err.(*os.SyscallError); ok && serr.Err == syscall.EPIPE { + // if we have an epipe on a write or econnreset on a read , we cast to errclosed + if oerr, ok := err.(*net.OpError); ok && (oerr.Op == "write" || oerr.Op == "read") { + serr, sok := oerr.Err.(*os.SyscallError) + if sok && ((serr.Err == syscall.EPIPE && oerr.Op == "write") || + (serr.Err == syscall.ECONNRESET && oerr.Op == "read")) { + return ErrClosed } } diff --git a/vendor/github.com/containerd/ttrpc/go.mod b/vendor/github.com/containerd/ttrpc/go.mod new file mode 100644 index 00000000000..4ed7512f916 --- /dev/null +++ b/vendor/github.com/containerd/ttrpc/go.mod @@ -0,0 +1,14 @@ +module github.com/containerd/ttrpc + +go 1.13 + +require ( + github.com/gogo/protobuf v1.3.1 + github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect + github.com/pkg/errors v0.9.1 + github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1 + github.com/sirupsen/logrus v1.4.2 + golang.org/x/sys v0.0.0-20200120151820-655fe14d7479 + google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24 + google.golang.org/grpc v1.26.0 +) diff --git a/vendor/github.com/containerd/ttrpc/go.sum b/vendor/github.com/containerd/ttrpc/go.sum new file mode 100644 index 00000000000..8f641f4f891 --- /dev/null +++ b/vendor/github.com/containerd/ttrpc/go.sum @@ -0,0 +1,85 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1 h1:Lo6mRUjdS99f3zxYOUalftWHUoOGaDRqFk1+j0Q57/I= +github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5 h1:f005F/Jl5JLP036x7QIvUVhNTqxvSYwFIiyOh2q12iU= +golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479 h1:LhLiKguPgZL+Tglay4GhVtfF0kb8cvOJ0dHTCBO8YNI= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69 h1:4rNOqY4ULrKzS6twXa619uQgI7h9PaVd4ZhjFQ7C5zs= +google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24 h1:wDju+RU97qa0FZT0QnZDg9Uc2dH0Ql513kFvHocz+WM= +google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0 h1:G+97AoqBnmZIT91cLG/EkCoK9NSelj64P8bOHHNmGn0= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/containerd/ttrpc/server.go b/vendor/github.com/containerd/ttrpc/server.go index 1d4f1df653b..c18b4e43b22 100644 --- a/vendor/github.com/containerd/ttrpc/server.go +++ b/vendor/github.com/containerd/ttrpc/server.go @@ -209,6 +209,20 @@ func (s *Server) addConnection(c *serverConn) { s.connections[c] = struct{}{} } +func (s *Server) delConnection(c *serverConn) { + s.mu.Lock() + defer s.mu.Unlock() + + delete(s.connections, c) +} + +func (s *Server) countConnection() int { + s.mu.Lock() + defer s.mu.Unlock() + + return len(s.connections) +} + func (s *Server) closeIdleConns() bool { s.mu.Lock() defer s.mu.Unlock() @@ -313,6 +327,7 @@ func (c *serverConn) run(sctx context.Context) { defer c.conn.Close() defer cancel() defer close(done) + defer c.server.delConnection(c) go func(recvErr chan error) { defer close(recvErr) diff --git a/vendor/github.com/containerd/ttrpc/services.go b/vendor/github.com/containerd/ttrpc/services.go index 0eacfd79aa1..2a83ba88ae8 100644 --- a/vendor/github.com/containerd/ttrpc/services.go +++ b/vendor/github.com/containerd/ttrpc/services.go @@ -21,6 +21,7 @@ import ( "io" "os" "path" + "unsafe" "github.com/gogo/protobuf/proto" "github.com/pkg/errors" @@ -95,6 +96,10 @@ func (s *serviceSet) dispatch(ctx context.Context, serviceName, methodName strin return nil, err } + if isNil(resp) { + return nil, errors.New("ttrpc: marshal called with nil") + } + switch v := resp.(type) { case proto.Message: r, err := proto.Marshal(v) @@ -154,3 +159,7 @@ func convertCode(err error) codes.Code { func fullPath(service, method string) string { return "/" + path.Join(service, method) } + +func isNil(resp interface{}) bool { + return (*[2]uintptr)(unsafe.Pointer(&resp))[1] == 0 +} diff --git a/vendor/github.com/containernetworking/cni/libcni/api.go b/vendor/github.com/containernetworking/cni/libcni/api.go index 0f14d3427e9..7e52bd83873 100644 --- a/vendor/github.com/containernetworking/cni/libcni/api.go +++ b/vendor/github.com/containernetworking/cni/libcni/api.go @@ -25,6 +25,7 @@ import ( "github.com/containernetworking/cni/pkg/invoke" "github.com/containernetworking/cni/pkg/types" + "github.com/containernetworking/cni/pkg/utils" "github.com/containernetworking/cni/pkg/version" ) @@ -32,6 +33,10 @@ var ( CacheDir = "/var/lib/cni" ) +const ( + CNICacheV1 = "cniCacheV1" +) + // A RuntimeConf holds the arguments to one invocation of a CNI plugin // excepting the network configuration, with the nested exception that // the `runtimeConfig` from the network configuration is included @@ -48,7 +53,7 @@ type RuntimeConf struct { // to the plugin CapabilityArgs map[string]interface{} - // A cache directory in which to library data. Defaults to CacheDir + // DEPRECATED. Will be removed in a future release. CacheDir string } @@ -70,19 +75,22 @@ type CNI interface { CheckNetworkList(ctx context.Context, net *NetworkConfigList, rt *RuntimeConf) error DelNetworkList(ctx context.Context, net *NetworkConfigList, rt *RuntimeConf) error GetNetworkListCachedResult(net *NetworkConfigList, rt *RuntimeConf) (types.Result, error) + GetNetworkListCachedConfig(net *NetworkConfigList, rt *RuntimeConf) ([]byte, *RuntimeConf, error) AddNetwork(ctx context.Context, net *NetworkConfig, rt *RuntimeConf) (types.Result, error) CheckNetwork(ctx context.Context, net *NetworkConfig, rt *RuntimeConf) error DelNetwork(ctx context.Context, net *NetworkConfig, rt *RuntimeConf) error GetNetworkCachedResult(net *NetworkConfig, rt *RuntimeConf) (types.Result, error) + GetNetworkCachedConfig(net *NetworkConfig, rt *RuntimeConf) ([]byte, *RuntimeConf, error) ValidateNetworkList(ctx context.Context, net *NetworkConfigList) ([]string, error) ValidateNetwork(ctx context.Context, net *NetworkConfig) ([]string, error) } type CNIConfig struct { - Path []string - exec invoke.Exec + Path []string + exec invoke.Exec + cacheDir string } // CNIConfig implements the CNI interface @@ -92,9 +100,18 @@ var _ CNI = &CNIConfig{} // in the given paths and use the given exec interface to run those plugins, // or if the exec interface is not given, will use a default exec handler. func NewCNIConfig(path []string, exec invoke.Exec) *CNIConfig { + return NewCNIConfigWithCacheDir(path, "", exec) +} + +// NewCNIConfigWithCacheDir returns a new CNIConfig object that will search for plugins +// in the given paths use the given exec interface to run those plugins, +// or if the exec interface is not given, will use a default exec handler. +// The given cache directory will be used for temporary data storage when needed. +func NewCNIConfigWithCacheDir(path []string, cacheDir string, exec invoke.Exec) *CNIConfig { return &CNIConfig{ - Path: path, - exec: exec, + Path: path, + cacheDir: cacheDir, + exec: exec, } } @@ -165,33 +182,122 @@ func (c *CNIConfig) ensureExec() invoke.Exec { return c.exec } -func getResultCacheFilePath(netName string, rt *RuntimeConf) string { - cacheDir := rt.CacheDir - if cacheDir == "" { - cacheDir = CacheDir - } - return filepath.Join(cacheDir, "results", fmt.Sprintf("%s-%s-%s", netName, rt.ContainerID, rt.IfName)) +type cachedInfo struct { + Kind string `json:"kind"` + ContainerID string `json:"containerId"` + Config []byte `json:"config"` + IfName string `json:"ifName"` + NetworkName string `json:"networkName"` + CniArgs [][2]string `json:"cniArgs,omitempty"` + CapabilityArgs map[string]interface{} `json:"capabilityArgs,omitempty"` + RawResult map[string]interface{} `json:"result,omitempty"` + Result types.Result `json:"-"` } -func setCachedResult(result types.Result, netName string, rt *RuntimeConf) error { +// getCacheDir returns the cache directory in this order: +// 1) global cacheDir from CNIConfig object +// 2) deprecated cacheDir from RuntimeConf object +// 3) fall back to default cache directory +func (c *CNIConfig) getCacheDir(rt *RuntimeConf) string { + if c.cacheDir != "" { + return c.cacheDir + } + if rt.CacheDir != "" { + return rt.CacheDir + } + return CacheDir +} + +func (c *CNIConfig) getCacheFilePath(netName string, rt *RuntimeConf) (string, error) { + if netName == "" || rt.ContainerID == "" || rt.IfName == "" { + return "", fmt.Errorf("cache file path requires network name (%q), container ID (%q), and interface name (%q)", netName, rt.ContainerID, rt.IfName) + } + return filepath.Join(c.getCacheDir(rt), "results", fmt.Sprintf("%s-%s-%s", netName, rt.ContainerID, rt.IfName)), nil +} + +func (c *CNIConfig) cacheAdd(result types.Result, config []byte, netName string, rt *RuntimeConf) error { + cached := cachedInfo{ + Kind: CNICacheV1, + ContainerID: rt.ContainerID, + Config: config, + IfName: rt.IfName, + NetworkName: netName, + CniArgs: rt.Args, + CapabilityArgs: rt.CapabilityArgs, + } + + // We need to get type.Result into cachedInfo as JSON map + // Marshal to []byte, then Unmarshal into cached.RawResult data, err := json.Marshal(result) if err != nil { return err } - fname := getResultCacheFilePath(netName, rt) + + err = json.Unmarshal(data, &cached.RawResult) + if err != nil { + return err + } + + newBytes, err := json.Marshal(&cached) + if err != nil { + return err + } + + fname, err := c.getCacheFilePath(netName, rt) + if err != nil { + return err + } if err := os.MkdirAll(filepath.Dir(fname), 0700); err != nil { return err } - return ioutil.WriteFile(fname, data, 0600) + + return ioutil.WriteFile(fname, newBytes, 0600) } -func delCachedResult(netName string, rt *RuntimeConf) error { - fname := getResultCacheFilePath(netName, rt) +func (c *CNIConfig) cacheDel(netName string, rt *RuntimeConf) error { + fname, err := c.getCacheFilePath(netName, rt) + if err != nil { + // Ignore error + return nil + } return os.Remove(fname) } -func getCachedResult(netName, cniVersion string, rt *RuntimeConf) (types.Result, error) { - fname := getResultCacheFilePath(netName, rt) +func (c *CNIConfig) getCachedConfig(netName string, rt *RuntimeConf) ([]byte, *RuntimeConf, error) { + var bytes []byte + + fname, err := c.getCacheFilePath(netName, rt) + if err != nil { + return nil, nil, err + } + bytes, err = ioutil.ReadFile(fname) + if err != nil { + // Ignore read errors; the cached result may not exist on-disk + return nil, nil, nil + } + + unmarshaled := cachedInfo{} + if err := json.Unmarshal(bytes, &unmarshaled); err != nil { + return nil, nil, fmt.Errorf("failed to unmarshal cached network %q config: %v", netName, err) + } + if unmarshaled.Kind != CNICacheV1 { + return nil, nil, fmt.Errorf("read cached network %q config has wrong kind: %v", netName, unmarshaled.Kind) + } + + newRt := *rt + if unmarshaled.CniArgs != nil { + newRt.Args = unmarshaled.CniArgs + } + newRt.CapabilityArgs = unmarshaled.CapabilityArgs + + return unmarshaled.Config, &newRt, nil +} + +func (c *CNIConfig) getLegacyCachedResult(netName, cniVersion string, rt *RuntimeConf) (types.Result, error) { + fname, err := c.getCacheFilePath(netName, rt) + if err != nil { + return nil, err + } data, err := ioutil.ReadFile(fname) if err != nil { // Ignore read errors; the cached result may not exist on-disk @@ -222,16 +328,73 @@ func getCachedResult(netName, cniVersion string, rt *RuntimeConf) (types.Result, return result, err } +func (c *CNIConfig) getCachedResult(netName, cniVersion string, rt *RuntimeConf) (types.Result, error) { + fname, err := c.getCacheFilePath(netName, rt) + if err != nil { + return nil, err + } + fdata, err := ioutil.ReadFile(fname) + if err != nil { + // Ignore read errors; the cached result may not exist on-disk + return nil, nil + } + + cachedInfo := cachedInfo{} + if err := json.Unmarshal(fdata, &cachedInfo); err != nil || cachedInfo.Kind != CNICacheV1 { + return c.getLegacyCachedResult(netName, cniVersion, rt) + } + + newBytes, err := json.Marshal(&cachedInfo.RawResult) + if err != nil { + return nil, fmt.Errorf("failed to marshal cached network %q config: %v", netName, err) + } + + // Read the version of the cached result + decoder := version.ConfigDecoder{} + resultCniVersion, err := decoder.Decode(newBytes) + if err != nil { + return nil, err + } + + // Ensure we can understand the result + result, err := version.NewResult(resultCniVersion, newBytes) + if err != nil { + return nil, err + } + + // Convert to the config version to ensure plugins get prevResult + // in the same version as the config. The cached result version + // should match the config version unless the config was changed + // while the container was running. + result, err = result.GetAsVersion(cniVersion) + if err != nil && resultCniVersion != cniVersion { + return nil, fmt.Errorf("failed to convert cached result version %q to config version %q: %v", resultCniVersion, cniVersion, err) + } + return result, err +} + // GetNetworkListCachedResult returns the cached Result of the previous -// previous AddNetworkList() operation for a network list, or an error. +// AddNetworkList() operation for a network list, or an error. func (c *CNIConfig) GetNetworkListCachedResult(list *NetworkConfigList, rt *RuntimeConf) (types.Result, error) { - return getCachedResult(list.Name, list.CNIVersion, rt) + return c.getCachedResult(list.Name, list.CNIVersion, rt) } // GetNetworkCachedResult returns the cached Result of the previous -// previous AddNetwork() operation for a network, or an error. +// AddNetwork() operation for a network, or an error. func (c *CNIConfig) GetNetworkCachedResult(net *NetworkConfig, rt *RuntimeConf) (types.Result, error) { - return getCachedResult(net.Network.Name, net.Network.CNIVersion, rt) + return c.getCachedResult(net.Network.Name, net.Network.CNIVersion, rt) +} + +// GetNetworkListCachedConfig copies the input RuntimeConf to output +// RuntimeConf with fields updated with info from the cached Config. +func (c *CNIConfig) GetNetworkListCachedConfig(list *NetworkConfigList, rt *RuntimeConf) ([]byte, *RuntimeConf, error) { + return c.getCachedConfig(list.Name, rt) +} + +// GetNetworkCachedConfig copies the input RuntimeConf to output +// RuntimeConf with fields updated with info from the cached Config. +func (c *CNIConfig) GetNetworkCachedConfig(net *NetworkConfig, rt *RuntimeConf) ([]byte, *RuntimeConf, error) { + return c.getCachedConfig(net.Network.Name, rt) } func (c *CNIConfig) addNetwork(ctx context.Context, name, cniVersion string, net *NetworkConfig, prevResult types.Result, rt *RuntimeConf) (types.Result, error) { @@ -240,6 +403,15 @@ func (c *CNIConfig) addNetwork(ctx context.Context, name, cniVersion string, net if err != nil { return nil, err } + if err := utils.ValidateContainerID(rt.ContainerID); err != nil { + return nil, err + } + if err := utils.ValidateNetworkName(name); err != nil { + return nil, err + } + if err := utils.ValidateInterfaceName(rt.IfName); err != nil { + return nil, err + } newConf, err := buildOneConfig(name, cniVersion, net, prevResult, rt) if err != nil { @@ -260,7 +432,7 @@ func (c *CNIConfig) AddNetworkList(ctx context.Context, list *NetworkConfigList, } } - if err = setCachedResult(result, list.Name, rt); err != nil { + if err = c.cacheAdd(result, list.Bytes, list.Name, rt); err != nil { return nil, fmt.Errorf("failed to set network %q cached result: %v", list.Name, err) } @@ -295,7 +467,7 @@ func (c *CNIConfig) CheckNetworkList(ctx context.Context, list *NetworkConfigLis return nil } - cachedResult, err := getCachedResult(list.Name, list.CNIVersion, rt) + cachedResult, err := c.getCachedResult(list.Name, list.CNIVersion, rt) if err != nil { return fmt.Errorf("failed to get network %q cached result: %v", list.Name, err) } @@ -332,7 +504,7 @@ func (c *CNIConfig) DelNetworkList(ctx context.Context, list *NetworkConfigList, if gtet, err := version.GreaterThanOrEqualTo(list.CNIVersion, "0.4.0"); err != nil { return err } else if gtet { - cachedResult, err = getCachedResult(list.Name, list.CNIVersion, rt) + cachedResult, err = c.getCachedResult(list.Name, list.CNIVersion, rt) if err != nil { return fmt.Errorf("failed to get network %q cached result: %v", list.Name, err) } @@ -344,7 +516,7 @@ func (c *CNIConfig) DelNetworkList(ctx context.Context, list *NetworkConfigList, return err } } - _ = delCachedResult(list.Name, rt) + _ = c.cacheDel(list.Name, rt) return nil } @@ -356,7 +528,7 @@ func (c *CNIConfig) AddNetwork(ctx context.Context, net *NetworkConfig, rt *Runt return nil, err } - if err = setCachedResult(result, net.Network.Name, rt); err != nil { + if err = c.cacheAdd(result, net.Bytes, net.Network.Name, rt); err != nil { return nil, fmt.Errorf("failed to set network %q cached result: %v", net.Network.Name, err) } @@ -372,7 +544,7 @@ func (c *CNIConfig) CheckNetwork(ctx context.Context, net *NetworkConfig, rt *Ru return fmt.Errorf("configuration version %q does not support the CHECK command", net.Network.CNIVersion) } - cachedResult, err := getCachedResult(net.Network.Name, net.Network.CNIVersion, rt) + cachedResult, err := c.getCachedResult(net.Network.Name, net.Network.CNIVersion, rt) if err != nil { return fmt.Errorf("failed to get network %q cached result: %v", net.Network.Name, err) } @@ -387,7 +559,7 @@ func (c *CNIConfig) DelNetwork(ctx context.Context, net *NetworkConfig, rt *Runt if gtet, err := version.GreaterThanOrEqualTo(net.Network.CNIVersion, "0.4.0"); err != nil { return err } else if gtet { - cachedResult, err = getCachedResult(net.Network.Name, net.Network.CNIVersion, rt) + cachedResult, err = c.getCachedResult(net.Network.Name, net.Network.CNIVersion, rt) if err != nil { return fmt.Errorf("failed to get network %q cached result: %v", net.Network.Name, err) } @@ -396,7 +568,7 @@ func (c *CNIConfig) DelNetwork(ctx context.Context, net *NetworkConfig, rt *Runt if err := c.delNetwork(ctx, net.Network.Name, net.Network.CNIVersion, net, cachedResult, rt); err != nil { return err } - _ = delCachedResult(net.Network.Name, rt) + _ = c.cacheDel(net.Network.Name, rt) return nil } @@ -455,10 +627,14 @@ func (c *CNIConfig) ValidateNetwork(ctx context.Context, net *NetworkConfig) ([] // validatePlugin checks that an individual plugin's configuration is sane func (c *CNIConfig) validatePlugin(ctx context.Context, pluginName, expectedVersion string) error { - pluginPath, err := invoke.FindInPath(pluginName, c.Path) + c.ensureExec() + pluginPath, err := c.exec.FindInPath(pluginName, c.Path) if err != nil { return err } + if expectedVersion == "" { + expectedVersion = "0.1.0" + } vi, err := invoke.GetVersionInfo(ctx, pluginPath, c.exec) if err != nil { diff --git a/vendor/github.com/containernetworking/cni/libcni/conf.go b/vendor/github.com/containernetworking/cni/libcni/conf.go index ea56c509d01..d8920cf8cd5 100644 --- a/vendor/github.com/containernetworking/cni/libcni/conf.go +++ b/vendor/github.com/containernetworking/cni/libcni/conf.go @@ -114,11 +114,11 @@ func ConfListFromBytes(bytes []byte) (*NetworkConfigList, error) { for i, conf := range plugins { newBytes, err := json.Marshal(conf) if err != nil { - return nil, fmt.Errorf("Failed to marshal plugin config %d: %v", i, err) + return nil, fmt.Errorf("failed to marshal plugin config %d: %v", i, err) } netConf, err := ConfFromBytes(newBytes) if err != nil { - return nil, fmt.Errorf("Failed to parse plugin config %d: %v", i, err) + return nil, fmt.Errorf("failed to parse plugin config %d: %v", i, err) } list.Plugins = append(list.Plugins, netConf) } diff --git a/vendor/github.com/containernetworking/cni/pkg/invoke/args.go b/vendor/github.com/containernetworking/cni/pkg/invoke/args.go index 913528c1d59..3cdb4bc8dad 100644 --- a/vendor/github.com/containernetworking/cni/pkg/invoke/args.go +++ b/vendor/github.com/containernetworking/cni/pkg/invoke/args.go @@ -32,7 +32,7 @@ type inherited struct{} var inheritArgsFromEnv inherited -func (_ *inherited) AsEnv() []string { +func (*inherited) AsEnv() []string { return nil } @@ -60,8 +60,8 @@ func (args *Args) AsEnv() []string { pluginArgsStr = stringify(args.PluginArgs) } - // Duplicated values which come first will be overrided, so we must put the - // custom values in the end to avoid being overrided by the process environments. + // Duplicated values which come first will be overridden, so we must put the + // custom values in the end to avoid being overridden by the process environments. env = append(env, "CNI_COMMAND="+args.Command, "CNI_CONTAINERID="+args.ContainerID, diff --git a/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go b/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go index ad8498ba27d..5ab5cc88576 100644 --- a/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go +++ b/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go @@ -21,6 +21,8 @@ import ( "fmt" "io" "os/exec" + "strings" + "time" "github.com/containernetworking/cni/pkg/types" ) @@ -31,30 +33,54 @@ type RawExec struct { func (e *RawExec) ExecPlugin(ctx context.Context, pluginPath string, stdinData []byte, environ []string) ([]byte, error) { stdout := &bytes.Buffer{} + stderr := &bytes.Buffer{} c := exec.CommandContext(ctx, pluginPath) c.Env = environ c.Stdin = bytes.NewBuffer(stdinData) c.Stdout = stdout - c.Stderr = e.Stderr - if err := c.Run(); err != nil { - return nil, pluginErr(err, stdout.Bytes()) + c.Stderr = stderr + + // Retry the command on "text file busy" errors + for i := 0; i <= 5; i++ { + err := c.Run() + + // Command succeeded + if err == nil { + break + } + + // If the plugin is currently about to be written, then we wait a + // second and try it again + if strings.Contains(err.Error(), "text file busy") { + time.Sleep(time.Second) + continue + } + + // All other errors except than the busy text file + return nil, e.pluginErr(err, stdout.Bytes(), stderr.Bytes()) } + // Copy stderr to caller's buffer in case plugin printed to both + // stdout and stderr for some reason. Ignore failures as stderr is + // only informational. + if e.Stderr != nil && stderr.Len() > 0 { + _, _ = stderr.WriteTo(e.Stderr) + } return stdout.Bytes(), nil } -func pluginErr(err error, output []byte) error { - if _, ok := err.(*exec.ExitError); ok { - emsg := types.Error{} - if len(output) == 0 { - emsg.Msg = "netplugin failed with no error message" - } else if perr := json.Unmarshal(output, &emsg); perr != nil { - emsg.Msg = fmt.Sprintf("netplugin failed but error parsing its diagnostic message %q: %v", string(output), perr) +func (e *RawExec) pluginErr(err error, stdout, stderr []byte) error { + emsg := types.Error{} + if len(stdout) == 0 { + if len(stderr) == 0 { + emsg.Msg = fmt.Sprintf("netplugin failed with no error message: %v", err) + } else { + emsg.Msg = fmt.Sprintf("netplugin failed: %q", string(stderr)) } - return &emsg + } else if perr := json.Unmarshal(stdout, &emsg); perr != nil { + emsg.Msg = fmt.Sprintf("netplugin failed but error parsing its diagnostic message %q: %v", string(stdout), perr) } - - return err + return &emsg } func (e *RawExec) FindInPath(plugin string, paths []string) (string, error) { diff --git a/vendor/github.com/containernetworking/cni/pkg/types/020/types.go b/vendor/github.com/containernetworking/cni/pkg/types/020/types.go index 53256167fad..36f31678a8e 100644 --- a/vendor/github.com/containernetworking/cni/pkg/types/020/types.go +++ b/vendor/github.com/containernetworking/cni/pkg/types/020/types.go @@ -86,20 +86,6 @@ func (r *Result) PrintTo(writer io.Writer) error { return err } -// String returns a formatted string in the form of "[IP4: $1,][ IP6: $2,] DNS: $3" where -// $1 represents the receiver's IPv4, $2 represents the receiver's IPv6 and $3 the -// receiver's DNS. If $1 or $2 are nil, they won't be present in the returned string. -func (r *Result) String() string { - var str string - if r.IP4 != nil { - str = fmt.Sprintf("IP4:%+v, ", *r.IP4) - } - if r.IP6 != nil { - str += fmt.Sprintf("IP6:%+v, ", *r.IP6) - } - return fmt.Sprintf("%sDNS:%+v", str, r.DNS) -} - // IPConfig contains values necessary to configure an interface type IPConfig struct { IP net.IPNet diff --git a/vendor/github.com/containernetworking/cni/pkg/types/args.go b/vendor/github.com/containernetworking/cni/pkg/types/args.go index bd8640fc969..4eac6489947 100644 --- a/vendor/github.com/containernetworking/cni/pkg/types/args.go +++ b/vendor/github.com/containernetworking/cni/pkg/types/args.go @@ -36,7 +36,7 @@ func (b *UnmarshallableBool) UnmarshalText(data []byte) error { case "0", "false": *b = false default: - return fmt.Errorf("Boolean unmarshal error: invalid input %s", s) + return fmt.Errorf("boolean unmarshal error: invalid input %s", s) } return nil } diff --git a/vendor/github.com/containernetworking/cni/pkg/types/current/types.go b/vendor/github.com/containernetworking/cni/pkg/types/current/types.go index 7267a2e6d1f..754cc6e722e 100644 --- a/vendor/github.com/containernetworking/cni/pkg/types/current/types.go +++ b/vendor/github.com/containernetworking/cni/pkg/types/current/types.go @@ -207,23 +207,6 @@ func (r *Result) PrintTo(writer io.Writer) error { return err } -// String returns a formatted string in the form of "[Interfaces: $1,][ IP: $2,] DNS: $3" where -// $1 represents the receiver's Interfaces, $2 represents the receiver's IP addresses and $3 the -// receiver's DNS. If $1 or $2 are nil, they won't be present in the returned string. -func (r *Result) String() string { - var str string - if len(r.Interfaces) > 0 { - str += fmt.Sprintf("Interfaces:%+v, ", r.Interfaces) - } - if len(r.IPs) > 0 { - str += fmt.Sprintf("IP:%+v, ", r.IPs) - } - if len(r.Routes) > 0 { - str += fmt.Sprintf("Routes:%+v, ", r.Routes) - } - return fmt.Sprintf("%sDNS:%+v", str, r.DNS) -} - // Convert this old version result to the current CNI version result func (r *Result) Convert() (*Result, error) { return r, nil diff --git a/vendor/github.com/containernetworking/cni/pkg/types/types.go b/vendor/github.com/containernetworking/cni/pkg/types/types.go index d0d11006a05..3fa757a5d22 100644 --- a/vendor/github.com/containernetworking/cni/pkg/types/types.go +++ b/vendor/github.com/containernetworking/cni/pkg/types/types.go @@ -16,7 +16,6 @@ package types import ( "encoding/json" - "errors" "fmt" "io" "net" @@ -101,9 +100,6 @@ type Result interface { // Prints the result in JSON format to provided writer PrintTo(writer io.Writer) error - - // Returns a JSON string representation of the result - String() string } func PrintResult(result Result, version string) error { @@ -134,9 +130,16 @@ func (r *Route) String() string { // Well known error codes // see https://github.com/containernetworking/cni/blob/master/SPEC.md#well-known-error-codes const ( - ErrUnknown uint = iota // 0 - ErrIncompatibleCNIVersion // 1 - ErrUnsupportedField // 2 + ErrUnknown uint = iota // 0 + ErrIncompatibleCNIVersion // 1 + ErrUnsupportedField // 2 + ErrUnknownContainer // 3 + ErrInvalidEnvironmentVariables // 4 + ErrIOFailure // 5 + ErrDecodingFailure // 6 + ErrInvalidNetworkConfig // 7 + ErrTryAgainLater uint = 11 + ErrInternal uint = 999 ) type Error struct { @@ -145,6 +148,14 @@ type Error struct { Details string `json:"details,omitempty"` } +func NewError(code uint, msg, details string) *Error { + return &Error{ + Code: code, + Msg: msg, + Details: details, + } +} + func (e *Error) Error() string { details := "" if e.Details != "" { @@ -194,6 +205,3 @@ func prettyPrint(obj interface{}) error { _, err = os.Stdout.Write(data) return err } - -// NotImplementedError is used to indicate that a method is not implemented for the given platform -var NotImplementedError = errors.New("Not Implemented") diff --git a/vendor/github.com/containernetworking/cni/pkg/utils/utils.go b/vendor/github.com/containernetworking/cni/pkg/utils/utils.go new file mode 100644 index 00000000000..b8ec3887459 --- /dev/null +++ b/vendor/github.com/containernetworking/cni/pkg/utils/utils.go @@ -0,0 +1,84 @@ +// Copyright 2019 CNI 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 utils + +import ( + "bytes" + "fmt" + "regexp" + "unicode" + + "github.com/containernetworking/cni/pkg/types" +) + +const ( + // cniValidNameChars is the regexp used to validate valid characters in + // containerID and networkName + cniValidNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.\-]` + + // maxInterfaceNameLength is the length max of a valid interface name + maxInterfaceNameLength = 15 +) + +var cniReg = regexp.MustCompile(`^` + cniValidNameChars + `*$`) + +// ValidateContainerID will validate that the supplied containerID is not empty does not contain invalid characters +func ValidateContainerID(containerID string) *types.Error { + + if containerID == "" { + return types.NewError(types.ErrUnknownContainer, "missing containerID", "") + } + if !cniReg.MatchString(containerID) { + return types.NewError(types.ErrInvalidEnvironmentVariables, "invalid characters in containerID", containerID) + } + return nil +} + +// ValidateNetworkName will validate that the supplied networkName does not contain invalid characters +func ValidateNetworkName(networkName string) *types.Error { + + if networkName == "" { + return types.NewError(types.ErrInvalidNetworkConfig, "missing network name:", "") + } + if !cniReg.MatchString(networkName) { + return types.NewError(types.ErrInvalidNetworkConfig, "invalid characters found in network name", networkName) + } + return nil +} + +// ValidateInterfaceName will validate the interface name based on the three rules below +// 1. The name must not be empty +// 2. The name must be less than 16 characters +// 3. The name must not be "." or ".." +// 3. The name must not contain / or : or any whitespace characters +// ref to https://github.com/torvalds/linux/blob/master/net/core/dev.c#L1024 +func ValidateInterfaceName(ifName string) *types.Error { + if len(ifName) == 0 { + return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name is empty", "") + } + if len(ifName) > maxInterfaceNameLength { + return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name is too long", fmt.Sprintf("interface name should be less than %d characters", maxInterfaceNameLength+1)) + } + if ifName == "." || ifName == ".." { + return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name is . or ..", "") + } + for _, r := range bytes.Runes([]byte(ifName)) { + if r == '/' || r == ':' || unicode.IsSpace(r) { + return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name contains / or : or whitespace characters", "") + } + } + + return nil +} diff --git a/vendor/github.com/containers/ocicrypt/CODE-OF-CONDUCT.md b/vendor/github.com/containers/ocicrypt/CODE-OF-CONDUCT.md new file mode 100644 index 00000000000..5131b5a371e --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/CODE-OF-CONDUCT.md @@ -0,0 +1,3 @@ +## The OCIcrypt Library Project Community Code of Conduct + +The OCIcrypt Library project follows the [Containers Community Code of Conduct](https://github.com/containers/common/blob/master/CODE-OF-CONDUCT.md). diff --git a/vendor/github.com/opencontainers/go-digest/LICENSE.code b/vendor/github.com/containers/ocicrypt/LICENSE similarity index 99% rename from vendor/github.com/opencontainers/go-digest/LICENSE.code rename to vendor/github.com/containers/ocicrypt/LICENSE index 0ea3ff81e3f..95356353060 100644 --- a/vendor/github.com/opencontainers/go-digest/LICENSE.code +++ b/vendor/github.com/containers/ocicrypt/LICENSE @@ -176,8 +176,6 @@ END OF TERMS AND CONDITIONS - Copyright 2016 Docker, Inc. - 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 diff --git a/vendor/github.com/containers/ocicrypt/MAINTAINERS b/vendor/github.com/containers/ocicrypt/MAINTAINERS new file mode 100644 index 00000000000..e6a7d1f0a7d --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/MAINTAINERS @@ -0,0 +1,5 @@ +# ocicrypt maintainers +# +# Github ID, Name, Email Address +lumjjb, Brandon Lum, lumjjb@gmail.com +stefanberger, Stefan Berger, stefanb@linux.ibm.com diff --git a/vendor/github.com/containers/ocicrypt/Makefile b/vendor/github.com/containers/ocicrypt/Makefile new file mode 100644 index 00000000000..49fa80d7454 --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/Makefile @@ -0,0 +1,31 @@ +# Copyright The containerd 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. + +.PHONY: check build decoder + +all: build + +FORCE: + +check: + golangci-lint run + +build: vendor + go build ./... + +vendor: + go mod tidy + +test: + go test ./... diff --git a/vendor/github.com/containers/ocicrypt/README.md b/vendor/github.com/containers/ocicrypt/README.md new file mode 100644 index 00000000000..ec5ae5b35a8 --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/README.md @@ -0,0 +1,32 @@ +# OCIcrypt Library + +The `ocicrypt` library is the OCI image spec implementation of container image encryption. More details of the spec can be seen in the [OCI repository](https://github.com/opencontainers/image-spec/pull/775). The purpose of this library is to encode spec structures and consts in code, as well as provide a consistent implementation of image encryption across container runtimes and build tools. + +## Usage + +There are various levels of usage for this library. The main consumers of these would be runtime/buil tools, and a more specific use would be in the ability to extend cryptographic function. + +### Runtime/Build tool usage + +The general exposed interface a runtime/build tool would use, would be to perform encryption or decryption of layers: + +``` +package "github.com/containers/ocicrypt" +func EncryptLayer(ec *config.EncryptConfig, encOrPlainLayerReader io.Reader, desc ocispec.Descriptor) (io.Reader, EncryptLayerFinalizer, error) +func DecryptLayer(dc *config.DecryptConfig, encLayerReader io.Reader, desc ocispec.Descriptor, unwrapOnly bool) (io.Reader, digest.Digest, error) +``` + +The settings/parameters to these functions can be specified via creation of an encryption config with the `github.com/containers/ocicrypt/config` package. We note that because setting of annotations and other fields of the layer descriptor is done through various means in different runtimes/build tools, it is the resposibility of the caller to still ensure that the layer descriptor follows the OCI specification (i.e. encoding, setting annotations, etc.). + + +### Crypto Agility and Extensibility + +The implementation for both symmetric and assymetric encryption used in this library are behind 2 main interfaces, which users can extend if need be. These are in the following packages: +- github.com/containers/ocicrypt/blockcipher - LayerBlockCipher interface for block ciphers +- github.com/containers/ocicrypt/keywrap - KeyWrapper interface for key wrapping + +We note that adding interfaces here is risky outside the OCI spec is not recommended, unless for very specialized and confined usecases. Please open an issue or PR if there is a general usecase that could be added to the OCI spec. + +## Security Issues + +We consider security issues related to this library critical. Please report and security related issues by emailing maintainers in the [MAINTAINERS](MAINTAINERS) file. diff --git a/vendor/github.com/containers/ocicrypt/blockcipher/blockcipher.go b/vendor/github.com/containers/ocicrypt/blockcipher/blockcipher.go new file mode 100644 index 00000000000..da403d95dad --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/blockcipher/blockcipher.go @@ -0,0 +1,160 @@ +/* + Copyright The ocicrypt 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 blockcipher + +import ( + "io" + + "github.com/opencontainers/go-digest" + "github.com/pkg/errors" +) + +// LayerCipherType is the ciphertype as specified in the layer metadata +type LayerCipherType string + +// TODO: Should be obtained from OCI spec once included +const ( + AES256CTR LayerCipherType = "AES_256_CTR_HMAC_SHA256" +) + +// PrivateLayerBlockCipherOptions includes the information required to encrypt/decrypt +// an image which are sensitive and should not be in plaintext +type PrivateLayerBlockCipherOptions struct { + // SymmetricKey represents the symmetric key used for encryption/decryption + // This field should be populated by Encrypt/Decrypt calls + SymmetricKey []byte `json:"symkey"` + + // Digest is the digest of the original data for verification. + // This is NOT populated by Encrypt/Decrypt calls + Digest digest.Digest `json:"digest"` + + // CipherOptions contains the cipher metadata used for encryption/decryption + // This field should be populated by Encrypt/Decrypt calls + CipherOptions map[string][]byte `json:"cipheroptions"` +} + +// PublicLayerBlockCipherOptions includes the information required to encrypt/decrypt +// an image which are public and can be deduplicated in plaintext across multiple +// recipients +type PublicLayerBlockCipherOptions struct { + // CipherType denotes the cipher type according to the list of OCI suppported + // cipher types. + CipherType LayerCipherType `json:"cipher"` + + // Hmac contains the hmac string to help verify encryption + Hmac []byte `json:"hmac"` + + // CipherOptions contains the cipher metadata used for encryption/decryption + // This field should be populated by Encrypt/Decrypt calls + CipherOptions map[string][]byte `json:"cipheroptions"` +} + +// LayerBlockCipherOptions contains the public and private LayerBlockCipherOptions +// required to encrypt/decrypt an image +type LayerBlockCipherOptions struct { + Public PublicLayerBlockCipherOptions + Private PrivateLayerBlockCipherOptions +} + +// LayerBlockCipher returns a provider for encrypt/decrypt functionality +// for handling the layer data for a specific algorithm +type LayerBlockCipher interface { + // GenerateKey creates a symmetric key + GenerateKey() ([]byte, error) + // Encrypt takes in layer data and returns the ciphertext and relevant LayerBlockCipherOptions + Encrypt(layerDataReader io.Reader, opt LayerBlockCipherOptions) (io.Reader, Finalizer, error) + // Decrypt takes in layer ciphertext data and returns the plaintext and relevant LayerBlockCipherOptions + Decrypt(layerDataReader io.Reader, opt LayerBlockCipherOptions) (io.Reader, LayerBlockCipherOptions, error) +} + +// LayerBlockCipherHandler is the handler for encrypt/decrypt for layers +type LayerBlockCipherHandler struct { + cipherMap map[LayerCipherType]LayerBlockCipher +} + +// Finalizer is called after data blobs are written, and returns the LayerBlockCipherOptions for the encrypted blob +type Finalizer func() (LayerBlockCipherOptions, error) + +// GetOpt returns the value of the cipher option and if the option exists +func (lbco LayerBlockCipherOptions) GetOpt(key string) (value []byte, ok bool) { + if v, ok := lbco.Public.CipherOptions[key]; ok { + return v, ok + } else if v, ok := lbco.Private.CipherOptions[key]; ok { + return v, ok + } else { + return nil, false + } +} + +func wrapFinalizerWithType(fin Finalizer, typ LayerCipherType) Finalizer { + return func() (LayerBlockCipherOptions, error) { + lbco, err := fin() + if err != nil { + return LayerBlockCipherOptions{}, err + } + lbco.Public.CipherType = typ + return lbco, err + } +} + +// Encrypt is the handler for the layer decryption routine +func (h *LayerBlockCipherHandler) Encrypt(plainDataReader io.Reader, typ LayerCipherType) (io.Reader, Finalizer, error) { + if c, ok := h.cipherMap[typ]; ok { + sk, err := c.GenerateKey() + if err != nil { + return nil, nil, err + } + opt := LayerBlockCipherOptions{ + Private: PrivateLayerBlockCipherOptions{ + SymmetricKey: sk, + }, + } + encDataReader, fin, err := c.Encrypt(plainDataReader, opt) + if err == nil { + fin = wrapFinalizerWithType(fin, typ) + } + return encDataReader, fin, err + } + return nil, nil, errors.Errorf("unsupported cipher type: %s", typ) +} + +// Decrypt is the handler for the layer decryption routine +func (h *LayerBlockCipherHandler) Decrypt(encDataReader io.Reader, opt LayerBlockCipherOptions) (io.Reader, LayerBlockCipherOptions, error) { + typ := opt.Public.CipherType + if typ == "" { + return nil, LayerBlockCipherOptions{}, errors.New("no cipher type provided") + } + if c, ok := h.cipherMap[LayerCipherType(typ)]; ok { + return c.Decrypt(encDataReader, opt) + } + return nil, LayerBlockCipherOptions{}, errors.Errorf("unsupported cipher type: %s", typ) +} + +// NewLayerBlockCipherHandler returns a new default handler +func NewLayerBlockCipherHandler() (*LayerBlockCipherHandler, error) { + h := LayerBlockCipherHandler{ + cipherMap: map[LayerCipherType]LayerBlockCipher{}, + } + + var err error + h.cipherMap[AES256CTR], err = NewAESCTRLayerBlockCipher(256) + if err != nil { + return nil, errors.Wrap(err, "unable to set up Cipher AES-256-CTR") + } + + return &h, nil +} diff --git a/vendor/github.com/containers/ocicrypt/blockcipher/blockcipher_aes_ctr.go b/vendor/github.com/containers/ocicrypt/blockcipher/blockcipher_aes_ctr.go new file mode 100644 index 00000000000..095a53e354d --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/blockcipher/blockcipher_aes_ctr.go @@ -0,0 +1,193 @@ +/* + Copyright The ocicrypt 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 blockcipher + +import ( + "crypto/aes" + "crypto/cipher" + "crypto/hmac" + "crypto/rand" + "crypto/sha256" + "fmt" + "hash" + "io" + + "github.com/containers/ocicrypt/utils" + "github.com/pkg/errors" +) + +// AESCTRLayerBlockCipher implements the AES CTR stream cipher +type AESCTRLayerBlockCipher struct { + keylen int // in bytes + reader io.Reader + encrypt bool + stream cipher.Stream + err error + hmac hash.Hash + expHmac []byte + doneEncrypting bool +} + +type aesctrcryptor struct { + bc *AESCTRLayerBlockCipher +} + +// NewAESCTRLayerBlockCipher returns a new AES SIV block cipher of 256 or 512 bits +func NewAESCTRLayerBlockCipher(bits int) (LayerBlockCipher, error) { + if bits != 256 { + return nil, errors.New("AES CTR bit count not supported") + } + return &AESCTRLayerBlockCipher{keylen: bits / 8}, nil +} + +func (r *aesctrcryptor) Read(p []byte) (int, error) { + var ( + o int + ) + + if r.bc.err != nil { + return 0, r.bc.err + } + + o, err := utils.FillBuffer(r.bc.reader, p) + if err != nil { + if err == io.EOF { + r.bc.err = err + } else { + return 0, err + } + } + + if !r.bc.encrypt { + if _, err := r.bc.hmac.Write(p[:o]); err != nil { + r.bc.err = errors.Wrapf(err, "could not write to hmac") + return 0, r.bc.err + } + + if r.bc.err == io.EOF { + // Before we return EOF we let the HMAC comparison + // provide a verdict + if !hmac.Equal(r.bc.hmac.Sum(nil), r.bc.expHmac) { + r.bc.err = fmt.Errorf("could not properly decrypt byte stream; exp hmac: '%x', actual hmac: '%s'", r.bc.expHmac, r.bc.hmac.Sum(nil)) + return 0, r.bc.err + } + } + } + + r.bc.stream.XORKeyStream(p[:o], p[:o]) + + if r.bc.encrypt { + if _, err := r.bc.hmac.Write(p[:o]); err != nil { + r.bc.err = errors.Wrapf(err, "could not write to hmac") + return 0, r.bc.err + } + + if r.bc.err == io.EOF { + // Final data encrypted; Do the 'then-MAC' part + r.bc.doneEncrypting = true + } + } + + return o, r.bc.err +} + +// init initializes an instance +func (bc *AESCTRLayerBlockCipher) init(encrypt bool, reader io.Reader, opts LayerBlockCipherOptions) (LayerBlockCipherOptions, error) { + var ( + err error + ) + + key := opts.Private.SymmetricKey + if len(key) != bc.keylen { + return LayerBlockCipherOptions{}, fmt.Errorf("invalid key length of %d bytes; need %d bytes", len(key), bc.keylen) + } + + nonce, ok := opts.GetOpt("nonce") + if !ok { + nonce = make([]byte, aes.BlockSize) + if _, err := io.ReadFull(rand.Reader, nonce); err != nil { + return LayerBlockCipherOptions{}, errors.Wrap(err, "unable to generate random nonce") + } + } + + block, err := aes.NewCipher(key) + if err != nil { + return LayerBlockCipherOptions{}, errors.Wrap(err, "aes.NewCipher failed") + } + + bc.reader = reader + bc.encrypt = encrypt + bc.stream = cipher.NewCTR(block, nonce) + bc.err = nil + bc.hmac = hmac.New(sha256.New, key) + bc.expHmac = opts.Public.Hmac + bc.doneEncrypting = false + + if !encrypt && len(bc.expHmac) == 0 { + return LayerBlockCipherOptions{}, errors.New("HMAC is not provided for decryption process") + } + + lbco := LayerBlockCipherOptions{ + Private: PrivateLayerBlockCipherOptions{ + SymmetricKey: key, + CipherOptions: map[string][]byte{ + "nonce": nonce, + }, + }, + } + + return lbco, nil +} + +// GenerateKey creates a synmmetric key +func (bc *AESCTRLayerBlockCipher) GenerateKey() ([]byte, error) { + key := make([]byte, bc.keylen) + if _, err := io.ReadFull(rand.Reader, key); err != nil { + return nil, err + } + return key, nil +} + +// Encrypt takes in layer data and returns the ciphertext and relevant LayerBlockCipherOptions +func (bc *AESCTRLayerBlockCipher) Encrypt(plainDataReader io.Reader, opt LayerBlockCipherOptions) (io.Reader, Finalizer, error) { + lbco, err := bc.init(true, plainDataReader, opt) + if err != nil { + return nil, nil, err + } + + finalizer := func() (LayerBlockCipherOptions, error) { + if !bc.doneEncrypting { + return LayerBlockCipherOptions{}, errors.New("Read()ing not complete, unable to finalize") + } + if lbco.Public.CipherOptions == nil { + lbco.Public.CipherOptions = map[string][]byte{} + } + lbco.Public.Hmac = bc.hmac.Sum(nil) + return lbco, nil + } + return &aesctrcryptor{bc}, finalizer, nil +} + +// Decrypt takes in layer ciphertext data and returns the plaintext and relevant LayerBlockCipherOptions +func (bc *AESCTRLayerBlockCipher) Decrypt(encDataReader io.Reader, opt LayerBlockCipherOptions) (io.Reader, LayerBlockCipherOptions, error) { + lbco, err := bc.init(false, encDataReader, opt) + if err != nil { + return nil, LayerBlockCipherOptions{}, err + } + + return utils.NewDelayedReader(&aesctrcryptor{bc}, 1024*10), lbco, nil +} diff --git a/vendor/github.com/containers/ocicrypt/config/config.go b/vendor/github.com/containers/ocicrypt/config/config.go new file mode 100644 index 00000000000..d960766ebee --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/config/config.go @@ -0,0 +1,114 @@ +/* + Copyright The ocicrypt 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 config + +// EncryptConfig is the container image PGP encryption configuration holding +// the identifiers of those that will be able to decrypt the container and +// the PGP public keyring file data that contains their public keys. +type EncryptConfig struct { + // map holding 'gpg-recipients', 'gpg-pubkeyringfile', 'pubkeys', 'x509s' + Parameters map[string][][]byte + + DecryptConfig DecryptConfig +} + +// DecryptConfig wraps the Parameters map that holds the decryption key +type DecryptConfig struct { + // map holding 'privkeys', 'x509s', 'gpg-privatekeys' + Parameters map[string][][]byte +} + +// CryptoConfig is a common wrapper for EncryptConfig and DecrypConfig that can +// be passed through functions that share much code for encryption and decryption +type CryptoConfig struct { + EncryptConfig *EncryptConfig + DecryptConfig *DecryptConfig +} + +// InitDecryption initialized a CryptoConfig object with parameters used for decryption +func InitDecryption(dcparameters map[string][][]byte) CryptoConfig { + return CryptoConfig{ + DecryptConfig: &DecryptConfig{ + Parameters: dcparameters, + }, + } +} + +// InitEncryption initializes a CryptoConfig object with parameters used for encryption +// It also takes dcparameters that may be needed for decryption when adding a recipient +// to an already encrypted image +func InitEncryption(parameters, dcparameters map[string][][]byte) CryptoConfig { + return CryptoConfig{ + EncryptConfig: &EncryptConfig{ + Parameters: parameters, + DecryptConfig: DecryptConfig{ + Parameters: dcparameters, + }, + }, + } +} + +// CombineCryptoConfigs takes a CryptoConfig list and creates a single CryptoConfig +// containing the crypto configuration of all the key bundles +func CombineCryptoConfigs(ccs []CryptoConfig) CryptoConfig { + ecparam := map[string][][]byte{} + ecdcparam := map[string][][]byte{} + dcparam := map[string][][]byte{} + + for _, cc := range ccs { + if ec := cc.EncryptConfig; ec != nil { + addToMap(ecparam, ec.Parameters) + addToMap(ecdcparam, ec.DecryptConfig.Parameters) + } + + if dc := cc.DecryptConfig; dc != nil { + addToMap(dcparam, dc.Parameters) + } + } + + return CryptoConfig{ + EncryptConfig: &EncryptConfig{ + Parameters: ecparam, + DecryptConfig: DecryptConfig{ + Parameters: ecdcparam, + }, + }, + DecryptConfig: &DecryptConfig{ + Parameters: dcparam, + }, + } + +} + +// AttachDecryptConfig adds DecryptConfig to the field of EncryptConfig so that +// the decryption parameters can be used to add recipients to an existing image +// if the user is able to decrypt it. +func (ec *EncryptConfig) AttachDecryptConfig(dc *DecryptConfig) { + if dc != nil { + addToMap(ec.DecryptConfig.Parameters, dc.Parameters) + } +} + +func addToMap(orig map[string][][]byte, add map[string][][]byte) { + for k, v := range add { + if ov, ok := orig[k]; ok { + orig[k] = append(ov, v...) + } else { + orig[k] = v + } + } +} diff --git a/vendor/github.com/containers/ocicrypt/config/constructors.go b/vendor/github.com/containers/ocicrypt/config/constructors.go new file mode 100644 index 00000000000..44adcdb35ee --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/config/constructors.go @@ -0,0 +1,134 @@ +/* + Copyright The ocicrypt 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 config + +import ( + "github.com/pkg/errors" +) + +// EncryptWithJwe returns a CryptoConfig to encrypt with jwe public keys +func EncryptWithJwe(pubKeys [][]byte) (CryptoConfig, error) { + dc := DecryptConfig{} + ep := map[string][][]byte{ + "pubkeys": pubKeys, + } + + return CryptoConfig{ + EncryptConfig: &EncryptConfig{ + Parameters: ep, + DecryptConfig: dc, + }, + DecryptConfig: &dc, + }, nil +} + +// EncryptWithPkcs7 returns a CryptoConfig to encrypt with pkcs7 x509 certs +func EncryptWithPkcs7(x509s [][]byte) (CryptoConfig, error) { + dc := DecryptConfig{} + + ep := map[string][][]byte{ + "x509s": x509s, + } + + return CryptoConfig{ + EncryptConfig: &EncryptConfig{ + Parameters: ep, + DecryptConfig: dc, + }, + DecryptConfig: &dc, + }, nil +} + +// EncryptWithGpg returns a CryptoConfig to encrypt with configured gpg parameters +func EncryptWithGpg(gpgRecipients [][]byte, gpgPubRingFile []byte) (CryptoConfig, error) { + dc := DecryptConfig{} + ep := map[string][][]byte{ + "gpg-recipients": gpgRecipients, + "gpg-pubkeyringfile": {gpgPubRingFile}, + } + + return CryptoConfig{ + EncryptConfig: &EncryptConfig{ + Parameters: ep, + DecryptConfig: dc, + }, + DecryptConfig: &dc, + }, nil +} + +// DecryptWithPrivKeys returns a CryptoConfig to decrypt with configured private keys +func DecryptWithPrivKeys(privKeys [][]byte, privKeysPasswords [][]byte) (CryptoConfig, error) { + if len(privKeys) != len(privKeysPasswords) { + return CryptoConfig{}, errors.New("Length of privKeys should match length of privKeysPasswords") + } + + dc := DecryptConfig{ + Parameters: map[string][][]byte{ + "privkeys": privKeys, + "privkeys-passwords": privKeysPasswords, + }, + } + + ep := map[string][][]byte{} + + return CryptoConfig{ + EncryptConfig: &EncryptConfig{ + Parameters: ep, + DecryptConfig: dc, + }, + DecryptConfig: &dc, + }, nil +} + +// DecryptWithX509s returns a CryptoConfig to decrypt with configured x509 certs +func DecryptWithX509s(x509s [][]byte) (CryptoConfig, error) { + dc := DecryptConfig{ + Parameters: map[string][][]byte{ + "x509s": x509s, + }, + } + + ep := map[string][][]byte{} + + return CryptoConfig{ + EncryptConfig: &EncryptConfig{ + Parameters: ep, + DecryptConfig: dc, + }, + DecryptConfig: &dc, + }, nil +} + +// DecryptWithGpgPrivKeys returns a CryptoConfig to decrypt with configured gpg private keys +func DecryptWithGpgPrivKeys(gpgPrivKeys, gpgPrivKeysPwds [][]byte) (CryptoConfig, error) { + dc := DecryptConfig{ + Parameters: map[string][][]byte{ + "gpg-privatekeys": gpgPrivKeys, + "gpg-privatekeys-passwords": gpgPrivKeysPwds, + }, + } + + ep := map[string][][]byte{} + + return CryptoConfig{ + EncryptConfig: &EncryptConfig{ + Parameters: ep, + DecryptConfig: dc, + }, + DecryptConfig: &dc, + }, nil +} diff --git a/vendor/github.com/containers/ocicrypt/encryption.go b/vendor/github.com/containers/ocicrypt/encryption.go new file mode 100644 index 00000000000..3153b63d780 --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/encryption.go @@ -0,0 +1,328 @@ +/* + Copyright The ocicrypt 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 ocicrypt + +import ( + "encoding/base64" + "encoding/json" + "io" + "strings" + + "github.com/containers/ocicrypt/blockcipher" + "github.com/containers/ocicrypt/config" + "github.com/containers/ocicrypt/keywrap" + "github.com/containers/ocicrypt/keywrap/jwe" + "github.com/containers/ocicrypt/keywrap/pgp" + "github.com/containers/ocicrypt/keywrap/pkcs7" + "github.com/opencontainers/go-digest" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" +) + +// EncryptLayerFinalizer is a finalizer run to return the annotations to set for +// the encrypted layer +type EncryptLayerFinalizer func() (map[string]string, error) + +func init() { + keyWrappers = make(map[string]keywrap.KeyWrapper) + keyWrapperAnnotations = make(map[string]string) + RegisterKeyWrapper("pgp", pgp.NewKeyWrapper()) + RegisterKeyWrapper("jwe", jwe.NewKeyWrapper()) + RegisterKeyWrapper("pkcs7", pkcs7.NewKeyWrapper()) +} + +var keyWrappers map[string]keywrap.KeyWrapper +var keyWrapperAnnotations map[string]string + +// RegisterKeyWrapper allows to register key wrappers by their encryption scheme +func RegisterKeyWrapper(scheme string, iface keywrap.KeyWrapper) { + keyWrappers[scheme] = iface + keyWrapperAnnotations[iface.GetAnnotationID()] = scheme +} + +// GetKeyWrapper looks up the encryptor interface given an encryption scheme (gpg, jwe) +func GetKeyWrapper(scheme string) keywrap.KeyWrapper { + return keyWrappers[scheme] +} + +// GetWrappedKeysMap returns a map of wrappedKeys as values in a +// map with the encryption scheme(s) as the key(s) +func GetWrappedKeysMap(desc ocispec.Descriptor) map[string]string { + wrappedKeysMap := make(map[string]string) + + for annotationsID, scheme := range keyWrapperAnnotations { + if annotation, ok := desc.Annotations[annotationsID]; ok { + wrappedKeysMap[scheme] = annotation + } + } + return wrappedKeysMap +} + +// EncryptLayer encrypts the layer by running one encryptor after the other +func EncryptLayer(ec *config.EncryptConfig, encOrPlainLayerReader io.Reader, desc ocispec.Descriptor) (io.Reader, EncryptLayerFinalizer, error) { + var ( + encLayerReader io.Reader + err error + encrypted bool + bcFin blockcipher.Finalizer + privOptsData []byte + pubOptsData []byte + ) + + if ec == nil { + return nil, nil, errors.New("EncryptConfig must not be nil") + } + + for annotationsID := range keyWrapperAnnotations { + annotation := desc.Annotations[annotationsID] + if annotation != "" { + privOptsData, err = decryptLayerKeyOptsData(&ec.DecryptConfig, desc) + if err != nil { + return nil, nil, err + } + pubOptsData, err = getLayerPubOpts(desc) + if err != nil { + return nil, nil, err + } + // already encrypted! + encrypted = true + } + } + + if !encrypted { + encLayerReader, bcFin, err = commonEncryptLayer(encOrPlainLayerReader, desc.Digest, blockcipher.AES256CTR) + if err != nil { + return nil, nil, err + } + } + + encLayerFinalizer := func() (map[string]string, error) { + // If layer was already encrypted, bcFin should be nil, use existing optsData + if bcFin != nil { + opts, err := bcFin() + if err != nil { + return nil, err + } + privOptsData, err = json.Marshal(opts.Private) + if err != nil { + return nil, errors.Wrapf(err, "could not JSON marshal opts") + } + pubOptsData, err = json.Marshal(opts.Public) + if err != nil { + return nil, errors.Wrapf(err, "could not JSON marshal opts") + } + } + + newAnnotations := make(map[string]string) + for annotationsID, scheme := range keyWrapperAnnotations { + b64Annotations := desc.Annotations[annotationsID] + keywrapper := GetKeyWrapper(scheme) + b64Annotations, err = preWrapKeys(keywrapper, ec, b64Annotations, privOptsData) + if err != nil { + return nil, err + } + if b64Annotations != "" { + newAnnotations[annotationsID] = b64Annotations + } + } + + newAnnotations["org.opencontainers.image.enc.pubopts"] = base64.StdEncoding.EncodeToString(pubOptsData) + + if len(newAnnotations) == 0 { + return nil, errors.New("no encryptor found to handle encryption") + } + + return newAnnotations, err + } + + // if nothing was encrypted, we just return encLayer = nil + return encLayerReader, encLayerFinalizer, err + +} + +// preWrapKeys calls WrapKeys and handles the base64 encoding and concatenation of the +// annotation data +func preWrapKeys(keywrapper keywrap.KeyWrapper, ec *config.EncryptConfig, b64Annotations string, optsData []byte) (string, error) { + newAnnotation, err := keywrapper.WrapKeys(ec, optsData) + if err != nil || len(newAnnotation) == 0 { + return b64Annotations, err + } + b64newAnnotation := base64.StdEncoding.EncodeToString(newAnnotation) + if b64Annotations == "" { + return b64newAnnotation, nil + } + return b64Annotations + "," + b64newAnnotation, nil +} + +// DecryptLayer decrypts a layer trying one keywrap.KeyWrapper after the other to see whether it +// can apply the provided private key +// If unwrapOnly is set we will only try to decrypt the layer encryption key and return +func DecryptLayer(dc *config.DecryptConfig, encLayerReader io.Reader, desc ocispec.Descriptor, unwrapOnly bool) (io.Reader, digest.Digest, error) { + if dc == nil { + return nil, "", errors.New("DecryptConfig must not be nil") + } + privOptsData, err := decryptLayerKeyOptsData(dc, desc) + if err != nil || unwrapOnly { + return nil, "", err + } + + var pubOptsData []byte + pubOptsData, err = getLayerPubOpts(desc) + if err != nil { + return nil, "", err + } + + return commonDecryptLayer(encLayerReader, privOptsData, pubOptsData) +} + +func decryptLayerKeyOptsData(dc *config.DecryptConfig, desc ocispec.Descriptor) ([]byte, error) { + privKeyGiven := false + for annotationsID, scheme := range keyWrapperAnnotations { + b64Annotation := desc.Annotations[annotationsID] + if b64Annotation != "" { + keywrapper := GetKeyWrapper(scheme) + + if keywrapper.NoPossibleKeys(dc.Parameters) { + continue + } + + if len(keywrapper.GetPrivateKeys(dc.Parameters)) > 0 { + privKeyGiven = true + } + + optsData, err := preUnwrapKey(keywrapper, dc, b64Annotation) + if err != nil { + // try next keywrap.KeyWrapper + continue + } + if optsData == nil { + // try next keywrap.KeyWrapper + continue + } + return optsData, nil + } + } + if !privKeyGiven { + return nil, errors.New("missing private key needed for decryption") + } + return nil, errors.Errorf("no suitable key unwrapper found or none of the private keys could be used for decryption") +} + +func getLayerPubOpts(desc ocispec.Descriptor) ([]byte, error) { + pubOptsString := desc.Annotations["org.opencontainers.image.enc.pubopts"] + if pubOptsString == "" { + return json.Marshal(blockcipher.PublicLayerBlockCipherOptions{}) + } + return base64.StdEncoding.DecodeString(pubOptsString) +} + +// preUnwrapKey decodes the comma separated base64 strings and calls the Unwrap function +// of the given keywrapper with it and returns the result in case the Unwrap functions +// does not return an error. If all attempts fail, an error is returned. +func preUnwrapKey(keywrapper keywrap.KeyWrapper, dc *config.DecryptConfig, b64Annotations string) ([]byte, error) { + if b64Annotations == "" { + return nil, nil + } + for _, b64Annotation := range strings.Split(b64Annotations, ",") { + annotation, err := base64.StdEncoding.DecodeString(b64Annotation) + if err != nil { + return nil, errors.New("could not base64 decode the annotation") + } + optsData, err := keywrapper.UnwrapKey(dc, annotation) + if err != nil { + continue + } + return optsData, nil + } + return nil, errors.New("no suitable key found for decrypting layer key") +} + +// commonEncryptLayer is a function to encrypt the plain layer using a new random +// symmetric key and return the LayerBlockCipherHandler's JSON in string form for +// later use during decryption +func commonEncryptLayer(plainLayerReader io.Reader, d digest.Digest, typ blockcipher.LayerCipherType) (io.Reader, blockcipher.Finalizer, error) { + lbch, err := blockcipher.NewLayerBlockCipherHandler() + if err != nil { + return nil, nil, err + } + + encLayerReader, bcFin, err := lbch.Encrypt(plainLayerReader, typ) + if err != nil { + return nil, nil, err + } + + newBcFin := func() (blockcipher.LayerBlockCipherOptions, error) { + lbco, err := bcFin() + if err != nil { + return blockcipher.LayerBlockCipherOptions{}, err + } + lbco.Private.Digest = d + return lbco, nil + } + + return encLayerReader, newBcFin, err +} + +// commonDecryptLayer decrypts an encrypted layer previously encrypted with commonEncryptLayer +// by passing along the optsData +func commonDecryptLayer(encLayerReader io.Reader, privOptsData []byte, pubOptsData []byte) (io.Reader, digest.Digest, error) { + privOpts := blockcipher.PrivateLayerBlockCipherOptions{} + err := json.Unmarshal(privOptsData, &privOpts) + if err != nil { + return nil, "", errors.Wrapf(err, "could not JSON unmarshal privOptsData") + } + + lbch, err := blockcipher.NewLayerBlockCipherHandler() + if err != nil { + return nil, "", err + } + + pubOpts := blockcipher.PublicLayerBlockCipherOptions{} + if len(pubOptsData) > 0 { + err := json.Unmarshal(pubOptsData, &pubOpts) + if err != nil { + return nil, "", errors.Wrapf(err, "could not JSON unmarshal pubOptsData") + } + } + + opts := blockcipher.LayerBlockCipherOptions{ + Private: privOpts, + Public: pubOpts, + } + + plainLayerReader, opts, err := lbch.Decrypt(encLayerReader, opts) + if err != nil { + return nil, "", err + } + + return plainLayerReader, opts.Private.Digest, nil +} + +// FilterOutAnnotations filters out the annotations belonging to the image encryption 'namespace' +// and returns a map with those taken out +func FilterOutAnnotations(annotations map[string]string) map[string]string { + a := make(map[string]string) + if len(annotations) > 0 { + for k, v := range annotations { + if strings.HasPrefix(k, "org.opencontainers.image.enc.") { + continue + } + a[k] = v + } + } + return a +} diff --git a/vendor/github.com/containers/ocicrypt/go.mod b/vendor/github.com/containers/ocicrypt/go.mod new file mode 100644 index 00000000000..214496e0593 --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/go.mod @@ -0,0 +1,18 @@ +module github.com/containers/ocicrypt + +go 1.12 + +require ( + github.com/containerd/containerd v1.2.10 + github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa + github.com/opencontainers/go-digest v1.0.0-rc1 + github.com/opencontainers/image-spec v1.0.1 + github.com/pkg/errors v0.8.1 + github.com/sirupsen/logrus v1.4.2 // indirect + github.com/stretchr/testify v1.3.0 // indirect + github.com/urfave/cli v1.22.1 + golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 + google.golang.org/grpc v1.24.0 // indirect + gopkg.in/square/go-jose.v2 v2.3.1 + gotest.tools v2.2.0+incompatible // indirect +) diff --git a/vendor/github.com/containers/ocicrypt/go.sum b/vendor/github.com/containers/ocicrypt/go.sum new file mode 100644 index 00000000000..d4c40e3ae78 --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/go.sum @@ -0,0 +1,73 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/containerd/containerd v1.2.10 h1:liQDhXqIn7y6cJ/7qBgOaZsiTZJc56/wkkhDBiDBRDw= +github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa h1:RDBNVkRviHZtvDvId8XSGPu3rmpmSe+wKRcEWNgsfWU= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/square/go-jose.v2 v2.3.1 h1:SK5KegNXmKmqE342YYN2qPHEnUYeoMiXXl1poUlI+o4= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/containers/ocicrypt/gpg.go b/vendor/github.com/containers/ocicrypt/gpg.go new file mode 100644 index 00000000000..44cafae0c48 --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/gpg.go @@ -0,0 +1,425 @@ +/* + Copyright The ocicrypt 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 ocicrypt + +import ( + "fmt" + "io/ioutil" + "os" + "os/exec" + "regexp" + "strconv" + "strings" + + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" + "golang.org/x/crypto/ssh/terminal" +) + +// GPGVersion enum representing the GPG client version to use. +type GPGVersion int + +const ( + // GPGv2 signifies gpgv2+ + GPGv2 GPGVersion = iota + // GPGv1 signifies gpgv1+ + GPGv1 + // GPGVersionUndetermined signifies gpg client version undetermined + GPGVersionUndetermined +) + +// GPGClient defines an interface for wrapping the gpg command line tools +type GPGClient interface { + // ReadGPGPubRingFile gets the byte sequence of the gpg public keyring + ReadGPGPubRingFile() ([]byte, error) + // GetGPGPrivateKey gets the private key bytes of a keyid given a passphrase + GetGPGPrivateKey(keyid uint64, passphrase string) ([]byte, error) + // GetSecretKeyDetails gets the details of a secret key + GetSecretKeyDetails(keyid uint64) ([]byte, bool, error) + // GetKeyDetails gets the details of a public key + GetKeyDetails(keyid uint64) ([]byte, bool, error) + // ResolveRecipients resolves PGP key ids to user names + ResolveRecipients([]string) []string +} + +// gpgClient contains generic gpg client information +type gpgClient struct { + gpgHomeDir string +} + +// gpgv2Client is a gpg2 client +type gpgv2Client struct { + gpgClient +} + +// gpgv1Client is a gpg client +type gpgv1Client struct { + gpgClient +} + +// GuessGPGVersion guesses the version of gpg. Defaults to gpg2 if exists, if +// not defaults to regular gpg. +func GuessGPGVersion() GPGVersion { + if err := exec.Command("gpg2", "--version").Run(); err == nil { + return GPGv2 + } else if err := exec.Command("gpg", "--version").Run(); err == nil { + return GPGv1 + } else { + return GPGVersionUndetermined + } +} + +// NewGPGClient creates a new GPGClient object representing the given version +// and using the given home directory +func NewGPGClient(gpgVersion, gpgHomeDir string) (GPGClient, error) { + v := new(GPGVersion) + switch gpgVersion { + case "v1": + *v = GPGv1 + case "v2": + *v = GPGv2 + default: + v = nil + } + return newGPGClient(v, gpgHomeDir) +} + +func newGPGClient(version *GPGVersion, homedir string) (GPGClient, error) { + var gpgVersion GPGVersion + if version != nil { + gpgVersion = *version + } else { + gpgVersion = GuessGPGVersion() + } + + switch gpgVersion { + case GPGv1: + return &gpgv1Client{ + gpgClient: gpgClient{gpgHomeDir: homedir}, + }, nil + case GPGv2: + return &gpgv2Client{ + gpgClient: gpgClient{gpgHomeDir: homedir}, + }, nil + case GPGVersionUndetermined: + return nil, fmt.Errorf("unable to determine GPG version") + default: + return nil, fmt.Errorf("unhandled case: NewGPGClient") + } +} + +// GetGPGPrivateKey gets the bytes of a specified keyid, supplying a passphrase +func (gc *gpgv2Client) GetGPGPrivateKey(keyid uint64, passphrase string) ([]byte, error) { + var args []string + + if gc.gpgHomeDir != "" { + args = append(args, []string{"--homedir", gc.gpgHomeDir}...) + } + + rfile, wfile, err := os.Pipe() + if err != nil { + return nil, errors.Wrapf(err, "could not create pipe") + } + defer func() { + rfile.Close() + wfile.Close() + }() + // fill pipe in background + go func(passphrase string) { + _, _ = wfile.Write([]byte(passphrase)) + wfile.Close() + }(passphrase) + + args = append(args, []string{"--pinentry-mode", "loopback", "--batch", "--passphrase-fd", fmt.Sprintf("%d", 3), "--export-secret-key", fmt.Sprintf("0x%x", keyid)}...) + + cmd := exec.Command("gpg2", args...) + cmd.ExtraFiles = []*os.File{rfile} + + return runGPGGetOutput(cmd) +} + +// ReadGPGPubRingFile reads the GPG public key ring file +func (gc *gpgv2Client) ReadGPGPubRingFile() ([]byte, error) { + var args []string + + if gc.gpgHomeDir != "" { + args = append(args, []string{"--homedir", gc.gpgHomeDir}...) + } + args = append(args, []string{"--batch", "--export"}...) + + cmd := exec.Command("gpg2", args...) + + return runGPGGetOutput(cmd) +} + +func (gc *gpgv2Client) getKeyDetails(option string, keyid uint64) ([]byte, bool, error) { + var args []string + + if gc.gpgHomeDir != "" { + args = append([]string{"--homedir", gc.gpgHomeDir}) + } + args = append(args, option, fmt.Sprintf("0x%x", keyid)) + + cmd := exec.Command("gpg2", args...) + + keydata, err := runGPGGetOutput(cmd) + return keydata, err == nil, err +} + +// GetSecretKeyDetails retrives the secret key details of key with keyid. +// returns a byte array of the details and a bool if the key exists +func (gc *gpgv2Client) GetSecretKeyDetails(keyid uint64) ([]byte, bool, error) { + return gc.getKeyDetails("-K", keyid) +} + +// GetKeyDetails retrives the public key details of key with keyid. +// returns a byte array of the details and a bool if the key exists +func (gc *gpgv2Client) GetKeyDetails(keyid uint64) ([]byte, bool, error) { + return gc.getKeyDetails("-k", keyid) +} + +// ResolveRecipients converts PGP keyids to email addresses, if possible +func (gc *gpgv2Client) ResolveRecipients(recipients []string) []string { + return resolveRecipients(gc, recipients) +} + +// GetGPGPrivateKey gets the bytes of a specified keyid, supplying a passphrase +func (gc *gpgv1Client) GetGPGPrivateKey(keyid uint64, _ string) ([]byte, error) { + var args []string + + if gc.gpgHomeDir != "" { + args = append(args, []string{"--homedir", gc.gpgHomeDir}...) + } + args = append(args, []string{"--batch", "--export-secret-key", fmt.Sprintf("0x%x", keyid)}...) + + cmd := exec.Command("gpg", args...) + + return runGPGGetOutput(cmd) +} + +// ReadGPGPubRingFile reads the GPG public key ring file +func (gc *gpgv1Client) ReadGPGPubRingFile() ([]byte, error) { + var args []string + + if gc.gpgHomeDir != "" { + args = append(args, []string{"--homedir", gc.gpgHomeDir}...) + } + args = append(args, []string{"--batch", "--export"}...) + + cmd := exec.Command("gpg", args...) + + return runGPGGetOutput(cmd) +} + +func (gc *gpgv1Client) getKeyDetails(option string, keyid uint64) ([]byte, bool, error) { + var args []string + + if gc.gpgHomeDir != "" { + args = append([]string{"--homedir", gc.gpgHomeDir}) + } + args = append(args, option, fmt.Sprintf("0x%x", keyid)) + + cmd := exec.Command("gpg", args...) + + keydata, err := runGPGGetOutput(cmd) + + return keydata, err == nil, err +} + +// GetSecretKeyDetails retrives the secret key details of key with keyid. +// returns a byte array of the details and a bool if the key exists +func (gc *gpgv1Client) GetSecretKeyDetails(keyid uint64) ([]byte, bool, error) { + return gc.getKeyDetails("-K", keyid) +} + +// GetKeyDetails retrives the public key details of key with keyid. +// returns a byte array of the details and a bool if the key exists +func (gc *gpgv1Client) GetKeyDetails(keyid uint64) ([]byte, bool, error) { + return gc.getKeyDetails("-k", keyid) +} + +// ResolveRecipients converts PGP keyids to email addresses, if possible +func (gc *gpgv1Client) ResolveRecipients(recipients []string) []string { + return resolveRecipients(gc, recipients) +} + +// runGPGGetOutput runs the GPG commandline and returns stdout as byte array +// and any stderr in the error +func runGPGGetOutput(cmd *exec.Cmd) ([]byte, error) { + stdout, err := cmd.StdoutPipe() + if err != nil { + return nil, err + } + stderr, err := cmd.StderrPipe() + if err != nil { + return nil, err + } + if err := cmd.Start(); err != nil { + return nil, err + } + + stdoutstr, err2 := ioutil.ReadAll(stdout) + stderrstr, _ := ioutil.ReadAll(stderr) + + if err := cmd.Wait(); err != nil { + return nil, fmt.Errorf("error from %s: %s", cmd.Path, string(stderrstr)) + } + + return stdoutstr, err2 +} + +// resolveRecipients walks the list of recipients and attempts to convert +// all keyIds to email addresses; if something goes wrong during the +// conversion of a recipient, the original string is returned for that +// recpient +func resolveRecipients(gc GPGClient, recipients []string) []string { + var result []string + + for _, recipient := range recipients { + keyID, err := strconv.ParseUint(recipient, 0, 64) + if err != nil { + result = append(result, recipient) + } else { + details, found, _ := gc.GetKeyDetails(keyID) + if !found { + result = append(result, recipient) + } else { + email := extractEmailFromDetails(details) + if email == "" { + result = append(result, recipient) + } else { + result = append(result, email) + } + } + } + } + return result +} + +var emailPattern = regexp.MustCompile(`uid\s+\[.*\]\s.*\s<(?P.+)>`) + +func extractEmailFromDetails(details []byte) string { + loc := emailPattern.FindSubmatchIndex(details) + if len(loc) == 0 { + return "" + } + return string(emailPattern.Expand(nil, []byte("$email"), details, loc)) +} + +// uint64ToStringArray converts an array of uint64's to an array of strings +// by applying a format string to each uint64 +func uint64ToStringArray(format string, in []uint64) []string { + var ret []string + + for _, v := range in { + ret = append(ret, fmt.Sprintf(format, v)) + } + return ret +} + +// GPGGetPrivateKey walks the list of layerInfos and tries to decrypt the +// wrapped symmetric keys. For this it determines whether a private key is +// in the GPGVault or on this system and prompts for the passwords for those +// that are available. If we do not find a private key on the system for +// getting to the symmetric key of a layer then an error is generated. +func GPGGetPrivateKey(descs []ocispec.Descriptor, gpgClient GPGClient, gpgVault GPGVault, mustFindKey bool) (gpgPrivKeys [][]byte, gpgPrivKeysPwds [][]byte, err error) { + // PrivateKeyData describes a private key + type PrivateKeyData struct { + KeyData []byte + KeyDataPassword []byte + } + var pkd PrivateKeyData + keyIDPasswordMap := make(map[uint64]PrivateKeyData) + + for _, desc := range descs { + for scheme, b64pgpPackets := range GetWrappedKeysMap(desc) { + if scheme != "pgp" { + continue + } + keywrapper := GetKeyWrapper(scheme) + if keywrapper == nil { + return nil, nil, errors.Errorf("could not get KeyWrapper for %s\n", scheme) + } + keyIds, err := keywrapper.GetKeyIdsFromPacket(b64pgpPackets) + if err != nil { + return nil, nil, err + } + + found := false + for _, keyid := range keyIds { + // do we have this key? -- first check the vault + if gpgVault != nil { + _, keydata := gpgVault.GetGPGPrivateKey(keyid) + if len(keydata) > 0 { + pkd = PrivateKeyData{ + KeyData: keydata, + KeyDataPassword: nil, // password not supported in this case + } + keyIDPasswordMap[keyid] = pkd + found = true + break + } + } else if gpgClient != nil { + // check the local system's gpg installation + keyinfo, haveKey, _ := gpgClient.GetSecretKeyDetails(keyid) + // this may fail if the key is not here; we ignore the error + if !haveKey { + // key not on this system + continue + } + + _, found = keyIDPasswordMap[keyid] + if !found { + fmt.Printf("Passphrase required for Key id 0x%x: \n%v", keyid, string(keyinfo)) + fmt.Printf("Enter passphrase for key with Id 0x%x: ", keyid) + + password, err := terminal.ReadPassword(int(os.Stdin.Fd())) + fmt.Printf("\n") + if err != nil { + return nil, nil, err + } + keydata, err := gpgClient.GetGPGPrivateKey(keyid, string(password)) + if err != nil { + return nil, nil, err + } + pkd = PrivateKeyData{ + KeyData: keydata, + KeyDataPassword: password, + } + keyIDPasswordMap[keyid] = pkd + found = true + } + break + } else { + return nil, nil, errors.New("no GPGVault or GPGClient passed") + } + } + if !found && len(b64pgpPackets) > 0 && mustFindKey { + ids := uint64ToStringArray("0x%x", keyIds) + + return nil, nil, errors.Errorf("missing key for decryption of layer %x of %s. Need one of the following keys: %s", desc.Digest, desc.Platform, strings.Join(ids, ", ")) + } + } + } + + for _, pkd := range keyIDPasswordMap { + gpgPrivKeys = append(gpgPrivKeys, pkd.KeyData) + gpgPrivKeysPwds = append(gpgPrivKeysPwds, pkd.KeyDataPassword) + } + + return gpgPrivKeys, gpgPrivKeysPwds, nil +} diff --git a/vendor/github.com/containers/ocicrypt/gpgvault.go b/vendor/github.com/containers/ocicrypt/gpgvault.go new file mode 100644 index 00000000000..dd9a10007c8 --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/gpgvault.go @@ -0,0 +1,100 @@ +/* + Copyright The ocicrypt 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 ocicrypt + +import ( + "bytes" + "io/ioutil" + + "github.com/pkg/errors" + "golang.org/x/crypto/openpgp" + "golang.org/x/crypto/openpgp/packet" +) + +// GPGVault defines an interface for wrapping multiple secret key rings +type GPGVault interface { + // AddSecretKeyRingData adds a secret keyring via its raw byte array + AddSecretKeyRingData(gpgSecretKeyRingData []byte) error + // AddSecretKeyRingDataArray adds secret keyring via its raw byte arrays + AddSecretKeyRingDataArray(gpgSecretKeyRingDataArray [][]byte) error + // AddSecretKeyRingFiles adds secret keyrings given their filenames + AddSecretKeyRingFiles(filenames []string) error + // GetGPGPrivateKey gets the private key bytes of a keyid given a passphrase + GetGPGPrivateKey(keyid uint64) ([]openpgp.Key, []byte) +} + +// gpgVault wraps an array of gpgSecretKeyRing +type gpgVault struct { + entityLists []openpgp.EntityList + keyDataList [][]byte // the raw data original passed in +} + +// NewGPGVault creates an empty GPGVault +func NewGPGVault() GPGVault { + return &gpgVault{} +} + +// AddSecretKeyRingData adds a secret keyring's to the gpgVault; the raw byte +// array read from the file must be passed and will be parsed by this function +func (g *gpgVault) AddSecretKeyRingData(gpgSecretKeyRingData []byte) error { + // read the private keys + r := bytes.NewReader(gpgSecretKeyRingData) + entityList, err := openpgp.ReadKeyRing(r) + if err != nil { + return errors.Wrapf(err, "could not read keyring") + } + g.entityLists = append(g.entityLists, entityList) + g.keyDataList = append(g.keyDataList, gpgSecretKeyRingData) + return nil +} + +// AddSecretKeyRingDataArray adds secret keyrings to the gpgVault; the raw byte +// arrays read from files must be passed +func (g *gpgVault) AddSecretKeyRingDataArray(gpgSecretKeyRingDataArray [][]byte) error { + for _, gpgSecretKeyRingData := range gpgSecretKeyRingDataArray { + if err := g.AddSecretKeyRingData(gpgSecretKeyRingData); err != nil { + return err + } + } + return nil +} + +// AddSecretKeyRingFiles adds the secret key rings given their filenames +func (g *gpgVault) AddSecretKeyRingFiles(filenames []string) error { + for _, filename := range filenames { + gpgSecretKeyRingData, err := ioutil.ReadFile(filename) + if err != nil { + return err + } + err = g.AddSecretKeyRingData(gpgSecretKeyRingData) + if err != nil { + return err + } + } + return nil +} + +// GetGPGPrivateKey gets the bytes of a specified keyid, supplying a passphrase +func (g *gpgVault) GetGPGPrivateKey(keyid uint64) ([]openpgp.Key, []byte) { + for i, el := range g.entityLists { + decKeys := el.KeysByIdUsage(keyid, packet.KeyFlagEncryptCommunications) + if len(decKeys) > 0 { + return decKeys, g.keyDataList[i] + } + } + return nil, nil +} diff --git a/vendor/github.com/containers/ocicrypt/keywrap/jwe/keywrapper_jwe.go b/vendor/github.com/containers/ocicrypt/keywrap/jwe/keywrapper_jwe.go new file mode 100644 index 00000000000..41d0f1b3adf --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/keywrap/jwe/keywrapper_jwe.go @@ -0,0 +1,136 @@ +/* + Copyright The ocicrypt 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 jwe + +import ( + "crypto/ecdsa" + + "github.com/containers/ocicrypt/config" + "github.com/containers/ocicrypt/keywrap" + "github.com/containers/ocicrypt/utils" + "github.com/pkg/errors" + jose "gopkg.in/square/go-jose.v2" +) + +type jweKeyWrapper struct { +} + +func (kw *jweKeyWrapper) GetAnnotationID() string { + return "org.opencontainers.image.enc.keys.jwe" +} + +// NewKeyWrapper returns a new key wrapping interface using jwe +func NewKeyWrapper() keywrap.KeyWrapper { + return &jweKeyWrapper{} +} + +// WrapKeys wraps the session key for recpients and encrypts the optsData, which +// describe the symmetric key used for encrypting the layer +func (kw *jweKeyWrapper) WrapKeys(ec *config.EncryptConfig, optsData []byte) ([]byte, error) { + var joseRecipients []jose.Recipient + + err := addPubKeys(&joseRecipients, ec.Parameters["pubkeys"]) + if err != nil { + return nil, err + } + // no recipients is not an error... + if len(joseRecipients) == 0 { + return nil, nil + } + + encrypter, err := jose.NewMultiEncrypter(jose.A256GCM, joseRecipients, nil) + if err != nil { + return nil, errors.Wrapf(err, "jose.NewMultiEncrypter failed") + } + jwe, err := encrypter.Encrypt(optsData) + if err != nil { + return nil, errors.Wrapf(err, "JWE Encrypt failed") + } + return []byte(jwe.FullSerialize()), nil +} + +func (kw *jweKeyWrapper) UnwrapKey(dc *config.DecryptConfig, jweString []byte) ([]byte, error) { + jwe, err := jose.ParseEncrypted(string(jweString)) + if err != nil { + return nil, errors.New("jose.ParseEncrypted failed") + } + + privKeys := kw.GetPrivateKeys(dc.Parameters) + if len(privKeys) == 0 { + return nil, errors.New("No private keys found for JWE decryption") + } + privKeysPasswords := kw.getPrivateKeysPasswords(dc.Parameters) + if len(privKeysPasswords) != len(privKeys) { + return nil, errors.New("Private key password array length must be same as that of private keys") + } + + for idx, privKey := range privKeys { + key, err := utils.ParsePrivateKey(privKey, privKeysPasswords[idx], "JWE") + if err != nil { + return nil, err + } + _, _, plain, err := jwe.DecryptMulti(key) + if err == nil { + return plain, nil + } + } + return nil, errors.New("JWE: No suitable private key found for decryption") +} + +func (kw *jweKeyWrapper) NoPossibleKeys(dcparameters map[string][][]byte) bool { + return len(kw.GetPrivateKeys(dcparameters)) == 0 +} + +func (kw *jweKeyWrapper) GetPrivateKeys(dcparameters map[string][][]byte) [][]byte { + return dcparameters["privkeys"] +} + +func (kw *jweKeyWrapper) getPrivateKeysPasswords(dcparameters map[string][][]byte) [][]byte { + return dcparameters["privkeys-passwords"] +} + +func (kw *jweKeyWrapper) GetKeyIdsFromPacket(b64jwes string) ([]uint64, error) { + return nil, nil +} + +func (kw *jweKeyWrapper) GetRecipients(b64jwes string) ([]string, error) { + return []string{"[jwe]"}, nil +} + +func addPubKeys(joseRecipients *[]jose.Recipient, pubKeys [][]byte) error { + if len(pubKeys) == 0 { + return nil + } + for _, pubKey := range pubKeys { + key, err := utils.ParsePublicKey(pubKey, "JWE") + if err != nil { + return err + } + + alg := jose.RSA_OAEP + switch key.(type) { + case *ecdsa.PublicKey: + alg = jose.ECDH_ES_A256KW + } + + *joseRecipients = append(*joseRecipients, jose.Recipient{ + Algorithm: alg, + Key: key, + }) + } + return nil +} diff --git a/vendor/github.com/containers/ocicrypt/keywrap/keywrap.go b/vendor/github.com/containers/ocicrypt/keywrap/keywrap.go new file mode 100644 index 00000000000..ed25e7dac3d --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/keywrap/keywrap.go @@ -0,0 +1,48 @@ +/* + Copyright The ocicrypt 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 keywrap + +import ( + "github.com/containers/ocicrypt/config" +) + +// KeyWrapper is the interface used for wrapping keys using +// a specific encryption technology (pgp, jwe) +type KeyWrapper interface { + WrapKeys(ec *config.EncryptConfig, optsData []byte) ([]byte, error) + UnwrapKey(dc *config.DecryptConfig, annotation []byte) ([]byte, error) + GetAnnotationID() string + + // NoPossibleKeys returns true if there is no possibility of performing + // decryption for parameters provided. + NoPossibleKeys(dcparameters map[string][][]byte) bool + + // GetPrivateKeys (optional) gets the array of private keys. It is an optional implementation + // as in some key services, a private key may not be exportable (i.e. HSM) + // If not implemented, return nil + GetPrivateKeys(dcparameters map[string][][]byte) [][]byte + + // GetKeyIdsFromPacket (optional) gets a list of key IDs. This is optional as some encryption + // schemes may not have a notion of key IDs + // If not implemented, return the nil slice + GetKeyIdsFromPacket(packet string) ([]uint64, error) + + // GetRecipients (optional) gets a list of recipients. It is optional due to the validity of + // recipients in a particular encryptiong scheme + // If not implemented, return the nil slice + GetRecipients(packet string) ([]string, error) +} diff --git a/vendor/github.com/containers/ocicrypt/keywrap/pgp/keywrapper_gpg.go b/vendor/github.com/containers/ocicrypt/keywrap/pgp/keywrapper_gpg.go new file mode 100644 index 00000000000..275a3d8b993 --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/keywrap/pgp/keywrapper_gpg.go @@ -0,0 +1,273 @@ +/* + Copyright The ocicrypt 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 pgp + +import ( + "bytes" + "crypto" + "crypto/rand" + "encoding/base64" + "fmt" + "io" + "io/ioutil" + "net/mail" + "strconv" + "strings" + + "github.com/containers/ocicrypt/config" + "github.com/containers/ocicrypt/keywrap" + "github.com/pkg/errors" + "golang.org/x/crypto/openpgp" + "golang.org/x/crypto/openpgp/packet" +) + +type gpgKeyWrapper struct { +} + +// NewKeyWrapper returns a new key wrapping interface for pgp +func NewKeyWrapper() keywrap.KeyWrapper { + return &gpgKeyWrapper{} +} + +var ( + // GPGDefaultEncryptConfig is the default configuration for layer encryption/decryption + GPGDefaultEncryptConfig = &packet.Config{ + Rand: rand.Reader, + DefaultHash: crypto.SHA256, + DefaultCipher: packet.CipherAES256, + CompressionConfig: &packet.CompressionConfig{Level: 0}, // No compression + RSABits: 2048, + } +) + +func (kw *gpgKeyWrapper) GetAnnotationID() string { + return "org.opencontainers.image.enc.keys.pgp" +} + +// WrapKeys wraps the session key for recpients and encrypts the optsData, which +// describe the symmetric key used for encrypting the layer +func (kw *gpgKeyWrapper) WrapKeys(ec *config.EncryptConfig, optsData []byte) ([]byte, error) { + ciphertext := new(bytes.Buffer) + el, err := kw.createEntityList(ec) + if err != nil { + return nil, errors.Wrap(err, "unable to create entity list") + } + if len(el) == 0 { + // nothing to do -- not an error + return nil, nil + } + + plaintextWriter, err := openpgp.Encrypt(ciphertext, + el, /*EntityList*/ + nil, /* Sign*/ + nil, /* FileHint */ + GPGDefaultEncryptConfig) + if err != nil { + return nil, err + } + + if _, err = plaintextWriter.Write(optsData); err != nil { + return nil, err + } else if err = plaintextWriter.Close(); err != nil { + return nil, err + } + return ciphertext.Bytes(), err +} + +// UnwrapKey unwraps the symmetric key with which the layer is encrypted +// This symmetric key is encrypted in the PGP payload. +func (kw *gpgKeyWrapper) UnwrapKey(dc *config.DecryptConfig, pgpPacket []byte) ([]byte, error) { + pgpPrivateKeys, pgpPrivateKeysPwd, err := kw.getKeyParameters(dc.Parameters) + if err != nil { + return nil, err + } + + for idx, pgpPrivateKey := range pgpPrivateKeys { + r := bytes.NewBuffer(pgpPrivateKey) + entityList, err := openpgp.ReadKeyRing(r) + if err != nil { + return nil, errors.Wrap(err, "unable to parse private keys") + } + + var prompt openpgp.PromptFunction + if len(pgpPrivateKeysPwd) > idx { + responded := false + prompt = func(keys []openpgp.Key, symmetric bool) ([]byte, error) { + if responded { + return nil, fmt.Errorf("don't seem to have the right password") + } + responded = true + for _, key := range keys { + if key.PrivateKey != nil { + _ = key.PrivateKey.Decrypt(pgpPrivateKeysPwd[idx]) + } + } + return pgpPrivateKeysPwd[idx], nil + } + } + + r = bytes.NewBuffer(pgpPacket) + md, err := openpgp.ReadMessage(r, entityList, prompt, GPGDefaultEncryptConfig) + if err != nil { + continue + } + // we get the plain key options back + optsData, err := ioutil.ReadAll(md.UnverifiedBody) + if err != nil { + continue + } + return optsData, nil + } + return nil, errors.New("PGP: No suitable key found to unwrap key") +} + +// GetKeyIdsFromWrappedKeys converts the base64 encoded PGPPacket to uint64 keyIds +func (kw *gpgKeyWrapper) GetKeyIdsFromPacket(b64pgpPackets string) ([]uint64, error) { + + var keyids []uint64 + for _, b64pgpPacket := range strings.Split(b64pgpPackets, ",") { + pgpPacket, err := base64.StdEncoding.DecodeString(b64pgpPacket) + if err != nil { + return nil, errors.Wrapf(err, "could not decode base64 encoded PGP packet") + } + newids, err := kw.getKeyIDs(pgpPacket) + if err != nil { + return nil, err + } + keyids = append(keyids, newids...) + } + return keyids, nil +} + +// getKeyIDs parses a PGPPacket and gets the list of recipients' key IDs +func (kw *gpgKeyWrapper) getKeyIDs(pgpPacket []byte) ([]uint64, error) { + var keyids []uint64 + + kbuf := bytes.NewBuffer(pgpPacket) + packets := packet.NewReader(kbuf) +ParsePackets: + for { + p, err := packets.Next() + if err == io.EOF { + break ParsePackets + } + if err != nil { + return []uint64{}, errors.Wrapf(err, "packets.Next() failed") + } + switch p := p.(type) { + case *packet.EncryptedKey: + keyids = append(keyids, p.KeyId) + case *packet.SymmetricallyEncrypted: + break ParsePackets + } + } + return keyids, nil +} + +// GetRecipients converts the wrappedKeys to an array of recipients +func (kw *gpgKeyWrapper) GetRecipients(b64pgpPackets string) ([]string, error) { + keyIds, err := kw.GetKeyIdsFromPacket(b64pgpPackets) + if err != nil { + return nil, err + } + var array []string + for _, keyid := range keyIds { + array = append(array, "0x"+strconv.FormatUint(keyid, 16)) + } + return array, nil +} + +func (kw *gpgKeyWrapper) NoPossibleKeys(dcparameters map[string][][]byte) bool { + return len(kw.GetPrivateKeys(dcparameters)) == 0 +} + +func (kw *gpgKeyWrapper) GetPrivateKeys(dcparameters map[string][][]byte) [][]byte { + return dcparameters["gpg-privatekeys"] +} + +func (kw *gpgKeyWrapper) getKeyParameters(dcparameters map[string][][]byte) ([][]byte, [][]byte, error) { + + privKeys := kw.GetPrivateKeys(dcparameters) + if len(privKeys) == 0 { + return nil, nil, errors.New("GPG: Missing private key parameter") + } + + return privKeys, dcparameters["gpg-privatekeys-passwords"], nil +} + +// createEntityList creates the opengpg EntityList by reading the KeyRing +// first and then filtering out recipients' keys +func (kw *gpgKeyWrapper) createEntityList(ec *config.EncryptConfig) (openpgp.EntityList, error) { + pgpPubringFile := ec.Parameters["gpg-pubkeyringfile"] + if len(pgpPubringFile) == 0 { + return nil, nil + } + r := bytes.NewReader(pgpPubringFile[0]) + + entityList, err := openpgp.ReadKeyRing(r) + if err != nil { + return nil, err + } + + gpgRecipients := ec.Parameters["gpg-recipients"] + if len(gpgRecipients) == 0 { + return nil, nil + } + + rSet := make(map[string]int) + for _, r := range gpgRecipients { + rSet[string(r)] = 0 + } + + var filteredList openpgp.EntityList + for _, entity := range entityList { + for k := range entity.Identities { + addr, err := mail.ParseAddress(k) + if err != nil { + return nil, err + } + for _, r := range gpgRecipients { + recp := string(r) + if strings.Compare(addr.Name, recp) == 0 || strings.Compare(addr.Address, recp) == 0 { + filteredList = append(filteredList, entity) + rSet[recp] = rSet[recp] + 1 + } + } + } + } + + // make sure we found keys for all the Recipients... + var buffer bytes.Buffer + notFound := false + buffer.WriteString("PGP: No key found for the following recipients: ") + + for k, v := range rSet { + if v == 0 { + if notFound { + buffer.WriteString(", ") + } + buffer.WriteString(k) + notFound = true + } + } + + if notFound { + return nil, errors.New(buffer.String()) + } + + return filteredList, nil +} diff --git a/vendor/github.com/containers/ocicrypt/keywrap/pkcs7/keywrapper_pkcs7.go b/vendor/github.com/containers/ocicrypt/keywrap/pkcs7/keywrapper_pkcs7.go new file mode 100644 index 00000000000..eeba647486a --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/keywrap/pkcs7/keywrapper_pkcs7.go @@ -0,0 +1,136 @@ +/* + Copyright The ocicrypt 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 pkcs7 + +import ( + "crypto" + "crypto/x509" + + "github.com/containers/ocicrypt/config" + "github.com/containers/ocicrypt/keywrap" + "github.com/containers/ocicrypt/utils" + "github.com/fullsailor/pkcs7" + "github.com/pkg/errors" +) + +type pkcs7KeyWrapper struct { +} + +// NewKeyWrapper returns a new key wrapping interface using jwe +func NewKeyWrapper() keywrap.KeyWrapper { + return &pkcs7KeyWrapper{} +} + +func (kw *pkcs7KeyWrapper) GetAnnotationID() string { + return "org.opencontainers.image.enc.keys.pkcs7" +} + +// WrapKeys wraps the session key for recpients and encrypts the optsData, which +// describe the symmetric key used for encrypting the layer +func (kw *pkcs7KeyWrapper) WrapKeys(ec *config.EncryptConfig, optsData []byte) ([]byte, error) { + x509Certs, err := collectX509s(ec.Parameters["x509s"]) + if err != nil { + return nil, err + } + // no recipients is not an error... + if len(x509Certs) == 0 { + return nil, nil + } + + pkcs7.ContentEncryptionAlgorithm = pkcs7.EncryptionAlgorithmAES128GCM + return pkcs7.Encrypt(optsData, x509Certs) +} + +func collectX509s(x509s [][]byte) ([]*x509.Certificate, error) { + if len(x509s) == 0 { + return nil, nil + } + var x509Certs []*x509.Certificate + for _, x509 := range x509s { + x509Cert, err := utils.ParseCertificate(x509, "PKCS7") + if err != nil { + return nil, err + } + x509Certs = append(x509Certs, x509Cert) + } + return x509Certs, nil +} + +func (kw *pkcs7KeyWrapper) NoPossibleKeys(dcparameters map[string][][]byte) bool { + return len(kw.GetPrivateKeys(dcparameters)) == 0 +} + +func (kw *pkcs7KeyWrapper) GetPrivateKeys(dcparameters map[string][][]byte) [][]byte { + return dcparameters["privkeys"] +} + +func (kw *pkcs7KeyWrapper) getPrivateKeysPasswords(dcparameters map[string][][]byte) [][]byte { + return dcparameters["privkeys-passwords"] +} + +// UnwrapKey unwraps the symmetric key with which the layer is encrypted +// This symmetric key is encrypted in the PKCS7 payload. +func (kw *pkcs7KeyWrapper) UnwrapKey(dc *config.DecryptConfig, pkcs7Packet []byte) ([]byte, error) { + privKeys := kw.GetPrivateKeys(dc.Parameters) + if len(privKeys) == 0 { + return nil, errors.New("no private keys found for PKCS7 decryption") + } + privKeysPasswords := kw.getPrivateKeysPasswords(dc.Parameters) + if len(privKeysPasswords) != len(privKeys) { + return nil, errors.New("private key password array length must be same as that of private keys") + } + + x509Certs, err := collectX509s(dc.Parameters["x509s"]) + if err != nil { + return nil, err + } + if len(x509Certs) == 0 { + return nil, errors.New("no x509 certificates found needed for PKCS7 decryption") + } + + p7, err := pkcs7.Parse(pkcs7Packet) + if err != nil { + return nil, errors.Wrapf(err, "could not parse PKCS7 packet") + } + + for idx, privKey := range privKeys { + key, err := utils.ParsePrivateKey(privKey, privKeysPasswords[idx], "PKCS7") + if err != nil { + return nil, err + } + for _, x509Cert := range x509Certs { + optsData, err := p7.Decrypt(x509Cert, crypto.PrivateKey(key)) + if err != nil { + continue + } + return optsData, nil + } + } + return nil, errors.New("PKCS7: No suitable private key found for decryption") +} + +// GetKeyIdsFromWrappedKeys converts the base64 encoded Packet to uint64 keyIds; +// We cannot do this with pkcs7 +func (kw *pkcs7KeyWrapper) GetKeyIdsFromPacket(b64pkcs7Packets string) ([]uint64, error) { + return nil, nil +} + +// GetRecipients converts the wrappedKeys to an array of recipients +// We cannot do this with pkcs7 +func (kw *pkcs7KeyWrapper) GetRecipients(b64pkcs7Packets string) ([]string, error) { + return []string{"[pkcs7]"}, nil +} diff --git a/vendor/github.com/containers/ocicrypt/reader.go b/vendor/github.com/containers/ocicrypt/reader.go new file mode 100644 index 00000000000..a93eec8e91c --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/reader.go @@ -0,0 +1,40 @@ +/* + Copyright The ocicrypt 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 ocicrypt + +import ( + "io" +) + +type readerAtReader struct { + r io.ReaderAt + off int64 +} + +// ReaderFromReaderAt takes an io.ReaderAt and returns an io.Reader +func ReaderFromReaderAt(r io.ReaderAt) io.Reader { + return &readerAtReader{ + r: r, + off: 0, + } +} + +func (rar *readerAtReader) Read(p []byte) (n int, err error) { + n, err = rar.r.ReadAt(p, rar.off) + rar.off += int64(n) + return n, err +} diff --git a/vendor/github.com/containers/ocicrypt/spec/spec.go b/vendor/github.com/containers/ocicrypt/spec/spec.go new file mode 100644 index 00000000000..330069d491d --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/spec/spec.go @@ -0,0 +1,12 @@ +package spec + +const ( + // MediaTypeLayerEnc is MIME type used for encrypted layers. + MediaTypeLayerEnc = "application/vnd.oci.image.layer.v1.tar+encrypted" + // MediaTypeLayerGzipEnc is MIME type used for encrypted compressed layers. + MediaTypeLayerGzipEnc = "application/vnd.oci.image.layer.v1.tar+gzip+encrypted" + // MediaTypeLayerNonDistributableEnc is MIME type used for non distributable encrypted layers. + MediaTypeLayerNonDistributableEnc = "application/vnd.oci.image.layer.nondistributable.v1.tar+encrypted" + // MediaTypeLayerGzipEnc is MIME type used for non distributable encrypted compressed layers. + MediaTypeLayerNonDistributableGzipEnc = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip+encrypted" +) diff --git a/vendor/github.com/containers/ocicrypt/utils/delayedreader.go b/vendor/github.com/containers/ocicrypt/utils/delayedreader.go new file mode 100644 index 00000000000..3b939bdea89 --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/utils/delayedreader.go @@ -0,0 +1,109 @@ +/* + Copyright The ocicrypt 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 utils + +import ( + "io" +) + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +// DelayedReader wraps a io.Reader and allows a client to use the Reader +// interface. The DelayedReader holds back some buffer to the client +// so that it can report any error that occurred on the Reader it wraps +// early to the client while it may still have held some data back. +type DelayedReader struct { + reader io.Reader // Reader to Read() bytes from and delay them + err error // error that occurred on the reader + buffer []byte // delay buffer + bufbytes int // number of bytes in the delay buffer to give to Read(); on '0' we return 'EOF' to caller + bufoff int // offset in the delay buffer to give to Read() +} + +// NewDelayedReader wraps a io.Reader and allocates a delay buffer of bufsize bytes +func NewDelayedReader(reader io.Reader, bufsize uint) io.Reader { + return &DelayedReader{ + reader: reader, + buffer: make([]byte, bufsize), + } +} + +// Read implements the io.Reader interface +func (dr *DelayedReader) Read(p []byte) (int, error) { + if dr.err != nil && dr.err != io.EOF { + return 0, dr.err + } + + // if we are completely drained, return io.EOF + if dr.err == io.EOF && dr.bufbytes == 0 { + return 0, io.EOF + } + + // only at the beginning we fill our delay buffer in an extra step + if dr.bufbytes < len(dr.buffer) && dr.err == nil { + dr.bufbytes, dr.err = FillBuffer(dr.reader, dr.buffer) + if dr.err != nil && dr.err != io.EOF { + return 0, dr.err + } + } + // dr.err != nil means we have EOF and can drain the delay buffer + // otherwise we need to still read from the reader + + var tmpbuf []byte + tmpbufbytes := 0 + if dr.err == nil { + tmpbuf = make([]byte, len(p)) + tmpbufbytes, dr.err = FillBuffer(dr.reader, tmpbuf) + if dr.err != nil && dr.err != io.EOF { + return 0, dr.err + } + } + + // copy out of the delay buffer into 'p' + tocopy1 := min(len(p), dr.bufbytes) + c1 := copy(p[:tocopy1], dr.buffer[dr.bufoff:]) + dr.bufoff += c1 + dr.bufbytes -= c1 + + c2 := 0 + // can p still hold more data? + if c1 < len(p) { + // copy out of the tmpbuf into 'p' + c2 = copy(p[tocopy1:], tmpbuf[:tmpbufbytes]) + } + + // if tmpbuf holds data we need to hold onto, copy them + // into the delay buffer + if tmpbufbytes-c2 > 0 { + // left-shift the delay buffer and append the tmpbuf's remaining data + dr.buffer = dr.buffer[dr.bufoff : dr.bufoff+dr.bufbytes] + dr.buffer = append(dr.buffer, tmpbuf[c2:tmpbufbytes]...) + dr.bufoff = 0 + dr.bufbytes = len(dr.buffer) + } + + var err error + if dr.bufbytes == 0 { + err = io.EOF + } + return c1 + c2, err +} diff --git a/vendor/github.com/containers/ocicrypt/utils/ioutils.go b/vendor/github.com/containers/ocicrypt/utils/ioutils.go new file mode 100644 index 00000000000..c360e0a3325 --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/utils/ioutils.go @@ -0,0 +1,31 @@ +/* + Copyright The ocicrypt 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 utils + +import ( + "io" +) + +// FillBuffer fills the given buffer with as many bytes from the reader as possible. It returns +// EOF if an EOF was encountered or any other error. +func FillBuffer(reader io.Reader, buffer []byte) (int, error) { + n, err := io.ReadFull(reader, buffer) + if err == io.ErrUnexpectedEOF { + return n, io.EOF + } + return n, err +} diff --git a/vendor/github.com/containers/ocicrypt/utils/testing.go b/vendor/github.com/containers/ocicrypt/utils/testing.go new file mode 100644 index 00000000000..e2ed4b1d849 --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/utils/testing.go @@ -0,0 +1,166 @@ +/* + Copyright The ocicrypt 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 utils + +import ( + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "math/big" + "time" + + "github.com/pkg/errors" +) + +// CreateRSAKey creates an RSA key +func CreateRSAKey(bits int) (*rsa.PrivateKey, error) { + key, err := rsa.GenerateKey(rand.Reader, bits) + if err != nil { + return nil, errors.Wrap(err, "rsa.GenerateKey failed") + } + return key, nil +} + +// CreateRSATestKey creates an RSA key of the given size and returns +// the public and private key in PEM or DER format +func CreateRSATestKey(bits int, password []byte, pemencode bool) ([]byte, []byte, error) { + key, err := CreateRSAKey(bits) + if err != nil { + return nil, nil, err + } + + pubData, err := x509.MarshalPKIXPublicKey(&key.PublicKey) + if err != nil { + return nil, nil, errors.Wrap(err, "x509.MarshalPKIXPublicKey failed") + } + privData := x509.MarshalPKCS1PrivateKey(key) + + // no more encoding needed for DER + if !pemencode { + return pubData, privData, nil + } + + publicKey := pem.EncodeToMemory(&pem.Block{ + Type: "PUBLIC KEY", + Bytes: pubData, + }) + + var block *pem.Block + + typ := "RSA PRIVATE KEY" + if len(password) > 0 { + block, err = x509.EncryptPEMBlock(rand.Reader, typ, privData, password, x509.PEMCipherAES256) + if err != nil { + return nil, nil, errors.Wrap(err, "x509.EncryptPEMBlock failed") + } + } else { + block = &pem.Block{ + Type: typ, + Bytes: privData, + } + } + + privateKey := pem.EncodeToMemory(block) + + return publicKey, privateKey, nil +} + +// CreateECDSATestKey creates and elliptic curve key for the given curve and returns +// the public and private key in DER format +func CreateECDSATestKey(curve elliptic.Curve) ([]byte, []byte, error) { + key, err := ecdsa.GenerateKey(curve, rand.Reader) + if err != nil { + return nil, nil, errors.Wrapf(err, "ecdsa.GenerateKey failed") + } + + pubData, err := x509.MarshalPKIXPublicKey(&key.PublicKey) + if err != nil { + return nil, nil, errors.Wrapf(err, "x509.MarshalPKIXPublicKey failed") + } + + privData, err := x509.MarshalECPrivateKey(key) + if err != nil { + return nil, nil, errors.Wrapf(err, "x509.MarshalECPrivateKey failed") + } + + return pubData, privData, nil +} + +// CreateTestCA creates a root CA for testing +func CreateTestCA() (*rsa.PrivateKey, *x509.Certificate, error) { + key, err := rsa.GenerateKey(rand.Reader, 2048) + if err != nil { + return nil, nil, errors.Wrap(err, "rsa.GenerateKey failed") + } + + ca := &x509.Certificate{ + SerialNumber: big.NewInt(1), + Subject: pkix.Name{ + CommonName: "test-ca", + }, + NotBefore: time.Now(), + NotAfter: time.Now().AddDate(1, 0, 0), + IsCA: true, + KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, + BasicConstraintsValid: true, + } + caCert, err := certifyKey(&key.PublicKey, ca, key, ca) + + return key, caCert, err +} + +// CertifyKey certifies a public key using the given CA's private key and cert; +// The certificate template for the public key is optional +func CertifyKey(pubbytes []byte, template *x509.Certificate, caKey *rsa.PrivateKey, caCert *x509.Certificate) (*x509.Certificate, error) { + pubKey, err := ParsePublicKey(pubbytes, "CertifyKey") + if err != nil { + return nil, err + } + return certifyKey(pubKey, template, caKey, caCert) +} + +func certifyKey(pub interface{}, template *x509.Certificate, caKey *rsa.PrivateKey, caCert *x509.Certificate) (*x509.Certificate, error) { + if template == nil { + template = &x509.Certificate{ + SerialNumber: big.NewInt(1), + Subject: pkix.Name{ + CommonName: "testkey", + }, + NotBefore: time.Now(), + NotAfter: time.Now().Add(time.Hour), + IsCA: false, + KeyUsage: x509.KeyUsageDigitalSignature, + BasicConstraintsValid: true, + } + } + + certDER, err := x509.CreateCertificate(rand.Reader, template, caCert, pub, caKey) + if err != nil { + return nil, errors.Wrap(err, "x509.CreateCertificate failed") + } + + cert, err := x509.ParseCertificate(certDER) + if err != nil { + return nil, errors.Wrap(err, "x509.ParseCertificate failed") + } + + return cert, nil +} diff --git a/vendor/github.com/containers/ocicrypt/utils/utils.go b/vendor/github.com/containers/ocicrypt/utils/utils.go new file mode 100644 index 00000000000..14eea38c1ad --- /dev/null +++ b/vendor/github.com/containers/ocicrypt/utils/utils.go @@ -0,0 +1,220 @@ +/* + Copyright The ocicrypt 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 utils + +import ( + "bytes" + "crypto/x509" + "encoding/base64" + "encoding/pem" + "fmt" + "strings" + + "github.com/pkg/errors" + "golang.org/x/crypto/openpgp" + json "gopkg.in/square/go-jose.v2" +) + +// parseJWKPrivateKey parses the input byte array as a JWK and makes sure it's a private key +func parseJWKPrivateKey(privKey []byte, prefix string) (interface{}, error) { + jwk := json.JSONWebKey{} + err := jwk.UnmarshalJSON(privKey) + if err != nil { + return nil, errors.Wrapf(err, "%s: Could not parse input as JWK", prefix) + } + if jwk.IsPublic() { + return nil, fmt.Errorf("%s: JWK is not a private key", prefix) + } + return &jwk, nil +} + +// parseJWKPublicKey parses the input byte array as a JWK +func parseJWKPublicKey(privKey []byte, prefix string) (interface{}, error) { + jwk := json.JSONWebKey{} + err := jwk.UnmarshalJSON(privKey) + if err != nil { + return nil, errors.Wrapf(err, "%s: Could not parse input as JWK", prefix) + } + if !jwk.IsPublic() { + return nil, fmt.Errorf("%s: JWK is not a public key", prefix) + } + return &jwk, nil +} + +// IsPasswordError checks whether an error is related to a missing or wrong +// password +func IsPasswordError(err error) bool { + if err == nil { + return false + } + msg := strings.ToLower(err.Error()) + + return strings.Contains(msg, "password") && + (strings.Contains(msg, "missing") || strings.Contains(msg, "wrong")) +} + +// ParsePrivateKey tries to parse a private key in DER format first and +// PEM format after, returning an error if the parsing failed +func ParsePrivateKey(privKey, privKeyPassword []byte, prefix string) (interface{}, error) { + key, err := x509.ParsePKCS8PrivateKey(privKey) + if err != nil { + key, err = x509.ParsePKCS1PrivateKey(privKey) + if err != nil { + key, err = x509.ParseECPrivateKey(privKey) + } + } + if err != nil { + block, _ := pem.Decode(privKey) + if block != nil { + var der []byte + if x509.IsEncryptedPEMBlock(block) { + if privKeyPassword == nil { + return nil, errors.Errorf("%s: Missing password for encrypted private key", prefix) + } + der, err = x509.DecryptPEMBlock(block, privKeyPassword) + if err != nil { + return nil, errors.Errorf("%s: Wrong password: could not decrypt private key", prefix) + } + } else { + der = block.Bytes + } + + key, err = x509.ParsePKCS8PrivateKey(der) + if err != nil { + key, err = x509.ParsePKCS1PrivateKey(der) + if err != nil { + return nil, errors.Wrapf(err, "%s: Could not parse private key", prefix) + } + } + } else { + key, err = parseJWKPrivateKey(privKey, prefix) + } + } + return key, err +} + +// IsPrivateKey returns true in case the given byte array represents a private key +// It returns an error if for example the password is wrong +func IsPrivateKey(data []byte, password []byte) (bool, error) { + _, err := ParsePrivateKey(data, password, "") + return err == nil, err +} + +// ParsePublicKey tries to parse a public key in DER format first and +// PEM format after, returning an error if the parsing failed +func ParsePublicKey(pubKey []byte, prefix string) (interface{}, error) { + key, err := x509.ParsePKIXPublicKey(pubKey) + if err != nil { + block, _ := pem.Decode(pubKey) + if block != nil { + key, err = x509.ParsePKIXPublicKey(block.Bytes) + if err != nil { + return nil, errors.Wrapf(err, "%s: Could not parse public key", prefix) + } + } else { + key, err = parseJWKPublicKey(pubKey, prefix) + } + } + return key, err +} + +// IsPublicKey returns true in case the given byte array represents a public key +func IsPublicKey(data []byte) bool { + _, err := ParsePublicKey(data, "") + return err == nil +} + +// ParseCertificate tries to parse a public key in DER format first and +// PEM format after, returning an error if the parsing failed +func ParseCertificate(certBytes []byte, prefix string) (*x509.Certificate, error) { + x509Cert, err := x509.ParseCertificate(certBytes) + if err != nil { + block, _ := pem.Decode(certBytes) + if block == nil { + return nil, fmt.Errorf("%s: Could not PEM decode x509 certificate", prefix) + } + x509Cert, err = x509.ParseCertificate(block.Bytes) + if err != nil { + return nil, errors.Wrapf(err, "%s: Could not parse x509 certificate", prefix) + } + } + return x509Cert, err +} + +// IsCertificate returns true in case the given byte array represents an x.509 certificate +func IsCertificate(data []byte) bool { + _, err := ParseCertificate(data, "") + return err == nil +} + +// IsGPGPrivateKeyRing returns true in case the given byte array represents a GPG private key ring file +func IsGPGPrivateKeyRing(data []byte) bool { + r := bytes.NewBuffer(data) + _, err := openpgp.ReadKeyRing(r) + return err == nil +} + +// SortDecryptionKeys parses a list of comma separated base64 entries and sorts the data into +// a map. Each entry in the list may be either a GPG private key ring, private key, or x.509 +// certificate +func SortDecryptionKeys(b64ItemList string) (map[string][][]byte, error) { + dcparameters := make(map[string][][]byte) + + for _, b64Item := range strings.Split(b64ItemList, ",") { + var password []byte + b64Data := strings.Split(b64Item, ":") + keyData, err := base64.StdEncoding.DecodeString(b64Data[0]) + if err != nil { + return nil, errors.New("Could not base64 decode a passed decryption key") + } + if len(b64Data) == 2 { + password, err = base64.StdEncoding.DecodeString(b64Data[1]) + if err != nil { + return nil, errors.New("Could not base64 decode a passed decryption key password") + } + } + var key string + isPrivKey, err := IsPrivateKey(keyData, password) + if IsPasswordError(err) { + return nil, err + } + if isPrivKey { + key = "privkeys" + if _, ok := dcparameters["privkeys-passwords"]; !ok { + dcparameters["privkeys-passwords"] = [][]byte{password} + } else { + dcparameters["privkeys-passwords"] = append(dcparameters["privkeys-passwords"], password) + } + } else if IsCertificate(keyData) { + key = "x509s" + } else if IsGPGPrivateKeyRing(keyData) { + key = "gpg-privatekeys" + } + if key != "" { + values := dcparameters[key] + if values == nil { + dcparameters[key] = [][]byte{keyData} + } else { + dcparameters[key] = append(dcparameters[key], keyData) + } + } else { + return nil, errors.New("Unknown decryption key type") + } + } + + return dcparameters, nil +} diff --git a/vendor/github.com/coreos/go-systemd/v22/LICENSE b/vendor/github.com/coreos/go-systemd/v22/LICENSE new file mode 100644 index 00000000000..37ec93a14fd --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/coreos/go-systemd/v22/NOTICE b/vendor/github.com/coreos/go-systemd/v22/NOTICE new file mode 100644 index 00000000000..23a0ada2fbb --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/NOTICE @@ -0,0 +1,5 @@ +CoreOS Project +Copyright 2018 CoreOS, Inc + +This product includes software developed at CoreOS, Inc. +(http://www.coreos.com/). diff --git a/vendor/github.com/coreos/go-systemd/v22/activation/files.go b/vendor/github.com/coreos/go-systemd/v22/activation/files.go new file mode 100644 index 00000000000..29dd18defad --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/activation/files.go @@ -0,0 +1,67 @@ +// Copyright 2015 CoreOS, Inc. +// +// 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 activation implements primitives for systemd socket activation. +package activation + +import ( + "os" + "strconv" + "strings" + "syscall" +) + +const ( + // listenFdsStart corresponds to `SD_LISTEN_FDS_START`. + listenFdsStart = 3 +) + +// Files returns a slice containing a `os.File` object for each +// file descriptor passed to this process via systemd fd-passing protocol. +// +// The order of the file descriptors is preserved in the returned slice. +// `unsetEnv` is typically set to `true` in order to avoid clashes in +// fd usage and to avoid leaking environment flags to child processes. +func Files(unsetEnv bool) []*os.File { + if unsetEnv { + defer os.Unsetenv("LISTEN_PID") + defer os.Unsetenv("LISTEN_FDS") + defer os.Unsetenv("LISTEN_FDNAMES") + } + + pid, err := strconv.Atoi(os.Getenv("LISTEN_PID")) + if err != nil || pid != os.Getpid() { + return nil + } + + nfds, err := strconv.Atoi(os.Getenv("LISTEN_FDS")) + if err != nil || nfds == 0 { + return nil + } + + names := strings.Split(os.Getenv("LISTEN_FDNAMES"), ":") + + files := make([]*os.File, 0, nfds) + for fd := listenFdsStart; fd < listenFdsStart+nfds; fd++ { + syscall.CloseOnExec(fd) + name := "LISTEN_FD_" + strconv.Itoa(fd) + offset := fd - listenFdsStart + if offset < len(names) && len(names[offset]) > 0 { + name = names[offset] + } + files = append(files, os.NewFile(uintptr(fd), name)) + } + + return files +} diff --git a/vendor/github.com/coreos/go-systemd/v22/activation/listeners.go b/vendor/github.com/coreos/go-systemd/v22/activation/listeners.go new file mode 100644 index 00000000000..3dbe2b08776 --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/activation/listeners.go @@ -0,0 +1,103 @@ +// Copyright 2015 CoreOS, Inc. +// +// 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 activation + +import ( + "crypto/tls" + "net" +) + +// Listeners returns a slice containing a net.Listener for each matching socket type +// passed to this process. +// +// The order of the file descriptors is preserved in the returned slice. +// Nil values are used to fill any gaps. For example if systemd were to return file descriptors +// corresponding with "udp, tcp, tcp", then the slice would contain {nil, net.Listener, net.Listener} +func Listeners() ([]net.Listener, error) { + files := Files(true) + listeners := make([]net.Listener, len(files)) + + for i, f := range files { + if pc, err := net.FileListener(f); err == nil { + listeners[i] = pc + f.Close() + } + } + return listeners, nil +} + +// ListenersWithNames maps a listener name to a set of net.Listener instances. +func ListenersWithNames() (map[string][]net.Listener, error) { + files := Files(true) + listeners := map[string][]net.Listener{} + + for _, f := range files { + if pc, err := net.FileListener(f); err == nil { + current, ok := listeners[f.Name()] + if !ok { + listeners[f.Name()] = []net.Listener{pc} + } else { + listeners[f.Name()] = append(current, pc) + } + f.Close() + } + } + return listeners, nil +} + +// TLSListeners returns a slice containing a net.listener for each matching TCP socket type +// passed to this process. +// It uses default Listeners func and forces TCP sockets handlers to use TLS based on tlsConfig. +func TLSListeners(tlsConfig *tls.Config) ([]net.Listener, error) { + listeners, err := Listeners() + + if listeners == nil || err != nil { + return nil, err + } + + if tlsConfig != nil { + for i, l := range listeners { + // Activate TLS only for TCP sockets + if l.Addr().Network() == "tcp" { + listeners[i] = tls.NewListener(l, tlsConfig) + } + } + } + + return listeners, err +} + +// TLSListenersWithNames maps a listener name to a net.Listener with +// the associated TLS configuration. +func TLSListenersWithNames(tlsConfig *tls.Config) (map[string][]net.Listener, error) { + listeners, err := ListenersWithNames() + + if listeners == nil || err != nil { + return nil, err + } + + if tlsConfig != nil { + for _, ll := range listeners { + // Activate TLS only for TCP sockets + for i, l := range ll { + if l.Addr().Network() == "tcp" { + ll[i] = tls.NewListener(l, tlsConfig) + } + } + } + } + + return listeners, err +} diff --git a/vendor/github.com/coreos/go-systemd/v22/activation/packetconns.go b/vendor/github.com/coreos/go-systemd/v22/activation/packetconns.go new file mode 100644 index 00000000000..a97206785a4 --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/activation/packetconns.go @@ -0,0 +1,38 @@ +// Copyright 2015 CoreOS, Inc. +// +// 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 activation + +import ( + "net" +) + +// PacketConns returns a slice containing a net.PacketConn for each matching socket type +// passed to this process. +// +// The order of the file descriptors is preserved in the returned slice. +// Nil values are used to fill any gaps. For example if systemd were to return file descriptors +// corresponding with "udp, tcp, udp", then the slice would contain {net.PacketConn, nil, net.PacketConn} +func PacketConns() ([]net.PacketConn, error) { + files := Files(true) + conns := make([]net.PacketConn, len(files)) + + for i, f := range files { + if pc, err := net.FilePacketConn(f); err == nil { + conns[i] = pc + f.Close() + } + } + return conns, nil +} diff --git a/vendor/github.com/coreos/go-systemd/v22/daemon/sdnotify.go b/vendor/github.com/coreos/go-systemd/v22/daemon/sdnotify.go new file mode 100644 index 00000000000..ba4ae31f19b --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/daemon/sdnotify.go @@ -0,0 +1,84 @@ +// Copyright 2014 Docker, Inc. +// Copyright 2015-2018 CoreOS, Inc. +// +// 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 daemon provides a Go implementation of the sd_notify protocol. +// It can be used to inform systemd of service start-up completion, watchdog +// events, and other status changes. +// +// https://www.freedesktop.org/software/systemd/man/sd_notify.html#Description +package daemon + +import ( + "net" + "os" +) + +const ( + // SdNotifyReady tells the service manager that service startup is finished + // or the service finished loading its configuration. + SdNotifyReady = "READY=1" + + // SdNotifyStopping tells the service manager that the service is beginning + // its shutdown. + SdNotifyStopping = "STOPPING=1" + + // SdNotifyReloading tells the service manager that this service is + // reloading its configuration. Note that you must call SdNotifyReady when + // it completed reloading. + SdNotifyReloading = "RELOADING=1" + + // SdNotifyWatchdog tells the service manager to update the watchdog + // timestamp for the service. + SdNotifyWatchdog = "WATCHDOG=1" +) + +// SdNotify sends a message to the init daemon. It is common to ignore the error. +// If `unsetEnvironment` is true, the environment variable `NOTIFY_SOCKET` +// will be unconditionally unset. +// +// It returns one of the following: +// (false, nil) - notification not supported (i.e. NOTIFY_SOCKET is unset) +// (false, err) - notification supported, but failure happened (e.g. error connecting to NOTIFY_SOCKET or while sending data) +// (true, nil) - notification supported, data has been sent +func SdNotify(unsetEnvironment bool, state string) (bool, error) { + socketAddr := &net.UnixAddr{ + Name: os.Getenv("NOTIFY_SOCKET"), + Net: "unixgram", + } + + // NOTIFY_SOCKET not set + if socketAddr.Name == "" { + return false, nil + } + + if unsetEnvironment { + if err := os.Unsetenv("NOTIFY_SOCKET"); err != nil { + return false, err + } + } + + conn, err := net.DialUnix(socketAddr.Net, nil, socketAddr) + // Error connecting to NOTIFY_SOCKET + if err != nil { + return false, err + } + defer conn.Close() + + if _, err = conn.Write([]byte(state)); err != nil { + return false, err + } + return true, nil +} diff --git a/vendor/github.com/coreos/go-systemd/v22/daemon/watchdog.go b/vendor/github.com/coreos/go-systemd/v22/daemon/watchdog.go new file mode 100644 index 00000000000..7a0e0d3a51b --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/daemon/watchdog.go @@ -0,0 +1,73 @@ +// Copyright 2016 CoreOS, Inc. +// +// 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 daemon + +import ( + "fmt" + "os" + "strconv" + "time" +) + +// SdWatchdogEnabled returns watchdog information for a service. +// Processes should call daemon.SdNotify(false, daemon.SdNotifyWatchdog) every +// time / 2. +// If `unsetEnvironment` is true, the environment variables `WATCHDOG_USEC` and +// `WATCHDOG_PID` will be unconditionally unset. +// +// It returns one of the following: +// (0, nil) - watchdog isn't enabled or we aren't the watched PID. +// (0, err) - an error happened (e.g. error converting time). +// (time, nil) - watchdog is enabled and we can send ping. +// time is delay before inactive service will be killed. +func SdWatchdogEnabled(unsetEnvironment bool) (time.Duration, error) { + wusec := os.Getenv("WATCHDOG_USEC") + wpid := os.Getenv("WATCHDOG_PID") + if unsetEnvironment { + wusecErr := os.Unsetenv("WATCHDOG_USEC") + wpidErr := os.Unsetenv("WATCHDOG_PID") + if wusecErr != nil { + return 0, wusecErr + } + if wpidErr != nil { + return 0, wpidErr + } + } + + if wusec == "" { + return 0, nil + } + s, err := strconv.Atoi(wusec) + if err != nil { + return 0, fmt.Errorf("error converting WATCHDOG_USEC: %s", err) + } + if s <= 0 { + return 0, fmt.Errorf("error WATCHDOG_USEC must be a positive number") + } + interval := time.Duration(s) * time.Microsecond + + if wpid == "" { + return interval, nil + } + p, err := strconv.Atoi(wpid) + if err != nil { + return 0, fmt.Errorf("error converting WATCHDOG_PID: %s", err) + } + if os.Getpid() != p { + return 0, nil + } + + return interval, nil +} diff --git a/vendor/github.com/coreos/go-systemd/dbus/dbus.go b/vendor/github.com/coreos/go-systemd/v22/dbus/dbus.go similarity index 99% rename from vendor/github.com/coreos/go-systemd/dbus/dbus.go rename to vendor/github.com/coreos/go-systemd/v22/dbus/dbus.go index f652582e658..91584a1668e 100644 --- a/vendor/github.com/coreos/go-systemd/dbus/dbus.go +++ b/vendor/github.com/coreos/go-systemd/v22/dbus/dbus.go @@ -23,7 +23,7 @@ import ( "strings" "sync" - "github.com/godbus/dbus" + "github.com/godbus/dbus/v5" ) const ( diff --git a/vendor/github.com/coreos/go-systemd/dbus/methods.go b/vendor/github.com/coreos/go-systemd/v22/dbus/methods.go similarity index 98% rename from vendor/github.com/coreos/go-systemd/dbus/methods.go rename to vendor/github.com/coreos/go-systemd/v22/dbus/methods.go index 5f2790acff9..e38659d7be1 100644 --- a/vendor/github.com/coreos/go-systemd/dbus/methods.go +++ b/vendor/github.com/coreos/go-systemd/v22/dbus/methods.go @@ -20,7 +20,7 @@ import ( "path" "strconv" - "github.com/godbus/dbus" + "github.com/godbus/dbus/v5" ) func (c *Conn) jobComplete(signal *dbus.Signal) { @@ -197,6 +197,12 @@ func (c *Conn) GetUnitPathProperties(path dbus.ObjectPath) (map[string]interface return c.getProperties(path, "org.freedesktop.systemd1.Unit") } +// GetAllProperties takes the (unescaped) unit name and returns all of its dbus object properties. +func (c *Conn) GetAllProperties(unit string) (map[string]interface{}, error) { + path := unitPath(unit) + return c.getProperties(path, "") +} + func (c *Conn) getProperty(unit string, dbusInterface string, propertyName string) (*Property, error) { var err error var prop dbus.Variant diff --git a/vendor/github.com/coreos/go-systemd/dbus/properties.go b/vendor/github.com/coreos/go-systemd/v22/dbus/properties.go similarity index 99% rename from vendor/github.com/coreos/go-systemd/dbus/properties.go rename to vendor/github.com/coreos/go-systemd/v22/dbus/properties.go index 6c818958763..fb42b627338 100644 --- a/vendor/github.com/coreos/go-systemd/dbus/properties.go +++ b/vendor/github.com/coreos/go-systemd/v22/dbus/properties.go @@ -15,7 +15,7 @@ package dbus import ( - "github.com/godbus/dbus" + "github.com/godbus/dbus/v5" ) // From the systemd docs: @@ -56,7 +56,7 @@ type execStart struct { // http://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= func PropExecStart(command []string, uncleanIsFailure bool) Property { execStarts := []execStart{ - execStart{ + { Path: command[0], Args: command, UncleanIsFailure: uncleanIsFailure, diff --git a/vendor/github.com/coreos/go-systemd/dbus/set.go b/vendor/github.com/coreos/go-systemd/v22/dbus/set.go similarity index 100% rename from vendor/github.com/coreos/go-systemd/dbus/set.go rename to vendor/github.com/coreos/go-systemd/v22/dbus/set.go diff --git a/vendor/github.com/coreos/go-systemd/dbus/subscription.go b/vendor/github.com/coreos/go-systemd/v22/dbus/subscription.go similarity index 99% rename from vendor/github.com/coreos/go-systemd/dbus/subscription.go rename to vendor/github.com/coreos/go-systemd/v22/dbus/subscription.go index f6d7a08a106..7e370fea212 100644 --- a/vendor/github.com/coreos/go-systemd/dbus/subscription.go +++ b/vendor/github.com/coreos/go-systemd/v22/dbus/subscription.go @@ -19,7 +19,7 @@ import ( "log" "time" - "github.com/godbus/dbus" + "github.com/godbus/dbus/v5" ) const ( diff --git a/vendor/github.com/coreos/go-systemd/dbus/subscription_set.go b/vendor/github.com/coreos/go-systemd/v22/dbus/subscription_set.go similarity index 100% rename from vendor/github.com/coreos/go-systemd/dbus/subscription_set.go rename to vendor/github.com/coreos/go-systemd/v22/dbus/subscription_set.go diff --git a/vendor/github.com/coreos/pkg/capnslog/init.go b/vendor/github.com/coreos/pkg/capnslog/init.go index 44b8cd361b0..38ce6d26184 100644 --- a/vendor/github.com/coreos/pkg/capnslog/init.go +++ b/vendor/github.com/coreos/pkg/capnslog/init.go @@ -32,7 +32,7 @@ import ( func init() { initHijack() - // Go `log` pacakge uses os.Stderr. + // Go `log` package uses os.Stderr. SetFormatter(NewDefaultFormatter(os.Stderr)) SetGlobalLogLevel(INFO) } diff --git a/vendor/github.com/docker/distribution/registry/api/errcode/handler.go b/vendor/github.com/docker/distribution/registry/api/errcode/handler.go deleted file mode 100644 index d77e70473e7..00000000000 --- a/vendor/github.com/docker/distribution/registry/api/errcode/handler.go +++ /dev/null @@ -1,40 +0,0 @@ -package errcode - -import ( - "encoding/json" - "net/http" -) - -// ServeJSON attempts to serve the errcode in a JSON envelope. It marshals err -// and sets the content-type header to 'application/json'. It will handle -// ErrorCoder and Errors, and if necessary will create an envelope. -func ServeJSON(w http.ResponseWriter, err error) error { - w.Header().Set("Content-Type", "application/json; charset=utf-8") - var sc int - - switch errs := err.(type) { - case Errors: - if len(errs) < 1 { - break - } - - if err, ok := errs[0].(ErrorCoder); ok { - sc = err.ErrorCode().Descriptor().HTTPStatusCode - } - case ErrorCoder: - sc = errs.ErrorCode().Descriptor().HTTPStatusCode - err = Errors{err} // create an envelope. - default: - // We just have an unhandled error type, so just place in an envelope - // and move along. - err = Errors{err} - } - - if sc == 0 { - sc = http.StatusInternalServerError - } - - w.WriteHeader(sc) - - return json.NewEncoder(w).Encode(err) -} diff --git a/vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/jsonlog.go b/vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/jsonlog.go deleted file mode 100644 index 74be8e7da0a..00000000000 --- a/vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/jsonlog.go +++ /dev/null @@ -1,25 +0,0 @@ -package jsonlog // import "github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog" - -import ( - "time" -) - -// JSONLog is a log message, typically a single entry from a given log stream. -type JSONLog struct { - // Log is the log message - Log string `json:"log,omitempty"` - // Stream is the log source - Stream string `json:"stream,omitempty"` - // Created is the created timestamp of log - Created time.Time `json:"time"` - // Attrs is the list of extra attributes provided by the user - Attrs map[string]string `json:"attrs,omitempty"` -} - -// Reset all fields to their zero value. -func (jl *JSONLog) Reset() { - jl.Log = "" - jl.Stream = "" - jl.Created = time.Time{} - jl.Attrs = make(map[string]string) -} diff --git a/vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/jsonlogbytes.go b/vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/jsonlogbytes.go deleted file mode 100644 index 577c718f637..00000000000 --- a/vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/jsonlogbytes.go +++ /dev/null @@ -1,125 +0,0 @@ -package jsonlog // import "github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog" - -import ( - "bytes" - "encoding/json" - "time" - "unicode/utf8" -) - -// JSONLogs marshals encoded JSONLog objects -type JSONLogs struct { - Log []byte `json:"log,omitempty"` - Stream string `json:"stream,omitempty"` - Created time.Time `json:"time"` - - // json-encoded bytes - RawAttrs json.RawMessage `json:"attrs,omitempty"` -} - -// MarshalJSONBuf is an optimized JSON marshaller that avoids reflection -// and unnecessary allocation. -func (mj *JSONLogs) MarshalJSONBuf(buf *bytes.Buffer) error { - var first = true - - buf.WriteString(`{`) - if len(mj.Log) != 0 { - first = false - buf.WriteString(`"log":`) - ffjsonWriteJSONBytesAsString(buf, mj.Log) - } - if len(mj.Stream) != 0 { - if first { - first = false - } else { - buf.WriteString(`,`) - } - buf.WriteString(`"stream":`) - ffjsonWriteJSONBytesAsString(buf, []byte(mj.Stream)) - } - if len(mj.RawAttrs) > 0 { - if first { - first = false - } else { - buf.WriteString(`,`) - } - buf.WriteString(`"attrs":`) - buf.Write(mj.RawAttrs) - } - if !first { - buf.WriteString(`,`) - } - - created, err := fastTimeMarshalJSON(mj.Created) - if err != nil { - return err - } - - buf.WriteString(`"time":`) - buf.WriteString(created) - buf.WriteString(`}`) - return nil -} - -func ffjsonWriteJSONBytesAsString(buf *bytes.Buffer, s []byte) { - const hex = "0123456789abcdef" - - buf.WriteByte('"') - start := 0 - for i := 0; i < len(s); { - if b := s[i]; b < utf8.RuneSelf { - if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' { - i++ - continue - } - if start < i { - buf.Write(s[start:i]) - } - switch b { - case '\\', '"': - buf.WriteByte('\\') - buf.WriteByte(b) - case '\n': - buf.WriteByte('\\') - buf.WriteByte('n') - case '\r': - buf.WriteByte('\\') - buf.WriteByte('r') - default: - - buf.WriteString(`\u00`) - buf.WriteByte(hex[b>>4]) - buf.WriteByte(hex[b&0xF]) - } - i++ - start = i - continue - } - c, size := utf8.DecodeRune(s[i:]) - if c == utf8.RuneError && size == 1 { - if start < i { - buf.Write(s[start:i]) - } - buf.WriteString(`\ufffd`) - i += size - start = i - continue - } - - if c == '\u2028' || c == '\u2029' { - if start < i { - buf.Write(s[start:i]) - } - buf.WriteString(`\u202`) - buf.WriteByte(hex[c&0xF]) - i += size - start = i - continue - } - i += size - } - if start < len(s) { - buf.Write(s[start:]) - } - buf.WriteByte('"') -} diff --git a/vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/time_marshalling.go b/vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/time_marshalling.go deleted file mode 100644 index 1822ea5dbc5..00000000000 --- a/vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog/time_marshalling.go +++ /dev/null @@ -1,20 +0,0 @@ -package jsonlog // import "github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog" - -import ( - "time" - - "github.com/pkg/errors" -) - -const jsonFormat = `"` + time.RFC3339Nano + `"` - -// fastTimeMarshalJSON avoids one of the extra allocations that -// time.MarshalJSON is making. -func fastTimeMarshalJSON(t time.Time) (string, error) { - if y := t.Year(); y < 0 || y >= 10000 { - // RFC 3339 is clear that years are 4 digits exactly. - // See golang.org/issue/4556#c15 for more discussion. - return "", errors.New("time.MarshalJSON: year outside of range [0,9999]") - } - return t.Format(jsonFormat), nil -} diff --git a/vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_linux.go b/vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_linux.go deleted file mode 100644 index b251d6aed6f..00000000000 --- a/vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_linux.go +++ /dev/null @@ -1,77 +0,0 @@ -// Package operatingsystem provides helper function to get the operating system -// name for different platforms. -package operatingsystem // import "github.com/docker/docker/pkg/parsers/operatingsystem" - -import ( - "bufio" - "bytes" - "fmt" - "io/ioutil" - "os" - "strings" - - "github.com/mattn/go-shellwords" -) - -var ( - // file to use to detect if the daemon is running in a container - proc1Cgroup = "/proc/1/cgroup" - - // file to check to determine Operating System - etcOsRelease = "/etc/os-release" - - // used by stateless systems like Clear Linux - altOsRelease = "/usr/lib/os-release" -) - -// GetOperatingSystem gets the name of the current operating system. -func GetOperatingSystem() (string, error) { - osReleaseFile, err := os.Open(etcOsRelease) - if err != nil { - if !os.IsNotExist(err) { - return "", fmt.Errorf("Error opening %s: %v", etcOsRelease, err) - } - osReleaseFile, err = os.Open(altOsRelease) - if err != nil { - return "", fmt.Errorf("Error opening %s: %v", altOsRelease, err) - } - } - defer osReleaseFile.Close() - - var prettyName string - scanner := bufio.NewScanner(osReleaseFile) - for scanner.Scan() { - line := scanner.Text() - if strings.HasPrefix(line, "PRETTY_NAME=") { - data := strings.SplitN(line, "=", 2) - prettyNames, err := shellwords.Parse(data[1]) - if err != nil { - return "", fmt.Errorf("PRETTY_NAME is invalid: %s", err.Error()) - } - if len(prettyNames) != 1 { - return "", fmt.Errorf("PRETTY_NAME needs to be enclosed by quotes if they have spaces: %s", data[1]) - } - prettyName = prettyNames[0] - } - } - if prettyName != "" { - return prettyName, nil - } - // If not set, defaults to PRETTY_NAME="Linux" - // c.f. http://www.freedesktop.org/software/systemd/man/os-release.html - return "Linux", nil -} - -// IsContainerized returns true if we are running inside a container. -func IsContainerized() (bool, error) { - b, err := ioutil.ReadFile(proc1Cgroup) - if err != nil { - return false, err - } - for _, line := range bytes.Split(b, []byte{'\n'}) { - if len(line) > 0 && !bytes.HasSuffix(line, []byte{'/'}) && !bytes.HasSuffix(line, []byte("init.scope")) { - return true, nil - } - } - return false, nil -} diff --git a/vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_unix.go b/vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_unix.go deleted file mode 100644 index f4792d37d5f..00000000000 --- a/vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_unix.go +++ /dev/null @@ -1,25 +0,0 @@ -// +build freebsd darwin - -package operatingsystem // import "github.com/docker/docker/pkg/parsers/operatingsystem" - -import ( - "errors" - "os/exec" -) - -// GetOperatingSystem gets the name of the current operating system. -func GetOperatingSystem() (string, error) { - cmd := exec.Command("uname", "-s") - osName, err := cmd.Output() - if err != nil { - return "", err - } - return string(osName), nil -} - -// IsContainerized returns true if we are running inside a container. -// No-op on FreeBSD and Darwin, always returns false. -func IsContainerized() (bool, error) { - // TODO: Implement jail detection for freeBSD - return false, errors.New("Cannot detect if we are in container") -} diff --git a/vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_windows.go b/vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_windows.go deleted file mode 100644 index 372de514696..00000000000 --- a/vendor/github.com/docker/docker/pkg/parsers/operatingsystem/operatingsystem_windows.go +++ /dev/null @@ -1,51 +0,0 @@ -package operatingsystem // import "github.com/docker/docker/pkg/parsers/operatingsystem" - -import ( - "fmt" - - "golang.org/x/sys/windows/registry" -) - -// GetOperatingSystem gets the name of the current operating system. -func GetOperatingSystem() (string, error) { - - // Default return value - ret := "Unknown Operating System" - - k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE) - if err != nil { - return ret, err - } - defer k.Close() - - pn, _, err := k.GetStringValue("ProductName") - if err != nil { - return ret, err - } - ret = pn - - ri, _, err := k.GetStringValue("ReleaseId") - if err != nil { - return ret, err - } - ret = fmt.Sprintf("%s Version %s", ret, ri) - - cbn, _, err := k.GetStringValue("CurrentBuildNumber") - if err != nil { - return ret, err - } - - ubr, _, err := k.GetIntegerValue("UBR") - if err != nil { - return ret, err - } - ret = fmt.Sprintf("%s (OS Build %s.%d)", ret, cbn, ubr) - - return ret, nil -} - -// IsContainerized returns true if we are running inside a container. -// No-op on Windows, always returns false. -func IsContainerized() (bool, error) { - return false, nil -} diff --git a/vendor/github.com/docker/docker/pkg/parsers/parsers.go b/vendor/github.com/docker/docker/pkg/parsers/parsers.go deleted file mode 100644 index c4186a4c0a5..00000000000 --- a/vendor/github.com/docker/docker/pkg/parsers/parsers.go +++ /dev/null @@ -1,69 +0,0 @@ -// Package parsers provides helper functions to parse and validate different type -// of string. It can be hosts, unix addresses, tcp addresses, filters, kernel -// operating system versions. -package parsers // import "github.com/docker/docker/pkg/parsers" - -import ( - "fmt" - "strconv" - "strings" -) - -// ParseKeyValueOpt parses and validates the specified string as a key/value pair (key=value) -func ParseKeyValueOpt(opt string) (string, string, error) { - parts := strings.SplitN(opt, "=", 2) - if len(parts) != 2 { - return "", "", fmt.Errorf("Unable to parse key/value option: %s", opt) - } - return strings.TrimSpace(parts[0]), strings.TrimSpace(parts[1]), nil -} - -// ParseUintList parses and validates the specified string as the value -// found in some cgroup file (e.g. `cpuset.cpus`, `cpuset.mems`), which could be -// one of the formats below. Note that duplicates are actually allowed in the -// input string. It returns a `map[int]bool` with available elements from `val` -// set to `true`. -// Supported formats: -// 7 -// 1-6 -// 0,3-4,7,8-10 -// 0-0,0,1-7 -// 03,1-3 <- this is gonna get parsed as [1,2,3] -// 3,2,1 -// 0-2,3,1 -func ParseUintList(val string) (map[int]bool, error) { - if val == "" { - return map[int]bool{}, nil - } - - availableInts := make(map[int]bool) - split := strings.Split(val, ",") - errInvalidFormat := fmt.Errorf("invalid format: %s", val) - - for _, r := range split { - if !strings.Contains(r, "-") { - v, err := strconv.Atoi(r) - if err != nil { - return nil, errInvalidFormat - } - availableInts[v] = true - } else { - split := strings.SplitN(r, "-", 2) - min, err := strconv.Atoi(split[0]) - if err != nil { - return nil, errInvalidFormat - } - max, err := strconv.Atoi(split[1]) - if err != nil { - return nil, errInvalidFormat - } - if max < min { - return nil, errInvalidFormat - } - for i := min; i <= max; i++ { - availableInts[i] = true - } - } - } - return availableInts, nil -} diff --git a/vendor/github.com/docker/docker/pkg/sysinfo/README.md b/vendor/github.com/docker/docker/pkg/sysinfo/README.md deleted file mode 100644 index c1530cef0da..00000000000 --- a/vendor/github.com/docker/docker/pkg/sysinfo/README.md +++ /dev/null @@ -1 +0,0 @@ -SysInfo stores information about which features a kernel supports. diff --git a/vendor/github.com/docker/docker/pkg/sysinfo/numcpu.go b/vendor/github.com/docker/docker/pkg/sysinfo/numcpu.go deleted file mode 100644 index eea2d25bf94..00000000000 --- a/vendor/github.com/docker/docker/pkg/sysinfo/numcpu.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build !linux,!windows - -package sysinfo // import "github.com/docker/docker/pkg/sysinfo" - -import ( - "runtime" -) - -// NumCPU returns the number of CPUs -func NumCPU() int { - return runtime.NumCPU() -} diff --git a/vendor/github.com/docker/docker/pkg/sysinfo/numcpu_linux.go b/vendor/github.com/docker/docker/pkg/sysinfo/numcpu_linux.go deleted file mode 100644 index 5f6c6df8c48..00000000000 --- a/vendor/github.com/docker/docker/pkg/sysinfo/numcpu_linux.go +++ /dev/null @@ -1,42 +0,0 @@ -package sysinfo // import "github.com/docker/docker/pkg/sysinfo" - -import ( - "runtime" - "unsafe" - - "golang.org/x/sys/unix" -) - -// numCPU queries the system for the count of threads available -// for use to this process. -// -// Issues two syscalls. -// Returns 0 on errors. Use |runtime.NumCPU| in that case. -func numCPU() int { - // Gets the affinity mask for a process: The very one invoking this function. - pid, _, _ := unix.RawSyscall(unix.SYS_GETPID, 0, 0, 0) - - var mask [1024 / 64]uintptr - _, _, err := unix.RawSyscall(unix.SYS_SCHED_GETAFFINITY, pid, uintptr(len(mask)*8), uintptr(unsafe.Pointer(&mask[0]))) - if err != 0 { - return 0 - } - - // For every available thread a bit is set in the mask. - ncpu := 0 - for _, e := range mask { - if e == 0 { - continue - } - ncpu += int(popcnt(uint64(e))) - } - return ncpu -} - -// NumCPU returns the number of CPUs which are currently online -func NumCPU() int { - if ncpu := numCPU(); ncpu > 0 { - return ncpu - } - return runtime.NumCPU() -} diff --git a/vendor/github.com/docker/docker/pkg/sysinfo/numcpu_windows.go b/vendor/github.com/docker/docker/pkg/sysinfo/numcpu_windows.go deleted file mode 100644 index 13523f671f1..00000000000 --- a/vendor/github.com/docker/docker/pkg/sysinfo/numcpu_windows.go +++ /dev/null @@ -1,35 +0,0 @@ -package sysinfo // import "github.com/docker/docker/pkg/sysinfo" - -import ( - "runtime" - "unsafe" - - "golang.org/x/sys/windows" -) - -var ( - kernel32 = windows.NewLazySystemDLL("kernel32.dll") - getCurrentProcess = kernel32.NewProc("GetCurrentProcess") - getProcessAffinityMask = kernel32.NewProc("GetProcessAffinityMask") -) - -func numCPU() int { - // Gets the affinity mask for a process - var mask, sysmask uintptr - currentProcess, _, _ := getCurrentProcess.Call() - ret, _, _ := getProcessAffinityMask.Call(currentProcess, uintptr(unsafe.Pointer(&mask)), uintptr(unsafe.Pointer(&sysmask))) - if ret == 0 { - return 0 - } - // For every available thread a bit is set in the mask. - ncpu := int(popcnt(uint64(mask))) - return ncpu -} - -// NumCPU returns the number of CPUs which are currently online -func NumCPU() int { - if ncpu := numCPU(); ncpu > 0 { - return ncpu - } - return runtime.NumCPU() -} diff --git a/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo.go b/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo.go deleted file mode 100644 index 8fc0ecc25e6..00000000000 --- a/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo.go +++ /dev/null @@ -1,144 +0,0 @@ -package sysinfo // import "github.com/docker/docker/pkg/sysinfo" - -import "github.com/docker/docker/pkg/parsers" - -// SysInfo stores information about which features a kernel supports. -// TODO Windows: Factor out platform specific capabilities. -type SysInfo struct { - // Whether the kernel supports AppArmor or not - AppArmor bool - // Whether the kernel supports Seccomp or not - Seccomp bool - - cgroupMemInfo - cgroupCPUInfo - cgroupBlkioInfo - cgroupCpusetInfo - cgroupPids - - // Whether IPv4 forwarding is supported or not, if this was disabled, networking will not work - IPv4ForwardingDisabled bool - - // Whether bridge-nf-call-iptables is supported or not - BridgeNFCallIPTablesDisabled bool - - // Whether bridge-nf-call-ip6tables is supported or not - BridgeNFCallIP6TablesDisabled bool - - // Whether the cgroup has the mountpoint of "devices" or not - CgroupDevicesEnabled bool -} - -type cgroupMemInfo struct { - // Whether memory limit is supported or not - MemoryLimit bool - - // Whether swap limit is supported or not - SwapLimit bool - - // Whether soft limit is supported or not - MemoryReservation bool - - // Whether OOM killer disable is supported or not - OomKillDisable bool - - // Whether memory swappiness is supported or not - MemorySwappiness bool - - // Whether kernel memory limit is supported or not - KernelMemory bool -} - -type cgroupCPUInfo struct { - // Whether CPU shares is supported or not - CPUShares bool - - // Whether CPU CFS(Completely Fair Scheduler) period is supported or not - CPUCfsPeriod bool - - // Whether CPU CFS(Completely Fair Scheduler) quota is supported or not - CPUCfsQuota bool - - // Whether CPU real-time period is supported or not - CPURealtimePeriod bool - - // Whether CPU real-time runtime is supported or not - CPURealtimeRuntime bool -} - -type cgroupBlkioInfo struct { - // Whether Block IO weight is supported or not - BlkioWeight bool - - // Whether Block IO weight_device is supported or not - BlkioWeightDevice bool - - // Whether Block IO read limit in bytes per second is supported or not - BlkioReadBpsDevice bool - - // Whether Block IO write limit in bytes per second is supported or not - BlkioWriteBpsDevice bool - - // Whether Block IO read limit in IO per second is supported or not - BlkioReadIOpsDevice bool - - // Whether Block IO write limit in IO per second is supported or not - BlkioWriteIOpsDevice bool -} - -type cgroupCpusetInfo struct { - // Whether Cpuset is supported or not - Cpuset bool - - // Available Cpuset's cpus - Cpus string - - // Available Cpuset's memory nodes - Mems string -} - -type cgroupPids struct { - // Whether Pids Limit is supported or not - PidsLimit bool -} - -// IsCpusetCpusAvailable returns `true` if the provided string set is contained -// in cgroup's cpuset.cpus set, `false` otherwise. -// If error is not nil a parsing error occurred. -func (c cgroupCpusetInfo) IsCpusetCpusAvailable(provided string) (bool, error) { - return isCpusetListAvailable(provided, c.Cpus) -} - -// IsCpusetMemsAvailable returns `true` if the provided string set is contained -// in cgroup's cpuset.mems set, `false` otherwise. -// If error is not nil a parsing error occurred. -func (c cgroupCpusetInfo) IsCpusetMemsAvailable(provided string) (bool, error) { - return isCpusetListAvailable(provided, c.Mems) -} - -func isCpusetListAvailable(provided, available string) (bool, error) { - parsedProvided, err := parsers.ParseUintList(provided) - if err != nil { - return false, err - } - parsedAvailable, err := parsers.ParseUintList(available) - if err != nil { - return false, err - } - for k := range parsedProvided { - if !parsedAvailable[k] { - return false, nil - } - } - return true, nil -} - -// Returns bit count of 1, used by NumCPU -func popcnt(x uint64) (n byte) { - x -= (x >> 1) & 0x5555555555555555 - x = (x>>2)&0x3333333333333333 + x&0x3333333333333333 - x += x >> 4 - x &= 0x0f0f0f0f0f0f0f0f - x *= 0x0101010101010101 - return byte(x >> 56) -} diff --git a/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_linux.go b/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_linux.go deleted file mode 100644 index dde5be19bc6..00000000000 --- a/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_linux.go +++ /dev/null @@ -1,254 +0,0 @@ -package sysinfo // import "github.com/docker/docker/pkg/sysinfo" - -import ( - "fmt" - "io/ioutil" - "os" - "path" - "strings" - - "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/sirupsen/logrus" - "golang.org/x/sys/unix" -) - -func findCgroupMountpoints() (map[string]string, error) { - cgMounts, err := cgroups.GetCgroupMounts(false) - if err != nil { - return nil, fmt.Errorf("Failed to parse cgroup information: %v", err) - } - mps := make(map[string]string) - for _, m := range cgMounts { - for _, ss := range m.Subsystems { - mps[ss] = m.Mountpoint - } - } - return mps, nil -} - -// New returns a new SysInfo, using the filesystem to detect which features -// the kernel supports. If `quiet` is `false` warnings are printed in logs -// whenever an error occurs or misconfigurations are present. -func New(quiet bool) *SysInfo { - sysInfo := &SysInfo{} - cgMounts, err := findCgroupMountpoints() - if err != nil { - logrus.Warnf("Failed to parse cgroup information: %v", err) - } else { - sysInfo.cgroupMemInfo = checkCgroupMem(cgMounts, quiet) - sysInfo.cgroupCPUInfo = checkCgroupCPU(cgMounts, quiet) - sysInfo.cgroupBlkioInfo = checkCgroupBlkioInfo(cgMounts, quiet) - sysInfo.cgroupCpusetInfo = checkCgroupCpusetInfo(cgMounts, quiet) - sysInfo.cgroupPids = checkCgroupPids(quiet) - } - - _, ok := cgMounts["devices"] - sysInfo.CgroupDevicesEnabled = ok - - sysInfo.IPv4ForwardingDisabled = !readProcBool("/proc/sys/net/ipv4/ip_forward") - sysInfo.BridgeNFCallIPTablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-iptables") - sysInfo.BridgeNFCallIP6TablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-ip6tables") - - // Check if AppArmor is supported. - if _, err := os.Stat("/sys/kernel/security/apparmor"); !os.IsNotExist(err) { - sysInfo.AppArmor = true - } - - // Check if Seccomp is supported, via CONFIG_SECCOMP. - if err := unix.Prctl(unix.PR_GET_SECCOMP, 0, 0, 0, 0); err != unix.EINVAL { - // Make sure the kernel has CONFIG_SECCOMP_FILTER. - if err := unix.Prctl(unix.PR_SET_SECCOMP, unix.SECCOMP_MODE_FILTER, 0, 0, 0); err != unix.EINVAL { - sysInfo.Seccomp = true - } - } - - return sysInfo -} - -// checkCgroupMem reads the memory information from the memory cgroup mount point. -func checkCgroupMem(cgMounts map[string]string, quiet bool) cgroupMemInfo { - mountPoint, ok := cgMounts["memory"] - if !ok { - if !quiet { - logrus.Warn("Your kernel does not support cgroup memory limit") - } - return cgroupMemInfo{} - } - - swapLimit := cgroupEnabled(mountPoint, "memory.memsw.limit_in_bytes") - if !quiet && !swapLimit { - logrus.Warn("Your kernel does not support swap memory limit") - } - memoryReservation := cgroupEnabled(mountPoint, "memory.soft_limit_in_bytes") - if !quiet && !memoryReservation { - logrus.Warn("Your kernel does not support memory reservation") - } - oomKillDisable := cgroupEnabled(mountPoint, "memory.oom_control") - if !quiet && !oomKillDisable { - logrus.Warn("Your kernel does not support oom control") - } - memorySwappiness := cgroupEnabled(mountPoint, "memory.swappiness") - if !quiet && !memorySwappiness { - logrus.Warn("Your kernel does not support memory swappiness") - } - kernelMemory := cgroupEnabled(mountPoint, "memory.kmem.limit_in_bytes") - if !quiet && !kernelMemory { - logrus.Warn("Your kernel does not support kernel memory limit") - } - - return cgroupMemInfo{ - MemoryLimit: true, - SwapLimit: swapLimit, - MemoryReservation: memoryReservation, - OomKillDisable: oomKillDisable, - MemorySwappiness: memorySwappiness, - KernelMemory: kernelMemory, - } -} - -// checkCgroupCPU reads the cpu information from the cpu cgroup mount point. -func checkCgroupCPU(cgMounts map[string]string, quiet bool) cgroupCPUInfo { - mountPoint, ok := cgMounts["cpu"] - if !ok { - if !quiet { - logrus.Warn("Unable to find cpu cgroup in mounts") - } - return cgroupCPUInfo{} - } - - cpuShares := cgroupEnabled(mountPoint, "cpu.shares") - if !quiet && !cpuShares { - logrus.Warn("Your kernel does not support cgroup cpu shares") - } - - cpuCfsPeriod := cgroupEnabled(mountPoint, "cpu.cfs_period_us") - if !quiet && !cpuCfsPeriod { - logrus.Warn("Your kernel does not support cgroup cfs period") - } - - cpuCfsQuota := cgroupEnabled(mountPoint, "cpu.cfs_quota_us") - if !quiet && !cpuCfsQuota { - logrus.Warn("Your kernel does not support cgroup cfs quotas") - } - - cpuRealtimePeriod := cgroupEnabled(mountPoint, "cpu.rt_period_us") - if !quiet && !cpuRealtimePeriod { - logrus.Warn("Your kernel does not support cgroup rt period") - } - - cpuRealtimeRuntime := cgroupEnabled(mountPoint, "cpu.rt_runtime_us") - if !quiet && !cpuRealtimeRuntime { - logrus.Warn("Your kernel does not support cgroup rt runtime") - } - - return cgroupCPUInfo{ - CPUShares: cpuShares, - CPUCfsPeriod: cpuCfsPeriod, - CPUCfsQuota: cpuCfsQuota, - CPURealtimePeriod: cpuRealtimePeriod, - CPURealtimeRuntime: cpuRealtimeRuntime, - } -} - -// checkCgroupBlkioInfo reads the blkio information from the blkio cgroup mount point. -func checkCgroupBlkioInfo(cgMounts map[string]string, quiet bool) cgroupBlkioInfo { - mountPoint, ok := cgMounts["blkio"] - if !ok { - if !quiet { - logrus.Warn("Unable to find blkio cgroup in mounts") - } - return cgroupBlkioInfo{} - } - - weight := cgroupEnabled(mountPoint, "blkio.weight") - if !quiet && !weight { - logrus.Warn("Your kernel does not support cgroup blkio weight") - } - - weightDevice := cgroupEnabled(mountPoint, "blkio.weight_device") - if !quiet && !weightDevice { - logrus.Warn("Your kernel does not support cgroup blkio weight_device") - } - - readBpsDevice := cgroupEnabled(mountPoint, "blkio.throttle.read_bps_device") - if !quiet && !readBpsDevice { - logrus.Warn("Your kernel does not support cgroup blkio throttle.read_bps_device") - } - - writeBpsDevice := cgroupEnabled(mountPoint, "blkio.throttle.write_bps_device") - if !quiet && !writeBpsDevice { - logrus.Warn("Your kernel does not support cgroup blkio throttle.write_bps_device") - } - readIOpsDevice := cgroupEnabled(mountPoint, "blkio.throttle.read_iops_device") - if !quiet && !readIOpsDevice { - logrus.Warn("Your kernel does not support cgroup blkio throttle.read_iops_device") - } - - writeIOpsDevice := cgroupEnabled(mountPoint, "blkio.throttle.write_iops_device") - if !quiet && !writeIOpsDevice { - logrus.Warn("Your kernel does not support cgroup blkio throttle.write_iops_device") - } - return cgroupBlkioInfo{ - BlkioWeight: weight, - BlkioWeightDevice: weightDevice, - BlkioReadBpsDevice: readBpsDevice, - BlkioWriteBpsDevice: writeBpsDevice, - BlkioReadIOpsDevice: readIOpsDevice, - BlkioWriteIOpsDevice: writeIOpsDevice, - } -} - -// checkCgroupCpusetInfo reads the cpuset information from the cpuset cgroup mount point. -func checkCgroupCpusetInfo(cgMounts map[string]string, quiet bool) cgroupCpusetInfo { - mountPoint, ok := cgMounts["cpuset"] - if !ok { - if !quiet { - logrus.Warn("Unable to find cpuset cgroup in mounts") - } - return cgroupCpusetInfo{} - } - - cpus, err := ioutil.ReadFile(path.Join(mountPoint, "cpuset.cpus")) - if err != nil { - return cgroupCpusetInfo{} - } - - mems, err := ioutil.ReadFile(path.Join(mountPoint, "cpuset.mems")) - if err != nil { - return cgroupCpusetInfo{} - } - - return cgroupCpusetInfo{ - Cpuset: true, - Cpus: strings.TrimSpace(string(cpus)), - Mems: strings.TrimSpace(string(mems)), - } -} - -// checkCgroupPids reads the pids information from the pids cgroup mount point. -func checkCgroupPids(quiet bool) cgroupPids { - _, err := cgroups.FindCgroupMountpoint("pids") - if err != nil { - if !quiet { - logrus.Warn(err) - } - return cgroupPids{} - } - - return cgroupPids{ - PidsLimit: true, - } -} - -func cgroupEnabled(mountPoint, name string) bool { - _, err := os.Stat(path.Join(mountPoint, name)) - return err == nil -} - -func readProcBool(path string) bool { - val, err := ioutil.ReadFile(path) - if err != nil { - return false - } - return strings.TrimSpace(string(val)) == "1" -} diff --git a/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_unix.go b/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_unix.go deleted file mode 100644 index 23cc695fb83..00000000000 --- a/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_unix.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build !linux,!windows - -package sysinfo // import "github.com/docker/docker/pkg/sysinfo" - -// New returns an empty SysInfo for non linux for now. -func New(quiet bool) *SysInfo { - sysInfo := &SysInfo{} - return sysInfo -} diff --git a/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_windows.go b/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_windows.go deleted file mode 100644 index 5f68524e7ed..00000000000 --- a/vendor/github.com/docker/docker/pkg/sysinfo/sysinfo_windows.go +++ /dev/null @@ -1,7 +0,0 @@ -package sysinfo // import "github.com/docker/docker/pkg/sysinfo" - -// New returns an empty SysInfo for windows for now. -func New(quiet bool) *SysInfo { - sysInfo := &SysInfo{} - return sysInfo -} diff --git a/vendor/github.com/docker/go-connections/nat/nat.go b/vendor/github.com/docker/go-connections/nat/nat.go index 4d5f5ae63af..bb7e4e33695 100644 --- a/vendor/github.com/docker/go-connections/nat/nat.go +++ b/vendor/github.com/docker/go-connections/nat/nat.go @@ -113,7 +113,7 @@ func SplitProtoPort(rawPort string) (string, string) { } func validateProto(proto string) bool { - for _, availableProto := range []string{"tcp", "udp"} { + for _, availableProto := range []string{"tcp", "udp", "sctp"} { if availableProto == proto { return true } diff --git a/vendor/github.com/docker/go-connections/tlsconfig/certpool_other.go b/vendor/github.com/docker/go-connections/tlsconfig/certpool_other.go index 9ca974539a7..1ff81c333c3 100644 --- a/vendor/github.com/docker/go-connections/tlsconfig/certpool_other.go +++ b/vendor/github.com/docker/go-connections/tlsconfig/certpool_other.go @@ -4,7 +4,6 @@ package tlsconfig import ( "crypto/x509" - ) // SystemCertPool returns an new empty cert pool, diff --git a/vendor/github.com/docker/go-connections/tlsconfig/config.go b/vendor/github.com/docker/go-connections/tlsconfig/config.go index 1b31bbb8b1b..0ef3fdcb469 100644 --- a/vendor/github.com/docker/go-connections/tlsconfig/config.go +++ b/vendor/github.com/docker/go-connections/tlsconfig/config.go @@ -46,8 +46,6 @@ var acceptedCBCCiphers = []uint16{ tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - tls.TLS_RSA_WITH_AES_256_CBC_SHA, - tls.TLS_RSA_WITH_AES_128_CBC_SHA, } // DefaultServerAcceptedCiphers should be uses by code which already has a crypto/tls @@ -65,22 +63,34 @@ var allTLSVersions = map[uint16]struct{}{ } // ServerDefault returns a secure-enough TLS configuration for the server TLS configuration. -func ServerDefault() *tls.Config { - return &tls.Config{ - // Avoid fallback to SSL protocols < TLS1.0 - MinVersion: tls.VersionTLS10, +func ServerDefault(ops ...func(*tls.Config)) *tls.Config { + tlsconfig := &tls.Config{ + // Avoid fallback by default to SSL protocols < TLS1.2 + MinVersion: tls.VersionTLS12, PreferServerCipherSuites: true, CipherSuites: DefaultServerAcceptedCiphers, } + + for _, op := range ops { + op(tlsconfig) + } + + return tlsconfig } // ClientDefault returns a secure-enough TLS configuration for the client TLS configuration. -func ClientDefault() *tls.Config { - return &tls.Config{ +func ClientDefault(ops ...func(*tls.Config)) *tls.Config { + tlsconfig := &tls.Config{ // Prefer TLS1.2 as the client minimum MinVersion: tls.VersionTLS12, CipherSuites: clientCipherSuites, } + + for _, op := range ops { + op(tlsconfig) + } + + return tlsconfig } // certPool returns an X.509 certificate pool from `caFile`, the certificate file. diff --git a/vendor/github.com/evanphx/json-patch/.travis.yml b/vendor/github.com/evanphx/json-patch/.travis.yml index 2092c72c46b..50e4afd19a4 100644 --- a/vendor/github.com/evanphx/json-patch/.travis.yml +++ b/vendor/github.com/evanphx/json-patch/.travis.yml @@ -1,8 +1,8 @@ language: go go: - - 1.8 - - 1.7 + - 1.14 + - 1.13 install: - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi @@ -11,6 +11,9 @@ install: script: - go get - go test -cover ./... + - cd ./v5 + - go get + - go test -cover ./... notifications: email: false diff --git a/vendor/github.com/evanphx/json-patch/LICENSE b/vendor/github.com/evanphx/json-patch/LICENSE index 0eb9b72d84d..df76d7d7716 100644 --- a/vendor/github.com/evanphx/json-patch/LICENSE +++ b/vendor/github.com/evanphx/json-patch/LICENSE @@ -6,7 +6,7 @@ modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Evan Phoenix nor the names of its contributors diff --git a/vendor/github.com/evanphx/json-patch/README.md b/vendor/github.com/evanphx/json-patch/README.md index 9c7f87f7cea..121b039dbaa 100644 --- a/vendor/github.com/evanphx/json-patch/README.md +++ b/vendor/github.com/evanphx/json-patch/README.md @@ -1,5 +1,5 @@ # JSON-Patch -`jsonpatch` is a library which provides functionallity for both applying +`jsonpatch` is a library which provides functionality for both applying [RFC6902 JSON patches](http://tools.ietf.org/html/rfc6902) against documents, as well as for calculating & applying [RFC7396 JSON merge patches](https://tools.ietf.org/html/rfc7396). @@ -11,10 +11,11 @@ well as for calculating & applying [RFC7396 JSON merge patches](https://tools.ie **Latest and greatest**: ```bash -go get -u github.com/evanphx/json-patch +go get -u github.com/evanphx/json-patch/v5 ``` **Stable Versions**: +* Version 5: `go get -u gopkg.in/evanphx/json-patch.v5` * Version 4: `go get -u gopkg.in/evanphx/json-patch.v4` (previous versions below `v3` are unavailable) @@ -82,7 +83,7 @@ When ran, you get the following output: ```bash $ go run main.go patch document: {"height":null,"name":"Jane"} -updated tina doc: {"age":28,"name":"Jane"} +updated alternative doc: {"age":28,"name":"Jane"} ``` ## Create and apply a JSON Patch @@ -164,7 +165,7 @@ func main() { } if !jsonpatch.Equal(original, different) { - fmt.Println(`"original" is _not_ structurally equal to "similar"`) + fmt.Println(`"original" is _not_ structurally equal to "different"`) } } ``` @@ -173,7 +174,7 @@ When ran, you get the following output: ```bash $ go run main.go "original" is structurally equal to "similar" -"original" is _not_ structurally equal to "similar" +"original" is _not_ structurally equal to "different" ``` ## Combine merge patches diff --git a/vendor/github.com/evanphx/json-patch/merge.go b/vendor/github.com/evanphx/json-patch/merge.go index 6806c4c200b..14e8bb5ce38 100644 --- a/vendor/github.com/evanphx/json-patch/merge.go +++ b/vendor/github.com/evanphx/json-patch/merge.go @@ -307,13 +307,16 @@ func matchesValue(av, bv interface{}) bool { return true case map[string]interface{}: bt := bv.(map[string]interface{}) - for key := range at { - if !matchesValue(at[key], bt[key]) { - return false - } + if len(bt) != len(at) { + return false } for key := range bt { - if !matchesValue(at[key], bt[key]) { + av, aOK := at[key] + bv, bOK := bt[key] + if aOK != bOK { + return false + } + if !matchesValue(av, bv) { return false } } diff --git a/vendor/github.com/evanphx/json-patch/patch.go b/vendor/github.com/evanphx/json-patch/patch.go index 1b5f95e6112..f185a45b2cb 100644 --- a/vendor/github.com/evanphx/json-patch/patch.go +++ b/vendor/github.com/evanphx/json-patch/patch.go @@ -202,6 +202,10 @@ func (n *lazyNode) equal(o *lazyNode) bool { return false } + if len(n.doc) != len(o.doc) { + return false + } + for k, v := range n.doc { ov, ok := o.doc[k] @@ -209,6 +213,10 @@ func (n *lazyNode) equal(o *lazyNode) bool { return false } + if (v == nil) != (ov == nil) { + return false + } + if v == nil && ov == nil { continue } @@ -429,14 +437,14 @@ func (d *partialArray) add(key string, val *lazyNode) error { return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) } - if SupportNegativeIndices { + if idx < 0 { + if !SupportNegativeIndices { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } if idx < -len(ary) { return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) } - - if idx < 0 { - idx += len(ary) - } + idx += len(ary) } copy(ary[0:idx], cur[0:idx]) @@ -473,14 +481,14 @@ func (d *partialArray) remove(key string) error { return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) } - if SupportNegativeIndices { + if idx < 0 { + if !SupportNegativeIndices { + return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) + } if idx < -len(cur) { return errors.Wrapf(ErrInvalidIndex, "Unable to access invalid index: %d", idx) } - - if idx < 0 { - idx += len(cur) - } + idx += len(cur) } ary := make([]*lazyNode, len(cur)-1) diff --git a/vendor/github.com/fsnotify/fsnotify/.editorconfig b/vendor/github.com/fsnotify/fsnotify/.editorconfig index ba49e3c2349..fad895851e5 100644 --- a/vendor/github.com/fsnotify/fsnotify/.editorconfig +++ b/vendor/github.com/fsnotify/fsnotify/.editorconfig @@ -1,5 +1,12 @@ root = true -[*] +[*.go] indent_style = tab indent_size = 4 +insert_final_newline = true + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/vendor/github.com/fsnotify/fsnotify/.gitattributes b/vendor/github.com/fsnotify/fsnotify/.gitattributes new file mode 100644 index 00000000000..32f1001be0a --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/.gitattributes @@ -0,0 +1 @@ +go.sum linguist-generated diff --git a/vendor/github.com/fsnotify/fsnotify/.travis.yml b/vendor/github.com/fsnotify/fsnotify/.travis.yml index 981d1bb8132..a9c30165cdd 100644 --- a/vendor/github.com/fsnotify/fsnotify/.travis.yml +++ b/vendor/github.com/fsnotify/fsnotify/.travis.yml @@ -2,29 +2,35 @@ sudo: false language: go go: - - 1.8.x - - 1.9.x - - tip + - "stable" + - "1.11.x" + - "1.10.x" + - "1.9.x" matrix: + include: + - go: "stable" + env: GOLINT=true allow_failures: - go: tip fast_finish: true -before_script: - - go get -u github.com/golang/lint/golint + +before_install: + - if [ ! -z "${GOLINT}" ]; then go get -u golang.org/x/lint/golint; fi script: - - go test -v --race ./... + - go test --race ./... after_script: - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" - - test -z "$(golint ./... | tee /dev/stderr)" + - if [ ! -z "${GOLINT}" ]; then echo running golint; golint --set_exit_status ./...; else echo skipping golint; fi - go vet ./... os: - linux - osx + - windows notifications: email: false diff --git a/vendor/github.com/fsnotify/fsnotify/LICENSE b/vendor/github.com/fsnotify/fsnotify/LICENSE index f21e5408009..e180c8fb059 100644 --- a/vendor/github.com/fsnotify/fsnotify/LICENSE +++ b/vendor/github.com/fsnotify/fsnotify/LICENSE @@ -1,5 +1,5 @@ Copyright (c) 2012 The Go Authors. All rights reserved. -Copyright (c) 2012 fsnotify Authors. All rights reserved. +Copyright (c) 2012-2019 fsnotify Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are diff --git a/vendor/github.com/fsnotify/fsnotify/README.md b/vendor/github.com/fsnotify/fsnotify/README.md index 3993207413a..b2629e5229c 100644 --- a/vendor/github.com/fsnotify/fsnotify/README.md +++ b/vendor/github.com/fsnotify/fsnotify/README.md @@ -10,16 +10,16 @@ go get -u golang.org/x/sys/... Cross platform: Windows, Linux, BSD and macOS. -|Adapter |OS |Status | -|----------|----------|----------| -|inotify |Linux 2.6.27 or later, Android\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)| -|kqueue |BSD, macOS, iOS\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)| -|ReadDirectoryChangesW|Windows|Supported [![Build status](https://ci.appveyor.com/api/projects/status/ivwjubaih4r0udeh/branch/master?svg=true)](https://ci.appveyor.com/project/NathanYoungman/fsnotify/branch/master)| -|FSEvents |macOS |[Planned](https://github.com/fsnotify/fsnotify/issues/11)| -|FEN |Solaris 11 |[In Progress](https://github.com/fsnotify/fsnotify/issues/12)| -|fanotify |Linux 2.6.37+ | | -|USN Journals |Windows |[Maybe](https://github.com/fsnotify/fsnotify/issues/53)| -|Polling |*All* |[Maybe](https://github.com/fsnotify/fsnotify/issues/9)| +| Adapter | OS | Status | +| --------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| inotify | Linux 2.6.27 or later, Android\* | Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify) | +| kqueue | BSD, macOS, iOS\* | Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify) | +| ReadDirectoryChangesW | Windows | Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify) | +| FSEvents | macOS | [Planned](https://github.com/fsnotify/fsnotify/issues/11) | +| FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/issues/12) | +| fanotify | Linux 2.6.37+ | [Planned](https://github.com/fsnotify/fsnotify/issues/114) | +| USN Journals | Windows | [Maybe](https://github.com/fsnotify/fsnotify/issues/53) | +| Polling | *All* | [Maybe](https://github.com/fsnotify/fsnotify/issues/9) | \* Android and iOS are untested. @@ -33,6 +33,53 @@ All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based o Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`. +## Usage + +```go +package main + +import ( + "log" + + "github.com/fsnotify/fsnotify" +) + +func main() { + watcher, err := fsnotify.NewWatcher() + if err != nil { + log.Fatal(err) + } + defer watcher.Close() + + done := make(chan bool) + go func() { + for { + select { + case event, ok := <-watcher.Events: + if !ok { + return + } + log.Println("event:", event) + if event.Op&fsnotify.Write == fsnotify.Write { + log.Println("modified file:", event.Name) + } + case err, ok := <-watcher.Errors: + if !ok { + return + } + log.Println("error:", err) + } + } + }() + + err = watcher.Add("/tmp/foo") + if err != nil { + log.Fatal(err) + } + <-done +} +``` + ## Contributing Please refer to [CONTRIBUTING][] before opening an issue or pull request. @@ -65,6 +112,10 @@ There are OS-specific limits as to how many watches can be created: * Linux: /proc/sys/fs/inotify/max_user_watches contains the limit, reaching this limit results in a "no space left on device" error. * BSD / OSX: sysctl variables "kern.maxfiles" and "kern.maxfilesperproc", reaching these limits results in a "too many open files" error. +**Why don't notifications work with NFS filesystems or filesystem in userspace (FUSE)?** + +fsnotify requires support from underlying OS to work. The current NFS protocol does not provide network level support for file notifications. + [#62]: https://github.com/howeyc/fsnotify/issues/62 [#18]: https://github.com/fsnotify/fsnotify/issues/18 [#11]: https://github.com/fsnotify/fsnotify/issues/11 diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/vendor/github.com/fsnotify/fsnotify/fsnotify.go index 190bf0de575..89cab046d12 100644 --- a/vendor/github.com/fsnotify/fsnotify/fsnotify.go +++ b/vendor/github.com/fsnotify/fsnotify/fsnotify.go @@ -63,4 +63,6 @@ func (e Event) String() string { } // Common errors that can be reported by a watcher -var ErrEventOverflow = errors.New("fsnotify queue overflow") +var ( + ErrEventOverflow = errors.New("fsnotify queue overflow") +) diff --git a/vendor/github.com/fsnotify/fsnotify/go.mod b/vendor/github.com/fsnotify/fsnotify/go.mod new file mode 100644 index 00000000000..ff11e13f224 --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/go.mod @@ -0,0 +1,5 @@ +module github.com/fsnotify/fsnotify + +go 1.13 + +require golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9 diff --git a/vendor/github.com/fsnotify/fsnotify/go.sum b/vendor/github.com/fsnotify/fsnotify/go.sum new file mode 100644 index 00000000000..f60af9855da --- /dev/null +++ b/vendor/github.com/fsnotify/fsnotify/go.sum @@ -0,0 +1,2 @@ +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9 h1:L2auWcuQIvxz9xSEqzESnV/QN/gNRXNApHi3fYwl2w0= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go b/vendor/github.com/fsnotify/fsnotify/inotify_poller.go index cc7db4b22ef..b33f2b4d4b7 100644 --- a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go +++ b/vendor/github.com/fsnotify/fsnotify/inotify_poller.go @@ -40,12 +40,12 @@ func newFdPoller(fd int) (*fdPoller, error) { poller.fd = fd // Create epoll fd - poller.epfd, errno = unix.EpollCreate1(0) + poller.epfd, errno = unix.EpollCreate1(unix.EPOLL_CLOEXEC) if poller.epfd == -1 { return nil, errno } // Create pipe; pipe[0] is the read end, pipe[1] the write end. - errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK) + errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK|unix.O_CLOEXEC) if errno != nil { return nil, errno } diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go b/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go index 7d8de14513e..2306c4620bf 100644 --- a/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go +++ b/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go @@ -8,4 +8,4 @@ package fsnotify import "golang.org/x/sys/unix" -const openMode = unix.O_NONBLOCK | unix.O_RDONLY +const openMode = unix.O_NONBLOCK | unix.O_RDONLY | unix.O_CLOEXEC diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go b/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go index 9139e17161b..870c4d6d184 100644 --- a/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go +++ b/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go @@ -9,4 +9,4 @@ package fsnotify import "golang.org/x/sys/unix" // note: this constant is not defined on BSD -const openMode = unix.O_EVTONLY +const openMode = unix.O_EVTONLY | unix.O_CLOEXEC diff --git a/vendor/github.com/fullsailor/pkcs7/.gitignore b/vendor/github.com/fullsailor/pkcs7/.gitignore new file mode 100644 index 00000000000..daf913b1b34 --- /dev/null +++ b/vendor/github.com/fullsailor/pkcs7/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/fullsailor/pkcs7/.travis.yml b/vendor/github.com/fullsailor/pkcs7/.travis.yml new file mode 100644 index 00000000000..bc120437630 --- /dev/null +++ b/vendor/github.com/fullsailor/pkcs7/.travis.yml @@ -0,0 +1,7 @@ +language: go + +go: + - 1.8 + - 1.9 + - "1.10" + - tip diff --git a/vendor/github.com/mattn/go-shellwords/LICENSE b/vendor/github.com/fullsailor/pkcs7/LICENSE similarity index 96% rename from vendor/github.com/mattn/go-shellwords/LICENSE rename to vendor/github.com/fullsailor/pkcs7/LICENSE index 740fa931322..75f3209085b 100644 --- a/vendor/github.com/mattn/go-shellwords/LICENSE +++ b/vendor/github.com/fullsailor/pkcs7/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2017 Yasuhiro Matsumoto +Copyright (c) 2015 Andrew Smith Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/vendor/github.com/fullsailor/pkcs7/README.md b/vendor/github.com/fullsailor/pkcs7/README.md new file mode 100644 index 00000000000..bfd948f321a --- /dev/null +++ b/vendor/github.com/fullsailor/pkcs7/README.md @@ -0,0 +1,8 @@ +# pkcs7 + +[![GoDoc](https://godoc.org/github.com/fullsailor/pkcs7?status.svg)](https://godoc.org/github.com/fullsailor/pkcs7) +[![Build Status](https://travis-ci.org/fullsailor/pkcs7.svg?branch=master)](https://travis-ci.org/fullsailor/pkcs7) + +pkcs7 implements parsing and creating signed and enveloped messages. + +- Documentation on [GoDoc](http://godoc.org/github.com/fullsailor/pkcs7) diff --git a/vendor/github.com/fullsailor/pkcs7/ber.go b/vendor/github.com/fullsailor/pkcs7/ber.go new file mode 100644 index 00000000000..89e96d30c79 --- /dev/null +++ b/vendor/github.com/fullsailor/pkcs7/ber.go @@ -0,0 +1,248 @@ +package pkcs7 + +import ( + "bytes" + "errors" +) + +// var encodeIndent = 0 + +type asn1Object interface { + EncodeTo(writer *bytes.Buffer) error +} + +type asn1Structured struct { + tagBytes []byte + content []asn1Object +} + +func (s asn1Structured) EncodeTo(out *bytes.Buffer) error { + //fmt.Printf("%s--> tag: % X\n", strings.Repeat("| ", encodeIndent), s.tagBytes) + //encodeIndent++ + inner := new(bytes.Buffer) + for _, obj := range s.content { + err := obj.EncodeTo(inner) + if err != nil { + return err + } + } + //encodeIndent-- + out.Write(s.tagBytes) + encodeLength(out, inner.Len()) + out.Write(inner.Bytes()) + return nil +} + +type asn1Primitive struct { + tagBytes []byte + length int + content []byte +} + +func (p asn1Primitive) EncodeTo(out *bytes.Buffer) error { + _, err := out.Write(p.tagBytes) + if err != nil { + return err + } + if err = encodeLength(out, p.length); err != nil { + return err + } + //fmt.Printf("%s--> tag: % X length: %d\n", strings.Repeat("| ", encodeIndent), p.tagBytes, p.length) + //fmt.Printf("%s--> content length: %d\n", strings.Repeat("| ", encodeIndent), len(p.content)) + out.Write(p.content) + + return nil +} + +func ber2der(ber []byte) ([]byte, error) { + if len(ber) == 0 { + return nil, errors.New("ber2der: input ber is empty") + } + //fmt.Printf("--> ber2der: Transcoding %d bytes\n", len(ber)) + out := new(bytes.Buffer) + + obj, _, err := readObject(ber, 0) + if err != nil { + return nil, err + } + obj.EncodeTo(out) + + // if offset < len(ber) { + // return nil, fmt.Errorf("ber2der: Content longer than expected. Got %d, expected %d", offset, len(ber)) + //} + + return out.Bytes(), nil +} + +// encodes lengths that are longer than 127 into string of bytes +func marshalLongLength(out *bytes.Buffer, i int) (err error) { + n := lengthLength(i) + + for ; n > 0; n-- { + err = out.WriteByte(byte(i >> uint((n-1)*8))) + if err != nil { + return + } + } + + return nil +} + +// computes the byte length of an encoded length value +func lengthLength(i int) (numBytes int) { + numBytes = 1 + for i > 255 { + numBytes++ + i >>= 8 + } + return +} + +// encodes the length in DER format +// If the length fits in 7 bits, the value is encoded directly. +// +// Otherwise, the number of bytes to encode the length is first determined. +// This number is likely to be 4 or less for a 32bit length. This number is +// added to 0x80. The length is encoded in big endian encoding follow after +// +// Examples: +// length | byte 1 | bytes n +// 0 | 0x00 | - +// 120 | 0x78 | - +// 200 | 0x81 | 0xC8 +// 500 | 0x82 | 0x01 0xF4 +// +func encodeLength(out *bytes.Buffer, length int) (err error) { + if length >= 128 { + l := lengthLength(length) + err = out.WriteByte(0x80 | byte(l)) + if err != nil { + return + } + err = marshalLongLength(out, length) + if err != nil { + return + } + } else { + err = out.WriteByte(byte(length)) + if err != nil { + return + } + } + return +} + +func readObject(ber []byte, offset int) (asn1Object, int, error) { + //fmt.Printf("\n====> Starting readObject at offset: %d\n\n", offset) + tagStart := offset + b := ber[offset] + offset++ + tag := b & 0x1F // last 5 bits + if tag == 0x1F { + tag = 0 + for ber[offset] >= 0x80 { + tag = tag*128 + ber[offset] - 0x80 + offset++ + } + tag = tag*128 + ber[offset] - 0x80 + offset++ + } + tagEnd := offset + + kind := b & 0x20 + /* + if kind == 0 { + fmt.Print("--> Primitive\n") + } else { + fmt.Print("--> Constructed\n") + } + */ + // read length + var length int + l := ber[offset] + offset++ + indefinite := false + if l > 0x80 { + numberOfBytes := (int)(l & 0x7F) + if numberOfBytes > 4 { // int is only guaranteed to be 32bit + return nil, 0, errors.New("ber2der: BER tag length too long") + } + if numberOfBytes == 4 && (int)(ber[offset]) > 0x7F { + return nil, 0, errors.New("ber2der: BER tag length is negative") + } + if 0x0 == (int)(ber[offset]) { + return nil, 0, errors.New("ber2der: BER tag length has leading zero") + } + //fmt.Printf("--> (compute length) indicator byte: %x\n", l) + //fmt.Printf("--> (compute length) length bytes: % X\n", ber[offset:offset+numberOfBytes]) + for i := 0; i < numberOfBytes; i++ { + length = length*256 + (int)(ber[offset]) + offset++ + } + } else if l == 0x80 { + indefinite = true + } else { + length = (int)(l) + } + + //fmt.Printf("--> length : %d\n", length) + contentEnd := offset + length + if contentEnd > len(ber) { + return nil, 0, errors.New("ber2der: BER tag length is more than available data") + } + //fmt.Printf("--> content start : %d\n", offset) + //fmt.Printf("--> content end : %d\n", contentEnd) + //fmt.Printf("--> content : % X\n", ber[offset:contentEnd]) + var obj asn1Object + if indefinite && kind == 0 { + return nil, 0, errors.New("ber2der: Indefinite form tag must have constructed encoding") + } + if kind == 0 { + obj = asn1Primitive{ + tagBytes: ber[tagStart:tagEnd], + length: length, + content: ber[offset:contentEnd], + } + } else { + var subObjects []asn1Object + for (offset < contentEnd) || indefinite { + var subObj asn1Object + var err error + subObj, offset, err = readObject(ber, offset) + if err != nil { + return nil, 0, err + } + subObjects = append(subObjects, subObj) + + if indefinite { + terminated, err := isIndefiniteTermination(ber, offset) + if err != nil { + return nil, 0, err + } + + if terminated { + break + } + } + } + obj = asn1Structured{ + tagBytes: ber[tagStart:tagEnd], + content: subObjects, + } + } + + // Apply indefinite form length with 0x0000 terminator. + if indefinite { + contentEnd = offset + 2 + } + + return obj, contentEnd, nil +} + +func isIndefiniteTermination(ber []byte, offset int) (bool, error) { + if len(ber) - offset < 2 { + return false, errors.New("ber2der: Invalid BER format") + } + + return bytes.Index(ber[offset:], []byte{0x0, 0x0}) == 0, nil +} diff --git a/vendor/github.com/fullsailor/pkcs7/pkcs7.go b/vendor/github.com/fullsailor/pkcs7/pkcs7.go new file mode 100644 index 00000000000..0264466b467 --- /dev/null +++ b/vendor/github.com/fullsailor/pkcs7/pkcs7.go @@ -0,0 +1,962 @@ +// Package pkcs7 implements parsing and generation of some PKCS#7 structures. +package pkcs7 + +import ( + "bytes" + "crypto" + "crypto/aes" + "crypto/cipher" + "crypto/des" + "crypto/hmac" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "crypto/x509/pkix" + "encoding/asn1" + "errors" + "fmt" + "math/big" + "sort" + "time" + + _ "crypto/sha1" // for crypto.SHA1 +) + +// PKCS7 Represents a PKCS7 structure +type PKCS7 struct { + Content []byte + Certificates []*x509.Certificate + CRLs []pkix.CertificateList + Signers []signerInfo + raw interface{} +} + +type contentInfo struct { + ContentType asn1.ObjectIdentifier + Content asn1.RawValue `asn1:"explicit,optional,tag:0"` +} + +// ErrUnsupportedContentType is returned when a PKCS7 content is not supported. +// Currently only Data (1.2.840.113549.1.7.1), Signed Data (1.2.840.113549.1.7.2), +// and Enveloped Data are supported (1.2.840.113549.1.7.3) +var ErrUnsupportedContentType = errors.New("pkcs7: cannot parse data: unimplemented content type") + +type unsignedData []byte + +var ( + oidData = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 1} + oidSignedData = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 2} + oidEnvelopedData = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 3} + oidSignedAndEnvelopedData = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 4} + oidDigestedData = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 5} + oidEncryptedData = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 6} + oidAttributeContentType = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 3} + oidAttributeMessageDigest = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 4} + oidAttributeSigningTime = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 5} +) + +type signedData struct { + Version int `asn1:"default:1"` + DigestAlgorithmIdentifiers []pkix.AlgorithmIdentifier `asn1:"set"` + ContentInfo contentInfo + Certificates rawCertificates `asn1:"optional,tag:0"` + CRLs []pkix.CertificateList `asn1:"optional,tag:1"` + SignerInfos []signerInfo `asn1:"set"` +} + +type rawCertificates struct { + Raw asn1.RawContent +} + +type envelopedData struct { + Version int + RecipientInfos []recipientInfo `asn1:"set"` + EncryptedContentInfo encryptedContentInfo +} + +type recipientInfo struct { + Version int + IssuerAndSerialNumber issuerAndSerial + KeyEncryptionAlgorithm pkix.AlgorithmIdentifier + EncryptedKey []byte +} + +type encryptedContentInfo struct { + ContentType asn1.ObjectIdentifier + ContentEncryptionAlgorithm pkix.AlgorithmIdentifier + EncryptedContent asn1.RawValue `asn1:"tag:0,optional"` +} + +type attribute struct { + Type asn1.ObjectIdentifier + Value asn1.RawValue `asn1:"set"` +} + +type issuerAndSerial struct { + IssuerName asn1.RawValue + SerialNumber *big.Int +} + +// MessageDigestMismatchError is returned when the signer data digest does not +// match the computed digest for the contained content +type MessageDigestMismatchError struct { + ExpectedDigest []byte + ActualDigest []byte +} + +func (err *MessageDigestMismatchError) Error() string { + return fmt.Sprintf("pkcs7: Message digest mismatch\n\tExpected: %X\n\tActual : %X", err.ExpectedDigest, err.ActualDigest) +} + +type signerInfo struct { + Version int `asn1:"default:1"` + IssuerAndSerialNumber issuerAndSerial + DigestAlgorithm pkix.AlgorithmIdentifier + AuthenticatedAttributes []attribute `asn1:"optional,tag:0"` + DigestEncryptionAlgorithm pkix.AlgorithmIdentifier + EncryptedDigest []byte + UnauthenticatedAttributes []attribute `asn1:"optional,tag:1"` +} + +// Parse decodes a DER encoded PKCS7 package +func Parse(data []byte) (p7 *PKCS7, err error) { + if len(data) == 0 { + return nil, errors.New("pkcs7: input data is empty") + } + var info contentInfo + der, err := ber2der(data) + if err != nil { + return nil, err + } + rest, err := asn1.Unmarshal(der, &info) + if len(rest) > 0 { + err = asn1.SyntaxError{Msg: "trailing data"} + return + } + if err != nil { + return + } + + // fmt.Printf("--> Content Type: %s", info.ContentType) + switch { + case info.ContentType.Equal(oidSignedData): + return parseSignedData(info.Content.Bytes) + case info.ContentType.Equal(oidEnvelopedData): + return parseEnvelopedData(info.Content.Bytes) + } + return nil, ErrUnsupportedContentType +} + +func parseSignedData(data []byte) (*PKCS7, error) { + var sd signedData + asn1.Unmarshal(data, &sd) + certs, err := sd.Certificates.Parse() + if err != nil { + return nil, err + } + // fmt.Printf("--> Signed Data Version %d\n", sd.Version) + + var compound asn1.RawValue + var content unsignedData + + // The Content.Bytes maybe empty on PKI responses. + if len(sd.ContentInfo.Content.Bytes) > 0 { + if _, err := asn1.Unmarshal(sd.ContentInfo.Content.Bytes, &compound); err != nil { + return nil, err + } + } + // Compound octet string + if compound.IsCompound { + if _, err = asn1.Unmarshal(compound.Bytes, &content); err != nil { + return nil, err + } + } else { + // assuming this is tag 04 + content = compound.Bytes + } + return &PKCS7{ + Content: content, + Certificates: certs, + CRLs: sd.CRLs, + Signers: sd.SignerInfos, + raw: sd}, nil +} + +func (raw rawCertificates) Parse() ([]*x509.Certificate, error) { + if len(raw.Raw) == 0 { + return nil, nil + } + + var val asn1.RawValue + if _, err := asn1.Unmarshal(raw.Raw, &val); err != nil { + return nil, err + } + + return x509.ParseCertificates(val.Bytes) +} + +func parseEnvelopedData(data []byte) (*PKCS7, error) { + var ed envelopedData + if _, err := asn1.Unmarshal(data, &ed); err != nil { + return nil, err + } + return &PKCS7{ + raw: ed, + }, nil +} + +// Verify checks the signatures of a PKCS7 object +// WARNING: Verify does not check signing time or verify certificate chains at +// this time. +func (p7 *PKCS7) Verify() (err error) { + if len(p7.Signers) == 0 { + return errors.New("pkcs7: Message has no signers") + } + for _, signer := range p7.Signers { + if err := verifySignature(p7, signer); err != nil { + return err + } + } + return nil +} + +func verifySignature(p7 *PKCS7, signer signerInfo) error { + signedData := p7.Content + hash, err := getHashForOID(signer.DigestAlgorithm.Algorithm) + if err != nil { + return err + } + if len(signer.AuthenticatedAttributes) > 0 { + // TODO(fullsailor): First check the content type match + var digest []byte + err := unmarshalAttribute(signer.AuthenticatedAttributes, oidAttributeMessageDigest, &digest) + if err != nil { + return err + } + h := hash.New() + h.Write(p7.Content) + computed := h.Sum(nil) + if !hmac.Equal(digest, computed) { + return &MessageDigestMismatchError{ + ExpectedDigest: digest, + ActualDigest: computed, + } + } + // TODO(fullsailor): Optionally verify certificate chain + // TODO(fullsailor): Optionally verify signingTime against certificate NotAfter/NotBefore + signedData, err = marshalAttributes(signer.AuthenticatedAttributes) + if err != nil { + return err + } + } + cert := getCertFromCertsByIssuerAndSerial(p7.Certificates, signer.IssuerAndSerialNumber) + if cert == nil { + return errors.New("pkcs7: No certificate for signer") + } + + algo := getSignatureAlgorithmFromAI(signer.DigestEncryptionAlgorithm) + if algo == x509.UnknownSignatureAlgorithm { + // I'm not sure what the spec here is, and the openssl sources were not + // helpful. But, this is what App Store receipts appear to do. + // The DigestEncryptionAlgorithm is just "rsaEncryption (PKCS #1)" + // But we're expecting a digest + encryption algorithm. So... we're going + // to determine an algorithm based on the DigestAlgorithm and this + // encryption algorithm. + if signer.DigestEncryptionAlgorithm.Algorithm.Equal(oidEncryptionAlgorithmRSA) { + algo = getRSASignatureAlgorithmForDigestAlgorithm(hash) + } + } + return cert.CheckSignature(algo, signedData, signer.EncryptedDigest) +} + +func marshalAttributes(attrs []attribute) ([]byte, error) { + encodedAttributes, err := asn1.Marshal(struct { + A []attribute `asn1:"set"` + }{A: attrs}) + if err != nil { + return nil, err + } + + // Remove the leading sequence octets + var raw asn1.RawValue + asn1.Unmarshal(encodedAttributes, &raw) + return raw.Bytes, nil +} + +var ( + oidDigestAlgorithmSHA1 = asn1.ObjectIdentifier{1, 3, 14, 3, 2, 26} + oidEncryptionAlgorithmRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 1} +) + +func getCertFromCertsByIssuerAndSerial(certs []*x509.Certificate, ias issuerAndSerial) *x509.Certificate { + for _, cert := range certs { + if isCertMatchForIssuerAndSerial(cert, ias) { + return cert + } + } + return nil +} + +func getHashForOID(oid asn1.ObjectIdentifier) (crypto.Hash, error) { + switch { + case oid.Equal(oidDigestAlgorithmSHA1): + return crypto.SHA1, nil + case oid.Equal(oidSHA256): + return crypto.SHA256, nil + } + return crypto.Hash(0), ErrUnsupportedAlgorithm +} + +func getRSASignatureAlgorithmForDigestAlgorithm(hash crypto.Hash) x509.SignatureAlgorithm { + for _, details := range signatureAlgorithmDetails { + if details.pubKeyAlgo == x509.RSA && details.hash == hash { + return details.algo + } + } + return x509.UnknownSignatureAlgorithm +} + +// GetOnlySigner returns an x509.Certificate for the first signer of the signed +// data payload. If there are more or less than one signer, nil is returned +func (p7 *PKCS7) GetOnlySigner() *x509.Certificate { + if len(p7.Signers) != 1 { + return nil + } + signer := p7.Signers[0] + return getCertFromCertsByIssuerAndSerial(p7.Certificates, signer.IssuerAndSerialNumber) +} + +// ErrUnsupportedAlgorithm tells you when our quick dev assumptions have failed +var ErrUnsupportedAlgorithm = errors.New("pkcs7: cannot decrypt data: only RSA, DES, DES-EDE3, AES-256-CBC and AES-128-GCM supported") + +// ErrNotEncryptedContent is returned when attempting to Decrypt data that is not encrypted data +var ErrNotEncryptedContent = errors.New("pkcs7: content data is a decryptable data type") + +// Decrypt decrypts encrypted content info for recipient cert and private key +func (p7 *PKCS7) Decrypt(cert *x509.Certificate, pk crypto.PrivateKey) ([]byte, error) { + data, ok := p7.raw.(envelopedData) + if !ok { + return nil, ErrNotEncryptedContent + } + recipient := selectRecipientForCertificate(data.RecipientInfos, cert) + if recipient.EncryptedKey == nil { + return nil, errors.New("pkcs7: no enveloped recipient for provided certificate") + } + if priv := pk.(*rsa.PrivateKey); priv != nil { + var contentKey []byte + contentKey, err := rsa.DecryptPKCS1v15(rand.Reader, priv, recipient.EncryptedKey) + if err != nil { + return nil, err + } + return data.EncryptedContentInfo.decrypt(contentKey) + } + fmt.Printf("Unsupported Private Key: %v\n", pk) + return nil, ErrUnsupportedAlgorithm +} + +var oidEncryptionAlgorithmDESCBC = asn1.ObjectIdentifier{1, 3, 14, 3, 2, 7} +var oidEncryptionAlgorithmDESEDE3CBC = asn1.ObjectIdentifier{1, 2, 840, 113549, 3, 7} +var oidEncryptionAlgorithmAES256CBC = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 42} +var oidEncryptionAlgorithmAES128GCM = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 6} +var oidEncryptionAlgorithmAES128CBC = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 2} + +func (eci encryptedContentInfo) decrypt(key []byte) ([]byte, error) { + alg := eci.ContentEncryptionAlgorithm.Algorithm + if !alg.Equal(oidEncryptionAlgorithmDESCBC) && + !alg.Equal(oidEncryptionAlgorithmDESEDE3CBC) && + !alg.Equal(oidEncryptionAlgorithmAES256CBC) && + !alg.Equal(oidEncryptionAlgorithmAES128CBC) && + !alg.Equal(oidEncryptionAlgorithmAES128GCM) { + fmt.Printf("Unsupported Content Encryption Algorithm: %s\n", alg) + return nil, ErrUnsupportedAlgorithm + } + + // EncryptedContent can either be constructed of multple OCTET STRINGs + // or _be_ a tagged OCTET STRING + var cyphertext []byte + if eci.EncryptedContent.IsCompound { + // Complex case to concat all of the children OCTET STRINGs + var buf bytes.Buffer + cypherbytes := eci.EncryptedContent.Bytes + for { + var part []byte + cypherbytes, _ = asn1.Unmarshal(cypherbytes, &part) + buf.Write(part) + if cypherbytes == nil { + break + } + } + cyphertext = buf.Bytes() + } else { + // Simple case, the bytes _are_ the cyphertext + cyphertext = eci.EncryptedContent.Bytes + } + + var block cipher.Block + var err error + + switch { + case alg.Equal(oidEncryptionAlgorithmDESCBC): + block, err = des.NewCipher(key) + case alg.Equal(oidEncryptionAlgorithmDESEDE3CBC): + block, err = des.NewTripleDESCipher(key) + case alg.Equal(oidEncryptionAlgorithmAES256CBC): + fallthrough + case alg.Equal(oidEncryptionAlgorithmAES128GCM), alg.Equal(oidEncryptionAlgorithmAES128CBC): + block, err = aes.NewCipher(key) + } + + if err != nil { + return nil, err + } + + if alg.Equal(oidEncryptionAlgorithmAES128GCM) { + params := aesGCMParameters{} + paramBytes := eci.ContentEncryptionAlgorithm.Parameters.Bytes + + _, err := asn1.Unmarshal(paramBytes, ¶ms) + if err != nil { + return nil, err + } + + gcm, err := cipher.NewGCM(block) + if err != nil { + return nil, err + } + + if len(params.Nonce) != gcm.NonceSize() { + return nil, errors.New("pkcs7: encryption algorithm parameters are incorrect") + } + if params.ICVLen != gcm.Overhead() { + return nil, errors.New("pkcs7: encryption algorithm parameters are incorrect") + } + + plaintext, err := gcm.Open(nil, params.Nonce, cyphertext, nil) + if err != nil { + return nil, err + } + + return plaintext, nil + } + + iv := eci.ContentEncryptionAlgorithm.Parameters.Bytes + if len(iv) != block.BlockSize() { + return nil, errors.New("pkcs7: encryption algorithm parameters are malformed") + } + mode := cipher.NewCBCDecrypter(block, iv) + plaintext := make([]byte, len(cyphertext)) + mode.CryptBlocks(plaintext, cyphertext) + if plaintext, err = unpad(plaintext, mode.BlockSize()); err != nil { + return nil, err + } + return plaintext, nil +} + +func selectRecipientForCertificate(recipients []recipientInfo, cert *x509.Certificate) recipientInfo { + for _, recp := range recipients { + if isCertMatchForIssuerAndSerial(cert, recp.IssuerAndSerialNumber) { + return recp + } + } + return recipientInfo{} +} + +func isCertMatchForIssuerAndSerial(cert *x509.Certificate, ias issuerAndSerial) bool { + return cert.SerialNumber.Cmp(ias.SerialNumber) == 0 && bytes.Compare(cert.RawIssuer, ias.IssuerName.FullBytes) == 0 +} + +func pad(data []byte, blocklen int) ([]byte, error) { + if blocklen < 1 { + return nil, fmt.Errorf("invalid blocklen %d", blocklen) + } + padlen := blocklen - (len(data) % blocklen) + if padlen == 0 { + padlen = blocklen + } + pad := bytes.Repeat([]byte{byte(padlen)}, padlen) + return append(data, pad...), nil +} + +func unpad(data []byte, blocklen int) ([]byte, error) { + if blocklen < 1 { + return nil, fmt.Errorf("invalid blocklen %d", blocklen) + } + if len(data)%blocklen != 0 || len(data) == 0 { + return nil, fmt.Errorf("invalid data len %d", len(data)) + } + + // the last byte is the length of padding + padlen := int(data[len(data)-1]) + + // check padding integrity, all bytes should be the same + pad := data[len(data)-padlen:] + for _, padbyte := range pad { + if padbyte != byte(padlen) { + return nil, errors.New("invalid padding") + } + } + + return data[:len(data)-padlen], nil +} + +func unmarshalAttribute(attrs []attribute, attributeType asn1.ObjectIdentifier, out interface{}) error { + for _, attr := range attrs { + if attr.Type.Equal(attributeType) { + _, err := asn1.Unmarshal(attr.Value.Bytes, out) + return err + } + } + return errors.New("pkcs7: attribute type not in attributes") +} + +// UnmarshalSignedAttribute decodes a single attribute from the signer info +func (p7 *PKCS7) UnmarshalSignedAttribute(attributeType asn1.ObjectIdentifier, out interface{}) error { + sd, ok := p7.raw.(signedData) + if !ok { + return errors.New("pkcs7: payload is not signedData content") + } + if len(sd.SignerInfos) < 1 { + return errors.New("pkcs7: payload has no signers") + } + attributes := sd.SignerInfos[0].AuthenticatedAttributes + return unmarshalAttribute(attributes, attributeType, out) +} + +// SignedData is an opaque data structure for creating signed data payloads +type SignedData struct { + sd signedData + certs []*x509.Certificate + messageDigest []byte +} + +// Attribute represents a key value pair attribute. Value must be marshalable byte +// `encoding/asn1` +type Attribute struct { + Type asn1.ObjectIdentifier + Value interface{} +} + +// SignerInfoConfig are optional values to include when adding a signer +type SignerInfoConfig struct { + ExtraSignedAttributes []Attribute +} + +// NewSignedData initializes a SignedData with content +func NewSignedData(data []byte) (*SignedData, error) { + content, err := asn1.Marshal(data) + if err != nil { + return nil, err + } + ci := contentInfo{ + ContentType: oidData, + Content: asn1.RawValue{Class: 2, Tag: 0, Bytes: content, IsCompound: true}, + } + digAlg := pkix.AlgorithmIdentifier{ + Algorithm: oidDigestAlgorithmSHA1, + } + h := crypto.SHA1.New() + h.Write(data) + md := h.Sum(nil) + sd := signedData{ + ContentInfo: ci, + Version: 1, + DigestAlgorithmIdentifiers: []pkix.AlgorithmIdentifier{digAlg}, + } + return &SignedData{sd: sd, messageDigest: md}, nil +} + +type attributes struct { + types []asn1.ObjectIdentifier + values []interface{} +} + +// Add adds the attribute, maintaining insertion order +func (attrs *attributes) Add(attrType asn1.ObjectIdentifier, value interface{}) { + attrs.types = append(attrs.types, attrType) + attrs.values = append(attrs.values, value) +} + +type sortableAttribute struct { + SortKey []byte + Attribute attribute +} + +type attributeSet []sortableAttribute + +func (sa attributeSet) Len() int { + return len(sa) +} + +func (sa attributeSet) Less(i, j int) bool { + return bytes.Compare(sa[i].SortKey, sa[j].SortKey) < 0 +} + +func (sa attributeSet) Swap(i, j int) { + sa[i], sa[j] = sa[j], sa[i] +} + +func (sa attributeSet) Attributes() []attribute { + attrs := make([]attribute, len(sa)) + for i, attr := range sa { + attrs[i] = attr.Attribute + } + return attrs +} + +func (attrs *attributes) ForMarshaling() ([]attribute, error) { + sortables := make(attributeSet, len(attrs.types)) + for i := range sortables { + attrType := attrs.types[i] + attrValue := attrs.values[i] + asn1Value, err := asn1.Marshal(attrValue) + if err != nil { + return nil, err + } + attr := attribute{ + Type: attrType, + Value: asn1.RawValue{Tag: 17, IsCompound: true, Bytes: asn1Value}, // 17 == SET tag + } + encoded, err := asn1.Marshal(attr) + if err != nil { + return nil, err + } + sortables[i] = sortableAttribute{ + SortKey: encoded, + Attribute: attr, + } + } + sort.Sort(sortables) + return sortables.Attributes(), nil +} + +// AddSigner signs attributes about the content and adds certificate to payload +func (sd *SignedData) AddSigner(cert *x509.Certificate, pkey crypto.PrivateKey, config SignerInfoConfig) error { + attrs := &attributes{} + attrs.Add(oidAttributeContentType, sd.sd.ContentInfo.ContentType) + attrs.Add(oidAttributeMessageDigest, sd.messageDigest) + attrs.Add(oidAttributeSigningTime, time.Now()) + for _, attr := range config.ExtraSignedAttributes { + attrs.Add(attr.Type, attr.Value) + } + finalAttrs, err := attrs.ForMarshaling() + if err != nil { + return err + } + signature, err := signAttributes(finalAttrs, pkey, crypto.SHA1) + if err != nil { + return err + } + + ias, err := cert2issuerAndSerial(cert) + if err != nil { + return err + } + + signer := signerInfo{ + AuthenticatedAttributes: finalAttrs, + DigestAlgorithm: pkix.AlgorithmIdentifier{Algorithm: oidDigestAlgorithmSHA1}, + DigestEncryptionAlgorithm: pkix.AlgorithmIdentifier{Algorithm: oidSignatureSHA1WithRSA}, + IssuerAndSerialNumber: ias, + EncryptedDigest: signature, + Version: 1, + } + // create signature of signed attributes + sd.certs = append(sd.certs, cert) + sd.sd.SignerInfos = append(sd.sd.SignerInfos, signer) + return nil +} + +// AddCertificate adds the certificate to the payload. Useful for parent certificates +func (sd *SignedData) AddCertificate(cert *x509.Certificate) { + sd.certs = append(sd.certs, cert) +} + +// Detach removes content from the signed data struct to make it a detached signature. +// This must be called right before Finish() +func (sd *SignedData) Detach() { + sd.sd.ContentInfo = contentInfo{ContentType: oidData} +} + +// Finish marshals the content and its signers +func (sd *SignedData) Finish() ([]byte, error) { + sd.sd.Certificates = marshalCertificates(sd.certs) + inner, err := asn1.Marshal(sd.sd) + if err != nil { + return nil, err + } + outer := contentInfo{ + ContentType: oidSignedData, + Content: asn1.RawValue{Class: 2, Tag: 0, Bytes: inner, IsCompound: true}, + } + return asn1.Marshal(outer) +} + +func cert2issuerAndSerial(cert *x509.Certificate) (issuerAndSerial, error) { + var ias issuerAndSerial + // The issuer RDNSequence has to match exactly the sequence in the certificate + // We cannot use cert.Issuer.ToRDNSequence() here since it mangles the sequence + ias.IssuerName = asn1.RawValue{FullBytes: cert.RawIssuer} + ias.SerialNumber = cert.SerialNumber + + return ias, nil +} + +// signs the DER encoded form of the attributes with the private key +func signAttributes(attrs []attribute, pkey crypto.PrivateKey, hash crypto.Hash) ([]byte, error) { + attrBytes, err := marshalAttributes(attrs) + if err != nil { + return nil, err + } + h := hash.New() + h.Write(attrBytes) + hashed := h.Sum(nil) + switch priv := pkey.(type) { + case *rsa.PrivateKey: + return rsa.SignPKCS1v15(rand.Reader, priv, crypto.SHA1, hashed) + } + return nil, ErrUnsupportedAlgorithm +} + +// concats and wraps the certificates in the RawValue structure +func marshalCertificates(certs []*x509.Certificate) rawCertificates { + var buf bytes.Buffer + for _, cert := range certs { + buf.Write(cert.Raw) + } + rawCerts, _ := marshalCertificateBytes(buf.Bytes()) + return rawCerts +} + +// Even though, the tag & length are stripped out during marshalling the +// RawContent, we have to encode it into the RawContent. If its missing, +// then `asn1.Marshal()` will strip out the certificate wrapper instead. +func marshalCertificateBytes(certs []byte) (rawCertificates, error) { + var val = asn1.RawValue{Bytes: certs, Class: 2, Tag: 0, IsCompound: true} + b, err := asn1.Marshal(val) + if err != nil { + return rawCertificates{}, err + } + return rawCertificates{Raw: b}, nil +} + +// DegenerateCertificate creates a signed data structure containing only the +// provided certificate or certificate chain. +func DegenerateCertificate(cert []byte) ([]byte, error) { + rawCert, err := marshalCertificateBytes(cert) + if err != nil { + return nil, err + } + emptyContent := contentInfo{ContentType: oidData} + sd := signedData{ + Version: 1, + ContentInfo: emptyContent, + Certificates: rawCert, + CRLs: []pkix.CertificateList{}, + } + content, err := asn1.Marshal(sd) + if err != nil { + return nil, err + } + signedContent := contentInfo{ + ContentType: oidSignedData, + Content: asn1.RawValue{Class: 2, Tag: 0, Bytes: content, IsCompound: true}, + } + return asn1.Marshal(signedContent) +} + +const ( + EncryptionAlgorithmDESCBC = iota + EncryptionAlgorithmAES128GCM +) + +// ContentEncryptionAlgorithm determines the algorithm used to encrypt the +// plaintext message. Change the value of this variable to change which +// algorithm is used in the Encrypt() function. +var ContentEncryptionAlgorithm = EncryptionAlgorithmDESCBC + +// ErrUnsupportedEncryptionAlgorithm is returned when attempting to encrypt +// content with an unsupported algorithm. +var ErrUnsupportedEncryptionAlgorithm = errors.New("pkcs7: cannot encrypt content: only DES-CBC and AES-128-GCM supported") + +const nonceSize = 12 + +type aesGCMParameters struct { + Nonce []byte `asn1:"tag:4"` + ICVLen int +} + +func encryptAES128GCM(content []byte) ([]byte, *encryptedContentInfo, error) { + // Create AES key and nonce + key := make([]byte, 16) + nonce := make([]byte, nonceSize) + + _, err := rand.Read(key) + if err != nil { + return nil, nil, err + } + + _, err = rand.Read(nonce) + if err != nil { + return nil, nil, err + } + + // Encrypt content + block, err := aes.NewCipher(key) + if err != nil { + return nil, nil, err + } + + gcm, err := cipher.NewGCM(block) + if err != nil { + return nil, nil, err + } + + ciphertext := gcm.Seal(nil, nonce, content, nil) + + // Prepare ASN.1 Encrypted Content Info + paramSeq := aesGCMParameters{ + Nonce: nonce, + ICVLen: gcm.Overhead(), + } + + paramBytes, err := asn1.Marshal(paramSeq) + if err != nil { + return nil, nil, err + } + + eci := encryptedContentInfo{ + ContentType: oidData, + ContentEncryptionAlgorithm: pkix.AlgorithmIdentifier{ + Algorithm: oidEncryptionAlgorithmAES128GCM, + Parameters: asn1.RawValue{ + Tag: asn1.TagSequence, + Bytes: paramBytes, + }, + }, + EncryptedContent: marshalEncryptedContent(ciphertext), + } + + return key, &eci, nil +} + +func encryptDESCBC(content []byte) ([]byte, *encryptedContentInfo, error) { + // Create DES key & CBC IV + key := make([]byte, 8) + iv := make([]byte, des.BlockSize) + _, err := rand.Read(key) + if err != nil { + return nil, nil, err + } + _, err = rand.Read(iv) + if err != nil { + return nil, nil, err + } + + // Encrypt padded content + block, err := des.NewCipher(key) + if err != nil { + return nil, nil, err + } + mode := cipher.NewCBCEncrypter(block, iv) + plaintext, err := pad(content, mode.BlockSize()) + cyphertext := make([]byte, len(plaintext)) + mode.CryptBlocks(cyphertext, plaintext) + + // Prepare ASN.1 Encrypted Content Info + eci := encryptedContentInfo{ + ContentType: oidData, + ContentEncryptionAlgorithm: pkix.AlgorithmIdentifier{ + Algorithm: oidEncryptionAlgorithmDESCBC, + Parameters: asn1.RawValue{Tag: 4, Bytes: iv}, + }, + EncryptedContent: marshalEncryptedContent(cyphertext), + } + + return key, &eci, nil +} + +// Encrypt creates and returns an envelope data PKCS7 structure with encrypted +// recipient keys for each recipient public key. +// +// The algorithm used to perform encryption is determined by the current value +// of the global ContentEncryptionAlgorithm package variable. By default, the +// value is EncryptionAlgorithmDESCBC. To use a different algorithm, change the +// value before calling Encrypt(). For example: +// +// ContentEncryptionAlgorithm = EncryptionAlgorithmAES128GCM +// +// TODO(fullsailor): Add support for encrypting content with other algorithms +func Encrypt(content []byte, recipients []*x509.Certificate) ([]byte, error) { + var eci *encryptedContentInfo + var key []byte + var err error + + // Apply chosen symmetric encryption method + switch ContentEncryptionAlgorithm { + case EncryptionAlgorithmDESCBC: + key, eci, err = encryptDESCBC(content) + + case EncryptionAlgorithmAES128GCM: + key, eci, err = encryptAES128GCM(content) + + default: + return nil, ErrUnsupportedEncryptionAlgorithm + } + + if err != nil { + return nil, err + } + + // Prepare each recipient's encrypted cipher key + recipientInfos := make([]recipientInfo, len(recipients)) + for i, recipient := range recipients { + encrypted, err := encryptKey(key, recipient) + if err != nil { + return nil, err + } + ias, err := cert2issuerAndSerial(recipient) + if err != nil { + return nil, err + } + info := recipientInfo{ + Version: 0, + IssuerAndSerialNumber: ias, + KeyEncryptionAlgorithm: pkix.AlgorithmIdentifier{ + Algorithm: oidEncryptionAlgorithmRSA, + }, + EncryptedKey: encrypted, + } + recipientInfos[i] = info + } + + // Prepare envelope content + envelope := envelopedData{ + EncryptedContentInfo: *eci, + Version: 0, + RecipientInfos: recipientInfos, + } + innerContent, err := asn1.Marshal(envelope) + if err != nil { + return nil, err + } + + // Prepare outer payload structure + wrapper := contentInfo{ + ContentType: oidEnvelopedData, + Content: asn1.RawValue{Class: 2, Tag: 0, IsCompound: true, Bytes: innerContent}, + } + + return asn1.Marshal(wrapper) +} + +func marshalEncryptedContent(content []byte) asn1.RawValue { + asn1Content, _ := asn1.Marshal(content) + return asn1.RawValue{Tag: 0, Class: 2, Bytes: asn1Content, IsCompound: true} +} + +func encryptKey(key []byte, recipient *x509.Certificate) ([]byte, error) { + if pub := recipient.PublicKey.(*rsa.PublicKey); pub != nil { + return rsa.EncryptPKCS1v15(rand.Reader, pub, key) + } + return nil, ErrUnsupportedAlgorithm +} diff --git a/vendor/github.com/fullsailor/pkcs7/x509.go b/vendor/github.com/fullsailor/pkcs7/x509.go new file mode 100644 index 00000000000..195fd0e4bb0 --- /dev/null +++ b/vendor/github.com/fullsailor/pkcs7/x509.go @@ -0,0 +1,133 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the go/golang LICENSE file. + +package pkcs7 + +// These are private constants and functions from the crypto/x509 package that +// are useful when dealing with signatures verified by x509 certificates + +import ( + "bytes" + "crypto" + "crypto/x509" + "crypto/x509/pkix" + "encoding/asn1" +) + +var ( + oidSignatureMD2WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 2} + oidSignatureMD5WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 4} + oidSignatureSHA1WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 5} + oidSignatureSHA256WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 11} + oidSignatureSHA384WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 12} + oidSignatureSHA512WithRSA = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 13} + oidSignatureRSAPSS = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 10} + oidSignatureDSAWithSHA1 = asn1.ObjectIdentifier{1, 2, 840, 10040, 4, 3} + oidSignatureDSAWithSHA256 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 3, 2} + oidSignatureECDSAWithSHA1 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 1} + oidSignatureECDSAWithSHA256 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 2} + oidSignatureECDSAWithSHA384 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 3} + oidSignatureECDSAWithSHA512 = asn1.ObjectIdentifier{1, 2, 840, 10045, 4, 3, 4} + + oidSHA256 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 2, 1} + oidSHA384 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 2, 2} + oidSHA512 = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 2, 3} + + oidMGF1 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 1, 8} + + // oidISOSignatureSHA1WithRSA means the same as oidSignatureSHA1WithRSA + // but it's specified by ISO. Microsoft's makecert.exe has been known + // to produce certificates with this OID. + oidISOSignatureSHA1WithRSA = asn1.ObjectIdentifier{1, 3, 14, 3, 2, 29} +) + +var signatureAlgorithmDetails = []struct { + algo x509.SignatureAlgorithm + name string + oid asn1.ObjectIdentifier + pubKeyAlgo x509.PublicKeyAlgorithm + hash crypto.Hash +}{ + {x509.MD2WithRSA, "MD2-RSA", oidSignatureMD2WithRSA, x509.RSA, crypto.Hash(0) /* no value for MD2 */}, + {x509.MD5WithRSA, "MD5-RSA", oidSignatureMD5WithRSA, x509.RSA, crypto.MD5}, + {x509.SHA1WithRSA, "SHA1-RSA", oidSignatureSHA1WithRSA, x509.RSA, crypto.SHA1}, + {x509.SHA1WithRSA, "SHA1-RSA", oidISOSignatureSHA1WithRSA, x509.RSA, crypto.SHA1}, + {x509.SHA256WithRSA, "SHA256-RSA", oidSignatureSHA256WithRSA, x509.RSA, crypto.SHA256}, + {x509.SHA384WithRSA, "SHA384-RSA", oidSignatureSHA384WithRSA, x509.RSA, crypto.SHA384}, + {x509.SHA512WithRSA, "SHA512-RSA", oidSignatureSHA512WithRSA, x509.RSA, crypto.SHA512}, + {x509.SHA256WithRSAPSS, "SHA256-RSAPSS", oidSignatureRSAPSS, x509.RSA, crypto.SHA256}, + {x509.SHA384WithRSAPSS, "SHA384-RSAPSS", oidSignatureRSAPSS, x509.RSA, crypto.SHA384}, + {x509.SHA512WithRSAPSS, "SHA512-RSAPSS", oidSignatureRSAPSS, x509.RSA, crypto.SHA512}, + {x509.DSAWithSHA1, "DSA-SHA1", oidSignatureDSAWithSHA1, x509.DSA, crypto.SHA1}, + {x509.DSAWithSHA256, "DSA-SHA256", oidSignatureDSAWithSHA256, x509.DSA, crypto.SHA256}, + {x509.ECDSAWithSHA1, "ECDSA-SHA1", oidSignatureECDSAWithSHA1, x509.ECDSA, crypto.SHA1}, + {x509.ECDSAWithSHA256, "ECDSA-SHA256", oidSignatureECDSAWithSHA256, x509.ECDSA, crypto.SHA256}, + {x509.ECDSAWithSHA384, "ECDSA-SHA384", oidSignatureECDSAWithSHA384, x509.ECDSA, crypto.SHA384}, + {x509.ECDSAWithSHA512, "ECDSA-SHA512", oidSignatureECDSAWithSHA512, x509.ECDSA, crypto.SHA512}, +} + +// pssParameters reflects the parameters in an AlgorithmIdentifier that +// specifies RSA PSS. See https://tools.ietf.org/html/rfc3447#appendix-A.2.3 +type pssParameters struct { + // The following three fields are not marked as + // optional because the default values specify SHA-1, + // which is no longer suitable for use in signatures. + Hash pkix.AlgorithmIdentifier `asn1:"explicit,tag:0"` + MGF pkix.AlgorithmIdentifier `asn1:"explicit,tag:1"` + SaltLength int `asn1:"explicit,tag:2"` + TrailerField int `asn1:"optional,explicit,tag:3,default:1"` +} + +// asn1.NullBytes is not available prior to Go 1.9 +var nullBytes = []byte{5, 0} + +func getSignatureAlgorithmFromAI(ai pkix.AlgorithmIdentifier) x509.SignatureAlgorithm { + if !ai.Algorithm.Equal(oidSignatureRSAPSS) { + for _, details := range signatureAlgorithmDetails { + if ai.Algorithm.Equal(details.oid) { + return details.algo + } + } + return x509.UnknownSignatureAlgorithm + } + + // RSA PSS is special because it encodes important parameters + // in the Parameters. + + var params pssParameters + if _, err := asn1.Unmarshal(ai.Parameters.FullBytes, ¶ms); err != nil { + return x509.UnknownSignatureAlgorithm + } + + var mgf1HashFunc pkix.AlgorithmIdentifier + if _, err := asn1.Unmarshal(params.MGF.Parameters.FullBytes, &mgf1HashFunc); err != nil { + return x509.UnknownSignatureAlgorithm + } + + // PSS is greatly overburdened with options. This code forces + // them into three buckets by requiring that the MGF1 hash + // function always match the message hash function (as + // recommended in + // https://tools.ietf.org/html/rfc3447#section-8.1), that the + // salt length matches the hash length, and that the trailer + // field has the default value. + if !bytes.Equal(params.Hash.Parameters.FullBytes, nullBytes) || + !params.MGF.Algorithm.Equal(oidMGF1) || + !mgf1HashFunc.Algorithm.Equal(params.Hash.Algorithm) || + !bytes.Equal(mgf1HashFunc.Parameters.FullBytes, nullBytes) || + params.TrailerField != 1 { + return x509.UnknownSignatureAlgorithm + } + + switch { + case params.Hash.Algorithm.Equal(oidSHA256) && params.SaltLength == 32: + return x509.SHA256WithRSAPSS + case params.Hash.Algorithm.Equal(oidSHA384) && params.SaltLength == 48: + return x509.SHA384WithRSAPSS + case params.Hash.Algorithm.Equal(oidSHA512) && params.SaltLength == 64: + return x509.SHA512WithRSAPSS + } + + return x509.UnknownSignatureAlgorithm +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/LICENSE b/vendor/github.com/go-logr/logr/LICENSE similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/LICENSE rename to vendor/github.com/go-logr/logr/LICENSE diff --git a/vendor/github.com/go-logr/logr/README.md b/vendor/github.com/go-logr/logr/README.md new file mode 100644 index 00000000000..aca17f38273 --- /dev/null +++ b/vendor/github.com/go-logr/logr/README.md @@ -0,0 +1,181 @@ +# A more minimal logging API for Go + +Before you consider this package, please read [this blog post by the +inimitable Dave Cheney][warning-makes-no-sense]. I really appreciate what +he has to say, and it largely aligns with my own experiences. Too many +choices of levels means inconsistent logs. + +This package offers a purely abstract interface, based on these ideas but with +a few twists. Code can depend on just this interface and have the actual +logging implementation be injected from callers. Ideally only `main()` knows +what logging implementation is being used. + +# Differences from Dave's ideas + +The main differences are: + +1) Dave basically proposes doing away with the notion of a logging API in favor +of `fmt.Printf()`. I disagree, especially when you consider things like output +locations, timestamps, file and line decorations, and structured logging. I +restrict the API to just 2 types of logs: info and error. + +Info logs are things you want to tell the user which are not errors. Error +logs are, well, errors. If your code receives an `error` from a subordinate +function call and is logging that `error` *and not returning it*, use error +logs. + +2) Verbosity-levels on info logs. This gives developers a chance to indicate +arbitrary grades of importance for info logs, without assigning names with +semantic meaning such as "warning", "trace", and "debug". Superficially this +may feel very similar, but the primary difference is the lack of semantics. +Because verbosity is a numerical value, it's safe to assume that an app running +with higher verbosity means more (and less important) logs will be generated. + +This is a BETA grade API. + +There are implementations for the following logging libraries: + +- **github.com/google/glog**: [glogr](https://github.com/go-logr/glogr) +- **k8s.io/klog**: [klogr](https://git.k8s.io/klog/klogr) +- **go.uber.org/zap**: [zapr](https://github.com/go-logr/zapr) +- **log** (the Go standard library logger): + [stdr](https://github.com/go-logr/stdr) +- **github.com/sirupsen/logrus**: [logrusr](https://github.com/bombsimon/logrusr) + +# FAQ + +## Conceptual + +## Why structured logging? + +- **Structured logs are more easily queriable**: Since you've got + key-value pairs, it's much easier to query your structured logs for + particular values by filtering on the contents of a particular key -- + think searching request logs for error codes, Kubernetes reconcilers for + the name and namespace of the reconciled object, etc + +- **Structured logging makes it easier to have cross-referencable logs**: + Similarly to searchability, if you maintain conventions around your + keys, it becomes easy to gather all log lines related to a particular + concept. + +- **Structured logs allow better dimensions of filtering**: if you have + structure to your logs, you've got more precise control over how much + information is logged -- you might choose in a particular configuration + to log certain keys but not others, only log lines where a certain key + matches a certain value, etc, instead of just having v-levels and names + to key off of. + +- **Structured logs better represent structured data**: sometimes, the + data that you want to log is inherently structured (think tuple-link + objects). Structured logs allow you to preserve that structure when + outputting. + +## Why V-levels? + +**V-levels give operators an easy way to control the chattiness of log +operations**. V-levels provide a way for a given package to distinguish +the relative importance or verbosity of a given log message. Then, if +a particular logger or package is logging too many messages, the user +of the package can simply change the v-levels for that library. + +## Why not more named levels, like Warning? + +Read [Dave Cheney's post][warning-makes-no-sense]. Then read [Differences +from Dave's ideas](#differences-from-daves-ideas). + +## Why not allow format strings, too? + +**Format strings negate many of the benefits of structured logs**: + +- They're not easily searchable without resorting to fuzzy searching, + regular expressions, etc + +- They don't store structured data well, since contents are flattened into + a string + +- They're not cross-referencable + +- They don't compress easily, since the message is not constant + +(unless you turn positional parameters into key-value pairs with numerical +keys, at which point you've gotten key-value logging with meaningless +keys) + +## Practical + +## Why key-value pairs, and not a map? + +Key-value pairs are *much* easier to optimize, especially around +allocations. Zap (a structured logger that inspired logr's interface) has +[performance measurements](https://github.com/uber-go/zap#performance) +that show this quite nicely. + +While the interface ends up being a little less obvious, you get +potentially better performance, plus avoid making users type +`map[string]string{}` every time they want to log. + +## What if my V-levels differ between libraries? + +That's fine. Control your V-levels on a per-logger basis, and use the +`WithName` function to pass different loggers to different libraries. + +Generally, you should take care to ensure that you have relatively +consistent V-levels within a given logger, however, as this makes deciding +on what verbosity of logs to request easier. + +## But I *really* want to use a format string! + +That's not actually a question. Assuming your question is "how do +I convert my mental model of logging with format strings to logging with +constant messages": + +1. figure out what the error actually is, as you'd write in a TL;DR style, + and use that as a message + +2. For every place you'd write a format specifier, look to the word before + it, and add that as a key value pair + +For instance, consider the following examples (all taken from spots in the +Kubernetes codebase): + +- `klog.V(4).Infof("Client is returning errors: code %v, error %v", + responseCode, err)` becomes `logger.Error(err, "client returned an + error", "code", responseCode)` + +- `klog.V(4).Infof("Got a Retry-After %ds response for attempt %d to %v", + seconds, retries, url)` becomes `logger.V(4).Info("got a retry-after + response when requesting url", "attempt", retries, "after + seconds", seconds, "url", url)` + +If you *really* must use a format string, place it as a key value, and +call `fmt.Sprintf` yourself -- for instance, `log.Printf("unable to +reflect over type %T")` becomes `logger.Info("unable to reflect over +type", "type", fmt.Sprintf("%T"))`. In general though, the cases where +this is necessary should be few and far between. + +## How do I choose my V-levels? + +This is basically the only hard constraint: increase V-levels to denote +more verbose or more debug-y logs. + +Otherwise, you can start out with `0` as "you always want to see this", +`1` as "common logging that you might *possibly* want to turn off", and +`10` as "I would like to performance-test your log collection stack". + +Then gradually choose levels in between as you need them, working your way +down from 10 (for debug and trace style logs) and up from 1 (for chattier +info-type logs). + +## How do I choose my keys + +- make your keys human-readable +- constant keys are generally a good idea +- be consistent across your codebase +- keys should naturally match parts of the message string + +While key names are mostly unrestricted (and spaces are acceptable), +it's generally a good idea to stick to printable ascii characters, or at +least match the general character set of your log lines. + +[warning-makes-no-sense]: http://dave.cheney.net/2015/11/05/lets-talk-about-logging diff --git a/vendor/github.com/go-logr/logr/go.mod b/vendor/github.com/go-logr/logr/go.mod new file mode 100644 index 00000000000..591884e91f1 --- /dev/null +++ b/vendor/github.com/go-logr/logr/go.mod @@ -0,0 +1,3 @@ +module github.com/go-logr/logr + +go 1.14 diff --git a/vendor/github.com/go-logr/logr/logr.go b/vendor/github.com/go-logr/logr/logr.go new file mode 100644 index 00000000000..520c4fe5598 --- /dev/null +++ b/vendor/github.com/go-logr/logr/logr.go @@ -0,0 +1,178 @@ +/* +Copyright 2019 The logr 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 logr defines abstract interfaces for logging. Packages can depend on +// these interfaces and callers can implement logging in whatever way is +// appropriate. +// +// This design derives from Dave Cheney's blog: +// http://dave.cheney.net/2015/11/05/lets-talk-about-logging +// +// This is a BETA grade API. Until there is a significant 2nd implementation, +// I don't really know how it will change. +// +// The logging specifically makes it non-trivial to use format strings, to encourage +// attaching structured information instead of unstructured format strings. +// +// Usage +// +// Logging is done using a Logger. Loggers can have name prefixes and named +// values attached, so that all log messages logged with that Logger have some +// base context associated. +// +// The term "key" is used to refer to the name associated with a particular +// value, to disambiguate it from the general Logger name. +// +// For instance, suppose we're trying to reconcile the state of an object, and +// we want to log that we've made some decision. +// +// With the traditional log package, we might write: +// log.Printf( +// "decided to set field foo to value %q for object %s/%s", +// targetValue, object.Namespace, object.Name) +// +// With logr's structured logging, we'd write: +// // elsewhere in the file, set up the logger to log with the prefix of "reconcilers", +// // and the named value target-type=Foo, for extra context. +// log := mainLogger.WithName("reconcilers").WithValues("target-type", "Foo") +// +// // later on... +// log.Info("setting field foo on object", "value", targetValue, "object", object) +// +// Depending on our logging implementation, we could then make logging decisions +// based on field values (like only logging such events for objects in a certain +// namespace), or copy the structured information into a structured log store. +// +// For logging errors, Logger has a method called Error. Suppose we wanted to +// log an error while reconciling. With the traditional log package, we might +// write: +// log.Errorf("unable to reconcile object %s/%s: %v", object.Namespace, object.Name, err) +// +// With logr, we'd instead write: +// // assuming the above setup for log +// log.Error(err, "unable to reconcile object", "object", object) +// +// This functions similarly to: +// log.Info("unable to reconcile object", "error", err, "object", object) +// +// However, it ensures that a standard key for the error value ("error") is used +// across all error logging. Furthermore, certain implementations may choose to +// attach additional information (such as stack traces) on calls to Error, so +// it's preferred to use Error to log errors. +// +// Parts of a log line +// +// Each log message from a Logger has four types of context: +// logger name, log verbosity, log message, and the named values. +// +// The Logger name constists of a series of name "segments" added by successive +// calls to WithName. These name segments will be joined in some way by the +// underlying implementation. It is strongly reccomended that name segements +// contain simple identifiers (letters, digits, and hyphen), and do not contain +// characters that could muddle the log output or confuse the joining operation +// (e.g. whitespace, commas, periods, slashes, brackets, quotes, etc). +// +// Log verbosity represents how little a log matters. Level zero, the default, +// matters most. Increasing levels matter less and less. Try to avoid lots of +// different verbosity levels, and instead provide useful keys, logger names, +// and log messages for users to filter on. It's illegal to pass a log level +// below zero. +// +// The log message consists of a constant message attached to the the log line. +// This should generally be a simple description of what's occuring, and should +// never be a format string. +// +// Variable information can then be attached using named values (key/value +// pairs). Keys are arbitrary strings, while values may be any Go value. +// +// Key Naming Conventions +// +// Keys are not strictly required to conform to any specification or regex, but +// it is recommended that they: +// * be human-readable and meaningful (not auto-generated or simple ordinals) +// * be constant (not dependent on input data) +// * contain only printable characters +// * not contain whitespace or punctuation +// +// These guidelines help ensure that log data is processed properly regardless +// of the log implementation. For example, log implementations will try to +// output JSON data or will store data for later database (e.g. SQL) queries. +// +// While users are generally free to use key names of their choice, it's +// generally best to avoid using the following keys, as they're frequently used +// by implementations: +// +// - `"caller"`: the calling information (file/line) of a particular log line. +// - `"error"`: the underlying error value in the `Error` method. +// - `"level"`: the log level. +// - `"logger"`: the name of the associated logger. +// - `"msg"`: the log message. +// - `"stacktrace"`: the stack trace associated with a particular log line or +// error (often from the `Error` message). +// - `"ts"`: the timestamp for a log line. +// +// Implementations are encouraged to make use of these keys to represent the +// above concepts, when neccessary (for example, in a pure-JSON output form, it +// would be necessary to represent at least message and timestamp as ordinary +// named values). +package logr + +// TODO: consider adding back in format strings if they're really needed +// TODO: consider other bits of zap/zapcore functionality like ObjectMarshaller (for arbitrary objects) +// TODO: consider other bits of glog functionality like Flush, InfoDepth, OutputStats + +// Logger represents the ability to log messages, both errors and not. +type Logger interface { + // Enabled tests whether this Logger is enabled. For example, commandline + // flags might be used to set the logging verbosity and disable some info + // logs. + Enabled() bool + + // Info logs a non-error message with the given key/value pairs as context. + // + // The msg argument should be used to add some constant description to + // the log line. The key/value pairs can then be used to add additional + // variable information. The key/value pairs should alternate string + // keys and arbitrary values. + Info(msg string, keysAndValues ...interface{}) + + // Error logs an error, with the given message and key/value pairs as context. + // It functions similarly to calling Info with the "error" named value, but may + // have unique behavior, and should be preferred for logging errors (see the + // package documentations for more information). + // + // The msg field should be used to add context to any underlying error, + // while the err field should be used to attach the actual error that + // triggered this log line, if present. + Error(err error, msg string, keysAndValues ...interface{}) + + // V returns an Logger value for a specific verbosity level, relative to + // this Logger. In other words, V values are additive. V higher verbosity + // level means a log message is less important. It's illegal to pass a log + // level less than zero. + V(level int) Logger + + // WithValues adds some key-value pairs of context to a logger. + // See Info for documentation on how key/value pairs work. + WithValues(keysAndValues ...interface{}) Logger + + // WithName adds a new element to the logger's name. + // Successive calls with WithName continue to append + // suffixes to the logger's name. It's strongly reccomended + // that name segments contain only letters, digits, and hyphens + // (see the package documentation for more information). + WithName(name string) Logger +} diff --git a/vendor/github.com/godbus/dbus/.travis.yml b/vendor/github.com/godbus/dbus/.travis.yml deleted file mode 100644 index 9cd57f432b0..00000000000 --- a/vendor/github.com/godbus/dbus/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -dist: precise -language: go -go_import_path: github.com/godbus/dbus -sudo: true - -go: - - 1.7.3 - - 1.8.7 - - 1.9.5 - - 1.10.1 - - tip - -env: - global: - matrix: - - TARGET=amd64 - - TARGET=arm64 - - TARGET=arm - - TARGET=386 - - TARGET=ppc64le - -matrix: - fast_finish: true - allow_failures: - - go: tip - exclude: - - go: tip - env: TARGET=arm - - go: tip - env: TARGET=arm64 - - go: tip - env: TARGET=386 - - go: tip - env: TARGET=ppc64le - -addons: - apt: - packages: - - dbus - - dbus-x11 - -before_install: - -script: - - go test -v -race ./... # Run all the tests with the race detector enabled - - go vet ./... # go vet is the official Go static analyzer diff --git a/vendor/github.com/godbus/dbus/go.mod b/vendor/github.com/godbus/dbus/go.mod deleted file mode 100644 index bdcd12598b4..00000000000 --- a/vendor/github.com/godbus/dbus/go.mod +++ /dev/null @@ -1 +0,0 @@ -module github.com/godbus/dbus diff --git a/vendor/github.com/godbus/dbus/v5/.travis.yml b/vendor/github.com/godbus/dbus/v5/.travis.yml new file mode 100644 index 00000000000..dd67672048b --- /dev/null +++ b/vendor/github.com/godbus/dbus/v5/.travis.yml @@ -0,0 +1,50 @@ +dist: bionic +language: go +go_import_path: github.com/godbus/dbus + +go: + - 1.11.x + - 1.12.x + - 1.13.x + - tip + +matrix: + fast_finish: true + allow_failures: + - go: tip + +addons: + apt: + packages: + - dbus + - dbus-x11 + +before_install: + - export GO111MODULE=on + +script: + - go test -v -race -mod=readonly ./... # Run all the tests with the race detector enabled + - go vet ./... # go vet is the official Go static analyzer + +jobs: + include: + # The build matrix doesn't cover build stages, so manually expand + # the jobs with anchors + - &multiarch + stage: "Multiarch Test" + go: 1.11.x + env: TARGETS="386 arm arm64 ppc64le" + before_install: + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + script: + - | + set -e + for target in $TARGETS; do + printf "\e[1mRunning test suite under ${target}.\e[0m\n" + GOARCH="$target" go test -v ./... + printf "\n\n" + done + - <<: *multiarch + go: 1.12.x + - <<: *multiarch + go: 1.13.x diff --git a/vendor/github.com/godbus/dbus/CONTRIBUTING.md b/vendor/github.com/godbus/dbus/v5/CONTRIBUTING.md similarity index 100% rename from vendor/github.com/godbus/dbus/CONTRIBUTING.md rename to vendor/github.com/godbus/dbus/v5/CONTRIBUTING.md diff --git a/vendor/github.com/godbus/dbus/LICENSE b/vendor/github.com/godbus/dbus/v5/LICENSE similarity index 100% rename from vendor/github.com/godbus/dbus/LICENSE rename to vendor/github.com/godbus/dbus/v5/LICENSE diff --git a/vendor/github.com/godbus/dbus/MAINTAINERS b/vendor/github.com/godbus/dbus/v5/MAINTAINERS similarity index 100% rename from vendor/github.com/godbus/dbus/MAINTAINERS rename to vendor/github.com/godbus/dbus/v5/MAINTAINERS diff --git a/vendor/github.com/godbus/dbus/README.markdown b/vendor/github.com/godbus/dbus/v5/README.markdown similarity index 100% rename from vendor/github.com/godbus/dbus/README.markdown rename to vendor/github.com/godbus/dbus/v5/README.markdown diff --git a/vendor/github.com/godbus/dbus/auth.go b/vendor/github.com/godbus/dbus/v5/auth.go similarity index 98% rename from vendor/github.com/godbus/dbus/auth.go rename to vendor/github.com/godbus/dbus/v5/auth.go index b0dcb54e6b5..31abac629d7 100644 --- a/vendor/github.com/godbus/dbus/auth.go +++ b/vendor/github.com/godbus/dbus/v5/auth.go @@ -77,7 +77,7 @@ func (conn *Conn) Auth(methods []Auth) error { for _, m := range methods { if name, data, status := m.FirstData(); bytes.Equal(v, name) { var ok bool - err = authWriteLine(conn.transport, []byte("AUTH"), []byte(v), data) + err = authWriteLine(conn.transport, []byte("AUTH"), v, data) if err != nil { return err } @@ -127,7 +127,7 @@ func (conn *Conn) Auth(methods []Auth) error { // tryAuth tries to authenticate with m as the mechanism, using state as the // initial authState and in for reading input. It returns (nil, true) on // success, (nil, false) on a REJECTED and (someErr, false) if some other -// error occured. +// error occurred. func (conn *Conn) tryAuth(m Auth, state authState, in *bufio.Reader) (error, bool) { for { s, err := authReadLine(in) diff --git a/vendor/github.com/godbus/dbus/auth_anonymous.go b/vendor/github.com/godbus/dbus/v5/auth_anonymous.go similarity index 100% rename from vendor/github.com/godbus/dbus/auth_anonymous.go rename to vendor/github.com/godbus/dbus/v5/auth_anonymous.go diff --git a/vendor/github.com/godbus/dbus/auth_external.go b/vendor/github.com/godbus/dbus/v5/auth_external.go similarity index 100% rename from vendor/github.com/godbus/dbus/auth_external.go rename to vendor/github.com/godbus/dbus/v5/auth_external.go diff --git a/vendor/github.com/godbus/dbus/auth_sha1.go b/vendor/github.com/godbus/dbus/v5/auth_sha1.go similarity index 96% rename from vendor/github.com/godbus/dbus/auth_sha1.go rename to vendor/github.com/godbus/dbus/v5/auth_sha1.go index df15b461198..80286700b6d 100644 --- a/vendor/github.com/godbus/dbus/auth_sha1.go +++ b/vendor/github.com/godbus/dbus/v5/auth_sha1.go @@ -60,7 +60,7 @@ func (a authCookieSha1) HandleData(data []byte) ([]byte, AuthStatus) { // getCookie searches for the cookie identified by id in context and returns // the cookie content or nil. (Since HandleData can't return a specific error, -// but only whether an error occured, this function also doesn't bother to +// but only whether an error occurred, this function also doesn't bother to // return an error.) func (a authCookieSha1) getCookie(context, id []byte) []byte { file, err := os.Open(a.home + "/.dbus-keyrings/" + string(context)) diff --git a/vendor/github.com/godbus/dbus/call.go b/vendor/github.com/godbus/dbus/v5/call.go similarity index 100% rename from vendor/github.com/godbus/dbus/call.go rename to vendor/github.com/godbus/dbus/v5/call.go diff --git a/vendor/github.com/godbus/dbus/conn.go b/vendor/github.com/godbus/dbus/v5/conn.go similarity index 86% rename from vendor/github.com/godbus/dbus/conn.go rename to vendor/github.com/godbus/dbus/v5/conn.go index b38920baf5b..b55bc99c854 100644 --- a/vendor/github.com/godbus/dbus/conn.go +++ b/vendor/github.com/godbus/dbus/v5/conn.go @@ -5,7 +5,6 @@ import ( "errors" "io" "os" - "reflect" "strings" "sync" ) @@ -31,6 +30,12 @@ var ErrClosed = errors.New("dbus: connection closed by user") type Conn struct { transport + ctx context.Context + cancelCtx context.CancelFunc + + closeOnce sync.Once + closeErr error + busObj BusObject unixFD bool uuid string @@ -38,6 +43,8 @@ type Conn struct { handler Handler signalHandler SignalHandler serialGen SerialGenerator + inInt Interceptor + outInt Interceptor names *nameTracker calls *callTracker @@ -134,6 +141,8 @@ func SystemBus() (conn *Conn, err error) { } // SystemBusPrivate returns a new private connection to the system bus. +// Note: this connection is not ready to use. One must perform Auth and Hello +// on the connection before it is useable. func SystemBusPrivate(opts ...ConnOption) (*Conn, error) { return Dial(getSystemBusPlatformAddress(), opts...) } @@ -188,6 +197,33 @@ func WithSerialGenerator(gen SerialGenerator) ConnOption { } } +// Interceptor intercepts incoming and outgoing messages. +type Interceptor func(msg *Message) + +// WithIncomingInterceptor sets the given interceptor for incoming messages. +func WithIncomingInterceptor(interceptor Interceptor) ConnOption { + return func(conn *Conn) error { + conn.inInt = interceptor + return nil + } +} + +// WithOutgoingInterceptor sets the given interceptor for outgoing messages. +func WithOutgoingInterceptor(interceptor Interceptor) ConnOption { + return func(conn *Conn) error { + conn.outInt = interceptor + return nil + } +} + +// WithContext overrides the default context for the connection. +func WithContext(ctx context.Context) ConnOption { + return func(conn *Conn) error { + conn.ctx = ctx + return nil + } +} + // NewConn creates a new private *Conn from an already established connection. func NewConn(conn io.ReadWriteCloser, opts ...ConnOption) (*Conn, error) { return newConn(genericTransport{conn}, opts...) @@ -209,6 +245,15 @@ func newConn(tr transport, opts ...ConnOption) (*Conn, error) { return nil, err } } + if conn.ctx == nil { + conn.ctx = context.Background() + } + conn.ctx, conn.cancelCtx = context.WithCancel(conn.ctx) + go func() { + <-conn.ctx.Done() + conn.Close() + }() + conn.calls = newCallTracker() if conn.handler == nil { conn.handler = NewDefaultHandler() @@ -235,27 +280,38 @@ func (conn *Conn) BusObject() BusObject { // and the channels passed to Eavesdrop and Signal are closed. This method must // not be called on shared connections. func (conn *Conn) Close() error { - conn.outHandler.close() - if term, ok := conn.signalHandler.(Terminator); ok { - term.Terminate() - } + conn.closeOnce.Do(func() { + conn.outHandler.close() + if term, ok := conn.signalHandler.(Terminator); ok { + term.Terminate() + } - if term, ok := conn.handler.(Terminator); ok { - term.Terminate() - } + if term, ok := conn.handler.(Terminator); ok { + term.Terminate() + } - conn.eavesdroppedLck.Lock() - if conn.eavesdropped != nil { - close(conn.eavesdropped) - } - conn.eavesdroppedLck.Unlock() + conn.eavesdroppedLck.Lock() + if conn.eavesdropped != nil { + close(conn.eavesdropped) + } + conn.eavesdroppedLck.Unlock() - return conn.transport.Close() + conn.cancelCtx() + + conn.closeErr = conn.transport.Close() + }) + return conn.closeErr +} + +// Context returns the context associated with the connection. The +// context will be cancelled when the connection is closed. +func (conn *Conn) Context() context.Context { + return conn.ctx } // Eavesdrop causes conn to send all incoming messages to the given channel // without further processing. Method replies, errors and signals will not be -// sent to the appropiate channels and method calls will not be handled. If nil +// sent to the appropriate channels and method calls will not be handled. If nil // is passed, the normal behaviour is restored. // // The caller has to make sure that ch is sufficiently buffered; @@ -267,7 +323,7 @@ func (conn *Conn) Eavesdrop(ch chan<- *Message) { conn.eavesdroppedLck.Unlock() } -// GetSerial returns an unused serial. +// getSerial returns an unused serial. func (conn *Conn) getSerial() uint32 { return conn.serialGen.GetSerial() } @@ -292,7 +348,7 @@ func (conn *Conn) inWorker() { msg, err := conn.ReadMessage() if err != nil { if _, ok := err.(InvalidMessageError); !ok { - // Some read error occured (usually EOF); we can't really do + // Some read error occurred (usually EOF); we can't really do // anything but to shut down all stuff and returns errors to all // pending replies. conn.Close() @@ -321,6 +377,10 @@ func (conn *Conn) inWorker() { // Ignore it. continue } + + if conn.inInt != nil { + conn.inInt(msg) + } switch msg.Type { case TypeError: conn.serialGen.RetireSerial(conn.calls.handleDBusError(msg)) @@ -381,13 +441,10 @@ func (conn *Conn) Object(dest string, path ObjectPath) BusObject { return &Object{conn, dest, path} } -// outWorker runs in an own goroutine, encoding and sending messages that are -// sent to conn.out. -func (conn *Conn) sendMessage(msg *Message) { - conn.sendMessageAndIfClosed(msg, func() {}) -} - func (conn *Conn) sendMessageAndIfClosed(msg *Message, ifClosed func()) { + if conn.outInt != nil { + conn.outInt(msg) + } err := conn.outHandler.sendAndIfClosed(msg, ifClosed) conn.calls.handleSendError(msg, err) if err != nil { @@ -483,7 +540,7 @@ func (conn *Conn) sendError(err error, dest string, serial uint32) { if len(e.Body) > 0 { msg.Headers[FieldSignature] = MakeVariant(SignatureOf(e.Body...)) } - conn.sendMessage(msg) + conn.sendMessageAndIfClosed(msg, nil) } // sendReply creates a method reply message corresponding to the parameters and @@ -501,33 +558,54 @@ func (conn *Conn) sendReply(dest string, serial uint32, values ...interface{}) { if len(values) > 0 { msg.Headers[FieldSignature] = MakeVariant(SignatureOf(values...)) } - conn.sendMessage(msg) + conn.sendMessageAndIfClosed(msg, nil) } -func (conn *Conn) defaultSignalAction(fn func(h *defaultSignalHandler, ch chan<- *Signal), ch chan<- *Signal) { - if !isDefaultSignalHandler(conn.signalHandler) { - return - } - handler := conn.signalHandler.(*defaultSignalHandler) - fn(handler, ch) +// AddMatchSignal registers the given match rule to receive broadcast +// signals based on their contents. +func (conn *Conn) AddMatchSignal(options ...MatchOption) error { + options = append([]MatchOption{withMatchType("signal")}, options...) + return conn.busObj.Call( + "org.freedesktop.DBus.AddMatch", 0, + formatMatchOptions(options), + ).Store() +} + +// RemoveMatchSignal removes the first rule that matches previously registered with AddMatchSignal. +func (conn *Conn) RemoveMatchSignal(options ...MatchOption) error { + options = append([]MatchOption{withMatchType("signal")}, options...) + return conn.busObj.Call( + "org.freedesktop.DBus.RemoveMatch", 0, + formatMatchOptions(options), + ).Store() } // Signal registers the given channel to be passed all received signal messages. -// The caller has to make sure that ch is sufficiently buffered; if a message -// arrives when a write to c is not possible, it is discarded. // // Multiple of these channels can be registered at the same time. // // These channels are "overwritten" by Eavesdrop; i.e., if there currently is a // channel for eavesdropped messages, this channel receives all signals, and // none of the channels passed to Signal will receive any signals. +// +// Panics if the signal handler is not a `SignalRegistrar`. func (conn *Conn) Signal(ch chan<- *Signal) { - conn.defaultSignalAction((*defaultSignalHandler).addSignal, ch) + handler, ok := conn.signalHandler.(SignalRegistrar) + if !ok { + panic("cannot use this method with a non SignalRegistrar handler") + } + handler.AddSignal(ch) } // RemoveSignal removes the given channel from the list of the registered channels. +// +// Panics if the signal handler is not a `SignalRegistrar`. func (conn *Conn) RemoveSignal(ch chan<- *Signal) { - conn.defaultSignalAction((*defaultSignalHandler).removeSignal, ch) + handler, ok := conn.signalHandler.(SignalRegistrar) + if !ok { + panic("cannot use this method with a non SignalRegistrar handler") + } + handler.RemoveSignal(ch) } // SupportsUnixFDs returns whether the underlying transport supports passing of @@ -614,18 +692,6 @@ func getTransport(address string) (transport, error) { return nil, err } -// dereferenceAll returns a slice that, assuming that vs is a slice of pointers -// of arbitrary types, containes the values that are obtained from dereferencing -// all elements in vs. -func dereferenceAll(vs []interface{}) []interface{} { - for i := range vs { - v := reflect.ValueOf(vs[i]) - v = v.Elem() - vs[i] = v.Interface() - } - return vs -} - // getKey gets a key from a the list of keys. Returns "" on error / not found... func getKey(s, key string) string { for _, keyEqualsValue := range strings.Split(s, ",") { @@ -650,7 +716,9 @@ func (h *outputHandler) sendAndIfClosed(msg *Message, ifClosed func()) error { h.closed.lck.RLock() defer h.closed.lck.RUnlock() if h.closed.isClosed { - ifClosed() + if ifClosed != nil { + ifClosed() + } return nil } h.sendLck.Lock() @@ -801,7 +869,6 @@ func (tracker *callTracker) finalize(sn uint32) { delete(tracker.calls, sn) c.ContextCancel() } - return } func (tracker *callTracker) finalizeWithBody(sn uint32, body []interface{}) { @@ -815,7 +882,6 @@ func (tracker *callTracker) finalizeWithBody(sn uint32, body []interface{}) { c.Body = body c.done() } - return } func (tracker *callTracker) finalizeWithError(sn uint32, err error) { @@ -829,7 +895,6 @@ func (tracker *callTracker) finalizeWithError(sn uint32, err error) { c.Err = err c.done() } - return } func (tracker *callTracker) finalizeAllWithError(err error) { diff --git a/vendor/github.com/godbus/dbus/conn_darwin.go b/vendor/github.com/godbus/dbus/v5/conn_darwin.go similarity index 100% rename from vendor/github.com/godbus/dbus/conn_darwin.go rename to vendor/github.com/godbus/dbus/v5/conn_darwin.go diff --git a/vendor/github.com/godbus/dbus/conn_other.go b/vendor/github.com/godbus/dbus/v5/conn_other.go similarity index 96% rename from vendor/github.com/godbus/dbus/conn_other.go rename to vendor/github.com/godbus/dbus/v5/conn_other.go index 289044a44d4..616dcf66449 100644 --- a/vendor/github.com/godbus/dbus/conn_other.go +++ b/vendor/github.com/godbus/dbus/v5/conn_other.go @@ -14,8 +14,10 @@ import ( "strings" ) +var execCommand = exec.Command + func getSessionBusPlatformAddress() (string, error) { - cmd := exec.Command("dbus-launch") + cmd := execCommand("dbus-launch") b, err := cmd.CombinedOutput() if err != nil { @@ -25,7 +27,7 @@ func getSessionBusPlatformAddress() (string, error) { i := bytes.IndexByte(b, '=') j := bytes.IndexByte(b, '\n') - if i == -1 || j == -1 { + if i == -1 || j == -1 || i > j { return "", errors.New("dbus: couldn't determine address of session bus") } diff --git a/vendor/github.com/godbus/dbus/conn_unix.go b/vendor/github.com/godbus/dbus/v5/conn_unix.go similarity index 84% rename from vendor/github.com/godbus/dbus/conn_unix.go rename to vendor/github.com/godbus/dbus/v5/conn_unix.go index 4cba8ae8ec3..58aee7d2af5 100644 --- a/vendor/github.com/godbus/dbus/conn_unix.go +++ b/vendor/github.com/godbus/dbus/v5/conn_unix.go @@ -4,7 +4,6 @@ package dbus import ( "os" - "fmt" ) const defaultSystemBusAddress = "unix:path=/var/run/dbus/system_bus_socket" @@ -12,7 +11,7 @@ const defaultSystemBusAddress = "unix:path=/var/run/dbus/system_bus_socket" func getSystemBusPlatformAddress() string { address := os.Getenv("DBUS_SYSTEM_BUS_ADDRESS") if address != "" { - return fmt.Sprintf("unix:path=%s", address) + return address } return defaultSystemBusAddress -} \ No newline at end of file +} diff --git a/vendor/github.com/godbus/dbus/conn_windows.go b/vendor/github.com/godbus/dbus/v5/conn_windows.go similarity index 100% rename from vendor/github.com/godbus/dbus/conn_windows.go rename to vendor/github.com/godbus/dbus/v5/conn_windows.go diff --git a/vendor/github.com/godbus/dbus/dbus.go b/vendor/github.com/godbus/dbus/v5/dbus.go similarity index 99% rename from vendor/github.com/godbus/dbus/dbus.go rename to vendor/github.com/godbus/dbus/v5/dbus.go index c6d0d3ce0e3..428923d2667 100644 --- a/vendor/github.com/godbus/dbus/dbus.go +++ b/vendor/github.com/godbus/dbus/v5/dbus.go @@ -87,6 +87,7 @@ func setDest(dest, src reflect.Value) error { } if isVariant(src.Type()) && !isVariant(dest.Type()) { src = getVariantValue(src) + return store(dest, src) } if !src.Type().ConvertibleTo(dest.Type()) { return fmt.Errorf( diff --git a/vendor/github.com/godbus/dbus/decoder.go b/vendor/github.com/godbus/dbus/v5/decoder.go similarity index 81% rename from vendor/github.com/godbus/dbus/decoder.go rename to vendor/github.com/godbus/dbus/v5/decoder.go index 5c27d3b51f6..ede91575b3e 100644 --- a/vendor/github.com/godbus/dbus/decoder.go +++ b/vendor/github.com/godbus/dbus/v5/decoder.go @@ -188,8 +188,14 @@ func (dec *decoder) decode(s string, depth int) interface{} { if depth >= 64 { panic(FormatError("input exceeds container depth limit")) } + sig := s[1:] length := dec.decode("u", depth).(uint32) - v := reflect.MakeSlice(reflect.SliceOf(typeFor(s[1:])), 0, int(length)) + // capacity can be determined only for fixed-size element types + var capacity int + if s := sigByteSize(sig); s != 0 { + capacity = int(length) / s + } + v := reflect.MakeSlice(reflect.SliceOf(typeFor(sig)), 0, capacity) // Even for empty arrays, the correct padding must be included align := alignment(typeFor(s[1:])) if len(s) > 1 && s[1] == '(' { @@ -227,6 +233,51 @@ func (dec *decoder) decode(s string, depth int) interface{} { } } +// sigByteSize tries to calculates size of the given signature in bytes. +// +// It returns zero when it can't, for example when it contains non-fixed size +// types such as strings, maps and arrays that require reading of the transmitted +// data, for that we would need to implement the unread method for Decoder first. +func sigByteSize(sig string) int { + var total int + for offset := 0; offset < len(sig); { + switch sig[offset] { + case 'y': + total += 1 + offset += 1 + case 'n', 'q': + total += 2 + offset += 1 + case 'b', 'i', 'u', 'h': + total += 4 + offset += 1 + case 'x', 't', 'd': + total += 8 + offset += 1 + case '(': + i := 1 + depth := 1 + for i < len(sig[offset:]) && depth != 0 { + if sig[offset+i] == '(' { + depth++ + } else if sig[offset+i] == ')' { + depth-- + } + i++ + } + s := sigByteSize(sig[offset+1 : offset+i-1]) + if s == 0 { + return 0 + } + total += s + offset += i + default: + return 0 + } + } + return total +} + // A FormatError is an error in the wire format. type FormatError string diff --git a/vendor/github.com/godbus/dbus/default_handler.go b/vendor/github.com/godbus/dbus/v5/default_handler.go similarity index 82% rename from vendor/github.com/godbus/dbus/default_handler.go rename to vendor/github.com/godbus/dbus/v5/default_handler.go index 81dbcc7e42a..6d8bf32f9f9 100644 --- a/vendor/github.com/godbus/dbus/default_handler.go +++ b/vendor/github.com/godbus/dbus/v5/default_handler.go @@ -47,7 +47,7 @@ func (h *defaultHandler) introspectPath(path ObjectPath) string { subpath := make(map[string]struct{}) var xml bytes.Buffer xml.WriteString("") - for obj, _ := range h.objects { + for obj := range h.objects { p := string(path) if p != "/" { p += "/" @@ -57,7 +57,7 @@ func (h *defaultHandler) introspectPath(path ObjectPath) string { subpath[node_name] = struct{}{} } } - for s, _ := range subpath { + for s := range subpath { xml.WriteString("\n\t") } xml.WriteString("\n") @@ -234,88 +234,95 @@ func (obj *exportedIntf) isFallbackInterface() bool { // // Deprecated: this is the default value, don't use it, it will be unexported. func NewDefaultSignalHandler() *defaultSignalHandler { - return &defaultSignalHandler{ - closeChan: make(chan struct{}), - } -} - -func isDefaultSignalHandler(handler SignalHandler) bool { - _, ok := handler.(*defaultSignalHandler) - return ok + return &defaultSignalHandler{} } type defaultSignalHandler struct { - sync.RWMutex - closed bool - signals []chan<- *Signal - closeChan chan struct{} + mu sync.RWMutex + closed bool + signals []*signalChannelData } func (sh *defaultSignalHandler) DeliverSignal(intf, name string, signal *Signal) { - sh.RLock() - defer sh.RUnlock() + sh.mu.RLock() + defer sh.mu.RUnlock() if sh.closed { return } - for _, ch := range sh.signals { - select { - case ch <- signal: - case <-sh.closeChan: - return - default: - go func() { - select { - case ch <- signal: - case <-sh.closeChan: - return - } - }() - } + for _, scd := range sh.signals { + scd.deliver(signal) } } -func (sh *defaultSignalHandler) Init() error { - sh.Lock() - sh.signals = make([]chan<- *Signal, 0) - sh.closeChan = make(chan struct{}) - sh.Unlock() - return nil -} - func (sh *defaultSignalHandler) Terminate() { - sh.Lock() - if !sh.closed { - close(sh.closeChan) - } - sh.closed = true - for _, ch := range sh.signals { - close(ch) - } - sh.signals = nil - sh.Unlock() -} - -func (sh *defaultSignalHandler) addSignal(ch chan<- *Signal) { - sh.Lock() - defer sh.Unlock() + sh.mu.Lock() + defer sh.mu.Unlock() if sh.closed { return } - sh.signals = append(sh.signals, ch) + for _, scd := range sh.signals { + scd.close() + close(scd.ch) + } + sh.closed = true + sh.signals = nil } -func (sh *defaultSignalHandler) removeSignal(ch chan<- *Signal) { - sh.Lock() - defer sh.Unlock() +func (sh *defaultSignalHandler) AddSignal(ch chan<- *Signal) { + sh.mu.Lock() + defer sh.mu.Unlock() + if sh.closed { + return + } + sh.signals = append(sh.signals, &signalChannelData{ + ch: ch, + done: make(chan struct{}), + }) +} + +func (sh *defaultSignalHandler) RemoveSignal(ch chan<- *Signal) { + sh.mu.Lock() + defer sh.mu.Unlock() if sh.closed { return } for i := len(sh.signals) - 1; i >= 0; i-- { - if ch == sh.signals[i] { + if ch == sh.signals[i].ch { + sh.signals[i].close() copy(sh.signals[i:], sh.signals[i+1:]) sh.signals[len(sh.signals)-1] = nil sh.signals = sh.signals[:len(sh.signals)-1] } } } + +type signalChannelData struct { + wg sync.WaitGroup + ch chan<- *Signal + done chan struct{} +} + +func (scd *signalChannelData) deliver(signal *Signal) { + select { + case scd.ch <- signal: + case <-scd.done: + return + default: + scd.wg.Add(1) + go scd.deferredDeliver(signal) + } +} + +func (scd *signalChannelData) deferredDeliver(signal *Signal) { + select { + case scd.ch <- signal: + case <-scd.done: + } + scd.wg.Done() +} + +func (scd *signalChannelData) close() { + close(scd.done) + scd.wg.Wait() // wait until all spawned goroutines return +} diff --git a/vendor/github.com/godbus/dbus/doc.go b/vendor/github.com/godbus/dbus/v5/doc.go similarity index 96% rename from vendor/github.com/godbus/dbus/doc.go rename to vendor/github.com/godbus/dbus/v5/doc.go index 895036a8c11..ade1df951cd 100644 --- a/vendor/github.com/godbus/dbus/doc.go +++ b/vendor/github.com/godbus/dbus/v5/doc.go @@ -61,7 +61,7 @@ Handling Unix file descriptors deserves special mention. To use them, you should first check that they are supported on a connection by calling SupportsUnixFDs. If it returns true, all method of Connection will translate messages containing UnixFD's to messages that are accompanied by the given file descriptors with the -UnixFD values being substituted by the correct indices. Similarily, the indices +UnixFD values being substituted by the correct indices. Similarly, the indices of incoming messages are automatically resolved. It shouldn't be necessary to use UnixFDIndex. diff --git a/vendor/github.com/godbus/dbus/encoder.go b/vendor/github.com/godbus/dbus/v5/encoder.go similarity index 98% rename from vendor/github.com/godbus/dbus/encoder.go rename to vendor/github.com/godbus/dbus/v5/encoder.go index 8bb717761cd..adfbb75c559 100644 --- a/vendor/github.com/godbus/dbus/encoder.go +++ b/vendor/github.com/godbus/dbus/v5/encoder.go @@ -60,7 +60,7 @@ func (enc *encoder) binwrite(v interface{}) { } } -// Encode encodes the given values to the underyling reader. All written values +// Encode encodes the given values to the underlying reader. All written values // are aligned properly as required by the D-Bus spec. func (enc *encoder) Encode(vs ...interface{}) (err error) { defer func() { diff --git a/vendor/github.com/godbus/dbus/export.go b/vendor/github.com/godbus/dbus/v5/export.go similarity index 99% rename from vendor/github.com/godbus/dbus/export.go rename to vendor/github.com/godbus/dbus/v5/export.go index 95d0e29582d..c277ab14262 100644 --- a/vendor/github.com/godbus/dbus/export.go +++ b/vendor/github.com/godbus/dbus/v5/export.go @@ -171,7 +171,7 @@ func (conn *Conn) handleCall(msg *Message) { } reply.Headers[FieldSignature] = MakeVariant(SignatureOf(reply.Body...)) - conn.sendMessage(reply) + conn.sendMessageAndIfClosed(reply, nil) } } diff --git a/vendor/github.com/godbus/dbus/v5/go.mod b/vendor/github.com/godbus/dbus/v5/go.mod new file mode 100644 index 00000000000..15b920203c5 --- /dev/null +++ b/vendor/github.com/godbus/dbus/v5/go.mod @@ -0,0 +1,3 @@ +module github.com/godbus/dbus/v5 + +go 1.12 diff --git a/vendor/github.com/godbus/dbus/v5/go.sum b/vendor/github.com/godbus/dbus/v5/go.sum new file mode 100644 index 00000000000..e69de29bb2d diff --git a/vendor/github.com/godbus/dbus/homedir.go b/vendor/github.com/godbus/dbus/v5/homedir.go similarity index 100% rename from vendor/github.com/godbus/dbus/homedir.go rename to vendor/github.com/godbus/dbus/v5/homedir.go diff --git a/vendor/github.com/godbus/dbus/homedir_dynamic.go b/vendor/github.com/godbus/dbus/v5/homedir_dynamic.go similarity index 100% rename from vendor/github.com/godbus/dbus/homedir_dynamic.go rename to vendor/github.com/godbus/dbus/v5/homedir_dynamic.go diff --git a/vendor/github.com/godbus/dbus/homedir_static.go b/vendor/github.com/godbus/dbus/v5/homedir_static.go similarity index 100% rename from vendor/github.com/godbus/dbus/homedir_static.go rename to vendor/github.com/godbus/dbus/v5/homedir_static.go diff --git a/vendor/github.com/godbus/dbus/v5/match.go b/vendor/github.com/godbus/dbus/v5/match.go new file mode 100644 index 00000000000..086ee336a9a --- /dev/null +++ b/vendor/github.com/godbus/dbus/v5/match.go @@ -0,0 +1,62 @@ +package dbus + +import ( + "strings" +) + +// MatchOption specifies option for dbus routing match rule. Options can be constructed with WithMatch* helpers. +// For full list of available options consult +// https://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-routing-match-rules +type MatchOption struct { + key string + value string +} + +func formatMatchOptions(options []MatchOption) string { + items := make([]string, 0, len(options)) + for _, option := range options { + items = append(items, option.key+"='"+option.value+"'") + } + return strings.Join(items, ",") +} + +// WithMatchOption creates match option with given key and value +func WithMatchOption(key, value string) MatchOption { + return MatchOption{key, value} +} + +// doesn't make sense to export this option because clients can only +// subscribe to messages with signal type. +func withMatchType(typ string) MatchOption { + return WithMatchOption("type", typ) +} + +// WithMatchSender sets sender match option. +func WithMatchSender(sender string) MatchOption { + return WithMatchOption("sender", sender) +} + +// WithMatchSender sets interface match option. +func WithMatchInterface(iface string) MatchOption { + return WithMatchOption("interface", iface) +} + +// WithMatchMember sets member match option. +func WithMatchMember(member string) MatchOption { + return WithMatchOption("member", member) +} + +// WithMatchObjectPath creates match option that filters events based on given path +func WithMatchObjectPath(path ObjectPath) MatchOption { + return WithMatchOption("path", string(path)) +} + +// WithMatchPathNamespace sets path_namespace match option. +func WithMatchPathNamespace(namespace ObjectPath) MatchOption { + return WithMatchOption("path_namespace", string(namespace)) +} + +// WithMatchDestination sets destination match option. +func WithMatchDestination(destination string) MatchOption { + return WithMatchOption("destination", destination) +} diff --git a/vendor/github.com/godbus/dbus/message.go b/vendor/github.com/godbus/dbus/v5/message.go similarity index 100% rename from vendor/github.com/godbus/dbus/message.go rename to vendor/github.com/godbus/dbus/v5/message.go diff --git a/vendor/github.com/godbus/dbus/object.go b/vendor/github.com/godbus/dbus/v5/object.go similarity index 83% rename from vendor/github.com/godbus/dbus/object.go rename to vendor/github.com/godbus/dbus/v5/object.go index f27ffe144a8..8acd7fc8b1a 100644 --- a/vendor/github.com/godbus/dbus/object.go +++ b/vendor/github.com/godbus/dbus/v5/object.go @@ -16,6 +16,7 @@ type BusObject interface { AddMatchSignal(iface, member string, options ...MatchOption) *Call RemoveMatchSignal(iface, member string, options ...MatchOption) *Call GetProperty(p string) (Variant, error) + SetProperty(p string, v interface{}) error Destination() string Path() ObjectPath } @@ -37,41 +38,16 @@ func (o *Object) CallWithContext(ctx context.Context, method string, flags Flags return <-o.createCall(ctx, method, flags, make(chan *Call, 1), args...).Done } -// MatchOption specifies option for dbus routing match rule. Options can be constructed with WithMatch* helpers. -// For full list of available options consult -// https://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-routing-match-rules -type MatchOption struct { - key string - value string -} - -// WithMatchOption creates match option with given key and value -func WithMatchOption(key, value string) MatchOption { - return MatchOption{key, value} -} - -// WithMatchObjectPath creates match option that filters events based on given path -func WithMatchObjectPath(path ObjectPath) MatchOption { - return MatchOption{"path", string(path)} -} - -func formatMatchOptions(options []MatchOption) string { - items := make([]string, 0, len(options)) - for _, option := range options { - items = append(items, option.key+"='"+option.value+"'") - } - - return strings.Join(items, ",") -} - // AddMatchSignal subscribes BusObject to signals from specified interface, // method (member). Additional filter rules can be added via WithMatch* option constructors. // Note: To filter events by object path you have to specify this path via an option. +// +// Deprecated: use (*Conn) AddMatchSignal instead. func (o *Object) AddMatchSignal(iface, member string, options ...MatchOption) *Call { base := []MatchOption{ - {"type", "signal"}, - {"interface", iface}, - {"member", member}, + withMatchType("signal"), + WithMatchInterface(iface), + WithMatchMember(member), } options = append(base, options...) @@ -84,11 +60,13 @@ func (o *Object) AddMatchSignal(iface, member string, options ...MatchOption) *C // RemoveMatchSignal unsubscribes BusObject from signals from specified interface, // method (member). Additional filter rules can be added via WithMatch* option constructors +// +// Deprecated: use (*Conn) RemoveMatchSignal instead. func (o *Object) RemoveMatchSignal(iface, member string, options ...MatchOption) *Call { base := []MatchOption{ - {"type", "signal"}, - {"interface", iface}, - {"member", member}, + withMatchType("signal"), + WithMatchInterface(iface), + WithMatchMember(member), } options = append(base, options...) @@ -146,7 +124,7 @@ func (o *Object) createCall(ctx context.Context, method string, flags Flags, ch } if msg.Flags&FlagNoReplyExpected == 0 { if ch == nil { - ch = make(chan *Call, 10) + ch = make(chan *Call, 1) } else if cap(ch) == 0 { panic("dbus: unbuffered channel passed to (*Object).Go") } @@ -187,7 +165,7 @@ func (o *Object) createCall(ctx context.Context, method string, flags Flags, ch return call } -// GetProperty calls org.freedesktop.DBus.Properties.GetProperty on the given +// GetProperty calls org.freedesktop.DBus.Properties.Get on the given // object. The property name must be given in interface.member notation. func (o *Object) GetProperty(p string) (Variant, error) { idx := strings.LastIndex(p, ".") @@ -208,6 +186,20 @@ func (o *Object) GetProperty(p string) (Variant, error) { return result, nil } +// SetProperty calls org.freedesktop.DBus.Properties.Set on the given +// object. The property name must be given in interface.member notation. +func (o *Object) SetProperty(p string, v interface{}) error { + idx := strings.LastIndex(p, ".") + if idx == -1 || idx+1 == len(p) { + return errors.New("dbus: invalid property " + p) + } + + iface := p[:idx] + prop := p[idx+1:] + + return o.Call("org.freedesktop.DBus.Properties.Set", 0, iface, prop, v).Err +} + // Destination returns the destination that calls on (o *Object) are sent to. func (o *Object) Destination() string { return o.dest diff --git a/vendor/github.com/godbus/dbus/server_interfaces.go b/vendor/github.com/godbus/dbus/v5/server_interfaces.go similarity index 94% rename from vendor/github.com/godbus/dbus/server_interfaces.go rename to vendor/github.com/godbus/dbus/v5/server_interfaces.go index 01166f0bd2a..79d97edf3ec 100644 --- a/vendor/github.com/godbus/dbus/server_interfaces.go +++ b/vendor/github.com/godbus/dbus/v5/server_interfaces.go @@ -77,6 +77,14 @@ type SignalHandler interface { DeliverSignal(iface, name string, signal *Signal) } +// SignalRegistrar manages signal delivery channels. +// +// This is an optional set of methods for `SignalHandler`. +type SignalRegistrar interface { + AddSignal(ch chan<- *Signal) + RemoveSignal(ch chan<- *Signal) +} + // A DBusError is used to convert a generic object to a D-Bus error. // // Any custom error mechanism may implement this interface to provide diff --git a/vendor/github.com/godbus/dbus/sig.go b/vendor/github.com/godbus/dbus/v5/sig.go similarity index 100% rename from vendor/github.com/godbus/dbus/sig.go rename to vendor/github.com/godbus/dbus/v5/sig.go diff --git a/vendor/github.com/godbus/dbus/transport_darwin.go b/vendor/github.com/godbus/dbus/v5/transport_darwin.go similarity index 100% rename from vendor/github.com/godbus/dbus/transport_darwin.go rename to vendor/github.com/godbus/dbus/v5/transport_darwin.go diff --git a/vendor/github.com/godbus/dbus/transport_generic.go b/vendor/github.com/godbus/dbus/v5/transport_generic.go similarity index 100% rename from vendor/github.com/godbus/dbus/transport_generic.go rename to vendor/github.com/godbus/dbus/v5/transport_generic.go diff --git a/vendor/github.com/godbus/dbus/transport_nonce_tcp.go b/vendor/github.com/godbus/dbus/v5/transport_nonce_tcp.go similarity index 100% rename from vendor/github.com/godbus/dbus/transport_nonce_tcp.go rename to vendor/github.com/godbus/dbus/v5/transport_nonce_tcp.go diff --git a/vendor/github.com/godbus/dbus/transport_tcp.go b/vendor/github.com/godbus/dbus/v5/transport_tcp.go similarity index 97% rename from vendor/github.com/godbus/dbus/transport_tcp.go rename to vendor/github.com/godbus/dbus/v5/transport_tcp.go index dd1c8e59c5b..f91c9b7d709 100644 --- a/vendor/github.com/godbus/dbus/transport_tcp.go +++ b/vendor/github.com/godbus/dbus/v5/transport_tcp.go @@ -1,5 +1,3 @@ -//+build !windows - package dbus import ( diff --git a/vendor/github.com/godbus/dbus/transport_unix.go b/vendor/github.com/godbus/dbus/v5/transport_unix.go similarity index 99% rename from vendor/github.com/godbus/dbus/transport_unix.go rename to vendor/github.com/godbus/dbus/v5/transport_unix.go index f000c6b5d45..c7cd02f97fd 100644 --- a/vendor/github.com/godbus/dbus/transport_unix.go +++ b/vendor/github.com/godbus/dbus/v5/transport_unix.go @@ -203,7 +203,7 @@ func (t *unixTransport) SendMessage(msg *Message) error { } } else { if err := msg.EncodeTo(t, nativeEndian); err != nil { - return nil + return err } } return nil diff --git a/vendor/github.com/godbus/dbus/transport_unixcred_dragonfly.go b/vendor/github.com/godbus/dbus/v5/transport_unixcred_dragonfly.go similarity index 100% rename from vendor/github.com/godbus/dbus/transport_unixcred_dragonfly.go rename to vendor/github.com/godbus/dbus/v5/transport_unixcred_dragonfly.go diff --git a/vendor/github.com/godbus/dbus/transport_unixcred_freebsd.go b/vendor/github.com/godbus/dbus/v5/transport_unixcred_freebsd.go similarity index 100% rename from vendor/github.com/godbus/dbus/transport_unixcred_freebsd.go rename to vendor/github.com/godbus/dbus/v5/transport_unixcred_freebsd.go diff --git a/vendor/github.com/godbus/dbus/transport_unixcred_linux.go b/vendor/github.com/godbus/dbus/v5/transport_unixcred_linux.go similarity index 100% rename from vendor/github.com/godbus/dbus/transport_unixcred_linux.go rename to vendor/github.com/godbus/dbus/v5/transport_unixcred_linux.go diff --git a/vendor/github.com/godbus/dbus/transport_unixcred_openbsd.go b/vendor/github.com/godbus/dbus/v5/transport_unixcred_openbsd.go similarity index 100% rename from vendor/github.com/godbus/dbus/transport_unixcred_openbsd.go rename to vendor/github.com/godbus/dbus/v5/transport_unixcred_openbsd.go diff --git a/vendor/github.com/godbus/dbus/variant.go b/vendor/github.com/godbus/dbus/v5/variant.go similarity index 95% rename from vendor/github.com/godbus/dbus/variant.go rename to vendor/github.com/godbus/dbus/v5/variant.go index 0ca123b0128..5b51828c824 100644 --- a/vendor/github.com/godbus/dbus/variant.go +++ b/vendor/github.com/godbus/dbus/v5/variant.go @@ -26,7 +26,7 @@ func MakeVariantWithSignature(v interface{}, s Signature) Variant { } // ParseVariant parses the given string as a variant as described at -// https://developer.gnome.org/glib/unstable/gvariant-text.html. If sig is not +// https://developer.gnome.org/glib/stable/gvariant-text.html. If sig is not // empty, it is taken to be the expected signature for the variant. func ParseVariant(s string, sig Signature) (Variant, error) { tokens := varLex(s) @@ -129,7 +129,7 @@ func (v Variant) Signature() Signature { } // String returns the string representation of the underlying value of v as -// described at https://developer.gnome.org/glib/unstable/gvariant-text.html. +// described at https://developer.gnome.org/glib/stable/gvariant-text.html. func (v Variant) String() string { s, unamb := v.format() if !unamb { diff --git a/vendor/github.com/godbus/dbus/variant_lexer.go b/vendor/github.com/godbus/dbus/v5/variant_lexer.go similarity index 95% rename from vendor/github.com/godbus/dbus/variant_lexer.go rename to vendor/github.com/godbus/dbus/v5/variant_lexer.go index 332007d6f12..bf1398c8f05 100644 --- a/vendor/github.com/godbus/dbus/variant_lexer.go +++ b/vendor/github.com/godbus/dbus/v5/variant_lexer.go @@ -51,7 +51,7 @@ func varLex(s string) []varToken { } func (l *varLexer) accept(valid string) bool { - if strings.IndexRune(valid, l.next()) >= 0 { + if strings.ContainsRune(valid, l.next()) { return true } l.backup() @@ -214,17 +214,17 @@ func varLexNumber(l *varLexer) lexState { digits = "01234567" } } - for strings.IndexRune(digits, l.next()) >= 0 { + for strings.ContainsRune(digits, l.next()) { } l.backup() if l.accept(".") { - for strings.IndexRune(digits, l.next()) >= 0 { + for strings.ContainsRune(digits, l.next()) { } l.backup() } if l.accept("eE") { l.accept("+-") - for strings.IndexRune("0123456789", l.next()) >= 0 { + for strings.ContainsRune("0123456789", l.next()) { } l.backup() } diff --git a/vendor/github.com/godbus/dbus/variant_parser.go b/vendor/github.com/godbus/dbus/v5/variant_parser.go similarity index 100% rename from vendor/github.com/godbus/dbus/variant_parser.go rename to vendor/github.com/godbus/dbus/v5/variant_parser.go diff --git a/vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go b/vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go index c6b9dc6bb48..07d251d4b15 100644 --- a/vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go +++ b/vendor/github.com/gogo/googleapis/google/rpc/error_details.pb.go @@ -4821,6 +4821,7 @@ func (m *LocalizedMessage) Unmarshal(dAtA []byte) error { func skipErrorDetails(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -4852,10 +4853,8 @@ func skipErrorDetails(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -4876,55 +4875,30 @@ func skipErrorDetails(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthErrorDetails } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthErrorDetails - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowErrorDetails - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipErrorDetails(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthErrorDetails - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupErrorDetails + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthErrorDetails + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthErrorDetails = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowErrorDetails = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthErrorDetails = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowErrorDetails = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupErrorDetails = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go b/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go index c717ffe4fbf..59793ba3809 100644 --- a/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go +++ b/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go @@ -648,6 +648,7 @@ func (m *Status) Unmarshal(dAtA []byte) error { func skipStatus(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -679,10 +680,8 @@ func skipStatus(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -703,55 +702,30 @@ func skipStatus(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthStatus } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthStatus - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStatus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipStatus(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthStatus - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupStatus + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthStatus + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthStatus = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStatus = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthStatus = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStatus = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupStatus = fmt.Errorf("proto: unexpected end of group") ) diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go index e9cc2025852..f0d66befbb8 100644 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go @@ -165,6 +165,11 @@ type wkt interface { XXX_WellKnownType() string } +var ( + wktType = reflect.TypeOf((*wkt)(nil)).Elem() + messageType = reflect.TypeOf((*proto.Message)(nil)).Elem() +) + // marshalObject writes a struct to the Writer. func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeURL string) error { if jsm, ok := v.(JSONPBMarshaler); ok { @@ -531,7 +536,8 @@ func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v refle // Handle well-known types. // Most are handled up in marshalObject (because 99% are messages). - if wkt, ok := v.Interface().(wkt); ok { + if v.Type().Implements(wktType) { + wkt := v.Interface().(wkt) switch wkt.XXX_WellKnownType() { case "NullValue": out.write("null") @@ -1277,8 +1283,8 @@ func checkRequiredFields(pb proto.Message) error { } func checkRequiredFieldsInValue(v reflect.Value) error { - if pm, ok := v.Interface().(proto.Message); ok { - return checkRequiredFields(pm) + if v.Type().Implements(messageType) { + return checkRequiredFields(v.Interface().(proto.Message)) } return nil } diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go index fdd328bb7f5..70fbda5329c 100644 --- a/vendor/github.com/golang/protobuf/proto/lib.go +++ b/vendor/github.com/golang/protobuf/proto/lib.go @@ -393,7 +393,7 @@ func (p *Buffer) Bytes() []byte { return p.buf } // than relying on this API. // // If deterministic serialization is requested, map entries will be sorted -// by keys in lexographical order. This is an implementation detail and +// by keys in lexicographical order. This is an implementation detail and // subject to change. func (p *Buffer) SetDeterministic(deterministic bool) { p.deterministic = deterministic diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go index 1aaee725b45..d97f9b3563e 100644 --- a/vendor/github.com/golang/protobuf/proto/text.go +++ b/vendor/github.com/golang/protobuf/proto/text.go @@ -456,6 +456,8 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return nil } +var textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() + // writeAny writes an arbitrary field. func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { v = reflect.Indirect(v) @@ -519,8 +521,8 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert // mutating this value. v = v.Addr() } - if etm, ok := v.Interface().(encoding.TextMarshaler); ok { - text, err := etm.MarshalText() + if v.Type().Implements(textMarshalerType) { + text, err := v.Interface().(encoding.TextMarshaler).MarshalText() if err != nil { return err } diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go index 1ded05bbe71..d371d56974b 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go @@ -1376,8 +1376,8 @@ type FileOptions struct { // determining the namespace. PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` // Use this option to change the namespace of php generated metadata classes. - // Default is empty. When this option is empty, the proto file name will be used - // for determining the namespace. + // Default is empty. When this option is empty, the proto file name will be + // used for determining the namespace. PhpMetadataNamespace *string `protobuf:"bytes,44,opt,name=php_metadata_namespace,json=phpMetadataNamespace" json:"php_metadata_namespace,omitempty"` // Use this option to change the package of ruby generated classes. Default // is empty. When this option is not set, the package name will be used for @@ -1627,7 +1627,7 @@ type MessageOptions struct { // // Implementations may choose not to generate the map_entry=true message, but // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementions still need to work as + // The reflection APIs in such implementations still need to work as // if the field is a repeated message field. // // NOTE: Do not set the option in .proto files. Always use the maps syntax @@ -2377,7 +2377,7 @@ type SourceCodeInfo struct { // beginning of the "extend" block and is shared by all extensions within // the block. // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendent. For example, a "group" defines + // does not mean that it is a descendant. For example, a "group" defines // both a type and a field in a single declaration. Thus, the locations // corresponding to the type and field and their components will overlap. // - Code which tries to interpret locations should probably be designed to @@ -2718,7 +2718,9 @@ func init() { proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation") } -func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor_e5baabe45344a177) } +func init() { + proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor_e5baabe45344a177) +} var fileDescriptor_e5baabe45344a177 = []byte{ // 2589 bytes of a gzipped FileDescriptorProto diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto index ed08fcbc542..a2102d7aa99 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto @@ -40,6 +40,7 @@ syntax = "proto2"; package google.protobuf; + option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor"; option java_package = "com.google.protobuf"; option java_outer_classname = "DescriptorProtos"; @@ -59,8 +60,8 @@ message FileDescriptorSet { // Describes a complete .proto file. message FileDescriptorProto { - optional string name = 1; // file name, relative to root of source tree - optional string package = 2; // e.g. "foo", "foo.bar", etc. + optional string name = 1; // file name, relative to root of source tree + optional string package = 2; // e.g. "foo", "foo.bar", etc. // Names of files imported by this file. repeated string dependency = 3; @@ -100,8 +101,8 @@ message DescriptorProto { repeated EnumDescriptorProto enum_type = 4; message ExtensionRange { - optional int32 start = 1; - optional int32 end = 2; + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. optional ExtensionRangeOptions options = 3; } @@ -115,8 +116,8 @@ message DescriptorProto { // fields or extension ranges in the same message. Reserved ranges may // not overlap. message ReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Exclusive. + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. } repeated ReservedRange reserved_range = 9; // Reserved field names, which may not be used by fields in the same message. @@ -137,42 +138,42 @@ message FieldDescriptorProto { enum Type { // 0 is reserved for errors. // Order is weird for historical reasons. - TYPE_DOUBLE = 1; - TYPE_FLOAT = 2; + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if // negative values are likely. - TYPE_INT64 = 3; - TYPE_UINT64 = 4; + TYPE_INT64 = 3; + TYPE_UINT64 = 4; // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if // negative values are likely. - TYPE_INT32 = 5; - TYPE_FIXED64 = 6; - TYPE_FIXED32 = 7; - TYPE_BOOL = 8; - TYPE_STRING = 9; + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; // Tag-delimited aggregate. // Group type is deprecated and not supported in proto3. However, Proto3 // implementations should still be able to parse the group wire format and // treat group fields as unknown fields. - TYPE_GROUP = 10; - TYPE_MESSAGE = 11; // Length-delimited aggregate. + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; // Length-delimited aggregate. // New in version 2. - TYPE_BYTES = 12; - TYPE_UINT32 = 13; - TYPE_ENUM = 14; - TYPE_SFIXED32 = 15; - TYPE_SFIXED64 = 16; - TYPE_SINT32 = 17; // Uses ZigZag encoding. - TYPE_SINT64 = 18; // Uses ZigZag encoding. - }; + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; // Uses ZigZag encoding. + TYPE_SINT64 = 18; // Uses ZigZag encoding. + } enum Label { // 0 is reserved for errors - LABEL_OPTIONAL = 1; - LABEL_REQUIRED = 2; - LABEL_REPEATED = 3; - }; + LABEL_OPTIONAL = 1; + LABEL_REQUIRED = 2; + LABEL_REPEATED = 3; + } optional string name = 1; optional int32 number = 3; @@ -234,8 +235,8 @@ message EnumDescriptorProto { // is inclusive such that it can appropriately represent the entire int32 // domain. message EnumReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Inclusive. + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Inclusive. } // Range of reserved numeric values. Reserved numeric values may not be used @@ -276,9 +277,9 @@ message MethodDescriptorProto { optional MethodOptions options = 4; // Identifies if client streams multiple client messages - optional bool client_streaming = 5 [default=false]; + optional bool client_streaming = 5 [default = false]; // Identifies if server streams multiple server messages - optional bool server_streaming = 6 [default=false]; + optional bool server_streaming = 6 [default = false]; } @@ -314,7 +315,6 @@ message MethodDescriptorProto { // If this turns out to be popular, a web service will be set up // to automatically assign option numbers. - message FileOptions { // Sets the Java package where classes generated from this .proto will be @@ -337,7 +337,7 @@ message FileOptions { // named by java_outer_classname. However, the outer class will still be // generated to contain the file's getDescriptor() method as well as any // top-level extensions defined in the file. - optional bool java_multiple_files = 10 [default=false]; + optional bool java_multiple_files = 10 [default = false]; // This option does nothing. optional bool java_generate_equals_and_hash = 20 [deprecated=true]; @@ -348,17 +348,17 @@ message FileOptions { // Message reflection will do the same. // However, an extension field still accepts non-UTF-8 byte sequences. // This option has no effect on when used with the lite runtime. - optional bool java_string_check_utf8 = 27 [default=false]; + optional bool java_string_check_utf8 = 27 [default = false]; // Generated classes can be optimized for speed or code size. enum OptimizeMode { - SPEED = 1; // Generate complete code for parsing, serialization, - // etc. - CODE_SIZE = 2; // Use ReflectionOps to implement these methods. - LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. + SPEED = 1; // Generate complete code for parsing, serialization, + // etc. + CODE_SIZE = 2; // Use ReflectionOps to implement these methods. + LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. } - optional OptimizeMode optimize_for = 9 [default=SPEED]; + optional OptimizeMode optimize_for = 9 [default = SPEED]; // Sets the Go package where structs generated from this .proto will be // placed. If omitted, the Go package will be derived from the following: @@ -369,6 +369,7 @@ message FileOptions { + // Should generic services be generated in each language? "Generic" services // are not specific to any particular RPC system. They are generated by the // main code generators in each language (without additional plugins). @@ -379,20 +380,20 @@ message FileOptions { // that generate code specific to your particular RPC system. Therefore, // these default to false. Old code which depends on generic services should // explicitly set them to true. - optional bool cc_generic_services = 16 [default=false]; - optional bool java_generic_services = 17 [default=false]; - optional bool py_generic_services = 18 [default=false]; - optional bool php_generic_services = 42 [default=false]; + optional bool cc_generic_services = 16 [default = false]; + optional bool java_generic_services = 17 [default = false]; + optional bool py_generic_services = 18 [default = false]; + optional bool php_generic_services = 42 [default = false]; // Is this file deprecated? // Depending on the target platform, this can emit Deprecated annotations // for everything in the file, or it will be completely ignored; in the very // least, this is a formalization for deprecating files. - optional bool deprecated = 23 [default=false]; + optional bool deprecated = 23 [default = false]; // Enables the use of arenas for the proto messages in this file. This applies // only to generated classes for C++. - optional bool cc_enable_arenas = 31 [default=false]; + optional bool cc_enable_arenas = 31 [default = false]; // Sets the objective c class prefix which is prepended to all objective c @@ -417,10 +418,9 @@ message FileOptions { // determining the namespace. optional string php_namespace = 41; - // Use this option to change the namespace of php generated metadata classes. - // Default is empty. When this option is empty, the proto file name will be used - // for determining the namespace. + // Default is empty. When this option is empty, the proto file name will be + // used for determining the namespace. optional string php_metadata_namespace = 44; // Use this option to change the package of ruby generated classes. Default @@ -428,6 +428,7 @@ message FileOptions { // determining the ruby package. optional string ruby_package = 45; + // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. repeated UninterpretedOption uninterpreted_option = 999; @@ -458,18 +459,18 @@ message MessageOptions { // // Because this is an option, the above two restrictions are not enforced by // the protocol compiler. - optional bool message_set_wire_format = 1 [default=false]; + optional bool message_set_wire_format = 1 [default = false]; // Disables the generation of the standard "descriptor()" accessor, which can // conflict with a field of the same name. This is meant to make migration // from proto1 easier; new code should avoid fields named "descriptor". - optional bool no_standard_descriptor_accessor = 2 [default=false]; + optional bool no_standard_descriptor_accessor = 2 [default = false]; // Is this message deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the message, or it will be completely ignored; in the very least, // this is a formalization for deprecating messages. - optional bool deprecated = 3 [default=false]; + optional bool deprecated = 3 [default = false]; // Whether the message is an automatically generated map entry type for the // maps field. @@ -486,7 +487,7 @@ message MessageOptions { // // Implementations may choose not to generate the map_entry=true message, but // use a native map in the target language to hold the keys and values. - // The reflection APIs in such implementions still need to work as + // The reflection APIs in such implementations still need to work as // if the field is a repeated message field. // // NOTE: Do not set the option in .proto files. Always use the maps syntax @@ -497,6 +498,7 @@ message MessageOptions { reserved 8; // javalite_serializable reserved 9; // javanano_as_lite + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -576,16 +578,16 @@ message FieldOptions { // implementation must either *always* check its required fields, or *never* // check its required fields, regardless of whether or not the message has // been parsed. - optional bool lazy = 5 [default=false]; + optional bool lazy = 5 [default = false]; // Is this field deprecated? // Depending on the target platform, this can emit Deprecated annotations // for accessors, or it will be completely ignored; in the very least, this // is a formalization for deprecating fields. - optional bool deprecated = 3 [default=false]; + optional bool deprecated = 3 [default = false]; // For Google-internal migration only. Do not use. - optional bool weak = 10 [default=false]; + optional bool weak = 10 [default = false]; // The parser stores options it doesn't recognize here. See above. @@ -615,7 +617,7 @@ message EnumOptions { // Depending on the target platform, this can emit Deprecated annotations // for the enum, or it will be completely ignored; in the very least, this // is a formalization for deprecating enums. - optional bool deprecated = 3 [default=false]; + optional bool deprecated = 3 [default = false]; reserved 5; // javanano_as_lite @@ -631,7 +633,7 @@ message EnumValueOptions { // Depending on the target platform, this can emit Deprecated annotations // for the enum value, or it will be completely ignored; in the very least, // this is a formalization for deprecating enum values. - optional bool deprecated = 1 [default=false]; + optional bool deprecated = 1 [default = false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -651,7 +653,7 @@ message ServiceOptions { // Depending on the target platform, this can emit Deprecated annotations // for the service, or it will be completely ignored; in the very least, // this is a formalization for deprecating services. - optional bool deprecated = 33 [default=false]; + optional bool deprecated = 33 [default = false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -671,18 +673,18 @@ message MethodOptions { // Depending on the target platform, this can emit Deprecated annotations // for the method, or it will be completely ignored; in the very least, // this is a formalization for deprecating methods. - optional bool deprecated = 33 [default=false]; + optional bool deprecated = 33 [default = false]; // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, // or neither? HTTP based RPC implementation may choose GET verb for safe // methods, and PUT verb for idempotent methods instead of the default POST. enum IdempotencyLevel { IDEMPOTENCY_UNKNOWN = 0; - NO_SIDE_EFFECTS = 1; // implies idempotent - IDEMPOTENT = 2; // idempotent, but may have side effects + NO_SIDE_EFFECTS = 1; // implies idempotent + IDEMPOTENT = 2; // idempotent, but may have side effects } - optional IdempotencyLevel idempotency_level = - 34 [default=IDEMPOTENCY_UNKNOWN]; + optional IdempotencyLevel idempotency_level = 34 + [default = IDEMPOTENCY_UNKNOWN]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -763,7 +765,7 @@ message SourceCodeInfo { // beginning of the "extend" block and is shared by all extensions within // the block. // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendent. For example, a "group" defines + // does not mean that it is a descendant. For example, a "group" defines // both a type and a field in a single declaration. Thus, the locations // corresponding to the type and field and their components will overlap. // - Code which tries to interpret locations should probably be designed to @@ -794,14 +796,14 @@ message SourceCodeInfo { // [ 4, 3, 2, 7 ] // this path refers to the whole field declaration (from the beginning // of the label to the terminating semicolon). - repeated int32 path = 1 [packed=true]; + repeated int32 path = 1 [packed = true]; // Always has exactly three or four elements: start line, start column, // end line (optional, otherwise assumed same as start line), end column. // These are packed into a single field for efficiency. Note that line // and column numbers are zero-based -- typically you will want to add // 1 to each before displaying to a user. - repeated int32 span = 2 [packed=true]; + repeated int32 span = 2 [packed = true]; // If this SourceCodeInfo represents a complete declaration, these are any // comments appearing before and after the declaration which appear to be @@ -866,7 +868,7 @@ message GeneratedCodeInfo { message Annotation { // Identifies the element in the original source .proto file. This field // is formatted the same as SourceCodeInfo.Location.path. - repeated int32 path = 1 [packed=true]; + repeated int32 path = 1 [packed = true]; // Identifies the filesystem path to the original source .proto. optional string source_file = 2; diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go index 6f4a902b5be..63b8ca0eed4 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go @@ -2062,7 +2062,7 @@ func (g *Generator) generateInternalStructFields(mc *msgCtx, topLevelFields []to } -// generateOneofFuncs adds all the utility functions for oneof, including marshalling, unmarshalling and sizer. +// generateOneofFuncs adds all the utility functions for oneof, including marshaling, unmarshaling and sizer. func (g *Generator) generateOneofFuncs(mc *msgCtx, topLevelFields []topLevelField) { ofields := []*oneofField{} for _, f := range topLevelFields { @@ -2264,7 +2264,7 @@ func (g *Generator) generateMessage(message *Descriptor) { of := oneofField{ fieldCommon: fieldCommon{ goName: fname, - getterName: "Get"+fname, + getterName: "Get" + fname, goType: dname, tags: tag, protoName: odp.GetName(), @@ -2609,7 +2609,9 @@ func (g *Generator) generateFileDescriptor(file *FileDescriptor) { v := file.VarName() g.P() - g.P("func init() { ", g.Pkg["proto"], ".RegisterFile(", strconv.Quote(*file.Name), ", ", v, ") }") + g.P("func init() {") + g.P(g.Pkg["proto"], ".RegisterFile(", strconv.Quote(*file.Name), ", ", v, ")") + g.P("}") g.P("var ", v, " = []byte{") g.P("// ", len(b), " bytes of a gzipped FileDescriptorProto") for len(b) > 0 { diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/internal/remap/remap.go b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/internal/remap/remap.go index a9b61036cc0..39968eb9f92 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/generator/internal/remap/remap.go +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/generator/internal/remap/remap.go @@ -47,7 +47,7 @@ type Location struct { } // A Map represents a mapping between token locations in an input source text -// and locations in the correspnding output text. +// and locations in the corresponding output text. type Map map[Location]Location // Find reports whether the specified span is recorded by m, and if so returns diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go index 78ee5233495..7b0ad1ad86c 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go @@ -102,7 +102,8 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // type Any struct { // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. The last segment of the URL's path must represent + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent // the fully qualified name of the type (as in // `path/google.protobuf.Duration`). The name should be in a canonical form // (e.g., leading "." is not accepted). @@ -181,7 +182,9 @@ func init() { proto.RegisterType((*Any)(nil), "google.protobuf.Any") } -func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_b53526c13ae22eb4) } +func init() { + proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_b53526c13ae22eb4) +} var fileDescriptor_b53526c13ae22eb4 = []byte{ // 185 bytes of a gzipped FileDescriptorProto diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.proto b/vendor/github.com/golang/protobuf/ptypes/any/any.proto index 49329425583..c9be8541673 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.proto +++ b/vendor/github.com/golang/protobuf/ptypes/any/any.proto @@ -121,7 +121,8 @@ option objc_class_prefix = "GPB"; // message Any { // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. The last segment of the URL's path must represent + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent // the fully qualified name of the type (as in // `path/google.protobuf.Duration`). The name should be in a canonical form // (e.g., leading "." is not accepted). diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go index 0d681ee21a0..58b0786990d 100644 --- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go @@ -41,7 +41,7 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // if (duration.seconds < 0 && duration.nanos > 0) { // duration.seconds += 1; // duration.nanos -= 1000000000; -// } else if (durations.seconds > 0 && duration.nanos < 0) { +// } else if (duration.seconds > 0 && duration.nanos < 0) { // duration.seconds -= 1; // duration.nanos += 1000000000; // } @@ -142,7 +142,9 @@ func init() { proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") } -func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_23597b2ebd7ac6c5) } +func init() { + proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_23597b2ebd7ac6c5) +} var fileDescriptor_23597b2ebd7ac6c5 = []byte{ // 190 bytes of a gzipped FileDescriptorProto diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto index 975fce41aae..99cb102c353 100644 --- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto +++ b/vendor/github.com/golang/protobuf/ptypes/duration/duration.proto @@ -61,7 +61,7 @@ option objc_class_prefix = "GPB"; // if (duration.seconds < 0 && duration.nanos > 0) { // duration.seconds += 1; // duration.nanos -= 1000000000; -// } else if (durations.seconds > 0 && duration.nanos < 0) { +// } else if (duration.seconds > 0 && duration.nanos < 0) { // duration.seconds -= 1; // duration.nanos += 1000000000; // } @@ -101,7 +101,6 @@ option objc_class_prefix = "GPB"; // // message Duration { - // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Note: these bounds are computed from: // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go index 33daa73dd28..d82d6176b51 100644 --- a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go @@ -302,7 +302,9 @@ func init() { proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue") } -func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_df322afd6c9fb402) } +func init() { + proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_df322afd6c9fb402) +} var fileDescriptor_df322afd6c9fb402 = []byte{ // 417 bytes of a gzipped FileDescriptorProto diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto b/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto index 7d7808e7fbb..ed990e31d95 100644 --- a/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto +++ b/vendor/github.com/golang/protobuf/ptypes/struct/struct.proto @@ -40,7 +40,6 @@ option java_outer_classname = "StructProto"; option java_multiple_files = true; option objc_class_prefix = "GPB"; - // `Struct` represents a structured data value, consisting of fields // which map to dynamically typed values. In some languages, `Struct` // might be supported by a native representation. For example, in diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go index 31cd846de99..7a3b1e40e29 100644 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go @@ -20,17 +20,19 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -// A Timestamp represents a point in time independent of any time zone -// or calendar, represented as seconds and fractions of seconds at -// nanosecond resolution in UTC Epoch time. It is encoded using the -// Proleptic Gregorian Calendar which extends the Gregorian calendar -// backwards to year one. It is encoded assuming all minutes are 60 -// seconds long, i.e. leap seconds are "smeared" so that no leap second -// table is needed for interpretation. Range is from -// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. -// By restricting to that range, we ensure that we can convert to -// and from RFC 3339 date strings. -// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +// A Timestamp represents a point in time independent of any time zone or local +// calendar, encoded as a count of seconds and fractions of seconds at +// nanosecond resolution. The count is relative to an epoch at UTC midnight on +// January 1, 1970, in the proleptic Gregorian calendar which extends the +// Gregorian calendar backwards to year one. +// +// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +// second table is needed for interpretation, using a [24-hour linear +// smear](https://developers.google.com/time/smear). +// +// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +// restricting to that range, we ensure that we can convert to and from [RFC +// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // @@ -91,12 +93,14 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // 01:30 UTC on January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the -// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] +// standard +// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted -// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) -// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one -// can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( -// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- +// to this format using +// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with +// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use +// the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D // ) to obtain a formatter capable of generating timestamps in this format. // // @@ -160,7 +164,9 @@ func init() { proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") } -func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_292007bbfe81227e) } +func init() { + proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_292007bbfe81227e) +} var fileDescriptor_292007bbfe81227e = []byte{ // 191 bytes of a gzipped FileDescriptorProto diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto index eafb3fa03a6..cd357864a9e 100644 --- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto +++ b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.proto @@ -40,17 +40,19 @@ option java_outer_classname = "TimestampProto"; option java_multiple_files = true; option objc_class_prefix = "GPB"; -// A Timestamp represents a point in time independent of any time zone -// or calendar, represented as seconds and fractions of seconds at -// nanosecond resolution in UTC Epoch time. It is encoded using the -// Proleptic Gregorian Calendar which extends the Gregorian calendar -// backwards to year one. It is encoded assuming all minutes are 60 -// seconds long, i.e. leap seconds are "smeared" so that no leap second -// table is needed for interpretation. Range is from -// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. -// By restricting to that range, we ensure that we can convert to -// and from RFC 3339 date strings. -// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +// A Timestamp represents a point in time independent of any time zone or local +// calendar, encoded as a count of seconds and fractions of seconds at +// nanosecond resolution. The count is relative to an epoch at UTC midnight on +// January 1, 1970, in the proleptic Gregorian calendar which extends the +// Gregorian calendar backwards to year one. +// +// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +// second table is needed for interpretation, using a [24-hour linear +// smear](https://developers.google.com/time/smear). +// +// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +// restricting to that range, we ensure that we can convert to and from [RFC +// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // @@ -111,17 +113,18 @@ option objc_class_prefix = "GPB"; // 01:30 UTC on January 15, 2017. // // In JavaScript, one can convert a Date object to this format using the -// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] +// standard +// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) // method. In Python, a standard `datetime.datetime` object can be converted -// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) -// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one -// can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( -// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- +// to this format using +// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with +// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use +// the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D // ) to obtain a formatter capable of generating timestamps in this format. // // message Timestamp { - // Represents seconds of UTC time since Unix epoch // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive. diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go index add19a1adb0..968ff318d16 100644 --- a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go +++ b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.pb.go @@ -437,7 +437,9 @@ func init() { proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue") } -func init() { proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_5377b62bda767935) } +func init() { + proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_5377b62bda767935) +} var fileDescriptor_5377b62bda767935 = []byte{ // 259 bytes of a gzipped FileDescriptorProto diff --git a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto index 01947639ac4..9ee41e384ac 100644 --- a/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto +++ b/vendor/github.com/golang/protobuf/ptypes/wrappers/wrappers.proto @@ -32,6 +32,11 @@ // for embedding primitives in the `google.protobuf.Any` type and for places // where we need to distinguish between the absence of a primitive // typed field and its default value. +// +// These wrappers have no meaningful use within repeated fields as they lack +// the ability to detect presence on individual elements. +// These wrappers have no meaningful use within a map or a oneof since +// individual entries of a map or fields of a oneof can already detect presence. syntax = "proto3"; diff --git a/vendor/github.com/google/cadvisor/accelerators/nvidia.go b/vendor/github.com/google/cadvisor/accelerators/nvidia.go index b0c3c0c5af9..08d5108f387 100644 --- a/vendor/github.com/google/cadvisor/accelerators/nvidia.go +++ b/vendor/github.com/google/cadvisor/accelerators/nvidia.go @@ -24,13 +24,15 @@ import ( "sync" "time" + "github.com/google/cadvisor/container" info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/stats" "github.com/mindprince/gonvml" - "k8s.io/klog" + "k8s.io/klog/v2" ) -type NvidiaManager struct { +type nvidiaManager struct { sync.Mutex // true if there are NVIDIA devices present on the node @@ -45,22 +47,37 @@ type NvidiaManager struct { var sysFsPCIDevicesPath = "/sys/bus/pci/devices/" -const nvidiaVendorId = "0x10de" +const nvidiaVendorID = "0x10de" -// Setup initializes NVML if nvidia devices are present on the node. -func (nm *NvidiaManager) Setup() { - if !detectDevices(nvidiaVendorId) { - klog.V(4).Info("No NVIDIA devices found.") - return +func NewNvidiaManager(includedMetrics container.MetricSet) stats.Manager { + if !includedMetrics.Has(container.AcceleratorUsageMetrics) { + klog.V(2).Info("NVIDIA GPU metrics disabled") + return &stats.NoopManager{} + } + + manager := &nvidiaManager{} + err := manager.setup() + if err != nil { + klog.Warningf("NVIDIA GPU metrics will not be available: %s", err) + manager.Destroy() + return &stats.NoopManager{} + } + return manager +} + +// setup initializes NVML if NVIDIA devices are present on the node. +func (nm *nvidiaManager) setup() error { + if !detectDevices(nvidiaVendorID) { + return fmt.Errorf("no NVIDIA devices found") } nm.devicesPresent = true - initializeNVML(nm) + return initializeNVML(nm) } // detectDevices returns true if a device with given pci id is present on the node. -func detectDevices(vendorId string) bool { +func detectDevices(vendorID string) bool { devices, err := ioutil.ReadDir(sysFsPCIDevicesPath) if err != nil { klog.Warningf("Error reading %q: %v", sysFsPCIDevicesPath, err) @@ -74,8 +91,8 @@ func detectDevices(vendorId string) bool { klog.V(4).Infof("Error while reading %q: %v", vendorPath, err) continue } - if strings.EqualFold(strings.TrimSpace(string(content)), vendorId) { - klog.V(3).Infof("Found device with vendorId %q", vendorId) + if strings.EqualFold(strings.TrimSpace(string(content)), vendorID) { + klog.V(3).Infof("Found device with vendorID %q", vendorID) return true } } @@ -84,72 +101,79 @@ func detectDevices(vendorId string) bool { // initializeNVML initializes the NVML library and sets up the nvmlDevices map. // This is defined as a variable to help in testing. -var initializeNVML = func(nm *NvidiaManager) { +var initializeNVML = func(nm *nvidiaManager) error { if err := gonvml.Initialize(); err != nil { // This is under a logging level because otherwise we may cause // log spam if the drivers/nvml is not installed on the system. - klog.V(4).Infof("Could not initialize NVML: %v", err) - return + return fmt.Errorf("Could not initialize NVML: %v", err) } nm.nvmlInitialized = true numDevices, err := gonvml.DeviceCount() if err != nil { - klog.Warningf("GPU metrics would not be available. Failed to get the number of nvidia devices: %v", err) - return + return fmt.Errorf("GPU metrics would not be available. Failed to get the number of NVIDIA devices: %v", err) } - klog.V(1).Infof("NVML initialized. Number of nvidia devices: %v", numDevices) + if numDevices == 0 { + return nil + } + klog.V(1).Infof("NVML initialized. Number of NVIDIA devices: %v", numDevices) nm.nvidiaDevices = make(map[int]gonvml.Device, numDevices) for i := 0; i < int(numDevices); i++ { device, err := gonvml.DeviceHandleByIndex(uint(i)) if err != nil { - klog.Warningf("Failed to get nvidia device handle %d: %v", i, err) - continue + return fmt.Errorf("Failed to get NVIDIA device handle %d: %v", i, err) } minorNumber, err := device.MinorNumber() if err != nil { - klog.Warningf("Failed to get nvidia device minor number: %v", err) - continue + return fmt.Errorf("Failed to get NVIDIA device minor number: %v", err) } nm.nvidiaDevices[int(minorNumber)] = device } + return nil } // Destroy shuts down NVML. -func (nm *NvidiaManager) Destroy() { +func (nm *nvidiaManager) Destroy() { if nm.nvmlInitialized { - gonvml.Shutdown() + err := gonvml.Shutdown() + if err != nil { + klog.Warningf("nvml library shutdown failed: %s", err) + } } } -// GetCollector returns a collector that can fetch nvidia gpu metrics for nvidia devices +// GetCollector returns a collector that can fetch NVIDIA gpu metrics for NVIDIA devices // present in the devices.list file in the given devicesCgroupPath. -func (nm *NvidiaManager) GetCollector(devicesCgroupPath string) (AcceleratorCollector, error) { - nc := &NvidiaCollector{} +func (nm *nvidiaManager) GetCollector(devicesCgroupPath string) (stats.Collector, error) { + nc := &nvidiaCollector{} if !nm.devicesPresent { - return nc, nil + return &stats.NoopCollector{}, nil } // Makes sure that we don't call initializeNVML() concurrently and // that we only call initializeNVML() when it's not initialized. nm.Lock() if !nm.nvmlInitialized { - initializeNVML(nm) - } - if !nm.nvmlInitialized || len(nm.nvidiaDevices) == 0 { - nm.Unlock() - return nc, nil + err := initializeNVML(nm) + if err != nil { + nm.Unlock() + return &stats.NoopCollector{}, err + } } nm.Unlock() + if len(nm.nvidiaDevices) == 0 { + return &stats.NoopCollector{}, nil + } nvidiaMinorNumbers, err := parseDevicesCgroup(devicesCgroupPath) if err != nil { - return nc, err + return &stats.NoopCollector{}, err } + for _, minor := range nvidiaMinorNumbers { device, ok := nm.nvidiaDevices[minor] if !ok { - return nc, fmt.Errorf("nvidia device minor number %d not found in cached devices", minor) + return &stats.NoopCollector{}, fmt.Errorf("NVIDIA device minor number %d not found in cached devices", minor) } - nc.Devices = append(nc.Devices, device) + nc.devices = append(nc.devices, device) } return nc, nil } @@ -208,14 +232,20 @@ var parseDevicesCgroup = func(devicesCgroupPath string) ([]int, error) { return nvidiaMinorNumbers, nil } -type NvidiaCollector struct { +type nvidiaCollector struct { // Exposed for testing - Devices []gonvml.Device + devices []gonvml.Device + + stats.NoopDestroy +} + +func NewNvidiaCollector(devices []gonvml.Device) stats.Collector { + return &nvidiaCollector{devices: devices} } // UpdateStats updates the stats for NVIDIA GPUs (if any) attached to the container. -func (nc *NvidiaCollector) UpdateStats(stats *info.ContainerStats) error { - for _, device := range nc.Devices { +func (nc *nvidiaCollector) UpdateStats(stats *info.ContainerStats) error { + for _, device := range nc.devices { model, err := device.Name() if err != nil { return fmt.Errorf("error while getting gpu name: %v", err) diff --git a/vendor/github.com/google/cadvisor/cache/memory/memory.go b/vendor/github.com/google/cadvisor/cache/memory/memory.go index 99454c77735..a43e1b442e0 100644 --- a/vendor/github.com/google/cadvisor/cache/memory/memory.go +++ b/vendor/github.com/google/cadvisor/cache/memory/memory.go @@ -23,7 +23,7 @@ import ( "github.com/google/cadvisor/storage" "github.com/google/cadvisor/utils" - "k8s.io/klog" + "k8s.io/klog/v2" ) // ErrDataNotFound is the error resulting if failed to find a container in memory cache. @@ -38,19 +38,19 @@ type containerCache struct { lock sync.RWMutex } -func (self *containerCache) AddStats(stats *info.ContainerStats) error { - self.lock.Lock() - defer self.lock.Unlock() +func (c *containerCache) AddStats(stats *info.ContainerStats) error { + c.lock.Lock() + defer c.lock.Unlock() // Add the stat to storage. - self.recentStats.Add(stats.Timestamp, stats) + c.recentStats.Add(stats.Timestamp, stats) return nil } -func (self *containerCache) RecentStats(start, end time.Time, maxStats int) ([]*info.ContainerStats, error) { - self.lock.RLock() - defer self.lock.RUnlock() - result := self.recentStats.InTimeRange(start, end, maxStats) +func (c *containerCache) RecentStats(start, end time.Time, maxStats int) ([]*info.ContainerStats, error) { + c.lock.RLock() + defer c.lock.RUnlock() + result := c.recentStats.InTimeRange(start, end, maxStats) converted := make([]*info.ContainerStats, len(result)) for i, el := range result { converted[i] = el.(*info.ContainerStats) @@ -73,20 +73,20 @@ type InMemoryCache struct { backend []storage.StorageDriver } -func (self *InMemoryCache) AddStats(cInfo *info.ContainerInfo, stats *info.ContainerStats) error { +func (c *InMemoryCache) AddStats(cInfo *info.ContainerInfo, stats *info.ContainerStats) error { var cstore *containerCache var ok bool func() { - self.lock.Lock() - defer self.lock.Unlock() - if cstore, ok = self.containerCacheMap[cInfo.ContainerReference.Name]; !ok { - cstore = newContainerStore(cInfo.ContainerReference, self.maxAge) - self.containerCacheMap[cInfo.ContainerReference.Name] = cstore + c.lock.Lock() + defer c.lock.Unlock() + if cstore, ok = c.containerCacheMap[cInfo.ContainerReference.Name]; !ok { + cstore = newContainerStore(cInfo.ContainerReference, c.maxAge) + c.containerCacheMap[cInfo.ContainerReference.Name] = cstore } }() - for _, backend := range self.backend { + for _, backend := range c.backend { // TODO(monnand): To deal with long delay write operations, we // may want to start a pool of goroutines to do write // operations. @@ -97,13 +97,13 @@ func (self *InMemoryCache) AddStats(cInfo *info.ContainerInfo, stats *info.Conta return cstore.AddStats(stats) } -func (self *InMemoryCache) RecentStats(name string, start, end time.Time, maxStats int) ([]*info.ContainerStats, error) { +func (c *InMemoryCache) RecentStats(name string, start, end time.Time, maxStats int) ([]*info.ContainerStats, error) { var cstore *containerCache var ok bool err := func() error { - self.lock.RLock() - defer self.lock.RUnlock() - if cstore, ok = self.containerCacheMap[name]; !ok { + c.lock.RLock() + defer c.lock.RUnlock() + if cstore, ok = c.containerCacheMap[name]; !ok { return ErrDataNotFound } return nil @@ -115,17 +115,17 @@ func (self *InMemoryCache) RecentStats(name string, start, end time.Time, maxSta return cstore.RecentStats(start, end, maxStats) } -func (self *InMemoryCache) Close() error { - self.lock.Lock() - self.containerCacheMap = make(map[string]*containerCache, 32) - self.lock.Unlock() +func (c *InMemoryCache) Close() error { + c.lock.Lock() + c.containerCacheMap = make(map[string]*containerCache, 32) + c.lock.Unlock() return nil } -func (self *InMemoryCache) RemoveContainer(containerName string) error { - self.lock.Lock() - delete(self.containerCacheMap, containerName) - self.lock.Unlock() +func (c *InMemoryCache) RemoveContainer(containerName string) error { + c.lock.Lock() + delete(c.containerCacheMap, containerName) + c.lock.Unlock() return nil } diff --git a/vendor/github.com/google/cadvisor/collector/prometheus_collector.go b/vendor/github.com/google/cadvisor/collector/prometheus_collector.go index efc3f3f8a60..17249da61ac 100644 --- a/vendor/github.com/google/cadvisor/collector/prometheus_collector.go +++ b/vendor/github.com/google/cadvisor/collector/prometheus_collector.go @@ -184,6 +184,17 @@ func (s byName) Less(i, j int) bool { return s.prometheusLabels[i].GetName() < s.prometheusLabels[j].GetName() } +func prometheusLabelSetToCadvisorLabels(promLabels model.Metric) map[string]string { + labels := make(map[string]string) + for k, v := range promLabels { + if string(k) == "__name__" { + continue + } + labels[string(k)] = string(v) + } + return labels +} + func prometheusLabelSetToCadvisorLabel(promLabels model.Metric) string { labels := labelSetToLabelPairs(promLabels) sort.Sort(byName{labels}) @@ -198,7 +209,7 @@ func prometheusLabelSetToCadvisorLabel(promLabels model.Metric) string { b.WriteString(l.GetValue()) } - return string(b.Bytes()) + return b.String() } // Returns collected metrics and the next collection time of the collector @@ -247,11 +258,13 @@ func (collector *PrometheusCollector) Collect(metrics map[string][]v1.MetricVal) // TODO Handle multiple labels nicer. Prometheus metrics can have multiple // labels, cadvisor only accepts a single string for the metric label. label := prometheusLabelSetToCadvisorLabel(sample.Metric) + labels := prometheusLabelSetToCadvisorLabels(sample.Metric) metric := v1.MetricVal{ FloatValue: float64(sample.Value), Timestamp: sample.Timestamp.Time(), Label: label, + Labels: labels, } newMetrics[metName] = append(newMetrics[metName], metric) if len(newMetrics) > collector.metricCountLimit { diff --git a/vendor/github.com/google/cadvisor/container/common/container_hints.go b/vendor/github.com/google/cadvisor/container/common/container_hints.go index 08e32832bc3..b9dec4e1b5b 100644 --- a/vendor/github.com/google/cadvisor/container/common/container_hints.go +++ b/vendor/github.com/google/cadvisor/container/common/container_hints.go @@ -27,7 +27,7 @@ import ( var ArgContainerHints = flag.String("container_hints", "/etc/cadvisor/container_hints.json", "location of the container hints file") -type containerHints struct { +type ContainerHints struct { AllHosts []containerHint `json:"all_hosts,omitempty"` } @@ -47,12 +47,12 @@ type networkInterface struct { VethChild string `json:"veth_child,omitempty"` } -func GetContainerHintsFromFile(containerHintsFile string) (containerHints, error) { +func GetContainerHintsFromFile(containerHintsFile string) (ContainerHints, error) { dat, err := ioutil.ReadFile(containerHintsFile) if os.IsNotExist(err) { - return containerHints{}, nil + return ContainerHints{}, nil } - var cHints containerHints + var cHints ContainerHints if err == nil { err = json.Unmarshal(dat, &cHints) } diff --git a/vendor/github.com/google/cadvisor/container/common/fsHandler.go b/vendor/github.com/google/cadvisor/container/common/fsHandler.go index 9de6a0f07fb..5b506b04a1e 100644 --- a/vendor/github.com/google/cadvisor/container/common/fsHandler.go +++ b/vendor/github.com/google/cadvisor/container/common/fsHandler.go @@ -22,7 +22,7 @@ import ( "github.com/google/cadvisor/fs" - "k8s.io/klog" + "k8s.io/klog/v2" ) type FsHandler interface { @@ -92,10 +92,11 @@ func (fh *realFsHandler) update() error { fh.lastUpdate = time.Now() if fh.rootfs != "" && rootErr == nil { fh.usage.InodeUsage = rootUsage.Inodes - fh.usage.TotalUsageBytes = rootUsage.Bytes + extraUsage.Bytes + fh.usage.BaseUsageBytes = rootUsage.Bytes + fh.usage.TotalUsageBytes = rootUsage.Bytes } if fh.extraDir != "" && extraErr == nil { - fh.usage.BaseUsageBytes = rootUsage.Bytes + fh.usage.TotalUsageBytes += extraUsage.Bytes } // Combine errors into a single error to return @@ -106,31 +107,30 @@ func (fh *realFsHandler) update() error { } func (fh *realFsHandler) trackUsage() { - fh.update() longOp := time.Second for { + start := time.Now() + if err := fh.update(); err != nil { + klog.Errorf("failed to collect filesystem stats - %v", err) + fh.period = fh.period * 2 + if fh.period > maxBackoffFactor*fh.minPeriod { + fh.period = maxBackoffFactor * fh.minPeriod + } + } else { + fh.period = fh.minPeriod + } + duration := time.Since(start) + if duration > longOp { + // adapt longOp time so that message doesn't continue to print + // if the long duration is persistent either because of slow + // disk or lots of containers. + longOp = longOp + time.Second + klog.V(2).Infof("fs: disk usage and inodes count on following dirs took %v: %v; will not log again for this container unless duration exceeds %v", duration, []string{fh.rootfs, fh.extraDir}, longOp) + } select { case <-fh.stopChan: return case <-time.After(fh.period): - start := time.Now() - if err := fh.update(); err != nil { - klog.Errorf("failed to collect filesystem stats - %v", err) - fh.period = fh.period * 2 - if fh.period > maxBackoffFactor*fh.minPeriod { - fh.period = maxBackoffFactor * fh.minPeriod - } - } else { - fh.period = fh.minPeriod - } - duration := time.Since(start) - if duration > longOp { - // adapt longOp time so that message doesn't continue to print - // if the long duration is persistent either because of slow - // disk or lots of containers. - longOp = longOp + time.Second - klog.V(2).Infof("fs: disk usage and inodes count on following dirs took %v: %v; will not log again for this container unless duration exceeds %v", duration, []string{fh.rootfs, fh.extraDir}, longOp) - } } } } diff --git a/vendor/github.com/google/cadvisor/container/common/helpers.go b/vendor/github.com/google/cadvisor/container/common/helpers.go index 64584eaac2e..29b05a74861 100644 --- a/vendor/github.com/google/cadvisor/container/common/helpers.go +++ b/vendor/github.com/google/cadvisor/container/common/helpers.go @@ -31,7 +31,7 @@ import ( "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/pkg/errors" - "k8s.io/klog" + "k8s.io/klog/v2" ) func DebugInfo(watches map[string][]string) map[string][]string { @@ -109,8 +109,9 @@ func GetSpec(cgroupPaths map[string]string, machineInfoFactory info.MachineInfoF val, err := strconv.ParseUint(quota, 10, 64) if err != nil { klog.Errorf("GetSpec: Failed to parse CPUQuota from %q: %s", path.Join(cpuRoot, "cpu.cfs_quota_us"), err) + } else { + spec.Cpu.Quota = val } - spec.Cpu.Quota = val } } } @@ -155,6 +156,14 @@ func GetSpec(cgroupPaths map[string]string, machineInfoFactory info.MachineInfoF } } + // Hugepage + hugepageRoot, ok := cgroupPaths["hugetlb"] + if ok { + if utils.FileExists(hugepageRoot) { + spec.HasHugetlb = true + } + } + // Processes, read it's value from pids path directly pidsRoot, ok := cgroupPaths["pids"] if ok { diff --git a/vendor/github.com/google/cadvisor/container/container.go b/vendor/github.com/google/cadvisor/container/container.go index 7af6810948a..8414efc6a02 100644 --- a/vendor/github.com/google/cadvisor/container/container.go +++ b/vendor/github.com/google/cadvisor/container/container.go @@ -32,7 +32,6 @@ type ContainerType int const ( ContainerTypeRaw ContainerType = iota ContainerTypeDocker - ContainerTypeSystemd ContainerTypeCrio ContainerTypeContainerd ContainerTypeMesos diff --git a/vendor/github.com/google/cadvisor/container/containerd/client.go b/vendor/github.com/google/cadvisor/container/containerd/client.go index beaa2021cd9..986476385f8 100644 --- a/vendor/github.com/google/cadvisor/container/containerd/client.go +++ b/vendor/github.com/google/cadvisor/container/containerd/client.go @@ -25,10 +25,11 @@ import ( tasksapi "github.com/containerd/containerd/api/services/tasks/v1" versionapi "github.com/containerd/containerd/api/services/version/v1" "github.com/containerd/containerd/containers" - "github.com/containerd/containerd/dialer" "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/pkg/dialer" ptypes "github.com/gogo/protobuf/types" "google.golang.org/grpc" + "google.golang.org/grpc/backoff" ) type client struct { @@ -37,22 +38,23 @@ type client struct { versionService versionapi.VersionClient } -type containerdClient interface { +type ContainerdClient interface { LoadContainer(ctx context.Context, id string) (*containers.Container, error) TaskPid(ctx context.Context, id string) (uint32, error) Version(ctx context.Context) (string, error) } var once sync.Once -var ctrdClient containerdClient = nil +var ctrdClient ContainerdClient = nil const ( maxBackoffDelay = 3 * time.Second + baseBackoffDelay = 100 * time.Millisecond connectionTimeout = 2 * time.Second ) // Client creates a containerd client -func Client(address, namespace string) (containerdClient, error) { +func Client(address, namespace string) (ContainerdClient, error) { var retErr error once.Do(func() { tryConn, err := net.DialTimeout("unix", address, connectionTimeout) @@ -62,12 +64,17 @@ func Client(address, namespace string) (containerdClient, error) { } tryConn.Close() + connParams := grpc.ConnectParams{ + Backoff: backoff.Config{ + BaseDelay: baseBackoffDelay, + MaxDelay: maxBackoffDelay, + }, + } gopts := []grpc.DialOption{ grpc.WithInsecure(), - grpc.WithDialer(dialer.Dialer), + grpc.WithContextDialer(dialer.ContextDialer), grpc.WithBlock(), - grpc.WithBackoffMaxDelay(maxBackoffDelay), - grpc.WithTimeout(connectionTimeout), + grpc.WithConnectParams(connParams), } unary, stream := newNSInterceptors(namespace) gopts = append(gopts, @@ -75,7 +82,9 @@ func Client(address, namespace string) (containerdClient, error) { grpc.WithStreamInterceptor(stream), ) - conn, err := grpc.Dial(dialer.DialAddress(address), gopts...) + ctx, cancel := context.WithTimeout(context.Background(), connectionTimeout) + defer cancel() + conn, err := grpc.DialContext(ctx, dialer.DialAddress(address), gopts...) if err != nil { retErr = err return diff --git a/vendor/github.com/google/cadvisor/container/containerd/factory.go b/vendor/github.com/google/cadvisor/container/containerd/factory.go index f80f0a97194..56e45c412ef 100644 --- a/vendor/github.com/google/cadvisor/container/containerd/factory.go +++ b/vendor/github.com/google/cadvisor/container/containerd/factory.go @@ -22,7 +22,7 @@ import ( "strings" "golang.org/x/net/context" - "k8s.io/klog" + "k8s.io/klog/v2" "github.com/google/cadvisor/container" "github.com/google/cadvisor/container/libcontainer" @@ -43,7 +43,7 @@ var containerdCgroupRegexp = regexp.MustCompile(`([a-z0-9]{64})`) type containerdFactory struct { machineInfoFactory info.MachineInfoFactory - client containerdClient + client ContainerdClient version string // Information about the mounted cgroup subsystems. cgroupSubsystems libcontainer.CgroupSubsystems @@ -52,11 +52,11 @@ type containerdFactory struct { includedMetrics container.MetricSet } -func (self *containerdFactory) String() string { +func (f *containerdFactory) String() string { return k8sContainerdNamespace } -func (self *containerdFactory) NewContainerHandler(name string, inHostNamespace bool) (handler container.ContainerHandler, err error) { +func (f *containerdFactory) NewContainerHandler(name string, inHostNamespace bool) (handler container.ContainerHandler, err error) { client, err := Client(*ArgContainerdEndpoint, *ArgContainerdNamespace) if err != nil { return @@ -66,12 +66,12 @@ func (self *containerdFactory) NewContainerHandler(name string, inHostNamespace return newContainerdContainerHandler( client, name, - self.machineInfoFactory, - self.fsInfo, - &self.cgroupSubsystems, + f.machineInfoFactory, + f.fsInfo, + &f.cgroupSubsystems, inHostNamespace, metadataEnvs, - self.includedMetrics, + f.includedMetrics, ) } @@ -95,7 +95,7 @@ func isContainerName(name string) bool { } // Containerd can handle and accept all containerd created containers -func (self *containerdFactory) CanHandleAndAccept(name string) (bool, bool, error) { +func (f *containerdFactory) CanHandleAndAccept(name string) (bool, bool, error) { // if the container is not associated with containerd, we can't handle it or accept it. if !isContainerName(name) { return false, false, nil @@ -105,7 +105,7 @@ func (self *containerdFactory) CanHandleAndAccept(name string) (bool, bool, erro // If container and task lookup in containerd fails then we assume // that the container state is not known to containerd ctx := context.Background() - _, err := self.client.LoadContainer(ctx, id) + _, err := f.client.LoadContainer(ctx, id) if err != nil { return false, false, fmt.Errorf("failed to load container: %v", err) } @@ -113,7 +113,7 @@ func (self *containerdFactory) CanHandleAndAccept(name string) (bool, bool, erro return true, true, nil } -func (self *containerdFactory) DebugInfo() map[string][]string { +func (f *containerdFactory) DebugInfo() map[string][]string { return map[string][]string{} } diff --git a/vendor/github.com/google/cadvisor/container/containerd/handler.go b/vendor/github.com/google/cadvisor/container/containerd/handler.go index 9e090d7feee..c213979027b 100644 --- a/vendor/github.com/google/cadvisor/container/containerd/handler.go +++ b/vendor/github.com/google/cadvisor/container/containerd/handler.go @@ -22,8 +22,6 @@ import ( "time" "github.com/containerd/containerd/errdefs" - cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" - libcontainerconfigs "github.com/opencontainers/runc/libcontainer/configs" "golang.org/x/net/context" "github.com/google/cadvisor/container" @@ -56,7 +54,7 @@ var _ container.ContainerHandler = &containerdContainerHandler{} // newContainerdContainerHandler returns a new container.ContainerHandler func newContainerdContainerHandler( - client containerdClient, + client ContainerdClient, name string, machineInfoFactory info.MachineInfoFactory, fsInfo fs.FsInfo, @@ -69,11 +67,9 @@ func newContainerdContainerHandler( cgroupPaths := common.MakeCgroupPaths(cgroupSubsystems.MountPoints, name) // Generate the equivalent cgroup manager for this container. - cgroupManager := &cgroupfs.Manager{ - Cgroups: &libcontainerconfigs.Cgroup{ - Name: name, - }, - Paths: cgroupPaths, + cgroupManager, err := containerlibcontainer.NewCgroupManager(name, cgroupPaths) + if err != nil { + return nil, err } id := ContainerNameToContainerdID(name) @@ -149,47 +145,47 @@ func newContainerdContainerHandler( return handler, nil } -func (self *containerdContainerHandler) ContainerReference() (info.ContainerReference, error) { - return self.reference, nil +func (h *containerdContainerHandler) ContainerReference() (info.ContainerReference, error) { + return h.reference, nil } -func (self *containerdContainerHandler) needNet() bool { +func (h *containerdContainerHandler) needNet() bool { // Since containerd does not handle networking ideally we need to return based // on includedMetrics list. Here the assumption is the presence of cri-containerd // label - if self.includedMetrics.Has(container.NetworkUsageMetrics) { + if h.includedMetrics.Has(container.NetworkUsageMetrics) { //TODO change it to exported cri-containerd constants - return self.labels["io.cri-containerd.kind"] == "sandbox" + return h.labels["io.cri-containerd.kind"] == "sandbox" } return false } -func (self *containerdContainerHandler) GetSpec() (info.ContainerSpec, error) { +func (h *containerdContainerHandler) GetSpec() (info.ContainerSpec, error) { // TODO: Since we dont collect disk usage stats for containerd, we set hasFilesystem // to false. Revisit when we support disk usage stats for containerd hasFilesystem := false - spec, err := common.GetSpec(self.cgroupPaths, self.machineInfoFactory, self.needNet(), hasFilesystem) - spec.Labels = self.labels - spec.Envs = self.envs - spec.Image = self.image + spec, err := common.GetSpec(h.cgroupPaths, h.machineInfoFactory, h.needNet(), hasFilesystem) + spec.Labels = h.labels + spec.Envs = h.envs + spec.Image = h.image return spec, err } -func (self *containerdContainerHandler) getFsStats(stats *info.ContainerStats) error { - mi, err := self.machineInfoFactory.GetMachineInfo() +func (h *containerdContainerHandler) getFsStats(stats *info.ContainerStats) error { + mi, err := h.machineInfoFactory.GetMachineInfo() if err != nil { return err } - if self.includedMetrics.Has(container.DiskIOMetrics) { + if h.includedMetrics.Has(container.DiskIOMetrics) { common.AssignDeviceNamesToDiskStats((*common.MachineInfoNamer)(mi), &stats.DiskIo) } return nil } -func (self *containerdContainerHandler) GetStats() (*info.ContainerStats, error) { - stats, err := self.libcontainerHandler.GetStats() +func (h *containerdContainerHandler) GetStats() (*info.ContainerStats, error) { + stats, err := h.libcontainerHandler.GetStats() if err != nil { return stats, err } @@ -197,50 +193,50 @@ func (self *containerdContainerHandler) GetStats() (*info.ContainerStats, error) // includes containers running in Kubernetes pods that use the network of the // infrastructure container. This stops metrics being reported multiple times // for each container in a pod. - if !self.needNet() { + if !h.needNet() { stats.Network = info.NetworkStats{} } // Get filesystem stats. - err = self.getFsStats(stats) + err = h.getFsStats(stats) return stats, err } -func (self *containerdContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) { +func (h *containerdContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) { return []info.ContainerReference{}, nil } -func (self *containerdContainerHandler) GetCgroupPath(resource string) (string, error) { - path, ok := self.cgroupPaths[resource] +func (h *containerdContainerHandler) GetCgroupPath(resource string) (string, error) { + path, ok := h.cgroupPaths[resource] if !ok { - return "", fmt.Errorf("could not find path for resource %q for container %q\n", resource, self.reference.Name) + return "", fmt.Errorf("could not find path for resource %q for container %q", resource, h.reference.Name) } return path, nil } -func (self *containerdContainerHandler) GetContainerLabels() map[string]string { - return self.labels +func (h *containerdContainerHandler) GetContainerLabels() map[string]string { + return h.labels } -func (self *containerdContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { - return self.libcontainerHandler.GetProcesses() +func (h *containerdContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { + return h.libcontainerHandler.GetProcesses() } -func (self *containerdContainerHandler) Exists() bool { - return common.CgroupExists(self.cgroupPaths) +func (h *containerdContainerHandler) Exists() bool { + return common.CgroupExists(h.cgroupPaths) } -func (self *containerdContainerHandler) Type() container.ContainerType { +func (h *containerdContainerHandler) Type() container.ContainerType { return container.ContainerTypeContainerd } -func (self *containerdContainerHandler) Start() { +func (h *containerdContainerHandler) Start() { } -func (self *containerdContainerHandler) Cleanup() { +func (h *containerdContainerHandler) Cleanup() { } -func (self *containerdContainerHandler) GetContainerIPAddress() string { +func (h *containerdContainerHandler) GetContainerIPAddress() string { // containerd doesnt take care of networking.So it doesnt maintain networking states return "" } diff --git a/vendor/github.com/google/cadvisor/container/containerd/install/install.go b/vendor/github.com/google/cadvisor/container/containerd/install/install.go index 8f70e71d5e4..b5b0a941405 100644 --- a/vendor/github.com/google/cadvisor/container/containerd/install/install.go +++ b/vendor/github.com/google/cadvisor/container/containerd/install/install.go @@ -18,7 +18,7 @@ package install import ( "github.com/google/cadvisor/container" "github.com/google/cadvisor/container/containerd" - "k8s.io/klog" + "k8s.io/klog/v2" ) func init() { diff --git a/vendor/github.com/google/cadvisor/container/crio/client.go b/vendor/github.com/google/cadvisor/container/crio/client.go index e9951362bd7..e0d63333c34 100644 --- a/vendor/github.com/google/cadvisor/container/crio/client.go +++ b/vendor/github.com/google/cadvisor/container/crio/client.go @@ -15,10 +15,12 @@ package crio import ( + "context" "encoding/json" "fmt" "net" "net/http" + "sync" "syscall" "time" ) @@ -28,6 +30,12 @@ const ( maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path) ) +var ( + theClient CrioClient + clientErr error + crioClientOnce sync.Once +) + // Info represents CRI-O information as sent by the CRI-O server type Info struct { StorageDriver string `json:"storage_driver"` @@ -45,9 +53,10 @@ type ContainerInfo struct { LogPath string `json:"log_path"` Root string `json:"root"` IP string `json:"ip_address"` + IPs []string `json:"ip_addresses"` } -type crioClient interface { +type CrioClient interface { Info() (Info, error) ContainerInfo(string) (*ContainerInfo, error) } @@ -62,22 +71,27 @@ func configureUnixTransport(tr *http.Transport, proto, addr string) error { } // No need for compression in local communications. tr.DisableCompression = true - tr.Dial = func(_, _ string) (net.Conn, error) { + tr.DialContext = func(_ context.Context, _, _ string) (net.Conn, error) { return net.DialTimeout(proto, addr, 32*time.Second) } return nil } // Client returns a new configured CRI-O client -func Client() (crioClient, error) { - tr := new(http.Transport) - configureUnixTransport(tr, "unix", CrioSocket) - c := &http.Client{ - Transport: tr, - } - return &crioClientImpl{ - client: c, - }, nil +func Client() (CrioClient, error) { + crioClientOnce.Do(func() { + tr := new(http.Transport) + theClient = nil + if clientErr = configureUnixTransport(tr, "unix", CrioSocket); clientErr != nil { + return + } + theClient = &crioClientImpl{ + client: &http.Client{ + Transport: tr, + }, + } + }) + return theClient, clientErr } func getRequest(path string) (*http.Request, error) { @@ -117,6 +131,7 @@ func (c *crioClientImpl) ContainerInfo(id string) (*ContainerInfo, error) { if err != nil { return nil, err } + cInfo := ContainerInfo{} resp, err := c.client.Do(req) if err != nil { return nil, err @@ -129,9 +144,14 @@ func (c *crioClientImpl) ContainerInfo(id string) (*ContainerInfo, error) { return nil, fmt.Errorf("Error finding container %s: Status %d returned error %s", id, resp.StatusCode, resp.Body) } - cInfo := ContainerInfo{} if err := json.NewDecoder(resp.Body).Decode(&cInfo); err != nil { return nil, err } + if len(cInfo.IP) > 0 { + return &cInfo, nil + } + if len(cInfo.IPs) > 0 { + cInfo.IP = cInfo.IPs[0] + } return &cInfo, nil } diff --git a/vendor/github.com/google/cadvisor/container/crio/factory.go b/vendor/github.com/google/cadvisor/container/crio/factory.go index b530ee4a6b6..32f607680f6 100644 --- a/vendor/github.com/google/cadvisor/container/crio/factory.go +++ b/vendor/github.com/google/cadvisor/container/crio/factory.go @@ -26,7 +26,7 @@ import ( info "github.com/google/cadvisor/info/v1" "github.com/google/cadvisor/watcher" - "k8s.io/klog" + "k8s.io/klog/v2" ) // The namespace under which crio aliases are unique. @@ -57,14 +57,14 @@ type crioFactory struct { includedMetrics container.MetricSet - client crioClient + client CrioClient } -func (self *crioFactory) String() string { +func (f *crioFactory) String() string { return CrioNamespace } -func (self *crioFactory) NewContainerHandler(name string, inHostNamespace bool) (handler container.ContainerHandler, err error) { +func (f *crioFactory) NewContainerHandler(name string, inHostNamespace bool) (handler container.ContainerHandler, err error) { client, err := Client() if err != nil { return @@ -74,14 +74,14 @@ func (self *crioFactory) NewContainerHandler(name string, inHostNamespace bool) handler, err = newCrioContainerHandler( client, name, - self.machineInfoFactory, - self.fsInfo, - self.storageDriver, - self.storageDir, - &self.cgroupSubsystems, + f.machineInfoFactory, + f.fsInfo, + f.storageDriver, + f.storageDir, + &f.cgroupSubsystems, inHostNamespace, metadataEnvs, - self.includedMetrics, + f.includedMetrics, ) return } @@ -108,7 +108,7 @@ func isContainerName(name string) bool { } // crio handles all containers under /crio -func (self *crioFactory) CanHandleAndAccept(name string) (bool, bool, error) { +func (f *crioFactory) CanHandleAndAccept(name string) (bool, bool, error) { if strings.HasPrefix(path.Base(name), "crio-conmon") { // TODO(runcom): should we include crio-conmon cgroups? return false, false, nil @@ -123,18 +123,10 @@ func (self *crioFactory) CanHandleAndAccept(name string) (bool, bool, error) { return true, true, nil } -func (self *crioFactory) DebugInfo() map[string][]string { +func (f *crioFactory) DebugInfo() map[string][]string { return map[string][]string{} } -var ( - // TODO(runcom): handle versioning in CRI-O - version_regexp_string = `(\d+)\.(\d+)\.(\d+)` - version_re = regexp.MustCompile(version_regexp_string) - apiversion_regexp_string = `(\d+)\.(\d+)` - apiversion_re = regexp.MustCompile(apiversion_regexp_string) -) - // Register root container before running this function! func Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, includedMetrics container.MetricSet) error { client, err := Client() diff --git a/vendor/github.com/google/cadvisor/container/crio/handler.go b/vendor/github.com/google/cadvisor/container/crio/handler.go index d9eab06ee76..b1ef5b045de 100644 --- a/vendor/github.com/google/cadvisor/container/crio/handler.go +++ b/vendor/github.com/google/cadvisor/container/crio/handler.go @@ -17,7 +17,6 @@ package crio import ( "fmt" - "path" "path/filepath" "strconv" "strings" @@ -27,13 +26,11 @@ import ( containerlibcontainer "github.com/google/cadvisor/container/libcontainer" "github.com/google/cadvisor/fs" info "github.com/google/cadvisor/info/v1" - - cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" - libcontainerconfigs "github.com/opencontainers/runc/libcontainer/configs" + "github.com/opencontainers/runc/libcontainer/cgroups" ) type crioContainerHandler struct { - client crioClient + client CrioClient name string machineInfoFactory info.MachineInfoFactory @@ -71,7 +68,7 @@ type crioContainerHandler struct { reference info.ContainerReference libcontainerHandler *containerlibcontainer.Handler - cgroupManager *cgroupfs.Manager + cgroupManager cgroups.Manager rootFs string pidKnown bool } @@ -80,7 +77,7 @@ var _ container.ContainerHandler = &crioContainerHandler{} // newCrioContainerHandler returns a new container.ContainerHandler func newCrioContainerHandler( - client crioClient, + client CrioClient, name string, machineInfoFactory info.MachineInfoFactory, fsInfo fs.FsInfo, @@ -95,17 +92,14 @@ func newCrioContainerHandler( cgroupPaths := common.MakeCgroupPaths(cgroupSubsystems.MountPoints, name) // Generate the equivalent cgroup manager for this container. - cgroupManager := &cgroupfs.Manager{ - Cgroups: &libcontainerconfigs.Cgroup{ - Name: name, - }, - Paths: cgroupPaths, + cgroupManager, err := containerlibcontainer.NewCgroupManager(name, cgroupPaths) + if err != nil { + return nil, err } rootFs := "/" if !inHostNamespace { rootFs = "/rootfs" - storageDir = path.Join(rootFs, storageDir) } id := ContainerNameToCrioId(name) @@ -199,59 +193,59 @@ func newCrioContainerHandler( return handler, nil } -func (self *crioContainerHandler) Start() { - if self.fsHandler != nil { - self.fsHandler.Start() +func (h *crioContainerHandler) Start() { + if h.fsHandler != nil { + h.fsHandler.Start() } } -func (self *crioContainerHandler) Cleanup() { - if self.fsHandler != nil { - self.fsHandler.Stop() +func (h *crioContainerHandler) Cleanup() { + if h.fsHandler != nil { + h.fsHandler.Stop() } } -func (self *crioContainerHandler) ContainerReference() (info.ContainerReference, error) { - return self.reference, nil +func (h *crioContainerHandler) ContainerReference() (info.ContainerReference, error) { + return h.reference, nil } -func (self *crioContainerHandler) needNet() bool { - if self.includedMetrics.Has(container.NetworkUsageMetrics) { - return self.labels["io.kubernetes.container.name"] == "POD" +func (h *crioContainerHandler) needNet() bool { + if h.includedMetrics.Has(container.NetworkUsageMetrics) { + return h.labels["io.kubernetes.container.name"] == "POD" } return false } -func (self *crioContainerHandler) GetSpec() (info.ContainerSpec, error) { - hasFilesystem := self.includedMetrics.Has(container.DiskUsageMetrics) - spec, err := common.GetSpec(self.cgroupPaths, self.machineInfoFactory, self.needNet(), hasFilesystem) +func (h *crioContainerHandler) GetSpec() (info.ContainerSpec, error) { + hasFilesystem := h.includedMetrics.Has(container.DiskUsageMetrics) + spec, err := common.GetSpec(h.cgroupPaths, h.machineInfoFactory, h.needNet(), hasFilesystem) - spec.Labels = self.labels - spec.Envs = self.envs - spec.Image = self.image + spec.Labels = h.labels + spec.Envs = h.envs + spec.Image = h.image return spec, err } -func (self *crioContainerHandler) getFsStats(stats *info.ContainerStats) error { - mi, err := self.machineInfoFactory.GetMachineInfo() +func (h *crioContainerHandler) getFsStats(stats *info.ContainerStats) error { + mi, err := h.machineInfoFactory.GetMachineInfo() if err != nil { return err } - if self.includedMetrics.Has(container.DiskIOMetrics) { + if h.includedMetrics.Has(container.DiskIOMetrics) { common.AssignDeviceNamesToDiskStats((*common.MachineInfoNamer)(mi), &stats.DiskIo) } - if !self.includedMetrics.Has(container.DiskUsageMetrics) { + if !h.includedMetrics.Has(container.DiskUsageMetrics) { return nil } var device string - switch self.storageDriver { + switch h.storageDriver { case overlay2StorageDriver, overlayStorageDriver: - deviceInfo, err := self.fsInfo.GetDirFsDevice(self.rootfsStorageDir) + deviceInfo, err := h.fsInfo.GetDirFsDevice(h.rootfsStorageDir) if err != nil { - return fmt.Errorf("unable to determine device info for dir: %v: %v", self.rootfsStorageDir, err) + return fmt.Errorf("unable to determine device info for dir: %v: %v", h.rootfsStorageDir, err) } device = deviceInfo.Device default: @@ -272,8 +266,11 @@ func (self *crioContainerHandler) getFsStats(stats *info.ContainerStats) error { } } + if fsType == "" { + return fmt.Errorf("unable to determine fs type for device: %v", device) + } fsStat := info.FsStats{Device: device, Type: fsType, Limit: limit} - usage := self.fsHandler.Usage() + usage := h.fsHandler.Usage() fsStat.BaseUsage = usage.BaseUsageBytes fsStat.Usage = usage.TotalUsageBytes fsStat.Inodes = usage.InodeUsage @@ -283,26 +280,26 @@ func (self *crioContainerHandler) getFsStats(stats *info.ContainerStats) error { return nil } -func (self *crioContainerHandler) getLibcontainerHandler() *containerlibcontainer.Handler { - if self.pidKnown { - return self.libcontainerHandler +func (h *crioContainerHandler) getLibcontainerHandler() *containerlibcontainer.Handler { + if h.pidKnown { + return h.libcontainerHandler } - id := ContainerNameToCrioId(self.name) + id := ContainerNameToCrioId(h.name) - cInfo, err := self.client.ContainerInfo(id) + cInfo, err := h.client.ContainerInfo(id) if err != nil || cInfo.Pid == 0 { - return self.libcontainerHandler + return h.libcontainerHandler } - self.pidKnown = true - self.libcontainerHandler = containerlibcontainer.NewHandler(self.cgroupManager, self.rootFs, cInfo.Pid, self.includedMetrics) + h.pidKnown = true + h.libcontainerHandler = containerlibcontainer.NewHandler(h.cgroupManager, h.rootFs, cInfo.Pid, h.includedMetrics) - return self.libcontainerHandler + return h.libcontainerHandler } -func (self *crioContainerHandler) GetStats() (*info.ContainerStats, error) { - libcontainerHandler := self.getLibcontainerHandler() +func (h *crioContainerHandler) GetStats() (*info.ContainerStats, error) { + libcontainerHandler := h.getLibcontainerHandler() stats, err := libcontainerHandler.GetStats() if err != nil { return stats, err @@ -311,12 +308,12 @@ func (self *crioContainerHandler) GetStats() (*info.ContainerStats, error) { // includes containers running in Kubernetes pods that use the network of the // infrastructure container. This stops metrics being reported multiple times // for each container in a pod. - if !self.needNet() { + if !h.needNet() { stats.Network = info.NetworkStats{} } // Get filesystem stats. - err = self.getFsStats(stats) + err = h.getFsStats(stats) if err != nil { return stats, err } @@ -324,35 +321,35 @@ func (self *crioContainerHandler) GetStats() (*info.ContainerStats, error) { return stats, nil } -func (self *crioContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) { +func (h *crioContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) { // No-op for Docker driver. return []info.ContainerReference{}, nil } -func (self *crioContainerHandler) GetCgroupPath(resource string) (string, error) { - path, ok := self.cgroupPaths[resource] +func (h *crioContainerHandler) GetCgroupPath(resource string) (string, error) { + path, ok := h.cgroupPaths[resource] if !ok { - return "", fmt.Errorf("could not find path for resource %q for container %q\n", resource, self.reference.Name) + return "", fmt.Errorf("could not find path for resource %q for container %q", resource, h.reference.Name) } return path, nil } -func (self *crioContainerHandler) GetContainerLabels() map[string]string { - return self.labels +func (h *crioContainerHandler) GetContainerLabels() map[string]string { + return h.labels } -func (self *crioContainerHandler) GetContainerIPAddress() string { - return self.ipAddress +func (h *crioContainerHandler) GetContainerIPAddress() string { + return h.ipAddress } -func (self *crioContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { - return self.libcontainerHandler.GetProcesses() +func (h *crioContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { + return h.libcontainerHandler.GetProcesses() } -func (self *crioContainerHandler) Exists() bool { - return common.CgroupExists(self.cgroupPaths) +func (h *crioContainerHandler) Exists() bool { + return common.CgroupExists(h.cgroupPaths) } -func (self *crioContainerHandler) Type() container.ContainerType { +func (h *crioContainerHandler) Type() container.ContainerType { return container.ContainerTypeCrio } diff --git a/vendor/github.com/google/cadvisor/container/crio/install/install.go b/vendor/github.com/google/cadvisor/container/crio/install/install.go index 3b7c414bfa8..dac0e423248 100644 --- a/vendor/github.com/google/cadvisor/container/crio/install/install.go +++ b/vendor/github.com/google/cadvisor/container/crio/install/install.go @@ -18,7 +18,7 @@ package install import ( "github.com/google/cadvisor/container" "github.com/google/cadvisor/container/crio" - "k8s.io/klog" + "k8s.io/klog/v2" ) func init() { diff --git a/vendor/github.com/google/cadvisor/container/crio/plugin.go b/vendor/github.com/google/cadvisor/container/crio/plugin.go index 6b21a198537..84e55075877 100644 --- a/vendor/github.com/google/cadvisor/container/crio/plugin.go +++ b/vendor/github.com/google/cadvisor/container/crio/plugin.go @@ -19,7 +19,7 @@ import ( "github.com/google/cadvisor/fs" info "github.com/google/cadvisor/info/v1" "github.com/google/cadvisor/watcher" - "k8s.io/klog" + "k8s.io/klog/v2" ) // NewPlugin returns an implementation of container.Plugin suitable for passing to container.RegisterPlugin() diff --git a/vendor/github.com/google/cadvisor/container/docker/docker.go b/vendor/github.com/google/cadvisor/container/docker/docker.go index f1cda2be8f5..0f49c9d3330 100644 --- a/vendor/github.com/google/cadvisor/container/docker/docker.go +++ b/vendor/github.com/google/cadvisor/container/docker/docker.go @@ -134,7 +134,7 @@ func ValidateInfo() (*dockertypes.Info, error) { } dockerInfo.ServerVersion = version.Version } - version, err := parseVersion(dockerInfo.ServerVersion, version_re, 3) + version, err := parseVersion(dockerInfo.ServerVersion, versionRe, 3) if err != nil { return nil, err } @@ -150,59 +150,51 @@ func ValidateInfo() (*dockertypes.Info, error) { return &dockerInfo, nil } -func Version() ([]int, error) { - ver, err := VersionString() - if err != nil { - return nil, err - } - return parseVersion(ver, version_re, 3) -} - func APIVersion() ([]int, error) { ver, err := APIVersionString() if err != nil { return nil, err } - return parseVersion(ver, apiversion_re, 2) + return parseVersion(ver, apiVersionRe, 2) } func VersionString() (string, error) { - docker_version := "Unknown" + dockerVersion := "Unknown" client, err := Client() if err == nil { version, err := client.ServerVersion(defaultContext()) if err == nil { - docker_version = version.Version + dockerVersion = version.Version } } - return docker_version, err + return dockerVersion, err } func APIVersionString() (string, error) { - docker_api_version := "Unknown" + apiVersion := "Unknown" client, err := Client() if err == nil { version, err := client.ServerVersion(defaultContext()) if err == nil { - docker_api_version = version.APIVersion + apiVersion = version.APIVersion } } - return docker_api_version, err + return apiVersion, err } -func parseVersion(version_string string, regex *regexp.Regexp, length int) ([]int, error) { - matches := regex.FindAllStringSubmatch(version_string, -1) +func parseVersion(versionString string, regex *regexp.Regexp, length int) ([]int, error) { + matches := regex.FindAllStringSubmatch(versionString, -1) if len(matches) != 1 { - return nil, fmt.Errorf("version string \"%v\" doesn't match expected regular expression: \"%v\"", version_string, regex.String()) + return nil, fmt.Errorf("version string \"%v\" doesn't match expected regular expression: \"%v\"", versionString, regex.String()) } - version_string_array := matches[0][1:] - version_array := make([]int, length) - for index, version_str := range version_string_array { - version, err := strconv.Atoi(version_str) + versionStringArray := matches[0][1:] + versionArray := make([]int, length) + for index, versionStr := range versionStringArray { + version, err := strconv.Atoi(versionStr) if err != nil { - return nil, fmt.Errorf("error while parsing \"%v\" in \"%v\"", version_str, version_string) + return nil, fmt.Errorf("error while parsing \"%v\" in \"%v\"", versionStr, versionString) } - version_array[index] = version + versionArray[index] = version } - return version_array, nil + return versionArray, nil } diff --git a/vendor/github.com/google/cadvisor/container/docker/factory.go b/vendor/github.com/google/cadvisor/container/docker/factory.go index bc51512a4c5..f0118166e2d 100644 --- a/vendor/github.com/google/cadvisor/container/docker/factory.go +++ b/vendor/github.com/google/cadvisor/container/docker/factory.go @@ -22,22 +22,23 @@ import ( "strconv" "strings" "sync" + "time" "github.com/blang/semver" dockertypes "github.com/docker/docker/api/types" "github.com/google/cadvisor/container" + dockerutil "github.com/google/cadvisor/container/docker/utils" "github.com/google/cadvisor/container/libcontainer" "github.com/google/cadvisor/devicemapper" "github.com/google/cadvisor/fs" info "github.com/google/cadvisor/info/v1" "github.com/google/cadvisor/machine" - dockerutil "github.com/google/cadvisor/utils/docker" "github.com/google/cadvisor/watcher" "github.com/google/cadvisor/zfs" docker "github.com/docker/docker/client" "golang.org/x/net/context" - "k8s.io/klog" + "k8s.io/klog/v2" ) var ArgDockerEndpoint = flag.String("docker", "unix:///var/run/docker.sock", "docker endpoint") @@ -49,11 +50,17 @@ var ArgDockerCA = flag.String("docker-tls-ca", "ca.pem", "path to trusted CA") // The namespace under which Docker aliases are unique. const DockerNamespace = "docker" +// The retry times for getting docker root dir +const rootDirRetries = 5 + +//The retry period for getting docker root dir, Millisecond +const rootDirRetryPeriod time.Duration = 1000 * time.Millisecond + // Regexp that identifies docker cgroups, containers started with // --cgroup-parent have another prefix than 'docker' var dockerCgroupRegexp = regexp.MustCompile(`([a-z0-9]{64})`) -var dockerEnvWhitelist = flag.String("docker_env_metadata_whitelist", "", "a comma-separated list of environment variable keys that needs to be collected for docker containers") +var dockerEnvWhitelist = flag.String("docker_env_metadata_whitelist", "", "a comma-separated list of environment variable keys matched with specified prefix that needs to be collected for docker containers") var ( // Basepath to all container specific information that libcontainer stores. @@ -72,10 +79,16 @@ var ( func RootDir() string { dockerRootDirOnce.Do(func() { - status, err := Status() - if err == nil && status.RootDir != "" { - dockerRootDir = status.RootDir - } else { + for i := 0; i < rootDirRetries; i++ { + status, err := Status() + if err == nil && status.RootDir != "" { + dockerRootDir = status.RootDir + break + } else { + time.Sleep(rootDirRetryPeriod) + } + } + if dockerRootDir == "" { dockerRootDir = *dockerRootDirFlag } }) @@ -90,6 +103,7 @@ const ( overlayStorageDriver storageDriver = "overlay" overlay2StorageDriver storageDriver = "overlay2" zfsStorageDriver storageDriver = "zfs" + vfsStorageDriver storageDriver = "vfs" ) type dockerFactory struct { @@ -118,11 +132,11 @@ type dockerFactory struct { zfsWatcher *zfs.ZfsWatcher } -func (self *dockerFactory) String() string { +func (f *dockerFactory) String() string { return DockerNamespace } -func (self *dockerFactory) NewContainerHandler(name string, inHostNamespace bool) (handler container.ContainerHandler, err error) { +func (f *dockerFactory) NewContainerHandler(name string, inHostNamespace bool) (handler container.ContainerHandler, err error) { client, err := Client() if err != nil { return @@ -133,18 +147,18 @@ func (self *dockerFactory) NewContainerHandler(name string, inHostNamespace bool handler, err = newDockerContainerHandler( client, name, - self.machineInfoFactory, - self.fsInfo, - self.storageDriver, - self.storageDir, - &self.cgroupSubsystems, + f.machineInfoFactory, + f.fsInfo, + f.storageDriver, + f.storageDir, + &f.cgroupSubsystems, inHostNamespace, metadataEnvs, - self.dockerVersion, - self.includedMetrics, - self.thinPoolName, - self.thinPoolWatcher, - self.zfsWatcher, + f.dockerVersion, + f.includedMetrics, + f.thinPoolName, + f.thinPoolWatcher, + f.zfsWatcher, ) return } @@ -171,7 +185,7 @@ func isContainerName(name string) bool { } // Docker handles all containers under /docker -func (self *dockerFactory) CanHandleAndAccept(name string) (bool, bool, error) { +func (f *dockerFactory) CanHandleAndAccept(name string) (bool, bool, error) { // if the container is not associated with docker, we can't handle it or accept it. if !isContainerName(name) { return false, false, nil @@ -181,7 +195,7 @@ func (self *dockerFactory) CanHandleAndAccept(name string) (bool, bool, error) { id := ContainerNameToDockerId(name) // We assume that if Inspect fails then the container is not known to docker. - ctnr, err := self.client.ContainerInspect(context.Background(), id) + ctnr, err := f.client.ContainerInspect(context.Background(), id) if err != nil || !ctnr.State.Running { return false, true, fmt.Errorf("error inspecting container: %v", err) } @@ -189,15 +203,15 @@ func (self *dockerFactory) CanHandleAndAccept(name string) (bool, bool, error) { return true, true, nil } -func (self *dockerFactory) DebugInfo() map[string][]string { +func (f *dockerFactory) DebugInfo() map[string][]string { return map[string][]string{} } var ( - version_regexp_string = `(\d+)\.(\d+)\.(\d+)` - version_re = regexp.MustCompile(version_regexp_string) - apiversion_regexp_string = `(\d+)\.(\d+)` - apiversion_re = regexp.MustCompile(apiversion_regexp_string) + versionRegexpString = `(\d+)\.(\d+)\.(\d+)` + versionRe = regexp.MustCompile(versionRegexpString) + apiVersionRegexpString = `(\d+)\.(\d+)` + apiVersionRe = regexp.MustCompile(apiVersionRegexpString) ) func startThinPoolWatcher(dockerInfo *dockertypes.Info) (*devicemapper.ThinPoolWatcher, error) { @@ -255,7 +269,7 @@ func ensureThinLsKernelVersion(kernelVersion string) error { // thin_ls to work without corrupting the thin pool minRhel7KernelVersion := semver.MustParse("3.10.0") - matches := version_re.FindStringSubmatch(kernelVersion) + matches := versionRe.FindStringSubmatch(kernelVersion) if len(matches) < 4 { return fmt.Errorf("error parsing kernel version: %q is not a semver", kernelVersion) } @@ -321,7 +335,7 @@ func Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, includedMetrics } // Version already validated above, assume no error here. - dockerVersion, _ := parseVersion(dockerInfo.ServerVersion, version_re, 3) + dockerVersion, _ := parseVersion(dockerInfo.ServerVersion, versionRe, 3) dockerAPIVersion, _ := APIVersion() diff --git a/vendor/github.com/google/cadvisor/container/docker/handler.go b/vendor/github.com/google/cadvisor/container/docker/handler.go index ae8f48efa7c..e2c904ca886 100644 --- a/vendor/github.com/google/cadvisor/container/docker/handler.go +++ b/vendor/github.com/google/cadvisor/container/docker/handler.go @@ -25,19 +25,17 @@ import ( "github.com/google/cadvisor/container" "github.com/google/cadvisor/container/common" + dockerutil "github.com/google/cadvisor/container/docker/utils" containerlibcontainer "github.com/google/cadvisor/container/libcontainer" "github.com/google/cadvisor/devicemapper" "github.com/google/cadvisor/fs" info "github.com/google/cadvisor/info/v1" - dockerutil "github.com/google/cadvisor/utils/docker" "github.com/google/cadvisor/zfs" dockercontainer "github.com/docker/docker/api/types/container" docker "github.com/docker/docker/client" - cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" - libcontainerconfigs "github.com/opencontainers/runc/libcontainer/configs" "golang.org/x/net/context" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -51,7 +49,6 @@ const ( ) type dockerContainerHandler struct { - // machineInfoFactory provides info.MachineInfo machineInfoFactory info.MachineInfoFactory @@ -137,11 +134,9 @@ func newDockerContainerHandler( cgroupPaths := common.MakeCgroupPaths(cgroupSubsystems.MountPoints, name) // Generate the equivalent cgroup manager for this container. - cgroupManager := &cgroupfs.Manager{ - Cgroups: &libcontainerconfigs.Cgroup{ - Name: name, - }, - Paths: cgroupPaths, + cgroupManager, err := containerlibcontainer.NewCgroupManager(name, cgroupPaths) + if err != nil { + return nil, err } rootFs := "/" @@ -175,6 +170,8 @@ func newDockerContainerHandler( rootfsStorageDir = path.Join(storageDir, string(storageDriver), rwLayerID, overlayRWLayer) case overlay2StorageDriver: rootfsStorageDir = path.Join(storageDir, string(storageDriver), rwLayerID, overlay2RWLayer) + case vfsStorageDriver: + rootfsStorageDir = path.Join(storageDir) case zfsStorageDriver: status, err := Status() if err != nil { @@ -231,8 +228,8 @@ func newDockerContainerHandler( ipAddress := ctnr.NetworkSettings.IPAddress networkMode := string(ctnr.HostConfig.NetworkMode) if ipAddress == "" && strings.HasPrefix(networkMode, "container:") { - containerId := strings.TrimPrefix(networkMode, "container:") - c, err := client.ContainerInspect(context.Background(), containerId) + containerID := strings.TrimPrefix(networkMode, "container:") + c, err := client.ContainerInspect(context.Background(), containerID) if err != nil { return nil, fmt.Errorf("failed to inspect container %q: %v", id, err) } @@ -253,11 +250,16 @@ func newDockerContainerHandler( // split env vars to get metadata map. for _, exposedEnv := range metadataEnvs { + if exposedEnv == "" { + // if no dockerEnvWhitelist provided, len(metadataEnvs) == 1, metadataEnvs[0] == "" + continue + } + for _, envVar := range ctnr.Config.Env { if envVar != "" { splits := strings.SplitN(envVar, "=", 2) - if len(splits) == 2 && splits[0] == exposedEnv { - handler.envs[strings.ToLower(exposedEnv)] = splits[1] + if len(splits) == 2 && strings.HasPrefix(splits[0], exposedEnv) { + handler.envs[strings.ToLower(splits[0])] = splits[1] } } } @@ -325,68 +327,68 @@ func (h *dockerFsHandler) Usage() common.FsUsage { return usage } -func (self *dockerContainerHandler) Start() { - if self.fsHandler != nil { - self.fsHandler.Start() +func (h *dockerContainerHandler) Start() { + if h.fsHandler != nil { + h.fsHandler.Start() } } -func (self *dockerContainerHandler) Cleanup() { - if self.fsHandler != nil { - self.fsHandler.Stop() +func (h *dockerContainerHandler) Cleanup() { + if h.fsHandler != nil { + h.fsHandler.Stop() } } -func (self *dockerContainerHandler) ContainerReference() (info.ContainerReference, error) { - return self.reference, nil +func (h *dockerContainerHandler) ContainerReference() (info.ContainerReference, error) { + return h.reference, nil } -func (self *dockerContainerHandler) needNet() bool { - if self.includedMetrics.Has(container.NetworkUsageMetrics) { - return !self.networkMode.IsContainer() +func (h *dockerContainerHandler) needNet() bool { + if h.includedMetrics.Has(container.NetworkUsageMetrics) { + return !h.networkMode.IsContainer() } return false } -func (self *dockerContainerHandler) GetSpec() (info.ContainerSpec, error) { - hasFilesystem := self.includedMetrics.Has(container.DiskUsageMetrics) - spec, err := common.GetSpec(self.cgroupPaths, self.machineInfoFactory, self.needNet(), hasFilesystem) +func (h *dockerContainerHandler) GetSpec() (info.ContainerSpec, error) { + hasFilesystem := h.includedMetrics.Has(container.DiskUsageMetrics) + spec, err := common.GetSpec(h.cgroupPaths, h.machineInfoFactory, h.needNet(), hasFilesystem) - spec.Labels = self.labels - spec.Envs = self.envs - spec.Image = self.image - spec.CreationTime = self.creationTime + spec.Labels = h.labels + spec.Envs = h.envs + spec.Image = h.image + spec.CreationTime = h.creationTime return spec, err } -func (self *dockerContainerHandler) getFsStats(stats *info.ContainerStats) error { - mi, err := self.machineInfoFactory.GetMachineInfo() +func (h *dockerContainerHandler) getFsStats(stats *info.ContainerStats) error { + mi, err := h.machineInfoFactory.GetMachineInfo() if err != nil { return err } - if self.includedMetrics.Has(container.DiskIOMetrics) { + if h.includedMetrics.Has(container.DiskIOMetrics) { common.AssignDeviceNamesToDiskStats((*common.MachineInfoNamer)(mi), &stats.DiskIo) } - if !self.includedMetrics.Has(container.DiskUsageMetrics) { + if !h.includedMetrics.Has(container.DiskUsageMetrics) { return nil } var device string - switch self.storageDriver { + switch h.storageDriver { case devicemapperStorageDriver: // Device has to be the pool name to correlate with the device name as // set in the machine info filesystems. - device = self.poolName - case aufsStorageDriver, overlayStorageDriver, overlay2StorageDriver: - deviceInfo, err := self.fsInfo.GetDirFsDevice(self.rootfsStorageDir) + device = h.poolName + case aufsStorageDriver, overlayStorageDriver, overlay2StorageDriver, vfsStorageDriver: + deviceInfo, err := h.fsInfo.GetDirFsDevice(h.rootfsStorageDir) if err != nil { - return fmt.Errorf("unable to determine device info for dir: %v: %v", self.rootfsStorageDir, err) + return fmt.Errorf("unable to determine device info for dir: %v: %v", h.rootfsStorageDir, err) } device = deviceInfo.Device case zfsStorageDriver: - device = self.zfsParent + device = h.zfsParent default: return nil } @@ -406,7 +408,7 @@ func (self *dockerContainerHandler) getFsStats(stats *info.ContainerStats) error } fsStat := info.FsStats{Device: device, Type: fsType, Limit: limit} - usage := self.fsHandler.Usage() + usage := h.fsHandler.Usage() fsStat.BaseUsage = usage.BaseUsageBytes fsStat.Usage = usage.TotalUsageBytes fsStat.Inodes = usage.InodeUsage @@ -417,8 +419,8 @@ func (self *dockerContainerHandler) getFsStats(stats *info.ContainerStats) error } // TODO(vmarmol): Get from libcontainer API instead of cgroup manager when we don't have to support older Dockers. -func (self *dockerContainerHandler) GetStats() (*info.ContainerStats, error) { - stats, err := self.libcontainerHandler.GetStats() +func (h *dockerContainerHandler) GetStats() (*info.ContainerStats, error) { + stats, err := h.libcontainerHandler.GetStats() if err != nil { return stats, err } @@ -426,12 +428,12 @@ func (self *dockerContainerHandler) GetStats() (*info.ContainerStats, error) { // includes containers running in Kubernetes pods that use the network of the // infrastructure container. This stops metrics being reported multiple times // for each container in a pod. - if !self.needNet() { + if !h.needNet() { stats.Network = info.NetworkStats{} } // Get filesystem stats. - err = self.getFsStats(stats) + err = h.getFsStats(stats) if err != nil { return stats, err } @@ -439,35 +441,35 @@ func (self *dockerContainerHandler) GetStats() (*info.ContainerStats, error) { return stats, nil } -func (self *dockerContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) { +func (h *dockerContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) { // No-op for Docker driver. return []info.ContainerReference{}, nil } -func (self *dockerContainerHandler) GetCgroupPath(resource string) (string, error) { - path, ok := self.cgroupPaths[resource] +func (h *dockerContainerHandler) GetCgroupPath(resource string) (string, error) { + path, ok := h.cgroupPaths[resource] if !ok { - return "", fmt.Errorf("could not find path for resource %q for container %q\n", resource, self.reference.Name) + return "", fmt.Errorf("could not find path for resource %q for container %q", resource, h.reference.Name) } return path, nil } -func (self *dockerContainerHandler) GetContainerLabels() map[string]string { - return self.labels +func (h *dockerContainerHandler) GetContainerLabels() map[string]string { + return h.labels } -func (self *dockerContainerHandler) GetContainerIPAddress() string { - return self.ipAddress +func (h *dockerContainerHandler) GetContainerIPAddress() string { + return h.ipAddress } -func (self *dockerContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { - return self.libcontainerHandler.GetProcesses() +func (h *dockerContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { + return h.libcontainerHandler.GetProcesses() } -func (self *dockerContainerHandler) Exists() bool { - return common.CgroupExists(self.cgroupPaths) +func (h *dockerContainerHandler) Exists() bool { + return common.CgroupExists(h.cgroupPaths) } -func (self *dockerContainerHandler) Type() container.ContainerType { +func (h *dockerContainerHandler) Type() container.ContainerType { return container.ContainerTypeDocker } diff --git a/vendor/github.com/google/cadvisor/container/docker/install/install.go b/vendor/github.com/google/cadvisor/container/docker/install/install.go index 332e646e768..58de720923e 100644 --- a/vendor/github.com/google/cadvisor/container/docker/install/install.go +++ b/vendor/github.com/google/cadvisor/container/docker/install/install.go @@ -18,7 +18,7 @@ package install import ( "github.com/google/cadvisor/container" "github.com/google/cadvisor/container/docker" - "k8s.io/klog" + "k8s.io/klog/v2" ) func init() { diff --git a/vendor/github.com/google/cadvisor/container/docker/plugin.go b/vendor/github.com/google/cadvisor/container/docker/plugin.go index c4ca43a43ef..2f5f0986e63 100644 --- a/vendor/github.com/google/cadvisor/container/docker/plugin.go +++ b/vendor/github.com/google/cadvisor/container/docker/plugin.go @@ -22,7 +22,7 @@ import ( info "github.com/google/cadvisor/info/v1" "github.com/google/cadvisor/watcher" "golang.org/x/net/context" - "k8s.io/klog" + "k8s.io/klog/v2" ) const dockerClientTimeout = 10 * time.Second diff --git a/vendor/github.com/google/cadvisor/utils/docker/docker.go b/vendor/github.com/google/cadvisor/container/docker/utils/docker.go similarity index 93% rename from vendor/github.com/google/cadvisor/utils/docker/docker.go rename to vendor/github.com/google/cadvisor/container/docker/utils/docker.go index e19097d6c7a..658607f7368 100644 --- a/vendor/github.com/google/cadvisor/utils/docker/docker.go +++ b/vendor/github.com/google/cadvisor/container/docker/utils/docker.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package docker +package utils import ( "fmt" @@ -23,10 +23,7 @@ import ( ) const ( - DockerInfoDriver = "Driver" - DockerInfoDriverStatus = "DriverStatus" DriverStatusPoolName = "Pool Name" - DriverStatusDataLoopFile = "Data loop file" DriverStatusMetadataFile = "Metadata file" DriverStatusParentDataset = "Parent Dataset" ) diff --git a/vendor/github.com/google/cadvisor/container/factory.go b/vendor/github.com/google/cadvisor/container/factory.go index e3d0ff3cf89..a972853d095 100644 --- a/vendor/github.com/google/cadvisor/container/factory.go +++ b/vendor/github.com/google/cadvisor/container/factory.go @@ -22,7 +22,7 @@ import ( info "github.com/google/cadvisor/info/v1" "github.com/google/cadvisor/watcher" - "k8s.io/klog" + "k8s.io/klog/v2" ) type ContainerHandlerFactory interface { @@ -43,21 +43,50 @@ type ContainerHandlerFactory interface { type MetricKind string const ( - CpuUsageMetrics MetricKind = "cpu" - ProcessSchedulerMetrics MetricKind = "sched" - PerCpuUsageMetrics MetricKind = "percpu" - MemoryUsageMetrics MetricKind = "memory" - CpuLoadMetrics MetricKind = "cpuLoad" - DiskIOMetrics MetricKind = "diskIO" - DiskUsageMetrics MetricKind = "disk" - NetworkUsageMetrics MetricKind = "network" - NetworkTcpUsageMetrics MetricKind = "tcp" - NetworkUdpUsageMetrics MetricKind = "udp" - AcceleratorUsageMetrics MetricKind = "accelerator" - AppMetrics MetricKind = "app" - ProcessMetrics MetricKind = "process" + CpuUsageMetrics MetricKind = "cpu" + ProcessSchedulerMetrics MetricKind = "sched" + PerCpuUsageMetrics MetricKind = "percpu" + MemoryUsageMetrics MetricKind = "memory" + CpuLoadMetrics MetricKind = "cpuLoad" + DiskIOMetrics MetricKind = "diskIO" + DiskUsageMetrics MetricKind = "disk" + NetworkUsageMetrics MetricKind = "network" + NetworkTcpUsageMetrics MetricKind = "tcp" + NetworkAdvancedTcpUsageMetrics MetricKind = "advtcp" + NetworkUdpUsageMetrics MetricKind = "udp" + AcceleratorUsageMetrics MetricKind = "accelerator" + AppMetrics MetricKind = "app" + ProcessMetrics MetricKind = "process" + HugetlbUsageMetrics MetricKind = "hugetlb" + PerfMetrics MetricKind = "perf_event" + ReferencedMemoryMetrics MetricKind = "referenced_memory" + CPUTopologyMetrics MetricKind = "cpu_topology" + ResctrlMetrics MetricKind = "resctrl" ) +// AllMetrics represents all kinds of metrics that cAdvisor supported. +var AllMetrics = MetricSet{ + CpuUsageMetrics: struct{}{}, + ProcessSchedulerMetrics: struct{}{}, + PerCpuUsageMetrics: struct{}{}, + MemoryUsageMetrics: struct{}{}, + CpuLoadMetrics: struct{}{}, + DiskIOMetrics: struct{}{}, + AcceleratorUsageMetrics: struct{}{}, + DiskUsageMetrics: struct{}{}, + NetworkUsageMetrics: struct{}{}, + NetworkTcpUsageMetrics: struct{}{}, + NetworkAdvancedTcpUsageMetrics: struct{}{}, + NetworkUdpUsageMetrics: struct{}{}, + ProcessMetrics: struct{}{}, + AppMetrics: struct{}{}, + HugetlbUsageMetrics: struct{}{}, + PerfMetrics: struct{}{}, + ReferencedMemoryMetrics: struct{}{}, + CPUTopologyMetrics: struct{}{}, + ResctrlMetrics: struct{}{}, +} + func (mk MetricKind) String() string { return string(mk) } @@ -73,6 +102,16 @@ func (ms MetricSet) Add(mk MetricKind) { ms[mk] = struct{}{} } +func (ms MetricSet) Difference(ms1 MetricSet) MetricSet { + result := MetricSet{} + for kind := range ms { + if !ms1.Has(kind) { + result.Add(kind) + } + } + return result +} + // All registered auth provider plugins. var pluginsLock sync.Mutex var plugins = make(map[string]Plugin) @@ -173,9 +212,8 @@ func NewContainerHandler(name string, watchType watcher.ContainerWatchSource, in klog.V(3).Infof("Using factory %q for container %q", factory, name) handle, err := factory.NewContainerHandler(name, inHostNamespace) return handle, canAccept, err - } else { - klog.V(4).Infof("Factory %q was unable to handle container %q", factory, name) } + klog.V(4).Infof("Factory %q was unable to handle container %q", factory, name) } return nil, false, fmt.Errorf("no known factory can handle creation of container") diff --git a/vendor/github.com/google/cadvisor/container/libcontainer/handler.go b/vendor/github.com/google/cadvisor/container/libcontainer/handler.go index 7aaec7e005a..436379b7624 100644 --- a/vendor/github.com/google/cadvisor/container/libcontainer/handler.go +++ b/vendor/github.com/google/cadvisor/container/libcontainer/handler.go @@ -16,11 +16,15 @@ package libcontainer import ( "bufio" + "bytes" + "encoding/json" + "flag" "fmt" "io" "io/ioutil" "os" "path" + "regexp" "strconv" "strings" "time" @@ -29,11 +33,21 @@ import ( info "github.com/google/cadvisor/info/v1" "golang.org/x/sys/unix" - "bytes" - "github.com/opencontainers/runc/libcontainer" "github.com/opencontainers/runc/libcontainer/cgroups" - "k8s.io/klog" + fs2 "github.com/opencontainers/runc/libcontainer/cgroups/fs2" + "k8s.io/klog/v2" +) + +var ( + whitelistedUlimits = [...]string{"max_open_files"} + referencedResetInterval = flag.Uint64("referenced_reset_interval", 0, + "Reset interval for referenced bytes (container_referenced_bytes metric), number of measurement cycles after which referenced bytes are cleared, if set to 0 referenced bytes are never cleared (default: 0)") + + smapsFilePathPattern = "/proc/%d/smaps" + clearRefsFilePathPattern = "/proc/%d/clear_refs" + + referencedRegexp = regexp.MustCompile(`Referenced:\s*([0-9]+)\s*kB`) ) type Handler struct { @@ -42,6 +56,7 @@ type Handler struct { pid int includedMetrics container.MetricSet pidMetricsCache map[int]*info.CpuSchedstat + cycles uint64 } func NewHandler(cgroupManager cgroups.Manager, rootFs string, pid int, includedMetrics container.MetricSet) *Handler { @@ -56,9 +71,21 @@ func NewHandler(cgroupManager cgroups.Manager, rootFs string, pid int, includedM // Get cgroup and networking stats of the specified container func (h *Handler) GetStats() (*info.ContainerStats, error) { - cgroupStats, err := h.cgroupManager.GetStats() - if err != nil { - return nil, err + var cgroupStats *cgroups.Stats + readCgroupStats := true + if cgroups.IsCgroup2UnifiedMode() { + // On cgroup v2 there are no stats at the root cgroup + // so check whether it is the root cgroup + if h.cgroupManager.Path("") == fs2.UnifiedMountpoint { + readCgroupStats = false + } + } + var err error + if readCgroupStats { + cgroupStats, err = h.cgroupManager.GetStats() + if err != nil { + return nil, err + } } libcontainerStats := &libcontainer.Stats{ CgroupStats: cgroupStats, @@ -77,55 +104,79 @@ func (h *Handler) GetStats() (*info.ContainerStats, error) { } } + if h.includedMetrics.Has(container.ReferencedMemoryMetrics) { + h.cycles++ + pids, err := h.cgroupManager.GetPids() + if err != nil { + klog.V(4).Infof("Could not get PIDs for container %d: %v", h.pid, err) + } else { + stats.ReferencedMemory, err = referencedBytesStat(pids, h.cycles, *referencedResetInterval) + if err != nil { + klog.V(4).Infof("Unable to get referenced bytes: %v", err) + } + } + } + // If we know the pid then get network stats from /proc//net/dev - if h.pid == 0 { - return stats, nil - } - if h.includedMetrics.Has(container.NetworkUsageMetrics) { - netStats, err := networkStatsFromProc(h.rootFs, h.pid) - if err != nil { - klog.V(4).Infof("Unable to get network stats from pid %d: %v", h.pid, err) - } else { - stats.Network.Interfaces = append(stats.Network.Interfaces, netStats...) - } - } - if h.includedMetrics.Has(container.NetworkTcpUsageMetrics) { - t, err := tcpStatsFromProc(h.rootFs, h.pid, "net/tcp") - if err != nil { - klog.V(4).Infof("Unable to get tcp stats from pid %d: %v", h.pid, err) - } else { - stats.Network.Tcp = t + if h.pid > 0 { + if h.includedMetrics.Has(container.NetworkUsageMetrics) { + netStats, err := networkStatsFromProc(h.rootFs, h.pid) + if err != nil { + klog.V(4).Infof("Unable to get network stats from pid %d: %v", h.pid, err) + } else { + stats.Network.Interfaces = append(stats.Network.Interfaces, netStats...) + } } + if h.includedMetrics.Has(container.NetworkTcpUsageMetrics) { + t, err := tcpStatsFromProc(h.rootFs, h.pid, "net/tcp") + if err != nil { + klog.V(4).Infof("Unable to get tcp stats from pid %d: %v", h.pid, err) + } else { + stats.Network.Tcp = t + } - t6, err := tcpStatsFromProc(h.rootFs, h.pid, "net/tcp6") - if err != nil { - klog.V(4).Infof("Unable to get tcp6 stats from pid %d: %v", h.pid, err) - } else { - stats.Network.Tcp6 = t6 - } - } - if h.includedMetrics.Has(container.NetworkUdpUsageMetrics) { - u, err := udpStatsFromProc(h.rootFs, h.pid, "net/udp") - if err != nil { - klog.V(4).Infof("Unable to get udp stats from pid %d: %v", h.pid, err) - } else { - stats.Network.Udp = u - } + t6, err := tcpStatsFromProc(h.rootFs, h.pid, "net/tcp6") + if err != nil { + klog.V(4).Infof("Unable to get tcp6 stats from pid %d: %v", h.pid, err) + } else { + stats.Network.Tcp6 = t6 + } - u6, err := udpStatsFromProc(h.rootFs, h.pid, "net/udp6") - if err != nil { - klog.V(4).Infof("Unable to get udp6 stats from pid %d: %v", h.pid, err) - } else { - stats.Network.Udp6 = u6 + } + if h.includedMetrics.Has(container.NetworkAdvancedTcpUsageMetrics) { + ta, err := advancedTCPStatsFromProc(h.rootFs, h.pid, "net/netstat", "net/snmp") + if err != nil { + klog.V(4).Infof("Unable to get advanced tcp stats from pid %d: %v", h.pid, err) + } else { + stats.Network.TcpAdvanced = ta + } + } + if h.includedMetrics.Has(container.NetworkUdpUsageMetrics) { + u, err := udpStatsFromProc(h.rootFs, h.pid, "net/udp") + if err != nil { + klog.V(4).Infof("Unable to get udp stats from pid %d: %v", h.pid, err) + } else { + stats.Network.Udp = u + } + + u6, err := udpStatsFromProc(h.rootFs, h.pid, "net/udp6") + if err != nil { + klog.V(4).Infof("Unable to get udp6 stats from pid %d: %v", h.pid, err) + } else { + stats.Network.Udp6 = u6 + } } } + // some process metrics are per container ( number of processes, number of + // file descriptors etc.) and not required a proper container's + // root PID (systemd services don't have the root PID atm) if h.includedMetrics.Has(container.ProcessMetrics) { paths := h.cgroupManager.GetPaths() path, ok := paths["cpu"] if !ok { klog.V(4).Infof("Could not find cgroups CPU for container %d", h.pid) } else { - stats.Processes, err = processStatsFromProcs(h.rootFs, path) + stats.Processes, err = processStatsFromProcs(h.rootFs, path, h.pid) if err != nil { klog.V(4).Infof("Unable to get Process Stats: %v", err) } @@ -143,7 +194,76 @@ func (h *Handler) GetStats() (*info.ContainerStats, error) { return stats, nil } -func processStatsFromProcs(rootFs string, cgroupPath string) (info.ProcessStats, error) { +func parseUlimit(value string) (int64, error) { + num, err := strconv.ParseInt(value, 10, 64) + if err != nil { + if strings.EqualFold(value, "unlimited") { + // -1 implies unlimited except for priority and nice; man limits.conf + num = -1 + } else { + // Value is not a number or "unlimited"; return an error + return 0, fmt.Errorf("unable to parse limit: %s", value) + } + } + return num, nil +} + +func isUlimitWhitelisted(name string) bool { + for _, whitelist := range whitelistedUlimits { + if name == whitelist { + return true + } + } + return false +} + +func processLimitsFile(fileData string) []info.UlimitSpec { + limits := strings.Split(fileData, "\n") + ulimits := make([]info.UlimitSpec, 0, len(limits)) + for _, lim := range limits { + // Skip any headers/footers + if strings.HasPrefix(lim, "Max") { + + // Line format: Max open files 16384 16384 files + fields := regexp.MustCompile(`[\s]{2,}`).Split(lim, -1) + name := strings.Replace(strings.ToLower(strings.TrimSpace(fields[0])), " ", "_", -1) + + found := isUlimitWhitelisted(name) + if !found { + continue + } + + soft := strings.TrimSpace(fields[1]) + softNum, softErr := parseUlimit(soft) + + hard := strings.TrimSpace(fields[2]) + hardNum, hardErr := parseUlimit(hard) + + // Omit metric if there were any parsing errors + if softErr == nil && hardErr == nil { + ulimitSpec := info.UlimitSpec{ + Name: name, + SoftLimit: int64(softNum), + HardLimit: int64(hardNum), + } + ulimits = append(ulimits, ulimitSpec) + } + } + } + return ulimits +} + +func processRootProcUlimits(rootFs string, rootPid int) []info.UlimitSpec { + filePath := path.Join(rootFs, "/proc", strconv.Itoa(rootPid), "limits") + out, err := ioutil.ReadFile(filePath) + if err != nil { + klog.V(4).Infof("error while listing directory %q to read ulimits: %v", filePath, err) + return []info.UlimitSpec{} + } + return processLimitsFile(string(out)) +} + +func processStatsFromProcs(rootFs string, cgroupPath string, rootPid int) (info.ProcessStats, error) { var fdCount, socketCount uint64 filePath := path.Join(cgroupPath, "cgroup.procs") out, err := ioutil.ReadFile(filePath) @@ -187,6 +307,10 @@ func processStatsFromProcs(rootFs string, cgroupPath string) (info.ProcessStats, SocketCount: socketCount, } + if rootPid > 0 { + processStats.Ulimits = processRootProcUlimits(rootFs, rootPid) + } + return processStats, nil } @@ -234,6 +358,92 @@ func schedulerStatsFromProcs(rootFs string, pids []int, pidMetricsCache map[int] return schedstats, nil } +// referencedBytesStat gets and clears referenced bytes +// see: https://github.com/brendangregg/wss#wsspl-referenced-page-flag +func referencedBytesStat(pids []int, cycles uint64, resetInterval uint64) (uint64, error) { + referencedKBytes, err := getReferencedKBytes(pids) + if err != nil { + return uint64(0), err + } + + err = clearReferencedBytes(pids, cycles, resetInterval) + if err != nil { + return uint64(0), err + } + return referencedKBytes * 1024, nil +} + +func getReferencedKBytes(pids []int) (uint64, error) { + referencedKBytes := uint64(0) + readSmapsContent := false + foundMatch := false + for _, pid := range pids { + smapsFilePath := fmt.Sprintf(smapsFilePathPattern, pid) + smapsContent, err := ioutil.ReadFile(smapsFilePath) + if err != nil { + klog.V(5).Infof("Cannot read %s file, err: %s", smapsFilePath, err) + if os.IsNotExist(err) { + continue //smaps file does not exists for all PIDs + } + return 0, err + } + readSmapsContent = true + + allMatches := referencedRegexp.FindAllSubmatch(smapsContent, -1) + if len(allMatches) == 0 { + klog.V(5).Infof("Not found any information about referenced bytes in %s file", smapsFilePath) + continue // referenced bytes may not exist in smaps file + } + + for _, matches := range allMatches { + if len(matches) != 2 { + return 0, fmt.Errorf("failed to match regexp in output: %s", string(smapsContent)) + } + foundMatch = true + referenced, err := strconv.ParseUint(string(matches[1]), 10, 64) + if err != nil { + return 0, err + } + referencedKBytes += referenced + } + } + + if len(pids) != 0 { + if !readSmapsContent { + klog.Warningf("Cannot read smaps files for any PID from %s", "CONTAINER") + } else if !foundMatch { + klog.Warningf("Not found any information about referenced bytes in smaps files for any PID from %s", "CONTAINER") + } + } + return referencedKBytes, nil +} + +func clearReferencedBytes(pids []int, cycles uint64, resetInterval uint64) error { + if resetInterval == 0 { + return nil + } + + if cycles%resetInterval == 0 { + for _, pid := range pids { + clearRefsFilePath := fmt.Sprintf(clearRefsFilePathPattern, pid) + clerRefsFile, err := os.OpenFile(clearRefsFilePath, os.O_WRONLY, 0644) + if err != nil { + // clear_refs file may not exist for all PIDs + continue + } + _, err = clerRefsFile.WriteString("1\n") + if err != nil { + return err + } + err = clerRefsFile.Close() + if err != nil { + return err + } + } + } + return nil +} + func networkStatsFromProc(rootFs string, pid int) ([]info.InterfaceStats, error) { netStatsFile := path.Join(rootFs, "proc", strconv.Itoa(pid), "/net/dev") @@ -326,7 +536,7 @@ func setInterfaceStatValues(fields []string, pointers []*uint64) error { func tcpStatsFromProc(rootFs string, pid int, file string) (info.TcpStat, error) { tcpStatsFile := path.Join(rootFs, "proc", strconv.Itoa(pid), file) - tcpStats, err := scanTcpStats(tcpStatsFile) + tcpStats, err := scanTCPStats(tcpStatsFile) if err != nil { return tcpStats, fmt.Errorf("couldn't read tcp stats: %v", err) } @@ -334,7 +544,81 @@ func tcpStatsFromProc(rootFs string, pid int, file string) (info.TcpStat, error) return tcpStats, nil } -func scanTcpStats(tcpStatsFile string) (info.TcpStat, error) { +func advancedTCPStatsFromProc(rootFs string, pid int, file1, file2 string) (info.TcpAdvancedStat, error) { + var advancedStats info.TcpAdvancedStat + var err error + + netstatFile := path.Join(rootFs, "proc", strconv.Itoa(pid), file1) + err = scanAdvancedTCPStats(&advancedStats, netstatFile) + if err != nil { + return advancedStats, err + } + + snmpFile := path.Join(rootFs, "proc", strconv.Itoa(pid), file2) + err = scanAdvancedTCPStats(&advancedStats, snmpFile) + if err != nil { + return advancedStats, err + } + + return advancedStats, nil +} + +func scanAdvancedTCPStats(advancedStats *info.TcpAdvancedStat, advancedTCPStatsFile string) error { + data, err := ioutil.ReadFile(advancedTCPStatsFile) + if err != nil { + return fmt.Errorf("failure opening %s: %v", advancedTCPStatsFile, err) + } + + reader := strings.NewReader(string(data)) + scanner := bufio.NewScanner(reader) + scanner.Split(bufio.ScanLines) + + advancedTCPStats := make(map[string]interface{}) + for scanner.Scan() { + nameParts := strings.Split(scanner.Text(), " ") + scanner.Scan() + valueParts := strings.Split(scanner.Text(), " ") + // Remove trailing :. and ignore non-tcp + protocol := nameParts[0][:len(nameParts[0])-1] + if protocol != "TcpExt" && protocol != "Tcp" { + continue + } + if len(nameParts) != len(valueParts) { + return fmt.Errorf("mismatch field count mismatch in %s: %s", + advancedTCPStatsFile, protocol) + } + for i := 1; i < len(nameParts); i++ { + if strings.Contains(valueParts[i], "-") { + vInt64, err := strconv.ParseInt(valueParts[i], 10, 64) + if err != nil { + return fmt.Errorf("decode value: %s to int64 error: %s", valueParts[i], err) + } + advancedTCPStats[nameParts[i]] = vInt64 + } else { + vUint64, err := strconv.ParseUint(valueParts[i], 10, 64) + if err != nil { + return fmt.Errorf("decode value: %s to uint64 error: %s", valueParts[i], err) + } + advancedTCPStats[nameParts[i]] = vUint64 + } + } + } + + b, err := json.Marshal(advancedTCPStats) + if err != nil { + return err + } + + err = json.Unmarshal(b, advancedStats) + if err != nil { + return err + } + + return scanner.Err() + +} + +func scanTCPStats(tcpStatsFile string) (info.TcpStat, error) { var stats info.TcpStat @@ -409,7 +693,7 @@ func udpStatsFromProc(rootFs string, pid int, file string) (info.UdpStat, error) return udpStats, fmt.Errorf("failure opening %s: %v", udpStatsFile, err) } - udpStats, err = scanUdpStats(r) + udpStats, err = scanUDPStats(r) if err != nil { return udpStats, fmt.Errorf("couldn't read udp stats: %v", err) } @@ -417,7 +701,7 @@ func udpStatsFromProc(rootFs string, pid int, file string) (info.UdpStat, error) return udpStats, nil } -func scanUdpStats(r io.Reader) (info.UdpStat, error) { +func scanUDPStats(r io.Reader) (info.UdpStat, error) { var stats info.UdpStat scanner := bufio.NewScanner(r) @@ -485,7 +769,7 @@ func minUint32(x, y uint32) uint32 { var numCpusFunc = getNumberOnlineCPUs // Convert libcontainer stats to info.ContainerStats. -func setCpuStats(s *cgroups.Stats, ret *info.ContainerStats, withPerCPU bool) { +func setCPUStats(s *cgroups.Stats, ret *info.ContainerStats, withPerCPU bool) { ret.Cpu.Usage.User = s.CpuStats.CpuUsage.UsageInUsermode ret.Cpu.Usage.System = s.CpuStats.CpuUsage.UsageInKernelmode ret.Cpu.Usage.Total = s.CpuStats.CpuUsage.TotalUsage @@ -570,8 +854,13 @@ func setMemoryStats(s *cgroups.Stats, ret *info.ContainerStats) { ret.Memory.HierarchicalData.Pgmajfault = v } + inactiveFileKeyName := "total_inactive_file" + if cgroups.IsCgroup2UnifiedMode() { + inactiveFileKeyName = "inactive_file" + } + workingSet := ret.Memory.Usage - if v, ok := s.MemoryStats.Stats["total_inactive_file"]; ok { + if v, ok := s.MemoryStats.Stats[inactiveFileKeyName]; ok { if workingSet < v { workingSet = 0 } else { @@ -581,6 +870,17 @@ func setMemoryStats(s *cgroups.Stats, ret *info.ContainerStats) { ret.Memory.WorkingSet = workingSet } +func setHugepageStats(s *cgroups.Stats, ret *info.ContainerStats) { + ret.Hugetlb = make(map[string]info.HugetlbStats) + for k, v := range s.HugetlbStats { + ret.Hugetlb[k] = info.HugetlbStats{ + Usage: v.Usage, + MaxUsage: v.MaxUsage, + Failcnt: v.Failcnt, + } + } +} + func setNetworkStats(libcontainerStats *libcontainer.Stats, ret *info.ContainerStats) { ret.Network.Interfaces = make([]info.InterfaceStats, len(libcontainerStats.Interfaces)) for i := range libcontainerStats.Interfaces { @@ -618,11 +918,14 @@ func newContainerStats(libcontainerStats *libcontainer.Stats, includedMetrics co } if s := libcontainerStats.CgroupStats; s != nil { - setCpuStats(s, ret, includedMetrics.Has(container.PerCpuUsageMetrics)) + setCPUStats(s, ret, includedMetrics.Has(container.PerCpuUsageMetrics)) if includedMetrics.Has(container.DiskIOMetrics) { setDiskIoStats(s, ret) } setMemoryStats(s, ret) + if includedMetrics.Has(container.HugetlbUsageMetrics) { + setHugepageStats(s, ret) + } } if len(libcontainerStats.Interfaces) > 0 { setNetworkStats(libcontainerStats, ret) diff --git a/vendor/github.com/google/cadvisor/container/libcontainer/helpers.go b/vendor/github.com/google/cadvisor/container/libcontainer/helpers.go index baa626b9682..030504373f2 100644 --- a/vendor/github.com/google/cadvisor/container/libcontainer/helpers.go +++ b/vendor/github.com/google/cadvisor/container/libcontainer/helpers.go @@ -21,7 +21,11 @@ import ( "github.com/google/cadvisor/container" "github.com/opencontainers/runc/libcontainer/cgroups" - "k8s.io/klog" + + fs "github.com/opencontainers/runc/libcontainer/cgroups/fs" + fs2 "github.com/opencontainers/runc/libcontainer/cgroups/fs2" + configs "github.com/opencontainers/runc/libcontainer/configs" + "k8s.io/klog/v2" ) type CgroupSubsystems struct { @@ -104,14 +108,16 @@ func getCgroupSubsystemsHelper(allCgroups []cgroups.Mount, disableCgroups map[st // Cgroup subsystems we support listing (should be the minimal set we need stats from). var supportedSubsystems map[string]struct{} = map[string]struct{}{ - "cpu": {}, - "cpuacct": {}, - "memory": {}, - "pids": {}, - "cpuset": {}, - "blkio": {}, - "io": {}, - "devices": {}, + "cpu": {}, + "cpuacct": {}, + "memory": {}, + "hugetlb": {}, + "pids": {}, + "cpuset": {}, + "blkio": {}, + "io": {}, + "devices": {}, + "perf_event": {}, } func DiskStatsCopy0(major, minor uint64) *info.PerDiskStats { @@ -128,38 +134,51 @@ type DiskKey struct { Minor uint64 } -func DiskStatsCopy1(disk_stat map[DiskKey]*info.PerDiskStats) []info.PerDiskStats { +func DiskStatsCopy1(diskStat map[DiskKey]*info.PerDiskStats) []info.PerDiskStats { i := 0 - stat := make([]info.PerDiskStats, len(disk_stat)) - for _, disk := range disk_stat { + stat := make([]info.PerDiskStats, len(diskStat)) + for _, disk := range diskStat { stat[i] = *disk i++ } return stat } -func DiskStatsCopy(blkio_stats []cgroups.BlkioStatEntry) (stat []info.PerDiskStats) { - if len(blkio_stats) == 0 { +func DiskStatsCopy(blkioStats []cgroups.BlkioStatEntry) (stat []info.PerDiskStats) { + if len(blkioStats) == 0 { return } - disk_stat := make(map[DiskKey]*info.PerDiskStats) - for i := range blkio_stats { - major := blkio_stats[i].Major - minor := blkio_stats[i].Minor - disk_key := DiskKey{ + diskStat := make(map[DiskKey]*info.PerDiskStats) + for i := range blkioStats { + major := blkioStats[i].Major + minor := blkioStats[i].Minor + key := DiskKey{ Major: major, Minor: minor, } - diskp, ok := disk_stat[disk_key] + diskp, ok := diskStat[key] if !ok { diskp = DiskStatsCopy0(major, minor) - disk_stat[disk_key] = diskp + diskStat[key] = diskp } - op := blkio_stats[i].Op + op := blkioStats[i].Op if op == "" { op = "Count" } - diskp.Stats[op] = blkio_stats[i].Value + diskp.Stats[op] = blkioStats[i].Value } - return DiskStatsCopy1(disk_stat) + return DiskStatsCopy1(diskStat) +} + +func NewCgroupManager(name string, paths map[string]string) (cgroups.Manager, error) { + if cgroups.IsCgroup2UnifiedMode() { + path := paths["cpu"] + return fs2.NewManager(nil, path, false) + } + + config := configs.Cgroup{ + Name: name, + } + return fs.NewManager(&config, paths, false), nil + } diff --git a/vendor/github.com/google/cadvisor/container/raw/factory.go b/vendor/github.com/google/cadvisor/container/raw/factory.go index d843bc8f941..aa022529c92 100644 --- a/vendor/github.com/google/cadvisor/container/raw/factory.go +++ b/vendor/github.com/google/cadvisor/container/raw/factory.go @@ -26,7 +26,7 @@ import ( info "github.com/google/cadvisor/info/v1" watch "github.com/google/cadvisor/watcher" - "k8s.io/klog" + "k8s.io/klog/v2" ) var dockerOnly = flag.Bool("docker_only", false, "Only report docker containers in addition to root stats") @@ -52,27 +52,27 @@ type rawFactory struct { rawPrefixWhiteList []string } -func (self *rawFactory) String() string { +func (f *rawFactory) String() string { return "raw" } -func (self *rawFactory) NewContainerHandler(name string, inHostNamespace bool) (container.ContainerHandler, error) { +func (f *rawFactory) NewContainerHandler(name string, inHostNamespace bool) (container.ContainerHandler, error) { rootFs := "/" if !inHostNamespace { rootFs = "/rootfs" } - return newRawContainerHandler(name, self.cgroupSubsystems, self.machineInfoFactory, self.fsInfo, self.watcher, rootFs, self.includedMetrics) + return newRawContainerHandler(name, f.cgroupSubsystems, f.machineInfoFactory, f.fsInfo, f.watcher, rootFs, f.includedMetrics) } // The raw factory can handle any container. If --docker_only is set to true, non-docker containers are ignored except for "/" and those whitelisted by raw_cgroup_prefix_whitelist flag. -func (self *rawFactory) CanHandleAndAccept(name string) (bool, bool, error) { +func (f *rawFactory) CanHandleAndAccept(name string) (bool, bool, error) { if name == "/" { return true, true, nil } - if *dockerOnly && self.rawPrefixWhiteList[0] == "" { + if *dockerOnly && f.rawPrefixWhiteList[0] == "" { return true, false, nil } - for _, prefix := range self.rawPrefixWhiteList { + for _, prefix := range f.rawPrefixWhiteList { if strings.HasPrefix(name, prefix) { return true, true, nil } @@ -80,8 +80,8 @@ func (self *rawFactory) CanHandleAndAccept(name string) (bool, bool, error) { return true, false, nil } -func (self *rawFactory) DebugInfo() map[string][]string { - return common.DebugInfo(self.watcher.GetWatches()) +func (f *rawFactory) DebugInfo() map[string][]string { + return common.DebugInfo(f.watcher.GetWatches()) } func Register(machineInfoFactory info.MachineInfoFactory, fsInfo fs.FsInfo, includedMetrics map[container.MetricKind]struct{}, rawPrefixWhiteList []string) error { diff --git a/vendor/github.com/google/cadvisor/container/raw/handler.go b/vendor/github.com/google/cadvisor/container/raw/handler.go index ea7ec486451..d9eae2199c4 100644 --- a/vendor/github.com/google/cadvisor/container/raw/handler.go +++ b/vendor/github.com/google/cadvisor/container/raw/handler.go @@ -25,9 +25,7 @@ import ( info "github.com/google/cadvisor/info/v1" "github.com/google/cadvisor/machine" - cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" - "github.com/opencontainers/runc/libcontainer/configs" - "k8s.io/klog" + "k8s.io/klog/v2" ) type rawContainerHandler struct { @@ -51,19 +49,16 @@ func isRootCgroup(name string) bool { } func newRawContainerHandler(name string, cgroupSubsystems *libcontainer.CgroupSubsystems, machineInfoFactory info.MachineInfoFactory, fsInfo fs.FsInfo, watcher *common.InotifyWatcher, rootFs string, includedMetrics container.MetricSet) (container.ContainerHandler, error) { - cgroupPaths := common.MakeCgroupPaths(cgroupSubsystems.MountPoints, name) - cHints, err := common.GetContainerHintsFromFile(*common.ArgContainerHints) if err != nil { return nil, err } - // Generate the equivalent cgroup manager for this container. - cgroupManager := &cgroupfs.Manager{ - Cgroups: &configs.Cgroup{ - Name: name, - }, - Paths: cgroupPaths, + cgroupPaths := common.MakeCgroupPaths(cgroupSubsystems.MountPoints, name) + + cgroupManager, err := libcontainer.NewCgroupManager(name, cgroupPaths) + if err != nil { + return nil, err } var externalMounts []common.Mount @@ -95,17 +90,17 @@ func newRawContainerHandler(name string, cgroupSubsystems *libcontainer.CgroupSu }, nil } -func (self *rawContainerHandler) ContainerReference() (info.ContainerReference, error) { +func (h *rawContainerHandler) ContainerReference() (info.ContainerReference, error) { // We only know the container by its one name. return info.ContainerReference{ - Name: self.name, + Name: h.name, }, nil } -func (self *rawContainerHandler) GetRootNetworkDevices() ([]info.NetInfo, error) { +func (h *rawContainerHandler) GetRootNetworkDevices() ([]info.NetInfo, error) { nd := []info.NetInfo{} - if isRootCgroup(self.name) { - mi, err := self.machineInfoFactory.GetMachineInfo() + if isRootCgroup(h.name) { + mi, err := h.machineInfoFactory.GetMachineInfo() if err != nil { return nd, err } @@ -115,22 +110,22 @@ func (self *rawContainerHandler) GetRootNetworkDevices() ([]info.NetInfo, error) } // Nothing to start up. -func (self *rawContainerHandler) Start() {} +func (h *rawContainerHandler) Start() {} // Nothing to clean up. -func (self *rawContainerHandler) Cleanup() {} +func (h *rawContainerHandler) Cleanup() {} -func (self *rawContainerHandler) GetSpec() (info.ContainerSpec, error) { +func (h *rawContainerHandler) GetSpec() (info.ContainerSpec, error) { const hasNetwork = false - hasFilesystem := isRootCgroup(self.name) || len(self.externalMounts) > 0 - spec, err := common.GetSpec(self.cgroupPaths, self.machineInfoFactory, hasNetwork, hasFilesystem) + hasFilesystem := isRootCgroup(h.name) || len(h.externalMounts) > 0 + spec, err := common.GetSpec(h.cgroupPaths, h.machineInfoFactory, hasNetwork, hasFilesystem) if err != nil { return spec, err } - if isRootCgroup(self.name) { + if isRootCgroup(h.name) { // Check physical network devices for root container. - nd, err := self.GetRootNetworkDevices() + nd, err := h.GetRootNetworkDevices() if err != nil { return spec, err } @@ -189,54 +184,58 @@ func fsToFsStats(fs *fs.Fs) info.FsStats { } } -func (self *rawContainerHandler) getFsStats(stats *info.ContainerStats) error { +func (h *rawContainerHandler) getFsStats(stats *info.ContainerStats) error { var filesystems []fs.Fs var err error + // Early exist if no disk metrics are to be collected. + if !h.includedMetrics.Has(container.DiskUsageMetrics) && !h.includedMetrics.Has(container.DiskIOMetrics) { + return nil + } + // Get Filesystem information only for the root cgroup. - if isRootCgroup(self.name) { - filesystems, err = self.fsInfo.GetGlobalFsInfo() + if isRootCgroup(h.name) { + filesystems, err = h.fsInfo.GetGlobalFsInfo() if err != nil { return err } - } else if self.includedMetrics.Has(container.DiskUsageMetrics) || self.includedMetrics.Has(container.DiskIOMetrics) { - if len(self.externalMounts) > 0 { - var mountSet map[string]struct{} - mountSet = make(map[string]struct{}) - for _, mount := range self.externalMounts { + } else { + if len(h.externalMounts) > 0 { + mountSet := make(map[string]struct{}) + for _, mount := range h.externalMounts { mountSet[mount.HostDir] = struct{}{} } - filesystems, err = self.fsInfo.GetFsInfoForPath(mountSet) + filesystems, err = h.fsInfo.GetFsInfoForPath(mountSet) if err != nil { return err } } } - if isRootCgroup(self.name) || self.includedMetrics.Has(container.DiskUsageMetrics) { + if h.includedMetrics.Has(container.DiskUsageMetrics) { for i := range filesystems { fs := filesystems[i] stats.Filesystem = append(stats.Filesystem, fsToFsStats(&fs)) } } - if isRootCgroup(self.name) || self.includedMetrics.Has(container.DiskIOMetrics) { - common.AssignDeviceNamesToDiskStats(&fsNamer{fs: filesystems, factory: self.machineInfoFactory}, &stats.DiskIo) + if h.includedMetrics.Has(container.DiskIOMetrics) { + common.AssignDeviceNamesToDiskStats(&fsNamer{fs: filesystems, factory: h.machineInfoFactory}, &stats.DiskIo) } return nil } -func (self *rawContainerHandler) GetStats() (*info.ContainerStats, error) { - if *disableRootCgroupStats && isRootCgroup(self.name) { +func (h *rawContainerHandler) GetStats() (*info.ContainerStats, error) { + if *disableRootCgroupStats && isRootCgroup(h.name) { return nil, nil } - stats, err := self.libcontainerHandler.GetStats() + stats, err := h.libcontainerHandler.GetStats() if err != nil { return stats, err } // Get filesystem stats. - err = self.getFsStats(stats) + err = h.getFsStats(stats) if err != nil { return stats, err } @@ -244,36 +243,36 @@ func (self *rawContainerHandler) GetStats() (*info.ContainerStats, error) { return stats, nil } -func (self *rawContainerHandler) GetCgroupPath(resource string) (string, error) { - path, ok := self.cgroupPaths[resource] +func (h *rawContainerHandler) GetCgroupPath(resource string) (string, error) { + path, ok := h.cgroupPaths[resource] if !ok { - return "", fmt.Errorf("could not find path for resource %q for container %q\n", resource, self.name) + return "", fmt.Errorf("could not find path for resource %q for container %q", resource, h.name) } return path, nil } -func (self *rawContainerHandler) GetContainerLabels() map[string]string { +func (h *rawContainerHandler) GetContainerLabels() map[string]string { return map[string]string{} } -func (self *rawContainerHandler) GetContainerIPAddress() string { +func (h *rawContainerHandler) GetContainerIPAddress() string { // the IP address for the raw container corresponds to the system ip address. return "127.0.0.1" } -func (self *rawContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) { - return common.ListContainers(self.name, self.cgroupPaths, listType) +func (h *rawContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) { + return common.ListContainers(h.name, h.cgroupPaths, listType) } -func (self *rawContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { - return self.libcontainerHandler.GetProcesses() +func (h *rawContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { + return h.libcontainerHandler.GetProcesses() } -func (self *rawContainerHandler) Exists() bool { - return common.CgroupExists(self.cgroupPaths) +func (h *rawContainerHandler) Exists() bool { + return common.CgroupExists(h.cgroupPaths) } -func (self *rawContainerHandler) Type() container.ContainerType { +func (h *rawContainerHandler) Type() container.ContainerType { return container.ContainerTypeRaw } diff --git a/vendor/github.com/google/cadvisor/container/raw/watcher.go b/vendor/github.com/google/cadvisor/container/raw/watcher.go index cec04da84df..015b1518cfb 100644 --- a/vendor/github.com/google/cadvisor/container/raw/watcher.go +++ b/vendor/github.com/google/cadvisor/container/raw/watcher.go @@ -28,7 +28,7 @@ import ( "github.com/google/cadvisor/watcher" inotify "k8s.io/utils/inotify" - "k8s.io/klog" + "k8s.io/klog/v2" ) type rawContainerWatcher struct { @@ -68,10 +68,10 @@ func NewRawContainerWatcher() (watcher.ContainerWatcher, error) { return rawWatcher, nil } -func (self *rawContainerWatcher) Start(events chan watcher.ContainerEvent) error { +func (w *rawContainerWatcher) Start(events chan watcher.ContainerEvent) error { // Watch this container (all its cgroups) and all subdirectories. - for _, cgroupPath := range self.cgroupPaths { - _, err := self.watchDirectory(events, cgroupPath, "/") + for _, cgroupPath := range w.cgroupPaths { + _, err := w.watchDirectory(events, cgroupPath, "/") if err != nil { return err } @@ -81,17 +81,17 @@ func (self *rawContainerWatcher) Start(events chan watcher.ContainerEvent) error go func() { for { select { - case event := <-self.watcher.Event(): - err := self.processEvent(event, events) + case event := <-w.watcher.Event(): + err := w.processEvent(event, events) if err != nil { klog.Warningf("Error while processing event (%+v): %v", event, err) } - case err := <-self.watcher.Error(): + case err := <-w.watcher.Error(): klog.Warningf("Error while watching %q: %v", "/", err) - case <-self.stopWatcher: - err := self.watcher.Close() + case <-w.stopWatcher: + err := w.watcher.Close() if err == nil { - self.stopWatcher <- err + w.stopWatcher <- err return } } @@ -101,21 +101,21 @@ func (self *rawContainerWatcher) Start(events chan watcher.ContainerEvent) error return nil } -func (self *rawContainerWatcher) Stop() error { +func (w *rawContainerWatcher) Stop() error { // Rendezvous with the watcher thread. - self.stopWatcher <- nil - return <-self.stopWatcher + w.stopWatcher <- nil + return <-w.stopWatcher } // Watches the specified directory and all subdirectories. Returns whether the path was // already being watched and an error (if any). -func (self *rawContainerWatcher) watchDirectory(events chan watcher.ContainerEvent, dir string, containerName string) (bool, error) { +func (w *rawContainerWatcher) watchDirectory(events chan watcher.ContainerEvent, dir string, containerName string) (bool, error) { // Don't watch .mount cgroups because they never have containers as sub-cgroups. A single container // can have many .mount cgroups associated with it which can quickly exhaust the inotify watches on a node. if strings.HasSuffix(containerName, ".mount") { return false, nil } - alreadyWatching, err := self.watcher.AddWatch(containerName, dir) + alreadyWatching, err := w.watcher.AddWatch(containerName, dir) if err != nil { return alreadyWatching, err } @@ -124,7 +124,7 @@ func (self *rawContainerWatcher) watchDirectory(events chan watcher.ContainerEve cleanup := true defer func() { if cleanup { - _, err := self.watcher.RemoveWatch(containerName, dir) + _, err := w.watcher.RemoveWatch(containerName, dir) if err != nil { klog.Warningf("Failed to remove inotify watch for %q: %v", dir, err) } @@ -141,7 +141,7 @@ func (self *rawContainerWatcher) watchDirectory(events chan watcher.ContainerEve if entry.IsDir() { entryPath := path.Join(dir, entry.Name()) subcontainerName := path.Join(containerName, entry.Name()) - alreadyWatchingSubDir, err := self.watchDirectory(events, entryPath, subcontainerName) + alreadyWatchingSubDir, err := w.watchDirectory(events, entryPath, subcontainerName) if err != nil { klog.Errorf("Failed to watch directory %q: %v", entryPath, err) if os.IsNotExist(err) { @@ -168,7 +168,7 @@ func (self *rawContainerWatcher) watchDirectory(events chan watcher.ContainerEve return alreadyWatching, nil } -func (self *rawContainerWatcher) processEvent(event *inotify.Event, events chan watcher.ContainerEvent) error { +func (w *rawContainerWatcher) processEvent(event *inotify.Event, events chan watcher.ContainerEvent) error { // Convert the inotify event type to a container create or delete. var eventType watcher.ContainerEventType switch { @@ -187,7 +187,7 @@ func (self *rawContainerWatcher) processEvent(event *inotify.Event, events chan // Derive the container name from the path name. var containerName string - for _, mount := range self.cgroupSubsystems.Mounts { + for _, mount := range w.cgroupSubsystems.Mounts { mountLocation := path.Clean(mount.Mountpoint) + "/" if strings.HasPrefix(event.Name, mountLocation) { containerName = event.Name[len(mountLocation)-1:] @@ -202,7 +202,7 @@ func (self *rawContainerWatcher) processEvent(event *inotify.Event, events chan switch eventType { case watcher.ContainerAdd: // New container was created, watch it. - alreadyWatched, err := self.watchDirectory(events, event.Name, containerName) + alreadyWatched, err := w.watchDirectory(events, event.Name, containerName) if err != nil { return err } @@ -213,7 +213,7 @@ func (self *rawContainerWatcher) processEvent(event *inotify.Event, events chan } case watcher.ContainerDelete: // Container was deleted, stop watching for it. - lastWatched, err := self.watcher.RemoveWatch(containerName, event.Name) + lastWatched, err := w.watcher.RemoveWatch(containerName, event.Name) if err != nil { return err } diff --git a/vendor/github.com/google/cadvisor/container/systemd/factory.go b/vendor/github.com/google/cadvisor/container/systemd/factory.go index 8538fb4011f..0d5fc68e0b9 100644 --- a/vendor/github.com/google/cadvisor/container/systemd/factory.go +++ b/vendor/github.com/google/cadvisor/container/systemd/factory.go @@ -23,7 +23,7 @@ import ( info "github.com/google/cadvisor/info/v1" "github.com/google/cadvisor/watcher" - "k8s.io/klog" + "k8s.io/klog/v2" ) type systemdFactory struct{} @@ -42,7 +42,8 @@ func (f *systemdFactory) CanHandleAndAccept(name string) (bool, bool, error) { if strings.HasSuffix(name, ".mount") { return true, false, nil } - return false, false, fmt.Errorf("%s not handled by systemd handler", name) + klog.V(5).Infof("%s not handled by systemd handler", name) + return false, false, nil } func (f *systemdFactory) DebugInfo() map[string][]string { diff --git a/vendor/github.com/google/cadvisor/container/systemd/install/install.go b/vendor/github.com/google/cadvisor/container/systemd/install/install.go index e083b4bc59d..36f63c5393e 100644 --- a/vendor/github.com/google/cadvisor/container/systemd/install/install.go +++ b/vendor/github.com/google/cadvisor/container/systemd/install/install.go @@ -18,7 +18,7 @@ package install import ( "github.com/google/cadvisor/container" "github.com/google/cadvisor/container/systemd" - "k8s.io/klog" + "k8s.io/klog/v2" ) func init() { diff --git a/vendor/github.com/google/cadvisor/devicemapper/dmsetup_client.go b/vendor/github.com/google/cadvisor/devicemapper/dmsetup_client.go index 3a37b560953..2e237b35bf7 100644 --- a/vendor/github.com/google/cadvisor/devicemapper/dmsetup_client.go +++ b/vendor/github.com/google/cadvisor/devicemapper/dmsetup_client.go @@ -18,7 +18,7 @@ import ( "strconv" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" ) // DmsetupClient is a low-level client for interacting with device mapper via diff --git a/vendor/github.com/google/cadvisor/devicemapper/thin_ls_client.go b/vendor/github.com/google/cadvisor/devicemapper/thin_ls_client.go index 1bbc360ff4d..8ae84e6f9b6 100644 --- a/vendor/github.com/google/cadvisor/devicemapper/thin_ls_client.go +++ b/vendor/github.com/google/cadvisor/devicemapper/thin_ls_client.go @@ -21,7 +21,7 @@ import ( "strconv" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" ) // thinLsClient knows how to run a thin_ls very specific to CoW usage for diff --git a/vendor/github.com/google/cadvisor/devicemapper/thin_pool_watcher.go b/vendor/github.com/google/cadvisor/devicemapper/thin_pool_watcher.go index 2eb8e002c85..9c43f6556a1 100644 --- a/vendor/github.com/google/cadvisor/devicemapper/thin_pool_watcher.go +++ b/vendor/github.com/google/cadvisor/devicemapper/thin_pool_watcher.go @@ -19,7 +19,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" ) // ThinPoolWatcher maintains a cache of device name -> usage stats for a @@ -85,13 +85,13 @@ func (w *ThinPoolWatcher) Stop() { } // GetUsage gets the cached usage value of the given device. -func (w *ThinPoolWatcher) GetUsage(deviceId string) (uint64, error) { +func (w *ThinPoolWatcher) GetUsage(deviceID string) (uint64, error) { w.lock.RLock() defer w.lock.RUnlock() - v, ok := w.cache[deviceId] + v, ok := w.cache[deviceID] if !ok { - return 0, fmt.Errorf("no cached value for usage of device %v", deviceId) + return 0, fmt.Errorf("no cached value for usage of device %v", deviceID) } return v, nil @@ -129,13 +129,15 @@ func (w *ThinPoolWatcher) Refresh() error { if output, err := w.dmsetup.Message(w.poolName, 0, reserveMetadataMessage); err != nil { err = fmt.Errorf("error reserving metadata for thin-pool %v: %v output: %v", w.poolName, err, string(output)) return err - } else { - klog.V(5).Infof("reserved metadata snapshot for thin-pool %v", w.poolName) } + klog.V(5).Infof("reserved metadata snapshot for thin-pool %v", w.poolName) defer func() { klog.V(5).Infof("releasing metadata snapshot for thin-pool %v", w.poolName) - w.dmsetup.Message(w.poolName, 0, releaseMetadataMessage) + _, err := w.dmsetup.Message(w.poolName, 0, releaseMetadataMessage) + if err != nil { + klog.Warningf("Unable to release metadata snapshot for thin-pool %v: %s", w.poolName, err) + } }() klog.V(5).Infof("running thin_ls on metadata device %v", w.metadataDevice) diff --git a/vendor/github.com/google/cadvisor/events/handler.go b/vendor/github.com/google/cadvisor/events/handler.go index 28a67addb00..61a183bc4e7 100644 --- a/vendor/github.com/google/cadvisor/events/handler.go +++ b/vendor/github.com/google/cadvisor/events/handler.go @@ -24,7 +24,7 @@ import ( info "github.com/google/cadvisor/info/v1" "github.com/google/cadvisor/utils" - "k8s.io/klog" + "k8s.io/klog/v2" ) type byTimestamp []*info.Event @@ -44,7 +44,7 @@ func (e byTimestamp) Less(i, j int) bool { type EventChannel struct { // Watch ID. Can be used by the caller to request cancellation of watch events. - watchId int + watchID int // Channel on which the caller can receive watch events. channel chan *info.Event } @@ -84,9 +84,9 @@ type EventManager interface { GetEvents(request *Request) ([]*info.Event, error) // AddEvent allows the caller to add an event to an EventManager // object - AddEvent(e *info.Event) error + AddEvent(event *info.Event) error // Cancels a previously requested watch event. - StopWatch(watch_id int) + StopWatch(watchID int) } // events provides an implementation for the EventManager interface. @@ -100,7 +100,7 @@ type events struct { // lock guarding watchers. watcherLock sync.RWMutex // last allocated watch id. - lastId int + lastID int // Event storage policy. storagePolicy StoragePolicy } @@ -118,9 +118,9 @@ type watch struct { eventChannel *EventChannel } -func NewEventChannel(watchId int) *EventChannel { +func NewEventChannel(watchID int) *EventChannel { return &EventChannel{ - watchId: watchId, + watchID: watchID, channel: make(chan *info.Event, 10), } } @@ -148,9 +148,9 @@ func DefaultStoragePolicy() StoragePolicy { } // returns a pointer to an initialized Events object. -func NewEventManager(storagePolicy StoragePolicy) *events { +func NewEventManager(storagePolicy StoragePolicy) EventManager { return &events{ - eventStore: make(map[info.EventType]*utils.TimedStore, 0), + eventStore: make(map[info.EventType]*utils.TimedStore), watchers: make(map[int]*watch), storagePolicy: storagePolicy, } @@ -173,12 +173,12 @@ func newWatch(request *Request, eventChannel *EventChannel) *watch { } } -func (self *EventChannel) GetChannel() chan *info.Event { - return self.channel +func (ch *EventChannel) GetChannel() chan *info.Event { + return ch.channel } -func (self *EventChannel) GetWatchId() int { - return self.watchId +func (ch *EventChannel) GetWatchId() int { + return ch.watchID } // sorts and returns up to the last MaxEventsReturned chronological elements @@ -195,8 +195,8 @@ func getMaxEventsReturned(request *Request, eSlice []*info.Event) []*info.Event // container path is a prefix of the event container path. Otherwise, // it checks that the container paths of the event and request are // equivalent -func checkIfIsSubcontainer(request *Request, event *info.Event) bool { - if request.IncludeSubcontainers == true { +func isSubcontainer(request *Request, event *info.Event) bool { + if request.IncludeSubcontainers { return request.ContainerName == "/" || strings.HasPrefix(event.ContainerName+"/", request.ContainerName+"/") } return event.ContainerName == request.ContainerName @@ -221,7 +221,7 @@ func checkIfEventSatisfiesRequest(request *Request, event *info.Event) bool { return false } if request.ContainerName != "" { - return checkIfIsSubcontainer(request, event) + return isSubcontainer(request, event) } return true } @@ -231,15 +231,15 @@ func checkIfEventSatisfiesRequest(request *Request, event *info.Event) bool { // adds it to a slice of *Event objects that is returned. If both MaxEventsReturned // and StartTime/EndTime are specified in the request object, then only // up to the most recent MaxEventsReturned events in that time range are returned. -func (self *events) GetEvents(request *Request) ([]*info.Event, error) { +func (e *events) GetEvents(request *Request) ([]*info.Event, error) { returnEventList := []*info.Event{} - self.eventsLock.RLock() - defer self.eventsLock.RUnlock() + e.eventsLock.RLock() + defer e.eventsLock.RUnlock() for eventType, fetch := range request.EventType { if !fetch { continue } - evs, ok := self.eventStore[eventType] + evs, ok := e.eventStore[eventType] if !ok { continue } @@ -261,50 +261,50 @@ func (self *events) GetEvents(request *Request) ([]*info.Event, error) { // Request object it is fed to the channel. The StartTime and EndTime of the watch // request should be uninitialized because the purpose is to watch indefinitely // for events that will happen in the future -func (self *events) WatchEvents(request *Request) (*EventChannel, error) { +func (e *events) WatchEvents(request *Request) (*EventChannel, error) { if !request.StartTime.IsZero() || !request.EndTime.IsZero() { return nil, errors.New( "for a call to watch, request.StartTime and request.EndTime must be uninitialized") } - self.watcherLock.Lock() - defer self.watcherLock.Unlock() - new_id := self.lastId + 1 - returnEventChannel := NewEventChannel(new_id) + e.watcherLock.Lock() + defer e.watcherLock.Unlock() + newID := e.lastID + 1 + returnEventChannel := NewEventChannel(newID) newWatcher := newWatch(request, returnEventChannel) - self.watchers[new_id] = newWatcher - self.lastId = new_id + e.watchers[newID] = newWatcher + e.lastID = newID return returnEventChannel, nil } // helper function to update the event manager's eventStore -func (self *events) updateEventStore(e *info.Event) { - self.eventsLock.Lock() - defer self.eventsLock.Unlock() - if _, ok := self.eventStore[e.EventType]; !ok { - maxNumEvents := self.storagePolicy.DefaultMaxNumEvents - if numEvents, ok := self.storagePolicy.PerTypeMaxNumEvents[e.EventType]; ok { +func (e *events) updateEventStore(event *info.Event) { + e.eventsLock.Lock() + defer e.eventsLock.Unlock() + if _, ok := e.eventStore[event.EventType]; !ok { + maxNumEvents := e.storagePolicy.DefaultMaxNumEvents + if numEvents, ok := e.storagePolicy.PerTypeMaxNumEvents[event.EventType]; ok { maxNumEvents = numEvents } if maxNumEvents == 0 { - // Event storage is disabled for e.EventType + // Event storage is disabled for event.EventType return } - maxAge := self.storagePolicy.DefaultMaxAge - if age, ok := self.storagePolicy.PerTypeMaxAge[e.EventType]; ok { + maxAge := e.storagePolicy.DefaultMaxAge + if age, ok := e.storagePolicy.PerTypeMaxAge[event.EventType]; ok { maxAge = age } - self.eventStore[e.EventType] = utils.NewTimedStore(maxAge, maxNumEvents) + e.eventStore[event.EventType] = utils.NewTimedStore(maxAge, maxNumEvents) } - self.eventStore[e.EventType].Add(e.Timestamp, e) + e.eventStore[event.EventType].Add(event.Timestamp, event) } -func (self *events) findValidWatchers(e *info.Event) []*watch { +func (e *events) findValidWatchers(event *info.Event) []*watch { watchesToSend := make([]*watch, 0) - for _, watcher := range self.watchers { + for _, watcher := range e.watchers { watchRequest := watcher.request - if checkIfEventSatisfiesRequest(watchRequest, e) { + if checkIfEventSatisfiesRequest(watchRequest, event) { watchesToSend = append(watchesToSend, watcher) } } @@ -314,26 +314,26 @@ func (self *events) findValidWatchers(e *info.Event) []*watch { // method of Events object that adds the argument Event object to the // eventStore. It also feeds the event to a set of watch channels // held by the manager if it satisfies the request keys of the channels -func (self *events) AddEvent(e *info.Event) error { - self.updateEventStore(e) - self.watcherLock.RLock() - defer self.watcherLock.RUnlock() - watchesToSend := self.findValidWatchers(e) +func (e *events) AddEvent(event *info.Event) error { + e.updateEventStore(event) + e.watcherLock.RLock() + defer e.watcherLock.RUnlock() + watchesToSend := e.findValidWatchers(event) for _, watchObject := range watchesToSend { - watchObject.eventChannel.GetChannel() <- e + watchObject.eventChannel.GetChannel() <- event } - klog.V(4).Infof("Added event %v", e) + klog.V(4).Infof("Added event %v", event) return nil } // Removes a watch instance from the EventManager's watchers map -func (self *events) StopWatch(watchId int) { - self.watcherLock.Lock() - defer self.watcherLock.Unlock() - _, ok := self.watchers[watchId] +func (e *events) StopWatch(watchID int) { + e.watcherLock.Lock() + defer e.watcherLock.Unlock() + _, ok := e.watchers[watchID] if !ok { - klog.Errorf("Could not find watcher instance %v", watchId) + klog.Errorf("Could not find watcher instance %v", watchID) } - close(self.watchers[watchId].eventChannel.GetChannel()) - delete(self.watchers, watchId) + close(e.watchers[watchID].eventChannel.GetChannel()) + delete(e.watchers, watchID) } diff --git a/vendor/github.com/google/cadvisor/fs/fs.go b/vendor/github.com/google/cadvisor/fs/fs.go index 4dad954cde6..cb45c33c933 100644 --- a/vendor/github.com/google/cadvisor/fs/fs.go +++ b/vendor/github.com/google/cadvisor/fs/fs.go @@ -30,18 +30,20 @@ import ( "strings" "syscall" - "github.com/docker/docker/pkg/mount" "github.com/google/cadvisor/devicemapper" "github.com/google/cadvisor/utils" - dockerutil "github.com/google/cadvisor/utils/docker" zfs "github.com/mistifyio/go-zfs" - "k8s.io/klog" + + "k8s.io/klog/v2" + "k8s.io/utils/mount" ) const ( - LabelSystemRoot = "root" - LabelDockerImages = "docker-images" - LabelCrioImages = "crio-images" + LabelSystemRoot = "root" + LabelDockerImages = "docker-images" + LabelCrioImages = "crio-images" + DriverStatusPoolName = "Pool Name" + DriverStatusDataLoopFile = "Data loop file" ) const ( @@ -83,7 +85,7 @@ type RealFsInfo struct { // Labels are intent-specific tags that are auto-detected. labels map[string]string // Map from mountpoint to mount information. - mounts map[string]*mount.Info + mounts map[string]mount.MountInfo // devicemapper client dmsetup devicemapper.DmsetupClient // fsUUIDToDeviceName is a map from the filesystem UUID to its device name. @@ -91,7 +93,7 @@ type RealFsInfo struct { } func NewFsInfo(context Context) (FsInfo, error) { - mounts, err := mount.GetMounts(nil) + mounts, err := mount.ParseMountInfo("/proc/self/mountinfo") if err != nil { return nil, err } @@ -107,14 +109,14 @@ func NewFsInfo(context Context) (FsInfo, error) { excluded := []string{fmt.Sprintf("%s/devicemapper/mnt", context.Docker.Root)} fsInfo := &RealFsInfo{ partitions: processMounts(mounts, excluded), - labels: make(map[string]string, 0), - mounts: make(map[string]*mount.Info, 0), + labels: make(map[string]string), + mounts: make(map[string]mount.MountInfo), dmsetup: devicemapper.NewDmsetupClient(), fsUUIDToDeviceName: fsUUIDToDeviceName, } for _, mount := range mounts { - fsInfo.mounts[mount.Mountpoint] = mount + fsInfo.mounts[mount.MountPoint] = mount } // need to call this before the log line below printing out the partitions, as this function may @@ -160,8 +162,8 @@ func getFsUUIDToDeviceNameMap() (map[string]string, error) { return fsUUIDToDeviceName, nil } -func processMounts(mounts []*mount.Info, excludedMountpointPrefixes []string) map[string]partition { - partitions := make(map[string]partition, 0) +func processMounts(mounts []mount.MountInfo, excludedMountpointPrefixes []string) map[string]partition { + partitions := make(map[string]partition) supportedFsType := map[string]bool{ // all ext systems are checked through prefix. @@ -173,19 +175,19 @@ func processMounts(mounts []*mount.Info, excludedMountpointPrefixes []string) ma } for _, mount := range mounts { - if !strings.HasPrefix(mount.Fstype, "ext") && !supportedFsType[mount.Fstype] { + if !strings.HasPrefix(mount.FsType, "ext") && !supportedFsType[mount.FsType] { continue } // Avoid bind mounts, exclude tmpfs. if _, ok := partitions[mount.Source]; ok { - if mount.Fstype != "tmpfs" { + if mount.FsType != "tmpfs" { continue } } hasPrefix := false for _, prefix := range excludedMountpointPrefixes { - if strings.HasPrefix(mount.Mountpoint, prefix) { + if strings.HasPrefix(mount.MountPoint, prefix) { hasPrefix = true break } @@ -195,13 +197,13 @@ func processMounts(mounts []*mount.Info, excludedMountpointPrefixes []string) ma } // using mountpoint to replace device once fstype it tmpfs - if mount.Fstype == "tmpfs" { - mount.Source = mount.Mountpoint + if mount.FsType == "tmpfs" { + mount.Source = mount.MountPoint } // btrfs fix: following workaround fixes wrong btrfs Major and Minor Ids reported in /proc/self/mountinfo. // instead of using values from /proc/self/mountinfo we use stat to get Ids from btrfs mount point - if mount.Fstype == "btrfs" && mount.Major == 0 && strings.HasPrefix(mount.Source, "/dev/") { - major, minor, err := getBtrfsMajorMinorIds(mount) + if mount.FsType == "btrfs" && mount.Major == 0 && strings.HasPrefix(mount.Source, "/dev/") { + major, minor, err := getBtrfsMajorMinorIds(&mount) if err != nil { klog.Warningf("%s", err) } else { @@ -211,13 +213,13 @@ func processMounts(mounts []*mount.Info, excludedMountpointPrefixes []string) ma } // overlay fix: Making mount source unique for all overlay mounts, using the mount's major and minor ids. - if mount.Fstype == "overlay" { + if mount.FsType == "overlay" { mount.Source = fmt.Sprintf("%s_%d-%d", mount.Source, mount.Major, mount.Minor) } partitions[mount.Source] = partition{ - fsType: mount.Fstype, - mountpoint: mount.Mountpoint, + fsType: mount.FsType, + mountpoint: mount.MountPoint, major: uint(mount.Major), minor: uint(mount.Minor), } @@ -230,17 +232,17 @@ func processMounts(mounts []*mount.Info, excludedMountpointPrefixes []string) ma // docker is using devicemapper for its storage driver. If a loopback device is being used, don't // return any information or error, as we want to report based on the actual partition where the // loopback file resides, inside of the loopback file itself. -func (self *RealFsInfo) getDockerDeviceMapperInfo(context DockerContext) (string, *partition, error) { +func (i *RealFsInfo) getDockerDeviceMapperInfo(context DockerContext) (string, *partition, error) { if context.Driver != DeviceMapper.String() { return "", nil, nil } - dataLoopFile := context.DriverStatus[dockerutil.DriverStatusDataLoopFile] + dataLoopFile := context.DriverStatus[DriverStatusDataLoopFile] if len(dataLoopFile) > 0 { return "", nil, nil } - dev, major, minor, blockSize, err := dockerDMDevice(context.DriverStatus, self.dmsetup) + dev, major, minor, blockSize, err := dockerDMDevice(context.DriverStatus, i.dmsetup) if err != nil { return "", nil, err } @@ -254,49 +256,49 @@ func (self *RealFsInfo) getDockerDeviceMapperInfo(context DockerContext) (string } // addSystemRootLabel attempts to determine which device contains the mount for /. -func (self *RealFsInfo) addSystemRootLabel(mounts []*mount.Info) { +func (i *RealFsInfo) addSystemRootLabel(mounts []mount.MountInfo) { for _, m := range mounts { - if m.Mountpoint == "/" { - self.partitions[m.Source] = partition{ - fsType: m.Fstype, - mountpoint: m.Mountpoint, + if m.MountPoint == "/" { + i.partitions[m.Source] = partition{ + fsType: m.FsType, + mountpoint: m.MountPoint, major: uint(m.Major), minor: uint(m.Minor), } - self.labels[LabelSystemRoot] = m.Source + i.labels[LabelSystemRoot] = m.Source return } } } // addDockerImagesLabel attempts to determine which device contains the mount for docker images. -func (self *RealFsInfo) addDockerImagesLabel(context Context, mounts []*mount.Info) { - dockerDev, dockerPartition, err := self.getDockerDeviceMapperInfo(context.Docker) +func (i *RealFsInfo) addDockerImagesLabel(context Context, mounts []mount.MountInfo) { + dockerDev, dockerPartition, err := i.getDockerDeviceMapperInfo(context.Docker) if err != nil { klog.Warningf("Could not get Docker devicemapper device: %v", err) } if len(dockerDev) > 0 && dockerPartition != nil { - self.partitions[dockerDev] = *dockerPartition - self.labels[LabelDockerImages] = dockerDev + i.partitions[dockerDev] = *dockerPartition + i.labels[LabelDockerImages] = dockerDev } else { - self.updateContainerImagesPath(LabelDockerImages, mounts, getDockerImagePaths(context)) + i.updateContainerImagesPath(LabelDockerImages, mounts, getDockerImagePaths(context)) } } -func (self *RealFsInfo) addCrioImagesLabel(context Context, mounts []*mount.Info) { +func (i *RealFsInfo) addCrioImagesLabel(context Context, mounts []mount.MountInfo) { if context.Crio.Root != "" { crioPath := context.Crio.Root crioImagePaths := map[string]struct{}{ "/": {}, } - for _, dir := range []string{"overlay", "overlay2"} { + for _, dir := range []string{"devicemapper", "btrfs", "aufs", "overlay", "zfs"} { crioImagePaths[path.Join(crioPath, dir+"-images")] = struct{}{} } for crioPath != "/" && crioPath != "." { crioImagePaths[crioPath] = struct{}{} crioPath = filepath.Dir(crioPath) } - self.updateContainerImagesPath(LabelCrioImages, mounts, crioImagePaths) + i.updateContainerImagesPath(LabelCrioImages, mounts, crioImagePaths) } } @@ -322,37 +324,38 @@ func getDockerImagePaths(context Context) map[string]struct{} { // This method compares the mountpoints with possible container image mount points. If a match is found, // the label is added to the partition. -func (self *RealFsInfo) updateContainerImagesPath(label string, mounts []*mount.Info, containerImagePaths map[string]struct{}) { - var useMount *mount.Info +func (i *RealFsInfo) updateContainerImagesPath(label string, mounts []mount.MountInfo, containerImagePaths map[string]struct{}) { + var useMount *mount.MountInfo for _, m := range mounts { - if _, ok := containerImagePaths[m.Mountpoint]; ok { - if useMount == nil || (len(useMount.Mountpoint) < len(m.Mountpoint)) { - useMount = m + if _, ok := containerImagePaths[m.MountPoint]; ok { + if useMount == nil || (len(useMount.MountPoint) < len(m.MountPoint)) { + useMount = new(mount.MountInfo) + *useMount = m } } } if useMount != nil { - self.partitions[useMount.Source] = partition{ - fsType: useMount.Fstype, - mountpoint: useMount.Mountpoint, + i.partitions[useMount.Source] = partition{ + fsType: useMount.FsType, + mountpoint: useMount.MountPoint, major: uint(useMount.Major), minor: uint(useMount.Minor), } - self.labels[label] = useMount.Source + i.labels[label] = useMount.Source } } -func (self *RealFsInfo) GetDeviceForLabel(label string) (string, error) { - dev, ok := self.labels[label] +func (i *RealFsInfo) GetDeviceForLabel(label string) (string, error) { + dev, ok := i.labels[label] if !ok { return "", fmt.Errorf("non-existent label %q", label) } return dev, nil } -func (self *RealFsInfo) GetLabelsForDevice(device string) ([]string, error) { +func (i *RealFsInfo) GetLabelsForDevice(device string) ([]string, error) { labels := []string{} - for label, dev := range self.labels { + for label, dev := range i.labels { if dev == device { labels = append(labels, label) } @@ -360,22 +363,22 @@ func (self *RealFsInfo) GetLabelsForDevice(device string) ([]string, error) { return labels, nil } -func (self *RealFsInfo) GetMountpointForDevice(dev string) (string, error) { - p, ok := self.partitions[dev] +func (i *RealFsInfo) GetMountpointForDevice(dev string) (string, error) { + p, ok := i.partitions[dev] if !ok { return "", fmt.Errorf("no partition info for device %q", dev) } return p.mountpoint, nil } -func (self *RealFsInfo) GetFsInfoForPath(mountSet map[string]struct{}) ([]Fs, error) { +func (i *RealFsInfo) GetFsInfoForPath(mountSet map[string]struct{}) ([]Fs, error) { filesystems := make([]Fs, 0) deviceSet := make(map[string]struct{}) diskStatsMap, err := getDiskStatsMap("/proc/diskstats") if err != nil { return nil, err } - for device, partition := range self.partitions { + for device, partition := range i.partitions { _, hasMount := mountSet[partition.mountpoint] _, hasDevice := deviceSet[device] if mountSet == nil || (hasMount && !hasDevice) { @@ -416,7 +419,17 @@ func (self *RealFsInfo) GetFsInfoForPath(mountSet map[string]struct{}) ([]Fs, er Major: uint(partition.major), Minor: uint(partition.minor), } - fs.DiskStats = diskStatsMap[device] + + if val, ok := diskStatsMap[device]; ok { + fs.DiskStats = val + } else { + for k, v := range diskStatsMap { + if v.MajorNum == uint64(partition.major) && v.MinorNum == uint64(partition.minor) { + fs.DiskStats = diskStatsMap[k] + break + } + } + } filesystems = append(filesystems, fs) } } @@ -448,13 +461,22 @@ func getDiskStatsMap(diskStatsFile string) (map[string]DiskStats, error) { } // 8 50 sdd2 40 0 280 223 7 0 22 108 0 330 330 deviceName := path.Join("/dev", words[2]) + + var error error + devInfo := make([]uint64, 2) + for i := 0; i < len(devInfo); i++ { + devInfo[i], error = strconv.ParseUint(words[i], 10, 64) + if error != nil { + return nil, error + } + } + wordLength := len(words) offset := 3 var stats = make([]uint64, wordLength-offset) if len(stats) < 11 { return nil, fmt.Errorf("could not parse all 11 columns of /proc/diskstats") } - var error error for i := offset; i < wordLength; i++ { stats[i-offset], error = strconv.ParseUint(words[i], 10, 64) if error != nil { @@ -462,6 +484,8 @@ func getDiskStatsMap(diskStatsFile string) (map[string]DiskStats, error) { } } diskStats := DiskStats{ + MajorNum: devInfo[0], + MinorNum: devInfo[1], ReadsCompleted: stats[0], ReadsMerged: stats[1], SectorsRead: stats[2], @@ -479,8 +503,8 @@ func getDiskStatsMap(diskStatsFile string) (map[string]DiskStats, error) { return diskStatsMap, nil } -func (self *RealFsInfo) GetGlobalFsInfo() ([]Fs, error) { - return self.GetFsInfoForPath(nil) +func (i *RealFsInfo) GetGlobalFsInfo() ([]Fs, error) { + return i.GetFsInfoForPath(nil) } func major(devNumber uint64) uint { @@ -491,34 +515,35 @@ func minor(devNumber uint64) uint { return uint((devNumber & 0xff) | ((devNumber >> 12) & 0xfff00)) } -func (self *RealFsInfo) GetDeviceInfoByFsUUID(uuid string) (*DeviceInfo, error) { - deviceName, found := self.fsUUIDToDeviceName[uuid] +func (i *RealFsInfo) GetDeviceInfoByFsUUID(uuid string) (*DeviceInfo, error) { + deviceName, found := i.fsUUIDToDeviceName[uuid] if !found { return nil, ErrNoSuchDevice } - p, found := self.partitions[deviceName] + p, found := i.partitions[deviceName] if !found { return nil, fmt.Errorf("cannot find device %q in partitions", deviceName) } return &DeviceInfo{deviceName, p.major, p.minor}, nil } -func (self *RealFsInfo) GetDirFsDevice(dir string) (*DeviceInfo, error) { +func (i *RealFsInfo) GetDirFsDevice(dir string) (*DeviceInfo, error) { buf := new(syscall.Stat_t) err := syscall.Stat(dir, buf) if err != nil { return nil, fmt.Errorf("stat failed on %s with error: %s", dir, err) } - major := major(buf.Dev) - minor := minor(buf.Dev) - for device, partition := range self.partitions { + // The type Dev in Stat_t is 32bit on mips. + major := major(uint64(buf.Dev)) // nolint: unconvert + minor := minor(uint64(buf.Dev)) // nolint: unconvert + for device, partition := range i.partitions { if partition.major == major && partition.minor == minor { return &DeviceInfo{device, major, minor}, nil } } - mount, found := self.mounts[dir] + mount, found := i.mounts[dir] // try the parent dir if not found until we reach the root dir // this is an issue on btrfs systems where the directory is not // the subvolume @@ -531,11 +556,11 @@ func (self *RealFsInfo) GetDirFsDevice(dir string) (*DeviceInfo, error) { // trim "/" from the new parent path otherwise the next possible // filepath.Split in the loop will not split the string any further dir = strings.TrimSuffix(pathdir, "/") - mount, found = self.mounts[dir] + mount, found = i.mounts[dir] } - if found && mount.Fstype == "btrfs" && mount.Major == 0 && strings.HasPrefix(mount.Source, "/dev/") { - major, minor, err := getBtrfsMajorMinorIds(mount) + if found && mount.FsType == "btrfs" && mount.Major == 0 && strings.HasPrefix(mount.Source, "/dev/") { + major, minor, err := getBtrfsMajorMinorIds(&mount) if err != nil { klog.Warningf("%s", err) } else { @@ -562,7 +587,7 @@ func GetDirUsage(dir string) (UsageInfo, error) { return usage, fmt.Errorf("unsuported fileinfo for getting inode usage of %q", dir) } - rootDevId := rootStat.Dev + rootDevID := rootStat.Dev // dedupedInode stores inodes that could be duplicates (nlink > 1) dedupedInodes := make(map[uint64]struct{}) @@ -586,7 +611,7 @@ func GetDirUsage(dir string) (UsageInfo, error) { return fmt.Errorf("unsupported fileinfo; could not convert to stat_t") } - if s.Dev != rootDevId { + if s.Dev != rootDevID { // don't descend into directories on other devices return filepath.SkipDir } @@ -605,10 +630,10 @@ func GetDirUsage(dir string) (UsageInfo, error) { return nil }) - return usage, nil + return usage, err } -func (self *RealFsInfo) GetDirUsage(dir string) (UsageInfo, error) { +func (i *RealFsInfo) GetDirUsage(dir string) (UsageInfo, error) { claimToken() defer releaseToken() return GetDirUsage(dir) @@ -630,7 +655,7 @@ func getVfsStats(path string) (total uint64, free uint64, avail uint64, inodes u // Devicemapper thin provisioning is detailed at // https://www.kernel.org/doc/Documentation/device-mapper/thin-provisioning.txt func dockerDMDevice(driverStatus map[string]string, dmsetup devicemapper.DmsetupClient) (string, uint, uint, uint, error) { - poolName, ok := driverStatus[dockerutil.DriverStatusPoolName] + poolName, ok := driverStatus[DriverStatusPoolName] if !ok || len(poolName) == 0 { return "", 0, 0, 0, fmt.Errorf("Could not get dm pool name") } @@ -724,16 +749,8 @@ func getZfstats(poolName string) (uint64, uint64, uint64, error) { return total, dataset.Avail, dataset.Avail, nil } -// Simple io.Writer implementation that counts how many bytes were written. -type byteCounter struct{ bytesWritten uint64 } - -func (b *byteCounter) Write(p []byte) (int, error) { - b.bytesWritten += uint64(len(p)) - return len(p), nil -} - // Get major and minor Ids for a mount point using btrfs as filesystem. -func getBtrfsMajorMinorIds(mount *mount.Info) (int, int, error) { +func getBtrfsMajorMinorIds(mount *mount.MountInfo) (int, int, error) { // btrfs fix: following workaround fixes wrong btrfs Major and Minor Ids reported in /proc/self/mountinfo. // instead of using values from /proc/self/mountinfo we use stat to get Ids from btrfs mount point @@ -746,17 +763,17 @@ func getBtrfsMajorMinorIds(mount *mount.Info) (int, int, error) { klog.V(4).Infof("btrfs mount %#v", mount) if buf.Mode&syscall.S_IFMT == syscall.S_IFBLK { - err := syscall.Stat(mount.Mountpoint, buf) + err := syscall.Stat(mount.MountPoint, buf) if err != nil { - err = fmt.Errorf("stat failed on %s with error: %s", mount.Mountpoint, err) + err = fmt.Errorf("stat failed on %s with error: %s", mount.MountPoint, err) return 0, 0, err } - klog.V(4).Infof("btrfs dev major:minor %d:%d\n", int(major(buf.Dev)), int(minor(buf.Dev))) - klog.V(4).Infof("btrfs rdev major:minor %d:%d\n", int(major(buf.Rdev)), int(minor(buf.Rdev))) + // The type Dev and Rdev in Stat_t are 32bit on mips. + klog.V(4).Infof("btrfs dev major:minor %d:%d\n", int(major(uint64(buf.Dev))), int(minor(uint64(buf.Dev)))) // nolint: unconvert + klog.V(4).Infof("btrfs rdev major:minor %d:%d\n", int(major(uint64(buf.Rdev))), int(minor(uint64(buf.Rdev)))) // nolint: unconvert - return int(major(buf.Dev)), int(minor(buf.Dev)), nil - } else { - return 0, 0, fmt.Errorf("%s is not a block device", mount.Source) + return int(major(uint64(buf.Dev))), int(minor(uint64(buf.Dev))), nil // nolint: unconvert } + return 0, 0, fmt.Errorf("%s is not a block device", mount.Source) } diff --git a/vendor/github.com/google/cadvisor/fs/types.go b/vendor/github.com/google/cadvisor/fs/types.go index 22ecd377210..93294ebcc27 100644 --- a/vendor/github.com/google/cadvisor/fs/types.go +++ b/vendor/github.com/google/cadvisor/fs/types.go @@ -64,6 +64,8 @@ type Fs struct { } type DiskStats struct { + MajorNum uint64 + MinorNum uint64 ReadsCompleted uint64 ReadsMerged uint64 SectorsRead uint64 diff --git a/vendor/github.com/google/cadvisor/info/v1/container.go b/vendor/github.com/google/cadvisor/info/v1/container.go index 056de8d6778..46ac70502be 100644 --- a/vendor/github.com/google/cadvisor/info/v1/container.go +++ b/vendor/github.com/google/cadvisor/info/v1/container.go @@ -60,6 +60,8 @@ type ContainerSpec struct { HasMemory bool `json:"has_memory"` Memory MemorySpec `json:"memory,omitempty"` + HasHugetlb bool `json:"has_hugetlb"` + HasNetwork bool `json:"has_network"` HasProcesses bool `json:"has_processes"` @@ -97,9 +99,9 @@ type ContainerReference struct { // Sorts by container name. type ContainerReferenceSlice []ContainerReference -func (self ContainerReferenceSlice) Len() int { return len(self) } -func (self ContainerReferenceSlice) Swap(i, j int) { self[i], self[j] = self[j], self[i] } -func (self ContainerReferenceSlice) Less(i, j int) bool { return self[i].Name < self[j].Name } +func (s ContainerReferenceSlice) Len() int { return len(s) } +func (s ContainerReferenceSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s ContainerReferenceSlice) Less(i, j int) bool { return s[i].Name < s[j].Name } // ContainerInfoRequest is used when users check a container info from the REST API. // It specifies how much data users want to get about a container @@ -124,10 +126,10 @@ func DefaultContainerInfoRequest() ContainerInfoRequest { } } -func (self *ContainerInfoRequest) Equals(other ContainerInfoRequest) bool { - return self.NumStats == other.NumStats && - self.Start.Equal(other.Start) && - self.End.Equal(other.End) +func (r *ContainerInfoRequest) Equals(other ContainerInfoRequest) bool { + return r.NumStats == other.NumStats && + r.Start.Equal(other.Start) && + r.End.Equal(other.End) } type ContainerInfo struct { @@ -149,30 +151,30 @@ type ContainerInfo struct { // en/decoded. This will lead to small but acceptable differences between a // ContainerInfo and its encode-then-decode version. Eq() is used to compare // two ContainerInfo accepting small difference (<10ms) of Time fields. -func (self *ContainerInfo) Eq(b *ContainerInfo) bool { +func (ci *ContainerInfo) Eq(b *ContainerInfo) bool { - // If both self and b are nil, then Eq() returns true - if self == nil { + // If both ci and b are nil, then Eq() returns true + if ci == nil { return b == nil } if b == nil { - return self == nil + return ci == nil } // For fields other than time.Time, we will compare them precisely. // This would require that any slice should have same order. - if !reflect.DeepEqual(self.ContainerReference, b.ContainerReference) { + if !reflect.DeepEqual(ci.ContainerReference, b.ContainerReference) { return false } - if !reflect.DeepEqual(self.Subcontainers, b.Subcontainers) { + if !reflect.DeepEqual(ci.Subcontainers, b.Subcontainers) { return false } - if !self.Spec.Eq(&b.Spec) { + if !ci.Spec.Eq(&b.Spec) { return false } for i, expectedStats := range b.Stats { - selfStats := self.Stats[i] + selfStats := ci.Stats[i] if !expectedStats.Eq(selfStats) { return false } @@ -181,57 +183,66 @@ func (self *ContainerInfo) Eq(b *ContainerInfo) bool { return true } -func (self *ContainerSpec) Eq(b *ContainerSpec) bool { +func (s *ContainerSpec) Eq(b *ContainerSpec) bool { // Creation within 1s of each other. - diff := self.CreationTime.Sub(b.CreationTime) + diff := s.CreationTime.Sub(b.CreationTime) if (diff > time.Second) || (diff < -time.Second) { return false } - if self.HasCpu != b.HasCpu { + if s.HasCpu != b.HasCpu { return false } - if !reflect.DeepEqual(self.Cpu, b.Cpu) { + if !reflect.DeepEqual(s.Cpu, b.Cpu) { return false } - if self.HasMemory != b.HasMemory { + if s.HasMemory != b.HasMemory { return false } - if !reflect.DeepEqual(self.Memory, b.Memory) { + if !reflect.DeepEqual(s.Memory, b.Memory) { return false } - if self.HasNetwork != b.HasNetwork { + if s.HasHugetlb != b.HasHugetlb { return false } - if self.HasFilesystem != b.HasFilesystem { + if s.HasNetwork != b.HasNetwork { return false } - if self.HasDiskIo != b.HasDiskIo { + if s.HasProcesses != b.HasProcesses { return false } - if self.HasCustomMetrics != b.HasCustomMetrics { + if s.HasFilesystem != b.HasFilesystem { + return false + } + if s.HasDiskIo != b.HasDiskIo { + return false + } + if s.HasCustomMetrics != b.HasCustomMetrics { + return false + } + if s.Image != b.Image { return false } return true } -func (self *ContainerInfo) StatsAfter(ref time.Time) []*ContainerStats { - n := len(self.Stats) + 1 - for i, s := range self.Stats { +func (ci *ContainerInfo) StatsAfter(ref time.Time) []*ContainerStats { + n := len(ci.Stats) + 1 + for i, s := range ci.Stats { if s.Timestamp.After(ref) { n = i break } } - if n > len(self.Stats) { + if n > len(ci.Stats) { return nil } - return self.Stats[n:] + return ci.Stats[n:] } -func (self *ContainerInfo) StatsStartTime() time.Time { +func (ci *ContainerInfo) StatsStartTime() time.Time { var ret time.Time - for _, s := range self.Stats { + for _, s := range ci.Stats { if s.Timestamp.Before(ret) || ret.IsZero() { ret = s.Timestamp } @@ -239,10 +250,10 @@ func (self *ContainerInfo) StatsStartTime() time.Time { return ret } -func (self *ContainerInfo) StatsEndTime() time.Time { +func (ci *ContainerInfo) StatsEndTime() time.Time { var ret time.Time - for i := len(self.Stats) - 1; i >= 0; i-- { - s := self.Stats[i] + for i := len(ci.Stats) - 1; i >= 0; i-- { + s := ci.Stats[i] if s.Timestamp.After(ret) { ret = s.Timestamp } @@ -342,6 +353,15 @@ type DiskIoStats struct { IoTime []PerDiskStats `json:"io_time,omitempty"` } +type HugetlbStats struct { + // current res_counter usage for hugetlb + Usage uint64 `json:"usage,omitempty"` + // maximum usage ever recorded. + MaxUsage uint64 `json:"max_usage,omitempty"` + // number of times hugetlb usage allocation failure. + Failcnt uint64 `json:"failcnt"` +} + type MemoryStats struct { // Current memory usage, this includes all memory regardless of when it was // accessed. @@ -416,6 +436,8 @@ type NetworkStats struct { Udp UdpStat `json:"udp"` // UDP6 connection stats Udp6 UdpStat `json:"udp6"` + // TCP advanced stats + TcpAdvanced TcpAdvancedStat `json:"tcp_advanced"` } type TcpStat struct { @@ -443,6 +465,245 @@ type TcpStat struct { Closing uint64 } +type TcpAdvancedStat struct { + // The algorithm used to determine the timeout value used for + // retransmitting unacknowledged octets, ref: RFC2698, default 1 + RtoAlgorithm uint64 + // The minimum value permitted by a TCP implementation for the + // retransmission timeout, measured in milliseconds, default 200ms + RtoMin uint64 + // The maximum value permitted by a TCP implementation for the + // retransmission timeout, measured in milliseconds, default 120s + RtoMax uint64 + // The limit on the total number of TCP connections the entity + // can support., default -1, i.e. infinity + MaxConn int64 + + // The number of times TCP connections have made a direct + // transition to the SYN-SENT state from the CLOSED state. + ActiveOpens uint64 + // The number of times TCP connections have made a direct + // transition to the SYN-RCVD state from the LISTEN state. + PassiveOpens uint64 + // The number of times TCP connections have made a direct + // transition to the CLOSED state from either the SYN-SENT + // state or the SYN-RCVD state, plus the number of times TCP + // connections have made a direct transition to the LISTEN + // state from the SYN-RCVD state. + AttemptFails uint64 + // The number of times TCP connections have made a direct + // transition to the CLOSED state from either the ESTABLISHED + // state or the CLOSE-WAIT state. + EstabResets uint64 + // The number of TCP connections for which the current state + // is either ESTABLISHED or CLOSE- WAIT. + CurrEstab uint64 + + // The total number of segments received, including those + // received in error. + InSegs uint64 + // The total number of segments sent, including those on + // current connections but excluding those containing only + // retransmitted octets. + OutSegs uint64 + // The total number of segments retransmitted - that is, the + // number of TCP segments transmitted containing one or more + // previously transmitted octets. + RetransSegs uint64 + // The total number of segments received in error (e.g., bad + // TCP checksums). + InErrs uint64 + // The number of TCP segments sent containing the RST flag. + OutRsts uint64 + // The number of IP Packets with checksum errors + InCsumErrors uint64 + // The number of resets received for embryonic SYN_RECV sockets + EmbryonicRsts uint64 + + // The number of SYN cookies sent + SyncookiesSent uint64 + // The number of SYN cookies received + SyncookiesRecv uint64 + // The number of invalid SYN cookies received + SyncookiesFailed uint64 + + // The number of packets pruned from receive queue because of socket buffer overrun + PruneCalled uint64 + // The number of packets pruned from receive queue + RcvPruned uint64 + // The number of packets dropped from out-of-order queue because of socket buffer overrun + OfoPruned uint64 + // The number of ICMP packets dropped because they were out-of-window + OutOfWindowIcmps uint64 + // The number of ICMP packets dropped because socket was locked + LockDroppedIcmps uint64 + + // The number of TCP sockets finished time wait in fast timer + TW uint64 + // The number of time wait sockets recycled by time stamp + TWRecycled uint64 + // The number of TCP sockets finished time wait in slow timer + TWKilled uint64 + // counter, if no more mem for TIME-WAIT struct, +1 + TCPTimeWaitOverflow uint64 + + // The number of RTO timer first timeout times + TCPTimeouts uint64 + // The number of fake timeouts detected by F-RTO + TCPSpuriousRTOs uint64 + // The number of send Tail Loss Probe (TLP) times by Probe Timeout(PTO) + TCPLossProbes uint64 + // The number of recovery times by TLP + TCPLossProbeRecovery uint64 + // The number of RTO failed times when in Recovery state, and remote end has no sack + TCPRenoRecoveryFail uint64 + // The number of RTO failed times when in Recovery state, and remote end has sack + TCPSackRecoveryFail uint64 + // The number of RTO failed times when in TCP_CA_Disorder state, and remote end has no sack + TCPRenoFailures uint64 + // The number of RTO failed times when in TCP_CA_Disorder state, and remote end has sack + TCPSackFailures uint64 + // The number of RTO failed times when in TCP_CA_Loss state, + TCPLossFailures uint64 + + // The number of delayed acks sent + DelayedACKs uint64 + // The number of delayed acks further delayed because of locked socket + DelayedACKLocked uint64 + // The number of quick ack mode was activated times + DelayedACKLost uint64 + // The number of times the listen queue of a socket overflowed + ListenOverflows uint64 + // The number of SYNs to LISTEN sockets dropped + ListenDrops uint64 + // The number of packet headers predicted + TCPHPHits uint64 + // The number of acknowledgments not containing data payload received + TCPPureAcks uint64 + // The number of predicted acknowledgments + TCPHPAcks uint64 + // The number of times recovered from packet loss due to fast retransmit + TCPRenoRecovery uint64 + // The number of SACK retransmits failed + TCPSackRecovery uint64 + // The number of bad SACK blocks received + TCPSACKReneging uint64 + // The number of detected reordering times using FACK + TCPFACKReorder uint64 + // The number of detected reordering times using SACK + TCPSACKReorder uint64 + // The number of detected reordering times using Reno + TCPRenoReorder uint64 + // The number of detected reordering times using time stamp + TCPTSReorder uint64 + // The number of congestion windows fully recovered without slow start + TCPFullUndo uint64 + // The number of congestion windows partially recovered using Hoe heuristic + TCPPartialUndo uint64 + // The number of congestion windows recovered without slow start by DSACK + TCPDSACKUndo uint64 + // The number of congestion windows recovered without slow start after partial ack + TCPLossUndo uint64 + + // The number of fast retransmits + TCPFastRetrans uint64 + // The number of retransmits in slow start + TCPSlowStartRetrans uint64 + // The number of retransmits lost + TCPLostRetransmit uint64 + // The number of retransmits failed, including FastRetrans, SlowStartRetrans + TCPRetransFail uint64 + + // he number of packets collapsed in receive queue due to low socket buffer + TCPRcvCollapsed uint64 + // The number of DSACKs sent for old packets + TCPDSACKOldSent uint64 + // The number of DSACKs sent for out of order packets + TCPDSACKOfoSent uint64 + // The number of DSACKs received + TCPDSACKRecv uint64 + // The number of DSACKs for out of order packets received + TCPDSACKOfoRecv uint64 + // The number of connections reset due to unexpected data + TCPAbortOnData uint64 + // The number of connections reset due to early user close + TCPAbortOnClose uint64 + // The number of connections aborted due to memory pressure + TCPAbortOnMemory uint64 + // The number of connections aborted due to timeout + TCPAbortOnTimeout uint64 + // The number of connections aborted after user close in linger timeout + TCPAbortOnLinger uint64 + // The number of times unable to send RST due to no memory + TCPAbortFailed uint64 + // The number of TCP ran low on memory times + TCPMemoryPressures uint64 + // The number of TCP cumulative duration of + // memory pressure events, by ms + TCPMemoryPressuresChrono uint64 + // The number of SACKs discard + TCPSACKDiscard uint64 + // The number of DSACKs ignore old + TCPDSACKIgnoredOld uint64 + // The number of DSACKs ignore no undo + TCPDSACKIgnoredNoUndo uint64 + + // The number of MD5 not found + TCPMD5NotFound uint64 + // The number of MD5 unexpected + TCPMD5Unexpected uint64 + // The number of MD5 failed + TCPMD5Failure uint64 + // The number of Sack shifted + TCPSackShifted uint64 + // The number of Sack merged + TCPSackMerged uint64 + // The number of Sack shift fall back + TCPSackShiftFallback uint64 + // The number of Backlog drop + TCPBacklogDrop uint64 + // The number of PFmemalloc drop + PFMemallocDrop uint64 + // The number of memalloc drop + TCPMinTTLDrop uint64 + // The number of DeferAccept drop + TCPDeferAcceptDrop uint64 + // The number of IP reverse path filter + IPReversePathFilter uint64 + + // The number of request full do cookies + TCPReqQFullDoCookies uint64 + // The number of request full drop + TCPReqQFullDrop uint64 + + // number of successful outbound TFO connections + TCPFastOpenActive uint64 + // number of SYN-ACK packets received that did not acknowledge data + // sent in the SYN packet and caused a retransmissions without SYN data. + TCPFastOpenActiveFail uint64 + // number of successful inbound TFO connections + TCPFastOpenPassive uint64 + // number of inbound SYN packets with TFO cookie that was invalid + TCPFastOpenPassiveFail uint64 + // number of inbound SYN packets that will have TFO disabled because + // the socket has exceeded the max queue length + TCPFastOpenListenOverflow uint64 + // number of inbound SYN packets requesting TFO with TFO set but no cookie + TCPFastOpenCookieReqd uint64 + + // number of SYN and SYN/ACK retransmits to break down retransmissions + // into SYN, fast-retransmits, timeout retransmits, etc. + TCPSynRetrans uint64 + // number of outgoing packets with original data + // (excluding retransmission but including data-in-SYN). + TCPOrigDataSent uint64 + + // The number of active connections rejected because of time stamp + PAWSActive uint64 + // The number of packetes rejected in established connections because of timestamp + PAWSEstab uint64 +} + type UdpStat struct { // Count of UDP sockets in state "Listen" Listen uint64 @@ -564,6 +825,87 @@ type AcceleratorStats struct { DutyCycle uint64 `json:"duty_cycle"` } +// PerfStat represents value of a single monitored perf event. +type PerfStat struct { + // Indicates scaling ratio for an event: time_running/time_enabled + // (amount of time that event was being measured divided by + // amount of time that event was enabled for). + // value 1.0 indicates that no multiplexing occurred. Value close + // to 0 indicates that event was measured for short time and event's + // value might be inaccurate. + // See: https://lwn.net/Articles/324756/ + ScalingRatio float64 `json:"scaling_ratio"` + + // Value represents value of perf event retrieved from OS. It is + // normalized against ScalingRatio and takes multiplexing into + // consideration. + Value uint64 `json:"value"` + + // Name is human readable name of an event. + Name string `json:"name"` + + // CPU that perf event was measured on. + Cpu int `json:"cpu"` +} + +// MemoryBandwidthStats corresponds to MBM (Memory Bandwidth Monitoring). +// See: https://01.org/cache-monitoring-technology +// See: https://www.kernel.org/doc/Documentation/x86/intel_rdt_ui.txt +type MemoryBandwidthStats struct { + // The 'mbm_total_bytes'. + TotalBytes uint64 `json:"mbm_total_bytes,omitempty"` + + // The 'mbm_local_bytes'. + LocalBytes uint64 `json:"mbm_local_bytes,omitempty"` +} + +// CacheStats corresponds to CMT (Cache Monitoring Technology). +// See: https://01.org/cache-monitoring-technology +// See: https://www.kernel.org/doc/Documentation/x86/intel_rdt_ui.txt +type CacheStats struct { + // The 'llc_occupancy'. + LLCOccupancy uint64 `json:"llc_occupancy,omitempty"` +} + +// ResctrlStats corresponds to statistics from Resource Control. +type ResctrlStats struct { + // Each NUMA Node statistics corresponds to one element in the array. + MemoryBandwidth []MemoryBandwidthStats `json:"memory_bandwidth,omitempty"` + Cache []CacheStats `json:"cache,omitempty"` +} + +// PerfUncoreStat represents value of a single monitored perf uncore event. +type PerfUncoreStat struct { + // Indicates scaling ratio for an event: time_running/time_enabled + // (amount of time that event was being measured divided by + // amount of time that event was enabled for). + // value 1.0 indicates that no multiplexing occurred. Value close + // to 0 indicates that event was measured for short time and event's + // value might be inaccurate. + // See: https://lwn.net/Articles/324756/ + ScalingRatio float64 `json:"scaling_ratio"` + + // Value represents value of perf event retrieved from OS. It is + // normalized against ScalingRatio and takes multiplexing into + // consideration. + Value uint64 `json:"value"` + + // Name is human readable name of an event. + Name string `json:"name"` + + // Socket that perf event was measured on. + Socket int `json:"socket"` + + // PMU is Performance Monitoring Unit which collected these stats. + PMU string `json:"pmu"` +} + +type UlimitSpec struct { + Name string `json:"name"` + SoftLimit int64 `json:"soft_limit"` + HardLimit int64 `json:"hard_limit"` +} + type ProcessStats struct { // Number of processes ProcessCount uint64 `json:"process_count"` @@ -579,16 +921,19 @@ type ProcessStats struct { // Maxium number of threads allowed in container ThreadsMax uint64 `json:"threads_max,omitempty"` + + // Ulimits for the top-level container process + Ulimits []UlimitSpec `json:"ulimits,omitempty"` } type ContainerStats struct { // The time of this stat point. - Timestamp time.Time `json:"timestamp"` - Cpu CpuStats `json:"cpu,omitempty"` - DiskIo DiskIoStats `json:"diskio,omitempty"` - Memory MemoryStats `json:"memory,omitempty"` - Network NetworkStats `json:"network,omitempty"` - + Timestamp time.Time `json:"timestamp"` + Cpu CpuStats `json:"cpu,omitempty"` + DiskIo DiskIoStats `json:"diskio,omitempty"` + Memory MemoryStats `json:"memory,omitempty"` + Hugetlb map[string]HugetlbStats `json:"hugetlb,omitempty"` + Network NetworkStats `json:"network,omitempty"` // Filesystem statistics Filesystem []FsStats `json:"filesystem,omitempty"` @@ -603,6 +948,19 @@ type ContainerStats struct { // Custom metrics from all collectors CustomMetrics map[string][]MetricVal `json:"custom_metrics,omitempty"` + + // Statistics originating from perf events + PerfStats []PerfStat `json:"perf_stats,omitempty"` + + // Statistics originating from perf uncore events. + // Applies only for root container. + PerfUncoreStats []PerfUncoreStat `json:"perf_uncore_stats,omitempty"` + + // Referenced memory + ReferencedMemory uint64 `json:"referenced_memory,omitempty"` + + // Resource Control (resctrl) statistics + Resctrl ResctrlStats `json:"resctrl,omitempty"` } func timeEq(t1, t2 time.Time, tolerance time.Duration) bool { @@ -611,10 +969,7 @@ func timeEq(t1, t2 time.Time, tolerance time.Duration) bool { t1, t2 = t2, t1 } diff := t2.Sub(t1) - if diff <= tolerance { - return true - } - return false + return diff <= tolerance } const ( @@ -640,6 +995,9 @@ func (a *ContainerStats) StatsEq(b *ContainerStats) bool { if !reflect.DeepEqual(a.Memory, b.Memory) { return false } + if !reflect.DeepEqual(a.Hugetlb, b.Hugetlb) { + return false + } if !reflect.DeepEqual(a.DiskIo, b.DiskIo) { return false } @@ -652,6 +1010,15 @@ func (a *ContainerStats) StatsEq(b *ContainerStats) bool { if !reflect.DeepEqual(a.Filesystem, b.Filesystem) { return false } + if !reflect.DeepEqual(a.TaskStats, b.TaskStats) { + return false + } + if !reflect.DeepEqual(a.Accelerators, b.Accelerators) { + return false + } + if !reflect.DeepEqual(a.CustomMetrics, b.CustomMetrics) { + return false + } return true } @@ -679,9 +1046,9 @@ type EventType string const ( EventOom EventType = "oom" - EventOomKill = "oomKill" - EventContainerCreation = "containerCreation" - EventContainerDeletion = "containerDeletion" + EventOomKill EventType = "oomKill" + EventContainerCreation EventType = "containerCreation" + EventContainerDeletion EventType = "containerDeletion" ) // Extra information about an event. Only one type will be set. diff --git a/vendor/github.com/google/cadvisor/info/v1/machine.go b/vendor/github.com/google/cadvisor/info/v1/machine.go index 959f65e7644..22c9ff8c29e 100644 --- a/vendor/github.com/google/cadvisor/info/v1/machine.go +++ b/vendor/github.com/google/cadvisor/info/v1/machine.go @@ -14,6 +14,8 @@ package v1 +import "time" + type FsInfo struct { // Block device associated with the filesystem. Device string `json:"device"` @@ -45,9 +47,10 @@ type Node struct { } type Core struct { - Id int `json:"core_id"` - Threads []int `json:"thread_ids"` - Caches []Cache `json:"caches"` + Id int `json:"core_id"` + Threads []int `json:"thread_ids"` + Caches []Cache `json:"caches"` + SocketID int `json:"socket_id"` } type Cache struct { @@ -59,8 +62,8 @@ type Cache struct { Level int `json:"level"` } -func (self *Node) FindCore(id int) (bool, int) { - for i, n := range self.Cores { +func (n *Node) FindCore(id int) (bool, int) { + for i, n := range n.Cores { if n.Id == id { return true, i } @@ -68,30 +71,43 @@ func (self *Node) FindCore(id int) (bool, int) { return false, -1 } -func (self *Node) AddThread(thread int, core int) { +// FindCoreByThread returns bool if found Core with same thread as provided and it's index in Node Core array. +// If it's not found, returns false and -1. +func (n *Node) FindCoreByThread(thread int) (bool, int) { + for i, n := range n.Cores { + for _, t := range n.Threads { + if t == thread { + return true, i + } + } + } + return false, -1 +} + +func (n *Node) AddThread(thread int, core int) { var coreIdx int if core == -1 { // Assume one hyperthread per core when topology data is missing. core = thread } - ok, coreIdx := self.FindCore(core) + ok, coreIdx := n.FindCore(core) if !ok { // New core core := Core{Id: core} - self.Cores = append(self.Cores, core) - coreIdx = len(self.Cores) - 1 + n.Cores = append(n.Cores, core) + coreIdx = len(n.Cores) - 1 } - self.Cores[coreIdx].Threads = append(self.Cores[coreIdx].Threads, thread) + n.Cores[coreIdx].Threads = append(n.Cores[coreIdx].Threads, thread) } -func (self *Node) AddNodeCache(c Cache) { - self.Caches = append(self.Caches, c) +func (n *Node) AddNodeCache(c Cache) { + n.Caches = append(n.Caches, c) } -func (self *Node) AddPerCoreCache(c Cache) { - for idx := range self.Cores { - self.Cores[idx].Caches = append(self.Cores[idx].Caches, c) +func (n *Node) AddPerCoreCache(c Cache) { + for idx := range n.Cores { + n.Cores[idx].Caches = append(n.Cores[idx].Caches, c) } } @@ -138,17 +154,15 @@ type CloudProvider string const ( GCE CloudProvider = "GCE" - AWS = "AWS" - Azure = "Azure" - Baremetal = "Baremetal" - UnknownProvider = "Unknown" + AWS CloudProvider = "AWS" + Azure CloudProvider = "Azure" + UnknownProvider CloudProvider = "Unknown" ) type InstanceType string const ( - NoInstance InstanceType = "None" - UnknownInstance = "Unknown" + UnknownInstance = "Unknown" ) type InstanceID string @@ -158,15 +172,29 @@ const ( ) type MachineInfo struct { + // The time of this information point. + Timestamp time.Time `json:"timestamp"` + // The number of cores in this machine. NumCores int `json:"num_cores"` + // The number of physical cores in this machine. + NumPhysicalCores int `json:"num_physical_cores"` + + // The number of cpu sockets in this machine. + NumSockets int `json:"num_sockets"` + // Maximum clock speed for the cores, in KHz. CpuFrequency uint64 `json:"cpu_frequency_khz"` // The amount of memory (in bytes) in this machine MemoryCapacity uint64 `json:"memory_capacity"` + // Memory capacity and number of DIMMs by memory type + MemoryByType map[string]*MemoryInfo `json:"memory_by_type"` + + NVMInfo NVMInfo `json:"nvm"` + // HugePages on this machine. HugePages []HugePagesInfo `json:"hugepages"` @@ -202,6 +230,64 @@ type MachineInfo struct { InstanceID InstanceID `json:"instance_id"` } +func (m *MachineInfo) Clone() *MachineInfo { + memoryByType := m.MemoryByType + if len(m.MemoryByType) > 0 { + memoryByType = make(map[string]*MemoryInfo) + for memoryType, memoryInfo := range m.MemoryByType { + memoryByType[memoryType] = memoryInfo + } + } + diskMap := m.DiskMap + if len(m.DiskMap) > 0 { + diskMap = make(map[string]DiskInfo) + for k, info := range m.DiskMap { + diskMap[k] = info + } + } + copy := MachineInfo{ + Timestamp: m.Timestamp, + NumCores: m.NumCores, + NumPhysicalCores: m.NumPhysicalCores, + NumSockets: m.NumSockets, + CpuFrequency: m.CpuFrequency, + MemoryCapacity: m.MemoryCapacity, + MemoryByType: memoryByType, + NVMInfo: m.NVMInfo, + HugePages: m.HugePages, + MachineID: m.MachineID, + SystemUUID: m.SystemUUID, + BootID: m.BootID, + Filesystems: m.Filesystems, + DiskMap: diskMap, + NetworkDevices: m.NetworkDevices, + Topology: m.Topology, + CloudProvider: m.CloudProvider, + InstanceType: m.InstanceType, + InstanceID: m.InstanceID, + } + return © +} + +type MemoryInfo struct { + // The amount of memory (in bytes). + Capacity uint64 `json:"capacity"` + + // Number of memory DIMMs. + DimmCount uint `json:"dimm_count"` +} + +type NVMInfo struct { + // The total NVM capacity in bytes for memory mode. + MemoryModeCapacity uint64 `json:"memory_mode_capacity"` + + //The total NVM capacity in bytes for app direct mode. + AppDirectModeCapacity uint64 `json:"app direct_mode_capacity"` + + // Average power budget in watts for NVM devices configured in BIOS. + AvgPowerBudget uint `json:"avg_power_budget"` +} + type VersionInfo struct { // Kernel version. KernelVersion string `json:"kernel_version"` diff --git a/vendor/github.com/google/cadvisor/info/v1/metric.go b/vendor/github.com/google/cadvisor/info/v1/metric.go index 30c23ed1ca8..86e6b467ab4 100644 --- a/vendor/github.com/google/cadvisor/info/v1/metric.go +++ b/vendor/github.com/google/cadvisor/info/v1/metric.go @@ -27,9 +27,6 @@ const ( // A counter-like value that is only expected to increase. MetricCumulative MetricType = "cumulative" - - // Rate over a time period. - MetricDelta MetricType = "delta" ) // DataType for metric being exported. @@ -68,7 +65,8 @@ type MetricValBasic struct { // An exported metric. type MetricVal struct { // Label associated with a metric - Label string `json:"label,omitempty"` + Label string `json:"label,omitempty"` + Labels map[string]string `json:"labels,omitempty"` // Time at which the metric was queried Timestamp time.Time `json:"timestamp"` diff --git a/vendor/github.com/google/cadvisor/info/v2/container.go b/vendor/github.com/google/cadvisor/info/v2/container.go index 43a8c8793af..a80fb5598d6 100644 --- a/vendor/github.com/google/cadvisor/info/v2/container.go +++ b/vendor/github.com/google/cadvisor/info/v2/container.go @@ -19,7 +19,7 @@ import ( // TODO(rjnagal): Remove dependency after moving all stats structs from v1. // using v1 now for easy conversion. - "github.com/google/cadvisor/info/v1" + v1 "github.com/google/cadvisor/info/v1" ) const ( @@ -87,6 +87,8 @@ type ContainerSpec struct { HasMemory bool `json:"has_memory"` Memory MemorySpec `json:"memory,omitempty"` + HasHugetlb bool `json:"has_hugetlb"` + HasCustomMetrics bool `json:"has_custom_metrics"` CustomMetrics []v1.MetricSpec `json:"custom_metrics,omitempty"` @@ -117,6 +119,9 @@ type DeprecatedContainerStats struct { // Memory statistics HasMemory bool `json:"has_memory"` Memory v1.MemoryStats `json:"memory,omitempty"` + // Hugepage statistics + HasHugetlb bool `json:"has_hugetlb"` + Hugetlb map[string]v1.HugetlbStats `json:"hugetlb,omitempty"` // Network statistics HasNetwork bool `json:"has_network"` Network NetworkStats `json:"network,omitempty"` @@ -132,6 +137,15 @@ type DeprecatedContainerStats struct { // Custom Metrics HasCustomMetrics bool `json:"has_custom_metrics"` CustomMetrics map[string][]v1.MetricVal `json:"custom_metrics,omitempty"` + // Perf events counters + PerfStats []v1.PerfStat `json:"perf_stats,omitempty"` + // Statistics originating from perf uncore events. + // Applies only for root container. + PerfUncoreStats []v1.PerfUncoreStat `json:"perf_uncore_stats,omitempty"` + // Referenced memory + ReferencedMemory uint64 `json:"referenced_memory,omitempty"` + // Resource Control (resctrl) statistics + Resctrl v1.ResctrlStats `json:"resctrl,omitempty"` } type ContainerStats struct { @@ -146,6 +160,8 @@ type ContainerStats struct { DiskIo *v1.DiskIoStats `json:"diskio,omitempty"` // Memory statistics Memory *v1.MemoryStats `json:"memory,omitempty"` + // Hugepage statistics + Hugetlb *map[string]v1.HugetlbStats `json:"hugetlb,omitempty"` // Network statistics Network *NetworkStats `json:"network,omitempty"` // Processes statistics @@ -158,6 +174,15 @@ type ContainerStats struct { Accelerators []v1.AcceleratorStats `json:"accelerators,omitempty"` // Custom Metrics CustomMetrics map[string][]v1.MetricVal `json:"custom_metrics,omitempty"` + // Perf events counters + PerfStats []v1.PerfStat `json:"perf_stats,omitempty"` + // Statistics originating from perf uncore events. + // Applies only for root container. + PerfUncoreStats []v1.PerfUncoreStat `json:"perf_uncore_stats,omitempty"` + // Referenced memory + ReferencedMemory uint64 `json:"referenced_memory,omitempty"` + // Resource Control (resctrl) statistics + Resctrl v1.ResctrlStats `json:"resctrl,omitempty"` } type Percentiles struct { @@ -263,6 +288,7 @@ type ProcessInfo struct { CgroupPath string `json:"cgroup_path"` Cmd string `json:"cmd"` FdCount int `json:"fd_count"` + Psr int `json:"psr"` } type TcpStat struct { @@ -290,6 +316,8 @@ type NetworkStats struct { Udp v1.UdpStat `json:"udp"` // UDP6 connection stats Udp6 v1.UdpStat `json:"udp6"` + // TCP advanced stats + TcpAdvanced v1.TcpAdvancedStat `json:"tcp_advanced"` } // Instantaneous CPU stats diff --git a/vendor/github.com/google/cadvisor/info/v2/conversion.go b/vendor/github.com/google/cadvisor/info/v2/conversion.go index 1e86687870d..f9a95a03501 100644 --- a/vendor/github.com/google/cadvisor/info/v2/conversion.go +++ b/vendor/github.com/google/cadvisor/info/v2/conversion.go @@ -19,7 +19,7 @@ import ( "time" "github.com/google/cadvisor/info/v1" - "k8s.io/klog" + "k8s.io/klog/v2" ) func machineFsStatsFromV1(fsStats []v1.FsStats) []MachineFsStats { @@ -101,7 +101,8 @@ func ContainerStatsFromV1(containerName string, spec *v1.ContainerSpec, stats [] var last *v1.ContainerStats for _, val := range stats { stat := &ContainerStats{ - Timestamp: val.Timestamp, + Timestamp: val.Timestamp, + ReferencedMemory: val.ReferencedMemory, } if spec.HasCpu { stat.Cpu = &val.Cpu @@ -116,6 +117,9 @@ func ContainerStatsFromV1(containerName string, spec *v1.ContainerSpec, stats [] if spec.HasMemory { stat.Memory = &val.Memory } + if spec.HasHugetlb { + stat.Hugetlb = &val.Hugetlb + } if spec.HasNetwork { // TODO: Handle TcpStats stat.Network = &NetworkStats{ @@ -148,6 +152,15 @@ func ContainerStatsFromV1(containerName string, spec *v1.ContainerSpec, stats [] if len(val.Accelerators) > 0 { stat.Accelerators = val.Accelerators } + if len(val.PerfStats) > 0 { + stat.PerfStats = val.PerfStats + } + if len(val.PerfUncoreStats) > 0 { + stat.PerfUncoreStats = val.PerfUncoreStats + } + if len(val.Resctrl.MemoryBandwidth) > 0 || len(val.Resctrl.Cache) > 0 { + stat.Resctrl = val.Resctrl + } // TODO(rjnagal): Handle load stats. newStats = append(newStats, stat) } @@ -162,10 +175,12 @@ func DeprecatedStatsFromV1(cont *v1.ContainerInfo) []DeprecatedContainerStats { Timestamp: val.Timestamp, HasCpu: cont.Spec.HasCpu, HasMemory: cont.Spec.HasMemory, + HasHugetlb: cont.Spec.HasHugetlb, HasNetwork: cont.Spec.HasNetwork, HasFilesystem: cont.Spec.HasFilesystem, HasDiskIo: cont.Spec.HasDiskIo, HasCustomMetrics: cont.Spec.HasCustomMetrics, + ReferencedMemory: val.ReferencedMemory, } if stat.HasCpu { stat.Cpu = val.Cpu @@ -180,6 +195,9 @@ func DeprecatedStatsFromV1(cont *v1.ContainerInfo) []DeprecatedContainerStats { if stat.HasMemory { stat.Memory = val.Memory } + if stat.HasHugetlb { + stat.Hugetlb = val.Hugetlb + } if stat.HasNetwork { stat.Network.Interfaces = val.Network.Interfaces } @@ -195,6 +213,15 @@ func DeprecatedStatsFromV1(cont *v1.ContainerInfo) []DeprecatedContainerStats { if stat.HasCustomMetrics { stat.CustomMetrics = val.CustomMetrics } + if len(val.PerfStats) > 0 { + stat.PerfStats = val.PerfStats + } + if len(val.PerfUncoreStats) > 0 { + stat.PerfUncoreStats = val.PerfUncoreStats + } + if len(val.Resctrl.MemoryBandwidth) > 0 || len(val.Resctrl.Cache) > 0 { + stat.Resctrl = val.Resctrl + } // TODO(rjnagal): Handle load stats. stats = append(stats, stat) } @@ -259,6 +286,7 @@ func ContainerSpecFromV1(specV1 *v1.ContainerSpec, aliases []string, namespace s CreationTime: specV1.CreationTime, HasCpu: specV1.HasCpu, HasMemory: specV1.HasMemory, + HasHugetlb: specV1.HasHugetlb, HasFilesystem: specV1.HasFilesystem, HasNetwork: specV1.HasNetwork, HasProcesses: specV1.HasProcesses, diff --git a/vendor/github.com/google/cadvisor/machine/info.go b/vendor/github.com/google/cadvisor/machine/info.go index cbe95bc6539..8db8a7e76d9 100644 --- a/vendor/github.com/google/cadvisor/machine/info.go +++ b/vendor/github.com/google/cadvisor/machine/info.go @@ -20,23 +20,25 @@ import ( "io/ioutil" "path/filepath" "strings" + "time" + + "golang.org/x/sys/unix" - "github.com/docker/docker/pkg/parsers/operatingsystem" "github.com/google/cadvisor/fs" info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/nvm" "github.com/google/cadvisor/utils/cloudinfo" "github.com/google/cadvisor/utils/sysfs" "github.com/google/cadvisor/utils/sysinfo" - "k8s.io/klog" - - "golang.org/x/sys/unix" + "k8s.io/klog/v2" ) const hugepagesDirectory = "/sys/kernel/mm/hugepages/" +const memoryControllerPath = "/sys/devices/system/edac/mc/" -var machineIdFilePath = flag.String("machine_id_file", "/etc/machine-id,/var/lib/dbus/machine-id", "Comma-separated list of files to check for machine-id. Use the first one that exists.") -var bootIdFilePath = flag.String("boot_id_file", "/proc/sys/kernel/random/boot_id", "Comma-separated list of files to check for boot-id. Use the first one that exists.") +var machineIDFilePath = flag.String("machine_id_file", "/etc/machine-id,/var/lib/dbus/machine-id", "Comma-separated list of files to check for machine-id. Use the first one that exists.") +var bootIDFilePath = flag.String("boot_id_file", "/proc/sys/kernel/random/boot_id", "Comma-separated list of files to check for boot-id. Use the first one that exists.") func getInfoFromFiles(filePaths string) string { if len(filePaths) == 0 { @@ -72,7 +74,17 @@ func Info(sysFs sysfs.SysFs, fsInfo fs.FsInfo, inHostNamespace bool) (*info.Mach return nil, err } - hugePagesInfo, err := GetHugePagesInfo(hugepagesDirectory) + memoryByType, err := GetMachineMemoryByType(memoryControllerPath) + if err != nil { + return nil, err + } + + nvmInfo, err := nvm.GetInfo() + if err != nil { + return nil, err + } + + hugePagesInfo, err := sysinfo.GetHugePagesInfo(sysFs, hugepagesDirectory) if err != nil { return nil, err } @@ -92,7 +104,7 @@ func Info(sysFs sysfs.SysFs, fsInfo fs.FsInfo, inHostNamespace bool) (*info.Mach klog.Errorf("Failed to get network devices: %v", err) } - topology, numCores, err := GetTopology(sysFs, string(cpuinfo)) + topology, numCores, err := GetTopology(sysFs) if err != nil { klog.Errorf("Failed to get topology information: %v", err) } @@ -108,19 +120,24 @@ func Info(sysFs sysfs.SysFs, fsInfo fs.FsInfo, inHostNamespace bool) (*info.Mach instanceID := realCloudInfo.GetInstanceID() machineInfo := &info.MachineInfo{ - NumCores: numCores, - CpuFrequency: clockSpeed, - MemoryCapacity: memoryCapacity, - HugePages: hugePagesInfo, - DiskMap: diskMap, - NetworkDevices: netDevices, - Topology: topology, - MachineID: getInfoFromFiles(filepath.Join(rootFs, *machineIdFilePath)), - SystemUUID: systemUUID, - BootID: getInfoFromFiles(filepath.Join(rootFs, *bootIdFilePath)), - CloudProvider: cloudProvider, - InstanceType: instanceType, - InstanceID: instanceID, + Timestamp: time.Now(), + NumCores: numCores, + NumPhysicalCores: GetPhysicalCores(cpuinfo), + NumSockets: GetSockets(cpuinfo), + CpuFrequency: clockSpeed, + MemoryCapacity: memoryCapacity, + MemoryByType: memoryByType, + NVMInfo: nvmInfo, + HugePages: hugePagesInfo, + DiskMap: diskMap, + NetworkDevices: netDevices, + Topology: topology, + MachineID: getInfoFromFiles(filepath.Join(rootFs, *machineIDFilePath)), + SystemUUID: systemUUID, + BootID: getInfoFromFiles(filepath.Join(rootFs, *bootIDFilePath)), + CloudProvider: cloudProvider, + InstanceType: instanceType, + InstanceID: instanceID, } for i := range filesystems { @@ -136,7 +153,7 @@ func Info(sysFs sysfs.SysFs, fsInfo fs.FsInfo, inHostNamespace bool) (*info.Mach } func ContainerOsVersion() string { - os, err := operatingsystem.GetOperatingSystem() + os, err := getOperatingSystem() if err != nil { os = "Unknown" } diff --git a/vendor/github.com/google/cadvisor/machine/machine.go b/vendor/github.com/google/cadvisor/machine/machine.go index 34ed9b99f60..4330d695021 100644 --- a/vendor/github.com/google/cadvisor/machine/machine.go +++ b/vendor/github.com/google/cadvisor/machine/machine.go @@ -19,6 +19,8 @@ import ( "bytes" "fmt" "io/ioutil" + "os" + "path" "path/filepath" "regexp" "strconv" @@ -32,30 +34,64 @@ import ( "github.com/google/cadvisor/utils/sysfs" "github.com/google/cadvisor/utils/sysinfo" - "k8s.io/klog" + "k8s.io/klog/v2" "golang.org/x/sys/unix" ) var ( - cpuRegExp = regexp.MustCompile(`^processor\s*:\s*([0-9]+)$`) - coreRegExp = regexp.MustCompile(`^core id\s*:\s*([0-9]+)$`) - nodeRegExp = regexp.MustCompile(`^physical id\s*:\s*([0-9]+)$`) - nodeBusRegExp = regexp.MustCompile(`^node([0-9]+)$`) + coreRegExp = regexp.MustCompile(`(?m)^core id\s*:\s*([0-9]+)$`) + nodeRegExp = regexp.MustCompile(`(?m)^physical id\s*:\s*([0-9]+)$`) // Power systems have a different format so cater for both - cpuClockSpeedMHz = regexp.MustCompile(`(?:cpu MHz|clock)\s*:\s*([0-9]+\.[0-9]+)(?:MHz)?`) + cpuClockSpeedMHz = regexp.MustCompile(`(?:cpu MHz|CPU MHz|clock)\s*:\s*([0-9]+\.[0-9]+)(?:MHz)?`) memoryCapacityRegexp = regexp.MustCompile(`MemTotal:\s*([0-9]+) kB`) swapCapacityRegexp = regexp.MustCompile(`SwapTotal:\s*([0-9]+) kB`) + + cpuBusPath = "/sys/bus/cpu/devices/" + isMemoryController = regexp.MustCompile("mc[0-9]+") + isDimm = regexp.MustCompile("dimm[0-9]+") + machineArch = getMachineArch() + maxFreqFile = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" ) -const maxFreqFile = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" -const cpuBusPath = "/sys/bus/cpu/devices/" -const nodePath = "/sys/devices/system/node" +const sysFsCPUCoreID = "core_id" +const sysFsCPUPhysicalPackageID = "physical_package_id" +const sysFsCPUTopology = "topology" +const memTypeFileName = "dimm_mem_type" +const sizeFileName = "size" + +// GetPhysicalCores returns number of CPU cores reading /proc/cpuinfo file or if needed information from sysfs cpu path +func GetPhysicalCores(procInfo []byte) int { + numCores := getUniqueMatchesCount(string(procInfo), coreRegExp) + if numCores == 0 { + // read number of cores from /sys/bus/cpu/devices/cpu*/topology/core_id to deal with processors + // for which 'core id' is not available in /proc/cpuinfo + numCores = getUniqueCPUPropertyCount(cpuBusPath, sysFsCPUCoreID) + } + if numCores == 0 { + klog.Errorf("Cannot read number of physical cores correctly, number of cores set to %d", numCores) + } + return numCores +} + +// GetSockets returns number of CPU sockets reading /proc/cpuinfo file or if needed information from sysfs cpu path +func GetSockets(procInfo []byte) int { + numSocket := getUniqueMatchesCount(string(procInfo), nodeRegExp) + if numSocket == 0 { + // read number of sockets from /sys/bus/cpu/devices/cpu*/topology/physical_package_id to deal with processors + // for which 'physical id' is not available in /proc/cpuinfo + numSocket = getUniqueCPUPropertyCount(cpuBusPath, sysFsCPUPhysicalPackageID) + } + if numSocket == 0 { + klog.Errorf("Cannot read number of sockets correctly, number of sockets set to %d", numSocket) + } + return numSocket +} // GetClockSpeed returns the CPU clock speed, given a []byte formatted as the /proc/cpuinfo file. func GetClockSpeed(procInfo []byte) (uint64, error) { - // s390/s390x, aarch64 and arm32 changes - if isSystemZ() || isAArch64() || isArm32() { + // s390/s390x, mips64, riscv64, aarch64 and arm32 changes + if isMips64() || isSystemZ() || isAArch64() || isArm32() || isRiscv64() { return 0, nil } @@ -101,6 +137,65 @@ func GetMachineMemoryCapacity() (uint64, error) { return memoryCapacity, err } +// GetMachineMemoryByType returns information about memory capacity and number of DIMMs. +// Information is retrieved from sysfs edac per-DIMM API (/sys/devices/system/edac/mc/) +// introduced in kernel 3.6. Documentation can be found at +// https://www.kernel.org/doc/Documentation/admin-guide/ras.rst. +// Full list of memory types can be found in edac_mc.c +// (https://github.com/torvalds/linux/blob/v5.5/drivers/edac/edac_mc.c#L198) +func GetMachineMemoryByType(edacPath string) (map[string]*info.MemoryInfo, error) { + memory := map[string]*info.MemoryInfo{} + names, err := ioutil.ReadDir(edacPath) + // On some architectures (such as ARM) memory controller device may not exist. + // If this is the case then we ignore error and return empty slice. + _, ok := err.(*os.PathError) + if err != nil && ok { + return memory, nil + } else if err != nil { + return memory, err + } + for _, controllerDir := range names { + controller := controllerDir.Name() + if !isMemoryController.MatchString(controller) { + continue + } + dimms, err := ioutil.ReadDir(path.Join(edacPath, controllerDir.Name())) + if err != nil { + return map[string]*info.MemoryInfo{}, err + } + for _, dimmDir := range dimms { + dimm := dimmDir.Name() + if !isDimm.MatchString(dimm) { + continue + } + memType, err := ioutil.ReadFile(path.Join(edacPath, controller, dimm, memTypeFileName)) + if err != nil { + return map[string]*info.MemoryInfo{}, err + } + readableMemType := strings.TrimSpace(string(memType)) + if _, exists := memory[readableMemType]; !exists { + memory[readableMemType] = &info.MemoryInfo{} + } + size, err := ioutil.ReadFile(path.Join(edacPath, controller, dimm, sizeFileName)) + if err != nil { + return map[string]*info.MemoryInfo{}, err + } + capacity, err := strconv.Atoi(strings.TrimSpace(string(size))) + if err != nil { + return map[string]*info.MemoryInfo{}, err + } + memory[readableMemType].Capacity += uint64(mbToBytes(capacity)) + memory[readableMemType].DimmCount++ + } + } + + return memory, nil +} + +func mbToBytes(megabytes int) int { + return megabytes * 1024 * 1024 +} + // GetMachineSwapCapacity returns the machine's total swap from /proc/meminfo. // Returns the total swap capacity as an uint64 (number of bytes). func GetMachineSwapCapacity() (uint64, error) { @@ -116,6 +211,15 @@ func GetMachineSwapCapacity() (uint64, error) { return swapCapacity, err } +// GetTopology returns CPU topology reading information from sysfs +func GetTopology(sysFs sysfs.SysFs) ([]info.Node, int, error) { + // s390/s390x changes + if isSystemZ() { + return nil, getNumCores(), nil + } + return sysinfo.GetNodesInfo(sysFs) +} + // parseCapacity matches a Regexp in a []byte, returning the resulting value in bytes. // Assumes that the value matched by the Regexp is in KB. func parseCapacity(b []byte, r *regexp.Regexp) (uint64, error) { @@ -132,320 +236,82 @@ func parseCapacity(b []byte, r *regexp.Regexp) (uint64, error) { return m * 1024, err } -/* Look for sysfs cpu path containing core_id */ -/* Such as: sys/bus/cpu/devices/cpu0/topology/core_id */ -func getCoreIdFromCpuBus(cpuBusPath string, threadId int) (int, error) { - path := filepath.Join(cpuBusPath, fmt.Sprintf("cpu%d/topology", threadId)) - file := filepath.Join(path, "core_id") - - num, err := ioutil.ReadFile(file) +// Looks for sysfs cpu path containing given CPU property, e.g. core_id or physical_package_id +// and returns number of unique values of given property, exemplary usage: getting number of CPU physical cores +func getUniqueCPUPropertyCount(cpuBusPath string, propertyName string) int { + pathPattern := cpuBusPath + "cpu*[0-9]" + sysCPUPaths, err := filepath.Glob(pathPattern) if err != nil { - return threadId, err + klog.Errorf("Cannot find files matching pattern (pathPattern: %s), number of unique %s set to 0", pathPattern, propertyName) + return 0 } - - coreId, err := strconv.ParseInt(string(bytes.TrimSpace(num)), 10, 32) - if err != nil { - return threadId, err + uniques := make(map[string]bool) + for _, sysCPUPath := range sysCPUPaths { + onlinePath := filepath.Join(sysCPUPath, "online") + onlineVal, err := ioutil.ReadFile(onlinePath) + if err != nil { + klog.Warningf("Cannot determine CPU %s online state, skipping", sysCPUPath) + continue + } + onlineVal = bytes.TrimSpace(onlineVal) + if len(onlineVal) == 0 || onlineVal[0] != 49 { + klog.Warningf("CPU %s is offline, skipping", sysCPUPath) + continue + } + propertyPath := filepath.Join(sysCPUPath, sysFsCPUTopology, propertyName) + propertyVal, err := ioutil.ReadFile(propertyPath) + if err != nil { + klog.Errorf("Cannot open %s, number of unique %s set to 0", propertyPath, propertyName) + return 0 + } + uniques[string(propertyVal)] = true } - - if coreId < 0 { - // report threadId if found coreId < 0 - coreId = int64(threadId) - } - - return int(coreId), nil + return len(uniques) } -/* Look for sysfs cpu path containing node id */ -/* Such as: /sys/bus/cpu/devices/cpu0/node%d */ -func getNodeIdFromCpuBus(cpuBusPath string, threadId int) (int, error) { - path := filepath.Join(cpuBusPath, fmt.Sprintf("cpu%d", threadId)) - - files, err := ioutil.ReadDir(path) - if err != nil { - return 0, err +// getUniqueMatchesCount returns number of unique matches in given argument using provided regular expression +func getUniqueMatchesCount(s string, r *regexp.Regexp) int { + matches := r.FindAllString(s, -1) + uniques := make(map[string]bool) + for _, match := range matches { + uniques[match] = true } - - nodeId := 0 - for _, file := range files { - filename := file.Name() - - isNode, error := regexp.MatchString("^node([0-9]+)$", filename) - if error != nil { - continue - } - if !isNode { - continue - } - - ok, val, _ := extractValue(filename, nodeBusRegExp) - if err != nil { - continue - } - if ok { - if val < 0 { - continue - } - nodeId = val - } - } - - return nodeId, nil + return len(uniques) } -// GetHugePagesInfo returns information about pre-allocated huge pages -// hugepagesDirectory should be top directory of hugepages -// Such as: /sys/kernel/mm/hugepages/ -func GetHugePagesInfo(hugepagesDirectory string) ([]info.HugePagesInfo, error) { - var hugePagesInfo []info.HugePagesInfo - files, err := ioutil.ReadDir(hugepagesDirectory) - if err != nil { - // treat as non-fatal since kernels and machine can be - // configured to disable hugepage support - return hugePagesInfo, nil - } - for _, st := range files { - nameArray := strings.Split(st.Name(), "-") - pageSizeArray := strings.Split(nameArray[1], "kB") - pageSize, err := strconv.ParseUint(string(pageSizeArray[0]), 10, 64) - if err != nil { - return hugePagesInfo, err - } - - numFile := hugepagesDirectory + st.Name() + "/nr_hugepages" - val, err := ioutil.ReadFile(numFile) - if err != nil { - return hugePagesInfo, err - } - var numPages uint64 - // we use sscanf as the file as a new-line that trips up ParseUint - // it returns the number of tokens successfully parsed, so if - // n != 1, it means we were unable to parse a number from the file - n, err := fmt.Sscanf(string(val), "%d", &numPages) - if err != nil || n != 1 { - return hugePagesInfo, fmt.Errorf("could not parse file %v contents %q", numFile, string(val)) - } - - hugePagesInfo = append(hugePagesInfo, info.HugePagesInfo{ - NumPages: numPages, - PageSize: pageSize, - }) - } - return hugePagesInfo, nil -} - -func GetTopology(sysFs sysfs.SysFs, cpuinfo string) ([]info.Node, int, error) { - nodes := []info.Node{} - - // s390/s390x changes - if true == isSystemZ() { - return nodes, getNumCores(), nil - } - - numCores := 0 - lastThread := -1 - lastCore := -1 - lastNode := -1 - for _, line := range strings.Split(cpuinfo, "\n") { - if line == "" { - continue - } - ok, val, err := extractValue(line, cpuRegExp) - if err != nil { - return nil, -1, fmt.Errorf("could not parse cpu info from %q: %v", line, err) - } - if ok { - thread := val - numCores++ - if lastThread != -1 { - // New cpu section. Save last one. - nodeIdx, err := addNode(&nodes, lastNode) - if err != nil { - return nil, -1, fmt.Errorf("failed to add node %d: %v", lastNode, err) - } - nodes[nodeIdx].AddThread(lastThread, lastCore) - lastCore = -1 - lastNode = -1 - } - lastThread = thread - - /* On Arm platform, no 'core id' and 'physical id' in '/proc/cpuinfo'. */ - /* So we search sysfs cpu path directly. */ - /* This method can also be used on other platforms, such as x86, ppc64le... */ - /* /sys/bus/cpu/devices/cpu%d contains the information of 'core_id' & 'node_id'. */ - /* Such as: /sys/bus/cpu/devices/cpu0/topology/core_id */ - /* Such as: /sys/bus/cpu/devices/cpu0/node0 */ - if isAArch64() { - val, err = getCoreIdFromCpuBus(cpuBusPath, lastThread) - if err != nil { - // Report thread id if no NUMA - val = lastThread - } - lastCore = val - - val, err = getNodeIdFromCpuBus(cpuBusPath, lastThread) - if err != nil { - // Report node 0 if no NUMA - val = 0 - } - lastNode = val - } - continue - } - - if isAArch64() { - /* On Arm platform, no 'core id' and 'physical id' in '/proc/cpuinfo'. */ - continue - } - - ok, val, err = extractValue(line, coreRegExp) - if err != nil { - return nil, -1, fmt.Errorf("could not parse core info from %q: %v", line, err) - } - if ok { - lastCore = val - continue - } - - ok, val, err = extractValue(line, nodeRegExp) - if err != nil { - return nil, -1, fmt.Errorf("could not parse node info from %q: %v", line, err) - } - if ok { - lastNode = val - continue - } - } - - nodeIdx, err := addNode(&nodes, lastNode) - if err != nil { - return nil, -1, fmt.Errorf("failed to add node %d: %v", lastNode, err) - } - nodes[nodeIdx].AddThread(lastThread, lastCore) - if numCores < 1 { - return nil, numCores, fmt.Errorf("could not detect any cores") - } - for idx, node := range nodes { - caches, err := sysinfo.GetCacheInfo(sysFs, node.Cores[0].Threads[0]) - if err != nil { - klog.Errorf("failed to get cache information for node %d: %v", node.Id, err) - continue - } - numThreadsPerCore := len(node.Cores[0].Threads) - numThreadsPerNode := len(node.Cores) * numThreadsPerCore - for _, cache := range caches { - c := info.Cache{ - Size: cache.Size, - Level: cache.Level, - Type: cache.Type, - } - if cache.Cpus == numThreadsPerNode && cache.Level > 2 { - // Add a node-level cache. - nodes[idx].AddNodeCache(c) - } else if cache.Cpus == numThreadsPerCore { - // Add to each core. - nodes[idx].AddPerCoreCache(c) - } - // Ignore unknown caches. - } - } - return nodes, numCores, nil -} - -func extractValue(s string, r *regexp.Regexp) (bool, int, error) { - matches := r.FindSubmatch([]byte(s)) - if len(matches) == 2 { - val, err := strconv.ParseInt(string(matches[1]), 10, 32) - if err != nil { - return false, -1, err - } - return true, int(val), nil - } - return false, -1, nil -} - -func findNode(nodes []info.Node, id int) (bool, int) { - for i, n := range nodes { - if n.Id == id { - return true, i - } - } - return false, -1 -} - -func addNode(nodes *[]info.Node, id int) (int, error) { - var idx int - if id == -1 { - // Some VMs don't fill topology data. Export single package. - id = 0 - } - - ok, idx := findNode(*nodes, id) - if !ok { - // New node - node := info.Node{Id: id} - // Add per-node memory information. - meminfo := fmt.Sprintf("/sys/devices/system/node/node%d/meminfo", id) - out, err := ioutil.ReadFile(meminfo) - // Ignore if per-node info is not available. - if err == nil { - m, err := parseCapacity(out, memoryCapacityRegexp) - if err != nil { - return -1, err - } - node.Memory = uint64(m) - } - // Look for per-node hugepages info using node id - // Such as: /sys/devices/system/node/node%d/hugepages - hugepagesDirectory := fmt.Sprintf("%s/node%d/hugepages/", nodePath, id) - hugePagesInfo, err := GetHugePagesInfo(hugepagesDirectory) - if err != nil { - return -1, err - } - node.HugePages = hugePagesInfo - - *nodes = append(*nodes, node) - idx = len(*nodes) - 1 - } - return idx, nil -} - -// s390/s390x changes -func getMachineArch() (string, error) { +func getMachineArch() string { uname := unix.Utsname{} err := unix.Uname(&uname) if err != nil { - return "", err + klog.Errorf("Cannot get machine architecture, err: %v", err) + return "" } - - return string(uname.Machine[:]), nil + return string(uname.Machine[:]) } -// arm32 chanes +// arm32 changes func isArm32() bool { - arch, err := getMachineArch() - if err == nil { - return strings.Contains(arch, "arm") - } - return false + return strings.Contains(machineArch, "arm") } // aarch64 changes func isAArch64() bool { - arch, err := getMachineArch() - if err == nil { - return strings.Contains(arch, "aarch64") - } - return false + return strings.Contains(machineArch, "aarch64") } // s390/s390x changes func isSystemZ() bool { - arch, err := getMachineArch() - if err == nil { - return strings.Contains(arch, "390") - } - return false + return strings.Contains(machineArch, "390") +} + +// riscv64 changes +func isRiscv64() bool { + return strings.Contains(machineArch, "riscv64") +} + +// mips64 changes +func isMips64() bool { + return strings.Contains(machineArch, "mips64") } // s390/s390x changes diff --git a/vendor/github.com/google/cadvisor/machine/operatingsystem_unix.go b/vendor/github.com/google/cadvisor/machine/operatingsystem_unix.go new file mode 100644 index 00000000000..106c47e128c --- /dev/null +++ b/vendor/github.com/google/cadvisor/machine/operatingsystem_unix.go @@ -0,0 +1,54 @@ +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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. + +// +build freebsd darwin linux + +package machine + +import ( + "fmt" + "io/ioutil" + "os" + "os/exec" + "regexp" + "runtime" + "strings" +) + +var rex = regexp.MustCompile("(PRETTY_NAME)=(.*)") + +// getOperatingSystem gets the name of the current operating system. +func getOperatingSystem() (string, error) { + if runtime.GOOS == "darwin" || runtime.GOOS == "freebsd" { + cmd := exec.Command("uname", "-s") + osName, err := cmd.Output() + if err != nil { + return "", err + } + return string(osName), nil + } + bytes, err := ioutil.ReadFile("/etc/os-release") + if err != nil && os.IsNotExist(err) { + // /usr/lib/os-release in stateless systems like Clear Linux + bytes, err = ioutil.ReadFile("/usr/lib/os-release") + } + if err != nil { + return "", fmt.Errorf("error opening file : %v", err) + } + line := rex.FindAllStringSubmatch(string(bytes), -1) + if len(line) > 0 { + return strings.Trim(line[0][2], "\""), nil + } + return "Linux", nil +} diff --git a/vendor/github.com/google/cadvisor/machine/operatingsystem_windows.go b/vendor/github.com/google/cadvisor/machine/operatingsystem_windows.go new file mode 100644 index 00000000000..2fda3f3c0d7 --- /dev/null +++ b/vendor/github.com/google/cadvisor/machine/operatingsystem_windows.go @@ -0,0 +1,54 @@ +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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 machine + +import ( + "fmt" + + "golang.org/x/sys/windows/registry" +) + +func getOperatingSystem() (string, error) { + system := "Windows" + k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE) + if err != nil { + return system, err + } + defer k.Close() + + productName, _, err := k.GetStringValue("ProductName") + if err != nil { + return system, nil + } + + releaseId, _, err := k.GetStringValue("ReleaseId") + if err != nil { + return system, err + } + + currentBuildNumber, _, err := k.GetStringValue("CurrentBuildNumber") + if err != nil { + return system, err + } + revision, _, err := k.GetIntegerValue("UBR") + if err != nil { + return system, err + } + + system = fmt.Sprintf("%s Version %s (OS Build %s.%d)", + productName, releaseId, currentBuildNumber, revision) + + return system, nil +} diff --git a/vendor/github.com/google/cadvisor/manager/container.go b/vendor/github.com/google/cadvisor/manager/container.go index e9402b4b0c2..c599300d84b 100644 --- a/vendor/github.com/google/cadvisor/manager/container.go +++ b/vendor/github.com/google/cadvisor/manager/container.go @@ -29,17 +29,17 @@ import ( "sync" "time" - "github.com/google/cadvisor/accelerators" "github.com/google/cadvisor/cache/memory" "github.com/google/cadvisor/collector" "github.com/google/cadvisor/container" info "github.com/google/cadvisor/info/v1" - "github.com/google/cadvisor/info/v2" + v2 "github.com/google/cadvisor/info/v2" + "github.com/google/cadvisor/stats" "github.com/google/cadvisor/summary" "github.com/google/cadvisor/utils/cpuload" units "github.com/docker/go-units" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/clock" ) @@ -81,7 +81,7 @@ type containerData struct { logUsage bool // Tells the container to stop. - stop chan bool + stop chan struct{} // Tells the container to immediately collect stats onDemandChan chan chan struct{} @@ -90,7 +90,13 @@ type containerData struct { collectorManager collector.CollectorManager // nvidiaCollector updates stats for Nvidia GPUs attached to the container. - nvidiaCollector accelerators.AcceleratorCollector + nvidiaCollector stats.Collector + + // perfCollector updates stats for perf_event cgroup controller. + perfCollector stats.Collector + + // resctrlCollector updates stats for resctrl controller. + resctrlCollector stats.Collector } // jitter returns a time.Duration between duration and duration + maxFactor * duration, @@ -104,23 +110,24 @@ func jitter(duration time.Duration, maxFactor float64) time.Duration { return wait } -func (c *containerData) Start() error { - go c.housekeeping() +func (cd *containerData) Start() error { + go cd.housekeeping() return nil } -func (c *containerData) Stop() error { - err := c.memoryCache.RemoveContainer(c.info.Name) +func (cd *containerData) Stop() error { + err := cd.memoryCache.RemoveContainer(cd.info.Name) if err != nil { return err } - c.stop <- true + close(cd.stop) + cd.perfCollector.Destroy() return nil } -func (c *containerData) allowErrorLogging() bool { - if c.clock.Since(c.lastErrorTime) > time.Minute { - c.lastErrorTime = c.clock.Now() +func (cd *containerData) allowErrorLogging() bool { + if cd.clock.Since(cd.lastErrorTime) > time.Minute { + cd.lastErrorTime = cd.clock.Now() return true } return false @@ -130,22 +137,22 @@ func (c *containerData) allowErrorLogging() bool { // It is designed to be used in conjunction with periodic housekeeping, and will cause the timer for // periodic housekeeping to reset. This should be used sparingly, as calling OnDemandHousekeeping frequently // can have serious performance costs. -func (c *containerData) OnDemandHousekeeping(maxAge time.Duration) { - if c.clock.Since(c.statsLastUpdatedTime) > maxAge { +func (cd *containerData) OnDemandHousekeeping(maxAge time.Duration) { + if cd.clock.Since(cd.statsLastUpdatedTime) > maxAge { housekeepingFinishedChan := make(chan struct{}) - c.onDemandChan <- housekeepingFinishedChan + cd.onDemandChan <- housekeepingFinishedChan select { - case <-c.stop: + case <-cd.stop: case <-housekeepingFinishedChan: } } } // notifyOnDemand notifies all calls to OnDemandHousekeeping that housekeeping is finished -func (c *containerData) notifyOnDemand() { +func (cd *containerData) notifyOnDemand() { for { select { - case finishedChan := <-c.onDemandChan: + case finishedChan := <-cd.onDemandChan: close(finishedChan) default: return @@ -153,35 +160,42 @@ func (c *containerData) notifyOnDemand() { } } -func (c *containerData) GetInfo(shouldUpdateSubcontainers bool) (*containerInfo, error) { +func (cd *containerData) GetInfo(shouldUpdateSubcontainers bool) (*containerInfo, error) { // Get spec and subcontainers. - if c.clock.Since(c.infoLastUpdatedTime) > 5*time.Second { - err := c.updateSpec() + if cd.clock.Since(cd.infoLastUpdatedTime) > 5*time.Second || shouldUpdateSubcontainers { + err := cd.updateSpec() if err != nil { return nil, err } if shouldUpdateSubcontainers { - err = c.updateSubcontainers() + err = cd.updateSubcontainers() if err != nil { return nil, err } } - c.infoLastUpdatedTime = c.clock.Now() + cd.infoLastUpdatedTime = cd.clock.Now() } - // Make a copy of the info for the user. - c.lock.Lock() - defer c.lock.Unlock() - return &c.info, nil + cd.lock.Lock() + defer cd.lock.Unlock() + cInfo := containerInfo{ + Subcontainers: cd.info.Subcontainers, + Spec: cd.info.Spec, + } + cInfo.Id = cd.info.Id + cInfo.Name = cd.info.Name + cInfo.Aliases = cd.info.Aliases + cInfo.Namespace = cd.info.Namespace + return &cInfo, nil } -func (c *containerData) DerivedStats() (v2.DerivedStats, error) { - if c.summaryReader == nil { - return v2.DerivedStats{}, fmt.Errorf("derived stats not enabled for container %q", c.info.Name) +func (cd *containerData) DerivedStats() (v2.DerivedStats, error) { + if cd.summaryReader == nil { + return v2.DerivedStats{}, fmt.Errorf("derived stats not enabled for container %q", cd.info.Name) } - return c.summaryReader.DerivedStats() + return cd.summaryReader.DerivedStats() } -func (c *containerData) getCgroupPath(cgroups string) (string, error) { +func (cd *containerData) getCgroupPath(cgroups string) (string, error) { if cgroups == "-" { return "/", nil } @@ -199,8 +213,8 @@ func (c *containerData) getCgroupPath(cgroups string) (string, error) { // Returns contents of a file inside the container root. // Takes in a path relative to container root. -func (c *containerData) ReadFile(filepath string, inHostNamespace bool) ([]byte, error) { - pids, err := c.getContainerPids(inHostNamespace) +func (cd *containerData) ReadFile(filepath string, inHostNamespace bool) ([]byte, error) { + pids, err := cd.getContainerPids(inHostNamespace) if err != nil { return nil, err } @@ -218,11 +232,11 @@ func (c *containerData) ReadFile(filepath string, inHostNamespace bool) ([]byte, } } // No process paths could be found. Declare config non-existent. - return nil, fmt.Errorf("file %q does not exist.", filepath) + return nil, fmt.Errorf("file %q does not exist", filepath) } // Return output for ps command in host /proc with specified format -func (c *containerData) getPsOutput(inHostNamespace bool, format string) ([]byte, error) { +func (cd *containerData) getPsOutput(inHostNamespace bool, format string) ([]byte, error) { args := []string{} command := "ps" if !inHostNamespace { @@ -239,9 +253,9 @@ func (c *containerData) getPsOutput(inHostNamespace bool, format string) ([]byte // Get pids of processes in this container. // A slightly lighterweight call than GetProcessList if other details are not required. -func (c *containerData) getContainerPids(inHostNamespace bool) ([]string, error) { +func (cd *containerData) getContainerPids(inHostNamespace bool) ([]string, error) { format := "pid,cgroup" - out, err := c.getPsOutput(inHostNamespace, format) + out, err := cd.getPsOutput(inHostNamespace, format) if err != nil { return nil, err } @@ -257,30 +271,30 @@ func (c *containerData) getContainerPids(inHostNamespace bool) ([]string, error) return nil, fmt.Errorf("expected at least %d fields, found %d: output: %q", expectedFields, len(fields), line) } pid := fields[0] - cgroup, err := c.getCgroupPath(fields[1]) + cgroup, err := cd.getCgroupPath(fields[1]) if err != nil { return nil, fmt.Errorf("could not parse cgroup path from %q: %v", fields[1], err) } - if c.info.Name == cgroup { + if cd.info.Name == cgroup { pids = append(pids, pid) } } return pids, nil } -func (c *containerData) GetProcessList(cadvisorContainer string, inHostNamespace bool) ([]v2.ProcessInfo, error) { +func (cd *containerData) GetProcessList(cadvisorContainer string, inHostNamespace bool) ([]v2.ProcessInfo, error) { // report all processes for root. - isRoot := c.info.Name == "/" + isRoot := cd.info.Name == "/" rootfs := "/" if !inHostNamespace { rootfs = "/rootfs" } - format := "user,pid,ppid,stime,pcpu,pmem,rss,vsz,stat,time,comm,cgroup" - out, err := c.getPsOutput(inHostNamespace, format) + format := "user,pid,ppid,stime,pcpu,pmem,rss,vsz,stat,time,comm,psr,cgroup" + out, err := cd.getPsOutput(inHostNamespace, format) if err != nil { return nil, err } - expectedFields := 12 + expectedFields := 13 processes := []v2.ProcessInfo{} lines := strings.Split(string(out), "\n") for _, line := range lines[1:] { @@ -299,7 +313,7 @@ func (c *containerData) GetProcessList(cadvisorContainer string, inHostNamespace if err != nil { return nil, fmt.Errorf("invalid ppid %q: %v", fields[2], err) } - percentCpu, err := strconv.ParseFloat(fields[4], 32) + percentCPU, err := strconv.ParseFloat(fields[4], 32) if err != nil { return nil, fmt.Errorf("invalid cpu percent %q: %v", fields[4], err) } @@ -319,7 +333,12 @@ func (c *containerData) GetProcessList(cadvisorContainer string, inHostNamespace } // convert to bytes vs *= 1024 - cgroup, err := c.getCgroupPath(fields[11]) + psr, err := strconv.Atoi(fields[11]) + if err != nil { + return nil, fmt.Errorf("invalid pid %q: %v", fields[1], err) + } + + cgroup, err := cd.getCgroupPath(fields[12]) if err != nil { return nil, fmt.Errorf("could not parse cgroup path from %q: %v", fields[11], err) } @@ -342,13 +361,13 @@ func (c *containerData) GetProcessList(cadvisorContainer string, inHostNamespace } fdCount = len(fds) - if isRoot || c.info.Name == cgroup { + if isRoot || cd.info.Name == cgroup { processes = append(processes, v2.ProcessInfo{ User: fields[0], Pid: pid, Ppid: ppid, StartTime: fields[3], - PercentCpu: float32(percentCpu), + PercentCpu: float32(percentCPU), PercentMemory: float32(percentMem), RSS: rss, VirtualSize: vs, @@ -357,6 +376,7 @@ func (c *containerData) GetProcessList(cadvisorContainer string, inHostNamespace Cmd: fields[10], CgroupPath: cgroupPath, FdCount: fdCount, + Psr: psr, }) } } @@ -383,10 +403,13 @@ func newContainerData(containerName string, memoryCache *memory.InMemoryCache, h allowDynamicHousekeeping: allowDynamicHousekeeping, logUsage: logUsage, loadAvg: -1.0, // negative value indicates uninitialized. - stop: make(chan bool, 1), + stop: make(chan struct{}), collectorManager: collectorManager, onDemandChan: make(chan chan struct{}, 100), clock: clock, + perfCollector: &stats.NoopCollector{}, + nvidiaCollector: &stats.NoopCollector{}, + resctrlCollector: &stats.NoopCollector{}, } cont.info.ContainerReference = ref @@ -409,52 +432,52 @@ func newContainerData(containerName string, memoryCache *memory.InMemoryCache, h cont.summaryReader, err = summary.New(cont.info.Spec) if err != nil { cont.summaryReader = nil - klog.Warningf("Failed to create summary reader for %q: %v", ref.Name, err) + klog.V(5).Infof("Failed to create summary reader for %q: %v", ref.Name, err) } return cont, nil } // Determine when the next housekeeping should occur. -func (self *containerData) nextHousekeepingInterval() time.Duration { - if self.allowDynamicHousekeeping { +func (cd *containerData) nextHousekeepingInterval() time.Duration { + if cd.allowDynamicHousekeeping { var empty time.Time - stats, err := self.memoryCache.RecentStats(self.info.Name, empty, empty, 2) + stats, err := cd.memoryCache.RecentStats(cd.info.Name, empty, empty, 2) if err != nil { - if self.allowErrorLogging() { - klog.Warningf("Failed to get RecentStats(%q) while determining the next housekeeping: %v", self.info.Name, err) + if cd.allowErrorLogging() { + klog.Warningf("Failed to get RecentStats(%q) while determining the next housekeeping: %v", cd.info.Name, err) } } else if len(stats) == 2 { // TODO(vishnuk): Use no processes as a signal. // Raise the interval if usage hasn't changed in the last housekeeping. - if stats[0].StatsEq(stats[1]) && (self.housekeepingInterval < self.maxHousekeepingInterval) { - self.housekeepingInterval *= 2 - if self.housekeepingInterval > self.maxHousekeepingInterval { - self.housekeepingInterval = self.maxHousekeepingInterval + if stats[0].StatsEq(stats[1]) && (cd.housekeepingInterval < cd.maxHousekeepingInterval) { + cd.housekeepingInterval *= 2 + if cd.housekeepingInterval > cd.maxHousekeepingInterval { + cd.housekeepingInterval = cd.maxHousekeepingInterval } - } else if self.housekeepingInterval != *HousekeepingInterval { + } else if cd.housekeepingInterval != *HousekeepingInterval { // Lower interval back to the baseline. - self.housekeepingInterval = *HousekeepingInterval + cd.housekeepingInterval = *HousekeepingInterval } } } - return jitter(self.housekeepingInterval, 1.0) + return jitter(cd.housekeepingInterval, 1.0) } // TODO(vmarmol): Implement stats collecting as a custom collector. -func (c *containerData) housekeeping() { - // Start any background goroutines - must be cleaned up in c.handler.Cleanup(). - c.handler.Start() - defer c.handler.Cleanup() +func (cd *containerData) housekeeping() { + // Start any background goroutines - must be cleaned up in cd.handler.Cleanup(). + cd.handler.Start() + defer cd.handler.Cleanup() - // Initialize cpuload reader - must be cleaned up in c.loadReader.Stop() - if c.loadReader != nil { - err := c.loadReader.Start() + // Initialize cpuload reader - must be cleaned up in cd.loadReader.Stop() + if cd.loadReader != nil { + err := cd.loadReader.Start() if err != nil { - klog.Warningf("Could not start cpu load stat collector for %q: %s", c.info.Name, err) + klog.Warningf("Could not start cpu load stat collector for %q: %s", cd.info.Name, err) } - defer c.loadReader.Stop() + defer cd.loadReader.Stop() } // Long housekeeping is either 100ms or half of the housekeeping interval. @@ -464,11 +487,11 @@ func (c *containerData) housekeeping() { } // Housekeep every second. - klog.V(3).Infof("Start housekeeping for container %q\n", c.info.Name) - houseKeepingTimer := c.clock.NewTimer(0 * time.Second) + klog.V(3).Infof("Start housekeeping for container %q\n", cd.info.Name) + houseKeepingTimer := cd.clock.NewTimer(0 * time.Second) defer houseKeepingTimer.Stop() for { - if !c.housekeepingTick(houseKeepingTimer.C(), longHousekeeping) { + if !cd.housekeepingTick(houseKeepingTimer.C(), longHousekeeping) { return } // Stop and drain the timer so that it is safe to reset it @@ -479,74 +502,74 @@ func (c *containerData) housekeeping() { } } // Log usage if asked to do so. - if c.logUsage { + if cd.logUsage { const numSamples = 60 var empty time.Time - stats, err := c.memoryCache.RecentStats(c.info.Name, empty, empty, numSamples) + stats, err := cd.memoryCache.RecentStats(cd.info.Name, empty, empty, numSamples) if err != nil { - if c.allowErrorLogging() { - klog.Warningf("[%s] Failed to get recent stats for logging usage: %v", c.info.Name, err) + if cd.allowErrorLogging() { + klog.Warningf("[%s] Failed to get recent stats for logging usage: %v", cd.info.Name, err) } } else if len(stats) < numSamples { // Ignore, not enough stats yet. } else { - usageCpuNs := uint64(0) + usageCPUNs := uint64(0) for i := range stats { if i > 0 { - usageCpuNs += (stats[i].Cpu.Usage.Total - stats[i-1].Cpu.Usage.Total) + usageCPUNs += (stats[i].Cpu.Usage.Total - stats[i-1].Cpu.Usage.Total) } } usageMemory := stats[numSamples-1].Memory.Usage instantUsageInCores := float64(stats[numSamples-1].Cpu.Usage.Total-stats[numSamples-2].Cpu.Usage.Total) / float64(stats[numSamples-1].Timestamp.Sub(stats[numSamples-2].Timestamp).Nanoseconds()) - usageInCores := float64(usageCpuNs) / float64(stats[numSamples-1].Timestamp.Sub(stats[0].Timestamp).Nanoseconds()) + usageInCores := float64(usageCPUNs) / float64(stats[numSamples-1].Timestamp.Sub(stats[0].Timestamp).Nanoseconds()) usageInHuman := units.HumanSize(float64(usageMemory)) // Don't set verbosity since this is already protected by the logUsage flag. - klog.Infof("[%s] %.3f cores (average: %.3f cores), %s of memory", c.info.Name, instantUsageInCores, usageInCores, usageInHuman) + klog.Infof("[%s] %.3f cores (average: %.3f cores), %s of memory", cd.info.Name, instantUsageInCores, usageInCores, usageInHuman) } } - houseKeepingTimer.Reset(c.nextHousekeepingInterval()) + houseKeepingTimer.Reset(cd.nextHousekeepingInterval()) } } -func (c *containerData) housekeepingTick(timer <-chan time.Time, longHousekeeping time.Duration) bool { +func (cd *containerData) housekeepingTick(timer <-chan time.Time, longHousekeeping time.Duration) bool { select { - case <-c.stop: + case <-cd.stop: // Stop housekeeping when signaled. return false - case finishedChan := <-c.onDemandChan: + case finishedChan := <-cd.onDemandChan: // notify the calling function once housekeeping has completed defer close(finishedChan) case <-timer: } - start := c.clock.Now() - err := c.updateStats() + start := cd.clock.Now() + err := cd.updateStats() if err != nil { - if c.allowErrorLogging() { - klog.Warningf("Failed to update stats for container \"%s\": %s", c.info.Name, err) + if cd.allowErrorLogging() { + klog.Warningf("Failed to update stats for container \"%s\": %s", cd.info.Name, err) } } // Log if housekeeping took too long. - duration := c.clock.Since(start) + duration := cd.clock.Since(start) if duration >= longHousekeeping { - klog.V(3).Infof("[%s] Housekeeping took %s", c.info.Name, duration) + klog.V(3).Infof("[%s] Housekeeping took %s", cd.info.Name, duration) } - c.notifyOnDemand() - c.statsLastUpdatedTime = c.clock.Now() + cd.notifyOnDemand() + cd.statsLastUpdatedTime = cd.clock.Now() return true } -func (c *containerData) updateSpec() error { - spec, err := c.handler.GetSpec() +func (cd *containerData) updateSpec() error { + spec, err := cd.handler.GetSpec() if err != nil { // Ignore errors if the container is dead. - if !c.handler.Exists() { + if !cd.handler.Exists() { return nil } return err } - customMetrics, err := c.collectorManager.GetSpec() + customMetrics, err := cd.collectorManager.GetSpec() if err != nil { return err } @@ -554,28 +577,28 @@ func (c *containerData) updateSpec() error { spec.HasCustomMetrics = true spec.CustomMetrics = customMetrics } - c.lock.Lock() - defer c.lock.Unlock() - c.info.Spec = spec + cd.lock.Lock() + defer cd.lock.Unlock() + cd.info.Spec = spec return nil } // Calculate new smoothed load average using the new sample of runnable threads. // The decay used ensures that the load will stabilize on a new constant value within // 10 seconds. -func (c *containerData) updateLoad(newLoad uint64) { - if c.loadAvg < 0 { - c.loadAvg = float64(newLoad) // initialize to the first seen sample for faster stabilization. +func (cd *containerData) updateLoad(newLoad uint64) { + if cd.loadAvg < 0 { + cd.loadAvg = float64(newLoad) // initialize to the first seen sample for faster stabilization. } else { - c.loadAvg = c.loadAvg*c.loadDecay + float64(newLoad)*(1.0-c.loadDecay) + cd.loadAvg = cd.loadAvg*cd.loadDecay + float64(newLoad)*(1.0-cd.loadDecay) } } -func (c *containerData) updateStats() error { - stats, statsErr := c.handler.GetStats() +func (cd *containerData) updateStats() error { + stats, statsErr := cd.handler.GetStats() if statsErr != nil { // Ignore errors if the container is dead. - if !c.handler.Exists() { + if !cd.handler.Exists() { return nil } @@ -585,32 +608,32 @@ func (c *containerData) updateStats() error { if stats == nil { return statsErr } - if c.loadReader != nil { + if cd.loadReader != nil { // TODO(vmarmol): Cache this path. - path, err := c.handler.GetCgroupPath("cpu") + path, err := cd.handler.GetCgroupPath("cpu") if err == nil { - loadStats, err := c.loadReader.GetCpuLoad(c.info.Name, path) + loadStats, err := cd.loadReader.GetCpuLoad(cd.info.Name, path) if err != nil { - return fmt.Errorf("failed to get load stat for %q - path %q, error %s", c.info.Name, path, err) + return fmt.Errorf("failed to get load stat for %q - path %q, error %s", cd.info.Name, path, err) } stats.TaskStats = loadStats - c.updateLoad(loadStats.NrRunning) + cd.updateLoad(loadStats.NrRunning) // convert to 'milliLoad' to avoid floats and preserve precision. - stats.Cpu.LoadAverage = int32(c.loadAvg * 1000) + stats.Cpu.LoadAverage = int32(cd.loadAvg * 1000) } } - if c.summaryReader != nil { - err := c.summaryReader.AddSample(*stats) + if cd.summaryReader != nil { + err := cd.summaryReader.AddSample(*stats) if err != nil { // Ignore summary errors for now. - klog.V(2).Infof("Failed to add summary stats for %q: %v", c.info.Name, err) + klog.V(2).Infof("Failed to add summary stats for %q: %v", cd.info.Name, err) } } var customStatsErr error - cm := c.collectorManager.(*collector.GenericCollectorManager) + cm := cd.collectorManager.(*collector.GenericCollectorManager) if len(cm.Collectors) > 0 { - if cm.NextCollectionTime.Before(c.clock.Now()) { - customStats, err := c.updateCustomStats() + if cm.NextCollectionTime.Before(cd.clock.Now()) { + customStats, err := cd.updateCustomStats() if customStats != nil { stats.CustomMetrics = customStats } @@ -621,15 +644,19 @@ func (c *containerData) updateStats() error { } var nvidiaStatsErr error - if c.nvidiaCollector != nil { + if cd.nvidiaCollector != nil { // This updates the Accelerators field of the stats struct - nvidiaStatsErr = c.nvidiaCollector.UpdateStats(stats) + nvidiaStatsErr = cd.nvidiaCollector.UpdateStats(stats) } - ref, err := c.handler.ContainerReference() + perfStatsErr := cd.perfCollector.UpdateStats(stats) + + resctrlStatsErr := cd.resctrlCollector.UpdateStats(stats) + + ref, err := cd.handler.ContainerReference() if err != nil { // Ignore errors if the container is dead. - if !c.handler.Exists() { + if !cd.handler.Exists() { return nil } return err @@ -639,7 +666,7 @@ func (c *containerData) updateStats() error { ContainerReference: ref, } - err = c.memoryCache.AddStats(&cInfo, stats) + err = cd.memoryCache.AddStats(&cInfo, stats) if err != nil { return err } @@ -647,15 +674,24 @@ func (c *containerData) updateStats() error { return statsErr } if nvidiaStatsErr != nil { + klog.Errorf("error occurred while collecting nvidia stats for container %s: %s", cInfo.Name, err) return nvidiaStatsErr } + if perfStatsErr != nil { + klog.Errorf("error occurred while collecting perf stats for container %s: %s", cInfo.Name, err) + return perfStatsErr + } + if resctrlStatsErr != nil { + klog.Errorf("error occurred while collecting resctrl stats for container %s: %s", cInfo.Name, err) + return resctrlStatsErr + } return customStatsErr } -func (c *containerData) updateCustomStats() (map[string][]info.MetricVal, error) { - _, customStats, customStatsErr := c.collectorManager.Collect() +func (cd *containerData) updateCustomStats() (map[string][]info.MetricVal, error) { + _, customStats, customStatsErr := cd.collectorManager.Collect() if customStatsErr != nil { - if !c.handler.Exists() { + if !cd.handler.Exists() { return customStats, nil } customStatsErr = fmt.Errorf("%v, continuing to push custom stats", customStatsErr) @@ -663,19 +699,19 @@ func (c *containerData) updateCustomStats() (map[string][]info.MetricVal, error) return customStats, customStatsErr } -func (c *containerData) updateSubcontainers() error { +func (cd *containerData) updateSubcontainers() error { var subcontainers info.ContainerReferenceSlice - subcontainers, err := c.handler.ListContainers(container.ListSelf) + subcontainers, err := cd.handler.ListContainers(container.ListSelf) if err != nil { // Ignore errors if the container is dead. - if !c.handler.Exists() { + if !cd.handler.Exists() { return nil } return err } sort.Sort(subcontainers) - c.lock.Lock() - defer c.lock.Unlock() - c.info.Subcontainers = subcontainers + cd.lock.Lock() + defer cd.lock.Unlock() + cd.info.Subcontainers = subcontainers return nil } diff --git a/vendor/github.com/google/cadvisor/manager/manager.go b/vendor/github.com/google/cadvisor/manager/manager.go index 4855cd330da..4185d930fb8 100644 --- a/vendor/github.com/google/cadvisor/manager/manager.go +++ b/vendor/github.com/google/cadvisor/manager/manager.go @@ -37,13 +37,20 @@ import ( info "github.com/google/cadvisor/info/v1" "github.com/google/cadvisor/info/v2" "github.com/google/cadvisor/machine" + "github.com/google/cadvisor/nvm" + "github.com/google/cadvisor/perf" + "github.com/google/cadvisor/resctrl" + "github.com/google/cadvisor/stats" "github.com/google/cadvisor/utils/oomparser" "github.com/google/cadvisor/utils/sysfs" "github.com/google/cadvisor/version" "github.com/google/cadvisor/watcher" "github.com/opencontainers/runc/libcontainer/cgroups" - "k8s.io/klog" + "github.com/opencontainers/runc/libcontainer/cgroups/fs2" + "github.com/opencontainers/runc/libcontainer/intelrdt" + + "k8s.io/klog/v2" "k8s.io/utils/clock" ) @@ -120,7 +127,7 @@ type Manager interface { // Get past events that have been detected and that fit the request. GetPastEvents(request *events.Request) ([]*info.Event, error) - CloseEventChannel(watch_id int) + CloseEventChannel(watchID int) // Get status information about docker. DockerInfo() (info.DockerStatus, error) @@ -132,18 +139,31 @@ type Manager interface { DebugInfo() map[string][]string } +// Housekeeping configuration for the manager +type HouskeepingConfig = struct { + Interval *time.Duration + AllowDynamic *bool +} + // New takes a memory storage and returns a new manager. -func New(memoryCache *memory.InMemoryCache, sysfs sysfs.SysFs, maxHousekeepingInterval time.Duration, allowDynamicHousekeeping bool, includedMetricsSet container.MetricSet, collectorHttpClient *http.Client, rawContainerCgroupPathPrefixWhiteList []string) (Manager, error) { +func New(memoryCache *memory.InMemoryCache, sysfs sysfs.SysFs, houskeepingConfig HouskeepingConfig, includedMetricsSet container.MetricSet, collectorHTTPClient *http.Client, rawContainerCgroupPathPrefixWhiteList []string, perfEventsFile string) (Manager, error) { if memoryCache == nil { return nil, fmt.Errorf("manager requires memory storage") } // Detect the container we are running on. - selfContainer, err := cgroups.GetOwnCgroupPath("cpu") - if err != nil { - return nil, err + selfContainer := "/" + var err error + // Avoid using GetOwnCgroupPath on cgroup v2 as it is not supported by libcontainer + if cgroups.IsCgroup2UnifiedMode() { + klog.Warningf("Cannot detect current cgroup on cgroup v2") + } else { + selfContainer, err := cgroups.GetOwnCgroupPath("cpu") + if err != nil { + return nil, err + } + klog.V(2).Infof("cAdvisor running in container: %q", selfContainer) } - klog.V(2).Infof("cAdvisor running in container: %q", selfContainer) context := fs.Context{} @@ -175,13 +195,13 @@ func New(memoryCache *memory.InMemoryCache, sysfs sysfs.SysFs, maxHousekeepingIn cadvisorContainer: selfContainer, inHostNamespace: inHostNamespace, startupTime: time.Now(), - maxHousekeepingInterval: maxHousekeepingInterval, - allowDynamicHousekeeping: allowDynamicHousekeeping, + maxHousekeepingInterval: *houskeepingConfig.Interval, + allowDynamicHousekeeping: *houskeepingConfig.AllowDynamic, includedMetrics: includedMetricsSet, containerWatchers: []watcher.ContainerWatcher{}, eventsChannel: eventsChannel, - collectorHttpClient: collectorHttpClient, - nvidiaManager: &accelerators.NvidiaManager{}, + collectorHTTPClient: collectorHTTPClient, + nvidiaManager: accelerators.NewNvidiaManager(includedMetricsSet), rawContainerCgroupPathPrefixWhiteList: rawContainerCgroupPathPrefixWhiteList, } @@ -192,6 +212,16 @@ func New(memoryCache *memory.InMemoryCache, sysfs sysfs.SysFs, maxHousekeepingIn newManager.machineInfo = *machineInfo klog.V(1).Infof("Machine: %+v", newManager.machineInfo) + newManager.perfManager, err = perf.NewManager(perfEventsFile, machineInfo.NumCores, machineInfo.Topology) + if err != nil { + return nil, err + } + + newManager.resctrlManager, err = resctrl.NewManager(selfContainer) + if err != nil { + klog.V(4).Infof("Cannot gather resctrl metrics: %v", err) + } + versionInfo, err := getVersionInfo() if err != nil { return nil, err @@ -229,17 +259,19 @@ type manager struct { includedMetrics container.MetricSet containerWatchers []watcher.ContainerWatcher eventsChannel chan watcher.ContainerEvent - collectorHttpClient *http.Client - nvidiaManager accelerators.AcceleratorManager + collectorHTTPClient *http.Client + nvidiaManager stats.Manager + perfManager stats.Manager + resctrlManager stats.Manager // List of raw container cgroup path prefix whitelist. rawContainerCgroupPathPrefixWhiteList []string } // Start the container manager. -func (self *manager) Start() error { - self.containerWatchers = container.InitializePlugins(self, self.fsInfo, self.includedMetrics) +func (m *manager) Start() error { + m.containerWatchers = container.InitializePlugins(m, m.fsInfo, m.includedMetrics) - err := raw.Register(self, self.fsInfo, self.includedMetrics, self.rawContainerCgroupPathPrefixWhiteList) + err := raw.Register(m, m.fsInfo, m.includedMetrics, m.rawContainerCgroupPathPrefixWhiteList) if err != nil { klog.Errorf("Registration of the raw container factory failed: %v", err) } @@ -248,10 +280,10 @@ func (self *manager) Start() error { if err != nil { return err } - self.containerWatchers = append(self.containerWatchers, rawWatcher) + m.containerWatchers = append(m.containerWatchers, rawWatcher) // Watch for OOMs. - err = self.watchForNewOoms() + err = m.watchForNewOoms() if err != nil { klog.Warningf("Could not configure a source for OOM detection, disabling OOM events: %v", err) } @@ -261,16 +293,13 @@ func (self *manager) Start() error { return nil } - // Setup collection of nvidia GPU metrics if any of them are attached to the machine. - self.nvidiaManager.Setup() - // Create root and then recover all containers. - err = self.createContainer("/", watcher.Raw) + err = m.createContainer("/", watcher.Raw) if err != nil { return err } klog.V(2).Infof("Starting recovery of all containers") - err = self.detectSubcontainers("/") + err = m.detectSubcontainers("/") if err != nil { return err } @@ -278,54 +307,63 @@ func (self *manager) Start() error { // Watch for new container. quitWatcher := make(chan error) - err = self.watchForNewContainers(quitWatcher) + err = m.watchForNewContainers(quitWatcher) if err != nil { return err } - self.quitChannels = append(self.quitChannels, quitWatcher) + m.quitChannels = append(m.quitChannels, quitWatcher) // Look for new containers in the main housekeeping thread. quitGlobalHousekeeping := make(chan error) - self.quitChannels = append(self.quitChannels, quitGlobalHousekeeping) - go self.globalHousekeeping(quitGlobalHousekeeping) + m.quitChannels = append(m.quitChannels, quitGlobalHousekeeping) + go m.globalHousekeeping(quitGlobalHousekeeping) quitUpdateMachineInfo := make(chan error) - self.quitChannels = append(self.quitChannels, quitUpdateMachineInfo) - go self.updateMachineInfo(quitUpdateMachineInfo) + m.quitChannels = append(m.quitChannels, quitUpdateMachineInfo) + go m.updateMachineInfo(quitUpdateMachineInfo) return nil } -func (self *manager) Stop() error { - defer self.nvidiaManager.Destroy() +func (m *manager) Stop() error { + defer m.nvidiaManager.Destroy() + defer m.destroyPerfCollectors() // Stop and wait on all quit channels. - for i, c := range self.quitChannels { + for i, c := range m.quitChannels { // Send the exit signal and wait on the thread to exit (by closing the channel). c <- nil err := <-c if err != nil { // Remove the channels that quit successfully. - self.quitChannels = self.quitChannels[i:] + m.quitChannels = m.quitChannels[i:] return err } } - self.quitChannels = make([]chan error, 0, 2) + m.quitChannels = make([]chan error, 0, 2) + nvm.Finalize() + perf.Finalize() return nil } -func (self *manager) updateMachineInfo(quit chan error) { +func (m *manager) destroyPerfCollectors() { + for _, container := range m.containers { + container.perfCollector.Destroy() + } +} + +func (m *manager) updateMachineInfo(quit chan error) { ticker := time.NewTicker(*updateMachineInfoInterval) for { select { case <-ticker.C: - info, err := machine.Info(self.sysFs, self.fsInfo, self.inHostNamespace) + info, err := machine.Info(m.sysFs, m.fsInfo, m.inHostNamespace) if err != nil { klog.Errorf("Could not get machine info: %v", err) break } - self.machineMu.Lock() - self.machineInfo = *info - self.machineMu.Unlock() + m.machineMu.Lock() + m.machineInfo = *info + m.machineMu.Unlock() klog.V(5).Infof("Update machine info: %+v", *info) case <-quit: ticker.Stop() @@ -335,21 +373,21 @@ func (self *manager) updateMachineInfo(quit chan error) { } } -func (self *manager) globalHousekeeping(quit chan error) { +func (m *manager) globalHousekeeping(quit chan error) { // Long housekeeping is either 100ms or half of the housekeeping interval. longHousekeeping := 100 * time.Millisecond if *globalHousekeepingInterval/2 < longHousekeeping { longHousekeeping = *globalHousekeepingInterval / 2 } - ticker := time.Tick(*globalHousekeepingInterval) + ticker := time.NewTicker(*globalHousekeepingInterval) for { select { - case t := <-ticker: + case t := <-ticker.C: start := time.Now() // Check for new containers. - err := self.detectSubcontainers("/") + err := m.detectSubcontainers("/") if err != nil { klog.Errorf("Failed to detect containers: %s", err) } @@ -368,15 +406,15 @@ func (self *manager) globalHousekeeping(quit chan error) { } } -func (self *manager) getContainerData(containerName string) (*containerData, error) { +func (m *manager) getContainerData(containerName string) (*containerData, error) { var cont *containerData var ok bool func() { - self.containersLock.RLock() - defer self.containersLock.RUnlock() + m.containersLock.RLock() + defer m.containersLock.RUnlock() // Ensure we have the container. - cont, ok = self.containers[namespacedContainerName{ + cont, ok = m.containers[namespacedContainerName{ Name: containerName, }] }() @@ -386,8 +424,8 @@ func (self *manager) getContainerData(containerName string) (*containerData, err return cont, nil } -func (self *manager) GetDerivedStats(containerName string, options v2.RequestOptions) (map[string]v2.DerivedStats, error) { - conts, err := self.getRequestedContainers(containerName, options) +func (m *manager) GetDerivedStats(containerName string, options v2.RequestOptions) (map[string]v2.DerivedStats, error) { + conts, err := m.getRequestedContainers(containerName, options) if err != nil { return nil, err } @@ -403,8 +441,8 @@ func (self *manager) GetDerivedStats(containerName string, options v2.RequestOpt return stats, errs.OrNil() } -func (self *manager) GetContainerSpec(containerName string, options v2.RequestOptions) (map[string]v2.ContainerSpec, error) { - conts, err := self.getRequestedContainers(containerName, options) +func (m *manager) GetContainerSpec(containerName string, options v2.RequestOptions) (map[string]v2.ContainerSpec, error) { + conts, err := m.getRequestedContainers(containerName, options) if err != nil { return nil, err } @@ -415,43 +453,43 @@ func (self *manager) GetContainerSpec(containerName string, options v2.RequestOp if err != nil { errs.append(name, "GetInfo", err) } - spec := self.getV2Spec(cinfo) + spec := m.getV2Spec(cinfo) specs[name] = spec } return specs, errs.OrNil() } // Get V2 container spec from v1 container info. -func (self *manager) getV2Spec(cinfo *containerInfo) v2.ContainerSpec { - spec := self.getAdjustedSpec(cinfo) +func (m *manager) getV2Spec(cinfo *containerInfo) v2.ContainerSpec { + spec := m.getAdjustedSpec(cinfo) return v2.ContainerSpecFromV1(&spec, cinfo.Aliases, cinfo.Namespace) } -func (self *manager) getAdjustedSpec(cinfo *containerInfo) info.ContainerSpec { +func (m *manager) getAdjustedSpec(cinfo *containerInfo) info.ContainerSpec { spec := cinfo.Spec // Set default value to an actual value if spec.HasMemory { // Memory.Limit is 0 means there's no limit if spec.Memory.Limit == 0 { - self.machineMu.RLock() - spec.Memory.Limit = uint64(self.machineInfo.MemoryCapacity) - self.machineMu.RUnlock() + m.machineMu.RLock() + spec.Memory.Limit = uint64(m.machineInfo.MemoryCapacity) + m.machineMu.RUnlock() } } return spec } -func (self *manager) GetContainerInfo(containerName string, query *info.ContainerInfoRequest) (*info.ContainerInfo, error) { - cont, err := self.getContainerData(containerName) +func (m *manager) GetContainerInfo(containerName string, query *info.ContainerInfoRequest) (*info.ContainerInfo, error) { + cont, err := m.getContainerData(containerName) if err != nil { return nil, err } - return self.containerDataToContainerInfo(cont, query) + return m.containerDataToContainerInfo(cont, query) } -func (self *manager) GetContainerInfoV2(containerName string, options v2.RequestOptions) (map[string]v2.ContainerInfo, error) { - containers, err := self.getRequestedContainers(containerName, options) +func (m *manager) GetContainerInfoV2(containerName string, options v2.RequestOptions) (map[string]v2.ContainerInfo, error) { + containers, err := m.getRequestedContainers(containerName, options) if err != nil { return nil, err } @@ -468,9 +506,9 @@ func (self *manager) GetContainerInfoV2(containerName string, options v2.Request infos[name] = result continue } - result.Spec = self.getV2Spec(cinfo) + result.Spec = m.getV2Spec(cinfo) - stats, err := self.memoryCache.RecentStats(name, nilTime, nilTime, options.Count) + stats, err := m.memoryCache.RecentStats(name, nilTime, nilTime, options.Count) if err != nil { errs.append(name, "RecentStats", err) infos[name] = result @@ -484,14 +522,14 @@ func (self *manager) GetContainerInfoV2(containerName string, options v2.Request return infos, errs.OrNil() } -func (self *manager) containerDataToContainerInfo(cont *containerData, query *info.ContainerInfoRequest) (*info.ContainerInfo, error) { +func (m *manager) containerDataToContainerInfo(cont *containerData, query *info.ContainerInfoRequest) (*info.ContainerInfo, error) { // Get the info from the container. cinfo, err := cont.GetInfo(true) if err != nil { return nil, err } - stats, err := self.memoryCache.RecentStats(cinfo.Name, query.Start, query.End, query.NumStats) + stats, err := m.memoryCache.RecentStats(cinfo.Name, query.Start, query.End, query.NumStats) if err != nil { return nil, err } @@ -500,55 +538,58 @@ func (self *manager) containerDataToContainerInfo(cont *containerData, query *in ret := &info.ContainerInfo{ ContainerReference: cinfo.ContainerReference, Subcontainers: cinfo.Subcontainers, - Spec: self.getAdjustedSpec(cinfo), + Spec: m.getAdjustedSpec(cinfo), Stats: stats, } return ret, nil } -func (self *manager) getContainer(containerName string) (*containerData, error) { - self.containersLock.RLock() - defer self.containersLock.RUnlock() - cont, ok := self.containers[namespacedContainerName{Name: containerName}] +func (m *manager) getContainer(containerName string) (*containerData, error) { + m.containersLock.RLock() + defer m.containersLock.RUnlock() + cont, ok := m.containers[namespacedContainerName{Name: containerName}] if !ok { return nil, fmt.Errorf("unknown container %q", containerName) } return cont, nil } -func (self *manager) getSubcontainers(containerName string) map[string]*containerData { - self.containersLock.RLock() - defer self.containersLock.RUnlock() - containersMap := make(map[string]*containerData, len(self.containers)) +func (m *manager) getSubcontainers(containerName string) map[string]*containerData { + m.containersLock.RLock() + defer m.containersLock.RUnlock() + containersMap := make(map[string]*containerData, len(m.containers)) // Get all the unique subcontainers of the specified container matchedName := path.Join(containerName, "/") - for i := range self.containers { - name := self.containers[i].info.Name + for i := range m.containers { + if m.containers[i] == nil { + continue + } + name := m.containers[i].info.Name if name == containerName || strings.HasPrefix(name, matchedName) { - containersMap[self.containers[i].info.Name] = self.containers[i] + containersMap[m.containers[i].info.Name] = m.containers[i] } } return containersMap } -func (self *manager) SubcontainersInfo(containerName string, query *info.ContainerInfoRequest) ([]*info.ContainerInfo, error) { - containersMap := self.getSubcontainers(containerName) +func (m *manager) SubcontainersInfo(containerName string, query *info.ContainerInfoRequest) ([]*info.ContainerInfo, error) { + containersMap := m.getSubcontainers(containerName) containers := make([]*containerData, 0, len(containersMap)) for _, cont := range containersMap { containers = append(containers, cont) } - return self.containerDataSliceToContainerInfoSlice(containers, query) + return m.containerDataSliceToContainerInfoSlice(containers, query) } -func (self *manager) getAllDockerContainers() map[string]*containerData { - self.containersLock.RLock() - defer self.containersLock.RUnlock() - containers := make(map[string]*containerData, len(self.containers)) +func (m *manager) getAllDockerContainers() map[string]*containerData { + m.containersLock.RLock() + defer m.containersLock.RUnlock() + containers := make(map[string]*containerData, len(m.containers)) // Get containers in the Docker namespace. - for name, cont := range self.containers { + for name, cont := range m.containers { if name.Namespace == docker.DockerNamespace { containers[cont.info.Name] = cont } @@ -556,12 +597,12 @@ func (self *manager) getAllDockerContainers() map[string]*containerData { return containers } -func (self *manager) AllDockerContainers(query *info.ContainerInfoRequest) (map[string]info.ContainerInfo, error) { - containers := self.getAllDockerContainers() +func (m *manager) AllDockerContainers(query *info.ContainerInfoRequest) (map[string]info.ContainerInfo, error) { + containers := m.getAllDockerContainers() output := make(map[string]info.ContainerInfo, len(containers)) for name, cont := range containers { - inf, err := self.containerDataToContainerInfo(cont, query) + inf, err := m.containerDataToContainerInfo(cont, query) if err != nil { // Ignore the error because of race condition and return best-effort result. if err == memory.ErrDataNotFound { @@ -575,19 +616,19 @@ func (self *manager) AllDockerContainers(query *info.ContainerInfoRequest) (map[ return output, nil } -func (self *manager) getDockerContainer(containerName string) (*containerData, error) { - self.containersLock.RLock() - defer self.containersLock.RUnlock() +func (m *manager) getDockerContainer(containerName string) (*containerData, error) { + m.containersLock.RLock() + defer m.containersLock.RUnlock() // Check for the container in the Docker container namespace. - cont, ok := self.containers[namespacedContainerName{ + cont, ok := m.containers[namespacedContainerName{ Namespace: docker.DockerNamespace, Name: containerName, }] // Look for container by short prefix name if no exact match found. if !ok { - for contName, c := range self.containers { + for contName, c := range m.containers { if contName.Namespace == docker.DockerNamespace && strings.HasPrefix(contName.Name, containerName) { if cont == nil { cont = c @@ -605,20 +646,20 @@ func (self *manager) getDockerContainer(containerName string) (*containerData, e return cont, nil } -func (self *manager) DockerContainer(containerName string, query *info.ContainerInfoRequest) (info.ContainerInfo, error) { - container, err := self.getDockerContainer(containerName) +func (m *manager) DockerContainer(containerName string, query *info.ContainerInfoRequest) (info.ContainerInfo, error) { + container, err := m.getDockerContainer(containerName) if err != nil { return info.ContainerInfo{}, err } - inf, err := self.containerDataToContainerInfo(container, query) + inf, err := m.containerDataToContainerInfo(container, query) if err != nil { return info.ContainerInfo{}, err } return *inf, nil } -func (self *manager) containerDataSliceToContainerInfoSlice(containers []*containerData, query *info.ContainerInfoRequest) ([]*info.ContainerInfo, error) { +func (m *manager) containerDataSliceToContainerInfoSlice(containers []*containerData, query *info.ContainerInfoRequest) ([]*info.ContainerInfo, error) { if len(containers) == 0 { return nil, fmt.Errorf("no containers found") } @@ -626,9 +667,10 @@ func (self *manager) containerDataSliceToContainerInfoSlice(containers []*contai // Get the info for each container. output := make([]*info.ContainerInfo, 0, len(containers)) for i := range containers { - cinfo, err := self.containerDataToContainerInfo(containers[i], query) + cinfo, err := m.containerDataToContainerInfo(containers[i], query) if err != nil { // Skip containers with errors, we try to degrade gracefully. + klog.V(4).Infof("convert container data to container info failed with error %s", err.Error()) continue } output = append(output, cinfo) @@ -637,8 +679,8 @@ func (self *manager) containerDataSliceToContainerInfoSlice(containers []*contai return output, nil } -func (self *manager) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*info.ContainerInfo, error) { - containers, err := self.getRequestedContainers(containerName, options) +func (m *manager) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*info.ContainerInfo, error) { + containers, err := m.getRequestedContainers(containerName, options) if err != nil { return nil, err } @@ -648,7 +690,7 @@ func (self *manager) GetRequestedContainersInfo(containerName string, options v2 NumStats: options.Count, } for name, data := range containers { - info, err := self.containerDataToContainerInfo(data, &query) + info, err := m.containerDataToContainerInfo(data, &query) if err != nil { errs.append(name, "containerDataToContainerInfo", err) } @@ -657,26 +699,26 @@ func (self *manager) GetRequestedContainersInfo(containerName string, options v2 return containersMap, errs.OrNil() } -func (self *manager) getRequestedContainers(containerName string, options v2.RequestOptions) (map[string]*containerData, error) { +func (m *manager) getRequestedContainers(containerName string, options v2.RequestOptions) (map[string]*containerData, error) { containersMap := make(map[string]*containerData) switch options.IdType { case v2.TypeName: - if options.Recursive == false { - cont, err := self.getContainer(containerName) + if !options.Recursive { + cont, err := m.getContainer(containerName) if err != nil { return containersMap, err } containersMap[cont.info.Name] = cont } else { - containersMap = self.getSubcontainers(containerName) + containersMap = m.getSubcontainers(containerName) if len(containersMap) == 0 { return containersMap, fmt.Errorf("unknown container: %q", containerName) } } case v2.TypeDocker: - if options.Recursive == false { + if !options.Recursive { containerName = strings.TrimPrefix(containerName, "/") - cont, err := self.getDockerContainer(containerName) + cont, err := m.getDockerContainer(containerName) if err != nil { return containersMap, err } @@ -685,7 +727,7 @@ func (self *manager) getRequestedContainers(containerName string, options v2.Req if containerName != "/" { return containersMap, fmt.Errorf("invalid request for docker container %q with subcontainers", containerName) } - containersMap = self.getAllDockerContainers() + containersMap = m.getAllDockerContainers() } default: return containersMap, fmt.Errorf("invalid request type %q", options.IdType) @@ -705,32 +747,32 @@ func (self *manager) getRequestedContainers(containerName string, options v2.Req return containersMap, nil } -func (self *manager) GetDirFsInfo(dir string) (v2.FsInfo, error) { - device, err := self.fsInfo.GetDirFsDevice(dir) +func (m *manager) GetDirFsInfo(dir string) (v2.FsInfo, error) { + device, err := m.fsInfo.GetDirFsDevice(dir) if err != nil { return v2.FsInfo{}, fmt.Errorf("failed to get device for dir %q: %v", dir, err) } - return self.getFsInfoByDeviceName(device.Device) + return m.getFsInfoByDeviceName(device.Device) } -func (self *manager) GetFsInfoByFsUUID(uuid string) (v2.FsInfo, error) { - device, err := self.fsInfo.GetDeviceInfoByFsUUID(uuid) +func (m *manager) GetFsInfoByFsUUID(uuid string) (v2.FsInfo, error) { + device, err := m.fsInfo.GetDeviceInfoByFsUUID(uuid) if err != nil { return v2.FsInfo{}, err } - return self.getFsInfoByDeviceName(device.Device) + return m.getFsInfoByDeviceName(device.Device) } -func (self *manager) GetFsInfo(label string) ([]v2.FsInfo, error) { +func (m *manager) GetFsInfo(label string) ([]v2.FsInfo, error) { var empty time.Time // Get latest data from filesystems hanging off root container. - stats, err := self.memoryCache.RecentStats("/", empty, empty, 1) + stats, err := m.memoryCache.RecentStats("/", empty, empty, 1) if err != nil { return nil, err } dev := "" if len(label) != 0 { - dev, err = self.fsInfo.GetDeviceForLabel(label) + dev, err = m.fsInfo.GetDeviceForLabel(label) if err != nil { return nil, err } @@ -741,11 +783,11 @@ func (self *manager) GetFsInfo(label string) ([]v2.FsInfo, error) { if len(label) != 0 && fs.Device != dev { continue } - mountpoint, err := self.fsInfo.GetMountpointForDevice(fs.Device) + mountpoint, err := m.fsInfo.GetMountpointForDevice(fs.Device) if err != nil { return nil, err } - labels, err := self.fsInfo.GetLabelsForDevice(fs.Device) + labels, err := m.fsInfo.GetLabelsForDevice(fs.Device) if err != nil { return nil, err } @@ -771,8 +813,7 @@ func (self *manager) GetFsInfo(label string) ([]v2.FsInfo, error) { func (m *manager) GetMachineInfo() (*info.MachineInfo, error) { m.machineMu.RLock() defer m.machineMu.RUnlock() - // Copy and return the MachineInfo. - return &m.machineInfo, nil + return m.machineInfo.Clone(), nil } func (m *manager) GetVersionInfo() (*info.VersionInfo, error) { @@ -784,18 +825,15 @@ func (m *manager) GetVersionInfo() (*info.VersionInfo, error) { } func (m *manager) Exists(containerName string) bool { - m.containersLock.Lock() - defer m.containersLock.Unlock() + m.containersLock.RLock() + defer m.containersLock.RUnlock() namespacedName := namespacedContainerName{ Name: containerName, } _, ok := m.containers[namespacedName] - if ok { - return true - } - return false + return ok } func (m *manager) GetProcessList(containerName string, options v2.RequestOptions) ([]v2.ProcessInfo, error) { @@ -830,7 +868,7 @@ func (m *manager) registerCollectors(collectorConfigs map[string]string, cont *c klog.V(4).Infof("Got config from %q: %q", v, configFile) if strings.HasPrefix(k, "prometheus") || strings.HasPrefix(k, "Prometheus") { - newCollector, err := collector.NewPrometheusCollector(k, configFile, *applicationMetricsCountLimit, cont.handler, m.collectorHttpClient) + newCollector, err := collector.NewPrometheusCollector(k, configFile, *applicationMetricsCountLimit, cont.handler, m.collectorHTTPClient) if err != nil { return fmt.Errorf("failed to create collector for container %q, config %q: %v", cont.info.Name, k, err) } @@ -839,7 +877,7 @@ func (m *manager) registerCollectors(collectorConfigs map[string]string, cont *c return fmt.Errorf("failed to register collector for container %q, config %q: %v", cont.info.Name, k, err) } } else { - newCollector, err := collector.NewCollector(k, configFile, *applicationMetricsCountLimit, cont.handler, m.collectorHttpClient) + newCollector, err := collector.NewCollector(k, configFile, *applicationMetricsCountLimit, cont.handler, m.collectorHTTPClient) if err != nil { return fmt.Errorf("failed to create collector for container %q, config %q: %v", cont.info.Name, k, err) } @@ -852,35 +890,6 @@ func (m *manager) registerCollectors(collectorConfigs map[string]string, cont *c return nil } -// Enables overwriting an existing containerData/Handler object for a given containerName. -// Can't use createContainer as it just returns if a given containerName has a handler already. -// Ex: rkt handler will want to take priority over the raw handler, but the raw handler might be created first. - -// Only allow raw handler to be overridden -func (m *manager) overrideContainer(containerName string, watchSource watcher.ContainerWatchSource) error { - m.containersLock.Lock() - defer m.containersLock.Unlock() - - namespacedName := namespacedContainerName{ - Name: containerName, - } - - if _, ok := m.containers[namespacedName]; ok { - containerData := m.containers[namespacedName] - - if containerData.handler.Type() != container.ContainerTypeRaw { - return nil - } - - err := m.destroyContainerLocked(containerName) - if err != nil { - return fmt.Errorf("overrideContainer: failed to destroy containerData/handler for %v: %v", containerName, err) - } - } - - return m.createContainerLocked(containerName, watchSource) -} - // Create a container. func (m *manager) createContainer(containerName string, watchSource watcher.ContainerWatchSource) error { m.containersLock.Lock() @@ -918,14 +927,42 @@ func (m *manager) createContainerLocked(containerName string, watchSource watche if err != nil { return err } - if !cgroups.IsCgroup2UnifiedMode() { + + if cgroups.IsCgroup2UnifiedMode() { + perfCgroupPath := path.Join(fs2.UnifiedMountpoint, containerName) + cont.perfCollector, err = m.perfManager.GetCollector(perfCgroupPath) + if err != nil { + klog.V(4).Infof("perf_event metrics will not be available for container %s: %s", containerName, err) + } + } else { devicesCgroupPath, err := handler.GetCgroupPath("devices") if err != nil { klog.Warningf("Error getting devices cgroup path: %v", err) } else { cont.nvidiaCollector, err = m.nvidiaManager.GetCollector(devicesCgroupPath) if err != nil { - klog.V(4).Infof("GPU metrics may be unavailable/incomplete for container %q: %v", cont.info.Name, err) + klog.V(4).Infof("GPU metrics may be unavailable/incomplete for container %s: %s", cont.info.Name, err) + } + } + perfCgroupPath, err := handler.GetCgroupPath("perf_event") + if err != nil { + klog.Warningf("Error getting perf_event cgroup path: %q", err) + } else { + cont.perfCollector, err = m.perfManager.GetCollector(perfCgroupPath) + if err != nil { + klog.V(4).Infof("perf_event metrics will not be available for container %s: %s", containerName, err) + } + } + } + + if m.includedMetrics.Has(container.ResctrlMetrics) { + resctrlPath, err := intelrdt.GetIntelRdtPath(containerName) + if err != nil { + klog.V(4).Infof("Error getting resctrl path: %q", err) + } else { + cont.resctrlCollector, err = m.resctrlManager.GetCollector(resctrlPath) + if err != nil { + klog.V(4).Infof("resctrl metrics will not be available for container %s: %s", cont.info.Name, err) } } } @@ -1099,16 +1136,16 @@ func (m *manager) detectSubcontainers(containerName string) error { } // Watches for new containers started in the system. Runs forever unless there is a setup error. -func (self *manager) watchForNewContainers(quit chan error) error { - for _, watcher := range self.containerWatchers { - err := watcher.Start(self.eventsChannel) +func (m *manager) watchForNewContainers(quit chan error) error { + for _, watcher := range m.containerWatchers { + err := watcher.Start(m.eventsChannel) if err != nil { return err } } // There is a race between starting the watch and new container creation so we do a detection before we read new containers. - err := self.detectSubcontainers("/") + err := m.detectSubcontainers("/") if err != nil { return err } @@ -1117,15 +1154,15 @@ func (self *manager) watchForNewContainers(quit chan error) error { go func() { for { select { - case event := <-self.eventsChannel: + case event := <-m.eventsChannel: switch { case event.EventType == watcher.ContainerAdd: switch event.WatchSource { default: - err = self.createContainer(event.Name, event.WatchSource) + err = m.createContainer(event.Name, event.WatchSource) } case event.EventType == watcher.ContainerDelete: - err = self.destroyContainer(event.Name) + err = m.destroyContainer(event.Name) } if err != nil { klog.Warningf("Failed to process watch event %+v: %v", event, err) @@ -1134,7 +1171,7 @@ func (self *manager) watchForNewContainers(quit chan error) error { var errs partialFailure // Stop processing events if asked to quit. - for i, watcher := range self.containerWatchers { + for i, watcher := range m.containerWatchers { err := watcher.Stop() if err != nil { errs.append(fmt.Sprintf("watcher %d", i), "Stop", err) @@ -1154,7 +1191,7 @@ func (self *manager) watchForNewContainers(quit chan error) error { return nil } -func (self *manager) watchForNewOoms() error { +func (m *manager) watchForNewOoms() error { klog.V(2).Infof("Started watching for new ooms in manager") outStream := make(chan *oomparser.OomInstance, 10) oomLog, err := oomparser.New() @@ -1171,7 +1208,7 @@ func (self *manager) watchForNewOoms() error { Timestamp: oomInstance.TimeOfDeath, EventType: info.EventOom, } - err := self.eventHandler.AddEvent(newEvent) + err := m.eventHandler.AddEvent(newEvent) if err != nil { klog.Errorf("failed to add OOM event for %q: %v", oomInstance.ContainerName, err) } @@ -1188,7 +1225,7 @@ func (self *manager) watchForNewOoms() error { }, }, } - err = self.eventHandler.AddEvent(newEvent) + err = m.eventHandler.AddEvent(newEvent) if err != nil { klog.Errorf("failed to add OOM kill event for %q: %v", oomInstance.ContainerName, err) } @@ -1198,18 +1235,18 @@ func (self *manager) watchForNewOoms() error { } // can be called by the api which will take events returned on the channel -func (self *manager) WatchForEvents(request *events.Request) (*events.EventChannel, error) { - return self.eventHandler.WatchEvents(request) +func (m *manager) WatchForEvents(request *events.Request) (*events.EventChannel, error) { + return m.eventHandler.WatchEvents(request) } // can be called by the api which will return all events satisfying the request -func (self *manager) GetPastEvents(request *events.Request) ([]*info.Event, error) { - return self.eventHandler.GetEvents(request) +func (m *manager) GetPastEvents(request *events.Request) ([]*info.Event, error) { + return m.eventHandler.GetEvents(request) } // called by the api when a client is no longer listening to the channel -func (self *manager) CloseEventChannel(watch_id int) { - self.eventHandler.StopWatch(watch_id) +func (m *manager) CloseEventChannel(watchID int) { + m.eventHandler.StopWatch(watchID) } // Parses the events StoragePolicy from the flags. @@ -1302,12 +1339,12 @@ func (m *manager) DebugInfo() map[string][]string { return debugInfo } -func (self *manager) getFsInfoByDeviceName(deviceName string) (v2.FsInfo, error) { - mountPoint, err := self.fsInfo.GetMountpointForDevice(deviceName) +func (m *manager) getFsInfoByDeviceName(deviceName string) (v2.FsInfo, error) { + mountPoint, err := m.fsInfo.GetMountpointForDevice(deviceName) if err != nil { return v2.FsInfo{}, fmt.Errorf("failed to get mount point for device %q: %v", deviceName, err) } - infos, err := self.GetFsInfo("") + infos, err := m.GetFsInfo("") if err != nil { return v2.FsInfo{}, err } @@ -1321,22 +1358,22 @@ func (self *manager) getFsInfoByDeviceName(deviceName string) (v2.FsInfo, error) func getVersionInfo() (*info.VersionInfo, error) { - kernel_version := machine.KernelVersion() - container_os := machine.ContainerOsVersion() - docker_version, err := docker.VersionString() + kernelVersion := machine.KernelVersion() + osVersion := machine.ContainerOsVersion() + dockerVersion, err := docker.VersionString() if err != nil { return nil, err } - docker_api_version, err := docker.APIVersionString() + dockerAPIVersion, err := docker.APIVersionString() if err != nil { return nil, err } return &info.VersionInfo{ - KernelVersion: kernel_version, - ContainerOsVersion: container_os, - DockerVersion: docker_version, - DockerAPIVersion: docker_api_version, + KernelVersion: kernelVersion, + ContainerOsVersion: osVersion, + DockerVersion: dockerVersion, + DockerAPIVersion: dockerAPIVersion, CadvisorVersion: version.Info["version"], CadvisorRevision: version.Info["revision"], }, nil diff --git a/vendor/github.com/google/cadvisor/metrics/metrics.go b/vendor/github.com/google/cadvisor/metrics/metrics.go new file mode 100644 index 00000000000..f314f631d7c --- /dev/null +++ b/vendor/github.com/google/cadvisor/metrics/metrics.go @@ -0,0 +1,42 @@ +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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 metrics + +import ( + "time" + + info "github.com/google/cadvisor/info/v1" + v2 "github.com/google/cadvisor/info/v2" +) + +// metricValue describes a single metric value for a given set of label values +// within a parent containerMetric. +type metricValue struct { + value float64 + labels []string + timestamp time.Time +} + +type metricValues []metricValue + +// infoProvider will usually be manager.Manager, but can be swapped out for testing. +type infoProvider interface { + // GetRequestedContainersInfo gets info for all requested containers based on the request options. + GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*info.ContainerInfo, error) + // GetVersionInfo provides information about the version. + GetVersionInfo() (*info.VersionInfo, error) + // GetMachineInfo provides information about the machine. + GetMachineInfo() (*info.MachineInfo, error) +} diff --git a/vendor/github.com/google/cadvisor/metrics/prometheus.go b/vendor/github.com/google/cadvisor/metrics/prometheus.go index aefb6f27463..aab19a287a6 100644 --- a/vendor/github.com/google/cadvisor/metrics/prometheus.go +++ b/vendor/github.com/google/cadvisor/metrics/prometheus.go @@ -17,35 +17,18 @@ package metrics import ( "fmt" "regexp" + "strconv" "time" "github.com/google/cadvisor/container" info "github.com/google/cadvisor/info/v1" + v2 "github.com/google/cadvisor/info/v2" + "github.com/prometheus/client_golang/prometheus" - "k8s.io/klog" + "k8s.io/klog/v2" + "k8s.io/utils/clock" ) -// infoProvider will usually be manager.Manager, but can be swapped out for testing. -type infoProvider interface { - // SubcontainersInfo provides information about all subcontainers of the - // specified container including itself. - SubcontainersInfo(containerName string, query *info.ContainerInfoRequest) ([]*info.ContainerInfo, error) - // GetVersionInfo provides information about the version. - GetVersionInfo() (*info.VersionInfo, error) - // GetMachineInfo provides information about the machine. - GetMachineInfo() (*info.MachineInfo, error) -} - -// metricValue describes a single metric value for a given set of label values -// within a parent containerMetric. -type metricValue struct { - value float64 - labels []string - timestamp time.Time -} - -type metricValues []metricValue - // asFloat64 converts a uint64 into a float64. func asFloat64(v uint64) float64 { return float64(v) } @@ -115,13 +98,14 @@ type PrometheusCollector struct { containerMetrics []containerMetric containerLabelsFunc ContainerLabelsFunc includedMetrics container.MetricSet + opts v2.RequestOptions } // NewPrometheusCollector returns a new PrometheusCollector. The passed // ContainerLabelsFunc specifies which base labels will be attached to all // exported metrics. If left to nil, the DefaultContainerLabels function // will be used instead. -func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetrics container.MetricSet) *PrometheusCollector { +func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetrics container.MetricSet, now clock.Clock, opts v2.RequestOptions) *PrometheusCollector { if f == nil { f = DefaultContainerLabels } @@ -140,13 +124,14 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri valueType: prometheus.GaugeValue, getValues: func(s *info.ContainerStats) metricValues { return metricValues{{ - value: float64(time.Now().Unix()), - timestamp: time.Now(), + value: float64(now.Now().Unix()), + timestamp: now.Now(), }} }, }, }, includedMetrics: includedMetrics, + opts: opts, } if includedMetrics.Has(container.CpuUsageMetrics) { c.containerMetrics = append(c.containerMetrics, []containerMetric{ @@ -321,6 +306,60 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri }, }...) } + if includedMetrics.Has(container.HugetlbUsageMetrics) { + c.containerMetrics = append(c.containerMetrics, []containerMetric{ + { + name: "container_hugetlb_failcnt", + help: "Number of hugepage usage hits limits", + valueType: prometheus.CounterValue, + extraLabels: []string{"pagesize"}, + getValues: func(s *info.ContainerStats) metricValues { + values := make(metricValues, 0, len(s.Hugetlb)) + for k, v := range s.Hugetlb { + values = append(values, metricValue{ + value: float64(v.Failcnt), + labels: []string{k}, + timestamp: s.Timestamp, + }) + } + return values + }, + }, { + name: "container_hugetlb_usage_bytes", + help: "Current hugepage usage in bytes", + valueType: prometheus.GaugeValue, + extraLabels: []string{"pagesize"}, + getValues: func(s *info.ContainerStats) metricValues { + values := make(metricValues, 0, len(s.Hugetlb)) + for k, v := range s.Hugetlb { + values = append(values, metricValue{ + value: float64(v.Usage), + labels: []string{k}, + timestamp: s.Timestamp, + }) + } + return values + }, + }, + { + name: "container_hugetlb_max_usage_bytes", + help: "Maximum hugepage usage recorded in bytes", + valueType: prometheus.GaugeValue, + extraLabels: []string{"pagesize"}, + getValues: func(s *info.ContainerStats) metricValues { + values := make(metricValues, 0, len(s.Hugetlb)) + for k, v := range s.Hugetlb { + values = append(values, metricValue{ + value: float64(v.MaxUsage), + labels: []string{k}, + timestamp: s.Timestamp, + }) + } + return values + }, + }, + }...) + } if includedMetrics.Has(container.MemoryUsageMetrics) { c.containerMetrics = append(c.containerMetrics, []containerMetric{ { @@ -961,6 +1000,417 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri }, }...) } + if includedMetrics.Has(container.NetworkAdvancedTcpUsageMetrics) { + c.containerMetrics = append(c.containerMetrics, []containerMetric{ + { + name: "container_network_advance_tcp_stats_total", + help: "advance tcp connections statistic for container", + valueType: prometheus.GaugeValue, + extraLabels: []string{"tcp_state"}, + getValues: func(s *info.ContainerStats) metricValues { + return metricValues{ + { + value: float64(s.Network.TcpAdvanced.RtoAlgorithm), + labels: []string{"rtoalgorithm"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.RtoMin), + labels: []string{"rtomin"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.RtoMax), + labels: []string{"rtomax"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.MaxConn), + labels: []string{"maxconn"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.ActiveOpens), + labels: []string{"activeopens"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.PassiveOpens), + labels: []string{"passiveopens"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.AttemptFails), + labels: []string{"attemptfails"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.EstabResets), + labels: []string{"estabresets"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.CurrEstab), + labels: []string{"currestab"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.InSegs), + labels: []string{"insegs"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.OutSegs), + labels: []string{"outsegs"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.RetransSegs), + labels: []string{"retranssegs"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.InErrs), + labels: []string{"inerrs"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.OutRsts), + labels: []string{"outrsts"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.InCsumErrors), + labels: []string{"incsumerrors"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.EmbryonicRsts), + labels: []string{"embryonicrsts"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.SyncookiesSent), + labels: []string{"syncookiessent"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.SyncookiesRecv), + labels: []string{"syncookiesrecv"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.SyncookiesFailed), + labels: []string{"syncookiesfailed"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.PruneCalled), + labels: []string{"prunecalled"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.RcvPruned), + labels: []string{"rcvpruned"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.OfoPruned), + labels: []string{"ofopruned"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.OutOfWindowIcmps), + labels: []string{"outofwindowicmps"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.LockDroppedIcmps), + labels: []string{"lockdroppedicmps"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TW), + labels: []string{"tw"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TWRecycled), + labels: []string{"twrecycled"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TWKilled), + labels: []string{"twkilled"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPTimeWaitOverflow), + labels: []string{"tcptimewaitoverflow"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPTimeouts), + labels: []string{"tcptimeouts"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSpuriousRTOs), + labels: []string{"tcpspuriousrtos"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPLossProbes), + labels: []string{"tcplossprobes"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPLossProbeRecovery), + labels: []string{"tcplossproberecovery"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPRenoRecoveryFail), + labels: []string{"tcprenorecoveryfail"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSackRecoveryFail), + labels: []string{"tcpsackrecoveryfail"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPRenoFailures), + labels: []string{"tcprenofailures"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSackFailures), + labels: []string{"tcpsackfailures"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPLossFailures), + labels: []string{"tcplossfailures"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.DelayedACKs), + labels: []string{"delayedacks"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.DelayedACKLocked), + labels: []string{"delayedacklocked"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.DelayedACKLost), + labels: []string{"delayedacklost"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.ListenOverflows), + labels: []string{"listenoverflows"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.ListenDrops), + labels: []string{"listendrops"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPHPHits), + labels: []string{"tcphphits"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPPureAcks), + labels: []string{"tcppureacks"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPHPAcks), + labels: []string{"tcphpacks"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPRenoRecovery), + labels: []string{"tcprenorecovery"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSackRecovery), + labels: []string{"tcpsackrecovery"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSACKReneging), + labels: []string{"tcpsackreneging"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPFACKReorder), + labels: []string{"tcpfackreorder"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSACKReorder), + labels: []string{"tcpsackreorder"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPRenoReorder), + labels: []string{"tcprenoreorder"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPTSReorder), + labels: []string{"tcptsreorder"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPFullUndo), + labels: []string{"tcpfullundo"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPPartialUndo), + labels: []string{"tcppartialundo"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPDSACKUndo), + labels: []string{"tcpdsackundo"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPLossUndo), + labels: []string{"tcplossundo"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPFastRetrans), + labels: []string{"tcpfastretrans"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSlowStartRetrans), + labels: []string{"tcpslowstartretrans"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPLostRetransmit), + labels: []string{"tcplostretransmit"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPRetransFail), + labels: []string{"tcpretransfail"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPRcvCollapsed), + labels: []string{"tcprcvcollapsed"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPDSACKOldSent), + labels: []string{"tcpdsackoldsent"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPDSACKOfoSent), + labels: []string{"tcpdsackofosent"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPDSACKRecv), + labels: []string{"tcpdsackrecv"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPDSACKOfoRecv), + labels: []string{"tcpdsackoforecv"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPAbortOnData), + labels: []string{"tcpabortondata"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPAbortOnClose), + labels: []string{"tcpabortonclose"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPAbortOnMemory), + labels: []string{"tcpabortonmemory"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPAbortOnTimeout), + labels: []string{"tcpabortontimeout"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPAbortOnLinger), + labels: []string{"tcpabortonlinger"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPAbortFailed), + labels: []string{"tcpabortfailed"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPMemoryPressures), + labels: []string{"tcpmemorypressures"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPMemoryPressuresChrono), + labels: []string{"tcpmemorypressureschrono"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSACKDiscard), + labels: []string{"tcpsackdiscard"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPDSACKIgnoredOld), + labels: []string{"tcpdsackignoredold"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPDSACKIgnoredNoUndo), + labels: []string{"tcpdsackignorednoundo"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPMD5NotFound), + labels: []string{"tcpmd5notfound"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPMD5Unexpected), + labels: []string{"tcpmd5unexpected"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPMD5Failure), + labels: []string{"tcpmd5failure"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSackShifted), + labels: []string{"tcpsackshifted"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSackMerged), + labels: []string{"tcpsackmerged"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSackShiftFallback), + labels: []string{"tcpsackshiftfallback"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPBacklogDrop), + labels: []string{"tcpbacklogdrop"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.PFMemallocDrop), + labels: []string{"pfmemallocdrop"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPMinTTLDrop), + labels: []string{"tcpminttldrop"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPDeferAcceptDrop), + labels: []string{"tcpdeferacceptdrop"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.IPReversePathFilter), + labels: []string{"ipreversepathfilter"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPReqQFullDoCookies), + labels: []string{"tcpreqqfulldocookies"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPReqQFullDrop), + labels: []string{"tcpreqqfulldrop"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPFastOpenActive), + labels: []string{"tcpfastopenactive"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPFastOpenActiveFail), + labels: []string{"tcpfastopenactivefail"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPFastOpenPassive), + labels: []string{"tcpfastopenpassive"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPFastOpenPassiveFail), + labels: []string{"tcpfastopenpassivefail"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPFastOpenListenOverflow), + labels: []string{"tcpfastopenlistenoverflow"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPFastOpenCookieReqd), + labels: []string{"tcpfastopencookiereqd"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPSynRetrans), + labels: []string{"tcpsynretrans"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.TCPOrigDataSent), + labels: []string{"tcporigdatasent"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.PAWSActive), + labels: []string{"pawsactive"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvanced.PAWSEstab), + labels: []string{"pawsestab"}, + timestamp: s.Timestamp, + }, + } + }, + }, + }...) + } if includedMetrics.Has(container.NetworkUdpUsageMetrics) { c.containerMetrics = append(c.containerMetrics, []containerMetric{ { @@ -1079,17 +1529,176 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri } }, }, + { + name: "container_ulimits_soft", + help: "Soft ulimit values for the container root process. Unlimited if -1, except priority and nice", + valueType: prometheus.GaugeValue, + extraLabels: []string{"ulimit"}, + getValues: func(s *info.ContainerStats) metricValues { + values := make(metricValues, 0, len(s.Processes.Ulimits)) + for _, ulimit := range s.Processes.Ulimits { + values = append(values, metricValue{ + value: float64(ulimit.SoftLimit), + labels: []string{ulimit.Name}, + timestamp: s.Timestamp, + }) + } + return values + }, + }, + }...) + } + if includedMetrics.Has(container.PerfMetrics) { + c.containerMetrics = append(c.containerMetrics, []containerMetric{ + { + name: "container_perf_events_total", + help: "Perf event metric.", + valueType: prometheus.CounterValue, + extraLabels: []string{"cpu", "event"}, + getValues: func(s *info.ContainerStats) metricValues { + values := make(metricValues, 0, len(s.PerfStats)) + for _, metric := range s.PerfStats { + values = append(values, metricValue{ + value: float64(metric.Value), + labels: []string{strconv.Itoa(metric.Cpu), metric.Name}, + timestamp: s.Timestamp, + }) + } + return values + }, + }, + { + name: "container_perf_events_scaling_ratio", + help: "Perf event metric scaling ratio.", + valueType: prometheus.GaugeValue, + extraLabels: []string{"cpu", "event"}, + getValues: func(s *info.ContainerStats) metricValues { + values := make(metricValues, 0, len(s.PerfStats)) + for _, metric := range s.PerfStats { + values = append(values, metricValue{ + value: metric.ScalingRatio, + labels: []string{strconv.Itoa(metric.Cpu), metric.Name}, + timestamp: s.Timestamp, + }) + } + return values + }, + }, + { + name: "container_perf_uncore_events_total", + help: "Perf uncore event metric.", + valueType: prometheus.CounterValue, + extraLabels: []string{"socket", "event", "pmu"}, + getValues: func(s *info.ContainerStats) metricValues { + values := make(metricValues, 0, len(s.PerfUncoreStats)) + for _, metric := range s.PerfUncoreStats { + values = append(values, metricValue{ + value: float64(metric.Value), + labels: []string{strconv.Itoa(metric.Socket), metric.Name, metric.PMU}, + timestamp: s.Timestamp, + }) + } + return values + }, + }, + { + name: "container_perf_uncore_events_scaling_ratio", + help: "Perf uncore event metric scaling ratio.", + valueType: prometheus.GaugeValue, + extraLabels: []string{"socket", "event", "pmu"}, + getValues: func(s *info.ContainerStats) metricValues { + values := make(metricValues, 0, len(s.PerfUncoreStats)) + for _, metric := range s.PerfUncoreStats { + values = append(values, metricValue{ + value: metric.ScalingRatio, + labels: []string{strconv.Itoa(metric.Socket), metric.Name, metric.PMU}, + timestamp: s.Timestamp, + }) + } + return values + }, + }, + }...) + } + if includedMetrics.Has(container.ReferencedMemoryMetrics) { + c.containerMetrics = append(c.containerMetrics, []containerMetric{ + { + name: "container_referenced_bytes", + help: "Container referenced bytes during last measurements cycle", + valueType: prometheus.GaugeValue, + getValues: func(s *info.ContainerStats) metricValues { + return metricValues{{value: float64(s.ReferencedMemory), timestamp: s.Timestamp}} + }, + }, + }...) + } + if includedMetrics.Has(container.ResctrlMetrics) { + c.containerMetrics = append(c.containerMetrics, []containerMetric{ + { + name: "container_memory_bandwidth_bytes", + help: "Total memory bandwidth usage statistics for container counted with RDT Memory Bandwidth Monitoring (MBM).", + valueType: prometheus.GaugeValue, + extraLabels: []string{prometheusNodeLabelName}, + getValues: func(s *info.ContainerStats) metricValues { + numberOfNUMANodes := len(s.Resctrl.MemoryBandwidth) + metrics := make(metricValues, numberOfNUMANodes) + for numaNode, stats := range s.Resctrl.MemoryBandwidth { + metrics[numaNode] = metricValue{ + value: float64(stats.TotalBytes), + timestamp: s.Timestamp, + labels: []string{strconv.Itoa(numaNode)}, + } + } + return metrics + }, + }, + { + name: "container_memory_bandwidth_local_bytes", + help: "Local memory bandwidth usage statistics for container counted with RDT Memory Bandwidth Monitoring (MBM).", + valueType: prometheus.GaugeValue, + extraLabels: []string{prometheusNodeLabelName}, + getValues: func(s *info.ContainerStats) metricValues { + numberOfNUMANodes := len(s.Resctrl.MemoryBandwidth) + metrics := make(metricValues, numberOfNUMANodes) + for numaNode, stats := range s.Resctrl.MemoryBandwidth { + metrics[numaNode] = metricValue{ + value: float64(stats.LocalBytes), + timestamp: s.Timestamp, + labels: []string{strconv.Itoa(numaNode)}, + } + } + return metrics + }, + }, + { + name: "container_llc_occupancy_bytes", + help: "Last level cache usage statistics for container counted with RDT Memory Bandwidth Monitoring (MBM).", + valueType: prometheus.GaugeValue, + extraLabels: []string{prometheusNodeLabelName}, + getValues: func(s *info.ContainerStats) metricValues { + numberOfNUMANodes := len(s.Resctrl.Cache) + metrics := make(metricValues, numberOfNUMANodes) + for numaNode, stats := range s.Resctrl.Cache { + metrics[numaNode] = metricValue{ + value: float64(stats.LLCOccupancy), + timestamp: s.Timestamp, + labels: []string{strconv.Itoa(numaNode)}, + } + } + return metrics + }, + }, }...) - } - return c } var ( - versionInfoDesc = prometheus.NewDesc("cadvisor_version_info", "A metric with a constant '1' value labeled by kernel version, OS version, docker version, cadvisor version & cadvisor revision.", []string{"kernelVersion", "osVersion", "dockerVersion", "cadvisorVersion", "cadvisorRevision"}, nil) - machineInfoCoresDesc = prometheus.NewDesc("machine_cpu_cores", "Number of CPU cores on the machine.", nil, nil) - machineInfoMemoryDesc = prometheus.NewDesc("machine_memory_bytes", "Amount of memory installed on the machine.", nil, nil) + versionInfoDesc = prometheus.NewDesc("cadvisor_version_info", "A metric with a constant '1' value labeled by kernel version, OS version, docker version, cadvisor version & cadvisor revision.", []string{"kernelVersion", "osVersion", "dockerVersion", "cadvisorVersion", "cadvisorRevision"}, nil) + startTimeDesc = prometheus.NewDesc("container_start_time_seconds", "Start time of the container since unix epoch in seconds.", nil, nil) + cpuPeriodDesc = prometheus.NewDesc("container_spec_cpu_period", "CPU period of the container.", nil, nil) + cpuQuotaDesc = prometheus.NewDesc("container_spec_cpu_quota", "CPU quota of the container.", nil, nil) + cpuSharesDesc = prometheus.NewDesc("container_spec_cpu_shares", "CPU share of the container.", nil, nil) ) // Describe describes all the metrics ever exported by cadvisor. It @@ -1099,16 +1708,17 @@ func (c *PrometheusCollector) Describe(ch chan<- *prometheus.Desc) { for _, cm := range c.containerMetrics { ch <- cm.desc([]string{}) } + ch <- startTimeDesc + ch <- cpuPeriodDesc + ch <- cpuQuotaDesc + ch <- cpuSharesDesc ch <- versionInfoDesc - ch <- machineInfoCoresDesc - ch <- machineInfoMemoryDesc } // Collect fetches the stats from all containers and delivers them as // Prometheus metrics. It implements prometheus.PrometheusCollector. func (c *PrometheusCollector) Collect(ch chan<- prometheus.Metric) { c.errors.Set(0) - c.collectMachineInfo(ch) c.collectVersionInfo(ch) c.collectContainersInfo(ch) c.errors.Collect(ch) @@ -1173,7 +1783,7 @@ func BaseContainerLabels(whiteList []string) func(container *info.ContainerInfo) } func (c *PrometheusCollector) collectContainersInfo(ch chan<- prometheus.Metric) { - containers, err := c.infoProvider.SubcontainersInfo("/", &info.ContainerInfoRequest{NumStats: 1}) + containers, err := c.infoProvider.GetRequestedContainersInfo("/", c.opts) if err != nil { c.errors.Set(1) klog.Warningf("Couldn't get containers: %s", err) @@ -1246,6 +1856,22 @@ func (c *PrometheusCollector) collectContainersInfo(ch chan<- prometheus.Metric) ) } } + if c.includedMetrics.Has(container.AppMetrics) { + for metricLabel, v := range stats.CustomMetrics { + for _, metric := range v { + clabels := make([]string, len(rawLabels), len(rawLabels)+len(metric.Labels)) + cvalues := make([]string, len(rawLabels), len(rawLabels)+len(metric.Labels)) + copy(clabels, labels) + copy(cvalues, values) + for label, value := range metric.Labels { + clabels = append(clabels, sanitizeLabelName("app_"+label)) + cvalues = append(cvalues, value) + } + desc := prometheus.NewDesc(metricLabel, "Custom application metric.", clabels, nil) + ch <- prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, float64(metric.FloatValue), cvalues...) + } + } + } } } @@ -1259,17 +1885,6 @@ func (c *PrometheusCollector) collectVersionInfo(ch chan<- prometheus.Metric) { ch <- prometheus.MustNewConstMetric(versionInfoDesc, prometheus.GaugeValue, 1, []string{versionInfo.KernelVersion, versionInfo.ContainerOsVersion, versionInfo.DockerVersion, versionInfo.CadvisorVersion, versionInfo.CadvisorRevision}...) } -func (c *PrometheusCollector) collectMachineInfo(ch chan<- prometheus.Metric) { - machineInfo, err := c.infoProvider.GetMachineInfo() - if err != nil { - c.errors.Set(1) - klog.Warningf("Couldn't get machine info: %s", err) - return - } - ch <- prometheus.MustNewConstMetric(machineInfoCoresDesc, prometheus.GaugeValue, float64(machineInfo.NumCores)) - ch <- prometheus.MustNewConstMetric(machineInfoMemoryDesc, prometheus.GaugeValue, float64(machineInfo.MemoryCapacity)) -} - // Size after which we consider memory to be "unlimited". This is not // MaxInt64 due to rounding by the kernel. const maxMemorySize = uint64(1 << 62) @@ -1281,10 +1896,10 @@ func specMemoryValue(v uint64) float64 { return float64(v) } -var invalidLabelCharRE = regexp.MustCompile(`[^a-zA-Z0-9_]`) +var invalidNameCharRE = regexp.MustCompile(`[^a-zA-Z0-9_]`) // sanitizeLabelName replaces anything that doesn't match // client_label.LabelNameRE with an underscore. func sanitizeLabelName(name string) string { - return invalidLabelCharRE.ReplaceAllString(name, "_") + return invalidNameCharRE.ReplaceAllString(name, "_") } diff --git a/vendor/github.com/google/cadvisor/metrics/prometheus_fake.go b/vendor/github.com/google/cadvisor/metrics/prometheus_fake.go new file mode 100644 index 00000000000..2ce5114b2cf --- /dev/null +++ b/vendor/github.com/google/cadvisor/metrics/prometheus_fake.go @@ -0,0 +1,720 @@ +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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 metrics + +import ( + "errors" + "time" + + info "github.com/google/cadvisor/info/v1" + v2 "github.com/google/cadvisor/info/v2" +) + +type testSubcontainersInfoProvider struct{} + +func (p testSubcontainersInfoProvider) GetVersionInfo() (*info.VersionInfo, error) { + return &info.VersionInfo{ + KernelVersion: "4.1.6-200.fc22.x86_64", + ContainerOsVersion: "Fedora 22 (Twenty Two)", + DockerVersion: "1.8.1", + CadvisorVersion: "0.16.0", + CadvisorRevision: "abcdef", + }, nil +} + +func (p testSubcontainersInfoProvider) GetMachineInfo() (*info.MachineInfo, error) { + return &info.MachineInfo{ + Timestamp: time.Unix(1395066363, 0), + NumCores: 4, + NumPhysicalCores: 1, + NumSockets: 1, + MemoryCapacity: 1024, + MemoryByType: map[string]*info.MemoryInfo{ + "Non-volatile-RAM": {Capacity: 2168421613568, DimmCount: 8}, + "Unbuffered-DDR4": {Capacity: 412316860416, DimmCount: 12}, + }, + NVMInfo: info.NVMInfo{ + MemoryModeCapacity: 429496729600, + AppDirectModeCapacity: 1735166787584, + }, + MachineID: "machine-id-test", + SystemUUID: "system-uuid-test", + BootID: "boot-id-test", + Topology: []info.Node{ + { + Id: 0, + Memory: 33604804608, + HugePages: []info.HugePagesInfo{ + { + PageSize: uint64(1048576), + NumPages: uint64(0), + }, + { + PageSize: uint64(2048), + NumPages: uint64(0), + }, + }, + Cores: []info.Core{ + { + Id: 0, + Threads: []int{0, 1}, + Caches: []info.Cache{ + { + Size: 32768, + Type: "Data", + Level: 1, + }, + { + Size: 32768, + Type: "Instruction", + Level: 1, + }, + { + Size: 262144, + Type: "Unified", + Level: 2, + }, + }, + }, + { + Id: 1, + Threads: []int{2, 3}, + Caches: []info.Cache{ + { + Size: 32764, + Type: "Data", + Level: 1, + }, + { + Size: 32764, + Type: "Instruction", + Level: 1, + }, + { + Size: 262148, + Type: "Unified", + Level: 2, + }, + }, + }, + + { + Id: 2, + Threads: []int{4, 5}, + Caches: []info.Cache{ + { + Size: 32768, + Type: "Data", + Level: 1, + }, + { + Size: 32768, + Type: "Instruction", + Level: 1, + }, + { + Size: 262144, + Type: "Unified", + Level: 2, + }, + }, + }, + { + Id: 3, + Threads: []int{6, 7}, + Caches: []info.Cache{ + { + Size: 32764, + Type: "Data", + Level: 1, + }, + { + Size: 32764, + Type: "Instruction", + Level: 1, + }, + { + Size: 262148, + Type: "Unified", + Level: 2, + }, + }, + }, + }, + }, + { + Id: 1, + Memory: 33604804606, + HugePages: []info.HugePagesInfo{ + { + PageSize: uint64(1048576), + NumPages: uint64(2), + }, + { + PageSize: uint64(2048), + NumPages: uint64(4), + }, + }, + Cores: []info.Core{ + { + Id: 4, + Threads: []int{8, 9}, + Caches: []info.Cache{ + { + Size: 32768, + Type: "Data", + Level: 1, + }, + { + Size: 32768, + Type: "Instruction", + Level: 1, + }, + { + Size: 262144, + Type: "Unified", + Level: 2, + }, + }, + }, + { + Id: 5, + Threads: []int{10, 11}, + Caches: []info.Cache{ + { + Size: 32764, + Type: "Data", + Level: 1, + }, + { + Size: 32764, + Type: "Instruction", + Level: 1, + }, + { + Size: 262148, + Type: "Unified", + Level: 2, + }, + }, + }, + { + Id: 6, + Threads: []int{12, 13}, + Caches: []info.Cache{ + { + Size: 32768, + Type: "Data", + Level: 1, + }, + { + Size: 32768, + Type: "Instruction", + Level: 1, + }, + { + Size: 262144, + Type: "Unified", + Level: 2, + }, + }, + }, + { + Id: 7, + Threads: []int{14, 15}, + Caches: []info.Cache{ + { + Size: 32764, + Type: "Data", + Level: 1, + }, + { + Size: 32764, + Type: "Instruction", + Level: 1, + }, + { + Size: 262148, + Type: "Unified", + Level: 2, + }, + }, + }, + }, + Caches: []info.Cache{ + { + Size: 8388608, + Type: "Unified", + Level: 3, + }, + }, + }, + }, + }, nil +} + +func (p testSubcontainersInfoProvider) GetRequestedContainersInfo(string, v2.RequestOptions) (map[string]*info.ContainerInfo, error) { + return map[string]*info.ContainerInfo{ + "testcontainer": { + ContainerReference: info.ContainerReference{ + Name: "testcontainer", + Aliases: []string{"testcontaineralias"}, + }, + Spec: info.ContainerSpec{ + Image: "test", + HasCpu: true, + Cpu: info.CpuSpec{ + Limit: 1000, + Period: 100000, + Quota: 10000, + }, + Memory: info.MemorySpec{ + Limit: 2048, + Reservation: 1024, + SwapLimit: 4096, + }, + HasHugetlb: true, + HasProcesses: true, + Processes: info.ProcessSpec{ + Limit: 100, + }, + CreationTime: time.Unix(1257894000, 0), + Labels: map[string]string{ + "foo.label": "bar", + }, + Envs: map[string]string{ + "foo+env": "prod", + }, + }, + Stats: []*info.ContainerStats{ + { + Timestamp: time.Unix(1395066363, 0), + Cpu: info.CpuStats{ + Usage: info.CpuUsage{ + Total: 1, + PerCpu: []uint64{2, 3, 4, 5}, + User: 6, + System: 7, + }, + CFS: info.CpuCFS{ + Periods: 723, + ThrottledPeriods: 18, + ThrottledTime: 1724314000, + }, + Schedstat: info.CpuSchedstat{ + RunTime: 53643567, + RunqueueTime: 479424566378, + RunPeriods: 984285, + }, + LoadAverage: 2, + }, + Memory: info.MemoryStats{ + Usage: 8, + MaxUsage: 8, + WorkingSet: 9, + ContainerData: info.MemoryStatsMemoryData{ + Pgfault: 10, + Pgmajfault: 11, + }, + HierarchicalData: info.MemoryStatsMemoryData{ + Pgfault: 12, + Pgmajfault: 13, + }, + Cache: 14, + RSS: 15, + MappedFile: 16, + Swap: 8192, + }, + Hugetlb: map[string]info.HugetlbStats{ + "2Mi": { + Usage: 4, + MaxUsage: 10, + Failcnt: 1, + }, + "1Gi": { + Usage: 0, + MaxUsage: 0, + Failcnt: 0, + }, + }, + Network: info.NetworkStats{ + InterfaceStats: info.InterfaceStats{ + Name: "eth0", + RxBytes: 14, + RxPackets: 15, + RxErrors: 16, + RxDropped: 17, + TxBytes: 18, + TxPackets: 19, + TxErrors: 20, + TxDropped: 21, + }, + Interfaces: []info.InterfaceStats{ + { + Name: "eth0", + RxBytes: 14, + RxPackets: 15, + RxErrors: 16, + RxDropped: 17, + TxBytes: 18, + TxPackets: 19, + TxErrors: 20, + TxDropped: 21, + }, + }, + Tcp: info.TcpStat{ + Established: 13, + SynSent: 0, + SynRecv: 0, + FinWait1: 0, + FinWait2: 0, + TimeWait: 0, + Close: 0, + CloseWait: 0, + LastAck: 0, + Listen: 3, + Closing: 0, + }, + Tcp6: info.TcpStat{ + Established: 11, + SynSent: 0, + SynRecv: 0, + FinWait1: 0, + FinWait2: 0, + TimeWait: 0, + Close: 0, + CloseWait: 0, + LastAck: 0, + Listen: 3, + Closing: 0, + }, + TcpAdvanced: info.TcpAdvancedStat{ + TCPFullUndo: 2361, + TCPMD5NotFound: 0, + TCPDSACKRecv: 83680, + TCPSackShifted: 2, + TCPSackShiftFallback: 298, + PFMemallocDrop: 0, + EstabResets: 37, + InSegs: 140370590, + TCPPureAcks: 24251339, + TCPDSACKOldSent: 15633, + IPReversePathFilter: 0, + TCPFastOpenPassiveFail: 0, + InCsumErrors: 0, + TCPRenoFailures: 43414, + TCPMemoryPressuresChrono: 0, + TCPDeferAcceptDrop: 0, + TW: 10436427, + TCPSpuriousRTOs: 0, + TCPDSACKIgnoredNoUndo: 71885, + RtoMax: 120000, + ActiveOpens: 11038621, + EmbryonicRsts: 0, + RcvPruned: 0, + TCPLossProbeRecovery: 401, + TCPHPHits: 56096478, + TCPPartialUndo: 3, + TCPAbortOnMemory: 0, + AttemptFails: 48997, + RetransSegs: 462961, + SyncookiesFailed: 0, + OfoPruned: 0, + TCPAbortOnLinger: 0, + TCPAbortFailed: 0, + TCPRenoReorder: 839, + TCPRcvCollapsed: 0, + TCPDSACKIgnoredOld: 0, + TCPReqQFullDrop: 0, + OutOfWindowIcmps: 0, + TWKilled: 0, + TCPLossProbes: 88648, + TCPRenoRecoveryFail: 394, + TCPFastOpenCookieReqd: 0, + TCPHPAcks: 21490641, + TCPSACKReneging: 0, + TCPTSReorder: 3, + TCPSlowStartRetrans: 290832, + MaxConn: -1, + SyncookiesRecv: 0, + TCPSackFailures: 60, + DelayedACKLocked: 90, + TCPDSACKOfoSent: 1, + TCPSynRetrans: 988, + TCPDSACKOfoRecv: 10, + TCPSACKDiscard: 0, + TCPMD5Unexpected: 0, + TCPSackMerged: 6, + RtoMin: 200, + CurrEstab: 22, + TCPTimeWaitOverflow: 0, + ListenOverflows: 0, + DelayedACKs: 503975, + TCPLossUndo: 61374, + TCPOrigDataSent: 130698387, + TCPBacklogDrop: 0, + TCPReqQFullDoCookies: 0, + TCPFastOpenPassive: 0, + PAWSActive: 0, + OutRsts: 91699, + TCPSackRecoveryFail: 2, + DelayedACKLost: 18843, + TCPAbortOnData: 8, + TCPMinTTLDrop: 0, + PruneCalled: 0, + TWRecycled: 0, + ListenDrops: 0, + TCPAbortOnTimeout: 0, + SyncookiesSent: 0, + TCPSACKReorder: 11, + TCPDSACKUndo: 33, + TCPMD5Failure: 0, + TCPLostRetransmit: 0, + TCPAbortOnClose: 7, + TCPFastOpenListenOverflow: 0, + OutSegs: 211580512, + InErrs: 31, + TCPTimeouts: 27422, + TCPLossFailures: 729, + TCPSackRecovery: 159, + RtoAlgorithm: 1, + PassiveOpens: 59, + LockDroppedIcmps: 0, + TCPRenoRecovery: 3519, + TCPFACKReorder: 0, + TCPFastRetrans: 11794, + TCPRetransFail: 0, + TCPMemoryPressures: 0, + TCPFastOpenActive: 0, + TCPFastOpenActiveFail: 0, + PAWSEstab: 0, + }, + Udp: info.UdpStat{ + Listen: 0, + Dropped: 0, + RxQueued: 0, + TxQueued: 0, + }, + Udp6: info.UdpStat{ + Listen: 0, + Dropped: 0, + RxQueued: 0, + TxQueued: 0, + }, + }, + Filesystem: []info.FsStats{ + { + Device: "sda1", + InodesFree: 524288, + Inodes: 2097152, + Limit: 22, + Usage: 23, + ReadsCompleted: 24, + ReadsMerged: 25, + SectorsRead: 26, + ReadTime: 27, + WritesCompleted: 28, + WritesMerged: 39, + SectorsWritten: 40, + WriteTime: 41, + IoInProgress: 42, + IoTime: 43, + WeightedIoTime: 44, + }, + { + Device: "sda2", + InodesFree: 262144, + Inodes: 2097152, + Limit: 37, + Usage: 38, + ReadsCompleted: 39, + ReadsMerged: 40, + SectorsRead: 41, + ReadTime: 42, + WritesCompleted: 43, + WritesMerged: 44, + SectorsWritten: 45, + WriteTime: 46, + IoInProgress: 47, + IoTime: 48, + WeightedIoTime: 49, + }, + }, + Accelerators: []info.AcceleratorStats{ + { + Make: "nvidia", + Model: "tesla-p100", + ID: "GPU-deadbeef-1234-5678-90ab-feedfacecafe", + MemoryTotal: 20304050607, + MemoryUsed: 2030405060, + DutyCycle: 12, + }, + { + Make: "nvidia", + Model: "tesla-k80", + ID: "GPU-deadbeef-0123-4567-89ab-feedfacecafe", + MemoryTotal: 10203040506, + MemoryUsed: 1020304050, + DutyCycle: 6, + }, + }, + Processes: info.ProcessStats{ + ProcessCount: 1, + FdCount: 5, + SocketCount: 3, + ThreadsCurrent: 5, + ThreadsMax: 100, + Ulimits: []info.UlimitSpec{ + { + Name: "max_open_files", + SoftLimit: 16384, + HardLimit: 16384, + }, + }, + }, + TaskStats: info.LoadStats{ + NrSleeping: 50, + NrRunning: 51, + NrStopped: 52, + NrUninterruptible: 53, + NrIoWait: 54, + }, + CustomMetrics: map[string][]info.MetricVal{ + "container_custom_app_metric_1": { + { + FloatValue: float64(1.1), + Timestamp: time.Now(), + Label: "testlabel_1_1_1", + Labels: map[string]string{"test_label": "1_1", "test_label_2": "2_1"}, + }, + { + FloatValue: float64(1.2), + Timestamp: time.Now(), + Label: "testlabel_1_1_2", + Labels: map[string]string{"test_label": "1_2", "test_label_2": "2_2"}, + }, + }, + "container_custom_app_metric_2": { + { + FloatValue: float64(2), + Timestamp: time.Now(), + Label: "testlabel2", + Labels: map[string]string{"test_label": "test_value"}, + }, + }, + "container_custom_app_metric_3": { + { + FloatValue: float64(3), + Timestamp: time.Now(), + Label: "testlabel3", + Labels: map[string]string{"test_label": "test_value"}, + }, + }, + }, + PerfStats: []info.PerfStat{ + { + ScalingRatio: 1.0, + Value: 123, + Name: "instructions", + Cpu: 0, + }, + { + ScalingRatio: 0.5, + Value: 456, + Name: "instructions", + Cpu: 1, + }, + { + ScalingRatio: 0.66666666666, + Value: 321, + Name: "instructions_retired", + Cpu: 0, + }, + { + ScalingRatio: 0.33333333333, + Value: 789, + Name: "instructions_retired", + Cpu: 1, + }, + }, + PerfUncoreStats: []info.PerfUncoreStat{ + { + ScalingRatio: 1.0, + Value: 1231231512.0, + Name: "cas_count_read", + Socket: 0, + PMU: "uncore_imc_0", + }, + { + ScalingRatio: 1.0, + Value: 1111231331.0, + Name: "cas_count_read", + Socket: 1, + PMU: "uncore_imc_0", + }, + }, + ReferencedMemory: 1234, + Resctrl: info.ResctrlStats{ + MemoryBandwidth: []info.MemoryBandwidthStats{ + { + TotalBytes: 4512312, + LocalBytes: 2390393, + }, + { + TotalBytes: 2173713, + LocalBytes: 1231233, + }, + }, + Cache: []info.CacheStats{ + { + LLCOccupancy: 162626, + }, + { + LLCOccupancy: 213777, + }, + }, + }, + }, + }, + }, + }, nil +} + +type erroringSubcontainersInfoProvider struct { + successfulProvider testSubcontainersInfoProvider + shouldFail bool +} + +func (p *erroringSubcontainersInfoProvider) GetVersionInfo() (*info.VersionInfo, error) { + if p.shouldFail { + return nil, errors.New("Oops 1") + } + return p.successfulProvider.GetVersionInfo() +} + +func (p *erroringSubcontainersInfoProvider) GetMachineInfo() (*info.MachineInfo, error) { + if p.shouldFail { + return nil, errors.New("Oops 2") + } + return p.successfulProvider.GetMachineInfo() +} + +func (p *erroringSubcontainersInfoProvider) GetRequestedContainersInfo( + a string, opt v2.RequestOptions) (map[string]*info.ContainerInfo, error) { + if p.shouldFail { + return map[string]*info.ContainerInfo{}, errors.New("Oops 3") + } + return p.successfulProvider.GetRequestedContainersInfo(a, opt) +} diff --git a/vendor/github.com/google/cadvisor/metrics/prometheus_machine.go b/vendor/github.com/google/cadvisor/metrics/prometheus_machine.go new file mode 100644 index 00000000000..6a9c55ab173 --- /dev/null +++ b/vendor/github.com/google/cadvisor/metrics/prometheus_machine.go @@ -0,0 +1,349 @@ +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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 metrics + +import ( + "strconv" + + "github.com/google/cadvisor/container" + info "github.com/google/cadvisor/info/v1" + "github.com/prometheus/client_golang/prometheus" + + "k8s.io/klog/v2" +) + +var baseLabelsNames = []string{"machine_id", "system_uuid", "boot_id"} + +const ( + prometheusModeLabelName = "mode" + prometheusTypeLabelName = "type" + prometheusLevelLabelName = "level" + prometheusNodeLabelName = "node_id" + prometheusCoreLabelName = "core_id" + prometheusThreadLabelName = "thread_id" + prometheusPageSizeLabelName = "page_size" + + nvmMemoryMode = "memory_mode" + nvmAppDirectMode = "app_direct_mode" + + memoryByTypeDimmCountKey = "DimmCount" + memoryByTypeDimmCapacityKey = "Capacity" + + emptyLabelValue = "" +) + +// machineMetric describes a multi-dimensional metric used for exposing a +// certain type of machine statistic. +type machineMetric struct { + name string + help string + valueType prometheus.ValueType + extraLabels []string + condition func(machineInfo *info.MachineInfo) bool + getValues func(machineInfo *info.MachineInfo) metricValues +} + +func (metric *machineMetric) desc(baseLabels []string) *prometheus.Desc { + return prometheus.NewDesc(metric.name, metric.help, append(baseLabels, metric.extraLabels...), nil) +} + +// PrometheusMachineCollector implements prometheus.Collector. +type PrometheusMachineCollector struct { + infoProvider infoProvider + errors prometheus.Gauge + machineMetrics []machineMetric +} + +// NewPrometheusMachineCollector returns a new PrometheusCollector. +func NewPrometheusMachineCollector(i infoProvider, includedMetrics container.MetricSet) *PrometheusMachineCollector { + c := &PrometheusMachineCollector{ + + infoProvider: i, + errors: prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "machine", + Name: "scrape_error", + Help: "1 if there was an error while getting machine metrics, 0 otherwise.", + }), + machineMetrics: []machineMetric{ + { + name: "machine_cpu_physical_cores", + help: "Number of physical CPU cores.", + valueType: prometheus.GaugeValue, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return metricValues{{value: float64(machineInfo.NumPhysicalCores), timestamp: machineInfo.Timestamp}} + }, + }, + { + name: "machine_cpu_cores", + help: "Number of logical CPU cores.", + valueType: prometheus.GaugeValue, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return metricValues{{value: float64(machineInfo.NumCores), timestamp: machineInfo.Timestamp}} + }, + }, + { + name: "machine_cpu_sockets", + help: "Number of CPU sockets.", + valueType: prometheus.GaugeValue, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return metricValues{{value: float64(machineInfo.NumSockets), timestamp: machineInfo.Timestamp}} + }, + }, + { + name: "machine_memory_bytes", + help: "Amount of memory installed on the machine.", + valueType: prometheus.GaugeValue, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return metricValues{{value: float64(machineInfo.MemoryCapacity), timestamp: machineInfo.Timestamp}} + }, + }, + { + name: "machine_dimm_count", + help: "Number of RAM DIMM (all types memory modules) value labeled by dimm type.", + valueType: prometheus.GaugeValue, + extraLabels: []string{prometheusTypeLabelName}, + condition: func(machineInfo *info.MachineInfo) bool { return len(machineInfo.MemoryByType) != 0 }, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return getMemoryByType(machineInfo, memoryByTypeDimmCountKey) + }, + }, + { + name: "machine_dimm_capacity_bytes", + help: "Total RAM DIMM capacity (all types memory modules) value labeled by dimm type.", + valueType: prometheus.GaugeValue, + extraLabels: []string{prometheusTypeLabelName}, + condition: func(machineInfo *info.MachineInfo) bool { return len(machineInfo.MemoryByType) != 0 }, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return getMemoryByType(machineInfo, memoryByTypeDimmCapacityKey) + }, + }, + { + name: "machine_nvm_capacity", + help: "NVM capacity value labeled by NVM mode (memory mode or app direct mode).", + valueType: prometheus.GaugeValue, + extraLabels: []string{prometheusModeLabelName}, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return metricValues{ + {value: float64(machineInfo.NVMInfo.MemoryModeCapacity), labels: []string{nvmMemoryMode}, timestamp: machineInfo.Timestamp}, + {value: float64(machineInfo.NVMInfo.AppDirectModeCapacity), labels: []string{nvmAppDirectMode}, timestamp: machineInfo.Timestamp}, + } + }, + }, + { + name: "machine_nvm_avg_power_budget_watts", + help: "NVM power budget.", + valueType: prometheus.GaugeValue, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return metricValues{{value: float64(machineInfo.NVMInfo.AvgPowerBudget), timestamp: machineInfo.Timestamp}} + }, + }, + }, + } + + if includedMetrics.Has(container.CPUTopologyMetrics) { + c.machineMetrics = append(c.machineMetrics, []machineMetric{ + { + name: "machine_cpu_cache_capacity_bytes", + help: "Cache size in bytes assigned to NUMA node and CPU core.", + valueType: prometheus.GaugeValue, + extraLabels: []string{prometheusNodeLabelName, prometheusCoreLabelName, prometheusTypeLabelName, prometheusLevelLabelName}, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return getCaches(machineInfo) + }, + }, + { + name: "machine_thread_siblings_count", + help: "Number of CPU thread siblings.", + valueType: prometheus.GaugeValue, + extraLabels: []string{prometheusNodeLabelName, prometheusCoreLabelName, prometheusThreadLabelName}, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return getThreadsSiblingsCount(machineInfo) + }, + }, + { + name: "machine_node_memory_capacity_bytes", + help: "Amount of memory assigned to NUMA node.", + valueType: prometheus.GaugeValue, + extraLabels: []string{prometheusNodeLabelName}, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return getNodeMemory(machineInfo) + }, + }, + { + name: "machine_node_hugepages_count", + help: "Numer of hugepages assigned to NUMA node.", + valueType: prometheus.GaugeValue, + extraLabels: []string{prometheusNodeLabelName, prometheusPageSizeLabelName}, + getValues: func(machineInfo *info.MachineInfo) metricValues { + return getHugePagesCount(machineInfo) + }, + }, + }...) + } + return c +} + +// Describe describes all the machine metrics ever exported by cadvisor. It +// implements prometheus.PrometheusCollector. +func (collector *PrometheusMachineCollector) Describe(ch chan<- *prometheus.Desc) { + collector.errors.Describe(ch) + for _, metric := range collector.machineMetrics { + ch <- metric.desc([]string{}) + } +} + +// Collect fetches information about machine and delivers them as +// Prometheus metrics. It implements prometheus.PrometheusCollector. +func (collector *PrometheusMachineCollector) Collect(ch chan<- prometheus.Metric) { + collector.errors.Set(0) + collector.collectMachineInfo(ch) + collector.errors.Collect(ch) +} + +func (collector *PrometheusMachineCollector) collectMachineInfo(ch chan<- prometheus.Metric) { + machineInfo, err := collector.infoProvider.GetMachineInfo() + if err != nil { + collector.errors.Set(1) + klog.Warningf("Couldn't get machine info: %s", err) + return + } + + baseLabelsValues := []string{machineInfo.MachineID, machineInfo.SystemUUID, machineInfo.BootID} + + for _, metric := range collector.machineMetrics { + if metric.condition != nil && !metric.condition(machineInfo) { + continue + } + + for _, metricValue := range metric.getValues(machineInfo) { + labelValues := make([]string, len(baseLabelsValues)) + copy(labelValues, baseLabelsValues) + if len(metric.extraLabels) != 0 { + labelValues = append(labelValues, metricValue.labels...) + } + + prometheusMetric := prometheus.MustNewConstMetric(metric.desc(baseLabelsNames), + metric.valueType, metricValue.value, labelValues...) + + if metricValue.timestamp.IsZero() { + ch <- prometheusMetric + } else { + ch <- prometheus.NewMetricWithTimestamp(metricValue.timestamp, prometheusMetric) + } + } + + } +} + +func getMemoryByType(machineInfo *info.MachineInfo, property string) metricValues { + mValues := make(metricValues, 0, len(machineInfo.MemoryByType)) + for memoryType, memoryInfo := range machineInfo.MemoryByType { + propertyValue := 0.0 + switch property { + case memoryByTypeDimmCapacityKey: + propertyValue = float64(memoryInfo.Capacity) + case memoryByTypeDimmCountKey: + propertyValue = float64(memoryInfo.DimmCount) + default: + klog.Warningf("Incorrect propery name for MemoryByType, property %s", property) + return metricValues{} + } + mValues = append(mValues, metricValue{value: propertyValue, labels: []string{memoryType}, timestamp: machineInfo.Timestamp}) + } + return mValues +} + +func getThreadsSiblingsCount(machineInfo *info.MachineInfo) metricValues { + mValues := make(metricValues, 0, machineInfo.NumCores) + for _, node := range machineInfo.Topology { + nodeID := strconv.Itoa(node.Id) + + for _, core := range node.Cores { + coreID := strconv.Itoa(core.Id) + siblingsCount := len(core.Threads) + + for _, thread := range core.Threads { + mValues = append(mValues, + metricValue{ + value: float64(siblingsCount), + labels: []string{nodeID, coreID, strconv.Itoa(thread)}, + timestamp: machineInfo.Timestamp, + }) + } + } + } + return mValues +} + +func getNodeMemory(machineInfo *info.MachineInfo) metricValues { + mValues := make(metricValues, 0, len(machineInfo.Topology)) + for _, node := range machineInfo.Topology { + nodeID := strconv.Itoa(node.Id) + mValues = append(mValues, + metricValue{ + value: float64(node.Memory), + labels: []string{nodeID}, + timestamp: machineInfo.Timestamp, + }) + } + return mValues +} + +func getHugePagesCount(machineInfo *info.MachineInfo) metricValues { + mValues := make(metricValues, 0) + for _, node := range machineInfo.Topology { + nodeID := strconv.Itoa(node.Id) + + for _, hugePage := range node.HugePages { + mValues = append(mValues, + metricValue{ + value: float64(hugePage.NumPages), + labels: []string{nodeID, strconv.FormatUint(hugePage.PageSize, 10)}, + timestamp: machineInfo.Timestamp, + }) + } + } + return mValues +} + +func getCaches(machineInfo *info.MachineInfo) metricValues { + mValues := make(metricValues, 0) + for _, node := range machineInfo.Topology { + nodeID := strconv.Itoa(node.Id) + + for _, core := range node.Cores { + coreID := strconv.Itoa(core.Id) + + for _, cache := range core.Caches { + mValues = append(mValues, + metricValue{ + value: float64(cache.Size), + labels: []string{nodeID, coreID, cache.Type, strconv.Itoa(cache.Level)}, + timestamp: machineInfo.Timestamp, + }) + } + } + + for _, cache := range node.Caches { + mValues = append(mValues, + metricValue{ + value: float64(cache.Size), + labels: []string{nodeID, emptyLabelValue, cache.Type, strconv.Itoa(cache.Level)}, + timestamp: machineInfo.Timestamp, + }) + } + } + return mValues +} diff --git a/vendor/github.com/google/cadvisor/nvm/machine_libipmctl.go b/vendor/github.com/google/cadvisor/nvm/machine_libipmctl.go new file mode 100644 index 00000000000..2eb717b600c --- /dev/null +++ b/vendor/github.com/google/cadvisor/nvm/machine_libipmctl.go @@ -0,0 +1,130 @@ +// +build libipmctl,cgo + +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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 nvm + +// #cgo pkg-config: libipmctl +// #include +import "C" +import ( + "fmt" + info "github.com/google/cadvisor/info/v1" + "sync" + + "k8s.io/klog/v2" +) + +var ( + isNVMLibInitialized = false + nvmLibMutex = sync.Mutex{} +) + +func init() { + nvmLibMutex.Lock() + defer nvmLibMutex.Unlock() + cErr := C.nvm_init() + if cErr != C.NVM_SUCCESS { + // Unfortunately klog does not seem to work here. I believe it's better to + // output information using fmt rather then let it disappear silently. + fmt.Printf("libipmctl initialization failed with status %d", cErr) + } + isNVMLibInitialized = true +} + +// getAvgPowerBudget retrieves configured power budget +// (in watts) for NVM devices. When libipmct is not available +// zero is returned. +func getAvgPowerBudget() (uint, error) { + // Get number of devices on the platform + // see: https://github.com/intel/ipmctl/blob/v01.00.00.3497/src/os/nvm_api/nvm_management.h#L1478 + count := C.uint(0) + err := C.nvm_get_number_of_devices(&count) + if err != C.NVM_SUCCESS { + klog.Warningf("Unable to get number of NVM devices. Status code: %d", err) + return uint(0), fmt.Errorf("Unable to get number of NVM devices. Status code: %d", err) + } + + // Load basic device information for all the devices + // to obtain UID of the first one. + devices := make([]C.struct_device_discovery, count) + err = C.nvm_get_devices(&devices[0], C.uchar(count)) + if err != C.NVM_SUCCESS { + klog.Warningf("Unable to get all NVM devices. Status code: %d", err) + return uint(0), fmt.Errorf("Unable to get all NVM devices. Status code: %d", err) + } + + // Power budget is same for all the devices + // so we can rely on any of them. + device := C.struct_device_details{} + err = C.nvm_get_device_details(&devices[0].uid[0], &device) + if err != C.NVM_SUCCESS { + uid := C.GoString(&devices[0].uid[0]) + klog.Warningf("Unable to get details of NVM device %q. Status code: %d", uid, err) + return uint(0), fmt.Errorf("Unable to get details of NVM device %q. Status code: %d", uid, err) + } + + return uint(device.avg_power_budget / 1000), nil +} + +// getCapacities retrieves the total NVM capacity in bytes for memory mode and app direct mode +func getCapacities() (uint64, uint64, error) { + caps := C.struct_device_capacities{} + err := C.nvm_get_nvm_capacities(&caps) + if err != C.NVM_SUCCESS { + klog.Warningf("Unable to get NVM capacity. Status code: %d", err) + return uint64(0), uint64(0), fmt.Errorf("Unable to get NVM capacity. Status code: %d", err) + } + return uint64(caps.memory_capacity), uint64(caps.app_direct_capacity), nil +} + +// GetInfo returns information specific for non-volatile memory modules +func GetInfo() (info.NVMInfo, error) { + nvmLibMutex.Lock() + defer nvmLibMutex.Unlock() + + nvmInfo := info.NVMInfo{} + if !isNVMLibInitialized { + klog.V(1).Info("libimpctl has not been initialized. NVM information will not be available") + return nvmInfo, nil + } + + var err error + nvmInfo.MemoryModeCapacity, nvmInfo.AppDirectModeCapacity, err = getCapacities() + if err != nil { + return info.NVMInfo{}, fmt.Errorf("Unable to get NVM capacities, err: %s", err) + } + + nvmInfo.AvgPowerBudget, err = getAvgPowerBudget() + if err != nil { + return info.NVMInfo{}, fmt.Errorf("Unable to get NVM average power budget, err: %s", err) + } + return nvmInfo, nil +} + +// Finalize un-initializes libipmctl. See https://github.com/google/cadvisor/issues/2457. +func Finalize() { + nvmLibMutex.Lock() + defer nvmLibMutex.Unlock() + + klog.V(1).Info("Attempting to un-initialize libipmctl") + if !isNVMLibInitialized { + klog.V(1).Info("libipmctl has not been initialized; not un-initializing.") + return + } + + C.nvm_uninit() + isNVMLibInitialized = false +} diff --git a/vendor/github.com/google/cadvisor/nvm/machine_no_libipmctl.go b/vendor/github.com/google/cadvisor/nvm/machine_no_libipmctl.go new file mode 100644 index 00000000000..c82962b8996 --- /dev/null +++ b/vendor/github.com/google/cadvisor/nvm/machine_no_libipmctl.go @@ -0,0 +1,34 @@ +// +build !libipmctl !cgo + +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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 nvm + +import ( + info "github.com/google/cadvisor/info/v1" + "k8s.io/klog/v2" +) + +// GetInfo returns information specific for non-volatile memory modules. +// When libipmctl is not available zero value is returned. +func GetInfo() (info.NVMInfo, error) { + return info.NVMInfo{}, nil +} + +// Finalize un-initializes libipmctl. See https://github.com/google/cadvisor/issues/2457. +// When libipmctl is not available it just logs that it's being called. +func Finalize() { + klog.V(4).Info("libimpctl not available, doing nothing.") +} diff --git a/vendor/github.com/google/cadvisor/perf/collector_libpfm.go b/vendor/github.com/google/cadvisor/perf/collector_libpfm.go new file mode 100644 index 00000000000..01ae2943184 --- /dev/null +++ b/vendor/github.com/google/cadvisor/perf/collector_libpfm.go @@ -0,0 +1,294 @@ +// +build libpfm,cgo + +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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. + +// Collector of perf events for a container. +package perf + +// #cgo CFLAGS: -I/usr/include +// #cgo LDFLAGS: -lpfm +// #include +// #include +import "C" + +import ( + "bytes" + "encoding/binary" + "fmt" + "os" + "sync" + "unsafe" + + "golang.org/x/sys/unix" + "k8s.io/klog/v2" + + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/stats" +) + +type collector struct { + cgroupPath string + events PerfEvents + cpuFiles map[string]map[int]readerCloser + cpuFilesLock sync.Mutex + numCores int + eventToCustomEvent map[Event]*CustomEvent + uncore stats.Collector +} + +var ( + isLibpfmInitialized = false + libpmfMutex = sync.Mutex{} +) + +func init() { + libpmfMutex.Lock() + defer libpmfMutex.Unlock() + pErr := C.pfm_initialize() + if pErr != C.PFM_SUCCESS { + fmt.Printf("unable to initialize libpfm: %d", int(pErr)) + return + } + isLibpfmInitialized = true +} + +func newCollector(cgroupPath string, events PerfEvents, numCores int, topology []info.Node) *collector { + collector := &collector{cgroupPath: cgroupPath, events: events, cpuFiles: map[string]map[int]readerCloser{}, numCores: numCores, uncore: NewUncoreCollector(cgroupPath, events, topology)} + mapEventsToCustomEvents(collector) + + return collector +} + +func (c *collector) UpdateStats(stats *info.ContainerStats) error { + err := c.uncore.UpdateStats(stats) + if err != nil { + klog.Errorf("Failed to get uncore perf event stats: %v", err) + } + + c.cpuFilesLock.Lock() + defer c.cpuFilesLock.Unlock() + + stats.PerfStats = []info.PerfStat{} + klog.V(5).Infof("Attempting to update perf_event stats from cgroup %q", c.cgroupPath) + for name, cpus := range c.cpuFiles { + for cpu, file := range cpus { + stat, err := readPerfStat(file, name, cpu) + if err != nil { + klog.Warningf("Unable to read from perf_event_file (event: %q, CPU: %d) for %q: %q", name, cpu, c.cgroupPath, err.Error()) + continue + } + klog.V(5).Infof("Read perf event (event: %q, CPU: %d) for %q: %d", name, cpu, c.cgroupPath, stat.Value) + + stats.PerfStats = append(stats.PerfStats, *stat) + } + } + + return nil +} + +func readPerfStat(file readerCloser, name string, cpu int) (*info.PerfStat, error) { + buf := make([]byte, 32) + _, err := file.Read(buf) + if err != nil { + return nil, err + } + perfData := &ReadFormat{} + reader := bytes.NewReader(buf) + err = binary.Read(reader, binary.LittleEndian, perfData) + if err != nil { + return nil, err + } + + scalingRatio := 1.0 + if perfData.TimeEnabled != 0 { + scalingRatio = float64(perfData.TimeRunning) / float64(perfData.TimeEnabled) + } + + stat := info.PerfStat{ + Value: uint64(float64(perfData.Value) / scalingRatio), + Name: name, + ScalingRatio: scalingRatio, + Cpu: cpu, + } + + return &stat, nil +} + +func (c *collector) setup() error { + cgroup, err := os.Open(c.cgroupPath) + if err != nil { + return fmt.Errorf("unable to open cgroup directory %s: %s", c.cgroupPath, err) + } + defer cgroup.Close() + + c.cpuFilesLock.Lock() + defer c.cpuFilesLock.Unlock() + cgroupFd := int(cgroup.Fd()) + for _, group := range c.events.Core.Events { + customEvent, ok := c.eventToCustomEvent[group[0]] + var err error + if ok { + err = c.setupRawNonGrouped(customEvent, cgroupFd) + } else { + err = c.setupNonGrouped(string(group[0]), cgroupFd) + } + if err != nil { + return err + } + } + + return nil +} + +func (c *collector) setupRawNonGrouped(event *CustomEvent, cgroup int) error { + klog.V(5).Infof("Setting up non-grouped raw perf event %#v", event) + config := createPerfEventAttr(*event) + err := c.registerEvent(config, string(event.Name), cgroup) + if err != nil { + return err + } + + return nil +} + +func (c *collector) registerEvent(config *unix.PerfEventAttr, name string, pid int) error { + var cpu int + for cpu = 0; cpu < c.numCores; cpu++ { + groupFd, flags := -1, unix.PERF_FLAG_FD_CLOEXEC|unix.PERF_FLAG_PID_CGROUP + fd, err := unix.PerfEventOpen(config, pid, cpu, groupFd, flags) + if err != nil { + return fmt.Errorf("setting up perf event %#v failed: %q", config, err) + } + perfFile := os.NewFile(uintptr(fd), name) + if perfFile == nil { + return fmt.Errorf("unable to create os.File from file descriptor %#v", fd) + } + + c.addEventFile(name, cpu, perfFile) + } + return nil +} + +func (c *collector) addEventFile(name string, cpu int, perfFile *os.File) { + _, ok := c.cpuFiles[name] + if !ok { + c.cpuFiles[name] = map[int]readerCloser{} + } + + c.cpuFiles[name][cpu] = perfFile +} + +func (c *collector) setupNonGrouped(name string, cgroup int) error { + perfEventAttr, err := getPerfEventAttr(name) + if err != nil { + return err + } + defer C.free(unsafe.Pointer(perfEventAttr)) + + return c.registerEvent(perfEventAttr, name, cgroup) +} + +func createPerfEventAttr(event CustomEvent) *unix.PerfEventAttr { + length := len(event.Config) + + config := &unix.PerfEventAttr{ + Type: event.Type, + Config: event.Config[0], + } + if length >= 2 { + config.Ext1 = event.Config[1] + } + if length == 3 { + config.Ext2 = event.Config[2] + } + + setAttributes(config) + klog.V(5).Infof("perf_event_attr struct prepared: %#v", config) + return config +} + +func getPerfEventAttr(name string) (*unix.PerfEventAttr, error) { + if !isLibpfmInitialized { + return nil, fmt.Errorf("libpfm4 is not initialized, cannot proceed with setting perf events up") + } + + perfEventAttrMemory := C.malloc(C.ulong(unsafe.Sizeof(unix.PerfEventAttr{}))) + event := pfmPerfEncodeArgT{} + + perfEventAttr := (*unix.PerfEventAttr)(perfEventAttrMemory) + fstr := C.CString("") + event.fstr = unsafe.Pointer(fstr) + event.attr = perfEventAttrMemory + event.size = C.ulong(unsafe.Sizeof(event)) + + cSafeName := C.CString(name) + + pErr := C.pfm_get_os_event_encoding(cSafeName, C.PFM_PLM0|C.PFM_PLM3, C.PFM_OS_PERF_EVENT, unsafe.Pointer(&event)) + if pErr != C.PFM_SUCCESS { + return nil, fmt.Errorf("unable to transform event name %s to perf_event_attr: %v", name, int(pErr)) + } + + klog.V(5).Infof("perf_event_attr: %#v", perfEventAttr) + + setAttributes(perfEventAttr) + + return perfEventAttr, nil +} + +func setAttributes(config *unix.PerfEventAttr) { + config.Sample_type = perfSampleIdentifier + config.Read_format = unix.PERF_FORMAT_TOTAL_TIME_ENABLED | unix.PERF_FORMAT_TOTAL_TIME_RUNNING | unix.PERF_FORMAT_ID + config.Bits = perfAttrBitsInherit | perfAttrBitsExcludeGuest + config.Size = uint32(unsafe.Sizeof(unix.PerfEventAttr{})) +} + +func (c *collector) Destroy() { + c.uncore.Destroy() + c.cpuFilesLock.Lock() + defer c.cpuFilesLock.Unlock() + + for name, files := range c.cpuFiles { + for cpu, file := range files { + klog.V(5).Infof("Closing perf_event file descriptor for cgroup %q, event %q and CPU %d", c.cgroupPath, name, cpu) + err := file.Close() + if err != nil { + klog.Warningf("Unable to close perf_event file descriptor for cgroup %q, event %q and CPU %d", c.cgroupPath, name, cpu) + } + } + delete(c.cpuFiles, name) + } +} + +// Finalize terminates libpfm4 to free resources. +func Finalize() { + libpmfMutex.Lock() + defer libpmfMutex.Unlock() + + klog.V(1).Info("Attempting to terminate libpfm4") + if !isLibpfmInitialized { + klog.V(1).Info("libpfm4 has not been initialized; not terminating.") + return + } + + C.pfm_terminate() + isLibpfmInitialized = false +} + +func mapEventsToCustomEvents(collector *collector) { + collector.eventToCustomEvent = map[Event]*CustomEvent{} + for key, event := range collector.events.Core.CustomEvents { + collector.eventToCustomEvent[event.Name] = &collector.events.Core.CustomEvents[key] + } +} diff --git a/vendor/github.com/google/cadvisor/perf/collector_no_libpfm.go b/vendor/github.com/google/cadvisor/perf/collector_no_libpfm.go new file mode 100644 index 00000000000..18a69d537b4 --- /dev/null +++ b/vendor/github.com/google/cadvisor/perf/collector_no_libpfm.go @@ -0,0 +1,33 @@ +// +build !libpfm !cgo + +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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. + +// Collector of perf events for a container. +package perf + +import ( + "github.com/google/cadvisor/stats" + + "k8s.io/klog/v2" +) + +func NewCollector(cgroupPath string, events Events, numCores int) stats.Collector { + return &stats.NoopCollector{} +} + +// Finalize terminates libpfm4 to free resources. +func Finalize() { + klog.V(1).Info("cAdvisor is build without cgo and/or libpfm support. Nothing to be finalized") +} diff --git a/vendor/github.com/google/cadvisor/perf/config.go b/vendor/github.com/google/cadvisor/perf/config.go new file mode 100644 index 00000000000..efdf370adaa --- /dev/null +++ b/vendor/github.com/google/cadvisor/perf/config.go @@ -0,0 +1,91 @@ +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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. + +// Configuration for perf event manager. +package perf + +import ( + "encoding/json" + "fmt" + "os" + "strconv" + + "k8s.io/klog/v2" +) + +type PerfEvents struct { + // Core perf events to be measured. + Core Events `json:"core,omitempty"` + + // Uncore perf events to be measured. + Uncore Events `json:"uncore,omitempty"` +} + +type Events struct { + // List of perf events' names to be measured. + Events [][]Event `json:"events"` + + // List of custom perf events' to be measured. It is impossible to + // specify some events using their names and in such case you have + // to provide lower level configuration. + CustomEvents []CustomEvent `json:"custom_events"` +} + +type Event string + +type CustomEvent struct { + // Type of the event. See perf_event_attr documentation + // at man perf_event_open. + Type uint32 `json:"type,omitempty"` + + // Symbolically formed event like: + // pmu/config=PerfEvent.Config[0],config1=PerfEvent.Config[1],config2=PerfEvent.Config[2] + // as described in man perf-stat. + Config Config `json:"config"` + + // Human readable name of metric that will be created from the event. + Name Event `json:"name"` +} + +type Config []uint64 + +func (c *Config) UnmarshalJSON(b []byte) error { + config := []string{} + err := json.Unmarshal(b, &config) + if err != nil { + klog.Errorf("Unmarshalling %s into slice of strings failed: %q", b, err) + return fmt.Errorf("unmarshalling %s into slice of strings failed: %q", b, err) + } + intermediate := []uint64{} + for _, v := range config { + uintValue, err := strconv.ParseUint(v, 0, 64) + if err != nil { + klog.Errorf("Parsing %#v into uint64 failed: %q", v, err) + return fmt.Errorf("parsing %#v into uint64 failed: %q", v, err) + } + intermediate = append(intermediate, uintValue) + } + *c = intermediate + return nil +} + +func parseConfig(file *os.File) (events PerfEvents, err error) { + decoder := json.NewDecoder(file) + err = decoder.Decode(&events) + if err != nil { + err = fmt.Errorf("unable to load perf events configuration from %q: %q", file.Name(), err) + return + } + return +} diff --git a/vendor/github.com/google/cadvisor/perf/manager_libpfm.go b/vendor/github.com/google/cadvisor/perf/manager_libpfm.go new file mode 100644 index 00000000000..1edbaf93046 --- /dev/null +++ b/vendor/github.com/google/cadvisor/perf/manager_libpfm.go @@ -0,0 +1,74 @@ +// +build libpfm,cgo + +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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. + +// Manager of perf events for containers. +package perf + +import ( + "fmt" + "os" + + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/stats" +) + +type manager struct { + events PerfEvents + numCores int + topology []info.Node + stats.NoopDestroy +} + +func NewManager(configFile string, numCores int, topology []info.Node) (stats.Manager, error) { + if configFile == "" { + return &stats.NoopManager{}, nil + } + + file, err := os.Open(configFile) + if err != nil { + return nil, fmt.Errorf("Unable to read configuration file %q: %q", configFile, err) + } + + config, err := parseConfig(file) + if err != nil { + return nil, fmt.Errorf("Unable to read configuration file %q: %q", configFile, err) + } + + if areGroupedEventsUsed(config) { + return nil, fmt.Errorf("event grouping is not supported you must modify config file at %s", configFile) + } + + return &manager{events: config, numCores: numCores, topology: topology}, nil +} + +func areGroupedEventsUsed(events PerfEvents) bool { + for _, group := range events.Core.Events { + if len(group) > 1 { + return true + } + } + return false +} + +func (m *manager) GetCollector(cgroupPath string) (stats.Collector, error) { + collector := newCollector(cgroupPath, m.events, m.numCores, m.topology) + err := collector.setup() + if err != nil { + collector.Destroy() + return &stats.NoopCollector{}, err + } + return collector, nil +} diff --git a/vendor/github.com/google/cadvisor/perf/manager_no_libpfm.go b/vendor/github.com/google/cadvisor/perf/manager_no_libpfm.go new file mode 100644 index 00000000000..b0d7b9aeb79 --- /dev/null +++ b/vendor/github.com/google/cadvisor/perf/manager_no_libpfm.go @@ -0,0 +1,30 @@ +// +build !libpfm !cgo + +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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. + +// Manager of perf events for containers. +package perf + +import ( + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/stats" + + "k8s.io/klog/v2" +) + +func NewManager(configFile string, numCores int, topology []info.Node) (stats.Manager, error) { + klog.V(1).Info("cAdvisor is build without cgo and/or libpfm support. Perf event counters are not available.") + return &stats.NoopManager{}, nil +} diff --git a/vendor/github.com/google/cadvisor/perf/types_libpfm.go b/vendor/github.com/google/cadvisor/perf/types_libpfm.go new file mode 100644 index 00000000000..76a8196a682 --- /dev/null +++ b/vendor/github.com/google/cadvisor/perf/types_libpfm.go @@ -0,0 +1,54 @@ +// +build libpfm,cgo + +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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. + +// Types related to handling perf events that are missing from unix package. +package perf + +import "C" +import ( + "io" + "unsafe" +) + +const ( + perfSampleIdentifier = 1 << 16 + perfAttrBitsInherit = 1 << 1 + perfAttrBitsExcludeGuest = 1 << 20 +) + +// ReadFormat allows to read perf event's value for non-grouped events +type ReadFormat struct { + Value uint64 /* The value of the event */ + TimeEnabled uint64 /* if PERF_FORMAT_TOTAL_TIME_ENABLED */ + TimeRunning uint64 /* if PERF_FORMAT_TOTAL_TIME_RUNNING */ + ID uint64 /* if PERF_FORMAT_ID */ +} + +// pfmPerfEncodeArgT represents structure that is used to parse perf event nam +// into perf_event_attr using libpfm. +type pfmPerfEncodeArgT struct { + attr unsafe.Pointer + fstr unsafe.Pointer + size C.size_t + _ C.int // idx + _ C.int // cpu + _ C.int // flags +} + +type readerCloser interface { + io.Reader + io.Closer +} diff --git a/vendor/github.com/google/cadvisor/perf/uncore_libpfm.go b/vendor/github.com/google/cadvisor/perf/uncore_libpfm.go new file mode 100644 index 00000000000..cb2919fed85 --- /dev/null +++ b/vendor/github.com/google/cadvisor/perf/uncore_libpfm.go @@ -0,0 +1,392 @@ +// +build libpfm,cgo + +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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. + +// Uncore perf events logic. +package perf + +// #cgo CFLAGS: -I/usr/include +// #cgo LDFLAGS: -lpfm +// #include +// #include +import "C" +import ( + "bytes" + "encoding/binary" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "regexp" + "strconv" + "strings" + "sync" + "unsafe" + + "golang.org/x/sys/unix" + "k8s.io/klog/v2" + + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/stats" + "github.com/google/cadvisor/utils/sysinfo" +) + +type pmu struct { + name string + typeOf uint32 + cpus []uint32 +} + +const ( + uncorePMUPrefix = "uncore" + pmuTypeFilename = "type" + pmuCpumaskFilename = "cpumask" + systemDevicesPath = "/sys/devices" + rootPerfEventPath = "/sys/fs/cgroup/perf_event" +) + +func getPMU(pmus []pmu, gotType uint32) (*pmu, error) { + for _, pmu := range pmus { + if pmu.typeOf == gotType { + return &pmu, nil + } + } + + return nil, fmt.Errorf("there is no pmu with event type: %#v", gotType) +} + +type uncorePMUs map[string]pmu + +func readUncorePMU(path string, name string, cpumaskRegexp *regexp.Regexp) (*pmu, error) { + buf, err := ioutil.ReadFile(filepath.Join(path, pmuTypeFilename)) + if err != nil { + return nil, err + } + typeString := strings.TrimSpace(string(buf)) + eventType, err := strconv.ParseUint(typeString, 0, 32) + if err != nil { + return nil, err + } + + buf, err = ioutil.ReadFile(filepath.Join(path, pmuCpumaskFilename)) + if err != nil { + return nil, err + } + var cpus []uint32 + cpumask := strings.TrimSpace(string(buf)) + for _, cpu := range cpumaskRegexp.Split(cpumask, -1) { + parsedCPU, err := strconv.ParseUint(cpu, 0, 32) + if err != nil { + return nil, err + } + cpus = append(cpus, uint32(parsedCPU)) + } + + return &pmu{name: name, typeOf: uint32(eventType), cpus: cpus}, nil +} + +func getUncorePMUs(devicesPath string) (uncorePMUs, error) { + pmus := make(uncorePMUs, 0) + + // Depends on platform, cpu mask could be for example in form "0-1" or "0,1". + cpumaskRegexp := regexp.MustCompile("[-,\n]") + err := filepath.Walk(devicesPath, func(path string, info os.FileInfo, err error) error { + // Skip root path. + if path == devicesPath { + return nil + } + if info.IsDir() { + if strings.HasPrefix(info.Name(), uncorePMUPrefix) { + pmu, err := readUncorePMU(path, info.Name(), cpumaskRegexp) + if err != nil { + return err + } + pmus[info.Name()] = *pmu + } + } + return nil + }) + if err != nil { + return nil, err + } + + return pmus, nil +} + +type uncoreCollector struct { + cpuFiles map[string]map[string]map[int]readerCloser + cpuFilesLock sync.Mutex + events [][]Event + eventToCustomEvent map[Event]*CustomEvent + topology []info.Node + + // Handle for mocking purposes. + perfEventOpen func(attr *unix.PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) +} + +func NewUncoreCollector(cgroupPath string, events PerfEvents, topology []info.Node) stats.Collector { + + if cgroupPath != rootPerfEventPath { + // Uncore metric doesn't exists for cgroups, only for entire platform. + return &stats.NoopCollector{} + } + + collector := &uncoreCollector{topology: topology} + + // Default implementation of Linux perf_event_open function. + collector.perfEventOpen = unix.PerfEventOpen + + err := collector.setup(events, systemDevicesPath) + if err != nil { + formatedError := fmt.Errorf("unable to setup uncore perf event collector: %v", err) + klog.V(5).Infof("Perf uncore metrics will not be available: %s", formatedError) + return &stats.NoopCollector{} + } + + return collector +} + +func (c *uncoreCollector) setup(events PerfEvents, devicesPath string) error { + var err error + readUncorePMUs, err := getUncorePMUs(devicesPath) + if err != nil { + return err + } + + // Maping from event name, pmu type, cpu. + c.cpuFiles = make(map[string]map[string]map[int]readerCloser) + c.events = events.Uncore.Events + c.eventToCustomEvent = parseUncoreEvents(events.Uncore) + c.cpuFilesLock.Lock() + defer c.cpuFilesLock.Unlock() + + for _, group := range c.events { + if len(group) > 1 { + klog.Warning("grouping uncore perf events is not supported!") + continue + } + + eventName, pmuPrefix := parseEventName(string(group[0])) + + var err error + customEvent, ok := c.eventToCustomEvent[group[0]] + if ok { + if customEvent.Type != 0 { + pmus := obtainPMUs("uncore", readUncorePMUs) + err = c.setupRawNonGroupedUncore(customEvent, pmus) + } else { + pmus := obtainPMUs(pmuPrefix, readUncorePMUs) + err = c.setupRawNonGroupedUncore(customEvent, pmus) + } + } else { + pmus := obtainPMUs(pmuPrefix, readUncorePMUs) + err = c.setupNonGroupedUncore(eventName, pmus) + } + if err != nil { + return err + } + } + + return nil +} + +func parseEventName(eventName string) (string, string) { + // First "/" separate pmu prefix and event name + // ex. "uncore_imc_0/cas_count_read" -> uncore_imc_0 and cas_count_read. + splittedEvent := strings.SplitN(eventName, "/", 2) + var pmuPrefix = "" + if len(splittedEvent) == 2 { + pmuPrefix = splittedEvent[0] + eventName = splittedEvent[1] + } + return eventName, pmuPrefix +} + +func obtainPMUs(want string, gotPMUs uncorePMUs) []pmu { + var pmus []pmu + if want == "" { + return pmus + } + for _, pmu := range gotPMUs { + if strings.HasPrefix(pmu.name, want) { + pmus = append(pmus, pmu) + } + } + + return pmus +} + +func parseUncoreEvents(events Events) map[Event]*CustomEvent { + eventToCustomEvent := map[Event]*CustomEvent{} + for _, uncoreEvent := range events.Events { + for _, customEvent := range events.CustomEvents { + if uncoreEvent[0] == customEvent.Name { + eventToCustomEvent[customEvent.Name] = &customEvent + break + } + } + } + + return eventToCustomEvent +} + +func (c *uncoreCollector) Destroy() { + c.cpuFilesLock.Lock() + defer c.cpuFilesLock.Unlock() + + for name, pmus := range c.cpuFiles { + for pmu, cpus := range pmus { + for cpu, file := range cpus { + klog.V(5).Infof("Closing uncore perf_event file descriptor for event %q, PMU %s and CPU %d", name, pmu, cpu) + err := file.Close() + if err != nil { + klog.Warningf("Unable to close perf_event file descriptor for event %q, PMU %s and CPU %d", name, pmu, cpu) + } + } + delete(pmus, pmu) + } + delete(c.cpuFiles, name) + } +} + +func (c *uncoreCollector) UpdateStats(stats *info.ContainerStats) error { + klog.V(5).Info("Attempting to update uncore perf_event stats") + + for name, pmus := range c.cpuFiles { + for pmu, cpus := range pmus { + for cpu, file := range cpus { + stat, err := readPerfUncoreStat(file, name, cpu, pmu, c.topology) + if err != nil { + return fmt.Errorf("unable to read from uncore perf_event_file (event: %q, CPU: %d, PMU: %s): %q", name, cpu, pmu, err.Error()) + } + klog.V(5).Infof("Read uncore perf event (event: %q, CPU: %d, PMU: %s): %d", name, cpu, pmu, stat.Value) + + stats.PerfUncoreStats = append(stats.PerfUncoreStats, *stat) + } + } + } + + return nil +} + +func (c *uncoreCollector) setupRawNonGroupedUncore(event *CustomEvent, pmus []pmu) error { + klog.V(5).Infof("Setting up non-grouped raw perf uncore event %#v", event) + + if event.Type == 0 { + // PMU isn't set. Register event for all PMUs. + for _, pmu := range pmus { + newEvent := CustomEvent{ + Type: pmu.typeOf, + Config: event.Config, + Name: event.Name, + } + config := createPerfEventAttr(newEvent) + err := c.registerUncoreEvent(config, string(newEvent.Name), pmu.cpus, pmu.name) + if err != nil { + return err + } + } + return nil + } else { + // Register event for the PMU. + config := createPerfEventAttr(*event) + pmu, err := getPMU(pmus, event.Type) + if err != nil { + return err + } + return c.registerUncoreEvent(config, string(event.Name), pmu.cpus, pmu.name) + } +} + +func (c *uncoreCollector) setupNonGroupedUncore(name string, pmus []pmu) error { + perfEventAttr, err := getPerfEventAttr(name) + if err != nil { + return err + } + defer C.free(unsafe.Pointer(perfEventAttr)) + + klog.V(5).Infof("Setting up non-grouped uncore perf event %s", name) + + // Register event for all memory controllers. + for _, pmu := range pmus { + perfEventAttr.Type = pmu.typeOf + err = c.registerUncoreEvent(perfEventAttr, name, pmu.cpus, pmu.name) + if err != nil { + return err + } + } + return nil +} + +func (c *uncoreCollector) registerUncoreEvent(config *unix.PerfEventAttr, name string, cpus []uint32, pmu string) error { + for _, cpu := range cpus { + groupFd, pid, flags := -1, -1, 0 + fd, err := c.perfEventOpen(config, pid, int(cpu), groupFd, flags) + if err != nil { + return fmt.Errorf("setting up perf event %#v failed: %q", config, err) + } + perfFile := os.NewFile(uintptr(fd), name) + if perfFile == nil { + return fmt.Errorf("unable to create os.File from file descriptor %#v", fd) + } + + c.addEventFile(name, pmu, int(cpu), perfFile) + } + + return nil +} + +func (c *uncoreCollector) addEventFile(name string, pmu string, cpu int, perfFile *os.File) { + _, ok := c.cpuFiles[name] + if !ok { + c.cpuFiles[name] = map[string]map[int]readerCloser{} + } + + _, ok = c.cpuFiles[name][pmu] + if !ok { + c.cpuFiles[name][pmu] = map[int]readerCloser{} + } + + c.cpuFiles[name][pmu][cpu] = perfFile +} + +func readPerfUncoreStat(file readerCloser, name string, cpu int, pmu string, topology []info.Node) (*info.PerfUncoreStat, error) { + buf := make([]byte, 32) + _, err := file.Read(buf) + if err != nil { + return nil, err + } + perfData := &ReadFormat{} + reader := bytes.NewReader(buf) + err = binary.Read(reader, binary.LittleEndian, perfData) + if err != nil { + return nil, err + } + + scalingRatio := 1.0 + if perfData.TimeEnabled != 0 { + scalingRatio = float64(perfData.TimeRunning) / float64(perfData.TimeEnabled) + } + + stat := info.PerfUncoreStat{ + Value: uint64(float64(perfData.Value) / scalingRatio), + Name: name, + ScalingRatio: scalingRatio, + Socket: sysinfo.GetSocketFromCPU(topology, cpu), + PMU: pmu, + } + + return &stat, nil +} diff --git a/vendor/github.com/google/cadvisor/resctrl/collector.go b/vendor/github.com/google/cadvisor/resctrl/collector.go new file mode 100644 index 00000000000..210156a89b1 --- /dev/null +++ b/vendor/github.com/google/cadvisor/resctrl/collector.go @@ -0,0 +1,74 @@ +// +build linux + +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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. + +// Collector of resctrl for a container. +package resctrl + +import ( + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/stats" + + "github.com/opencontainers/runc/libcontainer/configs" + "github.com/opencontainers/runc/libcontainer/intelrdt" +) + +type collector struct { + resctrl intelrdt.IntelRdtManager + stats.NoopDestroy +} + +func newCollector(id string, resctrlPath string) *collector { + collector := &collector{ + resctrl: intelrdt.IntelRdtManager{ + Config: &configs.Config{ + IntelRdt: &configs.IntelRdt{}, + }, + Id: id, + Path: resctrlPath, + }, + } + + return collector +} + +func (c *collector) UpdateStats(stats *info.ContainerStats) error { + stats.Resctrl = info.ResctrlStats{} + + resctrlStats, err := c.resctrl.GetStats() + if err != nil { + return err + } + + numberOfNUMANodes := len(*resctrlStats.MBMStats) + + stats.Resctrl.MemoryBandwidth = make([]info.MemoryBandwidthStats, 0, numberOfNUMANodes) + stats.Resctrl.Cache = make([]info.CacheStats, 0, numberOfNUMANodes) + + for _, numaNodeStats := range *resctrlStats.MBMStats { + stats.Resctrl.MemoryBandwidth = append(stats.Resctrl.MemoryBandwidth, + info.MemoryBandwidthStats{ + TotalBytes: numaNodeStats.MBMTotalBytes, + LocalBytes: numaNodeStats.MBMLocalBytes, + }) + } + + for _, numaNodeStats := range *resctrlStats.CMTStats { + stats.Resctrl.Cache = append(stats.Resctrl.Cache, + info.CacheStats{LLCOccupancy: numaNodeStats.LLCOccupancy}) + } + + return nil +} diff --git a/vendor/github.com/google/cadvisor/resctrl/manager.go b/vendor/github.com/google/cadvisor/resctrl/manager.go new file mode 100644 index 00000000000..cceb28e6b6e --- /dev/null +++ b/vendor/github.com/google/cadvisor/resctrl/manager.go @@ -0,0 +1,48 @@ +// +build linux + +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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. + +// Manager of resctrl for containers. +package resctrl + +import ( + "os" + + "github.com/google/cadvisor/stats" + + "github.com/opencontainers/runc/libcontainer/intelrdt" +) + +type manager struct { + id string + stats.NoopDestroy +} + +func (m manager) GetCollector(resctrlPath string) (stats.Collector, error) { + if _, err := os.Stat(resctrlPath); err != nil { + return &stats.NoopCollector{}, err + } + collector := newCollector(m.id, resctrlPath) + return collector, nil +} + +func NewManager(id string) (stats.Manager, error) { + + if intelrdt.IsMBMEnabled() || intelrdt.IsCMTEnabled() { + return &manager{id: id}, nil + } + + return &stats.NoopManager{}, nil +} diff --git a/vendor/github.com/google/cadvisor/stats/noop.go b/vendor/github.com/google/cadvisor/stats/noop.go new file mode 100644 index 00000000000..db129353495 --- /dev/null +++ b/vendor/github.com/google/cadvisor/stats/noop.go @@ -0,0 +1,43 @@ +// Copyright 2020 Google Inc. All Rights Reserved. +// +// 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. + +// Noop perf Manager and Collector. +package stats + +import ( + v1 "github.com/google/cadvisor/info/v1" + "k8s.io/klog/v2" +) + +type NoopManager struct { + NoopDestroy +} + +type NoopDestroy struct{} + +func (nsd NoopDestroy) Destroy() { + klog.V(5).Info("No-op Destroy function called") +} + +func (m *NoopManager) GetCollector(cgroup string) (Collector, error) { + return &NoopCollector{}, nil +} + +type NoopCollector struct { + NoopDestroy +} + +func (c *NoopCollector) UpdateStats(stats *v1.ContainerStats) error { + return nil +} diff --git a/vendor/github.com/google/cadvisor/accelerators/types.go b/vendor/github.com/google/cadvisor/stats/types.go similarity index 62% rename from vendor/github.com/google/cadvisor/accelerators/types.go rename to vendor/github.com/google/cadvisor/stats/types.go index d577953a045..77f54ffa7af 100644 --- a/vendor/github.com/google/cadvisor/accelerators/types.go +++ b/vendor/github.com/google/cadvisor/stats/types.go @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. All Rights Reserved. +// Copyright 2020 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,22 +11,25 @@ // 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 accelerators + +// Handling statistics that are fully controlled in cAdvisor +package stats import info "github.com/google/cadvisor/info/v1" -// This is supposed to store global state about an accelerator metrics collector. -// cadvisor manager will call Setup() when it starts and Destroy() when it stops. -// For each container detected by the cadvisor manager, it will call +// This is supposed to store global state about an cAdvisor metrics collector. +// cAdvisor manager will call Destroy() when it stops. +// For each container detected by the cAdvisor manager, it will call // GetCollector() with the devices cgroup path for that container. // GetCollector() is supposed to return an object that can update // accelerator stats for that container. -type AcceleratorManager interface { - Setup() +type Manager interface { Destroy() - GetCollector(deviceCgroup string) (AcceleratorCollector, error) + GetCollector(deviceCgroup string) (Collector, error) } -type AcceleratorCollector interface { +// Collector can update ContainerStats by adding more metrics. +type Collector interface { + Destroy() UpdateStats(*info.ContainerStats) error } diff --git a/vendor/github.com/google/cadvisor/summary/percentiles.go b/vendor/github.com/google/cadvisor/summary/percentiles.go index de92bc3a251..8ce706ad9e1 100644 --- a/vendor/github.com/google/cadvisor/summary/percentiles.go +++ b/vendor/github.com/google/cadvisor/summary/percentiles.go @@ -30,26 +30,26 @@ const secondsToNanoSeconds = secondsToMilliSeconds * milliSecondsToNanoSeconds type Uint64Slice []uint64 -func (a Uint64Slice) Len() int { return len(a) } -func (a Uint64Slice) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a Uint64Slice) Less(i, j int) bool { return a[i] < a[j] } +func (s Uint64Slice) Len() int { return len(s) } +func (s Uint64Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s Uint64Slice) Less(i, j int) bool { return s[i] < s[j] } // Get percentile of the provided samples. Round to integer. -func (self Uint64Slice) GetPercentile(d float64) uint64 { +func (s Uint64Slice) GetPercentile(d float64) uint64 { if d < 0.0 || d > 1.0 { return 0 } - count := self.Len() + count := s.Len() if count == 0 { return 0 } - sort.Sort(self) + sort.Sort(s) n := float64(d * (float64(count) + 1)) idx, frac := math.Modf(n) index := int(idx) - percentile := float64(self[index-1]) + percentile := float64(s[index-1]) if index > 1 && index < count { - percentile += frac * float64(self[index]-self[index-1]) + percentile += frac * float64(s[index]-s[index-1]) } return uint64(percentile) } @@ -61,15 +61,21 @@ type mean struct { Mean float64 } -func (self *mean) Add(value uint64) { - self.count++ - if self.count == 1 { - self.Mean = float64(value) +func (m *mean) Add(value uint64) { + m.count++ + if m.count == 1 { + m.Mean = float64(value) return } - c := float64(self.count) + c := float64(m.count) v := float64(value) - self.Mean = (self.Mean*(c-1) + v) / c + m.Mean = (m.Mean*(c-1) + v) / c +} + +type Percentile interface { + Add(info.Percentiles) + AddSample(uint64) + GetAllPercentiles() info.Percentiles } type resource struct { @@ -82,20 +88,20 @@ type resource struct { } // Adds a new percentile sample. -func (self *resource) Add(p info.Percentiles) { +func (r *resource) Add(p info.Percentiles) { if !p.Present { return } - if p.Max > self.max { - self.max = p.Max + if p.Max > r.max { + r.max = p.Max } - self.mean.Add(p.Mean) + r.mean.Add(p.Mean) // Selecting 90p of 90p :( - self.samples = append(self.samples, p.Ninety) + r.samples = append(r.samples, p.Ninety) } // Add a single sample. Internally, we convert it to a fake percentile sample. -func (self *resource) AddSample(val uint64) { +func (r *resource) AddSample(val uint64) { sample := info.Percentiles{ Present: true, Mean: val, @@ -104,22 +110,22 @@ func (self *resource) AddSample(val uint64) { Ninety: val, NinetyFive: val, } - self.Add(sample) + r.Add(sample) } // Get max, average, and 90p from existing samples. -func (self *resource) GetAllPercentiles() info.Percentiles { +func (r *resource) GetAllPercentiles() info.Percentiles { p := info.Percentiles{} - p.Mean = uint64(self.mean.Mean) - p.Max = self.max - p.Fifty = self.samples.GetPercentile(0.5) - p.Ninety = self.samples.GetPercentile(0.9) - p.NinetyFive = self.samples.GetPercentile(0.95) + p.Mean = uint64(r.mean.Mean) + p.Max = r.max + p.Fifty = r.samples.GetPercentile(0.5) + p.Ninety = r.samples.GetPercentile(0.9) + p.NinetyFive = r.samples.GetPercentile(0.95) p.Present = true return p } -func NewResource(size int) *resource { +func NewResource(size int) Percentile { return &resource{ samples: make(Uint64Slice, 0, size), mean: mean{count: 0, Mean: 0}, @@ -155,9 +161,8 @@ func getPercentComplete(stats []*secondSample) (percent int32) { } // Calculate cpurate from two consecutive total cpu usage samples. -func getCpuRate(latest, previous secondSample) (uint64, error) { - var elapsed int64 - elapsed = latest.Timestamp.Sub(previous.Timestamp).Nanoseconds() +func getCPURate(latest, previous secondSample) (uint64, error) { + elapsed := latest.Timestamp.Sub(previous.Timestamp).Nanoseconds() if elapsed < 10*milliSecondsToNanoSeconds { return 0, fmt.Errorf("elapsed time too small: %d ns: time now %s last %s", elapsed, latest.Timestamp.String(), previous.Timestamp.String()) } @@ -176,7 +181,7 @@ func GetMinutePercentiles(stats []*secondSample) info.Usage { memory := NewResource(len(stats)) for _, stat := range stats { if !lastSample.Timestamp.IsZero() { - cpuRate, err := getCpuRate(*stat, lastSample) + cpuRate, err := getCPURate(*stat, lastSample) if err != nil { continue } diff --git a/vendor/github.com/google/cadvisor/summary/summary.go b/vendor/github.com/google/cadvisor/summary/summary.go index 4912b9b4083..089396b74f8 100644 --- a/vendor/github.com/google/cadvisor/summary/summary.go +++ b/vendor/github.com/google/cadvisor/summary/summary.go @@ -103,7 +103,7 @@ func (s *StatsSummary) updateLatestUsage() { usage.Memory = latest.Memory if numStats > 1 { previous := s.secondSamples[numStats-2] - cpu, err := getCpuRate(*latest, *previous) + cpu, err := getCPURate(*latest, *previous) if err == nil { usage.Cpu = cpu } @@ -113,7 +113,6 @@ func (s *StatsSummary) updateLatestUsage() { defer s.dataLock.Unlock() s.derivedStats.LatestUsage = usage s.derivedStats.Timestamp = latest.Timestamp - return } // Generate new derived stats based on current minute stats samples. @@ -152,7 +151,7 @@ func (s *StatsSummary) getDerivedUsage(n int) (info.Usage, error) { samples := s.minuteSamples.RecentStats(n) numSamples := len(samples) if numSamples < 1 { - return info.Usage{}, fmt.Errorf("failed to retrieve any minute stats.") + return info.Usage{}, fmt.Errorf("failed to retrieve any minute stats") } // We generate derived stats even with partial data. usage := GetDerivedPercentiles(samples) @@ -178,7 +177,7 @@ func New(spec v1.ContainerSpec) (*StatsSummary, error) { summary.available.Memory = true } if !summary.available.Cpu && !summary.available.Memory { - return nil, fmt.Errorf("none of the resources are being tracked.") + return nil, fmt.Errorf("none of the resources are being tracked") } summary.minuteSamples = NewSamplesBuffer(60 /* one hour */) return &summary, nil diff --git a/vendor/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go b/vendor/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go index 6325d44bd90..3546a80c566 100644 --- a/vendor/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go +++ b/vendor/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go @@ -18,7 +18,7 @@ package cloudinfo import ( info "github.com/google/cadvisor/info/v1" - "k8s.io/klog" + "k8s.io/klog/v2" ) type CloudInfo interface { @@ -75,14 +75,14 @@ func NewRealCloudInfo() CloudInfo { } } -func (self *realCloudInfo) GetCloudProvider() info.CloudProvider { - return self.cloudProvider +func (i *realCloudInfo) GetCloudProvider() info.CloudProvider { + return i.cloudProvider } -func (self *realCloudInfo) GetInstanceType() info.InstanceType { - return self.instanceType +func (i *realCloudInfo) GetInstanceType() info.InstanceType { + return i.instanceType } -func (self *realCloudInfo) GetInstanceID() info.InstanceID { - return self.instanceID +func (i *realCloudInfo) GetInstanceID() info.InstanceID { + return i.instanceID } diff --git a/vendor/github.com/google/cadvisor/utils/cpuload/cpuload.go b/vendor/github.com/google/cadvisor/utils/cpuload/cpuload.go index ca46ea1e674..64a044e219a 100644 --- a/vendor/github.com/google/cadvisor/utils/cpuload/cpuload.go +++ b/vendor/github.com/google/cadvisor/utils/cpuload/cpuload.go @@ -20,7 +20,7 @@ import ( info "github.com/google/cadvisor/info/v1" "github.com/google/cadvisor/utils/cpuload/netlink" - "k8s.io/klog" + "k8s.io/klog/v2" ) type CpuLoadReader interface { diff --git a/vendor/github.com/google/cadvisor/utils/cpuload/netlink/conn.go b/vendor/github.com/google/cadvisor/utils/cpuload/netlink/conn.go index 7eb2204da3f..5ddfef8d4cc 100644 --- a/vendor/github.com/google/cadvisor/utils/cpuload/netlink/conn.go +++ b/vendor/github.com/google/cadvisor/utils/cpuload/netlink/conn.go @@ -55,41 +55,44 @@ func newConnection() (*Connection, error) { return conn, err } -func (self *Connection) Read(b []byte) (n int, err error) { - n, _, err = syscall.Recvfrom(self.fd, b, 0) +func (c *Connection) Read(b []byte) (n int, err error) { + n, _, err = syscall.Recvfrom(c.fd, b, 0) return n, err } -func (self *Connection) Write(b []byte) (n int, err error) { - err = syscall.Sendto(self.fd, b, 0, &self.addr) +func (c *Connection) Write(b []byte) (n int, err error) { + err = syscall.Sendto(c.fd, b, 0, &c.addr) return len(b), err } -func (self *Connection) Close() error { - return syscall.Close(self.fd) +func (c *Connection) Close() error { + return syscall.Close(c.fd) } -func (self *Connection) WriteMessage(msg syscall.NetlinkMessage) error { +func (c *Connection) WriteMessage(msg syscall.NetlinkMessage) error { w := bytes.NewBuffer(nil) msg.Header.Len = uint32(syscall.NLMSG_HDRLEN + len(msg.Data)) - msg.Header.Seq = self.seq - self.seq++ - msg.Header.Pid = self.pid - binary.Write(w, binary.LittleEndian, msg.Header) - _, err := w.Write(msg.Data) + msg.Header.Seq = c.seq + c.seq++ + msg.Header.Pid = c.pid + err := binary.Write(w, binary.LittleEndian, msg.Header) if err != nil { return err } - _, err = self.Write(w.Bytes()) + _, err = w.Write(msg.Data) + if err != nil { + return err + } + _, err = c.Write(w.Bytes()) return err } -func (self *Connection) ReadMessage() (msg syscall.NetlinkMessage, err error) { - err = binary.Read(self.rbuf, binary.LittleEndian, &msg.Header) +func (c *Connection) ReadMessage() (msg syscall.NetlinkMessage, err error) { + err = binary.Read(c.rbuf, binary.LittleEndian, &msg.Header) if err != nil { return msg, err } msg.Data = make([]byte, msg.Header.Len-syscall.NLMSG_HDRLEN) - _, err = self.rbuf.Read(msg.Data) + _, err = c.rbuf.Read(msg.Data) return msg, err } diff --git a/vendor/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go b/vendor/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go index e2d9d72d579..0a73230d5ac 100644 --- a/vendor/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go +++ b/vendor/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go @@ -27,6 +27,7 @@ import ( var ( // TODO(rjnagal): Verify and fix for other architectures. + Endian = binary.LittleEndian ) @@ -42,11 +43,11 @@ type netlinkMessage struct { Data []byte } -func (self netlinkMessage) toRawMsg() (rawmsg syscall.NetlinkMessage) { - rawmsg.Header = self.Header +func (m netlinkMessage) toRawMsg() (rawmsg syscall.NetlinkMessage) { + rawmsg.Header = m.Header w := bytes.NewBuffer([]byte{}) - binary.Write(w, Endian, self.GenHeader) - w.Write(self.Data) + binary.Write(w, Endian, m.GenHeader) + w.Write(m.Data) rawmsg.Data = w.Bytes() return rawmsg } @@ -64,9 +65,12 @@ func padding(size int, alignment int) int { } // Get family id for taskstats subsystem. -func getFamilyId(conn *Connection) (uint16, error) { +func getFamilyID(conn *Connection) (uint16, error) { msg := prepareFamilyMessage() - conn.WriteMessage(msg.toRawMsg()) + err := conn.WriteMessage(msg.toRawMsg()) + if err != nil { + return 0, err + } resp, err := conn.ReadMessage() if err != nil { @@ -164,7 +168,7 @@ func parseFamilyResp(msg syscall.NetlinkMessage) (uint16, error) { return 0, err } } - return 0, fmt.Errorf("family id not found in the response.") + return 0, fmt.Errorf("family id not found in the response") } // Extract task stats from response returned by kernel. @@ -203,7 +207,10 @@ func verifyHeader(msg syscall.NetlinkMessage) error { case syscall.NLMSG_ERROR: buf := bytes.NewBuffer(msg.Data) var errno int32 - binary.Read(buf, Endian, errno) + err := binary.Read(buf, Endian, errno) + if err != nil { + return err + } return fmt.Errorf("netlink request failed with error %s", syscall.Errno(-errno)) } return nil diff --git a/vendor/github.com/google/cadvisor/utils/cpuload/netlink/reader.go b/vendor/github.com/google/cadvisor/utils/cpuload/netlink/reader.go index 2e2b96f3bda..ba478bb6ab7 100644 --- a/vendor/github.com/google/cadvisor/utils/cpuload/netlink/reader.go +++ b/vendor/github.com/google/cadvisor/utils/cpuload/netlink/reader.go @@ -20,11 +20,11 @@ import ( info "github.com/google/cadvisor/info/v1" - "k8s.io/klog" + "k8s.io/klog/v2" ) type NetlinkReader struct { - familyId uint16 + familyID uint16 conn *Connection } @@ -34,24 +34,24 @@ func New() (*NetlinkReader, error) { return nil, fmt.Errorf("failed to create a new connection: %s", err) } - id, err := getFamilyId(conn) + id, err := getFamilyID(conn) if err != nil { return nil, fmt.Errorf("failed to get netlink family id for task stats: %s", err) } klog.V(4).Infof("Family id for taskstats: %d", id) return &NetlinkReader{ - familyId: id, + familyID: id, conn: conn, }, nil } -func (self *NetlinkReader) Stop() { - if self.conn != nil { - self.conn.Close() +func (r *NetlinkReader) Stop() { + if r.conn != nil { + r.conn.Close() } } -func (self *NetlinkReader) Start() error { +func (r *NetlinkReader) Start() error { // We do the start setup for netlink in New(). Nothing to do here. return nil } @@ -60,9 +60,9 @@ func (self *NetlinkReader) Start() error { // Caller can use historical data to calculate cpu load. // path is an absolute filesystem path for a container under the CPU cgroup hierarchy. // NOTE: non-hierarchical load is returned. It does not include load for subcontainers. -func (self *NetlinkReader) GetCpuLoad(name string, path string) (info.LoadStats, error) { +func (r *NetlinkReader) GetCpuLoad(name string, path string) (info.LoadStats, error) { if len(path) == 0 { - return info.LoadStats{}, fmt.Errorf("cgroup path can not be empty!") + return info.LoadStats{}, fmt.Errorf("cgroup path can not be empty") } cfd, err := os.Open(path) @@ -71,7 +71,7 @@ func (self *NetlinkReader) GetCpuLoad(name string, path string) (info.LoadStats, } defer cfd.Close() - stats, err := getLoadStats(self.familyId, cfd, self.conn) + stats, err := getLoadStats(r.familyID, cfd, r.conn) if err != nil { return info.LoadStats{}, err } diff --git a/vendor/github.com/google/cadvisor/utils/oomparser/oomparser.go b/vendor/github.com/google/cadvisor/utils/oomparser/oomparser.go index ea50c46308a..e652874e52d 100644 --- a/vendor/github.com/google/cadvisor/utils/oomparser/oomparser.go +++ b/vendor/github.com/google/cadvisor/utils/oomparser/oomparser.go @@ -22,11 +22,13 @@ import ( "github.com/euank/go-kmsg-parser/kmsgparser" - "k8s.io/klog" + "k8s.io/klog/v2" ) var ( - containerRegexp = regexp.MustCompile(`Task in (.*) killed as a result of limit of (.*)`) + legacyContainerRegexp = regexp.MustCompile(`Task in (.*) killed as a result of limit of (.*)`) + // Starting in 5.0 linux kernels, the OOM message changed + containerRegexp = regexp.MustCompile(`oom-kill:constraint=(.*),nodemask=(.*),cpuset=(.*),mems_allowed=(.*),oom_memcg=(.*) (.*),task_memcg=(.*),task=(.*),pid=(.*),uid=(.*)`) lastLineRegexp = regexp.MustCompile(`Killed process ([0-9]+) \((.+)\)`) firstLineRegexp = regexp.MustCompile(`invoked oom-killer:`) ) @@ -51,11 +53,14 @@ type OomInstance struct { // the absolute name of the container that was killed // due to the OOM. VictimContainerName string + // the constraint that triggered the OOM. One of CONSTRAINT_NONE, + // CONSTRAINT_CPUSET, CONSTRAINT_MEMORY_POLICY, CONSTRAINT_MEMCG + Constraint string } // gets the container name from a line and adds it to the oomInstance. -func getContainerName(line string, currentOomInstance *OomInstance) error { - parsedLine := containerRegexp.FindStringSubmatch(line) +func getLegacyContainerName(line string, currentOomInstance *OomInstance) error { + parsedLine := legacyContainerRegexp.FindStringSubmatch(line) if parsedLine == nil { return nil } @@ -64,6 +69,25 @@ func getContainerName(line string, currentOomInstance *OomInstance) error { return nil } +// gets the container name from a line and adds it to the oomInstance. +func getContainerName(line string, currentOomInstance *OomInstance) (bool, error) { + parsedLine := containerRegexp.FindStringSubmatch(line) + if parsedLine == nil { + // Fall back to the legacy format if it isn't found here. + return false, getLegacyContainerName(line, currentOomInstance) + } + currentOomInstance.ContainerName = parsedLine[7] + currentOomInstance.VictimContainerName = parsedLine[5] + currentOomInstance.Constraint = parsedLine[1] + pid, err := strconv.Atoi(parsedLine[9]) + if err != nil { + return false, err + } + currentOomInstance.Pid = pid + currentOomInstance.ProcessName = parsedLine[8] + return true, nil +} + // gets the pid, name, and date from a line and adds it to oomInstance func getProcessNamePid(line string, currentOomInstance *OomInstance) (bool, error) { reList := lastLineRegexp.FindStringSubmatch(line) @@ -83,36 +107,35 @@ func getProcessNamePid(line string, currentOomInstance *OomInstance) (bool, erro // uses regex to see if line is the start of a kernel oom log func checkIfStartOfOomMessages(line string) bool { - potential_oom_start := firstLineRegexp.MatchString(line) - if potential_oom_start { - return true - } - return false + potentialOomStart := firstLineRegexp.MatchString(line) + return potentialOomStart } // StreamOoms writes to a provided a stream of OomInstance objects representing // OOM events that are found in the logs. // It will block and should be called from a goroutine. -func (self *OomParser) StreamOoms(outStream chan<- *OomInstance) { - kmsgEntries := self.parser.Parse() - defer self.parser.Close() +func (p *OomParser) StreamOoms(outStream chan<- *OomInstance) { + kmsgEntries := p.parser.Parse() + defer p.parser.Close() for msg := range kmsgEntries { - in_oom_kernel_log := checkIfStartOfOomMessages(msg.Message) - if in_oom_kernel_log { + isOomMessage := checkIfStartOfOomMessages(msg.Message) + if isOomMessage { oomCurrentInstance := &OomInstance{ ContainerName: "/", VictimContainerName: "/", TimeOfDeath: msg.Timestamp, } for msg := range kmsgEntries { - err := getContainerName(msg.Message, oomCurrentInstance) + finished, err := getContainerName(msg.Message, oomCurrentInstance) if err != nil { klog.Errorf("%v", err) } - finished, err := getProcessNamePid(msg.Message, oomCurrentInstance) - if err != nil { - klog.Errorf("%v", err) + if !finished { + finished, err = getProcessNamePid(msg.Message, oomCurrentInstance) + if err != nil { + klog.Errorf("%v", err) + } } if finished { oomCurrentInstance.TimeOfDeath = msg.Timestamp diff --git a/vendor/github.com/google/cadvisor/utils/sysfs/sysfs.go b/vendor/github.com/google/cadvisor/utils/sysfs/sysfs.go index 1132e5b5610..becc4afc475 100644 --- a/vendor/github.com/google/cadvisor/utils/sysfs/sysfs.go +++ b/vendor/github.com/google/cadvisor/utils/sysfs/sysfs.go @@ -15,12 +15,18 @@ package sysfs import ( + "bytes" + "errors" "fmt" "io/ioutil" "os" "path" + "path/filepath" + "regexp" "strconv" "strings" + + "k8s.io/klog/v2" ) const ( @@ -30,6 +36,20 @@ const ( dmiDir = "/sys/class/dmi" ppcDevTree = "/proc/device-tree" s390xDevTree = "/etc" // s390/s390x changes + + coreIDFilePath = "/topology/core_id" + packageIDFilePath = "/topology/physical_package_id" + meminfoFile = "meminfo" + + cpuDirPattern = "cpu*[0-9]" + nodeDirPattern = "node*[0-9]" + + //HugePagesNrFile name of nr_hugepages file in sysfs + HugePagesNrFile = "nr_hugepages" +) + +var ( + nodeDir = "/sys/devices/system/node/" ) type CacheInfo struct { @@ -45,6 +65,20 @@ type CacheInfo struct { // Abstracts the lowest level calls to sysfs. type SysFs interface { + // Get NUMA nodes paths + GetNodesPaths() ([]string, error) + // Get paths to CPUs in provided directory e.g. /sys/devices/system/node/node0 or /sys/devices/system/cpu + GetCPUsPaths(cpusPath string) ([]string, error) + // Get physical core id for specified CPU + GetCoreID(coreIDFilePath string) (string, error) + // Get physical package id for specified CPU + GetCPUPhysicalPackageID(cpuPath string) (string, error) + // Get total memory for specified NUMA node + GetMemInfo(nodeDir string) (string, error) + // Get hugepages from specified directory + GetHugePagesInfo(hugePagesDirectory string) ([]os.FileInfo, error) + // Get hugepage_nr from specified directory + GetHugePagesNr(hugePagesDirectory string, hugePageName string) (string, error) // Get directory information for available block devices. GetBlockDevices() ([]os.FileInfo, error) // Get Size of a given block device. @@ -66,6 +100,9 @@ type SysFs interface { GetCacheInfo(cpu int, cache string) (CacheInfo, error) GetSystemUUID() (string, error) + // IsCPUOnline determines if CPU status from kernel hotplug machanism standpoint. + // See: https://www.kernel.org/doc/html/latest/core-api/cpu_hotplug.html + IsCPUOnline(dir string) bool } type realSysFs struct{} @@ -74,11 +111,61 @@ func NewRealSysFs() SysFs { return &realSysFs{} } -func (self *realSysFs) GetBlockDevices() ([]os.FileInfo, error) { +func (fs *realSysFs) GetNodesPaths() ([]string, error) { + pathPattern := fmt.Sprintf("%s%s", nodeDir, nodeDirPattern) + return filepath.Glob(pathPattern) +} + +func (fs *realSysFs) GetCPUsPaths(cpusPath string) ([]string, error) { + pathPattern := fmt.Sprintf("%s/%s", cpusPath, cpuDirPattern) + return filepath.Glob(pathPattern) +} + +func (fs *realSysFs) GetCoreID(cpuPath string) (string, error) { + coreIDFilePath := fmt.Sprintf("%s%s", cpuPath, coreIDFilePath) + coreID, err := ioutil.ReadFile(coreIDFilePath) + if err != nil { + return "", err + } + return strings.TrimSpace(string(coreID)), err +} + +func (fs *realSysFs) GetCPUPhysicalPackageID(cpuPath string) (string, error) { + packageIDFilePath := fmt.Sprintf("%s%s", cpuPath, packageIDFilePath) + packageID, err := ioutil.ReadFile(packageIDFilePath) + if err != nil { + return "", err + } + return strings.TrimSpace(string(packageID)), err +} + +func (fs *realSysFs) GetMemInfo(nodePath string) (string, error) { + meminfoPath := fmt.Sprintf("%s/%s", nodePath, meminfoFile) + meminfo, err := ioutil.ReadFile(meminfoPath) + if err != nil { + return "", err + } + return strings.TrimSpace(string(meminfo)), err +} + +func (fs *realSysFs) GetHugePagesInfo(hugePagesDirectory string) ([]os.FileInfo, error) { + return ioutil.ReadDir(hugePagesDirectory) +} + +func (fs *realSysFs) GetHugePagesNr(hugepagesDirectory string, hugePageName string) (string, error) { + hugePageFilePath := fmt.Sprintf("%s%s/%s", hugepagesDirectory, hugePageName, HugePagesNrFile) + hugePageFile, err := ioutil.ReadFile(hugePageFilePath) + if err != nil { + return "", err + } + return strings.TrimSpace(string(hugePageFile)), err +} + +func (fs *realSysFs) GetBlockDevices() ([]os.FileInfo, error) { return ioutil.ReadDir(blockDir) } -func (self *realSysFs) GetBlockDeviceNumbers(name string) (string, error) { +func (fs *realSysFs) GetBlockDeviceNumbers(name string) (string, error) { dev, err := ioutil.ReadFile(path.Join(blockDir, name, "/dev")) if err != nil { return "", err @@ -86,7 +173,7 @@ func (self *realSysFs) GetBlockDeviceNumbers(name string) (string, error) { return string(dev), nil } -func (self *realSysFs) GetBlockDeviceScheduler(name string) (string, error) { +func (fs *realSysFs) GetBlockDeviceScheduler(name string) (string, error) { sched, err := ioutil.ReadFile(path.Join(blockDir, name, "/queue/scheduler")) if err != nil { return "", err @@ -94,7 +181,7 @@ func (self *realSysFs) GetBlockDeviceScheduler(name string) (string, error) { return string(sched), nil } -func (self *realSysFs) GetBlockDeviceSize(name string) (string, error) { +func (fs *realSysFs) GetBlockDeviceSize(name string) (string, error) { size, err := ioutil.ReadFile(path.Join(blockDir, name, "/size")) if err != nil { return "", err @@ -102,7 +189,7 @@ func (self *realSysFs) GetBlockDeviceSize(name string) (string, error) { return string(size), nil } -func (self *realSysFs) GetNetworkDevices() ([]os.FileInfo, error) { +func (fs *realSysFs) GetNetworkDevices() ([]os.FileInfo, error) { files, err := ioutil.ReadDir(netDir) if err != nil { return nil, err @@ -124,7 +211,7 @@ func (self *realSysFs) GetNetworkDevices() ([]os.FileInfo, error) { return dirs, nil } -func (self *realSysFs) GetNetworkAddress(name string) (string, error) { +func (fs *realSysFs) GetNetworkAddress(name string) (string, error) { address, err := ioutil.ReadFile(path.Join(netDir, name, "/address")) if err != nil { return "", err @@ -132,7 +219,7 @@ func (self *realSysFs) GetNetworkAddress(name string) (string, error) { return string(address), nil } -func (self *realSysFs) GetNetworkMtu(name string) (string, error) { +func (fs *realSysFs) GetNetworkMtu(name string) (string, error) { mtu, err := ioutil.ReadFile(path.Join(netDir, name, "/mtu")) if err != nil { return "", err @@ -140,7 +227,7 @@ func (self *realSysFs) GetNetworkMtu(name string) (string, error) { return string(mtu), nil } -func (self *realSysFs) GetNetworkSpeed(name string) (string, error) { +func (fs *realSysFs) GetNetworkSpeed(name string) (string, error) { speed, err := ioutil.ReadFile(path.Join(netDir, name, "/speed")) if err != nil { return "", err @@ -148,7 +235,7 @@ func (self *realSysFs) GetNetworkSpeed(name string) (string, error) { return string(speed), nil } -func (self *realSysFs) GetNetworkStatValue(dev string, stat string) (uint64, error) { +func (fs *realSysFs) GetNetworkStatValue(dev string, stat string) (uint64, error) { statPath := path.Join(netDir, dev, "/statistics", stat) out, err := ioutil.ReadFile(statPath) if err != nil { @@ -162,7 +249,7 @@ func (self *realSysFs) GetNetworkStatValue(dev string, stat string) (uint64, err return s, nil } -func (self *realSysFs) GetCaches(id int) ([]os.FileInfo, error) { +func (fs *realSysFs) GetCaches(id int) ([]os.FileInfo, error) { cpuPath := fmt.Sprintf("%s%d/cache", cacheDir, id) return ioutil.ReadDir(cpuPath) } @@ -177,7 +264,7 @@ func bitCount(i uint64) (count int) { return } -func getCpuCount(cache string) (count int, err error) { +func getCPUCount(cache string) (count int, err error) { out, err := ioutil.ReadFile(path.Join(cache, "/shared_cpu_map")) if err != nil { return 0, err @@ -194,7 +281,7 @@ func getCpuCount(cache string) (count int, err error) { return } -func (self *realSysFs) GetCacheInfo(id int, name string) (CacheInfo, error) { +func (fs *realSysFs) GetCacheInfo(id int, name string) (CacheInfo, error) { cachePath := fmt.Sprintf("%s%d/cache/%s", cacheDir, id, name) out, err := ioutil.ReadFile(path.Join(cachePath, "/size")) if err != nil { @@ -222,7 +309,7 @@ func (self *realSysFs) GetCacheInfo(id int, name string) (CacheInfo, error) { return CacheInfo{}, err } cacheType := strings.TrimSpace(string(out)) - cpuCount, err := getCpuCount(cachePath) + cpuCount, err := getCPUCount(cachePath) if err != nil { return CacheInfo{}, err } @@ -234,7 +321,7 @@ func (self *realSysFs) GetCacheInfo(id int, name string) (CacheInfo, error) { }, nil } -func (self *realSysFs) GetSystemUUID() (string, error) { +func (fs *realSysFs) GetSystemUUID() (string, error) { if id, err := ioutil.ReadFile(path.Join(dmiDir, "id", "product_uuid")); err == nil { return strings.TrimSpace(string(id)), nil } else if id, err = ioutil.ReadFile(path.Join(ppcDevTree, "system-id")); err == nil { @@ -247,3 +334,26 @@ func (self *realSysFs) GetSystemUUID() (string, error) { return "", err } } + +func (fs *realSysFs) IsCPUOnline(dir string) bool { + cpuPath := fmt.Sprintf("%s/online", dir) + content, err := ioutil.ReadFile(cpuPath) + if err != nil { + pathErr, ok := err.(*os.PathError) + if ok { + if errors.Is(pathErr.Unwrap(), os.ErrNotExist) && isZeroCPU(dir) { + return true + } + } + klog.Warningf("unable to read %s: %s", cpuPath, err.Error()) + return false + } + trimmed := bytes.TrimSpace(content) + return len(trimmed) == 1 && trimmed[0] == 49 +} + +func isZeroCPU(dir string) bool { + regex := regexp.MustCompile("cpu([0-9]*)") + matches := regex.FindStringSubmatch(dir) + return len(matches) == 2 && matches[1] == "0" +} diff --git a/vendor/github.com/google/cadvisor/utils/sysinfo/sysinfo.go b/vendor/github.com/google/cadvisor/utils/sysinfo/sysinfo.go index 7dd14cf4977..9ef62b85800 100644 --- a/vendor/github.com/google/cadvisor/utils/sysinfo/sysinfo.go +++ b/vendor/github.com/google/cadvisor/utils/sysinfo/sysinfo.go @@ -16,15 +16,30 @@ package sysinfo import ( "fmt" + "os" "regexp" "strconv" "strings" info "github.com/google/cadvisor/info/v1" "github.com/google/cadvisor/utils/sysfs" + + "k8s.io/klog/v2" ) -var schedulerRegExp = regexp.MustCompile(`.*\[(.*)\].*`) +var ( + schedulerRegExp = regexp.MustCompile(`.*\[(.*)\].*`) + nodeDirRegExp = regexp.MustCompile(`node/node(\d*)`) + cpuDirRegExp = regexp.MustCompile(`/cpu(\d+)`) + memoryCapacityRegexp = regexp.MustCompile(`MemTotal:\s*([0-9]+) kB`) + + cpusPath = "/sys/devices/system/cpu" +) + +const ( + cacheLevel2 = 2 + hugepagesDir = "hugepages/" +) // Get information about block devices present on the system. // Uses the passed in system interface to retrieve the low level OS information. @@ -42,14 +57,14 @@ func GetBlockDeviceInfo(sysfs sysfs.SysFs) (map[string]info.DiskInfo, error) { if strings.HasPrefix(name, "loop") || strings.HasPrefix(name, "ram") || strings.HasPrefix(name, "sr") { continue } - disk_info := info.DiskInfo{ + diskInfo := info.DiskInfo{ Name: name, } dev, err := sysfs.GetBlockDeviceNumbers(name) if err != nil { return nil, err } - n, err := fmt.Sscanf(dev, "%d:%d", &disk_info.Major, &disk_info.Minor) + n, err := fmt.Sscanf(dev, "%d:%d", &diskInfo.Major, &diskInfo.Minor) if err != nil || n != 2 { return nil, fmt.Errorf("could not parse device numbers from %s for device %s", dev, name) } @@ -63,18 +78,18 @@ func GetBlockDeviceInfo(sysfs sysfs.SysFs) (map[string]info.DiskInfo, error) { return nil, err } // size is in 512 bytes blocks. - disk_info.Size = size * 512 + diskInfo.Size = size * 512 - disk_info.Scheduler = "none" + diskInfo.Scheduler = "none" blkSched, err := sysfs.GetBlockDeviceScheduler(name) if err == nil { matches := schedulerRegExp.FindSubmatch([]byte(blkSched)) if len(matches) >= 2 { - disk_info.Scheduler = string(matches[1]) + diskInfo.Scheduler = string(matches[1]) } } - device := fmt.Sprintf("%d:%d", disk_info.Major, disk_info.Minor) - diskMap[device] = disk_info + device := fmt.Sprintf("%d:%d", diskInfo.Major, diskInfo.Minor) + diskMap[device] = diskInfo } return diskMap, nil } @@ -133,6 +148,296 @@ func GetNetworkDevices(sysfs sysfs.SysFs) ([]info.NetInfo, error) { return netDevices, nil } +// GetHugePagesInfo returns information about pre-allocated huge pages +// hugepagesDirectory should be top directory of hugepages +// Such as: /sys/kernel/mm/hugepages/ +func GetHugePagesInfo(sysFs sysfs.SysFs, hugepagesDirectory string) ([]info.HugePagesInfo, error) { + var hugePagesInfo []info.HugePagesInfo + files, err := sysFs.GetHugePagesInfo(hugepagesDirectory) + if err != nil { + // treat as non-fatal since kernels and machine can be + // configured to disable hugepage support + return hugePagesInfo, nil + } + + for _, st := range files { + nameArray := strings.Split(st.Name(), "-") + pageSizeArray := strings.Split(nameArray[1], "kB") + pageSize, err := strconv.ParseUint(string(pageSizeArray[0]), 10, 64) + if err != nil { + return hugePagesInfo, err + } + + val, err := sysFs.GetHugePagesNr(hugepagesDirectory, st.Name()) + if err != nil { + return hugePagesInfo, err + } + var numPages uint64 + // we use sscanf as the file as a new-line that trips up ParseUint + // it returns the number of tokens successfully parsed, so if + // n != 1, it means we were unable to parse a number from the file + n, err := fmt.Sscanf(string(val), "%d", &numPages) + if err != nil || n != 1 { + return hugePagesInfo, fmt.Errorf("could not parse file nr_hugepage for %s, contents %q", st.Name(), string(val)) + } + + hugePagesInfo = append(hugePagesInfo, info.HugePagesInfo{ + NumPages: numPages, + PageSize: pageSize, + }) + } + return hugePagesInfo, nil +} + +// GetNodesInfo returns information about NUMA nodes and their topology +func GetNodesInfo(sysFs sysfs.SysFs) ([]info.Node, int, error) { + nodes := []info.Node{} + allLogicalCoresCount := 0 + + nodesDirs, err := sysFs.GetNodesPaths() + if err != nil { + return nil, 0, err + } + + if len(nodesDirs) == 0 { + klog.Warningf("Nodes topology is not available, providing CPU topology") + return getCPUTopology(sysFs) + } + + for _, nodeDir := range nodesDirs { + id, err := getMatchedInt(nodeDirRegExp, nodeDir) + if err != nil { + return nil, 0, err + } + node := info.Node{Id: id} + + cpuDirs, err := sysFs.GetCPUsPaths(nodeDir) + if len(cpuDirs) == 0 { + klog.Warningf("Found node without any CPU, nodeDir: %s, number of cpuDirs %d, err: %v", nodeDir, len(cpuDirs), err) + } else { + cores, err := getCoresInfo(sysFs, cpuDirs) + if err != nil { + return nil, 0, err + } + node.Cores = cores + for _, core := range cores { + allLogicalCoresCount += len(core.Threads) + } + } + + // On some Linux platforms(such as Arm64 guest kernel), cache info may not exist. + // So, we should ignore error here. + err = addCacheInfo(sysFs, &node) + if err != nil { + klog.V(1).Infof("Found node without cache information, nodeDir: %s", nodeDir) + } + + node.Memory, err = getNodeMemInfo(sysFs, nodeDir) + if err != nil { + return nil, 0, err + } + + hugepagesDirectory := fmt.Sprintf("%s/%s", nodeDir, hugepagesDir) + node.HugePages, err = GetHugePagesInfo(sysFs, hugepagesDirectory) + if err != nil { + return nil, 0, err + } + + nodes = append(nodes, node) + } + return nodes, allLogicalCoresCount, err +} + +func getCPUTopology(sysFs sysfs.SysFs) ([]info.Node, int, error) { + nodes := []info.Node{} + + cpusPaths, err := sysFs.GetCPUsPaths(cpusPath) + if err != nil { + return nil, 0, err + } + cpusCount := len(cpusPaths) + + if cpusCount == 0 { + err = fmt.Errorf("Any CPU is not available, cpusPath: %s", cpusPath) + return nil, 0, err + } + + cpusByPhysicalPackageID, err := getCpusByPhysicalPackageID(sysFs, cpusPaths) + if err != nil { + return nil, 0, err + } + + if len(cpusByPhysicalPackageID) == 0 { + klog.Warningf("Cannot read any physical package id for any CPU") + return nil, cpusCount, nil + } + + for physicalPackageID, cpus := range cpusByPhysicalPackageID { + node := info.Node{Id: physicalPackageID} + + cores, err := getCoresInfo(sysFs, cpus) + if err != nil { + return nil, 0, err + } + node.Cores = cores + + // On some Linux platforms(such as Arm64 guest kernel), cache info may not exist. + // So, we should ignore error here. + err = addCacheInfo(sysFs, &node) + if err != nil { + klog.V(1).Infof("Found cpu without cache information, cpuPath: %s", cpus) + } + nodes = append(nodes, node) + } + return nodes, cpusCount, nil +} + +func getCpusByPhysicalPackageID(sysFs sysfs.SysFs, cpusPaths []string) (map[int][]string, error) { + cpuPathsByPhysicalPackageID := make(map[int][]string) + for _, cpuPath := range cpusPaths { + + rawPhysicalPackageID, err := sysFs.GetCPUPhysicalPackageID(cpuPath) + if os.IsNotExist(err) { + klog.Warningf("Cannot read physical package id for %s, physical_package_id file does not exist, err: %s", cpuPath, err) + continue + } else if err != nil { + return nil, err + } + + physicalPackageID, err := strconv.Atoi(rawPhysicalPackageID) + if err != nil { + return nil, err + } + + if _, ok := cpuPathsByPhysicalPackageID[physicalPackageID]; !ok { + cpuPathsByPhysicalPackageID[physicalPackageID] = make([]string, 0) + } + + cpuPathsByPhysicalPackageID[physicalPackageID] = append(cpuPathsByPhysicalPackageID[physicalPackageID], cpuPath) + } + return cpuPathsByPhysicalPackageID, nil +} + +// addCacheInfo adds information about cache for NUMA node +func addCacheInfo(sysFs sysfs.SysFs, node *info.Node) error { + for coreID, core := range node.Cores { + threadID := core.Threads[0] //get any thread for core + caches, err := GetCacheInfo(sysFs, threadID) + if err != nil { + return err + } + + numThreadsPerCore := len(core.Threads) + numThreadsPerNode := len(node.Cores) * numThreadsPerCore + + for _, cache := range caches { + c := info.Cache{ + Size: cache.Size, + Level: cache.Level, + Type: cache.Type, + } + if cache.Cpus == numThreadsPerNode && cache.Level > cacheLevel2 { + // Add a node-level cache. + cacheFound := false + for _, nodeCache := range node.Caches { + if nodeCache == c { + cacheFound = true + } + } + if !cacheFound { + node.Caches = append(node.Caches, c) + } + } else if cache.Cpus == numThreadsPerCore { + // Add core level cache + node.Cores[coreID].Caches = append(node.Cores[coreID].Caches, c) + } + // Ignore unknown caches. + } + } + return nil +} + +// getNodeMemInfo returns information about total memory for NUMA node +func getNodeMemInfo(sysFs sysfs.SysFs, nodeDir string) (uint64, error) { + rawMem, err := sysFs.GetMemInfo(nodeDir) + if err != nil { + //Ignore if per-node info is not available. + klog.Warningf("Found node without memory information, nodeDir: %s", nodeDir) + return 0, nil + } + matches := memoryCapacityRegexp.FindStringSubmatch(rawMem) + if len(matches) != 2 { + return 0, fmt.Errorf("failed to match regexp in output: %q", string(rawMem)) + } + memory, err := strconv.ParseUint(matches[1], 10, 64) + if err != nil { + return 0, err + } + memory = memory * 1024 // Convert to bytes + return uint64(memory), nil +} + +// getCoresInfo retruns infromation about physical cores +func getCoresInfo(sysFs sysfs.SysFs, cpuDirs []string) ([]info.Core, error) { + cores := make([]info.Core, 0, len(cpuDirs)) + for _, cpuDir := range cpuDirs { + cpuID, err := getMatchedInt(cpuDirRegExp, cpuDir) + if err != nil { + return nil, fmt.Errorf("Unexpected format of CPU directory, cpuDirRegExp %s, cpuDir: %s", cpuDirRegExp, cpuDir) + } + if !sysFs.IsCPUOnline(cpuDir) { + continue + } + + rawPhysicalID, err := sysFs.GetCoreID(cpuDir) + if os.IsNotExist(err) { + klog.Warningf("Cannot read core id for %s, core_id file does not exist, err: %s", cpuDir, err) + continue + } else if err != nil { + return nil, err + } + physicalID, err := strconv.Atoi(rawPhysicalID) + if err != nil { + return nil, err + } + + coreIDx := -1 + for id, core := range cores { + if core.Id == physicalID { + coreIDx = id + } + } + if coreIDx == -1 { + cores = append(cores, info.Core{}) + coreIDx = len(cores) - 1 + } + desiredCore := &cores[coreIDx] + + desiredCore.Id = physicalID + if len(desiredCore.Threads) == 0 { + desiredCore.Threads = []int{cpuID} + } else { + desiredCore.Threads = append(desiredCore.Threads, cpuID) + } + + rawPhysicalPackageID, err := sysFs.GetCPUPhysicalPackageID(cpuDir) + if os.IsNotExist(err) { + klog.Warningf("Cannot read physical package id for %s, physical_package_id file does not exist, err: %s", cpuDir, err) + continue + } else if err != nil { + return nil, err + } + + physicalPackageID, err := strconv.Atoi(rawPhysicalPackageID) + if err != nil { + return nil, err + } + desiredCore.SocketID = physicalPackageID + } + return cores, nil +} + +// GetCacheInfo return information about a cache accessible from the given cpu thread func GetCacheInfo(sysFs sysfs.SysFs, id int) ([]sysfs.CacheInfo, error) { caches, err := sysFs.GetCaches(id) if err != nil { @@ -153,12 +458,6 @@ func GetCacheInfo(sysFs sysfs.SysFs, id int) ([]sysfs.CacheInfo, error) { return info, nil } -func GetNetworkStats(name string) (info.InterfaceStats, error) { - // TODO(rjnagal): Take syfs as an argument. - sysFs := sysfs.NewRealSysFs() - return getNetworkStats(name, sysFs) -} - func getNetworkStats(name string, sysFs sysfs.SysFs) (info.InterfaceStats, error) { var stats info.InterfaceStats var err error @@ -201,3 +500,26 @@ func getNetworkStats(name string, sysFs sysfs.SysFs) (info.InterfaceStats, error func GetSystemUUID(sysFs sysfs.SysFs) (string, error) { return sysFs.GetSystemUUID() } + +func getMatchedInt(rgx *regexp.Regexp, str string) (int, error) { + matches := rgx.FindStringSubmatch(str) + if len(matches) != 2 { + return 0, fmt.Errorf("failed to match regexp, str: %s", str) + } + valInt, err := strconv.Atoi(matches[1]) + if err != nil { + return 0, err + } + return valInt, nil +} + +// GetSocketFromCPU returns Socket ID of passed CPU. If is not present, returns -1. +func GetSocketFromCPU(topology []info.Node, cpu int) int { + for _, node := range topology { + found, coreID := node.FindCoreByThread(cpu) + if found { + return node.Cores[coreID].SocketID + } + } + return -1 +} diff --git a/vendor/github.com/google/cadvisor/utils/timed_store.go b/vendor/github.com/google/cadvisor/utils/timed_store.go index 321df0962fb..9b667df577c 100644 --- a/vendor/github.com/google/cadvisor/utils/timed_store.go +++ b/vendor/github.com/google/cadvisor/utils/timed_store.go @@ -57,60 +57,60 @@ func NewTimedStore(age time.Duration, maxItems int) *TimedStore { } // Adds an element to the start of the buffer (removing one from the end if necessary). -func (self *TimedStore) Add(timestamp time.Time, item interface{}) { +func (s *TimedStore) Add(timestamp time.Time, item interface{}) { data := timedStoreData{ timestamp: timestamp, data: item, } // Common case: data is added in order. - if len(self.buffer) == 0 || !timestamp.Before(self.buffer[len(self.buffer)-1].timestamp) { - self.buffer = append(self.buffer, data) + if len(s.buffer) == 0 || !timestamp.Before(s.buffer[len(s.buffer)-1].timestamp) { + s.buffer = append(s.buffer, data) } else { // Data is out of order; insert it in the correct position. - index := sort.Search(len(self.buffer), func(index int) bool { - return self.buffer[index].timestamp.After(timestamp) + index := sort.Search(len(s.buffer), func(index int) bool { + return s.buffer[index].timestamp.After(timestamp) }) - self.buffer = append(self.buffer, timedStoreData{}) // Make room to shift the elements - copy(self.buffer[index+1:], self.buffer[index:]) // Shift the elements over - self.buffer[index] = data + s.buffer = append(s.buffer, timedStoreData{}) // Make room to shift the elements + copy(s.buffer[index+1:], s.buffer[index:]) // Shift the elements over + s.buffer[index] = data } // Remove any elements before eviction time. // TODO(rjnagal): This is assuming that the added entry has timestamp close to now. - evictTime := timestamp.Add(-self.age) - index := sort.Search(len(self.buffer), func(index int) bool { - return self.buffer[index].timestamp.After(evictTime) + evictTime := timestamp.Add(-s.age) + index := sort.Search(len(s.buffer), func(index int) bool { + return s.buffer[index].timestamp.After(evictTime) }) - if index < len(self.buffer) { - self.buffer = self.buffer[index:] + if index < len(s.buffer) { + s.buffer = s.buffer[index:] } // Remove any elements if over our max size. - if self.maxItems >= 0 && len(self.buffer) > self.maxItems { - startIndex := len(self.buffer) - self.maxItems - self.buffer = self.buffer[startIndex:] + if s.maxItems >= 0 && len(s.buffer) > s.maxItems { + startIndex := len(s.buffer) - s.maxItems + s.buffer = s.buffer[startIndex:] } } // Returns up to maxResult elements in the specified time period (inclusive). // Results are from first to last. maxResults of -1 means no limit. -func (self *TimedStore) InTimeRange(start, end time.Time, maxResults int) []interface{} { +func (s *TimedStore) InTimeRange(start, end time.Time, maxResults int) []interface{} { // No stats, return empty. - if len(self.buffer) == 0 { + if len(s.buffer) == 0 { return []interface{}{} } var startIndex int if start.IsZero() { // None specified, start at the beginning. - startIndex = len(self.buffer) - 1 + startIndex = len(s.buffer) - 1 } else { // Start is the index before the elements smaller than it. We do this by // finding the first element smaller than start and taking the index // before that element - startIndex = sort.Search(len(self.buffer), func(index int) bool { + startIndex = sort.Search(len(s.buffer), func(index int) bool { // buffer[index] < start - return self.getData(index).timestamp.Before(start) + return s.getData(index).timestamp.Before(start) }) - 1 // Check if start is after all the data we have. if startIndex < 0 { @@ -124,12 +124,12 @@ func (self *TimedStore) InTimeRange(start, end time.Time, maxResults int) []inte endIndex = 0 } else { // End is the first index smaller than or equal to it (so, not larger). - endIndex = sort.Search(len(self.buffer), func(index int) bool { + endIndex = sort.Search(len(s.buffer), func(index int) bool { // buffer[index] <= t -> !(buffer[index] > t) - return !self.getData(index).timestamp.After(end) + return !s.getData(index).timestamp.After(end) }) // Check if end is before all the data we have. - if endIndex == len(self.buffer) { + if endIndex == len(s.buffer) { return []interface{}{} } } @@ -144,21 +144,21 @@ func (self *TimedStore) InTimeRange(start, end time.Time, maxResults int) []inte // Return in sorted timestamp order so from the "back" to "front". result := make([]interface{}, numResults) for i := 0; i < numResults; i++ { - result[i] = self.Get(startIndex - i) + result[i] = s.Get(startIndex - i) } return result } // Gets the element at the specified index. Note that elements are output in LIFO order. -func (self *TimedStore) Get(index int) interface{} { - return self.getData(index).data +func (s *TimedStore) Get(index int) interface{} { + return s.getData(index).data } // Gets the data at the specified index. Note that elements are output in LIFO order. -func (self *TimedStore) getData(index int) timedStoreData { - return self.buffer[len(self.buffer)-index-1] +func (s *TimedStore) getData(index int) timedStoreData { + return s.buffer[len(s.buffer)-index-1] } -func (self *TimedStore) Size() int { - return len(self.buffer) +func (s *TimedStore) Size() int { + return len(s.buffer) } diff --git a/vendor/github.com/google/cadvisor/zfs/watcher.go b/vendor/github.com/google/cadvisor/zfs/watcher.go index 844f52f2e70..ace42853857 100644 --- a/vendor/github.com/google/cadvisor/zfs/watcher.go +++ b/vendor/github.com/google/cadvisor/zfs/watcher.go @@ -19,7 +19,7 @@ import ( "time" zfs "github.com/mistifyio/go-zfs" - "k8s.io/klog" + "k8s.io/klog/v2" ) // zfsWatcher maintains a cache of filesystem -> usage stats for a diff --git a/vendor/github.com/googleapis/gax-go/v2/LICENSE b/vendor/github.com/googleapis/gax-go/v2/LICENSE new file mode 100644 index 00000000000..6d16b6578a2 --- /dev/null +++ b/vendor/github.com/googleapis/gax-go/v2/LICENSE @@ -0,0 +1,27 @@ +Copyright 2016, Google Inc. +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/googleapis/gax-go/v2/call_option.go b/vendor/github.com/googleapis/gax-go/v2/call_option.go new file mode 100644 index 00000000000..b1d53dd19cb --- /dev/null +++ b/vendor/github.com/googleapis/gax-go/v2/call_option.go @@ -0,0 +1,161 @@ +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package gax + +import ( + "math/rand" + "time" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// CallOption is an option used by Invoke to control behaviors of RPC calls. +// CallOption works by modifying relevant fields of CallSettings. +type CallOption interface { + // Resolve applies the option by modifying cs. + Resolve(cs *CallSettings) +} + +// Retryer is used by Invoke to determine retry behavior. +type Retryer interface { + // Retry reports whether a request should be retriedand how long to pause before retrying + // if the previous attempt returned with err. Invoke never calls Retry with nil error. + Retry(err error) (pause time.Duration, shouldRetry bool) +} + +type retryerOption func() Retryer + +func (o retryerOption) Resolve(s *CallSettings) { + s.Retry = o +} + +// WithRetry sets CallSettings.Retry to fn. +func WithRetry(fn func() Retryer) CallOption { + return retryerOption(fn) +} + +// OnCodes returns a Retryer that retries if and only if +// the previous attempt returns a GRPC error whose error code is stored in cc. +// Pause times between retries are specified by bo. +// +// bo is only used for its parameters; each Retryer has its own copy. +func OnCodes(cc []codes.Code, bo Backoff) Retryer { + return &boRetryer{ + backoff: bo, + codes: append([]codes.Code(nil), cc...), + } +} + +type boRetryer struct { + backoff Backoff + codes []codes.Code +} + +func (r *boRetryer) Retry(err error) (time.Duration, bool) { + st, ok := status.FromError(err) + if !ok { + return 0, false + } + c := st.Code() + for _, rc := range r.codes { + if c == rc { + return r.backoff.Pause(), true + } + } + return 0, false +} + +// Backoff implements exponential backoff. +// The wait time between retries is a random value between 0 and the "retry envelope". +// The envelope starts at Initial and increases by the factor of Multiplier every retry, +// but is capped at Max. +type Backoff struct { + // Initial is the initial value of the retry envelope, defaults to 1 second. + Initial time.Duration + + // Max is the maximum value of the retry envelope, defaults to 30 seconds. + Max time.Duration + + // Multiplier is the factor by which the retry envelope increases. + // It should be greater than 1 and defaults to 2. + Multiplier float64 + + // cur is the current retry envelope + cur time.Duration +} + +// Pause returns the next time.Duration that the caller should use to backoff. +func (bo *Backoff) Pause() time.Duration { + if bo.Initial == 0 { + bo.Initial = time.Second + } + if bo.cur == 0 { + bo.cur = bo.Initial + } + if bo.Max == 0 { + bo.Max = 30 * time.Second + } + if bo.Multiplier < 1 { + bo.Multiplier = 2 + } + // Select a duration between 1ns and the current max. It might seem + // counterintuitive to have so much jitter, but + // https://www.awsarchitectureblog.com/2015/03/backoff.html argues that + // that is the best strategy. + d := time.Duration(1 + rand.Int63n(int64(bo.cur))) + bo.cur = time.Duration(float64(bo.cur) * bo.Multiplier) + if bo.cur > bo.Max { + bo.cur = bo.Max + } + return d +} + +type grpcOpt []grpc.CallOption + +func (o grpcOpt) Resolve(s *CallSettings) { + s.GRPC = o +} + +// WithGRPCOptions allows passing gRPC call options during client creation. +func WithGRPCOptions(opt ...grpc.CallOption) CallOption { + return grpcOpt(append([]grpc.CallOption(nil), opt...)) +} + +// CallSettings allow fine-grained control over how calls are made. +type CallSettings struct { + // Retry returns a Retryer to be used to control retry logic of a method call. + // If Retry is nil or the returned Retryer is nil, the call will not be retried. + Retry func() Retryer + + // CallOptions to be forwarded to GRPC. + GRPC []grpc.CallOption +} diff --git a/vendor/github.com/googleapis/gax-go/v2/gax.go b/vendor/github.com/googleapis/gax-go/v2/gax.go new file mode 100644 index 00000000000..3fd1b0b84b0 --- /dev/null +++ b/vendor/github.com/googleapis/gax-go/v2/gax.go @@ -0,0 +1,39 @@ +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Package gax contains a set of modules which aid the development of APIs +// for clients and servers based on gRPC and Google API conventions. +// +// Application code will rarely need to use this library directly. +// However, code generated automatically from API definition files can use it +// to simplify code generation and to provide more convenient and idiomatic API surfaces. +package gax + +// Version specifies the gax-go version being used. +const Version = "2.0.4" diff --git a/vendor/github.com/googleapis/gax-go/v2/go.mod b/vendor/github.com/googleapis/gax-go/v2/go.mod new file mode 100644 index 00000000000..9cdfaf44752 --- /dev/null +++ b/vendor/github.com/googleapis/gax-go/v2/go.mod @@ -0,0 +1,3 @@ +module github.com/googleapis/gax-go/v2 + +require google.golang.org/grpc v1.19.0 diff --git a/vendor/github.com/googleapis/gax-go/v2/go.sum b/vendor/github.com/googleapis/gax-go/v2/go.sum new file mode 100644 index 00000000000..7fa23ecf95e --- /dev/null +++ b/vendor/github.com/googleapis/gax-go/v2/go.sum @@ -0,0 +1,25 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d h1:g9qWBGx4puODJTMVyoPrpoxPFgVGd+z1DZwjfRu4d0I= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522 h1:Ve1ORMCxvRmSXBwJK+t3Oy+V2vRW2OetUQBq4rJIkZE= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/googleapis/gax-go/v2/header.go b/vendor/github.com/googleapis/gax-go/v2/header.go new file mode 100644 index 00000000000..139371a0bf1 --- /dev/null +++ b/vendor/github.com/googleapis/gax-go/v2/header.go @@ -0,0 +1,53 @@ +// Copyright 2018, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package gax + +import "bytes" + +// XGoogHeader is for use by the Google Cloud Libraries only. +// +// XGoogHeader formats key-value pairs. +// The resulting string is suitable for x-goog-api-client header. +func XGoogHeader(keyval ...string) string { + if len(keyval) == 0 { + return "" + } + if len(keyval)%2 != 0 { + panic("gax.Header: odd argument count") + } + var buf bytes.Buffer + for i := 0; i < len(keyval); i += 2 { + buf.WriteByte(' ') + buf.WriteString(keyval[i]) + buf.WriteByte('/') + buf.WriteString(keyval[i+1]) + } + return buf.String()[1:] +} diff --git a/vendor/github.com/googleapis/gax-go/v2/invoke.go b/vendor/github.com/googleapis/gax-go/v2/invoke.go new file mode 100644 index 00000000000..fe31dd004e9 --- /dev/null +++ b/vendor/github.com/googleapis/gax-go/v2/invoke.go @@ -0,0 +1,99 @@ +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package gax + +import ( + "context" + "strings" + "time" +) + +// APICall is a user defined call stub. +type APICall func(context.Context, CallSettings) error + +// Invoke calls the given APICall, +// performing retries as specified by opts, if any. +func Invoke(ctx context.Context, call APICall, opts ...CallOption) error { + var settings CallSettings + for _, opt := range opts { + opt.Resolve(&settings) + } + return invoke(ctx, call, settings, Sleep) +} + +// Sleep is similar to time.Sleep, but it can be interrupted by ctx.Done() closing. +// If interrupted, Sleep returns ctx.Err(). +func Sleep(ctx context.Context, d time.Duration) error { + t := time.NewTimer(d) + select { + case <-ctx.Done(): + t.Stop() + return ctx.Err() + case <-t.C: + return nil + } +} + +type sleeper func(ctx context.Context, d time.Duration) error + +// invoke implements Invoke, taking an additional sleeper argument for testing. +func invoke(ctx context.Context, call APICall, settings CallSettings, sp sleeper) error { + var retryer Retryer + for { + err := call(ctx, settings) + if err == nil { + return nil + } + if settings.Retry == nil { + return err + } + // Never retry permanent certificate errors. (e.x. if ca-certificates + // are not installed). We should only make very few, targeted + // exceptions: many (other) status=Unavailable should be retried, such + // as if there's a network hiccup, or the internet goes out for a + // minute. This is also why here we are doing string parsing instead of + // simply making Unavailable a non-retried code elsewhere. + if strings.Contains(err.Error(), "x509: certificate signed by unknown authority") { + return err + } + if retryer == nil { + if r := settings.Retry(); r != nil { + retryer = r + } else { + return err + } + } + if d, ok := retryer.Retry(err); !ok { + return err + } else if err = sp(ctx, d); err != nil { + return err + } + } +} diff --git a/vendor/github.com/googleapis/gnostic/compiler/reader.go b/vendor/github.com/googleapis/gnostic/compiler/reader.go index 25affd06352..955b985b80f 100644 --- a/vendor/github.com/googleapis/gnostic/compiler/reader.go +++ b/vendor/github.com/googleapis/gnostic/compiler/reader.go @@ -47,6 +47,14 @@ func initializeInfoCache() { } } +func EnableFileCache() { + fileCacheEnable = true +} + +func EnableInfoCache() { + infoCacheEnable = true +} + func DisableFileCache() { fileCacheEnable = false } @@ -78,10 +86,19 @@ func GetInfoCache() map[string]interface{} { return infoCache } +func ClearFileCache() { + fileCache = make(map[string][]byte, 0) +} + func ClearInfoCache() { infoCache = make(map[string]interface{}) } +func ClearCaches() { + ClearFileCache() + ClearInfoCache() +} + // FetchFile gets a specified file from the local filesystem or a remote location. func FetchFile(fileurl string) ([]byte, error) { var bytes []byte diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go b/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.go similarity index 100% rename from vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go rename to vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.go diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go b/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.pb.go similarity index 87% rename from vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go rename to vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.pb.go index 6199e7cb348..55a6cb51604 100644 --- a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go +++ b/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: OpenAPIv2/OpenAPIv2.proto +// source: openapiv2/OpenAPIv2.proto package openapi_v2 @@ -35,7 +35,7 @@ func (m *AdditionalPropertiesItem) Reset() { *m = AdditionalPropertiesIt func (m *AdditionalPropertiesItem) String() string { return proto.CompactTextString(m) } func (*AdditionalPropertiesItem) ProtoMessage() {} func (*AdditionalPropertiesItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{0} + return fileDescriptor_a43d10d209cd31c2, []int{0} } func (m *AdditionalPropertiesItem) XXX_Unmarshal(b []byte) error { @@ -113,7 +113,7 @@ func (m *Any) Reset() { *m = Any{} } func (m *Any) String() string { return proto.CompactTextString(m) } func (*Any) ProtoMessage() {} func (*Any) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{1} + return fileDescriptor_a43d10d209cd31c2, []int{1} } func (m *Any) XXX_Unmarshal(b []byte) error { @@ -163,7 +163,7 @@ func (m *ApiKeySecurity) Reset() { *m = ApiKeySecurity{} } func (m *ApiKeySecurity) String() string { return proto.CompactTextString(m) } func (*ApiKeySecurity) ProtoMessage() {} func (*ApiKeySecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{2} + return fileDescriptor_a43d10d209cd31c2, []int{2} } func (m *ApiKeySecurity) XXX_Unmarshal(b []byte) error { @@ -232,7 +232,7 @@ func (m *BasicAuthenticationSecurity) Reset() { *m = BasicAuthentication func (m *BasicAuthenticationSecurity) String() string { return proto.CompactTextString(m) } func (*BasicAuthenticationSecurity) ProtoMessage() {} func (*BasicAuthenticationSecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{3} + return fileDescriptor_a43d10d209cd31c2, []int{3} } func (m *BasicAuthenticationSecurity) XXX_Unmarshal(b []byte) error { @@ -294,7 +294,7 @@ func (m *BodyParameter) Reset() { *m = BodyParameter{} } func (m *BodyParameter) String() string { return proto.CompactTextString(m) } func (*BodyParameter) ProtoMessage() {} func (*BodyParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{4} + return fileDescriptor_a43d10d209cd31c2, []int{4} } func (m *BodyParameter) XXX_Unmarshal(b []byte) error { @@ -375,7 +375,7 @@ func (m *Contact) Reset() { *m = Contact{} } func (m *Contact) String() string { return proto.CompactTextString(m) } func (*Contact) ProtoMessage() {} func (*Contact) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{5} + return fileDescriptor_a43d10d209cd31c2, []int{5} } func (m *Contact) XXX_Unmarshal(b []byte) error { @@ -435,7 +435,7 @@ func (m *Default) Reset() { *m = Default{} } func (m *Default) String() string { return proto.CompactTextString(m) } func (*Default) ProtoMessage() {} func (*Default) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{6} + return fileDescriptor_a43d10d209cd31c2, []int{6} } func (m *Default) XXX_Unmarshal(b []byte) error { @@ -475,7 +475,7 @@ func (m *Definitions) Reset() { *m = Definitions{} } func (m *Definitions) String() string { return proto.CompactTextString(m) } func (*Definitions) ProtoMessage() {} func (*Definitions) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{7} + return fileDescriptor_a43d10d209cd31c2, []int{7} } func (m *Definitions) XXX_Unmarshal(b []byte) error { @@ -535,7 +535,7 @@ func (m *Document) Reset() { *m = Document{} } func (m *Document) String() string { return proto.CompactTextString(m) } func (*Document) ProtoMessage() {} func (*Document) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{8} + return fileDescriptor_a43d10d209cd31c2, []int{8} } func (m *Document) XXX_Unmarshal(b []byte) error { @@ -679,7 +679,7 @@ func (m *Examples) Reset() { *m = Examples{} } func (m *Examples) String() string { return proto.CompactTextString(m) } func (*Examples) ProtoMessage() {} func (*Examples) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{9} + return fileDescriptor_a43d10d209cd31c2, []int{9} } func (m *Examples) XXX_Unmarshal(b []byte) error { @@ -721,7 +721,7 @@ func (m *ExternalDocs) Reset() { *m = ExternalDocs{} } func (m *ExternalDocs) String() string { return proto.CompactTextString(m) } func (*ExternalDocs) ProtoMessage() {} func (*ExternalDocs) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{10} + return fileDescriptor_a43d10d209cd31c2, []int{10} } func (m *ExternalDocs) XXX_Unmarshal(b []byte) error { @@ -784,7 +784,7 @@ func (m *FileSchema) Reset() { *m = FileSchema{} } func (m *FileSchema) String() string { return proto.CompactTextString(m) } func (*FileSchema) ProtoMessage() {} func (*FileSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{11} + return fileDescriptor_a43d10d209cd31c2, []int{11} } func (m *FileSchema) XXX_Unmarshal(b []byte) error { @@ -913,7 +913,7 @@ func (m *FormDataParameterSubSchema) Reset() { *m = FormDataParameterSub func (m *FormDataParameterSubSchema) String() string { return proto.CompactTextString(m) } func (*FormDataParameterSubSchema) ProtoMessage() {} func (*FormDataParameterSubSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{12} + return fileDescriptor_a43d10d209cd31c2, []int{12} } func (m *FormDataParameterSubSchema) XXX_Unmarshal(b []byte) error { @@ -1124,7 +1124,7 @@ func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{13} + return fileDescriptor_a43d10d209cd31c2, []int{13} } func (m *Header) XXX_Unmarshal(b []byte) error { @@ -1314,7 +1314,7 @@ func (m *HeaderParameterSubSchema) Reset() { *m = HeaderParameterSubSche func (m *HeaderParameterSubSchema) String() string { return proto.CompactTextString(m) } func (*HeaderParameterSubSchema) ProtoMessage() {} func (*HeaderParameterSubSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{14} + return fileDescriptor_a43d10d209cd31c2, []int{14} } func (m *HeaderParameterSubSchema) XXX_Unmarshal(b []byte) error { @@ -1500,7 +1500,7 @@ func (m *Headers) Reset() { *m = Headers{} } func (m *Headers) String() string { return proto.CompactTextString(m) } func (*Headers) ProtoMessage() {} func (*Headers) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{15} + return fileDescriptor_a43d10d209cd31c2, []int{15} } func (m *Headers) XXX_Unmarshal(b []byte) error { @@ -1550,7 +1550,7 @@ func (m *Info) Reset() { *m = Info{} } func (m *Info) String() string { return proto.CompactTextString(m) } func (*Info) ProtoMessage() {} func (*Info) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{16} + return fileDescriptor_a43d10d209cd31c2, []int{16} } func (m *Info) XXX_Unmarshal(b []byte) error { @@ -1631,7 +1631,7 @@ func (m *ItemsItem) Reset() { *m = ItemsItem{} } func (m *ItemsItem) String() string { return proto.CompactTextString(m) } func (*ItemsItem) ProtoMessage() {} func (*ItemsItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{17} + return fileDescriptor_a43d10d209cd31c2, []int{17} } func (m *ItemsItem) XXX_Unmarshal(b []byte) error { @@ -1671,7 +1671,7 @@ func (m *JsonReference) Reset() { *m = JsonReference{} } func (m *JsonReference) String() string { return proto.CompactTextString(m) } func (*JsonReference) ProtoMessage() {} func (*JsonReference) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{18} + return fileDescriptor_a43d10d209cd31c2, []int{18} } func (m *JsonReference) XXX_Unmarshal(b []byte) error { @@ -1721,7 +1721,7 @@ func (m *License) Reset() { *m = License{} } func (m *License) String() string { return proto.CompactTextString(m) } func (*License) ProtoMessage() {} func (*License) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{19} + return fileDescriptor_a43d10d209cd31c2, []int{19} } func (m *License) XXX_Unmarshal(b []byte) error { @@ -1778,7 +1778,7 @@ func (m *NamedAny) Reset() { *m = NamedAny{} } func (m *NamedAny) String() string { return proto.CompactTextString(m) } func (*NamedAny) ProtoMessage() {} func (*NamedAny) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{20} + return fileDescriptor_a43d10d209cd31c2, []int{20} } func (m *NamedAny) XXX_Unmarshal(b []byte) error { @@ -1828,7 +1828,7 @@ func (m *NamedHeader) Reset() { *m = NamedHeader{} } func (m *NamedHeader) String() string { return proto.CompactTextString(m) } func (*NamedHeader) ProtoMessage() {} func (*NamedHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{21} + return fileDescriptor_a43d10d209cd31c2, []int{21} } func (m *NamedHeader) XXX_Unmarshal(b []byte) error { @@ -1878,7 +1878,7 @@ func (m *NamedParameter) Reset() { *m = NamedParameter{} } func (m *NamedParameter) String() string { return proto.CompactTextString(m) } func (*NamedParameter) ProtoMessage() {} func (*NamedParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{22} + return fileDescriptor_a43d10d209cd31c2, []int{22} } func (m *NamedParameter) XXX_Unmarshal(b []byte) error { @@ -1928,7 +1928,7 @@ func (m *NamedPathItem) Reset() { *m = NamedPathItem{} } func (m *NamedPathItem) String() string { return proto.CompactTextString(m) } func (*NamedPathItem) ProtoMessage() {} func (*NamedPathItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{23} + return fileDescriptor_a43d10d209cd31c2, []int{23} } func (m *NamedPathItem) XXX_Unmarshal(b []byte) error { @@ -1978,7 +1978,7 @@ func (m *NamedResponse) Reset() { *m = NamedResponse{} } func (m *NamedResponse) String() string { return proto.CompactTextString(m) } func (*NamedResponse) ProtoMessage() {} func (*NamedResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{24} + return fileDescriptor_a43d10d209cd31c2, []int{24} } func (m *NamedResponse) XXX_Unmarshal(b []byte) error { @@ -2028,7 +2028,7 @@ func (m *NamedResponseValue) Reset() { *m = NamedResponseValue{} } func (m *NamedResponseValue) String() string { return proto.CompactTextString(m) } func (*NamedResponseValue) ProtoMessage() {} func (*NamedResponseValue) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{25} + return fileDescriptor_a43d10d209cd31c2, []int{25} } func (m *NamedResponseValue) XXX_Unmarshal(b []byte) error { @@ -2078,7 +2078,7 @@ func (m *NamedSchema) Reset() { *m = NamedSchema{} } func (m *NamedSchema) String() string { return proto.CompactTextString(m) } func (*NamedSchema) ProtoMessage() {} func (*NamedSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{26} + return fileDescriptor_a43d10d209cd31c2, []int{26} } func (m *NamedSchema) XXX_Unmarshal(b []byte) error { @@ -2128,7 +2128,7 @@ func (m *NamedSecurityDefinitionsItem) Reset() { *m = NamedSecurityDefin func (m *NamedSecurityDefinitionsItem) String() string { return proto.CompactTextString(m) } func (*NamedSecurityDefinitionsItem) ProtoMessage() {} func (*NamedSecurityDefinitionsItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{27} + return fileDescriptor_a43d10d209cd31c2, []int{27} } func (m *NamedSecurityDefinitionsItem) XXX_Unmarshal(b []byte) error { @@ -2178,7 +2178,7 @@ func (m *NamedString) Reset() { *m = NamedString{} } func (m *NamedString) String() string { return proto.CompactTextString(m) } func (*NamedString) ProtoMessage() {} func (*NamedString) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{28} + return fileDescriptor_a43d10d209cd31c2, []int{28} } func (m *NamedString) XXX_Unmarshal(b []byte) error { @@ -2228,7 +2228,7 @@ func (m *NamedStringArray) Reset() { *m = NamedStringArray{} } func (m *NamedStringArray) String() string { return proto.CompactTextString(m) } func (*NamedStringArray) ProtoMessage() {} func (*NamedStringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{29} + return fileDescriptor_a43d10d209cd31c2, []int{29} } func (m *NamedStringArray) XXX_Unmarshal(b []byte) error { @@ -2279,7 +2279,7 @@ func (m *NonBodyParameter) Reset() { *m = NonBodyParameter{} } func (m *NonBodyParameter) String() string { return proto.CompactTextString(m) } func (*NonBodyParameter) ProtoMessage() {} func (*NonBodyParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{30} + return fileDescriptor_a43d10d209cd31c2, []int{30} } func (m *NonBodyParameter) XXX_Unmarshal(b []byte) error { @@ -2390,7 +2390,7 @@ func (m *Oauth2AccessCodeSecurity) Reset() { *m = Oauth2AccessCodeSecuri func (m *Oauth2AccessCodeSecurity) String() string { return proto.CompactTextString(m) } func (*Oauth2AccessCodeSecurity) ProtoMessage() {} func (*Oauth2AccessCodeSecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{31} + return fileDescriptor_a43d10d209cd31c2, []int{31} } func (m *Oauth2AccessCodeSecurity) XXX_Unmarshal(b []byte) error { @@ -2476,7 +2476,7 @@ func (m *Oauth2ApplicationSecurity) Reset() { *m = Oauth2ApplicationSecu func (m *Oauth2ApplicationSecurity) String() string { return proto.CompactTextString(m) } func (*Oauth2ApplicationSecurity) ProtoMessage() {} func (*Oauth2ApplicationSecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{32} + return fileDescriptor_a43d10d209cd31c2, []int{32} } func (m *Oauth2ApplicationSecurity) XXX_Unmarshal(b []byte) error { @@ -2555,7 +2555,7 @@ func (m *Oauth2ImplicitSecurity) Reset() { *m = Oauth2ImplicitSecurity{} func (m *Oauth2ImplicitSecurity) String() string { return proto.CompactTextString(m) } func (*Oauth2ImplicitSecurity) ProtoMessage() {} func (*Oauth2ImplicitSecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{33} + return fileDescriptor_a43d10d209cd31c2, []int{33} } func (m *Oauth2ImplicitSecurity) XXX_Unmarshal(b []byte) error { @@ -2634,7 +2634,7 @@ func (m *Oauth2PasswordSecurity) Reset() { *m = Oauth2PasswordSecurity{} func (m *Oauth2PasswordSecurity) String() string { return proto.CompactTextString(m) } func (*Oauth2PasswordSecurity) ProtoMessage() {} func (*Oauth2PasswordSecurity) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{34} + return fileDescriptor_a43d10d209cd31c2, []int{34} } func (m *Oauth2PasswordSecurity) XXX_Unmarshal(b []byte) error { @@ -2708,7 +2708,7 @@ func (m *Oauth2Scopes) Reset() { *m = Oauth2Scopes{} } func (m *Oauth2Scopes) String() string { return proto.CompactTextString(m) } func (*Oauth2Scopes) ProtoMessage() {} func (*Oauth2Scopes) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{35} + return fileDescriptor_a43d10d209cd31c2, []int{35} } func (m *Oauth2Scopes) XXX_Unmarshal(b []byte) error { @@ -2766,7 +2766,7 @@ func (m *Operation) Reset() { *m = Operation{} } func (m *Operation) String() string { return proto.CompactTextString(m) } func (*Operation) ProtoMessage() {} func (*Operation) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{36} + return fileDescriptor_a43d10d209cd31c2, []int{36} } func (m *Operation) XXX_Unmarshal(b []byte) error { @@ -2892,7 +2892,7 @@ func (m *Parameter) Reset() { *m = Parameter{} } func (m *Parameter) String() string { return proto.CompactTextString(m) } func (*Parameter) ProtoMessage() {} func (*Parameter) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{37} + return fileDescriptor_a43d10d209cd31c2, []int{37} } func (m *Parameter) XXX_Unmarshal(b []byte) error { @@ -2970,7 +2970,7 @@ func (m *ParameterDefinitions) Reset() { *m = ParameterDefinitions{} } func (m *ParameterDefinitions) String() string { return proto.CompactTextString(m) } func (*ParameterDefinitions) ProtoMessage() {} func (*ParameterDefinitions) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{38} + return fileDescriptor_a43d10d209cd31c2, []int{38} } func (m *ParameterDefinitions) XXX_Unmarshal(b []byte) error { @@ -3012,7 +3012,7 @@ func (m *ParametersItem) Reset() { *m = ParametersItem{} } func (m *ParametersItem) String() string { return proto.CompactTextString(m) } func (*ParametersItem) ProtoMessage() {} func (*ParametersItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{39} + return fileDescriptor_a43d10d209cd31c2, []int{39} } func (m *ParametersItem) XXX_Unmarshal(b []byte) error { @@ -3099,7 +3099,7 @@ func (m *PathItem) Reset() { *m = PathItem{} } func (m *PathItem) String() string { return proto.CompactTextString(m) } func (*PathItem) ProtoMessage() {} func (*PathItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{40} + return fileDescriptor_a43d10d209cd31c2, []int{40} } func (m *PathItem) XXX_Unmarshal(b []byte) error { @@ -3226,7 +3226,7 @@ func (m *PathParameterSubSchema) Reset() { *m = PathParameterSubSchema{} func (m *PathParameterSubSchema) String() string { return proto.CompactTextString(m) } func (*PathParameterSubSchema) ProtoMessage() {} func (*PathParameterSubSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{41} + return fileDescriptor_a43d10d209cd31c2, []int{41} } func (m *PathParameterSubSchema) XXX_Unmarshal(b []byte) error { @@ -3414,7 +3414,7 @@ func (m *Paths) Reset() { *m = Paths{} } func (m *Paths) String() string { return proto.CompactTextString(m) } func (*Paths) ProtoMessage() {} func (*Paths) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{42} + return fileDescriptor_a43d10d209cd31c2, []int{42} } func (m *Paths) XXX_Unmarshal(b []byte) error { @@ -3477,7 +3477,7 @@ func (m *PrimitivesItems) Reset() { *m = PrimitivesItems{} } func (m *PrimitivesItems) String() string { return proto.CompactTextString(m) } func (*PrimitivesItems) ProtoMessage() {} func (*PrimitivesItems) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{43} + return fileDescriptor_a43d10d209cd31c2, []int{43} } func (m *PrimitivesItems) XXX_Unmarshal(b []byte) error { @@ -3635,7 +3635,7 @@ func (m *Properties) Reset() { *m = Properties{} } func (m *Properties) String() string { return proto.CompactTextString(m) } func (*Properties) ProtoMessage() {} func (*Properties) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{44} + return fileDescriptor_a43d10d209cd31c2, []int{44} } func (m *Properties) XXX_Unmarshal(b []byte) error { @@ -3701,7 +3701,7 @@ func (m *QueryParameterSubSchema) Reset() { *m = QueryParameterSubSchema func (m *QueryParameterSubSchema) String() string { return proto.CompactTextString(m) } func (*QueryParameterSubSchema) ProtoMessage() {} func (*QueryParameterSubSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{45} + return fileDescriptor_a43d10d209cd31c2, []int{45} } func (m *QueryParameterSubSchema) XXX_Unmarshal(b []byte) error { @@ -3898,7 +3898,7 @@ func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{46} + return fileDescriptor_a43d10d209cd31c2, []int{46} } func (m *Response) XXX_Unmarshal(b []byte) error { @@ -3966,7 +3966,7 @@ func (m *ResponseDefinitions) Reset() { *m = ResponseDefinitions{} } func (m *ResponseDefinitions) String() string { return proto.CompactTextString(m) } func (*ResponseDefinitions) ProtoMessage() {} func (*ResponseDefinitions) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{47} + return fileDescriptor_a43d10d209cd31c2, []int{47} } func (m *ResponseDefinitions) XXX_Unmarshal(b []byte) error { @@ -4008,7 +4008,7 @@ func (m *ResponseValue) Reset() { *m = ResponseValue{} } func (m *ResponseValue) String() string { return proto.CompactTextString(m) } func (*ResponseValue) ProtoMessage() {} func (*ResponseValue) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{48} + return fileDescriptor_a43d10d209cd31c2, []int{48} } func (m *ResponseValue) XXX_Unmarshal(b []byte) error { @@ -4087,7 +4087,7 @@ func (m *Responses) Reset() { *m = Responses{} } func (m *Responses) String() string { return proto.CompactTextString(m) } func (*Responses) ProtoMessage() {} func (*Responses) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{49} + return fileDescriptor_a43d10d209cd31c2, []int{49} } func (m *Responses) XXX_Unmarshal(b []byte) error { @@ -4164,7 +4164,7 @@ func (m *Schema) Reset() { *m = Schema{} } func (m *Schema) String() string { return proto.CompactTextString(m) } func (*Schema) ProtoMessage() {} func (*Schema) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{50} + return fileDescriptor_a43d10d209cd31c2, []int{50} } func (m *Schema) XXX_Unmarshal(b []byte) error { @@ -4416,7 +4416,7 @@ func (m *SchemaItem) Reset() { *m = SchemaItem{} } func (m *SchemaItem) String() string { return proto.CompactTextString(m) } func (*SchemaItem) ProtoMessage() {} func (*SchemaItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{51} + return fileDescriptor_a43d10d209cd31c2, []int{51} } func (m *SchemaItem) XXX_Unmarshal(b []byte) error { @@ -4493,7 +4493,7 @@ func (m *SecurityDefinitions) Reset() { *m = SecurityDefinitions{} } func (m *SecurityDefinitions) String() string { return proto.CompactTextString(m) } func (*SecurityDefinitions) ProtoMessage() {} func (*SecurityDefinitions) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{52} + return fileDescriptor_a43d10d209cd31c2, []int{52} } func (m *SecurityDefinitions) XXX_Unmarshal(b []byte) error { @@ -4539,7 +4539,7 @@ func (m *SecurityDefinitionsItem) Reset() { *m = SecurityDefinitionsItem func (m *SecurityDefinitionsItem) String() string { return proto.CompactTextString(m) } func (*SecurityDefinitionsItem) ProtoMessage() {} func (*SecurityDefinitionsItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{53} + return fileDescriptor_a43d10d209cd31c2, []int{53} } func (m *SecurityDefinitionsItem) XXX_Unmarshal(b []byte) error { @@ -4672,7 +4672,7 @@ func (m *SecurityRequirement) Reset() { *m = SecurityRequirement{} } func (m *SecurityRequirement) String() string { return proto.CompactTextString(m) } func (*SecurityRequirement) ProtoMessage() {} func (*SecurityRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{54} + return fileDescriptor_a43d10d209cd31c2, []int{54} } func (m *SecurityRequirement) XXX_Unmarshal(b []byte) error { @@ -4711,7 +4711,7 @@ func (m *StringArray) Reset() { *m = StringArray{} } func (m *StringArray) String() string { return proto.CompactTextString(m) } func (*StringArray) ProtoMessage() {} func (*StringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{55} + return fileDescriptor_a43d10d209cd31c2, []int{55} } func (m *StringArray) XXX_Unmarshal(b []byte) error { @@ -4753,7 +4753,7 @@ func (m *Tag) Reset() { *m = Tag{} } func (m *Tag) String() string { return proto.CompactTextString(m) } func (*Tag) ProtoMessage() {} func (*Tag) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{56} + return fileDescriptor_a43d10d209cd31c2, []int{56} } func (m *Tag) XXX_Unmarshal(b []byte) error { @@ -4813,7 +4813,7 @@ func (m *TypeItem) Reset() { *m = TypeItem{} } func (m *TypeItem) String() string { return proto.CompactTextString(m) } func (*TypeItem) ProtoMessage() {} func (*TypeItem) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{57} + return fileDescriptor_a43d10d209cd31c2, []int{57} } func (m *TypeItem) XXX_Unmarshal(b []byte) error { @@ -4853,7 +4853,7 @@ func (m *VendorExtension) Reset() { *m = VendorExtension{} } func (m *VendorExtension) String() string { return proto.CompactTextString(m) } func (*VendorExtension) ProtoMessage() {} func (*VendorExtension) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{58} + return fileDescriptor_a43d10d209cd31c2, []int{58} } func (m *VendorExtension) XXX_Unmarshal(b []byte) error { @@ -4897,7 +4897,7 @@ func (m *Xml) Reset() { *m = Xml{} } func (m *Xml) String() string { return proto.CompactTextString(m) } func (*Xml) ProtoMessage() {} func (*Xml) Descriptor() ([]byte, []int) { - return fileDescriptor_336adc04ae589d92, []int{59} + return fileDescriptor_a43d10d209cd31c2, []int{59} } func (m *Xml) XXX_Unmarshal(b []byte) error { @@ -5023,204 +5023,204 @@ func init() { proto.RegisterType((*Xml)(nil), "openapi.v2.Xml") } -func init() { proto.RegisterFile("OpenAPIv2/OpenAPIv2.proto", fileDescriptor_336adc04ae589d92) } +func init() { proto.RegisterFile("openapiv2/OpenAPIv2.proto", fileDescriptor_a43d10d209cd31c2) } -var fileDescriptor_336adc04ae589d92 = []byte{ - // 3129 bytes of a gzipped FileDescriptorProto +var fileDescriptor_a43d10d209cd31c2 = []byte{ + // 3130 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3b, 0x4b, 0x73, 0x1c, 0x57, 0xd5, 0xf3, 0x7e, 0x1c, 0x69, 0x46, 0xa3, 0x96, 0x2c, 0xb7, 0x24, 0xc7, 0x71, 0xe4, 0x3c, 0x6c, 0xe7, 0xb3, 0x9c, 0x4f, 0x29, 0x48, 0x05, 0x2a, 0x05, 0xf2, 0xab, 0xc6, 0xc4, 0x44, 0x4a, 0xcb, 0x0e, 0x09, 0x04, 0xba, 0xae, 0x66, 0xee, 0x48, 0x9d, 0x74, 0xf7, 0x6d, 0x77, 0xf7, 0xc8, 0x1a, 0x16, 0x2c, 0xa0, 0x8a, 0x35, 0x50, 0x59, 0x53, 0x15, 0x16, 0x14, 0x55, 0x59, 0xb0, 0x62, 0xc5, - 0x1f, 0x60, 0xc7, 0x3f, 0x60, 0x0d, 0x5b, 0xaa, 0x58, 0x51, 0x3c, 0xea, 0xbe, 0xfa, 0x31, 0x7d, - 0x7b, 0x1e, 0x96, 0x0b, 0x28, 0xd0, 0x6a, 0xe6, 0xde, 0x73, 0xee, 0xb9, 0xa7, 0x4f, 0x9f, 0xd7, - 0x3d, 0xe7, 0x36, 0xac, 0xef, 0x79, 0xd8, 0xdd, 0xdd, 0x7f, 0x70, 0xb2, 0x73, 0x2b, 0xfa, 0xb7, - 0xed, 0xf9, 0x24, 0x24, 0x1a, 0x10, 0x0f, 0xbb, 0xc8, 0xb3, 0xb6, 0x4f, 0x76, 0x36, 0xd6, 0x8f, - 0x08, 0x39, 0xb2, 0xf1, 0x2d, 0x06, 0x39, 0x1c, 0x0e, 0x6e, 0x21, 0x77, 0xc4, 0xd1, 0xb6, 0x1c, - 0xd0, 0x77, 0xfb, 0x7d, 0x2b, 0xb4, 0x88, 0x8b, 0xec, 0x7d, 0x9f, 0x78, 0xd8, 0x0f, 0x2d, 0x1c, - 0x3c, 0x08, 0xb1, 0xa3, 0xfd, 0x1f, 0xd4, 0x82, 0xde, 0x31, 0x76, 0x90, 0x5e, 0xbc, 0x52, 0xbc, - 0xb6, 0xb0, 0xa3, 0x6d, 0xc7, 0x34, 0xb7, 0x0f, 0x18, 0xa4, 0x5b, 0x30, 0x04, 0x8e, 0xb6, 0x01, - 0xf5, 0x43, 0x42, 0x6c, 0x8c, 0x5c, 0xbd, 0x74, 0xa5, 0x78, 0xad, 0xd1, 0x2d, 0x18, 0x72, 0xe2, - 0x76, 0x1d, 0xaa, 0xc4, 0xc5, 0x64, 0xb0, 0x75, 0x0f, 0xca, 0xbb, 0xee, 0x48, 0xbb, 0x01, 0xd5, - 0x13, 0x64, 0x0f, 0xb1, 0x20, 0xbc, 0xba, 0xcd, 0x19, 0xdc, 0x96, 0x0c, 0x6e, 0xef, 0xba, 0x23, - 0x83, 0xa3, 0x68, 0x1a, 0x54, 0x46, 0xc8, 0xb1, 0x19, 0xd1, 0xa6, 0xc1, 0xfe, 0x6f, 0x7d, 0x51, - 0x84, 0xf6, 0xae, 0x67, 0xbd, 0x8b, 0x47, 0x07, 0xb8, 0x37, 0xf4, 0xad, 0x70, 0x44, 0xd1, 0xc2, - 0x91, 0xc7, 0x29, 0x36, 0x0d, 0xf6, 0x9f, 0xce, 0xb9, 0xc8, 0xc1, 0x72, 0x29, 0xfd, 0xaf, 0xb5, - 0xa1, 0x64, 0xb9, 0x7a, 0x99, 0xcd, 0x94, 0x2c, 0x57, 0xbb, 0x02, 0x0b, 0x7d, 0x1c, 0xf4, 0x7c, - 0xcb, 0xa3, 0x32, 0xd0, 0x2b, 0x0c, 0x90, 0x9c, 0xd2, 0xbe, 0x06, 0x9d, 0x13, 0xec, 0xf6, 0x89, - 0x6f, 0xe2, 0xd3, 0x10, 0xbb, 0x01, 0x45, 0xab, 0x5e, 0x29, 0x33, 0xbe, 0x13, 0x02, 0x79, 0x0f, - 0x39, 0xb8, 0x4f, 0xf9, 0x5e, 0xe2, 0xd8, 0xf7, 0x24, 0xf2, 0xd6, 0x67, 0x45, 0xd8, 0xbc, 0x8d, - 0x02, 0xab, 0xb7, 0x3b, 0x0c, 0x8f, 0xb1, 0x1b, 0x5a, 0x3d, 0x44, 0x09, 0x4f, 0x64, 0x7d, 0x8c, - 0xad, 0xd2, 0x6c, 0x6c, 0x95, 0xe7, 0x61, 0xeb, 0x0f, 0x45, 0x68, 0xdd, 0x26, 0xfd, 0xd1, 0x3e, - 0xf2, 0x91, 0x83, 0x43, 0xec, 0x8f, 0x6f, 0x5a, 0xcc, 0x6e, 0x3a, 0x8b, 0x44, 0x37, 0xa0, 0xe1, - 0xe3, 0x27, 0x43, 0xcb, 0xc7, 0x7d, 0x26, 0xce, 0x86, 0x11, 0x8d, 0xb5, 0x1b, 0x91, 0x4a, 0x55, - 0xf3, 0x54, 0x2a, 0x52, 0x28, 0xd5, 0x03, 0xd6, 0xe6, 0x79, 0xc0, 0x1f, 0x17, 0xa1, 0x7e, 0x87, - 0xb8, 0x21, 0xea, 0x85, 0x11, 0xe3, 0xc5, 0x04, 0xe3, 0x1d, 0x28, 0x0f, 0x7d, 0xa9, 0x58, 0xf4, - 0xaf, 0xb6, 0x0a, 0x55, 0xec, 0x20, 0xcb, 0x16, 0x4f, 0xc3, 0x07, 0x4a, 0x46, 0x2a, 0xf3, 0x30, - 0xf2, 0x08, 0xea, 0x77, 0xf1, 0x00, 0x0d, 0xed, 0x50, 0x7b, 0x00, 0x17, 0x50, 0x64, 0x6f, 0xa6, - 0x17, 0x19, 0x9c, 0x5e, 0x9c, 0x40, 0x70, 0x15, 0x29, 0x4c, 0x74, 0xeb, 0x3b, 0xb0, 0x70, 0x17, - 0x0f, 0x2c, 0x97, 0x41, 0x02, 0xed, 0xe1, 0x64, 0xca, 0x17, 0x33, 0x94, 0x85, 0xb8, 0xd5, 0xc4, - 0xff, 0x58, 0x85, 0xc6, 0x5d, 0xd2, 0x1b, 0x3a, 0xd8, 0x0d, 0x35, 0x1d, 0xea, 0xc1, 0x53, 0x74, - 0x74, 0x84, 0x7d, 0x21, 0x3f, 0x39, 0xd4, 0x5e, 0x86, 0x8a, 0xe5, 0x0e, 0x08, 0x93, 0xe1, 0xc2, - 0x4e, 0x27, 0xb9, 0xc7, 0x03, 0x77, 0x40, 0x0c, 0x06, 0xa5, 0xc2, 0x3f, 0x26, 0x41, 0x28, 0xa4, - 0xca, 0xfe, 0x6b, 0x9b, 0xd0, 0x3c, 0x44, 0x01, 0x36, 0x3d, 0x14, 0x1e, 0x0b, 0xab, 0x6b, 0xd0, - 0x89, 0x7d, 0x14, 0x1e, 0xb3, 0x0d, 0x29, 0x77, 0x38, 0x60, 0x96, 0x46, 0x37, 0xe4, 0x43, 0xaa, - 0x5c, 0x3d, 0xe2, 0x06, 0x43, 0x0a, 0xaa, 0x31, 0x50, 0x34, 0xa6, 0x30, 0xcf, 0x27, 0xfd, 0x61, - 0x0f, 0x07, 0x7a, 0x9d, 0xc3, 0xe4, 0x58, 0x7b, 0x0d, 0xaa, 0x74, 0xa7, 0x40, 0x6f, 0x30, 0x4e, - 0x97, 0x93, 0x9c, 0xd2, 0x2d, 0x03, 0x83, 0xc3, 0xb5, 0xb7, 0xa9, 0x0d, 0x44, 0x52, 0xd5, 0x9b, - 0x0c, 0x3d, 0x25, 0xbc, 0x84, 0xd0, 0x8d, 0x24, 0xae, 0xf6, 0x75, 0x00, 0x4f, 0xda, 0x52, 0xa0, - 0x03, 0x5b, 0x79, 0x25, 0xbd, 0x91, 0x80, 0x26, 0x49, 0x24, 0xd6, 0x68, 0xef, 0x40, 0xd3, 0xc7, - 0x81, 0x47, 0xdc, 0x00, 0x07, 0xfa, 0x02, 0x23, 0xf0, 0x62, 0x92, 0x80, 0x21, 0x80, 0xc9, 0xf5, - 0xf1, 0x0a, 0xed, 0xab, 0xd0, 0x08, 0x84, 0x53, 0xd1, 0x17, 0xd9, 0x5b, 0x4f, 0xad, 0x96, 0x0e, - 0xc7, 0xe0, 0xd6, 0x48, 0x5f, 0xad, 0x11, 0x2d, 0xd0, 0x0c, 0x58, 0x95, 0xff, 0xcd, 0xa4, 0x04, - 0x5a, 0x59, 0x36, 0x24, 0xa1, 0x24, 0x1b, 0x2b, 0x41, 0x76, 0x52, 0xbb, 0x0a, 0x95, 0x10, 0x1d, - 0x05, 0x7a, 0x9b, 0x31, 0xb3, 0x94, 0xa4, 0xf1, 0x08, 0x1d, 0x19, 0x0c, 0xa8, 0xbd, 0x03, 0x2d, - 0x6a, 0x57, 0x3e, 0x55, 0xdb, 0x3e, 0xe9, 0x05, 0xfa, 0x12, 0xdb, 0x51, 0x4f, 0x62, 0xdf, 0x13, - 0x08, 0x77, 0x49, 0x2f, 0x30, 0x16, 0x71, 0x62, 0xa4, 0xb4, 0xce, 0xce, 0x3c, 0xd6, 0xf9, 0x18, - 0x1a, 0xf7, 0x4e, 0x91, 0xe3, 0xd9, 0x38, 0x78, 0x9e, 0xe6, 0xf9, 0xa3, 0x22, 0x2c, 0x26, 0xd9, - 0x9e, 0xc1, 0xbb, 0x66, 0x1d, 0xd2, 0x99, 0x9d, 0xfc, 0x3f, 0x4a, 0x00, 0xf7, 0x2d, 0x1b, 0x73, - 0x63, 0xd7, 0xd6, 0xa0, 0x36, 0x20, 0xbe, 0x83, 0x42, 0xb1, 0xbd, 0x18, 0x51, 0xc7, 0x17, 0x5a, - 0xa1, 0x2d, 0x1d, 0x3b, 0x1f, 0x8c, 0x73, 0x5c, 0xce, 0x72, 0x7c, 0x1d, 0xea, 0x7d, 0xee, 0xd9, - 0x98, 0x0d, 0x8f, 0xbd, 0x63, 0xca, 0x91, 0x84, 0xa7, 0xc2, 0x02, 0x37, 0xea, 0x38, 0x2c, 0xc8, - 0x08, 0x58, 0x4b, 0x44, 0xc0, 0x4d, 0x6a, 0x0b, 0xa8, 0x6f, 0x12, 0xd7, 0x1e, 0xe9, 0x75, 0x19, - 0x47, 0x50, 0x7f, 0xcf, 0xb5, 0x47, 0x59, 0x9d, 0x69, 0xcc, 0xa5, 0x33, 0xd7, 0xa1, 0x8e, 0xf9, - 0x2b, 0x17, 0x06, 0x9e, 0x65, 0x5b, 0xc0, 0x95, 0x6f, 0x00, 0xe6, 0x79, 0x03, 0x5f, 0xd4, 0x60, - 0xe3, 0x3e, 0xf1, 0x9d, 0xbb, 0x28, 0x44, 0x91, 0x03, 0x38, 0x18, 0x1e, 0x1e, 0xc8, 0xb4, 0x29, - 0x16, 0x4b, 0x71, 0x2c, 0x5a, 0xf2, 0xc8, 0x5a, 0xca, 0xcb, 0x55, 0xca, 0xf9, 0xf1, 0xb9, 0x92, - 0x08, 0x73, 0x37, 0x60, 0x19, 0xd9, 0x36, 0x79, 0x6a, 0x62, 0xc7, 0x0b, 0x47, 0x26, 0x4f, 0xbc, - 0xaa, 0x6c, 0xab, 0x25, 0x06, 0xb8, 0x47, 0xe7, 0x3f, 0x90, 0xc9, 0x56, 0xe6, 0x45, 0xc4, 0x3a, - 0x53, 0x4f, 0xe9, 0xcc, 0xff, 0x43, 0xd5, 0x0a, 0xb1, 0x23, 0x65, 0xbf, 0x99, 0xf2, 0x74, 0xbe, - 0xe5, 0x58, 0xa1, 0x75, 0xc2, 0x33, 0xc9, 0xc0, 0xe0, 0x98, 0xda, 0xeb, 0xb0, 0xdc, 0x23, 0xb6, - 0x8d, 0x7b, 0x94, 0x59, 0x53, 0x50, 0x6d, 0x32, 0xaa, 0x9d, 0x18, 0x70, 0x9f, 0xd3, 0x4f, 0xe8, - 0x16, 0x4c, 0xd1, 0x2d, 0x1d, 0xea, 0x0e, 0x3a, 0xb5, 0x9c, 0xa1, 0xc3, 0xbc, 0x66, 0xd1, 0x90, - 0x43, 0xba, 0x23, 0x3e, 0xed, 0xd9, 0xc3, 0xc0, 0x3a, 0xc1, 0xa6, 0xc4, 0x59, 0x64, 0x0f, 0xdf, - 0x89, 0x00, 0xdf, 0x14, 0xc8, 0x94, 0x8c, 0xe5, 0x32, 0x94, 0x96, 0x20, 0xc3, 0x87, 0x63, 0x64, - 0x04, 0x4e, 0x7b, 0x9c, 0x8c, 0x40, 0x7e, 0x01, 0xc0, 0x41, 0xa7, 0xa6, 0x8d, 0xdd, 0xa3, 0xf0, - 0x98, 0x79, 0xb3, 0xb2, 0xd1, 0x74, 0xd0, 0xe9, 0x43, 0x36, 0xc1, 0xc0, 0x96, 0x2b, 0xc1, 0x1d, - 0x01, 0xb6, 0x5c, 0x01, 0xd6, 0xa1, 0xee, 0xa1, 0x90, 0x2a, 0xab, 0xbe, 0xcc, 0x83, 0xad, 0x18, - 0x52, 0x8b, 0xa0, 0x74, 0xb9, 0xd0, 0x35, 0xb6, 0xae, 0xe1, 0xa0, 0x53, 0x26, 0x61, 0x06, 0xb4, - 0x5c, 0x01, 0x5c, 0x11, 0x40, 0xcb, 0xe5, 0xc0, 0x97, 0x60, 0x71, 0xe8, 0x5a, 0x4f, 0x86, 0x58, - 0xc0, 0x57, 0x19, 0xe7, 0x0b, 0x7c, 0x8e, 0xa3, 0x5c, 0x85, 0x0a, 0x76, 0x87, 0x8e, 0x7e, 0x21, - 0xeb, 0xaa, 0xa9, 0xa8, 0x19, 0x50, 0x7b, 0x11, 0x16, 0x9c, 0xa1, 0x1d, 0x5a, 0x9e, 0x8d, 0x4d, - 0x32, 0xd0, 0xd7, 0x98, 0x90, 0x40, 0x4e, 0xed, 0x0d, 0x94, 0xd6, 0x72, 0x71, 0x2e, 0x6b, 0xa9, - 0x42, 0xad, 0x8b, 0x51, 0x1f, 0xfb, 0xca, 0xb4, 0x38, 0xd6, 0xc5, 0x92, 0x5a, 0x17, 0xcb, 0x67, - 0xd3, 0xc5, 0xca, 0x74, 0x5d, 0xac, 0xce, 0xae, 0x8b, 0xb5, 0x19, 0x74, 0xb1, 0x3e, 0x5d, 0x17, - 0x1b, 0x33, 0xe8, 0x62, 0x73, 0x26, 0x5d, 0x84, 0xc9, 0xba, 0xb8, 0x30, 0x41, 0x17, 0x17, 0x27, - 0xe8, 0x62, 0x6b, 0x92, 0x2e, 0xb6, 0xa7, 0xe8, 0xe2, 0x52, 0xbe, 0x2e, 0x76, 0xe6, 0xd0, 0xc5, - 0xe5, 0x8c, 0x2e, 0x8e, 0x79, 0x4b, 0x6d, 0xb6, 0x23, 0xd4, 0xca, 0x3c, 0xda, 0xfa, 0xb7, 0x2a, - 0xe8, 0x5c, 0x5b, 0xff, 0x2d, 0x9e, 0x5d, 0x5a, 0x48, 0x55, 0x69, 0x21, 0x35, 0xb5, 0x85, 0xd4, - 0xcf, 0x66, 0x21, 0x8d, 0xe9, 0x16, 0xd2, 0x9c, 0xdd, 0x42, 0x60, 0x06, 0x0b, 0x59, 0x98, 0x6e, - 0x21, 0x8b, 0x33, 0x58, 0x48, 0x6b, 0x26, 0x0b, 0x69, 0x4f, 0xb6, 0x90, 0xa5, 0x09, 0x16, 0xd2, - 0x99, 0x60, 0x21, 0xcb, 0x93, 0x2c, 0x44, 0x9b, 0x62, 0x21, 0x2b, 0xf9, 0x16, 0xb2, 0x3a, 0x87, - 0x85, 0x5c, 0x98, 0xc9, 0x5b, 0xaf, 0xcd, 0xa3, 0xff, 0xdf, 0x82, 0x3a, 0x57, 0xff, 0x67, 0x38, - 0x7e, 0xf2, 0x85, 0x39, 0xc9, 0xf3, 0xe7, 0x25, 0xa8, 0xd0, 0x03, 0x64, 0x9c, 0x98, 0x16, 0x93, - 0x89, 0xa9, 0x0e, 0xf5, 0x13, 0xec, 0x07, 0x71, 0x65, 0x44, 0x0e, 0x67, 0x30, 0xa4, 0x6b, 0xd0, - 0x09, 0xb1, 0xef, 0x04, 0x26, 0x19, 0x98, 0x01, 0xf6, 0x4f, 0xac, 0x9e, 0x34, 0xaa, 0x36, 0x9b, - 0xdf, 0x1b, 0x1c, 0xf0, 0x59, 0xed, 0x26, 0xd4, 0x7b, 0xbc, 0x7c, 0x20, 0x9c, 0xfe, 0x4a, 0xf2, - 0x21, 0x44, 0x65, 0xc1, 0x90, 0x38, 0x14, 0xdd, 0xb6, 0x7a, 0xd8, 0x0d, 0x78, 0xfa, 0x34, 0x86, - 0xfe, 0x90, 0x83, 0x0c, 0x89, 0xa3, 0x14, 0x7e, 0x7d, 0x1e, 0xe1, 0xbf, 0x05, 0x4d, 0xa6, 0x0c, - 0xac, 0x56, 0x77, 0x23, 0x51, 0xab, 0x2b, 0x4f, 0x2e, 0xac, 0x6c, 0xdd, 0x85, 0xd6, 0x37, 0x02, - 0xe2, 0x1a, 0x78, 0x80, 0x7d, 0xec, 0xf6, 0xb0, 0xb6, 0x0c, 0x15, 0xd3, 0xc7, 0x03, 0x21, 0xe3, - 0xb2, 0x81, 0x07, 0xd3, 0xeb, 0x4f, 0x5b, 0x1e, 0xd4, 0xc5, 0x33, 0xcd, 0x58, 0x5c, 0x39, 0xf3, - 0x59, 0xe6, 0x1e, 0x34, 0x24, 0x50, 0xb9, 0xe5, 0x2b, 0xb2, 0xaa, 0x58, 0x52, 0x3b, 0x20, 0x0e, - 0xdd, 0x7a, 0x17, 0x16, 0x12, 0x0a, 0xa8, 0xa4, 0x74, 0x2d, 0x4d, 0x29, 0x25, 0x4c, 0xa1, 0xb7, - 0x82, 0xd8, 0xfb, 0xd0, 0x66, 0xc4, 0xe2, 0x22, 0x9a, 0x8a, 0xde, 0xeb, 0x69, 0x7a, 0x17, 0x94, - 0x45, 0x01, 0x49, 0x72, 0x0f, 0x5a, 0x82, 0x64, 0x78, 0xcc, 0xde, 0xad, 0x8a, 0xe2, 0x8d, 0x34, - 0xc5, 0xd5, 0xf1, 0x7a, 0x06, 0x5d, 0x38, 0x4e, 0x50, 0x56, 0x0f, 0xe6, 0x26, 0x28, 0x17, 0x4a, - 0x82, 0x1f, 0x81, 0x96, 0x22, 0x18, 0x9d, 0x1d, 0x32, 0x54, 0x6f, 0xa5, 0xa9, 0xae, 0xab, 0xa8, - 0xb2, 0xd5, 0xe3, 0x2f, 0x47, 0xc4, 0xd0, 0x79, 0x5f, 0x8e, 0xd0, 0x74, 0x41, 0xcc, 0x81, 0x4b, - 0x9c, 0x58, 0xb6, 0x34, 0x91, 0x2b, 0xd8, 0xb7, 0xd3, 0xd4, 0xaf, 0x4e, 0xa9, 0x7b, 0x24, 0xe5, - 0xfc, 0x96, 0xe4, 0x3d, 0xf4, 0x2d, 0xf7, 0x48, 0x49, 0x7d, 0x35, 0x49, 0xbd, 0x29, 0x17, 0x3e, - 0x86, 0x4e, 0x62, 0xe1, 0xae, 0xef, 0x23, 0xb5, 0x82, 0xdf, 0x4c, 0xf3, 0x96, 0xf2, 0xa9, 0x89, - 0xb5, 0x92, 0xec, 0x6f, 0xca, 0xd0, 0x79, 0x8f, 0xb8, 0xe9, 0x1a, 0x2f, 0x86, 0xcd, 0x63, 0xa6, - 0xc1, 0x66, 0x54, 0x77, 0x32, 0x83, 0xe1, 0xa1, 0x99, 0xaa, 0xf4, 0xbf, 0x9c, 0x55, 0xf8, 0x6c, - 0x82, 0xd3, 0x2d, 0x18, 0xfa, 0x71, 0x5e, 0xf2, 0x63, 0xc3, 0x65, 0x9a, 0x30, 0x98, 0x7d, 0x14, - 0x22, 0xf5, 0x4e, 0xfc, 0x19, 0x5e, 0x4d, 0xee, 0x94, 0x7f, 0x4c, 0xee, 0x16, 0x8c, 0x8d, 0x41, - 0xfe, 0x21, 0xfa, 0x10, 0x36, 0x9e, 0x0c, 0xb1, 0x3f, 0x52, 0xef, 0x54, 0xce, 0xbe, 0xc9, 0xf7, - 0x29, 0xb6, 0x72, 0x9b, 0x8b, 0x4f, 0xd4, 0x20, 0xcd, 0x84, 0x75, 0x0f, 0x85, 0xc7, 0xea, 0x2d, - 0x78, 0xf1, 0x63, 0x6b, 0xdc, 0x0a, 0x95, 0x3b, 0xac, 0x79, 0x4a, 0x48, 0xdc, 0x24, 0xf9, 0xbc, - 0x04, 0xfa, 0x1e, 0x1a, 0x86, 0xc7, 0x3b, 0xbb, 0xbd, 0x1e, 0x0e, 0x82, 0x3b, 0xa4, 0x8f, 0xa7, - 0xf5, 0x39, 0x06, 0x36, 0x79, 0x2a, 0xab, 0xf2, 0xf4, 0xbf, 0xf6, 0x06, 0x0d, 0x08, 0xc4, 0xc3, - 0xf2, 0x48, 0x94, 0x2a, 0x8d, 0x70, 0xea, 0x07, 0x0c, 0x6e, 0x08, 0x3c, 0x9a, 0x35, 0xd1, 0x69, - 0xe2, 0x5b, 0xdf, 0x67, 0xfd, 0x09, 0x93, 0xfa, 0x6f, 0x71, 0x20, 0x4a, 0x01, 0x1e, 0xfb, 0x36, - 0x4d, 0x60, 0x42, 0xf2, 0x29, 0xe6, 0x48, 0x3c, 0xff, 0x6c, 0xb0, 0x09, 0x0a, 0x1c, 0x0b, 0x1e, - 0xb5, 0xd9, 0x32, 0xef, 0xb9, 0x82, 0xdf, 0x5f, 0x8a, 0xb0, 0x2e, 0x64, 0xe4, 0x79, 0xf6, 0x2c, - 0x1d, 0x95, 0xe7, 0x23, 0xa4, 0xd4, 0x73, 0x57, 0x26, 0x3f, 0x77, 0x75, 0xb6, 0xe7, 0x9e, 0xab, - 0xa7, 0xf1, 0xc3, 0x12, 0xac, 0x71, 0xc6, 0x1e, 0x38, 0xf4, 0xb9, 0xad, 0xf0, 0x3f, 0x4d, 0x33, - 0xfe, 0x05, 0x42, 0xf8, 0x73, 0x51, 0x0a, 0x61, 0x1f, 0x05, 0xc1, 0x53, 0xe2, 0xf7, 0xff, 0x07, - 0xde, 0xfc, 0xc7, 0xb0, 0x98, 0xe4, 0xeb, 0x19, 0xfa, 0x3d, 0x2c, 0x42, 0xe4, 0x24, 0xdc, 0x3f, - 0xaf, 0x40, 0x73, 0xcf, 0xc3, 0x3e, 0x92, 0x87, 0x4d, 0x56, 0xb7, 0x2f, 0xb2, 0x3a, 0x2d, 0x2f, - 0xd3, 0xeb, 0x50, 0x0f, 0x86, 0x8e, 0x83, 0xfc, 0x91, 0xcc, 0xb9, 0xc5, 0x70, 0x86, 0x9c, 0x3b, - 0x53, 0xae, 0xad, 0xcc, 0x55, 0xae, 0x7d, 0x09, 0x16, 0x89, 0xe4, 0xcd, 0xb4, 0xfa, 0x52, 0xbc, - 0xd1, 0xdc, 0x83, 0x7e, 0xaa, 0xf7, 0x53, 0x1b, 0xeb, 0xfd, 0x24, 0x7b, 0x46, 0xf5, 0xb1, 0x9e, - 0xd1, 0x57, 0x52, 0x3d, 0x9b, 0x06, 0x13, 0xdd, 0x86, 0x32, 0x3d, 0xe3, 0xa1, 0x3e, 0xd9, 0xad, - 0x79, 0x33, 0xd9, 0xad, 0x69, 0x66, 0x33, 0x3b, 0x99, 0xe0, 0xa4, 0x7a, 0x34, 0x89, 0xd6, 0x16, - 0xa4, 0x5b, 0x5b, 0x97, 0x01, 0xfa, 0xd8, 0xf3, 0x71, 0x0f, 0x85, 0xb8, 0x2f, 0x4e, 0xbd, 0x89, - 0x99, 0xb3, 0x75, 0x77, 0x54, 0xea, 0xd7, 0x9a, 0x47, 0xfd, 0x7e, 0x59, 0x84, 0x66, 0x9c, 0x45, - 0xdc, 0x86, 0xf6, 0x21, 0xe9, 0x27, 0xe2, 0xad, 0x48, 0x1c, 0x52, 0x09, 0x5e, 0x2a, 0xf1, 0xe8, - 0x16, 0x8c, 0xd6, 0x61, 0x2a, 0x13, 0x79, 0x08, 0x9a, 0x4b, 0x5c, 0x73, 0x8c, 0x0e, 0x4f, 0x0b, - 0x2e, 0xa5, 0x98, 0x1a, 0xcb, 0x61, 0xba, 0x05, 0xa3, 0xe3, 0x8e, 0xcd, 0xc5, 0xd1, 0xf3, 0x08, - 0x56, 0x55, 0x7d, 0x36, 0x6d, 0x6f, 0xb2, 0xbd, 0x6c, 0x64, 0xc4, 0x10, 0x27, 0xe6, 0x6a, 0x93, - 0xf9, 0xac, 0x08, 0xed, 0xb4, 0x76, 0x68, 0x5f, 0x82, 0xe6, 0xb8, 0x44, 0xd4, 0xb9, 0x7e, 0xb7, - 0x60, 0xc4, 0x98, 0x54, 0x9a, 0x9f, 0x04, 0xc4, 0xa5, 0x67, 0x30, 0x7e, 0x22, 0x53, 0xa5, 0xcb, - 0xa9, 0x23, 0x1b, 0x95, 0xe6, 0x27, 0xc9, 0x89, 0xf8, 0xf9, 0x7f, 0x5f, 0x86, 0x46, 0x74, 0x74, - 0x50, 0x9c, 0xec, 0x5e, 0x83, 0xf2, 0x11, 0x0e, 0x55, 0x27, 0x91, 0xc8, 0xfe, 0x0d, 0x8a, 0x41, - 0x11, 0xbd, 0x61, 0x28, 0xfc, 0x63, 0x1e, 0xa2, 0x37, 0x0c, 0xb5, 0xeb, 0x50, 0xf1, 0x48, 0x20, - 0x3b, 0x40, 0x39, 0x98, 0x0c, 0x45, 0xbb, 0x09, 0xb5, 0x3e, 0xb6, 0x71, 0x88, 0xc5, 0x89, 0x3a, - 0x07, 0x59, 0x20, 0x69, 0xb7, 0xa0, 0x4e, 0x3c, 0xde, 0x86, 0xac, 0x4d, 0xc2, 0x97, 0x58, 0x94, - 0x15, 0x9a, 0x92, 0x8a, 0x22, 0x57, 0x1e, 0x2b, 0x14, 0x85, 0x9e, 0xc9, 0x3c, 0x14, 0xf6, 0x8e, - 0x45, 0xfb, 0x22, 0x07, 0x97, 0xe3, 0x8c, 0xb9, 0x89, 0xe6, 0x5c, 0x6e, 0xe2, 0xcc, 0x1d, 0xa4, - 0xbf, 0x56, 0x61, 0x4d, 0x9d, 0x4d, 0x9e, 0xd7, 0x18, 0xcf, 0x6b, 0x8c, 0xff, 0xed, 0x35, 0xc6, - 0xa7, 0x50, 0x65, 0x17, 0x34, 0x94, 0x94, 0x8a, 0x73, 0x50, 0xd2, 0x6e, 0x42, 0x85, 0xdd, 0x36, - 0x29, 0xb1, 0x45, 0xeb, 0x0a, 0x87, 0x2f, 0xea, 0x26, 0x0c, 0x6d, 0xeb, 0x67, 0x55, 0x58, 0x1a, - 0xd3, 0xda, 0xf3, 0x9e, 0xd4, 0x79, 0x4f, 0xea, 0x4c, 0x3d, 0x29, 0x95, 0x0e, 0x6b, 0xf3, 0x58, - 0xc3, 0xb7, 0x01, 0xe2, 0x14, 0xe4, 0x39, 0xdf, 0xf9, 0xfa, 0x55, 0x0d, 0x2e, 0xe6, 0x14, 0x46, - 0xce, 0xaf, 0x29, 0x9c, 0x5f, 0x53, 0x38, 0xbf, 0xa6, 0x10, 0x9b, 0xe1, 0xdf, 0x8b, 0xd0, 0x88, - 0xca, 0xe9, 0xd3, 0x2f, 0x76, 0x6d, 0x47, 0xdd, 0x19, 0x9e, 0x76, 0xaf, 0x65, 0x6b, 0xd6, 0x2c, - 0xf0, 0xc8, 0xab, 0xaf, 0x37, 0xa1, 0xce, 0x2b, 0xab, 0x32, 0x78, 0xac, 0x64, 0x0b, 0xb2, 0x81, - 0x21, 0x71, 0xb4, 0x37, 0xa0, 0x21, 0xae, 0x2b, 0xc9, 0x93, 0xf5, 0x6a, 0xfa, 0x64, 0xcd, 0x61, - 0x46, 0x84, 0x75, 0xf6, 0x3b, 0xcd, 0x18, 0x56, 0x14, 0x97, 0x11, 0xb5, 0xf7, 0x26, 0x3b, 0xa4, - 0x6c, 0xcc, 0x8d, 0x5a, 0x0b, 0x6a, 0x97, 0xf4, 0x93, 0x22, 0xb4, 0xd2, 0x5d, 0x86, 0x1d, 0xea, - 0x88, 0xf8, 0x44, 0x74, 0x7b, 0x5c, 0x71, 0xe6, 0xee, 0x16, 0x8c, 0x08, 0xef, 0xf9, 0x9e, 0xaf, - 0x7e, 0x5a, 0x84, 0x66, 0x74, 0xb2, 0xd7, 0xee, 0x40, 0x4b, 0x6e, 0x63, 0xf6, 0x48, 0x1f, 0x8b, - 0x07, 0xbd, 0x9c, 0xfb, 0xa0, 0xbc, 0xdb, 0xb1, 0x28, 0x17, 0xdd, 0x21, 0x7d, 0x75, 0x2b, 0xb0, - 0x34, 0xcf, 0xdb, 0xf8, 0x75, 0x13, 0x6a, 0xc2, 0x51, 0x2b, 0x4e, 0x7c, 0x79, 0x09, 0x4a, 0xd4, - 0x5b, 0x2d, 0x4f, 0xb8, 0xf4, 0x57, 0x99, 0x78, 0xe9, 0x6f, 0x5a, 0xe2, 0x31, 0x66, 0x89, 0xb5, - 0x8c, 0x25, 0x26, 0x5c, 0x62, 0x7d, 0x06, 0x97, 0xd8, 0x98, 0xee, 0x12, 0x9b, 0x33, 0xb8, 0x44, - 0x98, 0xc9, 0x25, 0x2e, 0x4c, 0x76, 0x89, 0x8b, 0x13, 0x5c, 0x62, 0x6b, 0x82, 0x4b, 0x6c, 0x4f, - 0x72, 0x89, 0x4b, 0x53, 0x5c, 0x62, 0x27, 0xeb, 0x12, 0x5f, 0x81, 0x36, 0x25, 0x9e, 0x30, 0x36, - 0x7e, 0x12, 0x68, 0x39, 0xe8, 0x34, 0x91, 0x2b, 0x50, 0x34, 0xcb, 0x4d, 0xa2, 0x69, 0x02, 0xcd, - 0x72, 0x13, 0x68, 0xc9, 0x40, 0xbf, 0x32, 0x76, 0x4d, 0x73, 0xa6, 0x13, 0xc1, 0x47, 0x79, 0x2e, - 0xe0, 0x42, 0xb6, 0xb5, 0x94, 0xf7, 0xe9, 0x89, 0xda, 0x1b, 0x68, 0xd7, 0x44, 0xd8, 0x5f, 0xcb, - 0xda, 0xfd, 0xa3, 0x91, 0x87, 0x79, 0xee, 0xce, 0x92, 0x81, 0xd7, 0x65, 0xd0, 0xbf, 0x98, 0x3d, - 0xdc, 0x47, 0x4d, 0x73, 0x19, 0xee, 0xaf, 0x43, 0x0d, 0xd9, 0x36, 0xd5, 0x4f, 0x3d, 0xb7, 0x77, - 0x5e, 0x45, 0xb6, 0xbd, 0x37, 0xd0, 0xbe, 0x0c, 0x90, 0x78, 0xa2, 0xf5, 0xac, 0x33, 0x8f, 0xb9, - 0x35, 0x12, 0x98, 0xda, 0xcb, 0xd0, 0xea, 0x5b, 0xd4, 0x82, 0x1c, 0xcb, 0x45, 0x21, 0xf1, 0xf5, - 0x0d, 0xa6, 0x20, 0xe9, 0xc9, 0xf4, 0x95, 0xd7, 0xcd, 0xb1, 0x2b, 0xaf, 0x2f, 0x41, 0xf9, 0xd4, - 0xb1, 0xf5, 0x4b, 0x59, 0x8b, 0xfb, 0xd0, 0xb1, 0x0d, 0x0a, 0xcb, 0x96, 0x59, 0x5f, 0x78, 0xd6, - 0x5b, 0xb1, 0x97, 0x9f, 0xe1, 0x56, 0xec, 0x8b, 0xf3, 0x78, 0xac, 0x1f, 0x00, 0xc4, 0x71, 0x6f, - 0xce, 0x2f, 0x8d, 0xde, 0x86, 0x85, 0x81, 0x65, 0x63, 0x33, 0x3f, 0xa4, 0xc6, 0x37, 0x9e, 0xbb, - 0x05, 0x03, 0x06, 0xd1, 0x28, 0xf6, 0xe2, 0x21, 0xac, 0x28, 0xba, 0xb9, 0xda, 0x77, 0x27, 0xc7, - 0xaf, 0x6b, 0xd9, 0x84, 0x3a, 0xa7, 0x25, 0xac, 0x0e, 0x67, 0x7f, 0xaa, 0xc0, 0xc5, 0xbc, 0x66, - 0xb4, 0x03, 0x2f, 0x1c, 0xa2, 0xc0, 0xea, 0x99, 0x28, 0xf5, 0x95, 0x90, 0x19, 0xd5, 0x7c, 0xb9, - 0x68, 0x5e, 0x4b, 0x55, 0x58, 0xf3, 0xbf, 0x2a, 0xea, 0x16, 0x8c, 0xcd, 0xc3, 0x09, 0x1f, 0x1d, - 0xdd, 0x87, 0x0e, 0xf2, 0x2c, 0xf3, 0x53, 0x3c, 0x8a, 0x77, 0xe0, 0x92, 0x4c, 0xd5, 0xb5, 0xd2, - 0x5f, 0x59, 0x75, 0x0b, 0x46, 0x1b, 0xa5, 0xbf, 0xbb, 0xfa, 0x1e, 0xe8, 0x84, 0xb5, 0x25, 0x4c, - 0x4b, 0x34, 0xa4, 0x62, 0x7a, 0xe5, 0x6c, 0x57, 0x54, 0xdd, 0xbb, 0xea, 0x16, 0x8c, 0x35, 0xa2, - 0xee, 0x6a, 0xc5, 0xf4, 0x3d, 0xd1, 0xeb, 0x89, 0xe9, 0x57, 0xf2, 0xe8, 0x8f, 0xb7, 0x85, 0x62, - 0xfa, 0x99, 0x86, 0xd1, 0x11, 0x6c, 0x0a, 0xfa, 0x28, 0x6e, 0x24, 0xc6, 0x5b, 0xf0, 0x00, 0xf7, - 0x4a, 0x76, 0x0b, 0x45, 0xdb, 0xb1, 0x5b, 0x30, 0xd6, 0x49, 0x6e, 0x4f, 0x12, 0xc7, 0x1b, 0xb1, - 0xae, 0x2e, 0x4b, 0x17, 0xe2, 0x8d, 0x6a, 0x59, 0xef, 0x98, 0xd7, 0x03, 0xee, 0x16, 0x0c, 0x21, - 0x93, 0x2c, 0x2c, 0xd6, 0xf0, 0xe3, 0x58, 0xc3, 0x13, 0x2d, 0x01, 0xed, 0xfd, 0xc9, 0x1a, 0x7e, - 0x29, 0xa7, 0x6d, 0xc4, 0x2f, 0x16, 0xa8, 0xb5, 0xfa, 0x2a, 0x2c, 0x24, 0x6f, 0x2e, 0xac, 0xc6, - 0x1f, 0xf7, 0x95, 0xe3, 0x3b, 0x0e, 0xbf, 0x2d, 0x42, 0xf9, 0x11, 0x52, 0xdf, 0x8a, 0x98, 0xfe, - 0xb1, 0x5b, 0xc6, 0xb3, 0x95, 0xcf, 0xfc, 0x8d, 0xc8, 0x5c, 0x5f, 0x70, 0x5d, 0x81, 0x86, 0x8c, - 0x30, 0x39, 0xcf, 0xf7, 0x31, 0x2c, 0x7d, 0x30, 0x56, 0x6f, 0x7a, 0x8e, 0x1f, 0x93, 0xfc, 0xae, - 0x08, 0xe5, 0x0f, 0x1d, 0x5b, 0x29, 0xbd, 0x4b, 0xd0, 0xa4, 0xbf, 0x81, 0x87, 0x7a, 0xf2, 0x5e, - 0x49, 0x3c, 0x41, 0x93, 0x3f, 0xcf, 0xc7, 0x03, 0xeb, 0x54, 0x64, 0x79, 0x62, 0x44, 0x57, 0xa1, - 0x30, 0xf4, 0xad, 0xc3, 0x61, 0x88, 0xc5, 0x67, 0x7a, 0xf1, 0x04, 0x4d, 0x65, 0x9e, 0xfa, 0xc8, - 0xf3, 0x70, 0x5f, 0x1c, 0xc1, 0xe5, 0xf0, 0xcc, 0x7d, 0xcc, 0xdb, 0xaf, 0x42, 0x9b, 0xf8, 0x47, - 0x12, 0xd7, 0x3c, 0xd9, 0xb9, 0xbd, 0x28, 0xbe, 0x5d, 0xdd, 0xf7, 0x49, 0x48, 0xf6, 0x8b, 0xbf, - 0x28, 0x95, 0xf7, 0x76, 0x0f, 0x0e, 0x6b, 0xec, 0x63, 0xd0, 0x37, 0xff, 0x19, 0x00, 0x00, 0xff, - 0xff, 0xd4, 0x0a, 0xef, 0xca, 0xe4, 0x3a, 0x00, 0x00, + 0x1f, 0x60, 0xc7, 0x3f, 0x60, 0x0d, 0x5b, 0xaa, 0x58, 0x51, 0x3c, 0xea, 0xbe, 0xa6, 0x5f, 0xb7, + 0xe7, 0x61, 0xb9, 0x80, 0x02, 0xad, 0x66, 0xee, 0x3d, 0xe7, 0x9e, 0x7b, 0xfa, 0xf4, 0x79, 0xdd, + 0x73, 0x6e, 0xc3, 0x3a, 0xf1, 0xb0, 0x8b, 0x3c, 0xeb, 0x64, 0xe7, 0xd6, 0x9e, 0x87, 0xdd, 0xdd, + 0xfd, 0x07, 0x27, 0x3b, 0xdb, 0x9e, 0x4f, 0x42, 0xa2, 0x81, 0x00, 0x6d, 0x9f, 0xec, 0x6c, 0xac, + 0x1f, 0x11, 0x72, 0x64, 0xe3, 0x5b, 0x0c, 0x72, 0x38, 0x1c, 0xdc, 0x42, 0xee, 0x88, 0xa3, 0x6d, + 0x39, 0xa0, 0xef, 0xf6, 0xfb, 0x56, 0x68, 0x11, 0x17, 0xd9, 0xfb, 0x3e, 0xf1, 0xb0, 0x1f, 0x5a, + 0x38, 0x78, 0x10, 0x62, 0x47, 0xfb, 0x3f, 0xa8, 0x05, 0xbd, 0x63, 0xec, 0x20, 0xbd, 0x78, 0xa5, + 0x78, 0x6d, 0x61, 0x47, 0xdb, 0x8e, 0x68, 0x6e, 0x1f, 0x30, 0x48, 0xb7, 0x60, 0x08, 0x1c, 0x6d, + 0x03, 0xea, 0x87, 0x84, 0xd8, 0x18, 0xb9, 0x7a, 0xe9, 0x4a, 0xf1, 0x5a, 0xa3, 0x5b, 0x30, 0xe4, + 0xc4, 0xed, 0x3a, 0x54, 0x89, 0x8b, 0xc9, 0x60, 0xeb, 0x1e, 0x94, 0x77, 0xdd, 0x91, 0x76, 0x03, + 0xaa, 0x27, 0xc8, 0x1e, 0x62, 0x41, 0x78, 0x75, 0x9b, 0x33, 0xb8, 0x2d, 0x19, 0xdc, 0xde, 0x75, + 0x47, 0x06, 0x47, 0xd1, 0x34, 0xa8, 0x8c, 0x90, 0x63, 0x33, 0xa2, 0x4d, 0x83, 0xfd, 0xdf, 0xfa, + 0xa2, 0x08, 0xed, 0x5d, 0xcf, 0x7a, 0x17, 0x8f, 0x0e, 0x70, 0x6f, 0xe8, 0x5b, 0xe1, 0x88, 0xa2, + 0x85, 0x23, 0x8f, 0x53, 0x6c, 0x1a, 0xec, 0x3f, 0x9d, 0x73, 0x91, 0x83, 0xe5, 0x52, 0xfa, 0x5f, + 0x6b, 0x43, 0xc9, 0x72, 0xf5, 0x32, 0x9b, 0x29, 0x59, 0xae, 0x76, 0x05, 0x16, 0xfa, 0x38, 0xe8, + 0xf9, 0x96, 0x47, 0x65, 0xa0, 0x57, 0x18, 0x20, 0x3e, 0xa5, 0x7d, 0x0d, 0x3a, 0x27, 0xd8, 0xed, + 0x13, 0xdf, 0xc4, 0xa7, 0x21, 0x76, 0x03, 0x8a, 0x56, 0xbd, 0x52, 0x66, 0x7c, 0xc7, 0x04, 0xf2, + 0x1e, 0x72, 0x70, 0x9f, 0xf2, 0xbd, 0xc4, 0xb1, 0xef, 0x49, 0xe4, 0xad, 0xcf, 0x8a, 0xb0, 0x79, + 0x1b, 0x05, 0x56, 0x6f, 0x77, 0x18, 0x1e, 0x63, 0x37, 0xb4, 0x7a, 0x88, 0x12, 0x9e, 0xc8, 0x7a, + 0x8a, 0xad, 0xd2, 0x6c, 0x6c, 0x95, 0xe7, 0x61, 0xeb, 0x0f, 0x45, 0x68, 0xdd, 0x26, 0xfd, 0xd1, + 0x3e, 0xf2, 0x91, 0x83, 0x43, 0xec, 0xa7, 0x37, 0x2d, 0x66, 0x37, 0x9d, 0x45, 0xa2, 0x1b, 0xd0, + 0xf0, 0xf1, 0x93, 0xa1, 0xe5, 0xe3, 0x3e, 0x13, 0x67, 0xc3, 0x18, 0x8f, 0xb5, 0x1b, 0x63, 0x95, + 0xaa, 0xe6, 0xa9, 0xd4, 0x58, 0xa1, 0x54, 0x0f, 0x58, 0x9b, 0xe7, 0x01, 0x7f, 0x5c, 0x84, 0xfa, + 0x1d, 0xe2, 0x86, 0xa8, 0x17, 0x8e, 0x19, 0x2f, 0xc6, 0x18, 0xef, 0x40, 0x79, 0xe8, 0x4b, 0xc5, + 0xa2, 0x7f, 0xb5, 0x55, 0xa8, 0x62, 0x07, 0x59, 0xb6, 0x78, 0x1a, 0x3e, 0x50, 0x32, 0x52, 0x99, + 0x87, 0x91, 0x47, 0x50, 0xbf, 0x8b, 0x07, 0x68, 0x68, 0x87, 0xda, 0x03, 0xb8, 0x80, 0xc6, 0xf6, + 0x66, 0x7a, 0x63, 0x83, 0xd3, 0x8b, 0x13, 0x08, 0xae, 0x22, 0x85, 0x89, 0x6e, 0x7d, 0x07, 0x16, + 0xee, 0xe2, 0x81, 0xe5, 0x32, 0x48, 0xa0, 0x3d, 0x9c, 0x4c, 0xf9, 0x62, 0x86, 0xb2, 0x10, 0xb7, + 0x9a, 0xf8, 0x1f, 0xab, 0xd0, 0xb8, 0x4b, 0x7a, 0x43, 0x07, 0xbb, 0xa1, 0xa6, 0x43, 0x3d, 0x78, + 0x8a, 0x8e, 0x8e, 0xb0, 0x2f, 0xe4, 0x27, 0x87, 0xda, 0xcb, 0x50, 0xb1, 0xdc, 0x01, 0x61, 0x32, + 0x5c, 0xd8, 0xe9, 0xc4, 0xf7, 0x78, 0xe0, 0x0e, 0x88, 0xc1, 0xa0, 0x54, 0xf8, 0xc7, 0x24, 0x08, + 0x85, 0x54, 0xd9, 0x7f, 0x6d, 0x13, 0x9a, 0x87, 0x28, 0xc0, 0xa6, 0x87, 0xc2, 0x63, 0x61, 0x75, + 0x0d, 0x3a, 0xb1, 0x8f, 0xc2, 0x63, 0xb6, 0x21, 0xe5, 0x0e, 0x07, 0xcc, 0xd2, 0xe8, 0x86, 0x7c, + 0x48, 0x95, 0xab, 0x47, 0xdc, 0x60, 0x48, 0x41, 0x35, 0x06, 0x1a, 0x8f, 0x29, 0xcc, 0xf3, 0x49, + 0x7f, 0xd8, 0xc3, 0x81, 0x5e, 0xe7, 0x30, 0x39, 0xd6, 0x5e, 0x83, 0x2a, 0xdd, 0x29, 0xd0, 0x1b, + 0x8c, 0xd3, 0xe5, 0x38, 0xa7, 0x74, 0xcb, 0xc0, 0xe0, 0x70, 0xed, 0x6d, 0x6a, 0x03, 0x63, 0xa9, + 0xea, 0x4d, 0x86, 0x9e, 0x10, 0x5e, 0x4c, 0xe8, 0x46, 0x1c, 0x57, 0xfb, 0x3a, 0x80, 0x27, 0x6d, + 0x29, 0xd0, 0x81, 0xad, 0xbc, 0x92, 0xdc, 0x48, 0x40, 0xe3, 0x24, 0x62, 0x6b, 0xb4, 0x77, 0xa0, + 0xe9, 0xe3, 0xc0, 0x23, 0x6e, 0x80, 0x03, 0x7d, 0x81, 0x11, 0x78, 0x31, 0x4e, 0xc0, 0x10, 0xc0, + 0xf8, 0xfa, 0x68, 0x85, 0xf6, 0x55, 0x68, 0x04, 0xc2, 0xa9, 0xe8, 0x8b, 0xec, 0xad, 0x27, 0x56, + 0x4b, 0x87, 0x63, 0x70, 0x6b, 0xa4, 0xaf, 0xd6, 0x18, 0x2f, 0xd0, 0x0c, 0x58, 0x95, 0xff, 0xcd, + 0xb8, 0x04, 0x5a, 0x59, 0x36, 0x24, 0xa1, 0x38, 0x1b, 0x2b, 0x41, 0x76, 0x52, 0xbb, 0x0a, 0x95, + 0x10, 0x1d, 0x05, 0x7a, 0x9b, 0x31, 0xb3, 0x14, 0xa7, 0xf1, 0x08, 0x1d, 0x19, 0x0c, 0xa8, 0xbd, + 0x03, 0x2d, 0x6a, 0x57, 0x3e, 0x55, 0xdb, 0x3e, 0xe9, 0x05, 0xfa, 0x12, 0xdb, 0x51, 0x8f, 0x63, + 0xdf, 0x13, 0x08, 0x77, 0x49, 0x2f, 0x30, 0x16, 0x71, 0x6c, 0xa4, 0xb4, 0xce, 0xce, 0x3c, 0xd6, + 0xf9, 0x18, 0x1a, 0xf7, 0x4e, 0x91, 0xe3, 0xd9, 0x38, 0x78, 0x9e, 0xe6, 0xf9, 0xa3, 0x22, 0x2c, + 0xc6, 0xd9, 0x9e, 0xc1, 0xbb, 0x66, 0x1d, 0xd2, 0x99, 0x9d, 0xfc, 0x3f, 0x4a, 0x00, 0xf7, 0x2d, + 0x1b, 0x73, 0x63, 0xd7, 0xd6, 0xa0, 0x36, 0x20, 0xbe, 0x83, 0x42, 0xb1, 0xbd, 0x18, 0x51, 0xc7, + 0x17, 0x5a, 0xa1, 0x2d, 0x1d, 0x3b, 0x1f, 0xa4, 0x39, 0x2e, 0x67, 0x39, 0xbe, 0x0e, 0xf5, 0x3e, + 0xf7, 0x6c, 0xcc, 0x86, 0x53, 0xef, 0x98, 0x72, 0x24, 0xe1, 0x89, 0xb0, 0xc0, 0x8d, 0x3a, 0x0a, + 0x0b, 0x32, 0x02, 0xd6, 0x62, 0x11, 0x70, 0x93, 0xda, 0x02, 0xea, 0x9b, 0xc4, 0xb5, 0x47, 0x7a, + 0x5d, 0xc6, 0x11, 0xd4, 0xdf, 0x73, 0xed, 0x51, 0x56, 0x67, 0x1a, 0x73, 0xe9, 0xcc, 0x75, 0xa8, + 0x63, 0xfe, 0xca, 0x85, 0x81, 0x67, 0xd9, 0x16, 0x70, 0xe5, 0x1b, 0x80, 0x79, 0xde, 0xc0, 0x17, + 0x35, 0xd8, 0xb8, 0x4f, 0x7c, 0xe7, 0x2e, 0x0a, 0xd1, 0xd8, 0x01, 0x1c, 0x0c, 0x0f, 0x0f, 0x64, + 0xda, 0x14, 0x89, 0xa5, 0x98, 0x8a, 0x96, 0x3c, 0xb2, 0x96, 0xf2, 0x72, 0x95, 0x72, 0x7e, 0x7c, + 0xae, 0xc4, 0xc2, 0xdc, 0x0d, 0x58, 0x46, 0xb6, 0x4d, 0x9e, 0x9a, 0xd8, 0xf1, 0xc2, 0x91, 0xc9, + 0x13, 0xaf, 0x2a, 0xdb, 0x6a, 0x89, 0x01, 0xee, 0xd1, 0xf9, 0x0f, 0x64, 0xb2, 0x95, 0x79, 0x11, + 0x91, 0xce, 0xd4, 0x13, 0x3a, 0xf3, 0xff, 0x50, 0xb5, 0x42, 0xec, 0x48, 0xd9, 0x6f, 0x26, 0x3c, + 0x9d, 0x6f, 0x39, 0x56, 0x68, 0x9d, 0xf0, 0x4c, 0x32, 0x30, 0x38, 0xa6, 0xf6, 0x3a, 0x2c, 0xf7, + 0x88, 0x6d, 0xe3, 0x1e, 0x65, 0xd6, 0x14, 0x54, 0x9b, 0x8c, 0x6a, 0x27, 0x02, 0xdc, 0xe7, 0xf4, + 0x63, 0xba, 0x05, 0x53, 0x74, 0x4b, 0x87, 0xba, 0x83, 0x4e, 0x2d, 0x67, 0xe8, 0x30, 0xaf, 0x59, + 0x34, 0xe4, 0x90, 0xee, 0x88, 0x4f, 0x7b, 0xf6, 0x30, 0xb0, 0x4e, 0xb0, 0x29, 0x71, 0x16, 0xd9, + 0xc3, 0x77, 0xc6, 0x80, 0x6f, 0x0a, 0x64, 0x4a, 0xc6, 0x72, 0x19, 0x4a, 0x4b, 0x90, 0xe1, 0xc3, + 0x14, 0x19, 0x81, 0xd3, 0x4e, 0x93, 0x11, 0xc8, 0x2f, 0x00, 0x38, 0xe8, 0xd4, 0xb4, 0xb1, 0x7b, + 0x14, 0x1e, 0x33, 0x6f, 0x56, 0x36, 0x9a, 0x0e, 0x3a, 0x7d, 0xc8, 0x26, 0x18, 0xd8, 0x72, 0x25, + 0xb8, 0x23, 0xc0, 0x96, 0x2b, 0xc0, 0x3a, 0xd4, 0x3d, 0x14, 0x52, 0x65, 0xd5, 0x97, 0x79, 0xb0, + 0x15, 0x43, 0x6a, 0x11, 0x94, 0x2e, 0x17, 0xba, 0xc6, 0xd6, 0x35, 0x1c, 0x74, 0xca, 0x24, 0xcc, + 0x80, 0x96, 0x2b, 0x80, 0x2b, 0x02, 0x68, 0xb9, 0x1c, 0xf8, 0x12, 0x2c, 0x0e, 0x5d, 0xeb, 0xc9, + 0x10, 0x0b, 0xf8, 0x2a, 0xe3, 0x7c, 0x81, 0xcf, 0x71, 0x94, 0xab, 0x50, 0xc1, 0xee, 0xd0, 0xd1, + 0x2f, 0x64, 0x5d, 0x35, 0x15, 0x35, 0x03, 0x6a, 0x2f, 0xc2, 0x82, 0x33, 0xb4, 0x43, 0xcb, 0xb3, + 0xb1, 0x49, 0x06, 0xfa, 0x1a, 0x13, 0x12, 0xc8, 0xa9, 0xbd, 0x81, 0xd2, 0x5a, 0x2e, 0xce, 0x65, + 0x2d, 0x55, 0xa8, 0x75, 0x31, 0xea, 0x63, 0x5f, 0x99, 0x16, 0x47, 0xba, 0x58, 0x52, 0xeb, 0x62, + 0xf9, 0x6c, 0xba, 0x58, 0x99, 0xae, 0x8b, 0xd5, 0xd9, 0x75, 0xb1, 0x36, 0x83, 0x2e, 0xd6, 0xa7, + 0xeb, 0x62, 0x63, 0x06, 0x5d, 0x6c, 0xce, 0xa4, 0x8b, 0x30, 0x59, 0x17, 0x17, 0x26, 0xe8, 0xe2, + 0xe2, 0x04, 0x5d, 0x6c, 0x4d, 0xd2, 0xc5, 0xf6, 0x14, 0x5d, 0x5c, 0xca, 0xd7, 0xc5, 0xce, 0x1c, + 0xba, 0xb8, 0x9c, 0xd1, 0xc5, 0x94, 0xb7, 0xd4, 0x66, 0x3b, 0x42, 0xad, 0xcc, 0xa3, 0xad, 0x7f, + 0xab, 0x82, 0xce, 0xb5, 0xf5, 0xdf, 0xe2, 0xd9, 0xa5, 0x85, 0x54, 0x95, 0x16, 0x52, 0x53, 0x5b, + 0x48, 0xfd, 0x6c, 0x16, 0xd2, 0x98, 0x6e, 0x21, 0xcd, 0xd9, 0x2d, 0x04, 0x66, 0xb0, 0x90, 0x85, + 0xe9, 0x16, 0xb2, 0x38, 0x83, 0x85, 0xb4, 0x66, 0xb2, 0x90, 0xf6, 0x64, 0x0b, 0x59, 0x9a, 0x60, + 0x21, 0x9d, 0x09, 0x16, 0xb2, 0x3c, 0xc9, 0x42, 0xb4, 0x29, 0x16, 0xb2, 0x92, 0x6f, 0x21, 0xab, + 0x73, 0x58, 0xc8, 0x85, 0x99, 0xbc, 0xf5, 0xda, 0x3c, 0xfa, 0xff, 0x2d, 0xa8, 0x73, 0xf5, 0x7f, + 0x86, 0xe3, 0x27, 0x5f, 0x98, 0x93, 0x3c, 0x7f, 0x5e, 0x82, 0x0a, 0x3d, 0x40, 0x46, 0x89, 0x69, + 0x31, 0x9e, 0x98, 0xea, 0x50, 0x3f, 0xc1, 0x7e, 0x10, 0x55, 0x46, 0xe4, 0x70, 0x06, 0x43, 0xba, + 0x06, 0x9d, 0x10, 0xfb, 0x4e, 0x60, 0x92, 0x81, 0x19, 0x60, 0xff, 0xc4, 0xea, 0x49, 0xa3, 0x6a, + 0xb3, 0xf9, 0xbd, 0xc1, 0x01, 0x9f, 0xd5, 0x6e, 0x42, 0xbd, 0xc7, 0xcb, 0x07, 0xc2, 0xe9, 0xaf, + 0xc4, 0x1f, 0x42, 0x54, 0x16, 0x0c, 0x89, 0x43, 0xd1, 0x6d, 0xab, 0x87, 0xdd, 0x80, 0xa7, 0x4f, + 0x29, 0xf4, 0x87, 0x1c, 0x64, 0x48, 0x1c, 0xa5, 0xf0, 0xeb, 0xf3, 0x08, 0xff, 0x2d, 0x68, 0x32, + 0x65, 0x60, 0xb5, 0xba, 0x1b, 0xb1, 0x5a, 0x5d, 0x79, 0x72, 0x61, 0x65, 0xeb, 0x2e, 0xb4, 0xbe, + 0x11, 0x10, 0xd7, 0xc0, 0x03, 0xec, 0x63, 0xb7, 0x87, 0xb5, 0x65, 0xa8, 0x98, 0x3e, 0x1e, 0x08, + 0x19, 0x97, 0x0d, 0x3c, 0x98, 0x5e, 0x7f, 0xda, 0xf2, 0xa0, 0x2e, 0x9e, 0x69, 0xc6, 0xe2, 0xca, + 0x99, 0xcf, 0x32, 0xf7, 0xa0, 0x21, 0x81, 0xca, 0x2d, 0x5f, 0x91, 0x55, 0xc5, 0x92, 0xda, 0x01, + 0x71, 0xe8, 0xd6, 0xbb, 0xb0, 0x10, 0x53, 0x40, 0x25, 0xa5, 0x6b, 0x49, 0x4a, 0x09, 0x61, 0x0a, + 0xbd, 0x15, 0xc4, 0xde, 0x87, 0x36, 0x23, 0x16, 0x15, 0xd1, 0x54, 0xf4, 0x5e, 0x4f, 0xd2, 0xbb, + 0xa0, 0x2c, 0x0a, 0x48, 0x92, 0x7b, 0xd0, 0x12, 0x24, 0xc3, 0x63, 0xf6, 0x6e, 0x55, 0x14, 0x6f, + 0x24, 0x29, 0xae, 0xa6, 0xeb, 0x19, 0x74, 0x61, 0x9a, 0xa0, 0xac, 0x1e, 0xcc, 0x4d, 0x50, 0x2e, + 0x94, 0x04, 0x3f, 0x02, 0x2d, 0x41, 0x70, 0x7c, 0x76, 0xc8, 0x50, 0xbd, 0x95, 0xa4, 0xba, 0xae, + 0xa2, 0xca, 0x56, 0xa7, 0x5f, 0x8e, 0x88, 0xa1, 0xf3, 0xbe, 0x1c, 0xa1, 0xe9, 0x82, 0x98, 0x03, + 0x97, 0x38, 0xb1, 0x6c, 0x69, 0x22, 0x57, 0xb0, 0x6f, 0x27, 0xa9, 0x5f, 0x9d, 0x52, 0xf7, 0x88, + 0xcb, 0xf9, 0x2d, 0xc9, 0x7b, 0xe8, 0x5b, 0xee, 0x91, 0x92, 0xfa, 0x6a, 0x9c, 0x7a, 0x53, 0x2e, + 0x7c, 0x0c, 0x9d, 0xd8, 0xc2, 0x5d, 0xdf, 0x47, 0x6a, 0x05, 0xbf, 0x99, 0xe4, 0x2d, 0xe1, 0x53, + 0x63, 0x6b, 0x25, 0xd9, 0xdf, 0x94, 0xa1, 0xf3, 0x1e, 0x71, 0x93, 0x35, 0x5e, 0x0c, 0x9b, 0xc7, + 0x4c, 0x83, 0xcd, 0x71, 0xdd, 0xc9, 0x0c, 0x86, 0x87, 0x66, 0xa2, 0xd2, 0xff, 0x72, 0x56, 0xe1, + 0xb3, 0x09, 0x4e, 0xb7, 0x60, 0xe8, 0xc7, 0x79, 0xc9, 0x8f, 0x0d, 0x97, 0x69, 0xc2, 0x60, 0xf6, + 0x51, 0x88, 0xd4, 0x3b, 0xf1, 0x67, 0x78, 0x35, 0xbe, 0x53, 0xfe, 0x31, 0xb9, 0x5b, 0x30, 0x36, + 0x06, 0xf9, 0x87, 0xe8, 0x43, 0xd8, 0x78, 0x32, 0xc4, 0xfe, 0x48, 0xbd, 0x53, 0x39, 0xfb, 0x26, + 0xdf, 0xa7, 0xd8, 0xca, 0x6d, 0x2e, 0x3e, 0x51, 0x83, 0x34, 0x13, 0xd6, 0x3d, 0x14, 0x1e, 0xab, + 0xb7, 0xe0, 0xc5, 0x8f, 0xad, 0xb4, 0x15, 0x2a, 0x77, 0x58, 0xf3, 0x94, 0x90, 0xa8, 0x49, 0xf2, + 0x79, 0x09, 0xf4, 0x3d, 0x34, 0x0c, 0x8f, 0x77, 0x76, 0x7b, 0x3d, 0x1c, 0x04, 0x77, 0x48, 0x1f, + 0x4f, 0xeb, 0x73, 0x0c, 0x6c, 0xf2, 0x54, 0x56, 0xe5, 0xe9, 0x7f, 0xed, 0x0d, 0x1a, 0x10, 0x88, + 0x87, 0xe5, 0x91, 0x28, 0x51, 0x1a, 0xe1, 0xd4, 0x0f, 0x18, 0xdc, 0x10, 0x78, 0x34, 0x6b, 0xa2, + 0xd3, 0xc4, 0xb7, 0xbe, 0xcf, 0xfa, 0x13, 0x26, 0xf5, 0xdf, 0xe2, 0x40, 0x94, 0x00, 0x3c, 0xf6, + 0x6d, 0x9a, 0xc0, 0x84, 0xe4, 0x53, 0xcc, 0x91, 0x78, 0xfe, 0xd9, 0x60, 0x13, 0x14, 0x98, 0x0a, + 0x1e, 0xb5, 0xd9, 0x32, 0xef, 0xb9, 0x82, 0xdf, 0x5f, 0x8a, 0xb0, 0x2e, 0x64, 0xe4, 0x79, 0xf6, + 0x2c, 0x1d, 0x95, 0xe7, 0x23, 0xa4, 0xc4, 0x73, 0x57, 0x26, 0x3f, 0x77, 0x75, 0xb6, 0xe7, 0x9e, + 0xab, 0xa7, 0xf1, 0xc3, 0x12, 0xac, 0x71, 0xc6, 0x1e, 0x38, 0xf4, 0xb9, 0xad, 0xf0, 0x3f, 0x4d, + 0x33, 0xfe, 0x05, 0x42, 0xf8, 0x73, 0x51, 0x0a, 0x61, 0x1f, 0x05, 0xc1, 0x53, 0xe2, 0xf7, 0xff, + 0x07, 0xde, 0xfc, 0xc7, 0xb0, 0x18, 0xe7, 0xeb, 0x19, 0xfa, 0x3d, 0x2c, 0x42, 0xe4, 0x24, 0xdc, + 0x3f, 0xaf, 0x40, 0x73, 0xcf, 0xc3, 0x3e, 0x92, 0x87, 0x4d, 0x56, 0xb7, 0x2f, 0xb2, 0x3a, 0x2d, + 0x2f, 0xd3, 0xeb, 0x50, 0x0f, 0x86, 0x8e, 0x83, 0xfc, 0x91, 0xcc, 0xb9, 0xc5, 0x70, 0x86, 0x9c, + 0x3b, 0x53, 0xae, 0xad, 0xcc, 0x55, 0xae, 0x7d, 0x09, 0x16, 0x89, 0xe4, 0xcd, 0xb4, 0xfa, 0x52, + 0xbc, 0xe3, 0xb9, 0x07, 0xfd, 0x44, 0xef, 0xa7, 0x96, 0xea, 0xfd, 0xc4, 0x7b, 0x46, 0xf5, 0x54, + 0xcf, 0xe8, 0x2b, 0x89, 0x9e, 0x4d, 0x83, 0x89, 0x6e, 0x43, 0x99, 0x9e, 0xf1, 0x50, 0x1f, 0xef, + 0xd6, 0xbc, 0x19, 0xef, 0xd6, 0x34, 0xb3, 0x99, 0x9d, 0x4c, 0x70, 0x12, 0x3d, 0x9a, 0x58, 0x6b, + 0x0b, 0x92, 0xad, 0xad, 0xcb, 0x00, 0x7d, 0xec, 0xf9, 0xb8, 0x87, 0x42, 0xdc, 0x17, 0xa7, 0xde, + 0xd8, 0xcc, 0xd9, 0xba, 0x3b, 0x2a, 0xf5, 0x6b, 0xcd, 0xa3, 0x7e, 0xbf, 0x2c, 0x42, 0x33, 0xca, + 0x22, 0x6e, 0x43, 0xfb, 0x90, 0xf4, 0x63, 0xf1, 0x56, 0x24, 0x0e, 0x89, 0x04, 0x2f, 0x91, 0x78, + 0x74, 0x0b, 0x46, 0xeb, 0x30, 0x91, 0x89, 0x3c, 0x04, 0xcd, 0x25, 0xae, 0x99, 0xa2, 0xc3, 0xd3, + 0x82, 0x4b, 0x09, 0xa6, 0x52, 0x39, 0x4c, 0xb7, 0x60, 0x74, 0xdc, 0xd4, 0x5c, 0x14, 0x3d, 0x8f, + 0x60, 0x55, 0xd5, 0x67, 0xd3, 0xf6, 0x26, 0xdb, 0xcb, 0x46, 0x46, 0x0c, 0x51, 0x62, 0xae, 0x36, + 0x99, 0xcf, 0x8a, 0xd0, 0x4e, 0x6a, 0x87, 0xf6, 0x25, 0x68, 0xa6, 0x25, 0xa2, 0xce, 0xf5, 0xbb, + 0x05, 0x23, 0xc2, 0xa4, 0xd2, 0xfc, 0x24, 0x20, 0x2e, 0x3d, 0x83, 0xf1, 0x13, 0x99, 0x2a, 0x5d, + 0x4e, 0x1c, 0xd9, 0xa8, 0x34, 0x3f, 0x89, 0x4f, 0x44, 0xcf, 0xff, 0xfb, 0x32, 0x34, 0xc6, 0x47, + 0x07, 0xc5, 0xc9, 0xee, 0x35, 0x28, 0x1f, 0xe1, 0x50, 0x75, 0x12, 0x19, 0xdb, 0xbf, 0x41, 0x31, + 0x28, 0xa2, 0x37, 0x0c, 0x85, 0x7f, 0xcc, 0x43, 0xf4, 0x86, 0xa1, 0x76, 0x1d, 0x2a, 0x1e, 0x09, + 0x64, 0x07, 0x28, 0x07, 0x93, 0xa1, 0x68, 0x37, 0xa1, 0xd6, 0xc7, 0x36, 0x0e, 0xb1, 0x38, 0x51, + 0xe7, 0x20, 0x0b, 0x24, 0xed, 0x16, 0xd4, 0x89, 0xc7, 0xdb, 0x90, 0xb5, 0x49, 0xf8, 0x12, 0x8b, + 0xb2, 0x42, 0x53, 0x52, 0x51, 0xe4, 0xca, 0x63, 0x85, 0xa2, 0xd0, 0x33, 0x99, 0x87, 0xc2, 0xde, + 0xb1, 0x68, 0x5f, 0xe4, 0xe0, 0x72, 0x9c, 0x94, 0x9b, 0x68, 0xce, 0xe5, 0x26, 0xce, 0xdc, 0x41, + 0xfa, 0x6b, 0x15, 0xd6, 0xd4, 0xd9, 0xe4, 0x79, 0x8d, 0xf1, 0xbc, 0xc6, 0xf8, 0xdf, 0x5e, 0x63, + 0x7c, 0x0a, 0x55, 0x76, 0x41, 0x43, 0x49, 0xa9, 0x38, 0x07, 0x25, 0xed, 0x26, 0x54, 0xd8, 0x6d, + 0x93, 0x12, 0x5b, 0xb4, 0xae, 0x70, 0xf8, 0xa2, 0x6e, 0xc2, 0xd0, 0xb6, 0x7e, 0x56, 0x85, 0xa5, + 0x94, 0xd6, 0x9e, 0xf7, 0xa4, 0xce, 0x7b, 0x52, 0x67, 0xea, 0x49, 0xa9, 0x74, 0x58, 0x9b, 0xc7, + 0x1a, 0xbe, 0x0d, 0x10, 0xa5, 0x20, 0xcf, 0xf9, 0xce, 0xd7, 0xaf, 0x6a, 0x70, 0x31, 0xa7, 0x30, + 0x72, 0x7e, 0x4d, 0xe1, 0xfc, 0x9a, 0xc2, 0xf9, 0x35, 0x85, 0xc8, 0x0c, 0xff, 0x5e, 0x84, 0xc6, + 0xb8, 0x9c, 0x3e, 0xfd, 0x62, 0xd7, 0xf6, 0xb8, 0x3b, 0xc3, 0xd3, 0xee, 0xb5, 0x6c, 0xcd, 0x9a, + 0x05, 0x1e, 0x79, 0xf5, 0xf5, 0x26, 0xd4, 0x79, 0x65, 0x55, 0x06, 0x8f, 0x95, 0x6c, 0x41, 0x36, + 0x30, 0x24, 0x8e, 0xf6, 0x06, 0x34, 0xc4, 0x75, 0x25, 0x79, 0xb2, 0x5e, 0x4d, 0x9e, 0xac, 0x39, + 0xcc, 0x18, 0x63, 0x9d, 0xfd, 0x4e, 0x33, 0x86, 0x15, 0xc5, 0x65, 0x44, 0xed, 0xbd, 0xc9, 0x0e, + 0x29, 0x1b, 0x73, 0xc7, 0xad, 0x05, 0xb5, 0x4b, 0xfa, 0x49, 0x11, 0x5a, 0xc9, 0x2e, 0xc3, 0x0e, + 0x75, 0x44, 0x7c, 0x62, 0x7c, 0x7b, 0x5c, 0x71, 0xe6, 0xee, 0x16, 0x8c, 0x31, 0xde, 0xf3, 0x3d, + 0x5f, 0xfd, 0xb4, 0x08, 0xcd, 0xf1, 0xc9, 0x5e, 0xbb, 0x03, 0x2d, 0xb9, 0x8d, 0xd9, 0x23, 0x7d, + 0x2c, 0x1e, 0xf4, 0x72, 0xee, 0x83, 0xf2, 0x6e, 0xc7, 0xa2, 0x5c, 0x74, 0x87, 0xf4, 0xd5, 0xad, + 0xc0, 0xd2, 0x3c, 0x6f, 0xe3, 0xd7, 0x4d, 0xa8, 0x09, 0x47, 0xad, 0x38, 0xf1, 0xe5, 0x25, 0x28, + 0xe3, 0xde, 0x6a, 0x79, 0xc2, 0xa5, 0xbf, 0xca, 0xc4, 0x4b, 0x7f, 0xd3, 0x12, 0x8f, 0x94, 0x25, + 0xd6, 0x32, 0x96, 0x18, 0x73, 0x89, 0xf5, 0x19, 0x5c, 0x62, 0x63, 0xba, 0x4b, 0x6c, 0xce, 0xe0, + 0x12, 0x61, 0x26, 0x97, 0xb8, 0x30, 0xd9, 0x25, 0x2e, 0x4e, 0x70, 0x89, 0xad, 0x09, 0x2e, 0xb1, + 0x3d, 0xc9, 0x25, 0x2e, 0x4d, 0x71, 0x89, 0x9d, 0xac, 0x4b, 0x7c, 0x05, 0xda, 0x94, 0x78, 0xcc, + 0xd8, 0xf8, 0x49, 0xa0, 0xe5, 0xa0, 0xd3, 0x58, 0xae, 0x40, 0xd1, 0x2c, 0x37, 0x8e, 0xa6, 0x09, + 0x34, 0xcb, 0x8d, 0xa1, 0xc5, 0x03, 0xfd, 0x4a, 0xea, 0x9a, 0xe6, 0x4c, 0x27, 0x82, 0x8f, 0xf2, + 0x5c, 0xc0, 0x85, 0x6c, 0x6b, 0x29, 0xef, 0xd3, 0x13, 0xb5, 0x37, 0xd0, 0xae, 0x89, 0xb0, 0xbf, + 0x96, 0xb5, 0xfb, 0x47, 0x23, 0x0f, 0xf3, 0xdc, 0x9d, 0x25, 0x03, 0xaf, 0xcb, 0xa0, 0x7f, 0x31, + 0x7b, 0xb8, 0x1f, 0x37, 0xcd, 0x65, 0xb8, 0xbf, 0x0e, 0x35, 0x64, 0xdb, 0x54, 0x3f, 0xf5, 0xdc, + 0xde, 0x79, 0x15, 0xd9, 0xf6, 0xde, 0x40, 0xfb, 0x32, 0x40, 0xec, 0x89, 0xd6, 0xb3, 0xce, 0x3c, + 0xe2, 0xd6, 0x88, 0x61, 0x6a, 0x2f, 0x43, 0xab, 0x6f, 0x51, 0x0b, 0x72, 0x2c, 0x17, 0x85, 0xc4, + 0xd7, 0x37, 0x98, 0x82, 0x24, 0x27, 0x93, 0x57, 0x5e, 0x37, 0x53, 0x57, 0x5e, 0x5f, 0x82, 0xf2, + 0xa9, 0x63, 0xeb, 0x97, 0xb2, 0x16, 0xf7, 0xa1, 0x63, 0x1b, 0x14, 0x96, 0x2d, 0xb3, 0xbe, 0xf0, + 0xac, 0xb7, 0x62, 0x2f, 0x3f, 0xc3, 0xad, 0xd8, 0x17, 0xe7, 0xf1, 0x58, 0x3f, 0x00, 0x88, 0xe2, + 0xde, 0x9c, 0x5f, 0x1a, 0xbd, 0x0d, 0x0b, 0x03, 0xcb, 0xc6, 0x66, 0x7e, 0x48, 0x8d, 0x6e, 0x3c, + 0x77, 0x0b, 0x06, 0x0c, 0xc6, 0xa3, 0xc8, 0x8b, 0x87, 0xb0, 0xa2, 0xe8, 0xe6, 0x6a, 0xdf, 0x9d, + 0x1c, 0xbf, 0xae, 0x65, 0x13, 0xea, 0x9c, 0x96, 0xb0, 0x3a, 0x9c, 0xfd, 0xa9, 0x02, 0x17, 0xf3, + 0x9a, 0xd1, 0x0e, 0xbc, 0x70, 0x88, 0x02, 0xab, 0x67, 0xa2, 0xc4, 0x57, 0x42, 0xe6, 0xb8, 0xe6, + 0xcb, 0x45, 0xf3, 0x5a, 0xa2, 0xc2, 0x9a, 0xff, 0x55, 0x51, 0xb7, 0x60, 0x6c, 0x1e, 0x4e, 0xf8, + 0xe8, 0xe8, 0x3e, 0x74, 0x90, 0x67, 0x99, 0x9f, 0xe2, 0x51, 0xb4, 0x03, 0x97, 0x64, 0xa2, 0xae, + 0x95, 0xfc, 0xca, 0xaa, 0x5b, 0x30, 0xda, 0x28, 0xf9, 0xdd, 0xd5, 0xf7, 0x40, 0x27, 0xac, 0x2d, + 0x61, 0x5a, 0xa2, 0x21, 0x15, 0xd1, 0x2b, 0x67, 0xbb, 0xa2, 0xea, 0xde, 0x55, 0xb7, 0x60, 0xac, + 0x11, 0x75, 0x57, 0x2b, 0xa2, 0xef, 0x89, 0x5e, 0x4f, 0x44, 0xbf, 0x92, 0x47, 0x3f, 0xdd, 0x16, + 0x8a, 0xe8, 0x67, 0x1a, 0x46, 0x47, 0xb0, 0x29, 0xe8, 0xa3, 0xa8, 0x91, 0x18, 0x6d, 0xc1, 0x03, + 0xdc, 0x2b, 0xd9, 0x2d, 0x14, 0x6d, 0xc7, 0x6e, 0xc1, 0x58, 0x27, 0xb9, 0x3d, 0x49, 0x1c, 0x6d, + 0xc4, 0xba, 0xba, 0x2c, 0x5d, 0x88, 0x36, 0xaa, 0x65, 0xbd, 0x63, 0x5e, 0x0f, 0xb8, 0x5b, 0x30, + 0x84, 0x4c, 0xb2, 0xb0, 0x48, 0xc3, 0x8f, 0x23, 0x0d, 0x8f, 0xb5, 0x04, 0xb4, 0xf7, 0x27, 0x6b, + 0xf8, 0xa5, 0x9c, 0xb6, 0x11, 0xbf, 0x58, 0xa0, 0xd6, 0xea, 0xab, 0xb0, 0x10, 0xbf, 0xb9, 0xb0, + 0x1a, 0x7d, 0xdc, 0x57, 0x8e, 0xee, 0x38, 0xfc, 0xb6, 0x08, 0xe5, 0x47, 0x48, 0x7d, 0x2b, 0x62, + 0xfa, 0xc7, 0x6e, 0x19, 0xcf, 0x56, 0x3e, 0xf3, 0x37, 0x22, 0x73, 0x7d, 0xc1, 0x75, 0x05, 0x1a, + 0x32, 0xc2, 0xe4, 0x3c, 0xdf, 0xc7, 0xb0, 0xf4, 0x41, 0xaa, 0xde, 0xf4, 0x1c, 0x3f, 0x26, 0xf9, + 0x5d, 0x11, 0xca, 0x1f, 0x3a, 0xb6, 0x52, 0x7a, 0x97, 0xa0, 0x49, 0x7f, 0x03, 0x0f, 0xf5, 0xe4, + 0xbd, 0x92, 0x68, 0x82, 0x26, 0x7f, 0x9e, 0x8f, 0x07, 0xd6, 0xa9, 0xc8, 0xf2, 0xc4, 0x88, 0xae, + 0x42, 0x61, 0xe8, 0x5b, 0x87, 0xc3, 0x10, 0x8b, 0xcf, 0xf4, 0xa2, 0x09, 0x9a, 0xca, 0x3c, 0xf5, + 0x91, 0xe7, 0xe1, 0xbe, 0x38, 0x82, 0xcb, 0xe1, 0x99, 0xfb, 0x98, 0xb7, 0x5f, 0x85, 0x36, 0xf1, + 0x8f, 0x24, 0xae, 0x79, 0xb2, 0x73, 0x7b, 0x51, 0x7c, 0xbb, 0xba, 0xef, 0x93, 0x90, 0xec, 0x17, + 0x7f, 0x51, 0x2a, 0xef, 0xed, 0x1e, 0x1c, 0xd6, 0xd8, 0xc7, 0xa0, 0x6f, 0xfe, 0x33, 0x00, 0x00, + 0xff, 0xff, 0xdc, 0xb2, 0x46, 0x98, 0xe4, 0x3a, 0x00, 0x00, } diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto b/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.proto similarity index 100% rename from vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto rename to vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.proto diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md b/vendor/github.com/googleapis/gnostic/openapiv2/README.md similarity index 100% rename from vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md rename to vendor/github.com/googleapis/gnostic/openapiv2/README.md diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json b/vendor/github.com/googleapis/gnostic/openapiv2/openapi-2.0.json similarity index 100% rename from vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json rename to vendor/github.com/googleapis/gnostic/openapiv2/openapi-2.0.json diff --git a/vendor/github.com/hashicorp/errwrap/README.md b/vendor/github.com/hashicorp/errwrap/README.md index 1c95f59782b..444df08f8e7 100644 --- a/vendor/github.com/hashicorp/errwrap/README.md +++ b/vendor/github.com/hashicorp/errwrap/README.md @@ -48,7 +48,7 @@ func main() { // We can use the Contains helpers to check if an error contains // another error. It is safe to do this with a nil error, or with // an error that doesn't even use the errwrap package. - if errwrap.Contains(err, ErrNotExist) { + if errwrap.Contains(err, "does not exist") { // Do something } if errwrap.ContainsType(err, new(os.PathError)) { diff --git a/vendor/github.com/hashicorp/errwrap/go.mod b/vendor/github.com/hashicorp/errwrap/go.mod new file mode 100644 index 00000000000..c9b84022cf7 --- /dev/null +++ b/vendor/github.com/hashicorp/errwrap/go.mod @@ -0,0 +1 @@ +module github.com/hashicorp/errwrap diff --git a/vendor/github.com/hashicorp/go-multierror/.travis.yml b/vendor/github.com/hashicorp/go-multierror/.travis.yml index 4b865d194a6..304a8359558 100644 --- a/vendor/github.com/hashicorp/go-multierror/.travis.yml +++ b/vendor/github.com/hashicorp/go-multierror/.travis.yml @@ -3,7 +3,7 @@ sudo: false language: go go: - - 1.6 + - 1.x branches: only: diff --git a/vendor/github.com/hashicorp/go-multierror/format.go b/vendor/github.com/hashicorp/go-multierror/format.go index 6c7a3cc91de..47f13c49a67 100644 --- a/vendor/github.com/hashicorp/go-multierror/format.go +++ b/vendor/github.com/hashicorp/go-multierror/format.go @@ -13,7 +13,7 @@ type ErrorFormatFunc func([]error) string // that occurred along with a bullet point list of the errors. func ListFormatFunc(es []error) string { if len(es) == 1 { - return fmt.Sprintf("1 error occurred:\n\n* %s", es[0]) + return fmt.Sprintf("1 error occurred:\n\t* %s\n\n", es[0]) } points := make([]string, len(es)) @@ -22,6 +22,6 @@ func ListFormatFunc(es []error) string { } return fmt.Sprintf( - "%d errors occurred:\n\n%s", - len(es), strings.Join(points, "\n")) + "%d errors occurred:\n\t%s\n\n", + len(es), strings.Join(points, "\n\t")) } diff --git a/vendor/github.com/hashicorp/go-multierror/go.mod b/vendor/github.com/hashicorp/go-multierror/go.mod new file mode 100644 index 00000000000..2534331d5f9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/go.mod @@ -0,0 +1,3 @@ +module github.com/hashicorp/go-multierror + +require github.com/hashicorp/errwrap v1.0.0 diff --git a/vendor/github.com/hashicorp/go-multierror/go.sum b/vendor/github.com/hashicorp/go-multierror/go.sum new file mode 100644 index 00000000000..85b1f8ff333 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/go.sum @@ -0,0 +1,4 @@ +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce h1:prjrVgOk2Yg6w+PflHoszQNLTUh4kaByUcEWM/9uin4= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= diff --git a/vendor/github.com/hashicorp/go-multierror/multierror.go b/vendor/github.com/hashicorp/go-multierror/multierror.go index 2ea08273290..89b1422d1d1 100644 --- a/vendor/github.com/hashicorp/go-multierror/multierror.go +++ b/vendor/github.com/hashicorp/go-multierror/multierror.go @@ -40,11 +40,11 @@ func (e *Error) GoString() string { } // WrappedErrors returns the list of errors that this Error is wrapping. -// It is an implementatin of the errwrap.Wrapper interface so that +// It is an implementation of the errwrap.Wrapper interface so that // multierror.Error can be used with that library. // // This method is not safe to be called concurrently and is no different -// than accessing the Errors field directly. It is implementd only to +// than accessing the Errors field directly. It is implemented only to // satisfy the errwrap.Wrapper interface. func (e *Error) WrappedErrors() []error { return e.Errors diff --git a/vendor/github.com/hashicorp/go-multierror/sort.go b/vendor/github.com/hashicorp/go-multierror/sort.go new file mode 100644 index 00000000000..fecb14e81c5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-multierror/sort.go @@ -0,0 +1,16 @@ +package multierror + +// Len implements sort.Interface function for length +func (err Error) Len() int { + return len(err.Errors) +} + +// Swap implements sort.Interface function for swapping elements +func (err Error) Swap(i, j int) { + err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i] +} + +// Less implements sort.Interface function for determining order +func (err Error) Less(i, j int) bool { + return err.Errors[i].Error() < err.Errors[j].Error() +} diff --git a/vendor/github.com/imdario/mergo/.travis.yml b/vendor/github.com/imdario/mergo/.travis.yml index b13a50ed1fb..dad29725f86 100644 --- a/vendor/github.com/imdario/mergo/.travis.yml +++ b/vendor/github.com/imdario/mergo/.travis.yml @@ -4,4 +4,6 @@ install: - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls script: + - go test -race -v ./... +after_script: - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN diff --git a/vendor/github.com/imdario/mergo/merge.go b/vendor/github.com/imdario/mergo/merge.go index f8de6c54305..3fb6c64d05b 100644 --- a/vendor/github.com/imdario/mergo/merge.go +++ b/vendor/github.com/imdario/mergo/merge.go @@ -26,10 +26,12 @@ func hasExportedField(dst reflect.Value) (exported bool) { } type Config struct { - Overwrite bool - AppendSlice bool - Transformers Transformers - overwriteWithEmptyValue bool + Overwrite bool + AppendSlice bool + TypeCheck bool + Transformers Transformers + overwriteWithEmptyValue bool + overwriteSliceWithEmptyValue bool } type Transformers interface { @@ -41,7 +43,9 @@ type Transformers interface { // short circuiting on recursive types. func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { overwrite := config.Overwrite + typeCheck := config.TypeCheck overwriteWithEmptySrc := config.overwriteWithEmptyValue + overwriteSliceWithEmptySrc := config.overwriteSliceWithEmptyValue config.overwriteWithEmptyValue = false if !src.IsValid() { @@ -128,11 +132,14 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co dstSlice = reflect.ValueOf(dstElement.Interface()) } - if (!isEmptyValue(src) || overwriteWithEmptySrc) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice { + if (!isEmptyValue(src) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice { + if typeCheck && srcSlice.Type() != dstSlice.Type() { + return fmt.Errorf("cannot override two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) + } dstSlice = srcSlice } else if config.AppendSlice { if srcSlice.Type() != dstSlice.Type() { - return fmt.Errorf("cannot append two slice with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) + return fmt.Errorf("cannot append two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) } dstSlice = reflect.AppendSlice(dstSlice, srcSlice) } @@ -143,7 +150,7 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co continue } - if srcElement.IsValid() && (overwrite || (!dstElement.IsValid() || isEmptyValue(dstElement))) { + if srcElement.IsValid() && ((srcElement.Kind() != reflect.Ptr && overwrite) || !dstElement.IsValid() || isEmptyValue(dstElement)) { if dst.IsNil() { dst.Set(reflect.MakeMap(dst.Type())) } @@ -154,7 +161,7 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co if !dst.CanSet() { break } - if (!isEmptyValue(src) || overwriteWithEmptySrc) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice { + if (!isEmptyValue(src) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice { dst.Set(src) } else if config.AppendSlice { if src.Type() != dst.Type() { @@ -168,11 +175,21 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co if src.IsNil() { break } - if src.Kind() != reflect.Interface { + + if dst.Kind() != reflect.Ptr && src.Type().AssignableTo(dst.Type()) { if dst.IsNil() || overwrite { if dst.CanSet() && (overwrite || isEmptyValue(dst)) { dst.Set(src) } + } + break + } + + if src.Kind() != reflect.Interface { + if dst.IsNil() || (src.Kind() != reflect.Ptr && overwrite) { + if dst.CanSet() && (overwrite || isEmptyValue(dst)) { + dst.Set(src) + } } else if src.Kind() == reflect.Ptr { if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { return @@ -198,6 +215,7 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co dst.Set(src) } } + return } @@ -209,7 +227,7 @@ func Merge(dst, src interface{}, opts ...func(*Config)) error { return merge(dst, src, opts...) } -// MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overriden by +// MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overridden by // non-empty src attribute values. // Deprecated: use Merge(…) with WithOverride func MergeWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { @@ -228,11 +246,21 @@ func WithOverride(config *Config) { config.Overwrite = true } -// WithAppendSlice will make merge append slices instead of overwriting it +// WithOverride will make merge override empty dst slice with empty src slice. +func WithOverrideEmptySlice(config *Config) { + config.overwriteSliceWithEmptyValue = true +} + +// WithAppendSlice will make merge append slices instead of overwriting it. func WithAppendSlice(config *Config) { config.AppendSlice = true } +// WithTypeCheck will make merge check types while overwriting it (must be used with WithOverride). +func WithTypeCheck(config *Config) { + config.TypeCheck = true +} + func merge(dst, src interface{}, opts ...func(*Config)) error { var ( vDst, vSrc reflect.Value diff --git a/vendor/github.com/json-iterator/go/README.md b/vendor/github.com/json-iterator/go/README.md index 50d56ffbf07..52b111d5f36 100644 --- a/vendor/github.com/json-iterator/go/README.md +++ b/vendor/github.com/json-iterator/go/README.md @@ -1,5 +1,5 @@ [![Sourcegraph](https://sourcegraph.com/github.com/json-iterator/go/-/badge.svg)](https://sourcegraph.com/github.com/json-iterator/go?badge) -[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/json-iterator/go) +[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://pkg.go.dev/github.com/json-iterator/go) [![Build Status](https://travis-ci.org/json-iterator/go.svg?branch=master)](https://travis-ci.org/json-iterator/go) [![codecov](https://codecov.io/gh/json-iterator/go/branch/master/graph/badge.svg)](https://codecov.io/gh/json-iterator/go) [![rcard](https://goreportcard.com/badge/github.com/json-iterator/go)](https://goreportcard.com/report/github.com/json-iterator/go) @@ -18,16 +18,16 @@ Source code: https://github.com/json-iterator/go-benchmark/blob/master/src/githu Raw Result (easyjson requires static code generation) -| | ns/op | allocation bytes | allocation times | -| --- | --- | --- | --- | -| std decode | 35510 ns/op | 1960 B/op | 99 allocs/op | -| easyjson decode | 8499 ns/op | 160 B/op | 4 allocs/op | -| jsoniter decode | 5623 ns/op | 160 B/op | 3 allocs/op | -| std encode | 2213 ns/op | 712 B/op | 5 allocs/op | -| easyjson encode | 883 ns/op | 576 B/op | 3 allocs/op | -| jsoniter encode | 837 ns/op | 384 B/op | 4 allocs/op | +| | ns/op | allocation bytes | allocation times | +| --------------- | ----------- | ---------------- | ---------------- | +| std decode | 35510 ns/op | 1960 B/op | 99 allocs/op | +| easyjson decode | 8499 ns/op | 160 B/op | 4 allocs/op | +| jsoniter decode | 5623 ns/op | 160 B/op | 3 allocs/op | +| std encode | 2213 ns/op | 712 B/op | 5 allocs/op | +| easyjson encode | 883 ns/op | 576 B/op | 3 allocs/op | +| jsoniter encode | 837 ns/op | 384 B/op | 4 allocs/op | -Always benchmark with your own workload. +Always benchmark with your own workload. The result depends heavily on the data input. # Usage @@ -41,10 +41,10 @@ import "encoding/json" json.Marshal(&data) ``` -with +with ```go -import "github.com/json-iterator/go" +import jsoniter "github.com/json-iterator/go" var json = jsoniter.ConfigCompatibleWithStandardLibrary json.Marshal(&data) @@ -60,7 +60,7 @@ json.Unmarshal(input, &data) with ```go -import "github.com/json-iterator/go" +import jsoniter "github.com/json-iterator/go" var json = jsoniter.ConfigCompatibleWithStandardLibrary json.Unmarshal(input, &data) @@ -78,10 +78,10 @@ go get github.com/json-iterator/go Contributors -* [thockin](https://github.com/thockin) -* [mattn](https://github.com/mattn) -* [cch123](https://github.com/cch123) -* [Oleg Shaldybin](https://github.com/olegshaldybin) -* [Jason Toffaletti](https://github.com/toffaletti) +- [thockin](https://github.com/thockin) +- [mattn](https://github.com/mattn) +- [cch123](https://github.com/cch123) +- [Oleg Shaldybin](https://github.com/olegshaldybin) +- [Jason Toffaletti](https://github.com/toffaletti) Report issue or pull request, or email taowen@gmail.com, or [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/json-iterator/Lobby) diff --git a/vendor/github.com/json-iterator/go/any_str.go b/vendor/github.com/json-iterator/go/any_str.go index a4b93c78c82..1f12f6612de 100644 --- a/vendor/github.com/json-iterator/go/any_str.go +++ b/vendor/github.com/json-iterator/go/any_str.go @@ -64,7 +64,6 @@ func (any *stringAny) ToInt64() int64 { flag := 1 startPos := 0 - endPos := 0 if any.val[0] == '+' || any.val[0] == '-' { startPos = 1 } @@ -73,6 +72,7 @@ func (any *stringAny) ToInt64() int64 { flag = -1 } + endPos := startPos for i := startPos; i < len(any.val); i++ { if any.val[i] >= '0' && any.val[i] <= '9' { endPos = i + 1 @@ -98,7 +98,6 @@ func (any *stringAny) ToUint64() uint64 { } startPos := 0 - endPos := 0 if any.val[0] == '-' { return 0 @@ -107,6 +106,7 @@ func (any *stringAny) ToUint64() uint64 { startPos = 1 } + endPos := startPos for i := startPos; i < len(any.val); i++ { if any.val[i] >= '0' && any.val[i] <= '9' { endPos = i + 1 diff --git a/vendor/github.com/json-iterator/go/config.go b/vendor/github.com/json-iterator/go/config.go index 8c58fcba592..2adcdc3b790 100644 --- a/vendor/github.com/json-iterator/go/config.go +++ b/vendor/github.com/json-iterator/go/config.go @@ -183,11 +183,11 @@ func (cfg *frozenConfig) validateJsonRawMessage(extension EncoderExtension) { encoder := &funcEncoder{func(ptr unsafe.Pointer, stream *Stream) { rawMessage := *(*json.RawMessage)(ptr) iter := cfg.BorrowIterator([]byte(rawMessage)) + defer cfg.ReturnIterator(iter) iter.Read() - if iter.Error != nil { + if iter.Error != nil && iter.Error != io.EOF { stream.WriteRaw("null") } else { - cfg.ReturnIterator(iter) stream.WriteRaw(string(rawMessage)) } }, func(ptr unsafe.Pointer) bool { diff --git a/vendor/github.com/json-iterator/go/iter_object.go b/vendor/github.com/json-iterator/go/iter_object.go index b65137114f6..58ee89c849e 100644 --- a/vendor/github.com/json-iterator/go/iter_object.go +++ b/vendor/github.com/json-iterator/go/iter_object.go @@ -150,7 +150,7 @@ func (iter *Iterator) ReadObjectCB(callback func(*Iterator, string) bool) bool { if c == '}' { return iter.decrementDepth() } - iter.ReportError("ReadObjectCB", `expect " after }, but found `+string([]byte{c})) + iter.ReportError("ReadObjectCB", `expect " after {, but found `+string([]byte{c})) iter.decrementDepth() return false } @@ -206,7 +206,7 @@ func (iter *Iterator) ReadMapCB(callback func(*Iterator, string) bool) bool { if c == '}' { return iter.decrementDepth() } - iter.ReportError("ReadMapCB", `expect " after }, but found `+string([]byte{c})) + iter.ReportError("ReadMapCB", `expect " after {, but found `+string([]byte{c})) iter.decrementDepth() return false } diff --git a/vendor/github.com/json-iterator/go/reflect_extension.go b/vendor/github.com/json-iterator/go/reflect_extension.go index e27e8d19179..74a97bfe5ab 100644 --- a/vendor/github.com/json-iterator/go/reflect_extension.go +++ b/vendor/github.com/json-iterator/go/reflect_extension.go @@ -341,7 +341,7 @@ func describeStruct(ctx *ctx, typ reflect2.Type) *StructDescriptor { if ctx.onlyTaggedField && !hastag && !field.Anonymous() { continue } - if tag == "-" { + if tag == "-" || field.Name() == "_" { continue } tagParts := strings.Split(tag, ",") @@ -475,7 +475,7 @@ func calcFieldNames(originalFieldName string, tagProvidedFieldName string, whole fieldNames = []string{tagProvidedFieldName} } // private? - isNotExported := unicode.IsLower(rune(originalFieldName[0])) + isNotExported := unicode.IsLower(rune(originalFieldName[0])) || originalFieldName[0] == '_' if isNotExported { fieldNames = []string{} } diff --git a/vendor/github.com/json-iterator/go/reflect_map.go b/vendor/github.com/json-iterator/go/reflect_map.go index 08e9a391251..58296713013 100644 --- a/vendor/github.com/json-iterator/go/reflect_map.go +++ b/vendor/github.com/json-iterator/go/reflect_map.go @@ -49,6 +49,33 @@ func decoderOfMapKey(ctx *ctx, typ reflect2.Type) ValDecoder { return decoder } } + + ptrType := reflect2.PtrTo(typ) + if ptrType.Implements(unmarshalerType) { + return &referenceDecoder{ + &unmarshalerDecoder{ + valType: ptrType, + }, + } + } + if typ.Implements(unmarshalerType) { + return &unmarshalerDecoder{ + valType: typ, + } + } + if ptrType.Implements(textUnmarshalerType) { + return &referenceDecoder{ + &textUnmarshalerDecoder{ + valType: ptrType, + }, + } + } + if typ.Implements(textUnmarshalerType) { + return &textUnmarshalerDecoder{ + valType: typ, + } + } + switch typ.Kind() { case reflect.String: return decoderOfType(ctx, reflect2.DefaultTypeOfKind(reflect.String)) @@ -63,31 +90,6 @@ func decoderOfMapKey(ctx *ctx, typ reflect2.Type) ValDecoder { typ = reflect2.DefaultTypeOfKind(typ.Kind()) return &numericMapKeyDecoder{decoderOfType(ctx, typ)} default: - ptrType := reflect2.PtrTo(typ) - if ptrType.Implements(unmarshalerType) { - return &referenceDecoder{ - &unmarshalerDecoder{ - valType: ptrType, - }, - } - } - if typ.Implements(unmarshalerType) { - return &unmarshalerDecoder{ - valType: typ, - } - } - if ptrType.Implements(textUnmarshalerType) { - return &referenceDecoder{ - &textUnmarshalerDecoder{ - valType: ptrType, - }, - } - } - if typ.Implements(textUnmarshalerType) { - return &textUnmarshalerDecoder{ - valType: typ, - } - } return &lazyErrorDecoder{err: fmt.Errorf("unsupported map key type: %v", typ)} } } @@ -103,6 +105,19 @@ func encoderOfMapKey(ctx *ctx, typ reflect2.Type) ValEncoder { return encoder } } + + if typ == textMarshalerType { + return &directTextMarshalerEncoder{ + stringEncoder: ctx.EncoderOf(reflect2.TypeOf("")), + } + } + if typ.Implements(textMarshalerType) { + return &textMarshalerEncoder{ + valType: typ, + stringEncoder: ctx.EncoderOf(reflect2.TypeOf("")), + } + } + switch typ.Kind() { case reflect.String: return encoderOfType(ctx, reflect2.DefaultTypeOfKind(reflect.String)) @@ -117,17 +132,6 @@ func encoderOfMapKey(ctx *ctx, typ reflect2.Type) ValEncoder { typ = reflect2.DefaultTypeOfKind(typ.Kind()) return &numericMapKeyEncoder{encoderOfType(ctx, typ)} default: - if typ == textMarshalerType { - return &directTextMarshalerEncoder{ - stringEncoder: ctx.EncoderOf(reflect2.TypeOf("")), - } - } - if typ.Implements(textMarshalerType) { - return &textMarshalerEncoder{ - valType: typ, - stringEncoder: ctx.EncoderOf(reflect2.TypeOf("")), - } - } if typ.Kind() == reflect.Interface { return &dynamicMapKeyEncoder{ctx, typ} } @@ -163,10 +167,6 @@ func (decoder *mapDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { if c == '}' { return } - if c != '"' { - iter.ReportError("ReadMapCB", `expect " after }, but found `+string([]byte{c})) - return - } iter.unreadByte() key := decoder.keyType.UnsafeNew() decoder.keyDecoder.Decode(key, iter) @@ -290,16 +290,17 @@ func (encoder *sortKeysMapEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { stream.WriteObjectStart() mapIter := encoder.mapType.UnsafeIterate(ptr) subStream := stream.cfg.BorrowStream(nil) + subStream.Attachment = stream.Attachment subIter := stream.cfg.BorrowIterator(nil) keyValues := encodedKeyValues{} for mapIter.HasNext() { - subStream.buf = make([]byte, 0, 64) key, elem := mapIter.UnsafeNext() + subStreamIndex := subStream.Buffered() encoder.keyEncoder.Encode(key, subStream) if subStream.Error != nil && subStream.Error != io.EOF && stream.Error == nil { stream.Error = subStream.Error } - encodedKey := subStream.Buffer() + encodedKey := subStream.Buffer()[subStreamIndex:] subIter.ResetBytes(encodedKey) decodedKey := subIter.ReadString() if stream.indention > 0 { @@ -310,7 +311,7 @@ func (encoder *sortKeysMapEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { encoder.elemEncoder.Encode(elem, subStream) keyValues = append(keyValues, encodedKV{ key: decodedKey, - keyValue: subStream.Buffer(), + keyValue: subStream.Buffer()[subStreamIndex:], }) } sort.Sort(keyValues) @@ -320,6 +321,9 @@ func (encoder *sortKeysMapEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { } stream.Write(keyValue.keyValue) } + if subStream.Error != nil && stream.Error == nil { + stream.Error = subStream.Error + } stream.WriteObjectEnd() stream.cfg.ReturnStream(subStream) stream.cfg.ReturnIterator(subIter) diff --git a/vendor/github.com/json-iterator/go/reflect_optional.go b/vendor/github.com/json-iterator/go/reflect_optional.go index 43ec71d6dad..fa71f474891 100644 --- a/vendor/github.com/json-iterator/go/reflect_optional.go +++ b/vendor/github.com/json-iterator/go/reflect_optional.go @@ -2,7 +2,6 @@ package jsoniter import ( "github.com/modern-go/reflect2" - "reflect" "unsafe" ) @@ -10,9 +9,6 @@ func decoderOfOptional(ctx *ctx, typ reflect2.Type) ValDecoder { ptrType := typ.(*reflect2.UnsafePtrType) elemType := ptrType.Elem() decoder := decoderOfType(ctx, elemType) - if ctx.prefix == "" && elemType.Kind() == reflect.Ptr { - return &dereferenceDecoder{elemType, decoder} - } return &OptionalDecoder{elemType, decoder} } diff --git a/vendor/github.com/json-iterator/go/reflect_struct_decoder.go b/vendor/github.com/json-iterator/go/reflect_struct_decoder.go index 5ad5cc561af..d7eb0eb5caa 100644 --- a/vendor/github.com/json-iterator/go/reflect_struct_decoder.go +++ b/vendor/github.com/json-iterator/go/reflect_struct_decoder.go @@ -507,7 +507,7 @@ func (decoder *generalStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) for c = ','; c == ','; c = iter.nextToken() { decoder.decodeOneField(ptr, iter) } - if iter.Error != nil && iter.Error != io.EOF { + if iter.Error != nil && iter.Error != io.EOF && len(decoder.typ.Type1().Name()) != 0 { iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) } if c != '}' { @@ -588,7 +588,7 @@ func (decoder *oneFieldStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) break } } - if iter.Error != nil && iter.Error != io.EOF { + if iter.Error != nil && iter.Error != io.EOF && len(decoder.typ.Type1().Name()) != 0 { iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) } iter.decrementDepth() @@ -622,7 +622,7 @@ func (decoder *twoFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator break } } - if iter.Error != nil && iter.Error != io.EOF { + if iter.Error != nil && iter.Error != io.EOF && len(decoder.typ.Type1().Name()) != 0 { iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) } iter.decrementDepth() @@ -660,7 +660,7 @@ func (decoder *threeFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterat break } } - if iter.Error != nil && iter.Error != io.EOF { + if iter.Error != nil && iter.Error != io.EOF && len(decoder.typ.Type1().Name()) != 0 { iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) } iter.decrementDepth() @@ -702,7 +702,7 @@ func (decoder *fourFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterato break } } - if iter.Error != nil && iter.Error != io.EOF { + if iter.Error != nil && iter.Error != io.EOF && len(decoder.typ.Type1().Name()) != 0 { iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) } iter.decrementDepth() @@ -748,7 +748,7 @@ func (decoder *fiveFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterato break } } - if iter.Error != nil && iter.Error != io.EOF { + if iter.Error != nil && iter.Error != io.EOF && len(decoder.typ.Type1().Name()) != 0 { iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) } iter.decrementDepth() @@ -798,7 +798,7 @@ func (decoder *sixFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator break } } - if iter.Error != nil && iter.Error != io.EOF { + if iter.Error != nil && iter.Error != io.EOF && len(decoder.typ.Type1().Name()) != 0 { iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) } iter.decrementDepth() @@ -852,7 +852,7 @@ func (decoder *sevenFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterat break } } - if iter.Error != nil && iter.Error != io.EOF { + if iter.Error != nil && iter.Error != io.EOF && len(decoder.typ.Type1().Name()) != 0 { iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) } iter.decrementDepth() @@ -910,7 +910,7 @@ func (decoder *eightFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterat break } } - if iter.Error != nil && iter.Error != io.EOF { + if iter.Error != nil && iter.Error != io.EOF && len(decoder.typ.Type1().Name()) != 0 { iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) } iter.decrementDepth() @@ -972,7 +972,7 @@ func (decoder *nineFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterato break } } - if iter.Error != nil && iter.Error != io.EOF { + if iter.Error != nil && iter.Error != io.EOF && len(decoder.typ.Type1().Name()) != 0 { iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) } iter.decrementDepth() @@ -1038,7 +1038,7 @@ func (decoder *tenFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator break } } - if iter.Error != nil && iter.Error != io.EOF { + if iter.Error != nil && iter.Error != io.EOF && len(decoder.typ.Type1().Name()) != 0 { iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) } iter.decrementDepth() diff --git a/vendor/github.com/json-iterator/go/reflect_struct_encoder.go b/vendor/github.com/json-iterator/go/reflect_struct_encoder.go index d0759cf6418..152e3ef5a93 100644 --- a/vendor/github.com/json-iterator/go/reflect_struct_encoder.go +++ b/vendor/github.com/json-iterator/go/reflect_struct_encoder.go @@ -200,6 +200,7 @@ type stringModeStringEncoder struct { func (encoder *stringModeStringEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { tempStream := encoder.cfg.BorrowStream(nil) + tempStream.Attachment = stream.Attachment defer encoder.cfg.ReturnStream(tempStream) encoder.elemEncoder.Encode(ptr, tempStream) stream.WriteString(string(tempStream.Buffer())) diff --git a/vendor/github.com/json-iterator/go/stream.go b/vendor/github.com/json-iterator/go/stream.go index 17662fdedcb..23d8a3ad6b1 100644 --- a/vendor/github.com/json-iterator/go/stream.go +++ b/vendor/github.com/json-iterator/go/stream.go @@ -103,14 +103,14 @@ func (stream *Stream) Flush() error { if stream.Error != nil { return stream.Error } - n, err := stream.out.Write(stream.buf) + _, err := stream.out.Write(stream.buf) if err != nil { if stream.Error == nil { stream.Error = err } return err } - stream.buf = stream.buf[n:] + stream.buf = stream.buf[:0] return nil } @@ -177,7 +177,6 @@ func (stream *Stream) WriteEmptyObject() { func (stream *Stream) WriteMore() { stream.writeByte(',') stream.writeIndention(0) - stream.Flush() } // WriteArrayStart write [ with possible indention diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/attach.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/attach.go index 6123f6d8f32..c1f4c73dc74 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/attach.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/attach.go @@ -20,6 +20,7 @@ import ( "fmt" "net/url" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" "golang.org/x/net/context" @@ -62,7 +63,7 @@ var runtimeAttachCommand = &cli.Command{ } err = Attach(runtimeClient, opts) if err != nil { - return fmt.Errorf("attaching running container failed: %v", err) + return errors.Wrap(err, "attaching running container failed") } return nil diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/config.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/config.go index 5896314f460..99870bfd61b 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/config.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/config.go @@ -18,73 +18,53 @@ package crictl import ( "fmt" - "io/ioutil" "os" - gofilepath "path/filepath" "strconv" + "strings" - "github.com/sirupsen/logrus" + "github.com/pkg/errors" "github.com/urfave/cli/v2" - "gopkg.in/yaml.v2" + + "github.com/kubernetes-sigs/cri-tools/pkg/common" ) -// Config is the internal representation of the yaml that determines how -// the app start -type Config struct { - RuntimeEndpoint string `yaml:"runtime-endpoint"` - ImageEndpoint string `yaml:"image-endpoint"` - Timeout int `yaml:"timeout"` - Debug bool `yaml:"debug"` -} - -// ReadConfig reads from a file with the given name and returns a config or -// an error if the file was unable to be parsed. -func ReadConfig(filepath string) (*Config, error) { - data, err := ioutil.ReadFile(filepath) - if err != nil { - return nil, err - } - config := Config{} - err = yaml.Unmarshal(data, &config) - if err != nil { - return nil, err - } - return &config, err -} - -func writeConfig(c *Config, filepath string) error { - data, err := yaml.Marshal(c) - if err != nil { - return err - } - if err := os.MkdirAll(gofilepath.Dir(filepath), 0755); err != nil { - return err - } - return ioutil.WriteFile(filepath, data, 0644) -} - var configCommand = &cli.Command{ - Name: "config", - Usage: "Get and set crictl options", - ArgsUsage: "[]", + Name: "config", + Usage: "Get and set crictl client configuration options", + ArgsUsage: `[] + +EXAMPLE: + crictl config --set debug=true + +CRICTL OPTIONS: + runtime-endpoint: Container runtime endpoint + image-endpoint: Image endpoint + timeout: Timeout of connecting to server (default: 2s) + debug: Enable debug output (default: false) + pull-image-on-create: Enable pulling image on create requests (default: false) + disable-pull-on-run: Disable pulling image on run requests (default: false)`, UseShortOptionHandling: true, Flags: []cli.Flag{ &cli.StringFlag{ Name: "get", - Usage: "get value: name", + Usage: "show the option value", + }, + &cli.StringSliceFlag{ + Name: "set", + Usage: "set option (can specify multiple or separate values with commas: opt1=val1,opt2=val2)", }, }, Action: func(context *cli.Context) error { configFile := context.String("config") if _, err := os.Stat(configFile); err != nil { - if err := writeConfig(nil, configFile); err != nil { + if err := common.WriteConfig(nil, configFile); err != nil { return err } } // Get config from file. - config, err := ReadConfig(configFile) + config, err := common.ReadConfig(configFile) if err != nil { - return fmt.Errorf("Failed to load config file: %v", err) + return errors.Wrap(err, "load config file") } if context.IsSet("get") { get := context.String("get") @@ -97,41 +77,77 @@ var configCommand = &cli.Command{ fmt.Println(config.Timeout) case "debug": fmt.Println(config.Debug) + case "pull-image-on-create": + fmt.Println(config.PullImageOnCreate) + case "disable-pull-on-run": + fmt.Println(config.DisablePullOnRun) default: - logrus.Fatalf("No section named %s", get) + return errors.Errorf("no configuration option named %s", get) } return nil - } - key := context.Args().First() - if key == "" { - return cli.ShowSubcommandHelp(context) - } - value := context.Args().Get(1) - switch key { - case "runtime-endpoint": - config.RuntimeEndpoint = value - case "image-endpoint": - config.ImageEndpoint = value - case "timeout": - n, err := strconv.Atoi(value) - if err != nil { - logrus.Fatal(err) + } else if context.IsSet("set") { + settings := context.StringSlice("set") + for _, setting := range settings { + options := strings.Split(setting, ",") + for _, option := range options { + pair := strings.Split(option, "=") + if len(pair) != 2 { + return errors.Errorf("incorrectly specified option: %v", setting) + } + key := pair[0] + value := pair[1] + if err := setValue(key, value, config); err != nil { + return err + } + } } - config.Timeout = n - case "debug": - var debug bool - if value == "true" { - debug = true - } else if value == "false" { - debug = false - } else { - logrus.Fatal("use true|false for debug") + return common.WriteConfig(config, configFile) + } else { // default for backwards compatibility + key := context.Args().First() + if key == "" { + return cli.ShowSubcommandHelp(context) } - config.Debug = debug - default: - logrus.Fatalf("No section named %s", key) + value := context.Args().Get(1) + if err := setValue(key, value, config); err != nil { + return err + } + return common.WriteConfig(config, configFile) } - - return writeConfig(config, configFile) }, } + +func setValue(key, value string, config *common.Config) error { + switch key { + case "runtime-endpoint": + config.RuntimeEndpoint = value + case "image-endpoint": + config.ImageEndpoint = value + case "timeout": + n, err := strconv.Atoi(value) + if err != nil { + return errors.Wrapf(err, "parse timeout value '%s'", value) + } + config.Timeout = n + case "debug": + debug, err := strconv.ParseBool(value) + if err != nil { + return errors.Wrapf(err, "parse debug value '%s'", value) + } + config.Debug = debug + case "pull-image-on-create": + pi, err := strconv.ParseBool(value) + if err != nil { + return errors.Wrapf(err, "parse pull-image-on-create value '%s'", value) + } + config.PullImageOnCreate = pi + case "disable-pull-on-run": + pi, err := strconv.ParseBool(value) + if err != nil { + return errors.Wrapf(err, "parse disable-pull-on-run value '%s'", value) + } + config.DisablePullOnRun = pi + default: + return errors.Errorf("no configuration option named %s", key) + } + return nil +} diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/container.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/container.go index c51066746d8..46830aff88b 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/container.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/container.go @@ -26,9 +26,11 @@ import ( "github.com/docker/go-units" godigest "github.com/opencontainers/go-digest" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" "golang.org/x/net/context" + "google.golang.org/grpc" pb "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ) @@ -60,8 +62,8 @@ type runOptions struct { } type pullOptions struct { - // do not pull the image on container creation - dontPull bool + // pull the image on container creation; overrides default + withPull bool // creds is string in the format `USERNAME[:PASSWORD]` for accessing the // registry during image pull @@ -72,10 +74,35 @@ type pullOptions struct { auth string } -var pullFlags = []cli.Flag{ +var createPullFlags = []cli.Flag{ &cli.BoolFlag{ Name: "no-pull", - Usage: "Do not pull the image on container creation", + Usage: "Do not pull the image on container creation (overrides pull-image-on-create=true in config)", + }, + &cli.BoolFlag{ + Name: "with-pull", + Usage: "Pull the image on container creation (overrides pull-image-on-create=false in config)", + }, + &cli.StringFlag{ + Name: "creds", + Value: "", + Usage: "Use `USERNAME[:PASSWORD]` for accessing the registry", + }, + &cli.StringFlag{ + Name: "auth", + Value: "", + Usage: "Use `AUTH_STRING` for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]'", + }, +} + +var runPullFlags = []cli.Flag{ + &cli.BoolFlag{ + Name: "no-pull", + Usage: "Do not pull the image (overrides disable-pull-on-run=false in config)", + }, + &cli.BoolFlag{ + Name: "with-pull", + Usage: "Pull the image (overrides disable-pull-on-run=true in config)", }, &cli.StringFlag{ Name: "creds", @@ -93,12 +120,15 @@ var createContainerCommand = &cli.Command{ Name: "create", Usage: "Create a new container", ArgsUsage: "POD container-config.[json|yaml] pod-config.[json|yaml]", - Flags: pullFlags, + Flags: createPullFlags, Action: func(context *cli.Context) error { if context.Args().Len() != 3 { return cli.ShowSubcommandHelp(context) } + if context.Bool("no-pull") == true && context.Bool("with-pull") == true { + return errors.New("confict: no-pull and with-pull are both set") + } runtimeClient, runtimeConn, err := getRuntimeClient(context) if err != nil { @@ -106,11 +136,18 @@ var createContainerCommand = &cli.Command{ } defer closeConnection(context, runtimeConn) - imageClient, imageConn, err := getImageClient(context) - if err != nil { - return err + withPull := (!context.Bool("no-pull") && PullImageOnCreate) || context.Bool("with-pull") + + var imageClient pb.ImageServiceClient + var imageConn *grpc.ClientConn + + if withPull { + imageClient, imageConn, err = getImageClient(context) + if err != nil { + return err + } + defer closeConnection(context, imageConn) } - defer closeConnection(context, imageConn) opts := createOptions{ podID: context.Args().Get(0), @@ -118,7 +155,7 @@ var createContainerCommand = &cli.Command{ configPath: context.Args().Get(1), podConfig: context.Args().Get(2), pullOptions: &pullOptions{ - dontPull: context.Bool("no-pull"), + withPull: withPull, creds: context.String("creds"), auth: context.String("auth"), }, @@ -127,7 +164,7 @@ var createContainerCommand = &cli.Command{ ctrID, err := CreateContainer(imageClient, runtimeClient, opts) if err != nil { - return fmt.Errorf("Creating container failed: %v", err) + return errors.Wrap(err, "creating container") } fmt.Println(ctrID) return nil @@ -152,7 +189,7 @@ var startContainerCommand = &cli.Command{ containerID := context.Args().Get(i) err := StartContainer(runtimeClient, containerID) if err != nil { - return fmt.Errorf("Starting the container %q failed: %v", containerID, err) + return errors.Wrapf(err, "starting the container %q", containerID) } } return nil @@ -212,7 +249,7 @@ var updateContainerCommand = &cli.Command{ containerID := context.Args().Get(i) err := UpdateContainerResources(runtimeClient, containerID, options) if err != nil { - return fmt.Errorf("Updating container resources for %q failed: %v", containerID, err) + return errors.Wrapf(err, "updating container resources for %q", containerID) } } return nil @@ -246,7 +283,7 @@ var stopContainerCommand = &cli.Command{ containerID := context.Args().Get(i) err := StopContainer(runtimeClient, containerID, context.Int64("timeout")) if err != nil { - return fmt.Errorf("Stopping the container %q failed: %v", containerID, err) + return errors.Wrapf(err, "stopping the container %q", containerID) } } return nil @@ -367,7 +404,7 @@ var containerStatusCommand = &cli.Command{ containerID := context.Args().Get(i) err := ContainerStatus(runtimeClient, containerID, context.String("output"), context.String("template"), context.Bool("quiet")) if err != nil { - return fmt.Errorf("Getting the status of the container %q failed: %v", containerID, err) + return errors.Wrapf(err, "getting the status of the container %q", containerID) } } return nil @@ -406,9 +443,10 @@ var listContainersCommand = &cli.Command{ Usage: "Filter by container image", }, &cli.StringFlag{ - Name: "state", - Value: "", - Usage: "Filter by container state", + Name: "state", + Aliases: []string{"s"}, + Value: "", + Usage: "Filter by container state", }, &cli.StringSliceFlag{ Name: "label", @@ -478,7 +516,7 @@ var listContainersCommand = &cli.Command{ } if err = ListContainers(runtimeClient, imageClient, opts); err != nil { - return fmt.Errorf("listing containers failed: %v", err) + return errors.Wrap(err, "listing containers") } return nil }, @@ -488,7 +526,7 @@ var runContainerCommand = &cli.Command{ Name: "run", Usage: "Run a new container inside a sandbox", ArgsUsage: "container-config.[json|yaml] pod-config.[json|yaml]", - Flags: append(pullFlags, &cli.StringFlag{ + Flags: append(runPullFlags, &cli.StringFlag{ Name: "runtime", Aliases: []string{"r"}, Usage: "Runtime handler to use. Available options are defined by the container runtime.", @@ -498,6 +536,9 @@ var runContainerCommand = &cli.Command{ if context.Args().Len() != 2 { return cli.ShowSubcommandHelp(context) } + if context.Bool("no-pull") == true && context.Bool("with-pull") == true { + return errors.New("confict: no-pull and with-pull are both set") + } runtimeClient, runtimeConn, err := getRuntimeClient(context) if err != nil { @@ -505,17 +546,26 @@ var runContainerCommand = &cli.Command{ } defer closeConnection(context, runtimeConn) - imageClient, imageConn, err := getImageClient(context) - if err != nil { - return err + withPull := (!DisablePullOnRun && !context.Bool("no-pull")) || context.Bool("with-pull") + + var ( + imageClient pb.ImageServiceClient + imageConn *grpc.ClientConn + ) + + if withPull { + imageClient, imageConn, err = getImageClient(context) + if err != nil { + return err + } + defer closeConnection(context, imageConn) } - defer closeConnection(context, imageConn) opts := runOptions{ configPath: context.Args().Get(0), podConfig: context.Args().Get(1), pullOptions: &pullOptions{ - dontPull: context.Bool("no-pull"), + withPull: withPull, creds: context.String("creds"), auth: context.String("auth"), }, @@ -523,7 +573,7 @@ var runContainerCommand = &cli.Command{ err = RunContainer(imageClient, runtimeClient, opts, context.String("runtime")) if err != nil { - return fmt.Errorf("Running container failed: %v", err) + return errors.Wrap(err, "running container") } return nil }, @@ -539,24 +589,24 @@ func RunContainer( // Create the pod podSandboxConfig, err := loadPodSandboxConfig(opts.podConfig) if err != nil { - return fmt.Errorf("load podSandboxConfig failed: %v", err) + return errors.Wrap(err, "load podSandboxConfig") } podID, err := RunPodSandbox(rClient, podSandboxConfig, runtime) if err != nil { - return fmt.Errorf("run pod sandbox failed: %v", err) + return errors.Wrap(err, "run pod sandbox") } // Create the container containerOptions := createOptions{podID, &opts} ctrID, err := CreateContainer(iClient, rClient, containerOptions) if err != nil { - return fmt.Errorf("creating container failed: %v", err) + return errors.Wrap(err, "creating container failed") } // Start the container err = StartContainer(rClient, ctrID) if err != nil { - return fmt.Errorf("starting the container %q failed: %v", ctrID, err) + return errors.Wrapf(err, "starting the container %q", ctrID) } return nil } @@ -581,7 +631,12 @@ func CreateContainer( } } - if !opts.dontPull { + // When there is a with-pull request or the image default mode is to + // pull-image-on-create(true) and no-pull was not set we pull the image when + // they ask for a create as a helper on the cli to reduce extra steps. As a + // reminder if the image is already in cache only the manifest will be pulled + // down to verify. + if opts.withPull { auth, err := getAuth(opts.creds, opts.auth) if err != nil { return "", err @@ -875,7 +930,7 @@ func ListContainers(runtimeClient pb.RuntimeServiceClient, imageClient pb.ImageS } for _, c := range r.Containers { if match, err := matchesImage(imageClient, opts.image, c.GetImage().GetImage()); err != nil { - return fmt.Errorf("failed to check image match %v", err) + return errors.Wrap(err, "check image match") } else if !match { continue } diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/display.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/display.go index 32e6f1f5029..4a24302c0d9 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/display.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/display.go @@ -24,22 +24,23 @@ import ( ) const ( - columnContainer = "CONTAINER" - columnImage = "IMAGE" - columnImageID = "IMAGE ID" - columnCreated = "CREATED" - columnState = "STATE" - columnName = "NAME" - columnAttempt = "ATTEMPT" - columnPodID = "POD ID" - columnNamespace = "NAMESPACE" - columnSize = "SIZE" - columnTag = "TAG" - columnDigest = "DIGEST" - columnMemory = "MEM" - columnInodes = "INODES" - columnDisk = "DISK" - columnCPU = "CPU %" + columnContainer = "CONTAINER" + columnImage = "IMAGE" + columnImageID = "IMAGE ID" + columnCreated = "CREATED" + columnState = "STATE" + columnName = "NAME" + columnAttempt = "ATTEMPT" + columnPodID = "POD ID" + columnPodRuntime = "RUNTIME" + columnNamespace = "NAMESPACE" + columnSize = "SIZE" + columnTag = "TAG" + columnDigest = "DIGEST" + columnMemory = "MEM" + columnInodes = "INODES" + columnDisk = "DISK" + columnCPU = "CPU %" ) // display use to output something on screen with table format. diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/exec.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/exec.go index 2d9252a9db4..6e8892fc8c2 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/exec.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/exec.go @@ -21,6 +21,7 @@ import ( "net/url" dockerterm "github.com/docker/docker/pkg/term" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" "golang.org/x/net/context" @@ -84,7 +85,7 @@ var runtimeExecCommand = &cli.Command{ if context.Bool("sync") { exitCode, err := ExecSync(runtimeClient, opts) if err != nil { - return fmt.Errorf("execing command in container synchronously failed: %v", err) + return errors.Wrap(err, "execing command in container synchronously") } if exitCode != 0 { return cli.NewExitError("non-zero exit code", exitCode) @@ -93,7 +94,7 @@ var runtimeExecCommand = &cli.Command{ } err = Exec(runtimeClient, opts) if err != nil { - return fmt.Errorf("execing command in container failed: %v", err) + return errors.Wrap(err, "execing command in container") } return nil }, diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/image.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/image.go index 20379b51666..42148b02061 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/image.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/image.go @@ -17,12 +17,12 @@ limitations under the License. package crictl import ( - "errors" "fmt" "sort" "strings" "github.com/docker/go-units" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" "golang.org/x/net/context" @@ -86,13 +86,13 @@ var pullImageCommand = &cli.Command{ if context.IsSet("pod-config") { sandbox, err = loadPodSandboxConfig(context.String("pod-config")) if err != nil { - return fmt.Errorf("load podSandboxConfig failed: %v", err) + return errors.Wrap(err, "load podSandboxConfig") } } r, err := PullImageWithSandbox(imageClient, imageName, auth, sandbox) if err != nil { - return fmt.Errorf("pulling image failed: %v", err) + return errors.Wrap(err, "pulling image") } fmt.Printf("Image is up to date for %s\n", r.ImageRef) return nil @@ -139,7 +139,7 @@ var listImageCommand = &cli.Command{ r, err := ListImages(imageClient, context.Args().First()) if err != nil { - return fmt.Errorf("listing images failed: %v", err) + return errors.Wrap(err, "listing images") } sort.Sort(imageByRef(r.Images)) @@ -251,7 +251,7 @@ var imageStatusCommand = &cli.Command{ r, err := ImageStatus(imageClient, id, verbose) if err != nil { - return fmt.Errorf("image status for %q request failed: %v", id, err) + return errors.Wrapf(err, "image status for %q request", id) } image := r.Image if image == nil { @@ -260,12 +260,12 @@ var imageStatusCommand = &cli.Command{ status, err := protobufObjectToJSON(r.Image) if err != nil { - return fmt.Errorf("failed to marshal status to json for %q: %v", id, err) + return errors.Wrapf(err, "marshal status to json for %q", id) } switch output { case "json", "yaml", "go-template": if err := outputStatusInfo(status, r.Info, output, tmplStr); err != nil { - return fmt.Errorf("failed to output status for %q: %v", id, err) + return errors.Wrapf(err, "output status for %q", id) } continue case "table": // table output is after this switch block @@ -444,18 +444,18 @@ var imageFsInfoCommand = &cli.Command{ r, err := ImageFsInfo(imageClient) if err != nil { - return fmt.Errorf("image filesystem info request failed: %v", err) + return errors.Wrap(err, "image filesystem info request") } for _, info := range r.ImageFilesystems { status, err := protobufObjectToJSON(info) if err != nil { - return fmt.Errorf("failed to marshal image filesystem info to json: %v", err) + return errors.Wrap(err, "marshal image filesystem info to json") } switch output { case "json", "yaml", "go-template": if err := outputStatusInfo(status, nil, output, tmplStr); err != nil { - return fmt.Errorf("failed to output image filesystem info %v", err) + return errors.Wrap(err, "output image filesystem info") } continue case "table": // table output is after this switch block diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/info.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/info.go index bf11ba4cfb1..84cd957be89 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/info.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/info.go @@ -17,8 +17,7 @@ limitations under the License. package crictl import ( - "fmt" - + "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" "golang.org/x/net/context" @@ -56,7 +55,7 @@ var runtimeStatusCommand = &cli.Command{ err = Info(context, runtimeClient) if err != nil { - return fmt.Errorf("getting status of runtime failed: %v", err) + return errors.Wrap(err, "getting status of runtime") } return nil }, diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main.go index 144f713a1d3..038e1841609 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main.go @@ -19,17 +19,20 @@ package crictl import ( "fmt" "os" - "path/filepath" "sort" "time" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" + "google.golang.org/grpc" + internalapi "k8s.io/cri-api/pkg/apis" - "k8s.io/kubernetes/pkg/kubelet/remote" + "k8s.io/kubernetes/pkg/kubelet/cri/remote" "k8s.io/kubernetes/pkg/kubelet/util" + "github.com/kubernetes-sigs/cri-tools/pkg/common" "github.com/kubernetes-sigs/cri-tools/pkg/version" ) @@ -40,47 +43,89 @@ const ( var ( // RuntimeEndpoint is CRI server runtime endpoint RuntimeEndpoint string + // RuntimeEndpointIsSet is true when RuntimeEndpoint is configured + RuntimeEndpointIsSet bool // ImageEndpoint is CRI server image endpoint, default same as runtime endpoint ImageEndpoint string + // ImageEndpointIsSet is true when ImageEndpoint is configured + ImageEndpointIsSet bool // Timeout of connecting to server (default: 10s) Timeout time.Duration // Debug enable debug output Debug bool + // PullImageOnCreate enables pulling image on create requests + PullImageOnCreate bool + // DisablePullOnRun disable pulling image on run requests + DisablePullOnRun bool ) func getRuntimeClientConnection(context *cli.Context) (*grpc.ClientConn, error) { - if RuntimeEndpoint == "" { + if RuntimeEndpointIsSet && RuntimeEndpoint == "" { return nil, fmt.Errorf("--runtime-endpoint is not set") } - - addr, dialer, err := util.GetAddressAndDialer(RuntimeEndpoint) - if err != nil { - return nil, err + logrus.Debug("get runtime connection") + // If no EP set then use the default endpoint types + if !RuntimeEndpointIsSet { + logrus.Warningf("runtime connect using default endpoints: %v. "+ + "As the default settings are now deprecated, you should set the "+ + "endpoint instead.", defaultRuntimeEndpoints) + logrus.Debug("Note that performance maybe affected as each default " + + "connection attempt takes n-seconds to complete before timing out " + + "and going to the next in sequence.") + return getConnection(defaultRuntimeEndpoints) } - - conn, err := grpc.Dial(addr, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithTimeout(Timeout), grpc.WithContextDialer(dialer)) - if err != nil { - return nil, fmt.Errorf("failed to connect, make sure you are running as root and the runtime has been started: %v", err) - } - return conn, nil + return getConnection([]string{RuntimeEndpoint}) } func getImageClientConnection(context *cli.Context) (*grpc.ClientConn, error) { if ImageEndpoint == "" { - if RuntimeEndpoint == "" { + if RuntimeEndpointIsSet && RuntimeEndpoint == "" { return nil, fmt.Errorf("--image-endpoint is not set") } ImageEndpoint = RuntimeEndpoint + ImageEndpointIsSet = RuntimeEndpointIsSet } - - addr, dialer, err := util.GetAddressAndDialer(ImageEndpoint) - if err != nil { - return nil, err + logrus.Debugf("get image connection") + // If no EP set then use the default endpoint types + if !ImageEndpointIsSet { + logrus.Warningf("image connect using default endpoints: %v. "+ + "As the default settings are now deprecated, you should set the "+ + "endpoint instead.", defaultRuntimeEndpoints) + logrus.Debug("Note that performance maybe affected as each default " + + "connection attempt takes n-seconds to complete before timing out " + + "and going to the next in sequence.") + return getConnection(defaultRuntimeEndpoints) } + return getConnection([]string{ImageEndpoint}) +} - conn, err := grpc.Dial(addr, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithTimeout(Timeout), grpc.WithContextDialer(dialer)) - if err != nil { - return nil, fmt.Errorf("failed to connect, make sure you are running as root and the runtime has been started: %v", err) +func getConnection(endPoints []string) (*grpc.ClientConn, error) { + if endPoints == nil || len(endPoints) == 0 { + return nil, fmt.Errorf("endpoint is not set") + } + endPointsLen := len(endPoints) + var conn *grpc.ClientConn + for indx, endPoint := range endPoints { + logrus.Debugf("connect using endpoint '%s' with '%s' timeout", endPoint, Timeout) + addr, dialer, err := util.GetAddressAndDialer(endPoint) + if err != nil { + if indx == endPointsLen-1 { + return nil, err + } + logrus.Error(err) + continue + } + conn, err = grpc.Dial(addr, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithTimeout(Timeout), grpc.WithContextDialer(dialer)) + if err != nil { + errMsg := errors.Wrapf(err, "connect endpoint '%s', make sure you are running as root and the endpoint has been started", endPoint) + if indx == endPointsLen-1 { + return nil, errMsg + } + logrus.Error(errMsg) + } else { + logrus.Debugf("connected successfully using endpoint: %s", endPoint) + break + } } return conn, nil } @@ -89,6 +134,13 @@ func getRuntimeService(context *cli.Context) (internalapi.RuntimeService, error) return remote.NewRemoteRuntimeService(RuntimeEndpoint, Timeout) } +func getTimeout(timeDuration time.Duration) time.Duration { + if timeDuration.Seconds() > 0 { + return timeDuration + } + return defaultTimeout // use default +} + func Main() { app := cli.NewApp() app.Name = "crictl" @@ -125,33 +177,38 @@ func Main() { completionCommand, } + runtimeEndpointUsage := fmt.Sprintf("Endpoint of CRI container runtime "+ + "service (default: uses in order the first successful one of %v). "+ + "Default is now deprecated and the endpoint should be set instead.", + defaultRuntimeEndpoints) + app.Flags = []cli.Flag{ &cli.StringFlag{ - Name: "config", - Aliases: []string{"c"}, - EnvVars: []string{"CRI_CONFIG_FILE"}, - Value: defaultConfigPath, - Usage: "Location of the client config file. If not specified and the default does not exist, the program's directory is searched as well", - TakesFile: true, + Name: "config", + Aliases: []string{"c"}, + EnvVars: []string{"CRI_CONFIG_FILE"}, + Value: defaultConfigPath, + Usage: "Location of the client config file. If not specified and the default does not exist, the program's directory is searched as well", }, &cli.StringFlag{ Name: "runtime-endpoint", Aliases: []string{"r"}, EnvVars: []string{"CONTAINER_RUNTIME_ENDPOINT"}, - Value: defaultRuntimeEndpoint, - Usage: "Endpoint of CRI container runtime service", + Usage: runtimeEndpointUsage, }, &cli.StringFlag{ Name: "image-endpoint", Aliases: []string{"i"}, EnvVars: []string{"IMAGE_SERVICE_ENDPOINT"}, - Usage: "Endpoint of CRI image manager service", + Usage: "Endpoint of CRI image manager service (default: uses " + + "'runtime-endpoint' setting)", }, &cli.DurationFlag{ Name: "timeout", Aliases: []string{"t"}, Value: defaultTimeout, - Usage: "Timeout of connecting to the server", + Usage: "Timeout of connecting to the server in seconds (e.g. 2s, 20s.). " + + "0 or less is set to default", }, &cli.BoolFlag{ Name: "debug", @@ -160,62 +217,59 @@ func Main() { }, } - app.Before = func(context *cli.Context) error { - isUseConfig := false - configFile := context.String("config") - if _, err := os.Stat(configFile); err == nil { - isUseConfig = true - } else { - if context.IsSet("config") || !os.IsNotExist(err) { - // note: the absence of default config file is normal case - // when user have not set it in cli - logrus.Fatalf("Failed to load config file: %v", err) - } else { - // If the default config was not found, and the user didn't - // explicitly specify a config, try looking in the program's - // directory as a fallback. This is a convenience for - // deployments of crictl so they don't have to place a file in a - // global location. - configFile = filepath.Join(filepath.Dir(os.Args[0]), "crictl.yaml") - if _, err := os.Stat(configFile); err == nil { - isUseConfig = true - } else if !os.IsNotExist(err) { - logrus.Fatalf("Failed to load config file: %v", err) - } + app.Before = func(context *cli.Context) (err error) { + var config *common.ServerConfiguration + var exePath string + + if exePath, err = os.Executable(); err != nil { + logrus.Fatal(err) + } + if config, err = common.GetServerConfigFromFile(context.String("config"), exePath); err != nil { + if context.IsSet("config") { + logrus.Fatal(err) } } - if !isUseConfig { + if config == nil { RuntimeEndpoint = context.String("runtime-endpoint") - ImageEndpoint = context.String("image-endpoint") - Timeout = context.Duration("timeout") - Debug = context.Bool("debug") - } else { - // Get config from file. - config, err := ReadConfig(configFile) - if err != nil { - logrus.Fatalf("Falied to load config file: %v", err) + if context.IsSet("runtime-endpoint") { + RuntimeEndpointIsSet = true } - + ImageEndpoint = context.String("image-endpoint") + if context.IsSet("image-endpoint") { + ImageEndpointIsSet = true + } + if context.IsSet("timeout") { + Timeout = getTimeout(context.Duration("timeout")) + } else { + Timeout = context.Duration("timeout") + } + Debug = context.Bool("debug") + DisablePullOnRun = false + } else { // Command line flags overrides config file. if context.IsSet("runtime-endpoint") { RuntimeEndpoint = context.String("runtime-endpoint") + RuntimeEndpointIsSet = true } else if config.RuntimeEndpoint != "" { RuntimeEndpoint = config.RuntimeEndpoint + RuntimeEndpointIsSet = true } else { RuntimeEndpoint = context.String("runtime-endpoint") } if context.IsSet("image-endpoint") { ImageEndpoint = context.String("image-endpoint") + ImageEndpointIsSet = true } else if config.ImageEndpoint != "" { ImageEndpoint = config.ImageEndpoint + ImageEndpointIsSet = true } else { ImageEndpoint = context.String("image-endpoint") } if context.IsSet("timeout") { - Timeout = context.Duration("timeout") - } else if config.Timeout != 0 { - Timeout = time.Duration(config.Timeout) * time.Second + Timeout = getTimeout(context.Duration("timeout")) + } else if config.Timeout > 0 { // 0/neg value set to default timeout + Timeout = config.Timeout } else { Timeout = context.Duration("timeout") } @@ -224,6 +278,8 @@ func Main() { } else { Debug = config.Debug } + PullImageOnCreate = config.PullImageOnCreate + DisablePullOnRun = config.DisablePullOnRun } if Debug { diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main_unix.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main_unix.go index cb5aad9c8d9..7840f9c9b7f 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main_unix.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main_unix.go @@ -19,6 +19,7 @@ limitations under the License. package crictl const ( - defaultConfigPath = "/etc/crictl.yaml" - defaultRuntimeEndpoint = "unix:///run/k3s/containerd/containerd.sock" + defaultConfigPath = "/etc/crictl.yaml" ) + +var defaultRuntimeEndpoints = []string{"unix:///run/k3s/containerd/containerd.sock", "unix:///var/run/dockershim.sock", "unix:///run/containerd/containerd.sock", "unix:///run/crio/crio.sock"} diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main_windows.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main_windows.go index ee2e017bf36..58da1182256 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main_windows.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/main_windows.go @@ -23,10 +23,7 @@ import ( "path/filepath" ) -const ( - defaultRuntimeEndpoint = "npipe:////./pipe/dockershim" -) - +var defaultRuntimeEndpoints = []string{"npipe:////./pipe/dockershim", "npipe:////./pipe/containerd", "npipe:////./pipe/crio"} var defaultConfigPath string func init() { diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/portforward.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/portforward.go index a81c6b847f8..274988eaf22 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/portforward.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/portforward.go @@ -23,6 +23,7 @@ import ( "os" "os/signal" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" "golang.org/x/net/context" @@ -54,7 +55,7 @@ var runtimePortForwardCommand = &cli.Command{ } err = PortForward(runtimeClient, opts) if err != nil { - return fmt.Errorf("port forward failed: %v", err) + return errors.Wrap(err, "port forward") } return nil diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/sandbox.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/sandbox.go index 8f739e52c56..49c0901a95e 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/sandbox.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/sandbox.go @@ -25,10 +25,12 @@ import ( "time" "github.com/docker/go-units" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" "golang.org/x/net/context" + errorUtils "k8s.io/apimachinery/pkg/util/errors" pb "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ) @@ -66,13 +68,13 @@ var runPodCommand = &cli.Command{ podSandboxConfig, err := loadPodSandboxConfig(sandboxSpec) if err != nil { - return fmt.Errorf("load podSandboxConfig failed: %v", err) + return errors.Wrap(err, "load podSandboxConfig") } // Test RuntimeServiceClient.RunPodSandbox podID, err := RunPodSandbox(runtimeClient, podSandboxConfig, context.String("runtime")) if err != nil { - return fmt.Errorf("run pod sandbox failed: %v", err) + return errors.Wrap(err, "run pod sandbox") } fmt.Println(podID) return nil @@ -96,7 +98,7 @@ var stopPodCommand = &cli.Command{ id := context.Args().Get(i) err := StopPodSandbox(runtimeClient, id) if err != nil { - return fmt.Errorf("stopping the pod sandbox %q failed: %v", id, err) + return errors.Wrapf(err, "stopping the pod sandbox %q", id) } } return nil @@ -140,45 +142,39 @@ var removePodCommand = &cli.Command{ } } - if len(ids) == 0 { + lenIDs := len(ids) + if lenIDs == 0 { return cli.ShowSubcommandHelp(ctx) } - errored := false + funcs := []func() error{} for _, id := range ids { - resp, err := runtimeClient.PodSandboxStatus(context.Background(), - &pb.PodSandboxStatusRequest{PodSandboxId: id}) - if err != nil { - logrus.Error(err) - errored = true - continue - } - if resp.Status.State == pb.PodSandboxState_SANDBOX_READY { - if ctx.Bool("force") { - if err := StopPodSandbox(runtimeClient, id); err != nil { - logrus.Errorf("stopping the pod sandbox %q failed: %v", id, err) - errored = true - continue - } - } else { - logrus.Errorf("pod sandbox %q is running, please stop it first", id) - errored = true - continue + funcs = append(funcs, func() error { + resp, err := runtimeClient.PodSandboxStatus(context.Background(), + &pb.PodSandboxStatusRequest{PodSandboxId: id}) + if err != nil { + return errors.Wrapf(err, "getting sandbox status of pod %q", id) + } + if resp.Status.State == pb.PodSandboxState_SANDBOX_READY { + if ctx.Bool("force") { + if err := StopPodSandbox(runtimeClient, id); err != nil { + return errors.Wrapf(err, "stopping the pod sandbox %q failed", id) + } + } else { + return errors.Errorf("pod sandbox %q is running, please stop it first", id) + } } - } - err = RemovePodSandbox(runtimeClient, id) - if err != nil { - logrus.Errorf("removing the pod sandbox %q failed: %v", id, err) - errored = true - continue - } + err = RemovePodSandbox(runtimeClient, id) + if err != nil { + return errors.Wrapf(err, "removing the pod sandbox %q", id) + } + + return nil + }) } - if errored { - return fmt.Errorf("unable to remove sandbox(es)") - } - return nil + return errorUtils.AggregateGoroutines(funcs...) }, } @@ -217,7 +213,7 @@ var podStatusCommand = &cli.Command{ err := PodSandboxStatus(runtimeClient, id, context.String("output"), context.Bool("quiet"), context.String("template")) if err != nil { - return fmt.Errorf("getting the pod sandbox status for %q failed: %v", id, err) + return errors.Wrapf(err, "getting the pod sandbox status for %q", id) } } return nil @@ -310,7 +306,7 @@ var listPodCommand = &cli.Command{ return err } if err = ListPodSandboxes(runtimeClient, opts); err != nil { - return fmt.Errorf("listing pod sandboxes failed: %v", err) + return errors.Wrap(err, "listing pod sandboxes") } return nil }, @@ -508,7 +504,15 @@ func ListPodSandboxes(client pb.RuntimeServiceClient, opts listOptions) error { display := newTableDisplay(20, 1, 3, ' ', 0) if !opts.verbose && !opts.quiet { - display.AddRow([]string{columnPodID, columnCreated, columnState, columnName, columnNamespace, columnAttempt}) + display.AddRow([]string{ + columnPodID, + columnCreated, + columnState, + columnName, + columnNamespace, + columnAttempt, + columnPodRuntime, + }) } for _, pod := range r.Items { if opts.quiet { @@ -522,8 +526,15 @@ func ListPodSandboxes(client pb.RuntimeServiceClient, opts listOptions) error { if !opts.noTrunc { id = getTruncatedID(id, "") } - display.AddRow([]string{id, ctm, convertPodState(pod.State), pod.Metadata.Name, - pod.Metadata.Namespace, fmt.Sprintf("%d", pod.Metadata.Attempt)}) + display.AddRow([]string{ + id, + ctm, + convertPodState(pod.State), + pod.Metadata.Name, + pod.Metadata.Namespace, + fmt.Sprintf("%d", pod.Metadata.Attempt), + getSandboxesRuntimeHandler(pod), + }) continue } @@ -557,6 +568,10 @@ func ListPodSandboxes(client pb.RuntimeServiceClient, opts listOptions) error { fmt.Printf("\t%s -> %s\n", k, pod.Annotations[k]) } } + fmt.Printf("%s: %s\n", + strings.Title(strings.ToLower(columnPodRuntime)), + getSandboxesRuntimeHandler(pod)) + fmt.Println() } @@ -576,6 +591,13 @@ func convertPodState(state pb.PodSandboxState) string { } } +func getSandboxesRuntimeHandler(sandbox *pb.PodSandbox) string { + if sandbox.RuntimeHandler == "" { + return "(default)" + } + return sandbox.RuntimeHandler +} + func getSandboxesList(sandboxesList []*pb.PodSandbox, opts listOptions) []*pb.PodSandbox { filtered := []*pb.PodSandbox{} for _, p := range sandboxesList { diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/stats.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/stats.go index a2db19a201c..067d08d5030 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/stats.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/stats.go @@ -18,10 +18,13 @@ package crictl import ( "fmt" + "os" + "os/signal" "sort" "time" "github.com/docker/go-units" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" "golang.org/x/net/context" @@ -114,7 +117,7 @@ var statsCommand = &cli.Command{ } if err = ContainerStats(runtimeClient, opts); err != nil { - return fmt.Errorf("get container stats failed: %v", err) + return errors.Wrap(err, "get container stats") } return nil }, @@ -151,6 +154,12 @@ func ContainerStats(client pb.RuntimeServiceClient, opts statsOptions) error { return err } } else { + s := make(chan os.Signal) + signal.Notify(s, os.Interrupt) + go func() { + <-s + os.Exit(0) + }() for range time.Tick(500 * time.Millisecond) { if err := displayStats(client, request, display, opts); err != nil { return err diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/util.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/util.go index a572e5ede03..1616f4d51e8 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/util.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/util.go @@ -26,13 +26,14 @@ import ( "sort" "strings" - "github.com/ghodss/yaml" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" + "github.com/pkg/errors" "github.com/urfave/cli/v2" "google.golang.org/grpc" utilyaml "k8s.io/apimachinery/pkg/util/yaml" pb "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "sigs.k8s.io/yaml" ) const ( @@ -100,7 +101,7 @@ type portforwardOptions struct { } func getSortedKeys(m map[string]string) []string { - keys := make([]string, len(m)) + keys := make([]string, 0, len(m)) for k := range m { keys = append(keys, k) } @@ -152,7 +153,7 @@ func getRuntimeClient(context *cli.Context) (pb.RuntimeServiceClient, *grpc.Clie // Set up a connection to the server. conn, err := getRuntimeClientConnection(context) if err != nil { - return nil, nil, fmt.Errorf("failed to connect: %v", err) + return nil, nil, errors.Wrap(err, "connect") } runtimeClient := pb.NewRuntimeServiceClient(conn) return runtimeClient, conn, nil @@ -162,7 +163,7 @@ func getImageClient(context *cli.Context) (pb.ImageServiceClient, *grpc.ClientCo // Set up a connection to the server. conn, err := getImageClientConnection(context) if err != nil { - return nil, nil, fmt.Errorf("failed to connect: %v", err) + return nil, nil, errors.Wrap(err, "connect") } imageClient := pb.NewImageServiceClient(conn) return imageClient, conn, nil diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/version.go b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/version.go index 29b5474e5d9..10a1d93911c 100644 --- a/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/version.go +++ b/vendor/github.com/kubernetes-sigs/cri-tools/cmd/crictl/version.go @@ -19,6 +19,7 @@ package crictl import ( "fmt" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" "golang.org/x/net/context" @@ -40,7 +41,7 @@ var runtimeVersionCommand = &cli.Command{ defer closeConnection(context, runtimeConn) err = Version(runtimeClient, criClientVersion) if err != nil { - return fmt.Errorf("getting the runtime version failed: %v", err) + return errors.Wrap(err, "getting the runtime version") } return nil }, diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/pkg/common/config.go b/vendor/github.com/kubernetes-sigs/cri-tools/pkg/common/config.go new file mode 100644 index 00000000000..373680b5b7e --- /dev/null +++ b/vendor/github.com/kubernetes-sigs/cri-tools/pkg/common/config.go @@ -0,0 +1,73 @@ +/* +Copyright 2020 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 common + +import ( + "os" + "path/filepath" + "time" + + "github.com/pkg/errors" +) + +// ServerConfiguration is the config for connecting to and using a CRI server +type ServerConfiguration struct { + // RuntimeEndpoint is CRI server runtime endpoint + RuntimeEndpoint string + // ImageEndpoint is CRI server image endpoint + ImageEndpoint string + // Timeout of connecting to server + Timeout time.Duration + // Debug enable debug output + Debug bool + // PullImageOnCreate enables also pulling an image for create requests + PullImageOnCreate bool + // DisablePullOnRun disables pulling an image for run requests + DisablePullOnRun bool +} + +// GetServerConfigFromFile returns the CRI server configuration from file +func GetServerConfigFromFile(configFileName, currentDir string) (*ServerConfiguration, error) { + serverConfig := ServerConfiguration{} + if _, err := os.Stat(configFileName); err != nil { + if !os.IsNotExist(err) { + return nil, errors.Wrap(err, "load config file") + } + // If the config file was not found, try looking in the program's + // directory as a fallback. This is to accommodate where the config file + // is placed with the cri tools binary. + configFileName = filepath.Join(filepath.Dir(currentDir), "crictl.yaml") + if _, err := os.Stat(configFileName); err != nil { + return nil, errors.Wrap(err, "load config file") + } + } + + // Get config from file. + config, err := ReadConfig(configFileName) + if err != nil { + return nil, errors.Wrap(err, "load config file") + } + + // Set the config from file to the server config struct for return + serverConfig.RuntimeEndpoint = config.RuntimeEndpoint + serverConfig.ImageEndpoint = config.ImageEndpoint + serverConfig.Timeout = time.Duration(config.Timeout) * time.Second + serverConfig.Debug = config.Debug + serverConfig.PullImageOnCreate = config.PullImageOnCreate + serverConfig.DisablePullOnRun = config.DisablePullOnRun + return &serverConfig, nil +} diff --git a/vendor/github.com/kubernetes-sigs/cri-tools/pkg/common/file.go b/vendor/github.com/kubernetes-sigs/cri-tools/pkg/common/file.go new file mode 100644 index 00000000000..c36cfa8471f --- /dev/null +++ b/vendor/github.com/kubernetes-sigs/cri-tools/pkg/common/file.go @@ -0,0 +1,204 @@ +/* +Copyright 2020 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 common + +import ( + "io/ioutil" + "os" + gofilepath "path/filepath" + "strconv" + + "github.com/pkg/errors" + "gopkg.in/yaml.v3" +) + +// Config is the internal representation of the yaml that defines +// server configuration +type Config struct { + RuntimeEndpoint string + ImageEndpoint string + Timeout int + Debug bool + PullImageOnCreate bool + DisablePullOnRun bool + yamlData *yaml.Node //YAML representation of config +} + +// ReadConfig reads from a file with the given name and returns a config or +// an error if the file was unable to be parsed. +func ReadConfig(filepath string) (*Config, error) { + data, err := ioutil.ReadFile(filepath) + if err != nil { + return nil, err + } + yamlConfig := yaml.Node{} + err = yaml.Unmarshal(data, &yamlConfig) + if err != nil { + return nil, err + } + config, err := getConfigOptions(yamlConfig) + if err != nil { + return nil, err + } + return config, err +} + +// WriteConfig writes config to file +// an error if the file was unable to be written to. +func WriteConfig(c *Config, filepath string) error { + if c == nil { + c = new(Config) + c.yamlData = new(yaml.Node) + } + + setConfigOptions(c) + + data, err := yaml.Marshal(c.yamlData) + if err != nil { + return err + } + + if err := os.MkdirAll(gofilepath.Dir(filepath), 0o755); err != nil { + return err + } + return ioutil.WriteFile(filepath, data, 0o644) +} + +// Extracts config options from the yaml data which is loaded from file +func getConfigOptions(yamlData yaml.Node) (*Config, error) { + config := Config{} + config.yamlData = &yamlData + + if yamlData.Content == nil || len(yamlData.Content) == 0 || + yamlData.Content[0].Content == nil { + return &config, nil + } + contentLen := len(yamlData.Content[0].Content) + + // YAML representation contains 2 yaml ScalarNodes per config option. + // One is config option name and other is the value of the option + // These ScalarNodes help preserve comments associated with + // the YAML entry + for indx := 0; indx < contentLen-1; { + configOption := yamlData.Content[0].Content[indx] + name := configOption.Value + value := yamlData.Content[0].Content[indx+1].Value + var err error + switch name { + case "runtime-endpoint": + config.RuntimeEndpoint = value + case "image-endpoint": + config.ImageEndpoint = value + case "timeout": + config.Timeout, err = strconv.Atoi(value) + if err != nil { + return nil, errors.Wrapf(err, "parsing config option '%s'", name) + } + case "debug": + config.Debug, err = strconv.ParseBool(value) + if err != nil { + return nil, errors.Wrapf(err, "parsing config option '%s'", name) + } + case "pull-image-on-create": + config.PullImageOnCreate, err = strconv.ParseBool(value) + if err != nil { + return nil, errors.Wrapf(err, "parsing config option '%s'", name) + } + case "disable-pull-on-run": + config.DisablePullOnRun, err = strconv.ParseBool(value) + if err != nil { + return nil, errors.Wrapf(err, "parsing config option '%s'", name) + } + default: + return nil, errors.Errorf("Config option '%s' is not valid", name) + } + indx += 2 + } + + return &config, nil +} + +// Set config options on yaml data for persistece to file +func setConfigOptions(config *Config) { + setConfigOption("runtime-endpoint", config.RuntimeEndpoint, config.yamlData) + setConfigOption("image-endpoint", config.ImageEndpoint, config.yamlData) + setConfigOption("timeout", strconv.Itoa(config.Timeout), config.yamlData) + setConfigOption("debug", strconv.FormatBool(config.Debug), config.yamlData) + setConfigOption("pull-image-on-create", strconv.FormatBool(config.PullImageOnCreate), config.yamlData) + setConfigOption("disable-pull-on-run", strconv.FormatBool(config.DisablePullOnRun), config.yamlData) +} + +// Set config option on yaml +func setConfigOption(configName, configValue string, yamlData *yaml.Node) { + if yamlData.Content == nil || len(yamlData.Content) == 0 { + yamlData.Kind = yaml.DocumentNode + yamlData.Content = make([]*yaml.Node, 1) + yamlData.Content[0] = &yaml.Node{ + Kind: yaml.MappingNode, + Tag: "!!map", + } + } + var contentLen = 0 + var foundOption = false + if yamlData.Content[0].Content != nil { + contentLen = len(yamlData.Content[0].Content) + } + + // Set value on existing config option + for indx := 0; indx < contentLen-1; { + name := yamlData.Content[0].Content[indx].Value + if name == configName { + yamlData.Content[0].Content[indx+1].Value = configValue + foundOption = true + break + } + indx += 2 + } + + // New config option to set + // YAML representation contains 2 yaml ScalarNodes per config option. + // One is config option name and other is the value of the option + // These ScalarNodes help preserve comments associated with + // the YAML entry + if !foundOption { + name := &yaml.Node{ + Kind: yaml.ScalarNode, + Value: configName, + Tag: "!!str", + } + var tagType string + switch configName { + case "timeout": + tagType = "!!int" + case "debug": + tagType = "!!bool" + case "pull-image-on-create": + tagType = "!!bool" + case "disable-pull-on-run": + tagType = "!!bool" + default: + tagType = "!!str" + } + + value := &yaml.Node{ + Kind: yaml.ScalarNode, + Value: configValue, + Tag: tagType, + } + yamlData.Content[0].Content = append(yamlData.Content[0].Content, name, value) + } +} diff --git a/vendor/github.com/mattn/go-shellwords/.travis.yml b/vendor/github.com/mattn/go-shellwords/.travis.yml deleted file mode 100644 index 16d1430aa22..00000000000 --- a/vendor/github.com/mattn/go-shellwords/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go -go: - - tip -before_install: - - go get github.com/mattn/goveralls - - go get golang.org/x/tools/cmd/cover -script: - - $HOME/gopath/bin/goveralls -repotoken 2FMhp57u8LcstKL9B190fLTcEnBtAAiEL diff --git a/vendor/github.com/mattn/go-shellwords/README.md b/vendor/github.com/mattn/go-shellwords/README.md deleted file mode 100644 index b1d235c78d3..00000000000 --- a/vendor/github.com/mattn/go-shellwords/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# go-shellwords - -[![Coverage Status](https://coveralls.io/repos/mattn/go-shellwords/badge.png?branch=master)](https://coveralls.io/r/mattn/go-shellwords?branch=master) -[![Build Status](https://travis-ci.org/mattn/go-shellwords.svg?branch=master)](https://travis-ci.org/mattn/go-shellwords) - -Parse line as shell words. - -## Usage - -```go -args, err := shellwords.Parse("./foo --bar=baz") -// args should be ["./foo", "--bar=baz"] -``` - -```go -os.Setenv("FOO", "bar") -p := shellwords.NewParser() -p.ParseEnv = true -args, err := p.Parse("./foo $FOO") -// args should be ["./foo", "bar"] -``` - -```go -p := shellwords.NewParser() -p.ParseBacktick = true -args, err := p.Parse("./foo `echo $SHELL`") -// args should be ["./foo", "/bin/bash"] -``` - -```go -shellwords.ParseBacktick = true -p := shellwords.NewParser() -args, err := p.Parse("./foo `echo $SHELL`") -// args should be ["./foo", "/bin/bash"] -``` - -# Thanks - -This is based on cpan module [Parse::CommandLine](https://metacpan.org/pod/Parse::CommandLine). - -# License - -under the MIT License: http://mattn.mit-license.org/2017 - -# Author - -Yasuhiro Matsumoto (a.k.a mattn) diff --git a/vendor/github.com/mattn/go-shellwords/go.mod b/vendor/github.com/mattn/go-shellwords/go.mod deleted file mode 100644 index 8d96dbd5fa3..00000000000 --- a/vendor/github.com/mattn/go-shellwords/go.mod +++ /dev/null @@ -1 +0,0 @@ -module github.com/mattn/go-shellwords diff --git a/vendor/github.com/mattn/go-shellwords/shellwords.go b/vendor/github.com/mattn/go-shellwords/shellwords.go deleted file mode 100644 index 41429d8f26f..00000000000 --- a/vendor/github.com/mattn/go-shellwords/shellwords.go +++ /dev/null @@ -1,195 +0,0 @@ -package shellwords - -import ( - "errors" - "os" - "regexp" - "strings" -) - -var ( - ParseEnv bool = false - ParseBacktick bool = false -) - -var envRe = regexp.MustCompile(`\$({[a-zA-Z0-9_]+}|[a-zA-Z0-9_]+)`) - -func isSpace(r rune) bool { - switch r { - case ' ', '\t', '\r', '\n': - return true - } - return false -} - -func replaceEnv(getenv func(string) string, s string) string { - if getenv == nil { - getenv = os.Getenv - } - - return envRe.ReplaceAllStringFunc(s, func(s string) string { - s = s[1:] - if s[0] == '{' { - s = s[1 : len(s)-1] - } - return getenv(s) - }) -} - -type Parser struct { - ParseEnv bool - ParseBacktick bool - Position int - - // If ParseEnv is true, use this for getenv. - // If nil, use os.Getenv. - Getenv func(string) string -} - -func NewParser() *Parser { - return &Parser{ - ParseEnv: ParseEnv, - ParseBacktick: ParseBacktick, - Position: 0, - } -} - -func (p *Parser) Parse(line string) ([]string, error) { - args := []string{} - buf := "" - var escaped, doubleQuoted, singleQuoted, backQuote, dollarQuote bool - backtick := "" - - pos := -1 - got := false - -loop: - for i, r := range line { - if escaped { - buf += string(r) - escaped = false - continue - } - - if r == '\\' { - if singleQuoted { - buf += string(r) - } else { - escaped = true - } - continue - } - - if isSpace(r) { - if singleQuoted || doubleQuoted || backQuote || dollarQuote { - buf += string(r) - backtick += string(r) - } else if got { - if p.ParseEnv { - buf = replaceEnv(p.Getenv, buf) - } - args = append(args, buf) - buf = "" - got = false - } - continue - } - - switch r { - case '`': - if !singleQuoted && !doubleQuoted && !dollarQuote { - if p.ParseBacktick { - if backQuote { - out, err := shellRun(backtick) - if err != nil { - return nil, err - } - buf = out - } - backtick = "" - backQuote = !backQuote - continue - } - backtick = "" - backQuote = !backQuote - } - case ')': - if !singleQuoted && !doubleQuoted && !backQuote { - if p.ParseBacktick { - if dollarQuote { - out, err := shellRun(backtick) - if err != nil { - return nil, err - } - if r == ')' { - buf = buf[:len(buf)-len(backtick)-2] + out - } else { - buf = buf[:len(buf)-len(backtick)-1] + out - } - } - backtick = "" - dollarQuote = !dollarQuote - continue - } - backtick = "" - dollarQuote = !dollarQuote - } - case '(': - if !singleQuoted && !doubleQuoted && !backQuote { - if !dollarQuote && strings.HasSuffix(buf, "$") { - dollarQuote = true - buf += "(" - continue - } else { - return nil, errors.New("invalid command line string") - } - } - case '"': - if !singleQuoted && !dollarQuote { - doubleQuoted = !doubleQuoted - continue - } - case '\'': - if !doubleQuoted && !dollarQuote { - singleQuoted = !singleQuoted - continue - } - case ';', '&', '|', '<', '>': - if !(escaped || singleQuoted || doubleQuoted || backQuote) { - if r == '>' && len(buf) > 0 { - if c := buf[0]; '0' <= c && c <= '9' { - i -= 1 - got = false - } - } - pos = i - break loop - } - } - - got = true - buf += string(r) - if backQuote || dollarQuote { - backtick += string(r) - } - } - - if got { - if p.ParseEnv { - buf = replaceEnv(p.Getenv, buf) - } - args = append(args, buf) - } - - if escaped || singleQuoted || doubleQuoted || backQuote || dollarQuote { - return nil, errors.New("invalid command line string") - } - - p.Position = pos - - return args, nil -} - -func Parse(line string) ([]string, error) { - return NewParser().Parse(line) -} diff --git a/vendor/github.com/mattn/go-shellwords/util_go15.go b/vendor/github.com/mattn/go-shellwords/util_go15.go deleted file mode 100644 index 180f00f0bd6..00000000000 --- a/vendor/github.com/mattn/go-shellwords/util_go15.go +++ /dev/null @@ -1,24 +0,0 @@ -// +build !go1.6 - -package shellwords - -import ( - "os" - "os/exec" - "runtime" - "strings" -) - -func shellRun(line string) (string, error) { - var b []byte - var err error - if runtime.GOOS == "windows" { - b, err = exec.Command(os.Getenv("COMSPEC"), "/c", line).Output() - } else { - b, err = exec.Command(os.Getenv("SHELL"), "-c", line).Output() - } - if err != nil { - return "", err - } - return strings.TrimSpace(string(b)), nil -} diff --git a/vendor/github.com/mattn/go-shellwords/util_posix.go b/vendor/github.com/mattn/go-shellwords/util_posix.go deleted file mode 100644 index eaf1011d60e..00000000000 --- a/vendor/github.com/mattn/go-shellwords/util_posix.go +++ /dev/null @@ -1,22 +0,0 @@ -// +build !windows,go1.6 - -package shellwords - -import ( - "errors" - "os" - "os/exec" - "strings" -) - -func shellRun(line string) (string, error) { - shell := os.Getenv("SHELL") - b, err := exec.Command(shell, "-c", line).Output() - if err != nil { - if eerr, ok := err.(*exec.ExitError); ok { - b = eerr.Stderr - } - return "", errors.New(err.Error() + ":" + string(b)) - } - return strings.TrimSpace(string(b)), nil -} diff --git a/vendor/github.com/mattn/go-shellwords/util_windows.go b/vendor/github.com/mattn/go-shellwords/util_windows.go deleted file mode 100644 index e46f89a1fed..00000000000 --- a/vendor/github.com/mattn/go-shellwords/util_windows.go +++ /dev/null @@ -1,22 +0,0 @@ -// +build windows,go1.6 - -package shellwords - -import ( - "errors" - "os" - "os/exec" - "strings" -) - -func shellRun(line string) (string, error) { - shell := os.Getenv("COMSPEC") - b, err := exec.Command(shell, "/c", line).Output() - if err != nil { - if eerr, ok := err.(*exec.ExitError); ok { - b = eerr.Stderr - } - return "", errors.New(err.Error() + ":" + string(b)) - } - return strings.TrimSpace(string(b)), nil -} diff --git a/vendor/github.com/mistifyio/go-zfs/.travis.yml b/vendor/github.com/mistifyio/go-zfs/.travis.yml new file mode 100644 index 00000000000..acbd39cefe9 --- /dev/null +++ b/vendor/github.com/mistifyio/go-zfs/.travis.yml @@ -0,0 +1,43 @@ +language: go +dist: trusty +sudo: required +cache: + directories: + - $HOME/.ccache + - $HOME/zfs + +branches: + only: + - master + +env: + - rel=0.6.5.11 + - rel=0.7.6 + +go: + - "1.10.x" + - master + +before_install: + - export MAKEFLAGS=-j$(($(grep -c '^processor' /proc/cpuinfo) * 2 + 1)) + - export PATH=/usr/lib/ccache:$PATH + - go get github.com/alecthomas/gometalinter + - gometalinter --install --update + - sudo apt-get update -y && sudo apt-get install -y libattr1-dev libblkid-dev linux-headers-$(uname -r) tree uuid-dev + - mkdir -p $HOME/zfs + - cd $HOME/zfs + - [[ -d spl-$rel.tar.gz ]] || curl -L https://github.com/zfsonlinux/zfs/releases/download/zfs-$rel/spl-$rel.tar.gz | tar xz + - [[ -d zfs-$rel.tar.gz ]] || curl -L https://github.com/zfsonlinux/zfs/releases/download/zfs-$rel/zfs-$rel.tar.gz | tar xz + - (cd spl-$rel && ./configure --prefix=/usr && make && sudo make install) + - (cd zfs-$rel && ./configure --prefix=/usr && make && sudo make install) + - sudo modprobe zfs + - cd $TRAVIS_BUILD_DIR + +script: + - sudo -E $(which go) test -v ./... + - gometalinter --vendor --vendored-linters ./... || true + - gometalinter --errors --vendor --vendored-linters ./... + +notifications: + email: false + irc: "chat.freenode.net#cerana" diff --git a/vendor/github.com/mistifyio/go-zfs/README.md b/vendor/github.com/mistifyio/go-zfs/README.md index 2515e588e0d..fef80d727b1 100644 --- a/vendor/github.com/mistifyio/go-zfs/README.md +++ b/vendor/github.com/mistifyio/go-zfs/README.md @@ -29,7 +29,7 @@ The tests have decent examples for most functions. ```go //assuming a zpool named test -//error handling ommitted +//error handling omitted f, err := zfs.CreateFilesystem("test/snapshot-test", nil) diff --git a/vendor/github.com/mistifyio/go-zfs/utils.go b/vendor/github.com/mistifyio/go-zfs/utils.go index d5b73534940..c18c2c3dae6 100644 --- a/vendor/github.com/mistifyio/go-zfs/utils.go +++ b/vendor/github.com/mistifyio/go-zfs/utils.go @@ -2,12 +2,16 @@ package zfs import ( "bytes" + "errors" "fmt" "io" "os/exec" "regexp" + "runtime" "strconv" "strings" + + "github.com/google/uuid" ) type command struct { @@ -34,16 +38,17 @@ func (c *command) Run(arg ...string) ([][]string, error) { } cmd.Stderr = &stderr - debug := strings.Join([]string{cmd.Path, strings.Join(cmd.Args, " ")}, " ") - if logger != nil { - logger.Log(cmd.Args) - } + id := uuid.New().String() + joinedArgs := strings.Join(cmd.Args, " ") + + logger.Log([]string{"ID:" + id, "START", joinedArgs}) err := cmd.Run() + logger.Log([]string{"ID:" + id, "FINISH"}) if err != nil { return nil, &Error{ Err: err, - Debug: debug, + Debug: strings.Join([]string{cmd.Path, joinedArgs[1:]}, " "), Stderr: stderr.String(), } } @@ -88,34 +93,50 @@ func setUint(field *uint64, value string) error { } func (ds *Dataset) parseLine(line []string) error { - prop := line[1] - val := line[2] - var err error - switch prop { - case "available": - err = setUint(&ds.Avail, val) - case "compression": - setString(&ds.Compression, val) - case "mountpoint": - setString(&ds.Mountpoint, val) - case "quota": - err = setUint(&ds.Quota, val) - case "type": - setString(&ds.Type, val) - case "origin": - setString(&ds.Origin, val) - case "used": - err = setUint(&ds.Used, val) - case "volsize": - err = setUint(&ds.Volsize, val) - case "written": - err = setUint(&ds.Written, val) - case "logicalused": - err = setUint(&ds.Logicalused, val) + if len(line) != len(dsPropList) { + return errors.New("Output does not match what is expected on this platform") } - return err + setString(&ds.Name, line[0]) + setString(&ds.Origin, line[1]) + + if err = setUint(&ds.Used, line[2]); err != nil { + return err + } + if err = setUint(&ds.Avail, line[3]); err != nil { + return err + } + + setString(&ds.Mountpoint, line[4]) + setString(&ds.Compression, line[5]) + setString(&ds.Type, line[6]) + + if err = setUint(&ds.Volsize, line[7]); err != nil { + return err + } + if err = setUint(&ds.Quota, line[8]); err != nil { + return err + } + if err = setUint(&ds.Referenced, line[9]); err != nil { + return err + } + + if runtime.GOOS == "solaris" { + return nil + } + + if err = setUint(&ds.Written, line[10]); err != nil { + return err + } + if err = setUint(&ds.Logicalused, line[11]); err != nil { + return err + } + if err = setUint(&ds.Usedbydataset, line[12]); err != nil { + return err + } + + return nil } /* @@ -264,7 +285,8 @@ func parseInodeChanges(lines [][]string) ([]*InodeChange, error) { } func listByType(t, filter string) ([]*Dataset, error) { - args := []string{"get", "-rHp", "-t", t, "all"} + args := []string{"list", "-rHp", "-t", t, "-o", dsPropListOptions} + if filter != "" { args = append(args, filter) } @@ -307,6 +329,8 @@ func (z *Zpool) parseLine(line []string) error { var err error switch prop { + case "name": + setString(&z.Name, val) case "health": setString(&z.Health, val) case "allocated": @@ -315,6 +339,22 @@ func (z *Zpool) parseLine(line []string) error { err = setUint(&z.Size, val) case "free": err = setUint(&z.Free, val) + case "fragmentation": + // Trim trailing "%" before parsing uint + i := strings.Index(val, "%") + if i < 0 { + i = len(val) + } + err = setUint(&z.Fragmentation, val[:i]) + case "readonly": + z.ReadOnly = val == "on" + case "freeing": + err = setUint(&z.Freeing, val) + case "leaked": + err = setUint(&z.Leaked, val) + case "dedupratio": + // Trim trailing "x" before parsing float64 + z.DedupRatio, err = strconv.ParseFloat(val[:len(val)-1], 64) } return err } diff --git a/vendor/github.com/mistifyio/go-zfs/utils_notsolaris.go b/vendor/github.com/mistifyio/go-zfs/utils_notsolaris.go new file mode 100644 index 00000000000..a46f73060d1 --- /dev/null +++ b/vendor/github.com/mistifyio/go-zfs/utils_notsolaris.go @@ -0,0 +1,17 @@ +// +build !solaris + +package zfs + +import ( + "strings" +) + +// List of ZFS properties to retrieve from zfs list command on a non-Solaris platform +var dsPropList = []string{"name", "origin", "used", "available", "mountpoint", "compression", "type", "volsize", "quota", "referenced", "written", "logicalused", "usedbydataset"} + +var dsPropListOptions = strings.Join(dsPropList, ",") + +// List of Zpool properties to retrieve from zpool list command on a non-Solaris platform +var zpoolPropList = []string{"name", "health", "allocated", "size", "free", "readonly", "dedupratio", "fragmentation", "freeing", "leaked"} +var zpoolPropListOptions = strings.Join(zpoolPropList, ",") +var zpoolArgs = []string{"get", "-p", zpoolPropListOptions} diff --git a/vendor/github.com/mistifyio/go-zfs/utils_solaris.go b/vendor/github.com/mistifyio/go-zfs/utils_solaris.go new file mode 100644 index 00000000000..0a7e90f2227 --- /dev/null +++ b/vendor/github.com/mistifyio/go-zfs/utils_solaris.go @@ -0,0 +1,17 @@ +// +build solaris + +package zfs + +import ( + "strings" +) + +// List of ZFS properties to retrieve from zfs list command on a Solaris platform +var dsPropList = []string{"name", "origin", "used", "available", "mountpoint", "compression", "type", "volsize", "quota", "referenced"} + +var dsPropListOptions = strings.Join(dsPropList, ",") + +// List of Zpool properties to retrieve from zpool list command on a non-Solaris platform +var zpoolPropList = []string{"name", "health", "allocated", "size", "free", "readonly", "dedupratio"} +var zpoolPropListOptions = strings.Join(zpoolPropList, ",") +var zpoolArgs = []string{"get", "-p", zpoolPropListOptions} diff --git a/vendor/github.com/mistifyio/go-zfs/zfs.go b/vendor/github.com/mistifyio/go-zfs/zfs.go index a1d740e07e5..4e5087ffe28 100644 --- a/vendor/github.com/mistifyio/go-zfs/zfs.go +++ b/vendor/github.com/mistifyio/go-zfs/zfs.go @@ -32,9 +32,10 @@ type Dataset struct { Type string Written uint64 Volsize uint64 - Usedbydataset uint64 Logicalused uint64 + Usedbydataset uint64 Quota uint64 + Referenced uint64 } // InodeType is the type of inode as reported by Diff @@ -92,12 +93,20 @@ type Logger interface { Log(cmd []string) } -var logger Logger +type defaultLogger struct{} + +func (*defaultLogger) Log(cmd []string) { + return +} + +var logger Logger = &defaultLogger{} // SetLogger set a log handler to log all commands including arguments before // they are executed func SetLogger(l Logger) { - logger = l + if l != nil { + logger = l + } } // zfs is a helper function to wrap typical calls to zfs. @@ -137,7 +146,7 @@ func Volumes(filter string) ([]*Dataset, error) { // GetDataset retrieves a single ZFS dataset by name. This dataset could be // any valid ZFS dataset type, such as a clone, filesystem, snapshot, or volume. func GetDataset(name string) (*Dataset, error) { - out, err := zfs("get", "-Hp", "all", name) + out, err := zfs("list", "-Hp", "-o", dsPropListOptions, name) if err != nil { return nil, err } @@ -172,6 +181,46 @@ func (d *Dataset) Clone(dest string, properties map[string]string) (*Dataset, er return GetDataset(dest) } +// Unmount unmounts currently mounted ZFS file systems. +func (d *Dataset) Unmount(force bool) (*Dataset, error) { + if d.Type == DatasetSnapshot { + return nil, errors.New("cannot unmount snapshots") + } + args := make([]string, 1, 3) + args[0] = "umount" + if force { + args = append(args, "-f") + } + args = append(args, d.Name) + _, err := zfs(args...) + if err != nil { + return nil, err + } + return GetDataset(d.Name) +} + +// Mount mounts ZFS file systems. +func (d *Dataset) Mount(overlay bool, options []string) (*Dataset, error) { + if d.Type == DatasetSnapshot { + return nil, errors.New("cannot mount snapshots") + } + args := make([]string, 1, 5) + args[0] = "mount" + if overlay { + args = append(args, "-O") + } + if options != nil { + args = append(args, "-o") + args = append(args, strings.Join(options, ",")) + } + args = append(args, d.Name) + _, err := zfs(args...) + if err != nil { + return nil, err + } + return GetDataset(d.Name) +} + // ReceiveSnapshot receives a ZFS stream from the input io.Reader, creates a // new snapshot with the specified name, and streams the input data into the // newly-created snapshot. @@ -259,7 +308,7 @@ func (d *Dataset) SetProperty(key, val string) error { // A full list of available ZFS properties may be found here: // https://www.freebsd.org/cgi/man.cgi?zfs(8). func (d *Dataset) GetProperty(key string) (string, error) { - out, err := zfs("get", key, d.Name) + out, err := zfs("get", "-H", key, d.Name) if err != nil { return "", err } @@ -267,6 +316,26 @@ func (d *Dataset) GetProperty(key string) (string, error) { return out[0][2], nil } +// Rename renames a dataset. +func (d *Dataset) Rename(name string, createParent bool, recursiveRenameSnapshots bool) (*Dataset, error) { + args := make([]string, 3, 5) + args[0] = "rename" + args[1] = d.Name + args[2] = name + if createParent { + args = append(args, "-p") + } + if recursiveRenameSnapshots { + args = append(args, "-r") + } + _, err := zfs(args...) + if err != nil { + return d, err + } + + return GetDataset(name) +} + // Snapshots returns a slice of all ZFS snapshots of a given dataset. func (d *Dataset) Snapshots() ([]*Dataset, error) { return Snapshots(d.Name) @@ -335,13 +404,14 @@ func (d *Dataset) Rollback(destroyMoreRecent bool) error { // A recursion depth may be specified, or a depth of 0 allows unlimited // recursion. func (d *Dataset) Children(depth uint64) ([]*Dataset, error) { - args := []string{"get", "-t", "all", "-Hp", "all"} + args := []string{"list"} if depth > 0 { args = append(args, "-d") args = append(args, strconv.FormatUint(depth, 10)) } else { args = append(args, "-r") } + args = append(args, "-t", "all", "-Hp", "-o", dsPropListOptions) args = append(args, d.Name) out, err := zfs(args...) diff --git a/vendor/github.com/mistifyio/go-zfs/zpool.go b/vendor/github.com/mistifyio/go-zfs/zpool.go index 6ba52d30cb0..d8db945d708 100644 --- a/vendor/github.com/mistifyio/go-zfs/zpool.go +++ b/vendor/github.com/mistifyio/go-zfs/zpool.go @@ -15,11 +15,16 @@ const ( // Zpool is a ZFS zpool. A pool is a top-level structure in ZFS, and can // contain many descendent datasets. type Zpool struct { - Name string - Health string - Allocated uint64 - Size uint64 - Free uint64 + Name string + Health string + Allocated uint64 + Size uint64 + Free uint64 + Fragmentation uint64 + ReadOnly bool + Freeing uint64 + Leaked uint64 + DedupRatio float64 } // zpool is a helper function to wrap typical calls to zpool. @@ -30,7 +35,9 @@ func zpool(arg ...string) ([][]string, error) { // GetZpool retrieves a single ZFS zpool by name. func GetZpool(name string) (*Zpool, error) { - out, err := zpool("get", "all", "-p", name) + args := zpoolArgs + args = append(args, name) + out, err := zpool(args...) if err != nil { return nil, err } diff --git a/vendor/github.com/moby/ipvs/.gitignore b/vendor/github.com/moby/ipvs/.gitignore new file mode 100644 index 00000000000..4fdfea1d9ec --- /dev/null +++ b/vendor/github.com/moby/ipvs/.gitignore @@ -0,0 +1,38 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so +*~ +.gtm +tags +.DS_Store + +# Folders +_obj +_test + + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +# Coverage +*.tmp +*.coverprofile + +# IDE files and folders +.project +.settings/ +.idea/ diff --git a/vendor/k8s.io/kubernetes/third_party/forked/ipvs/LICENSE b/vendor/github.com/moby/ipvs/LICENSE similarity index 100% rename from vendor/k8s.io/kubernetes/third_party/forked/ipvs/LICENSE rename to vendor/github.com/moby/ipvs/LICENSE diff --git a/vendor/github.com/moby/ipvs/README.md b/vendor/github.com/moby/ipvs/README.md new file mode 100644 index 00000000000..a45cf049a55 --- /dev/null +++ b/vendor/github.com/moby/ipvs/README.md @@ -0,0 +1,34 @@ +# ipvs - networking for containers + +![Test](https://github.com/moby/ipvs/workflows/Test/badge.svg) [![GoDoc](https://godoc.org/github.com/moby/ipvs?status.svg)](https://godoc.org/github.com/moby/ipvs) [![Go Report Card](https://goreportcard.com/badge/github.com/moby/ipvs)](https://goreportcard.com/report/github.com/moby/ipvs) + +ipvs provides a native Go implementation for communicating with IPVS kernel module using a netlink socket. + + +#### Using ipvs + +```go +import ( + "log" + + "github.com/moby/ipvs" +) + +func main() { + handle, err := ipvs.New("") + if err != nil { + log.Fatalf("ipvs.New: %s", err) + } + svcs, err := handle.GetServices() + if err != nil { + log.Fatalf("handle.GetServices: %s", err) + } +} +``` + +## Contributing + +Want to hack on ipvs? [Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) apply. + +## Copyright and license +Code and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons. diff --git a/vendor/k8s.io/kubernetes/third_party/forked/ipvs/constants.go b/vendor/github.com/moby/ipvs/constants.go similarity index 96% rename from vendor/k8s.io/kubernetes/third_party/forked/ipvs/constants.go rename to vendor/github.com/moby/ipvs/constants.go index 0b66ce9b292..efac4e367cf 100644 --- a/vendor/k8s.io/kubernetes/third_party/forked/ipvs/constants.go +++ b/vendor/github.com/moby/ipvs/constants.go @@ -1,8 +1,5 @@ // +build linux -// Code and documentation copyright 2015 Docker, inc. -// Code released under the Apache 2.0 license. Docs released under Creative commons. - package ipvs const ( diff --git a/vendor/github.com/moby/ipvs/doc.go b/vendor/github.com/moby/ipvs/doc.go new file mode 100644 index 00000000000..91ce6808ad7 --- /dev/null +++ b/vendor/github.com/moby/ipvs/doc.go @@ -0,0 +1 @@ +package ipvs diff --git a/vendor/github.com/moby/ipvs/go.mod b/vendor/github.com/moby/ipvs/go.mod new file mode 100644 index 00000000000..a57cc9d210b --- /dev/null +++ b/vendor/github.com/moby/ipvs/go.mod @@ -0,0 +1,12 @@ +module github.com/moby/ipvs + +go 1.13 + +require ( + github.com/pkg/errors v0.9.1 // indirect + github.com/sirupsen/logrus v1.4.2 + github.com/vishvananda/netlink v1.1.0 + github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df + golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 + gotest.tools/v3 v3.0.2 +) diff --git a/vendor/github.com/moby/ipvs/go.sum b/vendor/github.com/moby/ipvs/go.sum new file mode 100644 index 00000000000..324acf7c940 --- /dev/null +++ b/vendor/github.com/moby/ipvs/go.sum @@ -0,0 +1,35 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7ZovXvuNyL3XQl8UFofeikI1NW1Gypu7k= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444 h1:/d2cWp6PSamH4jDPFLyO150psQdqvtoNX8Zjg3AQ31g= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +gotest.tools/v3 v3.0.2 h1:kG1BFyqVHuQoVQiR1bWGnfz/fmHvvuiSPIV7rvl360E= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= diff --git a/vendor/k8s.io/kubernetes/third_party/forked/ipvs/ipvs.go b/vendor/github.com/moby/ipvs/ipvs.go similarity index 97% rename from vendor/k8s.io/kubernetes/third_party/forked/ipvs/ipvs.go rename to vendor/github.com/moby/ipvs/ipvs.go index 20088f8483e..61b6f0a5e4e 100644 --- a/vendor/k8s.io/kubernetes/third_party/forked/ipvs/ipvs.go +++ b/vendor/github.com/moby/ipvs/ipvs.go @@ -1,8 +1,5 @@ // +build linux -// Code and documentation copyright 2015 Docker, inc. -// Code released under the Apache 2.0 license. Docs released under Creative commons. - package ipvs import ( diff --git a/vendor/k8s.io/kubernetes/third_party/forked/ipvs/netlink.go b/vendor/github.com/moby/ipvs/netlink.go similarity index 98% rename from vendor/k8s.io/kubernetes/third_party/forked/ipvs/netlink.go rename to vendor/github.com/moby/ipvs/netlink.go index 63ff1f0a75b..ac48d05a31d 100644 --- a/vendor/k8s.io/kubernetes/third_party/forked/ipvs/netlink.go +++ b/vendor/github.com/moby/ipvs/netlink.go @@ -1,8 +1,5 @@ // +build linux -// Code and documentation copyright 2015 Docker, inc. -// Code released under the Apache 2.0 license. Docs released under Creative commons. - package ipvs import ( @@ -221,7 +218,7 @@ func execute(s *nl.NetlinkSocket, req *nl.NetlinkRequest, resType uint16) ([][]b done: for { - msgs, err := s.Receive() + msgs, _, err := s.Receive() if err != nil { if s.GetFd() == -1 { return nil, fmt.Errorf("Socket got closed on receive") @@ -453,7 +450,7 @@ func assembleDestination(attrs []syscall.NetlinkRouteAttr) (*Destination, error) d.ActiveConnections = int(native.Uint16(attr.Value)) case ipvsDestAttrInactiveConnections: d.InactiveConnections = int(native.Uint16(attr.Value)) - case ipvsSvcAttrStats: + case ipvsDestAttrStats: stats, err := assembleStats(attr.Value) if err != nil { return nil, err diff --git a/vendor/github.com/moby/term/.gitignore b/vendor/github.com/moby/term/.gitignore new file mode 100644 index 00000000000..df63b129a79 --- /dev/null +++ b/vendor/github.com/moby/term/.gitignore @@ -0,0 +1,24 @@ +# Docker project generated files to ignore +# if you want to ignore files created by your editor/tools, +# please consider a global .gitignore https://help.github.com/articles/ignoring-files +*.exe +*.exe~ +*.gz +*.orig +test.main +.*.swp +.DS_Store +# a .bashrc may be added to customize the build environment +.bashrc +.editorconfig +.gopath/ +.go-pkg-cache/ +.idea/ +autogen/ +bundles/ +cmd/dockerd/dockerd +contrib/builder/rpm/*/changelog +vendor/pkg/ +go-test-report.json +profile.out +junit-report.xml diff --git a/vendor/github.com/moby/term/LICENSE b/vendor/github.com/moby/term/LICENSE new file mode 100644 index 00000000000..6d8d58fb676 --- /dev/null +++ b/vendor/github.com/moby/term/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2018 Docker, Inc. + + 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 + + https://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. diff --git a/vendor/github.com/moby/term/ascii.go b/vendor/github.com/moby/term/ascii.go new file mode 100644 index 00000000000..7c445686f3b --- /dev/null +++ b/vendor/github.com/moby/term/ascii.go @@ -0,0 +1,66 @@ +package term // import "github.com/moby/term" + +import ( + "fmt" + "strings" +) + +// ASCII list the possible supported ASCII key sequence +var ASCII = []string{ + "ctrl-@", + "ctrl-a", + "ctrl-b", + "ctrl-c", + "ctrl-d", + "ctrl-e", + "ctrl-f", + "ctrl-g", + "ctrl-h", + "ctrl-i", + "ctrl-j", + "ctrl-k", + "ctrl-l", + "ctrl-m", + "ctrl-n", + "ctrl-o", + "ctrl-p", + "ctrl-q", + "ctrl-r", + "ctrl-s", + "ctrl-t", + "ctrl-u", + "ctrl-v", + "ctrl-w", + "ctrl-x", + "ctrl-y", + "ctrl-z", + "ctrl-[", + "ctrl-\\", + "ctrl-]", + "ctrl-^", + "ctrl-_", +} + +// ToBytes converts a string representing a suite of key-sequence to the corresponding ASCII code. +func ToBytes(keys string) ([]byte, error) { + codes := []byte{} +next: + for _, key := range strings.Split(keys, ",") { + if len(key) != 1 { + for code, ctrl := range ASCII { + if ctrl == key { + codes = append(codes, byte(code)) + continue next + } + } + if key == "DEL" { + codes = append(codes, 127) + } else { + return nil, fmt.Errorf("Unknown character: '%s'", key) + } + } else { + codes = append(codes, key[0]) + } + } + return codes, nil +} diff --git a/vendor/github.com/moby/term/go.mod b/vendor/github.com/moby/term/go.mod new file mode 100644 index 00000000000..9f23ce0d5e4 --- /dev/null +++ b/vendor/github.com/moby/term/go.mod @@ -0,0 +1,13 @@ +module github.com/moby/term + +go 1.13 + +require ( + github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 + github.com/google/go-cmp v0.3.1 + github.com/pkg/errors v0.9.1 // indirect + github.com/sirupsen/logrus v1.4.2 + golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 + gotest.tools v2.2.0+incompatible + gotest.tools/v3 v3.0.2 // indirect +) diff --git a/vendor/github.com/moby/term/go.sum b/vendor/github.com/moby/term/go.sum new file mode 100644 index 00000000000..413bf366683 --- /dev/null +++ b/vendor/github.com/moby/term/go.sum @@ -0,0 +1,33 @@ +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= diff --git a/vendor/github.com/moby/term/proxy.go b/vendor/github.com/moby/term/proxy.go new file mode 100644 index 00000000000..9573222f9fa --- /dev/null +++ b/vendor/github.com/moby/term/proxy.go @@ -0,0 +1,78 @@ +package term // import "github.com/moby/term" + +import ( + "io" +) + +// EscapeError is special error which returned by a TTY proxy reader's Read() +// method in case its detach escape sequence is read. +type EscapeError struct{} + +func (EscapeError) Error() string { + return "read escape sequence" +} + +// escapeProxy is used only for attaches with a TTY. It is used to proxy +// stdin keypresses from the underlying reader and look for the passed in +// escape key sequence to signal a detach. +type escapeProxy struct { + escapeKeys []byte + escapeKeyPos int + r io.Reader +} + +// NewEscapeProxy returns a new TTY proxy reader which wraps the given reader +// and detects when the specified escape keys are read, in which case the Read +// method will return an error of type EscapeError. +func NewEscapeProxy(r io.Reader, escapeKeys []byte) io.Reader { + return &escapeProxy{ + escapeKeys: escapeKeys, + r: r, + } +} + +func (r *escapeProxy) Read(buf []byte) (int, error) { + nr, err := r.r.Read(buf) + + if len(r.escapeKeys) == 0 { + return nr, err + } + + preserve := func() { + // this preserves the original key presses in the passed in buffer + nr += r.escapeKeyPos + preserve := make([]byte, 0, r.escapeKeyPos+len(buf)) + preserve = append(preserve, r.escapeKeys[:r.escapeKeyPos]...) + preserve = append(preserve, buf...) + r.escapeKeyPos = 0 + copy(buf[0:nr], preserve) + } + + if nr != 1 || err != nil { + if r.escapeKeyPos > 0 { + preserve() + } + return nr, err + } + + if buf[0] != r.escapeKeys[r.escapeKeyPos] { + if r.escapeKeyPos > 0 { + preserve() + } + return nr, nil + } + + if r.escapeKeyPos == len(r.escapeKeys)-1 { + return 0, EscapeError{} + } + + // Looks like we've got an escape key, but we need to match again on the next + // read. + // Store the current escape key we found so we can look for the next one on + // the next read. + // Since this is an escape key, make sure we don't let the caller read it + // If later on we find that this is not the escape sequence, we'll add the + // keys back + r.escapeKeyPos++ + return nr - r.escapeKeyPos, nil +} diff --git a/vendor/github.com/moby/term/tc.go b/vendor/github.com/moby/term/tc.go new file mode 100644 index 00000000000..162dfb2b2f5 --- /dev/null +++ b/vendor/github.com/moby/term/tc.go @@ -0,0 +1,20 @@ +// +build !windows + +package term // import "github.com/moby/term" + +import ( + "syscall" + "unsafe" + + "golang.org/x/sys/unix" +) + +func tcget(fd uintptr, p *Termios) syscall.Errno { + _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(p))) + return err +} + +func tcset(fd uintptr, p *Termios) syscall.Errno { + _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(p))) + return err +} diff --git a/vendor/github.com/moby/term/term.go b/vendor/github.com/moby/term/term.go new file mode 100644 index 00000000000..6d643516f39 --- /dev/null +++ b/vendor/github.com/moby/term/term.go @@ -0,0 +1,124 @@ +// +build !windows + +// Package term provides structures and helper functions to work with +// terminal (state, sizes). +package term // import "github.com/moby/term" + +import ( + "errors" + "fmt" + "io" + "os" + "os/signal" + + "golang.org/x/sys/unix" +) + +var ( + // ErrInvalidState is returned if the state of the terminal is invalid. + ErrInvalidState = errors.New("Invalid terminal state") +) + +// State represents the state of the terminal. +type State struct { + termios Termios +} + +// Winsize represents the size of the terminal window. +type Winsize struct { + Height uint16 + Width uint16 + x uint16 + y uint16 +} + +// StdStreams returns the standard streams (stdin, stdout, stderr). +func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { + return os.Stdin, os.Stdout, os.Stderr +} + +// GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal. +func GetFdInfo(in interface{}) (uintptr, bool) { + var inFd uintptr + var isTerminalIn bool + if file, ok := in.(*os.File); ok { + inFd = file.Fd() + isTerminalIn = IsTerminal(inFd) + } + return inFd, isTerminalIn +} + +// IsTerminal returns true if the given file descriptor is a terminal. +func IsTerminal(fd uintptr) bool { + var termios Termios + return tcget(fd, &termios) == 0 +} + +// RestoreTerminal restores the terminal connected to the given file descriptor +// to a previous state. +func RestoreTerminal(fd uintptr, state *State) error { + if state == nil { + return ErrInvalidState + } + if err := tcset(fd, &state.termios); err != 0 { + return err + } + return nil +} + +// SaveState saves the state of the terminal connected to the given file descriptor. +func SaveState(fd uintptr) (*State, error) { + var oldState State + if err := tcget(fd, &oldState.termios); err != 0 { + return nil, err + } + + return &oldState, nil +} + +// DisableEcho applies the specified state to the terminal connected to the file +// descriptor, with echo disabled. +func DisableEcho(fd uintptr, state *State) error { + newState := state.termios + newState.Lflag &^= unix.ECHO + + if err := tcset(fd, &newState); err != 0 { + return err + } + handleInterrupt(fd, state) + return nil +} + +// SetRawTerminal puts the terminal connected to the given file descriptor into +// raw mode and returns the previous state. On UNIX, this puts both the input +// and output into raw mode. On Windows, it only puts the input into raw mode. +func SetRawTerminal(fd uintptr) (*State, error) { + oldState, err := MakeRaw(fd) + if err != nil { + return nil, err + } + handleInterrupt(fd, oldState) + return oldState, err +} + +// SetRawTerminalOutput puts the output of terminal connected to the given file +// descriptor into raw mode. On UNIX, this does nothing and returns nil for the +// state. On Windows, it disables LF -> CRLF translation. +func SetRawTerminalOutput(fd uintptr) (*State, error) { + return nil, nil +} + +func handleInterrupt(fd uintptr, state *State) { + sigchan := make(chan os.Signal, 1) + signal.Notify(sigchan, os.Interrupt) + go func() { + for range sigchan { + // quit cleanly and the new terminal item is on a new line + fmt.Println() + signal.Stop(sigchan) + close(sigchan) + RestoreTerminal(fd, state) + os.Exit(1) + } + }() +} diff --git a/vendor/github.com/moby/term/term_windows.go b/vendor/github.com/moby/term/term_windows.go new file mode 100644 index 00000000000..1649c230647 --- /dev/null +++ b/vendor/github.com/moby/term/term_windows.go @@ -0,0 +1,221 @@ +package term // import "github.com/moby/term" + +import ( + "io" + "os" + "os/signal" + "syscall" // used for STD_INPUT_HANDLE, STD_OUTPUT_HANDLE and STD_ERROR_HANDLE + + "github.com/Azure/go-ansiterm/winterm" + windowsconsole "github.com/moby/term/windows" +) + +// State holds the console mode for the terminal. +type State struct { + mode uint32 +} + +// Winsize is used for window size. +type Winsize struct { + Height uint16 + Width uint16 +} + +// vtInputSupported is true if winterm.ENABLE_VIRTUAL_TERMINAL_INPUT is supported by the console +var vtInputSupported bool + +// StdStreams returns the standard streams (stdin, stdout, stderr). +func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { + // Turn on VT handling on all std handles, if possible. This might + // fail, in which case we will fall back to terminal emulation. + var emulateStdin, emulateStdout, emulateStderr bool + fd := os.Stdin.Fd() + if mode, err := winterm.GetConsoleMode(fd); err == nil { + // Validate that winterm.ENABLE_VIRTUAL_TERMINAL_INPUT is supported, but do not set it. + if err = winterm.SetConsoleMode(fd, mode|winterm.ENABLE_VIRTUAL_TERMINAL_INPUT); err != nil { + emulateStdin = true + } else { + vtInputSupported = true + } + // Unconditionally set the console mode back even on failure because SetConsoleMode + // remembers invalid bits on input handles. + winterm.SetConsoleMode(fd, mode) + } + + fd = os.Stdout.Fd() + if mode, err := winterm.GetConsoleMode(fd); err == nil { + // Validate winterm.DISABLE_NEWLINE_AUTO_RETURN is supported, but do not set it. + if err = winterm.SetConsoleMode(fd, mode|winterm.ENABLE_VIRTUAL_TERMINAL_PROCESSING|winterm.DISABLE_NEWLINE_AUTO_RETURN); err != nil { + emulateStdout = true + } else { + winterm.SetConsoleMode(fd, mode|winterm.ENABLE_VIRTUAL_TERMINAL_PROCESSING) + } + } + + fd = os.Stderr.Fd() + if mode, err := winterm.GetConsoleMode(fd); err == nil { + // Validate winterm.DISABLE_NEWLINE_AUTO_RETURN is supported, but do not set it. + if err = winterm.SetConsoleMode(fd, mode|winterm.ENABLE_VIRTUAL_TERMINAL_PROCESSING|winterm.DISABLE_NEWLINE_AUTO_RETURN); err != nil { + emulateStderr = true + } else { + winterm.SetConsoleMode(fd, mode|winterm.ENABLE_VIRTUAL_TERMINAL_PROCESSING) + } + } + + // Temporarily use STD_INPUT_HANDLE, STD_OUTPUT_HANDLE and + // STD_ERROR_HANDLE from syscall rather than x/sys/windows as long as + // go-ansiterm hasn't switch to x/sys/windows. + // TODO: switch back to x/sys/windows once go-ansiterm has switched + if emulateStdin { + stdIn = windowsconsole.NewAnsiReader(syscall.STD_INPUT_HANDLE) + } else { + stdIn = os.Stdin + } + + if emulateStdout { + stdOut = windowsconsole.NewAnsiWriter(syscall.STD_OUTPUT_HANDLE) + } else { + stdOut = os.Stdout + } + + if emulateStderr { + stdErr = windowsconsole.NewAnsiWriter(syscall.STD_ERROR_HANDLE) + } else { + stdErr = os.Stderr + } + + return +} + +// GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal. +func GetFdInfo(in interface{}) (uintptr, bool) { + return windowsconsole.GetHandleInfo(in) +} + +// GetWinsize returns the window size based on the specified file descriptor. +func GetWinsize(fd uintptr) (*Winsize, error) { + info, err := winterm.GetConsoleScreenBufferInfo(fd) + if err != nil { + return nil, err + } + + winsize := &Winsize{ + Width: uint16(info.Window.Right - info.Window.Left + 1), + Height: uint16(info.Window.Bottom - info.Window.Top + 1), + } + + return winsize, nil +} + +// IsTerminal returns true if the given file descriptor is a terminal. +func IsTerminal(fd uintptr) bool { + return windowsconsole.IsConsole(fd) +} + +// RestoreTerminal restores the terminal connected to the given file descriptor +// to a previous state. +func RestoreTerminal(fd uintptr, state *State) error { + return winterm.SetConsoleMode(fd, state.mode) +} + +// SaveState saves the state of the terminal connected to the given file descriptor. +func SaveState(fd uintptr) (*State, error) { + mode, e := winterm.GetConsoleMode(fd) + if e != nil { + return nil, e + } + + return &State{mode: mode}, nil +} + +// DisableEcho disables echo for the terminal connected to the given file descriptor. +// -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx +func DisableEcho(fd uintptr, state *State) error { + mode := state.mode + mode &^= winterm.ENABLE_ECHO_INPUT + mode |= winterm.ENABLE_PROCESSED_INPUT | winterm.ENABLE_LINE_INPUT + err := winterm.SetConsoleMode(fd, mode) + if err != nil { + return err + } + + // Register an interrupt handler to catch and restore prior state + restoreAtInterrupt(fd, state) + return nil +} + +// SetRawTerminal puts the terminal connected to the given file descriptor into +// raw mode and returns the previous state. On UNIX, this puts both the input +// and output into raw mode. On Windows, it only puts the input into raw mode. +func SetRawTerminal(fd uintptr) (*State, error) { + state, err := MakeRaw(fd) + if err != nil { + return nil, err + } + + // Register an interrupt handler to catch and restore prior state + restoreAtInterrupt(fd, state) + return state, err +} + +// SetRawTerminalOutput puts the output of terminal connected to the given file +// descriptor into raw mode. On UNIX, this does nothing and returns nil for the +// state. On Windows, it disables LF -> CRLF translation. +func SetRawTerminalOutput(fd uintptr) (*State, error) { + state, err := SaveState(fd) + if err != nil { + return nil, err + } + + // Ignore failures, since winterm.DISABLE_NEWLINE_AUTO_RETURN might not be supported on this + // version of Windows. + winterm.SetConsoleMode(fd, state.mode|winterm.DISABLE_NEWLINE_AUTO_RETURN) + return state, err +} + +// MakeRaw puts the terminal (Windows Console) connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be restored. +func MakeRaw(fd uintptr) (*State, error) { + state, err := SaveState(fd) + if err != nil { + return nil, err + } + + mode := state.mode + + // See + // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx + // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx + + // Disable these modes + mode &^= winterm.ENABLE_ECHO_INPUT + mode &^= winterm.ENABLE_LINE_INPUT + mode &^= winterm.ENABLE_MOUSE_INPUT + mode &^= winterm.ENABLE_WINDOW_INPUT + mode &^= winterm.ENABLE_PROCESSED_INPUT + + // Enable these modes + mode |= winterm.ENABLE_EXTENDED_FLAGS + mode |= winterm.ENABLE_INSERT_MODE + mode |= winterm.ENABLE_QUICK_EDIT_MODE + if vtInputSupported { + mode |= winterm.ENABLE_VIRTUAL_TERMINAL_INPUT + } + + err = winterm.SetConsoleMode(fd, mode) + if err != nil { + return nil, err + } + return state, nil +} + +func restoreAtInterrupt(fd uintptr, state *State) { + sigchan := make(chan os.Signal, 1) + signal.Notify(sigchan, os.Interrupt) + + go func() { + _ = <-sigchan + RestoreTerminal(fd, state) + os.Exit(0) + }() +} diff --git a/vendor/github.com/moby/term/termios_bsd.go b/vendor/github.com/moby/term/termios_bsd.go new file mode 100644 index 00000000000..da785106657 --- /dev/null +++ b/vendor/github.com/moby/term/termios_bsd.go @@ -0,0 +1,42 @@ +// +build darwin freebsd openbsd netbsd + +package term // import "github.com/moby/term" + +import ( + "unsafe" + + "golang.org/x/sys/unix" +) + +const ( + getTermios = unix.TIOCGETA + setTermios = unix.TIOCSETA +) + +// Termios is the Unix API for terminal I/O. +type Termios unix.Termios + +// MakeRaw put the terminal connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be +// restored. +func MakeRaw(fd uintptr) (*State, error) { + var oldState State + if _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, getTermios, uintptr(unsafe.Pointer(&oldState.termios))); err != 0 { + return nil, err + } + + newState := oldState.termios + newState.Iflag &^= (unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON) + newState.Oflag &^= unix.OPOST + newState.Lflag &^= (unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN) + newState.Cflag &^= (unix.CSIZE | unix.PARENB) + newState.Cflag |= unix.CS8 + newState.Cc[unix.VMIN] = 1 + newState.Cc[unix.VTIME] = 0 + + if _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(&newState))); err != 0 { + return nil, err + } + + return &oldState, nil +} diff --git a/vendor/github.com/moby/term/termios_linux.go b/vendor/github.com/moby/term/termios_linux.go new file mode 100644 index 00000000000..be39ff56cc0 --- /dev/null +++ b/vendor/github.com/moby/term/termios_linux.go @@ -0,0 +1,39 @@ +package term // import "github.com/moby/term" + +import ( + "golang.org/x/sys/unix" +) + +const ( + getTermios = unix.TCGETS + setTermios = unix.TCSETS +) + +// Termios is the Unix API for terminal I/O. +type Termios unix.Termios + +// MakeRaw put the terminal connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be +// restored. +func MakeRaw(fd uintptr) (*State, error) { + termios, err := unix.IoctlGetTermios(int(fd), getTermios) + if err != nil { + return nil, err + } + + var oldState State + oldState.termios = Termios(*termios) + + termios.Iflag &^= (unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON) + termios.Oflag &^= unix.OPOST + termios.Lflag &^= (unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN) + termios.Cflag &^= (unix.CSIZE | unix.PARENB) + termios.Cflag |= unix.CS8 + termios.Cc[unix.VMIN] = 1 + termios.Cc[unix.VTIME] = 0 + + if err := unix.IoctlSetTermios(int(fd), setTermios, termios); err != nil { + return nil, err + } + return &oldState, nil +} diff --git a/vendor/github.com/moby/term/windows/ansi_reader.go b/vendor/github.com/moby/term/windows/ansi_reader.go new file mode 100644 index 00000000000..5114b63ebf1 --- /dev/null +++ b/vendor/github.com/moby/term/windows/ansi_reader.go @@ -0,0 +1,263 @@ +// +build windows + +package windowsconsole // import "github.com/moby/term/windows" + +import ( + "bytes" + "errors" + "fmt" + "io" + "os" + "strings" + "unsafe" + + ansiterm "github.com/Azure/go-ansiterm" + "github.com/Azure/go-ansiterm/winterm" +) + +const ( + escapeSequence = ansiterm.KEY_ESC_CSI +) + +// ansiReader wraps a standard input file (e.g., os.Stdin) providing ANSI sequence translation. +type ansiReader struct { + file *os.File + fd uintptr + buffer []byte + cbBuffer int + command []byte +} + +// NewAnsiReader returns an io.ReadCloser that provides VT100 terminal emulation on top of a +// Windows console input handle. +func NewAnsiReader(nFile int) io.ReadCloser { + initLogger() + file, fd := winterm.GetStdFile(nFile) + return &ansiReader{ + file: file, + fd: fd, + command: make([]byte, 0, ansiterm.ANSI_MAX_CMD_LENGTH), + buffer: make([]byte, 0), + } +} + +// Close closes the wrapped file. +func (ar *ansiReader) Close() (err error) { + return ar.file.Close() +} + +// Fd returns the file descriptor of the wrapped file. +func (ar *ansiReader) Fd() uintptr { + return ar.fd +} + +// Read reads up to len(p) bytes of translated input events into p. +func (ar *ansiReader) Read(p []byte) (int, error) { + if len(p) == 0 { + return 0, nil + } + + // Previously read bytes exist, read as much as we can and return + if len(ar.buffer) > 0 { + logger.Debugf("Reading previously cached bytes") + + originalLength := len(ar.buffer) + copiedLength := copy(p, ar.buffer) + + if copiedLength == originalLength { + ar.buffer = make([]byte, 0, len(p)) + } else { + ar.buffer = ar.buffer[copiedLength:] + } + + logger.Debugf("Read from cache p[%d]: % x", copiedLength, p) + return copiedLength, nil + } + + // Read and translate key events + events, err := readInputEvents(ar.fd, len(p)) + if err != nil { + return 0, err + } else if len(events) == 0 { + logger.Debug("No input events detected") + return 0, nil + } + + keyBytes := translateKeyEvents(events, []byte(escapeSequence)) + + // Save excess bytes and right-size keyBytes + if len(keyBytes) > len(p) { + logger.Debugf("Received %d keyBytes, only room for %d bytes", len(keyBytes), len(p)) + ar.buffer = keyBytes[len(p):] + keyBytes = keyBytes[:len(p)] + } else if len(keyBytes) == 0 { + logger.Debug("No key bytes returned from the translator") + return 0, nil + } + + copiedLength := copy(p, keyBytes) + if copiedLength != len(keyBytes) { + return 0, errors.New("unexpected copy length encountered") + } + + logger.Debugf("Read p[%d]: % x", copiedLength, p) + logger.Debugf("Read keyBytes[%d]: % x", copiedLength, keyBytes) + return copiedLength, nil +} + +// readInputEvents polls until at least one event is available. +func readInputEvents(fd uintptr, maxBytes int) ([]winterm.INPUT_RECORD, error) { + // Determine the maximum number of records to retrieve + // -- Cast around the type system to obtain the size of a single INPUT_RECORD. + // unsafe.Sizeof requires an expression vs. a type-reference; the casting + // tricks the type system into believing it has such an expression. + recordSize := int(unsafe.Sizeof(*((*winterm.INPUT_RECORD)(unsafe.Pointer(&maxBytes))))) + countRecords := maxBytes / recordSize + if countRecords > ansiterm.MAX_INPUT_EVENTS { + countRecords = ansiterm.MAX_INPUT_EVENTS + } else if countRecords == 0 { + countRecords = 1 + } + logger.Debugf("[windows] readInputEvents: Reading %v records (buffer size %v, record size %v)", countRecords, maxBytes, recordSize) + + // Wait for and read input events + events := make([]winterm.INPUT_RECORD, countRecords) + nEvents := uint32(0) + eventsExist, err := winterm.WaitForSingleObject(fd, winterm.WAIT_INFINITE) + if err != nil { + return nil, err + } + + if eventsExist { + err = winterm.ReadConsoleInput(fd, events, &nEvents) + if err != nil { + return nil, err + } + } + + // Return a slice restricted to the number of returned records + logger.Debugf("[windows] readInputEvents: Read %v events", nEvents) + return events[:nEvents], nil +} + +// KeyEvent Translation Helpers + +var arrowKeyMapPrefix = map[uint16]string{ + winterm.VK_UP: "%s%sA", + winterm.VK_DOWN: "%s%sB", + winterm.VK_RIGHT: "%s%sC", + winterm.VK_LEFT: "%s%sD", +} + +var keyMapPrefix = map[uint16]string{ + winterm.VK_UP: "\x1B[%sA", + winterm.VK_DOWN: "\x1B[%sB", + winterm.VK_RIGHT: "\x1B[%sC", + winterm.VK_LEFT: "\x1B[%sD", + winterm.VK_HOME: "\x1B[1%s~", // showkey shows ^[[1 + winterm.VK_END: "\x1B[4%s~", // showkey shows ^[[4 + winterm.VK_INSERT: "\x1B[2%s~", + winterm.VK_DELETE: "\x1B[3%s~", + winterm.VK_PRIOR: "\x1B[5%s~", + winterm.VK_NEXT: "\x1B[6%s~", + winterm.VK_F1: "", + winterm.VK_F2: "", + winterm.VK_F3: "\x1B[13%s~", + winterm.VK_F4: "\x1B[14%s~", + winterm.VK_F5: "\x1B[15%s~", + winterm.VK_F6: "\x1B[17%s~", + winterm.VK_F7: "\x1B[18%s~", + winterm.VK_F8: "\x1B[19%s~", + winterm.VK_F9: "\x1B[20%s~", + winterm.VK_F10: "\x1B[21%s~", + winterm.VK_F11: "\x1B[23%s~", + winterm.VK_F12: "\x1B[24%s~", +} + +// translateKeyEvents converts the input events into the appropriate ANSI string. +func translateKeyEvents(events []winterm.INPUT_RECORD, escapeSequence []byte) []byte { + var buffer bytes.Buffer + for _, event := range events { + if event.EventType == winterm.KEY_EVENT && event.KeyEvent.KeyDown != 0 { + buffer.WriteString(keyToString(&event.KeyEvent, escapeSequence)) + } + } + + return buffer.Bytes() +} + +// keyToString maps the given input event record to the corresponding string. +func keyToString(keyEvent *winterm.KEY_EVENT_RECORD, escapeSequence []byte) string { + if keyEvent.UnicodeChar == 0 { + return formatVirtualKey(keyEvent.VirtualKeyCode, keyEvent.ControlKeyState, escapeSequence) + } + + _, alt, control := getControlKeys(keyEvent.ControlKeyState) + if control { + // TODO(azlinux): Implement following control sequences + // -D Signals the end of input from the keyboard; also exits current shell. + // -H Deletes the first character to the left of the cursor. Also called the ERASE key. + // -Q Restarts printing after it has been stopped with -s. + // -S Suspends printing on the screen (does not stop the program). + // -U Deletes all characters on the current line. Also called the KILL key. + // -E Quits current command and creates a core + + } + + // +Key generates ESC N Key + if !control && alt { + return ansiterm.KEY_ESC_N + strings.ToLower(string(keyEvent.UnicodeChar)) + } + + return string(keyEvent.UnicodeChar) +} + +// formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string. +func formatVirtualKey(key uint16, controlState uint32, escapeSequence []byte) string { + shift, alt, control := getControlKeys(controlState) + modifier := getControlKeysModifier(shift, alt, control) + + if format, ok := arrowKeyMapPrefix[key]; ok { + return fmt.Sprintf(format, escapeSequence, modifier) + } + + if format, ok := keyMapPrefix[key]; ok { + return fmt.Sprintf(format, modifier) + } + + return "" +} + +// getControlKeys extracts the shift, alt, and ctrl key states. +func getControlKeys(controlState uint32) (shift, alt, control bool) { + shift = 0 != (controlState & winterm.SHIFT_PRESSED) + alt = 0 != (controlState & (winterm.LEFT_ALT_PRESSED | winterm.RIGHT_ALT_PRESSED)) + control = 0 != (controlState & (winterm.LEFT_CTRL_PRESSED | winterm.RIGHT_CTRL_PRESSED)) + return shift, alt, control +} + +// getControlKeysModifier returns the ANSI modifier for the given combination of control keys. +func getControlKeysModifier(shift, alt, control bool) string { + if shift && alt && control { + return ansiterm.KEY_CONTROL_PARAM_8 + } + if alt && control { + return ansiterm.KEY_CONTROL_PARAM_7 + } + if shift && control { + return ansiterm.KEY_CONTROL_PARAM_6 + } + if control { + return ansiterm.KEY_CONTROL_PARAM_5 + } + if shift && alt { + return ansiterm.KEY_CONTROL_PARAM_4 + } + if alt { + return ansiterm.KEY_CONTROL_PARAM_3 + } + if shift { + return ansiterm.KEY_CONTROL_PARAM_2 + } + return "" +} diff --git a/vendor/github.com/moby/term/windows/ansi_writer.go b/vendor/github.com/moby/term/windows/ansi_writer.go new file mode 100644 index 00000000000..51bf9aa48cf --- /dev/null +++ b/vendor/github.com/moby/term/windows/ansi_writer.go @@ -0,0 +1,64 @@ +// +build windows + +package windowsconsole // import "github.com/moby/term/windows" + +import ( + "io" + "os" + + ansiterm "github.com/Azure/go-ansiterm" + "github.com/Azure/go-ansiterm/winterm" +) + +// ansiWriter wraps a standard output file (e.g., os.Stdout) providing ANSI sequence translation. +type ansiWriter struct { + file *os.File + fd uintptr + infoReset *winterm.CONSOLE_SCREEN_BUFFER_INFO + command []byte + escapeSequence []byte + inAnsiSequence bool + parser *ansiterm.AnsiParser +} + +// NewAnsiWriter returns an io.Writer that provides VT100 terminal emulation on top of a +// Windows console output handle. +func NewAnsiWriter(nFile int) io.Writer { + initLogger() + file, fd := winterm.GetStdFile(nFile) + info, err := winterm.GetConsoleScreenBufferInfo(fd) + if err != nil { + return nil + } + + parser := ansiterm.CreateParser("Ground", winterm.CreateWinEventHandler(fd, file)) + logger.Infof("newAnsiWriter: parser %p", parser) + + aw := &ansiWriter{ + file: file, + fd: fd, + infoReset: info, + command: make([]byte, 0, ansiterm.ANSI_MAX_CMD_LENGTH), + escapeSequence: []byte(ansiterm.KEY_ESC_CSI), + parser: parser, + } + + logger.Infof("newAnsiWriter: aw.parser %p", aw.parser) + logger.Infof("newAnsiWriter: %v", aw) + return aw +} + +func (aw *ansiWriter) Fd() uintptr { + return aw.fd +} + +// Write writes len(p) bytes from p to the underlying data stream. +func (aw *ansiWriter) Write(p []byte) (total int, err error) { + if len(p) == 0 { + return 0, nil + } + + logger.Infof("Write: % x", p) + logger.Infof("Write: %s", string(p)) + return aw.parser.Parse(p) +} diff --git a/vendor/github.com/moby/term/windows/console.go b/vendor/github.com/moby/term/windows/console.go new file mode 100644 index 00000000000..54e0fe839fc --- /dev/null +++ b/vendor/github.com/moby/term/windows/console.go @@ -0,0 +1,35 @@ +// +build windows + +package windowsconsole // import "github.com/moby/term/windows" + +import ( + "os" + + "github.com/Azure/go-ansiterm/winterm" +) + +// GetHandleInfo returns file descriptor and bool indicating whether the file is a console. +func GetHandleInfo(in interface{}) (uintptr, bool) { + switch t := in.(type) { + case *ansiReader: + return t.Fd(), true + case *ansiWriter: + return t.Fd(), true + } + + var inFd uintptr + var isTerminal bool + + if file, ok := in.(*os.File); ok { + inFd = file.Fd() + isTerminal = IsConsole(inFd) + } + return inFd, isTerminal +} + +// IsConsole returns true if the given file descriptor is a Windows Console. +// The code assumes that GetConsoleMode will return an error for file descriptors that are not a console. +func IsConsole(fd uintptr) bool { + _, e := winterm.GetConsoleMode(fd) + return e == nil +} diff --git a/vendor/github.com/moby/term/windows/windows.go b/vendor/github.com/moby/term/windows/windows.go new file mode 100644 index 00000000000..bb03e060181 --- /dev/null +++ b/vendor/github.com/moby/term/windows/windows.go @@ -0,0 +1,34 @@ +// +build windows +// These files implement ANSI-aware input and output streams for use by the Docker Windows client. +// When asked for the set of standard streams (e.g., stdin, stdout, stderr), the code will create +// and return pseudo-streams that convert ANSI sequences to / from Windows Console API calls. + +package windowsconsole // import "github.com/moby/term/windows" + +import ( + "io/ioutil" + "os" + "sync" + + ansiterm "github.com/Azure/go-ansiterm" + "github.com/sirupsen/logrus" +) + +var logger *logrus.Logger +var initOnce sync.Once + +func initLogger() { + initOnce.Do(func() { + logFile := ioutil.Discard + + if isDebugEnv := os.Getenv(ansiterm.LogEnv); isDebugEnv == "1" { + logFile, _ = os.Create("ansiReaderWriter.log") + } + + logger = &logrus.Logger{ + Out: logFile, + Formatter: new(logrus.TextFormatter), + Level: logrus.DebugLevel, + } + }) +} diff --git a/vendor/github.com/moby/term/winsize.go b/vendor/github.com/moby/term/winsize.go new file mode 100644 index 00000000000..29a0463dc46 --- /dev/null +++ b/vendor/github.com/moby/term/winsize.go @@ -0,0 +1,20 @@ +// +build !windows + +package term // import "github.com/moby/term" + +import ( + "golang.org/x/sys/unix" +) + +// GetWinsize returns the window size based on the specified file descriptor. +func GetWinsize(fd uintptr) (*Winsize, error) { + uws, err := unix.IoctlGetWinsize(int(fd), unix.TIOCGWINSZ) + ws := &Winsize{Height: uws.Row, Width: uws.Col, x: uws.Xpixel, y: uws.Ypixel} + return ws, err +} + +// SetWinsize tries to set the specified window size for the specified file descriptor. +func SetWinsize(fd uintptr, ws *Winsize) error { + uws := &unix.Winsize{Row: ws.Height, Col: ws.Width, Xpixel: ws.x, Ypixel: ws.y} + return unix.IoctlSetWinsize(int(fd), unix.TIOCSWINSZ, uws) +} diff --git a/vendor/github.com/mrunalp/fileutils/fileutils.go b/vendor/github.com/mrunalp/fileutils/fileutils.go index 5a9818a24ec..136bbd9fb24 100644 --- a/vendor/github.com/mrunalp/fileutils/fileutils.go +++ b/vendor/github.com/mrunalp/fileutils/fileutils.go @@ -22,9 +22,10 @@ func CopyFile(source string, dest string) error { uid := int(st.Uid) gid := int(st.Gid) + modeType := si.Mode()&os.ModeType // Handle symlinks - if si.Mode()&os.ModeSymlink != 0 { + if modeType == os.ModeSymlink { target, err := os.Readlink(source) if err != nil { return err @@ -35,15 +36,14 @@ func CopyFile(source string, dest string) error { } // Handle device files - if st.Mode&syscall.S_IFMT == syscall.S_IFBLK || st.Mode&syscall.S_IFMT == syscall.S_IFCHR { + if modeType == os.ModeDevice { devMajor := int64(major(uint64(st.Rdev))) devMinor := int64(minor(uint64(st.Rdev))) - mode := uint32(si.Mode() & 07777) - if st.Mode&syscall.S_IFMT == syscall.S_IFBLK { - mode |= syscall.S_IFBLK - } - if st.Mode&syscall.S_IFMT == syscall.S_IFCHR { + mode := uint32(si.Mode() & os.ModePerm) + if si.Mode()&os.ModeCharDevice != 0 { mode |= syscall.S_IFCHR + } else { + mode |= syscall.S_IFBLK } if err := syscall.Mknod(dest, mode, int(mkdev(devMajor, devMinor))); err != nil { return err @@ -76,7 +76,7 @@ func CopyFile(source string, dest string) error { } // Chmod the file - if !(si.Mode()&os.ModeSymlink == os.ModeSymlink) { + if !(modeType == os.ModeSymlink) { if err := os.Chmod(dest, si.Mode()); err != nil { return err } diff --git a/vendor/github.com/mrunalp/fileutils/idtools.go b/vendor/github.com/mrunalp/fileutils/idtools.go index 161aec8f5e8..bad6539df53 100644 --- a/vendor/github.com/mrunalp/fileutils/idtools.go +++ b/vendor/github.com/mrunalp/fileutils/idtools.go @@ -3,6 +3,7 @@ package fileutils import ( "os" "path/filepath" + "syscall" ) // MkdirAllNewAs creates a directory (include any along the path) and then modifies @@ -14,9 +15,13 @@ func MkdirAllNewAs(path string, mode os.FileMode, ownerUID, ownerGID int) error // so that we can chown all of them properly at the end. If chownExisting is false, we won't // chown the full directory path if it exists var paths []string - if _, err := os.Stat(path); err != nil && os.IsNotExist(err) { + st, err := os.Stat(path) + if err != nil && os.IsNotExist(err) { paths = []string{path} } else if err == nil { + if !st.IsDir() { + return &os.PathError{Op: "mkdir", Path: path, Err: syscall.ENOTDIR} + } // nothing to do; directory path fully exists already return nil } @@ -34,7 +39,7 @@ func MkdirAllNewAs(path string, mode os.FileMode, ownerUID, ownerGID int) error } } - if err := os.MkdirAll(path, mode); err != nil && !os.IsExist(err) { + if err := os.MkdirAll(path, mode); err != nil { return err } diff --git a/vendor/github.com/opencontainers/go-digest/.mailmap b/vendor/github.com/opencontainers/go-digest/.mailmap index ba611cb21ca..eaf8b2f9e6c 100644 --- a/vendor/github.com/opencontainers/go-digest/.mailmap +++ b/vendor/github.com/opencontainers/go-digest/.mailmap @@ -1 +1,4 @@ +Aaron Lehmann +Derek McGowan Stephen J Day +Haibing Zhou diff --git a/vendor/github.com/opencontainers/go-digest/.pullapprove.yml b/vendor/github.com/opencontainers/go-digest/.pullapprove.yml index 45fa4b9ec5f..b6165f83ca7 100644 --- a/vendor/github.com/opencontainers/go-digest/.pullapprove.yml +++ b/vendor/github.com/opencontainers/go-digest/.pullapprove.yml @@ -1,12 +1,28 @@ -approve_by_comment: true -approve_regex: '^(Approved|lgtm|LGTM|:shipit:|:star:|:\+1:|:ship:)' -reject_regex: ^Rejected -reset_on_push: true -author_approval: ignored -signed_off_by: - required: true -reviewers: - teams: - - go-digest-maintainers - name: default +version: 2 + +requirements: + signed_off_by: + required: true + +always_pending: + title_regex: '^WIP' + explanation: 'Work in progress...' + +group_defaults: required: 2 + approve_by_comment: + enabled: true + approve_regex: '^LGTM' + reject_regex: '^Rejected' + reset_on_push: + enabled: true + author_approval: + ignored: true + conditions: + branches: + - master + +groups: + go-digest: + teams: + - go-digest-maintainers diff --git a/vendor/github.com/opencontainers/go-digest/.travis.yml b/vendor/github.com/opencontainers/go-digest/.travis.yml index 7ea4ed1d2c9..5775f885c1e 100644 --- a/vendor/github.com/opencontainers/go-digest/.travis.yml +++ b/vendor/github.com/opencontainers/go-digest/.travis.yml @@ -1,4 +1,5 @@ language: go go: - - 1.7 + - 1.12.x + - 1.13.x - master diff --git a/vendor/github.com/opencontainers/go-digest/LICENSE b/vendor/github.com/opencontainers/go-digest/LICENSE new file mode 100644 index 00000000000..3ac8ab64872 --- /dev/null +++ b/vendor/github.com/opencontainers/go-digest/LICENSE @@ -0,0 +1,192 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2019, 2020 OCI Contributors + Copyright 2016 Docker, Inc. + + 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 + + https://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. diff --git a/vendor/github.com/opencontainers/go-digest/MAINTAINERS b/vendor/github.com/opencontainers/go-digest/MAINTAINERS index 42a29795d7a..843b1b20618 100644 --- a/vendor/github.com/opencontainers/go-digest/MAINTAINERS +++ b/vendor/github.com/opencontainers/go-digest/MAINTAINERS @@ -1,9 +1,5 @@ -Aaron Lehmann (@aaronlehmann) -Brandon Philips (@philips) -Brendan Burns (@brendandburns) Derek McGowan (@dmcgowan) -Jason Bouzane (@jbouzane) -John Starks (@jstarks) -Jonathan Boulle (@jonboulle) -Stephen Day (@stevvooe) -Vincent Batts (@vbatts) +Stephen Day (@stevvooe) +Vincent Batts (@vbatts) +Akihiro Suda (@AkihiroSuda) +Sebastiaan van Stijn (@thaJeztah) diff --git a/vendor/github.com/opencontainers/go-digest/README.md b/vendor/github.com/opencontainers/go-digest/README.md index 0f5a04092c4..a11287207ed 100644 --- a/vendor/github.com/opencontainers/go-digest/README.md +++ b/vendor/github.com/opencontainers/go-digest/README.md @@ -8,20 +8,16 @@ Please see the [godoc](https://godoc.org/github.com/opencontainers/go-digest) fo # What is a digest? -A digest is just a hash. +A digest is just a [hash](https://en.wikipedia.org/wiki/Hash_function). -The most common use case for a digest is to create a content -identifier for use in [Content Addressable Storage](https://en.wikipedia.org/wiki/Content-addressable_storage) -systems: +The most common use case for a digest is to create a content identifier for use in [Content Addressable Storage](https://en.wikipedia.org/wiki/Content-addressable_storage) systems: ```go id := digest.FromBytes([]byte("my content")) ``` -In the example above, the id can be used to uniquely identify -the byte slice "my content". This allows two disparate applications -to agree on a verifiable identifier without having to trust one -another. +In the example above, the id can be used to uniquely identify the byte slice "my content". +This allows two disparate applications to agree on a verifiable identifier without having to trust one another. An identifying digest can be verified, as follows: @@ -31,8 +27,7 @@ if id != digest.FromBytes([]byte("my content")) { } ``` -A `Verifier` type can be used to handle cases where an `io.Reader` -makes more sense: +A `Verifier` type can be used to handle cases where an `io.Reader` makes more sense: ```go rd := getContent() @@ -44,33 +39,28 @@ if !verifier.Verified() { } ``` -Using [Merkle DAGs](https://en.wikipedia.org/wiki/Merkle_tree), this -can power a rich, safe, content distribution system. +Using [Merkle DAGs](https://en.wikipedia.org/wiki/Merkle_tree), this can power a rich, safe, content distribution system. # Usage -While the [godoc](https://godoc.org/github.com/opencontainers/go-digest) is -considered the best resource, a few important items need to be called -out when using this package. +While the [godoc](https://godoc.org/github.com/opencontainers/go-digest) is considered the best resource, a few important items need to be called out when using this package. -1. Make sure to import the hash implementations into your application - or the package will panic. You should have something like the - following in the main (or other entrypoint) of your application: +1. Make sure to import the hash implementations into your application or the package will panic. + You should have something like the following in the main (or other entrypoint) of your application: ```go import ( _ "crypto/sha256" - _ "crypto/sha512" + _ "crypto/sha512" ) ``` This may seem inconvenient but it allows you replace the hash implementations with others, such as https://github.com/stevvooe/resumable. -2. Even though `digest.Digest` may be assemable as a string, _always_ - verify your input with `digest.Parse` or use `Digest.Validate` - when accepting untrusted input. While there are measures to - avoid common problems, this will ensure you have valid digests - in the rest of your application. +2. Even though `digest.Digest` may be assemblable as a string, _always_ verify your input with `digest.Parse` or use `Digest.Validate` when accepting untrusted input. + While there are measures to avoid common problems, this will ensure you have valid digests in the rest of your application. + +3. While alternative encodings of hash values (digests) are possible (for example, base64), this package deals exclusively with hex-encoded digests. # Stability @@ -80,25 +70,27 @@ As always, before using a package export, read the [godoc](https://godoc.org/git # Contributing -This package is considered fairly complete. It has been in production -in thousands (millions?) of deployments and is fairly battle-hardened. -New additions will be met with skepticism. If you think there is a -missing feature, please file a bug clearly describing the problem and -the alternatives you tried before submitting a PR. +This package is considered fairly complete. +It has been in production in thousands (millions?) of deployments and is fairly battle-hardened. +New additions will be met with skepticism. +If you think there is a missing feature, please file a bug clearly describing the problem and the alternatives you tried before submitting a PR. -# Reporting security issues +## Code of Conduct -Please DO NOT file a public issue, instead send your report privately to -security@opencontainers.org. +Participation in the OpenContainers community is governed by [OpenContainer's Code of Conduct][code-of-conduct]. -The maintainers take security seriously. If you discover a security issue, -please bring it to their attention right away! +## Security -If you are reporting a security issue, do not create an issue or file a pull -request on GitHub. Instead, disclose the issue responsibly by sending an email -to security@opencontainers.org (which is inhabited only by the maintainers of -the various OCI projects). +If you find an issue, please follow the [security][security] protocol to report it. # Copyright and license -Copyright © 2016 Docker, Inc. All rights reserved, except as follows. Code is released under the [Apache 2.0 license](LICENSE.code). This `README.md` file and the [`CONTRIBUTING.md`](CONTRIBUTING.md) file are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file [`LICENSE.docs`](LICENSE.docs). You may obtain a duplicate copy of the same license, titled CC BY-SA 4.0, at http://creativecommons.org/licenses/by-sa/4.0/. +Copyright © 2019, 2020 OCI Contributors +Copyright © 2016 Docker, Inc. +All rights reserved, except as follows. +Code is released under the [Apache 2.0 license](LICENSE). +This `README.md` file and the [`CONTRIBUTING.md`](CONTRIBUTING.md) file are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file [`LICENSE.docs`](LICENSE.docs). +You may obtain a duplicate copy of the same license, titled CC BY-SA 4.0, at http://creativecommons.org/licenses/by-sa/4.0/. + +[security]: https://github.com/opencontainers/org/blob/master/security +[code-of-conduct]: https://github.com/opencontainers/org/blob/master/CODE_OF_CONDUCT.md diff --git a/vendor/github.com/opencontainers/go-digest/algorithm.go b/vendor/github.com/opencontainers/go-digest/algorithm.go index 8813bd26f1f..490951dc3f2 100644 --- a/vendor/github.com/opencontainers/go-digest/algorithm.go +++ b/vendor/github.com/opencontainers/go-digest/algorithm.go @@ -1,3 +1,4 @@ +// Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vendor/github.com/opencontainers/go-digest/digest.go b/vendor/github.com/opencontainers/go-digest/digest.go index ad398cba2fb..518b5e71545 100644 --- a/vendor/github.com/opencontainers/go-digest/digest.go +++ b/vendor/github.com/opencontainers/go-digest/digest.go @@ -1,3 +1,4 @@ +// Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vendor/github.com/opencontainers/go-digest/digester.go b/vendor/github.com/opencontainers/go-digest/digester.go index 36fa2728ef4..ede90775711 100644 --- a/vendor/github.com/opencontainers/go-digest/digester.go +++ b/vendor/github.com/opencontainers/go-digest/digester.go @@ -1,3 +1,4 @@ +// Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vendor/github.com/opencontainers/go-digest/digestset/set.go b/vendor/github.com/opencontainers/go-digest/digestset/set.go new file mode 100644 index 00000000000..71f24184ca2 --- /dev/null +++ b/vendor/github.com/opencontainers/go-digest/digestset/set.go @@ -0,0 +1,262 @@ +// Copyright 2020, 2020 OCI Contributors +// Copyright 2017 Docker, Inc. +// +// 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 +// +// https://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 digestset + +import ( + "errors" + "sort" + "strings" + "sync" + + digest "github.com/opencontainers/go-digest" +) + +var ( + // ErrDigestNotFound is used when a matching digest + // could not be found in a set. + ErrDigestNotFound = errors.New("digest not found") + + // ErrDigestAmbiguous is used when multiple digests + // are found in a set. None of the matching digests + // should be considered valid matches. + ErrDigestAmbiguous = errors.New("ambiguous digest string") +) + +// Set is used to hold a unique set of digests which +// may be easily referenced by easily referenced by a string +// representation of the digest as well as short representation. +// The uniqueness of the short representation is based on other +// digests in the set. If digests are omitted from this set, +// collisions in a larger set may not be detected, therefore it +// is important to always do short representation lookups on +// the complete set of digests. To mitigate collisions, an +// appropriately long short code should be used. +type Set struct { + mutex sync.RWMutex + entries digestEntries +} + +// NewSet creates an empty set of digests +// which may have digests added. +func NewSet() *Set { + return &Set{ + entries: digestEntries{}, + } +} + +// checkShortMatch checks whether two digests match as either whole +// values or short values. This function does not test equality, +// rather whether the second value could match against the first +// value. +func checkShortMatch(alg digest.Algorithm, hex, shortAlg, shortHex string) bool { + if len(hex) == len(shortHex) { + if hex != shortHex { + return false + } + if len(shortAlg) > 0 && string(alg) != shortAlg { + return false + } + } else if !strings.HasPrefix(hex, shortHex) { + return false + } else if len(shortAlg) > 0 && string(alg) != shortAlg { + return false + } + return true +} + +// Lookup looks for a digest matching the given string representation. +// If no digests could be found ErrDigestNotFound will be returned +// with an empty digest value. If multiple matches are found +// ErrDigestAmbiguous will be returned with an empty digest value. +func (dst *Set) Lookup(d string) (digest.Digest, error) { + dst.mutex.RLock() + defer dst.mutex.RUnlock() + if len(dst.entries) == 0 { + return "", ErrDigestNotFound + } + var ( + searchFunc func(int) bool + alg digest.Algorithm + hex string + ) + dgst, err := digest.Parse(d) + if err == digest.ErrDigestInvalidFormat { + hex = d + searchFunc = func(i int) bool { + return dst.entries[i].val >= d + } + } else { + hex = dgst.Hex() + alg = dgst.Algorithm() + searchFunc = func(i int) bool { + if dst.entries[i].val == hex { + return dst.entries[i].alg >= alg + } + return dst.entries[i].val >= hex + } + } + idx := sort.Search(len(dst.entries), searchFunc) + if idx == len(dst.entries) || !checkShortMatch(dst.entries[idx].alg, dst.entries[idx].val, string(alg), hex) { + return "", ErrDigestNotFound + } + if dst.entries[idx].alg == alg && dst.entries[idx].val == hex { + return dst.entries[idx].digest, nil + } + if idx+1 < len(dst.entries) && checkShortMatch(dst.entries[idx+1].alg, dst.entries[idx+1].val, string(alg), hex) { + return "", ErrDigestAmbiguous + } + + return dst.entries[idx].digest, nil +} + +// Add adds the given digest to the set. An error will be returned +// if the given digest is invalid. If the digest already exists in the +// set, this operation will be a no-op. +func (dst *Set) Add(d digest.Digest) error { + if err := d.Validate(); err != nil { + return err + } + dst.mutex.Lock() + defer dst.mutex.Unlock() + entry := &digestEntry{alg: d.Algorithm(), val: d.Hex(), digest: d} + searchFunc := func(i int) bool { + if dst.entries[i].val == entry.val { + return dst.entries[i].alg >= entry.alg + } + return dst.entries[i].val >= entry.val + } + idx := sort.Search(len(dst.entries), searchFunc) + if idx == len(dst.entries) { + dst.entries = append(dst.entries, entry) + return nil + } else if dst.entries[idx].digest == d { + return nil + } + + entries := append(dst.entries, nil) + copy(entries[idx+1:], entries[idx:len(entries)-1]) + entries[idx] = entry + dst.entries = entries + return nil +} + +// Remove removes the given digest from the set. An err will be +// returned if the given digest is invalid. If the digest does +// not exist in the set, this operation will be a no-op. +func (dst *Set) Remove(d digest.Digest) error { + if err := d.Validate(); err != nil { + return err + } + dst.mutex.Lock() + defer dst.mutex.Unlock() + entry := &digestEntry{alg: d.Algorithm(), val: d.Hex(), digest: d} + searchFunc := func(i int) bool { + if dst.entries[i].val == entry.val { + return dst.entries[i].alg >= entry.alg + } + return dst.entries[i].val >= entry.val + } + idx := sort.Search(len(dst.entries), searchFunc) + // Not found if idx is after or value at idx is not digest + if idx == len(dst.entries) || dst.entries[idx].digest != d { + return nil + } + + entries := dst.entries + copy(entries[idx:], entries[idx+1:]) + entries = entries[:len(entries)-1] + dst.entries = entries + + return nil +} + +// All returns all the digests in the set +func (dst *Set) All() []digest.Digest { + dst.mutex.RLock() + defer dst.mutex.RUnlock() + retValues := make([]digest.Digest, len(dst.entries)) + for i := range dst.entries { + retValues[i] = dst.entries[i].digest + } + + return retValues +} + +// ShortCodeTable returns a map of Digest to unique short codes. The +// length represents the minimum value, the maximum length may be the +// entire value of digest if uniqueness cannot be achieved without the +// full value. This function will attempt to make short codes as short +// as possible to be unique. +func ShortCodeTable(dst *Set, length int) map[digest.Digest]string { + dst.mutex.RLock() + defer dst.mutex.RUnlock() + m := make(map[digest.Digest]string, len(dst.entries)) + l := length + resetIdx := 0 + for i := 0; i < len(dst.entries); i++ { + var short string + extended := true + for extended { + extended = false + if len(dst.entries[i].val) <= l { + short = dst.entries[i].digest.String() + } else { + short = dst.entries[i].val[:l] + for j := i + 1; j < len(dst.entries); j++ { + if checkShortMatch(dst.entries[j].alg, dst.entries[j].val, "", short) { + if j > resetIdx { + resetIdx = j + } + extended = true + } else { + break + } + } + if extended { + l++ + } + } + } + m[dst.entries[i].digest] = short + if i >= resetIdx { + l = length + } + } + return m +} + +type digestEntry struct { + alg digest.Algorithm + val string + digest digest.Digest +} + +type digestEntries []*digestEntry + +func (d digestEntries) Len() int { + return len(d) +} + +func (d digestEntries) Less(i, j int) bool { + if d[i].val != d[j].val { + return d[i].val < d[j].val + } + return d[i].alg < d[j].alg +} + +func (d digestEntries) Swap(i, j int) { + d[i], d[j] = d[j], d[i] +} diff --git a/vendor/github.com/opencontainers/go-digest/doc.go b/vendor/github.com/opencontainers/go-digest/doc.go index 491ea1ef1f8..83d3a936ca6 100644 --- a/vendor/github.com/opencontainers/go-digest/doc.go +++ b/vendor/github.com/opencontainers/go-digest/doc.go @@ -1,3 +1,4 @@ +// Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,8 +30,13 @@ // // sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc // -// In this case, the string "sha256" is the algorithm and the hex bytes are -// the "digest". +// The "algorithm" portion defines both the hashing algorithm used to calculate +// the digest and the encoding of the resulting digest, which defaults to "hex" +// if not otherwise specified. Currently, all supported algorithms have their +// digests encoded in hex strings. +// +// In the example above, the string "sha256" is the algorithm and the hex bytes +// are the "digest". // // Because the Digest type is simply a string, once a valid Digest is // obtained, comparisons are cheap, quick and simple to express with the diff --git a/vendor/github.com/opencontainers/go-digest/go.mod b/vendor/github.com/opencontainers/go-digest/go.mod new file mode 100644 index 00000000000..cf5d7b1d2d7 --- /dev/null +++ b/vendor/github.com/opencontainers/go-digest/go.mod @@ -0,0 +1,3 @@ +module github.com/opencontainers/go-digest + +go 1.13 diff --git a/vendor/github.com/opencontainers/go-digest/verifiers.go b/vendor/github.com/opencontainers/go-digest/verifiers.go index 32125e91878..afef506f464 100644 --- a/vendor/github.com/opencontainers/go-digest/verifiers.go +++ b/vendor/github.com/opencontainers/go-digest/verifiers.go @@ -1,3 +1,4 @@ +// Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vendor/github.com/opencontainers/runc/.gitignore b/vendor/github.com/opencontainers/runc/.gitignore index 282e34ec294..84485cb9432 100644 --- a/vendor/github.com/opencontainers/runc/.gitignore +++ b/vendor/github.com/opencontainers/runc/.gitignore @@ -4,3 +4,5 @@ vendor/pkg contrib/cmd/recvtty/recvtty man/man8 release +Vagrantfile +.vagrant diff --git a/vendor/github.com/opencontainers/runc/.pullapprove.yml b/vendor/github.com/opencontainers/runc/.pullapprove.yml deleted file mode 100644 index fc8c5d35f7b..00000000000 --- a/vendor/github.com/opencontainers/runc/.pullapprove.yml +++ /dev/null @@ -1,10 +0,0 @@ -approve_by_comment: true -approve_regex: ^LGTM -reject_regex: ^Rejected -reset_on_push: true -author_approval: ignored -reviewers: - teams: - - runc-maintainers - name: default - required: 2 diff --git a/vendor/github.com/opencontainers/runc/.travis.yml b/vendor/github.com/opencontainers/runc/.travis.yml index 5c2928df25c..ca9a8dc9f98 100644 --- a/vendor/github.com/opencontainers/runc/.travis.yml +++ b/vendor/github.com/opencontainers/runc/.travis.yml @@ -1,54 +1,72 @@ dist: bionic language: go +os: linux go: - - 1.11.x - - 1.12.x + - 1.14.x + - 1.13.x - tip - -matrix: +cache: + directories: + - /home/travis/.vagrant.d/boxes +jobs: include: - - go: 1.12.x + - go: 1.14.x + name: "verify-dependencies" + script: + - make verify-dependencies + - go: 1.13.x + name: "cgroup-systemd" env: - RUNC_USE_SYSTEMD=1 script: - - make BUILDTAGS="${BUILDTAGS}" all + - make all - sudo PATH="$PATH" make localintegration RUNC_USE_SYSTEMD=1 - - go: 1.12.x - env: - - VIRTUALBOX_VERSION=6.0 - - VAGRANT_VERSION=2.2.6 - - FEDORA_VERSION=31 + - name: "fedora32" before_install: - - cat /proc/cpuinfo - - wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - && sudo sh -c "echo deb https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib >> /etc/apt/sources.list" && sudo apt-get update && sudo apt-get install -yq build-essential gcc make linux-headers-$(uname -r) virtualbox-${VIRTUALBOX_VERSION} && sudo usermod -aG vboxusers $(whoami) - - wget https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}_$(uname -m).deb && sudo dpkg -i vagrant_${VAGRANT_VERSION}_$(uname -m).deb - - vagrant init bento/fedora-${FEDORA_VERSION} && vagrant up && mkdir -p ~/.ssh && vagrant ssh-config >> ~/.ssh/config - - ssh default sudo dnf install -y podman + - sudo ./script/install-vagrant.sh + - ln -sf Vagrantfile.fedora32 Vagrantfile + - sudo vagrant up && sudo mkdir -p /root/.ssh && sudo sh -c "vagrant ssh-config >> /root/.ssh/config" script: - - ssh default sudo podman build -t test /vagrant - - ssh default sudo podman run --privileged --cgroupns=private test make localunittest + - sudo ssh default -t 'cd /vagrant && sudo make localunittest' + # cgroupv2+systemd: test on vagrant host itself as we need systemd + - sudo ssh default -t 'cd /vagrant && sudo make localintegration RUNC_USE_SYSTEMD=yes' + # same setup but with fs2 driver instead of systemd + - sudo ssh default -t 'cd /vagrant && sudo make localintegration' + # cgroupv2+systemd (rootless) + - sudo ssh default -t 'cd /vagrant && sudo make localrootlessintegration RUNC_USE_SYSTEMD=yes' + # same setup but with fs2 driver (rootless) instead of systemd + - sudo ssh default -t 'cd /vagrant && sudo make localrootlessintegration' + - name: "centos7" + before_install: + - sudo ./script/install-vagrant.sh + - ln -sf Vagrantfile.centos7 Vagrantfile + - sudo vagrant up && sudo mkdir -p /root/.ssh && sudo sh -c "vagrant ssh-config >> /root/.ssh/config" + script: + # kernel 3.10 (frankenized), systemd 219 + - sudo ssh default 'rpm -q centos-release kernel systemd' + - sudo ssh default -t 'sudo -i make -C /vagrant localunittest' + - sudo ssh default -t 'sudo -i make -C /vagrant localintegration' + - sudo ssh default -t 'sudo -i make -C /vagrant localintegration RUNC_USE_SYSTEMD=1' + # FIXME: rootless is skipped because of EPERM on writing cgroup.procs + # - sudo ssh default -t 'sudo -i make -C /vagrant localrootlessintegration' + allow_failures: - go: tip go_import_path: github.com/opencontainers/runc # `make ci` uses Docker. -sudo: required services: - docker -env: - global: - - BUILDTAGS="seccomp apparmor selinux ambient" - before_install: - sudo apt-get -qq update - sudo apt-get install -y libseccomp-dev - - go get -u golang.org/x/lint/golint - - go get -u github.com/vbatts/git-validation + - GO111MODULE=off go get -u golang.org/x/lint/golint + - GO111MODULE=off go get -u github.com/vbatts/git-validation - env | grep TRAVIS_ script: - git-validation -run DCO,short-subject -v - - make BUILDTAGS="${BUILDTAGS}" - - make BUILDTAGS="${BUILDTAGS}" clean ci cross + - make + - make clean ci cross diff --git a/vendor/github.com/opencontainers/runc/Dockerfile b/vendor/github.com/opencontainers/runc/Dockerfile index 5c654705e75..2fffb61ddbf 100644 --- a/vendor/github.com/opencontainers/runc/Dockerfile +++ b/vendor/github.com/opencontainers/runc/Dockerfile @@ -1,34 +1,46 @@ -FROM golang:1.12-stretch +ARG GO_VERSION=1.13 +ARG BATS_VERSION=v1.2.0 +ARG CRIU_VERSION=v3.14 + +FROM golang:${GO_VERSION}-buster +ARG DEBIAN_FRONTEND=noninteractive RUN dpkg --add-architecture armel \ && dpkg --add-architecture armhf \ && dpkg --add-architecture arm64 \ && dpkg --add-architecture ppc64el \ - && apt-get update && apt-get install -y \ - build-essential \ - curl \ - sudo \ - gawk \ - iptables \ - jq \ - pkg-config \ - libaio-dev \ - libcap-dev \ - libprotobuf-dev \ - libprotobuf-c0-dev \ - libnl-3-dev \ - libnet-dev \ - libseccomp2 \ - libseccomp-dev \ - protobuf-c-compiler \ - protobuf-compiler \ - python-minimal \ - uidmap \ - kmod \ - crossbuild-essential-armel crossbuild-essential-armhf crossbuild-essential-arm64 crossbuild-essential-ppc64el \ - libseccomp-dev:armel libseccomp-dev:armhf libseccomp-dev:arm64 libseccomp-dev:ppc64el \ - --no-install-recommends \ - && apt-get clean + && apt-get update \ + && apt-get install -y --no-install-recommends \ + build-essential \ + crossbuild-essential-arm64 \ + crossbuild-essential-armel \ + crossbuild-essential-armhf \ + crossbuild-essential-ppc64el \ + curl \ + gawk \ + iptables \ + jq \ + kmod \ + libaio-dev \ + libcap-dev \ + libnet-dev \ + libnl-3-dev \ + libprotobuf-c-dev \ + libprotobuf-dev \ + libseccomp-dev \ + libseccomp-dev:arm64 \ + libseccomp-dev:armel \ + libseccomp-dev:armhf \ + libseccomp-dev:ppc64el \ + libseccomp2 \ + pkg-config \ + protobuf-c-compiler \ + protobuf-compiler \ + python-minimal \ + sudo \ + uidmap \ + && apt-get clean \ + && rm -rf /var/cache/apt /var/lib/apt/lists/*; # Add a dummy user for the rootless integration tests. While runC does # not require an entry in /etc/passwd to operate, one of the tests uses @@ -37,30 +49,49 @@ RUN dpkg --add-architecture armel \ RUN useradd -u1000 -m -d/home/rootless -s/bin/bash rootless # install bats +ARG BATS_VERSION RUN cd /tmp \ - && git clone https://github.com/sstephenson/bats.git \ - && cd bats \ - && git reset --hard 03608115df2071fff4eaaff1605768c275e5f81f \ + && git clone https://github.com/bats-core/bats-core.git \ + && cd bats-core \ + && git reset --hard "${BATS_VERSION}" \ && ./install.sh /usr/local \ - && rm -rf /tmp/bats + && rm -rf /tmp/bats-core # install criu -ENV CRIU_VERSION v3.12 +ARG CRIU_VERSION RUN mkdir -p /usr/src/criu \ - && curl -sSL https://github.com/checkpoint-restore/criu/archive/${CRIU_VERSION}.tar.gz | tar -v -C /usr/src/criu/ -xz --strip-components=1 \ + && curl -fsSL https://github.com/checkpoint-restore/criu/archive/${CRIU_VERSION}.tar.gz | tar -C /usr/src/criu/ -xz --strip-components=1 \ && cd /usr/src/criu \ - && make install-criu \ + && echo 1 > .gitid \ + && make -j $(nproc) install-criu \ + && cd - \ && rm -rf /usr/src/criu -# setup a playground for us to spawn containers in -ENV ROOTFS /busybox -RUN mkdir -p ${ROOTFS} +# install skopeo +RUN echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Unstable/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list \ + && wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_Unstable/Release.key -O- | sudo apt-key add - \ + && apt-get update \ + && apt-get install -y --no-install-recommends skopeo \ + && rm -rf /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list \ + && apt-get clean \ + && rm -rf /var/cache/apt /var/lib/apt/lists/*; + +# install umoci +RUN curl -o /usr/local/bin/umoci -fsSL https://github.com/opencontainers/umoci/releases/download/v0.4.5/umoci.amd64 \ + && chmod +x /usr/local/bin/umoci COPY script/tmpmount / WORKDIR /go/src/github.com/opencontainers/runc ENTRYPOINT ["/tmpmount"] -ADD . /go/src/github.com/opencontainers/runc - +# setup a playground for us to spawn containers in +COPY tests/integration/multi-arch.bash tests/integration/ +ENV ROOTFS /busybox +RUN mkdir -p "${ROOTFS}" RUN . tests/integration/multi-arch.bash \ - && curl -o- -sSL `get_busybox` | tar xfJC - ${ROOTFS} + && curl -fsSL `get_busybox` | tar xfJC - "${ROOTFS}" + +ENV DEBIAN_ROOTFS /debian +RUN mkdir -p "${DEBIAN_ROOTFS}" +RUN . tests/integration/multi-arch.bash \ + && get_and_extract_debian "$DEBIAN_ROOTFS" diff --git a/vendor/github.com/opencontainers/runc/MAINTAINERS b/vendor/github.com/opencontainers/runc/MAINTAINERS index 9fe08d319aa..acc3fe12467 100644 --- a/vendor/github.com/opencontainers/runc/MAINTAINERS +++ b/vendor/github.com/opencontainers/runc/MAINTAINERS @@ -3,3 +3,5 @@ Mrunal Patel (@mrunalp) Daniel, Dao Quang Minh (@dqminh) Qiang Huang (@hqhq) Aleksa Sarai (@cyphar) +Akihiro Suda (@AkihiroSuda) +Kir Kolyshkin (@kolyshkin) diff --git a/vendor/github.com/opencontainers/runc/Makefile b/vendor/github.com/opencontainers/runc/Makefile index 81db9d9cc88..b02ebb7f90b 100644 --- a/vendor/github.com/opencontainers/runc/Makefile +++ b/vendor/github.com/opencontainers/runc/Makefile @@ -1,91 +1,105 @@ -.PHONY: all shell dbuild man release \ - localtest localunittest localintegration \ - test unittest integration \ - cross localcross - CONTAINER_ENGINE := docker GO := go -SOURCES := $(shell find . 2>&1 | grep -E '.*\.(c|h|go)$$') -PREFIX := $(DESTDIR)/usr/local +PREFIX ?= $(DESTDIR)/usr/local BINDIR := $(PREFIX)/sbin +MANDIR := $(PREFIX)/share/man + GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g") RUNC_IMAGE := runc_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN)) PROJECT := github.com/opencontainers/runc -BUILDTAGS ?= seccomp +BUILDTAGS ?= seccomp selinux apparmor COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true) -COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}") +COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no),"$(COMMIT_NO)-dirty","$(COMMIT_NO)") +VERSION := $(shell cat ./VERSION) -MAN_DIR := $(CURDIR)/man/man8 -MAN_PAGES = $(shell ls $(MAN_DIR)/*.8) -MAN_PAGES_BASE = $(notdir $(MAN_PAGES)) -MAN_INSTALL_PATH := ${PREFIX}/share/man/man8/ - -RELEASE_DIR := $(CURDIR)/release - -VERSION := ${shell cat ./VERSION} - -SHELL := $(shell command -v bash 2>/dev/null) +# TODO: rm -mod=vendor once go 1.13 is unsupported +ifneq ($(GO111MODULE),off) + MOD_VENDOR := "-mod=vendor" +endif +ifeq ($(shell $(GO) env GOOS),linux) + ifeq (,$(filter $(shell $(GO) env GOARCH),mips mipsle mips64 mips64le ppc64)) + GO_BUILDMODE := "-buildmode=pie" + endif +endif +GO_BUILD := $(GO) build $(MOD_VENDOR) $(GO_BUILDMODE) $(EXTRA_FLAGS) -tags "$(BUILDTAGS)" \ + -ldflags "-X main.gitCommit=$(COMMIT) -X main.version=$(VERSION) $(EXTRA_LDFLAGS)" +GO_BUILD_STATIC := CGO_ENABLED=1 $(GO) build $(MOD_VENDOR) $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo osusergo" \ + -ldflags "-w -extldflags -static -X main.gitCommit=$(COMMIT) -X main.version=$(VERSION) $(EXTRA_LDFLAGS)" .DEFAULT: runc -runc: $(SOURCES) - $(GO) build -buildmode=pie $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o runc . +runc: + $(GO_BUILD) -o runc . all: runc recvtty -recvtty: contrib/cmd/recvtty/recvtty +recvtty: + $(GO_BUILD) -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty -contrib/cmd/recvtty/recvtty: $(SOURCES) - $(GO) build -buildmode=pie $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty - -static: $(SOURCES) - CGO_ENABLED=1 $(GO) build $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo osusergo" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o runc . - CGO_ENABLED=1 $(GO) build $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo osusergo" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty +static: + $(GO_BUILD_STATIC) -o runc . + $(GO_BUILD_STATIC) -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty release: script/release.sh -r release/$(VERSION) -v $(VERSION) dbuild: runcimage - $(CONTAINER_ENGINE) run ${CONTAINER_ENGINE_RUN_FLAGS} --rm -v $(CURDIR):/go/src/$(PROJECT) --privileged $(RUNC_IMAGE) make clean all + $(CONTAINER_ENGINE) run $(CONTAINER_ENGINE_RUN_FLAGS) \ + --privileged --rm \ + -v $(CURDIR):/go/src/$(PROJECT) \ + $(RUNC_IMAGE) make clean all lint: - $(GO) vet $(allpackages) - $(GO) fmt $(allpackages) + $(GO) vet ./... + $(GO) fmt ./... man: man/md2man-all.sh runcimage: - $(CONTAINER_ENGINE) build ${CONTAINER_ENGINE_BUILD_FLAGS} -t $(RUNC_IMAGE) . + $(CONTAINER_ENGINE) build $(CONTAINER_ENGINE_BUILD_FLAGS) -t $(RUNC_IMAGE) . -test: - make unittest integration rootlessintegration +test: unittest integration rootlessintegration -localtest: - make localunittest localintegration localrootlessintegration +localtest: localunittest localintegration localrootlessintegration unittest: runcimage - $(CONTAINER_ENGINE) run ${CONTAINER_ENGINE_RUN_FLAGS} -t --privileged --rm -v /lib/modules:/lib/modules:ro -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) make localunittest TESTFLAGS=${TESTFLAGS} + $(CONTAINER_ENGINE) run $(CONTAINER_ENGINE_RUN_FLAGS) \ + -t --privileged --rm \ + -v /lib/modules:/lib/modules:ro \ + -v $(CURDIR):/go/src/$(PROJECT) \ + $(RUNC_IMAGE) make localunittest TESTFLAGS=$(TESTFLAGS) localunittest: all - $(GO) test -timeout 3m -tags "$(BUILDTAGS)" ${TESTFLAGS} -v $(allpackages) + $(GO) test $(MOD_VENDOR) -timeout 3m -tags "$(BUILDTAGS)" $(TESTFLAGS) -v ./... integration: runcimage - $(CONTAINER_ENGINE) run ${CONTAINER_ENGINE_RUN_FLAGS} -t --privileged --rm -v /lib/modules:/lib/modules:ro -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) make localintegration TESTPATH=${TESTPATH} + $(CONTAINER_ENGINE) run $(CONTAINER_ENGINE_RUN_FLAGS) \ + -t --privileged --rm \ + -v /lib/modules:/lib/modules:ro \ + -v $(CURDIR):/go/src/$(PROJECT) \ + $(RUNC_IMAGE) make localintegration TESTPATH=$(TESTPATH) localintegration: all - bats -t tests/integration${TESTPATH} + bats -t tests/integration$(TESTPATH) rootlessintegration: runcimage - $(CONTAINER_ENGINE) run ${CONTAINER_ENGINE_RUN_FLAGS} -t --privileged --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) make localrootlessintegration + $(CONTAINER_ENGINE) run $(CONTAINER_ENGINE_RUN_FLAGS) \ + -t --privileged --rm \ + -v $(CURDIR):/go/src/$(PROJECT) \ + -e ROOTLESS_TESTPATH \ + $(RUNC_IMAGE) make localrootlessintegration localrootlessintegration: all tests/rootless.sh shell: runcimage - $(CONTAINER_ENGINE) run ${CONTAINER_ENGINE_RUN_FLAGS} -ti --privileged --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) bash + $(CONTAINER_ENGINE) run $(CONTAINER_ENGINE_RUN_FLAGS) \ + -ti --privileged --rm \ + -v $(CURDIR):/go/src/$(PROJECT) \ + $(RUNC_IMAGE) bash install: install -D -m0755 runc $(BINDIR)/runc @@ -93,41 +107,48 @@ install: install-bash: install -D -m0644 contrib/completions/bash/runc $(PREFIX)/share/bash-completion/completions/runc -install-man: - install -d -m 755 $(MAN_INSTALL_PATH) - install -m 644 $(MAN_PAGES) $(MAN_INSTALL_PATH) - -uninstall: - rm -f $(BINDIR)/runc - -uninstall-bash: - rm -f $(PREFIX)/share/bash-completion/completions/runc - -uninstall-man: - rm -f $(addprefix $(MAN_INSTALL_PATH),$(MAN_PAGES_BASE)) +install-man: man + install -d -m 755 $(MANDIR)/man8 + install -D -m 644 man/man8/*.8 $(MANDIR)/man8 clean: rm -f runc runc-* rm -f contrib/cmd/recvtty/recvtty - rm -rf $(RELEASE_DIR) - rm -rf $(MAN_DIR) + rm -rf release + rm -rf man/man8 validate: script/validate-gofmt script/validate-c - $(GO) vet $(allpackages) + $(GO) vet ./... ci: validate test release +vendor: + export GO111MODULE=on \ + $(GO) mod tidy && \ + $(GO) mod vendor && \ + $(GO) mod verify + +verify-dependencies: vendor + @test -z "$$(git status --porcelain -- go.mod go.sum vendor/)" \ + || (echo -e "git status:\n $$(git status -- go.mod go.sum vendor/)\nerror: vendor/, go.mod and/or go.sum not up to date. Run \"make vendor\" to update"; exit 1) \ + && echo "all vendor files are up to date." + cross: runcimage - $(CONTAINER_ENGINE) run ${CONTAINER_ENGINE_RUN_FLAGS} -e BUILDTAGS="$(BUILDTAGS)" --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) make localcross + $(CONTAINER_ENGINE) run $(CONTAINER_ENGINE_RUN_FLAGS) \ + -e BUILDTAGS="$(BUILDTAGS)" --rm \ + -v $(CURDIR):/go/src/$(PROJECT) \ + $(RUNC_IMAGE) make localcross localcross: - CGO_ENABLED=1 GOARCH=arm GOARM=6 CC=arm-linux-gnueabi-gcc $(GO) build -buildmode=pie $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o runc-armel . - CGO_ENABLED=1 GOARCH=arm GOARM=7 CC=arm-linux-gnueabihf-gcc $(GO) build -buildmode=pie $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o runc-armhf . - CGO_ENABLED=1 GOARCH=arm64 CC=aarch64-linux-gnu-gcc $(GO) build -buildmode=pie $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o runc-arm64 . - CGO_ENABLED=1 GOARCH=ppc64le CC=powerpc64le-linux-gnu-gcc $(GO) build -buildmode=pie $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o runc-ppc64le . + CGO_ENABLED=1 GOARCH=arm GOARM=6 CC=arm-linux-gnueabi-gcc $(GO_BUILD) -o runc-armel . + CGO_ENABLED=1 GOARCH=arm GOARM=7 CC=arm-linux-gnueabihf-gcc $(GO_BUILD) -o runc-armhf . + CGO_ENABLED=1 GOARCH=arm64 CC=aarch64-linux-gnu-gcc $(GO_BUILD) -o runc-arm64 . + CGO_ENABLED=1 GOARCH=ppc64le CC=powerpc64le-linux-gnu-gcc $(GO_BUILD) -o runc-ppc64le . -# memoize allpackages, so that it's executed only once and only if used -_allpackages = $(shell $(GO) list ./... | grep -v vendor) -allpackages = $(if $(__allpackages),,$(eval __allpackages := $$(_allpackages)))$(__allpackages) +.PHONY: runc all recvtty static release dbuild lint man runcimage \ + test localtest unittest localunittest integration localintegration \ + rootlessintegration localrootlessintegration shell install install-bash \ + install-man clean validate ci \ + vendor verify-dependencies cross localcross diff --git a/vendor/github.com/opencontainers/runc/README.md b/vendor/github.com/opencontainers/runc/README.md index a806f2729a4..aeef59895b1 100644 --- a/vendor/github.com/opencontainers/runc/README.md +++ b/vendor/github.com/opencontainers/runc/README.md @@ -3,6 +3,7 @@ [![Build Status](https://travis-ci.org/opencontainers/runc.svg?branch=master)](https://travis-ci.org/opencontainers/runc) [![Go Report Card](https://goreportcard.com/badge/github.com/opencontainers/runc)](https://goreportcard.com/report/github.com/opencontainers/runc) [![GoDoc](https://godoc.org/github.com/opencontainers/runc?status.svg)](https://godoc.org/github.com/opencontainers/runc) +[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/588/badge)](https://bestpractices.coreinfrastructure.org/projects/588) ## Introduction @@ -18,22 +19,23 @@ You can find official releases of `runc` on the [release](https://github.com/ope Currently, the following features are not considered to be production-ready: -* Support for cgroup v2 +* [Support for cgroup v2](./docs/cgroup-v2.md) ## Security -The reporting process and disclosure communications are outlined in [/org/security](https://github.com/opencontainers/org/blob/master/security/). +The reporting process and disclosure communications are outlined [here](https://github.com/opencontainers/org/blob/master/SECURITY.md). + +### Security Audit +A third party security audit was performed by Cure53, you can see the full report [here](https://github.com/opencontainers/runc/blob/master/docs/Security-Audit.pdf). ## Building `runc` currently supports the Linux platform with various architecture support. -It must be built with Go version 1.6 or higher in order for some features to function properly. +It must be built with Go version 1.13 or higher. In order to enable seccomp support you will need to install `libseccomp` on your platform. > e.g. `libseccomp-devel` for CentOS, or `libseccomp-dev` for Ubuntu -Otherwise, if you do not want to build `runc` with seccomp support you can add `BUILDTAGS=""` when running make. - ```bash # create a 'github.com/opencontainers' in your GOPATH/src cd github.com/opencontainers @@ -58,20 +60,22 @@ sudo make install #### Build Tags -`runc` supports optional build tags for compiling support of various features. -To add build tags to the make option the `BUILDTAGS` variable must be set. +`runc` supports optional build tags for compiling support of various features, +with some of them enabled by default (see `BUILDTAGS` in top-level `Makefile`). + +To change build tags from the default, set the `BUILDTAGS` variable for make, +e.g. ```bash make BUILDTAGS='seccomp apparmor' ``` -| Build Tag | Feature | Dependency | -|-----------|------------------------------------|-------------| -| seccomp | Syscall filtering | libseccomp | -| selinux | selinux process and mount labeling | | -| apparmor | apparmor profile support | | -| ambient | ambient capability support | kernel 4.3 | -| nokmem | disable kernel memory account | | +| Build Tag | Feature | Enabled by default | Dependency | +|-----------|------------------------------------|--------------------|------------| +| seccomp | Syscall filtering | yes | libseccomp | +| selinux | selinux process and mount labeling | yes | | +| apparmor | apparmor profile support | yes | | +| nokmem | disable kernel memory accounting | no | | ### Running the test suite @@ -97,17 +101,30 @@ You can run a specific integration test by setting the `TESTPATH` variable. # make test TESTPATH="/checkpoint.bats" ``` -You can run a test in your proxy environment by setting `DOCKER_BUILD_PROXY` and `DOCKER_RUN_PROXY` variables. +You can run a specific rootless integration test by setting the `ROOTLESS_TESTPATH` variable. ```bash -# make test DOCKER_BUILD_PROXY="--build-arg HTTP_PROXY=http://yourproxy/" DOCKER_RUN_PROXY="-e HTTP_PROXY=http://yourproxy/" +# make test ROOTLESS_TESTPATH="/checkpoint.bats" +``` + +You can run a test using your container engine's flags by setting `CONTAINER_ENGINE_BUILD_FLAGS` and `CONTAINER_ENGINE_RUN_FLAGS` variables. + +```bash +# make test CONTAINER_ENGINE_BUILD_FLAGS="--build-arg http_proxy=http://yourproxy/" CONTAINER_ENGINE_RUN_FLAGS="-e http_proxy=http://yourproxy/" ``` ### Dependencies Management -`runc` uses [vndr](https://github.com/LK4D4/vndr) for dependencies management. -Please refer to [vndr](https://github.com/LK4D4/vndr) for how to add or update -new dependencies. +`runc` uses [Go Modules](https://github.com/golang/go/wiki/Modules) for dependencies management. +Please refer to [Go Modules](https://github.com/golang/go/wiki/Modules) for how to add or update +new dependencies. When updating dependencies, be sure that you are running Go `1.14` or newer. + +``` +# Update vendored dependencies +make vendor +# Verify all dependencies +make verify-dependencies +``` ## Using runc @@ -275,6 +292,9 @@ PIDFile=/run/mycontainerid.pid WantedBy=multi-user.target ``` +#### cgroup v2 +See [`./docs/cgroup-v2.md`](./docs/cgroup-v2.md). + ## License The code and docs are released under the [Apache 2.0 license](LICENSE). diff --git a/vendor/github.com/opencontainers/runc/SECURITY.md b/vendor/github.com/opencontainers/runc/SECURITY.md index 63a74388410..61e37bc568a 100644 --- a/vendor/github.com/opencontainers/runc/SECURITY.md +++ b/vendor/github.com/opencontainers/runc/SECURITY.md @@ -1,3 +1,3 @@ # Security -The reporting process and disclosure communications are outlined in [/org/security](https://github.com/opencontainers/org/blob/master/security/). +The reporting process and disclosure communications are outlined [here](https://github.com/opencontainers/org/blob/master/SECURITY.md). diff --git a/vendor/github.com/opencontainers/runc/VERSION b/vendor/github.com/opencontainers/runc/VERSION index 950f8ca20e5..01b0c45eacf 100644 --- a/vendor/github.com/opencontainers/runc/VERSION +++ b/vendor/github.com/opencontainers/runc/VERSION @@ -1 +1 @@ -1.0.0-rc10 +1.0.0-rc92 diff --git a/vendor/github.com/opencontainers/runc/Vagrantfile.centos7 b/vendor/github.com/opencontainers/runc/Vagrantfile.centos7 new file mode 100644 index 00000000000..5ef05bb0493 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/Vagrantfile.centos7 @@ -0,0 +1,59 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "centos/7" + config.vm.provider :virtualbox do |v| + v.memory = 2048 + v.cpus = 2 + end + config.vm.provider :libvirt do |v| + v.memory = 2048 + v.cpus = 2 + end + config.vm.provision "shell", inline: <<-SHELL + set -e -u -o pipefail + + # configuration + GO_VERSION="1.13.11" + BATS_VERSION="v1.2.0" + + # install yum packages + yum install -y -q epel-release + (cd /etc/yum.repos.d && curl -O https://copr.fedorainfracloud.org/coprs/adrian/criu-el7/repo/epel-7/adrian-criu-el7-epel-7.repo) + yum install -y -q gcc git iptables jq libseccomp-devel make skopeo criu + yum clean all + + # install Go + curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar Cxz /usr/local + + # Install umoci + curl -o /usr/local/bin/umoci -fsSL https://github.com/opencontainers/umoci/releases/download/v0.4.5/umoci.amd64 + chmod +x /usr/local/bin/umoci + + # install bats + git clone https://github.com/bats-core/bats-core + cd bats-core + git checkout $BATS_VERSION + ./install.sh /usr/local + + # set PATH (NOTE: sudo without -i ignores this PATH) + cat >> /etc/profile.d/sh.local < /etc/sysctl.d/userns.conf + sysctl --system + + # Add a user for rootless tests + useradd -u2000 -m -d/home/rootless -s/bin/bash rootless + + # Add busybox for libcontainer/integration tests + . /vagrant/tests/integration/multi-arch.bash \ + && mkdir /busybox \ + && curl -fsSL $(get_busybox) | tar xfJC - /busybox + SHELL +end diff --git a/vendor/github.com/opencontainers/runc/Vagrantfile.fedora32 b/vendor/github.com/opencontainers/runc/Vagrantfile.fedora32 new file mode 100644 index 00000000000..b72954abda6 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/Vagrantfile.fedora32 @@ -0,0 +1,59 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| +# Fedora box is used for testing cgroup v2 support + config.vm.box = "fedora/32-cloud-base" + config.vm.provider :virtualbox do |v| + v.memory = 2048 + v.cpus = 2 + end + config.vm.provider :libvirt do |v| + v.memory = 2048 + v.cpus = 2 + end + config.vm.provision "shell", inline: <<-SHELL + set -e -u -o pipefail + # Work around dnf mirror failures by retrying a few times + for i in $(seq 0 2); do + sleep $i + cat << EOF | dnf -y shell && break +config exclude kernel,kernel-core +config install_weak_deps false +update +install iptables gcc make golang-go libseccomp-devel bats jq git-core criu skopeo +ts run +EOF + done + dnf clean all + + # Add a user for rootless tests + useradd -u2000 -m -d/home/rootless -s/bin/bash rootless + + # Allow root to execute `ssh rootless@localhost` in tests/rootless.sh + ssh-keygen -t ecdsa -N "" -f /root/rootless.key + mkdir -m 0700 -p /home/rootless/.ssh + cat /root/rootless.key.pub >> /home/rootless/.ssh/authorized_keys + chown -R rootless.rootless /home/rootless + + # Install umoci + curl -o /usr/local/bin/umoci -fsSL https://github.com/opencontainers/umoci/releases/download/v0.4.5/umoci.amd64 + chmod +x /usr/local/bin/umoci + + # Add busybox for libcontainer/integration tests + . /vagrant/tests/integration/multi-arch.bash \ + && mkdir /busybox /debian \ + && curl -fsSL $(get_busybox) | tar xfJC - /busybox \ + && get_and_extract_debian /debian + + # Delegate cgroup v2 controllers to rootless user via --systemd-cgroup + mkdir -p /etc/systemd/system/user@.service.d + cat > /etc/systemd/system/user@.service.d/delegate.conf << EOF +[Service] +# default: Delegate=pids memory +# NOTE: delegation of cpuset requires systemd >= 244 (Fedora >= 32, Ubuntu >= 20.04). cpuset is ignored on Fedora 31. +Delegate=cpu cpuset io memory pids +EOF + systemctl daemon-reload + SHELL +end diff --git a/vendor/github.com/opencontainers/runc/checkpoint.go b/vendor/github.com/opencontainers/runc/checkpoint.go index ae01ea3c076..740650bcd24 100644 --- a/vendor/github.com/opencontainers/runc/checkpoint.go +++ b/vendor/github.com/opencontainers/runc/checkpoint.go @@ -3,6 +3,7 @@ package main import ( + "errors" "fmt" "os" "strconv" @@ -34,7 +35,7 @@ checkpointed.`, cli.BoolFlag{Name: "ext-unix-sk", Usage: "allow external unix sockets"}, cli.BoolFlag{Name: "shell-job", Usage: "allow shell jobs"}, cli.BoolFlag{Name: "lazy-pages", Usage: "use userfaultfd to lazily restore memory pages"}, - cli.StringFlag{Name: "status-fd", Value: "", Usage: "criu writes \\0 to this FD once lazy-pages is ready"}, + cli.IntFlag{Name: "status-fd", Value: -1, Usage: "criu writes \\0 to this FD once lazy-pages is ready"}, cli.StringFlag{Name: "page-server", Value: "", Usage: "ADDRESS:PORT of the page server"}, cli.BoolFlag{Name: "file-locks", Usage: "handle file locks, for safety"}, cli.BoolFlag{Name: "pre-dump", Usage: "dump container's memory information only, leave the container running after this"}, @@ -60,10 +61,13 @@ checkpointed.`, return err } if status == libcontainer.Created || status == libcontainer.Stopped { - fatalf("Container cannot be checkpointed in %s state", status.String()) + fatal(fmt.Errorf("Container cannot be checkpointed in %s state", status.String())) } - defer destroy(container) options := criuOptions(context) + if !(options.LeaveRunning || options.PreDump) { + // destroy container unless we tell CRIU to keep it + defer destroy(container) + } // these are the mandatory criu options for a container setPageServer(context, options) setManageCgroupsMode(context, options) @@ -88,11 +92,11 @@ func setPageServer(context *cli.Context, options *libcontainer.CriuOpts) { if psOpt := context.String("page-server"); psOpt != "" { addressPort := strings.Split(psOpt, ":") if len(addressPort) != 2 { - fatal(fmt.Errorf("Use --page-server ADDRESS:PORT to specify page server")) + fatal(errors.New("Use --page-server ADDRESS:PORT to specify page server")) } portInt, err := strconv.Atoi(addressPort[1]) if err != nil { - fatal(fmt.Errorf("Invalid port number")) + fatal(errors.New("Invalid port number")) } options.PageServer = libcontainer.CriuPageServerInfo{ Address: addressPort[0], @@ -111,7 +115,7 @@ func setManageCgroupsMode(context *cli.Context, options *libcontainer.CriuOpts) case "strict": options.ManageCgroupsMode = libcontainer.CRIU_CG_MODE_STRICT default: - fatal(fmt.Errorf("Invalid manage cgroups mode")) + fatal(errors.New("Invalid manage cgroups mode")) } } } diff --git a/vendor/github.com/opencontainers/runc/contrib/cmd/recvtty/recvtty.go b/vendor/github.com/opencontainers/runc/contrib/cmd/recvtty/recvtty.go index a658b8d2020..00b30e1c39c 100644 --- a/vendor/github.com/opencontainers/runc/contrib/cmd/recvtty/recvtty.go +++ b/vendor/github.com/opencontainers/runc/contrib/cmd/recvtty/recvtty.go @@ -65,7 +65,7 @@ func bail(err error) { os.Exit(1) } -func handleSingle(path string) error { +func handleSingle(path string, noStdin bool) error { // Open a socket. ln, err := net.Listen("unix", path) if err != nil { @@ -113,10 +113,12 @@ func handleSingle(path string) error { io.Copy(os.Stdout, c) quitChan <- struct{}{} }() - go func() { - io.Copy(c, os.Stdin) - quitChan <- struct{}{} - }() + if !noStdin { + go func() { + io.Copy(c, os.Stdin) + quitChan <- struct{}{} + }() + } // Only close the master fd once we've stopped copying. <-quitChan @@ -201,6 +203,10 @@ func main() { Value: "", Usage: "Path to write daemon process ID to", }, + cli.BoolFlag{ + Name: "no-stdin", + Usage: "Disable stdin handling (no-op for null mode)", + }, } app.Action = func(ctx *cli.Context) error { @@ -218,9 +224,10 @@ func main() { } } + noStdin := ctx.Bool("no-stdin") switch ctx.String("mode") { case "single": - if err := handleSingle(path); err != nil { + if err := handleSingle(path, noStdin); err != nil { return err } case "null": diff --git a/vendor/github.com/opencontainers/runc/delete.go b/vendor/github.com/opencontainers/runc/delete.go index fb6f38eddf7..84f5b62aa0b 100644 --- a/vendor/github.com/opencontainers/runc/delete.go +++ b/vendor/github.com/opencontainers/runc/delete.go @@ -3,10 +3,10 @@ package main import ( + "errors" "fmt" "os" "path/filepath" - "syscall" "time" "github.com/opencontainers/runc/libcontainer" @@ -19,12 +19,12 @@ func killContainer(container libcontainer.Container) error { _ = container.Signal(unix.SIGKILL, false) for i := 0; i < 100; i++ { time.Sleep(100 * time.Millisecond) - if err := container.Signal(syscall.Signal(0), false); err != nil { + if err := container.Signal(unix.Signal(0), false); err != nil { destroy(container) return nil } } - return fmt.Errorf("container init still running") + return errors.New("container init still running") } var deleteCommand = cli.Command{ diff --git a/vendor/github.com/opencontainers/runc/events.go b/vendor/github.com/opencontainers/runc/events.go index fb3f6302e82..b3a339ef97b 100644 --- a/vendor/github.com/opencontainers/runc/events.go +++ b/vendor/github.com/opencontainers/runc/events.go @@ -4,6 +4,7 @@ package main import ( "encoding/json" + "errors" "fmt" "os" "sync" @@ -40,7 +41,7 @@ information is displayed once every 5 seconds.`, } duration := context.Duration("interval") if duration <= 0 { - return fmt.Errorf("duration interval must be greater than 0") + return errors.New("duration interval must be greater than 0") } status, err := container.Status() if err != nil { @@ -125,6 +126,8 @@ func convertLibcontainerStats(ls *libcontainer.Stats) *types.Stats { s.CPU.Usage.User = cg.CpuStats.CpuUsage.UsageInUsermode s.CPU.Usage.Total = cg.CpuStats.CpuUsage.TotalUsage s.CPU.Usage.Percpu = cg.CpuStats.CpuUsage.PercpuUsage + s.CPU.Usage.PercpuKernel = cg.CpuStats.CpuUsage.PercpuUsageInKernelmode + s.CPU.Usage.PercpuUser = cg.CpuStats.CpuUsage.PercpuUsageInUsermode s.CPU.Throttling.Periods = cg.CpuStats.ThrottlingData.Periods s.CPU.Throttling.ThrottledPeriods = cg.CpuStats.ThrottlingData.ThrottledPeriods s.CPU.Throttling.ThrottledTime = cg.CpuStats.ThrottlingData.ThrottledTime @@ -161,6 +164,12 @@ func convertLibcontainerStats(ls *libcontainer.Stats) *types.Stats { s.IntelRdt.MemBwSchemaRoot = is.MemBwSchemaRoot s.IntelRdt.MemBwSchema = is.MemBwSchema } + if intelrdt.IsMBMEnabled() { + s.IntelRdt.MBMStats = is.MBMStats + } + if intelrdt.IsCMTEnabled() { + s.IntelRdt.CMTStats = is.CMTStats + } } s.NetworkInterfaces = ls.Interfaces diff --git a/vendor/github.com/opencontainers/runc/exec.go b/vendor/github.com/opencontainers/runc/exec.go index b963d68e018..6053ea970ce 100644 --- a/vendor/github.com/opencontainers/runc/exec.go +++ b/vendor/github.com/opencontainers/runc/exec.go @@ -203,6 +203,7 @@ func getProcess(context *cli.Context, bundle string) (*specs.Process, error) { p.Env = append(p.Env, context.StringSlice("env")...) // set the tty + p.Terminal = false if context.IsSet("tty") { p.Terminal = context.Bool("tty") } diff --git a/vendor/github.com/opencontainers/runc/go.mod b/vendor/github.com/opencontainers/runc/go.mod new file mode 100644 index 00000000000..fcf068dfaed --- /dev/null +++ b/vendor/github.com/opencontainers/runc/go.mod @@ -0,0 +1,26 @@ +module github.com/opencontainers/runc + +go 1.14 + +require ( + github.com/checkpoint-restore/go-criu/v4 v4.1.0 + github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775 + github.com/containerd/console v1.0.0 + github.com/coreos/go-systemd/v22 v22.1.0 + github.com/cyphar/filepath-securejoin v0.2.2 + github.com/docker/go-units v0.4.0 + github.com/godbus/dbus/v5 v5.0.3 + github.com/golang/protobuf v1.4.2 + github.com/moby/sys/mountinfo v0.1.3 + github.com/mrunalp/fileutils v0.0.0-20200520151820-abd8a0e76976 + github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6 + github.com/opencontainers/selinux v1.6.0 + github.com/pkg/errors v0.9.1 + github.com/seccomp/libseccomp-golang v0.9.1 + github.com/sirupsen/logrus v1.6.0 + github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 + // NOTE: urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092 + github.com/urfave/cli v1.22.1 + github.com/vishvananda/netlink v1.1.0 + golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 +) diff --git a/vendor/github.com/opencontainers/runc/go.sum b/vendor/github.com/opencontainers/runc/go.sum new file mode 100644 index 00000000000..fc838f3e688 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/go.sum @@ -0,0 +1,87 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/checkpoint-restore/go-criu/v4 v4.1.0 h1:WW2B2uxx9KWF6bGlHqhm8Okiafwwx7Y2kcpn8lCpjgo= +github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= +github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775 h1:cHzBGGVew0ezFsq2grfy2RsB8hO/eNyBgOLHBCqfR1U= +github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= +github.com/containerd/console v1.0.0 h1:fU3UuQapBs+zLJu82NhR11Rif1ny2zfMMAyPJzSN5tQ= +github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/coreos/go-systemd/v22 v22.1.0 h1:kq/SbG2BCKLkDKkjQf5OWwKWUKj1lgs3lFI4PxnR5lg= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cyphar/filepath-securejoin v0.2.2 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/moby/sys/mountinfo v0.1.3 h1:KIrhRO14+AkwKvG/g2yIpNMOUVZ02xNhOw8KY1WsLOI= +github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= +github.com/mrunalp/fileutils v0.0.0-20200520151820-abd8a0e76976 h1:aZQToFSLH8ejFeSkTc3r3L4dPImcj7Ib/KgmkQqbGGg= +github.com/mrunalp/fileutils v0.0.0-20200520151820-abd8a0e76976/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= +github.com/opencontainers/runtime-spec v1.0.3-0.20200710190001-3e4195d92445 h1:y8cfsJRmn8g3VkM4IDpusKSgMUZEXhudm/BuYANLozE= +github.com/opencontainers/runtime-spec v1.0.3-0.20200710190001-3e4195d92445/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6 h1:NhsM2gc769rVWDqJvapK37r+7+CBXI8xHhnfnt8uQsg= +github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.6.0 h1:+bIAS/Za3q5FTwWym4fTB0vObnfCf3G/NC7K6Jx62mY= +github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/seccomp/libseccomp-golang v0.9.1 h1:NJjM5DNFOs0s3kYE1WUOr6G8V97sdt46rlXTMfXGWBo= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8= +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7ZovXvuNyL3XQl8UFofeikI1NW1Gypu7k= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243 h1:R43TdZy32XXSXjJn7M/HhALJ9imq6ztLnChfYJpVDnM= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 h1:sIky/MyNRSHTrdxfsiUSS4WIAMvInbeXljJz+jDjeYE= +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/opencontainers/runc/kill.go b/vendor/github.com/opencontainers/runc/kill.go index c2d79296941..46ea7003b53 100644 --- a/vendor/github.com/opencontainers/runc/kill.go +++ b/vendor/github.com/opencontainers/runc/kill.go @@ -6,9 +6,9 @@ import ( "fmt" "strconv" "strings" - "syscall" "github.com/urfave/cli" + "golang.org/x/sys/unix" ) var killCommand = cli.Command{ @@ -22,7 +22,7 @@ Where "" is the name for the instance of the container and EXAMPLE: For example, if the container id is "ubuntu01" the following will send a "KILL" signal to the init process of the "ubuntu01" container: - + # runc kill ubuntu01 KILL`, Flags: []cli.Flag{ cli.BoolFlag{ @@ -55,13 +55,17 @@ signal to the init process of the "ubuntu01" container: }, } -func parseSignal(rawSignal string) (syscall.Signal, error) { +func parseSignal(rawSignal string) (unix.Signal, error) { s, err := strconv.Atoi(rawSignal) if err == nil { - return syscall.Signal(s), nil + return unix.Signal(s), nil } - signal, ok := signalMap[strings.TrimPrefix(strings.ToUpper(rawSignal), "SIG")] - if !ok { + sig := strings.ToUpper(rawSignal) + if !strings.HasPrefix(sig, "SIG") { + sig = "SIG" + sig + } + signal := unix.SignalNum(sig) + if signal == 0 { return -1, fmt.Errorf("unknown signal %q", rawSignal) } return signal, nil diff --git a/vendor/github.com/opencontainers/runc/libcontainer/README.md b/vendor/github.com/opencontainers/runc/libcontainer/README.md index a791ca2d249..6803ef56c5b 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/README.md +++ b/vendor/github.com/opencontainers/runc/libcontainer/README.md @@ -155,8 +155,7 @@ config := &configs.Config{ Parent: "system", Resources: &configs.Resources{ MemorySwappiness: nil, - AllowAllDevices: nil, - AllowedDevices: configs.DefaultAllowedDevices, + Devices: specconv.AllowedDevices, }, }, MaskPaths: []string{ @@ -166,7 +165,7 @@ config := &configs.Config{ ReadonlyPaths: []string{ "/proc/sys", "/proc/sysrq-trigger", "/proc/irq", "/proc/bus", }, - Devices: configs.DefaultAutoCreatedDevices, + Devices: specconv.AllowedDevices, Hostname: "testing", Mounts: []*configs.Mount{ { diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups.go index c0a965923f9..a16a68e9796 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups.go @@ -3,8 +3,6 @@ package cgroups import ( - "fmt" - "github.com/opencontainers/runc/libcontainer/configs" ) @@ -27,48 +25,27 @@ type Manager interface { // Destroys the cgroup set Destroy() error - // The option func SystemdCgroups() and Cgroupfs() require following attributes: - // Paths map[string]string - // Cgroups *configs.Cgroup - // Paths maps cgroup subsystem to path at which it is mounted. - // Cgroups specifies specific cgroup settings for the various subsystems - - // Returns cgroup paths to save in a state file and to be able to - // restore the object later. - GetPaths() map[string]string - - // GetUnifiedPath returns the unified path when running in unified mode. - // The value corresponds to the all values of GetPaths() map. - // - // GetUnifiedPath returns error when running in hybrid mode as well as - // in legacy mode. - GetUnifiedPath() (string, error) + // Path returns a cgroup path to the specified controller/subsystem. + // For cgroupv2, the argument is unused and can be empty. + Path(string) string // Sets the cgroup as configured. Set(container *configs.Config) error - // Gets the cgroup as configured. + // GetPaths returns cgroup path(s) to save in a state file in order to restore later. + // + // For cgroup v1, a key is cgroup subsystem name, and the value is the path + // to the cgroup for this subsystem. + // + // For cgroup v2 unified hierarchy, a key is "", and the value is the unified path. + GetPaths() map[string]string + + // GetCgroups returns the cgroup data as configured. GetCgroups() (*configs.Cgroup, error) -} -type NotFoundError struct { - Subsystem string -} + // GetFreezerState retrieves the current FreezerState of the cgroup. + GetFreezerState() (configs.FreezerState, error) -func (e *NotFoundError) Error() string { - return fmt.Sprintf("mountpoint for %s not found", e.Subsystem) -} - -func NewNotFoundError(sub string) error { - return &NotFoundError{ - Subsystem: sub, - } -} - -func IsNotFound(err error) bool { - if err == nil { - return false - } - _, ok := err.(*NotFoundError) - return ok + // Whether the cgroup path exists or not + Exists() bool } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/devices/devices_emulator.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/devices/devices_emulator.go new file mode 100644 index 00000000000..6afedbc6e73 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/devices/devices_emulator.go @@ -0,0 +1,373 @@ +// +build linux + +// SPDX-License-Identifier: Apache-2.0 +/* + * Copyright (C) 2020 Aleksa Sarai + * Copyright (C) 2020 SUSE LLC + * + * 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 devices + +import ( + "bufio" + "io" + "regexp" + "sort" + "strconv" + + "github.com/opencontainers/runc/libcontainer/configs" + + "github.com/pkg/errors" +) + +// deviceMeta is a DeviceRule without the Allow or Permissions fields, and no +// wildcard-type support. It's effectively the "match" portion of a metadata +// rule, for the purposes of our emulation. +type deviceMeta struct { + node configs.DeviceType + major int64 + minor int64 +} + +// deviceRule is effectively the tuple (deviceMeta, DevicePermissions). +type deviceRule struct { + meta deviceMeta + perms configs.DevicePermissions +} + +// deviceRules is a mapping of device metadata rules to the associated +// permissions in the ruleset. +type deviceRules map[deviceMeta]configs.DevicePermissions + +func (r deviceRules) orderedEntries() []deviceRule { + var rules []deviceRule + for meta, perms := range r { + rules = append(rules, deviceRule{meta: meta, perms: perms}) + } + sort.Slice(rules, func(i, j int) bool { + // Sort by (major, minor, type). + a, b := rules[i].meta, rules[j].meta + return a.major < b.major || + (a.major == b.major && a.minor < b.minor) || + (a.major == b.major && a.minor == b.minor && a.node < b.node) + }) + return rules +} + +type Emulator struct { + defaultAllow bool + rules deviceRules +} + +func (e *Emulator) IsBlacklist() bool { + return e.defaultAllow +} + +func (e *Emulator) IsAllowAll() bool { + return e.IsBlacklist() && len(e.rules) == 0 +} + +var devicesListRegexp = regexp.MustCompile(`^([abc])\s+(\d+|\*):(\d+|\*)\s+([rwm]+)$`) + +func parseLine(line string) (*deviceRule, error) { + matches := devicesListRegexp.FindStringSubmatch(line) + if matches == nil { + return nil, errors.Errorf("line doesn't match devices.list format") + } + var ( + rule deviceRule + node = matches[1] + major = matches[2] + minor = matches[3] + perms = matches[4] + ) + + // Parse the node type. + switch node { + case "a": + // Super-special case -- "a" always means every device with every + // access mode. In fact, for devices.list this actually indicates that + // the cgroup is in black-list mode. + // TODO: Double-check that the entire file is "a *:* rwm". + return nil, nil + case "b": + rule.meta.node = configs.BlockDevice + case "c": + rule.meta.node = configs.CharDevice + default: + // Should never happen! + return nil, errors.Errorf("unknown device type %q", node) + } + + // Parse the major number. + if major == "*" { + rule.meta.major = configs.Wildcard + } else { + val, err := strconv.ParseUint(major, 10, 32) + if err != nil { + return nil, errors.Wrap(err, "parse major number") + } + rule.meta.major = int64(val) + } + + // Parse the minor number. + if minor == "*" { + rule.meta.minor = configs.Wildcard + } else { + val, err := strconv.ParseUint(minor, 10, 32) + if err != nil { + return nil, errors.Wrap(err, "parse minor number") + } + rule.meta.minor = int64(val) + } + + // Parse the access permissions. + rule.perms = configs.DevicePermissions(perms) + if !rule.perms.IsValid() || rule.perms.IsEmpty() { + // Should never happen! + return nil, errors.Errorf("parse access mode: contained unknown modes or is empty: %q", perms) + } + return &rule, nil +} + +func (e *Emulator) addRule(rule deviceRule) error { + if e.rules == nil { + e.rules = make(map[deviceMeta]configs.DevicePermissions) + } + + // Merge with any pre-existing permissions. + oldPerms := e.rules[rule.meta] + newPerms := rule.perms.Union(oldPerms) + e.rules[rule.meta] = newPerms + return nil +} + +func (e *Emulator) rmRule(rule deviceRule) error { + // Give an error if any of the permissions requested to be removed are + // present in a partially-matching wildcard rule, because such rules will + // be ignored by cgroupv1. + // + // This is a diversion from cgroupv1, but is necessary to avoid leading + // users into a false sense of security. cgroupv1 will silently(!) ignore + // requests to remove partial exceptions, but we really shouldn't do that. + // + // It may seem like we could just "split" wildcard rules which hit this + // issue, but unfortunately there are 2^32 possible major and minor + // numbers, which would exhaust kernel memory quickly if we did this. Not + // to mention it'd be really slow (the kernel side is implemented as a + // linked-list of exceptions). + for _, partialMeta := range []deviceMeta{ + {node: rule.meta.node, major: configs.Wildcard, minor: rule.meta.minor}, + {node: rule.meta.node, major: rule.meta.major, minor: configs.Wildcard}, + {node: rule.meta.node, major: configs.Wildcard, minor: configs.Wildcard}, + } { + // This wildcard rule is equivalent to the requested rule, so skip it. + if rule.meta == partialMeta { + continue + } + // Only give an error if the set of permissions overlap. + partialPerms := e.rules[partialMeta] + if !partialPerms.Intersection(rule.perms).IsEmpty() { + return errors.Errorf("requested rule [%v %v] not supported by devices cgroupv1 (cannot punch hole in existing wildcard rule [%v %v])", rule.meta, rule.perms, partialMeta, partialPerms) + } + } + + // Subtract all of the permissions listed from the full match rule. If the + // rule didn't exist, all of this is a no-op. + newPerms := e.rules[rule.meta].Difference(rule.perms) + if newPerms.IsEmpty() { + delete(e.rules, rule.meta) + } else { + e.rules[rule.meta] = newPerms + } + // TODO: The actual cgroup code doesn't care if an exception didn't exist + // during removal, so not erroring out here is /accurate/ but quite + // worrying. Maybe we should do additional validation, but again we + // have to worry about backwards-compatibility. + return nil +} + +func (e *Emulator) allow(rule *deviceRule) error { + // This cgroup is configured as a black-list. Reset the entire emulator, + // and put is into black-list mode. + if rule == nil || rule.meta.node == configs.WildcardDevice { + *e = Emulator{ + defaultAllow: true, + rules: nil, + } + return nil + } + + var err error + if e.defaultAllow { + err = errors.Wrap(e.rmRule(*rule), "remove 'deny' exception") + } else { + err = errors.Wrap(e.addRule(*rule), "add 'allow' exception") + } + return err +} + +func (e *Emulator) deny(rule *deviceRule) error { + // This cgroup is configured as a white-list. Reset the entire emulator, + // and put is into white-list mode. + if rule == nil || rule.meta.node == configs.WildcardDevice { + *e = Emulator{ + defaultAllow: false, + rules: nil, + } + return nil + } + + var err error + if e.defaultAllow { + err = errors.Wrap(e.addRule(*rule), "add 'deny' exception") + } else { + err = errors.Wrap(e.rmRule(*rule), "remove 'allow' exception") + } + return err +} + +func (e *Emulator) Apply(rule configs.DeviceRule) error { + if !rule.Type.CanCgroup() { + return errors.Errorf("cannot add rule [%#v] with non-cgroup type %q", rule, rule.Type) + } + + innerRule := &deviceRule{ + meta: deviceMeta{ + node: rule.Type, + major: rule.Major, + minor: rule.Minor, + }, + perms: rule.Permissions, + } + if innerRule.meta.node == configs.WildcardDevice { + innerRule = nil + } + + if rule.Allow { + return e.allow(innerRule) + } else { + return e.deny(innerRule) + } +} + +// EmulatorFromList takes a reader to a "devices.list"-like source, and returns +// a new Emulator that represents the state of the devices cgroup. Note that +// black-list devices cgroups cannot be fully reconstructed, due to limitations +// in the devices cgroup API. Instead, such cgroups are always treated as +// "allow all" cgroups. +func EmulatorFromList(list io.Reader) (*Emulator, error) { + // Normally cgroups are in black-list mode by default, but the way we + // figure out the current mode is whether or not devices.list has an + // allow-all rule. So we default to a white-list, and the existence of an + // "a *:* rwm" entry will tell us otherwise. + e := &Emulator{ + defaultAllow: false, + } + + // Parse the "devices.list". + s := bufio.NewScanner(list) + for s.Scan() { + line := s.Text() + deviceRule, err := parseLine(line) + if err != nil { + return nil, errors.Wrapf(err, "parsing line %q", line) + } + // "devices.list" is an allow list. Note that this means that in + // black-list mode, we have no idea what rules are in play. As a + // result, we need to be very careful in Transition(). + if err := e.allow(deviceRule); err != nil { + return nil, errors.Wrapf(err, "adding devices.list rule") + } + } + if err := s.Err(); err != nil { + return nil, errors.Wrap(err, "reading devices.list lines") + } + return e, nil +} + +// Transition calculates what is the minimally-disruptive set of rules need to +// be applied to a devices cgroup in order to transition to the given target. +// This means that any already-existing rules will not be applied, and +// disruptive rules (like denying all device access) will only be applied if +// necessary. +// +// This function is the sole reason for all of Emulator -- to allow us +// to figure out how to update a containers' cgroups without causing spurrious +// device errors (if possible). +func (source *Emulator) Transition(target *Emulator) ([]*configs.DeviceRule, error) { + var transitionRules []*configs.DeviceRule + oldRules := source.rules + + // If the default policy doesn't match, we need to include a "disruptive" + // rule (either allow-all or deny-all) in order to switch the cgroup to the + // correct default policy. + // + // However, due to a limitation in "devices.list" we cannot be sure what + // deny rules are in place in a black-list cgroup. Thus if the source is a + // black-list we also have to include a disruptive rule. + if source.IsBlacklist() || source.defaultAllow != target.defaultAllow { + transitionRules = append(transitionRules, &configs.DeviceRule{ + Type: 'a', + Major: -1, + Minor: -1, + Permissions: configs.DevicePermissions("rwm"), + Allow: target.defaultAllow, + }) + // The old rules are only relevant if we aren't starting out with a + // disruptive rule. + oldRules = nil + } + + // NOTE: We traverse through the rules in a sorted order so we always write + // the same set of rules (this is to aid testing). + + // First, we create inverse rules for any old rules not in the new set. + // This includes partial-inverse rules for specific permissions. This is a + // no-op if we added a disruptive rule, since oldRules will be empty. + for _, rule := range oldRules.orderedEntries() { + meta, oldPerms := rule.meta, rule.perms + newPerms := target.rules[meta] + droppedPerms := oldPerms.Difference(newPerms) + if !droppedPerms.IsEmpty() { + transitionRules = append(transitionRules, &configs.DeviceRule{ + Type: meta.node, + Major: meta.major, + Minor: meta.minor, + Permissions: droppedPerms, + Allow: target.defaultAllow, + }) + } + } + + // Add any additional rules which weren't in the old set. We happen to + // filter out rules which are present in both sets, though this isn't + // strictly necessary. + for _, rule := range target.rules.orderedEntries() { + meta, newPerms := rule.meta, rule.perms + oldPerms := oldRules[meta] + gainedPerms := newPerms.Difference(oldPerms) + if !gainedPerms.IsEmpty() { + transitionRules = append(transitionRules, &configs.DeviceRule{ + Type: meta.node, + Major: meta.major, + Minor: meta.minor, + Permissions: gainedPerms, + Allow: !target.defaultAllow, + }) + } + } + return transitionRules, nil +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter/devicefilter.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter/devicefilter.go index 847ce8ef1a0..b593eb43e17 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter/devicefilter.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter/devicefilter.go @@ -22,7 +22,7 @@ const ( ) // DeviceFilter returns eBPF device filter program and its license string -func DeviceFilter(devices []*configs.Device) (asm.Instructions, string, error) { +func DeviceFilter(devices []*configs.DeviceRule) (asm.Instructions, string, error) { p := &program{} p.init() for i := len(devices) - 1; i >= 0; i-- { @@ -49,7 +49,8 @@ func (p *program) init() { */ // R2 <- type (lower 16 bit of u32 access_type at R1[0]) p.insts = append(p.insts, - asm.LoadMem(asm.R2, asm.R1, 0, asm.Half)) + asm.LoadMem(asm.R2, asm.R1, 0, asm.Word), + asm.And.Imm32(asm.R2, 0xFFFF)) // R3 <- access (upper 16 bit of u32 access_type at R1[0]) p.insts = append(p.insts, @@ -67,7 +68,7 @@ func (p *program) init() { } // appendDevice needs to be called from the last element of OCI linux.resources.devices to the head element. -func (p *program) appendDevice(dev *configs.Device) error { +func (p *program) appendDevice(dev *configs.DeviceRule) error { if p.blockID < 0 { return errors.New("the program is finalized") } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/apply_raw.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/apply_raw.go deleted file mode 100644 index ec148b48905..00000000000 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/apply_raw.go +++ /dev/null @@ -1,411 +0,0 @@ -// +build linux - -package fs - -import ( - "fmt" - "io" - "os" - "path/filepath" - "sync" - - "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/configs" - libcontainerUtils "github.com/opencontainers/runc/libcontainer/utils" - "github.com/pkg/errors" - "golang.org/x/sys/unix" -) - -var ( - subsystemsLegacy = subsystemSet{ - &CpusetGroup{}, - &DevicesGroup{}, - &MemoryGroup{}, - &CpuGroup{}, - &CpuacctGroup{}, - &PidsGroup{}, - &BlkioGroup{}, - &HugetlbGroup{}, - &NetClsGroup{}, - &NetPrioGroup{}, - &PerfEventGroup{}, - &FreezerGroup{}, - &NameGroup{GroupName: "name=systemd", Join: true}, - } - HugePageSizes, _ = cgroups.GetHugePageSize() -) - -var errSubsystemDoesNotExist = fmt.Errorf("cgroup: subsystem does not exist") - -type subsystemSet []subsystem - -func (s subsystemSet) Get(name string) (subsystem, error) { - for _, ss := range s { - if ss.Name() == name { - return ss, nil - } - } - return nil, errSubsystemDoesNotExist -} - -type subsystem interface { - // Name returns the name of the subsystem. - Name() string - // Returns the stats, as 'stats', corresponding to the cgroup under 'path'. - GetStats(path string, stats *cgroups.Stats) error - // Removes the cgroup represented by 'cgroupData'. - Remove(*cgroupData) error - // Creates and joins the cgroup represented by 'cgroupData'. - Apply(*cgroupData) error - // Set the cgroup represented by cgroup. - Set(path string, cgroup *configs.Cgroup) error -} - -type Manager struct { - mu sync.Mutex - Cgroups *configs.Cgroup - Rootless bool // ignore permission-related errors - Paths map[string]string -} - -// The absolute path to the root of the cgroup hierarchies. -var cgroupRootLock sync.Mutex -var cgroupRoot string - -// Gets the cgroupRoot. -func getCgroupRoot() (string, error) { - cgroupRootLock.Lock() - defer cgroupRootLock.Unlock() - - if cgroupRoot != "" { - return cgroupRoot, nil - } - - root, err := cgroups.FindCgroupMountpointDir() - if err != nil { - return "", err - } - - if _, err := os.Stat(root); err != nil { - return "", err - } - - cgroupRoot = root - return cgroupRoot, nil -} - -type cgroupData struct { - root string - innerPath string - config *configs.Cgroup - pid int -} - -// isIgnorableError returns whether err is a permission error (in the loose -// sense of the word). This includes EROFS (which for an unprivileged user is -// basically a permission error) and EACCES (for similar reasons) as well as -// the normal EPERM. -func isIgnorableError(rootless bool, err error) bool { - // We do not ignore errors if we are root. - if !rootless { - return false - } - // Is it an ordinary EPERM? - if os.IsPermission(errors.Cause(err)) { - return true - } - - // Try to handle other errnos. - var errno error - switch err := errors.Cause(err).(type) { - case *os.PathError: - errno = err.Err - case *os.LinkError: - errno = err.Err - case *os.SyscallError: - errno = err.Err - } - return errno == unix.EROFS || errno == unix.EPERM || errno == unix.EACCES -} - -func (m *Manager) getSubsystems() subsystemSet { - return subsystemsLegacy -} - -func (m *Manager) Apply(pid int) (err error) { - if m.Cgroups == nil { - return nil - } - m.mu.Lock() - defer m.mu.Unlock() - - var c = m.Cgroups - - d, err := getCgroupData(m.Cgroups, pid) - if err != nil { - return err - } - - m.Paths = make(map[string]string) - if c.Paths != nil { - for name, path := range c.Paths { - _, err := d.path(name) - if err != nil { - if cgroups.IsNotFound(err) { - continue - } - return err - } - m.Paths[name] = path - } - return cgroups.EnterPid(m.Paths, pid) - } - - for _, sys := range m.getSubsystems() { - // TODO: Apply should, ideally, be reentrant or be broken up into a separate - // create and join phase so that the cgroup hierarchy for a container can be - // created then join consists of writing the process pids to cgroup.procs - p, err := d.path(sys.Name()) - if err != nil { - // The non-presence of the devices subsystem is - // considered fatal for security reasons. - if cgroups.IsNotFound(err) && sys.Name() != "devices" { - continue - } - return err - } - m.Paths[sys.Name()] = p - - if err := sys.Apply(d); err != nil { - // In the case of rootless (including euid=0 in userns), where an explicit cgroup path hasn't - // been set, we don't bail on error in case of permission problems. - // Cases where limits have been set (and we couldn't create our own - // cgroup) are handled by Set. - if isIgnorableError(m.Rootless, err) && m.Cgroups.Path == "" { - delete(m.Paths, sys.Name()) - continue - } - return err - } - - } - return nil -} - -func (m *Manager) Destroy() error { - if m.Cgroups == nil || m.Cgroups.Paths != nil { - return nil - } - m.mu.Lock() - defer m.mu.Unlock() - if err := cgroups.RemovePaths(m.Paths); err != nil { - return err - } - m.Paths = make(map[string]string) - return nil -} - -func (m *Manager) GetPaths() map[string]string { - m.mu.Lock() - paths := m.Paths - m.mu.Unlock() - return paths -} - -func (m *Manager) GetUnifiedPath() (string, error) { - return "", errors.New("unified path is only supported when running in unified mode") -} - -func (m *Manager) GetStats() (*cgroups.Stats, error) { - m.mu.Lock() - defer m.mu.Unlock() - stats := cgroups.NewStats() - for name, path := range m.Paths { - sys, err := m.getSubsystems().Get(name) - if err == errSubsystemDoesNotExist || !cgroups.PathExists(path) { - continue - } - if err := sys.GetStats(path, stats); err != nil { - return nil, err - } - } - return stats, nil -} - -func (m *Manager) Set(container *configs.Config) error { - if container.Cgroups == nil { - return nil - } - - // If Paths are set, then we are just joining cgroups paths - // and there is no need to set any values. - if m.Cgroups != nil && m.Cgroups.Paths != nil { - return nil - } - - paths := m.GetPaths() - for _, sys := range m.getSubsystems() { - path := paths[sys.Name()] - if err := sys.Set(path, container.Cgroups); err != nil { - if m.Rootless && sys.Name() == "devices" { - continue - } - // When m.Rootless is true, errors from the device subsystem are ignored because it is really not expected to work. - // However, errors from other subsystems are not ignored. - // see @test "runc create (rootless + limits + no cgrouppath + no permission) fails with informative error" - if path == "" { - // We never created a path for this cgroup, so we cannot set - // limits for it (though we have already tried at this point). - return fmt.Errorf("cannot set %s limit: container could not join or create cgroup", sys.Name()) - } - return err - } - } - - if m.Paths["cpu"] != "" { - if err := CheckCpushares(m.Paths["cpu"], container.Cgroups.Resources.CpuShares); err != nil { - return err - } - } - return nil -} - -// Freeze toggles the container's freezer cgroup depending on the state -// provided -func (m *Manager) Freeze(state configs.FreezerState) error { - if m.Cgroups == nil { - return errors.New("cannot toggle freezer: cgroups not configured for container") - } - - paths := m.GetPaths() - dir := paths["freezer"] - prevState := m.Cgroups.Resources.Freezer - m.Cgroups.Resources.Freezer = state - freezer, err := m.getSubsystems().Get("freezer") - if err != nil { - return err - } - err = freezer.Set(dir, m.Cgroups) - if err != nil { - m.Cgroups.Resources.Freezer = prevState - return err - } - return nil -} - -func (m *Manager) GetPids() ([]int, error) { - paths := m.GetPaths() - return cgroups.GetPids(paths["devices"]) -} - -func (m *Manager) GetAllPids() ([]int, error) { - paths := m.GetPaths() - return cgroups.GetAllPids(paths["devices"]) -} - -func getCgroupData(c *configs.Cgroup, pid int) (*cgroupData, error) { - root, err := getCgroupRoot() - if err != nil { - return nil, err - } - - if (c.Name != "" || c.Parent != "") && c.Path != "" { - return nil, fmt.Errorf("cgroup: either Path or Name and Parent should be used") - } - - // XXX: Do not remove this code. Path safety is important! -- cyphar - cgPath := libcontainerUtils.CleanPath(c.Path) - cgParent := libcontainerUtils.CleanPath(c.Parent) - cgName := libcontainerUtils.CleanPath(c.Name) - - innerPath := cgPath - if innerPath == "" { - innerPath = filepath.Join(cgParent, cgName) - } - - return &cgroupData{ - root: root, - innerPath: innerPath, - config: c, - pid: pid, - }, nil -} - -func (raw *cgroupData) path(subsystem string) (string, error) { - mnt, err := cgroups.FindCgroupMountpoint(raw.root, subsystem) - // If we didn't mount the subsystem, there is no point we make the path. - if err != nil { - return "", err - } - - // If the cgroup name/path is absolute do not look relative to the cgroup of the init process. - if filepath.IsAbs(raw.innerPath) { - // Sometimes subsystems can be mounted together as 'cpu,cpuacct'. - return filepath.Join(raw.root, filepath.Base(mnt), raw.innerPath), nil - } - - // Use GetOwnCgroupPath instead of GetInitCgroupPath, because the creating - // process could in container and shared pid namespace with host, and - // /proc/1/cgroup could point to whole other world of cgroups. - parentPath, err := cgroups.GetOwnCgroupPath(subsystem) - if err != nil { - return "", err - } - - return filepath.Join(parentPath, raw.innerPath), nil -} - -func (raw *cgroupData) join(subsystem string) (string, error) { - path, err := raw.path(subsystem) - if err != nil { - return "", err - } - if err := os.MkdirAll(path, 0755); err != nil { - return "", err - } - if err := cgroups.WriteCgroupProc(path, raw.pid); err != nil { - return "", err - } - return path, nil -} - -func removePath(p string, err error) error { - if err != nil { - return err - } - if p != "" { - return os.RemoveAll(p) - } - return nil -} - -func CheckCpushares(path string, c uint64) error { - var cpuShares uint64 - - if c == 0 { - return nil - } - - fd, err := os.Open(filepath.Join(path, "cpu.shares")) - if err != nil { - return err - } - defer fd.Close() - - _, err = fmt.Fscanf(fd, "%d", &cpuShares) - if err != nil && err != io.EOF { - return err - } - - if c > cpuShares { - return fmt.Errorf("The maximum allowed cpu-shares is %d", cpuShares) - } else if c < cpuShares { - return fmt.Errorf("The minimum allowed cpu-shares is %d", cpuShares) - } - - return nil -} - -func (m *Manager) GetCgroups() (*configs.Cgroup, error) { - return m.Cgroups, nil -} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/blkio.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/blkio.go index 52c118d68c1..031a6bbdab2 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/blkio.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/blkio.go @@ -22,12 +22,8 @@ func (s *BlkioGroup) Name() string { return "blkio" } -func (s *BlkioGroup) Apply(d *cgroupData) error { - _, err := d.join("blkio") - if err != nil && !cgroups.IsNotFound(err) { - return err - } - return nil +func (s *BlkioGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *BlkioGroup) Set(path string, cgroup *configs.Cgroup) error { @@ -74,10 +70,6 @@ func (s *BlkioGroup) Set(path string, cgroup *configs.Cgroup) error { return nil } -func (s *BlkioGroup) Remove(d *cgroupData) error { - return removePath(d.path("blkio")) -} - /* examples: diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpu.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpu.go index 4db7b647cf0..6fb1c2078a5 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpu.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpu.go @@ -4,6 +4,7 @@ package fs import ( "bufio" + "fmt" "os" "path/filepath" "strconv" @@ -20,17 +21,7 @@ func (s *CpuGroup) Name() string { return "cpu" } -func (s *CpuGroup) Apply(d *cgroupData) error { - // We always want to join the cpu group, to allow fair cpu scheduling - // on a container basis - path, err := d.path("cpu") - if err != nil && !cgroups.IsNotFound(err) { - return err - } - return s.ApplyDir(path, d.config, d.pid) -} - -func (s *CpuGroup) ApplyDir(path string, cgroup *configs.Cgroup, pid int) error { +func (s *CpuGroup) Apply(path string, d *cgroupData) error { // This might happen if we have no cpu cgroup mounted. // Just do nothing and don't fail. if path == "" { @@ -42,12 +33,12 @@ func (s *CpuGroup) ApplyDir(path string, cgroup *configs.Cgroup, pid int) error // We should set the real-Time group scheduling settings before moving // in the process because if the process is already in SCHED_RR mode // and no RT bandwidth is set, adding it will fail. - if err := s.SetRtSched(path, cgroup); err != nil { + if err := s.SetRtSched(path, d.config); err != nil { return err } - // because we are not using d.join we need to place the pid into the procs file - // unlike the other subsystems - return cgroups.WriteCgroupProc(path, pid) + // Since we are not using join(), we need to place the pid + // into the procs file unlike other subsystems. + return cgroups.WriteCgroupProc(path, d.pid) } func (s *CpuGroup) SetRtSched(path string, cgroup *configs.Cgroup) error { @@ -66,9 +57,21 @@ func (s *CpuGroup) SetRtSched(path string, cgroup *configs.Cgroup) error { func (s *CpuGroup) Set(path string, cgroup *configs.Cgroup) error { if cgroup.Resources.CpuShares != 0 { - if err := fscommon.WriteFile(path, "cpu.shares", strconv.FormatUint(cgroup.Resources.CpuShares, 10)); err != nil { + shares := cgroup.Resources.CpuShares + if err := fscommon.WriteFile(path, "cpu.shares", strconv.FormatUint(shares, 10)); err != nil { return err } + // read it back + sharesRead, err := fscommon.GetCgroupParamUint(path, "cpu.shares") + if err != nil { + return err + } + // ... and check + if shares > sharesRead { + return fmt.Errorf("the maximum allowed cpu-shares is %d", sharesRead) + } else if shares < sharesRead { + return fmt.Errorf("the minimum allowed cpu-shares is %d", sharesRead) + } } if cgroup.Resources.CpuPeriod != 0 { if err := fscommon.WriteFile(path, "cpu.cfs_period_us", strconv.FormatUint(cgroup.Resources.CpuPeriod, 10)); err != nil { @@ -83,10 +86,6 @@ func (s *CpuGroup) Set(path string, cgroup *configs.Cgroup) error { return s.SetRtSched(path, cgroup) } -func (s *CpuGroup) Remove(d *cgroupData) error { - return removePath(d.path("cpu")) -} - func (s *CpuGroup) GetStats(path string, stats *cgroups.Stats) error { f, err := os.Open(filepath.Join(path, "cpu.stat")) if err != nil { diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuacct.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuacct.go index 95dc9a1ecc5..1a18971bc5a 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuacct.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuacct.go @@ -3,8 +3,10 @@ package fs import ( + "bufio" "fmt" "io/ioutil" + "os" "path/filepath" "strconv" "strings" @@ -12,15 +14,24 @@ import ( "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" - "github.com/opencontainers/runc/libcontainer/system" ) const ( - cgroupCpuacctStat = "cpuacct.stat" - nanosecondsInSecond = 1000000000 -) + cgroupCpuacctStat = "cpuacct.stat" + cgroupCpuacctUsageAll = "cpuacct.usage_all" -var clockTicks = uint64(system.GetClockTicks()) + nanosecondsInSecond = 1000000000 + + userModeColumn = 1 + kernelModeColumn = 2 + cuacctUsageAllColumnsNumber = 3 + + // The value comes from `C.sysconf(C._SC_CLK_TCK)`, and + // on Linux it's a constant which is safe to be hard coded, + // so we can avoid using cgo here. For details, see: + // https://github.com/containerd/cgroups/pull/12 + clockTicks uint64 = 100 +) type CpuacctGroup struct { } @@ -29,24 +40,18 @@ func (s *CpuacctGroup) Name() string { return "cpuacct" } -func (s *CpuacctGroup) Apply(d *cgroupData) error { - // we just want to join this group even though we don't set anything - if _, err := d.join("cpuacct"); err != nil && !cgroups.IsNotFound(err) { - return err - } - - return nil +func (s *CpuacctGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *CpuacctGroup) Set(path string, cgroup *configs.Cgroup) error { return nil } -func (s *CpuacctGroup) Remove(d *cgroupData) error { - return removePath(d.path("cpuacct")) -} - func (s *CpuacctGroup) GetStats(path string, stats *cgroups.Stats) error { + if !cgroups.PathExists(path) { + return nil + } userModeUsage, kernelModeUsage, err := getCpuUsageBreakdown(path) if err != nil { return err @@ -62,8 +67,15 @@ func (s *CpuacctGroup) GetStats(path string, stats *cgroups.Stats) error { return err } + percpuUsageInKernelmode, percpuUsageInUsermode, err := getPercpuUsageInModes(path) + if err != nil { + return err + } + stats.CpuStats.CpuUsage.TotalUsage = totalUsage stats.CpuStats.CpuUsage.PercpuUsage = percpuUsage + stats.CpuStats.CpuUsage.PercpuUsageInKernelmode = percpuUsageInKernelmode + stats.CpuStats.CpuUsage.PercpuUsageInUsermode = percpuUsageInUsermode stats.CpuStats.CpuUsage.UsageInUsermode = userModeUsage stats.CpuStats.CpuUsage.UsageInKernelmode = kernelModeUsage return nil @@ -120,3 +132,44 @@ func getPercpuUsage(path string) ([]uint64, error) { } return percpuUsage, nil } + +func getPercpuUsageInModes(path string) ([]uint64, []uint64, error) { + usageKernelMode := []uint64{} + usageUserMode := []uint64{} + + file, err := os.Open(filepath.Join(path, cgroupCpuacctUsageAll)) + if os.IsNotExist(err) { + return usageKernelMode, usageUserMode, nil + } else if err != nil { + return nil, nil, err + } + defer file.Close() + + scanner := bufio.NewScanner(file) + scanner.Scan() //skipping header line + + for scanner.Scan() { + lineFields := strings.SplitN(scanner.Text(), " ", cuacctUsageAllColumnsNumber+1) + if len(lineFields) != cuacctUsageAllColumnsNumber { + continue + } + + usageInKernelMode, err := strconv.ParseUint(lineFields[kernelModeColumn], 10, 64) + if err != nil { + return nil, nil, fmt.Errorf("Unable to convert CPU usage in kernel mode to uint64: %s", err) + } + usageKernelMode = append(usageKernelMode, usageInKernelMode) + + usageInUserMode, err := strconv.ParseUint(lineFields[userModeColumn], 10, 64) + if err != nil { + return nil, nil, fmt.Errorf("Unable to convert CPU usage in user mode to uint64: %s", err) + } + usageUserMode = append(usageUserMode, usageInUserMode) + } + + if err := scanner.Err(); err != nil { + return nil, nil, fmt.Errorf("Problem in reading %s line by line, %s", cgroupCpuacctUsageAll, err) + } + + return usageKernelMode, usageUserMode, nil +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuset.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuset.go index bfc900e3f6c..ba17519baea 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuset.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuset.go @@ -4,15 +4,16 @@ package fs import ( "bytes" - "fmt" "io/ioutil" "os" "path/filepath" + "github.com/moby/sys/mountinfo" "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" libcontainerUtils "github.com/opencontainers/runc/libcontainer/utils" + "github.com/pkg/errors" ) type CpusetGroup struct { @@ -22,12 +23,8 @@ func (s *CpusetGroup) Name() string { return "cpuset" } -func (s *CpusetGroup) Apply(d *cgroupData) error { - dir, err := d.path("cpuset") - if err != nil && !cgroups.IsNotFound(err) { - return err - } - return s.ApplyDir(dir, d.config, d.pid) +func (s *CpusetGroup) Apply(path string, d *cgroupData) error { + return s.ApplyDir(path, d.config, d.pid) } func (s *CpusetGroup) Set(path string, cgroup *configs.Cgroup) error { @@ -44,25 +41,43 @@ func (s *CpusetGroup) Set(path string, cgroup *configs.Cgroup) error { return nil } -func (s *CpusetGroup) Remove(d *cgroupData) error { - return removePath(d.path("cpuset")) -} - func (s *CpusetGroup) GetStats(path string, stats *cgroups.Stats) error { return nil } +// Get the source mount point of directory passed in as argument. +func getMount(dir string) (string, error) { + mi, err := mountinfo.GetMounts(mountinfo.ParentsFilter(dir)) + if err != nil { + return "", err + } + if len(mi) < 1 { + return "", errors.Errorf("Can't find mount point of %s", dir) + } + + // find the longest mount point + var idx, maxlen int + for i := range mi { + if len(mi[i].Mountpoint) > maxlen { + maxlen = len(mi[i].Mountpoint) + idx = i + } + } + + return mi[idx].Mountpoint, nil +} + func (s *CpusetGroup) ApplyDir(dir string, cgroup *configs.Cgroup, pid int) error { // This might happen if we have no cpuset cgroup mounted. // Just do nothing and don't fail. if dir == "" { return nil } - mountInfo, err := ioutil.ReadFile("/proc/self/mountinfo") + root, err := getMount(dir) if err != nil { return err } - root := filepath.Dir(cgroups.GetClosestMountpointAncestor(dir, string(mountInfo))) + root = filepath.Dir(root) // 'ensureParent' start with parent because we don't want to // explicitly inherit from parent, it could conflict with // 'cpuset.cpu_exclusive'. @@ -108,7 +123,7 @@ func (s *CpusetGroup) ensureParent(current, root string) error { } // Avoid infinite recursion. if parent == current { - return fmt.Errorf("cpuset: cgroup parent path outside cgroup root") + return errors.New("cpuset: cgroup parent path outside cgroup root") } if err := s.ensureParent(parent, root); err != nil { return err diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/devices.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/devices.go index 036c8db773e..fd8f00d5bfd 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/devices.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/devices.go @@ -3,79 +3,108 @@ package fs import ( + "bytes" + "errors" + "reflect" + "github.com/opencontainers/runc/libcontainer/cgroups" + "github.com/opencontainers/runc/libcontainer/cgroups/devices" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/system" ) type DevicesGroup struct { + testingSkipFinalCheck bool } func (s *DevicesGroup) Name() string { return "devices" } -func (s *DevicesGroup) Apply(d *cgroupData) error { - _, err := d.join("devices") - if err != nil { - // We will return error even it's `not found` error, devices - // cgroup is hard requirement for container's security. - return err +func (s *DevicesGroup) Apply(path string, d *cgroupData) error { + if d.config.SkipDevices { + return nil } - return nil + if path == "" { + // Return error here, since devices cgroup + // is a hard requirement for container's security. + return errSubsystemDoesNotExist + } + return join(path, d.pid) +} + +func loadEmulator(path string) (*devices.Emulator, error) { + list, err := fscommon.ReadFile(path, "devices.list") + if err != nil { + return nil, err + } + return devices.EmulatorFromList(bytes.NewBufferString(list)) +} + +func buildEmulator(rules []*configs.DeviceRule) (*devices.Emulator, error) { + // This defaults to a white-list -- which is what we want! + emu := &devices.Emulator{} + for _, rule := range rules { + if err := emu.Apply(*rule); err != nil { + return nil, err + } + } + return emu, nil } func (s *DevicesGroup) Set(path string, cgroup *configs.Cgroup) error { - if system.RunningInUserNS() { + if system.RunningInUserNS() || cgroup.SkipDevices { return nil } - devices := cgroup.Resources.Devices - if len(devices) > 0 { - for _, dev := range devices { - file := "devices.deny" - if dev.Allow { - file = "devices.allow" - } - if err := fscommon.WriteFile(path, file, dev.CgroupString()); err != nil { - return err - } - } - return nil + // Generate two emulators, one for the current state of the cgroup and one + // for the requested state by the user. + current, err := loadEmulator(path) + if err != nil { + return err + } + target, err := buildEmulator(cgroup.Resources.Devices) + if err != nil { + return err } - if cgroup.Resources.AllowAllDevices != nil { - if *cgroup.Resources.AllowAllDevices == false { - if err := fscommon.WriteFile(path, "devices.deny", "a"); err != nil { - return err - } - for _, dev := range cgroup.Resources.AllowedDevices { - if err := fscommon.WriteFile(path, "devices.allow", dev.CgroupString()); err != nil { - return err - } - } - return nil + // Compute the minimal set of transition rules needed to achieve the + // requested state. + transitionRules, err := current.Transition(target) + if err != nil { + return err + } + for _, rule := range transitionRules { + file := "devices.deny" + if rule.Allow { + file = "devices.allow" } - - if err := fscommon.WriteFile(path, "devices.allow", "a"); err != nil { + if err := fscommon.WriteFile(path, file, rule.CgroupString()); err != nil { return err } } - for _, dev := range cgroup.Resources.DeniedDevices { - if err := fscommon.WriteFile(path, "devices.deny", dev.CgroupString()); err != nil { + // Final safety check -- ensure that the resulting state is what was + // requested. This is only really correct for white-lists, but for + // black-lists we can at least check that the cgroup is in the right mode. + // + // This safety-check is skipped for the unit tests because we cannot + // currently mock devices.list correctly. + if !s.testingSkipFinalCheck { + currentAfter, err := loadEmulator(path) + if err != nil { return err } + if !target.IsBlacklist() && !reflect.DeepEqual(currentAfter, target) { + return errors.New("resulting devices cgroup doesn't precisely match target") + } else if target.IsBlacklist() != currentAfter.IsBlacklist() { + return errors.New("resulting devices cgroup doesn't match target mode") + } } - return nil } -func (s *DevicesGroup) Remove(d *cgroupData) error { - return removePath(d.path("devices")) -} - func (s *DevicesGroup) GetStats(path string, stats *cgroups.Stats) error { return nil } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/freezer.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/freezer.go index 9dc81bdb84c..11cb1646f48 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/freezer.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/freezer.go @@ -3,13 +3,16 @@ package fs import ( + "errors" "fmt" + "os" "strings" "time" "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" + "golang.org/x/sys/unix" ) type FreezerGroup struct { @@ -19,12 +22,8 @@ func (s *FreezerGroup) Name() string { return "freezer" } -func (s *FreezerGroup) Apply(d *cgroupData) error { - _, err := d.join("freezer") - if err != nil && !cgroups.IsNotFound(err) { - return err - } - return nil +func (s *FreezerGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *FreezerGroup) Set(path string, cgroup *configs.Cgroup) error { @@ -39,11 +38,11 @@ func (s *FreezerGroup) Set(path string, cgroup *configs.Cgroup) error { return err } - state, err := fscommon.ReadFile(path, "freezer.state") + state, err := s.GetState(path) if err != nil { return err } - if strings.TrimSpace(state) == string(cgroup.Resources.Freezer) { + if state == cgroup.Resources.Freezer { break } @@ -58,10 +57,33 @@ func (s *FreezerGroup) Set(path string, cgroup *configs.Cgroup) error { return nil } -func (s *FreezerGroup) Remove(d *cgroupData) error { - return removePath(d.path("freezer")) -} - func (s *FreezerGroup) GetStats(path string, stats *cgroups.Stats) error { return nil } + +func (s *FreezerGroup) GetState(path string) (configs.FreezerState, error) { + for { + state, err := fscommon.ReadFile(path, "freezer.state") + if err != nil { + // If the kernel is too old, then we just treat the freezer as + // being in an "undefined" state. + if os.IsNotExist(err) || errors.Is(err, unix.ENODEV) { + err = nil + } + return configs.Undefined, err + } + switch strings.TrimSpace(state) { + case "THAWED": + return configs.Thawed, nil + case "FROZEN": + return configs.Frozen, nil + case "FREEZING": + // Make sure we get a stable freezer state, so retry if the cgroup + // is still undergoing freezing. This should be a temporary delay. + time.Sleep(1 * time.Millisecond) + continue + default: + return configs.Undefined, fmt.Errorf("unknown freezer.state %q", state) + } + } +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs.go new file mode 100644 index 00000000000..3ccf3a3c61d --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs.go @@ -0,0 +1,460 @@ +// +build linux + +package fs + +import ( + "bufio" + "fmt" + "os" + "path/filepath" + "strings" + "sync" + + "github.com/opencontainers/runc/libcontainer/cgroups" + "github.com/opencontainers/runc/libcontainer/configs" + libcontainerUtils "github.com/opencontainers/runc/libcontainer/utils" + "github.com/pkg/errors" + "golang.org/x/sys/unix" +) + +var ( + subsystems = []subsystem{ + &CpusetGroup{}, + &DevicesGroup{}, + &MemoryGroup{}, + &CpuGroup{}, + &CpuacctGroup{}, + &PidsGroup{}, + &BlkioGroup{}, + &HugetlbGroup{}, + &NetClsGroup{}, + &NetPrioGroup{}, + &PerfEventGroup{}, + &FreezerGroup{}, + &NameGroup{GroupName: "name=systemd", Join: true}, + } + HugePageSizes, _ = cgroups.GetHugePageSize() +) + +var errSubsystemDoesNotExist = errors.New("cgroup: subsystem does not exist") + +type subsystem interface { + // Name returns the name of the subsystem. + Name() string + // Returns the stats, as 'stats', corresponding to the cgroup under 'path'. + GetStats(path string, stats *cgroups.Stats) error + // Creates and joins the cgroup represented by 'cgroupData'. + Apply(path string, c *cgroupData) error + // Set the cgroup represented by cgroup. + Set(path string, cgroup *configs.Cgroup) error +} + +type manager struct { + mu sync.Mutex + cgroups *configs.Cgroup + rootless bool // ignore permission-related errors + paths map[string]string +} + +func NewManager(cg *configs.Cgroup, paths map[string]string, rootless bool) cgroups.Manager { + return &manager{ + cgroups: cg, + paths: paths, + rootless: rootless, + } +} + +// The absolute path to the root of the cgroup hierarchies. +var cgroupRootLock sync.Mutex +var cgroupRoot string + +const defaultCgroupRoot = "/sys/fs/cgroup" + +func tryDefaultCgroupRoot() string { + var st, pst unix.Stat_t + + // (1) it should be a directory... + err := unix.Lstat(defaultCgroupRoot, &st) + if err != nil || st.Mode&unix.S_IFDIR == 0 { + return "" + } + + // (2) ... and a mount point ... + err = unix.Lstat(filepath.Dir(defaultCgroupRoot), &pst) + if err != nil { + return "" + } + + if st.Dev == pst.Dev { + // parent dir has the same dev -- not a mount point + return "" + } + + // (3) ... of 'tmpfs' fs type. + var fst unix.Statfs_t + err = unix.Statfs(defaultCgroupRoot, &fst) + if err != nil || fst.Type != unix.TMPFS_MAGIC { + return "" + } + + // (4) it should have at least 1 entry ... + dir, err := os.Open(defaultCgroupRoot) + if err != nil { + return "" + } + names, err := dir.Readdirnames(1) + if err != nil { + return "" + } + if len(names) < 1 { + return "" + } + // ... which is a cgroup mount point. + err = unix.Statfs(filepath.Join(defaultCgroupRoot, names[0]), &fst) + if err != nil || fst.Type != unix.CGROUP_SUPER_MAGIC { + return "" + } + + return defaultCgroupRoot +} + +// Gets the cgroupRoot. +func getCgroupRoot() (string, error) { + cgroupRootLock.Lock() + defer cgroupRootLock.Unlock() + + if cgroupRoot != "" { + return cgroupRoot, nil + } + + // fast path + cgroupRoot = tryDefaultCgroupRoot() + if cgroupRoot != "" { + return cgroupRoot, nil + } + + // slow path: parse mountinfo, find the first mount where fs=cgroup + // (e.g. "/sys/fs/cgroup/memory"), use its parent. + f, err := os.Open("/proc/self/mountinfo") + if err != nil { + return "", err + } + defer f.Close() + + var root string + scanner := bufio.NewScanner(f) + for scanner.Scan() { + text := scanner.Text() + fields := strings.Split(text, " ") + // Safe as mountinfo encodes mountpoints with spaces as \040. + index := strings.Index(text, " - ") + postSeparatorFields := strings.Fields(text[index+3:]) + numPostFields := len(postSeparatorFields) + + // This is an error as we can't detect if the mount is for "cgroup" + if numPostFields == 0 { + return "", fmt.Errorf("mountinfo: found no fields post '-' in %q", text) + } + + if postSeparatorFields[0] == "cgroup" { + // Check that the mount is properly formatted. + if numPostFields < 3 { + return "", fmt.Errorf("Error found less than 3 fields post '-' in %q", text) + } + + root = filepath.Dir(fields[4]) + break + } + } + if err := scanner.Err(); err != nil { + return "", err + } + if root == "" { + return "", errors.New("no cgroup mount found in mountinfo") + } + + if _, err := os.Stat(root); err != nil { + return "", err + } + + cgroupRoot = root + return cgroupRoot, nil +} + +type cgroupData struct { + root string + innerPath string + config *configs.Cgroup + pid int +} + +// isIgnorableError returns whether err is a permission error (in the loose +// sense of the word). This includes EROFS (which for an unprivileged user is +// basically a permission error) and EACCES (for similar reasons) as well as +// the normal EPERM. +func isIgnorableError(rootless bool, err error) bool { + // We do not ignore errors if we are root. + if !rootless { + return false + } + // TODO: rm errors.Cause once we switch to %w everywhere + err = errors.Cause(err) + // Is it an ordinary EPERM? + if errors.Is(err, os.ErrPermission) { + return true + } + // Handle some specific syscall errors. + var errno unix.Errno + if errors.As(err, &errno) { + return errno == unix.EROFS || errno == unix.EPERM || errno == unix.EACCES + } + return false +} + +func (m *manager) Apply(pid int) (err error) { + if m.cgroups == nil { + return nil + } + m.mu.Lock() + defer m.mu.Unlock() + + var c = m.cgroups + + d, err := getCgroupData(m.cgroups, pid) + if err != nil { + return err + } + + m.paths = make(map[string]string) + if c.Paths != nil { + for name, path := range c.Paths { + _, err := d.path(name) + if err != nil { + if cgroups.IsNotFound(err) { + continue + } + return err + } + m.paths[name] = path + } + return cgroups.EnterPid(m.paths, pid) + } + + for _, sys := range subsystems { + p, err := d.path(sys.Name()) + if err != nil { + // The non-presence of the devices subsystem is + // considered fatal for security reasons. + if cgroups.IsNotFound(err) && (c.SkipDevices || sys.Name() != "devices") { + continue + } + return err + } + m.paths[sys.Name()] = p + + if err := sys.Apply(p, d); err != nil { + // In the case of rootless (including euid=0 in userns), where an + // explicit cgroup path hasn't been set, we don't bail on error in + // case of permission problems. Cases where limits have been set + // (and we couldn't create our own cgroup) are handled by Set. + if isIgnorableError(m.rootless, err) && m.cgroups.Path == "" { + delete(m.paths, sys.Name()) + continue + } + return err + } + + } + return nil +} + +func (m *manager) Destroy() error { + if m.cgroups == nil || m.cgroups.Paths != nil { + return nil + } + m.mu.Lock() + defer m.mu.Unlock() + if err := cgroups.RemovePaths(m.paths); err != nil { + return err + } + m.paths = make(map[string]string) + return nil +} + +func (m *manager) Path(subsys string) string { + m.mu.Lock() + defer m.mu.Unlock() + return m.paths[subsys] +} + +func (m *manager) GetStats() (*cgroups.Stats, error) { + m.mu.Lock() + defer m.mu.Unlock() + stats := cgroups.NewStats() + for _, sys := range subsystems { + path := m.paths[sys.Name()] + if path == "" { + continue + } + if err := sys.GetStats(path, stats); err != nil { + return nil, err + } + } + return stats, nil +} + +func (m *manager) Set(container *configs.Config) error { + if container.Cgroups == nil { + return nil + } + + // If Paths are set, then we are just joining cgroups paths + // and there is no need to set any values. + if m.cgroups != nil && m.cgroups.Paths != nil { + return nil + } + + m.mu.Lock() + defer m.mu.Unlock() + for _, sys := range subsystems { + path := m.paths[sys.Name()] + if err := sys.Set(path, container.Cgroups); err != nil { + if m.rootless && sys.Name() == "devices" { + continue + } + // When m.Rootless is true, errors from the device subsystem are ignored because it is really not expected to work. + // However, errors from other subsystems are not ignored. + // see @test "runc create (rootless + limits + no cgrouppath + no permission) fails with informative error" + if path == "" { + // We never created a path for this cgroup, so we cannot set + // limits for it (though we have already tried at this point). + return fmt.Errorf("cannot set %s limit: container could not join or create cgroup", sys.Name()) + } + return err + } + } + + return nil +} + +// Freeze toggles the container's freezer cgroup depending on the state +// provided +func (m *manager) Freeze(state configs.FreezerState) error { + path := m.Path("freezer") + if m.cgroups == nil || path == "" { + return errors.New("cannot toggle freezer: cgroups not configured for container") + } + + prevState := m.cgroups.Resources.Freezer + m.cgroups.Resources.Freezer = state + freezer := &FreezerGroup{} + if err := freezer.Set(path, m.cgroups); err != nil { + m.cgroups.Resources.Freezer = prevState + return err + } + return nil +} + +func (m *manager) GetPids() ([]int, error) { + return cgroups.GetPids(m.Path("devices")) +} + +func (m *manager) GetAllPids() ([]int, error) { + return cgroups.GetAllPids(m.Path("devices")) +} + +func getCgroupData(c *configs.Cgroup, pid int) (*cgroupData, error) { + root, err := getCgroupRoot() + if err != nil { + return nil, err + } + + if (c.Name != "" || c.Parent != "") && c.Path != "" { + return nil, errors.New("cgroup: either Path or Name and Parent should be used") + } + + // XXX: Do not remove this code. Path safety is important! -- cyphar + cgPath := libcontainerUtils.CleanPath(c.Path) + cgParent := libcontainerUtils.CleanPath(c.Parent) + cgName := libcontainerUtils.CleanPath(c.Name) + + innerPath := cgPath + if innerPath == "" { + innerPath = filepath.Join(cgParent, cgName) + } + + return &cgroupData{ + root: root, + innerPath: innerPath, + config: c, + pid: pid, + }, nil +} + +func (raw *cgroupData) path(subsystem string) (string, error) { + // If the cgroup name/path is absolute do not look relative to the cgroup of the init process. + if filepath.IsAbs(raw.innerPath) { + mnt, err := cgroups.FindCgroupMountpoint(raw.root, subsystem) + // If we didn't mount the subsystem, there is no point we make the path. + if err != nil { + return "", err + } + + // Sometimes subsystems can be mounted together as 'cpu,cpuacct'. + return filepath.Join(raw.root, filepath.Base(mnt), raw.innerPath), nil + } + + // Use GetOwnCgroupPath instead of GetInitCgroupPath, because the creating + // process could in container and shared pid namespace with host, and + // /proc/1/cgroup could point to whole other world of cgroups. + parentPath, err := cgroups.GetOwnCgroupPath(subsystem) + if err != nil { + return "", err + } + + return filepath.Join(parentPath, raw.innerPath), nil +} + +func join(path string, pid int) error { + if path == "" { + return nil + } + if err := os.MkdirAll(path, 0755); err != nil { + return err + } + return cgroups.WriteCgroupProc(path, pid) +} + +func removePath(p string, err error) error { + if err != nil { + return err + } + if p != "" { + return os.RemoveAll(p) + } + return nil +} + +func (m *manager) GetPaths() map[string]string { + m.mu.Lock() + defer m.mu.Unlock() + return m.paths +} + +func (m *manager) GetCgroups() (*configs.Cgroup, error) { + return m.cgroups, nil +} + +func (m *manager) GetFreezerState() (configs.FreezerState, error) { + dir := m.Path("freezer") + // If the container doesn't have the freezer cgroup, say it's undefined. + if dir == "" { + return configs.Undefined, nil + } + freezer := &FreezerGroup{} + return freezer.GetState(dir) +} + +func (m *manager) Exists() bool { + return cgroups.PathExists(m.Path("devices")) +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go index 68719c2e6de..d32d02da1ca 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go @@ -19,12 +19,8 @@ func (s *HugetlbGroup) Name() string { return "hugetlb" } -func (s *HugetlbGroup) Apply(d *cgroupData) error { - _, err := d.join("hugetlb") - if err != nil && !cgroups.IsNotFound(err) { - return err - } - return nil +func (s *HugetlbGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *HugetlbGroup) Set(path string, cgroup *configs.Cgroup) error { @@ -37,12 +33,11 @@ func (s *HugetlbGroup) Set(path string, cgroup *configs.Cgroup) error { return nil } -func (s *HugetlbGroup) Remove(d *cgroupData) error { - return removePath(d.path("hugetlb")) -} - func (s *HugetlbGroup) GetStats(path string, stats *cgroups.Stats) error { hugetlbStats := cgroups.HugetlbStats{} + if !cgroups.PathExists(path) { + return nil + } for _, pageSize := range HugePageSizes { usage := strings.Join([]string{"hugetlb", pageSize, "usage_in_bytes"}, ".") value, err := fscommon.GetCgroupParamUint(path, usage) diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/kmem.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/kmem.go index 69b5a1946c7..8d97a6791a4 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/kmem.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/kmem.go @@ -6,10 +6,8 @@ import ( "errors" "fmt" "io/ioutil" - "os" "path/filepath" "strconv" - "syscall" // for Errno type only "github.com/opencontainers/runc/libcontainer/cgroups" "golang.org/x/sys/unix" @@ -49,12 +47,8 @@ func setKernelMemory(path string, kernelMemoryLimit int64) error { // The EBUSY signal is returned on attempts to write to the // memory.kmem.limit_in_bytes file if the cgroup has children or // once tasks have been attached to the cgroup - if pathErr, ok := err.(*os.PathError); ok { - if errNo, ok := pathErr.Err.(syscall.Errno); ok { - if errNo == unix.EBUSY { - return fmt.Errorf("failed to set %s, because either tasks have already joined this cgroup or it has children", cgroupKernelMemoryLimit) - } - } + if errors.Is(err, unix.EBUSY) { + return fmt.Errorf("failed to set %s, because either tasks have already joined this cgroup or it has children", cgroupKernelMemoryLimit) } return fmt.Errorf("failed to write %v to %v: %v", kernelMemoryLimit, cgroupKernelMemoryLimit, err) } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go index f81ed050b2a..41adcd38f47 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go @@ -5,7 +5,9 @@ package fs import ( "bufio" "fmt" + "math" "os" + "path" "path/filepath" "strconv" "strings" @@ -16,8 +18,16 @@ import ( ) const ( - cgroupMemorySwapLimit = "memory.memsw.limit_in_bytes" - cgroupMemoryLimit = "memory.limit_in_bytes" + numaNodeSymbol = "N" + numaStatColumnSeparator = " " + numaStatKeyValueSeparator = "=" + numaStatMaxColumns = math.MaxUint8 + 1 + numaStatValueIndex = 1 + numaStatTypeIndex = 0 + numaStatColumnSliceLength = 2 + cgroupMemorySwapLimit = "memory.memsw.limit_in_bytes" + cgroupMemoryLimit = "memory.limit_in_bytes" + cgroupMemoryPagesByNuma = "memory.numa_stat" ) type MemoryGroup struct { @@ -27,11 +37,8 @@ func (s *MemoryGroup) Name() string { return "memory" } -func (s *MemoryGroup) Apply(d *cgroupData) (err error) { - path, err := d.path("memory") - if err != nil && !cgroups.IsNotFound(err) { - return err - } else if path == "" { +func (s *MemoryGroup) Apply(path string, d *cgroupData) (err error) { + if path == "" { return nil } if memoryAssigned(d.config) { @@ -56,17 +63,13 @@ func (s *MemoryGroup) Apply(d *cgroupData) (err error) { // We need to join memory cgroup after set memory limits, because // kmem.limit_in_bytes can only be set when the cgroup is empty. - _, err = d.join("memory") - if err != nil && !cgroups.IsNotFound(err) { - return err - } - return nil + return join(path, d.pid) } func setMemoryAndSwap(path string, cgroup *configs.Cgroup) error { - // If the memory update is set to -1 we should also - // set swap to -1, it means unlimited memory. - if cgroup.Resources.Memory == -1 { + // If the memory update is set to -1 and the swap is not explicitly + // set, we should also set swap to -1, it means unlimited memory. + if cgroup.Resources.Memory == -1 && cgroup.Resources.MemorySwap == 0 { // Only set swap if it's enabled in kernel if cgroups.PathExists(filepath.Join(path, cgroupMemorySwapLimit)) { cgroup.Resources.MemorySwap = -1 @@ -155,10 +158,6 @@ func (s *MemoryGroup) Set(path string, cgroup *configs.Cgroup) error { return nil } -func (s *MemoryGroup) Remove(d *cgroupData) error { - return removePath(d.path("memory")) -} - func (s *MemoryGroup) GetStats(path string, stats *cgroups.Stats) error { // Set stats from memory.stat. statsFile, err := os.Open(filepath.Join(path, "memory.stat")) @@ -209,6 +208,13 @@ func (s *MemoryGroup) GetStats(path string, stats *cgroups.Stats) error { if value == 1 { stats.MemoryStats.UseHierarchy = true } + + pagesByNUMA, err := getPageUsageByNUMA(path) + if err != nil { + return err + } + stats.MemoryStats.PageUsageByNUMA = pagesByNUMA + return nil } @@ -269,3 +275,79 @@ func getMemoryData(path, name string) (cgroups.MemoryData, error) { return memoryData, nil } + +func getPageUsageByNUMA(cgroupPath string) (cgroups.PageUsageByNUMA, error) { + stats := cgroups.PageUsageByNUMA{} + + file, err := os.Open(path.Join(cgroupPath, cgroupMemoryPagesByNuma)) + if os.IsNotExist(err) { + return stats, nil + } else if err != nil { + return stats, err + } + + scanner := bufio.NewScanner(file) + for scanner.Scan() { + var statsType string + statsByType := cgroups.PageStats{Nodes: map[uint8]uint64{}} + columns := strings.SplitN(scanner.Text(), numaStatColumnSeparator, numaStatMaxColumns) + + for _, column := range columns { + pagesByNode := strings.SplitN(column, numaStatKeyValueSeparator, numaStatColumnSliceLength) + + if strings.HasPrefix(pagesByNode[numaStatTypeIndex], numaNodeSymbol) { + nodeID, err := strconv.ParseUint(pagesByNode[numaStatTypeIndex][1:], 10, 8) + if err != nil { + return cgroups.PageUsageByNUMA{}, err + } + + statsByType.Nodes[uint8(nodeID)], err = strconv.ParseUint(pagesByNode[numaStatValueIndex], 0, 64) + if err != nil { + return cgroups.PageUsageByNUMA{}, err + } + } else { + statsByType.Total, err = strconv.ParseUint(pagesByNode[numaStatValueIndex], 0, 64) + if err != nil { + return cgroups.PageUsageByNUMA{}, err + } + + statsType = pagesByNode[numaStatTypeIndex] + } + + err := addNUMAStatsByType(&stats, statsByType, statsType) + if err != nil { + return cgroups.PageUsageByNUMA{}, err + } + } + } + err = scanner.Err() + if err != nil { + return cgroups.PageUsageByNUMA{}, err + } + + return stats, nil +} + +func addNUMAStatsByType(stats *cgroups.PageUsageByNUMA, byTypeStats cgroups.PageStats, statsType string) error { + switch statsType { + case "total": + stats.Total = byTypeStats + case "file": + stats.File = byTypeStats + case "anon": + stats.Anon = byTypeStats + case "unevictable": + stats.Unevictable = byTypeStats + case "hierarchical_total": + stats.Hierarchical.Total = byTypeStats + case "hierarchical_file": + stats.Hierarchical.File = byTypeStats + case "hierarchical_anon": + stats.Hierarchical.Anon = byTypeStats + case "hierarchical_unevictable": + stats.Hierarchical.Unevictable = byTypeStats + default: + return fmt.Errorf("unsupported NUMA page type found: %s", statsType) + } + return nil +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/name.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/name.go index d8cf1d87c04..9a5af709d24 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/name.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/name.go @@ -16,10 +16,10 @@ func (s *NameGroup) Name() string { return s.GroupName } -func (s *NameGroup) Apply(d *cgroupData) error { +func (s *NameGroup) Apply(path string, d *cgroupData) error { if s.Join { // ignore errors if the named cgroup does not exist - d.join(s.GroupName) + join(path, d.pid) } return nil } @@ -28,13 +28,6 @@ func (s *NameGroup) Set(path string, cgroup *configs.Cgroup) error { return nil } -func (s *NameGroup) Remove(d *cgroupData) error { - if s.Join { - removePath(d.path(s.GroupName)) - } - return nil -} - func (s *NameGroup) GetStats(path string, stats *cgroups.Stats) error { return nil } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_cls.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_cls.go index 0212015255e..901e9554431 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_cls.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_cls.go @@ -17,12 +17,8 @@ func (s *NetClsGroup) Name() string { return "net_cls" } -func (s *NetClsGroup) Apply(d *cgroupData) error { - _, err := d.join("net_cls") - if err != nil && !cgroups.IsNotFound(err) { - return err - } - return nil +func (s *NetClsGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *NetClsGroup) Set(path string, cgroup *configs.Cgroup) error { @@ -35,10 +31,6 @@ func (s *NetClsGroup) Set(path string, cgroup *configs.Cgroup) error { return nil } -func (s *NetClsGroup) Remove(d *cgroupData) error { - return removePath(d.path("net_cls")) -} - func (s *NetClsGroup) GetStats(path string, stats *cgroups.Stats) error { return nil } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_prio.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_prio.go index 2bdeedf80af..a9645de261b 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_prio.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_prio.go @@ -15,12 +15,8 @@ func (s *NetPrioGroup) Name() string { return "net_prio" } -func (s *NetPrioGroup) Apply(d *cgroupData) error { - _, err := d.join("net_prio") - if err != nil && !cgroups.IsNotFound(err) { - return err - } - return nil +func (s *NetPrioGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *NetPrioGroup) Set(path string, cgroup *configs.Cgroup) error { @@ -33,10 +29,6 @@ func (s *NetPrioGroup) Set(path string, cgroup *configs.Cgroup) error { return nil } -func (s *NetPrioGroup) Remove(d *cgroupData) error { - return removePath(d.path("net_prio")) -} - func (s *NetPrioGroup) GetStats(path string, stats *cgroups.Stats) error { return nil } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/perf_event.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/perf_event.go index 5693676d3a5..dd1e98d0aed 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/perf_event.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/perf_event.go @@ -14,22 +14,14 @@ func (s *PerfEventGroup) Name() string { return "perf_event" } -func (s *PerfEventGroup) Apply(d *cgroupData) error { - // we just want to join this group even though we don't set anything - if _, err := d.join("perf_event"); err != nil && !cgroups.IsNotFound(err) { - return err - } - return nil +func (s *PerfEventGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *PerfEventGroup) Set(path string, cgroup *configs.Cgroup) error { return nil } -func (s *PerfEventGroup) Remove(d *cgroupData) error { - return removePath(d.path("perf_event")) -} - func (s *PerfEventGroup) GetStats(path string, stats *cgroups.Stats) error { return nil } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/pids.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/pids.go index 7bf68013589..6614df88a78 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/pids.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/pids.go @@ -19,12 +19,8 @@ func (s *PidsGroup) Name() string { return "pids" } -func (s *PidsGroup) Apply(d *cgroupData) error { - _, err := d.join("pids") - if err != nil && !cgroups.IsNotFound(err) { - return err - } - return nil +func (s *PidsGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *PidsGroup) Set(path string, cgroup *configs.Cgroup) error { @@ -44,11 +40,10 @@ func (s *PidsGroup) Set(path string, cgroup *configs.Cgroup) error { return nil } -func (s *PidsGroup) Remove(d *cgroupData) error { - return removePath(d.path("pids")) -} - func (s *PidsGroup) GetStats(path string, stats *cgroups.Stats) error { + if !cgroups.PathExists(path) { + return nil + } current, err := fscommon.GetCgroupParamUint(path, "pids.current") if err != nil { return fmt.Errorf("failed to parse pids.current - %s", err) diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs_unsupported.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/unsupported.go similarity index 100% rename from vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs_unsupported.go rename to vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/unsupported.go diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpu.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpu.go index f0f5df09a80..edf1060ecb4 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpu.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpu.go @@ -13,15 +13,36 @@ import ( "github.com/opencontainers/runc/libcontainer/configs" ) +func isCpuSet(cgroup *configs.Cgroup) bool { + return cgroup.Resources.CpuWeight != 0 || cgroup.Resources.CpuQuota != 0 || cgroup.Resources.CpuPeriod != 0 +} + func setCpu(dirPath string, cgroup *configs.Cgroup) error { - if cgroup.Resources.CpuWeight != 0 { - if err := fscommon.WriteFile(dirPath, "cpu.weight", strconv.FormatUint(cgroup.Resources.CpuWeight, 10)); err != nil { + if !isCpuSet(cgroup) { + return nil + } + r := cgroup.Resources + + // NOTE: .CpuShares is not used here. Conversion is the caller's responsibility. + if r.CpuWeight != 0 { + if err := fscommon.WriteFile(dirPath, "cpu.weight", strconv.FormatUint(r.CpuWeight, 10)); err != nil { return err } } - if cgroup.Resources.CpuMax != "" { - if err := fscommon.WriteFile(dirPath, "cpu.max", cgroup.Resources.CpuMax); err != nil { + if r.CpuQuota != 0 || r.CpuPeriod != 0 { + str := "max" + if r.CpuQuota > 0 { + str = strconv.FormatInt(r.CpuQuota, 10) + } + period := r.CpuPeriod + if period == 0 { + // This default value is documented in + // https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html + period = 100000 + } + str += " " + strconv.FormatUint(period, 10) + if err := fscommon.WriteFile(dirPath, "cpu.max", str); err != nil { return err } } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpuset.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpuset.go index 6492ac93c58..fb4456b43c1 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpuset.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpuset.go @@ -7,7 +7,15 @@ import ( "github.com/opencontainers/runc/libcontainer/configs" ) +func isCpusetSet(cgroup *configs.Cgroup) bool { + return cgroup.Resources.CpusetCpus != "" || cgroup.Resources.CpusetMems != "" +} + func setCpuset(dirPath string, cgroup *configs.Cgroup) error { + if !isCpusetSet(cgroup) { + return nil + } + if cgroup.Resources.CpusetCpus != "" { if err := fscommon.WriteFile(dirPath, "cpuset.cpus", cgroup.Resources.CpusetCpus); err != nil { return err diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/create.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/create.go new file mode 100644 index 00000000000..7be9ece0bf4 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/create.go @@ -0,0 +1,151 @@ +package fs2 + +import ( + "bytes" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "strings" + + "github.com/opencontainers/runc/libcontainer/configs" +) + +func supportedControllers(cgroup *configs.Cgroup) ([]byte, error) { + const file = UnifiedMountpoint + "/cgroup.controllers" + return ioutil.ReadFile(file) +} + +// needAnyControllers returns whether we enable some supported controllers or not, +// based on (1) controllers available and (2) resources that are being set. +// We don't check "pseudo" controllers such as +// "freezer" and "devices". +func needAnyControllers(cgroup *configs.Cgroup) (bool, error) { + if cgroup == nil { + return false, nil + } + + // list of all available controllers + content, err := supportedControllers(cgroup) + if err != nil { + return false, err + } + avail := make(map[string]struct{}) + for _, ctr := range strings.Fields(string(content)) { + avail[ctr] = struct{}{} + } + + // check whether the controller if available or not + have := func(controller string) bool { + _, ok := avail[controller] + return ok + } + + if isPidsSet(cgroup) && have("pids") { + return true, nil + } + if isMemorySet(cgroup) && have("memory") { + return true, nil + } + if isIoSet(cgroup) && have("io") { + return true, nil + } + if isCpuSet(cgroup) && have("cpu") { + return true, nil + } + if isCpusetSet(cgroup) && have("cpuset") { + return true, nil + } + if isHugeTlbSet(cgroup) && have("hugetlb") { + return true, nil + } + + return false, nil +} + +// containsDomainController returns whether the current config contains domain controller or not. +// Refer to: http://man7.org/linux/man-pages/man7/cgroups.7.html +// As at Linux 4.19, the following controllers are threaded: cpu, perf_event, and pids. +func containsDomainController(cg *configs.Cgroup) bool { + return isMemorySet(cg) || isIoSet(cg) || isCpuSet(cg) || isHugeTlbSet(cg) +} + +// CreateCgroupPath creates cgroupv2 path, enabling all the supported controllers. +func CreateCgroupPath(path string, c *configs.Cgroup) (Err error) { + if !strings.HasPrefix(path, UnifiedMountpoint) { + return fmt.Errorf("invalid cgroup path %s", path) + } + + content, err := supportedControllers(c) + if err != nil { + return err + } + + ctrs := bytes.Fields(content) + res := append([]byte("+"), bytes.Join(ctrs, []byte(" +"))...) + + elements := strings.Split(path, "/") + elements = elements[3:] + current := "/sys/fs" + for i, e := range elements { + current = filepath.Join(current, e) + if i > 0 { + if err := os.Mkdir(current, 0755); err != nil { + if !os.IsExist(err) { + return err + } + } else { + // If the directory was created, be sure it is not left around on errors. + current := current + defer func() { + if Err != nil { + os.Remove(current) + } + }() + } + cgTypeFile := filepath.Join(current, "cgroup.type") + cgType, _ := ioutil.ReadFile(cgTypeFile) + switch strings.TrimSpace(string(cgType)) { + // If the cgroup is in an invalid mode (usually this means there's an internal + // process in the cgroup tree, because we created a cgroup under an + // already-populated-by-other-processes cgroup), then we have to error out if + // the user requested controllers which are not thread-aware. However, if all + // the controllers requested are thread-aware we can simply put the cgroup into + // threaded mode. + case "domain invalid": + if containsDomainController(c) { + return fmt.Errorf("cannot enter cgroupv2 %q with domain controllers -- it is in an invalid state", current) + } else { + // Not entirely correct (in theory we'd always want to be a domain -- + // since that means we're a properly delegated cgroup subtree) but in + // this case there's not much we can do and it's better than giving an + // error. + _ = ioutil.WriteFile(cgTypeFile, []byte("threaded"), 0644) + } + // If the cgroup is in (threaded) or (domain threaded) mode, we can only use thread-aware controllers + // (and you cannot usually take a cgroup out of threaded mode). + case "domain threaded": + fallthrough + case "threaded": + if containsDomainController(c) { + return fmt.Errorf("cannot enter cgroupv2 %q with domain controllers -- it is in %s mode", current, strings.TrimSpace(string(cgType))) + } + } + } + // enable all supported controllers + if i < len(elements)-1 { + file := filepath.Join(current, "cgroup.subtree_control") + if err := ioutil.WriteFile(file, res, 0644); err != nil { + // try write one by one + allCtrs := bytes.Split(res, []byte(" ")) + for _, ctr := range allCtrs { + _ = ioutil.WriteFile(file, ctr, 0644) + } + } + // Some controllers might not be enabled when rootless or containerized, + // but we don't catch the error here. (Caught in setXXX() functions.) + } + } + + return nil +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/defaultpath.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/defaultpath.go index e84b33f2c70..0091264539f 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/defaultpath.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/defaultpath.go @@ -44,14 +44,10 @@ func defaultDirPath(c *configs.Cgroup) (string, error) { cgParent := libcontainerUtils.CleanPath(c.Parent) cgName := libcontainerUtils.CleanPath(c.Name) - ownCgroup, err := parseCgroupFile("/proc/self/cgroup") - if err != nil { - return "", err - } - return _defaultDirPath(UnifiedMountpoint, cgPath, cgParent, cgName, ownCgroup) + return _defaultDirPath(UnifiedMountpoint, cgPath, cgParent, cgName) } -func _defaultDirPath(root, cgPath, cgParent, cgName, ownCgroup string) (string, error) { +func _defaultDirPath(root, cgPath, cgParent, cgName string) (string, error) { if (cgName != "" || cgParent != "") && cgPath != "" { return "", errors.New("cgroup: either Path or Name and Parent should be used") } @@ -62,6 +58,16 @@ func _defaultDirPath(root, cgPath, cgParent, cgName, ownCgroup string) (string, if filepath.IsAbs(innerPath) { return filepath.Join(root, innerPath), nil } + + ownCgroup, err := parseCgroupFile("/proc/self/cgroup") + if err != nil { + return "", err + } + // The current user scope most probably has tasks in it already, + // making it impossible to enable controllers for its sub-cgroup. + // A parent cgroup (with no tasks in it) is what we need. + ownCgroup = filepath.Dir(ownCgroup) + return filepath.Join(root, ownCgroup, innerPath), nil } @@ -80,9 +86,6 @@ func parseCgroupFromReader(r io.Reader) (string, error) { s = bufio.NewScanner(r) ) for s.Scan() { - if err := s.Err(); err != nil { - return "", err - } var ( text = s.Text() parts = strings.SplitN(text, ":", 3) @@ -95,5 +98,8 @@ func parseCgroupFromReader(r io.Reader) (string, error) { return parts[2], nil } } + if err := s.Err(); err != nil { + return "", err + } return "", errors.New("cgroup path not found") } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/devices.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/devices.go index e0fd685402a..053ec33e01a 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/devices.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/devices.go @@ -10,12 +10,10 @@ import ( "golang.org/x/sys/unix" ) -func isRWM(cgroupPermissions string) bool { - r := false - w := false - m := false - for _, rn := range cgroupPermissions { - switch rn { +func isRWM(perms configs.DevicePermissions) bool { + var r, w, m bool + for _, perm := range perms { + switch perm { case 'r': r = true case 'w': @@ -39,22 +37,13 @@ func canSkipEBPFError(cgroup *configs.Cgroup) bool { } func setDevices(dirPath string, cgroup *configs.Cgroup) error { + if cgroup.SkipDevices { + return nil + } + // XXX: This is currently a white-list (but all callers pass a blacklist of + // devices). This is bad for a whole variety of reasons, but will need + // to be fixed with co-ordinated effort with downstreams. devices := cgroup.Devices - if allowAllDevices := cgroup.Resources.AllowAllDevices; allowAllDevices != nil { - // never set by OCI specconv, but *allowAllDevices=false is still used by the integration test - if *allowAllDevices == true { - return errors.New("libcontainer AllowAllDevices is not supported, use Devices") - } - for _, ad := range cgroup.Resources.AllowedDevices { - d := *ad - d.Allow = true - devices = append(devices, &d) - } - } - if len(cgroup.Resources.DeniedDevices) != 0 { - // never set by OCI specconv - return errors.New("libcontainer DeniedDevices is not supported, use Devices") - } insts, license, err := devicefilter.DeviceFilter(devices) if err != nil { return err @@ -64,6 +53,17 @@ func setDevices(dirPath string, cgroup *configs.Cgroup) error { return errors.Errorf("cannot get dir FD for %s", dirPath) } defer unix.Close(dirFD) + // XXX: This code is currently incorrect when it comes to updating an + // existing cgroup with new rules (new rulesets are just appended to + // the program list because this uses BPF_F_ALLOW_MULTI). If we didn't + // use BPF_F_ALLOW_MULTI we could actually atomically swap the + // programs. + // + // The real issue is that BPF_F_ALLOW_MULTI makes it hard to have a + // race-free blacklist because it acts as a whitelist by default, and + // having a deny-everything program cannot be overriden by other + // programs. You could temporarily insert a deny-everything program + // but that would result in spurrious failures during updates. if _, err := ebpf.LoadAttachCgroupDeviceFilter(insts, license, dirFD); err != nil { if !canSkipEBPFError(cgroup) { return err diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/freezer.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/freezer.go index 130c63f3e2b..213ff65a111 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/freezer.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/freezer.go @@ -3,32 +3,49 @@ package fs2 import ( - "strconv" + stdErrors "errors" + "os" "strings" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" "github.com/pkg/errors" + "golang.org/x/sys/unix" ) func setFreezer(dirPath string, state configs.FreezerState) error { - var desired int + if err := supportsFreezer(dirPath); err != nil { + // We can ignore this request as long as the user didn't ask us to + // freeze the container (since without the freezer cgroup, that's a + // no-op). + if state == configs.Undefined || state == configs.Thawed { + err = nil + } + return errors.Wrap(err, "freezer not supported") + } + + var stateStr string switch state { case configs.Undefined: return nil case configs.Frozen: - desired = 1 + stateStr = "1" case configs.Thawed: - desired = 0 + stateStr = "0" default: - return errors.Errorf("unknown freezer state %+v", state) + return errors.Errorf("invalid freezer state %q requested", state) } - supportedErr := supportsFreezer(dirPath) - if supportedErr != nil && desired != 0 { - // can ignore error if desired == 1 - return errors.Wrap(supportedErr, "freezer not supported") + + if err := fscommon.WriteFile(dirPath, "cgroup.freeze", stateStr); err != nil { + return err } - return freezeWithInt(dirPath, desired) + // Confirm that the cgroup did actually change states. + if actualState, err := getFreezer(dirPath); err != nil { + return err + } else if actualState != state { + return errors.Errorf(`expected "cgroup.freeze" to be in state %q but was in %q`, state, actualState) + } + return nil } func supportsFreezer(dirPath string) error { @@ -36,18 +53,22 @@ func supportsFreezer(dirPath string) error { return err } -// freeze writes desired int to "cgroup.freeze". -func freezeWithInt(dirPath string, desired int) error { - desiredS := strconv.Itoa(desired) - if err := fscommon.WriteFile(dirPath, "cgroup.freeze", desiredS); err != nil { - return err - } - got, err := fscommon.ReadFile(dirPath, "cgroup.freeze") +func getFreezer(dirPath string) (configs.FreezerState, error) { + state, err := fscommon.ReadFile(dirPath, "cgroup.freeze") if err != nil { - return err + // If the kernel is too old, then we just treat the freezer as being in + // an "undefined" state. + if os.IsNotExist(err) || stdErrors.Is(err, unix.ENODEV) { + err = nil + } + return configs.Undefined, err } - if gotS := strings.TrimSpace(string(got)); gotS != desiredS { - return errors.Errorf("expected \"cgroup.freeze\" in %q to be %q, got %q", dirPath, desiredS, gotS) + switch strings.TrimSpace(state) { + case "0": + return configs.Thawed, nil + case "1": + return configs.Frozen, nil + default: + return configs.Undefined, errors.Errorf(`unknown "cgroup.freeze" state: %q`, state) } - return nil } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go index 4bb7091a183..7be26211a3d 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go @@ -8,64 +8,12 @@ import ( "path/filepath" "strings" - securejoin "github.com/cyphar/filepath-securejoin" "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/configs" "github.com/pkg/errors" + "golang.org/x/sys/unix" ) -// NewManager creates a manager for cgroup v2 unified hierarchy. -// dirPath is like "/sys/fs/cgroup/user.slice/user-1001.slice/session-1.scope". -// If dirPath is empty, it is automatically set using config. -func NewManager(config *configs.Cgroup, dirPath string, rootless bool) (cgroups.Manager, error) { - if config == nil { - config = &configs.Cgroup{} - } - if dirPath != "" { - if filepath.Clean(dirPath) != dirPath || !filepath.IsAbs(dirPath) { - return nil, errors.Errorf("invalid dir path %q", dirPath) - } - } else { - var err error - dirPath, err = defaultDirPath(config) - if err != nil { - return nil, err - } - } - controllers, err := detectControllers(dirPath) - if err != nil && !rootless { - return nil, err - } - - m := &manager{ - config: config, - dirPath: dirPath, - controllers: controllers, - rootless: rootless, - } - return m, nil -} - -func detectControllers(dirPath string) (map[string]struct{}, error) { - if err := os.MkdirAll(dirPath, 0755); err != nil { - return nil, err - } - controllersPath, err := securejoin.SecureJoin(dirPath, "cgroup.controllers") - if err != nil { - return nil, err - } - controllersData, err := ioutil.ReadFile(controllersPath) - if err != nil { - return nil, err - } - controllersFields := strings.Fields(string(controllersData)) - controllers := make(map[string]struct{}, len(controllersFields)) - for _, c := range controllersFields { - controllers[c] = struct{}{} - } - return controllers, nil -} - type manager struct { config *configs.Cgroup // dirPath is like "/sys/fs/cgroup/user.slice/user-1001.slice/session-1.scope" @@ -76,8 +24,68 @@ type manager struct { rootless bool } +// NewManager creates a manager for cgroup v2 unified hierarchy. +// dirPath is like "/sys/fs/cgroup/user.slice/user-1001.slice/session-1.scope". +// If dirPath is empty, it is automatically set using config. +func NewManager(config *configs.Cgroup, dirPath string, rootless bool) (cgroups.Manager, error) { + if config == nil { + config = &configs.Cgroup{} + } + if dirPath == "" { + var err error + dirPath, err = defaultDirPath(config) + if err != nil { + return nil, err + } + } + + m := &manager{ + config: config, + dirPath: dirPath, + rootless: rootless, + } + return m, nil +} + +func (m *manager) getControllers() error { + if m.controllers != nil { + return nil + } + + file := filepath.Join(m.dirPath, "cgroup.controllers") + data, err := ioutil.ReadFile(file) + if err != nil { + if m.rootless && m.config.Path == "" { + return nil + } + return err + } + fields := strings.Fields(string(data)) + m.controllers = make(map[string]struct{}, len(fields)) + for _, c := range fields { + m.controllers[c] = struct{}{} + } + + return nil +} + func (m *manager) Apply(pid int) error { - if err := cgroups.WriteCgroupProc(m.dirPath, pid); err != nil && !m.rootless { + if err := CreateCgroupPath(m.dirPath, m.config); err != nil { + // Related tests: + // - "runc create (no limits + no cgrouppath + no permission) succeeds" + // - "runc create (rootless + no limits + cgrouppath + no permission) fails with permission error" + // - "runc create (rootless + limits + no cgrouppath + no permission) fails with informative error" + if m.rootless { + if m.config.Path == "" { + if blNeed, nErr := needAnyControllers(m.config); nErr == nil && !blNeed { + return nil + } + return errors.Wrap(err, "rootless needs no limits + no cgrouppath when no permission is granted for cgroups") + } + } + return err + } + if err := cgroups.WriteCgroupProc(m.dirPath, pid); err != nil { return err } return nil @@ -93,41 +101,52 @@ func (m *manager) GetAllPids() ([]int, error) { func (m *manager) GetStats() (*cgroups.Stats, error) { var ( - st cgroups.Stats errs []error ) + + st := cgroups.NewStats() + if err := m.getControllers(); err != nil { + return st, err + } + // pids (since kernel 4.5) if _, ok := m.controllers["pids"]; ok { - if err := statPids(m.dirPath, &st); err != nil { + if err := statPids(m.dirPath, st); err != nil { errs = append(errs, err) } } else { - if err := statPidsWithoutController(m.dirPath, &st); err != nil { + if err := statPidsWithoutController(m.dirPath, st); err != nil { errs = append(errs, err) } } - // memory (since kenrel 4.5) + // memory (since kernel 4.5) if _, ok := m.controllers["memory"]; ok { - if err := statMemory(m.dirPath, &st); err != nil { + if err := statMemory(m.dirPath, st); err != nil { errs = append(errs, err) } } // io (since kernel 4.5) if _, ok := m.controllers["io"]; ok { - if err := statIo(m.dirPath, &st); err != nil { + if err := statIo(m.dirPath, st); err != nil { errs = append(errs, err) } } // cpu (since kernel 4.15) if _, ok := m.controllers["cpu"]; ok { - if err := statCpu(m.dirPath, &st); err != nil { + if err := statCpu(m.dirPath, st); err != nil { + errs = append(errs, err) + } + } + // hugetlb (since kernel 5.6) + if _, ok := m.controllers["hugetlb"]; ok { + if err := statHugeTlb(m.dirPath, st); err != nil { errs = append(errs, err) } } if len(errs) > 0 && !m.rootless { - return &st, errors.Errorf("error while statting cgroup v2: %+v", errs) + return st, errors.Errorf("error while statting cgroup v2: %+v", errs) } - return &st, nil + return st, nil } func (m *manager) Freeze(state configs.FreezerState) error { @@ -138,77 +157,112 @@ func (m *manager) Freeze(state configs.FreezerState) error { return nil } +func rmdir(path string) error { + err := unix.Rmdir(path) + if err == nil || err == unix.ENOENT { + return nil + } + return &os.PathError{Op: "rmdir", Path: path, Err: err} +} + +// removeCgroupPath aims to remove cgroup path recursively +// Because there may be subcgroups in it. +func removeCgroupPath(path string) error { + // try the fast path first + if err := rmdir(path); err == nil { + return nil + } + + infos, err := ioutil.ReadDir(path) + if err != nil { + if os.IsNotExist(err) { + err = nil + } + return err + } + for _, info := range infos { + if info.IsDir() { + // We should remove subcgroups dir first + if err = removeCgroupPath(filepath.Join(path, info.Name())); err != nil { + break + } + } + } + if err == nil { + err = rmdir(path) + } + return err +} + func (m *manager) Destroy() error { - return os.RemoveAll(m.dirPath) + return removeCgroupPath(m.dirPath) } -// GetPaths is for compatibility purpose and should be removed in future -func (m *manager) GetPaths() map[string]string { - paths := map[string]string{ - // pseudo-controller for compatibility - "devices": m.dirPath, - "freezer": m.dirPath, - } - for c := range m.controllers { - paths[c] = m.dirPath - } - return paths -} - -func (m *manager) GetUnifiedPath() (string, error) { - return m.dirPath, nil +func (m *manager) Path(_ string) string { + return m.dirPath } func (m *manager) Set(container *configs.Config) error { if container == nil || container.Cgroups == nil { return nil } - var errs []error + if err := m.getControllers(); err != nil { + return err + } // pids (since kernel 4.5) - if _, ok := m.controllers["pids"]; ok { - if err := setPids(m.dirPath, container.Cgroups); err != nil { - errs = append(errs, err) - } + if err := setPids(m.dirPath, container.Cgroups); err != nil { + return err } // memory (since kernel 4.5) - if _, ok := m.controllers["memory"]; ok { - if err := setMemory(m.dirPath, container.Cgroups); err != nil { - errs = append(errs, err) - } + if err := setMemory(m.dirPath, container.Cgroups); err != nil { + return err } // io (since kernel 4.5) - if _, ok := m.controllers["io"]; ok { - if err := setIo(m.dirPath, container.Cgroups); err != nil { - errs = append(errs, err) - } + if err := setIo(m.dirPath, container.Cgroups); err != nil { + return err } // cpu (since kernel 4.15) - if _, ok := m.controllers["cpu"]; ok { - if err := setCpu(m.dirPath, container.Cgroups); err != nil { - errs = append(errs, err) - } + if err := setCpu(m.dirPath, container.Cgroups); err != nil { + return err } // devices (since kernel 4.15, pseudo-controller) - if err := setDevices(m.dirPath, container.Cgroups); err != nil { - errs = append(errs, err) + // + // When m.Rootless is true, errors from the device subsystem are ignored because it is really not expected to work. + // However, errors from other subsystems are not ignored. + // see @test "runc create (rootless + limits + no cgrouppath + no permission) fails with informative error" + if err := setDevices(m.dirPath, container.Cgroups); err != nil && !m.rootless { + return err } // cpuset (since kernel 5.0) - if _, ok := m.controllers["cpuset"]; ok { - if err := setCpuset(m.dirPath, container.Cgroups); err != nil { - errs = append(errs, err) - } + if err := setCpuset(m.dirPath, container.Cgroups); err != nil { + return err + } + // hugetlb (since kernel 5.6) + if err := setHugeTlb(m.dirPath, container.Cgroups); err != nil { + return err } // freezer (since kernel 5.2, pseudo-controller) if err := setFreezer(m.dirPath, container.Cgroups.Freezer); err != nil { - errs = append(errs, err) - } - if len(errs) > 0 && !m.rootless { - return errors.Errorf("error while setting cgroup v2: %+v", errs) + return err } m.config = container.Cgroups return nil } +func (m *manager) GetPaths() map[string]string { + paths := make(map[string]string, 1) + paths[""] = m.dirPath + return paths +} + func (m *manager) GetCgroups() (*configs.Cgroup, error) { return m.config, nil } + +func (m *manager) GetFreezerState() (configs.FreezerState, error) { + return getFreezer(m.dirPath) +} + +func (m *manager) Exists() bool { + return cgroups.PathExists(m.dirPath) +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go new file mode 100644 index 00000000000..4a399aaecd5 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go @@ -0,0 +1,66 @@ +// +build linux + +package fs2 + +import ( + "io/ioutil" + "path/filepath" + "strconv" + "strings" + + "github.com/pkg/errors" + + "github.com/opencontainers/runc/libcontainer/cgroups" + "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" + "github.com/opencontainers/runc/libcontainer/configs" +) + +func isHugeTlbSet(cgroup *configs.Cgroup) bool { + return len(cgroup.Resources.HugetlbLimit) > 0 +} + +func setHugeTlb(dirPath string, cgroup *configs.Cgroup) error { + if !isHugeTlbSet(cgroup) { + return nil + } + for _, hugetlb := range cgroup.Resources.HugetlbLimit { + if err := fscommon.WriteFile(dirPath, strings.Join([]string{"hugetlb", hugetlb.Pagesize, "max"}, "."), strconv.FormatUint(hugetlb.Limit, 10)); err != nil { + return err + } + } + + return nil +} + +func statHugeTlb(dirPath string, stats *cgroups.Stats) error { + hugePageSizes, err := cgroups.GetHugePageSize() + if err != nil { + return errors.Wrap(err, "failed to fetch hugetlb info") + } + hugetlbStats := cgroups.HugetlbStats{} + + for _, pagesize := range hugePageSizes { + usage := strings.Join([]string{"hugetlb", pagesize, "current"}, ".") + value, err := fscommon.GetCgroupParamUint(dirPath, usage) + if err != nil { + return errors.Wrapf(err, "failed to parse hugetlb.%s.current file", pagesize) + } + hugetlbStats.Usage = value + + fileName := strings.Join([]string{"hugetlb", pagesize, "events"}, ".") + filePath := filepath.Join(dirPath, fileName) + contents, err := ioutil.ReadFile(filePath) + if err != nil { + return errors.Wrapf(err, "failed to parse hugetlb.%s.events file", pagesize) + } + _, value, err = fscommon.GetCgroupParamKeyValue(string(contents)) + if err != nil { + return errors.Wrapf(err, "failed to parse hugetlb.%s.events file", pagesize) + } + hugetlbStats.Failcnt = value + + stats.HugetlbStats[pagesize] = hugetlbStats + } + + return nil +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/io.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/io.go index 9a07308802a..bbe3ac064b3 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/io.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/io.go @@ -14,14 +14,26 @@ import ( "github.com/opencontainers/runc/libcontainer/configs" ) +func isIoSet(cgroup *configs.Cgroup) bool { + return cgroup.Resources.BlkioWeight != 0 || + len(cgroup.Resources.BlkioThrottleReadBpsDevice) > 0 || + len(cgroup.Resources.BlkioThrottleWriteBpsDevice) > 0 || + len(cgroup.Resources.BlkioThrottleReadIOPSDevice) > 0 || + len(cgroup.Resources.BlkioThrottleWriteIOPSDevice) > 0 +} + func setIo(dirPath string, cgroup *configs.Cgroup) error { + if !isIoSet(cgroup) { + return nil + } + if cgroup.Resources.BlkioWeight != 0 { filename := "io.bfq.weight" - if err := fscommon.WriteFile(dirPath, filename, strconv.FormatUint(uint64(cgroup.Resources.BlkioWeight), 10)); err != nil { + if err := fscommon.WriteFile(dirPath, filename, + strconv.FormatUint(cgroups.ConvertBlkIOToCgroupV2Value(cgroup.Resources.BlkioWeight), 10)); err != nil { return err } } - for _, td := range cgroup.Resources.BlkioThrottleReadBpsDevice { if err := fscommon.WriteFile(dirPath, "io.max", td.StringName("rbps")); err != nil { return err @@ -81,11 +93,11 @@ func statIo(dirPath string, stats *cgroups.Stats) error { if len(d) != 2 { continue } - minor, err := strconv.ParseUint(d[0], 10, 0) + major, err := strconv.ParseUint(d[0], 10, 0) if err != nil { return err } - major, err := strconv.ParseUint(d[1], 10, 0) + minor, err := strconv.ParseUint(d[1], 10, 0) if err != nil { return err } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go index 23eccbec40d..51d12c08653 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go @@ -15,22 +15,58 @@ import ( "github.com/pkg/errors" ) +// numToStr converts an int64 value to a string for writing to a +// cgroupv2 files with .min, .max, .low, or .high suffix. +// The value of -1 is converted to "max" for cgroupv1 compatibility +// (which used to write -1 to remove the limit). +func numToStr(value int64) (ret string) { + switch { + case value == 0: + ret = "" + case value == -1: + ret = "max" + default: + ret = strconv.FormatInt(value, 10) + } + + return ret +} + +func isMemorySet(cgroup *configs.Cgroup) bool { + return cgroup.Resources.MemoryReservation != 0 || + cgroup.Resources.Memory != 0 || cgroup.Resources.MemorySwap != 0 +} + func setMemory(dirPath string, cgroup *configs.Cgroup) error { - if cgroup.Resources.MemorySwap != 0 { - if err := fscommon.WriteFile(dirPath, "memory.swap.max", strconv.FormatInt(cgroup.Resources.MemorySwap, 10)); err != nil { + if !isMemorySet(cgroup) { + return nil + } + swap, err := cgroups.ConvertMemorySwapToCgroupV2Value(cgroup.Resources.MemorySwap, cgroup.Resources.Memory) + if err != nil { + return err + } + swapStr := numToStr(swap) + if swapStr == "" && swap == 0 && cgroup.Resources.MemorySwap > 0 { + // memory and memorySwap set to the same value -- disable swap + swapStr = "0" + } + // never write empty string to `memory.swap.max`, it means set to 0. + if swapStr != "" { + if err := fscommon.WriteFile(dirPath, "memory.swap.max", swapStr); err != nil { return err } } - if cgroup.Resources.Memory != 0 { - if err := fscommon.WriteFile(dirPath, "memory.max", strconv.FormatInt(cgroup.Resources.Memory, 10)); err != nil { + + if val := numToStr(cgroup.Resources.Memory); val != "" { + if err := fscommon.WriteFile(dirPath, "memory.max", val); err != nil { return err } } // cgroup.Resources.KernelMemory is ignored - if cgroup.Resources.MemoryReservation != 0 { - if err := fscommon.WriteFile(dirPath, "memory.low", strconv.FormatInt(cgroup.Resources.MemoryReservation, 10)); err != nil { + if val := numToStr(cgroup.Resources.MemoryReservation); val != "" { + if err := fscommon.WriteFile(dirPath, "memory.low", val); err != nil { return err } } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/pids.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/pids.go index db2d7ac90da..b8153d28398 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/pids.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/pids.go @@ -4,9 +4,7 @@ package fs2 import ( "io/ioutil" - "os" "path/filepath" - "strconv" "strings" "github.com/opencontainers/runc/libcontainer/cgroups" @@ -16,16 +14,16 @@ import ( "golang.org/x/sys/unix" ) +func isPidsSet(cgroup *configs.Cgroup) bool { + return cgroup.Resources.PidsLimit != 0 +} + func setPids(dirPath string, cgroup *configs.Cgroup) error { - if cgroup.Resources.PidsLimit != 0 { - // "max" is the fallback value. - limit := "max" - - if cgroup.Resources.PidsLimit > 0 { - limit = strconv.FormatInt(cgroup.Resources.PidsLimit, 10) - } - - if err := fscommon.WriteFile(dirPath, "pids.max", limit); err != nil { + if !isPidsSet(cgroup) { + return nil + } + if val := numToStr(cgroup.Resources.PidsLimit); val != "" { + if err := fscommon.WriteFile(dirPath, "pids.max", val); err != nil { return err } } @@ -33,20 +31,11 @@ func setPids(dirPath string, cgroup *configs.Cgroup) error { return nil } -func isNOTSUP(err error) bool { - switch err := err.(type) { - case *os.PathError: - return err.Err == unix.ENOTSUP - default: - return false - } -} - func statPidsWithoutController(dirPath string, stats *cgroups.Stats) error { // if the controller is not enabled, let's read PIDS from cgroups.procs // (or threads if cgroup.threads is enabled) contents, err := ioutil.ReadFile(filepath.Join(dirPath, "cgroup.procs")) - if err != nil && isNOTSUP(err) { + if errors.Is(err, unix.ENOTSUP) { contents, err = ioutil.ReadFile(filepath.Join(dirPath, "cgroup.threads")) } if err != nil { diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/fscommon.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/fscommon.go index dd92e8c8c67..46e06dc62d3 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/fscommon.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/fscommon.go @@ -4,9 +4,12 @@ package fscommon import ( "io/ioutil" + "os" securejoin "github.com/cyphar/filepath-securejoin" "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "golang.org/x/sys/unix" ) func WriteFile(dir, file, data string) error { @@ -17,7 +20,7 @@ func WriteFile(dir, file, data string) error { if err != nil { return err } - if err := ioutil.WriteFile(path, []byte(data), 0700); err != nil { + if err := retryingWriteFile(path, []byte(data), 0700); err != nil { return errors.Wrapf(err, "failed to write %q to %q", data, path) } return nil @@ -34,3 +37,14 @@ func ReadFile(dir, file string) (string, error) { data, err := ioutil.ReadFile(path) return string(data), err } + +func retryingWriteFile(filename string, data []byte, perm os.FileMode) error { + for { + err := ioutil.WriteFile(filename, data, perm) + if errors.Is(err, unix.EINTR) { + logrus.Infof("interrupted while writing %s to %s", string(data), filename) + continue + } + return err + } +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go index 8eeedc55b07..7ac81660595 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go @@ -20,6 +20,12 @@ type CpuUsage struct { // Total CPU time consumed per core. // Units: nanoseconds. PercpuUsage []uint64 `json:"percpu_usage,omitempty"` + // CPU time consumed per core in kernel mode + // Units: nanoseconds. + PercpuUsageInKernelmode []uint64 `json:"percpu_usage_in_kernelmode"` + // CPU time consumed per core in user mode + // Units: nanoseconds. + PercpuUsageInUsermode []uint64 `json:"percpu_usage_in_usermode"` // Time spent by tasks of the cgroup in kernel mode. // Units: nanoseconds. UsageInKernelmode uint64 `json:"usage_in_kernelmode"` @@ -51,12 +57,33 @@ type MemoryStats struct { KernelUsage MemoryData `json:"kernel_usage,omitempty"` // usage of kernel TCP memory KernelTCPUsage MemoryData `json:"kernel_tcp_usage,omitempty"` + // usage of memory pages by NUMA node + // see chapter 5.6 of memory controller documentation + PageUsageByNUMA PageUsageByNUMA `json:"page_usage_by_numa,omitempty"` // if true, memory usage is accounted for throughout a hierarchy of cgroups. UseHierarchy bool `json:"use_hierarchy"` Stats map[string]uint64 `json:"stats,omitempty"` } +type PageUsageByNUMA struct { + // Embedding is used as types can't be recursive. + PageUsageByNUMAInner + Hierarchical PageUsageByNUMAInner `json:"hierarchical,omitempty"` +} + +type PageUsageByNUMAInner struct { + Total PageStats `json:"total,omitempty"` + File PageStats `json:"file,omitempty"` + Anon PageStats `json:"anon,omitempty"` + Unevictable PageStats `json:"unevictable,omitempty"` +} + +type PageStats struct { + Total uint64 `json:"total,omitempty"` + Nodes map[uint8]uint64 `json:"nodes,omitempty"` +} + type PidsStats struct { // number of pids in the cgroup Current uint64 `json:"current,omitempty"` diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/apply_systemd.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/apply_systemd.go deleted file mode 100644 index c4b19b3e6d4..00000000000 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/apply_systemd.go +++ /dev/null @@ -1,534 +0,0 @@ -// +build linux - -package systemd - -import ( - "errors" - "fmt" - "io/ioutil" - "math" - "os" - "path/filepath" - "strings" - "sync" - "time" - - systemdDbus "github.com/coreos/go-systemd/dbus" - "github.com/godbus/dbus" - "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/cgroups/fs" - "github.com/opencontainers/runc/libcontainer/configs" - "github.com/sirupsen/logrus" -) - -type LegacyManager struct { - mu sync.Mutex - Cgroups *configs.Cgroup - Paths map[string]string -} - -type subsystem interface { - // Name returns the name of the subsystem. - Name() string - // Returns the stats, as 'stats', corresponding to the cgroup under 'path'. - GetStats(path string, stats *cgroups.Stats) error - // Set the cgroup represented by cgroup. - Set(path string, cgroup *configs.Cgroup) error -} - -var errSubsystemDoesNotExist = errors.New("cgroup: subsystem does not exist") - -type subsystemSet []subsystem - -func (s subsystemSet) Get(name string) (subsystem, error) { - for _, ss := range s { - if ss.Name() == name { - return ss, nil - } - } - return nil, errSubsystemDoesNotExist -} - -var legacySubsystems = subsystemSet{ - &fs.CpusetGroup{}, - &fs.DevicesGroup{}, - &fs.MemoryGroup{}, - &fs.CpuGroup{}, - &fs.CpuacctGroup{}, - &fs.PidsGroup{}, - &fs.BlkioGroup{}, - &fs.HugetlbGroup{}, - &fs.PerfEventGroup{}, - &fs.FreezerGroup{}, - &fs.NetPrioGroup{}, - &fs.NetClsGroup{}, - &fs.NameGroup{GroupName: "name=systemd"}, -} - -const ( - testScopeWait = 4 - testSliceWait = 4 -) - -var ( - connLock sync.Mutex - theConn *systemdDbus.Conn -) - -func newProp(name string, units interface{}) systemdDbus.Property { - return systemdDbus.Property{ - Name: name, - Value: dbus.MakeVariant(units), - } -} - -// NOTE: This function comes from package github.com/coreos/go-systemd/util -// It was borrowed here to avoid a dependency on cgo. -// -// IsRunningSystemd checks whether the host was booted with systemd as its init -// system. This functions similarly to systemd's `sd_booted(3)`: internally, it -// checks whether /run/systemd/system/ exists and is a directory. -// http://www.freedesktop.org/software/systemd/man/sd_booted.html -func isRunningSystemd() bool { - fi, err := os.Lstat("/run/systemd/system") - if err != nil { - return false - } - return fi.IsDir() -} - -func UseSystemd() bool { - if !isRunningSystemd() { - return false - } - - connLock.Lock() - defer connLock.Unlock() - - if theConn == nil { - var err error - theConn, err = systemdDbus.New() - if err != nil { - return false - } - } - return true -} - -func NewSystemdCgroupsManager() (func(config *configs.Cgroup, paths map[string]string) cgroups.Manager, error) { - if !isRunningSystemd() { - return nil, fmt.Errorf("systemd not running on this host, can't use systemd as a cgroups.Manager") - } - if cgroups.IsCgroup2UnifiedMode() { - return func(config *configs.Cgroup, paths map[string]string) cgroups.Manager { - return &UnifiedManager{ - Cgroups: config, - Paths: paths, - } - }, nil - } - return func(config *configs.Cgroup, paths map[string]string) cgroups.Manager { - return &LegacyManager{ - Cgroups: config, - Paths: paths, - } - }, nil -} - -func (m *LegacyManager) Apply(pid int) error { - var ( - c = m.Cgroups - unitName = getUnitName(c) - slice = "system.slice" - properties []systemdDbus.Property - ) - - if c.Paths != nil { - paths := make(map[string]string) - for name, path := range c.Paths { - _, err := getSubsystemPath(m.Cgroups, name) - if err != nil { - // Don't fail if a cgroup hierarchy was not found, just skip this subsystem - if cgroups.IsNotFound(err) { - continue - } - return err - } - paths[name] = path - } - m.Paths = paths - return cgroups.EnterPid(m.Paths, pid) - } - - if c.Parent != "" { - slice = c.Parent - } - - properties = append(properties, systemdDbus.PropDescription("libcontainer container "+c.Name)) - - // if we create a slice, the parent is defined via a Wants= - if strings.HasSuffix(unitName, ".slice") { - properties = append(properties, systemdDbus.PropWants(slice)) - } else { - // otherwise, we use Slice= - properties = append(properties, systemdDbus.PropSlice(slice)) - } - - // only add pid if its valid, -1 is used w/ general slice creation. - if pid != -1 { - properties = append(properties, newProp("PIDs", []uint32{uint32(pid)})) - } - - // Check if we can delegate. This is only supported on systemd versions 218 and above. - if !strings.HasSuffix(unitName, ".slice") { - // Assume scopes always support delegation. - properties = append(properties, newProp("Delegate", true)) - } - - // Always enable accounting, this gets us the same behaviour as the fs implementation, - // plus the kernel has some problems with joining the memory cgroup at a later time. - properties = append(properties, - newProp("MemoryAccounting", true), - newProp("CPUAccounting", true), - newProp("BlockIOAccounting", true)) - - // Assume DefaultDependencies= will always work (the check for it was previously broken.) - properties = append(properties, - newProp("DefaultDependencies", false)) - - if c.Resources.Memory != 0 { - properties = append(properties, - newProp("MemoryLimit", uint64(c.Resources.Memory))) - } - - if c.Resources.CpuShares != 0 { - properties = append(properties, - newProp("CPUShares", c.Resources.CpuShares)) - } - - // cpu.cfs_quota_us and cpu.cfs_period_us are controlled by systemd. - if c.Resources.CpuQuota != 0 && c.Resources.CpuPeriod != 0 { - // corresponds to USEC_INFINITY in systemd - // if USEC_INFINITY is provided, CPUQuota is left unbound by systemd - // always setting a property value ensures we can apply a quota and remove it later - cpuQuotaPerSecUSec := uint64(math.MaxUint64) - if c.Resources.CpuQuota > 0 { - // systemd converts CPUQuotaPerSecUSec (microseconds per CPU second) to CPUQuota - // (integer percentage of CPU) internally. This means that if a fractional percent of - // CPU is indicated by Resources.CpuQuota, we need to round up to the nearest - // 10ms (1% of a second) such that child cgroups can set the cpu.cfs_quota_us they expect. - cpuQuotaPerSecUSec = uint64(c.Resources.CpuQuota*1000000) / c.Resources.CpuPeriod - if cpuQuotaPerSecUSec%10000 != 0 { - cpuQuotaPerSecUSec = ((cpuQuotaPerSecUSec / 10000) + 1) * 10000 - } - } - properties = append(properties, - newProp("CPUQuotaPerSecUSec", cpuQuotaPerSecUSec)) - } - - if c.Resources.BlkioWeight != 0 { - properties = append(properties, - newProp("BlockIOWeight", uint64(c.Resources.BlkioWeight))) - } - - if c.Resources.PidsLimit > 0 { - properties = append(properties, - newProp("TasksAccounting", true), - newProp("TasksMax", uint64(c.Resources.PidsLimit))) - } - - // We have to set kernel memory here, as we can't change it once - // processes have been attached to the cgroup. - if c.Resources.KernelMemory != 0 { - if err := setKernelMemory(c); err != nil { - return err - } - } - - statusChan := make(chan string, 1) - if _, err := theConn.StartTransientUnit(unitName, "replace", properties, statusChan); err == nil { - select { - case <-statusChan: - case <-time.After(time.Second): - logrus.Warnf("Timed out while waiting for StartTransientUnit(%s) completion signal from dbus. Continuing...", unitName) - } - } else if !isUnitExists(err) { - return err - } - - if err := joinCgroups(c, pid); err != nil { - return err - } - - paths := make(map[string]string) - for _, s := range legacySubsystems { - subsystemPath, err := getSubsystemPath(m.Cgroups, s.Name()) - if err != nil { - // Don't fail if a cgroup hierarchy was not found, just skip this subsystem - if cgroups.IsNotFound(err) { - continue - } - return err - } - paths[s.Name()] = subsystemPath - } - m.Paths = paths - return nil -} - -func (m *LegacyManager) Destroy() error { - if m.Cgroups.Paths != nil { - return nil - } - m.mu.Lock() - defer m.mu.Unlock() - theConn.StopUnit(getUnitName(m.Cgroups), "replace", nil) - if err := cgroups.RemovePaths(m.Paths); err != nil { - return err - } - m.Paths = make(map[string]string) - return nil -} - -func (m *LegacyManager) GetPaths() map[string]string { - m.mu.Lock() - paths := m.Paths - m.mu.Unlock() - return paths -} - -func (m *LegacyManager) GetUnifiedPath() (string, error) { - return "", errors.New("unified path is only supported when running in unified mode") -} - -func join(c *configs.Cgroup, subsystem string, pid int) (string, error) { - path, err := getSubsystemPath(c, subsystem) - if err != nil { - return "", err - } - - if err := os.MkdirAll(path, 0755); err != nil { - return "", err - } - if err := cgroups.WriteCgroupProc(path, pid); err != nil { - return "", err - } - return path, nil -} - -func joinCgroups(c *configs.Cgroup, pid int) error { - for _, sys := range legacySubsystems { - name := sys.Name() - switch name { - case "name=systemd": - // let systemd handle this - case "cpuset": - path, err := getSubsystemPath(c, name) - if err != nil && !cgroups.IsNotFound(err) { - return err - } - s := &fs.CpusetGroup{} - if err := s.ApplyDir(path, c, pid); err != nil { - return err - } - default: - _, err := join(c, name, pid) - if err != nil { - // Even if it's `not found` error, we'll return err - // because devices cgroup is hard requirement for - // container security. - if name == "devices" { - return err - } - // For other subsystems, omit the `not found` error - // because they are optional. - if !cgroups.IsNotFound(err) { - return err - } - } - } - } - - return nil -} - -// systemd represents slice hierarchy using `-`, so we need to follow suit when -// generating the path of slice. Essentially, test-a-b.slice becomes -// /test.slice/test-a.slice/test-a-b.slice. -func ExpandSlice(slice string) (string, error) { - suffix := ".slice" - // Name has to end with ".slice", but can't be just ".slice". - if len(slice) < len(suffix) || !strings.HasSuffix(slice, suffix) { - return "", fmt.Errorf("invalid slice name: %s", slice) - } - - // Path-separators are not allowed. - if strings.Contains(slice, "/") { - return "", fmt.Errorf("invalid slice name: %s", slice) - } - - var path, prefix string - sliceName := strings.TrimSuffix(slice, suffix) - // if input was -.slice, we should just return root now - if sliceName == "-" { - return "/", nil - } - for _, component := range strings.Split(sliceName, "-") { - // test--a.slice isn't permitted, nor is -test.slice. - if component == "" { - return "", fmt.Errorf("invalid slice name: %s", slice) - } - - // Append the component to the path and to the prefix. - path += "/" + prefix + component + suffix - prefix += component + "-" - } - return path, nil -} - -func getSubsystemPath(c *configs.Cgroup, subsystem string) (string, error) { - mountpoint, err := cgroups.FindCgroupMountpoint(c.Path, subsystem) - if err != nil { - return "", err - } - - initPath, err := cgroups.GetInitCgroup(subsystem) - if err != nil { - return "", err - } - // if pid 1 is systemd 226 or later, it will be in init.scope, not the root - initPath = strings.TrimSuffix(filepath.Clean(initPath), "init.scope") - - slice := "system.slice" - if c.Parent != "" { - slice = c.Parent - } - - slice, err = ExpandSlice(slice) - if err != nil { - return "", err - } - - return filepath.Join(mountpoint, initPath, slice, getUnitName(c)), nil -} - -func (m *LegacyManager) Freeze(state configs.FreezerState) error { - path, err := getSubsystemPath(m.Cgroups, "freezer") - if err != nil { - return err - } - prevState := m.Cgroups.Resources.Freezer - m.Cgroups.Resources.Freezer = state - freezer, err := legacySubsystems.Get("freezer") - if err != nil { - return err - } - err = freezer.Set(path, m.Cgroups) - if err != nil { - m.Cgroups.Resources.Freezer = prevState - return err - } - return nil -} - -func (m *LegacyManager) GetPids() ([]int, error) { - path, err := getSubsystemPath(m.Cgroups, "devices") - if err != nil { - return nil, err - } - return cgroups.GetPids(path) -} - -func (m *LegacyManager) GetAllPids() ([]int, error) { - path, err := getSubsystemPath(m.Cgroups, "devices") - if err != nil { - return nil, err - } - return cgroups.GetAllPids(path) -} - -func (m *LegacyManager) GetStats() (*cgroups.Stats, error) { - m.mu.Lock() - defer m.mu.Unlock() - stats := cgroups.NewStats() - for name, path := range m.Paths { - sys, err := legacySubsystems.Get(name) - if err == errSubsystemDoesNotExist || !cgroups.PathExists(path) { - continue - } - if err := sys.GetStats(path, stats); err != nil { - return nil, err - } - } - - return stats, nil -} - -func (m *LegacyManager) Set(container *configs.Config) error { - // If Paths are set, then we are just joining cgroups paths - // and there is no need to set any values. - if m.Cgroups.Paths != nil { - return nil - } - for _, sys := range legacySubsystems { - // Get the subsystem path, but don't error out for not found cgroups. - path, err := getSubsystemPath(container.Cgroups, sys.Name()) - if err != nil && !cgroups.IsNotFound(err) { - return err - } - - if err := sys.Set(path, container.Cgroups); err != nil { - return err - } - } - - if m.Paths["cpu"] != "" { - if err := fs.CheckCpushares(m.Paths["cpu"], container.Cgroups.Resources.CpuShares); err != nil { - return err - } - } - return nil -} - -func getUnitName(c *configs.Cgroup) string { - // by default, we create a scope unless the user explicitly asks for a slice. - if !strings.HasSuffix(c.Name, ".slice") { - return fmt.Sprintf("%s-%s.scope", c.ScopePrefix, c.Name) - } - return c.Name -} - -func setKernelMemory(c *configs.Cgroup) error { - path, err := getSubsystemPath(c, "memory") - if err != nil && !cgroups.IsNotFound(err) { - return err - } - - if err := os.MkdirAll(path, 0755); err != nil { - return err - } - // do not try to enable the kernel memory if we already have - // tasks in the cgroup. - content, err := ioutil.ReadFile(filepath.Join(path, "tasks")) - if err != nil { - return err - } - if len(content) > 0 { - return nil - } - return fs.EnableKernelMemoryAccounting(path) -} - -// isUnitExists returns true if the error is that a systemd unit already exists. -func isUnitExists(err error) bool { - if err != nil { - if dbusError, ok := err.(dbus.Error); ok { - return strings.Contains(dbusError.Name, "org.freedesktop.systemd1.UnitExists") - } - } - return false -} - -func (m *LegacyManager) GetCgroups() (*configs.Cgroup, error) { - return m.Cgroups, nil -} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go new file mode 100644 index 00000000000..b567f3e1fcb --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go @@ -0,0 +1,427 @@ +package systemd + +import ( + "bufio" + "fmt" + "math" + "os" + "regexp" + "strconv" + "strings" + "sync" + "time" + + systemdDbus "github.com/coreos/go-systemd/v22/dbus" + dbus "github.com/godbus/dbus/v5" + "github.com/opencontainers/runc/libcontainer/cgroups/devices" + "github.com/opencontainers/runc/libcontainer/configs" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +var ( + connOnce sync.Once + connDbus *systemdDbus.Conn + connErr error + + versionOnce sync.Once + version int + versionErr error + + isRunningSystemdOnce sync.Once + isRunningSystemd bool +) + +// NOTE: This function comes from package github.com/coreos/go-systemd/util +// It was borrowed here to avoid a dependency on cgo. +// +// IsRunningSystemd checks whether the host was booted with systemd as its init +// system. This functions similarly to systemd's `sd_booted(3)`: internally, it +// checks whether /run/systemd/system/ exists and is a directory. +// http://www.freedesktop.org/software/systemd/man/sd_booted.html +func IsRunningSystemd() bool { + isRunningSystemdOnce.Do(func() { + fi, err := os.Lstat("/run/systemd/system") + isRunningSystemd = err == nil && fi.IsDir() + }) + return isRunningSystemd +} + +// systemd represents slice hierarchy using `-`, so we need to follow suit when +// generating the path of slice. Essentially, test-a-b.slice becomes +// /test.slice/test-a.slice/test-a-b.slice. +func ExpandSlice(slice string) (string, error) { + suffix := ".slice" + // Name has to end with ".slice", but can't be just ".slice". + if len(slice) < len(suffix) || !strings.HasSuffix(slice, suffix) { + return "", fmt.Errorf("invalid slice name: %s", slice) + } + + // Path-separators are not allowed. + if strings.Contains(slice, "/") { + return "", fmt.Errorf("invalid slice name: %s", slice) + } + + var path, prefix string + sliceName := strings.TrimSuffix(slice, suffix) + // if input was -.slice, we should just return root now + if sliceName == "-" { + return "/", nil + } + for _, component := range strings.Split(sliceName, "-") { + // test--a.slice isn't permitted, nor is -test.slice. + if component == "" { + return "", fmt.Errorf("invalid slice name: %s", slice) + } + + // Append the component to the path and to the prefix. + path += "/" + prefix + component + suffix + prefix += component + "-" + } + return path, nil +} + +func groupPrefix(ruleType configs.DeviceType) (string, error) { + switch ruleType { + case configs.BlockDevice: + return "block-", nil + case configs.CharDevice: + return "char-", nil + default: + return "", errors.Errorf("device type %v has no group prefix", ruleType) + } +} + +// findDeviceGroup tries to find the device group name (as listed in +// /proc/devices) with the type prefixed as requried for DeviceAllow, for a +// given (type, major) combination. If more than one device group exists, an +// arbitrary one is chosen. +func findDeviceGroup(ruleType configs.DeviceType, ruleMajor int64) (string, error) { + fh, err := os.Open("/proc/devices") + if err != nil { + return "", err + } + defer fh.Close() + + prefix, err := groupPrefix(ruleType) + if err != nil { + return "", err + } + + scanner := bufio.NewScanner(fh) + var currentType configs.DeviceType + for scanner.Scan() { + // We need to strip spaces because the first number is column-aligned. + line := strings.TrimSpace(scanner.Text()) + + // Handle the "header" lines. + switch line { + case "Block devices:": + currentType = configs.BlockDevice + continue + case "Character devices:": + currentType = configs.CharDevice + continue + case "": + continue + } + + // Skip lines unrelated to our type. + if currentType != ruleType { + continue + } + + // Parse out the (major, name). + var ( + currMajor int64 + currName string + ) + if n, err := fmt.Sscanf(line, "%d %s", &currMajor, &currName); err != nil || n != 2 { + if err == nil { + err = errors.Errorf("wrong number of fields") + } + return "", errors.Wrapf(err, "scan /proc/devices line %q", line) + } + + if currMajor == ruleMajor { + return prefix + currName, nil + } + } + if err := scanner.Err(); err != nil { + return "", errors.Wrap(err, "reading /proc/devices") + } + // Couldn't find the device group. + return "", nil +} + +// generateDeviceProperties takes the configured device rules and generates a +// corresponding set of systemd properties to configure the devices correctly. +func generateDeviceProperties(rules []*configs.DeviceRule) ([]systemdDbus.Property, error) { + // DeviceAllow is the type "a(ss)" which means we need a temporary struct + // to represent it in Go. + type deviceAllowEntry struct { + Path string + Perms string + } + + properties := []systemdDbus.Property{ + // Always run in the strictest white-list mode. + newProp("DevicePolicy", "strict"), + // Empty the DeviceAllow array before filling it. + newProp("DeviceAllow", []deviceAllowEntry{}), + } + + // Figure out the set of rules. + configEmu := &devices.Emulator{} + for _, rule := range rules { + if err := configEmu.Apply(*rule); err != nil { + return nil, errors.Wrap(err, "apply rule for systemd") + } + } + // systemd doesn't support blacklists. So we log a warning, and tell + // systemd to act as a deny-all whitelist. This ruleset will be replaced + // with our normal fallback code. This may result in spurrious errors, but + // the only other option is to error out here. + if configEmu.IsBlacklist() { + // However, if we're dealing with an allow-all rule then we can do it. + if configEmu.IsAllowAll() { + return []systemdDbus.Property{ + // Run in white-list mode by setting to "auto" and removing all + // DeviceAllow rules. + newProp("DevicePolicy", "auto"), + newProp("DeviceAllow", []deviceAllowEntry{}), + }, nil + } + logrus.Warn("systemd doesn't support blacklist device rules -- applying temporary deny-all rule") + return properties, nil + } + + // Now generate the set of rules we actually need to apply. Unlike the + // normal devices cgroup, in "strict" mode systemd defaults to a deny-all + // whitelist which is the default for devices.Emulator. + baseEmu := &devices.Emulator{} + finalRules, err := baseEmu.Transition(configEmu) + if err != nil { + return nil, errors.Wrap(err, "get simplified rules for systemd") + } + var deviceAllowList []deviceAllowEntry + for _, rule := range finalRules { + if !rule.Allow { + // Should never happen. + return nil, errors.Errorf("[internal error] cannot add deny rule to systemd DeviceAllow list: %v", *rule) + } + switch rule.Type { + case configs.BlockDevice, configs.CharDevice: + default: + // Should never happen. + return nil, errors.Errorf("invalid device type for DeviceAllow: %v", rule.Type) + } + + entry := deviceAllowEntry{ + Perms: string(rule.Permissions), + } + + // systemd has a fairly odd (though understandable) syntax here, and + // because of the OCI configuration format we have to do quite a bit of + // trickery to convert things: + // + // * Concrete rules with non-wildcard major/minor numbers have to use + // /dev/{block,char} paths. This is slightly odd because it means + // that we cannot add whitelist rules for devices that don't exist, + // but there's not too much we can do about that. + // + // However, path globbing is not support for path-based rules so we + // need to handle wildcards in some other manner. + // + // * Wildcard-minor rules have to specify a "device group name" (the + // second column in /proc/devices). + // + // * Wildcard (major and minor) rules can just specify a glob with the + // type ("char-*" or "block-*"). + // + // The only type of rule we can't handle is wildcard-major rules, and + // so we'll give a warning in that case (note that the fallback code + // will insert any rules systemd couldn't handle). What amazing fun. + + if rule.Major == configs.Wildcard { + // "_ *:n _" rules aren't supported by systemd. + if rule.Minor != configs.Wildcard { + logrus.Warnf("systemd doesn't support '*:n' device rules -- temporarily ignoring rule: %v", *rule) + continue + } + + // "_ *:* _" rules just wildcard everything. + prefix, err := groupPrefix(rule.Type) + if err != nil { + return nil, err + } + entry.Path = prefix + "*" + } else if rule.Minor == configs.Wildcard { + // "_ n:* _" rules require a device group from /proc/devices. + group, err := findDeviceGroup(rule.Type, rule.Major) + if err != nil { + return nil, errors.Wrapf(err, "find device '%v/%d'", rule.Type, rule.Major) + } + if group == "" { + // Couldn't find a group. + logrus.Warnf("could not find device group for '%v/%d' in /proc/devices -- temporarily ignoring rule: %v", rule.Type, rule.Major, *rule) + continue + } + entry.Path = group + } else { + // "_ n:m _" rules are just a path in /dev/{block,char}/. + switch rule.Type { + case configs.BlockDevice: + entry.Path = fmt.Sprintf("/dev/block/%d:%d", rule.Major, rule.Minor) + case configs.CharDevice: + entry.Path = fmt.Sprintf("/dev/char/%d:%d", rule.Major, rule.Minor) + } + } + deviceAllowList = append(deviceAllowList, entry) + } + + properties = append(properties, newProp("DeviceAllow", deviceAllowList)) + return properties, nil +} + +// getDbusConnection lazy initializes systemd dbus connection +// and returns it +func getDbusConnection(rootless bool) (*systemdDbus.Conn, error) { + connOnce.Do(func() { + if rootless { + connDbus, connErr = NewUserSystemdDbus() + } else { + connDbus, connErr = systemdDbus.New() + } + }) + return connDbus, connErr +} + +func newProp(name string, units interface{}) systemdDbus.Property { + return systemdDbus.Property{ + Name: name, + Value: dbus.MakeVariant(units), + } +} + +func getUnitName(c *configs.Cgroup) string { + // by default, we create a scope unless the user explicitly asks for a slice. + if !strings.HasSuffix(c.Name, ".slice") { + return fmt.Sprintf("%s-%s.scope", c.ScopePrefix, c.Name) + } + return c.Name +} + +// isUnitExists returns true if the error is that a systemd unit already exists. +func isUnitExists(err error) bool { + if err != nil { + if dbusError, ok := err.(dbus.Error); ok { + return strings.Contains(dbusError.Name, "org.freedesktop.systemd1.UnitExists") + } + } + return false +} + +func startUnit(dbusConnection *systemdDbus.Conn, unitName string, properties []systemdDbus.Property) error { + statusChan := make(chan string, 1) + if _, err := dbusConnection.StartTransientUnit(unitName, "replace", properties, statusChan); err == nil { + select { + case s := <-statusChan: + close(statusChan) + // Please refer to https://godoc.org/github.com/coreos/go-systemd/dbus#Conn.StartUnit + if s != "done" { + dbusConnection.ResetFailedUnit(unitName) + return errors.Errorf("error creating systemd unit `%s`: got `%s`", unitName, s) + } + case <-time.After(time.Second): + logrus.Warnf("Timed out while waiting for StartTransientUnit(%s) completion signal from dbus. Continuing...", unitName) + } + } else if !isUnitExists(err) { + return err + } + + return nil +} + +func stopUnit(dbusConnection *systemdDbus.Conn, unitName string) error { + statusChan := make(chan string, 1) + if _, err := dbusConnection.StopUnit(unitName, "replace", statusChan); err == nil { + select { + case s := <-statusChan: + close(statusChan) + // Please refer to https://godoc.org/github.com/coreos/go-systemd/dbus#Conn.StartUnit + if s != "done" { + logrus.Warnf("error removing unit `%s`: got `%s`. Continuing...", unitName, s) + } + case <-time.After(time.Second): + logrus.Warnf("Timed out while waiting for StopUnit(%s) completion signal from dbus. Continuing...", unitName) + } + } + return nil +} + +func systemdVersion(conn *systemdDbus.Conn) (int, error) { + versionOnce.Do(func() { + version = -1 + verStr, err := conn.GetManagerProperty("Version") + if err != nil { + versionErr = err + return + } + + version, versionErr = systemdVersionAtoi(verStr) + return + }) + + return version, versionErr +} + +func systemdVersionAtoi(verStr string) (int, error) { + // verStr should be of the form: + // "v245.4-1.fc32", "245", "v245-1.fc32", "245-1.fc32" + // all the input strings include quotes, and the output int should be 245 + // thus, we unconditionally remove the `"v` + // and then match on the first integer we can grab + re := regexp.MustCompile(`"?v?([0-9]+)`) + matches := re.FindStringSubmatch(verStr) + if len(matches) < 2 { + return 0, errors.Errorf("can't parse version %s: incorrect number of matches %v", verStr, matches) + } + ver, err := strconv.Atoi(matches[1]) + return ver, errors.Wrapf(err, "can't parse version %s", verStr) +} + +func addCpuQuota(conn *systemdDbus.Conn, properties *[]systemdDbus.Property, quota int64, period uint64) { + if period != 0 { + // systemd only supports CPUQuotaPeriodUSec since v242 + sdVer, err := systemdVersion(conn) + if err != nil { + logrus.Warnf("systemdVersion: %s", err) + } else if sdVer >= 242 { + *properties = append(*properties, + newProp("CPUQuotaPeriodUSec", period)) + } + } + if quota != 0 || period != 0 { + // corresponds to USEC_INFINITY in systemd + cpuQuotaPerSecUSec := uint64(math.MaxUint64) + if quota > 0 { + if period == 0 { + // assume the default kernel value of 100000 us (100 ms), same for v1 and v2. + // v1: https://www.kernel.org/doc/html/latest/scheduler/sched-bwc.html and + // v2: https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html + period = 100000 + } + // systemd converts CPUQuotaPerSecUSec (microseconds per CPU second) to CPUQuota + // (integer percentage of CPU) internally. This means that if a fractional percent of + // CPU is indicated by Resources.CpuQuota, we need to round up to the nearest + // 10ms (1% of a second) such that child cgroups can set the cpu.cfs_quota_us they expect. + cpuQuotaPerSecUSec = uint64(quota*1000000) / period + if cpuQuotaPerSecUSec%10000 != 0 { + cpuQuotaPerSecUSec = ((cpuQuotaPerSecUSec / 10000) + 1) * 10000 + } + } + *properties = append(*properties, + newProp("CPUQuotaPerSecUSec", cpuQuotaPerSecUSec)) + } +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/unified_hierarchy.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/unified_hierarchy.go deleted file mode 100644 index 6605099190c..00000000000 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/unified_hierarchy.go +++ /dev/null @@ -1,312 +0,0 @@ -// +build linux - -package systemd - -import ( - "fmt" - "io/ioutil" - "math" - "os" - "path/filepath" - "strings" - "sync" - "time" - - systemdDbus "github.com/coreos/go-systemd/dbus" - "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/cgroups/fs2" - "github.com/opencontainers/runc/libcontainer/configs" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" -) - -type UnifiedManager struct { - mu sync.Mutex - Cgroups *configs.Cgroup - Paths map[string]string -} - -func (m *UnifiedManager) Apply(pid int) error { - var ( - c = m.Cgroups - unitName = getUnitName(c) - slice = "system.slice" - properties []systemdDbus.Property - ) - - if c.Paths != nil { - paths := make(map[string]string) - for name, path := range c.Paths { - _, err := getSubsystemPath(m.Cgroups, name) - if err != nil { - // Don't fail if a cgroup hierarchy was not found, just skip this subsystem - if cgroups.IsNotFound(err) { - continue - } - return err - } - paths[name] = path - } - m.Paths = paths - return cgroups.EnterPid(m.Paths, pid) - } - - if c.Parent != "" { - slice = c.Parent - } - - properties = append(properties, systemdDbus.PropDescription("libcontainer container "+c.Name)) - - // if we create a slice, the parent is defined via a Wants= - if strings.HasSuffix(unitName, ".slice") { - properties = append(properties, systemdDbus.PropWants(slice)) - } else { - // otherwise, we use Slice= - properties = append(properties, systemdDbus.PropSlice(slice)) - } - - // only add pid if its valid, -1 is used w/ general slice creation. - if pid != -1 { - properties = append(properties, newProp("PIDs", []uint32{uint32(pid)})) - } - - // Check if we can delegate. This is only supported on systemd versions 218 and above. - if !strings.HasSuffix(unitName, ".slice") { - // Assume scopes always support delegation. - properties = append(properties, newProp("Delegate", true)) - } - - // Always enable accounting, this gets us the same behaviour as the fs implementation, - // plus the kernel has some problems with joining the memory cgroup at a later time. - properties = append(properties, - newProp("MemoryAccounting", true), - newProp("CPUAccounting", true), - newProp("BlockIOAccounting", true)) - - // Assume DefaultDependencies= will always work (the check for it was previously broken.) - properties = append(properties, - newProp("DefaultDependencies", false)) - - if c.Resources.Memory != 0 { - properties = append(properties, - newProp("MemoryLimit", uint64(c.Resources.Memory))) - } - - if c.Resources.CpuShares != 0 { - properties = append(properties, - newProp("CPUShares", c.Resources.CpuShares)) - } - - // cpu.cfs_quota_us and cpu.cfs_period_us are controlled by systemd. - if c.Resources.CpuQuota != 0 && c.Resources.CpuPeriod != 0 { - // corresponds to USEC_INFINITY in systemd - // if USEC_INFINITY is provided, CPUQuota is left unbound by systemd - // always setting a property value ensures we can apply a quota and remove it later - cpuQuotaPerSecUSec := uint64(math.MaxUint64) - if c.Resources.CpuQuota > 0 { - // systemd converts CPUQuotaPerSecUSec (microseconds per CPU second) to CPUQuota - // (integer percentage of CPU) internally. This means that if a fractional percent of - // CPU is indicated by Resources.CpuQuota, we need to round up to the nearest - // 10ms (1% of a second) such that child cgroups can set the cpu.cfs_quota_us they expect. - cpuQuotaPerSecUSec = uint64(c.Resources.CpuQuota*1000000) / c.Resources.CpuPeriod - if cpuQuotaPerSecUSec%10000 != 0 { - cpuQuotaPerSecUSec = ((cpuQuotaPerSecUSec / 10000) + 1) * 10000 - } - } - properties = append(properties, - newProp("CPUQuotaPerSecUSec", cpuQuotaPerSecUSec)) - } - - if c.Resources.BlkioWeight != 0 { - properties = append(properties, - newProp("BlockIOWeight", uint64(c.Resources.BlkioWeight))) - } - - if c.Resources.PidsLimit > 0 { - properties = append(properties, - newProp("TasksAccounting", true), - newProp("TasksMax", uint64(c.Resources.PidsLimit))) - } - - // We have to set kernel memory here, as we can't change it once - // processes have been attached to the cgroup. - if c.Resources.KernelMemory != 0 { - if err := setKernelMemory(c); err != nil { - return err - } - } - - statusChan := make(chan string, 1) - if _, err := theConn.StartTransientUnit(unitName, "replace", properties, statusChan); err == nil { - select { - case <-statusChan: - case <-time.After(time.Second): - logrus.Warnf("Timed out while waiting for StartTransientUnit(%s) completion signal from dbus. Continuing...", unitName) - } - } else if !isUnitExists(err) { - return err - } - - if err := joinCgroupsV2(c, pid); err != nil { - return err - } - - path, err := getSubsystemPath(m.Cgroups, "") - if err != nil { - return err - } - m.Paths = map[string]string{ - "pids": path, - "memory": path, - "io": path, - "cpu": path, - "devices": path, - "cpuset": path, - "freezer": path, - } - return nil -} - -func (m *UnifiedManager) Destroy() error { - if m.Cgroups.Paths != nil { - return nil - } - m.mu.Lock() - defer m.mu.Unlock() - theConn.StopUnit(getUnitName(m.Cgroups), "replace", nil) - if err := cgroups.RemovePaths(m.Paths); err != nil { - return err - } - m.Paths = make(map[string]string) - return nil -} - -func (m *UnifiedManager) GetPaths() map[string]string { - m.mu.Lock() - paths := m.Paths - m.mu.Unlock() - return paths -} -func (m *UnifiedManager) GetUnifiedPath() (string, error) { - unifiedPath := "" - m.mu.Lock() - defer m.mu.Unlock() - for k, v := range m.Paths { - if unifiedPath == "" { - unifiedPath = v - } else if v != unifiedPath { - return unifiedPath, - errors.Errorf("expected %q path to be unified path %q, got %q", k, unifiedPath, v) - } - } - if unifiedPath == "" { - // FIXME: unified path could be detected even when no controller is available - return unifiedPath, errors.New("cannot detect unified path") - } - return unifiedPath, nil -} -func createCgroupsv2Path(path string) (Err error) { - content, err := ioutil.ReadFile("/sys/fs/cgroup/cgroup.controllers") - if err != nil { - return err - } - if !filepath.HasPrefix(path, "/sys/fs/cgroup") { - return fmt.Errorf("invalid cgroup path %s", path) - } - - res := "" - for i, c := range strings.Split(strings.TrimSpace(string(content)), " ") { - if i == 0 { - res = fmt.Sprintf("+%s", c) - } else { - res = res + fmt.Sprintf(" +%s", c) - } - } - resByte := []byte(res) - - current := "/sys/fs" - elements := strings.Split(path, "/") - for i, e := range elements[3:] { - current = filepath.Join(current, e) - if i > 0 { - if err := os.Mkdir(current, 0755); err != nil { - if !os.IsExist(err) { - return err - } - } else { - // If the directory was created, be sure it is not left around on errors. - defer func() { - if Err != nil { - os.Remove(current) - } - }() - } - } - if i < len(elements[3:])-1 { - if err := ioutil.WriteFile(filepath.Join(current, "cgroup.subtree_control"), resByte, 0755); err != nil { - return err - } - } - } - return nil -} - -func joinCgroupsV2(c *configs.Cgroup, pid int) error { - path, err := getSubsystemPath(c, "memory") - if err != nil { - return err - } - return createCgroupsv2Path(path) -} - -func (m *UnifiedManager) fsManager() (cgroups.Manager, error) { - path, err := m.GetUnifiedPath() - if err != nil { - return nil, err - } - return fs2.NewManager(m.Cgroups, path, false) -} - -func (m *UnifiedManager) Freeze(state configs.FreezerState) error { - fsMgr, err := m.fsManager() - if err != nil { - return err - } - return fsMgr.Freeze(state) -} - -func (m *UnifiedManager) GetPids() ([]int, error) { - path, err := m.GetUnifiedPath() - if err != nil { - return nil, err - } - return cgroups.GetPids(path) -} - -func (m *UnifiedManager) GetAllPids() ([]int, error) { - path, err := m.GetUnifiedPath() - if err != nil { - return nil, err - } - return cgroups.GetAllPids(path) -} - -func (m *UnifiedManager) GetStats() (*cgroups.Stats, error) { - fsMgr, err := m.fsManager() - if err != nil { - return nil, err - } - return fsMgr.GetStats() -} - -func (m *UnifiedManager) Set(container *configs.Config) error { - fsMgr, err := m.fsManager() - if err != nil { - return err - } - return fsMgr.Set(container) -} - -func (m *UnifiedManager) GetCgroups() (*configs.Cgroup, error) { - return m.Cgroups, nil -} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/apply_nosystemd.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/unsupported.go similarity index 60% rename from vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/apply_nosystemd.go rename to vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/unsupported.go index ef0db5aeb03..cb4d00c88b3 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/apply_nosystemd.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/unsupported.go @@ -3,7 +3,7 @@ package systemd import ( - "fmt" + "errors" "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/configs" @@ -14,54 +14,58 @@ type Manager struct { Paths map[string]string } -func UseSystemd() bool { +func IsRunningSystemd() bool { return false } func NewSystemdCgroupsManager() (func(config *configs.Cgroup, paths map[string]string) cgroups.Manager, error) { - return nil, fmt.Errorf("Systemd not supported") + return nil, errors.New("Systemd not supported") } func (m *Manager) Apply(pid int) error { - return fmt.Errorf("Systemd not supported") + return errors.New("Systemd not supported") } func (m *Manager) GetPids() ([]int, error) { - return nil, fmt.Errorf("Systemd not supported") + return nil, errors.New("Systemd not supported") } func (m *Manager) GetAllPids() ([]int, error) { - return nil, fmt.Errorf("Systemd not supported") + return nil, errors.New("Systemd not supported") } func (m *Manager) Destroy() error { - return fmt.Errorf("Systemd not supported") + return errors.New("Systemd not supported") } func (m *Manager) GetPaths() map[string]string { return nil } -func (m *Manager) GetUnifiedPath() (string, error) { - return "", fmt.Errorf("Systemd not supported") +func (m *Manager) Path(_ string) string { + return "" } func (m *Manager) GetStats() (*cgroups.Stats, error) { - return nil, fmt.Errorf("Systemd not supported") + return nil, errors.New("Systemd not supported") } func (m *Manager) Set(container *configs.Config) error { - return fmt.Errorf("Systemd not supported") + return errors.New("Systemd not supported") } func (m *Manager) Freeze(state configs.FreezerState) error { - return fmt.Errorf("Systemd not supported") + return errors.New("Systemd not supported") } func Freeze(c *configs.Cgroup, state configs.FreezerState) error { - return fmt.Errorf("Systemd not supported") + return errors.New("Systemd not supported") } func (m *Manager) GetCgroups() (*configs.Cgroup, error) { - return nil, fmt.Errorf("Systemd not supported") + return nil, errors.New("Systemd not supported") +} + +func (m *Manager) Exists() bool { + return false } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go new file mode 100644 index 00000000000..cb070cec8b7 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go @@ -0,0 +1,106 @@ +// +build linux + +package systemd + +import ( + "bufio" + "bytes" + "os" + "os/exec" + "path/filepath" + "strconv" + "strings" + + systemdDbus "github.com/coreos/go-systemd/v22/dbus" + dbus "github.com/godbus/dbus/v5" + "github.com/opencontainers/runc/libcontainer/system" + "github.com/pkg/errors" +) + +// NewUserSystemdDbus creates a connection for systemd user-instance. +func NewUserSystemdDbus() (*systemdDbus.Conn, error) { + addr, err := DetectUserDbusSessionBusAddress() + if err != nil { + return nil, err + } + uid, err := DetectUID() + if err != nil { + return nil, err + } + + return systemdDbus.NewConnection(func() (*dbus.Conn, error) { + conn, err := dbus.Dial(addr) + if err != nil { + return nil, errors.Wrapf(err, "error while dialing %q", addr) + } + methods := []dbus.Auth{dbus.AuthExternal(strconv.Itoa(uid))} + err = conn.Auth(methods) + if err != nil { + conn.Close() + return nil, errors.Wrapf(err, "error while authenticating connection, address=%q, UID=%d", addr, uid) + } + if err = conn.Hello(); err != nil { + conn.Close() + return nil, errors.Wrapf(err, "error while sending Hello message, address=%q, UID=%d", addr, uid) + } + return conn, nil + }) +} + +// DetectUID detects UID from the OwnerUID field of `busctl --user status` +// if running in userNS. The value corresponds to sd_bus_creds_get_owner_uid(3) . +// +// Otherwise returns os.Getuid() . +func DetectUID() (int, error) { + if !system.RunningInUserNS() { + return os.Getuid(), nil + } + b, err := exec.Command("busctl", "--user", "--no-pager", "status").CombinedOutput() + if err != nil { + return -1, errors.Wrap(err, "could not execute `busctl --user --no-pager status`") + } + scanner := bufio.NewScanner(bytes.NewReader(b)) + for scanner.Scan() { + s := strings.TrimSpace(scanner.Text()) + if strings.HasPrefix(s, "OwnerUID=") { + uidStr := strings.TrimPrefix(s, "OwnerUID=") + i, err := strconv.Atoi(uidStr) + if err != nil { + return -1, errors.Wrapf(err, "could not detect the OwnerUID: %s", s) + } + return i, nil + } + } + if err := scanner.Err(); err != nil { + return -1, err + } + return -1, errors.New("could not detect the OwnerUID") +} + +// DetectUserDbusSessionBusAddress returns $DBUS_SESSION_BUS_ADDRESS if set. +// Otherwise returns "unix:path=$XDG_RUNTIME_DIR/bus" if $XDG_RUNTIME_DIR/bus exists. +// Otherwise parses the value from `systemctl --user show-environment` . +func DetectUserDbusSessionBusAddress() (string, error) { + if env := os.Getenv("DBUS_SESSION_BUS_ADDRESS"); env != "" { + return env, nil + } + if xdr := os.Getenv("XDG_RUNTIME_DIR"); xdr != "" { + busPath := filepath.Join(xdr, "bus") + if _, err := os.Stat(busPath); err == nil { + busAddress := "unix:path=" + busPath + return busAddress, nil + } + } + b, err := exec.Command("systemctl", "--user", "--no-pager", "show-environment").CombinedOutput() + if err != nil { + return "", errors.Wrapf(err, "could not execute `systemctl --user --no-pager show-environment`, output=%q", string(b)) + } + scanner := bufio.NewScanner(bytes.NewReader(b)) + for scanner.Scan() { + s := strings.TrimSpace(scanner.Text()) + if strings.HasPrefix(s, "DBUS_SESSION_BUS_ADDRESS=") { + return strings.TrimPrefix(s, "DBUS_SESSION_BUS_ADDRESS="), nil + } + } + return "", errors.New("could not detect DBUS_SESSION_BUS_ADDRESS from `systemctl --user --no-pager show-environment`") +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v1.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v1.go new file mode 100644 index 00000000000..7217b0af79c --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v1.go @@ -0,0 +1,463 @@ +// +build linux + +package systemd + +import ( + "errors" + "io/ioutil" + "os" + "path/filepath" + "strings" + "sync" + + systemdDbus "github.com/coreos/go-systemd/v22/dbus" + "github.com/opencontainers/runc/libcontainer/cgroups" + "github.com/opencontainers/runc/libcontainer/cgroups/fs" + "github.com/opencontainers/runc/libcontainer/configs" + "github.com/sirupsen/logrus" +) + +type legacyManager struct { + mu sync.Mutex + cgroups *configs.Cgroup + paths map[string]string +} + +func NewLegacyManager(cg *configs.Cgroup, paths map[string]string) cgroups.Manager { + return &legacyManager{ + cgroups: cg, + paths: paths, + } +} + +type subsystem interface { + // Name returns the name of the subsystem. + Name() string + // Returns the stats, as 'stats', corresponding to the cgroup under 'path'. + GetStats(path string, stats *cgroups.Stats) error + // Set the cgroup represented by cgroup. + Set(path string, cgroup *configs.Cgroup) error +} + +var errSubsystemDoesNotExist = errors.New("cgroup: subsystem does not exist") + +var legacySubsystems = []subsystem{ + &fs.CpusetGroup{}, + &fs.DevicesGroup{}, + &fs.MemoryGroup{}, + &fs.CpuGroup{}, + &fs.CpuacctGroup{}, + &fs.PidsGroup{}, + &fs.BlkioGroup{}, + &fs.HugetlbGroup{}, + &fs.PerfEventGroup{}, + &fs.FreezerGroup{}, + &fs.NetPrioGroup{}, + &fs.NetClsGroup{}, + &fs.NameGroup{GroupName: "name=systemd"}, +} + +func genV1ResourcesProperties(c *configs.Cgroup, conn *systemdDbus.Conn) ([]systemdDbus.Property, error) { + var properties []systemdDbus.Property + r := c.Resources + + deviceProperties, err := generateDeviceProperties(r.Devices) + if err != nil { + return nil, err + } + properties = append(properties, deviceProperties...) + + if r.Memory != 0 { + properties = append(properties, + newProp("MemoryLimit", uint64(r.Memory))) + } + + if r.CpuShares != 0 { + properties = append(properties, + newProp("CPUShares", r.CpuShares)) + } + + addCpuQuota(conn, &properties, r.CpuQuota, r.CpuPeriod) + + if r.BlkioWeight != 0 { + properties = append(properties, + newProp("BlockIOWeight", uint64(r.BlkioWeight))) + } + + if r.PidsLimit > 0 || r.PidsLimit == -1 { + properties = append(properties, + newProp("TasksAccounting", true), + newProp("TasksMax", uint64(r.PidsLimit))) + } + + return properties, nil +} + +func (m *legacyManager) Apply(pid int) error { + var ( + c = m.cgroups + unitName = getUnitName(c) + slice = "system.slice" + properties []systemdDbus.Property + ) + + m.mu.Lock() + defer m.mu.Unlock() + if c.Paths != nil { + paths := make(map[string]string) + for name, path := range c.Paths { + _, err := getSubsystemPath(m.cgroups, name) + if err != nil { + // Don't fail if a cgroup hierarchy was not found, just skip this subsystem + if cgroups.IsNotFound(err) { + continue + } + return err + } + paths[name] = path + } + m.paths = paths + return cgroups.EnterPid(m.paths, pid) + } + + if c.Parent != "" { + slice = c.Parent + } + + properties = append(properties, systemdDbus.PropDescription("libcontainer container "+c.Name)) + + // if we create a slice, the parent is defined via a Wants= + if strings.HasSuffix(unitName, ".slice") { + properties = append(properties, systemdDbus.PropWants(slice)) + } else { + // otherwise, we use Slice= + properties = append(properties, systemdDbus.PropSlice(slice)) + } + + // only add pid if its valid, -1 is used w/ general slice creation. + if pid != -1 { + properties = append(properties, newProp("PIDs", []uint32{uint32(pid)})) + } + + // Check if we can delegate. This is only supported on systemd versions 218 and above. + if !strings.HasSuffix(unitName, ".slice") { + // Assume scopes always support delegation. + properties = append(properties, newProp("Delegate", true)) + } + + // Always enable accounting, this gets us the same behaviour as the fs implementation, + // plus the kernel has some problems with joining the memory cgroup at a later time. + properties = append(properties, + newProp("MemoryAccounting", true), + newProp("CPUAccounting", true), + newProp("BlockIOAccounting", true)) + + // Assume DefaultDependencies= will always work (the check for it was previously broken.) + properties = append(properties, + newProp("DefaultDependencies", false)) + + dbusConnection, err := getDbusConnection(false) + if err != nil { + return err + } + resourcesProperties, err := genV1ResourcesProperties(c, dbusConnection) + if err != nil { + return err + } + properties = append(properties, resourcesProperties...) + properties = append(properties, c.SystemdProps...) + + // We have to set kernel memory here, as we can't change it once + // processes have been attached to the cgroup. + if c.Resources.KernelMemory != 0 { + if err := enableKmem(c); err != nil { + return err + } + } + + if err := startUnit(dbusConnection, unitName, properties); err != nil { + return err + } + + if err := joinCgroups(c, pid); err != nil { + return err + } + + paths := make(map[string]string) + for _, s := range legacySubsystems { + subsystemPath, err := getSubsystemPath(m.cgroups, s.Name()) + if err != nil { + // Don't fail if a cgroup hierarchy was not found, just skip this subsystem + if cgroups.IsNotFound(err) { + continue + } + return err + } + paths[s.Name()] = subsystemPath + } + m.paths = paths + return nil +} + +func (m *legacyManager) Destroy() error { + if m.cgroups.Paths != nil { + return nil + } + m.mu.Lock() + defer m.mu.Unlock() + + dbusConnection, err := getDbusConnection(false) + if err != nil { + return err + } + unitName := getUnitName(m.cgroups) + + err = stopUnit(dbusConnection, unitName) + // Both on success and on error, cleanup all the cgroups we are aware of. + // Some of them were created directly by Apply() and are not managed by systemd. + if err := cgroups.RemovePaths(m.paths); err != nil { + return err + } + if err != nil { + return err + } + m.paths = make(map[string]string) + return nil +} + +func (m *legacyManager) Path(subsys string) string { + m.mu.Lock() + defer m.mu.Unlock() + return m.paths[subsys] +} + +func join(c *configs.Cgroup, subsystem string, pid int) (string, error) { + path, err := getSubsystemPath(c, subsystem) + if err != nil { + return "", err + } + + if err := os.MkdirAll(path, 0755); err != nil { + return "", err + } + if err := cgroups.WriteCgroupProc(path, pid); err != nil { + return "", err + } + return path, nil +} + +func joinCgroups(c *configs.Cgroup, pid int) error { + for _, sys := range legacySubsystems { + name := sys.Name() + switch name { + case "name=systemd": + // let systemd handle this + case "cpuset": + path, err := getSubsystemPath(c, name) + if err != nil && !cgroups.IsNotFound(err) { + return err + } + s := &fs.CpusetGroup{} + if err := s.ApplyDir(path, c, pid); err != nil { + return err + } + default: + _, err := join(c, name, pid) + if err != nil { + // Even if it's `not found` error, we'll return err + // because devices cgroup is hard requirement for + // container security. + if name == "devices" { + return err + } + // For other subsystems, omit the `not found` error + // because they are optional. + if !cgroups.IsNotFound(err) { + return err + } + } + } + } + + return nil +} + +func getSubsystemPath(c *configs.Cgroup, subsystem string) (string, error) { + mountpoint, err := cgroups.FindCgroupMountpoint(c.Path, subsystem) + if err != nil { + return "", err + } + + initPath, err := cgroups.GetInitCgroup(subsystem) + if err != nil { + return "", err + } + // if pid 1 is systemd 226 or later, it will be in init.scope, not the root + initPath = strings.TrimSuffix(filepath.Clean(initPath), "init.scope") + + slice := "system.slice" + if c.Parent != "" { + slice = c.Parent + } + + slice, err = ExpandSlice(slice) + if err != nil { + return "", err + } + + return filepath.Join(mountpoint, initPath, slice, getUnitName(c)), nil +} + +func (m *legacyManager) Freeze(state configs.FreezerState) error { + path, err := getSubsystemPath(m.cgroups, "freezer") + if err != nil { + return err + } + prevState := m.cgroups.Resources.Freezer + m.cgroups.Resources.Freezer = state + freezer := &fs.FreezerGroup{} + err = freezer.Set(path, m.cgroups) + if err != nil { + m.cgroups.Resources.Freezer = prevState + return err + } + return nil +} + +func (m *legacyManager) GetPids() ([]int, error) { + path, err := getSubsystemPath(m.cgroups, "devices") + if err != nil { + return nil, err + } + return cgroups.GetPids(path) +} + +func (m *legacyManager) GetAllPids() ([]int, error) { + path, err := getSubsystemPath(m.cgroups, "devices") + if err != nil { + return nil, err + } + return cgroups.GetAllPids(path) +} + +func (m *legacyManager) GetStats() (*cgroups.Stats, error) { + m.mu.Lock() + defer m.mu.Unlock() + stats := cgroups.NewStats() + for _, sys := range legacySubsystems { + path := m.paths[sys.Name()] + if path == "" { + continue + } + if err := sys.GetStats(path, stats); err != nil { + return nil, err + } + } + + return stats, nil +} + +func (m *legacyManager) Set(container *configs.Config) error { + // If Paths are set, then we are just joining cgroups paths + // and there is no need to set any values. + if m.cgroups.Paths != nil { + return nil + } + dbusConnection, err := getDbusConnection(false) + if err != nil { + return err + } + properties, err := genV1ResourcesProperties(container.Cgroups, dbusConnection) + if err != nil { + return err + } + + // We have to freeze the container while systemd sets the cgroup settings. + // The reason for this is that systemd's application of DeviceAllow rules + // is done disruptively, resulting in spurrious errors to common devices + // (unlike our fs driver, they will happily write deny-all rules to running + // containers). So we freeze the container to avoid them hitting the cgroup + // error. But if the freezer cgroup isn't supported, we just warn about it. + targetFreezerState := configs.Undefined + if !m.cgroups.SkipDevices { + // Figure out the current freezer state, so we can revert to it after we + // temporarily freeze the container. + targetFreezerState, err = m.GetFreezerState() + if err != nil { + return err + } + if targetFreezerState == configs.Undefined { + targetFreezerState = configs.Thawed + } + + if err := m.Freeze(configs.Frozen); err != nil { + logrus.Infof("freeze container before SetUnitProperties failed: %v", err) + } + } + + if err := dbusConnection.SetUnitProperties(getUnitName(container.Cgroups), true, properties...); err != nil { + _ = m.Freeze(targetFreezerState) + return err + } + + // Reset freezer state before we apply the configuration, to avoid clashing + // with the freezer setting in the configuration. + _ = m.Freeze(targetFreezerState) + + for _, sys := range legacySubsystems { + // Get the subsystem path, but don't error out for not found cgroups. + path, err := getSubsystemPath(container.Cgroups, sys.Name()) + if err != nil && !cgroups.IsNotFound(err) { + return err + } + if err := sys.Set(path, container.Cgroups); err != nil { + return err + } + } + + return nil +} + +func enableKmem(c *configs.Cgroup) error { + path, err := getSubsystemPath(c, "memory") + if err != nil && !cgroups.IsNotFound(err) { + return err + } + + if err := os.MkdirAll(path, 0755); err != nil { + return err + } + // do not try to enable the kernel memory if we already have + // tasks in the cgroup. + content, err := ioutil.ReadFile(filepath.Join(path, "tasks")) + if err != nil { + return err + } + if len(content) > 0 { + return nil + } + return fs.EnableKernelMemoryAccounting(path) +} + +func (m *legacyManager) GetPaths() map[string]string { + m.mu.Lock() + defer m.mu.Unlock() + return m.paths +} + +func (m *legacyManager) GetCgroups() (*configs.Cgroup, error) { + return m.cgroups, nil +} + +func (m *legacyManager) GetFreezerState() (configs.FreezerState, error) { + path, err := getSubsystemPath(m.cgroups, "freezer") + if err != nil && !cgroups.IsNotFound(err) { + return configs.Undefined, err + } + freezer := &fs.FreezerGroup{} + return freezer.GetState(path) +} + +func (m *legacyManager) Exists() bool { + return cgroups.PathExists(m.Path("devices")) +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v2.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v2.go new file mode 100644 index 00000000000..e1a6622a0d3 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v2.go @@ -0,0 +1,360 @@ +// +build linux + +package systemd + +import ( + "os" + "path/filepath" + "strconv" + "strings" + "sync" + + systemdDbus "github.com/coreos/go-systemd/v22/dbus" + securejoin "github.com/cyphar/filepath-securejoin" + "github.com/opencontainers/runc/libcontainer/cgroups" + "github.com/opencontainers/runc/libcontainer/cgroups/fs2" + "github.com/opencontainers/runc/libcontainer/configs" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +type unifiedManager struct { + mu sync.Mutex + cgroups *configs.Cgroup + // path is like "/sys/fs/cgroup/user.slice/user-1001.slice/session-1.scope" + path string + rootless bool +} + +func NewUnifiedManager(config *configs.Cgroup, path string, rootless bool) cgroups.Manager { + return &unifiedManager{ + cgroups: config, + path: path, + rootless: rootless, + } +} + +func genV2ResourcesProperties(c *configs.Cgroup, conn *systemdDbus.Conn) ([]systemdDbus.Property, error) { + var properties []systemdDbus.Property + r := c.Resources + + // NOTE: This is of questionable correctness because we insert our own + // devices eBPF program later. Two programs with identical rules + // aren't the end of the world, but it is a bit concerning. However + // it's unclear if systemd removes all eBPF programs attached when + // doing SetUnitProperties... + deviceProperties, err := generateDeviceProperties(r.Devices) + if err != nil { + return nil, err + } + properties = append(properties, deviceProperties...) + + if r.Memory != 0 { + properties = append(properties, + newProp("MemoryMax", uint64(r.Memory))) + } + if r.MemoryReservation != 0 { + properties = append(properties, + newProp("MemoryLow", uint64(r.MemoryReservation))) + } + + swap, err := cgroups.ConvertMemorySwapToCgroupV2Value(r.MemorySwap, r.Memory) + if err != nil { + return nil, err + } + if swap != 0 { + properties = append(properties, + newProp("MemorySwapMax", uint64(swap))) + } + + if r.CpuWeight != 0 { + properties = append(properties, + newProp("CPUWeight", r.CpuWeight)) + } + + addCpuQuota(conn, &properties, r.CpuQuota, r.CpuPeriod) + + if r.PidsLimit > 0 || r.PidsLimit == -1 { + properties = append(properties, + newProp("TasksAccounting", true), + newProp("TasksMax", uint64(r.PidsLimit))) + } + + // ignore r.KernelMemory + + return properties, nil +} + +func (m *unifiedManager) Apply(pid int) error { + var ( + c = m.cgroups + unitName = getUnitName(c) + properties []systemdDbus.Property + ) + + if c.Paths != nil { + return cgroups.WriteCgroupProc(m.path, pid) + } + + slice := "system.slice" + if m.rootless { + slice = "user.slice" + } + if c.Parent != "" { + slice = c.Parent + } + + properties = append(properties, systemdDbus.PropDescription("libcontainer container "+c.Name)) + + // if we create a slice, the parent is defined via a Wants= + if strings.HasSuffix(unitName, ".slice") { + properties = append(properties, systemdDbus.PropWants(slice)) + } else { + // otherwise, we use Slice= + properties = append(properties, systemdDbus.PropSlice(slice)) + } + + // only add pid if its valid, -1 is used w/ general slice creation. + if pid != -1 { + properties = append(properties, newProp("PIDs", []uint32{uint32(pid)})) + } + + // Check if we can delegate. This is only supported on systemd versions 218 and above. + if !strings.HasSuffix(unitName, ".slice") { + // Assume scopes always support delegation. + properties = append(properties, newProp("Delegate", true)) + } + + // Always enable accounting, this gets us the same behaviour as the fs implementation, + // plus the kernel has some problems with joining the memory cgroup at a later time. + properties = append(properties, + newProp("MemoryAccounting", true), + newProp("CPUAccounting", true), + newProp("IOAccounting", true)) + + // Assume DefaultDependencies= will always work (the check for it was previously broken.) + properties = append(properties, + newProp("DefaultDependencies", false)) + + dbusConnection, err := getDbusConnection(m.rootless) + if err != nil { + return err + } + resourcesProperties, err := genV2ResourcesProperties(c, dbusConnection) + if err != nil { + return err + } + properties = append(properties, resourcesProperties...) + properties = append(properties, c.SystemdProps...) + + if err := startUnit(dbusConnection, unitName, properties); err != nil { + return errors.Wrapf(err, "error while starting unit %q with properties %+v", unitName, properties) + } + + if err = m.initPath(); err != nil { + return err + } + if err := fs2.CreateCgroupPath(m.path, m.cgroups); err != nil { + return err + } + return nil +} + +func (m *unifiedManager) Destroy() error { + if m.cgroups.Paths != nil { + return nil + } + m.mu.Lock() + defer m.mu.Unlock() + + dbusConnection, err := getDbusConnection(m.rootless) + if err != nil { + return err + } + unitName := getUnitName(m.cgroups) + if err := stopUnit(dbusConnection, unitName); err != nil { + return err + } + + // XXX this is probably not needed, systemd should handle it + err = os.Remove(m.path) + if err != nil && !os.IsNotExist(err) { + return err + } + + return nil +} + +func (m *unifiedManager) Path(_ string) string { + return m.path +} + +// getSliceFull value is used in initPath. +// The value is incompatible with systemdDbus.PropSlice. +func (m *unifiedManager) getSliceFull() (string, error) { + c := m.cgroups + slice := "system.slice" + if m.rootless { + slice = "user.slice" + } + if c.Parent != "" { + var err error + slice, err = ExpandSlice(c.Parent) + if err != nil { + return "", err + } + } + + if m.rootless { + dbusConnection, err := getDbusConnection(m.rootless) + if err != nil { + return "", err + } + // managerCGQuoted is typically "/user.slice/user-${uid}.slice/user@${uid}.service" including the quote symbols + managerCGQuoted, err := dbusConnection.GetManagerProperty("ControlGroup") + if err != nil { + return "", err + } + managerCG, err := strconv.Unquote(managerCGQuoted) + if err != nil { + return "", err + } + slice = filepath.Join(managerCG, slice) + } + + // an example of the final slice in rootless: "/user.slice/user-1001.slice/user@1001.service/user.slice" + // NOTE: systemdDbus.PropSlice requires the "/user.slice/user-1001.slice/user@1001.service/" prefix NOT to be specified. + return slice, nil +} + +func (m *unifiedManager) initPath() error { + if m.path != "" { + return nil + } + + sliceFull, err := m.getSliceFull() + if err != nil { + return err + } + + c := m.cgroups + path := filepath.Join(sliceFull, getUnitName(c)) + path, err = securejoin.SecureJoin(fs2.UnifiedMountpoint, path) + if err != nil { + return err + } + + // an example of the final path in rootless: + // "/sys/fs/cgroup/user.slice/user-1001.slice/user@1001.service/user.slice/libpod-132ff0d72245e6f13a3bbc6cdc5376886897b60ac59eaa8dea1df7ab959cbf1c.scope" + m.path = path + + return nil +} + +func (m *unifiedManager) fsManager() (cgroups.Manager, error) { + if err := m.initPath(); err != nil { + return nil, err + } + return fs2.NewManager(m.cgroups, m.path, m.rootless) +} + +func (m *unifiedManager) Freeze(state configs.FreezerState) error { + fsMgr, err := m.fsManager() + if err != nil { + return err + } + return fsMgr.Freeze(state) +} + +func (m *unifiedManager) GetPids() ([]int, error) { + if err := m.initPath(); err != nil { + return nil, err + } + return cgroups.GetPids(m.path) +} + +func (m *unifiedManager) GetAllPids() ([]int, error) { + if err := m.initPath(); err != nil { + return nil, err + } + return cgroups.GetAllPids(m.path) +} + +func (m *unifiedManager) GetStats() (*cgroups.Stats, error) { + fsMgr, err := m.fsManager() + if err != nil { + return nil, err + } + return fsMgr.GetStats() +} + +func (m *unifiedManager) Set(container *configs.Config) error { + dbusConnection, err := getDbusConnection(m.rootless) + if err != nil { + return err + } + properties, err := genV2ResourcesProperties(m.cgroups, dbusConnection) + if err != nil { + return err + } + + // We have to freeze the container while systemd sets the cgroup settings. + // The reason for this is that systemd's application of DeviceAllow rules + // is done disruptively, resulting in spurrious errors to common devices + // (unlike our fs driver, they will happily write deny-all rules to running + // containers). So we freeze the container to avoid them hitting the cgroup + // error. But if the freezer cgroup isn't supported, we just warn about it. + targetFreezerState := configs.Undefined + if !m.cgroups.SkipDevices { + // Figure out the current freezer state, so we can revert to it after we + // temporarily freeze the container. + targetFreezerState, err = m.GetFreezerState() + if err != nil { + return err + } + if targetFreezerState == configs.Undefined { + targetFreezerState = configs.Thawed + } + + if err := m.Freeze(configs.Frozen); err != nil { + logrus.Infof("freeze container before SetUnitProperties failed: %v", err) + } + } + + if err := dbusConnection.SetUnitProperties(getUnitName(m.cgroups), true, properties...); err != nil { + _ = m.Freeze(targetFreezerState) + return errors.Wrap(err, "error while setting unit properties") + } + + // Reset freezer state before we apply the configuration, to avoid clashing + // with the freezer setting in the configuration. + _ = m.Freeze(targetFreezerState) + + fsMgr, err := m.fsManager() + if err != nil { + return err + } + return fsMgr.Set(container) +} + +func (m *unifiedManager) GetPaths() map[string]string { + paths := make(map[string]string, 1) + paths[""] = m.path + return paths +} + +func (m *unifiedManager) GetCgroups() (*configs.Cgroup, error) { + return m.cgroups, nil +} + +func (m *unifiedManager) GetFreezerState() (configs.FreezerState, error) { + fsMgr, err := m.fsManager() + if err != nil { + return configs.Undefined, err + } + return fsMgr.GetFreezerState() +} + +func (m *unifiedManager) Exists() bool { + return cgroups.PathExists(m.path) +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go index dbcc58f5b35..6e88b5dff6f 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go @@ -4,6 +4,7 @@ package cgroups import ( "bufio" + "errors" "fmt" "io" "io/ioutil" @@ -12,7 +13,6 @@ import ( "strconv" "strings" "sync" - "syscall" "time" units "github.com/docker/go-units" @@ -20,7 +20,6 @@ import ( ) const ( - CgroupNamePrefix = "name=" CgroupProcesses = "cgroup.procs" unifiedMountpoint = "/sys/fs/cgroup" ) @@ -40,8 +39,8 @@ var HugePageSizeUnitList = []string{"B", "KB", "MB", "GB", "TB", "PB"} // IsCgroup2UnifiedMode returns whether we are running in cgroup v2 unified mode. func IsCgroup2UnifiedMode() bool { isUnifiedOnce.Do(func() { - var st syscall.Statfs_t - if err := syscall.Statfs(unifiedMountpoint, &st); err != nil { + var st unix.Statfs_t + if err := unix.Statfs(unifiedMountpoint, &st); err != nil { panic("cannot statfs cgroup root") } isUnified = st.Type == unix.CGROUP2_SUPER_MAGIC @@ -49,191 +48,19 @@ func IsCgroup2UnifiedMode() bool { return isUnified } -// https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt -func FindCgroupMountpoint(cgroupPath, subsystem string) (string, error) { - if IsCgroup2UnifiedMode() { - return unifiedMountpoint, nil - } - mnt, _, err := FindCgroupMountpointAndRoot(cgroupPath, subsystem) - return mnt, err -} - -func FindCgroupMountpointAndRoot(cgroupPath, subsystem string) (string, string, error) { - // We are not using mount.GetMounts() because it's super-inefficient, - // parsing it directly sped up x10 times because of not using Sscanf. - // It was one of two major performance drawbacks in container start. - if !isSubsystemAvailable(subsystem) { - return "", "", NewNotFoundError(subsystem) - } - - f, err := os.Open("/proc/self/mountinfo") - if err != nil { - return "", "", err - } - defer f.Close() - - if IsCgroup2UnifiedMode() { - subsystem = "" - } - - return findCgroupMountpointAndRootFromReader(f, cgroupPath, subsystem) -} - -func findCgroupMountpointAndRootFromReader(reader io.Reader, cgroupPath, subsystem string) (string, string, error) { - scanner := bufio.NewScanner(reader) - for scanner.Scan() { - txt := scanner.Text() - fields := strings.Fields(txt) - if len(fields) < 9 { - continue - } - if strings.HasPrefix(fields[4], cgroupPath) { - for _, opt := range strings.Split(fields[len(fields)-1], ",") { - if (subsystem == "" && fields[9] == "cgroup2") || opt == subsystem { - return fields[4], fields[3], nil - } - } - } - } - if err := scanner.Err(); err != nil { - return "", "", err - } - - return "", "", NewNotFoundError(subsystem) -} - -func isSubsystemAvailable(subsystem string) bool { - if IsCgroup2UnifiedMode() { - controllers, err := GetAllSubsystems() - if err != nil { - return false - } - for _, c := range controllers { - if c == subsystem { - return true - } - } - return false - } - - cgroups, err := ParseCgroupFile("/proc/self/cgroup") - if err != nil { - return false - } - _, avail := cgroups[subsystem] - return avail -} - -func GetClosestMountpointAncestor(dir, mountinfo string) string { - deepestMountPoint := "" - for _, mountInfoEntry := range strings.Split(mountinfo, "\n") { - mountInfoParts := strings.Fields(mountInfoEntry) - if len(mountInfoParts) < 5 { - continue - } - mountPoint := mountInfoParts[4] - if strings.HasPrefix(mountPoint, deepestMountPoint) && strings.HasPrefix(dir, mountPoint) { - deepestMountPoint = mountPoint - } - } - return deepestMountPoint -} - -func FindCgroupMountpointDir() (string, error) { - f, err := os.Open("/proc/self/mountinfo") - if err != nil { - return "", err - } - defer f.Close() - - scanner := bufio.NewScanner(f) - for scanner.Scan() { - text := scanner.Text() - fields := strings.Split(text, " ") - // Safe as mountinfo encodes mountpoints with spaces as \040. - index := strings.Index(text, " - ") - postSeparatorFields := strings.Fields(text[index+3:]) - numPostFields := len(postSeparatorFields) - - // This is an error as we can't detect if the mount is for "cgroup" - if numPostFields == 0 { - return "", fmt.Errorf("Found no fields post '-' in %q", text) - } - - if postSeparatorFields[0] == "cgroup" || postSeparatorFields[0] == "cgroup2" { - // Check that the mount is properly formatted. - if numPostFields < 3 { - return "", fmt.Errorf("Error found less than 3 fields post '-' in %q", text) - } - - return filepath.Dir(fields[4]), nil - } - } - if err := scanner.Err(); err != nil { - return "", err - } - - return "", NewNotFoundError("cgroup") -} - type Mount struct { Mountpoint string Root string Subsystems []string } -func (m Mount) GetOwnCgroup(cgroups map[string]string) (string, error) { - if len(m.Subsystems) == 0 { - return "", fmt.Errorf("no subsystem for mount") - } - - return getControllerPath(m.Subsystems[0], cgroups) -} - -func getCgroupMountsHelper(ss map[string]bool, mi io.Reader, all bool) ([]Mount, error) { - res := make([]Mount, 0, len(ss)) - scanner := bufio.NewScanner(mi) - numFound := 0 - for scanner.Scan() && numFound < len(ss) { - txt := scanner.Text() - sepIdx := strings.Index(txt, " - ") - if sepIdx == -1 { - return nil, fmt.Errorf("invalid mountinfo format") - } - if txt[sepIdx+3:sepIdx+10] == "cgroup2" || txt[sepIdx+3:sepIdx+9] != "cgroup" { - continue - } - fields := strings.Split(txt, " ") - m := Mount{ - Mountpoint: fields[4], - Root: fields[3], - } - for _, opt := range strings.Split(fields[len(fields)-1], ",") { - seen, known := ss[opt] - if !known || (!all && seen) { - continue - } - ss[opt] = true - if strings.HasPrefix(opt, CgroupNamePrefix) { - opt = opt[len(CgroupNamePrefix):] - } - m.Subsystems = append(m.Subsystems, opt) - numFound++ - } - if len(m.Subsystems) > 0 || all { - res = append(res, m) - } - } - if err := scanner.Err(); err != nil { - return nil, err - } - return res, nil -} - // GetCgroupMounts returns the mounts for the cgroup subsystems. // all indicates whether to return just the first instance or all the mounts. +// This function should not be used from cgroupv2 code, as in this case +// all the controllers are available under the constant unifiedMountpoint. func GetCgroupMounts(all bool) ([]Mount, error) { if IsCgroup2UnifiedMode() { + // TODO: remove cgroupv2 case once all external users are converted availableControllers, err := GetAllSubsystems() if err != nil { return nil, err @@ -246,22 +73,7 @@ func GetCgroupMounts(all bool) ([]Mount, error) { return []Mount{m}, nil } - f, err := os.Open("/proc/self/mountinfo") - if err != nil { - return nil, err - } - defer f.Close() - - allSubsystems, err := ParseCgroupFile("/proc/self/cgroup") - if err != nil { - return nil, err - } - - allMap := make(map[string]bool) - for s := range allSubsystems { - allMap[s] = false - } - return getCgroupMountsHelper(allMap, f, all) + return getCgroupMountsV1(all) } // GetAllSubsystems returns all the cgroup subsystems supported by the kernel @@ -305,61 +117,8 @@ func GetAllSubsystems() ([]string, error) { return subsystems, nil } -// GetOwnCgroup returns the relative path to the cgroup docker is running in. -func GetOwnCgroup(subsystem string) (string, error) { - cgroups, err := ParseCgroupFile("/proc/self/cgroup") - if err != nil { - return "", err - } - - return getControllerPath(subsystem, cgroups) -} - -func GetOwnCgroupPath(subsystem string) (string, error) { - cgroup, err := GetOwnCgroup(subsystem) - if err != nil { - return "", err - } - - return getCgroupPathHelper(subsystem, cgroup) -} - -func GetInitCgroup(subsystem string) (string, error) { - cgroups, err := ParseCgroupFile("/proc/1/cgroup") - if err != nil { - return "", err - } - - return getControllerPath(subsystem, cgroups) -} - -func GetInitCgroupPath(subsystem string) (string, error) { - cgroup, err := GetInitCgroup(subsystem) - if err != nil { - return "", err - } - - return getCgroupPathHelper(subsystem, cgroup) -} - -func getCgroupPathHelper(subsystem, cgroup string) (string, error) { - mnt, root, err := FindCgroupMountpointAndRoot("", subsystem) - if err != nil { - return "", err - } - - // This is needed for nested containers, because in /proc/self/cgroup we - // see paths from host, which don't exist in container. - relCgroup, err := filepath.Rel(root, cgroup) - if err != nil { - return "", err - } - - return filepath.Join(mnt, relCgroup), nil -} - -func readProcsFile(dir string) ([]int, error) { - f, err := os.Open(filepath.Join(dir, CgroupProcesses)) +func readProcsFile(file string) ([]int, error) { + f, err := os.Open(file) if err != nil { return nil, err } @@ -379,11 +138,18 @@ func readProcsFile(dir string) ([]int, error) { out = append(out, pid) } } - return out, nil + return out, s.Err() } -// ParseCgroupFile parses the given cgroup file, typically from -// /proc//cgroup, into a map of subgroups to cgroup names. +// ParseCgroupFile parses the given cgroup file, typically /proc/self/cgroup +// or /proc//cgroup, into a map of subsystems to cgroup paths, e.g. +// "cpu": "/user.slice/user-1000.slice" +// "pids": "/user.slice/user-1000.slice" +// etc. +// +// Note that for cgroup v2 unified hierarchy, there are no per-controller +// cgroup paths, so the resulting map will have a single element where the key +// is empty string ("") and the value is the cgroup path the is in. func ParseCgroupFile(path string) (map[string]string, error) { f, err := os.Open(path) if err != nil { @@ -423,22 +189,6 @@ func parseCgroupFromReader(r io.Reader) (map[string]string, error) { return cgroups, nil } -func getControllerPath(subsystem string, cgroups map[string]string) (string, error) { - if IsCgroup2UnifiedMode() { - return "/", nil - } - - if p, ok := cgroups[subsystem]; ok { - return p, nil - } - - if p, ok := cgroups[CgroupNamePrefix+subsystem]; ok { - return p, nil - } - - return "", NewNotFoundError(subsystem) -} - func PathExists(path string) bool { if _, err := os.Stat(path); err != nil { return false @@ -514,8 +264,8 @@ func getHugePageSizeFromFilenames(fileNames []string) ([]string, error) { } // GetPids returns all pids, that were added to cgroup at path. -func GetPids(path string) ([]int, error) { - return readProcsFile(path) +func GetPids(dir string) ([]int, error) { + return readProcsFile(filepath.Join(dir, CgroupProcesses)) } // GetAllPids returns all pids, that were added to cgroup at path and to all its @@ -524,14 +274,13 @@ func GetAllPids(path string) ([]int, error) { var pids []int // collect pids from all sub-cgroups err := filepath.Walk(path, func(p string, info os.FileInfo, iErr error) error { - dir, file := filepath.Split(p) - if file != CgroupProcesses { - return nil - } if iErr != nil { return iErr } - cPids, err := readProcsFile(dir) + if info.IsDir() || info.Name() != CgroupProcesses { + return nil + } + cPids, err := readProcsFile(p) if err != nil { return err } @@ -568,7 +317,7 @@ func WriteCgroupProc(dir string, pid int) error { // EINVAL might mean that the task being added to cgroup.procs is in state // TASK_NEW. We should attempt to do so again. - if isEINVAL(err) { + if errors.Is(err, unix.EINVAL) { time.Sleep(30 * time.Millisecond) continue } @@ -578,11 +327,53 @@ func WriteCgroupProc(dir string, pid int) error { return err } -func isEINVAL(err error) bool { - switch err := err.(type) { - case *os.PathError: - return err.Err == unix.EINVAL - default: - return false +// Since the OCI spec is designed for cgroup v1, in some cases +// there is need to convert from the cgroup v1 configuration to cgroup v2 +// the formula for BlkIOWeight is y = (1 + (x - 10) * 9999 / 990) +// convert linearly from [10-1000] to [1-10000] +func ConvertBlkIOToCgroupV2Value(blkIoWeight uint16) uint64 { + if blkIoWeight == 0 { + return 0 } + return uint64(1 + (uint64(blkIoWeight)-10)*9999/990) +} + +// Since the OCI spec is designed for cgroup v1, in some cases +// there is need to convert from the cgroup v1 configuration to cgroup v2 +// the formula for cpuShares is y = (1 + ((x - 2) * 9999) / 262142) +// convert from [2-262144] to [1-10000] +// 262144 comes from Linux kernel definition "#define MAX_SHARES (1UL << 18)" +func ConvertCPUSharesToCgroupV2Value(cpuShares uint64) uint64 { + if cpuShares == 0 { + return 0 + } + return (1 + ((cpuShares-2)*9999)/262142) +} + +// ConvertMemorySwapToCgroupV2Value converts MemorySwap value from OCI spec +// for use by cgroup v2 drivers. A conversion is needed since Resources.MemorySwap +// is defined as memory+swap combined, while in cgroup v2 swap is a separate value. +func ConvertMemorySwapToCgroupV2Value(memorySwap, memory int64) (int64, error) { + // for compatibility with cgroup1 controller, set swap to unlimited in + // case the memory is set to unlimited, and swap is not explicitly set, + // treating the request as "set both memory and swap to unlimited". + if memory == -1 && memorySwap == 0 { + return -1, nil + } + if memorySwap == -1 || memorySwap == 0 { + // -1 is "max", 0 is "unset", so treat as is + return memorySwap, nil + } + // sanity checks + if memory == 0 || memory == -1 { + return 0, errors.New("unable to set swap limit without memory limit") + } + if memory < 0 { + return 0, fmt.Errorf("invalid memory value: %d", memory) + } + if memorySwap < memory { + return 0, errors.New("memory+swap limit should be >= memory limit") + } + + return memorySwap - memory, nil } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/v1_utils.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/v1_utils.go new file mode 100644 index 00000000000..a94f208616e --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/v1_utils.go @@ -0,0 +1,301 @@ +package cgroups + +import ( + "bufio" + "errors" + "fmt" + "io" + "os" + "path/filepath" + "strings" + "syscall" + + securejoin "github.com/cyphar/filepath-securejoin" + "golang.org/x/sys/unix" +) + +// Code in this source file are specific to cgroup v1, +// and must not be used from any cgroup v2 code. + +const ( + CgroupNamePrefix = "name=" + defaultPrefix = "/sys/fs/cgroup" +) + +var ( + errUnified = errors.New("not implemented for cgroup v2 unified hierarchy") +) + +type NotFoundError struct { + Subsystem string +} + +func (e *NotFoundError) Error() string { + return fmt.Sprintf("mountpoint for %s not found", e.Subsystem) +} + +func NewNotFoundError(sub string) error { + return &NotFoundError{ + Subsystem: sub, + } +} + +func IsNotFound(err error) bool { + if err == nil { + return false + } + _, ok := err.(*NotFoundError) + return ok +} + +func tryDefaultPath(cgroupPath, subsystem string) string { + if !strings.HasPrefix(defaultPrefix, cgroupPath) { + return "" + } + + // remove possible prefix + subsystem = strings.TrimPrefix(subsystem, CgroupNamePrefix) + + // Make sure we're still under defaultPrefix, and resolve + // a possible symlink (like cpu -> cpu,cpuacct). + path, err := securejoin.SecureJoin(defaultPrefix, subsystem) + if err != nil { + return "" + } + + // (1) path should be a directory. + st, err := os.Lstat(path) + if err != nil || !st.IsDir() { + return "" + } + + // (2) path should be a mount point. + pst, err := os.Lstat(filepath.Dir(path)) + if err != nil { + return "" + } + + if st.Sys().(*syscall.Stat_t).Dev == pst.Sys().(*syscall.Stat_t).Dev { + // parent dir has the same dev -- path is not a mount point + return "" + } + + // (3) path should have 'cgroup' fs type. + fst := unix.Statfs_t{} + err = unix.Statfs(path, &fst) + if err != nil || fst.Type != unix.CGROUP_SUPER_MAGIC { + return "" + } + + return path +} + +// https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt +func FindCgroupMountpoint(cgroupPath, subsystem string) (string, error) { + if IsCgroup2UnifiedMode() { + return "", errUnified + } + + // Avoid parsing mountinfo by trying the default path first, if possible. + if path := tryDefaultPath(cgroupPath, subsystem); path != "" { + return path, nil + } + + mnt, _, err := FindCgroupMountpointAndRoot(cgroupPath, subsystem) + return mnt, err +} + +func FindCgroupMountpointAndRoot(cgroupPath, subsystem string) (string, string, error) { + if IsCgroup2UnifiedMode() { + return "", "", errUnified + } + + // Avoid parsing mountinfo by checking if subsystem is valid/available. + if !isSubsystemAvailable(subsystem) { + return "", "", NewNotFoundError(subsystem) + } + + f, err := os.Open("/proc/self/mountinfo") + if err != nil { + return "", "", err + } + defer f.Close() + + return findCgroupMountpointAndRootFromReader(f, cgroupPath, subsystem) +} + +func findCgroupMountpointAndRootFromReader(reader io.Reader, cgroupPath, subsystem string) (string, string, error) { + scanner := bufio.NewScanner(reader) + for scanner.Scan() { + txt := scanner.Text() + fields := strings.Fields(txt) + if len(fields) < 9 { + continue + } + if strings.HasPrefix(fields[4], cgroupPath) { + for _, opt := range strings.Split(fields[len(fields)-1], ",") { + if opt == subsystem { + return fields[4], fields[3], nil + } + } + } + } + if err := scanner.Err(); err != nil { + return "", "", err + } + + return "", "", NewNotFoundError(subsystem) +} + +func isSubsystemAvailable(subsystem string) bool { + if IsCgroup2UnifiedMode() { + panic("don't call isSubsystemAvailable from cgroupv2 code") + } + + cgroups, err := ParseCgroupFile("/proc/self/cgroup") + if err != nil { + return false + } + _, avail := cgroups[subsystem] + return avail +} + +func (m Mount) GetOwnCgroup(cgroups map[string]string) (string, error) { + if len(m.Subsystems) == 0 { + return "", fmt.Errorf("no subsystem for mount") + } + + return getControllerPath(m.Subsystems[0], cgroups) +} + +func getCgroupMountsHelper(ss map[string]bool, mi io.Reader, all bool) ([]Mount, error) { + res := make([]Mount, 0, len(ss)) + scanner := bufio.NewScanner(mi) + numFound := 0 + for scanner.Scan() && numFound < len(ss) { + txt := scanner.Text() + sepIdx := strings.Index(txt, " - ") + if sepIdx == -1 { + return nil, fmt.Errorf("invalid mountinfo format") + } + if txt[sepIdx+3:sepIdx+10] == "cgroup2" || txt[sepIdx+3:sepIdx+9] != "cgroup" { + continue + } + fields := strings.Split(txt, " ") + m := Mount{ + Mountpoint: fields[4], + Root: fields[3], + } + for _, opt := range strings.Split(fields[len(fields)-1], ",") { + seen, known := ss[opt] + if !known || (!all && seen) { + continue + } + ss[opt] = true + opt = strings.TrimPrefix(opt, CgroupNamePrefix) + m.Subsystems = append(m.Subsystems, opt) + numFound++ + } + if len(m.Subsystems) > 0 || all { + res = append(res, m) + } + } + if err := scanner.Err(); err != nil { + return nil, err + } + return res, nil +} + +func getCgroupMountsV1(all bool) ([]Mount, error) { + f, err := os.Open("/proc/self/mountinfo") + if err != nil { + return nil, err + } + defer f.Close() + + allSubsystems, err := ParseCgroupFile("/proc/self/cgroup") + if err != nil { + return nil, err + } + + allMap := make(map[string]bool) + for s := range allSubsystems { + allMap[s] = false + } + return getCgroupMountsHelper(allMap, f, all) +} + +// GetOwnCgroup returns the relative path to the cgroup docker is running in. +func GetOwnCgroup(subsystem string) (string, error) { + if IsCgroup2UnifiedMode() { + return "", errUnified + } + cgroups, err := ParseCgroupFile("/proc/self/cgroup") + if err != nil { + return "", err + } + + return getControllerPath(subsystem, cgroups) +} + +func GetOwnCgroupPath(subsystem string) (string, error) { + cgroup, err := GetOwnCgroup(subsystem) + if err != nil { + return "", err + } + + return getCgroupPathHelper(subsystem, cgroup) +} + +func GetInitCgroup(subsystem string) (string, error) { + if IsCgroup2UnifiedMode() { + return "", errUnified + } + cgroups, err := ParseCgroupFile("/proc/1/cgroup") + if err != nil { + return "", err + } + + return getControllerPath(subsystem, cgroups) +} + +func GetInitCgroupPath(subsystem string) (string, error) { + cgroup, err := GetInitCgroup(subsystem) + if err != nil { + return "", err + } + + return getCgroupPathHelper(subsystem, cgroup) +} + +func getCgroupPathHelper(subsystem, cgroup string) (string, error) { + mnt, root, err := FindCgroupMountpointAndRoot("", subsystem) + if err != nil { + return "", err + } + + // This is needed for nested containers, because in /proc/self/cgroup we + // see paths from host, which don't exist in container. + relCgroup, err := filepath.Rel(root, cgroup) + if err != nil { + return "", err + } + + return filepath.Join(mnt, relCgroup), nil +} + +func getControllerPath(subsystem string, cgroups map[string]string) (string, error) { + if IsCgroup2UnifiedMode() { + return "", errUnified + } + + if p, ok := cgroups[subsystem]; ok { + return p, nil + } + + if p, ok := cgroups[CgroupNamePrefix+subsystem]; ok { + return p, nil + } + + return "", NewNotFoundError(subsystem) +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go index 58ed19c9e78..6e90ae16b50 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go @@ -1,5 +1,9 @@ package configs +import ( + systemdDbus "github.com/coreos/go-systemd/v22/dbus" +) + type FreezerState string const ( @@ -29,18 +33,16 @@ type Cgroup struct { // Resources contains various cgroups settings to apply *Resources + + // SystemdProps are any additional properties for systemd, + // derived from org.systemd.property.xxx annotations. + // Ignored unless systemd is used for managing cgroups. + SystemdProps []systemdDbus.Property `json:"-"` } type Resources struct { - // If this is true allow access to any kind of device within the container. If false, allow access only to devices explicitly listed in the allowed_devices list. - // Deprecated - AllowAllDevices *bool `json:"allow_all_devices,omitempty"` - // Deprecated - AllowedDevices []*Device `json:"allowed_devices,omitempty"` - // Deprecated - DeniedDevices []*Device `json:"denied_devices,omitempty"` - - Devices []*Device `json:"devices"` + // Devices is the set of access rules for devices in the container. + Devices []*DeviceRule `json:"devices"` // Memory limit (in bytes) Memory int64 `json:"memory"` @@ -125,6 +127,10 @@ type Resources struct { // CpuWeight sets a proportional bandwidth limit. CpuWeight uint64 `json:"cpu_weight"` - // CpuMax sets she maximum bandwidth limit (format: max period). - CpuMax string `json:"cpu_max"` + // SkipDevices allows to skip configuring device permissions. + // Used by e.g. kubelet while creating a parent cgroup (kubepods) + // common for many containers. + // + // NOTE it is impossible to start a container which has this flag set. + SkipDevices bool `json:"skip_devices"` } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go b/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go index 24989e9f534..540f0f85d29 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go @@ -8,7 +8,7 @@ import ( "time" "github.com/opencontainers/runtime-spec/specs-go" - + "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -70,9 +70,10 @@ type Arg struct { // Syscall is a rule to match a syscall in Seccomp type Syscall struct { - Name string `json:"name"` - Action Action `json:"action"` - Args []*Arg `json:"args"` + Name string `json:"name"` + Action Action `json:"action"` + ErrnoRet *uint `json:"errnoRet"` + Args []*Arg `json:"args"` } // TODO Windows. Many of these fields should be factored out into those parts @@ -175,7 +176,7 @@ type Config struct { // Hooks are a collection of actions to perform at various container lifecycle events. // CommandHooks are serialized to JSON, but other hooks are not. - Hooks *Hooks + Hooks Hooks // Version is the version of opencontainer specification that is supported. Version string `json:"version"` @@ -202,17 +203,41 @@ type Config struct { RootlessCgroups bool `json:"rootless_cgroups,omitempty"` } -type Hooks struct { +type HookName string +type HookList []Hook +type Hooks map[HookName]HookList + +const ( // Prestart commands are executed after the container namespaces are created, // but before the user supplied command is executed from init. - Prestart []Hook + // Note: This hook is now deprecated + // Prestart commands are called in the Runtime namespace. + Prestart HookName = "prestart" + + // CreateRuntime commands MUST be called as part of the create operation after + // the runtime environment has been created but before the pivot_root has been executed. + // CreateRuntime is called immediately after the deprecated Prestart hook. + // CreateRuntime commands are called in the Runtime Namespace. + CreateRuntime = "createRuntime" + + // CreateContainer commands MUST be called as part of the create operation after + // the runtime environment has been created but before the pivot_root has been executed. + // CreateContainer commands are called in the Container namespace. + CreateContainer = "createContainer" + + // StartContainer commands MUST be called as part of the start operation and before + // the container process is started. + // StartContainer commands are called in the Container namespace. + StartContainer = "startContainer" // Poststart commands are executed after the container init process starts. - Poststart []Hook + // Poststart commands are called in the Runtime Namespace. + Poststart = "poststart" // Poststop commands are executed after the container init process exits. - Poststop []Hook -} + // Poststop commands are called in the Runtime Namespace. + Poststop = "poststop" +) type Capabilities struct { // Bounding is the set of capabilities checked by the kernel. @@ -227,32 +252,39 @@ type Capabilities struct { Ambient []string } -func (hooks *Hooks) UnmarshalJSON(b []byte) error { - var state struct { - Prestart []CommandHook - Poststart []CommandHook - Poststop []CommandHook +func (hooks HookList) RunHooks(state *specs.State) error { + for i, h := range hooks { + if err := h.Run(state); err != nil { + return errors.Wrapf(err, "Running hook #%d:", i) + } } + return nil +} + +func (hooks *Hooks) UnmarshalJSON(b []byte) error { + var state map[HookName][]CommandHook + if err := json.Unmarshal(b, &state); err != nil { return err } - deserialize := func(shooks []CommandHook) (hooks []Hook) { - for _, shook := range shooks { - hooks = append(hooks, shook) + *hooks = Hooks{} + for n, commandHooks := range state { + if len(commandHooks) == 0 { + continue } - return hooks + (*hooks)[n] = HookList{} + for _, h := range commandHooks { + (*hooks)[n] = append((*hooks)[n], h) + } } - hooks.Prestart = deserialize(state.Prestart) - hooks.Poststart = deserialize(state.Poststart) - hooks.Poststop = deserialize(state.Poststop) return nil } -func (hooks Hooks) MarshalJSON() ([]byte, error) { +func (hooks *Hooks) MarshalJSON() ([]byte, error) { serialize := func(hooks []Hook) (serializableHooks []CommandHook) { for _, hook := range hooks { switch chook := hook.(type) { @@ -267,9 +299,12 @@ func (hooks Hooks) MarshalJSON() ([]byte, error) { } return json.Marshal(map[string]interface{}{ - "prestart": serialize(hooks.Prestart), - "poststart": serialize(hooks.Poststart), - "poststop": serialize(hooks.Poststop), + "prestart": serialize((*hooks)[Prestart]), + "createRuntime": serialize((*hooks)[CreateRuntime]), + "createContainer": serialize((*hooks)[CreateContainer]), + "startContainer": serialize((*hooks)[StartContainer]), + "poststart": serialize((*hooks)[Poststart]), + "poststop": serialize((*hooks)[Poststop]), }) } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/configs/device.go b/vendor/github.com/opencontainers/runc/libcontainer/configs/device.go index 8701bb212d7..632bf6ac49c 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/configs/device.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/configs/device.go @@ -3,30 +3,19 @@ package configs import ( "fmt" "os" + "strconv" ) const ( Wildcard = -1 ) -// TODO Windows: This can be factored out in the future - type Device struct { - // Device type, block, char, etc. - Type rune `json:"type"` + DeviceRule // Path to the device. Path string `json:"path"` - // Major is the device's major number. - Major int64 `json:"major"` - - // Minor is the device's minor number. - Minor int64 `json:"minor"` - - // Cgroup permissions format, rwm. - Permissions string `json:"permissions"` - // FileMode permission bits for the device. FileMode os.FileMode `json:"file_mode"` @@ -35,23 +24,147 @@ type Device struct { // Gid of the device. Gid uint32 `json:"gid"` +} - // Write the file to the allowed list +// DevicePermissions is a cgroupv1-style string to represent device access. It +// has to be a string for backward compatibility reasons, hence why it has +// methods to do set operations. +type DevicePermissions string + +const ( + deviceRead uint = (1 << iota) + deviceWrite + deviceMknod +) + +func (p DevicePermissions) toSet() uint { + var set uint + for _, perm := range p { + switch perm { + case 'r': + set |= deviceRead + case 'w': + set |= deviceWrite + case 'm': + set |= deviceMknod + } + } + return set +} + +func fromSet(set uint) DevicePermissions { + var perm string + if set&deviceRead == deviceRead { + perm += "r" + } + if set&deviceWrite == deviceWrite { + perm += "w" + } + if set&deviceMknod == deviceMknod { + perm += "m" + } + return DevicePermissions(perm) +} + +// Union returns the union of the two sets of DevicePermissions. +func (p DevicePermissions) Union(o DevicePermissions) DevicePermissions { + lhs := p.toSet() + rhs := o.toSet() + return fromSet(lhs | rhs) +} + +// Difference returns the set difference of the two sets of DevicePermissions. +// In set notation, A.Difference(B) gives you A\B. +func (p DevicePermissions) Difference(o DevicePermissions) DevicePermissions { + lhs := p.toSet() + rhs := o.toSet() + return fromSet(lhs &^ rhs) +} + +// Intersection computes the intersection of the two sets of DevicePermissions. +func (p DevicePermissions) Intersection(o DevicePermissions) DevicePermissions { + lhs := p.toSet() + rhs := o.toSet() + return fromSet(lhs & rhs) +} + +// IsEmpty returns whether the set of permissions in a DevicePermissions is +// empty. +func (p DevicePermissions) IsEmpty() bool { + return p == DevicePermissions("") +} + +// IsValid returns whether the set of permissions is a subset of valid +// permissions (namely, {r,w,m}). +func (p DevicePermissions) IsValid() bool { + return p == fromSet(p.toSet()) +} + +type DeviceType rune + +const ( + WildcardDevice DeviceType = 'a' + BlockDevice DeviceType = 'b' + CharDevice DeviceType = 'c' // or 'u' + FifoDevice DeviceType = 'p' +) + +func (t DeviceType) IsValid() bool { + switch t { + case WildcardDevice, BlockDevice, CharDevice, FifoDevice: + return true + default: + return false + } +} + +func (t DeviceType) CanMknod() bool { + switch t { + case BlockDevice, CharDevice, FifoDevice: + return true + default: + return false + } +} + +func (t DeviceType) CanCgroup() bool { + switch t { + case WildcardDevice, BlockDevice, CharDevice: + return true + default: + return false + } +} + +type DeviceRule struct { + // Type of device ('c' for char, 'b' for block). If set to 'a', this rule + // acts as a wildcard and all fields other than Allow are ignored. + Type DeviceType `json:"type"` + + // Major is the device's major number. + Major int64 `json:"major"` + + // Minor is the device's minor number. + Minor int64 `json:"minor"` + + // Permissions is the set of permissions that this rule applies to (in the + // cgroupv1 format -- any combination of "rwm"). + Permissions DevicePermissions `json:"permissions"` + + // Allow specifies whether this rule is allowed. Allow bool `json:"allow"` } -func (d *Device) CgroupString() string { - return fmt.Sprintf("%c %s:%s %s", d.Type, deviceNumberString(d.Major), deviceNumberString(d.Minor), d.Permissions) -} - -func (d *Device) Mkdev() int { - return int((d.Major << 8) | (d.Minor & 0xff) | ((d.Minor & 0xfff00) << 12)) -} - -// deviceNumberString converts the device number to a string return result. -func deviceNumberString(number int64) string { - if number == Wildcard { - return "*" +func (d *DeviceRule) CgroupString() string { + var ( + major = strconv.FormatInt(d.Major, 10) + minor = strconv.FormatInt(d.Minor, 10) + ) + if d.Major == Wildcard { + major = "*" } - return fmt.Sprint(number) + if d.Minor == Wildcard { + minor = "*" + } + return fmt.Sprintf("%c %s:%s %s", d.Type, major, minor, d.Permissions) } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/configs/device_defaults.go b/vendor/github.com/opencontainers/runc/libcontainer/configs/device_defaults.go deleted file mode 100644 index e4f423c523f..00000000000 --- a/vendor/github.com/opencontainers/runc/libcontainer/configs/device_defaults.go +++ /dev/null @@ -1,111 +0,0 @@ -// +build linux - -package configs - -var ( - // DefaultSimpleDevices are devices that are to be both allowed and created. - DefaultSimpleDevices = []*Device{ - // /dev/null and zero - { - Path: "/dev/null", - Type: 'c', - Major: 1, - Minor: 3, - Permissions: "rwm", - FileMode: 0666, - }, - { - Path: "/dev/zero", - Type: 'c', - Major: 1, - Minor: 5, - Permissions: "rwm", - FileMode: 0666, - }, - - { - Path: "/dev/full", - Type: 'c', - Major: 1, - Minor: 7, - Permissions: "rwm", - FileMode: 0666, - }, - - // consoles and ttys - { - Path: "/dev/tty", - Type: 'c', - Major: 5, - Minor: 0, - Permissions: "rwm", - FileMode: 0666, - }, - - // /dev/urandom,/dev/random - { - Path: "/dev/urandom", - Type: 'c', - Major: 1, - Minor: 9, - Permissions: "rwm", - FileMode: 0666, - }, - { - Path: "/dev/random", - Type: 'c', - Major: 1, - Minor: 8, - Permissions: "rwm", - FileMode: 0666, - }, - } - DefaultAllowedDevices = append([]*Device{ - // allow mknod for any device - { - Type: 'c', - Major: Wildcard, - Minor: Wildcard, - Permissions: "m", - }, - { - Type: 'b', - Major: Wildcard, - Minor: Wildcard, - Permissions: "m", - }, - - { - Path: "/dev/console", - Type: 'c', - Major: 5, - Minor: 1, - Permissions: "rwm", - }, - // /dev/pts/ - pts namespaces are "coming soon" - { - Path: "", - Type: 'c', - Major: 136, - Minor: Wildcard, - Permissions: "rwm", - }, - { - Path: "", - Type: 'c', - Major: 5, - Minor: 2, - Permissions: "rwm", - }, - - // tuntap - { - Path: "", - Type: 'c', - Major: 10, - Minor: 200, - Permissions: "rwm", - }, - }, DefaultSimpleDevices...) - DefaultAutoCreatedDevices = append([]*Device{}, DefaultSimpleDevices...) -) diff --git a/vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go b/vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go new file mode 100644 index 00000000000..650c46848a1 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go @@ -0,0 +1,16 @@ +// +build !windows + +package configs + +import ( + "errors" + + "golang.org/x/sys/unix" +) + +func (d *DeviceRule) Mkdev() (uint64, error) { + if d.Major == Wildcard || d.Minor == Wildcard { + return 0, errors.New("cannot mkdev() device with wildcards") + } + return unix.Mkdev(uint32(d.Major), uint32(d.Minor)), nil +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/configs/device_windows.go b/vendor/github.com/opencontainers/runc/libcontainer/configs/device_windows.go new file mode 100644 index 00000000000..729289393fe --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/configs/device_windows.go @@ -0,0 +1,5 @@ +package configs + +func (d *DeviceRule) Mkdev() (uint64, error) { + return 0, nil +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/rootless.go b/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/rootless.go index 393d9e81ee9..717d0f00a34 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/rootless.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/rootless.go @@ -1,6 +1,7 @@ package validate import ( + "errors" "fmt" "strings" @@ -35,14 +36,14 @@ func hasIDMapping(id int, mappings []configs.IDMap) bool { func rootlessEUIDMappings(config *configs.Config) error { if !config.Namespaces.Contains(configs.NEWUSER) { - return fmt.Errorf("rootless container requires user namespaces") + return errors.New("rootless container requires user namespaces") } if len(config.UidMappings) == 0 { - return fmt.Errorf("rootless containers requires at least one UID mapping") + return errors.New("rootless containers requires at least one UID mapping") } if len(config.GidMappings) == 0 { - return fmt.Errorf("rootless containers requires at least one GID mapping") + return errors.New("rootless containers requires at least one GID mapping") } return nil } @@ -67,7 +68,7 @@ func rootlessEUIDMount(config *configs.Config) error { continue } if !hasIDMapping(uid, config.UidMappings) { - return fmt.Errorf("cannot specify uid= mount options for unmapped uid in rootless containers") + return errors.New("cannot specify uid= mount options for unmapped uid in rootless containers") } } @@ -79,7 +80,7 @@ func rootlessEUIDMount(config *configs.Config) error { continue } if !hasIDMapping(gid, config.GidMappings) { - return fmt.Errorf("cannot specify gid= mount options for unmapped gid in rootless containers") + return errors.New("cannot specify gid= mount options for unmapped gid in rootless containers") } } } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go b/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go index 3b42f30107a..49b5f4c69fe 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go @@ -1,6 +1,7 @@ package validate import ( + "errors" "fmt" "os" "path/filepath" @@ -80,7 +81,7 @@ func (v *ConfigValidator) rootfs(config *configs.Config) error { func (v *ConfigValidator) network(config *configs.Config) error { if !config.Namespaces.Contains(configs.NEWNET) { if len(config.Networks) > 0 || len(config.Routes) > 0 { - return fmt.Errorf("unable to apply network settings without a private NET namespace") + return errors.New("unable to apply network settings without a private NET namespace") } } return nil @@ -88,7 +89,7 @@ func (v *ConfigValidator) network(config *configs.Config) error { func (v *ConfigValidator) hostname(config *configs.Config) error { if config.Hostname != "" && !config.Namespaces.Contains(configs.NEWUTS) { - return fmt.Errorf("unable to set hostname without a private UTS namespace") + return errors.New("unable to set hostname without a private UTS namespace") } return nil } @@ -97,10 +98,10 @@ func (v *ConfigValidator) security(config *configs.Config) error { // restrict sys without mount namespace if (len(config.MaskPaths) > 0 || len(config.ReadonlyPaths) > 0) && !config.Namespaces.Contains(configs.NEWNS) { - return fmt.Errorf("unable to restrict sys entries without a private MNT namespace") + return errors.New("unable to restrict sys entries without a private MNT namespace") } if config.ProcessLabel != "" && !selinux.GetEnabled() { - return fmt.Errorf("selinux label is specified in config, but selinux is disabled or not supported") + return errors.New("selinux label is specified in config, but selinux is disabled or not supported") } return nil @@ -109,11 +110,11 @@ func (v *ConfigValidator) security(config *configs.Config) error { func (v *ConfigValidator) usernamespace(config *configs.Config) error { if config.Namespaces.Contains(configs.NEWUSER) { if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) { - return fmt.Errorf("USER namespaces aren't enabled in the kernel") + return errors.New("USER namespaces aren't enabled in the kernel") } } else { if config.UidMappings != nil || config.GidMappings != nil { - return fmt.Errorf("User namespace mappings specified, but USER namespace isn't enabled in the config") + return errors.New("User namespace mappings specified, but USER namespace isn't enabled in the config") } } return nil @@ -122,7 +123,7 @@ func (v *ConfigValidator) usernamespace(config *configs.Config) error { func (v *ConfigValidator) cgroupnamespace(config *configs.Config) error { if config.Namespaces.Contains(configs.NEWCGROUP) { if _, err := os.Stat("/proc/self/ns/cgroup"); os.IsNotExist(err) { - return fmt.Errorf("cgroup namespaces aren't enabled in the kernel") + return errors.New("cgroup namespaces aren't enabled in the kernel") } } return nil @@ -182,21 +183,21 @@ func (v *ConfigValidator) sysctl(config *configs.Config) error { func (v *ConfigValidator) intelrdt(config *configs.Config) error { if config.IntelRdt != nil { if !intelrdt.IsCatEnabled() && !intelrdt.IsMbaEnabled() { - return fmt.Errorf("intelRdt is specified in config, but Intel RDT is not supported or enabled") + return errors.New("intelRdt is specified in config, but Intel RDT is not supported or enabled") } if !intelrdt.IsCatEnabled() && config.IntelRdt.L3CacheSchema != "" { - return fmt.Errorf("intelRdt.l3CacheSchema is specified in config, but Intel RDT/CAT is not enabled") + return errors.New("intelRdt.l3CacheSchema is specified in config, but Intel RDT/CAT is not enabled") } if !intelrdt.IsMbaEnabled() && config.IntelRdt.MemBwSchema != "" { - return fmt.Errorf("intelRdt.memBwSchema is specified in config, but Intel RDT/MBA is not enabled") + return errors.New("intelRdt.memBwSchema is specified in config, but Intel RDT/MBA is not enabled") } if intelrdt.IsCatEnabled() && config.IntelRdt.L3CacheSchema == "" { - return fmt.Errorf("Intel RDT/CAT is enabled and intelRdt is specified in config, but intelRdt.l3CacheSchema is empty") + return errors.New("Intel RDT/CAT is enabled and intelRdt is specified in config, but intelRdt.l3CacheSchema is empty") } if intelrdt.IsMbaEnabled() && config.IntelRdt.MemBwSchema == "" { - return fmt.Errorf("Intel RDT/MBA is enabled and intelRdt is specified in config, but intelRdt.memBwSchema is empty") + return errors.New("Intel RDT/MBA is enabled and intelRdt is specified in config, but intelRdt.memBwSchema is empty") } } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go index fe70c937aad..e2f64fcb9fe 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go @@ -16,7 +16,6 @@ import ( "reflect" "strings" "sync" - "syscall" // only for SysProcAttr and Signal "time" securejoin "github.com/cyphar/filepath-securejoin" @@ -27,8 +26,10 @@ import ( "github.com/opencontainers/runc/libcontainer/utils" "github.com/opencontainers/runtime-spec/specs-go" - criurpc "github.com/checkpoint-restore/go-criu/rpc" + "github.com/checkpoint-restore/go-criu/v4" + criurpc "github.com/checkpoint-restore/go-criu/v4/rpc" "github.com/golang/protobuf/proto" + errorsf "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/vishvananda/netlink/nl" "golang.org/x/sys/unix" @@ -65,8 +66,12 @@ type State struct { // Set to true if BaseState.Config.RootlessEUID && BaseState.Config.RootlessCgroups Rootless bool `json:"rootless"` - // Path to all the cgroups setup for a container. Key is cgroup subsystem name - // with the value as the path. + // Paths to all the container's cgroups, as returned by (*cgroups.Manager).GetPaths + // + // For cgroup v1, a key is cgroup subsystem name, and the value is the path + // to the cgroup for this subsystem. + // + // For cgroup v2 unified hierarchy, a key is "", and the value is the unified path. CgroupPaths map[string]string `json:"cgroup_paths"` // NamespacePaths are filepaths to the container's namespaces. Key is the namespace type @@ -165,7 +170,17 @@ func (c *linuxContainer) OCIState() (*specs.State, error) { } func (c *linuxContainer) Processes() ([]int, error) { - pids, err := c.cgroupManager.GetAllPids() + var pids []int + status, err := c.currentStatus() + if err != nil { + return pids, err + } + // for systemd cgroup, the unit's cgroup path will be auto removed if container's all processes exited + if status == Stopped && !c.cgroupManager.Exists() { + return pids, nil + } + + pids, err = c.cgroupManager.GetAllPids() if err != nil { return nil, newSystemErrorWithCause(err, "getting all container pids from cgroups") } @@ -206,7 +221,7 @@ func (c *linuxContainer) Set(config configs.Config) error { return err } if status == Stopped { - return newGenericError(fmt.Errorf("container not running"), ContainerNotRunning) + return newGenericError(errors.New("container not running"), ContainerNotRunning) } if err := c.cgroupManager.Set(&config); err != nil { // Set configs back @@ -218,6 +233,9 @@ func (c *linuxContainer) Set(config configs.Config) error { if c.intelRdtManager != nil { if err := c.intelRdtManager.Set(&config); err != nil { // Set configs back + if err2 := c.cgroupManager.Set(c.config); err2 != nil { + logrus.Warnf("Setting back cgroup configs failed due to error: %v, your state.json and actual configs might be inconsistent.", err2) + } if err2 := c.intelRdtManager.Set(c.config); err2 != nil { logrus.Warnf("Setting back intelrdt configs failed due to error: %v, your state.json and actual configs might be inconsistent.", err2) } @@ -233,6 +251,9 @@ func (c *linuxContainer) Set(config configs.Config) error { func (c *linuxContainer) Start(process *Process) error { c.m.Lock() defer c.m.Unlock() + if c.config.Cgroups.Resources.SkipDevices { + return newGenericError(errors.New("can't start container with SkipDevices set"), ConfigInvalid) + } if process.Init { if err := c.createExecFifo(); err != nil { return err @@ -292,7 +313,7 @@ func readFromExecFifo(execFifo io.Reader) error { return err } if len(data) <= 0 { - return fmt.Errorf("cannot start an already running container") + return errors.New("cannot start an already running container") } return nil } @@ -309,7 +330,7 @@ func awaitFifoOpen(path string) <-chan openResult { func fifoOpen(path string, block bool) openResult { flags := os.O_RDONLY if !block { - flags |= syscall.O_NONBLOCK + flags |= unix.O_NONBLOCK } f, err := os.OpenFile(path, flags, 0) if err != nil { @@ -365,13 +386,12 @@ func (c *linuxContainer) start(process *Process) error { if err != nil { return err } - for i, hook := range c.config.Hooks.Poststart { - if err := hook.Run(s); err != nil { - if err := ignoreTerminateErrors(parent.terminate()); err != nil { - logrus.Warn(err) - } - return newSystemErrorWithCausef(err, "running poststart hook %d", i) + + if err := c.config.Hooks[configs.Poststart].RunHooks(s); err != nil { + if err := ignoreTerminateErrors(parent.terminate()); err != nil { + logrus.Warn(errorsf.Wrapf(err, "Running Poststart hook")) } + return err } } } @@ -379,13 +399,19 @@ func (c *linuxContainer) start(process *Process) error { } func (c *linuxContainer) Signal(s os.Signal, all bool) error { - if all { - return signalAllProcesses(c.cgroupManager, s) - } + c.m.Lock() + defer c.m.Unlock() status, err := c.currentStatus() if err != nil { return err } + if all { + // for systemd cgroup, the unit's cgroup path will be auto removed if container's all processes exited + if status == Stopped && !c.cgroupManager.Exists() { + return nil + } + return signalAllProcesses(c.cgroupManager, s) + } // to avoid a PID reuse attack if status == Running || status == Created || status == Paused { if err := c.initProcess.signal(s); err != nil { @@ -393,7 +419,7 @@ func (c *linuxContainer) Signal(s os.Signal, all bool) error { } return nil } - return newGenericError(fmt.Errorf("container not running"), ContainerNotRunning) + return newGenericError(errors.New("container not running"), ContainerNotRunning) } func (c *linuxContainer) createExecFifo() error { @@ -454,10 +480,7 @@ func (c *linuxContainer) newParentProcess(p *Process) (parentProcess, error) { } logFilePair := filePair{parentLogPipe, childLogPipe} - cmd, err := c.commandTemplate(p, childInitPipe, childLogPipe) - if err != nil { - return nil, newSystemErrorWithCause(err, "creating new command template") - } + cmd := c.commandTemplate(p, childInitPipe, childLogPipe) if !p.Init { return c.newSetnsProcess(p, cmd, messageSockPair, logFilePair) } @@ -473,7 +496,7 @@ func (c *linuxContainer) newParentProcess(p *Process) (parentProcess, error) { return c.newInitProcess(p, cmd, messageSockPair, logFilePair) } -func (c *linuxContainer) commandTemplate(p *Process, childInitPipe *os.File, childLogPipe *os.File) (*exec.Cmd, error) { +func (c *linuxContainer) commandTemplate(p *Process, childInitPipe *os.File, childLogPipe *os.File) *exec.Cmd { cmd := exec.Command(c.initPath, c.initArgs[1:]...) cmd.Args[0] = c.initArgs[0] cmd.Stdin = p.Stdin @@ -481,7 +504,7 @@ func (c *linuxContainer) commandTemplate(p *Process, childInitPipe *os.File, chi cmd.Stderr = p.Stderr cmd.Dir = c.config.Rootfs if cmd.SysProcAttr == nil { - cmd.SysProcAttr = &syscall.SysProcAttr{} + cmd.SysProcAttr = &unix.SysProcAttr{} } cmd.Env = append(cmd.Env, fmt.Sprintf("GOMAXPROCS=%s", os.Getenv("GOMAXPROCS"))) cmd.ExtraFiles = append(cmd.ExtraFiles, p.ExtraFiles...) @@ -507,9 +530,9 @@ func (c *linuxContainer) commandTemplate(p *Process, childInitPipe *os.File, chi // PID1 the pdeathsig is being delivered to the container's init process by the kernel for some reason // even with the parent still running. if c.config.ParentDeathSignal > 0 { - cmd.SysProcAttr.Pdeathsig = syscall.Signal(c.config.ParentDeathSignal) + cmd.SysProcAttr.Pdeathsig = unix.Signal(c.config.ParentDeathSignal) } - return cmd, nil + return cmd } func (c *linuxContainer) newInitProcess(p *Process, cmd *exec.Cmd, messageSockPair, logFilePair filePair) (*initProcess, error) { @@ -555,7 +578,7 @@ func (c *linuxContainer) newSetnsProcess(p *Process, cmd *exec.Cmd, messageSockP } return &setnsProcess{ cmd: cmd, - cgroupPaths: c.cgroupManager.GetPaths(), + cgroupPaths: state.CgroupPaths, rootlessCgroups: c.config.RootlessCgroups, intelRdtPath: state.IntelRdtPath, messageSockPair: messageSockPair, @@ -563,6 +586,7 @@ func (c *linuxContainer) newSetnsProcess(p *Process, cmd *exec.Cmd, messageSockP config: c.newInitConfig(p), process: p, bootstrapData: data, + initProcessPid: state.InitProcessPid, }, nil } @@ -650,7 +674,11 @@ func (c *linuxContainer) NotifyOOM() (<-chan struct{}, error) { if c.config.RootlessCgroups { logrus.Warn("getting OOM notifications may fail if you don't have the full access to cgroups") } - return notifyOnOOM(c.cgroupManager.GetPaths()) + path := c.cgroupManager.Path("memory") + if cgroups.IsCgroup2UnifiedMode() { + return notifyOnOOMV2(path) + } + return notifyOnOOM(path) } func (c *linuxContainer) NotifyMemoryPressure(level PressureLevel) (<-chan struct{}, error) { @@ -658,7 +686,7 @@ func (c *linuxContainer) NotifyMemoryPressure(level PressureLevel) (<-chan struc if c.config.RootlessCgroups { logrus.Warn("getting memory pressure notifications may fail if you don't have the full access to cgroups") } - return notifyMemoryPressure(c.cgroupManager.GetPaths(), level) + return notifyMemoryPressure(c.cgroupManager.Path("memory"), level) } var criuFeatures *criurpc.CriuFeatures @@ -668,16 +696,6 @@ func (c *linuxContainer) checkCriuFeatures(criuOpts *CriuOpts, rpcOpts *criurpc. var t criurpc.CriuReqType t = criurpc.CriuReqType_FEATURE_CHECK - // criu 1.8 => 10800 - if err := c.checkCriuVersion(10800); err != nil { - // Feature checking was introduced with CRIU 1.8. - // Ignore the feature check if an older CRIU version is used - // and just act as before. - // As all automated PR testing is done using CRIU 1.7 this - // code will not be tested by automated PR testing. - return nil - } - // make sure the features we are looking for are really not from // some previous check criuFeatures = nil @@ -691,10 +709,10 @@ func (c *linuxContainer) checkCriuFeatures(criuOpts *CriuOpts, rpcOpts *criurpc. Features: criuFeat, } - err := c.criuSwrk(nil, req, criuOpts, false, nil) + err := c.criuSwrk(nil, req, criuOpts, nil) if err != nil { logrus.Debugf("%s", err) - return fmt.Errorf("CRIU feature check failed") + return errors.New("CRIU feature check failed") } logrus.Debugf("Feature check says: %s", criuFeatures) @@ -721,56 +739,12 @@ func (c *linuxContainer) checkCriuFeatures(criuOpts *CriuOpts, rpcOpts *criurpc. } if missingFeatures { - return fmt.Errorf("CRIU is missing features") + return errors.New("CRIU is missing features") } return nil } -func parseCriuVersion(path string) (int, error) { - var x, y, z int - - out, err := exec.Command(path, "-V").Output() - if err != nil { - return 0, fmt.Errorf("Unable to execute CRIU command: %s", path) - } - - x = 0 - y = 0 - z = 0 - if ep := strings.Index(string(out), "-"); ep >= 0 { - // criu Git version format - var version string - if sp := strings.Index(string(out), "GitID"); sp > 0 { - version = string(out)[sp:ep] - } else { - return 0, fmt.Errorf("Unable to parse the CRIU version: %s", path) - } - - n, err := fmt.Sscanf(version, "GitID: v%d.%d.%d", &x, &y, &z) // 1.5.2 - if err != nil { - n, err = fmt.Sscanf(version, "GitID: v%d.%d", &x, &y) // 1.6 - y++ - } else { - z++ - } - if n < 2 || err != nil { - return 0, fmt.Errorf("Unable to parse the CRIU version: %s %d %s", version, n, err) - } - } else { - // criu release version format - n, err := fmt.Sscanf(string(out), "Version: %d.%d.%d\n", &x, &y, &z) // 1.5.2 - if err != nil { - n, err = fmt.Sscanf(string(out), "Version: %d.%d\n", &x, &y) // 1.6 - } - if n < 2 || err != nil { - return 0, fmt.Errorf("Unable to parse the CRIU version: %s %d %s", out, n, err) - } - } - - return x*10000 + y*100 + z, nil -} - func compareCriuVersion(criuVersion int, minVersion int) error { // simple function to perform the actual version compare if criuVersion < minVersion { @@ -780,9 +754,6 @@ func compareCriuVersion(criuVersion int, minVersion int) error { return nil } -// This is used to store the result of criu version RPC -var criuVersionRPC *criurpc.CriuVersion - // checkCriuVersion checks Criu version greater than or equal to minVersion func (c *linuxContainer) checkCriuVersion(minVersion int) error { @@ -792,50 +763,14 @@ func (c *linuxContainer) checkCriuVersion(minVersion int) error { return compareCriuVersion(c.criuVersion, minVersion) } - // First try if this version of CRIU support the version RPC. - // The CRIU version RPC was introduced with CRIU 3.0. - - // First, reset the variable for the RPC answer to nil - criuVersionRPC = nil - - var t criurpc.CriuReqType - t = criurpc.CriuReqType_VERSION - req := &criurpc.CriuReq{ - Type: &t, - } - - err := c.criuSwrk(nil, req, nil, false, nil) + criu := criu.MakeCriu() + criu.SetCriuPath(c.criuPath) + var err error + c.criuVersion, err = criu.GetCriuVersion() if err != nil { return fmt.Errorf("CRIU version check failed: %s", err) } - if criuVersionRPC != nil { - logrus.Debugf("CRIU version: %s", criuVersionRPC) - // major and minor are always set - c.criuVersion = int(*criuVersionRPC.Major) * 10000 - c.criuVersion += int(*criuVersionRPC.Minor) * 100 - if criuVersionRPC.Sublevel != nil { - c.criuVersion += int(*criuVersionRPC.Sublevel) - } - if criuVersionRPC.Gitid != nil { - // runc's convention is that a CRIU git release is - // always the same as increasing the minor by 1 - c.criuVersion -= (c.criuVersion % 100) - c.criuVersion += 100 - } - return compareCriuVersion(c.criuVersion, minVersion) - } - - // This is CRIU without the version RPC and therefore - // older than 3.0. Parsing the output is required. - - // This can be remove once runc does not work with criu older than 3.0 - - c.criuVersion, err = parseCriuVersion(c.criuPath) - if err != nil { - return err - } - return compareCriuVersion(c.criuVersion, minVersion) } @@ -876,26 +811,6 @@ func (c *linuxContainer) addMaskPaths(req *criurpc.CriuReq) error { return nil } -func waitForCriuLazyServer(r *os.File, status string) error { - - data := make([]byte, 1) - _, err := r.Read(data) - if err != nil { - return err - } - fd, err := os.OpenFile(status, os.O_TRUNC|os.O_WRONLY, os.ModeAppend) - if err != nil { - return err - } - _, err = fd.Write(data) - if err != nil { - return err - } - fd.Close() - - return nil -} - func (c *linuxContainer) handleCriuConfigurationFile(rpcOpts *criurpc.CriuOpts) { // CRIU will evaluate a configuration starting with release 3.11. // Settings in the configuration file will overwrite RPC settings. @@ -922,6 +837,78 @@ func (c *linuxContainer) handleCriuConfigurationFile(rpcOpts *criurpc.CriuOpts) } } +func (c *linuxContainer) criuSupportsExtNS(t configs.NamespaceType) bool { + var minVersion int + switch t { + case configs.NEWNET: + // CRIU supports different external namespace with different released CRIU versions. + // For network namespaces to work we need at least criu 3.11.0 => 31100. + minVersion = 31100 + case configs.NEWPID: + // For PID namespaces criu 31500 is needed. + minVersion = 31500 + default: + return false + } + return c.checkCriuVersion(minVersion) == nil +} + +func (c *linuxContainer) criuNsToKey(t configs.NamespaceType) string { + return "extRoot" + strings.Title(configs.NsName(t)) + "NS" +} + +func (c *linuxContainer) handleCheckpointingExternalNamespaces(rpcOpts *criurpc.CriuOpts, t configs.NamespaceType) error { + if !c.criuSupportsExtNS(t) { + return nil + } + + nsPath := c.config.Namespaces.PathOf(t) + if nsPath == "" { + return nil + } + // CRIU expects the information about an external namespace + // like this: --external []: + // This is always 'extRootNS'. + var ns unix.Stat_t + if err := unix.Stat(nsPath, &ns); err != nil { + return err + } + criuExternal := fmt.Sprintf("%s[%d]:%s", configs.NsName(t), ns.Ino, c.criuNsToKey(t)) + rpcOpts.External = append(rpcOpts.External, criuExternal) + + return nil +} + +func (c *linuxContainer) handleRestoringExternalNamespaces(rpcOpts *criurpc.CriuOpts, extraFiles *[]*os.File, t configs.NamespaceType) error { + if !c.criuSupportsExtNS(t) { + return nil + } + + nsPath := c.config.Namespaces.PathOf(t) + if nsPath == "" { + return nil + } + // CRIU wants the information about an existing namespace + // like this: --inherit-fd fd[]: + // The needs to be the same as during checkpointing. + // We are always using 'extRootNS' as the key in this. + nsFd, err := os.Open(nsPath) + if err != nil { + logrus.Errorf("If a specific network namespace is defined it must exist: %s", err) + return fmt.Errorf("Requested network namespace %v does not exist", nsPath) + } + inheritFd := new(criurpc.InheritFd) + inheritFd.Key = proto.String(c.criuNsToKey(t)) + // The offset of four is necessary because 0, 1, 2 and 3 is already + // used by stdin, stdout, stderr, 'criu swrk' socket. + inheritFd.Fd = proto.Int32(int32(4 + len(*extraFiles))) + rpcOpts.InheritFd = append(rpcOpts.InheritFd, inheritFd) + // All open FDs need to be transferred to CRIU via extraFiles + *extraFiles = append(*extraFiles, nsFd) + + return nil +} + func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { c.m.Lock() defer c.m.Unlock() @@ -932,13 +919,13 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { // support for doing unprivileged dumps, but the setup of // rootless containers might make this complicated. - // criu 1.5.2 => 10502 - if err := c.checkCriuVersion(10502); err != nil { + // We are relying on the CRIU version RPC which was introduced with CRIU 3.0.0 + if err := c.checkCriuVersion(30000); err != nil { return err } if criuOpts.ImagesDirectory == "" { - return fmt.Errorf("invalid directory to save checkpoint") + return errors.New("invalid directory to save checkpoint") } // Since a container can be C/R'ed multiple times, @@ -995,30 +982,22 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { // will expect that the namespace exists during restore. // This basically means that CRIU will ignore the namespace // and expect to be setup correctly. - nsPath := c.config.Namespaces.PathOf(configs.NEWNET) - if nsPath != "" { - // For this to work we need at least criu 3.11.0 => 31100. - // As there was already a successful version check we will - // not error out if it fails. runc will just behave as it used - // to do and ignore external network namespaces. - err := c.checkCriuVersion(31100) - if err == nil { - // CRIU expects the information about an external namespace - // like this: --external net[]: - // This is always 'extRootNetNS'. - var netns syscall.Stat_t - err = syscall.Stat(nsPath, &netns) - if err != nil { - return err - } - criuExternal := fmt.Sprintf("net[%d]:extRootNetNS", netns.Ino) - rpcOpts.External = append(rpcOpts.External, criuExternal) - } + if err := c.handleCheckpointingExternalNamespaces(&rpcOpts, configs.NEWNET); err != nil { + return err } - fcg := c.cgroupManager.GetPaths()["freezer"] - if fcg != "" { - rpcOpts.FreezeCgroup = proto.String(fcg) + // Same for possible external PID namespaces + if err := c.handleCheckpointingExternalNamespaces(&rpcOpts, configs.NEWPID); err != nil { + return err + } + + // CRIU can use cgroup freezer; when rpcOpts.FreezeCgroup + // is not set, CRIU uses ptrace() to pause the processes. + // Note cgroup v2 freezer is only supported since CRIU release 3.14. + if !cgroups.IsCgroup2UnifiedMode() || c.checkCriuVersion(31400) == nil { + if fcg := c.cgroupManager.Path("freezer"); fcg != "" { + rpcOpts.FreezeCgroup = proto.String(fcg) + } } // append optional criu opts, e.g., page-server and port @@ -1037,10 +1016,6 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { // append optional manage cgroups mode if criuOpts.ManageCgroupsMode != 0 { - // criu 1.7 => 10700 - if err := c.checkCriuVersion(10700); err != nil { - return err - } mode := criurpc.CriuCgMode(criuOpts.ManageCgroupsMode) rpcOpts.ManageCgroupsMode = &mode } @@ -1059,36 +1034,53 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { } else { t = criurpc.CriuReqType_DUMP } - req := &criurpc.CriuReq{ - Type: &t, - Opts: &rpcOpts, - } if criuOpts.LazyPages { // lazy migration requested; check if criu supports it feat := criurpc.CriuFeatures{ LazyPages: proto.Bool(true), } - if err := c.checkCriuFeatures(criuOpts, &rpcOpts, &feat); err != nil { return err } - statusRead, statusWrite, err := os.Pipe() - if err != nil { - return err + if fd := criuOpts.StatusFd; fd != -1 { + // check that the FD is valid + flags, err := unix.FcntlInt(uintptr(fd), unix.F_GETFL, 0) + if err != nil { + return fmt.Errorf("invalid --status-fd argument %d: %w", fd, err) + } + // and writable + if flags&unix.O_WRONLY == 0 { + return fmt.Errorf("invalid --status-fd argument %d: not writable", fd) + } + + if c.checkCriuVersion(31500) != nil { + // For criu 3.15+, use notifications (see case "status-ready" + // in criuNotifications). Otherwise, rely on criu status fd. + rpcOpts.StatusFd = proto.Int32(int32(fd)) + } } - rpcOpts.StatusFd = proto.Int32(int32(statusWrite.Fd())) - go waitForCriuLazyServer(statusRead, criuOpts.StatusFd) } - //no need to dump these information in pre-dump + req := &criurpc.CriuReq{ + Type: &t, + Opts: &rpcOpts, + } + + // no need to dump all this in pre-dump if !criuOpts.PreDump { + hasCgroupns := c.config.Namespaces.Contains(configs.NEWCGROUP) for _, m := range c.config.Mounts { switch m.Device { case "bind": c.addCriuDumpMount(req, m) case "cgroup": + if cgroups.IsCgroup2UnifiedMode() || hasCgroupns { + // real mount(s) + continue + } + // a set of "external" bind mounts binds, err := getCgroupMounts(m) if err != nil { return err @@ -1120,7 +1112,7 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { } } - err = c.criuSwrk(nil, req, criuOpts, false, nil) + err = c.criuSwrk(nil, req, criuOpts, nil) if err != nil { return err } @@ -1166,7 +1158,14 @@ func (c *linuxContainer) restoreNetwork(req *criurpc.CriuReq, criuOpts *CriuOpts func (c *linuxContainer) makeCriuRestoreMountpoints(m *configs.Mount) error { switch m.Device { case "cgroup": - // Do nothing for cgroup, CRIU should handle it + // No mount point(s) need to be created: + // + // * for v1, mount points are saved by CRIU because + // /sys/fs/cgroup is a tmpfs mount + // + // * for v2, /sys/fs/cgroup is a real mount, but + // the mountpoint appears as soon as /sys is mounted + return nil case "bind": // The prepareBindMount() function checks if source // exists. So it cannot be used for other filesystem types. @@ -1174,7 +1173,7 @@ func (c *linuxContainer) makeCriuRestoreMountpoints(m *configs.Mount) error { return err } default: - // for all other file-systems just create the mountpoints + // for all other filesystems just create the mountpoints dest, err := securejoin.SecureJoin(c.config.Rootfs, m.Destination) if err != nil { return err @@ -1195,10 +1194,10 @@ func (c *linuxContainer) makeCriuRestoreMountpoints(m *configs.Mount) error { func isPathInPrefixList(path string, prefix []string) bool { for _, p := range prefix { if strings.HasPrefix(path, p+"/") { - return false + return true } } - return true + return false } // prepareCriuRestoreMounts tries to set up the rootfs of the @@ -1220,7 +1219,7 @@ func (c *linuxContainer) prepareCriuRestoreMounts(mounts []*configs.Mount) error // if the mountpoints are not on a tmpfs, as CRIU will // restore the complete tmpfs content from its checkpoint. for _, m := range mounts { - if isPathInPrefixList(m.Destination, tmpfs) { + if !isPathInPrefixList(m.Destination, tmpfs) { if err := c.makeCriuRestoreMountpoints(m); err != nil { return err } @@ -1240,8 +1239,8 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { // TODO(avagin): Figure out how to make this work nicely. CRIU doesn't have // support for unprivileged restore at the moment. - // criu 1.5.2 => 10502 - if err := c.checkCriuVersion(10502); err != nil { + // We are relying on the CRIU version RPC which was introduced with CRIU 3.0.0 + if err := c.checkCriuVersion(30000); err != nil { return err } if criuOpts.WorkDirectory == "" { @@ -1258,7 +1257,7 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { } defer workDir.Close() if criuOpts.ImagesDirectory == "" { - return fmt.Errorf("invalid directory to restore checkpoint") + return errors.New("invalid directory to restore checkpoint") } imageDir, err := os.Open(criuOpts.ImagesDirectory) if err != nil { @@ -1313,33 +1312,13 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { // Same as during checkpointing. If the container has a specific network namespace // assigned to it, this now expects that the checkpoint will be restored in a // already created network namespace. - nsPath := c.config.Namespaces.PathOf(configs.NEWNET) - if nsPath != "" { - // For this to work we need at least criu 3.11.0 => 31100. - // As there was already a successful version check we will - // not error out if it fails. runc will just behave as it used - // to do and ignore external network namespaces. - err := c.checkCriuVersion(31100) - if err == nil { - // CRIU wants the information about an existing network namespace - // like this: --inherit-fd fd[]: - // The needs to be the same as during checkpointing. - // We are always using 'extRootNetNS' as the key in this. - netns, err := os.Open(nsPath) - defer netns.Close() - if err != nil { - logrus.Errorf("If a specific network namespace is defined it must exist: %s", err) - return fmt.Errorf("Requested network namespace %v does not exist", nsPath) - } - inheritFd := new(criurpc.InheritFd) - inheritFd.Key = proto.String("extRootNetNS") - // The offset of four is necessary because 0, 1, 2 and 3 is already - // used by stdin, stdout, stderr, 'criu swrk' socket. - inheritFd.Fd = proto.Int32(int32(4 + len(extraFiles))) - req.Opts.InheritFd = append(req.Opts.InheritFd, inheritFd) - // All open FDs need to be transferred to CRIU via extraFiles - extraFiles = append(extraFiles, netns) - } + if err := c.handleRestoringExternalNamespaces(req.Opts, &extraFiles, configs.NEWNET); err != nil { + return err + } + + // Same for PID namespaces. + if err := c.handleRestoringExternalNamespaces(req.Opts, &extraFiles, configs.NEWPID); err != nil { + return err } // This will modify the rootfs of the container in the same way runc @@ -1348,11 +1327,16 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { return err } + hasCgroupns := c.config.Namespaces.Contains(configs.NEWCGROUP) for _, m := range c.config.Mounts { switch m.Device { case "bind": c.addCriuRestoreMount(req, m) case "cgroup": + if cgroups.IsCgroup2UnifiedMode() || hasCgroupns { + continue + } + // cgroup v1 is a set of bind mounts, unless cgroupns is used binds, err := getCgroupMounts(m) if err != nil { return err @@ -1379,10 +1363,6 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { // append optional manage cgroups mode if criuOpts.ManageCgroupsMode != 0 { - // criu 1.7 => 10700 - if err := c.checkCriuVersion(10700); err != nil { - return err - } mode := criurpc.CriuCgMode(criuOpts.ManageCgroupsMode) req.Opts.ManageCgroupsMode = &mode } @@ -1406,10 +1386,22 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { req.Opts.InheritFd = append(req.Opts.InheritFd, inheritFd) } } - return c.criuSwrk(process, req, criuOpts, true, extraFiles) + err = c.criuSwrk(process, req, criuOpts, extraFiles) + + // Now that CRIU is done let's close all opened FDs CRIU needed. + for _, fd := range extraFiles { + fd.Close() + } + + return err } func (c *linuxContainer) criuApplyCgroups(pid int, req *criurpc.CriuReq) error { + // need to apply cgroups only on restore + if req.GetType() != criurpc.CriuReqType_RESTORE { + return nil + } + // XXX: Do we need to deal with this case? AFAIK criu still requires root. if err := c.cgroupManager.Apply(pid); err != nil { return err @@ -1419,6 +1411,11 @@ func (c *linuxContainer) criuApplyCgroups(pid int, req *criurpc.CriuReq) error { return newSystemError(err) } + if cgroups.IsCgroup2UnifiedMode() { + return nil + } + // the stuff below is cgroupv1-specific + path := fmt.Sprintf("/proc/%d/cgroup", pid) cgroupsPaths, err := cgroups.ParseCgroupFile(path) if err != nil { @@ -1436,7 +1433,7 @@ func (c *linuxContainer) criuApplyCgroups(pid int, req *criurpc.CriuReq) error { return nil } -func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts *CriuOpts, applyCgroups bool, extraFiles []*os.File) error { +func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts *CriuOpts, extraFiles []*os.File) error { fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_SEQPACKET|unix.SOCK_CLOEXEC, 0) if err != nil { return err @@ -1484,26 +1481,29 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts * if err := cmd.Start(); err != nil { return err } + // we close criuServer so that even if CRIU crashes or unexpectedly exits, runc will not hang. criuServer.Close() + // cmd.Process will be replaced by a restored init. + criuProcess := cmd.Process + var criuProcessState *os.ProcessState defer func() { - criuClientCon.Close() - _, err := cmd.Process.Wait() - if err != nil { - return + if criuProcessState == nil { + criuClientCon.Close() + _, err := criuProcess.Wait() + if err != nil { + logrus.Warnf("wait on criuProcess returned %v", err) + } } }() - if applyCgroups { - err := c.criuApplyCgroups(cmd.Process.Pid, req) - if err != nil { - return err - } + if err := c.criuApplyCgroups(criuProcess.Pid, req); err != nil { + return err } var extFds []string if process != nil { - extFds, err = getPipeFds(cmd.Process.Pid) + extFds, err = getPipeFds(criuProcess.Pid) if err != nil { return err } @@ -1542,14 +1542,23 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts * oob := make([]byte, 4096) for true { n, oobn, _, _, err := criuClientCon.ReadMsgUnix(buf, oob) + if req.Opts != nil && req.Opts.StatusFd != nil { + // Close status_fd as soon as we got something back from criu, + // assuming it has consumed (reopened) it by this time. + // Otherwise it will might be left open forever and whoever + // is waiting on it will wait forever. + fd := int(*req.Opts.StatusFd) + _ = unix.Close(fd) + req.Opts.StatusFd = nil + } if err != nil { return err } if n == 0 { - return fmt.Errorf("unexpected EOF") + return errors.New("unexpected EOF") } if n == len(buf) { - return fmt.Errorf("buffer is too small") + return errors.New("buffer is too small") } resp := new(criurpc.CriuResp) @@ -1559,25 +1568,16 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts * } if !resp.GetSuccess() { typeString := req.GetType().String() - if typeString == "VERSION" { - // If the VERSION RPC fails this probably means that the CRIU - // version is too old for this RPC. Just return 'nil'. - return nil - } return fmt.Errorf("criu failed: type %s errno %d\nlog file: %s", typeString, resp.GetCrErrno(), logPath) } t := resp.GetType() switch { - case t == criurpc.CriuReqType_VERSION: - logrus.Debugf("CRIU version: %s", resp) - criuVersionRPC = resp.GetVersion() - break case t == criurpc.CriuReqType_FEATURE_CHECK: logrus.Debugf("Feature check says: %s", resp) criuFeatures = resp.GetFeatures() case t == criurpc.CriuReqType_NOTIFY: - if err := c.criuNotifications(resp, process, opts, extFds, oob[:oobn]); err != nil { + if err := c.criuNotifications(resp, process, cmd, opts, extFds, oob[:oobn]); err != nil { return err } t = criurpc.CriuReqType_NOTIFY @@ -1607,7 +1607,7 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts * criuClientCon.CloseWrite() // cmd.Wait() waits cmd.goroutines which are used for proxying file descriptors. // Here we want to wait only the CRIU process. - st, err := cmd.Process.Wait() + criuProcessState, err = criuProcess.Wait() if err != nil { return err } @@ -1619,8 +1619,8 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts * // and not the whole series of pre-dump, pre-dump, ...m, dump // If we got the message CriuReqType_PRE_DUMP it means // CRIU was successful and we need to forcefully stop CRIU - if !st.Success() && *req.Type != criurpc.CriuReqType_PRE_DUMP { - return fmt.Errorf("criu failed: %s\nlog file: %s", st.String(), logPath) + if !criuProcessState.Success() && *req.Type != criurpc.CriuReqType_PRE_DUMP { + return fmt.Errorf("criu failed: %s\nlog file: %s", criuProcessState.String(), logPath) } return nil } @@ -1653,43 +1653,53 @@ func unlockNetwork(config *configs.Config) error { return nil } -func (c *linuxContainer) criuNotifications(resp *criurpc.CriuResp, process *Process, opts *CriuOpts, fds []string, oob []byte) error { +func (c *linuxContainer) criuNotifications(resp *criurpc.CriuResp, process *Process, cmd *exec.Cmd, opts *CriuOpts, fds []string, oob []byte) error { notify := resp.GetNotify() if notify == nil { return fmt.Errorf("invalid response: %s", resp.String()) } - logrus.Debugf("notify: %s\n", notify.GetScript()) - switch { - case notify.GetScript() == "post-dump": + script := notify.GetScript() + logrus.Debugf("notify: %s\n", script) + switch script { + case "post-dump": f, err := os.Create(filepath.Join(c.root, "checkpoint")) if err != nil { return err } f.Close() - case notify.GetScript() == "network-unlock": + case "network-unlock": if err := unlockNetwork(c.config); err != nil { return err } - case notify.GetScript() == "network-lock": + case "network-lock": if err := lockNetwork(c.config); err != nil { return err } - case notify.GetScript() == "setup-namespaces": + case "setup-namespaces": if c.config.Hooks != nil { s, err := c.currentOCIState() if err != nil { return nil } s.Pid = int(notify.GetPid()) - for i, hook := range c.config.Hooks.Prestart { - if err := hook.Run(s); err != nil { - return newSystemErrorWithCausef(err, "running prestart hook %d", i) - } + + if err := c.config.Hooks[configs.Prestart].RunHooks(s); err != nil { + return err + } + if err := c.config.Hooks[configs.CreateRuntime].RunHooks(s); err != nil { + return err } } - case notify.GetScript() == "post-restore": + case "post-restore": pid := notify.GetPid() - r, err := newRestoredProcess(int(pid), fds) + + p, err := os.FindProcess(int(pid)) + if err != nil { + return err + } + cmd.Process = p + + r, err := newRestoredProcess(cmd, fds) if err != nil { return err } @@ -1710,7 +1720,7 @@ func (c *linuxContainer) criuNotifications(resp *criurpc.CriuResp, process *Proc logrus.Error(err) } } - case notify.GetScript() == "orphan-pts-master": + case "orphan-pts-master": scm, err := unix.ParseSocketControlMessage(oob) if err != nil { return err @@ -1727,6 +1737,16 @@ func (c *linuxContainer) criuNotifications(resp *criurpc.CriuResp, process *Proc if err := utils.SendFd(process.ConsoleSocket, master.Name(), master.Fd()); err != nil { return err } + case "status-ready": + if opts.StatusFd != -1 { + // write \0 to status fd to notify that lazy page server is ready + _, err := unix.Write(opts.StatusFd, []byte{0}) + if err != nil { + logrus.Warnf("can't write \\0 to status fd: %v", err) + } + _ = unix.Close(opts.StatusFd) + opts.StatusFd = -1 + } } return nil } @@ -1746,13 +1766,30 @@ func (c *linuxContainer) updateState(process parentProcess) (*State, error) { return state, nil } -func (c *linuxContainer) saveState(s *State) error { - f, err := os.Create(filepath.Join(c.root, stateFilename)) +func (c *linuxContainer) saveState(s *State) (retErr error) { + tmpFile, err := ioutil.TempFile(c.root, "state-") if err != nil { return err } - defer f.Close() - return utils.WriteJSON(f, s) + + defer func() { + if retErr != nil { + tmpFile.Close() + os.Remove(tmpFile.Name()) + } + }() + + err = utils.WriteJSON(tmpFile, s) + if err != nil { + return err + } + err = tmpFile.Close() + if err != nil { + return err + } + + stateFilePath := filepath.Join(c.root, stateFilename) + return os.Rename(tmpFile.Name(), stateFilePath) } func (c *linuxContainer) deleteState() error { @@ -1778,10 +1815,7 @@ func (c *linuxContainer) refreshState() error { if paused { return c.state.transition(&pausedState{c: c}) } - t, err := c.runType() - if err != nil { - return err - } + t := c.runType() switch t { case Created: return c.state.transition(&createdState{c: c}) @@ -1791,48 +1825,32 @@ func (c *linuxContainer) refreshState() error { return c.state.transition(&stoppedState{c: c}) } -func (c *linuxContainer) runType() (Status, error) { +func (c *linuxContainer) runType() Status { if c.initProcess == nil { - return Stopped, nil + return Stopped } pid := c.initProcess.pid() stat, err := system.Stat(pid) if err != nil { - return Stopped, nil + return Stopped } if stat.StartTime != c.initProcessStartTime || stat.State == system.Zombie || stat.State == system.Dead { - return Stopped, nil + return Stopped } // We'll create exec fifo and blocking on it after container is created, // and delete it after start container. if _, err := os.Stat(filepath.Join(c.root, execFifoFilename)); err == nil { - return Created, nil + return Created } - return Running, nil + return Running } func (c *linuxContainer) isPaused() (bool, error) { - fcg := c.cgroupManager.GetPaths()["freezer"] - if fcg == "" { - // A container doesn't have a freezer cgroup - return false, nil - } - pausedState := "FROZEN" - filename := "freezer.state" - if cgroups.IsCgroup2UnifiedMode() { - filename = "cgroup.freeze" - pausedState = "1" - } - - data, err := ioutil.ReadFile(filepath.Join(fcg, filename)) + state, err := c.cgroupManager.GetFreezerState() if err != nil { - // If freezer cgroup is not mounted, the container would just be not paused. - if os.IsNotExist(err) || err == syscall.ENODEV { - return false, nil - } - return false, newSystemErrorWithCause(err, "checking if container is paused") + return false, err } - return bytes.Equal(bytes.TrimSpace(data), []byte(pausedState)), nil + return state == configs.Frozen, nil } func (c *linuxContainer) currentState() (*State, error) { @@ -1893,7 +1911,7 @@ func (c *linuxContainer) currentOCIState() (*specs.State, error) { if err != nil { return nil, err } - state.Status = status.String() + state.Status = specs.ContainerState(status.String()) if status != Stopped { if c.initProcess != nil { state.Pid = c.initProcess.pid() diff --git a/vendor/github.com/opencontainers/runc/libcontainer/criu_opts_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/criu_opts_linux.go index a2e344fc4b6..1d119246d1e 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/criu_opts_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/criu_opts_linux.go @@ -36,5 +36,5 @@ type CriuOpts struct { EmptyNs uint32 // don't c/r properties for namespace from this mask AutoDedup bool // auto deduplication for incremental dumps LazyPages bool // restore memory pages lazily using userfaultfd - StatusFd string // fd for feedback when lazy server is ready + StatusFd int // fd for feedback when lazy server is ready } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/devices/devices.go b/vendor/github.com/opencontainers/runc/libcontainer/devices/devices.go index 5dabe06cef5..79f89c2d775 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/devices/devices.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/devices/devices.go @@ -31,33 +31,33 @@ func DeviceFromPath(path, permissions string) (*configs.Device, error) { } var ( + devType configs.DeviceType + mode = stat.Mode devNumber = uint64(stat.Rdev) major = unix.Major(devNumber) minor = unix.Minor(devNumber) ) - if major == 0 { + switch mode & unix.S_IFMT { + case unix.S_IFBLK: + devType = configs.BlockDevice + case unix.S_IFCHR: + devType = configs.CharDevice + case unix.S_IFIFO: + devType = configs.FifoDevice + default: return nil, ErrNotADevice } - - var ( - devType rune - mode = stat.Mode - ) - switch { - case mode&unix.S_IFBLK == unix.S_IFBLK: - devType = 'b' - case mode&unix.S_IFCHR == unix.S_IFCHR: - devType = 'c' - } return &configs.Device{ - Type: devType, - Path: path, - Major: int64(major), - Minor: int64(minor), - Permissions: permissions, - FileMode: os.FileMode(mode), - Uid: stat.Uid, - Gid: stat.Gid, + DeviceRule: configs.DeviceRule{ + Type: devType, + Major: int64(major), + Minor: int64(minor), + Permissions: configs.DevicePermissions(permissions), + }, + Path: path, + FileMode: os.FileMode(mode), + Uid: stat.Uid, + Gid: stat.Gid, }, nil } @@ -104,6 +104,9 @@ func GetDevices(path string) ([]*configs.Device, error) { } return nil, err } + if device.Type == configs.FifoDevice { + continue + } out = append(out, device) } return out, nil diff --git a/vendor/github.com/opencontainers/runc/libcontainer/factory_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/factory_linux.go index 437633c6e49..59548ef8819 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/factory_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/factory_linux.go @@ -11,7 +11,8 @@ import ( "runtime/debug" "strconv" - "github.com/cyphar/filepath-securejoin" + securejoin "github.com/cyphar/filepath-securejoin" + "github.com/moby/sys/mountinfo" "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fs" "github.com/opencontainers/runc/libcontainer/cgroups/fs2" @@ -19,7 +20,6 @@ import ( "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/configs/validate" "github.com/opencontainers/runc/libcontainer/intelrdt" - "github.com/opencontainers/runc/libcontainer/mount" "github.com/opencontainers/runc/libcontainer/utils" "github.com/pkg/errors" @@ -50,28 +50,60 @@ func InitArgs(args ...string) func(*LinuxFactory) error { } } -// SystemdCgroups is an options func to configure a LinuxFactory to return -// containers that use systemd to create and manage cgroups. -func SystemdCgroups(l *LinuxFactory) error { - systemdCgroupsManager, err := systemd.NewSystemdCgroupsManager() - if err != nil { - return err - } - l.NewCgroupsManager = systemdCgroupsManager - return nil -} - func getUnifiedPath(paths map[string]string) string { - unifiedPath := "" + path := "" for k, v := range paths { - if unifiedPath == "" { - unifiedPath = v - } else if v != unifiedPath { - panic(errors.Errorf("expected %q path to be unified path %q, got %q", k, unifiedPath, v)) + if path == "" { + path = v + } else if v != path { + panic(errors.Errorf("expected %q path to be unified path %q, got %q", k, path, v)) } } // can be empty - return unifiedPath + if path != "" { + if filepath.Clean(path) != path || !filepath.IsAbs(path) { + panic(errors.Errorf("invalid dir path %q", path)) + } + } + + return path +} + +func systemdCgroupV2(l *LinuxFactory, rootless bool) error { + l.NewCgroupsManager = func(config *configs.Cgroup, paths map[string]string) cgroups.Manager { + return systemd.NewUnifiedManager(config, getUnifiedPath(paths), rootless) + } + return nil +} + +// SystemdCgroups is an options func to configure a LinuxFactory to return +// containers that use systemd to create and manage cgroups. +func SystemdCgroups(l *LinuxFactory) error { + if !systemd.IsRunningSystemd() { + return fmt.Errorf("systemd not running on this host, can't use systemd as cgroups manager") + } + + if cgroups.IsCgroup2UnifiedMode() { + return systemdCgroupV2(l, false) + } + + l.NewCgroupsManager = func(config *configs.Cgroup, paths map[string]string) cgroups.Manager { + return systemd.NewLegacyManager(config, paths) + } + + return nil +} + +// RootlessSystemdCgroups is rootless version of SystemdCgroups. +func RootlessSystemdCgroups(l *LinuxFactory) error { + if !systemd.IsRunningSystemd() { + return fmt.Errorf("systemd not running on this host, can't use systemd as cgroups manager") + } + + if !cgroups.IsCgroup2UnifiedMode() { + return fmt.Errorf("cgroup v2 not enabled on this host, can't use systemd (rootless) as cgroups manager") + } + return systemdCgroupV2(l, true) } func cgroupfs2(l *LinuxFactory, rootless bool) error { @@ -85,20 +117,21 @@ func cgroupfs2(l *LinuxFactory, rootless bool) error { return nil } +func cgroupfs(l *LinuxFactory, rootless bool) error { + if cgroups.IsCgroup2UnifiedMode() { + return cgroupfs2(l, rootless) + } + l.NewCgroupsManager = func(config *configs.Cgroup, paths map[string]string) cgroups.Manager { + return fs.NewManager(config, paths, rootless) + } + return nil +} + // Cgroupfs is an options func to configure a LinuxFactory to return containers // that use the native cgroups filesystem implementation to create and manage // cgroups. func Cgroupfs(l *LinuxFactory) error { - if cgroups.IsCgroup2UnifiedMode() { - return cgroupfs2(l, false) - } - l.NewCgroupsManager = func(config *configs.Cgroup, paths map[string]string) cgroups.Manager { - return &fs.Manager{ - Cgroups: config, - Paths: paths, - } - } - return nil + return cgroupfs(l, false) } // RootlessCgroupfs is an options func to configure a LinuxFactory to return @@ -108,17 +141,7 @@ func Cgroupfs(l *LinuxFactory) error { // during rootless container (including euid=0 in userns) setup (while still allowing cgroup usage if // they've been set up properly). func RootlessCgroupfs(l *LinuxFactory) error { - if cgroups.IsCgroup2UnifiedMode() { - return cgroupfs2(l, true) - } - l.NewCgroupsManager = func(config *configs.Cgroup, paths map[string]string) cgroups.Manager { - return &fs.Manager{ - Cgroups: config, - Rootless: true, - Paths: paths, - } - } - return nil + return cgroupfs(l, true) } // IntelRdtfs is an options func to configure a LinuxFactory to return @@ -137,7 +160,7 @@ func IntelRdtFs(l *LinuxFactory) error { // TmpfsRoot is an option func to mount LinuxFactory.Root to tmpfs. func TmpfsRoot(l *LinuxFactory) error { - mounted, err := mount.Mounted(l.Root) + mounted, err := mountinfo.Mounted(l.Root) if err != nil { return err } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/generic_error.go b/vendor/github.com/opencontainers/runc/libcontainer/generic_error.go index 6e7de2fe7e0..d185ebd8989 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/generic_error.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/generic_error.go @@ -80,7 +80,7 @@ func (e *genericError) Error() string { return e.Message } frame := e.Stack.Frames[0] - return fmt.Sprintf("%s:%d: %s caused %q", frame.File, frame.Line, e.Cause, e.Message) + return fmt.Sprintf("%s:%d: %s caused: %s", frame.File, frame.Line, e.Cause, e.Message) } func (e *genericError) Code() ErrorCode { diff --git a/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go index c1b1560020e..f2dc17e00e9 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go @@ -10,7 +10,6 @@ import ( "net" "os" "strings" - "syscall" // only for Errno "unsafe" "golang.org/x/sys/unix" @@ -21,6 +20,7 @@ import ( "github.com/opencontainers/runc/libcontainer/system" "github.com/opencontainers/runc/libcontainer/user" "github.com/opencontainers/runc/libcontainer/utils" + "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/vishvananda/netlink" @@ -68,6 +68,7 @@ type initConfig struct { ConsoleHeight uint16 `json:"console_height"` RootlessEUID bool `json:"rootless_euid,omitempty"` RootlessCgroups bool `json:"rootless_cgroups,omitempty"` + SpecState *specs.State `json:"spec_state,omitempty"` } type initer interface { @@ -183,6 +184,9 @@ func setupConsole(socket *os.File, config *initConfig, mount bool) error { return err } + // After we return from here, we don't need the console anymore. + defer pty.Close() + if config.ConsoleHeight != 0 && config.ConsoleWidth != 0 { err = pty.Resize(console.WinSize{ Height: config.ConsoleHeight, @@ -194,9 +198,6 @@ func setupConsole(socket *os.File, config *initConfig, mount bool) error { } } - // After we return from here, we don't need the console anymore. - defer pty.Close() - // Mount the console inside our rootfs. if mount { if err := mountConsole(slavePath); err != nil { @@ -272,10 +273,10 @@ func setupUser(config *initConfig) error { // Rather than just erroring out later in setuid(2) and setgid(2), check // that the user is mapped here. if _, err := config.Config.HostUID(execUser.Uid); err != nil { - return fmt.Errorf("cannot set uid to unmapped user in user namespace") + return errors.New("cannot set uid to unmapped user in user namespace") } if _, err := config.Config.HostGID(execUser.Gid); err != nil { - return fmt.Errorf("cannot set gid to unmapped user in user namespace") + return errors.New("cannot set gid to unmapped user in user namespace") } if config.RootlessEUID { @@ -284,7 +285,7 @@ func setupUser(config *initConfig) error { // this check earlier, but if libcontainer.Process.User was typesafe // this might work. if len(addGroups) > 0 { - return fmt.Errorf("cannot set any additional groups in a rootless container") + return errors.New("cannot set any additional groups in a rootless container") } } @@ -455,7 +456,7 @@ func isWaitable(pid int) (bool, error) { // isNoChildren returns true if err represents a unix.ECHILD (formerly syscall.ECHILD) false otherwise func isNoChildren(err error) bool { switch err := err.(type) { - case syscall.Errno: + case unix.Errno: if err == unix.ECHILD { return true } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/cmt.go b/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/cmt.go new file mode 100644 index 00000000000..5c406e10207 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/cmt.go @@ -0,0 +1,22 @@ +package intelrdt + +var ( + cmtEnabled bool +) + +// Check if Intel RDT/CMT is enabled. +func IsCMTEnabled() bool { + return cmtEnabled +} + +func getCMTNumaNodeStats(numaPath string) (*CMTNumaNodeStats, error) { + stats := &CMTNumaNodeStats{} + + llcOccupancy, err := getIntelRdtParamUint(numaPath, "llc_occupancy") + if err != nil { + return nil, err + } + stats.LLCOccupancy = llcOccupancy + + return stats, nil +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/intelrdt.go b/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/intelrdt.go index 0071ce75576..5b19d55a2d7 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/intelrdt.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/intelrdt.go @@ -55,6 +55,10 @@ import ( * | | |-- cbm_mask * | | |-- min_cbm_bits * | | |-- num_closids + * | |-- L3_MON + * | | |-- max_threshold_occupancy + * | | |-- mon_features + * | | |-- num_rmids * | |-- MB * | |-- bandwidth_gran * | |-- delay_linear @@ -191,8 +195,7 @@ type intelRdtData struct { // Check if Intel RDT sub-features are enabled in init() func init() { // 1. Check if hardware and kernel support Intel RDT sub-features - // "cat_l3" flag for CAT and "mba" flag for MBA - isCatFlagSet, isMbaFlagSet, err := parseCpuInfoFile("/proc/cpuinfo") + flagsSet, err := parseCpuInfoFile("/proc/cpuinfo") if err != nil { return } @@ -207,7 +210,7 @@ func init() { // "resource control" filesystem. Intel RDT sub-features can be // selectively disabled or enabled by kernel command line // (e.g., rdt=!l3cat,mba) in 4.14 and newer kernel - if isCatFlagSet { + if flagsSet.CAT { if _, err := os.Stat(filepath.Join(intelRdtRoot, "info", "L3")); err == nil { isCatEnabled = true } @@ -217,11 +220,23 @@ func init() { // MBA should be enabled because MBA Software Controller // depends on MBA isMbaEnabled = true - } else if isMbaFlagSet { + } else if flagsSet.MBA { if _, err := os.Stat(filepath.Join(intelRdtRoot, "info", "MB")); err == nil { isMbaEnabled = true } } + + if flagsSet.MBMTotal || flagsSet.MBMLocal { + if _, err := os.Stat(filepath.Join(intelRdtRoot, "info", "L3_MON")); err == nil { + mbmEnabled = true + cmtEnabled = true + } + + enabledMonFeatures, err = getMonFeatures(intelRdtRoot) + if err != nil { + return + } + } } // Return the mount point path of Intel RDT "resource control" filesysem @@ -298,40 +313,52 @@ func isIntelRdtMounted() bool { return true } -func parseCpuInfoFile(path string) (bool, bool, error) { - isCatFlagSet := false - isMbaFlagSet := false +type cpuInfoFlags struct { + CAT bool // Cache Allocation Technology + MBA bool // Memory Bandwidth Allocation + + // Memory Bandwidth Monitoring related. + MBMTotal bool + MBMLocal bool +} + +func parseCpuInfoFile(path string) (cpuInfoFlags, error) { + infoFlags := cpuInfoFlags{} f, err := os.Open(path) if err != nil { - return false, false, err + return infoFlags, err } defer f.Close() s := bufio.NewScanner(f) for s.Scan() { - if err := s.Err(); err != nil { - return false, false, err - } - line := s.Text() // Search "cat_l3" and "mba" flags in first "flags" line - if strings.Contains(line, "flags") { + if strings.HasPrefix(line, "flags") { flags := strings.Split(line, " ") // "cat_l3" flag for CAT and "mba" flag for MBA for _, flag := range flags { switch flag { case "cat_l3": - isCatFlagSet = true + infoFlags.CAT = true case "mba": - isMbaFlagSet = true + infoFlags.MBA = true + case "cqm_mbm_total": + infoFlags.MBMTotal = true + case "cqm_mbm_local": + infoFlags.MBMLocal = true } } - return isCatFlagSet, isMbaFlagSet, nil + return infoFlags, nil } } - return isCatFlagSet, isMbaFlagSet, nil + if err := s.Err(); err != nil { + return infoFlags, err + } + + return infoFlags, nil } func parseUint(s string, base, bitSize int) (uint64, error) { @@ -586,7 +613,8 @@ func (m *IntelRdtManager) GetStats() (*Stats, error) { schemaRootStrings := strings.Split(tmpRootStrings, "\n") // The L3 cache and memory bandwidth schemata in 'container_id' group - tmpStrings, err := getIntelRdtParamString(m.GetPath(), "schemata") + containerPath := m.GetPath() + tmpStrings, err := getIntelRdtParamString(containerPath, "schemata") if err != nil { return nil, err } @@ -638,6 +666,11 @@ func (m *IntelRdtManager) GetStats() (*Stats, error) { } } + err = getMonitoringStats(containerPath, stats) + if err != nil { + return nil, err + } + return stats, nil } @@ -758,7 +791,7 @@ type LastCmdError struct { } func (e *LastCmdError) Error() string { - return fmt.Sprintf(e.Err.Error() + ", last_cmd_status: " + e.LastCmdStatus) + return e.Err.Error() + ", last_cmd_status: " + e.LastCmdStatus } func NewLastCmdError(err error) error { diff --git a/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/mbm.go b/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/mbm.go new file mode 100644 index 00000000000..3730bab5644 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/mbm.go @@ -0,0 +1,34 @@ +// +build linux + +package intelrdt + +var ( + // The flag to indicate if Intel RDT/MBM is enabled + mbmEnabled bool +) + +// Check if Intel RDT/MBM is enabled. +func IsMBMEnabled() bool { + return mbmEnabled +} + +func getMBMNumaNodeStats(numaPath string) (*MBMNumaNodeStats, error) { + stats := &MBMNumaNodeStats{} + if enabledMonFeatures.mbmTotalBytes { + mbmTotalBytes, err := getIntelRdtParamUint(numaPath, "mbm_total_bytes") + if err != nil { + return nil, err + } + stats.MBMTotalBytes = mbmTotalBytes + } + + if enabledMonFeatures.mbmLocalBytes { + mbmLocalBytes, err := getIntelRdtParamUint(numaPath, "mbm_local_bytes") + if err != nil { + return nil, err + } + stats.MBMLocalBytes = mbmLocalBytes + } + + return stats, nil +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/monitoring.go b/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/monitoring.go new file mode 100644 index 00000000000..4ccc8eae050 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/monitoring.go @@ -0,0 +1,85 @@ +package intelrdt + +import ( + "bufio" + "github.com/sirupsen/logrus" + "io" + "io/ioutil" + "os" + "path/filepath" +) + +var ( + enabledMonFeatures monFeatures +) + +type monFeatures struct { + mbmTotalBytes bool + mbmLocalBytes bool + llcOccupancy bool +} + +func getMonFeatures(intelRdtRoot string) (monFeatures, error) { + file, err := os.Open(filepath.Join(intelRdtRoot, "info", "L3_MON", "mon_features")) + defer file.Close() + if err != nil { + return monFeatures{}, err + } + return parseMonFeatures(file) +} + +func parseMonFeatures(reader io.Reader) (monFeatures, error) { + scanner := bufio.NewScanner(reader) + + monFeatures := monFeatures{} + + for scanner.Scan() { + switch feature := scanner.Text(); feature { + case "mbm_total_bytes": + monFeatures.mbmTotalBytes = true + case "mbm_local_bytes": + monFeatures.mbmLocalBytes = true + case "llc_occupancy": + monFeatures.llcOccupancy = true + default: + logrus.Warnf("Unsupported Intel RDT monitoring feature: %s", feature) + } + } + + return monFeatures, scanner.Err() +} + +func getMonitoringStats(containerPath string, stats *Stats) error { + numaFiles, err := ioutil.ReadDir(filepath.Join(containerPath, "mon_data")) + if err != nil { + return err + } + + var mbmStats []MBMNumaNodeStats + var cmtStats []CMTNumaNodeStats + + for _, file := range numaFiles { + if file.IsDir() { + numaPath := filepath.Join(containerPath, "mon_data", file.Name()) + if IsMBMEnabled() { + numaMBMStats, err := getMBMNumaNodeStats(numaPath) + if err != nil { + return err + } + mbmStats = append(mbmStats, *numaMBMStats) + } + if IsCMTEnabled() { + numaCMTStats, err := getCMTNumaNodeStats(numaPath) + if err != nil { + return err + } + cmtStats = append(cmtStats, *numaCMTStats) + } + } + } + + stats.MBMStats = &mbmStats + stats.CMTStats = &cmtStats + + return err +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/stats.go b/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/stats.go index df5686f3b80..eeb0ee9f0d8 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/stats.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/stats.go @@ -15,6 +15,19 @@ type MemBwInfo struct { NumClosids uint64 `json:"num_closids,omitempty"` } +type MBMNumaNodeStats struct { + // The 'mbm_total_bytes' in 'container_id' group. + MBMTotalBytes uint64 `json:"mbm_total_bytes,omitempty"` + + // The 'mbm_local_bytes' in 'container_id' group. + MBMLocalBytes uint64 `json:"mbm_local_bytes,omitempty"` +} + +type CMTNumaNodeStats struct { + // The 'llc_occupancy' in 'container_id' group. + LLCOccupancy uint64 `json:"llc_occupancy,omitempty"` +} + type Stats struct { // The read-only L3 cache information L3CacheInfo *L3CacheInfo `json:"l3_cache_info,omitempty"` @@ -33,6 +46,12 @@ type Stats struct { // The memory bandwidth schema in 'container_id' group MemBwSchema string `json:"mem_bw_schema,omitempty"` + + // The memory bandwidth monitoring statistics from NUMA nodes in 'container_id' group + MBMStats *[]MBMNumaNodeStats `json:"mbm_stats,omitempty"` + + // The cache monitoring technology statistics from NUMA nodes in 'container_id' group + CMTStats *[]CMTNumaNodeStats `json:"cmt_stats,omitempty"` } func NewStats() *Stats { diff --git a/vendor/github.com/opencontainers/runc/libcontainer/keys/keyctl.go b/vendor/github.com/opencontainers/runc/libcontainer/keys/keyctl.go index 74dedd56ca8..e73af7ae2dc 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/keys/keyctl.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/keys/keyctl.go @@ -3,7 +3,6 @@ package keys import ( - "fmt" "strconv" "strings" @@ -33,7 +32,7 @@ func ModKeyringPerm(ringId KeySerial, mask, setbits uint32) error { res := strings.Split(dest, ";") if len(res) < 5 { - return fmt.Errorf("Destination buffer for key description is too small") + return errors.New("Destination buffer for key description is too small") } // parse permissions diff --git a/vendor/github.com/opencontainers/runc/libcontainer/mount/mount.go b/vendor/github.com/opencontainers/runc/libcontainer/mount/mount.go deleted file mode 100644 index e8965e081bb..00000000000 --- a/vendor/github.com/opencontainers/runc/libcontainer/mount/mount.go +++ /dev/null @@ -1,23 +0,0 @@ -package mount - -// GetMounts retrieves a list of mounts for the current running process. -func GetMounts() ([]*Info, error) { - return parseMountTable() -} - -// Mounted looks at /proc/self/mountinfo to determine of the specified -// mountpoint has been mounted -func Mounted(mountpoint string) (bool, error) { - entries, err := parseMountTable() - if err != nil { - return false, err - } - - // Search the table for the mountpoint - for _, e := range entries { - if e.Mountpoint == mountpoint { - return true, nil - } - } - return false, nil -} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/mount/mount_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/mount/mount_linux.go deleted file mode 100644 index 1e5191928de..00000000000 --- a/vendor/github.com/opencontainers/runc/libcontainer/mount/mount_linux.go +++ /dev/null @@ -1,82 +0,0 @@ -// +build linux - -package mount - -import ( - "bufio" - "fmt" - "io" - "os" - "strings" -) - -const ( - /* 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue - (1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11) - - (1) mount ID: unique identifier of the mount (may be reused after umount) - (2) parent ID: ID of parent (or of self for the top of the mount tree) - (3) major:minor: value of st_dev for files on filesystem - (4) root: root of the mount within the filesystem - (5) mount point: mount point relative to the process's root - (6) mount options: per mount options - (7) optional fields: zero or more fields of the form "tag[:value]" - (8) separator: marks the end of the optional fields - (9) filesystem type: name of filesystem of the form "type[.subtype]" - (10) mount source: filesystem specific information or "none" - (11) super options: per super block options*/ - mountinfoFormat = "%d %d %d:%d %s %s %s %s" -) - -// Parse /proc/self/mountinfo because comparing Dev and ino does not work from -// bind mounts -func parseMountTable() ([]*Info, error) { - f, err := os.Open("/proc/self/mountinfo") - if err != nil { - return nil, err - } - defer f.Close() - - return parseInfoFile(f) -} - -func parseInfoFile(r io.Reader) ([]*Info, error) { - var ( - s = bufio.NewScanner(r) - out = []*Info{} - ) - - for s.Scan() { - if err := s.Err(); err != nil { - return nil, err - } - - var ( - p = &Info{} - text = s.Text() - optionalFields string - ) - - if _, err := fmt.Sscanf(text, mountinfoFormat, - &p.ID, &p.Parent, &p.Major, &p.Minor, - &p.Root, &p.Mountpoint, &p.Opts, &optionalFields); err != nil { - return nil, fmt.Errorf("Scanning '%s' failed: %s", text, err) - } - // Safe as mountinfo encodes mountpoints with spaces as \040. - index := strings.Index(text, " - ") - postSeparatorFields := strings.Fields(text[index+3:]) - if len(postSeparatorFields) < 3 { - return nil, fmt.Errorf("Error found less than 3 fields post '-' in %q", text) - } - - if optionalFields != "-" { - p.Optional = optionalFields - } - - p.Fstype = postSeparatorFields[0] - p.Source = postSeparatorFields[1] - p.VfsOpts = strings.Join(postSeparatorFields[2:], " ") - out = append(out, p) - } - return out, nil -} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/mount/mountinfo.go b/vendor/github.com/opencontainers/runc/libcontainer/mount/mountinfo.go deleted file mode 100644 index e3fc3535e93..00000000000 --- a/vendor/github.com/opencontainers/runc/libcontainer/mount/mountinfo.go +++ /dev/null @@ -1,40 +0,0 @@ -package mount - -// Info reveals information about a particular mounted filesystem. This -// struct is populated from the content in the /proc//mountinfo file. -type Info struct { - // ID is a unique identifier of the mount (may be reused after umount). - ID int - - // Parent indicates the ID of the mount parent (or of self for the top of the - // mount tree). - Parent int - - // Major indicates one half of the device ID which identifies the device class. - Major int - - // Minor indicates one half of the device ID which identifies a specific - // instance of device. - Minor int - - // Root of the mount within the filesystem. - Root string - - // Mountpoint indicates the mount point relative to the process's root. - Mountpoint string - - // Opts represents mount-specific options. - Opts string - - // Optional represents optional fields. - Optional string - - // Fstype indicates the type of filesystem, such as EXT3. - Fstype string - - // Source indicates filesystem specific information or "none". - Source string - - // VfsOpts represents per super block options. - VfsOpts string -} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/notify_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/notify_linux.go index 47a06783d6f..d7d1de1ba51 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/notify_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/notify_linux.go @@ -3,6 +3,7 @@ package libcontainer import ( + "errors" "fmt" "io/ioutil" "os" @@ -11,8 +12,6 @@ import ( "golang.org/x/sys/unix" ) -const oomCgroupName = "memory" - type PressureLevel uint const ( @@ -66,19 +65,17 @@ func registerMemoryEvent(cgDir string, evName string, arg string) (<-chan struct // notifyOnOOM returns channel on which you can expect event about OOM, // if process died without OOM this channel will be closed. -func notifyOnOOM(paths map[string]string) (<-chan struct{}, error) { - dir := paths[oomCgroupName] +func notifyOnOOM(dir string) (<-chan struct{}, error) { if dir == "" { - return nil, fmt.Errorf("path %q missing", oomCgroupName) + return nil, errors.New("memory controller missing") } return registerMemoryEvent(dir, "memory.oom_control", "") } -func notifyMemoryPressure(paths map[string]string, level PressureLevel) (<-chan struct{}, error) { - dir := paths[oomCgroupName] +func notifyMemoryPressure(dir string, level PressureLevel) (<-chan struct{}, error) { if dir == "" { - return nil, fmt.Errorf("path %q missing", oomCgroupName) + return nil, errors.New("memory controller missing") } if level > CriticalPressure { diff --git a/vendor/github.com/opencontainers/runc/libcontainer/notify_linux_v2.go b/vendor/github.com/opencontainers/runc/libcontainer/notify_linux_v2.go new file mode 100644 index 00000000000..cdab10ed609 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/notify_linux_v2.go @@ -0,0 +1,102 @@ +// +build linux + +package libcontainer + +import ( + "io/ioutil" + "path/filepath" + "strconv" + "strings" + "unsafe" + + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "golang.org/x/sys/unix" +) + +func getValueFromCgroup(path, key string) (int, error) { + content, err := ioutil.ReadFile(path) + if err != nil { + return 0, err + } + + lines := strings.Split(string(content), "\n") + for _, line := range lines { + arr := strings.Split(line, " ") + if len(arr) == 2 && arr[0] == key { + return strconv.Atoi(arr[1]) + } + } + return 0, nil +} + +func registerMemoryEventV2(cgDir, evName, cgEvName string) (<-chan struct{}, error) { + eventControlPath := filepath.Join(cgDir, evName) + cgEvPath := filepath.Join(cgDir, cgEvName) + fd, err := unix.InotifyInit() + if err != nil { + return nil, errors.Wrap(err, "unable to init inotify") + } + // watching oom kill + evFd, err := unix.InotifyAddWatch(fd, eventControlPath, unix.IN_MODIFY) + if err != nil { + unix.Close(fd) + return nil, errors.Wrap(err, "unable to add inotify watch") + } + // Because no `unix.IN_DELETE|unix.IN_DELETE_SELF` event for cgroup file system, so watching all process exited + cgFd, err := unix.InotifyAddWatch(fd, cgEvPath, unix.IN_MODIFY) + if err != nil { + unix.Close(fd) + return nil, errors.Wrap(err, "unable to add inotify watch") + } + ch := make(chan struct{}) + go func() { + var ( + buffer [unix.SizeofInotifyEvent + unix.PathMax + 1]byte + offset uint32 + ) + defer func() { + unix.Close(fd) + close(ch) + }() + + for { + n, err := unix.Read(fd, buffer[:]) + if err != nil { + logrus.Warnf("unable to read event data from inotify, got error: %v", err) + return + } + if n < unix.SizeofInotifyEvent { + logrus.Warnf("we should read at least %d bytes from inotify, but got %d bytes.", unix.SizeofInotifyEvent, n) + return + } + offset = 0 + for offset <= uint32(n-unix.SizeofInotifyEvent) { + rawEvent := (*unix.InotifyEvent)(unsafe.Pointer(&buffer[offset])) + offset += unix.SizeofInotifyEvent + uint32(rawEvent.Len) + if rawEvent.Mask&unix.IN_MODIFY != unix.IN_MODIFY { + continue + } + switch int(rawEvent.Wd) { + case evFd: + oom, err := getValueFromCgroup(eventControlPath, "oom_kill") + if err != nil || oom > 0 { + ch <- struct{}{} + } + case cgFd: + pids, err := getValueFromCgroup(cgEvPath, "populated") + if err != nil || pids == 0 { + return + } + } + } + } + }() + return ch, nil +} + +// notifyOnOOMV2 returns channel on which you can expect event about OOM, +// if process died without OOM this channel will be closed. +func notifyOnOOMV2(path string) (<-chan struct{}, error) { + return registerMemoryEventV2(path, "memory.events", "cgroup.events") +} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/nsenter/cloned_binary.c b/vendor/github.com/opencontainers/runc/libcontainer/nsenter/cloned_binary.c index ad10f14067b..24cc8c6e160 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/nsenter/cloned_binary.c +++ b/vendor/github.com/opencontainers/runc/libcontainer/nsenter/cloned_binary.c @@ -1,7 +1,14 @@ +// SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later /* * Copyright (C) 2019 Aleksa Sarai * Copyright (C) 2019 SUSE LLC * + * This work is dual licensed under the following licenses. You may use, + * redistribute, and/or modify the work under the conditions of either (or + * both) licenses. + * + * === Apache-2.0 === + * * 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 @@ -13,6 +20,23 @@ * 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. + * + * === LGPL-2.1-or-later === + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * . + * */ #define _GNU_SOURCE @@ -95,8 +119,10 @@ static int is_self_cloned(void) struct statfs fsbuf = {}; fd = open("/proc/self/exe", O_RDONLY|O_CLOEXEC); - if (fd < 0) + if (fd < 0) { + fprintf(stderr, "you have no read access to runc binary file\n"); return -ENOTRECOVERABLE; + } /* * Is the binary a fully-sealed memfd? We don't need CLONED_BINARY_ENV for diff --git a/vendor/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c b/vendor/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c index 072656831d2..a33f2fcc371 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c +++ b/vendor/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c @@ -714,12 +714,12 @@ void nsexec(void) * ready, so we can receive all possible error codes * generated by children. */ + syncfd = sync_child_pipe[1]; + close(sync_child_pipe[0]); + while (!ready) { enum sync_t s; - syncfd = sync_child_pipe[1]; - close(sync_child_pipe[0]); - if (read(syncfd, &s, sizeof(s)) != sizeof(s)) bail("failed to sync with child: next state"); @@ -789,13 +789,13 @@ void nsexec(void) /* Now sync with grandchild. */ + syncfd = sync_grandchild_pipe[1]; + close(sync_grandchild_pipe[0]); + ready = false; while (!ready) { enum sync_t s; - syncfd = sync_grandchild_pipe[1]; - close(sync_grandchild_pipe[0]); - s = SYNC_GRANDCHILD; if (write(syncfd, &s, sizeof(s)) != sizeof(s)) { kill(child, SIGKILL); diff --git a/vendor/github.com/opencontainers/runc/libcontainer/process_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/process_linux.go index de989b5bceb..cb8c724a206 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/process_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/process_linux.go @@ -11,15 +11,16 @@ import ( "os/exec" "path/filepath" "strconv" - "syscall" // only for Signal "github.com/opencontainers/runc/libcontainer/cgroups" + "github.com/opencontainers/runc/libcontainer/cgroups/fs2" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/intelrdt" "github.com/opencontainers/runc/libcontainer/logs" "github.com/opencontainers/runc/libcontainer/system" "github.com/opencontainers/runc/libcontainer/utils" - + "github.com/opencontainers/runtime-spec/specs-go" + "github.com/sirupsen/logrus" "golang.org/x/sys/unix" ) @@ -68,6 +69,7 @@ type setnsProcess struct { fds []string process *Process bootstrapData io.Reader + initProcessPid int } func (p *setnsProcess) startTime() (uint64, error) { @@ -76,7 +78,7 @@ func (p *setnsProcess) startTime() (uint64, error) { } func (p *setnsProcess) signal(sig os.Signal) error { - s, ok := sig.(syscall.Signal) + s, ok := sig.(unix.Signal) if !ok { return errors.New("os: unsupported signal type") } @@ -102,7 +104,25 @@ func (p *setnsProcess) start() (err error) { } if len(p.cgroupPaths) > 0 { if err := cgroups.EnterPid(p.cgroupPaths, p.pid()); err != nil && !p.rootlessCgroups { - return newSystemErrorWithCausef(err, "adding pid %d to cgroups", p.pid()) + // On cgroup v2 + nesting + domain controllers, EnterPid may fail with EBUSY. + // https://github.com/opencontainers/runc/issues/2356#issuecomment-621277643 + // Try to join the cgroup of InitProcessPid. + if cgroups.IsCgroup2UnifiedMode() { + initProcCgroupFile := fmt.Sprintf("/proc/%d/cgroup", p.initProcessPid) + initCg, initCgErr := cgroups.ParseCgroupFile(initProcCgroupFile) + if initCgErr == nil { + if initCgPath, ok := initCg[""]; ok { + initCgDirpath := filepath.Join(fs2.UnifiedMountpoint, initCgPath) + logrus.Debugf("adding pid %d to cgroups %v failed (%v), attempting to join %q (obtained from %s)", + p.pid(), p.cgroupPaths, err, initCg, initCgDirpath) + // NOTE: initCgDirPath is not guaranteed to exist because we didn't pause the container. + err = cgroups.WriteCgroupProc(initCgDirpath, p.pid()) + } + } + } + if err != nil { + return newSystemErrorWithCausef(err, "adding pid %d to cgroups", p.pid()) + } } } if p.intelRdtPath != "" { @@ -132,7 +152,7 @@ func (p *setnsProcess) start() (err error) { // This shouldn't happen. panic("unexpected procHooks in setns") default: - return newSystemError(fmt.Errorf("invalid JSON payload from child")) + return newSystemError(errors.New("invalid JSON payload from child")) } }) @@ -279,7 +299,7 @@ func (p *initProcess) waitForChildExit(childPid int) error { return nil } -func (p *initProcess) start() error { +func (p *initProcess) start() (retErr error) { defer p.messageSockPair.parent.Close() err := p.cmd.Start() p.process.ops = p @@ -290,6 +310,15 @@ func (p *initProcess) start() error { p.process.ops = nil return newSystemErrorWithCause(err, "starting init process command") } + defer func() { + if retErr != nil { + p.manager.Destroy() + if p.intelRdtManager != nil { + p.intelRdtManager.Destroy() + } + } + }() + // Do this before syncing with child so that no children can escape the // cgroup. We don't need to worry about not doing this and not being root // because we'd be using the rootless cgroup manager in that case. @@ -301,16 +330,6 @@ func (p *initProcess) start() error { return newSystemErrorWithCause(err, "applying Intel RDT configuration for process") } } - defer func() { - if err != nil { - // TODO: should not be the responsibility to call here - p.manager.Destroy() - if p.intelRdtManager != nil { - p.intelRdtManager.Destroy() - } - } - }() - if _, err := io.Copy(p.messageSockPair.parent, p.bootstrapData); err != nil { return newSystemErrorWithCause(err, "copying bootstrap data to pipe") } @@ -327,16 +346,7 @@ func (p *initProcess) start() error { return newSystemErrorWithCausef(err, "getting pipe fds for pid %d", childPid) } p.setExternalDescriptors(fds) - // Do this before syncing with child so that no children - // can escape the cgroup - if err := p.manager.Apply(childPid); err != nil { - return newSystemErrorWithCause(err, "applying cgroup configuration for process") - } - if p.intelRdtManager != nil { - if err := p.intelRdtManager.Apply(childPid); err != nil { - return newSystemErrorWithCause(err, "applying Intel RDT configuration for process") - } - } + // Now it's time to setup cgroup namesapce if p.config.Config.Namespaces.Contains(configs.NEWCGROUP) && p.config.Config.Namespaces.PathOf(configs.NEWCGROUP) == "" { if _, err := p.messageSockPair.parent.Write([]byte{createCgroupns}); err != nil { @@ -349,18 +359,12 @@ func (p *initProcess) start() error { return newSystemErrorWithCause(err, "waiting for our first child to exit") } - defer func() { - if err != nil { - // TODO: should not be the responsibility to call here - p.manager.Destroy() - if p.intelRdtManager != nil { - p.intelRdtManager.Destroy() - } - } - }() if err := p.createNetworkInterfaces(); err != nil { return newSystemErrorWithCause(err, "creating network interfaces") } + if err := p.updateSpecState(); err != nil { + return newSystemErrorWithCause(err, "updating the spec state") + } if err := p.sendConfig(); err != nil { return newSystemErrorWithCause(err, "sending config to init process") } @@ -377,9 +381,9 @@ func (p *initProcess) start() error { if err := setupRlimits(p.config.Rlimits, p.pid()); err != nil { return newSystemErrorWithCause(err, "setting rlimits for ready process") } - // call prestart hooks + // call prestart and CreateRuntime hooks if !p.config.Config.Namespaces.Contains(configs.NEWNS) { - // Setup cgroup before prestart hook, so that the prestart hook could apply cgroup permissions. + // Setup cgroup before the hook, so that the prestart and CreateRuntime hook could apply cgroup permissions. if err := p.manager.Set(p.config.Config); err != nil { return newSystemErrorWithCause(err, "setting cgroup config for ready process") } @@ -396,11 +400,14 @@ func (p *initProcess) start() error { } // initProcessStartTime hasn't been set yet. s.Pid = p.cmd.Process.Pid - s.Status = "creating" - for i, hook := range p.config.Config.Hooks.Prestart { - if err := hook.Run(s); err != nil { - return newSystemErrorWithCausef(err, "running prestart hook %d", i) - } + s.Status = specs.StateCreating + hooks := p.config.Config.Hooks + + if err := hooks[configs.Prestart].RunHooks(s); err != nil { + return err + } + if err := hooks[configs.CreateRuntime].RunHooks(s); err != nil { + return err } } } @@ -426,11 +433,14 @@ func (p *initProcess) start() error { } // initProcessStartTime hasn't been set yet. s.Pid = p.cmd.Process.Pid - s.Status = "creating" - for i, hook := range p.config.Config.Hooks.Prestart { - if err := hook.Run(s); err != nil { - return newSystemErrorWithCausef(err, "running prestart hook %d", i) - } + s.Status = specs.StateCreating + hooks := p.config.Config.Hooks + + if err := hooks[configs.Prestart].RunHooks(s); err != nil { + return err + } + if err := hooks[configs.CreateRuntime].RunHooks(s); err != nil { + return err } } // Sync with child. @@ -439,7 +449,7 @@ func (p *initProcess) start() error { } sentResume = true default: - return newSystemError(fmt.Errorf("invalid JSON payload from child")) + return newSystemError(errors.New("invalid JSON payload from child")) } return nil @@ -449,7 +459,7 @@ func (p *initProcess) start() error { return newSystemErrorWithCause(ierr, "container init") } if p.config.Config.Namespaces.Contains(configs.NEWNS) && !sentResume { - return newSystemError(fmt.Errorf("could not synchronise after executing prestart hooks with container process")) + return newSystemError(errors.New("could not synchronise after executing prestart and CreateRuntime hooks with container process")) } if err := unix.Shutdown(int(p.messageSockPair.parent.Fd()), unix.SHUT_WR); err != nil { return newSystemErrorWithCause(err, "shutting down init pipe") @@ -491,6 +501,16 @@ func (p *initProcess) startTime() (uint64, error) { return stat.StartTime, err } +func (p *initProcess) updateSpecState() error { + s, err := p.container.currentOCIState() + if err != nil { + return err + } + + p.config.SpecState = s + return nil +} + func (p *initProcess) sendConfig() error { // send the config to the container's init process, we don't use JSON Encode // here because there might be a problem in JSON decoder in some cases, see: @@ -516,7 +536,7 @@ func (p *initProcess) createNetworkInterfaces() error { } func (p *initProcess) signal(sig os.Signal) error { - s, ok := sig.(syscall.Signal) + s, ok := sig.(unix.Signal) if !ok { return errors.New("os: unsupported signal type") } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/restored_process.go b/vendor/github.com/opencontainers/runc/libcontainer/restored_process.go index 28d52ad0639..f861e82d1b2 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/restored_process.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/restored_process.go @@ -5,31 +5,29 @@ package libcontainer import ( "fmt" "os" + "os/exec" "github.com/opencontainers/runc/libcontainer/system" ) -func newRestoredProcess(pid int, fds []string) (*restoredProcess, error) { +func newRestoredProcess(cmd *exec.Cmd, fds []string) (*restoredProcess, error) { var ( err error ) - proc, err := os.FindProcess(pid) - if err != nil { - return nil, err - } + pid := cmd.Process.Pid stat, err := system.Stat(pid) if err != nil { return nil, err } return &restoredProcess{ - proc: proc, + cmd: cmd, processStartTime: stat.StartTime, fds: fds, }, nil } type restoredProcess struct { - proc *os.Process + cmd *exec.Cmd processStartTime uint64 fds []string } @@ -39,11 +37,11 @@ func (p *restoredProcess) start() error { } func (p *restoredProcess) pid() int { - return p.proc.Pid + return p.cmd.Process.Pid } func (p *restoredProcess) terminate() error { - err := p.proc.Kill() + err := p.cmd.Process.Kill() if _, werr := p.wait(); err == nil { err = werr } @@ -53,10 +51,13 @@ func (p *restoredProcess) terminate() error { func (p *restoredProcess) wait() (*os.ProcessState, error) { // TODO: how do we wait on the actual process? // maybe use --exec-cmd in criu - st, err := p.proc.Wait() + err := p.cmd.Wait() if err != nil { - return nil, err + if _, ok := err.(*exec.ExitError); !ok { + return nil, err + } } + st := p.cmd.ProcessState return st, nil } @@ -65,7 +66,7 @@ func (p *restoredProcess) startTime() (uint64, error) { } func (p *restoredProcess) signal(s os.Signal) error { - return p.proc.Signal(s) + return p.cmd.Process.Signal(s) } func (p *restoredProcess) externalDescriptors() []string { diff --git a/vendor/github.com/opencontainers/runc/libcontainer/rootfs_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/rootfs_linux.go index 106c4c2b98b..e00df0a2c12 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/rootfs_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/rootfs_linux.go @@ -14,12 +14,13 @@ import ( "time" securejoin "github.com/cyphar/filepath-securejoin" + "github.com/moby/sys/mountinfo" "github.com/mrunalp/fileutils" "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/configs" - "github.com/opencontainers/runc/libcontainer/mount" "github.com/opencontainers/runc/libcontainer/system" libcontainerUtils "github.com/opencontainers/runc/libcontainer/utils" + "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/selinux/go-selinux/label" "golang.org/x/sys/unix" @@ -55,7 +56,7 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig) (err error) { } } if err := mountToRootfs(m, config.Rootfs, config.MountLabel, hasCgroupns); err != nil { - return newSystemErrorWithCausef(err, "mounting %q to rootfs %q at %q", m.Source, config.Rootfs, m.Destination) + return newSystemErrorWithCausef(err, "mounting %q to rootfs at %q", m.Source, m.Destination) } for _, postcmd := range m.PostmountCmds { @@ -98,12 +99,19 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig) (err error) { return newSystemErrorWithCausef(err, "changing dir to %q", config.Rootfs) } + s := iConfig.SpecState + s.Pid = unix.Getpid() + s.Status = specs.StateCreating + if err := iConfig.Config.Hooks[configs.CreateContainer].RunHooks(s); err != nil { + return err + } + if config.NoPivotRoot { err = msMoveRoot(config.Rootfs) } else if config.Namespaces.Contains(configs.NEWNS) { err = pivotRoot(config.Rootfs) } else { - err = chroot(config.Rootfs) + err = chroot() } if err != nil { return newSystemErrorWithCause(err, "jailing process inside rootfs") @@ -244,7 +252,7 @@ func mountCgroupV1(m *configs.Mount, rootfs, mountLabel string, enableCgroupns b } cgroupmount := &configs.Mount{ Source: "cgroup", - Device: "cgroup", + Device: "cgroup", // this is actually fstype Destination: subsystemPath, Flags: flags, Data: filepath.Base(subsystemPath), @@ -402,27 +410,9 @@ func mountToRootfs(m *configs.Mount, rootfs, mountLabel string, enableCgroupns b } case "cgroup": if cgroups.IsCgroup2UnifiedMode() { - if err := mountCgroupV2(m, rootfs, mountLabel, enableCgroupns); err != nil { - return err - } - } else { - - if err := mountCgroupV1(m, rootfs, mountLabel, enableCgroupns); err != nil { - return err - } - } - if m.Flags&unix.MS_RDONLY != 0 { - // remount cgroup root as readonly - mcgrouproot := &configs.Mount{ - Source: m.Destination, - Device: "bind", - Destination: m.Destination, - Flags: defaultMountFlags | unix.MS_RDONLY | unix.MS_BIND, - } - if err := remount(mcgrouproot, rootfs); err != nil { - return err - } + return mountCgroupV2(m, rootfs, mountLabel, enableCgroupns) } + return mountCgroupV1(m, rootfs, mountLabel, enableCgroupns) default: // ensure that the destination of the mount is resolved of symlinks at mount time because // any previous mounts can invalidate the next mount's destination. @@ -624,11 +614,14 @@ func bindMountDeviceNode(dest string, node *configs.Device) error { // Creates the device node in the rootfs of the container. func createDeviceNode(rootfs string, node *configs.Device, bind bool) error { + if node.Path == "" { + // The node only exists for cgroup reasons, ignore it here. + return nil + } dest := filepath.Join(rootfs, node.Path) if err := os.MkdirAll(filepath.Dir(dest), 0755); err != nil { return err } - if bind { return bindMountDeviceNode(dest, node) } @@ -646,61 +639,45 @@ func createDeviceNode(rootfs string, node *configs.Device, bind bool) error { func mknodDevice(dest string, node *configs.Device) error { fileMode := node.FileMode switch node.Type { - case 'c', 'u': - fileMode |= unix.S_IFCHR - case 'b': + case configs.BlockDevice: fileMode |= unix.S_IFBLK - case 'p': + case configs.CharDevice: + fileMode |= unix.S_IFCHR + case configs.FifoDevice: fileMode |= unix.S_IFIFO default: return fmt.Errorf("%c is not a valid device type for device %s", node.Type, node.Path) } - if err := unix.Mknod(dest, uint32(fileMode), node.Mkdev()); err != nil { + dev, err := node.Mkdev() + if err != nil { + return err + } + if err := unix.Mknod(dest, uint32(fileMode), int(dev)); err != nil { return err } return unix.Chown(dest, int(node.Uid), int(node.Gid)) } -func getMountInfo(mountinfo []*mount.Info, dir string) *mount.Info { - for _, m := range mountinfo { - if m.Mountpoint == dir { - return m - } - } - return nil -} - // Get the parent mount point of directory passed in as argument. Also return // optional fields. func getParentMount(rootfs string) (string, string, error) { - var path string - - mountinfos, err := mount.GetMounts() + mi, err := mountinfo.GetMounts(mountinfo.ParentsFilter(rootfs)) if err != nil { return "", "", err } - - mountinfo := getMountInfo(mountinfos, rootfs) - if mountinfo != nil { - return rootfs, mountinfo.Optional, nil + if len(mi) < 1 { + return "", "", fmt.Errorf("could not find parent mount of %s", rootfs) } - path = rootfs - for { - path = filepath.Dir(path) - - mountinfo = getMountInfo(mountinfos, path) - if mountinfo != nil { - return path, mountinfo.Optional, nil - } - - if path == "/" { - break + // find the longest mount point + var idx, maxlen int + for i := range mi { + if len(mi[i].Mountpoint) > maxlen { + maxlen = len(mi[i].Mountpoint) + idx = i } } - - // If we are here, we did not find parent mount. Something is wrong. - return "", "", fmt.Errorf("Could not find parent mount of %s", rootfs) + return mi[idx].Mountpoint, mi[idx].Optional, nil } // Make parent mount private if it was shared @@ -825,25 +802,22 @@ func pivotRoot(rootfs string) error { } func msMoveRoot(rootfs string) error { - mountinfos, err := mount.GetMounts() - if err != nil { - return err - } - - absRootfs, err := filepath.Abs(rootfs) + mountinfos, err := mountinfo.GetMounts(func(info *mountinfo.Info) (skip, stop bool) { + skip = false + stop = false + // Collect every sysfs and proc file systems, except those under the container rootfs + if (info.Fstype != "proc" && info.Fstype != "sysfs") || strings.HasPrefix(info.Mountpoint, rootfs) { + skip = true + return + } + return + }) if err != nil { return err } for _, info := range mountinfos { - p, err := filepath.Abs(info.Mountpoint) - if err != nil { - return err - } - // Umount every syfs and proc file systems, except those under the container rootfs - if (info.Fstype != "proc" && info.Fstype != "sysfs") || filepath.HasPrefix(p, absRootfs) { - continue - } + p := info.Mountpoint // Be sure umount events are not propagated to the host. if err := unix.Mount("", p, "", unix.MS_SLAVE|unix.MS_REC, ""); err != nil { return err @@ -863,10 +837,10 @@ func msMoveRoot(rootfs string) error { if err := unix.Mount(rootfs, "/", "", unix.MS_MOVE, ""); err != nil { return err } - return chroot(rootfs) + return chroot() } -func chroot(rootfs string) error { +func chroot() error { if err := unix.Chroot("."); err != nil { return err } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_linux.go index 1b7a07118fe..73ddf3d1827 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_linux.go @@ -4,6 +4,7 @@ package seccomp import ( "bufio" + "errors" "fmt" "os" "strings" @@ -34,12 +35,12 @@ const ( // of the init until they join the namespace func InitSeccomp(config *configs.Seccomp) error { if config == nil { - return fmt.Errorf("cannot initialize Seccomp - nil config passed") + return errors.New("cannot initialize Seccomp - nil config passed") } - defaultAction, err := getAction(config.DefaultAction) + defaultAction, err := getAction(config.DefaultAction, nil) if err != nil { - return fmt.Errorf("error initializing seccomp - invalid default action") + return errors.New("error initializing seccomp - invalid default action") } filter, err := libseccomp.NewFilter(defaultAction) @@ -67,7 +68,7 @@ func InitSeccomp(config *configs.Seccomp) error { // Add a rule for each syscall for _, call := range config.Syscalls { if call == nil { - return fmt.Errorf("encountered nil syscall while initializing Seccomp") + return errors.New("encountered nil syscall while initializing Seccomp") } if err = matchCall(filter, call); err != nil { @@ -101,22 +102,28 @@ func IsEnabled() bool { } // Convert Libcontainer Action to Libseccomp ScmpAction -func getAction(act configs.Action) (libseccomp.ScmpAction, error) { +func getAction(act configs.Action, errnoRet *uint) (libseccomp.ScmpAction, error) { switch act { case configs.Kill: return actKill, nil case configs.Errno: + if errnoRet != nil { + return libseccomp.ActErrno.SetReturnCode(int16(*errnoRet)), nil + } return actErrno, nil case configs.Trap: return actTrap, nil case configs.Allow: return actAllow, nil case configs.Trace: + if errnoRet != nil { + return libseccomp.ActTrace.SetReturnCode(int16(*errnoRet)), nil + } return actTrace, nil case configs.Log: return actLog, nil default: - return libseccomp.ActInvalid, fmt.Errorf("invalid action, cannot use in rule") + return libseccomp.ActInvalid, errors.New("invalid action, cannot use in rule") } } @@ -138,7 +145,7 @@ func getOperator(op configs.Operator) (libseccomp.ScmpCompareOp, error) { case configs.MaskEqualTo: return libseccomp.CompareMaskedEqual, nil default: - return libseccomp.CompareInvalid, fmt.Errorf("invalid operator, cannot use in rule") + return libseccomp.CompareInvalid, errors.New("invalid operator, cannot use in rule") } } @@ -147,7 +154,7 @@ func getCondition(arg *configs.Arg) (libseccomp.ScmpCondition, error) { cond := libseccomp.ScmpCondition{} if arg == nil { - return cond, fmt.Errorf("cannot convert nil to syscall condition") + return cond, errors.New("cannot convert nil to syscall condition") } op, err := getOperator(arg.Op) @@ -161,11 +168,11 @@ func getCondition(arg *configs.Arg) (libseccomp.ScmpCondition, error) { // Add a rule to match a single syscall func matchCall(filter *libseccomp.ScmpFilter, call *configs.Syscall) error { if call == nil || filter == nil { - return fmt.Errorf("cannot use nil as syscall to block") + return errors.New("cannot use nil as syscall to block") } if len(call.Name) == 0 { - return fmt.Errorf("empty string is not a valid syscall") + return errors.New("empty string is not a valid syscall") } // If we can't resolve the syscall, assume it's not supported on this kernel @@ -176,7 +183,7 @@ func matchCall(filter *libseccomp.ScmpFilter, call *configs.Syscall) error { } // Convert the call's action to the libseccomp equivalent - callAct, err := getAction(call.Action) + callAct, err := getAction(call.Action, call.ErrnoRet) if err != nil { return fmt.Errorf("action in seccomp profile is invalid: %s", err) } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go index 888981f5291..0b9cd885208 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go @@ -11,9 +11,8 @@ import ( "github.com/opencontainers/runc/libcontainer/keys" "github.com/opencontainers/runc/libcontainer/seccomp" "github.com/opencontainers/runc/libcontainer/system" - "github.com/opencontainers/selinux/go-selinux/label" + "github.com/opencontainers/selinux/go-selinux" "github.com/pkg/errors" - "golang.org/x/sys/unix" ) @@ -34,10 +33,10 @@ func (l *linuxSetnsInit) Init() error { defer runtime.UnlockOSThread() if !l.config.Config.NoNewKeyring { - if err := label.SetKeyLabel(l.config.ProcessLabel); err != nil { + if err := selinux.SetKeyLabel(l.config.ProcessLabel); err != nil { return err } - defer label.SetKeyLabel("") + defer selinux.SetKeyLabel("") // Do not inherit the parent's session keyring. if _, err := keys.JoinSessionKeyring(l.getSessionRingName()); err != nil { // Same justification as in standart_init_linux.go as to why we @@ -62,10 +61,10 @@ func (l *linuxSetnsInit) Init() error { return err } } - if err := label.SetProcessLabel(l.config.ProcessLabel); err != nil { + if err := selinux.SetExecLabel(l.config.ProcessLabel); err != nil { return err } - defer label.SetProcessLabel("") + defer selinux.SetExecLabel("") // Without NoNewPrivileges seccomp is a privileged operation, so we need to // do this before dropping capabilities; otherwise do it as late as possible // just before execve so as few syscalls take place after it as possible. diff --git a/vendor/github.com/opencontainers/runc/libcontainer/specconv/example.go b/vendor/github.com/opencontainers/runc/libcontainer/specconv/example.go index 23e225c3f01..8a201bc78dd 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/specconv/example.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/specconv/example.go @@ -4,13 +4,14 @@ import ( "os" "strings" + "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runtime-spec/specs-go" ) // Example returns an example spec file, with many options set so a user can // see what a standard spec file looks like. func Example() *specs.Spec { - return &specs.Spec{ + spec := &specs.Spec{ Version: specs.Version, Root: &specs.Root{ Path: "rootfs", @@ -138,23 +139,29 @@ func Example() *specs.Spec { }, Namespaces: []specs.LinuxNamespace{ { - Type: "pid", + Type: specs.PIDNamespace, }, { - Type: "network", + Type: specs.NetworkNamespace, }, { - Type: "ipc", + Type: specs.IPCNamespace, }, { - Type: "uts", + Type: specs.UTSNamespace, }, { - Type: "mount", + Type: specs.MountNamespace, }, }, }, } + if cgroups.IsCgroup2UnifiedMode() { + spec.Linux.Namespaces = append(spec.Linux.Namespaces, specs.LinuxNamespace{ + Type: specs.CgroupNamespace, + }) + } + return spec } // ToRootless converts the given spec file into one that should work with diff --git a/vendor/github.com/opencontainers/runc/libcontainer/specconv/spec_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/specconv/spec_linux.go index d9e73c46be1..6fd98f02753 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/specconv/spec_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/specconv/spec_linux.go @@ -5,12 +5,17 @@ package specconv import ( + "errors" "fmt" "os" "path/filepath" + "regexp" "strings" "time" + systemdDbus "github.com/coreos/go-systemd/v22/dbus" + dbus "github.com/godbus/dbus/v5" + "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/seccomp" libcontainerUtils "github.com/opencontainers/runc/libcontainer/utils" @@ -43,104 +48,147 @@ var mountPropagationMapping = map[string]int{ "": 0, } -// AllowedDevices is exposed for devicefilter_test.go +// AllowedDevices is the set of devices which are automatically included for +// all containers. +// +// XXX (cyphar) +// This behaviour is at the very least "questionable" (if not outright +// wrong) according to the runtime-spec. +// +// Yes, we have to include certain devices other than the ones the user +// specifies, but several devices listed here are not part of the spec +// (including "mknod for any device"?!). In addition, these rules are +// appended to the user-provided set which means that users *cannot disable +// this behaviour*. +// +// ... unfortunately I'm too scared to change this now because who knows how +// many people depend on this (incorrect and arguably insecure) behaviour. var AllowedDevices = []*configs.Device{ // allow mknod for any device { - Type: 'c', - Major: wildcard, - Minor: wildcard, - Permissions: "m", - Allow: true, + DeviceRule: configs.DeviceRule{ + Type: configs.CharDevice, + Major: configs.Wildcard, + Minor: configs.Wildcard, + Permissions: "m", + Allow: true, + }, }, { - Type: 'b', - Major: wildcard, - Minor: wildcard, - Permissions: "m", - Allow: true, + DeviceRule: configs.DeviceRule{ + Type: configs.BlockDevice, + Major: configs.Wildcard, + Minor: configs.Wildcard, + Permissions: "m", + Allow: true, + }, }, { - Type: 'c', - Path: "/dev/null", - Major: 1, - Minor: 3, - Permissions: "rwm", - Allow: true, + Path: "/dev/null", + FileMode: 0666, + Uid: 0, + Gid: 0, + DeviceRule: configs.DeviceRule{ + Type: configs.CharDevice, + Major: 1, + Minor: 3, + Permissions: "rwm", + Allow: true, + }, }, { - Type: 'c', - Path: "/dev/random", - Major: 1, - Minor: 8, - Permissions: "rwm", - Allow: true, + Path: "/dev/random", + FileMode: 0666, + Uid: 0, + Gid: 0, + DeviceRule: configs.DeviceRule{ + Type: configs.CharDevice, + Major: 1, + Minor: 8, + Permissions: "rwm", + Allow: true, + }, }, { - Type: 'c', - Path: "/dev/full", - Major: 1, - Minor: 7, - Permissions: "rwm", - Allow: true, + Path: "/dev/full", + FileMode: 0666, + Uid: 0, + Gid: 0, + DeviceRule: configs.DeviceRule{ + Type: configs.CharDevice, + Major: 1, + Minor: 7, + Permissions: "rwm", + Allow: true, + }, }, { - Type: 'c', - Path: "/dev/tty", - Major: 5, - Minor: 0, - Permissions: "rwm", - Allow: true, + Path: "/dev/tty", + FileMode: 0666, + Uid: 0, + Gid: 0, + DeviceRule: configs.DeviceRule{ + Type: configs.CharDevice, + Major: 5, + Minor: 0, + Permissions: "rwm", + Allow: true, + }, }, { - Type: 'c', - Path: "/dev/zero", - Major: 1, - Minor: 5, - Permissions: "rwm", - Allow: true, + Path: "/dev/zero", + FileMode: 0666, + Uid: 0, + Gid: 0, + DeviceRule: configs.DeviceRule{ + Type: configs.CharDevice, + Major: 1, + Minor: 5, + Permissions: "rwm", + Allow: true, + }, }, { - Type: 'c', - Path: "/dev/urandom", - Major: 1, - Minor: 9, - Permissions: "rwm", - Allow: true, - }, - { - Path: "/dev/console", - Type: 'c', - Major: 5, - Minor: 1, - Permissions: "rwm", - Allow: true, + Path: "/dev/urandom", + FileMode: 0666, + Uid: 0, + Gid: 0, + DeviceRule: configs.DeviceRule{ + Type: configs.CharDevice, + Major: 1, + Minor: 9, + Permissions: "rwm", + Allow: true, + }, }, // /dev/pts/ - pts namespaces are "coming soon" { - Path: "", - Type: 'c', - Major: 136, - Minor: wildcard, - Permissions: "rwm", - Allow: true, + DeviceRule: configs.DeviceRule{ + Type: configs.CharDevice, + Major: 136, + Minor: configs.Wildcard, + Permissions: "rwm", + Allow: true, + }, }, { - Path: "", - Type: 'c', - Major: 5, - Minor: 2, - Permissions: "rwm", - Allow: true, + DeviceRule: configs.DeviceRule{ + Type: configs.CharDevice, + Major: 5, + Minor: 2, + Permissions: "rwm", + Allow: true, + }, }, // tuntap { - Path: "", - Type: 'c', - Major: 10, - Minor: 200, - Permissions: "rwm", - Allow: true, + DeviceRule: configs.DeviceRule{ + Type: configs.CharDevice, + Major: 10, + Minor: 200, + Permissions: "rwm", + Allow: true, + }, }, } @@ -255,6 +303,7 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) { } if spec.Process != nil { config.OomScoreAdj = spec.Process.OOMScoreAdj + config.NoNewPrivileges = spec.Process.NoNewPrivileges if spec.Process.SelinuxLabel != "" { config.ProcessLabel = spec.Process.SelinuxLabel } @@ -297,6 +346,70 @@ func createLibcontainerMount(cwd string, m specs.Mount) *configs.Mount { } } +// systemd property name check: latin letters only, at least 3 of them +var isValidName = regexp.MustCompile(`^[a-zA-Z]{3,}$`).MatchString + +var isSecSuffix = regexp.MustCompile(`[a-z]Sec$`).MatchString + +// Some systemd properties are documented as having "Sec" suffix +// (e.g. TimeoutStopSec) but are expected to have "USec" suffix +// here, so let's provide conversion to improve compatibility. +func convertSecToUSec(value dbus.Variant) (dbus.Variant, error) { + var sec uint64 + const M = 1000000 + vi := value.Value() + switch value.Signature().String() { + case "y": + sec = uint64(vi.(byte)) * M + case "n": + sec = uint64(vi.(int16)) * M + case "q": + sec = uint64(vi.(uint16)) * M + case "i": + sec = uint64(vi.(int32)) * M + case "u": + sec = uint64(vi.(uint32)) * M + case "x": + sec = uint64(vi.(int64)) * M + case "t": + sec = vi.(uint64) * M + case "d": + sec = uint64(vi.(float64) * M) + default: + return value, errors.New("not a number") + } + return dbus.MakeVariant(sec), nil +} + +func initSystemdProps(spec *specs.Spec) ([]systemdDbus.Property, error) { + const keyPrefix = "org.systemd.property." + var sp []systemdDbus.Property + + for k, v := range spec.Annotations { + name := strings.TrimPrefix(k, keyPrefix) + if len(name) == len(k) { // prefix not there + continue + } + if !isValidName(name) { + return nil, fmt.Errorf("Annotation %s name incorrect: %s", k, name) + } + value, err := dbus.ParseVariant(v, dbus.Signature{}) + if err != nil { + return nil, fmt.Errorf("Annotation %s=%s value parse error: %v", k, v, err) + } + if isSecSuffix(name) { + name = strings.TrimSuffix(name, "Sec") + "USec" + value, err = convertSecToUSec(value) + if err != nil { + return nil, fmt.Errorf("Annotation %s=%s value parse error: %v", k, v, err) + } + } + sp = append(sp, systemdDbus.Property{Name: name, Value: value}) + } + + return sp, nil +} + func CreateCgroupConfig(opts *CreateOpts) (*configs.Cgroup, error) { var ( myCgroupPath string @@ -310,6 +423,14 @@ func CreateCgroupConfig(opts *CreateOpts) (*configs.Cgroup, error) { Resources: &configs.Resources{}, } + if useSystemdCgroup { + sp, err := initSystemdProps(spec) + if err != nil { + return nil, err + } + c.SystemdProps = sp + } + if spec.Linux != nil && spec.Linux.CgroupsPath != "" { myCgroupPath = libcontainerUtils.CleanPath(spec.Linux.CgroupsPath) if useSystemdCgroup { @@ -342,251 +463,201 @@ func CreateCgroupConfig(opts *CreateOpts) (*configs.Cgroup, error) { // In rootless containers, any attempt to make cgroup changes is likely to fail. // libcontainer will validate this but ignores the error. - c.Resources.AllowedDevices = AllowedDevices if spec.Linux != nil { r := spec.Linux.Resources - if r == nil { - return c, nil - } - for i, d := range spec.Linux.Resources.Devices { - var ( - t = "a" - major = int64(-1) - minor = int64(-1) - ) - if d.Type != "" { - t = d.Type - } - if d.Major != nil { - major = *d.Major - } - if d.Minor != nil { - minor = *d.Minor - } - if d.Access == "" { - return nil, fmt.Errorf("device access at %d field cannot be empty", i) - } - dt, err := stringToCgroupDeviceRune(t) - if err != nil { - return nil, err - } - dd := &configs.Device{ - Type: dt, - Major: major, - Minor: minor, - Permissions: d.Access, - Allow: d.Allow, - } - c.Resources.Devices = append(c.Resources.Devices, dd) - } - if r.Memory != nil { - if r.Memory.Limit != nil { - c.Resources.Memory = *r.Memory.Limit - } - if r.Memory.Reservation != nil { - c.Resources.MemoryReservation = *r.Memory.Reservation - } - if r.Memory.Swap != nil { - c.Resources.MemorySwap = *r.Memory.Swap - } - if r.Memory.Kernel != nil { - c.Resources.KernelMemory = *r.Memory.Kernel - } - if r.Memory.KernelTCP != nil { - c.Resources.KernelMemoryTCP = *r.Memory.KernelTCP - } - if r.Memory.Swappiness != nil { - c.Resources.MemorySwappiness = r.Memory.Swappiness - } - if r.Memory.DisableOOMKiller != nil { - c.Resources.OomKillDisable = *r.Memory.DisableOOMKiller - } - } - if r.CPU != nil { - if r.CPU.Shares != nil { - c.Resources.CpuShares = *r.CPU.Shares - } - if r.CPU.Quota != nil { - c.Resources.CpuQuota = *r.CPU.Quota - } - if r.CPU.Period != nil { - c.Resources.CpuPeriod = *r.CPU.Period - } - if r.CPU.RealtimeRuntime != nil { - c.Resources.CpuRtRuntime = *r.CPU.RealtimeRuntime - } - if r.CPU.RealtimePeriod != nil { - c.Resources.CpuRtPeriod = *r.CPU.RealtimePeriod - } - if r.CPU.Cpus != "" { - c.Resources.CpusetCpus = r.CPU.Cpus - } - if r.CPU.Mems != "" { - c.Resources.CpusetMems = r.CPU.Mems - } - } - if r.Pids != nil { - c.Resources.PidsLimit = r.Pids.Limit - } - if r.BlockIO != nil { - if r.BlockIO.Weight != nil { - c.Resources.BlkioWeight = *r.BlockIO.Weight - } - if r.BlockIO.LeafWeight != nil { - c.Resources.BlkioLeafWeight = *r.BlockIO.LeafWeight - } - if r.BlockIO.WeightDevice != nil { - for _, wd := range r.BlockIO.WeightDevice { - var weight, leafWeight uint16 - if wd.Weight != nil { - weight = *wd.Weight - } - if wd.LeafWeight != nil { - leafWeight = *wd.LeafWeight - } - weightDevice := configs.NewWeightDevice(wd.Major, wd.Minor, weight, leafWeight) - c.Resources.BlkioWeightDevice = append(c.Resources.BlkioWeightDevice, weightDevice) + if r != nil { + for i, d := range spec.Linux.Resources.Devices { + var ( + t = "a" + major = int64(-1) + minor = int64(-1) + ) + if d.Type != "" { + t = d.Type } - } - if r.BlockIO.ThrottleReadBpsDevice != nil { - for _, td := range r.BlockIO.ThrottleReadBpsDevice { - rate := td.Rate - throttleDevice := configs.NewThrottleDevice(td.Major, td.Minor, rate) - c.Resources.BlkioThrottleReadBpsDevice = append(c.Resources.BlkioThrottleReadBpsDevice, throttleDevice) + if d.Major != nil { + major = *d.Major } - } - if r.BlockIO.ThrottleWriteBpsDevice != nil { - for _, td := range r.BlockIO.ThrottleWriteBpsDevice { - rate := td.Rate - throttleDevice := configs.NewThrottleDevice(td.Major, td.Minor, rate) - c.Resources.BlkioThrottleWriteBpsDevice = append(c.Resources.BlkioThrottleWriteBpsDevice, throttleDevice) + if d.Minor != nil { + minor = *d.Minor } - } - if r.BlockIO.ThrottleReadIOPSDevice != nil { - for _, td := range r.BlockIO.ThrottleReadIOPSDevice { - rate := td.Rate - throttleDevice := configs.NewThrottleDevice(td.Major, td.Minor, rate) - c.Resources.BlkioThrottleReadIOPSDevice = append(c.Resources.BlkioThrottleReadIOPSDevice, throttleDevice) + if d.Access == "" { + return nil, fmt.Errorf("device access at %d field cannot be empty", i) } - } - if r.BlockIO.ThrottleWriteIOPSDevice != nil { - for _, td := range r.BlockIO.ThrottleWriteIOPSDevice { - rate := td.Rate - throttleDevice := configs.NewThrottleDevice(td.Major, td.Minor, rate) - c.Resources.BlkioThrottleWriteIOPSDevice = append(c.Resources.BlkioThrottleWriteIOPSDevice, throttleDevice) + dt, err := stringToCgroupDeviceRune(t) + if err != nil { + return nil, err } - } - } - for _, l := range r.HugepageLimits { - c.Resources.HugetlbLimit = append(c.Resources.HugetlbLimit, &configs.HugepageLimit{ - Pagesize: l.Pagesize, - Limit: l.Limit, - }) - } - if r.Network != nil { - if r.Network.ClassID != nil { - c.Resources.NetClsClassid = *r.Network.ClassID - } - for _, m := range r.Network.Priorities { - c.Resources.NetPrioIfpriomap = append(c.Resources.NetPrioIfpriomap, &configs.IfPrioMap{ - Interface: m.Name, - Priority: int64(m.Priority), + c.Resources.Devices = append(c.Resources.Devices, &configs.DeviceRule{ + Type: dt, + Major: major, + Minor: minor, + Permissions: configs.DevicePermissions(d.Access), + Allow: d.Allow, }) } + if r.Memory != nil { + if r.Memory.Limit != nil { + c.Resources.Memory = *r.Memory.Limit + } + if r.Memory.Reservation != nil { + c.Resources.MemoryReservation = *r.Memory.Reservation + } + if r.Memory.Swap != nil { + c.Resources.MemorySwap = *r.Memory.Swap + } + if r.Memory.Kernel != nil { + c.Resources.KernelMemory = *r.Memory.Kernel + } + if r.Memory.KernelTCP != nil { + c.Resources.KernelMemoryTCP = *r.Memory.KernelTCP + } + if r.Memory.Swappiness != nil { + c.Resources.MemorySwappiness = r.Memory.Swappiness + } + if r.Memory.DisableOOMKiller != nil { + c.Resources.OomKillDisable = *r.Memory.DisableOOMKiller + } + } + if r.CPU != nil { + if r.CPU.Shares != nil { + c.Resources.CpuShares = *r.CPU.Shares + + //CpuWeight is used for cgroupv2 and should be converted + c.Resources.CpuWeight = cgroups.ConvertCPUSharesToCgroupV2Value(c.Resources.CpuShares) + } + if r.CPU.Quota != nil { + c.Resources.CpuQuota = *r.CPU.Quota + } + if r.CPU.Period != nil { + c.Resources.CpuPeriod = *r.CPU.Period + } + if r.CPU.RealtimeRuntime != nil { + c.Resources.CpuRtRuntime = *r.CPU.RealtimeRuntime + } + if r.CPU.RealtimePeriod != nil { + c.Resources.CpuRtPeriod = *r.CPU.RealtimePeriod + } + if r.CPU.Cpus != "" { + c.Resources.CpusetCpus = r.CPU.Cpus + } + if r.CPU.Mems != "" { + c.Resources.CpusetMems = r.CPU.Mems + } + } + if r.Pids != nil { + c.Resources.PidsLimit = r.Pids.Limit + } + if r.BlockIO != nil { + if r.BlockIO.Weight != nil { + c.Resources.BlkioWeight = *r.BlockIO.Weight + } + if r.BlockIO.LeafWeight != nil { + c.Resources.BlkioLeafWeight = *r.BlockIO.LeafWeight + } + if r.BlockIO.WeightDevice != nil { + for _, wd := range r.BlockIO.WeightDevice { + var weight, leafWeight uint16 + if wd.Weight != nil { + weight = *wd.Weight + } + if wd.LeafWeight != nil { + leafWeight = *wd.LeafWeight + } + weightDevice := configs.NewWeightDevice(wd.Major, wd.Minor, weight, leafWeight) + c.Resources.BlkioWeightDevice = append(c.Resources.BlkioWeightDevice, weightDevice) + } + } + if r.BlockIO.ThrottleReadBpsDevice != nil { + for _, td := range r.BlockIO.ThrottleReadBpsDevice { + rate := td.Rate + throttleDevice := configs.NewThrottleDevice(td.Major, td.Minor, rate) + c.Resources.BlkioThrottleReadBpsDevice = append(c.Resources.BlkioThrottleReadBpsDevice, throttleDevice) + } + } + if r.BlockIO.ThrottleWriteBpsDevice != nil { + for _, td := range r.BlockIO.ThrottleWriteBpsDevice { + rate := td.Rate + throttleDevice := configs.NewThrottleDevice(td.Major, td.Minor, rate) + c.Resources.BlkioThrottleWriteBpsDevice = append(c.Resources.BlkioThrottleWriteBpsDevice, throttleDevice) + } + } + if r.BlockIO.ThrottleReadIOPSDevice != nil { + for _, td := range r.BlockIO.ThrottleReadIOPSDevice { + rate := td.Rate + throttleDevice := configs.NewThrottleDevice(td.Major, td.Minor, rate) + c.Resources.BlkioThrottleReadIOPSDevice = append(c.Resources.BlkioThrottleReadIOPSDevice, throttleDevice) + } + } + if r.BlockIO.ThrottleWriteIOPSDevice != nil { + for _, td := range r.BlockIO.ThrottleWriteIOPSDevice { + rate := td.Rate + throttleDevice := configs.NewThrottleDevice(td.Major, td.Minor, rate) + c.Resources.BlkioThrottleWriteIOPSDevice = append(c.Resources.BlkioThrottleWriteIOPSDevice, throttleDevice) + } + } + } + for _, l := range r.HugepageLimits { + c.Resources.HugetlbLimit = append(c.Resources.HugetlbLimit, &configs.HugepageLimit{ + Pagesize: l.Pagesize, + Limit: l.Limit, + }) + } + if r.Network != nil { + if r.Network.ClassID != nil { + c.Resources.NetClsClassid = *r.Network.ClassID + } + for _, m := range r.Network.Priorities { + c.Resources.NetPrioIfpriomap = append(c.Resources.NetPrioIfpriomap, &configs.IfPrioMap{ + Interface: m.Name, + Priority: int64(m.Priority), + }) + } + } } } - // append the default allowed devices to the end of the list - c.Resources.Devices = append(c.Resources.Devices, AllowedDevices...) + // Append the default allowed devices to the end of the list. + // XXX: Really this should be prefixed... + for _, device := range AllowedDevices { + c.Resources.Devices = append(c.Resources.Devices, &device.DeviceRule) + } return c, nil } -func stringToCgroupDeviceRune(s string) (rune, error) { +func stringToCgroupDeviceRune(s string) (configs.DeviceType, error) { switch s { case "a": - return 'a', nil + return configs.WildcardDevice, nil case "b": - return 'b', nil + return configs.BlockDevice, nil case "c": - return 'c', nil + return configs.CharDevice, nil default: return 0, fmt.Errorf("invalid cgroup device type %q", s) } } -func stringToDeviceRune(s string) (rune, error) { +func stringToDeviceRune(s string) (configs.DeviceType, error) { switch s { case "p": - return 'p', nil - case "u": - return 'u', nil + return configs.FifoDevice, nil + case "u", "c": + return configs.CharDevice, nil case "b": - return 'b', nil - case "c": - return 'c', nil + return configs.BlockDevice, nil default: return 0, fmt.Errorf("invalid device type %q", s) } } func createDevices(spec *specs.Spec, config *configs.Config) error { - // add whitelisted devices - config.Devices = []*configs.Device{ - { - Type: 'c', - Path: "/dev/null", - Major: 1, - Minor: 3, - FileMode: 0666, - Uid: 0, - Gid: 0, - }, - { - Type: 'c', - Path: "/dev/random", - Major: 1, - Minor: 8, - FileMode: 0666, - Uid: 0, - Gid: 0, - }, - { - Type: 'c', - Path: "/dev/full", - Major: 1, - Minor: 7, - FileMode: 0666, - Uid: 0, - Gid: 0, - }, - { - Type: 'c', - Path: "/dev/tty", - Major: 5, - Minor: 0, - FileMode: 0666, - Uid: 0, - Gid: 0, - }, - { - Type: 'c', - Path: "/dev/zero", - Major: 1, - Minor: 5, - FileMode: 0666, - Uid: 0, - Gid: 0, - }, - { - Type: 'c', - Path: "/dev/urandom", - Major: 1, - Minor: 9, - FileMode: 0666, - Uid: 0, - Gid: 0, - }, + // Add default set of devices. + for _, device := range AllowedDevices { + if device.Path != "" { + config.Devices = append(config.Devices, device) + } } - // merge in additional devices from the spec + // Merge in additional devices from the spec. if spec.Linux != nil { for _, d := range spec.Linux.Devices { var uid, gid uint32 @@ -606,10 +677,12 @@ func createDevices(spec *specs.Spec, config *configs.Config) error { filemode = *d.FileMode } device := &configs.Device{ - Type: dt, + DeviceRule: configs.DeviceRule{ + Type: dt, + Major: d.Major, + Minor: d.Minor, + }, Path: d.Path, - Major: d.Major, - Minor: d.Minor, FileMode: filemode, Uid: uid, Gid: gid, @@ -779,9 +852,10 @@ func SetupSeccomp(config *specs.LinuxSeccomp) (*configs.Seccomp, error) { for _, name := range call.Names { newCall := configs.Syscall{ - Name: name, - Action: newAction, - Args: []*configs.Arg{}, + Name: name, + Action: newAction, + ErrnoRet: call.ErrnoRet, + Args: []*configs.Arg{}, } // Loop through all the arguments of the syscall and convert them for _, arg := range call.Args { @@ -807,20 +881,31 @@ func SetupSeccomp(config *specs.LinuxSeccomp) (*configs.Seccomp, error) { } func createHooks(rspec *specs.Spec, config *configs.Config) { - config.Hooks = &configs.Hooks{} + config.Hooks = configs.Hooks{} if rspec.Hooks != nil { - for _, h := range rspec.Hooks.Prestart { cmd := createCommandHook(h) - config.Hooks.Prestart = append(config.Hooks.Prestart, configs.NewCommandHook(cmd)) + config.Hooks[configs.Prestart] = append(config.Hooks[configs.Prestart], configs.NewCommandHook(cmd)) + } + for _, h := range rspec.Hooks.CreateRuntime { + cmd := createCommandHook(h) + config.Hooks[configs.CreateRuntime] = append(config.Hooks[configs.CreateRuntime], configs.NewCommandHook(cmd)) + } + for _, h := range rspec.Hooks.CreateContainer { + cmd := createCommandHook(h) + config.Hooks[configs.CreateContainer] = append(config.Hooks[configs.CreateContainer], configs.NewCommandHook(cmd)) + } + for _, h := range rspec.Hooks.StartContainer { + cmd := createCommandHook(h) + config.Hooks[configs.StartContainer] = append(config.Hooks[configs.StartContainer], configs.NewCommandHook(cmd)) } for _, h := range rspec.Hooks.Poststart { cmd := createCommandHook(h) - config.Hooks.Poststart = append(config.Hooks.Poststart, configs.NewCommandHook(cmd)) + config.Hooks[configs.Poststart] = append(config.Hooks[configs.Poststart], configs.NewCommandHook(cmd)) } for _, h := range rspec.Hooks.Poststop { cmd := createCommandHook(h) - config.Hooks.Poststop = append(config.Hooks.Poststop, configs.NewCommandHook(cmd)) + config.Hooks[configs.Poststop] = append(config.Hooks[configs.Poststop], configs.NewCommandHook(cmd)) } } } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go index 4e03b8bc058..b20ce1485f8 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go @@ -7,16 +7,15 @@ import ( "os" "os/exec" "runtime" - "syscall" //only for Exec "github.com/opencontainers/runc/libcontainer/apparmor" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/keys" "github.com/opencontainers/runc/libcontainer/seccomp" "github.com/opencontainers/runc/libcontainer/system" - "github.com/opencontainers/selinux/go-selinux/label" + "github.com/opencontainers/runtime-spec/specs-go" + "github.com/opencontainers/selinux/go-selinux" "github.com/pkg/errors" - "golang.org/x/sys/unix" ) @@ -48,10 +47,10 @@ func (l *linuxStandardInit) Init() error { runtime.LockOSThread() defer runtime.UnlockOSThread() if !l.config.Config.NoNewKeyring { - if err := label.SetKeyLabel(l.config.ProcessLabel); err != nil { + if err := selinux.SetKeyLabel(l.config.ProcessLabel); err != nil { return err } - defer label.SetKeyLabel("") + defer selinux.SetKeyLabel("") ringname, keepperms, newperms := l.getSessionRingParams() // Do not inherit the parent's session keyring. @@ -84,7 +83,8 @@ func (l *linuxStandardInit) Init() error { return err } - label.Init() + // initialises the labeling system + selinux.GetEnabled() if err := prepareRootfs(l.pipe, l.config); err != nil { return err } @@ -146,10 +146,10 @@ func (l *linuxStandardInit) Init() error { if err := syncParentReady(l.pipe); err != nil { return errors.Wrap(err, "sync ready") } - if err := label.SetProcessLabel(l.config.ProcessLabel); err != nil { + if err := selinux.SetExecLabel(l.config.ProcessLabel); err != nil { return errors.Wrap(err, "set process label") } - defer label.SetProcessLabel("") + defer selinux.SetExecLabel("") // Without NoNewPrivileges seccomp is a privileged operation, so we need to // do this before dropping capabilities; otherwise do it as late as possible // just before execve so as few syscalls take place after it as possible. @@ -207,7 +207,15 @@ func (l *linuxStandardInit) Init() error { return newSystemErrorWithCause(err, "init seccomp") } } - if err := syscall.Exec(name, l.config.Args[0:], os.Environ()); err != nil { + + s := l.config.SpecState + s.Pid = unix.Getpid() + s.Status = specs.StateCreated + if err := l.config.Config.Hooks[configs.StartContainer].RunHooks(s); err != nil { + return err + } + + if err := unix.Exec(name, l.config.Args[0:], os.Environ()); err != nil { return newSystemErrorWithCause(err, "exec user process") } return nil diff --git a/vendor/github.com/opencontainers/runc/libcontainer/state_linux.go b/vendor/github.com/opencontainers/runc/libcontainer/state_linux.go index 5c16a423f74..0deb22d1f94 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/state_linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/state_linux.go @@ -8,7 +8,7 @@ import ( "path/filepath" "github.com/opencontainers/runc/libcontainer/configs" - + "github.com/opencontainers/runtime-spec/specs-go" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" ) @@ -61,17 +61,21 @@ func destroy(c *linuxContainer) error { } func runPoststopHooks(c *linuxContainer) error { - if c.config.Hooks != nil { - s, err := c.currentOCIState() - if err != nil { - return err - } - for _, hook := range c.config.Hooks.Poststop { - if err := hook.Run(s); err != nil { - return err - } - } + hooks := c.config.Hooks + if hooks == nil { + return nil } + + s, err := c.currentOCIState() + if err != nil { + return err + } + s.Status = specs.StateStopped + + if err := hooks[configs.Poststop].RunHooks(s); err != nil { + return err + } + return nil } @@ -111,11 +115,7 @@ func (r *runningState) status() Status { func (r *runningState) transition(s containerState) error { switch s.(type) { case *stoppedState: - t, err := r.c.runType() - if err != nil { - return err - } - if t == Running { + if r.c.runType() == Running { return newGenericError(fmt.Errorf("container still running"), ContainerNotStopped) } r.c.state = s @@ -130,11 +130,7 @@ func (r *runningState) transition(s containerState) error { } func (r *runningState) destroy() error { - t, err := r.c.runType() - if err != nil { - return err - } - if t == Running { + if r.c.runType() == Running { return newGenericError(fmt.Errorf("container is not destroyed"), ContainerNotStopped) } return destroy(r.c) @@ -186,10 +182,7 @@ func (p *pausedState) transition(s containerState) error { } func (p *pausedState) destroy() error { - t, err := p.c.runType() - if err != nil { - return err - } + t := p.c.runType() if t != Running && t != Created { if err := p.c.cgroupManager.Freeze(configs.Thawed); err != nil { return err diff --git a/vendor/github.com/opencontainers/runc/libcontainer/sync.go b/vendor/github.com/opencontainers/runc/libcontainer/sync.go index a8704a2679d..ac88ad22a8f 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/sync.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/sync.go @@ -2,6 +2,7 @@ package libcontainer import ( "encoding/json" + "errors" "fmt" "io" @@ -19,11 +20,6 @@ type syncType string // procHooks --> [run hooks] // <-- procResume // -// procConsole --> -// <-- procConsoleReq -// [send(fd)] --> [recv(fd)] -// <-- procConsoleAck -// // procReady --> [final setup] // <-- procRun const ( @@ -50,22 +46,23 @@ func readSync(pipe io.Reader, expected syncType) error { var procSync syncT if err := json.NewDecoder(pipe).Decode(&procSync); err != nil { if err == io.EOF { - return fmt.Errorf("parent closed synchronisation channel") + return errors.New("parent closed synchronisation channel") + } + return fmt.Errorf("failed reading error from parent: %v", err) + } + + if procSync.Type == procError { + var ierr genericError + + if err := json.NewDecoder(pipe).Decode(&ierr); err != nil { + return fmt.Errorf("failed reading error from parent: %v", err) } - if procSync.Type == procError { - var ierr genericError + return &ierr + } - if err := json.NewDecoder(pipe).Decode(&ierr); err != nil { - return fmt.Errorf("failed reading error from parent: %v", err) - } - - return &ierr - } - - if procSync.Type != expected { - return fmt.Errorf("invalid synchronisation flag from parent") - } + if procSync.Type != expected { + return errors.New("invalid synchronisation flag from parent") } return nil } diff --git a/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go b/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go index a4ae8901acc..49471960be5 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go @@ -5,26 +5,13 @@ package system import ( "os" "os/exec" - "syscall" // only for exec + "sync" "unsafe" "github.com/opencontainers/runc/libcontainer/user" "golang.org/x/sys/unix" ) -// If arg2 is nonzero, set the "child subreaper" attribute of the -// calling process; if arg2 is zero, unset the attribute. When a -// process is marked as a child subreaper, all of the children -// that it creates, and their descendants, will be marked as -// having a subreaper. In effect, a subreaper fulfills the role -// of init(1) for its descendant processes. Upon termination of -// a process that is orphaned (i.e., its immediate parent has -// already terminated) and marked as having a subreaper, the -// nearest still living ancestor subreaper will receive a SIGCHLD -// signal and be able to wait(2) on the process to discover its -// termination status. -const PR_SET_CHILD_SUBREAPER = 36 - type ParentDeathSignal int func (p ParentDeathSignal) Restore() error { @@ -51,7 +38,7 @@ func Execv(cmd string, args []string, env []string) error { return err } - return syscall.Exec(name, args, env) + return unix.Exec(name, args, env) } func Prlimit(pid, resource int, limit unix.Rlimit) error { @@ -100,15 +87,23 @@ func Setctty() error { return nil } +var ( + inUserNS bool + nsOnce sync.Once +) + // RunningInUserNS detects whether we are currently running in a user namespace. // Originally copied from github.com/lxc/lxd/shared/util.go func RunningInUserNS() bool { - uidmap, err := user.CurrentProcessUIDMap() - if err != nil { - // This kernel-provided file only exists if user namespaces are supported - return false - } - return UIDMapInUserNS(uidmap) + nsOnce.Do(func() { + uidmap, err := user.CurrentProcessUIDMap() + if err != nil { + // This kernel-provided file only exists if user namespaces are supported + return + } + inUserNS = UIDMapInUserNS(uidmap) + }) + return inUserNS } func UIDMapInUserNS(uidmap []user.IDMap) bool { @@ -140,7 +135,7 @@ func GetParentNSeuid() int64 { // SetSubreaper sets the value i as the subreaper setting for the calling process func SetSubreaper(i int) error { - return unix.Prctl(PR_SET_CHILD_SUBREAPER, uintptr(i), 0, 0, 0) + return unix.Prctl(unix.PR_SET_CHILD_SUBREAPER, uintptr(i), 0, 0, 0) } // GetSubreaper returns the subreaper setting for the calling process diff --git a/vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig.go b/vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig.go deleted file mode 100644 index b8434f10500..00000000000 --- a/vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build cgo,linux - -package system - -/* -#include -*/ -import "C" - -func GetClockTicks() int { - return int(C.sysconf(C._SC_CLK_TCK)) -} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig_notcgo.go b/vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig_notcgo.go deleted file mode 100644 index d93b5d5fdf2..00000000000 --- a/vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig_notcgo.go +++ /dev/null @@ -1,15 +0,0 @@ -// +build !cgo windows - -package system - -func GetClockTicks() int { - // TODO figure out a better alternative for platforms where we're missing cgo - // - // TODO Windows. This could be implemented using Win32 QueryPerformanceFrequency(). - // https://msdn.microsoft.com/en-us/library/windows/desktop/ms644905(v=vs.85).aspx - // - // An example of its usage can be found here. - // https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx - - return 100 -} diff --git a/vendor/github.com/opencontainers/runc/libcontainer/user/user.go b/vendor/github.com/opencontainers/runc/libcontainer/user/user.go index 7b912bbf8b4..4b89dad7376 100644 --- a/vendor/github.com/opencontainers/runc/libcontainer/user/user.go +++ b/vendor/github.com/opencontainers/runc/libcontainer/user/user.go @@ -60,7 +60,7 @@ type Group struct { // groupFromOS converts an os/user.(*Group) to local Group // -// (This does not include Pass, Shell or Gecos) +// (This does not include Pass or List) func groupFromOS(g *user.Group) (Group, error) { newGroup := Group{ Name: g.Name, @@ -162,10 +162,6 @@ func ParsePasswdFilter(r io.Reader, filter func(User) bool) ([]User, error) { ) for s.Scan() { - if err := s.Err(); err != nil { - return nil, err - } - line := strings.TrimSpace(s.Text()) if line == "" { continue @@ -183,6 +179,9 @@ func ParsePasswdFilter(r io.Reader, filter func(User) bool) ([]User, error) { out = append(out, p) } } + if err := s.Err(); err != nil { + return nil, err + } return out, nil } @@ -221,10 +220,6 @@ func ParseGroupFilter(r io.Reader, filter func(Group) bool) ([]Group, error) { ) for s.Scan() { - if err := s.Err(); err != nil { - return nil, err - } - text := s.Text() if text == "" { continue @@ -242,6 +237,9 @@ func ParseGroupFilter(r io.Reader, filter func(Group) bool) ([]Group, error) { out = append(out, p) } } + if err := s.Err(); err != nil { + return nil, err + } return out, nil } @@ -532,10 +530,6 @@ func ParseSubIDFilter(r io.Reader, filter func(SubID) bool) ([]SubID, error) { ) for s.Scan() { - if err := s.Err(); err != nil { - return nil, err - } - line := strings.TrimSpace(s.Text()) if line == "" { continue @@ -549,6 +543,9 @@ func ParseSubIDFilter(r io.Reader, filter func(SubID) bool) ([]SubID, error) { out = append(out, p) } } + if err := s.Err(); err != nil { + return nil, err + } return out, nil } @@ -586,10 +583,6 @@ func ParseIDMapFilter(r io.Reader, filter func(IDMap) bool) ([]IDMap, error) { ) for s.Scan() { - if err := s.Err(); err != nil { - return nil, err - } - line := strings.TrimSpace(s.Text()) if line == "" { continue @@ -603,6 +596,9 @@ func ParseIDMapFilter(r io.Reader, filter func(IDMap) bool) ([]IDMap, error) { out = append(out, p) } } + if err := s.Err(); err != nil { + return nil, err + } return out, nil } diff --git a/vendor/github.com/opencontainers/runc/list.go b/vendor/github.com/opencontainers/runc/list.go index 0313d8cc250..04dfca0745e 100644 --- a/vendor/github.com/opencontainers/runc/list.go +++ b/vendor/github.com/opencontainers/runc/list.go @@ -3,6 +3,7 @@ package main import ( + "errors" "fmt" "io/ioutil" "os" @@ -107,7 +108,7 @@ To list containers created using a non-default value for "--root": return err } default: - return fmt.Errorf("invalid format option") + return errors.New("invalid format option") } return nil }, diff --git a/vendor/github.com/opencontainers/runc/main.go b/vendor/github.com/opencontainers/runc/main.go index 3a8c1631db9..fd1ad5ff17c 100644 --- a/vendor/github.com/opencontainers/runc/main.go +++ b/vendor/github.com/opencontainers/runc/main.go @@ -64,19 +64,12 @@ func main() { v = append(v, fmt.Sprintf("spec: %s", specs.Version)) app.Version = strings.Join(v, "\n") + xdgRuntimeDir := "" root := "/run/runc" if shouldHonorXDGRuntimeDir() { if runtimeDir := os.Getenv("XDG_RUNTIME_DIR"); runtimeDir != "" { root = runtimeDir + "/runc" - // According to the XDG specification, we need to set anything in - // XDG_RUNTIME_DIR to have a sticky bit if we don't want it to get - // auto-pruned. - if err := os.MkdirAll(root, 0700); err != nil { - fatal(err) - } - if err := os.Chmod(root, 0700|os.ModeSticky); err != nil { - fatal(err) - } + xdgRuntimeDir = root } } @@ -135,6 +128,19 @@ func main() { updateCommand, } app.Before = func(context *cli.Context) error { + if !context.IsSet("root") && xdgRuntimeDir != "" { + // According to the XDG specification, we need to set anything in + // XDG_RUNTIME_DIR to have a sticky bit if we don't want it to get + // auto-pruned. + if err := os.MkdirAll(root, 0700); err != nil { + fmt.Fprintln(os.Stderr, "the path in $XDG_RUNTIME_DIR must be writable by the user") + fatal(err) + } + if err := os.Chmod(root, 0700|os.ModeSticky); err != nil { + fmt.Fprintln(os.Stderr, "you should check permission of the path in $XDG_RUNTIME_DIR") + fatal(err) + } + } return logs.ConfigureLogging(createLogConfig(context)) } @@ -153,7 +159,10 @@ type FatalWriter struct { func (f *FatalWriter) Write(p []byte) (n int, err error) { logrus.Error(string(p)) - return f.cliErrWriter.Write(p) + if !logrusToStderr() { + return f.cliErrWriter.Write(p) + } + return len(p), nil } func createLogConfig(context *cli.Context) logs.Config { diff --git a/vendor/github.com/opencontainers/runc/notify_socket.go b/vendor/github.com/opencontainers/runc/notify_socket.go index e7453c62220..f313a7a6847 100644 --- a/vendor/github.com/opencontainers/runc/notify_socket.go +++ b/vendor/github.com/opencontainers/runc/notify_socket.go @@ -7,11 +7,13 @@ import ( "fmt" "net" "os" + "path" "path/filepath" + "strconv" + "time" + "github.com/opencontainers/runc/libcontainer" "github.com/opencontainers/runtime-spec/specs-go" - - "github.com/sirupsen/logrus" "github.com/urfave/cli" ) @@ -27,12 +29,12 @@ func newNotifySocket(context *cli.Context, notifySocketHost string, id string) * } root := filepath.Join(context.GlobalString("root"), id) - path := filepath.Join(root, "notify.sock") + socketPath := filepath.Join(root, "notify", "notify.sock") notifySocket := ¬ifySocket{ socket: nil, host: notifySocketHost, - socketPath: path, + socketPath: socketPath, } return notifySocket @@ -44,13 +46,19 @@ func (s *notifySocket) Close() error { // If systemd is supporting sd_notify protocol, this function will add support // for sd_notify protocol from within the container. -func (s *notifySocket) setupSpec(context *cli.Context, spec *specs.Spec) { - mount := specs.Mount{Destination: s.host, Source: s.socketPath, Options: []string{"bind"}} +func (s *notifySocket) setupSpec(context *cli.Context, spec *specs.Spec) error { + pathInContainer := filepath.Join("/run/notify", path.Base(s.socketPath)) + mount := specs.Mount{ + Destination: path.Dir(pathInContainer), + Source: path.Dir(s.socketPath), + Options: []string{"bind", "nosuid", "noexec", "nodev", "ro"}, + } spec.Mounts = append(spec.Mounts, mount) - spec.Process.Env = append(spec.Process.Env, fmt.Sprintf("NOTIFY_SOCKET=%s", s.host)) + spec.Process.Env = append(spec.Process.Env, fmt.Sprintf("NOTIFY_SOCKET=%s", pathInContainer)) + return nil } -func (s *notifySocket) setupSocket() error { +func (s *notifySocket) bindSocket() error { addr := net.UnixAddr{ Name: s.socketPath, Net: "unixgram", @@ -71,46 +79,92 @@ func (s *notifySocket) setupSocket() error { return nil } -// pid1 must be set only with -d, as it is used to set the new process as the main process -// for the service in systemd -func (s *notifySocket) run(pid1 int) { - buf := make([]byte, 512) - notifySocketHostAddr := net.UnixAddr{Name: s.host, Net: "unixgram"} +func (s *notifySocket) setupSocketDirectory() error { + return os.Mkdir(path.Dir(s.socketPath), 0755) +} + +func notifySocketStart(context *cli.Context, notifySocketHost, id string) (*notifySocket, error) { + notifySocket := newNotifySocket(context, notifySocketHost, id) + if notifySocket == nil { + return nil, nil + } + + if err := notifySocket.bindSocket(); err != nil { + return nil, err + } + return notifySocket, nil +} + +func (n *notifySocket) waitForContainer(container libcontainer.Container) error { + s, err := container.State() + if err != nil { + return err + } + return n.run(s.InitProcessPid) +} + +func (n *notifySocket) run(pid1 int) error { + if n.socket == nil { + return nil + } + notifySocketHostAddr := net.UnixAddr{Name: n.host, Net: "unixgram"} client, err := net.DialUnix("unixgram", nil, ¬ifySocketHostAddr) if err != nil { - logrus.Error(err) - return + return err } - for { - r, err := s.socket.Read(buf) - if err != nil { - break - } - var out bytes.Buffer - for _, line := range bytes.Split(buf[0:r], []byte{'\n'}) { - if bytes.HasPrefix(line, []byte("READY=")) { - _, err = out.Write(line) - if err != nil { - return - } - _, err = out.Write([]byte{'\n'}) - if err != nil { - return - } + ticker := time.NewTicker(time.Millisecond * 100) + defer ticker.Stop() - _, err = client.Write(out.Bytes()) - if err != nil { - return - } - - // now we can inform systemd to use pid1 as the pid to monitor - if pid1 > 0 { - newPid := fmt.Sprintf("MAINPID=%d\n", pid1) - client.Write([]byte(newPid)) - } + fileChan := make(chan []byte) + go func() { + for { + buf := make([]byte, 4096) + r, err := n.socket.Read(buf) + if err != nil { return } + got := buf[0:r] + // systemd-ready sends a single datagram with the state string as payload, + // so we don't need to worry about partial messages. + for _, line := range bytes.Split(got, []byte{'\n'}) { + if bytes.HasPrefix(got, []byte("READY=")) { + fileChan <- line + return + } + } + + } + }() + + for { + select { + case <-ticker.C: + _, err := os.Stat(filepath.Join("/proc", strconv.Itoa(pid1))) + if err != nil { + return nil + } + case b := <-fileChan: + var out bytes.Buffer + _, err = out.Write(b) + if err != nil { + return err + } + + _, err = out.Write([]byte{'\n'}) + if err != nil { + return err + } + + _, err = client.Write(out.Bytes()) + if err != nil { + return err + } + + // now we can inform systemd to use pid1 as the pid to monitor + newPid := fmt.Sprintf("MAINPID=%d\n", pid1) + client.Write([]byte(newPid)) + return nil } } } diff --git a/vendor/github.com/opencontainers/runc/ps.go b/vendor/github.com/opencontainers/runc/ps.go index e7f635f4f49..ffe00f37c52 100644 --- a/vendor/github.com/opencontainers/runc/ps.go +++ b/vendor/github.com/opencontainers/runc/ps.go @@ -4,6 +4,7 @@ package main import ( "encoding/json" + "errors" "fmt" "os" "os/exec" @@ -52,11 +53,11 @@ var psCommand = cli.Command{ case "json": return json.NewEncoder(os.Stdout).Encode(pids) default: - return fmt.Errorf("invalid format option") + return errors.New("invalid format option") } // [1:] is to remove command name, ex: - // context.Args(): [containet_id ps_arg1 ps_arg2 ...] + // context.Args(): [container_id ps_arg1 ps_arg2 ...] // psArgs: [ps_arg1 ps_arg2 ...] // psArgs := context.Args()[1:] @@ -109,5 +110,5 @@ func getPidIndex(title string) (int, error) { } } - return pidIndex, fmt.Errorf("couldn't find PID field in ps output") + return pidIndex, errors.New("couldn't find PID field in ps output") } diff --git a/vendor/github.com/opencontainers/runc/restore.go b/vendor/github.com/opencontainers/runc/restore.go index 53f50d2ecd5..ec7308221f0 100644 --- a/vendor/github.com/opencontainers/runc/restore.go +++ b/vendor/github.com/opencontainers/runc/restore.go @@ -137,6 +137,6 @@ func criuOptions(context *cli.Context) *libcontainer.CriuOpts { PreDump: context.Bool("pre-dump"), AutoDedup: context.Bool("auto-dedup"), LazyPages: context.Bool("lazy-pages"), - StatusFd: context.String("status-fd"), + StatusFd: context.Int("status-fd"), } } diff --git a/vendor/github.com/opencontainers/runc/rlimit_linux.go b/vendor/github.com/opencontainers/runc/rlimit_linux.go index c97a0fb4e82..c94629511cd 100644 --- a/vendor/github.com/opencontainers/runc/rlimit_linux.go +++ b/vendor/github.com/opencontainers/runc/rlimit_linux.go @@ -1,43 +1,25 @@ package main import "fmt" - -const ( - RLIMIT_CPU = iota // CPU time in sec - RLIMIT_FSIZE // Maximum filesize - RLIMIT_DATA // max data size - RLIMIT_STACK // max stack size - RLIMIT_CORE // max core file size - RLIMIT_RSS // max resident set size - RLIMIT_NPROC // max number of processes - RLIMIT_NOFILE // max number of open files - RLIMIT_MEMLOCK // max locked-in-memory address space - RLIMIT_AS // address space limit - RLIMIT_LOCKS // maximum file locks held - RLIMIT_SIGPENDING // max number of pending signals - RLIMIT_MSGQUEUE // maximum bytes in POSIX mqueues - RLIMIT_NICE // max nice prio allowed to raise to - RLIMIT_RTPRIO // maximum realtime priority - RLIMIT_RTTIME // timeout for RT tasks in us -) +import "golang.org/x/sys/unix" var rlimitMap = map[string]int{ - "RLIMIT_CPU": RLIMIT_CPU, - "RLIMIT_FSIZE": RLIMIT_FSIZE, - "RLIMIT_DATA": RLIMIT_DATA, - "RLIMIT_STACK": RLIMIT_STACK, - "RLIMIT_CORE": RLIMIT_CORE, - "RLIMIT_RSS": RLIMIT_RSS, - "RLIMIT_NPROC": RLIMIT_NPROC, - "RLIMIT_NOFILE": RLIMIT_NOFILE, - "RLIMIT_MEMLOCK": RLIMIT_MEMLOCK, - "RLIMIT_AS": RLIMIT_AS, - "RLIMIT_LOCKS": RLIMIT_LOCKS, - "RLIMIT_SIGPENDING": RLIMIT_SIGPENDING, - "RLIMIT_MSGQUEUE": RLIMIT_MSGQUEUE, - "RLIMIT_NICE": RLIMIT_NICE, - "RLIMIT_RTPRIO": RLIMIT_RTPRIO, - "RLIMIT_RTTIME": RLIMIT_RTTIME, + "RLIMIT_CPU": unix.RLIMIT_CPU, + "RLIMIT_FSIZE": unix.RLIMIT_FSIZE, + "RLIMIT_DATA": unix.RLIMIT_DATA, + "RLIMIT_STACK": unix.RLIMIT_STACK, + "RLIMIT_CORE": unix.RLIMIT_CORE, + "RLIMIT_RSS": unix.RLIMIT_RSS, + "RLIMIT_NPROC": unix.RLIMIT_NPROC, + "RLIMIT_NOFILE": unix.RLIMIT_NOFILE, + "RLIMIT_MEMLOCK": unix.RLIMIT_MEMLOCK, + "RLIMIT_AS": unix.RLIMIT_AS, + "RLIMIT_LOCKS": unix.RLIMIT_LOCKS, + "RLIMIT_SIGPENDING": unix.RLIMIT_SIGPENDING, + "RLIMIT_MSGQUEUE": unix.RLIMIT_MSGQUEUE, + "RLIMIT_NICE": unix.RLIMIT_NICE, + "RLIMIT_RTPRIO": unix.RLIMIT_RTPRIO, + "RLIMIT_RTTIME": unix.RLIMIT_RTTIME, } func strToRlimit(key string) (int, error) { diff --git a/vendor/github.com/opencontainers/runc/rootless_linux.go b/vendor/github.com/opencontainers/runc/rootless_linux.go index 3c425dc6553..78d840dbab6 100644 --- a/vendor/github.com/opencontainers/runc/rootless_linux.go +++ b/vendor/github.com/opencontainers/runc/rootless_linux.go @@ -19,10 +19,6 @@ func shouldUseRootlessCgroupManager(context *cli.Context) (bool, error) { if b != nil { return *b, nil } - - if context.GlobalBool("systemd-cgroup") { - return false, nil - } } if os.Geteuid() != 0 { return true, nil diff --git a/vendor/github.com/opencontainers/runc/signalmap.go b/vendor/github.com/opencontainers/runc/signalmap.go deleted file mode 100644 index f9a6347730b..00000000000 --- a/vendor/github.com/opencontainers/runc/signalmap.go +++ /dev/null @@ -1,47 +0,0 @@ -// +build linux -// +build !mips,!mipsle,!mips64,!mips64le - -package main - -import ( - "syscall" - - "golang.org/x/sys/unix" -) - -var signalMap = map[string]syscall.Signal{ - "ABRT": unix.SIGABRT, - "ALRM": unix.SIGALRM, - "BUS": unix.SIGBUS, - "CHLD": unix.SIGCHLD, - "CLD": unix.SIGCLD, - "CONT": unix.SIGCONT, - "FPE": unix.SIGFPE, - "HUP": unix.SIGHUP, - "ILL": unix.SIGILL, - "INT": unix.SIGINT, - "IO": unix.SIGIO, - "IOT": unix.SIGIOT, - "KILL": unix.SIGKILL, - "PIPE": unix.SIGPIPE, - "POLL": unix.SIGPOLL, - "PROF": unix.SIGPROF, - "PWR": unix.SIGPWR, - "QUIT": unix.SIGQUIT, - "SEGV": unix.SIGSEGV, - "STKFLT": unix.SIGSTKFLT, - "STOP": unix.SIGSTOP, - "SYS": unix.SIGSYS, - "TERM": unix.SIGTERM, - "TRAP": unix.SIGTRAP, - "TSTP": unix.SIGTSTP, - "TTIN": unix.SIGTTIN, - "TTOU": unix.SIGTTOU, - "URG": unix.SIGURG, - "USR1": unix.SIGUSR1, - "USR2": unix.SIGUSR2, - "VTALRM": unix.SIGVTALRM, - "WINCH": unix.SIGWINCH, - "XCPU": unix.SIGXCPU, - "XFSZ": unix.SIGXFSZ, -} diff --git a/vendor/github.com/opencontainers/runc/signalmap_mipsx.go b/vendor/github.com/opencontainers/runc/signalmap_mipsx.go deleted file mode 100644 index 046bf152994..00000000000 --- a/vendor/github.com/opencontainers/runc/signalmap_mipsx.go +++ /dev/null @@ -1,45 +0,0 @@ -// +build linux,mips linux,mipsle linux,mips64 linux,mips64le - -package main - -import ( - "syscall" - - "golang.org/x/sys/unix" -) - -var signalMap = map[string]syscall.Signal{ - "ABRT": unix.SIGABRT, - "ALRM": unix.SIGALRM, - "BUS": unix.SIGBUS, - "CHLD": unix.SIGCHLD, - "CLD": unix.SIGCLD, - "CONT": unix.SIGCONT, - "FPE": unix.SIGFPE, - "HUP": unix.SIGHUP, - "ILL": unix.SIGILL, - "INT": unix.SIGINT, - "IO": unix.SIGIO, - "IOT": unix.SIGIOT, - "KILL": unix.SIGKILL, - "PIPE": unix.SIGPIPE, - "POLL": unix.SIGPOLL, - "PROF": unix.SIGPROF, - "PWR": unix.SIGPWR, - "QUIT": unix.SIGQUIT, - "SEGV": unix.SIGSEGV, - "STOP": unix.SIGSTOP, - "SYS": unix.SIGSYS, - "TERM": unix.SIGTERM, - "TRAP": unix.SIGTRAP, - "TSTP": unix.SIGTSTP, - "TTIN": unix.SIGTTIN, - "TTOU": unix.SIGTTOU, - "URG": unix.SIGURG, - "USR1": unix.SIGUSR1, - "USR2": unix.SIGUSR2, - "VTALRM": unix.SIGVTALRM, - "WINCH": unix.SIGWINCH, - "XCPU": unix.SIGXCPU, - "XFSZ": unix.SIGXFSZ, -} diff --git a/vendor/github.com/opencontainers/runc/signals.go b/vendor/github.com/opencontainers/runc/signals.go index b67f65a03e1..5682989c62c 100644 --- a/vendor/github.com/opencontainers/runc/signals.go +++ b/vendor/github.com/opencontainers/runc/signals.go @@ -5,7 +5,6 @@ package main import ( "os" "os/signal" - "syscall" // only for Signal "github.com/opencontainers/runc/libcontainer" "github.com/opencontainers/runc/libcontainer/system" @@ -70,6 +69,7 @@ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach h.notifySocket.run(pid1) return 0, nil } + h.notifySocket.run(os.Getpid()) go h.notifySocket.run(0) } @@ -97,15 +97,12 @@ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach // status because we must ensure that any of the go specific process // fun such as flushing pipes are complete before we return. process.Wait() - if h.notifySocket != nil { - h.notifySocket.Close() - } return e.status, nil } } default: logrus.Debugf("sending signal to process %s", s) - if err := unix.Kill(pid1, s.(syscall.Signal)); err != nil { + if err := unix.Kill(pid1, s.(unix.Signal)); err != nil { logrus.Error(err) } } diff --git a/vendor/github.com/opencontainers/runc/start.go b/vendor/github.com/opencontainers/runc/start.go index 2bb698b2095..3a1769a4344 100644 --- a/vendor/github.com/opencontainers/runc/start.go +++ b/vendor/github.com/opencontainers/runc/start.go @@ -3,6 +3,7 @@ package main import ( "errors" "fmt" + "os" "github.com/opencontainers/runc/libcontainer" "github.com/urfave/cli" @@ -31,7 +32,17 @@ your host.`, } switch status { case libcontainer.Created: - return container.Exec() + notifySocket, err := notifySocketStart(context, os.Getenv("NOTIFY_SOCKET"), container.ID()) + if err != nil { + return err + } + if err := container.Exec(); err != nil { + return err + } + if notifySocket != nil { + return notifySocket.waitForContainer(container) + } + return nil case libcontainer.Stopped: return errors.New("cannot start a container that has stopped") case libcontainer.Running: diff --git a/vendor/github.com/opencontainers/runc/types/events.go b/vendor/github.com/opencontainers/runc/types/events.go index c6f0e97a3b8..6f9a12f1596 100644 --- a/vendor/github.com/opencontainers/runc/types/events.go +++ b/vendor/github.com/opencontainers/runc/types/events.go @@ -1,5 +1,7 @@ package types +import "github.com/opencontainers/runc/libcontainer/intelrdt" + // Event struct for encoding the event data to json. type Event struct { Type string `json:"type"` @@ -55,10 +57,12 @@ type Throttling struct { type CpuUsage struct { // Units: nanoseconds. - Total uint64 `json:"total,omitempty"` - Percpu []uint64 `json:"percpu,omitempty"` - Kernel uint64 `json:"kernel"` - User uint64 `json:"user"` + Total uint64 `json:"total,omitempty"` + Percpu []uint64 `json:"percpu,omitempty"` + PercpuKernel []uint64 `json:"percpu_kernel,omitempty"` + PercpuUser []uint64 `json:"percpu_user,omitempty"` + Kernel uint64 `json:"kernel"` + User uint64 `json:"user"` } type Cpu struct { @@ -113,6 +117,12 @@ type IntelRdt struct { // The memory bandwidth schema in 'container_id' group MemBwSchema string `json:"mem_bw_schema,omitempty"` + + // The memory bandwidth monitoring statistics from NUMA nodes in 'container_id' group + MBMStats *[]intelrdt.MBMNumaNodeStats `json:"mbm_stats,omitempty"` + + // The cache monitoring technology statistics from NUMA nodes in 'container_id' group + CMTStats *[]intelrdt.CMTNumaNodeStats `json:"cmt_stats,omitempty"` } type NetworkInterface struct { diff --git a/vendor/github.com/opencontainers/runc/update.go b/vendor/github.com/opencontainers/runc/update.go index 05dc4b516ba..2a6a9d8ab4b 100644 --- a/vendor/github.com/opencontainers/runc/update.go +++ b/vendor/github.com/opencontainers/runc/update.go @@ -4,10 +4,13 @@ package main import ( "encoding/json" + "errors" "fmt" "os" "strconv" + "github.com/opencontainers/runc/libcontainer/cgroups" + "github.com/docker/go-units" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/intelrdt" @@ -248,11 +251,39 @@ other options are ignored. r.Pids.Limit = int64(context.Int("pids-limit")) } - // Update the value + // Update the values config.Cgroups.Resources.BlkioWeight = *r.BlockIO.Weight - config.Cgroups.Resources.CpuPeriod = *r.CPU.Period - config.Cgroups.Resources.CpuQuota = *r.CPU.Quota + + // Seting CPU quota and period independently does not make much sense, + // but historically runc allowed it and this needs to be supported + // to not break compatibility. + // + // For systemd cgroup drivers to set CPU quota/period correctly, + // it needs to know both values. For fs2 cgroup driver to be compatible + // with the fs driver, it also needs to know both values. + // + // Here in update, previously set values are available from config. + // If only one of {quota,period} is set and the other is not, leave + // the unset parameter at the old value (don't overwrite config). + p, q := *r.CPU.Period, *r.CPU.Quota + if (p == 0 && q == 0) || (p != 0 && q != 0) { + // both values are either set or unset (0) + config.Cgroups.Resources.CpuPeriod = p + config.Cgroups.Resources.CpuQuota = q + } else { + // one is set and the other is not + if p != 0 { + // set new period, leave quota at old value + config.Cgroups.Resources.CpuPeriod = p + } else if q != 0 { + // set new quota, leave period at old value + config.Cgroups.Resources.CpuQuota = q + } + } + config.Cgroups.Resources.CpuShares = *r.CPU.Shares + //CpuWeight is used for cgroupv2 and should be converted + config.Cgroups.Resources.CpuWeight = cgroups.ConvertCPUSharesToCgroupV2Value(*r.CPU.Shares) config.Cgroups.Resources.CpuRtPeriod = *r.CPU.RealtimePeriod config.Cgroups.Resources.CpuRtRuntime = *r.CPU.RealtimeRuntime config.Cgroups.Resources.CpusetCpus = r.CPU.Cpus @@ -268,11 +299,11 @@ other options are ignored. l3CacheSchema := context.String("l3-cache-schema") memBwSchema := context.String("mem-bw-schema") if l3CacheSchema != "" && !intelrdt.IsCatEnabled() { - return fmt.Errorf("Intel RDT/CAT: l3 cache schema is not enabled") + return errors.New("Intel RDT/CAT: l3 cache schema is not enabled") } if memBwSchema != "" && !intelrdt.IsMbaEnabled() { - return fmt.Errorf("Intel RDT/MBA: memory bandwidth schema is not enabled") + return errors.New("Intel RDT/MBA: memory bandwidth schema is not enabled") } if l3CacheSchema != "" || memBwSchema != "" { diff --git a/vendor/github.com/opencontainers/runc/utils.go b/vendor/github.com/opencontainers/runc/utils.go index 5165336fba7..c687a4782d6 100644 --- a/vendor/github.com/opencontainers/runc/utils.go +++ b/vendor/github.com/opencontainers/runc/utils.go @@ -45,12 +45,20 @@ func checkArgs(context *cli.Context, expected, checkType int) error { return nil } +func logrusToStderr() bool { + l, ok := logrus.StandardLogger().Out.(*os.File) + return ok && l.Fd() == os.Stderr.Fd() +} + // fatal prints the error's details if it is a libcontainer specific error type // then exits the program with an exit status of 1. func fatal(err error) { // make sure the error is written to the logger logrus.Error(err) - fmt.Fprintln(os.Stderr, err) + if !logrusToStderr() { + fmt.Fprintln(os.Stderr, err) + } + os.Exit(1) } diff --git a/vendor/github.com/opencontainers/runc/utils_linux.go b/vendor/github.com/opencontainers/runc/utils_linux.go index 984e6b0f1b6..07c8f6ad73e 100644 --- a/vendor/github.com/opencontainers/runc/utils_linux.go +++ b/vendor/github.com/opencontainers/runc/utils_linux.go @@ -19,7 +19,7 @@ import ( "github.com/opencontainers/runtime-spec/specs-go" selinux "github.com/opencontainers/selinux/go-selinux" - "github.com/coreos/go-systemd/activation" + "github.com/coreos/go-systemd/v22/activation" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli" @@ -47,10 +47,12 @@ func loadFactory(context *cli.Context) (libcontainer.Factory, error) { cgroupManager = libcontainer.RootlessCgroupfs } if context.GlobalBool("systemd-cgroup") { - if systemd.UseSystemd() { - cgroupManager = libcontainer.SystemdCgroups - } else { - return nil, fmt.Errorf("systemd cgroup flag passed, but systemd support for managing cgroups is not available") + if !systemd.IsRunningSystemd() { + return nil, errors.New("systemd cgroup flag passed, but systemd support for managing cgroups is not available") + } + cgroupManager = libcontainer.SystemdCgroups + if rootlessCg { + cgroupManager = libcontainer.RootlessSystemdCgroups } } @@ -91,10 +93,6 @@ func getContainer(context *cli.Context) (libcontainer.Container, error) { return factory.Load(id) } -func fatalf(t string, v ...interface{}) { - fatal(fmt.Errorf(t, v...)) -} - func getDefaultImagePath(context *cli.Context) string { cwd, err := os.Getwd() if err != nil { @@ -180,7 +178,7 @@ func setupIO(process *libcontainer.Process, rootuid, rootgid int, createTTY, det } uc, ok := conn.(*net.UnixConn) if !ok { - return nil, fmt.Errorf("casting to UnixConn failed") + return nil, errors.New("casting to UnixConn failed") } t.postStart = append(t.postStart, uc) socket, err := uc.File() @@ -349,7 +347,9 @@ func (r *runner) run(config *specs.Process) (int, error) { if detach { return 0, nil } - r.destroy() + if err == nil { + r.destroy() + } return status, err } @@ -368,26 +368,29 @@ func (r *runner) checkTerminal(config *specs.Process) error { detach := r.detach || (r.action == CT_ACT_CREATE) // Check command-line for sanity. if detach && config.Terminal && r.consoleSocket == "" { - return fmt.Errorf("cannot allocate tty if runc will detach without setting console socket") + return errors.New("cannot allocate tty if runc will detach without setting console socket") } if (!detach || !config.Terminal) && r.consoleSocket != "" { - return fmt.Errorf("cannot use console socket if runc will not detach or allocate tty") + return errors.New("cannot use console socket if runc will not detach or allocate tty") } return nil } func validateProcessSpec(spec *specs.Process) error { + if spec == nil { + return errors.New("process property must not be empty") + } if spec.Cwd == "" { - return fmt.Errorf("Cwd property must not be empty") + return errors.New("Cwd property must not be empty") } if !filepath.IsAbs(spec.Cwd) { - return fmt.Errorf("Cwd must be an absolute path") + return errors.New("Cwd must be an absolute path") } if len(spec.Args) == 0 { - return fmt.Errorf("args must not be empty") + return errors.New("args must not be empty") } if spec.SelinuxLabel != "" && !selinux.GetEnabled() { - return fmt.Errorf("selinux label is specified in config, but selinux is disabled or not supported") + return errors.New("selinux label is specified in config, but selinux is disabled or not supported") } return nil } @@ -408,7 +411,9 @@ func startContainer(context *cli.Context, spec *specs.Spec, action CtAct, criuOp notifySocket := newNotifySocket(context, os.Getenv("NOTIFY_SOCKET"), id) if notifySocket != nil { - notifySocket.setupSpec(context, spec) + if err := notifySocket.setupSpec(context, spec); err != nil { + return -1, err + } } container, err := createContainer(context, id, spec) @@ -417,10 +422,14 @@ func startContainer(context *cli.Context, spec *specs.Spec, action CtAct, criuOp } if notifySocket != nil { - err := notifySocket.setupSocket() - if err != nil { + if err := notifySocket.setupSocketDirectory(); err != nil { return -1, err } + if action == CT_ACT_RUN { + if err := notifySocket.bindSocket(); err != nil { + return -1, err + } + } } // Support on-demand socket activation by passing file descriptors into the container init process. diff --git a/vendor/github.com/opencontainers/runc/vendor.conf b/vendor/github.com/opencontainers/runc/vendor.conf deleted file mode 100644 index dd51785e6b4..00000000000 --- a/vendor/github.com/opencontainers/runc/vendor.conf +++ /dev/null @@ -1,31 +0,0 @@ -# OCI runtime-spec. When updating this, make sure you use a version tag rather -# than a commit ID so it's much more obvious what version of the spec we are -# using. -github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db - -# Core libcontainer functionality. -github.com/checkpoint-restore/go-criu 17b0214f6c48980c45dc47ecb0cfd6d9e02df723 # v3.11 -github.com/mrunalp/fileutils 7d4729fb36185a7c1719923406c9d40e54fb93c7 -github.com/opencontainers/selinux 5215b1806f52b1fcc2070a8826c542c9d33cd3cf # v1.3.0 (+ CVE-2019-16884) -github.com/seccomp/libseccomp-golang 689e3c1541a84461afc49c1c87352a6cedf72e9c # v0.9.1 -github.com/sirupsen/logrus 8bdbc7bcc01dcbb8ec23dc8a28e332258d25251f # v1.4.1 -github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2 -github.com/vishvananda/netlink 1e2e08e8a2dcdacaae3f14ac44c5cfa31361f270 - -# systemd integration. -github.com/coreos/go-systemd 95778dfbb74eb7e4dbaf43bf7d71809650ef8076 # v19 -github.com/godbus/dbus 2ff6f7ffd60f0f2410b3105864bdd12c7894f844 # v5.0.1 -github.com/golang/protobuf 925541529c1fa6821df4e44ce2723319eb2be768 # v1.0.0 - -# Command-line interface. -github.com/cyphar/filepath-securejoin a261ee33d7a517f054effbf451841abaafe3e0fd # v0.2.2 -github.com/docker/go-units 47565b4f722fb6ceae66b95f853feed578a4a51c # v0.3.3 -github.com/urfave/cli cfb38830724cc34fedffe9a2a29fb54fa9169cd1 # v1.20.0 -golang.org/x/sys 9eafafc0a87e0fd0aeeba439a4573537970c44c7 https://github.com/golang/sys - -# console dependencies -github.com/containerd/console 0650fd9eeb50bab4fc99dceb9f2e14cf58f36e7f -github.com/pkg/errors ba968bfe8b2f7e042a574c888954fccecfa385b4 # v0.8.1 - -# ebpf dependencies -github.com/cilium/ebpf 95b36a581eed7b0f127306ed1d16cc0ddc06cf67 diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go index 9984bbce30c..3dc9efd23e6 100644 --- a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go +++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go @@ -38,7 +38,9 @@ type Process struct { // User specifies user information for the process. User User `json:"user"` // Args specifies the binary and arguments for the application to execute. - Args []string `json:"args"` + Args []string `json:"args,omitempty"` + // CommandLine specifies the full command line for the application to execute on Windows. + CommandLine string `json:"commandLine,omitempty" platform:"windows"` // Env populates the process environment for the process. Env []string `json:"env,omitempty"` // Cwd is the current working directory for the process and must be @@ -87,6 +89,8 @@ type User struct { UID uint32 `json:"uid" platform:"linux,solaris"` // GID is the group id. GID uint32 `json:"gid" platform:"linux,solaris"` + // Umask is the umask for the init process. + Umask *uint32 `json:"umask,omitempty" platform:"linux,solaris"` // AdditionalGids are additional group ids set for the container's process. AdditionalGids []uint32 `json:"additionalGids,omitempty" platform:"linux,solaris"` // Username is the user name. @@ -121,13 +125,26 @@ type Hook struct { Timeout *int `json:"timeout,omitempty"` } +// Hooks specifies a command that is run in the container at a particular event in the lifecycle of a container // Hooks for container setup and teardown type Hooks struct { - // Prestart is a list of hooks to be run before the container process is executed. + // Prestart is Deprecated. Prestart is a list of hooks to be run before the container process is executed. + // It is called in the Runtime Namespace Prestart []Hook `json:"prestart,omitempty"` + // CreateRuntime is a list of hooks to be run after the container has been created but before pivot_root or any equivalent operation has been called + // It is called in the Runtime Namespace + CreateRuntime []Hook `json:"createRuntime,omitempty"` + // CreateContainer is a list of hooks to be run after the container has been created but before pivot_root or any equivalent operation has been called + // It is called in the Container Namespace + CreateContainer []Hook `json:"createContainer,omitempty"` + // StartContainer is a list of hooks to be run after the start operation is called but before the container process is started + // It is called in the Container Namespace + StartContainer []Hook `json:"startContainer,omitempty"` // Poststart is a list of hooks to be run after the container process is started. + // It is called in the Runtime Namespace Poststart []Hook `json:"poststart,omitempty"` // Poststop is a list of hooks to be run after the container process exits. + // It is called in the Runtime Namespace Poststop []Hook `json:"poststop,omitempty"` } @@ -163,6 +180,8 @@ type Linux struct { // IntelRdt contains Intel Resource Director Technology (RDT) information for // handling resource constraints (e.g., L3 cache, memory bandwidth) for the container IntelRdt *LinuxIntelRdt `json:"intelRdt,omitempty"` + // Personality contains configuration for the Linux personality syscall + Personality *LinuxPersonality `json:"personality,omitempty"` } // LinuxNamespace is the configuration for a Linux namespace @@ -181,17 +200,17 @@ const ( // PIDNamespace for isolating process IDs PIDNamespace LinuxNamespaceType = "pid" // NetworkNamespace for isolating network devices, stacks, ports, etc - NetworkNamespace = "network" + NetworkNamespace LinuxNamespaceType = "network" // MountNamespace for isolating mount points - MountNamespace = "mount" + MountNamespace LinuxNamespaceType = "mount" // IPCNamespace for isolating System V IPC, POSIX message queues - IPCNamespace = "ipc" + IPCNamespace LinuxNamespaceType = "ipc" // UTSNamespace for isolating hostname and NIS domain name - UTSNamespace = "uts" + UTSNamespace LinuxNamespaceType = "uts" // UserNamespace for isolating user and group IDs - UserNamespace = "user" + UserNamespace LinuxNamespaceType = "user" // CgroupNamespace for isolating cgroup hierarchies - CgroupNamespace = "cgroup" + CgroupNamespace LinuxNamespaceType = "cgroup" ) // LinuxIDMapping specifies UID/GID mappings @@ -217,6 +236,7 @@ type POSIXRlimit struct { // LinuxHugepageLimit structure corresponds to limiting kernel hugepages type LinuxHugepageLimit struct { // Pagesize is the hugepage size + // Format: "B' (e.g. 64KB, 2MB, 1GB, etc.) Pagesize string `json:"pageSize"` // Limit is the limit of "hugepagesize" hugetlb usage Limit uint64 `json:"limit"` @@ -288,6 +308,8 @@ type LinuxMemory struct { Swappiness *uint64 `json:"swappiness,omitempty"` // DisableOOMKiller disables the OOM killer for out of memory conditions DisableOOMKiller *bool `json:"disableOOMKiller,omitempty"` + // Enables hierarchical memory accounting + UseHierarchy *bool `json:"useHierarchy,omitempty"` } // LinuxCPU for Linux cgroup 'cpu' resource management @@ -384,6 +406,28 @@ type LinuxDeviceCgroup struct { Access string `json:"access,omitempty"` } +// LinuxPersonalityDomain refers to a personality domain. +type LinuxPersonalityDomain string + +// LinuxPersonalityFlag refers to an additional personality flag. None are currently defined. +type LinuxPersonalityFlag string + +// Define domain and flags for Personality +const ( + // PerLinux is the standard Linux personality + PerLinux LinuxPersonalityDomain = "LINUX" + // PerLinux32 sets personality to 32 bit + PerLinux32 LinuxPersonalityDomain = "LINUX32" +) + +// LinuxPersonality represents the Linux personality syscall input +type LinuxPersonality struct { + // Domain for the personality + Domain LinuxPersonalityDomain `json:"domain"` + // Additional flags + Flags []LinuxPersonalityFlag `json:"flags,omitempty"` +} + // Solaris contains platform-specific configuration for Solaris application containers. type Solaris struct { // SMF FMRI which should go "online" before we start the container process. @@ -528,7 +572,7 @@ type VMHypervisor struct { // Path is the host path to the hypervisor used to manage the virtual machine. Path string `json:"path"` // Parameters specifies parameters to pass to the hypervisor. - Parameters string `json:"parameters,omitempty"` + Parameters []string `json:"parameters,omitempty"` } // VMKernel contains information about the kernel to use for a virtual machine. @@ -536,7 +580,7 @@ type VMKernel struct { // Path is the host path to the kernel used to boot the virtual machine. Path string `json:"path"` // Parameters specifies parameters to pass to the kernel. - Parameters string `json:"parameters,omitempty"` + Parameters []string `json:"parameters,omitempty"` // InitRD is the host path to an initial ramdisk to be used by the kernel. InitRD string `json:"initrd,omitempty"` } @@ -553,12 +597,16 @@ type VMImage struct { type LinuxSeccomp struct { DefaultAction LinuxSeccompAction `json:"defaultAction"` Architectures []Arch `json:"architectures,omitempty"` + Flags []LinuxSeccompFlag `json:"flags,omitempty"` Syscalls []LinuxSyscall `json:"syscalls,omitempty"` } // Arch used for additional architectures type Arch string +// LinuxSeccompFlag is a flag to pass to seccomp(2). +type LinuxSeccompFlag string + // Additional architectures permitted to be used for system calls // By default only the native architecture of the kernel is permitted const ( @@ -587,11 +635,13 @@ type LinuxSeccompAction string // Define actions for Seccomp rules const ( - ActKill LinuxSeccompAction = "SCMP_ACT_KILL" - ActTrap LinuxSeccompAction = "SCMP_ACT_TRAP" - ActErrno LinuxSeccompAction = "SCMP_ACT_ERRNO" - ActTrace LinuxSeccompAction = "SCMP_ACT_TRACE" - ActAllow LinuxSeccompAction = "SCMP_ACT_ALLOW" + ActKill LinuxSeccompAction = "SCMP_ACT_KILL" + ActKillProcess LinuxSeccompAction = "SCMP_ACT_KILL_PROCESS" + ActTrap LinuxSeccompAction = "SCMP_ACT_TRAP" + ActErrno LinuxSeccompAction = "SCMP_ACT_ERRNO" + ActTrace LinuxSeccompAction = "SCMP_ACT_TRACE" + ActAllow LinuxSeccompAction = "SCMP_ACT_ALLOW" + ActLog LinuxSeccompAction = "SCMP_ACT_LOG" ) // LinuxSeccompOperator used to match syscall arguments in Seccomp @@ -618,9 +668,10 @@ type LinuxSeccompArg struct { // LinuxSyscall is used to match a syscall in Seccomp type LinuxSyscall struct { - Names []string `json:"names"` - Action LinuxSeccompAction `json:"action"` - Args []LinuxSeccompArg `json:"args,omitempty"` + Names []string `json:"names"` + Action LinuxSeccompAction `json:"action"` + ErrnoRet *uint `json:"errnoRet,omitempty"` + Args []LinuxSeccompArg `json:"args,omitempty"` } // LinuxIntelRdt has container runtime resource constraints for Intel RDT @@ -632,7 +683,9 @@ type LinuxIntelRdt struct { // Format: "L3:=;=;..." L3CacheSchema string `json:"l3CacheSchema,omitempty"` - // The schema of memory bandwidth percentage per L3 cache id + // The schema of memory bandwidth per L3 cache id // Format: "MB:=bandwidth0;=bandwidth1;..." + // The unit of memory bandwidth is specified in "percentages" by + // default, and in "MBps" if MBA Software Controller is enabled. MemBwSchema string `json:"memBwSchema,omitempty"` } diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go index 89dce34be20..e2e64c66311 100644 --- a/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go +++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/state.go @@ -1,5 +1,23 @@ package specs +// ContainerState represents the state of a container. +type ContainerState string + +const ( + // StateCreating indicates that the container is being created + StateCreating ContainerState = "creating" + + // StateCreated indicates that the runtime has finished the create operation + StateCreated ContainerState = "created" + + // StateRunning indicates that the container process has executed the + // user-specified program but has not exited + StateRunning ContainerState = "running" + + // StateStopped indicates that the container process has exited + StateStopped ContainerState = "stopped" +) + // State holds information about the runtime state of the container. type State struct { // Version is the version of the specification that is supported. @@ -7,7 +25,7 @@ type State struct { // ID is the container ID ID string `json:"id"` // Status is the runtime status of the container. - Status string `json:"status"` + Status ContainerState `json:"status"` // Pid is the process ID for the container process. Pid int `json:"pid,omitempty"` // Bundle is the path to the container's bundle directory. diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go index b920fc1b39d..596af0c2fdb 100644 --- a/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go +++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/version.go @@ -8,7 +8,7 @@ const ( // VersionMinor is for functionality in a backwards-compatible manner VersionMinor = 0 // VersionPatch is for backwards-compatible bug fixes - VersionPatch = 1 + VersionPatch = 2 // VersionDev indicates development branch. Releases will be empty string. VersionDev = "-dev" diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/doc.go b/vendor/github.com/opencontainers/selinux/go-selinux/doc.go new file mode 100644 index 00000000000..79a8e6446db --- /dev/null +++ b/vendor/github.com/opencontainers/selinux/go-selinux/doc.go @@ -0,0 +1,21 @@ +/* +Package selinux provides a high-level interface for interacting with selinux. + +This package uses a selinux build tag to enable the selinux functionality. This +allows non-linux and linux users who do not have selinux support to still use +tools that rely on this library. + +To compile with full selinux support use the -tags=selinux option in your build +and test commands. + +Usage: + + import "github.com/opencontainers/selinux/go-selinux" + + // Ensure that selinux is enforcing mode. + if selinux.EnforceMode() != selinux.Enforcing { + selinux.SetEnforceMode(selinux.Enforcing) + } + +*/ +package selinux diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/label/label_stub.go b/vendor/github.com/opencontainers/selinux/go-selinux/label/label_stub.go index c2bdd35d73d..a7d2d5e342b 100644 --- a/vendor/github.com/opencontainers/selinux/go-selinux/label/label_stub.go +++ b/vendor/github.com/opencontainers/selinux/go-selinux/label/label_stub.go @@ -30,7 +30,6 @@ func Relabel(path string, fileLabel string, shared bool) error { // DisableSecOpt returns a security opt that can disable labeling // support for future container processes func DisableSecOpt() []string { - // TODO the selinux.DisableSecOpt stub returns []string{"disable"} instead of "nil" return nil } diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/selinux.go b/vendor/github.com/opencontainers/selinux/go-selinux/selinux.go new file mode 100644 index 00000000000..50760dc93e7 --- /dev/null +++ b/vendor/github.com/opencontainers/selinux/go-selinux/selinux.go @@ -0,0 +1,249 @@ +package selinux + +import ( + "github.com/pkg/errors" +) + +const ( + // Enforcing constant indicate SELinux is in enforcing mode + Enforcing = 1 + // Permissive constant to indicate SELinux is in permissive mode + Permissive = 0 + // Disabled constant to indicate SELinux is disabled + Disabled = -1 + + // DefaultCategoryRange is the upper bound on the category range + DefaultCategoryRange = uint32(1024) +) + +var ( + // ErrMCSAlreadyExists is returned when trying to allocate a duplicate MCS. + ErrMCSAlreadyExists = errors.New("MCS label already exists") + // ErrEmptyPath is returned when an empty path has been specified. + ErrEmptyPath = errors.New("empty path") + + // InvalidLabel is returned when an invalid label is specified. + InvalidLabel = errors.New("Invalid Label") + + // ErrIncomparable is returned two levels are not comparable + ErrIncomparable = errors.New("incomparable levels") + // ErrLevelSyntax is returned when a sensitivity or category do not have correct syntax in a level + ErrLevelSyntax = errors.New("invalid level syntax") + + // CategoryRange allows the upper bound on the category range to be adjusted + CategoryRange = DefaultCategoryRange +) + +// Context is a representation of the SELinux label broken into 4 parts +type Context map[string]string + +// SetDisabled disables SELinux support for the package +func SetDisabled() { + setDisabled() +} + +// GetEnabled returns whether SELinux is currently enabled. +func GetEnabled() bool { + return getEnabled() +} + +// ClassIndex returns the int index for an object class in the loaded policy, +// or -1 and an error +func ClassIndex(class string) (int, error) { + return classIndex(class) +} + +// SetFileLabel sets the SELinux label for this path or returns an error. +func SetFileLabel(fpath string, label string) error { + return setFileLabel(fpath, label) +} + +// FileLabel returns the SELinux label for this path or returns an error. +func FileLabel(fpath string) (string, error) { + return fileLabel(fpath) +} + +// SetFSCreateLabel tells kernel the label to create all file system objects +// created by this task. Setting label="" to return to default. +func SetFSCreateLabel(label string) error { + return setFSCreateLabel(label) +} + +// FSCreateLabel returns the default label the kernel which the kernel is using +// for file system objects created by this task. "" indicates default. +func FSCreateLabel() (string, error) { + return fsCreateLabel() +} + +// CurrentLabel returns the SELinux label of the current process thread, or an error. +func CurrentLabel() (string, error) { + return currentLabel() +} + +// PidLabel returns the SELinux label of the given pid, or an error. +func PidLabel(pid int) (string, error) { + return pidLabel(pid) +} + +// ExecLabel returns the SELinux label that the kernel will use for any programs +// that are executed by the current process thread, or an error. +func ExecLabel() (string, error) { + return execLabel() +} + +// CanonicalizeContext takes a context string and writes it to the kernel +// the function then returns the context that the kernel will use. Use this +// function to check if two contexts are equivalent +func CanonicalizeContext(val string) (string, error) { + return canonicalizeContext(val) +} + +// ComputeCreateContext requests the type transition from source to target for +// class from the kernel. +func ComputeCreateContext(source string, target string, class string) (string, error) { + return computeCreateContext(source, target, class) +} + +// CalculateGlbLub computes the glb (greatest lower bound) and lub (least upper bound) +// of a source and target range. +// The glblub is calculated as the greater of the low sensitivities and +// the lower of the high sensitivities and the and of each category bitset. +func CalculateGlbLub(sourceRange, targetRange string) (string, error) { + return calculateGlbLub(sourceRange, targetRange) +} + +// SetExecLabel sets the SELinux label that the kernel will use for any programs +// that are executed by the current process thread, or an error. +func SetExecLabel(label string) error { + return setExecLabel(label) +} + +// SetTaskLabel sets the SELinux label for the current thread, or an error. +// This requires the dyntransition permission. +func SetTaskLabel(label string) error { + return setTaskLabel(label) +} + +// SetSocketLabel takes a process label and tells the kernel to assign the +// label to the next socket that gets created +func SetSocketLabel(label string) error { + return setSocketLabel(label) +} + +// SocketLabel retrieves the current socket label setting +func SocketLabel() (string, error) { + return socketLabel() +} + +// PeerLabel retrieves the label of the client on the other side of a socket +func PeerLabel(fd uintptr) (string, error) { + return peerLabel(fd) +} + +// SetKeyLabel takes a process label and tells the kernel to assign the +// label to the next kernel keyring that gets created +func SetKeyLabel(label string) error { + return setKeyLabel(label) +} + +// KeyLabel retrieves the current kernel keyring label setting +func KeyLabel() (string, error) { + return keyLabel() +} + +// Get returns the Context as a string +func (c Context) Get() string { + return c.get() +} + +// NewContext creates a new Context struct from the specified label +func NewContext(label string) (Context, error) { + return newContext(label) +} + +// ClearLabels clears all reserved labels +func ClearLabels() { + clearLabels() +} + +// ReserveLabel reserves the MLS/MCS level component of the specified label +func ReserveLabel(label string) { + reserveLabel(label) +} + +// EnforceMode returns the current SELinux mode Enforcing, Permissive, Disabled +func EnforceMode() int { + return enforceMode() +} + +// SetEnforceMode sets the current SELinux mode Enforcing, Permissive. +// Disabled is not valid, since this needs to be set at boot time. +func SetEnforceMode(mode int) error { + return setEnforceMode(mode) +} + +// DefaultEnforceMode returns the systems default SELinux mode Enforcing, +// Permissive or Disabled. Note this is is just the default at boot time. +// EnforceMode tells you the systems current mode. +func DefaultEnforceMode() int { + return defaultEnforceMode() +} + +// ReleaseLabel un-reserves the MLS/MCS Level field of the specified label, +// allowing it to be used by another process. +func ReleaseLabel(label string) { + releaseLabel(label) +} + +// ROFileLabel returns the specified SELinux readonly file label +func ROFileLabel() string { + return roFileLabel() +} + +// KVMContainerLabels returns the default processLabel and mountLabel to be used +// for kvm containers by the calling process. +func KVMContainerLabels() (string, string) { + return kvmContainerLabels() +} + +// InitContainerLabels returns the default processLabel and file labels to be +// used for containers running an init system like systemd by the calling process. +func InitContainerLabels() (string, string) { + return initContainerLabels() +} + +// ContainerLabels returns an allocated processLabel and fileLabel to be used for +// container labeling by the calling process. +func ContainerLabels() (processLabel string, fileLabel string) { + return containerLabels() +} + +// SecurityCheckContext validates that the SELinux label is understood by the kernel +func SecurityCheckContext(val string) error { + return securityCheckContext(val) +} + +// CopyLevel returns a label with the MLS/MCS level from src label replaced on +// the dest label. +func CopyLevel(src, dest string) (string, error) { + return copyLevel(src, dest) +} + +// Chcon changes the fpath file object to the SELinux label label. +// If fpath is a directory and recurse is true, then Chcon walks the +// directory tree setting the label. +func Chcon(fpath string, label string, recurse bool) error { + return chcon(fpath, label, recurse) +} + +// DupSecOpt takes an SELinux process label and returns security options that +// can be used to set the SELinux Type and Level for future container processes. +func DupSecOpt(src string) ([]string, error) { + return dupSecOpt(src) +} + +// DisableSecOpt returns a security opt that can be used to disable SELinux +// labeling support for future container processes. +func DisableSecOpt() []string { + return disableSecOpt() +} diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go index f22c04b6c62..d6b0d49db65 100644 --- a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go +++ b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go @@ -20,20 +20,12 @@ import ( "github.com/opencontainers/selinux/pkg/pwalk" "github.com/pkg/errors" + "github.com/willf/bitset" "golang.org/x/sys/unix" ) const ( - // Enforcing constant indicate SELinux is in enforcing mode - Enforcing = 1 - // Permissive constant to indicate SELinux is in permissive mode - Permissive = 0 - // Disabled constant to indicate SELinux is disabled - Disabled = -1 - - // DefaultCategoryRange is the upper bound on the category range - DefaultCategoryRange = uint32(1024) - + minSensLen = 2 contextFile = "/usr/share/containers/selinux/contexts" selinuxDir = "/etc/selinux/" selinuxConfig = selinuxDir + "config" @@ -52,20 +44,27 @@ type selinuxState struct { sync.Mutex } +type level struct { + sens uint + cats *bitset.BitSet +} + +type mlsRange struct { + low *level + high *level +} + +type levelItem byte + +const ( + sensitivity levelItem = 's' + category levelItem = 'c' +) + var ( - // ErrMCSAlreadyExists is returned when trying to allocate a duplicate MCS. - ErrMCSAlreadyExists = errors.New("MCS label already exists") - // ErrEmptyPath is returned when an empty path has been specified. - ErrEmptyPath = errors.New("empty path") - // InvalidLabel is returned when an invalid label is specified. - InvalidLabel = errors.New("Invalid Label") - - // CategoryRange allows the upper bound on the category range to be adjusted - CategoryRange = DefaultCategoryRange - - assignRegex = regexp.MustCompile(`^([^=]+)=(.*)$`) - roFileLabel string - state = selinuxState{ + assignRegex = regexp.MustCompile(`^([^=]+)=(.*)$`) + readOnlyFileLabel string + state = selinuxState{ mcsList: make(map[string]bool), } @@ -74,9 +73,6 @@ var ( haveThreadSelf bool ) -// Context is a representation of the SELinux label broken into 4 parts -type Context map[string]string - func (s *selinuxState) setEnable(enabled bool) bool { s.Lock() defer s.Unlock() @@ -103,8 +99,8 @@ func (s *selinuxState) getEnabled() bool { return s.setEnable(enabled) } -// SetDisabled disables selinux support for the package -func SetDisabled() { +// setDisabled disables SELinux support for the package +func setDisabled() { state.setEnable(false) } @@ -196,15 +192,15 @@ func (s *selinuxState) getSELinuxfs() string { // getSelinuxMountPoint returns the path to the mountpoint of an selinuxfs // filesystem or an empty string if no mountpoint is found. Selinuxfs is -// a proc-like pseudo-filesystem that exposes the selinux policy API to +// a proc-like pseudo-filesystem that exposes the SELinux policy API to // processes. The existence of an selinuxfs mount is used to determine -// whether selinux is currently enabled or not. +// whether SELinux is currently enabled or not. func getSelinuxMountPoint() string { return state.getSELinuxfs() } -// GetEnabled returns whether selinux is currently enabled. -func GetEnabled() bool { +// getEnabled returns whether SELinux is currently enabled. +func getEnabled() bool { return state.getEnabled() } @@ -288,8 +284,9 @@ func readCon(fpath string) (string, error) { return strings.Trim(retval, "\x00"), nil } -// ClassIndex returns the int index for an object class in the loaded policy, or -1 and an error -func ClassIndex(class string) (int, error) { +// classIndex returns the int index for an object class in the loaded policy, +// or -1 and an error +func classIndex(class string) (int, error) { permpath := fmt.Sprintf("class/%s/index", class) indexpath := filepath.Join(getSelinuxMountPoint(), permpath) @@ -305,8 +302,8 @@ func ClassIndex(class string) (int, error) { return index, nil } -// SetFileLabel sets the SELinux label for this path or returns an error. -func SetFileLabel(fpath string, label string) error { +// setFileLabel sets the SELinux label for this path or returns an error. +func setFileLabel(fpath string, label string) error { if fpath == "" { return ErrEmptyPath } @@ -316,8 +313,8 @@ func SetFileLabel(fpath string, label string) error { return nil } -// FileLabel returns the SELinux label for this path or returns an error. -func FileLabel(fpath string) (string, error) { +// fileLabel returns the SELinux label for this path or returns an error. +func fileLabel(fpath string) (string, error) { if fpath == "" { return "", ErrEmptyPath } @@ -333,37 +330,31 @@ func FileLabel(fpath string) (string, error) { return string(label), nil } -/* -SetFSCreateLabel tells kernel the label to create all file system objects -created by this task. Setting label="" to return to default. -*/ -func SetFSCreateLabel(label string) error { +// setFSCreateLabel tells kernel the label to create all file system objects +// created by this task. Setting label="" to return to default. +func setFSCreateLabel(label string) error { return writeAttr("fscreate", label) } -/* -FSCreateLabel returns the default label the kernel which the kernel is using -for file system objects created by this task. "" indicates default. -*/ -func FSCreateLabel() (string, error) { +// fsCreateLabel returns the default label the kernel which the kernel is using +// for file system objects created by this task. "" indicates default. +func fsCreateLabel() (string, error) { return readAttr("fscreate") } -// CurrentLabel returns the SELinux label of the current process thread, or an error. -func CurrentLabel() (string, error) { +// currentLabel returns the SELinux label of the current process thread, or an error. +func currentLabel() (string, error) { return readAttr("current") } -// PidLabel returns the SELinux label of the given pid, or an error. -func PidLabel(pid int) (string, error) { +// pidLabel returns the SELinux label of the given pid, or an error. +func pidLabel(pid int) (string, error) { return readCon(fmt.Sprintf("/proc/%d/attr/current", pid)) } -/* -ExecLabel returns the SELinux label that the kernel will use for any programs -that are executed by the current process thread, or an error. -*/ -func ExecLabel() (string, error) { +// ExecLabel returns the SELinux label that the kernel will use for any programs +// that are executed by the current process thread, or an error. +func execLabel() (string, error) { return readAttr("exec") } @@ -372,7 +363,7 @@ func writeCon(fpath, val string) error { return ErrEmptyPath } if val == "" { - if !GetEnabled() { + if !getEnabled() { return nil } } @@ -424,20 +415,17 @@ func writeAttr(attr, val string) error { return writeCon(attrPath(attr), val) } -/* -CanonicalizeContext takes a context string and writes it to the kernel -the function then returns the context that the kernel will use. This function -can be used to see if two contexts are equivalent -*/ -func CanonicalizeContext(val string) (string, error) { +// canonicalizeContext takes a context string and writes it to the kernel +// the function then returns the context that the kernel will use. Use this +// function to check if two contexts are equivalent +func canonicalizeContext(val string) (string, error) { return readWriteCon(filepath.Join(getSelinuxMountPoint(), "context"), val) } -/* -ComputeCreateContext requests the type transition from source to target for class from the kernel. -*/ -func ComputeCreateContext(source string, target string, class string) (string, error) { - classidx, err := ClassIndex(class) +// computeCreateContext requests the type transition from source to target for +// class from the kernel. +func computeCreateContext(source string, target string, class string) (string, error) { + classidx, err := classIndex(class) if err != nil { return "", err } @@ -445,6 +433,217 @@ func ComputeCreateContext(source string, target string, class string) (string, e return readWriteCon(filepath.Join(getSelinuxMountPoint(), "create"), fmt.Sprintf("%s %s %d", source, target, classidx)) } +// catsToBitset stores categories in a bitset. +func catsToBitset(cats string) (*bitset.BitSet, error) { + bitset := &bitset.BitSet{} + + catlist := strings.Split(cats, ",") + for _, r := range catlist { + ranges := strings.SplitN(r, ".", 2) + if len(ranges) > 1 { + catstart, err := parseLevelItem(ranges[0], category) + if err != nil { + return nil, err + } + catend, err := parseLevelItem(ranges[1], category) + if err != nil { + return nil, err + } + for i := catstart; i <= catend; i++ { + bitset.Set(i) + } + } else { + cat, err := parseLevelItem(ranges[0], category) + if err != nil { + return nil, err + } + bitset.Set(cat) + } + } + + return bitset, nil +} + +// parseLevelItem parses and verifies that a sensitivity or category are valid +func parseLevelItem(s string, sep levelItem) (uint, error) { + if len(s) < minSensLen || levelItem(s[0]) != sep { + return 0, ErrLevelSyntax + } + val, err := strconv.ParseUint(s[1:], 10, 32) + if err != nil { + return 0, err + } + + return uint(val), nil +} + +// parseLevel fills a level from a string that contains +// a sensitivity and categories +func (l *level) parseLevel(levelStr string) error { + lvl := strings.SplitN(levelStr, ":", 2) + sens, err := parseLevelItem(lvl[0], sensitivity) + if err != nil { + return errors.Wrap(err, "failed to parse sensitivity") + } + l.sens = sens + if len(lvl) > 1 { + cats, err := catsToBitset(lvl[1]) + if err != nil { + return errors.Wrap(err, "failed to parse categories") + } + l.cats = cats + } + + return nil +} + +// rangeStrToMLSRange marshals a string representation of a range. +func rangeStrToMLSRange(rangeStr string) (*mlsRange, error) { + mlsRange := &mlsRange{} + levelSlice := strings.SplitN(rangeStr, "-", 2) + + switch len(levelSlice) { + // rangeStr that has a low and a high level, e.g. s4:c0.c1023-s6:c0.c1023 + case 2: + mlsRange.high = &level{} + if err := mlsRange.high.parseLevel(levelSlice[1]); err != nil { + return nil, errors.Wrapf(err, "failed to parse high level %q", levelSlice[1]) + } + fallthrough + // rangeStr that is single level, e.g. s6:c0,c3,c5,c30.c1023 + case 1: + mlsRange.low = &level{} + if err := mlsRange.low.parseLevel(levelSlice[0]); err != nil { + return nil, errors.Wrapf(err, "failed to parse low level %q", levelSlice[0]) + } + } + + if mlsRange.high == nil { + mlsRange.high = mlsRange.low + } + + return mlsRange, nil +} + +// bitsetToStr takes a category bitset and returns it in the +// canonical selinux syntax +func bitsetToStr(c *bitset.BitSet) string { + var str string + i, e := c.NextSet(0) + len := 0 + for e { + if len == 0 { + if str != "" { + str += "," + } + str += "c" + strconv.Itoa(int(i)) + } + + next, e := c.NextSet(i + 1) + if e { + // consecutive cats + if next == i+1 { + len++ + i = next + continue + } + } + if len == 1 { + str += ",c" + strconv.Itoa(int(i)) + } else if len > 1 { + str += ".c" + strconv.Itoa(int(i)) + } + if !e { + break + } + len = 0 + i = next + } + + return str +} + +func (l1 *level) equal(l2 *level) bool { + if l2 == nil || l1 == nil { + return l1 == l2 + } + if l1.sens != l2.sens { + return false + } + return l1.cats.Equal(l2.cats) +} + +// String returns an mlsRange as a string. +func (m mlsRange) String() string { + low := "s" + strconv.Itoa(int(m.low.sens)) + if m.low.cats != nil && m.low.cats.Count() > 0 { + low += ":" + bitsetToStr(m.low.cats) + } + + if m.low.equal(m.high) { + return low + } + + high := "s" + strconv.Itoa(int(m.high.sens)) + if m.high.cats != nil && m.high.cats.Count() > 0 { + high += ":" + bitsetToStr(m.high.cats) + } + + return low + "-" + high +} + +func max(a, b uint) uint { + if a > b { + return a + } + return b +} + +func min(a, b uint) uint { + if a < b { + return a + } + return b +} + +// calculateGlbLub computes the glb (greatest lower bound) and lub (least upper bound) +// of a source and target range. +// The glblub is calculated as the greater of the low sensitivities and +// the lower of the high sensitivities and the and of each category bitset. +func calculateGlbLub(sourceRange, targetRange string) (string, error) { + s, err := rangeStrToMLSRange(sourceRange) + if err != nil { + return "", err + } + t, err := rangeStrToMLSRange(targetRange) + if err != nil { + return "", err + } + + if s.high.sens < t.low.sens || t.high.sens < s.low.sens { + /* these ranges have no common sensitivities */ + return "", ErrIncomparable + } + + outrange := &mlsRange{low: &level{}, high: &level{}} + + /* take the greatest of the low */ + outrange.low.sens = max(s.low.sens, t.low.sens) + + /* take the least of the high */ + outrange.high.sens = min(s.high.sens, t.high.sens) + + /* find the intersecting categories */ + if s.low.cats != nil && t.low.cats != nil { + outrange.low.cats = s.low.cats.Intersection(t.low.cats) + } + if s.high.cats != nil && t.high.cats != nil { + outrange.high.cats = s.high.cats.Intersection(t.high.cats) + } + + return outrange.String(), nil +} + func readWriteCon(fpath string, val string) (string, error) { if fpath == "" { return "", ErrEmptyPath @@ -467,41 +666,37 @@ func readWriteCon(fpath string, val string) (string, error) { return strings.Trim(retval, "\x00"), nil } -/* -SetExecLabel sets the SELinux label that the kernel will use for any programs -that are executed by the current process thread, or an error. -*/ -func SetExecLabel(label string) error { +// setExecLabel sets the SELinux label that the kernel will use for any programs +// that are executed by the current process thread, or an error. +func setExecLabel(label string) error { return writeAttr("exec", label) } -/* -SetTaskLabel sets the SELinux label for the current thread, or an error. -This requires the dyntransition permission. -*/ -func SetTaskLabel(label string) error { +// setTaskLabel sets the SELinux label for the current thread, or an error. +// This requires the dyntransition permission. +func setTaskLabel(label string) error { return writeAttr("current", label) } -// SetSocketLabel takes a process label and tells the kernel to assign the +// setSocketLabel takes a process label and tells the kernel to assign the // label to the next socket that gets created -func SetSocketLabel(label string) error { +func setSocketLabel(label string) error { return writeAttr("sockcreate", label) } -// SocketLabel retrieves the current socket label setting -func SocketLabel() (string, error) { +// socketLabel retrieves the current socket label setting +func socketLabel() (string, error) { return readAttr("sockcreate") } -// PeerLabel retrieves the label of the client on the other side of a socket -func PeerLabel(fd uintptr) (string, error) { +// peerLabel retrieves the label of the client on the other side of a socket +func peerLabel(fd uintptr) (string, error) { return unix.GetsockoptString(int(fd), unix.SOL_SOCKET, unix.SO_PEERSEC) } -// SetKeyLabel takes a process label and tells the kernel to assign the +// setKeyLabel takes a process label and tells the kernel to assign the // label to the next kernel keyring that gets created -func SetKeyLabel(label string) error { +func setKeyLabel(label string) error { err := writeCon("/proc/self/attr/keycreate", label) if os.IsNotExist(errors.Cause(err)) { return nil @@ -512,21 +707,21 @@ func SetKeyLabel(label string) error { return err } -// KeyLabel retrieves the current kernel keyring label setting -func KeyLabel() (string, error) { +// keyLabel retrieves the current kernel keyring label setting +func keyLabel() (string, error) { return readCon("/proc/self/attr/keycreate") } -// Get returns the Context as a string -func (c Context) Get() string { +// get returns the Context as a string +func (c Context) get() string { if c["level"] != "" { return fmt.Sprintf("%s:%s:%s:%s", c["user"], c["role"], c["type"], c["level"]) } return fmt.Sprintf("%s:%s:%s", c["user"], c["role"], c["type"]) } -// NewContext creates a new Context struct from the specified label -func NewContext(label string) (Context, error) { +// newContext creates a new Context struct from the specified label +func newContext(label string) (Context, error) { c := make(Context) if len(label) != 0 { @@ -544,15 +739,15 @@ func NewContext(label string) (Context, error) { return c, nil } -// ClearLabels clears all reserved labels -func ClearLabels() { +// clearLabels clears all reserved labels +func clearLabels() { state.Lock() state.mcsList = make(map[string]bool) state.Unlock() } -// ReserveLabel reserves the MLS/MCS level component of the specified label -func ReserveLabel(label string) { +// reserveLabel reserves the MLS/MCS level component of the specified label +func reserveLabel(label string) { if len(label) != 0 { con := strings.SplitN(label, ":", 4) if len(con) > 3 { @@ -565,8 +760,8 @@ func selinuxEnforcePath() string { return path.Join(getSelinuxMountPoint(), "enforce") } -// EnforceMode returns the current SELinux mode Enforcing, Permissive, Disabled -func EnforceMode() int { +// enforceMode returns the current SELinux mode Enforcing, Permissive, Disabled +func enforceMode() int { var enforce int enforceB, err := ioutil.ReadFile(selinuxEnforcePath()) @@ -580,20 +775,16 @@ func EnforceMode() int { return enforce } -/* -SetEnforceMode sets the current SELinux mode Enforcing, Permissive. -Disabled is not valid, since this needs to be set at boot time. -*/ -func SetEnforceMode(mode int) error { +// setEnforceMode sets the current SELinux mode Enforcing, Permissive. +// Disabled is not valid, since this needs to be set at boot time. +func setEnforceMode(mode int) error { return ioutil.WriteFile(selinuxEnforcePath(), []byte(strconv.Itoa(mode)), 0644) } -/* -DefaultEnforceMode returns the systems default SELinux mode Enforcing, -Permissive or Disabled. Note this is is just the default at boot time. -EnforceMode tells you the systems current mode. -*/ -func DefaultEnforceMode() int { +// defaultEnforceMode returns the systems default SELinux mode Enforcing, +// Permissive or Disabled. Note this is is just the default at boot time. +// EnforceMode tells you the systems current mode. +func defaultEnforceMode() int { switch readConfig(selinuxTag) { case "enforcing": return Enforcing @@ -673,11 +864,9 @@ func uniqMcs(catRange uint32) string { return mcs } -/* -ReleaseLabel will unreserve the MLS/MCS Level field of the specified label. -Allowing it to be used by another process. -*/ -func ReleaseLabel(label string) { +// releaseLabel un-reserves the MLS/MCS Level field of the specified label, +// allowing it to be used by another process. +func releaseLabel(label string) { if len(label) != 0 { con := strings.SplitN(label, ":", 4) if len(con) > 3 { @@ -686,9 +875,9 @@ func ReleaseLabel(label string) { } } -// ROFileLabel returns the specified SELinux readonly file label -func ROFileLabel() string { - return roFileLabel +// roFileLabel returns the specified SELinux readonly file label +func roFileLabel() string { + return readOnlyFileLabel } func openContextFile() (*os.File, error) { @@ -743,11 +932,9 @@ func loadLabels() map[string]string { return labels } -/* -KVMContainerLabels returns the default processLabel and mountLabel to be used -for kvm containers by the calling process. -*/ -func KVMContainerLabels() (string, string) { +// kvmContainerLabels returns the default processLabel and mountLabel to be used +// for kvm containers by the calling process. +func kvmContainerLabels() (string, string) { processLabel := labels["kvm_process"] if processLabel == "" { processLabel = labels["process"] @@ -756,11 +943,9 @@ func KVMContainerLabels() (string, string) { return addMcs(processLabel, labels["file"]) } -/* -InitContainerLabels returns the default processLabel and file labels to be -used for containers running an init system like systemd by the calling process. -*/ -func InitContainerLabels() (string, string) { +// initContainerLabels returns the default processLabel and file labels to be +// used for containers running an init system like systemd by the calling process. +func initContainerLabels() (string, string) { processLabel := labels["init_process"] if processLabel == "" { processLabel = labels["process"] @@ -769,25 +954,23 @@ func InitContainerLabels() (string, string) { return addMcs(processLabel, labels["file"]) } -/* -ContainerLabels returns an allocated processLabel and fileLabel to be used for -container labeling by the calling process. -*/ -func ContainerLabels() (processLabel string, fileLabel string) { - if !GetEnabled() { +// containerLabels returns an allocated processLabel and fileLabel to be used for +// container labeling by the calling process. +func containerLabels() (processLabel string, fileLabel string) { + if !getEnabled() { return "", "" } processLabel = labels["process"] fileLabel = labels["file"] - roFileLabel = labels["ro_file"] + readOnlyFileLabel = labels["ro_file"] if processLabel == "" || fileLabel == "" { return "", fileLabel } - if roFileLabel == "" { - roFileLabel = fileLabel + if readOnlyFileLabel == "" { + readOnlyFileLabel = fileLabel } return addMcs(processLabel, fileLabel) @@ -806,16 +989,14 @@ func addMcs(processLabel, fileLabel string) (string, string) { return processLabel, fileLabel } -// SecurityCheckContext validates that the SELinux label is understood by the kernel -func SecurityCheckContext(val string) error { +// securityCheckContext validates that the SELinux label is understood by the kernel +func securityCheckContext(val string) error { return ioutil.WriteFile(path.Join(getSelinuxMountPoint(), "context"), []byte(val), 0644) } -/* -CopyLevel returns a label with the MLS/MCS level from src label replaced on -the dest label. -*/ -func CopyLevel(src, dest string) (string, error) { +// copyLevel returns a label with the MLS/MCS level from src label replaced on +// the dest label. +func copyLevel(src, dest string) (string, error) { if src == "" { return "", nil } @@ -839,7 +1020,7 @@ func CopyLevel(src, dest string) (string, error) { return tcon.Get(), nil } -// Prevent users from relabing system files +// Prevent users from relabeling system files func badPrefix(fpath string) error { if fpath == "" { return ErrEmptyPath @@ -854,10 +1035,10 @@ func badPrefix(fpath string) error { return nil } -// Chcon changes the fpath file object to the SELinux label label. -// If fpath is a directory and recurse is true, Chcon will walk the +// chcon changes the fpath file object to the SELinux label label. +// If fpath is a directory and recurse is true, then chcon walks the // directory tree setting the label. -func Chcon(fpath string, label string, recurse bool) error { +func chcon(fpath string, label string, recurse bool) error { if fpath == "" { return ErrEmptyPath } @@ -882,9 +1063,9 @@ func Chcon(fpath string, label string, recurse bool) error { }) } -// DupSecOpt takes an SELinux process label and returns security options that +// dupSecOpt takes an SELinux process label and returns security options that // can be used to set the SELinux Type and Level for future container processes. -func DupSecOpt(src string) ([]string, error) { +func dupSecOpt(src string) ([]string, error) { if src == "" { return nil, nil } @@ -909,8 +1090,8 @@ func DupSecOpt(src string) ([]string, error) { return dup, nil } -// DisableSecOpt returns a security opt that can be used to disable SELinux +// disableSecOpt returns a security opt that can be used to disable SELinux // labeling support for future container processes. -func DisableSecOpt() []string { +func disableSecOpt() []string { return []string{"disable"} } diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go index c5fbba2faaf..c526b210f9c 100644 --- a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go +++ b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go @@ -2,257 +2,147 @@ package selinux -import ( - "errors" -) - -const ( - // Enforcing constant indicate SELinux is in enforcing mode - Enforcing = 1 - // Permissive constant to indicate SELinux is in permissive mode - Permissive = 0 - // Disabled constant to indicate SELinux is disabled - Disabled = -1 - // DefaultCategoryRange is the upper bound on the category range - DefaultCategoryRange = uint32(1024) -) - -var ( - // ErrMCSAlreadyExists is returned when trying to allocate a duplicate MCS. - ErrMCSAlreadyExists = errors.New("MCS label already exists") - // ErrEmptyPath is returned when an empty path has been specified. - ErrEmptyPath = errors.New("empty path") - // CategoryRange allows the upper bound on the category range to be adjusted - CategoryRange = DefaultCategoryRange -) - -// Context is a representation of the SELinux label broken into 4 parts -type Context map[string]string - -// SetDisabled disables selinux support for the package -func SetDisabled() { - return +func setDisabled() { } -// GetEnabled returns whether selinux is currently enabled. -func GetEnabled() bool { +func getEnabled() bool { return false } -// ClassIndex returns the int index for an object class in the loaded policy, or -1 and an error -func ClassIndex(class string) (int, error) { +func classIndex(class string) (int, error) { return -1, nil } -// SetFileLabel sets the SELinux label for this path or returns an error. -func SetFileLabel(fpath string, label string) error { +func setFileLabel(fpath string, label string) error { return nil } -// FileLabel returns the SELinux label for this path or returns an error. -func FileLabel(fpath string) (string, error) { +func fileLabel(fpath string) (string, error) { return "", nil } -/* -SetFSCreateLabel tells kernel the label to create all file system objects -created by this task. Setting label="" to return to default. -*/ -func SetFSCreateLabel(label string) error { +func setFSCreateLabel(label string) error { return nil } -/* -FSCreateLabel returns the default label the kernel which the kernel is using -for file system objects created by this task. "" indicates default. -*/ -func FSCreateLabel() (string, error) { +func fsCreateLabel() (string, error) { return "", nil } -// CurrentLabel returns the SELinux label of the current process thread, or an error. -func CurrentLabel() (string, error) { +func currentLabel() (string, error) { return "", nil } -// PidLabel returns the SELinux label of the given pid, or an error. -func PidLabel(pid int) (string, error) { +func pidLabel(pid int) (string, error) { return "", nil } -/* -ExecLabel returns the SELinux label that the kernel will use for any programs -that are executed by the current process thread, or an error. -*/ -func ExecLabel() (string, error) { +func execLabel() (string, error) { return "", nil } -/* -CanonicalizeContext takes a context string and writes it to the kernel -the function then returns the context that the kernel will use. This function -can be used to see if two contexts are equivalent -*/ -func CanonicalizeContext(val string) (string, error) { +func canonicalizeContext(val string) (string, error) { return "", nil } -/* -ComputeCreateContext requests the type transition from source to target for class from the kernel. -*/ -func ComputeCreateContext(source string, target string, class string) (string, error) { +func computeCreateContext(source string, target string, class string) (string, error) { return "", nil } -/* -SetExecLabel sets the SELinux label that the kernel will use for any programs -that are executed by the current process thread, or an error. -*/ -func SetExecLabel(label string) error { +func calculateGlbLub(sourceRange, targetRange string) (string, error) { + return "", nil +} + +func setExecLabel(label string) error { return nil } -/* -SetTaskLabel sets the SELinux label for the current thread, or an error. -This requires the dyntransition permission. -*/ -func SetTaskLabel(label string) error { +func setTaskLabel(label string) error { return nil } -/* -SetSocketLabel sets the SELinux label that the kernel will use for any programs -that are executed by the current process thread, or an error. -*/ -func SetSocketLabel(label string) error { +func setSocketLabel(label string) error { return nil } -// SocketLabel retrieves the current socket label setting -func SocketLabel() (string, error) { +func socketLabel() (string, error) { return "", nil } -// PeerLabel retrieves the label of the client on the other side of a socket -func PeerLabel(fd uintptr) (string, error) { +func peerLabel(fd uintptr) (string, error) { return "", nil } -// SetKeyLabel takes a process label and tells the kernel to assign the -// label to the next kernel keyring that gets created -func SetKeyLabel(label string) error { +func setKeyLabel(label string) error { return nil } -// KeyLabel retrieves the current kernel keyring label setting -func KeyLabel() (string, error) { +func keyLabel() (string, error) { return "", nil } -// Get returns the Context as a string -func (c Context) Get() string { +func (c Context) get() string { return "" } -// NewContext creates a new Context struct from the specified label -func NewContext(label string) (Context, error) { +func newContext(label string) (Context, error) { c := make(Context) return c, nil } -// ClearLabels clears all reserved MLS/MCS levels -func ClearLabels() { - return +func clearLabels() { } -// ReserveLabel reserves the MLS/MCS level component of the specified label -func ReserveLabel(label string) { - return +func reserveLabel(label string) { } -// EnforceMode returns the current SELinux mode Enforcing, Permissive, Disabled -func EnforceMode() int { +func enforceMode() int { return Disabled } -/* -SetEnforceMode sets the current SELinux mode Enforcing, Permissive. -Disabled is not valid, since this needs to be set at boot time. -*/ -func SetEnforceMode(mode int) error { +func setEnforceMode(mode int) error { return nil } -/* -DefaultEnforceMode returns the systems default SELinux mode Enforcing, -Permissive or Disabled. Note this is is just the default at boot time. -EnforceMode tells you the systems current mode. -*/ -func DefaultEnforceMode() int { +func defaultEnforceMode() int { return Disabled } -/* -ReleaseLabel will unreserve the MLS/MCS Level field of the specified label. -Allowing it to be used by another process. -*/ -func ReleaseLabel(label string) { - return +func releaseLabel(label string) { } -// ROFileLabel returns the specified SELinux readonly file label -func ROFileLabel() string { +func roFileLabel() string { return "" } -// KVMContainerLabels returns the default processLabel and mountLabel to be used -// for kvm containers by the calling process. -func KVMContainerLabels() (string, string) { +func kvmContainerLabels() (string, string) { return "", "" } -// InitContainerLabels returns the default processLabel and file labels to be -// used for containers running an init system like systemd by the calling -func InitContainerLabels() (string, string) { +func initContainerLabels() (string, string) { return "", "" } -/* -ContainerLabels returns an allocated processLabel and fileLabel to be used for -container labeling by the calling process. -*/ -func ContainerLabels() (processLabel string, fileLabel string) { +func containerLabels() (processLabel string, fileLabel string) { return "", "" } -// SecurityCheckContext validates that the SELinux label is understood by the kernel -func SecurityCheckContext(val string) error { +func securityCheckContext(val string) error { return nil } -/* -CopyLevel returns a label with the MLS/MCS level from src label replaced on -the dest label. -*/ -func CopyLevel(src, dest string) (string, error) { +func copyLevel(src, dest string) (string, error) { return "", nil } -// Chcon changes the `fpath` file object to the SELinux label `label`. -// If `fpath` is a directory and `recurse`` is true, Chcon will walk the -// directory tree setting the label. -func Chcon(fpath string, label string, recurse bool) error { +func chcon(fpath string, label string, recurse bool) error { return nil } -// DupSecOpt takes an SELinux process label and returns security options that -// can be used to set the SELinux Type and Level for future container processes. -func DupSecOpt(src string) ([]string, error) { +func dupSecOpt(src string) ([]string, error) { return nil, nil } -// DisableSecOpt returns a security opt that can be used to disable SELinux -// labeling support for future container processes. -func DisableSecOpt() []string { +func disableSecOpt() []string { return []string{"disable"} } diff --git a/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go b/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go index 2ee0d01508f..63fde18429a 100644 --- a/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go +++ b/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go @@ -48,7 +48,11 @@ func WalkN(root string, walkFn WalkFunc, num int) error { errCh := make(chan error, 1) // get the first error, ignore others // Start walking a tree asap - var err error + var ( + err error + wg sync.WaitGroup + ) + wg.Add(1) go func() { err = filepath.Walk(root, func(p string, info os.FileInfo, err error) error { if err != nil { @@ -68,9 +72,9 @@ func WalkN(root string, walkFn WalkFunc, num int) error { if err == nil { close(files) } + wg.Done() }() - var wg sync.WaitGroup wg.Add(num) for i := 0; i < num; i++ { go func() { diff --git a/vendor/github.com/prometheus/client_golang/prometheus/build_info.go b/vendor/github.com/prometheus/client_golang/prometheus/build_info.go new file mode 100644 index 00000000000..288f0e85488 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/build_info.go @@ -0,0 +1,29 @@ +// Copyright 2019 The Prometheus 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. + +// +build go1.12 + +package prometheus + +import "runtime/debug" + +// readBuildInfo is a wrapper around debug.ReadBuildInfo for Go 1.12+. +func readBuildInfo() (path, version, sum string) { + path, version, sum = "unknown", "unknown", "unknown" + if bi, ok := debug.ReadBuildInfo(); ok { + path = bi.Main.Path + version = bi.Main.Version + sum = bi.Main.Sum + } + return +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/build_info_pre_1.12.go b/vendor/github.com/prometheus/client_golang/prometheus/build_info_pre_1.12.go new file mode 100644 index 00000000000..6609e2877c0 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/build_info_pre_1.12.go @@ -0,0 +1,22 @@ +// Copyright 2019 The Prometheus 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. + +// +build !go1.12 + +package prometheus + +// readBuildInfo is a wrapper around debug.ReadBuildInfo for Go versions before +// 1.12. Remove this whole file once the minimum supported Go version is 1.12. +func readBuildInfo() (path, version, sum string) { + return "unknown", "unknown", "unknown" +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/collector.go b/vendor/github.com/prometheus/client_golang/prometheus/collector.go index c0d70b2faf1..1e839650d4d 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/collector.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/collector.go @@ -79,7 +79,7 @@ type Collector interface { // of the Describe method. If a Collector sometimes collects no metrics at all // (for example vectors like CounterVec, GaugeVec, etc., which only collect // metrics after a metric with a fully specified label set has been accessed), -// it might even get registered as an unchecked Collecter (cf. the Register +// it might even get registered as an unchecked Collector (cf. the Register // method of the Registerer interface). Hence, only use this shortcut // implementation of Describe if you are certain to fulfill the contract. // diff --git a/vendor/github.com/prometheus/client_golang/prometheus/counter.go b/vendor/github.com/prometheus/client_golang/prometheus/counter.go index d463e36d3e9..0e1b48c03f1 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/counter.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/counter.go @@ -17,6 +17,7 @@ import ( "errors" "math" "sync/atomic" + "time" dto "github.com/prometheus/client_model/go" ) @@ -42,11 +43,27 @@ type Counter interface { Add(float64) } +// ExemplarAdder is implemented by Counters that offer the option of adding a +// value to the Counter together with an exemplar. Its AddWithExemplar method +// works like the Add method of the Counter interface but also replaces the +// currently saved exemplar (if any) with a new one, created from the provided +// value, the current time as timestamp, and the provided labels. Empty Labels +// will lead to a valid (label-less) exemplar. But if Labels is nil, the current +// exemplar is left in place. AddWithExemplar panics if the value is < 0, if any +// of the provided labels are invalid, or if the provided labels contain more +// than 64 runes in total. +type ExemplarAdder interface { + AddWithExemplar(value float64, exemplar Labels) +} + // CounterOpts is an alias for Opts. See there for doc comments. type CounterOpts Opts // NewCounter creates a new Counter based on the provided CounterOpts. // +// The returned implementation also implements ExemplarAdder. It is safe to +// perform the corresponding type assertion. +// // The returned implementation tracks the counter value in two separate // variables, a float64 and a uint64. The latter is used to track calls of the // Inc method and calls of the Add method with a value that can be represented @@ -61,7 +78,7 @@ func NewCounter(opts CounterOpts) Counter { nil, opts.ConstLabels, ) - result := &counter{desc: desc, labelPairs: desc.constLabelPairs} + result := &counter{desc: desc, labelPairs: desc.constLabelPairs, now: time.Now} result.init(result) // Init self-collection. return result } @@ -78,6 +95,9 @@ type counter struct { desc *Desc labelPairs []*dto.LabelPair + exemplar atomic.Value // Containing nil or a *dto.Exemplar. + + now func() time.Time // To mock out time.Now() for testing. } func (c *counter) Desc() *Desc { @@ -88,6 +108,7 @@ func (c *counter) Add(v float64) { if v < 0 { panic(errors.New("counter cannot decrease in value")) } + ival := uint64(v) if float64(ival) == v { atomic.AddUint64(&c.valInt, ival) @@ -103,6 +124,11 @@ func (c *counter) Add(v float64) { } } +func (c *counter) AddWithExemplar(v float64, e Labels) { + c.Add(v) + c.updateExemplar(v, e) +} + func (c *counter) Inc() { atomic.AddUint64(&c.valInt, 1) } @@ -112,7 +138,23 @@ func (c *counter) Write(out *dto.Metric) error { ival := atomic.LoadUint64(&c.valInt) val := fval + float64(ival) - return populateMetric(CounterValue, val, c.labelPairs, out) + var exemplar *dto.Exemplar + if e := c.exemplar.Load(); e != nil { + exemplar = e.(*dto.Exemplar) + } + + return populateMetric(CounterValue, val, c.labelPairs, exemplar, out) +} + +func (c *counter) updateExemplar(v float64, l Labels) { + if l == nil { + return + } + e, err := newExemplar(v, c.now(), l) + if err != nil { + panic(err) + } + c.exemplar.Store(e) } // CounterVec is a Collector that bundles a set of Counters that all share the @@ -138,7 +180,7 @@ func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec { if len(lvs) != len(desc.variableLabels) { panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels, lvs)) } - result := &counter{desc: desc, labelPairs: makeLabelPairs(desc, lvs)} + result := &counter{desc: desc, labelPairs: makeLabelPairs(desc, lvs), now: time.Now} result.init(result) // Init self-collection. return result }), @@ -267,6 +309,8 @@ type CounterFunc interface { // provided function must be concurrency-safe. The function should also honor // the contract for a Counter (values only go up, not down), but compliance will // not be checked. +// +// Check out the ExampleGaugeFunc examples for the similar GaugeFunc. func NewCounterFunc(opts CounterOpts, function func() float64) CounterFunc { return newValueFunc(NewDesc( BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), diff --git a/vendor/github.com/prometheus/client_golang/prometheus/desc.go b/vendor/github.com/prometheus/client_golang/prometheus/desc.go index 1d034f871cb..2f19f5e1e7e 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/desc.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/desc.go @@ -19,6 +19,8 @@ import ( "sort" "strings" + "github.com/cespare/xxhash/v2" + //lint:ignore SA1019 Need to keep deprecated package for compatibility. "github.com/golang/protobuf/proto" "github.com/prometheus/common/model" @@ -126,24 +128,24 @@ func NewDesc(fqName, help string, variableLabels []string, constLabels Labels) * return d } - vh := hashNew() + xxh := xxhash.New() for _, val := range labelValues { - vh = hashAdd(vh, val) - vh = hashAddByte(vh, separatorByte) + xxh.WriteString(val) + xxh.Write(separatorByteSlice) } - d.id = vh + d.id = xxh.Sum64() // Sort labelNames so that order doesn't matter for the hash. sort.Strings(labelNames) // Now hash together (in this order) the help string and the sorted // label names. - lh := hashNew() - lh = hashAdd(lh, help) - lh = hashAddByte(lh, separatorByte) + xxh.Reset() + xxh.WriteString(help) + xxh.Write(separatorByteSlice) for _, labelName := range labelNames { - lh = hashAdd(lh, labelName) - lh = hashAddByte(lh, separatorByte) + xxh.WriteString(labelName) + xxh.Write(separatorByteSlice) } - d.dimHash = lh + d.dimHash = xxh.Sum64() d.constLabelPairs = make([]*dto.LabelPair, 0, len(constLabels)) for n, v := range constLabels { diff --git a/vendor/github.com/prometheus/client_golang/prometheus/doc.go b/vendor/github.com/prometheus/client_golang/prometheus/doc.go index 5d9525defc8..98450125d6a 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/doc.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/doc.go @@ -84,25 +84,21 @@ // of those four metric types can be found in the Prometheus docs: // https://prometheus.io/docs/concepts/metric_types/ // -// A fifth "type" of metric is Untyped. It behaves like a Gauge, but signals the -// Prometheus server not to assume anything about its type. -// -// In addition to the fundamental metric types Gauge, Counter, Summary, -// Histogram, and Untyped, a very important part of the Prometheus data model is -// the partitioning of samples along dimensions called labels, which results in +// In addition to the fundamental metric types Gauge, Counter, Summary, and +// Histogram, a very important part of the Prometheus data model is the +// partitioning of samples along dimensions called labels, which results in // metric vectors. The fundamental types are GaugeVec, CounterVec, SummaryVec, -// HistogramVec, and UntypedVec. +// and HistogramVec. // // While only the fundamental metric types implement the Metric interface, both // the metrics and their vector versions implement the Collector interface. A // Collector manages the collection of a number of Metrics, but for convenience, -// a Metric can also “collect itself”. Note that Gauge, Counter, Summary, -// Histogram, and Untyped are interfaces themselves while GaugeVec, CounterVec, -// SummaryVec, HistogramVec, and UntypedVec are not. +// a Metric can also “collect itself”. Note that Gauge, Counter, Summary, and +// Histogram are interfaces themselves while GaugeVec, CounterVec, SummaryVec, +// and HistogramVec are not. // // To create instances of Metrics and their vector versions, you need a suitable -// …Opts struct, i.e. GaugeOpts, CounterOpts, SummaryOpts, HistogramOpts, or -// UntypedOpts. +// …Opts struct, i.e. GaugeOpts, CounterOpts, SummaryOpts, or HistogramOpts. // // Custom Collectors and constant Metrics // @@ -118,17 +114,20 @@ // existing numbers into Prometheus Metrics during collection. An own // implementation of the Collector interface is perfect for that. You can create // Metric instances “on the fly” using NewConstMetric, NewConstHistogram, and -// NewConstSummary (and their respective Must… versions). That will happen in -// the Collect method. The Describe method has to return separate Desc -// instances, representative of the “throw-away” metrics to be created later. -// NewDesc comes in handy to create those Desc instances. Alternatively, you -// could return no Desc at all, which will marke the Collector “unchecked”. No -// checks are porformed at registration time, but metric consistency will still -// be ensured at scrape time, i.e. any inconsistencies will lead to scrape +// NewConstSummary (and their respective Must… versions). NewConstMetric is used +// for all metric types with just a float64 as their value: Counter, Gauge, and +// a special “type” called Untyped. Use the latter if you are not sure if the +// mirrored metric is a Counter or a Gauge. Creation of the Metric instance +// happens in the Collect method. The Describe method has to return separate +// Desc instances, representative of the “throw-away” metrics to be created +// later. NewDesc comes in handy to create those Desc instances. Alternatively, +// you could return no Desc at all, which will mark the Collector “unchecked”. +// No checks are performed at registration time, but metric consistency will +// still be ensured at scrape time, i.e. any inconsistencies will lead to scrape // errors. Thus, with unchecked Collectors, the responsibility to not collect // metrics that lead to inconsistencies in the total scrape result lies with the // implementer of the Collector. While this is not a desirable state, it is -// sometimes necessary. The typical use case is a situatios where the exact +// sometimes necessary. The typical use case is a situation where the exact // metrics to be returned by a Collector cannot be predicted at registration // time, but the implementer has sufficient knowledge of the whole system to // guarantee metric consistency. @@ -183,7 +182,6 @@ // method can then expose the gathered metrics in some way. Usually, the metrics // are served via HTTP on the /metrics endpoint. That's happening in the example // above. The tools to expose metrics via HTTP are in the promhttp sub-package. -// (The top-level functions in the prometheus package are deprecated.) // // Pushing to the Pushgateway // diff --git a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go index 71d406bd92a..d67573f767a 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go @@ -123,7 +123,7 @@ func (g *gauge) Sub(val float64) { func (g *gauge) Write(out *dto.Metric) error { val := math.Float64frombits(atomic.LoadUint64(&g.valBits)) - return populateMetric(GaugeValue, val, g.labelPairs, out) + return populateMetric(GaugeValue, val, g.labelPairs, nil, out) } // GaugeVec is a Collector that bundles a set of Gauges that all share the same @@ -273,9 +273,12 @@ type GaugeFunc interface { // NewGaugeFunc creates a new GaugeFunc based on the provided GaugeOpts. The // value reported is determined by calling the given function from within the // Write method. Take into account that metric collection may happen -// concurrently. If that results in concurrent calls to Write, like in the case -// where a GaugeFunc is directly registered with Prometheus, the provided -// function must be concurrency-safe. +// concurrently. Therefore, it must be safe to call the provided function +// concurrently. +// +// NewGaugeFunc is a good way to create an “info” style metric with a constant +// value of 1. Example: +// https://github.com/prometheus/common/blob/8558a5b7db3c84fa38b4766966059a7bd5bfa2ee/version/info.go#L36-L56 func NewGaugeFunc(opts GaugeOpts, function func() float64) GaugeFunc { return newValueFunc(NewDesc( BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), diff --git a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go index ba3b9333edd..ea05cf429f2 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go @@ -14,9 +14,9 @@ package prometheus import ( - "fmt" "runtime" "runtime/debug" + "sync" "time" ) @@ -26,16 +26,41 @@ type goCollector struct { gcDesc *Desc goInfoDesc *Desc - // metrics to describe and collect - metrics memStatsMetrics + // ms... are memstats related. + msLast *runtime.MemStats // Previously collected memstats. + msLastTimestamp time.Time + msMtx sync.Mutex // Protects msLast and msLastTimestamp. + msMetrics memStatsMetrics + msRead func(*runtime.MemStats) // For mocking in tests. + msMaxWait time.Duration // Wait time for fresh memstats. + msMaxAge time.Duration // Maximum allowed age of old memstats. } -// NewGoCollector returns a collector which exports metrics about the current Go +// NewGoCollector returns a collector that exports metrics about the current Go // process. This includes memory stats. To collect those, runtime.ReadMemStats -// is called. This causes a stop-the-world, which is very short with Go1.9+ -// (~25µs). However, with older Go versions, the stop-the-world duration depends -// on the heap size and can be quite significant (~1.7 ms/GiB as per +// is called. This requires to “stop the world”, which usually only happens for +// garbage collection (GC). Take the following implications into account when +// deciding whether to use the Go collector: +// +// 1. The performance impact of stopping the world is the more relevant the more +// frequently metrics are collected. However, with Go1.9 or later the +// stop-the-world time per metrics collection is very short (~25µs) so that the +// performance impact will only matter in rare cases. However, with older Go +// versions, the stop-the-world duration depends on the heap size and can be +// quite significant (~1.7 ms/GiB as per // https://go-review.googlesource.com/c/go/+/34937). +// +// 2. During an ongoing GC, nothing else can stop the world. Therefore, if the +// metrics collection happens to coincide with GC, it will only complete after +// GC has finished. Usually, GC is fast enough to not cause problems. However, +// with a very large heap, GC might take multiple seconds, which is enough to +// cause scrape timeouts in common setups. To avoid this problem, the Go +// collector will use the memstats from a previous collection if +// runtime.ReadMemStats takes more than 1s. However, if there are no previously +// collected memstats, or their collection is more than 5m ago, the collection +// will block until runtime.ReadMemStats succeeds. (The problem might be solved +// in Go1.13, see https://github.com/golang/go/issues/19812 for the related Go +// issue.) func NewGoCollector() Collector { return &goCollector{ goroutinesDesc: NewDesc( @@ -48,13 +73,17 @@ func NewGoCollector() Collector { nil, nil), gcDesc: NewDesc( "go_gc_duration_seconds", - "A summary of the GC invocation durations.", + "A summary of the pause duration of garbage collection cycles.", nil, nil), goInfoDesc: NewDesc( "go_info", "Information about the Go environment.", nil, Labels{"version": runtime.Version()}), - metrics: memStatsMetrics{ + msLast: &runtime.MemStats{}, + msRead: runtime.ReadMemStats, + msMaxWait: time.Second, + msMaxAge: 5 * time.Minute, + msMetrics: memStatsMetrics{ { desc: NewDesc( memstatNamespace("alloc_bytes"), @@ -253,7 +282,7 @@ func NewGoCollector() Collector { } func memstatNamespace(s string) string { - return fmt.Sprintf("go_memstats_%s", s) + return "go_memstats_" + s } // Describe returns all descriptions of the collector. @@ -262,13 +291,27 @@ func (c *goCollector) Describe(ch chan<- *Desc) { ch <- c.threadsDesc ch <- c.gcDesc ch <- c.goInfoDesc - for _, i := range c.metrics { + for _, i := range c.msMetrics { ch <- i.desc } } // Collect returns the current state of all metrics of the collector. func (c *goCollector) Collect(ch chan<- Metric) { + var ( + ms = &runtime.MemStats{} + done = make(chan struct{}) + ) + // Start reading memstats first as it might take a while. + go func() { + c.msRead(ms) + c.msMtx.Lock() + c.msLast = ms + c.msLastTimestamp = time.Now() + c.msMtx.Unlock() + close(done) + }() + ch <- MustNewConstMetric(c.goroutinesDesc, GaugeValue, float64(runtime.NumGoroutine())) n, _ := runtime.ThreadCreateProfile(nil) ch <- MustNewConstMetric(c.threadsDesc, GaugeValue, float64(n)) @@ -286,9 +329,31 @@ func (c *goCollector) Collect(ch chan<- Metric) { ch <- MustNewConstMetric(c.goInfoDesc, GaugeValue, 1) - ms := &runtime.MemStats{} - runtime.ReadMemStats(ms) - for _, i := range c.metrics { + timer := time.NewTimer(c.msMaxWait) + select { + case <-done: // Our own ReadMemStats succeeded in time. Use it. + timer.Stop() // Important for high collection frequencies to not pile up timers. + c.msCollect(ch, ms) + return + case <-timer.C: // Time out, use last memstats if possible. Continue below. + } + c.msMtx.Lock() + if time.Since(c.msLastTimestamp) < c.msMaxAge { + // Last memstats are recent enough. Collect from them under the lock. + c.msCollect(ch, c.msLast) + c.msMtx.Unlock() + return + } + // If we are here, the last memstats are too old or don't exist. We have + // to wait until our own ReadMemStats finally completes. For that to + // happen, we have to release the lock. + c.msMtx.Unlock() + <-done + c.msCollect(ch, ms) +} + +func (c *goCollector) msCollect(ch chan<- Metric, ms *runtime.MemStats) { + for _, i := range c.msMetrics { ch <- MustNewConstMetric(i.desc, i.valType, i.eval(ms)) } } @@ -299,3 +364,33 @@ type memStatsMetrics []struct { eval func(*runtime.MemStats) float64 valType ValueType } + +// NewBuildInfoCollector returns a collector collecting a single metric +// "go_build_info" with the constant value 1 and three labels "path", "version", +// and "checksum". Their label values contain the main module path, version, and +// checksum, respectively. The labels will only have meaningful values if the +// binary is built with Go module support and from source code retrieved from +// the source repository (rather than the local file system). This is usually +// accomplished by building from outside of GOPATH, specifying the full address +// of the main package, e.g. "GO111MODULE=on go run +// github.com/prometheus/client_golang/examples/random". If built without Go +// module support, all label values will be "unknown". If built with Go module +// support but using the source code from the local file system, the "path" will +// be set appropriately, but "checksum" will be empty and "version" will be +// "(devel)". +// +// This collector uses only the build information for the main module. See +// https://github.com/povilasv/prommod for an example of a collector for the +// module dependencies. +func NewBuildInfoCollector() Collector { + path, version, sum := readBuildInfo() + c := &selfCollector{MustNewConstMetric( + NewDesc( + "go_build_info", + "Build information about the main Go module.", + nil, Labels{"path": path, "version": version, "checksum": sum}, + ), + GaugeValue, 1)} + c.init(c.self) + return c +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go index f88da707bc8..d4ea301a33c 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go @@ -20,7 +20,9 @@ import ( "sort" "sync" "sync/atomic" + "time" + //lint:ignore SA1019 Need to keep deprecated package for compatibility. "github.com/golang/protobuf/proto" dto "github.com/prometheus/client_model/go" @@ -138,7 +140,7 @@ type HistogramOpts struct { // better covered by target labels set by the scraping Prometheus // server, or by one specific metric (e.g. a build_info or a // machine_role metric). See also - // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels,-not-static-scraped-labels + // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels ConstLabels Labels // Buckets defines the buckets into which observations are counted. Each @@ -151,6 +153,10 @@ type HistogramOpts struct { // NewHistogram creates a new Histogram based on the provided HistogramOpts. It // panics if the buckets in HistogramOpts are not in strictly increasing order. +// +// The returned implementation also implements ExemplarObserver. It is safe to +// perform the corresponding type assertion. Exemplars are tracked separately +// for each bucket. func NewHistogram(opts HistogramOpts) Histogram { return newHistogram( NewDesc( @@ -187,7 +193,8 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr desc: desc, upperBounds: opts.Buckets, labelPairs: makeLabelPairs(desc, labelValues), - counts: [2]*histogramCounts{&histogramCounts{}, &histogramCounts{}}, + counts: [2]*histogramCounts{{}, {}}, + now: time.Now, } for i, upperBound := range h.upperBounds { if i < len(h.upperBounds)-1 { @@ -204,10 +211,11 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr } } } - // Finally we know the final length of h.upperBounds and can make counts - // for both states: + // Finally we know the final length of h.upperBounds and can make buckets + // for both counts as well as exemplars: h.counts[0].buckets = make([]uint64, len(h.upperBounds)) h.counts[1].buckets = make([]uint64, len(h.upperBounds)) + h.exemplars = make([]atomic.Value, len(h.upperBounds)+1) h.init(h) // Init self-collection. return h @@ -224,18 +232,21 @@ type histogramCounts struct { } type histogram struct { - // countAndHotIdx is a complicated one. For lock-free yet atomic - // observations, we need to save the total count of observations again, - // combined with the index of the currently-hot counts struct, so that - // we can perform the operation on both values atomically. The least - // significant bit defines the hot counts struct. The remaining 63 bits - // represent the total count of observations. This happens under the - // assumption that the 63bit count will never overflow. Rationale: An - // observations takes about 30ns. Let's assume it could happen in - // 10ns. Overflowing the counter will then take at least (2^63)*10ns, - // which is about 3000 years. + // countAndHotIdx enables lock-free writes with use of atomic updates. + // The most significant bit is the hot index [0 or 1] of the count field + // below. Observe calls update the hot one. All remaining bits count the + // number of Observe calls. Observe starts by incrementing this counter, + // and finish by incrementing the count field in the respective + // histogramCounts, as a marker for completion. // - // This has to be first in the struct for 64bit alignment. See + // Calls of the Write method (which are non-mutating reads from the + // perspective of the histogram) swap the hot–cold under the writeMtx + // lock. A cooldown is awaited (while locked) by comparing the number of + // observations with the initiation count. Once they match, then the + // last observation on the now cool one has completed. All cool fields must + // be merged into the new hot before releasing writeMtx. + // + // Fields with atomic access first! See alignment constraint: // http://golang.org/pkg/sync/atomic/#pkg-note-BUG countAndHotIdx uint64 @@ -243,16 +254,17 @@ type histogram struct { desc *Desc writeMtx sync.Mutex // Only used in the Write method. - upperBounds []float64 - // Two counts, one is "hot" for lock-free observations, the other is // "cold" for writing out a dto.Metric. It has to be an array of // pointers to guarantee 64bit alignment of the histogramCounts, see // http://golang.org/pkg/sync/atomic/#pkg-note-BUG. counts [2]*histogramCounts - hotIdx int // Index of currently-hot counts. Only used within Write. - labelPairs []*dto.LabelPair + upperBounds []float64 + labelPairs []*dto.LabelPair + exemplars []atomic.Value // One more than buckets (to include +Inf), each a *dto.Exemplar. + + now func() time.Time // To mock out time.Now() for testing. } func (h *histogram) Desc() *Desc { @@ -260,105 +272,65 @@ func (h *histogram) Desc() *Desc { } func (h *histogram) Observe(v float64) { - // TODO(beorn7): For small numbers of buckets (<30), a linear search is - // slightly faster than the binary search. If we really care, we could - // switch from one search strategy to the other depending on the number - // of buckets. - // - // Microbenchmarks (BenchmarkHistogramNoLabels): - // 11 buckets: 38.3 ns/op linear - binary 48.7 ns/op - // 100 buckets: 78.1 ns/op linear - binary 54.9 ns/op - // 300 buckets: 154 ns/op linear - binary 61.6 ns/op - i := sort.SearchFloat64s(h.upperBounds, v) + h.observe(v, h.findBucket(v)) +} - // We increment h.countAndHotIdx by 2 so that the counter in the upper - // 63 bits gets incremented by 1. At the same time, we get the new value - // back, which we can use to find the currently-hot counts. - n := atomic.AddUint64(&h.countAndHotIdx, 2) - hotCounts := h.counts[n%2] - - if i < len(h.upperBounds) { - atomic.AddUint64(&hotCounts.buckets[i], 1) - } - for { - oldBits := atomic.LoadUint64(&hotCounts.sumBits) - newBits := math.Float64bits(math.Float64frombits(oldBits) + v) - if atomic.CompareAndSwapUint64(&hotCounts.sumBits, oldBits, newBits) { - break - } - } - // Increment count last as we take it as a signal that the observation - // is complete. - atomic.AddUint64(&hotCounts.count, 1) +func (h *histogram) ObserveWithExemplar(v float64, e Labels) { + i := h.findBucket(v) + h.observe(v, i) + h.updateExemplar(v, i, e) } func (h *histogram) Write(out *dto.Metric) error { - var ( - his = &dto.Histogram{} - buckets = make([]*dto.Bucket, len(h.upperBounds)) - hotCounts, coldCounts *histogramCounts - count uint64 - ) - - // For simplicity, we mutex the rest of this method. It is not in the - // hot path, i.e. Observe is called much more often than Write. The - // complication of making Write lock-free isn't worth it. + // For simplicity, we protect this whole method by a mutex. It is not in + // the hot path, i.e. Observe is called much more often than Write. The + // complication of making Write lock-free isn't worth it, if possible at + // all. h.writeMtx.Lock() defer h.writeMtx.Unlock() - // This is a bit arcane, which is why the following spells out this if - // clause in English: - // - // If the currently-hot counts struct is #0, we atomically increment - // h.countAndHotIdx by 1 so that from now on Observe will use the counts - // struct #1. Furthermore, the atomic increment gives us the new value, - // which, in its most significant 63 bits, tells us the count of - // observations done so far up to and including currently ongoing - // observations still using the counts struct just changed from hot to - // cold. To have a normal uint64 for the count, we bitshift by 1 and - // save the result in count. We also set h.hotIdx to 1 for the next - // Write call, and we will refer to counts #1 as hotCounts and to counts - // #0 as coldCounts. - // - // If the currently-hot counts struct is #1, we do the corresponding - // things the other way round. We have to _decrement_ h.countAndHotIdx - // (which is a bit arcane in itself, as we have to express -1 with an - // unsigned int...). - if h.hotIdx == 0 { - count = atomic.AddUint64(&h.countAndHotIdx, 1) >> 1 - h.hotIdx = 1 - hotCounts = h.counts[1] - coldCounts = h.counts[0] - } else { - count = atomic.AddUint64(&h.countAndHotIdx, ^uint64(0)) >> 1 // Decrement. - h.hotIdx = 0 - hotCounts = h.counts[0] - coldCounts = h.counts[1] - } + // Adding 1<<63 switches the hot index (from 0 to 1 or from 1 to 0) + // without touching the count bits. See the struct comments for a full + // description of the algorithm. + n := atomic.AddUint64(&h.countAndHotIdx, 1<<63) + // count is contained unchanged in the lower 63 bits. + count := n & ((1 << 63) - 1) + // The most significant bit tells us which counts is hot. The complement + // is thus the cold one. + hotCounts := h.counts[n>>63] + coldCounts := h.counts[(^n)>>63] - // Now we have to wait for the now-declared-cold counts to actually cool - // down, i.e. wait for all observations still using it to finish. That's - // the case once the count in the cold counts struct is the same as the - // one atomically retrieved from the upper 63bits of h.countAndHotIdx. - for { - if count == atomic.LoadUint64(&coldCounts.count) { - break - } + // Await cooldown. + for count != atomic.LoadUint64(&coldCounts.count) { runtime.Gosched() // Let observations get work done. } - his.SampleCount = proto.Uint64(count) - his.SampleSum = proto.Float64(math.Float64frombits(atomic.LoadUint64(&coldCounts.sumBits))) + his := &dto.Histogram{ + Bucket: make([]*dto.Bucket, len(h.upperBounds)), + SampleCount: proto.Uint64(count), + SampleSum: proto.Float64(math.Float64frombits(atomic.LoadUint64(&coldCounts.sumBits))), + } var cumCount uint64 for i, upperBound := range h.upperBounds { cumCount += atomic.LoadUint64(&coldCounts.buckets[i]) - buckets[i] = &dto.Bucket{ + his.Bucket[i] = &dto.Bucket{ CumulativeCount: proto.Uint64(cumCount), UpperBound: proto.Float64(upperBound), } + if e := h.exemplars[i].Load(); e != nil { + his.Bucket[i].Exemplar = e.(*dto.Exemplar) + } + } + // If there is an exemplar for the +Inf bucket, we have to add that bucket explicitly. + if e := h.exemplars[len(h.upperBounds)].Load(); e != nil { + b := &dto.Bucket{ + CumulativeCount: proto.Uint64(count), + UpperBound: proto.Float64(math.Inf(1)), + Exemplar: e.(*dto.Exemplar), + } + his.Bucket = append(his.Bucket, b) } - his.Bucket = buckets out.Histogram = his out.Label = h.labelPairs @@ -380,6 +352,57 @@ func (h *histogram) Write(out *dto.Metric) error { return nil } +// findBucket returns the index of the bucket for the provided value, or +// len(h.upperBounds) for the +Inf bucket. +func (h *histogram) findBucket(v float64) int { + // TODO(beorn7): For small numbers of buckets (<30), a linear search is + // slightly faster than the binary search. If we really care, we could + // switch from one search strategy to the other depending on the number + // of buckets. + // + // Microbenchmarks (BenchmarkHistogramNoLabels): + // 11 buckets: 38.3 ns/op linear - binary 48.7 ns/op + // 100 buckets: 78.1 ns/op linear - binary 54.9 ns/op + // 300 buckets: 154 ns/op linear - binary 61.6 ns/op + return sort.SearchFloat64s(h.upperBounds, v) +} + +// observe is the implementation for Observe without the findBucket part. +func (h *histogram) observe(v float64, bucket int) { + // We increment h.countAndHotIdx so that the counter in the lower + // 63 bits gets incremented. At the same time, we get the new value + // back, which we can use to find the currently-hot counts. + n := atomic.AddUint64(&h.countAndHotIdx, 1) + hotCounts := h.counts[n>>63] + + if bucket < len(h.upperBounds) { + atomic.AddUint64(&hotCounts.buckets[bucket], 1) + } + for { + oldBits := atomic.LoadUint64(&hotCounts.sumBits) + newBits := math.Float64bits(math.Float64frombits(oldBits) + v) + if atomic.CompareAndSwapUint64(&hotCounts.sumBits, oldBits, newBits) { + break + } + } + // Increment count last as we take it as a signal that the observation + // is complete. + atomic.AddUint64(&hotCounts.count, 1) +} + +// updateExemplar replaces the exemplar for the provided bucket. With empty +// labels, it's a no-op. It panics if any of the labels is invalid. +func (h *histogram) updateExemplar(v float64, bucket int, l Labels) { + if l == nil { + return + } + e, err := newExemplar(v, h.now(), l) + if err != nil { + panic(err) + } + h.exemplars[bucket].Store(e) +} + // HistogramVec is a Collector that bundles a set of Histograms that all share the // same Desc, but have different values for their variable labels. This is used // if you want to count the same thing partitioned by various dimensions @@ -584,7 +607,7 @@ func NewConstHistogram( } // MustNewConstHistogram is a version of NewConstHistogram that panics where -// NewConstMetric would have returned an error. +// NewConstHistogram would have returned an error. func MustNewConstHistogram( desc *Desc, count uint64, diff --git a/vendor/github.com/prometheus/client_golang/prometheus/http.go b/vendor/github.com/prometheus/client_golang/prometheus/http.go deleted file mode 100644 index 9f0875bfc81..00000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/http.go +++ /dev/null @@ -1,504 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus - -import ( - "bufio" - "compress/gzip" - "io" - "net" - "net/http" - "strconv" - "strings" - "sync" - "time" - - "github.com/prometheus/common/expfmt" -) - -// TODO(beorn7): Remove this whole file. It is a partial mirror of -// promhttp/http.go (to avoid circular import chains) where everything HTTP -// related should live. The functions here are just for avoiding -// breakage. Everything is deprecated. - -const ( - contentTypeHeader = "Content-Type" - contentLengthHeader = "Content-Length" - contentEncodingHeader = "Content-Encoding" - acceptEncodingHeader = "Accept-Encoding" -) - -var gzipPool = sync.Pool{ - New: func() interface{} { - return gzip.NewWriter(nil) - }, -} - -// Handler returns an HTTP handler for the DefaultGatherer. It is -// already instrumented with InstrumentHandler (using "prometheus" as handler -// name). -// -// Deprecated: Please note the issues described in the doc comment of -// InstrumentHandler. You might want to consider using promhttp.Handler instead. -func Handler() http.Handler { - return InstrumentHandler("prometheus", UninstrumentedHandler()) -} - -// UninstrumentedHandler returns an HTTP handler for the DefaultGatherer. -// -// Deprecated: Use promhttp.HandlerFor(DefaultGatherer, promhttp.HandlerOpts{}) -// instead. See there for further documentation. -func UninstrumentedHandler() http.Handler { - return http.HandlerFunc(func(rsp http.ResponseWriter, req *http.Request) { - mfs, err := DefaultGatherer.Gather() - if err != nil { - httpError(rsp, err) - return - } - - contentType := expfmt.Negotiate(req.Header) - header := rsp.Header() - header.Set(contentTypeHeader, string(contentType)) - - w := io.Writer(rsp) - if gzipAccepted(req.Header) { - header.Set(contentEncodingHeader, "gzip") - gz := gzipPool.Get().(*gzip.Writer) - defer gzipPool.Put(gz) - - gz.Reset(w) - defer gz.Close() - - w = gz - } - - enc := expfmt.NewEncoder(w, contentType) - - for _, mf := range mfs { - if err := enc.Encode(mf); err != nil { - httpError(rsp, err) - return - } - } - }) -} - -var instLabels = []string{"method", "code"} - -type nower interface { - Now() time.Time -} - -type nowFunc func() time.Time - -func (n nowFunc) Now() time.Time { - return n() -} - -var now nower = nowFunc(func() time.Time { - return time.Now() -}) - -// InstrumentHandler wraps the given HTTP handler for instrumentation. It -// registers four metric collectors (if not already done) and reports HTTP -// metrics to the (newly or already) registered collectors: http_requests_total -// (CounterVec), http_request_duration_microseconds (Summary), -// http_request_size_bytes (Summary), http_response_size_bytes (Summary). Each -// has a constant label named "handler" with the provided handlerName as -// value. http_requests_total is a metric vector partitioned by HTTP method -// (label name "method") and HTTP status code (label name "code"). -// -// Deprecated: InstrumentHandler has several issues. Use the tooling provided in -// package promhttp instead. The issues are the following: (1) It uses Summaries -// rather than Histograms. Summaries are not useful if aggregation across -// multiple instances is required. (2) It uses microseconds as unit, which is -// deprecated and should be replaced by seconds. (3) The size of the request is -// calculated in a separate goroutine. Since this calculator requires access to -// the request header, it creates a race with any writes to the header performed -// during request handling. httputil.ReverseProxy is a prominent example for a -// handler performing such writes. (4) It has additional issues with HTTP/2, cf. -// https://github.com/prometheus/client_golang/issues/272. -func InstrumentHandler(handlerName string, handler http.Handler) http.HandlerFunc { - return InstrumentHandlerFunc(handlerName, handler.ServeHTTP) -} - -// InstrumentHandlerFunc wraps the given function for instrumentation. It -// otherwise works in the same way as InstrumentHandler (and shares the same -// issues). -// -// Deprecated: InstrumentHandlerFunc is deprecated for the same reasons as -// InstrumentHandler is. Use the tooling provided in package promhttp instead. -func InstrumentHandlerFunc(handlerName string, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc { - return InstrumentHandlerFuncWithOpts( - SummaryOpts{ - Subsystem: "http", - ConstLabels: Labels{"handler": handlerName}, - Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, - }, - handlerFunc, - ) -} - -// InstrumentHandlerWithOpts works like InstrumentHandler (and shares the same -// issues) but provides more flexibility (at the cost of a more complex call -// syntax). As InstrumentHandler, this function registers four metric -// collectors, but it uses the provided SummaryOpts to create them. However, the -// fields "Name" and "Help" in the SummaryOpts are ignored. "Name" is replaced -// by "requests_total", "request_duration_microseconds", "request_size_bytes", -// and "response_size_bytes", respectively. "Help" is replaced by an appropriate -// help string. The names of the variable labels of the http_requests_total -// CounterVec are "method" (get, post, etc.), and "code" (HTTP status code). -// -// If InstrumentHandlerWithOpts is called as follows, it mimics exactly the -// behavior of InstrumentHandler: -// -// prometheus.InstrumentHandlerWithOpts( -// prometheus.SummaryOpts{ -// Subsystem: "http", -// ConstLabels: prometheus.Labels{"handler": handlerName}, -// }, -// handler, -// ) -// -// Technical detail: "requests_total" is a CounterVec, not a SummaryVec, so it -// cannot use SummaryOpts. Instead, a CounterOpts struct is created internally, -// and all its fields are set to the equally named fields in the provided -// SummaryOpts. -// -// Deprecated: InstrumentHandlerWithOpts is deprecated for the same reasons as -// InstrumentHandler is. Use the tooling provided in package promhttp instead. -func InstrumentHandlerWithOpts(opts SummaryOpts, handler http.Handler) http.HandlerFunc { - return InstrumentHandlerFuncWithOpts(opts, handler.ServeHTTP) -} - -// InstrumentHandlerFuncWithOpts works like InstrumentHandlerFunc (and shares -// the same issues) but provides more flexibility (at the cost of a more complex -// call syntax). See InstrumentHandlerWithOpts for details how the provided -// SummaryOpts are used. -// -// Deprecated: InstrumentHandlerFuncWithOpts is deprecated for the same reasons -// as InstrumentHandler is. Use the tooling provided in package promhttp instead. -func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc { - reqCnt := NewCounterVec( - CounterOpts{ - Namespace: opts.Namespace, - Subsystem: opts.Subsystem, - Name: "requests_total", - Help: "Total number of HTTP requests made.", - ConstLabels: opts.ConstLabels, - }, - instLabels, - ) - if err := Register(reqCnt); err != nil { - if are, ok := err.(AlreadyRegisteredError); ok { - reqCnt = are.ExistingCollector.(*CounterVec) - } else { - panic(err) - } - } - - opts.Name = "request_duration_microseconds" - opts.Help = "The HTTP request latencies in microseconds." - reqDur := NewSummary(opts) - if err := Register(reqDur); err != nil { - if are, ok := err.(AlreadyRegisteredError); ok { - reqDur = are.ExistingCollector.(Summary) - } else { - panic(err) - } - } - - opts.Name = "request_size_bytes" - opts.Help = "The HTTP request sizes in bytes." - reqSz := NewSummary(opts) - if err := Register(reqSz); err != nil { - if are, ok := err.(AlreadyRegisteredError); ok { - reqSz = are.ExistingCollector.(Summary) - } else { - panic(err) - } - } - - opts.Name = "response_size_bytes" - opts.Help = "The HTTP response sizes in bytes." - resSz := NewSummary(opts) - if err := Register(resSz); err != nil { - if are, ok := err.(AlreadyRegisteredError); ok { - resSz = are.ExistingCollector.(Summary) - } else { - panic(err) - } - } - - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - now := time.Now() - - delegate := &responseWriterDelegator{ResponseWriter: w} - out := computeApproximateRequestSize(r) - - _, cn := w.(http.CloseNotifier) - _, fl := w.(http.Flusher) - _, hj := w.(http.Hijacker) - _, rf := w.(io.ReaderFrom) - var rw http.ResponseWriter - if cn && fl && hj && rf { - rw = &fancyResponseWriterDelegator{delegate} - } else { - rw = delegate - } - handlerFunc(rw, r) - - elapsed := float64(time.Since(now)) / float64(time.Microsecond) - - method := sanitizeMethod(r.Method) - code := sanitizeCode(delegate.status) - reqCnt.WithLabelValues(method, code).Inc() - reqDur.Observe(elapsed) - resSz.Observe(float64(delegate.written)) - reqSz.Observe(float64(<-out)) - }) -} - -func computeApproximateRequestSize(r *http.Request) <-chan int { - // Get URL length in current goroutine for avoiding a race condition. - // HandlerFunc that runs in parallel may modify the URL. - s := 0 - if r.URL != nil { - s += len(r.URL.String()) - } - - out := make(chan int, 1) - - go func() { - s += len(r.Method) - s += len(r.Proto) - for name, values := range r.Header { - s += len(name) - for _, value := range values { - s += len(value) - } - } - s += len(r.Host) - - // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL. - - if r.ContentLength != -1 { - s += int(r.ContentLength) - } - out <- s - close(out) - }() - - return out -} - -type responseWriterDelegator struct { - http.ResponseWriter - - status int - written int64 - wroteHeader bool -} - -func (r *responseWriterDelegator) WriteHeader(code int) { - r.status = code - r.wroteHeader = true - r.ResponseWriter.WriteHeader(code) -} - -func (r *responseWriterDelegator) Write(b []byte) (int, error) { - if !r.wroteHeader { - r.WriteHeader(http.StatusOK) - } - n, err := r.ResponseWriter.Write(b) - r.written += int64(n) - return n, err -} - -type fancyResponseWriterDelegator struct { - *responseWriterDelegator -} - -func (f *fancyResponseWriterDelegator) CloseNotify() <-chan bool { - return f.ResponseWriter.(http.CloseNotifier).CloseNotify() -} - -func (f *fancyResponseWriterDelegator) Flush() { - f.ResponseWriter.(http.Flusher).Flush() -} - -func (f *fancyResponseWriterDelegator) Hijack() (net.Conn, *bufio.ReadWriter, error) { - return f.ResponseWriter.(http.Hijacker).Hijack() -} - -func (f *fancyResponseWriterDelegator) ReadFrom(r io.Reader) (int64, error) { - if !f.wroteHeader { - f.WriteHeader(http.StatusOK) - } - n, err := f.ResponseWriter.(io.ReaderFrom).ReadFrom(r) - f.written += n - return n, err -} - -func sanitizeMethod(m string) string { - switch m { - case "GET", "get": - return "get" - case "PUT", "put": - return "put" - case "HEAD", "head": - return "head" - case "POST", "post": - return "post" - case "DELETE", "delete": - return "delete" - case "CONNECT", "connect": - return "connect" - case "OPTIONS", "options": - return "options" - case "NOTIFY", "notify": - return "notify" - default: - return strings.ToLower(m) - } -} - -func sanitizeCode(s int) string { - switch s { - case 100: - return "100" - case 101: - return "101" - - case 200: - return "200" - case 201: - return "201" - case 202: - return "202" - case 203: - return "203" - case 204: - return "204" - case 205: - return "205" - case 206: - return "206" - - case 300: - return "300" - case 301: - return "301" - case 302: - return "302" - case 304: - return "304" - case 305: - return "305" - case 307: - return "307" - - case 400: - return "400" - case 401: - return "401" - case 402: - return "402" - case 403: - return "403" - case 404: - return "404" - case 405: - return "405" - case 406: - return "406" - case 407: - return "407" - case 408: - return "408" - case 409: - return "409" - case 410: - return "410" - case 411: - return "411" - case 412: - return "412" - case 413: - return "413" - case 414: - return "414" - case 415: - return "415" - case 416: - return "416" - case 417: - return "417" - case 418: - return "418" - - case 500: - return "500" - case 501: - return "501" - case 502: - return "502" - case 503: - return "503" - case 504: - return "504" - case 505: - return "505" - - case 428: - return "428" - case 429: - return "429" - case 431: - return "431" - case 511: - return "511" - - default: - return strconv.Itoa(s) - } -} - -// gzipAccepted returns whether the client will accept gzip-encoded content. -func gzipAccepted(header http.Header) bool { - a := header.Get(acceptEncodingHeader) - parts := strings.Split(a, ",") - for _, part := range parts { - part = strings.TrimSpace(part) - if part == "gzip" || strings.HasPrefix(part, "gzip;") { - return true - } - } - return false -} - -// httpError removes any content-encoding header and then calls http.Error with -// the provided error and http.StatusInternalServerErrer. Error contents is -// supposed to be uncompressed plain text. However, same as with a plain -// http.Error, any header settings will be void if the header has already been -// sent. The error message will still be written to the writer, but it will -// probably be of limited use. -func httpError(rsp http.ResponseWriter, err error) { - rsp.Header().Del(contentEncodingHeader) - http.Error( - rsp, - "An error has occurred while serving metrics:\n\n"+err.Error(), - http.StatusInternalServerError, - ) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/metric.go b/vendor/github.com/prometheus/client_golang/prometheus/metric.go index 55e6d86d596..35bd8bde34c 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/metric.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/metric.go @@ -17,12 +17,14 @@ import ( "strings" "time" + //lint:ignore SA1019 Need to keep deprecated package for compatibility. "github.com/golang/protobuf/proto" + "github.com/prometheus/common/model" dto "github.com/prometheus/client_model/go" ) -const separatorByte byte = 255 +var separatorByteSlice = []byte{model.SeparatorByte} // For convenient use with xxhash. // A Metric models a single sample value with its meta data being exported to // Prometheus. Implementations of Metric in this package are Gauge, Counter, diff --git a/vendor/github.com/prometheus/client_golang/prometheus/observer.go b/vendor/github.com/prometheus/client_golang/prometheus/observer.go index 5806cd09e30..44128016fd1 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/observer.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/observer.go @@ -50,3 +50,15 @@ type ObserverVec interface { Collector } + +// ExemplarObserver is implemented by Observers that offer the option of +// observing a value together with an exemplar. Its ObserveWithExemplar method +// works like the Observe method of an Observer but also replaces the currently +// saved exemplar (if any) with a new one, created from the provided value, the +// current time as timestamp, and the provided Labels. Empty Labels will lead to +// a valid (label-less) exemplar. But if Labels is nil, the current exemplar is +// left in place. ObserveWithExemplar panics if any of the provided labels are +// invalid or if the provided labels contain more than 64 runes in total. +type ExemplarObserver interface { + ObserveWithExemplar(value float64, exemplar Labels) +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go index 55176d58ce6..9b809794212 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go @@ -16,8 +16,6 @@ package prometheus import ( "errors" "os" - - "github.com/prometheus/procfs" ) type processCollector struct { @@ -59,20 +57,9 @@ type ProcessCollectorOpts struct { // collector for the current process with an empty namespace string and no error // reporting. // -// Currently, the collector depends on a Linux-style proc filesystem and -// therefore only exports metrics for Linux. -// -// Note: An older version of this function had the following signature: -// -// NewProcessCollector(pid int, namespace string) Collector -// -// Most commonly, it was called as -// -// NewProcessCollector(os.Getpid(), "") -// -// The following call of the current version is equivalent to the above: -// -// NewProcessCollector(ProcessCollectorOpts{}) +// The collector only works on operating systems with a Linux-style proc +// filesystem and on Microsoft Windows. On other operating systems, it will not +// collect any metrics. func NewProcessCollector(opts ProcessCollectorOpts) Collector { ns := "" if len(opts.Namespace) > 0 { @@ -126,7 +113,7 @@ func NewProcessCollector(opts ProcessCollectorOpts) Collector { } // Set up process metric collection if supported by the runtime. - if _, err := procfs.NewStat(); err == nil { + if canCollectProcess() { c.collectFn = c.processCollect } else { c.collectFn = func(ch chan<- Metric) { @@ -153,46 +140,6 @@ func (c *processCollector) Collect(ch chan<- Metric) { c.collectFn(ch) } -func (c *processCollector) processCollect(ch chan<- Metric) { - pid, err := c.pidFn() - if err != nil { - c.reportError(ch, nil, err) - return - } - - p, err := procfs.NewProc(pid) - if err != nil { - c.reportError(ch, nil, err) - return - } - - if stat, err := p.NewStat(); err == nil { - ch <- MustNewConstMetric(c.cpuTotal, CounterValue, stat.CPUTime()) - ch <- MustNewConstMetric(c.vsize, GaugeValue, float64(stat.VirtualMemory())) - ch <- MustNewConstMetric(c.rss, GaugeValue, float64(stat.ResidentMemory())) - if startTime, err := stat.StartTime(); err == nil { - ch <- MustNewConstMetric(c.startTime, GaugeValue, startTime) - } else { - c.reportError(ch, c.startTime, err) - } - } else { - c.reportError(ch, nil, err) - } - - if fds, err := p.FileDescriptorsLen(); err == nil { - ch <- MustNewConstMetric(c.openFDs, GaugeValue, float64(fds)) - } else { - c.reportError(ch, c.openFDs, err) - } - - if limits, err := p.NewLimits(); err == nil { - ch <- MustNewConstMetric(c.maxFDs, GaugeValue, float64(limits.OpenFiles)) - ch <- MustNewConstMetric(c.maxVsize, GaugeValue, float64(limits.AddressSpace)) - } else { - c.reportError(ch, nil, err) - } -} - func (c *processCollector) reportError(ch chan<- Metric, desc *Desc, err error) { if !c.reportErrors { return diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_other.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_other.go new file mode 100644 index 00000000000..3117461cde7 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_other.go @@ -0,0 +1,65 @@ +// Copyright 2019 The Prometheus 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. + +// +build !windows + +package prometheus + +import ( + "github.com/prometheus/procfs" +) + +func canCollectProcess() bool { + _, err := procfs.NewDefaultFS() + return err == nil +} + +func (c *processCollector) processCollect(ch chan<- Metric) { + pid, err := c.pidFn() + if err != nil { + c.reportError(ch, nil, err) + return + } + + p, err := procfs.NewProc(pid) + if err != nil { + c.reportError(ch, nil, err) + return + } + + if stat, err := p.Stat(); err == nil { + ch <- MustNewConstMetric(c.cpuTotal, CounterValue, stat.CPUTime()) + ch <- MustNewConstMetric(c.vsize, GaugeValue, float64(stat.VirtualMemory())) + ch <- MustNewConstMetric(c.rss, GaugeValue, float64(stat.ResidentMemory())) + if startTime, err := stat.StartTime(); err == nil { + ch <- MustNewConstMetric(c.startTime, GaugeValue, startTime) + } else { + c.reportError(ch, c.startTime, err) + } + } else { + c.reportError(ch, nil, err) + } + + if fds, err := p.FileDescriptorsLen(); err == nil { + ch <- MustNewConstMetric(c.openFDs, GaugeValue, float64(fds)) + } else { + c.reportError(ch, c.openFDs, err) + } + + if limits, err := p.Limits(); err == nil { + ch <- MustNewConstMetric(c.maxFDs, GaugeValue, float64(limits.OpenFiles)) + ch <- MustNewConstMetric(c.maxVsize, GaugeValue, float64(limits.AddressSpace)) + } else { + c.reportError(ch, nil, err) + } +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_windows.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_windows.go new file mode 100644 index 00000000000..f973398df2d --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_windows.go @@ -0,0 +1,116 @@ +// Copyright 2019 The Prometheus 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 prometheus + +import ( + "syscall" + "unsafe" + + "golang.org/x/sys/windows" +) + +func canCollectProcess() bool { + return true +} + +var ( + modpsapi = syscall.NewLazyDLL("psapi.dll") + modkernel32 = syscall.NewLazyDLL("kernel32.dll") + + procGetProcessMemoryInfo = modpsapi.NewProc("GetProcessMemoryInfo") + procGetProcessHandleCount = modkernel32.NewProc("GetProcessHandleCount") +) + +type processMemoryCounters struct { + // System interface description + // https://docs.microsoft.com/en-us/windows/desktop/api/psapi/ns-psapi-process_memory_counters_ex + + // Refer to the Golang internal implementation + // https://golang.org/src/internal/syscall/windows/psapi_windows.go + _ uint32 + PageFaultCount uint32 + PeakWorkingSetSize uintptr + WorkingSetSize uintptr + QuotaPeakPagedPoolUsage uintptr + QuotaPagedPoolUsage uintptr + QuotaPeakNonPagedPoolUsage uintptr + QuotaNonPagedPoolUsage uintptr + PagefileUsage uintptr + PeakPagefileUsage uintptr + PrivateUsage uintptr +} + +func getProcessMemoryInfo(handle windows.Handle) (processMemoryCounters, error) { + mem := processMemoryCounters{} + r1, _, err := procGetProcessMemoryInfo.Call( + uintptr(handle), + uintptr(unsafe.Pointer(&mem)), + uintptr(unsafe.Sizeof(mem)), + ) + if r1 != 1 { + return mem, err + } else { + return mem, nil + } +} + +func getProcessHandleCount(handle windows.Handle) (uint32, error) { + var count uint32 + r1, _, err := procGetProcessHandleCount.Call( + uintptr(handle), + uintptr(unsafe.Pointer(&count)), + ) + if r1 != 1 { + return 0, err + } else { + return count, nil + } +} + +func (c *processCollector) processCollect(ch chan<- Metric) { + h, err := windows.GetCurrentProcess() + if err != nil { + c.reportError(ch, nil, err) + return + } + + var startTime, exitTime, kernelTime, userTime windows.Filetime + err = windows.GetProcessTimes(h, &startTime, &exitTime, &kernelTime, &userTime) + if err != nil { + c.reportError(ch, nil, err) + return + } + ch <- MustNewConstMetric(c.startTime, GaugeValue, float64(startTime.Nanoseconds()/1e9)) + ch <- MustNewConstMetric(c.cpuTotal, CounterValue, fileTimeToSeconds(kernelTime)+fileTimeToSeconds(userTime)) + + mem, err := getProcessMemoryInfo(h) + if err != nil { + c.reportError(ch, nil, err) + return + } + ch <- MustNewConstMetric(c.vsize, GaugeValue, float64(mem.PrivateUsage)) + ch <- MustNewConstMetric(c.rss, GaugeValue, float64(mem.WorkingSetSize)) + + handles, err := getProcessHandleCount(h) + if err != nil { + c.reportError(ch, nil, err) + return + } + ch <- MustNewConstMetric(c.openFDs, GaugeValue, float64(handles)) + ch <- MustNewConstMetric(c.maxFDs, GaugeValue, float64(16*1024*1024)) // Windows has a hard-coded max limit, not per-process. +} + +func fileTimeToSeconds(ft windows.Filetime) float64 { + return float64(uint64(ft.HighDateTime)<<32+uint64(ft.LowDateTime)) / 1e7 +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go index 67b56d37cfd..5070e72e28f 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go @@ -38,7 +38,6 @@ type delegator interface { type responseWriterDelegator struct { http.ResponseWriter - handler, method string status int written int64 wroteHeader bool @@ -54,15 +53,21 @@ func (r *responseWriterDelegator) Written() int64 { } func (r *responseWriterDelegator) WriteHeader(code int) { + if r.observeWriteHeader != nil && !r.wroteHeader { + // Only call observeWriteHeader for the 1st time. It's a bug if + // WriteHeader is called more than once, but we want to protect + // against it here. Note that we still delegate the WriteHeader + // to the original ResponseWriter to not mask the bug from it. + r.observeWriteHeader(code) + } r.status = code r.wroteHeader = true r.ResponseWriter.WriteHeader(code) - if r.observeWriteHeader != nil { - r.observeWriteHeader(code) - } } func (r *responseWriterDelegator) Write(b []byte) (int, error) { + // If applicable, call WriteHeader here so that observeWriteHeader is + // handled appropriately. if !r.wroteHeader { r.WriteHeader(http.StatusOK) } @@ -75,17 +80,27 @@ type closeNotifierDelegator struct{ *responseWriterDelegator } type flusherDelegator struct{ *responseWriterDelegator } type hijackerDelegator struct{ *responseWriterDelegator } type readerFromDelegator struct{ *responseWriterDelegator } +type pusherDelegator struct{ *responseWriterDelegator } func (d closeNotifierDelegator) CloseNotify() <-chan bool { + //lint:ignore SA1019 http.CloseNotifier is deprecated but we don't want to + //remove support from client_golang yet. return d.ResponseWriter.(http.CloseNotifier).CloseNotify() } func (d flusherDelegator) Flush() { + // If applicable, call WriteHeader here so that observeWriteHeader is + // handled appropriately. + if !d.wroteHeader { + d.WriteHeader(http.StatusOK) + } d.ResponseWriter.(http.Flusher).Flush() } func (d hijackerDelegator) Hijack() (net.Conn, *bufio.ReadWriter, error) { return d.ResponseWriter.(http.Hijacker).Hijack() } func (d readerFromDelegator) ReadFrom(re io.Reader) (int64, error) { + // If applicable, call WriteHeader here so that observeWriteHeader is + // handled appropriately. if !d.wroteHeader { d.WriteHeader(http.StatusOK) } @@ -93,6 +108,9 @@ func (d readerFromDelegator) ReadFrom(re io.Reader) (int64, error) { d.written += n return n, err } +func (d pusherDelegator) Push(target string, opts *http.PushOptions) error { + return d.ResponseWriter.(http.Pusher).Push(target, opts) +} var pickDelegator = make([]func(*responseWriterDelegator) delegator, 32) @@ -196,4 +214,157 @@ func init() { http.CloseNotifier }{d, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} } + pickDelegator[pusher] = func(d *responseWriterDelegator) delegator { // 16 + return pusherDelegator{d} + } + pickDelegator[pusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 17 + return struct { + *responseWriterDelegator + http.Pusher + http.CloseNotifier + }{d, pusherDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+flusher] = func(d *responseWriterDelegator) delegator { // 18 + return struct { + *responseWriterDelegator + http.Pusher + http.Flusher + }{d, pusherDelegator{d}, flusherDelegator{d}} + } + pickDelegator[pusher+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 19 + return struct { + *responseWriterDelegator + http.Pusher + http.Flusher + http.CloseNotifier + }{d, pusherDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+hijacker] = func(d *responseWriterDelegator) delegator { // 20 + return struct { + *responseWriterDelegator + http.Pusher + http.Hijacker + }{d, pusherDelegator{d}, hijackerDelegator{d}} + } + pickDelegator[pusher+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 21 + return struct { + *responseWriterDelegator + http.Pusher + http.Hijacker + http.CloseNotifier + }{d, pusherDelegator{d}, hijackerDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 22 + return struct { + *responseWriterDelegator + http.Pusher + http.Hijacker + http.Flusher + }{d, pusherDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}} + } + pickDelegator[pusher+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { //23 + return struct { + *responseWriterDelegator + http.Pusher + http.Hijacker + http.Flusher + http.CloseNotifier + }{d, pusherDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+readerFrom] = func(d *responseWriterDelegator) delegator { // 24 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + }{d, pusherDelegator{d}, readerFromDelegator{d}} + } + pickDelegator[pusher+readerFrom+closeNotifier] = func(d *responseWriterDelegator) delegator { // 25 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.CloseNotifier + }{d, pusherDelegator{d}, readerFromDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+readerFrom+flusher] = func(d *responseWriterDelegator) delegator { // 26 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Flusher + }{d, pusherDelegator{d}, readerFromDelegator{d}, flusherDelegator{d}} + } + pickDelegator[pusher+readerFrom+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 27 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Flusher + http.CloseNotifier + }{d, pusherDelegator{d}, readerFromDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+readerFrom+hijacker] = func(d *responseWriterDelegator) delegator { // 28 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Hijacker + }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}} + } + pickDelegator[pusher+readerFrom+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 29 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Hijacker + http.CloseNotifier + }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+readerFrom+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 30 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Hijacker + http.Flusher + }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}} + } + pickDelegator[pusher+readerFrom+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 31 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Hijacker + http.Flusher + http.CloseNotifier + }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} + } +} + +func newDelegator(w http.ResponseWriter, observeWriteHeaderFunc func(int)) delegator { + d := &responseWriterDelegator{ + ResponseWriter: w, + observeWriteHeader: observeWriteHeaderFunc, + } + + id := 0 + //lint:ignore SA1019 http.CloseNotifier is deprecated but we don't want to + //remove support from client_golang yet. + if _, ok := w.(http.CloseNotifier); ok { + id += closeNotifier + } + if _, ok := w.(http.Flusher); ok { + id += flusher + } + if _, ok := w.(http.Hijacker); ok { + id += hijacker + } + if _, ok := w.(io.ReaderFrom); ok { + id += readerFrom + } + if _, ok := w.(http.Pusher); ok { + id += pusher + } + + return pickDelegator[id](d) } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go deleted file mode 100644 index 31a70695695..00000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright 2017 The Prometheus 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. - -// +build go1.8 - -package promhttp - -import ( - "io" - "net/http" -) - -type pusherDelegator struct{ *responseWriterDelegator } - -func (d pusherDelegator) Push(target string, opts *http.PushOptions) error { - return d.ResponseWriter.(http.Pusher).Push(target, opts) -} - -func init() { - pickDelegator[pusher] = func(d *responseWriterDelegator) delegator { // 16 - return pusherDelegator{d} - } - pickDelegator[pusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 17 - return struct { - *responseWriterDelegator - http.Pusher - http.CloseNotifier - }{d, pusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+flusher] = func(d *responseWriterDelegator) delegator { // 18 - return struct { - *responseWriterDelegator - http.Pusher - http.Flusher - }{d, pusherDelegator{d}, flusherDelegator{d}} - } - pickDelegator[pusher+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 19 - return struct { - *responseWriterDelegator - http.Pusher - http.Flusher - http.CloseNotifier - }{d, pusherDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+hijacker] = func(d *responseWriterDelegator) delegator { // 20 - return struct { - *responseWriterDelegator - http.Pusher - http.Hijacker - }{d, pusherDelegator{d}, hijackerDelegator{d}} - } - pickDelegator[pusher+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 21 - return struct { - *responseWriterDelegator - http.Pusher - http.Hijacker - http.CloseNotifier - }{d, pusherDelegator{d}, hijackerDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 22 - return struct { - *responseWriterDelegator - http.Pusher - http.Hijacker - http.Flusher - }{d, pusherDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}} - } - pickDelegator[pusher+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { //23 - return struct { - *responseWriterDelegator - http.Pusher - http.Hijacker - http.Flusher - http.CloseNotifier - }{d, pusherDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+readerFrom] = func(d *responseWriterDelegator) delegator { // 24 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - }{d, pusherDelegator{d}, readerFromDelegator{d}} - } - pickDelegator[pusher+readerFrom+closeNotifier] = func(d *responseWriterDelegator) delegator { // 25 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.CloseNotifier - }{d, pusherDelegator{d}, readerFromDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+readerFrom+flusher] = func(d *responseWriterDelegator) delegator { // 26 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Flusher - }{d, pusherDelegator{d}, readerFromDelegator{d}, flusherDelegator{d}} - } - pickDelegator[pusher+readerFrom+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 27 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Flusher - http.CloseNotifier - }{d, pusherDelegator{d}, readerFromDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+readerFrom+hijacker] = func(d *responseWriterDelegator) delegator { // 28 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Hijacker - }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}} - } - pickDelegator[pusher+readerFrom+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 29 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Hijacker - http.CloseNotifier - }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+readerFrom+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 30 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Hijacker - http.Flusher - }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}} - } - pickDelegator[pusher+readerFrom+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 31 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Hijacker - http.Flusher - http.CloseNotifier - }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} - } -} - -func newDelegator(w http.ResponseWriter, observeWriteHeaderFunc func(int)) delegator { - d := &responseWriterDelegator{ - ResponseWriter: w, - observeWriteHeader: observeWriteHeaderFunc, - } - - id := 0 - if _, ok := w.(http.CloseNotifier); ok { - id += closeNotifier - } - if _, ok := w.(http.Flusher); ok { - id += flusher - } - if _, ok := w.(http.Hijacker); ok { - id += hijacker - } - if _, ok := w.(io.ReaderFrom); ok { - id += readerFrom - } - if _, ok := w.(http.Pusher); ok { - id += pusher - } - - return pickDelegator[id](d) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go index 668eb6b3c93..5e1c4546ceb 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go @@ -47,7 +47,6 @@ import ( const ( contentTypeHeader = "Content-Type" - contentLengthHeader = "Content-Length" contentEncodingHeader = "Content-Encoding" acceptEncodingHeader = "Accept-Encoding" ) @@ -85,10 +84,32 @@ func Handler() http.Handler { // instrumentation. Use the InstrumentMetricHandler function to apply the same // kind of instrumentation as it is used by the Handler function. func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler { - var inFlightSem chan struct{} + var ( + inFlightSem chan struct{} + errCnt = prometheus.NewCounterVec( + prometheus.CounterOpts{ + Name: "promhttp_metric_handler_errors_total", + Help: "Total number of internal errors encountered by the promhttp metric handler.", + }, + []string{"cause"}, + ) + ) + if opts.MaxRequestsInFlight > 0 { inFlightSem = make(chan struct{}, opts.MaxRequestsInFlight) } + if opts.Registry != nil { + // Initialize all possibilites that can occur below. + errCnt.WithLabelValues("gathering") + errCnt.WithLabelValues("encoding") + if err := opts.Registry.Register(errCnt); err != nil { + if are, ok := err.(prometheus.AlreadyRegisteredError); ok { + errCnt = are.ExistingCollector.(*prometheus.CounterVec) + } else { + panic(err) + } + } + } h := http.HandlerFunc(func(rsp http.ResponseWriter, req *http.Request) { if inFlightSem != nil { @@ -107,6 +128,7 @@ func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler { if opts.ErrorLog != nil { opts.ErrorLog.Println("error gathering metrics:", err) } + errCnt.WithLabelValues("gathering").Inc() switch opts.ErrorHandling { case PanicOnError: panic(err) @@ -122,7 +144,12 @@ func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler { } } - contentType := expfmt.Negotiate(req.Header) + var contentType expfmt.Format + if opts.EnableOpenMetrics { + contentType = expfmt.NegotiateIncludingOpenMetrics(req.Header) + } else { + contentType = expfmt.Negotiate(req.Header) + } header := rsp.Header() header.Set(contentTypeHeader, string(contentType)) @@ -140,27 +167,40 @@ func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler { enc := expfmt.NewEncoder(w, contentType) - var lastErr error - for _, mf := range mfs { - if err := enc.Encode(mf); err != nil { - lastErr = err - if opts.ErrorLog != nil { - opts.ErrorLog.Println("error encoding and sending metric family:", err) - } - switch opts.ErrorHandling { - case PanicOnError: - panic(err) - case ContinueOnError: - // Handled later. - case HTTPErrorOnError: - httpError(rsp, err) - return - } + // handleError handles the error according to opts.ErrorHandling + // and returns true if we have to abort after the handling. + handleError := func(err error) bool { + if err == nil { + return false } + if opts.ErrorLog != nil { + opts.ErrorLog.Println("error encoding and sending metric family:", err) + } + errCnt.WithLabelValues("encoding").Inc() + switch opts.ErrorHandling { + case PanicOnError: + panic(err) + case HTTPErrorOnError: + // We cannot really send an HTTP error at this + // point because we most likely have written + // something to rsp already. But at least we can + // stop sending. + return true + } + // Do nothing in all other cases, including ContinueOnError. + return false } - if lastErr != nil { - httpError(rsp, lastErr) + for _, mf := range mfs { + if handleError(enc.Encode(mf)) { + return + } + } + if closer, ok := enc.(expfmt.Closer); ok { + // This in particular takes care of the final "# EOF\n" line for OpenMetrics. + if handleError(closer.Close()) { + return + } } }) @@ -232,14 +272,22 @@ type HandlerErrorHandling int // errors are encountered. const ( // Serve an HTTP status code 500 upon the first error - // encountered. Report the error message in the body. + // encountered. Report the error message in the body. Note that HTTP + // errors cannot be served anymore once the beginning of a regular + // payload has been sent. Thus, in the (unlikely) case that encoding the + // payload into the negotiated wire format fails, serving the response + // will simply be aborted. Set an ErrorLog in HandlerOpts to detect + // those errors. HTTPErrorOnError HandlerErrorHandling = iota // Ignore errors and try to serve as many metrics as possible. However, // if no metrics can be served, serve an HTTP status code 500 and the // last error message in the body. Only use this in deliberate "best - // effort" metrics collection scenarios. It is recommended to at least - // log errors (by providing an ErrorLog in HandlerOpts) to not mask - // errors completely. + // effort" metrics collection scenarios. In this case, it is highly + // recommended to provide other means of detecting errors: By setting an + // ErrorLog in HandlerOpts, the errors are logged. By providing a + // Registry in HandlerOpts, the exposed metrics include an error counter + // "promhttp_metric_handler_errors_total", which can be used for + // alerts. ContinueOnError // Panic upon the first error encountered (useful for "crash only" apps). PanicOnError @@ -262,6 +310,18 @@ type HandlerOpts struct { // logged regardless of the configured ErrorHandling provided ErrorLog // is not nil. ErrorHandling HandlerErrorHandling + // If Registry is not nil, it is used to register a metric + // "promhttp_metric_handler_errors_total", partitioned by "cause". A + // failed registration causes a panic. Note that this error counter is + // different from the instrumentation you get from the various + // InstrumentHandler... helpers. It counts errors that don't necessarily + // result in a non-2xx HTTP status code. There are two typical cases: + // (1) Encoding errors that only happen after streaming of the HTTP body + // has already started (and the status code 200 has been sent). This + // should only happen with custom collectors. (2) Collection errors with + // no effect on the HTTP status code because ErrorHandling is set to + // ContinueOnError. + Registry prometheus.Registerer // If DisableCompression is true, the handler will never compress the // response, even if requested by the client. DisableCompression bool @@ -280,6 +340,16 @@ type HandlerOpts struct { // away). Until the implementation is improved, it is recommended to // implement a separate timeout in potentially slow Collectors. Timeout time.Duration + // If true, the experimental OpenMetrics encoding is added to the + // possible options during content negotiation. Note that Prometheus + // 2.5.0+ will negotiate OpenMetrics as first priority. OpenMetrics is + // the only way to transmit exemplars. However, the move to OpenMetrics + // is not completely transparent. Most notably, the values of "quantile" + // labels of Summaries and "le" labels of Histograms are formatted with + // a trailing ".0" if they would otherwise look like integer numbers + // (which changes the identity of the resulting series on the Prometheus + // server). + EnableOpenMetrics bool } // gzipAccepted returns whether the client will accept gzip-encoded content. @@ -296,11 +366,9 @@ func gzipAccepted(header http.Header) bool { } // httpError removes any content-encoding header and then calls http.Error with -// the provided error and http.StatusInternalServerErrer. Error contents is -// supposed to be uncompressed plain text. However, same as with a plain -// http.Error, any header settings will be void if the header has already been -// sent. The error message will still be written to the writer, but it will -// probably be of limited use. +// the provided error and http.StatusInternalServerError. Error contents is +// supposed to be uncompressed plain text. Same as with a plain http.Error, this +// must not be called if the header or any payload has already been sent. func httpError(rsp http.ResponseWriter, err error) { rsp.Header().Del(contentEncodingHeader) http.Error( diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go index 86fd564470f..83c49b66a81 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go @@ -14,7 +14,9 @@ package promhttp import ( + "crypto/tls" "net/http" + "net/http/httptrace" "time" "github.com/prometheus/client_golang/prometheus" @@ -95,3 +97,123 @@ func InstrumentRoundTripperDuration(obs prometheus.ObserverVec, next http.RoundT return resp, err }) } + +// InstrumentTrace is used to offer flexibility in instrumenting the available +// httptrace.ClientTrace hook functions. Each function is passed a float64 +// representing the time in seconds since the start of the http request. A user +// may choose to use separately buckets Histograms, or implement custom +// instance labels on a per function basis. +type InstrumentTrace struct { + GotConn func(float64) + PutIdleConn func(float64) + GotFirstResponseByte func(float64) + Got100Continue func(float64) + DNSStart func(float64) + DNSDone func(float64) + ConnectStart func(float64) + ConnectDone func(float64) + TLSHandshakeStart func(float64) + TLSHandshakeDone func(float64) + WroteHeaders func(float64) + Wait100Continue func(float64) + WroteRequest func(float64) +} + +// InstrumentRoundTripperTrace is a middleware that wraps the provided +// RoundTripper and reports times to hook functions provided in the +// InstrumentTrace struct. Hook functions that are not present in the provided +// InstrumentTrace struct are ignored. Times reported to the hook functions are +// time since the start of the request. Only with Go1.9+, those times are +// guaranteed to never be negative. (Earlier Go versions are not using a +// monotonic clock.) Note that partitioning of Histograms is expensive and +// should be used judiciously. +// +// For hook functions that receive an error as an argument, no observations are +// made in the event of a non-nil error value. +// +// See the example for ExampleInstrumentRoundTripperDuration for example usage. +func InstrumentRoundTripperTrace(it *InstrumentTrace, next http.RoundTripper) RoundTripperFunc { + return RoundTripperFunc(func(r *http.Request) (*http.Response, error) { + start := time.Now() + + trace := &httptrace.ClientTrace{ + GotConn: func(_ httptrace.GotConnInfo) { + if it.GotConn != nil { + it.GotConn(time.Since(start).Seconds()) + } + }, + PutIdleConn: func(err error) { + if err != nil { + return + } + if it.PutIdleConn != nil { + it.PutIdleConn(time.Since(start).Seconds()) + } + }, + DNSStart: func(_ httptrace.DNSStartInfo) { + if it.DNSStart != nil { + it.DNSStart(time.Since(start).Seconds()) + } + }, + DNSDone: func(_ httptrace.DNSDoneInfo) { + if it.DNSDone != nil { + it.DNSDone(time.Since(start).Seconds()) + } + }, + ConnectStart: func(_, _ string) { + if it.ConnectStart != nil { + it.ConnectStart(time.Since(start).Seconds()) + } + }, + ConnectDone: func(_, _ string, err error) { + if err != nil { + return + } + if it.ConnectDone != nil { + it.ConnectDone(time.Since(start).Seconds()) + } + }, + GotFirstResponseByte: func() { + if it.GotFirstResponseByte != nil { + it.GotFirstResponseByte(time.Since(start).Seconds()) + } + }, + Got100Continue: func() { + if it.Got100Continue != nil { + it.Got100Continue(time.Since(start).Seconds()) + } + }, + TLSHandshakeStart: func() { + if it.TLSHandshakeStart != nil { + it.TLSHandshakeStart(time.Since(start).Seconds()) + } + }, + TLSHandshakeDone: func(_ tls.ConnectionState, err error) { + if err != nil { + return + } + if it.TLSHandshakeDone != nil { + it.TLSHandshakeDone(time.Since(start).Seconds()) + } + }, + WroteHeaders: func() { + if it.WroteHeaders != nil { + it.WroteHeaders(time.Since(start).Seconds()) + } + }, + Wait100Continue: func() { + if it.Wait100Continue != nil { + it.Wait100Continue(time.Since(start).Seconds()) + } + }, + WroteRequest: func(_ httptrace.WroteRequestInfo) { + if it.WroteRequest != nil { + it.WroteRequest(time.Since(start).Seconds()) + } + }, + } + r = r.WithContext(httptrace.WithClientTrace(r.Context(), trace)) + + return next.RoundTrip(r) + }) +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go deleted file mode 100644 index a034d1ec0f1..00000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2017 The Prometheus 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. - -// +build go1.8 - -package promhttp - -import ( - "context" - "crypto/tls" - "net/http" - "net/http/httptrace" - "time" -) - -// InstrumentTrace is used to offer flexibility in instrumenting the available -// httptrace.ClientTrace hook functions. Each function is passed a float64 -// representing the time in seconds since the start of the http request. A user -// may choose to use separately buckets Histograms, or implement custom -// instance labels on a per function basis. -type InstrumentTrace struct { - GotConn func(float64) - PutIdleConn func(float64) - GotFirstResponseByte func(float64) - Got100Continue func(float64) - DNSStart func(float64) - DNSDone func(float64) - ConnectStart func(float64) - ConnectDone func(float64) - TLSHandshakeStart func(float64) - TLSHandshakeDone func(float64) - WroteHeaders func(float64) - Wait100Continue func(float64) - WroteRequest func(float64) -} - -// InstrumentRoundTripperTrace is a middleware that wraps the provided -// RoundTripper and reports times to hook functions provided in the -// InstrumentTrace struct. Hook functions that are not present in the provided -// InstrumentTrace struct are ignored. Times reported to the hook functions are -// time since the start of the request. Only with Go1.9+, those times are -// guaranteed to never be negative. (Earlier Go versions are not using a -// monotonic clock.) Note that partitioning of Histograms is expensive and -// should be used judiciously. -// -// For hook functions that receive an error as an argument, no observations are -// made in the event of a non-nil error value. -// -// See the example for ExampleInstrumentRoundTripperDuration for example usage. -func InstrumentRoundTripperTrace(it *InstrumentTrace, next http.RoundTripper) RoundTripperFunc { - return RoundTripperFunc(func(r *http.Request) (*http.Response, error) { - start := time.Now() - - trace := &httptrace.ClientTrace{ - GotConn: func(_ httptrace.GotConnInfo) { - if it.GotConn != nil { - it.GotConn(time.Since(start).Seconds()) - } - }, - PutIdleConn: func(err error) { - if err != nil { - return - } - if it.PutIdleConn != nil { - it.PutIdleConn(time.Since(start).Seconds()) - } - }, - DNSStart: func(_ httptrace.DNSStartInfo) { - if it.DNSStart != nil { - it.DNSStart(time.Since(start).Seconds()) - } - }, - DNSDone: func(_ httptrace.DNSDoneInfo) { - if it.DNSDone != nil { - it.DNSDone(time.Since(start).Seconds()) - } - }, - ConnectStart: func(_, _ string) { - if it.ConnectStart != nil { - it.ConnectStart(time.Since(start).Seconds()) - } - }, - ConnectDone: func(_, _ string, err error) { - if err != nil { - return - } - if it.ConnectDone != nil { - it.ConnectDone(time.Since(start).Seconds()) - } - }, - GotFirstResponseByte: func() { - if it.GotFirstResponseByte != nil { - it.GotFirstResponseByte(time.Since(start).Seconds()) - } - }, - Got100Continue: func() { - if it.Got100Continue != nil { - it.Got100Continue(time.Since(start).Seconds()) - } - }, - TLSHandshakeStart: func() { - if it.TLSHandshakeStart != nil { - it.TLSHandshakeStart(time.Since(start).Seconds()) - } - }, - TLSHandshakeDone: func(_ tls.ConnectionState, err error) { - if err != nil { - return - } - if it.TLSHandshakeDone != nil { - it.TLSHandshakeDone(time.Since(start).Seconds()) - } - }, - WroteHeaders: func() { - if it.WroteHeaders != nil { - it.WroteHeaders(time.Since(start).Seconds()) - } - }, - Wait100Continue: func() { - if it.Wait100Continue != nil { - it.Wait100Continue(time.Since(start).Seconds()) - } - }, - WroteRequest: func(_ httptrace.WroteRequestInfo) { - if it.WroteRequest != nil { - it.WroteRequest(time.Since(start).Seconds()) - } - }, - } - r = r.WithContext(httptrace.WithClientTrace(context.Background(), trace)) - - return next.RoundTrip(r) - }) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/registry.go b/vendor/github.com/prometheus/client_golang/prometheus/registry.go index b5e70b93fa1..ba94405af4c 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/registry.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/registry.go @@ -25,6 +25,8 @@ import ( "sync" "unicode/utf8" + "github.com/cespare/xxhash/v2" + //lint:ignore SA1019 Need to keep deprecated package for compatibility. "github.com/golang/protobuf/proto" "github.com/prometheus/common/expfmt" @@ -74,7 +76,7 @@ func NewRegistry() *Registry { // NewPedanticRegistry returns a registry that checks during collection if each // collected Metric is consistent with its reported Desc, and if the Desc has // actually been registered with the registry. Unchecked Collectors (those whose -// Describe methed does not yield any descriptors) are excluded from the check. +// Describe method does not yield any descriptors) are excluded from the check. // // Usually, a Registry will be happy as long as the union of all collected // Metrics is consistent and valid even if some metrics are not consistent with @@ -266,7 +268,7 @@ func (r *Registry) Register(c Collector) error { descChan = make(chan *Desc, capDescChan) newDescIDs = map[uint64]struct{}{} newDimHashesByName = map[string]uint64{} - collectorID uint64 // Just a sum of all desc IDs. + collectorID uint64 // All desc IDs XOR'd together. duplicateDescErr error ) go func() { @@ -293,12 +295,12 @@ func (r *Registry) Register(c Collector) error { if _, exists := r.descIDs[desc.id]; exists { duplicateDescErr = fmt.Errorf("descriptor %s already exists with the same fully-qualified name and const label values", desc) } - // If it is not a duplicate desc in this collector, add it to + // If it is not a duplicate desc in this collector, XOR it to // the collectorID. (We allow duplicate descs within the same // collector, but their existence must be a no-op.) if _, exists := newDescIDs[desc.id]; !exists { newDescIDs[desc.id] = struct{}{} - collectorID += desc.id + collectorID ^= desc.id } // Are all the label names and the help string consistent with @@ -325,9 +327,17 @@ func (r *Registry) Register(c Collector) error { return nil } if existing, exists := r.collectorsByID[collectorID]; exists { - return AlreadyRegisteredError{ - ExistingCollector: existing, - NewCollector: c, + switch e := existing.(type) { + case *wrappingCollector: + return AlreadyRegisteredError{ + ExistingCollector: e.unwrapRecursively(), + NewCollector: c, + } + default: + return AlreadyRegisteredError{ + ExistingCollector: e, + NewCollector: c, + } } } // If the collectorID is new, but at least one of the descs existed @@ -352,7 +362,7 @@ func (r *Registry) Unregister(c Collector) bool { var ( descChan = make(chan *Desc, capDescChan) descIDs = map[uint64]struct{}{} - collectorID uint64 // Just a sum of the desc IDs. + collectorID uint64 // All desc IDs XOR'd together. ) go func() { c.Describe(descChan) @@ -360,7 +370,7 @@ func (r *Registry) Unregister(c Collector) bool { }() for desc := range descChan { if _, exists := descIDs[desc.id]; !exists { - collectorID += desc.id + collectorID ^= desc.id descIDs[desc.id] = struct{}{} } } @@ -680,7 +690,7 @@ func processMetric( // Gatherers is a slice of Gatherer instances that implements the Gatherer // interface itself. Its Gather method calls Gather on all Gatherers in the // slice in order and returns the merged results. Errors returned from the -// Gather calles are all returned in a flattened MultiError. Duplicate and +// Gather calls are all returned in a flattened MultiError. Duplicate and // inconsistent Metrics are skipped (first occurrence in slice order wins) and // reported in the returned error. // @@ -867,9 +877,9 @@ func checkMetricConsistency( } // Is the metric unique (i.e. no other metric with the same name and the same labels)? - h := hashNew() - h = hashAdd(h, name) - h = hashAddByte(h, separatorByte) + h := xxhash.New() + h.WriteString(name) + h.Write(separatorByteSlice) // Make sure label pairs are sorted. We depend on it for the consistency // check. if !sort.IsSorted(labelPairSorter(dtoMetric.Label)) { @@ -880,18 +890,19 @@ func checkMetricConsistency( dtoMetric.Label = copiedLabels } for _, lp := range dtoMetric.Label { - h = hashAdd(h, lp.GetName()) - h = hashAddByte(h, separatorByte) - h = hashAdd(h, lp.GetValue()) - h = hashAddByte(h, separatorByte) + h.WriteString(lp.GetName()) + h.Write(separatorByteSlice) + h.WriteString(lp.GetValue()) + h.Write(separatorByteSlice) } - if _, exists := metricHashes[h]; exists { + hSum := h.Sum64() + if _, exists := metricHashes[hSum]; exists { return fmt.Errorf( "collected metric %q { %s} was collected before with the same name and label values", name, dtoMetric, ) } - metricHashes[h] = struct{}{} + metricHashes[hSum] = struct{}{} return nil } diff --git a/vendor/github.com/prometheus/client_golang/prometheus/summary.go b/vendor/github.com/prometheus/client_golang/prometheus/summary.go index 2980614dff4..f3c1440d1c6 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/summary.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/summary.go @@ -16,11 +16,14 @@ package prometheus import ( "fmt" "math" + "runtime" "sort" "sync" + "sync/atomic" "time" "github.com/beorn7/perks/quantile" + //lint:ignore SA1019 Need to keep deprecated package for compatibility. "github.com/golang/protobuf/proto" dto "github.com/prometheus/client_model/go" @@ -37,7 +40,7 @@ const quantileLabel = "quantile" // A typical use-case is the observation of request latencies. By default, a // Summary provides the median, the 90th and the 99th percentile of the latency // as rank estimations. However, the default behavior will change in the -// upcoming v0.10 of the library. There will be no rank estimations at all by +// upcoming v1.0.0 of the library. There will be no rank estimations at all by // default. For a sane transition, it is recommended to set the desired rank // estimations explicitly. // @@ -56,16 +59,8 @@ type Summary interface { Observe(float64) } -// DefObjectives are the default Summary quantile values. -// -// Deprecated: DefObjectives will not be used as the default objectives in -// v0.10 of the library. The default Summary will have no quantiles then. -var ( - DefObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001} - - errQuantileLabelNotAllowed = fmt.Errorf( - "%q is not allowed as label name in summaries", quantileLabel, - ) +var errQuantileLabelNotAllowed = fmt.Errorf( + "%q is not allowed as label name in summaries", quantileLabel, ) // Default values for SummaryOpts. @@ -84,7 +79,7 @@ const ( // mandatory to set Name to a non-empty string. While all other fields are // optional and can safely be left at their zero value, it is recommended to set // a help string and to explicitly set the Objectives field to the desired value -// as the default value will change in the upcoming v0.10 of the library. +// as the default value will change in the upcoming v1.0.0 of the library. type SummaryOpts struct { // Namespace, Subsystem, and Name are components of the fully-qualified // name of the Summary (created by joining these components with @@ -121,13 +116,8 @@ type SummaryOpts struct { // Objectives defines the quantile rank estimates with their respective // absolute error. If Objectives[q] = e, then the value reported for q // will be the φ-quantile value for some φ between q-e and q+e. The - // default value is DefObjectives. It is used if Objectives is left at - // its zero value (i.e. nil). To create a Summary without Objectives, - // set it to an empty map (i.e. map[float64]float64{}). - // - // Deprecated: Note that the current value of DefObjectives is - // deprecated. It will be replaced by an empty map in v0.10 of the - // library. Please explicitly set Objectives to the desired value. + // default value is an empty map, resulting in a summary without + // quantiles. Objectives map[float64]float64 // MaxAge defines the duration for which an observation stays relevant @@ -151,7 +141,7 @@ type SummaryOpts struct { BufCap uint32 } -// Great fuck-up with the sliding-window decay algorithm... The Merge method of +// Problem with the sliding-window decay algorithm... The Merge method of // perk/quantile is actually not working as advertised - and it might be // unfixable, as the underlying algorithm is apparently not capable of merging // summaries in the first place. To avoid using Merge, we are currently adding @@ -196,7 +186,7 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { } if opts.Objectives == nil { - opts.Objectives = DefObjectives + opts.Objectives = map[float64]float64{} } if opts.MaxAge < 0 { @@ -214,6 +204,17 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { opts.BufCap = DefBufCap } + if len(opts.Objectives) == 0 { + // Use the lock-free implementation of a Summary without objectives. + s := &noObjectivesSummary{ + desc: desc, + labelPairs: makeLabelPairs(desc, labelValues), + counts: [2]*summaryCounts{{}, {}}, + } + s.init(s) // Init self-collection. + return s + } + s := &summary{ desc: desc, @@ -382,6 +383,116 @@ func (s *summary) swapBufs(now time.Time) { } } +type summaryCounts struct { + // sumBits contains the bits of the float64 representing the sum of all + // observations. sumBits and count have to go first in the struct to + // guarantee alignment for atomic operations. + // http://golang.org/pkg/sync/atomic/#pkg-note-BUG + sumBits uint64 + count uint64 +} + +type noObjectivesSummary struct { + // countAndHotIdx enables lock-free writes with use of atomic updates. + // The most significant bit is the hot index [0 or 1] of the count field + // below. Observe calls update the hot one. All remaining bits count the + // number of Observe calls. Observe starts by incrementing this counter, + // and finish by incrementing the count field in the respective + // summaryCounts, as a marker for completion. + // + // Calls of the Write method (which are non-mutating reads from the + // perspective of the summary) swap the hot–cold under the writeMtx + // lock. A cooldown is awaited (while locked) by comparing the number of + // observations with the initiation count. Once they match, then the + // last observation on the now cool one has completed. All cool fields must + // be merged into the new hot before releasing writeMtx. + + // Fields with atomic access first! See alignment constraint: + // http://golang.org/pkg/sync/atomic/#pkg-note-BUG + countAndHotIdx uint64 + + selfCollector + desc *Desc + writeMtx sync.Mutex // Only used in the Write method. + + // Two counts, one is "hot" for lock-free observations, the other is + // "cold" for writing out a dto.Metric. It has to be an array of + // pointers to guarantee 64bit alignment of the histogramCounts, see + // http://golang.org/pkg/sync/atomic/#pkg-note-BUG. + counts [2]*summaryCounts + + labelPairs []*dto.LabelPair +} + +func (s *noObjectivesSummary) Desc() *Desc { + return s.desc +} + +func (s *noObjectivesSummary) Observe(v float64) { + // We increment h.countAndHotIdx so that the counter in the lower + // 63 bits gets incremented. At the same time, we get the new value + // back, which we can use to find the currently-hot counts. + n := atomic.AddUint64(&s.countAndHotIdx, 1) + hotCounts := s.counts[n>>63] + + for { + oldBits := atomic.LoadUint64(&hotCounts.sumBits) + newBits := math.Float64bits(math.Float64frombits(oldBits) + v) + if atomic.CompareAndSwapUint64(&hotCounts.sumBits, oldBits, newBits) { + break + } + } + // Increment count last as we take it as a signal that the observation + // is complete. + atomic.AddUint64(&hotCounts.count, 1) +} + +func (s *noObjectivesSummary) Write(out *dto.Metric) error { + // For simplicity, we protect this whole method by a mutex. It is not in + // the hot path, i.e. Observe is called much more often than Write. The + // complication of making Write lock-free isn't worth it, if possible at + // all. + s.writeMtx.Lock() + defer s.writeMtx.Unlock() + + // Adding 1<<63 switches the hot index (from 0 to 1 or from 1 to 0) + // without touching the count bits. See the struct comments for a full + // description of the algorithm. + n := atomic.AddUint64(&s.countAndHotIdx, 1<<63) + // count is contained unchanged in the lower 63 bits. + count := n & ((1 << 63) - 1) + // The most significant bit tells us which counts is hot. The complement + // is thus the cold one. + hotCounts := s.counts[n>>63] + coldCounts := s.counts[(^n)>>63] + + // Await cooldown. + for count != atomic.LoadUint64(&coldCounts.count) { + runtime.Gosched() // Let observations get work done. + } + + sum := &dto.Summary{ + SampleCount: proto.Uint64(count), + SampleSum: proto.Float64(math.Float64frombits(atomic.LoadUint64(&coldCounts.sumBits))), + } + + out.Summary = sum + out.Label = s.labelPairs + + // Finally add all the cold counts to the new hot counts and reset the cold counts. + atomic.AddUint64(&hotCounts.count, count) + atomic.StoreUint64(&coldCounts.count, 0) + for { + oldBits := atomic.LoadUint64(&hotCounts.sumBits) + newBits := math.Float64bits(math.Float64frombits(oldBits) + sum.GetSampleSum()) + if atomic.CompareAndSwapUint64(&hotCounts.sumBits, oldBits, newBits) { + atomic.StoreUint64(&coldCounts.sumBits, 0) + break + } + } + return nil +} + type quantSort []*dto.Quantile func (s quantSort) Len() int { diff --git a/vendor/github.com/prometheus/client_golang/prometheus/testutil/lint.go b/vendor/github.com/prometheus/client_golang/prometheus/testutil/lint.go new file mode 100644 index 00000000000..7681877a894 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/testutil/lint.go @@ -0,0 +1,46 @@ +// Copyright 2020 The Prometheus 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 testutil + +import ( + "fmt" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/testutil/promlint" +) + +// CollectAndLint registers the provided Collector with a newly created pedantic +// Registry. It then calls GatherAndLint with that Registry and with the +// provided metricNames. +func CollectAndLint(c prometheus.Collector, metricNames ...string) ([]promlint.Problem, error) { + reg := prometheus.NewPedanticRegistry() + if err := reg.Register(c); err != nil { + return nil, fmt.Errorf("registering collector failed: %s", err) + } + return GatherAndLint(reg, metricNames...) +} + +// GatherAndLint gathers all metrics from the provided Gatherer and checks them +// with the linter in the promlint package. If any metricNames are provided, +// only metrics with those names are checked. +func GatherAndLint(g prometheus.Gatherer, metricNames ...string) ([]promlint.Problem, error) { + got, err := g.Gather() + if err != nil { + return nil, fmt.Errorf("gathering metrics failed: %s", err) + } + if metricNames != nil { + got = filterMetrics(got, metricNames) + } + return promlint.NewWithMetricFamilies(got).Lint() +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/testutil/promlint/promlint.go b/vendor/github.com/prometheus/client_golang/prometheus/testutil/promlint/promlint.go new file mode 100644 index 00000000000..ec806170625 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/testutil/promlint/promlint.go @@ -0,0 +1,386 @@ +// Copyright 2020 The Prometheus 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 promlint provides a linter for Prometheus metrics. +package promlint + +import ( + "fmt" + "io" + "regexp" + "sort" + "strings" + + "github.com/prometheus/common/expfmt" + + dto "github.com/prometheus/client_model/go" +) + +// A Linter is a Prometheus metrics linter. It identifies issues with metric +// names, types, and metadata, and reports them to the caller. +type Linter struct { + // The linter will read metrics in the Prometheus text format from r and + // then lint it, _and_ it will lint the metrics provided directly as + // MetricFamily proto messages in mfs. Note, however, that the current + // constructor functions New and NewWithMetricFamilies only ever set one + // of them. + r io.Reader + mfs []*dto.MetricFamily +} + +// A Problem is an issue detected by a Linter. +type Problem struct { + // The name of the metric indicated by this Problem. + Metric string + + // A description of the issue for this Problem. + Text string +} + +// newProblem is helper function to create a Problem. +func newProblem(mf *dto.MetricFamily, text string) Problem { + return Problem{ + Metric: mf.GetName(), + Text: text, + } +} + +// New creates a new Linter that reads an input stream of Prometheus metrics in +// the Prometheus text exposition format. +func New(r io.Reader) *Linter { + return &Linter{ + r: r, + } +} + +// NewWithMetricFamilies creates a new Linter that reads from a slice of +// MetricFamily protobuf messages. +func NewWithMetricFamilies(mfs []*dto.MetricFamily) *Linter { + return &Linter{ + mfs: mfs, + } +} + +// Lint performs a linting pass, returning a slice of Problems indicating any +// issues found in the metrics stream. The slice is sorted by metric name +// and issue description. +func (l *Linter) Lint() ([]Problem, error) { + var problems []Problem + + if l.r != nil { + d := expfmt.NewDecoder(l.r, expfmt.FmtText) + + mf := &dto.MetricFamily{} + for { + if err := d.Decode(mf); err != nil { + if err == io.EOF { + break + } + + return nil, err + } + + problems = append(problems, lint(mf)...) + } + } + for _, mf := range l.mfs { + problems = append(problems, lint(mf)...) + } + + // Ensure deterministic output. + sort.SliceStable(problems, func(i, j int) bool { + if problems[i].Metric == problems[j].Metric { + return problems[i].Text < problems[j].Text + } + return problems[i].Metric < problems[j].Metric + }) + + return problems, nil +} + +// lint is the entry point for linting a single metric. +func lint(mf *dto.MetricFamily) []Problem { + fns := []func(mf *dto.MetricFamily) []Problem{ + lintHelp, + lintMetricUnits, + lintCounter, + lintHistogramSummaryReserved, + lintMetricTypeInName, + lintReservedChars, + lintCamelCase, + lintUnitAbbreviations, + } + + var problems []Problem + for _, fn := range fns { + problems = append(problems, fn(mf)...) + } + + // TODO(mdlayher): lint rules for specific metrics types. + return problems +} + +// lintHelp detects issues related to the help text for a metric. +func lintHelp(mf *dto.MetricFamily) []Problem { + var problems []Problem + + // Expect all metrics to have help text available. + if mf.Help == nil { + problems = append(problems, newProblem(mf, "no help text")) + } + + return problems +} + +// lintMetricUnits detects issues with metric unit names. +func lintMetricUnits(mf *dto.MetricFamily) []Problem { + var problems []Problem + + unit, base, ok := metricUnits(*mf.Name) + if !ok { + // No known units detected. + return nil + } + + // Unit is already a base unit. + if unit == base { + return nil + } + + problems = append(problems, newProblem(mf, fmt.Sprintf("use base unit %q instead of %q", base, unit))) + + return problems +} + +// lintCounter detects issues specific to counters, as well as patterns that should +// only be used with counters. +func lintCounter(mf *dto.MetricFamily) []Problem { + var problems []Problem + + isCounter := mf.GetType() == dto.MetricType_COUNTER + isUntyped := mf.GetType() == dto.MetricType_UNTYPED + hasTotalSuffix := strings.HasSuffix(mf.GetName(), "_total") + + switch { + case isCounter && !hasTotalSuffix: + problems = append(problems, newProblem(mf, `counter metrics should have "_total" suffix`)) + case !isUntyped && !isCounter && hasTotalSuffix: + problems = append(problems, newProblem(mf, `non-counter metrics should not have "_total" suffix`)) + } + + return problems +} + +// lintHistogramSummaryReserved detects when other types of metrics use names or labels +// reserved for use by histograms and/or summaries. +func lintHistogramSummaryReserved(mf *dto.MetricFamily) []Problem { + // These rules do not apply to untyped metrics. + t := mf.GetType() + if t == dto.MetricType_UNTYPED { + return nil + } + + var problems []Problem + + isHistogram := t == dto.MetricType_HISTOGRAM + isSummary := t == dto.MetricType_SUMMARY + + n := mf.GetName() + + if !isHistogram && strings.HasSuffix(n, "_bucket") { + problems = append(problems, newProblem(mf, `non-histogram metrics should not have "_bucket" suffix`)) + } + if !isHistogram && !isSummary && strings.HasSuffix(n, "_count") { + problems = append(problems, newProblem(mf, `non-histogram and non-summary metrics should not have "_count" suffix`)) + } + if !isHistogram && !isSummary && strings.HasSuffix(n, "_sum") { + problems = append(problems, newProblem(mf, `non-histogram and non-summary metrics should not have "_sum" suffix`)) + } + + for _, m := range mf.GetMetric() { + for _, l := range m.GetLabel() { + ln := l.GetName() + + if !isHistogram && ln == "le" { + problems = append(problems, newProblem(mf, `non-histogram metrics should not have "le" label`)) + } + if !isSummary && ln == "quantile" { + problems = append(problems, newProblem(mf, `non-summary metrics should not have "quantile" label`)) + } + } + } + + return problems +} + +// lintMetricTypeInName detects when metric types are included in the metric name. +func lintMetricTypeInName(mf *dto.MetricFamily) []Problem { + var problems []Problem + n := strings.ToLower(mf.GetName()) + + for i, t := range dto.MetricType_name { + if i == int32(dto.MetricType_UNTYPED) { + continue + } + + typename := strings.ToLower(t) + if strings.Contains(n, "_"+typename+"_") || strings.HasSuffix(n, "_"+typename) { + problems = append(problems, newProblem(mf, fmt.Sprintf(`metric name should not include type '%s'`, typename))) + } + } + return problems +} + +// lintReservedChars detects colons in metric names. +func lintReservedChars(mf *dto.MetricFamily) []Problem { + var problems []Problem + if strings.Contains(mf.GetName(), ":") { + problems = append(problems, newProblem(mf, "metric names should not contain ':'")) + } + return problems +} + +var camelCase = regexp.MustCompile(`[a-z][A-Z]`) + +// lintCamelCase detects metric names and label names written in camelCase. +func lintCamelCase(mf *dto.MetricFamily) []Problem { + var problems []Problem + if camelCase.FindString(mf.GetName()) != "" { + problems = append(problems, newProblem(mf, "metric names should be written in 'snake_case' not 'camelCase'")) + } + + for _, m := range mf.GetMetric() { + for _, l := range m.GetLabel() { + if camelCase.FindString(l.GetName()) != "" { + problems = append(problems, newProblem(mf, "label names should be written in 'snake_case' not 'camelCase'")) + } + } + } + return problems +} + +// lintUnitAbbreviations detects abbreviated units in the metric name. +func lintUnitAbbreviations(mf *dto.MetricFamily) []Problem { + var problems []Problem + n := strings.ToLower(mf.GetName()) + for _, s := range unitAbbreviations { + if strings.Contains(n, "_"+s+"_") || strings.HasSuffix(n, "_"+s) { + problems = append(problems, newProblem(mf, "metric names should not contain abbreviated units")) + } + } + return problems +} + +// metricUnits attempts to detect known unit types used as part of a metric name, +// e.g. "foo_bytes_total" or "bar_baz_milligrams". +func metricUnits(m string) (unit string, base string, ok bool) { + ss := strings.Split(m, "_") + + for unit, base := range units { + // Also check for "no prefix". + for _, p := range append(unitPrefixes, "") { + for _, s := range ss { + // Attempt to explicitly match a known unit with a known prefix, + // as some words may look like "units" when matching suffix. + // + // As an example, "thermometers" should not match "meters", but + // "kilometers" should. + if s == p+unit { + return p + unit, base, true + } + } + } + } + + return "", "", false +} + +// Units and their possible prefixes recognized by this library. More can be +// added over time as needed. +var ( + // map a unit to the appropriate base unit. + units = map[string]string{ + // Base units. + "amperes": "amperes", + "bytes": "bytes", + "celsius": "celsius", // Also allow Celsius because it is common in typical Prometheus use cases. + "grams": "grams", + "joules": "joules", + "kelvin": "kelvin", // SI base unit, used in special cases (e.g. color temperature, scientific measurements). + "meters": "meters", // Both American and international spelling permitted. + "metres": "metres", + "seconds": "seconds", + "volts": "volts", + + // Non base units. + // Time. + "minutes": "seconds", + "hours": "seconds", + "days": "seconds", + "weeks": "seconds", + // Temperature. + "kelvins": "kelvin", + "fahrenheit": "celsius", + "rankine": "celsius", + // Length. + "inches": "meters", + "yards": "meters", + "miles": "meters", + // Bytes. + "bits": "bytes", + // Energy. + "calories": "joules", + // Mass. + "pounds": "grams", + "ounces": "grams", + } + + unitPrefixes = []string{ + "pico", + "nano", + "micro", + "milli", + "centi", + "deci", + "deca", + "hecto", + "kilo", + "kibi", + "mega", + "mibi", + "giga", + "gibi", + "tera", + "tebi", + "peta", + "pebi", + } + + // Common abbreviations that we'd like to discourage. + unitAbbreviations = []string{ + "s", + "ms", + "us", + "ns", + "sec", + "b", + "kb", + "mb", + "gb", + "tb", + "pb", + "m", + "h", + "d", + } +) diff --git a/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go b/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go index e344cc853c2..9af60ce1d21 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go @@ -31,6 +31,10 @@ // testing custom prometheus.Collector implementations and in particular whole // exporters, i.e. programs that retrieve telemetry data from a 3rd party source // and convert it into Prometheus metrics. +// +// In a similar pattern, CollectAndLint and GatherAndLint can be used to detect +// metrics that have issues with their name, type, or metadata without being +// necessarily invalid, e.g. a counter with a name missing the “_total” suffix. package testutil import ( @@ -108,9 +112,48 @@ func ToFloat64(c prometheus.Collector) float64 { panic(fmt.Errorf("collected a non-gauge/counter/untyped metric: %s", pb)) } +// CollectAndCount registers the provided Collector with a newly created +// pedantic Registry. It then calls GatherAndCount with that Registry and with +// the provided metricNames. In the unlikely case that the registration or the +// gathering fails, this function panics. (This is inconsistent with the other +// CollectAnd… functions in this package and has historical reasons. Changing +// the function signature would be a breaking change and will therefore only +// happen with the next major version bump.) +func CollectAndCount(c prometheus.Collector, metricNames ...string) int { + reg := prometheus.NewPedanticRegistry() + if err := reg.Register(c); err != nil { + panic(fmt.Errorf("registering collector failed: %s", err)) + } + result, err := GatherAndCount(reg, metricNames...) + if err != nil { + panic(err) + } + return result +} + +// GatherAndCount gathers all metrics from the provided Gatherer and counts +// them. It returns the number of metric children in all gathered metric +// families together. If any metricNames are provided, only metrics with those +// names are counted. +func GatherAndCount(g prometheus.Gatherer, metricNames ...string) (int, error) { + got, err := g.Gather() + if err != nil { + return 0, fmt.Errorf("gathering metrics failed: %s", err) + } + if metricNames != nil { + got = filterMetrics(got, metricNames) + } + + result := 0 + for _, mf := range got { + result += len(mf.GetMetric()) + } + return result, nil +} + // CollectAndCompare registers the provided Collector with a newly created -// pedantic Registry. It then does the same as GatherAndCompare, gathering the -// metrics from the pedantic Registry. +// pedantic Registry. It then calls GatherAndCompare with that Registry and with +// the provided metricNames. func CollectAndCompare(c prometheus.Collector, expected io.Reader, metricNames ...string) error { reg := prometheus.NewPedanticRegistry() if err := reg.Register(c); err != nil { @@ -165,11 +208,9 @@ func compare(got, want []*dto.MetricFamily) error { metric output does not match expectation; want: %s - got: -%s -`, wantBuf.String(), gotBuf.String()) +%s`, wantBuf.String(), gotBuf.String()) } return nil diff --git a/vendor/github.com/prometheus/client_golang/prometheus/value.go b/vendor/github.com/prometheus/client_golang/prometheus/value.go index eb248f10874..6206928cc67 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/value.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/value.go @@ -16,8 +16,12 @@ package prometheus import ( "fmt" "sort" + "time" + "unicode/utf8" + //lint:ignore SA1019 Need to keep deprecated package for compatibility. "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" dto "github.com/prometheus/client_model/go" ) @@ -25,7 +29,8 @@ import ( // ValueType is an enumeration of metric types that represent a simple value. type ValueType int -// Possible values for the ValueType enum. +// Possible values for the ValueType enum. Use UntypedValue to mark a metric +// with an unknown type. const ( _ ValueType = iota CounterValue @@ -69,7 +74,7 @@ func (v *valueFunc) Desc() *Desc { } func (v *valueFunc) Write(out *dto.Metric) error { - return populateMetric(v.valType, v.function(), v.labelPairs, out) + return populateMetric(v.valType, v.function(), v.labelPairs, nil, out) } // NewConstMetric returns a metric with one fixed value that cannot be @@ -116,19 +121,20 @@ func (m *constMetric) Desc() *Desc { } func (m *constMetric) Write(out *dto.Metric) error { - return populateMetric(m.valType, m.val, m.labelPairs, out) + return populateMetric(m.valType, m.val, m.labelPairs, nil, out) } func populateMetric( t ValueType, v float64, labelPairs []*dto.LabelPair, + e *dto.Exemplar, m *dto.Metric, ) error { m.Label = labelPairs switch t { case CounterValue: - m.Counter = &dto.Counter{Value: proto.Float64(v)} + m.Counter = &dto.Counter{Value: proto.Float64(v), Exemplar: e} case GaugeValue: m.Gauge = &dto.Gauge{Value: proto.Float64(v)} case UntypedValue: @@ -160,3 +166,40 @@ func makeLabelPairs(desc *Desc, labelValues []string) []*dto.LabelPair { sort.Sort(labelPairSorter(labelPairs)) return labelPairs } + +// ExemplarMaxRunes is the max total number of runes allowed in exemplar labels. +const ExemplarMaxRunes = 64 + +// newExemplar creates a new dto.Exemplar from the provided values. An error is +// returned if any of the label names or values are invalid or if the total +// number of runes in the label names and values exceeds ExemplarMaxRunes. +func newExemplar(value float64, ts time.Time, l Labels) (*dto.Exemplar, error) { + e := &dto.Exemplar{} + e.Value = proto.Float64(value) + tsProto, err := ptypes.TimestampProto(ts) + if err != nil { + return nil, err + } + e.Timestamp = tsProto + labelPairs := make([]*dto.LabelPair, 0, len(l)) + var runes int + for name, value := range l { + if !checkLabelName(name) { + return nil, fmt.Errorf("exemplar label name %q is invalid", name) + } + runes += utf8.RuneCountInString(name) + if !utf8.ValidString(value) { + return nil, fmt.Errorf("exemplar label value %q is not valid UTF-8", value) + } + runes += utf8.RuneCountInString(value) + labelPairs = append(labelPairs, &dto.LabelPair{ + Name: proto.String(name), + Value: proto.String(value), + }) + } + if runes > ExemplarMaxRunes { + return nil, fmt.Errorf("exemplar labels have %d runes, exceeding the limit of %d", runes, ExemplarMaxRunes) + } + e.Label = labelPairs + return e, nil +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/vec.go b/vendor/github.com/prometheus/client_golang/prometheus/vec.go index 14ed9e856d1..d53848dc481 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/vec.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/vec.go @@ -24,7 +24,7 @@ import ( // their label values. metricVec is not used directly (and therefore // unexported). It is used as a building block for implementations of vectors of // a given metric type, like GaugeVec, CounterVec, SummaryVec, and HistogramVec. -// It also handles label currying. It uses basicMetricVec internally. +// It also handles label currying. type metricVec struct { *metricMap @@ -91,6 +91,18 @@ func (m *metricVec) Delete(labels Labels) bool { return m.metricMap.deleteByHashWithLabels(h, labels, m.curry) } +// Without explicit forwarding of Describe, Collect, Reset, those methods won't +// show up in GoDoc. + +// Describe implements Collector. +func (m *metricVec) Describe(ch chan<- *Desc) { m.metricMap.Describe(ch) } + +// Collect implements Collector. +func (m *metricVec) Collect(ch chan<- Metric) { m.metricMap.Collect(ch) } + +// Reset deletes all metrics in this vector. +func (m *metricVec) Reset() { m.metricMap.Reset() } + func (m *metricVec) curryWith(labels Labels) (*metricVec, error) { var ( newCurry []curriedLabelValue diff --git a/vendor/github.com/prometheus/client_golang/prometheus/wrap.go b/vendor/github.com/prometheus/client_golang/prometheus/wrap.go index 49159bf3eb0..438aa5e9247 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/wrap.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/wrap.go @@ -17,6 +17,7 @@ import ( "fmt" "sort" + //lint:ignore SA1019 Need to keep deprecated package for compatibility. "github.com/golang/protobuf/proto" dto "github.com/prometheus/client_model/go" @@ -27,11 +28,18 @@ import ( // registered with the wrapped Registerer in a modified way. The modified // Collector adds the provided Labels to all Metrics it collects (as // ConstLabels). The Metrics collected by the unmodified Collector must not -// duplicate any of those labels. +// duplicate any of those labels. Wrapping a nil value is valid, resulting +// in a no-op Registerer. // // WrapRegistererWith provides a way to add fixed labels to a subset of // Collectors. It should not be used to add fixed labels to all metrics exposed. // +// Conflicts between Collectors registered through the original Registerer with +// Collectors registered through the wrapping Registerer will still be +// detected. Any AlreadyRegisteredError returned by the Register method of +// either Registerer will contain the ExistingCollector in the form it was +// provided to the respective registry. +// // The Collector example demonstrates a use of WrapRegistererWith. func WrapRegistererWith(labels Labels, reg Registerer) Registerer { return &wrappingRegisterer{ @@ -44,6 +52,7 @@ func WrapRegistererWith(labels Labels, reg Registerer) Registerer { // Registerer. Collectors registered with the returned Registerer will be // registered with the wrapped Registerer in a modified way. The modified // Collector adds the provided prefix to the name of all Metrics it collects. +// Wrapping a nil value is valid, resulting in a no-op Registerer. // // WrapRegistererWithPrefix is useful to have one place to prefix all metrics of // a sub-system. To make this work, register metrics of the sub-system with the @@ -54,6 +63,12 @@ func WrapRegistererWith(labels Labels, reg Registerer) Registerer { // (see NewGoCollector) and the process collector (see NewProcessCollector). (In // fact, those metrics are already prefixed with “go_” or “process_”, // respectively.) +// +// Conflicts between Collectors registered through the original Registerer with +// Collectors registered through the wrapping Registerer will still be +// detected. Any AlreadyRegisteredError returned by the Register method of +// either Registerer will contain the ExistingCollector in the form it was +// provided to the respective registry. func WrapRegistererWithPrefix(prefix string, reg Registerer) Registerer { return &wrappingRegisterer{ wrappedRegisterer: reg, @@ -68,6 +83,9 @@ type wrappingRegisterer struct { } func (r *wrappingRegisterer) Register(c Collector) error { + if r.wrappedRegisterer == nil { + return nil + } return r.wrappedRegisterer.Register(&wrappingCollector{ wrappedCollector: c, prefix: r.prefix, @@ -76,6 +94,9 @@ func (r *wrappingRegisterer) Register(c Collector) error { } func (r *wrappingRegisterer) MustRegister(cs ...Collector) { + if r.wrappedRegisterer == nil { + return + } for _, c := range cs { if err := r.Register(c); err != nil { panic(err) @@ -84,6 +105,9 @@ func (r *wrappingRegisterer) MustRegister(cs ...Collector) { } func (r *wrappingRegisterer) Unregister(c Collector) bool { + if r.wrappedRegisterer == nil { + return false + } return r.wrappedRegisterer.Unregister(&wrappingCollector{ wrappedCollector: c, prefix: r.prefix, @@ -123,6 +147,15 @@ func (c *wrappingCollector) Describe(ch chan<- *Desc) { } } +func (c *wrappingCollector) unwrapRecursively() Collector { + switch wc := c.wrappedCollector.(type) { + case *wrappingCollector: + return wc.unwrapRecursively() + default: + return wc + } +} + type wrappingMetric struct { wrappedMetric Metric prefix string diff --git a/vendor/github.com/prometheus/client_model/go/metrics.pb.go b/vendor/github.com/prometheus/client_model/go/metrics.pb.go index 9805432c2a4..2f4930d9dd3 100644 --- a/vendor/github.com/prometheus/client_model/go/metrics.pb.go +++ b/vendor/github.com/prometheus/client_model/go/metrics.pb.go @@ -1,11 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: metrics.proto -package io_prometheus_client // import "github.com/prometheus/client_model/go" +package io_prometheus_client -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -16,7 +19,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type MetricType int32 @@ -35,6 +38,7 @@ var MetricType_name = map[int32]string{ 3: "UNTYPED", 4: "HISTOGRAM", } + var MetricType_value = map[string]int32{ "COUNTER": 0, "GAUGE": 1, @@ -48,9 +52,11 @@ func (x MetricType) Enum() *MetricType { *p = x return p } + func (x MetricType) String() string { return proto.EnumName(MetricType_name, int32(x)) } + func (x *MetricType) UnmarshalJSON(data []byte) error { value, err := proto.UnmarshalJSONEnum(MetricType_value, data, "MetricType") if err != nil { @@ -59,8 +65,9 @@ func (x *MetricType) UnmarshalJSON(data []byte) error { *x = MetricType(value) return nil } + func (MetricType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{0} + return fileDescriptor_6039342a2ba47b72, []int{0} } type LabelPair struct { @@ -75,16 +82,17 @@ func (m *LabelPair) Reset() { *m = LabelPair{} } func (m *LabelPair) String() string { return proto.CompactTextString(m) } func (*LabelPair) ProtoMessage() {} func (*LabelPair) Descriptor() ([]byte, []int) { - return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{0} + return fileDescriptor_6039342a2ba47b72, []int{0} } + func (m *LabelPair) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LabelPair.Unmarshal(m, b) } func (m *LabelPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_LabelPair.Marshal(b, m, deterministic) } -func (dst *LabelPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_LabelPair.Merge(dst, src) +func (m *LabelPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_LabelPair.Merge(m, src) } func (m *LabelPair) XXX_Size() int { return xxx_messageInfo_LabelPair.Size(m) @@ -120,16 +128,17 @@ func (m *Gauge) Reset() { *m = Gauge{} } func (m *Gauge) String() string { return proto.CompactTextString(m) } func (*Gauge) ProtoMessage() {} func (*Gauge) Descriptor() ([]byte, []int) { - return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{1} + return fileDescriptor_6039342a2ba47b72, []int{1} } + func (m *Gauge) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Gauge.Unmarshal(m, b) } func (m *Gauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Gauge.Marshal(b, m, deterministic) } -func (dst *Gauge) XXX_Merge(src proto.Message) { - xxx_messageInfo_Gauge.Merge(dst, src) +func (m *Gauge) XXX_Merge(src proto.Message) { + xxx_messageInfo_Gauge.Merge(m, src) } func (m *Gauge) XXX_Size() int { return xxx_messageInfo_Gauge.Size(m) @@ -148,26 +157,28 @@ func (m *Gauge) GetValue() float64 { } type Counter struct { - Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` + Exemplar *Exemplar `protobuf:"bytes,2,opt,name=exemplar" json:"exemplar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Counter) Reset() { *m = Counter{} } func (m *Counter) String() string { return proto.CompactTextString(m) } func (*Counter) ProtoMessage() {} func (*Counter) Descriptor() ([]byte, []int) { - return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{2} + return fileDescriptor_6039342a2ba47b72, []int{2} } + func (m *Counter) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Counter.Unmarshal(m, b) } func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Counter.Marshal(b, m, deterministic) } -func (dst *Counter) XXX_Merge(src proto.Message) { - xxx_messageInfo_Counter.Merge(dst, src) +func (m *Counter) XXX_Merge(src proto.Message) { + xxx_messageInfo_Counter.Merge(m, src) } func (m *Counter) XXX_Size() int { return xxx_messageInfo_Counter.Size(m) @@ -185,6 +196,13 @@ func (m *Counter) GetValue() float64 { return 0 } +func (m *Counter) GetExemplar() *Exemplar { + if m != nil { + return m.Exemplar + } + return nil +} + type Quantile struct { Quantile *float64 `protobuf:"fixed64,1,opt,name=quantile" json:"quantile,omitempty"` Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` @@ -197,16 +215,17 @@ func (m *Quantile) Reset() { *m = Quantile{} } func (m *Quantile) String() string { return proto.CompactTextString(m) } func (*Quantile) ProtoMessage() {} func (*Quantile) Descriptor() ([]byte, []int) { - return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{3} + return fileDescriptor_6039342a2ba47b72, []int{3} } + func (m *Quantile) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Quantile.Unmarshal(m, b) } func (m *Quantile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Quantile.Marshal(b, m, deterministic) } -func (dst *Quantile) XXX_Merge(src proto.Message) { - xxx_messageInfo_Quantile.Merge(dst, src) +func (m *Quantile) XXX_Merge(src proto.Message) { + xxx_messageInfo_Quantile.Merge(m, src) } func (m *Quantile) XXX_Size() int { return xxx_messageInfo_Quantile.Size(m) @@ -244,16 +263,17 @@ func (m *Summary) Reset() { *m = Summary{} } func (m *Summary) String() string { return proto.CompactTextString(m) } func (*Summary) ProtoMessage() {} func (*Summary) Descriptor() ([]byte, []int) { - return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{4} + return fileDescriptor_6039342a2ba47b72, []int{4} } + func (m *Summary) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Summary.Unmarshal(m, b) } func (m *Summary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Summary.Marshal(b, m, deterministic) } -func (dst *Summary) XXX_Merge(src proto.Message) { - xxx_messageInfo_Summary.Merge(dst, src) +func (m *Summary) XXX_Merge(src proto.Message) { + xxx_messageInfo_Summary.Merge(m, src) } func (m *Summary) XXX_Size() int { return xxx_messageInfo_Summary.Size(m) @@ -296,16 +316,17 @@ func (m *Untyped) Reset() { *m = Untyped{} } func (m *Untyped) String() string { return proto.CompactTextString(m) } func (*Untyped) ProtoMessage() {} func (*Untyped) Descriptor() ([]byte, []int) { - return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{5} + return fileDescriptor_6039342a2ba47b72, []int{5} } + func (m *Untyped) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Untyped.Unmarshal(m, b) } func (m *Untyped) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Untyped.Marshal(b, m, deterministic) } -func (dst *Untyped) XXX_Merge(src proto.Message) { - xxx_messageInfo_Untyped.Merge(dst, src) +func (m *Untyped) XXX_Merge(src proto.Message) { + xxx_messageInfo_Untyped.Merge(m, src) } func (m *Untyped) XXX_Size() int { return xxx_messageInfo_Untyped.Size(m) @@ -336,16 +357,17 @@ func (m *Histogram) Reset() { *m = Histogram{} } func (m *Histogram) String() string { return proto.CompactTextString(m) } func (*Histogram) ProtoMessage() {} func (*Histogram) Descriptor() ([]byte, []int) { - return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{6} + return fileDescriptor_6039342a2ba47b72, []int{6} } + func (m *Histogram) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Histogram.Unmarshal(m, b) } func (m *Histogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Histogram.Marshal(b, m, deterministic) } -func (dst *Histogram) XXX_Merge(src proto.Message) { - xxx_messageInfo_Histogram.Merge(dst, src) +func (m *Histogram) XXX_Merge(src proto.Message) { + xxx_messageInfo_Histogram.Merge(m, src) } func (m *Histogram) XXX_Size() int { return xxx_messageInfo_Histogram.Size(m) @@ -378,27 +400,29 @@ func (m *Histogram) GetBucket() []*Bucket { } type Bucket struct { - CumulativeCount *uint64 `protobuf:"varint,1,opt,name=cumulative_count,json=cumulativeCount" json:"cumulative_count,omitempty"` - UpperBound *float64 `protobuf:"fixed64,2,opt,name=upper_bound,json=upperBound" json:"upper_bound,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CumulativeCount *uint64 `protobuf:"varint,1,opt,name=cumulative_count,json=cumulativeCount" json:"cumulative_count,omitempty"` + UpperBound *float64 `protobuf:"fixed64,2,opt,name=upper_bound,json=upperBound" json:"upper_bound,omitempty"` + Exemplar *Exemplar `protobuf:"bytes,3,opt,name=exemplar" json:"exemplar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Bucket) Reset() { *m = Bucket{} } func (m *Bucket) String() string { return proto.CompactTextString(m) } func (*Bucket) ProtoMessage() {} func (*Bucket) Descriptor() ([]byte, []int) { - return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{7} + return fileDescriptor_6039342a2ba47b72, []int{7} } + func (m *Bucket) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Bucket.Unmarshal(m, b) } func (m *Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Bucket.Marshal(b, m, deterministic) } -func (dst *Bucket) XXX_Merge(src proto.Message) { - xxx_messageInfo_Bucket.Merge(dst, src) +func (m *Bucket) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bucket.Merge(m, src) } func (m *Bucket) XXX_Size() int { return xxx_messageInfo_Bucket.Size(m) @@ -423,6 +447,68 @@ func (m *Bucket) GetUpperBound() float64 { return 0 } +func (m *Bucket) GetExemplar() *Exemplar { + if m != nil { + return m.Exemplar + } + return nil +} + +type Exemplar struct { + Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"` + Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` + Timestamp *timestamp.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Exemplar) Reset() { *m = Exemplar{} } +func (m *Exemplar) String() string { return proto.CompactTextString(m) } +func (*Exemplar) ProtoMessage() {} +func (*Exemplar) Descriptor() ([]byte, []int) { + return fileDescriptor_6039342a2ba47b72, []int{8} +} + +func (m *Exemplar) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Exemplar.Unmarshal(m, b) +} +func (m *Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Exemplar.Marshal(b, m, deterministic) +} +func (m *Exemplar) XXX_Merge(src proto.Message) { + xxx_messageInfo_Exemplar.Merge(m, src) +} +func (m *Exemplar) XXX_Size() int { + return xxx_messageInfo_Exemplar.Size(m) +} +func (m *Exemplar) XXX_DiscardUnknown() { + xxx_messageInfo_Exemplar.DiscardUnknown(m) +} + +var xxx_messageInfo_Exemplar proto.InternalMessageInfo + +func (m *Exemplar) GetLabel() []*LabelPair { + if m != nil { + return m.Label + } + return nil +} + +func (m *Exemplar) GetValue() float64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +func (m *Exemplar) GetTimestamp() *timestamp.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + type Metric struct { Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"` Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge" json:"gauge,omitempty"` @@ -440,16 +526,17 @@ func (m *Metric) Reset() { *m = Metric{} } func (m *Metric) String() string { return proto.CompactTextString(m) } func (*Metric) ProtoMessage() {} func (*Metric) Descriptor() ([]byte, []int) { - return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{8} + return fileDescriptor_6039342a2ba47b72, []int{9} } + func (m *Metric) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Metric.Unmarshal(m, b) } func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Metric.Marshal(b, m, deterministic) } -func (dst *Metric) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metric.Merge(dst, src) +func (m *Metric) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metric.Merge(m, src) } func (m *Metric) XXX_Size() int { return xxx_messageInfo_Metric.Size(m) @@ -523,16 +610,17 @@ func (m *MetricFamily) Reset() { *m = MetricFamily{} } func (m *MetricFamily) String() string { return proto.CompactTextString(m) } func (*MetricFamily) ProtoMessage() {} func (*MetricFamily) Descriptor() ([]byte, []int) { - return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{9} + return fileDescriptor_6039342a2ba47b72, []int{10} } + func (m *MetricFamily) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MetricFamily.Unmarshal(m, b) } func (m *MetricFamily) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_MetricFamily.Marshal(b, m, deterministic) } -func (dst *MetricFamily) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricFamily.Merge(dst, src) +func (m *MetricFamily) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetricFamily.Merge(m, src) } func (m *MetricFamily) XXX_Size() int { return xxx_messageInfo_MetricFamily.Size(m) @@ -572,6 +660,7 @@ func (m *MetricFamily) GetMetric() []*Metric { } func init() { + proto.RegisterEnum("io.prometheus.client.MetricType", MetricType_name, MetricType_value) proto.RegisterType((*LabelPair)(nil), "io.prometheus.client.LabelPair") proto.RegisterType((*Gauge)(nil), "io.prometheus.client.Gauge") proto.RegisterType((*Counter)(nil), "io.prometheus.client.Counter") @@ -580,50 +669,55 @@ func init() { proto.RegisterType((*Untyped)(nil), "io.prometheus.client.Untyped") proto.RegisterType((*Histogram)(nil), "io.prometheus.client.Histogram") proto.RegisterType((*Bucket)(nil), "io.prometheus.client.Bucket") + proto.RegisterType((*Exemplar)(nil), "io.prometheus.client.Exemplar") proto.RegisterType((*Metric)(nil), "io.prometheus.client.Metric") proto.RegisterType((*MetricFamily)(nil), "io.prometheus.client.MetricFamily") - proto.RegisterEnum("io.prometheus.client.MetricType", MetricType_name, MetricType_value) } -func init() { proto.RegisterFile("metrics.proto", fileDescriptor_metrics_c97c9a2b9560cb8f) } +func init() { proto.RegisterFile("metrics.proto", fileDescriptor_6039342a2ba47b72) } -var fileDescriptor_metrics_c97c9a2b9560cb8f = []byte{ - // 591 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x4f, 0xdb, 0x4e, - 0x14, 0xfc, 0x99, 0xd8, 0x09, 0x7e, 0x86, 0x5f, 0xad, 0x15, 0x07, 0xab, 0x2d, 0x25, 0xcd, 0x89, - 0xf6, 0x10, 0x54, 0x04, 0xaa, 0x44, 0xdb, 0x03, 0x50, 0x1a, 0x2a, 0xd5, 0x40, 0x37, 0xc9, 0x81, - 0x5e, 0xac, 0x8d, 0x59, 0x25, 0x56, 0xbd, 0xb6, 0x6b, 0xef, 0x22, 0xe5, 0xdc, 0x43, 0xbf, 0x47, - 0xbf, 0x68, 0xab, 0xfd, 0xe3, 0x18, 0x24, 0xc3, 0xa9, 0xb7, 0xb7, 0xf3, 0x66, 0xde, 0x8e, 0x77, - 0xc7, 0x0b, 0x9b, 0x8c, 0xf2, 0x32, 0x89, 0xab, 0x61, 0x51, 0xe6, 0x3c, 0x47, 0x5b, 0x49, 0x2e, - 0x2b, 0x46, 0xf9, 0x82, 0x8a, 0x6a, 0x18, 0xa7, 0x09, 0xcd, 0xf8, 0xe0, 0x10, 0xdc, 0x2f, 0x64, - 0x46, 0xd3, 0x2b, 0x92, 0x94, 0x08, 0x81, 0x9d, 0x11, 0x46, 0x03, 0xab, 0x6f, 0xed, 0xba, 0x58, - 0xd5, 0x68, 0x0b, 0x9c, 0x5b, 0x92, 0x0a, 0x1a, 0xac, 0x29, 0x50, 0x2f, 0x06, 0xdb, 0xe0, 0x8c, - 0x88, 0x98, 0xdf, 0x69, 0x4b, 0x8d, 0x55, 0xb7, 0x77, 0xa0, 0x77, 0x9a, 0x8b, 0x8c, 0xd3, 0xf2, - 0x01, 0xc2, 0x7b, 0x58, 0xff, 0x2a, 0x48, 0xc6, 0x93, 0x94, 0xa2, 0xa7, 0xb0, 0xfe, 0xc3, 0xd4, - 0x86, 0xb4, 0x5a, 0xdf, 0xdf, 0x7d, 0xa5, 0xfe, 0x65, 0x41, 0x6f, 0x2c, 0x18, 0x23, 0xe5, 0x12, - 0xbd, 0x84, 0x8d, 0x8a, 0xb0, 0x22, 0xa5, 0x51, 0x2c, 0x77, 0x54, 0x13, 0x6c, 0xec, 0x69, 0x4c, - 0x99, 0x40, 0xdb, 0x00, 0x86, 0x52, 0x09, 0x66, 0x26, 0xb9, 0x1a, 0x19, 0x0b, 0x86, 0x8e, 0xee, - 0xec, 0xdf, 0xe9, 0x77, 0x76, 0xbd, 0xfd, 0x17, 0xc3, 0xb6, 0xb3, 0x1a, 0xd6, 0x8e, 0x1b, 0x7f, - 0xf2, 0x43, 0xa7, 0x19, 0x5f, 0x16, 0xf4, 0xe6, 0x81, 0x0f, 0xfd, 0x69, 0x81, 0x7b, 0x9e, 0x54, - 0x3c, 0x9f, 0x97, 0x84, 0xfd, 0x03, 0xb3, 0x07, 0xd0, 0x9d, 0x89, 0xf8, 0x3b, 0xe5, 0xc6, 0xea, - 0xf3, 0x76, 0xab, 0x27, 0x8a, 0x83, 0x0d, 0x77, 0x30, 0x81, 0xae, 0x46, 0xd0, 0x2b, 0xf0, 0x63, - 0xc1, 0x44, 0x4a, 0x78, 0x72, 0x7b, 0xdf, 0xc5, 0x93, 0x06, 0xd7, 0x4e, 0x76, 0xc0, 0x13, 0x45, - 0x41, 0xcb, 0x68, 0x96, 0x8b, 0xec, 0xc6, 0x58, 0x01, 0x05, 0x9d, 0x48, 0x64, 0xf0, 0x67, 0x0d, - 0xba, 0xa1, 0xca, 0x18, 0x3a, 0x04, 0x27, 0x95, 0x31, 0x0a, 0x2c, 0xe5, 0x6a, 0xa7, 0xdd, 0xd5, - 0x2a, 0x69, 0x58, 0xb3, 0xd1, 0x1b, 0x70, 0xe6, 0x32, 0x46, 0x6a, 0xb8, 0xb7, 0xff, 0xac, 0x5d, - 0xa6, 0x92, 0x86, 0x35, 0x13, 0xbd, 0x85, 0x5e, 0xac, 0xa3, 0x15, 0x74, 0x94, 0x68, 0xbb, 0x5d, - 0x64, 0xf2, 0x87, 0x6b, 0xb6, 0x14, 0x56, 0x3a, 0x33, 0x81, 0xfd, 0x98, 0xd0, 0x04, 0x0b, 0xd7, - 0x6c, 0x29, 0x14, 0xfa, 0x8e, 0x03, 0xe7, 0x31, 0xa1, 0x09, 0x02, 0xae, 0xd9, 0xe8, 0x03, 0xb8, - 0x8b, 0xfa, 0xea, 0x83, 0x9e, 0x92, 0x3e, 0x70, 0x30, 0xab, 0x84, 0xe0, 0x46, 0x21, 0xc3, 0xc2, - 0x13, 0x46, 0x2b, 0x4e, 0x58, 0x11, 0xb1, 0x2a, 0xe8, 0xf6, 0xad, 0xdd, 0x0e, 0xf6, 0x56, 0x58, - 0x58, 0x0d, 0x7e, 0x5b, 0xb0, 0xa1, 0x6f, 0xe0, 0x13, 0x61, 0x49, 0xba, 0x6c, 0xfd, 0x83, 0x11, - 0xd8, 0x0b, 0x9a, 0x16, 0xe6, 0x07, 0x56, 0x35, 0x3a, 0x00, 0x5b, 0x7a, 0x54, 0x47, 0xf8, 0xff, - 0x7e, 0xbf, 0xdd, 0x95, 0x9e, 0x3c, 0x59, 0x16, 0x14, 0x2b, 0xb6, 0x0c, 0x9f, 0x7e, 0x53, 0x02, - 0xfb, 0xb1, 0xf0, 0x69, 0x1d, 0x36, 0xdc, 0xd7, 0x21, 0x40, 0x33, 0x09, 0x79, 0xd0, 0x3b, 0xbd, - 0x9c, 0x5e, 0x4c, 0xce, 0xb0, 0xff, 0x1f, 0x72, 0xc1, 0x19, 0x1d, 0x4f, 0x47, 0x67, 0xbe, 0x25, - 0xf1, 0xf1, 0x34, 0x0c, 0x8f, 0xf1, 0xb5, 0xbf, 0x26, 0x17, 0xd3, 0x8b, 0xc9, 0xf5, 0xd5, 0xd9, - 0x47, 0xbf, 0x83, 0x36, 0xc1, 0x3d, 0xff, 0x3c, 0x9e, 0x5c, 0x8e, 0xf0, 0x71, 0xe8, 0xdb, 0x27, - 0x18, 0x5a, 0x5f, 0xb2, 0x6f, 0x47, 0xf3, 0x84, 0x2f, 0xc4, 0x6c, 0x18, 0xe7, 0x6c, 0xaf, 0xe9, - 0xee, 0xe9, 0x6e, 0xc4, 0xf2, 0x1b, 0x9a, 0xee, 0xcd, 0xf3, 0x77, 0x49, 0x1e, 0x35, 0xdd, 0x48, - 0x77, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x45, 0x21, 0x7f, 0x64, 0x2b, 0x05, 0x00, 0x00, +var fileDescriptor_6039342a2ba47b72 = []byte{ + // 665 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0xfd, 0xdc, 0x38, 0x3f, 0xbe, 0x69, 0x3f, 0xa2, 0x51, 0x17, 0x56, 0xa1, 0x24, 0x78, 0x55, + 0x58, 0x38, 0xa2, 0x6a, 0x05, 0x2a, 0xb0, 0x68, 0x4b, 0x48, 0x91, 0x48, 0x5b, 0x26, 0xc9, 0xa2, + 0xb0, 0x88, 0x1c, 0x77, 0x70, 0x2c, 0x3c, 0xb1, 0xb1, 0x67, 0x2a, 0xb2, 0x66, 0xc1, 0x16, 0x5e, + 0x81, 0x17, 0x05, 0xcd, 0x8f, 0x6d, 0x2a, 0xb9, 0x95, 0x40, 0xec, 0x66, 0xee, 0x3d, 0xe7, 0xfa, + 0xcc, 0xf8, 0x9c, 0x81, 0x0d, 0x4a, 0x58, 0x1a, 0xfa, 0x99, 0x9b, 0xa4, 0x31, 0x8b, 0xd1, 0x66, + 0x18, 0x8b, 0x15, 0x25, 0x6c, 0x41, 0x78, 0xe6, 0xfa, 0x51, 0x48, 0x96, 0x6c, 0xab, 0x1b, 0xc4, + 0x71, 0x10, 0x91, 0xbe, 0xc4, 0xcc, 0xf9, 0x87, 0x3e, 0x0b, 0x29, 0xc9, 0x98, 0x47, 0x13, 0x45, + 0x73, 0xf6, 0xc1, 0x7a, 0xe3, 0xcd, 0x49, 0x74, 0xee, 0x85, 0x29, 0x42, 0x60, 0x2e, 0x3d, 0x4a, + 0x6c, 0xa3, 0x67, 0xec, 0x58, 0x58, 0xae, 0xd1, 0x26, 0xd4, 0xaf, 0xbc, 0x88, 0x13, 0x7b, 0x4d, + 0x16, 0xd5, 0xc6, 0xd9, 0x86, 0xfa, 0xd0, 0xe3, 0xc1, 0x6f, 0x6d, 0xc1, 0x31, 0xf2, 0xf6, 0x7b, + 0x68, 0x1e, 0xc7, 0x7c, 0xc9, 0x48, 0x5a, 0x0d, 0x40, 0x07, 0xd0, 0x22, 0x9f, 0x09, 0x4d, 0x22, + 0x2f, 0x95, 0x83, 0xdb, 0xbb, 0xf7, 0xdd, 0xaa, 0x03, 0xb8, 0x03, 0x8d, 0xc2, 0x05, 0xde, 0x79, + 0x0e, 0xad, 0xb7, 0xdc, 0x5b, 0xb2, 0x30, 0x22, 0x68, 0x0b, 0x5a, 0x9f, 0xf4, 0x5a, 0x7f, 0xa0, + 0xd8, 0x5f, 0x57, 0x5e, 0x48, 0xfb, 0x6a, 0x40, 0x73, 0xcc, 0x29, 0xf5, 0xd2, 0x15, 0x7a, 0x00, + 0xeb, 0x99, 0x47, 0x93, 0x88, 0xcc, 0x7c, 0xa1, 0x56, 0x4e, 0x30, 0x71, 0x5b, 0xd5, 0xe4, 0x01, + 0xd0, 0x36, 0x80, 0x86, 0x64, 0x9c, 0xea, 0x49, 0x96, 0xaa, 0x8c, 0x39, 0x15, 0xe7, 0x28, 0xbe, + 0x5f, 0xeb, 0xd5, 0x6e, 0x3e, 0x47, 0xae, 0xb8, 0xd4, 0xe7, 0x74, 0xa1, 0x39, 0x5d, 0xb2, 0x55, + 0x42, 0x2e, 0x6f, 0xb8, 0xc5, 0x2f, 0x06, 0x58, 0x27, 0x61, 0xc6, 0xe2, 0x20, 0xf5, 0xe8, 0x3f, + 0x10, 0xbb, 0x07, 0x8d, 0x39, 0xf7, 0x3f, 0x12, 0xa6, 0xa5, 0xde, 0xab, 0x96, 0x7a, 0x24, 0x31, + 0x58, 0x63, 0x9d, 0x6f, 0x06, 0x34, 0x54, 0x09, 0x3d, 0x84, 0x8e, 0xcf, 0x29, 0x8f, 0x3c, 0x16, + 0x5e, 0x5d, 0x97, 0x71, 0xa7, 0xac, 0x2b, 0x29, 0x5d, 0x68, 0xf3, 0x24, 0x21, 0xe9, 0x6c, 0x1e, + 0xf3, 0xe5, 0xa5, 0xd6, 0x02, 0xb2, 0x74, 0x24, 0x2a, 0xd7, 0x1c, 0x50, 0xfb, 0x43, 0x07, 0x7c, + 0x37, 0xa0, 0x95, 0x97, 0xd1, 0x3e, 0xd4, 0x23, 0xe1, 0x60, 0xdb, 0x90, 0x87, 0xea, 0x56, 0x4f, + 0x29, 0x4c, 0x8e, 0x15, 0xba, 0xda, 0x1d, 0xe8, 0x29, 0x58, 0x45, 0x42, 0xb4, 0xac, 0x2d, 0x57, + 0x65, 0xc8, 0xcd, 0x33, 0xe4, 0x4e, 0x72, 0x04, 0x2e, 0xc1, 0xce, 0xcf, 0x35, 0x68, 0x8c, 0x64, + 0x22, 0xff, 0x56, 0xd1, 0x63, 0xa8, 0x07, 0x22, 0x53, 0x3a, 0x10, 0x77, 0xab, 0x69, 0x32, 0x76, + 0x58, 0x21, 0xd1, 0x13, 0x68, 0xfa, 0x2a, 0x67, 0x5a, 0xec, 0x76, 0x35, 0x49, 0x87, 0x11, 0xe7, + 0x68, 0x41, 0xcc, 0x54, 0x08, 0x6c, 0xf3, 0x36, 0xa2, 0x4e, 0x0a, 0xce, 0xd1, 0x82, 0xc8, 0x95, + 0x69, 0xed, 0xfa, 0x6d, 0x44, 0xed, 0x6c, 0x9c, 0xa3, 0xd1, 0x0b, 0xb0, 0x16, 0xb9, 0x97, 0xed, + 0xa6, 0xa4, 0xde, 0x70, 0x31, 0x85, 0xe5, 0x71, 0xc9, 0x10, 0xee, 0x2f, 0xee, 0x7a, 0x46, 0x33, + 0xbb, 0xd1, 0x33, 0x76, 0x6a, 0xb8, 0x5d, 0xd4, 0x46, 0x99, 0xf3, 0xc3, 0x80, 0x75, 0xf5, 0x07, + 0x5e, 0x79, 0x34, 0x8c, 0x56, 0x95, 0xcf, 0x19, 0x02, 0x73, 0x41, 0xa2, 0x44, 0xbf, 0x66, 0x72, + 0x8d, 0xf6, 0xc0, 0x14, 0x1a, 0xe5, 0x15, 0xfe, 0xbf, 0xdb, 0xab, 0x56, 0xa5, 0x26, 0x4f, 0x56, + 0x09, 0xc1, 0x12, 0x2d, 0xd2, 0xa4, 0x5e, 0x60, 0xdb, 0xbc, 0x2d, 0x4d, 0x8a, 0x87, 0x35, 0xf6, + 0xd1, 0x08, 0xa0, 0x9c, 0x84, 0xda, 0xd0, 0x3c, 0x3e, 0x9b, 0x9e, 0x4e, 0x06, 0xb8, 0xf3, 0x1f, + 0xb2, 0xa0, 0x3e, 0x3c, 0x9c, 0x0e, 0x07, 0x1d, 0x43, 0xd4, 0xc7, 0xd3, 0xd1, 0xe8, 0x10, 0x5f, + 0x74, 0xd6, 0xc4, 0x66, 0x7a, 0x3a, 0xb9, 0x38, 0x1f, 0xbc, 0xec, 0xd4, 0xd0, 0x06, 0x58, 0x27, + 0xaf, 0xc7, 0x93, 0xb3, 0x21, 0x3e, 0x1c, 0x75, 0xcc, 0x23, 0x0c, 0x95, 0xef, 0xfe, 0xbb, 0x83, + 0x20, 0x64, 0x0b, 0x3e, 0x77, 0xfd, 0x98, 0xf6, 0xcb, 0x6e, 0x5f, 0x75, 0x67, 0x34, 0xbe, 0x24, + 0x51, 0x3f, 0x88, 0x9f, 0x85, 0xf1, 0xac, 0xec, 0xce, 0x54, 0xf7, 0x57, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xd0, 0x84, 0x91, 0x73, 0x59, 0x06, 0x00, 0x00, } diff --git a/vendor/github.com/prometheus/common/expfmt/encode.go b/vendor/github.com/prometheus/common/expfmt/encode.go index 11839ed65ce..bd4e3474546 100644 --- a/vendor/github.com/prometheus/common/expfmt/encode.go +++ b/vendor/github.com/prometheus/common/expfmt/encode.go @@ -30,17 +30,38 @@ type Encoder interface { Encode(*dto.MetricFamily) error } -type encoder func(*dto.MetricFamily) error - -func (e encoder) Encode(v *dto.MetricFamily) error { - return e(v) +// Closer is implemented by Encoders that need to be closed to finalize +// encoding. (For example, OpenMetrics needs a final `# EOF` line.) +// +// Note that all Encoder implementations returned from this package implement +// Closer, too, even if the Close call is a no-op. This happens in preparation +// for adding a Close method to the Encoder interface directly in a (mildly +// breaking) release in the future. +type Closer interface { + Close() error } -// Negotiate returns the Content-Type based on the given Accept header. -// If no appropriate accepted type is found, FmtText is returned. +type encoderCloser struct { + encode func(*dto.MetricFamily) error + close func() error +} + +func (ec encoderCloser) Encode(v *dto.MetricFamily) error { + return ec.encode(v) +} + +func (ec encoderCloser) Close() error { + return ec.close() +} + +// Negotiate returns the Content-Type based on the given Accept header. If no +// appropriate accepted type is found, FmtText is returned (which is the +// Prometheus text format). This function will never negotiate FmtOpenMetrics, +// as the support is still experimental. To include the option to negotiate +// FmtOpenMetrics, use NegotiateOpenMetrics. func Negotiate(h http.Header) Format { for _, ac := range goautoneg.ParseAccept(h.Get(hdrAccept)) { - // Check for protocol buffer + ver := ac.Params["version"] if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol { switch ac.Params["encoding"] { case "delimited": @@ -51,8 +72,6 @@ func Negotiate(h http.Header) Format { return FmtProtoCompact } } - // Check for text format. - ver := ac.Params["version"] if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { return FmtText } @@ -60,29 +79,84 @@ func Negotiate(h http.Header) Format { return FmtText } -// NewEncoder returns a new encoder based on content type negotiation. +// NegotiateIncludingOpenMetrics works like Negotiate but includes +// FmtOpenMetrics as an option for the result. Note that this function is +// temporary and will disappear once FmtOpenMetrics is fully supported and as +// such may be negotiated by the normal Negotiate function. +func NegotiateIncludingOpenMetrics(h http.Header) Format { + for _, ac := range goautoneg.ParseAccept(h.Get(hdrAccept)) { + ver := ac.Params["version"] + if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol { + switch ac.Params["encoding"] { + case "delimited": + return FmtProtoDelim + case "text": + return FmtProtoText + case "compact-text": + return FmtProtoCompact + } + } + if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { + return FmtText + } + if ac.Type+"/"+ac.SubType == OpenMetricsType && (ver == OpenMetricsVersion || ver == "") { + return FmtOpenMetrics + } + } + return FmtText +} + +// NewEncoder returns a new encoder based on content type negotiation. All +// Encoder implementations returned by NewEncoder also implement Closer, and +// callers should always call the Close method. It is currently only required +// for FmtOpenMetrics, but a future (breaking) release will add the Close method +// to the Encoder interface directly. The current version of the Encoder +// interface is kept for backwards compatibility. func NewEncoder(w io.Writer, format Format) Encoder { switch format { case FmtProtoDelim: - return encoder(func(v *dto.MetricFamily) error { - _, err := pbutil.WriteDelimited(w, v) - return err - }) + return encoderCloser{ + encode: func(v *dto.MetricFamily) error { + _, err := pbutil.WriteDelimited(w, v) + return err + }, + close: func() error { return nil }, + } case FmtProtoCompact: - return encoder(func(v *dto.MetricFamily) error { - _, err := fmt.Fprintln(w, v.String()) - return err - }) + return encoderCloser{ + encode: func(v *dto.MetricFamily) error { + _, err := fmt.Fprintln(w, v.String()) + return err + }, + close: func() error { return nil }, + } case FmtProtoText: - return encoder(func(v *dto.MetricFamily) error { - _, err := fmt.Fprintln(w, proto.MarshalTextString(v)) - return err - }) + return encoderCloser{ + encode: func(v *dto.MetricFamily) error { + _, err := fmt.Fprintln(w, proto.MarshalTextString(v)) + return err + }, + close: func() error { return nil }, + } case FmtText: - return encoder(func(v *dto.MetricFamily) error { - _, err := MetricFamilyToText(w, v) - return err - }) + return encoderCloser{ + encode: func(v *dto.MetricFamily) error { + _, err := MetricFamilyToText(w, v) + return err + }, + close: func() error { return nil }, + } + case FmtOpenMetrics: + return encoderCloser{ + encode: func(v *dto.MetricFamily) error { + _, err := MetricFamilyToOpenMetrics(w, v) + return err + }, + close: func() error { + _, err := FinalizeOpenMetrics(w) + return err + }, + } } - panic("expfmt.NewEncoder: unknown format") + panic(fmt.Errorf("expfmt.NewEncoder: unknown format %q", format)) } diff --git a/vendor/github.com/prometheus/common/expfmt/expfmt.go b/vendor/github.com/prometheus/common/expfmt/expfmt.go index c71bcb98167..0f176fa64f2 100644 --- a/vendor/github.com/prometheus/common/expfmt/expfmt.go +++ b/vendor/github.com/prometheus/common/expfmt/expfmt.go @@ -19,10 +19,12 @@ type Format string // Constants to assemble the Content-Type values for the different wire protocols. const ( - TextVersion = "0.0.4" - ProtoType = `application/vnd.google.protobuf` - ProtoProtocol = `io.prometheus.client.MetricFamily` - ProtoFmt = ProtoType + "; proto=" + ProtoProtocol + ";" + TextVersion = "0.0.4" + ProtoType = `application/vnd.google.protobuf` + ProtoProtocol = `io.prometheus.client.MetricFamily` + ProtoFmt = ProtoType + "; proto=" + ProtoProtocol + ";" + OpenMetricsType = `application/openmetrics-text` + OpenMetricsVersion = "0.0.1" // The Content-Type values for the different wire protocols. FmtUnknown Format = `` @@ -30,6 +32,7 @@ const ( FmtProtoDelim Format = ProtoFmt + ` encoding=delimited` FmtProtoText Format = ProtoFmt + ` encoding=text` FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text` + FmtOpenMetrics Format = OpenMetricsType + `; version=` + OpenMetricsVersion + `; charset=utf-8` ) const ( diff --git a/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go b/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go new file mode 100644 index 00000000000..8a9313a3bee --- /dev/null +++ b/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go @@ -0,0 +1,527 @@ +// Copyright 2020 The Prometheus 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 expfmt + +import ( + "bufio" + "bytes" + "fmt" + "io" + "math" + "strconv" + "strings" + + "github.com/golang/protobuf/ptypes" + "github.com/prometheus/common/model" + + dto "github.com/prometheus/client_model/go" +) + +// MetricFamilyToOpenMetrics converts a MetricFamily proto message into the +// OpenMetrics text format and writes the resulting lines to 'out'. It returns +// the number of bytes written and any error encountered. The output will have +// the same order as the input, no further sorting is performed. Furthermore, +// this function assumes the input is already sanitized and does not perform any +// sanity checks. If the input contains duplicate metrics or invalid metric or +// label names, the conversion will result in invalid text format output. +// +// This function fulfills the type 'expfmt.encoder'. +// +// Note that OpenMetrics requires a final `# EOF` line. Since this function acts +// on individual metric families, it is the responsibility of the caller to +// append this line to 'out' once all metric families have been written. +// Conveniently, this can be done by calling FinalizeOpenMetrics. +// +// The output should be fully OpenMetrics compliant. However, there are a few +// missing features and peculiarities to avoid complications when switching from +// Prometheus to OpenMetrics or vice versa: +// +// - Counters are expected to have the `_total` suffix in their metric name. In +// the output, the suffix will be truncated from the `# TYPE` and `# HELP` +// line. A counter with a missing `_total` suffix is not an error. However, +// its type will be set to `unknown` in that case to avoid invalid OpenMetrics +// output. +// +// - No support for the following (optional) features: `# UNIT` line, `_created` +// line, info type, stateset type, gaugehistogram type. +// +// - The size of exemplar labels is not checked (i.e. it's possible to create +// exemplars that are larger than allowed by the OpenMetrics specification). +// +// - The value of Counters is not checked. (OpenMetrics doesn't allow counters +// with a `NaN` value.) +func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily) (written int, err error) { + name := in.GetName() + if name == "" { + return 0, fmt.Errorf("MetricFamily has no name: %s", in) + } + + // Try the interface upgrade. If it doesn't work, we'll use a + // bufio.Writer from the sync.Pool. + w, ok := out.(enhancedWriter) + if !ok { + b := bufPool.Get().(*bufio.Writer) + b.Reset(out) + w = b + defer func() { + bErr := b.Flush() + if err == nil { + err = bErr + } + bufPool.Put(b) + }() + } + + var ( + n int + metricType = in.GetType() + shortName = name + ) + if metricType == dto.MetricType_COUNTER && strings.HasSuffix(shortName, "_total") { + shortName = name[:len(name)-6] + } + + // Comments, first HELP, then TYPE. + if in.Help != nil { + n, err = w.WriteString("# HELP ") + written += n + if err != nil { + return + } + n, err = w.WriteString(shortName) + written += n + if err != nil { + return + } + err = w.WriteByte(' ') + written++ + if err != nil { + return + } + n, err = writeEscapedString(w, *in.Help, true) + written += n + if err != nil { + return + } + err = w.WriteByte('\n') + written++ + if err != nil { + return + } + } + n, err = w.WriteString("# TYPE ") + written += n + if err != nil { + return + } + n, err = w.WriteString(shortName) + written += n + if err != nil { + return + } + switch metricType { + case dto.MetricType_COUNTER: + if strings.HasSuffix(name, "_total") { + n, err = w.WriteString(" counter\n") + } else { + n, err = w.WriteString(" unknown\n") + } + case dto.MetricType_GAUGE: + n, err = w.WriteString(" gauge\n") + case dto.MetricType_SUMMARY: + n, err = w.WriteString(" summary\n") + case dto.MetricType_UNTYPED: + n, err = w.WriteString(" unknown\n") + case dto.MetricType_HISTOGRAM: + n, err = w.WriteString(" histogram\n") + default: + return written, fmt.Errorf("unknown metric type %s", metricType.String()) + } + written += n + if err != nil { + return + } + + // Finally the samples, one line for each. + for _, metric := range in.Metric { + switch metricType { + case dto.MetricType_COUNTER: + if metric.Counter == nil { + return written, fmt.Errorf( + "expected counter in metric %s %s", name, metric, + ) + } + // Note that we have ensured above that either the name + // ends on `_total` or that the rendered type is + // `unknown`. Therefore, no `_total` must be added here. + n, err = writeOpenMetricsSample( + w, name, "", metric, "", 0, + metric.Counter.GetValue(), 0, false, + metric.Counter.Exemplar, + ) + case dto.MetricType_GAUGE: + if metric.Gauge == nil { + return written, fmt.Errorf( + "expected gauge in metric %s %s", name, metric, + ) + } + n, err = writeOpenMetricsSample( + w, name, "", metric, "", 0, + metric.Gauge.GetValue(), 0, false, + nil, + ) + case dto.MetricType_UNTYPED: + if metric.Untyped == nil { + return written, fmt.Errorf( + "expected untyped in metric %s %s", name, metric, + ) + } + n, err = writeOpenMetricsSample( + w, name, "", metric, "", 0, + metric.Untyped.GetValue(), 0, false, + nil, + ) + case dto.MetricType_SUMMARY: + if metric.Summary == nil { + return written, fmt.Errorf( + "expected summary in metric %s %s", name, metric, + ) + } + for _, q := range metric.Summary.Quantile { + n, err = writeOpenMetricsSample( + w, name, "", metric, + model.QuantileLabel, q.GetQuantile(), + q.GetValue(), 0, false, + nil, + ) + written += n + if err != nil { + return + } + } + n, err = writeOpenMetricsSample( + w, name, "_sum", metric, "", 0, + metric.Summary.GetSampleSum(), 0, false, + nil, + ) + written += n + if err != nil { + return + } + n, err = writeOpenMetricsSample( + w, name, "_count", metric, "", 0, + 0, metric.Summary.GetSampleCount(), true, + nil, + ) + case dto.MetricType_HISTOGRAM: + if metric.Histogram == nil { + return written, fmt.Errorf( + "expected histogram in metric %s %s", name, metric, + ) + } + infSeen := false + for _, b := range metric.Histogram.Bucket { + n, err = writeOpenMetricsSample( + w, name, "_bucket", metric, + model.BucketLabel, b.GetUpperBound(), + 0, b.GetCumulativeCount(), true, + b.Exemplar, + ) + written += n + if err != nil { + return + } + if math.IsInf(b.GetUpperBound(), +1) { + infSeen = true + } + } + if !infSeen { + n, err = writeOpenMetricsSample( + w, name, "_bucket", metric, + model.BucketLabel, math.Inf(+1), + 0, metric.Histogram.GetSampleCount(), true, + nil, + ) + written += n + if err != nil { + return + } + } + n, err = writeOpenMetricsSample( + w, name, "_sum", metric, "", 0, + metric.Histogram.GetSampleSum(), 0, false, + nil, + ) + written += n + if err != nil { + return + } + n, err = writeOpenMetricsSample( + w, name, "_count", metric, "", 0, + 0, metric.Histogram.GetSampleCount(), true, + nil, + ) + default: + return written, fmt.Errorf( + "unexpected type in metric %s %s", name, metric, + ) + } + written += n + if err != nil { + return + } + } + return +} + +// FinalizeOpenMetrics writes the final `# EOF\n` line required by OpenMetrics. +func FinalizeOpenMetrics(w io.Writer) (written int, err error) { + return w.Write([]byte("# EOF\n")) +} + +// writeOpenMetricsSample writes a single sample in OpenMetrics text format to +// w, given the metric name, the metric proto message itself, optionally an +// additional label name with a float64 value (use empty string as label name if +// not required), the value (optionally as float64 or uint64, determined by +// useIntValue), and optionally an exemplar (use nil if not required). The +// function returns the number of bytes written and any error encountered. +func writeOpenMetricsSample( + w enhancedWriter, + name, suffix string, + metric *dto.Metric, + additionalLabelName string, additionalLabelValue float64, + floatValue float64, intValue uint64, useIntValue bool, + exemplar *dto.Exemplar, +) (int, error) { + var written int + n, err := w.WriteString(name) + written += n + if err != nil { + return written, err + } + if suffix != "" { + n, err = w.WriteString(suffix) + written += n + if err != nil { + return written, err + } + } + n, err = writeOpenMetricsLabelPairs( + w, metric.Label, additionalLabelName, additionalLabelValue, + ) + written += n + if err != nil { + return written, err + } + err = w.WriteByte(' ') + written++ + if err != nil { + return written, err + } + if useIntValue { + n, err = writeUint(w, intValue) + } else { + n, err = writeOpenMetricsFloat(w, floatValue) + } + written += n + if err != nil { + return written, err + } + if metric.TimestampMs != nil { + err = w.WriteByte(' ') + written++ + if err != nil { + return written, err + } + // TODO(beorn7): Format this directly without converting to a float first. + n, err = writeOpenMetricsFloat(w, float64(*metric.TimestampMs)/1000) + written += n + if err != nil { + return written, err + } + } + if exemplar != nil { + n, err = writeExemplar(w, exemplar) + written += n + if err != nil { + return written, err + } + } + err = w.WriteByte('\n') + written++ + if err != nil { + return written, err + } + return written, nil +} + +// writeOpenMetricsLabelPairs works like writeOpenMetrics but formats the float +// in OpenMetrics style. +func writeOpenMetricsLabelPairs( + w enhancedWriter, + in []*dto.LabelPair, + additionalLabelName string, additionalLabelValue float64, +) (int, error) { + if len(in) == 0 && additionalLabelName == "" { + return 0, nil + } + var ( + written int + separator byte = '{' + ) + for _, lp := range in { + err := w.WriteByte(separator) + written++ + if err != nil { + return written, err + } + n, err := w.WriteString(lp.GetName()) + written += n + if err != nil { + return written, err + } + n, err = w.WriteString(`="`) + written += n + if err != nil { + return written, err + } + n, err = writeEscapedString(w, lp.GetValue(), true) + written += n + if err != nil { + return written, err + } + err = w.WriteByte('"') + written++ + if err != nil { + return written, err + } + separator = ',' + } + if additionalLabelName != "" { + err := w.WriteByte(separator) + written++ + if err != nil { + return written, err + } + n, err := w.WriteString(additionalLabelName) + written += n + if err != nil { + return written, err + } + n, err = w.WriteString(`="`) + written += n + if err != nil { + return written, err + } + n, err = writeOpenMetricsFloat(w, additionalLabelValue) + written += n + if err != nil { + return written, err + } + err = w.WriteByte('"') + written++ + if err != nil { + return written, err + } + } + err := w.WriteByte('}') + written++ + if err != nil { + return written, err + } + return written, nil +} + +// writeExemplar writes the provided exemplar in OpenMetrics format to w. The +// function returns the number of bytes written and any error encountered. +func writeExemplar(w enhancedWriter, e *dto.Exemplar) (int, error) { + written := 0 + n, err := w.WriteString(" # ") + written += n + if err != nil { + return written, err + } + n, err = writeOpenMetricsLabelPairs(w, e.Label, "", 0) + written += n + if err != nil { + return written, err + } + err = w.WriteByte(' ') + written++ + if err != nil { + return written, err + } + n, err = writeOpenMetricsFloat(w, e.GetValue()) + written += n + if err != nil { + return written, err + } + if e.Timestamp != nil { + err = w.WriteByte(' ') + written++ + if err != nil { + return written, err + } + ts, err := ptypes.Timestamp((*e).Timestamp) + if err != nil { + return written, err + } + // TODO(beorn7): Format this directly from components of ts to + // avoid overflow/underflow and precision issues of the float + // conversion. + n, err = writeOpenMetricsFloat(w, float64(ts.UnixNano())/1e9) + written += n + if err != nil { + return written, err + } + } + return written, nil +} + +// writeOpenMetricsFloat works like writeFloat but appends ".0" if the resulting +// number would otherwise contain neither a "." nor an "e". +func writeOpenMetricsFloat(w enhancedWriter, f float64) (int, error) { + switch { + case f == 1: + return w.WriteString("1.0") + case f == 0: + return w.WriteString("0.0") + case f == -1: + return w.WriteString("-1.0") + case math.IsNaN(f): + return w.WriteString("NaN") + case math.IsInf(f, +1): + return w.WriteString("+Inf") + case math.IsInf(f, -1): + return w.WriteString("-Inf") + default: + bp := numBufPool.Get().(*[]byte) + *bp = strconv.AppendFloat((*bp)[:0], f, 'g', -1, 64) + if !bytes.ContainsAny(*bp, "e.") { + *bp = append(*bp, '.', '0') + } + written, err := w.Write(*bp) + numBufPool.Put(bp) + return written, err + } +} + +// writeUint is like writeInt just for uint64. +func writeUint(w enhancedWriter, u uint64) (int, error) { + bp := numBufPool.Get().(*[]byte) + *bp = strconv.AppendUint((*bp)[:0], u, 10) + written, err := w.Write(*bp) + numBufPool.Put(bp) + return written, err +} diff --git a/vendor/github.com/prometheus/common/expfmt/text_create.go b/vendor/github.com/prometheus/common/expfmt/text_create.go index 8e473d0fe92..5ba503b0654 100644 --- a/vendor/github.com/prometheus/common/expfmt/text_create.go +++ b/vendor/github.com/prometheus/common/expfmt/text_create.go @@ -14,9 +14,10 @@ package expfmt import ( - "bytes" + "bufio" "fmt" "io" + "io/ioutil" "math" "strconv" "strings" @@ -27,7 +28,7 @@ import ( dto "github.com/prometheus/client_model/go" ) -// enhancedWriter has all the enhanced write functions needed here. bytes.Buffer +// enhancedWriter has all the enhanced write functions needed here. bufio.Writer // implements it. type enhancedWriter interface { io.Writer @@ -37,14 +38,13 @@ type enhancedWriter interface { } const ( - initialBufSize = 512 initialNumBufSize = 24 ) var ( bufPool = sync.Pool{ New: func() interface{} { - return bytes.NewBuffer(make([]byte, 0, initialBufSize)) + return bufio.NewWriter(ioutil.Discard) }, } numBufPool = sync.Pool{ @@ -75,16 +75,14 @@ func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err e } // Try the interface upgrade. If it doesn't work, we'll use a - // bytes.Buffer from the sync.Pool and write out its content to out in a - // single go in the end. + // bufio.Writer from the sync.Pool. w, ok := out.(enhancedWriter) if !ok { - b := bufPool.Get().(*bytes.Buffer) - b.Reset() + b := bufPool.Get().(*bufio.Writer) + b.Reset(out) w = b defer func() { - bWritten, bErr := out.Write(b.Bytes()) - written = bWritten + bErr := b.Flush() if err == nil { err = bErr } @@ -425,9 +423,8 @@ var ( func writeEscapedString(w enhancedWriter, v string, includeDoubleQuote bool) (int, error) { if includeDoubleQuote { return quotedEscaper.WriteString(w, v) - } else { - return escaper.WriteString(w, v) } + return escaper.WriteString(w, v) } // writeFloat is equivalent to fmt.Fprint with a float64 argument but hardcodes diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse.go b/vendor/github.com/prometheus/common/expfmt/text_parse.go index ec3d86ba7ce..342e5940d0f 100644 --- a/vendor/github.com/prometheus/common/expfmt/text_parse.go +++ b/vendor/github.com/prometheus/common/expfmt/text_parse.go @@ -325,7 +325,7 @@ func (p *TextParser) startLabelValue() stateFn { // - Other labels have to be added to currentLabels for signature calculation. if p.currentMF.GetType() == dto.MetricType_SUMMARY { if p.currentLabelPair.GetName() == model.QuantileLabel { - if p.currentQuantile, p.err = strconv.ParseFloat(p.currentLabelPair.GetValue(), 64); p.err != nil { + if p.currentQuantile, p.err = parseFloat(p.currentLabelPair.GetValue()); p.err != nil { // Create a more helpful error message. p.parseError(fmt.Sprintf("expected float as value for 'quantile' label, got %q", p.currentLabelPair.GetValue())) return nil @@ -337,7 +337,7 @@ func (p *TextParser) startLabelValue() stateFn { // Similar special treatment of histograms. if p.currentMF.GetType() == dto.MetricType_HISTOGRAM { if p.currentLabelPair.GetName() == model.BucketLabel { - if p.currentBucket, p.err = strconv.ParseFloat(p.currentLabelPair.GetValue(), 64); p.err != nil { + if p.currentBucket, p.err = parseFloat(p.currentLabelPair.GetValue()); p.err != nil { // Create a more helpful error message. p.parseError(fmt.Sprintf("expected float as value for 'le' label, got %q", p.currentLabelPair.GetValue())) return nil @@ -392,7 +392,7 @@ func (p *TextParser) readingValue() stateFn { if p.readTokenUntilWhitespace(); p.err != nil { return nil // Unexpected end of input. } - value, err := strconv.ParseFloat(p.currentToken.String(), 64) + value, err := parseFloat(p.currentToken.String()) if err != nil { // Create a more helpful error message. p.parseError(fmt.Sprintf("expected float as value, got %q", p.currentToken.String())) @@ -755,3 +755,10 @@ func histogramMetricName(name string) string { return name } } + +func parseFloat(s string) (float64, error) { + if strings.ContainsAny(s, "pP_") { + return 0, fmt.Errorf("unsupported character in float") + } + return strconv.ParseFloat(s, 64) +} diff --git a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go index 648b38cb654..26e92288c7c 100644 --- a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go +++ b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go @@ -1,12 +1,12 @@ /* +Copyright (c) 2011, Open Knowledge Foundation Ltd. +All rights reserved. + HTTP Content-Type Autonegotiation. The functions in this package implement the behaviour specified in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html -Copyright (c) 2011, Open Knowledge Foundation Ltd. -All rights reserved. - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/vendor/github.com/prometheus/common/model/metric.go b/vendor/github.com/prometheus/common/model/metric.go index f7250909b9f..00804b7fedb 100644 --- a/vendor/github.com/prometheus/common/model/metric.go +++ b/vendor/github.com/prometheus/common/model/metric.go @@ -21,7 +21,6 @@ import ( ) var ( - separator = []byte{0} // MetricNameRE is a regular expression matching valid metric // names. Note that the IsValidMetricName function performs the same // check but faster than a match with this regular expression. diff --git a/vendor/github.com/prometheus/common/model/time.go b/vendor/github.com/prometheus/common/model/time.go index 46259b1f109..490a0240c10 100644 --- a/vendor/github.com/prometheus/common/model/time.go +++ b/vendor/github.com/prometheus/common/model/time.go @@ -150,7 +150,13 @@ func (t *Time) UnmarshalJSON(b []byte) error { return err } - *t = Time(v + va) + // If the value was something like -0.1 the negative is lost in the + // parsing because of the leading zero, this ensures that we capture it. + if len(p[0]) > 0 && p[0][0] == '-' && v+va > 0 { + *t = Time(v+va) * -1 + } else { + *t = Time(v + va) + } default: return fmt.Errorf("invalid time %q", string(b)) @@ -180,6 +186,10 @@ var durationRE = regexp.MustCompile("^([0-9]+)(y|w|d|h|m|s|ms)$") // ParseDuration parses a string into a time.Duration, assuming that a year // always has 365d, a week always has 7d, and a day always has 24h. func ParseDuration(durationStr string) (Duration, error) { + // Allow 0 without a unit. + if durationStr == "0" { + return 0, nil + } matches := durationRE.FindStringSubmatch(durationStr) if len(matches) != 3 { return 0, fmt.Errorf("not a valid duration string: %q", durationStr) diff --git a/vendor/github.com/prometheus/procfs/.golangci.yml b/vendor/github.com/prometheus/procfs/.golangci.yml new file mode 100644 index 00000000000..0aa09edacb3 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/.golangci.yml @@ -0,0 +1,4 @@ +--- +linters: + enable: + - golint diff --git a/vendor/github.com/prometheus/procfs/CONTRIBUTING.md b/vendor/github.com/prometheus/procfs/CONTRIBUTING.md index 40503edbf18..943de7615ee 100644 --- a/vendor/github.com/prometheus/procfs/CONTRIBUTING.md +++ b/vendor/github.com/prometheus/procfs/CONTRIBUTING.md @@ -2,17 +2,120 @@ Prometheus uses GitHub to manage reviews of pull requests. +* If you are a new contributor see: [Steps to Contribute](#steps-to-contribute) + * If you have a trivial fix or improvement, go ahead and create a pull request, - addressing (with `@...`) the maintainer of this repository (see + addressing (with `@...`) a suitable maintainer of this repository (see [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request. * If you plan to do something more involved, first discuss your ideas on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). This will avoid unnecessary work and surely give you and us a good deal - of inspiration. + of inspiration. Also please see our [non-goals issue](https://github.com/prometheus/docs/issues/149) on areas that the Prometheus community doesn't plan to work on. * Relevant coding style guidelines are the [Go Code Review Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) and the _Formatting and style_ section of Peter Bourgon's [Go: Best Practices for Production - Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). + Environments](https://peter.bourgon.org/go-in-production/#formatting-and-style). + +* Be sure to sign off on the [DCO](https://github.com/probot/dco#how-it-works) + +## Steps to Contribute + +Should you wish to work on an issue, please claim it first by commenting on the GitHub issue that you want to work on it. This is to prevent duplicated efforts from contributors on the same issue. + +Please check the [`help-wanted`](https://github.com/prometheus/procfs/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) label to find issues that are good for getting started. If you have questions about one of the issues, with or without the tag, please comment on them and one of the maintainers will clarify it. For a quicker response, contact us over [IRC](https://prometheus.io/community). + +For quickly compiling and testing your changes do: +``` +make test # Make sure all the tests pass before you commit and push :) +``` + +We use [`golangci-lint`](https://github.com/golangci/golangci-lint) for linting the code. If it reports an issue and you think that the warning needs to be disregarded or is a false-positive, you can add a special comment `//nolint:linter1[,linter2,...]` before the offending line. Use this sparingly though, fixing the code to comply with the linter's recommendation is in general the preferred course of action. + +## Pull Request Checklist + +* Branch from the master branch and, if needed, rebase to the current master branch before submitting your pull request. If it doesn't merge cleanly with master you may be asked to rebase your changes. + +* Commits should be as small as possible, while ensuring that each commit is correct independently (i.e., each commit should compile and pass tests). + +* If your patch is not getting reviewed or you need a specific person to review it, you can @-reply a reviewer asking for a review in the pull request or a comment, or you can ask for a review on IRC channel [#prometheus](https://webchat.freenode.net/?channels=#prometheus) on irc.freenode.net (for the easiest start, [join via Riot](https://riot.im/app/#/room/#prometheus:matrix.org)). + +* Add tests relevant to the fixed bug or new feature. + +## Dependency management + +The Prometheus project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.12 or greater installed. + +All dependencies are vendored in the `vendor/` directory. + +To add or update a new dependency, use the `go get` command: + +```bash +# Pick the latest tagged release. +go get example.com/some/module/pkg + +# Pick a specific version. +go get example.com/some/module/pkg@vX.Y.Z +``` + +Tidy up the `go.mod` and `go.sum` files and copy the new/updated dependency to the `vendor/` directory: + + +```bash +# The GO111MODULE variable can be omitted when the code isn't located in GOPATH. +GO111MODULE=on go mod tidy + +GO111MODULE=on go mod vendor +``` + +You have to commit the changes to `go.mod`, `go.sum` and the `vendor/` directory before submitting the pull request. + + +## API Implementation Guidelines + +### Naming and Documentation + +Public functions and structs should normally be named according to the file(s) being read and parsed. For example, +the `fs.BuddyInfo()` function reads the file `/proc/buddyinfo`. In addition, the godoc for each public function +should contain the path to the file(s) being read and a URL of the linux kernel documentation describing the file(s). + +### Reading vs. Parsing + +Most functionality in this library consists of reading files and then parsing the text into structured data. In most +cases reading and parsing should be separated into different functions/methods with a public `fs.Thing()` method and +a private `parseThing(r Reader)` function. This provides a logical separation and allows parsing to be tested +directly without the need to read from the filesystem. Using a `Reader` argument is preferred over other data types +such as `string` or `*File` because it provides the most flexibility regarding the data source. When a set of files +in a directory needs to be parsed, then a `path` string parameter to the parse function can be used instead. + +### /proc and /sys filesystem I/O + +The `proc` and `sys` filesystems are pseudo file systems and work a bit differently from standard disk I/O. +Many of the files are changing continuously and the data being read can in some cases change between subsequent +reads in the same file. Also, most of the files are relatively small (less than a few KBs), and system calls +to the `stat` function will often return the wrong size. Therefore, for most files it's recommended to read the +full file in a single operation using an internal utility function called `util.ReadFileNoStat`. +This function is similar to `ioutil.ReadFile`, but it avoids the system call to `stat` to get the current size of +the file. + +Note that parsing the file's contents can still be performed one line at a time. This is done by first reading +the full file, and then using a scanner on the `[]byte` or `string` containing the data. + +``` + data, err := util.ReadFileNoStat("/proc/cpuinfo") + if err != nil { + return err + } + reader := bytes.NewReader(data) + scanner := bufio.NewScanner(reader) +``` + +The `/sys` filesystem contains many very small files which contain only a single numeric or text value. These files +can be read using an internal function called `util.SysReadFile` which is similar to `ioutil.ReadFile` but does +not bother to check the size of the file before reading. +``` + data, err := util.SysReadFile("/sys/class/power_supply/BAT0/capacity") +``` + diff --git a/vendor/github.com/prometheus/procfs/MAINTAINERS.md b/vendor/github.com/prometheus/procfs/MAINTAINERS.md index 35993c41c27..56ba67d3e31 100644 --- a/vendor/github.com/prometheus/procfs/MAINTAINERS.md +++ b/vendor/github.com/prometheus/procfs/MAINTAINERS.md @@ -1 +1,2 @@ -* Tobias Schmidt +* Johannes 'fish' Ziemke @discordianfish +* Paul Gier @pgier diff --git a/vendor/github.com/prometheus/procfs/Makefile b/vendor/github.com/prometheus/procfs/Makefile index 947d7d8fa71..616a0d25eb0 100644 --- a/vendor/github.com/prometheus/procfs/Makefile +++ b/vendor/github.com/prometheus/procfs/Makefile @@ -14,17 +14,16 @@ include Makefile.common %/.unpacked: %.ttar + @echo ">> extracting fixtures" ./ttar -C $(dir $*) -x -f $*.ttar touch $@ -update_fixtures: fixtures.ttar sysfs/fixtures.ttar - -%fixtures.ttar: %/fixtures - rm -v $(dir $*)fixtures/.unpacked - ./ttar -C $(dir $*) -c -f $*fixtures.ttar fixtures/ +update_fixtures: + rm -vf fixtures/.unpacked + ./ttar -c -f fixtures.ttar fixtures/ .PHONY: build build: .PHONY: test -test: fixtures/.unpacked sysfs/fixtures/.unpacked common-test +test: fixtures/.unpacked common-test diff --git a/vendor/github.com/prometheus/procfs/Makefile.common b/vendor/github.com/prometheus/procfs/Makefile.common index 741579e60f2..9320176ca24 100644 --- a/vendor/github.com/prometheus/procfs/Makefile.common +++ b/vendor/github.com/prometheus/procfs/Makefile.common @@ -29,12 +29,15 @@ GO ?= go GOFMT ?= $(GO)fmt FIRST_GOPATH := $(firstword $(subst :, ,$(shell $(GO) env GOPATH))) GOOPTS ?= +GOHOSTOS ?= $(shell $(GO) env GOHOSTOS) +GOHOSTARCH ?= $(shell $(GO) env GOHOSTARCH) GO_VERSION ?= $(shell $(GO) version) GO_VERSION_NUMBER ?= $(word 3, $(GO_VERSION)) PRE_GO_111 ?= $(shell echo $(GO_VERSION_NUMBER) | grep -E 'go1\.(10|[0-9])\.') -unexport GOVENDOR +GOVENDOR := +GO111MODULE := ifeq (, $(PRE_GO_111)) ifneq (,$(wildcard go.mod)) # Enforce Go modules support just in case the directory is inside GOPATH (and for Travis CI). @@ -55,32 +58,68 @@ $(warning Some recipes may not work as expected as the current Go runtime is '$( # This repository isn't using Go modules (yet). GOVENDOR := $(FIRST_GOPATH)/bin/govendor endif - - unexport GO111MODULE endif PROMU := $(FIRST_GOPATH)/bin/promu -STATICCHECK := $(FIRST_GOPATH)/bin/staticcheck pkgs = ./... -GO_VERSION ?= $(shell $(GO) version) -GO_BUILD_PLATFORM ?= $(subst /,-,$(lastword $(GO_VERSION))) +ifeq (arm, $(GOHOSTARCH)) + GOHOSTARM ?= $(shell GOARM= $(GO) env GOARM) + GO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH)v$(GOHOSTARM) +else + GO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH) +endif -PROMU_VERSION ?= 0.2.0 +GOTEST := $(GO) test +GOTEST_DIR := +ifneq ($(CIRCLE_JOB),) +ifneq ($(shell which gotestsum),) + GOTEST_DIR := test-results + GOTEST := gotestsum --junitfile $(GOTEST_DIR)/unit-tests.xml -- +endif +endif + +PROMU_VERSION ?= 0.5.0 PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz +GOLANGCI_LINT := +GOLANGCI_LINT_OPTS ?= +GOLANGCI_LINT_VERSION ?= v1.18.0 +# golangci-lint only supports linux, darwin and windows platforms on i386/amd64. +# windows isn't included here because of the path separator being different. +ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin)) + ifeq ($(GOHOSTARCH),$(filter $(GOHOSTARCH),amd64 i386)) + GOLANGCI_LINT := $(FIRST_GOPATH)/bin/golangci-lint + endif +endif + PREFIX ?= $(shell pwd) BIN_DIR ?= $(shell pwd) DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) +DOCKERFILE_PATH ?= ./Dockerfile +DOCKERBUILD_CONTEXT ?= ./ DOCKER_REPO ?= prom -.PHONY: all -all: precheck style staticcheck unused build test +DOCKER_ARCHS ?= amd64 + +BUILD_DOCKER_ARCHS = $(addprefix common-docker-,$(DOCKER_ARCHS)) +PUBLISH_DOCKER_ARCHS = $(addprefix common-docker-publish-,$(DOCKER_ARCHS)) +TAG_DOCKER_ARCHS = $(addprefix common-docker-tag-latest-,$(DOCKER_ARCHS)) + +ifeq ($(GOHOSTARCH),amd64) + ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux freebsd darwin windows)) + # Only supported on amd64 + test-flags := -race + endif +endif # This rule is used to forward a target like "build" to "common-build". This # allows a new "build" target to be defined in a Makefile which includes this # one and override "common-build" without override warnings. %: common-% ; +.PHONY: common-all +common-all: precheck style check_license lint unused build test + .PHONY: common-style common-style: @echo ">> checking code style" @@ -102,34 +141,66 @@ common-check_license: exit 1; \ fi +.PHONY: common-deps +common-deps: + @echo ">> getting dependencies" +ifdef GO111MODULE + GO111MODULE=$(GO111MODULE) $(GO) mod download +else + $(GO) get $(GOOPTS) -t ./... +endif + +.PHONY: update-go-deps +update-go-deps: + @echo ">> updating Go dependencies" + @for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \ + $(GO) get $$m; \ + done + GO111MODULE=$(GO111MODULE) $(GO) mod tidy +ifneq (,$(wildcard vendor)) + GO111MODULE=$(GO111MODULE) $(GO) mod vendor +endif + .PHONY: common-test-short -common-test-short: +common-test-short: $(GOTEST_DIR) @echo ">> running short tests" - GO111MODULE=$(GO111MODULE) $(GO) test -short $(GOOPTS) $(pkgs) + GO111MODULE=$(GO111MODULE) $(GOTEST) -short $(GOOPTS) $(pkgs) .PHONY: common-test -common-test: +common-test: $(GOTEST_DIR) @echo ">> running all tests" - GO111MODULE=$(GO111MODULE) $(GO) test -race $(GOOPTS) $(pkgs) + GO111MODULE=$(GO111MODULE) $(GOTEST) $(test-flags) $(GOOPTS) $(pkgs) + +$(GOTEST_DIR): + @mkdir -p $@ .PHONY: common-format common-format: @echo ">> formatting code" - GO111MODULE=$(GO111MODULE) $(GO) fmt $(GOOPTS) $(pkgs) + GO111MODULE=$(GO111MODULE) $(GO) fmt $(pkgs) .PHONY: common-vet common-vet: @echo ">> vetting code" GO111MODULE=$(GO111MODULE) $(GO) vet $(GOOPTS) $(pkgs) -.PHONY: common-staticcheck -common-staticcheck: $(STATICCHECK) - @echo ">> running staticcheck" +.PHONY: common-lint +common-lint: $(GOLANGCI_LINT) +ifdef GOLANGCI_LINT + @echo ">> running golangci-lint" ifdef GO111MODULE - GO111MODULE=$(GO111MODULE) $(STATICCHECK) -ignore "$(STATICCHECK_IGNORE)" -checks "SA*" $(pkgs) +# 'go list' needs to be executed before staticcheck to prepopulate the modules cache. +# Otherwise staticcheck might fail randomly for some reason not yet explained. + GO111MODULE=$(GO111MODULE) $(GO) list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null + GO111MODULE=$(GO111MODULE) $(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs) else - $(STATICCHECK) -ignore "$(STATICCHECK_IGNORE)" $(pkgs) + $(GOLANGCI_LINT) run $(pkgs) endif +endif + +# For backward-compatibility. +.PHONY: common-staticcheck +common-staticcheck: lint .PHONY: common-unused common-unused: $(GOVENDOR) @@ -140,8 +211,9 @@ else ifdef GO111MODULE @echo ">> running check for unused/missing packages in go.mod" GO111MODULE=$(GO111MODULE) $(GO) mod tidy +ifeq (,$(wildcard vendor)) @git diff --exit-code -- go.sum go.mod -ifneq (,$(wildcard vendor)) +else @echo ">> running check for unused packages in vendor/" GO111MODULE=$(GO111MODULE) $(GO) mod vendor @git diff --exit-code -- go.sum go.mod vendor/ @@ -152,52 +224,58 @@ endif .PHONY: common-build common-build: promu @echo ">> building binaries" - GO111MODULE=$(GO111MODULE) $(PROMU) build --prefix $(PREFIX) + GO111MODULE=$(GO111MODULE) $(PROMU) build --prefix $(PREFIX) $(PROMU_BINARIES) .PHONY: common-tarball common-tarball: promu @echo ">> building release tarball" $(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR) -.PHONY: common-docker -common-docker: - docker build -t "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" . +.PHONY: common-docker $(BUILD_DOCKER_ARCHS) +common-docker: $(BUILD_DOCKER_ARCHS) +$(BUILD_DOCKER_ARCHS): common-docker-%: + docker build -t "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" \ + -f $(DOCKERFILE_PATH) \ + --build-arg ARCH="$*" \ + --build-arg OS="linux" \ + $(DOCKERBUILD_CONTEXT) -.PHONY: common-docker-publish -common-docker-publish: - docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)" +.PHONY: common-docker-publish $(PUBLISH_DOCKER_ARCHS) +common-docker-publish: $(PUBLISH_DOCKER_ARCHS) +$(PUBLISH_DOCKER_ARCHS): common-docker-publish-%: + docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" -.PHONY: common-docker-tag-latest -common-docker-tag-latest: - docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):latest" +.PHONY: common-docker-tag-latest $(TAG_DOCKER_ARCHS) +common-docker-tag-latest: $(TAG_DOCKER_ARCHS) +$(TAG_DOCKER_ARCHS): common-docker-tag-latest-%: + docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest" + +.PHONY: common-docker-manifest +common-docker-manifest: + DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" $(foreach ARCH,$(DOCKER_ARCHS),$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$(ARCH):$(DOCKER_IMAGE_TAG)) + DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" .PHONY: promu promu: $(PROMU) $(PROMU): - curl -s -L $(PROMU_URL) | tar -xvz -C /tmp - mkdir -v -p $(FIRST_GOPATH)/bin - cp -v /tmp/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(PROMU) + $(eval PROMU_TMP := $(shell mktemp -d)) + curl -s -L $(PROMU_URL) | tar -xvzf - -C $(PROMU_TMP) + mkdir -p $(FIRST_GOPATH)/bin + cp $(PROMU_TMP)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(FIRST_GOPATH)/bin/promu + rm -r $(PROMU_TMP) .PHONY: proto proto: @echo ">> generating code from proto files" @./scripts/genproto.sh -.PHONY: $(STATICCHECK) -$(STATICCHECK): -ifdef GO111MODULE -# Get staticcheck from a temporary directory to avoid modifying the local go.{mod,sum}. -# See https://github.com/golang/go/issues/27643. -# For now, we are using the next branch of staticcheck because master isn't compatible yet with Go modules. - tmpModule=$$(mktemp -d 2>&1) && \ - mkdir -p $${tmpModule}/staticcheck && \ - cd "$${tmpModule}"/staticcheck && \ - GO111MODULE=on $(GO) mod init example.com/staticcheck && \ - GO111MODULE=on GOOS= GOARCH= $(GO) get -u honnef.co/go/tools/cmd/staticcheck@next && \ - rm -rf $${tmpModule}; -else - GOOS= GOARCH= GO111MODULE=off $(GO) get -u honnef.co/go/tools/cmd/staticcheck +ifdef GOLANGCI_LINT +$(GOLANGCI_LINT): + mkdir -p $(FIRST_GOPATH)/bin + curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/$(GOLANGCI_LINT_VERSION)/install.sh \ + | sed -e '/install -d/d' \ + | sh -s -- -b $(FIRST_GOPATH)/bin $(GOLANGCI_LINT_VERSION) endif ifdef GOVENDOR @@ -212,7 +290,6 @@ precheck:: define PRECHECK_COMMAND_template = precheck:: $(1)_precheck - PRECHECK_COMMAND_$(1) ?= $(1) $$(strip $$(PRECHECK_OPTIONS_$(1))) .PHONY: $(1)_precheck $(1)_precheck: diff --git a/vendor/github.com/prometheus/procfs/README.md b/vendor/github.com/prometheus/procfs/README.md index 2095494719b..55d1e3261c9 100644 --- a/vendor/github.com/prometheus/procfs/README.md +++ b/vendor/github.com/prometheus/procfs/README.md @@ -1,7 +1,7 @@ # procfs -This procfs package provides functions to retrieve system, kernel and process -metrics from the pseudo-filesystem proc. +This package provides functions to retrieve system, kernel, and process +metrics from the pseudo-filesystems /proc and /sys. *WARNING*: This package is a work in progress. Its API may still break in backwards-incompatible ways without warnings. Use it at your own risk. @@ -9,3 +9,53 @@ backwards-incompatible ways without warnings. Use it at your own risk. [![GoDoc](https://godoc.org/github.com/prometheus/procfs?status.png)](https://godoc.org/github.com/prometheus/procfs) [![Build Status](https://travis-ci.org/prometheus/procfs.svg?branch=master)](https://travis-ci.org/prometheus/procfs) [![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/procfs)](https://goreportcard.com/report/github.com/prometheus/procfs) + +## Usage + +The procfs library is organized by packages based on whether the gathered data is coming from +/proc, /sys, or both. Each package contains an `FS` type which represents the path to either /proc, +/sys, or both. For example, cpu statistics are gathered from +`/proc/stat` and are available via the root procfs package. First, the proc filesystem mount +point is initialized, and then the stat information is read. + +```go +fs, err := procfs.NewFS("/proc") +stats, err := fs.Stat() +``` + +Some sub-packages such as `blockdevice`, require access to both the proc and sys filesystems. + +```go + fs, err := blockdevice.NewFS("/proc", "/sys") + stats, err := fs.ProcDiskstats() +``` + +## Package Organization + +The packages in this project are organized according to (1) whether the data comes from the `/proc` or +`/sys` filesystem and (2) the type of information being retrieved. For example, most process information +can be gathered from the functions in the root `procfs` package. Information about block devices such as disk drives +is available in the `blockdevices` sub-package. + +## Building and Testing + +The procfs library is intended to be built as part of another application, so there are no distributable binaries. +However, most of the API includes unit tests which can be run with `make test`. + +### Updating Test Fixtures + +The procfs library includes a set of test fixtures which include many example files from +the `/proc` and `/sys` filesystems. These fixtures are included as a [ttar](https://github.com/ideaship/ttar) file +which is extracted automatically during testing. To add/update the test fixtures, first +ensure the `fixtures` directory is up to date by removing the existing directory and then +extracting the ttar file using `make fixtures/.unpacked` or just `make test`. + +```bash +rm -rf fixtures +make test +``` + +Next, make the required changes to the extracted files in the `fixtures` directory. When +the changes are complete, run `make update_fixtures` to create a new `fixtures.ttar` file +based on the updated `fixtures` directory. And finally, verify the changes using +`git diff fixtures.ttar`. diff --git a/vendor/github.com/prometheus/procfs/arp.go b/vendor/github.com/prometheus/procfs/arp.go new file mode 100644 index 00000000000..916c9182a8b --- /dev/null +++ b/vendor/github.com/prometheus/procfs/arp.go @@ -0,0 +1,85 @@ +// Copyright 2019 The Prometheus 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 procfs + +import ( + "fmt" + "io/ioutil" + "net" + "strings" +) + +// ARPEntry contains a single row of the columnar data represented in +// /proc/net/arp. +type ARPEntry struct { + // IP address + IPAddr net.IP + // MAC address + HWAddr net.HardwareAddr + // Name of the device + Device string +} + +// GatherARPEntries retrieves all the ARP entries, parse the relevant columns, +// and then return a slice of ARPEntry's. +func (fs FS) GatherARPEntries() ([]ARPEntry, error) { + data, err := ioutil.ReadFile(fs.proc.Path("net/arp")) + if err != nil { + return nil, fmt.Errorf("error reading arp %s: %s", fs.proc.Path("net/arp"), err) + } + + return parseARPEntries(data) +} + +func parseARPEntries(data []byte) ([]ARPEntry, error) { + lines := strings.Split(string(data), "\n") + entries := make([]ARPEntry, 0) + var err error + const ( + expectedDataWidth = 6 + expectedHeaderWidth = 9 + ) + for _, line := range lines { + columns := strings.Fields(line) + width := len(columns) + + if width == expectedHeaderWidth || width == 0 { + continue + } else if width == expectedDataWidth { + entry, err := parseARPEntry(columns) + if err != nil { + return []ARPEntry{}, fmt.Errorf("failed to parse ARP entry: %s", err) + } + entries = append(entries, entry) + } else { + return []ARPEntry{}, fmt.Errorf("%d columns were detected, but %d were expected", width, expectedDataWidth) + } + + } + + return entries, err +} + +func parseARPEntry(columns []string) (ARPEntry, error) { + ip := net.ParseIP(columns[0]) + mac := net.HardwareAddr(columns[3]) + + entry := ARPEntry{ + IPAddr: ip, + HWAddr: mac, + Device: columns[5], + } + + return entry, nil +} diff --git a/vendor/github.com/prometheus/procfs/buddyinfo.go b/vendor/github.com/prometheus/procfs/buddyinfo.go index d3a8268078c..10bd067a0a5 100644 --- a/vendor/github.com/prometheus/procfs/buddyinfo.go +++ b/vendor/github.com/prometheus/procfs/buddyinfo.go @@ -31,19 +31,9 @@ type BuddyInfo struct { Sizes []float64 } -// NewBuddyInfo reads the buddyinfo statistics. -func NewBuddyInfo() ([]BuddyInfo, error) { - fs, err := NewFS(DefaultMountPoint) - if err != nil { - return nil, err - } - - return fs.NewBuddyInfo() -} - -// NewBuddyInfo reads the buddyinfo statistics from the specified `proc` filesystem. -func (fs FS) NewBuddyInfo() ([]BuddyInfo, error) { - file, err := os.Open(fs.Path("buddyinfo")) +// BuddyInfo reads the buddyinfo statistics from the specified `proc` filesystem. +func (fs FS) BuddyInfo() ([]BuddyInfo, error) { + file, err := os.Open(fs.proc.Path("buddyinfo")) if err != nil { return nil, err } diff --git a/vendor/github.com/prometheus/procfs/cpuinfo.go b/vendor/github.com/prometheus/procfs/cpuinfo.go new file mode 100644 index 00000000000..31d42f7124c --- /dev/null +++ b/vendor/github.com/prometheus/procfs/cpuinfo.go @@ -0,0 +1,420 @@ +// Copyright 2019 The Prometheus 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. + +// +build linux + +package procfs + +import ( + "bufio" + "bytes" + "errors" + "regexp" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// CPUInfo contains general information about a system CPU found in /proc/cpuinfo +type CPUInfo struct { + Processor uint + VendorID string + CPUFamily string + Model string + ModelName string + Stepping string + Microcode string + CPUMHz float64 + CacheSize string + PhysicalID string + Siblings uint + CoreID string + CPUCores uint + APICID string + InitialAPICID string + FPU string + FPUException string + CPUIDLevel uint + WP string + Flags []string + Bugs []string + BogoMips float64 + CLFlushSize uint + CacheAlignment uint + AddressSizes string + PowerManagement string +} + +var ( + cpuinfoClockRegexp = regexp.MustCompile(`([\d.]+)`) + cpuinfoS390XProcessorRegexp = regexp.MustCompile(`^processor\s+(\d+):.*`) +) + +// CPUInfo returns information about current system CPUs. +// See https://www.kernel.org/doc/Documentation/filesystems/proc.txt +func (fs FS) CPUInfo() ([]CPUInfo, error) { + data, err := util.ReadFileNoStat(fs.proc.Path("cpuinfo")) + if err != nil { + return nil, err + } + return parseCPUInfo(data) +} + +func parseCPUInfoX86(info []byte) ([]CPUInfo, error) { + scanner := bufio.NewScanner(bytes.NewReader(info)) + + // find the first "processor" line + firstLine := firstNonEmptyLine(scanner) + if !strings.HasPrefix(firstLine, "processor") || !strings.Contains(firstLine, ":") { + return nil, errors.New("invalid cpuinfo file: " + firstLine) + } + field := strings.SplitN(firstLine, ": ", 2) + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + firstcpu := CPUInfo{Processor: uint(v)} + cpuinfo := []CPUInfo{firstcpu} + i := 0 + + for scanner.Scan() { + line := scanner.Text() + if !strings.Contains(line, ":") { + continue + } + field := strings.SplitN(line, ": ", 2) + switch strings.TrimSpace(field[0]) { + case "processor": + cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor + i++ + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + cpuinfo[i].Processor = uint(v) + case "vendor", "vendor_id": + cpuinfo[i].VendorID = field[1] + case "cpu family": + cpuinfo[i].CPUFamily = field[1] + case "model": + cpuinfo[i].Model = field[1] + case "model name": + cpuinfo[i].ModelName = field[1] + case "stepping": + cpuinfo[i].Stepping = field[1] + case "microcode": + cpuinfo[i].Microcode = field[1] + case "cpu MHz": + v, err := strconv.ParseFloat(field[1], 64) + if err != nil { + return nil, err + } + cpuinfo[i].CPUMHz = v + case "cache size": + cpuinfo[i].CacheSize = field[1] + case "physical id": + cpuinfo[i].PhysicalID = field[1] + case "siblings": + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + cpuinfo[i].Siblings = uint(v) + case "core id": + cpuinfo[i].CoreID = field[1] + case "cpu cores": + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + cpuinfo[i].CPUCores = uint(v) + case "apicid": + cpuinfo[i].APICID = field[1] + case "initial apicid": + cpuinfo[i].InitialAPICID = field[1] + case "fpu": + cpuinfo[i].FPU = field[1] + case "fpu_exception": + cpuinfo[i].FPUException = field[1] + case "cpuid level": + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + cpuinfo[i].CPUIDLevel = uint(v) + case "wp": + cpuinfo[i].WP = field[1] + case "flags": + cpuinfo[i].Flags = strings.Fields(field[1]) + case "bugs": + cpuinfo[i].Bugs = strings.Fields(field[1]) + case "bogomips": + v, err := strconv.ParseFloat(field[1], 64) + if err != nil { + return nil, err + } + cpuinfo[i].BogoMips = v + case "clflush size": + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + cpuinfo[i].CLFlushSize = uint(v) + case "cache_alignment": + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + cpuinfo[i].CacheAlignment = uint(v) + case "address sizes": + cpuinfo[i].AddressSizes = field[1] + case "power management": + cpuinfo[i].PowerManagement = field[1] + } + } + return cpuinfo, nil +} + +func parseCPUInfoARM(info []byte) ([]CPUInfo, error) { + scanner := bufio.NewScanner(bytes.NewReader(info)) + + firstLine := firstNonEmptyLine(scanner) + match, _ := regexp.MatchString("^[Pp]rocessor", firstLine) + if !match || !strings.Contains(firstLine, ":") { + return nil, errors.New("invalid cpuinfo file: " + firstLine) + } + field := strings.SplitN(firstLine, ": ", 2) + cpuinfo := []CPUInfo{} + featuresLine := "" + commonCPUInfo := CPUInfo{} + i := 0 + if strings.TrimSpace(field[0]) == "Processor" { + commonCPUInfo = CPUInfo{ModelName: field[1]} + i = -1 + } else { + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + firstcpu := CPUInfo{Processor: uint(v)} + cpuinfo = []CPUInfo{firstcpu} + } + + for scanner.Scan() { + line := scanner.Text() + if !strings.Contains(line, ":") { + continue + } + field := strings.SplitN(line, ": ", 2) + switch strings.TrimSpace(field[0]) { + case "processor": + cpuinfo = append(cpuinfo, commonCPUInfo) // start of the next processor + i++ + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + cpuinfo[i].Processor = uint(v) + case "BogoMIPS": + if i == -1 { + cpuinfo = append(cpuinfo, commonCPUInfo) // There is only one processor + i++ + cpuinfo[i].Processor = 0 + } + v, err := strconv.ParseFloat(field[1], 64) + if err != nil { + return nil, err + } + cpuinfo[i].BogoMips = v + case "Features": + featuresLine = line + case "model name": + cpuinfo[i].ModelName = field[1] + } + } + fields := strings.SplitN(featuresLine, ": ", 2) + for i := range cpuinfo { + cpuinfo[i].Flags = strings.Fields(fields[1]) + } + return cpuinfo, nil + +} + +func parseCPUInfoS390X(info []byte) ([]CPUInfo, error) { + scanner := bufio.NewScanner(bytes.NewReader(info)) + + firstLine := firstNonEmptyLine(scanner) + if !strings.HasPrefix(firstLine, "vendor_id") || !strings.Contains(firstLine, ":") { + return nil, errors.New("invalid cpuinfo file: " + firstLine) + } + field := strings.SplitN(firstLine, ": ", 2) + cpuinfo := []CPUInfo{} + commonCPUInfo := CPUInfo{VendorID: field[1]} + + for scanner.Scan() { + line := scanner.Text() + if !strings.Contains(line, ":") { + continue + } + field := strings.SplitN(line, ": ", 2) + switch strings.TrimSpace(field[0]) { + case "bogomips per cpu": + v, err := strconv.ParseFloat(field[1], 64) + if err != nil { + return nil, err + } + commonCPUInfo.BogoMips = v + case "features": + commonCPUInfo.Flags = strings.Fields(field[1]) + } + if strings.HasPrefix(line, "processor") { + match := cpuinfoS390XProcessorRegexp.FindStringSubmatch(line) + if len(match) < 2 { + return nil, errors.New("Invalid line found in cpuinfo: " + line) + } + cpu := commonCPUInfo + v, err := strconv.ParseUint(match[1], 0, 32) + if err != nil { + return nil, err + } + cpu.Processor = uint(v) + cpuinfo = append(cpuinfo, cpu) + } + if strings.HasPrefix(line, "cpu number") { + break + } + } + + i := 0 + for scanner.Scan() { + line := scanner.Text() + if !strings.Contains(line, ":") { + continue + } + field := strings.SplitN(line, ": ", 2) + switch strings.TrimSpace(field[0]) { + case "cpu number": + i++ + case "cpu MHz dynamic": + clock := cpuinfoClockRegexp.FindString(strings.TrimSpace(field[1])) + v, err := strconv.ParseFloat(clock, 64) + if err != nil { + return nil, err + } + cpuinfo[i].CPUMHz = v + } + } + + return cpuinfo, nil +} + +func parseCPUInfoMips(info []byte) ([]CPUInfo, error) { + scanner := bufio.NewScanner(bytes.NewReader(info)) + + // find the first "processor" line + firstLine := firstNonEmptyLine(scanner) + if !strings.HasPrefix(firstLine, "system type") || !strings.Contains(firstLine, ":") { + return nil, errors.New("invalid cpuinfo file: " + firstLine) + } + field := strings.SplitN(firstLine, ": ", 2) + cpuinfo := []CPUInfo{} + systemType := field[1] + + i := 0 + + for scanner.Scan() { + line := scanner.Text() + if !strings.Contains(line, ":") { + continue + } + field := strings.SplitN(line, ": ", 2) + switch strings.TrimSpace(field[0]) { + case "processor": + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + i = int(v) + cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor + cpuinfo[i].Processor = uint(v) + cpuinfo[i].VendorID = systemType + case "cpu model": + cpuinfo[i].ModelName = field[1] + case "BogoMIPS": + v, err := strconv.ParseFloat(field[1], 64) + if err != nil { + return nil, err + } + cpuinfo[i].BogoMips = v + } + } + return cpuinfo, nil +} + +func parseCPUInfoPPC(info []byte) ([]CPUInfo, error) { + scanner := bufio.NewScanner(bytes.NewReader(info)) + + firstLine := firstNonEmptyLine(scanner) + if !strings.HasPrefix(firstLine, "processor") || !strings.Contains(firstLine, ":") { + return nil, errors.New("invalid cpuinfo file: " + firstLine) + } + field := strings.SplitN(firstLine, ": ", 2) + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + firstcpu := CPUInfo{Processor: uint(v)} + cpuinfo := []CPUInfo{firstcpu} + i := 0 + + for scanner.Scan() { + line := scanner.Text() + if !strings.Contains(line, ":") { + continue + } + field := strings.SplitN(line, ": ", 2) + switch strings.TrimSpace(field[0]) { + case "processor": + cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor + i++ + v, err := strconv.ParseUint(field[1], 0, 32) + if err != nil { + return nil, err + } + cpuinfo[i].Processor = uint(v) + case "cpu": + cpuinfo[i].VendorID = field[1] + case "clock": + clock := cpuinfoClockRegexp.FindString(strings.TrimSpace(field[1])) + v, err := strconv.ParseFloat(clock, 64) + if err != nil { + return nil, err + } + cpuinfo[i].CPUMHz = v + } + } + return cpuinfo, nil +} + +// firstNonEmptyLine advances the scanner to the first non-empty line +// and returns the contents of that line +func firstNonEmptyLine(scanner *bufio.Scanner) string { + for scanner.Scan() { + line := scanner.Text() + if strings.TrimSpace(line) != "" { + return line + } + } + return "" +} diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_arm.go b/vendor/github.com/prometheus/procfs/cpuinfo_arm.go new file mode 100644 index 00000000000..83555077069 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/cpuinfo_arm.go @@ -0,0 +1,18 @@ +// Copyright 2020 The Prometheus 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. + +// +build linux + +package procfs + +var parseCPUInfo = parseCPUInfoARM diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_arm64.go b/vendor/github.com/prometheus/procfs/cpuinfo_arm64.go new file mode 100644 index 00000000000..4f5d172a356 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/cpuinfo_arm64.go @@ -0,0 +1,19 @@ +// Copyright 2020 The Prometheus 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. + +// +build linux +// +build arm64 + +package procfs + +var parseCPUInfo = parseCPUInfoARM diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_default.go b/vendor/github.com/prometheus/procfs/cpuinfo_default.go new file mode 100644 index 00000000000..d5bedf97f31 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/cpuinfo_default.go @@ -0,0 +1,19 @@ +// Copyright 2020 The Prometheus 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. + +// +build linux +// +build 386 amd64 + +package procfs + +var parseCPUInfo = parseCPUInfoX86 diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_mips.go b/vendor/github.com/prometheus/procfs/cpuinfo_mips.go new file mode 100644 index 00000000000..22d93f8ef0c --- /dev/null +++ b/vendor/github.com/prometheus/procfs/cpuinfo_mips.go @@ -0,0 +1,18 @@ +// Copyright 2020 The Prometheus 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. + +// +build linux + +package procfs + +var parseCPUInfo = parseCPUInfoMips diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_mips64.go b/vendor/github.com/prometheus/procfs/cpuinfo_mips64.go new file mode 100644 index 00000000000..22d93f8ef0c --- /dev/null +++ b/vendor/github.com/prometheus/procfs/cpuinfo_mips64.go @@ -0,0 +1,18 @@ +// Copyright 2020 The Prometheus 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. + +// +build linux + +package procfs + +var parseCPUInfo = parseCPUInfoMips diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_mips64le.go b/vendor/github.com/prometheus/procfs/cpuinfo_mips64le.go new file mode 100644 index 00000000000..22d93f8ef0c --- /dev/null +++ b/vendor/github.com/prometheus/procfs/cpuinfo_mips64le.go @@ -0,0 +1,18 @@ +// Copyright 2020 The Prometheus 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. + +// +build linux + +package procfs + +var parseCPUInfo = parseCPUInfoMips diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_mipsle.go b/vendor/github.com/prometheus/procfs/cpuinfo_mipsle.go new file mode 100644 index 00000000000..22d93f8ef0c --- /dev/null +++ b/vendor/github.com/prometheus/procfs/cpuinfo_mipsle.go @@ -0,0 +1,18 @@ +// Copyright 2020 The Prometheus 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. + +// +build linux + +package procfs + +var parseCPUInfo = parseCPUInfoMips diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_ppc64.go b/vendor/github.com/prometheus/procfs/cpuinfo_ppc64.go new file mode 100644 index 00000000000..64aee9c63c0 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/cpuinfo_ppc64.go @@ -0,0 +1,18 @@ +// Copyright 2020 The Prometheus 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. + +// +build linux + +package procfs + +var parseCPUInfo = parseCPUInfoPPC diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_ppc64le.go b/vendor/github.com/prometheus/procfs/cpuinfo_ppc64le.go new file mode 100644 index 00000000000..64aee9c63c0 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/cpuinfo_ppc64le.go @@ -0,0 +1,18 @@ +// Copyright 2020 The Prometheus 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. + +// +build linux + +package procfs + +var parseCPUInfo = parseCPUInfoPPC diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go b/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go new file mode 100644 index 00000000000..26814eebaaf --- /dev/null +++ b/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go @@ -0,0 +1,18 @@ +// Copyright 2020 The Prometheus 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. + +// +build linux + +package procfs + +var parseCPUInfo = parseCPUInfoS390X diff --git a/vendor/github.com/prometheus/procfs/crypto.go b/vendor/github.com/prometheus/procfs/crypto.go new file mode 100644 index 00000000000..a9589337577 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/crypto.go @@ -0,0 +1,153 @@ +// Copyright 2019 The Prometheus 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 procfs + +import ( + "bufio" + "bytes" + "fmt" + "io" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// Crypto holds info parsed from /proc/crypto. +type Crypto struct { + Alignmask *uint64 + Async bool + Blocksize *uint64 + Chunksize *uint64 + Ctxsize *uint64 + Digestsize *uint64 + Driver string + Geniv string + Internal string + Ivsize *uint64 + Maxauthsize *uint64 + MaxKeysize *uint64 + MinKeysize *uint64 + Module string + Name string + Priority *int64 + Refcnt *int64 + Seedsize *uint64 + Selftest string + Type string + Walksize *uint64 +} + +// Crypto parses an crypto-file (/proc/crypto) and returns a slice of +// structs containing the relevant info. More information available here: +// https://kernel.readthedocs.io/en/sphinx-samples/crypto-API.html +func (fs FS) Crypto() ([]Crypto, error) { + path := fs.proc.Path("crypto") + b, err := util.ReadFileNoStat(path) + if err != nil { + return nil, fmt.Errorf("error reading crypto %s: %s", path, err) + } + + crypto, err := parseCrypto(bytes.NewReader(b)) + if err != nil { + return nil, fmt.Errorf("error parsing crypto %s: %s", path, err) + } + + return crypto, nil +} + +// parseCrypto parses a /proc/crypto stream into Crypto elements. +func parseCrypto(r io.Reader) ([]Crypto, error) { + var out []Crypto + + s := bufio.NewScanner(r) + for s.Scan() { + text := s.Text() + switch { + case strings.HasPrefix(text, "name"): + // Each crypto element begins with its name. + out = append(out, Crypto{}) + case text == "": + continue + } + + kv := strings.Split(text, ":") + if len(kv) != 2 { + return nil, fmt.Errorf("malformed crypto line: %q", text) + } + + k := strings.TrimSpace(kv[0]) + v := strings.TrimSpace(kv[1]) + + // Parse the key/value pair into the currently focused element. + c := &out[len(out)-1] + if err := c.parseKV(k, v); err != nil { + return nil, err + } + } + + if err := s.Err(); err != nil { + return nil, err + } + + return out, nil +} + +// parseKV parses a key/value pair into the appropriate field of c. +func (c *Crypto) parseKV(k, v string) error { + vp := util.NewValueParser(v) + + switch k { + case "async": + // Interpret literal yes as true. + c.Async = v == "yes" + case "blocksize": + c.Blocksize = vp.PUInt64() + case "chunksize": + c.Chunksize = vp.PUInt64() + case "digestsize": + c.Digestsize = vp.PUInt64() + case "driver": + c.Driver = v + case "geniv": + c.Geniv = v + case "internal": + c.Internal = v + case "ivsize": + c.Ivsize = vp.PUInt64() + case "maxauthsize": + c.Maxauthsize = vp.PUInt64() + case "max keysize": + c.MaxKeysize = vp.PUInt64() + case "min keysize": + c.MinKeysize = vp.PUInt64() + case "module": + c.Module = v + case "name": + c.Name = v + case "priority": + c.Priority = vp.PInt64() + case "refcnt": + c.Refcnt = vp.PInt64() + case "seedsize": + c.Seedsize = vp.PUInt64() + case "selftest": + c.Selftest = v + case "type": + c.Type = v + case "walksize": + c.Walksize = vp.PUInt64() + } + + return vp.Err() +} diff --git a/vendor/github.com/prometheus/procfs/fixtures.ttar b/vendor/github.com/prometheus/procfs/fixtures.ttar index 13c831ef599..868c8573d92 100644 --- a/vendor/github.com/prometheus/procfs/fixtures.ttar +++ b/vendor/github.com/prometheus/procfs/fixtures.ttar @@ -1,45 +1,95 @@ # Archive created by ttar -c -f fixtures.ttar fixtures/ Directory: fixtures +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc/26231 Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/26231 -Mode: 755 -# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/cmdline +Path: fixtures/proc/26231/cmdline Lines: 1 vimNULLBYTEtest.goNULLBYTE+10NULLBYTEEOF Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/comm +Path: fixtures/proc/26231/comm Lines: 1 vim Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/cwd +Path: fixtures/proc/26231/cwd SymlinkTo: /usr/bin # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/exe +Path: fixtures/proc/26231/environ +Lines: 1 +PATH=/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binNULLBYTEHOSTNAME=cd24e11f73a5NULLBYTETERM=xtermNULLBYTEGOLANG_VERSION=1.12.5NULLBYTEGOPATH=/goNULLBYTEHOME=/rootNULLBYTEEOF +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26231/exe SymlinkTo: /usr/bin/vim # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/26231/fd +Directory: fixtures/proc/26231/fd Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/fd/0 +Path: fixtures/proc/26231/fd/0 SymlinkTo: ../../symlinktargets/abc # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/fd/1 +Path: fixtures/proc/26231/fd/1 SymlinkTo: ../../symlinktargets/def # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/fd/10 +Path: fixtures/proc/26231/fd/10 SymlinkTo: ../../symlinktargets/xyz # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/fd/2 +Path: fixtures/proc/26231/fd/2 SymlinkTo: ../../symlinktargets/ghi # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/fd/3 +Path: fixtures/proc/26231/fd/3 SymlinkTo: ../../symlinktargets/uvw # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/io +Directory: fixtures/proc/26231/fdinfo +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26231/fdinfo/0 +Lines: 6 +pos: 0 +flags: 02004000 +mnt_id: 13 +inotify wd:3 ino:1 sdev:34 mask:fce ignored_mask:0 fhandle-bytes:c fhandle-type:81 f_handle:000000000100000000000000 +inotify wd:2 ino:1300016 sdev:fd00002 mask:fce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:16003001ed3f022a +inotify wd:1 ino:2e0001 sdev:fd00000 mask:fce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:01002e00138e7c65 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26231/fdinfo/1 +Lines: 4 +pos: 0 +flags: 02004002 +mnt_id: 13 +eventfd-count: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26231/fdinfo/10 +Lines: 3 +pos: 0 +flags: 02004002 +mnt_id: 9 +Mode: 400 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26231/fdinfo/2 +Lines: 3 +pos: 0 +flags: 02004002 +mnt_id: 9 +Mode: 400 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26231/fdinfo/3 +Lines: 3 +pos: 0 +flags: 02004002 +mnt_id: 9 +Mode: 400 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26231/io Lines: 7 rchar: 750339 wchar: 818609 @@ -50,7 +100,7 @@ write_bytes: 2048 cancelled_write_bytes: -1024 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/limits +Path: fixtures/proc/26231/limits Lines: 17 Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds @@ -71,14 +121,14 @@ Max realtime priority 0 0 Max realtime timeout unlimited unlimited us Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/mountstats -Lines: 19 +Path: fixtures/proc/26231/mountstats +Lines: 20 device rootfs mounted on / with fstype rootfs device sysfs mounted on /sys with fstype sysfs device proc mounted on /proc with fstype proc device /dev/sda1 mounted on / with fstype ext4 device 192.168.1.1:/srv/test mounted on /mnt/nfs/test with fstype nfs4 statvers=1.1 - opts: rw,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.5,local_lock=none + opts: rw,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.1,clientaddr=192.168.1.5,local_lock=none age: 13968 caps: caps=0xfff7,wtmult=512,dtsize=32768,bsize=0,namlen=255 nfsv4: bm0=0xfdffafff,bm1=0xf9be3e,bm2=0x0,acl=0x0,pnfs=not configured @@ -91,13 +141,14 @@ device 192.168.1.1:/srv/test mounted on /mnt/nfs/test with fstype nfs4 statvers= NULL: 0 0 0 0 0 0 0 0 READ: 1298 1298 0 207680 1210292152 6 79386 79407 WRITE: 0 0 0 0 0 0 0 0 + ACCESS: 2927395007 2927394995 0 526931094212 362996810236 18446743919241604546 1667369447 1953587717 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/26231/net +Directory: fixtures/proc/26231/net Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/net/dev +Path: fixtures/proc/26231/net/dev Lines: 4 Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed @@ -105,142 +156,1784 @@ Inter-| Receive | Transmit eth0: 438 5 0 0 0 0 0 0 648 8 0 0 0 0 0 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/26231/ns +Directory: fixtures/proc/26231/ns Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/ns/mnt +Path: fixtures/proc/26231/ns/mnt SymlinkTo: mnt:[4026531840] # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/ns/net +Path: fixtures/proc/26231/ns/net SymlinkTo: net:[4026531993] # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/root +Path: fixtures/proc/26231/root SymlinkTo: / # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26231/stat +Path: fixtures/proc/26231/schedstat +Lines: 1 +411605849 93680043 79 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26231/smaps +Lines: 252 +00400000-00cb1000 r-xp 00000000 fd:01 952273 /bin/alertmanager +Size: 8900 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 2952 kB +Pss: 2952 kB +Shared_Clean: 0 kB +Shared_Dirty: 0 kB +Private_Clean: 2952 kB +Private_Dirty: 0 kB +Referenced: 2864 kB +Anonymous: 0 kB +LazyFree: 0 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 0 kB +SwapPss: 0 kB +Locked: 0 kB +VmFlags: rd ex mr mw me dw sd +00cb1000-016b0000 r--p 008b1000 fd:01 952273 /bin/alertmanager +Size: 10236 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 6152 kB +Pss: 6152 kB +Shared_Clean: 0 kB +Shared_Dirty: 0 kB +Private_Clean: 6152 kB +Private_Dirty: 0 kB +Referenced: 5308 kB +Anonymous: 0 kB +LazyFree: 0 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 0 kB +SwapPss: 0 kB +Locked: 0 kB +VmFlags: rd mr mw me dw sd +016b0000-0171a000 rw-p 012b0000 fd:01 952273 /bin/alertmanager +Size: 424 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 176 kB +Pss: 176 kB +Shared_Clean: 0 kB +Shared_Dirty: 0 kB +Private_Clean: 84 kB +Private_Dirty: 92 kB +Referenced: 176 kB +Anonymous: 92 kB +LazyFree: 0 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 12 kB +SwapPss: 12 kB +Locked: 0 kB +VmFlags: rd wr mr mw me dw ac sd +0171a000-0173f000 rw-p 00000000 00:00 0 +Size: 148 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 76 kB +Pss: 76 kB +Shared_Clean: 0 kB +Shared_Dirty: 0 kB +Private_Clean: 0 kB +Private_Dirty: 76 kB +Referenced: 76 kB +Anonymous: 76 kB +LazyFree: 0 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 0 kB +SwapPss: 0 kB +Locked: 0 kB +VmFlags: rd wr mr mw me ac sd +c000000000-c000400000 rw-p 00000000 00:00 0 +Size: 4096 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 2564 kB +Pss: 2564 kB +Shared_Clean: 0 kB +Shared_Dirty: 0 kB +Private_Clean: 20 kB +Private_Dirty: 2544 kB +Referenced: 2544 kB +Anonymous: 2564 kB +LazyFree: 0 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 1100 kB +SwapPss: 1100 kB +Locked: 0 kB +VmFlags: rd wr mr mw me ac sd +c000400000-c001600000 rw-p 00000000 00:00 0 +Size: 18432 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 16024 kB +Pss: 16024 kB +Shared_Clean: 0 kB +Shared_Dirty: 0 kB +Private_Clean: 5864 kB +Private_Dirty: 10160 kB +Referenced: 11944 kB +Anonymous: 16024 kB +LazyFree: 5848 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 440 kB +SwapPss: 440 kB +Locked: 0 kB +VmFlags: rd wr mr mw me ac sd nh +c001600000-c004000000 rw-p 00000000 00:00 0 +Size: 43008 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 0 kB +Pss: 0 kB +Shared_Clean: 0 kB +Shared_Dirty: 0 kB +Private_Clean: 0 kB +Private_Dirty: 0 kB +Referenced: 0 kB +Anonymous: 0 kB +LazyFree: 0 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 0 kB +SwapPss: 0 kB +Locked: 0 kB +VmFlags: rd wr mr mw me ac sd +7f0ab95ca000-7f0abbb7b000 rw-p 00000000 00:00 0 +Size: 38596 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 1992 kB +Pss: 1992 kB +Shared_Clean: 0 kB +Shared_Dirty: 0 kB +Private_Clean: 476 kB +Private_Dirty: 1516 kB +Referenced: 1828 kB +Anonymous: 1992 kB +LazyFree: 0 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 384 kB +SwapPss: 384 kB +Locked: 0 kB +VmFlags: rd wr mr mw me ac sd +7ffc07ecf000-7ffc07ef0000 rw-p 00000000 00:00 0 [stack] +Size: 132 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 8 kB +Pss: 8 kB +Shared_Clean: 0 kB +Shared_Dirty: 0 kB +Private_Clean: 0 kB +Private_Dirty: 8 kB +Referenced: 8 kB +Anonymous: 8 kB +LazyFree: 0 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 4 kB +SwapPss: 4 kB +Locked: 0 kB +VmFlags: rd wr mr mw me gd ac +7ffc07f9e000-7ffc07fa1000 r--p 00000000 00:00 0 [vvar] +Size: 12 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 0 kB +Pss: 0 kB +Shared_Clean: 0 kB +Shared_Dirty: 0 kB +Private_Clean: 0 kB +Private_Dirty: 0 kB +Referenced: 0 kB +Anonymous: 0 kB +LazyFree: 0 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 0 kB +SwapPss: 0 kB +Locked: 0 kB +VmFlags: rd mr pf io de dd sd +7ffc07fa1000-7ffc07fa3000 r-xp 00000000 00:00 0 [vdso] +Size: 8 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 4 kB +Pss: 0 kB +Shared_Clean: 4 kB +Shared_Dirty: 0 kB +Private_Clean: 0 kB +Private_Dirty: 0 kB +Referenced: 4 kB +Anonymous: 0 kB +LazyFree: 0 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 0 kB +SwapPss: 0 kB +Locked: 0 kB +VmFlags: rd ex mr mw me de sd +ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] +Size: 4 kB +KernelPageSize: 4 kB +MMUPageSize: 4 kB +Rss: 0 kB +Pss: 0 kB +Shared_Clean: 0 kB +Shared_Dirty: 0 kB +Private_Clean: 0 kB +Private_Dirty: 0 kB +Referenced: 0 kB +Anonymous: 0 kB +LazyFree: 0 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 0 kB +SwapPss: 0 kB +Locked: 0 kB +VmFlags: rd ex +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26231/smaps_rollup +Lines: 17 +00400000-ffffffffff601000 ---p 00000000 00:00 0 [rollup] +Rss: 29948 kB +Pss: 29944 kB +Shared_Clean: 4 kB +Shared_Dirty: 0 kB +Private_Clean: 15548 kB +Private_Dirty: 14396 kB +Referenced: 24752 kB +Anonymous: 20756 kB +LazyFree: 5848 kB +AnonHugePages: 0 kB +ShmemPmdMapped: 0 kB +Shared_Hugetlb: 0 kB +Private_Hugetlb: 0 kB +Swap: 1940 kB +SwapPss: 1940 kB +Locked: 0 kB +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26231/stat Lines: 1 26231 (vim) R 5392 7446 5392 34835 7446 4218880 32533 309516 26 82 1677 44 158 99 20 0 1 0 82375 56274944 1981 18446744073709551615 4194304 6294284 140736914091744 140736914087944 139965136429984 0 0 12288 1870679807 0 0 0 17 0 0 0 31 0 0 8391624 8481048 16420864 140736914093252 140736914093279 140736914093279 140736914096107 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/26232 +Path: fixtures/proc/26231/status +Lines: 53 + +Name: prometheus +Umask: 0022 +State: S (sleeping) +Tgid: 26231 +Ngid: 0 +Pid: 26231 +PPid: 1 +TracerPid: 0 +Uid: 1000 1000 1000 0 +Gid: 0 0 0 0 +FDSize: 128 +Groups: +NStgid: 1 +NSpid: 1 +NSpgid: 1 +NSsid: 1 +VmPeak: 58472 kB +VmSize: 58440 kB +VmLck: 0 kB +VmPin: 0 kB +VmHWM: 8028 kB +VmRSS: 6716 kB +RssAnon: 2092 kB +RssFile: 4624 kB +RssShmem: 0 kB +VmData: 2580 kB +VmStk: 136 kB +VmExe: 948 kB +VmLib: 6816 kB +VmPTE: 128 kB +VmPMD: 12 kB +VmSwap: 660 kB +HugetlbPages: 0 kB +Threads: 1 +SigQ: 8/63965 +SigPnd: 0000000000000000 +ShdPnd: 0000000000000000 +SigBlk: 7be3c0fe28014a03 +SigIgn: 0000000000001000 +SigCgt: 00000001800004ec +CapInh: 0000000000000000 +CapPrm: 0000003fffffffff +CapEff: 0000003fffffffff +CapBnd: 0000003fffffffff +CapAmb: 0000000000000000 +Seccomp: 0 +Cpus_allowed: ff +Cpus_allowed_list: 0-7 +Mems_allowed: 00000000,00000001 +Mems_allowed_list: 0 +voluntary_ctxt_switches: 4742839 +nonvoluntary_ctxt_switches: 1727500 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26231/wchan +Lines: 1 +poll_schedule_timeoutEOF +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc/26232 Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26232/cmdline +Path: fixtures/proc/26232/cmdline Lines: 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26232/comm +Path: fixtures/proc/26232/comm Lines: 1 ata_sff Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26232/cwd +Path: fixtures/proc/26232/cwd SymlinkTo: /does/not/exist # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/26232/fd +Directory: fixtures/proc/26232/fd Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26232/fd/0 +Path: fixtures/proc/26232/fd/0 SymlinkTo: ../../symlinktargets/abc # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26232/fd/1 +Path: fixtures/proc/26232/fd/1 SymlinkTo: ../../symlinktargets/def # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26232/fd/2 +Path: fixtures/proc/26232/fd/2 SymlinkTo: ../../symlinktargets/ghi # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26232/fd/3 +Path: fixtures/proc/26232/fd/3 SymlinkTo: ../../symlinktargets/uvw # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26232/fd/4 +Path: fixtures/proc/26232/fd/4 SymlinkTo: ../../symlinktargets/xyz # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26232/limits +Path: fixtures/proc/26232/limits Lines: 17 -Limit Soft Limit Hard Limit Units -Max cpu time unlimited unlimited seconds -Max file size unlimited unlimited bytes -Max data size unlimited unlimited bytes -Max stack size 8388608 unlimited bytes -Max core file size 0 unlimited bytes -Max resident set unlimited unlimited bytes -Max processes 29436 29436 processes -Max open files 1024 4096 files -Max locked memory 65536 65536 bytes -Max address space unlimited unlimited bytes -Max file locks unlimited unlimited locks -Max pending signals 29436 29436 signals -Max msgqueue size 819200 819200 bytes -Max nice priority 0 0 -Max realtime priority 0 0 -Max realtime timeout unlimited unlimited us +Limit Soft Limit Hard Limit Units +Max cpu time unlimited unlimited seconds +Max file size unlimited unlimited bytes +Max data size unlimited unlimited bytes +Max stack size 8388608 unlimited bytes +Max core file size 0 unlimited bytes +Max resident set unlimited unlimited bytes +Max processes 29436 29436 processes +Max open files 1024 4096 files +Max locked memory 65536 65536 bytes +Max address space unlimited unlimited bytes +Max file locks unlimited unlimited locks +Max pending signals 29436 29436 signals +Max msgqueue size 819200 819200 bytes +Max nice priority 0 0 +Max realtime priority 0 0 +Max realtime timeout unlimited unlimited us Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26232/root +Path: fixtures/proc/26232/maps +Lines: 9 +55680ae1e000-55680ae20000 r--p 00000000 fd:01 47316994 /bin/cat +55680ae29000-55680ae2a000 rwxs 0000a000 fd:01 47316994 /bin/cat +55680bed6000-55680bef7000 rw-p 00000000 00:00 0 [heap] +7fdf964fc000-7fdf973f2000 r--p 00000000 fd:01 17432624 /usr/lib/locale/locale-archive +7fdf973f2000-7fdf97417000 r--p 00000000 fd:01 60571062 /lib/x86_64-linux-gnu/libc-2.29.so +7ffe9215c000-7ffe9217f000 rw-p 00000000 00:00 0 [stack] +7ffe921da000-7ffe921dd000 r--p 00000000 00:00 0 [vvar] +7ffe921dd000-7ffe921de000 r-xp 00000000 00:00 0 [vdso] +ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0 [vsyscall] +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/26232/root SymlinkTo: /does/not/exist # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26232/stat +Path: fixtures/proc/26232/stat Lines: 1 33 (ata_sff) S 2 0 0 0 -1 69238880 0 0 0 0 0 0 0 0 0 -20 1 0 5 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 18446744073709551615 0 0 17 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/26233 +Path: fixtures/proc/26232/wchan +Lines: 1 +0EOF +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc/26233 Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/26233/cmdline +Path: fixtures/proc/26233/cmdline Lines: 1 com.github.uiautomatorNULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTEEOF Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/584 +Path: fixtures/proc/26233/schedstat +Lines: 8 + ____________________________________ +< this is a malformed schedstat file > + ------------------------------------ + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc/26234 Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/584/stat +Path: fixtures/proc/26234/maps +Lines: 4 +08048000-08089000 r-xp 00000000 03:01 104219 /bin/tcsh +08089000-0808c000 rw-p 00041000 03:01 104219 /bin/tcsh +0808c000-08146000 rwxp 00000000 00:00 0 +40000000-40015000 r-xp 00000000 03:01 61874 /lib/ld-2.3.2.so +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc/584 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/584/stat Lines: 2 1020 ((a b ) ( c d) ) R 28378 1020 28378 34842 1020 4218880 286 0 0 0 0 0 0 0 20 0 1 0 10839175 10395648 155 18446744073709551615 4194304 4238788 140736466511168 140736466511168 140609271124624 0 0 0 0 0 0 0 17 5 0 0 0 0 0 6336016 6337300 25579520 140736466515030 140736466515061 140736466515061 140736466518002 0 #!/bin/cat /proc/self/stat Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/buddyinfo -Mode: 755 -# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/buddyinfo/short -Mode: 755 -# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/buddyinfo/short/buddyinfo +Path: fixtures/proc/buddyinfo Lines: 3 -Node 0, zone -Node 0, zone -Node 0, zone +Node 0, zone DMA 1 0 1 0 2 1 1 0 1 1 3 +Node 0, zone DMA32 759 572 791 475 194 45 12 0 0 0 0 +Node 0, zone Normal 4381 1093 185 1530 567 102 4 0 0 0 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/buddyinfo/sizemismatch +Path: fixtures/proc/cpuinfo +Lines: 216 +processor : 0 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz +stepping : 10 +microcode : 0xb4 +cpu MHz : 799.998 +cache size : 8192 KB +physical id : 0 +siblings : 8 +core id : 0 +cpu cores : 4 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs +bogomips : 4224.00 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 1 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz +stepping : 10 +microcode : 0xb4 +cpu MHz : 800.037 +cache size : 8192 KB +physical id : 0 +siblings : 8 +core id : 1 +cpu cores : 4 +apicid : 2 +initial apicid : 2 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs +bogomips : 4224.00 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 2 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz +stepping : 10 +microcode : 0xb4 +cpu MHz : 800.010 +cache size : 8192 KB +physical id : 0 +siblings : 8 +core id : 2 +cpu cores : 4 +apicid : 4 +initial apicid : 4 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs +bogomips : 4224.00 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 3 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz +stepping : 10 +microcode : 0xb4 +cpu MHz : 800.028 +cache size : 8192 KB +physical id : 0 +siblings : 8 +core id : 3 +cpu cores : 4 +apicid : 6 +initial apicid : 6 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs +bogomips : 4224.00 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 4 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz +stepping : 10 +microcode : 0xb4 +cpu MHz : 799.989 +cache size : 8192 KB +physical id : 0 +siblings : 8 +core id : 0 +cpu cores : 4 +apicid : 1 +initial apicid : 1 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs +bogomips : 4224.00 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 5 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz +stepping : 10 +microcode : 0xb4 +cpu MHz : 800.083 +cache size : 8192 KB +physical id : 0 +siblings : 8 +core id : 1 +cpu cores : 4 +apicid : 3 +initial apicid : 3 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs +bogomips : 4224.00 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 6 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz +stepping : 10 +microcode : 0xb4 +cpu MHz : 800.017 +cache size : 8192 KB +physical id : 0 +siblings : 8 +core id : 2 +cpu cores : 4 +apicid : 5 +initial apicid : 5 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs +bogomips : 4224.00 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +processor : 7 +vendor_id : GenuineIntel +cpu family : 6 +model : 142 +model name : Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz +stepping : 10 +microcode : 0xb4 +cpu MHz : 800.030 +cache size : 8192 KB +physical id : 0 +siblings : 8 +core id : 3 +cpu cores : 4 +apicid : 7 +initial apicid : 7 +fpu : yes +fpu_exception : yes +cpuid level : 22 +wp : yes +flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d +bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs +bogomips : 4224.00 +clflush size : 64 +cache_alignment : 64 +address sizes : 39 bits physical, 48 bits virtual +power management: + +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/crypto +Lines: 972 +name : ccm(aes) +driver : ccm_base(ctr(aes-aesni),cbcmac(aes-aesni)) +module : ccm +priority : 300 +refcnt : 4 +selftest : passed +internal : no +type : aead +async : no +blocksize : 1 +ivsize : 16 +maxauthsize : 16 +geniv : + +name : cbcmac(aes) +driver : cbcmac(aes-aesni) +module : ccm +priority : 300 +refcnt : 7 +selftest : passed +internal : no +type : shash +blocksize : 1 +digestsize : 16 + +name : ecdh +driver : ecdh-generic +module : ecdh_generic +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : kpp +async : yes + +name : ecb(arc4) +driver : ecb(arc4)-generic +module : arc4 +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : skcipher +async : no +blocksize : 1 +min keysize : 1 +max keysize : 256 +ivsize : 0 +chunksize : 1 +walksize : 1 + +name : arc4 +driver : arc4-generic +module : arc4 +priority : 0 +refcnt : 3 +selftest : passed +internal : no +type : cipher +blocksize : 1 +min keysize : 1 +max keysize : 256 + +name : crct10dif +driver : crct10dif-pclmul +module : crct10dif_pclmul +priority : 200 +refcnt : 2 +selftest : passed +internal : no +type : shash +blocksize : 1 +digestsize : 2 + +name : crc32 +driver : crc32-pclmul +module : crc32_pclmul +priority : 200 +refcnt : 1 +selftest : passed +internal : no +type : shash +blocksize : 1 +digestsize : 4 + +name : __ghash +driver : cryptd(__ghash-pclmulqdqni) +module : kernel +priority : 50 +refcnt : 1 +selftest : passed +internal : yes +type : ahash +async : yes +blocksize : 16 +digestsize : 16 + +name : ghash +driver : ghash-clmulni +module : ghash_clmulni_intel +priority : 400 +refcnt : 1 +selftest : passed +internal : no +type : ahash +async : yes +blocksize : 16 +digestsize : 16 + +name : __ghash +driver : __ghash-pclmulqdqni +module : ghash_clmulni_intel +priority : 0 +refcnt : 1 +selftest : passed +internal : yes +type : shash +blocksize : 16 +digestsize : 16 + +name : crc32c +driver : crc32c-intel +module : crc32c_intel +priority : 200 +refcnt : 5 +selftest : passed +internal : no +type : shash +blocksize : 1 +digestsize : 4 + +name : cbc(aes) +driver : cbc(aes-aesni) +module : kernel +priority : 300 +refcnt : 1 +selftest : passed +internal : no +type : skcipher +async : no +blocksize : 16 +min keysize : 16 +max keysize : 32 +ivsize : 16 +chunksize : 16 +walksize : 16 + +name : ctr(aes) +driver : ctr(aes-aesni) +module : kernel +priority : 300 +refcnt : 5 +selftest : passed +internal : no +type : skcipher +async : no +blocksize : 1 +min keysize : 16 +max keysize : 32 +ivsize : 16 +chunksize : 16 +walksize : 16 + +name : pkcs1pad(rsa,sha256) +driver : pkcs1pad(rsa-generic,sha256) +module : kernel +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : akcipher + +name : __xts(aes) +driver : cryptd(__xts-aes-aesni) +module : kernel +priority : 451 +refcnt : 1 +selftest : passed +internal : yes +type : skcipher +async : yes +blocksize : 16 +min keysize : 32 +max keysize : 64 +ivsize : 16 +chunksize : 16 +walksize : 16 + +name : xts(aes) +driver : xts-aes-aesni +module : kernel +priority : 401 +refcnt : 1 +selftest : passed +internal : no +type : skcipher +async : yes +blocksize : 16 +min keysize : 32 +max keysize : 64 +ivsize : 16 +chunksize : 16 +walksize : 16 + +name : __ctr(aes) +driver : cryptd(__ctr-aes-aesni) +module : kernel +priority : 450 +refcnt : 1 +selftest : passed +internal : yes +type : skcipher +async : yes +blocksize : 1 +min keysize : 16 +max keysize : 32 +ivsize : 16 +chunksize : 16 +walksize : 16 + +name : ctr(aes) +driver : ctr-aes-aesni +module : kernel +priority : 400 +refcnt : 1 +selftest : passed +internal : no +type : skcipher +async : yes +blocksize : 1 +min keysize : 16 +max keysize : 32 +ivsize : 16 +chunksize : 16 +walksize : 16 + +name : __cbc(aes) +driver : cryptd(__cbc-aes-aesni) +module : kernel +priority : 450 +refcnt : 1 +selftest : passed +internal : yes +type : skcipher +async : yes +blocksize : 16 +min keysize : 16 +max keysize : 32 +ivsize : 16 +chunksize : 16 +walksize : 16 + +name : cbc(aes) +driver : cbc-aes-aesni +module : kernel +priority : 400 +refcnt : 1 +selftest : passed +internal : no +type : skcipher +async : yes +blocksize : 16 +min keysize : 16 +max keysize : 32 +ivsize : 16 +chunksize : 16 +walksize : 16 + +name : __ecb(aes) +driver : cryptd(__ecb-aes-aesni) +module : kernel +priority : 450 +refcnt : 1 +selftest : passed +internal : yes +type : skcipher +async : yes +blocksize : 16 +min keysize : 16 +max keysize : 32 +ivsize : 0 +chunksize : 16 +walksize : 16 + +name : ecb(aes) +driver : ecb-aes-aesni +module : kernel +priority : 400 +refcnt : 1 +selftest : passed +internal : no +type : skcipher +async : yes +blocksize : 16 +min keysize : 16 +max keysize : 32 +ivsize : 0 +chunksize : 16 +walksize : 16 + +name : __generic-gcm-aes-aesni +driver : cryptd(__driver-generic-gcm-aes-aesni) +module : kernel +priority : 50 +refcnt : 1 +selftest : passed +internal : yes +type : aead +async : yes +blocksize : 1 +ivsize : 12 +maxauthsize : 16 +geniv : + +name : gcm(aes) +driver : generic-gcm-aesni +module : kernel +priority : 400 +refcnt : 1 +selftest : passed +internal : no +type : aead +async : yes +blocksize : 1 +ivsize : 12 +maxauthsize : 16 +geniv : + +name : __generic-gcm-aes-aesni +driver : __driver-generic-gcm-aes-aesni +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : yes +type : aead +async : no +blocksize : 1 +ivsize : 12 +maxauthsize : 16 +geniv : + +name : __gcm-aes-aesni +driver : cryptd(__driver-gcm-aes-aesni) +module : kernel +priority : 50 +refcnt : 1 +selftest : passed +internal : yes +type : aead +async : yes +blocksize : 1 +ivsize : 8 +maxauthsize : 16 +geniv : + +name : rfc4106(gcm(aes)) +driver : rfc4106-gcm-aesni +module : kernel +priority : 400 +refcnt : 1 +selftest : passed +internal : no +type : aead +async : yes +blocksize : 1 +ivsize : 8 +maxauthsize : 16 +geniv : + +name : __gcm-aes-aesni +driver : __driver-gcm-aes-aesni +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : yes +type : aead +async : no +blocksize : 1 +ivsize : 8 +maxauthsize : 16 +geniv : + +name : __xts(aes) +driver : __xts-aes-aesni +module : kernel +priority : 401 +refcnt : 1 +selftest : passed +internal : yes +type : skcipher +async : no +blocksize : 16 +min keysize : 32 +max keysize : 64 +ivsize : 16 +chunksize : 16 +walksize : 16 + +name : __ctr(aes) +driver : __ctr-aes-aesni +module : kernel +priority : 400 +refcnt : 1 +selftest : passed +internal : yes +type : skcipher +async : no +blocksize : 1 +min keysize : 16 +max keysize : 32 +ivsize : 16 +chunksize : 16 +walksize : 16 + +name : __cbc(aes) +driver : __cbc-aes-aesni +module : kernel +priority : 400 +refcnt : 1 +selftest : passed +internal : yes +type : skcipher +async : no +blocksize : 16 +min keysize : 16 +max keysize : 32 +ivsize : 16 +chunksize : 16 +walksize : 16 + +name : __ecb(aes) +driver : __ecb-aes-aesni +module : kernel +priority : 400 +refcnt : 1 +selftest : passed +internal : yes +type : skcipher +async : no +blocksize : 16 +min keysize : 16 +max keysize : 32 +ivsize : 0 +chunksize : 16 +walksize : 16 + +name : __aes +driver : __aes-aesni +module : kernel +priority : 300 +refcnt : 1 +selftest : passed +internal : yes +type : cipher +blocksize : 16 +min keysize : 16 +max keysize : 32 + +name : aes +driver : aes-aesni +module : kernel +priority : 300 +refcnt : 8 +selftest : passed +internal : no +type : cipher +blocksize : 16 +min keysize : 16 +max keysize : 32 + +name : hmac(sha1) +driver : hmac(sha1-generic) +module : kernel +priority : 100 +refcnt : 9 +selftest : passed +internal : no +type : shash +blocksize : 64 +digestsize : 20 + +name : ghash +driver : ghash-generic +module : kernel +priority : 100 +refcnt : 3 +selftest : passed +internal : no +type : shash +blocksize : 16 +digestsize : 16 + +name : jitterentropy_rng +driver : jitterentropy_rng +module : kernel +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_nopr_hmac_sha256 +module : kernel +priority : 221 +refcnt : 2 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_nopr_hmac_sha512 +module : kernel +priority : 220 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_nopr_hmac_sha384 +module : kernel +priority : 219 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_nopr_hmac_sha1 +module : kernel +priority : 218 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_nopr_sha256 +module : kernel +priority : 217 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_nopr_sha512 +module : kernel +priority : 216 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_nopr_sha384 +module : kernel +priority : 215 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_nopr_sha1 +module : kernel +priority : 214 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_nopr_ctr_aes256 +module : kernel +priority : 213 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_nopr_ctr_aes192 +module : kernel +priority : 212 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_nopr_ctr_aes128 +module : kernel +priority : 211 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : hmac(sha256) +driver : hmac(sha256-generic) +module : kernel +priority : 100 +refcnt : 10 +selftest : passed +internal : no +type : shash +blocksize : 64 +digestsize : 32 + +name : stdrng +driver : drbg_pr_hmac_sha256 +module : kernel +priority : 210 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_pr_hmac_sha512 +module : kernel +priority : 209 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_pr_hmac_sha384 +module : kernel +priority : 208 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_pr_hmac_sha1 +module : kernel +priority : 207 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_pr_sha256 +module : kernel +priority : 206 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_pr_sha512 +module : kernel +priority : 205 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_pr_sha384 +module : kernel +priority : 204 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_pr_sha1 +module : kernel +priority : 203 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_pr_ctr_aes256 +module : kernel +priority : 202 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_pr_ctr_aes192 +module : kernel +priority : 201 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : stdrng +driver : drbg_pr_ctr_aes128 +module : kernel +priority : 200 +refcnt : 1 +selftest : passed +internal : no +type : rng +seedsize : 0 + +name : 842 +driver : 842-scomp +module : kernel +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : scomp + +name : 842 +driver : 842-generic +module : kernel +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : compression + +name : lzo-rle +driver : lzo-rle-scomp +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : no +type : scomp + +name : lzo-rle +driver : lzo-rle-generic +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : no +type : compression + +name : lzo +driver : lzo-scomp +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : no +type : scomp + +name : lzo +driver : lzo-generic +module : kernel +priority : 0 +refcnt : 9 +selftest : passed +internal : no +type : compression + +name : crct10dif +driver : crct10dif-generic +module : kernel +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : shash +blocksize : 1 +digestsize : 2 + +name : crc32c +driver : crc32c-generic +module : kernel +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : shash +blocksize : 1 +digestsize : 4 + +name : zlib-deflate +driver : zlib-deflate-scomp +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : no +type : scomp + +name : deflate +driver : deflate-scomp +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : no +type : scomp + +name : deflate +driver : deflate-generic +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : no +type : compression + +name : aes +driver : aes-generic +module : kernel +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : cipher +blocksize : 16 +min keysize : 16 +max keysize : 32 + +name : sha224 +driver : sha224-generic +module : kernel +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : shash +blocksize : 64 +digestsize : 28 + +name : sha256 +driver : sha256-generic +module : kernel +priority : 100 +refcnt : 11 +selftest : passed +internal : no +type : shash +blocksize : 64 +digestsize : 32 + +name : sha1 +driver : sha1-generic +module : kernel +priority : 100 +refcnt : 11 +selftest : passed +internal : no +type : shash +blocksize : 64 +digestsize : 20 + +name : md5 +driver : md5-generic +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : no +type : shash +blocksize : 64 +digestsize : 16 + +name : ecb(cipher_null) +driver : ecb-cipher_null +module : kernel +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : skcipher +async : no +blocksize : 1 +min keysize : 0 +max keysize : 0 +ivsize : 0 +chunksize : 1 +walksize : 1 + +name : digest_null +driver : digest_null-generic +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : no +type : shash +blocksize : 1 +digestsize : 0 + +name : compress_null +driver : compress_null-generic +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : no +type : compression + +name : cipher_null +driver : cipher_null-generic +module : kernel +priority : 0 +refcnt : 1 +selftest : passed +internal : no +type : cipher +blocksize : 1 +min keysize : 0 +max keysize : 0 + +name : rsa +driver : rsa-generic +module : kernel +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : akcipher + +name : dh +driver : dh-generic +module : kernel +priority : 100 +refcnt : 1 +selftest : passed +internal : no +type : kpp + +name : aes +driver : aes-asm +module : kernel +priority : 200 +refcnt : 1 +selftest : passed +internal : no +type : cipher +blocksize : 16 +min keysize : 16 +max keysize : 32 + +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/diskstats +Lines: 52 + 1 0 ram0 0 0 0 0 0 0 0 0 0 0 0 + 1 1 ram1 0 0 0 0 0 0 0 0 0 0 0 + 1 2 ram2 0 0 0 0 0 0 0 0 0 0 0 + 1 3 ram3 0 0 0 0 0 0 0 0 0 0 0 + 1 4 ram4 0 0 0 0 0 0 0 0 0 0 0 + 1 5 ram5 0 0 0 0 0 0 0 0 0 0 0 + 1 6 ram6 0 0 0 0 0 0 0 0 0 0 0 + 1 7 ram7 0 0 0 0 0 0 0 0 0 0 0 + 1 8 ram8 0 0 0 0 0 0 0 0 0 0 0 + 1 9 ram9 0 0 0 0 0 0 0 0 0 0 0 + 1 10 ram10 0 0 0 0 0 0 0 0 0 0 0 + 1 11 ram11 0 0 0 0 0 0 0 0 0 0 0 + 1 12 ram12 0 0 0 0 0 0 0 0 0 0 0 + 1 13 ram13 0 0 0 0 0 0 0 0 0 0 0 + 1 14 ram14 0 0 0 0 0 0 0 0 0 0 0 + 1 15 ram15 0 0 0 0 0 0 0 0 0 0 0 + 7 0 loop0 0 0 0 0 0 0 0 0 0 0 0 + 7 1 loop1 0 0 0 0 0 0 0 0 0 0 0 + 7 2 loop2 0 0 0 0 0 0 0 0 0 0 0 + 7 3 loop3 0 0 0 0 0 0 0 0 0 0 0 + 7 4 loop4 0 0 0 0 0 0 0 0 0 0 0 + 7 5 loop5 0 0 0 0 0 0 0 0 0 0 0 + 7 6 loop6 0 0 0 0 0 0 0 0 0 0 0 + 7 7 loop7 0 0 0 0 0 0 0 0 0 0 0 + 8 0 sda 25354637 34367663 1003346126 18492372 28444756 11134226 505697032 63877960 0 9653880 82621804 + 8 1 sda1 250 0 2000 36 0 0 0 0 0 36 36 + 8 2 sda2 246 0 1968 32 0 0 0 0 0 32 32 + 8 3 sda3 340 13 2818 52 11 8 152 8 0 56 60 + 8 4 sda4 25353629 34367650 1003337964 18492232 27448755 11134218 505696880 61593380 0 7576432 80332428 + 252 0 dm-0 59910002 0 1003337218 46229572 39231014 0 505696880 1158557800 0 11325968 1206301256 + 252 1 dm-1 388 0 3104 84 74 0 592 0 0 76 84 + 252 2 dm-2 11571 0 308350 6536 153522 0 5093416 122884 0 65400 129416 + 252 3 dm-3 3870 0 3870 104 0 0 0 0 0 16 104 + 252 4 dm-4 392 0 1034 28 38 0 137 16 0 24 44 + 252 5 dm-5 3729 0 84279 924 98918 0 1151688 104684 0 58848 105632 + 179 0 mmcblk0 192 3 1560 156 0 0 0 0 0 136 156 + 179 1 mmcblk0p1 17 3 160 24 0 0 0 0 0 24 24 + 179 2 mmcblk0p2 95 0 760 68 0 0 0 0 0 68 68 + 2 0 fd0 2 0 16 80 0 0 0 0 0 80 80 + 254 0 vda 1775784 15386 32670882 8655768 6038856 20711856 213637440 2069221364 0 41614592 2077872228 + 254 1 vda1 668 85 5984 956 207 4266 35784 32772 0 8808 33720 + 254 2 vda2 1774936 15266 32663262 8654692 5991028 20707590 213601656 2069152216 0 41607628 2077801992 + 11 0 sr0 0 0 0 0 0 0 0 0 0 0 0 + 259 0 nvme0n1 47114 4 4643973 21650 1078320 43950 39451633 1011053 0 222766 1032546 + 259 1 nvme0n1p1 1140 0 9370 16 1 0 1 0 0 16 16 + 259 2 nvme0n1p2 45914 4 4631243 21626 1036885 43950 39451632 919480 0 131580 940970 + 8 0 sdb 326552 841 9657779 84 41822 2895 1972905 5007 0 60730 67070 68851 0 1925173784 11130 + 8 1 sdb1 231 3 34466 4 24 23 106 0 0 64 64 0 0 0 0 + 8 2 sdb2 326310 838 9622281 67 40726 2872 1972799 4924 0 58250 64567 68851 0 1925173784 11130 + 8 0 sdc 14202 71 579164 21861 2995 1589 180500 40875 0 11628 55200 0 0 0 0 127 182 + 8 1 sdc1 1027 0 13795 5021 2 0 4096 3 0 690 4579 0 0 0 0 0 0 + 8 2 sdc2 13126 71 561749 16802 2830 1589 176404 40620 0 10931 50449 0 0 0 0 0 0 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc/fs Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/buddyinfo/sizemismatch/buddyinfo -Lines: 3 -Node 0, zone DMA 1 0 1 0 2 1 1 0 1 1 3 -Node 0, zone DMA32 759 572 791 475 194 45 12 0 0 0 0 0 -Node 0, zone Normal 4381 1093 185 1530 567 102 4 0 0 0 +Directory: fixtures/proc/fs/fscache +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/fs/fscache/stats +Lines: 24 +FS-Cache statistics +Cookies: idx=3 dat=67877 spc=0 +Objects: alc=67473 nal=0 avl=67473 ded=388 +ChkAux : non=12 ok=33 upd=44 obs=55 +Pages : mrk=547164 unc=364577 +Acquire: n=67880 nul=98 noc=25 ok=67780 nbf=39 oom=26 +Lookups: n=67473 neg=67470 pos=58 crt=67473 tmo=85 +Invals : n=14 run=13 +Updates: n=7 nul=3 run=8 +Relinqs: n=394 nul=1 wcr=2 rtr=3 +AttrChg: n=6 ok=5 nbf=4 oom=3 run=2 +Allocs : n=20 ok=19 wt=18 nbf=17 int=16 +Allocs : ops=15 owt=14 abt=13 +Retrvls: n=151959 ok=82823 wt=23467 nod=69136 nbf=15 int=69 oom=43 +Retrvls: ops=151959 owt=42747 abt=44 +Stores : n=225565 ok=225565 agn=12 nbf=13 oom=14 +Stores : ops=69156 run=294721 pgs=225565 rxd=225565 olm=43 +VmScan : nos=364512 gon=2 bsy=43 can=12 wt=66 +Ops : pend=42753 run=221129 enq=628798 can=11 rej=88 +Ops : ini=377538 dfr=27 rel=377538 gc=37 +CacheOp: alo=1 luo=2 luc=3 gro=4 +CacheOp: inv=5 upo=6 dro=7 pto=8 atc=9 syn=10 +CacheOp: rap=11 ras=12 alp=13 als=14 wrp=15 ucp=16 dsp=17 +CacheEv: nsp=18 stl=19 rtr=20 cul=21EOF Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/buddyinfo/valid +Directory: fixtures/proc/fs/xfs Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/buddyinfo/valid/buddyinfo -Lines: 3 -Node 0, zone DMA 1 0 1 0 2 1 1 0 1 1 3 -Node 0, zone DMA32 759 572 791 475 194 45 12 0 0 0 0 -Node 0, zone Normal 4381 1093 185 1530 567 102 4 0 0 0 0 -Mode: 644 -# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/fs -Mode: 755 -# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/fs/xfs -Mode: 755 -# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/fs/xfs/stat +Path: fixtures/proc/fs/xfs/stat Lines: 23 extent_alloc 92447 97589 92448 93751 abt 0 0 0 0 @@ -267,40 +1960,127 @@ xpc 399724544 92823103 86219234 debug 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/mdstat -Lines: 26 +Path: fixtures/proc/loadavg +Lines: 1 +0.02 0.04 0.05 1/497 11947 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/mdstat +Lines: 56 Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] -md3 : active raid6 sda1[8] sdh1[7] sdg1[6] sdf1[5] sde1[11] sdd1[3] sdc1[10] sdb1[9] + +md3 : active raid6 sda1[8] sdh1[7] sdg1[6] sdf1[5] sde1[11] sdd1[3] sdc1[10] sdb1[9] sdd1[10](S) sdd2[11](S) 5853468288 blocks super 1.2 level 6, 64k chunk, algorithm 2 [8/8] [UUUUUUUU] - + md127 : active raid1 sdi2[0] sdj2[1] 312319552 blocks [2/2] [UU] - -md0 : active raid1 sdk[2](S) sdi1[0] sdj1[1] + +md0 : active raid1 sdi1[0] sdj1[1] 248896 blocks [2/2] [UU] - -md4 : inactive raid1 sda3[0] sdb3[1] + +md4 : inactive raid1 sda3[0](F) sdb3[1](S) 4883648 blocks [2/2] [UU] -md6 : active raid1 sdb2[2] sda2[0] +md6 : active raid1 sdb2[2](F) sdc[1](S) sda2[0] 195310144 blocks [2/1] [U_] [=>...................] recovery = 8.5% (16775552/195310144) finish=17.0min speed=259783K/sec -md8 : active raid1 sdb1[1] sda1[0] +md8 : active raid1 sdb1[1] sda1[0] sdc[2](S) sde[3](S) 195310144 blocks [2/2] [UU] [=>...................] resync = 8.5% (16775552/195310144) finish=17.0min speed=259783K/sec -md7 : active raid6 sdb1[0] sde1[3] sdd1[2] sdc1[1] +md7 : active raid6 sdb1[0] sde1[3] sdd1[2] sdc1[1](F) 7813735424 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/3] [U_UU] bitmap: 0/30 pages [0KB], 65536KB chunk +md9 : active raid1 sdc2[2] sdd2[3] sdb2[1] sda2[0] sde[4](F) sdf[5](F) sdg[6](S) + 523968 blocks super 1.2 [4/4] [UUUU] + resync=DELAYED + +md10 : active raid0 sda1[0] sdb1[1] + 314159265 blocks 64k chunks + +md11 : active (auto-read-only) raid1 sdb2[0] sdc2[1] sdc3[2](F) hda[4](S) ssdc2[3](S) + 4190208 blocks super 1.2 [2/2] [UU] + resync=PENDING + +md12 : active raid0 sdc2[0] sdd2[1] + 3886394368 blocks super 1.2 512k chunks + +md126 : active raid0 sdb[1] sdc[0] + 1855870976 blocks super external:/md127/0 128k chunks + +md219 : inactive sdb[2](S) sdc[1](S) sda[0](S) + 7932 blocks super external:imsm + +md00 : active raid0 xvdb[0] + 4186624 blocks super 1.2 256k chunks + +md120 : active linear sda1[1] sdb1[0] + 2095104 blocks super 1.2 0k rounding + +md101 : active (read-only) raid0 sdb[2] sdd[1] sdc[0] + 322560 blocks super 1.2 512k chunks + unused devices: Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/net +Path: fixtures/proc/meminfo +Lines: 42 +MemTotal: 15666184 kB +MemFree: 440324 kB +Buffers: 1020128 kB +Cached: 12007640 kB +SwapCached: 0 kB +Active: 6761276 kB +Inactive: 6532708 kB +Active(anon): 267256 kB +Inactive(anon): 268 kB +Active(file): 6494020 kB +Inactive(file): 6532440 kB +Unevictable: 0 kB +Mlocked: 0 kB +SwapTotal: 0 kB +SwapFree: 0 kB +Dirty: 768 kB +Writeback: 0 kB +AnonPages: 266216 kB +Mapped: 44204 kB +Shmem: 1308 kB +Slab: 1807264 kB +SReclaimable: 1738124 kB +SUnreclaim: 69140 kB +KernelStack: 1616 kB +PageTables: 5288 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 7833092 kB +Committed_AS: 530844 kB +VmallocTotal: 34359738367 kB +VmallocUsed: 36596 kB +VmallocChunk: 34359637840 kB +HardwareCorrupted: 0 kB +AnonHugePages: 12288 kB +HugePages_Total: 0 +HugePages_Free: 0 +HugePages_Rsvd: 0 +HugePages_Surp: 0 +Hugepagesize: 2048 kB +DirectMap4k: 91136 kB +DirectMap2M: 16039936 kB +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc/net Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/net/dev +Path: fixtures/proc/net/arp +Lines: 2 +IP address HW type Flags HW address Mask Device +192.168.224.1 0x1 0x2 00:50:56:c0:00:08 * ens33 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/net/dev Lines: 6 Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed @@ -310,7 +2090,7 @@ docker0: 2568 38 0 0 0 0 0 0 438 eth0: 874354587 1036395 0 0 0 0 0 0 563352563 732147 0 0 0 0 0 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/net/ip_vs +Path: fixtures/proc/net/ip_vs Lines: 21 IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags @@ -335,7 +2115,7 @@ FWM 10001000 wlc -> C0A83215:0CEA Route 0 0 2 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/net/ip_vs_stats +Path: fixtures/proc/net/ip_vs_stats Lines: 6 Total Incoming Outgoing Incoming Outgoing Conns Packets Packets Bytes Bytes @@ -345,10 +2125,10 @@ Lines: 6 4 1FB3C 0 1282A8F 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/net/rpc +Directory: fixtures/proc/net/rpc Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/net/rpc/nfs +Path: fixtures/proc/net/rpc/nfs Lines: 5 net 18628 0 18628 6 rpc 4329785 0 4338291 @@ -357,7 +2137,7 @@ proc3 22 1 4084749 29200 94754 32580 186 47747 7981 8639 0 6356 0 6962 0 7958 0 proc4 61 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/net/rpc/nfsd +Path: fixtures/proc/net/rpc/nfsd Lines: 11 rc 0 6 18622 fh 0 0 0 0 0 @@ -372,7 +2152,78 @@ proc4 2 2 10853 proc4ops 72 0 0 0 1098 2 0 0 0 0 8179 5896 0 0 0 0 5900 0 0 2 0 2 0 9609 0 2 150 1272 0 0 0 1236 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/net/xfrm_stat +Path: fixtures/proc/net/sockstat +Lines: 6 +sockets: used 1602 +TCP: inuse 35 orphan 0 tw 4 alloc 59 mem 22 +UDP: inuse 12 mem 62 +UDPLITE: inuse 0 +RAW: inuse 0 +FRAG: inuse 0 memory 0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/net/sockstat6 +Lines: 5 +TCP6: inuse 17 +UDP6: inuse 9 +UDPLITE6: inuse 0 +RAW6: inuse 1 +FRAG6: inuse 0 memory 0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/net/softnet_stat +Lines: 2 +00015c73 00020e76 F0000769 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 +01663fb2 00000000 000109a4 00000000 00000000 00000000 00000000 00000000 00000000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/net/softnet_stat.broken +Lines: 1 +00015c73 00020e76 F0000769 00000000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/net/udp +Lines: 4 + sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode + 0: 0A000005:0016 00000000:0000 0A 00000000:00000001 00:00000000 00000000 0 0 2740 1 ffff88003d3af3c0 100 0 0 10 0 + 1: 00000000:0016 00000000:0000 0A 00000001:00000000 00:00000000 00000000 0 0 2740 1 ffff88003d3af3c0 100 0 0 10 0 + 2: 00000000:0016 00000000:0000 0A 00000001:00000001 00:00000000 00000000 0 0 2740 1 ffff88003d3af3c0 100 0 0 10 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/net/udp6 +Lines: 3 + sl local_address remote_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops + 1315: 00000000000000000000000000000000:14EB 00000000000000000000000000000000:0000 07 00000000:00000000 00:00000000 00000000 981 0 21040 2 0000000013726323 0 + 6073: 000080FE00000000FFADE15609667CFE:C781 00000000000000000000000000000000:0000 07 00000000:00000000 00:00000000 00000000 1000 0 11337031 2 00000000b9256fdd 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/net/udp_broken +Lines: 2 + sl local_address rem_address st + 1: 00000000:0016 00000000:0000 0A +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/net/unix +Lines: 6 +Num RefCount Protocol Flags Type St Inode Path +0000000000000000: 00000002 00000000 00010000 0001 01 3442596 /var/run/postgresql/.s.PGSQL.5432 +0000000000000000: 0000000a 00000000 00010000 0005 01 10061 /run/udev/control +0000000000000000: 00000007 00000000 00000000 0002 01 12392 /dev/log +0000000000000000: 00000003 00000000 00000000 0001 03 4787297 /var/run/postgresql/.s.PGSQL.5432 +0000000000000000: 00000003 00000000 00000000 0001 03 5091797 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/net/unix_without_inode +Lines: 6 +Num RefCount Protocol Flags Type St Path +0000000000000000: 00000002 00000000 00010000 0001 01 /var/run/postgresql/.s.PGSQL.5432 +0000000000000000: 0000000a 00000000 00010000 0005 01 /run/udev/control +0000000000000000: 00000007 00000000 00000000 0002 01 /dev/log +0000000000000000: 00000003 00000000 00000000 0001 03 /var/run/postgresql/.s.PGSQL.5432 +0000000000000000: 00000003 00000000 00000000 0001 03 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/net/xfrm_stat Lines: 28 XfrmInError 1 XfrmInBufferError 2 @@ -404,10 +2255,40 @@ XfrmOutStateInvalid 28765 XfrmAcquireError 24532 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/self +Directory: fixtures/proc/pressure +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/pressure/cpu +Lines: 1 +some avg10=0.10 avg60=2.00 avg300=3.85 total=15 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/pressure/io +Lines: 2 +some avg10=0.10 avg60=2.00 avg300=3.85 total=15 +full avg10=0.20 avg60=3.00 avg300=4.95 total=25 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/pressure/memory +Lines: 2 +some avg10=0.10 avg60=2.00 avg300=3.85 total=15 +full avg10=0.20 avg60=3.00 avg300=4.95 total=25 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/schedstat +Lines: 6 +version 15 +timestamp 15819019232 +cpu0 498494191 0 3533438552 2553969831 3853684107 2465731542 2045936778163039 343796328169361 4767485306 +domain0 00000000,00000003 212499247 210112015 1861015 1860405436 536440 369895 32599 210079416 25368550 24241256 384652 927363878 807233 6366 1647 24239609 2122447165 1886868564 121112060 2848625533 125678146 241025 1032026 1885836538 2545 12 2533 0 0 0 0 0 0 1387952561 21076581 0 +cpu1 518377256 0 4155211005 2778589869 10466382 2867629021 1904686152592476 364107263788241 5145567945 +domain0 00000000,00000003 217653037 215526982 1577949 1580427380 557469 393576 28538 215498444 28721913 27662819 371153 870843407 745912 5523 1639 27661180 2331056874 2107732788 111442342 652402556 123615235 196159 1045245 2106687543 2400 3 2397 0 0 0 0 0 0 1437804657 26220076 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/self SymlinkTo: 26231 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/stat +Path: fixtures/proc/stat Lines: 16 cpu 301854 612 111922 8979004 3552 2 3944 0 0 0 cpu0 44490 19 21045 1087069 220 1 3410 0 0 0 @@ -427,36 +2308,3807 @@ procs_blocked 1 softirq 5057579 250191 1481983 1647 211099 186066 0 1783454 622196 12499 508444 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Directory: fixtures/symlinktargets +Path: fixtures/proc/swaps +Lines: 2 +Filename Type Size Used Priority +/dev/dm-2 partition 131068 176 -2 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc/symlinktargets Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/symlinktargets/README +Path: fixtures/proc/symlinktargets/README Lines: 2 This directory contains some empty files that are the symlinks the files in the "fd" directory point to. They are otherwise ignored by the tests Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/symlinktargets/abc +Path: fixtures/proc/symlinktargets/abc Lines: 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/symlinktargets/def +Path: fixtures/proc/symlinktargets/def Lines: 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/symlinktargets/ghi +Path: fixtures/proc/symlinktargets/ghi Lines: 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/symlinktargets/uvw +Path: fixtures/proc/symlinktargets/uvw Lines: 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/symlinktargets/xyz +Path: fixtures/proc/symlinktargets/xyz Lines: 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Path: fixtures/.unpacked -Lines: 0 +Directory: fixtures/proc/sys +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc/sys/kernel +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc/sys/kernel/random +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/kernel/random/entropy_avail +Lines: 1 +3943 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/kernel/random/poolsize +Lines: 1 +4096 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/kernel/random/urandom_min_reseed_secs +Lines: 1 +60 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/kernel/random/write_wakeup_threshold +Lines: 1 +3072 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/proc/sys/vm +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/admin_reserve_kbytes +Lines: 1 +8192 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/block_dump +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/compact_unevictable_allowed +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/dirty_background_bytes +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/dirty_background_ratio +Lines: 1 +10 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/dirty_bytes +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/dirty_expire_centisecs +Lines: 1 +3000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/dirty_ratio +Lines: 1 +20 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/dirty_writeback_centisecs +Lines: 1 +500 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/dirtytime_expire_seconds +Lines: 1 +43200 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/drop_caches +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/extfrag_threshold +Lines: 1 +500 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/hugetlb_shm_group +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/laptop_mode +Lines: 1 +5 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/legacy_va_layout +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/lowmem_reserve_ratio +Lines: 1 +256 256 32 0 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/max_map_count +Lines: 1 +65530 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/memory_failure_early_kill +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/memory_failure_recovery +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/min_free_kbytes +Lines: 1 +67584 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/min_slab_ratio +Lines: 1 +5 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/min_unmapped_ratio +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/mmap_min_addr +Lines: 1 +65536 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/nr_hugepages +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/nr_hugepages_mempolicy +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/nr_overcommit_hugepages +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/numa_stat +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/numa_zonelist_order +Lines: 1 +Node +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/oom_dump_tasks +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/oom_kill_allocating_task +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/overcommit_kbytes +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/overcommit_memory +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/overcommit_ratio +Lines: 1 +50 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/page-cluster +Lines: 1 +3 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/panic_on_oom +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/percpu_pagelist_fraction +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/stat_interval +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/swappiness +Lines: 1 +60 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/user_reserve_kbytes +Lines: 1 +131072 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/vfs_cache_pressure +Lines: 1 +100 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/watermark_boost_factor +Lines: 1 +15000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/watermark_scale_factor +Lines: 1 +10 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/sys/vm/zone_reclaim_mode +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/proc/zoneinfo +Lines: 262 +Node 0, zone DMA + per-node stats + nr_inactive_anon 230981 + nr_active_anon 547580 + nr_inactive_file 316904 + nr_active_file 346282 + nr_unevictable 115467 + nr_slab_reclaimable 131220 + nr_slab_unreclaimable 47320 + nr_isolated_anon 0 + nr_isolated_file 0 + workingset_nodes 11627 + workingset_refault 466886 + workingset_activate 276925 + workingset_restore 84055 + workingset_nodereclaim 487 + nr_anon_pages 795576 + nr_mapped 215483 + nr_file_pages 761874 + nr_dirty 908 + nr_writeback 0 + nr_writeback_temp 0 + nr_shmem 224925 + nr_shmem_hugepages 0 + nr_shmem_pmdmapped 0 + nr_anon_transparent_hugepages 0 + nr_unstable 0 + nr_vmscan_write 12950 + nr_vmscan_immediate_reclaim 3033 + nr_dirtied 8007423 + nr_written 7752121 + nr_kernel_misc_reclaimable 0 + pages free 3952 + min 33 + low 41 + high 49 + spanned 4095 + present 3975 + managed 3956 + protection: (0, 2877, 7826, 7826, 7826) + nr_free_pages 3952 + nr_zone_inactive_anon 0 + nr_zone_active_anon 0 + nr_zone_inactive_file 0 + nr_zone_active_file 0 + nr_zone_unevictable 0 + nr_zone_write_pending 0 + nr_mlock 0 + nr_page_table_pages 0 + nr_kernel_stack 0 + nr_bounce 0 + nr_zspages 0 + nr_free_cma 0 + numa_hit 1 + numa_miss 0 + numa_foreign 0 + numa_interleave 0 + numa_local 1 + numa_other 0 + pagesets + cpu: 0 + count: 0 + high: 0 + batch: 1 + vm stats threshold: 8 + cpu: 1 + count: 0 + high: 0 + batch: 1 + vm stats threshold: 8 + cpu: 2 + count: 0 + high: 0 + batch: 1 + vm stats threshold: 8 + cpu: 3 + count: 0 + high: 0 + batch: 1 + vm stats threshold: 8 + cpu: 4 + count: 0 + high: 0 + batch: 1 + vm stats threshold: 8 + cpu: 5 + count: 0 + high: 0 + batch: 1 + vm stats threshold: 8 + cpu: 6 + count: 0 + high: 0 + batch: 1 + vm stats threshold: 8 + cpu: 7 + count: 0 + high: 0 + batch: 1 + vm stats threshold: 8 + node_unreclaimable: 0 + start_pfn: 1 +Node 0, zone DMA32 + pages free 204252 + min 19510 + low 21059 + high 22608 + spanned 1044480 + present 759231 + managed 742806 + protection: (0, 0, 4949, 4949, 4949) + nr_free_pages 204252 + nr_zone_inactive_anon 118558 + nr_zone_active_anon 106598 + nr_zone_inactive_file 75475 + nr_zone_active_file 70293 + nr_zone_unevictable 66195 + nr_zone_write_pending 64 + nr_mlock 4 + nr_page_table_pages 1756 + nr_kernel_stack 2208 + nr_bounce 0 + nr_zspages 0 + nr_free_cma 0 + numa_hit 113952967 + numa_miss 0 + numa_foreign 0 + numa_interleave 0 + numa_local 113952967 + numa_other 0 + pagesets + cpu: 0 + count: 345 + high: 378 + batch: 63 + vm stats threshold: 48 + cpu: 1 + count: 356 + high: 378 + batch: 63 + vm stats threshold: 48 + cpu: 2 + count: 325 + high: 378 + batch: 63 + vm stats threshold: 48 + cpu: 3 + count: 346 + high: 378 + batch: 63 + vm stats threshold: 48 + cpu: 4 + count: 321 + high: 378 + batch: 63 + vm stats threshold: 48 + cpu: 5 + count: 316 + high: 378 + batch: 63 + vm stats threshold: 48 + cpu: 6 + count: 373 + high: 378 + batch: 63 + vm stats threshold: 48 + cpu: 7 + count: 339 + high: 378 + batch: 63 + vm stats threshold: 48 + node_unreclaimable: 0 + start_pfn: 4096 +Node 0, zone Normal + pages free 18553 + min 11176 + low 13842 + high 16508 + spanned 1308160 + present 1308160 + managed 1268711 + protection: (0, 0, 0, 0, 0) + nr_free_pages 18553 + nr_zone_inactive_anon 112423 + nr_zone_active_anon 440982 + nr_zone_inactive_file 241429 + nr_zone_active_file 275989 + nr_zone_unevictable 49272 + nr_zone_write_pending 844 + nr_mlock 154 + nr_page_table_pages 9750 + nr_kernel_stack 15136 + nr_bounce 0 + nr_zspages 0 + nr_free_cma 0 + numa_hit 162718019 + numa_miss 0 + numa_foreign 0 + numa_interleave 26812 + numa_local 162718019 + numa_other 0 + pagesets + cpu: 0 + count: 316 + high: 378 + batch: 63 + vm stats threshold: 56 + cpu: 1 + count: 366 + high: 378 + batch: 63 + vm stats threshold: 56 + cpu: 2 + count: 60 + high: 378 + batch: 63 + vm stats threshold: 56 + cpu: 3 + count: 256 + high: 378 + batch: 63 + vm stats threshold: 56 + cpu: 4 + count: 253 + high: 378 + batch: 63 + vm stats threshold: 56 + cpu: 5 + count: 159 + high: 378 + batch: 63 + vm stats threshold: 56 + cpu: 6 + count: 311 + high: 378 + batch: 63 + vm stats threshold: 56 + cpu: 7 + count: 264 + high: 378 + batch: 63 + vm stats threshold: 56 + node_unreclaimable: 0 + start_pfn: 1048576 +Node 0, zone Movable + pages free 0 + min 0 + low 0 + high 0 + spanned 0 + present 0 + managed 0 + protection: (0, 0, 0, 0, 0) +Node 0, zone Device + pages free 0 + min 0 + low 0 + high 0 + spanned 0 + present 0 + managed 0 + protection: (0, 0, 0, 0, 0) +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/block +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/block/dm-0 +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/dm-0/stat +Lines: 1 +6447303 0 710266738 1529043 953216 0 31201176 4557464 0 796160 6088971 Mode: 664 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/block/sda +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/block/sda/queue +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/add_random +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/chunk_sectors +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/dax +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/discard_granularity +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/discard_max_bytes +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/discard_max_hw_bytes +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/discard_zeroes_data +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/fua +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/hw_sector_size +Lines: 1 +512 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/io_poll +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/io_poll_delay +Lines: 1 +-1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/io_timeout +Lines: 1 +30000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/block/sda/queue/iosched +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/iosched/back_seek_max +Lines: 1 +16384 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/iosched/back_seek_penalty +Lines: 1 +2 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/iosched/fifo_expire_async +Lines: 1 +250 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/iosched/fifo_expire_sync +Lines: 1 +125 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/iosched/low_latency +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/iosched/max_budget +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/iosched/slice_idle +Lines: 1 +8 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/iosched/slice_idle_us +Lines: 1 +8000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/iosched/strict_guarantees +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/iosched/timeout_sync +Lines: 1 +125 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/iostats +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/logical_block_size +Lines: 1 +512 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/max_discard_segments +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/max_hw_sectors_kb +Lines: 1 +32767 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/max_integrity_segments +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/max_sectors_kb +Lines: 1 +1280 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/max_segment_size +Lines: 1 +65536 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/max_segments +Lines: 1 +168 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/minimum_io_size +Lines: 1 +512 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/nomerges +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/nr_requests +Lines: 1 +64 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/nr_zones +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/optimal_io_size +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/physical_block_size +Lines: 1 +512 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/read_ahead_kb +Lines: 1 +128 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/rotational +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/rq_affinity +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/scheduler +Lines: 1 +mq-deadline kyber [bfq] none +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/wbt_lat_usec +Lines: 1 +75000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/write_cache +Lines: 1 +write back +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/write_same_max_bytes +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/write_zeroes_max_bytes +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/queue/zoned +Lines: 1 +none +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/block/sda/stat +Lines: 1 +9652963 396792 759304206 412943 8422549 6731723 286915323 13947418 0 5658367 19174573 1 2 3 12 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/fc_host +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/fc_host/host0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/dev_loss_tmo +Lines: 1 +30 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/fabric_name +Lines: 1 +0x0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/node_name +Lines: 1 +0x2000e0071bce95f2 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/port_id +Lines: 1 +0x000002 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/port_name +Lines: 1 +0x1000e0071bce95f2 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/port_state +Lines: 1 +Online +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/port_type +Lines: 1 +Point-To-Point (direct nport connection) +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/speed +Lines: 1 +16 Gbit +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/fc_host/host0/statistics +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/dumped_frames +Lines: 1 +0xffffffffffffffff +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/error_frames +Lines: 1 +0x0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/fcp_packet_aborts +Lines: 1 +0x13 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/invalid_crc_count +Lines: 1 +0x2 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/invalid_tx_word_count +Lines: 1 +0x8 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/link_failure_count +Lines: 1 +0x9 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/loss_of_signal_count +Lines: 1 +0x11 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/loss_of_sync_count +Lines: 1 +0x10 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/nos_count +Lines: 1 +0x12 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/rx_frames +Lines: 1 +0x3 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/rx_words +Lines: 1 +0x4 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/seconds_since_last_reset +Lines: 1 +0x7 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/tx_frames +Lines: 1 +0x5 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/statistics/tx_words +Lines: 1 +0x6 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/supported_classes +Lines: 1 +Class 3 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/supported_speeds +Lines: 1 +4 Gbit, 8 Gbit, 16 Gbit +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/fc_host/host0/symbolic_name +Lines: 1 +Emulex SN1100E2P FV12.4.270.3 DV12.4.0.0. HN:gotest. OS:Linux +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/infiniband +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/infiniband/mlx4_0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/board_id +Lines: 1 +SM_1141000001000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/fw_ver +Lines: 1 +2.31.5050 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/hca_type +Lines: 1 +MT4099 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/infiniband/mlx4_0/ports +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/infiniband/mlx4_0/ports/1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/VL15_dropped +Lines: 1 +0 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/excessive_buffer_overrun_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/link_downed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/link_error_recovery +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/local_link_integrity_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/port_rcv_constraint_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/port_rcv_data +Lines: 1 +2221223609 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/port_rcv_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/port_rcv_packets +Lines: 1 +87169372 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/port_rcv_remote_physical_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/port_rcv_switch_relay_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/port_xmit_constraint_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/port_xmit_data +Lines: 1 +26509113295 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/port_xmit_discards +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/port_xmit_packets +Lines: 1 +85734114 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/port_xmit_wait +Lines: 1 +3599 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/counters/symbol_error +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/phys_state +Lines: 1 +5: LinkUp +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/rate +Lines: 1 +40 Gb/sec (4X QDR) +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/1/state +Lines: 1 +4: ACTIVE +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/infiniband/mlx4_0/ports/2 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/VL15_dropped +Lines: 1 +0 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/excessive_buffer_overrun_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/link_downed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/link_error_recovery +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/local_link_integrity_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/port_rcv_constraint_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/port_rcv_data +Lines: 1 +2460436784 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/port_rcv_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/port_rcv_packets +Lines: 1 +89332064 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/port_rcv_remote_physical_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/port_rcv_switch_relay_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/port_xmit_constraint_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/port_xmit_data +Lines: 1 +26540356890 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/port_xmit_discards +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/port_xmit_packets +Lines: 1 +88622850 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/port_xmit_wait +Lines: 1 +3846 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/counters/symbol_error +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/phys_state +Lines: 1 +5: LinkUp +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/rate +Lines: 1 +40 Gb/sec (4X QDR) +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/infiniband/mlx4_0/ports/2/state +Lines: 1 +4: ACTIVE +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/net +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/net/eth0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/addr_assign_type +Lines: 1 +3 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/addr_len +Lines: 1 +6 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/address +Lines: 1 +01:01:01:01:01:01 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/broadcast +Lines: 1 +ff:ff:ff:ff:ff:ff +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/carrier +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/carrier_changes +Lines: 1 +2 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/carrier_down_count +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/carrier_up_count +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/dev_id +Lines: 1 +0x20 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/device +SymlinkTo: ../../../devices/pci0000:00/0000:00:1f.6/ +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/dormant +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/duplex +Lines: 1 +full +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/flags +Lines: 1 +0x1303 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/ifalias +Lines: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/ifindex +Lines: 1 +2 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/iflink +Lines: 1 +2 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/link_mode +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/mtu +Lines: 1 +1500 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/name_assign_type +Lines: 1 +2 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/netdev_group +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/operstate +Lines: 1 +up +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/phys_port_id +Lines: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/phys_port_name +Lines: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/phys_switch_id +Lines: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/speed +Lines: 1 +1000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/tx_queue_len +Lines: 1 +1000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/net/eth0/type +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/power_supply +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/power_supply/AC +SymlinkTo: ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/power_supply/BAT0 +SymlinkTo: ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/powercap +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/powercap/intel-rapl +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl/enabled +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl/uevent +Lines: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/powercap/intel-rapl:0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/constraint_0_max_power_uw +Lines: 1 +95000000 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/constraint_0_name +Lines: 1 +long_term +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw +Lines: 1 +4090000000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/constraint_0_time_window_us +Lines: 1 +999424 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/constraint_1_max_power_uw +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/constraint_1_name +Lines: 1 +short_term +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw +Lines: 1 +4090000000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/constraint_1_time_window_us +Lines: 1 +2440 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/enabled +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/energy_uj +Lines: 1 +240422366267 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/max_energy_range_uj +Lines: 1 +262143328850 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/name +Lines: 1 +package-0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0/uevent +Lines: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/powercap/intel-rapl:0:0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0:0/constraint_0_max_power_uw +Lines: 0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0:0/constraint_0_name +Lines: 1 +long_term +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0:0/constraint_0_power_limit_uw +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0:0/constraint_0_time_window_us +Lines: 1 +976 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0:0/enabled +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0:0/energy_uj +Lines: 1 +118821284256 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0:0/max_energy_range_uj +Lines: 1 +262143328850 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0:0/name +Lines: 1 +core +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/powercap/intel-rapl:0:0/uevent +Lines: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/thermal +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/thermal/cooling_device0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/cooling_device0/cur_state +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/cooling_device0/max_state +Lines: 1 +50 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/cooling_device0/type +Lines: 1 +Processor +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/thermal/cooling_device1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/cooling_device1/cur_state +Lines: 1 +-1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/cooling_device1/max_state +Lines: 1 +27 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/cooling_device1/type +Lines: 1 +intel_powerclamp +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/thermal/thermal_zone0 +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/thermal_zone0/policy +Lines: 1 +step_wise +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/thermal_zone0/temp +Lines: 1 +49925 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/thermal_zone0/type +Lines: 1 +bcm2835_thermal +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/class/thermal/thermal_zone1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/thermal_zone1/mode +Lines: 1 +enabled +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/thermal_zone1/passive +Lines: 1 +0 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/thermal_zone1/policy +Lines: 1 +step_wise +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/thermal_zone1/temp +Lines: 1 +-44000 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/class/thermal/thermal_zone1/type +Lines: 1 +acpitz +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/device +SymlinkTo: ../../../ACPI0003:00 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/online +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/async +Lines: 1 +disabled +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/autosuspend_delay_ms +Lines: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/control +Lines: 1 +auto +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/runtime_active_kids +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/runtime_active_time +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/runtime_enabled +Lines: 1 +disabled +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/runtime_status +Lines: 1 +unsupported +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/runtime_suspended_time +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/runtime_usage +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/wakeup +Lines: 1 +enabled +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/wakeup_abort_count +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/wakeup_active +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/wakeup_active_count +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/wakeup_count +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/wakeup_expire_count +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/wakeup_last_time_ms +Lines: 1 +10598 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/wakeup_max_time_ms +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/wakeup_prevent_sleep_time_ms +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/power/wakeup_total_time_ms +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/subsystem +SymlinkTo: ../../../../../../../../../class/power_supply +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/type +Lines: 1 +Mains +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/ACPI0003:00/power_supply/AC/uevent +Lines: 2 +POWER_SUPPLY_NAME=AC +POWER_SUPPLY_ONLINE=0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/alarm +Lines: 1 +2369000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/capacity +Lines: 1 +98 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/capacity_level +Lines: 1 +Normal +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/charge_start_threshold +Lines: 1 +95 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/charge_stop_threshold +Lines: 1 +100 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/cycle_count +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/device +SymlinkTo: ../../../PNP0C0A:00 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/energy_full +Lines: 1 +50060000 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/energy_full_design +Lines: 1 +47520000 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/energy_now +Lines: 1 +49450000 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/manufacturer +Lines: 1 +LGC +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/model_name +Lines: 1 +LNV-45N1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/power +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/power/async +Lines: 1 +disabled +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/power/autosuspend_delay_ms +Lines: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/power/control +Lines: 1 +auto +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/power/runtime_active_kids +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/power/runtime_active_time +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/power/runtime_enabled +Lines: 1 +disabled +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/power/runtime_status +Lines: 1 +unsupported +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/power/runtime_suspended_time +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/power/runtime_usage +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/power_now +Lines: 1 +4830000 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/present +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/serial_number +Lines: 1 +38109 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/status +Lines: 1 +Discharging +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/subsystem +SymlinkTo: ../../../../../../../../../class/power_supply +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/technology +Lines: 1 +Li-ion +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/type +Lines: 1 +Battery +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/uevent +Lines: 16 +POWER_SUPPLY_NAME=BAT0 +POWER_SUPPLY_STATUS=Discharging +POWER_SUPPLY_PRESENT=1 +POWER_SUPPLY_TECHNOLOGY=Li-ion +POWER_SUPPLY_CYCLE_COUNT=0 +POWER_SUPPLY_VOLTAGE_MIN_DESIGN=10800000 +POWER_SUPPLY_VOLTAGE_NOW=11750000 +POWER_SUPPLY_POWER_NOW=5064000 +POWER_SUPPLY_ENERGY_FULL_DESIGN=47520000 +POWER_SUPPLY_ENERGY_FULL=47390000 +POWER_SUPPLY_ENERGY_NOW=40730000 +POWER_SUPPLY_CAPACITY=85 +POWER_SUPPLY_CAPACITY_LEVEL=Normal +POWER_SUPPLY_MODEL_NAME=LNV-45N1 +POWER_SUPPLY_MANUFACTURER=LGC +POWER_SUPPLY_SERIAL_NUMBER=38109 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/voltage_min_design +Lines: 1 +10800000 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/voltage_now +Lines: 1 +12229000 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/dirty_data +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_hit_ratio +Lines: 1 +100 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_hits +Lines: 1 +289 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_hit_ratio +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_hit_ratio +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_hit_ratio +Lines: 1 +100 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_hits +Lines: 1 +546 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata5 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata5/host4 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/io_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/metadata_written +Lines: 1 +512 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/priority_stats +Lines: 5 +Unused: 99% +Metadata: 0% +Average: 10473 +Sectors per Q: 64 +Quantiles: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946] +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/written +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/pci0000:00/0000:00:1f.6 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/ari_enabled +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/broken_parity_status +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/class +Lines: 1 +0x020000 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/consistent_dma_mask_bits +Lines: 1 +64 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/d3cold_allowed +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/device +Lines: 1 +0x15d7 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/dma_mask_bits +Lines: 1 +64 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/driver_override +Lines: 1 +(null) +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/enable +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/irq +Lines: 1 +140 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/local_cpulist +Lines: 1 +0-7 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/local_cpus +Lines: 1 +ff +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/modalias +Lines: 1 +pci:v00008086d000015D7sv000017AAsd0000225Abc02sc00i00 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/msi_bus +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/numa_node +Lines: 1 +-1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/resource +Lines: 13 +0x00000000ec200000 0x00000000ec21ffff 0x0000000000040200 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/revision +Lines: 1 +0x21 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/subsystem_device +Lines: 1 +0x225a +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/subsystem_vendor +Lines: 1 +0x17aa +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/uevent +Lines: 6 +DRIVER=e1000e +PCI_CLASS=20000 +PCI_ID=8086:15D7 +PCI_SUBSYS_ID=17AA:225A +PCI_SLOT_NAME=0000:00:1f.6 +MODALIAS=pci:v00008086d000015D7sv000017AAsd0000225Abc02sc00i00 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/pci0000:00/0000:00:1f.6/vendor +Lines: 1 +0x8086 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/rbd +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/rbd/0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/rbd/0/name +Lines: 1 +demo +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/rbd/0/pool +Lines: 1 +iscsi-images +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/rbd/1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/rbd/1/name +Lines: 1 +wrong +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/rbd/1/pool +Lines: 1 +wrong-images +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/clocksource +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/clocksource/clocksource0 +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/clocksource/clocksource0/available_clocksource +Lines: 1 +tsc hpet acpi_pm +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/clocksource/clocksource0/current_clocksource +Lines: 1 +tsc +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/cpu +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/cpu/cpu0 +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu0/cpufreq +SymlinkTo: ../cpufreq/policy0 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/cpu/cpu0/thermal_throttle +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu0/thermal_throttle/core_throttle_count +Lines: 1 +10084 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu0/thermal_throttle/package_throttle_count +Lines: 1 +34818 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/cpu/cpu0/topology +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu0/topology/core_id +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu0/topology/core_siblings +Lines: 1 +ff +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu0/topology/core_siblings_list +Lines: 1 +0-7 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu0/topology/physical_package_id +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu0/topology/thread_siblings +Lines: 1 +11 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu0/topology/thread_siblings_list +Lines: 1 +0,4 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/cpu/cpu1 +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/cpu/cpu1/cpufreq +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq +Lines: 1 +1200195 +Mode: 400 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_max_freq +Lines: 1 +3300000 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_min_freq +Lines: 1 +1200000 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_transition_latency +Lines: 1 +4294967295 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/cpufreq/related_cpus +Lines: 1 +1 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/cpufreq/scaling_available_governors +Lines: 1 +performance powersave +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver +Lines: 1 +intel_pstate +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor +Lines: 1 +powersave +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq +Lines: 1 +3300000 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq +Lines: 1 +1200000 +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed +Lines: 1 + +Mode: 664 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/cpu/cpu1/thermal_throttle +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/thermal_throttle/core_throttle_count +Lines: 1 +523 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/thermal_throttle/package_throttle_count +Lines: 1 +34818 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/cpu/cpu1/topology +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/topology/core_id +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/topology/core_siblings +Lines: 1 +ff +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/topology/core_siblings_list +Lines: 1 +0-7 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/topology/physical_package_id +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/topology/thread_siblings +Lines: 1 +22 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpu1/topology/thread_siblings_list +Lines: 1 +1,5 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/cpu/cpufreq +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/cpu/cpufreq/policy0 +Mode: 775 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/affected_cpus +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq +Lines: 1 +2400000 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq +Lines: 1 +800000 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_transition_latency +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/related_cpus +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors +Lines: 1 +performance powersave +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq +Lines: 1 +1219917 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/scaling_driver +Lines: 1 +intel_pstate +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/scaling_governor +Lines: 1 +powersave +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq +Lines: 1 +2400000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq +Lines: 1 +800000 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed +Lines: 1 + +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/devices/system/cpu/cpufreq/policy1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/average_key_size +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0 +Mode: 777 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/dirty_data +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_hit_ratio +Lines: 1 +100 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_hits +Lines: 1 +289 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_day/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_hit_ratio +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_five_minute/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_hit_ratio +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_hour/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_hit_ratio +Lines: 1 +100 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_hits +Lines: 1 +546 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/stats_total/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0/writeback_rate_debug +Lines: 7 +rate: 1.1M/sec +dirty: 20.4G +target: 20.4G +proportional: 427.5k +integral: 790.0k +change: 321.5k/sec +next io: 17ms +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/btree_cache_size +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache0 +Mode: 777 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache0/io_errors +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache0/metadata_written +Lines: 1 +512 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache0/priority_stats +Lines: 5 +Unused: 99% +Metadata: 0% +Average: 10473 +Sectors per Q: 64 +Quantiles: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946] +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache0/written +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache_available_percent +Lines: 1 +100 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/congested +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/active_journal_entries +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/btree_nodes +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/btree_read_average_duration_us +Lines: 1 +1305 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/cache_read_races +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/root_usage_percent +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_hit_ratio +Lines: 1 +100 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_hits +Lines: 1 +289 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_hit_ratio +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_hit_ratio +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/bypassed +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_bypass_hits +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_bypass_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_hit_ratio +Lines: 1 +100 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_hits +Lines: 1 +546 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_miss_collisions +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_misses +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_readaheads +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/tree_depth +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_may_use +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_readonly +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_reserved +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_used +Lines: 1 +808189952 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/disk_total +Lines: 1 +2147483648 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/disk_used +Lines: 1 +808189952 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/flags +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/raid0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/raid0/total_bytes +Lines: 1 +2147483648 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/raid0/used_bytes +Lines: 1 +808189952 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/total_bytes +Lines: 1 +2147483648 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/total_bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/global_rsv_reserved +Lines: 1 +16777216 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/global_rsv_size +Lines: 1 +16777216 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_may_use +Lines: 1 +16777216 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_readonly +Lines: 1 +131072 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_reserved +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_used +Lines: 1 +933888 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/disk_total +Lines: 1 +2147483648 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/disk_used +Lines: 1 +1867776 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/flags +Lines: 1 +4 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/raid1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/raid1/total_bytes +Lines: 1 +1073741824 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/raid1/used_bytes +Lines: 1 +933888 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/total_bytes +Lines: 1 +1073741824 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/total_bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_may_use +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_readonly +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_reserved +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_used +Lines: 1 +16384 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/disk_total +Lines: 1 +16777216 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/disk_used +Lines: 1 +32768 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/flags +Lines: 1 +2 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/raid1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/raid1/total_bytes +Lines: 1 +8388608 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/raid1/used_bytes +Lines: 1 +16384 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/total_bytes +Lines: 1 +8388608 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/total_bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/clone_alignment +Lines: 1 +4096 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop25 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop25/size +Lines: 1 +20971520 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop26 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop26/size +Lines: 1 +20971520 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/big_metadata +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/extended_iref +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/mixed_backref +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/skinny_metadata +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/label +Lines: 1 +fixture +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/metadata_uuid +Lines: 1 +0abb23a9-579b-43e6-ad30-227ef47fcb9d +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/nodesize +Lines: 1 +16384 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/quota_override +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/sectorsize +Lines: 1 +4096 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_may_use +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_readonly +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_reserved +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_used +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/disk_total +Lines: 1 +644087808 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/disk_used +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/flags +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/raid5 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/raid5/total_bytes +Lines: 1 +644087808 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/raid5/used_bytes +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/total_bytes +Lines: 1 +644087808 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/total_bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/global_rsv_reserved +Lines: 1 +16777216 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/global_rsv_size +Lines: 1 +16777216 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_may_use +Lines: 1 +16777216 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_readonly +Lines: 1 +262144 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_reserved +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_used +Lines: 1 +114688 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/disk_total +Lines: 1 +429391872 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/disk_used +Lines: 1 +114688 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/flags +Lines: 1 +4 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/raid6 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/raid6/total_bytes +Lines: 1 +429391872 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/raid6/used_bytes +Lines: 1 +114688 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/total_bytes +Lines: 1 +429391872 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/total_bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_may_use +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_readonly +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_reserved +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_used +Lines: 1 +16384 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/disk_total +Lines: 1 +16777216 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/disk_used +Lines: 1 +16384 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/flags +Lines: 1 +2 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/raid6 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/raid6/total_bytes +Lines: 1 +16777216 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/raid6/used_bytes +Lines: 1 +16384 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/total_bytes +Lines: 1 +16777216 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/total_bytes_pinned +Lines: 1 +0 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/clone_alignment +Lines: 1 +4096 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop22 +SymlinkTo: ../../../../devices/virtual/block/loop22 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop23 +SymlinkTo: ../../../../devices/virtual/block/loop23 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop24 +SymlinkTo: ../../../../devices/virtual/block/loop24 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop25 +SymlinkTo: ../../../../devices/virtual/block/loop25 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/big_metadata +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/extended_iref +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/mixed_backref +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/raid56 +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/skinny_metadata +Lines: 1 +1 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/label +Lines: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/metadata_uuid +Lines: 1 +7f07c59f-6136-449c-ab87-e1cf2328731b +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/nodesize +Lines: 1 +16384 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/quota_override +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/sectorsize +Lines: 1 +4096 +Mode: 444 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/xfs +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/xfs/sda1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/xfs/sda1/stats +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/xfs/sda1/stats/stats +Lines: 1 +extent_alloc 1 0 0 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/xfs/sdb1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/fs/xfs/sdb1/stats +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/fs/xfs/sdb1/stats/stats +Lines: 1 +extent_alloc 2 0 0 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/core +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/core/fileio_0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/core/fileio_1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/core/fileio_1/file_lio_1G +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/core/fileio_1/file_lio_1G/enable +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/core/fileio_1/file_lio_1G/udev_path +Lines: 1 +/home/iscsi/file_back_1G +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/core/iblock_0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/core/iblock_0/block_lio_rbd1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/core/iblock_0/block_lio_rbd1/enable +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/core/iblock_0/block_lio_rbd1/udev_path +Lines: 1 +/dev/rbd1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/core/rbd_0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/core/rbd_0/iscsi-images-demo +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/core/rbd_0/iscsi-images-demo/enable +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/core/rbd_0/iscsi-images-demo/udev_path +Lines: 1 +/dev/rbd/iscsi-images/demo +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/core/rd_mcp_119 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/core/rd_mcp_119/ramdisk_lio_1G +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/core/rd_mcp_119/ramdisk_lio_1G/enable +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/core/rd_mcp_119/ramdisk_lio_1G/udev_path +Lines: 0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.8888bbbbddd0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.8888bbbbddd0/tpgt_1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.8888bbbbddd0/tpgt_1/enable +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.8888bbbbddd0/tpgt_1/lun +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.8888bbbbddd0/tpgt_1/lun/lun_0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.8888bbbbddd0/tpgt_1/lun/lun_0/7f4a4eb56d +SymlinkTo: ../../../../../../target/core/rd_mcp_119/ramdisk_lio_1G +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.8888bbbbddd0/tpgt_1/lun/lun_0/statistics +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.8888bbbbddd0/tpgt_1/lun/lun_0/statistics/scsi_tgt_port +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.8888bbbbddd0/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/in_cmds +Lines: 1 +204950 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.8888bbbbddd0/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/read_mbytes +Lines: 1 +10325 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.8888bbbbddd0/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/write_mbytes +Lines: 1 +40325 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.abcd1abcd2ab +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.abcd1abcd2ab/tpgt_1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.abcd1abcd2ab/tpgt_1/enable +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.abcd1abcd2ab/tpgt_1/lun +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.abcd1abcd2ab/tpgt_1/lun/lun_0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.abcd1abcd2ab/tpgt_1/lun/lun_0/795b7c7026 +SymlinkTo: ../../../../../../target/core/iblock_0/block_lio_rbd1 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.abcd1abcd2ab/tpgt_1/lun/lun_0/statistics +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.abcd1abcd2ab/tpgt_1/lun/lun_0/statistics/scsi_tgt_port +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.abcd1abcd2ab/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/in_cmds +Lines: 1 +104950 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.abcd1abcd2ab/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/read_mbytes +Lines: 1 +20095 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.osd1.x8664:sn.abcd1abcd2ab/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/write_mbytes +Lines: 1 +71235 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:dev.rbd0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:dev.rbd0/tpgt_1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:dev.rbd0/tpgt_1/enable +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:dev.rbd0/tpgt_1/lun +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:dev.rbd0/tpgt_1/lun/lun_0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:dev.rbd0/tpgt_1/lun/lun_0/fff5e16686 +SymlinkTo: ../../../../../../target/core/fileio_1/file_lio_1G +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:dev.rbd0/tpgt_1/lun/lun_0/statistics +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:dev.rbd0/tpgt_1/lun/lun_0/statistics/scsi_tgt_port +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:dev.rbd0/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/in_cmds +Lines: 1 +301950 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:dev.rbd0/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/read_mbytes +Lines: 1 +10195 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:dev.rbd0/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/write_mbytes +Lines: 1 +30195 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:sn.ramdemo +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:sn.ramdemo/tpgt_1 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:sn.ramdemo/tpgt_1/enable +Lines: 1 +1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:sn.ramdemo/tpgt_1/lun +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:sn.ramdemo/tpgt_1/lun/lun_0 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:sn.ramdemo/tpgt_1/lun/lun_0/eba1edf893 +SymlinkTo: ../../../../../../target/core/rbd_0/iscsi-images-demo +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:sn.ramdemo/tpgt_1/lun/lun_0/statistics +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:sn.ramdemo/tpgt_1/lun/lun_0/statistics/scsi_tgt_port +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:sn.ramdemo/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/in_cmds +Lines: 1 +1234 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:sn.ramdemo/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/read_mbytes +Lines: 1 +1504 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: fixtures/sys/kernel/config/target/iscsi/iqn.2016-11.org.linux-iscsi.igw.x86:sn.ramdemo/tpgt_1/lun/lun_0/statistics/scsi_tgt_port/write_mbytes +Lines: 1 +4733 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/github.com/prometheus/procfs/fs.go b/vendor/github.com/prometheus/procfs/fs.go index b6c6b2ce1f0..0102ab0fd85 100644 --- a/vendor/github.com/prometheus/procfs/fs.go +++ b/vendor/github.com/prometheus/procfs/fs.go @@ -14,69 +14,30 @@ package procfs import ( - "fmt" - "os" - "path" - - "github.com/prometheus/procfs/nfs" - "github.com/prometheus/procfs/xfs" + "github.com/prometheus/procfs/internal/fs" ) -// FS represents the pseudo-filesystem proc, which provides an interface to +// FS represents the pseudo-filesystem sys, which provides an interface to // kernel data structures. -type FS string +type FS struct { + proc fs.FS +} // DefaultMountPoint is the common mount point of the proc filesystem. -const DefaultMountPoint = "/proc" +const DefaultMountPoint = fs.DefaultProcMountPoint -// NewFS returns a new FS mounted under the given mountPoint. It will error -// if the mount point can't be read. +// NewDefaultFS returns a new proc FS mounted under the default proc mountPoint. +// It will error if the mount point directory can't be read or is a file. +func NewDefaultFS() (FS, error) { + return NewFS(DefaultMountPoint) +} + +// NewFS returns a new proc FS mounted under the given proc mountPoint. It will error +// if the mount point directory can't be read or is a file. func NewFS(mountPoint string) (FS, error) { - info, err := os.Stat(mountPoint) + fs, err := fs.NewFS(mountPoint) if err != nil { - return "", fmt.Errorf("could not read %s: %s", mountPoint, err) + return FS{}, err } - if !info.IsDir() { - return "", fmt.Errorf("mount point %s is not a directory", mountPoint) - } - - return FS(mountPoint), nil -} - -// Path returns the path of the given subsystem relative to the procfs root. -func (fs FS) Path(p ...string) string { - return path.Join(append([]string{string(fs)}, p...)...) -} - -// XFSStats retrieves XFS filesystem runtime statistics. -func (fs FS) XFSStats() (*xfs.Stats, error) { - f, err := os.Open(fs.Path("fs/xfs/stat")) - if err != nil { - return nil, err - } - defer f.Close() - - return xfs.ParseStats(f) -} - -// NFSClientRPCStats retrieves NFS client RPC statistics. -func (fs FS) NFSClientRPCStats() (*nfs.ClientRPCStats, error) { - f, err := os.Open(fs.Path("net/rpc/nfs")) - if err != nil { - return nil, err - } - defer f.Close() - - return nfs.ParseClientRPCStats(f) -} - -// NFSdServerRPCStats retrieves NFS daemon RPC statistics. -func (fs FS) NFSdServerRPCStats() (*nfs.ServerRPCStats, error) { - f, err := os.Open(fs.Path("net/rpc/nfsd")) - if err != nil { - return nil, err - } - defer f.Close() - - return nfs.ParseServerRPCStats(f) + return FS{fs}, nil } diff --git a/vendor/github.com/prometheus/procfs/fscache.go b/vendor/github.com/prometheus/procfs/fscache.go new file mode 100644 index 00000000000..8783cf3cc18 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/fscache.go @@ -0,0 +1,422 @@ +// Copyright 2019 The Prometheus 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 procfs + +import ( + "bufio" + "bytes" + "fmt" + "io" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// Fscacheinfo represents fscache statistics. +type Fscacheinfo struct { + // Number of index cookies allocated + IndexCookiesAllocated uint64 + // data storage cookies allocated + DataStorageCookiesAllocated uint64 + // Number of special cookies allocated + SpecialCookiesAllocated uint64 + // Number of objects allocated + ObjectsAllocated uint64 + // Number of object allocation failures + ObjectAllocationsFailure uint64 + // Number of objects that reached the available state + ObjectsAvailable uint64 + // Number of objects that reached the dead state + ObjectsDead uint64 + // Number of objects that didn't have a coherency check + ObjectsWithoutCoherencyCheck uint64 + // Number of objects that passed a coherency check + ObjectsWithCoherencyCheck uint64 + // Number of objects that needed a coherency data update + ObjectsNeedCoherencyCheckUpdate uint64 + // Number of objects that were declared obsolete + ObjectsDeclaredObsolete uint64 + // Number of pages marked as being cached + PagesMarkedAsBeingCached uint64 + // Number of uncache page requests seen + UncachePagesRequestSeen uint64 + // Number of acquire cookie requests seen + AcquireCookiesRequestSeen uint64 + // Number of acq reqs given a NULL parent + AcquireRequestsWithNullParent uint64 + // Number of acq reqs rejected due to no cache available + AcquireRequestsRejectedNoCacheAvailable uint64 + // Number of acq reqs succeeded + AcquireRequestsSucceeded uint64 + // Number of acq reqs rejected due to error + AcquireRequestsRejectedDueToError uint64 + // Number of acq reqs failed on ENOMEM + AcquireRequestsFailedDueToEnomem uint64 + // Number of lookup calls made on cache backends + LookupsNumber uint64 + // Number of negative lookups made + LookupsNegative uint64 + // Number of positive lookups made + LookupsPositive uint64 + // Number of objects created by lookup + ObjectsCreatedByLookup uint64 + // Number of lookups timed out and requeued + LookupsTimedOutAndRequed uint64 + InvalidationsNumber uint64 + InvalidationsRunning uint64 + // Number of update cookie requests seen + UpdateCookieRequestSeen uint64 + // Number of upd reqs given a NULL parent + UpdateRequestsWithNullParent uint64 + // Number of upd reqs granted CPU time + UpdateRequestsRunning uint64 + // Number of relinquish cookie requests seen + RelinquishCookiesRequestSeen uint64 + // Number of rlq reqs given a NULL parent + RelinquishCookiesWithNullParent uint64 + // Number of rlq reqs waited on completion of creation + RelinquishRequestsWaitingCompleteCreation uint64 + // Relinqs rtr + RelinquishRetries uint64 + // Number of attribute changed requests seen + AttributeChangedRequestsSeen uint64 + // Number of attr changed requests queued + AttributeChangedRequestsQueued uint64 + // Number of attr changed rejected -ENOBUFS + AttributeChangedRejectDueToEnobufs uint64 + // Number of attr changed failed -ENOMEM + AttributeChangedFailedDueToEnomem uint64 + // Number of attr changed ops given CPU time + AttributeChangedOps uint64 + // Number of allocation requests seen + AllocationRequestsSeen uint64 + // Number of successful alloc reqs + AllocationOkRequests uint64 + // Number of alloc reqs that waited on lookup completion + AllocationWaitingOnLookup uint64 + // Number of alloc reqs rejected -ENOBUFS + AllocationsRejectedDueToEnobufs uint64 + // Number of alloc reqs aborted -ERESTARTSYS + AllocationsAbortedDueToErestartsys uint64 + // Number of alloc reqs submitted + AllocationOperationsSubmitted uint64 + // Number of alloc reqs waited for CPU time + AllocationsWaitedForCPU uint64 + // Number of alloc reqs aborted due to object death + AllocationsAbortedDueToObjectDeath uint64 + // Number of retrieval (read) requests seen + RetrievalsReadRequests uint64 + // Number of successful retr reqs + RetrievalsOk uint64 + // Number of retr reqs that waited on lookup completion + RetrievalsWaitingLookupCompletion uint64 + // Number of retr reqs returned -ENODATA + RetrievalsReturnedEnodata uint64 + // Number of retr reqs rejected -ENOBUFS + RetrievalsRejectedDueToEnobufs uint64 + // Number of retr reqs aborted -ERESTARTSYS + RetrievalsAbortedDueToErestartsys uint64 + // Number of retr reqs failed -ENOMEM + RetrievalsFailedDueToEnomem uint64 + // Number of retr reqs submitted + RetrievalsRequests uint64 + // Number of retr reqs waited for CPU time + RetrievalsWaitingCPU uint64 + // Number of retr reqs aborted due to object death + RetrievalsAbortedDueToObjectDeath uint64 + // Number of storage (write) requests seen + StoreWriteRequests uint64 + // Number of successful store reqs + StoreSuccessfulRequests uint64 + // Number of store reqs on a page already pending storage + StoreRequestsOnPendingStorage uint64 + // Number of store reqs rejected -ENOBUFS + StoreRequestsRejectedDueToEnobufs uint64 + // Number of store reqs failed -ENOMEM + StoreRequestsFailedDueToEnomem uint64 + // Number of store reqs submitted + StoreRequestsSubmitted uint64 + // Number of store reqs granted CPU time + StoreRequestsRunning uint64 + // Number of pages given store req processing time + StorePagesWithRequestsProcessing uint64 + // Number of store reqs deleted from tracking tree + StoreRequestsDeleted uint64 + // Number of store reqs over store limit + StoreRequestsOverStoreLimit uint64 + // Number of release reqs against pages with no pending store + ReleaseRequestsAgainstPagesWithNoPendingStorage uint64 + // Number of release reqs against pages stored by time lock granted + ReleaseRequestsAgainstPagesStoredByTimeLockGranted uint64 + // Number of release reqs ignored due to in-progress store + ReleaseRequestsIgnoredDueToInProgressStore uint64 + // Number of page stores cancelled due to release req + PageStoresCancelledByReleaseRequests uint64 + VmscanWaiting uint64 + // Number of times async ops added to pending queues + OpsPending uint64 + // Number of times async ops given CPU time + OpsRunning uint64 + // Number of times async ops queued for processing + OpsEnqueued uint64 + // Number of async ops cancelled + OpsCancelled uint64 + // Number of async ops rejected due to object lookup/create failure + OpsRejected uint64 + // Number of async ops initialised + OpsInitialised uint64 + // Number of async ops queued for deferred release + OpsDeferred uint64 + // Number of async ops released (should equal ini=N when idle) + OpsReleased uint64 + // Number of deferred-release async ops garbage collected + OpsGarbageCollected uint64 + // Number of in-progress alloc_object() cache ops + CacheopAllocationsinProgress uint64 + // Number of in-progress lookup_object() cache ops + CacheopLookupObjectInProgress uint64 + // Number of in-progress lookup_complete() cache ops + CacheopLookupCompleteInPorgress uint64 + // Number of in-progress grab_object() cache ops + CacheopGrabObjectInProgress uint64 + CacheopInvalidations uint64 + // Number of in-progress update_object() cache ops + CacheopUpdateObjectInProgress uint64 + // Number of in-progress drop_object() cache ops + CacheopDropObjectInProgress uint64 + // Number of in-progress put_object() cache ops + CacheopPutObjectInProgress uint64 + // Number of in-progress attr_changed() cache ops + CacheopAttributeChangeInProgress uint64 + // Number of in-progress sync_cache() cache ops + CacheopSyncCacheInProgress uint64 + // Number of in-progress read_or_alloc_page() cache ops + CacheopReadOrAllocPageInProgress uint64 + // Number of in-progress read_or_alloc_pages() cache ops + CacheopReadOrAllocPagesInProgress uint64 + // Number of in-progress allocate_page() cache ops + CacheopAllocatePageInProgress uint64 + // Number of in-progress allocate_pages() cache ops + CacheopAllocatePagesInProgress uint64 + // Number of in-progress write_page() cache ops + CacheopWritePagesInProgress uint64 + // Number of in-progress uncache_page() cache ops + CacheopUncachePagesInProgress uint64 + // Number of in-progress dissociate_pages() cache ops + CacheopDissociatePagesInProgress uint64 + // Number of object lookups/creations rejected due to lack of space + CacheevLookupsAndCreationsRejectedLackSpace uint64 + // Number of stale objects deleted + CacheevStaleObjectsDeleted uint64 + // Number of objects retired when relinquished + CacheevRetiredWhenReliquished uint64 + // Number of objects culled + CacheevObjectsCulled uint64 +} + +// Fscacheinfo returns information about current fscache statistics. +// See https://www.kernel.org/doc/Documentation/filesystems/caching/fscache.txt +func (fs FS) Fscacheinfo() (Fscacheinfo, error) { + b, err := util.ReadFileNoStat(fs.proc.Path("fs/fscache/stats")) + if err != nil { + return Fscacheinfo{}, err + } + + m, err := parseFscacheinfo(bytes.NewReader(b)) + if err != nil { + return Fscacheinfo{}, fmt.Errorf("failed to parse Fscacheinfo: %v", err) + } + + return *m, nil +} + +func setFSCacheFields(fields []string, setFields ...*uint64) error { + var err error + if len(fields) < len(setFields) { + return fmt.Errorf("Insufficient number of fields, expected %v, got %v", len(setFields), len(fields)) + } + + for i := range setFields { + *setFields[i], err = strconv.ParseUint(strings.Split(fields[i], "=")[1], 0, 64) + if err != nil { + return err + } + } + return nil +} + +func parseFscacheinfo(r io.Reader) (*Fscacheinfo, error) { + var m Fscacheinfo + s := bufio.NewScanner(r) + for s.Scan() { + fields := strings.Fields(s.Text()) + if len(fields) < 2 { + return nil, fmt.Errorf("malformed Fscacheinfo line: %q", s.Text()) + } + + switch fields[0] { + case "Cookies:": + err := setFSCacheFields(fields[1:], &m.IndexCookiesAllocated, &m.DataStorageCookiesAllocated, + &m.SpecialCookiesAllocated) + if err != nil { + return &m, err + } + case "Objects:": + err := setFSCacheFields(fields[1:], &m.ObjectsAllocated, &m.ObjectAllocationsFailure, + &m.ObjectsAvailable, &m.ObjectsDead) + if err != nil { + return &m, err + } + case "ChkAux": + err := setFSCacheFields(fields[2:], &m.ObjectsWithoutCoherencyCheck, &m.ObjectsWithCoherencyCheck, + &m.ObjectsNeedCoherencyCheckUpdate, &m.ObjectsDeclaredObsolete) + if err != nil { + return &m, err + } + case "Pages": + err := setFSCacheFields(fields[2:], &m.PagesMarkedAsBeingCached, &m.UncachePagesRequestSeen) + if err != nil { + return &m, err + } + case "Acquire:": + err := setFSCacheFields(fields[1:], &m.AcquireCookiesRequestSeen, &m.AcquireRequestsWithNullParent, + &m.AcquireRequestsRejectedNoCacheAvailable, &m.AcquireRequestsSucceeded, &m.AcquireRequestsRejectedDueToError, + &m.AcquireRequestsFailedDueToEnomem) + if err != nil { + return &m, err + } + case "Lookups:": + err := setFSCacheFields(fields[1:], &m.LookupsNumber, &m.LookupsNegative, &m.LookupsPositive, + &m.ObjectsCreatedByLookup, &m.LookupsTimedOutAndRequed) + if err != nil { + return &m, err + } + case "Invals": + err := setFSCacheFields(fields[2:], &m.InvalidationsNumber, &m.InvalidationsRunning) + if err != nil { + return &m, err + } + case "Updates:": + err := setFSCacheFields(fields[1:], &m.UpdateCookieRequestSeen, &m.UpdateRequestsWithNullParent, + &m.UpdateRequestsRunning) + if err != nil { + return &m, err + } + case "Relinqs:": + err := setFSCacheFields(fields[1:], &m.RelinquishCookiesRequestSeen, &m.RelinquishCookiesWithNullParent, + &m.RelinquishRequestsWaitingCompleteCreation, &m.RelinquishRetries) + if err != nil { + return &m, err + } + case "AttrChg:": + err := setFSCacheFields(fields[1:], &m.AttributeChangedRequestsSeen, &m.AttributeChangedRequestsQueued, + &m.AttributeChangedRejectDueToEnobufs, &m.AttributeChangedFailedDueToEnomem, &m.AttributeChangedOps) + if err != nil { + return &m, err + } + case "Allocs": + if strings.Split(fields[2], "=")[0] == "n" { + err := setFSCacheFields(fields[2:], &m.AllocationRequestsSeen, &m.AllocationOkRequests, + &m.AllocationWaitingOnLookup, &m.AllocationsRejectedDueToEnobufs, &m.AllocationsAbortedDueToErestartsys) + if err != nil { + return &m, err + } + } else { + err := setFSCacheFields(fields[2:], &m.AllocationOperationsSubmitted, &m.AllocationsWaitedForCPU, + &m.AllocationsAbortedDueToObjectDeath) + if err != nil { + return &m, err + } + } + case "Retrvls:": + if strings.Split(fields[1], "=")[0] == "n" { + err := setFSCacheFields(fields[1:], &m.RetrievalsReadRequests, &m.RetrievalsOk, &m.RetrievalsWaitingLookupCompletion, + &m.RetrievalsReturnedEnodata, &m.RetrievalsRejectedDueToEnobufs, &m.RetrievalsAbortedDueToErestartsys, + &m.RetrievalsFailedDueToEnomem) + if err != nil { + return &m, err + } + } else { + err := setFSCacheFields(fields[1:], &m.RetrievalsRequests, &m.RetrievalsWaitingCPU, &m.RetrievalsAbortedDueToObjectDeath) + if err != nil { + return &m, err + } + } + case "Stores": + if strings.Split(fields[2], "=")[0] == "n" { + err := setFSCacheFields(fields[2:], &m.StoreWriteRequests, &m.StoreSuccessfulRequests, + &m.StoreRequestsOnPendingStorage, &m.StoreRequestsRejectedDueToEnobufs, &m.StoreRequestsFailedDueToEnomem) + if err != nil { + return &m, err + } + } else { + err := setFSCacheFields(fields[2:], &m.StoreRequestsSubmitted, &m.StoreRequestsRunning, + &m.StorePagesWithRequestsProcessing, &m.StoreRequestsDeleted, &m.StoreRequestsOverStoreLimit) + if err != nil { + return &m, err + } + } + case "VmScan": + err := setFSCacheFields(fields[2:], &m.ReleaseRequestsAgainstPagesWithNoPendingStorage, + &m.ReleaseRequestsAgainstPagesStoredByTimeLockGranted, &m.ReleaseRequestsIgnoredDueToInProgressStore, + &m.PageStoresCancelledByReleaseRequests, &m.VmscanWaiting) + if err != nil { + return &m, err + } + case "Ops": + if strings.Split(fields[2], "=")[0] == "pend" { + err := setFSCacheFields(fields[2:], &m.OpsPending, &m.OpsRunning, &m.OpsEnqueued, &m.OpsCancelled, &m.OpsRejected) + if err != nil { + return &m, err + } + } else { + err := setFSCacheFields(fields[2:], &m.OpsInitialised, &m.OpsDeferred, &m.OpsReleased, &m.OpsGarbageCollected) + if err != nil { + return &m, err + } + } + case "CacheOp:": + if strings.Split(fields[1], "=")[0] == "alo" { + err := setFSCacheFields(fields[1:], &m.CacheopAllocationsinProgress, &m.CacheopLookupObjectInProgress, + &m.CacheopLookupCompleteInPorgress, &m.CacheopGrabObjectInProgress) + if err != nil { + return &m, err + } + } else if strings.Split(fields[1], "=")[0] == "inv" { + err := setFSCacheFields(fields[1:], &m.CacheopInvalidations, &m.CacheopUpdateObjectInProgress, + &m.CacheopDropObjectInProgress, &m.CacheopPutObjectInProgress, &m.CacheopAttributeChangeInProgress, + &m.CacheopSyncCacheInProgress) + if err != nil { + return &m, err + } + } else { + err := setFSCacheFields(fields[1:], &m.CacheopReadOrAllocPageInProgress, &m.CacheopReadOrAllocPagesInProgress, + &m.CacheopAllocatePageInProgress, &m.CacheopAllocatePagesInProgress, &m.CacheopWritePagesInProgress, + &m.CacheopUncachePagesInProgress, &m.CacheopDissociatePagesInProgress) + if err != nil { + return &m, err + } + } + case "CacheEv:": + err := setFSCacheFields(fields[1:], &m.CacheevLookupsAndCreationsRejectedLackSpace, &m.CacheevStaleObjectsDeleted, + &m.CacheevRetiredWhenReliquished, &m.CacheevObjectsCulled) + if err != nil { + return &m, err + } + } + } + + return &m, nil +} diff --git a/vendor/github.com/prometheus/procfs/go.mod b/vendor/github.com/prometheus/procfs/go.mod index e89ee6c90f6..ded48253cd6 100644 --- a/vendor/github.com/prometheus/procfs/go.mod +++ b/vendor/github.com/prometheus/procfs/go.mod @@ -1 +1,9 @@ module github.com/prometheus/procfs + +go 1.12 + +require ( + github.com/google/go-cmp v0.3.1 + golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e + golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e +) diff --git a/vendor/github.com/prometheus/procfs/go.sum b/vendor/github.com/prometheus/procfs/go.sum new file mode 100644 index 00000000000..54b5f330339 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/go.sum @@ -0,0 +1,6 @@ +github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e h1:LwyF2AFISC9nVbS6MgzsaQNSUsRXI49GS+YQ5KX/QH0= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/prometheus/procfs/internal/fs/fs.go b/vendor/github.com/prometheus/procfs/internal/fs/fs.go new file mode 100644 index 00000000000..565e89e42c4 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/internal/fs/fs.go @@ -0,0 +1,55 @@ +// Copyright 2019 The Prometheus 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 fs + +import ( + "fmt" + "os" + "path/filepath" +) + +const ( + // DefaultProcMountPoint is the common mount point of the proc filesystem. + DefaultProcMountPoint = "/proc" + + // DefaultSysMountPoint is the common mount point of the sys filesystem. + DefaultSysMountPoint = "/sys" + + // DefaultConfigfsMountPoint is the common mount point of the configfs + DefaultConfigfsMountPoint = "/sys/kernel/config" +) + +// FS represents a pseudo-filesystem, normally /proc or /sys, which provides an +// interface to kernel data structures. +type FS string + +// NewFS returns a new FS mounted under the given mountPoint. It will error +// if the mount point can't be read. +func NewFS(mountPoint string) (FS, error) { + info, err := os.Stat(mountPoint) + if err != nil { + return "", fmt.Errorf("could not read %s: %s", mountPoint, err) + } + if !info.IsDir() { + return "", fmt.Errorf("mount point %s is not a directory", mountPoint) + } + + return FS(mountPoint), nil +} + +// Path appends the given path elements to the filesystem path, adding separators +// as necessary. +func (fs FS) Path(p ...string) string { + return filepath.Join(append([]string{string(fs)}, p...)...) +} diff --git a/vendor/github.com/prometheus/procfs/internal/util/parse.go b/vendor/github.com/prometheus/procfs/internal/util/parse.go index 2ff228e9d1f..22cb07a6bbb 100644 --- a/vendor/github.com/prometheus/procfs/internal/util/parse.go +++ b/vendor/github.com/prometheus/procfs/internal/util/parse.go @@ -49,6 +49,21 @@ func ParseUint64s(ss []string) ([]uint64, error) { return us, nil } +// ParsePInt64s parses a slice of strings into a slice of int64 pointers. +func ParsePInt64s(ss []string) ([]*int64, error) { + us := make([]*int64, 0, len(ss)) + for _, s := range ss { + u, err := strconv.ParseInt(s, 10, 64) + if err != nil { + return nil, err + } + + us = append(us, &u) + } + + return us, nil +} + // ReadUintFromFile reads a file and attempts to parse a uint64 from it. func ReadUintFromFile(path string) (uint64, error) { data, err := ioutil.ReadFile(path) @@ -57,3 +72,26 @@ func ReadUintFromFile(path string) (uint64, error) { } return strconv.ParseUint(strings.TrimSpace(string(data)), 10, 64) } + +// ReadIntFromFile reads a file and attempts to parse a int64 from it. +func ReadIntFromFile(path string) (int64, error) { + data, err := ioutil.ReadFile(path) + if err != nil { + return 0, err + } + return strconv.ParseInt(strings.TrimSpace(string(data)), 10, 64) +} + +// ParseBool parses a string into a boolean pointer. +func ParseBool(b string) *bool { + var truth bool + switch b { + case "enabled": + truth = true + case "disabled": + truth = false + default: + return nil + } + return &truth +} diff --git a/vendor/github.com/prometheus/procfs/internal/util/readfile.go b/vendor/github.com/prometheus/procfs/internal/util/readfile.go new file mode 100644 index 00000000000..8051161b2aa --- /dev/null +++ b/vendor/github.com/prometheus/procfs/internal/util/readfile.go @@ -0,0 +1,38 @@ +// Copyright 2019 The Prometheus 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 util + +import ( + "io" + "io/ioutil" + "os" +) + +// ReadFileNoStat uses ioutil.ReadAll to read contents of entire file. +// This is similar to ioutil.ReadFile but without the call to os.Stat, because +// many files in /proc and /sys report incorrect file sizes (either 0 or 4096). +// Reads a max file size of 512kB. For files larger than this, a scanner +// should be used. +func ReadFileNoStat(filename string) ([]byte, error) { + const maxBufferSize = 1024 * 512 + + f, err := os.Open(filename) + if err != nil { + return nil, err + } + defer f.Close() + + reader := io.LimitReader(f, maxBufferSize) + return ioutil.ReadAll(reader) +} diff --git a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_linux.go b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go similarity index 88% rename from vendor/github.com/prometheus/procfs/internal/util/sysreadfile_linux.go rename to vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go index df0d567b780..c07de0b6c9c 100644 --- a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_linux.go +++ b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build !windows +// +build linux,!appengine package util @@ -23,6 +23,8 @@ import ( // SysReadFile is a simplified ioutil.ReadFile that invokes syscall.Read directly. // https://github.com/prometheus/node_exporter/pull/728/files +// +// Note that this function will not read files larger than 128 bytes. func SysReadFile(file string) (string, error) { f, err := os.Open(file) if err != nil { @@ -35,7 +37,8 @@ func SysReadFile(file string) (string, error) { // // Since we either want to read data or bail immediately, do the simplest // possible read using syscall directly. - b := make([]byte, 128) + const sysFileBufferSize = 128 + b := make([]byte, sysFileBufferSize) n, err := syscall.Read(int(f.Fd()), b) if err != nil { return "", err diff --git a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go new file mode 100644 index 00000000000..bd55b45377d --- /dev/null +++ b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go @@ -0,0 +1,26 @@ +// Copyright 2019 The Prometheus 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. + +// +build linux,appengine !linux + +package util + +import ( + "fmt" +) + +// SysReadFile is here implemented as a noop for builds that do not support +// the read syscall. For example Windows, or Linux on Google App Engine. +func SysReadFile(file string) (string, error) { + return "", fmt.Errorf("not supported on this platform") +} diff --git a/vendor/github.com/prometheus/procfs/internal/util/valueparser.go b/vendor/github.com/prometheus/procfs/internal/util/valueparser.go new file mode 100644 index 00000000000..fe2355d3c6f --- /dev/null +++ b/vendor/github.com/prometheus/procfs/internal/util/valueparser.go @@ -0,0 +1,91 @@ +// Copyright 2019 The Prometheus 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 util + +import ( + "strconv" +) + +// TODO(mdlayher): util packages are an anti-pattern and this should be moved +// somewhere else that is more focused in the future. + +// A ValueParser enables parsing a single string into a variety of data types +// in a concise and safe way. The Err method must be invoked after invoking +// any other methods to ensure a value was successfully parsed. +type ValueParser struct { + v string + err error +} + +// NewValueParser creates a ValueParser using the input string. +func NewValueParser(v string) *ValueParser { + return &ValueParser{v: v} +} + +// Int interprets the underlying value as an int and returns that value. +func (vp *ValueParser) Int() int { return int(vp.int64()) } + +// PInt64 interprets the underlying value as an int64 and returns a pointer to +// that value. +func (vp *ValueParser) PInt64() *int64 { + if vp.err != nil { + return nil + } + + v := vp.int64() + return &v +} + +// int64 interprets the underlying value as an int64 and returns that value. +// TODO: export if/when necessary. +func (vp *ValueParser) int64() int64 { + if vp.err != nil { + return 0 + } + + // A base value of zero makes ParseInt infer the correct base using the + // string's prefix, if any. + const base = 0 + v, err := strconv.ParseInt(vp.v, base, 64) + if err != nil { + vp.err = err + return 0 + } + + return v +} + +// PUInt64 interprets the underlying value as an uint64 and returns a pointer to +// that value. +func (vp *ValueParser) PUInt64() *uint64 { + if vp.err != nil { + return nil + } + + // A base value of zero makes ParseInt infer the correct base using the + // string's prefix, if any. + const base = 0 + v, err := strconv.ParseUint(vp.v, base, 64) + if err != nil { + vp.err = err + return nil + } + + return &v +} + +// Err returns the last error, if any, encountered by the ValueParser. +func (vp *ValueParser) Err() error { + return vp.err +} diff --git a/vendor/github.com/prometheus/procfs/ipvs.go b/vendor/github.com/prometheus/procfs/ipvs.go index e36d4a3bd08..89e447746cf 100644 --- a/vendor/github.com/prometheus/procfs/ipvs.go +++ b/vendor/github.com/prometheus/procfs/ipvs.go @@ -15,6 +15,7 @@ package procfs import ( "bufio" + "bytes" "encoding/hex" "errors" "fmt" @@ -24,6 +25,8 @@ import ( "os" "strconv" "strings" + + "github.com/prometheus/procfs/internal/util" ) // IPVSStats holds IPVS statistics, as exposed by the kernel in `/proc/net/ip_vs_stats`. @@ -62,29 +65,18 @@ type IPVSBackendStatus struct { Weight uint64 } -// NewIPVSStats reads the IPVS statistics. -func NewIPVSStats() (IPVSStats, error) { - fs, err := NewFS(DefaultMountPoint) +// IPVSStats reads the IPVS statistics from the specified `proc` filesystem. +func (fs FS) IPVSStats() (IPVSStats, error) { + data, err := util.ReadFileNoStat(fs.proc.Path("net/ip_vs_stats")) if err != nil { return IPVSStats{}, err } - return fs.NewIPVSStats() -} - -// NewIPVSStats reads the IPVS statistics from the specified `proc` filesystem. -func (fs FS) NewIPVSStats() (IPVSStats, error) { - file, err := os.Open(fs.Path("net/ip_vs_stats")) - if err != nil { - return IPVSStats{}, err - } - defer file.Close() - - return parseIPVSStats(file) + return parseIPVSStats(bytes.NewReader(data)) } // parseIPVSStats performs the actual parsing of `ip_vs_stats`. -func parseIPVSStats(file io.Reader) (IPVSStats, error) { +func parseIPVSStats(r io.Reader) (IPVSStats, error) { var ( statContent []byte statLines []string @@ -92,7 +84,7 @@ func parseIPVSStats(file io.Reader) (IPVSStats, error) { stats IPVSStats ) - statContent, err := ioutil.ReadAll(file) + statContent, err := ioutil.ReadAll(r) if err != nil { return IPVSStats{}, err } @@ -131,19 +123,9 @@ func parseIPVSStats(file io.Reader) (IPVSStats, error) { return stats, nil } -// NewIPVSBackendStatus reads and returns the status of all (virtual,real) server pairs. -func NewIPVSBackendStatus() ([]IPVSBackendStatus, error) { - fs, err := NewFS(DefaultMountPoint) - if err != nil { - return []IPVSBackendStatus{}, err - } - - return fs.NewIPVSBackendStatus() -} - -// NewIPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem. -func (fs FS) NewIPVSBackendStatus() ([]IPVSBackendStatus, error) { - file, err := os.Open(fs.Path("net/ip_vs")) +// IPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem. +func (fs FS) IPVSBackendStatus() ([]IPVSBackendStatus, error) { + file, err := os.Open(fs.proc.Path("net/ip_vs")) if err != nil { return nil, err } diff --git a/vendor/github.com/prometheus/procfs/kernel_random.go b/vendor/github.com/prometheus/procfs/kernel_random.go new file mode 100644 index 00000000000..beefdf02e93 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/kernel_random.go @@ -0,0 +1,62 @@ +// Copyright 2020 The Prometheus 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. + +// +build !windows + +package procfs + +import ( + "os" + + "github.com/prometheus/procfs/internal/util" +) + +// KernelRandom contains information about to the kernel's random number generator. +type KernelRandom struct { + // EntropyAvaliable gives the available entropy, in bits. + EntropyAvaliable *uint64 + // PoolSize gives the size of the entropy pool, in bytes. + PoolSize *uint64 + // URandomMinReseedSeconds is the number of seconds after which the DRNG will be reseeded. + URandomMinReseedSeconds *uint64 + // WriteWakeupThreshold the number of bits of entropy below which we wake up processes + // that do a select(2) or poll(2) for write access to /dev/random. + WriteWakeupThreshold *uint64 + // ReadWakeupThreshold is the number of bits of entropy required for waking up processes that sleep + // waiting for entropy from /dev/random. + ReadWakeupThreshold *uint64 +} + +// KernelRandom returns values from /proc/sys/kernel/random. +func (fs FS) KernelRandom() (KernelRandom, error) { + random := KernelRandom{} + + for file, p := range map[string]**uint64{ + "entropy_avail": &random.EntropyAvaliable, + "poolsize": &random.PoolSize, + "urandom_min_reseed_secs": &random.URandomMinReseedSeconds, + "write_wakeup_threshold": &random.WriteWakeupThreshold, + "read_wakeup_threshold": &random.ReadWakeupThreshold, + } { + val, err := util.ReadUintFromFile(fs.proc.Path("sys", "kernel", "random", file)) + if os.IsNotExist(err) { + continue + } + if err != nil { + return random, err + } + *p = &val + } + + return random, nil +} diff --git a/vendor/github.com/prometheus/procfs/loadavg.go b/vendor/github.com/prometheus/procfs/loadavg.go new file mode 100644 index 00000000000..00bbe144172 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/loadavg.go @@ -0,0 +1,62 @@ +// Copyright 2019 The Prometheus 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 procfs + +import ( + "fmt" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// LoadAvg represents an entry in /proc/loadavg +type LoadAvg struct { + Load1 float64 + Load5 float64 + Load15 float64 +} + +// LoadAvg returns loadavg from /proc. +func (fs FS) LoadAvg() (*LoadAvg, error) { + path := fs.proc.Path("loadavg") + + data, err := util.ReadFileNoStat(path) + if err != nil { + return nil, err + } + return parseLoad(data) +} + +// Parse /proc loadavg and return 1m, 5m and 15m. +func parseLoad(loadavgBytes []byte) (*LoadAvg, error) { + loads := make([]float64, 3) + parts := strings.Fields(string(loadavgBytes)) + if len(parts) < 3 { + return nil, fmt.Errorf("malformed loadavg line: too few fields in loadavg string: %s", string(loadavgBytes)) + } + + var err error + for i, load := range parts[0:3] { + loads[i], err = strconv.ParseFloat(load, 64) + if err != nil { + return nil, fmt.Errorf("could not parse load '%s': %s", load, err) + } + } + return &LoadAvg{ + Load1: loads[0], + Load5: loads[1], + Load15: loads[2], + }, nil +} diff --git a/vendor/github.com/prometheus/procfs/mdstat.go b/vendor/github.com/prometheus/procfs/mdstat.go index 9dc19583d8d..3e9362a94d9 100644 --- a/vendor/github.com/prometheus/procfs/mdstat.go +++ b/vendor/github.com/prometheus/procfs/mdstat.go @@ -22,8 +22,8 @@ import ( ) var ( - statuslineRE = regexp.MustCompile(`(\d+) blocks .*\[(\d+)/(\d+)\] \[[U_]+\]`) - buildlineRE = regexp.MustCompile(`\((\d+)/\d+\)`) + statusLineRE = regexp.MustCompile(`(\d+) blocks .*\[(\d+)/(\d+)\] \[[U_]+\]`) + recoveryLineRE = regexp.MustCompile(`\((\d+)/\d+\)`) ) // MDStat holds info parsed from /proc/mdstat. @@ -34,117 +34,160 @@ type MDStat struct { ActivityState string // Number of active disks. DisksActive int64 - // Total number of disks the device consists of. + // Total number of disks the device requires. DisksTotal int64 + // Number of failed disks. + DisksFailed int64 + // Spare disks in the device. + DisksSpare int64 // Number of blocks the device holds. BlocksTotal int64 // Number of blocks on the device that are in sync. BlocksSynced int64 } -// ParseMDStat parses an mdstat-file and returns a struct with the relevant infos. -func (fs FS) ParseMDStat() (mdstates []MDStat, err error) { - mdStatusFilePath := fs.Path("mdstat") - content, err := ioutil.ReadFile(mdStatusFilePath) +// MDStat parses an mdstat-file (/proc/mdstat) and returns a slice of +// structs containing the relevant info. More information available here: +// https://raid.wiki.kernel.org/index.php/Mdstat +func (fs FS) MDStat() ([]MDStat, error) { + data, err := ioutil.ReadFile(fs.proc.Path("mdstat")) if err != nil { - return []MDStat{}, fmt.Errorf("error parsing %s: %s", mdStatusFilePath, err) + return nil, err } + mdstat, err := parseMDStat(data) + if err != nil { + return nil, fmt.Errorf("error parsing mdstat %s: %s", fs.proc.Path("mdstat"), err) + } + return mdstat, nil +} - mdStates := []MDStat{} - lines := strings.Split(string(content), "\n") - for i, l := range lines { - if l == "" { - continue - } - if l[0] == ' ' { - continue - } - if strings.HasPrefix(l, "Personalities") || strings.HasPrefix(l, "unused") { +// parseMDStat parses data from mdstat file (/proc/mdstat) and returns a slice of +// structs containing the relevant info. +func parseMDStat(mdStatData []byte) ([]MDStat, error) { + mdStats := []MDStat{} + lines := strings.Split(string(mdStatData), "\n") + + for i, line := range lines { + if strings.TrimSpace(line) == "" || line[0] == ' ' || + strings.HasPrefix(line, "Personalities") || + strings.HasPrefix(line, "unused") { continue } - mainLine := strings.Split(l, " ") - if len(mainLine) < 3 { - return mdStates, fmt.Errorf("error parsing mdline: %s", l) + deviceFields := strings.Fields(line) + if len(deviceFields) < 3 { + return nil, fmt.Errorf("not enough fields in mdline (expected at least 3): %s", line) } - mdName := mainLine[0] - activityState := mainLine[2] + mdName := deviceFields[0] // mdx + state := deviceFields[2] // active or inactive if len(lines) <= i+3 { - return mdStates, fmt.Errorf( - "error parsing %s: too few lines for md device %s", - mdStatusFilePath, + return nil, fmt.Errorf( + "error parsing %s: too few lines for md device", mdName, ) } - active, total, size, err := evalStatusline(lines[i+1]) + // Failed disks have the suffix (F) & Spare disks have the suffix (S). + fail := int64(strings.Count(line, "(F)")) + spare := int64(strings.Count(line, "(S)")) + active, total, size, err := evalStatusLine(lines[i], lines[i+1]) + if err != nil { - return mdStates, fmt.Errorf("error parsing %s: %s", mdStatusFilePath, err) + return nil, fmt.Errorf("error parsing md device lines: %s", err) } - // j is the line number of the syncing-line. - j := i + 2 + syncLineIdx := i + 2 if strings.Contains(lines[i+2], "bitmap") { // skip bitmap line - j = i + 3 + syncLineIdx++ } // If device is syncing at the moment, get the number of currently // synced bytes, otherwise that number equals the size of the device. syncedBlocks := size - if strings.Contains(lines[j], "recovery") || strings.Contains(lines[j], "resync") { - syncedBlocks, err = evalBuildline(lines[j]) - if err != nil { - return mdStates, fmt.Errorf("error parsing %s: %s", mdStatusFilePath, err) + recovering := strings.Contains(lines[syncLineIdx], "recovery") + resyncing := strings.Contains(lines[syncLineIdx], "resync") + + // Append recovery and resyncing state info. + if recovering || resyncing { + if recovering { + state = "recovering" + } else { + state = "resyncing" + } + + // Handle case when resync=PENDING or resync=DELAYED. + if strings.Contains(lines[syncLineIdx], "PENDING") || + strings.Contains(lines[syncLineIdx], "DELAYED") { + syncedBlocks = 0 + } else { + syncedBlocks, err = evalRecoveryLine(lines[syncLineIdx]) + if err != nil { + return nil, fmt.Errorf("error parsing sync line in md device %s: %s", mdName, err) + } } } - mdStates = append(mdStates, MDStat{ + mdStats = append(mdStats, MDStat{ Name: mdName, - ActivityState: activityState, + ActivityState: state, DisksActive: active, + DisksFailed: fail, + DisksSpare: spare, DisksTotal: total, BlocksTotal: size, BlocksSynced: syncedBlocks, }) } - return mdStates, nil + return mdStats, nil } -func evalStatusline(statusline string) (active, total, size int64, err error) { - matches := statuslineRE.FindStringSubmatch(statusline) - if len(matches) != 4 { - return 0, 0, 0, fmt.Errorf("unexpected statusline: %s", statusline) +func evalStatusLine(deviceLine, statusLine string) (active, total, size int64, err error) { + + sizeStr := strings.Fields(statusLine)[0] + size, err = strconv.ParseInt(sizeStr, 10, 64) + if err != nil { + return 0, 0, 0, fmt.Errorf("unexpected statusLine %s: %s", statusLine, err) } - size, err = strconv.ParseInt(matches[1], 10, 64) - if err != nil { - return 0, 0, 0, fmt.Errorf("unexpected statusline %s: %s", statusline, err) + if strings.Contains(deviceLine, "raid0") || strings.Contains(deviceLine, "linear") { + // In the device deviceLine, only disks have a number associated with them in []. + total = int64(strings.Count(deviceLine, "[")) + return total, total, size, nil + } + + if strings.Contains(deviceLine, "inactive") { + return 0, 0, size, nil + } + + matches := statusLineRE.FindStringSubmatch(statusLine) + if len(matches) != 4 { + return 0, 0, 0, fmt.Errorf("couldn't find all the substring matches: %s", statusLine) } total, err = strconv.ParseInt(matches[2], 10, 64) if err != nil { - return 0, 0, 0, fmt.Errorf("unexpected statusline %s: %s", statusline, err) + return 0, 0, 0, fmt.Errorf("unexpected statusLine %s: %s", statusLine, err) } active, err = strconv.ParseInt(matches[3], 10, 64) if err != nil { - return 0, 0, 0, fmt.Errorf("unexpected statusline %s: %s", statusline, err) + return 0, 0, 0, fmt.Errorf("unexpected statusLine %s: %s", statusLine, err) } return active, total, size, nil } -func evalBuildline(buildline string) (syncedBlocks int64, err error) { - matches := buildlineRE.FindStringSubmatch(buildline) +func evalRecoveryLine(recoveryLine string) (syncedBlocks int64, err error) { + matches := recoveryLineRE.FindStringSubmatch(recoveryLine) if len(matches) != 2 { - return 0, fmt.Errorf("unexpected buildline: %s", buildline) + return 0, fmt.Errorf("unexpected recoveryLine: %s", recoveryLine) } syncedBlocks, err = strconv.ParseInt(matches[1], 10, 64) if err != nil { - return 0, fmt.Errorf("%s in buildline: %s", err, buildline) + return 0, fmt.Errorf("%s in recoveryLine: %s", err, recoveryLine) } return syncedBlocks, nil diff --git a/vendor/github.com/prometheus/procfs/meminfo.go b/vendor/github.com/prometheus/procfs/meminfo.go new file mode 100644 index 00000000000..50dab4bcd59 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/meminfo.go @@ -0,0 +1,277 @@ +// Copyright 2019 The Prometheus 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 procfs + +import ( + "bufio" + "bytes" + "fmt" + "io" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// Meminfo represents memory statistics. +type Meminfo struct { + // Total usable ram (i.e. physical ram minus a few reserved + // bits and the kernel binary code) + MemTotal uint64 + // The sum of LowFree+HighFree + MemFree uint64 + // An estimate of how much memory is available for starting + // new applications, without swapping. Calculated from + // MemFree, SReclaimable, the size of the file LRU lists, and + // the low watermarks in each zone. The estimate takes into + // account that the system needs some page cache to function + // well, and that not all reclaimable slab will be + // reclaimable, due to items being in use. The impact of those + // factors will vary from system to system. + MemAvailable uint64 + // Relatively temporary storage for raw disk blocks shouldn't + // get tremendously large (20MB or so) + Buffers uint64 + Cached uint64 + // Memory that once was swapped out, is swapped back in but + // still also is in the swapfile (if memory is needed it + // doesn't need to be swapped out AGAIN because it is already + // in the swapfile. This saves I/O) + SwapCached uint64 + // Memory that has been used more recently and usually not + // reclaimed unless absolutely necessary. + Active uint64 + // Memory which has been less recently used. It is more + // eligible to be reclaimed for other purposes + Inactive uint64 + ActiveAnon uint64 + InactiveAnon uint64 + ActiveFile uint64 + InactiveFile uint64 + Unevictable uint64 + Mlocked uint64 + // total amount of swap space available + SwapTotal uint64 + // Memory which has been evicted from RAM, and is temporarily + // on the disk + SwapFree uint64 + // Memory which is waiting to get written back to the disk + Dirty uint64 + // Memory which is actively being written back to the disk + Writeback uint64 + // Non-file backed pages mapped into userspace page tables + AnonPages uint64 + // files which have been mapped, such as libraries + Mapped uint64 + Shmem uint64 + // in-kernel data structures cache + Slab uint64 + // Part of Slab, that might be reclaimed, such as caches + SReclaimable uint64 + // Part of Slab, that cannot be reclaimed on memory pressure + SUnreclaim uint64 + KernelStack uint64 + // amount of memory dedicated to the lowest level of page + // tables. + PageTables uint64 + // NFS pages sent to the server, but not yet committed to + // stable storage + NFSUnstable uint64 + // Memory used for block device "bounce buffers" + Bounce uint64 + // Memory used by FUSE for temporary writeback buffers + WritebackTmp uint64 + // Based on the overcommit ratio ('vm.overcommit_ratio'), + // this is the total amount of memory currently available to + // be allocated on the system. This limit is only adhered to + // if strict overcommit accounting is enabled (mode 2 in + // 'vm.overcommit_memory'). + // The CommitLimit is calculated with the following formula: + // CommitLimit = ([total RAM pages] - [total huge TLB pages]) * + // overcommit_ratio / 100 + [total swap pages] + // For example, on a system with 1G of physical RAM and 7G + // of swap with a `vm.overcommit_ratio` of 30 it would + // yield a CommitLimit of 7.3G. + // For more details, see the memory overcommit documentation + // in vm/overcommit-accounting. + CommitLimit uint64 + // The amount of memory presently allocated on the system. + // The committed memory is a sum of all of the memory which + // has been allocated by processes, even if it has not been + // "used" by them as of yet. A process which malloc()'s 1G + // of memory, but only touches 300M of it will show up as + // using 1G. This 1G is memory which has been "committed" to + // by the VM and can be used at any time by the allocating + // application. With strict overcommit enabled on the system + // (mode 2 in 'vm.overcommit_memory'),allocations which would + // exceed the CommitLimit (detailed above) will not be permitted. + // This is useful if one needs to guarantee that processes will + // not fail due to lack of memory once that memory has been + // successfully allocated. + CommittedAS uint64 + // total size of vmalloc memory area + VmallocTotal uint64 + // amount of vmalloc area which is used + VmallocUsed uint64 + // largest contiguous block of vmalloc area which is free + VmallocChunk uint64 + HardwareCorrupted uint64 + AnonHugePages uint64 + ShmemHugePages uint64 + ShmemPmdMapped uint64 + CmaTotal uint64 + CmaFree uint64 + HugePagesTotal uint64 + HugePagesFree uint64 + HugePagesRsvd uint64 + HugePagesSurp uint64 + Hugepagesize uint64 + DirectMap4k uint64 + DirectMap2M uint64 + DirectMap1G uint64 +} + +// Meminfo returns an information about current kernel/system memory statistics. +// See https://www.kernel.org/doc/Documentation/filesystems/proc.txt +func (fs FS) Meminfo() (Meminfo, error) { + b, err := util.ReadFileNoStat(fs.proc.Path("meminfo")) + if err != nil { + return Meminfo{}, err + } + + m, err := parseMemInfo(bytes.NewReader(b)) + if err != nil { + return Meminfo{}, fmt.Errorf("failed to parse meminfo: %v", err) + } + + return *m, nil +} + +func parseMemInfo(r io.Reader) (*Meminfo, error) { + var m Meminfo + s := bufio.NewScanner(r) + for s.Scan() { + // Each line has at least a name and value; we ignore the unit. + fields := strings.Fields(s.Text()) + if len(fields) < 2 { + return nil, fmt.Errorf("malformed meminfo line: %q", s.Text()) + } + + v, err := strconv.ParseUint(fields[1], 0, 64) + if err != nil { + return nil, err + } + + switch fields[0] { + case "MemTotal:": + m.MemTotal = v + case "MemFree:": + m.MemFree = v + case "MemAvailable:": + m.MemAvailable = v + case "Buffers:": + m.Buffers = v + case "Cached:": + m.Cached = v + case "SwapCached:": + m.SwapCached = v + case "Active:": + m.Active = v + case "Inactive:": + m.Inactive = v + case "Active(anon):": + m.ActiveAnon = v + case "Inactive(anon):": + m.InactiveAnon = v + case "Active(file):": + m.ActiveFile = v + case "Inactive(file):": + m.InactiveFile = v + case "Unevictable:": + m.Unevictable = v + case "Mlocked:": + m.Mlocked = v + case "SwapTotal:": + m.SwapTotal = v + case "SwapFree:": + m.SwapFree = v + case "Dirty:": + m.Dirty = v + case "Writeback:": + m.Writeback = v + case "AnonPages:": + m.AnonPages = v + case "Mapped:": + m.Mapped = v + case "Shmem:": + m.Shmem = v + case "Slab:": + m.Slab = v + case "SReclaimable:": + m.SReclaimable = v + case "SUnreclaim:": + m.SUnreclaim = v + case "KernelStack:": + m.KernelStack = v + case "PageTables:": + m.PageTables = v + case "NFS_Unstable:": + m.NFSUnstable = v + case "Bounce:": + m.Bounce = v + case "WritebackTmp:": + m.WritebackTmp = v + case "CommitLimit:": + m.CommitLimit = v + case "Committed_AS:": + m.CommittedAS = v + case "VmallocTotal:": + m.VmallocTotal = v + case "VmallocUsed:": + m.VmallocUsed = v + case "VmallocChunk:": + m.VmallocChunk = v + case "HardwareCorrupted:": + m.HardwareCorrupted = v + case "AnonHugePages:": + m.AnonHugePages = v + case "ShmemHugePages:": + m.ShmemHugePages = v + case "ShmemPmdMapped:": + m.ShmemPmdMapped = v + case "CmaTotal:": + m.CmaTotal = v + case "CmaFree:": + m.CmaFree = v + case "HugePages_Total:": + m.HugePagesTotal = v + case "HugePages_Free:": + m.HugePagesFree = v + case "HugePages_Rsvd:": + m.HugePagesRsvd = v + case "HugePages_Surp:": + m.HugePagesSurp = v + case "Hugepagesize:": + m.Hugepagesize = v + case "DirectMap4k:": + m.DirectMap4k = v + case "DirectMap2M:": + m.DirectMap2M = v + case "DirectMap1G:": + m.DirectMap1G = v + } + } + + return &m, nil +} diff --git a/vendor/github.com/prometheus/procfs/mountinfo.go b/vendor/github.com/prometheus/procfs/mountinfo.go new file mode 100644 index 00000000000..59f4d505583 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/mountinfo.go @@ -0,0 +1,180 @@ +// Copyright 2019 The Prometheus 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 procfs + +import ( + "bufio" + "bytes" + "fmt" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// A MountInfo is a type that describes the details, options +// for each mount, parsed from /proc/self/mountinfo. +// The fields described in each entry of /proc/self/mountinfo +// is described in the following man page. +// http://man7.org/linux/man-pages/man5/proc.5.html +type MountInfo struct { + // Unique ID for the mount + MountID int + // The ID of the parent mount + ParentID int + // The value of `st_dev` for the files on this FS + MajorMinorVer string + // The pathname of the directory in the FS that forms + // the root for this mount + Root string + // The pathname of the mount point relative to the root + MountPoint string + // Mount options + Options map[string]string + // Zero or more optional fields + OptionalFields map[string]string + // The Filesystem type + FSType string + // FS specific information or "none" + Source string + // Superblock options + SuperOptions map[string]string +} + +// Reads each line of the mountinfo file, and returns a list of formatted MountInfo structs. +func parseMountInfo(info []byte) ([]*MountInfo, error) { + mounts := []*MountInfo{} + scanner := bufio.NewScanner(bytes.NewReader(info)) + for scanner.Scan() { + mountString := scanner.Text() + parsedMounts, err := parseMountInfoString(mountString) + if err != nil { + return nil, err + } + mounts = append(mounts, parsedMounts) + } + + err := scanner.Err() + return mounts, err +} + +// Parses a mountinfo file line, and converts it to a MountInfo struct. +// An important check here is to see if the hyphen separator, as if it does not exist, +// it means that the line is malformed. +func parseMountInfoString(mountString string) (*MountInfo, error) { + var err error + + mountInfo := strings.Split(mountString, " ") + mountInfoLength := len(mountInfo) + if mountInfoLength < 10 { + return nil, fmt.Errorf("couldn't find enough fields in mount string: %s", mountString) + } + + if mountInfo[mountInfoLength-4] != "-" { + return nil, fmt.Errorf("couldn't find separator in expected field: %s", mountInfo[mountInfoLength-4]) + } + + mount := &MountInfo{ + MajorMinorVer: mountInfo[2], + Root: mountInfo[3], + MountPoint: mountInfo[4], + Options: mountOptionsParser(mountInfo[5]), + OptionalFields: nil, + FSType: mountInfo[mountInfoLength-3], + Source: mountInfo[mountInfoLength-2], + SuperOptions: mountOptionsParser(mountInfo[mountInfoLength-1]), + } + + mount.MountID, err = strconv.Atoi(mountInfo[0]) + if err != nil { + return nil, fmt.Errorf("failed to parse mount ID") + } + mount.ParentID, err = strconv.Atoi(mountInfo[1]) + if err != nil { + return nil, fmt.Errorf("failed to parse parent ID") + } + // Has optional fields, which is a space separated list of values. + // Example: shared:2 master:7 + if mountInfo[6] != "" { + mount.OptionalFields, err = mountOptionsParseOptionalFields(mountInfo[6 : mountInfoLength-4]) + if err != nil { + return nil, err + } + } + return mount, nil +} + +// mountOptionsIsValidField checks a string against a valid list of optional fields keys. +func mountOptionsIsValidField(s string) bool { + switch s { + case + "shared", + "master", + "propagate_from", + "unbindable": + return true + } + return false +} + +// mountOptionsParseOptionalFields parses a list of optional fields strings into a double map of strings. +func mountOptionsParseOptionalFields(o []string) (map[string]string, error) { + optionalFields := make(map[string]string) + for _, field := range o { + optionSplit := strings.SplitN(field, ":", 2) + value := "" + if len(optionSplit) == 2 { + value = optionSplit[1] + } + if mountOptionsIsValidField(optionSplit[0]) { + optionalFields[optionSplit[0]] = value + } + } + return optionalFields, nil +} + +// mountOptionsParser parses the mount options, superblock options. +func mountOptionsParser(mountOptions string) map[string]string { + opts := make(map[string]string) + options := strings.Split(mountOptions, ",") + for _, opt := range options { + splitOption := strings.Split(opt, "=") + if len(splitOption) < 2 { + key := splitOption[0] + opts[key] = "" + } else { + key, value := splitOption[0], splitOption[1] + opts[key] = value + } + } + return opts +} + +// GetMounts retrieves mountinfo information from `/proc/self/mountinfo`. +func GetMounts() ([]*MountInfo, error) { + data, err := util.ReadFileNoStat("/proc/self/mountinfo") + if err != nil { + return nil, err + } + return parseMountInfo(data) +} + +// GetProcMounts retrieves mountinfo information from a processes' `/proc//mountinfo`. +func GetProcMounts(pid int) ([]*MountInfo, error) { + data, err := util.ReadFileNoStat(fmt.Sprintf("/proc/%d/mountinfo", pid)) + if err != nil { + return nil, err + } + return parseMountInfo(data) +} diff --git a/vendor/github.com/prometheus/procfs/mountstats.go b/vendor/github.com/prometheus/procfs/mountstats.go index 7a8a1e09901..861ced9da03 100644 --- a/vendor/github.com/prometheus/procfs/mountstats.go +++ b/vendor/github.com/prometheus/procfs/mountstats.go @@ -69,6 +69,8 @@ type MountStats interface { type MountStatsNFS struct { // The version of statistics provided. StatVersion string + // The mount options of the NFS mount. + Opts map[string]string // The age of the NFS mount. Age time.Duration // Statistics related to byte counters for various operations. @@ -179,11 +181,13 @@ type NFSOperationStats struct { // Number of bytes received for this operation, including RPC headers and payload. BytesReceived uint64 // Duration all requests spent queued for transmission before they were sent. - CumulativeQueueTime time.Duration + CumulativeQueueMilliseconds uint64 // Duration it took to get a reply back after the request was transmitted. - CumulativeTotalResponseTime time.Duration + CumulativeTotalResponseMilliseconds uint64 // Duration from when a request was enqueued to when it was completely handled. - CumulativeTotalRequestTime time.Duration + CumulativeTotalRequestMilliseconds uint64 + // The count of operations that complete with tk_status < 0. These statuses usually indicate error conditions. + Errors uint64 } // A NFSTransportStats contains statistics for the NFS mount RPC requests and @@ -202,7 +206,7 @@ type NFSTransportStats struct { // spent waiting for connections to the server to be established. ConnectIdleTime uint64 // Duration since the NFS mount last saw any RPC traffic. - IdleTime time.Duration + IdleTimeSeconds uint64 // Number of RPC requests for this mount sent to the NFS server. Sends uint64 // Number of RPC responses for this mount received from the NFS server. @@ -317,6 +321,7 @@ func parseMount(ss []string) (*Mount, error) { func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, error) { // Field indicators for parsing specific types of data const ( + fieldOpts = "opts:" fieldAge = "age:" fieldBytes = "bytes:" fieldEvents = "events:" @@ -338,6 +343,18 @@ func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, e } switch ss[0] { + case fieldOpts: + if stats.Opts == nil { + stats.Opts = map[string]string{} + } + for _, opt := range strings.Split(ss[1], ",") { + split := strings.Split(opt, "=") + if len(split) == 2 { + stats.Opts[split[0]] = split[1] + } else { + stats.Opts[opt] = "" + } + } case fieldAge: // Age integer is in seconds d, err := time.ParseDuration(ss[1] + "s") @@ -479,8 +496,8 @@ func parseNFSEventsStats(ss []string) (*NFSEventsStats, error) { // line is reached. func parseNFSOperationStats(s *bufio.Scanner) ([]NFSOperationStats, error) { const ( - // Number of expected fields in each per-operation statistics set - numFields = 9 + // Minimum number of expected fields in each per-operation statistics set + minFields = 9 ) var ops []NFSOperationStats @@ -493,12 +510,12 @@ func parseNFSOperationStats(s *bufio.Scanner) ([]NFSOperationStats, error) { break } - if len(ss) != numFields { + if len(ss) < minFields { return nil, fmt.Errorf("invalid NFS per-operations stats: %v", ss) } // Skip string operation name for integers - ns := make([]uint64, 0, numFields-1) + ns := make([]uint64, 0, minFields-1) for _, st := range ss[1:] { n, err := strconv.ParseUint(st, 10, 64) if err != nil { @@ -508,17 +525,23 @@ func parseNFSOperationStats(s *bufio.Scanner) ([]NFSOperationStats, error) { ns = append(ns, n) } - ops = append(ops, NFSOperationStats{ - Operation: strings.TrimSuffix(ss[0], ":"), - Requests: ns[0], - Transmissions: ns[1], - MajorTimeouts: ns[2], - BytesSent: ns[3], - BytesReceived: ns[4], - CumulativeQueueTime: time.Duration(ns[5]) * time.Millisecond, - CumulativeTotalResponseTime: time.Duration(ns[6]) * time.Millisecond, - CumulativeTotalRequestTime: time.Duration(ns[7]) * time.Millisecond, - }) + opStats := NFSOperationStats{ + Operation: strings.TrimSuffix(ss[0], ":"), + Requests: ns[0], + Transmissions: ns[1], + MajorTimeouts: ns[2], + BytesSent: ns[3], + BytesReceived: ns[4], + CumulativeQueueMilliseconds: ns[5], + CumulativeTotalResponseMilliseconds: ns[6], + CumulativeTotalRequestMilliseconds: ns[7], + } + + if len(ns) > 8 { + opStats.Errors = ns[8] + } + + ops = append(ops, opStats) } return ops, s.Err() @@ -593,7 +616,7 @@ func parseNFSTransportStats(ss []string, statVersion string) (*NFSTransportStats Bind: ns[1], Connect: ns[2], ConnectIdleTime: ns[3], - IdleTime: time.Duration(ns[4]) * time.Second, + IdleTimeSeconds: ns[4], Sends: ns[5], Receives: ns[6], BadTransactionIDs: ns[7], diff --git a/vendor/github.com/prometheus/procfs/net_conntrackstat.go b/vendor/github.com/prometheus/procfs/net_conntrackstat.go new file mode 100644 index 00000000000..b637be98458 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/net_conntrackstat.go @@ -0,0 +1,153 @@ +// Copyright 2020 The Prometheus 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 procfs + +import ( + "bufio" + "bytes" + "fmt" + "io" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// A ConntrackStatEntry represents one line from net/stat/nf_conntrack +// and contains netfilter conntrack statistics at one CPU core +type ConntrackStatEntry struct { + Entries uint64 + Found uint64 + Invalid uint64 + Ignore uint64 + Insert uint64 + InsertFailed uint64 + Drop uint64 + EarlyDrop uint64 + SearchRestart uint64 +} + +// ConntrackStat retrieves netfilter's conntrack statistics, split by CPU cores +func (fs FS) ConntrackStat() ([]ConntrackStatEntry, error) { + return readConntrackStat(fs.proc.Path("net", "stat", "nf_conntrack")) +} + +// Parses a slice of ConntrackStatEntries from the given filepath +func readConntrackStat(path string) ([]ConntrackStatEntry, error) { + // This file is small and can be read with one syscall. + b, err := util.ReadFileNoStat(path) + if err != nil { + // Do not wrap this error so the caller can detect os.IsNotExist and + // similar conditions. + return nil, err + } + + stat, err := parseConntrackStat(bytes.NewReader(b)) + if err != nil { + return nil, fmt.Errorf("failed to read conntrack stats from %q: %v", path, err) + } + + return stat, nil +} + +// Reads the contents of a conntrack statistics file and parses a slice of ConntrackStatEntries +func parseConntrackStat(r io.Reader) ([]ConntrackStatEntry, error) { + var entries []ConntrackStatEntry + + scanner := bufio.NewScanner(r) + scanner.Scan() + for scanner.Scan() { + fields := strings.Fields(scanner.Text()) + conntrackEntry, err := parseConntrackStatEntry(fields) + if err != nil { + return nil, err + } + entries = append(entries, *conntrackEntry) + } + + return entries, nil +} + +// Parses a ConntrackStatEntry from given array of fields +func parseConntrackStatEntry(fields []string) (*ConntrackStatEntry, error) { + if len(fields) != 17 { + return nil, fmt.Errorf("invalid conntrackstat entry, missing fields") + } + entry := &ConntrackStatEntry{} + + entries, err := parseConntrackStatField(fields[0]) + if err != nil { + return nil, err + } + entry.Entries = entries + + found, err := parseConntrackStatField(fields[2]) + if err != nil { + return nil, err + } + entry.Found = found + + invalid, err := parseConntrackStatField(fields[4]) + if err != nil { + return nil, err + } + entry.Invalid = invalid + + ignore, err := parseConntrackStatField(fields[5]) + if err != nil { + return nil, err + } + entry.Ignore = ignore + + insert, err := parseConntrackStatField(fields[8]) + if err != nil { + return nil, err + } + entry.Insert = insert + + insertFailed, err := parseConntrackStatField(fields[9]) + if err != nil { + return nil, err + } + entry.InsertFailed = insertFailed + + drop, err := parseConntrackStatField(fields[10]) + if err != nil { + return nil, err + } + entry.Drop = drop + + earlyDrop, err := parseConntrackStatField(fields[11]) + if err != nil { + return nil, err + } + entry.EarlyDrop = earlyDrop + + searchRestart, err := parseConntrackStatField(fields[16]) + if err != nil { + return nil, err + } + entry.SearchRestart = searchRestart + + return entry, nil +} + +// Parses a uint64 from given hex in string +func parseConntrackStatField(field string) (uint64, error) { + val, err := strconv.ParseUint(field, 16, 64) + if err != nil { + return 0, fmt.Errorf("couldn't parse \"%s\" field: %s", field, err) + } + return val, err +} diff --git a/vendor/github.com/prometheus/procfs/net_dev.go b/vendor/github.com/prometheus/procfs/net_dev.go index 3f2523371ab..47a710befb9 100644 --- a/vendor/github.com/prometheus/procfs/net_dev.go +++ b/vendor/github.com/prometheus/procfs/net_dev.go @@ -47,23 +47,13 @@ type NetDevLine struct { // are interface names. type NetDev map[string]NetDevLine -// NewNetDev returns kernel/system statistics read from /proc/net/dev. -func NewNetDev() (NetDev, error) { - fs, err := NewFS(DefaultMountPoint) - if err != nil { - return nil, err - } - - return fs.NewNetDev() +// NetDev returns kernel/system statistics read from /proc/net/dev. +func (fs FS) NetDev() (NetDev, error) { + return newNetDev(fs.proc.Path("net/dev")) } -// NewNetDev returns kernel/system statistics read from /proc/net/dev. -func (fs FS) NewNetDev() (NetDev, error) { - return newNetDev(fs.Path("net/dev")) -} - -// NewNetDev returns kernel/system statistics read from /proc/[pid]/net/dev. -func (p Proc) NewNetDev() (NetDev, error) { +// NetDev returns kernel/system statistics read from /proc/[pid]/net/dev. +func (p Proc) NetDev() (NetDev, error) { return newNetDev(p.path("net/dev")) } @@ -75,7 +65,7 @@ func newNetDev(file string) (NetDev, error) { } defer f.Close() - nd := NetDev{} + netDev := NetDev{} s := bufio.NewScanner(f) for n := 0; s.Scan(); n++ { // Skip the 2 header lines. @@ -83,20 +73,20 @@ func newNetDev(file string) (NetDev, error) { continue } - line, err := nd.parseLine(s.Text()) + line, err := netDev.parseLine(s.Text()) if err != nil { - return nd, err + return netDev, err } - nd[line.Name] = *line + netDev[line.Name] = *line } - return nd, s.Err() + return netDev, s.Err() } // parseLine parses a single line from the /proc/net/dev file. Header lines // must be filtered prior to calling this method. -func (nd NetDev) parseLine(rawLine string) (*NetDevLine, error) { +func (netDev NetDev) parseLine(rawLine string) (*NetDevLine, error) { parts := strings.SplitN(rawLine, ":", 2) if len(parts) != 2 { return nil, errors.New("invalid net/dev line, missing colon") @@ -185,15 +175,14 @@ func (nd NetDev) parseLine(rawLine string) (*NetDevLine, error) { // Total aggregates the values across interfaces and returns a new NetDevLine. // The Name field will be a sorted comma separated list of interface names. -func (nd NetDev) Total() NetDevLine { +func (netDev NetDev) Total() NetDevLine { total := NetDevLine{} - names := make([]string, 0, len(nd)) - for _, ifc := range nd { + names := make([]string, 0, len(netDev)) + for _, ifc := range netDev { names = append(names, ifc.Name) total.RxBytes += ifc.RxBytes total.RxPackets += ifc.RxPackets - total.RxPackets += ifc.RxPackets total.RxErrors += ifc.RxErrors total.RxDropped += ifc.RxDropped total.RxFIFO += ifc.RxFIFO diff --git a/vendor/github.com/prometheus/procfs/net_sockstat.go b/vendor/github.com/prometheus/procfs/net_sockstat.go new file mode 100644 index 00000000000..f91ef552376 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/net_sockstat.go @@ -0,0 +1,163 @@ +// Copyright 2019 The Prometheus 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 procfs + +import ( + "bufio" + "bytes" + "errors" + "fmt" + "io" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// A NetSockstat contains the output of /proc/net/sockstat{,6} for IPv4 or IPv6, +// respectively. +type NetSockstat struct { + // Used is non-nil for IPv4 sockstat results, but nil for IPv6. + Used *int + Protocols []NetSockstatProtocol +} + +// A NetSockstatProtocol contains statistics about a given socket protocol. +// Pointer fields indicate that the value may or may not be present on any +// given protocol. +type NetSockstatProtocol struct { + Protocol string + InUse int + Orphan *int + TW *int + Alloc *int + Mem *int + Memory *int +} + +// NetSockstat retrieves IPv4 socket statistics. +func (fs FS) NetSockstat() (*NetSockstat, error) { + return readSockstat(fs.proc.Path("net", "sockstat")) +} + +// NetSockstat6 retrieves IPv6 socket statistics. +// +// If IPv6 is disabled on this kernel, the returned error can be checked with +// os.IsNotExist. +func (fs FS) NetSockstat6() (*NetSockstat, error) { + return readSockstat(fs.proc.Path("net", "sockstat6")) +} + +// readSockstat opens and parses a NetSockstat from the input file. +func readSockstat(name string) (*NetSockstat, error) { + // This file is small and can be read with one syscall. + b, err := util.ReadFileNoStat(name) + if err != nil { + // Do not wrap this error so the caller can detect os.IsNotExist and + // similar conditions. + return nil, err + } + + stat, err := parseSockstat(bytes.NewReader(b)) + if err != nil { + return nil, fmt.Errorf("failed to read sockstats from %q: %v", name, err) + } + + return stat, nil +} + +// parseSockstat reads the contents of a sockstat file and parses a NetSockstat. +func parseSockstat(r io.Reader) (*NetSockstat, error) { + var stat NetSockstat + s := bufio.NewScanner(r) + for s.Scan() { + // Expect a minimum of a protocol and one key/value pair. + fields := strings.Split(s.Text(), " ") + if len(fields) < 3 { + return nil, fmt.Errorf("malformed sockstat line: %q", s.Text()) + } + + // The remaining fields are key/value pairs. + kvs, err := parseSockstatKVs(fields[1:]) + if err != nil { + return nil, fmt.Errorf("error parsing sockstat key/value pairs from %q: %v", s.Text(), err) + } + + // The first field is the protocol. We must trim its colon suffix. + proto := strings.TrimSuffix(fields[0], ":") + switch proto { + case "sockets": + // Special case: IPv4 has a sockets "used" key/value pair that we + // embed at the top level of the structure. + used := kvs["used"] + stat.Used = &used + default: + // Parse all other lines as individual protocols. + nsp := parseSockstatProtocol(kvs) + nsp.Protocol = proto + stat.Protocols = append(stat.Protocols, nsp) + } + } + + if err := s.Err(); err != nil { + return nil, err + } + + return &stat, nil +} + +// parseSockstatKVs parses a string slice into a map of key/value pairs. +func parseSockstatKVs(kvs []string) (map[string]int, error) { + if len(kvs)%2 != 0 { + return nil, errors.New("odd number of fields in key/value pairs") + } + + // Iterate two values at a time to gather key/value pairs. + out := make(map[string]int, len(kvs)/2) + for i := 0; i < len(kvs); i += 2 { + vp := util.NewValueParser(kvs[i+1]) + out[kvs[i]] = vp.Int() + + if err := vp.Err(); err != nil { + return nil, err + } + } + + return out, nil +} + +// parseSockstatProtocol parses a NetSockstatProtocol from the input kvs map. +func parseSockstatProtocol(kvs map[string]int) NetSockstatProtocol { + var nsp NetSockstatProtocol + for k, v := range kvs { + // Capture the range variable to ensure we get unique pointers for + // each of the optional fields. + v := v + switch k { + case "inuse": + nsp.InUse = v + case "orphan": + nsp.Orphan = &v + case "tw": + nsp.TW = &v + case "alloc": + nsp.Alloc = &v + case "mem": + nsp.Mem = &v + case "memory": + nsp.Memory = &v + } + } + + return nsp +} diff --git a/vendor/github.com/prometheus/procfs/net_softnet.go b/vendor/github.com/prometheus/procfs/net_softnet.go new file mode 100644 index 00000000000..db5debdf4a1 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/net_softnet.go @@ -0,0 +1,102 @@ +// Copyright 2019 The Prometheus 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 procfs + +import ( + "bufio" + "bytes" + "fmt" + "io" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// For the proc file format details, +// See: +// * Linux 2.6.23 https://elixir.bootlin.com/linux/v2.6.23/source/net/core/dev.c#L2343 +// * Linux 4.17 https://elixir.bootlin.com/linux/v4.17/source/net/core/net-procfs.c#L162 +// and https://elixir.bootlin.com/linux/v4.17/source/include/linux/netdevice.h#L2810. + +// SoftnetStat contains a single row of data from /proc/net/softnet_stat +type SoftnetStat struct { + // Number of processed packets + Processed uint32 + // Number of dropped packets + Dropped uint32 + // Number of times processing packets ran out of quota + TimeSqueezed uint32 +} + +var softNetProcFile = "net/softnet_stat" + +// NetSoftnetStat reads data from /proc/net/softnet_stat. +func (fs FS) NetSoftnetStat() ([]SoftnetStat, error) { + b, err := util.ReadFileNoStat(fs.proc.Path(softNetProcFile)) + if err != nil { + return nil, err + } + + entries, err := parseSoftnet(bytes.NewReader(b)) + if err != nil { + return nil, fmt.Errorf("failed to parse /proc/net/softnet_stat: %v", err) + } + + return entries, nil +} + +func parseSoftnet(r io.Reader) ([]SoftnetStat, error) { + const minColumns = 9 + + s := bufio.NewScanner(r) + + var stats []SoftnetStat + for s.Scan() { + columns := strings.Fields(s.Text()) + width := len(columns) + + if width < minColumns { + return nil, fmt.Errorf("%d columns were detected, but at least %d were expected", width, minColumns) + } + + // We only parse the first three columns at the moment. + us, err := parseHexUint32s(columns[0:3]) + if err != nil { + return nil, err + } + + stats = append(stats, SoftnetStat{ + Processed: us[0], + Dropped: us[1], + TimeSqueezed: us[2], + }) + } + + return stats, nil +} + +func parseHexUint32s(ss []string) ([]uint32, error) { + us := make([]uint32, 0, len(ss)) + for _, s := range ss { + u, err := strconv.ParseUint(s, 16, 32) + if err != nil { + return nil, err + } + + us = append(us, uint32(u)) + } + + return us, nil +} diff --git a/vendor/github.com/prometheus/procfs/net_udp.go b/vendor/github.com/prometheus/procfs/net_udp.go new file mode 100644 index 00000000000..d017e3f18da --- /dev/null +++ b/vendor/github.com/prometheus/procfs/net_udp.go @@ -0,0 +1,229 @@ +// Copyright 2020 The Prometheus 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 procfs + +import ( + "bufio" + "encoding/hex" + "fmt" + "io" + "net" + "os" + "strconv" + "strings" +) + +const ( + // readLimit is used by io.LimitReader while reading the content of the + // /proc/net/udp{,6} files. The number of lines inside such a file is dynamic + // as each line represents a single used socket. + // In theory, the number of available sockets is 65535 (2^16 - 1) per IP. + // With e.g. 150 Byte per line and the maximum number of 65535, + // the reader needs to handle 150 Byte * 65535 =~ 10 MB for a single IP. + readLimit = 4294967296 // Byte -> 4 GiB +) + +type ( + // NetUDP represents the contents of /proc/net/udp{,6} file without the header. + NetUDP []*netUDPLine + + // NetUDPSummary provides already computed values like the total queue lengths or + // the total number of used sockets. In contrast to NetUDP it does not collect + // the parsed lines into a slice. + NetUDPSummary struct { + // TxQueueLength shows the total queue length of all parsed tx_queue lengths. + TxQueueLength uint64 + // RxQueueLength shows the total queue length of all parsed rx_queue lengths. + RxQueueLength uint64 + // UsedSockets shows the total number of parsed lines representing the + // number of used sockets. + UsedSockets uint64 + } + + // netUDPLine represents the fields parsed from a single line + // in /proc/net/udp{,6}. Fields which are not used by UDP are skipped. + // For the proc file format details, see https://linux.die.net/man/5/proc. + netUDPLine struct { + Sl uint64 + LocalAddr net.IP + LocalPort uint64 + RemAddr net.IP + RemPort uint64 + St uint64 + TxQueue uint64 + RxQueue uint64 + UID uint64 + } +) + +// NetUDP returns the IPv4 kernel/networking statistics for UDP datagrams +// read from /proc/net/udp. +func (fs FS) NetUDP() (NetUDP, error) { + return newNetUDP(fs.proc.Path("net/udp")) +} + +// NetUDP6 returns the IPv6 kernel/networking statistics for UDP datagrams +// read from /proc/net/udp6. +func (fs FS) NetUDP6() (NetUDP, error) { + return newNetUDP(fs.proc.Path("net/udp6")) +} + +// NetUDPSummary returns already computed statistics like the total queue lengths +// for UDP datagrams read from /proc/net/udp. +func (fs FS) NetUDPSummary() (*NetUDPSummary, error) { + return newNetUDPSummary(fs.proc.Path("net/udp")) +} + +// NetUDP6Summary returns already computed statistics like the total queue lengths +// for UDP datagrams read from /proc/net/udp6. +func (fs FS) NetUDP6Summary() (*NetUDPSummary, error) { + return newNetUDPSummary(fs.proc.Path("net/udp6")) +} + +// newNetUDP creates a new NetUDP{,6} from the contents of the given file. +func newNetUDP(file string) (NetUDP, error) { + f, err := os.Open(file) + if err != nil { + return nil, err + } + defer f.Close() + + netUDP := NetUDP{} + + lr := io.LimitReader(f, readLimit) + s := bufio.NewScanner(lr) + s.Scan() // skip first line with headers + for s.Scan() { + fields := strings.Fields(s.Text()) + line, err := parseNetUDPLine(fields) + if err != nil { + return nil, err + } + netUDP = append(netUDP, line) + } + if err := s.Err(); err != nil { + return nil, err + } + return netUDP, nil +} + +// newNetUDPSummary creates a new NetUDP{,6} from the contents of the given file. +func newNetUDPSummary(file string) (*NetUDPSummary, error) { + f, err := os.Open(file) + if err != nil { + return nil, err + } + defer f.Close() + + netUDPSummary := &NetUDPSummary{} + + lr := io.LimitReader(f, readLimit) + s := bufio.NewScanner(lr) + s.Scan() // skip first line with headers + for s.Scan() { + fields := strings.Fields(s.Text()) + line, err := parseNetUDPLine(fields) + if err != nil { + return nil, err + } + netUDPSummary.TxQueueLength += line.TxQueue + netUDPSummary.RxQueueLength += line.RxQueue + netUDPSummary.UsedSockets++ + } + if err := s.Err(); err != nil { + return nil, err + } + return netUDPSummary, nil +} + +// parseNetUDPLine parses a single line, represented by a list of fields. +func parseNetUDPLine(fields []string) (*netUDPLine, error) { + line := &netUDPLine{} + if len(fields) < 8 { + return nil, fmt.Errorf( + "cannot parse net udp socket line as it has less then 8 columns: %s", + strings.Join(fields, " "), + ) + } + var err error // parse error + + // sl + s := strings.Split(fields[0], ":") + if len(s) != 2 { + return nil, fmt.Errorf( + "cannot parse sl field in udp socket line: %s", fields[0]) + } + + if line.Sl, err = strconv.ParseUint(s[0], 0, 64); err != nil { + return nil, fmt.Errorf("cannot parse sl value in udp socket line: %s", err) + } + // local_address + l := strings.Split(fields[1], ":") + if len(l) != 2 { + return nil, fmt.Errorf( + "cannot parse local_address field in udp socket line: %s", fields[1]) + } + if line.LocalAddr, err = hex.DecodeString(l[0]); err != nil { + return nil, fmt.Errorf( + "cannot parse local_address value in udp socket line: %s", err) + } + if line.LocalPort, err = strconv.ParseUint(l[1], 16, 64); err != nil { + return nil, fmt.Errorf( + "cannot parse local_address port value in udp socket line: %s", err) + } + + // remote_address + r := strings.Split(fields[2], ":") + if len(r) != 2 { + return nil, fmt.Errorf( + "cannot parse rem_address field in udp socket line: %s", fields[1]) + } + if line.RemAddr, err = hex.DecodeString(r[0]); err != nil { + return nil, fmt.Errorf( + "cannot parse rem_address value in udp socket line: %s", err) + } + if line.RemPort, err = strconv.ParseUint(r[1], 16, 64); err != nil { + return nil, fmt.Errorf( + "cannot parse rem_address port value in udp socket line: %s", err) + } + + // st + if line.St, err = strconv.ParseUint(fields[3], 16, 64); err != nil { + return nil, fmt.Errorf( + "cannot parse st value in udp socket line: %s", err) + } + + // tx_queue and rx_queue + q := strings.Split(fields[4], ":") + if len(q) != 2 { + return nil, fmt.Errorf( + "cannot parse tx/rx queues in udp socket line as it has a missing colon: %s", + fields[4], + ) + } + if line.TxQueue, err = strconv.ParseUint(q[0], 16, 64); err != nil { + return nil, fmt.Errorf("cannot parse tx_queue value in udp socket line: %s", err) + } + if line.RxQueue, err = strconv.ParseUint(q[1], 16, 64); err != nil { + return nil, fmt.Errorf("cannot parse rx_queue value in udp socket line: %s", err) + } + + // uid + if line.UID, err = strconv.ParseUint(fields[7], 0, 64); err != nil { + return nil, fmt.Errorf( + "cannot parse uid value in udp socket line: %s", err) + } + + return line, nil +} diff --git a/vendor/github.com/prometheus/procfs/net_unix.go b/vendor/github.com/prometheus/procfs/net_unix.go new file mode 100644 index 00000000000..c55b4b18e4f --- /dev/null +++ b/vendor/github.com/prometheus/procfs/net_unix.go @@ -0,0 +1,257 @@ +// Copyright 2018 The Prometheus 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 procfs + +import ( + "bufio" + "fmt" + "io" + "os" + "strconv" + "strings" +) + +// For the proc file format details, +// see https://elixir.bootlin.com/linux/v4.17/source/net/unix/af_unix.c#L2815 +// and https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/net.h#L48. + +// Constants for the various /proc/net/unix enumerations. +// TODO: match against x/sys/unix or similar? +const ( + netUnixTypeStream = 1 + netUnixTypeDgram = 2 + netUnixTypeSeqpacket = 5 + + netUnixFlagDefault = 0 + netUnixFlagListen = 1 << 16 + + netUnixStateUnconnected = 1 + netUnixStateConnecting = 2 + netUnixStateConnected = 3 + netUnixStateDisconnected = 4 +) + +// NetUNIXType is the type of the type field. +type NetUNIXType uint64 + +// NetUNIXFlags is the type of the flags field. +type NetUNIXFlags uint64 + +// NetUNIXState is the type of the state field. +type NetUNIXState uint64 + +// NetUNIXLine represents a line of /proc/net/unix. +type NetUNIXLine struct { + KernelPtr string + RefCount uint64 + Protocol uint64 + Flags NetUNIXFlags + Type NetUNIXType + State NetUNIXState + Inode uint64 + Path string +} + +// NetUNIX holds the data read from /proc/net/unix. +type NetUNIX struct { + Rows []*NetUNIXLine +} + +// NetUNIX returns data read from /proc/net/unix. +func (fs FS) NetUNIX() (*NetUNIX, error) { + return readNetUNIX(fs.proc.Path("net/unix")) +} + +// readNetUNIX reads data in /proc/net/unix format from the specified file. +func readNetUNIX(file string) (*NetUNIX, error) { + // This file could be quite large and a streaming read is desirable versus + // reading the entire contents at once. + f, err := os.Open(file) + if err != nil { + return nil, err + } + defer f.Close() + + return parseNetUNIX(f) +} + +// parseNetUNIX creates a NetUnix structure from the incoming stream. +func parseNetUNIX(r io.Reader) (*NetUNIX, error) { + // Begin scanning by checking for the existence of Inode. + s := bufio.NewScanner(r) + s.Scan() + + // From the man page of proc(5), it does not contain an Inode field, + // but in actually it exists. This code works for both cases. + hasInode := strings.Contains(s.Text(), "Inode") + + // Expect a minimum number of fields, but Inode and Path are optional: + // Num RefCount Protocol Flags Type St Inode Path + minFields := 6 + if hasInode { + minFields++ + } + + var nu NetUNIX + for s.Scan() { + line := s.Text() + item, err := nu.parseLine(line, hasInode, minFields) + if err != nil { + return nil, fmt.Errorf("failed to parse /proc/net/unix data %q: %v", line, err) + } + + nu.Rows = append(nu.Rows, item) + } + + if err := s.Err(); err != nil { + return nil, fmt.Errorf("failed to scan /proc/net/unix data: %v", err) + } + + return &nu, nil +} + +func (u *NetUNIX) parseLine(line string, hasInode bool, min int) (*NetUNIXLine, error) { + fields := strings.Fields(line) + + l := len(fields) + if l < min { + return nil, fmt.Errorf("expected at least %d fields but got %d", min, l) + } + + // Field offsets are as follows: + // Num RefCount Protocol Flags Type St Inode Path + + kernelPtr := strings.TrimSuffix(fields[0], ":") + + users, err := u.parseUsers(fields[1]) + if err != nil { + return nil, fmt.Errorf("failed to parse ref count(%s): %v", fields[1], err) + } + + flags, err := u.parseFlags(fields[3]) + if err != nil { + return nil, fmt.Errorf("failed to parse flags(%s): %v", fields[3], err) + } + + typ, err := u.parseType(fields[4]) + if err != nil { + return nil, fmt.Errorf("failed to parse type(%s): %v", fields[4], err) + } + + state, err := u.parseState(fields[5]) + if err != nil { + return nil, fmt.Errorf("failed to parse state(%s): %v", fields[5], err) + } + + var inode uint64 + if hasInode { + inode, err = u.parseInode(fields[6]) + if err != nil { + return nil, fmt.Errorf("failed to parse inode(%s): %v", fields[6], err) + } + } + + n := &NetUNIXLine{ + KernelPtr: kernelPtr, + RefCount: users, + Type: typ, + Flags: flags, + State: state, + Inode: inode, + } + + // Path field is optional. + if l > min { + // Path occurs at either index 6 or 7 depending on whether inode is + // already present. + pathIdx := 7 + if !hasInode { + pathIdx-- + } + + n.Path = fields[pathIdx] + } + + return n, nil +} + +func (u NetUNIX) parseUsers(s string) (uint64, error) { + return strconv.ParseUint(s, 16, 32) +} + +func (u NetUNIX) parseType(s string) (NetUNIXType, error) { + typ, err := strconv.ParseUint(s, 16, 16) + if err != nil { + return 0, err + } + + return NetUNIXType(typ), nil +} + +func (u NetUNIX) parseFlags(s string) (NetUNIXFlags, error) { + flags, err := strconv.ParseUint(s, 16, 32) + if err != nil { + return 0, err + } + + return NetUNIXFlags(flags), nil +} + +func (u NetUNIX) parseState(s string) (NetUNIXState, error) { + st, err := strconv.ParseInt(s, 16, 8) + if err != nil { + return 0, err + } + + return NetUNIXState(st), nil +} + +func (u NetUNIX) parseInode(s string) (uint64, error) { + return strconv.ParseUint(s, 10, 64) +} + +func (t NetUNIXType) String() string { + switch t { + case netUnixTypeStream: + return "stream" + case netUnixTypeDgram: + return "dgram" + case netUnixTypeSeqpacket: + return "seqpacket" + } + return "unknown" +} + +func (f NetUNIXFlags) String() string { + switch f { + case netUnixFlagListen: + return "listen" + default: + return "default" + } +} + +func (s NetUNIXState) String() string { + switch s { + case netUnixStateUnconnected: + return "unconnected" + case netUnixStateConnecting: + return "connecting" + case netUnixStateConnected: + return "connected" + case netUnixStateDisconnected: + return "disconnected" + } + return "unknown" +} diff --git a/vendor/github.com/prometheus/procfs/nfs/nfs.go b/vendor/github.com/prometheus/procfs/nfs/nfs.go deleted file mode 100644 index 651bf681952..00000000000 --- a/vendor/github.com/prometheus/procfs/nfs/nfs.go +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright 2018 The Prometheus 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 nfs implements parsing of /proc/net/rpc/nfsd. -// Fields are documented in https://www.svennd.be/nfsd-stats-explained-procnetrpcnfsd/ -package nfs - -// ReplyCache models the "rc" line. -type ReplyCache struct { - Hits uint64 - Misses uint64 - NoCache uint64 -} - -// FileHandles models the "fh" line. -type FileHandles struct { - Stale uint64 - TotalLookups uint64 - AnonLookups uint64 - DirNoCache uint64 - NoDirNoCache uint64 -} - -// InputOutput models the "io" line. -type InputOutput struct { - Read uint64 - Write uint64 -} - -// Threads models the "th" line. -type Threads struct { - Threads uint64 - FullCnt uint64 -} - -// ReadAheadCache models the "ra" line. -type ReadAheadCache struct { - CacheSize uint64 - CacheHistogram []uint64 - NotFound uint64 -} - -// Network models the "net" line. -type Network struct { - NetCount uint64 - UDPCount uint64 - TCPCount uint64 - TCPConnect uint64 -} - -// ClientRPC models the nfs "rpc" line. -type ClientRPC struct { - RPCCount uint64 - Retransmissions uint64 - AuthRefreshes uint64 -} - -// ServerRPC models the nfsd "rpc" line. -type ServerRPC struct { - RPCCount uint64 - BadCnt uint64 - BadFmt uint64 - BadAuth uint64 - BadcInt uint64 -} - -// V2Stats models the "proc2" line. -type V2Stats struct { - Null uint64 - GetAttr uint64 - SetAttr uint64 - Root uint64 - Lookup uint64 - ReadLink uint64 - Read uint64 - WrCache uint64 - Write uint64 - Create uint64 - Remove uint64 - Rename uint64 - Link uint64 - SymLink uint64 - MkDir uint64 - RmDir uint64 - ReadDir uint64 - FsStat uint64 -} - -// V3Stats models the "proc3" line. -type V3Stats struct { - Null uint64 - GetAttr uint64 - SetAttr uint64 - Lookup uint64 - Access uint64 - ReadLink uint64 - Read uint64 - Write uint64 - Create uint64 - MkDir uint64 - SymLink uint64 - MkNod uint64 - Remove uint64 - RmDir uint64 - Rename uint64 - Link uint64 - ReadDir uint64 - ReadDirPlus uint64 - FsStat uint64 - FsInfo uint64 - PathConf uint64 - Commit uint64 -} - -// ClientV4Stats models the nfs "proc4" line. -type ClientV4Stats struct { - Null uint64 - Read uint64 - Write uint64 - Commit uint64 - Open uint64 - OpenConfirm uint64 - OpenNoattr uint64 - OpenDowngrade uint64 - Close uint64 - Setattr uint64 - FsInfo uint64 - Renew uint64 - SetClientID uint64 - SetClientIDConfirm uint64 - Lock uint64 - Lockt uint64 - Locku uint64 - Access uint64 - Getattr uint64 - Lookup uint64 - LookupRoot uint64 - Remove uint64 - Rename uint64 - Link uint64 - Symlink uint64 - Create uint64 - Pathconf uint64 - StatFs uint64 - ReadLink uint64 - ReadDir uint64 - ServerCaps uint64 - DelegReturn uint64 - GetACL uint64 - SetACL uint64 - FsLocations uint64 - ReleaseLockowner uint64 - Secinfo uint64 - FsidPresent uint64 - ExchangeID uint64 - CreateSession uint64 - DestroySession uint64 - Sequence uint64 - GetLeaseTime uint64 - ReclaimComplete uint64 - LayoutGet uint64 - GetDeviceInfo uint64 - LayoutCommit uint64 - LayoutReturn uint64 - SecinfoNoName uint64 - TestStateID uint64 - FreeStateID uint64 - GetDeviceList uint64 - BindConnToSession uint64 - DestroyClientID uint64 - Seek uint64 - Allocate uint64 - DeAllocate uint64 - LayoutStats uint64 - Clone uint64 -} - -// ServerV4Stats models the nfsd "proc4" line. -type ServerV4Stats struct { - Null uint64 - Compound uint64 -} - -// V4Ops models the "proc4ops" line: NFSv4 operations -// Variable list, see: -// v4.0 https://tools.ietf.org/html/rfc3010 (38 operations) -// v4.1 https://tools.ietf.org/html/rfc5661 (58 operations) -// v4.2 https://tools.ietf.org/html/draft-ietf-nfsv4-minorversion2-41 (71 operations) -type V4Ops struct { - //Values uint64 // Variable depending on v4.x sub-version. TODO: Will this always at least include the fields in this struct? - Op0Unused uint64 - Op1Unused uint64 - Op2Future uint64 - Access uint64 - Close uint64 - Commit uint64 - Create uint64 - DelegPurge uint64 - DelegReturn uint64 - GetAttr uint64 - GetFH uint64 - Link uint64 - Lock uint64 - Lockt uint64 - Locku uint64 - Lookup uint64 - LookupRoot uint64 - Nverify uint64 - Open uint64 - OpenAttr uint64 - OpenConfirm uint64 - OpenDgrd uint64 - PutFH uint64 - PutPubFH uint64 - PutRootFH uint64 - Read uint64 - ReadDir uint64 - ReadLink uint64 - Remove uint64 - Rename uint64 - Renew uint64 - RestoreFH uint64 - SaveFH uint64 - SecInfo uint64 - SetAttr uint64 - Verify uint64 - Write uint64 - RelLockOwner uint64 -} - -// ClientRPCStats models all stats from /proc/net/rpc/nfs. -type ClientRPCStats struct { - Network Network - ClientRPC ClientRPC - V2Stats V2Stats - V3Stats V3Stats - ClientV4Stats ClientV4Stats -} - -// ServerRPCStats models all stats from /proc/net/rpc/nfsd. -type ServerRPCStats struct { - ReplyCache ReplyCache - FileHandles FileHandles - InputOutput InputOutput - Threads Threads - ReadAheadCache ReadAheadCache - Network Network - ServerRPC ServerRPC - V2Stats V2Stats - V3Stats V3Stats - ServerV4Stats ServerV4Stats - V4Ops V4Ops -} diff --git a/vendor/github.com/prometheus/procfs/nfs/parse.go b/vendor/github.com/prometheus/procfs/nfs/parse.go deleted file mode 100644 index 95a83cc5bc5..00000000000 --- a/vendor/github.com/prometheus/procfs/nfs/parse.go +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2018 The Prometheus 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 nfs - -import ( - "fmt" -) - -func parseReplyCache(v []uint64) (ReplyCache, error) { - if len(v) != 3 { - return ReplyCache{}, fmt.Errorf("invalid ReplyCache line %q", v) - } - - return ReplyCache{ - Hits: v[0], - Misses: v[1], - NoCache: v[2], - }, nil -} - -func parseFileHandles(v []uint64) (FileHandles, error) { - if len(v) != 5 { - return FileHandles{}, fmt.Errorf("invalid FileHandles, line %q", v) - } - - return FileHandles{ - Stale: v[0], - TotalLookups: v[1], - AnonLookups: v[2], - DirNoCache: v[3], - NoDirNoCache: v[4], - }, nil -} - -func parseInputOutput(v []uint64) (InputOutput, error) { - if len(v) != 2 { - return InputOutput{}, fmt.Errorf("invalid InputOutput line %q", v) - } - - return InputOutput{ - Read: v[0], - Write: v[1], - }, nil -} - -func parseThreads(v []uint64) (Threads, error) { - if len(v) != 2 { - return Threads{}, fmt.Errorf("invalid Threads line %q", v) - } - - return Threads{ - Threads: v[0], - FullCnt: v[1], - }, nil -} - -func parseReadAheadCache(v []uint64) (ReadAheadCache, error) { - if len(v) != 12 { - return ReadAheadCache{}, fmt.Errorf("invalid ReadAheadCache line %q", v) - } - - return ReadAheadCache{ - CacheSize: v[0], - CacheHistogram: v[1:11], - NotFound: v[11], - }, nil -} - -func parseNetwork(v []uint64) (Network, error) { - if len(v) != 4 { - return Network{}, fmt.Errorf("invalid Network line %q", v) - } - - return Network{ - NetCount: v[0], - UDPCount: v[1], - TCPCount: v[2], - TCPConnect: v[3], - }, nil -} - -func parseServerRPC(v []uint64) (ServerRPC, error) { - if len(v) != 5 { - return ServerRPC{}, fmt.Errorf("invalid RPC line %q", v) - } - - return ServerRPC{ - RPCCount: v[0], - BadCnt: v[1], - BadFmt: v[2], - BadAuth: v[3], - BadcInt: v[4], - }, nil -} - -func parseClientRPC(v []uint64) (ClientRPC, error) { - if len(v) != 3 { - return ClientRPC{}, fmt.Errorf("invalid RPC line %q", v) - } - - return ClientRPC{ - RPCCount: v[0], - Retransmissions: v[1], - AuthRefreshes: v[2], - }, nil -} - -func parseV2Stats(v []uint64) (V2Stats, error) { - values := int(v[0]) - if len(v[1:]) != values || values != 18 { - return V2Stats{}, fmt.Errorf("invalid V2Stats line %q", v) - } - - return V2Stats{ - Null: v[1], - GetAttr: v[2], - SetAttr: v[3], - Root: v[4], - Lookup: v[5], - ReadLink: v[6], - Read: v[7], - WrCache: v[8], - Write: v[9], - Create: v[10], - Remove: v[11], - Rename: v[12], - Link: v[13], - SymLink: v[14], - MkDir: v[15], - RmDir: v[16], - ReadDir: v[17], - FsStat: v[18], - }, nil -} - -func parseV3Stats(v []uint64) (V3Stats, error) { - values := int(v[0]) - if len(v[1:]) != values || values != 22 { - return V3Stats{}, fmt.Errorf("invalid V3Stats line %q", v) - } - - return V3Stats{ - Null: v[1], - GetAttr: v[2], - SetAttr: v[3], - Lookup: v[4], - Access: v[5], - ReadLink: v[6], - Read: v[7], - Write: v[8], - Create: v[9], - MkDir: v[10], - SymLink: v[11], - MkNod: v[12], - Remove: v[13], - RmDir: v[14], - Rename: v[15], - Link: v[16], - ReadDir: v[17], - ReadDirPlus: v[18], - FsStat: v[19], - FsInfo: v[20], - PathConf: v[21], - Commit: v[22], - }, nil -} - -func parseClientV4Stats(v []uint64) (ClientV4Stats, error) { - values := int(v[0]) - if len(v[1:]) != values { - return ClientV4Stats{}, fmt.Errorf("invalid ClientV4Stats line %q", v) - } - - // This function currently supports mapping 59 NFS v4 client stats. Older - // kernels may emit fewer stats, so we must detect this and pad out the - // values to match the expected slice size. - if values < 59 { - newValues := make([]uint64, 60) - copy(newValues, v) - v = newValues - } - - return ClientV4Stats{ - Null: v[1], - Read: v[2], - Write: v[3], - Commit: v[4], - Open: v[5], - OpenConfirm: v[6], - OpenNoattr: v[7], - OpenDowngrade: v[8], - Close: v[9], - Setattr: v[10], - FsInfo: v[11], - Renew: v[12], - SetClientID: v[13], - SetClientIDConfirm: v[14], - Lock: v[15], - Lockt: v[16], - Locku: v[17], - Access: v[18], - Getattr: v[19], - Lookup: v[20], - LookupRoot: v[21], - Remove: v[22], - Rename: v[23], - Link: v[24], - Symlink: v[25], - Create: v[26], - Pathconf: v[27], - StatFs: v[28], - ReadLink: v[29], - ReadDir: v[30], - ServerCaps: v[31], - DelegReturn: v[32], - GetACL: v[33], - SetACL: v[34], - FsLocations: v[35], - ReleaseLockowner: v[36], - Secinfo: v[37], - FsidPresent: v[38], - ExchangeID: v[39], - CreateSession: v[40], - DestroySession: v[41], - Sequence: v[42], - GetLeaseTime: v[43], - ReclaimComplete: v[44], - LayoutGet: v[45], - GetDeviceInfo: v[46], - LayoutCommit: v[47], - LayoutReturn: v[48], - SecinfoNoName: v[49], - TestStateID: v[50], - FreeStateID: v[51], - GetDeviceList: v[52], - BindConnToSession: v[53], - DestroyClientID: v[54], - Seek: v[55], - Allocate: v[56], - DeAllocate: v[57], - LayoutStats: v[58], - Clone: v[59], - }, nil -} - -func parseServerV4Stats(v []uint64) (ServerV4Stats, error) { - values := int(v[0]) - if len(v[1:]) != values || values != 2 { - return ServerV4Stats{}, fmt.Errorf("invalid V4Stats line %q", v) - } - - return ServerV4Stats{ - Null: v[1], - Compound: v[2], - }, nil -} - -func parseV4Ops(v []uint64) (V4Ops, error) { - values := int(v[0]) - if len(v[1:]) != values || values < 39 { - return V4Ops{}, fmt.Errorf("invalid V4Ops line %q", v) - } - - stats := V4Ops{ - Op0Unused: v[1], - Op1Unused: v[2], - Op2Future: v[3], - Access: v[4], - Close: v[5], - Commit: v[6], - Create: v[7], - DelegPurge: v[8], - DelegReturn: v[9], - GetAttr: v[10], - GetFH: v[11], - Link: v[12], - Lock: v[13], - Lockt: v[14], - Locku: v[15], - Lookup: v[16], - LookupRoot: v[17], - Nverify: v[18], - Open: v[19], - OpenAttr: v[20], - OpenConfirm: v[21], - OpenDgrd: v[22], - PutFH: v[23], - PutPubFH: v[24], - PutRootFH: v[25], - Read: v[26], - ReadDir: v[27], - ReadLink: v[28], - Remove: v[29], - Rename: v[30], - Renew: v[31], - RestoreFH: v[32], - SaveFH: v[33], - SecInfo: v[34], - SetAttr: v[35], - Verify: v[36], - Write: v[37], - RelLockOwner: v[38], - } - - return stats, nil -} diff --git a/vendor/github.com/prometheus/procfs/nfs/parse_nfs.go b/vendor/github.com/prometheus/procfs/nfs/parse_nfs.go deleted file mode 100644 index c0d3a5ad9bd..00000000000 --- a/vendor/github.com/prometheus/procfs/nfs/parse_nfs.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2018 The Prometheus 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 nfs - -import ( - "bufio" - "fmt" - "io" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// ParseClientRPCStats returns stats read from /proc/net/rpc/nfs -func ParseClientRPCStats(r io.Reader) (*ClientRPCStats, error) { - stats := &ClientRPCStats{} - - scanner := bufio.NewScanner(r) - for scanner.Scan() { - line := scanner.Text() - parts := strings.Fields(scanner.Text()) - // require at least - if len(parts) < 2 { - return nil, fmt.Errorf("invalid NFS metric line %q", line) - } - - values, err := util.ParseUint64s(parts[1:]) - if err != nil { - return nil, fmt.Errorf("error parsing NFS metric line: %s", err) - } - - switch metricLine := parts[0]; metricLine { - case "net": - stats.Network, err = parseNetwork(values) - case "rpc": - stats.ClientRPC, err = parseClientRPC(values) - case "proc2": - stats.V2Stats, err = parseV2Stats(values) - case "proc3": - stats.V3Stats, err = parseV3Stats(values) - case "proc4": - stats.ClientV4Stats, err = parseClientV4Stats(values) - default: - return nil, fmt.Errorf("unknown NFS metric line %q", metricLine) - } - if err != nil { - return nil, fmt.Errorf("errors parsing NFS metric line: %s", err) - } - } - - if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("error scanning NFS file: %s", err) - } - - return stats, nil -} diff --git a/vendor/github.com/prometheus/procfs/nfs/parse_nfsd.go b/vendor/github.com/prometheus/procfs/nfs/parse_nfsd.go deleted file mode 100644 index 57bb4a35858..00000000000 --- a/vendor/github.com/prometheus/procfs/nfs/parse_nfsd.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2018 The Prometheus 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 nfs - -import ( - "bufio" - "fmt" - "io" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// ParseServerRPCStats returns stats read from /proc/net/rpc/nfsd -func ParseServerRPCStats(r io.Reader) (*ServerRPCStats, error) { - stats := &ServerRPCStats{} - - scanner := bufio.NewScanner(r) - for scanner.Scan() { - line := scanner.Text() - parts := strings.Fields(scanner.Text()) - // require at least - if len(parts) < 2 { - return nil, fmt.Errorf("invalid NFSd metric line %q", line) - } - label := parts[0] - - var values []uint64 - var err error - if label == "th" { - if len(parts) < 3 { - return nil, fmt.Errorf("invalid NFSd th metric line %q", line) - } - values, err = util.ParseUint64s(parts[1:3]) - } else { - values, err = util.ParseUint64s(parts[1:]) - } - if err != nil { - return nil, fmt.Errorf("error parsing NFSd metric line: %s", err) - } - - switch metricLine := parts[0]; metricLine { - case "rc": - stats.ReplyCache, err = parseReplyCache(values) - case "fh": - stats.FileHandles, err = parseFileHandles(values) - case "io": - stats.InputOutput, err = parseInputOutput(values) - case "th": - stats.Threads, err = parseThreads(values) - case "ra": - stats.ReadAheadCache, err = parseReadAheadCache(values) - case "net": - stats.Network, err = parseNetwork(values) - case "rpc": - stats.ServerRPC, err = parseServerRPC(values) - case "proc2": - stats.V2Stats, err = parseV2Stats(values) - case "proc3": - stats.V3Stats, err = parseV3Stats(values) - case "proc4": - stats.ServerV4Stats, err = parseServerV4Stats(values) - case "proc4ops": - stats.V4Ops, err = parseV4Ops(values) - default: - return nil, fmt.Errorf("unknown NFSd metric line %q", metricLine) - } - if err != nil { - return nil, fmt.Errorf("errors parsing NFSd metric line: %s", err) - } - } - - if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("error scanning NFSd file: %s", err) - } - - return stats, nil -} diff --git a/vendor/github.com/prometheus/procfs/proc.go b/vendor/github.com/prometheus/procfs/proc.go index 06bed0ef4a3..9f97b6e5236 100644 --- a/vendor/github.com/prometheus/procfs/proc.go +++ b/vendor/github.com/prometheus/procfs/proc.go @@ -20,6 +20,9 @@ import ( "os" "strconv" "strings" + + "github.com/prometheus/procfs/internal/fs" + "github.com/prometheus/procfs/internal/util" ) // Proc provides information about a running process. @@ -27,7 +30,7 @@ type Proc struct { // The process ID. PID int - fs FS + fs fs.FS } // Procs represents a list of Proc structs. @@ -52,7 +55,7 @@ func NewProc(pid int) (Proc, error) { if err != nil { return Proc{}, err } - return fs.NewProc(pid) + return fs.Proc(pid) } // AllProcs returns a list of all currently available processes under /proc. @@ -66,28 +69,35 @@ func AllProcs() (Procs, error) { // Self returns a process for the current process. func (fs FS) Self() (Proc, error) { - p, err := os.Readlink(fs.Path("self")) + p, err := os.Readlink(fs.proc.Path("self")) if err != nil { return Proc{}, err } - pid, err := strconv.Atoi(strings.Replace(p, string(fs), "", -1)) + pid, err := strconv.Atoi(strings.Replace(p, string(fs.proc), "", -1)) if err != nil { return Proc{}, err } - return fs.NewProc(pid) + return fs.Proc(pid) } // NewProc returns a process for the given pid. +// +// Deprecated: use fs.Proc() instead func (fs FS) NewProc(pid int) (Proc, error) { - if _, err := os.Stat(fs.Path(strconv.Itoa(pid))); err != nil { + return fs.Proc(pid) +} + +// Proc returns a process for the given pid. +func (fs FS) Proc(pid int) (Proc, error) { + if _, err := os.Stat(fs.proc.Path(strconv.Itoa(pid))); err != nil { return Proc{}, err } - return Proc{PID: pid, fs: fs}, nil + return Proc{PID: pid, fs: fs.proc}, nil } // AllProcs returns a list of all currently available processes. func (fs FS) AllProcs() (Procs, error) { - d, err := os.Open(fs.Path()) + d, err := os.Open(fs.proc.Path()) if err != nil { return Procs{}, err } @@ -104,7 +114,7 @@ func (fs FS) AllProcs() (Procs, error) { if err != nil { continue } - p = append(p, Proc{PID: int(pid), fs: fs}) + p = append(p, Proc{PID: int(pid), fs: fs.proc}) } return p, nil @@ -112,13 +122,7 @@ func (fs FS) AllProcs() (Procs, error) { // CmdLine returns the command line of a process. func (p Proc) CmdLine() ([]string, error) { - f, err := os.Open(p.path("cmdline")) - if err != nil { - return nil, err - } - defer f.Close() - - data, err := ioutil.ReadAll(f) + data, err := util.ReadFileNoStat(p.path("cmdline")) if err != nil { return nil, err } @@ -130,9 +134,9 @@ func (p Proc) CmdLine() ([]string, error) { return strings.Split(string(bytes.TrimRight(data, string("\x00"))), string(byte(0))), nil } -// Comm returns the command name of a process. -func (p Proc) Comm() (string, error) { - f, err := os.Open(p.path("comm")) +// Wchan returns the wchan (wait channel) of a process. +func (p Proc) Wchan() (string, error) { + f, err := os.Open(p.path("wchan")) if err != nil { return "", err } @@ -143,6 +147,21 @@ func (p Proc) Comm() (string, error) { return "", err } + wchan := string(data) + if wchan == "" || wchan == "0" { + return "", nil + } + + return wchan, nil +} + +// Comm returns the command name of a process. +func (p Proc) Comm() (string, error) { + data, err := util.ReadFileNoStat(p.path("comm")) + if err != nil { + return "", err + } + return strings.TrimSpace(string(data)), nil } @@ -238,6 +257,18 @@ func (p Proc) MountStats() ([]*Mount, error) { return parseMountStats(f) } +// MountInfo retrieves mount information for mount points in a +// process's namespace. +// It supplies information missing in `/proc/self/mounts` and +// fixes various other problems with that file too. +func (p Proc) MountInfo() ([]*MountInfo, error) { + data, err := util.ReadFileNoStat(p.path("mountinfo")) + if err != nil { + return nil, err + } + return parseMountInfo(data) +} + func (p Proc) fileDescriptors() ([]string, error) { d, err := os.Open(p.path("fd")) if err != nil { @@ -256,3 +287,33 @@ func (p Proc) fileDescriptors() ([]string, error) { func (p Proc) path(pa ...string) string { return p.fs.Path(append([]string{strconv.Itoa(p.PID)}, pa...)...) } + +// FileDescriptorsInfo retrieves information about all file descriptors of +// the process. +func (p Proc) FileDescriptorsInfo() (ProcFDInfos, error) { + names, err := p.fileDescriptors() + if err != nil { + return nil, err + } + + var fdinfos ProcFDInfos + + for _, n := range names { + fdinfo, err := p.FDInfo(n) + if err != nil { + continue + } + fdinfos = append(fdinfos, *fdinfo) + } + + return fdinfos, nil +} + +// Schedstat returns task scheduling information for the process. +func (p Proc) Schedstat() (ProcSchedstat, error) { + contents, err := ioutil.ReadFile(p.path("schedstat")) + if err != nil { + return ProcSchedstat{}, err + } + return parseProcSchedstat(string(contents)) +} diff --git a/vendor/github.com/prometheus/procfs/proc_cgroup.go b/vendor/github.com/prometheus/procfs/proc_cgroup.go new file mode 100644 index 00000000000..4abd46451c6 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/proc_cgroup.go @@ -0,0 +1,98 @@ +// Copyright 2020 The Prometheus 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 procfs + +import ( + "bufio" + "bytes" + "fmt" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// Cgroup models one line from /proc/[pid]/cgroup. Each Cgroup struct describes the the placement of a PID inside a +// specific control hierarchy. The kernel has two cgroup APIs, v1 and v2. v1 has one hierarchy per available resource +// controller, while v2 has one unified hierarchy shared by all controllers. Regardless of v1 or v2, all hierarchies +// contain all running processes, so the question answerable with a Cgroup struct is 'where is this process in +// this hierarchy' (where==what path on the specific cgroupfs). By prefixing this path with the mount point of +// *this specific* hierarchy, you can locate the relevant pseudo-files needed to read/set the data for this PID +// in this hierarchy +// +// Also see http://man7.org/linux/man-pages/man7/cgroups.7.html +type Cgroup struct { + // HierarchyID that can be matched to a named hierarchy using /proc/cgroups. Cgroups V2 only has one + // hierarchy, so HierarchyID is always 0. For cgroups v1 this is a unique ID number + HierarchyID int + // Controllers using this hierarchy of processes. Controllers are also known as subsystems. For + // Cgroups V2 this may be empty, as all active controllers use the same hierarchy + Controllers []string + // Path of this control group, relative to the mount point of the cgroupfs representing this specific + // hierarchy + Path string +} + +// parseCgroupString parses each line of the /proc/[pid]/cgroup file +// Line format is hierarchyID:[controller1,controller2]:path +func parseCgroupString(cgroupStr string) (*Cgroup, error) { + var err error + + fields := strings.Split(cgroupStr, ":") + if len(fields) < 3 { + return nil, fmt.Errorf("at least 3 fields required, found %d fields in cgroup string: %s", len(fields), cgroupStr) + } + + cgroup := &Cgroup{ + Path: fields[2], + Controllers: nil, + } + cgroup.HierarchyID, err = strconv.Atoi(fields[0]) + if err != nil { + return nil, fmt.Errorf("failed to parse hierarchy ID") + } + if fields[1] != "" { + ssNames := strings.Split(fields[1], ",") + cgroup.Controllers = append(cgroup.Controllers, ssNames...) + } + return cgroup, nil +} + +// parseCgroups reads each line of the /proc/[pid]/cgroup file +func parseCgroups(data []byte) ([]Cgroup, error) { + var cgroups []Cgroup + scanner := bufio.NewScanner(bytes.NewReader(data)) + for scanner.Scan() { + mountString := scanner.Text() + parsedMounts, err := parseCgroupString(mountString) + if err != nil { + return nil, err + } + cgroups = append(cgroups, *parsedMounts) + } + + err := scanner.Err() + return cgroups, err +} + +// Cgroups reads from /proc//cgroups and returns a []*Cgroup struct locating this PID in each process +// control hierarchy running on this system. On every system (v1 and v2), all hierarchies contain all processes, +// so the len of the returned struct is equal to the number of active hierarchies on this system +func (p Proc) Cgroups() ([]Cgroup, error) { + data, err := util.ReadFileNoStat(fmt.Sprintf("/proc/%d/cgroup", p.PID)) + if err != nil { + return nil, err + } + return parseCgroups(data) +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_pre_1_8.go b/vendor/github.com/prometheus/procfs/proc_environ.go similarity index 50% rename from vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_pre_1_8.go rename to vendor/github.com/prometheus/procfs/proc_environ.go index 8bb9b8b68f8..6134b3580c4 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_pre_1_8.go +++ b/vendor/github.com/prometheus/procfs/proc_environ.go @@ -1,4 +1,4 @@ -// Copyright 2017 The Prometheus Authors +// Copyright 2019 The Prometheus 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 @@ -11,34 +11,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build !go1.8 - -package promhttp +package procfs import ( - "io" - "net/http" + "strings" + + "github.com/prometheus/procfs/internal/util" ) -func newDelegator(w http.ResponseWriter, observeWriteHeaderFunc func(int)) delegator { - d := &responseWriterDelegator{ - ResponseWriter: w, - observeWriteHeader: observeWriteHeaderFunc, +// Environ reads process environments from /proc//environ +func (p Proc) Environ() ([]string, error) { + environments := make([]string, 0) + + data, err := util.ReadFileNoStat(p.path("environ")) + if err != nil { + return environments, err } - id := 0 - if _, ok := w.(http.CloseNotifier); ok { - id += closeNotifier - } - if _, ok := w.(http.Flusher); ok { - id += flusher - } - if _, ok := w.(http.Hijacker); ok { - id += hijacker - } - if _, ok := w.(io.ReaderFrom); ok { - id += readerFrom + environments = strings.Split(string(data), "\000") + if len(environments) > 0 { + environments = environments[:len(environments)-1] } - return pickDelegator[id](d) + return environments, nil } diff --git a/vendor/github.com/prometheus/procfs/proc_fdinfo.go b/vendor/github.com/prometheus/procfs/proc_fdinfo.go new file mode 100644 index 00000000000..a76ca707919 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/proc_fdinfo.go @@ -0,0 +1,133 @@ +// Copyright 2019 The Prometheus 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 procfs + +import ( + "bufio" + "bytes" + "errors" + "regexp" + + "github.com/prometheus/procfs/internal/util" +) + +// Regexp variables +var ( + rPos = regexp.MustCompile(`^pos:\s+(\d+)$`) + rFlags = regexp.MustCompile(`^flags:\s+(\d+)$`) + rMntID = regexp.MustCompile(`^mnt_id:\s+(\d+)$`) + rInotify = regexp.MustCompile(`^inotify`) + rInotifyParts = regexp.MustCompile(`^inotify\s+wd:([0-9a-f]+)\s+ino:([0-9a-f]+)\s+sdev:([0-9a-f]+)(?:\s+mask:([0-9a-f]+))?`) +) + +// ProcFDInfo contains represents file descriptor information. +type ProcFDInfo struct { + // File descriptor + FD string + // File offset + Pos string + // File access mode and status flags + Flags string + // Mount point ID + MntID string + // List of inotify lines (structured) in the fdinfo file (kernel 3.8+ only) + InotifyInfos []InotifyInfo +} + +// FDInfo constructor. On kernels older than 3.8, InotifyInfos will always be empty. +func (p Proc) FDInfo(fd string) (*ProcFDInfo, error) { + data, err := util.ReadFileNoStat(p.path("fdinfo", fd)) + if err != nil { + return nil, err + } + + var text, pos, flags, mntid string + var inotify []InotifyInfo + + scanner := bufio.NewScanner(bytes.NewReader(data)) + for scanner.Scan() { + text = scanner.Text() + if rPos.MatchString(text) { + pos = rPos.FindStringSubmatch(text)[1] + } else if rFlags.MatchString(text) { + flags = rFlags.FindStringSubmatch(text)[1] + } else if rMntID.MatchString(text) { + mntid = rMntID.FindStringSubmatch(text)[1] + } else if rInotify.MatchString(text) { + newInotify, err := parseInotifyInfo(text) + if err != nil { + return nil, err + } + inotify = append(inotify, *newInotify) + } + } + + i := &ProcFDInfo{ + FD: fd, + Pos: pos, + Flags: flags, + MntID: mntid, + InotifyInfos: inotify, + } + + return i, nil +} + +// InotifyInfo represents a single inotify line in the fdinfo file. +type InotifyInfo struct { + // Watch descriptor number + WD string + // Inode number + Ino string + // Device ID + Sdev string + // Mask of events being monitored + Mask string +} + +// InotifyInfo constructor. Only available on kernel 3.8+. +func parseInotifyInfo(line string) (*InotifyInfo, error) { + m := rInotifyParts.FindStringSubmatch(line) + if len(m) >= 4 { + var mask string + if len(m) == 5 { + mask = m[4] + } + i := &InotifyInfo{ + WD: m[1], + Ino: m[2], + Sdev: m[3], + Mask: mask, + } + return i, nil + } + return nil, errors.New("invalid inode entry: " + line) +} + +// ProcFDInfos represents a list of ProcFDInfo structs. +type ProcFDInfos []ProcFDInfo + +func (p ProcFDInfos) Len() int { return len(p) } +func (p ProcFDInfos) Swap(i, j int) { p[i], p[j] = p[j], p[i] } +func (p ProcFDInfos) Less(i, j int) bool { return p[i].FD < p[j].FD } + +// InotifyWatchLen returns the total number of inotify watches +func (p ProcFDInfos) InotifyWatchLen() (int, error) { + length := 0 + for _, f := range p { + length += len(f.InotifyInfos) + } + + return length, nil +} diff --git a/vendor/github.com/prometheus/procfs/proc_io.go b/vendor/github.com/prometheus/procfs/proc_io.go index 0251c83bfe8..776f3497173 100644 --- a/vendor/github.com/prometheus/procfs/proc_io.go +++ b/vendor/github.com/prometheus/procfs/proc_io.go @@ -15,8 +15,8 @@ package procfs import ( "fmt" - "io/ioutil" - "os" + + "github.com/prometheus/procfs/internal/util" ) // ProcIO models the content of /proc//io. @@ -39,17 +39,11 @@ type ProcIO struct { CancelledWriteBytes int64 } -// NewIO creates a new ProcIO instance from a given Proc instance. -func (p Proc) NewIO() (ProcIO, error) { +// IO creates a new ProcIO instance from a given Proc instance. +func (p Proc) IO() (ProcIO, error) { pio := ProcIO{} - f, err := os.Open(p.path("io")) - if err != nil { - return pio, err - } - defer f.Close() - - data, err := ioutil.ReadAll(f) + data, err := util.ReadFileNoStat(p.path("io")) if err != nil { return pio, err } diff --git a/vendor/github.com/prometheus/procfs/proc_limits.go b/vendor/github.com/prometheus/procfs/proc_limits.go index f04ba6fda85..91ee24df8bd 100644 --- a/vendor/github.com/prometheus/procfs/proc_limits.go +++ b/vendor/github.com/prometheus/procfs/proc_limits.go @@ -78,7 +78,14 @@ var ( ) // NewLimits returns the current soft limits of the process. +// +// Deprecated: use p.Limits() instead func (p Proc) NewLimits() (ProcLimits, error) { + return p.Limits() +} + +// Limits returns the current soft limits of the process. +func (p Proc) Limits() (ProcLimits, error) { f, err := os.Open(p.path("limits")) if err != nil { return ProcLimits{}, err diff --git a/vendor/github.com/prometheus/procfs/proc_maps.go b/vendor/github.com/prometheus/procfs/proc_maps.go new file mode 100644 index 00000000000..1d7772d516a --- /dev/null +++ b/vendor/github.com/prometheus/procfs/proc_maps.go @@ -0,0 +1,209 @@ +// Copyright 2019 The Prometheus 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. + +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris + +package procfs + +import ( + "bufio" + "fmt" + "os" + "strconv" + "strings" + + "golang.org/x/sys/unix" +) + +// ProcMapPermissions contains permission settings read from /proc/[pid]/maps +type ProcMapPermissions struct { + // mapping has the [R]ead flag set + Read bool + // mapping has the [W]rite flag set + Write bool + // mapping has the [X]ecutable flag set + Execute bool + // mapping has the [S]hared flag set + Shared bool + // mapping is marked as [P]rivate (copy on write) + Private bool +} + +// ProcMap contains the process memory-mappings of the process, +// read from /proc/[pid]/maps +type ProcMap struct { + // The start address of current mapping. + StartAddr uintptr + // The end address of the current mapping + EndAddr uintptr + // The permissions for this mapping + Perms *ProcMapPermissions + // The current offset into the file/fd (e.g., shared libs) + Offset int64 + // Device owner of this mapping (major:minor) in Mkdev format. + Dev uint64 + // The inode of the device above + Inode uint64 + // The file or psuedofile (or empty==anonymous) + Pathname string +} + +// parseDevice parses the device token of a line and converts it to a dev_t +// (mkdev) like structure. +func parseDevice(s string) (uint64, error) { + toks := strings.Split(s, ":") + if len(toks) < 2 { + return 0, fmt.Errorf("unexpected number of fields") + } + + major, err := strconv.ParseUint(toks[0], 16, 0) + if err != nil { + return 0, err + } + + minor, err := strconv.ParseUint(toks[1], 16, 0) + if err != nil { + return 0, err + } + + return unix.Mkdev(uint32(major), uint32(minor)), nil +} + +// parseAddress just converts a hex-string to a uintptr +func parseAddress(s string) (uintptr, error) { + a, err := strconv.ParseUint(s, 16, 0) + if err != nil { + return 0, err + } + + return uintptr(a), nil +} + +// parseAddresses parses the start-end address +func parseAddresses(s string) (uintptr, uintptr, error) { + toks := strings.Split(s, "-") + if len(toks) < 2 { + return 0, 0, fmt.Errorf("invalid address") + } + + saddr, err := parseAddress(toks[0]) + if err != nil { + return 0, 0, err + } + + eaddr, err := parseAddress(toks[1]) + if err != nil { + return 0, 0, err + } + + return saddr, eaddr, nil +} + +// parsePermissions parses a token and returns any that are set. +func parsePermissions(s string) (*ProcMapPermissions, error) { + if len(s) < 4 { + return nil, fmt.Errorf("invalid permissions token") + } + + perms := ProcMapPermissions{} + for _, ch := range s { + switch ch { + case 'r': + perms.Read = true + case 'w': + perms.Write = true + case 'x': + perms.Execute = true + case 'p': + perms.Private = true + case 's': + perms.Shared = true + } + } + + return &perms, nil +} + +// parseProcMap will attempt to parse a single line within a proc/[pid]/maps +// buffer. +func parseProcMap(text string) (*ProcMap, error) { + fields := strings.Fields(text) + if len(fields) < 5 { + return nil, fmt.Errorf("truncated procmap entry") + } + + saddr, eaddr, err := parseAddresses(fields[0]) + if err != nil { + return nil, err + } + + perms, err := parsePermissions(fields[1]) + if err != nil { + return nil, err + } + + offset, err := strconv.ParseInt(fields[2], 16, 0) + if err != nil { + return nil, err + } + + device, err := parseDevice(fields[3]) + if err != nil { + return nil, err + } + + inode, err := strconv.ParseUint(fields[4], 10, 0) + if err != nil { + return nil, err + } + + pathname := "" + + if len(fields) >= 5 { + pathname = strings.Join(fields[5:], " ") + } + + return &ProcMap{ + StartAddr: saddr, + EndAddr: eaddr, + Perms: perms, + Offset: offset, + Dev: device, + Inode: inode, + Pathname: pathname, + }, nil +} + +// ProcMaps reads from /proc/[pid]/maps to get the memory-mappings of the +// process. +func (p Proc) ProcMaps() ([]*ProcMap, error) { + file, err := os.Open(p.path("maps")) + if err != nil { + return nil, err + } + defer file.Close() + + maps := []*ProcMap{} + scan := bufio.NewScanner(file) + + for scan.Scan() { + m, err := parseProcMap(scan.Text()) + if err != nil { + return nil, err + } + + maps = append(maps, m) + } + + return maps, nil +} diff --git a/vendor/github.com/prometheus/procfs/proc_ns.go b/vendor/github.com/prometheus/procfs/proc_ns.go index d06c26ebad9..c66740ff746 100644 --- a/vendor/github.com/prometheus/procfs/proc_ns.go +++ b/vendor/github.com/prometheus/procfs/proc_ns.go @@ -29,9 +29,9 @@ type Namespace struct { // Namespaces contains all of the namespaces that the process is contained in. type Namespaces map[string]Namespace -// NewNamespaces reads from /proc/[pid/ns/* to get the namespaces of which the +// Namespaces reads from /proc//ns/* to get the namespaces of which the // process is a member. -func (p Proc) NewNamespaces() (Namespaces, error) { +func (p Proc) Namespaces() (Namespaces, error) { d, err := os.Open(p.path("ns")) if err != nil { return nil, err diff --git a/vendor/github.com/prometheus/procfs/proc_psi.go b/vendor/github.com/prometheus/procfs/proc_psi.go new file mode 100644 index 00000000000..0d7bee54cac --- /dev/null +++ b/vendor/github.com/prometheus/procfs/proc_psi.go @@ -0,0 +1,100 @@ +// Copyright 2019 The Prometheus 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 procfs + +// The PSI / pressure interface is described at +// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/accounting/psi.txt +// Each resource (cpu, io, memory, ...) is exposed as a single file. +// Each file may contain up to two lines, one for "some" pressure and one for "full" pressure. +// Each line contains several averages (over n seconds) and a total in µs. +// +// Example io pressure file: +// > some avg10=0.06 avg60=0.21 avg300=0.99 total=8537362 +// > full avg10=0.00 avg60=0.13 avg300=0.96 total=8183134 + +import ( + "bufio" + "bytes" + "fmt" + "io" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +const lineFormat = "avg10=%f avg60=%f avg300=%f total=%d" + +// PSILine is a single line of values as returned by /proc/pressure/* +// The Avg entries are averages over n seconds, as a percentage +// The Total line is in microseconds +type PSILine struct { + Avg10 float64 + Avg60 float64 + Avg300 float64 + Total uint64 +} + +// PSIStats represent pressure stall information from /proc/pressure/* +// Some indicates the share of time in which at least some tasks are stalled +// Full indicates the share of time in which all non-idle tasks are stalled simultaneously +type PSIStats struct { + Some *PSILine + Full *PSILine +} + +// PSIStatsForResource reads pressure stall information for the specified +// resource from /proc/pressure/. At time of writing this can be +// either "cpu", "memory" or "io". +func (fs FS) PSIStatsForResource(resource string) (PSIStats, error) { + data, err := util.ReadFileNoStat(fs.proc.Path(fmt.Sprintf("%s/%s", "pressure", resource))) + if err != nil { + return PSIStats{}, fmt.Errorf("psi_stats: unavailable for %s", resource) + } + + return parsePSIStats(resource, bytes.NewReader(data)) +} + +// parsePSIStats parses the specified file for pressure stall information +func parsePSIStats(resource string, r io.Reader) (PSIStats, error) { + psiStats := PSIStats{} + + scanner := bufio.NewScanner(r) + for scanner.Scan() { + l := scanner.Text() + prefix := strings.Split(l, " ")[0] + switch prefix { + case "some": + psi := PSILine{} + _, err := fmt.Sscanf(l, fmt.Sprintf("some %s", lineFormat), &psi.Avg10, &psi.Avg60, &psi.Avg300, &psi.Total) + if err != nil { + return PSIStats{}, err + } + psiStats.Some = &psi + case "full": + psi := PSILine{} + _, err := fmt.Sscanf(l, fmt.Sprintf("full %s", lineFormat), &psi.Avg10, &psi.Avg60, &psi.Avg300, &psi.Total) + if err != nil { + return PSIStats{}, err + } + psiStats.Full = &psi + default: + // If we encounter a line with an unknown prefix, ignore it and move on + // Should new measurement types be added in the future we'll simply ignore them instead + // of erroring on retrieval + continue + } + } + + return psiStats, nil +} diff --git a/vendor/github.com/prometheus/procfs/proc_smaps.go b/vendor/github.com/prometheus/procfs/proc_smaps.go new file mode 100644 index 00000000000..a576a720a44 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/proc_smaps.go @@ -0,0 +1,165 @@ +// Copyright 2020 The Prometheus 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. + +// +build !windows + +package procfs + +import ( + "bufio" + "errors" + "fmt" + "os" + "regexp" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +var ( + // match the header line before each mapped zone in /proc/pid/smaps + procSMapsHeaderLine = regexp.MustCompile(`^[a-f0-9].*$`) +) + +type ProcSMapsRollup struct { + // Amount of the mapping that is currently resident in RAM + Rss uint64 + // Process's proportional share of this mapping + Pss uint64 + // Size in bytes of clean shared pages + SharedClean uint64 + // Size in bytes of dirty shared pages + SharedDirty uint64 + // Size in bytes of clean private pages + PrivateClean uint64 + // Size in bytes of dirty private pages + PrivateDirty uint64 + // Amount of memory currently marked as referenced or accessed + Referenced uint64 + // Amount of memory that does not belong to any file + Anonymous uint64 + // Amount would-be-anonymous memory currently on swap + Swap uint64 + // Process's proportional memory on swap + SwapPss uint64 +} + +// ProcSMapsRollup reads from /proc/[pid]/smaps_rollup to get summed memory information of the +// process. +// +// If smaps_rollup does not exists (require kernel >= 4.15), the content of /proc/pid/smaps will +// we read and summed. +func (p Proc) ProcSMapsRollup() (ProcSMapsRollup, error) { + data, err := util.ReadFileNoStat(p.path("smaps_rollup")) + if err != nil && os.IsNotExist(err) { + return p.procSMapsRollupManual() + } + if err != nil { + return ProcSMapsRollup{}, err + } + + lines := strings.Split(string(data), "\n") + smaps := ProcSMapsRollup{} + + // skip first line which don't contains information we need + lines = lines[1:] + for _, line := range lines { + if line == "" { + continue + } + + if err := smaps.parseLine(line); err != nil { + return ProcSMapsRollup{}, err + } + } + + return smaps, nil +} + +// Read /proc/pid/smaps and do the roll-up in Go code. +func (p Proc) procSMapsRollupManual() (ProcSMapsRollup, error) { + file, err := os.Open(p.path("smaps")) + if err != nil { + return ProcSMapsRollup{}, err + } + defer file.Close() + + smaps := ProcSMapsRollup{} + scan := bufio.NewScanner(file) + + for scan.Scan() { + line := scan.Text() + + if procSMapsHeaderLine.MatchString(line) { + continue + } + + if err := smaps.parseLine(line); err != nil { + return ProcSMapsRollup{}, err + } + } + + return smaps, nil +} + +func (s *ProcSMapsRollup) parseLine(line string) error { + kv := strings.SplitN(line, ":", 2) + if len(kv) != 2 { + fmt.Println(line) + return errors.New("invalid net/dev line, missing colon") + } + + k := kv[0] + if k == "VmFlags" { + return nil + } + + v := strings.TrimSpace(kv[1]) + v = strings.TrimRight(v, " kB") + + vKBytes, err := strconv.ParseUint(v, 10, 64) + if err != nil { + return err + } + vBytes := vKBytes * 1024 + + s.addValue(k, v, vKBytes, vBytes) + + return nil +} + +func (s *ProcSMapsRollup) addValue(k string, vString string, vUint uint64, vUintBytes uint64) { + switch k { + case "Rss": + s.Rss += vUintBytes + case "Pss": + s.Pss += vUintBytes + case "Shared_Clean": + s.SharedClean += vUintBytes + case "Shared_Dirty": + s.SharedDirty += vUintBytes + case "Private_Clean": + s.PrivateClean += vUintBytes + case "Private_Dirty": + s.PrivateDirty += vUintBytes + case "Referenced": + s.Referenced += vUintBytes + case "Anonymous": + s.Anonymous += vUintBytes + case "Swap": + s.Swap += vUintBytes + case "SwapPss": + s.SwapPss += vUintBytes + } +} diff --git a/vendor/github.com/prometheus/procfs/proc_stat.go b/vendor/github.com/prometheus/procfs/proc_stat.go index 3cf2a9f18f0..4517d2e9dd0 100644 --- a/vendor/github.com/prometheus/procfs/proc_stat.go +++ b/vendor/github.com/prometheus/procfs/proc_stat.go @@ -16,8 +16,10 @@ package procfs import ( "bytes" "fmt" - "io/ioutil" "os" + + "github.com/prometheus/procfs/internal/fs" + "github.com/prometheus/procfs/internal/util" ) // Originally, this USER_HZ value was dynamically retrieved via a sysconf call @@ -95,22 +97,23 @@ type ProcStat struct { // in clock ticks. Starttime uint64 // Virtual memory size in bytes. - VSize int + VSize uint // Resident set size in pages. RSS int - fs FS + proc fs.FS } // NewStat returns the current status information of the process. +// +// Deprecated: use p.Stat() instead func (p Proc) NewStat() (ProcStat, error) { - f, err := os.Open(p.path("stat")) - if err != nil { - return ProcStat{}, err - } - defer f.Close() + return p.Stat() +} - data, err := ioutil.ReadAll(f) +// Stat returns the current status information of the process. +func (p Proc) Stat() (ProcStat, error) { + data, err := util.ReadFileNoStat(p.path("stat")) if err != nil { return ProcStat{}, err } @@ -118,7 +121,7 @@ func (p Proc) NewStat() (ProcStat, error) { var ( ignore int - s = ProcStat{PID: p.PID, fs: p.fs} + s = ProcStat{PID: p.PID, proc: p.fs} l = bytes.Index(data, []byte("(")) r = bytes.LastIndex(data, []byte(")")) ) @@ -164,7 +167,7 @@ func (p Proc) NewStat() (ProcStat, error) { } // VirtualMemory returns the virtual memory size in bytes. -func (s ProcStat) VirtualMemory() int { +func (s ProcStat) VirtualMemory() uint { return s.VSize } @@ -175,7 +178,8 @@ func (s ProcStat) ResidentMemory() int { // StartTime returns the unix timestamp of the process in seconds. func (s ProcStat) StartTime() (float64, error) { - stat, err := s.fs.NewStat() + fs := FS{proc: s.proc} + stat, err := fs.Stat() if err != nil { return 0, err } diff --git a/vendor/github.com/prometheus/procfs/proc_status.go b/vendor/github.com/prometheus/procfs/proc_status.go new file mode 100644 index 00000000000..c58346d910f --- /dev/null +++ b/vendor/github.com/prometheus/procfs/proc_status.go @@ -0,0 +1,166 @@ +// Copyright 2018 The Prometheus 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 procfs + +import ( + "bytes" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// ProcStatus provides status information about the process, +// read from /proc/[pid]/stat. +type ProcStatus struct { + // The process ID. + PID int + // The process name. + Name string + + // Thread group ID. + TGID int + + // Peak virtual memory size. + VmPeak uint64 // nolint:golint + // Virtual memory size. + VmSize uint64 // nolint:golint + // Locked memory size. + VmLck uint64 // nolint:golint + // Pinned memory size. + VmPin uint64 // nolint:golint + // Peak resident set size. + VmHWM uint64 // nolint:golint + // Resident set size (sum of RssAnnon RssFile and RssShmem). + VmRSS uint64 // nolint:golint + // Size of resident anonymous memory. + RssAnon uint64 // nolint:golint + // Size of resident file mappings. + RssFile uint64 // nolint:golint + // Size of resident shared memory. + RssShmem uint64 // nolint:golint + // Size of data segments. + VmData uint64 // nolint:golint + // Size of stack segments. + VmStk uint64 // nolint:golint + // Size of text segments. + VmExe uint64 // nolint:golint + // Shared library code size. + VmLib uint64 // nolint:golint + // Page table entries size. + VmPTE uint64 // nolint:golint + // Size of second-level page tables. + VmPMD uint64 // nolint:golint + // Swapped-out virtual memory size by anonymous private. + VmSwap uint64 // nolint:golint + // Size of hugetlb memory portions + HugetlbPages uint64 + + // Number of voluntary context switches. + VoluntaryCtxtSwitches uint64 + // Number of involuntary context switches. + NonVoluntaryCtxtSwitches uint64 + + // UIDs of the process (Real, effective, saved set, and filesystem UIDs (GIDs)) + UIDs [4]string +} + +// NewStatus returns the current status information of the process. +func (p Proc) NewStatus() (ProcStatus, error) { + data, err := util.ReadFileNoStat(p.path("status")) + if err != nil { + return ProcStatus{}, err + } + + s := ProcStatus{PID: p.PID} + + lines := strings.Split(string(data), "\n") + for _, line := range lines { + if !bytes.Contains([]byte(line), []byte(":")) { + continue + } + + kv := strings.SplitN(line, ":", 2) + + // removes spaces + k := string(strings.TrimSpace(kv[0])) + v := string(strings.TrimSpace(kv[1])) + // removes "kB" + v = string(bytes.Trim([]byte(v), " kB")) + + // value to int when possible + // we can skip error check here, 'cause vKBytes is not used when value is a string + vKBytes, _ := strconv.ParseUint(v, 10, 64) + // convert kB to B + vBytes := vKBytes * 1024 + + s.fillStatus(k, v, vKBytes, vBytes) + } + + return s, nil +} + +func (s *ProcStatus) fillStatus(k string, vString string, vUint uint64, vUintBytes uint64) { + switch k { + case "Tgid": + s.TGID = int(vUint) + case "Name": + s.Name = vString + case "Uid": + copy(s.UIDs[:], strings.Split(vString, "\t")) + case "VmPeak": + s.VmPeak = vUintBytes + case "VmSize": + s.VmSize = vUintBytes + case "VmLck": + s.VmLck = vUintBytes + case "VmPin": + s.VmPin = vUintBytes + case "VmHWM": + s.VmHWM = vUintBytes + case "VmRSS": + s.VmRSS = vUintBytes + case "RssAnon": + s.RssAnon = vUintBytes + case "RssFile": + s.RssFile = vUintBytes + case "RssShmem": + s.RssShmem = vUintBytes + case "VmData": + s.VmData = vUintBytes + case "VmStk": + s.VmStk = vUintBytes + case "VmExe": + s.VmExe = vUintBytes + case "VmLib": + s.VmLib = vUintBytes + case "VmPTE": + s.VmPTE = vUintBytes + case "VmPMD": + s.VmPMD = vUintBytes + case "VmSwap": + s.VmSwap = vUintBytes + case "HugetlbPages": + s.HugetlbPages = vUintBytes + case "voluntary_ctxt_switches": + s.VoluntaryCtxtSwitches = vUint + case "nonvoluntary_ctxt_switches": + s.NonVoluntaryCtxtSwitches = vUint + } +} + +// TotalCtxtSwitches returns the total context switch. +func (s ProcStatus) TotalCtxtSwitches() uint64 { + return s.VoluntaryCtxtSwitches + s.NonVoluntaryCtxtSwitches +} diff --git a/vendor/github.com/prometheus/procfs/schedstat.go b/vendor/github.com/prometheus/procfs/schedstat.go new file mode 100644 index 00000000000..a4c4089ac52 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/schedstat.go @@ -0,0 +1,118 @@ +// Copyright 2019 The Prometheus 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 procfs + +import ( + "bufio" + "errors" + "os" + "regexp" + "strconv" +) + +var ( + cpuLineRE = regexp.MustCompile(`cpu(\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (\d+)`) + procLineRE = regexp.MustCompile(`(\d+) (\d+) (\d+)`) +) + +// Schedstat contains scheduler statistics from /proc/schedstat +// +// See +// https://www.kernel.org/doc/Documentation/scheduler/sched-stats.txt +// for a detailed description of what these numbers mean. +// +// Note the current kernel documentation claims some of the time units are in +// jiffies when they are actually in nanoseconds since 2.6.23 with the +// introduction of CFS. A fix to the documentation is pending. See +// https://lore.kernel.org/patchwork/project/lkml/list/?series=403473 +type Schedstat struct { + CPUs []*SchedstatCPU +} + +// SchedstatCPU contains the values from one "cpu" line +type SchedstatCPU struct { + CPUNum string + + RunningNanoseconds uint64 + WaitingNanoseconds uint64 + RunTimeslices uint64 +} + +// ProcSchedstat contains the values from /proc//schedstat +type ProcSchedstat struct { + RunningNanoseconds uint64 + WaitingNanoseconds uint64 + RunTimeslices uint64 +} + +// Schedstat reads data from /proc/schedstat +func (fs FS) Schedstat() (*Schedstat, error) { + file, err := os.Open(fs.proc.Path("schedstat")) + if err != nil { + return nil, err + } + defer file.Close() + + stats := &Schedstat{} + scanner := bufio.NewScanner(file) + + for scanner.Scan() { + match := cpuLineRE.FindStringSubmatch(scanner.Text()) + if match != nil { + cpu := &SchedstatCPU{} + cpu.CPUNum = match[1] + + cpu.RunningNanoseconds, err = strconv.ParseUint(match[8], 10, 64) + if err != nil { + continue + } + + cpu.WaitingNanoseconds, err = strconv.ParseUint(match[9], 10, 64) + if err != nil { + continue + } + + cpu.RunTimeslices, err = strconv.ParseUint(match[10], 10, 64) + if err != nil { + continue + } + + stats.CPUs = append(stats.CPUs, cpu) + } + } + + return stats, nil +} + +func parseProcSchedstat(contents string) (stats ProcSchedstat, err error) { + match := procLineRE.FindStringSubmatch(contents) + + if match != nil { + stats.RunningNanoseconds, err = strconv.ParseUint(match[1], 10, 64) + if err != nil { + return + } + + stats.WaitingNanoseconds, err = strconv.ParseUint(match[2], 10, 64) + if err != nil { + return + } + + stats.RunTimeslices, err = strconv.ParseUint(match[3], 10, 64) + return + } + + err = errors.New("could not parse schedstat") + return +} diff --git a/vendor/github.com/prometheus/procfs/stat.go b/vendor/github.com/prometheus/procfs/stat.go index 61eb6b0e3ce..b2a6fc994c1 100644 --- a/vendor/github.com/prometheus/procfs/stat.go +++ b/vendor/github.com/prometheus/procfs/stat.go @@ -15,11 +15,14 @@ package procfs import ( "bufio" + "bytes" "fmt" "io" - "os" "strconv" "strings" + + "github.com/prometheus/procfs/internal/fs" + "github.com/prometheus/procfs/internal/util" ) // CPUStat shows how much time the cpu spend in various stages. @@ -78,16 +81,6 @@ type Stat struct { SoftIRQ SoftIRQStat } -// NewStat returns kernel/system statistics read from /proc/stat. -func NewStat() (Stat, error) { - fs, err := NewFS(DefaultMountPoint) - if err != nil { - return Stat{}, err - } - - return fs.NewStat() -} - // Parse a cpu statistics line and returns the CPUStat struct plus the cpu id (or -1 for the overall sum). func parseCPUStat(line string) (CPUStat, int64, error) { cpuStat := CPUStat{} @@ -149,19 +142,38 @@ func parseSoftIRQStat(line string) (SoftIRQStat, uint64, error) { return softIRQStat, total, nil } -// NewStat returns an information about current kernel/system statistics. -func (fs FS) NewStat() (Stat, error) { - // See https://www.kernel.org/doc/Documentation/filesystems/proc.txt - - f, err := os.Open(fs.Path("stat")) +// NewStat returns information about current cpu/process statistics. +// See https://www.kernel.org/doc/Documentation/filesystems/proc.txt +// +// Deprecated: use fs.Stat() instead +func NewStat() (Stat, error) { + fs, err := NewFS(fs.DefaultProcMountPoint) + if err != nil { + return Stat{}, err + } + return fs.Stat() +} + +// NewStat returns information about current cpu/process statistics. +// See https://www.kernel.org/doc/Documentation/filesystems/proc.txt +// +// Deprecated: use fs.Stat() instead +func (fs FS) NewStat() (Stat, error) { + return fs.Stat() +} + +// Stat returns information about current cpu/process statistics. +// See https://www.kernel.org/doc/Documentation/filesystems/proc.txt +func (fs FS) Stat() (Stat, error) { + fileName := fs.proc.Path("stat") + data, err := util.ReadFileNoStat(fileName) if err != nil { return Stat{}, err } - defer f.Close() stat := Stat{} - scanner := bufio.NewScanner(f) + scanner := bufio.NewScanner(bytes.NewReader(data)) for scanner.Scan() { line := scanner.Text() parts := strings.Fields(scanner.Text()) @@ -225,7 +237,7 @@ func (fs FS) NewStat() (Stat, error) { } if err := scanner.Err(); err != nil { - return Stat{}, fmt.Errorf("couldn't parse %s: %s", f.Name(), err) + return Stat{}, fmt.Errorf("couldn't parse %s: %s", fileName, err) } return stat, nil diff --git a/vendor/github.com/prometheus/procfs/swaps.go b/vendor/github.com/prometheus/procfs/swaps.go new file mode 100644 index 00000000000..15edc2212b6 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/swaps.go @@ -0,0 +1,89 @@ +// Copyright 2019 The Prometheus 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 procfs + +import ( + "bufio" + "bytes" + "fmt" + "strconv" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// Swap represents an entry in /proc/swaps. +type Swap struct { + Filename string + Type string + Size int + Used int + Priority int +} + +// Swaps returns a slice of all configured swap devices on the system. +func (fs FS) Swaps() ([]*Swap, error) { + data, err := util.ReadFileNoStat(fs.proc.Path("swaps")) + if err != nil { + return nil, err + } + return parseSwaps(data) +} + +func parseSwaps(info []byte) ([]*Swap, error) { + swaps := []*Swap{} + scanner := bufio.NewScanner(bytes.NewReader(info)) + scanner.Scan() // ignore header line + for scanner.Scan() { + swapString := scanner.Text() + parsedSwap, err := parseSwapString(swapString) + if err != nil { + return nil, err + } + swaps = append(swaps, parsedSwap) + } + + err := scanner.Err() + return swaps, err +} + +func parseSwapString(swapString string) (*Swap, error) { + var err error + + swapFields := strings.Fields(swapString) + swapLength := len(swapFields) + if swapLength < 5 { + return nil, fmt.Errorf("too few fields in swap string: %s", swapString) + } + + swap := &Swap{ + Filename: swapFields[0], + Type: swapFields[1], + } + + swap.Size, err = strconv.Atoi(swapFields[2]) + if err != nil { + return nil, fmt.Errorf("invalid swap size: %s", swapFields[2]) + } + swap.Used, err = strconv.Atoi(swapFields[3]) + if err != nil { + return nil, fmt.Errorf("invalid swap used: %s", swapFields[3]) + } + swap.Priority, err = strconv.Atoi(swapFields[4]) + if err != nil { + return nil, fmt.Errorf("invalid swap priority: %s", swapFields[4]) + } + + return swap, nil +} diff --git a/vendor/github.com/prometheus/procfs/ttar b/vendor/github.com/prometheus/procfs/ttar index b0171a12b59..19ef02b8d4e 100644 --- a/vendor/github.com/prometheus/procfs/ttar +++ b/vendor/github.com/prometheus/procfs/ttar @@ -86,8 +86,10 @@ Usage: $bname [-C ] -c -f (create archive) $bname [-C ] -x -f (extract archive) Options: - -C (change directory) - -v (verbose) + -C (change directory) + -v (verbose) + --recursive-unlink (recursively delete existing directory if path + collides with file or directory to extract) Example: Change to sysfs directory, create ttar file from fixtures directory $bname -C sysfs -c -f sysfs/fixtures.ttar fixtures/ @@ -111,8 +113,9 @@ function set_cmd { } unset VERBOSE +unset RECURSIVE_UNLINK -while getopts :cf:htxvC: opt; do +while getopts :cf:-:htxvC: opt; do case $opt in c) set_cmd "create" @@ -136,6 +139,18 @@ while getopts :cf:htxvC: opt; do C) CDIR=$OPTARG ;; + -) + case $OPTARG in + recursive-unlink) + RECURSIVE_UNLINK="yes" + ;; + *) + echo -e "Error: invalid option -$OPTARG" + echo + usage 1 + ;; + esac + ;; *) echo >&2 "ERROR: invalid option -$OPTARG" echo @@ -212,16 +227,16 @@ function extract { local eof_without_newline if [ "$size" -gt 0 ]; then if [[ "$line" =~ [^\\]EOF ]]; then - # An EOF not preceeded by a backslash indicates that the line + # An EOF not preceded by a backslash indicates that the line # does not end with a newline eof_without_newline=1 else eof_without_newline=0 fi # Replace NULLBYTE with null byte if at beginning of line - # Replace NULLBYTE with null byte unless preceeded by backslash + # Replace NULLBYTE with null byte unless preceded by backslash # Remove one backslash in front of NULLBYTE (if any) - # Remove EOF unless preceeded by backslash + # Remove EOF unless preceded by backslash # Remove one backslash in front of EOF if [ $USE_PYTHON -eq 1 ]; then echo -n "$line" | python -c "$PYTHON_EXTRACT_FILTER" >> "$path" @@ -245,7 +260,16 @@ function extract { fi if [[ $line =~ ^Path:\ (.*)$ ]]; then path=${BASH_REMATCH[1]} - if [ -e "$path" ] || [ -L "$path" ]; then + if [ -L "$path" ]; then + rm "$path" + elif [ -d "$path" ]; then + if [ "${RECURSIVE_UNLINK:-}" == "yes" ]; then + rm -r "$path" + else + # Safe because symlinks to directories are dealt with above + rmdir "$path" + fi + elif [ -e "$path" ]; then rm "$path" fi elif [[ $line =~ ^Lines:\ (.*)$ ]]; then @@ -338,8 +362,8 @@ function _create { else < "$file" \ sed 's/EOF/\\EOF/g; - s/NULLBYTE/\\NULLBYTE/g; - s/\x0/NULLBYTE/g; + s/NULLBYTE/\\NULLBYTE/g; + s/\x0/NULLBYTE/g; ' fi if [[ "$eof_without_newline" -eq 1 ]]; then diff --git a/vendor/github.com/prometheus/procfs/vm.go b/vendor/github.com/prometheus/procfs/vm.go new file mode 100644 index 00000000000..cb13891414b --- /dev/null +++ b/vendor/github.com/prometheus/procfs/vm.go @@ -0,0 +1,210 @@ +// Copyright 2019 The Prometheus 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. + +// +build !windows + +package procfs + +import ( + "fmt" + "io/ioutil" + "os" + "path/filepath" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// The VM interface is described at +// https://www.kernel.org/doc/Documentation/sysctl/vm.txt +// Each setting is exposed as a single file. +// Each file contains one line with a single numerical value, except lowmem_reserve_ratio which holds an array +// and numa_zonelist_order (deprecated) which is a string +type VM struct { + AdminReserveKbytes *int64 // /proc/sys/vm/admin_reserve_kbytes + BlockDump *int64 // /proc/sys/vm/block_dump + CompactUnevictableAllowed *int64 // /proc/sys/vm/compact_unevictable_allowed + DirtyBackgroundBytes *int64 // /proc/sys/vm/dirty_background_bytes + DirtyBackgroundRatio *int64 // /proc/sys/vm/dirty_background_ratio + DirtyBytes *int64 // /proc/sys/vm/dirty_bytes + DirtyExpireCentisecs *int64 // /proc/sys/vm/dirty_expire_centisecs + DirtyRatio *int64 // /proc/sys/vm/dirty_ratio + DirtytimeExpireSeconds *int64 // /proc/sys/vm/dirtytime_expire_seconds + DirtyWritebackCentisecs *int64 // /proc/sys/vm/dirty_writeback_centisecs + DropCaches *int64 // /proc/sys/vm/drop_caches + ExtfragThreshold *int64 // /proc/sys/vm/extfrag_threshold + HugetlbShmGroup *int64 // /proc/sys/vm/hugetlb_shm_group + LaptopMode *int64 // /proc/sys/vm/laptop_mode + LegacyVaLayout *int64 // /proc/sys/vm/legacy_va_layout + LowmemReserveRatio []*int64 // /proc/sys/vm/lowmem_reserve_ratio + MaxMapCount *int64 // /proc/sys/vm/max_map_count + MemoryFailureEarlyKill *int64 // /proc/sys/vm/memory_failure_early_kill + MemoryFailureRecovery *int64 // /proc/sys/vm/memory_failure_recovery + MinFreeKbytes *int64 // /proc/sys/vm/min_free_kbytes + MinSlabRatio *int64 // /proc/sys/vm/min_slab_ratio + MinUnmappedRatio *int64 // /proc/sys/vm/min_unmapped_ratio + MmapMinAddr *int64 // /proc/sys/vm/mmap_min_addr + NrHugepages *int64 // /proc/sys/vm/nr_hugepages + NrHugepagesMempolicy *int64 // /proc/sys/vm/nr_hugepages_mempolicy + NrOvercommitHugepages *int64 // /proc/sys/vm/nr_overcommit_hugepages + NumaStat *int64 // /proc/sys/vm/numa_stat + NumaZonelistOrder string // /proc/sys/vm/numa_zonelist_order + OomDumpTasks *int64 // /proc/sys/vm/oom_dump_tasks + OomKillAllocatingTask *int64 // /proc/sys/vm/oom_kill_allocating_task + OvercommitKbytes *int64 // /proc/sys/vm/overcommit_kbytes + OvercommitMemory *int64 // /proc/sys/vm/overcommit_memory + OvercommitRatio *int64 // /proc/sys/vm/overcommit_ratio + PageCluster *int64 // /proc/sys/vm/page-cluster + PanicOnOom *int64 // /proc/sys/vm/panic_on_oom + PercpuPagelistFraction *int64 // /proc/sys/vm/percpu_pagelist_fraction + StatInterval *int64 // /proc/sys/vm/stat_interval + Swappiness *int64 // /proc/sys/vm/swappiness + UserReserveKbytes *int64 // /proc/sys/vm/user_reserve_kbytes + VfsCachePressure *int64 // /proc/sys/vm/vfs_cache_pressure + WatermarkBoostFactor *int64 // /proc/sys/vm/watermark_boost_factor + WatermarkScaleFactor *int64 // /proc/sys/vm/watermark_scale_factor + ZoneReclaimMode *int64 // /proc/sys/vm/zone_reclaim_mode +} + +// VM reads the VM statistics from the specified `proc` filesystem. +func (fs FS) VM() (*VM, error) { + path := fs.proc.Path("sys/vm") + file, err := os.Stat(path) + if err != nil { + return nil, err + } + if !file.Mode().IsDir() { + return nil, fmt.Errorf("%s is not a directory", path) + } + + files, err := ioutil.ReadDir(path) + if err != nil { + return nil, err + } + + var vm VM + for _, f := range files { + if f.IsDir() { + continue + } + + name := filepath.Join(path, f.Name()) + // ignore errors on read, as there are some write only + // in /proc/sys/vm + value, err := util.SysReadFile(name) + if err != nil { + continue + } + vp := util.NewValueParser(value) + + switch f.Name() { + case "admin_reserve_kbytes": + vm.AdminReserveKbytes = vp.PInt64() + case "block_dump": + vm.BlockDump = vp.PInt64() + case "compact_unevictable_allowed": + vm.CompactUnevictableAllowed = vp.PInt64() + case "dirty_background_bytes": + vm.DirtyBackgroundBytes = vp.PInt64() + case "dirty_background_ratio": + vm.DirtyBackgroundRatio = vp.PInt64() + case "dirty_bytes": + vm.DirtyBytes = vp.PInt64() + case "dirty_expire_centisecs": + vm.DirtyExpireCentisecs = vp.PInt64() + case "dirty_ratio": + vm.DirtyRatio = vp.PInt64() + case "dirtytime_expire_seconds": + vm.DirtytimeExpireSeconds = vp.PInt64() + case "dirty_writeback_centisecs": + vm.DirtyWritebackCentisecs = vp.PInt64() + case "drop_caches": + vm.DropCaches = vp.PInt64() + case "extfrag_threshold": + vm.ExtfragThreshold = vp.PInt64() + case "hugetlb_shm_group": + vm.HugetlbShmGroup = vp.PInt64() + case "laptop_mode": + vm.LaptopMode = vp.PInt64() + case "legacy_va_layout": + vm.LegacyVaLayout = vp.PInt64() + case "lowmem_reserve_ratio": + stringSlice := strings.Fields(value) + pint64Slice := make([]*int64, 0, len(stringSlice)) + for _, value := range stringSlice { + vp := util.NewValueParser(value) + pint64Slice = append(pint64Slice, vp.PInt64()) + } + vm.LowmemReserveRatio = pint64Slice + case "max_map_count": + vm.MaxMapCount = vp.PInt64() + case "memory_failure_early_kill": + vm.MemoryFailureEarlyKill = vp.PInt64() + case "memory_failure_recovery": + vm.MemoryFailureRecovery = vp.PInt64() + case "min_free_kbytes": + vm.MinFreeKbytes = vp.PInt64() + case "min_slab_ratio": + vm.MinSlabRatio = vp.PInt64() + case "min_unmapped_ratio": + vm.MinUnmappedRatio = vp.PInt64() + case "mmap_min_addr": + vm.MmapMinAddr = vp.PInt64() + case "nr_hugepages": + vm.NrHugepages = vp.PInt64() + case "nr_hugepages_mempolicy": + vm.NrHugepagesMempolicy = vp.PInt64() + case "nr_overcommit_hugepages": + vm.NrOvercommitHugepages = vp.PInt64() + case "numa_stat": + vm.NumaStat = vp.PInt64() + case "numa_zonelist_order": + vm.NumaZonelistOrder = value + case "oom_dump_tasks": + vm.OomDumpTasks = vp.PInt64() + case "oom_kill_allocating_task": + vm.OomKillAllocatingTask = vp.PInt64() + case "overcommit_kbytes": + vm.OvercommitKbytes = vp.PInt64() + case "overcommit_memory": + vm.OvercommitMemory = vp.PInt64() + case "overcommit_ratio": + vm.OvercommitRatio = vp.PInt64() + case "page-cluster": + vm.PageCluster = vp.PInt64() + case "panic_on_oom": + vm.PanicOnOom = vp.PInt64() + case "percpu_pagelist_fraction": + vm.PercpuPagelistFraction = vp.PInt64() + case "stat_interval": + vm.StatInterval = vp.PInt64() + case "swappiness": + vm.Swappiness = vp.PInt64() + case "user_reserve_kbytes": + vm.UserReserveKbytes = vp.PInt64() + case "vfs_cache_pressure": + vm.VfsCachePressure = vp.PInt64() + case "watermark_boost_factor": + vm.WatermarkBoostFactor = vp.PInt64() + case "watermark_scale_factor": + vm.WatermarkScaleFactor = vp.PInt64() + case "zone_reclaim_mode": + vm.ZoneReclaimMode = vp.PInt64() + } + if err := vp.Err(); err != nil { + return nil, err + } + } + + return &vm, nil +} diff --git a/vendor/github.com/prometheus/procfs/xfrm.go b/vendor/github.com/prometheus/procfs/xfrm.go index 8f1508f0fd1..30aa417d530 100644 --- a/vendor/github.com/prometheus/procfs/xfrm.go +++ b/vendor/github.com/prometheus/procfs/xfrm.go @@ -97,7 +97,7 @@ func NewXfrmStat() (XfrmStat, error) { // NewXfrmStat reads the xfrm_stat statistics from the 'proc' filesystem. func (fs FS) NewXfrmStat() (XfrmStat, error) { - file, err := os.Open(fs.Path("net/xfrm_stat")) + file, err := os.Open(fs.proc.Path("net/xfrm_stat")) if err != nil { return XfrmStat{}, err } diff --git a/vendor/github.com/prometheus/procfs/xfs/parse.go b/vendor/github.com/prometheus/procfs/xfs/parse.go deleted file mode 100644 index 2bc0ef3427d..00000000000 --- a/vendor/github.com/prometheus/procfs/xfs/parse.go +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright 2017 The Prometheus 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 xfs - -import ( - "bufio" - "fmt" - "io" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// ParseStats parses a Stats from an input io.Reader, using the format -// found in /proc/fs/xfs/stat. -func ParseStats(r io.Reader) (*Stats, error) { - const ( - // Fields parsed into stats structures. - fieldExtentAlloc = "extent_alloc" - fieldAbt = "abt" - fieldBlkMap = "blk_map" - fieldBmbt = "bmbt" - fieldDir = "dir" - fieldTrans = "trans" - fieldIg = "ig" - fieldLog = "log" - fieldRw = "rw" - fieldAttr = "attr" - fieldIcluster = "icluster" - fieldVnodes = "vnodes" - fieldBuf = "buf" - fieldXpc = "xpc" - - // Unimplemented at this time due to lack of documentation. - fieldPushAil = "push_ail" - fieldXstrat = "xstrat" - fieldAbtb2 = "abtb2" - fieldAbtc2 = "abtc2" - fieldBmbt2 = "bmbt2" - fieldIbt2 = "ibt2" - fieldFibt2 = "fibt2" - fieldQm = "qm" - fieldDebug = "debug" - ) - - var xfss Stats - - s := bufio.NewScanner(r) - for s.Scan() { - // Expect at least a string label and a single integer value, ex: - // - abt 0 - // - rw 1 2 - ss := strings.Fields(string(s.Bytes())) - if len(ss) < 2 { - continue - } - label := ss[0] - - // Extended precision counters are uint64 values. - if label == fieldXpc { - us, err := util.ParseUint64s(ss[1:]) - if err != nil { - return nil, err - } - - xfss.ExtendedPrecision, err = extendedPrecisionStats(us) - if err != nil { - return nil, err - } - - continue - } - - // All other counters are uint32 values. - us, err := util.ParseUint32s(ss[1:]) - if err != nil { - return nil, err - } - - switch label { - case fieldExtentAlloc: - xfss.ExtentAllocation, err = extentAllocationStats(us) - case fieldAbt: - xfss.AllocationBTree, err = btreeStats(us) - case fieldBlkMap: - xfss.BlockMapping, err = blockMappingStats(us) - case fieldBmbt: - xfss.BlockMapBTree, err = btreeStats(us) - case fieldDir: - xfss.DirectoryOperation, err = directoryOperationStats(us) - case fieldTrans: - xfss.Transaction, err = transactionStats(us) - case fieldIg: - xfss.InodeOperation, err = inodeOperationStats(us) - case fieldLog: - xfss.LogOperation, err = logOperationStats(us) - case fieldRw: - xfss.ReadWrite, err = readWriteStats(us) - case fieldAttr: - xfss.AttributeOperation, err = attributeOperationStats(us) - case fieldIcluster: - xfss.InodeClustering, err = inodeClusteringStats(us) - case fieldVnodes: - xfss.Vnode, err = vnodeStats(us) - case fieldBuf: - xfss.Buffer, err = bufferStats(us) - } - if err != nil { - return nil, err - } - } - - return &xfss, s.Err() -} - -// extentAllocationStats builds an ExtentAllocationStats from a slice of uint32s. -func extentAllocationStats(us []uint32) (ExtentAllocationStats, error) { - if l := len(us); l != 4 { - return ExtentAllocationStats{}, fmt.Errorf("incorrect number of values for XFS extent allocation stats: %d", l) - } - - return ExtentAllocationStats{ - ExtentsAllocated: us[0], - BlocksAllocated: us[1], - ExtentsFreed: us[2], - BlocksFreed: us[3], - }, nil -} - -// btreeStats builds a BTreeStats from a slice of uint32s. -func btreeStats(us []uint32) (BTreeStats, error) { - if l := len(us); l != 4 { - return BTreeStats{}, fmt.Errorf("incorrect number of values for XFS btree stats: %d", l) - } - - return BTreeStats{ - Lookups: us[0], - Compares: us[1], - RecordsInserted: us[2], - RecordsDeleted: us[3], - }, nil -} - -// BlockMappingStat builds a BlockMappingStats from a slice of uint32s. -func blockMappingStats(us []uint32) (BlockMappingStats, error) { - if l := len(us); l != 7 { - return BlockMappingStats{}, fmt.Errorf("incorrect number of values for XFS block mapping stats: %d", l) - } - - return BlockMappingStats{ - Reads: us[0], - Writes: us[1], - Unmaps: us[2], - ExtentListInsertions: us[3], - ExtentListDeletions: us[4], - ExtentListLookups: us[5], - ExtentListCompares: us[6], - }, nil -} - -// DirectoryOperationStats builds a DirectoryOperationStats from a slice of uint32s. -func directoryOperationStats(us []uint32) (DirectoryOperationStats, error) { - if l := len(us); l != 4 { - return DirectoryOperationStats{}, fmt.Errorf("incorrect number of values for XFS directory operation stats: %d", l) - } - - return DirectoryOperationStats{ - Lookups: us[0], - Creates: us[1], - Removes: us[2], - Getdents: us[3], - }, nil -} - -// TransactionStats builds a TransactionStats from a slice of uint32s. -func transactionStats(us []uint32) (TransactionStats, error) { - if l := len(us); l != 3 { - return TransactionStats{}, fmt.Errorf("incorrect number of values for XFS transaction stats: %d", l) - } - - return TransactionStats{ - Sync: us[0], - Async: us[1], - Empty: us[2], - }, nil -} - -// InodeOperationStats builds an InodeOperationStats from a slice of uint32s. -func inodeOperationStats(us []uint32) (InodeOperationStats, error) { - if l := len(us); l != 7 { - return InodeOperationStats{}, fmt.Errorf("incorrect number of values for XFS inode operation stats: %d", l) - } - - return InodeOperationStats{ - Attempts: us[0], - Found: us[1], - Recycle: us[2], - Missed: us[3], - Duplicate: us[4], - Reclaims: us[5], - AttributeChange: us[6], - }, nil -} - -// LogOperationStats builds a LogOperationStats from a slice of uint32s. -func logOperationStats(us []uint32) (LogOperationStats, error) { - if l := len(us); l != 5 { - return LogOperationStats{}, fmt.Errorf("incorrect number of values for XFS log operation stats: %d", l) - } - - return LogOperationStats{ - Writes: us[0], - Blocks: us[1], - NoInternalBuffers: us[2], - Force: us[3], - ForceSleep: us[4], - }, nil -} - -// ReadWriteStats builds a ReadWriteStats from a slice of uint32s. -func readWriteStats(us []uint32) (ReadWriteStats, error) { - if l := len(us); l != 2 { - return ReadWriteStats{}, fmt.Errorf("incorrect number of values for XFS read write stats: %d", l) - } - - return ReadWriteStats{ - Read: us[0], - Write: us[1], - }, nil -} - -// AttributeOperationStats builds an AttributeOperationStats from a slice of uint32s. -func attributeOperationStats(us []uint32) (AttributeOperationStats, error) { - if l := len(us); l != 4 { - return AttributeOperationStats{}, fmt.Errorf("incorrect number of values for XFS attribute operation stats: %d", l) - } - - return AttributeOperationStats{ - Get: us[0], - Set: us[1], - Remove: us[2], - List: us[3], - }, nil -} - -// InodeClusteringStats builds an InodeClusteringStats from a slice of uint32s. -func inodeClusteringStats(us []uint32) (InodeClusteringStats, error) { - if l := len(us); l != 3 { - return InodeClusteringStats{}, fmt.Errorf("incorrect number of values for XFS inode clustering stats: %d", l) - } - - return InodeClusteringStats{ - Iflush: us[0], - Flush: us[1], - FlushInode: us[2], - }, nil -} - -// VnodeStats builds a VnodeStats from a slice of uint32s. -func vnodeStats(us []uint32) (VnodeStats, error) { - // The attribute "Free" appears to not be available on older XFS - // stats versions. Therefore, 7 or 8 elements may appear in - // this slice. - l := len(us) - if l != 7 && l != 8 { - return VnodeStats{}, fmt.Errorf("incorrect number of values for XFS vnode stats: %d", l) - } - - s := VnodeStats{ - Active: us[0], - Allocate: us[1], - Get: us[2], - Hold: us[3], - Release: us[4], - Reclaim: us[5], - Remove: us[6], - } - - // Skip adding free, unless it is present. The zero value will - // be used in place of an actual count. - if l == 7 { - return s, nil - } - - s.Free = us[7] - return s, nil -} - -// BufferStats builds a BufferStats from a slice of uint32s. -func bufferStats(us []uint32) (BufferStats, error) { - if l := len(us); l != 9 { - return BufferStats{}, fmt.Errorf("incorrect number of values for XFS buffer stats: %d", l) - } - - return BufferStats{ - Get: us[0], - Create: us[1], - GetLocked: us[2], - GetLockedWaited: us[3], - BusyLocked: us[4], - MissLocked: us[5], - PageRetries: us[6], - PageFound: us[7], - GetRead: us[8], - }, nil -} - -// ExtendedPrecisionStats builds an ExtendedPrecisionStats from a slice of uint32s. -func extendedPrecisionStats(us []uint64) (ExtendedPrecisionStats, error) { - if l := len(us); l != 3 { - return ExtendedPrecisionStats{}, fmt.Errorf("incorrect number of values for XFS extended precision stats: %d", l) - } - - return ExtendedPrecisionStats{ - FlushBytes: us[0], - WriteBytes: us[1], - ReadBytes: us[2], - }, nil -} diff --git a/vendor/github.com/prometheus/procfs/xfs/xfs.go b/vendor/github.com/prometheus/procfs/xfs/xfs.go deleted file mode 100644 index d86794b7ca9..00000000000 --- a/vendor/github.com/prometheus/procfs/xfs/xfs.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2017 The Prometheus 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 xfs provides access to statistics exposed by the XFS filesystem. -package xfs - -// Stats contains XFS filesystem runtime statistics, parsed from -// /proc/fs/xfs/stat. -// -// The names and meanings of each statistic were taken from -// http://xfs.org/index.php/Runtime_Stats and xfs_stats.h in the Linux -// kernel source. Most counters are uint32s (same data types used in -// xfs_stats.h), but some of the "extended precision stats" are uint64s. -type Stats struct { - // The name of the filesystem used to source these statistics. - // If empty, this indicates aggregated statistics for all XFS - // filesystems on the host. - Name string - - ExtentAllocation ExtentAllocationStats - AllocationBTree BTreeStats - BlockMapping BlockMappingStats - BlockMapBTree BTreeStats - DirectoryOperation DirectoryOperationStats - Transaction TransactionStats - InodeOperation InodeOperationStats - LogOperation LogOperationStats - ReadWrite ReadWriteStats - AttributeOperation AttributeOperationStats - InodeClustering InodeClusteringStats - Vnode VnodeStats - Buffer BufferStats - ExtendedPrecision ExtendedPrecisionStats -} - -// ExtentAllocationStats contains statistics regarding XFS extent allocations. -type ExtentAllocationStats struct { - ExtentsAllocated uint32 - BlocksAllocated uint32 - ExtentsFreed uint32 - BlocksFreed uint32 -} - -// BTreeStats contains statistics regarding an XFS internal B-tree. -type BTreeStats struct { - Lookups uint32 - Compares uint32 - RecordsInserted uint32 - RecordsDeleted uint32 -} - -// BlockMappingStats contains statistics regarding XFS block maps. -type BlockMappingStats struct { - Reads uint32 - Writes uint32 - Unmaps uint32 - ExtentListInsertions uint32 - ExtentListDeletions uint32 - ExtentListLookups uint32 - ExtentListCompares uint32 -} - -// DirectoryOperationStats contains statistics regarding XFS directory entries. -type DirectoryOperationStats struct { - Lookups uint32 - Creates uint32 - Removes uint32 - Getdents uint32 -} - -// TransactionStats contains statistics regarding XFS metadata transactions. -type TransactionStats struct { - Sync uint32 - Async uint32 - Empty uint32 -} - -// InodeOperationStats contains statistics regarding XFS inode operations. -type InodeOperationStats struct { - Attempts uint32 - Found uint32 - Recycle uint32 - Missed uint32 - Duplicate uint32 - Reclaims uint32 - AttributeChange uint32 -} - -// LogOperationStats contains statistics regarding the XFS log buffer. -type LogOperationStats struct { - Writes uint32 - Blocks uint32 - NoInternalBuffers uint32 - Force uint32 - ForceSleep uint32 -} - -// ReadWriteStats contains statistics regarding the number of read and write -// system calls for XFS filesystems. -type ReadWriteStats struct { - Read uint32 - Write uint32 -} - -// AttributeOperationStats contains statistics regarding manipulation of -// XFS extended file attributes. -type AttributeOperationStats struct { - Get uint32 - Set uint32 - Remove uint32 - List uint32 -} - -// InodeClusteringStats contains statistics regarding XFS inode clustering -// operations. -type InodeClusteringStats struct { - Iflush uint32 - Flush uint32 - FlushInode uint32 -} - -// VnodeStats contains statistics regarding XFS vnode operations. -type VnodeStats struct { - Active uint32 - Allocate uint32 - Get uint32 - Hold uint32 - Release uint32 - Reclaim uint32 - Remove uint32 - Free uint32 -} - -// BufferStats contains statistics regarding XFS read/write I/O buffers. -type BufferStats struct { - Get uint32 - Create uint32 - GetLocked uint32 - GetLockedWaited uint32 - BusyLocked uint32 - MissLocked uint32 - PageRetries uint32 - PageFound uint32 - GetRead uint32 -} - -// ExtendedPrecisionStats contains high precision counters used to track the -// total number of bytes read, written, or flushed, during XFS operations. -type ExtendedPrecisionStats struct { - FlushBytes uint64 - WriteBytes uint64 - ReadBytes uint64 -} diff --git a/vendor/github.com/prometheus/procfs/zoneinfo.go b/vendor/github.com/prometheus/procfs/zoneinfo.go new file mode 100644 index 00000000000..e941503d5cd --- /dev/null +++ b/vendor/github.com/prometheus/procfs/zoneinfo.go @@ -0,0 +1,196 @@ +// Copyright 2019 The Prometheus 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. + +// +build !windows + +package procfs + +import ( + "bytes" + "fmt" + "io/ioutil" + "regexp" + "strings" + + "github.com/prometheus/procfs/internal/util" +) + +// Zoneinfo holds info parsed from /proc/zoneinfo. +type Zoneinfo struct { + Node string + Zone string + NrFreePages *int64 + Min *int64 + Low *int64 + High *int64 + Scanned *int64 + Spanned *int64 + Present *int64 + Managed *int64 + NrActiveAnon *int64 + NrInactiveAnon *int64 + NrIsolatedAnon *int64 + NrAnonPages *int64 + NrAnonTransparentHugepages *int64 + NrActiveFile *int64 + NrInactiveFile *int64 + NrIsolatedFile *int64 + NrFilePages *int64 + NrSlabReclaimable *int64 + NrSlabUnreclaimable *int64 + NrMlockStack *int64 + NrKernelStack *int64 + NrMapped *int64 + NrDirty *int64 + NrWriteback *int64 + NrUnevictable *int64 + NrShmem *int64 + NrDirtied *int64 + NrWritten *int64 + NumaHit *int64 + NumaMiss *int64 + NumaForeign *int64 + NumaInterleave *int64 + NumaLocal *int64 + NumaOther *int64 + Protection []*int64 +} + +var nodeZoneRE = regexp.MustCompile(`(\d+), zone\s+(\w+)`) + +// Zoneinfo parses an zoneinfo-file (/proc/zoneinfo) and returns a slice of +// structs containing the relevant info. More information available here: +// https://www.kernel.org/doc/Documentation/sysctl/vm.txt +func (fs FS) Zoneinfo() ([]Zoneinfo, error) { + data, err := ioutil.ReadFile(fs.proc.Path("zoneinfo")) + if err != nil { + return nil, fmt.Errorf("error reading zoneinfo %s: %s", fs.proc.Path("zoneinfo"), err) + } + zoneinfo, err := parseZoneinfo(data) + if err != nil { + return nil, fmt.Errorf("error parsing zoneinfo %s: %s", fs.proc.Path("zoneinfo"), err) + } + return zoneinfo, nil +} + +func parseZoneinfo(zoneinfoData []byte) ([]Zoneinfo, error) { + + zoneinfo := []Zoneinfo{} + + zoneinfoBlocks := bytes.Split(zoneinfoData, []byte("\nNode")) + for _, block := range zoneinfoBlocks { + var zoneinfoElement Zoneinfo + lines := strings.Split(string(block), "\n") + for _, line := range lines { + + if nodeZone := nodeZoneRE.FindStringSubmatch(line); nodeZone != nil { + zoneinfoElement.Node = nodeZone[1] + zoneinfoElement.Zone = nodeZone[2] + continue + } + if strings.HasPrefix(strings.TrimSpace(line), "per-node stats") { + zoneinfoElement.Zone = "" + continue + } + parts := strings.Fields(strings.TrimSpace(line)) + if len(parts) < 2 { + continue + } + vp := util.NewValueParser(parts[1]) + switch parts[0] { + case "nr_free_pages": + zoneinfoElement.NrFreePages = vp.PInt64() + case "min": + zoneinfoElement.Min = vp.PInt64() + case "low": + zoneinfoElement.Low = vp.PInt64() + case "high": + zoneinfoElement.High = vp.PInt64() + case "scanned": + zoneinfoElement.Scanned = vp.PInt64() + case "spanned": + zoneinfoElement.Spanned = vp.PInt64() + case "present": + zoneinfoElement.Present = vp.PInt64() + case "managed": + zoneinfoElement.Managed = vp.PInt64() + case "nr_active_anon": + zoneinfoElement.NrActiveAnon = vp.PInt64() + case "nr_inactive_anon": + zoneinfoElement.NrInactiveAnon = vp.PInt64() + case "nr_isolated_anon": + zoneinfoElement.NrIsolatedAnon = vp.PInt64() + case "nr_anon_pages": + zoneinfoElement.NrAnonPages = vp.PInt64() + case "nr_anon_transparent_hugepages": + zoneinfoElement.NrAnonTransparentHugepages = vp.PInt64() + case "nr_active_file": + zoneinfoElement.NrActiveFile = vp.PInt64() + case "nr_inactive_file": + zoneinfoElement.NrInactiveFile = vp.PInt64() + case "nr_isolated_file": + zoneinfoElement.NrIsolatedFile = vp.PInt64() + case "nr_file_pages": + zoneinfoElement.NrFilePages = vp.PInt64() + case "nr_slab_reclaimable": + zoneinfoElement.NrSlabReclaimable = vp.PInt64() + case "nr_slab_unreclaimable": + zoneinfoElement.NrSlabUnreclaimable = vp.PInt64() + case "nr_mlock_stack": + zoneinfoElement.NrMlockStack = vp.PInt64() + case "nr_kernel_stack": + zoneinfoElement.NrKernelStack = vp.PInt64() + case "nr_mapped": + zoneinfoElement.NrMapped = vp.PInt64() + case "nr_dirty": + zoneinfoElement.NrDirty = vp.PInt64() + case "nr_writeback": + zoneinfoElement.NrWriteback = vp.PInt64() + case "nr_unevictable": + zoneinfoElement.NrUnevictable = vp.PInt64() + case "nr_shmem": + zoneinfoElement.NrShmem = vp.PInt64() + case "nr_dirtied": + zoneinfoElement.NrDirtied = vp.PInt64() + case "nr_written": + zoneinfoElement.NrWritten = vp.PInt64() + case "numa_hit": + zoneinfoElement.NumaHit = vp.PInt64() + case "numa_miss": + zoneinfoElement.NumaMiss = vp.PInt64() + case "numa_foreign": + zoneinfoElement.NumaForeign = vp.PInt64() + case "numa_interleave": + zoneinfoElement.NumaInterleave = vp.PInt64() + case "numa_local": + zoneinfoElement.NumaLocal = vp.PInt64() + case "numa_other": + zoneinfoElement.NumaOther = vp.PInt64() + case "protection:": + protectionParts := strings.Split(line, ":") + protectionValues := strings.Replace(protectionParts[1], "(", "", 1) + protectionValues = strings.Replace(protectionValues, ")", "", 1) + protectionValues = strings.TrimSpace(protectionValues) + protectionStringMap := strings.Split(protectionValues, ", ") + val, err := util.ParsePInt64s(protectionStringMap) + if err == nil { + zoneinfoElement.Protection = val + } + } + + } + + zoneinfo = append(zoneinfo, zoneinfoElement) + } + return zoneinfo, nil +} diff --git a/vendor/github.com/rubiojr/go-vhd/vhd/util.go b/vendor/github.com/rubiojr/go-vhd/vhd/util.go index 765d1cff37e..7dd71700777 100644 --- a/vendor/github.com/rubiojr/go-vhd/vhd/util.go +++ b/vendor/github.com/rubiojr/go-vhd/vhd/util.go @@ -1,13 +1,10 @@ package vhd import ( - "encoding/binary" "encoding/hex" "fmt" "os" "strings" - "unicode/utf16" - "unicode/utf8" ) // https://groups.google.com/forum/#!msg/golang-nuts/d0nF_k4dSx4/rPGgfXv6QCoJ @@ -55,19 +52,3 @@ func uuidToBytes(uuid string) []byte { return h } - -/* - utf16BytesToString converts UTF-16 encoded bytes, in big or - little endian byte order, to a UTF-8 encoded string. - http://stackoverflow.com/a/15794113 -*/ -func utf16BytesToString(b []byte, o binary.ByteOrder) string { - utf := make([]uint16, (len(b)+(2-1))/2) - for i := 0; i+(2-1) < len(b); i += 2 { - utf[i/2] = o.Uint16(b[i:]) - } - if len(b)/2 < len(utf) { - utf[len(utf)-1] = utf8.RuneError - } - return string(utf16.Decode(utf)) -} diff --git a/vendor/github.com/rubiojr/go-vhd/vhd/vhd.go b/vendor/github.com/rubiojr/go-vhd/vhd/vhd.go index ded00ff6c75..2c86e05e9a6 100644 --- a/vendor/github.com/rubiojr/go-vhd/vhd/vhd.go +++ b/vendor/github.com/rubiojr/go-vhd/vhd/vhd.go @@ -11,6 +11,9 @@ import ( "os" "strconv" "time" + + "golang.org/x/text/encoding/unicode" + "golang.org/x/text/transform" ) const VHD_COOKIE = "636f6e6563746978" // conectix @@ -324,8 +327,14 @@ func (vhd *VHD) PrintExtraHeader() { fmtField("Parent timestamp", fmt.Sprintf("%s", t)) fmtField("Reserved", hexs(header.Reserved[:])) - parentName := utf16BytesToString(header.ParentUnicodeName[:], - binary.BigEndian) + parentNameBytes, _, err := transform.Bytes( + unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM).NewDecoder(), + header.ParentUnicodeName[:], + ) + if err != nil { + panic(err) + } + parentName := string(parentNameBytes) fmtField("Parent Name", parentName) // Parent locator entries ignored since it's a dynamic disk sum := 0 diff --git a/vendor/github.com/spf13/cobra/.gitignore b/vendor/github.com/spf13/cobra/.gitignore index 3b053c59ec2..c7b459e4dd0 100644 --- a/vendor/github.com/spf13/cobra/.gitignore +++ b/vendor/github.com/spf13/cobra/.gitignore @@ -32,7 +32,8 @@ Session.vim tags *.exe - cobra.test +bin -.idea/* +.idea/ +*.iml diff --git a/vendor/github.com/spf13/cobra/.travis.yml b/vendor/github.com/spf13/cobra/.travis.yml index 38b85f499ca..a9bd4e54785 100644 --- a/vendor/github.com/spf13/cobra/.travis.yml +++ b/vendor/github.com/spf13/cobra/.travis.yml @@ -3,29 +3,27 @@ language: go stages: - diff - test + - build go: - - 1.10.x - - 1.11.x - 1.12.x + - 1.13.x - tip +before_install: + - go get -u github.com/kyoh86/richgo + - go get -u github.com/mitchellh/gox + matrix: allow_failures: - go: tip include: - stage: diff - go: 1.12.x - script: diff -u <(echo -n) <(gofmt -d -s .) + go: 1.13.x + script: make fmt + - stage: build + go: 1.13.x + script: make cobra_generator -before_install: - - mkdir -p bin - - curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.6.0/shellcheck - - chmod +x bin/shellcheck - - go get -u github.com/kyoh86/richgo -script: - - PATH=$PATH:$PWD/bin richgo test -v ./... - - go build - - if [ -z $NOVET ]; then - diff -u <(echo -n) <(go vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint'); - fi +script: + - make test diff --git a/vendor/github.com/spf13/cobra/Makefile b/vendor/github.com/spf13/cobra/Makefile new file mode 100644 index 00000000000..e9740d1e175 --- /dev/null +++ b/vendor/github.com/spf13/cobra/Makefile @@ -0,0 +1,36 @@ +BIN="./bin" +SRC=$(shell find . -name "*.go") + +ifeq (, $(shell which richgo)) +$(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo") +endif + +.PHONY: fmt vet test cobra_generator install_deps clean + +default: all + +all: fmt vet test cobra_generator + +fmt: + $(info ******************** checking formatting ********************) + @test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1) + +test: install_deps vet + $(info ******************** running tests ********************) + richgo test -v ./... + +cobra_generator: install_deps + $(info ******************** building generator ********************) + mkdir -p $(BIN) + make -C cobra all + +install_deps: + $(info ******************** downloading dependencies ********************) + go get -v ./... + +vet: + $(info ******************** vetting ********************) + go vet ./... + +clean: + rm -rf $(BIN) diff --git a/vendor/github.com/spf13/cobra/README.md b/vendor/github.com/spf13/cobra/README.md index 60c5a425bc9..9d79934260f 100644 --- a/vendor/github.com/spf13/cobra/README.md +++ b/vendor/github.com/spf13/cobra/README.md @@ -24,11 +24,13 @@ Many of the most widely used Go projects are built using Cobra, such as: [Prototool](https://github.com/uber/prototool), [mattermost-server](https://github.com/mattermost/mattermost-server), [Gardener](https://github.com/gardener/gardenctl), +[Linkerd](https://linkerd.io/), +[Github CLI](https://github.com/cli/cli) etc. [![Build Status](https://travis-ci.org/spf13/cobra.svg "Travis CI status")](https://travis-ci.org/spf13/cobra) -[![CircleCI status](https://circleci.com/gh/spf13/cobra.png?circle-token=:circle-token "CircleCI status")](https://circleci.com/gh/spf13/cobra) [![GoDoc](https://godoc.org/github.com/spf13/cobra?status.svg)](https://godoc.org/github.com/spf13/cobra) +[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cobra)](https://goreportcard.com/report/github.com/spf13/cobra) # Table of Contents @@ -208,51 +210,78 @@ You will additionally define flags and handle configuration in your init() funct For example cmd/root.go: ```go -import ( - "fmt" - "os" +package cmd - homedir "github.com/mitchellh/go-homedir" - "github.com/spf13/cobra" - "github.com/spf13/viper" +import ( + "fmt" + "os" + + homedir "github.com/mitchellh/go-homedir" + "github.com/spf13/cobra" + "github.com/spf13/viper" ) +var ( + // Used for flags. + cfgFile string + userLicense string + + rootCmd = &cobra.Command{ + Use: "cobra", + Short: "A generator for Cobra based Applications", + Long: `Cobra is a CLI library for Go that empowers applications. +This application is a tool to generate the needed files +to quickly create a Cobra application.`, + } +) + +// Execute executes the root command. +func Execute() error { + return rootCmd.Execute() +} + func init() { - cobra.OnInitialize(initConfig) - rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)") - rootCmd.PersistentFlags().StringVarP(&projectBase, "projectbase", "b", "", "base project directory eg. github.com/spf13/") - rootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "Author name for copyright attribution") - rootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "Name of license for the project (can provide `licensetext` in config)") - rootCmd.PersistentFlags().Bool("viper", true, "Use Viper for configuration") - viper.BindPFlag("author", rootCmd.PersistentFlags().Lookup("author")) - viper.BindPFlag("projectbase", rootCmd.PersistentFlags().Lookup("projectbase")) - viper.BindPFlag("useViper", rootCmd.PersistentFlags().Lookup("viper")) - viper.SetDefault("author", "NAME HERE ") - viper.SetDefault("license", "apache") + cobra.OnInitialize(initConfig) + + rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)") + rootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "author name for copyright attribution") + rootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "name of license for the project") + rootCmd.PersistentFlags().Bool("viper", true, "use Viper for configuration") + viper.BindPFlag("author", rootCmd.PersistentFlags().Lookup("author")) + viper.BindPFlag("useViper", rootCmd.PersistentFlags().Lookup("viper")) + viper.SetDefault("author", "NAME HERE ") + viper.SetDefault("license", "apache") + + rootCmd.AddCommand(addCmd) + rootCmd.AddCommand(initCmd) +} + +func er(msg interface{}) { + fmt.Println("Error:", msg) + os.Exit(1) } func initConfig() { - // Don't forget to read config either from cfgFile or from home directory! - if cfgFile != "" { - // Use config file from the flag. - viper.SetConfigFile(cfgFile) - } else { - // Find home directory. - home, err := homedir.Dir() - if err != nil { - fmt.Println(err) - os.Exit(1) - } + if cfgFile != "" { + // Use config file from the flag. + viper.SetConfigFile(cfgFile) + } else { + // Find home directory. + home, err := homedir.Dir() + if err != nil { + er(err) + } - // Search config in home directory with name ".cobra" (without extension). - viper.AddConfigPath(home) - viper.SetConfigName(".cobra") - } + // Search config in home directory with name ".cobra" (without extension). + viper.AddConfigPath(home) + viper.SetConfigName(".cobra") + } - if err := viper.ReadInConfig(); err != nil { - fmt.Println("Can't read config:", err) - os.Exit(1) - } + viper.AutomaticEnv() + + if err := viper.ReadInConfig(); err == nil { + fmt.Println("Using config file:", viper.ConfigFileUsed()) + } } ``` @@ -459,7 +488,7 @@ For many years people have printed back to the screen.`, Echo works a lot like print, except it has a child command.`, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - fmt.Println("Print: " + strings.Join(args, " ")) + fmt.Println("Echo: " + strings.Join(args, " ")) }, } diff --git a/vendor/github.com/spf13/cobra/args.go b/vendor/github.com/spf13/cobra/args.go index c4d820b8531..70e9b262912 100644 --- a/vendor/github.com/spf13/cobra/args.go +++ b/vendor/github.com/spf13/cobra/args.go @@ -2,6 +2,7 @@ package cobra import ( "fmt" + "strings" ) type PositionalArgs func(cmd *Command, args []string) error @@ -34,8 +35,15 @@ func NoArgs(cmd *Command, args []string) error { // OnlyValidArgs returns an error if any args are not in the list of ValidArgs. func OnlyValidArgs(cmd *Command, args []string) error { if len(cmd.ValidArgs) > 0 { + // Remove any description that may be included in ValidArgs. + // A description is following a tab character. + var validArgs []string + for _, v := range cmd.ValidArgs { + validArgs = append(validArgs, strings.Split(v, "\t")[0]) + } + for _, v := range args { - if !stringInSlice(v, cmd.ValidArgs) { + if !stringInSlice(v, validArgs) { return fmt.Errorf("invalid argument %q for %q%s", v, cmd.CommandPath(), cmd.findSuggestions(args[0])) } } diff --git a/vendor/github.com/spf13/cobra/bash_completions.go b/vendor/github.com/spf13/cobra/bash_completions.go index 57bb8e1b3fd..1e27188c3d2 100644 --- a/vendor/github.com/spf13/cobra/bash_completions.go +++ b/vendor/github.com/spf13/cobra/bash_completions.go @@ -58,9 +58,71 @@ __%[1]s_contains_word() return 1 } +__%[1]s_handle_go_custom_completion() +{ + __%[1]s_debug "${FUNCNAME[0]}: cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}" + + local out requestComp lastParam lastChar comp directive args + + # Prepare the command to request completions for the program. + # Calling ${words[0]} instead of directly %[1]s allows to handle aliases + args=("${words[@]:1}") + requestComp="${words[0]} %[2]s ${args[*]}" + + lastParam=${words[$((${#words[@]}-1))]} + lastChar=${lastParam:$((${#lastParam}-1)):1} + __%[1]s_debug "${FUNCNAME[0]}: lastParam ${lastParam}, lastChar ${lastChar}" + + if [ -z "${cur}" ] && [ "${lastChar}" != "=" ]; then + # If the last parameter is complete (there is a space following it) + # We add an extra empty parameter so we can indicate this to the go method. + __%[1]s_debug "${FUNCNAME[0]}: Adding extra empty parameter" + requestComp="${requestComp} \"\"" + fi + + __%[1]s_debug "${FUNCNAME[0]}: calling ${requestComp}" + # Use eval to handle any environment variables and such + out=$(eval "${requestComp}" 2>/dev/null) + + # Extract the directive integer at the very end of the output following a colon (:) + directive=${out##*:} + # Remove the directive + out=${out%%:*} + if [ "${directive}" = "${out}" ]; then + # There is not directive specified + directive=0 + fi + __%[1]s_debug "${FUNCNAME[0]}: the completion directive is: ${directive}" + __%[1]s_debug "${FUNCNAME[0]}: the completions are: ${out[*]}" + + if [ $((directive & %[3]d)) -ne 0 ]; then + # Error code. No completion. + __%[1]s_debug "${FUNCNAME[0]}: received error from custom completion go code" + return + else + if [ $((directive & %[4]d)) -ne 0 ]; then + if [[ $(type -t compopt) = "builtin" ]]; then + __%[1]s_debug "${FUNCNAME[0]}: activating no space" + compopt -o nospace + fi + fi + if [ $((directive & %[5]d)) -ne 0 ]; then + if [[ $(type -t compopt) = "builtin" ]]; then + __%[1]s_debug "${FUNCNAME[0]}: activating no file completion" + compopt +o default + fi + fi + + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${out[*]}" -- "$cur") + fi +} + __%[1]s_handle_reply() { __%[1]s_debug "${FUNCNAME[0]}" + local comp case $cur in -*) if [[ $(type -t compopt) = "builtin" ]]; then @@ -72,7 +134,9 @@ __%[1]s_handle_reply() else allflags=("${flags[*]} ${two_word_flags[*]}") fi - COMPREPLY=( $(compgen -W "${allflags[*]}" -- "$cur") ) + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${allflags[*]}" -- "$cur") if [[ $(type -t compopt) = "builtin" ]]; then [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace fi @@ -118,14 +182,22 @@ __%[1]s_handle_reply() completions=("${commands[@]}") if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then completions=("${must_have_one_noun[@]}") + elif [[ -n "${has_completion_function}" ]]; then + # if a go completion function is provided, defer to that function + completions=() + __%[1]s_handle_go_custom_completion fi if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then completions+=("${must_have_one_flag[@]}") fi - COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") ) + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${completions[*]}" -- "$cur") if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then - COMPREPLY=( $(compgen -W "${noun_aliases[*]}" -- "$cur") ) + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${noun_aliases[*]}" -- "$cur") fi if [[ ${#COMPREPLY[@]} -eq 0 ]]; then @@ -160,7 +232,7 @@ __%[1]s_handle_filename_extension_flag() __%[1]s_handle_subdirs_in_dir_flag() { local dir="$1" - pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 + pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return } __%[1]s_handle_flag() @@ -272,7 +344,7 @@ __%[1]s_handle_word() __%[1]s_handle_word } -`, name)) +`, name, ShellCompNoDescRequestCmd, ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp)) } func writePostscript(buf *bytes.Buffer, name string) { @@ -297,6 +369,7 @@ func writePostscript(buf *bytes.Buffer, name string) { local commands=("%[1]s") local must_have_one_flag=() local must_have_one_noun=() + local has_completion_function local last_command local nouns=() @@ -397,7 +470,22 @@ func writeLocalNonPersistentFlag(buf *bytes.Buffer, flag *pflag.Flag) { buf.WriteString(fmt.Sprintf(format, name)) } +// Setup annotations for go completions for registered flags +func prepareCustomAnnotationsForFlags(cmd *Command) { + for flag := range flagCompletionFunctions { + // Make sure the completion script calls the __*_go_custom_completion function for + // every registered flag. We need to do this here (and not when the flag was registered + // for completion) so that we can know the root command name for the prefix + // of ___go_custom_completion + if flag.Annotations == nil { + flag.Annotations = map[string][]string{} + } + flag.Annotations[BashCompCustom] = []string{fmt.Sprintf("__%[1]s_handle_go_custom_completion", cmd.Root().Name())} + } +} + func writeFlags(buf *bytes.Buffer, cmd *Command) { + prepareCustomAnnotationsForFlags(cmd) buf.WriteString(` flags=() two_word_flags=() local_nonpersistent_flags=() @@ -460,8 +548,14 @@ func writeRequiredNouns(buf *bytes.Buffer, cmd *Command) { buf.WriteString(" must_have_one_noun=()\n") sort.Sort(sort.StringSlice(cmd.ValidArgs)) for _, value := range cmd.ValidArgs { + // Remove any description that may be included following a tab character. + // Descriptions are not supported by bash completion. + value = strings.Split(value, "\t")[0] buf.WriteString(fmt.Sprintf(" must_have_one_noun+=(%q)\n", value)) } + if cmd.ValidArgsFunction != nil { + buf.WriteString(" has_completion_function=1\n") + } } func writeCmdAliases(buf *bytes.Buffer, cmd *Command) { diff --git a/vendor/github.com/spf13/cobra/bash_completions.md b/vendor/github.com/spf13/cobra/bash_completions.md index 4ac61ee132a..e61a3a6546b 100644 --- a/vendor/github.com/spf13/cobra/bash_completions.md +++ b/vendor/github.com/spf13/cobra/bash_completions.md @@ -56,7 +56,149 @@ func main() { `out.sh` will get you completions of subcommands and flags. Copy it to `/etc/bash_completion.d/` as described [here](https://debian-administration.org/article/316/An_introduction_to_bash_completion_part_1) and reset your terminal to use autocompletion. If you make additional annotations to your code, you can get even more intelligent and flexible behavior. -## Creating your own custom functions +## Have the completions code complete your 'nouns' + +### Static completion of nouns + +This method allows you to provide a pre-defined list of completion choices for your nouns using the `validArgs` field. +For example, if you want `kubectl get [tab][tab]` to show a list of valid "nouns" you have to set them. Simplified code from `kubectl get` looks like: + +```go +validArgs []string = { "pod", "node", "service", "replicationcontroller" } + +cmd := &cobra.Command{ + Use: "get [(-o|--output=)json|yaml|template|...] (RESOURCE [NAME] | RESOURCE/NAME ...)", + Short: "Display one or many resources", + Long: get_long, + Example: get_example, + Run: func(cmd *cobra.Command, args []string) { + err := RunGet(f, out, cmd, args) + util.CheckErr(err) + }, + ValidArgs: validArgs, +} +``` + +Notice we put the "ValidArgs" on the "get" subcommand. Doing so will give results like + +```bash +# kubectl get [tab][tab] +node pod replicationcontroller service +``` + +### Plural form and shortcuts for nouns + +If your nouns have a number of aliases, you can define them alongside `ValidArgs` using `ArgAliases`: + +```go +argAliases []string = { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" } + +cmd := &cobra.Command{ + ... + ValidArgs: validArgs, + ArgAliases: argAliases +} +``` + +The aliases are not shown to the user on tab completion, but they are accepted as valid nouns by +the completion algorithm if entered manually, e.g. in: + +```bash +# kubectl get rc [tab][tab] +backend frontend database +``` + +Note that without declaring `rc` as an alias, the completion algorithm would show the list of nouns +in this example again instead of the replication controllers. + +### Dynamic completion of nouns + +In some cases it is not possible to provide a list of possible completions in advance. Instead, the list of completions must be determined at execution-time. Cobra provides two ways of defining such dynamic completion of nouns. Note that both these methods can be used along-side each other as long as they are not both used for the same command. + +**Note**: *Custom Completions written in Go* will automatically work for other shell-completion scripts (e.g., Fish shell), while *Custom Completions written in Bash* will only work for Bash shell-completion. It is therefore recommended to use *Custom Completions written in Go*. + +#### 1. Custom completions of nouns written in Go + +In a similar fashion as for static completions, you can use the `ValidArgsFunction` field to provide a Go function that Cobra will execute when it needs the list of completion choices for the nouns of a command. Note that either `ValidArgs` or `ValidArgsFunction` can be used for a single cobra command, but not both. +Simplified code from `helm status` looks like: + +```go +cmd := &cobra.Command{ + Use: "status RELEASE_NAME", + Short: "Display the status of the named release", + Long: status_long, + RunE: func(cmd *cobra.Command, args []string) { + RunGet(args[0]) + }, + ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + if len(args) != 0 { + return nil, cobra.ShellCompDirectiveNoFileComp + } + return getReleasesFromCluster(toComplete), cobra.ShellCompDirectiveNoFileComp + }, +} +``` +Where `getReleasesFromCluster()` is a Go function that obtains the list of current Helm releases running on the Kubernetes cluster. +Notice we put the `ValidArgsFunction` on the `status` subcommand. Let's assume the Helm releases on the cluster are: `harbor`, `notary`, `rook` and `thanos` then this dynamic completion will give results like + +```bash +# helm status [tab][tab] +harbor notary rook thanos +``` +You may have noticed the use of `cobra.ShellCompDirective`. These directives are bit fields allowing to control some shell completion behaviors for your particular completion. You can combine them with the bit-or operator such as `cobra.ShellCompDirectiveNoSpace | cobra.ShellCompDirectiveNoFileComp` +```go +// Indicates an error occurred and completions should be ignored. +ShellCompDirectiveError +// Indicates that the shell should not add a space after the completion, +// even if there is a single completion provided. +ShellCompDirectiveNoSpace +// Indicates that the shell should not provide file completion even when +// no completion is provided. +// This currently does not work for zsh or bash < 4 +ShellCompDirectiveNoFileComp +// Indicates that the shell will perform its default behavior after completions +// have been provided (this implies !ShellCompDirectiveNoSpace && !ShellCompDirectiveNoFileComp). +ShellCompDirectiveDefault +``` + +When using the `ValidArgsFunction`, Cobra will call your registered function after having parsed all flags and arguments provided in the command-line. You therefore don't need to do this parsing yourself. For example, when a user calls `helm status --namespace my-rook-ns [tab][tab]`, Cobra will call your registered `ValidArgsFunction` after having parsed the `--namespace` flag, as it would have done when calling the `RunE` function. + +##### Debugging + +Cobra achieves dynamic completions written in Go through the use of a hidden command called by the completion script. To debug your Go completion code, you can call this hidden command directly: +```bash +# helm __complete status har +harbor +:4 +Completion ended with directive: ShellCompDirectiveNoFileComp # This is on stderr +``` +***Important:*** If the noun to complete is empty, you must pass an empty parameter to the `__complete` command: +```bash +# helm __complete status "" +harbor +notary +rook +thanos +:4 +Completion ended with directive: ShellCompDirectiveNoFileComp # This is on stderr +``` +Calling the `__complete` command directly allows you to run the Go debugger to troubleshoot your code. You can also add printouts to your code; Cobra provides the following functions to use for printouts in Go completion code: +```go +// Prints to the completion script debug file (if BASH_COMP_DEBUG_FILE +// is set to a file path) and optionally prints to stderr. +cobra.CompDebug(msg string, printToStdErr bool) { +cobra.CompDebugln(msg string, printToStdErr bool) + +// Prints to the completion script debug file (if BASH_COMP_DEBUG_FILE +// is set to a file path) and to stderr. +cobra.CompError(msg string) +cobra.CompErrorln(msg string) +``` +***Important:*** You should **not** leave traces that print to stdout in your completion code as they will be interpreted as completion choices by the completion script. Instead, use the cobra-provided debugging traces functions mentioned above. + +#### 2. Custom completions of nouns written in Bash + +This method allows you to inject bash functions into the completion script. Those bash functions are responsible for providing the completion choices for your own completions. Some more actual code that works in kubernetes: @@ -111,58 +253,6 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`, The `BashCompletionFunction` option is really only valid/useful on the root command. Doing the above will cause `__kubectl_custom_func()` (`___custom_func()`) to be called when the built in processor was unable to find a solution. In the case of kubernetes a valid command might look something like `kubectl get pod [mypod]`. If you type `kubectl get pod [tab][tab]` the `__kubectl_customc_func()` will run because the cobra.Command only understood "kubectl" and "get." `__kubectl_custom_func()` will see that the cobra.Command is "kubectl_get" and will thus call another helper `__kubectl_get_resource()`. `__kubectl_get_resource` will look at the 'nouns' collected. In our example the only noun will be `pod`. So it will call `__kubectl_parse_get pod`. `__kubectl_parse_get` will actually call out to kubernetes and get any pods. It will then set `COMPREPLY` to valid pods! -## Have the completions code complete your 'nouns' - -In the above example "pod" was assumed to already be typed. But if you want `kubectl get [tab][tab]` to show a list of valid "nouns" you have to set them. Simplified code from `kubectl get` looks like: - -```go -validArgs []string = { "pod", "node", "service", "replicationcontroller" } - -cmd := &cobra.Command{ - Use: "get [(-o|--output=)json|yaml|template|...] (RESOURCE [NAME] | RESOURCE/NAME ...)", - Short: "Display one or many resources", - Long: get_long, - Example: get_example, - Run: func(cmd *cobra.Command, args []string) { - err := RunGet(f, out, cmd, args) - util.CheckErr(err) - }, - ValidArgs: validArgs, -} -``` - -Notice we put the "ValidArgs" on the "get" subcommand. Doing so will give results like - -```bash -# kubectl get [tab][tab] -node pod replicationcontroller service -``` - -## Plural form and shortcuts for nouns - -If your nouns have a number of aliases, you can define them alongside `ValidArgs` using `ArgAliases`: - -```go -argAliases []string = { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" } - -cmd := &cobra.Command{ - ... - ValidArgs: validArgs, - ArgAliases: argAliases -} -``` - -The aliases are not shown to the user on tab completion, but they are accepted as valid nouns by -the completion algorithm if entered manually, e.g. in: - -```bash -# kubectl get rc [tab][tab] -backend frontend database -``` - -Note that without declaring `rc` as an alias, the completion algorithm would show the list of nouns -in this example again instead of the replication controllers. - ## Mark flags as required Most of the time completions will only show subcommands. But if a flag is required to make a subcommand work, you probably want it to show up when the user types [tab][tab]. Marking a flag as 'Required' is incredibly easy. @@ -211,8 +301,45 @@ So while there are many other files in the CWD it only shows me subdirs and thos # Specify custom flag completion -Similar to the filename completion and filtering using cobra.BashCompFilenameExt, you can specify -a custom flag completion function with cobra.BashCompCustom: +As for nouns, Cobra provides two ways of defining dynamic completion of flags. Note that both these methods can be used along-side each other as long as they are not both used for the same flag. + +**Note**: *Custom Completions written in Go* will automatically work for other shell-completion scripts (e.g., Fish shell), while *Custom Completions written in Bash* will only work for Bash shell-completion. It is therefore recommended to use *Custom Completions written in Go*. + +## 1. Custom completions of flags written in Go + +To provide a Go function that Cobra will execute when it needs the list of completion choices for a flag, you must register the function in the following manner: + +```go +flagName := "output" +cmd.RegisterFlagCompletionFunc(flagName, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + return []string{"json", "table", "yaml"}, cobra.ShellCompDirectiveDefault +}) +``` +Notice that calling `RegisterFlagCompletionFunc()` is done through the `command` with which the flag is associated. In our example this dynamic completion will give results like so: + +```bash +# helm status --output [tab][tab] +json table yaml +``` + +### Debugging + +You can also easily debug your Go completion code for flags: +```bash +# helm __complete status --output "" +json +table +yaml +:4 +Completion ended with directive: ShellCompDirectiveNoFileComp # This is on stderr +``` +***Important:*** You should **not** leave traces that print to stdout in your completion code as they will be interpreted as completion choices by the completion script. Instead, use the cobra-provided debugging traces functions mentioned in the above section. + +## 2. Custom completions of flags written in Bash + +Alternatively, you can use bash code for flag custom completion. Similar to the filename +completion and filtering using `cobra.BashCompFilenameExt`, you can specify +a custom flag completion bash function with `cobra.BashCompCustom`: ```go annotation := make(map[string][]string) @@ -226,7 +353,7 @@ a custom flag completion function with cobra.BashCompCustom: cmd.Flags().AddFlag(flag) ``` -In addition add the `__handle_namespace_flag` implementation in the `BashCompletionFunction` +In addition add the `__kubectl_get_namespaces` implementation in the `BashCompletionFunction` value, e.g.: ```bash diff --git a/vendor/github.com/spf13/cobra/cobra.go b/vendor/github.com/spf13/cobra/cobra.go index 6505c070b40..d01becc8fa6 100644 --- a/vendor/github.com/spf13/cobra/cobra.go +++ b/vendor/github.com/spf13/cobra/cobra.go @@ -52,7 +52,7 @@ var EnableCommandSorting = true // if the CLI is started from explorer.exe. // To disable the mousetrap, just set this variable to blank string (""). // Works only on Microsoft Windows. -var MousetrapHelpText string = `This is a command line tool. +var MousetrapHelpText = `This is a command line tool. You need to open cmd.exe and run it from there. ` @@ -61,7 +61,7 @@ You need to open cmd.exe and run it from there. // if the CLI is started from explorer.exe. Set to 0 to wait for the return key to be pressed. // To disable the mousetrap, just set MousetrapHelpText to blank string (""). // Works only on Microsoft Windows. -var MousetrapDisplayDuration time.Duration = 5 * time.Second +var MousetrapDisplayDuration = 5 * time.Second // AddTemplateFunc adds a template function that's available to Usage and Help // template generation. diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go index c7e89830343..88e6ed77d0e 100644 --- a/vendor/github.com/spf13/cobra/command.go +++ b/vendor/github.com/spf13/cobra/command.go @@ -17,6 +17,7 @@ package cobra import ( "bytes" + "context" "fmt" "io" "os" @@ -56,6 +57,10 @@ type Command struct { // ValidArgs is list of all valid non-flag arguments that are accepted in bash completions ValidArgs []string + // ValidArgsFunction is an optional function that provides valid non-flag arguments for bash completion. + // It is a dynamic version of using ValidArgs. + // Only one of ValidArgs and ValidArgsFunction can be used for a command. + ValidArgsFunction func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) // Expected arguments Args PositionalArgs @@ -80,7 +85,8 @@ type Command struct { // Version defines the version for this command. If this value is non-empty and the command does not // define a "version" flag, a "version" boolean flag will be added to the command and, if specified, - // will print content of the "Version" variable. + // will print content of the "Version" variable. A shorthand "v" flag will also be added if the + // command does not define one. Version string // The *Run functions are executed in the following order: @@ -140,9 +146,11 @@ type Command struct { // TraverseChildren parses flags on all parents before executing child command. TraverseChildren bool - //FParseErrWhitelist flag parse errors to be ignored + // FParseErrWhitelist flag parse errors to be ignored FParseErrWhitelist FParseErrWhitelist + ctx context.Context + // commands is the list of commands supported by this program. commands []*Command // parent is a parent command for this command. @@ -202,6 +210,12 @@ type Command struct { errWriter io.Writer } +// Context returns underlying command context. If command wasn't +// executed with ExecuteContext Context returns Background context. +func (c *Command) Context() context.Context { + return c.ctx +} + // SetArgs sets arguments for the command. It is set to os.Args[1:] by default, if desired, can be overridden // particularly useful when testing. func (c *Command) SetArgs(a []string) { @@ -228,7 +242,7 @@ func (c *Command) SetErr(newErr io.Writer) { c.errWriter = newErr } -// SetOut sets the source for input data +// SetIn sets the source for input data // If newIn is nil, os.Stdin is used. func (c *Command) SetIn(newIn io.Reader) { c.inReader = newIn @@ -297,7 +311,7 @@ func (c *Command) ErrOrStderr() io.Writer { return c.getErr(os.Stderr) } -// ErrOrStderr returns output to stderr +// InOrStdin returns input to stdin func (c *Command) InOrStdin() io.Reader { return c.getIn(os.Stdin) } @@ -369,6 +383,8 @@ func (c *Command) HelpFunc() func(*Command, []string) { } return func(c *Command, a []string) { c.mergePersistentFlags() + // The help should be sent to stdout + // See https://github.com/spf13/cobra/issues/1002 err := tmpl(c.OutOrStdout(), c.HelpTemplate(), c) if err != nil { c.Println(err) @@ -857,6 +873,13 @@ func (c *Command) preRun() { } } +// ExecuteContext is the same as Execute(), but sets the ctx on the command. +// Retrieve ctx by calling cmd.Context() inside your *Run lifecycle functions. +func (c *Command) ExecuteContext(ctx context.Context) error { + c.ctx = ctx + return c.Execute() +} + // Execute uses the args (os.Args[1:] by default) // and run through the command tree finding appropriate matches // for commands and then corresponding flags. @@ -867,6 +890,10 @@ func (c *Command) Execute() error { // ExecuteC executes the command. func (c *Command) ExecuteC() (cmd *Command, err error) { + if c.ctx == nil { + c.ctx = context.Background() + } + // Regardless of what command execute is called on, run on Root only if c.HasParent() { return c.Root().ExecuteC() @@ -888,6 +915,9 @@ func (c *Command) ExecuteC() (cmd *Command, err error) { args = os.Args[1:] } + // initialize the hidden command to be used for bash completion + c.initCompleteCmd(args) + var flags []string if c.TraverseChildren { cmd, flags, err = c.Traverse(args) @@ -911,6 +941,12 @@ func (c *Command) ExecuteC() (cmd *Command, err error) { cmd.commandCalledAs.name = cmd.Name() } + // We have to pass global context to children command + // if context is present on the parent command. + if cmd.ctx == nil { + cmd.ctx = c.ctx + } + err = cmd.execute(flags) if err != nil { // Always show help if requested, even if SilenceErrors is in @@ -994,7 +1030,11 @@ func (c *Command) InitDefaultVersionFlag() { } else { usage += c.Name() } - c.Flags().Bool("version", false, usage) + if c.Flags().ShorthandLookup("v") == nil { + c.Flags().BoolP("version", "v", false, usage) + } else { + c.Flags().Bool("version", false, usage) + } } } @@ -1547,7 +1587,7 @@ func (c *Command) ParseFlags(args []string) error { beforeErrorBufLen := c.flagErrorBuf.Len() c.mergePersistentFlags() - //do it here after merging all flags and just before parse + // do it here after merging all flags and just before parse c.Flags().ParseErrorsWhitelist = flag.ParseErrorsWhitelist(c.FParseErrWhitelist) err := c.Flags().Parse(args) diff --git a/vendor/github.com/spf13/cobra/custom_completions.go b/vendor/github.com/spf13/cobra/custom_completions.go new file mode 100644 index 00000000000..ba57327c153 --- /dev/null +++ b/vendor/github.com/spf13/cobra/custom_completions.go @@ -0,0 +1,384 @@ +package cobra + +import ( + "errors" + "fmt" + "os" + "strings" + + "github.com/spf13/pflag" +) + +const ( + // ShellCompRequestCmd is the name of the hidden command that is used to request + // completion results from the program. It is used by the shell completion scripts. + ShellCompRequestCmd = "__complete" + // ShellCompNoDescRequestCmd is the name of the hidden command that is used to request + // completion results without their description. It is used by the shell completion scripts. + ShellCompNoDescRequestCmd = "__completeNoDesc" +) + +// Global map of flag completion functions. +var flagCompletionFunctions = map[*pflag.Flag]func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective){} + +// ShellCompDirective is a bit map representing the different behaviors the shell +// can be instructed to have once completions have been provided. +type ShellCompDirective int + +const ( + // ShellCompDirectiveError indicates an error occurred and completions should be ignored. + ShellCompDirectiveError ShellCompDirective = 1 << iota + + // ShellCompDirectiveNoSpace indicates that the shell should not add a space + // after the completion even if there is a single completion provided. + ShellCompDirectiveNoSpace + + // ShellCompDirectiveNoFileComp indicates that the shell should not provide + // file completion even when no completion is provided. + // This currently does not work for zsh or bash < 4 + ShellCompDirectiveNoFileComp + + // ShellCompDirectiveDefault indicates to let the shell perform its default + // behavior after completions have been provided. + ShellCompDirectiveDefault ShellCompDirective = 0 +) + +// RegisterFlagCompletionFunc should be called to register a function to provide completion for a flag. +func (c *Command) RegisterFlagCompletionFunc(flagName string, f func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective)) error { + flag := c.Flag(flagName) + if flag == nil { + return fmt.Errorf("RegisterFlagCompletionFunc: flag '%s' does not exist", flagName) + } + if _, exists := flagCompletionFunctions[flag]; exists { + return fmt.Errorf("RegisterFlagCompletionFunc: flag '%s' already registered", flagName) + } + flagCompletionFunctions[flag] = f + return nil +} + +// Returns a string listing the different directive enabled in the specified parameter +func (d ShellCompDirective) string() string { + var directives []string + if d&ShellCompDirectiveError != 0 { + directives = append(directives, "ShellCompDirectiveError") + } + if d&ShellCompDirectiveNoSpace != 0 { + directives = append(directives, "ShellCompDirectiveNoSpace") + } + if d&ShellCompDirectiveNoFileComp != 0 { + directives = append(directives, "ShellCompDirectiveNoFileComp") + } + if len(directives) == 0 { + directives = append(directives, "ShellCompDirectiveDefault") + } + + if d > ShellCompDirectiveError+ShellCompDirectiveNoSpace+ShellCompDirectiveNoFileComp { + return fmt.Sprintf("ERROR: unexpected ShellCompDirective value: %d", d) + } + return strings.Join(directives, ", ") +} + +// Adds a special hidden command that can be used to request custom completions. +func (c *Command) initCompleteCmd(args []string) { + completeCmd := &Command{ + Use: fmt.Sprintf("%s [command-line]", ShellCompRequestCmd), + Aliases: []string{ShellCompNoDescRequestCmd}, + DisableFlagsInUseLine: true, + Hidden: true, + DisableFlagParsing: true, + Args: MinimumNArgs(1), + Short: "Request shell completion choices for the specified command-line", + Long: fmt.Sprintf("%[2]s is a special command that is used by the shell completion logic\n%[1]s", + "to request completion choices for the specified command-line.", ShellCompRequestCmd), + Run: func(cmd *Command, args []string) { + finalCmd, completions, directive, err := cmd.getCompletions(args) + if err != nil { + CompErrorln(err.Error()) + // Keep going for multiple reasons: + // 1- There could be some valid completions even though there was an error + // 2- Even without completions, we need to print the directive + } + + noDescriptions := (cmd.CalledAs() == ShellCompNoDescRequestCmd) + for _, comp := range completions { + if noDescriptions { + // Remove any description that may be included following a tab character. + comp = strings.Split(comp, "\t")[0] + } + // Print each possible completion to stdout for the completion script to consume. + fmt.Fprintln(finalCmd.OutOrStdout(), comp) + } + + if directive > ShellCompDirectiveError+ShellCompDirectiveNoSpace+ShellCompDirectiveNoFileComp { + directive = ShellCompDirectiveDefault + } + + // As the last printout, print the completion directive for the completion script to parse. + // The directive integer must be that last character following a single colon (:). + // The completion script expects : + fmt.Fprintf(finalCmd.OutOrStdout(), ":%d\n", directive) + + // Print some helpful info to stderr for the user to understand. + // Output from stderr must be ignored by the completion script. + fmt.Fprintf(finalCmd.ErrOrStderr(), "Completion ended with directive: %s\n", directive.string()) + }, + } + c.AddCommand(completeCmd) + subCmd, _, err := c.Find(args) + if err != nil || subCmd.Name() != ShellCompRequestCmd { + // Only create this special command if it is actually being called. + // This reduces possible side-effects of creating such a command; + // for example, having this command would cause problems to a + // cobra program that only consists of the root command, since this + // command would cause the root command to suddenly have a subcommand. + c.RemoveCommand(completeCmd) + } +} + +func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDirective, error) { + var completions []string + + // The last argument, which is not completely typed by the user, + // should not be part of the list of arguments + toComplete := args[len(args)-1] + trimmedArgs := args[:len(args)-1] + + // Find the real command for which completion must be performed + finalCmd, finalArgs, err := c.Root().Find(trimmedArgs) + if err != nil { + // Unable to find the real command. E.g., someInvalidCmd + return c, completions, ShellCompDirectiveDefault, fmt.Errorf("Unable to find a command for arguments: %v", trimmedArgs) + } + + // When doing completion of a flag name, as soon as an argument starts with + // a '-' we know it is a flag. We cannot use isFlagArg() here as it requires + // the flag to be complete + if len(toComplete) > 0 && toComplete[0] == '-' && !strings.Contains(toComplete, "=") { + // We are completing a flag name + finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { + completions = append(completions, getFlagNameCompletions(flag, toComplete)...) + }) + finalCmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) { + completions = append(completions, getFlagNameCompletions(flag, toComplete)...) + }) + + directive := ShellCompDirectiveDefault + if len(completions) > 0 { + if strings.HasSuffix(completions[0], "=") { + directive = ShellCompDirectiveNoSpace + } + } + return finalCmd, completions, directive, nil + } + + var flag *pflag.Flag + if !finalCmd.DisableFlagParsing { + // We only do flag completion if we are allowed to parse flags + // This is important for commands which have requested to do their own flag completion. + flag, finalArgs, toComplete, err = checkIfFlagCompletion(finalCmd, finalArgs, toComplete) + if err != nil { + // Error while attempting to parse flags + return finalCmd, completions, ShellCompDirectiveDefault, err + } + } + + if flag == nil { + // Complete subcommand names + for _, subCmd := range finalCmd.Commands() { + if subCmd.IsAvailableCommand() && strings.HasPrefix(subCmd.Name(), toComplete) { + completions = append(completions, fmt.Sprintf("%s\t%s", subCmd.Name(), subCmd.Short)) + } + } + + if len(finalCmd.ValidArgs) > 0 { + // Always complete ValidArgs, even if we are completing a subcommand name. + // This is for commands that have both subcommands and ValidArgs. + for _, validArg := range finalCmd.ValidArgs { + if strings.HasPrefix(validArg, toComplete) { + completions = append(completions, validArg) + } + } + + // If there are ValidArgs specified (even if they don't match), we stop completion. + // Only one of ValidArgs or ValidArgsFunction can be used for a single command. + return finalCmd, completions, ShellCompDirectiveNoFileComp, nil + } + + // Always let the logic continue so as to add any ValidArgsFunction completions, + // even if we already found sub-commands. + // This is for commands that have subcommands but also specify a ValidArgsFunction. + } + + // Parse the flags and extract the arguments to prepare for calling the completion function + if err = finalCmd.ParseFlags(finalArgs); err != nil { + return finalCmd, completions, ShellCompDirectiveDefault, fmt.Errorf("Error while parsing flags from args %v: %s", finalArgs, err.Error()) + } + + // We only remove the flags from the arguments if DisableFlagParsing is not set. + // This is important for commands which have requested to do their own flag completion. + if !finalCmd.DisableFlagParsing { + finalArgs = finalCmd.Flags().Args() + } + + // Find the completion function for the flag or command + var completionFn func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective) + if flag != nil { + completionFn = flagCompletionFunctions[flag] + } else { + completionFn = finalCmd.ValidArgsFunction + } + if completionFn == nil { + // Go custom completion not supported/needed for this flag or command + return finalCmd, completions, ShellCompDirectiveDefault, nil + } + + // Call the registered completion function to get the completions + comps, directive := completionFn(finalCmd, finalArgs, toComplete) + completions = append(completions, comps...) + return finalCmd, completions, directive, nil +} + +func getFlagNameCompletions(flag *pflag.Flag, toComplete string) []string { + if nonCompletableFlag(flag) { + return []string{} + } + + var completions []string + flagName := "--" + flag.Name + if strings.HasPrefix(flagName, toComplete) { + // Flag without the = + completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) + + if len(flag.NoOptDefVal) == 0 { + // Flag requires a value, so it can be suffixed with = + flagName += "=" + completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) + } + } + + flagName = "-" + flag.Shorthand + if len(flag.Shorthand) > 0 && strings.HasPrefix(flagName, toComplete) { + completions = append(completions, fmt.Sprintf("%s\t%s", flagName, flag.Usage)) + } + + return completions +} + +func checkIfFlagCompletion(finalCmd *Command, args []string, lastArg string) (*pflag.Flag, []string, string, error) { + var flagName string + trimmedArgs := args + flagWithEqual := false + if isFlagArg(lastArg) { + if index := strings.Index(lastArg, "="); index >= 0 { + flagName = strings.TrimLeft(lastArg[:index], "-") + lastArg = lastArg[index+1:] + flagWithEqual = true + } else { + return nil, nil, "", errors.New("Unexpected completion request for flag") + } + } + + if len(flagName) == 0 { + if len(args) > 0 { + prevArg := args[len(args)-1] + if isFlagArg(prevArg) { + // Only consider the case where the flag does not contain an =. + // If the flag contains an = it means it has already been fully processed, + // so we don't need to deal with it here. + if index := strings.Index(prevArg, "="); index < 0 { + flagName = strings.TrimLeft(prevArg, "-") + + // Remove the uncompleted flag or else there could be an error created + // for an invalid value for that flag + trimmedArgs = args[:len(args)-1] + } + } + } + } + + if len(flagName) == 0 { + // Not doing flag completion + return nil, trimmedArgs, lastArg, nil + } + + flag := findFlag(finalCmd, flagName) + if flag == nil { + // Flag not supported by this command, nothing to complete + err := fmt.Errorf("Subcommand '%s' does not support flag '%s'", finalCmd.Name(), flagName) + return nil, nil, "", err + } + + if !flagWithEqual { + if len(flag.NoOptDefVal) != 0 { + // We had assumed dealing with a two-word flag but the flag is a boolean flag. + // In that case, there is no value following it, so we are not really doing flag completion. + // Reset everything to do noun completion. + trimmedArgs = args + flag = nil + } + } + + return flag, trimmedArgs, lastArg, nil +} + +func findFlag(cmd *Command, name string) *pflag.Flag { + flagSet := cmd.Flags() + if len(name) == 1 { + // First convert the short flag into a long flag + // as the cmd.Flag() search only accepts long flags + if short := flagSet.ShorthandLookup(name); short != nil { + name = short.Name + } else { + set := cmd.InheritedFlags() + if short = set.ShorthandLookup(name); short != nil { + name = short.Name + } else { + return nil + } + } + } + return cmd.Flag(name) +} + +// CompDebug prints the specified string to the same file as where the +// completion script prints its logs. +// Note that completion printouts should never be on stdout as they would +// be wrongly interpreted as actual completion choices by the completion script. +func CompDebug(msg string, printToStdErr bool) { + msg = fmt.Sprintf("[Debug] %s", msg) + + // Such logs are only printed when the user has set the environment + // variable BASH_COMP_DEBUG_FILE to the path of some file to be used. + if path := os.Getenv("BASH_COMP_DEBUG_FILE"); path != "" { + f, err := os.OpenFile(path, + os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + if err == nil { + defer f.Close() + f.WriteString(msg) + } + } + + if printToStdErr { + // Must print to stderr for this not to be read by the completion script. + fmt.Fprintf(os.Stderr, msg) + } +} + +// CompDebugln prints the specified string with a newline at the end +// to the same file as where the completion script prints its logs. +// Such logs are only printed when the user has set the environment +// variable BASH_COMP_DEBUG_FILE to the path of some file to be used. +func CompDebugln(msg string, printToStdErr bool) { + CompDebug(fmt.Sprintf("%s\n", msg), printToStdErr) +} + +// CompError prints the specified completion message to stderr. +func CompError(msg string) { + msg = fmt.Sprintf("[Error] %s", msg) + CompDebug(msg, true) +} + +// CompErrorln prints the specified completion message to stderr with a newline at the end. +func CompErrorln(msg string) { + CompError(fmt.Sprintf("%s\n", msg)) +} diff --git a/vendor/github.com/spf13/cobra/fish_completions.go b/vendor/github.com/spf13/cobra/fish_completions.go new file mode 100644 index 00000000000..c83609c83b6 --- /dev/null +++ b/vendor/github.com/spf13/cobra/fish_completions.go @@ -0,0 +1,172 @@ +package cobra + +import ( + "bytes" + "fmt" + "io" + "os" +) + +func genFishComp(buf *bytes.Buffer, name string, includeDesc bool) { + compCmd := ShellCompRequestCmd + if !includeDesc { + compCmd = ShellCompNoDescRequestCmd + } + buf.WriteString(fmt.Sprintf("# fish completion for %-36s -*- shell-script -*-\n", name)) + buf.WriteString(fmt.Sprintf(` +function __%[1]s_debug + set file "$BASH_COMP_DEBUG_FILE" + if test -n "$file" + echo "$argv" >> $file + end +end + +function __%[1]s_perform_completion + __%[1]s_debug "Starting __%[1]s_perform_completion with: $argv" + + set args (string split -- " " "$argv") + set lastArg "$args[-1]" + + __%[1]s_debug "args: $args" + __%[1]s_debug "last arg: $lastArg" + + set emptyArg "" + if test -z "$lastArg" + __%[1]s_debug "Setting emptyArg" + set emptyArg \"\" + end + __%[1]s_debug "emptyArg: $emptyArg" + + set requestComp "$args[1] %[2]s $args[2..-1] $emptyArg" + __%[1]s_debug "Calling $requestComp" + + set results (eval $requestComp 2> /dev/null) + set comps $results[1..-2] + set directiveLine $results[-1] + + # For Fish, when completing a flag with an = (e.g., -n=) + # completions must be prefixed with the flag + set flagPrefix (string match -r -- '-.*=' "$lastArg") + + __%[1]s_debug "Comps: $comps" + __%[1]s_debug "DirectiveLine: $directiveLine" + __%[1]s_debug "flagPrefix: $flagPrefix" + + for comp in $comps + printf "%%s%%s\n" "$flagPrefix" "$comp" + end + + printf "%%s\n" "$directiveLine" +end + +# This function does three things: +# 1- Obtain the completions and store them in the global __%[1]s_comp_results +# 2- Set the __%[1]s_comp_do_file_comp flag if file completion should be performed +# and unset it otherwise +# 3- Return true if the completion results are not empty +function __%[1]s_prepare_completions + # Start fresh + set --erase __%[1]s_comp_do_file_comp + set --erase __%[1]s_comp_results + + # Check if the command-line is already provided. This is useful for testing. + if not set --query __%[1]s_comp_commandLine + set __%[1]s_comp_commandLine (commandline) + end + __%[1]s_debug "commandLine is: $__%[1]s_comp_commandLine" + + set results (__%[1]s_perform_completion "$__%[1]s_comp_commandLine") + set --erase __%[1]s_comp_commandLine + __%[1]s_debug "Completion results: $results" + + if test -z "$results" + __%[1]s_debug "No completion, probably due to a failure" + # Might as well do file completion, in case it helps + set --global __%[1]s_comp_do_file_comp 1 + return 0 + end + + set directive (string sub --start 2 $results[-1]) + set --global __%[1]s_comp_results $results[1..-2] + + __%[1]s_debug "Completions are: $__%[1]s_comp_results" + __%[1]s_debug "Directive is: $directive" + + if test -z "$directive" + set directive 0 + end + + set compErr (math (math --scale 0 $directive / %[3]d) %% 2) + if test $compErr -eq 1 + __%[1]s_debug "Received error directive: aborting." + # Might as well do file completion, in case it helps + set --global __%[1]s_comp_do_file_comp 1 + return 0 + end + + set nospace (math (math --scale 0 $directive / %[4]d) %% 2) + set nofiles (math (math --scale 0 $directive / %[5]d) %% 2) + + __%[1]s_debug "nospace: $nospace, nofiles: $nofiles" + + # Important not to quote the variable for count to work + set numComps (count $__%[1]s_comp_results) + __%[1]s_debug "numComps: $numComps" + + if test $numComps -eq 1; and test $nospace -ne 0 + # To support the "nospace" directive we trick the shell + # by outputting an extra, longer completion. + __%[1]s_debug "Adding second completion to perform nospace directive" + set --append __%[1]s_comp_results $__%[1]s_comp_results[1]. + end + + if test $numComps -eq 0; and test $nofiles -eq 0 + __%[1]s_debug "Requesting file completion" + set --global __%[1]s_comp_do_file_comp 1 + end + + # If we don't want file completion, we must return true even if there + # are no completions found. This is because fish will perform the last + # completion command, even if its condition is false, if no other + # completion command was triggered + return (not set --query __%[1]s_comp_do_file_comp) +end + +# Remove any pre-existing completions for the program since we will be handling all of them +# TODO this cleanup is not sufficient. Fish completions are only loaded once the user triggers +# them, so the below deletion will not work as it is run too early. What else can we do? +complete -c %[1]s -e + +# The order in which the below two lines are defined is very important so that __%[1]s_prepare_completions +# is called first. It is __%[1]s_prepare_completions that sets up the __%[1]s_comp_do_file_comp variable. +# +# This completion will be run second as complete commands are added FILO. +# It triggers file completion choices when __%[1]s_comp_do_file_comp is set. +complete -c %[1]s -n 'set --query __%[1]s_comp_do_file_comp' + +# This completion will be run first as complete commands are added FILO. +# The call to __%[1]s_prepare_completions will setup both __%[1]s_comp_results abd __%[1]s_comp_do_file_comp. +# It provides the program's completion choices. +complete -c %[1]s -n '__%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results' + +`, name, compCmd, ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp)) +} + +// GenFishCompletion generates fish completion file and writes to the passed writer. +func (c *Command) GenFishCompletion(w io.Writer, includeDesc bool) error { + buf := new(bytes.Buffer) + genFishComp(buf, c.Name(), includeDesc) + _, err := buf.WriteTo(w) + return err +} + +// GenFishCompletionFile generates fish completion file. +func (c *Command) GenFishCompletionFile(filename string, includeDesc bool) error { + outFile, err := os.Create(filename) + if err != nil { + return err + } + defer outFile.Close() + + return c.GenFishCompletion(outFile, includeDesc) +} diff --git a/vendor/github.com/spf13/cobra/fish_completions.md b/vendor/github.com/spf13/cobra/fish_completions.md new file mode 100644 index 00000000000..6bfe5f88ef2 --- /dev/null +++ b/vendor/github.com/spf13/cobra/fish_completions.md @@ -0,0 +1,7 @@ +## Generating Fish Completions for your own cobra.Command + +Cobra supports native Fish completions generated from the root `cobra.Command`. You can use the `command.GenFishCompletion()` or `command.GenFishCompletionFile()` functions. You must provide these functions with a parameter indicating if the completions should be annotated with a description; Cobra will provide the description automatically based on usage information. You can choose to make this option configurable by your users. + +### Limitations + +* Custom completions implemented using the `ValidArgsFunction` and `RegisterFlagCompletionFunc()` are supported automatically but the ones implemented in Bash scripting are not. diff --git a/vendor/github.com/spf13/cobra/go.mod b/vendor/github.com/spf13/cobra/go.mod index 9a9eb65a370..dea1030ba43 100644 --- a/vendor/github.com/spf13/cobra/go.mod +++ b/vendor/github.com/spf13/cobra/go.mod @@ -3,11 +3,10 @@ module github.com/spf13/cobra go 1.12 require ( - github.com/BurntSushi/toml v0.3.1 // indirect - github.com/cpuguy83/go-md2man v1.0.10 + github.com/cpuguy83/go-md2man/v2 v2.0.0 github.com/inconshreveable/mousetrap v1.0.0 github.com/mitchellh/go-homedir v1.1.0 github.com/spf13/pflag v1.0.3 - github.com/spf13/viper v1.3.2 + github.com/spf13/viper v1.4.0 gopkg.in/yaml.v2 v2.2.2 ) diff --git a/vendor/github.com/spf13/cobra/go.sum b/vendor/github.com/spf13/cobra/go.sum index 9761f4d03fe..3aaa2ac0fd6 100644 --- a/vendor/github.com/spf13/cobra/go.sum +++ b/vendor/github.com/spf13/cobra/go.sum @@ -1,31 +1,91 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= @@ -34,18 +94,56 @@ github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9 github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a h1:1n5lsVfiQW3yfsRGu98756EH1YthsFqr/5mxHduZW2A= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/github.com/tmc/grpc-websocket-proxy/wsproxy/websocket_proxy.go b/vendor/github.com/tmc/grpc-websocket-proxy/wsproxy/websocket_proxy.go index 0fca05a008a..ada4c4ec502 100644 --- a/vendor/github.com/tmc/grpc-websocket-proxy/wsproxy/websocket_proxy.go +++ b/vendor/github.com/tmc/grpc-websocket-proxy/wsproxy/websocket_proxy.go @@ -2,6 +2,7 @@ package wsproxy import ( "bufio" + "fmt" "io" "net/http" "strings" @@ -31,6 +32,7 @@ type Proxy struct { methodOverrideParam string tokenCookieName string requestMutator RequestMutatorFunc + headerForwarder func(header string) bool } // Logger collects log messages. @@ -71,6 +73,13 @@ func WithRequestMutator(fn RequestMutatorFunc) Option { } } +// WithForwardedHeaders allows controlling which headers are forwarded. +func WithForwardedHeaders(fn func(header string) bool) Option { + return func(p *Proxy) { + p.headerForwarder = fn + } +} + // WithLogger allows a custom FieldLogger to be supplied func WithLogger(logger Logger) Option { return func(p *Proxy) { @@ -78,6 +87,17 @@ func WithLogger(logger Logger) Option { } } +var defaultHeadersToForward = map[string]bool{ + "Origin": true, + "origin": true, + "Referer": true, + "referer": true, +} + +func defaultHeaderForwarder(header string) bool { + return defaultHeadersToForward[header] +} + // WebsocketProxy attempts to expose the underlying handler as a bidi websocket stream with newline-delimited // JSON as the content encoding. // @@ -96,6 +116,7 @@ func WebsocketProxy(h http.Handler, opts ...Option) http.Handler { logger: logrus.New(), methodOverrideParam: MethodOverrideParam, tokenCookieName: TokenCookieName, + headerForwarder: defaultHeaderForwarder, } for _, o := range opts { o(p) @@ -144,7 +165,12 @@ func (p *Proxy) proxy(w http.ResponseWriter, r *http.Request) { return } if swsp := r.Header.Get("Sec-WebSocket-Protocol"); swsp != "" { - request.Header.Set("Authorization", strings.Replace(swsp, "Bearer, ", "Bearer ", 1)) + request.Header.Set("Authorization", transformSubProtocolHeader(swsp)) + } + for header := range r.Header { + if p.headerForwarder(header) { + request.Header.Set(header, r.Header.Get(header)) + } } // If token cookie is present, populate Authorization header from the cookie instead. if cookie, err := r.Cookie(p.tokenCookieName); err == nil { @@ -239,6 +265,17 @@ func newInMemoryResponseWriter(w io.Writer) *inMemoryResponseWriter { } } +// IE and Edge do not delimit Sec-WebSocket-Protocol strings with spaces +func transformSubProtocolHeader(header string) string { + tokens := strings.SplitN(header, "Bearer,", 2) + + if len(tokens) < 2 { + return "" + } + + return fmt.Sprintf("Bearer %v", strings.Trim(tokens[1], " ")) +} + func (w *inMemoryResponseWriter) Write(b []byte) (int, error) { return w.Writer.Write(b) } diff --git a/vendor/github.com/vishvananda/netlink/.gitignore b/vendor/github.com/vishvananda/netlink/.gitignore new file mode 100644 index 00000000000..9f11b755a17 --- /dev/null +++ b/vendor/github.com/vishvananda/netlink/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/vendor/github.com/vishvananda/netlink/.travis.yml b/vendor/github.com/vishvananda/netlink/.travis.yml index f5c0b3eb5f7..7d14af4d6da 100644 --- a/vendor/github.com/vishvananda/netlink/.travis.yml +++ b/vendor/github.com/vishvananda/netlink/.travis.yml @@ -1,4 +1,8 @@ language: go +go: + - "1.10.x" + - "1.11.x" + - "1.12.x" before_script: # make sure we keep path in tact when we sudo - sudo sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers @@ -9,5 +13,7 @@ before_script: - sudo modprobe nf_conntrack_netlink - sudo modprobe nf_conntrack_ipv4 - sudo modprobe nf_conntrack_ipv6 + - sudo modprobe sch_hfsc install: - go get github.com/vishvananda/netns +go_import_path: github.com/vishvananda/netlink diff --git a/vendor/github.com/vishvananda/netlink/addr_linux.go b/vendor/github.com/vishvananda/netlink/addr_linux.go index d59c3281ec7..28746d5afec 100644 --- a/vendor/github.com/vishvananda/netlink/addr_linux.go +++ b/vendor/github.com/vishvananda/netlink/addr_linux.go @@ -15,39 +15,62 @@ import ( const IFA_FLAGS = 0x8 // AddrAdd will add an IP address to a link device. +// // Equivalent to: `ip addr add $addr dev $link` +// +// If `addr` is an IPv4 address and the broadcast address is not given, it +// will be automatically computed based on the IP mask if /30 or larger. func AddrAdd(link Link, addr *Addr) error { return pkgHandle.AddrAdd(link, addr) } // AddrAdd will add an IP address to a link device. +// // Equivalent to: `ip addr add $addr dev $link` +// +// If `addr` is an IPv4 address and the broadcast address is not given, it +// will be automatically computed based on the IP mask if /30 or larger. func (h *Handle) AddrAdd(link Link, addr *Addr) error { req := h.newNetlinkRequest(unix.RTM_NEWADDR, unix.NLM_F_CREATE|unix.NLM_F_EXCL|unix.NLM_F_ACK) return h.addrHandle(link, addr, req) } // AddrReplace will replace (or, if not present, add) an IP address on a link device. +// // Equivalent to: `ip addr replace $addr dev $link` +// +// If `addr` is an IPv4 address and the broadcast address is not given, it +// will be automatically computed based on the IP mask if /30 or larger. func AddrReplace(link Link, addr *Addr) error { return pkgHandle.AddrReplace(link, addr) } // AddrReplace will replace (or, if not present, add) an IP address on a link device. +// // Equivalent to: `ip addr replace $addr dev $link` +// +// If `addr` is an IPv4 address and the broadcast address is not given, it +// will be automatically computed based on the IP mask if /30 or larger. func (h *Handle) AddrReplace(link Link, addr *Addr) error { req := h.newNetlinkRequest(unix.RTM_NEWADDR, unix.NLM_F_CREATE|unix.NLM_F_REPLACE|unix.NLM_F_ACK) return h.addrHandle(link, addr, req) } // AddrDel will delete an IP address from a link device. +// // Equivalent to: `ip addr del $addr dev $link` +// +// If `addr` is an IPv4 address and the broadcast address is not given, it +// will be automatically computed based on the IP mask if /30 or larger. func AddrDel(link Link, addr *Addr) error { return pkgHandle.AddrDel(link, addr) } // AddrDel will delete an IP address from a link device. // Equivalent to: `ip addr del $addr dev $link` +// +// If `addr` is an IPv4 address and the broadcast address is not given, it +// will be automatically computed based on the IP mask if /30 or larger. func (h *Handle) AddrDel(link Link, addr *Addr) error { req := h.newNetlinkRequest(unix.RTM_DELADDR, unix.NLM_F_ACK) return h.addrHandle(link, addr, req) @@ -65,7 +88,11 @@ func (h *Handle) addrHandle(link Link, addr *Addr, req *nl.NetlinkRequest) error msg := nl.NewIfAddrmsg(family) msg.Index = uint32(base.Index) msg.Scope = uint8(addr.Scope) - prefixlen, masklen := addr.Mask.Size() + mask := addr.Mask + if addr.Peer != nil { + mask = addr.Peer.Mask + } + prefixlen, masklen := mask.Size() msg.Prefixlen = uint8(prefixlen) req.AddData(msg) @@ -104,14 +131,20 @@ func (h *Handle) addrHandle(link Link, addr *Addr, req *nl.NetlinkRequest) error } if family == FAMILY_V4 { - if addr.Broadcast == nil { + // Automatically set the broadcast address if it is unset and the + // subnet is large enough to sensibly have one (/30 or larger). + // See: RFC 3021 + if addr.Broadcast == nil && prefixlen < 31 { calcBroadcast := make(net.IP, masklen/8) for i := range localAddrData { - calcBroadcast[i] = localAddrData[i] | ^addr.Mask[i] + calcBroadcast[i] = localAddrData[i] | ^mask[i] } addr.Broadcast = calcBroadcast } - req.AddData(nl.NewRtAttr(unix.IFA_BROADCAST, addr.Broadcast)) + + if addr.Broadcast != nil { + req.AddData(nl.NewRtAttr(unix.IFA_BROADCAST, addr.Broadcast)) + } if addr.Label != "" { labelData := nl.NewRtAttr(unix.IFA_LABEL, nl.ZeroTerminated(addr.Label)) @@ -206,13 +239,17 @@ func parseAddr(m []byte) (addr Addr, family, index int, err error) { IP: attr.Value, Mask: net.CIDRMask(int(msg.Prefixlen), 8*len(attr.Value)), } - addr.Peer = dst case unix.IFA_LOCAL: + // iproute2 manual: + // If a peer address is specified, the local address + // cannot have a prefix length. The network prefix is + // associated with the peer rather than with the local + // address. + n := 8 * len(attr.Value) local = &net.IPNet{ IP: attr.Value, - Mask: net.CIDRMask(int(msg.Prefixlen), 8*len(attr.Value)), + Mask: net.CIDRMask(n, n), } - addr.IPNet = local case unix.IFA_BROADCAST: addr.Broadcast = attr.Value case unix.IFA_LABEL: @@ -226,12 +263,24 @@ func parseAddr(m []byte) (addr Addr, family, index int, err error) { } } - // IFA_LOCAL should be there but if not, fall back to IFA_ADDRESS + // libnl addr.c comment: + // IPv6 sends the local address as IFA_ADDRESS with no + // IFA_LOCAL, IPv4 sends both IFA_LOCAL and IFA_ADDRESS + // with IFA_ADDRESS being the peer address if they differ + // + // But obviously, as there are IPv6 PtP addresses, too, + // IFA_LOCAL should also be handled for IPv6. if local != nil { - addr.IPNet = local + if family == FAMILY_V4 && local.IP.Equal(dst.IP) { + addr.IPNet = dst + } else { + addr.IPNet = local + addr.Peer = dst + } } else { addr.IPNet = dst } + addr.Scope = int(msg.Scope) return @@ -250,21 +299,22 @@ type AddrUpdate struct { // AddrSubscribe takes a chan down which notifications will be sent // when addresses change. Close the 'done' chan to stop subscription. func AddrSubscribe(ch chan<- AddrUpdate, done <-chan struct{}) error { - return addrSubscribeAt(netns.None(), netns.None(), ch, done, nil, false) + return addrSubscribeAt(netns.None(), netns.None(), ch, done, nil, false, 0) } // AddrSubscribeAt works like AddrSubscribe plus it allows the caller // to choose the network namespace in which to subscribe (ns). func AddrSubscribeAt(ns netns.NsHandle, ch chan<- AddrUpdate, done <-chan struct{}) error { - return addrSubscribeAt(ns, netns.None(), ch, done, nil, false) + return addrSubscribeAt(ns, netns.None(), ch, done, nil, false, 0) } // AddrSubscribeOptions contains a set of options to use with // AddrSubscribeWithOptions. type AddrSubscribeOptions struct { - Namespace *netns.NsHandle - ErrorCallback func(error) - ListExisting bool + Namespace *netns.NsHandle + ErrorCallback func(error) + ListExisting bool + ReceiveBufferSize int } // AddrSubscribeWithOptions work like AddrSubscribe but enable to @@ -275,10 +325,10 @@ func AddrSubscribeWithOptions(ch chan<- AddrUpdate, done <-chan struct{}, option none := netns.None() options.Namespace = &none } - return addrSubscribeAt(*options.Namespace, netns.None(), ch, done, options.ErrorCallback, options.ListExisting) + return addrSubscribeAt(*options.Namespace, netns.None(), ch, done, options.ErrorCallback, options.ListExisting, options.ReceiveBufferSize) } -func addrSubscribeAt(newNs, curNs netns.NsHandle, ch chan<- AddrUpdate, done <-chan struct{}, cberr func(error), listExisting bool) error { +func addrSubscribeAt(newNs, curNs netns.NsHandle, ch chan<- AddrUpdate, done <-chan struct{}, cberr func(error), listExisting bool, rcvbuf int) error { s, err := nl.SubscribeAt(newNs, curNs, unix.NETLINK_ROUTE, unix.RTNLGRP_IPV4_IFADDR, unix.RTNLGRP_IPV6_IFADDR) if err != nil { return err @@ -289,6 +339,12 @@ func addrSubscribeAt(newNs, curNs netns.NsHandle, ch chan<- AddrUpdate, done <-c s.Close() }() } + if rcvbuf != 0 { + err = pkgHandle.SetSocketReceiveBufferSize(rcvbuf, false) + if err != nil { + return err + } + } if listExisting { req := pkgHandle.newNetlinkRequest(unix.RTM_GETADDR, unix.NLM_F_DUMP) @@ -301,13 +357,19 @@ func addrSubscribeAt(newNs, curNs netns.NsHandle, ch chan<- AddrUpdate, done <-c go func() { defer close(ch) for { - msgs, err := s.Receive() + msgs, from, err := s.Receive() if err != nil { if cberr != nil { cberr(err) } return } + if from.Pid != nl.PidKernel { + if cberr != nil { + cberr(fmt.Errorf("Wrong sender portid %d, expected %d", from.Pid, nl.PidKernel)) + } + continue + } for _, m := range msgs { if m.Header.Type == unix.NLMSG_DONE { continue @@ -319,16 +381,17 @@ func addrSubscribeAt(newNs, curNs netns.NsHandle, ch chan<- AddrUpdate, done <-c continue } if cberr != nil { - cberr(syscall.Errno(-error)) + cberr(fmt.Errorf("error message: %v", + syscall.Errno(-error))) } - return + continue } msgType := m.Header.Type if msgType != unix.RTM_NEWADDR && msgType != unix.RTM_DELADDR { if cberr != nil { cberr(fmt.Errorf("bad message type: %d", msgType)) } - return + continue } addr, _, ifindex, err := parseAddr(m.Data) @@ -336,7 +399,7 @@ func addrSubscribeAt(newNs, curNs netns.NsHandle, ch chan<- AddrUpdate, done <-c if cberr != nil { cberr(fmt.Errorf("could not parse address: %v", err)) } - return + continue } ch <- AddrUpdate{LinkAddress: *addr.IPNet, diff --git a/vendor/github.com/vishvananda/netlink/bridge_linux.go b/vendor/github.com/vishvananda/netlink/bridge_linux.go index 350ab0db4b0..6e1224c47b8 100644 --- a/vendor/github.com/vishvananda/netlink/bridge_linux.go +++ b/vendor/github.com/vishvananda/netlink/bridge_linux.go @@ -96,7 +96,7 @@ func (h *Handle) bridgeVlanModify(cmd int, link Link, vid uint16, pvid, untagged flags |= nl.BRIDGE_FLAGS_MASTER } if flags > 0 { - nl.NewRtAttrChild(br, nl.IFLA_BRIDGE_FLAGS, nl.Uint16Attr(flags)) + br.AddRtAttr(nl.IFLA_BRIDGE_FLAGS, nl.Uint16Attr(flags)) } vlanInfo := &nl.BridgeVlanInfo{Vid: vid} if pvid { @@ -105,11 +105,8 @@ func (h *Handle) bridgeVlanModify(cmd int, link Link, vid uint16, pvid, untagged if untagged { vlanInfo.Flags |= nl.BRIDGE_VLAN_INFO_UNTAGGED } - nl.NewRtAttrChild(br, nl.IFLA_BRIDGE_VLAN_INFO, vlanInfo.Serialize()) + br.AddRtAttr(nl.IFLA_BRIDGE_VLAN_INFO, vlanInfo.Serialize()) req.AddData(br) _, err := req.Execute(unix.NETLINK_ROUTE, 0) - if err != nil { - return err - } - return nil + return err } diff --git a/vendor/github.com/vishvananda/netlink/class.go b/vendor/github.com/vishvananda/netlink/class.go index 8ee13af48eb..dcc22d9e97e 100644 --- a/vendor/github.com/vishvananda/netlink/class.go +++ b/vendor/github.com/vishvananda/netlink/class.go @@ -4,25 +4,76 @@ import ( "fmt" ) +// Class interfaces for all classes type Class interface { Attrs() *ClassAttrs Type() string } +// Generic networking statistics for netlink users. +// This file contains "gnet_" prefixed structs and relevant functions. +// See Documentation/networking/getn_stats.txt in Linux source code for more details. + +// GnetStatsBasic Ref: struct gnet_stats_basic { ... } +type GnetStatsBasic struct { + Bytes uint64 // number of seen bytes + Packets uint32 // number of seen packets +} + +// GnetStatsRateEst Ref: struct gnet_stats_rate_est { ... } +type GnetStatsRateEst struct { + Bps uint32 // current byte rate + Pps uint32 // current packet rate +} + +// GnetStatsRateEst64 Ref: struct gnet_stats_rate_est64 { ... } +type GnetStatsRateEst64 struct { + Bps uint64 // current byte rate + Pps uint64 // current packet rate +} + +// GnetStatsQueue Ref: struct gnet_stats_queue { ... } +type GnetStatsQueue struct { + Qlen uint32 // queue length + Backlog uint32 // backlog size of queue + Drops uint32 // number of dropped packets + Requeues uint32 // number of requues + Overlimits uint32 // number of enqueues over the limit +} + +// ClassStatistics representation based on generic networking statistics for netlink. +// See Documentation/networking/gen_stats.txt in Linux source code for more details. +type ClassStatistics struct { + Basic *GnetStatsBasic + Queue *GnetStatsQueue + RateEst *GnetStatsRateEst +} + +// NewClassStatistics Construct a ClassStatistics struct which fields are all initialized by 0. +func NewClassStatistics() *ClassStatistics { + return &ClassStatistics{ + Basic: &GnetStatsBasic{}, + Queue: &GnetStatsQueue{}, + RateEst: &GnetStatsRateEst{}, + } +} + // ClassAttrs represents a netlink class. A filter is associated with a link, // has a handle and a parent. The root filter of a device should have a // parent == HANDLE_ROOT. type ClassAttrs struct { - LinkIndex int - Handle uint32 - Parent uint32 - Leaf uint32 + LinkIndex int + Handle uint32 + Parent uint32 + Leaf uint32 + Statistics *ClassStatistics } func (q ClassAttrs) String() string { return fmt.Sprintf("{LinkIndex: %d, Handle: %s, Parent: %s, Leaf: %d}", q.LinkIndex, HandleStr(q.Handle), HandleStr(q.Parent), q.Leaf) } +// HtbClassAttrs stores the attributes of HTB class type HtbClassAttrs struct { // TODO handle all attributes Rate uint64 @@ -54,10 +105,12 @@ func (q HtbClass) String() string { return fmt.Sprintf("{Rate: %d, Ceil: %d, Buffer: %d, Cbuffer: %d}", q.Rate, q.Ceil, q.Buffer, q.Cbuffer) } +// Attrs returns the class attributes func (q *HtbClass) Attrs() *ClassAttrs { return &q.ClassAttrs } +// Type return the class type func (q *HtbClass) Type() string { return "htb" } @@ -69,10 +122,90 @@ type GenericClass struct { ClassType string } +// Attrs return the class attributes func (class *GenericClass) Attrs() *ClassAttrs { return &class.ClassAttrs } +// Type return the class type func (class *GenericClass) Type() string { return class.ClassType } + +// ServiceCurve is the way the HFSC curve are represented +type ServiceCurve struct { + m1 uint32 + d uint32 + m2 uint32 +} + +// Attrs return the parameters of the service curve +func (c *ServiceCurve) Attrs() (uint32, uint32, uint32) { + return c.m1, c.d, c.m2 +} + +// HfscClass is a representation of the HFSC class +type HfscClass struct { + ClassAttrs + Rsc ServiceCurve + Fsc ServiceCurve + Usc ServiceCurve +} + +// SetUsc sets the Usc curve +func (hfsc *HfscClass) SetUsc(m1 uint32, d uint32, m2 uint32) { + hfsc.Usc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8} +} + +// SetFsc sets the Fsc curve +func (hfsc *HfscClass) SetFsc(m1 uint32, d uint32, m2 uint32) { + hfsc.Fsc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8} +} + +// SetRsc sets the Rsc curve +func (hfsc *HfscClass) SetRsc(m1 uint32, d uint32, m2 uint32) { + hfsc.Rsc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8} +} + +// SetSC implements the SC from the tc CLI +func (hfsc *HfscClass) SetSC(m1 uint32, d uint32, m2 uint32) { + hfsc.Rsc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8} + hfsc.Fsc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8} +} + +// SetUL implements the UL from the tc CLI +func (hfsc *HfscClass) SetUL(m1 uint32, d uint32, m2 uint32) { + hfsc.Usc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8} +} + +// SetLS implements the LS from the tc CLI +func (hfsc *HfscClass) SetLS(m1 uint32, d uint32, m2 uint32) { + hfsc.Fsc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8} +} + +// NewHfscClass returns a new HFSC struct with the set parameters +func NewHfscClass(attrs ClassAttrs) *HfscClass { + return &HfscClass{ + ClassAttrs: attrs, + Rsc: ServiceCurve{}, + Fsc: ServiceCurve{}, + Usc: ServiceCurve{}, + } +} + +func (hfsc *HfscClass) String() string { + return fmt.Sprintf( + "{%s -- {RSC: {m1=%d d=%d m2=%d}} {FSC: {m1=%d d=%d m2=%d}} {USC: {m1=%d d=%d m2=%d}}}", + hfsc.Attrs(), hfsc.Rsc.m1*8, hfsc.Rsc.d, hfsc.Rsc.m2*8, hfsc.Fsc.m1*8, hfsc.Fsc.d, hfsc.Fsc.m2*8, hfsc.Usc.m1*8, hfsc.Usc.d, hfsc.Usc.m2*8, + ) +} + +// Attrs return the Hfsc parameters +func (hfsc *HfscClass) Attrs() *ClassAttrs { + return &hfsc.ClassAttrs +} + +// Type return the type of the class +func (hfsc *HfscClass) Type() string { + return "hfsc" +} diff --git a/vendor/github.com/vishvananda/netlink/class_linux.go b/vendor/github.com/vishvananda/netlink/class_linux.go index a4997740e29..31091e5010a 100644 --- a/vendor/github.com/vishvananda/netlink/class_linux.go +++ b/vendor/github.com/vishvananda/netlink/class_linux.go @@ -1,14 +1,34 @@ package netlink import ( + "bytes" + "encoding/binary" + "encoding/hex" "errors" + "fmt" "syscall" "github.com/vishvananda/netlink/nl" "golang.org/x/sys/unix" ) -// NOTE: function is in here because it uses other linux functions +// Internal tc_stats representation in Go struct. +// This is for internal uses only to deserialize the payload of rtattr. +// After the deserialization, this should be converted into the canonical stats +// struct, ClassStatistics, in case of statistics of a class. +// Ref: struct tc_stats { ... } +type tcStats struct { + Bytes uint64 // Number of enqueued bytes + Packets uint32 // Number of enqueued packets + Drops uint32 // Packets dropped because of lack of resources + Overlimits uint32 // Number of throttle events when this flow goes out of allocated bandwidth + Bps uint32 // Current flow byte rate + Pps uint32 // Current flow packet rate + Qlen uint32 + Backlog uint32 +} + +// NewHtbClass NOTE: function is in here because it uses other linux functions func NewHtbClass(attrs ClassAttrs, cattrs HtbClassAttrs) *HtbClass { mtu := 1600 rate := cattrs.Rate / 8 @@ -126,7 +146,9 @@ func classPayload(req *nl.NetlinkRequest, class Class) error { req.AddData(nl.NewRtAttr(nl.TCA_KIND, nl.ZeroTerminated(class.Type()))) options := nl.NewRtAttr(nl.TCA_OPTIONS, nil) - if htb, ok := class.(*HtbClass); ok { + switch class.Type() { + case "htb": + htb := class.(*HtbClass) opt := nl.TcHtbCopt{} opt.Buffer = htb.Buffer opt.Cbuffer = htb.Cbuffer @@ -151,9 +173,18 @@ func classPayload(req *nl.NetlinkRequest, class Class) error { return errors.New("HTB: failed to calculate ceil rate table") } opt.Ceil = tcceil - nl.NewRtAttrChild(options, nl.TCA_HTB_PARMS, opt.Serialize()) - nl.NewRtAttrChild(options, nl.TCA_HTB_RTAB, SerializeRtab(rtab)) - nl.NewRtAttrChild(options, nl.TCA_HTB_CTAB, SerializeRtab(ctab)) + options.AddRtAttr(nl.TCA_HTB_PARMS, opt.Serialize()) + options.AddRtAttr(nl.TCA_HTB_RTAB, SerializeRtab(rtab)) + options.AddRtAttr(nl.TCA_HTB_CTAB, SerializeRtab(ctab)) + case "hfsc": + hfsc := class.(*HfscClass) + opt := nl.HfscCopt{} + opt.Rsc.Set(hfsc.Rsc.Attrs()) + opt.Fsc.Set(hfsc.Fsc.Attrs()) + opt.Usc.Set(hfsc.Usc.Attrs()) + options.AddRtAttr(nl.TCA_HFSC_RSC, nl.SerializeHfscCurve(&opt.Rsc)) + options.AddRtAttr(nl.TCA_HFSC_FSC, nl.SerializeHfscCurve(&opt.Fsc)) + options.AddRtAttr(nl.TCA_HFSC_USC, nl.SerializeHfscCurve(&opt.Usc)) } req.AddData(options) return nil @@ -197,9 +228,10 @@ func (h *Handle) ClassList(link Link, parent uint32) ([]Class, error) { } base := ClassAttrs{ - LinkIndex: int(msg.Ifindex), - Handle: msg.Handle, - Parent: msg.Parent, + LinkIndex: int(msg.Ifindex), + Handle: msg.Handle, + Parent: msg.Parent, + Statistics: nil, } var class Class @@ -211,6 +243,8 @@ func (h *Handle) ClassList(link Link, parent uint32) ([]Class, error) { switch classType { case "htb": class = &HtbClass{} + case "hfsc": + class = &HfscClass{} default: class = &GenericClass{ClassType: classType} } @@ -225,6 +259,26 @@ func (h *Handle) ClassList(link Link, parent uint32) ([]Class, error) { if err != nil { return nil, err } + case "hfsc": + data, err := nl.ParseRouteAttr(attr.Value) + if err != nil { + return nil, err + } + _, err = parseHfscClassData(class, data) + if err != nil { + return nil, err + } + } + // For backward compatibility. + case nl.TCA_STATS: + base.Statistics, err = parseTcStats(attr.Value) + if err != nil { + return nil, err + } + case nl.TCA_STATS2: + base.Statistics, err = parseTcStats2(attr.Value) + if err != nil { + return nil, err } } } @@ -253,3 +307,78 @@ func parseHtbClassData(class Class, data []syscall.NetlinkRouteAttr) (bool, erro } return detailed, nil } + +func parseHfscClassData(class Class, data []syscall.NetlinkRouteAttr) (bool, error) { + hfsc := class.(*HfscClass) + detailed := false + for _, datum := range data { + m1, d, m2 := nl.DeserializeHfscCurve(datum.Value).Attrs() + switch datum.Attr.Type { + case nl.TCA_HFSC_RSC: + hfsc.Rsc = ServiceCurve{m1: m1, d: d, m2: m2} + case nl.TCA_HFSC_FSC: + hfsc.Fsc = ServiceCurve{m1: m1, d: d, m2: m2} + case nl.TCA_HFSC_USC: + hfsc.Usc = ServiceCurve{m1: m1, d: d, m2: m2} + } + } + return detailed, nil +} + +func parseTcStats(data []byte) (*ClassStatistics, error) { + buf := &bytes.Buffer{} + buf.Write(data) + native := nl.NativeEndian() + tcStats := &tcStats{} + if err := binary.Read(buf, native, tcStats); err != nil { + return nil, err + } + + stats := NewClassStatistics() + stats.Basic.Bytes = tcStats.Bytes + stats.Basic.Packets = tcStats.Packets + stats.Queue.Qlen = tcStats.Qlen + stats.Queue.Backlog = tcStats.Backlog + stats.Queue.Drops = tcStats.Drops + stats.Queue.Overlimits = tcStats.Overlimits + stats.RateEst.Bps = tcStats.Bps + stats.RateEst.Pps = tcStats.Pps + + return stats, nil +} + +func parseGnetStats(data []byte, gnetStats interface{}) error { + buf := &bytes.Buffer{} + buf.Write(data) + native := nl.NativeEndian() + return binary.Read(buf, native, gnetStats) +} + +func parseTcStats2(data []byte) (*ClassStatistics, error) { + rtAttrs, err := nl.ParseRouteAttr(data) + if err != nil { + return nil, err + } + stats := NewClassStatistics() + for _, datum := range rtAttrs { + switch datum.Attr.Type { + case nl.TCA_STATS_BASIC: + if err := parseGnetStats(datum.Value, stats.Basic); err != nil { + return nil, fmt.Errorf("Failed to parse ClassStatistics.Basic with: %v\n%s", + err, hex.Dump(datum.Value)) + } + case nl.TCA_STATS_QUEUE: + if err := parseGnetStats(datum.Value, stats.Queue); err != nil { + return nil, fmt.Errorf("Failed to parse ClassStatistics.Queue with: %v\n%s", + err, hex.Dump(datum.Value)) + } + case nl.TCA_STATS_RATE_EST: + if err := parseGnetStats(datum.Value, stats.RateEst); err != nil { + return nil, fmt.Errorf("Failed to parse ClassStatistics.RateEst with: %v\n%s", + err, hex.Dump(datum.Value)) + } + } + } + + return stats, nil +} diff --git a/vendor/github.com/vishvananda/netlink/conntrack_linux.go b/vendor/github.com/vishvananda/netlink/conntrack_linux.go index a0fc74a3722..4bff0dcbab0 100644 --- a/vendor/github.com/vishvananda/netlink/conntrack_linux.go +++ b/vendor/github.com/vishvananda/netlink/conntrack_linux.go @@ -22,11 +22,7 @@ const ( // https://github.com/torvalds/linux/blob/master/include/uapi/linux/netfilter/nfnetlink.h -> #define NFNL_SUBSYS_CTNETLINK_EXP 2 ConntrackExpectTable = 2 ) -const ( - // For Parsing Mark - TCP_PROTO = 6 - UDP_PROTO = 17 -) + const ( // backward compatibility with golang 1.6 which does not have io.SeekCurrent seekCurrent = 1 @@ -135,11 +131,13 @@ func (h *Handle) dumpConntrackTable(table ConntrackTableType, family InetFamily) // http://git.netfilter.org/libnetfilter_conntrack/tree/include/internal/object.h // For the time being, the structure below allows to parse and extract the base information of a flow type ipTuple struct { - SrcIP net.IP + Bytes uint64 DstIP net.IP - Protocol uint8 - SrcPort uint16 DstPort uint16 + Packets uint64 + Protocol uint8 + SrcIP net.IP + SrcPort uint16 } type ConntrackFlow struct { @@ -151,11 +149,12 @@ type ConntrackFlow struct { func (s *ConntrackFlow) String() string { // conntrack cmd output: - // udp 17 src=127.0.0.1 dst=127.0.0.1 sport=4001 dport=1234 [UNREPLIED] src=127.0.0.1 dst=127.0.0.1 sport=1234 dport=4001 mark=0 - return fmt.Sprintf("%s\t%d src=%s dst=%s sport=%d dport=%d\tsrc=%s dst=%s sport=%d dport=%d mark=%d", + // udp 17 src=127.0.0.1 dst=127.0.0.1 sport=4001 dport=1234 packets=5 bytes=532 [UNREPLIED] src=127.0.0.1 dst=127.0.0.1 sport=1234 dport=4001 packets=10 bytes=1078 mark=0 + return fmt.Sprintf("%s\t%d src=%s dst=%s sport=%d dport=%d packets=%d bytes=%d\tsrc=%s dst=%s sport=%d dport=%d packets=%d bytes=%d mark=%d", nl.L4ProtoMap[s.Forward.Protocol], s.Forward.Protocol, - s.Forward.SrcIP.String(), s.Forward.DstIP.String(), s.Forward.SrcPort, s.Forward.DstPort, - s.Reverse.SrcIP.String(), s.Reverse.DstIP.String(), s.Reverse.SrcPort, s.Reverse.DstPort, s.Mark) + s.Forward.SrcIP.String(), s.Forward.DstIP.String(), s.Forward.SrcPort, s.Forward.DstPort, s.Forward.Packets, s.Forward.Bytes, + s.Reverse.SrcIP.String(), s.Reverse.DstIP.String(), s.Reverse.SrcPort, s.Reverse.DstPort, s.Reverse.Packets, s.Reverse.Bytes, + s.Mark) } // This method parse the ip tuple structure @@ -220,9 +219,35 @@ func parseBERaw16(r *bytes.Reader, v *uint16) { binary.Read(r, binary.BigEndian, v) } +func parseBERaw32(r *bytes.Reader, v *uint32) { + binary.Read(r, binary.BigEndian, v) +} + +func parseBERaw64(r *bytes.Reader, v *uint64) { + binary.Read(r, binary.BigEndian, v) +} + +func parseByteAndPacketCounters(r *bytes.Reader) (bytes, packets uint64) { + for i := 0; i < 2; i++ { + switch _, t, _ := parseNfAttrTL(r); t { + case nl.CTA_COUNTERS_BYTES: + parseBERaw64(r, &bytes) + case nl.CTA_COUNTERS_PACKETS: + parseBERaw64(r, &packets) + default: + return + } + } + return +} + +func parseConnectionMark(r *bytes.Reader) (mark uint32) { + parseBERaw32(r, &mark) + return +} + func parseRawData(data []byte) *ConntrackFlow { s := &ConntrackFlow{} - var proto uint8 // First there is the Nfgenmsg header // consume only the family field reader := bytes.NewReader(data) @@ -238,36 +263,31 @@ func parseRawData(data []byte) *ConntrackFlow { // 4 bytes // flow information of the reverse flow for reader.Len() > 0 { - nested, t, l := parseNfAttrTL(reader) - if nested && t == nl.CTA_TUPLE_ORIG { - if nested, t, _ = parseNfAttrTL(reader); nested && t == nl.CTA_TUPLE_IP { - proto = parseIpTuple(reader, &s.Forward) + if nested, t, l := parseNfAttrTL(reader); nested { + switch t { + case nl.CTA_TUPLE_ORIG: + if nested, t, _ = parseNfAttrTL(reader); nested && t == nl.CTA_TUPLE_IP { + parseIpTuple(reader, &s.Forward) + } + case nl.CTA_TUPLE_REPLY: + if nested, t, _ = parseNfAttrTL(reader); nested && t == nl.CTA_TUPLE_IP { + parseIpTuple(reader, &s.Reverse) + } else { + // Header not recognized skip it + reader.Seek(int64(l), seekCurrent) + } + case nl.CTA_COUNTERS_ORIG: + s.Forward.Bytes, s.Forward.Packets = parseByteAndPacketCounters(reader) + case nl.CTA_COUNTERS_REPLY: + s.Reverse.Bytes, s.Reverse.Packets = parseByteAndPacketCounters(reader) } - } else if nested && t == nl.CTA_TUPLE_REPLY { - if nested, t, _ = parseNfAttrTL(reader); nested && t == nl.CTA_TUPLE_IP { - parseIpTuple(reader, &s.Reverse) - - // Got all the useful information stop parsing - break - } else { - // Header not recognized skip it - reader.Seek(int64(l), seekCurrent) + } else { + switch t { + case nl.CTA_MARK: + s.Mark = parseConnectionMark(reader) } } } - if proto == TCP_PROTO { - reader.Seek(64, seekCurrent) - _, t, _, v := parseNfAttrTLV(reader) - if t == nl.CTA_MARK { - s.Mark = uint32(v[3]) - } - } else if proto == UDP_PROTO { - reader.Seek(16, seekCurrent) - _, t, _, v := parseNfAttrTLV(reader) - if t == nl.CTA_MARK { - s.Mark = uint32(v[3]) - } - } return s } @@ -285,7 +305,7 @@ func parseRawData(data []byte) *ConntrackFlow { // Common parameters and options: // -s, --src, --orig-src ip Source address from original direction // -d, --dst, --orig-dst ip Destination address from original direction -// -r, --reply-src ip Source addres from reply direction +// -r, --reply-src ip Source address from reply direction // -q, --reply-dst ip Destination address from reply direction // -p, --protonum proto Layer 4 Protocol, eg. 'tcp' // -f, --family proto Layer 3 Protocol, eg. 'ipv6' @@ -302,11 +322,14 @@ func parseRawData(data []byte) *ConntrackFlow { type ConntrackFilterType uint8 const ( - ConntrackOrigSrcIP = iota // -orig-src ip Source address from original direction - ConntrackOrigDstIP // -orig-dst ip Destination address from original direction - ConntrackNatSrcIP // -src-nat ip Source NAT ip - ConntrackNatDstIP // -dst-nat ip Destination NAT ip - ConntrackNatAnyIP // -any-nat ip Source or destination NAT ip + ConntrackOrigSrcIP = iota // -orig-src ip Source address from original direction + ConntrackOrigDstIP // -orig-dst ip Destination address from original direction + ConntrackReplySrcIP // --reply-src ip Reply Source IP + ConntrackReplyDstIP // --reply-dst ip Reply Destination IP + ConntrackReplyAnyIP // Match source or destination reply IP + ConntrackNatSrcIP = ConntrackReplySrcIP // deprecated use instead ConntrackReplySrcIP + ConntrackNatDstIP = ConntrackReplyDstIP // deprecated use instead ConntrackReplyDstIP + ConntrackNatAnyIP = ConntrackReplyAnyIP // deprecated use instaed ConntrackReplyAnyIP ) type CustomConntrackFilter interface { @@ -351,17 +374,17 @@ func (f *ConntrackFilter) MatchConntrackFlow(flow *ConntrackFlow) bool { } // -src-nat ip Source NAT ip - if elem, found := f.ipFilter[ConntrackNatSrcIP]; match && found { + if elem, found := f.ipFilter[ConntrackReplySrcIP]; match && found { match = match && elem.Equal(flow.Reverse.SrcIP) } // -dst-nat ip Destination NAT ip - if elem, found := f.ipFilter[ConntrackNatDstIP]; match && found { + if elem, found := f.ipFilter[ConntrackReplyDstIP]; match && found { match = match && elem.Equal(flow.Reverse.DstIP) } - // -any-nat ip Source or destination NAT ip - if elem, found := f.ipFilter[ConntrackNatAnyIP]; match && found { + // Match source or destination reply IP + if elem, found := f.ipFilter[ConntrackReplyAnyIP]; match && found { match = match && (elem.Equal(flow.Reverse.SrcIP) || elem.Equal(flow.Reverse.DstIP)) } diff --git a/vendor/github.com/vishvananda/netlink/devlink_linux.go b/vendor/github.com/vishvananda/netlink/devlink_linux.go new file mode 100644 index 00000000000..29b3f8ec1d2 --- /dev/null +++ b/vendor/github.com/vishvananda/netlink/devlink_linux.go @@ -0,0 +1,272 @@ +package netlink + +import ( + "syscall" + + "fmt" + "github.com/vishvananda/netlink/nl" + "golang.org/x/sys/unix" +) + +// DevlinkDevEswitchAttr represents device's eswitch attributes +type DevlinkDevEswitchAttr struct { + Mode string + InlineMode string + EncapMode string +} + +// DevlinkDevAttrs represents device attributes +type DevlinkDevAttrs struct { + Eswitch DevlinkDevEswitchAttr +} + +// DevlinkDevice represents device and its attributes +type DevlinkDevice struct { + BusName string + DeviceName string + Attrs DevlinkDevAttrs +} + +func parseDevLinkDeviceList(msgs [][]byte) ([]*DevlinkDevice, error) { + devices := make([]*DevlinkDevice, 0, len(msgs)) + for _, m := range msgs { + attrs, err := nl.ParseRouteAttr(m[nl.SizeofGenlmsg:]) + if err != nil { + return nil, err + } + dev := &DevlinkDevice{} + if err = dev.parseAttributes(attrs); err != nil { + return nil, err + } + devices = append(devices, dev) + } + return devices, nil +} + +func eswitchStringToMode(modeName string) (uint16, error) { + if modeName == "legacy" { + return nl.DEVLINK_ESWITCH_MODE_LEGACY, nil + } else if modeName == "switchdev" { + return nl.DEVLINK_ESWITCH_MODE_SWITCHDEV, nil + } else { + return 0xffff, fmt.Errorf("invalid switchdev mode") + } +} + +func parseEswitchMode(mode uint16) string { + var eswitchMode = map[uint16]string{ + nl.DEVLINK_ESWITCH_MODE_LEGACY: "legacy", + nl.DEVLINK_ESWITCH_MODE_SWITCHDEV: "switchdev", + } + if eswitchMode[mode] == "" { + return "unknown" + } else { + return eswitchMode[mode] + } +} + +func parseEswitchInlineMode(inlinemode uint8) string { + var eswitchInlineMode = map[uint8]string{ + nl.DEVLINK_ESWITCH_INLINE_MODE_NONE: "none", + nl.DEVLINK_ESWITCH_INLINE_MODE_LINK: "link", + nl.DEVLINK_ESWITCH_INLINE_MODE_NETWORK: "network", + nl.DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT: "transport", + } + if eswitchInlineMode[inlinemode] == "" { + return "unknown" + } else { + return eswitchInlineMode[inlinemode] + } +} + +func parseEswitchEncapMode(encapmode uint8) string { + var eswitchEncapMode = map[uint8]string{ + nl.DEVLINK_ESWITCH_ENCAP_MODE_NONE: "disable", + nl.DEVLINK_ESWITCH_ENCAP_MODE_BASIC: "enable", + } + if eswitchEncapMode[encapmode] == "" { + return "unknown" + } else { + return eswitchEncapMode[encapmode] + } +} + +func (d *DevlinkDevice) parseAttributes(attrs []syscall.NetlinkRouteAttr) error { + for _, a := range attrs { + switch a.Attr.Type { + case nl.DEVLINK_ATTR_BUS_NAME: + d.BusName = string(a.Value) + case nl.DEVLINK_ATTR_DEV_NAME: + d.DeviceName = string(a.Value) + case nl.DEVLINK_ATTR_ESWITCH_MODE: + d.Attrs.Eswitch.Mode = parseEswitchMode(native.Uint16(a.Value)) + case nl.DEVLINK_ATTR_ESWITCH_INLINE_MODE: + d.Attrs.Eswitch.InlineMode = parseEswitchInlineMode(uint8(a.Value[0])) + case nl.DEVLINK_ATTR_ESWITCH_ENCAP_MODE: + d.Attrs.Eswitch.EncapMode = parseEswitchEncapMode(uint8(a.Value[0])) + } + } + return nil +} + +func (dev *DevlinkDevice) parseEswitchAttrs(msgs [][]byte) { + m := msgs[0] + attrs, err := nl.ParseRouteAttr(m[nl.SizeofGenlmsg:]) + if err != nil { + return + } + dev.parseAttributes(attrs) +} + +func (h *Handle) getEswitchAttrs(family *GenlFamily, dev *DevlinkDevice) { + msg := &nl.Genlmsg{ + Command: nl.DEVLINK_CMD_ESWITCH_GET, + Version: nl.GENL_DEVLINK_VERSION, + } + req := h.newNetlinkRequest(int(family.ID), unix.NLM_F_REQUEST|unix.NLM_F_ACK) + req.AddData(msg) + + b := make([]byte, len(dev.BusName)) + copy(b, dev.BusName) + data := nl.NewRtAttr(nl.DEVLINK_ATTR_BUS_NAME, b) + req.AddData(data) + + b = make([]byte, len(dev.DeviceName)) + copy(b, dev.DeviceName) + data = nl.NewRtAttr(nl.DEVLINK_ATTR_DEV_NAME, b) + req.AddData(data) + + msgs, err := req.Execute(unix.NETLINK_GENERIC, 0) + if err != nil { + return + } + dev.parseEswitchAttrs(msgs) +} + +// DevLinkGetDeviceList provides a pointer to devlink devices and nil error, +// otherwise returns an error code. +func (h *Handle) DevLinkGetDeviceList() ([]*DevlinkDevice, error) { + f, err := h.GenlFamilyGet(nl.GENL_DEVLINK_NAME) + if err != nil { + return nil, err + } + msg := &nl.Genlmsg{ + Command: nl.DEVLINK_CMD_GET, + Version: nl.GENL_DEVLINK_VERSION, + } + req := h.newNetlinkRequest(int(f.ID), + unix.NLM_F_REQUEST|unix.NLM_F_ACK|unix.NLM_F_DUMP) + req.AddData(msg) + msgs, err := req.Execute(unix.NETLINK_GENERIC, 0) + if err != nil { + return nil, err + } + devices, err := parseDevLinkDeviceList(msgs) + if err != nil { + return nil, err + } + for _, d := range devices { + h.getEswitchAttrs(f, d) + } + return devices, nil +} + +// DevLinkGetDeviceList provides a pointer to devlink devices and nil error, +// otherwise returns an error code. +func DevLinkGetDeviceList() ([]*DevlinkDevice, error) { + return pkgHandle.DevLinkGetDeviceList() +} + +func parseDevlinkDevice(msgs [][]byte) (*DevlinkDevice, error) { + m := msgs[0] + attrs, err := nl.ParseRouteAttr(m[nl.SizeofGenlmsg:]) + if err != nil { + return nil, err + } + dev := &DevlinkDevice{} + if err = dev.parseAttributes(attrs); err != nil { + return nil, err + } + return dev, nil +} + +func (h *Handle) createCmdReq(cmd uint8, bus string, device string) (*GenlFamily, *nl.NetlinkRequest, error) { + f, err := h.GenlFamilyGet(nl.GENL_DEVLINK_NAME) + if err != nil { + return nil, nil, err + } + + msg := &nl.Genlmsg{ + Command: cmd, + Version: nl.GENL_DEVLINK_VERSION, + } + req := h.newNetlinkRequest(int(f.ID), + unix.NLM_F_REQUEST|unix.NLM_F_ACK) + req.AddData(msg) + + b := make([]byte, len(bus)+1) + copy(b, bus) + data := nl.NewRtAttr(nl.DEVLINK_ATTR_BUS_NAME, b) + req.AddData(data) + + b = make([]byte, len(device)+1) + copy(b, device) + data = nl.NewRtAttr(nl.DEVLINK_ATTR_DEV_NAME, b) + req.AddData(data) + + return f, req, nil +} + +// DevlinkGetDeviceByName provides a pointer to devlink device and nil error, +// otherwise returns an error code. +func (h *Handle) DevLinkGetDeviceByName(Bus string, Device string) (*DevlinkDevice, error) { + f, req, err := h.createCmdReq(nl.DEVLINK_CMD_GET, Bus, Device) + if err != nil { + return nil, err + } + + respmsg, err := req.Execute(unix.NETLINK_GENERIC, 0) + if err != nil { + return nil, err + } + dev, err := parseDevlinkDevice(respmsg) + if err == nil { + h.getEswitchAttrs(f, dev) + } + return dev, err +} + +// DevlinkGetDeviceByName provides a pointer to devlink device and nil error, +// otherwise returns an error code. +func DevLinkGetDeviceByName(Bus string, Device string) (*DevlinkDevice, error) { + return pkgHandle.DevLinkGetDeviceByName(Bus, Device) +} + +// DevLinkSetEswitchMode sets eswitch mode if able to set successfully or +// returns an error code. +// Equivalent to: `devlink dev eswitch set $dev mode switchdev` +// Equivalent to: `devlink dev eswitch set $dev mode legacy` +func (h *Handle) DevLinkSetEswitchMode(Dev *DevlinkDevice, NewMode string) error { + mode, err := eswitchStringToMode(NewMode) + if err != nil { + return err + } + + _, req, err := h.createCmdReq(nl.DEVLINK_CMD_ESWITCH_SET, Dev.BusName, Dev.DeviceName) + if err != nil { + return err + } + + req.AddData(nl.NewRtAttr(nl.DEVLINK_ATTR_ESWITCH_MODE, nl.Uint16Attr(mode))) + + _, err = req.Execute(unix.NETLINK_GENERIC, 0) + return err +} + +// DevLinkSetEswitchMode sets eswitch mode if able to set successfully or +// returns an error code. +// Equivalent to: `devlink dev eswitch set $dev mode switchdev` +// Equivalent to: `devlink dev eswitch set $dev mode legacy` +func DevLinkSetEswitchMode(Dev *DevlinkDevice, NewMode string) error { + return pkgHandle.DevLinkSetEswitchMode(Dev, NewMode) +} diff --git a/vendor/github.com/vishvananda/netlink/filter.go b/vendor/github.com/vishvananda/netlink/filter.go index c2cf8e4dcf5..88792eab0ee 100644 --- a/vendor/github.com/vishvananda/netlink/filter.go +++ b/vendor/github.com/vishvananda/netlink/filter.go @@ -2,6 +2,7 @@ package netlink import ( "fmt" + "net" ) type Filter interface { @@ -135,6 +136,27 @@ func (action *BpfAction) Attrs() *ActionAttrs { return &action.ActionAttrs } +type ConnmarkAction struct { + ActionAttrs + Zone uint16 +} + +func (action *ConnmarkAction) Type() string { + return "connmark" +} + +func (action *ConnmarkAction) Attrs() *ActionAttrs { + return &action.ActionAttrs +} + +func NewConnmarkAction() *ConnmarkAction { + return &ConnmarkAction{ + ActionAttrs: ActionAttrs{ + Action: TC_ACT_PIPE, + }, + } +} + type MirredAct uint8 func (a MirredAct) String() string { @@ -182,47 +204,59 @@ func NewMirredAction(redirIndex int) *MirredAction { } } -// Sel of the U32 filters that contains multiple TcU32Key. This is the copy -// and the frontend representation of nl.TcU32Sel. It is serialized into canonical -// nl.TcU32Sel with the appropriate endianness. -type TcU32Sel struct { - Flags uint8 - Offshift uint8 - Nkeys uint8 - Pad uint8 - Offmask uint16 - Off uint16 - Offoff int16 - Hoff int16 - Hmask uint32 - Keys []TcU32Key +type TunnelKeyAct int8 + +const ( + TCA_TUNNEL_KEY_SET TunnelKeyAct = 1 // set tunnel key + TCA_TUNNEL_KEY_UNSET TunnelKeyAct = 2 // unset tunnel key +) + +type TunnelKeyAction struct { + ActionAttrs + Action TunnelKeyAct + SrcAddr net.IP + DstAddr net.IP + KeyID uint32 } -// TcU32Key contained of Sel in the U32 filters. This is the copy and the frontend -// representation of nl.TcU32Key. It is serialized into chanonical nl.TcU32Sel -// with the appropriate endianness. -type TcU32Key struct { - Mask uint32 - Val uint32 - Off int32 - OffMask int32 +func (action *TunnelKeyAction) Type() string { + return "tunnel_key" } -// U32 filters on many packet related properties -type U32 struct { - FilterAttrs - ClassId uint32 - RedirIndex int - Sel *TcU32Sel - Actions []Action +func (action *TunnelKeyAction) Attrs() *ActionAttrs { + return &action.ActionAttrs } -func (filter *U32) Attrs() *FilterAttrs { - return &filter.FilterAttrs +func NewTunnelKeyAction() *TunnelKeyAction { + return &TunnelKeyAction{ + ActionAttrs: ActionAttrs{ + Action: TC_ACT_PIPE, + }, + } } -func (filter *U32) Type() string { - return "u32" +type SkbEditAction struct { + ActionAttrs + QueueMapping *uint16 + PType *uint16 + Priority *uint32 + Mark *uint32 +} + +func (action *SkbEditAction) Type() string { + return "skbedit" +} + +func (action *SkbEditAction) Attrs() *ActionAttrs { + return &action.ActionAttrs +} + +func NewSkbEditAction() *SkbEditAction { + return &SkbEditAction{ + ActionAttrs: ActionAttrs{ + Action: TC_ACT_PIPE, + }, + } } // MatchAll filters match all packets @@ -262,6 +296,8 @@ type BpfFilter struct { Fd int Name string DirectAction bool + Id int + Tag string } func (filter *BpfFilter) Type() string { diff --git a/vendor/github.com/vishvananda/netlink/filter_linux.go b/vendor/github.com/vishvananda/netlink/filter_linux.go index f0eac6b78cc..c56f314cd3f 100644 --- a/vendor/github.com/vishvananda/netlink/filter_linux.go +++ b/vendor/github.com/vishvananda/netlink/filter_linux.go @@ -3,10 +3,11 @@ package netlink import ( "bytes" "encoding/binary" + "encoding/hex" "errors" "fmt" + "net" "syscall" - "unsafe" "github.com/vishvananda/netlink/nl" "golang.org/x/sys/unix" @@ -20,6 +21,35 @@ const ( TC_U32_EAT = nl.TC_U32_EAT ) +// Sel of the U32 filters that contains multiple TcU32Key. This is the type +// alias and the frontend representation of nl.TcU32Sel. It is serialized into +// canonical nl.TcU32Sel with the appropriate endianness. +type TcU32Sel = nl.TcU32Sel + +// TcU32Key contained of Sel in the U32 filters. This is the type alias and the +// frontend representation of nl.TcU32Key. It is serialized into chanonical +// nl.TcU32Sel with the appropriate endianness. +type TcU32Key = nl.TcU32Key + +// U32 filters on many packet related properties +type U32 struct { + FilterAttrs + ClassId uint32 + Divisor uint32 // Divisor MUST be power of 2. + Hash uint32 + RedirIndex int + Sel *TcU32Sel + Actions []Action +} + +func (filter *U32) Attrs() *FilterAttrs { + return &filter.FilterAttrs +} + +func (filter *U32) Type() string { + return "u32" +} + // Fw filter filters on firewall marks // NOTE: this is in filter_linux because it refers to nl.TcPolice which // is defined in nl/tc_linux.go @@ -123,8 +153,24 @@ func FilterAdd(filter Filter) error { // FilterAdd will add a filter to the system. // Equivalent to: `tc filter add $filter` func (h *Handle) FilterAdd(filter Filter) error { + return h.filterModify(filter, unix.NLM_F_CREATE|unix.NLM_F_EXCL) +} + +// FilterReplace will replace a filter. +// Equivalent to: `tc filter replace $filter` +func FilterReplace(filter Filter) error { + return pkgHandle.FilterReplace(filter) +} + +// FilterReplace will replace a filter. +// Equivalent to: `tc filter replace $filter` +func (h *Handle) FilterReplace(filter Filter) error { + return h.filterModify(filter, unix.NLM_F_CREATE) +} + +func (h *Handle) filterModify(filter Filter, flags int) error { native = nl.NativeEndian() - req := h.newNetlinkRequest(unix.RTM_NEWTFILTER, unix.NLM_F_CREATE|unix.NLM_F_EXCL|unix.NLM_F_ACK) + req := h.newNetlinkRequest(unix.RTM_NEWTFILTER, flags|unix.NLM_F_ACK) base := filter.Attrs() msg := &nl.TcMsg{ Family: nl.FAMILY_ALL, @@ -140,8 +186,7 @@ func (h *Handle) FilterAdd(filter Filter) error { switch filter := filter.(type) { case *U32: - // Convert TcU32Sel into nl.TcU32Sel as it is without copy. - sel := (*nl.TcU32Sel)(unsafe.Pointer(filter.Sel)) + sel := filter.Sel if sel == nil { // match all sel = &nl.TcU32Sel{ @@ -168,11 +213,20 @@ func (h *Handle) FilterAdd(filter Filter) error { } } sel.Nkeys = uint8(len(sel.Keys)) - nl.NewRtAttrChild(options, nl.TCA_U32_SEL, sel.Serialize()) + options.AddRtAttr(nl.TCA_U32_SEL, sel.Serialize()) if filter.ClassId != 0 { - nl.NewRtAttrChild(options, nl.TCA_U32_CLASSID, nl.Uint32Attr(filter.ClassId)) + options.AddRtAttr(nl.TCA_U32_CLASSID, nl.Uint32Attr(filter.ClassId)) } - actionsAttr := nl.NewRtAttrChild(options, nl.TCA_U32_ACT, nil) + if filter.Divisor != 0 { + if (filter.Divisor-1)&filter.Divisor != 0 { + return fmt.Errorf("illegal divisor %d. Must be a power of 2", filter.Divisor) + } + options.AddRtAttr(nl.TCA_U32_DIVISOR, nl.Uint32Attr(filter.Divisor)) + } + if filter.Hash != 0 { + options.AddRtAttr(nl.TCA_U32_HASH, nl.Uint32Attr(filter.Hash)) + } + actionsAttr := options.AddRtAttr(nl.TCA_U32_ACT, nil) // backwards compatibility if filter.RedirIndex != 0 { filter.Actions = append([]Action{NewMirredAction(filter.RedirIndex)}, filter.Actions...) @@ -184,51 +238,51 @@ func (h *Handle) FilterAdd(filter Filter) error { if filter.Mask != 0 { b := make([]byte, 4) native.PutUint32(b, filter.Mask) - nl.NewRtAttrChild(options, nl.TCA_FW_MASK, b) + options.AddRtAttr(nl.TCA_FW_MASK, b) } if filter.InDev != "" { - nl.NewRtAttrChild(options, nl.TCA_FW_INDEV, nl.ZeroTerminated(filter.InDev)) + options.AddRtAttr(nl.TCA_FW_INDEV, nl.ZeroTerminated(filter.InDev)) } if (filter.Police != nl.TcPolice{}) { - police := nl.NewRtAttrChild(options, nl.TCA_FW_POLICE, nil) - nl.NewRtAttrChild(police, nl.TCA_POLICE_TBF, filter.Police.Serialize()) + police := options.AddRtAttr(nl.TCA_FW_POLICE, nil) + police.AddRtAttr(nl.TCA_POLICE_TBF, filter.Police.Serialize()) if (filter.Police.Rate != nl.TcRateSpec{}) { payload := SerializeRtab(filter.Rtab) - nl.NewRtAttrChild(police, nl.TCA_POLICE_RATE, payload) + police.AddRtAttr(nl.TCA_POLICE_RATE, payload) } if (filter.Police.PeakRate != nl.TcRateSpec{}) { payload := SerializeRtab(filter.Ptab) - nl.NewRtAttrChild(police, nl.TCA_POLICE_PEAKRATE, payload) + police.AddRtAttr(nl.TCA_POLICE_PEAKRATE, payload) } } if filter.ClassId != 0 { b := make([]byte, 4) native.PutUint32(b, filter.ClassId) - nl.NewRtAttrChild(options, nl.TCA_FW_CLASSID, b) + options.AddRtAttr(nl.TCA_FW_CLASSID, b) } case *BpfFilter: var bpfFlags uint32 if filter.ClassId != 0 { - nl.NewRtAttrChild(options, nl.TCA_BPF_CLASSID, nl.Uint32Attr(filter.ClassId)) + options.AddRtAttr(nl.TCA_BPF_CLASSID, nl.Uint32Attr(filter.ClassId)) } if filter.Fd >= 0 { - nl.NewRtAttrChild(options, nl.TCA_BPF_FD, nl.Uint32Attr((uint32(filter.Fd)))) + options.AddRtAttr(nl.TCA_BPF_FD, nl.Uint32Attr((uint32(filter.Fd)))) } if filter.Name != "" { - nl.NewRtAttrChild(options, nl.TCA_BPF_NAME, nl.ZeroTerminated(filter.Name)) + options.AddRtAttr(nl.TCA_BPF_NAME, nl.ZeroTerminated(filter.Name)) } if filter.DirectAction { bpfFlags |= nl.TCA_BPF_FLAG_ACT_DIRECT } - nl.NewRtAttrChild(options, nl.TCA_BPF_FLAGS, nl.Uint32Attr(bpfFlags)) + options.AddRtAttr(nl.TCA_BPF_FLAGS, nl.Uint32Attr(bpfFlags)) case *MatchAll: - actionsAttr := nl.NewRtAttrChild(options, nl.TCA_MATCHALL_ACT, nil) + actionsAttr := options.AddRtAttr(nl.TCA_MATCHALL_ACT, nil) if err := EncodeActions(actionsAttr, filter.Actions); err != nil { return err } if filter.ClassId != 0 { - nl.NewRtAttrChild(options, nl.TCA_MATCHALL_CLASSID, nl.Uint32Attr(filter.ClassId)) + options.AddRtAttr(nl.TCA_MATCHALL_CLASSID, nl.Uint32Attr(filter.ClassId)) } } @@ -366,34 +420,91 @@ func EncodeActions(attr *nl.RtAttr, actions []Action) error { default: return fmt.Errorf("unknown action type %s", action.Type()) case *MirredAction: - table := nl.NewRtAttrChild(attr, tabIndex, nil) + table := attr.AddRtAttr(tabIndex, nil) tabIndex++ - nl.NewRtAttrChild(table, nl.TCA_ACT_KIND, nl.ZeroTerminated("mirred")) - aopts := nl.NewRtAttrChild(table, nl.TCA_ACT_OPTIONS, nil) + table.AddRtAttr(nl.TCA_ACT_KIND, nl.ZeroTerminated("mirred")) + aopts := table.AddRtAttr(nl.TCA_ACT_OPTIONS, nil) mirred := nl.TcMirred{ Eaction: int32(action.MirredAction), Ifindex: uint32(action.Ifindex), } toTcGen(action.Attrs(), &mirred.TcGen) - nl.NewRtAttrChild(aopts, nl.TCA_MIRRED_PARMS, mirred.Serialize()) + aopts.AddRtAttr(nl.TCA_MIRRED_PARMS, mirred.Serialize()) + case *TunnelKeyAction: + table := attr.AddRtAttr(tabIndex, nil) + tabIndex++ + table.AddRtAttr(nl.TCA_ACT_KIND, nl.ZeroTerminated("tunnel_key")) + aopts := table.AddRtAttr(nl.TCA_ACT_OPTIONS, nil) + tun := nl.TcTunnelKey{ + Action: int32(action.Action), + } + toTcGen(action.Attrs(), &tun.TcGen) + aopts.AddRtAttr(nl.TCA_TUNNEL_KEY_PARMS, tun.Serialize()) + if action.Action == TCA_TUNNEL_KEY_SET { + aopts.AddRtAttr(nl.TCA_TUNNEL_KEY_ENC_KEY_ID, htonl(action.KeyID)) + if v4 := action.SrcAddr.To4(); v4 != nil { + aopts.AddRtAttr(nl.TCA_TUNNEL_KEY_ENC_IPV4_SRC, v4[:]) + } else if v6 := action.SrcAddr.To16(); v6 != nil { + aopts.AddRtAttr(nl.TCA_TUNNEL_KEY_ENC_IPV6_SRC, v6[:]) + } else { + return fmt.Errorf("invalid src addr %s for tunnel_key action", action.SrcAddr) + } + if v4 := action.DstAddr.To4(); v4 != nil { + aopts.AddRtAttr(nl.TCA_TUNNEL_KEY_ENC_IPV4_DST, v4[:]) + } else if v6 := action.DstAddr.To16(); v6 != nil { + aopts.AddRtAttr(nl.TCA_TUNNEL_KEY_ENC_IPV6_DST, v6[:]) + } else { + return fmt.Errorf("invalid dst addr %s for tunnel_key action", action.DstAddr) + } + } + case *SkbEditAction: + table := attr.AddRtAttr(tabIndex, nil) + tabIndex++ + table.AddRtAttr(nl.TCA_ACT_KIND, nl.ZeroTerminated("skbedit")) + aopts := table.AddRtAttr(nl.TCA_ACT_OPTIONS, nil) + skbedit := nl.TcSkbEdit{} + toTcGen(action.Attrs(), &skbedit.TcGen) + aopts.AddRtAttr(nl.TCA_SKBEDIT_PARMS, skbedit.Serialize()) + if action.QueueMapping != nil { + aopts.AddRtAttr(nl.TCA_SKBEDIT_QUEUE_MAPPING, nl.Uint16Attr(*action.QueueMapping)) + } + if action.Priority != nil { + aopts.AddRtAttr(nl.TCA_SKBEDIT_PRIORITY, nl.Uint32Attr(*action.Priority)) + } + if action.PType != nil { + aopts.AddRtAttr(nl.TCA_SKBEDIT_PTYPE, nl.Uint16Attr(*action.PType)) + } + if action.Mark != nil { + aopts.AddRtAttr(nl.TCA_SKBEDIT_MARK, nl.Uint32Attr(*action.Mark)) + } + case *ConnmarkAction: + table := attr.AddRtAttr(tabIndex, nil) + tabIndex++ + table.AddRtAttr(nl.TCA_ACT_KIND, nl.ZeroTerminated("connmark")) + aopts := table.AddRtAttr(nl.TCA_ACT_OPTIONS, nil) + connmark := nl.TcConnmark{ + Zone: action.Zone, + } + toTcGen(action.Attrs(), &connmark.TcGen) + aopts.AddRtAttr(nl.TCA_CONNMARK_PARMS, connmark.Serialize()) case *BpfAction: - table := nl.NewRtAttrChild(attr, tabIndex, nil) + table := attr.AddRtAttr(tabIndex, nil) tabIndex++ - nl.NewRtAttrChild(table, nl.TCA_ACT_KIND, nl.ZeroTerminated("bpf")) - aopts := nl.NewRtAttrChild(table, nl.TCA_ACT_OPTIONS, nil) + table.AddRtAttr(nl.TCA_ACT_KIND, nl.ZeroTerminated("bpf")) + aopts := table.AddRtAttr(nl.TCA_ACT_OPTIONS, nil) gen := nl.TcGen{} toTcGen(action.Attrs(), &gen) - nl.NewRtAttrChild(aopts, nl.TCA_ACT_BPF_PARMS, gen.Serialize()) - nl.NewRtAttrChild(aopts, nl.TCA_ACT_BPF_FD, nl.Uint32Attr(uint32(action.Fd))) - nl.NewRtAttrChild(aopts, nl.TCA_ACT_BPF_NAME, nl.ZeroTerminated(action.Name)) + aopts.AddRtAttr(nl.TCA_ACT_BPF_PARMS, gen.Serialize()) + aopts.AddRtAttr(nl.TCA_ACT_BPF_FD, nl.Uint32Attr(uint32(action.Fd))) + aopts.AddRtAttr(nl.TCA_ACT_BPF_NAME, nl.ZeroTerminated(action.Name)) case *GenericAction: - table := nl.NewRtAttrChild(attr, tabIndex, nil) + table := attr.AddRtAttr(tabIndex, nil) tabIndex++ - nl.NewRtAttrChild(table, nl.TCA_ACT_KIND, nl.ZeroTerminated("gact")) - aopts := nl.NewRtAttrChild(table, nl.TCA_ACT_OPTIONS, nil) + table.AddRtAttr(nl.TCA_ACT_KIND, nl.ZeroTerminated("gact")) + aopts := table.AddRtAttr(nl.TCA_ACT_OPTIONS, nil) gen := nl.TcGen{} toTcGen(action.Attrs(), &gen) - nl.NewRtAttrChild(aopts, nl.TCA_GACT_PARMS, gen.Serialize()) + aopts.AddRtAttr(nl.TCA_GACT_PARMS, gen.Serialize()) } } return nil @@ -419,8 +530,14 @@ func parseActions(tables []syscall.NetlinkRouteAttr) ([]Action, error) { action = &MirredAction{} case "bpf": action = &BpfAction{} + case "connmark": + action = &ConnmarkAction{} case "gact": action = &GenericAction{} + case "tunnel_key": + action = &TunnelKeyAction{} + case "skbedit": + action = &SkbEditAction{} default: break nextattr } @@ -435,11 +552,46 @@ func parseActions(tables []syscall.NetlinkRouteAttr) ([]Action, error) { switch adatum.Attr.Type { case nl.TCA_MIRRED_PARMS: mirred := *nl.DeserializeTcMirred(adatum.Value) - toAttrs(&mirred.TcGen, action.Attrs()) action.(*MirredAction).ActionAttrs = ActionAttrs{} + toAttrs(&mirred.TcGen, action.Attrs()) action.(*MirredAction).Ifindex = int(mirred.Ifindex) action.(*MirredAction).MirredAction = MirredAct(mirred.Eaction) } + case "tunnel_key": + switch adatum.Attr.Type { + case nl.TCA_TUNNEL_KEY_PARMS: + tun := *nl.DeserializeTunnelKey(adatum.Value) + action.(*TunnelKeyAction).ActionAttrs = ActionAttrs{} + toAttrs(&tun.TcGen, action.Attrs()) + action.(*TunnelKeyAction).Action = TunnelKeyAct(tun.Action) + case nl.TCA_TUNNEL_KEY_ENC_KEY_ID: + action.(*TunnelKeyAction).KeyID = networkOrder.Uint32(adatum.Value[0:4]) + case nl.TCA_TUNNEL_KEY_ENC_IPV6_SRC: + case nl.TCA_TUNNEL_KEY_ENC_IPV4_SRC: + action.(*TunnelKeyAction).SrcAddr = net.IP(adatum.Value[:]) + case nl.TCA_TUNNEL_KEY_ENC_IPV6_DST: + case nl.TCA_TUNNEL_KEY_ENC_IPV4_DST: + action.(*TunnelKeyAction).DstAddr = net.IP(adatum.Value[:]) + } + case "skbedit": + switch adatum.Attr.Type { + case nl.TCA_SKBEDIT_PARMS: + skbedit := *nl.DeserializeSkbEdit(adatum.Value) + action.(*SkbEditAction).ActionAttrs = ActionAttrs{} + toAttrs(&skbedit.TcGen, action.Attrs()) + case nl.TCA_SKBEDIT_MARK: + mark := native.Uint32(adatum.Value[0:4]) + action.(*SkbEditAction).Mark = &mark + case nl.TCA_SKBEDIT_PRIORITY: + priority := native.Uint32(adatum.Value[0:4]) + action.(*SkbEditAction).Priority = &priority + case nl.TCA_SKBEDIT_PTYPE: + ptype := native.Uint16(adatum.Value[0:2]) + action.(*SkbEditAction).PType = &ptype + case nl.TCA_SKBEDIT_QUEUE_MAPPING: + mapping := native.Uint16(adatum.Value[0:2]) + action.(*SkbEditAction).QueueMapping = &mapping + } case "bpf": switch adatum.Attr.Type { case nl.TCA_ACT_BPF_PARMS: @@ -450,6 +602,14 @@ func parseActions(tables []syscall.NetlinkRouteAttr) ([]Action, error) { case nl.TCA_ACT_BPF_NAME: action.(*BpfAction).Name = string(adatum.Value[:len(adatum.Value)-1]) } + case "connmark": + switch adatum.Attr.Type { + case nl.TCA_CONNMARK_PARMS: + connmark := *nl.DeserializeTcConnmark(adatum.Value) + action.(*ConnmarkAction).ActionAttrs = ActionAttrs{} + toAttrs(&connmark.TcGen, action.Attrs()) + action.(*ConnmarkAction).Zone = connmark.Zone + } case "gact": switch adatum.Attr.Type { case nl.TCA_GACT_PARMS: @@ -474,7 +634,7 @@ func parseU32Data(filter Filter, data []syscall.NetlinkRouteAttr) (bool, error) case nl.TCA_U32_SEL: detailed = true sel := nl.DeserializeTcU32Sel(datum.Value) - u32.Sel = (*TcU32Sel)(unsafe.Pointer(sel)) + u32.Sel = sel if native != networkOrder { // Handle the endianness of attributes u32.Sel.Offmask = native.Uint16(htons(sel.Offmask)) @@ -500,6 +660,10 @@ func parseU32Data(filter Filter, data []syscall.NetlinkRouteAttr) (bool, error) } case nl.TCA_U32_CLASSID: u32.ClassId = native.Uint32(datum.Value) + case nl.TCA_U32_DIVISOR: + u32.Divisor = native.Uint32(datum.Value) + case nl.TCA_U32_HASH: + u32.Hash = native.Uint32(datum.Value) } } return detailed, nil @@ -551,6 +715,10 @@ func parseBpfData(filter Filter, data []syscall.NetlinkRouteAttr) (bool, error) if (flags & nl.TCA_BPF_FLAG_ACT_DIRECT) != 0 { bpf.DirectAction = true } + case nl.TCA_BPF_ID: + bpf.Id = int(native.Uint32(datum.Value[0:4])) + case nl.TCA_BPF_TAG: + bpf.Tag = hex.EncodeToString(datum.Value[:len(datum.Value)-1]) } } return detailed, nil diff --git a/vendor/github.com/vishvananda/netlink/fou_linux.go b/vendor/github.com/vishvananda/netlink/fou_linux.go index 62d59bd2d09..ed55b2b790d 100644 --- a/vendor/github.com/vishvananda/netlink/fou_linux.go +++ b/vendor/github.com/vishvananda/netlink/fou_linux.go @@ -90,11 +90,7 @@ func (h *Handle) FouAdd(f Fou) error { req.AddRawData(raw) _, err = req.Execute(unix.NETLINK_GENERIC, 0) - if err != nil { - return err - } - - return nil + return err } func FouDel(f Fou) error { diff --git a/vendor/github.com/vishvananda/netlink/genetlink_linux.go b/vendor/github.com/vishvananda/netlink/genetlink_linux.go index ce7969907d4..772e5834a26 100644 --- a/vendor/github.com/vishvananda/netlink/genetlink_linux.go +++ b/vendor/github.com/vishvananda/netlink/genetlink_linux.go @@ -157,6 +157,9 @@ func (h *Handle) GenlFamilyGet(name string) (*GenlFamily, error) { return nil, err } families, err := parseFamilies(msgs) + if err != nil { + return nil, err + } if len(families) != 1 { return nil, fmt.Errorf("invalid response for GENL_CTRL_CMD_GETFAMILY") } diff --git a/vendor/github.com/vishvananda/netlink/go.mod b/vendor/github.com/vishvananda/netlink/go.mod new file mode 100644 index 00000000000..09ee60e7784 --- /dev/null +++ b/vendor/github.com/vishvananda/netlink/go.mod @@ -0,0 +1,8 @@ +module github.com/vishvananda/netlink + +go 1.12 + +require ( + github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df + golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444 +) diff --git a/vendor/github.com/vishvananda/netlink/go.sum b/vendor/github.com/vishvananda/netlink/go.sum new file mode 100644 index 00000000000..402d14ec552 --- /dev/null +++ b/vendor/github.com/vishvananda/netlink/go.sum @@ -0,0 +1,4 @@ +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7ZovXvuNyL3XQl8UFofeikI1NW1Gypu7k= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444 h1:/d2cWp6PSamH4jDPFLyO150psQdqvtoNX8Zjg3AQ31g= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/vishvananda/netlink/handle_linux.go b/vendor/github.com/vishvananda/netlink/handle_linux.go index 9f6d7fe0fbd..26887b75961 100644 --- a/vendor/github.com/vishvananda/netlink/handle_linux.go +++ b/vendor/github.com/vishvananda/netlink/handle_linux.go @@ -91,7 +91,7 @@ func (h *Handle) GetSocketReceiveBufferSize() ([]int, error) { return results, nil } -// NewHandle returns a netlink handle on the network namespace +// NewHandleAt returns a netlink handle on the network namespace // specified by ns. If ns=netns.None(), current network namespace // will be assumed func NewHandleAt(ns netns.NsHandle, nlFamilies ...int) (*Handle, error) { diff --git a/vendor/github.com/vishvananda/netlink/handle_unspecified.go b/vendor/github.com/vishvananda/netlink/handle_unspecified.go index 915b765ded7..ef914dcb8cc 100644 --- a/vendor/github.com/vishvananda/netlink/handle_unspecified.go +++ b/vendor/github.com/vishvananda/netlink/handle_unspecified.go @@ -73,10 +73,18 @@ func (h *Handle) LinkSetVfVlan(link Link, vf, vlan int) error { return ErrNotImplemented } +func (h *Handle) LinkSetVfVlanQos(link Link, vf, vlan, qos int) error { + return ErrNotImplemented +} + func (h *Handle) LinkSetVfTxRate(link Link, vf, rate int) error { return ErrNotImplemented } +func (h *Handle) LinkSetVfRate(link Link, vf, minRate, maxRate int) error { + return ErrNotImplemented +} + func (h *Handle) LinkSetMaster(link Link, master *Bridge) error { return ErrNotImplemented } @@ -149,6 +157,10 @@ func (h *Handle) LinkSetTxQLen(link Link, qlen int) error { return ErrNotImplemented } +func (h *Handle) LinkSetGroup(link Link, group int) error { + return ErrNotImplemented +} + func (h *Handle) setProtinfoAttr(link Link, mode bool, attr int) error { return ErrNotImplemented } diff --git a/vendor/github.com/vishvananda/netlink/ioctl_linux.go b/vendor/github.com/vishvananda/netlink/ioctl_linux.go index a8503126d56..4d33db5da51 100644 --- a/vendor/github.com/vishvananda/netlink/ioctl_linux.go +++ b/vendor/github.com/vishvananda/netlink/ioctl_linux.go @@ -56,18 +56,10 @@ type ethtoolSset struct { data [1]uint32 } -// ethtoolGstrings is string set for data tagging -type ethtoolGstrings struct { - cmd uint32 - stringSet uint32 - length uint32 - data [32]byte -} - type ethtoolStats struct { cmd uint32 nStats uint32 - data [1]uint64 + // Followed by nStats * []uint64. } // newIocltSlaveReq returns filled IfreqSlave with proper interface names diff --git a/vendor/github.com/vishvananda/netlink/link.go b/vendor/github.com/vishvananda/netlink/link.go index fe74ffab964..886d88d1b2f 100644 --- a/vendor/github.com/vishvananda/netlink/link.go +++ b/vendor/github.com/vishvananda/netlink/link.go @@ -4,6 +4,7 @@ import ( "fmt" "net" "os" + "strconv" ) // Link represents a link device from netlink. Shared link attributes @@ -41,6 +42,29 @@ type LinkAttrs struct { NetNsID int NumTxQueues int NumRxQueues int + GSOMaxSize uint32 + GSOMaxSegs uint32 + Vfs []VfInfo // virtual functions available on link + Group uint32 + Slave LinkSlave +} + +// LinkSlave represents a slave device. +type LinkSlave interface { + SlaveType() string +} + +// VfInfo represents configuration of virtual function +type VfInfo struct { + ID int + Mac net.HardwareAddr + Vlan int + Qos int + TxRate int // IFLA_VF_TX_RATE Max TxRate + Spoofchk bool + LinkState uint32 + MaxTxRate uint32 // IFLA_VF_RATE Max TxRate + MinTxRate uint32 // IFLA_VF_RATE Min TxRate } // LinkOperState represents the values of the IFLA_OPERSTATE link @@ -223,6 +247,7 @@ type Bridge struct { LinkAttrs MulticastSnooping *bool HelloTime *uint32 + VlanFiltering *bool } func (bridge *Bridge) Attrs() *LinkAttrs { @@ -236,7 +261,8 @@ func (bridge *Bridge) Type() string { // Vlan links have ParentIndex set in their Attrs() type Vlan struct { LinkAttrs - VlanId int + VlanId int + VlanProtocol VlanProtocol } func (vlan *Vlan) Attrs() *LinkAttrs { @@ -290,10 +316,13 @@ type TuntapFlag uint16 // Tuntap links created via /dev/tun/tap, but can be destroyed via netlink type Tuntap struct { LinkAttrs - Mode TuntapMode - Flags TuntapFlag - Queues int - Fds []*os.File + Mode TuntapMode + Flags TuntapFlag + NonPersist bool + Queues int + Fds []*os.File + Owner uint32 + Group uint32 } func (tuntap *Tuntap) Attrs() *LinkAttrs { @@ -307,7 +336,8 @@ func (tuntap *Tuntap) Type() string { // Veth devices must specify PeerName on create type Veth struct { LinkAttrs - PeerName string // veth on create only + PeerName string // veth on create only + PeerHardwareAddr net.HardwareAddr } func (veth *Veth) Attrs() *LinkAttrs { @@ -376,9 +406,18 @@ const ( IPVLAN_MODE_MAX ) +type IPVlanFlag uint16 + +const ( + IPVLAN_FLAG_BRIDGE IPVlanFlag = iota + IPVLAN_FLAG_PRIVATE + IPVLAN_FLAG_VEPA +) + type IPVlan struct { LinkAttrs Mode IPVlanMode + Flag IPVlanFlag } func (ipvlan *IPVlan) Attrs() *LinkAttrs { @@ -389,6 +428,43 @@ func (ipvlan *IPVlan) Type() string { return "ipvlan" } +// VlanProtocol type +type VlanProtocol int + +func (p VlanProtocol) String() string { + s, ok := VlanProtocolToString[p] + if !ok { + return fmt.Sprintf("VlanProtocol(%d)", p) + } + return s +} + +// StringToVlanProtocol returns vlan protocol, or unknown is the s is invalid. +func StringToVlanProtocol(s string) VlanProtocol { + mode, ok := StringToVlanProtocolMap[s] + if !ok { + return VLAN_PROTOCOL_UNKNOWN + } + return mode +} + +// VlanProtocol possible values +const ( + VLAN_PROTOCOL_UNKNOWN VlanProtocol = 0 + VLAN_PROTOCOL_8021Q VlanProtocol = 0x8100 + VLAN_PROTOCOL_8021AD VlanProtocol = 0x88A8 +) + +var VlanProtocolToString = map[VlanProtocol]string{ + VLAN_PROTOCOL_8021Q: "802.1q", + VLAN_PROTOCOL_8021AD: "802.1ad", +} + +var StringToVlanProtocolMap = map[string]VlanProtocol{ + "802.1q": VLAN_PROTOCOL_8021Q, + "802.1ad": VLAN_PROTOCOL_8021AD, +} + // BondMode type type BondMode int @@ -400,7 +476,7 @@ func (b BondMode) String() string { return s } -// StringToBondMode returns bond mode, or uknonw is the s is invalid. +// StringToBondMode returns bond mode, or unknown is the s is invalid. func StringToBondMode(s string) BondMode { mode, ok := StringToBondModeMap[s] if !ok { @@ -491,7 +567,7 @@ func (b BondXmitHashPolicy) String() string { return s } -// StringToBondXmitHashPolicy returns bond lacp arte, or uknonw is the s is invalid. +// StringToBondXmitHashPolicy returns bond lacp arte, or unknown is the s is invalid. func StringToBondXmitHashPolicy(s string) BondXmitHashPolicy { lacp, ok := StringToBondXmitHashPolicyMap[s] if !ok { @@ -536,7 +612,7 @@ func (b BondLacpRate) String() string { return s } -// StringToBondLacpRate returns bond lacp arte, or uknonw is the s is invalid. +// StringToBondLacpRate returns bond lacp arte, or unknown is the s is invalid. func StringToBondLacpRate(s string) BondLacpRate { lacp, ok := StringToBondLacpRateMap[s] if !ok { @@ -680,6 +756,67 @@ func (bond *Bond) Type() string { return "bond" } +// BondSlaveState represents the values of the IFLA_BOND_SLAVE_STATE bond slave +// attribute, which contains the state of the bond slave. +type BondSlaveState uint8 + +const ( + BondStateActive = iota // Link is active. + BondStateBackup // Link is backup. +) + +func (s BondSlaveState) String() string { + switch s { + case BondStateActive: + return "ACTIVE" + case BondStateBackup: + return "BACKUP" + default: + return strconv.Itoa(int(s)) + } +} + +// BondSlaveState represents the values of the IFLA_BOND_SLAVE_MII_STATUS bond slave +// attribute, which contains the status of MII link monitoring +type BondSlaveMiiStatus uint8 + +const ( + BondLinkUp = iota // link is up and running. + BondLinkFail // link has just gone down. + BondLinkDown // link has been down for too long time. + BondLinkBack // link is going back. +) + +func (s BondSlaveMiiStatus) String() string { + switch s { + case BondLinkUp: + return "UP" + case BondLinkFail: + return "GOING_DOWN" + case BondLinkDown: + return "DOWN" + case BondLinkBack: + return "GOING_BACK" + default: + return strconv.Itoa(int(s)) + } +} + +type BondSlave struct { + State BondSlaveState + MiiStatus BondSlaveMiiStatus + LinkFailureCount uint32 + PermHardwareAddr net.HardwareAddr + QueueId uint16 + AggregatorId uint16 + AdActorOperPortState uint8 + AdPartnerOperPortState uint16 +} + +func (b *BondSlave) SlaveType() string { + return "bond" +} + // Gretap devices must specify LocalIP and RemoteIP on create type Gretap struct { LinkAttrs @@ -734,6 +871,27 @@ func (iptun *Iptun) Type() string { return "ipip" } +type Ip6tnl struct { + LinkAttrs + Link uint32 + Local net.IP + Remote net.IP + Ttl uint8 + Tos uint8 + EncapLimit uint8 + Flags uint32 + Proto uint8 + FlowInfo uint32 +} + +func (ip6tnl *Ip6tnl) Attrs() *LinkAttrs { + return &ip6tnl.LinkAttrs +} + +func (ip6tnl *Ip6tnl) Type() string { + return "ip6tnl" +} + type Sittun struct { LinkAttrs Link uint32 @@ -769,7 +927,10 @@ func (vti *Vti) Attrs() *LinkAttrs { return &vti.LinkAttrs } -func (iptun *Vti) Type() string { +func (vti *Vti) Type() string { + if vti.Local.To4() == nil { + return "vti6" + } return "vti" } @@ -831,11 +992,68 @@ func (gtp *GTP) Type() string { return "gtp" } +// Virtual XFRM Interfaces +// Named "xfrmi" to prevent confusion with XFRM objects +type Xfrmi struct { + LinkAttrs + Ifid uint32 +} + +func (xfrm *Xfrmi) Attrs() *LinkAttrs { + return &xfrm.LinkAttrs +} + +func (xfrm *Xfrmi) Type() string { + return "xfrm" +} + +// IPoIB interface + +type IPoIBMode uint16 + +func (m *IPoIBMode) String() string { + str, ok := iPoIBModeToString[*m] + if !ok { + return fmt.Sprintf("mode(%d)", *m) + } + return str +} + +const ( + IPOIB_MODE_DATAGRAM = iota + IPOIB_MODE_CONNECTED +) + +var iPoIBModeToString = map[IPoIBMode]string{ + IPOIB_MODE_DATAGRAM: "datagram", + IPOIB_MODE_CONNECTED: "connected", +} + +var StringToIPoIBMode = map[string]IPoIBMode{ + "datagram": IPOIB_MODE_DATAGRAM, + "connected": IPOIB_MODE_CONNECTED, +} + +type IPoIB struct { + LinkAttrs + Pkey uint16 + Mode IPoIBMode + Umcast uint16 +} + +func (ipoib *IPoIB) Attrs() *LinkAttrs { + return &ipoib.LinkAttrs +} + +func (ipoib *IPoIB) Type() string { + return "ipoib" +} + // iproute2 supported devices; // vlan | veth | vcan | dummy | ifb | macvlan | macvtap | // bridge | bond | ipoib | ip6tnl | ipip | sit | vxlan | -// gre | gretap | ip6gre | ip6gretap | vti | nlmon | -// bond_slave | ipvlan +// gre | gretap | ip6gre | ip6gretap | vti | vti6 | nlmon | +// bond_slave | ipvlan | xfrm // LinkNotFoundError wraps the various not found errors when // getting/reading links. This is intended for better error diff --git a/vendor/github.com/vishvananda/netlink/link_linux.go b/vendor/github.com/vishvananda/netlink/link_linux.go index 540191ed843..ec915a0b979 100644 --- a/vendor/github.com/vishvananda/netlink/link_linux.go +++ b/vendor/github.com/vishvananda/netlink/link_linux.go @@ -4,8 +4,11 @@ import ( "bytes" "encoding/binary" "fmt" + "io/ioutil" "net" "os" + "strconv" + "strings" "syscall" "unsafe" @@ -16,7 +19,7 @@ import ( const ( SizeofLinkStats32 = 0x5c - SizeofLinkStats64 = 0xd8 + SizeofLinkStats64 = 0xb8 ) const ( @@ -31,6 +34,12 @@ const ( TUNTAP_MULTI_QUEUE_DEFAULTS TuntapFlag = TUNTAP_MULTI_QUEUE | TUNTAP_NO_PI ) +const ( + VF_LINK_STATE_AUTO uint32 = 0 + VF_LINK_STATE_ENABLE uint32 = 1 + VF_LINK_STATE_DISABLE uint32 = 2 +) + var lookupByDump = false var macvlanModes = [...]uint32{ @@ -113,6 +122,52 @@ func (h *Handle) SetPromiscOn(link Link) error { return err } +// LinkSetAllmulticastOn enables the reception of all hardware multicast packets for the link device. +// Equivalent to: `ip link set $link allmulticast on` +func LinkSetAllmulticastOn(link Link) error { + return pkgHandle.LinkSetAllmulticastOn(link) +} + +// LinkSetAllmulticastOn enables the reception of all hardware multicast packets for the link device. +// Equivalent to: `ip link set $link allmulticast on` +func (h *Handle) LinkSetAllmulticastOn(link Link) error { + base := link.Attrs() + h.ensureIndex(base) + req := h.newNetlinkRequest(unix.RTM_NEWLINK, unix.NLM_F_ACK) + + msg := nl.NewIfInfomsg(unix.AF_UNSPEC) + msg.Change = unix.IFF_ALLMULTI + msg.Flags = unix.IFF_ALLMULTI + + msg.Index = int32(base.Index) + req.AddData(msg) + + _, err := req.Execute(unix.NETLINK_ROUTE, 0) + return err +} + +// LinkSetAllmulticastOff disables the reception of all hardware multicast packets for the link device. +// Equivalent to: `ip link set $link allmulticast off` +func LinkSetAllmulticastOff(link Link) error { + return pkgHandle.LinkSetAllmulticastOff(link) +} + +// LinkSetAllmulticastOff disables the reception of all hardware multicast packets for the link device. +// Equivalent to: `ip link set $link allmulticast off` +func (h *Handle) LinkSetAllmulticastOff(link Link) error { + base := link.Attrs() + h.ensureIndex(base) + req := h.newNetlinkRequest(unix.RTM_NEWLINK, unix.NLM_F_ACK) + + msg := nl.NewIfInfomsg(unix.AF_UNSPEC) + msg.Change = unix.IFF_ALLMULTI + msg.Index = int32(base.Index) + req.AddData(msg) + + _, err := req.Execute(unix.NETLINK_ROUTE, 0) + return err +} + func MacvlanMACAddrAdd(link Link, addr net.HardwareAddr) error { return pkgHandle.MacvlanMACAddrAdd(link, addr) } @@ -155,24 +210,24 @@ func (h *Handle) macvlanMACAddrChange(link Link, addrs []net.HardwareAddr, mode req.AddData(msg) linkInfo := nl.NewRtAttr(unix.IFLA_LINKINFO, nil) - nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_KIND, nl.NonZeroTerminated(link.Type())) - inner := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) + linkInfo.AddRtAttr(nl.IFLA_INFO_KIND, nl.NonZeroTerminated(link.Type())) + inner := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) // IFLA_MACVLAN_MACADDR_MODE = mode b := make([]byte, 4) native.PutUint32(b, mode) - nl.NewRtAttrChild(inner, nl.IFLA_MACVLAN_MACADDR_MODE, b) + inner.AddRtAttr(nl.IFLA_MACVLAN_MACADDR_MODE, b) // populate message with MAC addrs, if necessary switch mode { case nl.MACVLAN_MACADDR_ADD, nl.MACVLAN_MACADDR_DEL: if len(addrs) == 1 { - nl.NewRtAttrChild(inner, nl.IFLA_MACVLAN_MACADDR, []byte(addrs[0])) + inner.AddRtAttr(nl.IFLA_MACVLAN_MACADDR, []byte(addrs[0])) } case nl.MACVLAN_MACADDR_SET: - mad := nl.NewRtAttrChild(inner, nl.IFLA_MACVLAN_MACADDR_DATA, nil) + mad := inner.AddRtAttr(nl.IFLA_MACVLAN_MACADDR_DATA, nil) for _, addr := range addrs { - nl.NewRtAttrChild(mad, nl.IFLA_MACVLAN_MACADDR, []byte(addr)) + mad.AddRtAttr(nl.IFLA_MACVLAN_MACADDR, []byte(addr)) } } @@ -203,7 +258,6 @@ func (h *Handle) SetPromiscOff(link Link) error { msg := nl.NewIfInfomsg(unix.AF_UNSPEC) msg.Change = unix.IFF_PROMISC - msg.Flags = 0 & ^unix.IFF_PROMISC msg.Index = int32(base.Index) req.AddData(msg) @@ -253,7 +307,6 @@ func (h *Handle) LinkSetDown(link Link) error { msg := nl.NewIfInfomsg(unix.AF_UNSPEC) msg.Change = unix.IFF_UP - msg.Flags = 0 & ^unix.IFF_UP msg.Index = int32(base.Index) req.AddData(msg) @@ -378,12 +431,12 @@ func (h *Handle) LinkSetVfHardwareAddr(link Link, vf int, hwaddr net.HardwareAdd req.AddData(msg) data := nl.NewRtAttr(unix.IFLA_VFINFO_LIST, nil) - info := nl.NewRtAttrChild(data, nl.IFLA_VF_INFO, nil) + info := data.AddRtAttr(nl.IFLA_VF_INFO, nil) vfmsg := nl.VfMac{ Vf: uint32(vf), } copy(vfmsg.Mac[:], []byte(hwaddr)) - nl.NewRtAttrChild(info, nl.IFLA_VF_MAC, vfmsg.Serialize()) + info.AddRtAttr(nl.IFLA_VF_MAC, vfmsg.Serialize()) req.AddData(data) _, err := req.Execute(unix.NETLINK_ROUTE, 0) @@ -407,11 +460,42 @@ func (h *Handle) LinkSetVfVlan(link Link, vf, vlan int) error { msg.Index = int32(base.Index) req.AddData(msg) + data := nl.NewRtAttr(unix.IFLA_VFINFO_LIST, nil) + info := data.AddRtAttr(nl.IFLA_VF_INFO, nil) + vfmsg := nl.VfVlan{ + Vf: uint32(vf), + Vlan: uint32(vlan), + } + info.AddRtAttr(nl.IFLA_VF_VLAN, vfmsg.Serialize()) + req.AddData(data) + + _, err := req.Execute(unix.NETLINK_ROUTE, 0) + return err +} + +// LinkSetVfVlanQos sets the vlan and qos priority of a vf for the link. +// Equivalent to: `ip link set $link vf $vf vlan $vlan qos $qos` +func LinkSetVfVlanQos(link Link, vf, vlan, qos int) error { + return pkgHandle.LinkSetVfVlanQos(link, vf, vlan, qos) +} + +// LinkSetVfVlanQos sets the vlan and qos priority of a vf for the link. +// Equivalent to: `ip link set $link vf $vf vlan $vlan qos $qos` +func (h *Handle) LinkSetVfVlanQos(link Link, vf, vlan, qos int) error { + base := link.Attrs() + h.ensureIndex(base) + req := h.newNetlinkRequest(unix.RTM_SETLINK, unix.NLM_F_ACK) + + msg := nl.NewIfInfomsg(unix.AF_UNSPEC) + msg.Index = int32(base.Index) + req.AddData(msg) + data := nl.NewRtAttr(unix.IFLA_VFINFO_LIST, nil) info := nl.NewRtAttrChild(data, nl.IFLA_VF_INFO, nil) vfmsg := nl.VfVlan{ Vf: uint32(vf), Vlan: uint32(vlan), + Qos: uint32(qos), } nl.NewRtAttrChild(info, nl.IFLA_VF_VLAN, vfmsg.Serialize()) req.AddData(data) @@ -438,12 +522,73 @@ func (h *Handle) LinkSetVfTxRate(link Link, vf, rate int) error { req.AddData(msg) data := nl.NewRtAttr(unix.IFLA_VFINFO_LIST, nil) - info := nl.NewRtAttrChild(data, nl.IFLA_VF_INFO, nil) + info := data.AddRtAttr(nl.IFLA_VF_INFO, nil) vfmsg := nl.VfTxRate{ Vf: uint32(vf), Rate: uint32(rate), } - nl.NewRtAttrChild(info, nl.IFLA_VF_TX_RATE, vfmsg.Serialize()) + info.AddRtAttr(nl.IFLA_VF_TX_RATE, vfmsg.Serialize()) + req.AddData(data) + + _, err := req.Execute(unix.NETLINK_ROUTE, 0) + return err +} + +// LinkSetVfRate sets the min and max tx rate of a vf for the link. +// Equivalent to: `ip link set $link vf $vf min_tx_rate $min_rate max_tx_rate $max_rate` +func LinkSetVfRate(link Link, vf, minRate, maxRate int) error { + return pkgHandle.LinkSetVfRate(link, vf, minRate, maxRate) +} + +// LinkSetVfRate sets the min and max tx rate of a vf for the link. +// Equivalent to: `ip link set $link vf $vf min_tx_rate $min_rate max_tx_rate $max_rate` +func (h *Handle) LinkSetVfRate(link Link, vf, minRate, maxRate int) error { + base := link.Attrs() + h.ensureIndex(base) + req := h.newNetlinkRequest(unix.RTM_SETLINK, unix.NLM_F_ACK) + + msg := nl.NewIfInfomsg(unix.AF_UNSPEC) + msg.Index = int32(base.Index) + req.AddData(msg) + + data := nl.NewRtAttr(unix.IFLA_VFINFO_LIST, nil) + info := data.AddRtAttr(nl.IFLA_VF_INFO, nil) + vfmsg := nl.VfRate{ + Vf: uint32(vf), + MinTxRate: uint32(minRate), + MaxTxRate: uint32(maxRate), + } + info.AddRtAttr(nl.IFLA_VF_RATE, vfmsg.Serialize()) + req.AddData(data) + + _, err := req.Execute(unix.NETLINK_ROUTE, 0) + return err +} + +// LinkSetVfState enables/disables virtual link state on a vf. +// Equivalent to: `ip link set $link vf $vf state $state` +func LinkSetVfState(link Link, vf int, state uint32) error { + return pkgHandle.LinkSetVfState(link, vf, state) +} + +// LinkSetVfState enables/disables virtual link state on a vf. +// Equivalent to: `ip link set $link vf $vf state $state` +func (h *Handle) LinkSetVfState(link Link, vf int, state uint32) error { + base := link.Attrs() + h.ensureIndex(base) + req := h.newNetlinkRequest(unix.RTM_SETLINK, unix.NLM_F_ACK) + + msg := nl.NewIfInfomsg(unix.AF_UNSPEC) + msg.Index = int32(base.Index) + req.AddData(msg) + + data := nl.NewRtAttr(unix.IFLA_VFINFO_LIST, nil) + info := data.AddRtAttr(nl.IFLA_VF_INFO, nil) + vfmsg := nl.VfLinkState{ + Vf: uint32(vf), + LinkState: state, + } + info.AddRtAttr(nl.IFLA_VF_LINK_STATE, vfmsg.Serialize()) req.AddData(data) _, err := req.Execute(unix.NETLINK_ROUTE, 0) @@ -456,7 +601,7 @@ func LinkSetVfSpoofchk(link Link, vf int, check bool) error { return pkgHandle.LinkSetVfSpoofchk(link, vf, check) } -// LinkSetVfSpookfchk enables/disables spoof check on a vf for the link. +// LinkSetVfSpoofchk enables/disables spoof check on a vf for the link. // Equivalent to: `ip link set $link vf $vf spoofchk $check` func (h *Handle) LinkSetVfSpoofchk(link Link, vf int, check bool) error { var setting uint32 @@ -469,7 +614,7 @@ func (h *Handle) LinkSetVfSpoofchk(link Link, vf int, check bool) error { req.AddData(msg) data := nl.NewRtAttr(unix.IFLA_VFINFO_LIST, nil) - info := nl.NewRtAttrChild(data, nl.IFLA_VF_INFO, nil) + info := data.AddRtAttr(nl.IFLA_VF_INFO, nil) if check { setting = 1 } @@ -477,7 +622,7 @@ func (h *Handle) LinkSetVfSpoofchk(link Link, vf int, check bool) error { Vf: uint32(vf), Setting: setting, } - nl.NewRtAttrChild(info, nl.IFLA_VF_SPOOFCHK, vfmsg.Serialize()) + info.AddRtAttr(nl.IFLA_VF_SPOOFCHK, vfmsg.Serialize()) req.AddData(data) _, err := req.Execute(unix.NETLINK_ROUTE, 0) @@ -503,7 +648,7 @@ func (h *Handle) LinkSetVfTrust(link Link, vf int, state bool) error { req.AddData(msg) data := nl.NewRtAttr(unix.IFLA_VFINFO_LIST, nil) - info := nl.NewRtAttrChild(data, nl.IFLA_VF_INFO, nil) + info := data.AddRtAttr(nl.IFLA_VF_INFO, nil) if state { setting = 1 } @@ -511,22 +656,66 @@ func (h *Handle) LinkSetVfTrust(link Link, vf int, state bool) error { Vf: uint32(vf), Setting: setting, } - nl.NewRtAttrChild(info, nl.IFLA_VF_TRUST, vfmsg.Serialize()) + info.AddRtAttr(nl.IFLA_VF_TRUST, vfmsg.Serialize()) req.AddData(data) _, err := req.Execute(unix.NETLINK_ROUTE, 0) return err } +// LinkSetVfNodeGUID sets the node GUID of a vf for the link. +// Equivalent to: `ip link set dev $link vf $vf node_guid $nodeguid` +func LinkSetVfNodeGUID(link Link, vf int, nodeguid net.HardwareAddr) error { + return pkgHandle.LinkSetVfGUID(link, vf, nodeguid, nl.IFLA_VF_IB_NODE_GUID) +} + +// LinkSetVfPortGUID sets the port GUID of a vf for the link. +// Equivalent to: `ip link set dev $link vf $vf port_guid $portguid` +func LinkSetVfPortGUID(link Link, vf int, portguid net.HardwareAddr) error { + return pkgHandle.LinkSetVfGUID(link, vf, portguid, nl.IFLA_VF_IB_PORT_GUID) +} + +// LinkSetVfGUID sets the node or port GUID of a vf for the link. +func (h *Handle) LinkSetVfGUID(link Link, vf int, vfGuid net.HardwareAddr, guidType int) error { + var err error + var guid uint64 + + buf := bytes.NewBuffer(vfGuid) + err = binary.Read(buf, binary.BigEndian, &guid) + if err != nil { + return err + } + + base := link.Attrs() + h.ensureIndex(base) + req := h.newNetlinkRequest(unix.RTM_SETLINK, unix.NLM_F_ACK) + + msg := nl.NewIfInfomsg(unix.AF_UNSPEC) + msg.Index = int32(base.Index) + req.AddData(msg) + + data := nl.NewRtAttr(unix.IFLA_VFINFO_LIST, nil) + info := data.AddRtAttr(nl.IFLA_VF_INFO, nil) + vfmsg := nl.VfGUID{ + Vf: uint32(vf), + GUID: guid, + } + info.AddRtAttr(guidType, vfmsg.Serialize()) + req.AddData(data) + + _, err = req.Execute(unix.NETLINK_ROUTE, 0) + return err +} + // LinkSetMaster sets the master of the link device. // Equivalent to: `ip link set $link master $master` -func LinkSetMaster(link Link, master *Bridge) error { +func LinkSetMaster(link Link, master Link) error { return pkgHandle.LinkSetMaster(link, master) } // LinkSetMaster sets the master of the link device. // Equivalent to: `ip link set $link master $master` -func (h *Handle) LinkSetMaster(link Link, master *Bridge) error { +func (h *Handle) LinkSetMaster(link Link, master Link) error { index := 0 if master != nil { masterBase := master.Attrs() @@ -672,69 +861,69 @@ type vxlanPortRange struct { } func addVxlanAttrs(vxlan *Vxlan, linkInfo *nl.RtAttr) { - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) if vxlan.FlowBased { vxlan.VxlanId = 0 } - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_ID, nl.Uint32Attr(uint32(vxlan.VxlanId))) + data.AddRtAttr(nl.IFLA_VXLAN_ID, nl.Uint32Attr(uint32(vxlan.VxlanId))) if vxlan.VtepDevIndex != 0 { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_LINK, nl.Uint32Attr(uint32(vxlan.VtepDevIndex))) + data.AddRtAttr(nl.IFLA_VXLAN_LINK, nl.Uint32Attr(uint32(vxlan.VtepDevIndex))) } if vxlan.SrcAddr != nil { ip := vxlan.SrcAddr.To4() if ip != nil { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_LOCAL, []byte(ip)) + data.AddRtAttr(nl.IFLA_VXLAN_LOCAL, []byte(ip)) } else { ip = vxlan.SrcAddr.To16() if ip != nil { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_LOCAL6, []byte(ip)) + data.AddRtAttr(nl.IFLA_VXLAN_LOCAL6, []byte(ip)) } } } if vxlan.Group != nil { group := vxlan.Group.To4() if group != nil { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_GROUP, []byte(group)) + data.AddRtAttr(nl.IFLA_VXLAN_GROUP, []byte(group)) } else { group = vxlan.Group.To16() if group != nil { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_GROUP6, []byte(group)) + data.AddRtAttr(nl.IFLA_VXLAN_GROUP6, []byte(group)) } } } - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_TTL, nl.Uint8Attr(uint8(vxlan.TTL))) - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_TOS, nl.Uint8Attr(uint8(vxlan.TOS))) - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_LEARNING, boolAttr(vxlan.Learning)) - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_PROXY, boolAttr(vxlan.Proxy)) - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_RSC, boolAttr(vxlan.RSC)) - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_L2MISS, boolAttr(vxlan.L2miss)) - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_L3MISS, boolAttr(vxlan.L3miss)) - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_UDP_ZERO_CSUM6_TX, boolAttr(vxlan.UDP6ZeroCSumTx)) - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_UDP_ZERO_CSUM6_RX, boolAttr(vxlan.UDP6ZeroCSumRx)) + data.AddRtAttr(nl.IFLA_VXLAN_TTL, nl.Uint8Attr(uint8(vxlan.TTL))) + data.AddRtAttr(nl.IFLA_VXLAN_TOS, nl.Uint8Attr(uint8(vxlan.TOS))) + data.AddRtAttr(nl.IFLA_VXLAN_LEARNING, boolAttr(vxlan.Learning)) + data.AddRtAttr(nl.IFLA_VXLAN_PROXY, boolAttr(vxlan.Proxy)) + data.AddRtAttr(nl.IFLA_VXLAN_RSC, boolAttr(vxlan.RSC)) + data.AddRtAttr(nl.IFLA_VXLAN_L2MISS, boolAttr(vxlan.L2miss)) + data.AddRtAttr(nl.IFLA_VXLAN_L3MISS, boolAttr(vxlan.L3miss)) + data.AddRtAttr(nl.IFLA_VXLAN_UDP_ZERO_CSUM6_TX, boolAttr(vxlan.UDP6ZeroCSumTx)) + data.AddRtAttr(nl.IFLA_VXLAN_UDP_ZERO_CSUM6_RX, boolAttr(vxlan.UDP6ZeroCSumRx)) if vxlan.UDPCSum { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_UDP_CSUM, boolAttr(vxlan.UDPCSum)) + data.AddRtAttr(nl.IFLA_VXLAN_UDP_CSUM, boolAttr(vxlan.UDPCSum)) } if vxlan.GBP { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_GBP, []byte{}) + data.AddRtAttr(nl.IFLA_VXLAN_GBP, []byte{}) } if vxlan.FlowBased { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_FLOWBASED, boolAttr(vxlan.FlowBased)) + data.AddRtAttr(nl.IFLA_VXLAN_FLOWBASED, boolAttr(vxlan.FlowBased)) } if vxlan.NoAge { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_AGEING, nl.Uint32Attr(0)) + data.AddRtAttr(nl.IFLA_VXLAN_AGEING, nl.Uint32Attr(0)) } else if vxlan.Age > 0 { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_AGEING, nl.Uint32Attr(uint32(vxlan.Age))) + data.AddRtAttr(nl.IFLA_VXLAN_AGEING, nl.Uint32Attr(uint32(vxlan.Age))) } if vxlan.Limit > 0 { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_LIMIT, nl.Uint32Attr(uint32(vxlan.Limit))) + data.AddRtAttr(nl.IFLA_VXLAN_LIMIT, nl.Uint32Attr(uint32(vxlan.Limit))) } if vxlan.Port > 0 { - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_PORT, htons(uint16(vxlan.Port))) + data.AddRtAttr(nl.IFLA_VXLAN_PORT, htons(uint16(vxlan.Port))) } if vxlan.PortLow > 0 || vxlan.PortHigh > 0 { pr := vxlanPortRange{uint16(vxlan.PortLow), uint16(vxlan.PortHigh)} @@ -742,100 +931,100 @@ func addVxlanAttrs(vxlan *Vxlan, linkInfo *nl.RtAttr) { buf := new(bytes.Buffer) binary.Write(buf, binary.BigEndian, &pr) - nl.NewRtAttrChild(data, nl.IFLA_VXLAN_PORT_RANGE, buf.Bytes()) + data.AddRtAttr(nl.IFLA_VXLAN_PORT_RANGE, buf.Bytes()) } } func addBondAttrs(bond *Bond, linkInfo *nl.RtAttr) { - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) if bond.Mode >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_MODE, nl.Uint8Attr(uint8(bond.Mode))) + data.AddRtAttr(nl.IFLA_BOND_MODE, nl.Uint8Attr(uint8(bond.Mode))) } if bond.ActiveSlave >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_ACTIVE_SLAVE, nl.Uint32Attr(uint32(bond.ActiveSlave))) + data.AddRtAttr(nl.IFLA_BOND_ACTIVE_SLAVE, nl.Uint32Attr(uint32(bond.ActiveSlave))) } if bond.Miimon >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_MIIMON, nl.Uint32Attr(uint32(bond.Miimon))) + data.AddRtAttr(nl.IFLA_BOND_MIIMON, nl.Uint32Attr(uint32(bond.Miimon))) } if bond.UpDelay >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_UPDELAY, nl.Uint32Attr(uint32(bond.UpDelay))) + data.AddRtAttr(nl.IFLA_BOND_UPDELAY, nl.Uint32Attr(uint32(bond.UpDelay))) } if bond.DownDelay >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_DOWNDELAY, nl.Uint32Attr(uint32(bond.DownDelay))) + data.AddRtAttr(nl.IFLA_BOND_DOWNDELAY, nl.Uint32Attr(uint32(bond.DownDelay))) } if bond.UseCarrier >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_USE_CARRIER, nl.Uint8Attr(uint8(bond.UseCarrier))) + data.AddRtAttr(nl.IFLA_BOND_USE_CARRIER, nl.Uint8Attr(uint8(bond.UseCarrier))) } if bond.ArpInterval >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_ARP_INTERVAL, nl.Uint32Attr(uint32(bond.ArpInterval))) + data.AddRtAttr(nl.IFLA_BOND_ARP_INTERVAL, nl.Uint32Attr(uint32(bond.ArpInterval))) } if bond.ArpIpTargets != nil { - msg := nl.NewRtAttrChild(data, nl.IFLA_BOND_ARP_IP_TARGET, nil) + msg := data.AddRtAttr(nl.IFLA_BOND_ARP_IP_TARGET, nil) for i := range bond.ArpIpTargets { ip := bond.ArpIpTargets[i].To4() if ip != nil { - nl.NewRtAttrChild(msg, i, []byte(ip)) + msg.AddRtAttr(i, []byte(ip)) continue } ip = bond.ArpIpTargets[i].To16() if ip != nil { - nl.NewRtAttrChild(msg, i, []byte(ip)) + msg.AddRtAttr(i, []byte(ip)) } } } if bond.ArpValidate >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_ARP_VALIDATE, nl.Uint32Attr(uint32(bond.ArpValidate))) + data.AddRtAttr(nl.IFLA_BOND_ARP_VALIDATE, nl.Uint32Attr(uint32(bond.ArpValidate))) } if bond.ArpAllTargets >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_ARP_ALL_TARGETS, nl.Uint32Attr(uint32(bond.ArpAllTargets))) + data.AddRtAttr(nl.IFLA_BOND_ARP_ALL_TARGETS, nl.Uint32Attr(uint32(bond.ArpAllTargets))) } if bond.Primary >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_PRIMARY, nl.Uint32Attr(uint32(bond.Primary))) + data.AddRtAttr(nl.IFLA_BOND_PRIMARY, nl.Uint32Attr(uint32(bond.Primary))) } if bond.PrimaryReselect >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_PRIMARY_RESELECT, nl.Uint8Attr(uint8(bond.PrimaryReselect))) + data.AddRtAttr(nl.IFLA_BOND_PRIMARY_RESELECT, nl.Uint8Attr(uint8(bond.PrimaryReselect))) } if bond.FailOverMac >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_FAIL_OVER_MAC, nl.Uint8Attr(uint8(bond.FailOverMac))) + data.AddRtAttr(nl.IFLA_BOND_FAIL_OVER_MAC, nl.Uint8Attr(uint8(bond.FailOverMac))) } if bond.XmitHashPolicy >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_XMIT_HASH_POLICY, nl.Uint8Attr(uint8(bond.XmitHashPolicy))) + data.AddRtAttr(nl.IFLA_BOND_XMIT_HASH_POLICY, nl.Uint8Attr(uint8(bond.XmitHashPolicy))) } if bond.ResendIgmp >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_RESEND_IGMP, nl.Uint32Attr(uint32(bond.ResendIgmp))) + data.AddRtAttr(nl.IFLA_BOND_RESEND_IGMP, nl.Uint32Attr(uint32(bond.ResendIgmp))) } if bond.NumPeerNotif >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_NUM_PEER_NOTIF, nl.Uint8Attr(uint8(bond.NumPeerNotif))) + data.AddRtAttr(nl.IFLA_BOND_NUM_PEER_NOTIF, nl.Uint8Attr(uint8(bond.NumPeerNotif))) } if bond.AllSlavesActive >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_ALL_SLAVES_ACTIVE, nl.Uint8Attr(uint8(bond.AllSlavesActive))) + data.AddRtAttr(nl.IFLA_BOND_ALL_SLAVES_ACTIVE, nl.Uint8Attr(uint8(bond.AllSlavesActive))) } if bond.MinLinks >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_MIN_LINKS, nl.Uint32Attr(uint32(bond.MinLinks))) + data.AddRtAttr(nl.IFLA_BOND_MIN_LINKS, nl.Uint32Attr(uint32(bond.MinLinks))) } if bond.LpInterval >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_LP_INTERVAL, nl.Uint32Attr(uint32(bond.LpInterval))) + data.AddRtAttr(nl.IFLA_BOND_LP_INTERVAL, nl.Uint32Attr(uint32(bond.LpInterval))) } if bond.PackersPerSlave >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_PACKETS_PER_SLAVE, nl.Uint32Attr(uint32(bond.PackersPerSlave))) + data.AddRtAttr(nl.IFLA_BOND_PACKETS_PER_SLAVE, nl.Uint32Attr(uint32(bond.PackersPerSlave))) } if bond.LacpRate >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_AD_LACP_RATE, nl.Uint8Attr(uint8(bond.LacpRate))) + data.AddRtAttr(nl.IFLA_BOND_AD_LACP_RATE, nl.Uint8Attr(uint8(bond.LacpRate))) } if bond.AdSelect >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_AD_SELECT, nl.Uint8Attr(uint8(bond.AdSelect))) + data.AddRtAttr(nl.IFLA_BOND_AD_SELECT, nl.Uint8Attr(uint8(bond.AdSelect))) } if bond.AdActorSysPrio >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_AD_ACTOR_SYS_PRIO, nl.Uint16Attr(uint16(bond.AdActorSysPrio))) + data.AddRtAttr(nl.IFLA_BOND_AD_ACTOR_SYS_PRIO, nl.Uint16Attr(uint16(bond.AdActorSysPrio))) } if bond.AdUserPortKey >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_AD_USER_PORT_KEY, nl.Uint16Attr(uint16(bond.AdUserPortKey))) + data.AddRtAttr(nl.IFLA_BOND_AD_USER_PORT_KEY, nl.Uint16Attr(uint16(bond.AdUserPortKey))) } if bond.AdActorSystem != nil { - nl.NewRtAttrChild(data, nl.IFLA_BOND_AD_ACTOR_SYSTEM, []byte(bond.AdActorSystem)) + data.AddRtAttr(nl.IFLA_BOND_AD_ACTOR_SYSTEM, []byte(bond.AdActorSystem)) } if bond.TlbDynamicLb >= 0 { - nl.NewRtAttrChild(data, nl.IFLA_BOND_TLB_DYNAMIC_LB, nl.Uint8Attr(uint8(bond.TlbDynamicLb))) + data.AddRtAttr(nl.IFLA_BOND_TLB_DYNAMIC_LB, nl.Uint8Attr(uint8(bond.TlbDynamicLb))) } } @@ -853,7 +1042,7 @@ func LinkAdd(link Link) error { } // LinkAdd adds a new link device. The type and features of the device -// are taken fromt the parameters in the link object. +// are taken from the parameters in the link object. // Equivalent to: `ip link add $link` func (h *Handle) LinkAdd(link Link) error { return h.linkModify(link, unix.NLM_F_CREATE|unix.NLM_F_EXCL|unix.NLM_F_ACK) @@ -863,16 +1052,18 @@ func (h *Handle) linkModify(link Link, flags int) error { // TODO: support extra data for macvlan base := link.Attrs() - if base.Name == "" { - return fmt.Errorf("LinkAttrs.Name cannot be empty!") + // if tuntap, then the name can be empty, OS will provide a name + tuntap, isTuntap := link.(*Tuntap) + + if base.Name == "" && !isTuntap { + return fmt.Errorf("LinkAttrs.Name cannot be empty") } - if tuntap, ok := link.(*Tuntap); ok { + if isTuntap { // TODO: support user // TODO: support group - // TODO: support non- persistent if tuntap.Mode < unix.IFF_TUN || tuntap.Mode > unix.IFF_TAP { - return fmt.Errorf("Tuntap.Mode %v unknown!", tuntap.Mode) + return fmt.Errorf("Tuntap.Mode %v unknown", tuntap.Mode) } queues := tuntap.Queues @@ -913,12 +1104,25 @@ func (h *Handle) linkModify(link Link, flags int) error { cleanupFds(fds) return fmt.Errorf("Tuntap IOCTL TUNSETIFF failed [%d], errno %v", i, errno) } + // 1) we only care for the name of the first tap in the multi queue set + // 2) if the original name was empty, the localReq has now the actual name + // + // In addition: + // This ensures that the link name is always identical to what the kernel returns. + // Not only in case of an empty name, but also when using name templates. + // e.g. when the provided name is "tap%d", the kernel replaces %d with the next available number. + if i == 0 { + link.Attrs().Name = strings.Trim(string(localReq.Name[:]), "\x00") + } } - _, _, errno := unix.Syscall(unix.SYS_IOCTL, fds[0].Fd(), uintptr(unix.TUNSETPERSIST), 1) - if errno != 0 { - cleanupFds(fds) - return fmt.Errorf("Tuntap IOCTL TUNSETPERSIST failed, errno %v", errno) + // only persist interface if NonPersist is NOT set + if !tuntap.NonPersist { + _, _, errno := unix.Syscall(unix.SYS_IOCTL, fds[0].Fd(), uintptr(unix.TUNSETPERSIST), 1) + if errno != 0 { + cleanupFds(fds) + return fmt.Errorf("Tuntap IOCTL TUNSETPERSIST failed, errno %v", errno) + } } h.ensureIndex(base) @@ -928,7 +1132,11 @@ func (h *Handle) linkModify(link Link, flags int) error { // TODO: verify MasterIndex is actually a bridge? err := h.LinkSetMasterByIndex(link, base.MasterIndex) if err != nil { - _, _, _ = unix.Syscall(unix.SYS_IOCTL, fds[0].Fd(), uintptr(unix.TUNSETPERSIST), 0) + // un-persist (e.g. allow the interface to be removed) the tuntap + // should not hurt if not set prior, condition might be not needed + if !tuntap.NonPersist { + _, _, _ = unix.Syscall(unix.SYS_IOCTL, fds[0].Fd(), uintptr(unix.TUNSETPERSIST), 0) + } cleanupFds(fds) return err } @@ -978,8 +1186,8 @@ func (h *Handle) linkModify(link Link, flags int) error { native.PutUint32(b, uint32(base.ParentIndex)) data := nl.NewRtAttr(unix.IFLA_LINK, b) req.AddData(data) - } else if link.Type() == "ipvlan" { - return fmt.Errorf("Can't create ipvlan link without ParentIndex") + } else if link.Type() == "ipvlan" || link.Type() == "ipoib" { + return fmt.Errorf("Can't create %s link without ParentIndex", link.Type()) } nameData := nl.NewRtAttr(unix.IFLA_IFNAME, nl.ZeroTerminated(base.Name)) @@ -1010,14 +1218,29 @@ func (h *Handle) linkModify(link Link, flags int) error { req.AddData(rxqueues) } + if base.GSOMaxSegs > 0 { + gsoAttr := nl.NewRtAttr(unix.IFLA_GSO_MAX_SEGS, nl.Uint32Attr(base.GSOMaxSegs)) + req.AddData(gsoAttr) + } + + if base.GSOMaxSize > 0 { + gsoAttr := nl.NewRtAttr(unix.IFLA_GSO_MAX_SIZE, nl.Uint32Attr(base.GSOMaxSize)) + req.AddData(gsoAttr) + } + + if base.Group > 0 { + groupAttr := nl.NewRtAttr(unix.IFLA_GROUP, nl.Uint32Attr(base.Group)) + req.AddData(groupAttr) + } + if base.Namespace != nil { var attr *nl.RtAttr - switch base.Namespace.(type) { + switch ns := base.Namespace.(type) { case NsPid: - val := nl.Uint32Attr(uint32(base.Namespace.(NsPid))) + val := nl.Uint32Attr(uint32(ns)) attr = nl.NewRtAttr(unix.IFLA_NET_NS_PID, val) case NsFd: - val := nl.Uint32Attr(uint32(base.Namespace.(NsFd))) + val := nl.Uint32Attr(uint32(ns)) attr = nl.NewRtAttr(unix.IFLA_NET_NS_FD, val) } @@ -1029,47 +1252,56 @@ func (h *Handle) linkModify(link Link, flags int) error { } linkInfo := nl.NewRtAttr(unix.IFLA_LINKINFO, nil) - nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_KIND, nl.NonZeroTerminated(link.Type())) + linkInfo.AddRtAttr(nl.IFLA_INFO_KIND, nl.NonZeroTerminated(link.Type())) switch link := link.(type) { case *Vlan: b := make([]byte, 2) native.PutUint16(b, uint16(link.VlanId)) - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) - nl.NewRtAttrChild(data, nl.IFLA_VLAN_ID, b) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) + data.AddRtAttr(nl.IFLA_VLAN_ID, b) + + if link.VlanProtocol != VLAN_PROTOCOL_UNKNOWN { + data.AddRtAttr(nl.IFLA_VLAN_PROTOCOL, htons(uint16(link.VlanProtocol))) + } case *Veth: - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) - peer := nl.NewRtAttrChild(data, nl.VETH_INFO_PEER, nil) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) + peer := data.AddRtAttr(nl.VETH_INFO_PEER, nil) nl.NewIfInfomsgChild(peer, unix.AF_UNSPEC) - nl.NewRtAttrChild(peer, unix.IFLA_IFNAME, nl.ZeroTerminated(link.PeerName)) + peer.AddRtAttr(unix.IFLA_IFNAME, nl.ZeroTerminated(link.PeerName)) if base.TxQLen >= 0 { - nl.NewRtAttrChild(peer, unix.IFLA_TXQLEN, nl.Uint32Attr(uint32(base.TxQLen))) + peer.AddRtAttr(unix.IFLA_TXQLEN, nl.Uint32Attr(uint32(base.TxQLen))) } if base.MTU > 0 { - nl.NewRtAttrChild(peer, unix.IFLA_MTU, nl.Uint32Attr(uint32(base.MTU))) + peer.AddRtAttr(unix.IFLA_MTU, nl.Uint32Attr(uint32(base.MTU))) + } + if link.PeerHardwareAddr != nil { + peer.AddRtAttr(unix.IFLA_ADDRESS, []byte(link.PeerHardwareAddr)) } - case *Vxlan: addVxlanAttrs(link, linkInfo) case *Bond: addBondAttrs(link, linkInfo) case *IPVlan: - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) - nl.NewRtAttrChild(data, nl.IFLA_IPVLAN_MODE, nl.Uint16Attr(uint16(link.Mode))) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) + data.AddRtAttr(nl.IFLA_IPVLAN_MODE, nl.Uint16Attr(uint16(link.Mode))) + data.AddRtAttr(nl.IFLA_IPVLAN_FLAG, nl.Uint16Attr(uint16(link.Flag))) case *Macvlan: if link.Mode != MACVLAN_MODE_DEFAULT { - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) - nl.NewRtAttrChild(data, nl.IFLA_MACVLAN_MODE, nl.Uint32Attr(macvlanModes[link.Mode])) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) + data.AddRtAttr(nl.IFLA_MACVLAN_MODE, nl.Uint32Attr(macvlanModes[link.Mode])) } case *Macvtap: if link.Mode != MACVLAN_MODE_DEFAULT { - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) - nl.NewRtAttrChild(data, nl.IFLA_MACVLAN_MODE, nl.Uint32Attr(macvlanModes[link.Mode])) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) + data.AddRtAttr(nl.IFLA_MACVLAN_MODE, nl.Uint32Attr(macvlanModes[link.Mode])) } case *Gretap: addGretapAttrs(link, linkInfo) case *Iptun: addIptunAttrs(link, linkInfo) + case *Ip6tnl: + addIp6tnlAttrs(link, linkInfo) case *Sittun: addSittunAttrs(link, linkInfo) case *Gretun: @@ -1082,6 +1314,10 @@ func (h *Handle) linkModify(link Link, flags int) error { addBridgeAttrs(link, linkInfo) case *GTP: addGTPAttrs(link, linkInfo) + case *Xfrmi: + addXfrmiAttrs(link, linkInfo) + case *IPoIB: + addIPoIBAttrs(link, linkInfo) } req.AddData(linkInfo) @@ -1170,6 +1406,9 @@ func (h *Handle) LinkByName(name string) (Link, error) { msg := nl.NewIfInfomsg(unix.AF_UNSPEC) req.AddData(msg) + attr := nl.NewRtAttr(unix.IFLA_EXT_MASK, nl.Uint32Attr(nl.RTEXT_FILTER_VF)) + req.AddData(attr) + nameData := nl.NewRtAttr(unix.IFLA_IFNAME, nl.ZeroTerminated(name)) req.AddData(nameData) @@ -1202,6 +1441,9 @@ func (h *Handle) LinkByAlias(alias string) (Link, error) { msg := nl.NewIfInfomsg(unix.AF_UNSPEC) req.AddData(msg) + attr := nl.NewRtAttr(unix.IFLA_EXT_MASK, nl.Uint32Attr(nl.RTEXT_FILTER_VF)) + req.AddData(attr) + nameData := nl.NewRtAttr(unix.IFLA_IFALIAS, nl.ZeroTerminated(alias)) req.AddData(nameData) @@ -1228,6 +1470,8 @@ func (h *Handle) LinkByIndex(index int) (Link, error) { msg := nl.NewIfInfomsg(unix.AF_UNSPEC) msg.Index = int32(index) req.AddData(msg) + attr := nl.NewRtAttr(unix.IFLA_EXT_MASK, nl.Uint32Attr(nl.RTEXT_FILTER_VF)) + req.AddData(attr) return execGetLink(req) } @@ -1270,10 +1514,12 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) { base.Promisc = 1 } var ( - link Link - stats32 []byte - stats64 []byte - linkType string + link Link + stats32 *LinkStatistics32 + stats64 *LinkStatistics64 + linkType string + linkSlave LinkSlave + slaveType string ) for _, attr := range attrs { switch attr.Attr.Type { @@ -1313,18 +1559,26 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) { link = &Gretap{} case "ipip": link = &Iptun{} + case "ip6tnl": + link = &Ip6tnl{} case "sit": link = &Sittun{} case "gre": link = &Gretun{} case "ip6gre": link = &Gretun{} - case "vti": + case "vti", "vti6": link = &Vti{} case "vrf": link = &Vrf{} case "gtp": link = >P{} + case "xfrm": + link = &Xfrmi{} + case "tun": + link = &Tuntap{} + case "ipoib": + link = &IPoIB{} default: link = &GenericLink{LinkType: linkType} } @@ -1352,13 +1606,15 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) { parseGretapData(link, data) case "ipip": parseIptunData(link, data) + case "ip6tnl": + parseIp6tnlData(link, data) case "sit": parseSittunData(link, data) case "gre": parseGretunData(link, data) case "ip6gre": parseGretunData(link, data) - case "vti": + case "vti", "vti6": parseVtiData(link, data) case "vrf": parseVrfData(link, data) @@ -1366,6 +1622,27 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) { parseBridgeData(link, data) case "gtp": parseGTPData(link, data) + case "xfrm": + parseXfrmiData(link, data) + case "tun": + parseTuntapData(link, data) + case "ipoib": + parseIPoIBData(link, data) + } + case nl.IFLA_INFO_SLAVE_KIND: + slaveType = string(info.Value[:len(info.Value)-1]) + switch slaveType { + case "bond": + linkSlave = &BondSlave{} + } + case nl.IFLA_INFO_SLAVE_DATA: + switch slaveType { + case "bond": + data, err := nl.ParseRouteAttr(info.Value) + if err != nil { + return nil, err + } + parseBondSlaveData(linkSlave, data) } } } @@ -1392,9 +1669,15 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) { case unix.IFLA_IFALIAS: base.Alias = string(attr.Value[:len(attr.Value)-1]) case unix.IFLA_STATS: - stats32 = attr.Value[:] + stats32 = new(LinkStatistics32) + if err := binary.Read(bytes.NewBuffer(attr.Value[:]), nl.NativeEndian(), stats32); err != nil { + return nil, err + } case unix.IFLA_STATS64: - stats64 = attr.Value[:] + stats64 = new(LinkStatistics64) + if err := binary.Read(bytes.NewBuffer(attr.Value[:]), nl.NativeEndian(), stats64); err != nil { + return nil, err + } case unix.IFLA_XDP: xdp, err := parseLinkXdp(attr.Value[:]) if err != nil { @@ -1408,19 +1691,40 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) { if err != nil { return nil, err } - base.Protinfo = parseProtinfo(attrs) + protinfo := parseProtinfo(attrs) + base.Protinfo = &protinfo } case unix.IFLA_OPERSTATE: base.OperState = LinkOperState(uint8(attr.Value[0])) case unix.IFLA_LINK_NETNSID: base.NetNsID = int(native.Uint32(attr.Value[0:4])) + case unix.IFLA_GSO_MAX_SIZE: + base.GSOMaxSize = native.Uint32(attr.Value[0:4]) + case unix.IFLA_GSO_MAX_SEGS: + base.GSOMaxSegs = native.Uint32(attr.Value[0:4]) + case unix.IFLA_VFINFO_LIST: + data, err := nl.ParseRouteAttr(attr.Value) + if err != nil { + return nil, err + } + vfs, err := parseVfInfoList(data) + if err != nil { + return nil, err + } + base.Vfs = vfs + case unix.IFLA_NUM_TX_QUEUES: + base.NumTxQueues = int(native.Uint32(attr.Value[0:4])) + case unix.IFLA_NUM_RX_QUEUES: + base.NumRxQueues = int(native.Uint32(attr.Value[0:4])) + case unix.IFLA_GROUP: + base.Group = native.Uint32(attr.Value[0:4]) } } if stats64 != nil { - base.Statistics = parseLinkStats64(stats64) + base.Statistics = (*LinkStatistics)(stats64) } else if stats32 != nil { - base.Statistics = parseLinkStats32(stats32) + base.Statistics = (*LinkStatistics)(stats32.to64()) } // Links that don't have IFLA_INFO_KIND are hardware devices @@ -1428,10 +1732,59 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) { link = &Device{} } *link.Attrs() = base + link.Attrs().Slave = linkSlave + + // If the tuntap attributes are not updated by netlink due to + // an older driver, use sysfs + if link != nil && linkType == "tun" { + tuntap := link.(*Tuntap) + + if tuntap.Mode == 0 { + ifname := tuntap.Attrs().Name + if flags, err := readSysPropAsInt64(ifname, "tun_flags"); err == nil { + + if flags&unix.IFF_TUN != 0 { + tuntap.Mode = unix.IFF_TUN + } else if flags&unix.IFF_TAP != 0 { + tuntap.Mode = unix.IFF_TAP + } + + tuntap.NonPersist = false + if flags&unix.IFF_PERSIST == 0 { + tuntap.NonPersist = true + } + } + + // The sysfs interface for owner/group returns -1 for root user, instead of returning 0. + // So explicitly check for negative value, before assigning the owner uid/gid. + if owner, err := readSysPropAsInt64(ifname, "owner"); err == nil && owner > 0 { + tuntap.Owner = uint32(owner) + } + + if group, err := readSysPropAsInt64(ifname, "group"); err == nil && group > 0 { + tuntap.Group = uint32(group) + } + } + } return link, nil } +func readSysPropAsInt64(ifname, prop string) (int64, error) { + fname := fmt.Sprintf("/sys/class/net/%s/%s", ifname, prop) + contents, err := ioutil.ReadFile(fname) + if err != nil { + return 0, err + } + + num, err := strconv.ParseInt(strings.TrimSpace(string(contents)), 0, 64) + if err == nil { + return num, nil + } + + return 0, err +} + // LinkList gets a list of link devices. // Equivalent to: `ip link show` func LinkList() ([]Link, error) { @@ -1447,6 +1800,8 @@ func (h *Handle) LinkList() ([]Link, error) { msg := nl.NewIfInfomsg(unix.AF_UNSPEC) req.AddData(msg) + attr := nl.NewRtAttr(unix.IFLA_EXT_MASK, nl.Uint32Attr(nl.RTEXT_FILTER_VF)) + req.AddData(attr) msgs, err := req.Execute(unix.NETLINK_ROUTE, unix.RTM_NEWLINK) if err != nil { @@ -1526,13 +1881,19 @@ func linkSubscribeAt(newNs, curNs netns.NsHandle, ch chan<- LinkUpdate, done <-c go func() { defer close(ch) for { - msgs, err := s.Receive() + msgs, from, err := s.Receive() if err != nil { if cberr != nil { cberr(err) } return } + if from.Pid != nl.PidKernel { + if cberr != nil { + cberr(fmt.Errorf("Wrong sender portid %d, expected %d", from.Pid, nl.PidKernel)) + } + continue + } for _, m := range msgs { if m.Header.Type == unix.NLMSG_DONE { continue @@ -1639,7 +2000,7 @@ func (h *Handle) setProtinfoAttr(link Link, mode bool, attr int) error { req.AddData(msg) br := nl.NewRtAttr(unix.IFLA_PROTINFO|unix.NLA_F_NESTED, nil) - nl.NewRtAttrChild(br, attr, boolToByte(mode)) + br.AddRtAttr(attr, boolToByte(mode)) req.AddData(br) _, err := req.Execute(unix.NETLINK_ROUTE, 0) if err != nil { @@ -1675,12 +2036,43 @@ func (h *Handle) LinkSetTxQLen(link Link, qlen int) error { return err } +// LinkSetGroup sets the link group id which can be used to perform mass actions +// with iproute2 as well use it as a reference in nft filters. +// Equivalent to: `ip link set $link group $id` +func LinkSetGroup(link Link, group int) error { + return pkgHandle.LinkSetGroup(link, group) +} + +// LinkSetGroup sets the link group id which can be used to perform mass actions +// with iproute2 as well use it as a reference in nft filters. +// Equivalent to: `ip link set $link group $id` +func (h *Handle) LinkSetGroup(link Link, group int) error { + base := link.Attrs() + h.ensureIndex(base) + req := h.newNetlinkRequest(unix.RTM_SETLINK, unix.NLM_F_ACK) + + msg := nl.NewIfInfomsg(unix.AF_UNSPEC) + msg.Index = int32(base.Index) + req.AddData(msg) + + b := make([]byte, 4) + native.PutUint32(b, uint32(group)) + + data := nl.NewRtAttr(unix.IFLA_GROUP, b) + req.AddData(data) + + _, err := req.Execute(unix.NETLINK_ROUTE, 0) + return err +} + func parseVlanData(link Link, data []syscall.NetlinkRouteAttr) { vlan := link.(*Vlan) for _, datum := range data { switch datum.Attr.Type { case nl.IFLA_VLAN_ID: vlan.VlanId = int(native.Uint16(datum.Value[0:2])) + case nl.IFLA_VLAN_PROTOCOL: + vlan.VlanProtocol = VlanProtocol(int(ntohs(datum.Value[0:2]))) } } } @@ -1762,7 +2154,7 @@ func parseBondData(link Link, data []syscall.NetlinkRouteAttr) { case nl.IFLA_BOND_ARP_INTERVAL: bond.ArpInterval = int(native.Uint32(data[i].Value[0:4])) case nl.IFLA_BOND_ARP_IP_TARGET: - // TODO: implement + bond.ArpIpTargets = parseBondArpIpTargets(data[i].Value) case nl.IFLA_BOND_ARP_VALIDATE: bond.ArpValidate = BondArpValidate(native.Uint32(data[i].Value[0:4])) case nl.IFLA_BOND_ARP_ALL_TARGETS: @@ -1805,12 +2197,75 @@ func parseBondData(link Link, data []syscall.NetlinkRouteAttr) { } } +func parseBondArpIpTargets(value []byte) []net.IP { + data, err := nl.ParseRouteAttr(value) + if err != nil { + return nil + } + + targets := []net.IP{} + for i := range data { + target := net.IP(data[i].Value) + if ip := target.To4(); ip != nil { + targets = append(targets, ip) + continue + } + if ip := target.To16(); ip != nil { + targets = append(targets, ip) + } + } + + return targets +} + +func addBondSlaveAttrs(bondSlave *BondSlave, linkInfo *nl.RtAttr) { + data := linkInfo.AddRtAttr(nl.IFLA_INFO_SLAVE_DATA, nil) + + data.AddRtAttr(nl.IFLA_BOND_SLAVE_STATE, nl.Uint8Attr(uint8(bondSlave.State))) + data.AddRtAttr(nl.IFLA_BOND_SLAVE_MII_STATUS, nl.Uint8Attr(uint8(bondSlave.MiiStatus))) + data.AddRtAttr(nl.IFLA_BOND_SLAVE_LINK_FAILURE_COUNT, nl.Uint32Attr(bondSlave.LinkFailureCount)) + data.AddRtAttr(nl.IFLA_BOND_SLAVE_QUEUE_ID, nl.Uint16Attr(bondSlave.QueueId)) + data.AddRtAttr(nl.IFLA_BOND_SLAVE_AD_AGGREGATOR_ID, nl.Uint16Attr(bondSlave.AggregatorId)) + data.AddRtAttr(nl.IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE, nl.Uint8Attr(bondSlave.AdActorOperPortState)) + data.AddRtAttr(nl.IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE, nl.Uint16Attr(bondSlave.AdPartnerOperPortState)) + + if mac := bondSlave.PermHardwareAddr; mac != nil { + data.AddRtAttr(nl.IFLA_BOND_SLAVE_PERM_HWADDR, []byte(mac)) + } +} + +func parseBondSlaveData(slave LinkSlave, data []syscall.NetlinkRouteAttr) { + bondSlave := slave.(*BondSlave) + for i := range data { + switch data[i].Attr.Type { + case nl.IFLA_BOND_SLAVE_STATE: + bondSlave.State = BondSlaveState(data[i].Value[0]) + case nl.IFLA_BOND_SLAVE_MII_STATUS: + bondSlave.MiiStatus = BondSlaveMiiStatus(data[i].Value[0]) + case nl.IFLA_BOND_SLAVE_LINK_FAILURE_COUNT: + bondSlave.LinkFailureCount = native.Uint32(data[i].Value[0:4]) + case nl.IFLA_BOND_SLAVE_PERM_HWADDR: + bondSlave.PermHardwareAddr = net.HardwareAddr(data[i].Value[0:6]) + case nl.IFLA_BOND_SLAVE_QUEUE_ID: + bondSlave.QueueId = native.Uint16(data[i].Value[0:2]) + case nl.IFLA_BOND_SLAVE_AD_AGGREGATOR_ID: + bondSlave.AggregatorId = native.Uint16(data[i].Value[0:2]) + case nl.IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE: + bondSlave.AdActorOperPortState = uint8(data[i].Value[0]) + case nl.IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE: + bondSlave.AdPartnerOperPortState = native.Uint16(data[i].Value[0:2]) + } + } +} + func parseIPVlanData(link Link, data []syscall.NetlinkRouteAttr) { ipv := link.(*IPVlan) for _, datum := range data { - if datum.Attr.Type == nl.IFLA_IPVLAN_MODE { + switch datum.Attr.Type { + case nl.IFLA_IPVLAN_MODE: ipv.Mode = IPVlanMode(native.Uint32(datum.Value[0:4])) - return + case nl.IFLA_IPVLAN_FLAG: + ipv.Flag = IPVlanFlag(native.Uint32(datum.Value[0:4])) } } } @@ -1873,11 +2328,11 @@ func linkFlags(rawFlags uint32) net.Flags { } func addGretapAttrs(gretap *Gretap, linkInfo *nl.RtAttr) { - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) if gretap.FlowBased { // In flow based mode, no other attributes need to be configured - nl.NewRtAttrChild(data, nl.IFLA_GRE_COLLECT_METADATA, boolAttr(gretap.FlowBased)) + data.AddRtAttr(nl.IFLA_GRE_COLLECT_METADATA, boolAttr(gretap.FlowBased)) return } @@ -1885,40 +2340,40 @@ func addGretapAttrs(gretap *Gretap, linkInfo *nl.RtAttr) { if ip.To4() != nil { ip = ip.To4() } - nl.NewRtAttrChild(data, nl.IFLA_GRE_LOCAL, []byte(ip)) + data.AddRtAttr(nl.IFLA_GRE_LOCAL, []byte(ip)) } if ip := gretap.Remote; ip != nil { if ip.To4() != nil { ip = ip.To4() } - nl.NewRtAttrChild(data, nl.IFLA_GRE_REMOTE, []byte(ip)) + data.AddRtAttr(nl.IFLA_GRE_REMOTE, []byte(ip)) } if gretap.IKey != 0 { - nl.NewRtAttrChild(data, nl.IFLA_GRE_IKEY, htonl(gretap.IKey)) + data.AddRtAttr(nl.IFLA_GRE_IKEY, htonl(gretap.IKey)) gretap.IFlags |= uint16(nl.GRE_KEY) } if gretap.OKey != 0 { - nl.NewRtAttrChild(data, nl.IFLA_GRE_OKEY, htonl(gretap.OKey)) + data.AddRtAttr(nl.IFLA_GRE_OKEY, htonl(gretap.OKey)) gretap.OFlags |= uint16(nl.GRE_KEY) } - nl.NewRtAttrChild(data, nl.IFLA_GRE_IFLAGS, htons(gretap.IFlags)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_OFLAGS, htons(gretap.OFlags)) + data.AddRtAttr(nl.IFLA_GRE_IFLAGS, htons(gretap.IFlags)) + data.AddRtAttr(nl.IFLA_GRE_OFLAGS, htons(gretap.OFlags)) if gretap.Link != 0 { - nl.NewRtAttrChild(data, nl.IFLA_GRE_LINK, nl.Uint32Attr(gretap.Link)) + data.AddRtAttr(nl.IFLA_GRE_LINK, nl.Uint32Attr(gretap.Link)) } - nl.NewRtAttrChild(data, nl.IFLA_GRE_PMTUDISC, nl.Uint8Attr(gretap.PMtuDisc)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_TTL, nl.Uint8Attr(gretap.Ttl)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_TOS, nl.Uint8Attr(gretap.Tos)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_ENCAP_TYPE, nl.Uint16Attr(gretap.EncapType)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_ENCAP_FLAGS, nl.Uint16Attr(gretap.EncapFlags)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_ENCAP_SPORT, htons(gretap.EncapSport)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_ENCAP_DPORT, htons(gretap.EncapDport)) + data.AddRtAttr(nl.IFLA_GRE_PMTUDISC, nl.Uint8Attr(gretap.PMtuDisc)) + data.AddRtAttr(nl.IFLA_GRE_TTL, nl.Uint8Attr(gretap.Ttl)) + data.AddRtAttr(nl.IFLA_GRE_TOS, nl.Uint8Attr(gretap.Tos)) + data.AddRtAttr(nl.IFLA_GRE_ENCAP_TYPE, nl.Uint16Attr(gretap.EncapType)) + data.AddRtAttr(nl.IFLA_GRE_ENCAP_FLAGS, nl.Uint16Attr(gretap.EncapFlags)) + data.AddRtAttr(nl.IFLA_GRE_ENCAP_SPORT, htons(gretap.EncapSport)) + data.AddRtAttr(nl.IFLA_GRE_ENCAP_DPORT, htons(gretap.EncapDport)) } func parseGretapData(link Link, data []syscall.NetlinkRouteAttr) { @@ -1930,9 +2385,9 @@ func parseGretapData(link Link, data []syscall.NetlinkRouteAttr) { case nl.IFLA_GRE_IKEY: gre.OKey = ntohl(datum.Value[0:4]) case nl.IFLA_GRE_LOCAL: - gre.Local = net.IP(datum.Value[0:16]) + gre.Local = net.IP(datum.Value) case nl.IFLA_GRE_REMOTE: - gre.Remote = net.IP(datum.Value[0:16]) + gre.Remote = net.IP(datum.Value) case nl.IFLA_GRE_ENCAP_SPORT: gre.EncapSport = ntohs(datum.Value[0:2]) case nl.IFLA_GRE_ENCAP_DPORT: @@ -1941,7 +2396,6 @@ func parseGretapData(link Link, data []syscall.NetlinkRouteAttr) { gre.IFlags = ntohs(datum.Value[0:2]) case nl.IFLA_GRE_OFLAGS: gre.OFlags = ntohs(datum.Value[0:2]) - case nl.IFLA_GRE_TTL: gre.Ttl = uint8(datum.Value[0]) case nl.IFLA_GRE_TOS: @@ -1953,73 +2407,70 @@ func parseGretapData(link Link, data []syscall.NetlinkRouteAttr) { case nl.IFLA_GRE_ENCAP_FLAGS: gre.EncapFlags = native.Uint16(datum.Value[0:2]) case nl.IFLA_GRE_COLLECT_METADATA: - if len(datum.Value) > 0 { - gre.FlowBased = int8(datum.Value[0]) != 0 - } + gre.FlowBased = true } } } func addGretunAttrs(gre *Gretun, linkInfo *nl.RtAttr) { - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) if ip := gre.Local; ip != nil { if ip.To4() != nil { ip = ip.To4() } - nl.NewRtAttrChild(data, nl.IFLA_GRE_LOCAL, []byte(ip)) + data.AddRtAttr(nl.IFLA_GRE_LOCAL, []byte(ip)) } if ip := gre.Remote; ip != nil { if ip.To4() != nil { ip = ip.To4() } - nl.NewRtAttrChild(data, nl.IFLA_GRE_REMOTE, []byte(ip)) + data.AddRtAttr(nl.IFLA_GRE_REMOTE, []byte(ip)) } if gre.IKey != 0 { - nl.NewRtAttrChild(data, nl.IFLA_GRE_IKEY, htonl(gre.IKey)) + data.AddRtAttr(nl.IFLA_GRE_IKEY, htonl(gre.IKey)) gre.IFlags |= uint16(nl.GRE_KEY) } if gre.OKey != 0 { - nl.NewRtAttrChild(data, nl.IFLA_GRE_OKEY, htonl(gre.OKey)) + data.AddRtAttr(nl.IFLA_GRE_OKEY, htonl(gre.OKey)) gre.OFlags |= uint16(nl.GRE_KEY) } - nl.NewRtAttrChild(data, nl.IFLA_GRE_IFLAGS, htons(gre.IFlags)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_OFLAGS, htons(gre.OFlags)) + data.AddRtAttr(nl.IFLA_GRE_IFLAGS, htons(gre.IFlags)) + data.AddRtAttr(nl.IFLA_GRE_OFLAGS, htons(gre.OFlags)) if gre.Link != 0 { - nl.NewRtAttrChild(data, nl.IFLA_GRE_LINK, nl.Uint32Attr(gre.Link)) + data.AddRtAttr(nl.IFLA_GRE_LINK, nl.Uint32Attr(gre.Link)) } - nl.NewRtAttrChild(data, nl.IFLA_GRE_PMTUDISC, nl.Uint8Attr(gre.PMtuDisc)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_TTL, nl.Uint8Attr(gre.Ttl)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_TOS, nl.Uint8Attr(gre.Tos)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_ENCAP_TYPE, nl.Uint16Attr(gre.EncapType)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_ENCAP_FLAGS, nl.Uint16Attr(gre.EncapFlags)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_ENCAP_SPORT, htons(gre.EncapSport)) - nl.NewRtAttrChild(data, nl.IFLA_GRE_ENCAP_DPORT, htons(gre.EncapDport)) + data.AddRtAttr(nl.IFLA_GRE_PMTUDISC, nl.Uint8Attr(gre.PMtuDisc)) + data.AddRtAttr(nl.IFLA_GRE_TTL, nl.Uint8Attr(gre.Ttl)) + data.AddRtAttr(nl.IFLA_GRE_TOS, nl.Uint8Attr(gre.Tos)) + data.AddRtAttr(nl.IFLA_GRE_ENCAP_TYPE, nl.Uint16Attr(gre.EncapType)) + data.AddRtAttr(nl.IFLA_GRE_ENCAP_FLAGS, nl.Uint16Attr(gre.EncapFlags)) + data.AddRtAttr(nl.IFLA_GRE_ENCAP_SPORT, htons(gre.EncapSport)) + data.AddRtAttr(nl.IFLA_GRE_ENCAP_DPORT, htons(gre.EncapDport)) } func parseGretunData(link Link, data []syscall.NetlinkRouteAttr) { gre := link.(*Gretun) for _, datum := range data { switch datum.Attr.Type { - case nl.IFLA_GRE_OKEY: - gre.IKey = ntohl(datum.Value[0:4]) case nl.IFLA_GRE_IKEY: + gre.IKey = ntohl(datum.Value[0:4]) + case nl.IFLA_GRE_OKEY: gre.OKey = ntohl(datum.Value[0:4]) case nl.IFLA_GRE_LOCAL: - gre.Local = net.IP(datum.Value[0:16]) + gre.Local = net.IP(datum.Value) case nl.IFLA_GRE_REMOTE: - gre.Remote = net.IP(datum.Value[0:16]) + gre.Remote = net.IP(datum.Value) case nl.IFLA_GRE_IFLAGS: gre.IFlags = ntohs(datum.Value[0:2]) case nl.IFLA_GRE_OFLAGS: gre.OFlags = ntohs(datum.Value[0:2]) - case nl.IFLA_GRE_TTL: gre.Ttl = uint8(datum.Value[0]) case nl.IFLA_GRE_TOS: @@ -2038,23 +2489,15 @@ func parseGretunData(link Link, data []syscall.NetlinkRouteAttr) { } } -func parseLinkStats32(data []byte) *LinkStatistics { - return (*LinkStatistics)((*LinkStatistics32)(unsafe.Pointer(&data[0:SizeofLinkStats32][0])).to64()) -} - -func parseLinkStats64(data []byte) *LinkStatistics { - return (*LinkStatistics)((*LinkStatistics64)(unsafe.Pointer(&data[0:SizeofLinkStats64][0]))) -} - func addXdpAttrs(xdp *LinkXdp, req *nl.NetlinkRequest) { attrs := nl.NewRtAttr(unix.IFLA_XDP|unix.NLA_F_NESTED, nil) b := make([]byte, 4) native.PutUint32(b, uint32(xdp.Fd)) - nl.NewRtAttrChild(attrs, nl.IFLA_XDP_FD, b) + attrs.AddRtAttr(nl.IFLA_XDP_FD, b) if xdp.Flags != 0 { b := make([]byte, 4) native.PutUint32(b, xdp.Flags) - nl.NewRtAttrChild(attrs, nl.IFLA_XDP_FLAGS, b) + attrs.AddRtAttr(nl.IFLA_XDP_FLAGS, b) } req.AddData(attrs) } @@ -2083,32 +2526,32 @@ func parseLinkXdp(data []byte) (*LinkXdp, error) { func addIptunAttrs(iptun *Iptun, linkInfo *nl.RtAttr) { if iptun.FlowBased { // In flow based mode, no other attributes need to be configured - nl.NewRtAttrChild(linkInfo, nl.IFLA_IPTUN_COLLECT_METADATA, boolAttr(iptun.FlowBased)) + linkInfo.AddRtAttr(nl.IFLA_IPTUN_COLLECT_METADATA, boolAttr(iptun.FlowBased)) return } - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) ip := iptun.Local.To4() if ip != nil { - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_LOCAL, []byte(ip)) + data.AddRtAttr(nl.IFLA_IPTUN_LOCAL, []byte(ip)) } ip = iptun.Remote.To4() if ip != nil { - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_REMOTE, []byte(ip)) + data.AddRtAttr(nl.IFLA_IPTUN_REMOTE, []byte(ip)) } if iptun.Link != 0 { - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_LINK, nl.Uint32Attr(iptun.Link)) + data.AddRtAttr(nl.IFLA_IPTUN_LINK, nl.Uint32Attr(iptun.Link)) } - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_PMTUDISC, nl.Uint8Attr(iptun.PMtuDisc)) - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_TTL, nl.Uint8Attr(iptun.Ttl)) - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_TOS, nl.Uint8Attr(iptun.Tos)) - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_ENCAP_TYPE, nl.Uint16Attr(iptun.EncapType)) - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_ENCAP_FLAGS, nl.Uint16Attr(iptun.EncapFlags)) - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_ENCAP_SPORT, htons(iptun.EncapSport)) - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_ENCAP_DPORT, htons(iptun.EncapDport)) + data.AddRtAttr(nl.IFLA_IPTUN_PMTUDISC, nl.Uint8Attr(iptun.PMtuDisc)) + data.AddRtAttr(nl.IFLA_IPTUN_TTL, nl.Uint8Attr(iptun.Ttl)) + data.AddRtAttr(nl.IFLA_IPTUN_TOS, nl.Uint8Attr(iptun.Tos)) + data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_TYPE, nl.Uint16Attr(iptun.EncapType)) + data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_FLAGS, nl.Uint16Attr(iptun.EncapFlags)) + data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_SPORT, htons(iptun.EncapSport)) + data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_DPORT, htons(iptun.EncapDport)) } func parseIptunData(link Link, data []syscall.NetlinkRouteAttr) { @@ -2139,34 +2582,83 @@ func parseIptunData(link Link, data []syscall.NetlinkRouteAttr) { } } +func addIp6tnlAttrs(ip6tnl *Ip6tnl, linkInfo *nl.RtAttr) { + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) + + if ip6tnl.Link != 0 { + data.AddRtAttr(nl.IFLA_IPTUN_LINK, nl.Uint32Attr(ip6tnl.Link)) + } + + ip := ip6tnl.Local.To16() + if ip != nil { + data.AddRtAttr(nl.IFLA_IPTUN_LOCAL, []byte(ip)) + } + + ip = ip6tnl.Remote.To16() + if ip != nil { + data.AddRtAttr(nl.IFLA_IPTUN_REMOTE, []byte(ip)) + } + + data.AddRtAttr(nl.IFLA_IPTUN_TTL, nl.Uint8Attr(ip6tnl.Ttl)) + data.AddRtAttr(nl.IFLA_IPTUN_TOS, nl.Uint8Attr(ip6tnl.Tos)) + data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_LIMIT, nl.Uint8Attr(ip6tnl.EncapLimit)) + data.AddRtAttr(nl.IFLA_IPTUN_FLAGS, nl.Uint32Attr(ip6tnl.Flags)) + data.AddRtAttr(nl.IFLA_IPTUN_PROTO, nl.Uint8Attr(ip6tnl.Proto)) + data.AddRtAttr(nl.IFLA_IPTUN_FLOWINFO, nl.Uint32Attr(ip6tnl.FlowInfo)) +} + +func parseIp6tnlData(link Link, data []syscall.NetlinkRouteAttr) { + ip6tnl := link.(*Ip6tnl) + for _, datum := range data { + switch datum.Attr.Type { + case nl.IFLA_IPTUN_LOCAL: + ip6tnl.Local = net.IP(datum.Value[:16]) + case nl.IFLA_IPTUN_REMOTE: + ip6tnl.Remote = net.IP(datum.Value[:16]) + case nl.IFLA_IPTUN_TTL: + ip6tnl.Ttl = uint8(datum.Value[0]) + case nl.IFLA_IPTUN_TOS: + ip6tnl.Tos = uint8(datum.Value[0]) + case nl.IFLA_IPTUN_ENCAP_LIMIT: + ip6tnl.EncapLimit = uint8(datum.Value[0]) + case nl.IFLA_IPTUN_FLAGS: + ip6tnl.Flags = native.Uint32(datum.Value[:4]) + case nl.IFLA_IPTUN_PROTO: + ip6tnl.Proto = uint8(datum.Value[0]) + case nl.IFLA_IPTUN_FLOWINFO: + ip6tnl.FlowInfo = native.Uint32(datum.Value[:4]) + } + } +} + func addSittunAttrs(sittun *Sittun, linkInfo *nl.RtAttr) { - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) if sittun.Link != 0 { - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_LINK, nl.Uint32Attr(sittun.Link)) + data.AddRtAttr(nl.IFLA_IPTUN_LINK, nl.Uint32Attr(sittun.Link)) } ip := sittun.Local.To4() if ip != nil { - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_LOCAL, []byte(ip)) + data.AddRtAttr(nl.IFLA_IPTUN_LOCAL, []byte(ip)) } ip = sittun.Remote.To4() if ip != nil { - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_REMOTE, []byte(ip)) + data.AddRtAttr(nl.IFLA_IPTUN_REMOTE, []byte(ip)) } if sittun.Ttl > 0 { // Would otherwise fail on 3.10 kernel - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_TTL, nl.Uint8Attr(sittun.Ttl)) + data.AddRtAttr(nl.IFLA_IPTUN_TTL, nl.Uint8Attr(sittun.Ttl)) } - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_TOS, nl.Uint8Attr(sittun.Tos)) - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_PMTUDISC, nl.Uint8Attr(sittun.PMtuDisc)) - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_ENCAP_TYPE, nl.Uint16Attr(sittun.EncapType)) - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_ENCAP_FLAGS, nl.Uint16Attr(sittun.EncapFlags)) - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_ENCAP_SPORT, htons(sittun.EncapSport)) - nl.NewRtAttrChild(data, nl.IFLA_IPTUN_ENCAP_DPORT, htons(sittun.EncapDport)) + data.AddRtAttr(nl.IFLA_IPTUN_TOS, nl.Uint8Attr(sittun.Tos)) + data.AddRtAttr(nl.IFLA_IPTUN_PMTUDISC, nl.Uint8Attr(sittun.PMtuDisc)) + data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_TYPE, nl.Uint16Attr(sittun.EncapType)) + data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_FLAGS, nl.Uint16Attr(sittun.EncapFlags)) + data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_SPORT, htons(sittun.EncapSport)) + data.AddRtAttr(nl.IFLA_IPTUN_ENCAP_DPORT, htons(sittun.EncapDport)) } func parseSittunData(link Link, data []syscall.NetlinkRouteAttr) { @@ -2196,24 +2688,39 @@ func parseSittunData(link Link, data []syscall.NetlinkRouteAttr) { } func addVtiAttrs(vti *Vti, linkInfo *nl.RtAttr) { - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) - ip := vti.Local.To4() - if ip != nil { - nl.NewRtAttrChild(data, nl.IFLA_VTI_LOCAL, []byte(ip)) + family := FAMILY_V4 + if vti.Local.To4() == nil { + family = FAMILY_V6 } - ip = vti.Remote.To4() + var ip net.IP + + if family == FAMILY_V4 { + ip = vti.Local.To4() + } else { + ip = vti.Local + } if ip != nil { - nl.NewRtAttrChild(data, nl.IFLA_VTI_REMOTE, []byte(ip)) + data.AddRtAttr(nl.IFLA_VTI_LOCAL, []byte(ip)) + } + + if family == FAMILY_V4 { + ip = vti.Remote.To4() + } else { + ip = vti.Remote + } + if ip != nil { + data.AddRtAttr(nl.IFLA_VTI_REMOTE, []byte(ip)) } if vti.Link != 0 { - nl.NewRtAttrChild(data, nl.IFLA_VTI_LINK, nl.Uint32Attr(vti.Link)) + data.AddRtAttr(nl.IFLA_VTI_LINK, nl.Uint32Attr(vti.Link)) } - nl.NewRtAttrChild(data, nl.IFLA_VTI_IKEY, htonl(vti.IKey)) - nl.NewRtAttrChild(data, nl.IFLA_VTI_OKEY, htonl(vti.OKey)) + data.AddRtAttr(nl.IFLA_VTI_IKEY, htonl(vti.IKey)) + data.AddRtAttr(nl.IFLA_VTI_OKEY, htonl(vti.OKey)) } func parseVtiData(link Link, data []syscall.NetlinkRouteAttr) { @@ -2221,9 +2728,9 @@ func parseVtiData(link Link, data []syscall.NetlinkRouteAttr) { for _, datum := range data { switch datum.Attr.Type { case nl.IFLA_VTI_LOCAL: - vti.Local = net.IP(datum.Value[0:4]) + vti.Local = net.IP(datum.Value) case nl.IFLA_VTI_REMOTE: - vti.Remote = net.IP(datum.Value[0:4]) + vti.Remote = net.IP(datum.Value) case nl.IFLA_VTI_IKEY: vti.IKey = ntohl(datum.Value[0:4]) case nl.IFLA_VTI_OKEY: @@ -2233,10 +2740,10 @@ func parseVtiData(link Link, data []syscall.NetlinkRouteAttr) { } func addVrfAttrs(vrf *Vrf, linkInfo *nl.RtAttr) { - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) b := make([]byte, 4) native.PutUint32(b, uint32(vrf.Table)) - nl.NewRtAttrChild(data, nl.IFLA_VRF_TABLE, b) + data.AddRtAttr(nl.IFLA_VRF_TABLE, b) } func parseVrfData(link Link, data []syscall.NetlinkRouteAttr) { @@ -2250,12 +2757,15 @@ func parseVrfData(link Link, data []syscall.NetlinkRouteAttr) { } func addBridgeAttrs(bridge *Bridge, linkInfo *nl.RtAttr) { - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) if bridge.MulticastSnooping != nil { - nl.NewRtAttrChild(data, nl.IFLA_BR_MCAST_SNOOPING, boolToByte(*bridge.MulticastSnooping)) + data.AddRtAttr(nl.IFLA_BR_MCAST_SNOOPING, boolToByte(*bridge.MulticastSnooping)) } if bridge.HelloTime != nil { - nl.NewRtAttrChild(data, nl.IFLA_BR_HELLO_TIME, nl.Uint32Attr(*bridge.HelloTime)) + data.AddRtAttr(nl.IFLA_BR_HELLO_TIME, nl.Uint32Attr(*bridge.HelloTime)) + } + if bridge.VlanFiltering != nil { + data.AddRtAttr(nl.IFLA_BR_VLAN_FILTERING, boolToByte(*bridge.VlanFiltering)) } } @@ -2269,17 +2779,20 @@ func parseBridgeData(bridge Link, data []syscall.NetlinkRouteAttr) { case nl.IFLA_BR_MCAST_SNOOPING: mcastSnooping := datum.Value[0] == 1 br.MulticastSnooping = &mcastSnooping + case nl.IFLA_BR_VLAN_FILTERING: + vlanFiltering := datum.Value[0] == 1 + br.VlanFiltering = &vlanFiltering } } } func addGTPAttrs(gtp *GTP, linkInfo *nl.RtAttr) { - data := nl.NewRtAttrChild(linkInfo, nl.IFLA_INFO_DATA, nil) - nl.NewRtAttrChild(data, nl.IFLA_GTP_FD0, nl.Uint32Attr(uint32(gtp.FD0))) - nl.NewRtAttrChild(data, nl.IFLA_GTP_FD1, nl.Uint32Attr(uint32(gtp.FD1))) - nl.NewRtAttrChild(data, nl.IFLA_GTP_PDP_HASHSIZE, nl.Uint32Attr(131072)) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) + data.AddRtAttr(nl.IFLA_GTP_FD0, nl.Uint32Attr(uint32(gtp.FD0))) + data.AddRtAttr(nl.IFLA_GTP_FD1, nl.Uint32Attr(uint32(gtp.FD1))) + data.AddRtAttr(nl.IFLA_GTP_PDP_HASHSIZE, nl.Uint32Attr(131072)) if gtp.Role != nl.GTP_ROLE_GGSN { - nl.NewRtAttrChild(data, nl.IFLA_GTP_ROLE, nl.Uint32Attr(uint32(gtp.Role))) + data.AddRtAttr(nl.IFLA_GTP_ROLE, nl.Uint32Attr(uint32(gtp.Role))) } } @@ -2299,6 +2812,70 @@ func parseGTPData(link Link, data []syscall.NetlinkRouteAttr) { } } +func parseVfInfoList(data []syscall.NetlinkRouteAttr) ([]VfInfo, error) { + var vfs []VfInfo + + for i, element := range data { + if element.Attr.Type != nl.IFLA_VF_INFO { + return nil, fmt.Errorf("Incorrect element type in vf info list: %d", element.Attr.Type) + } + vfAttrs, err := nl.ParseRouteAttr(element.Value) + if err != nil { + return nil, err + } + vfs = append(vfs, parseVfInfo(vfAttrs, i)) + } + return vfs, nil +} + +func parseVfInfo(data []syscall.NetlinkRouteAttr, id int) VfInfo { + vf := VfInfo{ID: id} + for _, element := range data { + switch element.Attr.Type { + case nl.IFLA_VF_MAC: + mac := nl.DeserializeVfMac(element.Value[:]) + vf.Mac = mac.Mac[:6] + case nl.IFLA_VF_VLAN: + vl := nl.DeserializeVfVlan(element.Value[:]) + vf.Vlan = int(vl.Vlan) + vf.Qos = int(vl.Qos) + case nl.IFLA_VF_TX_RATE: + txr := nl.DeserializeVfTxRate(element.Value[:]) + vf.TxRate = int(txr.Rate) + case nl.IFLA_VF_SPOOFCHK: + sp := nl.DeserializeVfSpoofchk(element.Value[:]) + vf.Spoofchk = sp.Setting != 0 + case nl.IFLA_VF_LINK_STATE: + ls := nl.DeserializeVfLinkState(element.Value[:]) + vf.LinkState = ls.LinkState + case nl.IFLA_VF_RATE: + vfr := nl.DeserializeVfRate(element.Value[:]) + vf.MaxTxRate = vfr.MaxTxRate + vf.MinTxRate = vfr.MinTxRate + } + } + return vf +} + +func addXfrmiAttrs(xfrmi *Xfrmi, linkInfo *nl.RtAttr) { + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) + data.AddRtAttr(nl.IFLA_XFRM_LINK, nl.Uint32Attr(uint32(xfrmi.ParentIndex))) + data.AddRtAttr(nl.IFLA_XFRM_IF_ID, nl.Uint32Attr(xfrmi.Ifid)) + +} + +func parseXfrmiData(link Link, data []syscall.NetlinkRouteAttr) { + xfrmi := link.(*Xfrmi) + for _, datum := range data { + switch datum.Attr.Type { + case nl.IFLA_XFRM_LINK: + xfrmi.ParentIndex = int(native.Uint32(datum.Value)) + case nl.IFLA_XFRM_IF_ID: + xfrmi.Ifid = native.Uint32(datum.Value) + } + } +} + // LinkSetBondSlave add slave to bond link via ioctl interface. func LinkSetBondSlave(link Link, master *Bond) error { fd, err := getSocketUDP() @@ -2316,6 +2893,52 @@ func LinkSetBondSlave(link Link, master *Bond) error { return nil } +// LinkSetBondSlaveQueueId modify bond slave queue-id. +func (h *Handle) LinkSetBondSlaveQueueId(link Link, queueId uint16) error { + base := link.Attrs() + h.ensureIndex(base) + req := h.newNetlinkRequest(unix.RTM_SETLINK, unix.NLM_F_ACK) + + msg := nl.NewIfInfomsg(unix.AF_UNSPEC) + msg.Index = int32(base.Index) + req.AddData(msg) + + linkInfo := nl.NewRtAttr(unix.IFLA_LINKINFO, nil) + data := linkInfo.AddRtAttr(nl.IFLA_INFO_SLAVE_DATA, nil) + data.AddRtAttr(nl.IFLA_BOND_SLAVE_QUEUE_ID, nl.Uint16Attr(queueId)) + + req.AddData(linkInfo) + _, err := req.Execute(unix.NETLINK_ROUTE, 0) + return err +} + +// LinkSetBondSlaveQueueId modify bond slave queue-id. +func LinkSetBondSlaveQueueId(link Link, queueId uint16) error { + return pkgHandle.LinkSetBondSlaveQueueId(link, queueId) +} + +func vethStatsSerialize(stats ethtoolStats) ([]byte, error) { + statsSize := int(unsafe.Sizeof(stats)) + int(stats.nStats)*int(unsafe.Sizeof(uint64(0))) + b := make([]byte, 0, statsSize) + buf := bytes.NewBuffer(b) + err := binary.Write(buf, nl.NativeEndian(), stats) + return buf.Bytes()[:statsSize], err +} + +type vethEthtoolStats struct { + Cmd uint32 + NStats uint32 + Peer uint64 + // Newer kernels have XDP stats in here, but we only care + // to extract the peer ifindex here. +} + +func vethStatsDeserialize(b []byte) (vethEthtoolStats, error) { + var stats = vethEthtoolStats{} + err := binary.Read(bytes.NewReader(b), nl.NativeEndian(), &stats) + return stats, err +} + // VethPeerIndex get veth peer index. func VethPeerIndex(link *Veth) (int, error) { fd, err := getSocketUDP() @@ -2330,25 +2953,66 @@ func VethPeerIndex(link *Veth) (int, error) { return -1, fmt.Errorf("SIOCETHTOOL request for %q failed, errno=%v", link.Attrs().Name, errno) } - gstrings := ðtoolGstrings{ - cmd: ETHTOOL_GSTRINGS, - stringSet: ETH_SS_STATS, - length: sSet.data[0], + stats := ethtoolStats{ + cmd: ETHTOOL_GSTATS, + nStats: sSet.data[0], } - ifreq.Data = uintptr(unsafe.Pointer(gstrings)) + + buffer, err := vethStatsSerialize(stats) + if err != nil { + return -1, err + } + + ifreq.Data = uintptr(unsafe.Pointer(&buffer[0])) _, _, errno = syscall.Syscall(syscall.SYS_IOCTL, uintptr(fd), SIOCETHTOOL, uintptr(unsafe.Pointer(ifreq))) if errno != 0 { return -1, fmt.Errorf("SIOCETHTOOL request for %q failed, errno=%v", link.Attrs().Name, errno) } - stats := ðtoolStats{ - cmd: ETHTOOL_GSTATS, - nStats: gstrings.length, + vstats, err := vethStatsDeserialize(buffer) + if err != nil { + return -1, err } - ifreq.Data = uintptr(unsafe.Pointer(stats)) - _, _, errno = syscall.Syscall(syscall.SYS_IOCTL, uintptr(fd), SIOCETHTOOL, uintptr(unsafe.Pointer(ifreq))) - if errno != 0 { - return -1, fmt.Errorf("SIOCETHTOOL request for %q failed, errno=%v", link.Attrs().Name, errno) - } - return int(stats.data[0]), nil + + return int(vstats.Peer), nil +} + +func parseTuntapData(link Link, data []syscall.NetlinkRouteAttr) { + tuntap := link.(*Tuntap) + for _, datum := range data { + switch datum.Attr.Type { + case nl.IFLA_TUN_OWNER: + tuntap.Owner = native.Uint32(datum.Value) + case nl.IFLA_TUN_GROUP: + tuntap.Group = native.Uint32(datum.Value) + case nl.IFLA_TUN_TYPE: + tuntap.Mode = TuntapMode(uint8(datum.Value[0])) + case nl.IFLA_TUN_PERSIST: + tuntap.NonPersist = false + if uint8(datum.Value[0]) == 0 { + tuntap.NonPersist = true + } + } + } +} + +func parseIPoIBData(link Link, data []syscall.NetlinkRouteAttr) { + ipoib := link.(*IPoIB) + for _, datum := range data { + switch datum.Attr.Type { + case nl.IFLA_IPOIB_PKEY: + ipoib.Pkey = uint16(native.Uint16(datum.Value)) + case nl.IFLA_IPOIB_MODE: + ipoib.Mode = IPoIBMode(native.Uint16(datum.Value)) + case nl.IFLA_IPOIB_UMCAST: + ipoib.Umcast = uint16(native.Uint16(datum.Value)) + } + } +} + +func addIPoIBAttrs(ipoib *IPoIB, linkInfo *nl.RtAttr) { + data := linkInfo.AddRtAttr(nl.IFLA_INFO_DATA, nil) + data.AddRtAttr(nl.IFLA_IPOIB_PKEY, nl.Uint16Attr(uint16(ipoib.Pkey))) + data.AddRtAttr(nl.IFLA_IPOIB_MODE, nl.Uint16Attr(uint16(ipoib.Mode))) + data.AddRtAttr(nl.IFLA_IPOIB_UMCAST, nl.Uint16Attr(uint16(ipoib.Umcast))) } diff --git a/vendor/github.com/vishvananda/netlink/neigh.go b/vendor/github.com/vishvananda/netlink/neigh.go index 3f5cd497a73..379e5655f73 100644 --- a/vendor/github.com/vishvananda/netlink/neigh.go +++ b/vendor/github.com/vishvananda/netlink/neigh.go @@ -17,9 +17,16 @@ type Neigh struct { LLIPAddr net.IP //Used in the case of NHRP Vlan int VNI int + MasterIndex int } // String returns $ip/$hwaddr $label func (neigh *Neigh) String() string { return fmt.Sprintf("%s %s", neigh.IP, neigh.HardwareAddr) } + +// NeighUpdate is sent when a neighbor changes - type is RTM_NEWNEIGH or RTM_DELNEIGH. +type NeighUpdate struct { + Type uint16 + Neigh +} diff --git a/vendor/github.com/vishvananda/netlink/neigh_linux.go b/vendor/github.com/vishvananda/netlink/neigh_linux.go index f75c22649f9..cb3b55d3508 100644 --- a/vendor/github.com/vishvananda/netlink/neigh_linux.go +++ b/vendor/github.com/vishvananda/netlink/neigh_linux.go @@ -1,10 +1,13 @@ package netlink import ( + "fmt" "net" + "syscall" "unsafe" "github.com/vishvananda/netlink/nl" + "github.com/vishvananda/netns" "golang.org/x/sys/unix" ) @@ -18,7 +21,10 @@ const ( NDA_PORT NDA_VNI NDA_IFINDEX - NDA_MAX = NDA_IFINDEX + NDA_MASTER + NDA_LINK_NETNSID + NDA_SRC_VNI + NDA_MAX = NDA_SRC_VNI ) // Neighbor Cache Entry States. @@ -43,6 +49,7 @@ const ( NTF_ROUTER = 0x80 ) +// Ndmsg is for adding, removing or receiving information about a neighbor table entry type Ndmsg struct { Family uint8 Index uint32 @@ -170,45 +177,58 @@ func neighHandle(neigh *Neigh, req *nl.NetlinkRequest) error { req.AddData(vniData) } + if neigh.MasterIndex != 0 { + masterData := nl.NewRtAttr(NDA_MASTER, nl.Uint32Attr(uint32(neigh.MasterIndex))) + req.AddData(masterData) + } + _, err := req.Execute(unix.NETLINK_ROUTE, 0) return err } -// NeighList gets a list of IP-MAC mappings in the system (ARP table). +// NeighList returns a list of IP-MAC mappings in the system (ARP table). // Equivalent to: `ip neighbor show`. // The list can be filtered by link and ip family. func NeighList(linkIndex, family int) ([]Neigh, error) { return pkgHandle.NeighList(linkIndex, family) } -// NeighProxyList gets a list of neighbor proxies in the system. +// NeighProxyList returns a list of neighbor proxies in the system. // Equivalent to: `ip neighbor show proxy`. // The list can be filtered by link and ip family. func NeighProxyList(linkIndex, family int) ([]Neigh, error) { return pkgHandle.NeighProxyList(linkIndex, family) } -// NeighList gets a list of IP-MAC mappings in the system (ARP table). +// NeighList returns a list of IP-MAC mappings in the system (ARP table). // Equivalent to: `ip neighbor show`. // The list can be filtered by link and ip family. func (h *Handle) NeighList(linkIndex, family int) ([]Neigh, error) { - return h.neighList(linkIndex, family, 0) + return h.NeighListExecute(Ndmsg{ + Family: uint8(family), + Index: uint32(linkIndex), + }) } -// NeighProxyList gets a list of neighbor proxies in the system. +// NeighProxyList returns a list of neighbor proxies in the system. // Equivalent to: `ip neighbor show proxy`. // The list can be filtered by link, ip family. func (h *Handle) NeighProxyList(linkIndex, family int) ([]Neigh, error) { - return h.neighList(linkIndex, family, NTF_PROXY) -} - -func (h *Handle) neighList(linkIndex, family, flags int) ([]Neigh, error) { - req := h.newNetlinkRequest(unix.RTM_GETNEIGH, unix.NLM_F_DUMP) - msg := Ndmsg{ + return h.NeighListExecute(Ndmsg{ Family: uint8(family), Index: uint32(linkIndex), - Flags: uint8(flags), - } + Flags: NTF_PROXY, + }) +} + +// NeighListExecute returns a list of neighbour entries filtered by link, ip family, flag and state. +func NeighListExecute(msg Ndmsg) ([]Neigh, error) { + return pkgHandle.NeighListExecute(msg) +} + +// NeighListExecute returns a list of neighbour entries filtered by link, ip family, flag and state. +func (h *Handle) NeighListExecute(msg Ndmsg) ([]Neigh, error) { + req := h.newNetlinkRequest(unix.RTM_GETNEIGH, unix.NLM_F_DUMP) req.AddData(&msg) msgs, err := req.Execute(unix.NETLINK_ROUTE, unix.RTM_NEWNEIGH) @@ -219,7 +239,7 @@ func (h *Handle) neighList(linkIndex, family, flags int) ([]Neigh, error) { var res []Neigh for _, m := range msgs { ndm := deserializeNdmsg(m) - if linkIndex != 0 && int(ndm.Index) != linkIndex { + if msg.Index != 0 && ndm.Index != msg.Index { // Ignore messages from other interfaces continue } @@ -251,14 +271,6 @@ func NeighDeserialize(m []byte) (*Neigh, error) { return nil, err } - // This should be cached for perfomance - // once per table dump - link, err := LinkByIndex(neigh.LinkIndex) - if err != nil { - return nil, err - } - encapType := link.Attrs().EncapType - for _, attr := range attrs { switch attr.Attr.Type { case NDA_DST: @@ -268,13 +280,16 @@ func NeighDeserialize(m []byte) (*Neigh, error) { // #define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len)) // #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0)) attrLen := attr.Attr.Len - unix.SizeofRtAttr - if attrLen == 4 && (encapType == "ipip" || - encapType == "sit" || - encapType == "gre") { + if attrLen == 4 { neigh.LLIPAddr = net.IP(attr.Value) - } else if attrLen == 16 && - encapType == "tunnel6" { - neigh.IP = net.IP(attr.Value) + } else if attrLen == 16 { + // Can be IPv6 or FireWire HWAddr + link, err := LinkByIndex(neigh.LinkIndex) + if err == nil && link.Attrs().EncapType == "tunnel6" { + neigh.IP = net.IP(attr.Value) + } else { + neigh.HardwareAddr = net.HardwareAddr(attr.Value) + } } else { neigh.HardwareAddr = net.HardwareAddr(attr.Value) } @@ -282,8 +297,126 @@ func NeighDeserialize(m []byte) (*Neigh, error) { neigh.Vlan = int(native.Uint16(attr.Value[0:2])) case NDA_VNI: neigh.VNI = int(native.Uint32(attr.Value[0:4])) + case NDA_MASTER: + neigh.MasterIndex = int(native.Uint32(attr.Value[0:4])) } } return &neigh, nil } + +// NeighSubscribe takes a chan down which notifications will be sent +// when neighbors are added or deleted. Close the 'done' chan to stop subscription. +func NeighSubscribe(ch chan<- NeighUpdate, done <-chan struct{}) error { + return neighSubscribeAt(netns.None(), netns.None(), ch, done, nil, false) +} + +// NeighSubscribeAt works like NeighSubscribe plus it allows the caller +// to choose the network namespace in which to subscribe (ns). +func NeighSubscribeAt(ns netns.NsHandle, ch chan<- NeighUpdate, done <-chan struct{}) error { + return neighSubscribeAt(ns, netns.None(), ch, done, nil, false) +} + +// NeighSubscribeOptions contains a set of options to use with +// NeighSubscribeWithOptions. +type NeighSubscribeOptions struct { + Namespace *netns.NsHandle + ErrorCallback func(error) + ListExisting bool +} + +// NeighSubscribeWithOptions work like NeighSubscribe but enable to +// provide additional options to modify the behavior. Currently, the +// namespace can be provided as well as an error callback. +func NeighSubscribeWithOptions(ch chan<- NeighUpdate, done <-chan struct{}, options NeighSubscribeOptions) error { + if options.Namespace == nil { + none := netns.None() + options.Namespace = &none + } + return neighSubscribeAt(*options.Namespace, netns.None(), ch, done, options.ErrorCallback, options.ListExisting) +} + +func neighSubscribeAt(newNs, curNs netns.NsHandle, ch chan<- NeighUpdate, done <-chan struct{}, cberr func(error), listExisting bool) error { + s, err := nl.SubscribeAt(newNs, curNs, unix.NETLINK_ROUTE, unix.RTNLGRP_NEIGH) + makeRequest := func(family int) error { + req := pkgHandle.newNetlinkRequest(unix.RTM_GETNEIGH, + unix.NLM_F_DUMP) + infmsg := nl.NewIfInfomsg(family) + req.AddData(infmsg) + if err := s.Send(req); err != nil { + return err + } + return nil + } + if err != nil { + return err + } + if done != nil { + go func() { + <-done + s.Close() + }() + } + if listExisting { + if err := makeRequest(unix.AF_UNSPEC); err != nil { + return err + } + // We have to wait for NLMSG_DONE before making AF_BRIDGE request + } + go func() { + defer close(ch) + for { + msgs, from, err := s.Receive() + if err != nil { + if cberr != nil { + cberr(err) + } + return + } + if from.Pid != nl.PidKernel { + if cberr != nil { + cberr(fmt.Errorf("Wrong sender portid %d, expected %d", from.Pid, nl.PidKernel)) + } + continue + } + for _, m := range msgs { + if m.Header.Type == unix.NLMSG_DONE { + if listExisting { + // This will be called after handling AF_UNSPEC + // list request, we have to wait for NLMSG_DONE + // before making another request + if err := makeRequest(unix.AF_BRIDGE); err != nil { + if cberr != nil { + cberr(err) + } + return + } + listExisting = false + } + continue + } + if m.Header.Type == unix.NLMSG_ERROR { + native := nl.NativeEndian() + error := int32(native.Uint32(m.Data[0:4])) + if error == 0 { + continue + } + if cberr != nil { + cberr(syscall.Errno(-error)) + } + return + } + neigh, err := NeighDeserialize(m.Data) + if err != nil { + if cberr != nil { + cberr(err) + } + return + } + ch <- NeighUpdate{Type: m.Header.Type, Neigh: *neigh} + } + } + }() + + return nil +} diff --git a/vendor/github.com/vishvananda/netlink/netlink.go b/vendor/github.com/vishvananda/netlink/netlink.go index fb159526e31..9cb685dc818 100644 --- a/vendor/github.com/vishvananda/netlink/netlink.go +++ b/vendor/github.com/vishvananda/netlink/netlink.go @@ -27,7 +27,8 @@ func ParseIPNet(s string) (*net.IPNet, error) { if err != nil { return nil, err } - return &net.IPNet{IP: ip, Mask: ipNet.Mask}, nil + ipNet.IP = ip + return ipNet, nil } // NewIPNet generates an IPNet from an ip address using a netmask of 32 or 128. diff --git a/vendor/github.com/vishvananda/netlink/netlink_unspecified.go b/vendor/github.com/vishvananda/netlink/netlink_unspecified.go index 86111b92ce1..42d3acf9180 100644 --- a/vendor/github.com/vishvananda/netlink/netlink_unspecified.go +++ b/vendor/github.com/vishvananda/netlink/netlink_unspecified.go @@ -48,10 +48,18 @@ func LinkSetVfVlan(link Link, vf, vlan int) error { return ErrNotImplemented } +func LinkSetVfVlanQos(link Link, vf, vlan, qos int) error { + return ErrNotImplemented +} + func LinkSetVfTxRate(link Link, vf, rate int) error { return ErrNotImplemented } +func LinkSetVfRate(link Link, vf, minRate, maxRate int) error { + return ErrNotImplemented +} + func LinkSetNoMaster(link Link) error { return ErrNotImplemented } @@ -152,6 +160,10 @@ func AddrAdd(link Link, addr *Addr) error { return ErrNotImplemented } +func AddrReplace(link Link, addr *Addr) error { + return ErrNotImplemented +} + func AddrDel(link Link, addr *Addr) error { return ErrNotImplemented } diff --git a/vendor/github.com/vishvananda/netlink/netns_linux.go b/vendor/github.com/vishvananda/netlink/netns_linux.go new file mode 100644 index 00000000000..77cf6f46901 --- /dev/null +++ b/vendor/github.com/vishvananda/netlink/netns_linux.go @@ -0,0 +1,141 @@ +package netlink + +// Network namespace ID functions +// +// The kernel has a weird concept called the network namespace ID. +// This is different from the file reference in proc (and any bind-mounted +// namespaces, etc.) +// +// Instead, namespaces can be assigned a numeric ID at any time. Once set, +// the ID is fixed. The ID can either be set manually by the user, or +// automatically, triggered by certain kernel actions. The most common kernel +// action that triggers namespace ID creation is moving one end of a veth pair +// in to that namespace. + +import ( + "fmt" + + "github.com/vishvananda/netlink/nl" + "golang.org/x/sys/unix" +) + +// These can be replaced by the values from sys/unix when it is next released. +const ( + _ = iota + NETNSA_NSID + NETNSA_PID + NETNSA_FD +) + +// GetNetNsIdByPid looks up the network namespace ID for a given pid (really thread id). +// Returns -1 if the namespace does not have an ID set. +func (h *Handle) GetNetNsIdByPid(pid int) (int, error) { + return h.getNetNsId(NETNSA_PID, uint32(pid)) +} + +// GetNetNsIdByPid looks up the network namespace ID for a given pid (really thread id). +// Returns -1 if the namespace does not have an ID set. +func GetNetNsIdByPid(pid int) (int, error) { + return pkgHandle.GetNetNsIdByPid(pid) +} + +// SetNetNSIdByPid sets the ID of the network namespace for a given pid (really thread id). +// The ID can only be set for namespaces without an ID already set. +func (h *Handle) SetNetNsIdByPid(pid, nsid int) error { + return h.setNetNsId(NETNSA_PID, uint32(pid), uint32(nsid)) +} + +// SetNetNSIdByPid sets the ID of the network namespace for a given pid (really thread id). +// The ID can only be set for namespaces without an ID already set. +func SetNetNsIdByPid(pid, nsid int) error { + return pkgHandle.SetNetNsIdByPid(pid, nsid) +} + +// GetNetNsIdByFd looks up the network namespace ID for a given fd. +// fd must be an open file descriptor to a namespace file. +// Returns -1 if the namespace does not have an ID set. +func (h *Handle) GetNetNsIdByFd(fd int) (int, error) { + return h.getNetNsId(NETNSA_FD, uint32(fd)) +} + +// GetNetNsIdByFd looks up the network namespace ID for a given fd. +// fd must be an open file descriptor to a namespace file. +// Returns -1 if the namespace does not have an ID set. +func GetNetNsIdByFd(fd int) (int, error) { + return pkgHandle.GetNetNsIdByFd(fd) +} + +// SetNetNSIdByFd sets the ID of the network namespace for a given fd. +// fd must be an open file descriptor to a namespace file. +// The ID can only be set for namespaces without an ID already set. +func (h *Handle) SetNetNsIdByFd(fd, nsid int) error { + return h.setNetNsId(NETNSA_FD, uint32(fd), uint32(nsid)) +} + +// SetNetNSIdByFd sets the ID of the network namespace for a given fd. +// fd must be an open file descriptor to a namespace file. +// The ID can only be set for namespaces without an ID already set. +func SetNetNsIdByFd(fd, nsid int) error { + return pkgHandle.SetNetNsIdByFd(fd, nsid) +} + +// getNetNsId requests the netnsid for a given type-val pair +// type should be either NETNSA_PID or NETNSA_FD +func (h *Handle) getNetNsId(attrType int, val uint32) (int, error) { + req := h.newNetlinkRequest(unix.RTM_GETNSID, unix.NLM_F_REQUEST) + + rtgen := nl.NewRtGenMsg() + req.AddData(rtgen) + + b := make([]byte, 4, 4) + native.PutUint32(b, val) + attr := nl.NewRtAttr(attrType, b) + req.AddData(attr) + + msgs, err := req.Execute(unix.NETLINK_ROUTE, unix.RTM_NEWNSID) + + if err != nil { + return 0, err + } + + for _, m := range msgs { + msg := nl.DeserializeRtGenMsg(m) + + attrs, err := nl.ParseRouteAttr(m[msg.Len():]) + if err != nil { + return 0, err + } + + for _, attr := range attrs { + switch attr.Attr.Type { + case NETNSA_NSID: + return int(int32(native.Uint32(attr.Value))), nil + } + } + } + + return 0, fmt.Errorf("unexpected empty result") +} + +// setNetNsId sets the netnsid for a given type-val pair +// type should be either NETNSA_PID or NETNSA_FD +// The ID can only be set for namespaces without an ID already set +func (h *Handle) setNetNsId(attrType int, val uint32, newnsid uint32) error { + req := h.newNetlinkRequest(unix.RTM_NEWNSID, unix.NLM_F_REQUEST|unix.NLM_F_ACK) + + rtgen := nl.NewRtGenMsg() + req.AddData(rtgen) + + b := make([]byte, 4, 4) + native.PutUint32(b, val) + attr := nl.NewRtAttr(attrType, b) + req.AddData(attr) + + b1 := make([]byte, 4, 4) + native.PutUint32(b1, newnsid) + attr1 := nl.NewRtAttr(NETNSA_NSID, b1) + req.AddData(attr1) + + _, err := req.Execute(unix.NETLINK_ROUTE, unix.RTM_NEWNSID) + return err +} diff --git a/vendor/github.com/vishvananda/netlink/netns_unspecified.go b/vendor/github.com/vishvananda/netlink/netns_unspecified.go new file mode 100644 index 00000000000..5c5899e3628 --- /dev/null +++ b/vendor/github.com/vishvananda/netlink/netns_unspecified.go @@ -0,0 +1,19 @@ +// +build !linux + +package netlink + +func GetNetNsIdByPid(pid int) (int, error) { + return 0, ErrNotImplemented +} + +func SetNetNsIdByPid(pid, nsid int) error { + return ErrNotImplemented +} + +func GetNetNsIdByFd(fd int) (int, error) { + return 0, ErrNotImplemented +} + +func SetNetNsIdByFd(fd, nsid int) error { + return ErrNotImplemented +} diff --git a/vendor/github.com/vishvananda/netlink/nl/bridge_linux.go b/vendor/github.com/vishvananda/netlink/nl/bridge_linux.go index 6c0d333387d..34e78ba8daf 100644 --- a/vendor/github.com/vishvananda/netlink/nl/bridge_linux.go +++ b/vendor/github.com/vishvananda/netlink/nl/bridge_linux.go @@ -11,8 +11,8 @@ const ( /* Bridge Flags */ const ( - BRIDGE_FLAGS_MASTER = iota /* Bridge command to/from master */ - BRIDGE_FLAGS_SELF /* Bridge command to/from lowerdev */ + BRIDGE_FLAGS_MASTER = iota + 1 /* Bridge command to/from master */ + BRIDGE_FLAGS_SELF /* Bridge command to/from lowerdev */ ) /* Bridge management nested attributes diff --git a/vendor/github.com/vishvananda/netlink/nl/conntrack_linux.go b/vendor/github.com/vishvananda/netlink/nl/conntrack_linux.go index 380cc5967bf..79d2b6b8909 100644 --- a/vendor/github.com/vishvananda/netlink/nl/conntrack_linux.go +++ b/vendor/github.com/vishvananda/netlink/nl/conntrack_linux.go @@ -76,12 +76,17 @@ const ( // __CTA_MAX // }; const ( - CTA_TUPLE_ORIG = 1 - CTA_TUPLE_REPLY = 2 - CTA_STATUS = 3 - CTA_TIMEOUT = 7 - CTA_MARK = 8 - CTA_PROTOINFO = 4 + CTA_TUPLE_ORIG = 1 + CTA_TUPLE_REPLY = 2 + CTA_STATUS = 3 + CTA_PROTOINFO = 4 + CTA_TIMEOUT = 7 + CTA_MARK = 8 + CTA_COUNTERS_ORIG = 9 + CTA_COUNTERS_REPLY = 10 + CTA_USE = 11 + CTA_ID = 12 + CTA_TIMESTAMP = 20 ) // enum ctattr_tuple { @@ -163,6 +168,29 @@ const ( CTA_PROTOINFO_TCP_FLAGS_REPLY = 5 ) +// enum ctattr_counters { +// CTA_COUNTERS_UNSPEC, +// CTA_COUNTERS_PACKETS, /* 64bit counters */ +// CTA_COUNTERS_BYTES, /* 64bit counters */ +// CTA_COUNTERS32_PACKETS, /* old 32bit counters, unused */ +// CTA_COUNTERS32_BYTES, /* old 32bit counters, unused */ +// CTA_COUNTERS_PAD, +// __CTA_COUNTERS_M +// }; +// #define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1) +const ( + CTA_COUNTERS_PACKETS = 1 + CTA_COUNTERS_BYTES = 2 +) + +// enum CTA TIMESTAMP TLVs +// CTA_TIMESTAMP_START /* 64bit value */ +// CTA_TIMESTAMP_STOP /* 64bit value */ +const ( + CTA_TIMESTAMP_START = 1 + CTA_TIMESTAMP_STOP = 2 +) + // /* General form of address family dependent message. // */ // struct nfgenmsg { diff --git a/vendor/github.com/vishvananda/netlink/nl/devlink_linux.go b/vendor/github.com/vishvananda/netlink/nl/devlink_linux.go new file mode 100644 index 00000000000..db66faaad30 --- /dev/null +++ b/vendor/github.com/vishvananda/netlink/nl/devlink_linux.go @@ -0,0 +1,40 @@ +package nl + +// All the following constants are coming from: +// https://github.com/torvalds/linux/blob/master/include/uapi/linux/devlink.h + +const ( + GENL_DEVLINK_VERSION = 1 + GENL_DEVLINK_NAME = "devlink" +) + +const ( + DEVLINK_CMD_GET = 1 + DEVLINK_CMD_ESWITCH_GET = 29 + DEVLINK_CMD_ESWITCH_SET = 30 +) + +const ( + DEVLINK_ATTR_BUS_NAME = 1 + DEVLINK_ATTR_DEV_NAME = 2 + DEVLINK_ATTR_ESWITCH_MODE = 25 + DEVLINK_ATTR_ESWITCH_INLINE_MODE = 26 + DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 62 +) + +const ( + DEVLINK_ESWITCH_MODE_LEGACY = 0 + DEVLINK_ESWITCH_MODE_SWITCHDEV = 1 +) + +const ( + DEVLINK_ESWITCH_INLINE_MODE_NONE = 0 + DEVLINK_ESWITCH_INLINE_MODE_LINK = 1 + DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 2 + DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 3 +) + +const ( + DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0 + DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 1 +) diff --git a/vendor/github.com/vishvananda/netlink/nl/link_linux.go b/vendor/github.com/vishvananda/netlink/nl/link_linux.go index 84a3498dd3d..afb16a9c18d 100644 --- a/vendor/github.com/vishvananda/netlink/nl/link_linux.go +++ b/vendor/github.com/vishvananda/netlink/nl/link_linux.go @@ -13,7 +13,9 @@ const ( IFLA_INFO_KIND IFLA_INFO_DATA IFLA_INFO_XSTATS - IFLA_INFO_MAX = IFLA_INFO_XSTATS + IFLA_INFO_SLAVE_KIND + IFLA_INFO_SLAVE_DATA + IFLA_INFO_MAX = IFLA_INFO_SLAVE_DATA ) const ( @@ -87,7 +89,8 @@ const ( const ( IFLA_IPVLAN_UNSPEC = iota IFLA_IPVLAN_MODE - IFLA_IPVLAN_MAX = IFLA_IPVLAN_MODE + IFLA_IPVLAN_FLAG + IFLA_IPVLAN_MAX = IFLA_IPVLAN_FLAG ) const ( @@ -164,6 +167,8 @@ const ( IFLA_BOND_SLAVE_PERM_HWADDR IFLA_BOND_SLAVE_QUEUE_ID IFLA_BOND_SLAVE_AD_AGGREGATOR_ID + IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE + IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE ) const ( @@ -217,9 +222,11 @@ const ( IFLA_VF_RSS_QUERY_EN /* RSS Redirection Table and Hash Key query * on/off switch */ - IFLA_VF_STATS /* network device statistics */ - IFLA_VF_TRUST /* Trust state of VF */ - IFLA_VF_MAX = IFLA_VF_TRUST + IFLA_VF_STATS /* network device statistics */ + IFLA_VF_TRUST /* Trust state of VF */ + IFLA_VF_IB_NODE_GUID /* VF Infiniband node GUID */ + IFLA_VF_IB_PORT_GUID /* VF Infiniband port GUID */ + IFLA_VF_MAX = IFLA_VF_IB_PORT_GUID ) const ( @@ -248,6 +255,7 @@ const ( SizeofVfLinkState = 0x08 SizeofVfRssQueryEn = 0x08 SizeofVfTrust = 0x08 + SizeofVfGUID = 0x10 ) // struct ifla_vf_mac { @@ -430,6 +438,30 @@ func (msg *VfTrust) Serialize() []byte { return (*(*[SizeofVfTrust]byte)(unsafe.Pointer(msg)))[:] } +// struct ifla_vf_guid { +// __u32 vf; +// __u32 rsvd; +// __u64 guid; +// }; + +type VfGUID struct { + Vf uint32 + Rsvd uint32 + GUID uint64 +} + +func (msg *VfGUID) Len() int { + return SizeofVfGUID +} + +func DeserializeVfGUID(b []byte) *VfGUID { + return (*VfGUID)(unsafe.Pointer(&b[0:SizeofVfGUID][0])) +} + +func (msg *VfGUID) Serialize() []byte { + return (*(*[SizeofVfGUID]byte)(unsafe.Pointer(msg)))[:] +} + const ( XDP_FLAGS_UPDATE_IF_NOEXIST = 1 << iota XDP_FLAGS_SKB_MODE @@ -546,3 +578,33 @@ const ( GTP_ROLE_GGSN = iota GTP_ROLE_SGSN ) + +const ( + IFLA_XFRM_UNSPEC = iota + IFLA_XFRM_LINK + IFLA_XFRM_IF_ID + + IFLA_XFRM_MAX = iota - 1 +) + +const ( + IFLA_TUN_UNSPEC = iota + IFLA_TUN_OWNER + IFLA_TUN_GROUP + IFLA_TUN_TYPE + IFLA_TUN_PI + IFLA_TUN_VNET_HDR + IFLA_TUN_PERSIST + IFLA_TUN_MULTI_QUEUE + IFLA_TUN_NUM_QUEUES + IFLA_TUN_NUM_DISABLED_QUEUES + IFLA_TUN_MAX = IFLA_TUN_NUM_DISABLED_QUEUES +) + +const ( + IFLA_IPOIB_UNSPEC = iota + IFLA_IPOIB_PKEY + IFLA_IPOIB_MODE + IFLA_IPOIB_UMCAST + IFLA_IPOIB_MAX = IFLA_IPOIB_UMCAST +) diff --git a/vendor/github.com/vishvananda/netlink/nl/nl_linux.go b/vendor/github.com/vishvananda/netlink/nl/nl_linux.go index bc8e82c2cc4..aaf56c6715f 100644 --- a/vendor/github.com/vishvananda/netlink/nl/nl_linux.go +++ b/vendor/github.com/vishvananda/netlink/nl/nl_linux.go @@ -21,7 +21,13 @@ const ( FAMILY_ALL = unix.AF_UNSPEC FAMILY_V4 = unix.AF_INET FAMILY_V6 = unix.AF_INET6 - FAMILY_MPLS = AF_MPLS + FAMILY_MPLS = unix.AF_MPLS + // Arbitrary set value (greater than default 4k) to allow receiving + // from kernel more verbose messages e.g. for statistics, + // tc rules or filters, or other more memory requiring data. + RECEIVE_BUFFER_SIZE = 65536 + // Kernel netlink pid + PidKernel uint32 = 0 ) // SupportedNlFamilies contains the list of netlink families this netlink package supports @@ -42,7 +48,7 @@ func GetIPFamily(ip net.IP) int { var nativeEndian binary.ByteOrder -// Get native endianness for the system +// NativeEndian gets native endianness for the system func NativeEndian() binary.ByteOrder { if nativeEndian == nil { var x uint32 = 0x01020304 @@ -271,15 +277,22 @@ func NewRtAttr(attrType int, data []byte) *RtAttr { } } -// Create a new RtAttr obj anc add it as a child of an existing object +// NewRtAttrChild adds an RtAttr as a child to the parent and returns the new attribute +// +// Deprecated: Use AddRtAttr() on the parent object func NewRtAttrChild(parent *RtAttr, attrType int, data []byte) *RtAttr { + return parent.AddRtAttr(attrType, data) +} + +// AddRtAttr adds an RtAttr as a child and returns the new attribute +func (a *RtAttr) AddRtAttr(attrType int, data []byte) *RtAttr { attr := NewRtAttr(attrType, data) - parent.children = append(parent.children, attr) + a.children = append(a.children, attr) return attr } -// AddChild adds an existing RtAttr as a child. -func (a *RtAttr) AddChild(attr *RtAttr) { +// AddChild adds an existing NetlinkRequestData as a child. +func (a *RtAttr) AddChild(attr NetlinkRequestData) { a.children = append(a.children, attr) } @@ -360,16 +373,12 @@ func (req *NetlinkRequest) Serialize() []byte { } func (req *NetlinkRequest) AddData(data NetlinkRequestData) { - if data != nil { - req.Data = append(req.Data, data) - } + req.Data = append(req.Data, data) } // AddRawData adds raw bytes to the end of the NetlinkRequest object during serialization func (req *NetlinkRequest) AddRawData(data []byte) { - if data != nil { - req.RawData = append(req.RawData, data...) - } + req.RawData = append(req.RawData, data...) } // Execute the request against a the given sockType. @@ -413,10 +422,13 @@ func (req *NetlinkRequest) Execute(sockType int, resType uint16) ([][]byte, erro done: for { - msgs, err := s.Receive() + msgs, from, err := s.Receive() if err != nil { return nil, err } + if from.Pid != PidKernel { + return nil, fmt.Errorf("Wrong sender portid %d, expected %d", from.Pid, PidKernel) + } for _, m := range msgs { if m.Header.Seq != req.Seq { if sharedSocket { @@ -425,7 +437,7 @@ done: return nil, fmt.Errorf("Wrong Seq nr %d, expected %d", m.Header.Seq, req.Seq) } if m.Header.Pid != pid { - return nil, fmt.Errorf("Wrong pid %d, expected %d", m.Header.Pid, pid) + continue } if m.Header.Type == unix.NLMSG_DONE { break done @@ -610,21 +622,31 @@ func (s *NetlinkSocket) Send(request *NetlinkRequest) error { return nil } -func (s *NetlinkSocket) Receive() ([]syscall.NetlinkMessage, error) { +func (s *NetlinkSocket) Receive() ([]syscall.NetlinkMessage, *unix.SockaddrNetlink, error) { fd := int(atomic.LoadInt32(&s.fd)) if fd < 0 { - return nil, fmt.Errorf("Receive called on a closed socket") + return nil, nil, fmt.Errorf("Receive called on a closed socket") } - rb := make([]byte, unix.Getpagesize()) - nr, _, err := unix.Recvfrom(fd, rb, 0) + var fromAddr *unix.SockaddrNetlink + var rb [RECEIVE_BUFFER_SIZE]byte + nr, from, err := unix.Recvfrom(fd, rb[:], 0) if err != nil { - return nil, err + return nil, nil, err + } + fromAddr, ok := from.(*unix.SockaddrNetlink) + if !ok { + return nil, nil, fmt.Errorf("Error converting to netlink sockaddr") } if nr < unix.NLMSG_HDRLEN { - return nil, fmt.Errorf("Got short response from netlink") + return nil, nil, fmt.Errorf("Got short response from netlink") } - rb = rb[:nr] - return syscall.ParseNetlinkMessage(rb) + rb2 := make([]byte, nr) + copy(rb2, rb[:nr]) + nl, err := syscall.ParseNetlinkMessage(rb2) + if err != nil { + return nil, nil, err + } + return nl, fromAddr, nil } // SetSendTimeout allows to set a send timeout on the socket diff --git a/vendor/github.com/vishvananda/netlink/nl/rdma_link_linux.go b/vendor/github.com/vishvananda/netlink/nl/rdma_link_linux.go new file mode 100644 index 00000000000..1224b747def --- /dev/null +++ b/vendor/github.com/vishvananda/netlink/nl/rdma_link_linux.go @@ -0,0 +1,35 @@ +package nl + +const ( + RDMA_NL_GET_CLIENT_SHIFT = 10 +) + +const ( + RDMA_NL_NLDEV = 5 +) + +const ( + RDMA_NLDEV_CMD_GET = 1 + RDMA_NLDEV_CMD_SET = 2 + RDMA_NLDEV_CMD_SYS_GET = 6 + RDMA_NLDEV_CMD_SYS_SET = 7 +) + +const ( + RDMA_NLDEV_ATTR_DEV_INDEX = 1 + RDMA_NLDEV_ATTR_DEV_NAME = 2 + RDMA_NLDEV_ATTR_PORT_INDEX = 3 + RDMA_NLDEV_ATTR_CAP_FLAGS = 4 + RDMA_NLDEV_ATTR_FW_VERSION = 5 + RDMA_NLDEV_ATTR_NODE_GUID = 6 + RDMA_NLDEV_ATTR_SYS_IMAGE_GUID = 7 + RDMA_NLDEV_ATTR_SUBNET_PREFIX = 8 + RDMA_NLDEV_ATTR_LID = 9 + RDMA_NLDEV_ATTR_SM_LID = 10 + RDMA_NLDEV_ATTR_LMC = 11 + RDMA_NLDEV_ATTR_PORT_STATE = 12 + RDMA_NLDEV_ATTR_PORT_PHYS_STATE = 13 + RDMA_NLDEV_ATTR_DEV_NODE_TYPE = 14 + RDMA_NLDEV_SYS_ATTR_NETNS_MODE = 66 + RDMA_NLDEV_NET_NS_FD = 68 +) diff --git a/vendor/github.com/vishvananda/netlink/nl/route_linux.go b/vendor/github.com/vishvananda/netlink/nl/route_linux.go index f6906fcaf7e..03c1900ffa8 100644 --- a/vendor/github.com/vishvananda/netlink/nl/route_linux.go +++ b/vendor/github.com/vishvananda/netlink/nl/route_linux.go @@ -79,3 +79,29 @@ func (msg *RtNexthop) Serialize() []byte { } return buf } + +type RtGenMsg struct { + unix.RtGenmsg +} + +func NewRtGenMsg() *RtGenMsg { + return &RtGenMsg{ + RtGenmsg: unix.RtGenmsg{ + Family: unix.AF_UNSPEC, + }, + } +} + +func (msg *RtGenMsg) Len() int { + return rtaAlignOf(unix.SizeofRtGenmsg) +} + +func DeserializeRtGenMsg(b []byte) *RtGenMsg { + return &RtGenMsg{RtGenmsg: unix.RtGenmsg{Family: b[0]}} +} + +func (msg *RtGenMsg) Serialize() []byte { + out := make([]byte, msg.Len()) + out[0] = msg.Family + return out +} diff --git a/vendor/github.com/vishvananda/netlink/nl/seg6_linux.go b/vendor/github.com/vishvananda/netlink/nl/seg6_linux.go index b3425f6b0ec..5774cbb15ae 100644 --- a/vendor/github.com/vishvananda/netlink/nl/seg6_linux.go +++ b/vendor/github.com/vishvananda/netlink/nl/seg6_linux.go @@ -99,6 +99,49 @@ func DecodeSEG6Encap(buf []byte) (int, []net.IP, error) { return mode, srh.Segments, nil } +func DecodeSEG6Srh(buf []byte) ([]net.IP, error) { + native := NativeEndian() + srh := IPv6SrHdr{ + nextHdr: buf[0], + hdrLen: buf[1], + routingType: buf[2], + segmentsLeft: buf[3], + firstSegment: buf[4], + flags: buf[5], + reserved: native.Uint16(buf[6:8]), + } + buf = buf[8:] + if len(buf)%16 != 0 { + err := fmt.Errorf("DecodeSEG6Srh: error parsing Segment List (buf len: %d)", len(buf)) + return nil, err + } + for len(buf) > 0 { + srh.Segments = append(srh.Segments, net.IP(buf[:16])) + buf = buf[16:] + } + return srh.Segments, nil +} +func EncodeSEG6Srh(segments []net.IP) ([]byte, error) { + nsegs := len(segments) // nsegs: number of segments + if nsegs == 0 { + return nil, errors.New("EncodeSEG6Srh: No Segments") + } + b := make([]byte, 8, 8+len(segments)*16) + native := NativeEndian() + b[0] = 0 // srh.nextHdr (0 when calling netlink) + b[1] = uint8(16 * nsegs >> 3) // srh.hdrLen (in 8-octets unit) + b[2] = IPV6_SRCRT_TYPE_4 // srh.routingType (assigned by IANA) + b[3] = uint8(nsegs - 1) // srh.segmentsLeft + b[4] = uint8(nsegs - 1) // srh.firstSegment + b[5] = 0 // srh.flags (SR6_FLAG1_HMAC for srh_hmac) + // srh.reserved: Defined as "Tag" in draft-ietf-6man-segment-routing-header-07 + native.PutUint16(b[6:], 0) // srh.reserved + for _, netIP := range segments { + b = append(b, netIP...) // srh.Segments + } + return b, nil +} + // Helper functions func SEG6EncapModeString(mode int) string { switch mode { diff --git a/vendor/github.com/vishvananda/netlink/nl/seg6local_linux.go b/vendor/github.com/vishvananda/netlink/nl/seg6local_linux.go new file mode 100644 index 00000000000..1500177267a --- /dev/null +++ b/vendor/github.com/vishvananda/netlink/nl/seg6local_linux.go @@ -0,0 +1,76 @@ +package nl + +import () + +// seg6local parameters +const ( + SEG6_LOCAL_UNSPEC = iota + SEG6_LOCAL_ACTION + SEG6_LOCAL_SRH + SEG6_LOCAL_TABLE + SEG6_LOCAL_NH4 + SEG6_LOCAL_NH6 + SEG6_LOCAL_IIF + SEG6_LOCAL_OIF + __SEG6_LOCAL_MAX +) +const ( + SEG6_LOCAL_MAX = __SEG6_LOCAL_MAX +) + +// seg6local actions +const ( + SEG6_LOCAL_ACTION_END = iota + 1 // 1 + SEG6_LOCAL_ACTION_END_X // 2 + SEG6_LOCAL_ACTION_END_T // 3 + SEG6_LOCAL_ACTION_END_DX2 // 4 + SEG6_LOCAL_ACTION_END_DX6 // 5 + SEG6_LOCAL_ACTION_END_DX4 // 6 + SEG6_LOCAL_ACTION_END_DT6 // 7 + SEG6_LOCAL_ACTION_END_DT4 // 8 + SEG6_LOCAL_ACTION_END_B6 // 9 + SEG6_LOCAL_ACTION_END_B6_ENCAPS // 10 + SEG6_LOCAL_ACTION_END_BM // 11 + SEG6_LOCAL_ACTION_END_S // 12 + SEG6_LOCAL_ACTION_END_AS // 13 + SEG6_LOCAL_ACTION_END_AM // 14 + __SEG6_LOCAL_ACTION_MAX +) +const ( + SEG6_LOCAL_ACTION_MAX = __SEG6_LOCAL_ACTION_MAX - 1 +) + +// Helper functions +func SEG6LocalActionString(action int) string { + switch action { + case SEG6_LOCAL_ACTION_END: + return "End" + case SEG6_LOCAL_ACTION_END_X: + return "End.X" + case SEG6_LOCAL_ACTION_END_T: + return "End.T" + case SEG6_LOCAL_ACTION_END_DX2: + return "End.DX2" + case SEG6_LOCAL_ACTION_END_DX6: + return "End.DX6" + case SEG6_LOCAL_ACTION_END_DX4: + return "End.DX4" + case SEG6_LOCAL_ACTION_END_DT6: + return "End.DT6" + case SEG6_LOCAL_ACTION_END_DT4: + return "End.DT4" + case SEG6_LOCAL_ACTION_END_B6: + return "End.B6" + case SEG6_LOCAL_ACTION_END_B6_ENCAPS: + return "End.B6.Encaps" + case SEG6_LOCAL_ACTION_END_BM: + return "End.BM" + case SEG6_LOCAL_ACTION_END_S: + return "End.S" + case SEG6_LOCAL_ACTION_END_AS: + return "End.AS" + case SEG6_LOCAL_ACTION_END_AM: + return "End.AM" + } + return "unknown" +} diff --git a/vendor/github.com/vishvananda/netlink/nl/syscall.go b/vendor/github.com/vishvananda/netlink/nl/syscall.go index fc631e0e505..f7f7f92e6fa 100644 --- a/vendor/github.com/vishvananda/netlink/nl/syscall.go +++ b/vendor/github.com/vishvananda/netlink/nl/syscall.go @@ -42,16 +42,6 @@ const ( TCPDIAG_NOCOOKIE = 0xFFFFFFFF /* TCPDIAG_NOCOOKIE in net/ipv4/tcp_diag.h*/ ) -const ( - AF_MPLS = 28 -) - -const ( - RTA_NEWDST = 0x13 - RTA_ENCAP_TYPE = 0x15 - RTA_ENCAP = 0x16 -) - // RTA_ENCAP subtype const ( MPLS_IPTUNNEL_UNSPEC = iota @@ -67,6 +57,7 @@ const ( LWTUNNEL_ENCAP_IP6 LWTUNNEL_ENCAP_SEG6 LWTUNNEL_ENCAP_BPF + LWTUNNEL_ENCAP_SEG6_LOCAL ) // routing header types diff --git a/vendor/github.com/vishvananda/netlink/nl/tc_linux.go b/vendor/github.com/vishvananda/netlink/nl/tc_linux.go index 94ebc290a9e..501f554b216 100644 --- a/vendor/github.com/vishvananda/netlink/nl/tc_linux.go +++ b/vendor/github.com/vishvananda/netlink/nl/tc_linux.go @@ -1,6 +1,7 @@ package nl import ( + "encoding/binary" "unsafe" ) @@ -64,6 +65,15 @@ const ( TCA_PRIO_MAX = TCA_PRIO_MQ ) +const ( + TCA_STATS_UNSPEC = iota + TCA_STATS_BASIC + TCA_STATS_RATE_EST + TCA_STATS_QUEUE + TCA_STATS_APP + TCA_STATS_MAX = TCA_STATS_APP +) + const ( SizeofTcMsg = 0x14 SizeofTcActionMsg = 0x04 @@ -79,7 +89,10 @@ const ( SizeofTcU32Key = 0x10 SizeofTcU32Sel = 0x10 // without keys SizeofTcGen = 0x14 + SizeofTcConnmark = SizeofTcGen + 0x04 SizeofTcMirred = SizeofTcGen + 0x08 + SizeofTcTunnelKey = SizeofTcGen + 0x04 + SizeofTcSkbEdit = SizeofTcGen SizeofTcPolice = 2*SizeofTcRateSpec + 0x20 ) @@ -412,6 +425,57 @@ func (x *TcHtbGlob) Serialize() []byte { return (*(*[SizeofTcHtbGlob]byte)(unsafe.Pointer(x)))[:] } +// HFSC + +type Curve struct { + m1 uint32 + d uint32 + m2 uint32 +} + +type HfscCopt struct { + Rsc Curve + Fsc Curve + Usc Curve +} + +func (c *Curve) Attrs() (uint32, uint32, uint32) { + return c.m1, c.d, c.m2 +} + +func (c *Curve) Set(m1 uint32, d uint32, m2 uint32) { + c.m1 = m1 + c.d = d + c.m2 = m2 +} + +func DeserializeHfscCurve(b []byte) *Curve { + return &Curve{ + m1: binary.LittleEndian.Uint32(b[0:4]), + d: binary.LittleEndian.Uint32(b[4:8]), + m2: binary.LittleEndian.Uint32(b[8:12]), + } +} + +func SerializeHfscCurve(c *Curve) (b []byte) { + t := make([]byte, binary.MaxVarintLen32) + binary.LittleEndian.PutUint32(t, c.m1) + b = append(b, t[:4]...) + binary.LittleEndian.PutUint32(t, c.d) + b = append(b, t[:4]...) + binary.LittleEndian.PutUint32(t, c.m2) + b = append(b, t[:4]...) + return b +} + +type TcHfscOpt struct { + Defcls uint16 +} + +func (x *TcHfscOpt) Serialize() []byte { + return (*(*[2]byte)(unsafe.Pointer(x)))[:] +} + const ( TCA_U32_UNSPEC = iota TCA_U32_CLASSID @@ -586,11 +650,47 @@ const ( TCA_BPF_FD TCA_BPF_NAME TCA_BPF_FLAGS - TCA_BPF_MAX = TCA_BPF_FLAGS + TCA_BPF_FLAGS_GEN + TCA_BPF_TAG + TCA_BPF_ID + TCA_BPF_MAX = TCA_BPF_ID ) type TcBpf TcGen +const ( + TCA_ACT_CONNMARK = 14 +) + +const ( + TCA_CONNMARK_UNSPEC = iota + TCA_CONNMARK_PARMS + TCA_CONNMARK_TM + TCA_CONNMARK_MAX = TCA_CONNMARK_TM +) + +// struct tc_connmark { +// tc_gen; +// __u16 zone; +// }; + +type TcConnmark struct { + TcGen + Zone uint16 +} + +func (msg *TcConnmark) Len() int { + return SizeofTcConnmark +} + +func DeserializeTcConnmark(b []byte) *TcConnmark { + return (*TcConnmark)(unsafe.Pointer(&b[0:SizeofTcConnmark][0])) +} + +func (x *TcConnmark) Serialize() []byte { + return (*(*[SizeofTcConnmark]byte)(unsafe.Pointer(x)))[:] +} + const ( TCA_ACT_MIRRED = 8 ) @@ -626,6 +726,63 @@ func (x *TcMirred) Serialize() []byte { return (*(*[SizeofTcMirred]byte)(unsafe.Pointer(x)))[:] } +const ( + TCA_TUNNEL_KEY_UNSPEC = iota + TCA_TUNNEL_KEY_TM + TCA_TUNNEL_KEY_PARMS + TCA_TUNNEL_KEY_ENC_IPV4_SRC + TCA_TUNNEL_KEY_ENC_IPV4_DST + TCA_TUNNEL_KEY_ENC_IPV6_SRC + TCA_TUNNEL_KEY_ENC_IPV6_DST + TCA_TUNNEL_KEY_ENC_KEY_ID + TCA_TUNNEL_KEY_MAX = TCA_TUNNEL_KEY_ENC_KEY_ID +) + +type TcTunnelKey struct { + TcGen + Action int32 +} + +func (x *TcTunnelKey) Len() int { + return SizeofTcTunnelKey +} + +func DeserializeTunnelKey(b []byte) *TcTunnelKey { + return (*TcTunnelKey)(unsafe.Pointer(&b[0:SizeofTcTunnelKey][0])) +} + +func (x *TcTunnelKey) Serialize() []byte { + return (*(*[SizeofTcTunnelKey]byte)(unsafe.Pointer(x)))[:] +} + +const ( + TCA_SKBEDIT_UNSPEC = iota + TCA_SKBEDIT_TM + TCA_SKBEDIT_PARMS + TCA_SKBEDIT_PRIORITY + TCA_SKBEDIT_QUEUE_MAPPING + TCA_SKBEDIT_MARK + TCA_SKBEDIT_PAD + TCA_SKBEDIT_PTYPE + TCA_SKBEDIT_MAX = TCA_SKBEDIT_MARK +) + +type TcSkbEdit struct { + TcGen +} + +func (x *TcSkbEdit) Len() int { + return SizeofTcSkbEdit +} + +func DeserializeSkbEdit(b []byte) *TcSkbEdit { + return (*TcSkbEdit)(unsafe.Pointer(&b[0:SizeofTcSkbEdit][0])) +} + +func (x *TcSkbEdit) Serialize() []byte { + return (*(*[SizeofTcSkbEdit]byte)(unsafe.Pointer(x)))[:] +} + // struct tc_police { // __u32 index; // int action; @@ -708,3 +865,10 @@ const ( TCA_FQ_CODEL_DROP_BATCH_SIZE TCA_FQ_CODEL_MEMORY_LIMIT ) + +const ( + TCA_HFSC_UNSPEC = iota + TCA_HFSC_RSC + TCA_HFSC_FSC + TCA_HFSC_USC +) diff --git a/vendor/github.com/vishvananda/netlink/nl/xfrm_linux.go b/vendor/github.com/vishvananda/netlink/nl/xfrm_linux.go index 09a2ffa10ef..dce9073f7b5 100644 --- a/vendor/github.com/vishvananda/netlink/nl/xfrm_linux.go +++ b/vendor/github.com/vishvananda/netlink/nl/xfrm_linux.go @@ -50,34 +50,44 @@ const ( // Attribute types const ( /* Netlink message attributes. */ - XFRMA_UNSPEC = 0x00 - XFRMA_ALG_AUTH = 0x01 /* struct xfrm_algo */ - XFRMA_ALG_CRYPT = 0x02 /* struct xfrm_algo */ - XFRMA_ALG_COMP = 0x03 /* struct xfrm_algo */ - XFRMA_ENCAP = 0x04 /* struct xfrm_algo + struct xfrm_encap_tmpl */ - XFRMA_TMPL = 0x05 /* 1 or more struct xfrm_user_tmpl */ - XFRMA_SA = 0x06 /* struct xfrm_usersa_info */ - XFRMA_POLICY = 0x07 /* struct xfrm_userpolicy_info */ - XFRMA_SEC_CTX = 0x08 /* struct xfrm_sec_ctx */ - XFRMA_LTIME_VAL = 0x09 - XFRMA_REPLAY_VAL = 0x0a - XFRMA_REPLAY_THRESH = 0x0b - XFRMA_ETIMER_THRESH = 0x0c - XFRMA_SRCADDR = 0x0d /* xfrm_address_t */ - XFRMA_COADDR = 0x0e /* xfrm_address_t */ - XFRMA_LASTUSED = 0x0f /* unsigned long */ - XFRMA_POLICY_TYPE = 0x10 /* struct xfrm_userpolicy_type */ - XFRMA_MIGRATE = 0x11 - XFRMA_ALG_AEAD = 0x12 /* struct xfrm_algo_aead */ - XFRMA_KMADDRESS = 0x13 /* struct xfrm_user_kmaddress */ - XFRMA_ALG_AUTH_TRUNC = 0x14 /* struct xfrm_algo_auth */ - XFRMA_MARK = 0x15 /* struct xfrm_mark */ - XFRMA_TFCPAD = 0x16 /* __u32 */ - XFRMA_REPLAY_ESN_VAL = 0x17 /* struct xfrm_replay_esn */ - XFRMA_SA_EXTRA_FLAGS = 0x18 /* __u32 */ - XFRMA_MAX = 0x18 + XFRMA_UNSPEC = iota + XFRMA_ALG_AUTH /* struct xfrm_algo */ + XFRMA_ALG_CRYPT /* struct xfrm_algo */ + XFRMA_ALG_COMP /* struct xfrm_algo */ + XFRMA_ENCAP /* struct xfrm_algo + struct xfrm_encap_tmpl */ + XFRMA_TMPL /* 1 or more struct xfrm_user_tmpl */ + XFRMA_SA /* struct xfrm_usersa_info */ + XFRMA_POLICY /* struct xfrm_userpolicy_info */ + XFRMA_SEC_CTX /* struct xfrm_sec_ctx */ + XFRMA_LTIME_VAL + XFRMA_REPLAY_VAL + XFRMA_REPLAY_THRESH + XFRMA_ETIMER_THRESH + XFRMA_SRCADDR /* xfrm_address_t */ + XFRMA_COADDR /* xfrm_address_t */ + XFRMA_LASTUSED /* unsigned long */ + XFRMA_POLICY_TYPE /* struct xfrm_userpolicy_type */ + XFRMA_MIGRATE + XFRMA_ALG_AEAD /* struct xfrm_algo_aead */ + XFRMA_KMADDRESS /* struct xfrm_user_kmaddress */ + XFRMA_ALG_AUTH_TRUNC /* struct xfrm_algo_auth */ + XFRMA_MARK /* struct xfrm_mark */ + XFRMA_TFCPAD /* __u32 */ + XFRMA_REPLAY_ESN_VAL /* struct xfrm_replay_esn */ + XFRMA_SA_EXTRA_FLAGS /* __u32 */ + XFRMA_PROTO /* __u8 */ + XFRMA_ADDRESS_FILTER /* struct xfrm_address_filter */ + XFRMA_PAD + XFRMA_OFFLOAD_DEV /* struct xfrm_state_offload */ + XFRMA_SET_MARK /* __u32 */ + XFRMA_SET_MARK_MASK /* __u32 */ + XFRMA_IF_ID /* __u32 */ + + XFRMA_MAX = iota - 1 ) +const XFRMA_OUTPUT_MARK = XFRMA_SET_MARK + const ( SizeofXfrmAddress = 0x10 SizeofXfrmSelector = 0x38 diff --git a/vendor/github.com/vishvananda/netlink/protinfo.go b/vendor/github.com/vishvananda/netlink/protinfo.go index 0087c4438bc..60b23b3742c 100644 --- a/vendor/github.com/vishvananda/netlink/protinfo.go +++ b/vendor/github.com/vishvananda/netlink/protinfo.go @@ -18,6 +18,10 @@ type Protinfo struct { // String returns a list of enabled flags func (prot *Protinfo) String() string { + if prot == nil { + return "" + } + var boolStrings []string if prot.Hairpin { boolStrings = append(boolStrings, "Hairpin") diff --git a/vendor/github.com/vishvananda/netlink/protinfo_linux.go b/vendor/github.com/vishvananda/netlink/protinfo_linux.go index 43c465f0575..15b65123cef 100644 --- a/vendor/github.com/vishvananda/netlink/protinfo_linux.go +++ b/vendor/github.com/vishvananda/netlink/protinfo_linux.go @@ -41,7 +41,7 @@ func (h *Handle) LinkGetProtinfo(link Link) (Protinfo, error) { if err != nil { return pi, err } - pi = *parseProtinfo(infos) + pi = parseProtinfo(infos) return pi, nil } @@ -49,8 +49,7 @@ func (h *Handle) LinkGetProtinfo(link Link) (Protinfo, error) { return pi, fmt.Errorf("Device with index %d not found", base.Index) } -func parseProtinfo(infos []syscall.NetlinkRouteAttr) *Protinfo { - var pi Protinfo +func parseProtinfo(infos []syscall.NetlinkRouteAttr) (pi Protinfo) { for _, info := range infos { switch info.Attr.Type { case nl.IFLA_BRPORT_MODE: @@ -71,5 +70,5 @@ func parseProtinfo(infos []syscall.NetlinkRouteAttr) *Protinfo { pi.ProxyArpWiFi = byteToBool(info.Value[0]) } } - return &pi + return } diff --git a/vendor/github.com/vishvananda/netlink/qdisc.go b/vendor/github.com/vishvananda/netlink/qdisc.go index 3df4b5c291c..af78305ac26 100644 --- a/vendor/github.com/vishvananda/netlink/qdisc.go +++ b/vendor/github.com/vishvananda/netlink/qdisc.go @@ -176,6 +176,13 @@ type Netem struct { CorruptCorr uint32 } +func (netem *Netem) String() string { + return fmt.Sprintf( + "{Latency: %v, Limit: %v, Loss: %v, Gap: %v, Duplicate: %v, Jitter: %v}", + netem.Latency, netem.Limit, netem.Loss, netem.Gap, netem.Duplicate, netem.Jitter, + ) +} + func (qdisc *Netem) Attrs() *QdiscAttrs { return &qdisc.QdiscAttrs } @@ -231,6 +238,33 @@ func (qdisc *GenericQdisc) Type() string { return qdisc.QdiscType } +type Hfsc struct { + QdiscAttrs + Defcls uint16 +} + +func NewHfsc(attrs QdiscAttrs) *Hfsc { + return &Hfsc{ + QdiscAttrs: attrs, + Defcls: 1, + } +} + +func (hfsc *Hfsc) Attrs() *QdiscAttrs { + return &hfsc.QdiscAttrs +} + +func (hfsc *Hfsc) Type() string { + return "hfsc" +} + +func (hfsc *Hfsc) String() string { + return fmt.Sprintf( + "{%v -- default: %d}", + hfsc.Attrs(), hfsc.Defcls, + ) +} + // Fq is a classless packet scheduler meant to be mostly used for locally generated traffic. type Fq struct { QdiscAttrs @@ -249,6 +283,13 @@ type Fq struct { LowRateThreshold uint32 } +func (fq *Fq) String() string { + return fmt.Sprintf( + "{PacketLimit: %v, FlowPacketLimit: %v, Quantum: %v, InitialQuantum: %v, Pacing: %v, FlowDefaultRate: %v, FlowMaxRate: %v, Buckets: %v, FlowRefillDelay: %v, LowRateThreshold: %v}", + fq.PacketLimit, fq.FlowPacketLimit, fq.Quantum, fq.InitialQuantum, fq.Pacing, fq.FlowDefaultRate, fq.FlowMaxRate, fq.Buckets, fq.FlowRefillDelay, fq.LowRateThreshold, + ) +} + func NewFq(attrs QdiscAttrs) *Fq { return &Fq{ QdiscAttrs: attrs, @@ -276,6 +317,13 @@ type FqCodel struct { // There are some more attributes here, but support for them seems not ubiquitous } +func (fqcodel *FqCodel) String() string { + return fmt.Sprintf( + "{%v -- Target: %v, Limit: %v, Interval: %v, ECM: %v, Flows: %v, Quantum: %v}", + fqcodel.Attrs(), fqcodel.Target, fqcodel.Limit, fqcodel.Interval, fqcodel.ECN, fqcodel.Flows, fqcodel.Quantum, + ) +} + func NewFqCodel(attrs QdiscAttrs) *FqCodel { return &FqCodel{ QdiscAttrs: attrs, diff --git a/vendor/github.com/vishvananda/netlink/qdisc_linux.go b/vendor/github.com/vishvananda/netlink/qdisc_linux.go index 3794ac18a83..e9eee59084f 100644 --- a/vendor/github.com/vishvananda/netlink/qdisc_linux.go +++ b/vendor/github.com/vishvananda/netlink/qdisc_linux.go @@ -175,15 +175,15 @@ func qdiscPayload(req *nl.NetlinkRequest, qdisc Qdisc) error { opt.Peakrate.Rate = uint32(qdisc.Peakrate) opt.Limit = qdisc.Limit opt.Buffer = qdisc.Buffer - nl.NewRtAttrChild(options, nl.TCA_TBF_PARMS, opt.Serialize()) + options.AddRtAttr(nl.TCA_TBF_PARMS, opt.Serialize()) if qdisc.Rate >= uint64(1<<32) { - nl.NewRtAttrChild(options, nl.TCA_TBF_RATE64, nl.Uint64Attr(qdisc.Rate)) + options.AddRtAttr(nl.TCA_TBF_RATE64, nl.Uint64Attr(qdisc.Rate)) } if qdisc.Peakrate >= uint64(1<<32) { - nl.NewRtAttrChild(options, nl.TCA_TBF_PRATE64, nl.Uint64Attr(qdisc.Peakrate)) + options.AddRtAttr(nl.TCA_TBF_PRATE64, nl.Uint64Attr(qdisc.Peakrate)) } if qdisc.Peakrate > 0 { - nl.NewRtAttrChild(options, nl.TCA_TBF_PBURST, nl.Uint32Attr(qdisc.Minburst)) + options.AddRtAttr(nl.TCA_TBF_PBURST, nl.Uint32Attr(qdisc.Minburst)) } case *Htb: opt := nl.TcHtbGlob{} @@ -193,8 +193,12 @@ func qdiscPayload(req *nl.NetlinkRequest, qdisc Qdisc) error { // TODO: Handle Debug properly. For now default to 0 opt.Debug = qdisc.Debug opt.DirectPkts = qdisc.DirectPkts - nl.NewRtAttrChild(options, nl.TCA_HTB_INIT, opt.Serialize()) - // nl.NewRtAttrChild(options, nl.TCA_HTB_DIRECT_QLEN, opt.Serialize()) + options.AddRtAttr(nl.TCA_HTB_INIT, opt.Serialize()) + // options.AddRtAttr(nl.TCA_HTB_DIRECT_QLEN, opt.Serialize()) + case *Hfsc: + opt := nl.TcHfscOpt{} + opt.Defcls = qdisc.Defcls + options = nl.NewRtAttr(nl.TCA_OPTIONS, opt.Serialize()) case *Netem: opt := nl.TcNetemQopt{} opt.Latency = qdisc.Latency @@ -211,21 +215,21 @@ func qdiscPayload(req *nl.NetlinkRequest, qdisc Qdisc) error { corr.DupCorr = qdisc.DuplicateCorr if corr.DelayCorr > 0 || corr.LossCorr > 0 || corr.DupCorr > 0 { - nl.NewRtAttrChild(options, nl.TCA_NETEM_CORR, corr.Serialize()) + options.AddRtAttr(nl.TCA_NETEM_CORR, corr.Serialize()) } // Corruption corruption := nl.TcNetemCorrupt{} corruption.Probability = qdisc.CorruptProb corruption.Correlation = qdisc.CorruptCorr if corruption.Probability > 0 { - nl.NewRtAttrChild(options, nl.TCA_NETEM_CORRUPT, corruption.Serialize()) + options.AddRtAttr(nl.TCA_NETEM_CORRUPT, corruption.Serialize()) } // Reorder reorder := nl.TcNetemReorder{} reorder.Probability = qdisc.ReorderProb reorder.Correlation = qdisc.ReorderCorr if reorder.Probability > 0 { - nl.NewRtAttrChild(options, nl.TCA_NETEM_REORDER, reorder.Serialize()) + options.AddRtAttr(nl.TCA_NETEM_REORDER, reorder.Serialize()) } case *Ingress: // ingress filters must use the proper handle @@ -233,50 +237,54 @@ func qdiscPayload(req *nl.NetlinkRequest, qdisc Qdisc) error { return fmt.Errorf("Ingress filters must set Parent to HANDLE_INGRESS") } case *FqCodel: - nl.NewRtAttrChild(options, nl.TCA_FQ_CODEL_ECN, nl.Uint32Attr((uint32(qdisc.ECN)))) + options.AddRtAttr(nl.TCA_FQ_CODEL_ECN, nl.Uint32Attr((uint32(qdisc.ECN)))) if qdisc.Limit > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_CODEL_LIMIT, nl.Uint32Attr((uint32(qdisc.Limit)))) + options.AddRtAttr(nl.TCA_FQ_CODEL_LIMIT, nl.Uint32Attr((uint32(qdisc.Limit)))) } if qdisc.Interval > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_CODEL_INTERVAL, nl.Uint32Attr((uint32(qdisc.Interval)))) + options.AddRtAttr(nl.TCA_FQ_CODEL_INTERVAL, nl.Uint32Attr((uint32(qdisc.Interval)))) } if qdisc.Flows > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_CODEL_FLOWS, nl.Uint32Attr((uint32(qdisc.Flows)))) + options.AddRtAttr(nl.TCA_FQ_CODEL_FLOWS, nl.Uint32Attr((uint32(qdisc.Flows)))) } if qdisc.Quantum > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_CODEL_QUANTUM, nl.Uint32Attr((uint32(qdisc.Quantum)))) + options.AddRtAttr(nl.TCA_FQ_CODEL_QUANTUM, nl.Uint32Attr((uint32(qdisc.Quantum)))) } case *Fq: - nl.NewRtAttrChild(options, nl.TCA_FQ_RATE_ENABLE, nl.Uint32Attr((uint32(qdisc.Pacing)))) + options.AddRtAttr(nl.TCA_FQ_RATE_ENABLE, nl.Uint32Attr((uint32(qdisc.Pacing)))) if qdisc.Buckets > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_BUCKETS_LOG, nl.Uint32Attr((uint32(qdisc.Buckets)))) + options.AddRtAttr(nl.TCA_FQ_BUCKETS_LOG, nl.Uint32Attr((uint32(qdisc.Buckets)))) } if qdisc.LowRateThreshold > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_LOW_RATE_THRESHOLD, nl.Uint32Attr((uint32(qdisc.LowRateThreshold)))) + options.AddRtAttr(nl.TCA_FQ_LOW_RATE_THRESHOLD, nl.Uint32Attr((uint32(qdisc.LowRateThreshold)))) } if qdisc.Quantum > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_QUANTUM, nl.Uint32Attr((uint32(qdisc.Quantum)))) + options.AddRtAttr(nl.TCA_FQ_QUANTUM, nl.Uint32Attr((uint32(qdisc.Quantum)))) } if qdisc.InitialQuantum > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_INITIAL_QUANTUM, nl.Uint32Attr((uint32(qdisc.InitialQuantum)))) + options.AddRtAttr(nl.TCA_FQ_INITIAL_QUANTUM, nl.Uint32Attr((uint32(qdisc.InitialQuantum)))) } if qdisc.FlowRefillDelay > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_FLOW_REFILL_DELAY, nl.Uint32Attr((uint32(qdisc.FlowRefillDelay)))) + options.AddRtAttr(nl.TCA_FQ_FLOW_REFILL_DELAY, nl.Uint32Attr((uint32(qdisc.FlowRefillDelay)))) } if qdisc.FlowPacketLimit > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_FLOW_PLIMIT, nl.Uint32Attr((uint32(qdisc.FlowPacketLimit)))) + options.AddRtAttr(nl.TCA_FQ_FLOW_PLIMIT, nl.Uint32Attr((uint32(qdisc.FlowPacketLimit)))) } if qdisc.FlowMaxRate > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_FLOW_MAX_RATE, nl.Uint32Attr((uint32(qdisc.FlowMaxRate)))) + options.AddRtAttr(nl.TCA_FQ_FLOW_MAX_RATE, nl.Uint32Attr((uint32(qdisc.FlowMaxRate)))) } if qdisc.FlowDefaultRate > 0 { - nl.NewRtAttrChild(options, nl.TCA_FQ_FLOW_DEFAULT_RATE, nl.Uint32Attr((uint32(qdisc.FlowDefaultRate)))) + options.AddRtAttr(nl.TCA_FQ_FLOW_DEFAULT_RATE, nl.Uint32Attr((uint32(qdisc.FlowDefaultRate)))) } + default: + options = nil } - req.AddData(options) + if options != nil { + req.AddData(options) + } return nil } @@ -348,6 +356,8 @@ func (h *Handle) QdiscList(link Link) ([]Qdisc, error) { qdisc = &Htb{} case "fq": qdisc = &Fq{} + case "hfsc": + qdisc = &Hfsc{} case "fq_codel": qdisc = &FqCodel{} case "netem": @@ -375,6 +385,10 @@ func (h *Handle) QdiscList(link Link) ([]Qdisc, error) { if err := parseTbfData(qdisc, data); err != nil { return nil, err } + case "hfsc": + if err := parseHfscData(qdisc, attr.Value); err != nil { + return nil, err + } case "htb": data, err := nl.ParseRouteAttr(attr.Value) if err != nil { @@ -474,6 +488,13 @@ func parseFqCodelData(qdisc Qdisc, data []syscall.NetlinkRouteAttr) error { return nil } +func parseHfscData(qdisc Qdisc, data []byte) error { + Hfsc := qdisc.(*Hfsc) + native = nl.NativeEndian() + Hfsc.Defcls = native.Uint16(data) + return nil +} + func parseFqData(qdisc Qdisc, data []syscall.NetlinkRouteAttr) error { native = nl.NativeEndian() fq := qdisc.(*Fq) diff --git a/vendor/github.com/vishvananda/netlink/rdma_link_linux.go b/vendor/github.com/vishvananda/netlink/rdma_link_linux.go new file mode 100644 index 00000000000..2d0bdc8c36f --- /dev/null +++ b/vendor/github.com/vishvananda/netlink/rdma_link_linux.go @@ -0,0 +1,264 @@ +package netlink + +import ( + "bytes" + "encoding/binary" + "fmt" + "net" + + "github.com/vishvananda/netlink/nl" + "golang.org/x/sys/unix" +) + +// LinkAttrs represents data shared by most link types +type RdmaLinkAttrs struct { + Index uint32 + Name string + FirmwareVersion string + NodeGuid string + SysImageGuid string +} + +// Link represents a rdma device from netlink. +type RdmaLink struct { + Attrs RdmaLinkAttrs +} + +func getProtoField(clientType int, op int) int { + return ((clientType << nl.RDMA_NL_GET_CLIENT_SHIFT) | op) +} + +func uint64ToGuidString(guid uint64) string { + //Convert to byte array + sysGuidBytes := new(bytes.Buffer) + binary.Write(sysGuidBytes, binary.LittleEndian, guid) + + //Convert to HardwareAddr + sysGuidNet := net.HardwareAddr(sysGuidBytes.Bytes()) + + //Get the String + return sysGuidNet.String() +} + +func executeOneGetRdmaLink(data []byte) (*RdmaLink, error) { + + link := RdmaLink{} + + reader := bytes.NewReader(data) + for reader.Len() >= 4 { + _, attrType, len, value := parseNfAttrTLV(reader) + + switch attrType { + case nl.RDMA_NLDEV_ATTR_DEV_INDEX: + var Index uint32 + r := bytes.NewReader(value) + binary.Read(r, nl.NativeEndian(), &Index) + link.Attrs.Index = Index + case nl.RDMA_NLDEV_ATTR_DEV_NAME: + link.Attrs.Name = string(value[0 : len-1]) + case nl.RDMA_NLDEV_ATTR_FW_VERSION: + link.Attrs.FirmwareVersion = string(value[0 : len-1]) + case nl.RDMA_NLDEV_ATTR_NODE_GUID: + var guid uint64 + r := bytes.NewReader(value) + binary.Read(r, nl.NativeEndian(), &guid) + link.Attrs.NodeGuid = uint64ToGuidString(guid) + case nl.RDMA_NLDEV_ATTR_SYS_IMAGE_GUID: + var sysGuid uint64 + r := bytes.NewReader(value) + binary.Read(r, nl.NativeEndian(), &sysGuid) + link.Attrs.SysImageGuid = uint64ToGuidString(sysGuid) + } + if (len % 4) != 0 { + // Skip pad bytes + reader.Seek(int64(4-(len%4)), seekCurrent) + } + } + return &link, nil +} + +func execRdmaGetLink(req *nl.NetlinkRequest, name string) (*RdmaLink, error) { + + msgs, err := req.Execute(unix.NETLINK_RDMA, 0) + if err != nil { + return nil, err + } + for _, m := range msgs { + link, err := executeOneGetRdmaLink(m) + if err != nil { + return nil, err + } + if link.Attrs.Name == name { + return link, nil + } + } + return nil, fmt.Errorf("Rdma device %v not found", name) +} + +func execRdmaSetLink(req *nl.NetlinkRequest) error { + + _, err := req.Execute(unix.NETLINK_RDMA, 0) + return err +} + +// RdmaLinkByName finds a link by name and returns a pointer to the object if +// found and nil error, otherwise returns error code. +func RdmaLinkByName(name string) (*RdmaLink, error) { + return pkgHandle.RdmaLinkByName(name) +} + +// RdmaLinkByName finds a link by name and returns a pointer to the object if +// found and nil error, otherwise returns error code. +func (h *Handle) RdmaLinkByName(name string) (*RdmaLink, error) { + + proto := getProtoField(nl.RDMA_NL_NLDEV, nl.RDMA_NLDEV_CMD_GET) + req := h.newNetlinkRequest(proto, unix.NLM_F_ACK|unix.NLM_F_DUMP) + + return execRdmaGetLink(req, name) +} + +// RdmaLinkSetName sets the name of the rdma link device. Return nil on success +// or error otherwise. +// Equivalent to: `rdma dev set $old_devname name $name` +func RdmaLinkSetName(link *RdmaLink, name string) error { + return pkgHandle.RdmaLinkSetName(link, name) +} + +// RdmaLinkSetName sets the name of the rdma link device. Return nil on success +// or error otherwise. +// Equivalent to: `rdma dev set $old_devname name $name` +func (h *Handle) RdmaLinkSetName(link *RdmaLink, name string) error { + proto := getProtoField(nl.RDMA_NL_NLDEV, nl.RDMA_NLDEV_CMD_SET) + req := h.newNetlinkRequest(proto, unix.NLM_F_ACK) + + b := make([]byte, 4) + native.PutUint32(b, uint32(link.Attrs.Index)) + data := nl.NewRtAttr(nl.RDMA_NLDEV_ATTR_DEV_INDEX, b) + req.AddData(data) + + b = make([]byte, len(name)+1) + copy(b, name) + data = nl.NewRtAttr(nl.RDMA_NLDEV_ATTR_DEV_NAME, b) + req.AddData(data) + + return execRdmaSetLink(req) +} + +func netnsModeToString(mode uint8) string { + switch mode { + case 0: + return "exclusive" + case 1: + return "shared" + default: + return "unknown" + } +} + +func executeOneGetRdmaNetnsMode(data []byte) (string, error) { + reader := bytes.NewReader(data) + for reader.Len() >= 4 { + _, attrType, len, value := parseNfAttrTLV(reader) + + switch attrType { + case nl.RDMA_NLDEV_SYS_ATTR_NETNS_MODE: + var mode uint8 + r := bytes.NewReader(value) + binary.Read(r, nl.NativeEndian(), &mode) + return netnsModeToString(mode), nil + } + if (len % 4) != 0 { + // Skip pad bytes + reader.Seek(int64(4-(len%4)), seekCurrent) + } + } + return "", fmt.Errorf("Invalid netns mode") +} + +// RdmaSystemGetNetnsMode gets the net namespace mode for RDMA subsystem +// Returns mode string and error status as nil on success or returns error +// otherwise. +// Equivalent to: `rdma system show netns' +func RdmaSystemGetNetnsMode() (string, error) { + return pkgHandle.RdmaSystemGetNetnsMode() +} + +// RdmaSystemGetNetnsMode gets the net namespace mode for RDMA subsystem +// Returns mode string and error status as nil on success or returns error +// otherwise. +// Equivalent to: `rdma system show netns' +func (h *Handle) RdmaSystemGetNetnsMode() (string, error) { + + proto := getProtoField(nl.RDMA_NL_NLDEV, nl.RDMA_NLDEV_CMD_SYS_GET) + req := h.newNetlinkRequest(proto, unix.NLM_F_ACK) + + msgs, err := req.Execute(unix.NETLINK_RDMA, 0) + if err != nil { + return "", err + } + if len(msgs) == 0 { + return "", fmt.Errorf("No valid response from kernel") + } + return executeOneGetRdmaNetnsMode(msgs[0]) +} + +func netnsModeStringToUint8(mode string) (uint8, error) { + switch mode { + case "exclusive": + return 0, nil + case "shared": + return 1, nil + default: + return 0, fmt.Errorf("Invalid mode; %q", mode) + } +} + +// RdmaSystemSetNetnsMode sets the net namespace mode for RDMA subsystem +// Returns nil on success or appropriate error code. +// Equivalent to: `rdma system set netns { shared | exclusive }' +func RdmaSystemSetNetnsMode(NewMode string) error { + return pkgHandle.RdmaSystemSetNetnsMode(NewMode) +} + +// RdmaSystemSetNetnsMode sets the net namespace mode for RDMA subsystem +// Returns nil on success or appropriate error code. +// Equivalent to: `rdma system set netns { shared | exclusive }' +func (h *Handle) RdmaSystemSetNetnsMode(NewMode string) error { + value, err := netnsModeStringToUint8(NewMode) + if err != nil { + return err + } + + proto := getProtoField(nl.RDMA_NL_NLDEV, nl.RDMA_NLDEV_CMD_SYS_SET) + req := h.newNetlinkRequest(proto, unix.NLM_F_ACK) + + data := nl.NewRtAttr(nl.RDMA_NLDEV_SYS_ATTR_NETNS_MODE, []byte{value}) + req.AddData(data) + + _, err = req.Execute(unix.NETLINK_RDMA, 0) + return err +} + +// RdmaLinkSetNsFd puts the RDMA device into a new network namespace. The +// fd must be an open file descriptor to a network namespace. +// Similar to: `rdma dev set $dev netns $ns` +func RdmaLinkSetNsFd(link *RdmaLink, fd uint32) error { + return pkgHandle.RdmaLinkSetNsFd(link, fd) +} + +// RdmaLinkSetNsFd puts the RDMA device into a new network namespace. The +// fd must be an open file descriptor to a network namespace. +// Similar to: `rdma dev set $dev netns $ns` +func (h *Handle) RdmaLinkSetNsFd(link *RdmaLink, fd uint32) error { + proto := getProtoField(nl.RDMA_NL_NLDEV, nl.RDMA_NLDEV_CMD_SET) + req := h.newNetlinkRequest(proto, unix.NLM_F_ACK) + + data := nl.NewRtAttr(nl.RDMA_NLDEV_ATTR_DEV_INDEX, + nl.Uint32Attr(link.Attrs.Index)) + req.AddData(data) + + data = nl.NewRtAttr(nl.RDMA_NLDEV_NET_NS_FD, nl.Uint32Attr(fd)) + req.AddData(data) + + return execRdmaSetLink(req) +} diff --git a/vendor/github.com/vishvananda/netlink/route.go b/vendor/github.com/vishvananda/netlink/route.go index 2cd58ee3342..58ff1af600f 100644 --- a/vendor/github.com/vishvananda/netlink/route.go +++ b/vendor/github.com/vishvananda/netlink/route.go @@ -47,6 +47,7 @@ type Route struct { Encap Encap MTU int AdvMSS int + Hoplimit int } func (r Route) String() string { @@ -89,6 +90,7 @@ func (r Route) Equal(x Route) bool { r.Table == x.Table && r.Type == x.Type && r.Tos == x.Tos && + r.Hoplimit == x.Hoplimit && r.Flags == x.Flags && (r.MPLSDst == x.MPLSDst || (r.MPLSDst != nil && x.MPLSDst != nil && *r.MPLSDst == *x.MPLSDst)) && (r.NewDst == x.NewDst || (r.NewDst != nil && r.NewDst.Equal(x.NewDst))) && diff --git a/vendor/github.com/vishvananda/netlink/route_linux.go b/vendor/github.com/vishvananda/netlink/route_linux.go index 3f856711f3c..c69c595ed3c 100644 --- a/vendor/github.com/vishvananda/netlink/route_linux.go +++ b/vendor/github.com/vishvananda/netlink/route_linux.go @@ -32,6 +32,7 @@ const ( RT_FILTER_SRC RT_FILTER_GW RT_FILTER_TABLE + RT_FILTER_HOPLIMIT ) const ( @@ -207,6 +208,7 @@ func (e *SEG6Encap) Decode(buf []byte) error { } buf = buf[:l] // make sure buf size upper limit is Length typ := native.Uint16(buf[2:]) + // LWTUNNEL_ENCAP_SEG6 has only one attr type SEG6_IPTUNNEL_SRH if typ != nl.SEG6_IPTUNNEL_SRH { return fmt.Errorf("unknown SEG6 Type: %d", typ) } @@ -259,6 +261,188 @@ func (e *SEG6Encap) Equal(x Encap) bool { return true } +// SEG6LocalEncap definitions +type SEG6LocalEncap struct { + Flags [nl.SEG6_LOCAL_MAX]bool + Action int + Segments []net.IP // from SRH in seg6_local_lwt + Table int // table id for End.T and End.DT6 + InAddr net.IP + In6Addr net.IP + Iif int + Oif int +} + +func (e *SEG6LocalEncap) Type() int { + return nl.LWTUNNEL_ENCAP_SEG6_LOCAL +} +func (e *SEG6LocalEncap) Decode(buf []byte) error { + attrs, err := nl.ParseRouteAttr(buf) + if err != nil { + return err + } + native := nl.NativeEndian() + for _, attr := range attrs { + switch attr.Attr.Type { + case nl.SEG6_LOCAL_ACTION: + e.Action = int(native.Uint32(attr.Value[0:4])) + e.Flags[nl.SEG6_LOCAL_ACTION] = true + case nl.SEG6_LOCAL_SRH: + e.Segments, err = nl.DecodeSEG6Srh(attr.Value[:]) + e.Flags[nl.SEG6_LOCAL_SRH] = true + case nl.SEG6_LOCAL_TABLE: + e.Table = int(native.Uint32(attr.Value[0:4])) + e.Flags[nl.SEG6_LOCAL_TABLE] = true + case nl.SEG6_LOCAL_NH4: + e.InAddr = net.IP(attr.Value[0:4]) + e.Flags[nl.SEG6_LOCAL_NH4] = true + case nl.SEG6_LOCAL_NH6: + e.In6Addr = net.IP(attr.Value[0:16]) + e.Flags[nl.SEG6_LOCAL_NH6] = true + case nl.SEG6_LOCAL_IIF: + e.Iif = int(native.Uint32(attr.Value[0:4])) + e.Flags[nl.SEG6_LOCAL_IIF] = true + case nl.SEG6_LOCAL_OIF: + e.Oif = int(native.Uint32(attr.Value[0:4])) + e.Flags[nl.SEG6_LOCAL_OIF] = true + } + } + return err +} +func (e *SEG6LocalEncap) Encode() ([]byte, error) { + var err error + native := nl.NativeEndian() + res := make([]byte, 8) + native.PutUint16(res, 8) // length + native.PutUint16(res[2:], nl.SEG6_LOCAL_ACTION) + native.PutUint32(res[4:], uint32(e.Action)) + if e.Flags[nl.SEG6_LOCAL_SRH] { + srh, err := nl.EncodeSEG6Srh(e.Segments) + if err != nil { + return nil, err + } + attr := make([]byte, 4) + native.PutUint16(attr, uint16(len(srh)+4)) + native.PutUint16(attr[2:], nl.SEG6_LOCAL_SRH) + attr = append(attr, srh...) + res = append(res, attr...) + } + if e.Flags[nl.SEG6_LOCAL_TABLE] { + attr := make([]byte, 8) + native.PutUint16(attr, 8) + native.PutUint16(attr[2:], nl.SEG6_LOCAL_TABLE) + native.PutUint32(attr[4:], uint32(e.Table)) + res = append(res, attr...) + } + if e.Flags[nl.SEG6_LOCAL_NH4] { + attr := make([]byte, 4) + native.PutUint16(attr, 8) + native.PutUint16(attr[2:], nl.SEG6_LOCAL_NH4) + ipv4 := e.InAddr.To4() + if ipv4 == nil { + err = fmt.Errorf("SEG6_LOCAL_NH4 has invalid IPv4 address") + return nil, err + } + attr = append(attr, ipv4...) + res = append(res, attr...) + } + if e.Flags[nl.SEG6_LOCAL_NH6] { + attr := make([]byte, 4) + native.PutUint16(attr, 20) + native.PutUint16(attr[2:], nl.SEG6_LOCAL_NH6) + attr = append(attr, e.In6Addr...) + res = append(res, attr...) + } + if e.Flags[nl.SEG6_LOCAL_IIF] { + attr := make([]byte, 8) + native.PutUint16(attr, 8) + native.PutUint16(attr[2:], nl.SEG6_LOCAL_IIF) + native.PutUint32(attr[4:], uint32(e.Iif)) + res = append(res, attr...) + } + if e.Flags[nl.SEG6_LOCAL_OIF] { + attr := make([]byte, 8) + native.PutUint16(attr, 8) + native.PutUint16(attr[2:], nl.SEG6_LOCAL_OIF) + native.PutUint32(attr[4:], uint32(e.Oif)) + res = append(res, attr...) + } + return res, err +} +func (e *SEG6LocalEncap) String() string { + strs := make([]string, 0, nl.SEG6_LOCAL_MAX) + strs = append(strs, fmt.Sprintf("action %s", nl.SEG6LocalActionString(e.Action))) + + if e.Flags[nl.SEG6_LOCAL_TABLE] { + strs = append(strs, fmt.Sprintf("table %d", e.Table)) + } + if e.Flags[nl.SEG6_LOCAL_NH4] { + strs = append(strs, fmt.Sprintf("nh4 %s", e.InAddr)) + } + if e.Flags[nl.SEG6_LOCAL_NH6] { + strs = append(strs, fmt.Sprintf("nh6 %s", e.In6Addr)) + } + if e.Flags[nl.SEG6_LOCAL_IIF] { + link, err := LinkByIndex(e.Iif) + if err != nil { + strs = append(strs, fmt.Sprintf("iif %d", e.Iif)) + } else { + strs = append(strs, fmt.Sprintf("iif %s", link.Attrs().Name)) + } + } + if e.Flags[nl.SEG6_LOCAL_OIF] { + link, err := LinkByIndex(e.Oif) + if err != nil { + strs = append(strs, fmt.Sprintf("oif %d", e.Oif)) + } else { + strs = append(strs, fmt.Sprintf("oif %s", link.Attrs().Name)) + } + } + if e.Flags[nl.SEG6_LOCAL_SRH] { + segs := make([]string, 0, len(e.Segments)) + //append segment backwards (from n to 0) since seg#0 is the last segment. + for i := len(e.Segments); i > 0; i-- { + segs = append(segs, fmt.Sprintf("%s", e.Segments[i-1])) + } + strs = append(strs, fmt.Sprintf("segs %d [ %s ]", len(e.Segments), strings.Join(segs, " "))) + } + return strings.Join(strs, " ") +} +func (e *SEG6LocalEncap) Equal(x Encap) bool { + o, ok := x.(*SEG6LocalEncap) + if !ok { + return false + } + if e == o { + return true + } + if e == nil || o == nil { + return false + } + // compare all arrays first + for i := range e.Flags { + if e.Flags[i] != o.Flags[i] { + return false + } + } + if len(e.Segments) != len(o.Segments) { + return false + } + for i := range e.Segments { + if !e.Segments[i].Equal(o.Segments[i]) { + return false + } + } + // compare values + if !e.InAddr.Equal(o.InAddr) || !e.In6Addr.Equal(o.In6Addr) { + return false + } + if e.Action != o.Action || e.Table != o.Table || e.Iif != o.Iif || e.Oif != o.Oif { + return false + } + return true +} + // RouteAdd will add a route to the system. // Equivalent to: `ip route add $route` func RouteAdd(route *Route) error { @@ -335,18 +519,18 @@ func (h *Handle) routeHandle(route *Route, req *nl.NetlinkRequest, msg *nl.RtMsg if err != nil { return err } - rtAttrs = append(rtAttrs, nl.NewRtAttr(nl.RTA_NEWDST, buf)) + rtAttrs = append(rtAttrs, nl.NewRtAttr(unix.RTA_NEWDST, buf)) } if route.Encap != nil { buf := make([]byte, 2) native.PutUint16(buf, uint16(route.Encap.Type())) - rtAttrs = append(rtAttrs, nl.NewRtAttr(nl.RTA_ENCAP_TYPE, buf)) + rtAttrs = append(rtAttrs, nl.NewRtAttr(unix.RTA_ENCAP_TYPE, buf)) buf, err := route.Encap.Encode() if err != nil { return err } - rtAttrs = append(rtAttrs, nl.NewRtAttr(nl.RTA_ENCAP, buf)) + rtAttrs = append(rtAttrs, nl.NewRtAttr(unix.RTA_ENCAP, buf)) } if route.Src != nil { @@ -410,17 +594,17 @@ func (h *Handle) routeHandle(route *Route, req *nl.NetlinkRequest, msg *nl.RtMsg if err != nil { return err } - children = append(children, nl.NewRtAttr(nl.RTA_NEWDST, buf)) + children = append(children, nl.NewRtAttr(unix.RTA_NEWDST, buf)) } if nh.Encap != nil { buf := make([]byte, 2) native.PutUint16(buf, uint16(nh.Encap.Type())) - rtAttrs = append(rtAttrs, nl.NewRtAttr(nl.RTA_ENCAP_TYPE, buf)) + children = append(children, nl.NewRtAttr(unix.RTA_ENCAP_TYPE, buf)) buf, err := nh.Encap.Encode() if err != nil { return err } - children = append(children, nl.NewRtAttr(nl.RTA_ENCAP, buf)) + children = append(children, nl.NewRtAttr(unix.RTA_ENCAP, buf)) } rtnh.Children = children buf = append(buf, rtnh.Serialize()...) @@ -464,6 +648,10 @@ func (h *Handle) routeHandle(route *Route, req *nl.NetlinkRequest, msg *nl.RtMsg b := nl.Uint32Attr(uint32(route.AdvMSS)) metrics = append(metrics, nl.NewRtAttr(unix.RTAX_ADVMSS, b)) } + if route.Hoplimit > 0 { + b := nl.Uint32Attr(uint32(route.Hoplimit)) + metrics = append(metrics, nl.NewRtAttr(unix.RTAX_HOPLIMIT, b)) + } if metrics != nil { attr := nl.NewRtAttr(unix.RTA_METRICS, nil) @@ -574,6 +762,8 @@ func (h *Handle) RouteListFiltered(family int, filter *Route, filterMask uint64) continue } } + case filterMask&RT_FILTER_HOPLIMIT != 0 && route.Hoplimit != filter.Hoplimit: + continue } } res = append(res, route) @@ -649,7 +839,7 @@ func deserializeRoute(m []byte) (Route, error) { switch attr.Attr.Type { case unix.RTA_GATEWAY: info.Gw = net.IP(attr.Value) - case nl.RTA_NEWDST: + case unix.RTA_NEWDST: var d Destination switch msg.Family { case nl.FAMILY_MPLS: @@ -659,9 +849,9 @@ func deserializeRoute(m []byte) (Route, error) { return nil, nil, err } info.NewDst = d - case nl.RTA_ENCAP_TYPE: + case unix.RTA_ENCAP_TYPE: encapType = attr - case nl.RTA_ENCAP: + case unix.RTA_ENCAP: encap = attr } } @@ -690,7 +880,7 @@ func deserializeRoute(m []byte) (Route, error) { route.MultiPath = append(route.MultiPath, info) rest = buf } - case nl.RTA_NEWDST: + case unix.RTA_NEWDST: var d Destination switch msg.Family { case nl.FAMILY_MPLS: @@ -700,9 +890,9 @@ func deserializeRoute(m []byte) (Route, error) { return route, err } route.NewDst = d - case nl.RTA_ENCAP_TYPE: + case unix.RTA_ENCAP_TYPE: encapType = attr - case nl.RTA_ENCAP: + case unix.RTA_ENCAP: encap = attr case unix.RTA_METRICS: metrics, err := nl.ParseRouteAttr(attr.Value) @@ -715,6 +905,8 @@ func deserializeRoute(m []byte) (Route, error) { route.MTU = int(native.Uint32(metric.Value[0:4])) case unix.RTAX_ADVMSS: route.AdvMSS = int(native.Uint32(metric.Value[0:4])) + case unix.RTAX_HOPLIMIT: + route.Hoplimit = int(native.Uint32(metric.Value[0:4])) } } } @@ -734,6 +926,11 @@ func deserializeRoute(m []byte) (Route, error) { if err := e.Decode(encap.Value); err != nil { return route, err } + case nl.LWTUNNEL_ENCAP_SEG6_LOCAL: + e = &SEG6LocalEncap{} + if err := e.Decode(encap.Value); err != nil { + return route, err + } } route.Encap = e } @@ -840,13 +1037,19 @@ func routeSubscribeAt(newNs, curNs netns.NsHandle, ch chan<- RouteUpdate, done < go func() { defer close(ch) for { - msgs, err := s.Receive() + msgs, from, err := s.Receive() if err != nil { if cberr != nil { cberr(err) } return } + if from.Pid != nl.PidKernel { + if cberr != nil { + cberr(fmt.Errorf("Wrong sender portid %d, expected %d", from.Pid, nl.PidKernel)) + } + continue + } for _, m := range msgs { if m.Header.Type == unix.NLMSG_DONE { continue diff --git a/vendor/github.com/vishvananda/netlink/rule_linux.go b/vendor/github.com/vishvananda/netlink/rule_linux.go index 6238ae45864..e12569fe45c 100644 --- a/vendor/github.com/vishvananda/netlink/rule_linux.go +++ b/vendor/github.com/vishvananda/netlink/rule_linux.go @@ -144,7 +144,7 @@ func ruleHandle(rule *Rule, req *nl.NetlinkRequest) error { req.AddData(nl.NewRtAttr(nl.FRA_OIFNAME, []byte(rule.OifName))) } if rule.Goto >= 0 { - msg.Type = nl.FR_ACT_NOP + msg.Type = nl.FR_ACT_GOTO b := make([]byte, 4) native.PutUint32(b, uint32(rule.Goto)) req.AddData(nl.NewRtAttr(nl.FRA_GOTO, b)) diff --git a/vendor/github.com/vishvananda/netlink/socket_linux.go b/vendor/github.com/vishvananda/netlink/socket_linux.go index 99e9fb4d897..c4d89c17ed5 100644 --- a/vendor/github.com/vishvananda/netlink/socket_linux.go +++ b/vendor/github.com/vishvananda/netlink/socket_linux.go @@ -141,10 +141,13 @@ func SocketGet(local, remote net.Addr) (*Socket, error) { }, }) s.Send(req) - msgs, err := s.Receive() + msgs, from, err := s.Receive() if err != nil { return nil, err } + if from.Pid != nl.PidKernel { + return nil, fmt.Errorf("Wrong sender portid %d, expected %d", from.Pid, nl.PidKernel) + } if len(msgs) == 0 { return nil, errors.New("no message nor error from netlink") } diff --git a/vendor/github.com/vishvananda/netlink/xfrm_monitor_linux.go b/vendor/github.com/vishvananda/netlink/xfrm_monitor_linux.go index efe72ddf29c..985d3a915f2 100644 --- a/vendor/github.com/vishvananda/netlink/xfrm_monitor_linux.go +++ b/vendor/github.com/vishvananda/netlink/xfrm_monitor_linux.go @@ -54,11 +54,15 @@ func XfrmMonitor(ch chan<- XfrmMsg, done <-chan struct{}, errorChan chan<- error go func() { defer close(ch) for { - msgs, err := s.Receive() + msgs, from, err := s.Receive() if err != nil { errorChan <- err return } + if from.Pid != nl.PidKernel { + errorChan <- fmt.Errorf("Wrong sender portid %d, expected %d", from.Pid, nl.PidKernel) + return + } for _, m := range msgs { switch m.Header.Type { case nl.XFRM_MSG_EXPIRE: diff --git a/vendor/github.com/vishvananda/netlink/xfrm_policy.go b/vendor/github.com/vishvananda/netlink/xfrm_policy.go index c97ec43a253..6219d277258 100644 --- a/vendor/github.com/vishvananda/netlink/xfrm_policy.go +++ b/vendor/github.com/vishvananda/netlink/xfrm_policy.go @@ -35,6 +35,25 @@ func (d Dir) String() string { return fmt.Sprintf("socket %d", d-XFRM_SOCKET_IN) } +// PolicyAction is an enum representing an ipsec policy action. +type PolicyAction uint8 + +const ( + XFRM_POLICY_ALLOW PolicyAction = 0 + XFRM_POLICY_BLOCK PolicyAction = 1 +) + +func (a PolicyAction) String() string { + switch a { + case XFRM_POLICY_ALLOW: + return "allow" + case XFRM_POLICY_BLOCK: + return "block" + default: + return fmt.Sprintf("action %d", a) + } +} + // XfrmPolicyTmpl encapsulates a rule for the base addresses of an ipsec // policy. These rules are matched with XfrmState to determine encryption // and authentication algorithms. @@ -64,11 +83,14 @@ type XfrmPolicy struct { Dir Dir Priority int Index int + Action PolicyAction + Ifindex int + Ifid int Mark *XfrmMark Tmpls []XfrmPolicyTmpl } func (p XfrmPolicy) String() string { - return fmt.Sprintf("{Dst: %v, Src: %v, Proto: %s, DstPort: %d, SrcPort: %d, Dir: %s, Priority: %d, Index: %d, Mark: %s, Tmpls: %s}", - p.Dst, p.Src, p.Proto, p.DstPort, p.SrcPort, p.Dir, p.Priority, p.Index, p.Mark, p.Tmpls) + return fmt.Sprintf("{Dst: %v, Src: %v, Proto: %s, DstPort: %d, SrcPort: %d, Dir: %s, Priority: %d, Index: %d, Action: %s, Ifindex: %d, Ifid: %d, Mark: %s, Tmpls: %s}", + p.Dst, p.Src, p.Proto, p.DstPort, p.SrcPort, p.Dir, p.Priority, p.Index, p.Action, p.Ifindex, p.Ifid, p.Mark, p.Tmpls) } diff --git a/vendor/github.com/vishvananda/netlink/xfrm_policy_linux.go b/vendor/github.com/vishvananda/netlink/xfrm_policy_linux.go index fde0c2ca5ad..a4e132ef55f 100644 --- a/vendor/github.com/vishvananda/netlink/xfrm_policy_linux.go +++ b/vendor/github.com/vishvananda/netlink/xfrm_policy_linux.go @@ -27,6 +27,7 @@ func selFromPolicy(sel *nl.XfrmSelector, policy *XfrmPolicy) { if sel.Sport != 0 { sel.SportMask = ^uint16(0) } + sel.Ifindex = int32(policy.Ifindex) } // XfrmPolicyAdd will add an xfrm policy to the system. @@ -61,6 +62,7 @@ func (h *Handle) xfrmPolicyAddOrUpdate(policy *XfrmPolicy, nlProto int) error { msg.Priority = uint32(policy.Priority) msg.Index = uint32(policy.Index) msg.Dir = uint8(policy.Dir) + msg.Action = uint8(policy.Action) msg.Lft.SoftByteLimit = nl.XFRM_INF msg.Lft.HardByteLimit = nl.XFRM_INF msg.Lft.SoftPacketLimit = nl.XFRM_INF @@ -90,6 +92,9 @@ func (h *Handle) xfrmPolicyAddOrUpdate(policy *XfrmPolicy, nlProto int) error { req.AddData(out) } + ifId := nl.NewRtAttr(nl.XFRMA_IF_ID, nl.Uint32Attr(uint32(policy.Ifid))) + req.AddData(ifId) + _, err := req.Execute(unix.NETLINK_XFRM, 0) return err } @@ -183,6 +188,9 @@ func (h *Handle) xfrmPolicyGetOrDelete(policy *XfrmPolicy, nlProto int) (*XfrmPo req.AddData(out) } + ifId := nl.NewRtAttr(nl.XFRMA_IF_ID, nl.Uint32Attr(uint32(policy.Ifid))) + req.AddData(ifId) + resType := nl.XFRM_MSG_NEWPOLICY if nlProto == nl.XFRM_MSG_DELPOLICY { resType = 0 @@ -197,12 +205,7 @@ func (h *Handle) xfrmPolicyGetOrDelete(policy *XfrmPolicy, nlProto int) (*XfrmPo return nil, err } - p, err := parseXfrmPolicy(msgs[0], FAMILY_ALL) - if err != nil { - return nil, err - } - - return p, nil + return parseXfrmPolicy(msgs[0], FAMILY_ALL) } func parseXfrmPolicy(m []byte, family int) (*XfrmPolicy, error) { @@ -220,9 +223,11 @@ func parseXfrmPolicy(m []byte, family int) (*XfrmPolicy, error) { policy.Proto = Proto(msg.Sel.Proto) policy.DstPort = int(nl.Swap16(msg.Sel.Dport)) policy.SrcPort = int(nl.Swap16(msg.Sel.Sport)) + policy.Ifindex = int(msg.Sel.Ifindex) policy.Priority = int(msg.Priority) policy.Index = int(msg.Index) policy.Dir = Dir(msg.Dir) + policy.Action = PolicyAction(msg.Action) attrs, err := nl.ParseRouteAttr(m[msg.Len():]) if err != nil { @@ -249,6 +254,8 @@ func parseXfrmPolicy(m []byte, family int) (*XfrmPolicy, error) { policy.Mark = new(XfrmMark) policy.Mark.Value = mark.Value policy.Mark.Mask = mark.Mask + case nl.XFRMA_IF_ID: + policy.Ifid = int(native.Uint32(attr.Value)) } } diff --git a/vendor/github.com/vishvananda/netlink/xfrm_state.go b/vendor/github.com/vishvananda/netlink/xfrm_state.go index d14740dc55b..483d8934a8f 100644 --- a/vendor/github.com/vishvananda/netlink/xfrm_state.go +++ b/vendor/github.com/vishvananda/netlink/xfrm_state.go @@ -94,6 +94,8 @@ type XfrmState struct { Limits XfrmStateLimits Statistics XfrmStateStats Mark *XfrmMark + OutputMark int + Ifid int Auth *XfrmStateAlgo Crypt *XfrmStateAlgo Aead *XfrmStateAlgo @@ -102,8 +104,8 @@ type XfrmState struct { } func (sa XfrmState) String() string { - return fmt.Sprintf("Dst: %v, Src: %v, Proto: %s, Mode: %s, SPI: 0x%x, ReqID: 0x%x, ReplayWindow: %d, Mark: %v, Auth: %v, Crypt: %v, Aead: %v, Encap: %v, ESN: %t", - sa.Dst, sa.Src, sa.Proto, sa.Mode, sa.Spi, sa.Reqid, sa.ReplayWindow, sa.Mark, sa.Auth, sa.Crypt, sa.Aead, sa.Encap, sa.ESN) + return fmt.Sprintf("Dst: %v, Src: %v, Proto: %s, Mode: %s, SPI: 0x%x, ReqID: 0x%x, ReplayWindow: %d, Mark: %v, OutputMark: %d, Ifid: %d, Auth: %v, Crypt: %v, Aead: %v, Encap: %v, ESN: %t", + sa.Dst, sa.Src, sa.Proto, sa.Mode, sa.Spi, sa.Reqid, sa.ReplayWindow, sa.Mark, sa.OutputMark, sa.Ifid, sa.Auth, sa.Crypt, sa.Aead, sa.Encap, sa.ESN) } func (sa XfrmState) Print(stats bool) string { if !stats { diff --git a/vendor/github.com/vishvananda/netlink/xfrm_state_linux.go b/vendor/github.com/vishvananda/netlink/xfrm_state_linux.go index 5dfdb33e449..66c99423c47 100644 --- a/vendor/github.com/vishvananda/netlink/xfrm_state_linux.go +++ b/vendor/github.com/vishvananda/netlink/xfrm_state_linux.go @@ -158,6 +158,13 @@ func (h *Handle) xfrmStateAddOrUpdate(state *XfrmState, nlProto int) error { out := nl.NewRtAttr(nl.XFRMA_REPLAY_ESN_VAL, writeReplayEsn(state.ReplayWindow)) req.AddData(out) } + if state.OutputMark != 0 { + out := nl.NewRtAttr(nl.XFRMA_OUTPUT_MARK, nl.Uint32Attr(uint32(state.OutputMark))) + req.AddData(out) + } + + ifId := nl.NewRtAttr(nl.XFRMA_IF_ID, nl.Uint32Attr(uint32(state.Ifid))) + req.AddData(ifId) _, err := req.Execute(unix.NETLINK_XFRM, 0) return err @@ -184,12 +191,7 @@ func (h *Handle) xfrmStateAllocSpi(state *XfrmState) (*XfrmState, error) { return nil, err } - s, err := parseXfrmState(msgs[0], FAMILY_ALL) - if err != nil { - return nil, err - } - - return s, err + return parseXfrmState(msgs[0], FAMILY_ALL) } // XfrmStateDel will delete an xfrm state from the system. Note that @@ -275,6 +277,9 @@ func (h *Handle) xfrmStateGetOrDelete(state *XfrmState, nlProto int) (*XfrmState req.AddData(out) } + ifId := nl.NewRtAttr(nl.XFRMA_IF_ID, nl.Uint32Attr(uint32(state.Ifid))) + req.AddData(ifId) + resType := nl.XFRM_MSG_NEWSA if nlProto == nl.XFRM_MSG_DELSA { resType = 0 @@ -372,6 +377,10 @@ func parseXfrmState(m []byte, family int) (*XfrmState, error) { state.Mark = new(XfrmMark) state.Mark.Value = mark.Value state.Mark.Mask = mark.Mask + case nl.XFRMA_OUTPUT_MARK: + state.OutputMark = int(native.Uint32(attr.Value)) + case nl.XFRMA_IF_ID: + state.Ifid = int(native.Uint32(attr.Value)) } } @@ -394,11 +403,7 @@ func (h *Handle) XfrmStateFlush(proto Proto) error { req.AddData(&nl.XfrmUsersaFlush{Proto: uint8(proto)}) _, err := req.Execute(unix.NETLINK_XFRM, 0) - if err != nil { - return err - } - - return nil + return err } func limitsToLft(lmts XfrmStateLimits, lft *nl.XfrmLifetimeCfg) { diff --git a/vendor/github.com/vishvananda/netns/README.md b/vendor/github.com/vishvananda/netns/README.md index 66a5f7258ba..6b45cfb892e 100644 --- a/vendor/github.com/vishvananda/netns/README.md +++ b/vendor/github.com/vishvananda/netns/README.md @@ -37,7 +37,6 @@ func main() { // Create a new network namespace newns, _ := netns.New() - netns.Set(newns) defer newns.Close() // Do something with the network namespace diff --git a/vendor/github.com/vishvananda/netns/go.mod b/vendor/github.com/vishvananda/netns/go.mod new file mode 100644 index 00000000000..9cdf577ad44 --- /dev/null +++ b/vendor/github.com/vishvananda/netns/go.mod @@ -0,0 +1,5 @@ +module github.com/vishvananda/netns + +go 1.12 + +require golang.org/x/sys v0.0.0-20200217220822-9197077df867 diff --git a/vendor/github.com/vishvananda/netns/go.sum b/vendor/github.com/vishvananda/netns/go.sum new file mode 100644 index 00000000000..1d4adf4519f --- /dev/null +++ b/vendor/github.com/vishvananda/netns/go.sum @@ -0,0 +1,2 @@ +golang.org/x/sys v0.0.0-20200217220822-9197077df867 h1:JoRuNIf+rpHl+VhScRQQvzbHed86tKkqwPMV34T8myw= +golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/vishvananda/netns/netns.go b/vendor/github.com/vishvananda/netns/netns.go index dd2f21570a4..116befd548c 100644 --- a/vendor/github.com/vishvananda/netns/netns.go +++ b/vendor/github.com/vishvananda/netns/netns.go @@ -10,7 +10,8 @@ package netns import ( "fmt" - "syscall" + + "golang.org/x/sys/unix" ) // NsHandle is a handle to a network namespace. It can be cast directly @@ -24,11 +25,11 @@ func (ns NsHandle) Equal(other NsHandle) bool { if ns == other { return true } - var s1, s2 syscall.Stat_t - if err := syscall.Fstat(int(ns), &s1); err != nil { + var s1, s2 unix.Stat_t + if err := unix.Fstat(int(ns), &s1); err != nil { return false } - if err := syscall.Fstat(int(other), &s2); err != nil { + if err := unix.Fstat(int(other), &s2); err != nil { return false } return (s1.Dev == s2.Dev) && (s1.Ino == s2.Ino) @@ -36,11 +37,11 @@ func (ns NsHandle) Equal(other NsHandle) bool { // String shows the file descriptor number and its dev and inode. func (ns NsHandle) String() string { - var s syscall.Stat_t if ns == -1 { return "NS(None)" } - if err := syscall.Fstat(int(ns), &s); err != nil { + var s unix.Stat_t + if err := unix.Fstat(int(ns), &s); err != nil { return fmt.Sprintf("NS(%d: unknown)", ns) } return fmt.Sprintf("NS(%d: %d, %d)", ns, s.Dev, s.Ino) @@ -49,11 +50,11 @@ func (ns NsHandle) String() string { // UniqueId returns a string which uniquely identifies the namespace // associated with the network handle. func (ns NsHandle) UniqueId() string { - var s syscall.Stat_t if ns == -1 { return "NS(none)" } - if err := syscall.Fstat(int(ns), &s); err != nil { + var s unix.Stat_t + if err := unix.Fstat(int(ns), &s); err != nil { return "NS(unknown)" } return fmt.Sprintf("NS(%d:%d)", s.Dev, s.Ino) @@ -67,7 +68,7 @@ func (ns NsHandle) IsOpen() bool { // Close closes the NsHandle and resets its file descriptor to -1. // It is not safe to use an NsHandle after Close() is called. func (ns *NsHandle) Close() error { - if err := syscall.Close(int(*ns)); err != nil { + if err := unix.Close(int(*ns)); err != nil { return err } (*ns) = -1 diff --git a/vendor/github.com/vishvananda/netns/netns_linux.go b/vendor/github.com/vishvananda/netns/netns_linux.go index e665ef44998..7489c9913f9 100644 --- a/vendor/github.com/vishvananda/netns/netns_linux.go +++ b/vendor/github.com/vishvananda/netns/netns_linux.go @@ -7,24 +7,11 @@ import ( "io/ioutil" "os" "path/filepath" - "runtime" "strconv" "strings" - "syscall" -) -// SYS_SETNS syscall allows changing the namespace of the current process. -var SYS_SETNS = map[string]uintptr{ - "386": 346, - "amd64": 308, - "arm64": 268, - "arm": 375, - "mips": 4344, - "mipsle": 4344, - "ppc64": 350, - "ppc64le": 350, - "s390x": 339, -}[runtime.GOARCH] + "golang.org/x/sys/unix" +) // Deprecated: use syscall pkg instead (go >= 1.5 needed). const ( @@ -39,11 +26,7 @@ const ( // Setns sets namespace using syscall. Note that this should be a method // in syscall but it has not been added. func Setns(ns NsHandle, nstype int) (err error) { - _, _, e1 := syscall.Syscall(SYS_SETNS, uintptr(ns), uintptr(nstype), 0) - if e1 != 0 { - err = e1 - } - return + return unix.Setns(int(ns), nstype) } // Set sets the current network namespace to the namespace represented @@ -52,9 +35,10 @@ func Set(ns NsHandle) (err error) { return Setns(ns, CLONE_NEWNET) } -// New creates a new network namespace and returns a handle to it. +// New creates a new network namespace, sets it as current and returns +// a handle to it. func New() (ns NsHandle, err error) { - if err := syscall.Unshare(CLONE_NEWNET); err != nil { + if err := unix.Unshare(CLONE_NEWNET); err != nil { return -1, err } return Get() @@ -62,13 +46,13 @@ func New() (ns NsHandle, err error) { // Get gets a handle to the current threads network namespace. func Get() (NsHandle, error) { - return GetFromThread(os.Getpid(), syscall.Gettid()) + return GetFromThread(os.Getpid(), unix.Gettid()) } // GetFromPath gets a handle to a network namespace // identified by the path func GetFromPath(path string) (NsHandle, error) { - fd, err := syscall.Open(path, syscall.O_RDONLY, 0) + fd, err := unix.Open(path, unix.O_RDONLY, 0) if err != nil { return -1, err } diff --git a/vendor/github.com/willf/bitset/.gitignore b/vendor/github.com/willf/bitset/.gitignore new file mode 100644 index 00000000000..5c204d28b0e --- /dev/null +++ b/vendor/github.com/willf/bitset/.gitignore @@ -0,0 +1,26 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +target diff --git a/vendor/github.com/willf/bitset/.travis.yml b/vendor/github.com/willf/bitset/.travis.yml new file mode 100644 index 00000000000..094aa5ce070 --- /dev/null +++ b/vendor/github.com/willf/bitset/.travis.yml @@ -0,0 +1,37 @@ +language: go + +sudo: false + +branches: + except: + - release + +branches: + only: + - master + - travis + +go: + - "1.11.x" + - tip + +matrix: + allow_failures: + - go: tip + +before_install: + - if [ -n "$GH_USER" ]; then git config --global github.user ${GH_USER}; fi; + - if [ -n "$GH_TOKEN" ]; then git config --global github.token ${GH_TOKEN}; fi; + - go get github.com/mattn/goveralls + +before_script: + - make deps + +script: + - make qa + +after_failure: + - cat ./target/test/report.xml + +after_success: + - if [ "$TRAVIS_GO_VERSION" = "1.11.1" ]; then $HOME/gopath/bin/goveralls -covermode=count -coverprofile=target/report/coverage.out -service=travis-ci; fi; diff --git a/vendor/github.com/willf/bitset/LICENSE b/vendor/github.com/willf/bitset/LICENSE new file mode 100644 index 00000000000..59cab8a939b --- /dev/null +++ b/vendor/github.com/willf/bitset/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 Will Fitzgerald. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/willf/bitset/Makefile b/vendor/github.com/willf/bitset/Makefile new file mode 100644 index 00000000000..db8377106f6 --- /dev/null +++ b/vendor/github.com/willf/bitset/Makefile @@ -0,0 +1,191 @@ +# MAKEFILE +# +# @author Nicola Asuni +# @link https://github.com/willf/bitset +# ------------------------------------------------------------------------------ + +# List special make targets that are not associated with files +.PHONY: help all test format fmtcheck vet lint coverage cyclo ineffassign misspell structcheck varcheck errcheck gosimple astscan qa deps clean nuke + +# Use bash as shell (Note: Ubuntu now uses dash which doesn't support PIPESTATUS). +SHELL=/bin/bash + +# CVS path (path to the parent dir containing the project) +CVSPATH=github.com/willf + +# Project owner +OWNER=willf + +# Project vendor +VENDOR=willf + +# Project name +PROJECT=bitset + +# Project version +VERSION=$(shell cat VERSION) + +# Name of RPM or DEB package +PKGNAME=${VENDOR}-${PROJECT} + +# Current directory +CURRENTDIR=$(shell pwd) + +# GO lang path +ifneq ($(GOPATH),) + ifeq ($(findstring $(GOPATH),$(CURRENTDIR)),) + # the defined GOPATH is not valid + GOPATH= + endif +endif +ifeq ($(GOPATH),) + # extract the GOPATH + GOPATH=$(firstword $(subst /src/, ,$(CURRENTDIR))) +endif + +# --- MAKE TARGETS --- + +# Display general help about this command +help: + @echo "" + @echo "$(PROJECT) Makefile." + @echo "GOPATH=$(GOPATH)" + @echo "The following commands are available:" + @echo "" + @echo " make qa : Run all the tests" + @echo " make test : Run the unit tests" + @echo "" + @echo " make format : Format the source code" + @echo " make fmtcheck : Check if the source code has been formatted" + @echo " make vet : Check for suspicious constructs" + @echo " make lint : Check for style errors" + @echo " make coverage : Generate the coverage report" + @echo " make cyclo : Generate the cyclomatic complexity report" + @echo " make ineffassign : Detect ineffectual assignments" + @echo " make misspell : Detect commonly misspelled words in source files" + @echo " make structcheck : Find unused struct fields" + @echo " make varcheck : Find unused global variables and constants" + @echo " make errcheck : Check that error return values are used" + @echo " make gosimple : Suggest code simplifications" + @echo " make astscan : GO AST scanner" + @echo "" + @echo " make docs : Generate source code documentation" + @echo "" + @echo " make deps : Get the dependencies" + @echo " make clean : Remove any build artifact" + @echo " make nuke : Deletes any intermediate file" + @echo "" + +# Alias for help target +all: help + +# Run the unit tests +test: + @mkdir -p target/test + @mkdir -p target/report + GOPATH=$(GOPATH) \ + go test \ + -covermode=atomic \ + -bench=. \ + -race \ + -cpuprofile=target/report/cpu.out \ + -memprofile=target/report/mem.out \ + -mutexprofile=target/report/mutex.out \ + -coverprofile=target/report/coverage.out \ + -v ./... | \ + tee >(PATH=$(GOPATH)/bin:$(PATH) go-junit-report > target/test/report.xml); \ + test $${PIPESTATUS[0]} -eq 0 + +# Format the source code +format: + @find . -type f -name "*.go" -exec gofmt -s -w {} \; + +# Check if the source code has been formatted +fmtcheck: + @mkdir -p target + @find . -type f -name "*.go" -exec gofmt -s -d {} \; | tee target/format.diff + @test ! -s target/format.diff || { echo "ERROR: the source code has not been formatted - please use 'make format' or 'gofmt'"; exit 1; } + +# Check for syntax errors +vet: + GOPATH=$(GOPATH) go vet . + +# Check for style errors +lint: + GOPATH=$(GOPATH) PATH=$(GOPATH)/bin:$(PATH) golint . + +# Generate the coverage report +coverage: + @mkdir -p target/report + GOPATH=$(GOPATH) \ + go tool cover -html=target/report/coverage.out -o target/report/coverage.html + +# Report cyclomatic complexity +cyclo: + @mkdir -p target/report + GOPATH=$(GOPATH) gocyclo -avg ./ | tee target/report/cyclo.txt ; test $${PIPESTATUS[0]} -eq 0 + +# Detect ineffectual assignments +ineffassign: + @mkdir -p target/report + GOPATH=$(GOPATH) ineffassign ./ | tee target/report/ineffassign.txt ; test $${PIPESTATUS[0]} -eq 0 + +# Detect commonly misspelled words in source files +misspell: + @mkdir -p target/report + GOPATH=$(GOPATH) misspell -error ./ | tee target/report/misspell.txt ; test $${PIPESTATUS[0]} -eq 0 + +# Find unused struct fields +structcheck: + @mkdir -p target/report + GOPATH=$(GOPATH) structcheck -a ./ | tee target/report/structcheck.txt + +# Find unused global variables and constants +varcheck: + @mkdir -p target/report + GOPATH=$(GOPATH) varcheck -e ./ | tee target/report/varcheck.txt + +# Check that error return values are used +errcheck: + @mkdir -p target/report + GOPATH=$(GOPATH) errcheck ./ | tee target/report/errcheck.txt + +# AST scanner +astscan: + @mkdir -p target/report + GOPATH=$(GOPATH) gosec . | tee target/report/astscan.txt ; test $${PIPESTATUS[0]} -eq 0 || true + +# Generate source docs +docs: + @mkdir -p target/docs + nohup sh -c 'GOPATH=$(GOPATH) godoc -http=127.0.0.1:6060' > target/godoc_server.log 2>&1 & + wget --directory-prefix=target/docs/ --execute robots=off --retry-connrefused --recursive --no-parent --adjust-extension --page-requisites --convert-links http://127.0.0.1:6060/pkg/github.com/${VENDOR}/${PROJECT}/ ; kill -9 `lsof -ti :6060` + @echo ''${PKGNAME}' Documentation ...' > target/docs/index.html + +# Alias to run all quality-assurance checks +qa: fmtcheck test vet lint coverage cyclo ineffassign misspell structcheck varcheck errcheck gosimple astscan + +# --- INSTALL --- + +# Get the dependencies +deps: + GOPATH=$(GOPATH) go get ./... + GOPATH=$(GOPATH) go get golang.org/x/lint/golint + GOPATH=$(GOPATH) go get github.com/jstemmer/go-junit-report + GOPATH=$(GOPATH) go get github.com/axw/gocov/gocov + GOPATH=$(GOPATH) go get github.com/fzipp/gocyclo + GOPATH=$(GOPATH) go get github.com/gordonklaus/ineffassign + GOPATH=$(GOPATH) go get github.com/client9/misspell/cmd/misspell + GOPATH=$(GOPATH) go get github.com/opennota/check/cmd/structcheck + GOPATH=$(GOPATH) go get github.com/opennota/check/cmd/varcheck + GOPATH=$(GOPATH) go get github.com/kisielk/errcheck + GOPATH=$(GOPATH) go get github.com/securego/gosec/cmd/gosec/... + +# Remove any build artifact +clean: + GOPATH=$(GOPATH) go clean ./... + +# Deletes any intermediate file +nuke: + rm -rf ./target + GOPATH=$(GOPATH) go clean -i ./... diff --git a/vendor/github.com/willf/bitset/README.md b/vendor/github.com/willf/bitset/README.md new file mode 100644 index 00000000000..6c62b20c6c8 --- /dev/null +++ b/vendor/github.com/willf/bitset/README.md @@ -0,0 +1,96 @@ +# bitset + +*Go language library to map between non-negative integers and boolean values* + +[![Master Build Status](https://secure.travis-ci.org/willf/bitset.png?branch=master)](https://travis-ci.org/willf/bitset?branch=master) +[![Master Coverage Status](https://coveralls.io/repos/willf/bitset/badge.svg?branch=master&service=github)](https://coveralls.io/github/willf/bitset?branch=master) +[![Go Report Card](https://goreportcard.com/badge/github.com/willf/bitset)](https://goreportcard.com/report/github.com/willf/bitset) +[![GoDoc](https://godoc.org/github.com/willf/bitset?status.svg)](http://godoc.org/github.com/willf/bitset) + + +## Description + +Package bitset implements bitsets, a mapping between non-negative integers and boolean values. +It should be more efficient than map[uint] bool. + +It provides methods for setting, clearing, flipping, and testing individual integers. + +But it also provides set intersection, union, difference, complement, and symmetric operations, as well as tests to check whether any, all, or no bits are set, and querying a bitset's current length and number of positive bits. + +BitSets are expanded to the size of the largest set bit; the memory allocation is approximately Max bits, where Max is the largest set bit. BitSets are never shrunk. On creation, a hint can be given for the number of bits that will be used. + +Many of the methods, including Set, Clear, and Flip, return a BitSet pointer, which allows for chaining. + +### Example use: + +```go +package main + +import ( + "fmt" + "math/rand" + + "github.com/willf/bitset" +) + +func main() { + fmt.Printf("Hello from BitSet!\n") + var b bitset.BitSet + // play some Go Fish + for i := 0; i < 100; i++ { + card1 := uint(rand.Intn(52)) + card2 := uint(rand.Intn(52)) + b.Set(card1) + if b.Test(card2) { + fmt.Println("Go Fish!") + } + b.Clear(card1) + } + + // Chaining + b.Set(10).Set(11) + + for i, e := b.NextSet(0); e; i, e = b.NextSet(i + 1) { + fmt.Println("The following bit is set:", i) + } + if b.Intersection(bitset.New(100).Set(10)).Count() == 1 { + fmt.Println("Intersection works.") + } else { + fmt.Println("Intersection doesn't work???") + } +} +``` + +As an alternative to BitSets, one should check out the 'big' package, which provides a (less set-theoretical) view of bitsets. + +Godoc documentation is at: https://godoc.org/github.com/willf/bitset + + +## Implementation Note + +Go 1.9 introduced a native `math/bits` library. We provide backward compatibility to Go 1.7, which might be removed. + +It is possible that a later version will match the `math/bits` return signature for counts (which is `int`, rather than our library's `unit64`). If so, the version will be bumped. + +## Installation + +```bash +go get github.com/willf/bitset +``` + +## Contributing + +If you wish to contribute to this project, please branch and issue a pull request against master ("[GitHub Flow](https://guides.github.com/introduction/flow/)") + +This project include a Makefile that allows you to test and build the project with simple commands. +To see all available options: +```bash +make help +``` + +## Running all tests + +Before committing the code, please check if it passes all tests using (note: this will install some dependencies): +```bash +make qa +``` diff --git a/vendor/github.com/willf/bitset/azure-pipelines.yml b/vendor/github.com/willf/bitset/azure-pipelines.yml new file mode 100644 index 00000000000..f9b29591840 --- /dev/null +++ b/vendor/github.com/willf/bitset/azure-pipelines.yml @@ -0,0 +1,39 @@ +# Go +# Build your Go project. +# Add steps that test, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/go + +trigger: +- master + +pool: + vmImage: 'Ubuntu-16.04' + +variables: + GOBIN: '$(GOPATH)/bin' # Go binaries path + GOROOT: '/usr/local/go1.11' # Go installation path + GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path + modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code + +steps: +- script: | + mkdir -p '$(GOBIN)' + mkdir -p '$(GOPATH)/pkg' + mkdir -p '$(modulePath)' + shopt -s extglob + shopt -s dotglob + mv !(gopath) '$(modulePath)' + echo '##vso[task.prependpath]$(GOBIN)' + echo '##vso[task.prependpath]$(GOROOT)/bin' + displayName: 'Set up the Go workspace' + +- script: | + go version + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + go build -v . + workingDirectory: '$(modulePath)' + displayName: 'Get dependencies, then build' diff --git a/vendor/github.com/willf/bitset/bitset.go b/vendor/github.com/willf/bitset/bitset.go new file mode 100644 index 00000000000..22e5d42e5d6 --- /dev/null +++ b/vendor/github.com/willf/bitset/bitset.go @@ -0,0 +1,879 @@ +/* +Package bitset implements bitsets, a mapping +between non-negative integers and boolean values. It should be more +efficient than map[uint] bool. + +It provides methods for setting, clearing, flipping, and testing +individual integers. + +But it also provides set intersection, union, difference, +complement, and symmetric operations, as well as tests to +check whether any, all, or no bits are set, and querying a +bitset's current length and number of positive bits. + +BitSets are expanded to the size of the largest set bit; the +memory allocation is approximately Max bits, where Max is +the largest set bit. BitSets are never shrunk. On creation, +a hint can be given for the number of bits that will be used. + +Many of the methods, including Set,Clear, and Flip, return +a BitSet pointer, which allows for chaining. + +Example use: + + import "bitset" + var b BitSet + b.Set(10).Set(11) + if b.Test(1000) { + b.Clear(1000) + } + if B.Intersection(bitset.New(100).Set(10)).Count() > 1 { + fmt.Println("Intersection works.") + } + +As an alternative to BitSets, one should check out the 'big' package, +which provides a (less set-theoretical) view of bitsets. + +*/ +package bitset + +import ( + "bufio" + "bytes" + "encoding/base64" + "encoding/binary" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// the wordSize of a bit set +const wordSize = uint(64) + +// log2WordSize is lg(wordSize) +const log2WordSize = uint(6) + +// allBits has every bit set +const allBits uint64 = 0xffffffffffffffff + +// default binary BigEndian +var binaryOrder binary.ByteOrder = binary.BigEndian + +// default json encoding base64.URLEncoding +var base64Encoding = base64.URLEncoding + +// Base64StdEncoding Marshal/Unmarshal BitSet with base64.StdEncoding(Default: base64.URLEncoding) +func Base64StdEncoding() { base64Encoding = base64.StdEncoding } + +// LittleEndian Marshal/Unmarshal Binary as Little Endian(Default: binary.BigEndian) +func LittleEndian() { binaryOrder = binary.LittleEndian } + +// A BitSet is a set of bits. The zero value of a BitSet is an empty set of length 0. +type BitSet struct { + length uint + set []uint64 +} + +// Error is used to distinguish errors (panics) generated in this package. +type Error string + +// safeSet will fixup b.set to be non-nil and return the field value +func (b *BitSet) safeSet() []uint64 { + if b.set == nil { + b.set = make([]uint64, wordsNeeded(0)) + } + return b.set +} + +// From is a constructor used to create a BitSet from an array of integers +func From(buf []uint64) *BitSet { + return &BitSet{uint(len(buf)) * 64, buf} +} + +// Bytes returns the bitset as array of integers +func (b *BitSet) Bytes() []uint64 { + return b.set +} + +// wordsNeeded calculates the number of words needed for i bits +func wordsNeeded(i uint) int { + if i > (Cap() - wordSize + 1) { + return int(Cap() >> log2WordSize) + } + return int((i + (wordSize - 1)) >> log2WordSize) +} + +// New creates a new BitSet with a hint that length bits will be required +func New(length uint) (bset *BitSet) { + defer func() { + if r := recover(); r != nil { + bset = &BitSet{ + 0, + make([]uint64, 0), + } + } + }() + + bset = &BitSet{ + length, + make([]uint64, wordsNeeded(length)), + } + + return bset +} + +// Cap returns the total possible capacity, or number of bits +func Cap() uint { + return ^uint(0) +} + +// Len returns the number of bits in the BitSet. +// Note the difference to method Count, see example. +func (b *BitSet) Len() uint { + return b.length +} + +// extendSetMaybe adds additional words to incorporate new bits if needed +func (b *BitSet) extendSetMaybe(i uint) { + if i >= b.length { // if we need more bits, make 'em + nsize := wordsNeeded(i + 1) + if b.set == nil { + b.set = make([]uint64, nsize) + } else if cap(b.set) >= nsize { + b.set = b.set[:nsize] // fast resize + } else if len(b.set) < nsize { + newset := make([]uint64, nsize, 2*nsize) // increase capacity 2x + copy(newset, b.set) + b.set = newset + } + b.length = i + 1 + } +} + +// Test whether bit i is set. +func (b *BitSet) Test(i uint) bool { + if i >= b.length { + return false + } + return b.set[i>>log2WordSize]&(1<<(i&(wordSize-1))) != 0 +} + +// Set bit i to 1 +func (b *BitSet) Set(i uint) *BitSet { + b.extendSetMaybe(i) + b.set[i>>log2WordSize] |= 1 << (i & (wordSize - 1)) + return b +} + +// Clear bit i to 0 +func (b *BitSet) Clear(i uint) *BitSet { + if i >= b.length { + return b + } + b.set[i>>log2WordSize] &^= 1 << (i & (wordSize - 1)) + return b +} + +// SetTo sets bit i to value +func (b *BitSet) SetTo(i uint, value bool) *BitSet { + if value { + return b.Set(i) + } + return b.Clear(i) +} + +// Flip bit at i +func (b *BitSet) Flip(i uint) *BitSet { + if i >= b.length { + return b.Set(i) + } + b.set[i>>log2WordSize] ^= 1 << (i & (wordSize - 1)) + return b +} + +// Shrink shrinks BitSet to desired length in bits. It clears all bits > length +// and reduces the size and length of the set. +// +// A new slice is allocated to store the new bits, so you may see an increase in +// memory usage until the GC runs. Normally this should not be a problem, but if you +// have an extremely large BitSet its important to understand that the old BitSet will +// remain in memory until the GC frees it. +func (b *BitSet) Shrink(length uint) *BitSet { + idx := wordsNeeded(length + 1) + if idx > len(b.set) { + return b + } + shrunk := make([]uint64, idx) + copy(shrunk, b.set[:idx]) + b.set = shrunk + b.length = length + 1 + b.set[idx-1] &= (allBits >> (uint64(64) - uint64(length&(wordSize-1)) - 1)) + return b +} + +// InsertAt takes an index which indicates where a bit should be +// inserted. Then it shifts all the bits in the set to the left by 1, starting +// from the given index position, and sets the index position to 0. +// +// Depending on the size of your BitSet, and where you are inserting the new entry, +// this method could be extremely slow and in some cases might cause the entire BitSet +// to be recopied. +func (b *BitSet) InsertAt(idx uint) *BitSet { + insertAtElement := (idx >> log2WordSize) + + // if length of set is a multiple of wordSize we need to allocate more space first + if b.isLenExactMultiple() { + b.set = append(b.set, uint64(0)) + } + + var i uint + for i = uint(len(b.set) - 1); i > insertAtElement; i-- { + // all elements above the position where we want to insert can simply by shifted + b.set[i] <<= 1 + + // we take the most significant bit of the previous element and set it as + // the least significant bit of the current element + b.set[i] |= (b.set[i-1] & 0x8000000000000000) >> 63 + } + + // generate a mask to extract the data that we need to shift left + // within the element where we insert a bit + dataMask := ^(uint64(1)< 0x40000 { + buffer.WriteString("...") + break + } + buffer.WriteString(strconv.FormatInt(int64(i), 10)) + i, e = b.NextSet(i + 1) + if e { + buffer.WriteString(",") + } + } + buffer.WriteString("}") + return buffer.String() +} + +// DeleteAt deletes the bit at the given index position from +// within the bitset +// All the bits residing on the left of the deleted bit get +// shifted right by 1 +// The running time of this operation may potentially be +// relatively slow, O(length) +func (b *BitSet) DeleteAt(i uint) *BitSet { + // the index of the slice element where we'll delete a bit + deleteAtElement := i >> log2WordSize + + // generate a mask for the data that needs to be shifted right + // within that slice element that gets modified + dataMask := ^((uint64(1) << (i & (wordSize - 1))) - 1) + + // extract the data that we'll shift right from the slice element + data := b.set[deleteAtElement] & dataMask + + // set the masked area to 0 while leaving the rest as it is + b.set[deleteAtElement] &= ^dataMask + + // shift the previously extracted data to the right and then + // set it in the previously masked area + b.set[deleteAtElement] |= (data >> 1) & dataMask + + // loop over all the consecutive slice elements to copy each + // lowest bit into the highest position of the previous element, + // then shift the entire content to the right by 1 + for i := int(deleteAtElement) + 1; i < len(b.set); i++ { + b.set[i-1] |= (b.set[i] & 1) << 63 + b.set[i] >>= 1 + } + + b.length = b.length - 1 + + return b +} + +// NextSet returns the next bit set from the specified index, +// including possibly the current index +// along with an error code (true = valid, false = no set bit found) +// for i,e := v.NextSet(0); e; i,e = v.NextSet(i + 1) {...} +func (b *BitSet) NextSet(i uint) (uint, bool) { + x := int(i >> log2WordSize) + if x >= len(b.set) { + return 0, false + } + w := b.set[x] + w = w >> (i & (wordSize - 1)) + if w != 0 { + return i + trailingZeroes64(w), true + } + x = x + 1 + for x < len(b.set) { + if b.set[x] != 0 { + return uint(x)*wordSize + trailingZeroes64(b.set[x]), true + } + x = x + 1 + + } + return 0, false +} + +// NextSetMany returns many next bit sets from the specified index, +// including possibly the current index and up to cap(buffer). +// If the returned slice has len zero, then no more set bits were found +// +// buffer := make([]uint, 256) // this should be reused +// j := uint(0) +// j, buffer = bitmap.NextSetMany(j, buffer) +// for ; len(buffer) > 0; j, buffer = bitmap.NextSetMany(j,buffer) { +// for k := range buffer { +// do something with buffer[k] +// } +// j += 1 +// } +// +func (b *BitSet) NextSetMany(i uint, buffer []uint) (uint, []uint) { + myanswer := buffer + capacity := cap(buffer) + x := int(i >> log2WordSize) + if x >= len(b.set) || capacity == 0 { + return 0, myanswer[:0] + } + skip := i & (wordSize - 1) + word := b.set[x] >> skip + myanswer = myanswer[:capacity] + size := int(0) + for word != 0 { + r := trailingZeroes64(word) + t := word & ((^word) + 1) + myanswer[size] = r + i + size++ + if size == capacity { + goto End + } + word = word ^ t + } + x++ + for idx, word := range b.set[x:] { + for word != 0 { + r := trailingZeroes64(word) + t := word & ((^word) + 1) + myanswer[size] = r + (uint(x+idx) << 6) + size++ + if size == capacity { + goto End + } + word = word ^ t + } + } +End: + if size > 0 { + return myanswer[size-1], myanswer[:size] + } + return 0, myanswer[:0] +} + +// NextClear returns the next clear bit from the specified index, +// including possibly the current index +// along with an error code (true = valid, false = no bit found i.e. all bits are set) +func (b *BitSet) NextClear(i uint) (uint, bool) { + x := int(i >> log2WordSize) + if x >= len(b.set) { + return 0, false + } + w := b.set[x] + w = w >> (i & (wordSize - 1)) + wA := allBits >> (i & (wordSize - 1)) + index := i + trailingZeroes64(^w) + if w != wA && index < b.length { + return index, true + } + x++ + for x < len(b.set) { + index = uint(x)*wordSize + trailingZeroes64(^b.set[x]) + if b.set[x] != allBits && index < b.length { + return index, true + } + x++ + } + return 0, false +} + +// ClearAll clears the entire BitSet +func (b *BitSet) ClearAll() *BitSet { + if b != nil && b.set != nil { + for i := range b.set { + b.set[i] = 0 + } + } + return b +} + +// wordCount returns the number of words used in a bit set +func (b *BitSet) wordCount() int { + return len(b.set) +} + +// Clone this BitSet +func (b *BitSet) Clone() *BitSet { + c := New(b.length) + if b.set != nil { // Clone should not modify current object + copy(c.set, b.set) + } + return c +} + +// Copy into a destination BitSet +// Returning the size of the destination BitSet +// like array copy +func (b *BitSet) Copy(c *BitSet) (count uint) { + if c == nil { + return + } + if b.set != nil { // Copy should not modify current object + copy(c.set, b.set) + } + count = c.length + if b.length < c.length { + count = b.length + } + return +} + +// Count (number of set bits). +// Also known as "popcount" or "popularity count". +func (b *BitSet) Count() uint { + if b != nil && b.set != nil { + return uint(popcntSlice(b.set)) + } + return 0 +} + +// Equal tests the equivalence of two BitSets. +// False if they are of different sizes, otherwise true +// only if all the same bits are set +func (b *BitSet) Equal(c *BitSet) bool { + if c == nil || b == nil { + return c == b + } + if b.length != c.length { + return false + } + if b.length == 0 { // if they have both length == 0, then could have nil set + return true + } + // testing for equality shoud not transform the bitset (no call to safeSet) + + for p, v := range b.set { + if c.set[p] != v { + return false + } + } + return true +} + +func panicIfNull(b *BitSet) { + if b == nil { + panic(Error("BitSet must not be null")) + } +} + +// Difference of base set and other set +// This is the BitSet equivalent of &^ (and not) +func (b *BitSet) Difference(compare *BitSet) (result *BitSet) { + panicIfNull(b) + panicIfNull(compare) + result = b.Clone() // clone b (in case b is bigger than compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + for i := 0; i < l; i++ { + result.set[i] = b.set[i] &^ compare.set[i] + } + return +} + +// DifferenceCardinality computes the cardinality of the differnce +func (b *BitSet) DifferenceCardinality(compare *BitSet) uint { + panicIfNull(b) + panicIfNull(compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + cnt := uint64(0) + cnt += popcntMaskSlice(b.set[:l], compare.set[:l]) + cnt += popcntSlice(b.set[l:]) + return uint(cnt) +} + +// InPlaceDifference computes the difference of base set and other set +// This is the BitSet equivalent of &^ (and not) +func (b *BitSet) InPlaceDifference(compare *BitSet) { + panicIfNull(b) + panicIfNull(compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + for i := 0; i < l; i++ { + b.set[i] &^= compare.set[i] + } +} + +// Convenience function: return two bitsets ordered by +// increasing length. Note: neither can be nil +func sortByLength(a *BitSet, b *BitSet) (ap *BitSet, bp *BitSet) { + if a.length <= b.length { + ap, bp = a, b + } else { + ap, bp = b, a + } + return +} + +// Intersection of base set and other set +// This is the BitSet equivalent of & (and) +func (b *BitSet) Intersection(compare *BitSet) (result *BitSet) { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + result = New(b.length) + for i, word := range b.set { + result.set[i] = word & compare.set[i] + } + return +} + +// IntersectionCardinality computes the cardinality of the union +func (b *BitSet) IntersectionCardinality(compare *BitSet) uint { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + cnt := popcntAndSlice(b.set, compare.set) + return uint(cnt) +} + +// InPlaceIntersection destructively computes the intersection of +// base set and the compare set. +// This is the BitSet equivalent of & (and) +func (b *BitSet) InPlaceIntersection(compare *BitSet) { + panicIfNull(b) + panicIfNull(compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + for i := 0; i < l; i++ { + b.set[i] &= compare.set[i] + } + for i := l; i < len(b.set); i++ { + b.set[i] = 0 + } + if compare.length > 0 { + b.extendSetMaybe(compare.length - 1) + } +} + +// Union of base set and other set +// This is the BitSet equivalent of | (or) +func (b *BitSet) Union(compare *BitSet) (result *BitSet) { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + result = compare.Clone() + for i, word := range b.set { + result.set[i] = word | compare.set[i] + } + return +} + +// UnionCardinality computes the cardinality of the uniton of the base set +// and the compare set. +func (b *BitSet) UnionCardinality(compare *BitSet) uint { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + cnt := popcntOrSlice(b.set, compare.set) + if len(compare.set) > len(b.set) { + cnt += popcntSlice(compare.set[len(b.set):]) + } + return uint(cnt) +} + +// InPlaceUnion creates the destructive union of base set and compare set. +// This is the BitSet equivalent of | (or). +func (b *BitSet) InPlaceUnion(compare *BitSet) { + panicIfNull(b) + panicIfNull(compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + if compare.length > 0 { + b.extendSetMaybe(compare.length - 1) + } + for i := 0; i < l; i++ { + b.set[i] |= compare.set[i] + } + if len(compare.set) > l { + for i := l; i < len(compare.set); i++ { + b.set[i] = compare.set[i] + } + } +} + +// SymmetricDifference of base set and other set +// This is the BitSet equivalent of ^ (xor) +func (b *BitSet) SymmetricDifference(compare *BitSet) (result *BitSet) { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + // compare is bigger, so clone it + result = compare.Clone() + for i, word := range b.set { + result.set[i] = word ^ compare.set[i] + } + return +} + +// SymmetricDifferenceCardinality computes the cardinality of the symmetric difference +func (b *BitSet) SymmetricDifferenceCardinality(compare *BitSet) uint { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + cnt := popcntXorSlice(b.set, compare.set) + if len(compare.set) > len(b.set) { + cnt += popcntSlice(compare.set[len(b.set):]) + } + return uint(cnt) +} + +// InPlaceSymmetricDifference creates the destructive SymmetricDifference of base set and other set +// This is the BitSet equivalent of ^ (xor) +func (b *BitSet) InPlaceSymmetricDifference(compare *BitSet) { + panicIfNull(b) + panicIfNull(compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + if compare.length > 0 { + b.extendSetMaybe(compare.length - 1) + } + for i := 0; i < l; i++ { + b.set[i] ^= compare.set[i] + } + if len(compare.set) > l { + for i := l; i < len(compare.set); i++ { + b.set[i] = compare.set[i] + } + } +} + +// Is the length an exact multiple of word sizes? +func (b *BitSet) isLenExactMultiple() bool { + return b.length%wordSize == 0 +} + +// Clean last word by setting unused bits to 0 +func (b *BitSet) cleanLastWord() { + if !b.isLenExactMultiple() { + b.set[len(b.set)-1] &= allBits >> (wordSize - b.length%wordSize) + } +} + +// Complement computes the (local) complement of a biset (up to length bits) +func (b *BitSet) Complement() (result *BitSet) { + panicIfNull(b) + result = New(b.length) + for i, word := range b.set { + result.set[i] = ^word + } + result.cleanLastWord() + return +} + +// All returns true if all bits are set, false otherwise. Returns true for +// empty sets. +func (b *BitSet) All() bool { + panicIfNull(b) + return b.Count() == b.length +} + +// None returns true if no bit is set, false otherwise. Returns true for +// empty sets. +func (b *BitSet) None() bool { + panicIfNull(b) + if b != nil && b.set != nil { + for _, word := range b.set { + if word > 0 { + return false + } + } + return true + } + return true +} + +// Any returns true if any bit is set, false otherwise +func (b *BitSet) Any() bool { + panicIfNull(b) + return !b.None() +} + +// IsSuperSet returns true if this is a superset of the other set +func (b *BitSet) IsSuperSet(other *BitSet) bool { + for i, e := other.NextSet(0); e; i, e = other.NextSet(i + 1) { + if !b.Test(i) { + return false + } + } + return true +} + +// IsStrictSuperSet returns true if this is a strict superset of the other set +func (b *BitSet) IsStrictSuperSet(other *BitSet) bool { + return b.Count() > other.Count() && b.IsSuperSet(other) +} + +// DumpAsBits dumps a bit set as a string of bits +func (b *BitSet) DumpAsBits() string { + if b.set == nil { + return "." + } + buffer := bytes.NewBufferString("") + i := len(b.set) - 1 + for ; i >= 0; i-- { + fmt.Fprintf(buffer, "%064b.", b.set[i]) + } + return buffer.String() +} + +// BinaryStorageSize returns the binary storage requirements +func (b *BitSet) BinaryStorageSize() int { + return binary.Size(uint64(0)) + binary.Size(b.set) +} + +// WriteTo writes a BitSet to a stream +func (b *BitSet) WriteTo(stream io.Writer) (int64, error) { + length := uint64(b.length) + + // Write length + err := binary.Write(stream, binaryOrder, length) + if err != nil { + return 0, err + } + + // Write set + err = binary.Write(stream, binaryOrder, b.set) + return int64(b.BinaryStorageSize()), err +} + +// ReadFrom reads a BitSet from a stream written using WriteTo +func (b *BitSet) ReadFrom(stream io.Reader) (int64, error) { + var length uint64 + + // Read length first + err := binary.Read(stream, binaryOrder, &length) + if err != nil { + return 0, err + } + newset := New(uint(length)) + + if uint64(newset.length) != length { + return 0, errors.New("Unmarshalling error: type mismatch") + } + + // Read remaining bytes as set + err = binary.Read(stream, binaryOrder, newset.set) + if err != nil { + return 0, err + } + + *b = *newset + return int64(b.BinaryStorageSize()), nil +} + +// MarshalBinary encodes a BitSet into a binary form and returns the result. +func (b *BitSet) MarshalBinary() ([]byte, error) { + var buf bytes.Buffer + writer := bufio.NewWriter(&buf) + + _, err := b.WriteTo(writer) + if err != nil { + return []byte{}, err + } + + err = writer.Flush() + + return buf.Bytes(), err +} + +// UnmarshalBinary decodes the binary form generated by MarshalBinary. +func (b *BitSet) UnmarshalBinary(data []byte) error { + buf := bytes.NewReader(data) + reader := bufio.NewReader(buf) + + _, err := b.ReadFrom(reader) + + return err +} + +// MarshalJSON marshals a BitSet as a JSON structure +func (b *BitSet) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBuffer(make([]byte, 0, b.BinaryStorageSize())) + _, err := b.WriteTo(buffer) + if err != nil { + return nil, err + } + + // URLEncode all bytes + return json.Marshal(base64Encoding.EncodeToString(buffer.Bytes())) +} + +// UnmarshalJSON unmarshals a BitSet from JSON created using MarshalJSON +func (b *BitSet) UnmarshalJSON(data []byte) error { + // Unmarshal as string + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + + // URLDecode string + buf, err := base64Encoding.DecodeString(s) + if err != nil { + return err + } + + _, err = b.ReadFrom(bytes.NewReader(buf)) + return err +} diff --git a/vendor/github.com/willf/bitset/popcnt.go b/vendor/github.com/willf/bitset/popcnt.go new file mode 100644 index 00000000000..76577a83828 --- /dev/null +++ b/vendor/github.com/willf/bitset/popcnt.go @@ -0,0 +1,53 @@ +package bitset + +// bit population count, take from +// https://code.google.com/p/go/issues/detail?id=4988#c11 +// credit: https://code.google.com/u/arnehormann/ +func popcount(x uint64) (n uint64) { + x -= (x >> 1) & 0x5555555555555555 + x = (x>>2)&0x3333333333333333 + x&0x3333333333333333 + x += x >> 4 + x &= 0x0f0f0f0f0f0f0f0f + x *= 0x0101010101010101 + return x >> 56 +} + +func popcntSliceGo(s []uint64) uint64 { + cnt := uint64(0) + for _, x := range s { + cnt += popcount(x) + } + return cnt +} + +func popcntMaskSliceGo(s, m []uint64) uint64 { + cnt := uint64(0) + for i := range s { + cnt += popcount(s[i] &^ m[i]) + } + return cnt +} + +func popcntAndSliceGo(s, m []uint64) uint64 { + cnt := uint64(0) + for i := range s { + cnt += popcount(s[i] & m[i]) + } + return cnt +} + +func popcntOrSliceGo(s, m []uint64) uint64 { + cnt := uint64(0) + for i := range s { + cnt += popcount(s[i] | m[i]) + } + return cnt +} + +func popcntXorSliceGo(s, m []uint64) uint64 { + cnt := uint64(0) + for i := range s { + cnt += popcount(s[i] ^ m[i]) + } + return cnt +} diff --git a/vendor/github.com/willf/bitset/popcnt_19.go b/vendor/github.com/willf/bitset/popcnt_19.go new file mode 100644 index 00000000000..fc8ff4f367c --- /dev/null +++ b/vendor/github.com/willf/bitset/popcnt_19.go @@ -0,0 +1,45 @@ +// +build go1.9 + +package bitset + +import "math/bits" + +func popcntSlice(s []uint64) uint64 { + var cnt int + for _, x := range s { + cnt += bits.OnesCount64(x) + } + return uint64(cnt) +} + +func popcntMaskSlice(s, m []uint64) uint64 { + var cnt int + for i := range s { + cnt += bits.OnesCount64(s[i] &^ m[i]) + } + return uint64(cnt) +} + +func popcntAndSlice(s, m []uint64) uint64 { + var cnt int + for i := range s { + cnt += bits.OnesCount64(s[i] & m[i]) + } + return uint64(cnt) +} + +func popcntOrSlice(s, m []uint64) uint64 { + var cnt int + for i := range s { + cnt += bits.OnesCount64(s[i] | m[i]) + } + return uint64(cnt) +} + +func popcntXorSlice(s, m []uint64) uint64 { + var cnt int + for i := range s { + cnt += bits.OnesCount64(s[i] ^ m[i]) + } + return uint64(cnt) +} diff --git a/vendor/github.com/willf/bitset/popcnt_amd64.go b/vendor/github.com/willf/bitset/popcnt_amd64.go new file mode 100644 index 00000000000..4cf64f24ad0 --- /dev/null +++ b/vendor/github.com/willf/bitset/popcnt_amd64.go @@ -0,0 +1,68 @@ +// +build !go1.9 +// +build amd64,!appengine + +package bitset + +// *** the following functions are defined in popcnt_amd64.s + +//go:noescape + +func hasAsm() bool + +// useAsm is a flag used to select the GO or ASM implementation of the popcnt function +var useAsm = hasAsm() + +//go:noescape + +func popcntSliceAsm(s []uint64) uint64 + +//go:noescape + +func popcntMaskSliceAsm(s, m []uint64) uint64 + +//go:noescape + +func popcntAndSliceAsm(s, m []uint64) uint64 + +//go:noescape + +func popcntOrSliceAsm(s, m []uint64) uint64 + +//go:noescape + +func popcntXorSliceAsm(s, m []uint64) uint64 + +func popcntSlice(s []uint64) uint64 { + if useAsm { + return popcntSliceAsm(s) + } + return popcntSliceGo(s) +} + +func popcntMaskSlice(s, m []uint64) uint64 { + if useAsm { + return popcntMaskSliceAsm(s, m) + } + return popcntMaskSliceGo(s, m) +} + +func popcntAndSlice(s, m []uint64) uint64 { + if useAsm { + return popcntAndSliceAsm(s, m) + } + return popcntAndSliceGo(s, m) +} + +func popcntOrSlice(s, m []uint64) uint64 { + if useAsm { + return popcntOrSliceAsm(s, m) + } + return popcntOrSliceGo(s, m) +} + +func popcntXorSlice(s, m []uint64) uint64 { + if useAsm { + return popcntXorSliceAsm(s, m) + } + return popcntXorSliceGo(s, m) +} diff --git a/vendor/github.com/willf/bitset/popcnt_amd64.s b/vendor/github.com/willf/bitset/popcnt_amd64.s new file mode 100644 index 00000000000..666c0dcc17f --- /dev/null +++ b/vendor/github.com/willf/bitset/popcnt_amd64.s @@ -0,0 +1,104 @@ +// +build !go1.9 +// +build amd64,!appengine + +TEXT ·hasAsm(SB),4,$0-1 +MOVQ $1, AX +CPUID +SHRQ $23, CX +ANDQ $1, CX +MOVB CX, ret+0(FP) +RET + +#define POPCNTQ_DX_DX BYTE $0xf3; BYTE $0x48; BYTE $0x0f; BYTE $0xb8; BYTE $0xd2 + +TEXT ·popcntSliceAsm(SB),4,$0-32 +XORQ AX, AX +MOVQ s+0(FP), SI +MOVQ s_len+8(FP), CX +TESTQ CX, CX +JZ popcntSliceEnd +popcntSliceLoop: +BYTE $0xf3; BYTE $0x48; BYTE $0x0f; BYTE $0xb8; BYTE $0x16 // POPCNTQ (SI), DX +ADDQ DX, AX +ADDQ $8, SI +LOOP popcntSliceLoop +popcntSliceEnd: +MOVQ AX, ret+24(FP) +RET + +TEXT ·popcntMaskSliceAsm(SB),4,$0-56 +XORQ AX, AX +MOVQ s+0(FP), SI +MOVQ s_len+8(FP), CX +TESTQ CX, CX +JZ popcntMaskSliceEnd +MOVQ m+24(FP), DI +popcntMaskSliceLoop: +MOVQ (DI), DX +NOTQ DX +ANDQ (SI), DX +POPCNTQ_DX_DX +ADDQ DX, AX +ADDQ $8, SI +ADDQ $8, DI +LOOP popcntMaskSliceLoop +popcntMaskSliceEnd: +MOVQ AX, ret+48(FP) +RET + +TEXT ·popcntAndSliceAsm(SB),4,$0-56 +XORQ AX, AX +MOVQ s+0(FP), SI +MOVQ s_len+8(FP), CX +TESTQ CX, CX +JZ popcntAndSliceEnd +MOVQ m+24(FP), DI +popcntAndSliceLoop: +MOVQ (DI), DX +ANDQ (SI), DX +POPCNTQ_DX_DX +ADDQ DX, AX +ADDQ $8, SI +ADDQ $8, DI +LOOP popcntAndSliceLoop +popcntAndSliceEnd: +MOVQ AX, ret+48(FP) +RET + +TEXT ·popcntOrSliceAsm(SB),4,$0-56 +XORQ AX, AX +MOVQ s+0(FP), SI +MOVQ s_len+8(FP), CX +TESTQ CX, CX +JZ popcntOrSliceEnd +MOVQ m+24(FP), DI +popcntOrSliceLoop: +MOVQ (DI), DX +ORQ (SI), DX +POPCNTQ_DX_DX +ADDQ DX, AX +ADDQ $8, SI +ADDQ $8, DI +LOOP popcntOrSliceLoop +popcntOrSliceEnd: +MOVQ AX, ret+48(FP) +RET + +TEXT ·popcntXorSliceAsm(SB),4,$0-56 +XORQ AX, AX +MOVQ s+0(FP), SI +MOVQ s_len+8(FP), CX +TESTQ CX, CX +JZ popcntXorSliceEnd +MOVQ m+24(FP), DI +popcntXorSliceLoop: +MOVQ (DI), DX +XORQ (SI), DX +POPCNTQ_DX_DX +ADDQ DX, AX +ADDQ $8, SI +ADDQ $8, DI +LOOP popcntXorSliceLoop +popcntXorSliceEnd: +MOVQ AX, ret+48(FP) +RET diff --git a/vendor/github.com/willf/bitset/popcnt_generic.go b/vendor/github.com/willf/bitset/popcnt_generic.go new file mode 100644 index 00000000000..21e0ff7b4fc --- /dev/null +++ b/vendor/github.com/willf/bitset/popcnt_generic.go @@ -0,0 +1,24 @@ +// +build !go1.9 +// +build !amd64 appengine + +package bitset + +func popcntSlice(s []uint64) uint64 { + return popcntSliceGo(s) +} + +func popcntMaskSlice(s, m []uint64) uint64 { + return popcntMaskSliceGo(s, m) +} + +func popcntAndSlice(s, m []uint64) uint64 { + return popcntAndSliceGo(s, m) +} + +func popcntOrSlice(s, m []uint64) uint64 { + return popcntOrSliceGo(s, m) +} + +func popcntXorSlice(s, m []uint64) uint64 { + return popcntXorSliceGo(s, m) +} diff --git a/vendor/github.com/willf/bitset/trailing_zeros_18.go b/vendor/github.com/willf/bitset/trailing_zeros_18.go new file mode 100644 index 00000000000..c52b61be9fc --- /dev/null +++ b/vendor/github.com/willf/bitset/trailing_zeros_18.go @@ -0,0 +1,14 @@ +// +build !go1.9 + +package bitset + +var deBruijn = [...]byte{ + 0, 1, 56, 2, 57, 49, 28, 3, 61, 58, 42, 50, 38, 29, 17, 4, + 62, 47, 59, 36, 45, 43, 51, 22, 53, 39, 33, 30, 24, 18, 12, 5, + 63, 55, 48, 27, 60, 41, 37, 16, 46, 35, 44, 21, 52, 32, 23, 11, + 54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6, +} + +func trailingZeroes64(v uint64) uint { + return uint(deBruijn[((v&-v)*0x03f79d71b4ca8b09)>>58]) +} diff --git a/vendor/github.com/willf/bitset/trailing_zeros_19.go b/vendor/github.com/willf/bitset/trailing_zeros_19.go new file mode 100644 index 00000000000..36a988e714d --- /dev/null +++ b/vendor/github.com/willf/bitset/trailing_zeros_19.go @@ -0,0 +1,9 @@ +// +build go1.9 + +package bitset + +import "math/bits" + +func trailingZeroes64(v uint64) uint { + return uint(bits.TrailingZeros64(v)) +} diff --git a/vendor/go.etcd.io/bbolt/.travis.yml b/vendor/go.etcd.io/bbolt/.travis.yml index a60300c5588..257dfdfee48 100644 --- a/vendor/go.etcd.io/bbolt/.travis.yml +++ b/vendor/go.etcd.io/bbolt/.travis.yml @@ -4,7 +4,7 @@ go_import_path: go.etcd.io/bbolt sudo: false go: -- 1.11 +- 1.12 before_install: - go get -v honnef.co/go/tools/... diff --git a/vendor/go.etcd.io/bbolt/README.md b/vendor/go.etcd.io/bbolt/README.md index e9989efc507..c9e64b1a615 100644 --- a/vendor/go.etcd.io/bbolt/README.md +++ b/vendor/go.etcd.io/bbolt/README.md @@ -152,11 +152,12 @@ are not thread safe. To work with data in multiple goroutines you must start a transaction for each one or use locking to ensure only one goroutine accesses a transaction at a time. Creating transaction from the `DB` is thread safe. -Read-only transactions and read-write transactions should not depend on one -another and generally shouldn't be opened simultaneously in the same goroutine. -This can cause a deadlock as the read-write transaction needs to periodically -re-map the data file but it cannot do so while a read-only transaction is open. - +Transactions should not depend on one another and generally shouldn't be opened +simultaneously in the same goroutine. This can cause a deadlock as the read-write +transaction needs to periodically re-map the data file but it cannot do so while +any read-only transaction is open. Even a nested read-only transaction can cause +a deadlock, as the child transaction can block the parent transaction from releasing +its resources. #### Read-write transactions @@ -275,7 +276,7 @@ should be writable. ### Using buckets Buckets are collections of key/value pairs within the database. All keys in a -bucket must be unique. You can create a bucket using the `DB.CreateBucket()` +bucket must be unique. You can create a bucket using the `Tx.CreateBucket()` function: ```go @@ -923,6 +924,7 @@ Below is a list of public, open source projects that use Bolt: * [GoWebApp](https://github.com/josephspurrier/gowebapp) - A basic MVC web application in Go using BoltDB. * [GoShort](https://github.com/pankajkhairnar/goShort) - GoShort is a URL shortener written in Golang and BoltDB for persistent key/value storage and for routing it's using high performent HTTPRouter. * [gopherpit](https://github.com/gopherpit/gopherpit) - A web service to manage Go remote import paths with custom domains +* [gokv](https://github.com/philippgille/gokv) - Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more) * [Gitchain](https://github.com/gitchain/gitchain) - Decentralized, peer-to-peer Git repositories aka "Git meets Bitcoin". * [InfluxDB](https://influxdata.com) - Scalable datastore for metrics, events, and real-time analytics. * [ipLocator](https://github.com/AndreasBriese/ipLocator) - A fast ip-geo-location-server using bolt with bloom filters. @@ -935,6 +937,7 @@ Below is a list of public, open source projects that use Bolt: * [mbuckets](https://github.com/abhigupta912/mbuckets) - A Bolt wrapper that allows easy operations on multi level (nested) buckets. * [MetricBase](https://github.com/msiebuhr/MetricBase) - Single-binary version of Graphite. * [MuLiFS](https://github.com/dankomiocevic/mulifs) - Music Library Filesystem creates a filesystem to organise your music files. +* [NATS](https://github.com/nats-io/nats-streaming-server) - NATS Streaming uses bbolt for message and metadata storage. * [Operation Go: A Routine Mission](http://gocode.io) - An online programming game for Golang using Bolt for user accounts and a leaderboard. * [photosite/session](https://godoc.org/bitbucket.org/kardianos/photosite/session) - Sessions for a photo viewing site. * [Prometheus Annotation Server](https://github.com/oliver006/prom_annotation_server) - Annotation server for PromDash & Prometheus service monitoring system. diff --git a/vendor/go.etcd.io/bbolt/bolt_386.go b/vendor/go.etcd.io/bbolt/bolt_386.go index 4d35ee7cf3d..aee25960ff9 100644 --- a/vendor/go.etcd.io/bbolt/bolt_386.go +++ b/vendor/go.etcd.io/bbolt/bolt_386.go @@ -5,6 +5,3 @@ const maxMapSize = 0x7FFFFFFF // 2GB // maxAllocSize is the size used when creating array pointers. const maxAllocSize = 0xFFFFFFF - -// Are unaligned load/stores broken on this arch? -var brokenUnaligned = false diff --git a/vendor/go.etcd.io/bbolt/bolt_amd64.go b/vendor/go.etcd.io/bbolt/bolt_amd64.go index 60a52dad56b..5dd8f3f2aeb 100644 --- a/vendor/go.etcd.io/bbolt/bolt_amd64.go +++ b/vendor/go.etcd.io/bbolt/bolt_amd64.go @@ -5,6 +5,3 @@ const maxMapSize = 0xFFFFFFFFFFFF // 256TB // maxAllocSize is the size used when creating array pointers. const maxAllocSize = 0x7FFFFFFF - -// Are unaligned load/stores broken on this arch? -var brokenUnaligned = false diff --git a/vendor/go.etcd.io/bbolt/bolt_arm.go b/vendor/go.etcd.io/bbolt/bolt_arm.go index 105d27ddb7d..aee25960ff9 100644 --- a/vendor/go.etcd.io/bbolt/bolt_arm.go +++ b/vendor/go.etcd.io/bbolt/bolt_arm.go @@ -1,28 +1,7 @@ package bbolt -import "unsafe" - // maxMapSize represents the largest mmap size supported by Bolt. const maxMapSize = 0x7FFFFFFF // 2GB // maxAllocSize is the size used when creating array pointers. const maxAllocSize = 0xFFFFFFF - -// Are unaligned load/stores broken on this arch? -var brokenUnaligned bool - -func init() { - // Simple check to see whether this arch handles unaligned load/stores - // correctly. - - // ARM9 and older devices require load/stores to be from/to aligned - // addresses. If not, the lower 2 bits are cleared and that address is - // read in a jumbled up order. - - // See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15414.html - - raw := [6]byte{0xfe, 0xef, 0x11, 0x22, 0x22, 0x11} - val := *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&raw)) + 2)) - - brokenUnaligned = val != 0x11222211 -} diff --git a/vendor/go.etcd.io/bbolt/bolt_arm64.go b/vendor/go.etcd.io/bbolt/bolt_arm64.go index f5aa2a5ee24..810dfd55c53 100644 --- a/vendor/go.etcd.io/bbolt/bolt_arm64.go +++ b/vendor/go.etcd.io/bbolt/bolt_arm64.go @@ -7,6 +7,3 @@ const maxMapSize = 0xFFFFFFFFFFFF // 256TB // maxAllocSize is the size used when creating array pointers. const maxAllocSize = 0x7FFFFFFF - -// Are unaligned load/stores broken on this arch? -var brokenUnaligned = false diff --git a/vendor/go.etcd.io/bbolt/bolt_mips64x.go b/vendor/go.etcd.io/bbolt/bolt_mips64x.go index baeb289fd94..dd8ffe12393 100644 --- a/vendor/go.etcd.io/bbolt/bolt_mips64x.go +++ b/vendor/go.etcd.io/bbolt/bolt_mips64x.go @@ -7,6 +7,3 @@ const maxMapSize = 0x8000000000 // 512GB // maxAllocSize is the size used when creating array pointers. const maxAllocSize = 0x7FFFFFFF - -// Are unaligned load/stores broken on this arch? -var brokenUnaligned = false diff --git a/vendor/go.etcd.io/bbolt/bolt_mipsx.go b/vendor/go.etcd.io/bbolt/bolt_mipsx.go index 2d9b1a91f36..a669703a4e3 100644 --- a/vendor/go.etcd.io/bbolt/bolt_mipsx.go +++ b/vendor/go.etcd.io/bbolt/bolt_mipsx.go @@ -7,6 +7,3 @@ const maxMapSize = 0x40000000 // 1GB // maxAllocSize is the size used when creating array pointers. const maxAllocSize = 0xFFFFFFF - -// Are unaligned load/stores broken on this arch? -var brokenUnaligned = false diff --git a/vendor/go.etcd.io/bbolt/bolt_ppc.go b/vendor/go.etcd.io/bbolt/bolt_ppc.go index 69804714aae..84e545ef3e7 100644 --- a/vendor/go.etcd.io/bbolt/bolt_ppc.go +++ b/vendor/go.etcd.io/bbolt/bolt_ppc.go @@ -7,6 +7,3 @@ const maxMapSize = 0x7FFFFFFF // 2GB // maxAllocSize is the size used when creating array pointers. const maxAllocSize = 0xFFFFFFF - -// Are unaligned load/stores broken on this arch? -var brokenUnaligned = false diff --git a/vendor/go.etcd.io/bbolt/bolt_ppc64.go b/vendor/go.etcd.io/bbolt/bolt_ppc64.go index 35659085760..a76120908cb 100644 --- a/vendor/go.etcd.io/bbolt/bolt_ppc64.go +++ b/vendor/go.etcd.io/bbolt/bolt_ppc64.go @@ -7,6 +7,3 @@ const maxMapSize = 0xFFFFFFFFFFFF // 256TB // maxAllocSize is the size used when creating array pointers. const maxAllocSize = 0x7FFFFFFF - -// Are unaligned load/stores broken on this arch? -var brokenUnaligned = false diff --git a/vendor/go.etcd.io/bbolt/bolt_ppc64le.go b/vendor/go.etcd.io/bbolt/bolt_ppc64le.go index 422c7c69d66..c830f2fc77a 100644 --- a/vendor/go.etcd.io/bbolt/bolt_ppc64le.go +++ b/vendor/go.etcd.io/bbolt/bolt_ppc64le.go @@ -7,6 +7,3 @@ const maxMapSize = 0xFFFFFFFFFFFF // 256TB // maxAllocSize is the size used when creating array pointers. const maxAllocSize = 0x7FFFFFFF - -// Are unaligned load/stores broken on this arch? -var brokenUnaligned = false diff --git a/vendor/go.etcd.io/bbolt/bolt_riscv64.go b/vendor/go.etcd.io/bbolt/bolt_riscv64.go index 07b4b47cdb8..c967613b006 100644 --- a/vendor/go.etcd.io/bbolt/bolt_riscv64.go +++ b/vendor/go.etcd.io/bbolt/bolt_riscv64.go @@ -7,6 +7,3 @@ const maxMapSize = 0xFFFFFFFFFFFF // 256TB // maxAllocSize is the size used when creating array pointers. const maxAllocSize = 0x7FFFFFFF - -// Are unaligned load/stores broken on this arch? -var brokenUnaligned = true diff --git a/vendor/go.etcd.io/bbolt/bolt_s390x.go b/vendor/go.etcd.io/bbolt/bolt_s390x.go index 6d3fcb825d3..ff2a5609707 100644 --- a/vendor/go.etcd.io/bbolt/bolt_s390x.go +++ b/vendor/go.etcd.io/bbolt/bolt_s390x.go @@ -7,6 +7,3 @@ const maxMapSize = 0xFFFFFFFFFFFF // 256TB // maxAllocSize is the size used when creating array pointers. const maxAllocSize = 0x7FFFFFFF - -// Are unaligned load/stores broken on this arch? -var brokenUnaligned = false diff --git a/vendor/go.etcd.io/bbolt/bolt_unix.go b/vendor/go.etcd.io/bbolt/bolt_unix.go index 5f2bb514519..2938fed5845 100644 --- a/vendor/go.etcd.io/bbolt/bolt_unix.go +++ b/vendor/go.etcd.io/bbolt/bolt_unix.go @@ -1,4 +1,4 @@ -// +build !windows,!plan9,!solaris +// +build !windows,!plan9,!solaris,!aix package bbolt diff --git a/vendor/go.etcd.io/bbolt/bolt_unix_aix.go b/vendor/go.etcd.io/bbolt/bolt_unix_aix.go new file mode 100644 index 00000000000..a64c16f5129 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/bolt_unix_aix.go @@ -0,0 +1,90 @@ +// +build aix + +package bbolt + +import ( + "fmt" + "syscall" + "time" + "unsafe" + + "golang.org/x/sys/unix" +) + +// flock acquires an advisory lock on a file descriptor. +func flock(db *DB, exclusive bool, timeout time.Duration) error { + var t time.Time + if timeout != 0 { + t = time.Now() + } + fd := db.file.Fd() + var lockType int16 + if exclusive { + lockType = syscall.F_WRLCK + } else { + lockType = syscall.F_RDLCK + } + for { + // Attempt to obtain an exclusive lock. + lock := syscall.Flock_t{Type: lockType} + err := syscall.FcntlFlock(fd, syscall.F_SETLK, &lock) + if err == nil { + return nil + } else if err != syscall.EAGAIN { + return err + } + + // If we timed out then return an error. + if timeout != 0 && time.Since(t) > timeout-flockRetryTimeout { + return ErrTimeout + } + + // Wait for a bit and try again. + time.Sleep(flockRetryTimeout) + } +} + +// funlock releases an advisory lock on a file descriptor. +func funlock(db *DB) error { + var lock syscall.Flock_t + lock.Start = 0 + lock.Len = 0 + lock.Type = syscall.F_UNLCK + lock.Whence = 0 + return syscall.FcntlFlock(uintptr(db.file.Fd()), syscall.F_SETLK, &lock) +} + +// mmap memory maps a DB's data file. +func mmap(db *DB, sz int) error { + // Map the data file to memory. + b, err := unix.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) + if err != nil { + return err + } + + // Advise the kernel that the mmap is accessed randomly. + if err := unix.Madvise(b, syscall.MADV_RANDOM); err != nil { + return fmt.Errorf("madvise: %s", err) + } + + // Save the original byte slice and convert to a byte array pointer. + db.dataref = b + db.data = (*[maxMapSize]byte)(unsafe.Pointer(&b[0])) + db.datasz = sz + return nil +} + +// munmap unmaps a DB's data file from memory. +func munmap(db *DB) error { + // Ignore the unmap if we have no mapped data. + if db.dataref == nil { + return nil + } + + // Unmap using the original byte slice. + err := unix.Munmap(db.dataref) + db.dataref = nil + db.data = nil + db.datasz = 0 + return err +} diff --git a/vendor/go.etcd.io/bbolt/bucket.go b/vendor/go.etcd.io/bbolt/bucket.go index 84bfd4d6a28..d8750b14871 100644 --- a/vendor/go.etcd.io/bbolt/bucket.go +++ b/vendor/go.etcd.io/bbolt/bucket.go @@ -123,10 +123,12 @@ func (b *Bucket) Bucket(name []byte) *Bucket { func (b *Bucket) openBucket(value []byte) *Bucket { var child = newBucket(b.tx) - // If unaligned load/stores are broken on this arch and value is - // unaligned simply clone to an aligned byte array. - unaligned := brokenUnaligned && uintptr(unsafe.Pointer(&value[0]))&3 != 0 - + // Unaligned access requires a copy to be made. + const unalignedMask = unsafe.Alignof(struct { + bucket + page + }{}) - 1 + unaligned := uintptr(unsafe.Pointer(&value[0]))&unalignedMask != 0 if unaligned { value = cloneBytes(value) } @@ -206,7 +208,7 @@ func (b *Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) { } // DeleteBucket deletes a bucket at the given key. -// Returns an error if the bucket does not exists, or if the key represents a non-bucket value. +// Returns an error if the bucket does not exist, or if the key represents a non-bucket value. func (b *Bucket) DeleteBucket(key []byte) error { if b.tx.db == nil { return ErrTxClosed @@ -228,7 +230,7 @@ func (b *Bucket) DeleteBucket(key []byte) error { // Recursively delete all child buckets. child := b.Bucket(key) err := child.ForEach(func(k, v []byte) error { - if v == nil { + if _, _, childFlags := child.Cursor().seek(k); (childFlags & bucketLeafFlag) != 0 { if err := child.DeleteBucket(k); err != nil { return fmt.Errorf("delete bucket: %s", err) } @@ -409,7 +411,7 @@ func (b *Bucket) Stats() BucketStats { if p.count != 0 { // If page has any elements, add all element headers. - used += leafPageElementSize * int(p.count-1) + used += leafPageElementSize * uintptr(p.count-1) // Add all element key, value sizes. // The computation takes advantage of the fact that the position @@ -417,16 +419,16 @@ func (b *Bucket) Stats() BucketStats { // of all previous elements' keys and values. // It also includes the last element's header. lastElement := p.leafPageElement(p.count - 1) - used += int(lastElement.pos + lastElement.ksize + lastElement.vsize) + used += uintptr(lastElement.pos + lastElement.ksize + lastElement.vsize) } if b.root == 0 { // For inlined bucket just update the inline stats - s.InlineBucketInuse += used + s.InlineBucketInuse += int(used) } else { // For non-inlined bucket update all the leaf stats s.LeafPageN++ - s.LeafInuse += used + s.LeafInuse += int(used) s.LeafOverflowN += int(p.overflow) // Collect stats from sub-buckets. @@ -447,13 +449,13 @@ func (b *Bucket) Stats() BucketStats { // used totals the used bytes for the page // Add header and all element headers. - used := pageHeaderSize + (branchPageElementSize * int(p.count-1)) + used := pageHeaderSize + (branchPageElementSize * uintptr(p.count-1)) // Add size of all keys and values. // Again, use the fact that last element's position equals to // the total of key, value sizes of all previous elements. - used += int(lastElement.pos + lastElement.ksize) - s.BranchInuse += used + used += uintptr(lastElement.pos + lastElement.ksize) + s.BranchInuse += int(used) s.BranchOverflowN += int(p.overflow) } @@ -593,7 +595,7 @@ func (b *Bucket) inlineable() bool { // our threshold for inline bucket size. var size = pageHeaderSize for _, inode := range n.inodes { - size += leafPageElementSize + len(inode.key) + len(inode.value) + size += leafPageElementSize + uintptr(len(inode.key)) + uintptr(len(inode.value)) if inode.flags&bucketLeafFlag != 0 { return false @@ -606,8 +608,8 @@ func (b *Bucket) inlineable() bool { } // Returns the maximum total size of a bucket to make it a candidate for inlining. -func (b *Bucket) maxInlineBucketSize() int { - return b.tx.db.pageSize / 4 +func (b *Bucket) maxInlineBucketSize() uintptr { + return uintptr(b.tx.db.pageSize / 4) } // write allocates and writes a bucket to a byte slice. diff --git a/vendor/go.etcd.io/bbolt/cursor.go b/vendor/go.etcd.io/bbolt/cursor.go index 3000aced6c4..98aeb449a4c 100644 --- a/vendor/go.etcd.io/bbolt/cursor.go +++ b/vendor/go.etcd.io/bbolt/cursor.go @@ -366,7 +366,7 @@ func (c *Cursor) node() *node { } for _, ref := range c.stack[:len(c.stack)-1] { _assert(!n.isLeaf, "expected branch node") - n = n.childAt(int(ref.index)) + n = n.childAt(ref.index) } _assert(n.isLeaf, "expected leaf node") return n diff --git a/vendor/go.etcd.io/bbolt/db.go b/vendor/go.etcd.io/bbolt/db.go index 870c8b1cc9b..80b0095cc34 100644 --- a/vendor/go.etcd.io/bbolt/db.go +++ b/vendor/go.etcd.io/bbolt/db.go @@ -206,12 +206,12 @@ func Open(path string, mode os.FileMode, options *Options) (*DB, error) { } // Open data file and separate sync handler for metadata writes. - db.path = path var err error - if db.file, err = db.openFile(db.path, flag|os.O_CREATE, mode); err != nil { + if db.file, err = db.openFile(path, flag|os.O_CREATE, mode); err != nil { _ = db.close() return nil, err } + db.path = db.file.Name() // Lock file so that other processes using Bolt in read-write mode cannot // use the database at the same time. This would cause corruption since diff --git a/vendor/go.etcd.io/bbolt/freelist.go b/vendor/go.etcd.io/bbolt/freelist.go index 587b8cc02de..697a46968ba 100644 --- a/vendor/go.etcd.io/bbolt/freelist.go +++ b/vendor/go.etcd.io/bbolt/freelist.go @@ -71,7 +71,7 @@ func (f *freelist) size() int { // The first element will be used to store the count. See freelist.write. n++ } - return pageHeaderSize + (int(unsafe.Sizeof(pgid(0))) * n) + return int(pageHeaderSize) + (int(unsafe.Sizeof(pgid(0))) * n) } // count returns count of pages on the freelist @@ -93,7 +93,7 @@ func (f *freelist) pending_count() int { return count } -// copyall copies into dst a list of all free ids and all pending ids in one sorted list. +// copyall copies a list of all free ids and all pending ids in one sorted list. // f.count returns the minimum length required for dst. func (f *freelist) copyall(dst []pgid) { m := make(pgids, 0, f.pending_count()) @@ -267,17 +267,23 @@ func (f *freelist) read(p *page) { } // If the page.count is at the max uint16 value (64k) then it's considered // an overflow and the size of the freelist is stored as the first element. - idx, count := 0, int(p.count) + var idx, count = 0, int(p.count) if count == 0xFFFF { idx = 1 - count = int(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[0]) + c := *(*pgid)(unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p))) + count = int(c) + if count < 0 { + panic(fmt.Sprintf("leading element count %d overflows int", c)) + } } // Copy the list of page ids from the freelist. if count == 0 { f.ids = nil } else { - ids := ((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[idx : idx+count] + var ids []pgid + data := unsafeIndex(unsafe.Pointer(p), unsafe.Sizeof(*p), unsafe.Sizeof(ids[0]), idx) + unsafeSlice(unsafe.Pointer(&ids), data, count) // copy the ids, so we don't modify on the freelist page directly idsCopy := make([]pgid, count) @@ -310,16 +316,22 @@ func (f *freelist) write(p *page) error { // The page.count can only hold up to 64k elements so if we overflow that // number then we handle it by putting the size in the first element. - lenids := f.count() - if lenids == 0 { - p.count = uint16(lenids) - } else if lenids < 0xFFFF { - p.count = uint16(lenids) - f.copyall(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[:]) + l := f.count() + if l == 0 { + p.count = uint16(l) + } else if l < 0xFFFF { + p.count = uint16(l) + var ids []pgid + data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p)) + unsafeSlice(unsafe.Pointer(&ids), data, l) + f.copyall(ids) } else { p.count = 0xFFFF - ((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[0] = pgid(lenids) - f.copyall(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[1:]) + var ids []pgid + data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p)) + unsafeSlice(unsafe.Pointer(&ids), data, l+1) + ids[0] = pgid(l) + f.copyall(ids[1:]) } return nil diff --git a/vendor/go.etcd.io/bbolt/freelist_hmap.go b/vendor/go.etcd.io/bbolt/freelist_hmap.go index 6a03a6c3c85..02ef2be0441 100644 --- a/vendor/go.etcd.io/bbolt/freelist_hmap.go +++ b/vendor/go.etcd.io/bbolt/freelist_hmap.go @@ -27,7 +27,7 @@ func (f *freelist) hashmapAllocate(txid txid, n int) pgid { f.allocs[pid] = txid for i := pgid(0); i < pgid(n); i++ { - delete(f.cache, pid+pgid(i)) + delete(f.cache, pid+i) } return pid } diff --git a/vendor/go.etcd.io/bbolt/go.mod b/vendor/go.etcd.io/bbolt/go.mod new file mode 100644 index 00000000000..c2366daef6b --- /dev/null +++ b/vendor/go.etcd.io/bbolt/go.mod @@ -0,0 +1,5 @@ +module go.etcd.io/bbolt + +go 1.12 + +require golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 diff --git a/vendor/go.etcd.io/bbolt/go.sum b/vendor/go.etcd.io/bbolt/go.sum new file mode 100644 index 00000000000..4ad15a488c7 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/go.sum @@ -0,0 +1,2 @@ +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/go.etcd.io/bbolt/node.go b/vendor/go.etcd.io/bbolt/node.go index 6c3fa553ea6..73988b5c4c0 100644 --- a/vendor/go.etcd.io/bbolt/node.go +++ b/vendor/go.etcd.io/bbolt/node.go @@ -41,19 +41,19 @@ func (n *node) size() int { sz, elsz := pageHeaderSize, n.pageElementSize() for i := 0; i < len(n.inodes); i++ { item := &n.inodes[i] - sz += elsz + len(item.key) + len(item.value) + sz += elsz + uintptr(len(item.key)) + uintptr(len(item.value)) } - return sz + return int(sz) } // sizeLessThan returns true if the node is less than a given size. // This is an optimization to avoid calculating a large node when we only need // to know if it fits inside a certain page size. -func (n *node) sizeLessThan(v int) bool { +func (n *node) sizeLessThan(v uintptr) bool { sz, elsz := pageHeaderSize, n.pageElementSize() for i := 0; i < len(n.inodes); i++ { item := &n.inodes[i] - sz += elsz + len(item.key) + len(item.value) + sz += elsz + uintptr(len(item.key)) + uintptr(len(item.value)) if sz >= v { return false } @@ -62,7 +62,7 @@ func (n *node) sizeLessThan(v int) bool { } // pageElementSize returns the size of each page element based on the type of node. -func (n *node) pageElementSize() int { +func (n *node) pageElementSize() uintptr { if n.isLeaf { return leafPageElementSize } @@ -207,10 +207,17 @@ func (n *node) write(p *page) { } // Loop over each item and write it to the page. - b := (*[maxAllocSize]byte)(unsafe.Pointer(&p.ptr))[n.pageElementSize()*len(n.inodes):] + // off tracks the offset into p of the start of the next data. + off := unsafe.Sizeof(*p) + n.pageElementSize()*uintptr(len(n.inodes)) for i, item := range n.inodes { _assert(len(item.key) > 0, "write: zero-length inode key") + // Create a slice to write into of needed size and advance + // byte pointer for next iteration. + sz := len(item.key) + len(item.value) + b := unsafeByteSlice(unsafe.Pointer(p), off, 0, sz) + off += uintptr(sz) + // Write the page element. if n.isLeaf { elem := p.leafPageElement(uint16(i)) @@ -226,20 +233,9 @@ func (n *node) write(p *page) { _assert(elem.pgid != p.id, "write: circular dependency occurred") } - // If the length of key+value is larger than the max allocation size - // then we need to reallocate the byte array pointer. - // - // See: https://github.com/boltdb/bolt/pull/335 - klen, vlen := len(item.key), len(item.value) - if len(b) < klen+vlen { - b = (*[maxAllocSize]byte)(unsafe.Pointer(&b[0]))[:] - } - // Write data for the element to the end of the page. - copy(b[0:], item.key) - b = b[klen:] - copy(b[0:], item.value) - b = b[vlen:] + l := copy(b, item.key) + copy(b[l:], item.value) } // DEBUG ONLY: n.dump() @@ -247,7 +243,7 @@ func (n *node) write(p *page) { // split breaks up a node into multiple smaller nodes, if appropriate. // This should only be called from the spill() function. -func (n *node) split(pageSize int) []*node { +func (n *node) split(pageSize uintptr) []*node { var nodes []*node node := n @@ -270,7 +266,7 @@ func (n *node) split(pageSize int) []*node { // splitTwo breaks up a node into two smaller nodes, if appropriate. // This should only be called from the split() function. -func (n *node) splitTwo(pageSize int) (*node, *node) { +func (n *node) splitTwo(pageSize uintptr) (*node, *node) { // Ignore the split if the page doesn't have at least enough nodes for // two pages or if the nodes can fit in a single page. if len(n.inodes) <= (minKeysPerPage*2) || n.sizeLessThan(pageSize) { @@ -312,18 +308,18 @@ func (n *node) splitTwo(pageSize int) (*node, *node) { // splitIndex finds the position where a page will fill a given threshold. // It returns the index as well as the size of the first page. // This is only be called from split(). -func (n *node) splitIndex(threshold int) (index, sz int) { +func (n *node) splitIndex(threshold int) (index, sz uintptr) { sz = pageHeaderSize // Loop until we only have the minimum number of keys required for the second page. for i := 0; i < len(n.inodes)-minKeysPerPage; i++ { - index = i + index = uintptr(i) inode := n.inodes[i] - elsize := n.pageElementSize() + len(inode.key) + len(inode.value) + elsize := n.pageElementSize() + uintptr(len(inode.key)) + uintptr(len(inode.value)) // If we have at least the minimum number of keys and adding another // node would put us over the threshold then exit and return. - if i >= minKeysPerPage && sz+elsize > threshold { + if index >= minKeysPerPage && sz+elsize > uintptr(threshold) { break } @@ -356,7 +352,7 @@ func (n *node) spill() error { n.children = nil // Split nodes into appropriate sizes. The first node will always be n. - var nodes = n.split(tx.db.pageSize) + var nodes = n.split(uintptr(tx.db.pageSize)) for _, node := range nodes { // Add node's page to the freelist if it's not new. if node.pgid > 0 { @@ -587,9 +583,11 @@ func (n *node) dump() { type nodes []*node -func (s nodes) Len() int { return len(s) } -func (s nodes) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s nodes) Less(i, j int) bool { return bytes.Compare(s[i].inodes[0].key, s[j].inodes[0].key) == -1 } +func (s nodes) Len() int { return len(s) } +func (s nodes) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s nodes) Less(i, j int) bool { + return bytes.Compare(s[i].inodes[0].key, s[j].inodes[0].key) == -1 +} // inode represents an internal node inside of a node. // It can be used to point to elements in a page or point diff --git a/vendor/go.etcd.io/bbolt/page.go b/vendor/go.etcd.io/bbolt/page.go index bca9615f0fd..c9a158fb066 100644 --- a/vendor/go.etcd.io/bbolt/page.go +++ b/vendor/go.etcd.io/bbolt/page.go @@ -7,12 +7,12 @@ import ( "unsafe" ) -const pageHeaderSize = int(unsafe.Offsetof(((*page)(nil)).ptr)) +const pageHeaderSize = unsafe.Sizeof(page{}) const minKeysPerPage = 2 -const branchPageElementSize = int(unsafe.Sizeof(branchPageElement{})) -const leafPageElementSize = int(unsafe.Sizeof(leafPageElement{})) +const branchPageElementSize = unsafe.Sizeof(branchPageElement{}) +const leafPageElementSize = unsafe.Sizeof(leafPageElement{}) const ( branchPageFlag = 0x01 @@ -32,7 +32,6 @@ type page struct { flags uint16 count uint16 overflow uint32 - ptr uintptr } // typ returns a human readable page type string used for debugging. @@ -51,13 +50,13 @@ func (p *page) typ() string { // meta returns a pointer to the metadata section of the page. func (p *page) meta() *meta { - return (*meta)(unsafe.Pointer(&p.ptr)) + return (*meta)(unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p))) } // leafPageElement retrieves the leaf node by index func (p *page) leafPageElement(index uint16) *leafPageElement { - n := &((*[0x7FFFFFF]leafPageElement)(unsafe.Pointer(&p.ptr)))[index] - return n + return (*leafPageElement)(unsafeIndex(unsafe.Pointer(p), unsafe.Sizeof(*p), + leafPageElementSize, int(index))) } // leafPageElements retrieves a list of leaf nodes. @@ -65,12 +64,16 @@ func (p *page) leafPageElements() []leafPageElement { if p.count == 0 { return nil } - return ((*[0x7FFFFFF]leafPageElement)(unsafe.Pointer(&p.ptr)))[:] + var elems []leafPageElement + data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p)) + unsafeSlice(unsafe.Pointer(&elems), data, int(p.count)) + return elems } // branchPageElement retrieves the branch node by index func (p *page) branchPageElement(index uint16) *branchPageElement { - return &((*[0x7FFFFFF]branchPageElement)(unsafe.Pointer(&p.ptr)))[index] + return (*branchPageElement)(unsafeIndex(unsafe.Pointer(p), unsafe.Sizeof(*p), + unsafe.Sizeof(branchPageElement{}), int(index))) } // branchPageElements retrieves a list of branch nodes. @@ -78,12 +81,15 @@ func (p *page) branchPageElements() []branchPageElement { if p.count == 0 { return nil } - return ((*[0x7FFFFFF]branchPageElement)(unsafe.Pointer(&p.ptr)))[:] + var elems []branchPageElement + data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p)) + unsafeSlice(unsafe.Pointer(&elems), data, int(p.count)) + return elems } // dump writes n bytes of the page to STDERR as hex output. func (p *page) hexdump(n int) { - buf := (*[maxAllocSize]byte)(unsafe.Pointer(p))[:n] + buf := unsafeByteSlice(unsafe.Pointer(p), 0, 0, n) fmt.Fprintf(os.Stderr, "%x\n", buf) } @@ -102,8 +108,7 @@ type branchPageElement struct { // key returns a byte slice of the node key. func (n *branchPageElement) key() []byte { - buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) - return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos]))[:n.ksize] + return unsafeByteSlice(unsafe.Pointer(n), 0, int(n.pos), int(n.pos)+int(n.ksize)) } // leafPageElement represents a node on a leaf page. @@ -116,14 +121,16 @@ type leafPageElement struct { // key returns a byte slice of the node key. func (n *leafPageElement) key() []byte { - buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) - return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos]))[:n.ksize:n.ksize] + i := int(n.pos) + j := i + int(n.ksize) + return unsafeByteSlice(unsafe.Pointer(n), 0, i, j) } // value returns a byte slice of the node value. func (n *leafPageElement) value() []byte { - buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) - return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos+n.ksize]))[:n.vsize:n.vsize] + i := int(n.pos) + int(n.ksize) + j := i + int(n.vsize) + return unsafeByteSlice(unsafe.Pointer(n), 0, i, j) } // PageInfo represents human readable information about a page. diff --git a/vendor/go.etcd.io/bbolt/tx.go b/vendor/go.etcd.io/bbolt/tx.go index 2df7688c2f6..4b1a64a8b8a 100644 --- a/vendor/go.etcd.io/bbolt/tx.go +++ b/vendor/go.etcd.io/bbolt/tx.go @@ -523,20 +523,18 @@ func (tx *Tx) write() error { // Write pages to disk in order. for _, p := range pages { - size := (int(p.overflow) + 1) * tx.db.pageSize + rem := (uint64(p.overflow) + 1) * uint64(tx.db.pageSize) offset := int64(p.id) * int64(tx.db.pageSize) + var written uintptr // Write out page in "max allocation" sized chunks. - ptr := (*[maxAllocSize]byte)(unsafe.Pointer(p)) for { - // Limit our write to our max allocation size. - sz := size + sz := rem if sz > maxAllocSize-1 { sz = maxAllocSize - 1 } + buf := unsafeByteSlice(unsafe.Pointer(p), written, 0, int(sz)) - // Write chunk to disk. - buf := ptr[:sz] if _, err := tx.db.ops.writeAt(buf, offset); err != nil { return err } @@ -545,14 +543,14 @@ func (tx *Tx) write() error { tx.stats.Write++ // Exit inner for loop if we've written all the chunks. - size -= sz - if size == 0 { + rem -= sz + if rem == 0 { break } // Otherwise move offset forward and move pointer to next chunk. offset += int64(sz) - ptr = (*[maxAllocSize]byte)(unsafe.Pointer(&ptr[sz])) + written += uintptr(sz) } } @@ -571,7 +569,7 @@ func (tx *Tx) write() error { continue } - buf := (*[maxAllocSize]byte)(unsafe.Pointer(p))[:tx.db.pageSize] + buf := unsafeByteSlice(unsafe.Pointer(p), 0, 0, tx.db.pageSize) // See https://go.googlesource.com/go/+/f03c9202c43e0abb130669852082117ca50aa9b1 for i := range buf { diff --git a/vendor/go.etcd.io/bbolt/unsafe.go b/vendor/go.etcd.io/bbolt/unsafe.go new file mode 100644 index 00000000000..c0e50375007 --- /dev/null +++ b/vendor/go.etcd.io/bbolt/unsafe.go @@ -0,0 +1,39 @@ +package bbolt + +import ( + "reflect" + "unsafe" +) + +func unsafeAdd(base unsafe.Pointer, offset uintptr) unsafe.Pointer { + return unsafe.Pointer(uintptr(base) + offset) +} + +func unsafeIndex(base unsafe.Pointer, offset uintptr, elemsz uintptr, n int) unsafe.Pointer { + return unsafe.Pointer(uintptr(base) + offset + uintptr(n)*elemsz) +} + +func unsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte { + // See: https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices + // + // This memory is not allocated from C, but it is unmanaged by Go's + // garbage collector and should behave similarly, and the compiler + // should produce similar code. Note that this conversion allows a + // subslice to begin after the base address, with an optional offset, + // while the URL above does not cover this case and only slices from + // index 0. However, the wiki never says that the address must be to + // the beginning of a C allocation (or even that malloc was used at + // all), so this is believed to be correct. + return (*[maxAllocSize]byte)(unsafeAdd(base, offset))[i:j:j] +} + +// unsafeSlice modifies the data, len, and cap of a slice variable pointed to by +// the slice parameter. This helper should be used over other direct +// manipulation of reflect.SliceHeader to prevent misuse, namely, converting +// from reflect.SliceHeader to a Go slice type. +func unsafeSlice(slice, data unsafe.Pointer, len int) { + s := (*reflect.SliceHeader)(slice) + s.Data = uintptr(data) + s.Cap = len + s.Len = len +} diff --git a/vendor/go.etcd.io/etcd/auth/simple_token.go b/vendor/go.etcd.io/etcd/auth/simple_token.go index 934978c9857..a9dc5b715f6 100644 --- a/vendor/go.etcd.io/etcd/auth/simple_token.go +++ b/vendor/go.etcd.io/etcd/auth/simple_token.go @@ -37,7 +37,7 @@ const ( // var for testing purposes var ( - simpleTokenTTL = 5 * time.Minute + simpleTokenTTLDefault = 300 * time.Second simpleTokenTTLResolution = 1 * time.Second ) @@ -47,6 +47,7 @@ type simpleTokenTTLKeeper struct { stopc chan struct{} deleteTokenFunc func(string) mu *sync.Mutex + simpleTokenTTL time.Duration } func (tm *simpleTokenTTLKeeper) stop() { @@ -58,12 +59,12 @@ func (tm *simpleTokenTTLKeeper) stop() { } func (tm *simpleTokenTTLKeeper) addSimpleToken(token string) { - tm.tokens[token] = time.Now().Add(simpleTokenTTL) + tm.tokens[token] = time.Now().Add(tm.simpleTokenTTL) } func (tm *simpleTokenTTLKeeper) resetSimpleToken(token string) { if _, ok := tm.tokens[token]; ok { - tm.tokens[token] = time.Now().Add(simpleTokenTTL) + tm.tokens[token] = time.Now().Add(tm.simpleTokenTTL) } } @@ -101,6 +102,7 @@ type tokenSimple struct { simpleTokenKeeper *simpleTokenTTLKeeper simpleTokensMu sync.Mutex simpleTokens map[string]string // token -> username + simpleTokenTTL time.Duration } func (t *tokenSimple) genTokenPrefix() (string, error) { @@ -157,6 +159,10 @@ func (t *tokenSimple) invalidateUser(username string) { } func (t *tokenSimple) enable() { + if t.simpleTokenTTL <= 0 { + t.simpleTokenTTL = simpleTokenTTLDefault + } + delf := func(tk string) { if username, ok := t.simpleTokens[tk]; ok { if t.lg != nil { @@ -177,6 +183,7 @@ func (t *tokenSimple) enable() { stopc: make(chan struct{}), deleteTokenFunc: delf, mu: &t.simpleTokensMu, + simpleTokenTTL: t.simpleTokenTTL, } go t.simpleTokenKeeper.run() } @@ -234,10 +241,14 @@ func (t *tokenSimple) isValidSimpleToken(ctx context.Context, token string) bool return false } -func newTokenProviderSimple(lg *zap.Logger, indexWaiter func(uint64) <-chan struct{}) *tokenSimple { +func newTokenProviderSimple(lg *zap.Logger, indexWaiter func(uint64) <-chan struct{}, TokenTTL time.Duration) *tokenSimple { + if lg == nil { + lg = zap.NewNop() + } return &tokenSimple{ - lg: lg, - simpleTokens: make(map[string]string), - indexWaiter: indexWaiter, + lg: lg, + simpleTokens: make(map[string]string), + indexWaiter: indexWaiter, + simpleTokenTTL: TokenTTL, } } diff --git a/vendor/go.etcd.io/etcd/auth/store.go b/vendor/go.etcd.io/etcd/auth/store.go index bf3e474bf80..ba1d95ff2ca 100644 --- a/vendor/go.etcd.io/etcd/auth/store.go +++ b/vendor/go.etcd.io/etcd/auth/store.go @@ -23,6 +23,7 @@ import ( "strings" "sync" "sync/atomic" + "time" "go.etcd.io/etcd/auth/authpb" "go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes" @@ -59,6 +60,7 @@ var ( ErrRoleNotFound = errors.New("auth: role not found") ErrRoleEmpty = errors.New("auth: role name is empty") ErrAuthFailed = errors.New("auth: authentication failed, invalid user ID or password") + ErrNoPasswordUser = errors.New("auth: authentication failed, password was given for no password user") ErrPermissionDenied = errors.New("auth: permission denied") ErrRoleNotGranted = errors.New("auth: role is not granted to the user") ErrPermissionNotGranted = errors.New("auth: permission is not granted to the role") @@ -360,7 +362,7 @@ func (as *authStore) CheckPassword(username, password string) (uint64, error) { } if user.Options != nil && user.Options.NoPassword { - return 0, ErrAuthFailed + return 0, ErrNoPasswordUser } return getRevision(tx), nil @@ -994,7 +996,7 @@ func (as *authStore) IsAdminPermitted(authInfo *AuthInfo) error { if !as.IsAuthEnabled() { return nil } - if authInfo == nil { + if authInfo == nil || authInfo.Username == "" { return ErrUserEmpty } @@ -1351,7 +1353,8 @@ func decomposeOpts(lg *zap.Logger, optstr string) (string, map[string]string, er func NewTokenProvider( lg *zap.Logger, tokenOpts string, - indexWaiter func(uint64) <-chan struct{}) (TokenProvider, error) { + indexWaiter func(uint64) <-chan struct{}, + TokenTTL time.Duration) (TokenProvider, error) { tokenType, typeSpecificOpts, err := decomposeOpts(lg, tokenOpts) if err != nil { return nil, ErrInvalidAuthOpts @@ -1364,7 +1367,7 @@ func NewTokenProvider( } else { plog.Warningf("simple token is not cryptographically signed") } - return newTokenProviderSimple(lg, indexWaiter), nil + return newTokenProviderSimple(lg, indexWaiter, TokenTTL), nil case tokenTypeJWT: return newTokenProviderJWT(lg, typeSpecificOpts) diff --git a/vendor/go.etcd.io/etcd/clientv3/watch.go b/vendor/go.etcd.io/etcd/clientv3/watch.go index 87d222d1d68..66e16ad63fe 100644 --- a/vendor/go.etcd.io/etcd/clientv3/watch.go +++ b/vendor/go.etcd.io/etcd/clientv3/watch.go @@ -25,6 +25,7 @@ import ( pb "go.etcd.io/etcd/etcdserver/etcdserverpb" mvccpb "go.etcd.io/etcd/mvcc/mvccpb" + "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -140,6 +141,7 @@ type watcher struct { // streams holds all the active grpc streams keyed by ctx value. streams map[string]*watchGrpcStream + lg *zap.Logger } // watchGrpcStream tracks all watch resources attached to a single grpc stream. @@ -176,6 +178,8 @@ type watchGrpcStream struct { resumec chan struct{} // closeErr is the error that closed the watch stream closeErr error + + lg *zap.Logger } // watchStreamRequest is a union of the supported watch request operation types @@ -242,6 +246,7 @@ func NewWatchFromWatchClient(wc pb.WatchClient, c *Client) Watcher { } if c != nil { w.callOpts = c.callOpts + w.lg = c.lg } return w } @@ -273,6 +278,7 @@ func (w *watcher) newWatcherGrpcStream(inctx context.Context) *watchGrpcStream { errc: make(chan error, 1), closingc: make(chan *watcherStream), resumec: make(chan struct{}), + lg: w.lg, } go wgs.run() return wgs @@ -544,10 +550,18 @@ func (w *watchGrpcStream) run() { w.resuming = append(w.resuming, ws) if len(w.resuming) == 1 { // head of resume queue, can register a new watcher - wc.Send(ws.initReq.toPB()) + if err := wc.Send(ws.initReq.toPB()); err != nil { + if w.lg != nil { + w.lg.Debug("error when sending request", zap.Error(err)) + } + } } case *progressRequest: - wc.Send(wreq.toPB()) + if err := wc.Send(wreq.toPB()); err != nil { + if w.lg != nil { + w.lg.Debug("error when sending request", zap.Error(err)) + } + } } // new events from the watch client @@ -571,7 +585,11 @@ func (w *watchGrpcStream) run() { } if ws := w.nextResume(); ws != nil { - wc.Send(ws.initReq.toPB()) + if err := wc.Send(ws.initReq.toPB()); err != nil { + if w.lg != nil { + w.lg.Debug("error when sending request", zap.Error(err)) + } + } } // reset for next iteration @@ -616,7 +634,14 @@ func (w *watchGrpcStream) run() { }, } req := &pb.WatchRequest{RequestUnion: cr} - wc.Send(req) + if w.lg != nil { + w.lg.Debug("sending watch cancel request for failed dispatch", zap.Int64("watch-id", pbresp.WatchId)) + } + if err := wc.Send(req); err != nil { + if w.lg != nil { + w.lg.Debug("failed to send watch cancel request", zap.Int64("watch-id", pbresp.WatchId), zap.Error(err)) + } + } } // watch client failed on Recv; spawn another if possible @@ -629,7 +654,11 @@ func (w *watchGrpcStream) run() { return } if ws := w.nextResume(); ws != nil { - wc.Send(ws.initReq.toPB()) + if err := wc.Send(ws.initReq.toPB()); err != nil { + if w.lg != nil { + w.lg.Debug("error when sending request", zap.Error(err)) + } + } } cancelSet = make(map[int64]struct{}) @@ -637,6 +666,25 @@ func (w *watchGrpcStream) run() { return case ws := <-w.closingc: + if ws.id != -1 { + // client is closing an established watch; close it on the server proactively instead of waiting + // to close when the next message arrives + cancelSet[ws.id] = struct{}{} + cr := &pb.WatchRequest_CancelRequest{ + CancelRequest: &pb.WatchCancelRequest{ + WatchId: ws.id, + }, + } + req := &pb.WatchRequest{RequestUnion: cr} + if w.lg != nil { + w.lg.Debug("sending watch cancel request for closed watcher", zap.Int64("watch-id", ws.id)) + } + if err := wc.Send(req); err != nil { + if w.lg != nil { + w.lg.Debug("failed to send watch cancel request", zap.Int64("watch-id", ws.id), zap.Error(err)) + } + } + } w.closeSubstream(ws) delete(closing, ws) // no more watchers on this stream, shutdown diff --git a/vendor/go.etcd.io/etcd/embed/config.go b/vendor/go.etcd.io/etcd/embed/config.go index 2f64d927f2a..9bbfbaebb87 100644 --- a/vendor/go.etcd.io/etcd/embed/config.go +++ b/vendor/go.etcd.io/etcd/embed/config.go @@ -273,14 +273,18 @@ type Config struct { AuthToken string `json:"auth-token"` BcryptCost uint `json:"bcrypt-cost"` + //The AuthTokenTTL in seconds of the simple token + AuthTokenTTL uint `json:"auth-token-ttl"` + ExperimentalInitialCorruptCheck bool `json:"experimental-initial-corrupt-check"` ExperimentalCorruptCheckTime time.Duration `json:"experimental-corrupt-check-time"` ExperimentalEnableV2V3 string `json:"experimental-enable-v2v3"` // ExperimentalBackendFreelistType specifies the type of freelist that boltdb backend uses (array and map are supported types). ExperimentalBackendFreelistType string `json:"experimental-backend-bbolt-freelist-type"` // ExperimentalEnableLeaseCheckpoint enables primary lessor to persist lease remainingTTL to prevent indefinite auto-renewal of long lived leases. - ExperimentalEnableLeaseCheckpoint bool `json:"experimental-enable-lease-checkpoint"` - ExperimentalCompactionBatchLimit int `json:"experimental-compaction-batch-limit"` + ExperimentalEnableLeaseCheckpoint bool `json:"experimental-enable-lease-checkpoint"` + ExperimentalCompactionBatchLimit int `json:"experimental-compaction-batch-limit"` + ExperimentalWatchProgressNotifyInterval time.Duration `json:"experimental-watch-progress-notify-interval"` // ForceNewCluster starts a new cluster even if previously started; unsafe. ForceNewCluster bool `json:"force-new-cluster"` @@ -335,6 +339,10 @@ type Config struct { // Only valid if "logger" option is "capnslog". // WARN: DO NOT USE THIS! LogPkgLevels string `json:"log-package-levels"` + + // UnsafeNoFsync disables all uses of fsync. + // Setting this is unsafe and will cause data loss. + UnsafeNoFsync bool `json:"unsafe-no-fsync"` } // configYAML holds the config suitable for yaml parsing @@ -406,8 +414,9 @@ func NewConfig() *Config { CORS: map[string]struct{}{"*": {}}, HostWhitelist: map[string]struct{}{"*": {}}, - AuthToken: "simple", - BcryptCost: uint(bcrypt.DefaultCost), + AuthToken: "simple", + BcryptCost: uint(bcrypt.DefaultCost), + AuthTokenTTL: 300, PreVote: false, // TODO: enable by default in v3.5 diff --git a/vendor/go.etcd.io/etcd/embed/etcd.go b/vendor/go.etcd.io/etcd/embed/etcd.go index ac7dbc987fb..309ef78aa96 100644 --- a/vendor/go.etcd.io/etcd/embed/etcd.go +++ b/vendor/go.etcd.io/etcd/embed/etcd.go @@ -162,50 +162,53 @@ func StartEtcd(inCfg *Config) (e *Etcd, err error) { backendFreelistType := parseBackendFreelistType(cfg.ExperimentalBackendFreelistType) srvcfg := etcdserver.ServerConfig{ - Name: cfg.Name, - ClientURLs: cfg.ACUrls, - PeerURLs: cfg.APUrls, - DataDir: cfg.Dir, - DedicatedWALDir: cfg.WalDir, - SnapshotCount: cfg.SnapshotCount, - SnapshotCatchUpEntries: cfg.SnapshotCatchUpEntries, - MaxSnapFiles: cfg.MaxSnapFiles, - MaxWALFiles: cfg.MaxWalFiles, - InitialPeerURLsMap: urlsmap, - InitialClusterToken: token, - DiscoveryURL: cfg.Durl, - DiscoveryProxy: cfg.Dproxy, - NewCluster: cfg.IsNewCluster(), - PeerTLSInfo: cfg.PeerTLSInfo, - TickMs: cfg.TickMs, - ElectionTicks: cfg.ElectionTicks(), - InitialElectionTickAdvance: cfg.InitialElectionTickAdvance, - AutoCompactionRetention: autoCompactionRetention, - AutoCompactionMode: cfg.AutoCompactionMode, - QuotaBackendBytes: cfg.QuotaBackendBytes, - BackendBatchLimit: cfg.BackendBatchLimit, - BackendFreelistType: backendFreelistType, - BackendBatchInterval: cfg.BackendBatchInterval, - MaxTxnOps: cfg.MaxTxnOps, - MaxRequestBytes: cfg.MaxRequestBytes, - StrictReconfigCheck: cfg.StrictReconfigCheck, - ClientCertAuthEnabled: cfg.ClientTLSInfo.ClientCertAuth, - AuthToken: cfg.AuthToken, - BcryptCost: cfg.BcryptCost, - CORS: cfg.CORS, - HostWhitelist: cfg.HostWhitelist, - InitialCorruptCheck: cfg.ExperimentalInitialCorruptCheck, - CorruptCheckTime: cfg.ExperimentalCorruptCheckTime, - PreVote: cfg.PreVote, - Logger: cfg.logger, - LoggerConfig: cfg.loggerConfig, - LoggerCore: cfg.loggerCore, - LoggerWriteSyncer: cfg.loggerWriteSyncer, - Debug: cfg.Debug, - ForceNewCluster: cfg.ForceNewCluster, - EnableGRPCGateway: cfg.EnableGRPCGateway, - EnableLeaseCheckpoint: cfg.ExperimentalEnableLeaseCheckpoint, - CompactionBatchLimit: cfg.ExperimentalCompactionBatchLimit, + Name: cfg.Name, + ClientURLs: cfg.ACUrls, + PeerURLs: cfg.APUrls, + DataDir: cfg.Dir, + DedicatedWALDir: cfg.WalDir, + SnapshotCount: cfg.SnapshotCount, + SnapshotCatchUpEntries: cfg.SnapshotCatchUpEntries, + MaxSnapFiles: cfg.MaxSnapFiles, + MaxWALFiles: cfg.MaxWalFiles, + InitialPeerURLsMap: urlsmap, + InitialClusterToken: token, + DiscoveryURL: cfg.Durl, + DiscoveryProxy: cfg.Dproxy, + NewCluster: cfg.IsNewCluster(), + PeerTLSInfo: cfg.PeerTLSInfo, + TickMs: cfg.TickMs, + ElectionTicks: cfg.ElectionTicks(), + InitialElectionTickAdvance: cfg.InitialElectionTickAdvance, + AutoCompactionRetention: autoCompactionRetention, + AutoCompactionMode: cfg.AutoCompactionMode, + QuotaBackendBytes: cfg.QuotaBackendBytes, + BackendBatchLimit: cfg.BackendBatchLimit, + BackendFreelistType: backendFreelistType, + BackendBatchInterval: cfg.BackendBatchInterval, + MaxTxnOps: cfg.MaxTxnOps, + MaxRequestBytes: cfg.MaxRequestBytes, + StrictReconfigCheck: cfg.StrictReconfigCheck, + ClientCertAuthEnabled: cfg.ClientTLSInfo.ClientCertAuth, + AuthToken: cfg.AuthToken, + BcryptCost: cfg.BcryptCost, + TokenTTL: cfg.AuthTokenTTL, + CORS: cfg.CORS, + HostWhitelist: cfg.HostWhitelist, + InitialCorruptCheck: cfg.ExperimentalInitialCorruptCheck, + CorruptCheckTime: cfg.ExperimentalCorruptCheckTime, + PreVote: cfg.PreVote, + Logger: cfg.logger, + LoggerConfig: cfg.loggerConfig, + LoggerCore: cfg.loggerCore, + LoggerWriteSyncer: cfg.loggerWriteSyncer, + Debug: cfg.Debug, + ForceNewCluster: cfg.ForceNewCluster, + EnableGRPCGateway: cfg.EnableGRPCGateway, + UnsafeNoFsync: cfg.UnsafeNoFsync, + EnableLeaseCheckpoint: cfg.ExperimentalEnableLeaseCheckpoint, + CompactionBatchLimit: cfg.ExperimentalCompactionBatchLimit, + WatchProgressNotifyInterval: cfg.ExperimentalWatchProgressNotifyInterval, } print(e.cfg.logger, *cfg, srvcfg, memberInitialized) if e.Server, err = etcdserver.NewServer(srvcfg); err != nil { @@ -811,7 +814,7 @@ func (e *Etcd) GetLogger() *zap.Logger { func parseCompactionRetention(mode, retention string) (ret time.Duration, err error) { h, err := strconv.Atoi(retention) - if err == nil { + if err == nil && h >= 0 { switch mode { case CompactorModeRevision: ret = time.Duration(int64(h)) diff --git a/vendor/go.etcd.io/etcd/etcdserver/api/v2discovery/discovery.go b/vendor/go.etcd.io/etcd/etcdserver/api/v2discovery/discovery.go index cf770b37859..16ccfde8e27 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/api/v2discovery/discovery.go +++ b/vendor/go.etcd.io/etcd/etcdserver/api/v2discovery/discovery.go @@ -218,7 +218,7 @@ func (d *discovery) createSelf(contents string) error { return err } -func (d *discovery) checkCluster() ([]*client.Node, int, uint64, error) { +func (d *discovery) checkCluster() ([]*client.Node, uint64, uint64, error) { configKey := path.Join("/", d.cluster, "_config") ctx, cancel := context.WithTimeout(context.Background(), client.DefaultRequestTimeout) // find cluster size @@ -247,7 +247,7 @@ func (d *discovery) checkCluster() ([]*client.Node, int, uint64, error) { } return nil, 0, 0, err } - size, err := strconv.Atoi(resp.Node.Value) + size, err := strconv.ParseUint(resp.Node.Value, 10, 0) if err != nil { return nil, 0, 0, ErrBadSizeKey } @@ -288,7 +288,7 @@ func (d *discovery) checkCluster() ([]*client.Node, int, uint64, error) { if path.Base(nodes[i].Key) == path.Base(d.selfKey()) { break } - if i >= size-1 { + if uint64(i) >= size-1 { return nodes[:size], size, resp.Index, ErrFullCluster } } @@ -316,7 +316,7 @@ func (d *discovery) logAndBackoffForRetry(step string) { d.clock.Sleep(retryTimeInSecond) } -func (d *discovery) checkClusterRetry() ([]*client.Node, int, uint64, error) { +func (d *discovery) checkClusterRetry() ([]*client.Node, uint64, uint64, error) { if d.retries < nRetries { d.logAndBackoffForRetry("cluster status check") return d.checkCluster() @@ -336,8 +336,8 @@ func (d *discovery) waitNodesRetry() ([]*client.Node, error) { return nil, ErrTooManyRetries } -func (d *discovery) waitNodes(nodes []*client.Node, size int, index uint64) ([]*client.Node, error) { - if len(nodes) > size { +func (d *discovery) waitNodes(nodes []*client.Node, size uint64, index uint64) ([]*client.Node, error) { + if uint64(len(nodes)) > size { nodes = nodes[:size] } // watch from the next index @@ -369,16 +369,16 @@ func (d *discovery) waitNodes(nodes []*client.Node, size int, index uint64) ([]* } // wait for others - for len(all) < size { + for uint64(len(all)) < size { if d.lg != nil { d.lg.Info( "found peers from discovery server; waiting for more", zap.String("discovery-url", d.url.String()), zap.Int("found-peers", len(all)), - zap.Int("needed-peers", size-len(all)), + zap.Int("needed-peers", int(size-uint64(len(all)))), ) } else { - plog.Noticef("found %d peer(s), waiting for %d more", len(all), size-len(all)) + plog.Noticef("found %d peer(s), waiting for %d more", len(all), size-uint64(len(all))) } resp, err := w.Next(context.Background()) if err != nil { @@ -415,7 +415,7 @@ func (d *discovery) selfKey() string { return path.Join("/", d.cluster, d.id.String()) } -func nodesToCluster(ns []*client.Node, size int) (string, error) { +func nodesToCluster(ns []*client.Node, size uint64) (string, error) { s := make([]string, len(ns)) for i, n := range ns { s[i] = n.Value @@ -425,7 +425,7 @@ func nodesToCluster(ns []*client.Node, size int) (string, error) { if err != nil { return us, ErrInvalidURL } - if m.Len() != size { + if uint64(m.Len()) != size { return us, ErrDuplicateName } return us, nil diff --git a/vendor/go.etcd.io/etcd/etcdserver/api/v3rpc/watch.go b/vendor/go.etcd.io/etcd/etcdserver/api/v3rpc/watch.go index dcc4cc63700..07736c1bad5 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/api/v3rpc/watch.go +++ b/vendor/go.etcd.io/etcd/etcdserver/api/v3rpc/watch.go @@ -31,6 +31,8 @@ import ( "go.uber.org/zap" ) +const minWatchProgressInterval = 100 * time.Millisecond + type watchServer struct { lg *zap.Logger @@ -46,7 +48,7 @@ type watchServer struct { // NewWatchServer returns a new watch server. func NewWatchServer(s *etcdserver.EtcdServer) pb.WatchServer { - return &watchServer{ + srv := &watchServer{ lg: s.Cfg.Logger, clusterID: int64(s.Cluster().ID()), @@ -58,6 +60,21 @@ func NewWatchServer(s *etcdserver.EtcdServer) pb.WatchServer { watchable: s.Watchable(), ag: s, } + if s.Cfg.WatchProgressNotifyInterval > 0 { + if s.Cfg.WatchProgressNotifyInterval < minWatchProgressInterval { + if srv.lg != nil { + srv.lg.Warn( + "adjusting watch progress notify interval to minimum period", + zap.Duration("min-watch-progress-notify-interval", minWatchProgressInterval), + ) + } else { + plog.Warningf("adjusting watch progress notify interval to minimum period %v", minWatchProgressInterval) + } + s.Cfg.WatchProgressNotifyInterval = minWatchProgressInterval + } + SetProgressReportInterval(s.Cfg.WatchProgressNotifyInterval) + } + return srv } var ( diff --git a/vendor/go.etcd.io/etcd/etcdserver/apply_v2.go b/vendor/go.etcd.io/etcd/etcdserver/apply_v2.go index c77df197061..7321379da7c 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/apply_v2.go +++ b/vendor/go.etcd.io/etcd/etcdserver/apply_v2.go @@ -16,6 +16,7 @@ package etcdserver import ( "encoding/json" + "fmt" "path" "time" @@ -114,7 +115,11 @@ func (a *applierV2store) Sync(r *RequestV2) Response { // applyV2Request interprets r as a call to v2store.X // and returns a Response interpreted from v2store.Event func (s *EtcdServer) applyV2Request(r *RequestV2) Response { - defer warnOfExpensiveRequest(s.getLogger(), time.Now(), r, nil, nil) + stringer := panicAlternativeStringer{ + stringer: r, + alternative: func() string { return fmt.Sprintf("id:%d,method:%s,path:%s", r.ID, r.Method, r.Path) }, + } + defer warnOfExpensiveRequest(s.getLogger(), time.Now(), stringer, nil, nil) switch r.Method { case "POST": diff --git a/vendor/go.etcd.io/etcd/etcdserver/backend.go b/vendor/go.etcd.io/etcd/etcdserver/backend.go index 3eace1a33c6..aa443cac86f 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/backend.go +++ b/vendor/go.etcd.io/etcd/etcdserver/backend.go @@ -31,6 +31,7 @@ import ( func newBackend(cfg ServerConfig) backend.Backend { bcfg := backend.DefaultBackendConfig() bcfg.Path = cfg.backendPath() + bcfg.UnsafeNoFsync = cfg.UnsafeNoFsync if cfg.BackendBatchLimit != 0 { bcfg.BatchLimit = cfg.BackendBatchLimit if cfg.Logger != nil { diff --git a/vendor/go.etcd.io/etcd/etcdserver/config.go b/vendor/go.etcd.io/etcd/etcdserver/config.go index 88cd721c325..c585918cd14 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/config.go +++ b/vendor/go.etcd.io/etcd/etcdserver/config.go @@ -126,6 +126,7 @@ type ServerConfig struct { AuthToken string BcryptCost uint + TokenTTL uint // InitialCorruptCheck is true to check data corruption on boot // before serving any peer/client traffic. @@ -157,6 +158,12 @@ type ServerConfig struct { LeaseCheckpointInterval time.Duration EnableGRPCGateway bool + + WatchProgressNotifyInterval time.Duration + + // UnsafeNoFsync disables all uses of fsync. + // Setting this is unsafe and will cause data loss. + UnsafeNoFsync bool `json:"unsafe-no-fsync"` } // VerifyBootstrap sanity-checks the initial config for bootstrap case diff --git a/vendor/go.etcd.io/etcd/etcdserver/etcdserverpb/raft_internal_stringer.go b/vendor/go.etcd.io/etcd/etcdserver/etcdserverpb/raft_internal_stringer.go index 3d3536a326d..31e121ee0a6 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/etcdserverpb/raft_internal_stringer.go +++ b/vendor/go.etcd.io/etcd/etcdserver/etcdserverpb/raft_internal_stringer.go @@ -137,7 +137,7 @@ type loggableValueCompare struct { Result Compare_CompareResult `protobuf:"varint,1,opt,name=result,proto3,enum=etcdserverpb.Compare_CompareResult"` Target Compare_CompareTarget `protobuf:"varint,2,opt,name=target,proto3,enum=etcdserverpb.Compare_CompareTarget"` Key []byte `protobuf:"bytes,3,opt,name=key,proto3"` - ValueSize int `protobuf:"bytes,7,opt,name=value_size,proto3"` + ValueSize int64 `protobuf:"varint,7,opt,name=value_size,proto3"` RangeEnd []byte `protobuf:"bytes,64,opt,name=range_end,proto3"` } @@ -146,7 +146,7 @@ func newLoggableValueCompare(c *Compare, cv *Compare_Value) *loggableValueCompar c.Result, c.Target, c.Key, - len(cv.Value), + int64(len(cv.Value)), c.RangeEnd, } } @@ -160,7 +160,7 @@ func (*loggableValueCompare) ProtoMessage() {} // To preserve proto encoding of the key bytes, a faked out proto type is used here. type loggablePutRequest struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3"` - ValueSize int `protobuf:"varint,2,opt,name=value_size,proto3"` + ValueSize int64 `protobuf:"varint,2,opt,name=value_size,proto3"` Lease int64 `protobuf:"varint,3,opt,name=lease,proto3"` PrevKv bool `protobuf:"varint,4,opt,name=prev_kv,proto3"` IgnoreValue bool `protobuf:"varint,5,opt,name=ignore_value,proto3"` @@ -170,7 +170,7 @@ type loggablePutRequest struct { func NewLoggablePutRequest(request *PutRequest) *loggablePutRequest { return &loggablePutRequest{ request.Key, - len(request.Value), + int64(len(request.Value)), request.Lease, request.PrevKv, request.IgnoreValue, diff --git a/vendor/go.etcd.io/etcd/etcdserver/metrics.go b/vendor/go.etcd.io/etcd/etcdserver/metrics.go index e0c0cde8553..3e24e804380 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/metrics.go +++ b/vendor/go.etcd.io/etcd/etcdserver/metrics.go @@ -151,6 +151,19 @@ var ( Help: "Server or member ID in hexadecimal format. 1 for 'server_id' label with current ID.", }, []string{"server_id"}) + + fdUsed = prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "os", + Subsystem: "fd", + Name: "used", + Help: "The number of used file descriptors.", + }) + fdLimit = prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "os", + Subsystem: "fd", + Name: "limit", + Help: "The file descriptor limit.", + }) ) func init() { @@ -174,6 +187,8 @@ func init() { prometheus.MustRegister(isLearner) prometheus.MustRegister(learnerPromoteSucceed) prometheus.MustRegister(learnerPromoteFailed) + prometheus.MustRegister(fdUsed) + prometheus.MustRegister(fdLimit) currentVersion.With(prometheus.Labels{ "server_version": version.Version, @@ -184,7 +199,12 @@ func init() { } func monitorFileDescriptor(lg *zap.Logger, done <-chan struct{}) { - ticker := time.NewTicker(5 * time.Second) + // This ticker will check File Descriptor Requirements ,and count all fds in used. + // And recorded some logs when in used >= limit/5*4. Just recorded message. + // If fds was more than 10K,It's low performance due to FDUsage() works. + // So need to increase it. + // See https://github.com/etcd-io/etcd/issues/11969 for more detail. + ticker := time.NewTicker(10 * time.Minute) defer ticker.Stop() for { used, err := runtime.FDUsage() @@ -196,6 +216,7 @@ func monitorFileDescriptor(lg *zap.Logger, done <-chan struct{}) { } return } + fdUsed.Set(float64(used)) limit, err := runtime.FDLimit() if err != nil { if lg != nil { @@ -205,6 +226,7 @@ func monitorFileDescriptor(lg *zap.Logger, done <-chan struct{}) { } return } + fdLimit.Set(float64(limit)) if used >= limit/5*4 { if lg != nil { lg.Warn("80% of file descriptors are used", zap.Uint64("used", used), zap.Uint64("limit", limit)) diff --git a/vendor/go.etcd.io/etcd/etcdserver/raft.go b/vendor/go.etcd.io/etcd/etcdserver/raft.go index e7cf0729929..df08e3de3fe 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/raft.go +++ b/vendor/go.etcd.io/etcd/etcdserver/raft.go @@ -465,6 +465,9 @@ func startNode(cfg ServerConfig, cl *membership.RaftCluster, ids []types.ID) (id plog.Panicf("create wal error: %v", err) } } + if cfg.UnsafeNoFsync { + w.SetUnsafeNoFsync() + } peers := make([]raft.Peer, len(ids)) for i, id := range ids { var ctx []byte @@ -527,7 +530,7 @@ func restartNode(cfg ServerConfig, snapshot *raftpb.Snapshot) (types.ID, *member if snapshot != nil { walsnap.Index, walsnap.Term = snapshot.Metadata.Index, snapshot.Metadata.Term } - w, id, cid, st, ents := readWAL(cfg.Logger, cfg.WALDir(), walsnap) + w, id, cid, st, ents := readWAL(cfg.Logger, cfg.WALDir(), walsnap, cfg.UnsafeNoFsync) if cfg.Logger != nil { cfg.Logger.Info( @@ -582,7 +585,7 @@ func restartAsStandaloneNode(cfg ServerConfig, snapshot *raftpb.Snapshot) (types if snapshot != nil { walsnap.Index, walsnap.Term = snapshot.Metadata.Index, snapshot.Metadata.Term } - w, id, cid, st, ents := readWAL(cfg.Logger, cfg.WALDir(), walsnap) + w, id, cid, st, ents := readWAL(cfg.Logger, cfg.WALDir(), walsnap, cfg.UnsafeNoFsync) // discard the previously uncommitted entries for i, ent := range ents { diff --git a/vendor/go.etcd.io/etcd/etcdserver/server.go b/vendor/go.etcd.io/etcd/etcdserver/server.go index fb98c05b7c6..a341625dccb 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/server.go +++ b/vendor/go.etcd.io/etcd/etcdserver/server.go @@ -553,6 +553,7 @@ func NewServer(cfg ServerConfig) (srv *EtcdServer, err error) { func(index uint64) <-chan struct{} { return srv.applyWait.Wait(index) }, + time.Duration(cfg.TokenTTL)*time.Second, ) if err != nil { if cfg.Logger != nil { diff --git a/vendor/go.etcd.io/etcd/etcdserver/storage.go b/vendor/go.etcd.io/etcd/etcdserver/storage.go index 9a000b8da66..d87e51af0cb 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/storage.go +++ b/vendor/go.etcd.io/etcd/etcdserver/storage.go @@ -82,7 +82,7 @@ func (st *storage) Release(snap raftpb.Snapshot) error { // readWAL reads the WAL at the given snap and returns the wal, its latest HardState and cluster ID, and all entries that appear // after the position of the given snap in the WAL. // The snap must have been previously saved to the WAL, or this call will panic. -func readWAL(lg *zap.Logger, waldir string, snap walpb.Snapshot) (w *wal.WAL, id, cid types.ID, st raftpb.HardState, ents []raftpb.Entry) { +func readWAL(lg *zap.Logger, waldir string, snap walpb.Snapshot, unsafeNoFsync bool) (w *wal.WAL, id, cid types.ID, st raftpb.HardState, ents []raftpb.Entry) { var ( err error wmetadata []byte @@ -97,6 +97,9 @@ func readWAL(lg *zap.Logger, waldir string, snap walpb.Snapshot) (w *wal.WAL, id plog.Fatalf("open wal error: %v", err) } } + if unsafeNoFsync { + w.SetUnsafeNoFsync() + } if wmetadata, st, ents, err = w.ReadAll(); err != nil { w.Close() // we can only repair ErrUnexpectedEOF and we never repair twice. diff --git a/vendor/go.etcd.io/etcd/etcdserver/util.go b/vendor/go.etcd.io/etcd/etcdserver/util.go index ece1c2ce086..3050ab04a86 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/util.go +++ b/vendor/go.etcd.io/etcd/etcdserver/util.go @@ -185,3 +185,21 @@ func warnOfExpensiveGenericRequest(lg *zap.Logger, now time.Time, reqStringer fm func isNil(msg proto.Message) bool { return msg == nil || reflect.ValueOf(msg).IsNil() } + +// panicAlternativeStringer wraps a fmt.Stringer, and if calling String() panics, calls the alternative instead. +// This is needed to ensure logging slow v2 requests does not panic, which occurs when running integration tests +// with the embedded server with github.com/golang/protobuf v1.4.0+. See https://github.com/etcd-io/etcd/issues/12197. +type panicAlternativeStringer struct { + stringer fmt.Stringer + alternative func() string +} + +func (n panicAlternativeStringer) String() (s string) { + defer func() { + if err := recover(); err != nil { + s = n.alternative() + } + }() + s = n.stringer.String() + return s +} diff --git a/vendor/go.etcd.io/etcd/etcdserver/v3_server.go b/vendor/go.etcd.io/etcd/etcdserver/v3_server.go index 70b7177d39e..1fa8e4e6fc7 100644 --- a/vendor/go.etcd.io/etcd/etcdserver/v3_server.go +++ b/vendor/go.etcd.io/etcd/etcdserver/v3_server.go @@ -428,9 +428,10 @@ func (s *EtcdServer) Authenticate(ctx context.Context, r *pb.AuthenticateRequest return nil, err } + // internalReq doesn't need to have Password because the above s.AuthStore().CheckPassword() already did it. + // In addition, it will let a WAL entry not record password as a plain text. internalReq := &pb.InternalAuthenticateRequest{ Name: r.Name, - Password: r.Password, SimpleToken: st, } diff --git a/vendor/go.etcd.io/etcd/mvcc/backend/backend.go b/vendor/go.etcd.io/etcd/mvcc/backend/backend.go index 26f196fbff3..523d358d5ae 100644 --- a/vendor/go.etcd.io/etcd/mvcc/backend/backend.go +++ b/vendor/go.etcd.io/etcd/mvcc/backend/backend.go @@ -123,6 +123,8 @@ type BackendConfig struct { MmapSize uint64 // Logger logs backend-side operations. Logger *zap.Logger + // UnsafeNoFsync disables all uses of fsync. + UnsafeNoFsync bool `json:"unsafe-no-fsync"` } func DefaultBackendConfig() BackendConfig { @@ -150,6 +152,8 @@ func newBackend(bcfg BackendConfig) *backend { } bopts.InitialMmapSize = bcfg.mmapSize() bopts.FreelistType = bcfg.BackendFreelistType + bopts.NoSync = bcfg.UnsafeNoFsync + bopts.NoGrowSync = bcfg.UnsafeNoFsync db, err := bolt.Open(bcfg.Path, 0600, bopts) if err != nil { diff --git a/vendor/go.etcd.io/etcd/mvcc/watchable_store.go b/vendor/go.etcd.io/etcd/mvcc/watchable_store.go index 72c6b8be4ba..55d0e9dee91 100644 --- a/vendor/go.etcd.io/etcd/mvcc/watchable_store.go +++ b/vendor/go.etcd.io/etcd/mvcc/watchable_store.go @@ -30,9 +30,8 @@ import ( var ( // chanBufLen is the length of the buffered chan // for sending out watched events. - // TODO: find a good buf value. 1024 is just a random one that - // seems to be reasonable. - chanBufLen = 1024 + // See https://github.com/etcd-io/etcd/issues/11906 for more detail. + chanBufLen = 128 // maxWatchersPerSync is the number of watchers to sync in a single batch maxWatchersPerSync = 512 diff --git a/vendor/go.etcd.io/etcd/pkg/fileutil/dir_unix.go b/vendor/go.etcd.io/etcd/pkg/fileutil/dir_unix.go index 58a77dfc1a9..4ce15dc6bcf 100644 --- a/vendor/go.etcd.io/etcd/pkg/fileutil/dir_unix.go +++ b/vendor/go.etcd.io/etcd/pkg/fileutil/dir_unix.go @@ -18,5 +18,10 @@ package fileutil import "os" +const ( + // PrivateDirMode grants owner to make/remove files inside the directory. + PrivateDirMode = 0700 +) + // OpenDir opens a directory for syncing. func OpenDir(path string) (*os.File, error) { return os.Open(path) } diff --git a/vendor/go.etcd.io/etcd/pkg/fileutil/dir_windows.go b/vendor/go.etcd.io/etcd/pkg/fileutil/dir_windows.go index c123395c004..a10a90583c7 100644 --- a/vendor/go.etcd.io/etcd/pkg/fileutil/dir_windows.go +++ b/vendor/go.etcd.io/etcd/pkg/fileutil/dir_windows.go @@ -21,6 +21,11 @@ import ( "syscall" ) +const ( + // PrivateDirMode grants owner to make/remove files inside the directory. + PrivateDirMode = 0777 +) + // OpenDir opens a directory in windows with write access for syncing. func OpenDir(path string) (*os.File, error) { fd, err := openDir(path) diff --git a/vendor/go.etcd.io/etcd/pkg/fileutil/fileutil.go b/vendor/go.etcd.io/etcd/pkg/fileutil/fileutil.go index 5d9fb530395..5ff6369242f 100644 --- a/vendor/go.etcd.io/etcd/pkg/fileutil/fileutil.go +++ b/vendor/go.etcd.io/etcd/pkg/fileutil/fileutil.go @@ -27,8 +27,6 @@ import ( const ( // PrivateFileMode grants owner to read/write a file. PrivateFileMode = 0600 - // PrivateDirMode grants owner to make/remove files inside the directory. - PrivateDirMode = 0700 ) var plog = capnslog.NewPackageLogger("go.etcd.io/etcd", "pkg/fileutil") @@ -46,14 +44,22 @@ func IsDirWriteable(dir string) error { // TouchDirAll is similar to os.MkdirAll. It creates directories with 0700 permission if any directory // does not exists. TouchDirAll also ensures the given directory is writable. func TouchDirAll(dir string) error { - // If path is already a directory, MkdirAll does nothing - // and returns nil. - err := os.MkdirAll(dir, PrivateDirMode) - if err != nil { - // if mkdirAll("a/text") and "text" is not - // a directory, this will return syscall.ENOTDIR - return err + // If path is already a directory, MkdirAll does nothing and returns nil, so, + // first check if dir exist with an expected permission mode. + if Exist(dir) { + err := CheckDirPermission(dir, PrivateDirMode) + if err != nil { + return err + } + } else { + err := os.MkdirAll(dir, PrivateDirMode) + if err != nil { + // if mkdirAll("a/text") and "text" is not + // a directory, this will return syscall.ENOTDIR + return err + } } + return IsDirWriteable(dir) } @@ -102,3 +108,22 @@ func ZeroToEnd(f *os.File) error { _, err = f.Seek(off, io.SeekStart) return err } + +// CheckDirPermission checks permission on an existing dir. +// Returns error if dir is empty or exist with a different permission than specified. +func CheckDirPermission(dir string, perm os.FileMode) error { + if !Exist(dir) { + return fmt.Errorf("directory %q empty, cannot check permission.", dir) + } + //check the existing permission on the directory + dirInfo, err := os.Stat(dir) + if err != nil { + return err + } + dirMode := dirInfo.Mode().Perm() + if dirMode != perm { + err = fmt.Errorf("directory %q,%q exist without desired file permission %q.", dir, dirInfo.Mode(), os.FileMode(PrivateDirMode)) + return err + } + return nil +} diff --git a/vendor/go.etcd.io/etcd/pkg/runtime/fds_linux.go b/vendor/go.etcd.io/etcd/pkg/runtime/fds_linux.go index 8e9359db28c..4906d678ff4 100644 --- a/vendor/go.etcd.io/etcd/pkg/runtime/fds_linux.go +++ b/vendor/go.etcd.io/etcd/pkg/runtime/fds_linux.go @@ -16,7 +16,7 @@ package runtime import ( - "io/ioutil" + "os" "syscall" ) @@ -29,9 +29,20 @@ func FDLimit() (uint64, error) { } func FDUsage() (uint64, error) { - fds, err := ioutil.ReadDir("/proc/self/fd") + return countFiles("/proc/self/fd") +} + +// countFiles reads the directory named by dirname and returns the count. +// This is same as stdlib "io/ioutil.ReadDir" but without sorting. +func countFiles(dirname string) (uint64, error) { + f, err := os.Open(dirname) if err != nil { return 0, err } - return uint64(len(fds)), nil + list, err := f.Readdir(-1) + f.Close() + if err != nil { + return 0, err + } + return uint64(len(list)), nil } diff --git a/vendor/go.etcd.io/etcd/pkg/transport/listener.go b/vendor/go.etcd.io/etcd/pkg/transport/listener.go index 80e35bda59a..7260e4d079c 100644 --- a/vendor/go.etcd.io/etcd/pkg/transport/listener.go +++ b/vendor/go.etcd.io/etcd/pkg/transport/listener.go @@ -31,6 +31,7 @@ import ( "strings" "time" + "go.etcd.io/etcd/pkg/fileutil" "go.etcd.io/etcd/pkg/tlsutil" "go.uber.org/zap" @@ -114,10 +115,17 @@ func (info TLSInfo) Empty() bool { } func SelfCert(lg *zap.Logger, dirpath string, hosts []string, additionalUsages ...x509.ExtKeyUsage) (info TLSInfo, err error) { - if err = os.MkdirAll(dirpath, 0700); err != nil { + info.Logger = lg + err = fileutil.TouchDirAll(dirpath) + if err != nil { + if info.Logger != nil { + info.Logger.Warn( + "cannot create cert directory", + zap.Error(err), + ) + } return } - info.Logger = lg certPath := filepath.Join(dirpath, "cert.pem") keyPath := filepath.Join(dirpath, "key.pem") diff --git a/vendor/go.etcd.io/etcd/version/version.go b/vendor/go.etcd.io/etcd/version/version.go index ce2acaef1d6..f05139adff2 100644 --- a/vendor/go.etcd.io/etcd/version/version.go +++ b/vendor/go.etcd.io/etcd/version/version.go @@ -26,7 +26,7 @@ import ( var ( // MinClusterVersion is the min cluster version this etcd binary is compatible with. MinClusterVersion = "3.0.0" - Version = "3.4.9" + Version = "3.4.12" APIVersion = "unknown" // Git SHA Value will be set during build diff --git a/vendor/go.etcd.io/etcd/wal/decoder.go b/vendor/go.etcd.io/etcd/wal/decoder.go index f2f01fd881c..d007fe1c748 100644 --- a/vendor/go.etcd.io/etcd/wal/decoder.go +++ b/vendor/go.etcd.io/etcd/wal/decoder.go @@ -59,6 +59,11 @@ func (d *decoder) decode(rec *walpb.Record) error { return d.decodeRecord(rec) } +// raft max message size is set to 1 MB in etcd server +// assume projects set reasonable message size limit, +// thus entry size should never exceed 10 MB +const maxWALEntrySizeLimit = int64(10 * 1024 * 1024) + func (d *decoder) decodeRecord(rec *walpb.Record) error { if len(d.brs) == 0 { return io.EOF @@ -79,6 +84,9 @@ func (d *decoder) decodeRecord(rec *walpb.Record) error { } recBytes, padBytes := decodeFrameSize(l) + if recBytes >= maxWALEntrySizeLimit-padBytes { + return ErrMaxWALEntrySizeLimitExceeded + } data := make([]byte, recBytes+padBytes) if _, err = io.ReadFull(d.brs[0], data); err != nil { diff --git a/vendor/go.etcd.io/etcd/wal/wal.go b/vendor/go.etcd.io/etcd/wal/wal.go index 0451f94d058..1aced50bdd1 100644 --- a/vendor/go.etcd.io/etcd/wal/wal.go +++ b/vendor/go.etcd.io/etcd/wal/wal.go @@ -56,12 +56,15 @@ var ( plog = capnslog.NewPackageLogger("go.etcd.io/etcd", "wal") - ErrMetadataConflict = errors.New("wal: conflicting metadata found") - ErrFileNotFound = errors.New("wal: file not found") - ErrCRCMismatch = errors.New("wal: crc mismatch") - ErrSnapshotMismatch = errors.New("wal: snapshot mismatch") - ErrSnapshotNotFound = errors.New("wal: snapshot not found") - crcTable = crc32.MakeTable(crc32.Castagnoli) + ErrMetadataConflict = errors.New("wal: conflicting metadata found") + ErrFileNotFound = errors.New("wal: file not found") + ErrCRCMismatch = errors.New("wal: crc mismatch") + ErrSnapshotMismatch = errors.New("wal: snapshot mismatch") + ErrSnapshotNotFound = errors.New("wal: snapshot not found") + ErrSliceOutOfRange = errors.New("wal: slice bounds out of range") + ErrMaxWALEntrySizeLimitExceeded = errors.New("wal: max entry size limit exceeded") + ErrDecoderNotFound = errors.New("wal: decoder not found") + crcTable = crc32.MakeTable(crc32.Castagnoli) ) // WAL is a logical representation of the stable storage. @@ -84,6 +87,8 @@ type WAL struct { decoder *decoder // decoder to decode records readClose func() error // closer for decode reader + unsafeNoSync bool // if set, do not fsync + mu sync.Mutex enti uint64 // index of the last entry saved to the wal encoder *encoder // encoder to encode records @@ -93,7 +98,8 @@ type WAL struct { } // Create creates a WAL ready for appending records. The given metadata is -// recorded at the head of each WAL file, and can be retrieved with ReadAll. +// recorded at the head of each WAL file, and can be retrieved with ReadAll +// after the file is Open. func Create(lg *zap.Logger, dirpath string, metadata []byte) (*WAL, error) { if Exist(dirpath) { return nil, os.ErrExist @@ -233,6 +239,10 @@ func Create(lg *zap.Logger, dirpath string, metadata []byte) (*WAL, error) { return w, nil } +func (w *WAL) SetUnsafeNoFsync() { + w.unsafeNoSync = true +} + func (w *WAL) cleanupWAL(lg *zap.Logger) { var err error if err = w.Close(); err != nil { @@ -428,6 +438,10 @@ func (w *WAL) ReadAll() (metadata []byte, state raftpb.HardState, ents []raftpb. defer w.mu.Unlock() rec := &walpb.Record{} + + if w.decoder == nil { + return nil, state, nil, ErrDecoderNotFound + } decoder := w.decoder var match bool @@ -435,8 +449,15 @@ func (w *WAL) ReadAll() (metadata []byte, state raftpb.HardState, ents []raftpb. switch rec.Type { case entryType: e := mustUnmarshalEntry(rec.Data) + // 0 <= e.Index-w.start.Index - 1 < len(ents) if e.Index > w.start.Index { - ents = append(ents[:e.Index-w.start.Index-1], e) + // prevent "panic: runtime error: slice bounds out of range [:13038096702221461992] with capacity 0" + up := e.Index - w.start.Index - 1 + if up > uint64(len(ents)) { + // return error before append call causes runtime panic + return nil, state, nil, ErrSliceOutOfRange + } + ents = append(ents[:up], e) } w.enti = e.Index @@ -768,6 +789,9 @@ func (w *WAL) cut() error { } func (w *WAL) sync() error { + if w.unsafeNoSync { + return nil + } if w.encoder != nil { if err := w.encoder.flush(); err != nil { return err diff --git a/vendor/go.opencensus.io/Gopkg.lock b/vendor/go.opencensus.io/Gopkg.lock deleted file mode 100644 index 3be12ac8f24..00000000000 --- a/vendor/go.opencensus.io/Gopkg.lock +++ /dev/null @@ -1,231 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - branch = "master" - digest = "1:eee9386329f4fcdf8d6c0def0c9771b634bdd5ba460d888aa98c17d59b37a76c" - name = "git.apache.org/thrift.git" - packages = ["lib/go/thrift"] - pruneopts = "UT" - revision = "6e67faa92827ece022380b211c2caaadd6145bf5" - source = "github.com/apache/thrift" - -[[projects]] - branch = "master" - digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" - name = "github.com/beorn7/perks" - packages = ["quantile"] - pruneopts = "UT" - revision = "3a771d992973f24aa725d07868b467d1ddfceafb" - -[[projects]] - digest = "1:4c0989ca0bcd10799064318923b9bc2db6b4d6338dd75f3f2d86c3511aaaf5cf" - name = "github.com/golang/protobuf" - packages = [ - "proto", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/timestamp", - ] - pruneopts = "UT" - revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" - version = "v1.2.0" - -[[projects]] - digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" - name = "github.com/matttproud/golang_protobuf_extensions" - packages = ["pbutil"] - pruneopts = "UT" - revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" - version = "v1.0.1" - -[[projects]] - digest = "1:824c8f3aa4c5f23928fa84ebbd5ed2e9443b3f0cb958a40c1f2fbed5cf5e64b1" - name = "github.com/openzipkin/zipkin-go" - packages = [ - ".", - "idgenerator", - "model", - "propagation", - "reporter", - "reporter/http", - ] - pruneopts = "UT" - revision = "d455a5674050831c1e187644faa4046d653433c2" - version = "v0.1.1" - -[[projects]] - digest = "1:d14a5f4bfecf017cb780bdde1b6483e5deb87e12c332544d2c430eda58734bcb" - name = "github.com/prometheus/client_golang" - packages = [ - "prometheus", - "prometheus/promhttp", - ] - pruneopts = "UT" - revision = "c5b7fccd204277076155f10851dad72b76a49317" - version = "v0.8.0" - -[[projects]] - branch = "master" - digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4" - name = "github.com/prometheus/client_model" - packages = ["go"] - pruneopts = "UT" - revision = "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f" - -[[projects]] - branch = "master" - digest = "1:63b68062b8968092eb86bedc4e68894bd096ea6b24920faca8b9dcf451f54bb5" - name = "github.com/prometheus/common" - packages = [ - "expfmt", - "internal/bitbucket.org/ww/goautoneg", - "model", - ] - pruneopts = "UT" - revision = "c7de2306084e37d54b8be01f3541a8464345e9a5" - -[[projects]] - branch = "master" - digest = "1:8c49953a1414305f2ff5465147ee576dd705487c35b15918fcd4efdc0cb7a290" - name = "github.com/prometheus/procfs" - packages = [ - ".", - "internal/util", - "nfs", - "xfs", - ] - pruneopts = "UT" - revision = "05ee40e3a273f7245e8777337fc7b46e533a9a92" - -[[projects]] - branch = "master" - digest = "1:deafe4ab271911fec7de5b693d7faae3f38796d9eb8622e2b9e7df42bb3dfea9" - name = "golang.org/x/net" - packages = [ - "context", - "http/httpguts", - "http2", - "http2/hpack", - "idna", - "internal/timeseries", - "trace", - ] - pruneopts = "UT" - revision = "922f4815f713f213882e8ef45e0d315b164d705c" - -[[projects]] - branch = "master" - digest = "1:e0140c0c868c6e0f01c0380865194592c011fe521d6e12d78bfd33e756fe018a" - name = "golang.org/x/sync" - packages = ["semaphore"] - pruneopts = "UT" - revision = "1d60e4601c6fd243af51cc01ddf169918a5407ca" - -[[projects]] - branch = "master" - digest = "1:a3f00ac457c955fe86a41e1495e8f4c54cb5399d609374c5cc26aa7d72e542c8" - name = "golang.org/x/sys" - packages = ["unix"] - pruneopts = "UT" - revision = "3b58ed4ad3395d483fc92d5d14123ce2c3581fec" - -[[projects]] - digest = "1:a2ab62866c75542dd18d2b069fec854577a20211d7c0ea6ae746072a1dccdd18" - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - ] - pruneopts = "UT" - revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" - version = "v0.3.0" - -[[projects]] - branch = "master" - digest = "1:c0c17c94fe8bc1ab34e7f586a4a8b788c5e1f4f9f750ff23395b8b2f5a523530" - name = "google.golang.org/api" - packages = ["support/bundler"] - pruneopts = "UT" - revision = "e21acd801f91da814261b938941d193bb036441a" - -[[projects]] - branch = "master" - digest = "1:077c1c599507b3b3e9156d17d36e1e61928ee9b53a5b420f10f28ebd4a0b275c" - name = "google.golang.org/genproto" - packages = ["googleapis/rpc/status"] - pruneopts = "UT" - revision = "c66870c02cf823ceb633bcd05be3c7cda29976f4" - -[[projects]] - digest = "1:3dd7996ce6bf52dec6a2f69fa43e7c4cefea1d4dfa3c8ab7a5f8a9f7434e239d" - name = "google.golang.org/grpc" - packages = [ - ".", - "balancer", - "balancer/base", - "balancer/roundrobin", - "codes", - "connectivity", - "credentials", - "encoding", - "encoding/proto", - "grpclog", - "internal", - "internal/backoff", - "internal/channelz", - "internal/envconfig", - "internal/grpcrand", - "internal/transport", - "keepalive", - "metadata", - "naming", - "peer", - "resolver", - "resolver/dns", - "resolver/passthrough", - "stats", - "status", - "tap", - ] - pruneopts = "UT" - revision = "32fb0ac620c32ba40a4626ddf94d90d12cce3455" - version = "v1.14.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "git.apache.org/thrift.git/lib/go/thrift", - "github.com/golang/protobuf/proto", - "github.com/openzipkin/zipkin-go", - "github.com/openzipkin/zipkin-go/model", - "github.com/openzipkin/zipkin-go/reporter", - "github.com/openzipkin/zipkin-go/reporter/http", - "github.com/prometheus/client_golang/prometheus", - "github.com/prometheus/client_golang/prometheus/promhttp", - "golang.org/x/net/context", - "golang.org/x/net/http2", - "google.golang.org/api/support/bundler", - "google.golang.org/grpc", - "google.golang.org/grpc/codes", - "google.golang.org/grpc/grpclog", - "google.golang.org/grpc/metadata", - "google.golang.org/grpc/stats", - "google.golang.org/grpc/status", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/vendor/go.opencensus.io/Gopkg.toml b/vendor/go.opencensus.io/Gopkg.toml deleted file mode 100644 index a9f3cd68eb3..00000000000 --- a/vendor/go.opencensus.io/Gopkg.toml +++ /dev/null @@ -1,36 +0,0 @@ -# For v0.x.y dependencies, prefer adding a constraints of the form: version=">= 0.x.y" -# to avoid locking to a particular minor version which can cause dep to not be -# able to find a satisfying dependency graph. - -[[constraint]] - branch = "master" - name = "git.apache.org/thrift.git" - source = "github.com/apache/thrift" - -[[constraint]] - name = "github.com/golang/protobuf" - version = "1.0.0" - -[[constraint]] - name = "github.com/openzipkin/zipkin-go" - version = ">=0.1.0" - -[[constraint]] - name = "github.com/prometheus/client_golang" - version = ">=0.8.0" - -[[constraint]] - branch = "master" - name = "golang.org/x/net" - -[[constraint]] - branch = "master" - name = "google.golang.org/api" - -[[constraint]] - name = "google.golang.org/grpc" - version = "1.11.3" - -[prune] - go-tests = true - unused-packages = true diff --git a/vendor/go.opencensus.io/README.md b/vendor/go.opencensus.io/README.md index fabab2e0600..1d7e837116f 100644 --- a/vendor/go.opencensus.io/README.md +++ b/vendor/go.opencensus.io/README.md @@ -9,6 +9,8 @@ OpenCensus Go is a Go implementation of OpenCensus, a toolkit for collecting application performance and behavior monitoring data. Currently it consists of three major components: tags, stats and tracing. +#### OpenCensus and OpenTracing have merged to form OpenTelemetry, which serves as the next major version of OpenCensus and OpenTracing. OpenTelemetry will offer backwards compatibility with existing OpenCensus integrations, and we will continue to make security patches to existing OpenCensus libraries for two years. Read more about the merger [here](https://medium.com/opentracing/a-roadmap-to-convergence-b074e5815289). + ## Installation ``` @@ -57,6 +59,7 @@ can implement their own exporters by implementing the exporter interfaces * [Datadog][exporter-datadog] for stats and traces * [Graphite][exporter-graphite] for stats * [Honeycomb][exporter-honeycomb] for traces +* [New Relic][exporter-newrelic] for stats and traces ## Overview @@ -78,7 +81,7 @@ Package `tag` allows adding or modifying tags in the current context. [embedmd]:# (internal/readme/tags.go new) ```go -ctx, err = tag.New(ctx, +ctx, err := tag.New(ctx, tag.Insert(osKey, "macOS-10.12.5"), tag.Upsert(userIDKey, "cde36753ed"), ) @@ -261,3 +264,4 @@ release in which the functionality was marked *Deprecated*. [exporter-datadog]: https://github.com/DataDog/opencensus-go-exporter-datadog [exporter-graphite]: https://github.com/census-ecosystem/opencensus-go-exporter-graphite [exporter-honeycomb]: https://github.com/honeycombio/opencensus-exporter +[exporter-newrelic]: https://github.com/newrelic/newrelic-opencensus-exporter-go diff --git a/vendor/go.opencensus.io/appveyor.yml b/vendor/go.opencensus.io/appveyor.yml index 12bd7c4c73d..d08f0edaff9 100644 --- a/vendor/go.opencensus.io/appveyor.yml +++ b/vendor/go.opencensus.io/appveyor.yml @@ -6,13 +6,12 @@ clone_folder: c:\gopath\src\go.opencensus.io environment: GOPATH: 'c:\gopath' - GOVERSION: '1.11' GO111MODULE: 'on' CGO_ENABLED: '0' # See: https://github.com/appveyor/ci/issues/2613 -install: - - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% - - choco upgrade golang --version 1.11.5 # Temporary fix because of a go.sum bug in 1.11 +stack: go 1.11 + +before_test: - go version - go env diff --git a/vendor/go.opencensus.io/go.mod b/vendor/go.opencensus.io/go.mod index cb4de80f3bc..c867df5f5c4 100644 --- a/vendor/go.opencensus.io/go.mod +++ b/vendor/go.opencensus.io/go.mod @@ -1,12 +1,15 @@ module go.opencensus.io require ( + github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 github.com/golang/protobuf v1.3.1 github.com/google/go-cmp v0.3.0 - github.com/hashicorp/golang-lru v0.5.1 - golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09 + github.com/stretchr/testify v1.4.0 + golang.org/x/net v0.0.0-20190620200207-3b0461eec859 golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd // indirect golang.org/x/text v0.3.2 // indirect google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb // indirect google.golang.org/grpc v1.20.1 ) + +go 1.13 diff --git a/vendor/go.opencensus.io/go.sum b/vendor/go.opencensus.io/go.sum index 0b948c2b40c..ed2a1d844f0 100644 --- a/vendor/go.opencensus.io/go.sum +++ b/vendor/go.opencensus.io/go.sum @@ -1,8 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -10,20 +14,24 @@ github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09 h1:KaQtG+aDELoNmXYas3TVkGNYRuq8JQ1aa7LJt8EXVyo= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -45,6 +53,7 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -58,4 +67,7 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/vendor/go.opencensus.io/internal/internal.go b/vendor/go.opencensus.io/internal/internal.go index 9a638781cf1..81dc7183ec3 100644 --- a/vendor/go.opencensus.io/internal/internal.go +++ b/vendor/go.opencensus.io/internal/internal.go @@ -33,5 +33,5 @@ var UserAgent = fmt.Sprintf("opencensus-go/%s", opencensus.Version()) // end as a monotonic time. // See https://golang.org/pkg/time/#hdr-Monotonic_Clocks func MonotonicEndTime(start time.Time) time.Time { - return start.Add(time.Now().Sub(start)) + return start.Add(time.Since(start)) } diff --git a/vendor/go.opencensus.io/opencensus.go b/vendor/go.opencensus.io/opencensus.go index 626d73645df..e5e4b4368c1 100644 --- a/vendor/go.opencensus.io/opencensus.go +++ b/vendor/go.opencensus.io/opencensus.go @@ -17,5 +17,5 @@ package opencensus // import "go.opencensus.io" // Version is the current release version of OpenCensus in use. func Version() string { - return "0.22.0" + return "0.23.0" } diff --git a/vendor/go.opencensus.io/plugin/ochttp/server.go b/vendor/go.opencensus.io/plugin/ochttp/server.go index 4f6404fa790..c7ea6423572 100644 --- a/vendor/go.opencensus.io/plugin/ochttp/server.go +++ b/vendor/go.opencensus.io/plugin/ochttp/server.go @@ -70,6 +70,12 @@ type Handler struct { // from the information found in the incoming HTTP Request. By default the // name equals the URL Path. FormatSpanName func(*http.Request) string + + // IsHealthEndpoint holds the function to use for determining if the + // incoming HTTP request should be considered a health check. This is in + // addition to the private isHealthEndpoint func which may also indicate + // tracing should be skipped. + IsHealthEndpoint func(*http.Request) bool } func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { @@ -87,7 +93,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } func (h *Handler) startTrace(w http.ResponseWriter, r *http.Request) (*http.Request, func()) { - if isHealthEndpoint(r.URL.Path) { + if h.IsHealthEndpoint != nil && h.IsHealthEndpoint(r) || isHealthEndpoint(r.URL.Path) { return r, func() {} } var name string @@ -128,7 +134,7 @@ func (h *Handler) startTrace(w http.ResponseWriter, r *http.Request) (*http.Requ // TODO: Handle cases where ContentLength is not set. } else if r.ContentLength > 0 { span.AddMessageReceiveEvent(0, /* TODO: messageID */ - int64(r.ContentLength), -1) + r.ContentLength, -1) } return r.WithContext(ctx), span.End } @@ -174,8 +180,6 @@ type trackingResponseWriter struct { // Compile time assertion for ResponseWriter interface var _ http.ResponseWriter = (*trackingResponseWriter)(nil) -var logTagsErrorOnce sync.Once - func (t *trackingResponseWriter) end(tags *addedTags) { t.endOnce.Do(func() { if t.statusCode == 0 { diff --git a/vendor/go.opencensus.io/plugin/ochttp/stats.go b/vendor/go.opencensus.io/plugin/ochttp/stats.go index 63bbcda5e33..ee3729040dd 100644 --- a/vendor/go.opencensus.io/plugin/ochttp/stats.go +++ b/vendor/go.opencensus.io/plugin/ochttp/stats.go @@ -92,38 +92,38 @@ var ( // The value of this tag can be controlled by the HTTP client, so you need // to watch out for potentially generating high-cardinality labels in your // metrics backend if you use this tag in views. - Host, _ = tag.NewKey("http.host") + Host = tag.MustNewKey("http.host") // StatusCode is the numeric HTTP response status code, // or "error" if a transport error occurred and no status code was read. - StatusCode, _ = tag.NewKey("http.status") + StatusCode = tag.MustNewKey("http.status") // Path is the URL path (not including query string) in the request. // // The value of this tag can be controlled by the HTTP client, so you need // to watch out for potentially generating high-cardinality labels in your // metrics backend if you use this tag in views. - Path, _ = tag.NewKey("http.path") + Path = tag.MustNewKey("http.path") // Method is the HTTP method of the request, capitalized (GET, POST, etc.). - Method, _ = tag.NewKey("http.method") + Method = tag.MustNewKey("http.method") // KeyServerRoute is a low cardinality string representing the logical // handler of the request. This is usually the pattern registered on the a // ServeMux (or similar string). - KeyServerRoute, _ = tag.NewKey("http_server_route") + KeyServerRoute = tag.MustNewKey("http_server_route") ) // Client tag keys. var ( // KeyClientMethod is the HTTP method, capitalized (i.e. GET, POST, PUT, DELETE, etc.). - KeyClientMethod, _ = tag.NewKey("http_client_method") + KeyClientMethod = tag.MustNewKey("http_client_method") // KeyClientPath is the URL path (not including query string). - KeyClientPath, _ = tag.NewKey("http_client_path") + KeyClientPath = tag.MustNewKey("http_client_path") // KeyClientStatus is the HTTP status code as an integer (e.g. 200, 404, 500.), or "error" if no response status line was received. - KeyClientStatus, _ = tag.NewKey("http_client_status") + KeyClientStatus = tag.MustNewKey("http_client_status") // KeyClientHost is the value of the request Host header. - KeyClientHost, _ = tag.NewKey("http_client_host") + KeyClientHost = tag.MustNewKey("http_client_host") ) // Default distributions used by views in this package. diff --git a/vendor/go.opencensus.io/plugin/ochttp/trace.go b/vendor/go.opencensus.io/plugin/ochttp/trace.go index c23b97fb1fe..53e71305a5d 100644 --- a/vendor/go.opencensus.io/plugin/ochttp/trace.go +++ b/vendor/go.opencensus.io/plugin/ochttp/trace.go @@ -186,6 +186,8 @@ func TraceStatus(httpStatusCode int, statusLine string) trace.Status { code = trace.StatusCodeCancelled case http.StatusBadRequest: code = trace.StatusCodeInvalidArgument + case http.StatusUnprocessableEntity: + code = trace.StatusCodeInvalidArgument case http.StatusGatewayTimeout: code = trace.StatusCodeDeadlineExceeded case http.StatusNotFound: diff --git a/vendor/go.opencensus.io/stats/units.go b/vendor/go.opencensus.io/stats/units.go index 6931a5f2966..736399652cc 100644 --- a/vendor/go.opencensus.io/stats/units.go +++ b/vendor/go.opencensus.io/stats/units.go @@ -22,4 +22,5 @@ const ( UnitDimensionless = "1" UnitBytes = "By" UnitMilliseconds = "ms" + UnitSeconds = "s" ) diff --git a/vendor/go.opencensus.io/stats/view/aggregation.go b/vendor/go.opencensus.io/stats/view/aggregation.go index b7f169b4a5f..9d7093728ed 100644 --- a/vendor/go.opencensus.io/stats/view/aggregation.go +++ b/vendor/go.opencensus.io/stats/view/aggregation.go @@ -82,7 +82,7 @@ func Sum() *Aggregation { // Distribution indicates that the desired aggregation is // a histogram distribution. // -// An distribution aggregation may contain a histogram of the values in the +// A distribution aggregation may contain a histogram of the values in the // population. The bucket boundaries for that histogram are described // by the bounds. This defines len(bounds)+1 buckets. // @@ -99,13 +99,14 @@ func Sum() *Aggregation { // If len(bounds) is 1 then there is no finite buckets, and that single // element is the common boundary of the overflow and underflow buckets. func Distribution(bounds ...float64) *Aggregation { - return &Aggregation{ + agg := &Aggregation{ Type: AggTypeDistribution, Buckets: bounds, - newData: func() AggregationData { - return newDistributionData(bounds) - }, } + agg.newData = func() AggregationData { + return newDistributionData(agg) + } + return agg } // LastValue only reports the last value recorded using this diff --git a/vendor/go.opencensus.io/stats/view/aggregation_data.go b/vendor/go.opencensus.io/stats/view/aggregation_data.go index d500e67f733..f331d456e9b 100644 --- a/vendor/go.opencensus.io/stats/view/aggregation_data.go +++ b/vendor/go.opencensus.io/stats/view/aggregation_data.go @@ -128,12 +128,12 @@ type DistributionData struct { bounds []float64 // histogram distribution of the values } -func newDistributionData(bounds []float64) *DistributionData { - bucketCount := len(bounds) + 1 +func newDistributionData(agg *Aggregation) *DistributionData { + bucketCount := len(agg.Buckets) + 1 return &DistributionData{ CountPerBucket: make([]int64, bucketCount), ExemplarsPerBucket: make([]*metricdata.Exemplar, bucketCount), - bounds: bounds, + bounds: agg.Buckets, Min: math.MaxFloat64, Max: math.SmallestNonzeroFloat64, } diff --git a/vendor/go.opencensus.io/stats/view/doc.go b/vendor/go.opencensus.io/stats/view/doc.go index dced225c3dc..7bbedfe1ff2 100644 --- a/vendor/go.opencensus.io/stats/view/doc.go +++ b/vendor/go.opencensus.io/stats/view/doc.go @@ -29,7 +29,7 @@ // LastValue just keeps track of the most recently recorded measurement value. // All aggregations are cumulative. // -// Views can be registerd and unregistered at any time during program execution. +// Views can be registered and unregistered at any time during program execution. // // Libraries can define views but it is recommended that in most cases registering // views be left up to applications. diff --git a/vendor/go.opencensus.io/stats/view/view.go b/vendor/go.opencensus.io/stats/view/view.go index 37f88e1d9fa..293b54ecbed 100644 --- a/vendor/go.opencensus.io/stats/view/view.go +++ b/vendor/go.opencensus.io/stats/view/view.go @@ -30,7 +30,7 @@ import ( ) // View allows users to aggregate the recorded stats.Measurements. -// Views need to be passed to the Register function to be before data will be +// Views need to be passed to the Register function before data will be // collected and sent to Exporters. type View struct { Name string // Name of View. Must be unique. If unset, will default to the name of the Measure. @@ -43,7 +43,7 @@ type View struct { // Measure is a stats.Measure to aggregate in this view. Measure stats.Measure - // Aggregation is the aggregation function tp apply to the set of Measurements. + // Aggregation is the aggregation function to apply to the set of Measurements. Aggregation *Aggregation } @@ -189,7 +189,7 @@ func (r *Row) String() string { } // Equal returns true if both rows are equal. Tags are expected to be ordered -// by the key name. Even both rows have the same tags but the tags appear in +// by the key name. Even if both rows have the same tags but the tags appear in // different orders it will return false. func (r *Row) Equal(other *Row) bool { if r == other { diff --git a/vendor/go.opencensus.io/stats/view/view_to_metric.go b/vendor/go.opencensus.io/stats/view/view_to_metric.go index f67b5c46430..293c1646df2 100644 --- a/vendor/go.opencensus.io/stats/view/view_to_metric.go +++ b/vendor/go.opencensus.io/stats/view/view_to_metric.go @@ -85,12 +85,21 @@ func viewToMetricDescriptor(v *View) *metricdata.Descriptor { return &metricdata.Descriptor{ Name: v.Name, Description: v.Description, - Unit: getUnit(v.Measure.Unit()), + Unit: convertUnit(v), Type: getType(v), LabelKeys: getLabelKeys(v), } } +func convertUnit(v *View) metricdata.Unit { + switch v.Aggregation.Type { + case AggTypeCount: + return metricdata.UnitDimensionless + default: + return getUnit(v.Measure.Unit()) + } +} + func toLabelValues(row *Row, expectedKeys []metricdata.LabelKey) []metricdata.LabelValue { labelValues := []metricdata.LabelValue{} tagMap := make(map[string]string) diff --git a/vendor/go.opencensus.io/tag/key.go b/vendor/go.opencensus.io/tag/key.go index 4e63d08c937..71ec913657b 100644 --- a/vendor/go.opencensus.io/tag/key.go +++ b/vendor/go.opencensus.io/tag/key.go @@ -21,7 +21,7 @@ type Key struct { } // NewKey creates or retrieves a string key identified by name. -// Calling NewKey consequently with the same name returns the same key. +// Calling NewKey more than once with the same name returns the same key. func NewKey(name string) (Key, error) { if !checkKeyName(name) { return Key{}, errInvalidKeyName @@ -29,8 +29,7 @@ func NewKey(name string) (Key, error) { return Key{name: name}, nil } -// MustNewKey creates or retrieves a string key identified by name. -// An invalid key name raises a panic. +// MustNewKey returns a key with the given name, and panics if name is an invalid key name. func MustNewKey(name string) Key { k, err := NewKey(name) if err != nil { diff --git a/vendor/go.opencensus.io/tag/map_codec.go b/vendor/go.opencensus.io/tag/map_codec.go index f8b58276153..c242e695c8c 100644 --- a/vendor/go.opencensus.io/tag/map_codec.go +++ b/vendor/go.opencensus.io/tag/map_codec.go @@ -168,7 +168,7 @@ func Encode(m *Map) []byte { eg := &encoderGRPC{ buf: make([]byte, len(m.m)), } - eg.writeByte(byte(tagsVersionID)) + eg.writeByte(tagsVersionID) for k, v := range m.m { if v.m.ttl.ttl == valueTTLUnlimitedPropagation { eg.writeByte(byte(keyTypeString)) diff --git a/vendor/go.opencensus.io/trace/lrumap.go b/vendor/go.opencensus.io/trace/lrumap.go index 3f80a336813..dc7a295c773 100644 --- a/vendor/go.opencensus.io/trace/lrumap.go +++ b/vendor/go.opencensus.io/trace/lrumap.go @@ -15,23 +15,47 @@ package trace import ( - "github.com/hashicorp/golang-lru/simplelru" + "github.com/golang/groupcache/lru" ) +// A simple lru.Cache wrapper that tracks the keys of the current contents and +// the cumulative number of evicted items. type lruMap struct { - simpleLruMap *simplelru.LRU + cacheKeys map[lru.Key]bool + cache *lru.Cache droppedCount int } func newLruMap(size int) *lruMap { - lm := &lruMap{} - lm.simpleLruMap, _ = simplelru.NewLRU(size, nil) + lm := &lruMap{ + cacheKeys: make(map[lru.Key]bool), + cache: lru.New(size), + droppedCount: 0, + } + lm.cache.OnEvicted = func(key lru.Key, value interface{}) { + delete(lm.cacheKeys, key) + lm.droppedCount++ + } return lm } -func (lm *lruMap) add(key, value interface{}) { - evicted := lm.simpleLruMap.Add(key, value) - if evicted { - lm.droppedCount++ - } +func (lm lruMap) len() int { + return lm.cache.Len() +} + +func (lm lruMap) keys() []interface{} { + keys := []interface{}{} + for k := range lm.cacheKeys { + keys = append(keys, k) + } + return keys +} + +func (lm *lruMap) add(key, value interface{}) { + lm.cacheKeys[lru.Key(key)] = true + lm.cache.Add(lru.Key(key), value) +} + +func (lm *lruMap) get(key interface{}) (interface{}, bool) { + return lm.cache.Get(key) } diff --git a/vendor/go.opencensus.io/trace/trace.go b/vendor/go.opencensus.io/trace/trace.go index 38ead7bf0ad..3f8977b41b4 100644 --- a/vendor/go.opencensus.io/trace/trace.go +++ b/vendor/go.opencensus.io/trace/trace.go @@ -296,7 +296,7 @@ func (s *Span) makeSpanData() *SpanData { var sd SpanData s.mu.Lock() sd = *s.data - if s.lruAttributes.simpleLruMap.Len() > 0 { + if s.lruAttributes.len() > 0 { sd.Attributes = s.lruAttributesToAttributeMap() sd.DroppedAttributeCount = s.lruAttributes.droppedCount } @@ -370,8 +370,8 @@ func (s *Span) interfaceArrayToAnnotationArray() []Annotation { func (s *Span) lruAttributesToAttributeMap() map[string]interface{} { attributes := make(map[string]interface{}) - for _, key := range s.lruAttributes.simpleLruMap.Keys() { - value, ok := s.lruAttributes.simpleLruMap.Get(key) + for _, key := range s.lruAttributes.keys() { + value, ok := s.lruAttributes.get(key) if ok { keyStr := key.(string) attributes[keyStr] = value diff --git a/vendor/go.uber.org/atomic/.travis.yml b/vendor/go.uber.org/atomic/.travis.yml index 58957222a33..0f3769e5fa6 100644 --- a/vendor/go.uber.org/atomic/.travis.yml +++ b/vendor/go.uber.org/atomic/.travis.yml @@ -3,9 +3,13 @@ language: go go_import_path: go.uber.org/atomic go: - - 1.7 - - 1.8 - - 1.9 + - 1.11.x + - 1.12.x + +matrix: + include: + - go: 1.12.x + env: NO_TEST=yes LINT=yes cache: directories: @@ -15,9 +19,9 @@ install: - make install_ci script: - - make test_ci - - scripts/test-ubergo.sh - - make lint + - test -n "$NO_TEST" || make test_ci + - test -n "$NO_TEST" || scripts/test-ubergo.sh + - test -z "$LINT" || make install_lint lint after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/go.uber.org/atomic/Makefile b/vendor/go.uber.org/atomic/Makefile index dfc63d9db4f..1ef263075d7 100644 --- a/vendor/go.uber.org/atomic/Makefile +++ b/vendor/go.uber.org/atomic/Makefile @@ -1,24 +1,13 @@ -PACKAGES := $(shell glide nv) # Many Go tools take file globs or directories as arguments instead of packages. PACKAGE_FILES ?= *.go - -# The linting tools evolve with each Go version, so run them only on the latest -# stable release. -GO_VERSION := $(shell go version | cut -d " " -f 3) -GO_MINOR_VERSION := $(word 2,$(subst ., ,$(GO_VERSION))) -LINTABLE_MINOR_VERSIONS := 7 8 -ifneq ($(filter $(LINTABLE_MINOR_VERSIONS),$(GO_MINOR_VERSION)),) -SHOULD_LINT := true -endif - - +# For pre go1.6 export GO15VENDOREXPERIMENT=1 .PHONY: build build: - go build -i $(PACKAGES) + go build -i ./... .PHONY: install @@ -29,7 +18,7 @@ install: .PHONY: test test: - go test -cover -race $(PACKAGES) + go test -cover -race ./... .PHONY: install_ci @@ -37,26 +26,24 @@ install_ci: install go get github.com/wadey/gocovmerge go get github.com/mattn/goveralls go get golang.org/x/tools/cmd/cover -ifdef SHOULD_LINT - go get github.com/golang/lint/golint -endif + +.PHONY: install_lint +install_lint: + go get golang.org/x/lint/golint + .PHONY: lint lint: -ifdef SHOULD_LINT @rm -rf lint.log @echo "Checking formatting..." @gofmt -d -s $(PACKAGE_FILES) 2>&1 | tee lint.log @echo "Checking vet..." - @$(foreach dir,$(PACKAGE_FILES),go tool vet $(dir) 2>&1 | tee -a lint.log;) + @go vet ./... 2>&1 | tee -a lint.log;) @echo "Checking lint..." - @$(foreach dir,$(PKGS),golint $(dir) 2>&1 | tee -a lint.log;) + @golint $$(go list ./...) 2>&1 | tee -a lint.log @echo "Checking for unresolved FIXMEs..." @git grep -i fixme | grep -v -e vendor -e Makefile | tee -a lint.log @[ ! -s lint.log ] -else - @echo "Skipping linters on" $(GO_VERSION) -endif .PHONY: test_ci diff --git a/vendor/go.uber.org/atomic/README.md b/vendor/go.uber.org/atomic/README.md index 6505abf65cb..62eb8e57609 100644 --- a/vendor/go.uber.org/atomic/README.md +++ b/vendor/go.uber.org/atomic/README.md @@ -23,13 +23,13 @@ See the [documentation][doc] for a complete API specification. ## Development Status Stable. -
    +___ Released under the [MIT License](LICENSE.txt). [doc-img]: https://godoc.org/github.com/uber-go/atomic?status.svg [doc]: https://godoc.org/go.uber.org/atomic -[ci-img]: https://travis-ci.org/uber-go/atomic.svg?branch=master -[ci]: https://travis-ci.org/uber-go/atomic +[ci-img]: https://travis-ci.com/uber-go/atomic.svg?branch=master +[ci]: https://travis-ci.com/uber-go/atomic [cov-img]: https://codecov.io/gh/uber-go/atomic/branch/master/graph/badge.svg [cov]: https://codecov.io/gh/uber-go/atomic [reportcard-img]: https://goreportcard.com/badge/go.uber.org/atomic diff --git a/vendor/go.uber.org/atomic/error.go b/vendor/go.uber.org/atomic/error.go new file mode 100644 index 00000000000..0489d19badb --- /dev/null +++ b/vendor/go.uber.org/atomic/error.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package atomic + +// Error is an atomic type-safe wrapper around Value for errors +type Error struct{ v Value } + +// errorHolder is non-nil holder for error object. +// atomic.Value panics on saving nil object, so err object needs to be +// wrapped with valid object first. +type errorHolder struct{ err error } + +// NewError creates new atomic error object +func NewError(err error) *Error { + e := &Error{} + if err != nil { + e.Store(err) + } + return e +} + +// Load atomically loads the wrapped error +func (e *Error) Load() error { + v := e.v.Load() + if v == nil { + return nil + } + + eh := v.(errorHolder) + return eh.err +} + +// Store atomically stores error. +// NOTE: a holder object is allocated on each Store call. +func (e *Error) Store(err error) { + e.v.Store(errorHolder{err: err}) +} diff --git a/vendor/golang.org/x/crypto/cast5/cast5.go b/vendor/golang.org/x/crypto/cast5/cast5.go new file mode 100644 index 00000000000..ddcbeb6f2ad --- /dev/null +++ b/vendor/golang.org/x/crypto/cast5/cast5.go @@ -0,0 +1,533 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package cast5 implements CAST5, as defined in RFC 2144. +// +// CAST5 is a legacy cipher and its short block size makes it vulnerable to +// birthday bound attacks (see https://sweet32.info). It should only be used +// where compatibility with legacy systems, not security, is the goal. +// +// Deprecated: any new system should use AES (from crypto/aes, if necessary in +// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from +// golang.org/x/crypto/chacha20poly1305). +package cast5 // import "golang.org/x/crypto/cast5" + +import "errors" + +const BlockSize = 8 +const KeySize = 16 + +type Cipher struct { + masking [16]uint32 + rotate [16]uint8 +} + +func NewCipher(key []byte) (c *Cipher, err error) { + if len(key) != KeySize { + return nil, errors.New("CAST5: keys must be 16 bytes") + } + + c = new(Cipher) + c.keySchedule(key) + return +} + +func (c *Cipher) BlockSize() int { + return BlockSize +} + +func (c *Cipher) Encrypt(dst, src []byte) { + l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3]) + r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7]) + + l, r = r, l^f1(r, c.masking[0], c.rotate[0]) + l, r = r, l^f2(r, c.masking[1], c.rotate[1]) + l, r = r, l^f3(r, c.masking[2], c.rotate[2]) + l, r = r, l^f1(r, c.masking[3], c.rotate[3]) + + l, r = r, l^f2(r, c.masking[4], c.rotate[4]) + l, r = r, l^f3(r, c.masking[5], c.rotate[5]) + l, r = r, l^f1(r, c.masking[6], c.rotate[6]) + l, r = r, l^f2(r, c.masking[7], c.rotate[7]) + + l, r = r, l^f3(r, c.masking[8], c.rotate[8]) + l, r = r, l^f1(r, c.masking[9], c.rotate[9]) + l, r = r, l^f2(r, c.masking[10], c.rotate[10]) + l, r = r, l^f3(r, c.masking[11], c.rotate[11]) + + l, r = r, l^f1(r, c.masking[12], c.rotate[12]) + l, r = r, l^f2(r, c.masking[13], c.rotate[13]) + l, r = r, l^f3(r, c.masking[14], c.rotate[14]) + l, r = r, l^f1(r, c.masking[15], c.rotate[15]) + + dst[0] = uint8(r >> 24) + dst[1] = uint8(r >> 16) + dst[2] = uint8(r >> 8) + dst[3] = uint8(r) + dst[4] = uint8(l >> 24) + dst[5] = uint8(l >> 16) + dst[6] = uint8(l >> 8) + dst[7] = uint8(l) +} + +func (c *Cipher) Decrypt(dst, src []byte) { + l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3]) + r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7]) + + l, r = r, l^f1(r, c.masking[15], c.rotate[15]) + l, r = r, l^f3(r, c.masking[14], c.rotate[14]) + l, r = r, l^f2(r, c.masking[13], c.rotate[13]) + l, r = r, l^f1(r, c.masking[12], c.rotate[12]) + + l, r = r, l^f3(r, c.masking[11], c.rotate[11]) + l, r = r, l^f2(r, c.masking[10], c.rotate[10]) + l, r = r, l^f1(r, c.masking[9], c.rotate[9]) + l, r = r, l^f3(r, c.masking[8], c.rotate[8]) + + l, r = r, l^f2(r, c.masking[7], c.rotate[7]) + l, r = r, l^f1(r, c.masking[6], c.rotate[6]) + l, r = r, l^f3(r, c.masking[5], c.rotate[5]) + l, r = r, l^f2(r, c.masking[4], c.rotate[4]) + + l, r = r, l^f1(r, c.masking[3], c.rotate[3]) + l, r = r, l^f3(r, c.masking[2], c.rotate[2]) + l, r = r, l^f2(r, c.masking[1], c.rotate[1]) + l, r = r, l^f1(r, c.masking[0], c.rotate[0]) + + dst[0] = uint8(r >> 24) + dst[1] = uint8(r >> 16) + dst[2] = uint8(r >> 8) + dst[3] = uint8(r) + dst[4] = uint8(l >> 24) + dst[5] = uint8(l >> 16) + dst[6] = uint8(l >> 8) + dst[7] = uint8(l) +} + +type keyScheduleA [4][7]uint8 +type keyScheduleB [4][5]uint8 + +// keyScheduleRound contains the magic values for a round of the key schedule. +// The keyScheduleA deals with the lines like: +// z0z1z2z3 = x0x1x2x3 ^ S5[xD] ^ S6[xF] ^ S7[xC] ^ S8[xE] ^ S7[x8] +// Conceptually, both x and z are in the same array, x first. The first +// element describes which word of this array gets written to and the +// second, which word gets read. So, for the line above, it's "4, 0", because +// it's writing to the first word of z, which, being after x, is word 4, and +// reading from the first word of x: word 0. +// +// Next are the indexes into the S-boxes. Now the array is treated as bytes. So +// "xD" is 0xd. The first byte of z is written as "16 + 0", just to be clear +// that it's z that we're indexing. +// +// keyScheduleB deals with lines like: +// K1 = S5[z8] ^ S6[z9] ^ S7[z7] ^ S8[z6] ^ S5[z2] +// "K1" is ignored because key words are always written in order. So the five +// elements are the S-box indexes. They use the same form as in keyScheduleA, +// above. + +type keyScheduleRound struct{} +type keySchedule []keyScheduleRound + +var schedule = []struct { + a keyScheduleA + b keyScheduleB +}{ + { + keyScheduleA{ + {4, 0, 0xd, 0xf, 0xc, 0xe, 0x8}, + {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa}, + {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9}, + {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb}, + }, + keyScheduleB{ + {16 + 8, 16 + 9, 16 + 7, 16 + 6, 16 + 2}, + {16 + 0xa, 16 + 0xb, 16 + 5, 16 + 4, 16 + 6}, + {16 + 0xc, 16 + 0xd, 16 + 3, 16 + 2, 16 + 9}, + {16 + 0xe, 16 + 0xf, 16 + 1, 16 + 0, 16 + 0xc}, + }, + }, + { + keyScheduleA{ + {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0}, + {1, 4, 0, 2, 1, 3, 16 + 2}, + {2, 5, 7, 6, 5, 4, 16 + 1}, + {3, 7, 0xa, 9, 0xb, 8, 16 + 3}, + }, + keyScheduleB{ + {3, 2, 0xc, 0xd, 8}, + {1, 0, 0xe, 0xf, 0xd}, + {7, 6, 8, 9, 3}, + {5, 4, 0xa, 0xb, 7}, + }, + }, + { + keyScheduleA{ + {4, 0, 0xd, 0xf, 0xc, 0xe, 8}, + {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa}, + {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9}, + {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb}, + }, + keyScheduleB{ + {16 + 3, 16 + 2, 16 + 0xc, 16 + 0xd, 16 + 9}, + {16 + 1, 16 + 0, 16 + 0xe, 16 + 0xf, 16 + 0xc}, + {16 + 7, 16 + 6, 16 + 8, 16 + 9, 16 + 2}, + {16 + 5, 16 + 4, 16 + 0xa, 16 + 0xb, 16 + 6}, + }, + }, + { + keyScheduleA{ + {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0}, + {1, 4, 0, 2, 1, 3, 16 + 2}, + {2, 5, 7, 6, 5, 4, 16 + 1}, + {3, 7, 0xa, 9, 0xb, 8, 16 + 3}, + }, + keyScheduleB{ + {8, 9, 7, 6, 3}, + {0xa, 0xb, 5, 4, 7}, + {0xc, 0xd, 3, 2, 8}, + {0xe, 0xf, 1, 0, 0xd}, + }, + }, +} + +func (c *Cipher) keySchedule(in []byte) { + var t [8]uint32 + var k [32]uint32 + + for i := 0; i < 4; i++ { + j := i * 4 + t[i] = uint32(in[j])<<24 | uint32(in[j+1])<<16 | uint32(in[j+2])<<8 | uint32(in[j+3]) + } + + x := []byte{6, 7, 4, 5} + ki := 0 + + for half := 0; half < 2; half++ { + for _, round := range schedule { + for j := 0; j < 4; j++ { + var a [7]uint8 + copy(a[:], round.a[j][:]) + w := t[a[1]] + w ^= sBox[4][(t[a[2]>>2]>>(24-8*(a[2]&3)))&0xff] + w ^= sBox[5][(t[a[3]>>2]>>(24-8*(a[3]&3)))&0xff] + w ^= sBox[6][(t[a[4]>>2]>>(24-8*(a[4]&3)))&0xff] + w ^= sBox[7][(t[a[5]>>2]>>(24-8*(a[5]&3)))&0xff] + w ^= sBox[x[j]][(t[a[6]>>2]>>(24-8*(a[6]&3)))&0xff] + t[a[0]] = w + } + + for j := 0; j < 4; j++ { + var b [5]uint8 + copy(b[:], round.b[j][:]) + w := sBox[4][(t[b[0]>>2]>>(24-8*(b[0]&3)))&0xff] + w ^= sBox[5][(t[b[1]>>2]>>(24-8*(b[1]&3)))&0xff] + w ^= sBox[6][(t[b[2]>>2]>>(24-8*(b[2]&3)))&0xff] + w ^= sBox[7][(t[b[3]>>2]>>(24-8*(b[3]&3)))&0xff] + w ^= sBox[4+j][(t[b[4]>>2]>>(24-8*(b[4]&3)))&0xff] + k[ki] = w + ki++ + } + } + } + + for i := 0; i < 16; i++ { + c.masking[i] = k[i] + c.rotate[i] = uint8(k[16+i] & 0x1f) + } +} + +// These are the three 'f' functions. See RFC 2144, section 2.2. +func f1(d, m uint32, r uint8) uint32 { + t := m + d + I := (t << r) | (t >> (32 - r)) + return ((sBox[0][I>>24] ^ sBox[1][(I>>16)&0xff]) - sBox[2][(I>>8)&0xff]) + sBox[3][I&0xff] +} + +func f2(d, m uint32, r uint8) uint32 { + t := m ^ d + I := (t << r) | (t >> (32 - r)) + return ((sBox[0][I>>24] - sBox[1][(I>>16)&0xff]) + sBox[2][(I>>8)&0xff]) ^ sBox[3][I&0xff] +} + +func f3(d, m uint32, r uint8) uint32 { + t := m - d + I := (t << r) | (t >> (32 - r)) + return ((sBox[0][I>>24] + sBox[1][(I>>16)&0xff]) ^ sBox[2][(I>>8)&0xff]) - sBox[3][I&0xff] +} + +var sBox = [8][256]uint32{ + { + 0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, 0x6003e540, 0xcf9fc949, + 0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, 0x15c361d2, 0xc2e7661d, 0x22d4ff8e, + 0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d, + 0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, 0xaa54166b, 0x22568e3a, 0xa2d341d0, + 0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, 0x4a97c1d8, 0x527644b7, 0xb5f437a7, + 0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, 0x90ecf52e, 0x22b0c054, 0xbc8e5935, + 0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, 0xe93b159f, 0xb48ee411, 0x4bff345d, + 0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50, + 0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, 0xc59c5319, 0xb949e354, 0xb04669fe, + 0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, 0x6a390493, 0xe63d37e0, 0x2a54f6b3, + 0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, 0xf61b1891, 0xbb72275e, 0xaa508167, + 0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, 0xa2d1936b, 0x2ad286af, 0xaa56d291, + 0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, 0x73e2bb14, 0xa0bebc3c, 0x54623779, + 0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, 0x89fe78e6, 0x3fab0950, 0x325ff6c2, + 0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, 0x380782d5, 0xc7fa5cf6, 0x8ac31511, + 0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, 0x051ef495, 0xaa573b04, 0x4a805d8d, + 0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, 0x50afd341, 0xa7c13275, 0x915a0bf5, + 0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, 0xab85c5f3, 0x1b55db94, 0xaad4e324, + 0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c, + 0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, 0x22513f1e, 0xaa51a79b, 0x2ad344cc, + 0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, 0x032268d4, 0xc9600acc, 0xce387e6d, + 0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, 0x4736f464, 0x5ad328d8, 0xb347cc96, + 0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, 0xbfc5fe4a, 0xa70aec10, 0xac39570a, + 0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, 0x1cacd68d, 0x2ad37c96, 0x0175cb9d, + 0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd, + 0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, 0x51c85f4d, 0x56907596, 0xa5bb15e6, + 0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, 0x3526ffa0, 0xc37b4d09, 0xbc306ed9, + 0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, 0x700b45e1, 0xd5ea50f1, 0x85a92872, + 0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, 0x0cd0ede7, 0x26470db8, 0xf881814c, + 0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, 0xab838653, 0x6e2f1e23, 0x83719c9e, + 0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, 0xe1e696ff, 0xb141ab08, 0x7cca89b9, + 0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf, + }, + { + 0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, 0xeec5207a, 0x55889c94, 0x72fc0651, + 0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3, + 0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, 0xef944459, 0xba83ccb3, 0xe0c3cdfb, + 0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, 0xe4e7ef5b, 0x25a1ff41, 0xe180f806, + 0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, 0x77e83f4e, 0x79929269, 0x24fa9f7b, + 0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, 0x0d554b63, 0x5d681121, 0xc866c359, + 0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, 0x39f7627f, 0x361e3084, 0xe4eb573b, + 0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, 0x99847ab4, 0xa0e3df79, 0xba6cf38c, + 0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, 0x8f458c74, 0xd9e0a227, 0x4ec73a34, + 0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, 0x1d804366, 0x721d9bfd, 0xa58684bb, + 0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, 0x27e19ba5, 0xd5a6c252, 0xe49754bd, + 0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, 0xe0b56714, 0x21f043b7, 0xe5d05860, + 0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, 0x68561be6, 0x83ca6b94, 0x2d6ed23b, + 0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, 0x397bc8d6, 0x5ee22b95, 0x5f0e5304, + 0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, 0xb96726d1, 0x8049a7e8, 0x22b7da7b, + 0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf, + 0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, 0xe3214517, 0xb4542835, 0x9f63293c, + 0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, 0x30a22c95, 0x31a70850, 0x60930f13, + 0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, 0xa02b1741, 0x7cbad9a2, 0x2180036f, + 0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6, + 0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, 0x846a3bae, 0x8ff77888, 0xee5d60f6, + 0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, 0x157fd7fa, 0xef8579cc, 0xd152de58, + 0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906, + 0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, 0xbec0c560, 0x61a3c9e8, 0xbca8f54d, + 0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, 0x301e16e6, 0x273be979, 0xb0ffeaa6, + 0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, 0xf7e19798, 0x7619b72f, 0x8f1c9ba4, + 0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, 0x1a513742, 0xef6828bc, 0x520365d6, + 0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, 0x5eea29cb, 0x145892f5, 0x91584f7f, + 0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249, + 0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, 0x230eabb0, 0x6438bc87, 0xf0b5b1fa, + 0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, 0xa345415e, 0x5c038323, 0x3e5d3bb9, + 0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, 0x73bfbe70, 0x83877605, 0x4523ecf1, + }, + { + 0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, 0x369fe44b, 0x8c1fc644, 0xaececa90, + 0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, 0xf0ad0548, 0xe13c8d83, 0x927010d5, + 0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, 0xfade82e0, 0xa067268b, 0x8272792e, + 0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, 0x825b1bfd, 0x9255c5ed, 0x1257a240, + 0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5, + 0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b, + 0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, 0x4a012d6e, 0xc5884a28, 0xccc36f71, + 0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, 0xd7c07f7e, 0x02507fbf, 0x5afb9a04, + 0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, 0x727cc3c4, 0x0a0fb402, 0x0f7fef82, + 0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, 0x1eac5790, 0x796fb449, 0x8252dc15, + 0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, 0xe83ec305, 0x4f91751a, 0x925669c2, + 0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, 0x927985b2, 0x8276dbcb, 0x02778176, + 0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, 0x340ce5c8, 0x96bbb682, 0x93b4b148, + 0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, 0x8437aa88, 0x7d29dc96, 0x2756d3dc, + 0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, 0x3cf8209d, 0x6094d1e3, 0xcd9ca341, + 0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, 0xbda8229c, 0x127dadaa, 0x438a074e, + 0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51, + 0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, 0x76a2e214, 0xb9a40368, 0x925d958f, + 0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, 0x193cbcfa, 0x27627545, 0x825cf47a, + 0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, 0x8272a972, 0x9270c4a8, 0x127de50b, + 0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b, + 0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, 0x236a5cae, 0x12deca4d, 0x2c3f8cc5, + 0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45, + 0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, 0x7c34671c, 0x02717ef6, 0x4feb5536, + 0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, 0x006e1888, 0xa2e53f55, 0xb9e6d4bc, + 0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, 0xabcc4f33, 0x7688c55d, 0x7b00a6b0, + 0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, 0x856302e0, 0x72dbd92b, 0xee971b69, + 0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, 0x61efc8c2, 0xf1ac2571, 0xcc8239c2, + 0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, 0x0ff0443d, 0x606e6dc6, 0x60543a49, + 0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, 0x68458425, 0x99833be5, 0x600d457d, + 0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, 0x9c305a00, 0x52bce688, 0x1b03588a, + 0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, 0xa133c501, 0xe9d3531c, 0xee353783, + }, + { + 0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, 0x64ad8c57, 0x85510443, 0xfa020ed1, + 0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, 0x6497b7b1, 0xf3641f63, 0x241e4adf, + 0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, 0xc0a5374f, 0x1d2d00d9, 0x24147b15, + 0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, 0x0c13fefe, 0x081b08ca, 0x05170121, + 0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, 0x06df4261, 0xbb9e9b8a, 0x7293ea25, + 0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5, + 0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, 0x11b638e1, 0x72500e03, 0xf80eb2bb, + 0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, 0x6920318f, 0x081dbb99, 0xffc304a5, + 0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, 0x9f926f91, 0x9f46222f, 0x3991467d, + 0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, 0x3fb6180c, 0x18f8931e, 0x281658e6, + 0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, 0x79098b02, 0xe4eabb81, 0x28123b23, + 0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, 0x0014377b, 0x041e8ac8, 0x09114003, + 0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6, + 0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, 0x56c8c391, 0x6b65811c, 0x5e146119, + 0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24, + 0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, 0xeca1d7c7, 0x041afa32, 0x1d16625a, + 0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, 0xc70b8b46, 0xd9e66a48, 0x56e55a79, + 0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, 0xedda04eb, 0x17a9be04, 0x2c18f4df, + 0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, 0xe5b6a035, 0x213d42f6, 0x2c1c7c26, + 0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, 0x0418f2c8, 0x001a96a6, 0x0d1526ab, + 0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, 0x311170a7, 0x3e9b640c, 0xcc3e10d7, + 0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, 0x1f9af36e, 0xcfcbd12f, 0xc1de8417, + 0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, 0xb4be31cd, 0xd8782806, 0x12a3a4e2, + 0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, 0x9711aac5, 0x001d7b95, 0x82e5e7d2, + 0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a, + 0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, 0x0ce454a9, 0xd60acd86, 0x015f1919, + 0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, 0x8b75e387, 0xb3c50651, 0xb8a5c3ef, + 0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876, + 0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, 0x296b299e, 0x492fc295, 0x9266beab, + 0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, 0xf65324e6, 0x6afce36c, 0x0316cc04, + 0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, 0x932bcdf6, 0xb657c34d, 0x4edfd282, + 0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2, + }, + { + 0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, 0x1dd358f5, 0x44dd9d44, 0x1731167f, + 0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, 0x386381cb, 0xacf6243a, 0x69befd7a, + 0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, 0x15b0a848, 0xe68b18cb, 0x4caadeff, + 0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, 0x248eb6fb, 0x8dba1cfe, 0x41a99b02, + 0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, 0x97a5980a, 0xc539b9aa, 0x4d79fe6a, + 0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, 0x8709e6b0, 0xd7e07156, 0x4e29fea7, + 0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, 0x578535f2, 0x2261be02, 0xd642a0c9, + 0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, 0xc8adedb3, 0x28a87fc9, 0x3d959981, + 0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, 0x4fb96976, 0x90c79505, 0xb0a8a774, + 0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, 0x0ec50966, 0xdfdd55bc, 0x29de0655, + 0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, 0x524755f4, 0x03b63cc9, 0x0cc844b2, + 0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, 0x64ee2d7e, 0xcddbb1da, 0x01c94910, + 0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, 0x50f5b616, 0xf24766e3, 0x8eca36c1, + 0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, 0x3063fcdf, 0xb6f589de, 0xec2941da, + 0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, 0xc1bacb7f, 0xe5ff550f, 0xb6083049, + 0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, 0x9e0885f9, 0x68cb3e47, 0x086c010f, + 0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, 0xcbb3d550, 0x1793084d, 0xb0d70eba, + 0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, 0x0f5755d1, 0xe0e1e56e, 0x6184b5be, + 0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, 0x05687715, 0x646c6bd7, 0x44904db3, + 0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, 0x2cb6356a, 0x85808573, 0x4991f840, + 0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, 0xc1092910, 0x8bc95fc6, 0x7d869cf4, + 0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, 0x7d161bba, 0x9cad9010, 0xaf462ba2, + 0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, 0x176d486f, 0x097c13ea, 0x631da5c7, + 0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, 0x6e5dd2f3, 0x20936079, 0x459b80a5, + 0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, 0xf6721b2c, 0x1ad2fff3, 0x8c25404e, + 0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, 0x75922283, 0x784d6b17, 0x58ebb16e, + 0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, 0xaaf47556, 0x5f46b02a, 0x2b092801, + 0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, 0x95055110, 0x1b5ad7a8, 0xf61ed5ad, + 0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0, + 0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, 0x17e3fe2a, 0x24b79767, 0xf5a96b20, + 0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, 0xeeb9491d, 0x34010718, 0xbb30cab8, + 0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, 0xb1534546, 0x6d47de08, 0xefe9e7d4, + }, + { + 0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, 0x016843b4, 0xeced5cbc, 0x325553ac, + 0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, 0xde5ebe39, 0xf38ff732, 0x8989b138, + 0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, 0x4e23e33c, 0x79cbd7cc, 0x48a14367, + 0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, 0x09a8486f, 0xa888614a, 0x2900af98, + 0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, 0xcf0fec14, 0xf7ca07d2, 0xd0a82072, + 0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, 0x4c7f4448, 0xdab5d440, 0x6dba0ec3, + 0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, 0x64bdb941, 0x2c0e636a, 0xba7dd9cd, + 0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, 0xb88153e2, 0x08a19866, 0x1ae2eac8, + 0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, 0x9aea3906, 0xefe8c36e, 0xf890cdd9, + 0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, 0x221db3a6, 0x9a69a02f, 0x68818a54, + 0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, 0xcf222ebf, 0x25ac6f48, 0xa9a99387, + 0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, 0xe8a11be9, 0x4980740d, 0xc8087dfc, + 0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, 0x9528cd89, 0xfd339fed, 0xb87834bf, + 0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, 0x57f55ec5, 0xe2220abe, 0xd2916ebf, + 0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, 0xa8dc8af0, 0x7345c106, 0xf41e232f, + 0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, 0x692573e4, 0xe9a9d848, 0xf3160289, + 0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, 0x4576698d, 0xb6fad407, 0x592af950, + 0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, 0xc50dfe5d, 0xfcd707ab, 0x0921c42f, + 0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, 0x48b9d585, 0xdc049441, 0xc8098f9b, + 0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, 0x890072d6, 0x28207682, 0xa9a9f7be, + 0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, 0x1f8fb214, 0xd372cf08, 0xcc3c4a13, + 0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, 0xb6c85283, 0x3cc2acfb, 0x3fc06976, + 0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, 0x513021a5, 0x6c5b68b7, 0x822f8aa0, + 0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, 0x0c5ec241, 0x8809286c, 0xf592d891, + 0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, 0xb173ecc0, 0xbc60b42a, 0x953498da, + 0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, 0x257f0c3d, 0x9348af49, 0x361400bc, + 0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, 0xda41e7f9, 0xc25ad33a, 0x54f4a084, + 0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, 0xb6f6deaf, 0x3a479c3a, 0x5302da25, + 0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, 0x44136c76, 0x0404a8c8, 0xb8e5a121, + 0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5, + 0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, 0xf544edeb, 0xb0e93524, 0xbebb8fbd, + 0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, 0xa65b1db8, 0x851c97bd, 0xd675cf2f, + }, + { + 0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, 0xab9bc912, 0xde6008a1, 0x2028da1f, + 0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, 0xb232e75c, 0x4b3695f2, 0xb28707de, + 0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43, + 0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, 0xbaeeadf4, 0x1286becf, 0xb6eacb19, + 0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, 0x28136086, 0x0bd8dfa8, 0x356d1cf2, + 0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, 0xeb12ff82, 0xe3486911, 0xd34d7516, + 0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88, + 0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, 0x4437f107, 0xb6e79962, 0x42d2d816, + 0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, 0xf9583745, 0xcf19df58, 0xbec3f756, + 0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, 0x38bc46e9, 0xc6e6fa14, 0xbae8584a, + 0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, 0xaff60ff4, 0xea2c4e6d, 0x16e39264, + 0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, 0xb2856e6e, 0x1aec3ca9, 0xbe838688, + 0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, 0x61fe033c, 0x16746233, 0x3c034c28, + 0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, 0x1626a49f, 0xeed82b29, 0x1d382fe3, + 0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, 0xd45230c7, 0x2bd1408b, 0x60c03eb7, + 0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06, + 0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033, + 0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, 0x79d34217, 0x021a718d, 0x9ac6336a, + 0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, 0x4eeb8476, 0x488dcf25, 0x36c9d566, + 0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509, + 0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, 0x2b9f4fd5, 0x625aba82, 0x6a017962, + 0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, 0xe32dbf9a, 0x058745b9, 0x3453dc1e, + 0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, 0x19de7eae, 0x053e561a, 0x15ad6f8c, + 0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, 0x58d4f2ae, 0x9ea294fb, 0x52cf564c, + 0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, 0xa1e7160e, 0xe4f2dfa6, 0x693ed285, + 0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, 0x3d321c5d, 0xc3f5e194, 0x4b269301, + 0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, 0x296693f4, 0x3d1fce6f, 0xc61e45be, + 0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, 0xb5229301, 0xcfd2a87f, 0x60aeb767, + 0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, 0x589dd390, 0x5479f8e6, 0x1cb8d647, + 0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, 0x462e1b78, 0x6580f87e, 0xf3817914, + 0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, 0x3d40f021, 0xc3c0bdae, 0x4958c24c, + 0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, 0x94e01be8, 0x90716f4b, 0x954b8aa3, + }, + { + 0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, 0xe6c1121b, 0x0e241600, 0x052ce8b5, + 0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, 0x76e38111, 0xb12def3a, 0x37ddddfc, + 0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, 0xb4d137cf, 0xb44e79f0, 0x049eedfd, + 0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, 0x3f8f95e7, 0x72df191b, 0x7580330d, + 0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, 0x02e7d1ca, 0x53571dae, 0x7a3182a2, + 0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, 0xce949ad4, 0xb84769ad, 0x965bd862, + 0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, 0xc28ec4b8, 0x57e8726e, 0x647a78fc, + 0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, 0xae63aff2, 0x7e8bd632, 0x70108c0c, + 0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, 0x06918548, 0x58cb7e07, 0x3b74ef2e, + 0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, 0x19b47a38, 0x424f7618, 0x35856039, + 0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, 0xc18910b1, 0xe11dbf7b, 0x06cd1af8, + 0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, 0x3dd00db3, 0x708f8f34, 0x77d51b42, + 0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, 0x3e378160, 0x7895cda5, 0x859c15a5, + 0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, 0x31842e7b, 0x24259fd7, 0xf8bef472, + 0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, 0xe2506d3d, 0x4f9b12ea, 0xf215f225, + 0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, 0xea7a6e98, 0x7cd16efc, 0x1436876c, + 0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, 0x92ecbae6, 0xdd67016d, 0x151682eb, + 0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, 0xe139673b, 0xefa63fb8, 0x71873054, + 0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, 0x844a1be5, 0xbae7dfdc, 0x42cbda70, + 0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, 0x79d130a4, 0x3486ebfb, 0x33d3cddc, + 0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, 0xc5c8b37e, 0x0d809ea2, 0x398feb7c, + 0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, 0x37df932b, 0xc4248289, 0xacf3ebc3, + 0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, 0x5e410fab, 0xb48a2465, 0x2eda7fa4, + 0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, 0xdb485694, 0x38d7e5b2, 0x57720101, + 0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, 0x7523d24a, 0xe0779695, 0xf9c17a8f, + 0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, 0xad1163ed, 0xea7b5965, 0x1a00726e, + 0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, 0x9eedc364, 0x22ebe6a8, 0xcee7d28a, + 0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, 0x8951570f, 0xdf09822b, 0xbd691a6c, + 0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, 0x0d771c2b, 0x67cdb156, 0x350d8384, + 0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, 0x8360d87b, 0x1fa98b0c, 0x1149382c, + 0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82, + 0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e, + }, +} diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go index 87f1e369cc2..b799e440b4a 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.11 -// +build !gccgo,!appengine +// +build go1.11,!gccgo,!purego package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s index b3a16ef751a..891481539a1 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s +++ b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.11 -// +build !gccgo,!appengine +// +build go1.11,!gccgo,!purego #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_generic.go b/vendor/golang.org/x/crypto/chacha20/chacha_generic.go index 098ec9f6be0..a2ecf5c325b 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_generic.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_generic.go @@ -42,10 +42,14 @@ type Cipher struct { // The last len bytes of buf are leftover key stream bytes from the previous // XORKeyStream invocation. The size of buf depends on how many blocks are - // computed at a time. + // computed at a time by xorKeyStreamBlocks. buf [bufSize]byte len int + // overflow is set when the counter overflowed, no more blocks can be + // generated, and the next XORKeyStream call should panic. + overflow bool + // The counter-independent results of the first round are cached after they // are computed the first time. precompDone bool @@ -89,6 +93,7 @@ func newUnauthenticatedCipher(c *Cipher, key, nonce []byte) (*Cipher, error) { return nil, errors.New("chacha20: wrong nonce size") } + key, nonce = key[:KeySize], nonce[:NonceSize] // bounds check elimination hint c.key = [8]uint32{ binary.LittleEndian.Uint32(key[0:4]), binary.LittleEndian.Uint32(key[4:8]), @@ -136,6 +141,36 @@ func quarterRound(a, b, c, d uint32) (uint32, uint32, uint32, uint32) { return a, b, c, d } +// SetCounter sets the Cipher counter. The next invocation of XORKeyStream will +// behave as if (64 * counter) bytes had been encrypted so far. +// +// To prevent accidental counter reuse, SetCounter panics if counter is less +// than the current value. +// +// Note that the execution time of XORKeyStream is not independent of the +// counter value. +func (s *Cipher) SetCounter(counter uint32) { + // Internally, s may buffer multiple blocks, which complicates this + // implementation slightly. When checking whether the counter has rolled + // back, we must use both s.counter and s.len to determine how many blocks + // we have already output. + outputCounter := s.counter - uint32(s.len)/blockSize + if s.overflow || counter < outputCounter { + panic("chacha20: SetCounter attempted to rollback counter") + } + + // In the general case, we set the new counter value and reset s.len to 0, + // causing the next call to XORKeyStream to refill the buffer. However, if + // we're advancing within the existing buffer, we can save work by simply + // setting s.len. + if counter < s.counter { + s.len = int(s.counter-counter) * blockSize + } else { + s.counter = counter + s.len = 0 + } +} + // XORKeyStream XORs each byte in the given slice with a byte from the // cipher's key stream. Dst and src must overlap entirely or not at all. // @@ -169,34 +204,52 @@ func (s *Cipher) XORKeyStream(dst, src []byte) { dst[i] = src[i] ^ b } s.len -= len(keyStream) - src = src[len(keyStream):] - dst = dst[len(keyStream):] + dst, src = dst[len(keyStream):], src[len(keyStream):] + } + if len(src) == 0 { + return } - const blocksPerBuf = bufSize / blockSize - numBufs := (uint64(len(src)) + bufSize - 1) / bufSize - if uint64(s.counter)+numBufs*blocksPerBuf >= 1<<32 { + // If we'd need to let the counter overflow and keep generating output, + // panic immediately. If instead we'd only reach the last block, remember + // not to generate any more output after the buffer is drained. + numBlocks := (uint64(len(src)) + blockSize - 1) / blockSize + if s.overflow || uint64(s.counter)+numBlocks > 1<<32 { panic("chacha20: counter overflow") + } else if uint64(s.counter)+numBlocks == 1<<32 { + s.overflow = true } // xorKeyStreamBlocks implementations expect input lengths that are a // multiple of bufSize. Platform-specific ones process multiple blocks at a // time, so have bufSizes that are a multiple of blockSize. - rem := len(src) % bufSize - full := len(src) - rem - + full := len(src) - len(src)%bufSize if full > 0 { s.xorKeyStreamBlocks(dst[:full], src[:full]) } + dst, src = dst[full:], src[full:] + + // If using a multi-block xorKeyStreamBlocks would overflow, use the generic + // one that does one block at a time. + const blocksPerBuf = bufSize / blockSize + if uint64(s.counter)+blocksPerBuf > 1<<32 { + s.buf = [bufSize]byte{} + numBlocks := (len(src) + blockSize - 1) / blockSize + buf := s.buf[bufSize-numBlocks*blockSize:] + copy(buf, src) + s.xorKeyStreamBlocksGeneric(buf, buf) + s.len = len(buf) - copy(dst, buf) + return + } // If we have a partial (multi-)block, pad it for xorKeyStreamBlocks, and // keep the leftover keystream for the next XORKeyStream invocation. - if rem > 0 { + if len(src) > 0 { s.buf = [bufSize]byte{} - copy(s.buf[:], src[full:]) + copy(s.buf[:], src) s.xorKeyStreamBlocks(s.buf[:], s.buf[:]) - s.len = bufSize - copy(dst[full:], s.buf[:]) + s.len = bufSize - copy(dst, s.buf[:]) } } @@ -233,7 +286,9 @@ func (s *Cipher) xorKeyStreamBlocksGeneric(dst, src []byte) { s.precompDone = true } - for i := 0; i < len(src); i += blockSize { + // A condition of len(src) > 0 would be sufficient, but this also + // acts as a bounds check elimination hint. + for len(src) >= 64 && len(dst) >= 64 { // The remainder of the first column round. fcr0, fcr4, fcr8, fcr12 := quarterRound(c0, c4, c8, s.counter) @@ -258,49 +313,28 @@ func (s *Cipher) xorKeyStreamBlocksGeneric(dst, src []byte) { x3, x4, x9, x14 = quarterRound(x3, x4, x9, x14) } - // Finally, add back the initial state to generate the key stream. - x0 += c0 - x1 += c1 - x2 += c2 - x3 += c3 - x4 += c4 - x5 += c5 - x6 += c6 - x7 += c7 - x8 += c8 - x9 += c9 - x10 += c10 - x11 += c11 - x12 += s.counter - x13 += c13 - x14 += c14 - x15 += c15 + // Add back the initial state to generate the key stream, then + // XOR the key stream with the source and write out the result. + addXor(dst[0:4], src[0:4], x0, c0) + addXor(dst[4:8], src[4:8], x1, c1) + addXor(dst[8:12], src[8:12], x2, c2) + addXor(dst[12:16], src[12:16], x3, c3) + addXor(dst[16:20], src[16:20], x4, c4) + addXor(dst[20:24], src[20:24], x5, c5) + addXor(dst[24:28], src[24:28], x6, c6) + addXor(dst[28:32], src[28:32], x7, c7) + addXor(dst[32:36], src[32:36], x8, c8) + addXor(dst[36:40], src[36:40], x9, c9) + addXor(dst[40:44], src[40:44], x10, c10) + addXor(dst[44:48], src[44:48], x11, c11) + addXor(dst[48:52], src[48:52], x12, s.counter) + addXor(dst[52:56], src[52:56], x13, c13) + addXor(dst[56:60], src[56:60], x14, c14) + addXor(dst[60:64], src[60:64], x15, c15) s.counter += 1 - if s.counter == 0 { - panic("chacha20: internal error: counter overflow") - } - in, out := src[i:], dst[i:] - in, out = in[:blockSize], out[:blockSize] // bounds check elimination hint - - // XOR the key stream with the source and write out the result. - xor(out[0:], in[0:], x0) - xor(out[4:], in[4:], x1) - xor(out[8:], in[8:], x2) - xor(out[12:], in[12:], x3) - xor(out[16:], in[16:], x4) - xor(out[20:], in[20:], x5) - xor(out[24:], in[24:], x6) - xor(out[28:], in[28:], x7) - xor(out[32:], in[32:], x8) - xor(out[36:], in[36:], x9) - xor(out[40:], in[40:], x10) - xor(out[44:], in[44:], x11) - xor(out[48:], in[48:], x12) - xor(out[52:], in[52:], x13) - xor(out[56:], in[56:], x14) - xor(out[60:], in[60:], x15) + src, dst = src[blockSize:], dst[blockSize:] } } diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go index ec609ed868b..4635307b8f2 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !arm64,!s390x,!ppc64le arm64,!go1.11 gccgo appengine +// +build !arm64,!s390x,!ppc64le arm64,!go1.11 gccgo purego package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go index d0ec61f08d9..b7993303415 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !gccgo,!appengine +// +build !gccgo,!purego package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s index 533014ea3e8..23c60216430 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s +++ b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s @@ -19,7 +19,7 @@ // The differences in this and the original implementation are // due to the calling conventions and initialization of constants. -// +build !gccgo,!appengine +// +build !gccgo,!purego #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_s390x.go b/vendor/golang.org/x/crypto/chacha20/chacha_s390x.go index cd55f45a333..a9244bdf4db 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_s390x.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_s390x.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !gccgo,!appengine +// +build !gccgo,!purego package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_s390x.s b/vendor/golang.org/x/crypto/chacha20/chacha_s390x.s index de52a2ea8d1..89c658c410b 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_s390x.s +++ b/vendor/golang.org/x/crypto/chacha20/chacha_s390x.s @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !gccgo,!appengine +// +build !gccgo,!purego #include "go_asm.h" #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/chacha20/xor.go b/vendor/golang.org/x/crypto/chacha20/xor.go index 0110c9865af..c2d04851e0d 100644 --- a/vendor/golang.org/x/crypto/chacha20/xor.go +++ b/vendor/golang.org/x/crypto/chacha20/xor.go @@ -13,10 +13,10 @@ const unaligned = runtime.GOARCH == "386" || runtime.GOARCH == "ppc64le" || runtime.GOARCH == "s390x" -// xor reads a little endian uint32 from src, XORs it with u and +// addXor reads a little endian uint32 from src, XORs it with (a + b) and // places the result in little endian byte order in dst. -func xor(dst, src []byte, u uint32) { - _, _ = src[3], dst[3] // eliminate bounds checks +func addXor(dst, src []byte, a, b uint32) { + _, _ = src[3], dst[3] // bounds check elimination hint if unaligned { // The compiler should optimize this code into // 32-bit unaligned little endian loads and stores. @@ -27,15 +27,16 @@ func xor(dst, src []byte, u uint32) { v |= uint32(src[1]) << 8 v |= uint32(src[2]) << 16 v |= uint32(src[3]) << 24 - v ^= u + v ^= a + b dst[0] = byte(v) dst[1] = byte(v >> 8) dst[2] = byte(v >> 16) dst[3] = byte(v >> 24) } else { - dst[0] = src[0] ^ byte(u) - dst[1] = src[1] ^ byte(u>>8) - dst[2] = src[2] ^ byte(u>>16) - dst[3] = src[3] ^ byte(u>>24) + a += b + dst[0] = src[0] ^ byte(a) + dst[1] = src[1] ^ byte(a>>8) + dst[2] = src[2] ^ byte(a>>16) + dst[3] = src[3] ^ byte(a>>24) } } diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1.go index f930f7e5266..d3596ee66fd 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/asn1.go +++ b/vendor/golang.org/x/crypto/cryptobyte/asn1.go @@ -81,7 +81,7 @@ func (b *Builder) AddASN1BigInt(n *big.Int) { for i := range bytes { bytes[i] ^= 0xff } - if bytes[0]&0x80 == 0 { + if len(bytes) == 0 || bytes[0]&0x80 == 0 { c.add(0xff) } c.add(bytes...) @@ -230,12 +230,12 @@ func (b *Builder) AddASN1(tag asn1.Tag, f BuilderContinuation) { // String -// ReadASN1Boolean decodes an ASN.1 INTEGER and converts it to a boolean +// ReadASN1Boolean decodes an ASN.1 BOOLEAN and converts it to a boolean // representation into out and advances. It reports whether the read // was successful. func (s *String) ReadASN1Boolean(out *bool) bool { var bytes String - if !s.ReadASN1(&bytes, asn1.INTEGER) || len(bytes) != 1 { + if !s.ReadASN1(&bytes, asn1.BOOLEAN) || len(bytes) != 1 { return false } diff --git a/vendor/golang.org/x/crypto/openpgp/armor/armor.go b/vendor/golang.org/x/crypto/openpgp/armor/armor.go new file mode 100644 index 00000000000..36a6804364c --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/armor/armor.go @@ -0,0 +1,224 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is +// very similar to PEM except that it has an additional CRC checksum. +package armor // import "golang.org/x/crypto/openpgp/armor" + +import ( + "bufio" + "bytes" + "encoding/base64" + "golang.org/x/crypto/openpgp/errors" + "io" +) + +// A Block represents an OpenPGP armored structure. +// +// The encoded form is: +// -----BEGIN Type----- +// Headers +// +// base64-encoded Bytes +// '=' base64 encoded checksum +// -----END Type----- +// where Headers is a possibly empty sequence of Key: Value lines. +// +// Since the armored data can be very large, this package presents a streaming +// interface. +type Block struct { + Type string // The type, taken from the preamble (i.e. "PGP SIGNATURE"). + Header map[string]string // Optional headers. + Body io.Reader // A Reader from which the contents can be read + lReader lineReader + oReader openpgpReader +} + +var ArmorCorrupt error = errors.StructuralError("armor invalid") + +const crc24Init = 0xb704ce +const crc24Poly = 0x1864cfb +const crc24Mask = 0xffffff + +// crc24 calculates the OpenPGP checksum as specified in RFC 4880, section 6.1 +func crc24(crc uint32, d []byte) uint32 { + for _, b := range d { + crc ^= uint32(b) << 16 + for i := 0; i < 8; i++ { + crc <<= 1 + if crc&0x1000000 != 0 { + crc ^= crc24Poly + } + } + } + return crc +} + +var armorStart = []byte("-----BEGIN ") +var armorEnd = []byte("-----END ") +var armorEndOfLine = []byte("-----") + +// lineReader wraps a line based reader. It watches for the end of an armor +// block and records the expected CRC value. +type lineReader struct { + in *bufio.Reader + buf []byte + eof bool + crc uint32 + crcSet bool +} + +func (l *lineReader) Read(p []byte) (n int, err error) { + if l.eof { + return 0, io.EOF + } + + if len(l.buf) > 0 { + n = copy(p, l.buf) + l.buf = l.buf[n:] + return + } + + line, isPrefix, err := l.in.ReadLine() + if err != nil { + return + } + if isPrefix { + return 0, ArmorCorrupt + } + + if bytes.HasPrefix(line, armorEnd) { + l.eof = true + return 0, io.EOF + } + + if len(line) == 5 && line[0] == '=' { + // This is the checksum line + var expectedBytes [3]byte + var m int + m, err = base64.StdEncoding.Decode(expectedBytes[0:], line[1:]) + if m != 3 || err != nil { + return + } + l.crc = uint32(expectedBytes[0])<<16 | + uint32(expectedBytes[1])<<8 | + uint32(expectedBytes[2]) + + line, _, err = l.in.ReadLine() + if err != nil && err != io.EOF { + return + } + if !bytes.HasPrefix(line, armorEnd) { + return 0, ArmorCorrupt + } + + l.eof = true + l.crcSet = true + return 0, io.EOF + } + + if len(line) > 96 { + return 0, ArmorCorrupt + } + + n = copy(p, line) + bytesToSave := len(line) - n + if bytesToSave > 0 { + if cap(l.buf) < bytesToSave { + l.buf = make([]byte, 0, bytesToSave) + } + l.buf = l.buf[0:bytesToSave] + copy(l.buf, line[n:]) + } + + return +} + +// openpgpReader passes Read calls to the underlying base64 decoder, but keeps +// a running CRC of the resulting data and checks the CRC against the value +// found by the lineReader at EOF. +type openpgpReader struct { + lReader *lineReader + b64Reader io.Reader + currentCRC uint32 +} + +func (r *openpgpReader) Read(p []byte) (n int, err error) { + n, err = r.b64Reader.Read(p) + r.currentCRC = crc24(r.currentCRC, p[:n]) + + if err == io.EOF && r.lReader.crcSet && r.lReader.crc != uint32(r.currentCRC&crc24Mask) { + return 0, ArmorCorrupt + } + + return +} + +// Decode reads a PGP armored block from the given Reader. It will ignore +// leading garbage. If it doesn't find a block, it will return nil, io.EOF. The +// given Reader is not usable after calling this function: an arbitrary amount +// of data may have been read past the end of the block. +func Decode(in io.Reader) (p *Block, err error) { + r := bufio.NewReaderSize(in, 100) + var line []byte + ignoreNext := false + +TryNextBlock: + p = nil + + // Skip leading garbage + for { + ignoreThis := ignoreNext + line, ignoreNext, err = r.ReadLine() + if err != nil { + return + } + if ignoreNext || ignoreThis { + continue + } + line = bytes.TrimSpace(line) + if len(line) > len(armorStart)+len(armorEndOfLine) && bytes.HasPrefix(line, armorStart) { + break + } + } + + p = new(Block) + p.Type = string(line[len(armorStart) : len(line)-len(armorEndOfLine)]) + p.Header = make(map[string]string) + nextIsContinuation := false + var lastKey string + + // Read headers + for { + isContinuation := nextIsContinuation + line, nextIsContinuation, err = r.ReadLine() + if err != nil { + p = nil + return + } + if isContinuation { + p.Header[lastKey] += string(line) + continue + } + line = bytes.TrimSpace(line) + if len(line) == 0 { + break + } + + i := bytes.Index(line, []byte(": ")) + if i == -1 { + goto TryNextBlock + } + lastKey = string(line[:i]) + p.Header[lastKey] = string(line[i+2:]) + } + + p.lReader.in = r + p.oReader.currentCRC = crc24Init + p.oReader.lReader = &p.lReader + p.oReader.b64Reader = base64.NewDecoder(base64.StdEncoding, &p.lReader) + p.Body = &p.oReader + + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/armor/encode.go b/vendor/golang.org/x/crypto/openpgp/armor/encode.go new file mode 100644 index 00000000000..6f07582c37c --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/armor/encode.go @@ -0,0 +1,160 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package armor + +import ( + "encoding/base64" + "io" +) + +var armorHeaderSep = []byte(": ") +var blockEnd = []byte("\n=") +var newline = []byte("\n") +var armorEndOfLineOut = []byte("-----\n") + +// writeSlices writes its arguments to the given Writer. +func writeSlices(out io.Writer, slices ...[]byte) (err error) { + for _, s := range slices { + _, err = out.Write(s) + if err != nil { + return err + } + } + return +} + +// lineBreaker breaks data across several lines, all of the same byte length +// (except possibly the last). Lines are broken with a single '\n'. +type lineBreaker struct { + lineLength int + line []byte + used int + out io.Writer + haveWritten bool +} + +func newLineBreaker(out io.Writer, lineLength int) *lineBreaker { + return &lineBreaker{ + lineLength: lineLength, + line: make([]byte, lineLength), + used: 0, + out: out, + } +} + +func (l *lineBreaker) Write(b []byte) (n int, err error) { + n = len(b) + + if n == 0 { + return + } + + if l.used == 0 && l.haveWritten { + _, err = l.out.Write([]byte{'\n'}) + if err != nil { + return + } + } + + if l.used+len(b) < l.lineLength { + l.used += copy(l.line[l.used:], b) + return + } + + l.haveWritten = true + _, err = l.out.Write(l.line[0:l.used]) + if err != nil { + return + } + excess := l.lineLength - l.used + l.used = 0 + + _, err = l.out.Write(b[0:excess]) + if err != nil { + return + } + + _, err = l.Write(b[excess:]) + return +} + +func (l *lineBreaker) Close() (err error) { + if l.used > 0 { + _, err = l.out.Write(l.line[0:l.used]) + if err != nil { + return + } + } + + return +} + +// encoding keeps track of a running CRC24 over the data which has been written +// to it and outputs a OpenPGP checksum when closed, followed by an armor +// trailer. +// +// It's built into a stack of io.Writers: +// encoding -> base64 encoder -> lineBreaker -> out +type encoding struct { + out io.Writer + breaker *lineBreaker + b64 io.WriteCloser + crc uint32 + blockType []byte +} + +func (e *encoding) Write(data []byte) (n int, err error) { + e.crc = crc24(e.crc, data) + return e.b64.Write(data) +} + +func (e *encoding) Close() (err error) { + err = e.b64.Close() + if err != nil { + return + } + e.breaker.Close() + + var checksumBytes [3]byte + checksumBytes[0] = byte(e.crc >> 16) + checksumBytes[1] = byte(e.crc >> 8) + checksumBytes[2] = byte(e.crc) + + var b64ChecksumBytes [4]byte + base64.StdEncoding.Encode(b64ChecksumBytes[:], checksumBytes[:]) + + return writeSlices(e.out, blockEnd, b64ChecksumBytes[:], newline, armorEnd, e.blockType, armorEndOfLine) +} + +// Encode returns a WriteCloser which will encode the data written to it in +// OpenPGP armor. +func Encode(out io.Writer, blockType string, headers map[string]string) (w io.WriteCloser, err error) { + bType := []byte(blockType) + err = writeSlices(out, armorStart, bType, armorEndOfLineOut) + if err != nil { + return + } + + for k, v := range headers { + err = writeSlices(out, []byte(k), armorHeaderSep, []byte(v), newline) + if err != nil { + return + } + } + + _, err = out.Write(newline) + if err != nil { + return + } + + e := &encoding{ + out: out, + breaker: newLineBreaker(out, 64), + crc: crc24Init, + blockType: bType, + } + e.b64 = base64.NewEncoder(base64.StdEncoding, e.breaker) + return e, nil +} diff --git a/vendor/golang.org/x/crypto/openpgp/canonical_text.go b/vendor/golang.org/x/crypto/openpgp/canonical_text.go new file mode 100644 index 00000000000..e601e389f12 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/canonical_text.go @@ -0,0 +1,59 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package openpgp + +import "hash" + +// NewCanonicalTextHash reformats text written to it into the canonical +// form and then applies the hash h. See RFC 4880, section 5.2.1. +func NewCanonicalTextHash(h hash.Hash) hash.Hash { + return &canonicalTextHash{h, 0} +} + +type canonicalTextHash struct { + h hash.Hash + s int +} + +var newline = []byte{'\r', '\n'} + +func (cth *canonicalTextHash) Write(buf []byte) (int, error) { + start := 0 + + for i, c := range buf { + switch cth.s { + case 0: + if c == '\r' { + cth.s = 1 + } else if c == '\n' { + cth.h.Write(buf[start:i]) + cth.h.Write(newline) + start = i + 1 + } + case 1: + cth.s = 0 + } + } + + cth.h.Write(buf[start:]) + return len(buf), nil +} + +func (cth *canonicalTextHash) Sum(in []byte) []byte { + return cth.h.Sum(in) +} + +func (cth *canonicalTextHash) Reset() { + cth.h.Reset() + cth.s = 0 +} + +func (cth *canonicalTextHash) Size() int { + return cth.h.Size() +} + +func (cth *canonicalTextHash) BlockSize() int { + return cth.h.BlockSize() +} diff --git a/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go b/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go new file mode 100644 index 00000000000..72a6a739471 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go @@ -0,0 +1,124 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package elgamal implements ElGamal encryption, suitable for OpenPGP, +// as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on +// Discrete Logarithms," IEEE Transactions on Information Theory, v. IT-31, +// n. 4, 1985, pp. 469-472. +// +// This form of ElGamal embeds PKCS#1 v1.5 padding, which may make it +// unsuitable for other protocols. RSA should be used in preference in any +// case. +package elgamal // import "golang.org/x/crypto/openpgp/elgamal" + +import ( + "crypto/rand" + "crypto/subtle" + "errors" + "io" + "math/big" +) + +// PublicKey represents an ElGamal public key. +type PublicKey struct { + G, P, Y *big.Int +} + +// PrivateKey represents an ElGamal private key. +type PrivateKey struct { + PublicKey + X *big.Int +} + +// Encrypt encrypts the given message to the given public key. The result is a +// pair of integers. Errors can result from reading random, or because msg is +// too large to be encrypted to the public key. +func Encrypt(random io.Reader, pub *PublicKey, msg []byte) (c1, c2 *big.Int, err error) { + pLen := (pub.P.BitLen() + 7) / 8 + if len(msg) > pLen-11 { + err = errors.New("elgamal: message too long") + return + } + + // EM = 0x02 || PS || 0x00 || M + em := make([]byte, pLen-1) + em[0] = 2 + ps, mm := em[1:len(em)-len(msg)-1], em[len(em)-len(msg):] + err = nonZeroRandomBytes(ps, random) + if err != nil { + return + } + em[len(em)-len(msg)-1] = 0 + copy(mm, msg) + + m := new(big.Int).SetBytes(em) + + k, err := rand.Int(random, pub.P) + if err != nil { + return + } + + c1 = new(big.Int).Exp(pub.G, k, pub.P) + s := new(big.Int).Exp(pub.Y, k, pub.P) + c2 = s.Mul(s, m) + c2.Mod(c2, pub.P) + + return +} + +// Decrypt takes two integers, resulting from an ElGamal encryption, and +// returns the plaintext of the message. An error can result only if the +// ciphertext is invalid. Users should keep in mind that this is a padding +// oracle and thus, if exposed to an adaptive chosen ciphertext attack, can +// be used to break the cryptosystem. See ``Chosen Ciphertext Attacks +// Against Protocols Based on the RSA Encryption Standard PKCS #1'', Daniel +// Bleichenbacher, Advances in Cryptology (Crypto '98), +func Decrypt(priv *PrivateKey, c1, c2 *big.Int) (msg []byte, err error) { + s := new(big.Int).Exp(c1, priv.X, priv.P) + if s.ModInverse(s, priv.P) == nil { + return nil, errors.New("elgamal: invalid private key") + } + s.Mul(s, c2) + s.Mod(s, priv.P) + em := s.Bytes() + + firstByteIsTwo := subtle.ConstantTimeByteEq(em[0], 2) + + // The remainder of the plaintext must be a string of non-zero random + // octets, followed by a 0, followed by the message. + // lookingForIndex: 1 iff we are still looking for the zero. + // index: the offset of the first zero byte. + var lookingForIndex, index int + lookingForIndex = 1 + + for i := 1; i < len(em); i++ { + equals0 := subtle.ConstantTimeByteEq(em[i], 0) + index = subtle.ConstantTimeSelect(lookingForIndex&equals0, i, index) + lookingForIndex = subtle.ConstantTimeSelect(equals0, 0, lookingForIndex) + } + + if firstByteIsTwo != 1 || lookingForIndex != 0 || index < 9 { + return nil, errors.New("elgamal: decryption error") + } + return em[index+1:], nil +} + +// nonZeroRandomBytes fills the given slice with non-zero random octets. +func nonZeroRandomBytes(s []byte, rand io.Reader) (err error) { + _, err = io.ReadFull(rand, s) + if err != nil { + return + } + + for i := 0; i < len(s); i++ { + for s[i] == 0 { + _, err = io.ReadFull(rand, s[i:i+1]) + if err != nil { + return + } + } + } + + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/errors/errors.go b/vendor/golang.org/x/crypto/openpgp/errors/errors.go new file mode 100644 index 00000000000..eb0550b2d04 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/errors/errors.go @@ -0,0 +1,72 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package errors contains common error types for the OpenPGP packages. +package errors // import "golang.org/x/crypto/openpgp/errors" + +import ( + "strconv" +) + +// A StructuralError is returned when OpenPGP data is found to be syntactically +// invalid. +type StructuralError string + +func (s StructuralError) Error() string { + return "openpgp: invalid data: " + string(s) +} + +// UnsupportedError indicates that, although the OpenPGP data is valid, it +// makes use of currently unimplemented features. +type UnsupportedError string + +func (s UnsupportedError) Error() string { + return "openpgp: unsupported feature: " + string(s) +} + +// InvalidArgumentError indicates that the caller is in error and passed an +// incorrect value. +type InvalidArgumentError string + +func (i InvalidArgumentError) Error() string { + return "openpgp: invalid argument: " + string(i) +} + +// SignatureError indicates that a syntactically valid signature failed to +// validate. +type SignatureError string + +func (b SignatureError) Error() string { + return "openpgp: invalid signature: " + string(b) +} + +type keyIncorrectError int + +func (ki keyIncorrectError) Error() string { + return "openpgp: incorrect key" +} + +var ErrKeyIncorrect error = keyIncorrectError(0) + +type unknownIssuerError int + +func (unknownIssuerError) Error() string { + return "openpgp: signature made by unknown entity" +} + +var ErrUnknownIssuer error = unknownIssuerError(0) + +type keyRevokedError int + +func (keyRevokedError) Error() string { + return "openpgp: signature made by revoked key" +} + +var ErrKeyRevoked error = keyRevokedError(0) + +type UnknownPacketTypeError uint8 + +func (upte UnknownPacketTypeError) Error() string { + return "openpgp: unknown packet type: " + strconv.Itoa(int(upte)) +} diff --git a/vendor/golang.org/x/crypto/openpgp/keys.go b/vendor/golang.org/x/crypto/openpgp/keys.go new file mode 100644 index 00000000000..faa2fb3693e --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/keys.go @@ -0,0 +1,693 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package openpgp + +import ( + "crypto/rsa" + "io" + "time" + + "golang.org/x/crypto/openpgp/armor" + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/packet" +) + +// PublicKeyType is the armor type for a PGP public key. +var PublicKeyType = "PGP PUBLIC KEY BLOCK" + +// PrivateKeyType is the armor type for a PGP private key. +var PrivateKeyType = "PGP PRIVATE KEY BLOCK" + +// An Entity represents the components of an OpenPGP key: a primary public key +// (which must be a signing key), one or more identities claimed by that key, +// and zero or more subkeys, which may be encryption keys. +type Entity struct { + PrimaryKey *packet.PublicKey + PrivateKey *packet.PrivateKey + Identities map[string]*Identity // indexed by Identity.Name + Revocations []*packet.Signature + Subkeys []Subkey +} + +// An Identity represents an identity claimed by an Entity and zero or more +// assertions by other entities about that claim. +type Identity struct { + Name string // by convention, has the form "Full Name (comment) " + UserId *packet.UserId + SelfSignature *packet.Signature + Signatures []*packet.Signature +} + +// A Subkey is an additional public key in an Entity. Subkeys can be used for +// encryption. +type Subkey struct { + PublicKey *packet.PublicKey + PrivateKey *packet.PrivateKey + Sig *packet.Signature +} + +// A Key identifies a specific public key in an Entity. This is either the +// Entity's primary key or a subkey. +type Key struct { + Entity *Entity + PublicKey *packet.PublicKey + PrivateKey *packet.PrivateKey + SelfSignature *packet.Signature +} + +// A KeyRing provides access to public and private keys. +type KeyRing interface { + // KeysById returns the set of keys that have the given key id. + KeysById(id uint64) []Key + // KeysByIdAndUsage returns the set of keys with the given id + // that also meet the key usage given by requiredUsage. + // The requiredUsage is expressed as the bitwise-OR of + // packet.KeyFlag* values. + KeysByIdUsage(id uint64, requiredUsage byte) []Key + // DecryptionKeys returns all private keys that are valid for + // decryption. + DecryptionKeys() []Key +} + +// primaryIdentity returns the Identity marked as primary or the first identity +// if none are so marked. +func (e *Entity) primaryIdentity() *Identity { + var firstIdentity *Identity + for _, ident := range e.Identities { + if firstIdentity == nil { + firstIdentity = ident + } + if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId { + return ident + } + } + return firstIdentity +} + +// encryptionKey returns the best candidate Key for encrypting a message to the +// given Entity. +func (e *Entity) encryptionKey(now time.Time) (Key, bool) { + candidateSubkey := -1 + + // Iterate the keys to find the newest key + var maxTime time.Time + for i, subkey := range e.Subkeys { + if subkey.Sig.FlagsValid && + subkey.Sig.FlagEncryptCommunications && + subkey.PublicKey.PubKeyAlgo.CanEncrypt() && + !subkey.Sig.KeyExpired(now) && + (maxTime.IsZero() || subkey.Sig.CreationTime.After(maxTime)) { + candidateSubkey = i + maxTime = subkey.Sig.CreationTime + } + } + + if candidateSubkey != -1 { + subkey := e.Subkeys[candidateSubkey] + return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true + } + + // If we don't have any candidate subkeys for encryption and + // the primary key doesn't have any usage metadata then we + // assume that the primary key is ok. Or, if the primary key is + // marked as ok to encrypt to, then we can obviously use it. + i := e.primaryIdentity() + if !i.SelfSignature.FlagsValid || i.SelfSignature.FlagEncryptCommunications && + e.PrimaryKey.PubKeyAlgo.CanEncrypt() && + !i.SelfSignature.KeyExpired(now) { + return Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true + } + + // This Entity appears to be signing only. + return Key{}, false +} + +// signingKey return the best candidate Key for signing a message with this +// Entity. +func (e *Entity) signingKey(now time.Time) (Key, bool) { + candidateSubkey := -1 + + for i, subkey := range e.Subkeys { + if subkey.Sig.FlagsValid && + subkey.Sig.FlagSign && + subkey.PublicKey.PubKeyAlgo.CanSign() && + !subkey.Sig.KeyExpired(now) { + candidateSubkey = i + break + } + } + + if candidateSubkey != -1 { + subkey := e.Subkeys[candidateSubkey] + return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig}, true + } + + // If we have no candidate subkey then we assume that it's ok to sign + // with the primary key. + i := e.primaryIdentity() + if !i.SelfSignature.FlagsValid || i.SelfSignature.FlagSign && + !i.SelfSignature.KeyExpired(now) { + return Key{e, e.PrimaryKey, e.PrivateKey, i.SelfSignature}, true + } + + return Key{}, false +} + +// An EntityList contains one or more Entities. +type EntityList []*Entity + +// KeysById returns the set of keys that have the given key id. +func (el EntityList) KeysById(id uint64) (keys []Key) { + for _, e := range el { + if e.PrimaryKey.KeyId == id { + var selfSig *packet.Signature + for _, ident := range e.Identities { + if selfSig == nil { + selfSig = ident.SelfSignature + } else if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId { + selfSig = ident.SelfSignature + break + } + } + keys = append(keys, Key{e, e.PrimaryKey, e.PrivateKey, selfSig}) + } + + for _, subKey := range e.Subkeys { + if subKey.PublicKey.KeyId == id { + keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig}) + } + } + } + return +} + +// KeysByIdAndUsage returns the set of keys with the given id that also meet +// the key usage given by requiredUsage. The requiredUsage is expressed as +// the bitwise-OR of packet.KeyFlag* values. +func (el EntityList) KeysByIdUsage(id uint64, requiredUsage byte) (keys []Key) { + for _, key := range el.KeysById(id) { + if len(key.Entity.Revocations) > 0 { + continue + } + + if key.SelfSignature.RevocationReason != nil { + continue + } + + if key.SelfSignature.FlagsValid && requiredUsage != 0 { + var usage byte + if key.SelfSignature.FlagCertify { + usage |= packet.KeyFlagCertify + } + if key.SelfSignature.FlagSign { + usage |= packet.KeyFlagSign + } + if key.SelfSignature.FlagEncryptCommunications { + usage |= packet.KeyFlagEncryptCommunications + } + if key.SelfSignature.FlagEncryptStorage { + usage |= packet.KeyFlagEncryptStorage + } + if usage&requiredUsage != requiredUsage { + continue + } + } + + keys = append(keys, key) + } + return +} + +// DecryptionKeys returns all private keys that are valid for decryption. +func (el EntityList) DecryptionKeys() (keys []Key) { + for _, e := range el { + for _, subKey := range e.Subkeys { + if subKey.PrivateKey != nil && (!subKey.Sig.FlagsValid || subKey.Sig.FlagEncryptStorage || subKey.Sig.FlagEncryptCommunications) { + keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig}) + } + } + } + return +} + +// ReadArmoredKeyRing reads one or more public/private keys from an armor keyring file. +func ReadArmoredKeyRing(r io.Reader) (EntityList, error) { + block, err := armor.Decode(r) + if err == io.EOF { + return nil, errors.InvalidArgumentError("no armored data found") + } + if err != nil { + return nil, err + } + if block.Type != PublicKeyType && block.Type != PrivateKeyType { + return nil, errors.InvalidArgumentError("expected public or private key block, got: " + block.Type) + } + + return ReadKeyRing(block.Body) +} + +// ReadKeyRing reads one or more public/private keys. Unsupported keys are +// ignored as long as at least a single valid key is found. +func ReadKeyRing(r io.Reader) (el EntityList, err error) { + packets := packet.NewReader(r) + var lastUnsupportedError error + + for { + var e *Entity + e, err = ReadEntity(packets) + if err != nil { + // TODO: warn about skipped unsupported/unreadable keys + if _, ok := err.(errors.UnsupportedError); ok { + lastUnsupportedError = err + err = readToNextPublicKey(packets) + } else if _, ok := err.(errors.StructuralError); ok { + // Skip unreadable, badly-formatted keys + lastUnsupportedError = err + err = readToNextPublicKey(packets) + } + if err == io.EOF { + err = nil + break + } + if err != nil { + el = nil + break + } + } else { + el = append(el, e) + } + } + + if len(el) == 0 && err == nil { + err = lastUnsupportedError + } + return +} + +// readToNextPublicKey reads packets until the start of the entity and leaves +// the first packet of the new entity in the Reader. +func readToNextPublicKey(packets *packet.Reader) (err error) { + var p packet.Packet + for { + p, err = packets.Next() + if err == io.EOF { + return + } else if err != nil { + if _, ok := err.(errors.UnsupportedError); ok { + err = nil + continue + } + return + } + + if pk, ok := p.(*packet.PublicKey); ok && !pk.IsSubkey { + packets.Unread(p) + return + } + } +} + +// ReadEntity reads an entity (public key, identities, subkeys etc) from the +// given Reader. +func ReadEntity(packets *packet.Reader) (*Entity, error) { + e := new(Entity) + e.Identities = make(map[string]*Identity) + + p, err := packets.Next() + if err != nil { + return nil, err + } + + var ok bool + if e.PrimaryKey, ok = p.(*packet.PublicKey); !ok { + if e.PrivateKey, ok = p.(*packet.PrivateKey); !ok { + packets.Unread(p) + return nil, errors.StructuralError("first packet was not a public/private key") + } + e.PrimaryKey = &e.PrivateKey.PublicKey + } + + if !e.PrimaryKey.PubKeyAlgo.CanSign() { + return nil, errors.StructuralError("primary key cannot be used for signatures") + } + + var revocations []*packet.Signature +EachPacket: + for { + p, err := packets.Next() + if err == io.EOF { + break + } else if err != nil { + return nil, err + } + + switch pkt := p.(type) { + case *packet.UserId: + if err := addUserID(e, packets, pkt); err != nil { + return nil, err + } + case *packet.Signature: + if pkt.SigType == packet.SigTypeKeyRevocation { + revocations = append(revocations, pkt) + } else if pkt.SigType == packet.SigTypeDirectSignature { + // TODO: RFC4880 5.2.1 permits signatures + // directly on keys (eg. to bind additional + // revocation keys). + } + // Else, ignoring the signature as it does not follow anything + // we would know to attach it to. + case *packet.PrivateKey: + if pkt.IsSubkey == false { + packets.Unread(p) + break EachPacket + } + err = addSubkey(e, packets, &pkt.PublicKey, pkt) + if err != nil { + return nil, err + } + case *packet.PublicKey: + if pkt.IsSubkey == false { + packets.Unread(p) + break EachPacket + } + err = addSubkey(e, packets, pkt, nil) + if err != nil { + return nil, err + } + default: + // we ignore unknown packets + } + } + + if len(e.Identities) == 0 { + return nil, errors.StructuralError("entity without any identities") + } + + for _, revocation := range revocations { + err = e.PrimaryKey.VerifyRevocationSignature(revocation) + if err == nil { + e.Revocations = append(e.Revocations, revocation) + } else { + // TODO: RFC 4880 5.2.3.15 defines revocation keys. + return nil, errors.StructuralError("revocation signature signed by alternate key") + } + } + + return e, nil +} + +func addUserID(e *Entity, packets *packet.Reader, pkt *packet.UserId) error { + // Make a new Identity object, that we might wind up throwing away. + // We'll only add it if we get a valid self-signature over this + // userID. + identity := new(Identity) + identity.Name = pkt.Id + identity.UserId = pkt + + for { + p, err := packets.Next() + if err == io.EOF { + break + } else if err != nil { + return err + } + + sig, ok := p.(*packet.Signature) + if !ok { + packets.Unread(p) + break + } + + if (sig.SigType == packet.SigTypePositiveCert || sig.SigType == packet.SigTypeGenericCert) && sig.IssuerKeyId != nil && *sig.IssuerKeyId == e.PrimaryKey.KeyId { + if err = e.PrimaryKey.VerifyUserIdSignature(pkt.Id, e.PrimaryKey, sig); err != nil { + return errors.StructuralError("user ID self-signature invalid: " + err.Error()) + } + identity.SelfSignature = sig + e.Identities[pkt.Id] = identity + } else { + identity.Signatures = append(identity.Signatures, sig) + } + } + + return nil +} + +func addSubkey(e *Entity, packets *packet.Reader, pub *packet.PublicKey, priv *packet.PrivateKey) error { + var subKey Subkey + subKey.PublicKey = pub + subKey.PrivateKey = priv + + for { + p, err := packets.Next() + if err == io.EOF { + break + } else if err != nil { + return errors.StructuralError("subkey signature invalid: " + err.Error()) + } + + sig, ok := p.(*packet.Signature) + if !ok { + packets.Unread(p) + break + } + + if sig.SigType != packet.SigTypeSubkeyBinding && sig.SigType != packet.SigTypeSubkeyRevocation { + return errors.StructuralError("subkey signature with wrong type") + } + + if err := e.PrimaryKey.VerifyKeySignature(subKey.PublicKey, sig); err != nil { + return errors.StructuralError("subkey signature invalid: " + err.Error()) + } + + switch sig.SigType { + case packet.SigTypeSubkeyRevocation: + subKey.Sig = sig + case packet.SigTypeSubkeyBinding: + + if shouldReplaceSubkeySig(subKey.Sig, sig) { + subKey.Sig = sig + } + } + } + + if subKey.Sig == nil { + return errors.StructuralError("subkey packet not followed by signature") + } + + e.Subkeys = append(e.Subkeys, subKey) + + return nil +} + +func shouldReplaceSubkeySig(existingSig, potentialNewSig *packet.Signature) bool { + if potentialNewSig == nil { + return false + } + + if existingSig == nil { + return true + } + + if existingSig.SigType == packet.SigTypeSubkeyRevocation { + return false // never override a revocation signature + } + + return potentialNewSig.CreationTime.After(existingSig.CreationTime) +} + +const defaultRSAKeyBits = 2048 + +// NewEntity returns an Entity that contains a fresh RSA/RSA keypair with a +// single identity composed of the given full name, comment and email, any of +// which may be empty but must not contain any of "()<>\x00". +// If config is nil, sensible defaults will be used. +func NewEntity(name, comment, email string, config *packet.Config) (*Entity, error) { + creationTime := config.Now() + + bits := defaultRSAKeyBits + if config != nil && config.RSABits != 0 { + bits = config.RSABits + } + + uid := packet.NewUserId(name, comment, email) + if uid == nil { + return nil, errors.InvalidArgumentError("user id field contained invalid characters") + } + signingPriv, err := rsa.GenerateKey(config.Random(), bits) + if err != nil { + return nil, err + } + encryptingPriv, err := rsa.GenerateKey(config.Random(), bits) + if err != nil { + return nil, err + } + + e := &Entity{ + PrimaryKey: packet.NewRSAPublicKey(creationTime, &signingPriv.PublicKey), + PrivateKey: packet.NewRSAPrivateKey(creationTime, signingPriv), + Identities: make(map[string]*Identity), + } + isPrimaryId := true + e.Identities[uid.Id] = &Identity{ + Name: uid.Id, + UserId: uid, + SelfSignature: &packet.Signature{ + CreationTime: creationTime, + SigType: packet.SigTypePositiveCert, + PubKeyAlgo: packet.PubKeyAlgoRSA, + Hash: config.Hash(), + IsPrimaryId: &isPrimaryId, + FlagsValid: true, + FlagSign: true, + FlagCertify: true, + IssuerKeyId: &e.PrimaryKey.KeyId, + }, + } + err = e.Identities[uid.Id].SelfSignature.SignUserId(uid.Id, e.PrimaryKey, e.PrivateKey, config) + if err != nil { + return nil, err + } + + // If the user passes in a DefaultHash via packet.Config, + // set the PreferredHash for the SelfSignature. + if config != nil && config.DefaultHash != 0 { + e.Identities[uid.Id].SelfSignature.PreferredHash = []uint8{hashToHashId(config.DefaultHash)} + } + + // Likewise for DefaultCipher. + if config != nil && config.DefaultCipher != 0 { + e.Identities[uid.Id].SelfSignature.PreferredSymmetric = []uint8{uint8(config.DefaultCipher)} + } + + e.Subkeys = make([]Subkey, 1) + e.Subkeys[0] = Subkey{ + PublicKey: packet.NewRSAPublicKey(creationTime, &encryptingPriv.PublicKey), + PrivateKey: packet.NewRSAPrivateKey(creationTime, encryptingPriv), + Sig: &packet.Signature{ + CreationTime: creationTime, + SigType: packet.SigTypeSubkeyBinding, + PubKeyAlgo: packet.PubKeyAlgoRSA, + Hash: config.Hash(), + FlagsValid: true, + FlagEncryptStorage: true, + FlagEncryptCommunications: true, + IssuerKeyId: &e.PrimaryKey.KeyId, + }, + } + e.Subkeys[0].PublicKey.IsSubkey = true + e.Subkeys[0].PrivateKey.IsSubkey = true + err = e.Subkeys[0].Sig.SignKey(e.Subkeys[0].PublicKey, e.PrivateKey, config) + if err != nil { + return nil, err + } + return e, nil +} + +// SerializePrivate serializes an Entity, including private key material, but +// excluding signatures from other entities, to the given Writer. +// Identities and subkeys are re-signed in case they changed since NewEntry. +// If config is nil, sensible defaults will be used. +func (e *Entity) SerializePrivate(w io.Writer, config *packet.Config) (err error) { + err = e.PrivateKey.Serialize(w) + if err != nil { + return + } + for _, ident := range e.Identities { + err = ident.UserId.Serialize(w) + if err != nil { + return + } + err = ident.SelfSignature.SignUserId(ident.UserId.Id, e.PrimaryKey, e.PrivateKey, config) + if err != nil { + return + } + err = ident.SelfSignature.Serialize(w) + if err != nil { + return + } + } + for _, subkey := range e.Subkeys { + err = subkey.PrivateKey.Serialize(w) + if err != nil { + return + } + err = subkey.Sig.SignKey(subkey.PublicKey, e.PrivateKey, config) + if err != nil { + return + } + err = subkey.Sig.Serialize(w) + if err != nil { + return + } + } + return nil +} + +// Serialize writes the public part of the given Entity to w, including +// signatures from other entities. No private key material will be output. +func (e *Entity) Serialize(w io.Writer) error { + err := e.PrimaryKey.Serialize(w) + if err != nil { + return err + } + for _, ident := range e.Identities { + err = ident.UserId.Serialize(w) + if err != nil { + return err + } + err = ident.SelfSignature.Serialize(w) + if err != nil { + return err + } + for _, sig := range ident.Signatures { + err = sig.Serialize(w) + if err != nil { + return err + } + } + } + for _, subkey := range e.Subkeys { + err = subkey.PublicKey.Serialize(w) + if err != nil { + return err + } + err = subkey.Sig.Serialize(w) + if err != nil { + return err + } + } + return nil +} + +// SignIdentity adds a signature to e, from signer, attesting that identity is +// associated with e. The provided identity must already be an element of +// e.Identities and the private key of signer must have been decrypted if +// necessary. +// If config is nil, sensible defaults will be used. +func (e *Entity) SignIdentity(identity string, signer *Entity, config *packet.Config) error { + if signer.PrivateKey == nil { + return errors.InvalidArgumentError("signing Entity must have a private key") + } + if signer.PrivateKey.Encrypted { + return errors.InvalidArgumentError("signing Entity's private key must be decrypted") + } + ident, ok := e.Identities[identity] + if !ok { + return errors.InvalidArgumentError("given identity string not found in Entity") + } + + sig := &packet.Signature{ + SigType: packet.SigTypeGenericCert, + PubKeyAlgo: signer.PrivateKey.PubKeyAlgo, + Hash: config.Hash(), + CreationTime: config.Now(), + IssuerKeyId: &signer.PrivateKey.KeyId, + } + if err := sig.SignUserId(identity, e.PrimaryKey, signer.PrivateKey, config); err != nil { + return err + } + ident.Signatures = append(ident.Signatures, sig) + return nil +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/compressed.go b/vendor/golang.org/x/crypto/openpgp/packet/compressed.go new file mode 100644 index 00000000000..e8f0b5caa7d --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/compressed.go @@ -0,0 +1,123 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "compress/bzip2" + "compress/flate" + "compress/zlib" + "golang.org/x/crypto/openpgp/errors" + "io" + "strconv" +) + +// Compressed represents a compressed OpenPGP packet. The decompressed contents +// will contain more OpenPGP packets. See RFC 4880, section 5.6. +type Compressed struct { + Body io.Reader +} + +const ( + NoCompression = flate.NoCompression + BestSpeed = flate.BestSpeed + BestCompression = flate.BestCompression + DefaultCompression = flate.DefaultCompression +) + +// CompressionConfig contains compressor configuration settings. +type CompressionConfig struct { + // Level is the compression level to use. It must be set to + // between -1 and 9, with -1 causing the compressor to use the + // default compression level, 0 causing the compressor to use + // no compression and 1 to 9 representing increasing (better, + // slower) compression levels. If Level is less than -1 or + // more then 9, a non-nil error will be returned during + // encryption. See the constants above for convenient common + // settings for Level. + Level int +} + +func (c *Compressed) parse(r io.Reader) error { + var buf [1]byte + _, err := readFull(r, buf[:]) + if err != nil { + return err + } + + switch buf[0] { + case 1: + c.Body = flate.NewReader(r) + case 2: + c.Body, err = zlib.NewReader(r) + case 3: + c.Body = bzip2.NewReader(r) + default: + err = errors.UnsupportedError("unknown compression algorithm: " + strconv.Itoa(int(buf[0]))) + } + + return err +} + +// compressedWriterCloser represents the serialized compression stream +// header and the compressor. Its Close() method ensures that both the +// compressor and serialized stream header are closed. Its Write() +// method writes to the compressor. +type compressedWriteCloser struct { + sh io.Closer // Stream Header + c io.WriteCloser // Compressor +} + +func (cwc compressedWriteCloser) Write(p []byte) (int, error) { + return cwc.c.Write(p) +} + +func (cwc compressedWriteCloser) Close() (err error) { + err = cwc.c.Close() + if err != nil { + return err + } + + return cwc.sh.Close() +} + +// SerializeCompressed serializes a compressed data packet to w and +// returns a WriteCloser to which the literal data packets themselves +// can be written and which MUST be closed on completion. If cc is +// nil, sensible defaults will be used to configure the compression +// algorithm. +func SerializeCompressed(w io.WriteCloser, algo CompressionAlgo, cc *CompressionConfig) (literaldata io.WriteCloser, err error) { + compressed, err := serializeStreamHeader(w, packetTypeCompressed) + if err != nil { + return + } + + _, err = compressed.Write([]byte{uint8(algo)}) + if err != nil { + return + } + + level := DefaultCompression + if cc != nil { + level = cc.Level + } + + var compressor io.WriteCloser + switch algo { + case CompressionZIP: + compressor, err = flate.NewWriter(compressed, level) + case CompressionZLIB: + compressor, err = zlib.NewWriterLevel(compressed, level) + default: + s := strconv.Itoa(int(algo)) + err = errors.UnsupportedError("Unsupported compression algorithm: " + s) + } + if err != nil { + return + } + + literaldata = compressedWriteCloser{compressed, compressor} + + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/config.go b/vendor/golang.org/x/crypto/openpgp/packet/config.go new file mode 100644 index 00000000000..c76eecc963a --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/config.go @@ -0,0 +1,91 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto" + "crypto/rand" + "io" + "time" +) + +// Config collects a number of parameters along with sensible defaults. +// A nil *Config is valid and results in all default values. +type Config struct { + // Rand provides the source of entropy. + // If nil, the crypto/rand Reader is used. + Rand io.Reader + // DefaultHash is the default hash function to be used. + // If zero, SHA-256 is used. + DefaultHash crypto.Hash + // DefaultCipher is the cipher to be used. + // If zero, AES-128 is used. + DefaultCipher CipherFunction + // Time returns the current time as the number of seconds since the + // epoch. If Time is nil, time.Now is used. + Time func() time.Time + // DefaultCompressionAlgo is the compression algorithm to be + // applied to the plaintext before encryption. If zero, no + // compression is done. + DefaultCompressionAlgo CompressionAlgo + // CompressionConfig configures the compression settings. + CompressionConfig *CompressionConfig + // S2KCount is only used for symmetric encryption. It + // determines the strength of the passphrase stretching when + // the said passphrase is hashed to produce a key. S2KCount + // should be between 1024 and 65011712, inclusive. If Config + // is nil or S2KCount is 0, the value 65536 used. Not all + // values in the above range can be represented. S2KCount will + // be rounded up to the next representable value if it cannot + // be encoded exactly. When set, it is strongly encrouraged to + // use a value that is at least 65536. See RFC 4880 Section + // 3.7.1.3. + S2KCount int + // RSABits is the number of bits in new RSA keys made with NewEntity. + // If zero, then 2048 bit keys are created. + RSABits int +} + +func (c *Config) Random() io.Reader { + if c == nil || c.Rand == nil { + return rand.Reader + } + return c.Rand +} + +func (c *Config) Hash() crypto.Hash { + if c == nil || uint(c.DefaultHash) == 0 { + return crypto.SHA256 + } + return c.DefaultHash +} + +func (c *Config) Cipher() CipherFunction { + if c == nil || uint8(c.DefaultCipher) == 0 { + return CipherAES128 + } + return c.DefaultCipher +} + +func (c *Config) Now() time.Time { + if c == nil || c.Time == nil { + return time.Now() + } + return c.Time() +} + +func (c *Config) Compression() CompressionAlgo { + if c == nil { + return CompressionNone + } + return c.DefaultCompressionAlgo +} + +func (c *Config) PasswordHashIterations() int { + if c == nil || c.S2KCount == 0 { + return 0 + } + return c.S2KCount +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go b/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go new file mode 100644 index 00000000000..6d7639722c9 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/encrypted_key.go @@ -0,0 +1,208 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto" + "crypto/rsa" + "encoding/binary" + "io" + "math/big" + "strconv" + + "golang.org/x/crypto/openpgp/elgamal" + "golang.org/x/crypto/openpgp/errors" +) + +const encryptedKeyVersion = 3 + +// EncryptedKey represents a public-key encrypted session key. See RFC 4880, +// section 5.1. +type EncryptedKey struct { + KeyId uint64 + Algo PublicKeyAlgorithm + CipherFunc CipherFunction // only valid after a successful Decrypt + Key []byte // only valid after a successful Decrypt + + encryptedMPI1, encryptedMPI2 parsedMPI +} + +func (e *EncryptedKey) parse(r io.Reader) (err error) { + var buf [10]byte + _, err = readFull(r, buf[:]) + if err != nil { + return + } + if buf[0] != encryptedKeyVersion { + return errors.UnsupportedError("unknown EncryptedKey version " + strconv.Itoa(int(buf[0]))) + } + e.KeyId = binary.BigEndian.Uint64(buf[1:9]) + e.Algo = PublicKeyAlgorithm(buf[9]) + switch e.Algo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: + e.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r) + if err != nil { + return + } + case PubKeyAlgoElGamal: + e.encryptedMPI1.bytes, e.encryptedMPI1.bitLength, err = readMPI(r) + if err != nil { + return + } + e.encryptedMPI2.bytes, e.encryptedMPI2.bitLength, err = readMPI(r) + if err != nil { + return + } + } + _, err = consumeAll(r) + return +} + +func checksumKeyMaterial(key []byte) uint16 { + var checksum uint16 + for _, v := range key { + checksum += uint16(v) + } + return checksum +} + +// Decrypt decrypts an encrypted session key with the given private key. The +// private key must have been decrypted first. +// If config is nil, sensible defaults will be used. +func (e *EncryptedKey) Decrypt(priv *PrivateKey, config *Config) error { + var err error + var b []byte + + // TODO(agl): use session key decryption routines here to avoid + // padding oracle attacks. + switch priv.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: + // Supports both *rsa.PrivateKey and crypto.Decrypter + k := priv.PrivateKey.(crypto.Decrypter) + b, err = k.Decrypt(config.Random(), padToKeySize(k.Public().(*rsa.PublicKey), e.encryptedMPI1.bytes), nil) + case PubKeyAlgoElGamal: + c1 := new(big.Int).SetBytes(e.encryptedMPI1.bytes) + c2 := new(big.Int).SetBytes(e.encryptedMPI2.bytes) + b, err = elgamal.Decrypt(priv.PrivateKey.(*elgamal.PrivateKey), c1, c2) + default: + err = errors.InvalidArgumentError("cannot decrypted encrypted session key with private key of type " + strconv.Itoa(int(priv.PubKeyAlgo))) + } + + if err != nil { + return err + } + + e.CipherFunc = CipherFunction(b[0]) + e.Key = b[1 : len(b)-2] + expectedChecksum := uint16(b[len(b)-2])<<8 | uint16(b[len(b)-1]) + checksum := checksumKeyMaterial(e.Key) + if checksum != expectedChecksum { + return errors.StructuralError("EncryptedKey checksum incorrect") + } + + return nil +} + +// Serialize writes the encrypted key packet, e, to w. +func (e *EncryptedKey) Serialize(w io.Writer) error { + var mpiLen int + switch e.Algo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: + mpiLen = 2 + len(e.encryptedMPI1.bytes) + case PubKeyAlgoElGamal: + mpiLen = 2 + len(e.encryptedMPI1.bytes) + 2 + len(e.encryptedMPI2.bytes) + default: + return errors.InvalidArgumentError("don't know how to serialize encrypted key type " + strconv.Itoa(int(e.Algo))) + } + + serializeHeader(w, packetTypeEncryptedKey, 1 /* version */ +8 /* key id */ +1 /* algo */ +mpiLen) + + w.Write([]byte{encryptedKeyVersion}) + binary.Write(w, binary.BigEndian, e.KeyId) + w.Write([]byte{byte(e.Algo)}) + + switch e.Algo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: + writeMPIs(w, e.encryptedMPI1) + case PubKeyAlgoElGamal: + writeMPIs(w, e.encryptedMPI1, e.encryptedMPI2) + default: + panic("internal error") + } + + return nil +} + +// SerializeEncryptedKey serializes an encrypted key packet to w that contains +// key, encrypted to pub. +// If config is nil, sensible defaults will be used. +func SerializeEncryptedKey(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, config *Config) error { + var buf [10]byte + buf[0] = encryptedKeyVersion + binary.BigEndian.PutUint64(buf[1:9], pub.KeyId) + buf[9] = byte(pub.PubKeyAlgo) + + keyBlock := make([]byte, 1 /* cipher type */ +len(key)+2 /* checksum */) + keyBlock[0] = byte(cipherFunc) + copy(keyBlock[1:], key) + checksum := checksumKeyMaterial(key) + keyBlock[1+len(key)] = byte(checksum >> 8) + keyBlock[1+len(key)+1] = byte(checksum) + + switch pub.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly: + return serializeEncryptedKeyRSA(w, config.Random(), buf, pub.PublicKey.(*rsa.PublicKey), keyBlock) + case PubKeyAlgoElGamal: + return serializeEncryptedKeyElGamal(w, config.Random(), buf, pub.PublicKey.(*elgamal.PublicKey), keyBlock) + case PubKeyAlgoDSA, PubKeyAlgoRSASignOnly: + return errors.InvalidArgumentError("cannot encrypt to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo))) + } + + return errors.UnsupportedError("encrypting a key to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo))) +} + +func serializeEncryptedKeyRSA(w io.Writer, rand io.Reader, header [10]byte, pub *rsa.PublicKey, keyBlock []byte) error { + cipherText, err := rsa.EncryptPKCS1v15(rand, pub, keyBlock) + if err != nil { + return errors.InvalidArgumentError("RSA encryption failed: " + err.Error()) + } + + packetLen := 10 /* header length */ + 2 /* mpi size */ + len(cipherText) + + err = serializeHeader(w, packetTypeEncryptedKey, packetLen) + if err != nil { + return err + } + _, err = w.Write(header[:]) + if err != nil { + return err + } + return writeMPI(w, 8*uint16(len(cipherText)), cipherText) +} + +func serializeEncryptedKeyElGamal(w io.Writer, rand io.Reader, header [10]byte, pub *elgamal.PublicKey, keyBlock []byte) error { + c1, c2, err := elgamal.Encrypt(rand, pub, keyBlock) + if err != nil { + return errors.InvalidArgumentError("ElGamal encryption failed: " + err.Error()) + } + + packetLen := 10 /* header length */ + packetLen += 2 /* mpi size */ + (c1.BitLen()+7)/8 + packetLen += 2 /* mpi size */ + (c2.BitLen()+7)/8 + + err = serializeHeader(w, packetTypeEncryptedKey, packetLen) + if err != nil { + return err + } + _, err = w.Write(header[:]) + if err != nil { + return err + } + err = writeBig(w, c1) + if err != nil { + return err + } + return writeBig(w, c2) +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/literal.go b/vendor/golang.org/x/crypto/openpgp/packet/literal.go new file mode 100644 index 00000000000..1a9ec6e51e8 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/literal.go @@ -0,0 +1,89 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "encoding/binary" + "io" +) + +// LiteralData represents an encrypted file. See RFC 4880, section 5.9. +type LiteralData struct { + IsBinary bool + FileName string + Time uint32 // Unix epoch time. Either creation time or modification time. 0 means undefined. + Body io.Reader +} + +// ForEyesOnly returns whether the contents of the LiteralData have been marked +// as especially sensitive. +func (l *LiteralData) ForEyesOnly() bool { + return l.FileName == "_CONSOLE" +} + +func (l *LiteralData) parse(r io.Reader) (err error) { + var buf [256]byte + + _, err = readFull(r, buf[:2]) + if err != nil { + return + } + + l.IsBinary = buf[0] == 'b' + fileNameLen := int(buf[1]) + + _, err = readFull(r, buf[:fileNameLen]) + if err != nil { + return + } + + l.FileName = string(buf[:fileNameLen]) + + _, err = readFull(r, buf[:4]) + if err != nil { + return + } + + l.Time = binary.BigEndian.Uint32(buf[:4]) + l.Body = r + return +} + +// SerializeLiteral serializes a literal data packet to w and returns a +// WriteCloser to which the data itself can be written and which MUST be closed +// on completion. The fileName is truncated to 255 bytes. +func SerializeLiteral(w io.WriteCloser, isBinary bool, fileName string, time uint32) (plaintext io.WriteCloser, err error) { + var buf [4]byte + buf[0] = 't' + if isBinary { + buf[0] = 'b' + } + if len(fileName) > 255 { + fileName = fileName[:255] + } + buf[1] = byte(len(fileName)) + + inner, err := serializeStreamHeader(w, packetTypeLiteralData) + if err != nil { + return + } + + _, err = inner.Write(buf[:2]) + if err != nil { + return + } + _, err = inner.Write([]byte(fileName)) + if err != nil { + return + } + binary.BigEndian.PutUint32(buf[:], time) + _, err = inner.Write(buf[:]) + if err != nil { + return + } + + plaintext = inner + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go b/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go new file mode 100644 index 00000000000..ce2a33a547c --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go @@ -0,0 +1,143 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// OpenPGP CFB Mode. http://tools.ietf.org/html/rfc4880#section-13.9 + +package packet + +import ( + "crypto/cipher" +) + +type ocfbEncrypter struct { + b cipher.Block + fre []byte + outUsed int +} + +// An OCFBResyncOption determines if the "resynchronization step" of OCFB is +// performed. +type OCFBResyncOption bool + +const ( + OCFBResync OCFBResyncOption = true + OCFBNoResync OCFBResyncOption = false +) + +// NewOCFBEncrypter returns a cipher.Stream which encrypts data with OpenPGP's +// cipher feedback mode using the given cipher.Block, and an initial amount of +// ciphertext. randData must be random bytes and be the same length as the +// cipher.Block's block size. Resync determines if the "resynchronization step" +// from RFC 4880, 13.9 step 7 is performed. Different parts of OpenPGP vary on +// this point. +func NewOCFBEncrypter(block cipher.Block, randData []byte, resync OCFBResyncOption) (cipher.Stream, []byte) { + blockSize := block.BlockSize() + if len(randData) != blockSize { + return nil, nil + } + + x := &ocfbEncrypter{ + b: block, + fre: make([]byte, blockSize), + outUsed: 0, + } + prefix := make([]byte, blockSize+2) + + block.Encrypt(x.fre, x.fre) + for i := 0; i < blockSize; i++ { + prefix[i] = randData[i] ^ x.fre[i] + } + + block.Encrypt(x.fre, prefix[:blockSize]) + prefix[blockSize] = x.fre[0] ^ randData[blockSize-2] + prefix[blockSize+1] = x.fre[1] ^ randData[blockSize-1] + + if resync { + block.Encrypt(x.fre, prefix[2:]) + } else { + x.fre[0] = prefix[blockSize] + x.fre[1] = prefix[blockSize+1] + x.outUsed = 2 + } + return x, prefix +} + +func (x *ocfbEncrypter) XORKeyStream(dst, src []byte) { + for i := 0; i < len(src); i++ { + if x.outUsed == len(x.fre) { + x.b.Encrypt(x.fre, x.fre) + x.outUsed = 0 + } + + x.fre[x.outUsed] ^= src[i] + dst[i] = x.fre[x.outUsed] + x.outUsed++ + } +} + +type ocfbDecrypter struct { + b cipher.Block + fre []byte + outUsed int +} + +// NewOCFBDecrypter returns a cipher.Stream which decrypts data with OpenPGP's +// cipher feedback mode using the given cipher.Block. Prefix must be the first +// blockSize + 2 bytes of the ciphertext, where blockSize is the cipher.Block's +// block size. If an incorrect key is detected then nil is returned. On +// successful exit, blockSize+2 bytes of decrypted data are written into +// prefix. Resync determines if the "resynchronization step" from RFC 4880, +// 13.9 step 7 is performed. Different parts of OpenPGP vary on this point. +func NewOCFBDecrypter(block cipher.Block, prefix []byte, resync OCFBResyncOption) cipher.Stream { + blockSize := block.BlockSize() + if len(prefix) != blockSize+2 { + return nil + } + + x := &ocfbDecrypter{ + b: block, + fre: make([]byte, blockSize), + outUsed: 0, + } + prefixCopy := make([]byte, len(prefix)) + copy(prefixCopy, prefix) + + block.Encrypt(x.fre, x.fre) + for i := 0; i < blockSize; i++ { + prefixCopy[i] ^= x.fre[i] + } + + block.Encrypt(x.fre, prefix[:blockSize]) + prefixCopy[blockSize] ^= x.fre[0] + prefixCopy[blockSize+1] ^= x.fre[1] + + if prefixCopy[blockSize-2] != prefixCopy[blockSize] || + prefixCopy[blockSize-1] != prefixCopy[blockSize+1] { + return nil + } + + if resync { + block.Encrypt(x.fre, prefix[2:]) + } else { + x.fre[0] = prefix[blockSize] + x.fre[1] = prefix[blockSize+1] + x.outUsed = 2 + } + copy(prefix, prefixCopy) + return x +} + +func (x *ocfbDecrypter) XORKeyStream(dst, src []byte) { + for i := 0; i < len(src); i++ { + if x.outUsed == len(x.fre) { + x.b.Encrypt(x.fre, x.fre) + x.outUsed = 0 + } + + c := src[i] + dst[i] = x.fre[x.outUsed] ^ src[i] + x.fre[x.outUsed] = c + x.outUsed++ + } +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go b/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go new file mode 100644 index 00000000000..1713503395e --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go @@ -0,0 +1,73 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto" + "encoding/binary" + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/s2k" + "io" + "strconv" +) + +// OnePassSignature represents a one-pass signature packet. See RFC 4880, +// section 5.4. +type OnePassSignature struct { + SigType SignatureType + Hash crypto.Hash + PubKeyAlgo PublicKeyAlgorithm + KeyId uint64 + IsLast bool +} + +const onePassSignatureVersion = 3 + +func (ops *OnePassSignature) parse(r io.Reader) (err error) { + var buf [13]byte + + _, err = readFull(r, buf[:]) + if err != nil { + return + } + if buf[0] != onePassSignatureVersion { + err = errors.UnsupportedError("one-pass-signature packet version " + strconv.Itoa(int(buf[0]))) + } + + var ok bool + ops.Hash, ok = s2k.HashIdToHash(buf[2]) + if !ok { + return errors.UnsupportedError("hash function: " + strconv.Itoa(int(buf[2]))) + } + + ops.SigType = SignatureType(buf[1]) + ops.PubKeyAlgo = PublicKeyAlgorithm(buf[3]) + ops.KeyId = binary.BigEndian.Uint64(buf[4:12]) + ops.IsLast = buf[12] != 0 + return +} + +// Serialize marshals the given OnePassSignature to w. +func (ops *OnePassSignature) Serialize(w io.Writer) error { + var buf [13]byte + buf[0] = onePassSignatureVersion + buf[1] = uint8(ops.SigType) + var ok bool + buf[2], ok = s2k.HashToHashId(ops.Hash) + if !ok { + return errors.UnsupportedError("hash type: " + strconv.Itoa(int(ops.Hash))) + } + buf[3] = uint8(ops.PubKeyAlgo) + binary.BigEndian.PutUint64(buf[4:12], ops.KeyId) + if ops.IsLast { + buf[12] = 1 + } + + if err := serializeHeader(w, packetTypeOnePassSignature, len(buf)); err != nil { + return err + } + _, err := w.Write(buf[:]) + return err +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/opaque.go b/vendor/golang.org/x/crypto/openpgp/packet/opaque.go new file mode 100644 index 00000000000..456d807f255 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/opaque.go @@ -0,0 +1,162 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "io" + "io/ioutil" + + "golang.org/x/crypto/openpgp/errors" +) + +// OpaquePacket represents an OpenPGP packet as raw, unparsed data. This is +// useful for splitting and storing the original packet contents separately, +// handling unsupported packet types or accessing parts of the packet not yet +// implemented by this package. +type OpaquePacket struct { + // Packet type + Tag uint8 + // Reason why the packet was parsed opaquely + Reason error + // Binary contents of the packet data + Contents []byte +} + +func (op *OpaquePacket) parse(r io.Reader) (err error) { + op.Contents, err = ioutil.ReadAll(r) + return +} + +// Serialize marshals the packet to a writer in its original form, including +// the packet header. +func (op *OpaquePacket) Serialize(w io.Writer) (err error) { + err = serializeHeader(w, packetType(op.Tag), len(op.Contents)) + if err == nil { + _, err = w.Write(op.Contents) + } + return +} + +// Parse attempts to parse the opaque contents into a structure supported by +// this package. If the packet is not known then the result will be another +// OpaquePacket. +func (op *OpaquePacket) Parse() (p Packet, err error) { + hdr := bytes.NewBuffer(nil) + err = serializeHeader(hdr, packetType(op.Tag), len(op.Contents)) + if err != nil { + op.Reason = err + return op, err + } + p, err = Read(io.MultiReader(hdr, bytes.NewBuffer(op.Contents))) + if err != nil { + op.Reason = err + p = op + } + return +} + +// OpaqueReader reads OpaquePackets from an io.Reader. +type OpaqueReader struct { + r io.Reader +} + +func NewOpaqueReader(r io.Reader) *OpaqueReader { + return &OpaqueReader{r: r} +} + +// Read the next OpaquePacket. +func (or *OpaqueReader) Next() (op *OpaquePacket, err error) { + tag, _, contents, err := readHeader(or.r) + if err != nil { + return + } + op = &OpaquePacket{Tag: uint8(tag), Reason: err} + err = op.parse(contents) + if err != nil { + consumeAll(contents) + } + return +} + +// OpaqueSubpacket represents an unparsed OpenPGP subpacket, +// as found in signature and user attribute packets. +type OpaqueSubpacket struct { + SubType uint8 + Contents []byte +} + +// OpaqueSubpackets extracts opaque, unparsed OpenPGP subpackets from +// their byte representation. +func OpaqueSubpackets(contents []byte) (result []*OpaqueSubpacket, err error) { + var ( + subHeaderLen int + subPacket *OpaqueSubpacket + ) + for len(contents) > 0 { + subHeaderLen, subPacket, err = nextSubpacket(contents) + if err != nil { + break + } + result = append(result, subPacket) + contents = contents[subHeaderLen+len(subPacket.Contents):] + } + return +} + +func nextSubpacket(contents []byte) (subHeaderLen int, subPacket *OpaqueSubpacket, err error) { + // RFC 4880, section 5.2.3.1 + var subLen uint32 + if len(contents) < 1 { + goto Truncated + } + subPacket = &OpaqueSubpacket{} + switch { + case contents[0] < 192: + subHeaderLen = 2 // 1 length byte, 1 subtype byte + if len(contents) < subHeaderLen { + goto Truncated + } + subLen = uint32(contents[0]) + contents = contents[1:] + case contents[0] < 255: + subHeaderLen = 3 // 2 length bytes, 1 subtype + if len(contents) < subHeaderLen { + goto Truncated + } + subLen = uint32(contents[0]-192)<<8 + uint32(contents[1]) + 192 + contents = contents[2:] + default: + subHeaderLen = 6 // 5 length bytes, 1 subtype + if len(contents) < subHeaderLen { + goto Truncated + } + subLen = uint32(contents[1])<<24 | + uint32(contents[2])<<16 | + uint32(contents[3])<<8 | + uint32(contents[4]) + contents = contents[5:] + } + if subLen > uint32(len(contents)) || subLen == 0 { + goto Truncated + } + subPacket.SubType = contents[0] + subPacket.Contents = contents[1:subLen] + return +Truncated: + err = errors.StructuralError("subpacket truncated") + return +} + +func (osp *OpaqueSubpacket) Serialize(w io.Writer) (err error) { + buf := make([]byte, 6) + n := serializeSubpacketLength(buf, len(osp.Contents)+1) + buf[n] = osp.SubType + if _, err = w.Write(buf[:n+1]); err != nil { + return + } + _, err = w.Write(osp.Contents) + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/packet.go b/vendor/golang.org/x/crypto/openpgp/packet/packet.go new file mode 100644 index 00000000000..9728d61d7aa --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/packet.go @@ -0,0 +1,584 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package packet implements parsing and serialization of OpenPGP packets, as +// specified in RFC 4880. +package packet // import "golang.org/x/crypto/openpgp/packet" + +import ( + "bufio" + "crypto/aes" + "crypto/cipher" + "crypto/des" + "crypto/rsa" + "io" + "math/big" + "math/bits" + + "golang.org/x/crypto/cast5" + "golang.org/x/crypto/openpgp/errors" +) + +// readFull is the same as io.ReadFull except that reading zero bytes returns +// ErrUnexpectedEOF rather than EOF. +func readFull(r io.Reader, buf []byte) (n int, err error) { + n, err = io.ReadFull(r, buf) + if err == io.EOF { + err = io.ErrUnexpectedEOF + } + return +} + +// readLength reads an OpenPGP length from r. See RFC 4880, section 4.2.2. +func readLength(r io.Reader) (length int64, isPartial bool, err error) { + var buf [4]byte + _, err = readFull(r, buf[:1]) + if err != nil { + return + } + switch { + case buf[0] < 192: + length = int64(buf[0]) + case buf[0] < 224: + length = int64(buf[0]-192) << 8 + _, err = readFull(r, buf[0:1]) + if err != nil { + return + } + length += int64(buf[0]) + 192 + case buf[0] < 255: + length = int64(1) << (buf[0] & 0x1f) + isPartial = true + default: + _, err = readFull(r, buf[0:4]) + if err != nil { + return + } + length = int64(buf[0])<<24 | + int64(buf[1])<<16 | + int64(buf[2])<<8 | + int64(buf[3]) + } + return +} + +// partialLengthReader wraps an io.Reader and handles OpenPGP partial lengths. +// The continuation lengths are parsed and removed from the stream and EOF is +// returned at the end of the packet. See RFC 4880, section 4.2.2.4. +type partialLengthReader struct { + r io.Reader + remaining int64 + isPartial bool +} + +func (r *partialLengthReader) Read(p []byte) (n int, err error) { + for r.remaining == 0 { + if !r.isPartial { + return 0, io.EOF + } + r.remaining, r.isPartial, err = readLength(r.r) + if err != nil { + return 0, err + } + } + + toRead := int64(len(p)) + if toRead > r.remaining { + toRead = r.remaining + } + + n, err = r.r.Read(p[:int(toRead)]) + r.remaining -= int64(n) + if n < int(toRead) && err == io.EOF { + err = io.ErrUnexpectedEOF + } + return +} + +// partialLengthWriter writes a stream of data using OpenPGP partial lengths. +// See RFC 4880, section 4.2.2.4. +type partialLengthWriter struct { + w io.WriteCloser + lengthByte [1]byte + sentFirst bool + buf []byte +} + +// RFC 4880 4.2.2.4: the first partial length MUST be at least 512 octets long. +const minFirstPartialWrite = 512 + +func (w *partialLengthWriter) Write(p []byte) (n int, err error) { + off := 0 + if !w.sentFirst { + if len(w.buf) > 0 || len(p) < minFirstPartialWrite { + off = len(w.buf) + w.buf = append(w.buf, p...) + if len(w.buf) < minFirstPartialWrite { + return len(p), nil + } + p = w.buf + w.buf = nil + } + w.sentFirst = true + } + + power := uint8(30) + for len(p) > 0 { + l := 1 << power + if len(p) < l { + power = uint8(bits.Len32(uint32(len(p)))) - 1 + l = 1 << power + } + w.lengthByte[0] = 224 + power + _, err = w.w.Write(w.lengthByte[:]) + if err == nil { + var m int + m, err = w.w.Write(p[:l]) + n += m + } + if err != nil { + if n < off { + return 0, err + } + return n - off, err + } + p = p[l:] + } + return n - off, nil +} + +func (w *partialLengthWriter) Close() error { + if len(w.buf) > 0 { + // In this case we can't send a 512 byte packet. + // Just send what we have. + p := w.buf + w.sentFirst = true + w.buf = nil + if _, err := w.Write(p); err != nil { + return err + } + } + + w.lengthByte[0] = 0 + _, err := w.w.Write(w.lengthByte[:]) + if err != nil { + return err + } + return w.w.Close() +} + +// A spanReader is an io.LimitReader, but it returns ErrUnexpectedEOF if the +// underlying Reader returns EOF before the limit has been reached. +type spanReader struct { + r io.Reader + n int64 +} + +func (l *spanReader) Read(p []byte) (n int, err error) { + if l.n <= 0 { + return 0, io.EOF + } + if int64(len(p)) > l.n { + p = p[0:l.n] + } + n, err = l.r.Read(p) + l.n -= int64(n) + if l.n > 0 && err == io.EOF { + err = io.ErrUnexpectedEOF + } + return +} + +// readHeader parses a packet header and returns an io.Reader which will return +// the contents of the packet. See RFC 4880, section 4.2. +func readHeader(r io.Reader) (tag packetType, length int64, contents io.Reader, err error) { + var buf [4]byte + _, err = io.ReadFull(r, buf[:1]) + if err != nil { + return + } + if buf[0]&0x80 == 0 { + err = errors.StructuralError("tag byte does not have MSB set") + return + } + if buf[0]&0x40 == 0 { + // Old format packet + tag = packetType((buf[0] & 0x3f) >> 2) + lengthType := buf[0] & 3 + if lengthType == 3 { + length = -1 + contents = r + return + } + lengthBytes := 1 << lengthType + _, err = readFull(r, buf[0:lengthBytes]) + if err != nil { + return + } + for i := 0; i < lengthBytes; i++ { + length <<= 8 + length |= int64(buf[i]) + } + contents = &spanReader{r, length} + return + } + + // New format packet + tag = packetType(buf[0] & 0x3f) + length, isPartial, err := readLength(r) + if err != nil { + return + } + if isPartial { + contents = &partialLengthReader{ + remaining: length, + isPartial: true, + r: r, + } + length = -1 + } else { + contents = &spanReader{r, length} + } + return +} + +// serializeHeader writes an OpenPGP packet header to w. See RFC 4880, section +// 4.2. +func serializeHeader(w io.Writer, ptype packetType, length int) (err error) { + var buf [6]byte + var n int + + buf[0] = 0x80 | 0x40 | byte(ptype) + if length < 192 { + buf[1] = byte(length) + n = 2 + } else if length < 8384 { + length -= 192 + buf[1] = 192 + byte(length>>8) + buf[2] = byte(length) + n = 3 + } else { + buf[1] = 255 + buf[2] = byte(length >> 24) + buf[3] = byte(length >> 16) + buf[4] = byte(length >> 8) + buf[5] = byte(length) + n = 6 + } + + _, err = w.Write(buf[:n]) + return +} + +// serializeStreamHeader writes an OpenPGP packet header to w where the +// length of the packet is unknown. It returns a io.WriteCloser which can be +// used to write the contents of the packet. See RFC 4880, section 4.2. +func serializeStreamHeader(w io.WriteCloser, ptype packetType) (out io.WriteCloser, err error) { + var buf [1]byte + buf[0] = 0x80 | 0x40 | byte(ptype) + _, err = w.Write(buf[:]) + if err != nil { + return + } + out = &partialLengthWriter{w: w} + return +} + +// Packet represents an OpenPGP packet. Users are expected to try casting +// instances of this interface to specific packet types. +type Packet interface { + parse(io.Reader) error +} + +// consumeAll reads from the given Reader until error, returning the number of +// bytes read. +func consumeAll(r io.Reader) (n int64, err error) { + var m int + var buf [1024]byte + + for { + m, err = r.Read(buf[:]) + n += int64(m) + if err == io.EOF { + err = nil + return + } + if err != nil { + return + } + } +} + +// packetType represents the numeric ids of the different OpenPGP packet types. See +// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-2 +type packetType uint8 + +const ( + packetTypeEncryptedKey packetType = 1 + packetTypeSignature packetType = 2 + packetTypeSymmetricKeyEncrypted packetType = 3 + packetTypeOnePassSignature packetType = 4 + packetTypePrivateKey packetType = 5 + packetTypePublicKey packetType = 6 + packetTypePrivateSubkey packetType = 7 + packetTypeCompressed packetType = 8 + packetTypeSymmetricallyEncrypted packetType = 9 + packetTypeLiteralData packetType = 11 + packetTypeUserId packetType = 13 + packetTypePublicSubkey packetType = 14 + packetTypeUserAttribute packetType = 17 + packetTypeSymmetricallyEncryptedMDC packetType = 18 +) + +// peekVersion detects the version of a public key packet about to +// be read. A bufio.Reader at the original position of the io.Reader +// is returned. +func peekVersion(r io.Reader) (bufr *bufio.Reader, ver byte, err error) { + bufr = bufio.NewReader(r) + var verBuf []byte + if verBuf, err = bufr.Peek(1); err != nil { + return + } + ver = verBuf[0] + return +} + +// Read reads a single OpenPGP packet from the given io.Reader. If there is an +// error parsing a packet, the whole packet is consumed from the input. +func Read(r io.Reader) (p Packet, err error) { + tag, _, contents, err := readHeader(r) + if err != nil { + return + } + + switch tag { + case packetTypeEncryptedKey: + p = new(EncryptedKey) + case packetTypeSignature: + var version byte + // Detect signature version + if contents, version, err = peekVersion(contents); err != nil { + return + } + if version < 4 { + p = new(SignatureV3) + } else { + p = new(Signature) + } + case packetTypeSymmetricKeyEncrypted: + p = new(SymmetricKeyEncrypted) + case packetTypeOnePassSignature: + p = new(OnePassSignature) + case packetTypePrivateKey, packetTypePrivateSubkey: + pk := new(PrivateKey) + if tag == packetTypePrivateSubkey { + pk.IsSubkey = true + } + p = pk + case packetTypePublicKey, packetTypePublicSubkey: + var version byte + if contents, version, err = peekVersion(contents); err != nil { + return + } + isSubkey := tag == packetTypePublicSubkey + if version < 4 { + p = &PublicKeyV3{IsSubkey: isSubkey} + } else { + p = &PublicKey{IsSubkey: isSubkey} + } + case packetTypeCompressed: + p = new(Compressed) + case packetTypeSymmetricallyEncrypted: + p = new(SymmetricallyEncrypted) + case packetTypeLiteralData: + p = new(LiteralData) + case packetTypeUserId: + p = new(UserId) + case packetTypeUserAttribute: + p = new(UserAttribute) + case packetTypeSymmetricallyEncryptedMDC: + se := new(SymmetricallyEncrypted) + se.MDC = true + p = se + default: + err = errors.UnknownPacketTypeError(tag) + } + if p != nil { + err = p.parse(contents) + } + if err != nil { + consumeAll(contents) + } + return +} + +// SignatureType represents the different semantic meanings of an OpenPGP +// signature. See RFC 4880, section 5.2.1. +type SignatureType uint8 + +const ( + SigTypeBinary SignatureType = 0 + SigTypeText = 1 + SigTypeGenericCert = 0x10 + SigTypePersonaCert = 0x11 + SigTypeCasualCert = 0x12 + SigTypePositiveCert = 0x13 + SigTypeSubkeyBinding = 0x18 + SigTypePrimaryKeyBinding = 0x19 + SigTypeDirectSignature = 0x1F + SigTypeKeyRevocation = 0x20 + SigTypeSubkeyRevocation = 0x28 +) + +// PublicKeyAlgorithm represents the different public key system specified for +// OpenPGP. See +// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-12 +type PublicKeyAlgorithm uint8 + +const ( + PubKeyAlgoRSA PublicKeyAlgorithm = 1 + PubKeyAlgoElGamal PublicKeyAlgorithm = 16 + PubKeyAlgoDSA PublicKeyAlgorithm = 17 + // RFC 6637, Section 5. + PubKeyAlgoECDH PublicKeyAlgorithm = 18 + PubKeyAlgoECDSA PublicKeyAlgorithm = 19 + + // Deprecated in RFC 4880, Section 13.5. Use key flags instead. + PubKeyAlgoRSAEncryptOnly PublicKeyAlgorithm = 2 + PubKeyAlgoRSASignOnly PublicKeyAlgorithm = 3 +) + +// CanEncrypt returns true if it's possible to encrypt a message to a public +// key of the given type. +func (pka PublicKeyAlgorithm) CanEncrypt() bool { + switch pka { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal: + return true + } + return false +} + +// CanSign returns true if it's possible for a public key of the given type to +// sign a message. +func (pka PublicKeyAlgorithm) CanSign() bool { + switch pka { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA: + return true + } + return false +} + +// CipherFunction represents the different block ciphers specified for OpenPGP. See +// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-13 +type CipherFunction uint8 + +const ( + Cipher3DES CipherFunction = 2 + CipherCAST5 CipherFunction = 3 + CipherAES128 CipherFunction = 7 + CipherAES192 CipherFunction = 8 + CipherAES256 CipherFunction = 9 +) + +// KeySize returns the key size, in bytes, of cipher. +func (cipher CipherFunction) KeySize() int { + switch cipher { + case Cipher3DES: + return 24 + case CipherCAST5: + return cast5.KeySize + case CipherAES128: + return 16 + case CipherAES192: + return 24 + case CipherAES256: + return 32 + } + return 0 +} + +// blockSize returns the block size, in bytes, of cipher. +func (cipher CipherFunction) blockSize() int { + switch cipher { + case Cipher3DES: + return des.BlockSize + case CipherCAST5: + return 8 + case CipherAES128, CipherAES192, CipherAES256: + return 16 + } + return 0 +} + +// new returns a fresh instance of the given cipher. +func (cipher CipherFunction) new(key []byte) (block cipher.Block) { + switch cipher { + case Cipher3DES: + block, _ = des.NewTripleDESCipher(key) + case CipherCAST5: + block, _ = cast5.NewCipher(key) + case CipherAES128, CipherAES192, CipherAES256: + block, _ = aes.NewCipher(key) + } + return +} + +// readMPI reads a big integer from r. The bit length returned is the bit +// length that was specified in r. This is preserved so that the integer can be +// reserialized exactly. +func readMPI(r io.Reader) (mpi []byte, bitLength uint16, err error) { + var buf [2]byte + _, err = readFull(r, buf[0:]) + if err != nil { + return + } + bitLength = uint16(buf[0])<<8 | uint16(buf[1]) + numBytes := (int(bitLength) + 7) / 8 + mpi = make([]byte, numBytes) + _, err = readFull(r, mpi) + // According to RFC 4880 3.2. we should check that the MPI has no leading + // zeroes (at least when not an encrypted MPI?), but this implementation + // does generate leading zeroes, so we keep accepting them. + return +} + +// writeMPI serializes a big integer to w. +func writeMPI(w io.Writer, bitLength uint16, mpiBytes []byte) (err error) { + // Note that we can produce leading zeroes, in violation of RFC 4880 3.2. + // Implementations seem to be tolerant of them, and stripping them would + // make it complex to guarantee matching re-serialization. + _, err = w.Write([]byte{byte(bitLength >> 8), byte(bitLength)}) + if err == nil { + _, err = w.Write(mpiBytes) + } + return +} + +// writeBig serializes a *big.Int to w. +func writeBig(w io.Writer, i *big.Int) error { + return writeMPI(w, uint16(i.BitLen()), i.Bytes()) +} + +// padToKeySize left-pads a MPI with zeroes to match the length of the +// specified RSA public. +func padToKeySize(pub *rsa.PublicKey, b []byte) []byte { + k := (pub.N.BitLen() + 7) / 8 + if len(b) >= k { + return b + } + bb := make([]byte, k) + copy(bb[len(bb)-len(b):], b) + return bb +} + +// CompressionAlgo Represents the different compression algorithms +// supported by OpenPGP (except for BZIP2, which is not currently +// supported). See Section 9.3 of RFC 4880. +type CompressionAlgo uint8 + +const ( + CompressionNone CompressionAlgo = 0 + CompressionZIP CompressionAlgo = 1 + CompressionZLIB CompressionAlgo = 2 +) diff --git a/vendor/golang.org/x/crypto/openpgp/packet/private_key.go b/vendor/golang.org/x/crypto/openpgp/packet/private_key.go new file mode 100644 index 00000000000..81abb7cef98 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/private_key.go @@ -0,0 +1,385 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "crypto" + "crypto/cipher" + "crypto/dsa" + "crypto/ecdsa" + "crypto/rsa" + "crypto/sha1" + "io" + "io/ioutil" + "math/big" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/elgamal" + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/s2k" +) + +// PrivateKey represents a possibly encrypted private key. See RFC 4880, +// section 5.5.3. +type PrivateKey struct { + PublicKey + Encrypted bool // if true then the private key is unavailable until Decrypt has been called. + encryptedData []byte + cipher CipherFunction + s2k func(out, in []byte) + PrivateKey interface{} // An *{rsa|dsa|ecdsa}.PrivateKey or crypto.Signer/crypto.Decrypter (Decryptor RSA only). + sha1Checksum bool + iv []byte +} + +func NewRSAPrivateKey(creationTime time.Time, priv *rsa.PrivateKey) *PrivateKey { + pk := new(PrivateKey) + pk.PublicKey = *NewRSAPublicKey(creationTime, &priv.PublicKey) + pk.PrivateKey = priv + return pk +} + +func NewDSAPrivateKey(creationTime time.Time, priv *dsa.PrivateKey) *PrivateKey { + pk := new(PrivateKey) + pk.PublicKey = *NewDSAPublicKey(creationTime, &priv.PublicKey) + pk.PrivateKey = priv + return pk +} + +func NewElGamalPrivateKey(creationTime time.Time, priv *elgamal.PrivateKey) *PrivateKey { + pk := new(PrivateKey) + pk.PublicKey = *NewElGamalPublicKey(creationTime, &priv.PublicKey) + pk.PrivateKey = priv + return pk +} + +func NewECDSAPrivateKey(creationTime time.Time, priv *ecdsa.PrivateKey) *PrivateKey { + pk := new(PrivateKey) + pk.PublicKey = *NewECDSAPublicKey(creationTime, &priv.PublicKey) + pk.PrivateKey = priv + return pk +} + +// NewSignerPrivateKey creates a PrivateKey from a crypto.Signer that +// implements RSA or ECDSA. +func NewSignerPrivateKey(creationTime time.Time, signer crypto.Signer) *PrivateKey { + pk := new(PrivateKey) + // In general, the public Keys should be used as pointers. We still + // type-switch on the values, for backwards-compatibility. + switch pubkey := signer.Public().(type) { + case *rsa.PublicKey: + pk.PublicKey = *NewRSAPublicKey(creationTime, pubkey) + case rsa.PublicKey: + pk.PublicKey = *NewRSAPublicKey(creationTime, &pubkey) + case *ecdsa.PublicKey: + pk.PublicKey = *NewECDSAPublicKey(creationTime, pubkey) + case ecdsa.PublicKey: + pk.PublicKey = *NewECDSAPublicKey(creationTime, &pubkey) + default: + panic("openpgp: unknown crypto.Signer type in NewSignerPrivateKey") + } + pk.PrivateKey = signer + return pk +} + +func (pk *PrivateKey) parse(r io.Reader) (err error) { + err = (&pk.PublicKey).parse(r) + if err != nil { + return + } + var buf [1]byte + _, err = readFull(r, buf[:]) + if err != nil { + return + } + + s2kType := buf[0] + + switch s2kType { + case 0: + pk.s2k = nil + pk.Encrypted = false + case 254, 255: + _, err = readFull(r, buf[:]) + if err != nil { + return + } + pk.cipher = CipherFunction(buf[0]) + pk.Encrypted = true + pk.s2k, err = s2k.Parse(r) + if err != nil { + return + } + if s2kType == 254 { + pk.sha1Checksum = true + } + default: + return errors.UnsupportedError("deprecated s2k function in private key") + } + + if pk.Encrypted { + blockSize := pk.cipher.blockSize() + if blockSize == 0 { + return errors.UnsupportedError("unsupported cipher in private key: " + strconv.Itoa(int(pk.cipher))) + } + pk.iv = make([]byte, blockSize) + _, err = readFull(r, pk.iv) + if err != nil { + return + } + } + + pk.encryptedData, err = ioutil.ReadAll(r) + if err != nil { + return + } + + if !pk.Encrypted { + return pk.parsePrivateKey(pk.encryptedData) + } + + return +} + +func mod64kHash(d []byte) uint16 { + var h uint16 + for _, b := range d { + h += uint16(b) + } + return h +} + +func (pk *PrivateKey) Serialize(w io.Writer) (err error) { + // TODO(agl): support encrypted private keys + buf := bytes.NewBuffer(nil) + err = pk.PublicKey.serializeWithoutHeaders(buf) + if err != nil { + return + } + buf.WriteByte(0 /* no encryption */) + + privateKeyBuf := bytes.NewBuffer(nil) + + switch priv := pk.PrivateKey.(type) { + case *rsa.PrivateKey: + err = serializeRSAPrivateKey(privateKeyBuf, priv) + case *dsa.PrivateKey: + err = serializeDSAPrivateKey(privateKeyBuf, priv) + case *elgamal.PrivateKey: + err = serializeElGamalPrivateKey(privateKeyBuf, priv) + case *ecdsa.PrivateKey: + err = serializeECDSAPrivateKey(privateKeyBuf, priv) + default: + err = errors.InvalidArgumentError("unknown private key type") + } + if err != nil { + return + } + + ptype := packetTypePrivateKey + contents := buf.Bytes() + privateKeyBytes := privateKeyBuf.Bytes() + if pk.IsSubkey { + ptype = packetTypePrivateSubkey + } + err = serializeHeader(w, ptype, len(contents)+len(privateKeyBytes)+2) + if err != nil { + return + } + _, err = w.Write(contents) + if err != nil { + return + } + _, err = w.Write(privateKeyBytes) + if err != nil { + return + } + + checksum := mod64kHash(privateKeyBytes) + var checksumBytes [2]byte + checksumBytes[0] = byte(checksum >> 8) + checksumBytes[1] = byte(checksum) + _, err = w.Write(checksumBytes[:]) + + return +} + +func serializeRSAPrivateKey(w io.Writer, priv *rsa.PrivateKey) error { + err := writeBig(w, priv.D) + if err != nil { + return err + } + err = writeBig(w, priv.Primes[1]) + if err != nil { + return err + } + err = writeBig(w, priv.Primes[0]) + if err != nil { + return err + } + return writeBig(w, priv.Precomputed.Qinv) +} + +func serializeDSAPrivateKey(w io.Writer, priv *dsa.PrivateKey) error { + return writeBig(w, priv.X) +} + +func serializeElGamalPrivateKey(w io.Writer, priv *elgamal.PrivateKey) error { + return writeBig(w, priv.X) +} + +func serializeECDSAPrivateKey(w io.Writer, priv *ecdsa.PrivateKey) error { + return writeBig(w, priv.D) +} + +// Decrypt decrypts an encrypted private key using a passphrase. +func (pk *PrivateKey) Decrypt(passphrase []byte) error { + if !pk.Encrypted { + return nil + } + + key := make([]byte, pk.cipher.KeySize()) + pk.s2k(key, passphrase) + block := pk.cipher.new(key) + cfb := cipher.NewCFBDecrypter(block, pk.iv) + + data := make([]byte, len(pk.encryptedData)) + cfb.XORKeyStream(data, pk.encryptedData) + + if pk.sha1Checksum { + if len(data) < sha1.Size { + return errors.StructuralError("truncated private key data") + } + h := sha1.New() + h.Write(data[:len(data)-sha1.Size]) + sum := h.Sum(nil) + if !bytes.Equal(sum, data[len(data)-sha1.Size:]) { + return errors.StructuralError("private key checksum failure") + } + data = data[:len(data)-sha1.Size] + } else { + if len(data) < 2 { + return errors.StructuralError("truncated private key data") + } + var sum uint16 + for i := 0; i < len(data)-2; i++ { + sum += uint16(data[i]) + } + if data[len(data)-2] != uint8(sum>>8) || + data[len(data)-1] != uint8(sum) { + return errors.StructuralError("private key checksum failure") + } + data = data[:len(data)-2] + } + + return pk.parsePrivateKey(data) +} + +func (pk *PrivateKey) parsePrivateKey(data []byte) (err error) { + switch pk.PublicKey.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoRSAEncryptOnly: + return pk.parseRSAPrivateKey(data) + case PubKeyAlgoDSA: + return pk.parseDSAPrivateKey(data) + case PubKeyAlgoElGamal: + return pk.parseElGamalPrivateKey(data) + case PubKeyAlgoECDSA: + return pk.parseECDSAPrivateKey(data) + } + panic("impossible") +} + +func (pk *PrivateKey) parseRSAPrivateKey(data []byte) (err error) { + rsaPub := pk.PublicKey.PublicKey.(*rsa.PublicKey) + rsaPriv := new(rsa.PrivateKey) + rsaPriv.PublicKey = *rsaPub + + buf := bytes.NewBuffer(data) + d, _, err := readMPI(buf) + if err != nil { + return + } + p, _, err := readMPI(buf) + if err != nil { + return + } + q, _, err := readMPI(buf) + if err != nil { + return + } + + rsaPriv.D = new(big.Int).SetBytes(d) + rsaPriv.Primes = make([]*big.Int, 2) + rsaPriv.Primes[0] = new(big.Int).SetBytes(p) + rsaPriv.Primes[1] = new(big.Int).SetBytes(q) + if err := rsaPriv.Validate(); err != nil { + return err + } + rsaPriv.Precompute() + pk.PrivateKey = rsaPriv + pk.Encrypted = false + pk.encryptedData = nil + + return nil +} + +func (pk *PrivateKey) parseDSAPrivateKey(data []byte) (err error) { + dsaPub := pk.PublicKey.PublicKey.(*dsa.PublicKey) + dsaPriv := new(dsa.PrivateKey) + dsaPriv.PublicKey = *dsaPub + + buf := bytes.NewBuffer(data) + x, _, err := readMPI(buf) + if err != nil { + return + } + + dsaPriv.X = new(big.Int).SetBytes(x) + pk.PrivateKey = dsaPriv + pk.Encrypted = false + pk.encryptedData = nil + + return nil +} + +func (pk *PrivateKey) parseElGamalPrivateKey(data []byte) (err error) { + pub := pk.PublicKey.PublicKey.(*elgamal.PublicKey) + priv := new(elgamal.PrivateKey) + priv.PublicKey = *pub + + buf := bytes.NewBuffer(data) + x, _, err := readMPI(buf) + if err != nil { + return + } + + priv.X = new(big.Int).SetBytes(x) + pk.PrivateKey = priv + pk.Encrypted = false + pk.encryptedData = nil + + return nil +} + +func (pk *PrivateKey) parseECDSAPrivateKey(data []byte) (err error) { + ecdsaPub := pk.PublicKey.PublicKey.(*ecdsa.PublicKey) + + buf := bytes.NewBuffer(data) + d, _, err := readMPI(buf) + if err != nil { + return + } + + pk.PrivateKey = &ecdsa.PrivateKey{ + PublicKey: *ecdsaPub, + D: new(big.Int).SetBytes(d), + } + pk.Encrypted = false + pk.encryptedData = nil + + return nil +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/public_key.go b/vendor/golang.org/x/crypto/openpgp/packet/public_key.go new file mode 100644 index 00000000000..fcd5f525196 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/public_key.go @@ -0,0 +1,753 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "crypto" + "crypto/dsa" + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rsa" + "crypto/sha1" + _ "crypto/sha256" + _ "crypto/sha512" + "encoding/binary" + "fmt" + "hash" + "io" + "math/big" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/elgamal" + "golang.org/x/crypto/openpgp/errors" +) + +var ( + // NIST curve P-256 + oidCurveP256 []byte = []byte{0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07} + // NIST curve P-384 + oidCurveP384 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x22} + // NIST curve P-521 + oidCurveP521 []byte = []byte{0x2B, 0x81, 0x04, 0x00, 0x23} +) + +const maxOIDLength = 8 + +// ecdsaKey stores the algorithm-specific fields for ECDSA keys. +// as defined in RFC 6637, Section 9. +type ecdsaKey struct { + // oid contains the OID byte sequence identifying the elliptic curve used + oid []byte + // p contains the elliptic curve point that represents the public key + p parsedMPI +} + +// parseOID reads the OID for the curve as defined in RFC 6637, Section 9. +func parseOID(r io.Reader) (oid []byte, err error) { + buf := make([]byte, maxOIDLength) + if _, err = readFull(r, buf[:1]); err != nil { + return + } + oidLen := buf[0] + if int(oidLen) > len(buf) { + err = errors.UnsupportedError("invalid oid length: " + strconv.Itoa(int(oidLen))) + return + } + oid = buf[:oidLen] + _, err = readFull(r, oid) + return +} + +func (f *ecdsaKey) parse(r io.Reader) (err error) { + if f.oid, err = parseOID(r); err != nil { + return err + } + f.p.bytes, f.p.bitLength, err = readMPI(r) + return +} + +func (f *ecdsaKey) serialize(w io.Writer) (err error) { + buf := make([]byte, maxOIDLength+1) + buf[0] = byte(len(f.oid)) + copy(buf[1:], f.oid) + if _, err = w.Write(buf[:len(f.oid)+1]); err != nil { + return + } + return writeMPIs(w, f.p) +} + +func (f *ecdsaKey) newECDSA() (*ecdsa.PublicKey, error) { + var c elliptic.Curve + if bytes.Equal(f.oid, oidCurveP256) { + c = elliptic.P256() + } else if bytes.Equal(f.oid, oidCurveP384) { + c = elliptic.P384() + } else if bytes.Equal(f.oid, oidCurveP521) { + c = elliptic.P521() + } else { + return nil, errors.UnsupportedError(fmt.Sprintf("unsupported oid: %x", f.oid)) + } + x, y := elliptic.Unmarshal(c, f.p.bytes) + if x == nil { + return nil, errors.UnsupportedError("failed to parse EC point") + } + return &ecdsa.PublicKey{Curve: c, X: x, Y: y}, nil +} + +func (f *ecdsaKey) byteLen() int { + return 1 + len(f.oid) + 2 + len(f.p.bytes) +} + +type kdfHashFunction byte +type kdfAlgorithm byte + +// ecdhKdf stores key derivation function parameters +// used for ECDH encryption. See RFC 6637, Section 9. +type ecdhKdf struct { + KdfHash kdfHashFunction + KdfAlgo kdfAlgorithm +} + +func (f *ecdhKdf) parse(r io.Reader) (err error) { + buf := make([]byte, 1) + if _, err = readFull(r, buf); err != nil { + return + } + kdfLen := int(buf[0]) + if kdfLen < 3 { + return errors.UnsupportedError("Unsupported ECDH KDF length: " + strconv.Itoa(kdfLen)) + } + buf = make([]byte, kdfLen) + if _, err = readFull(r, buf); err != nil { + return + } + reserved := int(buf[0]) + f.KdfHash = kdfHashFunction(buf[1]) + f.KdfAlgo = kdfAlgorithm(buf[2]) + if reserved != 0x01 { + return errors.UnsupportedError("Unsupported KDF reserved field: " + strconv.Itoa(reserved)) + } + return +} + +func (f *ecdhKdf) serialize(w io.Writer) (err error) { + buf := make([]byte, 4) + // See RFC 6637, Section 9, Algorithm-Specific Fields for ECDH keys. + buf[0] = byte(0x03) // Length of the following fields + buf[1] = byte(0x01) // Reserved for future extensions, must be 1 for now + buf[2] = byte(f.KdfHash) + buf[3] = byte(f.KdfAlgo) + _, err = w.Write(buf[:]) + return +} + +func (f *ecdhKdf) byteLen() int { + return 4 +} + +// PublicKey represents an OpenPGP public key. See RFC 4880, section 5.5.2. +type PublicKey struct { + CreationTime time.Time + PubKeyAlgo PublicKeyAlgorithm + PublicKey interface{} // *rsa.PublicKey, *dsa.PublicKey or *ecdsa.PublicKey + Fingerprint [20]byte + KeyId uint64 + IsSubkey bool + + n, e, p, q, g, y parsedMPI + + // RFC 6637 fields + ec *ecdsaKey + ecdh *ecdhKdf +} + +// signingKey provides a convenient abstraction over signature verification +// for v3 and v4 public keys. +type signingKey interface { + SerializeSignaturePrefix(io.Writer) + serializeWithoutHeaders(io.Writer) error +} + +func fromBig(n *big.Int) parsedMPI { + return parsedMPI{ + bytes: n.Bytes(), + bitLength: uint16(n.BitLen()), + } +} + +// NewRSAPublicKey returns a PublicKey that wraps the given rsa.PublicKey. +func NewRSAPublicKey(creationTime time.Time, pub *rsa.PublicKey) *PublicKey { + pk := &PublicKey{ + CreationTime: creationTime, + PubKeyAlgo: PubKeyAlgoRSA, + PublicKey: pub, + n: fromBig(pub.N), + e: fromBig(big.NewInt(int64(pub.E))), + } + + pk.setFingerPrintAndKeyId() + return pk +} + +// NewDSAPublicKey returns a PublicKey that wraps the given dsa.PublicKey. +func NewDSAPublicKey(creationTime time.Time, pub *dsa.PublicKey) *PublicKey { + pk := &PublicKey{ + CreationTime: creationTime, + PubKeyAlgo: PubKeyAlgoDSA, + PublicKey: pub, + p: fromBig(pub.P), + q: fromBig(pub.Q), + g: fromBig(pub.G), + y: fromBig(pub.Y), + } + + pk.setFingerPrintAndKeyId() + return pk +} + +// NewElGamalPublicKey returns a PublicKey that wraps the given elgamal.PublicKey. +func NewElGamalPublicKey(creationTime time.Time, pub *elgamal.PublicKey) *PublicKey { + pk := &PublicKey{ + CreationTime: creationTime, + PubKeyAlgo: PubKeyAlgoElGamal, + PublicKey: pub, + p: fromBig(pub.P), + g: fromBig(pub.G), + y: fromBig(pub.Y), + } + + pk.setFingerPrintAndKeyId() + return pk +} + +func NewECDSAPublicKey(creationTime time.Time, pub *ecdsa.PublicKey) *PublicKey { + pk := &PublicKey{ + CreationTime: creationTime, + PubKeyAlgo: PubKeyAlgoECDSA, + PublicKey: pub, + ec: new(ecdsaKey), + } + + switch pub.Curve { + case elliptic.P256(): + pk.ec.oid = oidCurveP256 + case elliptic.P384(): + pk.ec.oid = oidCurveP384 + case elliptic.P521(): + pk.ec.oid = oidCurveP521 + default: + panic("unknown elliptic curve") + } + + pk.ec.p.bytes = elliptic.Marshal(pub.Curve, pub.X, pub.Y) + + // The bit length is 3 (for the 0x04 specifying an uncompressed key) + // plus two field elements (for x and y), which are rounded up to the + // nearest byte. See https://tools.ietf.org/html/rfc6637#section-6 + fieldBytes := (pub.Curve.Params().BitSize + 7) & ^7 + pk.ec.p.bitLength = uint16(3 + fieldBytes + fieldBytes) + + pk.setFingerPrintAndKeyId() + return pk +} + +func (pk *PublicKey) parse(r io.Reader) (err error) { + // RFC 4880, section 5.5.2 + var buf [6]byte + _, err = readFull(r, buf[:]) + if err != nil { + return + } + if buf[0] != 4 { + return errors.UnsupportedError("public key version") + } + pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0) + pk.PubKeyAlgo = PublicKeyAlgorithm(buf[5]) + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + err = pk.parseRSA(r) + case PubKeyAlgoDSA: + err = pk.parseDSA(r) + case PubKeyAlgoElGamal: + err = pk.parseElGamal(r) + case PubKeyAlgoECDSA: + pk.ec = new(ecdsaKey) + if err = pk.ec.parse(r); err != nil { + return err + } + pk.PublicKey, err = pk.ec.newECDSA() + case PubKeyAlgoECDH: + pk.ec = new(ecdsaKey) + if err = pk.ec.parse(r); err != nil { + return + } + pk.ecdh = new(ecdhKdf) + if err = pk.ecdh.parse(r); err != nil { + return + } + // The ECDH key is stored in an ecdsa.PublicKey for convenience. + pk.PublicKey, err = pk.ec.newECDSA() + default: + err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo))) + } + if err != nil { + return + } + + pk.setFingerPrintAndKeyId() + return +} + +func (pk *PublicKey) setFingerPrintAndKeyId() { + // RFC 4880, section 12.2 + fingerPrint := sha1.New() + pk.SerializeSignaturePrefix(fingerPrint) + pk.serializeWithoutHeaders(fingerPrint) + copy(pk.Fingerprint[:], fingerPrint.Sum(nil)) + pk.KeyId = binary.BigEndian.Uint64(pk.Fingerprint[12:20]) +} + +// parseRSA parses RSA public key material from the given Reader. See RFC 4880, +// section 5.5.2. +func (pk *PublicKey) parseRSA(r io.Reader) (err error) { + pk.n.bytes, pk.n.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.e.bytes, pk.e.bitLength, err = readMPI(r) + if err != nil { + return + } + + if len(pk.e.bytes) > 3 { + err = errors.UnsupportedError("large public exponent") + return + } + rsa := &rsa.PublicKey{ + N: new(big.Int).SetBytes(pk.n.bytes), + E: 0, + } + for i := 0; i < len(pk.e.bytes); i++ { + rsa.E <<= 8 + rsa.E |= int(pk.e.bytes[i]) + } + pk.PublicKey = rsa + return +} + +// parseDSA parses DSA public key material from the given Reader. See RFC 4880, +// section 5.5.2. +func (pk *PublicKey) parseDSA(r io.Reader) (err error) { + pk.p.bytes, pk.p.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.q.bytes, pk.q.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.g.bytes, pk.g.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.y.bytes, pk.y.bitLength, err = readMPI(r) + if err != nil { + return + } + + dsa := new(dsa.PublicKey) + dsa.P = new(big.Int).SetBytes(pk.p.bytes) + dsa.Q = new(big.Int).SetBytes(pk.q.bytes) + dsa.G = new(big.Int).SetBytes(pk.g.bytes) + dsa.Y = new(big.Int).SetBytes(pk.y.bytes) + pk.PublicKey = dsa + return +} + +// parseElGamal parses ElGamal public key material from the given Reader. See +// RFC 4880, section 5.5.2. +func (pk *PublicKey) parseElGamal(r io.Reader) (err error) { + pk.p.bytes, pk.p.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.g.bytes, pk.g.bitLength, err = readMPI(r) + if err != nil { + return + } + pk.y.bytes, pk.y.bitLength, err = readMPI(r) + if err != nil { + return + } + + elgamal := new(elgamal.PublicKey) + elgamal.P = new(big.Int).SetBytes(pk.p.bytes) + elgamal.G = new(big.Int).SetBytes(pk.g.bytes) + elgamal.Y = new(big.Int).SetBytes(pk.y.bytes) + pk.PublicKey = elgamal + return +} + +// SerializeSignaturePrefix writes the prefix for this public key to the given Writer. +// The prefix is used when calculating a signature over this public key. See +// RFC 4880, section 5.2.4. +func (pk *PublicKey) SerializeSignaturePrefix(h io.Writer) { + var pLength uint16 + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + pLength += 2 + uint16(len(pk.n.bytes)) + pLength += 2 + uint16(len(pk.e.bytes)) + case PubKeyAlgoDSA: + pLength += 2 + uint16(len(pk.p.bytes)) + pLength += 2 + uint16(len(pk.q.bytes)) + pLength += 2 + uint16(len(pk.g.bytes)) + pLength += 2 + uint16(len(pk.y.bytes)) + case PubKeyAlgoElGamal: + pLength += 2 + uint16(len(pk.p.bytes)) + pLength += 2 + uint16(len(pk.g.bytes)) + pLength += 2 + uint16(len(pk.y.bytes)) + case PubKeyAlgoECDSA: + pLength += uint16(pk.ec.byteLen()) + case PubKeyAlgoECDH: + pLength += uint16(pk.ec.byteLen()) + pLength += uint16(pk.ecdh.byteLen()) + default: + panic("unknown public key algorithm") + } + pLength += 6 + h.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)}) + return +} + +func (pk *PublicKey) Serialize(w io.Writer) (err error) { + length := 6 // 6 byte header + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + length += 2 + len(pk.n.bytes) + length += 2 + len(pk.e.bytes) + case PubKeyAlgoDSA: + length += 2 + len(pk.p.bytes) + length += 2 + len(pk.q.bytes) + length += 2 + len(pk.g.bytes) + length += 2 + len(pk.y.bytes) + case PubKeyAlgoElGamal: + length += 2 + len(pk.p.bytes) + length += 2 + len(pk.g.bytes) + length += 2 + len(pk.y.bytes) + case PubKeyAlgoECDSA: + length += pk.ec.byteLen() + case PubKeyAlgoECDH: + length += pk.ec.byteLen() + length += pk.ecdh.byteLen() + default: + panic("unknown public key algorithm") + } + + packetType := packetTypePublicKey + if pk.IsSubkey { + packetType = packetTypePublicSubkey + } + err = serializeHeader(w, packetType, length) + if err != nil { + return + } + return pk.serializeWithoutHeaders(w) +} + +// serializeWithoutHeaders marshals the PublicKey to w in the form of an +// OpenPGP public key packet, not including the packet header. +func (pk *PublicKey) serializeWithoutHeaders(w io.Writer) (err error) { + var buf [6]byte + buf[0] = 4 + t := uint32(pk.CreationTime.Unix()) + buf[1] = byte(t >> 24) + buf[2] = byte(t >> 16) + buf[3] = byte(t >> 8) + buf[4] = byte(t) + buf[5] = byte(pk.PubKeyAlgo) + + _, err = w.Write(buf[:]) + if err != nil { + return + } + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + return writeMPIs(w, pk.n, pk.e) + case PubKeyAlgoDSA: + return writeMPIs(w, pk.p, pk.q, pk.g, pk.y) + case PubKeyAlgoElGamal: + return writeMPIs(w, pk.p, pk.g, pk.y) + case PubKeyAlgoECDSA: + return pk.ec.serialize(w) + case PubKeyAlgoECDH: + if err = pk.ec.serialize(w); err != nil { + return + } + return pk.ecdh.serialize(w) + } + return errors.InvalidArgumentError("bad public-key algorithm") +} + +// CanSign returns true iff this public key can generate signatures +func (pk *PublicKey) CanSign() bool { + return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly && pk.PubKeyAlgo != PubKeyAlgoElGamal +} + +// VerifySignature returns nil iff sig is a valid signature, made by this +// public key, of the data hashed into signed. signed is mutated by this call. +func (pk *PublicKey) VerifySignature(signed hash.Hash, sig *Signature) (err error) { + if !pk.CanSign() { + return errors.InvalidArgumentError("public key cannot generate signatures") + } + + signed.Write(sig.HashSuffix) + hashBytes := signed.Sum(nil) + + if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { + return errors.SignatureError("hash tag doesn't match") + } + + if pk.PubKeyAlgo != sig.PubKeyAlgo { + return errors.InvalidArgumentError("public key and signature use different algorithms") + } + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + rsaPublicKey, _ := pk.PublicKey.(*rsa.PublicKey) + err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.bytes)) + if err != nil { + return errors.SignatureError("RSA verification failure") + } + return nil + case PubKeyAlgoDSA: + dsaPublicKey, _ := pk.PublicKey.(*dsa.PublicKey) + // Need to truncate hashBytes to match FIPS 186-3 section 4.6. + subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8 + if len(hashBytes) > subgroupSize { + hashBytes = hashBytes[:subgroupSize] + } + if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) { + return errors.SignatureError("DSA verification failure") + } + return nil + case PubKeyAlgoECDSA: + ecdsaPublicKey := pk.PublicKey.(*ecdsa.PublicKey) + if !ecdsa.Verify(ecdsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.ECDSASigR.bytes), new(big.Int).SetBytes(sig.ECDSASigS.bytes)) { + return errors.SignatureError("ECDSA verification failure") + } + return nil + default: + return errors.SignatureError("Unsupported public key algorithm used in signature") + } +} + +// VerifySignatureV3 returns nil iff sig is a valid signature, made by this +// public key, of the data hashed into signed. signed is mutated by this call. +func (pk *PublicKey) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) { + if !pk.CanSign() { + return errors.InvalidArgumentError("public key cannot generate signatures") + } + + suffix := make([]byte, 5) + suffix[0] = byte(sig.SigType) + binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix())) + signed.Write(suffix) + hashBytes := signed.Sum(nil) + + if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { + return errors.SignatureError("hash tag doesn't match") + } + + if pk.PubKeyAlgo != sig.PubKeyAlgo { + return errors.InvalidArgumentError("public key and signature use different algorithms") + } + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + rsaPublicKey := pk.PublicKey.(*rsa.PublicKey) + if err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.bytes)); err != nil { + return errors.SignatureError("RSA verification failure") + } + return + case PubKeyAlgoDSA: + dsaPublicKey := pk.PublicKey.(*dsa.PublicKey) + // Need to truncate hashBytes to match FIPS 186-3 section 4.6. + subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8 + if len(hashBytes) > subgroupSize { + hashBytes = hashBytes[:subgroupSize] + } + if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.bytes), new(big.Int).SetBytes(sig.DSASigS.bytes)) { + return errors.SignatureError("DSA verification failure") + } + return nil + default: + panic("shouldn't happen") + } +} + +// keySignatureHash returns a Hash of the message that needs to be signed for +// pk to assert a subkey relationship to signed. +func keySignatureHash(pk, signed signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) { + if !hashFunc.Available() { + return nil, errors.UnsupportedError("hash function") + } + h = hashFunc.New() + + // RFC 4880, section 5.2.4 + pk.SerializeSignaturePrefix(h) + pk.serializeWithoutHeaders(h) + signed.SerializeSignaturePrefix(h) + signed.serializeWithoutHeaders(h) + return +} + +// VerifyKeySignature returns nil iff sig is a valid signature, made by this +// public key, of signed. +func (pk *PublicKey) VerifyKeySignature(signed *PublicKey, sig *Signature) error { + h, err := keySignatureHash(pk, signed, sig.Hash) + if err != nil { + return err + } + if err = pk.VerifySignature(h, sig); err != nil { + return err + } + + if sig.FlagSign { + // Signing subkeys must be cross-signed. See + // https://www.gnupg.org/faq/subkey-cross-certify.html. + if sig.EmbeddedSignature == nil { + return errors.StructuralError("signing subkey is missing cross-signature") + } + // Verify the cross-signature. This is calculated over the same + // data as the main signature, so we cannot just recursively + // call signed.VerifyKeySignature(...) + if h, err = keySignatureHash(pk, signed, sig.EmbeddedSignature.Hash); err != nil { + return errors.StructuralError("error while hashing for cross-signature: " + err.Error()) + } + if err := signed.VerifySignature(h, sig.EmbeddedSignature); err != nil { + return errors.StructuralError("error while verifying cross-signature: " + err.Error()) + } + } + + return nil +} + +func keyRevocationHash(pk signingKey, hashFunc crypto.Hash) (h hash.Hash, err error) { + if !hashFunc.Available() { + return nil, errors.UnsupportedError("hash function") + } + h = hashFunc.New() + + // RFC 4880, section 5.2.4 + pk.SerializeSignaturePrefix(h) + pk.serializeWithoutHeaders(h) + + return +} + +// VerifyRevocationSignature returns nil iff sig is a valid signature, made by this +// public key. +func (pk *PublicKey) VerifyRevocationSignature(sig *Signature) (err error) { + h, err := keyRevocationHash(pk, sig.Hash) + if err != nil { + return err + } + return pk.VerifySignature(h, sig) +} + +// userIdSignatureHash returns a Hash of the message that needs to be signed +// to assert that pk is a valid key for id. +func userIdSignatureHash(id string, pk *PublicKey, hashFunc crypto.Hash) (h hash.Hash, err error) { + if !hashFunc.Available() { + return nil, errors.UnsupportedError("hash function") + } + h = hashFunc.New() + + // RFC 4880, section 5.2.4 + pk.SerializeSignaturePrefix(h) + pk.serializeWithoutHeaders(h) + + var buf [5]byte + buf[0] = 0xb4 + buf[1] = byte(len(id) >> 24) + buf[2] = byte(len(id) >> 16) + buf[3] = byte(len(id) >> 8) + buf[4] = byte(len(id)) + h.Write(buf[:]) + h.Write([]byte(id)) + + return +} + +// VerifyUserIdSignature returns nil iff sig is a valid signature, made by this +// public key, that id is the identity of pub. +func (pk *PublicKey) VerifyUserIdSignature(id string, pub *PublicKey, sig *Signature) (err error) { + h, err := userIdSignatureHash(id, pub, sig.Hash) + if err != nil { + return err + } + return pk.VerifySignature(h, sig) +} + +// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this +// public key, that id is the identity of pub. +func (pk *PublicKey) VerifyUserIdSignatureV3(id string, pub *PublicKey, sig *SignatureV3) (err error) { + h, err := userIdSignatureV3Hash(id, pub, sig.Hash) + if err != nil { + return err + } + return pk.VerifySignatureV3(h, sig) +} + +// KeyIdString returns the public key's fingerprint in capital hex +// (e.g. "6C7EE1B8621CC013"). +func (pk *PublicKey) KeyIdString() string { + return fmt.Sprintf("%X", pk.Fingerprint[12:20]) +} + +// KeyIdShortString returns the short form of public key's fingerprint +// in capital hex, as shown by gpg --list-keys (e.g. "621CC013"). +func (pk *PublicKey) KeyIdShortString() string { + return fmt.Sprintf("%X", pk.Fingerprint[16:20]) +} + +// A parsedMPI is used to store the contents of a big integer, along with the +// bit length that was specified in the original input. This allows the MPI to +// be reserialized exactly. +type parsedMPI struct { + bytes []byte + bitLength uint16 +} + +// writeMPIs is a utility function for serializing several big integers to the +// given Writer. +func writeMPIs(w io.Writer, mpis ...parsedMPI) (err error) { + for _, mpi := range mpis { + err = writeMPI(w, mpi.bitLength, mpi.bytes) + if err != nil { + return + } + } + return +} + +// BitLength returns the bit length for the given public key. +func (pk *PublicKey) BitLength() (bitLength uint16, err error) { + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + bitLength = pk.n.bitLength + case PubKeyAlgoDSA: + bitLength = pk.p.bitLength + case PubKeyAlgoElGamal: + bitLength = pk.p.bitLength + default: + err = errors.InvalidArgumentError("bad public-key algorithm") + } + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go b/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go new file mode 100644 index 00000000000..5daf7b6cfd4 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/public_key_v3.go @@ -0,0 +1,279 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto" + "crypto/md5" + "crypto/rsa" + "encoding/binary" + "fmt" + "hash" + "io" + "math/big" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/errors" +) + +// PublicKeyV3 represents older, version 3 public keys. These keys are less secure and +// should not be used for signing or encrypting. They are supported here only for +// parsing version 3 key material and validating signatures. +// See RFC 4880, section 5.5.2. +type PublicKeyV3 struct { + CreationTime time.Time + DaysToExpire uint16 + PubKeyAlgo PublicKeyAlgorithm + PublicKey *rsa.PublicKey + Fingerprint [16]byte + KeyId uint64 + IsSubkey bool + + n, e parsedMPI +} + +// newRSAPublicKeyV3 returns a PublicKey that wraps the given rsa.PublicKey. +// Included here for testing purposes only. RFC 4880, section 5.5.2: +// "an implementation MUST NOT generate a V3 key, but MAY accept it." +func newRSAPublicKeyV3(creationTime time.Time, pub *rsa.PublicKey) *PublicKeyV3 { + pk := &PublicKeyV3{ + CreationTime: creationTime, + PublicKey: pub, + n: fromBig(pub.N), + e: fromBig(big.NewInt(int64(pub.E))), + } + + pk.setFingerPrintAndKeyId() + return pk +} + +func (pk *PublicKeyV3) parse(r io.Reader) (err error) { + // RFC 4880, section 5.5.2 + var buf [8]byte + if _, err = readFull(r, buf[:]); err != nil { + return + } + if buf[0] < 2 || buf[0] > 3 { + return errors.UnsupportedError("public key version") + } + pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0) + pk.DaysToExpire = binary.BigEndian.Uint16(buf[5:7]) + pk.PubKeyAlgo = PublicKeyAlgorithm(buf[7]) + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + err = pk.parseRSA(r) + default: + err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo))) + } + if err != nil { + return + } + + pk.setFingerPrintAndKeyId() + return +} + +func (pk *PublicKeyV3) setFingerPrintAndKeyId() { + // RFC 4880, section 12.2 + fingerPrint := md5.New() + fingerPrint.Write(pk.n.bytes) + fingerPrint.Write(pk.e.bytes) + fingerPrint.Sum(pk.Fingerprint[:0]) + pk.KeyId = binary.BigEndian.Uint64(pk.n.bytes[len(pk.n.bytes)-8:]) +} + +// parseRSA parses RSA public key material from the given Reader. See RFC 4880, +// section 5.5.2. +func (pk *PublicKeyV3) parseRSA(r io.Reader) (err error) { + if pk.n.bytes, pk.n.bitLength, err = readMPI(r); err != nil { + return + } + if pk.e.bytes, pk.e.bitLength, err = readMPI(r); err != nil { + return + } + + // RFC 4880 Section 12.2 requires the low 8 bytes of the + // modulus to form the key id. + if len(pk.n.bytes) < 8 { + return errors.StructuralError("v3 public key modulus is too short") + } + if len(pk.e.bytes) > 3 { + err = errors.UnsupportedError("large public exponent") + return + } + rsa := &rsa.PublicKey{N: new(big.Int).SetBytes(pk.n.bytes)} + for i := 0; i < len(pk.e.bytes); i++ { + rsa.E <<= 8 + rsa.E |= int(pk.e.bytes[i]) + } + pk.PublicKey = rsa + return +} + +// SerializeSignaturePrefix writes the prefix for this public key to the given Writer. +// The prefix is used when calculating a signature over this public key. See +// RFC 4880, section 5.2.4. +func (pk *PublicKeyV3) SerializeSignaturePrefix(w io.Writer) { + var pLength uint16 + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + pLength += 2 + uint16(len(pk.n.bytes)) + pLength += 2 + uint16(len(pk.e.bytes)) + default: + panic("unknown public key algorithm") + } + pLength += 6 + w.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)}) + return +} + +func (pk *PublicKeyV3) Serialize(w io.Writer) (err error) { + length := 8 // 8 byte header + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + length += 2 + len(pk.n.bytes) + length += 2 + len(pk.e.bytes) + default: + panic("unknown public key algorithm") + } + + packetType := packetTypePublicKey + if pk.IsSubkey { + packetType = packetTypePublicSubkey + } + if err = serializeHeader(w, packetType, length); err != nil { + return + } + return pk.serializeWithoutHeaders(w) +} + +// serializeWithoutHeaders marshals the PublicKey to w in the form of an +// OpenPGP public key packet, not including the packet header. +func (pk *PublicKeyV3) serializeWithoutHeaders(w io.Writer) (err error) { + var buf [8]byte + // Version 3 + buf[0] = 3 + // Creation time + t := uint32(pk.CreationTime.Unix()) + buf[1] = byte(t >> 24) + buf[2] = byte(t >> 16) + buf[3] = byte(t >> 8) + buf[4] = byte(t) + // Days to expire + buf[5] = byte(pk.DaysToExpire >> 8) + buf[6] = byte(pk.DaysToExpire) + // Public key algorithm + buf[7] = byte(pk.PubKeyAlgo) + + if _, err = w.Write(buf[:]); err != nil { + return + } + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + return writeMPIs(w, pk.n, pk.e) + } + return errors.InvalidArgumentError("bad public-key algorithm") +} + +// CanSign returns true iff this public key can generate signatures +func (pk *PublicKeyV3) CanSign() bool { + return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly +} + +// VerifySignatureV3 returns nil iff sig is a valid signature, made by this +// public key, of the data hashed into signed. signed is mutated by this call. +func (pk *PublicKeyV3) VerifySignatureV3(signed hash.Hash, sig *SignatureV3) (err error) { + if !pk.CanSign() { + return errors.InvalidArgumentError("public key cannot generate signatures") + } + + suffix := make([]byte, 5) + suffix[0] = byte(sig.SigType) + binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix())) + signed.Write(suffix) + hashBytes := signed.Sum(nil) + + if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] { + return errors.SignatureError("hash tag doesn't match") + } + + if pk.PubKeyAlgo != sig.PubKeyAlgo { + return errors.InvalidArgumentError("public key and signature use different algorithms") + } + + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + if err = rsa.VerifyPKCS1v15(pk.PublicKey, sig.Hash, hashBytes, sig.RSASignature.bytes); err != nil { + return errors.SignatureError("RSA verification failure") + } + return + default: + // V3 public keys only support RSA. + panic("shouldn't happen") + } +} + +// VerifyUserIdSignatureV3 returns nil iff sig is a valid signature, made by this +// public key, that id is the identity of pub. +func (pk *PublicKeyV3) VerifyUserIdSignatureV3(id string, pub *PublicKeyV3, sig *SignatureV3) (err error) { + h, err := userIdSignatureV3Hash(id, pk, sig.Hash) + if err != nil { + return err + } + return pk.VerifySignatureV3(h, sig) +} + +// VerifyKeySignatureV3 returns nil iff sig is a valid signature, made by this +// public key, of signed. +func (pk *PublicKeyV3) VerifyKeySignatureV3(signed *PublicKeyV3, sig *SignatureV3) (err error) { + h, err := keySignatureHash(pk, signed, sig.Hash) + if err != nil { + return err + } + return pk.VerifySignatureV3(h, sig) +} + +// userIdSignatureV3Hash returns a Hash of the message that needs to be signed +// to assert that pk is a valid key for id. +func userIdSignatureV3Hash(id string, pk signingKey, hfn crypto.Hash) (h hash.Hash, err error) { + if !hfn.Available() { + return nil, errors.UnsupportedError("hash function") + } + h = hfn.New() + + // RFC 4880, section 5.2.4 + pk.SerializeSignaturePrefix(h) + pk.serializeWithoutHeaders(h) + + h.Write([]byte(id)) + + return +} + +// KeyIdString returns the public key's fingerprint in capital hex +// (e.g. "6C7EE1B8621CC013"). +func (pk *PublicKeyV3) KeyIdString() string { + return fmt.Sprintf("%X", pk.KeyId) +} + +// KeyIdShortString returns the short form of public key's fingerprint +// in capital hex, as shown by gpg --list-keys (e.g. "621CC013"). +func (pk *PublicKeyV3) KeyIdShortString() string { + return fmt.Sprintf("%X", pk.KeyId&0xFFFFFFFF) +} + +// BitLength returns the bit length for the given public key. +func (pk *PublicKeyV3) BitLength() (bitLength uint16, err error) { + switch pk.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly: + bitLength = pk.n.bitLength + default: + err = errors.InvalidArgumentError("bad public-key algorithm") + } + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/reader.go b/vendor/golang.org/x/crypto/openpgp/packet/reader.go new file mode 100644 index 00000000000..34bc7c613e6 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/reader.go @@ -0,0 +1,76 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "golang.org/x/crypto/openpgp/errors" + "io" +) + +// Reader reads packets from an io.Reader and allows packets to be 'unread' so +// that they result from the next call to Next. +type Reader struct { + q []Packet + readers []io.Reader +} + +// New io.Readers are pushed when a compressed or encrypted packet is processed +// and recursively treated as a new source of packets. However, a carefully +// crafted packet can trigger an infinite recursive sequence of packets. See +// http://mumble.net/~campbell/misc/pgp-quine +// https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4402 +// This constant limits the number of recursive packets that may be pushed. +const maxReaders = 32 + +// Next returns the most recently unread Packet, or reads another packet from +// the top-most io.Reader. Unknown packet types are skipped. +func (r *Reader) Next() (p Packet, err error) { + if len(r.q) > 0 { + p = r.q[len(r.q)-1] + r.q = r.q[:len(r.q)-1] + return + } + + for len(r.readers) > 0 { + p, err = Read(r.readers[len(r.readers)-1]) + if err == nil { + return + } + if err == io.EOF { + r.readers = r.readers[:len(r.readers)-1] + continue + } + if _, ok := err.(errors.UnknownPacketTypeError); !ok { + return nil, err + } + } + + return nil, io.EOF +} + +// Push causes the Reader to start reading from a new io.Reader. When an EOF +// error is seen from the new io.Reader, it is popped and the Reader continues +// to read from the next most recent io.Reader. Push returns a StructuralError +// if pushing the reader would exceed the maximum recursion level, otherwise it +// returns nil. +func (r *Reader) Push(reader io.Reader) (err error) { + if len(r.readers) >= maxReaders { + return errors.StructuralError("too many layers of packets") + } + r.readers = append(r.readers, reader) + return nil +} + +// Unread causes the given Packet to be returned from the next call to Next. +func (r *Reader) Unread(p Packet) { + r.q = append(r.q, p) +} + +func NewReader(r io.Reader) *Reader { + return &Reader{ + q: nil, + readers: []io.Reader{r}, + } +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/signature.go b/vendor/golang.org/x/crypto/openpgp/packet/signature.go new file mode 100644 index 00000000000..b2a24a53232 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/signature.go @@ -0,0 +1,731 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "crypto" + "crypto/dsa" + "crypto/ecdsa" + "encoding/asn1" + "encoding/binary" + "hash" + "io" + "math/big" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/s2k" +) + +const ( + // See RFC 4880, section 5.2.3.21 for details. + KeyFlagCertify = 1 << iota + KeyFlagSign + KeyFlagEncryptCommunications + KeyFlagEncryptStorage +) + +// Signature represents a signature. See RFC 4880, section 5.2. +type Signature struct { + SigType SignatureType + PubKeyAlgo PublicKeyAlgorithm + Hash crypto.Hash + + // HashSuffix is extra data that is hashed in after the signed data. + HashSuffix []byte + // HashTag contains the first two bytes of the hash for fast rejection + // of bad signed data. + HashTag [2]byte + CreationTime time.Time + + RSASignature parsedMPI + DSASigR, DSASigS parsedMPI + ECDSASigR, ECDSASigS parsedMPI + + // rawSubpackets contains the unparsed subpackets, in order. + rawSubpackets []outputSubpacket + + // The following are optional so are nil when not included in the + // signature. + + SigLifetimeSecs, KeyLifetimeSecs *uint32 + PreferredSymmetric, PreferredHash, PreferredCompression []uint8 + IssuerKeyId *uint64 + IsPrimaryId *bool + + // FlagsValid is set if any flags were given. See RFC 4880, section + // 5.2.3.21 for details. + FlagsValid bool + FlagCertify, FlagSign, FlagEncryptCommunications, FlagEncryptStorage bool + + // RevocationReason is set if this signature has been revoked. + // See RFC 4880, section 5.2.3.23 for details. + RevocationReason *uint8 + RevocationReasonText string + + // MDC is set if this signature has a feature packet that indicates + // support for MDC subpackets. + MDC bool + + // EmbeddedSignature, if non-nil, is a signature of the parent key, by + // this key. This prevents an attacker from claiming another's signing + // subkey as their own. + EmbeddedSignature *Signature + + outSubpackets []outputSubpacket +} + +func (sig *Signature) parse(r io.Reader) (err error) { + // RFC 4880, section 5.2.3 + var buf [5]byte + _, err = readFull(r, buf[:1]) + if err != nil { + return + } + if buf[0] != 4 { + err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0]))) + return + } + + _, err = readFull(r, buf[:5]) + if err != nil { + return + } + sig.SigType = SignatureType(buf[0]) + sig.PubKeyAlgo = PublicKeyAlgorithm(buf[1]) + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA: + default: + err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo))) + return + } + + var ok bool + sig.Hash, ok = s2k.HashIdToHash(buf[2]) + if !ok { + return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2]))) + } + + hashedSubpacketsLength := int(buf[3])<<8 | int(buf[4]) + l := 6 + hashedSubpacketsLength + sig.HashSuffix = make([]byte, l+6) + sig.HashSuffix[0] = 4 + copy(sig.HashSuffix[1:], buf[:5]) + hashedSubpackets := sig.HashSuffix[6:l] + _, err = readFull(r, hashedSubpackets) + if err != nil { + return + } + // See RFC 4880, section 5.2.4 + trailer := sig.HashSuffix[l:] + trailer[0] = 4 + trailer[1] = 0xff + trailer[2] = uint8(l >> 24) + trailer[3] = uint8(l >> 16) + trailer[4] = uint8(l >> 8) + trailer[5] = uint8(l) + + err = parseSignatureSubpackets(sig, hashedSubpackets, true) + if err != nil { + return + } + + _, err = readFull(r, buf[:2]) + if err != nil { + return + } + unhashedSubpacketsLength := int(buf[0])<<8 | int(buf[1]) + unhashedSubpackets := make([]byte, unhashedSubpacketsLength) + _, err = readFull(r, unhashedSubpackets) + if err != nil { + return + } + err = parseSignatureSubpackets(sig, unhashedSubpackets, false) + if err != nil { + return + } + + _, err = readFull(r, sig.HashTag[:2]) + if err != nil { + return + } + + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + sig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r) + case PubKeyAlgoDSA: + sig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r) + if err == nil { + sig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r) + } + case PubKeyAlgoECDSA: + sig.ECDSASigR.bytes, sig.ECDSASigR.bitLength, err = readMPI(r) + if err == nil { + sig.ECDSASigS.bytes, sig.ECDSASigS.bitLength, err = readMPI(r) + } + default: + panic("unreachable") + } + return +} + +// parseSignatureSubpackets parses subpackets of the main signature packet. See +// RFC 4880, section 5.2.3.1. +func parseSignatureSubpackets(sig *Signature, subpackets []byte, isHashed bool) (err error) { + for len(subpackets) > 0 { + subpackets, err = parseSignatureSubpacket(sig, subpackets, isHashed) + if err != nil { + return + } + } + + if sig.CreationTime.IsZero() { + err = errors.StructuralError("no creation time in signature") + } + + return +} + +type signatureSubpacketType uint8 + +const ( + creationTimeSubpacket signatureSubpacketType = 2 + signatureExpirationSubpacket signatureSubpacketType = 3 + keyExpirationSubpacket signatureSubpacketType = 9 + prefSymmetricAlgosSubpacket signatureSubpacketType = 11 + issuerSubpacket signatureSubpacketType = 16 + prefHashAlgosSubpacket signatureSubpacketType = 21 + prefCompressionSubpacket signatureSubpacketType = 22 + primaryUserIdSubpacket signatureSubpacketType = 25 + keyFlagsSubpacket signatureSubpacketType = 27 + reasonForRevocationSubpacket signatureSubpacketType = 29 + featuresSubpacket signatureSubpacketType = 30 + embeddedSignatureSubpacket signatureSubpacketType = 32 +) + +// parseSignatureSubpacket parses a single subpacket. len(subpacket) is >= 1. +func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (rest []byte, err error) { + // RFC 4880, section 5.2.3.1 + var ( + length uint32 + packetType signatureSubpacketType + isCritical bool + ) + switch { + case subpacket[0] < 192: + length = uint32(subpacket[0]) + subpacket = subpacket[1:] + case subpacket[0] < 255: + if len(subpacket) < 2 { + goto Truncated + } + length = uint32(subpacket[0]-192)<<8 + uint32(subpacket[1]) + 192 + subpacket = subpacket[2:] + default: + if len(subpacket) < 5 { + goto Truncated + } + length = uint32(subpacket[1])<<24 | + uint32(subpacket[2])<<16 | + uint32(subpacket[3])<<8 | + uint32(subpacket[4]) + subpacket = subpacket[5:] + } + if length > uint32(len(subpacket)) { + goto Truncated + } + rest = subpacket[length:] + subpacket = subpacket[:length] + if len(subpacket) == 0 { + err = errors.StructuralError("zero length signature subpacket") + return + } + packetType = signatureSubpacketType(subpacket[0] & 0x7f) + isCritical = subpacket[0]&0x80 == 0x80 + subpacket = subpacket[1:] + sig.rawSubpackets = append(sig.rawSubpackets, outputSubpacket{isHashed, packetType, isCritical, subpacket}) + switch packetType { + case creationTimeSubpacket: + if !isHashed { + err = errors.StructuralError("signature creation time in non-hashed area") + return + } + if len(subpacket) != 4 { + err = errors.StructuralError("signature creation time not four bytes") + return + } + t := binary.BigEndian.Uint32(subpacket) + sig.CreationTime = time.Unix(int64(t), 0) + case signatureExpirationSubpacket: + // Signature expiration time, section 5.2.3.10 + if !isHashed { + return + } + if len(subpacket) != 4 { + err = errors.StructuralError("expiration subpacket with bad length") + return + } + sig.SigLifetimeSecs = new(uint32) + *sig.SigLifetimeSecs = binary.BigEndian.Uint32(subpacket) + case keyExpirationSubpacket: + // Key expiration time, section 5.2.3.6 + if !isHashed { + return + } + if len(subpacket) != 4 { + err = errors.StructuralError("key expiration subpacket with bad length") + return + } + sig.KeyLifetimeSecs = new(uint32) + *sig.KeyLifetimeSecs = binary.BigEndian.Uint32(subpacket) + case prefSymmetricAlgosSubpacket: + // Preferred symmetric algorithms, section 5.2.3.7 + if !isHashed { + return + } + sig.PreferredSymmetric = make([]byte, len(subpacket)) + copy(sig.PreferredSymmetric, subpacket) + case issuerSubpacket: + // Issuer, section 5.2.3.5 + if len(subpacket) != 8 { + err = errors.StructuralError("issuer subpacket with bad length") + return + } + sig.IssuerKeyId = new(uint64) + *sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket) + case prefHashAlgosSubpacket: + // Preferred hash algorithms, section 5.2.3.8 + if !isHashed { + return + } + sig.PreferredHash = make([]byte, len(subpacket)) + copy(sig.PreferredHash, subpacket) + case prefCompressionSubpacket: + // Preferred compression algorithms, section 5.2.3.9 + if !isHashed { + return + } + sig.PreferredCompression = make([]byte, len(subpacket)) + copy(sig.PreferredCompression, subpacket) + case primaryUserIdSubpacket: + // Primary User ID, section 5.2.3.19 + if !isHashed { + return + } + if len(subpacket) != 1 { + err = errors.StructuralError("primary user id subpacket with bad length") + return + } + sig.IsPrimaryId = new(bool) + if subpacket[0] > 0 { + *sig.IsPrimaryId = true + } + case keyFlagsSubpacket: + // Key flags, section 5.2.3.21 + if !isHashed { + return + } + if len(subpacket) == 0 { + err = errors.StructuralError("empty key flags subpacket") + return + } + sig.FlagsValid = true + if subpacket[0]&KeyFlagCertify != 0 { + sig.FlagCertify = true + } + if subpacket[0]&KeyFlagSign != 0 { + sig.FlagSign = true + } + if subpacket[0]&KeyFlagEncryptCommunications != 0 { + sig.FlagEncryptCommunications = true + } + if subpacket[0]&KeyFlagEncryptStorage != 0 { + sig.FlagEncryptStorage = true + } + case reasonForRevocationSubpacket: + // Reason For Revocation, section 5.2.3.23 + if !isHashed { + return + } + if len(subpacket) == 0 { + err = errors.StructuralError("empty revocation reason subpacket") + return + } + sig.RevocationReason = new(uint8) + *sig.RevocationReason = subpacket[0] + sig.RevocationReasonText = string(subpacket[1:]) + case featuresSubpacket: + // Features subpacket, section 5.2.3.24 specifies a very general + // mechanism for OpenPGP implementations to signal support for new + // features. In practice, the subpacket is used exclusively to + // indicate support for MDC-protected encryption. + sig.MDC = len(subpacket) >= 1 && subpacket[0]&1 == 1 + case embeddedSignatureSubpacket: + // Only usage is in signatures that cross-certify + // signing subkeys. section 5.2.3.26 describes the + // format, with its usage described in section 11.1 + if sig.EmbeddedSignature != nil { + err = errors.StructuralError("Cannot have multiple embedded signatures") + return + } + sig.EmbeddedSignature = new(Signature) + // Embedded signatures are required to be v4 signatures see + // section 12.1. However, we only parse v4 signatures in this + // file anyway. + if err := sig.EmbeddedSignature.parse(bytes.NewBuffer(subpacket)); err != nil { + return nil, err + } + if sigType := sig.EmbeddedSignature.SigType; sigType != SigTypePrimaryKeyBinding { + return nil, errors.StructuralError("cross-signature has unexpected type " + strconv.Itoa(int(sigType))) + } + default: + if isCritical { + err = errors.UnsupportedError("unknown critical signature subpacket type " + strconv.Itoa(int(packetType))) + return + } + } + return + +Truncated: + err = errors.StructuralError("signature subpacket truncated") + return +} + +// subpacketLengthLength returns the length, in bytes, of an encoded length value. +func subpacketLengthLength(length int) int { + if length < 192 { + return 1 + } + if length < 16320 { + return 2 + } + return 5 +} + +// serializeSubpacketLength marshals the given length into to. +func serializeSubpacketLength(to []byte, length int) int { + // RFC 4880, Section 4.2.2. + if length < 192 { + to[0] = byte(length) + return 1 + } + if length < 16320 { + length -= 192 + to[0] = byte((length >> 8) + 192) + to[1] = byte(length) + return 2 + } + to[0] = 255 + to[1] = byte(length >> 24) + to[2] = byte(length >> 16) + to[3] = byte(length >> 8) + to[4] = byte(length) + return 5 +} + +// subpacketsLength returns the serialized length, in bytes, of the given +// subpackets. +func subpacketsLength(subpackets []outputSubpacket, hashed bool) (length int) { + for _, subpacket := range subpackets { + if subpacket.hashed == hashed { + length += subpacketLengthLength(len(subpacket.contents) + 1) + length += 1 // type byte + length += len(subpacket.contents) + } + } + return +} + +// serializeSubpackets marshals the given subpackets into to. +func serializeSubpackets(to []byte, subpackets []outputSubpacket, hashed bool) { + for _, subpacket := range subpackets { + if subpacket.hashed == hashed { + n := serializeSubpacketLength(to, len(subpacket.contents)+1) + to[n] = byte(subpacket.subpacketType) + to = to[1+n:] + n = copy(to, subpacket.contents) + to = to[n:] + } + } + return +} + +// KeyExpired returns whether sig is a self-signature of a key that has +// expired. +func (sig *Signature) KeyExpired(currentTime time.Time) bool { + if sig.KeyLifetimeSecs == nil { + return false + } + expiry := sig.CreationTime.Add(time.Duration(*sig.KeyLifetimeSecs) * time.Second) + return currentTime.After(expiry) +} + +// buildHashSuffix constructs the HashSuffix member of sig in preparation for signing. +func (sig *Signature) buildHashSuffix() (err error) { + hashedSubpacketsLen := subpacketsLength(sig.outSubpackets, true) + + var ok bool + l := 6 + hashedSubpacketsLen + sig.HashSuffix = make([]byte, l+6) + sig.HashSuffix[0] = 4 + sig.HashSuffix[1] = uint8(sig.SigType) + sig.HashSuffix[2] = uint8(sig.PubKeyAlgo) + sig.HashSuffix[3], ok = s2k.HashToHashId(sig.Hash) + if !ok { + sig.HashSuffix = nil + return errors.InvalidArgumentError("hash cannot be represented in OpenPGP: " + strconv.Itoa(int(sig.Hash))) + } + sig.HashSuffix[4] = byte(hashedSubpacketsLen >> 8) + sig.HashSuffix[5] = byte(hashedSubpacketsLen) + serializeSubpackets(sig.HashSuffix[6:l], sig.outSubpackets, true) + trailer := sig.HashSuffix[l:] + trailer[0] = 4 + trailer[1] = 0xff + trailer[2] = byte(l >> 24) + trailer[3] = byte(l >> 16) + trailer[4] = byte(l >> 8) + trailer[5] = byte(l) + return +} + +func (sig *Signature) signPrepareHash(h hash.Hash) (digest []byte, err error) { + err = sig.buildHashSuffix() + if err != nil { + return + } + + h.Write(sig.HashSuffix) + digest = h.Sum(nil) + copy(sig.HashTag[:], digest) + return +} + +// Sign signs a message with a private key. The hash, h, must contain +// the hash of the message to be signed and will be mutated by this function. +// On success, the signature is stored in sig. Call Serialize to write it out. +// If config is nil, sensible defaults will be used. +func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err error) { + sig.outSubpackets = sig.buildSubpackets() + digest, err := sig.signPrepareHash(h) + if err != nil { + return + } + + switch priv.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + // supports both *rsa.PrivateKey and crypto.Signer + sig.RSASignature.bytes, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash) + sig.RSASignature.bitLength = uint16(8 * len(sig.RSASignature.bytes)) + case PubKeyAlgoDSA: + dsaPriv := priv.PrivateKey.(*dsa.PrivateKey) + + // Need to truncate hashBytes to match FIPS 186-3 section 4.6. + subgroupSize := (dsaPriv.Q.BitLen() + 7) / 8 + if len(digest) > subgroupSize { + digest = digest[:subgroupSize] + } + r, s, err := dsa.Sign(config.Random(), dsaPriv, digest) + if err == nil { + sig.DSASigR.bytes = r.Bytes() + sig.DSASigR.bitLength = uint16(8 * len(sig.DSASigR.bytes)) + sig.DSASigS.bytes = s.Bytes() + sig.DSASigS.bitLength = uint16(8 * len(sig.DSASigS.bytes)) + } + case PubKeyAlgoECDSA: + var r, s *big.Int + if pk, ok := priv.PrivateKey.(*ecdsa.PrivateKey); ok { + // direct support, avoid asn1 wrapping/unwrapping + r, s, err = ecdsa.Sign(config.Random(), pk, digest) + } else { + var b []byte + b, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash) + if err == nil { + r, s, err = unwrapECDSASig(b) + } + } + if err == nil { + sig.ECDSASigR = fromBig(r) + sig.ECDSASigS = fromBig(s) + } + default: + err = errors.UnsupportedError("public key algorithm: " + strconv.Itoa(int(sig.PubKeyAlgo))) + } + + return +} + +// unwrapECDSASig parses the two integer components of an ASN.1-encoded ECDSA +// signature. +func unwrapECDSASig(b []byte) (r, s *big.Int, err error) { + var ecsdaSig struct { + R, S *big.Int + } + _, err = asn1.Unmarshal(b, &ecsdaSig) + if err != nil { + return + } + return ecsdaSig.R, ecsdaSig.S, nil +} + +// SignUserId computes a signature from priv, asserting that pub is a valid +// key for the identity id. On success, the signature is stored in sig. Call +// Serialize to write it out. +// If config is nil, sensible defaults will be used. +func (sig *Signature) SignUserId(id string, pub *PublicKey, priv *PrivateKey, config *Config) error { + h, err := userIdSignatureHash(id, pub, sig.Hash) + if err != nil { + return err + } + return sig.Sign(h, priv, config) +} + +// SignKey computes a signature from priv, asserting that pub is a subkey. On +// success, the signature is stored in sig. Call Serialize to write it out. +// If config is nil, sensible defaults will be used. +func (sig *Signature) SignKey(pub *PublicKey, priv *PrivateKey, config *Config) error { + h, err := keySignatureHash(&priv.PublicKey, pub, sig.Hash) + if err != nil { + return err + } + return sig.Sign(h, priv, config) +} + +// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been +// called first. +func (sig *Signature) Serialize(w io.Writer) (err error) { + if len(sig.outSubpackets) == 0 { + sig.outSubpackets = sig.rawSubpackets + } + if sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil && sig.ECDSASigR.bytes == nil { + return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize") + } + + sigLength := 0 + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + sigLength = 2 + len(sig.RSASignature.bytes) + case PubKeyAlgoDSA: + sigLength = 2 + len(sig.DSASigR.bytes) + sigLength += 2 + len(sig.DSASigS.bytes) + case PubKeyAlgoECDSA: + sigLength = 2 + len(sig.ECDSASigR.bytes) + sigLength += 2 + len(sig.ECDSASigS.bytes) + default: + panic("impossible") + } + + unhashedSubpacketsLen := subpacketsLength(sig.outSubpackets, false) + length := len(sig.HashSuffix) - 6 /* trailer not included */ + + 2 /* length of unhashed subpackets */ + unhashedSubpacketsLen + + 2 /* hash tag */ + sigLength + err = serializeHeader(w, packetTypeSignature, length) + if err != nil { + return + } + + _, err = w.Write(sig.HashSuffix[:len(sig.HashSuffix)-6]) + if err != nil { + return + } + + unhashedSubpackets := make([]byte, 2+unhashedSubpacketsLen) + unhashedSubpackets[0] = byte(unhashedSubpacketsLen >> 8) + unhashedSubpackets[1] = byte(unhashedSubpacketsLen) + serializeSubpackets(unhashedSubpackets[2:], sig.outSubpackets, false) + + _, err = w.Write(unhashedSubpackets) + if err != nil { + return + } + _, err = w.Write(sig.HashTag[:]) + if err != nil { + return + } + + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + err = writeMPIs(w, sig.RSASignature) + case PubKeyAlgoDSA: + err = writeMPIs(w, sig.DSASigR, sig.DSASigS) + case PubKeyAlgoECDSA: + err = writeMPIs(w, sig.ECDSASigR, sig.ECDSASigS) + default: + panic("impossible") + } + return +} + +// outputSubpacket represents a subpacket to be marshaled. +type outputSubpacket struct { + hashed bool // true if this subpacket is in the hashed area. + subpacketType signatureSubpacketType + isCritical bool + contents []byte +} + +func (sig *Signature) buildSubpackets() (subpackets []outputSubpacket) { + creationTime := make([]byte, 4) + binary.BigEndian.PutUint32(creationTime, uint32(sig.CreationTime.Unix())) + subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, false, creationTime}) + + if sig.IssuerKeyId != nil { + keyId := make([]byte, 8) + binary.BigEndian.PutUint64(keyId, *sig.IssuerKeyId) + subpackets = append(subpackets, outputSubpacket{true, issuerSubpacket, false, keyId}) + } + + if sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 { + sigLifetime := make([]byte, 4) + binary.BigEndian.PutUint32(sigLifetime, *sig.SigLifetimeSecs) + subpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, true, sigLifetime}) + } + + // Key flags may only appear in self-signatures or certification signatures. + + if sig.FlagsValid { + var flags byte + if sig.FlagCertify { + flags |= KeyFlagCertify + } + if sig.FlagSign { + flags |= KeyFlagSign + } + if sig.FlagEncryptCommunications { + flags |= KeyFlagEncryptCommunications + } + if sig.FlagEncryptStorage { + flags |= KeyFlagEncryptStorage + } + subpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, false, []byte{flags}}) + } + + // The following subpackets may only appear in self-signatures + + if sig.KeyLifetimeSecs != nil && *sig.KeyLifetimeSecs != 0 { + keyLifetime := make([]byte, 4) + binary.BigEndian.PutUint32(keyLifetime, *sig.KeyLifetimeSecs) + subpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, true, keyLifetime}) + } + + if sig.IsPrimaryId != nil && *sig.IsPrimaryId { + subpackets = append(subpackets, outputSubpacket{true, primaryUserIdSubpacket, false, []byte{1}}) + } + + if len(sig.PreferredSymmetric) > 0 { + subpackets = append(subpackets, outputSubpacket{true, prefSymmetricAlgosSubpacket, false, sig.PreferredSymmetric}) + } + + if len(sig.PreferredHash) > 0 { + subpackets = append(subpackets, outputSubpacket{true, prefHashAlgosSubpacket, false, sig.PreferredHash}) + } + + if len(sig.PreferredCompression) > 0 { + subpackets = append(subpackets, outputSubpacket{true, prefCompressionSubpacket, false, sig.PreferredCompression}) + } + + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go b/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go new file mode 100644 index 00000000000..6edff889349 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/signature_v3.go @@ -0,0 +1,146 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto" + "encoding/binary" + "fmt" + "io" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/s2k" +) + +// SignatureV3 represents older version 3 signatures. These signatures are less secure +// than version 4 and should not be used to create new signatures. They are included +// here for backwards compatibility to read and validate with older key material. +// See RFC 4880, section 5.2.2. +type SignatureV3 struct { + SigType SignatureType + CreationTime time.Time + IssuerKeyId uint64 + PubKeyAlgo PublicKeyAlgorithm + Hash crypto.Hash + HashTag [2]byte + + RSASignature parsedMPI + DSASigR, DSASigS parsedMPI +} + +func (sig *SignatureV3) parse(r io.Reader) (err error) { + // RFC 4880, section 5.2.2 + var buf [8]byte + if _, err = readFull(r, buf[:1]); err != nil { + return + } + if buf[0] < 2 || buf[0] > 3 { + err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0]))) + return + } + if _, err = readFull(r, buf[:1]); err != nil { + return + } + if buf[0] != 5 { + err = errors.UnsupportedError( + "invalid hashed material length " + strconv.Itoa(int(buf[0]))) + return + } + + // Read hashed material: signature type + creation time + if _, err = readFull(r, buf[:5]); err != nil { + return + } + sig.SigType = SignatureType(buf[0]) + t := binary.BigEndian.Uint32(buf[1:5]) + sig.CreationTime = time.Unix(int64(t), 0) + + // Eight-octet Key ID of signer. + if _, err = readFull(r, buf[:8]); err != nil { + return + } + sig.IssuerKeyId = binary.BigEndian.Uint64(buf[:]) + + // Public-key and hash algorithm + if _, err = readFull(r, buf[:2]); err != nil { + return + } + sig.PubKeyAlgo = PublicKeyAlgorithm(buf[0]) + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA: + default: + err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo))) + return + } + var ok bool + if sig.Hash, ok = s2k.HashIdToHash(buf[1]); !ok { + return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2]))) + } + + // Two-octet field holding left 16 bits of signed hash value. + if _, err = readFull(r, sig.HashTag[:2]); err != nil { + return + } + + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + sig.RSASignature.bytes, sig.RSASignature.bitLength, err = readMPI(r) + case PubKeyAlgoDSA: + if sig.DSASigR.bytes, sig.DSASigR.bitLength, err = readMPI(r); err != nil { + return + } + sig.DSASigS.bytes, sig.DSASigS.bitLength, err = readMPI(r) + default: + panic("unreachable") + } + return +} + +// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been +// called first. +func (sig *SignatureV3) Serialize(w io.Writer) (err error) { + buf := make([]byte, 8) + + // Write the sig type and creation time + buf[0] = byte(sig.SigType) + binary.BigEndian.PutUint32(buf[1:5], uint32(sig.CreationTime.Unix())) + if _, err = w.Write(buf[:5]); err != nil { + return + } + + // Write the issuer long key ID + binary.BigEndian.PutUint64(buf[:8], sig.IssuerKeyId) + if _, err = w.Write(buf[:8]); err != nil { + return + } + + // Write public key algorithm, hash ID, and hash value + buf[0] = byte(sig.PubKeyAlgo) + hashId, ok := s2k.HashToHashId(sig.Hash) + if !ok { + return errors.UnsupportedError(fmt.Sprintf("hash function %v", sig.Hash)) + } + buf[1] = hashId + copy(buf[2:4], sig.HashTag[:]) + if _, err = w.Write(buf[:4]); err != nil { + return + } + + if sig.RSASignature.bytes == nil && sig.DSASigR.bytes == nil { + return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize") + } + + switch sig.PubKeyAlgo { + case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly: + err = writeMPIs(w, sig.RSASignature) + case PubKeyAlgoDSA: + err = writeMPIs(w, sig.DSASigR, sig.DSASigS) + default: + panic("impossible") + } + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go b/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go new file mode 100644 index 00000000000..744c2d2c42d --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/symmetric_key_encrypted.go @@ -0,0 +1,155 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "crypto/cipher" + "io" + "strconv" + + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/s2k" +) + +// This is the largest session key that we'll support. Since no 512-bit cipher +// has even been seriously used, this is comfortably large. +const maxSessionKeySizeInBytes = 64 + +// SymmetricKeyEncrypted represents a passphrase protected session key. See RFC +// 4880, section 5.3. +type SymmetricKeyEncrypted struct { + CipherFunc CipherFunction + s2k func(out, in []byte) + encryptedKey []byte +} + +const symmetricKeyEncryptedVersion = 4 + +func (ske *SymmetricKeyEncrypted) parse(r io.Reader) error { + // RFC 4880, section 5.3. + var buf [2]byte + if _, err := readFull(r, buf[:]); err != nil { + return err + } + if buf[0] != symmetricKeyEncryptedVersion { + return errors.UnsupportedError("SymmetricKeyEncrypted version") + } + ske.CipherFunc = CipherFunction(buf[1]) + + if ske.CipherFunc.KeySize() == 0 { + return errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(buf[1]))) + } + + var err error + ske.s2k, err = s2k.Parse(r) + if err != nil { + return err + } + + encryptedKey := make([]byte, maxSessionKeySizeInBytes) + // The session key may follow. We just have to try and read to find + // out. If it exists then we limit it to maxSessionKeySizeInBytes. + n, err := readFull(r, encryptedKey) + if err != nil && err != io.ErrUnexpectedEOF { + return err + } + + if n != 0 { + if n == maxSessionKeySizeInBytes { + return errors.UnsupportedError("oversized encrypted session key") + } + ske.encryptedKey = encryptedKey[:n] + } + + return nil +} + +// Decrypt attempts to decrypt an encrypted session key and returns the key and +// the cipher to use when decrypting a subsequent Symmetrically Encrypted Data +// packet. +func (ske *SymmetricKeyEncrypted) Decrypt(passphrase []byte) ([]byte, CipherFunction, error) { + key := make([]byte, ske.CipherFunc.KeySize()) + ske.s2k(key, passphrase) + + if len(ske.encryptedKey) == 0 { + return key, ske.CipherFunc, nil + } + + // the IV is all zeros + iv := make([]byte, ske.CipherFunc.blockSize()) + c := cipher.NewCFBDecrypter(ske.CipherFunc.new(key), iv) + plaintextKey := make([]byte, len(ske.encryptedKey)) + c.XORKeyStream(plaintextKey, ske.encryptedKey) + cipherFunc := CipherFunction(plaintextKey[0]) + if cipherFunc.blockSize() == 0 { + return nil, ske.CipherFunc, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc))) + } + plaintextKey = plaintextKey[1:] + if l, cipherKeySize := len(plaintextKey), cipherFunc.KeySize(); l != cipherFunc.KeySize() { + return nil, cipherFunc, errors.StructuralError("length of decrypted key (" + strconv.Itoa(l) + ") " + + "not equal to cipher keysize (" + strconv.Itoa(cipherKeySize) + ")") + } + return plaintextKey, cipherFunc, nil +} + +// SerializeSymmetricKeyEncrypted serializes a symmetric key packet to w. The +// packet contains a random session key, encrypted by a key derived from the +// given passphrase. The session key is returned and must be passed to +// SerializeSymmetricallyEncrypted. +// If config is nil, sensible defaults will be used. +func SerializeSymmetricKeyEncrypted(w io.Writer, passphrase []byte, config *Config) (key []byte, err error) { + cipherFunc := config.Cipher() + keySize := cipherFunc.KeySize() + if keySize == 0 { + return nil, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(cipherFunc))) + } + + s2kBuf := new(bytes.Buffer) + keyEncryptingKey := make([]byte, keySize) + // s2k.Serialize salts and stretches the passphrase, and writes the + // resulting key to keyEncryptingKey and the s2k descriptor to s2kBuf. + err = s2k.Serialize(s2kBuf, keyEncryptingKey, config.Random(), passphrase, &s2k.Config{Hash: config.Hash(), S2KCount: config.PasswordHashIterations()}) + if err != nil { + return + } + s2kBytes := s2kBuf.Bytes() + + packetLength := 2 /* header */ + len(s2kBytes) + 1 /* cipher type */ + keySize + err = serializeHeader(w, packetTypeSymmetricKeyEncrypted, packetLength) + if err != nil { + return + } + + var buf [2]byte + buf[0] = symmetricKeyEncryptedVersion + buf[1] = byte(cipherFunc) + _, err = w.Write(buf[:]) + if err != nil { + return + } + _, err = w.Write(s2kBytes) + if err != nil { + return + } + + sessionKey := make([]byte, keySize) + _, err = io.ReadFull(config.Random(), sessionKey) + if err != nil { + return + } + iv := make([]byte, cipherFunc.blockSize()) + c := cipher.NewCFBEncrypter(cipherFunc.new(keyEncryptingKey), iv) + encryptedCipherAndKey := make([]byte, keySize+1) + c.XORKeyStream(encryptedCipherAndKey, buf[1:]) + c.XORKeyStream(encryptedCipherAndKey[1:], sessionKey) + _, err = w.Write(encryptedCipherAndKey) + if err != nil { + return + } + + key = sessionKey + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go b/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go new file mode 100644 index 00000000000..6126030eb90 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go @@ -0,0 +1,290 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "crypto/cipher" + "crypto/sha1" + "crypto/subtle" + "golang.org/x/crypto/openpgp/errors" + "hash" + "io" + "strconv" +) + +// SymmetricallyEncrypted represents a symmetrically encrypted byte string. The +// encrypted contents will consist of more OpenPGP packets. See RFC 4880, +// sections 5.7 and 5.13. +type SymmetricallyEncrypted struct { + MDC bool // true iff this is a type 18 packet and thus has an embedded MAC. + contents io.Reader + prefix []byte +} + +const symmetricallyEncryptedVersion = 1 + +func (se *SymmetricallyEncrypted) parse(r io.Reader) error { + if se.MDC { + // See RFC 4880, section 5.13. + var buf [1]byte + _, err := readFull(r, buf[:]) + if err != nil { + return err + } + if buf[0] != symmetricallyEncryptedVersion { + return errors.UnsupportedError("unknown SymmetricallyEncrypted version") + } + } + se.contents = r + return nil +} + +// Decrypt returns a ReadCloser, from which the decrypted contents of the +// packet can be read. An incorrect key can, with high probability, be detected +// immediately and this will result in a KeyIncorrect error being returned. +func (se *SymmetricallyEncrypted) Decrypt(c CipherFunction, key []byte) (io.ReadCloser, error) { + keySize := c.KeySize() + if keySize == 0 { + return nil, errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(c))) + } + if len(key) != keySize { + return nil, errors.InvalidArgumentError("SymmetricallyEncrypted: incorrect key length") + } + + if se.prefix == nil { + se.prefix = make([]byte, c.blockSize()+2) + _, err := readFull(se.contents, se.prefix) + if err != nil { + return nil, err + } + } else if len(se.prefix) != c.blockSize()+2 { + return nil, errors.InvalidArgumentError("can't try ciphers with different block lengths") + } + + ocfbResync := OCFBResync + if se.MDC { + // MDC packets use a different form of OCFB mode. + ocfbResync = OCFBNoResync + } + + s := NewOCFBDecrypter(c.new(key), se.prefix, ocfbResync) + if s == nil { + return nil, errors.ErrKeyIncorrect + } + + plaintext := cipher.StreamReader{S: s, R: se.contents} + + if se.MDC { + // MDC packets have an embedded hash that we need to check. + h := sha1.New() + h.Write(se.prefix) + return &seMDCReader{in: plaintext, h: h}, nil + } + + // Otherwise, we just need to wrap plaintext so that it's a valid ReadCloser. + return seReader{plaintext}, nil +} + +// seReader wraps an io.Reader with a no-op Close method. +type seReader struct { + in io.Reader +} + +func (ser seReader) Read(buf []byte) (int, error) { + return ser.in.Read(buf) +} + +func (ser seReader) Close() error { + return nil +} + +const mdcTrailerSize = 1 /* tag byte */ + 1 /* length byte */ + sha1.Size + +// An seMDCReader wraps an io.Reader, maintains a running hash and keeps hold +// of the most recent 22 bytes (mdcTrailerSize). Upon EOF, those bytes form an +// MDC packet containing a hash of the previous contents which is checked +// against the running hash. See RFC 4880, section 5.13. +type seMDCReader struct { + in io.Reader + h hash.Hash + trailer [mdcTrailerSize]byte + scratch [mdcTrailerSize]byte + trailerUsed int + error bool + eof bool +} + +func (ser *seMDCReader) Read(buf []byte) (n int, err error) { + if ser.error { + err = io.ErrUnexpectedEOF + return + } + if ser.eof { + err = io.EOF + return + } + + // If we haven't yet filled the trailer buffer then we must do that + // first. + for ser.trailerUsed < mdcTrailerSize { + n, err = ser.in.Read(ser.trailer[ser.trailerUsed:]) + ser.trailerUsed += n + if err == io.EOF { + if ser.trailerUsed != mdcTrailerSize { + n = 0 + err = io.ErrUnexpectedEOF + ser.error = true + return + } + ser.eof = true + n = 0 + return + } + + if err != nil { + n = 0 + return + } + } + + // If it's a short read then we read into a temporary buffer and shift + // the data into the caller's buffer. + if len(buf) <= mdcTrailerSize { + n, err = readFull(ser.in, ser.scratch[:len(buf)]) + copy(buf, ser.trailer[:n]) + ser.h.Write(buf[:n]) + copy(ser.trailer[:], ser.trailer[n:]) + copy(ser.trailer[mdcTrailerSize-n:], ser.scratch[:]) + if n < len(buf) { + ser.eof = true + err = io.EOF + } + return + } + + n, err = ser.in.Read(buf[mdcTrailerSize:]) + copy(buf, ser.trailer[:]) + ser.h.Write(buf[:n]) + copy(ser.trailer[:], buf[n:]) + + if err == io.EOF { + ser.eof = true + } + return +} + +// This is a new-format packet tag byte for a type 19 (MDC) packet. +const mdcPacketTagByte = byte(0x80) | 0x40 | 19 + +func (ser *seMDCReader) Close() error { + if ser.error { + return errors.SignatureError("error during reading") + } + + for !ser.eof { + // We haven't seen EOF so we need to read to the end + var buf [1024]byte + _, err := ser.Read(buf[:]) + if err == io.EOF { + break + } + if err != nil { + return errors.SignatureError("error during reading") + } + } + + if ser.trailer[0] != mdcPacketTagByte || ser.trailer[1] != sha1.Size { + return errors.SignatureError("MDC packet not found") + } + ser.h.Write(ser.trailer[:2]) + + final := ser.h.Sum(nil) + if subtle.ConstantTimeCompare(final, ser.trailer[2:]) != 1 { + return errors.SignatureError("hash mismatch") + } + return nil +} + +// An seMDCWriter writes through to an io.WriteCloser while maintains a running +// hash of the data written. On close, it emits an MDC packet containing the +// running hash. +type seMDCWriter struct { + w io.WriteCloser + h hash.Hash +} + +func (w *seMDCWriter) Write(buf []byte) (n int, err error) { + w.h.Write(buf) + return w.w.Write(buf) +} + +func (w *seMDCWriter) Close() (err error) { + var buf [mdcTrailerSize]byte + + buf[0] = mdcPacketTagByte + buf[1] = sha1.Size + w.h.Write(buf[:2]) + digest := w.h.Sum(nil) + copy(buf[2:], digest) + + _, err = w.w.Write(buf[:]) + if err != nil { + return + } + return w.w.Close() +} + +// noOpCloser is like an ioutil.NopCloser, but for an io.Writer. +type noOpCloser struct { + w io.Writer +} + +func (c noOpCloser) Write(data []byte) (n int, err error) { + return c.w.Write(data) +} + +func (c noOpCloser) Close() error { + return nil +} + +// SerializeSymmetricallyEncrypted serializes a symmetrically encrypted packet +// to w and returns a WriteCloser to which the to-be-encrypted packets can be +// written. +// If config is nil, sensible defaults will be used. +func SerializeSymmetricallyEncrypted(w io.Writer, c CipherFunction, key []byte, config *Config) (contents io.WriteCloser, err error) { + if c.KeySize() != len(key) { + return nil, errors.InvalidArgumentError("SymmetricallyEncrypted.Serialize: bad key length") + } + writeCloser := noOpCloser{w} + ciphertext, err := serializeStreamHeader(writeCloser, packetTypeSymmetricallyEncryptedMDC) + if err != nil { + return + } + + _, err = ciphertext.Write([]byte{symmetricallyEncryptedVersion}) + if err != nil { + return + } + + block := c.new(key) + blockSize := block.BlockSize() + iv := make([]byte, blockSize) + _, err = config.Random().Read(iv) + if err != nil { + return + } + s, prefix := NewOCFBEncrypter(block, iv, OCFBNoResync) + _, err = ciphertext.Write(prefix) + if err != nil { + return + } + plaintext := cipher.StreamWriter{S: s, W: ciphertext} + + h := sha1.New() + h.Write(iv) + h.Write(iv[blockSize-2:]) + contents = &seMDCWriter{w: plaintext, h: h} + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go b/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go new file mode 100644 index 00000000000..d19ffbc7867 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go @@ -0,0 +1,91 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "bytes" + "image" + "image/jpeg" + "io" + "io/ioutil" +) + +const UserAttrImageSubpacket = 1 + +// UserAttribute is capable of storing other types of data about a user +// beyond name, email and a text comment. In practice, user attributes are typically used +// to store a signed thumbnail photo JPEG image of the user. +// See RFC 4880, section 5.12. +type UserAttribute struct { + Contents []*OpaqueSubpacket +} + +// NewUserAttributePhoto creates a user attribute packet +// containing the given images. +func NewUserAttributePhoto(photos ...image.Image) (uat *UserAttribute, err error) { + uat = new(UserAttribute) + for _, photo := range photos { + var buf bytes.Buffer + // RFC 4880, Section 5.12.1. + data := []byte{ + 0x10, 0x00, // Little-endian image header length (16 bytes) + 0x01, // Image header version 1 + 0x01, // JPEG + 0, 0, 0, 0, // 12 reserved octets, must be all zero. + 0, 0, 0, 0, + 0, 0, 0, 0} + if _, err = buf.Write(data); err != nil { + return + } + if err = jpeg.Encode(&buf, photo, nil); err != nil { + return + } + uat.Contents = append(uat.Contents, &OpaqueSubpacket{ + SubType: UserAttrImageSubpacket, + Contents: buf.Bytes()}) + } + return +} + +// NewUserAttribute creates a new user attribute packet containing the given subpackets. +func NewUserAttribute(contents ...*OpaqueSubpacket) *UserAttribute { + return &UserAttribute{Contents: contents} +} + +func (uat *UserAttribute) parse(r io.Reader) (err error) { + // RFC 4880, section 5.13 + b, err := ioutil.ReadAll(r) + if err != nil { + return + } + uat.Contents, err = OpaqueSubpackets(b) + return +} + +// Serialize marshals the user attribute to w in the form of an OpenPGP packet, including +// header. +func (uat *UserAttribute) Serialize(w io.Writer) (err error) { + var buf bytes.Buffer + for _, sp := range uat.Contents { + sp.Serialize(&buf) + } + if err = serializeHeader(w, packetTypeUserAttribute, buf.Len()); err != nil { + return err + } + _, err = w.Write(buf.Bytes()) + return +} + +// ImageData returns zero or more byte slices, each containing +// JPEG File Interchange Format (JFIF), for each photo in the +// user attribute packet. +func (uat *UserAttribute) ImageData() (imageData [][]byte) { + for _, sp := range uat.Contents { + if sp.SubType == UserAttrImageSubpacket && len(sp.Contents) > 16 { + imageData = append(imageData, sp.Contents[16:]) + } + } + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/packet/userid.go b/vendor/golang.org/x/crypto/openpgp/packet/userid.go new file mode 100644 index 00000000000..d6bea7d4acc --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/packet/userid.go @@ -0,0 +1,160 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packet + +import ( + "io" + "io/ioutil" + "strings" +) + +// UserId contains text that is intended to represent the name and email +// address of the key holder. See RFC 4880, section 5.11. By convention, this +// takes the form "Full Name (Comment) " +type UserId struct { + Id string // By convention, this takes the form "Full Name (Comment) " which is split out in the fields below. + + Name, Comment, Email string +} + +func hasInvalidCharacters(s string) bool { + for _, c := range s { + switch c { + case '(', ')', '<', '>', 0: + return true + } + } + return false +} + +// NewUserId returns a UserId or nil if any of the arguments contain invalid +// characters. The invalid characters are '\x00', '(', ')', '<' and '>' +func NewUserId(name, comment, email string) *UserId { + // RFC 4880 doesn't deal with the structure of userid strings; the + // name, comment and email form is just a convention. However, there's + // no convention about escaping the metacharacters and GPG just refuses + // to create user ids where, say, the name contains a '('. We mirror + // this behaviour. + + if hasInvalidCharacters(name) || hasInvalidCharacters(comment) || hasInvalidCharacters(email) { + return nil + } + + uid := new(UserId) + uid.Name, uid.Comment, uid.Email = name, comment, email + uid.Id = name + if len(comment) > 0 { + if len(uid.Id) > 0 { + uid.Id += " " + } + uid.Id += "(" + uid.Id += comment + uid.Id += ")" + } + if len(email) > 0 { + if len(uid.Id) > 0 { + uid.Id += " " + } + uid.Id += "<" + uid.Id += email + uid.Id += ">" + } + return uid +} + +func (uid *UserId) parse(r io.Reader) (err error) { + // RFC 4880, section 5.11 + b, err := ioutil.ReadAll(r) + if err != nil { + return + } + uid.Id = string(b) + uid.Name, uid.Comment, uid.Email = parseUserId(uid.Id) + return +} + +// Serialize marshals uid to w in the form of an OpenPGP packet, including +// header. +func (uid *UserId) Serialize(w io.Writer) error { + err := serializeHeader(w, packetTypeUserId, len(uid.Id)) + if err != nil { + return err + } + _, err = w.Write([]byte(uid.Id)) + return err +} + +// parseUserId extracts the name, comment and email from a user id string that +// is formatted as "Full Name (Comment) ". +func parseUserId(id string) (name, comment, email string) { + var n, c, e struct { + start, end int + } + var state int + + for offset, rune := range id { + switch state { + case 0: + // Entering name + n.start = offset + state = 1 + fallthrough + case 1: + // In name + if rune == '(' { + state = 2 + n.end = offset + } else if rune == '<' { + state = 5 + n.end = offset + } + case 2: + // Entering comment + c.start = offset + state = 3 + fallthrough + case 3: + // In comment + if rune == ')' { + state = 4 + c.end = offset + } + case 4: + // Between comment and email + if rune == '<' { + state = 5 + } + case 5: + // Entering email + e.start = offset + state = 6 + fallthrough + case 6: + // In email + if rune == '>' { + state = 7 + e.end = offset + } + default: + // After email + } + } + switch state { + case 1: + // ended in the name + n.end = len(id) + case 3: + // ended in comment + c.end = len(id) + case 6: + // ended in email + e.end = len(id) + } + + name = strings.TrimSpace(id[n.start:n.end]) + comment = strings.TrimSpace(id[c.start:c.end]) + email = strings.TrimSpace(id[e.start:e.end]) + return +} diff --git a/vendor/golang.org/x/crypto/openpgp/read.go b/vendor/golang.org/x/crypto/openpgp/read.go new file mode 100644 index 00000000000..6ec664f44a1 --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/read.go @@ -0,0 +1,442 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package openpgp implements high level operations on OpenPGP messages. +package openpgp // import "golang.org/x/crypto/openpgp" + +import ( + "crypto" + _ "crypto/sha256" + "hash" + "io" + "strconv" + + "golang.org/x/crypto/openpgp/armor" + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/packet" +) + +// SignatureType is the armor type for a PGP signature. +var SignatureType = "PGP SIGNATURE" + +// readArmored reads an armored block with the given type. +func readArmored(r io.Reader, expectedType string) (body io.Reader, err error) { + block, err := armor.Decode(r) + if err != nil { + return + } + + if block.Type != expectedType { + return nil, errors.InvalidArgumentError("expected '" + expectedType + "', got: " + block.Type) + } + + return block.Body, nil +} + +// MessageDetails contains the result of parsing an OpenPGP encrypted and/or +// signed message. +type MessageDetails struct { + IsEncrypted bool // true if the message was encrypted. + EncryptedToKeyIds []uint64 // the list of recipient key ids. + IsSymmetricallyEncrypted bool // true if a passphrase could have decrypted the message. + DecryptedWith Key // the private key used to decrypt the message, if any. + IsSigned bool // true if the message is signed. + SignedByKeyId uint64 // the key id of the signer, if any. + SignedBy *Key // the key of the signer, if available. + LiteralData *packet.LiteralData // the metadata of the contents + UnverifiedBody io.Reader // the contents of the message. + + // If IsSigned is true and SignedBy is non-zero then the signature will + // be verified as UnverifiedBody is read. The signature cannot be + // checked until the whole of UnverifiedBody is read so UnverifiedBody + // must be consumed until EOF before the data can be trusted. Even if a + // message isn't signed (or the signer is unknown) the data may contain + // an authentication code that is only checked once UnverifiedBody has + // been consumed. Once EOF has been seen, the following fields are + // valid. (An authentication code failure is reported as a + // SignatureError error when reading from UnverifiedBody.) + SignatureError error // nil if the signature is good. + Signature *packet.Signature // the signature packet itself, if v4 (default) + SignatureV3 *packet.SignatureV3 // the signature packet if it is a v2 or v3 signature + + decrypted io.ReadCloser +} + +// A PromptFunction is used as a callback by functions that may need to decrypt +// a private key, or prompt for a passphrase. It is called with a list of +// acceptable, encrypted private keys and a boolean that indicates whether a +// passphrase is usable. It should either decrypt a private key or return a +// passphrase to try. If the decrypted private key or given passphrase isn't +// correct, the function will be called again, forever. Any error returned will +// be passed up. +type PromptFunction func(keys []Key, symmetric bool) ([]byte, error) + +// A keyEnvelopePair is used to store a private key with the envelope that +// contains a symmetric key, encrypted with that key. +type keyEnvelopePair struct { + key Key + encryptedKey *packet.EncryptedKey +} + +// ReadMessage parses an OpenPGP message that may be signed and/or encrypted. +// The given KeyRing should contain both public keys (for signature +// verification) and, possibly encrypted, private keys for decrypting. +// If config is nil, sensible defaults will be used. +func ReadMessage(r io.Reader, keyring KeyRing, prompt PromptFunction, config *packet.Config) (md *MessageDetails, err error) { + var p packet.Packet + + var symKeys []*packet.SymmetricKeyEncrypted + var pubKeys []keyEnvelopePair + var se *packet.SymmetricallyEncrypted + + packets := packet.NewReader(r) + md = new(MessageDetails) + md.IsEncrypted = true + + // The message, if encrypted, starts with a number of packets + // containing an encrypted decryption key. The decryption key is either + // encrypted to a public key, or with a passphrase. This loop + // collects these packets. +ParsePackets: + for { + p, err = packets.Next() + if err != nil { + return nil, err + } + switch p := p.(type) { + case *packet.SymmetricKeyEncrypted: + // This packet contains the decryption key encrypted with a passphrase. + md.IsSymmetricallyEncrypted = true + symKeys = append(symKeys, p) + case *packet.EncryptedKey: + // This packet contains the decryption key encrypted to a public key. + md.EncryptedToKeyIds = append(md.EncryptedToKeyIds, p.KeyId) + switch p.Algo { + case packet.PubKeyAlgoRSA, packet.PubKeyAlgoRSAEncryptOnly, packet.PubKeyAlgoElGamal: + break + default: + continue + } + var keys []Key + if p.KeyId == 0 { + keys = keyring.DecryptionKeys() + } else { + keys = keyring.KeysById(p.KeyId) + } + for _, k := range keys { + pubKeys = append(pubKeys, keyEnvelopePair{k, p}) + } + case *packet.SymmetricallyEncrypted: + se = p + break ParsePackets + case *packet.Compressed, *packet.LiteralData, *packet.OnePassSignature: + // This message isn't encrypted. + if len(symKeys) != 0 || len(pubKeys) != 0 { + return nil, errors.StructuralError("key material not followed by encrypted message") + } + packets.Unread(p) + return readSignedMessage(packets, nil, keyring) + } + } + + var candidates []Key + var decrypted io.ReadCloser + + // Now that we have the list of encrypted keys we need to decrypt at + // least one of them or, if we cannot, we need to call the prompt + // function so that it can decrypt a key or give us a passphrase. +FindKey: + for { + // See if any of the keys already have a private key available + candidates = candidates[:0] + candidateFingerprints := make(map[string]bool) + + for _, pk := range pubKeys { + if pk.key.PrivateKey == nil { + continue + } + if !pk.key.PrivateKey.Encrypted { + if len(pk.encryptedKey.Key) == 0 { + pk.encryptedKey.Decrypt(pk.key.PrivateKey, config) + } + if len(pk.encryptedKey.Key) == 0 { + continue + } + decrypted, err = se.Decrypt(pk.encryptedKey.CipherFunc, pk.encryptedKey.Key) + if err != nil && err != errors.ErrKeyIncorrect { + return nil, err + } + if decrypted != nil { + md.DecryptedWith = pk.key + break FindKey + } + } else { + fpr := string(pk.key.PublicKey.Fingerprint[:]) + if v := candidateFingerprints[fpr]; v { + continue + } + candidates = append(candidates, pk.key) + candidateFingerprints[fpr] = true + } + } + + if len(candidates) == 0 && len(symKeys) == 0 { + return nil, errors.ErrKeyIncorrect + } + + if prompt == nil { + return nil, errors.ErrKeyIncorrect + } + + passphrase, err := prompt(candidates, len(symKeys) != 0) + if err != nil { + return nil, err + } + + // Try the symmetric passphrase first + if len(symKeys) != 0 && passphrase != nil { + for _, s := range symKeys { + key, cipherFunc, err := s.Decrypt(passphrase) + if err == nil { + decrypted, err = se.Decrypt(cipherFunc, key) + if err != nil && err != errors.ErrKeyIncorrect { + return nil, err + } + if decrypted != nil { + break FindKey + } + } + + } + } + } + + md.decrypted = decrypted + if err := packets.Push(decrypted); err != nil { + return nil, err + } + return readSignedMessage(packets, md, keyring) +} + +// readSignedMessage reads a possibly signed message if mdin is non-zero then +// that structure is updated and returned. Otherwise a fresh MessageDetails is +// used. +func readSignedMessage(packets *packet.Reader, mdin *MessageDetails, keyring KeyRing) (md *MessageDetails, err error) { + if mdin == nil { + mdin = new(MessageDetails) + } + md = mdin + + var p packet.Packet + var h hash.Hash + var wrappedHash hash.Hash +FindLiteralData: + for { + p, err = packets.Next() + if err != nil { + return nil, err + } + switch p := p.(type) { + case *packet.Compressed: + if err := packets.Push(p.Body); err != nil { + return nil, err + } + case *packet.OnePassSignature: + if !p.IsLast { + return nil, errors.UnsupportedError("nested signatures") + } + + h, wrappedHash, err = hashForSignature(p.Hash, p.SigType) + if err != nil { + md = nil + return + } + + md.IsSigned = true + md.SignedByKeyId = p.KeyId + keys := keyring.KeysByIdUsage(p.KeyId, packet.KeyFlagSign) + if len(keys) > 0 { + md.SignedBy = &keys[0] + } + case *packet.LiteralData: + md.LiteralData = p + break FindLiteralData + } + } + + if md.SignedBy != nil { + md.UnverifiedBody = &signatureCheckReader{packets, h, wrappedHash, md} + } else if md.decrypted != nil { + md.UnverifiedBody = checkReader{md} + } else { + md.UnverifiedBody = md.LiteralData.Body + } + + return md, nil +} + +// hashForSignature returns a pair of hashes that can be used to verify a +// signature. The signature may specify that the contents of the signed message +// should be preprocessed (i.e. to normalize line endings). Thus this function +// returns two hashes. The second should be used to hash the message itself and +// performs any needed preprocessing. +func hashForSignature(hashId crypto.Hash, sigType packet.SignatureType) (hash.Hash, hash.Hash, error) { + if !hashId.Available() { + return nil, nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hashId))) + } + h := hashId.New() + + switch sigType { + case packet.SigTypeBinary: + return h, h, nil + case packet.SigTypeText: + return h, NewCanonicalTextHash(h), nil + } + + return nil, nil, errors.UnsupportedError("unsupported signature type: " + strconv.Itoa(int(sigType))) +} + +// checkReader wraps an io.Reader from a LiteralData packet. When it sees EOF +// it closes the ReadCloser from any SymmetricallyEncrypted packet to trigger +// MDC checks. +type checkReader struct { + md *MessageDetails +} + +func (cr checkReader) Read(buf []byte) (n int, err error) { + n, err = cr.md.LiteralData.Body.Read(buf) + if err == io.EOF { + mdcErr := cr.md.decrypted.Close() + if mdcErr != nil { + err = mdcErr + } + } + return +} + +// signatureCheckReader wraps an io.Reader from a LiteralData packet and hashes +// the data as it is read. When it sees an EOF from the underlying io.Reader +// it parses and checks a trailing Signature packet and triggers any MDC checks. +type signatureCheckReader struct { + packets *packet.Reader + h, wrappedHash hash.Hash + md *MessageDetails +} + +func (scr *signatureCheckReader) Read(buf []byte) (n int, err error) { + n, err = scr.md.LiteralData.Body.Read(buf) + scr.wrappedHash.Write(buf[:n]) + if err == io.EOF { + var p packet.Packet + p, scr.md.SignatureError = scr.packets.Next() + if scr.md.SignatureError != nil { + return + } + + var ok bool + if scr.md.Signature, ok = p.(*packet.Signature); ok { + scr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignature(scr.h, scr.md.Signature) + } else if scr.md.SignatureV3, ok = p.(*packet.SignatureV3); ok { + scr.md.SignatureError = scr.md.SignedBy.PublicKey.VerifySignatureV3(scr.h, scr.md.SignatureV3) + } else { + scr.md.SignatureError = errors.StructuralError("LiteralData not followed by Signature") + return + } + + // The SymmetricallyEncrypted packet, if any, might have an + // unsigned hash of its own. In order to check this we need to + // close that Reader. + if scr.md.decrypted != nil { + mdcErr := scr.md.decrypted.Close() + if mdcErr != nil { + err = mdcErr + } + } + } + return +} + +// CheckDetachedSignature takes a signed file and a detached signature and +// returns the signer if the signature is valid. If the signer isn't known, +// ErrUnknownIssuer is returned. +func CheckDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) { + var issuerKeyId uint64 + var hashFunc crypto.Hash + var sigType packet.SignatureType + var keys []Key + var p packet.Packet + + packets := packet.NewReader(signature) + for { + p, err = packets.Next() + if err == io.EOF { + return nil, errors.ErrUnknownIssuer + } + if err != nil { + return nil, err + } + + switch sig := p.(type) { + case *packet.Signature: + if sig.IssuerKeyId == nil { + return nil, errors.StructuralError("signature doesn't have an issuer") + } + issuerKeyId = *sig.IssuerKeyId + hashFunc = sig.Hash + sigType = sig.SigType + case *packet.SignatureV3: + issuerKeyId = sig.IssuerKeyId + hashFunc = sig.Hash + sigType = sig.SigType + default: + return nil, errors.StructuralError("non signature packet found") + } + + keys = keyring.KeysByIdUsage(issuerKeyId, packet.KeyFlagSign) + if len(keys) > 0 { + break + } + } + + if len(keys) == 0 { + panic("unreachable") + } + + h, wrappedHash, err := hashForSignature(hashFunc, sigType) + if err != nil { + return nil, err + } + + if _, err := io.Copy(wrappedHash, signed); err != nil && err != io.EOF { + return nil, err + } + + for _, key := range keys { + switch sig := p.(type) { + case *packet.Signature: + err = key.PublicKey.VerifySignature(h, sig) + case *packet.SignatureV3: + err = key.PublicKey.VerifySignatureV3(h, sig) + default: + panic("unreachable") + } + + if err == nil { + return key.Entity, nil + } + } + + return nil, err +} + +// CheckArmoredDetachedSignature performs the same actions as +// CheckDetachedSignature but expects the signature to be armored. +func CheckArmoredDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) { + body, err := readArmored(signature, SignatureType) + if err != nil { + return + } + + return CheckDetachedSignature(keyring, signed, body) +} diff --git a/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go b/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go new file mode 100644 index 00000000000..4b9a44ca26d --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/s2k/s2k.go @@ -0,0 +1,273 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package s2k implements the various OpenPGP string-to-key transforms as +// specified in RFC 4800 section 3.7.1. +package s2k // import "golang.org/x/crypto/openpgp/s2k" + +import ( + "crypto" + "hash" + "io" + "strconv" + + "golang.org/x/crypto/openpgp/errors" +) + +// Config collects configuration parameters for s2k key-stretching +// transformatioms. A nil *Config is valid and results in all default +// values. Currently, Config is used only by the Serialize function in +// this package. +type Config struct { + // Hash is the default hash function to be used. If + // nil, SHA1 is used. + Hash crypto.Hash + // S2KCount is only used for symmetric encryption. It + // determines the strength of the passphrase stretching when + // the said passphrase is hashed to produce a key. S2KCount + // should be between 1024 and 65011712, inclusive. If Config + // is nil or S2KCount is 0, the value 65536 used. Not all + // values in the above range can be represented. S2KCount will + // be rounded up to the next representable value if it cannot + // be encoded exactly. When set, it is strongly encrouraged to + // use a value that is at least 65536. See RFC 4880 Section + // 3.7.1.3. + S2KCount int +} + +func (c *Config) hash() crypto.Hash { + if c == nil || uint(c.Hash) == 0 { + // SHA1 is the historical default in this package. + return crypto.SHA1 + } + + return c.Hash +} + +func (c *Config) encodedCount() uint8 { + if c == nil || c.S2KCount == 0 { + return 96 // The common case. Correspoding to 65536 + } + + i := c.S2KCount + switch { + // Behave like GPG. Should we make 65536 the lowest value used? + case i < 1024: + i = 1024 + case i > 65011712: + i = 65011712 + } + + return encodeCount(i) +} + +// encodeCount converts an iterative "count" in the range 1024 to +// 65011712, inclusive, to an encoded count. The return value is the +// octet that is actually stored in the GPG file. encodeCount panics +// if i is not in the above range (encodedCount above takes care to +// pass i in the correct range). See RFC 4880 Section 3.7.7.1. +func encodeCount(i int) uint8 { + if i < 1024 || i > 65011712 { + panic("count arg i outside the required range") + } + + for encoded := 0; encoded < 256; encoded++ { + count := decodeCount(uint8(encoded)) + if count >= i { + return uint8(encoded) + } + } + + return 255 +} + +// decodeCount returns the s2k mode 3 iterative "count" corresponding to +// the encoded octet c. +func decodeCount(c uint8) int { + return (16 + int(c&15)) << (uint32(c>>4) + 6) +} + +// Simple writes to out the result of computing the Simple S2K function (RFC +// 4880, section 3.7.1.1) using the given hash and input passphrase. +func Simple(out []byte, h hash.Hash, in []byte) { + Salted(out, h, in, nil) +} + +var zero [1]byte + +// Salted writes to out the result of computing the Salted S2K function (RFC +// 4880, section 3.7.1.2) using the given hash, input passphrase and salt. +func Salted(out []byte, h hash.Hash, in []byte, salt []byte) { + done := 0 + var digest []byte + + for i := 0; done < len(out); i++ { + h.Reset() + for j := 0; j < i; j++ { + h.Write(zero[:]) + } + h.Write(salt) + h.Write(in) + digest = h.Sum(digest[:0]) + n := copy(out[done:], digest) + done += n + } +} + +// Iterated writes to out the result of computing the Iterated and Salted S2K +// function (RFC 4880, section 3.7.1.3) using the given hash, input passphrase, +// salt and iteration count. +func Iterated(out []byte, h hash.Hash, in []byte, salt []byte, count int) { + combined := make([]byte, len(in)+len(salt)) + copy(combined, salt) + copy(combined[len(salt):], in) + + if count < len(combined) { + count = len(combined) + } + + done := 0 + var digest []byte + for i := 0; done < len(out); i++ { + h.Reset() + for j := 0; j < i; j++ { + h.Write(zero[:]) + } + written := 0 + for written < count { + if written+len(combined) > count { + todo := count - written + h.Write(combined[:todo]) + written = count + } else { + h.Write(combined) + written += len(combined) + } + } + digest = h.Sum(digest[:0]) + n := copy(out[done:], digest) + done += n + } +} + +// Parse reads a binary specification for a string-to-key transformation from r +// and returns a function which performs that transform. +func Parse(r io.Reader) (f func(out, in []byte), err error) { + var buf [9]byte + + _, err = io.ReadFull(r, buf[:2]) + if err != nil { + return + } + + hash, ok := HashIdToHash(buf[1]) + if !ok { + return nil, errors.UnsupportedError("hash for S2K function: " + strconv.Itoa(int(buf[1]))) + } + if !hash.Available() { + return nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hash))) + } + h := hash.New() + + switch buf[0] { + case 0: + f := func(out, in []byte) { + Simple(out, h, in) + } + return f, nil + case 1: + _, err = io.ReadFull(r, buf[:8]) + if err != nil { + return + } + f := func(out, in []byte) { + Salted(out, h, in, buf[:8]) + } + return f, nil + case 3: + _, err = io.ReadFull(r, buf[:9]) + if err != nil { + return + } + count := decodeCount(buf[8]) + f := func(out, in []byte) { + Iterated(out, h, in, buf[:8], count) + } + return f, nil + } + + return nil, errors.UnsupportedError("S2K function") +} + +// Serialize salts and stretches the given passphrase and writes the +// resulting key into key. It also serializes an S2K descriptor to +// w. The key stretching can be configured with c, which may be +// nil. In that case, sensible defaults will be used. +func Serialize(w io.Writer, key []byte, rand io.Reader, passphrase []byte, c *Config) error { + var buf [11]byte + buf[0] = 3 /* iterated and salted */ + buf[1], _ = HashToHashId(c.hash()) + salt := buf[2:10] + if _, err := io.ReadFull(rand, salt); err != nil { + return err + } + encodedCount := c.encodedCount() + count := decodeCount(encodedCount) + buf[10] = encodedCount + if _, err := w.Write(buf[:]); err != nil { + return err + } + + Iterated(key, c.hash().New(), passphrase, salt, count) + return nil +} + +// hashToHashIdMapping contains pairs relating OpenPGP's hash identifier with +// Go's crypto.Hash type. See RFC 4880, section 9.4. +var hashToHashIdMapping = []struct { + id byte + hash crypto.Hash + name string +}{ + {1, crypto.MD5, "MD5"}, + {2, crypto.SHA1, "SHA1"}, + {3, crypto.RIPEMD160, "RIPEMD160"}, + {8, crypto.SHA256, "SHA256"}, + {9, crypto.SHA384, "SHA384"}, + {10, crypto.SHA512, "SHA512"}, + {11, crypto.SHA224, "SHA224"}, +} + +// HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP +// hash id. +func HashIdToHash(id byte) (h crypto.Hash, ok bool) { + for _, m := range hashToHashIdMapping { + if m.id == id { + return m.hash, true + } + } + return 0, false +} + +// HashIdToString returns the name of the hash function corresponding to the +// given OpenPGP hash id. +func HashIdToString(id byte) (name string, ok bool) { + for _, m := range hashToHashIdMapping { + if m.id == id { + return m.name, true + } + } + + return "", false +} + +// HashIdToHash returns an OpenPGP hash id which corresponds the given Hash. +func HashToHashId(h crypto.Hash) (id byte, ok bool) { + for _, m := range hashToHashIdMapping { + if m.hash == h { + return m.id, true + } + } + return 0, false +} diff --git a/vendor/golang.org/x/crypto/openpgp/write.go b/vendor/golang.org/x/crypto/openpgp/write.go new file mode 100644 index 00000000000..4ee71784ebe --- /dev/null +++ b/vendor/golang.org/x/crypto/openpgp/write.go @@ -0,0 +1,418 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package openpgp + +import ( + "crypto" + "hash" + "io" + "strconv" + "time" + + "golang.org/x/crypto/openpgp/armor" + "golang.org/x/crypto/openpgp/errors" + "golang.org/x/crypto/openpgp/packet" + "golang.org/x/crypto/openpgp/s2k" +) + +// DetachSign signs message with the private key from signer (which must +// already have been decrypted) and writes the signature to w. +// If config is nil, sensible defaults will be used. +func DetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { + return detachSign(w, signer, message, packet.SigTypeBinary, config) +} + +// ArmoredDetachSign signs message with the private key from signer (which +// must already have been decrypted) and writes an armored signature to w. +// If config is nil, sensible defaults will be used. +func ArmoredDetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) (err error) { + return armoredDetachSign(w, signer, message, packet.SigTypeBinary, config) +} + +// DetachSignText signs message (after canonicalising the line endings) with +// the private key from signer (which must already have been decrypted) and +// writes the signature to w. +// If config is nil, sensible defaults will be used. +func DetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { + return detachSign(w, signer, message, packet.SigTypeText, config) +} + +// ArmoredDetachSignText signs message (after canonicalising the line endings) +// with the private key from signer (which must already have been decrypted) +// and writes an armored signature to w. +// If config is nil, sensible defaults will be used. +func ArmoredDetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error { + return armoredDetachSign(w, signer, message, packet.SigTypeText, config) +} + +func armoredDetachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) { + out, err := armor.Encode(w, SignatureType, nil) + if err != nil { + return + } + err = detachSign(out, signer, message, sigType, config) + if err != nil { + return + } + return out.Close() +} + +func detachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) { + if signer.PrivateKey == nil { + return errors.InvalidArgumentError("signing key doesn't have a private key") + } + if signer.PrivateKey.Encrypted { + return errors.InvalidArgumentError("signing key is encrypted") + } + + sig := new(packet.Signature) + sig.SigType = sigType + sig.PubKeyAlgo = signer.PrivateKey.PubKeyAlgo + sig.Hash = config.Hash() + sig.CreationTime = config.Now() + sig.IssuerKeyId = &signer.PrivateKey.KeyId + + h, wrappedHash, err := hashForSignature(sig.Hash, sig.SigType) + if err != nil { + return + } + io.Copy(wrappedHash, message) + + err = sig.Sign(h, signer.PrivateKey, config) + if err != nil { + return + } + + return sig.Serialize(w) +} + +// FileHints contains metadata about encrypted files. This metadata is, itself, +// encrypted. +type FileHints struct { + // IsBinary can be set to hint that the contents are binary data. + IsBinary bool + // FileName hints at the name of the file that should be written. It's + // truncated to 255 bytes if longer. It may be empty to suggest that the + // file should not be written to disk. It may be equal to "_CONSOLE" to + // suggest the data should not be written to disk. + FileName string + // ModTime contains the modification time of the file, or the zero time if not applicable. + ModTime time.Time +} + +// SymmetricallyEncrypt acts like gpg -c: it encrypts a file with a passphrase. +// The resulting WriteCloser must be closed after the contents of the file have +// been written. +// If config is nil, sensible defaults will be used. +func SymmetricallyEncrypt(ciphertext io.Writer, passphrase []byte, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) { + if hints == nil { + hints = &FileHints{} + } + + key, err := packet.SerializeSymmetricKeyEncrypted(ciphertext, passphrase, config) + if err != nil { + return + } + w, err := packet.SerializeSymmetricallyEncrypted(ciphertext, config.Cipher(), key, config) + if err != nil { + return + } + + literaldata := w + if algo := config.Compression(); algo != packet.CompressionNone { + var compConfig *packet.CompressionConfig + if config != nil { + compConfig = config.CompressionConfig + } + literaldata, err = packet.SerializeCompressed(w, algo, compConfig) + if err != nil { + return + } + } + + var epochSeconds uint32 + if !hints.ModTime.IsZero() { + epochSeconds = uint32(hints.ModTime.Unix()) + } + return packet.SerializeLiteral(literaldata, hints.IsBinary, hints.FileName, epochSeconds) +} + +// intersectPreferences mutates and returns a prefix of a that contains only +// the values in the intersection of a and b. The order of a is preserved. +func intersectPreferences(a []uint8, b []uint8) (intersection []uint8) { + var j int + for _, v := range a { + for _, v2 := range b { + if v == v2 { + a[j] = v + j++ + break + } + } + } + + return a[:j] +} + +func hashToHashId(h crypto.Hash) uint8 { + v, ok := s2k.HashToHashId(h) + if !ok { + panic("tried to convert unknown hash") + } + return v +} + +// writeAndSign writes the data as a payload package and, optionally, signs +// it. hints contains optional information, that is also encrypted, +// that aids the recipients in processing the message. The resulting +// WriteCloser must be closed after the contents of the file have been +// written. If config is nil, sensible defaults will be used. +func writeAndSign(payload io.WriteCloser, candidateHashes []uint8, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) { + var signer *packet.PrivateKey + if signed != nil { + signKey, ok := signed.signingKey(config.Now()) + if !ok { + return nil, errors.InvalidArgumentError("no valid signing keys") + } + signer = signKey.PrivateKey + if signer == nil { + return nil, errors.InvalidArgumentError("no private key in signing key") + } + if signer.Encrypted { + return nil, errors.InvalidArgumentError("signing key must be decrypted") + } + } + + var hash crypto.Hash + for _, hashId := range candidateHashes { + if h, ok := s2k.HashIdToHash(hashId); ok && h.Available() { + hash = h + break + } + } + + // If the hash specified by config is a candidate, we'll use that. + if configuredHash := config.Hash(); configuredHash.Available() { + for _, hashId := range candidateHashes { + if h, ok := s2k.HashIdToHash(hashId); ok && h == configuredHash { + hash = h + break + } + } + } + + if hash == 0 { + hashId := candidateHashes[0] + name, ok := s2k.HashIdToString(hashId) + if !ok { + name = "#" + strconv.Itoa(int(hashId)) + } + return nil, errors.InvalidArgumentError("cannot encrypt because no candidate hash functions are compiled in. (Wanted " + name + " in this case.)") + } + + if signer != nil { + ops := &packet.OnePassSignature{ + SigType: packet.SigTypeBinary, + Hash: hash, + PubKeyAlgo: signer.PubKeyAlgo, + KeyId: signer.KeyId, + IsLast: true, + } + if err := ops.Serialize(payload); err != nil { + return nil, err + } + } + + if hints == nil { + hints = &FileHints{} + } + + w := payload + if signer != nil { + // If we need to write a signature packet after the literal + // data then we need to stop literalData from closing + // encryptedData. + w = noOpCloser{w} + + } + var epochSeconds uint32 + if !hints.ModTime.IsZero() { + epochSeconds = uint32(hints.ModTime.Unix()) + } + literalData, err := packet.SerializeLiteral(w, hints.IsBinary, hints.FileName, epochSeconds) + if err != nil { + return nil, err + } + + if signer != nil { + return signatureWriter{payload, literalData, hash, hash.New(), signer, config}, nil + } + return literalData, nil +} + +// Encrypt encrypts a message to a number of recipients and, optionally, signs +// it. hints contains optional information, that is also encrypted, that aids +// the recipients in processing the message. The resulting WriteCloser must +// be closed after the contents of the file have been written. +// If config is nil, sensible defaults will be used. +func Encrypt(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) { + if len(to) == 0 { + return nil, errors.InvalidArgumentError("no encryption recipient provided") + } + + // These are the possible ciphers that we'll use for the message. + candidateCiphers := []uint8{ + uint8(packet.CipherAES128), + uint8(packet.CipherAES256), + uint8(packet.CipherCAST5), + } + // These are the possible hash functions that we'll use for the signature. + candidateHashes := []uint8{ + hashToHashId(crypto.SHA256), + hashToHashId(crypto.SHA384), + hashToHashId(crypto.SHA512), + hashToHashId(crypto.SHA1), + hashToHashId(crypto.RIPEMD160), + } + // In the event that a recipient doesn't specify any supported ciphers + // or hash functions, these are the ones that we assume that every + // implementation supports. + defaultCiphers := candidateCiphers[len(candidateCiphers)-1:] + defaultHashes := candidateHashes[len(candidateHashes)-1:] + + encryptKeys := make([]Key, len(to)) + for i := range to { + var ok bool + encryptKeys[i], ok = to[i].encryptionKey(config.Now()) + if !ok { + return nil, errors.InvalidArgumentError("cannot encrypt a message to key id " + strconv.FormatUint(to[i].PrimaryKey.KeyId, 16) + " because it has no encryption keys") + } + + sig := to[i].primaryIdentity().SelfSignature + + preferredSymmetric := sig.PreferredSymmetric + if len(preferredSymmetric) == 0 { + preferredSymmetric = defaultCiphers + } + preferredHashes := sig.PreferredHash + if len(preferredHashes) == 0 { + preferredHashes = defaultHashes + } + candidateCiphers = intersectPreferences(candidateCiphers, preferredSymmetric) + candidateHashes = intersectPreferences(candidateHashes, preferredHashes) + } + + if len(candidateCiphers) == 0 || len(candidateHashes) == 0 { + return nil, errors.InvalidArgumentError("cannot encrypt because recipient set shares no common algorithms") + } + + cipher := packet.CipherFunction(candidateCiphers[0]) + // If the cipher specified by config is a candidate, we'll use that. + configuredCipher := config.Cipher() + for _, c := range candidateCiphers { + cipherFunc := packet.CipherFunction(c) + if cipherFunc == configuredCipher { + cipher = cipherFunc + break + } + } + + symKey := make([]byte, cipher.KeySize()) + if _, err := io.ReadFull(config.Random(), symKey); err != nil { + return nil, err + } + + for _, key := range encryptKeys { + if err := packet.SerializeEncryptedKey(ciphertext, key.PublicKey, cipher, symKey, config); err != nil { + return nil, err + } + } + + payload, err := packet.SerializeSymmetricallyEncrypted(ciphertext, cipher, symKey, config) + if err != nil { + return + } + + return writeAndSign(payload, candidateHashes, signed, hints, config) +} + +// Sign signs a message. The resulting WriteCloser must be closed after the +// contents of the file have been written. hints contains optional information +// that aids the recipients in processing the message. +// If config is nil, sensible defaults will be used. +func Sign(output io.Writer, signed *Entity, hints *FileHints, config *packet.Config) (input io.WriteCloser, err error) { + if signed == nil { + return nil, errors.InvalidArgumentError("no signer provided") + } + + // These are the possible hash functions that we'll use for the signature. + candidateHashes := []uint8{ + hashToHashId(crypto.SHA256), + hashToHashId(crypto.SHA384), + hashToHashId(crypto.SHA512), + hashToHashId(crypto.SHA1), + hashToHashId(crypto.RIPEMD160), + } + defaultHashes := candidateHashes[len(candidateHashes)-1:] + preferredHashes := signed.primaryIdentity().SelfSignature.PreferredHash + if len(preferredHashes) == 0 { + preferredHashes = defaultHashes + } + candidateHashes = intersectPreferences(candidateHashes, preferredHashes) + return writeAndSign(noOpCloser{output}, candidateHashes, signed, hints, config) +} + +// signatureWriter hashes the contents of a message while passing it along to +// literalData. When closed, it closes literalData, writes a signature packet +// to encryptedData and then also closes encryptedData. +type signatureWriter struct { + encryptedData io.WriteCloser + literalData io.WriteCloser + hashType crypto.Hash + h hash.Hash + signer *packet.PrivateKey + config *packet.Config +} + +func (s signatureWriter) Write(data []byte) (int, error) { + s.h.Write(data) + return s.literalData.Write(data) +} + +func (s signatureWriter) Close() error { + sig := &packet.Signature{ + SigType: packet.SigTypeBinary, + PubKeyAlgo: s.signer.PubKeyAlgo, + Hash: s.hashType, + CreationTime: s.config.Now(), + IssuerKeyId: &s.signer.KeyId, + } + + if err := sig.Sign(s.h, s.signer, s.config); err != nil { + return err + } + if err := s.literalData.Close(); err != nil { + return err + } + if err := sig.Serialize(s.encryptedData); err != nil { + return err + } + return s.encryptedData.Close() +} + +// noOpCloser is like an ioutil.NopCloser, but for an io.Writer. +// TODO: we have two of these in OpenPGP packages alone. This probably needs +// to be promoted somewhere more common. +type noOpCloser struct { + w io.Writer +} + +func (c noOpCloser) Write(data []byte) (n int, err error) { + return c.w.Write(data) +} + +func (c noOpCloser) Close() error { + return nil +} diff --git a/vendor/golang.org/x/crypto/poly1305/mac_noasm.go b/vendor/golang.org/x/crypto/poly1305/mac_noasm.go index a8dd589ae39..d118f30ed56 100644 --- a/vendor/golang.org/x/crypto/poly1305/mac_noasm.go +++ b/vendor/golang.org/x/crypto/poly1305/mac_noasm.go @@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !amd64,!ppc64le gccgo appengine +// +build !amd64,!ppc64le,!s390x gccgo purego package poly1305 type mac struct{ macGeneric } - -func newMAC(key *[32]byte) mac { return mac{newMACGeneric(key)} } diff --git a/vendor/golang.org/x/crypto/poly1305/poly1305.go b/vendor/golang.org/x/crypto/poly1305/poly1305.go index 066159b797d..9d7a6af09fe 100644 --- a/vendor/golang.org/x/crypto/poly1305/poly1305.go +++ b/vendor/golang.org/x/crypto/poly1305/poly1305.go @@ -26,7 +26,9 @@ const TagSize = 16 // 16-byte result into out. Authenticating two different messages with the same // key allows an attacker to forge messages at will. func Sum(out *[16]byte, m []byte, key *[32]byte) { - sum(out, m, key) + h := New(key) + h.Write(m) + h.Sum(out[:0]) } // Verify returns true if mac is a valid authenticator for m with the given key. @@ -46,10 +48,9 @@ func Verify(mac *[16]byte, m []byte, key *[32]byte) bool { // two different messages with the same key allows an attacker // to forge messages at will. func New(key *[32]byte) *MAC { - return &MAC{ - mac: newMAC(key), - finalized: false, - } + m := &MAC{} + initialize(key, &m.macState) + return m } // MAC is an io.Writer computing an authentication tag @@ -58,7 +59,7 @@ func New(key *[32]byte) *MAC { // MAC cannot be used like common hash.Hash implementations, // because using a poly1305 key twice breaks its security. // Therefore writing data to a running MAC after calling -// Sum causes it to panic. +// Sum or Verify causes it to panic. type MAC struct { mac // platform-dependent implementation @@ -71,10 +72,10 @@ func (h *MAC) Size() int { return TagSize } // Write adds more data to the running message authentication code. // It never returns an error. // -// It must not be called after the first call of Sum. +// It must not be called after the first call of Sum or Verify. func (h *MAC) Write(p []byte) (n int, err error) { if h.finalized { - panic("poly1305: write to MAC after Sum") + panic("poly1305: write to MAC after Sum or Verify") } return h.mac.Write(p) } @@ -87,3 +88,12 @@ func (h *MAC) Sum(b []byte) []byte { h.finalized = true return append(b, mac[:]...) } + +// Verify returns whether the authenticator of all data written to +// the message authentication code matches the expected value. +func (h *MAC) Verify(expected []byte) bool { + var mac [TagSize]byte + h.mac.Sum(&mac) + h.finalized = true + return subtle.ConstantTimeCompare(expected, mac[:]) == 1 +} diff --git a/vendor/golang.org/x/crypto/poly1305/sum_amd64.go b/vendor/golang.org/x/crypto/poly1305/sum_amd64.go index df56a652ff0..99e5a1d50ef 100644 --- a/vendor/golang.org/x/crypto/poly1305/sum_amd64.go +++ b/vendor/golang.org/x/crypto/poly1305/sum_amd64.go @@ -2,24 +2,13 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build amd64,!gccgo,!appengine +// +build !gccgo,!purego package poly1305 //go:noescape func update(state *macState, msg []byte) -func sum(out *[16]byte, m []byte, key *[32]byte) { - h := newMAC(key) - h.Write(m) - h.Sum(out) -} - -func newMAC(key *[32]byte) (h mac) { - initialize(key, &h.r, &h.s) - return -} - // mac is a wrapper for macGeneric that redirects calls that would have gone to // updateGeneric to update. // diff --git a/vendor/golang.org/x/crypto/poly1305/sum_amd64.s b/vendor/golang.org/x/crypto/poly1305/sum_amd64.s index 8c0cefbb3cb..8d394a212ee 100644 --- a/vendor/golang.org/x/crypto/poly1305/sum_amd64.s +++ b/vendor/golang.org/x/crypto/poly1305/sum_amd64.s @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build amd64,!gccgo,!appengine +// +build !gccgo,!purego #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/poly1305/sum_generic.go b/vendor/golang.org/x/crypto/poly1305/sum_generic.go index 1187eab78fd..c942a65904f 100644 --- a/vendor/golang.org/x/crypto/poly1305/sum_generic.go +++ b/vendor/golang.org/x/crypto/poly1305/sum_generic.go @@ -31,16 +31,18 @@ func sumGeneric(out *[TagSize]byte, msg []byte, key *[32]byte) { h.Sum(out) } -func newMACGeneric(key *[32]byte) (h macGeneric) { - initialize(key, &h.r, &h.s) - return +func newMACGeneric(key *[32]byte) macGeneric { + m := macGeneric{} + initialize(key, &m.macState) + return m } // macState holds numbers in saturated 64-bit little-endian limbs. That is, // the value of [x0, x1, x2] is x[0] + x[1] * 2⁶⁴ + x[2] * 2¹²⁸. type macState struct { // h is the main accumulator. It is to be interpreted modulo 2¹³⁰ - 5, but - // can grow larger during and after rounds. + // can grow larger during and after rounds. It must, however, remain below + // 2 * (2¹³⁰ - 5). h [3]uint64 // r and s are the private key components. r [2]uint64 @@ -97,11 +99,12 @@ const ( rMask1 = 0x0FFFFFFC0FFFFFFC ) -func initialize(key *[32]byte, r, s *[2]uint64) { - r[0] = binary.LittleEndian.Uint64(key[0:8]) & rMask0 - r[1] = binary.LittleEndian.Uint64(key[8:16]) & rMask1 - s[0] = binary.LittleEndian.Uint64(key[16:24]) - s[1] = binary.LittleEndian.Uint64(key[24:32]) +// initialize loads the 256-bit key into the two 128-bit secret values r and s. +func initialize(key *[32]byte, m *macState) { + m.r[0] = binary.LittleEndian.Uint64(key[0:8]) & rMask0 + m.r[1] = binary.LittleEndian.Uint64(key[8:16]) & rMask1 + m.s[0] = binary.LittleEndian.Uint64(key[16:24]) + m.s[1] = binary.LittleEndian.Uint64(key[24:32]) } // uint128 holds a 128-bit number as two 64-bit limbs, for use with the diff --git a/vendor/golang.org/x/crypto/poly1305/sum_noasm.go b/vendor/golang.org/x/crypto/poly1305/sum_noasm.go deleted file mode 100644 index 32a9cef6bbf..00000000000 --- a/vendor/golang.org/x/crypto/poly1305/sum_noasm.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build s390x,!go1.11 !amd64,!s390x,!ppc64le gccgo appengine nacl - -package poly1305 - -func sum(out *[TagSize]byte, msg []byte, key *[32]byte) { - h := newMAC(key) - h.Write(msg) - h.Sum(out) -} diff --git a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go b/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go index 3233616935b..2e7a120b192 100644 --- a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go +++ b/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go @@ -2,24 +2,13 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build ppc64le,!gccgo,!appengine +// +build !gccgo,!purego package poly1305 //go:noescape func update(state *macState, msg []byte) -func sum(out *[16]byte, m []byte, key *[32]byte) { - h := newMAC(key) - h.Write(m) - h.Sum(out) -} - -func newMAC(key *[32]byte) (h mac) { - initialize(key, &h.r, &h.s) - return -} - // mac is a wrapper for macGeneric that redirects calls that would have gone to // updateGeneric to update. // diff --git a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s b/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s index 4e20bf299a5..4e028138796 100644 --- a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s +++ b/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build ppc64le,!gccgo,!appengine +// +build !gccgo,!purego #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/poly1305/sum_s390x.go b/vendor/golang.org/x/crypto/poly1305/sum_s390x.go index a8920ee9d21..958fedc0790 100644 --- a/vendor/golang.org/x/crypto/poly1305/sum_s390x.go +++ b/vendor/golang.org/x/crypto/poly1305/sum_s390x.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build s390x,go1.11,!gccgo,!appengine +// +build !gccgo,!purego package poly1305 @@ -10,30 +10,66 @@ import ( "golang.org/x/sys/cpu" ) -// poly1305vx is an assembly implementation of Poly1305 that uses vector +// updateVX is an assembly implementation of Poly1305 that uses vector // instructions. It must only be called if the vector facility (vx) is // available. //go:noescape -func poly1305vx(out *[16]byte, m *byte, mlen uint64, key *[32]byte) +func updateVX(state *macState, msg []byte) -// poly1305vmsl is an assembly implementation of Poly1305 that uses vector -// instructions, including VMSL. It must only be called if the vector facility (vx) is -// available and if VMSL is supported. -//go:noescape -func poly1305vmsl(out *[16]byte, m *byte, mlen uint64, key *[32]byte) +// mac is a replacement for macGeneric that uses a larger buffer and redirects +// calls that would have gone to updateGeneric to updateVX if the vector +// facility is installed. +// +// A larger buffer is required for good performance because the vector +// implementation has a higher fixed cost per call than the generic +// implementation. +type mac struct { + macState -func sum(out *[16]byte, m []byte, key *[32]byte) { - if cpu.S390X.HasVX { - var mPtr *byte - if len(m) > 0 { - mPtr = &m[0] - } - if cpu.S390X.HasVXE && len(m) > 256 { - poly1305vmsl(out, mPtr, uint64(len(m)), key) - } else { - poly1305vx(out, mPtr, uint64(len(m)), key) - } - } else { - sumGeneric(out, m, key) - } + buffer [16 * TagSize]byte // size must be a multiple of block size (16) + offset int +} + +func (h *mac) Write(p []byte) (int, error) { + nn := len(p) + if h.offset > 0 { + n := copy(h.buffer[h.offset:], p) + if h.offset+n < len(h.buffer) { + h.offset += n + return nn, nil + } + p = p[n:] + h.offset = 0 + if cpu.S390X.HasVX { + updateVX(&h.macState, h.buffer[:]) + } else { + updateGeneric(&h.macState, h.buffer[:]) + } + } + + tail := len(p) % len(h.buffer) // number of bytes to copy into buffer + body := len(p) - tail // number of bytes to process now + if body > 0 { + if cpu.S390X.HasVX { + updateVX(&h.macState, p[:body]) + } else { + updateGeneric(&h.macState, p[:body]) + } + } + h.offset = copy(h.buffer[:], p[body:]) // copy tail bytes - can be 0 + return nn, nil +} + +func (h *mac) Sum(out *[TagSize]byte) { + state := h.macState + remainder := h.buffer[:h.offset] + + // Use the generic implementation if we have 2 or fewer blocks left + // to sum. The vector implementation has a higher startup time. + if cpu.S390X.HasVX && len(remainder) > 2*TagSize { + updateVX(&state, remainder) + } else if len(remainder) > 0 { + updateGeneric(&state, remainder) + } + finalize(out, &state.h, &state.s) } diff --git a/vendor/golang.org/x/crypto/poly1305/sum_s390x.s b/vendor/golang.org/x/crypto/poly1305/sum_s390x.s index ca5a309d867..0fa9ee6e0bf 100644 --- a/vendor/golang.org/x/crypto/poly1305/sum_s390x.s +++ b/vendor/golang.org/x/crypto/poly1305/sum_s390x.s @@ -2,115 +2,187 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build s390x,go1.11,!gccgo,!appengine +// +build !gccgo,!purego #include "textflag.h" -// Implementation of Poly1305 using the vector facility (vx). +// This implementation of Poly1305 uses the vector facility (vx) +// to process up to 2 blocks (32 bytes) per iteration using an +// algorithm based on the one described in: +// +// NEON crypto, Daniel J. Bernstein & Peter Schwabe +// https://cryptojedi.org/papers/neoncrypto-20120320.pdf +// +// This algorithm uses 5 26-bit limbs to represent a 130-bit +// value. These limbs are, for the most part, zero extended and +// placed into 64-bit vector register elements. Each vector +// register is 128-bits wide and so holds 2 of these elements. +// Using 26-bit limbs allows us plenty of headroom to accomodate +// accumulations before and after multiplication without +// overflowing either 32-bits (before multiplication) or 64-bits +// (after multiplication). +// +// In order to parallelise the operations required to calculate +// the sum we use two separate accumulators and then sum those +// in an extra final step. For compatibility with the generic +// implementation we perform this summation at the end of every +// updateVX call. +// +// To use two accumulators we must multiply the message blocks +// by r² rather than r. Only the final message block should be +// multiplied by r. +// +// Example: +// +// We want to calculate the sum (h) for a 64 byte message (m): +// +// h = m[0:16]r⁴ + m[16:32]r³ + m[32:48]r² + m[48:64]r +// +// To do this we split the calculation into the even indices +// and odd indices of the message. These form our SIMD 'lanes': +// +// h = m[ 0:16]r⁴ + m[32:48]r² + <- lane 0 +// m[16:32]r³ + m[48:64]r <- lane 1 +// +// To calculate this iteratively we refactor so that both lanes +// are written in terms of r² and r: +// +// h = (m[ 0:16]r² + m[32:48])r² + <- lane 0 +// (m[16:32]r² + m[48:64])r <- lane 1 +// ^ ^ +// | coefficients for second iteration +// coefficients for first iteration +// +// So in this case we would have two iterations. In the first +// both lanes are multiplied by r². In the second only the +// first lane is multiplied by r² and the second lane is +// instead multiplied by r. This gives use the odd and even +// powers of r that we need from the original equation. +// +// Notation: +// +// h - accumulator +// r - key +// m - message +// +// [a, b] - SIMD register holding two 64-bit values +// [a, b, c, d] - SIMD register holding four 32-bit values +// xᵢ[n] - limb n of variable x with bit width i +// +// Limbs are expressed in little endian order, so for 26-bit +// limbs x₂₆[4] will be the most significant limb and x₂₆[0] +// will be the least significant limb. -// constants -#define MOD26 V0 -#define EX0 V1 -#define EX1 V2 -#define EX2 V3 +// masking constants +#define MOD24 V0 // [0x0000000000ffffff, 0x0000000000ffffff] - mask low 24-bits +#define MOD26 V1 // [0x0000000003ffffff, 0x0000000003ffffff] - mask low 26-bits -// temporaries -#define T_0 V4 -#define T_1 V5 -#define T_2 V6 -#define T_3 V7 -#define T_4 V8 +// expansion constants (see EXPAND macro) +#define EX0 V2 +#define EX1 V3 +#define EX2 V4 -// key (r) -#define R_0 V9 -#define R_1 V10 -#define R_2 V11 -#define R_3 V12 -#define R_4 V13 -#define R5_1 V14 -#define R5_2 V15 -#define R5_3 V16 -#define R5_4 V17 -#define RSAVE_0 R5 -#define RSAVE_1 R6 -#define RSAVE_2 R7 -#define RSAVE_3 R8 -#define RSAVE_4 R9 -#define R5SAVE_1 V28 -#define R5SAVE_2 V29 -#define R5SAVE_3 V30 -#define R5SAVE_4 V31 +// key (r², r or 1 depending on context) +#define R_0 V5 +#define R_1 V6 +#define R_2 V7 +#define R_3 V8 +#define R_4 V9 -// message block -#define F_0 V18 -#define F_1 V19 -#define F_2 V20 -#define F_3 V21 -#define F_4 V22 +// precalculated coefficients (5r², 5r or 0 depending on context) +#define R5_1 V10 +#define R5_2 V11 +#define R5_3 V12 +#define R5_4 V13 -// accumulator -#define H_0 V23 -#define H_1 V24 -#define H_2 V25 -#define H_3 V26 -#define H_4 V27 +// message block (m) +#define M_0 V14 +#define M_1 V15 +#define M_2 V16 +#define M_3 V17 +#define M_4 V18 -GLOBL ·keyMask<>(SB), RODATA, $16 -DATA ·keyMask<>+0(SB)/8, $0xffffff0ffcffff0f -DATA ·keyMask<>+8(SB)/8, $0xfcffff0ffcffff0f +// accumulator (h) +#define H_0 V19 +#define H_1 V20 +#define H_2 V21 +#define H_3 V22 +#define H_4 V23 -GLOBL ·bswapMask<>(SB), RODATA, $16 -DATA ·bswapMask<>+0(SB)/8, $0x0f0e0d0c0b0a0908 -DATA ·bswapMask<>+8(SB)/8, $0x0706050403020100 +// temporary registers (for short-lived values) +#define T_0 V24 +#define T_1 V25 +#define T_2 V26 +#define T_3 V27 +#define T_4 V28 -GLOBL ·constants<>(SB), RODATA, $64 -// MOD26 -DATA ·constants<>+0(SB)/8, $0x3ffffff -DATA ·constants<>+8(SB)/8, $0x3ffffff +GLOBL ·constants<>(SB), RODATA, $0x30 // EX0 -DATA ·constants<>+16(SB)/8, $0x0006050403020100 -DATA ·constants<>+24(SB)/8, $0x1016151413121110 +DATA ·constants<>+0x00(SB)/8, $0x0006050403020100 +DATA ·constants<>+0x08(SB)/8, $0x1016151413121110 // EX1 -DATA ·constants<>+32(SB)/8, $0x060c0b0a09080706 -DATA ·constants<>+40(SB)/8, $0x161c1b1a19181716 +DATA ·constants<>+0x10(SB)/8, $0x060c0b0a09080706 +DATA ·constants<>+0x18(SB)/8, $0x161c1b1a19181716 // EX2 -DATA ·constants<>+48(SB)/8, $0x0d0d0d0d0d0f0e0d -DATA ·constants<>+56(SB)/8, $0x1d1d1d1d1d1f1e1d +DATA ·constants<>+0x20(SB)/8, $0x0d0d0d0d0d0f0e0d +DATA ·constants<>+0x28(SB)/8, $0x1d1d1d1d1d1f1e1d -// h = (f*g) % (2**130-5) [partial reduction] +// MULTIPLY multiplies each lane of f and g, partially reduced +// modulo 2¹³⁰ - 5. The result, h, consists of partial products +// in each lane that need to be reduced further to produce the +// final result. +// +// h₁₃₀ = (f₁₃₀g₁₃₀) % 2¹³⁰ + (5f₁₃₀g₁₃₀) / 2¹³⁰ +// +// Note that the multiplication by 5 of the high bits is +// achieved by precalculating the multiplication of four of the +// g coefficients by 5. These are g51-g54. #define MULTIPLY(f0, f1, f2, f3, f4, g0, g1, g2, g3, g4, g51, g52, g53, g54, h0, h1, h2, h3, h4) \ VMLOF f0, g0, h0 \ - VMLOF f0, g1, h1 \ - VMLOF f0, g2, h2 \ VMLOF f0, g3, h3 \ + VMLOF f0, g1, h1 \ VMLOF f0, g4, h4 \ + VMLOF f0, g2, h2 \ VMLOF f1, g54, T_0 \ - VMLOF f1, g0, T_1 \ - VMLOF f1, g1, T_2 \ VMLOF f1, g2, T_3 \ + VMLOF f1, g0, T_1 \ VMLOF f1, g3, T_4 \ + VMLOF f1, g1, T_2 \ VMALOF f2, g53, h0, h0 \ - VMALOF f2, g54, h1, h1 \ - VMALOF f2, g0, h2, h2 \ VMALOF f2, g1, h3, h3 \ + VMALOF f2, g54, h1, h1 \ VMALOF f2, g2, h4, h4 \ + VMALOF f2, g0, h2, h2 \ VMALOF f3, g52, T_0, T_0 \ - VMALOF f3, g53, T_1, T_1 \ - VMALOF f3, g54, T_2, T_2 \ VMALOF f3, g0, T_3, T_3 \ + VMALOF f3, g53, T_1, T_1 \ VMALOF f3, g1, T_4, T_4 \ + VMALOF f3, g54, T_2, T_2 \ VMALOF f4, g51, h0, h0 \ - VMALOF f4, g52, h1, h1 \ - VMALOF f4, g53, h2, h2 \ VMALOF f4, g54, h3, h3 \ + VMALOF f4, g52, h1, h1 \ VMALOF f4, g0, h4, h4 \ + VMALOF f4, g53, h2, h2 \ VAG T_0, h0, h0 \ - VAG T_1, h1, h1 \ - VAG T_2, h2, h2 \ VAG T_3, h3, h3 \ - VAG T_4, h4, h4 + VAG T_1, h1, h1 \ + VAG T_4, h4, h4 \ + VAG T_2, h2, h2 -// carry h0->h1 h3->h4, h1->h2 h4->h0, h0->h1 h2->h3, h3->h4 +// REDUCE performs the following carry operations in four +// stages, as specified in Bernstein & Schwabe: +// +// 1: h₂₆[0]->h₂₆[1] h₂₆[3]->h₂₆[4] +// 2: h₂₆[1]->h₂₆[2] h₂₆[4]->h₂₆[0] +// 3: h₂₆[0]->h₂₆[1] h₂₆[2]->h₂₆[3] +// 4: h₂₆[3]->h₂₆[4] +// +// The result is that all of the limbs are limited to 26-bits +// except for h₂₆[1] and h₂₆[4] which are limited to 27-bits. +// +// Note that although each limb is aligned at 26-bit intervals +// they may contain values that exceed 2²⁶ - 1, hence the need +// to carry the excess bits in each limb. #define REDUCE(h0, h1, h2, h3, h4) \ VESRLG $26, h0, T_0 \ VESRLG $26, h3, T_1 \ @@ -136,144 +208,155 @@ DATA ·constants<>+56(SB)/8, $0x1d1d1d1d1d1f1e1d VN MOD26, h3, h3 \ VAG T_2, h4, h4 -// expand in0 into d[0] and in1 into d[1] +// EXPAND splits the 128-bit little-endian values in0 and in1 +// into 26-bit big-endian limbs and places the results into +// the first and second lane of d₂₆[0:4] respectively. +// +// The EX0, EX1 and EX2 constants are arrays of byte indices +// for permutation. The permutation both reverses the bytes +// in the input and ensures the bytes are copied into the +// destination limb ready to be shifted into their final +// position. #define EXPAND(in0, in1, d0, d1, d2, d3, d4) \ - VGBM $0x0707, d1 \ // d1=tmp - VPERM in0, in1, EX2, d4 \ VPERM in0, in1, EX0, d0 \ VPERM in0, in1, EX1, d2 \ - VN d1, d4, d4 \ + VPERM in0, in1, EX2, d4 \ VESRLG $26, d0, d1 \ VESRLG $30, d2, d3 \ VESRLG $4, d2, d2 \ - VN MOD26, d0, d0 \ - VN MOD26, d1, d1 \ - VN MOD26, d2, d2 \ - VN MOD26, d3, d3 + VN MOD26, d0, d0 \ // [in0₂₆[0], in1₂₆[0]] + VN MOD26, d3, d3 \ // [in0₂₆[3], in1₂₆[3]] + VN MOD26, d1, d1 \ // [in0₂₆[1], in1₂₆[1]] + VN MOD24, d4, d4 \ // [in0₂₆[4], in1₂₆[4]] + VN MOD26, d2, d2 // [in0₂₆[2], in1₂₆[2]] -// pack h4:h0 into h1:h0 (no carry) -#define PACK(h0, h1, h2, h3, h4) \ - VESLG $26, h1, h1 \ - VESLG $26, h3, h3 \ - VO h0, h1, h0 \ - VO h2, h3, h2 \ - VESLG $4, h2, h2 \ - VLEIB $7, $48, h1 \ - VSLB h1, h2, h2 \ - VO h0, h2, h0 \ - VLEIB $7, $104, h1 \ - VSLB h1, h4, h3 \ - VO h3, h0, h0 \ - VLEIB $7, $24, h1 \ - VSRLB h1, h4, h1 +// func updateVX(state *macState, msg []byte) +TEXT ·updateVX(SB), NOSPLIT, $0 + MOVD state+0(FP), R1 + LMG msg+8(FP), R2, R3 // R2=msg_base, R3=msg_len -// if h > 2**130-5 then h -= 2**130-5 -#define MOD(h0, h1, t0, t1, t2) \ - VZERO t0 \ - VLEIG $1, $5, t0 \ - VACCQ h0, t0, t1 \ - VAQ h0, t0, t0 \ - VONE t2 \ - VLEIG $1, $-4, t2 \ - VAQ t2, t1, t1 \ - VACCQ h1, t1, t1 \ - VONE t2 \ - VAQ t2, t1, t1 \ - VN h0, t1, t2 \ - VNC t0, t1, t1 \ - VO t1, t2, h0 - -// func poly1305vx(out *[16]byte, m *byte, mlen uint64, key *[32]key) -TEXT ·poly1305vx(SB), $0-32 - // This code processes up to 2 blocks (32 bytes) per iteration - // using the algorithm described in: - // NEON crypto, Daniel J. Bernstein & Peter Schwabe - // https://cryptojedi.org/papers/neoncrypto-20120320.pdf - LMG out+0(FP), R1, R4 // R1=out, R2=m, R3=mlen, R4=key - - // load MOD26, EX0, EX1 and EX2 + // load EX0, EX1 and EX2 MOVD $·constants<>(SB), R5 - VLM (R5), MOD26, EX2 + VLM (R5), EX0, EX2 - // setup r - VL (R4), T_0 - MOVD $·keyMask<>(SB), R6 - VL (R6), T_1 - VN T_0, T_1, T_0 - EXPAND(T_0, T_0, R_0, R_1, R_2, R_3, R_4) + // generate masks + VGMG $(64-24), $63, MOD24 // [0x00ffffff, 0x00ffffff] + VGMG $(64-26), $63, MOD26 // [0x03ffffff, 0x03ffffff] - // setup r*5 - VLEIG $0, $5, T_0 - VLEIG $1, $5, T_0 + // load h (accumulator) and r (key) from state + VZERO T_1 // [0, 0] + VL 0(R1), T_0 // [h₆₄[0], h₆₄[1]] + VLEG $0, 16(R1), T_1 // [h₆₄[2], 0] + VL 24(R1), T_2 // [r₆₄[0], r₆₄[1]] + VPDI $0, T_0, T_2, T_3 // [h₆₄[0], r₆₄[0]] + VPDI $5, T_0, T_2, T_4 // [h₆₄[1], r₆₄[1]] - // store r (for final block) - VMLOF T_0, R_1, R5SAVE_1 - VMLOF T_0, R_2, R5SAVE_2 - VMLOF T_0, R_3, R5SAVE_3 - VMLOF T_0, R_4, R5SAVE_4 - VLGVG $0, R_0, RSAVE_0 - VLGVG $0, R_1, RSAVE_1 - VLGVG $0, R_2, RSAVE_2 - VLGVG $0, R_3, RSAVE_3 - VLGVG $0, R_4, RSAVE_4 + // unpack h and r into 26-bit limbs + // note: h₆₄[2] may have the low 3 bits set, so h₂₆[4] is a 27-bit value + VN MOD26, T_3, H_0 // [h₂₆[0], r₂₆[0]] + VZERO H_1 // [0, 0] + VZERO H_3 // [0, 0] + VGMG $(64-12-14), $(63-12), T_0 // [0x03fff000, 0x03fff000] - 26-bit mask with low 12 bits masked out + VESLG $24, T_1, T_1 // [h₆₄[2]<<24, 0] + VERIMG $-26&63, T_3, MOD26, H_1 // [h₂₆[1], r₂₆[1]] + VESRLG $+52&63, T_3, H_2 // [h₂₆[2], r₂₆[2]] - low 12 bits only + VERIMG $-14&63, T_4, MOD26, H_3 // [h₂₆[1], r₂₆[1]] + VESRLG $40, T_4, H_4 // [h₂₆[4], r₂₆[4]] - low 24 bits only + VERIMG $+12&63, T_4, T_0, H_2 // [h₂₆[2], r₂₆[2]] - complete + VO T_1, H_4, H_4 // [h₂₆[4], r₂₆[4]] - complete - // skip r**2 calculation + // replicate r across all 4 vector elements + VREPF $3, H_0, R_0 // [r₂₆[0], r₂₆[0], r₂₆[0], r₂₆[0]] + VREPF $3, H_1, R_1 // [r₂₆[1], r₂₆[1], r₂₆[1], r₂₆[1]] + VREPF $3, H_2, R_2 // [r₂₆[2], r₂₆[2], r₂₆[2], r₂₆[2]] + VREPF $3, H_3, R_3 // [r₂₆[3], r₂₆[3], r₂₆[3], r₂₆[3]] + VREPF $3, H_4, R_4 // [r₂₆[4], r₂₆[4], r₂₆[4], r₂₆[4]] + + // zero out lane 1 of h + VLEIG $1, $0, H_0 // [h₂₆[0], 0] + VLEIG $1, $0, H_1 // [h₂₆[1], 0] + VLEIG $1, $0, H_2 // [h₂₆[2], 0] + VLEIG $1, $0, H_3 // [h₂₆[3], 0] + VLEIG $1, $0, H_4 // [h₂₆[4], 0] + + // calculate 5r (ignore least significant limb) + VREPIF $5, T_0 + VMLF T_0, R_1, R5_1 // [5r₂₆[1], 5r₂₆[1], 5r₂₆[1], 5r₂₆[1]] + VMLF T_0, R_2, R5_2 // [5r₂₆[2], 5r₂₆[2], 5r₂₆[2], 5r₂₆[2]] + VMLF T_0, R_3, R5_3 // [5r₂₆[3], 5r₂₆[3], 5r₂₆[3], 5r₂₆[3]] + VMLF T_0, R_4, R5_4 // [5r₂₆[4], 5r₂₆[4], 5r₂₆[4], 5r₂₆[4]] + + // skip r² calculation if we are only calculating one block CMPBLE R3, $16, skip - // calculate r**2 - MULTIPLY(R_0, R_1, R_2, R_3, R_4, R_0, R_1, R_2, R_3, R_4, R5SAVE_1, R5SAVE_2, R5SAVE_3, R5SAVE_4, H_0, H_1, H_2, H_3, H_4) - REDUCE(H_0, H_1, H_2, H_3, H_4) - VLEIG $0, $5, T_0 - VLEIG $1, $5, T_0 - VMLOF T_0, H_1, R5_1 - VMLOF T_0, H_2, R5_2 - VMLOF T_0, H_3, R5_3 - VMLOF T_0, H_4, R5_4 - VLR H_0, R_0 - VLR H_1, R_1 - VLR H_2, R_2 - VLR H_3, R_3 - VLR H_4, R_4 + // calculate r² + MULTIPLY(R_0, R_1, R_2, R_3, R_4, R_0, R_1, R_2, R_3, R_4, R5_1, R5_2, R5_3, R5_4, M_0, M_1, M_2, M_3, M_4) + REDUCE(M_0, M_1, M_2, M_3, M_4) + VGBM $0x0f0f, T_0 + VERIMG $0, M_0, T_0, R_0 // [r₂₆[0], r²₂₆[0], r₂₆[0], r²₂₆[0]] + VERIMG $0, M_1, T_0, R_1 // [r₂₆[1], r²₂₆[1], r₂₆[1], r²₂₆[1]] + VERIMG $0, M_2, T_0, R_2 // [r₂₆[2], r²₂₆[2], r₂₆[2], r²₂₆[2]] + VERIMG $0, M_3, T_0, R_3 // [r₂₆[3], r²₂₆[3], r₂₆[3], r²₂₆[3]] + VERIMG $0, M_4, T_0, R_4 // [r₂₆[4], r²₂₆[4], r₂₆[4], r²₂₆[4]] - // initialize h - VZERO H_0 - VZERO H_1 - VZERO H_2 - VZERO H_3 - VZERO H_4 + // calculate 5r² (ignore least significant limb) + VREPIF $5, T_0 + VMLF T_0, R_1, R5_1 // [5r₂₆[1], 5r²₂₆[1], 5r₂₆[1], 5r²₂₆[1]] + VMLF T_0, R_2, R5_2 // [5r₂₆[2], 5r²₂₆[2], 5r₂₆[2], 5r²₂₆[2]] + VMLF T_0, R_3, R5_3 // [5r₂₆[3], 5r²₂₆[3], 5r₂₆[3], 5r²₂₆[3]] + VMLF T_0, R_4, R5_4 // [5r₂₆[4], 5r²₂₆[4], 5r₂₆[4], 5r²₂₆[4]] loop: - CMPBLE R3, $32, b2 - VLM (R2), T_0, T_1 - SUB $32, R3 - MOVD $32(R2), R2 - EXPAND(T_0, T_1, F_0, F_1, F_2, F_3, F_4) - VLEIB $4, $1, F_4 - VLEIB $12, $1, F_4 + CMPBLE R3, $32, b2 // 2 or fewer blocks remaining, need to change key coefficients + + // load next 2 blocks from message + VLM (R2), T_0, T_1 + + // update message slice + SUB $32, R3 + MOVD $32(R2), R2 + + // unpack message blocks into 26-bit big-endian limbs + EXPAND(T_0, T_1, M_0, M_1, M_2, M_3, M_4) + + // add 2¹²⁸ to each message block value + VLEIB $4, $1, M_4 + VLEIB $12, $1, M_4 multiply: - VAG H_0, F_0, F_0 - VAG H_1, F_1, F_1 - VAG H_2, F_2, F_2 - VAG H_3, F_3, F_3 - VAG H_4, F_4, F_4 - MULTIPLY(F_0, F_1, F_2, F_3, F_4, R_0, R_1, R_2, R_3, R_4, R5_1, R5_2, R5_3, R5_4, H_0, H_1, H_2, H_3, H_4) + // accumulate the incoming message + VAG H_0, M_0, M_0 + VAG H_3, M_3, M_3 + VAG H_1, M_1, M_1 + VAG H_4, M_4, M_4 + VAG H_2, M_2, M_2 + + // multiply the accumulator by the key coefficient + MULTIPLY(M_0, M_1, M_2, M_3, M_4, R_0, R_1, R_2, R_3, R_4, R5_1, R5_2, R5_3, R5_4, H_0, H_1, H_2, H_3, H_4) + + // carry and partially reduce the partial products REDUCE(H_0, H_1, H_2, H_3, H_4) + CMPBNE R3, $0, loop finish: - // sum vectors + // sum lane 0 and lane 1 and put the result in lane 1 VZERO T_0 VSUMQG H_0, T_0, H_0 - VSUMQG H_1, T_0, H_1 - VSUMQG H_2, T_0, H_2 VSUMQG H_3, T_0, H_3 + VSUMQG H_1, T_0, H_1 VSUMQG H_4, T_0, H_4 + VSUMQG H_2, T_0, H_2 - // h may be >= 2*(2**130-5) so we need to reduce it again + // reduce again after summation + // TODO(mundaym): there might be a more efficient way to do this + // now that we only have 1 active lane. For example, we could + // simultaneously pack the values as we reduce them. REDUCE(H_0, H_1, H_2, H_3, H_4) - // carry h1->h4 + // carry h[1] through to h[4] so that only h[4] can exceed 2²⁶ - 1 + // TODO(mundaym): in testing this final carry was unnecessary. + // Needs a proof before it can be removed though. VESRLG $26, H_1, T_1 VN MOD26, H_1, H_1 VAQ T_1, H_2, H_2 @@ -284,95 +367,137 @@ finish: VN MOD26, H_3, H_3 VAQ T_3, H_4, H_4 - // h is now < 2*(2**130-5) - // pack h into h1 (hi) and h0 (lo) - PACK(H_0, H_1, H_2, H_3, H_4) - - // if h > 2**130-5 then h -= 2**130-5 - MOD(H_0, H_1, T_0, T_1, T_2) - - // h += s - MOVD $·bswapMask<>(SB), R5 - VL (R5), T_1 - VL 16(R4), T_0 - VPERM T_0, T_0, T_1, T_0 // reverse bytes (to big) - VAQ T_0, H_0, H_0 - VPERM H_0, H_0, T_1, H_0 // reverse bytes (to little) - VST H_0, (R1) + // h is now < 2(2¹³⁰ - 5) + // Pack each lane in h₂₆[0:4] into h₁₂₈[0:1]. + VESLG $26, H_1, H_1 + VESLG $26, H_3, H_3 + VO H_0, H_1, H_0 + VO H_2, H_3, H_2 + VESLG $4, H_2, H_2 + VLEIB $7, $48, H_1 + VSLB H_1, H_2, H_2 + VO H_0, H_2, H_0 + VLEIB $7, $104, H_1 + VSLB H_1, H_4, H_3 + VO H_3, H_0, H_0 + VLEIB $7, $24, H_1 + VSRLB H_1, H_4, H_1 + // update state + VSTEG $1, H_0, 0(R1) + VSTEG $0, H_0, 8(R1) + VSTEG $1, H_1, 16(R1) RET -b2: +b2: // 2 or fewer blocks remaining CMPBLE R3, $16, b1 - // 2 blocks remaining - SUB $17, R3 - VL (R2), T_0 - VLL R3, 16(R2), T_1 - ADD $1, R3 - MOVBZ $1, R0 - CMPBEQ R3, $16, 2(PC) - VLVGB R3, R0, T_1 - EXPAND(T_0, T_1, F_0, F_1, F_2, F_3, F_4) - CMPBNE R3, $16, 2(PC) - VLEIB $12, $1, F_4 - VLEIB $4, $1, F_4 + // Load the 2 remaining blocks (17-32 bytes remaining). + MOVD $-17(R3), R0 // index of final byte to load modulo 16 + VL (R2), T_0 // load full 16 byte block + VLL R0, 16(R2), T_1 // load final (possibly partial) block and pad with zeros to 16 bytes - // setup [r²,r] - VLVGG $1, RSAVE_0, R_0 - VLVGG $1, RSAVE_1, R_1 - VLVGG $1, RSAVE_2, R_2 - VLVGG $1, RSAVE_3, R_3 - VLVGG $1, RSAVE_4, R_4 - VPDI $0, R5_1, R5SAVE_1, R5_1 - VPDI $0, R5_2, R5SAVE_2, R5_2 - VPDI $0, R5_3, R5SAVE_3, R5_3 - VPDI $0, R5_4, R5SAVE_4, R5_4 + // The Poly1305 algorithm requires that a 1 bit be appended to + // each message block. If the final block is less than 16 bytes + // long then it is easiest to insert the 1 before the message + // block is split into 26-bit limbs. If, on the other hand, the + // final message block is 16 bytes long then we append the 1 bit + // after expansion as normal. + MOVBZ $1, R0 + MOVD $-16(R3), R3 // index of byte in last block to insert 1 at (could be 16) + CMPBEQ R3, $16, 2(PC) // skip the insertion if the final block is 16 bytes long + VLVGB R3, R0, T_1 // insert 1 into the byte at index R3 + + // Split both blocks into 26-bit limbs in the appropriate lanes. + EXPAND(T_0, T_1, M_0, M_1, M_2, M_3, M_4) + + // Append a 1 byte to the end of the second to last block. + VLEIB $4, $1, M_4 + + // Append a 1 byte to the end of the last block only if it is a + // full 16 byte block. + CMPBNE R3, $16, 2(PC) + VLEIB $12, $1, M_4 + + // Finally, set up the coefficients for the final multiplication. + // We have previously saved r and 5r in the 32-bit even indexes + // of the R_[0-4] and R5_[1-4] coefficient registers. + // + // We want lane 0 to be multiplied by r² so that can be kept the + // same. We want lane 1 to be multiplied by r so we need to move + // the saved r value into the 32-bit odd index in lane 1 by + // rotating the 64-bit lane by 32. + VGBM $0x00ff, T_0 // [0, 0xffffffffffffffff] - mask lane 1 only + VERIMG $32, R_0, T_0, R_0 // [_, r²₂₆[0], _, r₂₆[0]] + VERIMG $32, R_1, T_0, R_1 // [_, r²₂₆[1], _, r₂₆[1]] + VERIMG $32, R_2, T_0, R_2 // [_, r²₂₆[2], _, r₂₆[2]] + VERIMG $32, R_3, T_0, R_3 // [_, r²₂₆[3], _, r₂₆[3]] + VERIMG $32, R_4, T_0, R_4 // [_, r²₂₆[4], _, r₂₆[4]] + VERIMG $32, R5_1, T_0, R5_1 // [_, 5r²₂₆[1], _, 5r₂₆[1]] + VERIMG $32, R5_2, T_0, R5_2 // [_, 5r²₂₆[2], _, 5r₂₆[2]] + VERIMG $32, R5_3, T_0, R5_3 // [_, 5r²₂₆[3], _, 5r₂₆[3]] + VERIMG $32, R5_4, T_0, R5_4 // [_, 5r²₂₆[4], _, 5r₂₆[4]] MOVD $0, R3 BR multiply skip: - VZERO H_0 - VZERO H_1 - VZERO H_2 - VZERO H_3 - VZERO H_4 - CMPBEQ R3, $0, finish -b1: - // 1 block remaining - SUB $1, R3 - VLL R3, (R2), T_0 - ADD $1, R3 +b1: // 1 block remaining + + // Load the final block (1-16 bytes). This will be placed into + // lane 0. + MOVD $-1(R3), R0 + VLL R0, (R2), T_0 // pad to 16 bytes with zeros + + // The Poly1305 algorithm requires that a 1 bit be appended to + // each message block. If the final block is less than 16 bytes + // long then it is easiest to insert the 1 before the message + // block is split into 26-bit limbs. If, on the other hand, the + // final message block is 16 bytes long then we append the 1 bit + // after expansion as normal. MOVBZ $1, R0 CMPBEQ R3, $16, 2(PC) VLVGB R3, R0, T_0 - VZERO T_1 - EXPAND(T_0, T_1, F_0, F_1, F_2, F_3, F_4) - CMPBNE R3, $16, 2(PC) - VLEIB $4, $1, F_4 - VLEIG $1, $1, R_0 - VZERO R_1 - VZERO R_2 - VZERO R_3 - VZERO R_4 - VZERO R5_1 - VZERO R5_2 - VZERO R5_3 - VZERO R5_4 - // setup [r, 1] - VLVGG $0, RSAVE_0, R_0 - VLVGG $0, RSAVE_1, R_1 - VLVGG $0, RSAVE_2, R_2 - VLVGG $0, RSAVE_3, R_3 - VLVGG $0, RSAVE_4, R_4 - VPDI $0, R5SAVE_1, R5_1, R5_1 - VPDI $0, R5SAVE_2, R5_2, R5_2 - VPDI $0, R5SAVE_3, R5_3, R5_3 - VPDI $0, R5SAVE_4, R5_4, R5_4 + // Set the message block in lane 1 to the value 0 so that it + // can be accumulated without affecting the final result. + VZERO T_1 + + // Split the final message block into 26-bit limbs in lane 0. + // Lane 1 will be contain 0. + EXPAND(T_0, T_1, M_0, M_1, M_2, M_3, M_4) + + // Append a 1 byte to the end of the last block only if it is a + // full 16 byte block. + CMPBNE R3, $16, 2(PC) + VLEIB $4, $1, M_4 + + // We have previously saved r and 5r in the 32-bit even indexes + // of the R_[0-4] and R5_[1-4] coefficient registers. + // + // We want lane 0 to be multiplied by r so we need to move the + // saved r value into the 32-bit odd index in lane 0. We want + // lane 1 to be set to the value 1. This makes multiplication + // a no-op. We do this by setting lane 1 in every register to 0 + // and then just setting the 32-bit index 3 in R_0 to 1. + VZERO T_0 + MOVD $0, R0 + MOVD $0x10111213, R12 + VLVGP R12, R0, T_1 // [_, 0x10111213, _, 0x00000000] + VPERM T_0, R_0, T_1, R_0 // [_, r₂₆[0], _, 0] + VPERM T_0, R_1, T_1, R_1 // [_, r₂₆[1], _, 0] + VPERM T_0, R_2, T_1, R_2 // [_, r₂₆[2], _, 0] + VPERM T_0, R_3, T_1, R_3 // [_, r₂₆[3], _, 0] + VPERM T_0, R_4, T_1, R_4 // [_, r₂₆[4], _, 0] + VPERM T_0, R5_1, T_1, R5_1 // [_, 5r₂₆[1], _, 0] + VPERM T_0, R5_2, T_1, R5_2 // [_, 5r₂₆[2], _, 0] + VPERM T_0, R5_3, T_1, R5_3 // [_, 5r₂₆[3], _, 0] + VPERM T_0, R5_4, T_1, R5_4 // [_, 5r₂₆[4], _, 0] + + // Set the value of lane 1 to be 1. + VLEIF $3, $1, R_0 // [_, r₂₆[0], _, 1] MOVD $0, R3 BR multiply diff --git a/vendor/golang.org/x/crypto/poly1305/sum_vmsl_s390x.s b/vendor/golang.org/x/crypto/poly1305/sum_vmsl_s390x.s deleted file mode 100644 index e60bbc1d7f8..00000000000 --- a/vendor/golang.org/x/crypto/poly1305/sum_vmsl_s390x.s +++ /dev/null @@ -1,909 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build s390x,go1.11,!gccgo,!appengine - -#include "textflag.h" - -// Implementation of Poly1305 using the vector facility (vx) and the VMSL instruction. - -// constants -#define EX0 V1 -#define EX1 V2 -#define EX2 V3 - -// temporaries -#define T_0 V4 -#define T_1 V5 -#define T_2 V6 -#define T_3 V7 -#define T_4 V8 -#define T_5 V9 -#define T_6 V10 -#define T_7 V11 -#define T_8 V12 -#define T_9 V13 -#define T_10 V14 - -// r**2 & r**4 -#define R_0 V15 -#define R_1 V16 -#define R_2 V17 -#define R5_1 V18 -#define R5_2 V19 -// key (r) -#define RSAVE_0 R7 -#define RSAVE_1 R8 -#define RSAVE_2 R9 -#define R5SAVE_1 R10 -#define R5SAVE_2 R11 - -// message block -#define M0 V20 -#define M1 V21 -#define M2 V22 -#define M3 V23 -#define M4 V24 -#define M5 V25 - -// accumulator -#define H0_0 V26 -#define H1_0 V27 -#define H2_0 V28 -#define H0_1 V29 -#define H1_1 V30 -#define H2_1 V31 - -GLOBL ·keyMask<>(SB), RODATA, $16 -DATA ·keyMask<>+0(SB)/8, $0xffffff0ffcffff0f -DATA ·keyMask<>+8(SB)/8, $0xfcffff0ffcffff0f - -GLOBL ·bswapMask<>(SB), RODATA, $16 -DATA ·bswapMask<>+0(SB)/8, $0x0f0e0d0c0b0a0908 -DATA ·bswapMask<>+8(SB)/8, $0x0706050403020100 - -GLOBL ·constants<>(SB), RODATA, $48 -// EX0 -DATA ·constants<>+0(SB)/8, $0x18191a1b1c1d1e1f -DATA ·constants<>+8(SB)/8, $0x0000050403020100 -// EX1 -DATA ·constants<>+16(SB)/8, $0x18191a1b1c1d1e1f -DATA ·constants<>+24(SB)/8, $0x00000a0908070605 -// EX2 -DATA ·constants<>+32(SB)/8, $0x18191a1b1c1d1e1f -DATA ·constants<>+40(SB)/8, $0x0000000f0e0d0c0b - -GLOBL ·c<>(SB), RODATA, $48 -// EX0 -DATA ·c<>+0(SB)/8, $0x0000050403020100 -DATA ·c<>+8(SB)/8, $0x0000151413121110 -// EX1 -DATA ·c<>+16(SB)/8, $0x00000a0908070605 -DATA ·c<>+24(SB)/8, $0x00001a1918171615 -// EX2 -DATA ·c<>+32(SB)/8, $0x0000000f0e0d0c0b -DATA ·c<>+40(SB)/8, $0x0000001f1e1d1c1b - -GLOBL ·reduce<>(SB), RODATA, $32 -// 44 bit -DATA ·reduce<>+0(SB)/8, $0x0 -DATA ·reduce<>+8(SB)/8, $0xfffffffffff -// 42 bit -DATA ·reduce<>+16(SB)/8, $0x0 -DATA ·reduce<>+24(SB)/8, $0x3ffffffffff - -// h = (f*g) % (2**130-5) [partial reduction] -// uses T_0...T_9 temporary registers -// input: m02_0, m02_1, m02_2, m13_0, m13_1, m13_2, r_0, r_1, r_2, r5_1, r5_2, m4_0, m4_1, m4_2, m5_0, m5_1, m5_2 -// temp: t0, t1, t2, t3, t4, t5, t6, t7, t8, t9 -// output: m02_0, m02_1, m02_2, m13_0, m13_1, m13_2 -#define MULTIPLY(m02_0, m02_1, m02_2, m13_0, m13_1, m13_2, r_0, r_1, r_2, r5_1, r5_2, m4_0, m4_1, m4_2, m5_0, m5_1, m5_2, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) \ - \ // Eliminate the dependency for the last 2 VMSLs - VMSLG m02_0, r_2, m4_2, m4_2 \ - VMSLG m13_0, r_2, m5_2, m5_2 \ // 8 VMSLs pipelined - VMSLG m02_0, r_0, m4_0, m4_0 \ - VMSLG m02_1, r5_2, V0, T_0 \ - VMSLG m02_0, r_1, m4_1, m4_1 \ - VMSLG m02_1, r_0, V0, T_1 \ - VMSLG m02_1, r_1, V0, T_2 \ - VMSLG m02_2, r5_1, V0, T_3 \ - VMSLG m02_2, r5_2, V0, T_4 \ - VMSLG m13_0, r_0, m5_0, m5_0 \ - VMSLG m13_1, r5_2, V0, T_5 \ - VMSLG m13_0, r_1, m5_1, m5_1 \ - VMSLG m13_1, r_0, V0, T_6 \ - VMSLG m13_1, r_1, V0, T_7 \ - VMSLG m13_2, r5_1, V0, T_8 \ - VMSLG m13_2, r5_2, V0, T_9 \ - VMSLG m02_2, r_0, m4_2, m4_2 \ - VMSLG m13_2, r_0, m5_2, m5_2 \ - VAQ m4_0, T_0, m02_0 \ - VAQ m4_1, T_1, m02_1 \ - VAQ m5_0, T_5, m13_0 \ - VAQ m5_1, T_6, m13_1 \ - VAQ m02_0, T_3, m02_0 \ - VAQ m02_1, T_4, m02_1 \ - VAQ m13_0, T_8, m13_0 \ - VAQ m13_1, T_9, m13_1 \ - VAQ m4_2, T_2, m02_2 \ - VAQ m5_2, T_7, m13_2 \ - -// SQUARE uses three limbs of r and r_2*5 to output square of r -// uses T_1, T_5 and T_7 temporary registers -// input: r_0, r_1, r_2, r5_2 -// temp: TEMP0, TEMP1, TEMP2 -// output: p0, p1, p2 -#define SQUARE(r_0, r_1, r_2, r5_2, p0, p1, p2, TEMP0, TEMP1, TEMP2) \ - VMSLG r_0, r_0, p0, p0 \ - VMSLG r_1, r5_2, V0, TEMP0 \ - VMSLG r_2, r5_2, p1, p1 \ - VMSLG r_0, r_1, V0, TEMP1 \ - VMSLG r_1, r_1, p2, p2 \ - VMSLG r_0, r_2, V0, TEMP2 \ - VAQ TEMP0, p0, p0 \ - VAQ TEMP1, p1, p1 \ - VAQ TEMP2, p2, p2 \ - VAQ TEMP0, p0, p0 \ - VAQ TEMP1, p1, p1 \ - VAQ TEMP2, p2, p2 \ - -// carry h0->h1->h2->h0 || h3->h4->h5->h3 -// uses T_2, T_4, T_5, T_7, T_8, T_9 -// t6, t7, t8, t9, t10, t11 -// input: h0, h1, h2, h3, h4, h5 -// temp: t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11 -// output: h0, h1, h2, h3, h4, h5 -#define REDUCE(h0, h1, h2, h3, h4, h5, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) \ - VLM (R12), t6, t7 \ // 44 and 42 bit clear mask - VLEIB $7, $0x28, t10 \ // 5 byte shift mask - VREPIB $4, t8 \ // 4 bit shift mask - VREPIB $2, t11 \ // 2 bit shift mask - VSRLB t10, h0, t0 \ // h0 byte shift - VSRLB t10, h1, t1 \ // h1 byte shift - VSRLB t10, h2, t2 \ // h2 byte shift - VSRLB t10, h3, t3 \ // h3 byte shift - VSRLB t10, h4, t4 \ // h4 byte shift - VSRLB t10, h5, t5 \ // h5 byte shift - VSRL t8, t0, t0 \ // h0 bit shift - VSRL t8, t1, t1 \ // h2 bit shift - VSRL t11, t2, t2 \ // h2 bit shift - VSRL t8, t3, t3 \ // h3 bit shift - VSRL t8, t4, t4 \ // h4 bit shift - VESLG $2, t2, t9 \ // h2 carry x5 - VSRL t11, t5, t5 \ // h5 bit shift - VN t6, h0, h0 \ // h0 clear carry - VAQ t2, t9, t2 \ // h2 carry x5 - VESLG $2, t5, t9 \ // h5 carry x5 - VN t6, h1, h1 \ // h1 clear carry - VN t7, h2, h2 \ // h2 clear carry - VAQ t5, t9, t5 \ // h5 carry x5 - VN t6, h3, h3 \ // h3 clear carry - VN t6, h4, h4 \ // h4 clear carry - VN t7, h5, h5 \ // h5 clear carry - VAQ t0, h1, h1 \ // h0->h1 - VAQ t3, h4, h4 \ // h3->h4 - VAQ t1, h2, h2 \ // h1->h2 - VAQ t4, h5, h5 \ // h4->h5 - VAQ t2, h0, h0 \ // h2->h0 - VAQ t5, h3, h3 \ // h5->h3 - VREPG $1, t6, t6 \ // 44 and 42 bit masks across both halves - VREPG $1, t7, t7 \ - VSLDB $8, h0, h0, h0 \ // set up [h0/1/2, h3/4/5] - VSLDB $8, h1, h1, h1 \ - VSLDB $8, h2, h2, h2 \ - VO h0, h3, h3 \ - VO h1, h4, h4 \ - VO h2, h5, h5 \ - VESRLG $44, h3, t0 \ // 44 bit shift right - VESRLG $44, h4, t1 \ - VESRLG $42, h5, t2 \ - VN t6, h3, h3 \ // clear carry bits - VN t6, h4, h4 \ - VN t7, h5, h5 \ - VESLG $2, t2, t9 \ // multiply carry by 5 - VAQ t9, t2, t2 \ - VAQ t0, h4, h4 \ - VAQ t1, h5, h5 \ - VAQ t2, h3, h3 \ - -// carry h0->h1->h2->h0 -// input: h0, h1, h2 -// temp: t0, t1, t2, t3, t4, t5, t6, t7, t8 -// output: h0, h1, h2 -#define REDUCE2(h0, h1, h2, t0, t1, t2, t3, t4, t5, t6, t7, t8) \ - VLEIB $7, $0x28, t3 \ // 5 byte shift mask - VREPIB $4, t4 \ // 4 bit shift mask - VREPIB $2, t7 \ // 2 bit shift mask - VGBM $0x003F, t5 \ // mask to clear carry bits - VSRLB t3, h0, t0 \ - VSRLB t3, h1, t1 \ - VSRLB t3, h2, t2 \ - VESRLG $4, t5, t5 \ // 44 bit clear mask - VSRL t4, t0, t0 \ - VSRL t4, t1, t1 \ - VSRL t7, t2, t2 \ - VESRLG $2, t5, t6 \ // 42 bit clear mask - VESLG $2, t2, t8 \ - VAQ t8, t2, t2 \ - VN t5, h0, h0 \ - VN t5, h1, h1 \ - VN t6, h2, h2 \ - VAQ t0, h1, h1 \ - VAQ t1, h2, h2 \ - VAQ t2, h0, h0 \ - VSRLB t3, h0, t0 \ - VSRLB t3, h1, t1 \ - VSRLB t3, h2, t2 \ - VSRL t4, t0, t0 \ - VSRL t4, t1, t1 \ - VSRL t7, t2, t2 \ - VN t5, h0, h0 \ - VN t5, h1, h1 \ - VESLG $2, t2, t8 \ - VN t6, h2, h2 \ - VAQ t0, h1, h1 \ - VAQ t8, t2, t2 \ - VAQ t1, h2, h2 \ - VAQ t2, h0, h0 \ - -// expands two message blocks into the lower halfs of the d registers -// moves the contents of the d registers into upper halfs -// input: in1, in2, d0, d1, d2, d3, d4, d5 -// temp: TEMP0, TEMP1, TEMP2, TEMP3 -// output: d0, d1, d2, d3, d4, d5 -#define EXPACC(in1, in2, d0, d1, d2, d3, d4, d5, TEMP0, TEMP1, TEMP2, TEMP3) \ - VGBM $0xff3f, TEMP0 \ - VGBM $0xff1f, TEMP1 \ - VESLG $4, d1, TEMP2 \ - VESLG $4, d4, TEMP3 \ - VESRLG $4, TEMP0, TEMP0 \ - VPERM in1, d0, EX0, d0 \ - VPERM in2, d3, EX0, d3 \ - VPERM in1, d2, EX2, d2 \ - VPERM in2, d5, EX2, d5 \ - VPERM in1, TEMP2, EX1, d1 \ - VPERM in2, TEMP3, EX1, d4 \ - VN TEMP0, d0, d0 \ - VN TEMP0, d3, d3 \ - VESRLG $4, d1, d1 \ - VESRLG $4, d4, d4 \ - VN TEMP1, d2, d2 \ - VN TEMP1, d5, d5 \ - VN TEMP0, d1, d1 \ - VN TEMP0, d4, d4 \ - -// expands one message block into the lower halfs of the d registers -// moves the contents of the d registers into upper halfs -// input: in, d0, d1, d2 -// temp: TEMP0, TEMP1, TEMP2 -// output: d0, d1, d2 -#define EXPACC2(in, d0, d1, d2, TEMP0, TEMP1, TEMP2) \ - VGBM $0xff3f, TEMP0 \ - VESLG $4, d1, TEMP2 \ - VGBM $0xff1f, TEMP1 \ - VPERM in, d0, EX0, d0 \ - VESRLG $4, TEMP0, TEMP0 \ - VPERM in, d2, EX2, d2 \ - VPERM in, TEMP2, EX1, d1 \ - VN TEMP0, d0, d0 \ - VN TEMP1, d2, d2 \ - VESRLG $4, d1, d1 \ - VN TEMP0, d1, d1 \ - -// pack h2:h0 into h1:h0 (no carry) -// input: h0, h1, h2 -// output: h0, h1, h2 -#define PACK(h0, h1, h2) \ - VMRLG h1, h2, h2 \ // copy h1 to upper half h2 - VESLG $44, h1, h1 \ // shift limb 1 44 bits, leaving 20 - VO h0, h1, h0 \ // combine h0 with 20 bits from limb 1 - VESRLG $20, h2, h1 \ // put top 24 bits of limb 1 into h1 - VLEIG $1, $0, h1 \ // clear h2 stuff from lower half of h1 - VO h0, h1, h0 \ // h0 now has 88 bits (limb 0 and 1) - VLEIG $0, $0, h2 \ // clear upper half of h2 - VESRLG $40, h2, h1 \ // h1 now has upper two bits of result - VLEIB $7, $88, h1 \ // for byte shift (11 bytes) - VSLB h1, h2, h2 \ // shift h2 11 bytes to the left - VO h0, h2, h0 \ // combine h0 with 20 bits from limb 1 - VLEIG $0, $0, h1 \ // clear upper half of h1 - -// if h > 2**130-5 then h -= 2**130-5 -// input: h0, h1 -// temp: t0, t1, t2 -// output: h0 -#define MOD(h0, h1, t0, t1, t2) \ - VZERO t0 \ - VLEIG $1, $5, t0 \ - VACCQ h0, t0, t1 \ - VAQ h0, t0, t0 \ - VONE t2 \ - VLEIG $1, $-4, t2 \ - VAQ t2, t1, t1 \ - VACCQ h1, t1, t1 \ - VONE t2 \ - VAQ t2, t1, t1 \ - VN h0, t1, t2 \ - VNC t0, t1, t1 \ - VO t1, t2, h0 \ - -// func poly1305vmsl(out *[16]byte, m *byte, mlen uint64, key *[32]key) -TEXT ·poly1305vmsl(SB), $0-32 - // This code processes 6 + up to 4 blocks (32 bytes) per iteration - // using the algorithm described in: - // NEON crypto, Daniel J. Bernstein & Peter Schwabe - // https://cryptojedi.org/papers/neoncrypto-20120320.pdf - // And as moddified for VMSL as described in - // Accelerating Poly1305 Cryptographic Message Authentication on the z14 - // O'Farrell et al, CASCON 2017, p48-55 - // https://ibm.ent.box.com/s/jf9gedj0e9d2vjctfyh186shaztavnht - - LMG out+0(FP), R1, R4 // R1=out, R2=m, R3=mlen, R4=key - VZERO V0 // c - - // load EX0, EX1 and EX2 - MOVD $·constants<>(SB), R5 - VLM (R5), EX0, EX2 // c - - // setup r - VL (R4), T_0 - MOVD $·keyMask<>(SB), R6 - VL (R6), T_1 - VN T_0, T_1, T_0 - VZERO T_2 // limbs for r - VZERO T_3 - VZERO T_4 - EXPACC2(T_0, T_2, T_3, T_4, T_1, T_5, T_7) - - // T_2, T_3, T_4: [0, r] - - // setup r*20 - VLEIG $0, $0, T_0 - VLEIG $1, $20, T_0 // T_0: [0, 20] - VZERO T_5 - VZERO T_6 - VMSLG T_0, T_3, T_5, T_5 - VMSLG T_0, T_4, T_6, T_6 - - // store r for final block in GR - VLGVG $1, T_2, RSAVE_0 // c - VLGVG $1, T_3, RSAVE_1 // c - VLGVG $1, T_4, RSAVE_2 // c - VLGVG $1, T_5, R5SAVE_1 // c - VLGVG $1, T_6, R5SAVE_2 // c - - // initialize h - VZERO H0_0 - VZERO H1_0 - VZERO H2_0 - VZERO H0_1 - VZERO H1_1 - VZERO H2_1 - - // initialize pointer for reduce constants - MOVD $·reduce<>(SB), R12 - - // calculate r**2 and 20*(r**2) - VZERO R_0 - VZERO R_1 - VZERO R_2 - SQUARE(T_2, T_3, T_4, T_6, R_0, R_1, R_2, T_1, T_5, T_7) - REDUCE2(R_0, R_1, R_2, M0, M1, M2, M3, M4, R5_1, R5_2, M5, T_1) - VZERO R5_1 - VZERO R5_2 - VMSLG T_0, R_1, R5_1, R5_1 - VMSLG T_0, R_2, R5_2, R5_2 - - // skip r**4 calculation if 3 blocks or less - CMPBLE R3, $48, b4 - - // calculate r**4 and 20*(r**4) - VZERO T_8 - VZERO T_9 - VZERO T_10 - SQUARE(R_0, R_1, R_2, R5_2, T_8, T_9, T_10, T_1, T_5, T_7) - REDUCE2(T_8, T_9, T_10, M0, M1, M2, M3, M4, T_2, T_3, M5, T_1) - VZERO T_2 - VZERO T_3 - VMSLG T_0, T_9, T_2, T_2 - VMSLG T_0, T_10, T_3, T_3 - - // put r**2 to the right and r**4 to the left of R_0, R_1, R_2 - VSLDB $8, T_8, T_8, T_8 - VSLDB $8, T_9, T_9, T_9 - VSLDB $8, T_10, T_10, T_10 - VSLDB $8, T_2, T_2, T_2 - VSLDB $8, T_3, T_3, T_3 - - VO T_8, R_0, R_0 - VO T_9, R_1, R_1 - VO T_10, R_2, R_2 - VO T_2, R5_1, R5_1 - VO T_3, R5_2, R5_2 - - CMPBLE R3, $80, load // less than or equal to 5 blocks in message - - // 6(or 5+1) blocks - SUB $81, R3 - VLM (R2), M0, M4 - VLL R3, 80(R2), M5 - ADD $1, R3 - MOVBZ $1, R0 - CMPBGE R3, $16, 2(PC) - VLVGB R3, R0, M5 - MOVD $96(R2), R2 - EXPACC(M0, M1, H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_0, T_1, T_2, T_3) - EXPACC(M2, M3, H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_0, T_1, T_2, T_3) - VLEIB $2, $1, H2_0 - VLEIB $2, $1, H2_1 - VLEIB $10, $1, H2_0 - VLEIB $10, $1, H2_1 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO T_4 - VZERO T_10 - EXPACC(M4, M5, M0, M1, M2, M3, T_4, T_10, T_0, T_1, T_2, T_3) - VLR T_4, M4 - VLEIB $10, $1, M2 - CMPBLT R3, $16, 2(PC) - VLEIB $10, $1, T_10 - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, T_10, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M2, M3, M4, T_4, T_5, T_2, T_7, T_8, T_9) - VMRHG V0, H0_1, H0_0 - VMRHG V0, H1_1, H1_0 - VMRHG V0, H2_1, H2_0 - VMRLG V0, H0_1, H0_1 - VMRLG V0, H1_1, H1_1 - VMRLG V0, H2_1, H2_1 - - SUB $16, R3 - CMPBLE R3, $0, square - -load: - // load EX0, EX1 and EX2 - MOVD $·c<>(SB), R5 - VLM (R5), EX0, EX2 - -loop: - CMPBLE R3, $64, add // b4 // last 4 or less blocks left - - // next 4 full blocks - VLM (R2), M2, M5 - SUB $64, R3 - MOVD $64(R2), R2 - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, T_0, T_1, T_3, T_4, T_5, T_2, T_7, T_8, T_9) - - // expacc in-lined to create [m2, m3] limbs - VGBM $0x3f3f, T_0 // 44 bit clear mask - VGBM $0x1f1f, T_1 // 40 bit clear mask - VPERM M2, M3, EX0, T_3 - VESRLG $4, T_0, T_0 // 44 bit clear mask ready - VPERM M2, M3, EX1, T_4 - VPERM M2, M3, EX2, T_5 - VN T_0, T_3, T_3 - VESRLG $4, T_4, T_4 - VN T_1, T_5, T_5 - VN T_0, T_4, T_4 - VMRHG H0_1, T_3, H0_0 - VMRHG H1_1, T_4, H1_0 - VMRHG H2_1, T_5, H2_0 - VMRLG H0_1, T_3, H0_1 - VMRLG H1_1, T_4, H1_1 - VMRLG H2_1, T_5, H2_1 - VLEIB $10, $1, H2_0 - VLEIB $10, $1, H2_1 - VPERM M4, M5, EX0, T_3 - VPERM M4, M5, EX1, T_4 - VPERM M4, M5, EX2, T_5 - VN T_0, T_3, T_3 - VESRLG $4, T_4, T_4 - VN T_1, T_5, T_5 - VN T_0, T_4, T_4 - VMRHG V0, T_3, M0 - VMRHG V0, T_4, M1 - VMRHG V0, T_5, M2 - VMRLG V0, T_3, M3 - VMRLG V0, T_4, M4 - VMRLG V0, T_5, M5 - VLEIB $10, $1, M2 - VLEIB $10, $1, M5 - - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - CMPBNE R3, $0, loop - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M3, M4, M5, T_4, T_5, T_2, T_7, T_8, T_9) - VMRHG V0, H0_1, H0_0 - VMRHG V0, H1_1, H1_0 - VMRHG V0, H2_1, H2_0 - VMRLG V0, H0_1, H0_1 - VMRLG V0, H1_1, H1_1 - VMRLG V0, H2_1, H2_1 - - // load EX0, EX1, EX2 - MOVD $·constants<>(SB), R5 - VLM (R5), EX0, EX2 - - // sum vectors - VAQ H0_0, H0_1, H0_0 - VAQ H1_0, H1_1, H1_0 - VAQ H2_0, H2_1, H2_0 - - // h may be >= 2*(2**130-5) so we need to reduce it again - // M0...M4 are used as temps here - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5) - -next: // carry h1->h2 - VLEIB $7, $0x28, T_1 - VREPIB $4, T_2 - VGBM $0x003F, T_3 - VESRLG $4, T_3 - - // byte shift - VSRLB T_1, H1_0, T_4 - - // bit shift - VSRL T_2, T_4, T_4 - - // clear h1 carry bits - VN T_3, H1_0, H1_0 - - // add carry - VAQ T_4, H2_0, H2_0 - - // h is now < 2*(2**130-5) - // pack h into h1 (hi) and h0 (lo) - PACK(H0_0, H1_0, H2_0) - - // if h > 2**130-5 then h -= 2**130-5 - MOD(H0_0, H1_0, T_0, T_1, T_2) - - // h += s - MOVD $·bswapMask<>(SB), R5 - VL (R5), T_1 - VL 16(R4), T_0 - VPERM T_0, T_0, T_1, T_0 // reverse bytes (to big) - VAQ T_0, H0_0, H0_0 - VPERM H0_0, H0_0, T_1, H0_0 // reverse bytes (to little) - VST H0_0, (R1) - RET - -add: - // load EX0, EX1, EX2 - MOVD $·constants<>(SB), R5 - VLM (R5), EX0, EX2 - - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M3, M4, M5, T_4, T_5, T_2, T_7, T_8, T_9) - VMRHG V0, H0_1, H0_0 - VMRHG V0, H1_1, H1_0 - VMRHG V0, H2_1, H2_0 - VMRLG V0, H0_1, H0_1 - VMRLG V0, H1_1, H1_1 - VMRLG V0, H2_1, H2_1 - CMPBLE R3, $64, b4 - -b4: - CMPBLE R3, $48, b3 // 3 blocks or less - - // 4(3+1) blocks remaining - SUB $49, R3 - VLM (R2), M0, M2 - VLL R3, 48(R2), M3 - ADD $1, R3 - MOVBZ $1, R0 - CMPBEQ R3, $16, 2(PC) - VLVGB R3, R0, M3 - MOVD $64(R2), R2 - EXPACC(M0, M1, H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_0, T_1, T_2, T_3) - VLEIB $10, $1, H2_0 - VLEIB $10, $1, H2_1 - VZERO M0 - VZERO M1 - VZERO M4 - VZERO M5 - VZERO T_4 - VZERO T_10 - EXPACC(M2, M3, M0, M1, M4, M5, T_4, T_10, T_0, T_1, T_2, T_3) - VLR T_4, M2 - VLEIB $10, $1, M4 - CMPBNE R3, $16, 2(PC) - VLEIB $10, $1, T_10 - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M4, M5, M2, T_10, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M3, M4, M5, T_4, T_5, T_2, T_7, T_8, T_9) - VMRHG V0, H0_1, H0_0 - VMRHG V0, H1_1, H1_0 - VMRHG V0, H2_1, H2_0 - VMRLG V0, H0_1, H0_1 - VMRLG V0, H1_1, H1_1 - VMRLG V0, H2_1, H2_1 - SUB $16, R3 - CMPBLE R3, $0, square // this condition must always hold true! - -b3: - CMPBLE R3, $32, b2 - - // 3 blocks remaining - - // setup [r²,r] - VSLDB $8, R_0, R_0, R_0 - VSLDB $8, R_1, R_1, R_1 - VSLDB $8, R_2, R_2, R_2 - VSLDB $8, R5_1, R5_1, R5_1 - VSLDB $8, R5_2, R5_2, R5_2 - - VLVGG $1, RSAVE_0, R_0 - VLVGG $1, RSAVE_1, R_1 - VLVGG $1, RSAVE_2, R_2 - VLVGG $1, R5SAVE_1, R5_1 - VLVGG $1, R5SAVE_2, R5_2 - - // setup [h0, h1] - VSLDB $8, H0_0, H0_0, H0_0 - VSLDB $8, H1_0, H1_0, H1_0 - VSLDB $8, H2_0, H2_0, H2_0 - VO H0_1, H0_0, H0_0 - VO H1_1, H1_0, H1_0 - VO H2_1, H2_0, H2_0 - VZERO H0_1 - VZERO H1_1 - VZERO H2_1 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - - // H*[r**2, r] - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, H0_1, H1_1, T_10, M5) - - SUB $33, R3 - VLM (R2), M0, M1 - VLL R3, 32(R2), M2 - ADD $1, R3 - MOVBZ $1, R0 - CMPBEQ R3, $16, 2(PC) - VLVGB R3, R0, M2 - - // H += m0 - VZERO T_1 - VZERO T_2 - VZERO T_3 - EXPACC2(M0, T_1, T_2, T_3, T_4, T_5, T_6) - VLEIB $10, $1, T_3 - VAG H0_0, T_1, H0_0 - VAG H1_0, T_2, H1_0 - VAG H2_0, T_3, H2_0 - - VZERO M0 - VZERO M3 - VZERO M4 - VZERO M5 - VZERO T_10 - - // (H+m0)*r - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M3, M4, M5, V0, T_10, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M3, M4, M5, T_10, H0_1, H1_1, H2_1, T_9) - - // H += m1 - VZERO V0 - VZERO T_1 - VZERO T_2 - VZERO T_3 - EXPACC2(M1, T_1, T_2, T_3, T_4, T_5, T_6) - VLEIB $10, $1, T_3 - VAQ H0_0, T_1, H0_0 - VAQ H1_0, T_2, H1_0 - VAQ H2_0, T_3, H2_0 - REDUCE2(H0_0, H1_0, H2_0, M0, M3, M4, M5, T_9, H0_1, H1_1, H2_1, T_10) - - // [H, m2] * [r**2, r] - EXPACC2(M2, H0_0, H1_0, H2_0, T_1, T_2, T_3) - CMPBNE R3, $16, 2(PC) - VLEIB $10, $1, H2_0 - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, H0_1, H1_1, M5, T_10) - SUB $16, R3 - CMPBLE R3, $0, next // this condition must always hold true! - -b2: - CMPBLE R3, $16, b1 - - // 2 blocks remaining - - // setup [r²,r] - VSLDB $8, R_0, R_0, R_0 - VSLDB $8, R_1, R_1, R_1 - VSLDB $8, R_2, R_2, R_2 - VSLDB $8, R5_1, R5_1, R5_1 - VSLDB $8, R5_2, R5_2, R5_2 - - VLVGG $1, RSAVE_0, R_0 - VLVGG $1, RSAVE_1, R_1 - VLVGG $1, RSAVE_2, R_2 - VLVGG $1, R5SAVE_1, R5_1 - VLVGG $1, R5SAVE_2, R5_2 - - // setup [h0, h1] - VSLDB $8, H0_0, H0_0, H0_0 - VSLDB $8, H1_0, H1_0, H1_0 - VSLDB $8, H2_0, H2_0, H2_0 - VO H0_1, H0_0, H0_0 - VO H1_1, H1_0, H1_0 - VO H2_1, H2_0, H2_0 - VZERO H0_1 - VZERO H1_1 - VZERO H2_1 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - - // H*[r**2, r] - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M2, M3, M4, T_4, T_5, T_2, T_7, T_8, T_9) - VMRHG V0, H0_1, H0_0 - VMRHG V0, H1_1, H1_0 - VMRHG V0, H2_1, H2_0 - VMRLG V0, H0_1, H0_1 - VMRLG V0, H1_1, H1_1 - VMRLG V0, H2_1, H2_1 - - // move h to the left and 0s at the right - VSLDB $8, H0_0, H0_0, H0_0 - VSLDB $8, H1_0, H1_0, H1_0 - VSLDB $8, H2_0, H2_0, H2_0 - - // get message blocks and append 1 to start - SUB $17, R3 - VL (R2), M0 - VLL R3, 16(R2), M1 - ADD $1, R3 - MOVBZ $1, R0 - CMPBEQ R3, $16, 2(PC) - VLVGB R3, R0, M1 - VZERO T_6 - VZERO T_7 - VZERO T_8 - EXPACC2(M0, T_6, T_7, T_8, T_1, T_2, T_3) - EXPACC2(M1, T_6, T_7, T_8, T_1, T_2, T_3) - VLEIB $2, $1, T_8 - CMPBNE R3, $16, 2(PC) - VLEIB $10, $1, T_8 - - // add [m0, m1] to h - VAG H0_0, T_6, H0_0 - VAG H1_0, T_7, H1_0 - VAG H2_0, T_8, H2_0 - - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - VZERO T_10 - VZERO M0 - - // at this point R_0 .. R5_2 look like [r**2, r] - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M2, M3, M4, M5, T_10, M0, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M2, M3, M4, M5, T_9, H0_1, H1_1, H2_1, T_10) - SUB $16, R3, R3 - CMPBLE R3, $0, next - -b1: - CMPBLE R3, $0, next - - // 1 block remaining - - // setup [r²,r] - VSLDB $8, R_0, R_0, R_0 - VSLDB $8, R_1, R_1, R_1 - VSLDB $8, R_2, R_2, R_2 - VSLDB $8, R5_1, R5_1, R5_1 - VSLDB $8, R5_2, R5_2, R5_2 - - VLVGG $1, RSAVE_0, R_0 - VLVGG $1, RSAVE_1, R_1 - VLVGG $1, RSAVE_2, R_2 - VLVGG $1, R5SAVE_1, R5_1 - VLVGG $1, R5SAVE_2, R5_2 - - // setup [h0, h1] - VSLDB $8, H0_0, H0_0, H0_0 - VSLDB $8, H1_0, H1_0, H1_0 - VSLDB $8, H2_0, H2_0, H2_0 - VO H0_1, H0_0, H0_0 - VO H1_1, H1_0, H1_0 - VO H2_1, H2_0, H2_0 - VZERO H0_1 - VZERO H1_1 - VZERO H2_1 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - - // H*[r**2, r] - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5) - - // set up [0, m0] limbs - SUB $1, R3 - VLL R3, (R2), M0 - ADD $1, R3 - MOVBZ $1, R0 - CMPBEQ R3, $16, 2(PC) - VLVGB R3, R0, M0 - VZERO T_1 - VZERO T_2 - VZERO T_3 - EXPACC2(M0, T_1, T_2, T_3, T_4, T_5, T_6)// limbs: [0, m] - CMPBNE R3, $16, 2(PC) - VLEIB $10, $1, T_3 - - // h+m0 - VAQ H0_0, T_1, H0_0 - VAQ H1_0, T_2, H1_0 - VAQ H2_0, T_3, H2_0 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5) - - BR next - -square: - // setup [r²,r] - VSLDB $8, R_0, R_0, R_0 - VSLDB $8, R_1, R_1, R_1 - VSLDB $8, R_2, R_2, R_2 - VSLDB $8, R5_1, R5_1, R5_1 - VSLDB $8, R5_2, R5_2, R5_2 - - VLVGG $1, RSAVE_0, R_0 - VLVGG $1, RSAVE_1, R_1 - VLVGG $1, RSAVE_2, R_2 - VLVGG $1, R5SAVE_1, R5_1 - VLVGG $1, R5SAVE_2, R5_2 - - // setup [h0, h1] - VSLDB $8, H0_0, H0_0, H0_0 - VSLDB $8, H1_0, H1_0, H1_0 - VSLDB $8, H2_0, H2_0, H2_0 - VO H0_1, H0_0, H0_0 - VO H1_1, H1_0, H1_0 - VO H2_1, H2_0, H2_0 - VZERO H0_1 - VZERO H1_1 - VZERO H2_1 - - VZERO M0 - VZERO M1 - VZERO M2 - VZERO M3 - VZERO M4 - VZERO M5 - - // (h0*r**2) + (h1*r) - MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9) - REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5) - BR next diff --git a/vendor/golang.org/x/crypto/ssh/certs.go b/vendor/golang.org/x/crypto/ssh/certs.go index 0f89aec1c7f..916c840b698 100644 --- a/vendor/golang.org/x/crypto/ssh/certs.go +++ b/vendor/golang.org/x/crypto/ssh/certs.go @@ -414,8 +414,8 @@ func (c *CertChecker) CheckCert(principal string, cert *Certificate) error { return nil } -// SignCert sets c.SignatureKey to the authority's public key and stores a -// Signature, by authority, in the certificate. +// SignCert signs the certificate with an authority, setting the Nonce, +// SignatureKey, and Signature fields. func (c *Certificate) SignCert(rand io.Reader, authority Signer) error { c.Nonce = make([]byte, 32) if _, err := io.ReadFull(rand, c.Nonce); err != nil { diff --git a/vendor/golang.org/x/crypto/ssh/cipher.go b/vendor/golang.org/x/crypto/ssh/cipher.go index b0204ee59f2..8bd6b3daff5 100644 --- a/vendor/golang.org/x/crypto/ssh/cipher.go +++ b/vendor/golang.org/x/crypto/ssh/cipher.go @@ -119,7 +119,7 @@ var cipherModes = map[string]*cipherMode{ chacha20Poly1305ID: {64, 0, newChaCha20Cipher}, // CBC mode is insecure and so is not included in the default config. - // (See http://www.isg.rhul.ac.uk/~kp/SandPfinal.pdf). If absolutely + // (See https://www.ieee-security.org/TC/SP2013/papers/4977a526.pdf). If absolutely // needed, it's possible to specify a custom Config to enable it. // You should expect that an active attacker can recover plaintext if // you do. diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go index 0590070e220..f3265655eec 100644 --- a/vendor/golang.org/x/crypto/ssh/client_auth.go +++ b/vendor/golang.org/x/crypto/ssh/client_auth.go @@ -36,7 +36,7 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error { // during the authentication phase the client first attempts the "none" method // then any untried methods suggested by the server. - tried := make(map[string]bool) + var tried []string var lastMethods []string sessionID := c.transport.getSessionID() @@ -49,7 +49,9 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error { // success return nil } else if ok == authFailure { - tried[auth.method()] = true + if m := auth.method(); !contains(tried, m) { + tried = append(tried, m) + } } if methods == nil { methods = lastMethods @@ -61,7 +63,7 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error { findNext: for _, a := range config.Auth { candidateMethod := a.method() - if tried[candidateMethod] { + if contains(tried, candidateMethod) { continue } for _, meth := range methods { @@ -72,16 +74,16 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error { } } } - return fmt.Errorf("ssh: unable to authenticate, attempted methods %v, no supported methods remain", keys(tried)) + return fmt.Errorf("ssh: unable to authenticate, attempted methods %v, no supported methods remain", tried) } -func keys(m map[string]bool) []string { - s := make([]string, 0, len(m)) - - for key := range m { - s = append(s, key) +func contains(list []string, e string) bool { + for _, s := range list { + if s == e { + return true + } } - return s + return false } // An AuthMethod represents an instance of an RFC 4252 authentication method. diff --git a/vendor/golang.org/x/crypto/ssh/kex.go b/vendor/golang.org/x/crypto/ssh/kex.go index 6c3c648fc95..7eedb209fa7 100644 --- a/vendor/golang.org/x/crypto/ssh/kex.go +++ b/vendor/golang.org/x/crypto/ssh/kex.go @@ -572,7 +572,7 @@ func (gex *dhGEXSHA) diffieHellman(theirPublic, myPrivate *big.Int) (*big.Int, e return new(big.Int).Exp(theirPublic, myPrivate, gex.p), nil } -func (gex *dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshakeMagics) (*kexResult, error) { +func (gex dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshakeMagics) (*kexResult, error) { // Send GexRequest kexDHGexRequest := kexDHGexRequestMsg{ MinBits: dhGroupExchangeMinimumBits, @@ -677,7 +677,7 @@ func (gex *dhGEXSHA) Client(c packetConn, randSource io.Reader, magics *handshak // Server half implementation of the Diffie Hellman Key Exchange with SHA1 and SHA256. // // This is a minimal implementation to satisfy the automated tests. -func (gex *dhGEXSHA) Server(c packetConn, randSource io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { +func (gex dhGEXSHA) Server(c packetConn, randSource io.Reader, magics *handshakeMagics, priv Signer) (result *kexResult, err error) { // Receive GexRequest packet, err := c.readPacket() if err != nil { diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go index 06f537c135a..31f26349a05 100644 --- a/vendor/golang.org/x/crypto/ssh/keys.go +++ b/vendor/golang.org/x/crypto/ssh/keys.go @@ -1246,15 +1246,23 @@ func passphraseProtectedOpenSSHKey(passphrase []byte) openSSHDecryptFunc { } key, iv := k[:32], k[32:] - if cipherName != "aes256-ctr" { - return nil, fmt.Errorf("ssh: unknown cipher %q, only supports %q", cipherName, "aes256-ctr") - } c, err := aes.NewCipher(key) if err != nil { return nil, err } - ctr := cipher.NewCTR(c, iv) - ctr.XORKeyStream(privKeyBlock, privKeyBlock) + switch cipherName { + case "aes256-ctr": + ctr := cipher.NewCTR(c, iv) + ctr.XORKeyStream(privKeyBlock, privKeyBlock) + case "aes256-cbc": + if len(privKeyBlock)%c.BlockSize() != 0 { + return nil, fmt.Errorf("ssh: invalid encrypted private key length, not a multiple of the block size") + } + cbc := cipher.NewCBCDecrypter(c, iv) + cbc.CryptBlocks(privKeyBlock, privKeyBlock) + default: + return nil, fmt.Errorf("ssh: unknown cipher %q, only supports %q or %q", cipherName, "aes256-ctr", "aes256-cbc") + } return privKeyBlock, nil } diff --git a/vendor/golang.org/x/crypto/ssh/mux.go b/vendor/golang.org/x/crypto/ssh/mux.go index f19016270e8..9654c01869a 100644 --- a/vendor/golang.org/x/crypto/ssh/mux.go +++ b/vendor/golang.org/x/crypto/ssh/mux.go @@ -240,7 +240,7 @@ func (m *mux) onePacket() error { id := binary.BigEndian.Uint32(packet[1:]) ch := m.chanList.getChan(id) if ch == nil { - return fmt.Errorf("ssh: invalid channel %d", id) + return m.handleUnknownChannelPacket(id, packet) } return ch.handlePacket(packet) @@ -328,3 +328,24 @@ func (m *mux) openChannel(chanType string, extra []byte) (*channel, error) { return nil, fmt.Errorf("ssh: unexpected packet in response to channel open: %T", msg) } } + +func (m *mux) handleUnknownChannelPacket(id uint32, packet []byte) error { + msg, err := decode(packet) + if err != nil { + return err + } + + switch msg := msg.(type) { + // RFC 4254 section 5.4 says unrecognized channel requests should + // receive a failure response. + case *channelRequestMsg: + if msg.WantReply { + return m.sendMessage(channelRequestFailureMsg{ + PeersID: msg.PeersID, + }) + } + return nil + default: + return fmt.Errorf("ssh: invalid channel %d", id) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go index d1b4fca3a94..2ffb97bfb8a 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go @@ -113,6 +113,7 @@ func NewTerminal(c io.ReadWriter, prompt string) *Terminal { } const ( + keyCtrlC = 3 keyCtrlD = 4 keyCtrlU = 21 keyEnter = '\r' @@ -151,8 +152,12 @@ func bytesToKey(b []byte, pasteActive bool) (rune, []byte) { switch b[0] { case 1: // ^A return keyHome, b[1:] + case 2: // ^B + return keyLeft, b[1:] case 5: // ^E return keyEnd, b[1:] + case 6: // ^F + return keyRight, b[1:] case 8: // ^H return keyBackspace, b[1:] case 11: // ^K @@ -738,6 +743,9 @@ func (t *Terminal) readLine() (line string, err error) { return "", io.EOF } } + if key == keyCtrlC { + return "", io.EOF + } if key == keyPasteStart { t.pasteActive = true if len(t.line) == 0 { diff --git a/vendor/golang.org/x/mod/LICENSE b/vendor/golang.org/x/mod/LICENSE new file mode 100644 index 00000000000..6a66aea5eaf --- /dev/null +++ b/vendor/golang.org/x/mod/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/mod/PATENTS b/vendor/golang.org/x/mod/PATENTS new file mode 100644 index 00000000000..733099041f8 --- /dev/null +++ b/vendor/golang.org/x/mod/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/tools/internal/module/module.go b/vendor/golang.org/x/mod/module/module.go similarity index 57% rename from vendor/golang.org/x/tools/internal/module/module.go rename to vendor/golang.org/x/mod/module/module.go index 9a4edb9dec1..6cd37280a85 100644 --- a/vendor/golang.org/x/tools/internal/module/module.go +++ b/vendor/golang.org/x/mod/module/module.go @@ -2,8 +2,86 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package module defines the module.Version type -// along with support code. +// Package module defines the module.Version type along with support code. +// +// The module.Version type is a simple Path, Version pair: +// +// type Version struct { +// Path string +// Version string +// } +// +// There are no restrictions imposed directly by use of this structure, +// but additional checking functions, most notably Check, verify that +// a particular path, version pair is valid. +// +// Escaped Paths +// +// Module paths appear as substrings of file system paths +// (in the download cache) and of web server URLs in the proxy protocol. +// In general we cannot rely on file systems to be case-sensitive, +// nor can we rely on web servers, since they read from file systems. +// That is, we cannot rely on the file system to keep rsc.io/QUOTE +// and rsc.io/quote separate. Windows and macOS don't. +// Instead, we must never require two different casings of a file path. +// Because we want the download cache to match the proxy protocol, +// and because we want the proxy protocol to be possible to serve +// from a tree of static files (which might be stored on a case-insensitive +// file system), the proxy protocol must never require two different casings +// of a URL path either. +// +// One possibility would be to make the escaped form be the lowercase +// hexadecimal encoding of the actual path bytes. This would avoid ever +// needing different casings of a file path, but it would be fairly illegible +// to most programmers when those paths appeared in the file system +// (including in file paths in compiler errors and stack traces) +// in web server logs, and so on. Instead, we want a safe escaped form that +// leaves most paths unaltered. +// +// The safe escaped form is to replace every uppercase letter +// with an exclamation mark followed by the letter's lowercase equivalent. +// +// For example, +// +// github.com/Azure/azure-sdk-for-go -> github.com/!azure/azure-sdk-for-go. +// github.com/GoogleCloudPlatform/cloudsql-proxy -> github.com/!google!cloud!platform/cloudsql-proxy +// github.com/Sirupsen/logrus -> github.com/!sirupsen/logrus. +// +// Import paths that avoid upper-case letters are left unchanged. +// Note that because import paths are ASCII-only and avoid various +// problematic punctuation (like : < and >), the escaped form is also ASCII-only +// and avoids the same problematic punctuation. +// +// Import paths have never allowed exclamation marks, so there is no +// need to define how to escape a literal !. +// +// Unicode Restrictions +// +// Today, paths are disallowed from using Unicode. +// +// Although paths are currently disallowed from using Unicode, +// we would like at some point to allow Unicode letters as well, to assume that +// file systems and URLs are Unicode-safe (storing UTF-8), and apply +// the !-for-uppercase convention for escaping them in the file system. +// But there are at least two subtle considerations. +// +// First, note that not all case-fold equivalent distinct runes +// form an upper/lower pair. +// For example, U+004B ('K'), U+006B ('k'), and U+212A ('K' for Kelvin) +// are three distinct runes that case-fold to each other. +// When we do add Unicode letters, we must not assume that upper/lower +// are the only case-equivalent pairs. +// Perhaps the Kelvin symbol would be disallowed entirely, for example. +// Or perhaps it would escape as "!!k", or perhaps as "(212A)". +// +// Second, it would be nice to allow Unicode marks as well as letters, +// but marks include combining marks, and then we must deal not +// only with case folding but also normalization: both U+00E9 ('é') +// and U+0065 U+0301 ('e' followed by combining acute accent) +// look the same on the page and are treated by some file systems +// as the same path. If we do allow Unicode marks in paths, there +// must be some kind of normalization to allow only one canonical +// encoding of any character used in an import path. package module // IMPORTANT NOTE @@ -24,22 +102,95 @@ import ( "unicode" "unicode/utf8" - "golang.org/x/tools/internal/semver" + "golang.org/x/mod/semver" + errors "golang.org/x/xerrors" ) -// A Version is defined by a module path and version pair. +// A Version (for clients, a module.Version) is defined by a module path and version pair. +// These are stored in their plain (unescaped) form. type Version struct { + // Path is a module path, like "golang.org/x/text" or "rsc.io/quote/v2". Path string // Version is usually a semantic version in canonical form. - // There are two exceptions to this general rule. + // There are three exceptions to this general rule. // First, the top-level target of a build has no specific version // and uses Version = "". // Second, during MVS calculations the version "none" is used // to represent the decision to take no version of a given module. + // Third, filesystem paths found in "replace" directives are + // represented by a path with an empty version. Version string `json:",omitempty"` } +// String returns a representation of the Version suitable for logging +// (Path@Version, or just Path if Version is empty). +func (m Version) String() string { + if m.Version == "" { + return m.Path + } + return m.Path + "@" + m.Version +} + +// A ModuleError indicates an error specific to a module. +type ModuleError struct { + Path string + Version string + Err error +} + +// VersionError returns a ModuleError derived from a Version and error, +// or err itself if it is already such an error. +func VersionError(v Version, err error) error { + var mErr *ModuleError + if errors.As(err, &mErr) && mErr.Path == v.Path && mErr.Version == v.Version { + return err + } + return &ModuleError{ + Path: v.Path, + Version: v.Version, + Err: err, + } +} + +func (e *ModuleError) Error() string { + if v, ok := e.Err.(*InvalidVersionError); ok { + return fmt.Sprintf("%s@%s: invalid %s: %v", e.Path, v.Version, v.noun(), v.Err) + } + if e.Version != "" { + return fmt.Sprintf("%s@%s: %v", e.Path, e.Version, e.Err) + } + return fmt.Sprintf("module %s: %v", e.Path, e.Err) +} + +func (e *ModuleError) Unwrap() error { return e.Err } + +// An InvalidVersionError indicates an error specific to a version, with the +// module path unknown or specified externally. +// +// A ModuleError may wrap an InvalidVersionError, but an InvalidVersionError +// must not wrap a ModuleError. +type InvalidVersionError struct { + Version string + Pseudo bool + Err error +} + +// noun returns either "version" or "pseudo-version", depending on whether +// e.Version is a pseudo-version. +func (e *InvalidVersionError) noun() string { + if e.Pseudo { + return "pseudo-version" + } + return "version" +} + +func (e *InvalidVersionError) Error() string { + return fmt.Sprintf("%s %q invalid: %s", e.noun(), e.Version, e.Err) +} + +func (e *InvalidVersionError) Unwrap() error { return e.Err } + // Check checks that a given module path, version pair is valid. // In addition to the path being a valid module path // and the version being a valid semantic version, @@ -51,17 +202,14 @@ func Check(path, version string) error { return err } if !semver.IsValid(version) { - return fmt.Errorf("malformed semantic version %v", version) + return &ModuleError{ + Path: path, + Err: &InvalidVersionError{Version: version, Err: errors.New("not a semantic version")}, + } } _, pathMajor, _ := SplitPathVersion(path) - if !MatchPathMajor(version, pathMajor) { - if pathMajor == "" { - pathMajor = "v0 or v1" - } - if pathMajor[0] == '.' { // .v1 - pathMajor = pathMajor[1:] - } - return fmt.Errorf("mismatched module path %v and version %v (want %v)", path, version, pathMajor) + if err := CheckPathMajor(version, pathMajor); err != nil { + return &ModuleError{Path: path, Err: err} } return nil } @@ -79,7 +227,7 @@ func firstPathOK(r rune) bool { // Paths can be ASCII letters, ASCII digits, and limited ASCII punctuation: + - . _ and ~. // This matches what "go get" has historically recognized in import paths. // TODO(rsc): We would like to allow Unicode letters, but that requires additional -// care in the safe encoding (see note below). +// care in the safe encoding (see "escaped paths" above). func pathOK(r rune) bool { if r < utf8.RuneSelf { return r == '+' || r == '-' || r == '.' || r == '_' || r == '~' || @@ -94,7 +242,7 @@ func pathOK(r rune) bool { // For now we allow all Unicode letters but otherwise limit to pathOK plus a few more punctuation characters. // If we expand the set of allowed characters here, we have to // work harder at detecting potential case-folding and normalization collisions. -// See note about "safe encoding" below. +// See note about "escaped paths" above. func fileNameOK(r rune) bool { if r < utf8.RuneSelf { // Entire set of ASCII punctuation, from which we remove characters: @@ -120,6 +268,17 @@ func fileNameOK(r rune) bool { } // CheckPath checks that a module path is valid. +// A valid module path is a valid import path, as checked by CheckImportPath, +// with two additional constraints. +// First, the leading path element (up to the first slash, if any), +// by convention a domain name, must contain only lower-case ASCII letters, +// ASCII digits, dots (U+002E), and dashes (U+002D); +// it must contain at least one dot and cannot start with a dash. +// Second, for a final path element of the form /vN, where N looks numeric +// (ASCII digits and dots) must not begin with a leading zero, must not be /v1, +// and must not contain any dots. For paths beginning with "gopkg.in/", +// this second requirement is replaced by a requirement that the path +// follow the gopkg.in server's conventions. func CheckPath(path string) error { if err := checkPath(path, false); err != nil { return fmt.Errorf("malformed module path %q: %v", path, err) @@ -149,6 +308,20 @@ func CheckPath(path string) error { } // CheckImportPath checks that an import path is valid. +// +// A valid import path consists of one or more valid path elements +// separated by slashes (U+002F). (It must not begin with nor end in a slash.) +// +// A valid path element is a non-empty string made up of +// ASCII letters, ASCII digits, and limited ASCII punctuation: + - . _ and ~. +// It must not begin or end with a dot (U+002E), nor contain two dots in a row. +// +// The element prefix up to the first dot must not be a reserved file name +// on Windows, regardless of case (CON, com1, NuL, and so on). +// +// CheckImportPath may be less restrictive in the future, but see the +// top-level package documentation for additional information about +// subtleties of Unicode. func CheckImportPath(path string) error { if err := checkPath(path, false); err != nil { return fmt.Errorf("malformed import path %q: %v", path, err) @@ -169,8 +342,8 @@ func checkPath(path string, fileName bool) error { if path == "" { return fmt.Errorf("empty string") } - if strings.Contains(path, "..") { - return fmt.Errorf("double dot") + if path[0] == '-' { + return fmt.Errorf("leading dash") } if strings.Contains(path, "//") { return fmt.Errorf("double slash") @@ -226,13 +399,24 @@ func checkElem(elem string, fileName bool) error { } for _, bad := range badWindowsNames { if strings.EqualFold(bad, short) { - return fmt.Errorf("disallowed path element %q", elem) + return fmt.Errorf("%q disallowed as path element component on Windows", short) } } return nil } -// CheckFilePath checks whether a slash-separated file path is valid. +// CheckFilePath checks that a slash-separated file path is valid. +// The definition of a valid file path is the same as the definition +// of a valid import path except that the set of allowed characters is larger: +// all Unicode letters, ASCII digits, the ASCII space character (U+0020), +// and the ASCII punctuation characters +// “!#$%&()+,-.=@[]^_{}~”. +// (The excluded punctuation characters, " * < > ? ` ' | / \ and :, +// have special meanings in certain shells or operating systems.) +// +// CheckFilePath may be less restrictive in the future, but see the +// top-level package documentation for additional information about +// subtleties of Unicode. func CheckFilePath(path string) error { if err := checkPath(path, true); err != nil { return fmt.Errorf("malformed file path %q: %v", path, err) @@ -271,6 +455,9 @@ var badWindowsNames = []string{ // and version is either empty or "/vN" for N >= 2. // As a special case, gopkg.in paths are recognized directly; // they require ".vN" instead of "/vN", and for all N, not just N >= 2. +// SplitPathVersion returns with ok = false when presented with +// a path whose last path element does not satisfy the constraints +// applied by CheckPath, such as "example.com/pkg/v1" or "example.com/pkg/v1.2". func SplitPathVersion(path string) (prefix, pathMajor string, ok bool) { if strings.HasPrefix(path, "gopkg.in/") { return splitGopkgIn(path) @@ -319,20 +506,65 @@ func splitGopkgIn(path string) (prefix, pathMajor string, ok bool) { // MatchPathMajor reports whether the semantic version v // matches the path major version pathMajor. +// +// MatchPathMajor returns true if and only if CheckPathMajor returns nil. func MatchPathMajor(v, pathMajor string) bool { + return CheckPathMajor(v, pathMajor) == nil +} + +// CheckPathMajor returns a non-nil error if the semantic version v +// does not match the path major version pathMajor. +func CheckPathMajor(v, pathMajor string) error { + // TODO(jayconrod): return errors or panic for invalid inputs. This function + // (and others) was covered by integration tests for cmd/go, and surrounding + // code protected against invalid inputs like non-canonical versions. if strings.HasPrefix(pathMajor, ".v") && strings.HasSuffix(pathMajor, "-unstable") { pathMajor = strings.TrimSuffix(pathMajor, "-unstable") } if strings.HasPrefix(v, "v0.0.0-") && pathMajor == ".v1" { // Allow old bug in pseudo-versions that generated v0.0.0- pseudoversion for gopkg .v1. // For example, gopkg.in/yaml.v2@v2.2.1's go.mod requires gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405. - return true + return nil } m := semver.Major(v) if pathMajor == "" { - return m == "v0" || m == "v1" || semver.Build(v) == "+incompatible" + if m == "v0" || m == "v1" || semver.Build(v) == "+incompatible" { + return nil + } + pathMajor = "v0 or v1" + } else if pathMajor[0] == '/' || pathMajor[0] == '.' { + if m == pathMajor[1:] { + return nil + } + pathMajor = pathMajor[1:] } - return (pathMajor[0] == '/' || pathMajor[0] == '.') && m == pathMajor[1:] + return &InvalidVersionError{ + Version: v, + Err: fmt.Errorf("should be %s, not %s", pathMajor, semver.Major(v)), + } +} + +// PathMajorPrefix returns the major-version tag prefix implied by pathMajor. +// An empty PathMajorPrefix allows either v0 or v1. +// +// Note that MatchPathMajor may accept some versions that do not actually begin +// with this prefix: namely, it accepts a 'v0.0.0-' prefix for a '.v1' +// pathMajor, even though that pathMajor implies 'v1' tagging. +func PathMajorPrefix(pathMajor string) string { + if pathMajor == "" { + return "" + } + if pathMajor[0] != '/' && pathMajor[0] != '.' { + panic("pathMajor suffix " + pathMajor + " passed to PathMajorPrefix lacks separator") + } + if strings.HasPrefix(pathMajor, ".v") && strings.HasSuffix(pathMajor, "-unstable") { + pathMajor = strings.TrimSuffix(pathMajor, "-unstable") + } + m := pathMajor[1:] + if m != semver.Major(m) { + panic("pathMajor suffix " + pathMajor + "passed to PathMajorPrefix is not a valid major version") + } + return m } // CanonicalVersion returns the canonical form of the version string v. @@ -345,7 +577,10 @@ func CanonicalVersion(v string) string { return cv } -// Sort sorts the list by Path, breaking ties by comparing Versions. +// Sort sorts the list by Path, breaking ties by comparing Version fields. +// The Version fields are interpreted as semantic versions (using semver.Compare) +// optionally followed by a tie-breaking suffix introduced by a slash character, +// like in "v0.0.1/go.mod". func Sort(list []Version) { sort.Slice(list, func(i, j int) bool { mi := list[i] @@ -372,93 +607,36 @@ func Sort(list []Version) { }) } -// Safe encodings -// -// Module paths appear as substrings of file system paths -// (in the download cache) and of web server URLs in the proxy protocol. -// In general we cannot rely on file systems to be case-sensitive, -// nor can we rely on web servers, since they read from file systems. -// That is, we cannot rely on the file system to keep rsc.io/QUOTE -// and rsc.io/quote separate. Windows and macOS don't. -// Instead, we must never require two different casings of a file path. -// Because we want the download cache to match the proxy protocol, -// and because we want the proxy protocol to be possible to serve -// from a tree of static files (which might be stored on a case-insensitive -// file system), the proxy protocol must never require two different casings -// of a URL path either. -// -// One possibility would be to make the safe encoding be the lowercase -// hexadecimal encoding of the actual path bytes. This would avoid ever -// needing different casings of a file path, but it would be fairly illegible -// to most programmers when those paths appeared in the file system -// (including in file paths in compiler errors and stack traces) -// in web server logs, and so on. Instead, we want a safe encoding that -// leaves most paths unaltered. -// -// The safe encoding is this: -// replace every uppercase letter with an exclamation mark -// followed by the letter's lowercase equivalent. -// -// For example, -// github.com/Azure/azure-sdk-for-go -> github.com/!azure/azure-sdk-for-go. -// github.com/GoogleCloudPlatform/cloudsql-proxy -> github.com/!google!cloud!platform/cloudsql-proxy -// github.com/Sirupsen/logrus -> github.com/!sirupsen/logrus. -// -// Import paths that avoid upper-case letters are left unchanged. -// Note that because import paths are ASCII-only and avoid various -// problematic punctuation (like : < and >), the safe encoding is also ASCII-only -// and avoids the same problematic punctuation. -// -// Import paths have never allowed exclamation marks, so there is no -// need to define how to encode a literal !. -// -// Although paths are disallowed from using Unicode (see pathOK above), -// the eventual plan is to allow Unicode letters as well, to assume that -// file systems and URLs are Unicode-safe (storing UTF-8), and apply -// the !-for-uppercase convention. Note however that not all runes that -// are different but case-fold equivalent are an upper/lower pair. -// For example, U+004B ('K'), U+006B ('k'), and U+212A ('K' for Kelvin) -// are considered to case-fold to each other. When we do add Unicode -// letters, we must not assume that upper/lower are the only case-equivalent pairs. -// Perhaps the Kelvin symbol would be disallowed entirely, for example. -// Or perhaps it would encode as "!!k", or perhaps as "(212A)". -// -// Also, it would be nice to allow Unicode marks as well as letters, -// but marks include combining marks, and then we must deal not -// only with case folding but also normalization: both U+00E9 ('é') -// and U+0065 U+0301 ('e' followed by combining acute accent) -// look the same on the page and are treated by some file systems -// as the same path. If we do allow Unicode marks in paths, there -// must be some kind of normalization to allow only one canonical -// encoding of any character used in an import path. - -// EncodePath returns the safe encoding of the given module path. +// EscapePath returns the escaped form of the given module path. // It fails if the module path is invalid. -func EncodePath(path string) (encoding string, err error) { +func EscapePath(path string) (escaped string, err error) { if err := CheckPath(path); err != nil { return "", err } - return encodeString(path) + return escapeString(path) } -// EncodeVersion returns the safe encoding of the given module version. +// EscapeVersion returns the escaped form of the given module version. // Versions are allowed to be in non-semver form but must be valid file names // and not contain exclamation marks. -func EncodeVersion(v string) (encoding string, err error) { +func EscapeVersion(v string) (escaped string, err error) { if err := checkElem(v, true); err != nil || strings.Contains(v, "!") { - return "", fmt.Errorf("disallowed version string %q", v) + return "", &InvalidVersionError{ + Version: v, + Err: fmt.Errorf("disallowed version string"), + } } - return encodeString(v) + return escapeString(v) } -func encodeString(s string) (encoding string, err error) { +func escapeString(s string) (escaped string, err error) { haveUpper := false for _, r := range s { if r == '!' || r >= utf8.RuneSelf { // This should be disallowed by CheckPath, but diagnose anyway. - // The correctness of the encoding loop below depends on it. - return "", fmt.Errorf("internal error: inconsistency in EncodePath") + // The correctness of the escaping loop below depends on it. + return "", fmt.Errorf("internal error: inconsistency in EscapePath") } if 'A' <= r && r <= 'Z' { haveUpper = true @@ -480,39 +658,39 @@ func encodeString(s string) (encoding string, err error) { return string(buf), nil } -// DecodePath returns the module path of the given safe encoding. -// It fails if the encoding is invalid or encodes an invalid path. -func DecodePath(encoding string) (path string, err error) { - path, ok := decodeString(encoding) +// UnescapePath returns the module path for the given escaped path. +// It fails if the escaped path is invalid or describes an invalid path. +func UnescapePath(escaped string) (path string, err error) { + path, ok := unescapeString(escaped) if !ok { - return "", fmt.Errorf("invalid module path encoding %q", encoding) + return "", fmt.Errorf("invalid escaped module path %q", escaped) } if err := CheckPath(path); err != nil { - return "", fmt.Errorf("invalid module path encoding %q: %v", encoding, err) + return "", fmt.Errorf("invalid escaped module path %q: %v", escaped, err) } return path, nil } -// DecodeVersion returns the version string for the given safe encoding. -// It fails if the encoding is invalid or encodes an invalid version. +// UnescapeVersion returns the version string for the given escaped version. +// It fails if the escaped form is invalid or describes an invalid version. // Versions are allowed to be in non-semver form but must be valid file names // and not contain exclamation marks. -func DecodeVersion(encoding string) (v string, err error) { - v, ok := decodeString(encoding) +func UnescapeVersion(escaped string) (v string, err error) { + v, ok := unescapeString(escaped) if !ok { - return "", fmt.Errorf("invalid version encoding %q", encoding) + return "", fmt.Errorf("invalid escaped version %q", escaped) } if err := checkElem(v, true); err != nil { - return "", fmt.Errorf("disallowed version string %q", v) + return "", fmt.Errorf("invalid escaped version %q: %v", v, err) } return v, nil } -func decodeString(encoding string) (string, bool) { +func unescapeString(escaped string) (string, bool) { var buf []byte bang := false - for _, r := range encoding { + for _, r := range escaped { if r >= utf8.RuneSelf { return "", false } diff --git a/vendor/golang.org/x/tools/internal/semver/semver.go b/vendor/golang.org/x/mod/semver/semver.go similarity index 99% rename from vendor/golang.org/x/tools/internal/semver/semver.go rename to vendor/golang.org/x/mod/semver/semver.go index 4af7118e55d..2988e3cf9c5 100644 --- a/vendor/golang.org/x/tools/internal/semver/semver.go +++ b/vendor/golang.org/x/mod/semver/semver.go @@ -107,7 +107,7 @@ func Build(v string) string { } // Compare returns an integer comparing two versions according to -// according to semantic version precedence. +// semantic version precedence. // The result will be 0 if v == w, -1 if v < w, or +1 if v > w. // // An invalid semantic version string is considered less than a valid one. @@ -263,7 +263,7 @@ func parseBuild(v string) (t, rest string, ok bool) { i := 1 start := 1 for i < len(v) { - if !isIdentChar(v[i]) { + if !isIdentChar(v[i]) && v[i] != '.' { return } if v[i] == '.' { diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 54acc1e3601..2482f7bf92f 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -108,6 +108,19 @@ type Transport struct { // waiting for their turn. StrictMaxConcurrentStreams bool + // ReadIdleTimeout is the timeout after which a health check using ping + // frame will be carried out if no frame is received on the connection. + // Note that a ping response will is considered a received frame, so if + // there is no other traffic on the connection, the health check will + // be performed every ReadIdleTimeout interval. + // If zero, no health check is performed. + ReadIdleTimeout time.Duration + + // PingTimeout is the timeout after which the connection will be closed + // if a response to Ping is not received. + // Defaults to 15s. + PingTimeout time.Duration + // t1, if non-nil, is the standard library Transport using // this transport. Its settings are used (but not its // RoundTrip method, etc). @@ -131,6 +144,14 @@ func (t *Transport) disableCompression() bool { return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression) } +func (t *Transport) pingTimeout() time.Duration { + if t.PingTimeout == 0 { + return 15 * time.Second + } + return t.PingTimeout + +} + // ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2. // It returns an error if t1 has already been HTTP/2-enabled. func ConfigureTransport(t1 *http.Transport) error { @@ -675,6 +696,20 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro return cc, nil } +func (cc *ClientConn) healthCheck() { + pingTimeout := cc.t.pingTimeout() + // We don't need to periodically ping in the health check, because the readLoop of ClientConn will + // trigger the healthCheck again if there is no frame received. + ctx, cancel := context.WithTimeout(context.Background(), pingTimeout) + defer cancel() + err := cc.Ping(ctx) + if err != nil { + cc.closeForLostPing() + cc.t.connPool().MarkDead(cc) + return + } +} + func (cc *ClientConn) setGoAway(f *GoAwayFrame) { cc.mu.Lock() defer cc.mu.Unlock() @@ -846,14 +881,12 @@ func (cc *ClientConn) sendGoAway() error { return nil } -// Close closes the client connection immediately. -// -// In-flight requests are interrupted. For a graceful shutdown, use Shutdown instead. -func (cc *ClientConn) Close() error { +// closes the client connection immediately. In-flight requests are interrupted. +// err is sent to streams. +func (cc *ClientConn) closeForError(err error) error { cc.mu.Lock() defer cc.cond.Broadcast() defer cc.mu.Unlock() - err := errors.New("http2: client connection force closed via ClientConn.Close") for id, cs := range cc.streams { select { case cs.resc <- resAndError{err: err}: @@ -866,6 +899,20 @@ func (cc *ClientConn) Close() error { return cc.tconn.Close() } +// Close closes the client connection immediately. +// +// In-flight requests are interrupted. For a graceful shutdown, use Shutdown instead. +func (cc *ClientConn) Close() error { + err := errors.New("http2: client connection force closed via ClientConn.Close") + return cc.closeForError(err) +} + +// closes the client connection immediately. In-flight requests are interrupted. +func (cc *ClientConn) closeForLostPing() error { + err := errors.New("http2: client connection lost") + return cc.closeForError(err) +} + const maxAllocFrameSize = 512 << 10 // frameBuffer returns a scratch buffer suitable for writing DATA frames. @@ -1737,8 +1784,17 @@ func (rl *clientConnReadLoop) run() error { rl.closeWhenIdle = cc.t.disableKeepAlives() || cc.singleUse gotReply := false // ever saw a HEADERS reply gotSettings := false + readIdleTimeout := cc.t.ReadIdleTimeout + var t *time.Timer + if readIdleTimeout != 0 { + t = time.AfterFunc(readIdleTimeout, cc.healthCheck) + defer t.Stop() + } for { f, err := cc.fr.ReadFrame() + if t != nil { + t.Reset(readIdleTimeout) + } if err != nil { cc.vlogf("http2: Transport readFrame error on conn %p: (%T) %v", cc, err, err) } @@ -2469,6 +2525,7 @@ func strSliceContains(ss []string, s string) bool { type erringRoundTripper struct{ err error } +func (rt erringRoundTripper) RoundTripErr() error { return rt.err } func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, rt.err } // gzipReader wraps a response body so it can lazily diff --git a/vendor/golang.org/x/oauth2/transport.go b/vendor/golang.org/x/oauth2/transport.go index aa0d34f1e0e..90657915fbc 100644 --- a/vendor/golang.org/x/oauth2/transport.go +++ b/vendor/golang.org/x/oauth2/transport.go @@ -6,7 +6,7 @@ package oauth2 import ( "errors" - "io" + "log" "net/http" "sync" ) @@ -25,9 +25,6 @@ type Transport struct { // Base is the base RoundTripper used to make HTTP requests. // If nil, http.DefaultTransport is used. Base http.RoundTripper - - mu sync.Mutex // guards modReq - modReq map[*http.Request]*http.Request // original -> modified } // RoundTrip authorizes and authenticates the request with an @@ -52,35 +49,22 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { req2 := cloneRequest(req) // per RoundTripper contract token.SetAuthHeader(req2) - t.setModReq(req, req2) - res, err := t.base().RoundTrip(req2) - // req.Body is assumed to have been closed by the base RoundTripper. + // req.Body is assumed to be closed by the base RoundTripper. reqBodyClosed = true - - if err != nil { - t.setModReq(req, nil) - return nil, err - } - res.Body = &onEOFReader{ - rc: res.Body, - fn: func() { t.setModReq(req, nil) }, - } - return res, nil + return t.base().RoundTrip(req2) } -// CancelRequest cancels an in-flight request by closing its connection. +var cancelOnce sync.Once + +// CancelRequest does nothing. It used to be a legacy cancellation mechanism +// but now only it only logs on first use to warn that it's deprecated. +// +// Deprecated: use contexts for cancellation instead. func (t *Transport) CancelRequest(req *http.Request) { - type canceler interface { - CancelRequest(*http.Request) - } - if cr, ok := t.base().(canceler); ok { - t.mu.Lock() - modReq := t.modReq[req] - delete(t.modReq, req) - t.mu.Unlock() - cr.CancelRequest(modReq) - } + cancelOnce.Do(func() { + log.Printf("deprecated: golang.org/x/oauth2: Transport.CancelRequest no longer does anything; use contexts") + }) } func (t *Transport) base() http.RoundTripper { @@ -90,19 +74,6 @@ func (t *Transport) base() http.RoundTripper { return http.DefaultTransport } -func (t *Transport) setModReq(orig, mod *http.Request) { - t.mu.Lock() - defer t.mu.Unlock() - if t.modReq == nil { - t.modReq = make(map[*http.Request]*http.Request) - } - if mod == nil { - delete(t.modReq, orig) - } else { - t.modReq[orig] = mod - } -} - // cloneRequest returns a clone of the provided *http.Request. // The clone is a shallow copy of the struct and its Header map. func cloneRequest(r *http.Request) *http.Request { @@ -116,29 +87,3 @@ func cloneRequest(r *http.Request) *http.Request { } return r2 } - -type onEOFReader struct { - rc io.ReadCloser - fn func() -} - -func (r *onEOFReader) Read(p []byte) (n int, err error) { - n, err = r.rc.Read(p) - if err == io.EOF { - r.runFunc() - } - return -} - -func (r *onEOFReader) Close() error { - err := r.rc.Close() - r.runFunc() - return err -} - -func (r *onEOFReader) runFunc() { - if fn := r.fn; fn != nil { - fn() - r.fn = nil - } -} diff --git a/vendor/golang.org/x/sys/cpu/byteorder.go b/vendor/golang.org/x/sys/cpu/byteorder.go index ed8da8deacf..dcbb14ef35a 100644 --- a/vendor/golang.org/x/sys/cpu/byteorder.go +++ b/vendor/golang.org/x/sys/cpu/byteorder.go @@ -39,20 +39,25 @@ func (bigEndian) Uint64(b []byte) uint64 { uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56 } -// hostByteOrder returns binary.LittleEndian on little-endian machines and -// binary.BigEndian on big-endian machines. +// hostByteOrder returns littleEndian on little-endian machines and +// bigEndian on big-endian machines. func hostByteOrder() byteOrder { switch runtime.GOARCH { case "386", "amd64", "amd64p32", + "alpha", "arm", "arm64", "mipsle", "mips64le", "mips64p32le", + "nios2", "ppc64le", - "riscv", "riscv64": + "riscv", "riscv64", + "sh": return littleEndian{} case "armbe", "arm64be", + "m68k", "mips", "mips64", "mips64p32", "ppc", "ppc64", "s390", "s390x", + "shbe", "sparc", "sparc64": return bigEndian{} } diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go index e44deb75746..5cce25ed9b6 100644 --- a/vendor/golang.org/x/sys/cpu/cpu.go +++ b/vendor/golang.org/x/sys/cpu/cpu.go @@ -6,6 +6,11 @@ // various CPU architectures. package cpu +import ( + "os" + "strings" +) + // Initialized reports whether the CPU features were initialized. // // For some GOOS/GOARCH combinations initialization of the CPU features depends @@ -169,3 +174,94 @@ var S390X struct { HasVXE bool // vector-enhancements facility 1 _ CacheLinePad } + +func init() { + archInit() + initOptions() + processOptions() +} + +// options contains the cpu debug options that can be used in GODEBUG. +// Options are arch dependent and are added by the arch specific initOptions functions. +// Features that are mandatory for the specific GOARCH should have the Required field set +// (e.g. SSE2 on amd64). +var options []option + +// Option names should be lower case. e.g. avx instead of AVX. +type option struct { + Name string + Feature *bool + Specified bool // whether feature value was specified in GODEBUG + Enable bool // whether feature should be enabled + Required bool // whether feature is mandatory and can not be disabled +} + +func processOptions() { + env := os.Getenv("GODEBUG") +field: + for env != "" { + field := "" + i := strings.IndexByte(env, ',') + if i < 0 { + field, env = env, "" + } else { + field, env = env[:i], env[i+1:] + } + if len(field) < 4 || field[:4] != "cpu." { + continue + } + i = strings.IndexByte(field, '=') + if i < 0 { + print("GODEBUG sys/cpu: no value specified for \"", field, "\"\n") + continue + } + key, value := field[4:i], field[i+1:] // e.g. "SSE2", "on" + + var enable bool + switch value { + case "on": + enable = true + case "off": + enable = false + default: + print("GODEBUG sys/cpu: value \"", value, "\" not supported for cpu option \"", key, "\"\n") + continue field + } + + if key == "all" { + for i := range options { + options[i].Specified = true + options[i].Enable = enable || options[i].Required + } + continue field + } + + for i := range options { + if options[i].Name == key { + options[i].Specified = true + options[i].Enable = enable + continue field + } + } + + print("GODEBUG sys/cpu: unknown cpu feature \"", key, "\"\n") + } + + for _, o := range options { + if !o.Specified { + continue + } + + if o.Enable && !*o.Feature { + print("GODEBUG sys/cpu: can not enable \"", o.Name, "\", missing CPU support\n") + continue + } + + if !o.Enable && o.Required { + print("GODEBUG sys/cpu: can not disable \"", o.Name, "\", required CPU feature\n") + continue + } + + *o.Feature = o.Enable + } +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go b/vendor/golang.org/x/sys/cpu/cpu_aix.go similarity index 89% rename from vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go rename to vendor/golang.org/x/sys/cpu/cpu_aix.go index be602722472..464a209cf59 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_aix.go @@ -2,12 +2,10 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build aix,ppc64 +// +build aix package cpu -const cacheLineSize = 128 - const ( // getsystemcfg constants _SC_IMPL = 2 @@ -15,7 +13,7 @@ const ( _IMPL_POWER9 = 0x20000 ) -func init() { +func archInit() { impl := getsystemcfg(_SC_IMPL) if impl&_IMPL_POWER8 != 0 { PPC64.IsPOWER8 = true diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm.go b/vendor/golang.org/x/sys/cpu/cpu_arm.go index 981af6818ca..301b752e9c5 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_arm.go +++ b/vendor/golang.org/x/sys/cpu/cpu_arm.go @@ -38,3 +38,36 @@ const ( hwcap2_SHA2 = 1 << 3 hwcap2_CRC32 = 1 << 4 ) + +func initOptions() { + options = []option{ + {Name: "pmull", Feature: &ARM.HasPMULL}, + {Name: "sha1", Feature: &ARM.HasSHA1}, + {Name: "sha2", Feature: &ARM.HasSHA2}, + {Name: "swp", Feature: &ARM.HasSWP}, + {Name: "thumb", Feature: &ARM.HasTHUMB}, + {Name: "thumbee", Feature: &ARM.HasTHUMBEE}, + {Name: "tls", Feature: &ARM.HasTLS}, + {Name: "vfp", Feature: &ARM.HasVFP}, + {Name: "vfpd32", Feature: &ARM.HasVFPD32}, + {Name: "vfpv3", Feature: &ARM.HasVFPv3}, + {Name: "vfpv3d16", Feature: &ARM.HasVFPv3D16}, + {Name: "vfpv4", Feature: &ARM.HasVFPv4}, + {Name: "half", Feature: &ARM.HasHALF}, + {Name: "26bit", Feature: &ARM.Has26BIT}, + {Name: "fastmul", Feature: &ARM.HasFASTMUL}, + {Name: "fpa", Feature: &ARM.HasFPA}, + {Name: "edsp", Feature: &ARM.HasEDSP}, + {Name: "java", Feature: &ARM.HasJAVA}, + {Name: "iwmmxt", Feature: &ARM.HasIWMMXT}, + {Name: "crunch", Feature: &ARM.HasCRUNCH}, + {Name: "neon", Feature: &ARM.HasNEON}, + {Name: "idivt", Feature: &ARM.HasIDIVT}, + {Name: "idiva", Feature: &ARM.HasIDIVA}, + {Name: "lpae", Feature: &ARM.HasLPAE}, + {Name: "evtstrm", Feature: &ARM.HasEVTSTRM}, + {Name: "aes", Feature: &ARM.HasAES}, + {Name: "crc32", Feature: &ARM.HasCRC32}, + } + +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_arm64.go index 9c87677aef9..2d90024387f 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.go @@ -8,10 +8,45 @@ import "runtime" const cacheLineSize = 64 -func init() { +func initOptions() { + options = []option{ + {Name: "fp", Feature: &ARM64.HasFP}, + {Name: "asimd", Feature: &ARM64.HasASIMD}, + {Name: "evstrm", Feature: &ARM64.HasEVTSTRM}, + {Name: "aes", Feature: &ARM64.HasAES}, + {Name: "fphp", Feature: &ARM64.HasFPHP}, + {Name: "jscvt", Feature: &ARM64.HasJSCVT}, + {Name: "lrcpc", Feature: &ARM64.HasLRCPC}, + {Name: "pmull", Feature: &ARM64.HasPMULL}, + {Name: "sha1", Feature: &ARM64.HasSHA1}, + {Name: "sha2", Feature: &ARM64.HasSHA2}, + {Name: "sha3", Feature: &ARM64.HasSHA3}, + {Name: "sha512", Feature: &ARM64.HasSHA512}, + {Name: "sm3", Feature: &ARM64.HasSM3}, + {Name: "sm4", Feature: &ARM64.HasSM4}, + {Name: "sve", Feature: &ARM64.HasSVE}, + {Name: "crc32", Feature: &ARM64.HasCRC32}, + {Name: "atomics", Feature: &ARM64.HasATOMICS}, + {Name: "asimdhp", Feature: &ARM64.HasASIMDHP}, + {Name: "cpuid", Feature: &ARM64.HasCPUID}, + {Name: "asimrdm", Feature: &ARM64.HasASIMDRDM}, + {Name: "fcma", Feature: &ARM64.HasFCMA}, + {Name: "dcpop", Feature: &ARM64.HasDCPOP}, + {Name: "asimddp", Feature: &ARM64.HasASIMDDP}, + {Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM}, + } +} + +func archInit() { switch runtime.GOOS { - case "android", "darwin": + case "android", "darwin", "netbsd": // Android and iOS don't seem to allow reading these registers. + // + // NetBSD: + // ID_AA64ISAR0_EL1 is a privileged register and cannot be read from EL0. + // It can be read via sysctl(3). Example for future implementers: + // https://nxr.netbsd.org/xref/src/usr.sbin/cpuctl/arch/aarch64.c + // // Fake the minimal features expected by // TestARM64minimalFeatures. ARM64.HasASIMD = true diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux.go b/vendor/golang.org/x/sys/cpu/cpu_linux.go index fe139182c8d..6fc874f7fef 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux.go @@ -6,7 +6,7 @@ package cpu -func init() { +func archInit() { if err := readHWCAP(); err != nil { return } diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go index eb24e5073e7..5a418900538 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build linux // +build mips64 mips64le package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go index 6c8d975d40a..99f8a6399ef 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go @@ -7,8 +7,6 @@ package cpu -const cacheLineSize = 128 - // HWCAP/HWCAP2 bits. These are exposed by the kernel. const ( // ISA Level diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go index d579eaef404..b88d6b8f662 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go @@ -4,8 +4,6 @@ package cpu -const cacheLineSize = 256 - const ( // bit mask values from /usr/include/bits/hwcap.h hwcap_ZARCH = 2 diff --git a/vendor/golang.org/x/sys/cpu/cpu_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_mips64x.go index 6165f121249..57b5b677de0 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_mips64x.go +++ b/vendor/golang.org/x/sys/cpu/cpu_mips64x.go @@ -7,3 +7,9 @@ package cpu const cacheLineSize = 32 + +func initOptions() { + options = []option{ + {Name: "msa", Feature: &MIPS64X.HasMSA}, + } +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_mipsx.go b/vendor/golang.org/x/sys/cpu/cpu_mipsx.go index 1269eee88d0..cfc1946b7bb 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_mipsx.go +++ b/vendor/golang.org/x/sys/cpu/cpu_mipsx.go @@ -7,3 +7,5 @@ package cpu const cacheLineSize = 32 + +func initOptions() {} diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_arm.go b/vendor/golang.org/x/sys/cpu/cpu_other_arm.go new file mode 100644 index 00000000000..b412efc1bd1 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_other_arm.go @@ -0,0 +1,9 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !linux,arm + +package cpu + +func archInit() {} diff --git a/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go b/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go new file mode 100644 index 00000000000..d28d675b5f1 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go @@ -0,0 +1,16 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ppc64 ppc64le + +package cpu + +const cacheLineSize = 128 + +func initOptions() { + options = []option{ + {Name: "darn", Feature: &PPC64.HasDARN}, + {Name: "scv", Feature: &PPC64.HasSCV}, + } +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go index efe2b7a8477..8b08de341b8 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go @@ -7,3 +7,5 @@ package cpu const cacheLineSize = 32 + +func initOptions() {} diff --git a/vendor/golang.org/x/sys/cpu/cpu_s390x.go b/vendor/golang.org/x/sys/cpu/cpu_s390x.go new file mode 100644 index 00000000000..544cd621cee --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_s390x.go @@ -0,0 +1,30 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cpu + +const cacheLineSize = 256 + +func initOptions() { + options = []option{ + {Name: "zarch", Feature: &S390X.HasZARCH}, + {Name: "stfle", Feature: &S390X.HasSTFLE}, + {Name: "ldisp", Feature: &S390X.HasLDISP}, + {Name: "eimm", Feature: &S390X.HasEIMM}, + {Name: "dfp", Feature: &S390X.HasDFP}, + {Name: "etf3eh", Feature: &S390X.HasETF3EH}, + {Name: "msa", Feature: &S390X.HasMSA}, + {Name: "aes", Feature: &S390X.HasAES}, + {Name: "aescbc", Feature: &S390X.HasAESCBC}, + {Name: "aesctr", Feature: &S390X.HasAESCTR}, + {Name: "aesgcm", Feature: &S390X.HasAESGCM}, + {Name: "ghash", Feature: &S390X.HasGHASH}, + {Name: "sha1", Feature: &S390X.HasSHA1}, + {Name: "sha256", Feature: &S390X.HasSHA256}, + {Name: "sha3", Feature: &S390X.HasSHA3}, + {Name: "sha512", Feature: &S390X.HasSHA512}, + {Name: "vx", Feature: &S390X.HasVX}, + {Name: "vxe", Feature: &S390X.HasVXE}, + } +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_wasm.go b/vendor/golang.org/x/sys/cpu/cpu_wasm.go index 8681e876a95..5382f2a227a 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_wasm.go +++ b/vendor/golang.org/x/sys/cpu/cpu_wasm.go @@ -11,3 +11,7 @@ package cpu // rules are good enough. const cacheLineSize = 0 + +func initOptions() {} + +func archInit() {} diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.go b/vendor/golang.org/x/sys/cpu/cpu_x86.go index d70d317f5a4..2ad039d40eb 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_x86.go +++ b/vendor/golang.org/x/sys/cpu/cpu_x86.go @@ -6,9 +6,37 @@ package cpu +import "runtime" + const cacheLineSize = 64 -func init() { +func initOptions() { + options = []option{ + {Name: "adx", Feature: &X86.HasADX}, + {Name: "aes", Feature: &X86.HasAES}, + {Name: "avx", Feature: &X86.HasAVX}, + {Name: "avx2", Feature: &X86.HasAVX2}, + {Name: "bmi1", Feature: &X86.HasBMI1}, + {Name: "bmi2", Feature: &X86.HasBMI2}, + {Name: "erms", Feature: &X86.HasERMS}, + {Name: "fma", Feature: &X86.HasFMA}, + {Name: "osxsave", Feature: &X86.HasOSXSAVE}, + {Name: "pclmulqdq", Feature: &X86.HasPCLMULQDQ}, + {Name: "popcnt", Feature: &X86.HasPOPCNT}, + {Name: "rdrand", Feature: &X86.HasRDRAND}, + {Name: "rdseed", Feature: &X86.HasRDSEED}, + {Name: "sse3", Feature: &X86.HasSSE3}, + {Name: "sse41", Feature: &X86.HasSSE41}, + {Name: "sse42", Feature: &X86.HasSSE42}, + {Name: "ssse3", Feature: &X86.HasSSSE3}, + + // These capabilities should always be enabled on amd64: + {Name: "sse2", Feature: &X86.HasSSE2, Required: runtime.GOARCH == "amd64"}, + } +} + +func archInit() { + Initialized = true maxID, _, _, _ := cpuid(0, 0) @@ -52,6 +80,7 @@ func init() { X86.HasERMS = isSet(9, ebx7) X86.HasRDSEED = isSet(18, ebx7) X86.HasADX = isSet(19, ebx7) + } func isSet(bitpos uint, value uint32) bool { diff --git a/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go b/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go new file mode 100644 index 00000000000..76fbe40b762 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go @@ -0,0 +1,27 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Recreate a getsystemcfg syscall handler instead of +// using the one provided by x/sys/unix to avoid having +// the dependency between them. (See golang.org/issue/32102) +// Morever, this file will be used during the building of +// gccgo's libgo and thus must not used a CGo method. + +// +build aix +// +build gccgo + +package cpu + +import ( + "syscall" +) + +//extern getsystemcfg +func gccgoGetsystemcfg(label uint32) (r uint64) + +func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) { + r1 = uintptr(gccgoGetsystemcfg(uint32(label))) + e1 = syscall.GetErrno() + return +} diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s new file mode 100644 index 00000000000..567a4763c88 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s @@ -0,0 +1,29 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for mips64, OpenBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-104 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/ioctl.go b/vendor/golang.org/x/sys/unix/ioctl.go index 3559e5dcb29..5641678613c 100644 --- a/vendor/golang.org/x/sys/unix/ioctl.go +++ b/vendor/golang.org/x/sys/unix/ioctl.go @@ -20,6 +20,15 @@ func IoctlSetInt(fd int, req uint, value int) error { return ioctl(fd, req, uintptr(value)) } +// IoctlSetPointerInt performs an ioctl operation which sets an +// integer value on fd, using the specified request number. The ioctl +// argument is called with a pointer to the integer value, rather than +// passing the integer value directly. +func IoctlSetPointerInt(fd int, req uint, value int) error { + v := int32(value) + return ioctl(fd, req, uintptr(unsafe.Pointer(&v))) +} + // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. // // To change fd's window size, the req argument should be TIOCSWINSZ. diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh index ece31e9dcdc..83f2d42993c 100644 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -184,6 +184,15 @@ openbsd_arm64) # API consistent across platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; +openbsd_mips64) + mkerrors="$mkerrors -m64" + mksyscall="go run mksyscall.go -openbsd" + mksysctl="go run mksysctl_openbsd.go" + mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'" + # Let the type of C char be signed for making the bare syscall + # API consistent across platforms. + mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" + ;; solaris_amd64) mksyscall="go run mksyscall_solaris.go" mkerrors="$mkerrors -m64" diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 780e387e3f1..40534f03120 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -107,6 +107,7 @@ includes_FreeBSD=' #include #include #include +#include #include #include #include @@ -195,6 +196,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -297,6 +299,7 @@ includes_NetBSD=' #include #include #include +#include #include #include #include @@ -325,6 +328,7 @@ includes_OpenBSD=' #include #include #include +#include #include #include #include @@ -507,11 +511,14 @@ ccflags="$@" $2 ~ /^(CLOCK|TIMER)_/ || $2 ~ /^CAN_/ || $2 ~ /^CAP_/ || + $2 ~ /^CP_/ || + $2 ~ /^CPUSTATES$/ || $2 ~ /^ALG_/ || $2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE)/ || - $2 ~ /^FS_IOC_.*(ENCRYPTION|VERITY|GETFLAGS)/ || + $2 ~ /^FS_IOC_.*(ENCRYPTION|VERITY|[GS]ETFLAGS)/ || $2 ~ /^FS_VERITY_/ || $2 ~ /^FSCRYPT_/ || + $2 ~ /^DM_/ || $2 ~ /^GRND_/ || $2 ~ /^RND/ || $2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ || diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go index 68605db6248..60bbe10adf7 100644 --- a/vendor/golang.org/x/sys/unix/syscall_bsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go @@ -527,6 +527,23 @@ func SysctlClockinfo(name string) (*Clockinfo, error) { return &ci, nil } +func SysctlTimeval(name string) (*Timeval, error) { + mib, err := sysctlmib(name) + if err != nil { + return nil, err + } + + var tv Timeval + n := uintptr(unsafe.Sizeof(tv)) + if err := sysctl(mib, (*byte)(unsafe.Pointer(&tv)), &n, nil, 0); err != nil { + return nil, err + } + if n != unsafe.Sizeof(tv) { + return nil, EIO + } + return &tv, nil +} + //sys utimes(path string, timeval *[2]Timeval) (err error) func Utimes(path string, tv []Timeval) error { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 9a5a6ee5445..0cf31acf02c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -423,6 +423,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sysnb Getrlimit(which int, lim *Rlimit) (err error) //sysnb Getrusage(who int, rusage *Rusage) (err error) //sysnb Getsid(pid int) (sid int, err error) +//sysnb Gettimeofday(tp *Timeval) (err error) //sysnb Getuid() (uid int) //sysnb Issetugid() (tainted bool) //sys Kqueue() (fd int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go index 707ba4f59a2..2724e3a5128 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go @@ -20,17 +20,6 @@ func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int32(sec), Usec: int32(usec)} } -//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error) -func Gettimeofday(tv *Timeval) (err error) { - // The tv passed to gettimeofday must be non-nil - // but is otherwise unused. The answers come back - // in the two registers. - sec, usec, err := gettimeofday(tv) - tv.Sec = int32(sec) - tv.Usec = int32(usec) - return err -} - func SetKevent(k *Kevent_t, fd, mode, flags int) { k.Ident = uint32(fd) k.Filter = int16(mode) diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go index fdbfb5911ac..ce2e0d24973 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go @@ -20,17 +20,6 @@ func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } -//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error) -func Gettimeofday(tv *Timeval) (err error) { - // The tv passed to gettimeofday must be non-nil - // but is otherwise unused. The answers come back - // in the two registers. - sec, usec, err := gettimeofday(tv) - tv.Sec = sec - tv.Usec = usec - return err -} - func SetKevent(k *Kevent_t, fd, mode, flags int) { k.Ident = uint64(fd) k.Filter = int16(mode) diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go index f8bc4cfb1fa..fc17a3f232e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go @@ -20,17 +20,6 @@ func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int32(sec), Usec: int32(usec)} } -//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error) -func Gettimeofday(tv *Timeval) (err error) { - // The tv passed to gettimeofday must be non-nil - // but is otherwise unused. The answers come back - // in the two registers. - sec, usec, err := gettimeofday(tv) - tv.Sec = int32(sec) - tv.Usec = int32(usec) - return err -} - func SetKevent(k *Kevent_t, fd, mode, flags int) { k.Ident = uint32(fd) k.Filter = int16(mode) diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go index 5ede3ac316a..1e91ddf3257 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go @@ -22,17 +22,6 @@ func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } -//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error) -func Gettimeofday(tv *Timeval) (err error) { - // The tv passed to gettimeofday must be non-nil - // but is otherwise unused. The answers come back - // in the two registers. - sec, usec, err := gettimeofday(tv) - tv.Sec = sec - tv.Usec = usec - return err -} - func SetKevent(k *Kevent_t, fd, mode, flags int) { k.Ident = uint64(fd) k.Filter = int16(mode) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 942a4bbf746..5b3af2e6a21 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -82,21 +82,18 @@ func IoctlRetInt(fd int, req uint) (int, error) { return int(ret), nil } -// IoctlSetPointerInt performs an ioctl operation which sets an -// integer value on fd, using the specified request number. The ioctl -// argument is called with a pointer to the integer value, rather than -// passing the integer value directly. -func IoctlSetPointerInt(fd int, req uint, value int) error { - v := int32(value) - return ioctl(fd, req, uintptr(unsafe.Pointer(&v))) -} - func IoctlSetRTCTime(fd int, value *RTCTime) error { err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value))) runtime.KeepAlive(value) return err } +func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error { + err := ioctl(fd, RTC_WKALM_SET, uintptr(unsafe.Pointer(value))) + runtime.KeepAlive(value) + return err +} + func IoctlGetUint32(fd int, req uint) (uint32, error) { var value uint32 err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) @@ -109,6 +106,12 @@ func IoctlGetRTCTime(fd int) (*RTCTime, error) { return &value, err } +func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) { + var value RTCWkAlrm + err := ioctl(fd, RTC_WKALM_RD, uintptr(unsafe.Pointer(&value))) + return &value, err +} + //sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) func Link(oldpath string, newpath string) (err error) { @@ -873,6 +876,35 @@ func (sa *SockaddrL2TPIP6) sockaddr() (unsafe.Pointer, _Socklen, error) { return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil } +// SockaddrIUCV implements the Sockaddr interface for AF_IUCV sockets. +type SockaddrIUCV struct { + UserID string + Name string + raw RawSockaddrIUCV +} + +func (sa *SockaddrIUCV) sockaddr() (unsafe.Pointer, _Socklen, error) { + sa.raw.Family = AF_IUCV + // These are EBCDIC encoded by the kernel, but we still need to pad them + // with blanks. Initializing with blanks allows the caller to feed in either + // a padded or an unpadded string. + for i := 0; i < 8; i++ { + sa.raw.Nodeid[i] = ' ' + sa.raw.User_id[i] = ' ' + sa.raw.Name[i] = ' ' + } + if len(sa.UserID) > 8 || len(sa.Name) > 8 { + return nil, 0, EINVAL + } + for i, b := range []byte(sa.UserID[:]) { + sa.raw.User_id[i] = int8(b) + } + for i, b := range []byte(sa.Name[:]) { + sa.raw.Name[i] = int8(b) + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrIUCV, nil +} + func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { switch rsa.Addr.Family { case AF_NETLINK: @@ -1053,6 +1085,38 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { } return sa, nil + case AF_IUCV: + pp := (*RawSockaddrIUCV)(unsafe.Pointer(rsa)) + + var user [8]byte + var name [8]byte + + for i := 0; i < 8; i++ { + user[i] = byte(pp.User_id[i]) + name[i] = byte(pp.Name[i]) + } + + sa := &SockaddrIUCV{ + UserID: string(user[:]), + Name: string(name[:]), + } + return sa, nil + + case AF_CAN: + pp := (*RawSockaddrCAN)(unsafe.Pointer(rsa)) + sa := &SockaddrCAN{ + Ifindex: int(pp.Ifindex), + } + rx := (*[4]byte)(unsafe.Pointer(&sa.RxID)) + for i := 0; i < 4; i++ { + rx[i] = pp.Addr[i] + } + tx := (*[4]byte)(unsafe.Pointer(&sa.TxID)) + for i := 0; i < 4; i++ { + tx[i] = pp.Addr[i+4] + } + return sa, nil + } return nil, EAFNOSUPPORT } @@ -1938,11 +2002,30 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) { return int(n), nil } +func isGroupMember(gid int) bool { + groups, err := Getgroups() + if err != nil { + return false + } + + for _, g := range groups { + if g == gid { + return true + } + } + return false +} + //sys faccessat(dirfd int, path string, mode uint32) (err error) +//sys Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { - if flags & ^(AT_SYMLINK_NOFOLLOW|AT_EACCESS) != 0 { - return EINVAL + if flags == 0 { + return faccessat(dirfd, path, mode) + } + + if err := Faccessat2(dirfd, path, mode, flags); err != ENOSYS && err != EPERM { + return err } // The Linux kernel faccessat system call does not take any flags. @@ -1951,8 +2034,8 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { // Because people naturally expect syscall.Faccessat to act // like C faccessat, we do the same. - if flags == 0 { - return faccessat(dirfd, path, mode) + if flags & ^(AT_SYMLINK_NOFOLLOW|AT_EACCESS) != 0 { + return EINVAL } var st Stat_t @@ -1995,7 +2078,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { gid = Getgid() } - if uint32(gid) == st.Gid { + if uint32(gid) == st.Gid || isGroupMember(gid) { fmode = (st.Mode >> 3) & 7 } else { fmode = st.Mode & 7 @@ -2096,6 +2179,18 @@ func Klogset(typ int, arg int) (err error) { return nil } +// RemoteIovec is Iovec with the pointer replaced with an integer. +// It is used for ProcessVMReadv and ProcessVMWritev, where the pointer +// refers to a location in a different process' address space, which +// would confuse the Go garbage collector. +type RemoteIovec struct { + Base uintptr + Len int +} + +//sys ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV +//sys ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV + /* * Unimplemented */ diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go index e1913e2c934..496837b1e37 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -7,7 +7,6 @@ package unix import ( - "syscall" "unsafe" ) @@ -49,10 +48,6 @@ func Pipe2(p []int, flags int) (err error) { return } -// Underlying system call writes to newoffset via pointer. -// Implemented in assembly to avoid allocation. -func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) - func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { newoffset, errno := seek(fd, offset, whence) if errno != 0 { diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go new file mode 100644 index 00000000000..8c514c95ed4 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go @@ -0,0 +1,13 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm,!gccgo,linux + +package unix + +import "syscall" + +// Underlying system call writes to newoffset via pointer. +// Implemented in assembly to avoid allocation. +func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go new file mode 100644 index 00000000000..30f285343ee --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go @@ -0,0 +1,35 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix + +func setTimespec(sec, nsec int64) Timespec { + return Timespec{Sec: sec, Nsec: nsec} +} + +func setTimeval(sec, usec int64) Timeval { + return Timeval{Sec: sec, Usec: usec} +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions +// of OpenBSD the syscall is called sysctl instead of __sysctl. +const SYS___SYSCTL = SYS_SYSCTL diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go index 84824587346..3689c808481 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go @@ -339,6 +339,12 @@ const ( CLOCK_UPTIME_FAST = 0x8 CLOCK_UPTIME_PRECISE = 0x7 CLOCK_VIRTUAL = 0x1 + CPUSTATES = 0x5 + CP_IDLE = 0x4 + CP_INTR = 0x3 + CP_NICE = 0x1 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go index 4acd101c3ee..b8f7c3c930a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go @@ -339,6 +339,12 @@ const ( CLOCK_UPTIME_FAST = 0x8 CLOCK_UPTIME_PRECISE = 0x7 CLOCK_VIRTUAL = 0x1 + CPUSTATES = 0x5 + CP_IDLE = 0x4 + CP_INTR = 0x3 + CP_NICE = 0x1 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go index e4719873b9e..be14bb1a4cd 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go @@ -339,6 +339,12 @@ const ( CLOCK_UPTIME_FAST = 0x8 CLOCK_UPTIME_PRECISE = 0x7 CLOCK_VIRTUAL = 0x1 + CPUSTATES = 0x5 + CP_IDLE = 0x4 + CP_INTR = 0x3 + CP_NICE = 0x1 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go index 5e49769d96a..7ce9c0081a8 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go @@ -339,6 +339,12 @@ const ( CLOCK_UPTIME_FAST = 0x8 CLOCK_UPTIME_PRECISE = 0x7 CLOCK_VIRTUAL = 0x1 + CPUSTATES = 0x5 + CP_IDLE = 0x4 + CP_INTR = 0x3 + CP_NICE = 0x1 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 6e3cfec46c9..e80d4e964bd 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -160,78 +160,28 @@ const ( BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 - BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff - BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 BPF_ALU = 0x4 BPF_ALU64 = 0x7 BPF_AND = 0x50 - BPF_ANY = 0x0 BPF_ARSH = 0xc0 BPF_B = 0x10 BPF_BUILD_ID_SIZE = 0x14 BPF_CALL = 0x80 - BPF_DEVCG_ACC_MKNOD = 0x1 - BPF_DEVCG_ACC_READ = 0x2 - BPF_DEVCG_ACC_WRITE = 0x4 - BPF_DEVCG_DEV_BLOCK = 0x1 - BPF_DEVCG_DEV_CHAR = 0x2 BPF_DIV = 0x30 BPF_DW = 0x18 BPF_END = 0xd0 - BPF_EXIST = 0x2 BPF_EXIT = 0x90 - BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1 - BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4 - BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2 BPF_FROM_BE = 0x8 BPF_FROM_LE = 0x0 BPF_FS_MAGIC = 0xcafe4a11 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 - BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 - BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 - BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 - BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 BPF_F_ALLOW_MULTI = 0x2 BPF_F_ALLOW_OVERRIDE = 0x1 BPF_F_ANY_ALIGNMENT = 0x2 - BPF_F_CLONE = 0x200 - BPF_F_CTXLEN_MASK = 0xfffff00000000 - BPF_F_CURRENT_CPU = 0xffffffff - BPF_F_CURRENT_NETNS = -0x1 - BPF_F_DONT_FRAGMENT = 0x4 - BPF_F_FAST_STACK_CMP = 0x200 - BPF_F_HDR_FIELD_MASK = 0xf - BPF_F_INDEX_MASK = 0xffffffff - BPF_F_INGRESS = 0x1 - BPF_F_INVALIDATE_HASH = 0x2 - BPF_F_LOCK = 0x4 - BPF_F_MARK_ENFORCE = 0x40 - BPF_F_MARK_MANGLED_0 = 0x20 - BPF_F_MMAPABLE = 0x400 - BPF_F_NO_COMMON_LRU = 0x2 - BPF_F_NO_PREALLOC = 0x1 - BPF_F_NUMA_NODE = 0x4 - BPF_F_PSEUDO_HDR = 0x10 BPF_F_QUERY_EFFECTIVE = 0x1 - BPF_F_RDONLY = 0x8 - BPF_F_RDONLY_PROG = 0x80 - BPF_F_RECOMPUTE_CSUM = 0x1 BPF_F_REPLACE = 0x4 - BPF_F_REUSE_STACKID = 0x400 - BPF_F_SEQ_NUMBER = 0x8 - BPF_F_SKIP_FIELD_MASK = 0xff - BPF_F_STACK_BUILD_ID = 0x20 BPF_F_STRICT_ALIGNMENT = 0x1 - BPF_F_SYSCTL_BASE_NAME = 0x1 BPF_F_TEST_RND_HI32 = 0x4 BPF_F_TEST_STATE_FREQ = 0x8 - BPF_F_TUNINFO_IPV6 = 0x1 - BPF_F_USER_BUILD_ID = 0x800 - BPF_F_USER_STACK = 0x100 - BPF_F_WRONLY = 0x10 - BPF_F_WRONLY_PROG = 0x100 - BPF_F_ZERO_CSUM_TX = 0x2 - BPF_F_ZERO_SEED = 0x40 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 @@ -267,7 +217,6 @@ const ( BPF_MUL = 0x20 BPF_NEG = 0x80 BPF_NET_OFF = -0x100000 - BPF_NOEXIST = 0x1 BPF_OBJ_NAME_LEN = 0x10 BPF_OR = 0x40 BPF_PSEUDO_CALL = 0x1 @@ -275,12 +224,6 @@ const ( BPF_PSEUDO_MAP_VALUE = 0x2 BPF_RET = 0x6 BPF_RSH = 0x70 - BPF_SK_STORAGE_GET_F_CREATE = 0x1 - BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf - BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 - BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 - BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 - BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 BPF_ST = 0x2 BPF_STX = 0x3 BPF_SUB = 0x10 @@ -322,6 +265,7 @@ const ( CAP_AUDIT_READ = 0x25 CAP_AUDIT_WRITE = 0x1d CAP_BLOCK_SUSPEND = 0x24 + CAP_BPF = 0x27 CAP_CHOWN = 0x0 CAP_DAC_OVERRIDE = 0x1 CAP_DAC_READ_SEARCH = 0x2 @@ -330,7 +274,7 @@ const ( CAP_IPC_LOCK = 0xe CAP_IPC_OWNER = 0xf CAP_KILL = 0x5 - CAP_LAST_CAP = 0x25 + CAP_LAST_CAP = 0x27 CAP_LEASE = 0x1c CAP_LINUX_IMMUTABLE = 0x9 CAP_MAC_ADMIN = 0x21 @@ -340,6 +284,7 @@ const ( CAP_NET_BIND_SERVICE = 0xa CAP_NET_BROADCAST = 0xb CAP_NET_RAW = 0xd + CAP_PERFMON = 0x26 CAP_SETFCAP = 0x1f CAP_SETGID = 0x6 CAP_SETPCAP = 0x8 @@ -378,12 +323,14 @@ const ( CLOCK_TXINT = 0x3 CLONE_ARGS_SIZE_VER0 = 0x40 CLONE_ARGS_SIZE_VER1 = 0x50 + CLONE_ARGS_SIZE_VER2 = 0x58 CLONE_CHILD_CLEARTID = 0x200000 CLONE_CHILD_SETTID = 0x1000000 CLONE_CLEAR_SIGHAND = 0x100000000 CLONE_DETACHED = 0x400000 CLONE_FILES = 0x400 CLONE_FS = 0x200 + CLONE_INTO_CGROUP = 0x200000000 CLONE_IO = 0x80000000 CLONE_NEWCGROUP = 0x2000000 CLONE_NEWIPC = 0x8000000 @@ -427,8 +374,54 @@ const ( DEVLINK_GENL_NAME = "devlink" DEVLINK_GENL_VERSION = 0x1 DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14 + DEVMEM_MAGIC = 0x454d444d DEVPTS_SUPER_MAGIC = 0x1cd1 DMA_BUF_MAGIC = 0x444d4142 + DM_ACTIVE_PRESENT_FLAG = 0x20 + DM_BUFFER_FULL_FLAG = 0x100 + DM_CONTROL_NODE = "control" + DM_DATA_OUT_FLAG = 0x10000 + DM_DEFERRED_REMOVE = 0x20000 + DM_DEV_ARM_POLL = 0xc138fd10 + DM_DEV_CREATE = 0xc138fd03 + DM_DEV_REMOVE = 0xc138fd04 + DM_DEV_RENAME = 0xc138fd05 + DM_DEV_SET_GEOMETRY = 0xc138fd0f + DM_DEV_STATUS = 0xc138fd07 + DM_DEV_SUSPEND = 0xc138fd06 + DM_DEV_WAIT = 0xc138fd08 + DM_DIR = "mapper" + DM_GET_TARGET_VERSION = 0xc138fd11 + DM_INACTIVE_PRESENT_FLAG = 0x40 + DM_INTERNAL_SUSPEND_FLAG = 0x40000 + DM_IOCTL = 0xfd + DM_LIST_DEVICES = 0xc138fd02 + DM_LIST_VERSIONS = 0xc138fd0d + DM_MAX_TYPE_NAME = 0x10 + DM_NAME_LEN = 0x80 + DM_NOFLUSH_FLAG = 0x800 + DM_PERSISTENT_DEV_FLAG = 0x8 + DM_QUERY_INACTIVE_TABLE_FLAG = 0x1000 + DM_READONLY_FLAG = 0x1 + DM_REMOVE_ALL = 0xc138fd01 + DM_SECURE_DATA_FLAG = 0x8000 + DM_SKIP_BDGET_FLAG = 0x200 + DM_SKIP_LOCKFS_FLAG = 0x400 + DM_STATUS_TABLE_FLAG = 0x10 + DM_SUSPEND_FLAG = 0x2 + DM_TABLE_CLEAR = 0xc138fd0a + DM_TABLE_DEPS = 0xc138fd0b + DM_TABLE_LOAD = 0xc138fd09 + DM_TABLE_STATUS = 0xc138fd0c + DM_TARGET_MSG = 0xc138fd0e + DM_UEVENT_GENERATED_FLAG = 0x2000 + DM_UUID_FLAG = 0x4000 + DM_UUID_LEN = 0x81 + DM_VERSION = 0xc138fd00 + DM_VERSION_EXTRA = "-ioctl (2020-02-27)" + DM_VERSION_MAJOR = 0x4 + DM_VERSION_MINOR = 0x2a + DM_VERSION_PATCHLEVEL = 0x0 DT_BLK = 0x6 DT_CHR = 0x2 DT_DIR = 0x4 @@ -530,6 +523,7 @@ const ( ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 + ETH_P_MRP = 0x88e3 ETH_P_MVRP = 0x88f5 ETH_P_NCSI = 0x88f8 ETH_P_NSH = 0x894f @@ -598,7 +592,9 @@ const ( FAN_DELETE = 0x200 FAN_DELETE_SELF = 0x400 FAN_DENY = 0x2 + FAN_DIR_MODIFY = 0x80000 FAN_ENABLE_AUDIT = 0x40 + FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2 FAN_EVENT_INFO_TYPE_FID = 0x1 FAN_EVENT_METADATA_LEN = 0x18 FAN_EVENT_ON_CHILD = 0x8000000 @@ -655,8 +651,9 @@ const ( FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0 FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1 FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3 - FSCRYPT_POLICY_FLAGS_VALID = 0xf + FSCRYPT_POLICY_FLAGS_VALID = 0x1f FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4 + FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32 = 0x10 FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8 FSCRYPT_POLICY_V1 = 0x0 FSCRYPT_POLICY_V2 = 0x2 @@ -685,7 +682,7 @@ const ( FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_MASK = 0x3 - FS_POLICY_FLAGS_VALID = 0xf + FS_POLICY_FLAGS_VALID = 0x1f FS_VERITY_FL = 0x100000 FS_VERITY_HASH_ALG_SHA256 = 0x1 FS_VERITY_HASH_ALG_SHA512 = 0x2 @@ -887,6 +884,7 @@ const ( IPPROTO_EGP = 0x8 IPPROTO_ENCAP = 0x62 IPPROTO_ESP = 0x32 + IPPROTO_ETHERNET = 0x8f IPPROTO_FRAGMENT = 0x2c IPPROTO_GRE = 0x2f IPPROTO_HOPOPTS = 0x0 @@ -900,6 +898,7 @@ const ( IPPROTO_L2TP = 0x73 IPPROTO_MH = 0x87 IPPROTO_MPLS = 0x89 + IPPROTO_MPTCP = 0x106 IPPROTO_MTP = 0x5c IPPROTO_NONE = 0x3b IPPROTO_PIM = 0x67 @@ -1069,6 +1068,7 @@ const ( KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 KEYCTL_CAPS0_PUBLIC_KEY = 0x8 KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 + KEYCTL_CAPS1_NOTIFICATIONS = 0x4 KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 KEYCTL_CAPS1_NS_KEY_TAG = 0x2 KEYCTL_CHOWN = 0x4 @@ -1106,6 +1106,7 @@ const ( KEYCTL_SUPPORTS_VERIFY = 0x8 KEYCTL_UNLINK = 0x9 KEYCTL_UPDATE = 0x2 + KEYCTL_WATCH_KEY = 0x20 KEY_REQKEY_DEFL_DEFAULT = 0x0 KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 KEY_REQKEY_DEFL_NO_CHANGE = -0x1 @@ -1149,6 +1150,8 @@ const ( LOOP_SET_FD = 0x4c00 LOOP_SET_STATUS = 0x4c02 LOOP_SET_STATUS64 = 0x4c04 + LOOP_SET_STATUS_CLEARABLE_FLAGS = 0x4 + LOOP_SET_STATUS_SETTABLE_FLAGS = 0xc LO_KEY_SIZE = 0x20 LO_NAME_SIZE = 0x40 MADV_COLD = 0x14 @@ -2045,8 +2048,10 @@ const ( STATX_ATTR_APPEND = 0x20 STATX_ATTR_AUTOMOUNT = 0x1000 STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_DAX = 0x2000 STATX_ATTR_ENCRYPTED = 0x800 STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_MOUNT_ROOT = 0x2000 STATX_ATTR_NODUMP = 0x40 STATX_ATTR_VERITY = 0x100000 STATX_BASIC_STATS = 0x7ff @@ -2055,6 +2060,7 @@ const ( STATX_CTIME = 0x80 STATX_GID = 0x10 STATX_INO = 0x100 + STATX_MNT_ID = 0x1000 STATX_MODE = 0x2 STATX_MTIME = 0x40 STATX_NLINK = 0x4 @@ -2108,8 +2114,6 @@ const ( TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 - TCP_BPF_IW = 0x3e9 - TCP_BPF_SNDCWND_CLAMP = 0x3ea TCP_CC_INFO = 0x1a TCP_CM_INQ = 0x24 TCP_CONGESTION = 0xd @@ -2384,8 +2388,9 @@ const ( XDP_COPY = 0x2 XDP_FLAGS_DRV_MODE = 0x4 XDP_FLAGS_HW_MODE = 0x8 - XDP_FLAGS_MASK = 0xf + XDP_FLAGS_MASK = 0x1f XDP_FLAGS_MODES = 0xe + XDP_FLAGS_REPLACE = 0x10 XDP_FLAGS_SKB_MODE = 0x2 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 XDP_MMAP_OFFSETS = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 5e974110d9a..11b25f68c26 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -75,8 +75,10 @@ const ( FP_XSTATE_MAGIC2 = 0x46505845 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80046601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SETFLAGS = 0x40046602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0xc F_GETLK64 = 0xc diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 47a57fe4688..f92cff6ea0d 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -75,8 +75,10 @@ const ( FP_XSTATE_MAGIC2 = 0x46505845 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SETFLAGS = 0x40086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0x5 F_GETLK64 = 0x5 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index df2eea4bb7b..12bcbf88d69 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -74,8 +74,10 @@ const ( FLUSHO = 0x1000 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80046601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SETFLAGS = 0x40046602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0xc F_GETLK64 = 0xc diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 4e1214217f2..84f71e99fea 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -77,8 +77,10 @@ const ( FPSIMD_MAGIC = 0x46508001 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SETFLAGS = 0x40086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0x5 F_GETLK64 = 0x5 @@ -190,6 +192,7 @@ const ( PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f PPPIOCXFERUNIT = 0x744e + PROT_BTI = 0x10 PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_SYSEMU = 0x1f PTRACE_SYSEMU_SINGLESTEP = 0x20 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index a23b08029a9..eeadea943f3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -74,8 +74,10 @@ const ( FLUSHO = 0x2000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40046601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SETFLAGS = 0x80046602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0x21 F_GETLK64 = 0x21 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index a5a921e43b8..0be6c4ccc0e 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -74,8 +74,10 @@ const ( FLUSHO = 0x2000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40086601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SETFLAGS = 0x80086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0xe F_GETLK64 = 0xe diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index d088e197bd4..0880b745c10 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -74,8 +74,10 @@ const ( FLUSHO = 0x2000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40086601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SETFLAGS = 0x80086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0xe F_GETLK64 = 0xe diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 0ddf9d5fe86..c8a66627aa4 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -74,8 +74,10 @@ const ( FLUSHO = 0x2000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40046601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SETFLAGS = 0x80046602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0x21 F_GETLK64 = 0x21 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index a93ffc18072..97aae63f16c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -74,8 +74,10 @@ const ( FLUSHO = 0x800000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40086601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SETFLAGS = 0x80086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0x5 F_GETLK64 = 0xc diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index c1ea48b95fd..b0c3b0664f4 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -74,8 +74,10 @@ const ( FLUSHO = 0x800000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40086601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SETFLAGS = 0x80086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0x5 F_GETLK64 = 0xc diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 7def950ba51..0c051819355 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -74,8 +74,10 @@ const ( FLUSHO = 0x1000 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SETFLAGS = 0x40086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0x5 F_GETLK64 = 0x5 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index d39293c8717..0b96bd462e9 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -74,8 +74,10 @@ const ( FLUSHO = 0x1000 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 + FS_IOC_SETFLAGS = 0x40086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0x5 F_GETLK64 = 0x5 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index 3ff3ec681b0..bd5c3057796 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -78,8 +78,10 @@ const ( FLUSHO = 0x1000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40086601 + FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 + FS_IOC_SETFLAGS = 0x80086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0x7 F_GETLK64 = 0x7 diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go index 96b9b8ab300..20f3a5799fd 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go @@ -158,6 +158,12 @@ const ( CLONE_SIGHAND = 0x800 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 + CPUSTATES = 0x5 + CP_IDLE = 0x4 + CP_INTR = 0x3 + CP_NICE = 0x1 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go index ed522a84e84..90b8fcd29c5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go @@ -158,6 +158,12 @@ const ( CLONE_SIGHAND = 0x800 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 + CPUSTATES = 0x5 + CP_IDLE = 0x4 + CP_INTR = 0x3 + CP_NICE = 0x1 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go index c8d36fe998e..c5c03993b67 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go @@ -150,6 +150,12 @@ const ( BRKINT = 0x2 CFLUSH = 0xf CLOCAL = 0x8000 + CPUSTATES = 0x5 + CP_IDLE = 0x4 + CP_INTR = 0x3 + CP_NICE = 0x1 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go index f1c146a74c9..14dd3c1d1ee 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go @@ -158,6 +158,12 @@ const ( CLONE_SIGHAND = 0x800 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 + CPUSTATES = 0x5 + CP_IDLE = 0x4 + CP_INTR = 0x3 + CP_NICE = 0x1 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go index 5402bd55ce1..c865a10df44 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go @@ -146,6 +146,13 @@ const ( BRKINT = 0x2 CFLUSH = 0xf CLOCAL = 0x8000 + CPUSTATES = 0x6 + CP_IDLE = 0x5 + CP_INTR = 0x4 + CP_NICE = 0x1 + CP_SPIN = 0x3 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go index ffaf2d2f9f2..9db6b2fb6e2 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go @@ -153,6 +153,13 @@ const ( CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x4 CLOCK_UPTIME = 0x5 + CPUSTATES = 0x6 + CP_IDLE = 0x5 + CP_INTR = 0x4 + CP_NICE = 0x1 + CP_SPIN = 0x3 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go index 7aa796a642b..7072526a640 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go @@ -146,6 +146,13 @@ const ( BRKINT = 0x2 CFLUSH = 0xf CLOCAL = 0x8000 + CPUSTATES = 0x6 + CP_IDLE = 0x5 + CP_INTR = 0x4 + CP_NICE = 0x1 + CP_SPIN = 0x3 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go index 1792d3f13e6..ac5efbe5ac7 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go @@ -156,6 +156,13 @@ const ( CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x4 CLOCK_UPTIME = 0x5 + CPUSTATES = 0x6 + CP_IDLE = 0x5 + CP_INTR = 0x4 + CP_NICE = 0x1 + CP_SPIN = 0x3 + CP_SYS = 0x2 + CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go new file mode 100644 index 00000000000..a74639a46fb --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go @@ -0,0 +1,1862 @@ +// mkerrors.sh -m64 +// Code generated by the command above; see README.md. DO NOT EDIT. + +// +build mips64,openbsd + +// Code generated by cmd/cgo -godefs; DO NOT EDIT. +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_BLUETOOTH = 0x20 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_ENCAP = 0x1c + AF_HYLINK = 0xf + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_KEY = 0x1e + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x24 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SIP = 0x1d + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ALTWERASE = 0x200 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRFILT = 0x4004427c + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc010427b + BIOCGETIF = 0x4020426b + BIOCGFILDROP = 0x40044278 + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044273 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x20004276 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDIRFILT = 0x8004427d + BIOCSDLT = 0x8004427a + BIOCSETF = 0x80104267 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x80104277 + BIOCSFILDROP = 0x80044279 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044272 + BIOCSRTIMEOUT = 0x8010426d + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIRECTION_IN = 0x1 + BPF_DIRECTION_OUT = 0x2 + BPF_DIV = 0x30 + BPF_FILDROP_CAPTURE = 0x1 + BPF_FILDROP_DROP = 0x2 + BPF_FILDROP_PASS = 0x0 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x200000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLOCK_BOOTTIME = 0x6 + CLOCK_MONOTONIC = 0x3 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_THREAD_CPUTIME_ID = 0x4 + CLOCK_UPTIME = 0x5 + CPUSTATES = 0x6 + CP_IDLE = 0x5 + CP_INTR = 0x4 + CP_NICE = 0x1 + CP_SPIN = 0x3 + CP_SYS = 0x2 + CP_USER = 0x0 + CREAD = 0x800 + CRTSCTS = 0x10000 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0xff + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DIOCADDQUEUE = 0xc110445d + DIOCADDRULE = 0xcd604404 + DIOCADDSTATE = 0xc1084425 + DIOCCHANGERULE = 0xcd60441a + DIOCCLRIFFLAG = 0xc028445a + DIOCCLRSRCNODES = 0x20004455 + DIOCCLRSTATES = 0xc0e04412 + DIOCCLRSTATUS = 0xc0284416 + DIOCGETLIMIT = 0xc0084427 + DIOCGETQSTATS = 0xc1204460 + DIOCGETQUEUE = 0xc110445f + DIOCGETQUEUES = 0xc110445e + DIOCGETRULE = 0xcd604407 + DIOCGETRULES = 0xcd604406 + DIOCGETRULESET = 0xc444443b + DIOCGETRULESETS = 0xc444443a + DIOCGETSRCNODES = 0xc0104454 + DIOCGETSTATE = 0xc1084413 + DIOCGETSTATES = 0xc0104419 + DIOCGETSTATUS = 0xc1e84415 + DIOCGETSYNFLWATS = 0xc0084463 + DIOCGETTIMEOUT = 0xc008441e + DIOCIGETIFACES = 0xc0284457 + DIOCKILLSRCNODES = 0xc080445b + DIOCKILLSTATES = 0xc0e04429 + DIOCNATLOOK = 0xc0504417 + DIOCOSFPADD = 0xc088444f + DIOCOSFPFLUSH = 0x2000444e + DIOCOSFPGET = 0xc0884450 + DIOCRADDADDRS = 0xc4504443 + DIOCRADDTABLES = 0xc450443d + DIOCRCLRADDRS = 0xc4504442 + DIOCRCLRASTATS = 0xc4504448 + DIOCRCLRTABLES = 0xc450443c + DIOCRCLRTSTATS = 0xc4504441 + DIOCRDELADDRS = 0xc4504444 + DIOCRDELTABLES = 0xc450443e + DIOCRGETADDRS = 0xc4504446 + DIOCRGETASTATS = 0xc4504447 + DIOCRGETTABLES = 0xc450443f + DIOCRGETTSTATS = 0xc4504440 + DIOCRINADEFINE = 0xc450444d + DIOCRSETADDRS = 0xc4504445 + DIOCRSETTFLAGS = 0xc450444a + DIOCRTSTADDRS = 0xc4504449 + DIOCSETDEBUG = 0xc0044418 + DIOCSETHOSTID = 0xc0044456 + DIOCSETIFFLAG = 0xc0284459 + DIOCSETLIMIT = 0xc0084428 + DIOCSETREASS = 0xc004445c + DIOCSETSTATUSIF = 0xc0284414 + DIOCSETSYNCOOKIES = 0xc0014462 + DIOCSETSYNFLWATS = 0xc0084461 + DIOCSETTIMEOUT = 0xc008441d + DIOCSTART = 0x20004401 + DIOCSTOP = 0x20004402 + DIOCXBEGIN = 0xc0104451 + DIOCXCOMMIT = 0xc0104452 + DIOCXROLLBACK = 0xc0104453 + DLT_ARCNET = 0x7 + DLT_ATM_RFC1483 = 0xb + DLT_AX25 = 0x3 + DLT_CHAOS = 0x5 + DLT_C_HDLC = 0x68 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0xd + DLT_FDDI = 0xa + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_LOOP = 0xc + DLT_MPLS = 0xdb + DLT_NULL = 0x0 + DLT_OPENFLOW = 0x10b + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_SERIAL = 0x32 + DLT_PRONET = 0x4 + DLT_RAW = 0xe + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_USBPCAP = 0xf9 + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMT_TAGOVF = 0x1 + EMUL_ENABLED = 0x1 + EMUL_NATIVE = 0x2 + ENDRUNDISC = 0x9 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_AOE = 0x88a2 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LLDP = 0x88cc + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MACSEC = 0x88e5 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PBB = 0x88e7 + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_QINQ = 0x88a8 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOW = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_ALIGN = 0x2 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_DIX_LEN = 0x600 + ETHER_MAX_HARDMTU_LEN = 0xff9b + ETHER_MAX_LEN = 0x5ee + ETHER_MIN_LEN = 0x40 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = -0x3 + EVFILT_DEVICE = -0x8 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0x8 + EVFILT_TIMER = -0x7 + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EVL_ENCAPLEN = 0x4 + EVL_PRIO_BITS = 0xd + EVL_PRIO_MAX = 0x7 + EVL_VLID_MASK = 0xfff + EVL_VLID_MAX = 0xffe + EVL_VLID_MIN = 0x1 + EVL_VLID_NULL = 0x0 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xa + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETOWN = 0x5 + F_ISATTY = 0xb + F_OK = 0x0 + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + HW_MACHINE = 0x1 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8e52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_STATICARP = 0x20 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BLUETOOTH = 0xf8 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf7 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DUMMY = 0xf1 + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf3 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MBIM = 0xfa + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFLOW = 0xf9 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf2 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_HOST = 0x1 + IN_RFC3021_NET = 0xfffffffe + IN_RFC3021_NSHIFT = 0x1f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DIVERT = 0x102 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x103 + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_AUTH_LEVEL = 0x35 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_ESP_NETWORK_LEVEL = 0x37 + IPV6_ESP_TRANS_LEVEL = 0x36 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xfffffff + IPV6_FLOWLABEL_MASK = 0xfffff + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPCOMP_LEVEL = 0x3c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MINHOPCOUNT = 0x41 + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_OPTIONS = 0x1 + IPV6_PATHMTU = 0x2c + IPV6_PIPEX = 0x3f + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVDSTPORT = 0x40 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTABLE = 0x1021 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_AUTH_LEVEL = 0x14 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_ESP_NETWORK_LEVEL = 0x16 + IP_ESP_TRANS_LEVEL = 0x15 + IP_HDRINCL = 0x2 + IP_IPCOMP_LEVEL = 0x1d + IP_IPDEFTTL = 0x25 + IP_IPSECFLOWINFO = 0x24 + IP_IPSEC_LOCAL_AUTH = 0x1b + IP_IPSEC_LOCAL_CRED = 0x19 + IP_IPSEC_LOCAL_ID = 0x17 + IP_IPSEC_REMOTE_AUTH = 0x1c + IP_IPSEC_REMOTE_CRED = 0x1a + IP_IPSEC_REMOTE_ID = 0x18 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0xfff + IP_MF = 0x2000 + IP_MINTTL = 0x20 + IP_MIN_MEMBERSHIPS = 0xf + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PIPEX = 0x22 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVDSTPORT = 0x21 + IP_RECVIF = 0x1e + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVRTABLE = 0x23 + IP_RECVTTL = 0x1f + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RTABLE = 0x1021 + IP_SENDSRCADDR = 0x7 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IUCLC = 0x1000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 + LCNT_OVERLOAD_FLUSH = 0x6 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 + MAP_CONCEAL = 0x8000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_FLAGMASK = 0xfff7 + MAP_HASSEMAPHORE = 0x0 + MAP_INHERIT = 0x0 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_INHERIT_ZERO = 0x3 + MAP_NOEXTEND = 0x0 + MAP_NORESERVE = 0x0 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x0 + MAP_SHARED = 0x1 + MAP_STACK = 0x4000 + MAP_TRYFIXED = 0x0 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MNT_ASYNC = 0x40 + MNT_DEFEXPORTED = 0x200 + MNT_DELEXPORT = 0x20000 + MNT_DOOMED = 0x8000000 + MNT_EXPORTANON = 0x400 + MNT_EXPORTED = 0x100 + MNT_EXRDONLY = 0x80 + MNT_FORCE = 0x80000 + MNT_LAZY = 0x3 + MNT_LOCAL = 0x1000 + MNT_NOATIME = 0x8000 + MNT_NODEV = 0x10 + MNT_NOEXEC = 0x4 + MNT_NOPERM = 0x20 + MNT_NOSUID = 0x8 + MNT_NOWAIT = 0x2 + MNT_QUOTA = 0x2000 + MNT_RDONLY = 0x1 + MNT_RELOAD = 0x40000 + MNT_ROOTFS = 0x4000 + MNT_SOFTDEP = 0x4000000 + MNT_STALLED = 0x100000 + MNT_SWAPPABLE = 0x200000 + MNT_SYNCHRONOUS = 0x2 + MNT_UPDATE = 0x10000 + MNT_VISFLAGMASK = 0x400ffff + MNT_WAIT = 0x1 + MNT_WANTRDWR = 0x2000000 + MNT_WXALLOWED = 0x800 + MSG_BCAST = 0x100 + MSG_CMSG_CLOEXEC = 0x800 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_MCAST = 0x200 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x4 + MS_SYNC = 0x2 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFNAMES = 0x6 + NET_RT_MAXID = 0x7 + NET_RT_STATS = 0x4 + NET_RT_TABLE = 0x5 + NFDBITS = 0x20 + NOFLSH = 0x80000000 + NOKERNINFO = 0x2000000 + NOTE_ATTRIB = 0x8 + NOTE_CHANGE = 0x1 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EOF = 0x2 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRUNCATE = 0x80 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OLCUC = 0x20 + ONLCR = 0x2 + ONLRET = 0x80 + ONOCR = 0x40 + ONOEOT = 0x8 + OPOST = 0x1 + OXTABS = 0x4 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x10000 + O_CREAT = 0x200 + O_DIRECTORY = 0x20000 + O_DSYNC = 0x80 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x80 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PF_FLUSH = 0x1 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_MEMLOCK = 0x6 + RLIMIT_NOFILE = 0x8 + RLIMIT_NPROC = 0x7 + RLIMIT_RSS = 0x5 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BFD = 0xb + RTAX_BRD = 0x7 + RTAX_DNS = 0xc + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_LABEL = 0xa + RTAX_MAX = 0xf + RTAX_NETMASK = 0x2 + RTAX_SEARCH = 0xe + RTAX_SRC = 0x8 + RTAX_SRCMASK = 0x9 + RTAX_STATIC = 0xd + RTA_AUTHOR = 0x40 + RTA_BFD = 0x800 + RTA_BRD = 0x80 + RTA_DNS = 0x1000 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_LABEL = 0x400 + RTA_NETMASK = 0x4 + RTA_SEARCH = 0x4000 + RTA_SRC = 0x100 + RTA_SRCMASK = 0x200 + RTA_STATIC = 0x2000 + RTF_ANNOUNCE = 0x4000 + RTF_BFD = 0x1000000 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CACHED = 0x20000 + RTF_CLONED = 0x10000 + RTF_CLONING = 0x100 + RTF_CONNECTED = 0x800000 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x110fc08 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MPATH = 0x40000 + RTF_MPLS = 0x100000 + RTF_MULTICAST = 0x200 + RTF_PERMANENT_ARP = 0x2000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x2000 + RTF_REJECT = 0x8 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_USETRAILERS = 0x8000 + RTM_80211INFO = 0x15 + RTM_ADD = 0x1 + RTM_BFD = 0x12 + RTM_CHANGE = 0x3 + RTM_CHGADDRATTR = 0x14 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DESYNC = 0x10 + RTM_GET = 0x4 + RTM_IFANNOUNCE = 0xf + RTM_IFINFO = 0xe + RTM_INVALIDATE = 0x11 + RTM_LOSING = 0x5 + RTM_MAXSIZE = 0x800 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_PROPOSAL = 0x13 + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RT_TABLEID_BITS = 0x8 + RT_TABLEID_MASK = 0xff + RT_TABLEID_MAX = 0xff + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80286987 + SIOCATMARK = 0x40047307 + SIOCBRDGADD = 0x8060693c + SIOCBRDGADDL = 0x80606949 + SIOCBRDGADDS = 0x80606941 + SIOCBRDGARL = 0x808c694d + SIOCBRDGDADDR = 0x81286947 + SIOCBRDGDEL = 0x8060693d + SIOCBRDGDELS = 0x80606942 + SIOCBRDGFLUSH = 0x80606948 + SIOCBRDGFRL = 0x808c694e + SIOCBRDGGCACHE = 0xc0186941 + SIOCBRDGGFD = 0xc0186952 + SIOCBRDGGHT = 0xc0186951 + SIOCBRDGGIFFLGS = 0xc060693e + SIOCBRDGGMA = 0xc0186953 + SIOCBRDGGPARAM = 0xc0406958 + SIOCBRDGGPRI = 0xc0186950 + SIOCBRDGGRL = 0xc030694f + SIOCBRDGGTO = 0xc0186946 + SIOCBRDGIFS = 0xc0606942 + SIOCBRDGRTS = 0xc0206943 + SIOCBRDGSADDR = 0xc1286944 + SIOCBRDGSCACHE = 0x80186940 + SIOCBRDGSFD = 0x80186952 + SIOCBRDGSHT = 0x80186951 + SIOCBRDGSIFCOST = 0x80606955 + SIOCBRDGSIFFLGS = 0x8060693f + SIOCBRDGSIFPRIO = 0x80606954 + SIOCBRDGSIFPROT = 0x8060694a + SIOCBRDGSMA = 0x80186953 + SIOCBRDGSPRI = 0x80186950 + SIOCBRDGSPROTO = 0x8018695a + SIOCBRDGSTO = 0x80186945 + SIOCBRDGSTXHC = 0x80186959 + SIOCDELLABEL = 0x80206997 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80286989 + SIOCDIFPARENT = 0x802069b4 + SIOCDIFPHYADDR = 0x80206949 + SIOCDPWE3NEIGHBOR = 0x802069de + SIOCDVNETID = 0x802069af + SIOCGETKALIVE = 0xc01869a4 + SIOCGETLABEL = 0x8020699a + SIOCGETMPWCFG = 0xc02069ae + SIOCGETPFLOW = 0xc02069fe + SIOCGETPFSYNC = 0xc02069f8 + SIOCGETSGCNT = 0xc0207534 + SIOCGETVIFCNT = 0xc0287533 + SIOCGETVLAN = 0xc0206990 + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCONF = 0xc0106924 + SIOCGIFDATA = 0xc020691b + SIOCGIFDESCR = 0xc0206981 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGATTR = 0xc028698b + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGLIST = 0xc028698d + SIOCGIFGMEMB = 0xc028698a + SIOCGIFGROUP = 0xc0286988 + SIOCGIFHARDMTU = 0xc02069a5 + SIOCGIFLLPRIO = 0xc02069b6 + SIOCGIFMEDIA = 0xc0406938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc020697e + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPAIR = 0xc02069b1 + SIOCGIFPARENT = 0xc02069b3 + SIOCGIFPRIORITY = 0xc020699c + SIOCGIFRDOMAIN = 0xc02069a0 + SIOCGIFRTLABEL = 0xc0206983 + SIOCGIFRXR = 0x802069aa + SIOCGIFSFFPAGE = 0xc1126939 + SIOCGIFXFLAGS = 0xc020699e + SIOCGLIFPHYADDR = 0xc218694b + SIOCGLIFPHYDF = 0xc02069c2 + SIOCGLIFPHYECN = 0xc02069c8 + SIOCGLIFPHYRTABLE = 0xc02069a2 + SIOCGLIFPHYTTL = 0xc02069a9 + SIOCGPGRP = 0x40047309 + SIOCGPWE3 = 0xc0206998 + SIOCGPWE3CTRLWORD = 0xc02069dc + SIOCGPWE3FAT = 0xc02069dd + SIOCGPWE3NEIGHBOR = 0xc21869de + SIOCGRXHPRIO = 0xc02069db + SIOCGSPPPPARAMS = 0xc0206994 + SIOCGTXHPRIO = 0xc02069c6 + SIOCGUMBINFO = 0xc02069be + SIOCGUMBPARAM = 0xc02069c0 + SIOCGVH = 0xc02069f6 + SIOCGVNETFLOWID = 0xc02069c4 + SIOCGVNETID = 0xc02069a7 + SIOCIFAFATTACH = 0x801169ab + SIOCIFAFDETACH = 0x801169ac + SIOCIFCREATE = 0x8020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106978 + SIOCSETKALIVE = 0x801869a3 + SIOCSETLABEL = 0x80206999 + SIOCSETMPWCFG = 0x802069ad + SIOCSETPFLOW = 0x802069fd + SIOCSETPFSYNC = 0x802069f7 + SIOCSETVLAN = 0x8020698f + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFDESCR = 0x80206980 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGATTR = 0x8028698c + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020691f + SIOCSIFLLPRIO = 0x802069b5 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x8020697f + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPAIR = 0x802069b0 + SIOCSIFPARENT = 0x802069b2 + SIOCSIFPRIORITY = 0x8020699b + SIOCSIFRDOMAIN = 0x8020699f + SIOCSIFRTLABEL = 0x80206982 + SIOCSIFXFLAGS = 0x8020699d + SIOCSLIFPHYADDR = 0x8218694a + SIOCSLIFPHYDF = 0x802069c1 + SIOCSLIFPHYECN = 0x802069c7 + SIOCSLIFPHYRTABLE = 0x802069a1 + SIOCSLIFPHYTTL = 0x802069a8 + SIOCSPGRP = 0x80047308 + SIOCSPWE3CTRLWORD = 0x802069dc + SIOCSPWE3FAT = 0x802069dd + SIOCSPWE3NEIGHBOR = 0x821869de + SIOCSRXHPRIO = 0x802069db + SIOCSSPPPPARAMS = 0x80206993 + SIOCSTXHPRIO = 0x802069c5 + SIOCSUMBPARAM = 0x802069bf + SIOCSVH = 0xc02069f5 + SIOCSVNETFLOWID = 0x802069c3 + SIOCSVNETID = 0x802069a6 + SIOCSWGDPID = 0xc018695b + SIOCSWGMAXFLOW = 0xc0186960 + SIOCSWGMAXGROUP = 0xc018695d + SIOCSWSDPID = 0x8018695c + SIOCSWSPORTNO = 0xc060695f + SOCK_CLOEXEC = 0x8000 + SOCK_DGRAM = 0x2 + SOCK_DNS = 0x1000 + SOCK_NONBLOCK = 0x4000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BINDANY = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DOMAIN = 0x1024 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NETPROC = 0x1020 + SO_OOBINLINE = 0x100 + SO_PEERCRED = 0x1022 + SO_PROTOCOL = 0x1025 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RTABLE = 0x1021 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_SPLICE = 0x1023 + SO_TIMESTAMP = 0x800 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SO_ZEROIZE = 0x2000 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x1 + TCIOFF = 0x3 + TCIOFLUSH = 0x3 + TCION = 0x4 + TCOFLUSH = 0x2 + TCOOFF = 0x1 + TCOON = 0x2 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x3 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x4 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOPUSH = 0x10 + TCP_SACKHOLE_LIMIT = 0x80 + TCP_SACK_ENABLE = 0x8 + TCSAFLUSH = 0x2 + TIMER_ABSTIME = 0x1 + TIMER_RELTIME = 0x0 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCHKVERAUTH = 0x2000741e + TIOCCLRVERAUTH = 0x2000741d + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_PPS = 0x10 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGPGRP = 0x40047477 + TIOCGSID = 0x40047463 + TIOCGTSTAMP = 0x4010745b + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMODG = 0x4004746a + TIOCMODS = 0x8004746d + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSETVERAUTH = 0x8004741c + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x8004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTOP = 0x2000746f + TIOCSTSTAMP = 0x8008745a + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TIOCUCNTL_CBRK = 0x7a + TIOCUCNTL_SBRK = 0x7b + TOSTOP = 0x400000 + UTIME_NOW = -0x2 + UTIME_OMIT = -0x1 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VM_ANONMIN = 0x7 + VM_LOADAVG = 0x2 + VM_MALLOC_CONF = 0xc + VM_MAXID = 0xd + VM_MAXSLP = 0xa + VM_METER = 0x1 + VM_NKMEMPAGES = 0x6 + VM_PSSTRINGS = 0x3 + VM_SWAPENCRYPT = 0x5 + VM_USPACE = 0xb + VM_UVMEXP = 0x4 + VM_VNODEMIN = 0x9 + VM_VTEXTMIN = 0x8 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALTSIG = 0x4 + WCONTINUED = 0x8 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WUNTRACED = 0x2 + XCASE = 0x1000000 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x5c) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x58) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x59) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EIPSEC = syscall.Errno(0x52) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x5f) + ELOOP = syscall.Errno(0x3e) + EMEDIUMTYPE = syscall.Errno(0x56) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x53) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOMEDIUM = syscall.Errno(0x55) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5a) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x5d) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x5b) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x57) + EOWNERDEAD = syscall.Errno(0x5e) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5f) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errorList = [...]struct { + num syscall.Errno + name string + desc string +}{ + {1, "EPERM", "operation not permitted"}, + {2, "ENOENT", "no such file or directory"}, + {3, "ESRCH", "no such process"}, + {4, "EINTR", "interrupted system call"}, + {5, "EIO", "input/output error"}, + {6, "ENXIO", "device not configured"}, + {7, "E2BIG", "argument list too long"}, + {8, "ENOEXEC", "exec format error"}, + {9, "EBADF", "bad file descriptor"}, + {10, "ECHILD", "no child processes"}, + {11, "EDEADLK", "resource deadlock avoided"}, + {12, "ENOMEM", "cannot allocate memory"}, + {13, "EACCES", "permission denied"}, + {14, "EFAULT", "bad address"}, + {15, "ENOTBLK", "block device required"}, + {16, "EBUSY", "device busy"}, + {17, "EEXIST", "file exists"}, + {18, "EXDEV", "cross-device link"}, + {19, "ENODEV", "operation not supported by device"}, + {20, "ENOTDIR", "not a directory"}, + {21, "EISDIR", "is a directory"}, + {22, "EINVAL", "invalid argument"}, + {23, "ENFILE", "too many open files in system"}, + {24, "EMFILE", "too many open files"}, + {25, "ENOTTY", "inappropriate ioctl for device"}, + {26, "ETXTBSY", "text file busy"}, + {27, "EFBIG", "file too large"}, + {28, "ENOSPC", "no space left on device"}, + {29, "ESPIPE", "illegal seek"}, + {30, "EROFS", "read-only file system"}, + {31, "EMLINK", "too many links"}, + {32, "EPIPE", "broken pipe"}, + {33, "EDOM", "numerical argument out of domain"}, + {34, "ERANGE", "result too large"}, + {35, "EAGAIN", "resource temporarily unavailable"}, + {36, "EINPROGRESS", "operation now in progress"}, + {37, "EALREADY", "operation already in progress"}, + {38, "ENOTSOCK", "socket operation on non-socket"}, + {39, "EDESTADDRREQ", "destination address required"}, + {40, "EMSGSIZE", "message too long"}, + {41, "EPROTOTYPE", "protocol wrong type for socket"}, + {42, "ENOPROTOOPT", "protocol not available"}, + {43, "EPROTONOSUPPORT", "protocol not supported"}, + {44, "ESOCKTNOSUPPORT", "socket type not supported"}, + {45, "EOPNOTSUPP", "operation not supported"}, + {46, "EPFNOSUPPORT", "protocol family not supported"}, + {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, + {48, "EADDRINUSE", "address already in use"}, + {49, "EADDRNOTAVAIL", "can't assign requested address"}, + {50, "ENETDOWN", "network is down"}, + {51, "ENETUNREACH", "network is unreachable"}, + {52, "ENETRESET", "network dropped connection on reset"}, + {53, "ECONNABORTED", "software caused connection abort"}, + {54, "ECONNRESET", "connection reset by peer"}, + {55, "ENOBUFS", "no buffer space available"}, + {56, "EISCONN", "socket is already connected"}, + {57, "ENOTCONN", "socket is not connected"}, + {58, "ESHUTDOWN", "can't send after socket shutdown"}, + {59, "ETOOMANYREFS", "too many references: can't splice"}, + {60, "ETIMEDOUT", "operation timed out"}, + {61, "ECONNREFUSED", "connection refused"}, + {62, "ELOOP", "too many levels of symbolic links"}, + {63, "ENAMETOOLONG", "file name too long"}, + {64, "EHOSTDOWN", "host is down"}, + {65, "EHOSTUNREACH", "no route to host"}, + {66, "ENOTEMPTY", "directory not empty"}, + {67, "EPROCLIM", "too many processes"}, + {68, "EUSERS", "too many users"}, + {69, "EDQUOT", "disk quota exceeded"}, + {70, "ESTALE", "stale NFS file handle"}, + {71, "EREMOTE", "too many levels of remote in path"}, + {72, "EBADRPC", "RPC struct is bad"}, + {73, "ERPCMISMATCH", "RPC version wrong"}, + {74, "EPROGUNAVAIL", "RPC program not available"}, + {75, "EPROGMISMATCH", "program version wrong"}, + {76, "EPROCUNAVAIL", "bad procedure for program"}, + {77, "ENOLCK", "no locks available"}, + {78, "ENOSYS", "function not implemented"}, + {79, "EFTYPE", "inappropriate file type or format"}, + {80, "EAUTH", "authentication error"}, + {81, "ENEEDAUTH", "need authenticator"}, + {82, "EIPSEC", "IPsec processing failure"}, + {83, "ENOATTR", "attribute not found"}, + {84, "EILSEQ", "illegal byte sequence"}, + {85, "ENOMEDIUM", "no medium found"}, + {86, "EMEDIUMTYPE", "wrong medium type"}, + {87, "EOVERFLOW", "value too large to be stored in data type"}, + {88, "ECANCELED", "operation canceled"}, + {89, "EIDRM", "identifier removed"}, + {90, "ENOMSG", "no message of desired type"}, + {91, "ENOTSUP", "not supported"}, + {92, "EBADMSG", "bad message"}, + {93, "ENOTRECOVERABLE", "state not recoverable"}, + {94, "EOWNERDEAD", "previous owner died"}, + {95, "ELAST", "protocol error"}, +} + +// Signal table +var signalList = [...]struct { + num syscall.Signal + name string + desc string +}{ + {1, "SIGHUP", "hangup"}, + {2, "SIGINT", "interrupt"}, + {3, "SIGQUIT", "quit"}, + {4, "SIGILL", "illegal instruction"}, + {5, "SIGTRAP", "trace/BPT trap"}, + {6, "SIGABRT", "abort trap"}, + {7, "SIGEMT", "EMT trap"}, + {8, "SIGFPE", "floating point exception"}, + {9, "SIGKILL", "killed"}, + {10, "SIGBUS", "bus error"}, + {11, "SIGSEGV", "segmentation fault"}, + {12, "SIGSYS", "bad system call"}, + {13, "SIGPIPE", "broken pipe"}, + {14, "SIGALRM", "alarm clock"}, + {15, "SIGTERM", "terminated"}, + {16, "SIGURG", "urgent I/O condition"}, + {17, "SIGSTOP", "suspended (signal)"}, + {18, "SIGTSTP", "suspended"}, + {19, "SIGCONT", "continued"}, + {20, "SIGCHLD", "child exited"}, + {21, "SIGTTIN", "stopped (tty input)"}, + {22, "SIGTTOU", "stopped (tty output)"}, + {23, "SIGIO", "I/O possible"}, + {24, "SIGXCPU", "cputime limit exceeded"}, + {25, "SIGXFSZ", "filesize limit exceeded"}, + {26, "SIGVTALRM", "virtual timer expired"}, + {27, "SIGPROF", "profiling timer expired"}, + {28, "SIGWINCH", "window size changes"}, + {29, "SIGINFO", "information request"}, + {30, "SIGUSR1", "user defined signal 1"}, + {31, "SIGUSR2", "user defined signal 2"}, + {32, "SIGTHR", "thread AST"}, +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go index c1cc0a415fe..23e94d3663c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go @@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Gettimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getuid() (uid int) { r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) uid = int(r0) @@ -1709,18 +1719,6 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) { - r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) - sec = int32(r0) - usec = int32(r1) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go index a3fc4900412..e2ffb3bed33 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go @@ -1376,6 +1376,21 @@ func libc_getsid_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Gettimeofday(tp *Timeval) (err error) { + _, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_gettimeofday_trampoline() + +//go:linkname libc_gettimeofday libc_gettimeofday +//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0) uid = int(r0) @@ -2357,23 +2372,6 @@ func libc_ptrace_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) { - r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0) - sec = int32(r0) - usec = int32(r1) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -func libc_gettimeofday_trampoline() - -//go:linkname libc_gettimeofday libc_gettimeofday -//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go index f8e5c37c5ca..102561730ab 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go @@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Gettimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getuid() (uid int) { r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) uid = int(r0) @@ -1709,18 +1719,6 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { - r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) - sec = int64(r0) - usec = int32(r1) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index 50d6437e6b8..c67e336e2ab 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -1376,6 +1376,21 @@ func libc_getsid_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Gettimeofday(tp *Timeval) (err error) { + _, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_gettimeofday_trampoline() + +//go:linkname libc_gettimeofday libc_gettimeofday +//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0) uid = int(r0) @@ -2357,23 +2372,6 @@ func libc_ptrace_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { - r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0) - sec = int64(r0) - usec = int32(r1) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -func libc_gettimeofday_trampoline() - -//go:linkname libc_gettimeofday libc_gettimeofday -//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go index cea04e041c4..d34e6df2fe0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go @@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Gettimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getuid() (uid int) { r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) uid = int(r0) @@ -1682,18 +1692,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) { - r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) - sec = int32(r0) - usec = int32(r1) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go index 63103950ca7..b759757a77a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go @@ -1376,6 +1376,21 @@ func libc_getsid_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Gettimeofday(tp *Timeval) (err error) { + _, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_gettimeofday_trampoline() + +//go:linkname libc_gettimeofday libc_gettimeofday +//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0) uid = int(r0) @@ -2342,23 +2357,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) { - r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0) - sec = int32(r0) - usec = int32(r1) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -func libc_gettimeofday_trampoline() - -//go:linkname libc_gettimeofday libc_gettimeofday -//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go index 8c3bb3a25d1..8d39a09f721 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go @@ -966,6 +966,16 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Gettimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getuid() (uid int) { r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) uid = int(r0) @@ -1682,18 +1692,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { - r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) - sec = int64(r0) - usec = int32(r1) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index a8709f72dd7..b2886126003 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -1376,6 +1376,21 @@ func libc_getsid_trampoline() // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Gettimeofday(tp *Timeval) (err error) { + _, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +func libc_gettimeofday_trampoline() + +//go:linkname libc_gettimeofday libc_gettimeofday +//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0) uid = int(r0) @@ -2342,23 +2357,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { - r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0) - sec = int64(r0) - usec = int32(r1) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -func libc_gettimeofday_trampoline() - -//go:linkname libc_gettimeofday libc_gettimeofday -//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index df217825f06..4eec7a79537 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -1821,6 +1821,21 @@ func faccessat(dirfd int, path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) @@ -1847,6 +1862,52 @@ func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) { + var _p0 unsafe.Pointer + if len(localIov) > 0 { + _p0 = unsafe.Pointer(&localIov[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 unsafe.Pointer + if len(remoteIov) > 0 { + _p1 = unsafe.Pointer(&remoteIov[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PROCESS_VM_READV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) { + var _p0 unsafe.Pointer + if len(localIov) > 0 { + _p0 = unsafe.Pointer(&localIov[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + var _p1 unsafe.Pointer + if len(remoteIov) > 0 { + _p1 = unsafe.Pointer(&remoteIov[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PROCESS_VM_WRITEV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func pipe2(p *[2]_C_int, flags int) (err error) { _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go new file mode 100644 index 00000000000..ec6bd5bb73a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -0,0 +1,1692 @@ +// go run mksyscall.go -openbsd -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64.go +// Code generated by the command above; see README.md. DO NOT EDIT. + +// +build openbsd,mips64 + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, behav int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Msync(b []byte, flags int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(from int, to int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrtable() (rtable int, err error) { + r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0) + rtable = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifoat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(fromfd int, from string, tofd int, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrtable(rtable int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go index 37dcc74c2de..102f1ab4750 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go @@ -1,4 +1,4 @@ -// mksysctl_openbsd.pl +// go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. // +build 386,openbsd @@ -30,6 +30,7 @@ var sysctlMib = []mibentry{ {"hw.model", []_C_int{6, 2}}, {"hw.ncpu", []_C_int{6, 3}}, {"hw.ncpufound", []_C_int{6, 21}}, + {"hw.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, {"hw.physmem", []_C_int{6, 19}}, {"hw.product", []_C_int{6, 15}}, diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go index fe6caa6eb7f..4866fced8ae 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go @@ -31,6 +31,7 @@ var sysctlMib = []mibentry{ {"hw.model", []_C_int{6, 2}}, {"hw.ncpu", []_C_int{6, 3}}, {"hw.ncpufound", []_C_int{6, 21}}, + {"hw.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go index 6eb8c0b086a..d3801eb24b3 100644 --- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go @@ -30,6 +30,7 @@ var sysctlMib = []mibentry{ {"hw.model", []_C_int{6, 2}}, {"hw.ncpu", []_C_int{6, 3}}, {"hw.ncpufound", []_C_int{6, 21}}, + {"hw.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, {"hw.physmem", []_C_int{6, 19}}, {"hw.product", []_C_int{6, 15}}, diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go new file mode 100644 index 00000000000..aca34b34933 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go @@ -0,0 +1,279 @@ +// go run mksysctl_openbsd.go +// Code generated by the command above; DO NOT EDIT. + +// +build mips64,openbsd + +package unix + +type mibentry struct { + ctlname string + ctloid []_C_int +} + +var sysctlMib = []mibentry{ + {"ddb.console", []_C_int{9, 6}}, + {"ddb.log", []_C_int{9, 7}}, + {"ddb.max_line", []_C_int{9, 3}}, + {"ddb.max_width", []_C_int{9, 2}}, + {"ddb.panic", []_C_int{9, 5}}, + {"ddb.profile", []_C_int{9, 9}}, + {"ddb.radix", []_C_int{9, 1}}, + {"ddb.tab_stop_width", []_C_int{9, 4}}, + {"ddb.trigger", []_C_int{9, 8}}, + {"fs.posix.setuid", []_C_int{3, 1, 1}}, + {"hw.allowpowerdown", []_C_int{6, 22}}, + {"hw.byteorder", []_C_int{6, 4}}, + {"hw.cpuspeed", []_C_int{6, 12}}, + {"hw.diskcount", []_C_int{6, 10}}, + {"hw.disknames", []_C_int{6, 8}}, + {"hw.diskstats", []_C_int{6, 9}}, + {"hw.machine", []_C_int{6, 1}}, + {"hw.model", []_C_int{6, 2}}, + {"hw.ncpu", []_C_int{6, 3}}, + {"hw.ncpufound", []_C_int{6, 21}}, + {"hw.ncpuonline", []_C_int{6, 25}}, + {"hw.pagesize", []_C_int{6, 7}}, + {"hw.perfpolicy", []_C_int{6, 23}}, + {"hw.physmem", []_C_int{6, 19}}, + {"hw.product", []_C_int{6, 15}}, + {"hw.serialno", []_C_int{6, 17}}, + {"hw.setperf", []_C_int{6, 13}}, + {"hw.smt", []_C_int{6, 24}}, + {"hw.usermem", []_C_int{6, 20}}, + {"hw.uuid", []_C_int{6, 18}}, + {"hw.vendor", []_C_int{6, 14}}, + {"hw.version", []_C_int{6, 16}}, + {"kern.allowdt", []_C_int{1, 65}}, + {"kern.allowkmem", []_C_int{1, 52}}, + {"kern.argmax", []_C_int{1, 8}}, + {"kern.audio", []_C_int{1, 84}}, + {"kern.boottime", []_C_int{1, 21}}, + {"kern.bufcachepercent", []_C_int{1, 72}}, + {"kern.ccpu", []_C_int{1, 45}}, + {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consbuf", []_C_int{1, 83}}, + {"kern.consbufsize", []_C_int{1, 82}}, + {"kern.consdev", []_C_int{1, 75}}, + {"kern.cp_time", []_C_int{1, 40}}, + {"kern.cp_time2", []_C_int{1, 71}}, + {"kern.cpustats", []_C_int{1, 85}}, + {"kern.domainname", []_C_int{1, 22}}, + {"kern.file", []_C_int{1, 73}}, + {"kern.forkstat", []_C_int{1, 42}}, + {"kern.fscale", []_C_int{1, 46}}, + {"kern.fsync", []_C_int{1, 33}}, + {"kern.global_ptrace", []_C_int{1, 81}}, + {"kern.hostid", []_C_int{1, 11}}, + {"kern.hostname", []_C_int{1, 10}}, + {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}}, + {"kern.job_control", []_C_int{1, 19}}, + {"kern.malloc.buckets", []_C_int{1, 39, 1}}, + {"kern.malloc.kmemnames", []_C_int{1, 39, 3}}, + {"kern.maxclusters", []_C_int{1, 67}}, + {"kern.maxfiles", []_C_int{1, 7}}, + {"kern.maxlocksperuid", []_C_int{1, 70}}, + {"kern.maxpartitions", []_C_int{1, 23}}, + {"kern.maxproc", []_C_int{1, 6}}, + {"kern.maxthread", []_C_int{1, 25}}, + {"kern.maxvnodes", []_C_int{1, 5}}, + {"kern.mbstat", []_C_int{1, 59}}, + {"kern.msgbuf", []_C_int{1, 48}}, + {"kern.msgbufsize", []_C_int{1, 38}}, + {"kern.nchstats", []_C_int{1, 41}}, + {"kern.netlivelocks", []_C_int{1, 76}}, + {"kern.nfiles", []_C_int{1, 56}}, + {"kern.ngroups", []_C_int{1, 18}}, + {"kern.nosuidcoredump", []_C_int{1, 32}}, + {"kern.nprocs", []_C_int{1, 47}}, + {"kern.nselcoll", []_C_int{1, 43}}, + {"kern.nthreads", []_C_int{1, 26}}, + {"kern.numvnodes", []_C_int{1, 58}}, + {"kern.osrelease", []_C_int{1, 2}}, + {"kern.osrevision", []_C_int{1, 3}}, + {"kern.ostype", []_C_int{1, 1}}, + {"kern.osversion", []_C_int{1, 27}}, + {"kern.pfstatus", []_C_int{1, 86}}, + {"kern.pool_debug", []_C_int{1, 77}}, + {"kern.posix1version", []_C_int{1, 17}}, + {"kern.proc", []_C_int{1, 66}}, + {"kern.rawpartition", []_C_int{1, 24}}, + {"kern.saved_ids", []_C_int{1, 20}}, + {"kern.securelevel", []_C_int{1, 9}}, + {"kern.seminfo", []_C_int{1, 61}}, + {"kern.shminfo", []_C_int{1, 62}}, + {"kern.somaxconn", []_C_int{1, 28}}, + {"kern.sominconn", []_C_int{1, 29}}, + {"kern.splassert", []_C_int{1, 54}}, + {"kern.stackgap_random", []_C_int{1, 50}}, + {"kern.sysvipc_info", []_C_int{1, 51}}, + {"kern.sysvmsg", []_C_int{1, 34}}, + {"kern.sysvsem", []_C_int{1, 35}}, + {"kern.sysvshm", []_C_int{1, 36}}, + {"kern.timecounter.choice", []_C_int{1, 69, 4}}, + {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, + {"kern.timecounter.tick", []_C_int{1, 69, 1}}, + {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, + {"kern.timeout_stats", []_C_int{1, 87}}, + {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, + {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, + {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, + {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, + {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, + {"kern.ttycount", []_C_int{1, 57}}, + {"kern.utc_offset", []_C_int{1, 88}}, + {"kern.version", []_C_int{1, 4}}, + {"kern.watchdog.auto", []_C_int{1, 64, 2}}, + {"kern.watchdog.period", []_C_int{1, 64, 1}}, + {"kern.witnesswatch", []_C_int{1, 53}}, + {"kern.wxabort", []_C_int{1, 74}}, + {"net.bpf.bufsize", []_C_int{4, 31, 1}}, + {"net.bpf.maxbufsize", []_C_int{4, 31, 2}}, + {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}}, + {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}}, + {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}}, + {"net.inet.carp.log", []_C_int{4, 2, 112, 3}}, + {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}}, + {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}}, + {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}}, + {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}}, + {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}}, + {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}}, + {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}}, + {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}}, + {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}}, + {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}}, + {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}}, + {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}}, + {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}}, + {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}}, + {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}}, + {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}}, + {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}}, + {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}}, + {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}}, + {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}}, + {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}}, + {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}}, + {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, + {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, + {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}}, + {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}}, + {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}}, + {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}}, + {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}}, + {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}}, + {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}}, + {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}}, + {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}}, + {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, + {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, + {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, + {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}}, + {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}}, + {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}}, + {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}}, + {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}}, + {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}}, + {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}}, + {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}}, + {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}}, + {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}}, + {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}}, + {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}}, + {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}}, + {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, + {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, + {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, + {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, + {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, + {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, + {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}}, + {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}}, + {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}}, + {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}}, + {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}}, + {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}}, + {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}}, + {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}}, + {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}}, + {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}}, + {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}}, + {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}}, + {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}}, + {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}}, + {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}}, + {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}}, + {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}}, + {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}}, + {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}}, + {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, + {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, + {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}}, + {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}}, + {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}}, + {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}}, + {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}}, + {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}}, + {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}}, + {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}}, + {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}}, + {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}}, + {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}}, + {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}}, + {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}}, + {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}}, + {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}}, + {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}}, + {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}}, + {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, + {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}}, + {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}}, + {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}}, + {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}}, + {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}}, + {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}}, + {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}}, + {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}}, + {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}}, + {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}}, + {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}}, + {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}}, + {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}}, + {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, + {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, + {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}}, + {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}}, + {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}}, + {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}}, + {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}}, + {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}}, + {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}}, + {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}}, + {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}}, + {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}}, + {"net.key.sadb_dump", []_C_int{4, 30, 1}}, + {"net.key.spd_dump", []_C_int{4, 30, 2}}, + {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}}, + {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}}, + {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}}, + {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, + {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, + {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, + {"net.mpls.ttl", []_C_int{4, 33, 2}}, + {"net.pflow.stats", []_C_int{4, 34, 1}}, + {"net.pipex.enable", []_C_int{4, 35, 1}}, + {"vm.anonmin", []_C_int{2, 7}}, + {"vm.loadavg", []_C_int{2, 2}}, + {"vm.malloc_conf", []_C_int{2, 12}}, + {"vm.maxslp", []_C_int{2, 10}}, + {"vm.nkmempages", []_C_int{2, 6}}, + {"vm.psstrings", []_C_int{2, 3}}, + {"vm.swapencrypt.enable", []_C_int{2, 5, 0}}, + {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}}, + {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}}, + {"vm.uspace", []_C_int{2, 11}}, + {"vm.uvmexp", []_C_int{2, 4}}, + {"vm.vmmeter", []_C_int{2, 1}}, + {"vm.vnodemin", []_C_int{2, 9}}, + {"vm.vtextmin", []_C_int{2, 8}}, +} diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index 54559a8956d..a597e061cae 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -433,4 +433,5 @@ const ( SYS_CLONE3 = 435 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 + SYS_FACCESSAT2 = 439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index 054a741b7fc..8c102e55a1d 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -355,4 +355,5 @@ const ( SYS_CLONE3 = 435 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 + SYS_FACCESSAT2 = 439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index 307f2ba12ec..98f9b68fb90 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -397,4 +397,5 @@ const ( SYS_CLONE3 = 435 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 + SYS_FACCESSAT2 = 439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index e9404dd545f..4dabc33fbc9 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -300,4 +300,5 @@ const ( SYS_CLONE3 = 435 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 + SYS_FACCESSAT2 = 439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index 68bb6d29b8d..d5724e5964d 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -418,4 +418,5 @@ const ( SYS_CLONE3 = 4435 SYS_OPENAT2 = 4437 SYS_PIDFD_GETFD = 4438 + SYS_FACCESSAT2 = 4439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 4e5251185f4..c1d824a4f3d 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -348,4 +348,5 @@ const ( SYS_CLONE3 = 5435 SYS_OPENAT2 = 5437 SYS_PIDFD_GETFD = 5438 + SYS_FACCESSAT2 = 5439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index 4d9aa3003b9..598dd5d6375 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -348,4 +348,5 @@ const ( SYS_CLONE3 = 5435 SYS_OPENAT2 = 5437 SYS_PIDFD_GETFD = 5438 + SYS_FACCESSAT2 = 5439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index 64af0707d5a..c36782d08e2 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -418,4 +418,5 @@ const ( SYS_CLONE3 = 4435 SYS_OPENAT2 = 4437 SYS_PIDFD_GETFD = 4438 + SYS_FACCESSAT2 = 4439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index cc3c067ba31..9287538d368 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -397,4 +397,5 @@ const ( SYS_CLONE3 = 435 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 + SYS_FACCESSAT2 = 439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index 4050ff98361..4dafad8352a 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -397,4 +397,5 @@ const ( SYS_CLONE3 = 435 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 + SYS_FACCESSAT2 = 439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 529abb6a7f4..6642cfccdf1 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -299,4 +299,5 @@ const ( SYS_CLONE3 = 435 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 + SYS_FACCESSAT2 = 439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index 27665001092..23367b9467f 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -362,4 +362,5 @@ const ( SYS_CLONE3 = 435 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 + SYS_FACCESSAT2 = 439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go index 4dc82bb2492..083aa0204ef 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go @@ -376,4 +376,5 @@ const ( SYS_PIDFD_OPEN = 434 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 + SYS_FACCESSAT2 = 439 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go new file mode 100644 index 00000000000..5c08d573b3e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go @@ -0,0 +1,220 @@ +// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master +// Code generated by the command above; see README.md. DO NOT EDIT. + +// +build mips64,openbsd + +package unix + +const ( + SYS_EXIT = 1 // { void sys_exit(int rval); } + SYS_FORK = 2 // { int sys_fork(void); } + SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); } + SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); } + SYS_CLOSE = 6 // { int sys_close(int fd); } + SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); } + SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); } + SYS_LINK = 9 // { int sys_link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int sys_unlink(const char *path); } + SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); } + SYS_CHDIR = 12 // { int sys_chdir(const char *path); } + SYS_FCHDIR = 13 // { int sys_fchdir(int fd); } + SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); } + SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); } + SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break + SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } + SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); } + SYS_GETPID = 20 // { pid_t sys_getpid(void); } + SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); } + SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int sys_setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t sys_getuid(void); } + SYS_GETEUID = 25 // { uid_t sys_geteuid(void); } + SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); } + SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); } + SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); } + SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); } + SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); } + SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); } + SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); } + SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); } + SYS_SYNC = 36 // { void sys_sync(void); } + SYS_MSYSCALL = 37 // { int sys_msyscall(void *addr, size_t len); } + SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); } + SYS_GETPPID = 39 // { pid_t sys_getppid(void); } + SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); } + SYS_DUP = 41 // { int sys_dup(int fd); } + SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); } + SYS_GETEGID = 43 // { gid_t sys_getegid(void); } + SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); } + SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); } + SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); } + SYS_GETGID = 47 // { gid_t sys_getgid(void); } + SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } + SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int sys_acct(const char *path); } + SYS_SIGPENDING = 52 // { int sys_sigpending(void); } + SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); } + SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); } + SYS_REBOOT = 55 // { int sys_reboot(int opt); } + SYS_REVOKE = 56 // { int sys_revoke(const char *path); } + SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); } + SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); } + SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); } + SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); } + SYS_CHROOT = 61 // { int sys_chroot(const char *path); } + SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); } + SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); } + SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); } + SYS_VFORK = 66 // { int sys_vfork(void); } + SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); } + SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); } + SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } + SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); } + SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } + SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } + SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); } + SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); } + SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); } + SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); } + SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); } + SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); } + SYS_GETPGRP = 81 // { int sys_getpgrp(void); } + SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); } + SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); } + SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); } + SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); } + SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); } + SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); } + SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); } + SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); } + SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } + SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } + SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } + SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); } + SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); } + SYS_FSYNC = 95 // { int sys_fsync(int fd); } + SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); } + SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); } + SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); } + SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); } + SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); } + SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); } + SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } + SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); } + SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); } + SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); } + SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); } + SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } + SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } + SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } + SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); } + SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); } + SYS___REALPATH = 115 // { int sys___realpath(const char *pathname, char *resolved); } + SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } + SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); } + SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); } + SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); } + SYS_KILL = 122 // { int sys_kill(int pid, int signum); } + SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int sys_flock(int fd, int how); } + SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); } + SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); } + SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int sys_rmdir(const char *path); } + SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); } + SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); } + SYS_SETSID = 147 // { int sys_setsid(void); } + SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); } + SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); } + SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); } + SYS___TMPFD = 164 // { int sys___tmpfd(int flags); } + SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); } + SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); } + SYS_SETGID = 181 // { int sys_setgid(gid_t gid); } + SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); } + SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); } + SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); } + SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); } + SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); } + SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); } + SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); } + SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); } + SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); } + SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } + SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); } + SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } + SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); } + SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); } + SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } + SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } + SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); } + SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); } + SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); } + SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); } + SYS_ISSETUGID = 253 // { int sys_issetugid(void); } + SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); } + SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); } + SYS_PIPE = 263 // { int sys_pipe(int *fdp); } + SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); } + SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } + SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } + SYS_KQUEUE = 269 // { int sys_kqueue(void); } + SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); } + SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); } + SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); } + SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); } + SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } + SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); } + SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); } + SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } + SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); } + SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); } + SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); } + SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); } + SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); } + SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); } + SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); } + SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); } + SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); } + SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); } + SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } + SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); } + SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } + SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); } + SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); } + SYS_GETRTABLE = 311 // { int sys_getrtable(void); } + SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); } + SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); } + SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); } + SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); } + SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); } + SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); } + SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); } + SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); } + SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); } + SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); } + SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); } + SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); } + SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } + SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go index 6f79227d745..b91c2ae0f01 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -125,9 +125,9 @@ type Statfs_t struct { Owner uint32 Fsid Fsid Charspare [80]int8 - Fstypename [16]int8 - Mntfromname [1024]int8 - Mntonname [1024]int8 + Fstypename [16]byte + Mntfromname [1024]byte + Mntonname [1024]byte } type statfs_freebsd11_t struct { @@ -150,9 +150,9 @@ type statfs_freebsd11_t struct { Owner uint32 Fsid Fsid Charspare [80]int8 - Fstypename [16]int8 - Mntfromname [88]int8 - Mntonname [88]int8 + Fstypename [16]byte + Mntfromname [88]byte + Mntonname [88]byte } type Flock_t struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 416f7767e7d..953166c73f9 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -67,7 +67,9 @@ type Statx_t struct { Rdev_minor uint32 Dev_major uint32 Dev_minor uint32 - _ [14]uint64 + Mnt_id uint64 + _ uint64 + _ [12]uint64 } type Fsid struct { @@ -138,6 +140,48 @@ type FscryptGetKeyStatusArg struct { _ [13]uint32 } +type DmIoctl struct { + Version [3]uint32 + Data_size uint32 + Data_start uint32 + Target_count uint32 + Open_count int32 + Flags uint32 + Event_nr uint32 + _ uint32 + Dev uint64 + Name [128]byte + Uuid [129]byte + Data [7]byte +} + +type DmTargetSpec struct { + Sector_start uint64 + Length uint64 + Status int32 + Next uint32 + Target_type [16]byte +} + +type DmTargetDeps struct { + Count uint32 + _ uint32 +} + +type DmTargetVersions struct { + Next uint32 + Version [3]uint32 +} + +type DmTargetMsg struct { + Sector uint64 +} + +const ( + SizeofDmIoctl = 0x138 + SizeofDmTargetSpec = 0x28 +) + type KeyctlDHParams struct { Private int32 Prime int32 @@ -266,6 +310,15 @@ type RawSockaddrL2TPIP6 struct { Conn_id uint32 } +type RawSockaddrIUCV struct { + Family uint16 + Port uint16 + Addr uint32 + Nodeid [8]int8 + User_id [8]int8 + Name [8]int8 +} + type _Socklen uint32 type Linger struct { @@ -378,6 +431,7 @@ const ( SizeofSockaddrTIPC = 0x10 SizeofSockaddrL2TPIP = 0x10 SizeofSockaddrL2TPIP6 = 0x20 + SizeofSockaddrIUCV = 0x20 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc @@ -671,6 +725,8 @@ type InotifyEvent struct { const SizeofInotifyEvent = 0x10 +const SI_LOAD_SHIFT = 0x10 + type Utsname struct { Sysname [65]byte Nodename [65]byte @@ -960,6 +1016,13 @@ const ( PERF_SAMPLE_STREAM_ID = 0x200 PERF_SAMPLE_RAW = 0x400 PERF_SAMPLE_BRANCH_STACK = 0x800 + PERF_SAMPLE_REGS_USER = 0x1000 + PERF_SAMPLE_STACK_USER = 0x2000 + PERF_SAMPLE_WEIGHT = 0x4000 + PERF_SAMPLE_DATA_SRC = 0x8000 + PERF_SAMPLE_IDENTIFIER = 0x10000 + PERF_SAMPLE_TRANSACTION = 0x20000 + PERF_SAMPLE_REGS_INTR = 0x40000 PERF_SAMPLE_BRANCH_USER = 0x1 PERF_SAMPLE_BRANCH_KERNEL = 0x2 @@ -1689,6 +1752,21 @@ const ( NFT_NG_RANDOM = 0x1 ) +const ( + NFTA_TARGET_UNSPEC = 0x0 + NFTA_TARGET_NAME = 0x1 + NFTA_TARGET_REV = 0x2 + NFTA_TARGET_INFO = 0x3 + NFTA_MATCH_UNSPEC = 0x0 + NFTA_MATCH_NAME = 0x1 + NFTA_MATCH_REV = 0x2 + NFTA_MATCH_INFO = 0x3 + NFTA_COMPAT_UNSPEC = 0x0 + NFTA_COMPAT_NAME = 0x1 + NFTA_COMPAT_REV = 0x2 + NFTA_COMPAT_TYPE = 0x3 +) + type RTCTime struct { Sec int32 Min int32 @@ -1871,175 +1949,281 @@ const ( ) const ( - BPF_REG_0 = 0x0 - BPF_REG_1 = 0x1 - BPF_REG_2 = 0x2 - BPF_REG_3 = 0x3 - BPF_REG_4 = 0x4 - BPF_REG_5 = 0x5 - BPF_REG_6 = 0x6 - BPF_REG_7 = 0x7 - BPF_REG_8 = 0x8 - BPF_REG_9 = 0x9 - BPF_REG_10 = 0xa - BPF_MAP_CREATE = 0x0 - BPF_MAP_LOOKUP_ELEM = 0x1 - BPF_MAP_UPDATE_ELEM = 0x2 - BPF_MAP_DELETE_ELEM = 0x3 - BPF_MAP_GET_NEXT_KEY = 0x4 - BPF_PROG_LOAD = 0x5 - BPF_OBJ_PIN = 0x6 - BPF_OBJ_GET = 0x7 - BPF_PROG_ATTACH = 0x8 - BPF_PROG_DETACH = 0x9 - BPF_PROG_TEST_RUN = 0xa - BPF_PROG_GET_NEXT_ID = 0xb - BPF_MAP_GET_NEXT_ID = 0xc - BPF_PROG_GET_FD_BY_ID = 0xd - BPF_MAP_GET_FD_BY_ID = 0xe - BPF_OBJ_GET_INFO_BY_FD = 0xf - BPF_PROG_QUERY = 0x10 - BPF_RAW_TRACEPOINT_OPEN = 0x11 - BPF_BTF_LOAD = 0x12 - BPF_BTF_GET_FD_BY_ID = 0x13 - BPF_TASK_FD_QUERY = 0x14 - BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 - BPF_MAP_FREEZE = 0x16 - BPF_BTF_GET_NEXT_ID = 0x17 - BPF_MAP_TYPE_UNSPEC = 0x0 - BPF_MAP_TYPE_HASH = 0x1 - BPF_MAP_TYPE_ARRAY = 0x2 - BPF_MAP_TYPE_PROG_ARRAY = 0x3 - BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 - BPF_MAP_TYPE_PERCPU_HASH = 0x5 - BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 - BPF_MAP_TYPE_STACK_TRACE = 0x7 - BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 - BPF_MAP_TYPE_LRU_HASH = 0x9 - BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa - BPF_MAP_TYPE_LPM_TRIE = 0xb - BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc - BPF_MAP_TYPE_HASH_OF_MAPS = 0xd - BPF_MAP_TYPE_DEVMAP = 0xe - BPF_MAP_TYPE_SOCKMAP = 0xf - BPF_MAP_TYPE_CPUMAP = 0x10 - BPF_MAP_TYPE_XSKMAP = 0x11 - BPF_MAP_TYPE_SOCKHASH = 0x12 - BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 - BPF_MAP_TYPE_QUEUE = 0x16 - BPF_MAP_TYPE_STACK = 0x17 - BPF_MAP_TYPE_SK_STORAGE = 0x18 - BPF_MAP_TYPE_DEVMAP_HASH = 0x19 - BPF_PROG_TYPE_UNSPEC = 0x0 - BPF_PROG_TYPE_SOCKET_FILTER = 0x1 - BPF_PROG_TYPE_KPROBE = 0x2 - BPF_PROG_TYPE_SCHED_CLS = 0x3 - BPF_PROG_TYPE_SCHED_ACT = 0x4 - BPF_PROG_TYPE_TRACEPOINT = 0x5 - BPF_PROG_TYPE_XDP = 0x6 - BPF_PROG_TYPE_PERF_EVENT = 0x7 - BPF_PROG_TYPE_CGROUP_SKB = 0x8 - BPF_PROG_TYPE_CGROUP_SOCK = 0x9 - BPF_PROG_TYPE_LWT_IN = 0xa - BPF_PROG_TYPE_LWT_OUT = 0xb - BPF_PROG_TYPE_LWT_XMIT = 0xc - BPF_PROG_TYPE_SOCK_OPS = 0xd - BPF_PROG_TYPE_SK_SKB = 0xe - BPF_PROG_TYPE_CGROUP_DEVICE = 0xf - BPF_PROG_TYPE_SK_MSG = 0x10 - BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 - BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 - BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 - BPF_PROG_TYPE_LIRC_MODE2 = 0x14 - BPF_PROG_TYPE_SK_REUSEPORT = 0x15 - BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 - BPF_PROG_TYPE_CGROUP_SYSCTL = 0x17 - BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 0x18 - BPF_PROG_TYPE_CGROUP_SOCKOPT = 0x19 - BPF_PROG_TYPE_TRACING = 0x1a - BPF_CGROUP_INET_INGRESS = 0x0 - BPF_CGROUP_INET_EGRESS = 0x1 - BPF_CGROUP_INET_SOCK_CREATE = 0x2 - BPF_CGROUP_SOCK_OPS = 0x3 - BPF_SK_SKB_STREAM_PARSER = 0x4 - BPF_SK_SKB_STREAM_VERDICT = 0x5 - BPF_CGROUP_DEVICE = 0x6 - BPF_SK_MSG_VERDICT = 0x7 - BPF_CGROUP_INET4_BIND = 0x8 - BPF_CGROUP_INET6_BIND = 0x9 - BPF_CGROUP_INET4_CONNECT = 0xa - BPF_CGROUP_INET6_CONNECT = 0xb - BPF_CGROUP_INET4_POST_BIND = 0xc - BPF_CGROUP_INET6_POST_BIND = 0xd - BPF_CGROUP_UDP4_SENDMSG = 0xe - BPF_CGROUP_UDP6_SENDMSG = 0xf - BPF_LIRC_MODE2 = 0x10 - BPF_FLOW_DISSECTOR = 0x11 - BPF_CGROUP_SYSCTL = 0x12 - BPF_CGROUP_UDP4_RECVMSG = 0x13 - BPF_CGROUP_UDP6_RECVMSG = 0x14 - BPF_CGROUP_GETSOCKOPT = 0x15 - BPF_CGROUP_SETSOCKOPT = 0x16 - BPF_TRACE_RAW_TP = 0x17 - BPF_TRACE_FENTRY = 0x18 - BPF_TRACE_FEXIT = 0x19 - BPF_STACK_BUILD_ID_EMPTY = 0x0 - BPF_STACK_BUILD_ID_VALID = 0x1 - BPF_STACK_BUILD_ID_IP = 0x2 - BPF_ADJ_ROOM_NET = 0x0 - BPF_ADJ_ROOM_MAC = 0x1 - BPF_HDR_START_MAC = 0x0 - BPF_HDR_START_NET = 0x1 - BPF_LWT_ENCAP_SEG6 = 0x0 - BPF_LWT_ENCAP_SEG6_INLINE = 0x1 - BPF_LWT_ENCAP_IP = 0x2 - BPF_OK = 0x0 - BPF_DROP = 0x2 - BPF_REDIRECT = 0x7 - BPF_LWT_REROUTE = 0x80 - BPF_SOCK_OPS_VOID = 0x0 - BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 - BPF_SOCK_OPS_RWND_INIT = 0x2 - BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 - BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 - BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 - BPF_SOCK_OPS_NEEDS_ECN = 0x6 - BPF_SOCK_OPS_BASE_RTT = 0x7 - BPF_SOCK_OPS_RTO_CB = 0x8 - BPF_SOCK_OPS_RETRANS_CB = 0x9 - BPF_SOCK_OPS_STATE_CB = 0xa - BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb - BPF_SOCK_OPS_RTT_CB = 0xc - BPF_TCP_ESTABLISHED = 0x1 - BPF_TCP_SYN_SENT = 0x2 - BPF_TCP_SYN_RECV = 0x3 - BPF_TCP_FIN_WAIT1 = 0x4 - BPF_TCP_FIN_WAIT2 = 0x5 - BPF_TCP_TIME_WAIT = 0x6 - BPF_TCP_CLOSE = 0x7 - BPF_TCP_CLOSE_WAIT = 0x8 - BPF_TCP_LAST_ACK = 0x9 - BPF_TCP_LISTEN = 0xa - BPF_TCP_CLOSING = 0xb - BPF_TCP_NEW_SYN_RECV = 0xc - BPF_TCP_MAX_STATES = 0xd - BPF_FIB_LKUP_RET_SUCCESS = 0x0 - BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 - BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 - BPF_FIB_LKUP_RET_PROHIBIT = 0x3 - BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 - BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 - BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 - BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 - BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 - BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 - BPF_FD_TYPE_TRACEPOINT = 0x1 - BPF_FD_TYPE_KPROBE = 0x2 - BPF_FD_TYPE_KRETPROBE = 0x3 - BPF_FD_TYPE_UPROBE = 0x4 - BPF_FD_TYPE_URETPROBE = 0x5 + BPF_REG_0 = 0x0 + BPF_REG_1 = 0x1 + BPF_REG_2 = 0x2 + BPF_REG_3 = 0x3 + BPF_REG_4 = 0x4 + BPF_REG_5 = 0x5 + BPF_REG_6 = 0x6 + BPF_REG_7 = 0x7 + BPF_REG_8 = 0x8 + BPF_REG_9 = 0x9 + BPF_REG_10 = 0xa + BPF_MAP_CREATE = 0x0 + BPF_MAP_LOOKUP_ELEM = 0x1 + BPF_MAP_UPDATE_ELEM = 0x2 + BPF_MAP_DELETE_ELEM = 0x3 + BPF_MAP_GET_NEXT_KEY = 0x4 + BPF_PROG_LOAD = 0x5 + BPF_OBJ_PIN = 0x6 + BPF_OBJ_GET = 0x7 + BPF_PROG_ATTACH = 0x8 + BPF_PROG_DETACH = 0x9 + BPF_PROG_TEST_RUN = 0xa + BPF_PROG_GET_NEXT_ID = 0xb + BPF_MAP_GET_NEXT_ID = 0xc + BPF_PROG_GET_FD_BY_ID = 0xd + BPF_MAP_GET_FD_BY_ID = 0xe + BPF_OBJ_GET_INFO_BY_FD = 0xf + BPF_PROG_QUERY = 0x10 + BPF_RAW_TRACEPOINT_OPEN = 0x11 + BPF_BTF_LOAD = 0x12 + BPF_BTF_GET_FD_BY_ID = 0x13 + BPF_TASK_FD_QUERY = 0x14 + BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 + BPF_MAP_FREEZE = 0x16 + BPF_BTF_GET_NEXT_ID = 0x17 + BPF_MAP_LOOKUP_BATCH = 0x18 + BPF_MAP_LOOKUP_AND_DELETE_BATCH = 0x19 + BPF_MAP_UPDATE_BATCH = 0x1a + BPF_MAP_DELETE_BATCH = 0x1b + BPF_LINK_CREATE = 0x1c + BPF_LINK_UPDATE = 0x1d + BPF_LINK_GET_FD_BY_ID = 0x1e + BPF_LINK_GET_NEXT_ID = 0x1f + BPF_ENABLE_STATS = 0x20 + BPF_ITER_CREATE = 0x21 + BPF_MAP_TYPE_UNSPEC = 0x0 + BPF_MAP_TYPE_HASH = 0x1 + BPF_MAP_TYPE_ARRAY = 0x2 + BPF_MAP_TYPE_PROG_ARRAY = 0x3 + BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 + BPF_MAP_TYPE_PERCPU_HASH = 0x5 + BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 + BPF_MAP_TYPE_STACK_TRACE = 0x7 + BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 + BPF_MAP_TYPE_LRU_HASH = 0x9 + BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa + BPF_MAP_TYPE_LPM_TRIE = 0xb + BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc + BPF_MAP_TYPE_HASH_OF_MAPS = 0xd + BPF_MAP_TYPE_DEVMAP = 0xe + BPF_MAP_TYPE_SOCKMAP = 0xf + BPF_MAP_TYPE_CPUMAP = 0x10 + BPF_MAP_TYPE_XSKMAP = 0x11 + BPF_MAP_TYPE_SOCKHASH = 0x12 + BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 + BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 + BPF_MAP_TYPE_QUEUE = 0x16 + BPF_MAP_TYPE_STACK = 0x17 + BPF_MAP_TYPE_SK_STORAGE = 0x18 + BPF_MAP_TYPE_DEVMAP_HASH = 0x19 + BPF_MAP_TYPE_STRUCT_OPS = 0x1a + BPF_MAP_TYPE_RINGBUF = 0x1b + BPF_PROG_TYPE_UNSPEC = 0x0 + BPF_PROG_TYPE_SOCKET_FILTER = 0x1 + BPF_PROG_TYPE_KPROBE = 0x2 + BPF_PROG_TYPE_SCHED_CLS = 0x3 + BPF_PROG_TYPE_SCHED_ACT = 0x4 + BPF_PROG_TYPE_TRACEPOINT = 0x5 + BPF_PROG_TYPE_XDP = 0x6 + BPF_PROG_TYPE_PERF_EVENT = 0x7 + BPF_PROG_TYPE_CGROUP_SKB = 0x8 + BPF_PROG_TYPE_CGROUP_SOCK = 0x9 + BPF_PROG_TYPE_LWT_IN = 0xa + BPF_PROG_TYPE_LWT_OUT = 0xb + BPF_PROG_TYPE_LWT_XMIT = 0xc + BPF_PROG_TYPE_SOCK_OPS = 0xd + BPF_PROG_TYPE_SK_SKB = 0xe + BPF_PROG_TYPE_CGROUP_DEVICE = 0xf + BPF_PROG_TYPE_SK_MSG = 0x10 + BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 + BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 + BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 + BPF_PROG_TYPE_LIRC_MODE2 = 0x14 + BPF_PROG_TYPE_SK_REUSEPORT = 0x15 + BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 + BPF_PROG_TYPE_CGROUP_SYSCTL = 0x17 + BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 0x18 + BPF_PROG_TYPE_CGROUP_SOCKOPT = 0x19 + BPF_PROG_TYPE_TRACING = 0x1a + BPF_PROG_TYPE_STRUCT_OPS = 0x1b + BPF_PROG_TYPE_EXT = 0x1c + BPF_PROG_TYPE_LSM = 0x1d + BPF_CGROUP_INET_INGRESS = 0x0 + BPF_CGROUP_INET_EGRESS = 0x1 + BPF_CGROUP_INET_SOCK_CREATE = 0x2 + BPF_CGROUP_SOCK_OPS = 0x3 + BPF_SK_SKB_STREAM_PARSER = 0x4 + BPF_SK_SKB_STREAM_VERDICT = 0x5 + BPF_CGROUP_DEVICE = 0x6 + BPF_SK_MSG_VERDICT = 0x7 + BPF_CGROUP_INET4_BIND = 0x8 + BPF_CGROUP_INET6_BIND = 0x9 + BPF_CGROUP_INET4_CONNECT = 0xa + BPF_CGROUP_INET6_CONNECT = 0xb + BPF_CGROUP_INET4_POST_BIND = 0xc + BPF_CGROUP_INET6_POST_BIND = 0xd + BPF_CGROUP_UDP4_SENDMSG = 0xe + BPF_CGROUP_UDP6_SENDMSG = 0xf + BPF_LIRC_MODE2 = 0x10 + BPF_FLOW_DISSECTOR = 0x11 + BPF_CGROUP_SYSCTL = 0x12 + BPF_CGROUP_UDP4_RECVMSG = 0x13 + BPF_CGROUP_UDP6_RECVMSG = 0x14 + BPF_CGROUP_GETSOCKOPT = 0x15 + BPF_CGROUP_SETSOCKOPT = 0x16 + BPF_TRACE_RAW_TP = 0x17 + BPF_TRACE_FENTRY = 0x18 + BPF_TRACE_FEXIT = 0x19 + BPF_MODIFY_RETURN = 0x1a + BPF_LSM_MAC = 0x1b + BPF_TRACE_ITER = 0x1c + BPF_CGROUP_INET4_GETPEERNAME = 0x1d + BPF_CGROUP_INET6_GETPEERNAME = 0x1e + BPF_CGROUP_INET4_GETSOCKNAME = 0x1f + BPF_CGROUP_INET6_GETSOCKNAME = 0x20 + BPF_XDP_DEVMAP = 0x21 + BPF_LINK_TYPE_UNSPEC = 0x0 + BPF_LINK_TYPE_RAW_TRACEPOINT = 0x1 + BPF_LINK_TYPE_TRACING = 0x2 + BPF_LINK_TYPE_CGROUP = 0x3 + BPF_LINK_TYPE_ITER = 0x4 + BPF_LINK_TYPE_NETNS = 0x5 + BPF_ANY = 0x0 + BPF_NOEXIST = 0x1 + BPF_EXIST = 0x2 + BPF_F_LOCK = 0x4 + BPF_F_NO_PREALLOC = 0x1 + BPF_F_NO_COMMON_LRU = 0x2 + BPF_F_NUMA_NODE = 0x4 + BPF_F_RDONLY = 0x8 + BPF_F_WRONLY = 0x10 + BPF_F_STACK_BUILD_ID = 0x20 + BPF_F_ZERO_SEED = 0x40 + BPF_F_RDONLY_PROG = 0x80 + BPF_F_WRONLY_PROG = 0x100 + BPF_F_CLONE = 0x200 + BPF_F_MMAPABLE = 0x400 + BPF_STATS_RUN_TIME = 0x0 + BPF_STACK_BUILD_ID_EMPTY = 0x0 + BPF_STACK_BUILD_ID_VALID = 0x1 + BPF_STACK_BUILD_ID_IP = 0x2 + BPF_F_RECOMPUTE_CSUM = 0x1 + BPF_F_INVALIDATE_HASH = 0x2 + BPF_F_HDR_FIELD_MASK = 0xf + BPF_F_PSEUDO_HDR = 0x10 + BPF_F_MARK_MANGLED_0 = 0x20 + BPF_F_MARK_ENFORCE = 0x40 + BPF_F_INGRESS = 0x1 + BPF_F_TUNINFO_IPV6 = 0x1 + BPF_F_SKIP_FIELD_MASK = 0xff + BPF_F_USER_STACK = 0x100 + BPF_F_FAST_STACK_CMP = 0x200 + BPF_F_REUSE_STACKID = 0x400 + BPF_F_USER_BUILD_ID = 0x800 + BPF_F_ZERO_CSUM_TX = 0x2 + BPF_F_DONT_FRAGMENT = 0x4 + BPF_F_SEQ_NUMBER = 0x8 + BPF_F_INDEX_MASK = 0xffffffff + BPF_F_CURRENT_CPU = 0xffffffff + BPF_F_CTXLEN_MASK = 0xfffff00000000 + BPF_F_CURRENT_NETNS = -0x1 + BPF_CSUM_LEVEL_QUERY = 0x0 + BPF_CSUM_LEVEL_INC = 0x1 + BPF_CSUM_LEVEL_DEC = 0x2 + BPF_CSUM_LEVEL_RESET = 0x3 + BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 + BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 + BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 + BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 + BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 + BPF_F_ADJ_ROOM_NO_CSUM_RESET = 0x20 + BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff + BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 + BPF_F_SYSCTL_BASE_NAME = 0x1 + BPF_SK_STORAGE_GET_F_CREATE = 0x1 + BPF_F_GET_BRANCH_RECORDS_SIZE = 0x1 + BPF_RB_NO_WAKEUP = 0x1 + BPF_RB_FORCE_WAKEUP = 0x2 + BPF_RB_AVAIL_DATA = 0x0 + BPF_RB_RING_SIZE = 0x1 + BPF_RB_CONS_POS = 0x2 + BPF_RB_PROD_POS = 0x3 + BPF_RINGBUF_BUSY_BIT = 0x80000000 + BPF_RINGBUF_DISCARD_BIT = 0x40000000 + BPF_RINGBUF_HDR_SZ = 0x8 + BPF_ADJ_ROOM_NET = 0x0 + BPF_ADJ_ROOM_MAC = 0x1 + BPF_HDR_START_MAC = 0x0 + BPF_HDR_START_NET = 0x1 + BPF_LWT_ENCAP_SEG6 = 0x0 + BPF_LWT_ENCAP_SEG6_INLINE = 0x1 + BPF_LWT_ENCAP_IP = 0x2 + BPF_OK = 0x0 + BPF_DROP = 0x2 + BPF_REDIRECT = 0x7 + BPF_LWT_REROUTE = 0x80 + BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 + BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 + BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 + BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 + BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf + BPF_SOCK_OPS_VOID = 0x0 + BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 + BPF_SOCK_OPS_RWND_INIT = 0x2 + BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 + BPF_SOCK_OPS_NEEDS_ECN = 0x6 + BPF_SOCK_OPS_BASE_RTT = 0x7 + BPF_SOCK_OPS_RTO_CB = 0x8 + BPF_SOCK_OPS_RETRANS_CB = 0x9 + BPF_SOCK_OPS_STATE_CB = 0xa + BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb + BPF_SOCK_OPS_RTT_CB = 0xc + BPF_TCP_ESTABLISHED = 0x1 + BPF_TCP_SYN_SENT = 0x2 + BPF_TCP_SYN_RECV = 0x3 + BPF_TCP_FIN_WAIT1 = 0x4 + BPF_TCP_FIN_WAIT2 = 0x5 + BPF_TCP_TIME_WAIT = 0x6 + BPF_TCP_CLOSE = 0x7 + BPF_TCP_CLOSE_WAIT = 0x8 + BPF_TCP_LAST_ACK = 0x9 + BPF_TCP_LISTEN = 0xa + BPF_TCP_CLOSING = 0xb + BPF_TCP_NEW_SYN_RECV = 0xc + BPF_TCP_MAX_STATES = 0xd + TCP_BPF_IW = 0x3e9 + TCP_BPF_SNDCWND_CLAMP = 0x3ea + BPF_DEVCG_ACC_MKNOD = 0x1 + BPF_DEVCG_ACC_READ = 0x2 + BPF_DEVCG_ACC_WRITE = 0x4 + BPF_DEVCG_DEV_BLOCK = 0x1 + BPF_DEVCG_DEV_CHAR = 0x2 + BPF_FIB_LOOKUP_DIRECT = 0x1 + BPF_FIB_LOOKUP_OUTPUT = 0x2 + BPF_FIB_LKUP_RET_SUCCESS = 0x0 + BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 + BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 + BPF_FIB_LKUP_RET_PROHIBIT = 0x3 + BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 + BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 + BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 + BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 + BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 + BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 + BPF_FD_TYPE_TRACEPOINT = 0x1 + BPF_FD_TYPE_KPROBE = 0x2 + BPF_FD_TYPE_KRETPROBE = 0x3 + BPF_FD_TYPE_UPROBE = 0x4 + BPF_FD_TYPE_URETPROBE = 0x5 + BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1 + BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2 + BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4 ) const ( @@ -2205,7 +2389,7 @@ const ( DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20 DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21 DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22 - DEVLINK_CMD_MAX = 0x44 + DEVLINK_CMD_MAX = 0x48 DEVLINK_PORT_TYPE_NOTSET = 0x0 DEVLINK_PORT_TYPE_AUTO = 0x1 DEVLINK_PORT_TYPE_ETH = 0x2 @@ -2285,7 +2469,7 @@ const ( DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c DEVLINK_ATTR_PAD = 0x3d DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e - DEVLINK_ATTR_MAX = 0x8c + DEVLINK_ATTR_MAX = 0x90 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1 DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 761b67c8643..73509d896a2 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -117,6 +117,11 @@ type Flock_t struct { Pid int32 } +type DmNameList struct { + Dev uint64 + Next uint32 +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index 201fb3482de..45eb8738b0d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -117,6 +117,13 @@ type Flock_t struct { _ [4]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index 8051b56108f..8f6b453aba5 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -121,6 +121,13 @@ type Flock_t struct { _ [4]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index a936f21692f..b1e0c24f192 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -118,6 +118,13 @@ type Flock_t struct { _ [4]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index aaca03dd7db..fb802c3ec9b 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -120,6 +120,13 @@ type Flock_t struct { _ [4]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index 2e7f3b8ca48..30abcf3bb8e 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -118,6 +118,13 @@ type Flock_t struct { _ [4]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 16add5a2575..99761aa9a78 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -118,6 +118,13 @@ type Flock_t struct { _ [4]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index 4ed2c8e54c4..293690348f6 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -120,6 +120,13 @@ type Flock_t struct { _ [4]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 74151909976..0ca856e559b 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -119,6 +119,13 @@ type Flock_t struct { _ [4]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index 046c2debd4f..f50f6482eee 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -119,6 +119,13 @@ type Flock_t struct { _ [4]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 0f2f61a6ad1..4d3ac8d7b40 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -118,6 +118,13 @@ type Flock_t struct { _ [4]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index cca1b6be270..349f483a80e 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -117,6 +117,13 @@ type Flock_t struct { _ [4]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x6 FADV_NOREUSE = 0x7 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go index 33a73bf183b..80c73beaa15 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go @@ -121,6 +121,13 @@ type Flock_t struct { _ [2]byte } +type DmNameList struct { + Dev uint64 + Next uint32 + Name [0]byte + _ [4]byte +} + const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go new file mode 100644 index 00000000000..992a1f8c018 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go @@ -0,0 +1,565 @@ +// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go +// Code generated by the command above; see README.md. DO NOT EDIT. + +// +build mips64,openbsd + +package unix + +const ( + SizeofPtr = 0x8 + SizeofShort = 0x2 + SizeofInt = 0x4 + SizeofLong = 0x8 + SizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Mode uint32 + Dev int32 + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev int32 + Atim Timespec + Mtim Timespec + Ctim Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + _ Timespec +} + +type Statfs_t struct { + F_flags uint32 + F_bsize uint32 + F_iosize uint32 + F_blocks uint64 + F_bfree uint64 + F_bavail int64 + F_files uint64 + F_ffree uint64 + F_favail int64 + F_syncwrites uint64 + F_syncreads uint64 + F_asyncwrites uint64 + F_asyncreads uint64 + F_fsid Fsid + F_namemax uint32 + F_owner uint32 + F_ctime uint64 + F_fstypename [16]int8 + F_mntonname [90]int8 + F_mntfromname [90]int8 + F_mntfromspec [90]int8 + _ [2]byte + Mount_info [160]byte +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Off int64 + Reclen uint16 + Type uint8 + Namlen uint8 + _ [4]uint8 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +const ( + PathMax = 0x400 +) + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [24]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x20 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [32]uint32 +} + +const ( + SizeofIfMsghdr = 0xa8 + SizeofIfData = 0x90 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x1a + SizeofRtMsghdr = 0x60 + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Xflags int32 + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Mtu uint32 + Metric uint32 + Rdomain uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Oqdrops uint64 + Noproto uint64 + Capabilities uint32 + Lastchange Timeval +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Metric int32 +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + What uint16 + Name [16]int8 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Priority uint8 + Mpls uint8 + Addrs int32 + Flags int32 + Fmask int32 + Pid int32 + Seq int32 + Errno int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Pksent uint64 + Expire int64 + Locks uint32 + Mtu uint32 + Refcnt uint32 + Hopcount uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pad uint32 +} + +type Mclpool struct{} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + _ [2]byte +} + +type BpfTimeval struct { + Sec uint32 + Usec uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} + +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + +const ( + AT_FDCWD = -0x64 + AT_SYMLINK_FOLLOW = 0x4 + AT_SYMLINK_NOFOLLOW = 0x2 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLERR = 0x8 + POLLHUP = 0x10 + POLLIN = 0x1 + POLLNVAL = 0x20 + POLLOUT = 0x4 + POLLPRI = 0x2 + POLLRDBAND = 0x80 + POLLRDNORM = 0x40 + POLLWRBAND = 0x100 + POLLWRNORM = 0x4 +) + +type Sigset_t uint32 + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} + +const SizeofUvmexp = 0x158 + +type Uvmexp struct { + Pagesize int32 + Pagemask int32 + Pageshift int32 + Npages int32 + Free int32 + Active int32 + Inactive int32 + Paging int32 + Wired int32 + Zeropages int32 + Reserve_pagedaemon int32 + Reserve_kernel int32 + Unused01 int32 + Vnodepages int32 + Vtextpages int32 + Freemin int32 + Freetarg int32 + Inactarg int32 + Wiredmax int32 + Anonmin int32 + Vtextmin int32 + Vnodemin int32 + Anonminpct int32 + Vtextminpct int32 + Vnodeminpct int32 + Nswapdev int32 + Swpages int32 + Swpginuse int32 + Swpgonly int32 + Nswget int32 + Nanon int32 + Unused05 int32 + Unused06 int32 + Faults int32 + Traps int32 + Intrs int32 + Swtch int32 + Softs int32 + Syscalls int32 + Pageins int32 + Unused07 int32 + Unused08 int32 + Pgswapin int32 + Pgswapout int32 + Forks int32 + Forks_ppwait int32 + Forks_sharevm int32 + Pga_zerohit int32 + Pga_zeromiss int32 + Unused09 int32 + Fltnoram int32 + Fltnoanon int32 + Fltnoamap int32 + Fltpgwait int32 + Fltpgrele int32 + Fltrelck int32 + Fltrelckok int32 + Fltanget int32 + Fltanretry int32 + Fltamcopy int32 + Fltnamap int32 + Fltnomap int32 + Fltlget int32 + Fltget int32 + Flt_anon int32 + Flt_acow int32 + Flt_obj int32 + Flt_prcopy int32 + Flt_przero int32 + Pdwoke int32 + Pdrevs int32 + Pdswout int32 + Pdfreed int32 + Pdscans int32 + Pdanscan int32 + Pdobscan int32 + Pdreact int32 + Pdbusy int32 + Pdpageouts int32 + Pdpending int32 + Pddeact int32 + Unused11 int32 + Unused12 int32 + Unused13 int32 + Fpswtch int32 + Kmapent int32 +} + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Tickadj int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go index d7771134158..82076fb74ff 100644 --- a/vendor/golang.org/x/sys/windows/dll_windows.go +++ b/vendor/golang.org/x/sys/windows/dll_windows.go @@ -104,6 +104,35 @@ func (d *DLL) MustFindProc(name string) *Proc { return p } +// FindProcByOrdinal searches DLL d for procedure by ordinal and returns *Proc +// if found. It returns an error if search fails. +func (d *DLL) FindProcByOrdinal(ordinal uintptr) (proc *Proc, err error) { + a, e := GetProcAddressByOrdinal(d.Handle, ordinal) + name := "#" + itoa(int(ordinal)) + if e != nil { + return nil, &DLLError{ + Err: e, + ObjName: name, + Msg: "Failed to find " + name + " procedure in " + d.Name + ": " + e.Error(), + } + } + p := &Proc{ + Dll: d, + Name: name, + addr: a, + } + return p, nil +} + +// MustFindProcByOrdinal is like FindProcByOrdinal but panics if search fails. +func (d *DLL) MustFindProcByOrdinal(ordinal uintptr) *Proc { + p, e := d.FindProcByOrdinal(ordinal) + if e != nil { + panic(e) + } + return p +} + // Release unloads DLL d from memory. func (d *DLL) Release() (err error) { return FreeLibrary(d.Handle) diff --git a/vendor/golang.org/x/sys/windows/env_windows.go b/vendor/golang.org/x/sys/windows/env_windows.go index f482a9fab3b..92ac05ff4ea 100644 --- a/vendor/golang.org/x/sys/windows/env_windows.go +++ b/vendor/golang.org/x/sys/windows/env_windows.go @@ -8,7 +8,6 @@ package windows import ( "syscall" - "unicode/utf16" "unsafe" ) @@ -40,17 +39,11 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) { defer DestroyEnvironmentBlock(block) blockp := uintptr(unsafe.Pointer(block)) for { - entry := (*[(1 << 30) - 1]uint16)(unsafe.Pointer(blockp))[:] - for i, v := range entry { - if v == 0 { - entry = entry[:i] - break - } - } + entry := UTF16PtrToString((*uint16)(unsafe.Pointer(blockp))) if len(entry) == 0 { break } - env = append(env, string(utf16.Decode(entry))) + env = append(env, entry) blockp += 2 * (uintptr(len(entry)) + 1) } return env, nil diff --git a/vendor/golang.org/x/sys/windows/memory_windows.go b/vendor/golang.org/x/sys/windows/memory_windows.go index f80a4204f09..e409d76f0fd 100644 --- a/vendor/golang.org/x/sys/windows/memory_windows.go +++ b/vendor/golang.org/x/sys/windows/memory_windows.go @@ -23,4 +23,9 @@ const ( PAGE_EXECUTE_READ = 0x20 PAGE_EXECUTE_READWRITE = 0x40 PAGE_EXECUTE_WRITECOPY = 0x80 + + QUOTA_LIMITS_HARDWS_MIN_DISABLE = 0x00000002 + QUOTA_LIMITS_HARDWS_MIN_ENABLE = 0x00000001 + QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008 + QUOTA_LIMITS_HARDWS_MAX_ENABLE = 0x00000004 ) diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index 4b6eff1868b..9e3c44a8557 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -7,6 +7,8 @@ package windows import ( "syscall" "unsafe" + + "golang.org/x/sys/internal/unsafeheader" ) const ( @@ -1229,7 +1231,7 @@ func (sd *SECURITY_DESCRIPTOR) String() string { return "" } defer LocalFree(Handle(unsafe.Pointer(sddl))) - return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(sddl))[:]) + return UTF16PtrToString(sddl) } // ToAbsolute converts a self-relative security descriptor into an absolute one. @@ -1307,9 +1309,17 @@ func (absoluteSD *SECURITY_DESCRIPTOR) ToSelfRelative() (selfRelativeSD *SECURIT } func (selfRelativeSD *SECURITY_DESCRIPTOR) copySelfRelativeSecurityDescriptor() *SECURITY_DESCRIPTOR { - sdBytes := make([]byte, selfRelativeSD.Length()) - copy(sdBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(selfRelativeSD))[:len(sdBytes)]) - return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&sdBytes[0])) + sdLen := (int)(selfRelativeSD.Length()) + + var src []byte + h := (*unsafeheader.Slice)(unsafe.Pointer(&src)) + h.Data = unsafe.Pointer(selfRelativeSD) + h.Len = sdLen + h.Cap = sdLen + + dst := make([]byte, sdLen) + copy(dst, src) + return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&dst[0])) } // SecurityDescriptorFromString converts an SDDL string describing a security descriptor into a @@ -1391,6 +1401,6 @@ func ACLFromEntries(explicitEntries []EXPLICIT_ACCESS, mergedACL *ACL) (acl *ACL } defer LocalFree(Handle(unsafe.Pointer(winHeapACL))) aclBytes := make([]byte, winHeapACL.aclSize) - copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes)]) + copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes):len(aclBytes)]) return (*ACL)(unsafe.Pointer(&aclBytes[0])), nil } diff --git a/vendor/golang.org/x/sys/windows/svc/mgr/config.go b/vendor/golang.org/x/sys/windows/svc/mgr/config.go index 8431edbe7ef..30d39294101 100644 --- a/vendor/golang.org/x/sys/windows/svc/mgr/config.go +++ b/vendor/golang.org/x/sys/windows/svc/mgr/config.go @@ -8,7 +8,6 @@ package mgr import ( "syscall" - "unicode/utf16" "unsafe" "golang.org/x/sys/windows" @@ -46,28 +45,21 @@ type Config struct { DelayedAutoStart bool // the service is started after other auto-start services are started plus a short delay } -func toString(p *uint16) string { - if p == nil { - return "" - } - return syscall.UTF16ToString((*[4096]uint16)(unsafe.Pointer(p))[:]) -} - func toStringSlice(ps *uint16) []string { - if ps == nil { - return nil - } r := make([]string, 0) - for from, i, p := 0, 0, (*[1 << 24]uint16)(unsafe.Pointer(ps)); true; i++ { - if p[i] == 0 { - // empty string marks the end - if i <= from { - break - } - r = append(r, string(utf16.Decode(p[from:i]))) - from = i + 1 + p := unsafe.Pointer(ps) + + for { + s := windows.UTF16PtrToString((*uint16)(p)) + if len(s) == 0 { + break } + + r = append(r, s) + offset := unsafe.Sizeof(uint16(0)) * (uintptr)(len(s)+1) + p = unsafe.Pointer(uintptr(p) + offset) } + return r } @@ -110,13 +102,13 @@ func (s *Service) Config() (Config, error) { ServiceType: p.ServiceType, StartType: p.StartType, ErrorControl: p.ErrorControl, - BinaryPathName: toString(p.BinaryPathName), - LoadOrderGroup: toString(p.LoadOrderGroup), + BinaryPathName: windows.UTF16PtrToString(p.BinaryPathName), + LoadOrderGroup: windows.UTF16PtrToString(p.LoadOrderGroup), TagId: p.TagId, Dependencies: toStringSlice(p.Dependencies), - ServiceStartName: toString(p.ServiceStartName), - DisplayName: toString(p.DisplayName), - Description: toString(p2.Description), + ServiceStartName: windows.UTF16PtrToString(p.ServiceStartName), + DisplayName: windows.UTF16PtrToString(p.DisplayName), + Description: windows.UTF16PtrToString(p2.Description), DelayedAutoStart: delayedStart, }, nil } diff --git a/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go b/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go index 33944d0f586..9a454da6bf8 100644 --- a/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go +++ b/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go @@ -17,6 +17,7 @@ import ( "unicode/utf16" "unsafe" + "golang.org/x/sys/internal/unsafeheader" "golang.org/x/sys/windows" ) @@ -73,7 +74,7 @@ func (m *Mgr) LockStatus() (*LockStatus, error) { status := &LockStatus{ IsLocked: lockStatus.IsLocked != 0, Age: time.Duration(lockStatus.LockDuration) * time.Second, - Owner: windows.UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(lockStatus.LockOwner))[:]), + Owner: windows.UTF16PtrToString(lockStatus.LockOwner), } return status, nil } @@ -201,10 +202,16 @@ func (m *Mgr) ListServices() ([]string, error) { if servicesReturned == 0 { return nil, nil } - services := (*[1 << 20]windows.ENUM_SERVICE_STATUS_PROCESS)(unsafe.Pointer(&buf[0]))[:servicesReturned] + + var services []windows.ENUM_SERVICE_STATUS_PROCESS + hdr := (*unsafeheader.Slice)(unsafe.Pointer(&services)) + hdr.Data = unsafe.Pointer(&buf[0]) + hdr.Len = int(servicesReturned) + hdr.Cap = int(servicesReturned) + var names []string for _, s := range services { - name := syscall.UTF16ToString((*[1 << 20]uint16)(unsafe.Pointer(s.ServiceName))[:]) + name := windows.UTF16PtrToString(s.ServiceName) names = append(names, name) } return names, nil diff --git a/vendor/golang.org/x/sys/windows/svc/mgr/recovery.go b/vendor/golang.org/x/sys/windows/svc/mgr/recovery.go index 71ce2b8199f..e465cbbd327 100644 --- a/vendor/golang.org/x/sys/windows/svc/mgr/recovery.go +++ b/vendor/golang.org/x/sys/windows/svc/mgr/recovery.go @@ -12,6 +12,7 @@ import ( "time" "unsafe" + "golang.org/x/sys/internal/unsafeheader" "golang.org/x/sys/windows" ) @@ -68,8 +69,13 @@ func (s *Service) RecoveryActions() ([]RecoveryAction, error) { return nil, err } + var actions []windows.SC_ACTION + hdr := (*unsafeheader.Slice)(unsafe.Pointer(&actions)) + hdr.Data = unsafe.Pointer(p.Actions) + hdr.Len = int(p.ActionsCount) + hdr.Cap = int(p.ActionsCount) + var recoveryActions []RecoveryAction - actions := (*[1024]windows.SC_ACTION)(unsafe.Pointer(p.Actions))[:p.ActionsCount] for _, action := range actions { recoveryActions = append(recoveryActions, RecoveryAction{Type: int(action.Type), Delay: time.Duration(action.Delay) * time.Millisecond}) } @@ -112,7 +118,7 @@ func (s *Service) RebootMessage() (string, error) { return "", err } p := (*windows.SERVICE_FAILURE_ACTIONS)(unsafe.Pointer(&b[0])) - return toString(p.RebootMsg), nil + return windows.UTF16PtrToString(p.RebootMsg), nil } // SetRecoveryCommand sets the command line of the process to execute in response to the RunCommand service controller action. @@ -131,5 +137,5 @@ func (s *Service) RecoveryCommand() (string, error) { return "", err } p := (*windows.SERVICE_FAILURE_ACTIONS)(unsafe.Pointer(&b[0])) - return toString(p.Command), nil + return windows.UTF16PtrToString(p.Command), nil } diff --git a/vendor/golang.org/x/sys/windows/svc/security.go b/vendor/golang.org/x/sys/windows/svc/security.go index 6fbc9236ed5..65025998da7 100644 --- a/vendor/golang.org/x/sys/windows/svc/security.go +++ b/vendor/golang.org/x/sys/windows/svc/security.go @@ -7,8 +7,6 @@ package svc import ( - "unsafe" - "golang.org/x/sys/windows" ) @@ -48,9 +46,8 @@ func IsAnInteractiveSession() (bool, error) { if err != nil { return false, err } - p := unsafe.Pointer(&gs.Groups[0]) - groups := (*[2 << 20]windows.SIDAndAttributes)(p)[:gs.GroupCount] - for _, g := range groups { + + for _, g := range gs.AllGroups() { if windows.EqualSid(g.Sid, interSid) { return true, nil } diff --git a/vendor/golang.org/x/sys/windows/svc/service.go b/vendor/golang.org/x/sys/windows/svc/service.go index ee3d6965a18..bae818dddcf 100644 --- a/vendor/golang.org/x/sys/windows/svc/service.go +++ b/vendor/golang.org/x/sys/windows/svc/service.go @@ -14,6 +14,7 @@ import ( "syscall" "unsafe" + "golang.org/x/sys/internal/unsafeheader" "golang.org/x/sys/windows" ) @@ -224,10 +225,16 @@ const ( func (s *service) run() { s.goWaits.Wait() s.h = windows.Handle(ssHandle) - argv := (*[100]*int16)(unsafe.Pointer(sArgv))[:sArgc] + + var argv []*uint16 + hdr := (*unsafeheader.Slice)(unsafe.Pointer(&argv)) + hdr.Data = unsafe.Pointer(sArgv) + hdr.Len = int(sArgc) + hdr.Cap = int(sArgc) + args := make([]string, len(argv)) for i, a := range argv { - args[i] = syscall.UTF16ToString((*[1 << 20]uint16)(unsafe.Pointer(a))[:]) + args[i] = windows.UTF16PtrToString(a) } cmdsToHandler := make(chan ChangeRequest) diff --git a/vendor/golang.org/x/sys/windows/svc/sys_amd64.s b/vendor/golang.org/x/sys/windows/svc/sys_amd64.s index 2f7609c5b64..3d4df0c3de5 100644 --- a/vendor/golang.org/x/sys/windows/svc/sys_amd64.s +++ b/vendor/golang.org/x/sys/windows/svc/sys_amd64.s @@ -6,11 +6,15 @@ // func servicemain(argc uint32, argv **uint16) TEXT ·servicemain(SB),7,$0 + MOVQ SP, AX + ANDQ $~15, SP // alignment as per Windows requirement + SUBQ $48, SP // room for SP and 4 args as per Windows requirement + // plus one extra word to keep stack 16 bytes aligned + MOVQ AX, 32(SP) + MOVL CX, ·sArgc(SB) MOVQ DX, ·sArgv(SB) - SUBQ $32, SP // stack for the first 4 syscall params - MOVQ ·sName(SB), CX MOVQ $·servicectlhandler(SB), DX // BUG(pastarmovj): Figure out a way to pass in context in R8. @@ -32,7 +36,7 @@ TEXT ·servicemain(SB),7,$0 CALL AX exit: - ADDQ $32, SP + MOVQ 32(SP), SP RET // I do not know why, but this seems to be the only way to call diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 053d664d0b1..62cf70e9f67 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -13,6 +13,8 @@ import ( "time" "unicode/utf16" "unsafe" + + "golang.org/x/sys/internal/unsafeheader" ) type Handle uintptr @@ -117,6 +119,32 @@ func UTF16PtrFromString(s string) (*uint16, error) { return &a[0], nil } +// UTF16PtrToString takes a pointer to a UTF-16 sequence and returns the corresponding UTF-8 encoded string. +// If the pointer is nil, this returns the empty string. This assumes that the UTF-16 sequence is terminated +// at a zero word; if the zero word is not present, the program may crash. +func UTF16PtrToString(p *uint16) string { + if p == nil { + return "" + } + if *p == 0 { + return "" + } + + // Find NUL terminator. + n := 0 + for ptr := unsafe.Pointer(p); *(*uint16)(ptr) != 0; n++ { + ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p)) + } + + var s []uint16 + h := (*unsafeheader.Slice)(unsafe.Pointer(&s)) + h.Data = unsafe.Pointer(p) + h.Len = n + h.Cap = n + + return string(utf16.Decode(s)) +} + func Getpagesize() int { return 4096 } // NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention. @@ -280,6 +308,8 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys GetProcessId(process Handle) (id uint32, err error) //sys OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error) //sys SetProcessPriorityBoost(process Handle, disable bool) (err error) = kernel32.SetProcessPriorityBoost +//sys GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) +//sys SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) // Volume Management Functions //sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW @@ -1181,7 +1211,12 @@ type IPv6Mreq struct { Interface uint32 } -func GetsockoptInt(fd Handle, level, opt int) (int, error) { return -1, syscall.EWINDOWS } +func GetsockoptInt(fd Handle, level, opt int) (int, error) { + v := int32(0) + l := int32(unsafe.Sizeof(v)) + err := Getsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), &l) + return int(v), err +} func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) { sys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)} @@ -1378,7 +1413,7 @@ func (t Token) KnownFolderPath(folderID *KNOWNFOLDERID, flags uint32) (string, e return "", err } defer CoTaskMemFree(unsafe.Pointer(p)) - return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(p))[:]), nil + return UTF16PtrToString(p), nil } // RtlGetVersion returns the version of the underlying operating system, ignoring diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 2aa4fa642a3..8a562feed0d 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -217,6 +217,8 @@ var ( procGetProcessId = modkernel32.NewProc("GetProcessId") procOpenThread = modkernel32.NewProc("OpenThread") procSetProcessPriorityBoost = modkernel32.NewProc("SetProcessPriorityBoost") + procGetProcessWorkingSetSizeEx = modkernel32.NewProc("GetProcessWorkingSetSizeEx") + procSetProcessWorkingSetSizeEx = modkernel32.NewProc("SetProcessWorkingSetSizeEx") procDefineDosDeviceW = modkernel32.NewProc("DefineDosDeviceW") procDeleteVolumeMountPointW = modkernel32.NewProc("DeleteVolumeMountPointW") procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW") @@ -2414,6 +2416,23 @@ func SetProcessPriorityBoost(process Handle, disable bool) (err error) { return } +func GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) { + syscall.Syscall6(procGetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(unsafe.Pointer(lpMinimumWorkingSetSize)), uintptr(unsafe.Pointer(lpMaximumWorkingSetSize)), uintptr(unsafe.Pointer(flags)), 0, 0) + return +} + +func SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procSetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(dwMinimumWorkingSetSize), uintptr(dwMaximumWorkingSetSize), uintptr(flags), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) { r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath))) if r1 == 0 { diff --git a/vendor/golang.org/x/text/encoding/unicode/unicode.go b/vendor/golang.org/x/text/encoding/unicode/unicode.go index 4850ff365b6..dd99ad14d37 100644 --- a/vendor/golang.org/x/text/encoding/unicode/unicode.go +++ b/vendor/golang.org/x/text/encoding/unicode/unicode.go @@ -6,6 +6,7 @@ package unicode // import "golang.org/x/text/encoding/unicode" import ( + "bytes" "errors" "unicode/utf16" "unicode/utf8" @@ -25,15 +26,95 @@ import ( // the introduction of some kind of error type for conveying the erroneous code // point. -// UTF8 is the UTF-8 encoding. +// UTF8 is the UTF-8 encoding. It neither removes nor adds byte order marks. var UTF8 encoding.Encoding = utf8enc +// UTF8BOM is an UTF-8 encoding where the decoder strips a leading byte order +// mark while the encoder adds one. +// +// Some editors add a byte order mark as a signature to UTF-8 files. Although +// the byte order mark is not useful for detecting byte order in UTF-8, it is +// sometimes used as a convention to mark UTF-8-encoded files. This relies on +// the observation that the UTF-8 byte order mark is either an illegal or at +// least very unlikely sequence in any other character encoding. +var UTF8BOM encoding.Encoding = utf8bomEncoding{} + +type utf8bomEncoding struct{} + +func (utf8bomEncoding) String() string { + return "UTF-8-BOM" +} + +func (utf8bomEncoding) ID() (identifier.MIB, string) { + return identifier.Unofficial, "x-utf8bom" +} + +func (utf8bomEncoding) NewEncoder() *encoding.Encoder { + return &encoding.Encoder{ + Transformer: &utf8bomEncoder{t: runes.ReplaceIllFormed()}, + } +} + +func (utf8bomEncoding) NewDecoder() *encoding.Decoder { + return &encoding.Decoder{Transformer: &utf8bomDecoder{}} +} + var utf8enc = &internal.Encoding{ &internal.SimpleEncoding{utf8Decoder{}, runes.ReplaceIllFormed()}, "UTF-8", identifier.UTF8, } +type utf8bomDecoder struct { + checked bool +} + +func (t *utf8bomDecoder) Reset() { + t.checked = false +} + +func (t *utf8bomDecoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + if !t.checked { + if !atEOF && len(src) < len(utf8BOM) { + if len(src) == 0 { + return 0, 0, nil + } + return 0, 0, transform.ErrShortSrc + } + if bytes.HasPrefix(src, []byte(utf8BOM)) { + nSrc += len(utf8BOM) + src = src[len(utf8BOM):] + } + t.checked = true + } + nDst, n, err := utf8Decoder.Transform(utf8Decoder{}, dst[nDst:], src, atEOF) + nSrc += n + return nDst, nSrc, err +} + +type utf8bomEncoder struct { + written bool + t transform.Transformer +} + +func (t *utf8bomEncoder) Reset() { + t.written = false + t.t.Reset() +} + +func (t *utf8bomEncoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + if !t.written { + if len(dst) < len(utf8BOM) { + return nDst, 0, transform.ErrShortDst + } + nDst = copy(dst, utf8BOM) + t.written = true + } + n, nSrc, err := utf8Decoder.Transform(utf8Decoder{}, dst[nDst:], src, atEOF) + nDst += n + return nDst, nSrc, err +} + type utf8Decoder struct{ transform.NopResetter } func (utf8Decoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { @@ -287,16 +368,13 @@ func (u *utf16Decoder) Reset() { } func (u *utf16Decoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { + if len(src) < 2 && atEOF && u.current.bomPolicy&requireBOM != 0 { + return 0, 0, ErrMissingBOM + } if len(src) == 0 { - if atEOF && u.current.bomPolicy&requireBOM != 0 { - return 0, 0, ErrMissingBOM - } return 0, 0, nil } - if u.current.bomPolicy&acceptBOM != 0 { - if len(src) < 2 { - return 0, 0, transform.ErrShortSrc - } + if len(src) >= 2 && u.current.bomPolicy&acceptBOM != 0 { switch { case src[0] == 0xfe && src[1] == 0xff: u.current.endianness = BigEndian diff --git a/vendor/golang.org/x/text/transform/transform.go b/vendor/golang.org/x/text/transform/transform.go index 520b9ada0e2..48ec64b40ca 100644 --- a/vendor/golang.org/x/text/transform/transform.go +++ b/vendor/golang.org/x/text/transform/transform.go @@ -648,7 +648,8 @@ func String(t Transformer, s string) (result string, n int, err error) { // Transform the remaining input, growing dst and src buffers as necessary. for { n := copy(src, s[pSrc:]) - nDst, nSrc, err := t.Transform(dst[pDst:], src[:n], pSrc+n == len(s)) + atEOF := pSrc+n == len(s) + nDst, nSrc, err := t.Transform(dst[pDst:], src[:n], atEOF) pDst += nDst pSrc += nSrc @@ -659,6 +660,9 @@ func String(t Transformer, s string) (result string, n int, err error) { dst = grow(dst, pDst) } } else if err == ErrShortSrc { + if atEOF { + return string(dst[:pDst]), pSrc, err + } if nSrc == 0 { src = grow(src, 0) } diff --git a/vendor/golang.org/x/text/unicode/bidi/core.go b/vendor/golang.org/x/text/unicode/bidi/core.go index 48d144008aa..50deb6600a3 100644 --- a/vendor/golang.org/x/text/unicode/bidi/core.go +++ b/vendor/golang.org/x/text/unicode/bidi/core.go @@ -480,15 +480,15 @@ func (s *isolatingRunSequence) resolveWeakTypes() { // Rule W1. // Changes all NSMs. - preceedingCharacterType := s.sos + precedingCharacterType := s.sos for i, t := range s.types { if t == NSM { - s.types[i] = preceedingCharacterType + s.types[i] = precedingCharacterType } else { if t.in(LRI, RLI, FSI, PDI) { - preceedingCharacterType = ON + precedingCharacterType = ON } - preceedingCharacterType = t + precedingCharacterType = t } } diff --git a/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go b/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go index 022e3c69092..16b11db5388 100644 --- a/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go +++ b/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go @@ -1,6 +1,6 @@ // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. -// +build go1.13 +// +build go1.13,!go1.14 package bidi diff --git a/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go b/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go new file mode 100644 index 00000000000..7ffa365121c --- /dev/null +++ b/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go @@ -0,0 +1,1923 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +// +build go1.14 + +package bidi + +// UnicodeVersion is the Unicode version from which the tables in this package are derived. +const UnicodeVersion = "12.0.0" + +// xorMasks contains masks to be xor-ed with brackets to get the reverse +// version. +var xorMasks = []int32{ // 8 elements + 0, 1, 6, 7, 3, 15, 29, 63, +} // Size: 56 bytes + +// lookup returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *bidiTrie) lookup(s []byte) (v uint8, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return bidiValues[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := bidiIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := bidiIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = bidiIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := bidiIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = bidiIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = bidiIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *bidiTrie) lookupUnsafe(s []byte) uint8 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return bidiValues[c0] + } + i := bidiIndex[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = bidiIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = bidiIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// lookupString returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *bidiTrie) lookupString(s string) (v uint8, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return bidiValues[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := bidiIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := bidiIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = bidiIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := bidiIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = bidiIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = bidiIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *bidiTrie) lookupStringUnsafe(s string) uint8 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return bidiValues[c0] + } + i := bidiIndex[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = bidiIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = bidiIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// bidiTrie. Total size: 16896 bytes (16.50 KiB). Checksum: 6f0927067913dc6d. +type bidiTrie struct{} + +func newBidiTrie(i int) *bidiTrie { + return &bidiTrie{} +} + +// lookupValue determines the type of block n and looks up the value for b. +func (t *bidiTrie) lookupValue(n uint32, b byte) uint8 { + switch { + default: + return uint8(bidiValues[n<<6+uint32(b)]) + } +} + +// bidiValues: 240 blocks, 15360 entries, 15360 bytes +// The third block is the zero block. +var bidiValues = [15360]uint8{ + // Block 0x0, offset 0x0 + 0x00: 0x000b, 0x01: 0x000b, 0x02: 0x000b, 0x03: 0x000b, 0x04: 0x000b, 0x05: 0x000b, + 0x06: 0x000b, 0x07: 0x000b, 0x08: 0x000b, 0x09: 0x0008, 0x0a: 0x0007, 0x0b: 0x0008, + 0x0c: 0x0009, 0x0d: 0x0007, 0x0e: 0x000b, 0x0f: 0x000b, 0x10: 0x000b, 0x11: 0x000b, + 0x12: 0x000b, 0x13: 0x000b, 0x14: 0x000b, 0x15: 0x000b, 0x16: 0x000b, 0x17: 0x000b, + 0x18: 0x000b, 0x19: 0x000b, 0x1a: 0x000b, 0x1b: 0x000b, 0x1c: 0x0007, 0x1d: 0x0007, + 0x1e: 0x0007, 0x1f: 0x0008, 0x20: 0x0009, 0x21: 0x000a, 0x22: 0x000a, 0x23: 0x0004, + 0x24: 0x0004, 0x25: 0x0004, 0x26: 0x000a, 0x27: 0x000a, 0x28: 0x003a, 0x29: 0x002a, + 0x2a: 0x000a, 0x2b: 0x0003, 0x2c: 0x0006, 0x2d: 0x0003, 0x2e: 0x0006, 0x2f: 0x0006, + 0x30: 0x0002, 0x31: 0x0002, 0x32: 0x0002, 0x33: 0x0002, 0x34: 0x0002, 0x35: 0x0002, + 0x36: 0x0002, 0x37: 0x0002, 0x38: 0x0002, 0x39: 0x0002, 0x3a: 0x0006, 0x3b: 0x000a, + 0x3c: 0x000a, 0x3d: 0x000a, 0x3e: 0x000a, 0x3f: 0x000a, + // Block 0x1, offset 0x40 + 0x40: 0x000a, + 0x5b: 0x005a, 0x5c: 0x000a, 0x5d: 0x004a, + 0x5e: 0x000a, 0x5f: 0x000a, 0x60: 0x000a, + 0x7b: 0x005a, + 0x7c: 0x000a, 0x7d: 0x004a, 0x7e: 0x000a, 0x7f: 0x000b, + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xc0: 0x000b, 0xc1: 0x000b, 0xc2: 0x000b, 0xc3: 0x000b, 0xc4: 0x000b, 0xc5: 0x0007, + 0xc6: 0x000b, 0xc7: 0x000b, 0xc8: 0x000b, 0xc9: 0x000b, 0xca: 0x000b, 0xcb: 0x000b, + 0xcc: 0x000b, 0xcd: 0x000b, 0xce: 0x000b, 0xcf: 0x000b, 0xd0: 0x000b, 0xd1: 0x000b, + 0xd2: 0x000b, 0xd3: 0x000b, 0xd4: 0x000b, 0xd5: 0x000b, 0xd6: 0x000b, 0xd7: 0x000b, + 0xd8: 0x000b, 0xd9: 0x000b, 0xda: 0x000b, 0xdb: 0x000b, 0xdc: 0x000b, 0xdd: 0x000b, + 0xde: 0x000b, 0xdf: 0x000b, 0xe0: 0x0006, 0xe1: 0x000a, 0xe2: 0x0004, 0xe3: 0x0004, + 0xe4: 0x0004, 0xe5: 0x0004, 0xe6: 0x000a, 0xe7: 0x000a, 0xe8: 0x000a, 0xe9: 0x000a, + 0xeb: 0x000a, 0xec: 0x000a, 0xed: 0x000b, 0xee: 0x000a, 0xef: 0x000a, + 0xf0: 0x0004, 0xf1: 0x0004, 0xf2: 0x0002, 0xf3: 0x0002, 0xf4: 0x000a, + 0xf6: 0x000a, 0xf7: 0x000a, 0xf8: 0x000a, 0xf9: 0x0002, 0xfb: 0x000a, + 0xfc: 0x000a, 0xfd: 0x000a, 0xfe: 0x000a, 0xff: 0x000a, + // Block 0x4, offset 0x100 + 0x117: 0x000a, + 0x137: 0x000a, + // Block 0x5, offset 0x140 + 0x179: 0x000a, 0x17a: 0x000a, + // Block 0x6, offset 0x180 + 0x182: 0x000a, 0x183: 0x000a, 0x184: 0x000a, 0x185: 0x000a, + 0x186: 0x000a, 0x187: 0x000a, 0x188: 0x000a, 0x189: 0x000a, 0x18a: 0x000a, 0x18b: 0x000a, + 0x18c: 0x000a, 0x18d: 0x000a, 0x18e: 0x000a, 0x18f: 0x000a, + 0x192: 0x000a, 0x193: 0x000a, 0x194: 0x000a, 0x195: 0x000a, 0x196: 0x000a, 0x197: 0x000a, + 0x198: 0x000a, 0x199: 0x000a, 0x19a: 0x000a, 0x19b: 0x000a, 0x19c: 0x000a, 0x19d: 0x000a, + 0x19e: 0x000a, 0x19f: 0x000a, + 0x1a5: 0x000a, 0x1a6: 0x000a, 0x1a7: 0x000a, 0x1a8: 0x000a, 0x1a9: 0x000a, + 0x1aa: 0x000a, 0x1ab: 0x000a, 0x1ac: 0x000a, 0x1ad: 0x000a, 0x1af: 0x000a, + 0x1b0: 0x000a, 0x1b1: 0x000a, 0x1b2: 0x000a, 0x1b3: 0x000a, 0x1b4: 0x000a, 0x1b5: 0x000a, + 0x1b6: 0x000a, 0x1b7: 0x000a, 0x1b8: 0x000a, 0x1b9: 0x000a, 0x1ba: 0x000a, 0x1bb: 0x000a, + 0x1bc: 0x000a, 0x1bd: 0x000a, 0x1be: 0x000a, 0x1bf: 0x000a, + // Block 0x7, offset 0x1c0 + 0x1c0: 0x000c, 0x1c1: 0x000c, 0x1c2: 0x000c, 0x1c3: 0x000c, 0x1c4: 0x000c, 0x1c5: 0x000c, + 0x1c6: 0x000c, 0x1c7: 0x000c, 0x1c8: 0x000c, 0x1c9: 0x000c, 0x1ca: 0x000c, 0x1cb: 0x000c, + 0x1cc: 0x000c, 0x1cd: 0x000c, 0x1ce: 0x000c, 0x1cf: 0x000c, 0x1d0: 0x000c, 0x1d1: 0x000c, + 0x1d2: 0x000c, 0x1d3: 0x000c, 0x1d4: 0x000c, 0x1d5: 0x000c, 0x1d6: 0x000c, 0x1d7: 0x000c, + 0x1d8: 0x000c, 0x1d9: 0x000c, 0x1da: 0x000c, 0x1db: 0x000c, 0x1dc: 0x000c, 0x1dd: 0x000c, + 0x1de: 0x000c, 0x1df: 0x000c, 0x1e0: 0x000c, 0x1e1: 0x000c, 0x1e2: 0x000c, 0x1e3: 0x000c, + 0x1e4: 0x000c, 0x1e5: 0x000c, 0x1e6: 0x000c, 0x1e7: 0x000c, 0x1e8: 0x000c, 0x1e9: 0x000c, + 0x1ea: 0x000c, 0x1eb: 0x000c, 0x1ec: 0x000c, 0x1ed: 0x000c, 0x1ee: 0x000c, 0x1ef: 0x000c, + 0x1f0: 0x000c, 0x1f1: 0x000c, 0x1f2: 0x000c, 0x1f3: 0x000c, 0x1f4: 0x000c, 0x1f5: 0x000c, + 0x1f6: 0x000c, 0x1f7: 0x000c, 0x1f8: 0x000c, 0x1f9: 0x000c, 0x1fa: 0x000c, 0x1fb: 0x000c, + 0x1fc: 0x000c, 0x1fd: 0x000c, 0x1fe: 0x000c, 0x1ff: 0x000c, + // Block 0x8, offset 0x200 + 0x200: 0x000c, 0x201: 0x000c, 0x202: 0x000c, 0x203: 0x000c, 0x204: 0x000c, 0x205: 0x000c, + 0x206: 0x000c, 0x207: 0x000c, 0x208: 0x000c, 0x209: 0x000c, 0x20a: 0x000c, 0x20b: 0x000c, + 0x20c: 0x000c, 0x20d: 0x000c, 0x20e: 0x000c, 0x20f: 0x000c, 0x210: 0x000c, 0x211: 0x000c, + 0x212: 0x000c, 0x213: 0x000c, 0x214: 0x000c, 0x215: 0x000c, 0x216: 0x000c, 0x217: 0x000c, + 0x218: 0x000c, 0x219: 0x000c, 0x21a: 0x000c, 0x21b: 0x000c, 0x21c: 0x000c, 0x21d: 0x000c, + 0x21e: 0x000c, 0x21f: 0x000c, 0x220: 0x000c, 0x221: 0x000c, 0x222: 0x000c, 0x223: 0x000c, + 0x224: 0x000c, 0x225: 0x000c, 0x226: 0x000c, 0x227: 0x000c, 0x228: 0x000c, 0x229: 0x000c, + 0x22a: 0x000c, 0x22b: 0x000c, 0x22c: 0x000c, 0x22d: 0x000c, 0x22e: 0x000c, 0x22f: 0x000c, + 0x234: 0x000a, 0x235: 0x000a, + 0x23e: 0x000a, + // Block 0x9, offset 0x240 + 0x244: 0x000a, 0x245: 0x000a, + 0x247: 0x000a, + // Block 0xa, offset 0x280 + 0x2b6: 0x000a, + // Block 0xb, offset 0x2c0 + 0x2c3: 0x000c, 0x2c4: 0x000c, 0x2c5: 0x000c, + 0x2c6: 0x000c, 0x2c7: 0x000c, 0x2c8: 0x000c, 0x2c9: 0x000c, + // Block 0xc, offset 0x300 + 0x30a: 0x000a, + 0x30d: 0x000a, 0x30e: 0x000a, 0x30f: 0x0004, 0x310: 0x0001, 0x311: 0x000c, + 0x312: 0x000c, 0x313: 0x000c, 0x314: 0x000c, 0x315: 0x000c, 0x316: 0x000c, 0x317: 0x000c, + 0x318: 0x000c, 0x319: 0x000c, 0x31a: 0x000c, 0x31b: 0x000c, 0x31c: 0x000c, 0x31d: 0x000c, + 0x31e: 0x000c, 0x31f: 0x000c, 0x320: 0x000c, 0x321: 0x000c, 0x322: 0x000c, 0x323: 0x000c, + 0x324: 0x000c, 0x325: 0x000c, 0x326: 0x000c, 0x327: 0x000c, 0x328: 0x000c, 0x329: 0x000c, + 0x32a: 0x000c, 0x32b: 0x000c, 0x32c: 0x000c, 0x32d: 0x000c, 0x32e: 0x000c, 0x32f: 0x000c, + 0x330: 0x000c, 0x331: 0x000c, 0x332: 0x000c, 0x333: 0x000c, 0x334: 0x000c, 0x335: 0x000c, + 0x336: 0x000c, 0x337: 0x000c, 0x338: 0x000c, 0x339: 0x000c, 0x33a: 0x000c, 0x33b: 0x000c, + 0x33c: 0x000c, 0x33d: 0x000c, 0x33e: 0x0001, 0x33f: 0x000c, + // Block 0xd, offset 0x340 + 0x340: 0x0001, 0x341: 0x000c, 0x342: 0x000c, 0x343: 0x0001, 0x344: 0x000c, 0x345: 0x000c, + 0x346: 0x0001, 0x347: 0x000c, 0x348: 0x0001, 0x349: 0x0001, 0x34a: 0x0001, 0x34b: 0x0001, + 0x34c: 0x0001, 0x34d: 0x0001, 0x34e: 0x0001, 0x34f: 0x0001, 0x350: 0x0001, 0x351: 0x0001, + 0x352: 0x0001, 0x353: 0x0001, 0x354: 0x0001, 0x355: 0x0001, 0x356: 0x0001, 0x357: 0x0001, + 0x358: 0x0001, 0x359: 0x0001, 0x35a: 0x0001, 0x35b: 0x0001, 0x35c: 0x0001, 0x35d: 0x0001, + 0x35e: 0x0001, 0x35f: 0x0001, 0x360: 0x0001, 0x361: 0x0001, 0x362: 0x0001, 0x363: 0x0001, + 0x364: 0x0001, 0x365: 0x0001, 0x366: 0x0001, 0x367: 0x0001, 0x368: 0x0001, 0x369: 0x0001, + 0x36a: 0x0001, 0x36b: 0x0001, 0x36c: 0x0001, 0x36d: 0x0001, 0x36e: 0x0001, 0x36f: 0x0001, + 0x370: 0x0001, 0x371: 0x0001, 0x372: 0x0001, 0x373: 0x0001, 0x374: 0x0001, 0x375: 0x0001, + 0x376: 0x0001, 0x377: 0x0001, 0x378: 0x0001, 0x379: 0x0001, 0x37a: 0x0001, 0x37b: 0x0001, + 0x37c: 0x0001, 0x37d: 0x0001, 0x37e: 0x0001, 0x37f: 0x0001, + // Block 0xe, offset 0x380 + 0x380: 0x0005, 0x381: 0x0005, 0x382: 0x0005, 0x383: 0x0005, 0x384: 0x0005, 0x385: 0x0005, + 0x386: 0x000a, 0x387: 0x000a, 0x388: 0x000d, 0x389: 0x0004, 0x38a: 0x0004, 0x38b: 0x000d, + 0x38c: 0x0006, 0x38d: 0x000d, 0x38e: 0x000a, 0x38f: 0x000a, 0x390: 0x000c, 0x391: 0x000c, + 0x392: 0x000c, 0x393: 0x000c, 0x394: 0x000c, 0x395: 0x000c, 0x396: 0x000c, 0x397: 0x000c, + 0x398: 0x000c, 0x399: 0x000c, 0x39a: 0x000c, 0x39b: 0x000d, 0x39c: 0x000d, 0x39d: 0x000d, + 0x39e: 0x000d, 0x39f: 0x000d, 0x3a0: 0x000d, 0x3a1: 0x000d, 0x3a2: 0x000d, 0x3a3: 0x000d, + 0x3a4: 0x000d, 0x3a5: 0x000d, 0x3a6: 0x000d, 0x3a7: 0x000d, 0x3a8: 0x000d, 0x3a9: 0x000d, + 0x3aa: 0x000d, 0x3ab: 0x000d, 0x3ac: 0x000d, 0x3ad: 0x000d, 0x3ae: 0x000d, 0x3af: 0x000d, + 0x3b0: 0x000d, 0x3b1: 0x000d, 0x3b2: 0x000d, 0x3b3: 0x000d, 0x3b4: 0x000d, 0x3b5: 0x000d, + 0x3b6: 0x000d, 0x3b7: 0x000d, 0x3b8: 0x000d, 0x3b9: 0x000d, 0x3ba: 0x000d, 0x3bb: 0x000d, + 0x3bc: 0x000d, 0x3bd: 0x000d, 0x3be: 0x000d, 0x3bf: 0x000d, + // Block 0xf, offset 0x3c0 + 0x3c0: 0x000d, 0x3c1: 0x000d, 0x3c2: 0x000d, 0x3c3: 0x000d, 0x3c4: 0x000d, 0x3c5: 0x000d, + 0x3c6: 0x000d, 0x3c7: 0x000d, 0x3c8: 0x000d, 0x3c9: 0x000d, 0x3ca: 0x000d, 0x3cb: 0x000c, + 0x3cc: 0x000c, 0x3cd: 0x000c, 0x3ce: 0x000c, 0x3cf: 0x000c, 0x3d0: 0x000c, 0x3d1: 0x000c, + 0x3d2: 0x000c, 0x3d3: 0x000c, 0x3d4: 0x000c, 0x3d5: 0x000c, 0x3d6: 0x000c, 0x3d7: 0x000c, + 0x3d8: 0x000c, 0x3d9: 0x000c, 0x3da: 0x000c, 0x3db: 0x000c, 0x3dc: 0x000c, 0x3dd: 0x000c, + 0x3de: 0x000c, 0x3df: 0x000c, 0x3e0: 0x0005, 0x3e1: 0x0005, 0x3e2: 0x0005, 0x3e3: 0x0005, + 0x3e4: 0x0005, 0x3e5: 0x0005, 0x3e6: 0x0005, 0x3e7: 0x0005, 0x3e8: 0x0005, 0x3e9: 0x0005, + 0x3ea: 0x0004, 0x3eb: 0x0005, 0x3ec: 0x0005, 0x3ed: 0x000d, 0x3ee: 0x000d, 0x3ef: 0x000d, + 0x3f0: 0x000c, 0x3f1: 0x000d, 0x3f2: 0x000d, 0x3f3: 0x000d, 0x3f4: 0x000d, 0x3f5: 0x000d, + 0x3f6: 0x000d, 0x3f7: 0x000d, 0x3f8: 0x000d, 0x3f9: 0x000d, 0x3fa: 0x000d, 0x3fb: 0x000d, + 0x3fc: 0x000d, 0x3fd: 0x000d, 0x3fe: 0x000d, 0x3ff: 0x000d, + // Block 0x10, offset 0x400 + 0x400: 0x000d, 0x401: 0x000d, 0x402: 0x000d, 0x403: 0x000d, 0x404: 0x000d, 0x405: 0x000d, + 0x406: 0x000d, 0x407: 0x000d, 0x408: 0x000d, 0x409: 0x000d, 0x40a: 0x000d, 0x40b: 0x000d, + 0x40c: 0x000d, 0x40d: 0x000d, 0x40e: 0x000d, 0x40f: 0x000d, 0x410: 0x000d, 0x411: 0x000d, + 0x412: 0x000d, 0x413: 0x000d, 0x414: 0x000d, 0x415: 0x000d, 0x416: 0x000d, 0x417: 0x000d, + 0x418: 0x000d, 0x419: 0x000d, 0x41a: 0x000d, 0x41b: 0x000d, 0x41c: 0x000d, 0x41d: 0x000d, + 0x41e: 0x000d, 0x41f: 0x000d, 0x420: 0x000d, 0x421: 0x000d, 0x422: 0x000d, 0x423: 0x000d, + 0x424: 0x000d, 0x425: 0x000d, 0x426: 0x000d, 0x427: 0x000d, 0x428: 0x000d, 0x429: 0x000d, + 0x42a: 0x000d, 0x42b: 0x000d, 0x42c: 0x000d, 0x42d: 0x000d, 0x42e: 0x000d, 0x42f: 0x000d, + 0x430: 0x000d, 0x431: 0x000d, 0x432: 0x000d, 0x433: 0x000d, 0x434: 0x000d, 0x435: 0x000d, + 0x436: 0x000d, 0x437: 0x000d, 0x438: 0x000d, 0x439: 0x000d, 0x43a: 0x000d, 0x43b: 0x000d, + 0x43c: 0x000d, 0x43d: 0x000d, 0x43e: 0x000d, 0x43f: 0x000d, + // Block 0x11, offset 0x440 + 0x440: 0x000d, 0x441: 0x000d, 0x442: 0x000d, 0x443: 0x000d, 0x444: 0x000d, 0x445: 0x000d, + 0x446: 0x000d, 0x447: 0x000d, 0x448: 0x000d, 0x449: 0x000d, 0x44a: 0x000d, 0x44b: 0x000d, + 0x44c: 0x000d, 0x44d: 0x000d, 0x44e: 0x000d, 0x44f: 0x000d, 0x450: 0x000d, 0x451: 0x000d, + 0x452: 0x000d, 0x453: 0x000d, 0x454: 0x000d, 0x455: 0x000d, 0x456: 0x000c, 0x457: 0x000c, + 0x458: 0x000c, 0x459: 0x000c, 0x45a: 0x000c, 0x45b: 0x000c, 0x45c: 0x000c, 0x45d: 0x0005, + 0x45e: 0x000a, 0x45f: 0x000c, 0x460: 0x000c, 0x461: 0x000c, 0x462: 0x000c, 0x463: 0x000c, + 0x464: 0x000c, 0x465: 0x000d, 0x466: 0x000d, 0x467: 0x000c, 0x468: 0x000c, 0x469: 0x000a, + 0x46a: 0x000c, 0x46b: 0x000c, 0x46c: 0x000c, 0x46d: 0x000c, 0x46e: 0x000d, 0x46f: 0x000d, + 0x470: 0x0002, 0x471: 0x0002, 0x472: 0x0002, 0x473: 0x0002, 0x474: 0x0002, 0x475: 0x0002, + 0x476: 0x0002, 0x477: 0x0002, 0x478: 0x0002, 0x479: 0x0002, 0x47a: 0x000d, 0x47b: 0x000d, + 0x47c: 0x000d, 0x47d: 0x000d, 0x47e: 0x000d, 0x47f: 0x000d, + // Block 0x12, offset 0x480 + 0x480: 0x000d, 0x481: 0x000d, 0x482: 0x000d, 0x483: 0x000d, 0x484: 0x000d, 0x485: 0x000d, + 0x486: 0x000d, 0x487: 0x000d, 0x488: 0x000d, 0x489: 0x000d, 0x48a: 0x000d, 0x48b: 0x000d, + 0x48c: 0x000d, 0x48d: 0x000d, 0x48e: 0x000d, 0x48f: 0x000d, 0x490: 0x000d, 0x491: 0x000c, + 0x492: 0x000d, 0x493: 0x000d, 0x494: 0x000d, 0x495: 0x000d, 0x496: 0x000d, 0x497: 0x000d, + 0x498: 0x000d, 0x499: 0x000d, 0x49a: 0x000d, 0x49b: 0x000d, 0x49c: 0x000d, 0x49d: 0x000d, + 0x49e: 0x000d, 0x49f: 0x000d, 0x4a0: 0x000d, 0x4a1: 0x000d, 0x4a2: 0x000d, 0x4a3: 0x000d, + 0x4a4: 0x000d, 0x4a5: 0x000d, 0x4a6: 0x000d, 0x4a7: 0x000d, 0x4a8: 0x000d, 0x4a9: 0x000d, + 0x4aa: 0x000d, 0x4ab: 0x000d, 0x4ac: 0x000d, 0x4ad: 0x000d, 0x4ae: 0x000d, 0x4af: 0x000d, + 0x4b0: 0x000c, 0x4b1: 0x000c, 0x4b2: 0x000c, 0x4b3: 0x000c, 0x4b4: 0x000c, 0x4b5: 0x000c, + 0x4b6: 0x000c, 0x4b7: 0x000c, 0x4b8: 0x000c, 0x4b9: 0x000c, 0x4ba: 0x000c, 0x4bb: 0x000c, + 0x4bc: 0x000c, 0x4bd: 0x000c, 0x4be: 0x000c, 0x4bf: 0x000c, + // Block 0x13, offset 0x4c0 + 0x4c0: 0x000c, 0x4c1: 0x000c, 0x4c2: 0x000c, 0x4c3: 0x000c, 0x4c4: 0x000c, 0x4c5: 0x000c, + 0x4c6: 0x000c, 0x4c7: 0x000c, 0x4c8: 0x000c, 0x4c9: 0x000c, 0x4ca: 0x000c, 0x4cb: 0x000d, + 0x4cc: 0x000d, 0x4cd: 0x000d, 0x4ce: 0x000d, 0x4cf: 0x000d, 0x4d0: 0x000d, 0x4d1: 0x000d, + 0x4d2: 0x000d, 0x4d3: 0x000d, 0x4d4: 0x000d, 0x4d5: 0x000d, 0x4d6: 0x000d, 0x4d7: 0x000d, + 0x4d8: 0x000d, 0x4d9: 0x000d, 0x4da: 0x000d, 0x4db: 0x000d, 0x4dc: 0x000d, 0x4dd: 0x000d, + 0x4de: 0x000d, 0x4df: 0x000d, 0x4e0: 0x000d, 0x4e1: 0x000d, 0x4e2: 0x000d, 0x4e3: 0x000d, + 0x4e4: 0x000d, 0x4e5: 0x000d, 0x4e6: 0x000d, 0x4e7: 0x000d, 0x4e8: 0x000d, 0x4e9: 0x000d, + 0x4ea: 0x000d, 0x4eb: 0x000d, 0x4ec: 0x000d, 0x4ed: 0x000d, 0x4ee: 0x000d, 0x4ef: 0x000d, + 0x4f0: 0x000d, 0x4f1: 0x000d, 0x4f2: 0x000d, 0x4f3: 0x000d, 0x4f4: 0x000d, 0x4f5: 0x000d, + 0x4f6: 0x000d, 0x4f7: 0x000d, 0x4f8: 0x000d, 0x4f9: 0x000d, 0x4fa: 0x000d, 0x4fb: 0x000d, + 0x4fc: 0x000d, 0x4fd: 0x000d, 0x4fe: 0x000d, 0x4ff: 0x000d, + // Block 0x14, offset 0x500 + 0x500: 0x000d, 0x501: 0x000d, 0x502: 0x000d, 0x503: 0x000d, 0x504: 0x000d, 0x505: 0x000d, + 0x506: 0x000d, 0x507: 0x000d, 0x508: 0x000d, 0x509: 0x000d, 0x50a: 0x000d, 0x50b: 0x000d, + 0x50c: 0x000d, 0x50d: 0x000d, 0x50e: 0x000d, 0x50f: 0x000d, 0x510: 0x000d, 0x511: 0x000d, + 0x512: 0x000d, 0x513: 0x000d, 0x514: 0x000d, 0x515: 0x000d, 0x516: 0x000d, 0x517: 0x000d, + 0x518: 0x000d, 0x519: 0x000d, 0x51a: 0x000d, 0x51b: 0x000d, 0x51c: 0x000d, 0x51d: 0x000d, + 0x51e: 0x000d, 0x51f: 0x000d, 0x520: 0x000d, 0x521: 0x000d, 0x522: 0x000d, 0x523: 0x000d, + 0x524: 0x000d, 0x525: 0x000d, 0x526: 0x000c, 0x527: 0x000c, 0x528: 0x000c, 0x529: 0x000c, + 0x52a: 0x000c, 0x52b: 0x000c, 0x52c: 0x000c, 0x52d: 0x000c, 0x52e: 0x000c, 0x52f: 0x000c, + 0x530: 0x000c, 0x531: 0x000d, 0x532: 0x000d, 0x533: 0x000d, 0x534: 0x000d, 0x535: 0x000d, + 0x536: 0x000d, 0x537: 0x000d, 0x538: 0x000d, 0x539: 0x000d, 0x53a: 0x000d, 0x53b: 0x000d, + 0x53c: 0x000d, 0x53d: 0x000d, 0x53e: 0x000d, 0x53f: 0x000d, + // Block 0x15, offset 0x540 + 0x540: 0x0001, 0x541: 0x0001, 0x542: 0x0001, 0x543: 0x0001, 0x544: 0x0001, 0x545: 0x0001, + 0x546: 0x0001, 0x547: 0x0001, 0x548: 0x0001, 0x549: 0x0001, 0x54a: 0x0001, 0x54b: 0x0001, + 0x54c: 0x0001, 0x54d: 0x0001, 0x54e: 0x0001, 0x54f: 0x0001, 0x550: 0x0001, 0x551: 0x0001, + 0x552: 0x0001, 0x553: 0x0001, 0x554: 0x0001, 0x555: 0x0001, 0x556: 0x0001, 0x557: 0x0001, + 0x558: 0x0001, 0x559: 0x0001, 0x55a: 0x0001, 0x55b: 0x0001, 0x55c: 0x0001, 0x55d: 0x0001, + 0x55e: 0x0001, 0x55f: 0x0001, 0x560: 0x0001, 0x561: 0x0001, 0x562: 0x0001, 0x563: 0x0001, + 0x564: 0x0001, 0x565: 0x0001, 0x566: 0x0001, 0x567: 0x0001, 0x568: 0x0001, 0x569: 0x0001, + 0x56a: 0x0001, 0x56b: 0x000c, 0x56c: 0x000c, 0x56d: 0x000c, 0x56e: 0x000c, 0x56f: 0x000c, + 0x570: 0x000c, 0x571: 0x000c, 0x572: 0x000c, 0x573: 0x000c, 0x574: 0x0001, 0x575: 0x0001, + 0x576: 0x000a, 0x577: 0x000a, 0x578: 0x000a, 0x579: 0x000a, 0x57a: 0x0001, 0x57b: 0x0001, + 0x57c: 0x0001, 0x57d: 0x000c, 0x57e: 0x0001, 0x57f: 0x0001, + // Block 0x16, offset 0x580 + 0x580: 0x0001, 0x581: 0x0001, 0x582: 0x0001, 0x583: 0x0001, 0x584: 0x0001, 0x585: 0x0001, + 0x586: 0x0001, 0x587: 0x0001, 0x588: 0x0001, 0x589: 0x0001, 0x58a: 0x0001, 0x58b: 0x0001, + 0x58c: 0x0001, 0x58d: 0x0001, 0x58e: 0x0001, 0x58f: 0x0001, 0x590: 0x0001, 0x591: 0x0001, + 0x592: 0x0001, 0x593: 0x0001, 0x594: 0x0001, 0x595: 0x0001, 0x596: 0x000c, 0x597: 0x000c, + 0x598: 0x000c, 0x599: 0x000c, 0x59a: 0x0001, 0x59b: 0x000c, 0x59c: 0x000c, 0x59d: 0x000c, + 0x59e: 0x000c, 0x59f: 0x000c, 0x5a0: 0x000c, 0x5a1: 0x000c, 0x5a2: 0x000c, 0x5a3: 0x000c, + 0x5a4: 0x0001, 0x5a5: 0x000c, 0x5a6: 0x000c, 0x5a7: 0x000c, 0x5a8: 0x0001, 0x5a9: 0x000c, + 0x5aa: 0x000c, 0x5ab: 0x000c, 0x5ac: 0x000c, 0x5ad: 0x000c, 0x5ae: 0x0001, 0x5af: 0x0001, + 0x5b0: 0x0001, 0x5b1: 0x0001, 0x5b2: 0x0001, 0x5b3: 0x0001, 0x5b4: 0x0001, 0x5b5: 0x0001, + 0x5b6: 0x0001, 0x5b7: 0x0001, 0x5b8: 0x0001, 0x5b9: 0x0001, 0x5ba: 0x0001, 0x5bb: 0x0001, + 0x5bc: 0x0001, 0x5bd: 0x0001, 0x5be: 0x0001, 0x5bf: 0x0001, + // Block 0x17, offset 0x5c0 + 0x5c0: 0x0001, 0x5c1: 0x0001, 0x5c2: 0x0001, 0x5c3: 0x0001, 0x5c4: 0x0001, 0x5c5: 0x0001, + 0x5c6: 0x0001, 0x5c7: 0x0001, 0x5c8: 0x0001, 0x5c9: 0x0001, 0x5ca: 0x0001, 0x5cb: 0x0001, + 0x5cc: 0x0001, 0x5cd: 0x0001, 0x5ce: 0x0001, 0x5cf: 0x0001, 0x5d0: 0x0001, 0x5d1: 0x0001, + 0x5d2: 0x0001, 0x5d3: 0x0001, 0x5d4: 0x0001, 0x5d5: 0x0001, 0x5d6: 0x0001, 0x5d7: 0x0001, + 0x5d8: 0x0001, 0x5d9: 0x000c, 0x5da: 0x000c, 0x5db: 0x000c, 0x5dc: 0x0001, 0x5dd: 0x0001, + 0x5de: 0x0001, 0x5df: 0x0001, 0x5e0: 0x000d, 0x5e1: 0x000d, 0x5e2: 0x000d, 0x5e3: 0x000d, + 0x5e4: 0x000d, 0x5e5: 0x000d, 0x5e6: 0x000d, 0x5e7: 0x000d, 0x5e8: 0x000d, 0x5e9: 0x000d, + 0x5ea: 0x000d, 0x5eb: 0x000d, 0x5ec: 0x000d, 0x5ed: 0x000d, 0x5ee: 0x000d, 0x5ef: 0x000d, + 0x5f0: 0x0001, 0x5f1: 0x0001, 0x5f2: 0x0001, 0x5f3: 0x0001, 0x5f4: 0x0001, 0x5f5: 0x0001, + 0x5f6: 0x0001, 0x5f7: 0x0001, 0x5f8: 0x0001, 0x5f9: 0x0001, 0x5fa: 0x0001, 0x5fb: 0x0001, + 0x5fc: 0x0001, 0x5fd: 0x0001, 0x5fe: 0x0001, 0x5ff: 0x0001, + // Block 0x18, offset 0x600 + 0x600: 0x0001, 0x601: 0x0001, 0x602: 0x0001, 0x603: 0x0001, 0x604: 0x0001, 0x605: 0x0001, + 0x606: 0x0001, 0x607: 0x0001, 0x608: 0x0001, 0x609: 0x0001, 0x60a: 0x0001, 0x60b: 0x0001, + 0x60c: 0x0001, 0x60d: 0x0001, 0x60e: 0x0001, 0x60f: 0x0001, 0x610: 0x0001, 0x611: 0x0001, + 0x612: 0x0001, 0x613: 0x0001, 0x614: 0x0001, 0x615: 0x0001, 0x616: 0x0001, 0x617: 0x0001, + 0x618: 0x0001, 0x619: 0x0001, 0x61a: 0x0001, 0x61b: 0x0001, 0x61c: 0x0001, 0x61d: 0x0001, + 0x61e: 0x0001, 0x61f: 0x0001, 0x620: 0x000d, 0x621: 0x000d, 0x622: 0x000d, 0x623: 0x000d, + 0x624: 0x000d, 0x625: 0x000d, 0x626: 0x000d, 0x627: 0x000d, 0x628: 0x000d, 0x629: 0x000d, + 0x62a: 0x000d, 0x62b: 0x000d, 0x62c: 0x000d, 0x62d: 0x000d, 0x62e: 0x000d, 0x62f: 0x000d, + 0x630: 0x000d, 0x631: 0x000d, 0x632: 0x000d, 0x633: 0x000d, 0x634: 0x000d, 0x635: 0x000d, + 0x636: 0x000d, 0x637: 0x000d, 0x638: 0x000d, 0x639: 0x000d, 0x63a: 0x000d, 0x63b: 0x000d, + 0x63c: 0x000d, 0x63d: 0x000d, 0x63e: 0x000d, 0x63f: 0x000d, + // Block 0x19, offset 0x640 + 0x640: 0x000d, 0x641: 0x000d, 0x642: 0x000d, 0x643: 0x000d, 0x644: 0x000d, 0x645: 0x000d, + 0x646: 0x000d, 0x647: 0x000d, 0x648: 0x000d, 0x649: 0x000d, 0x64a: 0x000d, 0x64b: 0x000d, + 0x64c: 0x000d, 0x64d: 0x000d, 0x64e: 0x000d, 0x64f: 0x000d, 0x650: 0x000d, 0x651: 0x000d, + 0x652: 0x000d, 0x653: 0x000c, 0x654: 0x000c, 0x655: 0x000c, 0x656: 0x000c, 0x657: 0x000c, + 0x658: 0x000c, 0x659: 0x000c, 0x65a: 0x000c, 0x65b: 0x000c, 0x65c: 0x000c, 0x65d: 0x000c, + 0x65e: 0x000c, 0x65f: 0x000c, 0x660: 0x000c, 0x661: 0x000c, 0x662: 0x0005, 0x663: 0x000c, + 0x664: 0x000c, 0x665: 0x000c, 0x666: 0x000c, 0x667: 0x000c, 0x668: 0x000c, 0x669: 0x000c, + 0x66a: 0x000c, 0x66b: 0x000c, 0x66c: 0x000c, 0x66d: 0x000c, 0x66e: 0x000c, 0x66f: 0x000c, + 0x670: 0x000c, 0x671: 0x000c, 0x672: 0x000c, 0x673: 0x000c, 0x674: 0x000c, 0x675: 0x000c, + 0x676: 0x000c, 0x677: 0x000c, 0x678: 0x000c, 0x679: 0x000c, 0x67a: 0x000c, 0x67b: 0x000c, + 0x67c: 0x000c, 0x67d: 0x000c, 0x67e: 0x000c, 0x67f: 0x000c, + // Block 0x1a, offset 0x680 + 0x680: 0x000c, 0x681: 0x000c, 0x682: 0x000c, + 0x6ba: 0x000c, + 0x6bc: 0x000c, + // Block 0x1b, offset 0x6c0 + 0x6c1: 0x000c, 0x6c2: 0x000c, 0x6c3: 0x000c, 0x6c4: 0x000c, 0x6c5: 0x000c, + 0x6c6: 0x000c, 0x6c7: 0x000c, 0x6c8: 0x000c, + 0x6cd: 0x000c, 0x6d1: 0x000c, + 0x6d2: 0x000c, 0x6d3: 0x000c, 0x6d4: 0x000c, 0x6d5: 0x000c, 0x6d6: 0x000c, 0x6d7: 0x000c, + 0x6e2: 0x000c, 0x6e3: 0x000c, + // Block 0x1c, offset 0x700 + 0x701: 0x000c, + 0x73c: 0x000c, + // Block 0x1d, offset 0x740 + 0x741: 0x000c, 0x742: 0x000c, 0x743: 0x000c, 0x744: 0x000c, + 0x74d: 0x000c, + 0x762: 0x000c, 0x763: 0x000c, + 0x772: 0x0004, 0x773: 0x0004, + 0x77b: 0x0004, + 0x77e: 0x000c, + // Block 0x1e, offset 0x780 + 0x781: 0x000c, 0x782: 0x000c, + 0x7bc: 0x000c, + // Block 0x1f, offset 0x7c0 + 0x7c1: 0x000c, 0x7c2: 0x000c, + 0x7c7: 0x000c, 0x7c8: 0x000c, 0x7cb: 0x000c, + 0x7cc: 0x000c, 0x7cd: 0x000c, 0x7d1: 0x000c, + 0x7f0: 0x000c, 0x7f1: 0x000c, 0x7f5: 0x000c, + // Block 0x20, offset 0x800 + 0x801: 0x000c, 0x802: 0x000c, 0x803: 0x000c, 0x804: 0x000c, 0x805: 0x000c, + 0x807: 0x000c, 0x808: 0x000c, + 0x80d: 0x000c, + 0x822: 0x000c, 0x823: 0x000c, + 0x831: 0x0004, + 0x83a: 0x000c, 0x83b: 0x000c, + 0x83c: 0x000c, 0x83d: 0x000c, 0x83e: 0x000c, 0x83f: 0x000c, + // Block 0x21, offset 0x840 + 0x841: 0x000c, + 0x87c: 0x000c, 0x87f: 0x000c, + // Block 0x22, offset 0x880 + 0x881: 0x000c, 0x882: 0x000c, 0x883: 0x000c, 0x884: 0x000c, + 0x88d: 0x000c, + 0x896: 0x000c, + 0x8a2: 0x000c, 0x8a3: 0x000c, + // Block 0x23, offset 0x8c0 + 0x8c2: 0x000c, + // Block 0x24, offset 0x900 + 0x900: 0x000c, + 0x90d: 0x000c, + 0x933: 0x000a, 0x934: 0x000a, 0x935: 0x000a, + 0x936: 0x000a, 0x937: 0x000a, 0x938: 0x000a, 0x939: 0x0004, 0x93a: 0x000a, + // Block 0x25, offset 0x940 + 0x940: 0x000c, 0x944: 0x000c, + 0x97e: 0x000c, 0x97f: 0x000c, + // Block 0x26, offset 0x980 + 0x980: 0x000c, + 0x986: 0x000c, 0x987: 0x000c, 0x988: 0x000c, 0x98a: 0x000c, 0x98b: 0x000c, + 0x98c: 0x000c, 0x98d: 0x000c, + 0x995: 0x000c, 0x996: 0x000c, + 0x9a2: 0x000c, 0x9a3: 0x000c, + 0x9b8: 0x000a, 0x9b9: 0x000a, 0x9ba: 0x000a, 0x9bb: 0x000a, + 0x9bc: 0x000a, 0x9bd: 0x000a, 0x9be: 0x000a, + // Block 0x27, offset 0x9c0 + 0x9cc: 0x000c, 0x9cd: 0x000c, + 0x9e2: 0x000c, 0x9e3: 0x000c, + // Block 0x28, offset 0xa00 + 0xa00: 0x000c, 0xa01: 0x000c, + 0xa3b: 0x000c, + 0xa3c: 0x000c, + // Block 0x29, offset 0xa40 + 0xa41: 0x000c, 0xa42: 0x000c, 0xa43: 0x000c, 0xa44: 0x000c, + 0xa4d: 0x000c, + 0xa62: 0x000c, 0xa63: 0x000c, + // Block 0x2a, offset 0xa80 + 0xa8a: 0x000c, + 0xa92: 0x000c, 0xa93: 0x000c, 0xa94: 0x000c, 0xa96: 0x000c, + // Block 0x2b, offset 0xac0 + 0xaf1: 0x000c, 0xaf4: 0x000c, 0xaf5: 0x000c, + 0xaf6: 0x000c, 0xaf7: 0x000c, 0xaf8: 0x000c, 0xaf9: 0x000c, 0xafa: 0x000c, + 0xaff: 0x0004, + // Block 0x2c, offset 0xb00 + 0xb07: 0x000c, 0xb08: 0x000c, 0xb09: 0x000c, 0xb0a: 0x000c, 0xb0b: 0x000c, + 0xb0c: 0x000c, 0xb0d: 0x000c, 0xb0e: 0x000c, + // Block 0x2d, offset 0xb40 + 0xb71: 0x000c, 0xb74: 0x000c, 0xb75: 0x000c, + 0xb76: 0x000c, 0xb77: 0x000c, 0xb78: 0x000c, 0xb79: 0x000c, 0xb7a: 0x000c, 0xb7b: 0x000c, + 0xb7c: 0x000c, + // Block 0x2e, offset 0xb80 + 0xb88: 0x000c, 0xb89: 0x000c, 0xb8a: 0x000c, 0xb8b: 0x000c, + 0xb8c: 0x000c, 0xb8d: 0x000c, + // Block 0x2f, offset 0xbc0 + 0xbd8: 0x000c, 0xbd9: 0x000c, + 0xbf5: 0x000c, + 0xbf7: 0x000c, 0xbf9: 0x000c, 0xbfa: 0x003a, 0xbfb: 0x002a, + 0xbfc: 0x003a, 0xbfd: 0x002a, + // Block 0x30, offset 0xc00 + 0xc31: 0x000c, 0xc32: 0x000c, 0xc33: 0x000c, 0xc34: 0x000c, 0xc35: 0x000c, + 0xc36: 0x000c, 0xc37: 0x000c, 0xc38: 0x000c, 0xc39: 0x000c, 0xc3a: 0x000c, 0xc3b: 0x000c, + 0xc3c: 0x000c, 0xc3d: 0x000c, 0xc3e: 0x000c, + // Block 0x31, offset 0xc40 + 0xc40: 0x000c, 0xc41: 0x000c, 0xc42: 0x000c, 0xc43: 0x000c, 0xc44: 0x000c, + 0xc46: 0x000c, 0xc47: 0x000c, + 0xc4d: 0x000c, 0xc4e: 0x000c, 0xc4f: 0x000c, 0xc50: 0x000c, 0xc51: 0x000c, + 0xc52: 0x000c, 0xc53: 0x000c, 0xc54: 0x000c, 0xc55: 0x000c, 0xc56: 0x000c, 0xc57: 0x000c, + 0xc59: 0x000c, 0xc5a: 0x000c, 0xc5b: 0x000c, 0xc5c: 0x000c, 0xc5d: 0x000c, + 0xc5e: 0x000c, 0xc5f: 0x000c, 0xc60: 0x000c, 0xc61: 0x000c, 0xc62: 0x000c, 0xc63: 0x000c, + 0xc64: 0x000c, 0xc65: 0x000c, 0xc66: 0x000c, 0xc67: 0x000c, 0xc68: 0x000c, 0xc69: 0x000c, + 0xc6a: 0x000c, 0xc6b: 0x000c, 0xc6c: 0x000c, 0xc6d: 0x000c, 0xc6e: 0x000c, 0xc6f: 0x000c, + 0xc70: 0x000c, 0xc71: 0x000c, 0xc72: 0x000c, 0xc73: 0x000c, 0xc74: 0x000c, 0xc75: 0x000c, + 0xc76: 0x000c, 0xc77: 0x000c, 0xc78: 0x000c, 0xc79: 0x000c, 0xc7a: 0x000c, 0xc7b: 0x000c, + 0xc7c: 0x000c, + // Block 0x32, offset 0xc80 + 0xc86: 0x000c, + // Block 0x33, offset 0xcc0 + 0xced: 0x000c, 0xcee: 0x000c, 0xcef: 0x000c, + 0xcf0: 0x000c, 0xcf2: 0x000c, 0xcf3: 0x000c, 0xcf4: 0x000c, 0xcf5: 0x000c, + 0xcf6: 0x000c, 0xcf7: 0x000c, 0xcf9: 0x000c, 0xcfa: 0x000c, + 0xcfd: 0x000c, 0xcfe: 0x000c, + // Block 0x34, offset 0xd00 + 0xd18: 0x000c, 0xd19: 0x000c, + 0xd1e: 0x000c, 0xd1f: 0x000c, 0xd20: 0x000c, + 0xd31: 0x000c, 0xd32: 0x000c, 0xd33: 0x000c, 0xd34: 0x000c, + // Block 0x35, offset 0xd40 + 0xd42: 0x000c, 0xd45: 0x000c, + 0xd46: 0x000c, + 0xd4d: 0x000c, + 0xd5d: 0x000c, + // Block 0x36, offset 0xd80 + 0xd9d: 0x000c, + 0xd9e: 0x000c, 0xd9f: 0x000c, + // Block 0x37, offset 0xdc0 + 0xdd0: 0x000a, 0xdd1: 0x000a, + 0xdd2: 0x000a, 0xdd3: 0x000a, 0xdd4: 0x000a, 0xdd5: 0x000a, 0xdd6: 0x000a, 0xdd7: 0x000a, + 0xdd8: 0x000a, 0xdd9: 0x000a, + // Block 0x38, offset 0xe00 + 0xe00: 0x000a, + // Block 0x39, offset 0xe40 + 0xe40: 0x0009, + 0xe5b: 0x007a, 0xe5c: 0x006a, + // Block 0x3a, offset 0xe80 + 0xe92: 0x000c, 0xe93: 0x000c, 0xe94: 0x000c, + 0xeb2: 0x000c, 0xeb3: 0x000c, 0xeb4: 0x000c, + // Block 0x3b, offset 0xec0 + 0xed2: 0x000c, 0xed3: 0x000c, + 0xef2: 0x000c, 0xef3: 0x000c, + // Block 0x3c, offset 0xf00 + 0xf34: 0x000c, 0xf35: 0x000c, + 0xf37: 0x000c, 0xf38: 0x000c, 0xf39: 0x000c, 0xf3a: 0x000c, 0xf3b: 0x000c, + 0xf3c: 0x000c, 0xf3d: 0x000c, + // Block 0x3d, offset 0xf40 + 0xf46: 0x000c, 0xf49: 0x000c, 0xf4a: 0x000c, 0xf4b: 0x000c, + 0xf4c: 0x000c, 0xf4d: 0x000c, 0xf4e: 0x000c, 0xf4f: 0x000c, 0xf50: 0x000c, 0xf51: 0x000c, + 0xf52: 0x000c, 0xf53: 0x000c, + 0xf5b: 0x0004, 0xf5d: 0x000c, + 0xf70: 0x000a, 0xf71: 0x000a, 0xf72: 0x000a, 0xf73: 0x000a, 0xf74: 0x000a, 0xf75: 0x000a, + 0xf76: 0x000a, 0xf77: 0x000a, 0xf78: 0x000a, 0xf79: 0x000a, + // Block 0x3e, offset 0xf80 + 0xf80: 0x000a, 0xf81: 0x000a, 0xf82: 0x000a, 0xf83: 0x000a, 0xf84: 0x000a, 0xf85: 0x000a, + 0xf86: 0x000a, 0xf87: 0x000a, 0xf88: 0x000a, 0xf89: 0x000a, 0xf8a: 0x000a, 0xf8b: 0x000c, + 0xf8c: 0x000c, 0xf8d: 0x000c, 0xf8e: 0x000b, + // Block 0x3f, offset 0xfc0 + 0xfc5: 0x000c, + 0xfc6: 0x000c, + 0xfe9: 0x000c, + // Block 0x40, offset 0x1000 + 0x1020: 0x000c, 0x1021: 0x000c, 0x1022: 0x000c, + 0x1027: 0x000c, 0x1028: 0x000c, + 0x1032: 0x000c, + 0x1039: 0x000c, 0x103a: 0x000c, 0x103b: 0x000c, + // Block 0x41, offset 0x1040 + 0x1040: 0x000a, 0x1044: 0x000a, 0x1045: 0x000a, + // Block 0x42, offset 0x1080 + 0x109e: 0x000a, 0x109f: 0x000a, 0x10a0: 0x000a, 0x10a1: 0x000a, 0x10a2: 0x000a, 0x10a3: 0x000a, + 0x10a4: 0x000a, 0x10a5: 0x000a, 0x10a6: 0x000a, 0x10a7: 0x000a, 0x10a8: 0x000a, 0x10a9: 0x000a, + 0x10aa: 0x000a, 0x10ab: 0x000a, 0x10ac: 0x000a, 0x10ad: 0x000a, 0x10ae: 0x000a, 0x10af: 0x000a, + 0x10b0: 0x000a, 0x10b1: 0x000a, 0x10b2: 0x000a, 0x10b3: 0x000a, 0x10b4: 0x000a, 0x10b5: 0x000a, + 0x10b6: 0x000a, 0x10b7: 0x000a, 0x10b8: 0x000a, 0x10b9: 0x000a, 0x10ba: 0x000a, 0x10bb: 0x000a, + 0x10bc: 0x000a, 0x10bd: 0x000a, 0x10be: 0x000a, 0x10bf: 0x000a, + // Block 0x43, offset 0x10c0 + 0x10d7: 0x000c, + 0x10d8: 0x000c, 0x10db: 0x000c, + // Block 0x44, offset 0x1100 + 0x1116: 0x000c, + 0x1118: 0x000c, 0x1119: 0x000c, 0x111a: 0x000c, 0x111b: 0x000c, 0x111c: 0x000c, 0x111d: 0x000c, + 0x111e: 0x000c, 0x1120: 0x000c, 0x1122: 0x000c, + 0x1125: 0x000c, 0x1126: 0x000c, 0x1127: 0x000c, 0x1128: 0x000c, 0x1129: 0x000c, + 0x112a: 0x000c, 0x112b: 0x000c, 0x112c: 0x000c, + 0x1133: 0x000c, 0x1134: 0x000c, 0x1135: 0x000c, + 0x1136: 0x000c, 0x1137: 0x000c, 0x1138: 0x000c, 0x1139: 0x000c, 0x113a: 0x000c, 0x113b: 0x000c, + 0x113c: 0x000c, 0x113f: 0x000c, + // Block 0x45, offset 0x1140 + 0x1170: 0x000c, 0x1171: 0x000c, 0x1172: 0x000c, 0x1173: 0x000c, 0x1174: 0x000c, 0x1175: 0x000c, + 0x1176: 0x000c, 0x1177: 0x000c, 0x1178: 0x000c, 0x1179: 0x000c, 0x117a: 0x000c, 0x117b: 0x000c, + 0x117c: 0x000c, 0x117d: 0x000c, 0x117e: 0x000c, + // Block 0x46, offset 0x1180 + 0x1180: 0x000c, 0x1181: 0x000c, 0x1182: 0x000c, 0x1183: 0x000c, + 0x11b4: 0x000c, + 0x11b6: 0x000c, 0x11b7: 0x000c, 0x11b8: 0x000c, 0x11b9: 0x000c, 0x11ba: 0x000c, + 0x11bc: 0x000c, + // Block 0x47, offset 0x11c0 + 0x11c2: 0x000c, + 0x11eb: 0x000c, 0x11ec: 0x000c, 0x11ed: 0x000c, 0x11ee: 0x000c, 0x11ef: 0x000c, + 0x11f0: 0x000c, 0x11f1: 0x000c, 0x11f2: 0x000c, 0x11f3: 0x000c, + // Block 0x48, offset 0x1200 + 0x1200: 0x000c, 0x1201: 0x000c, + 0x1222: 0x000c, 0x1223: 0x000c, + 0x1224: 0x000c, 0x1225: 0x000c, 0x1228: 0x000c, 0x1229: 0x000c, + 0x122b: 0x000c, 0x122c: 0x000c, 0x122d: 0x000c, + // Block 0x49, offset 0x1240 + 0x1266: 0x000c, 0x1268: 0x000c, 0x1269: 0x000c, + 0x126d: 0x000c, 0x126f: 0x000c, + 0x1270: 0x000c, 0x1271: 0x000c, + // Block 0x4a, offset 0x1280 + 0x12ac: 0x000c, 0x12ad: 0x000c, 0x12ae: 0x000c, 0x12af: 0x000c, + 0x12b0: 0x000c, 0x12b1: 0x000c, 0x12b2: 0x000c, 0x12b3: 0x000c, + 0x12b6: 0x000c, 0x12b7: 0x000c, + // Block 0x4b, offset 0x12c0 + 0x12d0: 0x000c, 0x12d1: 0x000c, + 0x12d2: 0x000c, 0x12d4: 0x000c, 0x12d5: 0x000c, 0x12d6: 0x000c, 0x12d7: 0x000c, + 0x12d8: 0x000c, 0x12d9: 0x000c, 0x12da: 0x000c, 0x12db: 0x000c, 0x12dc: 0x000c, 0x12dd: 0x000c, + 0x12de: 0x000c, 0x12df: 0x000c, 0x12e0: 0x000c, 0x12e2: 0x000c, 0x12e3: 0x000c, + 0x12e4: 0x000c, 0x12e5: 0x000c, 0x12e6: 0x000c, 0x12e7: 0x000c, 0x12e8: 0x000c, + 0x12ed: 0x000c, + 0x12f4: 0x000c, + 0x12f8: 0x000c, 0x12f9: 0x000c, + // Block 0x4c, offset 0x1300 + 0x1300: 0x000c, 0x1301: 0x000c, 0x1302: 0x000c, 0x1303: 0x000c, 0x1304: 0x000c, 0x1305: 0x000c, + 0x1306: 0x000c, 0x1307: 0x000c, 0x1308: 0x000c, 0x1309: 0x000c, 0x130a: 0x000c, 0x130b: 0x000c, + 0x130c: 0x000c, 0x130d: 0x000c, 0x130e: 0x000c, 0x130f: 0x000c, 0x1310: 0x000c, 0x1311: 0x000c, + 0x1312: 0x000c, 0x1313: 0x000c, 0x1314: 0x000c, 0x1315: 0x000c, 0x1316: 0x000c, 0x1317: 0x000c, + 0x1318: 0x000c, 0x1319: 0x000c, 0x131a: 0x000c, 0x131b: 0x000c, 0x131c: 0x000c, 0x131d: 0x000c, + 0x131e: 0x000c, 0x131f: 0x000c, 0x1320: 0x000c, 0x1321: 0x000c, 0x1322: 0x000c, 0x1323: 0x000c, + 0x1324: 0x000c, 0x1325: 0x000c, 0x1326: 0x000c, 0x1327: 0x000c, 0x1328: 0x000c, 0x1329: 0x000c, + 0x132a: 0x000c, 0x132b: 0x000c, 0x132c: 0x000c, 0x132d: 0x000c, 0x132e: 0x000c, 0x132f: 0x000c, + 0x1330: 0x000c, 0x1331: 0x000c, 0x1332: 0x000c, 0x1333: 0x000c, 0x1334: 0x000c, 0x1335: 0x000c, + 0x1336: 0x000c, 0x1337: 0x000c, 0x1338: 0x000c, 0x1339: 0x000c, 0x133b: 0x000c, + 0x133c: 0x000c, 0x133d: 0x000c, 0x133e: 0x000c, 0x133f: 0x000c, + // Block 0x4d, offset 0x1340 + 0x137d: 0x000a, 0x137f: 0x000a, + // Block 0x4e, offset 0x1380 + 0x1380: 0x000a, 0x1381: 0x000a, + 0x138d: 0x000a, 0x138e: 0x000a, 0x138f: 0x000a, + 0x139d: 0x000a, + 0x139e: 0x000a, 0x139f: 0x000a, + 0x13ad: 0x000a, 0x13ae: 0x000a, 0x13af: 0x000a, + 0x13bd: 0x000a, 0x13be: 0x000a, + // Block 0x4f, offset 0x13c0 + 0x13c0: 0x0009, 0x13c1: 0x0009, 0x13c2: 0x0009, 0x13c3: 0x0009, 0x13c4: 0x0009, 0x13c5: 0x0009, + 0x13c6: 0x0009, 0x13c7: 0x0009, 0x13c8: 0x0009, 0x13c9: 0x0009, 0x13ca: 0x0009, 0x13cb: 0x000b, + 0x13cc: 0x000b, 0x13cd: 0x000b, 0x13cf: 0x0001, 0x13d0: 0x000a, 0x13d1: 0x000a, + 0x13d2: 0x000a, 0x13d3: 0x000a, 0x13d4: 0x000a, 0x13d5: 0x000a, 0x13d6: 0x000a, 0x13d7: 0x000a, + 0x13d8: 0x000a, 0x13d9: 0x000a, 0x13da: 0x000a, 0x13db: 0x000a, 0x13dc: 0x000a, 0x13dd: 0x000a, + 0x13de: 0x000a, 0x13df: 0x000a, 0x13e0: 0x000a, 0x13e1: 0x000a, 0x13e2: 0x000a, 0x13e3: 0x000a, + 0x13e4: 0x000a, 0x13e5: 0x000a, 0x13e6: 0x000a, 0x13e7: 0x000a, 0x13e8: 0x0009, 0x13e9: 0x0007, + 0x13ea: 0x000e, 0x13eb: 0x000e, 0x13ec: 0x000e, 0x13ed: 0x000e, 0x13ee: 0x000e, 0x13ef: 0x0006, + 0x13f0: 0x0004, 0x13f1: 0x0004, 0x13f2: 0x0004, 0x13f3: 0x0004, 0x13f4: 0x0004, 0x13f5: 0x000a, + 0x13f6: 0x000a, 0x13f7: 0x000a, 0x13f8: 0x000a, 0x13f9: 0x000a, 0x13fa: 0x000a, 0x13fb: 0x000a, + 0x13fc: 0x000a, 0x13fd: 0x000a, 0x13fe: 0x000a, 0x13ff: 0x000a, + // Block 0x50, offset 0x1400 + 0x1400: 0x000a, 0x1401: 0x000a, 0x1402: 0x000a, 0x1403: 0x000a, 0x1404: 0x0006, 0x1405: 0x009a, + 0x1406: 0x008a, 0x1407: 0x000a, 0x1408: 0x000a, 0x1409: 0x000a, 0x140a: 0x000a, 0x140b: 0x000a, + 0x140c: 0x000a, 0x140d: 0x000a, 0x140e: 0x000a, 0x140f: 0x000a, 0x1410: 0x000a, 0x1411: 0x000a, + 0x1412: 0x000a, 0x1413: 0x000a, 0x1414: 0x000a, 0x1415: 0x000a, 0x1416: 0x000a, 0x1417: 0x000a, + 0x1418: 0x000a, 0x1419: 0x000a, 0x141a: 0x000a, 0x141b: 0x000a, 0x141c: 0x000a, 0x141d: 0x000a, + 0x141e: 0x000a, 0x141f: 0x0009, 0x1420: 0x000b, 0x1421: 0x000b, 0x1422: 0x000b, 0x1423: 0x000b, + 0x1424: 0x000b, 0x1425: 0x000b, 0x1426: 0x000e, 0x1427: 0x000e, 0x1428: 0x000e, 0x1429: 0x000e, + 0x142a: 0x000b, 0x142b: 0x000b, 0x142c: 0x000b, 0x142d: 0x000b, 0x142e: 0x000b, 0x142f: 0x000b, + 0x1430: 0x0002, 0x1434: 0x0002, 0x1435: 0x0002, + 0x1436: 0x0002, 0x1437: 0x0002, 0x1438: 0x0002, 0x1439: 0x0002, 0x143a: 0x0003, 0x143b: 0x0003, + 0x143c: 0x000a, 0x143d: 0x009a, 0x143e: 0x008a, + // Block 0x51, offset 0x1440 + 0x1440: 0x0002, 0x1441: 0x0002, 0x1442: 0x0002, 0x1443: 0x0002, 0x1444: 0x0002, 0x1445: 0x0002, + 0x1446: 0x0002, 0x1447: 0x0002, 0x1448: 0x0002, 0x1449: 0x0002, 0x144a: 0x0003, 0x144b: 0x0003, + 0x144c: 0x000a, 0x144d: 0x009a, 0x144e: 0x008a, + 0x1460: 0x0004, 0x1461: 0x0004, 0x1462: 0x0004, 0x1463: 0x0004, + 0x1464: 0x0004, 0x1465: 0x0004, 0x1466: 0x0004, 0x1467: 0x0004, 0x1468: 0x0004, 0x1469: 0x0004, + 0x146a: 0x0004, 0x146b: 0x0004, 0x146c: 0x0004, 0x146d: 0x0004, 0x146e: 0x0004, 0x146f: 0x0004, + 0x1470: 0x0004, 0x1471: 0x0004, 0x1472: 0x0004, 0x1473: 0x0004, 0x1474: 0x0004, 0x1475: 0x0004, + 0x1476: 0x0004, 0x1477: 0x0004, 0x1478: 0x0004, 0x1479: 0x0004, 0x147a: 0x0004, 0x147b: 0x0004, + 0x147c: 0x0004, 0x147d: 0x0004, 0x147e: 0x0004, 0x147f: 0x0004, + // Block 0x52, offset 0x1480 + 0x1480: 0x0004, 0x1481: 0x0004, 0x1482: 0x0004, 0x1483: 0x0004, 0x1484: 0x0004, 0x1485: 0x0004, + 0x1486: 0x0004, 0x1487: 0x0004, 0x1488: 0x0004, 0x1489: 0x0004, 0x148a: 0x0004, 0x148b: 0x0004, + 0x148c: 0x0004, 0x148d: 0x0004, 0x148e: 0x0004, 0x148f: 0x0004, 0x1490: 0x000c, 0x1491: 0x000c, + 0x1492: 0x000c, 0x1493: 0x000c, 0x1494: 0x000c, 0x1495: 0x000c, 0x1496: 0x000c, 0x1497: 0x000c, + 0x1498: 0x000c, 0x1499: 0x000c, 0x149a: 0x000c, 0x149b: 0x000c, 0x149c: 0x000c, 0x149d: 0x000c, + 0x149e: 0x000c, 0x149f: 0x000c, 0x14a0: 0x000c, 0x14a1: 0x000c, 0x14a2: 0x000c, 0x14a3: 0x000c, + 0x14a4: 0x000c, 0x14a5: 0x000c, 0x14a6: 0x000c, 0x14a7: 0x000c, 0x14a8: 0x000c, 0x14a9: 0x000c, + 0x14aa: 0x000c, 0x14ab: 0x000c, 0x14ac: 0x000c, 0x14ad: 0x000c, 0x14ae: 0x000c, 0x14af: 0x000c, + 0x14b0: 0x000c, + // Block 0x53, offset 0x14c0 + 0x14c0: 0x000a, 0x14c1: 0x000a, 0x14c3: 0x000a, 0x14c4: 0x000a, 0x14c5: 0x000a, + 0x14c6: 0x000a, 0x14c8: 0x000a, 0x14c9: 0x000a, + 0x14d4: 0x000a, 0x14d6: 0x000a, 0x14d7: 0x000a, + 0x14d8: 0x000a, + 0x14de: 0x000a, 0x14df: 0x000a, 0x14e0: 0x000a, 0x14e1: 0x000a, 0x14e2: 0x000a, 0x14e3: 0x000a, + 0x14e5: 0x000a, 0x14e7: 0x000a, 0x14e9: 0x000a, + 0x14ee: 0x0004, + 0x14fa: 0x000a, 0x14fb: 0x000a, + // Block 0x54, offset 0x1500 + 0x1500: 0x000a, 0x1501: 0x000a, 0x1502: 0x000a, 0x1503: 0x000a, 0x1504: 0x000a, + 0x150a: 0x000a, 0x150b: 0x000a, + 0x150c: 0x000a, 0x150d: 0x000a, 0x1510: 0x000a, 0x1511: 0x000a, + 0x1512: 0x000a, 0x1513: 0x000a, 0x1514: 0x000a, 0x1515: 0x000a, 0x1516: 0x000a, 0x1517: 0x000a, + 0x1518: 0x000a, 0x1519: 0x000a, 0x151a: 0x000a, 0x151b: 0x000a, 0x151c: 0x000a, 0x151d: 0x000a, + 0x151e: 0x000a, 0x151f: 0x000a, + // Block 0x55, offset 0x1540 + 0x1549: 0x000a, 0x154a: 0x000a, 0x154b: 0x000a, + 0x1550: 0x000a, 0x1551: 0x000a, + 0x1552: 0x000a, 0x1553: 0x000a, 0x1554: 0x000a, 0x1555: 0x000a, 0x1556: 0x000a, 0x1557: 0x000a, + 0x1558: 0x000a, 0x1559: 0x000a, 0x155a: 0x000a, 0x155b: 0x000a, 0x155c: 0x000a, 0x155d: 0x000a, + 0x155e: 0x000a, 0x155f: 0x000a, 0x1560: 0x000a, 0x1561: 0x000a, 0x1562: 0x000a, 0x1563: 0x000a, + 0x1564: 0x000a, 0x1565: 0x000a, 0x1566: 0x000a, 0x1567: 0x000a, 0x1568: 0x000a, 0x1569: 0x000a, + 0x156a: 0x000a, 0x156b: 0x000a, 0x156c: 0x000a, 0x156d: 0x000a, 0x156e: 0x000a, 0x156f: 0x000a, + 0x1570: 0x000a, 0x1571: 0x000a, 0x1572: 0x000a, 0x1573: 0x000a, 0x1574: 0x000a, 0x1575: 0x000a, + 0x1576: 0x000a, 0x1577: 0x000a, 0x1578: 0x000a, 0x1579: 0x000a, 0x157a: 0x000a, 0x157b: 0x000a, + 0x157c: 0x000a, 0x157d: 0x000a, 0x157e: 0x000a, 0x157f: 0x000a, + // Block 0x56, offset 0x1580 + 0x1580: 0x000a, 0x1581: 0x000a, 0x1582: 0x000a, 0x1583: 0x000a, 0x1584: 0x000a, 0x1585: 0x000a, + 0x1586: 0x000a, 0x1587: 0x000a, 0x1588: 0x000a, 0x1589: 0x000a, 0x158a: 0x000a, 0x158b: 0x000a, + 0x158c: 0x000a, 0x158d: 0x000a, 0x158e: 0x000a, 0x158f: 0x000a, 0x1590: 0x000a, 0x1591: 0x000a, + 0x1592: 0x000a, 0x1593: 0x000a, 0x1594: 0x000a, 0x1595: 0x000a, 0x1596: 0x000a, 0x1597: 0x000a, + 0x1598: 0x000a, 0x1599: 0x000a, 0x159a: 0x000a, 0x159b: 0x000a, 0x159c: 0x000a, 0x159d: 0x000a, + 0x159e: 0x000a, 0x159f: 0x000a, 0x15a0: 0x000a, 0x15a1: 0x000a, 0x15a2: 0x000a, 0x15a3: 0x000a, + 0x15a4: 0x000a, 0x15a5: 0x000a, 0x15a6: 0x000a, 0x15a7: 0x000a, 0x15a8: 0x000a, 0x15a9: 0x000a, + 0x15aa: 0x000a, 0x15ab: 0x000a, 0x15ac: 0x000a, 0x15ad: 0x000a, 0x15ae: 0x000a, 0x15af: 0x000a, + 0x15b0: 0x000a, 0x15b1: 0x000a, 0x15b2: 0x000a, 0x15b3: 0x000a, 0x15b4: 0x000a, 0x15b5: 0x000a, + 0x15b6: 0x000a, 0x15b7: 0x000a, 0x15b8: 0x000a, 0x15b9: 0x000a, 0x15ba: 0x000a, 0x15bb: 0x000a, + 0x15bc: 0x000a, 0x15bd: 0x000a, 0x15be: 0x000a, 0x15bf: 0x000a, + // Block 0x57, offset 0x15c0 + 0x15c0: 0x000a, 0x15c1: 0x000a, 0x15c2: 0x000a, 0x15c3: 0x000a, 0x15c4: 0x000a, 0x15c5: 0x000a, + 0x15c6: 0x000a, 0x15c7: 0x000a, 0x15c8: 0x000a, 0x15c9: 0x000a, 0x15ca: 0x000a, 0x15cb: 0x000a, + 0x15cc: 0x000a, 0x15cd: 0x000a, 0x15ce: 0x000a, 0x15cf: 0x000a, 0x15d0: 0x000a, 0x15d1: 0x000a, + 0x15d2: 0x0003, 0x15d3: 0x0004, 0x15d4: 0x000a, 0x15d5: 0x000a, 0x15d6: 0x000a, 0x15d7: 0x000a, + 0x15d8: 0x000a, 0x15d9: 0x000a, 0x15da: 0x000a, 0x15db: 0x000a, 0x15dc: 0x000a, 0x15dd: 0x000a, + 0x15de: 0x000a, 0x15df: 0x000a, 0x15e0: 0x000a, 0x15e1: 0x000a, 0x15e2: 0x000a, 0x15e3: 0x000a, + 0x15e4: 0x000a, 0x15e5: 0x000a, 0x15e6: 0x000a, 0x15e7: 0x000a, 0x15e8: 0x000a, 0x15e9: 0x000a, + 0x15ea: 0x000a, 0x15eb: 0x000a, 0x15ec: 0x000a, 0x15ed: 0x000a, 0x15ee: 0x000a, 0x15ef: 0x000a, + 0x15f0: 0x000a, 0x15f1: 0x000a, 0x15f2: 0x000a, 0x15f3: 0x000a, 0x15f4: 0x000a, 0x15f5: 0x000a, + 0x15f6: 0x000a, 0x15f7: 0x000a, 0x15f8: 0x000a, 0x15f9: 0x000a, 0x15fa: 0x000a, 0x15fb: 0x000a, + 0x15fc: 0x000a, 0x15fd: 0x000a, 0x15fe: 0x000a, 0x15ff: 0x000a, + // Block 0x58, offset 0x1600 + 0x1600: 0x000a, 0x1601: 0x000a, 0x1602: 0x000a, 0x1603: 0x000a, 0x1604: 0x000a, 0x1605: 0x000a, + 0x1606: 0x000a, 0x1607: 0x000a, 0x1608: 0x003a, 0x1609: 0x002a, 0x160a: 0x003a, 0x160b: 0x002a, + 0x160c: 0x000a, 0x160d: 0x000a, 0x160e: 0x000a, 0x160f: 0x000a, 0x1610: 0x000a, 0x1611: 0x000a, + 0x1612: 0x000a, 0x1613: 0x000a, 0x1614: 0x000a, 0x1615: 0x000a, 0x1616: 0x000a, 0x1617: 0x000a, + 0x1618: 0x000a, 0x1619: 0x000a, 0x161a: 0x000a, 0x161b: 0x000a, 0x161c: 0x000a, 0x161d: 0x000a, + 0x161e: 0x000a, 0x161f: 0x000a, 0x1620: 0x000a, 0x1621: 0x000a, 0x1622: 0x000a, 0x1623: 0x000a, + 0x1624: 0x000a, 0x1625: 0x000a, 0x1626: 0x000a, 0x1627: 0x000a, 0x1628: 0x000a, 0x1629: 0x009a, + 0x162a: 0x008a, 0x162b: 0x000a, 0x162c: 0x000a, 0x162d: 0x000a, 0x162e: 0x000a, 0x162f: 0x000a, + 0x1630: 0x000a, 0x1631: 0x000a, 0x1632: 0x000a, 0x1633: 0x000a, 0x1634: 0x000a, 0x1635: 0x000a, + // Block 0x59, offset 0x1640 + 0x167b: 0x000a, + 0x167c: 0x000a, 0x167d: 0x000a, 0x167e: 0x000a, 0x167f: 0x000a, + // Block 0x5a, offset 0x1680 + 0x1680: 0x000a, 0x1681: 0x000a, 0x1682: 0x000a, 0x1683: 0x000a, 0x1684: 0x000a, 0x1685: 0x000a, + 0x1686: 0x000a, 0x1687: 0x000a, 0x1688: 0x000a, 0x1689: 0x000a, 0x168a: 0x000a, 0x168b: 0x000a, + 0x168c: 0x000a, 0x168d: 0x000a, 0x168e: 0x000a, 0x168f: 0x000a, 0x1690: 0x000a, 0x1691: 0x000a, + 0x1692: 0x000a, 0x1693: 0x000a, 0x1694: 0x000a, 0x1696: 0x000a, 0x1697: 0x000a, + 0x1698: 0x000a, 0x1699: 0x000a, 0x169a: 0x000a, 0x169b: 0x000a, 0x169c: 0x000a, 0x169d: 0x000a, + 0x169e: 0x000a, 0x169f: 0x000a, 0x16a0: 0x000a, 0x16a1: 0x000a, 0x16a2: 0x000a, 0x16a3: 0x000a, + 0x16a4: 0x000a, 0x16a5: 0x000a, 0x16a6: 0x000a, 0x16a7: 0x000a, 0x16a8: 0x000a, 0x16a9: 0x000a, + 0x16aa: 0x000a, 0x16ab: 0x000a, 0x16ac: 0x000a, 0x16ad: 0x000a, 0x16ae: 0x000a, 0x16af: 0x000a, + 0x16b0: 0x000a, 0x16b1: 0x000a, 0x16b2: 0x000a, 0x16b3: 0x000a, 0x16b4: 0x000a, 0x16b5: 0x000a, + 0x16b6: 0x000a, 0x16b7: 0x000a, 0x16b8: 0x000a, 0x16b9: 0x000a, 0x16ba: 0x000a, 0x16bb: 0x000a, + 0x16bc: 0x000a, 0x16bd: 0x000a, 0x16be: 0x000a, 0x16bf: 0x000a, + // Block 0x5b, offset 0x16c0 + 0x16c0: 0x000a, 0x16c1: 0x000a, 0x16c2: 0x000a, 0x16c3: 0x000a, 0x16c4: 0x000a, 0x16c5: 0x000a, + 0x16c6: 0x000a, 0x16c7: 0x000a, 0x16c8: 0x000a, 0x16c9: 0x000a, 0x16ca: 0x000a, 0x16cb: 0x000a, + 0x16cc: 0x000a, 0x16cd: 0x000a, 0x16ce: 0x000a, 0x16cf: 0x000a, 0x16d0: 0x000a, 0x16d1: 0x000a, + 0x16d2: 0x000a, 0x16d3: 0x000a, 0x16d4: 0x000a, 0x16d5: 0x000a, 0x16d6: 0x000a, 0x16d7: 0x000a, + 0x16d8: 0x000a, 0x16d9: 0x000a, 0x16da: 0x000a, 0x16db: 0x000a, 0x16dc: 0x000a, 0x16dd: 0x000a, + 0x16de: 0x000a, 0x16df: 0x000a, 0x16e0: 0x000a, 0x16e1: 0x000a, 0x16e2: 0x000a, 0x16e3: 0x000a, + 0x16e4: 0x000a, 0x16e5: 0x000a, 0x16e6: 0x000a, + // Block 0x5c, offset 0x1700 + 0x1700: 0x000a, 0x1701: 0x000a, 0x1702: 0x000a, 0x1703: 0x000a, 0x1704: 0x000a, 0x1705: 0x000a, + 0x1706: 0x000a, 0x1707: 0x000a, 0x1708: 0x000a, 0x1709: 0x000a, 0x170a: 0x000a, + 0x1720: 0x000a, 0x1721: 0x000a, 0x1722: 0x000a, 0x1723: 0x000a, + 0x1724: 0x000a, 0x1725: 0x000a, 0x1726: 0x000a, 0x1727: 0x000a, 0x1728: 0x000a, 0x1729: 0x000a, + 0x172a: 0x000a, 0x172b: 0x000a, 0x172c: 0x000a, 0x172d: 0x000a, 0x172e: 0x000a, 0x172f: 0x000a, + 0x1730: 0x000a, 0x1731: 0x000a, 0x1732: 0x000a, 0x1733: 0x000a, 0x1734: 0x000a, 0x1735: 0x000a, + 0x1736: 0x000a, 0x1737: 0x000a, 0x1738: 0x000a, 0x1739: 0x000a, 0x173a: 0x000a, 0x173b: 0x000a, + 0x173c: 0x000a, 0x173d: 0x000a, 0x173e: 0x000a, 0x173f: 0x000a, + // Block 0x5d, offset 0x1740 + 0x1740: 0x000a, 0x1741: 0x000a, 0x1742: 0x000a, 0x1743: 0x000a, 0x1744: 0x000a, 0x1745: 0x000a, + 0x1746: 0x000a, 0x1747: 0x000a, 0x1748: 0x0002, 0x1749: 0x0002, 0x174a: 0x0002, 0x174b: 0x0002, + 0x174c: 0x0002, 0x174d: 0x0002, 0x174e: 0x0002, 0x174f: 0x0002, 0x1750: 0x0002, 0x1751: 0x0002, + 0x1752: 0x0002, 0x1753: 0x0002, 0x1754: 0x0002, 0x1755: 0x0002, 0x1756: 0x0002, 0x1757: 0x0002, + 0x1758: 0x0002, 0x1759: 0x0002, 0x175a: 0x0002, 0x175b: 0x0002, + // Block 0x5e, offset 0x1780 + 0x17aa: 0x000a, 0x17ab: 0x000a, 0x17ac: 0x000a, 0x17ad: 0x000a, 0x17ae: 0x000a, 0x17af: 0x000a, + 0x17b0: 0x000a, 0x17b1: 0x000a, 0x17b2: 0x000a, 0x17b3: 0x000a, 0x17b4: 0x000a, 0x17b5: 0x000a, + 0x17b6: 0x000a, 0x17b7: 0x000a, 0x17b8: 0x000a, 0x17b9: 0x000a, 0x17ba: 0x000a, 0x17bb: 0x000a, + 0x17bc: 0x000a, 0x17bd: 0x000a, 0x17be: 0x000a, 0x17bf: 0x000a, + // Block 0x5f, offset 0x17c0 + 0x17c0: 0x000a, 0x17c1: 0x000a, 0x17c2: 0x000a, 0x17c3: 0x000a, 0x17c4: 0x000a, 0x17c5: 0x000a, + 0x17c6: 0x000a, 0x17c7: 0x000a, 0x17c8: 0x000a, 0x17c9: 0x000a, 0x17ca: 0x000a, 0x17cb: 0x000a, + 0x17cc: 0x000a, 0x17cd: 0x000a, 0x17ce: 0x000a, 0x17cf: 0x000a, 0x17d0: 0x000a, 0x17d1: 0x000a, + 0x17d2: 0x000a, 0x17d3: 0x000a, 0x17d4: 0x000a, 0x17d5: 0x000a, 0x17d6: 0x000a, 0x17d7: 0x000a, + 0x17d8: 0x000a, 0x17d9: 0x000a, 0x17da: 0x000a, 0x17db: 0x000a, 0x17dc: 0x000a, 0x17dd: 0x000a, + 0x17de: 0x000a, 0x17df: 0x000a, 0x17e0: 0x000a, 0x17e1: 0x000a, 0x17e2: 0x000a, 0x17e3: 0x000a, + 0x17e4: 0x000a, 0x17e5: 0x000a, 0x17e6: 0x000a, 0x17e7: 0x000a, 0x17e8: 0x000a, 0x17e9: 0x000a, + 0x17ea: 0x000a, 0x17eb: 0x000a, 0x17ed: 0x000a, 0x17ee: 0x000a, 0x17ef: 0x000a, + 0x17f0: 0x000a, 0x17f1: 0x000a, 0x17f2: 0x000a, 0x17f3: 0x000a, 0x17f4: 0x000a, 0x17f5: 0x000a, + 0x17f6: 0x000a, 0x17f7: 0x000a, 0x17f8: 0x000a, 0x17f9: 0x000a, 0x17fa: 0x000a, 0x17fb: 0x000a, + 0x17fc: 0x000a, 0x17fd: 0x000a, 0x17fe: 0x000a, 0x17ff: 0x000a, + // Block 0x60, offset 0x1800 + 0x1800: 0x000a, 0x1801: 0x000a, 0x1802: 0x000a, 0x1803: 0x000a, 0x1804: 0x000a, 0x1805: 0x000a, + 0x1806: 0x000a, 0x1807: 0x000a, 0x1808: 0x000a, 0x1809: 0x000a, 0x180a: 0x000a, 0x180b: 0x000a, + 0x180c: 0x000a, 0x180d: 0x000a, 0x180e: 0x000a, 0x180f: 0x000a, 0x1810: 0x000a, 0x1811: 0x000a, + 0x1812: 0x000a, 0x1813: 0x000a, 0x1814: 0x000a, 0x1815: 0x000a, 0x1816: 0x000a, 0x1817: 0x000a, + 0x1818: 0x000a, 0x1819: 0x000a, 0x181a: 0x000a, 0x181b: 0x000a, 0x181c: 0x000a, 0x181d: 0x000a, + 0x181e: 0x000a, 0x181f: 0x000a, 0x1820: 0x000a, 0x1821: 0x000a, 0x1822: 0x000a, 0x1823: 0x000a, + 0x1824: 0x000a, 0x1825: 0x000a, 0x1826: 0x000a, 0x1827: 0x000a, 0x1828: 0x003a, 0x1829: 0x002a, + 0x182a: 0x003a, 0x182b: 0x002a, 0x182c: 0x003a, 0x182d: 0x002a, 0x182e: 0x003a, 0x182f: 0x002a, + 0x1830: 0x003a, 0x1831: 0x002a, 0x1832: 0x003a, 0x1833: 0x002a, 0x1834: 0x003a, 0x1835: 0x002a, + 0x1836: 0x000a, 0x1837: 0x000a, 0x1838: 0x000a, 0x1839: 0x000a, 0x183a: 0x000a, 0x183b: 0x000a, + 0x183c: 0x000a, 0x183d: 0x000a, 0x183e: 0x000a, 0x183f: 0x000a, + // Block 0x61, offset 0x1840 + 0x1840: 0x000a, 0x1841: 0x000a, 0x1842: 0x000a, 0x1843: 0x000a, 0x1844: 0x000a, 0x1845: 0x009a, + 0x1846: 0x008a, 0x1847: 0x000a, 0x1848: 0x000a, 0x1849: 0x000a, 0x184a: 0x000a, 0x184b: 0x000a, + 0x184c: 0x000a, 0x184d: 0x000a, 0x184e: 0x000a, 0x184f: 0x000a, 0x1850: 0x000a, 0x1851: 0x000a, + 0x1852: 0x000a, 0x1853: 0x000a, 0x1854: 0x000a, 0x1855: 0x000a, 0x1856: 0x000a, 0x1857: 0x000a, + 0x1858: 0x000a, 0x1859: 0x000a, 0x185a: 0x000a, 0x185b: 0x000a, 0x185c: 0x000a, 0x185d: 0x000a, + 0x185e: 0x000a, 0x185f: 0x000a, 0x1860: 0x000a, 0x1861: 0x000a, 0x1862: 0x000a, 0x1863: 0x000a, + 0x1864: 0x000a, 0x1865: 0x000a, 0x1866: 0x003a, 0x1867: 0x002a, 0x1868: 0x003a, 0x1869: 0x002a, + 0x186a: 0x003a, 0x186b: 0x002a, 0x186c: 0x003a, 0x186d: 0x002a, 0x186e: 0x003a, 0x186f: 0x002a, + 0x1870: 0x000a, 0x1871: 0x000a, 0x1872: 0x000a, 0x1873: 0x000a, 0x1874: 0x000a, 0x1875: 0x000a, + 0x1876: 0x000a, 0x1877: 0x000a, 0x1878: 0x000a, 0x1879: 0x000a, 0x187a: 0x000a, 0x187b: 0x000a, + 0x187c: 0x000a, 0x187d: 0x000a, 0x187e: 0x000a, 0x187f: 0x000a, + // Block 0x62, offset 0x1880 + 0x1880: 0x000a, 0x1881: 0x000a, 0x1882: 0x000a, 0x1883: 0x007a, 0x1884: 0x006a, 0x1885: 0x009a, + 0x1886: 0x008a, 0x1887: 0x00ba, 0x1888: 0x00aa, 0x1889: 0x009a, 0x188a: 0x008a, 0x188b: 0x007a, + 0x188c: 0x006a, 0x188d: 0x00da, 0x188e: 0x002a, 0x188f: 0x003a, 0x1890: 0x00ca, 0x1891: 0x009a, + 0x1892: 0x008a, 0x1893: 0x007a, 0x1894: 0x006a, 0x1895: 0x009a, 0x1896: 0x008a, 0x1897: 0x00ba, + 0x1898: 0x00aa, 0x1899: 0x000a, 0x189a: 0x000a, 0x189b: 0x000a, 0x189c: 0x000a, 0x189d: 0x000a, + 0x189e: 0x000a, 0x189f: 0x000a, 0x18a0: 0x000a, 0x18a1: 0x000a, 0x18a2: 0x000a, 0x18a3: 0x000a, + 0x18a4: 0x000a, 0x18a5: 0x000a, 0x18a6: 0x000a, 0x18a7: 0x000a, 0x18a8: 0x000a, 0x18a9: 0x000a, + 0x18aa: 0x000a, 0x18ab: 0x000a, 0x18ac: 0x000a, 0x18ad: 0x000a, 0x18ae: 0x000a, 0x18af: 0x000a, + 0x18b0: 0x000a, 0x18b1: 0x000a, 0x18b2: 0x000a, 0x18b3: 0x000a, 0x18b4: 0x000a, 0x18b5: 0x000a, + 0x18b6: 0x000a, 0x18b7: 0x000a, 0x18b8: 0x000a, 0x18b9: 0x000a, 0x18ba: 0x000a, 0x18bb: 0x000a, + 0x18bc: 0x000a, 0x18bd: 0x000a, 0x18be: 0x000a, 0x18bf: 0x000a, + // Block 0x63, offset 0x18c0 + 0x18c0: 0x000a, 0x18c1: 0x000a, 0x18c2: 0x000a, 0x18c3: 0x000a, 0x18c4: 0x000a, 0x18c5: 0x000a, + 0x18c6: 0x000a, 0x18c7: 0x000a, 0x18c8: 0x000a, 0x18c9: 0x000a, 0x18ca: 0x000a, 0x18cb: 0x000a, + 0x18cc: 0x000a, 0x18cd: 0x000a, 0x18ce: 0x000a, 0x18cf: 0x000a, 0x18d0: 0x000a, 0x18d1: 0x000a, + 0x18d2: 0x000a, 0x18d3: 0x000a, 0x18d4: 0x000a, 0x18d5: 0x000a, 0x18d6: 0x000a, 0x18d7: 0x000a, + 0x18d8: 0x003a, 0x18d9: 0x002a, 0x18da: 0x003a, 0x18db: 0x002a, 0x18dc: 0x000a, 0x18dd: 0x000a, + 0x18de: 0x000a, 0x18df: 0x000a, 0x18e0: 0x000a, 0x18e1: 0x000a, 0x18e2: 0x000a, 0x18e3: 0x000a, + 0x18e4: 0x000a, 0x18e5: 0x000a, 0x18e6: 0x000a, 0x18e7: 0x000a, 0x18e8: 0x000a, 0x18e9: 0x000a, + 0x18ea: 0x000a, 0x18eb: 0x000a, 0x18ec: 0x000a, 0x18ed: 0x000a, 0x18ee: 0x000a, 0x18ef: 0x000a, + 0x18f0: 0x000a, 0x18f1: 0x000a, 0x18f2: 0x000a, 0x18f3: 0x000a, 0x18f4: 0x000a, 0x18f5: 0x000a, + 0x18f6: 0x000a, 0x18f7: 0x000a, 0x18f8: 0x000a, 0x18f9: 0x000a, 0x18fa: 0x000a, 0x18fb: 0x000a, + 0x18fc: 0x003a, 0x18fd: 0x002a, 0x18fe: 0x000a, 0x18ff: 0x000a, + // Block 0x64, offset 0x1900 + 0x1900: 0x000a, 0x1901: 0x000a, 0x1902: 0x000a, 0x1903: 0x000a, 0x1904: 0x000a, 0x1905: 0x000a, + 0x1906: 0x000a, 0x1907: 0x000a, 0x1908: 0x000a, 0x1909: 0x000a, 0x190a: 0x000a, 0x190b: 0x000a, + 0x190c: 0x000a, 0x190d: 0x000a, 0x190e: 0x000a, 0x190f: 0x000a, 0x1910: 0x000a, 0x1911: 0x000a, + 0x1912: 0x000a, 0x1913: 0x000a, 0x1914: 0x000a, 0x1915: 0x000a, 0x1916: 0x000a, 0x1917: 0x000a, + 0x1918: 0x000a, 0x1919: 0x000a, 0x191a: 0x000a, 0x191b: 0x000a, 0x191c: 0x000a, 0x191d: 0x000a, + 0x191e: 0x000a, 0x191f: 0x000a, 0x1920: 0x000a, 0x1921: 0x000a, 0x1922: 0x000a, 0x1923: 0x000a, + 0x1924: 0x000a, 0x1925: 0x000a, 0x1926: 0x000a, 0x1927: 0x000a, 0x1928: 0x000a, 0x1929: 0x000a, + 0x192a: 0x000a, 0x192b: 0x000a, 0x192c: 0x000a, 0x192d: 0x000a, 0x192e: 0x000a, 0x192f: 0x000a, + 0x1930: 0x000a, 0x1931: 0x000a, 0x1932: 0x000a, 0x1933: 0x000a, + 0x1936: 0x000a, 0x1937: 0x000a, 0x1938: 0x000a, 0x1939: 0x000a, 0x193a: 0x000a, 0x193b: 0x000a, + 0x193c: 0x000a, 0x193d: 0x000a, 0x193e: 0x000a, 0x193f: 0x000a, + // Block 0x65, offset 0x1940 + 0x1940: 0x000a, 0x1941: 0x000a, 0x1942: 0x000a, 0x1943: 0x000a, 0x1944: 0x000a, 0x1945: 0x000a, + 0x1946: 0x000a, 0x1947: 0x000a, 0x1948: 0x000a, 0x1949: 0x000a, 0x194a: 0x000a, 0x194b: 0x000a, + 0x194c: 0x000a, 0x194d: 0x000a, 0x194e: 0x000a, 0x194f: 0x000a, 0x1950: 0x000a, 0x1951: 0x000a, + 0x1952: 0x000a, 0x1953: 0x000a, 0x1954: 0x000a, 0x1955: 0x000a, + 0x1958: 0x000a, 0x1959: 0x000a, 0x195a: 0x000a, 0x195b: 0x000a, 0x195c: 0x000a, 0x195d: 0x000a, + 0x195e: 0x000a, 0x195f: 0x000a, 0x1960: 0x000a, 0x1961: 0x000a, 0x1962: 0x000a, 0x1963: 0x000a, + 0x1964: 0x000a, 0x1965: 0x000a, 0x1966: 0x000a, 0x1967: 0x000a, 0x1968: 0x000a, 0x1969: 0x000a, + 0x196a: 0x000a, 0x196b: 0x000a, 0x196c: 0x000a, 0x196d: 0x000a, 0x196e: 0x000a, 0x196f: 0x000a, + 0x1970: 0x000a, 0x1971: 0x000a, 0x1972: 0x000a, 0x1973: 0x000a, 0x1974: 0x000a, 0x1975: 0x000a, + 0x1976: 0x000a, 0x1977: 0x000a, 0x1978: 0x000a, 0x1979: 0x000a, 0x197a: 0x000a, 0x197b: 0x000a, + 0x197c: 0x000a, 0x197d: 0x000a, 0x197e: 0x000a, 0x197f: 0x000a, + // Block 0x66, offset 0x1980 + 0x19a5: 0x000a, 0x19a6: 0x000a, 0x19a7: 0x000a, 0x19a8: 0x000a, 0x19a9: 0x000a, + 0x19aa: 0x000a, 0x19af: 0x000c, + 0x19b0: 0x000c, 0x19b1: 0x000c, + 0x19b9: 0x000a, 0x19ba: 0x000a, 0x19bb: 0x000a, + 0x19bc: 0x000a, 0x19bd: 0x000a, 0x19be: 0x000a, 0x19bf: 0x000a, + // Block 0x67, offset 0x19c0 + 0x19ff: 0x000c, + // Block 0x68, offset 0x1a00 + 0x1a20: 0x000c, 0x1a21: 0x000c, 0x1a22: 0x000c, 0x1a23: 0x000c, + 0x1a24: 0x000c, 0x1a25: 0x000c, 0x1a26: 0x000c, 0x1a27: 0x000c, 0x1a28: 0x000c, 0x1a29: 0x000c, + 0x1a2a: 0x000c, 0x1a2b: 0x000c, 0x1a2c: 0x000c, 0x1a2d: 0x000c, 0x1a2e: 0x000c, 0x1a2f: 0x000c, + 0x1a30: 0x000c, 0x1a31: 0x000c, 0x1a32: 0x000c, 0x1a33: 0x000c, 0x1a34: 0x000c, 0x1a35: 0x000c, + 0x1a36: 0x000c, 0x1a37: 0x000c, 0x1a38: 0x000c, 0x1a39: 0x000c, 0x1a3a: 0x000c, 0x1a3b: 0x000c, + 0x1a3c: 0x000c, 0x1a3d: 0x000c, 0x1a3e: 0x000c, 0x1a3f: 0x000c, + // Block 0x69, offset 0x1a40 + 0x1a40: 0x000a, 0x1a41: 0x000a, 0x1a42: 0x000a, 0x1a43: 0x000a, 0x1a44: 0x000a, 0x1a45: 0x000a, + 0x1a46: 0x000a, 0x1a47: 0x000a, 0x1a48: 0x000a, 0x1a49: 0x000a, 0x1a4a: 0x000a, 0x1a4b: 0x000a, + 0x1a4c: 0x000a, 0x1a4d: 0x000a, 0x1a4e: 0x000a, 0x1a4f: 0x000a, 0x1a50: 0x000a, 0x1a51: 0x000a, + 0x1a52: 0x000a, 0x1a53: 0x000a, 0x1a54: 0x000a, 0x1a55: 0x000a, 0x1a56: 0x000a, 0x1a57: 0x000a, + 0x1a58: 0x000a, 0x1a59: 0x000a, 0x1a5a: 0x000a, 0x1a5b: 0x000a, 0x1a5c: 0x000a, 0x1a5d: 0x000a, + 0x1a5e: 0x000a, 0x1a5f: 0x000a, 0x1a60: 0x000a, 0x1a61: 0x000a, 0x1a62: 0x003a, 0x1a63: 0x002a, + 0x1a64: 0x003a, 0x1a65: 0x002a, 0x1a66: 0x003a, 0x1a67: 0x002a, 0x1a68: 0x003a, 0x1a69: 0x002a, + 0x1a6a: 0x000a, 0x1a6b: 0x000a, 0x1a6c: 0x000a, 0x1a6d: 0x000a, 0x1a6e: 0x000a, 0x1a6f: 0x000a, + 0x1a70: 0x000a, 0x1a71: 0x000a, 0x1a72: 0x000a, 0x1a73: 0x000a, 0x1a74: 0x000a, 0x1a75: 0x000a, + 0x1a76: 0x000a, 0x1a77: 0x000a, 0x1a78: 0x000a, 0x1a79: 0x000a, 0x1a7a: 0x000a, 0x1a7b: 0x000a, + 0x1a7c: 0x000a, 0x1a7d: 0x000a, 0x1a7e: 0x000a, 0x1a7f: 0x000a, + // Block 0x6a, offset 0x1a80 + 0x1a80: 0x000a, 0x1a81: 0x000a, 0x1a82: 0x000a, 0x1a83: 0x000a, 0x1a84: 0x000a, 0x1a85: 0x000a, + 0x1a86: 0x000a, 0x1a87: 0x000a, 0x1a88: 0x000a, 0x1a89: 0x000a, 0x1a8a: 0x000a, 0x1a8b: 0x000a, + 0x1a8c: 0x000a, 0x1a8d: 0x000a, 0x1a8e: 0x000a, 0x1a8f: 0x000a, + // Block 0x6b, offset 0x1ac0 + 0x1ac0: 0x000a, 0x1ac1: 0x000a, 0x1ac2: 0x000a, 0x1ac3: 0x000a, 0x1ac4: 0x000a, 0x1ac5: 0x000a, + 0x1ac6: 0x000a, 0x1ac7: 0x000a, 0x1ac8: 0x000a, 0x1ac9: 0x000a, 0x1aca: 0x000a, 0x1acb: 0x000a, + 0x1acc: 0x000a, 0x1acd: 0x000a, 0x1ace: 0x000a, 0x1acf: 0x000a, 0x1ad0: 0x000a, 0x1ad1: 0x000a, + 0x1ad2: 0x000a, 0x1ad3: 0x000a, 0x1ad4: 0x000a, 0x1ad5: 0x000a, 0x1ad6: 0x000a, 0x1ad7: 0x000a, + 0x1ad8: 0x000a, 0x1ad9: 0x000a, 0x1adb: 0x000a, 0x1adc: 0x000a, 0x1add: 0x000a, + 0x1ade: 0x000a, 0x1adf: 0x000a, 0x1ae0: 0x000a, 0x1ae1: 0x000a, 0x1ae2: 0x000a, 0x1ae3: 0x000a, + 0x1ae4: 0x000a, 0x1ae5: 0x000a, 0x1ae6: 0x000a, 0x1ae7: 0x000a, 0x1ae8: 0x000a, 0x1ae9: 0x000a, + 0x1aea: 0x000a, 0x1aeb: 0x000a, 0x1aec: 0x000a, 0x1aed: 0x000a, 0x1aee: 0x000a, 0x1aef: 0x000a, + 0x1af0: 0x000a, 0x1af1: 0x000a, 0x1af2: 0x000a, 0x1af3: 0x000a, 0x1af4: 0x000a, 0x1af5: 0x000a, + 0x1af6: 0x000a, 0x1af7: 0x000a, 0x1af8: 0x000a, 0x1af9: 0x000a, 0x1afa: 0x000a, 0x1afb: 0x000a, + 0x1afc: 0x000a, 0x1afd: 0x000a, 0x1afe: 0x000a, 0x1aff: 0x000a, + // Block 0x6c, offset 0x1b00 + 0x1b00: 0x000a, 0x1b01: 0x000a, 0x1b02: 0x000a, 0x1b03: 0x000a, 0x1b04: 0x000a, 0x1b05: 0x000a, + 0x1b06: 0x000a, 0x1b07: 0x000a, 0x1b08: 0x000a, 0x1b09: 0x000a, 0x1b0a: 0x000a, 0x1b0b: 0x000a, + 0x1b0c: 0x000a, 0x1b0d: 0x000a, 0x1b0e: 0x000a, 0x1b0f: 0x000a, 0x1b10: 0x000a, 0x1b11: 0x000a, + 0x1b12: 0x000a, 0x1b13: 0x000a, 0x1b14: 0x000a, 0x1b15: 0x000a, 0x1b16: 0x000a, 0x1b17: 0x000a, + 0x1b18: 0x000a, 0x1b19: 0x000a, 0x1b1a: 0x000a, 0x1b1b: 0x000a, 0x1b1c: 0x000a, 0x1b1d: 0x000a, + 0x1b1e: 0x000a, 0x1b1f: 0x000a, 0x1b20: 0x000a, 0x1b21: 0x000a, 0x1b22: 0x000a, 0x1b23: 0x000a, + 0x1b24: 0x000a, 0x1b25: 0x000a, 0x1b26: 0x000a, 0x1b27: 0x000a, 0x1b28: 0x000a, 0x1b29: 0x000a, + 0x1b2a: 0x000a, 0x1b2b: 0x000a, 0x1b2c: 0x000a, 0x1b2d: 0x000a, 0x1b2e: 0x000a, 0x1b2f: 0x000a, + 0x1b30: 0x000a, 0x1b31: 0x000a, 0x1b32: 0x000a, 0x1b33: 0x000a, + // Block 0x6d, offset 0x1b40 + 0x1b40: 0x000a, 0x1b41: 0x000a, 0x1b42: 0x000a, 0x1b43: 0x000a, 0x1b44: 0x000a, 0x1b45: 0x000a, + 0x1b46: 0x000a, 0x1b47: 0x000a, 0x1b48: 0x000a, 0x1b49: 0x000a, 0x1b4a: 0x000a, 0x1b4b: 0x000a, + 0x1b4c: 0x000a, 0x1b4d: 0x000a, 0x1b4e: 0x000a, 0x1b4f: 0x000a, 0x1b50: 0x000a, 0x1b51: 0x000a, + 0x1b52: 0x000a, 0x1b53: 0x000a, 0x1b54: 0x000a, 0x1b55: 0x000a, + 0x1b70: 0x000a, 0x1b71: 0x000a, 0x1b72: 0x000a, 0x1b73: 0x000a, 0x1b74: 0x000a, 0x1b75: 0x000a, + 0x1b76: 0x000a, 0x1b77: 0x000a, 0x1b78: 0x000a, 0x1b79: 0x000a, 0x1b7a: 0x000a, 0x1b7b: 0x000a, + // Block 0x6e, offset 0x1b80 + 0x1b80: 0x0009, 0x1b81: 0x000a, 0x1b82: 0x000a, 0x1b83: 0x000a, 0x1b84: 0x000a, + 0x1b88: 0x003a, 0x1b89: 0x002a, 0x1b8a: 0x003a, 0x1b8b: 0x002a, + 0x1b8c: 0x003a, 0x1b8d: 0x002a, 0x1b8e: 0x003a, 0x1b8f: 0x002a, 0x1b90: 0x003a, 0x1b91: 0x002a, + 0x1b92: 0x000a, 0x1b93: 0x000a, 0x1b94: 0x003a, 0x1b95: 0x002a, 0x1b96: 0x003a, 0x1b97: 0x002a, + 0x1b98: 0x003a, 0x1b99: 0x002a, 0x1b9a: 0x003a, 0x1b9b: 0x002a, 0x1b9c: 0x000a, 0x1b9d: 0x000a, + 0x1b9e: 0x000a, 0x1b9f: 0x000a, 0x1ba0: 0x000a, + 0x1baa: 0x000c, 0x1bab: 0x000c, 0x1bac: 0x000c, 0x1bad: 0x000c, + 0x1bb0: 0x000a, + 0x1bb6: 0x000a, 0x1bb7: 0x000a, + 0x1bbd: 0x000a, 0x1bbe: 0x000a, 0x1bbf: 0x000a, + // Block 0x6f, offset 0x1bc0 + 0x1bd9: 0x000c, 0x1bda: 0x000c, 0x1bdb: 0x000a, 0x1bdc: 0x000a, + 0x1be0: 0x000a, + // Block 0x70, offset 0x1c00 + 0x1c3b: 0x000a, + // Block 0x71, offset 0x1c40 + 0x1c40: 0x000a, 0x1c41: 0x000a, 0x1c42: 0x000a, 0x1c43: 0x000a, 0x1c44: 0x000a, 0x1c45: 0x000a, + 0x1c46: 0x000a, 0x1c47: 0x000a, 0x1c48: 0x000a, 0x1c49: 0x000a, 0x1c4a: 0x000a, 0x1c4b: 0x000a, + 0x1c4c: 0x000a, 0x1c4d: 0x000a, 0x1c4e: 0x000a, 0x1c4f: 0x000a, 0x1c50: 0x000a, 0x1c51: 0x000a, + 0x1c52: 0x000a, 0x1c53: 0x000a, 0x1c54: 0x000a, 0x1c55: 0x000a, 0x1c56: 0x000a, 0x1c57: 0x000a, + 0x1c58: 0x000a, 0x1c59: 0x000a, 0x1c5a: 0x000a, 0x1c5b: 0x000a, 0x1c5c: 0x000a, 0x1c5d: 0x000a, + 0x1c5e: 0x000a, 0x1c5f: 0x000a, 0x1c60: 0x000a, 0x1c61: 0x000a, 0x1c62: 0x000a, 0x1c63: 0x000a, + // Block 0x72, offset 0x1c80 + 0x1c9d: 0x000a, + 0x1c9e: 0x000a, + // Block 0x73, offset 0x1cc0 + 0x1cd0: 0x000a, 0x1cd1: 0x000a, + 0x1cd2: 0x000a, 0x1cd3: 0x000a, 0x1cd4: 0x000a, 0x1cd5: 0x000a, 0x1cd6: 0x000a, 0x1cd7: 0x000a, + 0x1cd8: 0x000a, 0x1cd9: 0x000a, 0x1cda: 0x000a, 0x1cdb: 0x000a, 0x1cdc: 0x000a, 0x1cdd: 0x000a, + 0x1cde: 0x000a, 0x1cdf: 0x000a, + 0x1cfc: 0x000a, 0x1cfd: 0x000a, 0x1cfe: 0x000a, + // Block 0x74, offset 0x1d00 + 0x1d31: 0x000a, 0x1d32: 0x000a, 0x1d33: 0x000a, 0x1d34: 0x000a, 0x1d35: 0x000a, + 0x1d36: 0x000a, 0x1d37: 0x000a, 0x1d38: 0x000a, 0x1d39: 0x000a, 0x1d3a: 0x000a, 0x1d3b: 0x000a, + 0x1d3c: 0x000a, 0x1d3d: 0x000a, 0x1d3e: 0x000a, 0x1d3f: 0x000a, + // Block 0x75, offset 0x1d40 + 0x1d4c: 0x000a, 0x1d4d: 0x000a, 0x1d4e: 0x000a, 0x1d4f: 0x000a, + // Block 0x76, offset 0x1d80 + 0x1db7: 0x000a, 0x1db8: 0x000a, 0x1db9: 0x000a, 0x1dba: 0x000a, + // Block 0x77, offset 0x1dc0 + 0x1dde: 0x000a, 0x1ddf: 0x000a, + 0x1dff: 0x000a, + // Block 0x78, offset 0x1e00 + 0x1e10: 0x000a, 0x1e11: 0x000a, + 0x1e12: 0x000a, 0x1e13: 0x000a, 0x1e14: 0x000a, 0x1e15: 0x000a, 0x1e16: 0x000a, 0x1e17: 0x000a, + 0x1e18: 0x000a, 0x1e19: 0x000a, 0x1e1a: 0x000a, 0x1e1b: 0x000a, 0x1e1c: 0x000a, 0x1e1d: 0x000a, + 0x1e1e: 0x000a, 0x1e1f: 0x000a, 0x1e20: 0x000a, 0x1e21: 0x000a, 0x1e22: 0x000a, 0x1e23: 0x000a, + 0x1e24: 0x000a, 0x1e25: 0x000a, 0x1e26: 0x000a, 0x1e27: 0x000a, 0x1e28: 0x000a, 0x1e29: 0x000a, + 0x1e2a: 0x000a, 0x1e2b: 0x000a, 0x1e2c: 0x000a, 0x1e2d: 0x000a, 0x1e2e: 0x000a, 0x1e2f: 0x000a, + 0x1e30: 0x000a, 0x1e31: 0x000a, 0x1e32: 0x000a, 0x1e33: 0x000a, 0x1e34: 0x000a, 0x1e35: 0x000a, + 0x1e36: 0x000a, 0x1e37: 0x000a, 0x1e38: 0x000a, 0x1e39: 0x000a, 0x1e3a: 0x000a, 0x1e3b: 0x000a, + 0x1e3c: 0x000a, 0x1e3d: 0x000a, 0x1e3e: 0x000a, 0x1e3f: 0x000a, + // Block 0x79, offset 0x1e40 + 0x1e40: 0x000a, 0x1e41: 0x000a, 0x1e42: 0x000a, 0x1e43: 0x000a, 0x1e44: 0x000a, 0x1e45: 0x000a, + 0x1e46: 0x000a, + // Block 0x7a, offset 0x1e80 + 0x1e8d: 0x000a, 0x1e8e: 0x000a, 0x1e8f: 0x000a, + // Block 0x7b, offset 0x1ec0 + 0x1eef: 0x000c, + 0x1ef0: 0x000c, 0x1ef1: 0x000c, 0x1ef2: 0x000c, 0x1ef3: 0x000a, 0x1ef4: 0x000c, 0x1ef5: 0x000c, + 0x1ef6: 0x000c, 0x1ef7: 0x000c, 0x1ef8: 0x000c, 0x1ef9: 0x000c, 0x1efa: 0x000c, 0x1efb: 0x000c, + 0x1efc: 0x000c, 0x1efd: 0x000c, 0x1efe: 0x000a, 0x1eff: 0x000a, + // Block 0x7c, offset 0x1f00 + 0x1f1e: 0x000c, 0x1f1f: 0x000c, + // Block 0x7d, offset 0x1f40 + 0x1f70: 0x000c, 0x1f71: 0x000c, + // Block 0x7e, offset 0x1f80 + 0x1f80: 0x000a, 0x1f81: 0x000a, 0x1f82: 0x000a, 0x1f83: 0x000a, 0x1f84: 0x000a, 0x1f85: 0x000a, + 0x1f86: 0x000a, 0x1f87: 0x000a, 0x1f88: 0x000a, 0x1f89: 0x000a, 0x1f8a: 0x000a, 0x1f8b: 0x000a, + 0x1f8c: 0x000a, 0x1f8d: 0x000a, 0x1f8e: 0x000a, 0x1f8f: 0x000a, 0x1f90: 0x000a, 0x1f91: 0x000a, + 0x1f92: 0x000a, 0x1f93: 0x000a, 0x1f94: 0x000a, 0x1f95: 0x000a, 0x1f96: 0x000a, 0x1f97: 0x000a, + 0x1f98: 0x000a, 0x1f99: 0x000a, 0x1f9a: 0x000a, 0x1f9b: 0x000a, 0x1f9c: 0x000a, 0x1f9d: 0x000a, + 0x1f9e: 0x000a, 0x1f9f: 0x000a, 0x1fa0: 0x000a, 0x1fa1: 0x000a, + // Block 0x7f, offset 0x1fc0 + 0x1fc8: 0x000a, + // Block 0x80, offset 0x2000 + 0x2002: 0x000c, + 0x2006: 0x000c, 0x200b: 0x000c, + 0x2025: 0x000c, 0x2026: 0x000c, 0x2028: 0x000a, 0x2029: 0x000a, + 0x202a: 0x000a, 0x202b: 0x000a, + 0x2038: 0x0004, 0x2039: 0x0004, + // Block 0x81, offset 0x2040 + 0x2074: 0x000a, 0x2075: 0x000a, + 0x2076: 0x000a, 0x2077: 0x000a, + // Block 0x82, offset 0x2080 + 0x2084: 0x000c, 0x2085: 0x000c, + 0x20a0: 0x000c, 0x20a1: 0x000c, 0x20a2: 0x000c, 0x20a3: 0x000c, + 0x20a4: 0x000c, 0x20a5: 0x000c, 0x20a6: 0x000c, 0x20a7: 0x000c, 0x20a8: 0x000c, 0x20a9: 0x000c, + 0x20aa: 0x000c, 0x20ab: 0x000c, 0x20ac: 0x000c, 0x20ad: 0x000c, 0x20ae: 0x000c, 0x20af: 0x000c, + 0x20b0: 0x000c, 0x20b1: 0x000c, + 0x20bf: 0x000c, + // Block 0x83, offset 0x20c0 + 0x20e6: 0x000c, 0x20e7: 0x000c, 0x20e8: 0x000c, 0x20e9: 0x000c, + 0x20ea: 0x000c, 0x20eb: 0x000c, 0x20ec: 0x000c, 0x20ed: 0x000c, + // Block 0x84, offset 0x2100 + 0x2107: 0x000c, 0x2108: 0x000c, 0x2109: 0x000c, 0x210a: 0x000c, 0x210b: 0x000c, + 0x210c: 0x000c, 0x210d: 0x000c, 0x210e: 0x000c, 0x210f: 0x000c, 0x2110: 0x000c, 0x2111: 0x000c, + // Block 0x85, offset 0x2140 + 0x2140: 0x000c, 0x2141: 0x000c, 0x2142: 0x000c, + 0x2173: 0x000c, + 0x2176: 0x000c, 0x2177: 0x000c, 0x2178: 0x000c, 0x2179: 0x000c, + 0x217c: 0x000c, 0x217d: 0x000c, + // Block 0x86, offset 0x2180 + 0x21a5: 0x000c, + // Block 0x87, offset 0x21c0 + 0x21e9: 0x000c, + 0x21ea: 0x000c, 0x21eb: 0x000c, 0x21ec: 0x000c, 0x21ed: 0x000c, 0x21ee: 0x000c, + 0x21f1: 0x000c, 0x21f2: 0x000c, 0x21f5: 0x000c, + 0x21f6: 0x000c, + // Block 0x88, offset 0x2200 + 0x2203: 0x000c, + 0x220c: 0x000c, + 0x223c: 0x000c, + // Block 0x89, offset 0x2240 + 0x2270: 0x000c, 0x2272: 0x000c, 0x2273: 0x000c, 0x2274: 0x000c, + 0x2277: 0x000c, 0x2278: 0x000c, + 0x227e: 0x000c, 0x227f: 0x000c, + // Block 0x8a, offset 0x2280 + 0x2281: 0x000c, + 0x22ac: 0x000c, 0x22ad: 0x000c, + 0x22b6: 0x000c, + // Block 0x8b, offset 0x22c0 + 0x22e5: 0x000c, 0x22e8: 0x000c, + 0x22ed: 0x000c, + // Block 0x8c, offset 0x2300 + 0x231d: 0x0001, + 0x231e: 0x000c, 0x231f: 0x0001, 0x2320: 0x0001, 0x2321: 0x0001, 0x2322: 0x0001, 0x2323: 0x0001, + 0x2324: 0x0001, 0x2325: 0x0001, 0x2326: 0x0001, 0x2327: 0x0001, 0x2328: 0x0001, 0x2329: 0x0003, + 0x232a: 0x0001, 0x232b: 0x0001, 0x232c: 0x0001, 0x232d: 0x0001, 0x232e: 0x0001, 0x232f: 0x0001, + 0x2330: 0x0001, 0x2331: 0x0001, 0x2332: 0x0001, 0x2333: 0x0001, 0x2334: 0x0001, 0x2335: 0x0001, + 0x2336: 0x0001, 0x2337: 0x0001, 0x2338: 0x0001, 0x2339: 0x0001, 0x233a: 0x0001, 0x233b: 0x0001, + 0x233c: 0x0001, 0x233d: 0x0001, 0x233e: 0x0001, 0x233f: 0x0001, + // Block 0x8d, offset 0x2340 + 0x2340: 0x0001, 0x2341: 0x0001, 0x2342: 0x0001, 0x2343: 0x0001, 0x2344: 0x0001, 0x2345: 0x0001, + 0x2346: 0x0001, 0x2347: 0x0001, 0x2348: 0x0001, 0x2349: 0x0001, 0x234a: 0x0001, 0x234b: 0x0001, + 0x234c: 0x0001, 0x234d: 0x0001, 0x234e: 0x0001, 0x234f: 0x0001, 0x2350: 0x000d, 0x2351: 0x000d, + 0x2352: 0x000d, 0x2353: 0x000d, 0x2354: 0x000d, 0x2355: 0x000d, 0x2356: 0x000d, 0x2357: 0x000d, + 0x2358: 0x000d, 0x2359: 0x000d, 0x235a: 0x000d, 0x235b: 0x000d, 0x235c: 0x000d, 0x235d: 0x000d, + 0x235e: 0x000d, 0x235f: 0x000d, 0x2360: 0x000d, 0x2361: 0x000d, 0x2362: 0x000d, 0x2363: 0x000d, + 0x2364: 0x000d, 0x2365: 0x000d, 0x2366: 0x000d, 0x2367: 0x000d, 0x2368: 0x000d, 0x2369: 0x000d, + 0x236a: 0x000d, 0x236b: 0x000d, 0x236c: 0x000d, 0x236d: 0x000d, 0x236e: 0x000d, 0x236f: 0x000d, + 0x2370: 0x000d, 0x2371: 0x000d, 0x2372: 0x000d, 0x2373: 0x000d, 0x2374: 0x000d, 0x2375: 0x000d, + 0x2376: 0x000d, 0x2377: 0x000d, 0x2378: 0x000d, 0x2379: 0x000d, 0x237a: 0x000d, 0x237b: 0x000d, + 0x237c: 0x000d, 0x237d: 0x000d, 0x237e: 0x000d, 0x237f: 0x000d, + // Block 0x8e, offset 0x2380 + 0x2380: 0x000d, 0x2381: 0x000d, 0x2382: 0x000d, 0x2383: 0x000d, 0x2384: 0x000d, 0x2385: 0x000d, + 0x2386: 0x000d, 0x2387: 0x000d, 0x2388: 0x000d, 0x2389: 0x000d, 0x238a: 0x000d, 0x238b: 0x000d, + 0x238c: 0x000d, 0x238d: 0x000d, 0x238e: 0x000d, 0x238f: 0x000d, 0x2390: 0x000d, 0x2391: 0x000d, + 0x2392: 0x000d, 0x2393: 0x000d, 0x2394: 0x000d, 0x2395: 0x000d, 0x2396: 0x000d, 0x2397: 0x000d, + 0x2398: 0x000d, 0x2399: 0x000d, 0x239a: 0x000d, 0x239b: 0x000d, 0x239c: 0x000d, 0x239d: 0x000d, + 0x239e: 0x000d, 0x239f: 0x000d, 0x23a0: 0x000d, 0x23a1: 0x000d, 0x23a2: 0x000d, 0x23a3: 0x000d, + 0x23a4: 0x000d, 0x23a5: 0x000d, 0x23a6: 0x000d, 0x23a7: 0x000d, 0x23a8: 0x000d, 0x23a9: 0x000d, + 0x23aa: 0x000d, 0x23ab: 0x000d, 0x23ac: 0x000d, 0x23ad: 0x000d, 0x23ae: 0x000d, 0x23af: 0x000d, + 0x23b0: 0x000d, 0x23b1: 0x000d, 0x23b2: 0x000d, 0x23b3: 0x000d, 0x23b4: 0x000d, 0x23b5: 0x000d, + 0x23b6: 0x000d, 0x23b7: 0x000d, 0x23b8: 0x000d, 0x23b9: 0x000d, 0x23ba: 0x000d, 0x23bb: 0x000d, + 0x23bc: 0x000d, 0x23bd: 0x000d, 0x23be: 0x000a, 0x23bf: 0x000a, + // Block 0x8f, offset 0x23c0 + 0x23c0: 0x000d, 0x23c1: 0x000d, 0x23c2: 0x000d, 0x23c3: 0x000d, 0x23c4: 0x000d, 0x23c5: 0x000d, + 0x23c6: 0x000d, 0x23c7: 0x000d, 0x23c8: 0x000d, 0x23c9: 0x000d, 0x23ca: 0x000d, 0x23cb: 0x000d, + 0x23cc: 0x000d, 0x23cd: 0x000d, 0x23ce: 0x000d, 0x23cf: 0x000d, 0x23d0: 0x000b, 0x23d1: 0x000b, + 0x23d2: 0x000b, 0x23d3: 0x000b, 0x23d4: 0x000b, 0x23d5: 0x000b, 0x23d6: 0x000b, 0x23d7: 0x000b, + 0x23d8: 0x000b, 0x23d9: 0x000b, 0x23da: 0x000b, 0x23db: 0x000b, 0x23dc: 0x000b, 0x23dd: 0x000b, + 0x23de: 0x000b, 0x23df: 0x000b, 0x23e0: 0x000b, 0x23e1: 0x000b, 0x23e2: 0x000b, 0x23e3: 0x000b, + 0x23e4: 0x000b, 0x23e5: 0x000b, 0x23e6: 0x000b, 0x23e7: 0x000b, 0x23e8: 0x000b, 0x23e9: 0x000b, + 0x23ea: 0x000b, 0x23eb: 0x000b, 0x23ec: 0x000b, 0x23ed: 0x000b, 0x23ee: 0x000b, 0x23ef: 0x000b, + 0x23f0: 0x000d, 0x23f1: 0x000d, 0x23f2: 0x000d, 0x23f3: 0x000d, 0x23f4: 0x000d, 0x23f5: 0x000d, + 0x23f6: 0x000d, 0x23f7: 0x000d, 0x23f8: 0x000d, 0x23f9: 0x000d, 0x23fa: 0x000d, 0x23fb: 0x000d, + 0x23fc: 0x000d, 0x23fd: 0x000a, 0x23fe: 0x000d, 0x23ff: 0x000d, + // Block 0x90, offset 0x2400 + 0x2400: 0x000c, 0x2401: 0x000c, 0x2402: 0x000c, 0x2403: 0x000c, 0x2404: 0x000c, 0x2405: 0x000c, + 0x2406: 0x000c, 0x2407: 0x000c, 0x2408: 0x000c, 0x2409: 0x000c, 0x240a: 0x000c, 0x240b: 0x000c, + 0x240c: 0x000c, 0x240d: 0x000c, 0x240e: 0x000c, 0x240f: 0x000c, 0x2410: 0x000a, 0x2411: 0x000a, + 0x2412: 0x000a, 0x2413: 0x000a, 0x2414: 0x000a, 0x2415: 0x000a, 0x2416: 0x000a, 0x2417: 0x000a, + 0x2418: 0x000a, 0x2419: 0x000a, + 0x2420: 0x000c, 0x2421: 0x000c, 0x2422: 0x000c, 0x2423: 0x000c, + 0x2424: 0x000c, 0x2425: 0x000c, 0x2426: 0x000c, 0x2427: 0x000c, 0x2428: 0x000c, 0x2429: 0x000c, + 0x242a: 0x000c, 0x242b: 0x000c, 0x242c: 0x000c, 0x242d: 0x000c, 0x242e: 0x000c, 0x242f: 0x000c, + 0x2430: 0x000a, 0x2431: 0x000a, 0x2432: 0x000a, 0x2433: 0x000a, 0x2434: 0x000a, 0x2435: 0x000a, + 0x2436: 0x000a, 0x2437: 0x000a, 0x2438: 0x000a, 0x2439: 0x000a, 0x243a: 0x000a, 0x243b: 0x000a, + 0x243c: 0x000a, 0x243d: 0x000a, 0x243e: 0x000a, 0x243f: 0x000a, + // Block 0x91, offset 0x2440 + 0x2440: 0x000a, 0x2441: 0x000a, 0x2442: 0x000a, 0x2443: 0x000a, 0x2444: 0x000a, 0x2445: 0x000a, + 0x2446: 0x000a, 0x2447: 0x000a, 0x2448: 0x000a, 0x2449: 0x000a, 0x244a: 0x000a, 0x244b: 0x000a, + 0x244c: 0x000a, 0x244d: 0x000a, 0x244e: 0x000a, 0x244f: 0x000a, 0x2450: 0x0006, 0x2451: 0x000a, + 0x2452: 0x0006, 0x2454: 0x000a, 0x2455: 0x0006, 0x2456: 0x000a, 0x2457: 0x000a, + 0x2458: 0x000a, 0x2459: 0x009a, 0x245a: 0x008a, 0x245b: 0x007a, 0x245c: 0x006a, 0x245d: 0x009a, + 0x245e: 0x008a, 0x245f: 0x0004, 0x2460: 0x000a, 0x2461: 0x000a, 0x2462: 0x0003, 0x2463: 0x0003, + 0x2464: 0x000a, 0x2465: 0x000a, 0x2466: 0x000a, 0x2468: 0x000a, 0x2469: 0x0004, + 0x246a: 0x0004, 0x246b: 0x000a, + 0x2470: 0x000d, 0x2471: 0x000d, 0x2472: 0x000d, 0x2473: 0x000d, 0x2474: 0x000d, 0x2475: 0x000d, + 0x2476: 0x000d, 0x2477: 0x000d, 0x2478: 0x000d, 0x2479: 0x000d, 0x247a: 0x000d, 0x247b: 0x000d, + 0x247c: 0x000d, 0x247d: 0x000d, 0x247e: 0x000d, 0x247f: 0x000d, + // Block 0x92, offset 0x2480 + 0x2480: 0x000d, 0x2481: 0x000d, 0x2482: 0x000d, 0x2483: 0x000d, 0x2484: 0x000d, 0x2485: 0x000d, + 0x2486: 0x000d, 0x2487: 0x000d, 0x2488: 0x000d, 0x2489: 0x000d, 0x248a: 0x000d, 0x248b: 0x000d, + 0x248c: 0x000d, 0x248d: 0x000d, 0x248e: 0x000d, 0x248f: 0x000d, 0x2490: 0x000d, 0x2491: 0x000d, + 0x2492: 0x000d, 0x2493: 0x000d, 0x2494: 0x000d, 0x2495: 0x000d, 0x2496: 0x000d, 0x2497: 0x000d, + 0x2498: 0x000d, 0x2499: 0x000d, 0x249a: 0x000d, 0x249b: 0x000d, 0x249c: 0x000d, 0x249d: 0x000d, + 0x249e: 0x000d, 0x249f: 0x000d, 0x24a0: 0x000d, 0x24a1: 0x000d, 0x24a2: 0x000d, 0x24a3: 0x000d, + 0x24a4: 0x000d, 0x24a5: 0x000d, 0x24a6: 0x000d, 0x24a7: 0x000d, 0x24a8: 0x000d, 0x24a9: 0x000d, + 0x24aa: 0x000d, 0x24ab: 0x000d, 0x24ac: 0x000d, 0x24ad: 0x000d, 0x24ae: 0x000d, 0x24af: 0x000d, + 0x24b0: 0x000d, 0x24b1: 0x000d, 0x24b2: 0x000d, 0x24b3: 0x000d, 0x24b4: 0x000d, 0x24b5: 0x000d, + 0x24b6: 0x000d, 0x24b7: 0x000d, 0x24b8: 0x000d, 0x24b9: 0x000d, 0x24ba: 0x000d, 0x24bb: 0x000d, + 0x24bc: 0x000d, 0x24bd: 0x000d, 0x24be: 0x000d, 0x24bf: 0x000b, + // Block 0x93, offset 0x24c0 + 0x24c1: 0x000a, 0x24c2: 0x000a, 0x24c3: 0x0004, 0x24c4: 0x0004, 0x24c5: 0x0004, + 0x24c6: 0x000a, 0x24c7: 0x000a, 0x24c8: 0x003a, 0x24c9: 0x002a, 0x24ca: 0x000a, 0x24cb: 0x0003, + 0x24cc: 0x0006, 0x24cd: 0x0003, 0x24ce: 0x0006, 0x24cf: 0x0006, 0x24d0: 0x0002, 0x24d1: 0x0002, + 0x24d2: 0x0002, 0x24d3: 0x0002, 0x24d4: 0x0002, 0x24d5: 0x0002, 0x24d6: 0x0002, 0x24d7: 0x0002, + 0x24d8: 0x0002, 0x24d9: 0x0002, 0x24da: 0x0006, 0x24db: 0x000a, 0x24dc: 0x000a, 0x24dd: 0x000a, + 0x24de: 0x000a, 0x24df: 0x000a, 0x24e0: 0x000a, + 0x24fb: 0x005a, + 0x24fc: 0x000a, 0x24fd: 0x004a, 0x24fe: 0x000a, 0x24ff: 0x000a, + // Block 0x94, offset 0x2500 + 0x2500: 0x000a, + 0x251b: 0x005a, 0x251c: 0x000a, 0x251d: 0x004a, + 0x251e: 0x000a, 0x251f: 0x00fa, 0x2520: 0x00ea, 0x2521: 0x000a, 0x2522: 0x003a, 0x2523: 0x002a, + 0x2524: 0x000a, 0x2525: 0x000a, + // Block 0x95, offset 0x2540 + 0x2560: 0x0004, 0x2561: 0x0004, 0x2562: 0x000a, 0x2563: 0x000a, + 0x2564: 0x000a, 0x2565: 0x0004, 0x2566: 0x0004, 0x2568: 0x000a, 0x2569: 0x000a, + 0x256a: 0x000a, 0x256b: 0x000a, 0x256c: 0x000a, 0x256d: 0x000a, 0x256e: 0x000a, + 0x2570: 0x000b, 0x2571: 0x000b, 0x2572: 0x000b, 0x2573: 0x000b, 0x2574: 0x000b, 0x2575: 0x000b, + 0x2576: 0x000b, 0x2577: 0x000b, 0x2578: 0x000b, 0x2579: 0x000a, 0x257a: 0x000a, 0x257b: 0x000a, + 0x257c: 0x000a, 0x257d: 0x000a, 0x257e: 0x000b, 0x257f: 0x000b, + // Block 0x96, offset 0x2580 + 0x2581: 0x000a, + // Block 0x97, offset 0x25c0 + 0x25c0: 0x000a, 0x25c1: 0x000a, 0x25c2: 0x000a, 0x25c3: 0x000a, 0x25c4: 0x000a, 0x25c5: 0x000a, + 0x25c6: 0x000a, 0x25c7: 0x000a, 0x25c8: 0x000a, 0x25c9: 0x000a, 0x25ca: 0x000a, 0x25cb: 0x000a, + 0x25cc: 0x000a, 0x25d0: 0x000a, 0x25d1: 0x000a, + 0x25d2: 0x000a, 0x25d3: 0x000a, 0x25d4: 0x000a, 0x25d5: 0x000a, 0x25d6: 0x000a, 0x25d7: 0x000a, + 0x25d8: 0x000a, 0x25d9: 0x000a, 0x25da: 0x000a, 0x25db: 0x000a, + 0x25e0: 0x000a, + // Block 0x98, offset 0x2600 + 0x263d: 0x000c, + // Block 0x99, offset 0x2640 + 0x2660: 0x000c, 0x2661: 0x0002, 0x2662: 0x0002, 0x2663: 0x0002, + 0x2664: 0x0002, 0x2665: 0x0002, 0x2666: 0x0002, 0x2667: 0x0002, 0x2668: 0x0002, 0x2669: 0x0002, + 0x266a: 0x0002, 0x266b: 0x0002, 0x266c: 0x0002, 0x266d: 0x0002, 0x266e: 0x0002, 0x266f: 0x0002, + 0x2670: 0x0002, 0x2671: 0x0002, 0x2672: 0x0002, 0x2673: 0x0002, 0x2674: 0x0002, 0x2675: 0x0002, + 0x2676: 0x0002, 0x2677: 0x0002, 0x2678: 0x0002, 0x2679: 0x0002, 0x267a: 0x0002, 0x267b: 0x0002, + // Block 0x9a, offset 0x2680 + 0x26b6: 0x000c, 0x26b7: 0x000c, 0x26b8: 0x000c, 0x26b9: 0x000c, 0x26ba: 0x000c, + // Block 0x9b, offset 0x26c0 + 0x26c0: 0x0001, 0x26c1: 0x0001, 0x26c2: 0x0001, 0x26c3: 0x0001, 0x26c4: 0x0001, 0x26c5: 0x0001, + 0x26c6: 0x0001, 0x26c7: 0x0001, 0x26c8: 0x0001, 0x26c9: 0x0001, 0x26ca: 0x0001, 0x26cb: 0x0001, + 0x26cc: 0x0001, 0x26cd: 0x0001, 0x26ce: 0x0001, 0x26cf: 0x0001, 0x26d0: 0x0001, 0x26d1: 0x0001, + 0x26d2: 0x0001, 0x26d3: 0x0001, 0x26d4: 0x0001, 0x26d5: 0x0001, 0x26d6: 0x0001, 0x26d7: 0x0001, + 0x26d8: 0x0001, 0x26d9: 0x0001, 0x26da: 0x0001, 0x26db: 0x0001, 0x26dc: 0x0001, 0x26dd: 0x0001, + 0x26de: 0x0001, 0x26df: 0x0001, 0x26e0: 0x0001, 0x26e1: 0x0001, 0x26e2: 0x0001, 0x26e3: 0x0001, + 0x26e4: 0x0001, 0x26e5: 0x0001, 0x26e6: 0x0001, 0x26e7: 0x0001, 0x26e8: 0x0001, 0x26e9: 0x0001, + 0x26ea: 0x0001, 0x26eb: 0x0001, 0x26ec: 0x0001, 0x26ed: 0x0001, 0x26ee: 0x0001, 0x26ef: 0x0001, + 0x26f0: 0x0001, 0x26f1: 0x0001, 0x26f2: 0x0001, 0x26f3: 0x0001, 0x26f4: 0x0001, 0x26f5: 0x0001, + 0x26f6: 0x0001, 0x26f7: 0x0001, 0x26f8: 0x0001, 0x26f9: 0x0001, 0x26fa: 0x0001, 0x26fb: 0x0001, + 0x26fc: 0x0001, 0x26fd: 0x0001, 0x26fe: 0x0001, 0x26ff: 0x0001, + // Block 0x9c, offset 0x2700 + 0x2700: 0x0001, 0x2701: 0x0001, 0x2702: 0x0001, 0x2703: 0x0001, 0x2704: 0x0001, 0x2705: 0x0001, + 0x2706: 0x0001, 0x2707: 0x0001, 0x2708: 0x0001, 0x2709: 0x0001, 0x270a: 0x0001, 0x270b: 0x0001, + 0x270c: 0x0001, 0x270d: 0x0001, 0x270e: 0x0001, 0x270f: 0x0001, 0x2710: 0x0001, 0x2711: 0x0001, + 0x2712: 0x0001, 0x2713: 0x0001, 0x2714: 0x0001, 0x2715: 0x0001, 0x2716: 0x0001, 0x2717: 0x0001, + 0x2718: 0x0001, 0x2719: 0x0001, 0x271a: 0x0001, 0x271b: 0x0001, 0x271c: 0x0001, 0x271d: 0x0001, + 0x271e: 0x0001, 0x271f: 0x000a, 0x2720: 0x0001, 0x2721: 0x0001, 0x2722: 0x0001, 0x2723: 0x0001, + 0x2724: 0x0001, 0x2725: 0x0001, 0x2726: 0x0001, 0x2727: 0x0001, 0x2728: 0x0001, 0x2729: 0x0001, + 0x272a: 0x0001, 0x272b: 0x0001, 0x272c: 0x0001, 0x272d: 0x0001, 0x272e: 0x0001, 0x272f: 0x0001, + 0x2730: 0x0001, 0x2731: 0x0001, 0x2732: 0x0001, 0x2733: 0x0001, 0x2734: 0x0001, 0x2735: 0x0001, + 0x2736: 0x0001, 0x2737: 0x0001, 0x2738: 0x0001, 0x2739: 0x0001, 0x273a: 0x0001, 0x273b: 0x0001, + 0x273c: 0x0001, 0x273d: 0x0001, 0x273e: 0x0001, 0x273f: 0x0001, + // Block 0x9d, offset 0x2740 + 0x2740: 0x0001, 0x2741: 0x000c, 0x2742: 0x000c, 0x2743: 0x000c, 0x2744: 0x0001, 0x2745: 0x000c, + 0x2746: 0x000c, 0x2747: 0x0001, 0x2748: 0x0001, 0x2749: 0x0001, 0x274a: 0x0001, 0x274b: 0x0001, + 0x274c: 0x000c, 0x274d: 0x000c, 0x274e: 0x000c, 0x274f: 0x000c, 0x2750: 0x0001, 0x2751: 0x0001, + 0x2752: 0x0001, 0x2753: 0x0001, 0x2754: 0x0001, 0x2755: 0x0001, 0x2756: 0x0001, 0x2757: 0x0001, + 0x2758: 0x0001, 0x2759: 0x0001, 0x275a: 0x0001, 0x275b: 0x0001, 0x275c: 0x0001, 0x275d: 0x0001, + 0x275e: 0x0001, 0x275f: 0x0001, 0x2760: 0x0001, 0x2761: 0x0001, 0x2762: 0x0001, 0x2763: 0x0001, + 0x2764: 0x0001, 0x2765: 0x0001, 0x2766: 0x0001, 0x2767: 0x0001, 0x2768: 0x0001, 0x2769: 0x0001, + 0x276a: 0x0001, 0x276b: 0x0001, 0x276c: 0x0001, 0x276d: 0x0001, 0x276e: 0x0001, 0x276f: 0x0001, + 0x2770: 0x0001, 0x2771: 0x0001, 0x2772: 0x0001, 0x2773: 0x0001, 0x2774: 0x0001, 0x2775: 0x0001, + 0x2776: 0x0001, 0x2777: 0x0001, 0x2778: 0x000c, 0x2779: 0x000c, 0x277a: 0x000c, 0x277b: 0x0001, + 0x277c: 0x0001, 0x277d: 0x0001, 0x277e: 0x0001, 0x277f: 0x000c, + // Block 0x9e, offset 0x2780 + 0x2780: 0x0001, 0x2781: 0x0001, 0x2782: 0x0001, 0x2783: 0x0001, 0x2784: 0x0001, 0x2785: 0x0001, + 0x2786: 0x0001, 0x2787: 0x0001, 0x2788: 0x0001, 0x2789: 0x0001, 0x278a: 0x0001, 0x278b: 0x0001, + 0x278c: 0x0001, 0x278d: 0x0001, 0x278e: 0x0001, 0x278f: 0x0001, 0x2790: 0x0001, 0x2791: 0x0001, + 0x2792: 0x0001, 0x2793: 0x0001, 0x2794: 0x0001, 0x2795: 0x0001, 0x2796: 0x0001, 0x2797: 0x0001, + 0x2798: 0x0001, 0x2799: 0x0001, 0x279a: 0x0001, 0x279b: 0x0001, 0x279c: 0x0001, 0x279d: 0x0001, + 0x279e: 0x0001, 0x279f: 0x0001, 0x27a0: 0x0001, 0x27a1: 0x0001, 0x27a2: 0x0001, 0x27a3: 0x0001, + 0x27a4: 0x0001, 0x27a5: 0x000c, 0x27a6: 0x000c, 0x27a7: 0x0001, 0x27a8: 0x0001, 0x27a9: 0x0001, + 0x27aa: 0x0001, 0x27ab: 0x0001, 0x27ac: 0x0001, 0x27ad: 0x0001, 0x27ae: 0x0001, 0x27af: 0x0001, + 0x27b0: 0x0001, 0x27b1: 0x0001, 0x27b2: 0x0001, 0x27b3: 0x0001, 0x27b4: 0x0001, 0x27b5: 0x0001, + 0x27b6: 0x0001, 0x27b7: 0x0001, 0x27b8: 0x0001, 0x27b9: 0x0001, 0x27ba: 0x0001, 0x27bb: 0x0001, + 0x27bc: 0x0001, 0x27bd: 0x0001, 0x27be: 0x0001, 0x27bf: 0x0001, + // Block 0x9f, offset 0x27c0 + 0x27c0: 0x0001, 0x27c1: 0x0001, 0x27c2: 0x0001, 0x27c3: 0x0001, 0x27c4: 0x0001, 0x27c5: 0x0001, + 0x27c6: 0x0001, 0x27c7: 0x0001, 0x27c8: 0x0001, 0x27c9: 0x0001, 0x27ca: 0x0001, 0x27cb: 0x0001, + 0x27cc: 0x0001, 0x27cd: 0x0001, 0x27ce: 0x0001, 0x27cf: 0x0001, 0x27d0: 0x0001, 0x27d1: 0x0001, + 0x27d2: 0x0001, 0x27d3: 0x0001, 0x27d4: 0x0001, 0x27d5: 0x0001, 0x27d6: 0x0001, 0x27d7: 0x0001, + 0x27d8: 0x0001, 0x27d9: 0x0001, 0x27da: 0x0001, 0x27db: 0x0001, 0x27dc: 0x0001, 0x27dd: 0x0001, + 0x27de: 0x0001, 0x27df: 0x0001, 0x27e0: 0x0001, 0x27e1: 0x0001, 0x27e2: 0x0001, 0x27e3: 0x0001, + 0x27e4: 0x0001, 0x27e5: 0x0001, 0x27e6: 0x0001, 0x27e7: 0x0001, 0x27e8: 0x0001, 0x27e9: 0x0001, + 0x27ea: 0x0001, 0x27eb: 0x0001, 0x27ec: 0x0001, 0x27ed: 0x0001, 0x27ee: 0x0001, 0x27ef: 0x0001, + 0x27f0: 0x0001, 0x27f1: 0x0001, 0x27f2: 0x0001, 0x27f3: 0x0001, 0x27f4: 0x0001, 0x27f5: 0x0001, + 0x27f6: 0x0001, 0x27f7: 0x0001, 0x27f8: 0x0001, 0x27f9: 0x000a, 0x27fa: 0x000a, 0x27fb: 0x000a, + 0x27fc: 0x000a, 0x27fd: 0x000a, 0x27fe: 0x000a, 0x27ff: 0x000a, + // Block 0xa0, offset 0x2800 + 0x2800: 0x000d, 0x2801: 0x000d, 0x2802: 0x000d, 0x2803: 0x000d, 0x2804: 0x000d, 0x2805: 0x000d, + 0x2806: 0x000d, 0x2807: 0x000d, 0x2808: 0x000d, 0x2809: 0x000d, 0x280a: 0x000d, 0x280b: 0x000d, + 0x280c: 0x000d, 0x280d: 0x000d, 0x280e: 0x000d, 0x280f: 0x000d, 0x2810: 0x000d, 0x2811: 0x000d, + 0x2812: 0x000d, 0x2813: 0x000d, 0x2814: 0x000d, 0x2815: 0x000d, 0x2816: 0x000d, 0x2817: 0x000d, + 0x2818: 0x000d, 0x2819: 0x000d, 0x281a: 0x000d, 0x281b: 0x000d, 0x281c: 0x000d, 0x281d: 0x000d, + 0x281e: 0x000d, 0x281f: 0x000d, 0x2820: 0x000d, 0x2821: 0x000d, 0x2822: 0x000d, 0x2823: 0x000d, + 0x2824: 0x000c, 0x2825: 0x000c, 0x2826: 0x000c, 0x2827: 0x000c, 0x2828: 0x000d, 0x2829: 0x000d, + 0x282a: 0x000d, 0x282b: 0x000d, 0x282c: 0x000d, 0x282d: 0x000d, 0x282e: 0x000d, 0x282f: 0x000d, + 0x2830: 0x0005, 0x2831: 0x0005, 0x2832: 0x0005, 0x2833: 0x0005, 0x2834: 0x0005, 0x2835: 0x0005, + 0x2836: 0x0005, 0x2837: 0x0005, 0x2838: 0x0005, 0x2839: 0x0005, 0x283a: 0x000d, 0x283b: 0x000d, + 0x283c: 0x000d, 0x283d: 0x000d, 0x283e: 0x000d, 0x283f: 0x000d, + // Block 0xa1, offset 0x2840 + 0x2840: 0x0001, 0x2841: 0x0001, 0x2842: 0x0001, 0x2843: 0x0001, 0x2844: 0x0001, 0x2845: 0x0001, + 0x2846: 0x0001, 0x2847: 0x0001, 0x2848: 0x0001, 0x2849: 0x0001, 0x284a: 0x0001, 0x284b: 0x0001, + 0x284c: 0x0001, 0x284d: 0x0001, 0x284e: 0x0001, 0x284f: 0x0001, 0x2850: 0x0001, 0x2851: 0x0001, + 0x2852: 0x0001, 0x2853: 0x0001, 0x2854: 0x0001, 0x2855: 0x0001, 0x2856: 0x0001, 0x2857: 0x0001, + 0x2858: 0x0001, 0x2859: 0x0001, 0x285a: 0x0001, 0x285b: 0x0001, 0x285c: 0x0001, 0x285d: 0x0001, + 0x285e: 0x0001, 0x285f: 0x0001, 0x2860: 0x0005, 0x2861: 0x0005, 0x2862: 0x0005, 0x2863: 0x0005, + 0x2864: 0x0005, 0x2865: 0x0005, 0x2866: 0x0005, 0x2867: 0x0005, 0x2868: 0x0005, 0x2869: 0x0005, + 0x286a: 0x0005, 0x286b: 0x0005, 0x286c: 0x0005, 0x286d: 0x0005, 0x286e: 0x0005, 0x286f: 0x0005, + 0x2870: 0x0005, 0x2871: 0x0005, 0x2872: 0x0005, 0x2873: 0x0005, 0x2874: 0x0005, 0x2875: 0x0005, + 0x2876: 0x0005, 0x2877: 0x0005, 0x2878: 0x0005, 0x2879: 0x0005, 0x287a: 0x0005, 0x287b: 0x0005, + 0x287c: 0x0005, 0x287d: 0x0005, 0x287e: 0x0005, 0x287f: 0x0001, + // Block 0xa2, offset 0x2880 + 0x2880: 0x0001, 0x2881: 0x0001, 0x2882: 0x0001, 0x2883: 0x0001, 0x2884: 0x0001, 0x2885: 0x0001, + 0x2886: 0x0001, 0x2887: 0x0001, 0x2888: 0x0001, 0x2889: 0x0001, 0x288a: 0x0001, 0x288b: 0x0001, + 0x288c: 0x0001, 0x288d: 0x0001, 0x288e: 0x0001, 0x288f: 0x0001, 0x2890: 0x0001, 0x2891: 0x0001, + 0x2892: 0x0001, 0x2893: 0x0001, 0x2894: 0x0001, 0x2895: 0x0001, 0x2896: 0x0001, 0x2897: 0x0001, + 0x2898: 0x0001, 0x2899: 0x0001, 0x289a: 0x0001, 0x289b: 0x0001, 0x289c: 0x0001, 0x289d: 0x0001, + 0x289e: 0x0001, 0x289f: 0x0001, 0x28a0: 0x0001, 0x28a1: 0x0001, 0x28a2: 0x0001, 0x28a3: 0x0001, + 0x28a4: 0x0001, 0x28a5: 0x0001, 0x28a6: 0x0001, 0x28a7: 0x0001, 0x28a8: 0x0001, 0x28a9: 0x0001, + 0x28aa: 0x0001, 0x28ab: 0x0001, 0x28ac: 0x0001, 0x28ad: 0x0001, 0x28ae: 0x0001, 0x28af: 0x0001, + 0x28b0: 0x000d, 0x28b1: 0x000d, 0x28b2: 0x000d, 0x28b3: 0x000d, 0x28b4: 0x000d, 0x28b5: 0x000d, + 0x28b6: 0x000d, 0x28b7: 0x000d, 0x28b8: 0x000d, 0x28b9: 0x000d, 0x28ba: 0x000d, 0x28bb: 0x000d, + 0x28bc: 0x000d, 0x28bd: 0x000d, 0x28be: 0x000d, 0x28bf: 0x000d, + // Block 0xa3, offset 0x28c0 + 0x28c0: 0x000d, 0x28c1: 0x000d, 0x28c2: 0x000d, 0x28c3: 0x000d, 0x28c4: 0x000d, 0x28c5: 0x000d, + 0x28c6: 0x000c, 0x28c7: 0x000c, 0x28c8: 0x000c, 0x28c9: 0x000c, 0x28ca: 0x000c, 0x28cb: 0x000c, + 0x28cc: 0x000c, 0x28cd: 0x000c, 0x28ce: 0x000c, 0x28cf: 0x000c, 0x28d0: 0x000c, 0x28d1: 0x000d, + 0x28d2: 0x000d, 0x28d3: 0x000d, 0x28d4: 0x000d, 0x28d5: 0x000d, 0x28d6: 0x000d, 0x28d7: 0x000d, + 0x28d8: 0x000d, 0x28d9: 0x000d, 0x28da: 0x000d, 0x28db: 0x000d, 0x28dc: 0x000d, 0x28dd: 0x000d, + 0x28de: 0x000d, 0x28df: 0x000d, 0x28e0: 0x000d, 0x28e1: 0x000d, 0x28e2: 0x000d, 0x28e3: 0x000d, + 0x28e4: 0x000d, 0x28e5: 0x000d, 0x28e6: 0x000d, 0x28e7: 0x000d, 0x28e8: 0x000d, 0x28e9: 0x000d, + 0x28ea: 0x000d, 0x28eb: 0x000d, 0x28ec: 0x000d, 0x28ed: 0x000d, 0x28ee: 0x000d, 0x28ef: 0x000d, + 0x28f0: 0x0001, 0x28f1: 0x0001, 0x28f2: 0x0001, 0x28f3: 0x0001, 0x28f4: 0x0001, 0x28f5: 0x0001, + 0x28f6: 0x0001, 0x28f7: 0x0001, 0x28f8: 0x0001, 0x28f9: 0x0001, 0x28fa: 0x0001, 0x28fb: 0x0001, + 0x28fc: 0x0001, 0x28fd: 0x0001, 0x28fe: 0x0001, 0x28ff: 0x0001, + // Block 0xa4, offset 0x2900 + 0x2901: 0x000c, + 0x2938: 0x000c, 0x2939: 0x000c, 0x293a: 0x000c, 0x293b: 0x000c, + 0x293c: 0x000c, 0x293d: 0x000c, 0x293e: 0x000c, 0x293f: 0x000c, + // Block 0xa5, offset 0x2940 + 0x2940: 0x000c, 0x2941: 0x000c, 0x2942: 0x000c, 0x2943: 0x000c, 0x2944: 0x000c, 0x2945: 0x000c, + 0x2946: 0x000c, + 0x2952: 0x000a, 0x2953: 0x000a, 0x2954: 0x000a, 0x2955: 0x000a, 0x2956: 0x000a, 0x2957: 0x000a, + 0x2958: 0x000a, 0x2959: 0x000a, 0x295a: 0x000a, 0x295b: 0x000a, 0x295c: 0x000a, 0x295d: 0x000a, + 0x295e: 0x000a, 0x295f: 0x000a, 0x2960: 0x000a, 0x2961: 0x000a, 0x2962: 0x000a, 0x2963: 0x000a, + 0x2964: 0x000a, 0x2965: 0x000a, + 0x297f: 0x000c, + // Block 0xa6, offset 0x2980 + 0x2980: 0x000c, 0x2981: 0x000c, + 0x29b3: 0x000c, 0x29b4: 0x000c, 0x29b5: 0x000c, + 0x29b6: 0x000c, 0x29b9: 0x000c, 0x29ba: 0x000c, + // Block 0xa7, offset 0x29c0 + 0x29c0: 0x000c, 0x29c1: 0x000c, 0x29c2: 0x000c, + 0x29e7: 0x000c, 0x29e8: 0x000c, 0x29e9: 0x000c, + 0x29ea: 0x000c, 0x29eb: 0x000c, 0x29ed: 0x000c, 0x29ee: 0x000c, 0x29ef: 0x000c, + 0x29f0: 0x000c, 0x29f1: 0x000c, 0x29f2: 0x000c, 0x29f3: 0x000c, 0x29f4: 0x000c, + // Block 0xa8, offset 0x2a00 + 0x2a33: 0x000c, + // Block 0xa9, offset 0x2a40 + 0x2a40: 0x000c, 0x2a41: 0x000c, + 0x2a76: 0x000c, 0x2a77: 0x000c, 0x2a78: 0x000c, 0x2a79: 0x000c, 0x2a7a: 0x000c, 0x2a7b: 0x000c, + 0x2a7c: 0x000c, 0x2a7d: 0x000c, 0x2a7e: 0x000c, + // Block 0xaa, offset 0x2a80 + 0x2a89: 0x000c, 0x2a8a: 0x000c, 0x2a8b: 0x000c, + 0x2a8c: 0x000c, + // Block 0xab, offset 0x2ac0 + 0x2aef: 0x000c, + 0x2af0: 0x000c, 0x2af1: 0x000c, 0x2af4: 0x000c, + 0x2af6: 0x000c, 0x2af7: 0x000c, + 0x2afe: 0x000c, + // Block 0xac, offset 0x2b00 + 0x2b1f: 0x000c, 0x2b23: 0x000c, + 0x2b24: 0x000c, 0x2b25: 0x000c, 0x2b26: 0x000c, 0x2b27: 0x000c, 0x2b28: 0x000c, 0x2b29: 0x000c, + 0x2b2a: 0x000c, + // Block 0xad, offset 0x2b40 + 0x2b40: 0x000c, + 0x2b66: 0x000c, 0x2b67: 0x000c, 0x2b68: 0x000c, 0x2b69: 0x000c, + 0x2b6a: 0x000c, 0x2b6b: 0x000c, 0x2b6c: 0x000c, + 0x2b70: 0x000c, 0x2b71: 0x000c, 0x2b72: 0x000c, 0x2b73: 0x000c, 0x2b74: 0x000c, + // Block 0xae, offset 0x2b80 + 0x2bb8: 0x000c, 0x2bb9: 0x000c, 0x2bba: 0x000c, 0x2bbb: 0x000c, + 0x2bbc: 0x000c, 0x2bbd: 0x000c, 0x2bbe: 0x000c, 0x2bbf: 0x000c, + // Block 0xaf, offset 0x2bc0 + 0x2bc2: 0x000c, 0x2bc3: 0x000c, 0x2bc4: 0x000c, + 0x2bc6: 0x000c, + 0x2bde: 0x000c, + // Block 0xb0, offset 0x2c00 + 0x2c33: 0x000c, 0x2c34: 0x000c, 0x2c35: 0x000c, + 0x2c36: 0x000c, 0x2c37: 0x000c, 0x2c38: 0x000c, 0x2c3a: 0x000c, + 0x2c3f: 0x000c, + // Block 0xb1, offset 0x2c40 + 0x2c40: 0x000c, 0x2c42: 0x000c, 0x2c43: 0x000c, + // Block 0xb2, offset 0x2c80 + 0x2cb2: 0x000c, 0x2cb3: 0x000c, 0x2cb4: 0x000c, 0x2cb5: 0x000c, + 0x2cbc: 0x000c, 0x2cbd: 0x000c, 0x2cbf: 0x000c, + // Block 0xb3, offset 0x2cc0 + 0x2cc0: 0x000c, + 0x2cdc: 0x000c, 0x2cdd: 0x000c, + // Block 0xb4, offset 0x2d00 + 0x2d33: 0x000c, 0x2d34: 0x000c, 0x2d35: 0x000c, + 0x2d36: 0x000c, 0x2d37: 0x000c, 0x2d38: 0x000c, 0x2d39: 0x000c, 0x2d3a: 0x000c, + 0x2d3d: 0x000c, 0x2d3f: 0x000c, + // Block 0xb5, offset 0x2d40 + 0x2d40: 0x000c, + 0x2d60: 0x000a, 0x2d61: 0x000a, 0x2d62: 0x000a, 0x2d63: 0x000a, + 0x2d64: 0x000a, 0x2d65: 0x000a, 0x2d66: 0x000a, 0x2d67: 0x000a, 0x2d68: 0x000a, 0x2d69: 0x000a, + 0x2d6a: 0x000a, 0x2d6b: 0x000a, 0x2d6c: 0x000a, + // Block 0xb6, offset 0x2d80 + 0x2dab: 0x000c, 0x2dad: 0x000c, + 0x2db0: 0x000c, 0x2db1: 0x000c, 0x2db2: 0x000c, 0x2db3: 0x000c, 0x2db4: 0x000c, 0x2db5: 0x000c, + 0x2db7: 0x000c, + // Block 0xb7, offset 0x2dc0 + 0x2ddd: 0x000c, + 0x2dde: 0x000c, 0x2ddf: 0x000c, 0x2de2: 0x000c, 0x2de3: 0x000c, + 0x2de4: 0x000c, 0x2de5: 0x000c, 0x2de7: 0x000c, 0x2de8: 0x000c, 0x2de9: 0x000c, + 0x2dea: 0x000c, 0x2deb: 0x000c, + // Block 0xb8, offset 0x2e00 + 0x2e2f: 0x000c, + 0x2e30: 0x000c, 0x2e31: 0x000c, 0x2e32: 0x000c, 0x2e33: 0x000c, 0x2e34: 0x000c, 0x2e35: 0x000c, + 0x2e36: 0x000c, 0x2e37: 0x000c, 0x2e39: 0x000c, 0x2e3a: 0x000c, + // Block 0xb9, offset 0x2e40 + 0x2e54: 0x000c, 0x2e55: 0x000c, 0x2e56: 0x000c, 0x2e57: 0x000c, + 0x2e5a: 0x000c, 0x2e5b: 0x000c, + 0x2e60: 0x000c, + // Block 0xba, offset 0x2e80 + 0x2e81: 0x000c, 0x2e82: 0x000c, 0x2e83: 0x000c, 0x2e84: 0x000c, 0x2e85: 0x000c, + 0x2e86: 0x000c, 0x2e89: 0x000c, 0x2e8a: 0x000c, + 0x2eb3: 0x000c, 0x2eb4: 0x000c, 0x2eb5: 0x000c, + 0x2eb6: 0x000c, 0x2eb7: 0x000c, 0x2eb8: 0x000c, 0x2ebb: 0x000c, + 0x2ebc: 0x000c, 0x2ebd: 0x000c, 0x2ebe: 0x000c, + // Block 0xbb, offset 0x2ec0 + 0x2ec7: 0x000c, + 0x2ed1: 0x000c, + 0x2ed2: 0x000c, 0x2ed3: 0x000c, 0x2ed4: 0x000c, 0x2ed5: 0x000c, 0x2ed6: 0x000c, + 0x2ed9: 0x000c, 0x2eda: 0x000c, 0x2edb: 0x000c, + // Block 0xbc, offset 0x2f00 + 0x2f0a: 0x000c, 0x2f0b: 0x000c, + 0x2f0c: 0x000c, 0x2f0d: 0x000c, 0x2f0e: 0x000c, 0x2f0f: 0x000c, 0x2f10: 0x000c, 0x2f11: 0x000c, + 0x2f12: 0x000c, 0x2f13: 0x000c, 0x2f14: 0x000c, 0x2f15: 0x000c, 0x2f16: 0x000c, + 0x2f18: 0x000c, 0x2f19: 0x000c, + // Block 0xbd, offset 0x2f40 + 0x2f70: 0x000c, 0x2f71: 0x000c, 0x2f72: 0x000c, 0x2f73: 0x000c, 0x2f74: 0x000c, 0x2f75: 0x000c, + 0x2f76: 0x000c, 0x2f78: 0x000c, 0x2f79: 0x000c, 0x2f7a: 0x000c, 0x2f7b: 0x000c, + 0x2f7c: 0x000c, 0x2f7d: 0x000c, + // Block 0xbe, offset 0x2f80 + 0x2f92: 0x000c, 0x2f93: 0x000c, 0x2f94: 0x000c, 0x2f95: 0x000c, 0x2f96: 0x000c, 0x2f97: 0x000c, + 0x2f98: 0x000c, 0x2f99: 0x000c, 0x2f9a: 0x000c, 0x2f9b: 0x000c, 0x2f9c: 0x000c, 0x2f9d: 0x000c, + 0x2f9e: 0x000c, 0x2f9f: 0x000c, 0x2fa0: 0x000c, 0x2fa1: 0x000c, 0x2fa2: 0x000c, 0x2fa3: 0x000c, + 0x2fa4: 0x000c, 0x2fa5: 0x000c, 0x2fa6: 0x000c, 0x2fa7: 0x000c, + 0x2faa: 0x000c, 0x2fab: 0x000c, 0x2fac: 0x000c, 0x2fad: 0x000c, 0x2fae: 0x000c, 0x2faf: 0x000c, + 0x2fb0: 0x000c, 0x2fb2: 0x000c, 0x2fb3: 0x000c, 0x2fb5: 0x000c, + 0x2fb6: 0x000c, + // Block 0xbf, offset 0x2fc0 + 0x2ff1: 0x000c, 0x2ff2: 0x000c, 0x2ff3: 0x000c, 0x2ff4: 0x000c, 0x2ff5: 0x000c, + 0x2ff6: 0x000c, 0x2ffa: 0x000c, + 0x2ffc: 0x000c, 0x2ffd: 0x000c, 0x2fff: 0x000c, + // Block 0xc0, offset 0x3000 + 0x3000: 0x000c, 0x3001: 0x000c, 0x3002: 0x000c, 0x3003: 0x000c, 0x3004: 0x000c, 0x3005: 0x000c, + 0x3007: 0x000c, + // Block 0xc1, offset 0x3040 + 0x3050: 0x000c, 0x3051: 0x000c, + 0x3055: 0x000c, 0x3057: 0x000c, + // Block 0xc2, offset 0x3080 + 0x30b3: 0x000c, 0x30b4: 0x000c, + // Block 0xc3, offset 0x30c0 + 0x30d5: 0x000a, 0x30d6: 0x000a, 0x30d7: 0x000a, + 0x30d8: 0x000a, 0x30d9: 0x000a, 0x30da: 0x000a, 0x30db: 0x000a, 0x30dc: 0x000a, 0x30dd: 0x0004, + 0x30de: 0x0004, 0x30df: 0x0004, 0x30e0: 0x0004, 0x30e1: 0x000a, 0x30e2: 0x000a, 0x30e3: 0x000a, + 0x30e4: 0x000a, 0x30e5: 0x000a, 0x30e6: 0x000a, 0x30e7: 0x000a, 0x30e8: 0x000a, 0x30e9: 0x000a, + 0x30ea: 0x000a, 0x30eb: 0x000a, 0x30ec: 0x000a, 0x30ed: 0x000a, 0x30ee: 0x000a, 0x30ef: 0x000a, + 0x30f0: 0x000a, 0x30f1: 0x000a, + // Block 0xc4, offset 0x3100 + 0x3130: 0x000c, 0x3131: 0x000c, 0x3132: 0x000c, 0x3133: 0x000c, 0x3134: 0x000c, + // Block 0xc5, offset 0x3140 + 0x3170: 0x000c, 0x3171: 0x000c, 0x3172: 0x000c, 0x3173: 0x000c, 0x3174: 0x000c, 0x3175: 0x000c, + 0x3176: 0x000c, + // Block 0xc6, offset 0x3180 + 0x318f: 0x000c, + // Block 0xc7, offset 0x31c0 + 0x31cf: 0x000c, 0x31d0: 0x000c, 0x31d1: 0x000c, + 0x31d2: 0x000c, + // Block 0xc8, offset 0x3200 + 0x3222: 0x000a, + // Block 0xc9, offset 0x3240 + 0x325d: 0x000c, + 0x325e: 0x000c, 0x3260: 0x000b, 0x3261: 0x000b, 0x3262: 0x000b, 0x3263: 0x000b, + // Block 0xca, offset 0x3280 + 0x32a7: 0x000c, 0x32a8: 0x000c, 0x32a9: 0x000c, + 0x32b3: 0x000b, 0x32b4: 0x000b, 0x32b5: 0x000b, + 0x32b6: 0x000b, 0x32b7: 0x000b, 0x32b8: 0x000b, 0x32b9: 0x000b, 0x32ba: 0x000b, 0x32bb: 0x000c, + 0x32bc: 0x000c, 0x32bd: 0x000c, 0x32be: 0x000c, 0x32bf: 0x000c, + // Block 0xcb, offset 0x32c0 + 0x32c0: 0x000c, 0x32c1: 0x000c, 0x32c2: 0x000c, 0x32c5: 0x000c, + 0x32c6: 0x000c, 0x32c7: 0x000c, 0x32c8: 0x000c, 0x32c9: 0x000c, 0x32ca: 0x000c, 0x32cb: 0x000c, + 0x32ea: 0x000c, 0x32eb: 0x000c, 0x32ec: 0x000c, 0x32ed: 0x000c, + // Block 0xcc, offset 0x3300 + 0x3300: 0x000a, 0x3301: 0x000a, 0x3302: 0x000c, 0x3303: 0x000c, 0x3304: 0x000c, 0x3305: 0x000a, + // Block 0xcd, offset 0x3340 + 0x3340: 0x000a, 0x3341: 0x000a, 0x3342: 0x000a, 0x3343: 0x000a, 0x3344: 0x000a, 0x3345: 0x000a, + 0x3346: 0x000a, 0x3347: 0x000a, 0x3348: 0x000a, 0x3349: 0x000a, 0x334a: 0x000a, 0x334b: 0x000a, + 0x334c: 0x000a, 0x334d: 0x000a, 0x334e: 0x000a, 0x334f: 0x000a, 0x3350: 0x000a, 0x3351: 0x000a, + 0x3352: 0x000a, 0x3353: 0x000a, 0x3354: 0x000a, 0x3355: 0x000a, 0x3356: 0x000a, + // Block 0xce, offset 0x3380 + 0x339b: 0x000a, + // Block 0xcf, offset 0x33c0 + 0x33d5: 0x000a, + // Block 0xd0, offset 0x3400 + 0x340f: 0x000a, + // Block 0xd1, offset 0x3440 + 0x3449: 0x000a, + // Block 0xd2, offset 0x3480 + 0x3483: 0x000a, + 0x348e: 0x0002, 0x348f: 0x0002, 0x3490: 0x0002, 0x3491: 0x0002, + 0x3492: 0x0002, 0x3493: 0x0002, 0x3494: 0x0002, 0x3495: 0x0002, 0x3496: 0x0002, 0x3497: 0x0002, + 0x3498: 0x0002, 0x3499: 0x0002, 0x349a: 0x0002, 0x349b: 0x0002, 0x349c: 0x0002, 0x349d: 0x0002, + 0x349e: 0x0002, 0x349f: 0x0002, 0x34a0: 0x0002, 0x34a1: 0x0002, 0x34a2: 0x0002, 0x34a3: 0x0002, + 0x34a4: 0x0002, 0x34a5: 0x0002, 0x34a6: 0x0002, 0x34a7: 0x0002, 0x34a8: 0x0002, 0x34a9: 0x0002, + 0x34aa: 0x0002, 0x34ab: 0x0002, 0x34ac: 0x0002, 0x34ad: 0x0002, 0x34ae: 0x0002, 0x34af: 0x0002, + 0x34b0: 0x0002, 0x34b1: 0x0002, 0x34b2: 0x0002, 0x34b3: 0x0002, 0x34b4: 0x0002, 0x34b5: 0x0002, + 0x34b6: 0x0002, 0x34b7: 0x0002, 0x34b8: 0x0002, 0x34b9: 0x0002, 0x34ba: 0x0002, 0x34bb: 0x0002, + 0x34bc: 0x0002, 0x34bd: 0x0002, 0x34be: 0x0002, 0x34bf: 0x0002, + // Block 0xd3, offset 0x34c0 + 0x34c0: 0x000c, 0x34c1: 0x000c, 0x34c2: 0x000c, 0x34c3: 0x000c, 0x34c4: 0x000c, 0x34c5: 0x000c, + 0x34c6: 0x000c, 0x34c7: 0x000c, 0x34c8: 0x000c, 0x34c9: 0x000c, 0x34ca: 0x000c, 0x34cb: 0x000c, + 0x34cc: 0x000c, 0x34cd: 0x000c, 0x34ce: 0x000c, 0x34cf: 0x000c, 0x34d0: 0x000c, 0x34d1: 0x000c, + 0x34d2: 0x000c, 0x34d3: 0x000c, 0x34d4: 0x000c, 0x34d5: 0x000c, 0x34d6: 0x000c, 0x34d7: 0x000c, + 0x34d8: 0x000c, 0x34d9: 0x000c, 0x34da: 0x000c, 0x34db: 0x000c, 0x34dc: 0x000c, 0x34dd: 0x000c, + 0x34de: 0x000c, 0x34df: 0x000c, 0x34e0: 0x000c, 0x34e1: 0x000c, 0x34e2: 0x000c, 0x34e3: 0x000c, + 0x34e4: 0x000c, 0x34e5: 0x000c, 0x34e6: 0x000c, 0x34e7: 0x000c, 0x34e8: 0x000c, 0x34e9: 0x000c, + 0x34ea: 0x000c, 0x34eb: 0x000c, 0x34ec: 0x000c, 0x34ed: 0x000c, 0x34ee: 0x000c, 0x34ef: 0x000c, + 0x34f0: 0x000c, 0x34f1: 0x000c, 0x34f2: 0x000c, 0x34f3: 0x000c, 0x34f4: 0x000c, 0x34f5: 0x000c, + 0x34f6: 0x000c, 0x34fb: 0x000c, + 0x34fc: 0x000c, 0x34fd: 0x000c, 0x34fe: 0x000c, 0x34ff: 0x000c, + // Block 0xd4, offset 0x3500 + 0x3500: 0x000c, 0x3501: 0x000c, 0x3502: 0x000c, 0x3503: 0x000c, 0x3504: 0x000c, 0x3505: 0x000c, + 0x3506: 0x000c, 0x3507: 0x000c, 0x3508: 0x000c, 0x3509: 0x000c, 0x350a: 0x000c, 0x350b: 0x000c, + 0x350c: 0x000c, 0x350d: 0x000c, 0x350e: 0x000c, 0x350f: 0x000c, 0x3510: 0x000c, 0x3511: 0x000c, + 0x3512: 0x000c, 0x3513: 0x000c, 0x3514: 0x000c, 0x3515: 0x000c, 0x3516: 0x000c, 0x3517: 0x000c, + 0x3518: 0x000c, 0x3519: 0x000c, 0x351a: 0x000c, 0x351b: 0x000c, 0x351c: 0x000c, 0x351d: 0x000c, + 0x351e: 0x000c, 0x351f: 0x000c, 0x3520: 0x000c, 0x3521: 0x000c, 0x3522: 0x000c, 0x3523: 0x000c, + 0x3524: 0x000c, 0x3525: 0x000c, 0x3526: 0x000c, 0x3527: 0x000c, 0x3528: 0x000c, 0x3529: 0x000c, + 0x352a: 0x000c, 0x352b: 0x000c, 0x352c: 0x000c, + 0x3535: 0x000c, + // Block 0xd5, offset 0x3540 + 0x3544: 0x000c, + 0x355b: 0x000c, 0x355c: 0x000c, 0x355d: 0x000c, + 0x355e: 0x000c, 0x355f: 0x000c, 0x3561: 0x000c, 0x3562: 0x000c, 0x3563: 0x000c, + 0x3564: 0x000c, 0x3565: 0x000c, 0x3566: 0x000c, 0x3567: 0x000c, 0x3568: 0x000c, 0x3569: 0x000c, + 0x356a: 0x000c, 0x356b: 0x000c, 0x356c: 0x000c, 0x356d: 0x000c, 0x356e: 0x000c, 0x356f: 0x000c, + // Block 0xd6, offset 0x3580 + 0x3580: 0x000c, 0x3581: 0x000c, 0x3582: 0x000c, 0x3583: 0x000c, 0x3584: 0x000c, 0x3585: 0x000c, + 0x3586: 0x000c, 0x3588: 0x000c, 0x3589: 0x000c, 0x358a: 0x000c, 0x358b: 0x000c, + 0x358c: 0x000c, 0x358d: 0x000c, 0x358e: 0x000c, 0x358f: 0x000c, 0x3590: 0x000c, 0x3591: 0x000c, + 0x3592: 0x000c, 0x3593: 0x000c, 0x3594: 0x000c, 0x3595: 0x000c, 0x3596: 0x000c, 0x3597: 0x000c, + 0x3598: 0x000c, 0x359b: 0x000c, 0x359c: 0x000c, 0x359d: 0x000c, + 0x359e: 0x000c, 0x359f: 0x000c, 0x35a0: 0x000c, 0x35a1: 0x000c, 0x35a3: 0x000c, + 0x35a4: 0x000c, 0x35a6: 0x000c, 0x35a7: 0x000c, 0x35a8: 0x000c, 0x35a9: 0x000c, + 0x35aa: 0x000c, + // Block 0xd7, offset 0x35c0 + 0x35ec: 0x000c, 0x35ed: 0x000c, 0x35ee: 0x000c, 0x35ef: 0x000c, + 0x35ff: 0x0004, + // Block 0xd8, offset 0x3600 + 0x3600: 0x0001, 0x3601: 0x0001, 0x3602: 0x0001, 0x3603: 0x0001, 0x3604: 0x0001, 0x3605: 0x0001, + 0x3606: 0x0001, 0x3607: 0x0001, 0x3608: 0x0001, 0x3609: 0x0001, 0x360a: 0x0001, 0x360b: 0x0001, + 0x360c: 0x0001, 0x360d: 0x0001, 0x360e: 0x0001, 0x360f: 0x0001, 0x3610: 0x000c, 0x3611: 0x000c, + 0x3612: 0x000c, 0x3613: 0x000c, 0x3614: 0x000c, 0x3615: 0x000c, 0x3616: 0x000c, 0x3617: 0x0001, + 0x3618: 0x0001, 0x3619: 0x0001, 0x361a: 0x0001, 0x361b: 0x0001, 0x361c: 0x0001, 0x361d: 0x0001, + 0x361e: 0x0001, 0x361f: 0x0001, 0x3620: 0x0001, 0x3621: 0x0001, 0x3622: 0x0001, 0x3623: 0x0001, + 0x3624: 0x0001, 0x3625: 0x0001, 0x3626: 0x0001, 0x3627: 0x0001, 0x3628: 0x0001, 0x3629: 0x0001, + 0x362a: 0x0001, 0x362b: 0x0001, 0x362c: 0x0001, 0x362d: 0x0001, 0x362e: 0x0001, 0x362f: 0x0001, + 0x3630: 0x0001, 0x3631: 0x0001, 0x3632: 0x0001, 0x3633: 0x0001, 0x3634: 0x0001, 0x3635: 0x0001, + 0x3636: 0x0001, 0x3637: 0x0001, 0x3638: 0x0001, 0x3639: 0x0001, 0x363a: 0x0001, 0x363b: 0x0001, + 0x363c: 0x0001, 0x363d: 0x0001, 0x363e: 0x0001, 0x363f: 0x0001, + // Block 0xd9, offset 0x3640 + 0x3640: 0x0001, 0x3641: 0x0001, 0x3642: 0x0001, 0x3643: 0x0001, 0x3644: 0x000c, 0x3645: 0x000c, + 0x3646: 0x000c, 0x3647: 0x000c, 0x3648: 0x000c, 0x3649: 0x000c, 0x364a: 0x000c, 0x364b: 0x0001, + 0x364c: 0x0001, 0x364d: 0x0001, 0x364e: 0x0001, 0x364f: 0x0001, 0x3650: 0x0001, 0x3651: 0x0001, + 0x3652: 0x0001, 0x3653: 0x0001, 0x3654: 0x0001, 0x3655: 0x0001, 0x3656: 0x0001, 0x3657: 0x0001, + 0x3658: 0x0001, 0x3659: 0x0001, 0x365a: 0x0001, 0x365b: 0x0001, 0x365c: 0x0001, 0x365d: 0x0001, + 0x365e: 0x0001, 0x365f: 0x0001, 0x3660: 0x0001, 0x3661: 0x0001, 0x3662: 0x0001, 0x3663: 0x0001, + 0x3664: 0x0001, 0x3665: 0x0001, 0x3666: 0x0001, 0x3667: 0x0001, 0x3668: 0x0001, 0x3669: 0x0001, + 0x366a: 0x0001, 0x366b: 0x0001, 0x366c: 0x0001, 0x366d: 0x0001, 0x366e: 0x0001, 0x366f: 0x0001, + 0x3670: 0x0001, 0x3671: 0x0001, 0x3672: 0x0001, 0x3673: 0x0001, 0x3674: 0x0001, 0x3675: 0x0001, + 0x3676: 0x0001, 0x3677: 0x0001, 0x3678: 0x0001, 0x3679: 0x0001, 0x367a: 0x0001, 0x367b: 0x0001, + 0x367c: 0x0001, 0x367d: 0x0001, 0x367e: 0x0001, 0x367f: 0x0001, + // Block 0xda, offset 0x3680 + 0x3680: 0x000d, 0x3681: 0x000d, 0x3682: 0x000d, 0x3683: 0x000d, 0x3684: 0x000d, 0x3685: 0x000d, + 0x3686: 0x000d, 0x3687: 0x000d, 0x3688: 0x000d, 0x3689: 0x000d, 0x368a: 0x000d, 0x368b: 0x000d, + 0x368c: 0x000d, 0x368d: 0x000d, 0x368e: 0x000d, 0x368f: 0x000d, 0x3690: 0x0001, 0x3691: 0x0001, + 0x3692: 0x0001, 0x3693: 0x0001, 0x3694: 0x0001, 0x3695: 0x0001, 0x3696: 0x0001, 0x3697: 0x0001, + 0x3698: 0x0001, 0x3699: 0x0001, 0x369a: 0x0001, 0x369b: 0x0001, 0x369c: 0x0001, 0x369d: 0x0001, + 0x369e: 0x0001, 0x369f: 0x0001, 0x36a0: 0x0001, 0x36a1: 0x0001, 0x36a2: 0x0001, 0x36a3: 0x0001, + 0x36a4: 0x0001, 0x36a5: 0x0001, 0x36a6: 0x0001, 0x36a7: 0x0001, 0x36a8: 0x0001, 0x36a9: 0x0001, + 0x36aa: 0x0001, 0x36ab: 0x0001, 0x36ac: 0x0001, 0x36ad: 0x0001, 0x36ae: 0x0001, 0x36af: 0x0001, + 0x36b0: 0x0001, 0x36b1: 0x0001, 0x36b2: 0x0001, 0x36b3: 0x0001, 0x36b4: 0x0001, 0x36b5: 0x0001, + 0x36b6: 0x0001, 0x36b7: 0x0001, 0x36b8: 0x0001, 0x36b9: 0x0001, 0x36ba: 0x0001, 0x36bb: 0x0001, + 0x36bc: 0x0001, 0x36bd: 0x0001, 0x36be: 0x0001, 0x36bf: 0x0001, + // Block 0xdb, offset 0x36c0 + 0x36c0: 0x000d, 0x36c1: 0x000d, 0x36c2: 0x000d, 0x36c3: 0x000d, 0x36c4: 0x000d, 0x36c5: 0x000d, + 0x36c6: 0x000d, 0x36c7: 0x000d, 0x36c8: 0x000d, 0x36c9: 0x000d, 0x36ca: 0x000d, 0x36cb: 0x000d, + 0x36cc: 0x000d, 0x36cd: 0x000d, 0x36ce: 0x000d, 0x36cf: 0x000d, 0x36d0: 0x000d, 0x36d1: 0x000d, + 0x36d2: 0x000d, 0x36d3: 0x000d, 0x36d4: 0x000d, 0x36d5: 0x000d, 0x36d6: 0x000d, 0x36d7: 0x000d, + 0x36d8: 0x000d, 0x36d9: 0x000d, 0x36da: 0x000d, 0x36db: 0x000d, 0x36dc: 0x000d, 0x36dd: 0x000d, + 0x36de: 0x000d, 0x36df: 0x000d, 0x36e0: 0x000d, 0x36e1: 0x000d, 0x36e2: 0x000d, 0x36e3: 0x000d, + 0x36e4: 0x000d, 0x36e5: 0x000d, 0x36e6: 0x000d, 0x36e7: 0x000d, 0x36e8: 0x000d, 0x36e9: 0x000d, + 0x36ea: 0x000d, 0x36eb: 0x000d, 0x36ec: 0x000d, 0x36ed: 0x000d, 0x36ee: 0x000d, 0x36ef: 0x000d, + 0x36f0: 0x000a, 0x36f1: 0x000a, 0x36f2: 0x000d, 0x36f3: 0x000d, 0x36f4: 0x000d, 0x36f5: 0x000d, + 0x36f6: 0x000d, 0x36f7: 0x000d, 0x36f8: 0x000d, 0x36f9: 0x000d, 0x36fa: 0x000d, 0x36fb: 0x000d, + 0x36fc: 0x000d, 0x36fd: 0x000d, 0x36fe: 0x000d, 0x36ff: 0x000d, + // Block 0xdc, offset 0x3700 + 0x3700: 0x000a, 0x3701: 0x000a, 0x3702: 0x000a, 0x3703: 0x000a, 0x3704: 0x000a, 0x3705: 0x000a, + 0x3706: 0x000a, 0x3707: 0x000a, 0x3708: 0x000a, 0x3709: 0x000a, 0x370a: 0x000a, 0x370b: 0x000a, + 0x370c: 0x000a, 0x370d: 0x000a, 0x370e: 0x000a, 0x370f: 0x000a, 0x3710: 0x000a, 0x3711: 0x000a, + 0x3712: 0x000a, 0x3713: 0x000a, 0x3714: 0x000a, 0x3715: 0x000a, 0x3716: 0x000a, 0x3717: 0x000a, + 0x3718: 0x000a, 0x3719: 0x000a, 0x371a: 0x000a, 0x371b: 0x000a, 0x371c: 0x000a, 0x371d: 0x000a, + 0x371e: 0x000a, 0x371f: 0x000a, 0x3720: 0x000a, 0x3721: 0x000a, 0x3722: 0x000a, 0x3723: 0x000a, + 0x3724: 0x000a, 0x3725: 0x000a, 0x3726: 0x000a, 0x3727: 0x000a, 0x3728: 0x000a, 0x3729: 0x000a, + 0x372a: 0x000a, 0x372b: 0x000a, + 0x3730: 0x000a, 0x3731: 0x000a, 0x3732: 0x000a, 0x3733: 0x000a, 0x3734: 0x000a, 0x3735: 0x000a, + 0x3736: 0x000a, 0x3737: 0x000a, 0x3738: 0x000a, 0x3739: 0x000a, 0x373a: 0x000a, 0x373b: 0x000a, + 0x373c: 0x000a, 0x373d: 0x000a, 0x373e: 0x000a, 0x373f: 0x000a, + // Block 0xdd, offset 0x3740 + 0x3740: 0x000a, 0x3741: 0x000a, 0x3742: 0x000a, 0x3743: 0x000a, 0x3744: 0x000a, 0x3745: 0x000a, + 0x3746: 0x000a, 0x3747: 0x000a, 0x3748: 0x000a, 0x3749: 0x000a, 0x374a: 0x000a, 0x374b: 0x000a, + 0x374c: 0x000a, 0x374d: 0x000a, 0x374e: 0x000a, 0x374f: 0x000a, 0x3750: 0x000a, 0x3751: 0x000a, + 0x3752: 0x000a, 0x3753: 0x000a, + 0x3760: 0x000a, 0x3761: 0x000a, 0x3762: 0x000a, 0x3763: 0x000a, + 0x3764: 0x000a, 0x3765: 0x000a, 0x3766: 0x000a, 0x3767: 0x000a, 0x3768: 0x000a, 0x3769: 0x000a, + 0x376a: 0x000a, 0x376b: 0x000a, 0x376c: 0x000a, 0x376d: 0x000a, 0x376e: 0x000a, + 0x3771: 0x000a, 0x3772: 0x000a, 0x3773: 0x000a, 0x3774: 0x000a, 0x3775: 0x000a, + 0x3776: 0x000a, 0x3777: 0x000a, 0x3778: 0x000a, 0x3779: 0x000a, 0x377a: 0x000a, 0x377b: 0x000a, + 0x377c: 0x000a, 0x377d: 0x000a, 0x377e: 0x000a, 0x377f: 0x000a, + // Block 0xde, offset 0x3780 + 0x3781: 0x000a, 0x3782: 0x000a, 0x3783: 0x000a, 0x3784: 0x000a, 0x3785: 0x000a, + 0x3786: 0x000a, 0x3787: 0x000a, 0x3788: 0x000a, 0x3789: 0x000a, 0x378a: 0x000a, 0x378b: 0x000a, + 0x378c: 0x000a, 0x378d: 0x000a, 0x378e: 0x000a, 0x378f: 0x000a, 0x3791: 0x000a, + 0x3792: 0x000a, 0x3793: 0x000a, 0x3794: 0x000a, 0x3795: 0x000a, 0x3796: 0x000a, 0x3797: 0x000a, + 0x3798: 0x000a, 0x3799: 0x000a, 0x379a: 0x000a, 0x379b: 0x000a, 0x379c: 0x000a, 0x379d: 0x000a, + 0x379e: 0x000a, 0x379f: 0x000a, 0x37a0: 0x000a, 0x37a1: 0x000a, 0x37a2: 0x000a, 0x37a3: 0x000a, + 0x37a4: 0x000a, 0x37a5: 0x000a, 0x37a6: 0x000a, 0x37a7: 0x000a, 0x37a8: 0x000a, 0x37a9: 0x000a, + 0x37aa: 0x000a, 0x37ab: 0x000a, 0x37ac: 0x000a, 0x37ad: 0x000a, 0x37ae: 0x000a, 0x37af: 0x000a, + 0x37b0: 0x000a, 0x37b1: 0x000a, 0x37b2: 0x000a, 0x37b3: 0x000a, 0x37b4: 0x000a, 0x37b5: 0x000a, + // Block 0xdf, offset 0x37c0 + 0x37c0: 0x0002, 0x37c1: 0x0002, 0x37c2: 0x0002, 0x37c3: 0x0002, 0x37c4: 0x0002, 0x37c5: 0x0002, + 0x37c6: 0x0002, 0x37c7: 0x0002, 0x37c8: 0x0002, 0x37c9: 0x0002, 0x37ca: 0x0002, 0x37cb: 0x000a, + 0x37cc: 0x000a, + 0x37ef: 0x000a, + // Block 0xe0, offset 0x3800 + 0x382a: 0x000a, 0x382b: 0x000a, 0x382c: 0x000a, + // Block 0xe1, offset 0x3840 + 0x3860: 0x000a, 0x3861: 0x000a, 0x3862: 0x000a, 0x3863: 0x000a, + 0x3864: 0x000a, 0x3865: 0x000a, + // Block 0xe2, offset 0x3880 + 0x3880: 0x000a, 0x3881: 0x000a, 0x3882: 0x000a, 0x3883: 0x000a, 0x3884: 0x000a, 0x3885: 0x000a, + 0x3886: 0x000a, 0x3887: 0x000a, 0x3888: 0x000a, 0x3889: 0x000a, 0x388a: 0x000a, 0x388b: 0x000a, + 0x388c: 0x000a, 0x388d: 0x000a, 0x388e: 0x000a, 0x388f: 0x000a, 0x3890: 0x000a, 0x3891: 0x000a, + 0x3892: 0x000a, 0x3893: 0x000a, 0x3894: 0x000a, 0x3895: 0x000a, + 0x38a0: 0x000a, 0x38a1: 0x000a, 0x38a2: 0x000a, 0x38a3: 0x000a, + 0x38a4: 0x000a, 0x38a5: 0x000a, 0x38a6: 0x000a, 0x38a7: 0x000a, 0x38a8: 0x000a, 0x38a9: 0x000a, + 0x38aa: 0x000a, 0x38ab: 0x000a, 0x38ac: 0x000a, + 0x38b0: 0x000a, 0x38b1: 0x000a, 0x38b2: 0x000a, 0x38b3: 0x000a, 0x38b4: 0x000a, 0x38b5: 0x000a, + 0x38b6: 0x000a, 0x38b7: 0x000a, 0x38b8: 0x000a, 0x38b9: 0x000a, 0x38ba: 0x000a, + // Block 0xe3, offset 0x38c0 + 0x38c0: 0x000a, 0x38c1: 0x000a, 0x38c2: 0x000a, 0x38c3: 0x000a, 0x38c4: 0x000a, 0x38c5: 0x000a, + 0x38c6: 0x000a, 0x38c7: 0x000a, 0x38c8: 0x000a, 0x38c9: 0x000a, 0x38ca: 0x000a, 0x38cb: 0x000a, + 0x38cc: 0x000a, 0x38cd: 0x000a, 0x38ce: 0x000a, 0x38cf: 0x000a, 0x38d0: 0x000a, 0x38d1: 0x000a, + 0x38d2: 0x000a, 0x38d3: 0x000a, 0x38d4: 0x000a, 0x38d5: 0x000a, 0x38d6: 0x000a, 0x38d7: 0x000a, + 0x38d8: 0x000a, + 0x38e0: 0x000a, 0x38e1: 0x000a, 0x38e2: 0x000a, 0x38e3: 0x000a, + 0x38e4: 0x000a, 0x38e5: 0x000a, 0x38e6: 0x000a, 0x38e7: 0x000a, 0x38e8: 0x000a, 0x38e9: 0x000a, + 0x38ea: 0x000a, 0x38eb: 0x000a, + // Block 0xe4, offset 0x3900 + 0x3900: 0x000a, 0x3901: 0x000a, 0x3902: 0x000a, 0x3903: 0x000a, 0x3904: 0x000a, 0x3905: 0x000a, + 0x3906: 0x000a, 0x3907: 0x000a, 0x3908: 0x000a, 0x3909: 0x000a, 0x390a: 0x000a, 0x390b: 0x000a, + 0x3910: 0x000a, 0x3911: 0x000a, + 0x3912: 0x000a, 0x3913: 0x000a, 0x3914: 0x000a, 0x3915: 0x000a, 0x3916: 0x000a, 0x3917: 0x000a, + 0x3918: 0x000a, 0x3919: 0x000a, 0x391a: 0x000a, 0x391b: 0x000a, 0x391c: 0x000a, 0x391d: 0x000a, + 0x391e: 0x000a, 0x391f: 0x000a, 0x3920: 0x000a, 0x3921: 0x000a, 0x3922: 0x000a, 0x3923: 0x000a, + 0x3924: 0x000a, 0x3925: 0x000a, 0x3926: 0x000a, 0x3927: 0x000a, 0x3928: 0x000a, 0x3929: 0x000a, + 0x392a: 0x000a, 0x392b: 0x000a, 0x392c: 0x000a, 0x392d: 0x000a, 0x392e: 0x000a, 0x392f: 0x000a, + 0x3930: 0x000a, 0x3931: 0x000a, 0x3932: 0x000a, 0x3933: 0x000a, 0x3934: 0x000a, 0x3935: 0x000a, + 0x3936: 0x000a, 0x3937: 0x000a, 0x3938: 0x000a, 0x3939: 0x000a, 0x393a: 0x000a, 0x393b: 0x000a, + 0x393c: 0x000a, 0x393d: 0x000a, 0x393e: 0x000a, 0x393f: 0x000a, + // Block 0xe5, offset 0x3940 + 0x3940: 0x000a, 0x3941: 0x000a, 0x3942: 0x000a, 0x3943: 0x000a, 0x3944: 0x000a, 0x3945: 0x000a, + 0x3946: 0x000a, 0x3947: 0x000a, + 0x3950: 0x000a, 0x3951: 0x000a, + 0x3952: 0x000a, 0x3953: 0x000a, 0x3954: 0x000a, 0x3955: 0x000a, 0x3956: 0x000a, 0x3957: 0x000a, + 0x3958: 0x000a, 0x3959: 0x000a, + 0x3960: 0x000a, 0x3961: 0x000a, 0x3962: 0x000a, 0x3963: 0x000a, + 0x3964: 0x000a, 0x3965: 0x000a, 0x3966: 0x000a, 0x3967: 0x000a, 0x3968: 0x000a, 0x3969: 0x000a, + 0x396a: 0x000a, 0x396b: 0x000a, 0x396c: 0x000a, 0x396d: 0x000a, 0x396e: 0x000a, 0x396f: 0x000a, + 0x3970: 0x000a, 0x3971: 0x000a, 0x3972: 0x000a, 0x3973: 0x000a, 0x3974: 0x000a, 0x3975: 0x000a, + 0x3976: 0x000a, 0x3977: 0x000a, 0x3978: 0x000a, 0x3979: 0x000a, 0x397a: 0x000a, 0x397b: 0x000a, + 0x397c: 0x000a, 0x397d: 0x000a, 0x397e: 0x000a, 0x397f: 0x000a, + // Block 0xe6, offset 0x3980 + 0x3980: 0x000a, 0x3981: 0x000a, 0x3982: 0x000a, 0x3983: 0x000a, 0x3984: 0x000a, 0x3985: 0x000a, + 0x3986: 0x000a, 0x3987: 0x000a, + 0x3990: 0x000a, 0x3991: 0x000a, + 0x3992: 0x000a, 0x3993: 0x000a, 0x3994: 0x000a, 0x3995: 0x000a, 0x3996: 0x000a, 0x3997: 0x000a, + 0x3998: 0x000a, 0x3999: 0x000a, 0x399a: 0x000a, 0x399b: 0x000a, 0x399c: 0x000a, 0x399d: 0x000a, + 0x399e: 0x000a, 0x399f: 0x000a, 0x39a0: 0x000a, 0x39a1: 0x000a, 0x39a2: 0x000a, 0x39a3: 0x000a, + 0x39a4: 0x000a, 0x39a5: 0x000a, 0x39a6: 0x000a, 0x39a7: 0x000a, 0x39a8: 0x000a, 0x39a9: 0x000a, + 0x39aa: 0x000a, 0x39ab: 0x000a, 0x39ac: 0x000a, 0x39ad: 0x000a, + // Block 0xe7, offset 0x39c0 + 0x39c0: 0x000a, 0x39c1: 0x000a, 0x39c2: 0x000a, 0x39c3: 0x000a, 0x39c4: 0x000a, 0x39c5: 0x000a, + 0x39c6: 0x000a, 0x39c7: 0x000a, 0x39c8: 0x000a, 0x39c9: 0x000a, 0x39ca: 0x000a, 0x39cb: 0x000a, + 0x39cd: 0x000a, 0x39ce: 0x000a, 0x39cf: 0x000a, 0x39d0: 0x000a, 0x39d1: 0x000a, + 0x39d2: 0x000a, 0x39d3: 0x000a, 0x39d4: 0x000a, 0x39d5: 0x000a, 0x39d6: 0x000a, 0x39d7: 0x000a, + 0x39d8: 0x000a, 0x39d9: 0x000a, 0x39da: 0x000a, 0x39db: 0x000a, 0x39dc: 0x000a, 0x39dd: 0x000a, + 0x39de: 0x000a, 0x39df: 0x000a, 0x39e0: 0x000a, 0x39e1: 0x000a, 0x39e2: 0x000a, 0x39e3: 0x000a, + 0x39e4: 0x000a, 0x39e5: 0x000a, 0x39e6: 0x000a, 0x39e7: 0x000a, 0x39e8: 0x000a, 0x39e9: 0x000a, + 0x39ea: 0x000a, 0x39eb: 0x000a, 0x39ec: 0x000a, 0x39ed: 0x000a, 0x39ee: 0x000a, 0x39ef: 0x000a, + 0x39f0: 0x000a, 0x39f1: 0x000a, 0x39f2: 0x000a, 0x39f3: 0x000a, 0x39f4: 0x000a, 0x39f5: 0x000a, + 0x39f6: 0x000a, 0x39f7: 0x000a, 0x39f8: 0x000a, 0x39f9: 0x000a, 0x39fa: 0x000a, 0x39fb: 0x000a, + 0x39fc: 0x000a, 0x39fd: 0x000a, 0x39fe: 0x000a, 0x39ff: 0x000a, + // Block 0xe8, offset 0x3a00 + 0x3a00: 0x000a, 0x3a01: 0x000a, 0x3a02: 0x000a, 0x3a03: 0x000a, 0x3a04: 0x000a, 0x3a05: 0x000a, + 0x3a06: 0x000a, 0x3a07: 0x000a, 0x3a08: 0x000a, 0x3a09: 0x000a, 0x3a0a: 0x000a, 0x3a0b: 0x000a, + 0x3a0c: 0x000a, 0x3a0d: 0x000a, 0x3a0e: 0x000a, 0x3a0f: 0x000a, 0x3a10: 0x000a, 0x3a11: 0x000a, + 0x3a12: 0x000a, 0x3a13: 0x000a, 0x3a14: 0x000a, 0x3a15: 0x000a, 0x3a16: 0x000a, 0x3a17: 0x000a, + 0x3a18: 0x000a, 0x3a19: 0x000a, 0x3a1a: 0x000a, 0x3a1b: 0x000a, 0x3a1c: 0x000a, 0x3a1d: 0x000a, + 0x3a1e: 0x000a, 0x3a1f: 0x000a, 0x3a20: 0x000a, 0x3a21: 0x000a, 0x3a22: 0x000a, 0x3a23: 0x000a, + 0x3a24: 0x000a, 0x3a25: 0x000a, 0x3a26: 0x000a, 0x3a27: 0x000a, 0x3a28: 0x000a, 0x3a29: 0x000a, + 0x3a2a: 0x000a, 0x3a2b: 0x000a, 0x3a2c: 0x000a, 0x3a2d: 0x000a, 0x3a2e: 0x000a, 0x3a2f: 0x000a, + 0x3a30: 0x000a, 0x3a31: 0x000a, 0x3a33: 0x000a, 0x3a34: 0x000a, 0x3a35: 0x000a, + 0x3a36: 0x000a, 0x3a3a: 0x000a, 0x3a3b: 0x000a, + 0x3a3c: 0x000a, 0x3a3d: 0x000a, 0x3a3e: 0x000a, 0x3a3f: 0x000a, + // Block 0xe9, offset 0x3a40 + 0x3a40: 0x000a, 0x3a41: 0x000a, 0x3a42: 0x000a, 0x3a43: 0x000a, 0x3a44: 0x000a, 0x3a45: 0x000a, + 0x3a46: 0x000a, 0x3a47: 0x000a, 0x3a48: 0x000a, 0x3a49: 0x000a, 0x3a4a: 0x000a, 0x3a4b: 0x000a, + 0x3a4c: 0x000a, 0x3a4d: 0x000a, 0x3a4e: 0x000a, 0x3a4f: 0x000a, 0x3a50: 0x000a, 0x3a51: 0x000a, + 0x3a52: 0x000a, 0x3a53: 0x000a, 0x3a54: 0x000a, 0x3a55: 0x000a, 0x3a56: 0x000a, 0x3a57: 0x000a, + 0x3a58: 0x000a, 0x3a59: 0x000a, 0x3a5a: 0x000a, 0x3a5b: 0x000a, 0x3a5c: 0x000a, 0x3a5d: 0x000a, + 0x3a5e: 0x000a, 0x3a5f: 0x000a, 0x3a60: 0x000a, 0x3a61: 0x000a, 0x3a62: 0x000a, + 0x3a65: 0x000a, 0x3a66: 0x000a, 0x3a67: 0x000a, 0x3a68: 0x000a, 0x3a69: 0x000a, + 0x3a6a: 0x000a, 0x3a6e: 0x000a, 0x3a6f: 0x000a, + 0x3a70: 0x000a, 0x3a71: 0x000a, 0x3a72: 0x000a, 0x3a73: 0x000a, 0x3a74: 0x000a, 0x3a75: 0x000a, + 0x3a76: 0x000a, 0x3a77: 0x000a, 0x3a78: 0x000a, 0x3a79: 0x000a, 0x3a7a: 0x000a, 0x3a7b: 0x000a, + 0x3a7c: 0x000a, 0x3a7d: 0x000a, 0x3a7e: 0x000a, 0x3a7f: 0x000a, + // Block 0xea, offset 0x3a80 + 0x3a80: 0x000a, 0x3a81: 0x000a, 0x3a82: 0x000a, 0x3a83: 0x000a, 0x3a84: 0x000a, 0x3a85: 0x000a, + 0x3a86: 0x000a, 0x3a87: 0x000a, 0x3a88: 0x000a, 0x3a89: 0x000a, 0x3a8a: 0x000a, + 0x3a8d: 0x000a, 0x3a8e: 0x000a, 0x3a8f: 0x000a, 0x3a90: 0x000a, 0x3a91: 0x000a, + 0x3a92: 0x000a, 0x3a93: 0x000a, 0x3a94: 0x000a, 0x3a95: 0x000a, 0x3a96: 0x000a, 0x3a97: 0x000a, + 0x3a98: 0x000a, 0x3a99: 0x000a, 0x3a9a: 0x000a, 0x3a9b: 0x000a, 0x3a9c: 0x000a, 0x3a9d: 0x000a, + 0x3a9e: 0x000a, 0x3a9f: 0x000a, 0x3aa0: 0x000a, 0x3aa1: 0x000a, 0x3aa2: 0x000a, 0x3aa3: 0x000a, + 0x3aa4: 0x000a, 0x3aa5: 0x000a, 0x3aa6: 0x000a, 0x3aa7: 0x000a, 0x3aa8: 0x000a, 0x3aa9: 0x000a, + 0x3aaa: 0x000a, 0x3aab: 0x000a, 0x3aac: 0x000a, 0x3aad: 0x000a, 0x3aae: 0x000a, 0x3aaf: 0x000a, + 0x3ab0: 0x000a, 0x3ab1: 0x000a, 0x3ab2: 0x000a, 0x3ab3: 0x000a, 0x3ab4: 0x000a, 0x3ab5: 0x000a, + 0x3ab6: 0x000a, 0x3ab7: 0x000a, 0x3ab8: 0x000a, 0x3ab9: 0x000a, 0x3aba: 0x000a, 0x3abb: 0x000a, + 0x3abc: 0x000a, 0x3abd: 0x000a, 0x3abe: 0x000a, 0x3abf: 0x000a, + // Block 0xeb, offset 0x3ac0 + 0x3ac0: 0x000a, 0x3ac1: 0x000a, 0x3ac2: 0x000a, 0x3ac3: 0x000a, 0x3ac4: 0x000a, 0x3ac5: 0x000a, + 0x3ac6: 0x000a, 0x3ac7: 0x000a, 0x3ac8: 0x000a, 0x3ac9: 0x000a, 0x3aca: 0x000a, 0x3acb: 0x000a, + 0x3acc: 0x000a, 0x3acd: 0x000a, 0x3ace: 0x000a, 0x3acf: 0x000a, 0x3ad0: 0x000a, 0x3ad1: 0x000a, + 0x3ad2: 0x000a, 0x3ad3: 0x000a, + 0x3ae0: 0x000a, 0x3ae1: 0x000a, 0x3ae2: 0x000a, 0x3ae3: 0x000a, + 0x3ae4: 0x000a, 0x3ae5: 0x000a, 0x3ae6: 0x000a, 0x3ae7: 0x000a, 0x3ae8: 0x000a, 0x3ae9: 0x000a, + 0x3aea: 0x000a, 0x3aeb: 0x000a, 0x3aec: 0x000a, 0x3aed: 0x000a, + 0x3af0: 0x000a, 0x3af1: 0x000a, 0x3af2: 0x000a, 0x3af3: 0x000a, + 0x3af8: 0x000a, 0x3af9: 0x000a, 0x3afa: 0x000a, + // Block 0xec, offset 0x3b00 + 0x3b00: 0x000a, 0x3b01: 0x000a, 0x3b02: 0x000a, + 0x3b10: 0x000a, 0x3b11: 0x000a, + 0x3b12: 0x000a, 0x3b13: 0x000a, 0x3b14: 0x000a, 0x3b15: 0x000a, + // Block 0xed, offset 0x3b40 + 0x3b7e: 0x000b, 0x3b7f: 0x000b, + // Block 0xee, offset 0x3b80 + 0x3b80: 0x000b, 0x3b81: 0x000b, 0x3b82: 0x000b, 0x3b83: 0x000b, 0x3b84: 0x000b, 0x3b85: 0x000b, + 0x3b86: 0x000b, 0x3b87: 0x000b, 0x3b88: 0x000b, 0x3b89: 0x000b, 0x3b8a: 0x000b, 0x3b8b: 0x000b, + 0x3b8c: 0x000b, 0x3b8d: 0x000b, 0x3b8e: 0x000b, 0x3b8f: 0x000b, 0x3b90: 0x000b, 0x3b91: 0x000b, + 0x3b92: 0x000b, 0x3b93: 0x000b, 0x3b94: 0x000b, 0x3b95: 0x000b, 0x3b96: 0x000b, 0x3b97: 0x000b, + 0x3b98: 0x000b, 0x3b99: 0x000b, 0x3b9a: 0x000b, 0x3b9b: 0x000b, 0x3b9c: 0x000b, 0x3b9d: 0x000b, + 0x3b9e: 0x000b, 0x3b9f: 0x000b, 0x3ba0: 0x000b, 0x3ba1: 0x000b, 0x3ba2: 0x000b, 0x3ba3: 0x000b, + 0x3ba4: 0x000b, 0x3ba5: 0x000b, 0x3ba6: 0x000b, 0x3ba7: 0x000b, 0x3ba8: 0x000b, 0x3ba9: 0x000b, + 0x3baa: 0x000b, 0x3bab: 0x000b, 0x3bac: 0x000b, 0x3bad: 0x000b, 0x3bae: 0x000b, 0x3baf: 0x000b, + 0x3bb0: 0x000b, 0x3bb1: 0x000b, 0x3bb2: 0x000b, 0x3bb3: 0x000b, 0x3bb4: 0x000b, 0x3bb5: 0x000b, + 0x3bb6: 0x000b, 0x3bb7: 0x000b, 0x3bb8: 0x000b, 0x3bb9: 0x000b, 0x3bba: 0x000b, 0x3bbb: 0x000b, + 0x3bbc: 0x000b, 0x3bbd: 0x000b, 0x3bbe: 0x000b, 0x3bbf: 0x000b, + // Block 0xef, offset 0x3bc0 + 0x3bc0: 0x000c, 0x3bc1: 0x000c, 0x3bc2: 0x000c, 0x3bc3: 0x000c, 0x3bc4: 0x000c, 0x3bc5: 0x000c, + 0x3bc6: 0x000c, 0x3bc7: 0x000c, 0x3bc8: 0x000c, 0x3bc9: 0x000c, 0x3bca: 0x000c, 0x3bcb: 0x000c, + 0x3bcc: 0x000c, 0x3bcd: 0x000c, 0x3bce: 0x000c, 0x3bcf: 0x000c, 0x3bd0: 0x000c, 0x3bd1: 0x000c, + 0x3bd2: 0x000c, 0x3bd3: 0x000c, 0x3bd4: 0x000c, 0x3bd5: 0x000c, 0x3bd6: 0x000c, 0x3bd7: 0x000c, + 0x3bd8: 0x000c, 0x3bd9: 0x000c, 0x3bda: 0x000c, 0x3bdb: 0x000c, 0x3bdc: 0x000c, 0x3bdd: 0x000c, + 0x3bde: 0x000c, 0x3bdf: 0x000c, 0x3be0: 0x000c, 0x3be1: 0x000c, 0x3be2: 0x000c, 0x3be3: 0x000c, + 0x3be4: 0x000c, 0x3be5: 0x000c, 0x3be6: 0x000c, 0x3be7: 0x000c, 0x3be8: 0x000c, 0x3be9: 0x000c, + 0x3bea: 0x000c, 0x3beb: 0x000c, 0x3bec: 0x000c, 0x3bed: 0x000c, 0x3bee: 0x000c, 0x3bef: 0x000c, + 0x3bf0: 0x000b, 0x3bf1: 0x000b, 0x3bf2: 0x000b, 0x3bf3: 0x000b, 0x3bf4: 0x000b, 0x3bf5: 0x000b, + 0x3bf6: 0x000b, 0x3bf7: 0x000b, 0x3bf8: 0x000b, 0x3bf9: 0x000b, 0x3bfa: 0x000b, 0x3bfb: 0x000b, + 0x3bfc: 0x000b, 0x3bfd: 0x000b, 0x3bfe: 0x000b, 0x3bff: 0x000b, +} + +// bidiIndex: 24 blocks, 1536 entries, 1536 bytes +// Block 0 is the zero block. +var bidiIndex = [1536]uint8{ + // Block 0x0, offset 0x0 + // Block 0x1, offset 0x40 + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xc2: 0x01, 0xc3: 0x02, + 0xca: 0x03, 0xcb: 0x04, 0xcc: 0x05, 0xcd: 0x06, 0xce: 0x07, 0xcf: 0x08, + 0xd2: 0x09, 0xd6: 0x0a, 0xd7: 0x0b, + 0xd8: 0x0c, 0xd9: 0x0d, 0xda: 0x0e, 0xdb: 0x0f, 0xdc: 0x10, 0xdd: 0x11, 0xde: 0x12, 0xdf: 0x13, + 0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, + 0xea: 0x07, 0xef: 0x08, + 0xf0: 0x11, 0xf1: 0x12, 0xf2: 0x12, 0xf3: 0x14, 0xf4: 0x15, + // Block 0x4, offset 0x100 + 0x120: 0x14, 0x121: 0x15, 0x122: 0x16, 0x123: 0x17, 0x124: 0x18, 0x125: 0x19, 0x126: 0x1a, 0x127: 0x1b, + 0x128: 0x1c, 0x129: 0x1d, 0x12a: 0x1c, 0x12b: 0x1e, 0x12c: 0x1f, 0x12d: 0x20, 0x12e: 0x21, 0x12f: 0x22, + 0x130: 0x23, 0x131: 0x24, 0x132: 0x1a, 0x133: 0x25, 0x134: 0x26, 0x135: 0x27, 0x137: 0x28, + 0x138: 0x29, 0x139: 0x2a, 0x13a: 0x2b, 0x13b: 0x2c, 0x13c: 0x2d, 0x13d: 0x2e, 0x13e: 0x2f, 0x13f: 0x30, + // Block 0x5, offset 0x140 + 0x140: 0x31, 0x141: 0x32, 0x142: 0x33, + 0x14d: 0x34, 0x14e: 0x35, + 0x150: 0x36, + 0x15a: 0x37, 0x15c: 0x38, 0x15d: 0x39, 0x15e: 0x3a, 0x15f: 0x3b, + 0x160: 0x3c, 0x162: 0x3d, 0x164: 0x3e, 0x165: 0x3f, 0x167: 0x40, + 0x168: 0x41, 0x169: 0x42, 0x16a: 0x43, 0x16c: 0x44, 0x16d: 0x45, 0x16e: 0x46, 0x16f: 0x47, + 0x170: 0x48, 0x173: 0x49, 0x177: 0x4a, + 0x17e: 0x4b, 0x17f: 0x4c, + // Block 0x6, offset 0x180 + 0x180: 0x4d, 0x181: 0x4e, 0x182: 0x4f, 0x183: 0x50, 0x184: 0x51, 0x185: 0x52, 0x186: 0x53, 0x187: 0x54, + 0x188: 0x55, 0x189: 0x54, 0x18a: 0x54, 0x18b: 0x54, 0x18c: 0x56, 0x18d: 0x57, 0x18e: 0x58, 0x18f: 0x54, + 0x190: 0x59, 0x191: 0x5a, 0x192: 0x5b, 0x193: 0x5c, 0x194: 0x54, 0x195: 0x54, 0x196: 0x54, 0x197: 0x54, + 0x198: 0x54, 0x199: 0x54, 0x19a: 0x5d, 0x19b: 0x54, 0x19c: 0x54, 0x19d: 0x5e, 0x19e: 0x54, 0x19f: 0x5f, + 0x1a4: 0x54, 0x1a5: 0x54, 0x1a6: 0x60, 0x1a7: 0x61, + 0x1a8: 0x54, 0x1a9: 0x54, 0x1aa: 0x54, 0x1ab: 0x54, 0x1ac: 0x54, 0x1ad: 0x62, 0x1ae: 0x63, 0x1af: 0x54, + 0x1b3: 0x64, 0x1b5: 0x65, 0x1b7: 0x66, + 0x1b8: 0x67, 0x1b9: 0x68, 0x1ba: 0x69, 0x1bb: 0x6a, 0x1bc: 0x54, 0x1bd: 0x54, 0x1be: 0x54, 0x1bf: 0x6b, + // Block 0x7, offset 0x1c0 + 0x1c0: 0x6c, 0x1c2: 0x6d, 0x1c3: 0x6e, 0x1c7: 0x6f, + 0x1c8: 0x70, 0x1c9: 0x71, 0x1ca: 0x72, 0x1cb: 0x73, 0x1cd: 0x74, 0x1cf: 0x75, + // Block 0x8, offset 0x200 + 0x237: 0x54, + // Block 0x9, offset 0x240 + 0x252: 0x76, 0x253: 0x77, + 0x258: 0x78, 0x259: 0x79, 0x25a: 0x7a, 0x25b: 0x7b, 0x25c: 0x7c, 0x25e: 0x7d, + 0x260: 0x7e, 0x261: 0x7f, 0x263: 0x80, 0x264: 0x81, 0x265: 0x82, 0x266: 0x83, 0x267: 0x84, + 0x268: 0x85, 0x269: 0x86, 0x26a: 0x87, 0x26b: 0x88, 0x26f: 0x89, + // Block 0xa, offset 0x280 + 0x2ac: 0x8a, 0x2ad: 0x8b, 0x2ae: 0x0e, 0x2af: 0x0e, + 0x2b0: 0x0e, 0x2b1: 0x0e, 0x2b2: 0x0e, 0x2b3: 0x0e, 0x2b4: 0x8c, 0x2b5: 0x0e, 0x2b6: 0x0e, 0x2b7: 0x8d, + 0x2b8: 0x8e, 0x2b9: 0x8f, 0x2ba: 0x0e, 0x2bb: 0x90, 0x2bc: 0x91, 0x2bd: 0x92, 0x2bf: 0x93, + // Block 0xb, offset 0x2c0 + 0x2c4: 0x94, 0x2c5: 0x54, 0x2c6: 0x95, 0x2c7: 0x96, + 0x2cb: 0x97, 0x2cd: 0x98, + 0x2e0: 0x99, 0x2e1: 0x99, 0x2e2: 0x99, 0x2e3: 0x99, 0x2e4: 0x9a, 0x2e5: 0x99, 0x2e6: 0x99, 0x2e7: 0x99, + 0x2e8: 0x9b, 0x2e9: 0x99, 0x2ea: 0x99, 0x2eb: 0x9c, 0x2ec: 0x9d, 0x2ed: 0x99, 0x2ee: 0x99, 0x2ef: 0x99, + 0x2f0: 0x99, 0x2f1: 0x99, 0x2f2: 0x99, 0x2f3: 0x99, 0x2f4: 0x9e, 0x2f5: 0x99, 0x2f6: 0x99, 0x2f7: 0x99, + 0x2f8: 0x99, 0x2f9: 0x9f, 0x2fa: 0x99, 0x2fb: 0x99, 0x2fc: 0xa0, 0x2fd: 0xa1, 0x2fe: 0x99, 0x2ff: 0x99, + // Block 0xc, offset 0x300 + 0x300: 0xa2, 0x301: 0xa3, 0x302: 0xa4, 0x304: 0xa5, 0x305: 0xa6, 0x306: 0xa7, 0x307: 0xa8, + 0x308: 0xa9, 0x30b: 0xaa, 0x30c: 0x26, 0x30d: 0xab, + 0x310: 0xac, 0x311: 0xad, 0x312: 0xae, 0x313: 0xaf, 0x316: 0xb0, 0x317: 0xb1, + 0x318: 0xb2, 0x319: 0xb3, 0x31a: 0xb4, 0x31c: 0xb5, + 0x320: 0xb6, 0x327: 0xb7, + 0x328: 0xb8, 0x329: 0xb9, 0x32a: 0xba, + 0x330: 0xbb, 0x332: 0xbc, 0x334: 0xbd, 0x335: 0xbe, 0x336: 0xbf, + 0x33b: 0xc0, 0x33f: 0xc1, + // Block 0xd, offset 0x340 + 0x36b: 0xc2, 0x36c: 0xc3, + 0x37d: 0xc4, 0x37e: 0xc5, 0x37f: 0xc6, + // Block 0xe, offset 0x380 + 0x3b2: 0xc7, + // Block 0xf, offset 0x3c0 + 0x3c5: 0xc8, 0x3c6: 0xc9, + 0x3c8: 0x54, 0x3c9: 0xca, 0x3cc: 0x54, 0x3cd: 0xcb, + 0x3db: 0xcc, 0x3dc: 0xcd, 0x3dd: 0xce, 0x3de: 0xcf, 0x3df: 0xd0, + 0x3e8: 0xd1, 0x3e9: 0xd2, 0x3ea: 0xd3, + // Block 0x10, offset 0x400 + 0x400: 0xd4, 0x404: 0xc3, + 0x40b: 0xd5, + 0x420: 0x99, 0x421: 0x99, 0x422: 0x99, 0x423: 0xd6, 0x424: 0x99, 0x425: 0xd7, 0x426: 0x99, 0x427: 0x99, + 0x428: 0x99, 0x429: 0x99, 0x42a: 0x99, 0x42b: 0x99, 0x42c: 0x99, 0x42d: 0x99, 0x42e: 0x99, 0x42f: 0x99, + 0x430: 0x99, 0x431: 0xa0, 0x432: 0x0e, 0x433: 0x99, 0x434: 0x0e, 0x435: 0xd8, 0x436: 0x99, 0x437: 0x99, + 0x438: 0x0e, 0x439: 0x0e, 0x43a: 0x0e, 0x43b: 0xd9, 0x43c: 0x99, 0x43d: 0x99, 0x43e: 0x99, 0x43f: 0x99, + // Block 0x11, offset 0x440 + 0x440: 0xda, 0x441: 0x54, 0x442: 0xdb, 0x443: 0xdc, 0x444: 0xdd, 0x445: 0xde, + 0x449: 0xdf, 0x44c: 0x54, 0x44d: 0x54, 0x44e: 0x54, 0x44f: 0x54, + 0x450: 0x54, 0x451: 0x54, 0x452: 0x54, 0x453: 0x54, 0x454: 0x54, 0x455: 0x54, 0x456: 0x54, 0x457: 0x54, + 0x458: 0x54, 0x459: 0x54, 0x45a: 0x54, 0x45b: 0xe0, 0x45c: 0x54, 0x45d: 0x6a, 0x45e: 0x54, 0x45f: 0xe1, + 0x460: 0xe2, 0x461: 0xe3, 0x462: 0xe4, 0x464: 0xe5, 0x465: 0xe6, 0x466: 0xe7, 0x467: 0xe8, + 0x468: 0x54, 0x469: 0xe9, 0x46a: 0xea, + 0x47f: 0xeb, + // Block 0x12, offset 0x480 + 0x4bf: 0xeb, + // Block 0x13, offset 0x4c0 + 0x4d0: 0x09, 0x4d1: 0x0a, 0x4d6: 0x0b, + 0x4db: 0x0c, 0x4dd: 0x0d, 0x4de: 0x0e, 0x4df: 0x0f, + 0x4ef: 0x10, + 0x4ff: 0x10, + // Block 0x14, offset 0x500 + 0x50f: 0x10, + 0x51f: 0x10, + 0x52f: 0x10, + 0x53f: 0x10, + // Block 0x15, offset 0x540 + 0x540: 0xec, 0x541: 0xec, 0x542: 0xec, 0x543: 0xec, 0x544: 0x05, 0x545: 0x05, 0x546: 0x05, 0x547: 0xed, + 0x548: 0xec, 0x549: 0xec, 0x54a: 0xec, 0x54b: 0xec, 0x54c: 0xec, 0x54d: 0xec, 0x54e: 0xec, 0x54f: 0xec, + 0x550: 0xec, 0x551: 0xec, 0x552: 0xec, 0x553: 0xec, 0x554: 0xec, 0x555: 0xec, 0x556: 0xec, 0x557: 0xec, + 0x558: 0xec, 0x559: 0xec, 0x55a: 0xec, 0x55b: 0xec, 0x55c: 0xec, 0x55d: 0xec, 0x55e: 0xec, 0x55f: 0xec, + 0x560: 0xec, 0x561: 0xec, 0x562: 0xec, 0x563: 0xec, 0x564: 0xec, 0x565: 0xec, 0x566: 0xec, 0x567: 0xec, + 0x568: 0xec, 0x569: 0xec, 0x56a: 0xec, 0x56b: 0xec, 0x56c: 0xec, 0x56d: 0xec, 0x56e: 0xec, 0x56f: 0xec, + 0x570: 0xec, 0x571: 0xec, 0x572: 0xec, 0x573: 0xec, 0x574: 0xec, 0x575: 0xec, 0x576: 0xec, 0x577: 0xec, + 0x578: 0xec, 0x579: 0xec, 0x57a: 0xec, 0x57b: 0xec, 0x57c: 0xec, 0x57d: 0xec, 0x57e: 0xec, 0x57f: 0xec, + // Block 0x16, offset 0x580 + 0x58f: 0x10, + 0x59f: 0x10, + 0x5a0: 0x13, + 0x5af: 0x10, + 0x5bf: 0x10, + // Block 0x17, offset 0x5c0 + 0x5cf: 0x10, +} + +// Total table size 16952 bytes (16KiB); checksum: F50EF68C diff --git a/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go b/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go index 7297cce32b7..2c58f09baa4 100644 --- a/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go +++ b/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go @@ -1,6 +1,6 @@ // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. -// +build go1.13 +// +build go1.13,!go1.14 package norm diff --git a/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go b/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go new file mode 100644 index 00000000000..10f5202c693 --- /dev/null +++ b/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go @@ -0,0 +1,7710 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +// +build go1.14 + +package norm + +import "sync" + +const ( + // Version is the Unicode edition from which the tables are derived. + Version = "12.0.0" + + // MaxTransformChunkSize indicates the maximum number of bytes that Transform + // may need to write atomically for any Form. Making a destination buffer at + // least this size ensures that Transform can always make progress and that + // the user does not need to grow the buffer on an ErrShortDst. + MaxTransformChunkSize = 35 + maxNonStarters*4 +) + +var ccc = [55]uint8{ + 0, 1, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, + 84, 91, 103, 107, 118, 122, 129, 130, + 132, 202, 214, 216, 218, 220, 222, 224, + 226, 228, 230, 232, 233, 234, 240, +} + +const ( + firstMulti = 0x186D + firstCCC = 0x2CA1 + endMulti = 0x2F63 + firstLeadingCCC = 0x49B1 + firstCCCZeroExcept = 0x4A7B + firstStarterWithNLead = 0x4AA2 + lastDecomp = 0x4AA4 + maxDecomp = 0x8000 +) + +// decomps: 19108 bytes +var decomps = [...]byte{ + // Bytes 0 - 3f + 0x00, 0x41, 0x20, 0x41, 0x21, 0x41, 0x22, 0x41, + 0x23, 0x41, 0x24, 0x41, 0x25, 0x41, 0x26, 0x41, + 0x27, 0x41, 0x28, 0x41, 0x29, 0x41, 0x2A, 0x41, + 0x2B, 0x41, 0x2C, 0x41, 0x2D, 0x41, 0x2E, 0x41, + 0x2F, 0x41, 0x30, 0x41, 0x31, 0x41, 0x32, 0x41, + 0x33, 0x41, 0x34, 0x41, 0x35, 0x41, 0x36, 0x41, + 0x37, 0x41, 0x38, 0x41, 0x39, 0x41, 0x3A, 0x41, + 0x3B, 0x41, 0x3C, 0x41, 0x3D, 0x41, 0x3E, 0x41, + // Bytes 40 - 7f + 0x3F, 0x41, 0x40, 0x41, 0x41, 0x41, 0x42, 0x41, + 0x43, 0x41, 0x44, 0x41, 0x45, 0x41, 0x46, 0x41, + 0x47, 0x41, 0x48, 0x41, 0x49, 0x41, 0x4A, 0x41, + 0x4B, 0x41, 0x4C, 0x41, 0x4D, 0x41, 0x4E, 0x41, + 0x4F, 0x41, 0x50, 0x41, 0x51, 0x41, 0x52, 0x41, + 0x53, 0x41, 0x54, 0x41, 0x55, 0x41, 0x56, 0x41, + 0x57, 0x41, 0x58, 0x41, 0x59, 0x41, 0x5A, 0x41, + 0x5B, 0x41, 0x5C, 0x41, 0x5D, 0x41, 0x5E, 0x41, + // Bytes 80 - bf + 0x5F, 0x41, 0x60, 0x41, 0x61, 0x41, 0x62, 0x41, + 0x63, 0x41, 0x64, 0x41, 0x65, 0x41, 0x66, 0x41, + 0x67, 0x41, 0x68, 0x41, 0x69, 0x41, 0x6A, 0x41, + 0x6B, 0x41, 0x6C, 0x41, 0x6D, 0x41, 0x6E, 0x41, + 0x6F, 0x41, 0x70, 0x41, 0x71, 0x41, 0x72, 0x41, + 0x73, 0x41, 0x74, 0x41, 0x75, 0x41, 0x76, 0x41, + 0x77, 0x41, 0x78, 0x41, 0x79, 0x41, 0x7A, 0x41, + 0x7B, 0x41, 0x7C, 0x41, 0x7D, 0x41, 0x7E, 0x42, + // Bytes c0 - ff + 0xC2, 0xA2, 0x42, 0xC2, 0xA3, 0x42, 0xC2, 0xA5, + 0x42, 0xC2, 0xA6, 0x42, 0xC2, 0xAC, 0x42, 0xC2, + 0xB7, 0x42, 0xC3, 0x86, 0x42, 0xC3, 0xB0, 0x42, + 0xC4, 0xA6, 0x42, 0xC4, 0xA7, 0x42, 0xC4, 0xB1, + 0x42, 0xC5, 0x8B, 0x42, 0xC5, 0x93, 0x42, 0xC6, + 0x8E, 0x42, 0xC6, 0x90, 0x42, 0xC6, 0xAB, 0x42, + 0xC8, 0xA2, 0x42, 0xC8, 0xB7, 0x42, 0xC9, 0x90, + 0x42, 0xC9, 0x91, 0x42, 0xC9, 0x92, 0x42, 0xC9, + // Bytes 100 - 13f + 0x94, 0x42, 0xC9, 0x95, 0x42, 0xC9, 0x99, 0x42, + 0xC9, 0x9B, 0x42, 0xC9, 0x9C, 0x42, 0xC9, 0x9F, + 0x42, 0xC9, 0xA1, 0x42, 0xC9, 0xA3, 0x42, 0xC9, + 0xA5, 0x42, 0xC9, 0xA6, 0x42, 0xC9, 0xA8, 0x42, + 0xC9, 0xA9, 0x42, 0xC9, 0xAA, 0x42, 0xC9, 0xAB, + 0x42, 0xC9, 0xAD, 0x42, 0xC9, 0xAF, 0x42, 0xC9, + 0xB0, 0x42, 0xC9, 0xB1, 0x42, 0xC9, 0xB2, 0x42, + 0xC9, 0xB3, 0x42, 0xC9, 0xB4, 0x42, 0xC9, 0xB5, + // Bytes 140 - 17f + 0x42, 0xC9, 0xB8, 0x42, 0xC9, 0xB9, 0x42, 0xC9, + 0xBB, 0x42, 0xCA, 0x81, 0x42, 0xCA, 0x82, 0x42, + 0xCA, 0x83, 0x42, 0xCA, 0x89, 0x42, 0xCA, 0x8A, + 0x42, 0xCA, 0x8B, 0x42, 0xCA, 0x8C, 0x42, 0xCA, + 0x90, 0x42, 0xCA, 0x91, 0x42, 0xCA, 0x92, 0x42, + 0xCA, 0x95, 0x42, 0xCA, 0x9D, 0x42, 0xCA, 0x9F, + 0x42, 0xCA, 0xB9, 0x42, 0xCE, 0x91, 0x42, 0xCE, + 0x92, 0x42, 0xCE, 0x93, 0x42, 0xCE, 0x94, 0x42, + // Bytes 180 - 1bf + 0xCE, 0x95, 0x42, 0xCE, 0x96, 0x42, 0xCE, 0x97, + 0x42, 0xCE, 0x98, 0x42, 0xCE, 0x99, 0x42, 0xCE, + 0x9A, 0x42, 0xCE, 0x9B, 0x42, 0xCE, 0x9C, 0x42, + 0xCE, 0x9D, 0x42, 0xCE, 0x9E, 0x42, 0xCE, 0x9F, + 0x42, 0xCE, 0xA0, 0x42, 0xCE, 0xA1, 0x42, 0xCE, + 0xA3, 0x42, 0xCE, 0xA4, 0x42, 0xCE, 0xA5, 0x42, + 0xCE, 0xA6, 0x42, 0xCE, 0xA7, 0x42, 0xCE, 0xA8, + 0x42, 0xCE, 0xA9, 0x42, 0xCE, 0xB1, 0x42, 0xCE, + // Bytes 1c0 - 1ff + 0xB2, 0x42, 0xCE, 0xB3, 0x42, 0xCE, 0xB4, 0x42, + 0xCE, 0xB5, 0x42, 0xCE, 0xB6, 0x42, 0xCE, 0xB7, + 0x42, 0xCE, 0xB8, 0x42, 0xCE, 0xB9, 0x42, 0xCE, + 0xBA, 0x42, 0xCE, 0xBB, 0x42, 0xCE, 0xBC, 0x42, + 0xCE, 0xBD, 0x42, 0xCE, 0xBE, 0x42, 0xCE, 0xBF, + 0x42, 0xCF, 0x80, 0x42, 0xCF, 0x81, 0x42, 0xCF, + 0x82, 0x42, 0xCF, 0x83, 0x42, 0xCF, 0x84, 0x42, + 0xCF, 0x85, 0x42, 0xCF, 0x86, 0x42, 0xCF, 0x87, + // Bytes 200 - 23f + 0x42, 0xCF, 0x88, 0x42, 0xCF, 0x89, 0x42, 0xCF, + 0x9C, 0x42, 0xCF, 0x9D, 0x42, 0xD0, 0xBD, 0x42, + 0xD1, 0x8A, 0x42, 0xD1, 0x8C, 0x42, 0xD7, 0x90, + 0x42, 0xD7, 0x91, 0x42, 0xD7, 0x92, 0x42, 0xD7, + 0x93, 0x42, 0xD7, 0x94, 0x42, 0xD7, 0x9B, 0x42, + 0xD7, 0x9C, 0x42, 0xD7, 0x9D, 0x42, 0xD7, 0xA2, + 0x42, 0xD7, 0xA8, 0x42, 0xD7, 0xAA, 0x42, 0xD8, + 0xA1, 0x42, 0xD8, 0xA7, 0x42, 0xD8, 0xA8, 0x42, + // Bytes 240 - 27f + 0xD8, 0xA9, 0x42, 0xD8, 0xAA, 0x42, 0xD8, 0xAB, + 0x42, 0xD8, 0xAC, 0x42, 0xD8, 0xAD, 0x42, 0xD8, + 0xAE, 0x42, 0xD8, 0xAF, 0x42, 0xD8, 0xB0, 0x42, + 0xD8, 0xB1, 0x42, 0xD8, 0xB2, 0x42, 0xD8, 0xB3, + 0x42, 0xD8, 0xB4, 0x42, 0xD8, 0xB5, 0x42, 0xD8, + 0xB6, 0x42, 0xD8, 0xB7, 0x42, 0xD8, 0xB8, 0x42, + 0xD8, 0xB9, 0x42, 0xD8, 0xBA, 0x42, 0xD9, 0x81, + 0x42, 0xD9, 0x82, 0x42, 0xD9, 0x83, 0x42, 0xD9, + // Bytes 280 - 2bf + 0x84, 0x42, 0xD9, 0x85, 0x42, 0xD9, 0x86, 0x42, + 0xD9, 0x87, 0x42, 0xD9, 0x88, 0x42, 0xD9, 0x89, + 0x42, 0xD9, 0x8A, 0x42, 0xD9, 0xAE, 0x42, 0xD9, + 0xAF, 0x42, 0xD9, 0xB1, 0x42, 0xD9, 0xB9, 0x42, + 0xD9, 0xBA, 0x42, 0xD9, 0xBB, 0x42, 0xD9, 0xBE, + 0x42, 0xD9, 0xBF, 0x42, 0xDA, 0x80, 0x42, 0xDA, + 0x83, 0x42, 0xDA, 0x84, 0x42, 0xDA, 0x86, 0x42, + 0xDA, 0x87, 0x42, 0xDA, 0x88, 0x42, 0xDA, 0x8C, + // Bytes 2c0 - 2ff + 0x42, 0xDA, 0x8D, 0x42, 0xDA, 0x8E, 0x42, 0xDA, + 0x91, 0x42, 0xDA, 0x98, 0x42, 0xDA, 0xA1, 0x42, + 0xDA, 0xA4, 0x42, 0xDA, 0xA6, 0x42, 0xDA, 0xA9, + 0x42, 0xDA, 0xAD, 0x42, 0xDA, 0xAF, 0x42, 0xDA, + 0xB1, 0x42, 0xDA, 0xB3, 0x42, 0xDA, 0xBA, 0x42, + 0xDA, 0xBB, 0x42, 0xDA, 0xBE, 0x42, 0xDB, 0x81, + 0x42, 0xDB, 0x85, 0x42, 0xDB, 0x86, 0x42, 0xDB, + 0x87, 0x42, 0xDB, 0x88, 0x42, 0xDB, 0x89, 0x42, + // Bytes 300 - 33f + 0xDB, 0x8B, 0x42, 0xDB, 0x8C, 0x42, 0xDB, 0x90, + 0x42, 0xDB, 0x92, 0x43, 0xE0, 0xBC, 0x8B, 0x43, + 0xE1, 0x83, 0x9C, 0x43, 0xE1, 0x84, 0x80, 0x43, + 0xE1, 0x84, 0x81, 0x43, 0xE1, 0x84, 0x82, 0x43, + 0xE1, 0x84, 0x83, 0x43, 0xE1, 0x84, 0x84, 0x43, + 0xE1, 0x84, 0x85, 0x43, 0xE1, 0x84, 0x86, 0x43, + 0xE1, 0x84, 0x87, 0x43, 0xE1, 0x84, 0x88, 0x43, + 0xE1, 0x84, 0x89, 0x43, 0xE1, 0x84, 0x8A, 0x43, + // Bytes 340 - 37f + 0xE1, 0x84, 0x8B, 0x43, 0xE1, 0x84, 0x8C, 0x43, + 0xE1, 0x84, 0x8D, 0x43, 0xE1, 0x84, 0x8E, 0x43, + 0xE1, 0x84, 0x8F, 0x43, 0xE1, 0x84, 0x90, 0x43, + 0xE1, 0x84, 0x91, 0x43, 0xE1, 0x84, 0x92, 0x43, + 0xE1, 0x84, 0x94, 0x43, 0xE1, 0x84, 0x95, 0x43, + 0xE1, 0x84, 0x9A, 0x43, 0xE1, 0x84, 0x9C, 0x43, + 0xE1, 0x84, 0x9D, 0x43, 0xE1, 0x84, 0x9E, 0x43, + 0xE1, 0x84, 0xA0, 0x43, 0xE1, 0x84, 0xA1, 0x43, + // Bytes 380 - 3bf + 0xE1, 0x84, 0xA2, 0x43, 0xE1, 0x84, 0xA3, 0x43, + 0xE1, 0x84, 0xA7, 0x43, 0xE1, 0x84, 0xA9, 0x43, + 0xE1, 0x84, 0xAB, 0x43, 0xE1, 0x84, 0xAC, 0x43, + 0xE1, 0x84, 0xAD, 0x43, 0xE1, 0x84, 0xAE, 0x43, + 0xE1, 0x84, 0xAF, 0x43, 0xE1, 0x84, 0xB2, 0x43, + 0xE1, 0x84, 0xB6, 0x43, 0xE1, 0x85, 0x80, 0x43, + 0xE1, 0x85, 0x87, 0x43, 0xE1, 0x85, 0x8C, 0x43, + 0xE1, 0x85, 0x97, 0x43, 0xE1, 0x85, 0x98, 0x43, + // Bytes 3c0 - 3ff + 0xE1, 0x85, 0x99, 0x43, 0xE1, 0x85, 0xA0, 0x43, + 0xE1, 0x86, 0x84, 0x43, 0xE1, 0x86, 0x85, 0x43, + 0xE1, 0x86, 0x88, 0x43, 0xE1, 0x86, 0x91, 0x43, + 0xE1, 0x86, 0x92, 0x43, 0xE1, 0x86, 0x94, 0x43, + 0xE1, 0x86, 0x9E, 0x43, 0xE1, 0x86, 0xA1, 0x43, + 0xE1, 0x87, 0x87, 0x43, 0xE1, 0x87, 0x88, 0x43, + 0xE1, 0x87, 0x8C, 0x43, 0xE1, 0x87, 0x8E, 0x43, + 0xE1, 0x87, 0x93, 0x43, 0xE1, 0x87, 0x97, 0x43, + // Bytes 400 - 43f + 0xE1, 0x87, 0x99, 0x43, 0xE1, 0x87, 0x9D, 0x43, + 0xE1, 0x87, 0x9F, 0x43, 0xE1, 0x87, 0xB1, 0x43, + 0xE1, 0x87, 0xB2, 0x43, 0xE1, 0xB4, 0x82, 0x43, + 0xE1, 0xB4, 0x96, 0x43, 0xE1, 0xB4, 0x97, 0x43, + 0xE1, 0xB4, 0x9C, 0x43, 0xE1, 0xB4, 0x9D, 0x43, + 0xE1, 0xB4, 0xA5, 0x43, 0xE1, 0xB5, 0xBB, 0x43, + 0xE1, 0xB6, 0x85, 0x43, 0xE2, 0x80, 0x82, 0x43, + 0xE2, 0x80, 0x83, 0x43, 0xE2, 0x80, 0x90, 0x43, + // Bytes 440 - 47f + 0xE2, 0x80, 0x93, 0x43, 0xE2, 0x80, 0x94, 0x43, + 0xE2, 0x82, 0xA9, 0x43, 0xE2, 0x86, 0x90, 0x43, + 0xE2, 0x86, 0x91, 0x43, 0xE2, 0x86, 0x92, 0x43, + 0xE2, 0x86, 0x93, 0x43, 0xE2, 0x88, 0x82, 0x43, + 0xE2, 0x88, 0x87, 0x43, 0xE2, 0x88, 0x91, 0x43, + 0xE2, 0x88, 0x92, 0x43, 0xE2, 0x94, 0x82, 0x43, + 0xE2, 0x96, 0xA0, 0x43, 0xE2, 0x97, 0x8B, 0x43, + 0xE2, 0xA6, 0x85, 0x43, 0xE2, 0xA6, 0x86, 0x43, + // Bytes 480 - 4bf + 0xE2, 0xB5, 0xA1, 0x43, 0xE3, 0x80, 0x81, 0x43, + 0xE3, 0x80, 0x82, 0x43, 0xE3, 0x80, 0x88, 0x43, + 0xE3, 0x80, 0x89, 0x43, 0xE3, 0x80, 0x8A, 0x43, + 0xE3, 0x80, 0x8B, 0x43, 0xE3, 0x80, 0x8C, 0x43, + 0xE3, 0x80, 0x8D, 0x43, 0xE3, 0x80, 0x8E, 0x43, + 0xE3, 0x80, 0x8F, 0x43, 0xE3, 0x80, 0x90, 0x43, + 0xE3, 0x80, 0x91, 0x43, 0xE3, 0x80, 0x92, 0x43, + 0xE3, 0x80, 0x94, 0x43, 0xE3, 0x80, 0x95, 0x43, + // Bytes 4c0 - 4ff + 0xE3, 0x80, 0x96, 0x43, 0xE3, 0x80, 0x97, 0x43, + 0xE3, 0x82, 0xA1, 0x43, 0xE3, 0x82, 0xA2, 0x43, + 0xE3, 0x82, 0xA3, 0x43, 0xE3, 0x82, 0xA4, 0x43, + 0xE3, 0x82, 0xA5, 0x43, 0xE3, 0x82, 0xA6, 0x43, + 0xE3, 0x82, 0xA7, 0x43, 0xE3, 0x82, 0xA8, 0x43, + 0xE3, 0x82, 0xA9, 0x43, 0xE3, 0x82, 0xAA, 0x43, + 0xE3, 0x82, 0xAB, 0x43, 0xE3, 0x82, 0xAD, 0x43, + 0xE3, 0x82, 0xAF, 0x43, 0xE3, 0x82, 0xB1, 0x43, + // Bytes 500 - 53f + 0xE3, 0x82, 0xB3, 0x43, 0xE3, 0x82, 0xB5, 0x43, + 0xE3, 0x82, 0xB7, 0x43, 0xE3, 0x82, 0xB9, 0x43, + 0xE3, 0x82, 0xBB, 0x43, 0xE3, 0x82, 0xBD, 0x43, + 0xE3, 0x82, 0xBF, 0x43, 0xE3, 0x83, 0x81, 0x43, + 0xE3, 0x83, 0x83, 0x43, 0xE3, 0x83, 0x84, 0x43, + 0xE3, 0x83, 0x86, 0x43, 0xE3, 0x83, 0x88, 0x43, + 0xE3, 0x83, 0x8A, 0x43, 0xE3, 0x83, 0x8B, 0x43, + 0xE3, 0x83, 0x8C, 0x43, 0xE3, 0x83, 0x8D, 0x43, + // Bytes 540 - 57f + 0xE3, 0x83, 0x8E, 0x43, 0xE3, 0x83, 0x8F, 0x43, + 0xE3, 0x83, 0x92, 0x43, 0xE3, 0x83, 0x95, 0x43, + 0xE3, 0x83, 0x98, 0x43, 0xE3, 0x83, 0x9B, 0x43, + 0xE3, 0x83, 0x9E, 0x43, 0xE3, 0x83, 0x9F, 0x43, + 0xE3, 0x83, 0xA0, 0x43, 0xE3, 0x83, 0xA1, 0x43, + 0xE3, 0x83, 0xA2, 0x43, 0xE3, 0x83, 0xA3, 0x43, + 0xE3, 0x83, 0xA4, 0x43, 0xE3, 0x83, 0xA5, 0x43, + 0xE3, 0x83, 0xA6, 0x43, 0xE3, 0x83, 0xA7, 0x43, + // Bytes 580 - 5bf + 0xE3, 0x83, 0xA8, 0x43, 0xE3, 0x83, 0xA9, 0x43, + 0xE3, 0x83, 0xAA, 0x43, 0xE3, 0x83, 0xAB, 0x43, + 0xE3, 0x83, 0xAC, 0x43, 0xE3, 0x83, 0xAD, 0x43, + 0xE3, 0x83, 0xAF, 0x43, 0xE3, 0x83, 0xB0, 0x43, + 0xE3, 0x83, 0xB1, 0x43, 0xE3, 0x83, 0xB2, 0x43, + 0xE3, 0x83, 0xB3, 0x43, 0xE3, 0x83, 0xBB, 0x43, + 0xE3, 0x83, 0xBC, 0x43, 0xE3, 0x92, 0x9E, 0x43, + 0xE3, 0x92, 0xB9, 0x43, 0xE3, 0x92, 0xBB, 0x43, + // Bytes 5c0 - 5ff + 0xE3, 0x93, 0x9F, 0x43, 0xE3, 0x94, 0x95, 0x43, + 0xE3, 0x9B, 0xAE, 0x43, 0xE3, 0x9B, 0xBC, 0x43, + 0xE3, 0x9E, 0x81, 0x43, 0xE3, 0xA0, 0xAF, 0x43, + 0xE3, 0xA1, 0xA2, 0x43, 0xE3, 0xA1, 0xBC, 0x43, + 0xE3, 0xA3, 0x87, 0x43, 0xE3, 0xA3, 0xA3, 0x43, + 0xE3, 0xA4, 0x9C, 0x43, 0xE3, 0xA4, 0xBA, 0x43, + 0xE3, 0xA8, 0xAE, 0x43, 0xE3, 0xA9, 0xAC, 0x43, + 0xE3, 0xAB, 0xA4, 0x43, 0xE3, 0xAC, 0x88, 0x43, + // Bytes 600 - 63f + 0xE3, 0xAC, 0x99, 0x43, 0xE3, 0xAD, 0x89, 0x43, + 0xE3, 0xAE, 0x9D, 0x43, 0xE3, 0xB0, 0x98, 0x43, + 0xE3, 0xB1, 0x8E, 0x43, 0xE3, 0xB4, 0xB3, 0x43, + 0xE3, 0xB6, 0x96, 0x43, 0xE3, 0xBA, 0xAC, 0x43, + 0xE3, 0xBA, 0xB8, 0x43, 0xE3, 0xBC, 0x9B, 0x43, + 0xE3, 0xBF, 0xBC, 0x43, 0xE4, 0x80, 0x88, 0x43, + 0xE4, 0x80, 0x98, 0x43, 0xE4, 0x80, 0xB9, 0x43, + 0xE4, 0x81, 0x86, 0x43, 0xE4, 0x82, 0x96, 0x43, + // Bytes 640 - 67f + 0xE4, 0x83, 0xA3, 0x43, 0xE4, 0x84, 0xAF, 0x43, + 0xE4, 0x88, 0x82, 0x43, 0xE4, 0x88, 0xA7, 0x43, + 0xE4, 0x8A, 0xA0, 0x43, 0xE4, 0x8C, 0x81, 0x43, + 0xE4, 0x8C, 0xB4, 0x43, 0xE4, 0x8D, 0x99, 0x43, + 0xE4, 0x8F, 0x95, 0x43, 0xE4, 0x8F, 0x99, 0x43, + 0xE4, 0x90, 0x8B, 0x43, 0xE4, 0x91, 0xAB, 0x43, + 0xE4, 0x94, 0xAB, 0x43, 0xE4, 0x95, 0x9D, 0x43, + 0xE4, 0x95, 0xA1, 0x43, 0xE4, 0x95, 0xAB, 0x43, + // Bytes 680 - 6bf + 0xE4, 0x97, 0x97, 0x43, 0xE4, 0x97, 0xB9, 0x43, + 0xE4, 0x98, 0xB5, 0x43, 0xE4, 0x9A, 0xBE, 0x43, + 0xE4, 0x9B, 0x87, 0x43, 0xE4, 0xA6, 0x95, 0x43, + 0xE4, 0xA7, 0xA6, 0x43, 0xE4, 0xA9, 0xAE, 0x43, + 0xE4, 0xA9, 0xB6, 0x43, 0xE4, 0xAA, 0xB2, 0x43, + 0xE4, 0xAC, 0xB3, 0x43, 0xE4, 0xAF, 0x8E, 0x43, + 0xE4, 0xB3, 0x8E, 0x43, 0xE4, 0xB3, 0xAD, 0x43, + 0xE4, 0xB3, 0xB8, 0x43, 0xE4, 0xB5, 0x96, 0x43, + // Bytes 6c0 - 6ff + 0xE4, 0xB8, 0x80, 0x43, 0xE4, 0xB8, 0x81, 0x43, + 0xE4, 0xB8, 0x83, 0x43, 0xE4, 0xB8, 0x89, 0x43, + 0xE4, 0xB8, 0x8A, 0x43, 0xE4, 0xB8, 0x8B, 0x43, + 0xE4, 0xB8, 0x8D, 0x43, 0xE4, 0xB8, 0x99, 0x43, + 0xE4, 0xB8, 0xA6, 0x43, 0xE4, 0xB8, 0xA8, 0x43, + 0xE4, 0xB8, 0xAD, 0x43, 0xE4, 0xB8, 0xB2, 0x43, + 0xE4, 0xB8, 0xB6, 0x43, 0xE4, 0xB8, 0xB8, 0x43, + 0xE4, 0xB8, 0xB9, 0x43, 0xE4, 0xB8, 0xBD, 0x43, + // Bytes 700 - 73f + 0xE4, 0xB8, 0xBF, 0x43, 0xE4, 0xB9, 0x81, 0x43, + 0xE4, 0xB9, 0x99, 0x43, 0xE4, 0xB9, 0x9D, 0x43, + 0xE4, 0xBA, 0x82, 0x43, 0xE4, 0xBA, 0x85, 0x43, + 0xE4, 0xBA, 0x86, 0x43, 0xE4, 0xBA, 0x8C, 0x43, + 0xE4, 0xBA, 0x94, 0x43, 0xE4, 0xBA, 0xA0, 0x43, + 0xE4, 0xBA, 0xA4, 0x43, 0xE4, 0xBA, 0xAE, 0x43, + 0xE4, 0xBA, 0xBA, 0x43, 0xE4, 0xBB, 0x80, 0x43, + 0xE4, 0xBB, 0x8C, 0x43, 0xE4, 0xBB, 0xA4, 0x43, + // Bytes 740 - 77f + 0xE4, 0xBC, 0x81, 0x43, 0xE4, 0xBC, 0x91, 0x43, + 0xE4, 0xBD, 0xA0, 0x43, 0xE4, 0xBE, 0x80, 0x43, + 0xE4, 0xBE, 0x86, 0x43, 0xE4, 0xBE, 0x8B, 0x43, + 0xE4, 0xBE, 0xAE, 0x43, 0xE4, 0xBE, 0xBB, 0x43, + 0xE4, 0xBE, 0xBF, 0x43, 0xE5, 0x80, 0x82, 0x43, + 0xE5, 0x80, 0xAB, 0x43, 0xE5, 0x81, 0xBA, 0x43, + 0xE5, 0x82, 0x99, 0x43, 0xE5, 0x83, 0x8F, 0x43, + 0xE5, 0x83, 0x9A, 0x43, 0xE5, 0x83, 0xA7, 0x43, + // Bytes 780 - 7bf + 0xE5, 0x84, 0xAA, 0x43, 0xE5, 0x84, 0xBF, 0x43, + 0xE5, 0x85, 0x80, 0x43, 0xE5, 0x85, 0x85, 0x43, + 0xE5, 0x85, 0x8D, 0x43, 0xE5, 0x85, 0x94, 0x43, + 0xE5, 0x85, 0xA4, 0x43, 0xE5, 0x85, 0xA5, 0x43, + 0xE5, 0x85, 0xA7, 0x43, 0xE5, 0x85, 0xA8, 0x43, + 0xE5, 0x85, 0xA9, 0x43, 0xE5, 0x85, 0xAB, 0x43, + 0xE5, 0x85, 0xAD, 0x43, 0xE5, 0x85, 0xB7, 0x43, + 0xE5, 0x86, 0x80, 0x43, 0xE5, 0x86, 0x82, 0x43, + // Bytes 7c0 - 7ff + 0xE5, 0x86, 0x8D, 0x43, 0xE5, 0x86, 0x92, 0x43, + 0xE5, 0x86, 0x95, 0x43, 0xE5, 0x86, 0x96, 0x43, + 0xE5, 0x86, 0x97, 0x43, 0xE5, 0x86, 0x99, 0x43, + 0xE5, 0x86, 0xA4, 0x43, 0xE5, 0x86, 0xAB, 0x43, + 0xE5, 0x86, 0xAC, 0x43, 0xE5, 0x86, 0xB5, 0x43, + 0xE5, 0x86, 0xB7, 0x43, 0xE5, 0x87, 0x89, 0x43, + 0xE5, 0x87, 0x8C, 0x43, 0xE5, 0x87, 0x9C, 0x43, + 0xE5, 0x87, 0x9E, 0x43, 0xE5, 0x87, 0xA0, 0x43, + // Bytes 800 - 83f + 0xE5, 0x87, 0xB5, 0x43, 0xE5, 0x88, 0x80, 0x43, + 0xE5, 0x88, 0x83, 0x43, 0xE5, 0x88, 0x87, 0x43, + 0xE5, 0x88, 0x97, 0x43, 0xE5, 0x88, 0x9D, 0x43, + 0xE5, 0x88, 0xA9, 0x43, 0xE5, 0x88, 0xBA, 0x43, + 0xE5, 0x88, 0xBB, 0x43, 0xE5, 0x89, 0x86, 0x43, + 0xE5, 0x89, 0x8D, 0x43, 0xE5, 0x89, 0xB2, 0x43, + 0xE5, 0x89, 0xB7, 0x43, 0xE5, 0x8A, 0x89, 0x43, + 0xE5, 0x8A, 0x9B, 0x43, 0xE5, 0x8A, 0xA3, 0x43, + // Bytes 840 - 87f + 0xE5, 0x8A, 0xB3, 0x43, 0xE5, 0x8A, 0xB4, 0x43, + 0xE5, 0x8B, 0x87, 0x43, 0xE5, 0x8B, 0x89, 0x43, + 0xE5, 0x8B, 0x92, 0x43, 0xE5, 0x8B, 0x9E, 0x43, + 0xE5, 0x8B, 0xA4, 0x43, 0xE5, 0x8B, 0xB5, 0x43, + 0xE5, 0x8B, 0xB9, 0x43, 0xE5, 0x8B, 0xBA, 0x43, + 0xE5, 0x8C, 0x85, 0x43, 0xE5, 0x8C, 0x86, 0x43, + 0xE5, 0x8C, 0x95, 0x43, 0xE5, 0x8C, 0x97, 0x43, + 0xE5, 0x8C, 0x9A, 0x43, 0xE5, 0x8C, 0xB8, 0x43, + // Bytes 880 - 8bf + 0xE5, 0x8C, 0xBB, 0x43, 0xE5, 0x8C, 0xBF, 0x43, + 0xE5, 0x8D, 0x81, 0x43, 0xE5, 0x8D, 0x84, 0x43, + 0xE5, 0x8D, 0x85, 0x43, 0xE5, 0x8D, 0x89, 0x43, + 0xE5, 0x8D, 0x91, 0x43, 0xE5, 0x8D, 0x94, 0x43, + 0xE5, 0x8D, 0x9A, 0x43, 0xE5, 0x8D, 0x9C, 0x43, + 0xE5, 0x8D, 0xA9, 0x43, 0xE5, 0x8D, 0xB0, 0x43, + 0xE5, 0x8D, 0xB3, 0x43, 0xE5, 0x8D, 0xB5, 0x43, + 0xE5, 0x8D, 0xBD, 0x43, 0xE5, 0x8D, 0xBF, 0x43, + // Bytes 8c0 - 8ff + 0xE5, 0x8E, 0x82, 0x43, 0xE5, 0x8E, 0xB6, 0x43, + 0xE5, 0x8F, 0x83, 0x43, 0xE5, 0x8F, 0x88, 0x43, + 0xE5, 0x8F, 0x8A, 0x43, 0xE5, 0x8F, 0x8C, 0x43, + 0xE5, 0x8F, 0x9F, 0x43, 0xE5, 0x8F, 0xA3, 0x43, + 0xE5, 0x8F, 0xA5, 0x43, 0xE5, 0x8F, 0xAB, 0x43, + 0xE5, 0x8F, 0xAF, 0x43, 0xE5, 0x8F, 0xB1, 0x43, + 0xE5, 0x8F, 0xB3, 0x43, 0xE5, 0x90, 0x86, 0x43, + 0xE5, 0x90, 0x88, 0x43, 0xE5, 0x90, 0x8D, 0x43, + // Bytes 900 - 93f + 0xE5, 0x90, 0x8F, 0x43, 0xE5, 0x90, 0x9D, 0x43, + 0xE5, 0x90, 0xB8, 0x43, 0xE5, 0x90, 0xB9, 0x43, + 0xE5, 0x91, 0x82, 0x43, 0xE5, 0x91, 0x88, 0x43, + 0xE5, 0x91, 0xA8, 0x43, 0xE5, 0x92, 0x9E, 0x43, + 0xE5, 0x92, 0xA2, 0x43, 0xE5, 0x92, 0xBD, 0x43, + 0xE5, 0x93, 0xB6, 0x43, 0xE5, 0x94, 0x90, 0x43, + 0xE5, 0x95, 0x8F, 0x43, 0xE5, 0x95, 0x93, 0x43, + 0xE5, 0x95, 0x95, 0x43, 0xE5, 0x95, 0xA3, 0x43, + // Bytes 940 - 97f + 0xE5, 0x96, 0x84, 0x43, 0xE5, 0x96, 0x87, 0x43, + 0xE5, 0x96, 0x99, 0x43, 0xE5, 0x96, 0x9D, 0x43, + 0xE5, 0x96, 0xAB, 0x43, 0xE5, 0x96, 0xB3, 0x43, + 0xE5, 0x96, 0xB6, 0x43, 0xE5, 0x97, 0x80, 0x43, + 0xE5, 0x97, 0x82, 0x43, 0xE5, 0x97, 0xA2, 0x43, + 0xE5, 0x98, 0x86, 0x43, 0xE5, 0x99, 0x91, 0x43, + 0xE5, 0x99, 0xA8, 0x43, 0xE5, 0x99, 0xB4, 0x43, + 0xE5, 0x9B, 0x97, 0x43, 0xE5, 0x9B, 0x9B, 0x43, + // Bytes 980 - 9bf + 0xE5, 0x9B, 0xB9, 0x43, 0xE5, 0x9C, 0x96, 0x43, + 0xE5, 0x9C, 0x97, 0x43, 0xE5, 0x9C, 0x9F, 0x43, + 0xE5, 0x9C, 0xB0, 0x43, 0xE5, 0x9E, 0x8B, 0x43, + 0xE5, 0x9F, 0x8E, 0x43, 0xE5, 0x9F, 0xB4, 0x43, + 0xE5, 0xA0, 0x8D, 0x43, 0xE5, 0xA0, 0xB1, 0x43, + 0xE5, 0xA0, 0xB2, 0x43, 0xE5, 0xA1, 0x80, 0x43, + 0xE5, 0xA1, 0x9A, 0x43, 0xE5, 0xA1, 0x9E, 0x43, + 0xE5, 0xA2, 0xA8, 0x43, 0xE5, 0xA2, 0xAC, 0x43, + // Bytes 9c0 - 9ff + 0xE5, 0xA2, 0xB3, 0x43, 0xE5, 0xA3, 0x98, 0x43, + 0xE5, 0xA3, 0x9F, 0x43, 0xE5, 0xA3, 0xAB, 0x43, + 0xE5, 0xA3, 0xAE, 0x43, 0xE5, 0xA3, 0xB0, 0x43, + 0xE5, 0xA3, 0xB2, 0x43, 0xE5, 0xA3, 0xB7, 0x43, + 0xE5, 0xA4, 0x82, 0x43, 0xE5, 0xA4, 0x86, 0x43, + 0xE5, 0xA4, 0x8A, 0x43, 0xE5, 0xA4, 0x95, 0x43, + 0xE5, 0xA4, 0x9A, 0x43, 0xE5, 0xA4, 0x9C, 0x43, + 0xE5, 0xA4, 0xA2, 0x43, 0xE5, 0xA4, 0xA7, 0x43, + // Bytes a00 - a3f + 0xE5, 0xA4, 0xA9, 0x43, 0xE5, 0xA5, 0x84, 0x43, + 0xE5, 0xA5, 0x88, 0x43, 0xE5, 0xA5, 0x91, 0x43, + 0xE5, 0xA5, 0x94, 0x43, 0xE5, 0xA5, 0xA2, 0x43, + 0xE5, 0xA5, 0xB3, 0x43, 0xE5, 0xA7, 0x98, 0x43, + 0xE5, 0xA7, 0xAC, 0x43, 0xE5, 0xA8, 0x9B, 0x43, + 0xE5, 0xA8, 0xA7, 0x43, 0xE5, 0xA9, 0xA2, 0x43, + 0xE5, 0xA9, 0xA6, 0x43, 0xE5, 0xAA, 0xB5, 0x43, + 0xE5, 0xAC, 0x88, 0x43, 0xE5, 0xAC, 0xA8, 0x43, + // Bytes a40 - a7f + 0xE5, 0xAC, 0xBE, 0x43, 0xE5, 0xAD, 0x90, 0x43, + 0xE5, 0xAD, 0x97, 0x43, 0xE5, 0xAD, 0xA6, 0x43, + 0xE5, 0xAE, 0x80, 0x43, 0xE5, 0xAE, 0x85, 0x43, + 0xE5, 0xAE, 0x97, 0x43, 0xE5, 0xAF, 0x83, 0x43, + 0xE5, 0xAF, 0x98, 0x43, 0xE5, 0xAF, 0xA7, 0x43, + 0xE5, 0xAF, 0xAE, 0x43, 0xE5, 0xAF, 0xB3, 0x43, + 0xE5, 0xAF, 0xB8, 0x43, 0xE5, 0xAF, 0xBF, 0x43, + 0xE5, 0xB0, 0x86, 0x43, 0xE5, 0xB0, 0x8F, 0x43, + // Bytes a80 - abf + 0xE5, 0xB0, 0xA2, 0x43, 0xE5, 0xB0, 0xB8, 0x43, + 0xE5, 0xB0, 0xBF, 0x43, 0xE5, 0xB1, 0xA0, 0x43, + 0xE5, 0xB1, 0xA2, 0x43, 0xE5, 0xB1, 0xA4, 0x43, + 0xE5, 0xB1, 0xA5, 0x43, 0xE5, 0xB1, 0xAE, 0x43, + 0xE5, 0xB1, 0xB1, 0x43, 0xE5, 0xB2, 0x8D, 0x43, + 0xE5, 0xB3, 0x80, 0x43, 0xE5, 0xB4, 0x99, 0x43, + 0xE5, 0xB5, 0x83, 0x43, 0xE5, 0xB5, 0x90, 0x43, + 0xE5, 0xB5, 0xAB, 0x43, 0xE5, 0xB5, 0xAE, 0x43, + // Bytes ac0 - aff + 0xE5, 0xB5, 0xBC, 0x43, 0xE5, 0xB6, 0xB2, 0x43, + 0xE5, 0xB6, 0xBA, 0x43, 0xE5, 0xB7, 0x9B, 0x43, + 0xE5, 0xB7, 0xA1, 0x43, 0xE5, 0xB7, 0xA2, 0x43, + 0xE5, 0xB7, 0xA5, 0x43, 0xE5, 0xB7, 0xA6, 0x43, + 0xE5, 0xB7, 0xB1, 0x43, 0xE5, 0xB7, 0xBD, 0x43, + 0xE5, 0xB7, 0xBE, 0x43, 0xE5, 0xB8, 0xA8, 0x43, + 0xE5, 0xB8, 0xBD, 0x43, 0xE5, 0xB9, 0xA9, 0x43, + 0xE5, 0xB9, 0xB2, 0x43, 0xE5, 0xB9, 0xB4, 0x43, + // Bytes b00 - b3f + 0xE5, 0xB9, 0xBA, 0x43, 0xE5, 0xB9, 0xBC, 0x43, + 0xE5, 0xB9, 0xBF, 0x43, 0xE5, 0xBA, 0xA6, 0x43, + 0xE5, 0xBA, 0xB0, 0x43, 0xE5, 0xBA, 0xB3, 0x43, + 0xE5, 0xBA, 0xB6, 0x43, 0xE5, 0xBB, 0x89, 0x43, + 0xE5, 0xBB, 0x8A, 0x43, 0xE5, 0xBB, 0x92, 0x43, + 0xE5, 0xBB, 0x93, 0x43, 0xE5, 0xBB, 0x99, 0x43, + 0xE5, 0xBB, 0xAC, 0x43, 0xE5, 0xBB, 0xB4, 0x43, + 0xE5, 0xBB, 0xBE, 0x43, 0xE5, 0xBC, 0x84, 0x43, + // Bytes b40 - b7f + 0xE5, 0xBC, 0x8B, 0x43, 0xE5, 0xBC, 0x93, 0x43, + 0xE5, 0xBC, 0xA2, 0x43, 0xE5, 0xBD, 0x90, 0x43, + 0xE5, 0xBD, 0x93, 0x43, 0xE5, 0xBD, 0xA1, 0x43, + 0xE5, 0xBD, 0xA2, 0x43, 0xE5, 0xBD, 0xA9, 0x43, + 0xE5, 0xBD, 0xAB, 0x43, 0xE5, 0xBD, 0xB3, 0x43, + 0xE5, 0xBE, 0x8B, 0x43, 0xE5, 0xBE, 0x8C, 0x43, + 0xE5, 0xBE, 0x97, 0x43, 0xE5, 0xBE, 0x9A, 0x43, + 0xE5, 0xBE, 0xA9, 0x43, 0xE5, 0xBE, 0xAD, 0x43, + // Bytes b80 - bbf + 0xE5, 0xBF, 0x83, 0x43, 0xE5, 0xBF, 0x8D, 0x43, + 0xE5, 0xBF, 0x97, 0x43, 0xE5, 0xBF, 0xB5, 0x43, + 0xE5, 0xBF, 0xB9, 0x43, 0xE6, 0x80, 0x92, 0x43, + 0xE6, 0x80, 0x9C, 0x43, 0xE6, 0x81, 0xB5, 0x43, + 0xE6, 0x82, 0x81, 0x43, 0xE6, 0x82, 0x94, 0x43, + 0xE6, 0x83, 0x87, 0x43, 0xE6, 0x83, 0x98, 0x43, + 0xE6, 0x83, 0xA1, 0x43, 0xE6, 0x84, 0x88, 0x43, + 0xE6, 0x85, 0x84, 0x43, 0xE6, 0x85, 0x88, 0x43, + // Bytes bc0 - bff + 0xE6, 0x85, 0x8C, 0x43, 0xE6, 0x85, 0x8E, 0x43, + 0xE6, 0x85, 0xA0, 0x43, 0xE6, 0x85, 0xA8, 0x43, + 0xE6, 0x85, 0xBA, 0x43, 0xE6, 0x86, 0x8E, 0x43, + 0xE6, 0x86, 0x90, 0x43, 0xE6, 0x86, 0xA4, 0x43, + 0xE6, 0x86, 0xAF, 0x43, 0xE6, 0x86, 0xB2, 0x43, + 0xE6, 0x87, 0x9E, 0x43, 0xE6, 0x87, 0xB2, 0x43, + 0xE6, 0x87, 0xB6, 0x43, 0xE6, 0x88, 0x80, 0x43, + 0xE6, 0x88, 0x88, 0x43, 0xE6, 0x88, 0x90, 0x43, + // Bytes c00 - c3f + 0xE6, 0x88, 0x9B, 0x43, 0xE6, 0x88, 0xAE, 0x43, + 0xE6, 0x88, 0xB4, 0x43, 0xE6, 0x88, 0xB6, 0x43, + 0xE6, 0x89, 0x8B, 0x43, 0xE6, 0x89, 0x93, 0x43, + 0xE6, 0x89, 0x9D, 0x43, 0xE6, 0x8A, 0x95, 0x43, + 0xE6, 0x8A, 0xB1, 0x43, 0xE6, 0x8B, 0x89, 0x43, + 0xE6, 0x8B, 0x8F, 0x43, 0xE6, 0x8B, 0x93, 0x43, + 0xE6, 0x8B, 0x94, 0x43, 0xE6, 0x8B, 0xBC, 0x43, + 0xE6, 0x8B, 0xBE, 0x43, 0xE6, 0x8C, 0x87, 0x43, + // Bytes c40 - c7f + 0xE6, 0x8C, 0xBD, 0x43, 0xE6, 0x8D, 0x90, 0x43, + 0xE6, 0x8D, 0x95, 0x43, 0xE6, 0x8D, 0xA8, 0x43, + 0xE6, 0x8D, 0xBB, 0x43, 0xE6, 0x8E, 0x83, 0x43, + 0xE6, 0x8E, 0xA0, 0x43, 0xE6, 0x8E, 0xA9, 0x43, + 0xE6, 0x8F, 0x84, 0x43, 0xE6, 0x8F, 0x85, 0x43, + 0xE6, 0x8F, 0xA4, 0x43, 0xE6, 0x90, 0x9C, 0x43, + 0xE6, 0x90, 0xA2, 0x43, 0xE6, 0x91, 0x92, 0x43, + 0xE6, 0x91, 0xA9, 0x43, 0xE6, 0x91, 0xB7, 0x43, + // Bytes c80 - cbf + 0xE6, 0x91, 0xBE, 0x43, 0xE6, 0x92, 0x9A, 0x43, + 0xE6, 0x92, 0x9D, 0x43, 0xE6, 0x93, 0x84, 0x43, + 0xE6, 0x94, 0xAF, 0x43, 0xE6, 0x94, 0xB4, 0x43, + 0xE6, 0x95, 0x8F, 0x43, 0xE6, 0x95, 0x96, 0x43, + 0xE6, 0x95, 0xAC, 0x43, 0xE6, 0x95, 0xB8, 0x43, + 0xE6, 0x96, 0x87, 0x43, 0xE6, 0x96, 0x97, 0x43, + 0xE6, 0x96, 0x99, 0x43, 0xE6, 0x96, 0xA4, 0x43, + 0xE6, 0x96, 0xB0, 0x43, 0xE6, 0x96, 0xB9, 0x43, + // Bytes cc0 - cff + 0xE6, 0x97, 0x85, 0x43, 0xE6, 0x97, 0xA0, 0x43, + 0xE6, 0x97, 0xA2, 0x43, 0xE6, 0x97, 0xA3, 0x43, + 0xE6, 0x97, 0xA5, 0x43, 0xE6, 0x98, 0x93, 0x43, + 0xE6, 0x98, 0xA0, 0x43, 0xE6, 0x99, 0x89, 0x43, + 0xE6, 0x99, 0xB4, 0x43, 0xE6, 0x9A, 0x88, 0x43, + 0xE6, 0x9A, 0x91, 0x43, 0xE6, 0x9A, 0x9C, 0x43, + 0xE6, 0x9A, 0xB4, 0x43, 0xE6, 0x9B, 0x86, 0x43, + 0xE6, 0x9B, 0xB0, 0x43, 0xE6, 0x9B, 0xB4, 0x43, + // Bytes d00 - d3f + 0xE6, 0x9B, 0xB8, 0x43, 0xE6, 0x9C, 0x80, 0x43, + 0xE6, 0x9C, 0x88, 0x43, 0xE6, 0x9C, 0x89, 0x43, + 0xE6, 0x9C, 0x97, 0x43, 0xE6, 0x9C, 0x9B, 0x43, + 0xE6, 0x9C, 0xA1, 0x43, 0xE6, 0x9C, 0xA8, 0x43, + 0xE6, 0x9D, 0x8E, 0x43, 0xE6, 0x9D, 0x93, 0x43, + 0xE6, 0x9D, 0x96, 0x43, 0xE6, 0x9D, 0x9E, 0x43, + 0xE6, 0x9D, 0xBB, 0x43, 0xE6, 0x9E, 0x85, 0x43, + 0xE6, 0x9E, 0x97, 0x43, 0xE6, 0x9F, 0xB3, 0x43, + // Bytes d40 - d7f + 0xE6, 0x9F, 0xBA, 0x43, 0xE6, 0xA0, 0x97, 0x43, + 0xE6, 0xA0, 0x9F, 0x43, 0xE6, 0xA0, 0xAA, 0x43, + 0xE6, 0xA1, 0x92, 0x43, 0xE6, 0xA2, 0x81, 0x43, + 0xE6, 0xA2, 0x85, 0x43, 0xE6, 0xA2, 0x8E, 0x43, + 0xE6, 0xA2, 0xA8, 0x43, 0xE6, 0xA4, 0x94, 0x43, + 0xE6, 0xA5, 0x82, 0x43, 0xE6, 0xA6, 0xA3, 0x43, + 0xE6, 0xA7, 0xAA, 0x43, 0xE6, 0xA8, 0x82, 0x43, + 0xE6, 0xA8, 0x93, 0x43, 0xE6, 0xAA, 0xA8, 0x43, + // Bytes d80 - dbf + 0xE6, 0xAB, 0x93, 0x43, 0xE6, 0xAB, 0x9B, 0x43, + 0xE6, 0xAC, 0x84, 0x43, 0xE6, 0xAC, 0xA0, 0x43, + 0xE6, 0xAC, 0xA1, 0x43, 0xE6, 0xAD, 0x94, 0x43, + 0xE6, 0xAD, 0xA2, 0x43, 0xE6, 0xAD, 0xA3, 0x43, + 0xE6, 0xAD, 0xB2, 0x43, 0xE6, 0xAD, 0xB7, 0x43, + 0xE6, 0xAD, 0xB9, 0x43, 0xE6, 0xAE, 0x9F, 0x43, + 0xE6, 0xAE, 0xAE, 0x43, 0xE6, 0xAE, 0xB3, 0x43, + 0xE6, 0xAE, 0xBA, 0x43, 0xE6, 0xAE, 0xBB, 0x43, + // Bytes dc0 - dff + 0xE6, 0xAF, 0x8B, 0x43, 0xE6, 0xAF, 0x8D, 0x43, + 0xE6, 0xAF, 0x94, 0x43, 0xE6, 0xAF, 0x9B, 0x43, + 0xE6, 0xB0, 0x8F, 0x43, 0xE6, 0xB0, 0x94, 0x43, + 0xE6, 0xB0, 0xB4, 0x43, 0xE6, 0xB1, 0x8E, 0x43, + 0xE6, 0xB1, 0xA7, 0x43, 0xE6, 0xB2, 0x88, 0x43, + 0xE6, 0xB2, 0xBF, 0x43, 0xE6, 0xB3, 0x8C, 0x43, + 0xE6, 0xB3, 0x8D, 0x43, 0xE6, 0xB3, 0xA5, 0x43, + 0xE6, 0xB3, 0xA8, 0x43, 0xE6, 0xB4, 0x96, 0x43, + // Bytes e00 - e3f + 0xE6, 0xB4, 0x9B, 0x43, 0xE6, 0xB4, 0x9E, 0x43, + 0xE6, 0xB4, 0xB4, 0x43, 0xE6, 0xB4, 0xBE, 0x43, + 0xE6, 0xB5, 0x81, 0x43, 0xE6, 0xB5, 0xA9, 0x43, + 0xE6, 0xB5, 0xAA, 0x43, 0xE6, 0xB5, 0xB7, 0x43, + 0xE6, 0xB5, 0xB8, 0x43, 0xE6, 0xB6, 0x85, 0x43, + 0xE6, 0xB7, 0x8B, 0x43, 0xE6, 0xB7, 0x9A, 0x43, + 0xE6, 0xB7, 0xAA, 0x43, 0xE6, 0xB7, 0xB9, 0x43, + 0xE6, 0xB8, 0x9A, 0x43, 0xE6, 0xB8, 0xAF, 0x43, + // Bytes e40 - e7f + 0xE6, 0xB9, 0xAE, 0x43, 0xE6, 0xBA, 0x80, 0x43, + 0xE6, 0xBA, 0x9C, 0x43, 0xE6, 0xBA, 0xBA, 0x43, + 0xE6, 0xBB, 0x87, 0x43, 0xE6, 0xBB, 0x8B, 0x43, + 0xE6, 0xBB, 0x91, 0x43, 0xE6, 0xBB, 0x9B, 0x43, + 0xE6, 0xBC, 0x8F, 0x43, 0xE6, 0xBC, 0x94, 0x43, + 0xE6, 0xBC, 0xA2, 0x43, 0xE6, 0xBC, 0xA3, 0x43, + 0xE6, 0xBD, 0xAE, 0x43, 0xE6, 0xBF, 0x86, 0x43, + 0xE6, 0xBF, 0xAB, 0x43, 0xE6, 0xBF, 0xBE, 0x43, + // Bytes e80 - ebf + 0xE7, 0x80, 0x9B, 0x43, 0xE7, 0x80, 0x9E, 0x43, + 0xE7, 0x80, 0xB9, 0x43, 0xE7, 0x81, 0x8A, 0x43, + 0xE7, 0x81, 0xAB, 0x43, 0xE7, 0x81, 0xB0, 0x43, + 0xE7, 0x81, 0xB7, 0x43, 0xE7, 0x81, 0xBD, 0x43, + 0xE7, 0x82, 0x99, 0x43, 0xE7, 0x82, 0xAD, 0x43, + 0xE7, 0x83, 0x88, 0x43, 0xE7, 0x83, 0x99, 0x43, + 0xE7, 0x84, 0xA1, 0x43, 0xE7, 0x85, 0x85, 0x43, + 0xE7, 0x85, 0x89, 0x43, 0xE7, 0x85, 0xAE, 0x43, + // Bytes ec0 - eff + 0xE7, 0x86, 0x9C, 0x43, 0xE7, 0x87, 0x8E, 0x43, + 0xE7, 0x87, 0x90, 0x43, 0xE7, 0x88, 0x90, 0x43, + 0xE7, 0x88, 0x9B, 0x43, 0xE7, 0x88, 0xA8, 0x43, + 0xE7, 0x88, 0xAA, 0x43, 0xE7, 0x88, 0xAB, 0x43, + 0xE7, 0x88, 0xB5, 0x43, 0xE7, 0x88, 0xB6, 0x43, + 0xE7, 0x88, 0xBB, 0x43, 0xE7, 0x88, 0xBF, 0x43, + 0xE7, 0x89, 0x87, 0x43, 0xE7, 0x89, 0x90, 0x43, + 0xE7, 0x89, 0x99, 0x43, 0xE7, 0x89, 0x9B, 0x43, + // Bytes f00 - f3f + 0xE7, 0x89, 0xA2, 0x43, 0xE7, 0x89, 0xB9, 0x43, + 0xE7, 0x8A, 0x80, 0x43, 0xE7, 0x8A, 0x95, 0x43, + 0xE7, 0x8A, 0xAC, 0x43, 0xE7, 0x8A, 0xAF, 0x43, + 0xE7, 0x8B, 0x80, 0x43, 0xE7, 0x8B, 0xBC, 0x43, + 0xE7, 0x8C, 0xAA, 0x43, 0xE7, 0x8D, 0xB5, 0x43, + 0xE7, 0x8D, 0xBA, 0x43, 0xE7, 0x8E, 0x84, 0x43, + 0xE7, 0x8E, 0x87, 0x43, 0xE7, 0x8E, 0x89, 0x43, + 0xE7, 0x8E, 0x8B, 0x43, 0xE7, 0x8E, 0xA5, 0x43, + // Bytes f40 - f7f + 0xE7, 0x8E, 0xB2, 0x43, 0xE7, 0x8F, 0x9E, 0x43, + 0xE7, 0x90, 0x86, 0x43, 0xE7, 0x90, 0x89, 0x43, + 0xE7, 0x90, 0xA2, 0x43, 0xE7, 0x91, 0x87, 0x43, + 0xE7, 0x91, 0x9C, 0x43, 0xE7, 0x91, 0xA9, 0x43, + 0xE7, 0x91, 0xB1, 0x43, 0xE7, 0x92, 0x85, 0x43, + 0xE7, 0x92, 0x89, 0x43, 0xE7, 0x92, 0x98, 0x43, + 0xE7, 0x93, 0x8A, 0x43, 0xE7, 0x93, 0x9C, 0x43, + 0xE7, 0x93, 0xA6, 0x43, 0xE7, 0x94, 0x86, 0x43, + // Bytes f80 - fbf + 0xE7, 0x94, 0x98, 0x43, 0xE7, 0x94, 0x9F, 0x43, + 0xE7, 0x94, 0xA4, 0x43, 0xE7, 0x94, 0xA8, 0x43, + 0xE7, 0x94, 0xB0, 0x43, 0xE7, 0x94, 0xB2, 0x43, + 0xE7, 0x94, 0xB3, 0x43, 0xE7, 0x94, 0xB7, 0x43, + 0xE7, 0x94, 0xBB, 0x43, 0xE7, 0x94, 0xBE, 0x43, + 0xE7, 0x95, 0x99, 0x43, 0xE7, 0x95, 0xA5, 0x43, + 0xE7, 0x95, 0xB0, 0x43, 0xE7, 0x96, 0x8B, 0x43, + 0xE7, 0x96, 0x92, 0x43, 0xE7, 0x97, 0xA2, 0x43, + // Bytes fc0 - fff + 0xE7, 0x98, 0x90, 0x43, 0xE7, 0x98, 0x9D, 0x43, + 0xE7, 0x98, 0x9F, 0x43, 0xE7, 0x99, 0x82, 0x43, + 0xE7, 0x99, 0xA9, 0x43, 0xE7, 0x99, 0xB6, 0x43, + 0xE7, 0x99, 0xBD, 0x43, 0xE7, 0x9A, 0xAE, 0x43, + 0xE7, 0x9A, 0xBF, 0x43, 0xE7, 0x9B, 0x8A, 0x43, + 0xE7, 0x9B, 0x9B, 0x43, 0xE7, 0x9B, 0xA3, 0x43, + 0xE7, 0x9B, 0xA7, 0x43, 0xE7, 0x9B, 0xAE, 0x43, + 0xE7, 0x9B, 0xB4, 0x43, 0xE7, 0x9C, 0x81, 0x43, + // Bytes 1000 - 103f + 0xE7, 0x9C, 0x9E, 0x43, 0xE7, 0x9C, 0x9F, 0x43, + 0xE7, 0x9D, 0x80, 0x43, 0xE7, 0x9D, 0x8A, 0x43, + 0xE7, 0x9E, 0x8B, 0x43, 0xE7, 0x9E, 0xA7, 0x43, + 0xE7, 0x9F, 0x9B, 0x43, 0xE7, 0x9F, 0xA2, 0x43, + 0xE7, 0x9F, 0xB3, 0x43, 0xE7, 0xA1, 0x8E, 0x43, + 0xE7, 0xA1, 0xAB, 0x43, 0xE7, 0xA2, 0x8C, 0x43, + 0xE7, 0xA2, 0x91, 0x43, 0xE7, 0xA3, 0x8A, 0x43, + 0xE7, 0xA3, 0x8C, 0x43, 0xE7, 0xA3, 0xBB, 0x43, + // Bytes 1040 - 107f + 0xE7, 0xA4, 0xAA, 0x43, 0xE7, 0xA4, 0xBA, 0x43, + 0xE7, 0xA4, 0xBC, 0x43, 0xE7, 0xA4, 0xBE, 0x43, + 0xE7, 0xA5, 0x88, 0x43, 0xE7, 0xA5, 0x89, 0x43, + 0xE7, 0xA5, 0x90, 0x43, 0xE7, 0xA5, 0x96, 0x43, + 0xE7, 0xA5, 0x9D, 0x43, 0xE7, 0xA5, 0x9E, 0x43, + 0xE7, 0xA5, 0xA5, 0x43, 0xE7, 0xA5, 0xBF, 0x43, + 0xE7, 0xA6, 0x81, 0x43, 0xE7, 0xA6, 0x8D, 0x43, + 0xE7, 0xA6, 0x8E, 0x43, 0xE7, 0xA6, 0x8F, 0x43, + // Bytes 1080 - 10bf + 0xE7, 0xA6, 0xAE, 0x43, 0xE7, 0xA6, 0xB8, 0x43, + 0xE7, 0xA6, 0xBE, 0x43, 0xE7, 0xA7, 0x8A, 0x43, + 0xE7, 0xA7, 0x98, 0x43, 0xE7, 0xA7, 0xAB, 0x43, + 0xE7, 0xA8, 0x9C, 0x43, 0xE7, 0xA9, 0x80, 0x43, + 0xE7, 0xA9, 0x8A, 0x43, 0xE7, 0xA9, 0x8F, 0x43, + 0xE7, 0xA9, 0xB4, 0x43, 0xE7, 0xA9, 0xBA, 0x43, + 0xE7, 0xAA, 0x81, 0x43, 0xE7, 0xAA, 0xB1, 0x43, + 0xE7, 0xAB, 0x8B, 0x43, 0xE7, 0xAB, 0xAE, 0x43, + // Bytes 10c0 - 10ff + 0xE7, 0xAB, 0xB9, 0x43, 0xE7, 0xAC, 0xA0, 0x43, + 0xE7, 0xAE, 0x8F, 0x43, 0xE7, 0xAF, 0x80, 0x43, + 0xE7, 0xAF, 0x86, 0x43, 0xE7, 0xAF, 0x89, 0x43, + 0xE7, 0xB0, 0xBE, 0x43, 0xE7, 0xB1, 0xA0, 0x43, + 0xE7, 0xB1, 0xB3, 0x43, 0xE7, 0xB1, 0xBB, 0x43, + 0xE7, 0xB2, 0x92, 0x43, 0xE7, 0xB2, 0xBE, 0x43, + 0xE7, 0xB3, 0x92, 0x43, 0xE7, 0xB3, 0x96, 0x43, + 0xE7, 0xB3, 0xA3, 0x43, 0xE7, 0xB3, 0xA7, 0x43, + // Bytes 1100 - 113f + 0xE7, 0xB3, 0xA8, 0x43, 0xE7, 0xB3, 0xB8, 0x43, + 0xE7, 0xB4, 0x80, 0x43, 0xE7, 0xB4, 0x90, 0x43, + 0xE7, 0xB4, 0xA2, 0x43, 0xE7, 0xB4, 0xAF, 0x43, + 0xE7, 0xB5, 0x82, 0x43, 0xE7, 0xB5, 0x9B, 0x43, + 0xE7, 0xB5, 0xA3, 0x43, 0xE7, 0xB6, 0xA0, 0x43, + 0xE7, 0xB6, 0xBE, 0x43, 0xE7, 0xB7, 0x87, 0x43, + 0xE7, 0xB7, 0xB4, 0x43, 0xE7, 0xB8, 0x82, 0x43, + 0xE7, 0xB8, 0x89, 0x43, 0xE7, 0xB8, 0xB7, 0x43, + // Bytes 1140 - 117f + 0xE7, 0xB9, 0x81, 0x43, 0xE7, 0xB9, 0x85, 0x43, + 0xE7, 0xBC, 0xB6, 0x43, 0xE7, 0xBC, 0xBE, 0x43, + 0xE7, 0xBD, 0x91, 0x43, 0xE7, 0xBD, 0xB2, 0x43, + 0xE7, 0xBD, 0xB9, 0x43, 0xE7, 0xBD, 0xBA, 0x43, + 0xE7, 0xBE, 0x85, 0x43, 0xE7, 0xBE, 0x8A, 0x43, + 0xE7, 0xBE, 0x95, 0x43, 0xE7, 0xBE, 0x9A, 0x43, + 0xE7, 0xBE, 0xBD, 0x43, 0xE7, 0xBF, 0xBA, 0x43, + 0xE8, 0x80, 0x81, 0x43, 0xE8, 0x80, 0x85, 0x43, + // Bytes 1180 - 11bf + 0xE8, 0x80, 0x8C, 0x43, 0xE8, 0x80, 0x92, 0x43, + 0xE8, 0x80, 0xB3, 0x43, 0xE8, 0x81, 0x86, 0x43, + 0xE8, 0x81, 0xA0, 0x43, 0xE8, 0x81, 0xAF, 0x43, + 0xE8, 0x81, 0xB0, 0x43, 0xE8, 0x81, 0xBE, 0x43, + 0xE8, 0x81, 0xBF, 0x43, 0xE8, 0x82, 0x89, 0x43, + 0xE8, 0x82, 0x8B, 0x43, 0xE8, 0x82, 0xAD, 0x43, + 0xE8, 0x82, 0xB2, 0x43, 0xE8, 0x84, 0x83, 0x43, + 0xE8, 0x84, 0xBE, 0x43, 0xE8, 0x87, 0x98, 0x43, + // Bytes 11c0 - 11ff + 0xE8, 0x87, 0xA3, 0x43, 0xE8, 0x87, 0xA8, 0x43, + 0xE8, 0x87, 0xAA, 0x43, 0xE8, 0x87, 0xAD, 0x43, + 0xE8, 0x87, 0xB3, 0x43, 0xE8, 0x87, 0xBC, 0x43, + 0xE8, 0x88, 0x81, 0x43, 0xE8, 0x88, 0x84, 0x43, + 0xE8, 0x88, 0x8C, 0x43, 0xE8, 0x88, 0x98, 0x43, + 0xE8, 0x88, 0x9B, 0x43, 0xE8, 0x88, 0x9F, 0x43, + 0xE8, 0x89, 0xAE, 0x43, 0xE8, 0x89, 0xAF, 0x43, + 0xE8, 0x89, 0xB2, 0x43, 0xE8, 0x89, 0xB8, 0x43, + // Bytes 1200 - 123f + 0xE8, 0x89, 0xB9, 0x43, 0xE8, 0x8A, 0x8B, 0x43, + 0xE8, 0x8A, 0x91, 0x43, 0xE8, 0x8A, 0x9D, 0x43, + 0xE8, 0x8A, 0xB1, 0x43, 0xE8, 0x8A, 0xB3, 0x43, + 0xE8, 0x8A, 0xBD, 0x43, 0xE8, 0x8B, 0xA5, 0x43, + 0xE8, 0x8B, 0xA6, 0x43, 0xE8, 0x8C, 0x9D, 0x43, + 0xE8, 0x8C, 0xA3, 0x43, 0xE8, 0x8C, 0xB6, 0x43, + 0xE8, 0x8D, 0x92, 0x43, 0xE8, 0x8D, 0x93, 0x43, + 0xE8, 0x8D, 0xA3, 0x43, 0xE8, 0x8E, 0xAD, 0x43, + // Bytes 1240 - 127f + 0xE8, 0x8E, 0xBD, 0x43, 0xE8, 0x8F, 0x89, 0x43, + 0xE8, 0x8F, 0x8A, 0x43, 0xE8, 0x8F, 0x8C, 0x43, + 0xE8, 0x8F, 0x9C, 0x43, 0xE8, 0x8F, 0xA7, 0x43, + 0xE8, 0x8F, 0xAF, 0x43, 0xE8, 0x8F, 0xB1, 0x43, + 0xE8, 0x90, 0xBD, 0x43, 0xE8, 0x91, 0x89, 0x43, + 0xE8, 0x91, 0x97, 0x43, 0xE8, 0x93, 0xAE, 0x43, + 0xE8, 0x93, 0xB1, 0x43, 0xE8, 0x93, 0xB3, 0x43, + 0xE8, 0x93, 0xBC, 0x43, 0xE8, 0x94, 0x96, 0x43, + // Bytes 1280 - 12bf + 0xE8, 0x95, 0xA4, 0x43, 0xE8, 0x97, 0x8D, 0x43, + 0xE8, 0x97, 0xBA, 0x43, 0xE8, 0x98, 0x86, 0x43, + 0xE8, 0x98, 0x92, 0x43, 0xE8, 0x98, 0xAD, 0x43, + 0xE8, 0x98, 0xBF, 0x43, 0xE8, 0x99, 0x8D, 0x43, + 0xE8, 0x99, 0x90, 0x43, 0xE8, 0x99, 0x9C, 0x43, + 0xE8, 0x99, 0xA7, 0x43, 0xE8, 0x99, 0xA9, 0x43, + 0xE8, 0x99, 0xAB, 0x43, 0xE8, 0x9A, 0x88, 0x43, + 0xE8, 0x9A, 0xA9, 0x43, 0xE8, 0x9B, 0xA2, 0x43, + // Bytes 12c0 - 12ff + 0xE8, 0x9C, 0x8E, 0x43, 0xE8, 0x9C, 0xA8, 0x43, + 0xE8, 0x9D, 0xAB, 0x43, 0xE8, 0x9D, 0xB9, 0x43, + 0xE8, 0x9E, 0x86, 0x43, 0xE8, 0x9E, 0xBA, 0x43, + 0xE8, 0x9F, 0xA1, 0x43, 0xE8, 0xA0, 0x81, 0x43, + 0xE8, 0xA0, 0x9F, 0x43, 0xE8, 0xA1, 0x80, 0x43, + 0xE8, 0xA1, 0x8C, 0x43, 0xE8, 0xA1, 0xA0, 0x43, + 0xE8, 0xA1, 0xA3, 0x43, 0xE8, 0xA3, 0x82, 0x43, + 0xE8, 0xA3, 0x8F, 0x43, 0xE8, 0xA3, 0x97, 0x43, + // Bytes 1300 - 133f + 0xE8, 0xA3, 0x9E, 0x43, 0xE8, 0xA3, 0xA1, 0x43, + 0xE8, 0xA3, 0xB8, 0x43, 0xE8, 0xA3, 0xBA, 0x43, + 0xE8, 0xA4, 0x90, 0x43, 0xE8, 0xA5, 0x81, 0x43, + 0xE8, 0xA5, 0xA4, 0x43, 0xE8, 0xA5, 0xBE, 0x43, + 0xE8, 0xA6, 0x86, 0x43, 0xE8, 0xA6, 0x8B, 0x43, + 0xE8, 0xA6, 0x96, 0x43, 0xE8, 0xA7, 0x92, 0x43, + 0xE8, 0xA7, 0xA3, 0x43, 0xE8, 0xA8, 0x80, 0x43, + 0xE8, 0xAA, 0xA0, 0x43, 0xE8, 0xAA, 0xAA, 0x43, + // Bytes 1340 - 137f + 0xE8, 0xAA, 0xBF, 0x43, 0xE8, 0xAB, 0x8B, 0x43, + 0xE8, 0xAB, 0x92, 0x43, 0xE8, 0xAB, 0x96, 0x43, + 0xE8, 0xAB, 0xAD, 0x43, 0xE8, 0xAB, 0xB8, 0x43, + 0xE8, 0xAB, 0xBE, 0x43, 0xE8, 0xAC, 0x81, 0x43, + 0xE8, 0xAC, 0xB9, 0x43, 0xE8, 0xAD, 0x98, 0x43, + 0xE8, 0xAE, 0x80, 0x43, 0xE8, 0xAE, 0x8A, 0x43, + 0xE8, 0xB0, 0xB7, 0x43, 0xE8, 0xB1, 0x86, 0x43, + 0xE8, 0xB1, 0x88, 0x43, 0xE8, 0xB1, 0x95, 0x43, + // Bytes 1380 - 13bf + 0xE8, 0xB1, 0xB8, 0x43, 0xE8, 0xB2, 0x9D, 0x43, + 0xE8, 0xB2, 0xA1, 0x43, 0xE8, 0xB2, 0xA9, 0x43, + 0xE8, 0xB2, 0xAB, 0x43, 0xE8, 0xB3, 0x81, 0x43, + 0xE8, 0xB3, 0x82, 0x43, 0xE8, 0xB3, 0x87, 0x43, + 0xE8, 0xB3, 0x88, 0x43, 0xE8, 0xB3, 0x93, 0x43, + 0xE8, 0xB4, 0x88, 0x43, 0xE8, 0xB4, 0x9B, 0x43, + 0xE8, 0xB5, 0xA4, 0x43, 0xE8, 0xB5, 0xB0, 0x43, + 0xE8, 0xB5, 0xB7, 0x43, 0xE8, 0xB6, 0xB3, 0x43, + // Bytes 13c0 - 13ff + 0xE8, 0xB6, 0xBC, 0x43, 0xE8, 0xB7, 0x8B, 0x43, + 0xE8, 0xB7, 0xAF, 0x43, 0xE8, 0xB7, 0xB0, 0x43, + 0xE8, 0xBA, 0xAB, 0x43, 0xE8, 0xBB, 0x8A, 0x43, + 0xE8, 0xBB, 0x94, 0x43, 0xE8, 0xBC, 0xA6, 0x43, + 0xE8, 0xBC, 0xAA, 0x43, 0xE8, 0xBC, 0xB8, 0x43, + 0xE8, 0xBC, 0xBB, 0x43, 0xE8, 0xBD, 0xA2, 0x43, + 0xE8, 0xBE, 0x9B, 0x43, 0xE8, 0xBE, 0x9E, 0x43, + 0xE8, 0xBE, 0xB0, 0x43, 0xE8, 0xBE, 0xB5, 0x43, + // Bytes 1400 - 143f + 0xE8, 0xBE, 0xB6, 0x43, 0xE9, 0x80, 0xA3, 0x43, + 0xE9, 0x80, 0xB8, 0x43, 0xE9, 0x81, 0x8A, 0x43, + 0xE9, 0x81, 0xA9, 0x43, 0xE9, 0x81, 0xB2, 0x43, + 0xE9, 0x81, 0xBC, 0x43, 0xE9, 0x82, 0x8F, 0x43, + 0xE9, 0x82, 0x91, 0x43, 0xE9, 0x82, 0x94, 0x43, + 0xE9, 0x83, 0x8E, 0x43, 0xE9, 0x83, 0x9E, 0x43, + 0xE9, 0x83, 0xB1, 0x43, 0xE9, 0x83, 0xBD, 0x43, + 0xE9, 0x84, 0x91, 0x43, 0xE9, 0x84, 0x9B, 0x43, + // Bytes 1440 - 147f + 0xE9, 0x85, 0x89, 0x43, 0xE9, 0x85, 0x8D, 0x43, + 0xE9, 0x85, 0xAA, 0x43, 0xE9, 0x86, 0x99, 0x43, + 0xE9, 0x86, 0xB4, 0x43, 0xE9, 0x87, 0x86, 0x43, + 0xE9, 0x87, 0x8C, 0x43, 0xE9, 0x87, 0x8F, 0x43, + 0xE9, 0x87, 0x91, 0x43, 0xE9, 0x88, 0xB4, 0x43, + 0xE9, 0x88, 0xB8, 0x43, 0xE9, 0x89, 0xB6, 0x43, + 0xE9, 0x89, 0xBC, 0x43, 0xE9, 0x8B, 0x97, 0x43, + 0xE9, 0x8B, 0x98, 0x43, 0xE9, 0x8C, 0x84, 0x43, + // Bytes 1480 - 14bf + 0xE9, 0x8D, 0x8A, 0x43, 0xE9, 0x8F, 0xB9, 0x43, + 0xE9, 0x90, 0x95, 0x43, 0xE9, 0x95, 0xB7, 0x43, + 0xE9, 0x96, 0x80, 0x43, 0xE9, 0x96, 0x8B, 0x43, + 0xE9, 0x96, 0xAD, 0x43, 0xE9, 0x96, 0xB7, 0x43, + 0xE9, 0x98, 0x9C, 0x43, 0xE9, 0x98, 0xAE, 0x43, + 0xE9, 0x99, 0x8B, 0x43, 0xE9, 0x99, 0x8D, 0x43, + 0xE9, 0x99, 0xB5, 0x43, 0xE9, 0x99, 0xB8, 0x43, + 0xE9, 0x99, 0xBC, 0x43, 0xE9, 0x9A, 0x86, 0x43, + // Bytes 14c0 - 14ff + 0xE9, 0x9A, 0xA3, 0x43, 0xE9, 0x9A, 0xB6, 0x43, + 0xE9, 0x9A, 0xB7, 0x43, 0xE9, 0x9A, 0xB8, 0x43, + 0xE9, 0x9A, 0xB9, 0x43, 0xE9, 0x9B, 0x83, 0x43, + 0xE9, 0x9B, 0xA2, 0x43, 0xE9, 0x9B, 0xA3, 0x43, + 0xE9, 0x9B, 0xA8, 0x43, 0xE9, 0x9B, 0xB6, 0x43, + 0xE9, 0x9B, 0xB7, 0x43, 0xE9, 0x9C, 0xA3, 0x43, + 0xE9, 0x9C, 0xB2, 0x43, 0xE9, 0x9D, 0x88, 0x43, + 0xE9, 0x9D, 0x91, 0x43, 0xE9, 0x9D, 0x96, 0x43, + // Bytes 1500 - 153f + 0xE9, 0x9D, 0x9E, 0x43, 0xE9, 0x9D, 0xA2, 0x43, + 0xE9, 0x9D, 0xA9, 0x43, 0xE9, 0x9F, 0x8B, 0x43, + 0xE9, 0x9F, 0x9B, 0x43, 0xE9, 0x9F, 0xA0, 0x43, + 0xE9, 0x9F, 0xAD, 0x43, 0xE9, 0x9F, 0xB3, 0x43, + 0xE9, 0x9F, 0xBF, 0x43, 0xE9, 0xA0, 0x81, 0x43, + 0xE9, 0xA0, 0x85, 0x43, 0xE9, 0xA0, 0x8B, 0x43, + 0xE9, 0xA0, 0x98, 0x43, 0xE9, 0xA0, 0xA9, 0x43, + 0xE9, 0xA0, 0xBB, 0x43, 0xE9, 0xA1, 0x9E, 0x43, + // Bytes 1540 - 157f + 0xE9, 0xA2, 0xA8, 0x43, 0xE9, 0xA3, 0x9B, 0x43, + 0xE9, 0xA3, 0x9F, 0x43, 0xE9, 0xA3, 0xA2, 0x43, + 0xE9, 0xA3, 0xAF, 0x43, 0xE9, 0xA3, 0xBC, 0x43, + 0xE9, 0xA4, 0xA8, 0x43, 0xE9, 0xA4, 0xA9, 0x43, + 0xE9, 0xA6, 0x96, 0x43, 0xE9, 0xA6, 0x99, 0x43, + 0xE9, 0xA6, 0xA7, 0x43, 0xE9, 0xA6, 0xAC, 0x43, + 0xE9, 0xA7, 0x82, 0x43, 0xE9, 0xA7, 0xB1, 0x43, + 0xE9, 0xA7, 0xBE, 0x43, 0xE9, 0xA9, 0xAA, 0x43, + // Bytes 1580 - 15bf + 0xE9, 0xAA, 0xA8, 0x43, 0xE9, 0xAB, 0x98, 0x43, + 0xE9, 0xAB, 0x9F, 0x43, 0xE9, 0xAC, 0x92, 0x43, + 0xE9, 0xAC, 0xA5, 0x43, 0xE9, 0xAC, 0xAF, 0x43, + 0xE9, 0xAC, 0xB2, 0x43, 0xE9, 0xAC, 0xBC, 0x43, + 0xE9, 0xAD, 0x9A, 0x43, 0xE9, 0xAD, 0xAF, 0x43, + 0xE9, 0xB1, 0x80, 0x43, 0xE9, 0xB1, 0x97, 0x43, + 0xE9, 0xB3, 0xA5, 0x43, 0xE9, 0xB3, 0xBD, 0x43, + 0xE9, 0xB5, 0xA7, 0x43, 0xE9, 0xB6, 0xB4, 0x43, + // Bytes 15c0 - 15ff + 0xE9, 0xB7, 0xBA, 0x43, 0xE9, 0xB8, 0x9E, 0x43, + 0xE9, 0xB9, 0xB5, 0x43, 0xE9, 0xB9, 0xBF, 0x43, + 0xE9, 0xBA, 0x97, 0x43, 0xE9, 0xBA, 0x9F, 0x43, + 0xE9, 0xBA, 0xA5, 0x43, 0xE9, 0xBA, 0xBB, 0x43, + 0xE9, 0xBB, 0x83, 0x43, 0xE9, 0xBB, 0x8D, 0x43, + 0xE9, 0xBB, 0x8E, 0x43, 0xE9, 0xBB, 0x91, 0x43, + 0xE9, 0xBB, 0xB9, 0x43, 0xE9, 0xBB, 0xBD, 0x43, + 0xE9, 0xBB, 0xBE, 0x43, 0xE9, 0xBC, 0x85, 0x43, + // Bytes 1600 - 163f + 0xE9, 0xBC, 0x8E, 0x43, 0xE9, 0xBC, 0x8F, 0x43, + 0xE9, 0xBC, 0x93, 0x43, 0xE9, 0xBC, 0x96, 0x43, + 0xE9, 0xBC, 0xA0, 0x43, 0xE9, 0xBC, 0xBB, 0x43, + 0xE9, 0xBD, 0x83, 0x43, 0xE9, 0xBD, 0x8A, 0x43, + 0xE9, 0xBD, 0x92, 0x43, 0xE9, 0xBE, 0x8D, 0x43, + 0xE9, 0xBE, 0x8E, 0x43, 0xE9, 0xBE, 0x9C, 0x43, + 0xE9, 0xBE, 0x9F, 0x43, 0xE9, 0xBE, 0xA0, 0x43, + 0xEA, 0x9C, 0xA7, 0x43, 0xEA, 0x9D, 0xAF, 0x43, + // Bytes 1640 - 167f + 0xEA, 0xAC, 0xB7, 0x43, 0xEA, 0xAD, 0x92, 0x44, + 0xF0, 0xA0, 0x84, 0xA2, 0x44, 0xF0, 0xA0, 0x94, + 0x9C, 0x44, 0xF0, 0xA0, 0x94, 0xA5, 0x44, 0xF0, + 0xA0, 0x95, 0x8B, 0x44, 0xF0, 0xA0, 0x98, 0xBA, + 0x44, 0xF0, 0xA0, 0xA0, 0x84, 0x44, 0xF0, 0xA0, + 0xA3, 0x9E, 0x44, 0xF0, 0xA0, 0xA8, 0xAC, 0x44, + 0xF0, 0xA0, 0xAD, 0xA3, 0x44, 0xF0, 0xA1, 0x93, + 0xA4, 0x44, 0xF0, 0xA1, 0x9A, 0xA8, 0x44, 0xF0, + // Bytes 1680 - 16bf + 0xA1, 0x9B, 0xAA, 0x44, 0xF0, 0xA1, 0xA7, 0x88, + 0x44, 0xF0, 0xA1, 0xAC, 0x98, 0x44, 0xF0, 0xA1, + 0xB4, 0x8B, 0x44, 0xF0, 0xA1, 0xB7, 0xA4, 0x44, + 0xF0, 0xA1, 0xB7, 0xA6, 0x44, 0xF0, 0xA2, 0x86, + 0x83, 0x44, 0xF0, 0xA2, 0x86, 0x9F, 0x44, 0xF0, + 0xA2, 0x8C, 0xB1, 0x44, 0xF0, 0xA2, 0x9B, 0x94, + 0x44, 0xF0, 0xA2, 0xA1, 0x84, 0x44, 0xF0, 0xA2, + 0xA1, 0x8A, 0x44, 0xF0, 0xA2, 0xAC, 0x8C, 0x44, + // Bytes 16c0 - 16ff + 0xF0, 0xA2, 0xAF, 0xB1, 0x44, 0xF0, 0xA3, 0x80, + 0x8A, 0x44, 0xF0, 0xA3, 0x8A, 0xB8, 0x44, 0xF0, + 0xA3, 0x8D, 0x9F, 0x44, 0xF0, 0xA3, 0x8E, 0x93, + 0x44, 0xF0, 0xA3, 0x8E, 0x9C, 0x44, 0xF0, 0xA3, + 0x8F, 0x83, 0x44, 0xF0, 0xA3, 0x8F, 0x95, 0x44, + 0xF0, 0xA3, 0x91, 0xAD, 0x44, 0xF0, 0xA3, 0x9A, + 0xA3, 0x44, 0xF0, 0xA3, 0xA2, 0xA7, 0x44, 0xF0, + 0xA3, 0xAA, 0x8D, 0x44, 0xF0, 0xA3, 0xAB, 0xBA, + // Bytes 1700 - 173f + 0x44, 0xF0, 0xA3, 0xB2, 0xBC, 0x44, 0xF0, 0xA3, + 0xB4, 0x9E, 0x44, 0xF0, 0xA3, 0xBB, 0x91, 0x44, + 0xF0, 0xA3, 0xBD, 0x9E, 0x44, 0xF0, 0xA3, 0xBE, + 0x8E, 0x44, 0xF0, 0xA4, 0x89, 0xA3, 0x44, 0xF0, + 0xA4, 0x8B, 0xAE, 0x44, 0xF0, 0xA4, 0x8E, 0xAB, + 0x44, 0xF0, 0xA4, 0x98, 0x88, 0x44, 0xF0, 0xA4, + 0x9C, 0xB5, 0x44, 0xF0, 0xA4, 0xA0, 0x94, 0x44, + 0xF0, 0xA4, 0xB0, 0xB6, 0x44, 0xF0, 0xA4, 0xB2, + // Bytes 1740 - 177f + 0x92, 0x44, 0xF0, 0xA4, 0xBE, 0xA1, 0x44, 0xF0, + 0xA4, 0xBE, 0xB8, 0x44, 0xF0, 0xA5, 0x81, 0x84, + 0x44, 0xF0, 0xA5, 0x83, 0xB2, 0x44, 0xF0, 0xA5, + 0x83, 0xB3, 0x44, 0xF0, 0xA5, 0x84, 0x99, 0x44, + 0xF0, 0xA5, 0x84, 0xB3, 0x44, 0xF0, 0xA5, 0x89, + 0x89, 0x44, 0xF0, 0xA5, 0x90, 0x9D, 0x44, 0xF0, + 0xA5, 0x98, 0xA6, 0x44, 0xF0, 0xA5, 0x9A, 0x9A, + 0x44, 0xF0, 0xA5, 0x9B, 0x85, 0x44, 0xF0, 0xA5, + // Bytes 1780 - 17bf + 0xA5, 0xBC, 0x44, 0xF0, 0xA5, 0xAA, 0xA7, 0x44, + 0xF0, 0xA5, 0xAE, 0xAB, 0x44, 0xF0, 0xA5, 0xB2, + 0x80, 0x44, 0xF0, 0xA5, 0xB3, 0x90, 0x44, 0xF0, + 0xA5, 0xBE, 0x86, 0x44, 0xF0, 0xA6, 0x87, 0x9A, + 0x44, 0xF0, 0xA6, 0x88, 0xA8, 0x44, 0xF0, 0xA6, + 0x89, 0x87, 0x44, 0xF0, 0xA6, 0x8B, 0x99, 0x44, + 0xF0, 0xA6, 0x8C, 0xBE, 0x44, 0xF0, 0xA6, 0x93, + 0x9A, 0x44, 0xF0, 0xA6, 0x94, 0xA3, 0x44, 0xF0, + // Bytes 17c0 - 17ff + 0xA6, 0x96, 0xA8, 0x44, 0xF0, 0xA6, 0x9E, 0xA7, + 0x44, 0xF0, 0xA6, 0x9E, 0xB5, 0x44, 0xF0, 0xA6, + 0xAC, 0xBC, 0x44, 0xF0, 0xA6, 0xB0, 0xB6, 0x44, + 0xF0, 0xA6, 0xB3, 0x95, 0x44, 0xF0, 0xA6, 0xB5, + 0xAB, 0x44, 0xF0, 0xA6, 0xBC, 0xAC, 0x44, 0xF0, + 0xA6, 0xBE, 0xB1, 0x44, 0xF0, 0xA7, 0x83, 0x92, + 0x44, 0xF0, 0xA7, 0x8F, 0x8A, 0x44, 0xF0, 0xA7, + 0x99, 0xA7, 0x44, 0xF0, 0xA7, 0xA2, 0xAE, 0x44, + // Bytes 1800 - 183f + 0xF0, 0xA7, 0xA5, 0xA6, 0x44, 0xF0, 0xA7, 0xB2, + 0xA8, 0x44, 0xF0, 0xA7, 0xBB, 0x93, 0x44, 0xF0, + 0xA7, 0xBC, 0xAF, 0x44, 0xF0, 0xA8, 0x97, 0x92, + 0x44, 0xF0, 0xA8, 0x97, 0xAD, 0x44, 0xF0, 0xA8, + 0x9C, 0xAE, 0x44, 0xF0, 0xA8, 0xAF, 0xBA, 0x44, + 0xF0, 0xA8, 0xB5, 0xB7, 0x44, 0xF0, 0xA9, 0x85, + 0x85, 0x44, 0xF0, 0xA9, 0x87, 0x9F, 0x44, 0xF0, + 0xA9, 0x88, 0x9A, 0x44, 0xF0, 0xA9, 0x90, 0x8A, + // Bytes 1840 - 187f + 0x44, 0xF0, 0xA9, 0x92, 0x96, 0x44, 0xF0, 0xA9, + 0x96, 0xB6, 0x44, 0xF0, 0xA9, 0xAC, 0xB0, 0x44, + 0xF0, 0xAA, 0x83, 0x8E, 0x44, 0xF0, 0xAA, 0x84, + 0x85, 0x44, 0xF0, 0xAA, 0x88, 0x8E, 0x44, 0xF0, + 0xAA, 0x8A, 0x91, 0x44, 0xF0, 0xAA, 0x8E, 0x92, + 0x44, 0xF0, 0xAA, 0x98, 0x80, 0x42, 0x21, 0x21, + 0x42, 0x21, 0x3F, 0x42, 0x2E, 0x2E, 0x42, 0x30, + 0x2C, 0x42, 0x30, 0x2E, 0x42, 0x31, 0x2C, 0x42, + // Bytes 1880 - 18bf + 0x31, 0x2E, 0x42, 0x31, 0x30, 0x42, 0x31, 0x31, + 0x42, 0x31, 0x32, 0x42, 0x31, 0x33, 0x42, 0x31, + 0x34, 0x42, 0x31, 0x35, 0x42, 0x31, 0x36, 0x42, + 0x31, 0x37, 0x42, 0x31, 0x38, 0x42, 0x31, 0x39, + 0x42, 0x32, 0x2C, 0x42, 0x32, 0x2E, 0x42, 0x32, + 0x30, 0x42, 0x32, 0x31, 0x42, 0x32, 0x32, 0x42, + 0x32, 0x33, 0x42, 0x32, 0x34, 0x42, 0x32, 0x35, + 0x42, 0x32, 0x36, 0x42, 0x32, 0x37, 0x42, 0x32, + // Bytes 18c0 - 18ff + 0x38, 0x42, 0x32, 0x39, 0x42, 0x33, 0x2C, 0x42, + 0x33, 0x2E, 0x42, 0x33, 0x30, 0x42, 0x33, 0x31, + 0x42, 0x33, 0x32, 0x42, 0x33, 0x33, 0x42, 0x33, + 0x34, 0x42, 0x33, 0x35, 0x42, 0x33, 0x36, 0x42, + 0x33, 0x37, 0x42, 0x33, 0x38, 0x42, 0x33, 0x39, + 0x42, 0x34, 0x2C, 0x42, 0x34, 0x2E, 0x42, 0x34, + 0x30, 0x42, 0x34, 0x31, 0x42, 0x34, 0x32, 0x42, + 0x34, 0x33, 0x42, 0x34, 0x34, 0x42, 0x34, 0x35, + // Bytes 1900 - 193f + 0x42, 0x34, 0x36, 0x42, 0x34, 0x37, 0x42, 0x34, + 0x38, 0x42, 0x34, 0x39, 0x42, 0x35, 0x2C, 0x42, + 0x35, 0x2E, 0x42, 0x35, 0x30, 0x42, 0x36, 0x2C, + 0x42, 0x36, 0x2E, 0x42, 0x37, 0x2C, 0x42, 0x37, + 0x2E, 0x42, 0x38, 0x2C, 0x42, 0x38, 0x2E, 0x42, + 0x39, 0x2C, 0x42, 0x39, 0x2E, 0x42, 0x3D, 0x3D, + 0x42, 0x3F, 0x21, 0x42, 0x3F, 0x3F, 0x42, 0x41, + 0x55, 0x42, 0x42, 0x71, 0x42, 0x43, 0x44, 0x42, + // Bytes 1940 - 197f + 0x44, 0x4A, 0x42, 0x44, 0x5A, 0x42, 0x44, 0x7A, + 0x42, 0x47, 0x42, 0x42, 0x47, 0x79, 0x42, 0x48, + 0x50, 0x42, 0x48, 0x56, 0x42, 0x48, 0x67, 0x42, + 0x48, 0x7A, 0x42, 0x49, 0x49, 0x42, 0x49, 0x4A, + 0x42, 0x49, 0x55, 0x42, 0x49, 0x56, 0x42, 0x49, + 0x58, 0x42, 0x4B, 0x42, 0x42, 0x4B, 0x4B, 0x42, + 0x4B, 0x4D, 0x42, 0x4C, 0x4A, 0x42, 0x4C, 0x6A, + 0x42, 0x4D, 0x42, 0x42, 0x4D, 0x43, 0x42, 0x4D, + // Bytes 1980 - 19bf + 0x44, 0x42, 0x4D, 0x52, 0x42, 0x4D, 0x56, 0x42, + 0x4D, 0x57, 0x42, 0x4E, 0x4A, 0x42, 0x4E, 0x6A, + 0x42, 0x4E, 0x6F, 0x42, 0x50, 0x48, 0x42, 0x50, + 0x52, 0x42, 0x50, 0x61, 0x42, 0x52, 0x73, 0x42, + 0x53, 0x44, 0x42, 0x53, 0x4D, 0x42, 0x53, 0x53, + 0x42, 0x53, 0x76, 0x42, 0x54, 0x4D, 0x42, 0x56, + 0x49, 0x42, 0x57, 0x43, 0x42, 0x57, 0x5A, 0x42, + 0x57, 0x62, 0x42, 0x58, 0x49, 0x42, 0x63, 0x63, + // Bytes 19c0 - 19ff + 0x42, 0x63, 0x64, 0x42, 0x63, 0x6D, 0x42, 0x64, + 0x42, 0x42, 0x64, 0x61, 0x42, 0x64, 0x6C, 0x42, + 0x64, 0x6D, 0x42, 0x64, 0x7A, 0x42, 0x65, 0x56, + 0x42, 0x66, 0x66, 0x42, 0x66, 0x69, 0x42, 0x66, + 0x6C, 0x42, 0x66, 0x6D, 0x42, 0x68, 0x61, 0x42, + 0x69, 0x69, 0x42, 0x69, 0x6A, 0x42, 0x69, 0x6E, + 0x42, 0x69, 0x76, 0x42, 0x69, 0x78, 0x42, 0x6B, + 0x41, 0x42, 0x6B, 0x56, 0x42, 0x6B, 0x57, 0x42, + // Bytes 1a00 - 1a3f + 0x6B, 0x67, 0x42, 0x6B, 0x6C, 0x42, 0x6B, 0x6D, + 0x42, 0x6B, 0x74, 0x42, 0x6C, 0x6A, 0x42, 0x6C, + 0x6D, 0x42, 0x6C, 0x6E, 0x42, 0x6C, 0x78, 0x42, + 0x6D, 0x32, 0x42, 0x6D, 0x33, 0x42, 0x6D, 0x41, + 0x42, 0x6D, 0x56, 0x42, 0x6D, 0x57, 0x42, 0x6D, + 0x62, 0x42, 0x6D, 0x67, 0x42, 0x6D, 0x6C, 0x42, + 0x6D, 0x6D, 0x42, 0x6D, 0x73, 0x42, 0x6E, 0x41, + 0x42, 0x6E, 0x46, 0x42, 0x6E, 0x56, 0x42, 0x6E, + // Bytes 1a40 - 1a7f + 0x57, 0x42, 0x6E, 0x6A, 0x42, 0x6E, 0x6D, 0x42, + 0x6E, 0x73, 0x42, 0x6F, 0x56, 0x42, 0x70, 0x41, + 0x42, 0x70, 0x46, 0x42, 0x70, 0x56, 0x42, 0x70, + 0x57, 0x42, 0x70, 0x63, 0x42, 0x70, 0x73, 0x42, + 0x73, 0x72, 0x42, 0x73, 0x74, 0x42, 0x76, 0x69, + 0x42, 0x78, 0x69, 0x43, 0x28, 0x31, 0x29, 0x43, + 0x28, 0x32, 0x29, 0x43, 0x28, 0x33, 0x29, 0x43, + 0x28, 0x34, 0x29, 0x43, 0x28, 0x35, 0x29, 0x43, + // Bytes 1a80 - 1abf + 0x28, 0x36, 0x29, 0x43, 0x28, 0x37, 0x29, 0x43, + 0x28, 0x38, 0x29, 0x43, 0x28, 0x39, 0x29, 0x43, + 0x28, 0x41, 0x29, 0x43, 0x28, 0x42, 0x29, 0x43, + 0x28, 0x43, 0x29, 0x43, 0x28, 0x44, 0x29, 0x43, + 0x28, 0x45, 0x29, 0x43, 0x28, 0x46, 0x29, 0x43, + 0x28, 0x47, 0x29, 0x43, 0x28, 0x48, 0x29, 0x43, + 0x28, 0x49, 0x29, 0x43, 0x28, 0x4A, 0x29, 0x43, + 0x28, 0x4B, 0x29, 0x43, 0x28, 0x4C, 0x29, 0x43, + // Bytes 1ac0 - 1aff + 0x28, 0x4D, 0x29, 0x43, 0x28, 0x4E, 0x29, 0x43, + 0x28, 0x4F, 0x29, 0x43, 0x28, 0x50, 0x29, 0x43, + 0x28, 0x51, 0x29, 0x43, 0x28, 0x52, 0x29, 0x43, + 0x28, 0x53, 0x29, 0x43, 0x28, 0x54, 0x29, 0x43, + 0x28, 0x55, 0x29, 0x43, 0x28, 0x56, 0x29, 0x43, + 0x28, 0x57, 0x29, 0x43, 0x28, 0x58, 0x29, 0x43, + 0x28, 0x59, 0x29, 0x43, 0x28, 0x5A, 0x29, 0x43, + 0x28, 0x61, 0x29, 0x43, 0x28, 0x62, 0x29, 0x43, + // Bytes 1b00 - 1b3f + 0x28, 0x63, 0x29, 0x43, 0x28, 0x64, 0x29, 0x43, + 0x28, 0x65, 0x29, 0x43, 0x28, 0x66, 0x29, 0x43, + 0x28, 0x67, 0x29, 0x43, 0x28, 0x68, 0x29, 0x43, + 0x28, 0x69, 0x29, 0x43, 0x28, 0x6A, 0x29, 0x43, + 0x28, 0x6B, 0x29, 0x43, 0x28, 0x6C, 0x29, 0x43, + 0x28, 0x6D, 0x29, 0x43, 0x28, 0x6E, 0x29, 0x43, + 0x28, 0x6F, 0x29, 0x43, 0x28, 0x70, 0x29, 0x43, + 0x28, 0x71, 0x29, 0x43, 0x28, 0x72, 0x29, 0x43, + // Bytes 1b40 - 1b7f + 0x28, 0x73, 0x29, 0x43, 0x28, 0x74, 0x29, 0x43, + 0x28, 0x75, 0x29, 0x43, 0x28, 0x76, 0x29, 0x43, + 0x28, 0x77, 0x29, 0x43, 0x28, 0x78, 0x29, 0x43, + 0x28, 0x79, 0x29, 0x43, 0x28, 0x7A, 0x29, 0x43, + 0x2E, 0x2E, 0x2E, 0x43, 0x31, 0x30, 0x2E, 0x43, + 0x31, 0x31, 0x2E, 0x43, 0x31, 0x32, 0x2E, 0x43, + 0x31, 0x33, 0x2E, 0x43, 0x31, 0x34, 0x2E, 0x43, + 0x31, 0x35, 0x2E, 0x43, 0x31, 0x36, 0x2E, 0x43, + // Bytes 1b80 - 1bbf + 0x31, 0x37, 0x2E, 0x43, 0x31, 0x38, 0x2E, 0x43, + 0x31, 0x39, 0x2E, 0x43, 0x32, 0x30, 0x2E, 0x43, + 0x3A, 0x3A, 0x3D, 0x43, 0x3D, 0x3D, 0x3D, 0x43, + 0x43, 0x6F, 0x2E, 0x43, 0x46, 0x41, 0x58, 0x43, + 0x47, 0x48, 0x7A, 0x43, 0x47, 0x50, 0x61, 0x43, + 0x49, 0x49, 0x49, 0x43, 0x4C, 0x54, 0x44, 0x43, + 0x4C, 0xC2, 0xB7, 0x43, 0x4D, 0x48, 0x7A, 0x43, + 0x4D, 0x50, 0x61, 0x43, 0x4D, 0xCE, 0xA9, 0x43, + // Bytes 1bc0 - 1bff + 0x50, 0x50, 0x4D, 0x43, 0x50, 0x50, 0x56, 0x43, + 0x50, 0x54, 0x45, 0x43, 0x54, 0x45, 0x4C, 0x43, + 0x54, 0x48, 0x7A, 0x43, 0x56, 0x49, 0x49, 0x43, + 0x58, 0x49, 0x49, 0x43, 0x61, 0x2F, 0x63, 0x43, + 0x61, 0x2F, 0x73, 0x43, 0x61, 0xCA, 0xBE, 0x43, + 0x62, 0x61, 0x72, 0x43, 0x63, 0x2F, 0x6F, 0x43, + 0x63, 0x2F, 0x75, 0x43, 0x63, 0x61, 0x6C, 0x43, + 0x63, 0x6D, 0x32, 0x43, 0x63, 0x6D, 0x33, 0x43, + // Bytes 1c00 - 1c3f + 0x64, 0x6D, 0x32, 0x43, 0x64, 0x6D, 0x33, 0x43, + 0x65, 0x72, 0x67, 0x43, 0x66, 0x66, 0x69, 0x43, + 0x66, 0x66, 0x6C, 0x43, 0x67, 0x61, 0x6C, 0x43, + 0x68, 0x50, 0x61, 0x43, 0x69, 0x69, 0x69, 0x43, + 0x6B, 0x48, 0x7A, 0x43, 0x6B, 0x50, 0x61, 0x43, + 0x6B, 0x6D, 0x32, 0x43, 0x6B, 0x6D, 0x33, 0x43, + 0x6B, 0xCE, 0xA9, 0x43, 0x6C, 0x6F, 0x67, 0x43, + 0x6C, 0xC2, 0xB7, 0x43, 0x6D, 0x69, 0x6C, 0x43, + // Bytes 1c40 - 1c7f + 0x6D, 0x6D, 0x32, 0x43, 0x6D, 0x6D, 0x33, 0x43, + 0x6D, 0x6F, 0x6C, 0x43, 0x72, 0x61, 0x64, 0x43, + 0x76, 0x69, 0x69, 0x43, 0x78, 0x69, 0x69, 0x43, + 0xC2, 0xB0, 0x43, 0x43, 0xC2, 0xB0, 0x46, 0x43, + 0xCA, 0xBC, 0x6E, 0x43, 0xCE, 0xBC, 0x41, 0x43, + 0xCE, 0xBC, 0x46, 0x43, 0xCE, 0xBC, 0x56, 0x43, + 0xCE, 0xBC, 0x57, 0x43, 0xCE, 0xBC, 0x67, 0x43, + 0xCE, 0xBC, 0x6C, 0x43, 0xCE, 0xBC, 0x6D, 0x43, + // Bytes 1c80 - 1cbf + 0xCE, 0xBC, 0x73, 0x44, 0x28, 0x31, 0x30, 0x29, + 0x44, 0x28, 0x31, 0x31, 0x29, 0x44, 0x28, 0x31, + 0x32, 0x29, 0x44, 0x28, 0x31, 0x33, 0x29, 0x44, + 0x28, 0x31, 0x34, 0x29, 0x44, 0x28, 0x31, 0x35, + 0x29, 0x44, 0x28, 0x31, 0x36, 0x29, 0x44, 0x28, + 0x31, 0x37, 0x29, 0x44, 0x28, 0x31, 0x38, 0x29, + 0x44, 0x28, 0x31, 0x39, 0x29, 0x44, 0x28, 0x32, + 0x30, 0x29, 0x44, 0x30, 0xE7, 0x82, 0xB9, 0x44, + // Bytes 1cc0 - 1cff + 0x31, 0xE2, 0x81, 0x84, 0x44, 0x31, 0xE6, 0x97, + 0xA5, 0x44, 0x31, 0xE6, 0x9C, 0x88, 0x44, 0x31, + 0xE7, 0x82, 0xB9, 0x44, 0x32, 0xE6, 0x97, 0xA5, + 0x44, 0x32, 0xE6, 0x9C, 0x88, 0x44, 0x32, 0xE7, + 0x82, 0xB9, 0x44, 0x33, 0xE6, 0x97, 0xA5, 0x44, + 0x33, 0xE6, 0x9C, 0x88, 0x44, 0x33, 0xE7, 0x82, + 0xB9, 0x44, 0x34, 0xE6, 0x97, 0xA5, 0x44, 0x34, + 0xE6, 0x9C, 0x88, 0x44, 0x34, 0xE7, 0x82, 0xB9, + // Bytes 1d00 - 1d3f + 0x44, 0x35, 0xE6, 0x97, 0xA5, 0x44, 0x35, 0xE6, + 0x9C, 0x88, 0x44, 0x35, 0xE7, 0x82, 0xB9, 0x44, + 0x36, 0xE6, 0x97, 0xA5, 0x44, 0x36, 0xE6, 0x9C, + 0x88, 0x44, 0x36, 0xE7, 0x82, 0xB9, 0x44, 0x37, + 0xE6, 0x97, 0xA5, 0x44, 0x37, 0xE6, 0x9C, 0x88, + 0x44, 0x37, 0xE7, 0x82, 0xB9, 0x44, 0x38, 0xE6, + 0x97, 0xA5, 0x44, 0x38, 0xE6, 0x9C, 0x88, 0x44, + 0x38, 0xE7, 0x82, 0xB9, 0x44, 0x39, 0xE6, 0x97, + // Bytes 1d40 - 1d7f + 0xA5, 0x44, 0x39, 0xE6, 0x9C, 0x88, 0x44, 0x39, + 0xE7, 0x82, 0xB9, 0x44, 0x56, 0x49, 0x49, 0x49, + 0x44, 0x61, 0x2E, 0x6D, 0x2E, 0x44, 0x6B, 0x63, + 0x61, 0x6C, 0x44, 0x70, 0x2E, 0x6D, 0x2E, 0x44, + 0x76, 0x69, 0x69, 0x69, 0x44, 0xD5, 0xA5, 0xD6, + 0x82, 0x44, 0xD5, 0xB4, 0xD5, 0xA5, 0x44, 0xD5, + 0xB4, 0xD5, 0xAB, 0x44, 0xD5, 0xB4, 0xD5, 0xAD, + 0x44, 0xD5, 0xB4, 0xD5, 0xB6, 0x44, 0xD5, 0xBE, + // Bytes 1d80 - 1dbf + 0xD5, 0xB6, 0x44, 0xD7, 0x90, 0xD7, 0x9C, 0x44, + 0xD8, 0xA7, 0xD9, 0xB4, 0x44, 0xD8, 0xA8, 0xD8, + 0xAC, 0x44, 0xD8, 0xA8, 0xD8, 0xAD, 0x44, 0xD8, + 0xA8, 0xD8, 0xAE, 0x44, 0xD8, 0xA8, 0xD8, 0xB1, + 0x44, 0xD8, 0xA8, 0xD8, 0xB2, 0x44, 0xD8, 0xA8, + 0xD9, 0x85, 0x44, 0xD8, 0xA8, 0xD9, 0x86, 0x44, + 0xD8, 0xA8, 0xD9, 0x87, 0x44, 0xD8, 0xA8, 0xD9, + 0x89, 0x44, 0xD8, 0xA8, 0xD9, 0x8A, 0x44, 0xD8, + // Bytes 1dc0 - 1dff + 0xAA, 0xD8, 0xAC, 0x44, 0xD8, 0xAA, 0xD8, 0xAD, + 0x44, 0xD8, 0xAA, 0xD8, 0xAE, 0x44, 0xD8, 0xAA, + 0xD8, 0xB1, 0x44, 0xD8, 0xAA, 0xD8, 0xB2, 0x44, + 0xD8, 0xAA, 0xD9, 0x85, 0x44, 0xD8, 0xAA, 0xD9, + 0x86, 0x44, 0xD8, 0xAA, 0xD9, 0x87, 0x44, 0xD8, + 0xAA, 0xD9, 0x89, 0x44, 0xD8, 0xAA, 0xD9, 0x8A, + 0x44, 0xD8, 0xAB, 0xD8, 0xAC, 0x44, 0xD8, 0xAB, + 0xD8, 0xB1, 0x44, 0xD8, 0xAB, 0xD8, 0xB2, 0x44, + // Bytes 1e00 - 1e3f + 0xD8, 0xAB, 0xD9, 0x85, 0x44, 0xD8, 0xAB, 0xD9, + 0x86, 0x44, 0xD8, 0xAB, 0xD9, 0x87, 0x44, 0xD8, + 0xAB, 0xD9, 0x89, 0x44, 0xD8, 0xAB, 0xD9, 0x8A, + 0x44, 0xD8, 0xAC, 0xD8, 0xAD, 0x44, 0xD8, 0xAC, + 0xD9, 0x85, 0x44, 0xD8, 0xAC, 0xD9, 0x89, 0x44, + 0xD8, 0xAC, 0xD9, 0x8A, 0x44, 0xD8, 0xAD, 0xD8, + 0xAC, 0x44, 0xD8, 0xAD, 0xD9, 0x85, 0x44, 0xD8, + 0xAD, 0xD9, 0x89, 0x44, 0xD8, 0xAD, 0xD9, 0x8A, + // Bytes 1e40 - 1e7f + 0x44, 0xD8, 0xAE, 0xD8, 0xAC, 0x44, 0xD8, 0xAE, + 0xD8, 0xAD, 0x44, 0xD8, 0xAE, 0xD9, 0x85, 0x44, + 0xD8, 0xAE, 0xD9, 0x89, 0x44, 0xD8, 0xAE, 0xD9, + 0x8A, 0x44, 0xD8, 0xB3, 0xD8, 0xAC, 0x44, 0xD8, + 0xB3, 0xD8, 0xAD, 0x44, 0xD8, 0xB3, 0xD8, 0xAE, + 0x44, 0xD8, 0xB3, 0xD8, 0xB1, 0x44, 0xD8, 0xB3, + 0xD9, 0x85, 0x44, 0xD8, 0xB3, 0xD9, 0x87, 0x44, + 0xD8, 0xB3, 0xD9, 0x89, 0x44, 0xD8, 0xB3, 0xD9, + // Bytes 1e80 - 1ebf + 0x8A, 0x44, 0xD8, 0xB4, 0xD8, 0xAC, 0x44, 0xD8, + 0xB4, 0xD8, 0xAD, 0x44, 0xD8, 0xB4, 0xD8, 0xAE, + 0x44, 0xD8, 0xB4, 0xD8, 0xB1, 0x44, 0xD8, 0xB4, + 0xD9, 0x85, 0x44, 0xD8, 0xB4, 0xD9, 0x87, 0x44, + 0xD8, 0xB4, 0xD9, 0x89, 0x44, 0xD8, 0xB4, 0xD9, + 0x8A, 0x44, 0xD8, 0xB5, 0xD8, 0xAD, 0x44, 0xD8, + 0xB5, 0xD8, 0xAE, 0x44, 0xD8, 0xB5, 0xD8, 0xB1, + 0x44, 0xD8, 0xB5, 0xD9, 0x85, 0x44, 0xD8, 0xB5, + // Bytes 1ec0 - 1eff + 0xD9, 0x89, 0x44, 0xD8, 0xB5, 0xD9, 0x8A, 0x44, + 0xD8, 0xB6, 0xD8, 0xAC, 0x44, 0xD8, 0xB6, 0xD8, + 0xAD, 0x44, 0xD8, 0xB6, 0xD8, 0xAE, 0x44, 0xD8, + 0xB6, 0xD8, 0xB1, 0x44, 0xD8, 0xB6, 0xD9, 0x85, + 0x44, 0xD8, 0xB6, 0xD9, 0x89, 0x44, 0xD8, 0xB6, + 0xD9, 0x8A, 0x44, 0xD8, 0xB7, 0xD8, 0xAD, 0x44, + 0xD8, 0xB7, 0xD9, 0x85, 0x44, 0xD8, 0xB7, 0xD9, + 0x89, 0x44, 0xD8, 0xB7, 0xD9, 0x8A, 0x44, 0xD8, + // Bytes 1f00 - 1f3f + 0xB8, 0xD9, 0x85, 0x44, 0xD8, 0xB9, 0xD8, 0xAC, + 0x44, 0xD8, 0xB9, 0xD9, 0x85, 0x44, 0xD8, 0xB9, + 0xD9, 0x89, 0x44, 0xD8, 0xB9, 0xD9, 0x8A, 0x44, + 0xD8, 0xBA, 0xD8, 0xAC, 0x44, 0xD8, 0xBA, 0xD9, + 0x85, 0x44, 0xD8, 0xBA, 0xD9, 0x89, 0x44, 0xD8, + 0xBA, 0xD9, 0x8A, 0x44, 0xD9, 0x81, 0xD8, 0xAC, + 0x44, 0xD9, 0x81, 0xD8, 0xAD, 0x44, 0xD9, 0x81, + 0xD8, 0xAE, 0x44, 0xD9, 0x81, 0xD9, 0x85, 0x44, + // Bytes 1f40 - 1f7f + 0xD9, 0x81, 0xD9, 0x89, 0x44, 0xD9, 0x81, 0xD9, + 0x8A, 0x44, 0xD9, 0x82, 0xD8, 0xAD, 0x44, 0xD9, + 0x82, 0xD9, 0x85, 0x44, 0xD9, 0x82, 0xD9, 0x89, + 0x44, 0xD9, 0x82, 0xD9, 0x8A, 0x44, 0xD9, 0x83, + 0xD8, 0xA7, 0x44, 0xD9, 0x83, 0xD8, 0xAC, 0x44, + 0xD9, 0x83, 0xD8, 0xAD, 0x44, 0xD9, 0x83, 0xD8, + 0xAE, 0x44, 0xD9, 0x83, 0xD9, 0x84, 0x44, 0xD9, + 0x83, 0xD9, 0x85, 0x44, 0xD9, 0x83, 0xD9, 0x89, + // Bytes 1f80 - 1fbf + 0x44, 0xD9, 0x83, 0xD9, 0x8A, 0x44, 0xD9, 0x84, + 0xD8, 0xA7, 0x44, 0xD9, 0x84, 0xD8, 0xAC, 0x44, + 0xD9, 0x84, 0xD8, 0xAD, 0x44, 0xD9, 0x84, 0xD8, + 0xAE, 0x44, 0xD9, 0x84, 0xD9, 0x85, 0x44, 0xD9, + 0x84, 0xD9, 0x87, 0x44, 0xD9, 0x84, 0xD9, 0x89, + 0x44, 0xD9, 0x84, 0xD9, 0x8A, 0x44, 0xD9, 0x85, + 0xD8, 0xA7, 0x44, 0xD9, 0x85, 0xD8, 0xAC, 0x44, + 0xD9, 0x85, 0xD8, 0xAD, 0x44, 0xD9, 0x85, 0xD8, + // Bytes 1fc0 - 1fff + 0xAE, 0x44, 0xD9, 0x85, 0xD9, 0x85, 0x44, 0xD9, + 0x85, 0xD9, 0x89, 0x44, 0xD9, 0x85, 0xD9, 0x8A, + 0x44, 0xD9, 0x86, 0xD8, 0xAC, 0x44, 0xD9, 0x86, + 0xD8, 0xAD, 0x44, 0xD9, 0x86, 0xD8, 0xAE, 0x44, + 0xD9, 0x86, 0xD8, 0xB1, 0x44, 0xD9, 0x86, 0xD8, + 0xB2, 0x44, 0xD9, 0x86, 0xD9, 0x85, 0x44, 0xD9, + 0x86, 0xD9, 0x86, 0x44, 0xD9, 0x86, 0xD9, 0x87, + 0x44, 0xD9, 0x86, 0xD9, 0x89, 0x44, 0xD9, 0x86, + // Bytes 2000 - 203f + 0xD9, 0x8A, 0x44, 0xD9, 0x87, 0xD8, 0xAC, 0x44, + 0xD9, 0x87, 0xD9, 0x85, 0x44, 0xD9, 0x87, 0xD9, + 0x89, 0x44, 0xD9, 0x87, 0xD9, 0x8A, 0x44, 0xD9, + 0x88, 0xD9, 0xB4, 0x44, 0xD9, 0x8A, 0xD8, 0xAC, + 0x44, 0xD9, 0x8A, 0xD8, 0xAD, 0x44, 0xD9, 0x8A, + 0xD8, 0xAE, 0x44, 0xD9, 0x8A, 0xD8, 0xB1, 0x44, + 0xD9, 0x8A, 0xD8, 0xB2, 0x44, 0xD9, 0x8A, 0xD9, + 0x85, 0x44, 0xD9, 0x8A, 0xD9, 0x86, 0x44, 0xD9, + // Bytes 2040 - 207f + 0x8A, 0xD9, 0x87, 0x44, 0xD9, 0x8A, 0xD9, 0x89, + 0x44, 0xD9, 0x8A, 0xD9, 0x8A, 0x44, 0xD9, 0x8A, + 0xD9, 0xB4, 0x44, 0xDB, 0x87, 0xD9, 0xB4, 0x45, + 0x28, 0xE1, 0x84, 0x80, 0x29, 0x45, 0x28, 0xE1, + 0x84, 0x82, 0x29, 0x45, 0x28, 0xE1, 0x84, 0x83, + 0x29, 0x45, 0x28, 0xE1, 0x84, 0x85, 0x29, 0x45, + 0x28, 0xE1, 0x84, 0x86, 0x29, 0x45, 0x28, 0xE1, + 0x84, 0x87, 0x29, 0x45, 0x28, 0xE1, 0x84, 0x89, + // Bytes 2080 - 20bf + 0x29, 0x45, 0x28, 0xE1, 0x84, 0x8B, 0x29, 0x45, + 0x28, 0xE1, 0x84, 0x8C, 0x29, 0x45, 0x28, 0xE1, + 0x84, 0x8E, 0x29, 0x45, 0x28, 0xE1, 0x84, 0x8F, + 0x29, 0x45, 0x28, 0xE1, 0x84, 0x90, 0x29, 0x45, + 0x28, 0xE1, 0x84, 0x91, 0x29, 0x45, 0x28, 0xE1, + 0x84, 0x92, 0x29, 0x45, 0x28, 0xE4, 0xB8, 0x80, + 0x29, 0x45, 0x28, 0xE4, 0xB8, 0x83, 0x29, 0x45, + 0x28, 0xE4, 0xB8, 0x89, 0x29, 0x45, 0x28, 0xE4, + // Bytes 20c0 - 20ff + 0xB9, 0x9D, 0x29, 0x45, 0x28, 0xE4, 0xBA, 0x8C, + 0x29, 0x45, 0x28, 0xE4, 0xBA, 0x94, 0x29, 0x45, + 0x28, 0xE4, 0xBB, 0xA3, 0x29, 0x45, 0x28, 0xE4, + 0xBC, 0x81, 0x29, 0x45, 0x28, 0xE4, 0xBC, 0x91, + 0x29, 0x45, 0x28, 0xE5, 0x85, 0xAB, 0x29, 0x45, + 0x28, 0xE5, 0x85, 0xAD, 0x29, 0x45, 0x28, 0xE5, + 0x8A, 0xB4, 0x29, 0x45, 0x28, 0xE5, 0x8D, 0x81, + 0x29, 0x45, 0x28, 0xE5, 0x8D, 0x94, 0x29, 0x45, + // Bytes 2100 - 213f + 0x28, 0xE5, 0x90, 0x8D, 0x29, 0x45, 0x28, 0xE5, + 0x91, 0xBC, 0x29, 0x45, 0x28, 0xE5, 0x9B, 0x9B, + 0x29, 0x45, 0x28, 0xE5, 0x9C, 0x9F, 0x29, 0x45, + 0x28, 0xE5, 0xAD, 0xA6, 0x29, 0x45, 0x28, 0xE6, + 0x97, 0xA5, 0x29, 0x45, 0x28, 0xE6, 0x9C, 0x88, + 0x29, 0x45, 0x28, 0xE6, 0x9C, 0x89, 0x29, 0x45, + 0x28, 0xE6, 0x9C, 0xA8, 0x29, 0x45, 0x28, 0xE6, + 0xA0, 0xAA, 0x29, 0x45, 0x28, 0xE6, 0xB0, 0xB4, + // Bytes 2140 - 217f + 0x29, 0x45, 0x28, 0xE7, 0x81, 0xAB, 0x29, 0x45, + 0x28, 0xE7, 0x89, 0xB9, 0x29, 0x45, 0x28, 0xE7, + 0x9B, 0xA3, 0x29, 0x45, 0x28, 0xE7, 0xA4, 0xBE, + 0x29, 0x45, 0x28, 0xE7, 0xA5, 0x9D, 0x29, 0x45, + 0x28, 0xE7, 0xA5, 0xAD, 0x29, 0x45, 0x28, 0xE8, + 0x87, 0xAA, 0x29, 0x45, 0x28, 0xE8, 0x87, 0xB3, + 0x29, 0x45, 0x28, 0xE8, 0xB2, 0xA1, 0x29, 0x45, + 0x28, 0xE8, 0xB3, 0x87, 0x29, 0x45, 0x28, 0xE9, + // Bytes 2180 - 21bf + 0x87, 0x91, 0x29, 0x45, 0x30, 0xE2, 0x81, 0x84, + 0x33, 0x45, 0x31, 0x30, 0xE6, 0x97, 0xA5, 0x45, + 0x31, 0x30, 0xE6, 0x9C, 0x88, 0x45, 0x31, 0x30, + 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x31, 0xE6, 0x97, + 0xA5, 0x45, 0x31, 0x31, 0xE6, 0x9C, 0x88, 0x45, + 0x31, 0x31, 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x32, + 0xE6, 0x97, 0xA5, 0x45, 0x31, 0x32, 0xE6, 0x9C, + 0x88, 0x45, 0x31, 0x32, 0xE7, 0x82, 0xB9, 0x45, + // Bytes 21c0 - 21ff + 0x31, 0x33, 0xE6, 0x97, 0xA5, 0x45, 0x31, 0x33, + 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x34, 0xE6, 0x97, + 0xA5, 0x45, 0x31, 0x34, 0xE7, 0x82, 0xB9, 0x45, + 0x31, 0x35, 0xE6, 0x97, 0xA5, 0x45, 0x31, 0x35, + 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x36, 0xE6, 0x97, + 0xA5, 0x45, 0x31, 0x36, 0xE7, 0x82, 0xB9, 0x45, + 0x31, 0x37, 0xE6, 0x97, 0xA5, 0x45, 0x31, 0x37, + 0xE7, 0x82, 0xB9, 0x45, 0x31, 0x38, 0xE6, 0x97, + // Bytes 2200 - 223f + 0xA5, 0x45, 0x31, 0x38, 0xE7, 0x82, 0xB9, 0x45, + 0x31, 0x39, 0xE6, 0x97, 0xA5, 0x45, 0x31, 0x39, + 0xE7, 0x82, 0xB9, 0x45, 0x31, 0xE2, 0x81, 0x84, + 0x32, 0x45, 0x31, 0xE2, 0x81, 0x84, 0x33, 0x45, + 0x31, 0xE2, 0x81, 0x84, 0x34, 0x45, 0x31, 0xE2, + 0x81, 0x84, 0x35, 0x45, 0x31, 0xE2, 0x81, 0x84, + 0x36, 0x45, 0x31, 0xE2, 0x81, 0x84, 0x37, 0x45, + 0x31, 0xE2, 0x81, 0x84, 0x38, 0x45, 0x31, 0xE2, + // Bytes 2240 - 227f + 0x81, 0x84, 0x39, 0x45, 0x32, 0x30, 0xE6, 0x97, + 0xA5, 0x45, 0x32, 0x30, 0xE7, 0x82, 0xB9, 0x45, + 0x32, 0x31, 0xE6, 0x97, 0xA5, 0x45, 0x32, 0x31, + 0xE7, 0x82, 0xB9, 0x45, 0x32, 0x32, 0xE6, 0x97, + 0xA5, 0x45, 0x32, 0x32, 0xE7, 0x82, 0xB9, 0x45, + 0x32, 0x33, 0xE6, 0x97, 0xA5, 0x45, 0x32, 0x33, + 0xE7, 0x82, 0xB9, 0x45, 0x32, 0x34, 0xE6, 0x97, + 0xA5, 0x45, 0x32, 0x34, 0xE7, 0x82, 0xB9, 0x45, + // Bytes 2280 - 22bf + 0x32, 0x35, 0xE6, 0x97, 0xA5, 0x45, 0x32, 0x36, + 0xE6, 0x97, 0xA5, 0x45, 0x32, 0x37, 0xE6, 0x97, + 0xA5, 0x45, 0x32, 0x38, 0xE6, 0x97, 0xA5, 0x45, + 0x32, 0x39, 0xE6, 0x97, 0xA5, 0x45, 0x32, 0xE2, + 0x81, 0x84, 0x33, 0x45, 0x32, 0xE2, 0x81, 0x84, + 0x35, 0x45, 0x33, 0x30, 0xE6, 0x97, 0xA5, 0x45, + 0x33, 0x31, 0xE6, 0x97, 0xA5, 0x45, 0x33, 0xE2, + 0x81, 0x84, 0x34, 0x45, 0x33, 0xE2, 0x81, 0x84, + // Bytes 22c0 - 22ff + 0x35, 0x45, 0x33, 0xE2, 0x81, 0x84, 0x38, 0x45, + 0x34, 0xE2, 0x81, 0x84, 0x35, 0x45, 0x35, 0xE2, + 0x81, 0x84, 0x36, 0x45, 0x35, 0xE2, 0x81, 0x84, + 0x38, 0x45, 0x37, 0xE2, 0x81, 0x84, 0x38, 0x45, + 0x41, 0xE2, 0x88, 0x95, 0x6D, 0x45, 0x56, 0xE2, + 0x88, 0x95, 0x6D, 0x45, 0x6D, 0xE2, 0x88, 0x95, + 0x73, 0x46, 0x31, 0xE2, 0x81, 0x84, 0x31, 0x30, + 0x46, 0x43, 0xE2, 0x88, 0x95, 0x6B, 0x67, 0x46, + // Bytes 2300 - 233f + 0x6D, 0xE2, 0x88, 0x95, 0x73, 0x32, 0x46, 0xD8, + 0xA8, 0xD8, 0xAD, 0xD9, 0x8A, 0x46, 0xD8, 0xA8, + 0xD8, 0xAE, 0xD9, 0x8A, 0x46, 0xD8, 0xAA, 0xD8, + 0xAC, 0xD9, 0x85, 0x46, 0xD8, 0xAA, 0xD8, 0xAC, + 0xD9, 0x89, 0x46, 0xD8, 0xAA, 0xD8, 0xAC, 0xD9, + 0x8A, 0x46, 0xD8, 0xAA, 0xD8, 0xAD, 0xD8, 0xAC, + 0x46, 0xD8, 0xAA, 0xD8, 0xAD, 0xD9, 0x85, 0x46, + 0xD8, 0xAA, 0xD8, 0xAE, 0xD9, 0x85, 0x46, 0xD8, + // Bytes 2340 - 237f + 0xAA, 0xD8, 0xAE, 0xD9, 0x89, 0x46, 0xD8, 0xAA, + 0xD8, 0xAE, 0xD9, 0x8A, 0x46, 0xD8, 0xAA, 0xD9, + 0x85, 0xD8, 0xAC, 0x46, 0xD8, 0xAA, 0xD9, 0x85, + 0xD8, 0xAD, 0x46, 0xD8, 0xAA, 0xD9, 0x85, 0xD8, + 0xAE, 0x46, 0xD8, 0xAA, 0xD9, 0x85, 0xD9, 0x89, + 0x46, 0xD8, 0xAA, 0xD9, 0x85, 0xD9, 0x8A, 0x46, + 0xD8, 0xAC, 0xD8, 0xAD, 0xD9, 0x89, 0x46, 0xD8, + 0xAC, 0xD8, 0xAD, 0xD9, 0x8A, 0x46, 0xD8, 0xAC, + // Bytes 2380 - 23bf + 0xD9, 0x85, 0xD8, 0xAD, 0x46, 0xD8, 0xAC, 0xD9, + 0x85, 0xD9, 0x89, 0x46, 0xD8, 0xAC, 0xD9, 0x85, + 0xD9, 0x8A, 0x46, 0xD8, 0xAD, 0xD8, 0xAC, 0xD9, + 0x8A, 0x46, 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x89, + 0x46, 0xD8, 0xAD, 0xD9, 0x85, 0xD9, 0x8A, 0x46, + 0xD8, 0xB3, 0xD8, 0xAC, 0xD8, 0xAD, 0x46, 0xD8, + 0xB3, 0xD8, 0xAC, 0xD9, 0x89, 0x46, 0xD8, 0xB3, + 0xD8, 0xAD, 0xD8, 0xAC, 0x46, 0xD8, 0xB3, 0xD8, + // Bytes 23c0 - 23ff + 0xAE, 0xD9, 0x89, 0x46, 0xD8, 0xB3, 0xD8, 0xAE, + 0xD9, 0x8A, 0x46, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, + 0xAC, 0x46, 0xD8, 0xB3, 0xD9, 0x85, 0xD8, 0xAD, + 0x46, 0xD8, 0xB3, 0xD9, 0x85, 0xD9, 0x85, 0x46, + 0xD8, 0xB4, 0xD8, 0xAC, 0xD9, 0x8A, 0x46, 0xD8, + 0xB4, 0xD8, 0xAD, 0xD9, 0x85, 0x46, 0xD8, 0xB4, + 0xD8, 0xAD, 0xD9, 0x8A, 0x46, 0xD8, 0xB4, 0xD9, + 0x85, 0xD8, 0xAE, 0x46, 0xD8, 0xB4, 0xD9, 0x85, + // Bytes 2400 - 243f + 0xD9, 0x85, 0x46, 0xD8, 0xB5, 0xD8, 0xAD, 0xD8, + 0xAD, 0x46, 0xD8, 0xB5, 0xD8, 0xAD, 0xD9, 0x8A, + 0x46, 0xD8, 0xB5, 0xD9, 0x84, 0xD9, 0x89, 0x46, + 0xD8, 0xB5, 0xD9, 0x84, 0xDB, 0x92, 0x46, 0xD8, + 0xB5, 0xD9, 0x85, 0xD9, 0x85, 0x46, 0xD8, 0xB6, + 0xD8, 0xAD, 0xD9, 0x89, 0x46, 0xD8, 0xB6, 0xD8, + 0xAD, 0xD9, 0x8A, 0x46, 0xD8, 0xB6, 0xD8, 0xAE, + 0xD9, 0x85, 0x46, 0xD8, 0xB7, 0xD9, 0x85, 0xD8, + // Bytes 2440 - 247f + 0xAD, 0x46, 0xD8, 0xB7, 0xD9, 0x85, 0xD9, 0x85, + 0x46, 0xD8, 0xB7, 0xD9, 0x85, 0xD9, 0x8A, 0x46, + 0xD8, 0xB9, 0xD8, 0xAC, 0xD9, 0x85, 0x46, 0xD8, + 0xB9, 0xD9, 0x85, 0xD9, 0x85, 0x46, 0xD8, 0xB9, + 0xD9, 0x85, 0xD9, 0x89, 0x46, 0xD8, 0xB9, 0xD9, + 0x85, 0xD9, 0x8A, 0x46, 0xD8, 0xBA, 0xD9, 0x85, + 0xD9, 0x85, 0x46, 0xD8, 0xBA, 0xD9, 0x85, 0xD9, + 0x89, 0x46, 0xD8, 0xBA, 0xD9, 0x85, 0xD9, 0x8A, + // Bytes 2480 - 24bf + 0x46, 0xD9, 0x81, 0xD8, 0xAE, 0xD9, 0x85, 0x46, + 0xD9, 0x81, 0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD9, + 0x82, 0xD9, 0x84, 0xDB, 0x92, 0x46, 0xD9, 0x82, + 0xD9, 0x85, 0xD8, 0xAD, 0x46, 0xD9, 0x82, 0xD9, + 0x85, 0xD9, 0x85, 0x46, 0xD9, 0x82, 0xD9, 0x85, + 0xD9, 0x8A, 0x46, 0xD9, 0x83, 0xD9, 0x85, 0xD9, + 0x85, 0x46, 0xD9, 0x83, 0xD9, 0x85, 0xD9, 0x8A, + 0x46, 0xD9, 0x84, 0xD8, 0xAC, 0xD8, 0xAC, 0x46, + // Bytes 24c0 - 24ff + 0xD9, 0x84, 0xD8, 0xAC, 0xD9, 0x85, 0x46, 0xD9, + 0x84, 0xD8, 0xAC, 0xD9, 0x8A, 0x46, 0xD9, 0x84, + 0xD8, 0xAD, 0xD9, 0x85, 0x46, 0xD9, 0x84, 0xD8, + 0xAD, 0xD9, 0x89, 0x46, 0xD9, 0x84, 0xD8, 0xAD, + 0xD9, 0x8A, 0x46, 0xD9, 0x84, 0xD8, 0xAE, 0xD9, + 0x85, 0x46, 0xD9, 0x84, 0xD9, 0x85, 0xD8, 0xAD, + 0x46, 0xD9, 0x84, 0xD9, 0x85, 0xD9, 0x8A, 0x46, + 0xD9, 0x85, 0xD8, 0xAC, 0xD8, 0xAD, 0x46, 0xD9, + // Bytes 2500 - 253f + 0x85, 0xD8, 0xAC, 0xD8, 0xAE, 0x46, 0xD9, 0x85, + 0xD8, 0xAC, 0xD9, 0x85, 0x46, 0xD9, 0x85, 0xD8, + 0xAC, 0xD9, 0x8A, 0x46, 0xD9, 0x85, 0xD8, 0xAD, + 0xD8, 0xAC, 0x46, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, + 0x85, 0x46, 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x8A, + 0x46, 0xD9, 0x85, 0xD8, 0xAE, 0xD8, 0xAC, 0x46, + 0xD9, 0x85, 0xD8, 0xAE, 0xD9, 0x85, 0x46, 0xD9, + 0x85, 0xD8, 0xAE, 0xD9, 0x8A, 0x46, 0xD9, 0x85, + // Bytes 2540 - 257f + 0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD9, 0x86, 0xD8, + 0xAC, 0xD8, 0xAD, 0x46, 0xD9, 0x86, 0xD8, 0xAC, + 0xD9, 0x85, 0x46, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, + 0x89, 0x46, 0xD9, 0x86, 0xD8, 0xAC, 0xD9, 0x8A, + 0x46, 0xD9, 0x86, 0xD8, 0xAD, 0xD9, 0x85, 0x46, + 0xD9, 0x86, 0xD8, 0xAD, 0xD9, 0x89, 0x46, 0xD9, + 0x86, 0xD8, 0xAD, 0xD9, 0x8A, 0x46, 0xD9, 0x86, + 0xD9, 0x85, 0xD9, 0x89, 0x46, 0xD9, 0x86, 0xD9, + // Bytes 2580 - 25bf + 0x85, 0xD9, 0x8A, 0x46, 0xD9, 0x87, 0xD9, 0x85, + 0xD8, 0xAC, 0x46, 0xD9, 0x87, 0xD9, 0x85, 0xD9, + 0x85, 0x46, 0xD9, 0x8A, 0xD8, 0xAC, 0xD9, 0x8A, + 0x46, 0xD9, 0x8A, 0xD8, 0xAD, 0xD9, 0x8A, 0x46, + 0xD9, 0x8A, 0xD9, 0x85, 0xD9, 0x85, 0x46, 0xD9, + 0x8A, 0xD9, 0x85, 0xD9, 0x8A, 0x46, 0xD9, 0x8A, + 0xD9, 0x94, 0xD8, 0xA7, 0x46, 0xD9, 0x8A, 0xD9, + 0x94, 0xD8, 0xAC, 0x46, 0xD9, 0x8A, 0xD9, 0x94, + // Bytes 25c0 - 25ff + 0xD8, 0xAD, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, + 0xAE, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xB1, + 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD8, 0xB2, 0x46, + 0xD9, 0x8A, 0xD9, 0x94, 0xD9, 0x85, 0x46, 0xD9, + 0x8A, 0xD9, 0x94, 0xD9, 0x86, 0x46, 0xD9, 0x8A, + 0xD9, 0x94, 0xD9, 0x87, 0x46, 0xD9, 0x8A, 0xD9, + 0x94, 0xD9, 0x88, 0x46, 0xD9, 0x8A, 0xD9, 0x94, + 0xD9, 0x89, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xD9, + // Bytes 2600 - 263f + 0x8A, 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x86, + 0x46, 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x87, 0x46, + 0xD9, 0x8A, 0xD9, 0x94, 0xDB, 0x88, 0x46, 0xD9, + 0x8A, 0xD9, 0x94, 0xDB, 0x90, 0x46, 0xD9, 0x8A, + 0xD9, 0x94, 0xDB, 0x95, 0x46, 0xE0, 0xB9, 0x8D, + 0xE0, 0xB8, 0xB2, 0x46, 0xE0, 0xBA, 0xAB, 0xE0, + 0xBA, 0x99, 0x46, 0xE0, 0xBA, 0xAB, 0xE0, 0xBA, + 0xA1, 0x46, 0xE0, 0xBB, 0x8D, 0xE0, 0xBA, 0xB2, + // Bytes 2640 - 267f + 0x46, 0xE0, 0xBD, 0x80, 0xE0, 0xBE, 0xB5, 0x46, + 0xE0, 0xBD, 0x82, 0xE0, 0xBE, 0xB7, 0x46, 0xE0, + 0xBD, 0x8C, 0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBD, + 0x91, 0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBD, 0x96, + 0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBD, 0x9B, 0xE0, + 0xBE, 0xB7, 0x46, 0xE0, 0xBE, 0x90, 0xE0, 0xBE, + 0xB5, 0x46, 0xE0, 0xBE, 0x92, 0xE0, 0xBE, 0xB7, + 0x46, 0xE0, 0xBE, 0x9C, 0xE0, 0xBE, 0xB7, 0x46, + // Bytes 2680 - 26bf + 0xE0, 0xBE, 0xA1, 0xE0, 0xBE, 0xB7, 0x46, 0xE0, + 0xBE, 0xA6, 0xE0, 0xBE, 0xB7, 0x46, 0xE0, 0xBE, + 0xAB, 0xE0, 0xBE, 0xB7, 0x46, 0xE2, 0x80, 0xB2, + 0xE2, 0x80, 0xB2, 0x46, 0xE2, 0x80, 0xB5, 0xE2, + 0x80, 0xB5, 0x46, 0xE2, 0x88, 0xAB, 0xE2, 0x88, + 0xAB, 0x46, 0xE2, 0x88, 0xAE, 0xE2, 0x88, 0xAE, + 0x46, 0xE3, 0x81, 0xBB, 0xE3, 0x81, 0x8B, 0x46, + 0xE3, 0x82, 0x88, 0xE3, 0x82, 0x8A, 0x46, 0xE3, + // Bytes 26c0 - 26ff + 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0x46, 0xE3, 0x82, + 0xB3, 0xE3, 0x82, 0xB3, 0x46, 0xE3, 0x82, 0xB3, + 0xE3, 0x83, 0x88, 0x46, 0xE3, 0x83, 0x88, 0xE3, + 0x83, 0xB3, 0x46, 0xE3, 0x83, 0x8A, 0xE3, 0x83, + 0x8E, 0x46, 0xE3, 0x83, 0x9B, 0xE3, 0x83, 0xB3, + 0x46, 0xE3, 0x83, 0x9F, 0xE3, 0x83, 0xAA, 0x46, + 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0xA9, 0x46, 0xE3, + 0x83, 0xAC, 0xE3, 0x83, 0xA0, 0x46, 0xE5, 0xA4, + // Bytes 2700 - 273f + 0xA7, 0xE6, 0xAD, 0xA3, 0x46, 0xE5, 0xB9, 0xB3, + 0xE6, 0x88, 0x90, 0x46, 0xE6, 0x98, 0x8E, 0xE6, + 0xB2, 0xBB, 0x46, 0xE6, 0x98, 0xAD, 0xE5, 0x92, + 0x8C, 0x47, 0x72, 0x61, 0x64, 0xE2, 0x88, 0x95, + 0x73, 0x47, 0xE3, 0x80, 0x94, 0x53, 0xE3, 0x80, + 0x95, 0x48, 0x28, 0xE1, 0x84, 0x80, 0xE1, 0x85, + 0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x82, 0xE1, + 0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x83, + // Bytes 2740 - 277f + 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, + 0x85, 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1, + 0x84, 0x86, 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28, + 0xE1, 0x84, 0x87, 0xE1, 0x85, 0xA1, 0x29, 0x48, + 0x28, 0xE1, 0x84, 0x89, 0xE1, 0x85, 0xA1, 0x29, + 0x48, 0x28, 0xE1, 0x84, 0x8B, 0xE1, 0x85, 0xA1, + 0x29, 0x48, 0x28, 0xE1, 0x84, 0x8C, 0xE1, 0x85, + 0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x8C, 0xE1, + // Bytes 2780 - 27bf + 0x85, 0xAE, 0x29, 0x48, 0x28, 0xE1, 0x84, 0x8E, + 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1, 0x84, + 0x8F, 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28, 0xE1, + 0x84, 0x90, 0xE1, 0x85, 0xA1, 0x29, 0x48, 0x28, + 0xE1, 0x84, 0x91, 0xE1, 0x85, 0xA1, 0x29, 0x48, + 0x28, 0xE1, 0x84, 0x92, 0xE1, 0x85, 0xA1, 0x29, + 0x48, 0x72, 0x61, 0x64, 0xE2, 0x88, 0x95, 0x73, + 0x32, 0x48, 0xD8, 0xA7, 0xD9, 0x83, 0xD8, 0xA8, + // Bytes 27c0 - 27ff + 0xD8, 0xB1, 0x48, 0xD8, 0xA7, 0xD9, 0x84, 0xD9, + 0x84, 0xD9, 0x87, 0x48, 0xD8, 0xB1, 0xD8, 0xB3, + 0xD9, 0x88, 0xD9, 0x84, 0x48, 0xD8, 0xB1, 0xDB, + 0x8C, 0xD8, 0xA7, 0xD9, 0x84, 0x48, 0xD8, 0xB5, + 0xD9, 0x84, 0xD8, 0xB9, 0xD9, 0x85, 0x48, 0xD8, + 0xB9, 0xD9, 0x84, 0xD9, 0x8A, 0xD9, 0x87, 0x48, + 0xD9, 0x85, 0xD8, 0xAD, 0xD9, 0x85, 0xD8, 0xAF, + 0x48, 0xD9, 0x88, 0xD8, 0xB3, 0xD9, 0x84, 0xD9, + // Bytes 2800 - 283f + 0x85, 0x49, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, + 0xE2, 0x80, 0xB2, 0x49, 0xE2, 0x80, 0xB5, 0xE2, + 0x80, 0xB5, 0xE2, 0x80, 0xB5, 0x49, 0xE2, 0x88, + 0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0x49, + 0xE2, 0x88, 0xAE, 0xE2, 0x88, 0xAE, 0xE2, 0x88, + 0xAE, 0x49, 0xE3, 0x80, 0x94, 0xE4, 0xB8, 0x89, + 0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80, 0x94, 0xE4, + 0xBA, 0x8C, 0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80, + // Bytes 2840 - 287f + 0x94, 0xE5, 0x8B, 0x9D, 0xE3, 0x80, 0x95, 0x49, + 0xE3, 0x80, 0x94, 0xE5, 0xAE, 0x89, 0xE3, 0x80, + 0x95, 0x49, 0xE3, 0x80, 0x94, 0xE6, 0x89, 0x93, + 0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80, 0x94, 0xE6, + 0x95, 0x97, 0xE3, 0x80, 0x95, 0x49, 0xE3, 0x80, + 0x94, 0xE6, 0x9C, 0xAC, 0xE3, 0x80, 0x95, 0x49, + 0xE3, 0x80, 0x94, 0xE7, 0x82, 0xB9, 0xE3, 0x80, + 0x95, 0x49, 0xE3, 0x80, 0x94, 0xE7, 0x9B, 0x97, + // Bytes 2880 - 28bf + 0xE3, 0x80, 0x95, 0x49, 0xE3, 0x82, 0xA2, 0xE3, + 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0x49, 0xE3, 0x82, + 0xA4, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x81, 0x49, + 0xE3, 0x82, 0xA6, 0xE3, 0x82, 0xA9, 0xE3, 0x83, + 0xB3, 0x49, 0xE3, 0x82, 0xAA, 0xE3, 0x83, 0xB3, + 0xE3, 0x82, 0xB9, 0x49, 0xE3, 0x82, 0xAA, 0xE3, + 0x83, 0xBC, 0xE3, 0x83, 0xA0, 0x49, 0xE3, 0x82, + 0xAB, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xAA, 0x49, + // Bytes 28c0 - 28ff + 0xE3, 0x82, 0xB1, 0xE3, 0x83, 0xBC, 0xE3, 0x82, + 0xB9, 0x49, 0xE3, 0x82, 0xB3, 0xE3, 0x83, 0xAB, + 0xE3, 0x83, 0x8A, 0x49, 0xE3, 0x82, 0xBB, 0xE3, + 0x83, 0xB3, 0xE3, 0x83, 0x81, 0x49, 0xE3, 0x82, + 0xBB, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, 0x49, + 0xE3, 0x83, 0x86, 0xE3, 0x82, 0x99, 0xE3, 0x82, + 0xB7, 0x49, 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, + 0xE3, 0x83, 0xAB, 0x49, 0xE3, 0x83, 0x8E, 0xE3, + // Bytes 2900 - 293f + 0x83, 0x83, 0xE3, 0x83, 0x88, 0x49, 0xE3, 0x83, + 0x8F, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0x84, 0x49, + 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x99, 0xE3, 0x83, + 0xAB, 0x49, 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, + 0xE3, 0x82, 0xB3, 0x49, 0xE3, 0x83, 0x95, 0xE3, + 0x83, 0xA9, 0xE3, 0x83, 0xB3, 0x49, 0xE3, 0x83, + 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xBD, 0x49, + 0xE3, 0x83, 0x98, 0xE3, 0x83, 0xAB, 0xE3, 0x83, + // Bytes 2940 - 297f + 0x84, 0x49, 0xE3, 0x83, 0x9B, 0xE3, 0x83, 0xBC, + 0xE3, 0x83, 0xAB, 0x49, 0xE3, 0x83, 0x9B, 0xE3, + 0x83, 0xBC, 0xE3, 0x83, 0xB3, 0x49, 0xE3, 0x83, + 0x9E, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xAB, 0x49, + 0xE3, 0x83, 0x9E, 0xE3, 0x83, 0x83, 0xE3, 0x83, + 0x8F, 0x49, 0xE3, 0x83, 0x9E, 0xE3, 0x83, 0xAB, + 0xE3, 0x82, 0xAF, 0x49, 0xE3, 0x83, 0xA4, 0xE3, + 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0x49, 0xE3, 0x83, + // Bytes 2980 - 29bf + 0xA6, 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xB3, 0x49, + 0xE3, 0x83, 0xAF, 0xE3, 0x83, 0x83, 0xE3, 0x83, + 0x88, 0x4C, 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, + 0xE2, 0x80, 0xB2, 0xE2, 0x80, 0xB2, 0x4C, 0xE2, + 0x88, 0xAB, 0xE2, 0x88, 0xAB, 0xE2, 0x88, 0xAB, + 0xE2, 0x88, 0xAB, 0x4C, 0xE3, 0x82, 0xA2, 0xE3, + 0x83, 0xAB, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0xA1, + 0x4C, 0xE3, 0x82, 0xA8, 0xE3, 0x83, 0xBC, 0xE3, + // Bytes 29c0 - 29ff + 0x82, 0xAB, 0xE3, 0x83, 0xBC, 0x4C, 0xE3, 0x82, + 0xAB, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAD, 0xE3, + 0x83, 0xB3, 0x4C, 0xE3, 0x82, 0xAB, 0xE3, 0x82, + 0x99, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x9E, 0x4C, + 0xE3, 0x82, 0xAB, 0xE3, 0x83, 0xA9, 0xE3, 0x83, + 0x83, 0xE3, 0x83, 0x88, 0x4C, 0xE3, 0x82, 0xAB, + 0xE3, 0x83, 0xAD, 0xE3, 0x83, 0xAA, 0xE3, 0x83, + 0xBC, 0x4C, 0xE3, 0x82, 0xAD, 0xE3, 0x82, 0x99, + // Bytes 2a00 - 2a3f + 0xE3, 0x83, 0x8B, 0xE3, 0x83, 0xBC, 0x4C, 0xE3, + 0x82, 0xAD, 0xE3, 0x83, 0xA5, 0xE3, 0x83, 0xAA, + 0xE3, 0x83, 0xBC, 0x4C, 0xE3, 0x82, 0xAF, 0xE3, + 0x82, 0x99, 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xA0, + 0x4C, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAD, 0xE3, + 0x83, 0xBC, 0xE3, 0x83, 0x8D, 0x4C, 0xE3, 0x82, + 0xB5, 0xE3, 0x82, 0xA4, 0xE3, 0x82, 0xAF, 0xE3, + 0x83, 0xAB, 0x4C, 0xE3, 0x82, 0xBF, 0xE3, 0x82, + // Bytes 2a40 - 2a7f + 0x99, 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xB9, 0x4C, + 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x9A, 0xE3, 0x83, + 0xBC, 0xE3, 0x83, 0x84, 0x4C, 0xE3, 0x83, 0x92, + 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xAF, 0xE3, 0x83, + 0xAB, 0x4C, 0xE3, 0x83, 0x95, 0xE3, 0x82, 0xA3, + 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0x4C, 0xE3, + 0x83, 0x98, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xBC, + 0xE3, 0x82, 0xBF, 0x4C, 0xE3, 0x83, 0x98, 0xE3, + // Bytes 2a80 - 2abf + 0x82, 0x9A, 0xE3, 0x83, 0x8B, 0xE3, 0x83, 0x92, + 0x4C, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A, 0xE3, + 0x83, 0xB3, 0xE3, 0x82, 0xB9, 0x4C, 0xE3, 0x83, + 0x9B, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, 0xE3, + 0x83, 0x88, 0x4C, 0xE3, 0x83, 0x9E, 0xE3, 0x82, + 0xA4, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xAD, 0x4C, + 0xE3, 0x83, 0x9F, 0xE3, 0x82, 0xAF, 0xE3, 0x83, + 0xAD, 0xE3, 0x83, 0xB3, 0x4C, 0xE3, 0x83, 0xA1, + // Bytes 2ac0 - 2aff + 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, 0x83, + 0xAB, 0x4C, 0xE3, 0x83, 0xAA, 0xE3, 0x83, 0x83, + 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, 0x4C, 0xE3, + 0x83, 0xAB, 0xE3, 0x83, 0x92, 0xE3, 0x82, 0x9A, + 0xE3, 0x83, 0xBC, 0x4C, 0xE6, 0xA0, 0xAA, 0xE5, + 0xBC, 0x8F, 0xE4, 0xBC, 0x9A, 0xE7, 0xA4, 0xBE, + 0x4E, 0x28, 0xE1, 0x84, 0x8B, 0xE1, 0x85, 0xA9, + 0xE1, 0x84, 0x92, 0xE1, 0x85, 0xAE, 0x29, 0x4F, + // Bytes 2b00 - 2b3f + 0xD8, 0xAC, 0xD9, 0x84, 0x20, 0xD8, 0xAC, 0xD9, + 0x84, 0xD8, 0xA7, 0xD9, 0x84, 0xD9, 0x87, 0x4F, + 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0x8F, 0xE3, 0x82, + 0x9A, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0x4F, + 0xE3, 0x82, 0xA2, 0xE3, 0x83, 0xB3, 0xE3, 0x83, + 0x98, 0xE3, 0x82, 0x9A, 0xE3, 0x82, 0xA2, 0x4F, + 0xE3, 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3, 0x83, + 0xAF, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0x4F, + // Bytes 2b40 - 2b7f + 0xE3, 0x82, 0xB5, 0xE3, 0x83, 0xB3, 0xE3, 0x83, + 0x81, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xA0, 0x4F, + 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x99, 0xE3, 0x83, + 0xBC, 0xE3, 0x83, 0xAC, 0xE3, 0x83, 0xAB, 0x4F, + 0xE3, 0x83, 0x98, 0xE3, 0x82, 0xAF, 0xE3, 0x82, + 0xBF, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0xAB, 0x4F, + 0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x9A, 0xE3, 0x82, + 0xA4, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, 0x4F, + // Bytes 2b80 - 2bbf + 0xE3, 0x83, 0x9E, 0xE3, 0x83, 0xB3, 0xE3, 0x82, + 0xB7, 0xE3, 0x83, 0xA7, 0xE3, 0x83, 0xB3, 0x4F, + 0xE3, 0x83, 0xA1, 0xE3, 0x82, 0xAB, 0xE3, 0x82, + 0x99, 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xB3, 0x4F, + 0xE3, 0x83, 0xAB, 0xE3, 0x83, 0xBC, 0xE3, 0x83, + 0x95, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xAB, 0x51, + 0x28, 0xE1, 0x84, 0x8B, 0xE1, 0x85, 0xA9, 0xE1, + 0x84, 0x8C, 0xE1, 0x85, 0xA5, 0xE1, 0x86, 0xAB, + // Bytes 2bc0 - 2bff + 0x29, 0x52, 0xE3, 0x82, 0xAD, 0xE3, 0x82, 0x99, + 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xBF, 0xE3, 0x82, + 0x99, 0xE3, 0x83, 0xBC, 0x52, 0xE3, 0x82, 0xAD, + 0xE3, 0x83, 0xAD, 0xE3, 0x82, 0xAF, 0xE3, 0x82, + 0x99, 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xA0, 0x52, + 0xE3, 0x82, 0xAD, 0xE3, 0x83, 0xAD, 0xE3, 0x83, + 0xA1, 0xE3, 0x83, 0xBC, 0xE3, 0x83, 0x88, 0xE3, + 0x83, 0xAB, 0x52, 0xE3, 0x82, 0xAF, 0xE3, 0x82, + // Bytes 2c00 - 2c3f + 0x99, 0xE3, 0x83, 0xA9, 0xE3, 0x83, 0xA0, 0xE3, + 0x83, 0x88, 0xE3, 0x83, 0xB3, 0x52, 0xE3, 0x82, + 0xAF, 0xE3, 0x83, 0xAB, 0xE3, 0x82, 0xBB, 0xE3, + 0x82, 0x99, 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0xAD, + 0x52, 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x9A, 0xE3, + 0x83, 0xBC, 0xE3, 0x82, 0xBB, 0xE3, 0x83, 0xB3, + 0xE3, 0x83, 0x88, 0x52, 0xE3, 0x83, 0x92, 0xE3, + 0x82, 0x9A, 0xE3, 0x82, 0xA2, 0xE3, 0x82, 0xB9, + // Bytes 2c40 - 2c7f + 0xE3, 0x83, 0x88, 0xE3, 0x83, 0xAB, 0x52, 0xE3, + 0x83, 0x95, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0x83, + 0xE3, 0x82, 0xB7, 0xE3, 0x82, 0xA7, 0xE3, 0x83, + 0xAB, 0x52, 0xE3, 0x83, 0x9F, 0xE3, 0x83, 0xAA, + 0xE3, 0x83, 0x8F, 0xE3, 0x82, 0x99, 0xE3, 0x83, + 0xBC, 0xE3, 0x83, 0xAB, 0x52, 0xE3, 0x83, 0xAC, + 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, 0xE3, 0x82, + 0xB1, 0xE3, 0x82, 0x99, 0xE3, 0x83, 0xB3, 0x61, + // Bytes 2c80 - 2cbf + 0xD8, 0xB5, 0xD9, 0x84, 0xD9, 0x89, 0x20, 0xD8, + 0xA7, 0xD9, 0x84, 0xD9, 0x84, 0xD9, 0x87, 0x20, + 0xD8, 0xB9, 0xD9, 0x84, 0xD9, 0x8A, 0xD9, 0x87, + 0x20, 0xD9, 0x88, 0xD8, 0xB3, 0xD9, 0x84, 0xD9, + 0x85, 0x06, 0xE0, 0xA7, 0x87, 0xE0, 0xA6, 0xBE, + 0x01, 0x06, 0xE0, 0xA7, 0x87, 0xE0, 0xA7, 0x97, + 0x01, 0x06, 0xE0, 0xAD, 0x87, 0xE0, 0xAC, 0xBE, + 0x01, 0x06, 0xE0, 0xAD, 0x87, 0xE0, 0xAD, 0x96, + // Bytes 2cc0 - 2cff + 0x01, 0x06, 0xE0, 0xAD, 0x87, 0xE0, 0xAD, 0x97, + 0x01, 0x06, 0xE0, 0xAE, 0x92, 0xE0, 0xAF, 0x97, + 0x01, 0x06, 0xE0, 0xAF, 0x86, 0xE0, 0xAE, 0xBE, + 0x01, 0x06, 0xE0, 0xAF, 0x86, 0xE0, 0xAF, 0x97, + 0x01, 0x06, 0xE0, 0xAF, 0x87, 0xE0, 0xAE, 0xBE, + 0x01, 0x06, 0xE0, 0xB2, 0xBF, 0xE0, 0xB3, 0x95, + 0x01, 0x06, 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x95, + 0x01, 0x06, 0xE0, 0xB3, 0x86, 0xE0, 0xB3, 0x96, + // Bytes 2d00 - 2d3f + 0x01, 0x06, 0xE0, 0xB5, 0x86, 0xE0, 0xB4, 0xBE, + 0x01, 0x06, 0xE0, 0xB5, 0x86, 0xE0, 0xB5, 0x97, + 0x01, 0x06, 0xE0, 0xB5, 0x87, 0xE0, 0xB4, 0xBE, + 0x01, 0x06, 0xE0, 0xB7, 0x99, 0xE0, 0xB7, 0x9F, + 0x01, 0x06, 0xE1, 0x80, 0xA5, 0xE1, 0x80, 0xAE, + 0x01, 0x06, 0xE1, 0xAC, 0x85, 0xE1, 0xAC, 0xB5, + 0x01, 0x06, 0xE1, 0xAC, 0x87, 0xE1, 0xAC, 0xB5, + 0x01, 0x06, 0xE1, 0xAC, 0x89, 0xE1, 0xAC, 0xB5, + // Bytes 2d40 - 2d7f + 0x01, 0x06, 0xE1, 0xAC, 0x8B, 0xE1, 0xAC, 0xB5, + 0x01, 0x06, 0xE1, 0xAC, 0x8D, 0xE1, 0xAC, 0xB5, + 0x01, 0x06, 0xE1, 0xAC, 0x91, 0xE1, 0xAC, 0xB5, + 0x01, 0x06, 0xE1, 0xAC, 0xBA, 0xE1, 0xAC, 0xB5, + 0x01, 0x06, 0xE1, 0xAC, 0xBC, 0xE1, 0xAC, 0xB5, + 0x01, 0x06, 0xE1, 0xAC, 0xBE, 0xE1, 0xAC, 0xB5, + 0x01, 0x06, 0xE1, 0xAC, 0xBF, 0xE1, 0xAC, 0xB5, + 0x01, 0x06, 0xE1, 0xAD, 0x82, 0xE1, 0xAC, 0xB5, + // Bytes 2d80 - 2dbf + 0x01, 0x08, 0xF0, 0x91, 0x84, 0xB1, 0xF0, 0x91, + 0x84, 0xA7, 0x01, 0x08, 0xF0, 0x91, 0x84, 0xB2, + 0xF0, 0x91, 0x84, 0xA7, 0x01, 0x08, 0xF0, 0x91, + 0x8D, 0x87, 0xF0, 0x91, 0x8C, 0xBE, 0x01, 0x08, + 0xF0, 0x91, 0x8D, 0x87, 0xF0, 0x91, 0x8D, 0x97, + 0x01, 0x08, 0xF0, 0x91, 0x92, 0xB9, 0xF0, 0x91, + 0x92, 0xB0, 0x01, 0x08, 0xF0, 0x91, 0x92, 0xB9, + 0xF0, 0x91, 0x92, 0xBA, 0x01, 0x08, 0xF0, 0x91, + // Bytes 2dc0 - 2dff + 0x92, 0xB9, 0xF0, 0x91, 0x92, 0xBD, 0x01, 0x08, + 0xF0, 0x91, 0x96, 0xB8, 0xF0, 0x91, 0x96, 0xAF, + 0x01, 0x08, 0xF0, 0x91, 0x96, 0xB9, 0xF0, 0x91, + 0x96, 0xAF, 0x01, 0x09, 0xE0, 0xB3, 0x86, 0xE0, + 0xB3, 0x82, 0xE0, 0xB3, 0x95, 0x02, 0x09, 0xE0, + 0xB7, 0x99, 0xE0, 0xB7, 0x8F, 0xE0, 0xB7, 0x8A, + 0x12, 0x44, 0x44, 0x5A, 0xCC, 0x8C, 0xC9, 0x44, + 0x44, 0x7A, 0xCC, 0x8C, 0xC9, 0x44, 0x64, 0x7A, + // Bytes 2e00 - 2e3f + 0xCC, 0x8C, 0xC9, 0x46, 0xD9, 0x84, 0xD8, 0xA7, + 0xD9, 0x93, 0xC9, 0x46, 0xD9, 0x84, 0xD8, 0xA7, + 0xD9, 0x94, 0xC9, 0x46, 0xD9, 0x84, 0xD8, 0xA7, + 0xD9, 0x95, 0xB5, 0x46, 0xE1, 0x84, 0x80, 0xE1, + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x82, 0xE1, + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x83, 0xE1, + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x85, 0xE1, + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x86, 0xE1, + // Bytes 2e40 - 2e7f + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x87, 0xE1, + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x89, 0xE1, + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x8B, 0xE1, + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x8B, 0xE1, + 0x85, 0xAE, 0x01, 0x46, 0xE1, 0x84, 0x8C, 0xE1, + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x8E, 0xE1, + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x8F, 0xE1, + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x90, 0xE1, + // Bytes 2e80 - 2ebf + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x91, 0xE1, + 0x85, 0xA1, 0x01, 0x46, 0xE1, 0x84, 0x92, 0xE1, + 0x85, 0xA1, 0x01, 0x49, 0xE3, 0x83, 0xA1, 0xE3, + 0x82, 0xAB, 0xE3, 0x82, 0x99, 0x0D, 0x4C, 0xE1, + 0x84, 0x8C, 0xE1, 0x85, 0xAE, 0xE1, 0x84, 0x8B, + 0xE1, 0x85, 0xB4, 0x01, 0x4C, 0xE3, 0x82, 0xAD, + 0xE3, 0x82, 0x99, 0xE3, 0x82, 0xAB, 0xE3, 0x82, + 0x99, 0x0D, 0x4C, 0xE3, 0x82, 0xB3, 0xE3, 0x83, + // Bytes 2ec0 - 2eff + 0xBC, 0xE3, 0x83, 0x9B, 0xE3, 0x82, 0x9A, 0x0D, + 0x4C, 0xE3, 0x83, 0xA4, 0xE3, 0x83, 0xBC, 0xE3, + 0x83, 0x88, 0xE3, 0x82, 0x99, 0x0D, 0x4F, 0xE1, + 0x84, 0x8E, 0xE1, 0x85, 0xA1, 0xE1, 0x86, 0xB7, + 0xE1, 0x84, 0x80, 0xE1, 0x85, 0xA9, 0x01, 0x4F, + 0xE3, 0x82, 0xA4, 0xE3, 0x83, 0x8B, 0xE3, 0x83, + 0xB3, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, 0x0D, + 0x4F, 0xE3, 0x82, 0xB7, 0xE3, 0x83, 0xAA, 0xE3, + // Bytes 2f00 - 2f3f + 0x83, 0xB3, 0xE3, 0x82, 0xAF, 0xE3, 0x82, 0x99, + 0x0D, 0x4F, 0xE3, 0x83, 0x98, 0xE3, 0x82, 0x9A, + 0xE3, 0x83, 0xBC, 0xE3, 0x82, 0xB7, 0xE3, 0x82, + 0x99, 0x0D, 0x4F, 0xE3, 0x83, 0x9B, 0xE3, 0x82, + 0x9A, 0xE3, 0x83, 0xB3, 0xE3, 0x83, 0x88, 0xE3, + 0x82, 0x99, 0x0D, 0x52, 0xE3, 0x82, 0xA8, 0xE3, + 0x82, 0xB9, 0xE3, 0x82, 0xAF, 0xE3, 0x83, 0xBC, + 0xE3, 0x83, 0x88, 0xE3, 0x82, 0x99, 0x0D, 0x52, + // Bytes 2f40 - 2f7f + 0xE3, 0x83, 0x95, 0xE3, 0x82, 0xA1, 0xE3, 0x83, + 0xA9, 0xE3, 0x83, 0x83, 0xE3, 0x83, 0x88, 0xE3, + 0x82, 0x99, 0x0D, 0x86, 0xE0, 0xB3, 0x86, 0xE0, + 0xB3, 0x82, 0x01, 0x86, 0xE0, 0xB7, 0x99, 0xE0, + 0xB7, 0x8F, 0x01, 0x03, 0x3C, 0xCC, 0xB8, 0x05, + 0x03, 0x3D, 0xCC, 0xB8, 0x05, 0x03, 0x3E, 0xCC, + 0xB8, 0x05, 0x03, 0x41, 0xCC, 0x80, 0xC9, 0x03, + 0x41, 0xCC, 0x81, 0xC9, 0x03, 0x41, 0xCC, 0x83, + // Bytes 2f80 - 2fbf + 0xC9, 0x03, 0x41, 0xCC, 0x84, 0xC9, 0x03, 0x41, + 0xCC, 0x89, 0xC9, 0x03, 0x41, 0xCC, 0x8C, 0xC9, + 0x03, 0x41, 0xCC, 0x8F, 0xC9, 0x03, 0x41, 0xCC, + 0x91, 0xC9, 0x03, 0x41, 0xCC, 0xA5, 0xB5, 0x03, + 0x41, 0xCC, 0xA8, 0xA5, 0x03, 0x42, 0xCC, 0x87, + 0xC9, 0x03, 0x42, 0xCC, 0xA3, 0xB5, 0x03, 0x42, + 0xCC, 0xB1, 0xB5, 0x03, 0x43, 0xCC, 0x81, 0xC9, + 0x03, 0x43, 0xCC, 0x82, 0xC9, 0x03, 0x43, 0xCC, + // Bytes 2fc0 - 2fff + 0x87, 0xC9, 0x03, 0x43, 0xCC, 0x8C, 0xC9, 0x03, + 0x44, 0xCC, 0x87, 0xC9, 0x03, 0x44, 0xCC, 0x8C, + 0xC9, 0x03, 0x44, 0xCC, 0xA3, 0xB5, 0x03, 0x44, + 0xCC, 0xA7, 0xA5, 0x03, 0x44, 0xCC, 0xAD, 0xB5, + 0x03, 0x44, 0xCC, 0xB1, 0xB5, 0x03, 0x45, 0xCC, + 0x80, 0xC9, 0x03, 0x45, 0xCC, 0x81, 0xC9, 0x03, + 0x45, 0xCC, 0x83, 0xC9, 0x03, 0x45, 0xCC, 0x86, + 0xC9, 0x03, 0x45, 0xCC, 0x87, 0xC9, 0x03, 0x45, + // Bytes 3000 - 303f + 0xCC, 0x88, 0xC9, 0x03, 0x45, 0xCC, 0x89, 0xC9, + 0x03, 0x45, 0xCC, 0x8C, 0xC9, 0x03, 0x45, 0xCC, + 0x8F, 0xC9, 0x03, 0x45, 0xCC, 0x91, 0xC9, 0x03, + 0x45, 0xCC, 0xA8, 0xA5, 0x03, 0x45, 0xCC, 0xAD, + 0xB5, 0x03, 0x45, 0xCC, 0xB0, 0xB5, 0x03, 0x46, + 0xCC, 0x87, 0xC9, 0x03, 0x47, 0xCC, 0x81, 0xC9, + 0x03, 0x47, 0xCC, 0x82, 0xC9, 0x03, 0x47, 0xCC, + 0x84, 0xC9, 0x03, 0x47, 0xCC, 0x86, 0xC9, 0x03, + // Bytes 3040 - 307f + 0x47, 0xCC, 0x87, 0xC9, 0x03, 0x47, 0xCC, 0x8C, + 0xC9, 0x03, 0x47, 0xCC, 0xA7, 0xA5, 0x03, 0x48, + 0xCC, 0x82, 0xC9, 0x03, 0x48, 0xCC, 0x87, 0xC9, + 0x03, 0x48, 0xCC, 0x88, 0xC9, 0x03, 0x48, 0xCC, + 0x8C, 0xC9, 0x03, 0x48, 0xCC, 0xA3, 0xB5, 0x03, + 0x48, 0xCC, 0xA7, 0xA5, 0x03, 0x48, 0xCC, 0xAE, + 0xB5, 0x03, 0x49, 0xCC, 0x80, 0xC9, 0x03, 0x49, + 0xCC, 0x81, 0xC9, 0x03, 0x49, 0xCC, 0x82, 0xC9, + // Bytes 3080 - 30bf + 0x03, 0x49, 0xCC, 0x83, 0xC9, 0x03, 0x49, 0xCC, + 0x84, 0xC9, 0x03, 0x49, 0xCC, 0x86, 0xC9, 0x03, + 0x49, 0xCC, 0x87, 0xC9, 0x03, 0x49, 0xCC, 0x89, + 0xC9, 0x03, 0x49, 0xCC, 0x8C, 0xC9, 0x03, 0x49, + 0xCC, 0x8F, 0xC9, 0x03, 0x49, 0xCC, 0x91, 0xC9, + 0x03, 0x49, 0xCC, 0xA3, 0xB5, 0x03, 0x49, 0xCC, + 0xA8, 0xA5, 0x03, 0x49, 0xCC, 0xB0, 0xB5, 0x03, + 0x4A, 0xCC, 0x82, 0xC9, 0x03, 0x4B, 0xCC, 0x81, + // Bytes 30c0 - 30ff + 0xC9, 0x03, 0x4B, 0xCC, 0x8C, 0xC9, 0x03, 0x4B, + 0xCC, 0xA3, 0xB5, 0x03, 0x4B, 0xCC, 0xA7, 0xA5, + 0x03, 0x4B, 0xCC, 0xB1, 0xB5, 0x03, 0x4C, 0xCC, + 0x81, 0xC9, 0x03, 0x4C, 0xCC, 0x8C, 0xC9, 0x03, + 0x4C, 0xCC, 0xA7, 0xA5, 0x03, 0x4C, 0xCC, 0xAD, + 0xB5, 0x03, 0x4C, 0xCC, 0xB1, 0xB5, 0x03, 0x4D, + 0xCC, 0x81, 0xC9, 0x03, 0x4D, 0xCC, 0x87, 0xC9, + 0x03, 0x4D, 0xCC, 0xA3, 0xB5, 0x03, 0x4E, 0xCC, + // Bytes 3100 - 313f + 0x80, 0xC9, 0x03, 0x4E, 0xCC, 0x81, 0xC9, 0x03, + 0x4E, 0xCC, 0x83, 0xC9, 0x03, 0x4E, 0xCC, 0x87, + 0xC9, 0x03, 0x4E, 0xCC, 0x8C, 0xC9, 0x03, 0x4E, + 0xCC, 0xA3, 0xB5, 0x03, 0x4E, 0xCC, 0xA7, 0xA5, + 0x03, 0x4E, 0xCC, 0xAD, 0xB5, 0x03, 0x4E, 0xCC, + 0xB1, 0xB5, 0x03, 0x4F, 0xCC, 0x80, 0xC9, 0x03, + 0x4F, 0xCC, 0x81, 0xC9, 0x03, 0x4F, 0xCC, 0x86, + 0xC9, 0x03, 0x4F, 0xCC, 0x89, 0xC9, 0x03, 0x4F, + // Bytes 3140 - 317f + 0xCC, 0x8B, 0xC9, 0x03, 0x4F, 0xCC, 0x8C, 0xC9, + 0x03, 0x4F, 0xCC, 0x8F, 0xC9, 0x03, 0x4F, 0xCC, + 0x91, 0xC9, 0x03, 0x50, 0xCC, 0x81, 0xC9, 0x03, + 0x50, 0xCC, 0x87, 0xC9, 0x03, 0x52, 0xCC, 0x81, + 0xC9, 0x03, 0x52, 0xCC, 0x87, 0xC9, 0x03, 0x52, + 0xCC, 0x8C, 0xC9, 0x03, 0x52, 0xCC, 0x8F, 0xC9, + 0x03, 0x52, 0xCC, 0x91, 0xC9, 0x03, 0x52, 0xCC, + 0xA7, 0xA5, 0x03, 0x52, 0xCC, 0xB1, 0xB5, 0x03, + // Bytes 3180 - 31bf + 0x53, 0xCC, 0x82, 0xC9, 0x03, 0x53, 0xCC, 0x87, + 0xC9, 0x03, 0x53, 0xCC, 0xA6, 0xB5, 0x03, 0x53, + 0xCC, 0xA7, 0xA5, 0x03, 0x54, 0xCC, 0x87, 0xC9, + 0x03, 0x54, 0xCC, 0x8C, 0xC9, 0x03, 0x54, 0xCC, + 0xA3, 0xB5, 0x03, 0x54, 0xCC, 0xA6, 0xB5, 0x03, + 0x54, 0xCC, 0xA7, 0xA5, 0x03, 0x54, 0xCC, 0xAD, + 0xB5, 0x03, 0x54, 0xCC, 0xB1, 0xB5, 0x03, 0x55, + 0xCC, 0x80, 0xC9, 0x03, 0x55, 0xCC, 0x81, 0xC9, + // Bytes 31c0 - 31ff + 0x03, 0x55, 0xCC, 0x82, 0xC9, 0x03, 0x55, 0xCC, + 0x86, 0xC9, 0x03, 0x55, 0xCC, 0x89, 0xC9, 0x03, + 0x55, 0xCC, 0x8A, 0xC9, 0x03, 0x55, 0xCC, 0x8B, + 0xC9, 0x03, 0x55, 0xCC, 0x8C, 0xC9, 0x03, 0x55, + 0xCC, 0x8F, 0xC9, 0x03, 0x55, 0xCC, 0x91, 0xC9, + 0x03, 0x55, 0xCC, 0xA3, 0xB5, 0x03, 0x55, 0xCC, + 0xA4, 0xB5, 0x03, 0x55, 0xCC, 0xA8, 0xA5, 0x03, + 0x55, 0xCC, 0xAD, 0xB5, 0x03, 0x55, 0xCC, 0xB0, + // Bytes 3200 - 323f + 0xB5, 0x03, 0x56, 0xCC, 0x83, 0xC9, 0x03, 0x56, + 0xCC, 0xA3, 0xB5, 0x03, 0x57, 0xCC, 0x80, 0xC9, + 0x03, 0x57, 0xCC, 0x81, 0xC9, 0x03, 0x57, 0xCC, + 0x82, 0xC9, 0x03, 0x57, 0xCC, 0x87, 0xC9, 0x03, + 0x57, 0xCC, 0x88, 0xC9, 0x03, 0x57, 0xCC, 0xA3, + 0xB5, 0x03, 0x58, 0xCC, 0x87, 0xC9, 0x03, 0x58, + 0xCC, 0x88, 0xC9, 0x03, 0x59, 0xCC, 0x80, 0xC9, + 0x03, 0x59, 0xCC, 0x81, 0xC9, 0x03, 0x59, 0xCC, + // Bytes 3240 - 327f + 0x82, 0xC9, 0x03, 0x59, 0xCC, 0x83, 0xC9, 0x03, + 0x59, 0xCC, 0x84, 0xC9, 0x03, 0x59, 0xCC, 0x87, + 0xC9, 0x03, 0x59, 0xCC, 0x88, 0xC9, 0x03, 0x59, + 0xCC, 0x89, 0xC9, 0x03, 0x59, 0xCC, 0xA3, 0xB5, + 0x03, 0x5A, 0xCC, 0x81, 0xC9, 0x03, 0x5A, 0xCC, + 0x82, 0xC9, 0x03, 0x5A, 0xCC, 0x87, 0xC9, 0x03, + 0x5A, 0xCC, 0x8C, 0xC9, 0x03, 0x5A, 0xCC, 0xA3, + 0xB5, 0x03, 0x5A, 0xCC, 0xB1, 0xB5, 0x03, 0x61, + // Bytes 3280 - 32bf + 0xCC, 0x80, 0xC9, 0x03, 0x61, 0xCC, 0x81, 0xC9, + 0x03, 0x61, 0xCC, 0x83, 0xC9, 0x03, 0x61, 0xCC, + 0x84, 0xC9, 0x03, 0x61, 0xCC, 0x89, 0xC9, 0x03, + 0x61, 0xCC, 0x8C, 0xC9, 0x03, 0x61, 0xCC, 0x8F, + 0xC9, 0x03, 0x61, 0xCC, 0x91, 0xC9, 0x03, 0x61, + 0xCC, 0xA5, 0xB5, 0x03, 0x61, 0xCC, 0xA8, 0xA5, + 0x03, 0x62, 0xCC, 0x87, 0xC9, 0x03, 0x62, 0xCC, + 0xA3, 0xB5, 0x03, 0x62, 0xCC, 0xB1, 0xB5, 0x03, + // Bytes 32c0 - 32ff + 0x63, 0xCC, 0x81, 0xC9, 0x03, 0x63, 0xCC, 0x82, + 0xC9, 0x03, 0x63, 0xCC, 0x87, 0xC9, 0x03, 0x63, + 0xCC, 0x8C, 0xC9, 0x03, 0x64, 0xCC, 0x87, 0xC9, + 0x03, 0x64, 0xCC, 0x8C, 0xC9, 0x03, 0x64, 0xCC, + 0xA3, 0xB5, 0x03, 0x64, 0xCC, 0xA7, 0xA5, 0x03, + 0x64, 0xCC, 0xAD, 0xB5, 0x03, 0x64, 0xCC, 0xB1, + 0xB5, 0x03, 0x65, 0xCC, 0x80, 0xC9, 0x03, 0x65, + 0xCC, 0x81, 0xC9, 0x03, 0x65, 0xCC, 0x83, 0xC9, + // Bytes 3300 - 333f + 0x03, 0x65, 0xCC, 0x86, 0xC9, 0x03, 0x65, 0xCC, + 0x87, 0xC9, 0x03, 0x65, 0xCC, 0x88, 0xC9, 0x03, + 0x65, 0xCC, 0x89, 0xC9, 0x03, 0x65, 0xCC, 0x8C, + 0xC9, 0x03, 0x65, 0xCC, 0x8F, 0xC9, 0x03, 0x65, + 0xCC, 0x91, 0xC9, 0x03, 0x65, 0xCC, 0xA8, 0xA5, + 0x03, 0x65, 0xCC, 0xAD, 0xB5, 0x03, 0x65, 0xCC, + 0xB0, 0xB5, 0x03, 0x66, 0xCC, 0x87, 0xC9, 0x03, + 0x67, 0xCC, 0x81, 0xC9, 0x03, 0x67, 0xCC, 0x82, + // Bytes 3340 - 337f + 0xC9, 0x03, 0x67, 0xCC, 0x84, 0xC9, 0x03, 0x67, + 0xCC, 0x86, 0xC9, 0x03, 0x67, 0xCC, 0x87, 0xC9, + 0x03, 0x67, 0xCC, 0x8C, 0xC9, 0x03, 0x67, 0xCC, + 0xA7, 0xA5, 0x03, 0x68, 0xCC, 0x82, 0xC9, 0x03, + 0x68, 0xCC, 0x87, 0xC9, 0x03, 0x68, 0xCC, 0x88, + 0xC9, 0x03, 0x68, 0xCC, 0x8C, 0xC9, 0x03, 0x68, + 0xCC, 0xA3, 0xB5, 0x03, 0x68, 0xCC, 0xA7, 0xA5, + 0x03, 0x68, 0xCC, 0xAE, 0xB5, 0x03, 0x68, 0xCC, + // Bytes 3380 - 33bf + 0xB1, 0xB5, 0x03, 0x69, 0xCC, 0x80, 0xC9, 0x03, + 0x69, 0xCC, 0x81, 0xC9, 0x03, 0x69, 0xCC, 0x82, + 0xC9, 0x03, 0x69, 0xCC, 0x83, 0xC9, 0x03, 0x69, + 0xCC, 0x84, 0xC9, 0x03, 0x69, 0xCC, 0x86, 0xC9, + 0x03, 0x69, 0xCC, 0x89, 0xC9, 0x03, 0x69, 0xCC, + 0x8C, 0xC9, 0x03, 0x69, 0xCC, 0x8F, 0xC9, 0x03, + 0x69, 0xCC, 0x91, 0xC9, 0x03, 0x69, 0xCC, 0xA3, + 0xB5, 0x03, 0x69, 0xCC, 0xA8, 0xA5, 0x03, 0x69, + // Bytes 33c0 - 33ff + 0xCC, 0xB0, 0xB5, 0x03, 0x6A, 0xCC, 0x82, 0xC9, + 0x03, 0x6A, 0xCC, 0x8C, 0xC9, 0x03, 0x6B, 0xCC, + 0x81, 0xC9, 0x03, 0x6B, 0xCC, 0x8C, 0xC9, 0x03, + 0x6B, 0xCC, 0xA3, 0xB5, 0x03, 0x6B, 0xCC, 0xA7, + 0xA5, 0x03, 0x6B, 0xCC, 0xB1, 0xB5, 0x03, 0x6C, + 0xCC, 0x81, 0xC9, 0x03, 0x6C, 0xCC, 0x8C, 0xC9, + 0x03, 0x6C, 0xCC, 0xA7, 0xA5, 0x03, 0x6C, 0xCC, + 0xAD, 0xB5, 0x03, 0x6C, 0xCC, 0xB1, 0xB5, 0x03, + // Bytes 3400 - 343f + 0x6D, 0xCC, 0x81, 0xC9, 0x03, 0x6D, 0xCC, 0x87, + 0xC9, 0x03, 0x6D, 0xCC, 0xA3, 0xB5, 0x03, 0x6E, + 0xCC, 0x80, 0xC9, 0x03, 0x6E, 0xCC, 0x81, 0xC9, + 0x03, 0x6E, 0xCC, 0x83, 0xC9, 0x03, 0x6E, 0xCC, + 0x87, 0xC9, 0x03, 0x6E, 0xCC, 0x8C, 0xC9, 0x03, + 0x6E, 0xCC, 0xA3, 0xB5, 0x03, 0x6E, 0xCC, 0xA7, + 0xA5, 0x03, 0x6E, 0xCC, 0xAD, 0xB5, 0x03, 0x6E, + 0xCC, 0xB1, 0xB5, 0x03, 0x6F, 0xCC, 0x80, 0xC9, + // Bytes 3440 - 347f + 0x03, 0x6F, 0xCC, 0x81, 0xC9, 0x03, 0x6F, 0xCC, + 0x86, 0xC9, 0x03, 0x6F, 0xCC, 0x89, 0xC9, 0x03, + 0x6F, 0xCC, 0x8B, 0xC9, 0x03, 0x6F, 0xCC, 0x8C, + 0xC9, 0x03, 0x6F, 0xCC, 0x8F, 0xC9, 0x03, 0x6F, + 0xCC, 0x91, 0xC9, 0x03, 0x70, 0xCC, 0x81, 0xC9, + 0x03, 0x70, 0xCC, 0x87, 0xC9, 0x03, 0x72, 0xCC, + 0x81, 0xC9, 0x03, 0x72, 0xCC, 0x87, 0xC9, 0x03, + 0x72, 0xCC, 0x8C, 0xC9, 0x03, 0x72, 0xCC, 0x8F, + // Bytes 3480 - 34bf + 0xC9, 0x03, 0x72, 0xCC, 0x91, 0xC9, 0x03, 0x72, + 0xCC, 0xA7, 0xA5, 0x03, 0x72, 0xCC, 0xB1, 0xB5, + 0x03, 0x73, 0xCC, 0x82, 0xC9, 0x03, 0x73, 0xCC, + 0x87, 0xC9, 0x03, 0x73, 0xCC, 0xA6, 0xB5, 0x03, + 0x73, 0xCC, 0xA7, 0xA5, 0x03, 0x74, 0xCC, 0x87, + 0xC9, 0x03, 0x74, 0xCC, 0x88, 0xC9, 0x03, 0x74, + 0xCC, 0x8C, 0xC9, 0x03, 0x74, 0xCC, 0xA3, 0xB5, + 0x03, 0x74, 0xCC, 0xA6, 0xB5, 0x03, 0x74, 0xCC, + // Bytes 34c0 - 34ff + 0xA7, 0xA5, 0x03, 0x74, 0xCC, 0xAD, 0xB5, 0x03, + 0x74, 0xCC, 0xB1, 0xB5, 0x03, 0x75, 0xCC, 0x80, + 0xC9, 0x03, 0x75, 0xCC, 0x81, 0xC9, 0x03, 0x75, + 0xCC, 0x82, 0xC9, 0x03, 0x75, 0xCC, 0x86, 0xC9, + 0x03, 0x75, 0xCC, 0x89, 0xC9, 0x03, 0x75, 0xCC, + 0x8A, 0xC9, 0x03, 0x75, 0xCC, 0x8B, 0xC9, 0x03, + 0x75, 0xCC, 0x8C, 0xC9, 0x03, 0x75, 0xCC, 0x8F, + 0xC9, 0x03, 0x75, 0xCC, 0x91, 0xC9, 0x03, 0x75, + // Bytes 3500 - 353f + 0xCC, 0xA3, 0xB5, 0x03, 0x75, 0xCC, 0xA4, 0xB5, + 0x03, 0x75, 0xCC, 0xA8, 0xA5, 0x03, 0x75, 0xCC, + 0xAD, 0xB5, 0x03, 0x75, 0xCC, 0xB0, 0xB5, 0x03, + 0x76, 0xCC, 0x83, 0xC9, 0x03, 0x76, 0xCC, 0xA3, + 0xB5, 0x03, 0x77, 0xCC, 0x80, 0xC9, 0x03, 0x77, + 0xCC, 0x81, 0xC9, 0x03, 0x77, 0xCC, 0x82, 0xC9, + 0x03, 0x77, 0xCC, 0x87, 0xC9, 0x03, 0x77, 0xCC, + 0x88, 0xC9, 0x03, 0x77, 0xCC, 0x8A, 0xC9, 0x03, + // Bytes 3540 - 357f + 0x77, 0xCC, 0xA3, 0xB5, 0x03, 0x78, 0xCC, 0x87, + 0xC9, 0x03, 0x78, 0xCC, 0x88, 0xC9, 0x03, 0x79, + 0xCC, 0x80, 0xC9, 0x03, 0x79, 0xCC, 0x81, 0xC9, + 0x03, 0x79, 0xCC, 0x82, 0xC9, 0x03, 0x79, 0xCC, + 0x83, 0xC9, 0x03, 0x79, 0xCC, 0x84, 0xC9, 0x03, + 0x79, 0xCC, 0x87, 0xC9, 0x03, 0x79, 0xCC, 0x88, + 0xC9, 0x03, 0x79, 0xCC, 0x89, 0xC9, 0x03, 0x79, + 0xCC, 0x8A, 0xC9, 0x03, 0x79, 0xCC, 0xA3, 0xB5, + // Bytes 3580 - 35bf + 0x03, 0x7A, 0xCC, 0x81, 0xC9, 0x03, 0x7A, 0xCC, + 0x82, 0xC9, 0x03, 0x7A, 0xCC, 0x87, 0xC9, 0x03, + 0x7A, 0xCC, 0x8C, 0xC9, 0x03, 0x7A, 0xCC, 0xA3, + 0xB5, 0x03, 0x7A, 0xCC, 0xB1, 0xB5, 0x04, 0xC2, + 0xA8, 0xCC, 0x80, 0xCA, 0x04, 0xC2, 0xA8, 0xCC, + 0x81, 0xCA, 0x04, 0xC2, 0xA8, 0xCD, 0x82, 0xCA, + 0x04, 0xC3, 0x86, 0xCC, 0x81, 0xC9, 0x04, 0xC3, + 0x86, 0xCC, 0x84, 0xC9, 0x04, 0xC3, 0x98, 0xCC, + // Bytes 35c0 - 35ff + 0x81, 0xC9, 0x04, 0xC3, 0xA6, 0xCC, 0x81, 0xC9, + 0x04, 0xC3, 0xA6, 0xCC, 0x84, 0xC9, 0x04, 0xC3, + 0xB8, 0xCC, 0x81, 0xC9, 0x04, 0xC5, 0xBF, 0xCC, + 0x87, 0xC9, 0x04, 0xC6, 0xB7, 0xCC, 0x8C, 0xC9, + 0x04, 0xCA, 0x92, 0xCC, 0x8C, 0xC9, 0x04, 0xCE, + 0x91, 0xCC, 0x80, 0xC9, 0x04, 0xCE, 0x91, 0xCC, + 0x81, 0xC9, 0x04, 0xCE, 0x91, 0xCC, 0x84, 0xC9, + 0x04, 0xCE, 0x91, 0xCC, 0x86, 0xC9, 0x04, 0xCE, + // Bytes 3600 - 363f + 0x91, 0xCD, 0x85, 0xD9, 0x04, 0xCE, 0x95, 0xCC, + 0x80, 0xC9, 0x04, 0xCE, 0x95, 0xCC, 0x81, 0xC9, + 0x04, 0xCE, 0x97, 0xCC, 0x80, 0xC9, 0x04, 0xCE, + 0x97, 0xCC, 0x81, 0xC9, 0x04, 0xCE, 0x97, 0xCD, + 0x85, 0xD9, 0x04, 0xCE, 0x99, 0xCC, 0x80, 0xC9, + 0x04, 0xCE, 0x99, 0xCC, 0x81, 0xC9, 0x04, 0xCE, + 0x99, 0xCC, 0x84, 0xC9, 0x04, 0xCE, 0x99, 0xCC, + 0x86, 0xC9, 0x04, 0xCE, 0x99, 0xCC, 0x88, 0xC9, + // Bytes 3640 - 367f + 0x04, 0xCE, 0x9F, 0xCC, 0x80, 0xC9, 0x04, 0xCE, + 0x9F, 0xCC, 0x81, 0xC9, 0x04, 0xCE, 0xA1, 0xCC, + 0x94, 0xC9, 0x04, 0xCE, 0xA5, 0xCC, 0x80, 0xC9, + 0x04, 0xCE, 0xA5, 0xCC, 0x81, 0xC9, 0x04, 0xCE, + 0xA5, 0xCC, 0x84, 0xC9, 0x04, 0xCE, 0xA5, 0xCC, + 0x86, 0xC9, 0x04, 0xCE, 0xA5, 0xCC, 0x88, 0xC9, + 0x04, 0xCE, 0xA9, 0xCC, 0x80, 0xC9, 0x04, 0xCE, + 0xA9, 0xCC, 0x81, 0xC9, 0x04, 0xCE, 0xA9, 0xCD, + // Bytes 3680 - 36bf + 0x85, 0xD9, 0x04, 0xCE, 0xB1, 0xCC, 0x84, 0xC9, + 0x04, 0xCE, 0xB1, 0xCC, 0x86, 0xC9, 0x04, 0xCE, + 0xB1, 0xCD, 0x85, 0xD9, 0x04, 0xCE, 0xB5, 0xCC, + 0x80, 0xC9, 0x04, 0xCE, 0xB5, 0xCC, 0x81, 0xC9, + 0x04, 0xCE, 0xB7, 0xCD, 0x85, 0xD9, 0x04, 0xCE, + 0xB9, 0xCC, 0x80, 0xC9, 0x04, 0xCE, 0xB9, 0xCC, + 0x81, 0xC9, 0x04, 0xCE, 0xB9, 0xCC, 0x84, 0xC9, + 0x04, 0xCE, 0xB9, 0xCC, 0x86, 0xC9, 0x04, 0xCE, + // Bytes 36c0 - 36ff + 0xB9, 0xCD, 0x82, 0xC9, 0x04, 0xCE, 0xBF, 0xCC, + 0x80, 0xC9, 0x04, 0xCE, 0xBF, 0xCC, 0x81, 0xC9, + 0x04, 0xCF, 0x81, 0xCC, 0x93, 0xC9, 0x04, 0xCF, + 0x81, 0xCC, 0x94, 0xC9, 0x04, 0xCF, 0x85, 0xCC, + 0x80, 0xC9, 0x04, 0xCF, 0x85, 0xCC, 0x81, 0xC9, + 0x04, 0xCF, 0x85, 0xCC, 0x84, 0xC9, 0x04, 0xCF, + 0x85, 0xCC, 0x86, 0xC9, 0x04, 0xCF, 0x85, 0xCD, + 0x82, 0xC9, 0x04, 0xCF, 0x89, 0xCD, 0x85, 0xD9, + // Bytes 3700 - 373f + 0x04, 0xCF, 0x92, 0xCC, 0x81, 0xC9, 0x04, 0xCF, + 0x92, 0xCC, 0x88, 0xC9, 0x04, 0xD0, 0x86, 0xCC, + 0x88, 0xC9, 0x04, 0xD0, 0x90, 0xCC, 0x86, 0xC9, + 0x04, 0xD0, 0x90, 0xCC, 0x88, 0xC9, 0x04, 0xD0, + 0x93, 0xCC, 0x81, 0xC9, 0x04, 0xD0, 0x95, 0xCC, + 0x80, 0xC9, 0x04, 0xD0, 0x95, 0xCC, 0x86, 0xC9, + 0x04, 0xD0, 0x95, 0xCC, 0x88, 0xC9, 0x04, 0xD0, + 0x96, 0xCC, 0x86, 0xC9, 0x04, 0xD0, 0x96, 0xCC, + // Bytes 3740 - 377f + 0x88, 0xC9, 0x04, 0xD0, 0x97, 0xCC, 0x88, 0xC9, + 0x04, 0xD0, 0x98, 0xCC, 0x80, 0xC9, 0x04, 0xD0, + 0x98, 0xCC, 0x84, 0xC9, 0x04, 0xD0, 0x98, 0xCC, + 0x86, 0xC9, 0x04, 0xD0, 0x98, 0xCC, 0x88, 0xC9, + 0x04, 0xD0, 0x9A, 0xCC, 0x81, 0xC9, 0x04, 0xD0, + 0x9E, 0xCC, 0x88, 0xC9, 0x04, 0xD0, 0xA3, 0xCC, + 0x84, 0xC9, 0x04, 0xD0, 0xA3, 0xCC, 0x86, 0xC9, + 0x04, 0xD0, 0xA3, 0xCC, 0x88, 0xC9, 0x04, 0xD0, + // Bytes 3780 - 37bf + 0xA3, 0xCC, 0x8B, 0xC9, 0x04, 0xD0, 0xA7, 0xCC, + 0x88, 0xC9, 0x04, 0xD0, 0xAB, 0xCC, 0x88, 0xC9, + 0x04, 0xD0, 0xAD, 0xCC, 0x88, 0xC9, 0x04, 0xD0, + 0xB0, 0xCC, 0x86, 0xC9, 0x04, 0xD0, 0xB0, 0xCC, + 0x88, 0xC9, 0x04, 0xD0, 0xB3, 0xCC, 0x81, 0xC9, + 0x04, 0xD0, 0xB5, 0xCC, 0x80, 0xC9, 0x04, 0xD0, + 0xB5, 0xCC, 0x86, 0xC9, 0x04, 0xD0, 0xB5, 0xCC, + 0x88, 0xC9, 0x04, 0xD0, 0xB6, 0xCC, 0x86, 0xC9, + // Bytes 37c0 - 37ff + 0x04, 0xD0, 0xB6, 0xCC, 0x88, 0xC9, 0x04, 0xD0, + 0xB7, 0xCC, 0x88, 0xC9, 0x04, 0xD0, 0xB8, 0xCC, + 0x80, 0xC9, 0x04, 0xD0, 0xB8, 0xCC, 0x84, 0xC9, + 0x04, 0xD0, 0xB8, 0xCC, 0x86, 0xC9, 0x04, 0xD0, + 0xB8, 0xCC, 0x88, 0xC9, 0x04, 0xD0, 0xBA, 0xCC, + 0x81, 0xC9, 0x04, 0xD0, 0xBE, 0xCC, 0x88, 0xC9, + 0x04, 0xD1, 0x83, 0xCC, 0x84, 0xC9, 0x04, 0xD1, + 0x83, 0xCC, 0x86, 0xC9, 0x04, 0xD1, 0x83, 0xCC, + // Bytes 3800 - 383f + 0x88, 0xC9, 0x04, 0xD1, 0x83, 0xCC, 0x8B, 0xC9, + 0x04, 0xD1, 0x87, 0xCC, 0x88, 0xC9, 0x04, 0xD1, + 0x8B, 0xCC, 0x88, 0xC9, 0x04, 0xD1, 0x8D, 0xCC, + 0x88, 0xC9, 0x04, 0xD1, 0x96, 0xCC, 0x88, 0xC9, + 0x04, 0xD1, 0xB4, 0xCC, 0x8F, 0xC9, 0x04, 0xD1, + 0xB5, 0xCC, 0x8F, 0xC9, 0x04, 0xD3, 0x98, 0xCC, + 0x88, 0xC9, 0x04, 0xD3, 0x99, 0xCC, 0x88, 0xC9, + 0x04, 0xD3, 0xA8, 0xCC, 0x88, 0xC9, 0x04, 0xD3, + // Bytes 3840 - 387f + 0xA9, 0xCC, 0x88, 0xC9, 0x04, 0xD8, 0xA7, 0xD9, + 0x93, 0xC9, 0x04, 0xD8, 0xA7, 0xD9, 0x94, 0xC9, + 0x04, 0xD8, 0xA7, 0xD9, 0x95, 0xB5, 0x04, 0xD9, + 0x88, 0xD9, 0x94, 0xC9, 0x04, 0xD9, 0x8A, 0xD9, + 0x94, 0xC9, 0x04, 0xDB, 0x81, 0xD9, 0x94, 0xC9, + 0x04, 0xDB, 0x92, 0xD9, 0x94, 0xC9, 0x04, 0xDB, + 0x95, 0xD9, 0x94, 0xC9, 0x05, 0x41, 0xCC, 0x82, + 0xCC, 0x80, 0xCA, 0x05, 0x41, 0xCC, 0x82, 0xCC, + // Bytes 3880 - 38bf + 0x81, 0xCA, 0x05, 0x41, 0xCC, 0x82, 0xCC, 0x83, + 0xCA, 0x05, 0x41, 0xCC, 0x82, 0xCC, 0x89, 0xCA, + 0x05, 0x41, 0xCC, 0x86, 0xCC, 0x80, 0xCA, 0x05, + 0x41, 0xCC, 0x86, 0xCC, 0x81, 0xCA, 0x05, 0x41, + 0xCC, 0x86, 0xCC, 0x83, 0xCA, 0x05, 0x41, 0xCC, + 0x86, 0xCC, 0x89, 0xCA, 0x05, 0x41, 0xCC, 0x87, + 0xCC, 0x84, 0xCA, 0x05, 0x41, 0xCC, 0x88, 0xCC, + 0x84, 0xCA, 0x05, 0x41, 0xCC, 0x8A, 0xCC, 0x81, + // Bytes 38c0 - 38ff + 0xCA, 0x05, 0x41, 0xCC, 0xA3, 0xCC, 0x82, 0xCA, + 0x05, 0x41, 0xCC, 0xA3, 0xCC, 0x86, 0xCA, 0x05, + 0x43, 0xCC, 0xA7, 0xCC, 0x81, 0xCA, 0x05, 0x45, + 0xCC, 0x82, 0xCC, 0x80, 0xCA, 0x05, 0x45, 0xCC, + 0x82, 0xCC, 0x81, 0xCA, 0x05, 0x45, 0xCC, 0x82, + 0xCC, 0x83, 0xCA, 0x05, 0x45, 0xCC, 0x82, 0xCC, + 0x89, 0xCA, 0x05, 0x45, 0xCC, 0x84, 0xCC, 0x80, + 0xCA, 0x05, 0x45, 0xCC, 0x84, 0xCC, 0x81, 0xCA, + // Bytes 3900 - 393f + 0x05, 0x45, 0xCC, 0xA3, 0xCC, 0x82, 0xCA, 0x05, + 0x45, 0xCC, 0xA7, 0xCC, 0x86, 0xCA, 0x05, 0x49, + 0xCC, 0x88, 0xCC, 0x81, 0xCA, 0x05, 0x4C, 0xCC, + 0xA3, 0xCC, 0x84, 0xCA, 0x05, 0x4F, 0xCC, 0x82, + 0xCC, 0x80, 0xCA, 0x05, 0x4F, 0xCC, 0x82, 0xCC, + 0x81, 0xCA, 0x05, 0x4F, 0xCC, 0x82, 0xCC, 0x83, + 0xCA, 0x05, 0x4F, 0xCC, 0x82, 0xCC, 0x89, 0xCA, + 0x05, 0x4F, 0xCC, 0x83, 0xCC, 0x81, 0xCA, 0x05, + // Bytes 3940 - 397f + 0x4F, 0xCC, 0x83, 0xCC, 0x84, 0xCA, 0x05, 0x4F, + 0xCC, 0x83, 0xCC, 0x88, 0xCA, 0x05, 0x4F, 0xCC, + 0x84, 0xCC, 0x80, 0xCA, 0x05, 0x4F, 0xCC, 0x84, + 0xCC, 0x81, 0xCA, 0x05, 0x4F, 0xCC, 0x87, 0xCC, + 0x84, 0xCA, 0x05, 0x4F, 0xCC, 0x88, 0xCC, 0x84, + 0xCA, 0x05, 0x4F, 0xCC, 0x9B, 0xCC, 0x80, 0xCA, + 0x05, 0x4F, 0xCC, 0x9B, 0xCC, 0x81, 0xCA, 0x05, + 0x4F, 0xCC, 0x9B, 0xCC, 0x83, 0xCA, 0x05, 0x4F, + // Bytes 3980 - 39bf + 0xCC, 0x9B, 0xCC, 0x89, 0xCA, 0x05, 0x4F, 0xCC, + 0x9B, 0xCC, 0xA3, 0xB6, 0x05, 0x4F, 0xCC, 0xA3, + 0xCC, 0x82, 0xCA, 0x05, 0x4F, 0xCC, 0xA8, 0xCC, + 0x84, 0xCA, 0x05, 0x52, 0xCC, 0xA3, 0xCC, 0x84, + 0xCA, 0x05, 0x53, 0xCC, 0x81, 0xCC, 0x87, 0xCA, + 0x05, 0x53, 0xCC, 0x8C, 0xCC, 0x87, 0xCA, 0x05, + 0x53, 0xCC, 0xA3, 0xCC, 0x87, 0xCA, 0x05, 0x55, + 0xCC, 0x83, 0xCC, 0x81, 0xCA, 0x05, 0x55, 0xCC, + // Bytes 39c0 - 39ff + 0x84, 0xCC, 0x88, 0xCA, 0x05, 0x55, 0xCC, 0x88, + 0xCC, 0x80, 0xCA, 0x05, 0x55, 0xCC, 0x88, 0xCC, + 0x81, 0xCA, 0x05, 0x55, 0xCC, 0x88, 0xCC, 0x84, + 0xCA, 0x05, 0x55, 0xCC, 0x88, 0xCC, 0x8C, 0xCA, + 0x05, 0x55, 0xCC, 0x9B, 0xCC, 0x80, 0xCA, 0x05, + 0x55, 0xCC, 0x9B, 0xCC, 0x81, 0xCA, 0x05, 0x55, + 0xCC, 0x9B, 0xCC, 0x83, 0xCA, 0x05, 0x55, 0xCC, + 0x9B, 0xCC, 0x89, 0xCA, 0x05, 0x55, 0xCC, 0x9B, + // Bytes 3a00 - 3a3f + 0xCC, 0xA3, 0xB6, 0x05, 0x61, 0xCC, 0x82, 0xCC, + 0x80, 0xCA, 0x05, 0x61, 0xCC, 0x82, 0xCC, 0x81, + 0xCA, 0x05, 0x61, 0xCC, 0x82, 0xCC, 0x83, 0xCA, + 0x05, 0x61, 0xCC, 0x82, 0xCC, 0x89, 0xCA, 0x05, + 0x61, 0xCC, 0x86, 0xCC, 0x80, 0xCA, 0x05, 0x61, + 0xCC, 0x86, 0xCC, 0x81, 0xCA, 0x05, 0x61, 0xCC, + 0x86, 0xCC, 0x83, 0xCA, 0x05, 0x61, 0xCC, 0x86, + 0xCC, 0x89, 0xCA, 0x05, 0x61, 0xCC, 0x87, 0xCC, + // Bytes 3a40 - 3a7f + 0x84, 0xCA, 0x05, 0x61, 0xCC, 0x88, 0xCC, 0x84, + 0xCA, 0x05, 0x61, 0xCC, 0x8A, 0xCC, 0x81, 0xCA, + 0x05, 0x61, 0xCC, 0xA3, 0xCC, 0x82, 0xCA, 0x05, + 0x61, 0xCC, 0xA3, 0xCC, 0x86, 0xCA, 0x05, 0x63, + 0xCC, 0xA7, 0xCC, 0x81, 0xCA, 0x05, 0x65, 0xCC, + 0x82, 0xCC, 0x80, 0xCA, 0x05, 0x65, 0xCC, 0x82, + 0xCC, 0x81, 0xCA, 0x05, 0x65, 0xCC, 0x82, 0xCC, + 0x83, 0xCA, 0x05, 0x65, 0xCC, 0x82, 0xCC, 0x89, + // Bytes 3a80 - 3abf + 0xCA, 0x05, 0x65, 0xCC, 0x84, 0xCC, 0x80, 0xCA, + 0x05, 0x65, 0xCC, 0x84, 0xCC, 0x81, 0xCA, 0x05, + 0x65, 0xCC, 0xA3, 0xCC, 0x82, 0xCA, 0x05, 0x65, + 0xCC, 0xA7, 0xCC, 0x86, 0xCA, 0x05, 0x69, 0xCC, + 0x88, 0xCC, 0x81, 0xCA, 0x05, 0x6C, 0xCC, 0xA3, + 0xCC, 0x84, 0xCA, 0x05, 0x6F, 0xCC, 0x82, 0xCC, + 0x80, 0xCA, 0x05, 0x6F, 0xCC, 0x82, 0xCC, 0x81, + 0xCA, 0x05, 0x6F, 0xCC, 0x82, 0xCC, 0x83, 0xCA, + // Bytes 3ac0 - 3aff + 0x05, 0x6F, 0xCC, 0x82, 0xCC, 0x89, 0xCA, 0x05, + 0x6F, 0xCC, 0x83, 0xCC, 0x81, 0xCA, 0x05, 0x6F, + 0xCC, 0x83, 0xCC, 0x84, 0xCA, 0x05, 0x6F, 0xCC, + 0x83, 0xCC, 0x88, 0xCA, 0x05, 0x6F, 0xCC, 0x84, + 0xCC, 0x80, 0xCA, 0x05, 0x6F, 0xCC, 0x84, 0xCC, + 0x81, 0xCA, 0x05, 0x6F, 0xCC, 0x87, 0xCC, 0x84, + 0xCA, 0x05, 0x6F, 0xCC, 0x88, 0xCC, 0x84, 0xCA, + 0x05, 0x6F, 0xCC, 0x9B, 0xCC, 0x80, 0xCA, 0x05, + // Bytes 3b00 - 3b3f + 0x6F, 0xCC, 0x9B, 0xCC, 0x81, 0xCA, 0x05, 0x6F, + 0xCC, 0x9B, 0xCC, 0x83, 0xCA, 0x05, 0x6F, 0xCC, + 0x9B, 0xCC, 0x89, 0xCA, 0x05, 0x6F, 0xCC, 0x9B, + 0xCC, 0xA3, 0xB6, 0x05, 0x6F, 0xCC, 0xA3, 0xCC, + 0x82, 0xCA, 0x05, 0x6F, 0xCC, 0xA8, 0xCC, 0x84, + 0xCA, 0x05, 0x72, 0xCC, 0xA3, 0xCC, 0x84, 0xCA, + 0x05, 0x73, 0xCC, 0x81, 0xCC, 0x87, 0xCA, 0x05, + 0x73, 0xCC, 0x8C, 0xCC, 0x87, 0xCA, 0x05, 0x73, + // Bytes 3b40 - 3b7f + 0xCC, 0xA3, 0xCC, 0x87, 0xCA, 0x05, 0x75, 0xCC, + 0x83, 0xCC, 0x81, 0xCA, 0x05, 0x75, 0xCC, 0x84, + 0xCC, 0x88, 0xCA, 0x05, 0x75, 0xCC, 0x88, 0xCC, + 0x80, 0xCA, 0x05, 0x75, 0xCC, 0x88, 0xCC, 0x81, + 0xCA, 0x05, 0x75, 0xCC, 0x88, 0xCC, 0x84, 0xCA, + 0x05, 0x75, 0xCC, 0x88, 0xCC, 0x8C, 0xCA, 0x05, + 0x75, 0xCC, 0x9B, 0xCC, 0x80, 0xCA, 0x05, 0x75, + 0xCC, 0x9B, 0xCC, 0x81, 0xCA, 0x05, 0x75, 0xCC, + // Bytes 3b80 - 3bbf + 0x9B, 0xCC, 0x83, 0xCA, 0x05, 0x75, 0xCC, 0x9B, + 0xCC, 0x89, 0xCA, 0x05, 0x75, 0xCC, 0x9B, 0xCC, + 0xA3, 0xB6, 0x05, 0xE1, 0xBE, 0xBF, 0xCC, 0x80, + 0xCA, 0x05, 0xE1, 0xBE, 0xBF, 0xCC, 0x81, 0xCA, + 0x05, 0xE1, 0xBE, 0xBF, 0xCD, 0x82, 0xCA, 0x05, + 0xE1, 0xBF, 0xBE, 0xCC, 0x80, 0xCA, 0x05, 0xE1, + 0xBF, 0xBE, 0xCC, 0x81, 0xCA, 0x05, 0xE1, 0xBF, + 0xBE, 0xCD, 0x82, 0xCA, 0x05, 0xE2, 0x86, 0x90, + // Bytes 3bc0 - 3bff + 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x86, 0x92, 0xCC, + 0xB8, 0x05, 0x05, 0xE2, 0x86, 0x94, 0xCC, 0xB8, + 0x05, 0x05, 0xE2, 0x87, 0x90, 0xCC, 0xB8, 0x05, + 0x05, 0xE2, 0x87, 0x92, 0xCC, 0xB8, 0x05, 0x05, + 0xE2, 0x87, 0x94, 0xCC, 0xB8, 0x05, 0x05, 0xE2, + 0x88, 0x83, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x88, + 0x88, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x88, 0x8B, + 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x88, 0xA3, 0xCC, + // Bytes 3c00 - 3c3f + 0xB8, 0x05, 0x05, 0xE2, 0x88, 0xA5, 0xCC, 0xB8, + 0x05, 0x05, 0xE2, 0x88, 0xBC, 0xCC, 0xB8, 0x05, + 0x05, 0xE2, 0x89, 0x83, 0xCC, 0xB8, 0x05, 0x05, + 0xE2, 0x89, 0x85, 0xCC, 0xB8, 0x05, 0x05, 0xE2, + 0x89, 0x88, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, + 0x8D, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0xA1, + 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0xA4, 0xCC, + 0xB8, 0x05, 0x05, 0xE2, 0x89, 0xA5, 0xCC, 0xB8, + // Bytes 3c40 - 3c7f + 0x05, 0x05, 0xE2, 0x89, 0xB2, 0xCC, 0xB8, 0x05, + 0x05, 0xE2, 0x89, 0xB3, 0xCC, 0xB8, 0x05, 0x05, + 0xE2, 0x89, 0xB6, 0xCC, 0xB8, 0x05, 0x05, 0xE2, + 0x89, 0xB7, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, + 0xBA, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0xBB, + 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x89, 0xBC, 0xCC, + 0xB8, 0x05, 0x05, 0xE2, 0x89, 0xBD, 0xCC, 0xB8, + 0x05, 0x05, 0xE2, 0x8A, 0x82, 0xCC, 0xB8, 0x05, + // Bytes 3c80 - 3cbf + 0x05, 0xE2, 0x8A, 0x83, 0xCC, 0xB8, 0x05, 0x05, + 0xE2, 0x8A, 0x86, 0xCC, 0xB8, 0x05, 0x05, 0xE2, + 0x8A, 0x87, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, + 0x91, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0x92, + 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0xA2, 0xCC, + 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0xA8, 0xCC, 0xB8, + 0x05, 0x05, 0xE2, 0x8A, 0xA9, 0xCC, 0xB8, 0x05, + 0x05, 0xE2, 0x8A, 0xAB, 0xCC, 0xB8, 0x05, 0x05, + // Bytes 3cc0 - 3cff + 0xE2, 0x8A, 0xB2, 0xCC, 0xB8, 0x05, 0x05, 0xE2, + 0x8A, 0xB3, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, + 0xB4, 0xCC, 0xB8, 0x05, 0x05, 0xE2, 0x8A, 0xB5, + 0xCC, 0xB8, 0x05, 0x06, 0xCE, 0x91, 0xCC, 0x93, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0x91, 0xCC, 0x94, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0x95, 0xCC, 0x93, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0x95, 0xCC, 0x93, + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0x95, 0xCC, 0x94, + // Bytes 3d00 - 3d3f + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0x95, 0xCC, 0x94, + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0x97, 0xCC, 0x93, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0x97, 0xCC, 0x94, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0x99, 0xCC, 0x93, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0x99, 0xCC, 0x93, + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0x99, 0xCC, 0x93, + 0xCD, 0x82, 0xCA, 0x06, 0xCE, 0x99, 0xCC, 0x94, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0x99, 0xCC, 0x94, + // Bytes 3d40 - 3d7f + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0x99, 0xCC, 0x94, + 0xCD, 0x82, 0xCA, 0x06, 0xCE, 0x9F, 0xCC, 0x93, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0x9F, 0xCC, 0x93, + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0x9F, 0xCC, 0x94, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0x9F, 0xCC, 0x94, + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0xA5, 0xCC, 0x94, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0xA5, 0xCC, 0x94, + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0xA5, 0xCC, 0x94, + // Bytes 3d80 - 3dbf + 0xCD, 0x82, 0xCA, 0x06, 0xCE, 0xA9, 0xCC, 0x93, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xA9, 0xCC, 0x94, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xB1, 0xCC, 0x80, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xB1, 0xCC, 0x81, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xB1, 0xCC, 0x93, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xB1, 0xCC, 0x94, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xB1, 0xCD, 0x82, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xB5, 0xCC, 0x93, + // Bytes 3dc0 - 3dff + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0xB5, 0xCC, 0x93, + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0xB5, 0xCC, 0x94, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0xB5, 0xCC, 0x94, + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0xB7, 0xCC, 0x80, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xB7, 0xCC, 0x81, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xB7, 0xCC, 0x93, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xB7, 0xCC, 0x94, + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xB7, 0xCD, 0x82, + // Bytes 3e00 - 3e3f + 0xCD, 0x85, 0xDA, 0x06, 0xCE, 0xB9, 0xCC, 0x88, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0xB9, 0xCC, 0x88, + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0xB9, 0xCC, 0x88, + 0xCD, 0x82, 0xCA, 0x06, 0xCE, 0xB9, 0xCC, 0x93, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0xB9, 0xCC, 0x93, + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0xB9, 0xCC, 0x93, + 0xCD, 0x82, 0xCA, 0x06, 0xCE, 0xB9, 0xCC, 0x94, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0xB9, 0xCC, 0x94, + // Bytes 3e40 - 3e7f + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0xB9, 0xCC, 0x94, + 0xCD, 0x82, 0xCA, 0x06, 0xCE, 0xBF, 0xCC, 0x93, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0xBF, 0xCC, 0x93, + 0xCC, 0x81, 0xCA, 0x06, 0xCE, 0xBF, 0xCC, 0x94, + 0xCC, 0x80, 0xCA, 0x06, 0xCE, 0xBF, 0xCC, 0x94, + 0xCC, 0x81, 0xCA, 0x06, 0xCF, 0x85, 0xCC, 0x88, + 0xCC, 0x80, 0xCA, 0x06, 0xCF, 0x85, 0xCC, 0x88, + 0xCC, 0x81, 0xCA, 0x06, 0xCF, 0x85, 0xCC, 0x88, + // Bytes 3e80 - 3ebf + 0xCD, 0x82, 0xCA, 0x06, 0xCF, 0x85, 0xCC, 0x93, + 0xCC, 0x80, 0xCA, 0x06, 0xCF, 0x85, 0xCC, 0x93, + 0xCC, 0x81, 0xCA, 0x06, 0xCF, 0x85, 0xCC, 0x93, + 0xCD, 0x82, 0xCA, 0x06, 0xCF, 0x85, 0xCC, 0x94, + 0xCC, 0x80, 0xCA, 0x06, 0xCF, 0x85, 0xCC, 0x94, + 0xCC, 0x81, 0xCA, 0x06, 0xCF, 0x85, 0xCC, 0x94, + 0xCD, 0x82, 0xCA, 0x06, 0xCF, 0x89, 0xCC, 0x80, + 0xCD, 0x85, 0xDA, 0x06, 0xCF, 0x89, 0xCC, 0x81, + // Bytes 3ec0 - 3eff + 0xCD, 0x85, 0xDA, 0x06, 0xCF, 0x89, 0xCC, 0x93, + 0xCD, 0x85, 0xDA, 0x06, 0xCF, 0x89, 0xCC, 0x94, + 0xCD, 0x85, 0xDA, 0x06, 0xCF, 0x89, 0xCD, 0x82, + 0xCD, 0x85, 0xDA, 0x06, 0xE0, 0xA4, 0xA8, 0xE0, + 0xA4, 0xBC, 0x09, 0x06, 0xE0, 0xA4, 0xB0, 0xE0, + 0xA4, 0xBC, 0x09, 0x06, 0xE0, 0xA4, 0xB3, 0xE0, + 0xA4, 0xBC, 0x09, 0x06, 0xE0, 0xB1, 0x86, 0xE0, + 0xB1, 0x96, 0x85, 0x06, 0xE0, 0xB7, 0x99, 0xE0, + // Bytes 3f00 - 3f3f + 0xB7, 0x8A, 0x11, 0x06, 0xE3, 0x81, 0x86, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0x8B, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0x8D, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0x8F, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0x91, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0x93, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0x95, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0x97, 0xE3, + // Bytes 3f40 - 3f7f + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0x99, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0x9B, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0x9D, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0x9F, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0xA1, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0xA4, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0xA6, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0xA8, 0xE3, + // Bytes 3f80 - 3fbf + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0xAF, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0xAF, 0xE3, + 0x82, 0x9A, 0x0D, 0x06, 0xE3, 0x81, 0xB2, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0xB2, 0xE3, + 0x82, 0x9A, 0x0D, 0x06, 0xE3, 0x81, 0xB5, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0xB5, 0xE3, + 0x82, 0x9A, 0x0D, 0x06, 0xE3, 0x81, 0xB8, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0xB8, 0xE3, + // Bytes 3fc0 - 3fff + 0x82, 0x9A, 0x0D, 0x06, 0xE3, 0x81, 0xBB, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x81, 0xBB, 0xE3, + 0x82, 0x9A, 0x0D, 0x06, 0xE3, 0x82, 0x9D, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xA6, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xAB, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xAD, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xAF, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xB1, 0xE3, + // Bytes 4000 - 403f + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xB3, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xB5, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xB7, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xB9, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xBB, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xBD, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x82, 0xBF, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0x81, 0xE3, + // Bytes 4040 - 407f + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0x84, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0x86, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0x88, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0x8F, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0x8F, 0xE3, + 0x82, 0x9A, 0x0D, 0x06, 0xE3, 0x83, 0x92, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0x92, 0xE3, + 0x82, 0x9A, 0x0D, 0x06, 0xE3, 0x83, 0x95, 0xE3, + // Bytes 4080 - 40bf + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0x95, 0xE3, + 0x82, 0x9A, 0x0D, 0x06, 0xE3, 0x83, 0x98, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0x98, 0xE3, + 0x82, 0x9A, 0x0D, 0x06, 0xE3, 0x83, 0x9B, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0x9B, 0xE3, + 0x82, 0x9A, 0x0D, 0x06, 0xE3, 0x83, 0xAF, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0xB0, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0xB1, 0xE3, + // Bytes 40c0 - 40ff + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0xB2, 0xE3, + 0x82, 0x99, 0x0D, 0x06, 0xE3, 0x83, 0xBD, 0xE3, + 0x82, 0x99, 0x0D, 0x08, 0xCE, 0x91, 0xCC, 0x93, + 0xCC, 0x80, 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0x91, + 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xDB, 0x08, + 0xCE, 0x91, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85, + 0xDB, 0x08, 0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x80, + 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0x91, 0xCC, 0x94, + // Bytes 4100 - 413f + 0xCC, 0x81, 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0x91, + 0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xDB, 0x08, + 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85, + 0xDB, 0x08, 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x81, + 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0x97, 0xCC, 0x93, + 0xCD, 0x82, 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0x97, + 0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xDB, 0x08, + 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, + // Bytes 4140 - 417f + 0xDB, 0x08, 0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x82, + 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0xA9, 0xCC, 0x93, + 0xCC, 0x80, 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0xA9, + 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xDB, 0x08, + 0xCE, 0xA9, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85, + 0xDB, 0x08, 0xCE, 0xA9, 0xCC, 0x94, 0xCC, 0x80, + 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0xA9, 0xCC, 0x94, + 0xCC, 0x81, 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0xA9, + // Bytes 4180 - 41bf + 0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xDB, 0x08, + 0xCE, 0xB1, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85, + 0xDB, 0x08, 0xCE, 0xB1, 0xCC, 0x93, 0xCC, 0x81, + 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0xB1, 0xCC, 0x93, + 0xCD, 0x82, 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0xB1, + 0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xDB, 0x08, + 0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, + 0xDB, 0x08, 0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x82, + // Bytes 41c0 - 41ff + 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0xB7, 0xCC, 0x93, + 0xCC, 0x80, 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0xB7, + 0xCC, 0x93, 0xCC, 0x81, 0xCD, 0x85, 0xDB, 0x08, + 0xCE, 0xB7, 0xCC, 0x93, 0xCD, 0x82, 0xCD, 0x85, + 0xDB, 0x08, 0xCE, 0xB7, 0xCC, 0x94, 0xCC, 0x80, + 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0xB7, 0xCC, 0x94, + 0xCC, 0x81, 0xCD, 0x85, 0xDB, 0x08, 0xCE, 0xB7, + 0xCC, 0x94, 0xCD, 0x82, 0xCD, 0x85, 0xDB, 0x08, + // Bytes 4200 - 423f + 0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x80, 0xCD, 0x85, + 0xDB, 0x08, 0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x81, + 0xCD, 0x85, 0xDB, 0x08, 0xCF, 0x89, 0xCC, 0x93, + 0xCD, 0x82, 0xCD, 0x85, 0xDB, 0x08, 0xCF, 0x89, + 0xCC, 0x94, 0xCC, 0x80, 0xCD, 0x85, 0xDB, 0x08, + 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x81, 0xCD, 0x85, + 0xDB, 0x08, 0xCF, 0x89, 0xCC, 0x94, 0xCD, 0x82, + 0xCD, 0x85, 0xDB, 0x08, 0xF0, 0x91, 0x82, 0x99, + // Bytes 4240 - 427f + 0xF0, 0x91, 0x82, 0xBA, 0x09, 0x08, 0xF0, 0x91, + 0x82, 0x9B, 0xF0, 0x91, 0x82, 0xBA, 0x09, 0x08, + 0xF0, 0x91, 0x82, 0xA5, 0xF0, 0x91, 0x82, 0xBA, + 0x09, 0x42, 0xC2, 0xB4, 0x01, 0x43, 0x20, 0xCC, + 0x81, 0xC9, 0x43, 0x20, 0xCC, 0x83, 0xC9, 0x43, + 0x20, 0xCC, 0x84, 0xC9, 0x43, 0x20, 0xCC, 0x85, + 0xC9, 0x43, 0x20, 0xCC, 0x86, 0xC9, 0x43, 0x20, + 0xCC, 0x87, 0xC9, 0x43, 0x20, 0xCC, 0x88, 0xC9, + // Bytes 4280 - 42bf + 0x43, 0x20, 0xCC, 0x8A, 0xC9, 0x43, 0x20, 0xCC, + 0x8B, 0xC9, 0x43, 0x20, 0xCC, 0x93, 0xC9, 0x43, + 0x20, 0xCC, 0x94, 0xC9, 0x43, 0x20, 0xCC, 0xA7, + 0xA5, 0x43, 0x20, 0xCC, 0xA8, 0xA5, 0x43, 0x20, + 0xCC, 0xB3, 0xB5, 0x43, 0x20, 0xCD, 0x82, 0xC9, + 0x43, 0x20, 0xCD, 0x85, 0xD9, 0x43, 0x20, 0xD9, + 0x8B, 0x59, 0x43, 0x20, 0xD9, 0x8C, 0x5D, 0x43, + 0x20, 0xD9, 0x8D, 0x61, 0x43, 0x20, 0xD9, 0x8E, + // Bytes 42c0 - 42ff + 0x65, 0x43, 0x20, 0xD9, 0x8F, 0x69, 0x43, 0x20, + 0xD9, 0x90, 0x6D, 0x43, 0x20, 0xD9, 0x91, 0x71, + 0x43, 0x20, 0xD9, 0x92, 0x75, 0x43, 0x41, 0xCC, + 0x8A, 0xC9, 0x43, 0x73, 0xCC, 0x87, 0xC9, 0x44, + 0x20, 0xE3, 0x82, 0x99, 0x0D, 0x44, 0x20, 0xE3, + 0x82, 0x9A, 0x0D, 0x44, 0xC2, 0xA8, 0xCC, 0x81, + 0xCA, 0x44, 0xCE, 0x91, 0xCC, 0x81, 0xC9, 0x44, + 0xCE, 0x95, 0xCC, 0x81, 0xC9, 0x44, 0xCE, 0x97, + // Bytes 4300 - 433f + 0xCC, 0x81, 0xC9, 0x44, 0xCE, 0x99, 0xCC, 0x81, + 0xC9, 0x44, 0xCE, 0x9F, 0xCC, 0x81, 0xC9, 0x44, + 0xCE, 0xA5, 0xCC, 0x81, 0xC9, 0x44, 0xCE, 0xA5, + 0xCC, 0x88, 0xC9, 0x44, 0xCE, 0xA9, 0xCC, 0x81, + 0xC9, 0x44, 0xCE, 0xB1, 0xCC, 0x81, 0xC9, 0x44, + 0xCE, 0xB5, 0xCC, 0x81, 0xC9, 0x44, 0xCE, 0xB7, + 0xCC, 0x81, 0xC9, 0x44, 0xCE, 0xB9, 0xCC, 0x81, + 0xC9, 0x44, 0xCE, 0xBF, 0xCC, 0x81, 0xC9, 0x44, + // Bytes 4340 - 437f + 0xCF, 0x85, 0xCC, 0x81, 0xC9, 0x44, 0xCF, 0x89, + 0xCC, 0x81, 0xC9, 0x44, 0xD7, 0x90, 0xD6, 0xB7, + 0x31, 0x44, 0xD7, 0x90, 0xD6, 0xB8, 0x35, 0x44, + 0xD7, 0x90, 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0x91, + 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0x91, 0xD6, 0xBF, + 0x49, 0x44, 0xD7, 0x92, 0xD6, 0xBC, 0x41, 0x44, + 0xD7, 0x93, 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0x94, + 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0x95, 0xD6, 0xB9, + // Bytes 4380 - 43bf + 0x39, 0x44, 0xD7, 0x95, 0xD6, 0xBC, 0x41, 0x44, + 0xD7, 0x96, 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0x98, + 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0x99, 0xD6, 0xB4, + 0x25, 0x44, 0xD7, 0x99, 0xD6, 0xBC, 0x41, 0x44, + 0xD7, 0x9A, 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0x9B, + 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0x9B, 0xD6, 0xBF, + 0x49, 0x44, 0xD7, 0x9C, 0xD6, 0xBC, 0x41, 0x44, + 0xD7, 0x9E, 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0xA0, + // Bytes 43c0 - 43ff + 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0xA1, 0xD6, 0xBC, + 0x41, 0x44, 0xD7, 0xA3, 0xD6, 0xBC, 0x41, 0x44, + 0xD7, 0xA4, 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0xA4, + 0xD6, 0xBF, 0x49, 0x44, 0xD7, 0xA6, 0xD6, 0xBC, + 0x41, 0x44, 0xD7, 0xA7, 0xD6, 0xBC, 0x41, 0x44, + 0xD7, 0xA8, 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0xA9, + 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0xA9, 0xD7, 0x81, + 0x4D, 0x44, 0xD7, 0xA9, 0xD7, 0x82, 0x51, 0x44, + // Bytes 4400 - 443f + 0xD7, 0xAA, 0xD6, 0xBC, 0x41, 0x44, 0xD7, 0xB2, + 0xD6, 0xB7, 0x31, 0x44, 0xD8, 0xA7, 0xD9, 0x8B, + 0x59, 0x44, 0xD8, 0xA7, 0xD9, 0x93, 0xC9, 0x44, + 0xD8, 0xA7, 0xD9, 0x94, 0xC9, 0x44, 0xD8, 0xA7, + 0xD9, 0x95, 0xB5, 0x44, 0xD8, 0xB0, 0xD9, 0xB0, + 0x79, 0x44, 0xD8, 0xB1, 0xD9, 0xB0, 0x79, 0x44, + 0xD9, 0x80, 0xD9, 0x8B, 0x59, 0x44, 0xD9, 0x80, + 0xD9, 0x8E, 0x65, 0x44, 0xD9, 0x80, 0xD9, 0x8F, + // Bytes 4440 - 447f + 0x69, 0x44, 0xD9, 0x80, 0xD9, 0x90, 0x6D, 0x44, + 0xD9, 0x80, 0xD9, 0x91, 0x71, 0x44, 0xD9, 0x80, + 0xD9, 0x92, 0x75, 0x44, 0xD9, 0x87, 0xD9, 0xB0, + 0x79, 0x44, 0xD9, 0x88, 0xD9, 0x94, 0xC9, 0x44, + 0xD9, 0x89, 0xD9, 0xB0, 0x79, 0x44, 0xD9, 0x8A, + 0xD9, 0x94, 0xC9, 0x44, 0xDB, 0x92, 0xD9, 0x94, + 0xC9, 0x44, 0xDB, 0x95, 0xD9, 0x94, 0xC9, 0x45, + 0x20, 0xCC, 0x88, 0xCC, 0x80, 0xCA, 0x45, 0x20, + // Bytes 4480 - 44bf + 0xCC, 0x88, 0xCC, 0x81, 0xCA, 0x45, 0x20, 0xCC, + 0x88, 0xCD, 0x82, 0xCA, 0x45, 0x20, 0xCC, 0x93, + 0xCC, 0x80, 0xCA, 0x45, 0x20, 0xCC, 0x93, 0xCC, + 0x81, 0xCA, 0x45, 0x20, 0xCC, 0x93, 0xCD, 0x82, + 0xCA, 0x45, 0x20, 0xCC, 0x94, 0xCC, 0x80, 0xCA, + 0x45, 0x20, 0xCC, 0x94, 0xCC, 0x81, 0xCA, 0x45, + 0x20, 0xCC, 0x94, 0xCD, 0x82, 0xCA, 0x45, 0x20, + 0xD9, 0x8C, 0xD9, 0x91, 0x72, 0x45, 0x20, 0xD9, + // Bytes 44c0 - 44ff + 0x8D, 0xD9, 0x91, 0x72, 0x45, 0x20, 0xD9, 0x8E, + 0xD9, 0x91, 0x72, 0x45, 0x20, 0xD9, 0x8F, 0xD9, + 0x91, 0x72, 0x45, 0x20, 0xD9, 0x90, 0xD9, 0x91, + 0x72, 0x45, 0x20, 0xD9, 0x91, 0xD9, 0xB0, 0x7A, + 0x45, 0xE2, 0xAB, 0x9D, 0xCC, 0xB8, 0x05, 0x46, + 0xCE, 0xB9, 0xCC, 0x88, 0xCC, 0x81, 0xCA, 0x46, + 0xCF, 0x85, 0xCC, 0x88, 0xCC, 0x81, 0xCA, 0x46, + 0xD7, 0xA9, 0xD6, 0xBC, 0xD7, 0x81, 0x4E, 0x46, + // Bytes 4500 - 453f + 0xD7, 0xA9, 0xD6, 0xBC, 0xD7, 0x82, 0x52, 0x46, + 0xD9, 0x80, 0xD9, 0x8E, 0xD9, 0x91, 0x72, 0x46, + 0xD9, 0x80, 0xD9, 0x8F, 0xD9, 0x91, 0x72, 0x46, + 0xD9, 0x80, 0xD9, 0x90, 0xD9, 0x91, 0x72, 0x46, + 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBC, 0x09, 0x46, + 0xE0, 0xA4, 0x96, 0xE0, 0xA4, 0xBC, 0x09, 0x46, + 0xE0, 0xA4, 0x97, 0xE0, 0xA4, 0xBC, 0x09, 0x46, + 0xE0, 0xA4, 0x9C, 0xE0, 0xA4, 0xBC, 0x09, 0x46, + // Bytes 4540 - 457f + 0xE0, 0xA4, 0xA1, 0xE0, 0xA4, 0xBC, 0x09, 0x46, + 0xE0, 0xA4, 0xA2, 0xE0, 0xA4, 0xBC, 0x09, 0x46, + 0xE0, 0xA4, 0xAB, 0xE0, 0xA4, 0xBC, 0x09, 0x46, + 0xE0, 0xA4, 0xAF, 0xE0, 0xA4, 0xBC, 0x09, 0x46, + 0xE0, 0xA6, 0xA1, 0xE0, 0xA6, 0xBC, 0x09, 0x46, + 0xE0, 0xA6, 0xA2, 0xE0, 0xA6, 0xBC, 0x09, 0x46, + 0xE0, 0xA6, 0xAF, 0xE0, 0xA6, 0xBC, 0x09, 0x46, + 0xE0, 0xA8, 0x96, 0xE0, 0xA8, 0xBC, 0x09, 0x46, + // Bytes 4580 - 45bf + 0xE0, 0xA8, 0x97, 0xE0, 0xA8, 0xBC, 0x09, 0x46, + 0xE0, 0xA8, 0x9C, 0xE0, 0xA8, 0xBC, 0x09, 0x46, + 0xE0, 0xA8, 0xAB, 0xE0, 0xA8, 0xBC, 0x09, 0x46, + 0xE0, 0xA8, 0xB2, 0xE0, 0xA8, 0xBC, 0x09, 0x46, + 0xE0, 0xA8, 0xB8, 0xE0, 0xA8, 0xBC, 0x09, 0x46, + 0xE0, 0xAC, 0xA1, 0xE0, 0xAC, 0xBC, 0x09, 0x46, + 0xE0, 0xAC, 0xA2, 0xE0, 0xAC, 0xBC, 0x09, 0x46, + 0xE0, 0xBE, 0xB2, 0xE0, 0xBE, 0x80, 0x9D, 0x46, + // Bytes 45c0 - 45ff + 0xE0, 0xBE, 0xB3, 0xE0, 0xBE, 0x80, 0x9D, 0x46, + 0xE3, 0x83, 0x86, 0xE3, 0x82, 0x99, 0x0D, 0x48, + 0xF0, 0x9D, 0x85, 0x97, 0xF0, 0x9D, 0x85, 0xA5, + 0xAD, 0x48, 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, + 0x85, 0xA5, 0xAD, 0x48, 0xF0, 0x9D, 0x86, 0xB9, + 0xF0, 0x9D, 0x85, 0xA5, 0xAD, 0x48, 0xF0, 0x9D, + 0x86, 0xBA, 0xF0, 0x9D, 0x85, 0xA5, 0xAD, 0x49, + 0xE0, 0xBE, 0xB2, 0xE0, 0xBD, 0xB1, 0xE0, 0xBE, + // Bytes 4600 - 463f + 0x80, 0x9E, 0x49, 0xE0, 0xBE, 0xB3, 0xE0, 0xBD, + 0xB1, 0xE0, 0xBE, 0x80, 0x9E, 0x4C, 0xF0, 0x9D, + 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, + 0x85, 0xAE, 0xAE, 0x4C, 0xF0, 0x9D, 0x85, 0x98, + 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAF, + 0xAE, 0x4C, 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, + 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xB0, 0xAE, 0x4C, + 0xF0, 0x9D, 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, + // Bytes 4640 - 467f + 0xF0, 0x9D, 0x85, 0xB1, 0xAE, 0x4C, 0xF0, 0x9D, + 0x85, 0x98, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, + 0x85, 0xB2, 0xAE, 0x4C, 0xF0, 0x9D, 0x86, 0xB9, + 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAE, + 0xAE, 0x4C, 0xF0, 0x9D, 0x86, 0xB9, 0xF0, 0x9D, + 0x85, 0xA5, 0xF0, 0x9D, 0x85, 0xAF, 0xAE, 0x4C, + 0xF0, 0x9D, 0x86, 0xBA, 0xF0, 0x9D, 0x85, 0xA5, + 0xF0, 0x9D, 0x85, 0xAE, 0xAE, 0x4C, 0xF0, 0x9D, + // Bytes 4680 - 46bf + 0x86, 0xBA, 0xF0, 0x9D, 0x85, 0xA5, 0xF0, 0x9D, + 0x85, 0xAF, 0xAE, 0x83, 0x41, 0xCC, 0x82, 0xC9, + 0x83, 0x41, 0xCC, 0x86, 0xC9, 0x83, 0x41, 0xCC, + 0x87, 0xC9, 0x83, 0x41, 0xCC, 0x88, 0xC9, 0x83, + 0x41, 0xCC, 0x8A, 0xC9, 0x83, 0x41, 0xCC, 0xA3, + 0xB5, 0x83, 0x43, 0xCC, 0xA7, 0xA5, 0x83, 0x45, + 0xCC, 0x82, 0xC9, 0x83, 0x45, 0xCC, 0x84, 0xC9, + 0x83, 0x45, 0xCC, 0xA3, 0xB5, 0x83, 0x45, 0xCC, + // Bytes 46c0 - 46ff + 0xA7, 0xA5, 0x83, 0x49, 0xCC, 0x88, 0xC9, 0x83, + 0x4C, 0xCC, 0xA3, 0xB5, 0x83, 0x4F, 0xCC, 0x82, + 0xC9, 0x83, 0x4F, 0xCC, 0x83, 0xC9, 0x83, 0x4F, + 0xCC, 0x84, 0xC9, 0x83, 0x4F, 0xCC, 0x87, 0xC9, + 0x83, 0x4F, 0xCC, 0x88, 0xC9, 0x83, 0x4F, 0xCC, + 0x9B, 0xAD, 0x83, 0x4F, 0xCC, 0xA3, 0xB5, 0x83, + 0x4F, 0xCC, 0xA8, 0xA5, 0x83, 0x52, 0xCC, 0xA3, + 0xB5, 0x83, 0x53, 0xCC, 0x81, 0xC9, 0x83, 0x53, + // Bytes 4700 - 473f + 0xCC, 0x8C, 0xC9, 0x83, 0x53, 0xCC, 0xA3, 0xB5, + 0x83, 0x55, 0xCC, 0x83, 0xC9, 0x83, 0x55, 0xCC, + 0x84, 0xC9, 0x83, 0x55, 0xCC, 0x88, 0xC9, 0x83, + 0x55, 0xCC, 0x9B, 0xAD, 0x83, 0x61, 0xCC, 0x82, + 0xC9, 0x83, 0x61, 0xCC, 0x86, 0xC9, 0x83, 0x61, + 0xCC, 0x87, 0xC9, 0x83, 0x61, 0xCC, 0x88, 0xC9, + 0x83, 0x61, 0xCC, 0x8A, 0xC9, 0x83, 0x61, 0xCC, + 0xA3, 0xB5, 0x83, 0x63, 0xCC, 0xA7, 0xA5, 0x83, + // Bytes 4740 - 477f + 0x65, 0xCC, 0x82, 0xC9, 0x83, 0x65, 0xCC, 0x84, + 0xC9, 0x83, 0x65, 0xCC, 0xA3, 0xB5, 0x83, 0x65, + 0xCC, 0xA7, 0xA5, 0x83, 0x69, 0xCC, 0x88, 0xC9, + 0x83, 0x6C, 0xCC, 0xA3, 0xB5, 0x83, 0x6F, 0xCC, + 0x82, 0xC9, 0x83, 0x6F, 0xCC, 0x83, 0xC9, 0x83, + 0x6F, 0xCC, 0x84, 0xC9, 0x83, 0x6F, 0xCC, 0x87, + 0xC9, 0x83, 0x6F, 0xCC, 0x88, 0xC9, 0x83, 0x6F, + 0xCC, 0x9B, 0xAD, 0x83, 0x6F, 0xCC, 0xA3, 0xB5, + // Bytes 4780 - 47bf + 0x83, 0x6F, 0xCC, 0xA8, 0xA5, 0x83, 0x72, 0xCC, + 0xA3, 0xB5, 0x83, 0x73, 0xCC, 0x81, 0xC9, 0x83, + 0x73, 0xCC, 0x8C, 0xC9, 0x83, 0x73, 0xCC, 0xA3, + 0xB5, 0x83, 0x75, 0xCC, 0x83, 0xC9, 0x83, 0x75, + 0xCC, 0x84, 0xC9, 0x83, 0x75, 0xCC, 0x88, 0xC9, + 0x83, 0x75, 0xCC, 0x9B, 0xAD, 0x84, 0xCE, 0x91, + 0xCC, 0x93, 0xC9, 0x84, 0xCE, 0x91, 0xCC, 0x94, + 0xC9, 0x84, 0xCE, 0x95, 0xCC, 0x93, 0xC9, 0x84, + // Bytes 47c0 - 47ff + 0xCE, 0x95, 0xCC, 0x94, 0xC9, 0x84, 0xCE, 0x97, + 0xCC, 0x93, 0xC9, 0x84, 0xCE, 0x97, 0xCC, 0x94, + 0xC9, 0x84, 0xCE, 0x99, 0xCC, 0x93, 0xC9, 0x84, + 0xCE, 0x99, 0xCC, 0x94, 0xC9, 0x84, 0xCE, 0x9F, + 0xCC, 0x93, 0xC9, 0x84, 0xCE, 0x9F, 0xCC, 0x94, + 0xC9, 0x84, 0xCE, 0xA5, 0xCC, 0x94, 0xC9, 0x84, + 0xCE, 0xA9, 0xCC, 0x93, 0xC9, 0x84, 0xCE, 0xA9, + 0xCC, 0x94, 0xC9, 0x84, 0xCE, 0xB1, 0xCC, 0x80, + // Bytes 4800 - 483f + 0xC9, 0x84, 0xCE, 0xB1, 0xCC, 0x81, 0xC9, 0x84, + 0xCE, 0xB1, 0xCC, 0x93, 0xC9, 0x84, 0xCE, 0xB1, + 0xCC, 0x94, 0xC9, 0x84, 0xCE, 0xB1, 0xCD, 0x82, + 0xC9, 0x84, 0xCE, 0xB5, 0xCC, 0x93, 0xC9, 0x84, + 0xCE, 0xB5, 0xCC, 0x94, 0xC9, 0x84, 0xCE, 0xB7, + 0xCC, 0x80, 0xC9, 0x84, 0xCE, 0xB7, 0xCC, 0x81, + 0xC9, 0x84, 0xCE, 0xB7, 0xCC, 0x93, 0xC9, 0x84, + 0xCE, 0xB7, 0xCC, 0x94, 0xC9, 0x84, 0xCE, 0xB7, + // Bytes 4840 - 487f + 0xCD, 0x82, 0xC9, 0x84, 0xCE, 0xB9, 0xCC, 0x88, + 0xC9, 0x84, 0xCE, 0xB9, 0xCC, 0x93, 0xC9, 0x84, + 0xCE, 0xB9, 0xCC, 0x94, 0xC9, 0x84, 0xCE, 0xBF, + 0xCC, 0x93, 0xC9, 0x84, 0xCE, 0xBF, 0xCC, 0x94, + 0xC9, 0x84, 0xCF, 0x85, 0xCC, 0x88, 0xC9, 0x84, + 0xCF, 0x85, 0xCC, 0x93, 0xC9, 0x84, 0xCF, 0x85, + 0xCC, 0x94, 0xC9, 0x84, 0xCF, 0x89, 0xCC, 0x80, + 0xC9, 0x84, 0xCF, 0x89, 0xCC, 0x81, 0xC9, 0x84, + // Bytes 4880 - 48bf + 0xCF, 0x89, 0xCC, 0x93, 0xC9, 0x84, 0xCF, 0x89, + 0xCC, 0x94, 0xC9, 0x84, 0xCF, 0x89, 0xCD, 0x82, + 0xC9, 0x86, 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x80, + 0xCA, 0x86, 0xCE, 0x91, 0xCC, 0x93, 0xCC, 0x81, + 0xCA, 0x86, 0xCE, 0x91, 0xCC, 0x93, 0xCD, 0x82, + 0xCA, 0x86, 0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x80, + 0xCA, 0x86, 0xCE, 0x91, 0xCC, 0x94, 0xCC, 0x81, + 0xCA, 0x86, 0xCE, 0x91, 0xCC, 0x94, 0xCD, 0x82, + // Bytes 48c0 - 48ff + 0xCA, 0x86, 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x80, + 0xCA, 0x86, 0xCE, 0x97, 0xCC, 0x93, 0xCC, 0x81, + 0xCA, 0x86, 0xCE, 0x97, 0xCC, 0x93, 0xCD, 0x82, + 0xCA, 0x86, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x80, + 0xCA, 0x86, 0xCE, 0x97, 0xCC, 0x94, 0xCC, 0x81, + 0xCA, 0x86, 0xCE, 0x97, 0xCC, 0x94, 0xCD, 0x82, + 0xCA, 0x86, 0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x80, + 0xCA, 0x86, 0xCE, 0xA9, 0xCC, 0x93, 0xCC, 0x81, + // Bytes 4900 - 493f + 0xCA, 0x86, 0xCE, 0xA9, 0xCC, 0x93, 0xCD, 0x82, + 0xCA, 0x86, 0xCE, 0xA9, 0xCC, 0x94, 0xCC, 0x80, + 0xCA, 0x86, 0xCE, 0xA9, 0xCC, 0x94, 0xCC, 0x81, + 0xCA, 0x86, 0xCE, 0xA9, 0xCC, 0x94, 0xCD, 0x82, + 0xCA, 0x86, 0xCE, 0xB1, 0xCC, 0x93, 0xCC, 0x80, + 0xCA, 0x86, 0xCE, 0xB1, 0xCC, 0x93, 0xCC, 0x81, + 0xCA, 0x86, 0xCE, 0xB1, 0xCC, 0x93, 0xCD, 0x82, + 0xCA, 0x86, 0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x80, + // Bytes 4940 - 497f + 0xCA, 0x86, 0xCE, 0xB1, 0xCC, 0x94, 0xCC, 0x81, + 0xCA, 0x86, 0xCE, 0xB1, 0xCC, 0x94, 0xCD, 0x82, + 0xCA, 0x86, 0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x80, + 0xCA, 0x86, 0xCE, 0xB7, 0xCC, 0x93, 0xCC, 0x81, + 0xCA, 0x86, 0xCE, 0xB7, 0xCC, 0x93, 0xCD, 0x82, + 0xCA, 0x86, 0xCE, 0xB7, 0xCC, 0x94, 0xCC, 0x80, + 0xCA, 0x86, 0xCE, 0xB7, 0xCC, 0x94, 0xCC, 0x81, + 0xCA, 0x86, 0xCE, 0xB7, 0xCC, 0x94, 0xCD, 0x82, + // Bytes 4980 - 49bf + 0xCA, 0x86, 0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x80, + 0xCA, 0x86, 0xCF, 0x89, 0xCC, 0x93, 0xCC, 0x81, + 0xCA, 0x86, 0xCF, 0x89, 0xCC, 0x93, 0xCD, 0x82, + 0xCA, 0x86, 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x80, + 0xCA, 0x86, 0xCF, 0x89, 0xCC, 0x94, 0xCC, 0x81, + 0xCA, 0x86, 0xCF, 0x89, 0xCC, 0x94, 0xCD, 0x82, + 0xCA, 0x42, 0xCC, 0x80, 0xC9, 0x32, 0x42, 0xCC, + 0x81, 0xC9, 0x32, 0x42, 0xCC, 0x93, 0xC9, 0x32, + // Bytes 49c0 - 49ff + 0x43, 0xE1, 0x85, 0xA1, 0x01, 0x00, 0x43, 0xE1, + 0x85, 0xA2, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xA3, + 0x01, 0x00, 0x43, 0xE1, 0x85, 0xA4, 0x01, 0x00, + 0x43, 0xE1, 0x85, 0xA5, 0x01, 0x00, 0x43, 0xE1, + 0x85, 0xA6, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xA7, + 0x01, 0x00, 0x43, 0xE1, 0x85, 0xA8, 0x01, 0x00, + 0x43, 0xE1, 0x85, 0xA9, 0x01, 0x00, 0x43, 0xE1, + 0x85, 0xAA, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xAB, + // Bytes 4a00 - 4a3f + 0x01, 0x00, 0x43, 0xE1, 0x85, 0xAC, 0x01, 0x00, + 0x43, 0xE1, 0x85, 0xAD, 0x01, 0x00, 0x43, 0xE1, + 0x85, 0xAE, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xAF, + 0x01, 0x00, 0x43, 0xE1, 0x85, 0xB0, 0x01, 0x00, + 0x43, 0xE1, 0x85, 0xB1, 0x01, 0x00, 0x43, 0xE1, + 0x85, 0xB2, 0x01, 0x00, 0x43, 0xE1, 0x85, 0xB3, + 0x01, 0x00, 0x43, 0xE1, 0x85, 0xB4, 0x01, 0x00, + 0x43, 0xE1, 0x85, 0xB5, 0x01, 0x00, 0x43, 0xE1, + // Bytes 4a40 - 4a7f + 0x86, 0xAA, 0x01, 0x00, 0x43, 0xE1, 0x86, 0xAC, + 0x01, 0x00, 0x43, 0xE1, 0x86, 0xAD, 0x01, 0x00, + 0x43, 0xE1, 0x86, 0xB0, 0x01, 0x00, 0x43, 0xE1, + 0x86, 0xB1, 0x01, 0x00, 0x43, 0xE1, 0x86, 0xB2, + 0x01, 0x00, 0x43, 0xE1, 0x86, 0xB3, 0x01, 0x00, + 0x43, 0xE1, 0x86, 0xB4, 0x01, 0x00, 0x43, 0xE1, + 0x86, 0xB5, 0x01, 0x00, 0x44, 0xCC, 0x88, 0xCC, + 0x81, 0xCA, 0x32, 0x43, 0xE3, 0x82, 0x99, 0x0D, + // Bytes 4a80 - 4abf + 0x03, 0x43, 0xE3, 0x82, 0x9A, 0x0D, 0x03, 0x46, + 0xE0, 0xBD, 0xB1, 0xE0, 0xBD, 0xB2, 0x9E, 0x26, + 0x46, 0xE0, 0xBD, 0xB1, 0xE0, 0xBD, 0xB4, 0xA2, + 0x26, 0x46, 0xE0, 0xBD, 0xB1, 0xE0, 0xBE, 0x80, + 0x9E, 0x26, 0x00, 0x01, +} + +// lookup returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *nfcTrie) lookup(s []byte) (v uint16, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return nfcValues[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := nfcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := nfcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = nfcIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := nfcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = nfcIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = nfcIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *nfcTrie) lookupUnsafe(s []byte) uint16 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return nfcValues[c0] + } + i := nfcIndex[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = nfcIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = nfcIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// lookupString returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *nfcTrie) lookupString(s string) (v uint16, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return nfcValues[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := nfcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := nfcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = nfcIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := nfcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = nfcIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = nfcIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *nfcTrie) lookupStringUnsafe(s string) uint16 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return nfcValues[c0] + } + i := nfcIndex[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = nfcIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = nfcIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// nfcTrie. Total size: 10610 bytes (10.36 KiB). Checksum: 95e8869a9f81e5e6. +type nfcTrie struct{} + +func newNfcTrie(i int) *nfcTrie { + return &nfcTrie{} +} + +// lookupValue determines the type of block n and looks up the value for b. +func (t *nfcTrie) lookupValue(n uint32, b byte) uint16 { + switch { + case n < 46: + return uint16(nfcValues[n<<6+uint32(b)]) + default: + n -= 46 + return uint16(nfcSparse.lookup(n, b)) + } +} + +// nfcValues: 48 blocks, 3072 entries, 6144 bytes +// The third block is the zero block. +var nfcValues = [3072]uint16{ + // Block 0x0, offset 0x0 + 0x3c: 0xa000, 0x3d: 0xa000, 0x3e: 0xa000, + // Block 0x1, offset 0x40 + 0x41: 0xa000, 0x42: 0xa000, 0x43: 0xa000, 0x44: 0xa000, 0x45: 0xa000, + 0x46: 0xa000, 0x47: 0xa000, 0x48: 0xa000, 0x49: 0xa000, 0x4a: 0xa000, 0x4b: 0xa000, + 0x4c: 0xa000, 0x4d: 0xa000, 0x4e: 0xa000, 0x4f: 0xa000, 0x50: 0xa000, + 0x52: 0xa000, 0x53: 0xa000, 0x54: 0xa000, 0x55: 0xa000, 0x56: 0xa000, 0x57: 0xa000, + 0x58: 0xa000, 0x59: 0xa000, 0x5a: 0xa000, + 0x61: 0xa000, 0x62: 0xa000, 0x63: 0xa000, + 0x64: 0xa000, 0x65: 0xa000, 0x66: 0xa000, 0x67: 0xa000, 0x68: 0xa000, 0x69: 0xa000, + 0x6a: 0xa000, 0x6b: 0xa000, 0x6c: 0xa000, 0x6d: 0xa000, 0x6e: 0xa000, 0x6f: 0xa000, + 0x70: 0xa000, 0x72: 0xa000, 0x73: 0xa000, 0x74: 0xa000, 0x75: 0xa000, + 0x76: 0xa000, 0x77: 0xa000, 0x78: 0xa000, 0x79: 0xa000, 0x7a: 0xa000, + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xc0: 0x2f72, 0xc1: 0x2f77, 0xc2: 0x468b, 0xc3: 0x2f7c, 0xc4: 0x469a, 0xc5: 0x469f, + 0xc6: 0xa000, 0xc7: 0x46a9, 0xc8: 0x2fe5, 0xc9: 0x2fea, 0xca: 0x46ae, 0xcb: 0x2ffe, + 0xcc: 0x3071, 0xcd: 0x3076, 0xce: 0x307b, 0xcf: 0x46c2, 0xd1: 0x3107, + 0xd2: 0x312a, 0xd3: 0x312f, 0xd4: 0x46cc, 0xd5: 0x46d1, 0xd6: 0x46e0, + 0xd8: 0xa000, 0xd9: 0x31b6, 0xda: 0x31bb, 0xdb: 0x31c0, 0xdc: 0x4712, 0xdd: 0x3238, + 0xe0: 0x327e, 0xe1: 0x3283, 0xe2: 0x471c, 0xe3: 0x3288, + 0xe4: 0x472b, 0xe5: 0x4730, 0xe6: 0xa000, 0xe7: 0x473a, 0xe8: 0x32f1, 0xe9: 0x32f6, + 0xea: 0x473f, 0xeb: 0x330a, 0xec: 0x3382, 0xed: 0x3387, 0xee: 0x338c, 0xef: 0x4753, + 0xf1: 0x3418, 0xf2: 0x343b, 0xf3: 0x3440, 0xf4: 0x475d, 0xf5: 0x4762, + 0xf6: 0x4771, 0xf8: 0xa000, 0xf9: 0x34cc, 0xfa: 0x34d1, 0xfb: 0x34d6, + 0xfc: 0x47a3, 0xfd: 0x3553, 0xff: 0x356c, + // Block 0x4, offset 0x100 + 0x100: 0x2f81, 0x101: 0x328d, 0x102: 0x4690, 0x103: 0x4721, 0x104: 0x2f9f, 0x105: 0x32ab, + 0x106: 0x2fb3, 0x107: 0x32bf, 0x108: 0x2fb8, 0x109: 0x32c4, 0x10a: 0x2fbd, 0x10b: 0x32c9, + 0x10c: 0x2fc2, 0x10d: 0x32ce, 0x10e: 0x2fcc, 0x10f: 0x32d8, + 0x112: 0x46b3, 0x113: 0x4744, 0x114: 0x2ff4, 0x115: 0x3300, 0x116: 0x2ff9, 0x117: 0x3305, + 0x118: 0x3017, 0x119: 0x3323, 0x11a: 0x3008, 0x11b: 0x3314, 0x11c: 0x3030, 0x11d: 0x333c, + 0x11e: 0x303a, 0x11f: 0x3346, 0x120: 0x303f, 0x121: 0x334b, 0x122: 0x3049, 0x123: 0x3355, + 0x124: 0x304e, 0x125: 0x335a, 0x128: 0x3080, 0x129: 0x3391, + 0x12a: 0x3085, 0x12b: 0x3396, 0x12c: 0x308a, 0x12d: 0x339b, 0x12e: 0x30ad, 0x12f: 0x33b9, + 0x130: 0x308f, 0x134: 0x30b7, 0x135: 0x33c3, + 0x136: 0x30cb, 0x137: 0x33dc, 0x139: 0x30d5, 0x13a: 0x33e6, 0x13b: 0x30df, + 0x13c: 0x33f0, 0x13d: 0x30da, 0x13e: 0x33eb, + // Block 0x5, offset 0x140 + 0x143: 0x3102, 0x144: 0x3413, 0x145: 0x311b, + 0x146: 0x342c, 0x147: 0x3111, 0x148: 0x3422, + 0x14c: 0x46d6, 0x14d: 0x4767, 0x14e: 0x3134, 0x14f: 0x3445, 0x150: 0x313e, 0x151: 0x344f, + 0x154: 0x315c, 0x155: 0x346d, 0x156: 0x3175, 0x157: 0x3486, + 0x158: 0x3166, 0x159: 0x3477, 0x15a: 0x46f9, 0x15b: 0x478a, 0x15c: 0x317f, 0x15d: 0x3490, + 0x15e: 0x318e, 0x15f: 0x349f, 0x160: 0x46fe, 0x161: 0x478f, 0x162: 0x31a7, 0x163: 0x34bd, + 0x164: 0x3198, 0x165: 0x34ae, 0x168: 0x4708, 0x169: 0x4799, + 0x16a: 0x470d, 0x16b: 0x479e, 0x16c: 0x31c5, 0x16d: 0x34db, 0x16e: 0x31cf, 0x16f: 0x34e5, + 0x170: 0x31d4, 0x171: 0x34ea, 0x172: 0x31f2, 0x173: 0x3508, 0x174: 0x3215, 0x175: 0x352b, + 0x176: 0x323d, 0x177: 0x3558, 0x178: 0x3251, 0x179: 0x3260, 0x17a: 0x3580, 0x17b: 0x326a, + 0x17c: 0x358a, 0x17d: 0x326f, 0x17e: 0x358f, 0x17f: 0xa000, + // Block 0x6, offset 0x180 + 0x184: 0x8100, 0x185: 0x8100, + 0x186: 0x8100, + 0x18d: 0x2f8b, 0x18e: 0x3297, 0x18f: 0x3099, 0x190: 0x33a5, 0x191: 0x3143, + 0x192: 0x3454, 0x193: 0x31d9, 0x194: 0x34ef, 0x195: 0x39d2, 0x196: 0x3b61, 0x197: 0x39cb, + 0x198: 0x3b5a, 0x199: 0x39d9, 0x19a: 0x3b68, 0x19b: 0x39c4, 0x19c: 0x3b53, + 0x19e: 0x38b3, 0x19f: 0x3a42, 0x1a0: 0x38ac, 0x1a1: 0x3a3b, 0x1a2: 0x35b6, 0x1a3: 0x35c8, + 0x1a6: 0x3044, 0x1a7: 0x3350, 0x1a8: 0x30c1, 0x1a9: 0x33d2, + 0x1aa: 0x46ef, 0x1ab: 0x4780, 0x1ac: 0x3993, 0x1ad: 0x3b22, 0x1ae: 0x35da, 0x1af: 0x35e0, + 0x1b0: 0x33c8, 0x1b4: 0x302b, 0x1b5: 0x3337, + 0x1b8: 0x30fd, 0x1b9: 0x340e, 0x1ba: 0x38ba, 0x1bb: 0x3a49, + 0x1bc: 0x35b0, 0x1bd: 0x35c2, 0x1be: 0x35bc, 0x1bf: 0x35ce, + // Block 0x7, offset 0x1c0 + 0x1c0: 0x2f90, 0x1c1: 0x329c, 0x1c2: 0x2f95, 0x1c3: 0x32a1, 0x1c4: 0x300d, 0x1c5: 0x3319, + 0x1c6: 0x3012, 0x1c7: 0x331e, 0x1c8: 0x309e, 0x1c9: 0x33aa, 0x1ca: 0x30a3, 0x1cb: 0x33af, + 0x1cc: 0x3148, 0x1cd: 0x3459, 0x1ce: 0x314d, 0x1cf: 0x345e, 0x1d0: 0x316b, 0x1d1: 0x347c, + 0x1d2: 0x3170, 0x1d3: 0x3481, 0x1d4: 0x31de, 0x1d5: 0x34f4, 0x1d6: 0x31e3, 0x1d7: 0x34f9, + 0x1d8: 0x3189, 0x1d9: 0x349a, 0x1da: 0x31a2, 0x1db: 0x34b8, + 0x1de: 0x305d, 0x1df: 0x3369, + 0x1e6: 0x4695, 0x1e7: 0x4726, 0x1e8: 0x46bd, 0x1e9: 0x474e, + 0x1ea: 0x3962, 0x1eb: 0x3af1, 0x1ec: 0x393f, 0x1ed: 0x3ace, 0x1ee: 0x46db, 0x1ef: 0x476c, + 0x1f0: 0x395b, 0x1f1: 0x3aea, 0x1f2: 0x3247, 0x1f3: 0x3562, + // Block 0x8, offset 0x200 + 0x200: 0x9932, 0x201: 0x9932, 0x202: 0x9932, 0x203: 0x9932, 0x204: 0x9932, 0x205: 0x8132, + 0x206: 0x9932, 0x207: 0x9932, 0x208: 0x9932, 0x209: 0x9932, 0x20a: 0x9932, 0x20b: 0x9932, + 0x20c: 0x9932, 0x20d: 0x8132, 0x20e: 0x8132, 0x20f: 0x9932, 0x210: 0x8132, 0x211: 0x9932, + 0x212: 0x8132, 0x213: 0x9932, 0x214: 0x9932, 0x215: 0x8133, 0x216: 0x812d, 0x217: 0x812d, + 0x218: 0x812d, 0x219: 0x812d, 0x21a: 0x8133, 0x21b: 0x992b, 0x21c: 0x812d, 0x21d: 0x812d, + 0x21e: 0x812d, 0x21f: 0x812d, 0x220: 0x812d, 0x221: 0x8129, 0x222: 0x8129, 0x223: 0x992d, + 0x224: 0x992d, 0x225: 0x992d, 0x226: 0x992d, 0x227: 0x9929, 0x228: 0x9929, 0x229: 0x812d, + 0x22a: 0x812d, 0x22b: 0x812d, 0x22c: 0x812d, 0x22d: 0x992d, 0x22e: 0x992d, 0x22f: 0x812d, + 0x230: 0x992d, 0x231: 0x992d, 0x232: 0x812d, 0x233: 0x812d, 0x234: 0x8101, 0x235: 0x8101, + 0x236: 0x8101, 0x237: 0x8101, 0x238: 0x9901, 0x239: 0x812d, 0x23a: 0x812d, 0x23b: 0x812d, + 0x23c: 0x812d, 0x23d: 0x8132, 0x23e: 0x8132, 0x23f: 0x8132, + // Block 0x9, offset 0x240 + 0x240: 0x49b1, 0x241: 0x49b6, 0x242: 0x9932, 0x243: 0x49bb, 0x244: 0x4a74, 0x245: 0x9936, + 0x246: 0x8132, 0x247: 0x812d, 0x248: 0x812d, 0x249: 0x812d, 0x24a: 0x8132, 0x24b: 0x8132, + 0x24c: 0x8132, 0x24d: 0x812d, 0x24e: 0x812d, 0x250: 0x8132, 0x251: 0x8132, + 0x252: 0x8132, 0x253: 0x812d, 0x254: 0x812d, 0x255: 0x812d, 0x256: 0x812d, 0x257: 0x8132, + 0x258: 0x8133, 0x259: 0x812d, 0x25a: 0x812d, 0x25b: 0x8132, 0x25c: 0x8134, 0x25d: 0x8135, + 0x25e: 0x8135, 0x25f: 0x8134, 0x260: 0x8135, 0x261: 0x8135, 0x262: 0x8134, 0x263: 0x8132, + 0x264: 0x8132, 0x265: 0x8132, 0x266: 0x8132, 0x267: 0x8132, 0x268: 0x8132, 0x269: 0x8132, + 0x26a: 0x8132, 0x26b: 0x8132, 0x26c: 0x8132, 0x26d: 0x8132, 0x26e: 0x8132, 0x26f: 0x8132, + 0x274: 0x0170, + 0x27a: 0x8100, + 0x27e: 0x0037, + // Block 0xa, offset 0x280 + 0x284: 0x8100, 0x285: 0x35a4, + 0x286: 0x35ec, 0x287: 0x00ce, 0x288: 0x360a, 0x289: 0x3616, 0x28a: 0x3628, + 0x28c: 0x3646, 0x28e: 0x3658, 0x28f: 0x3676, 0x290: 0x3e0b, 0x291: 0xa000, + 0x295: 0xa000, 0x297: 0xa000, + 0x299: 0xa000, + 0x29f: 0xa000, 0x2a1: 0xa000, + 0x2a5: 0xa000, 0x2a9: 0xa000, + 0x2aa: 0x363a, 0x2ab: 0x366a, 0x2ac: 0x4801, 0x2ad: 0x369a, 0x2ae: 0x482b, 0x2af: 0x36ac, + 0x2b0: 0x3e73, 0x2b1: 0xa000, 0x2b5: 0xa000, + 0x2b7: 0xa000, 0x2b9: 0xa000, + 0x2bf: 0xa000, + // Block 0xb, offset 0x2c0 + 0x2c0: 0x3724, 0x2c1: 0x3730, 0x2c3: 0x371e, + 0x2c6: 0xa000, 0x2c7: 0x370c, + 0x2cc: 0x3760, 0x2cd: 0x3748, 0x2ce: 0x3772, 0x2d0: 0xa000, + 0x2d3: 0xa000, 0x2d5: 0xa000, 0x2d6: 0xa000, 0x2d7: 0xa000, + 0x2d8: 0xa000, 0x2d9: 0x3754, 0x2da: 0xa000, + 0x2de: 0xa000, 0x2e3: 0xa000, + 0x2e7: 0xa000, + 0x2eb: 0xa000, 0x2ed: 0xa000, + 0x2f0: 0xa000, 0x2f3: 0xa000, 0x2f5: 0xa000, + 0x2f6: 0xa000, 0x2f7: 0xa000, 0x2f8: 0xa000, 0x2f9: 0x37d8, 0x2fa: 0xa000, + 0x2fe: 0xa000, + // Block 0xc, offset 0x300 + 0x301: 0x3736, 0x302: 0x37ba, + 0x310: 0x3712, 0x311: 0x3796, + 0x312: 0x3718, 0x313: 0x379c, 0x316: 0x372a, 0x317: 0x37ae, + 0x318: 0xa000, 0x319: 0xa000, 0x31a: 0x382c, 0x31b: 0x3832, 0x31c: 0x373c, 0x31d: 0x37c0, + 0x31e: 0x3742, 0x31f: 0x37c6, 0x322: 0x374e, 0x323: 0x37d2, + 0x324: 0x375a, 0x325: 0x37de, 0x326: 0x3766, 0x327: 0x37ea, 0x328: 0xa000, 0x329: 0xa000, + 0x32a: 0x3838, 0x32b: 0x383e, 0x32c: 0x3790, 0x32d: 0x3814, 0x32e: 0x376c, 0x32f: 0x37f0, + 0x330: 0x3778, 0x331: 0x37fc, 0x332: 0x377e, 0x333: 0x3802, 0x334: 0x3784, 0x335: 0x3808, + 0x338: 0x378a, 0x339: 0x380e, + // Block 0xd, offset 0x340 + 0x351: 0x812d, + 0x352: 0x8132, 0x353: 0x8132, 0x354: 0x8132, 0x355: 0x8132, 0x356: 0x812d, 0x357: 0x8132, + 0x358: 0x8132, 0x359: 0x8132, 0x35a: 0x812e, 0x35b: 0x812d, 0x35c: 0x8132, 0x35d: 0x8132, + 0x35e: 0x8132, 0x35f: 0x8132, 0x360: 0x8132, 0x361: 0x8132, 0x362: 0x812d, 0x363: 0x812d, + 0x364: 0x812d, 0x365: 0x812d, 0x366: 0x812d, 0x367: 0x812d, 0x368: 0x8132, 0x369: 0x8132, + 0x36a: 0x812d, 0x36b: 0x8132, 0x36c: 0x8132, 0x36d: 0x812e, 0x36e: 0x8131, 0x36f: 0x8132, + 0x370: 0x8105, 0x371: 0x8106, 0x372: 0x8107, 0x373: 0x8108, 0x374: 0x8109, 0x375: 0x810a, + 0x376: 0x810b, 0x377: 0x810c, 0x378: 0x810d, 0x379: 0x810e, 0x37a: 0x810e, 0x37b: 0x810f, + 0x37c: 0x8110, 0x37d: 0x8111, 0x37f: 0x8112, + // Block 0xe, offset 0x380 + 0x388: 0xa000, 0x38a: 0xa000, 0x38b: 0x8116, + 0x38c: 0x8117, 0x38d: 0x8118, 0x38e: 0x8119, 0x38f: 0x811a, 0x390: 0x811b, 0x391: 0x811c, + 0x392: 0x811d, 0x393: 0x9932, 0x394: 0x9932, 0x395: 0x992d, 0x396: 0x812d, 0x397: 0x8132, + 0x398: 0x8132, 0x399: 0x8132, 0x39a: 0x8132, 0x39b: 0x8132, 0x39c: 0x812d, 0x39d: 0x8132, + 0x39e: 0x8132, 0x39f: 0x812d, + 0x3b0: 0x811e, + // Block 0xf, offset 0x3c0 + 0x3d3: 0x812d, 0x3d4: 0x8132, 0x3d5: 0x8132, 0x3d6: 0x8132, 0x3d7: 0x8132, + 0x3d8: 0x8132, 0x3d9: 0x8132, 0x3da: 0x8132, 0x3db: 0x8132, 0x3dc: 0x8132, 0x3dd: 0x8132, + 0x3de: 0x8132, 0x3df: 0x8132, 0x3e0: 0x8132, 0x3e1: 0x8132, 0x3e3: 0x812d, + 0x3e4: 0x8132, 0x3e5: 0x8132, 0x3e6: 0x812d, 0x3e7: 0x8132, 0x3e8: 0x8132, 0x3e9: 0x812d, + 0x3ea: 0x8132, 0x3eb: 0x8132, 0x3ec: 0x8132, 0x3ed: 0x812d, 0x3ee: 0x812d, 0x3ef: 0x812d, + 0x3f0: 0x8116, 0x3f1: 0x8117, 0x3f2: 0x8118, 0x3f3: 0x8132, 0x3f4: 0x8132, 0x3f5: 0x8132, + 0x3f6: 0x812d, 0x3f7: 0x8132, 0x3f8: 0x8132, 0x3f9: 0x812d, 0x3fa: 0x812d, 0x3fb: 0x8132, + 0x3fc: 0x8132, 0x3fd: 0x8132, 0x3fe: 0x8132, 0x3ff: 0x8132, + // Block 0x10, offset 0x400 + 0x405: 0xa000, + 0x406: 0x2d29, 0x407: 0xa000, 0x408: 0x2d31, 0x409: 0xa000, 0x40a: 0x2d39, 0x40b: 0xa000, + 0x40c: 0x2d41, 0x40d: 0xa000, 0x40e: 0x2d49, 0x411: 0xa000, + 0x412: 0x2d51, + 0x434: 0x8102, 0x435: 0x9900, + 0x43a: 0xa000, 0x43b: 0x2d59, + 0x43c: 0xa000, 0x43d: 0x2d61, 0x43e: 0xa000, 0x43f: 0xa000, + // Block 0x11, offset 0x440 + 0x440: 0x8132, 0x441: 0x8132, 0x442: 0x812d, 0x443: 0x8132, 0x444: 0x8132, 0x445: 0x8132, + 0x446: 0x8132, 0x447: 0x8132, 0x448: 0x8132, 0x449: 0x8132, 0x44a: 0x812d, 0x44b: 0x8132, + 0x44c: 0x8132, 0x44d: 0x8135, 0x44e: 0x812a, 0x44f: 0x812d, 0x450: 0x8129, 0x451: 0x8132, + 0x452: 0x8132, 0x453: 0x8132, 0x454: 0x8132, 0x455: 0x8132, 0x456: 0x8132, 0x457: 0x8132, + 0x458: 0x8132, 0x459: 0x8132, 0x45a: 0x8132, 0x45b: 0x8132, 0x45c: 0x8132, 0x45d: 0x8132, + 0x45e: 0x8132, 0x45f: 0x8132, 0x460: 0x8132, 0x461: 0x8132, 0x462: 0x8132, 0x463: 0x8132, + 0x464: 0x8132, 0x465: 0x8132, 0x466: 0x8132, 0x467: 0x8132, 0x468: 0x8132, 0x469: 0x8132, + 0x46a: 0x8132, 0x46b: 0x8132, 0x46c: 0x8132, 0x46d: 0x8132, 0x46e: 0x8132, 0x46f: 0x8132, + 0x470: 0x8132, 0x471: 0x8132, 0x472: 0x8132, 0x473: 0x8132, 0x474: 0x8132, 0x475: 0x8132, + 0x476: 0x8133, 0x477: 0x8131, 0x478: 0x8131, 0x479: 0x812d, 0x47b: 0x8132, + 0x47c: 0x8134, 0x47d: 0x812d, 0x47e: 0x8132, 0x47f: 0x812d, + // Block 0x12, offset 0x480 + 0x480: 0x2f9a, 0x481: 0x32a6, 0x482: 0x2fa4, 0x483: 0x32b0, 0x484: 0x2fa9, 0x485: 0x32b5, + 0x486: 0x2fae, 0x487: 0x32ba, 0x488: 0x38cf, 0x489: 0x3a5e, 0x48a: 0x2fc7, 0x48b: 0x32d3, + 0x48c: 0x2fd1, 0x48d: 0x32dd, 0x48e: 0x2fe0, 0x48f: 0x32ec, 0x490: 0x2fd6, 0x491: 0x32e2, + 0x492: 0x2fdb, 0x493: 0x32e7, 0x494: 0x38f2, 0x495: 0x3a81, 0x496: 0x38f9, 0x497: 0x3a88, + 0x498: 0x301c, 0x499: 0x3328, 0x49a: 0x3021, 0x49b: 0x332d, 0x49c: 0x3907, 0x49d: 0x3a96, + 0x49e: 0x3026, 0x49f: 0x3332, 0x4a0: 0x3035, 0x4a1: 0x3341, 0x4a2: 0x3053, 0x4a3: 0x335f, + 0x4a4: 0x3062, 0x4a5: 0x336e, 0x4a6: 0x3058, 0x4a7: 0x3364, 0x4a8: 0x3067, 0x4a9: 0x3373, + 0x4aa: 0x306c, 0x4ab: 0x3378, 0x4ac: 0x30b2, 0x4ad: 0x33be, 0x4ae: 0x390e, 0x4af: 0x3a9d, + 0x4b0: 0x30bc, 0x4b1: 0x33cd, 0x4b2: 0x30c6, 0x4b3: 0x33d7, 0x4b4: 0x30d0, 0x4b5: 0x33e1, + 0x4b6: 0x46c7, 0x4b7: 0x4758, 0x4b8: 0x3915, 0x4b9: 0x3aa4, 0x4ba: 0x30e9, 0x4bb: 0x33fa, + 0x4bc: 0x30e4, 0x4bd: 0x33f5, 0x4be: 0x30ee, 0x4bf: 0x33ff, + // Block 0x13, offset 0x4c0 + 0x4c0: 0x30f3, 0x4c1: 0x3404, 0x4c2: 0x30f8, 0x4c3: 0x3409, 0x4c4: 0x310c, 0x4c5: 0x341d, + 0x4c6: 0x3116, 0x4c7: 0x3427, 0x4c8: 0x3125, 0x4c9: 0x3436, 0x4ca: 0x3120, 0x4cb: 0x3431, + 0x4cc: 0x3938, 0x4cd: 0x3ac7, 0x4ce: 0x3946, 0x4cf: 0x3ad5, 0x4d0: 0x394d, 0x4d1: 0x3adc, + 0x4d2: 0x3954, 0x4d3: 0x3ae3, 0x4d4: 0x3152, 0x4d5: 0x3463, 0x4d6: 0x3157, 0x4d7: 0x3468, + 0x4d8: 0x3161, 0x4d9: 0x3472, 0x4da: 0x46f4, 0x4db: 0x4785, 0x4dc: 0x399a, 0x4dd: 0x3b29, + 0x4de: 0x317a, 0x4df: 0x348b, 0x4e0: 0x3184, 0x4e1: 0x3495, 0x4e2: 0x4703, 0x4e3: 0x4794, + 0x4e4: 0x39a1, 0x4e5: 0x3b30, 0x4e6: 0x39a8, 0x4e7: 0x3b37, 0x4e8: 0x39af, 0x4e9: 0x3b3e, + 0x4ea: 0x3193, 0x4eb: 0x34a4, 0x4ec: 0x319d, 0x4ed: 0x34b3, 0x4ee: 0x31b1, 0x4ef: 0x34c7, + 0x4f0: 0x31ac, 0x4f1: 0x34c2, 0x4f2: 0x31ed, 0x4f3: 0x3503, 0x4f4: 0x31fc, 0x4f5: 0x3512, + 0x4f6: 0x31f7, 0x4f7: 0x350d, 0x4f8: 0x39b6, 0x4f9: 0x3b45, 0x4fa: 0x39bd, 0x4fb: 0x3b4c, + 0x4fc: 0x3201, 0x4fd: 0x3517, 0x4fe: 0x3206, 0x4ff: 0x351c, + // Block 0x14, offset 0x500 + 0x500: 0x320b, 0x501: 0x3521, 0x502: 0x3210, 0x503: 0x3526, 0x504: 0x321f, 0x505: 0x3535, + 0x506: 0x321a, 0x507: 0x3530, 0x508: 0x3224, 0x509: 0x353f, 0x50a: 0x3229, 0x50b: 0x3544, + 0x50c: 0x322e, 0x50d: 0x3549, 0x50e: 0x324c, 0x50f: 0x3567, 0x510: 0x3265, 0x511: 0x3585, + 0x512: 0x3274, 0x513: 0x3594, 0x514: 0x3279, 0x515: 0x3599, 0x516: 0x337d, 0x517: 0x34a9, + 0x518: 0x353a, 0x519: 0x3576, 0x51b: 0x35d4, + 0x520: 0x46a4, 0x521: 0x4735, 0x522: 0x2f86, 0x523: 0x3292, + 0x524: 0x387b, 0x525: 0x3a0a, 0x526: 0x3874, 0x527: 0x3a03, 0x528: 0x3889, 0x529: 0x3a18, + 0x52a: 0x3882, 0x52b: 0x3a11, 0x52c: 0x38c1, 0x52d: 0x3a50, 0x52e: 0x3897, 0x52f: 0x3a26, + 0x530: 0x3890, 0x531: 0x3a1f, 0x532: 0x38a5, 0x533: 0x3a34, 0x534: 0x389e, 0x535: 0x3a2d, + 0x536: 0x38c8, 0x537: 0x3a57, 0x538: 0x46b8, 0x539: 0x4749, 0x53a: 0x3003, 0x53b: 0x330f, + 0x53c: 0x2fef, 0x53d: 0x32fb, 0x53e: 0x38dd, 0x53f: 0x3a6c, + // Block 0x15, offset 0x540 + 0x540: 0x38d6, 0x541: 0x3a65, 0x542: 0x38eb, 0x543: 0x3a7a, 0x544: 0x38e4, 0x545: 0x3a73, + 0x546: 0x3900, 0x547: 0x3a8f, 0x548: 0x3094, 0x549: 0x33a0, 0x54a: 0x30a8, 0x54b: 0x33b4, + 0x54c: 0x46ea, 0x54d: 0x477b, 0x54e: 0x3139, 0x54f: 0x344a, 0x550: 0x3923, 0x551: 0x3ab2, + 0x552: 0x391c, 0x553: 0x3aab, 0x554: 0x3931, 0x555: 0x3ac0, 0x556: 0x392a, 0x557: 0x3ab9, + 0x558: 0x398c, 0x559: 0x3b1b, 0x55a: 0x3970, 0x55b: 0x3aff, 0x55c: 0x3969, 0x55d: 0x3af8, + 0x55e: 0x397e, 0x55f: 0x3b0d, 0x560: 0x3977, 0x561: 0x3b06, 0x562: 0x3985, 0x563: 0x3b14, + 0x564: 0x31e8, 0x565: 0x34fe, 0x566: 0x31ca, 0x567: 0x34e0, 0x568: 0x39e7, 0x569: 0x3b76, + 0x56a: 0x39e0, 0x56b: 0x3b6f, 0x56c: 0x39f5, 0x56d: 0x3b84, 0x56e: 0x39ee, 0x56f: 0x3b7d, + 0x570: 0x39fc, 0x571: 0x3b8b, 0x572: 0x3233, 0x573: 0x354e, 0x574: 0x325b, 0x575: 0x357b, + 0x576: 0x3256, 0x577: 0x3571, 0x578: 0x3242, 0x579: 0x355d, + // Block 0x16, offset 0x580 + 0x580: 0x4807, 0x581: 0x480d, 0x582: 0x4921, 0x583: 0x4939, 0x584: 0x4929, 0x585: 0x4941, + 0x586: 0x4931, 0x587: 0x4949, 0x588: 0x47ad, 0x589: 0x47b3, 0x58a: 0x4891, 0x58b: 0x48a9, + 0x58c: 0x4899, 0x58d: 0x48b1, 0x58e: 0x48a1, 0x58f: 0x48b9, 0x590: 0x4819, 0x591: 0x481f, + 0x592: 0x3dbb, 0x593: 0x3dcb, 0x594: 0x3dc3, 0x595: 0x3dd3, + 0x598: 0x47b9, 0x599: 0x47bf, 0x59a: 0x3ceb, 0x59b: 0x3cfb, 0x59c: 0x3cf3, 0x59d: 0x3d03, + 0x5a0: 0x4831, 0x5a1: 0x4837, 0x5a2: 0x4951, 0x5a3: 0x4969, + 0x5a4: 0x4959, 0x5a5: 0x4971, 0x5a6: 0x4961, 0x5a7: 0x4979, 0x5a8: 0x47c5, 0x5a9: 0x47cb, + 0x5aa: 0x48c1, 0x5ab: 0x48d9, 0x5ac: 0x48c9, 0x5ad: 0x48e1, 0x5ae: 0x48d1, 0x5af: 0x48e9, + 0x5b0: 0x4849, 0x5b1: 0x484f, 0x5b2: 0x3e1b, 0x5b3: 0x3e33, 0x5b4: 0x3e23, 0x5b5: 0x3e3b, + 0x5b6: 0x3e2b, 0x5b7: 0x3e43, 0x5b8: 0x47d1, 0x5b9: 0x47d7, 0x5ba: 0x3d1b, 0x5bb: 0x3d33, + 0x5bc: 0x3d23, 0x5bd: 0x3d3b, 0x5be: 0x3d2b, 0x5bf: 0x3d43, + // Block 0x17, offset 0x5c0 + 0x5c0: 0x4855, 0x5c1: 0x485b, 0x5c2: 0x3e4b, 0x5c3: 0x3e5b, 0x5c4: 0x3e53, 0x5c5: 0x3e63, + 0x5c8: 0x47dd, 0x5c9: 0x47e3, 0x5ca: 0x3d4b, 0x5cb: 0x3d5b, + 0x5cc: 0x3d53, 0x5cd: 0x3d63, 0x5d0: 0x4867, 0x5d1: 0x486d, + 0x5d2: 0x3e83, 0x5d3: 0x3e9b, 0x5d4: 0x3e8b, 0x5d5: 0x3ea3, 0x5d6: 0x3e93, 0x5d7: 0x3eab, + 0x5d9: 0x47e9, 0x5db: 0x3d6b, 0x5dd: 0x3d73, + 0x5df: 0x3d7b, 0x5e0: 0x487f, 0x5e1: 0x4885, 0x5e2: 0x4981, 0x5e3: 0x4999, + 0x5e4: 0x4989, 0x5e5: 0x49a1, 0x5e6: 0x4991, 0x5e7: 0x49a9, 0x5e8: 0x47ef, 0x5e9: 0x47f5, + 0x5ea: 0x48f1, 0x5eb: 0x4909, 0x5ec: 0x48f9, 0x5ed: 0x4911, 0x5ee: 0x4901, 0x5ef: 0x4919, + 0x5f0: 0x47fb, 0x5f1: 0x4321, 0x5f2: 0x3694, 0x5f3: 0x4327, 0x5f4: 0x4825, 0x5f5: 0x432d, + 0x5f6: 0x36a6, 0x5f7: 0x4333, 0x5f8: 0x36c4, 0x5f9: 0x4339, 0x5fa: 0x36dc, 0x5fb: 0x433f, + 0x5fc: 0x4873, 0x5fd: 0x4345, + // Block 0x18, offset 0x600 + 0x600: 0x3da3, 0x601: 0x3dab, 0x602: 0x4187, 0x603: 0x41a5, 0x604: 0x4191, 0x605: 0x41af, + 0x606: 0x419b, 0x607: 0x41b9, 0x608: 0x3cdb, 0x609: 0x3ce3, 0x60a: 0x40d3, 0x60b: 0x40f1, + 0x60c: 0x40dd, 0x60d: 0x40fb, 0x60e: 0x40e7, 0x60f: 0x4105, 0x610: 0x3deb, 0x611: 0x3df3, + 0x612: 0x41c3, 0x613: 0x41e1, 0x614: 0x41cd, 0x615: 0x41eb, 0x616: 0x41d7, 0x617: 0x41f5, + 0x618: 0x3d0b, 0x619: 0x3d13, 0x61a: 0x410f, 0x61b: 0x412d, 0x61c: 0x4119, 0x61d: 0x4137, + 0x61e: 0x4123, 0x61f: 0x4141, 0x620: 0x3ec3, 0x621: 0x3ecb, 0x622: 0x41ff, 0x623: 0x421d, + 0x624: 0x4209, 0x625: 0x4227, 0x626: 0x4213, 0x627: 0x4231, 0x628: 0x3d83, 0x629: 0x3d8b, + 0x62a: 0x414b, 0x62b: 0x4169, 0x62c: 0x4155, 0x62d: 0x4173, 0x62e: 0x415f, 0x62f: 0x417d, + 0x630: 0x3688, 0x631: 0x3682, 0x632: 0x3d93, 0x633: 0x368e, 0x634: 0x3d9b, + 0x636: 0x4813, 0x637: 0x3db3, 0x638: 0x35f8, 0x639: 0x35f2, 0x63a: 0x35e6, 0x63b: 0x42f1, + 0x63c: 0x35fe, 0x63d: 0x8100, 0x63e: 0x01d3, 0x63f: 0xa100, + // Block 0x19, offset 0x640 + 0x640: 0x8100, 0x641: 0x35aa, 0x642: 0x3ddb, 0x643: 0x36a0, 0x644: 0x3de3, + 0x646: 0x483d, 0x647: 0x3dfb, 0x648: 0x3604, 0x649: 0x42f7, 0x64a: 0x3610, 0x64b: 0x42fd, + 0x64c: 0x361c, 0x64d: 0x3b92, 0x64e: 0x3b99, 0x64f: 0x3ba0, 0x650: 0x36b8, 0x651: 0x36b2, + 0x652: 0x3e03, 0x653: 0x44e7, 0x656: 0x36be, 0x657: 0x3e13, + 0x658: 0x3634, 0x659: 0x362e, 0x65a: 0x3622, 0x65b: 0x4303, 0x65d: 0x3ba7, + 0x65e: 0x3bae, 0x65f: 0x3bb5, 0x660: 0x36ee, 0x661: 0x36e8, 0x662: 0x3e6b, 0x663: 0x44ef, + 0x664: 0x36d0, 0x665: 0x36d6, 0x666: 0x36f4, 0x667: 0x3e7b, 0x668: 0x3664, 0x669: 0x365e, + 0x66a: 0x3652, 0x66b: 0x430f, 0x66c: 0x364c, 0x66d: 0x359e, 0x66e: 0x42eb, 0x66f: 0x0081, + 0x672: 0x3eb3, 0x673: 0x36fa, 0x674: 0x3ebb, + 0x676: 0x488b, 0x677: 0x3ed3, 0x678: 0x3640, 0x679: 0x4309, 0x67a: 0x3670, 0x67b: 0x431b, + 0x67c: 0x367c, 0x67d: 0x4259, 0x67e: 0xa100, + // Block 0x1a, offset 0x680 + 0x681: 0x3c09, 0x683: 0xa000, 0x684: 0x3c10, 0x685: 0xa000, + 0x687: 0x3c17, 0x688: 0xa000, 0x689: 0x3c1e, + 0x68d: 0xa000, + 0x6a0: 0x2f68, 0x6a1: 0xa000, 0x6a2: 0x3c2c, + 0x6a4: 0xa000, 0x6a5: 0xa000, + 0x6ad: 0x3c25, 0x6ae: 0x2f63, 0x6af: 0x2f6d, + 0x6b0: 0x3c33, 0x6b1: 0x3c3a, 0x6b2: 0xa000, 0x6b3: 0xa000, 0x6b4: 0x3c41, 0x6b5: 0x3c48, + 0x6b6: 0xa000, 0x6b7: 0xa000, 0x6b8: 0x3c4f, 0x6b9: 0x3c56, 0x6ba: 0xa000, 0x6bb: 0xa000, + 0x6bc: 0xa000, 0x6bd: 0xa000, + // Block 0x1b, offset 0x6c0 + 0x6c0: 0x3c5d, 0x6c1: 0x3c64, 0x6c2: 0xa000, 0x6c3: 0xa000, 0x6c4: 0x3c79, 0x6c5: 0x3c80, + 0x6c6: 0xa000, 0x6c7: 0xa000, 0x6c8: 0x3c87, 0x6c9: 0x3c8e, + 0x6d1: 0xa000, + 0x6d2: 0xa000, + 0x6e2: 0xa000, + 0x6e8: 0xa000, 0x6e9: 0xa000, + 0x6eb: 0xa000, 0x6ec: 0x3ca3, 0x6ed: 0x3caa, 0x6ee: 0x3cb1, 0x6ef: 0x3cb8, + 0x6f2: 0xa000, 0x6f3: 0xa000, 0x6f4: 0xa000, 0x6f5: 0xa000, + // Block 0x1c, offset 0x700 + 0x706: 0xa000, 0x70b: 0xa000, + 0x70c: 0x3f0b, 0x70d: 0xa000, 0x70e: 0x3f13, 0x70f: 0xa000, 0x710: 0x3f1b, 0x711: 0xa000, + 0x712: 0x3f23, 0x713: 0xa000, 0x714: 0x3f2b, 0x715: 0xa000, 0x716: 0x3f33, 0x717: 0xa000, + 0x718: 0x3f3b, 0x719: 0xa000, 0x71a: 0x3f43, 0x71b: 0xa000, 0x71c: 0x3f4b, 0x71d: 0xa000, + 0x71e: 0x3f53, 0x71f: 0xa000, 0x720: 0x3f5b, 0x721: 0xa000, 0x722: 0x3f63, + 0x724: 0xa000, 0x725: 0x3f6b, 0x726: 0xa000, 0x727: 0x3f73, 0x728: 0xa000, 0x729: 0x3f7b, + 0x72f: 0xa000, + 0x730: 0x3f83, 0x731: 0x3f8b, 0x732: 0xa000, 0x733: 0x3f93, 0x734: 0x3f9b, 0x735: 0xa000, + 0x736: 0x3fa3, 0x737: 0x3fab, 0x738: 0xa000, 0x739: 0x3fb3, 0x73a: 0x3fbb, 0x73b: 0xa000, + 0x73c: 0x3fc3, 0x73d: 0x3fcb, + // Block 0x1d, offset 0x740 + 0x754: 0x3f03, + 0x759: 0x9903, 0x75a: 0x9903, 0x75b: 0x8100, 0x75c: 0x8100, 0x75d: 0xa000, + 0x75e: 0x3fd3, + 0x766: 0xa000, + 0x76b: 0xa000, 0x76c: 0x3fe3, 0x76d: 0xa000, 0x76e: 0x3feb, 0x76f: 0xa000, + 0x770: 0x3ff3, 0x771: 0xa000, 0x772: 0x3ffb, 0x773: 0xa000, 0x774: 0x4003, 0x775: 0xa000, + 0x776: 0x400b, 0x777: 0xa000, 0x778: 0x4013, 0x779: 0xa000, 0x77a: 0x401b, 0x77b: 0xa000, + 0x77c: 0x4023, 0x77d: 0xa000, 0x77e: 0x402b, 0x77f: 0xa000, + // Block 0x1e, offset 0x780 + 0x780: 0x4033, 0x781: 0xa000, 0x782: 0x403b, 0x784: 0xa000, 0x785: 0x4043, + 0x786: 0xa000, 0x787: 0x404b, 0x788: 0xa000, 0x789: 0x4053, + 0x78f: 0xa000, 0x790: 0x405b, 0x791: 0x4063, + 0x792: 0xa000, 0x793: 0x406b, 0x794: 0x4073, 0x795: 0xa000, 0x796: 0x407b, 0x797: 0x4083, + 0x798: 0xa000, 0x799: 0x408b, 0x79a: 0x4093, 0x79b: 0xa000, 0x79c: 0x409b, 0x79d: 0x40a3, + 0x7af: 0xa000, + 0x7b0: 0xa000, 0x7b1: 0xa000, 0x7b2: 0xa000, 0x7b4: 0x3fdb, + 0x7b7: 0x40ab, 0x7b8: 0x40b3, 0x7b9: 0x40bb, 0x7ba: 0x40c3, + 0x7bd: 0xa000, 0x7be: 0x40cb, + // Block 0x1f, offset 0x7c0 + 0x7c0: 0x1377, 0x7c1: 0x0cfb, 0x7c2: 0x13d3, 0x7c3: 0x139f, 0x7c4: 0x0e57, 0x7c5: 0x06eb, + 0x7c6: 0x08df, 0x7c7: 0x162b, 0x7c8: 0x162b, 0x7c9: 0x0a0b, 0x7ca: 0x145f, 0x7cb: 0x0943, + 0x7cc: 0x0a07, 0x7cd: 0x0bef, 0x7ce: 0x0fcf, 0x7cf: 0x115f, 0x7d0: 0x1297, 0x7d1: 0x12d3, + 0x7d2: 0x1307, 0x7d3: 0x141b, 0x7d4: 0x0d73, 0x7d5: 0x0dff, 0x7d6: 0x0eab, 0x7d7: 0x0f43, + 0x7d8: 0x125f, 0x7d9: 0x1447, 0x7da: 0x1573, 0x7db: 0x070f, 0x7dc: 0x08b3, 0x7dd: 0x0d87, + 0x7de: 0x0ecf, 0x7df: 0x1293, 0x7e0: 0x15c3, 0x7e1: 0x0ab3, 0x7e2: 0x0e77, 0x7e3: 0x1283, + 0x7e4: 0x1317, 0x7e5: 0x0c23, 0x7e6: 0x11bb, 0x7e7: 0x12df, 0x7e8: 0x0b1f, 0x7e9: 0x0d0f, + 0x7ea: 0x0e17, 0x7eb: 0x0f1b, 0x7ec: 0x1427, 0x7ed: 0x074f, 0x7ee: 0x07e7, 0x7ef: 0x0853, + 0x7f0: 0x0c8b, 0x7f1: 0x0d7f, 0x7f2: 0x0ecb, 0x7f3: 0x0fef, 0x7f4: 0x1177, 0x7f5: 0x128b, + 0x7f6: 0x12a3, 0x7f7: 0x13c7, 0x7f8: 0x14ef, 0x7f9: 0x15a3, 0x7fa: 0x15bf, 0x7fb: 0x102b, + 0x7fc: 0x106b, 0x7fd: 0x1123, 0x7fe: 0x1243, 0x7ff: 0x147b, + // Block 0x20, offset 0x800 + 0x800: 0x15cb, 0x801: 0x134b, 0x802: 0x09c7, 0x803: 0x0b3b, 0x804: 0x10db, 0x805: 0x119b, + 0x806: 0x0eff, 0x807: 0x1033, 0x808: 0x1397, 0x809: 0x14e7, 0x80a: 0x09c3, 0x80b: 0x0a8f, + 0x80c: 0x0d77, 0x80d: 0x0e2b, 0x80e: 0x0e5f, 0x80f: 0x1113, 0x810: 0x113b, 0x811: 0x14a7, + 0x812: 0x084f, 0x813: 0x11a7, 0x814: 0x07f3, 0x815: 0x07ef, 0x816: 0x1097, 0x817: 0x1127, + 0x818: 0x125b, 0x819: 0x14af, 0x81a: 0x1367, 0x81b: 0x0c27, 0x81c: 0x0d73, 0x81d: 0x1357, + 0x81e: 0x06f7, 0x81f: 0x0a63, 0x820: 0x0b93, 0x821: 0x0f2f, 0x822: 0x0faf, 0x823: 0x0873, + 0x824: 0x103b, 0x825: 0x075f, 0x826: 0x0b77, 0x827: 0x06d7, 0x828: 0x0deb, 0x829: 0x0ca3, + 0x82a: 0x110f, 0x82b: 0x08c7, 0x82c: 0x09b3, 0x82d: 0x0ffb, 0x82e: 0x1263, 0x82f: 0x133b, + 0x830: 0x0db7, 0x831: 0x13f7, 0x832: 0x0de3, 0x833: 0x0c37, 0x834: 0x121b, 0x835: 0x0c57, + 0x836: 0x0fab, 0x837: 0x072b, 0x838: 0x07a7, 0x839: 0x07eb, 0x83a: 0x0d53, 0x83b: 0x10fb, + 0x83c: 0x11f3, 0x83d: 0x1347, 0x83e: 0x145b, 0x83f: 0x085b, + // Block 0x21, offset 0x840 + 0x840: 0x090f, 0x841: 0x0a17, 0x842: 0x0b2f, 0x843: 0x0cbf, 0x844: 0x0e7b, 0x845: 0x103f, + 0x846: 0x1497, 0x847: 0x157b, 0x848: 0x15cf, 0x849: 0x15e7, 0x84a: 0x0837, 0x84b: 0x0cf3, + 0x84c: 0x0da3, 0x84d: 0x13eb, 0x84e: 0x0afb, 0x84f: 0x0bd7, 0x850: 0x0bf3, 0x851: 0x0c83, + 0x852: 0x0e6b, 0x853: 0x0eb7, 0x854: 0x0f67, 0x855: 0x108b, 0x856: 0x112f, 0x857: 0x1193, + 0x858: 0x13db, 0x859: 0x126b, 0x85a: 0x1403, 0x85b: 0x147f, 0x85c: 0x080f, 0x85d: 0x083b, + 0x85e: 0x0923, 0x85f: 0x0ea7, 0x860: 0x12f3, 0x861: 0x133b, 0x862: 0x0b1b, 0x863: 0x0b8b, + 0x864: 0x0c4f, 0x865: 0x0daf, 0x866: 0x10d7, 0x867: 0x0f23, 0x868: 0x073b, 0x869: 0x097f, + 0x86a: 0x0a63, 0x86b: 0x0ac7, 0x86c: 0x0b97, 0x86d: 0x0f3f, 0x86e: 0x0f5b, 0x86f: 0x116b, + 0x870: 0x118b, 0x871: 0x1463, 0x872: 0x14e3, 0x873: 0x14f3, 0x874: 0x152f, 0x875: 0x0753, + 0x876: 0x107f, 0x877: 0x144f, 0x878: 0x14cb, 0x879: 0x0baf, 0x87a: 0x0717, 0x87b: 0x0777, + 0x87c: 0x0a67, 0x87d: 0x0a87, 0x87e: 0x0caf, 0x87f: 0x0d73, + // Block 0x22, offset 0x880 + 0x880: 0x0ec3, 0x881: 0x0fcb, 0x882: 0x1277, 0x883: 0x1417, 0x884: 0x1623, 0x885: 0x0ce3, + 0x886: 0x14a3, 0x887: 0x0833, 0x888: 0x0d2f, 0x889: 0x0d3b, 0x88a: 0x0e0f, 0x88b: 0x0e47, + 0x88c: 0x0f4b, 0x88d: 0x0fa7, 0x88e: 0x1027, 0x88f: 0x110b, 0x890: 0x153b, 0x891: 0x07af, + 0x892: 0x0c03, 0x893: 0x14b3, 0x894: 0x0767, 0x895: 0x0aab, 0x896: 0x0e2f, 0x897: 0x13df, + 0x898: 0x0b67, 0x899: 0x0bb7, 0x89a: 0x0d43, 0x89b: 0x0f2f, 0x89c: 0x14bb, 0x89d: 0x0817, + 0x89e: 0x08ff, 0x89f: 0x0a97, 0x8a0: 0x0cd3, 0x8a1: 0x0d1f, 0x8a2: 0x0d5f, 0x8a3: 0x0df3, + 0x8a4: 0x0f47, 0x8a5: 0x0fbb, 0x8a6: 0x1157, 0x8a7: 0x12f7, 0x8a8: 0x1303, 0x8a9: 0x1457, + 0x8aa: 0x14d7, 0x8ab: 0x0883, 0x8ac: 0x0e4b, 0x8ad: 0x0903, 0x8ae: 0x0ec7, 0x8af: 0x0f6b, + 0x8b0: 0x1287, 0x8b1: 0x14bf, 0x8b2: 0x15ab, 0x8b3: 0x15d3, 0x8b4: 0x0d37, 0x8b5: 0x0e27, + 0x8b6: 0x11c3, 0x8b7: 0x10b7, 0x8b8: 0x10c3, 0x8b9: 0x10e7, 0x8ba: 0x0f17, 0x8bb: 0x0e9f, + 0x8bc: 0x1363, 0x8bd: 0x0733, 0x8be: 0x122b, 0x8bf: 0x081b, + // Block 0x23, offset 0x8c0 + 0x8c0: 0x080b, 0x8c1: 0x0b0b, 0x8c2: 0x0c2b, 0x8c3: 0x10f3, 0x8c4: 0x0a53, 0x8c5: 0x0e03, + 0x8c6: 0x0cef, 0x8c7: 0x13e7, 0x8c8: 0x12e7, 0x8c9: 0x14ab, 0x8ca: 0x1323, 0x8cb: 0x0b27, + 0x8cc: 0x0787, 0x8cd: 0x095b, 0x8d0: 0x09af, + 0x8d2: 0x0cdf, 0x8d5: 0x07f7, 0x8d6: 0x0f1f, 0x8d7: 0x0fe3, + 0x8d8: 0x1047, 0x8d9: 0x1063, 0x8da: 0x1067, 0x8db: 0x107b, 0x8dc: 0x14fb, 0x8dd: 0x10eb, + 0x8de: 0x116f, 0x8e0: 0x128f, 0x8e2: 0x1353, + 0x8e5: 0x1407, 0x8e6: 0x1433, + 0x8ea: 0x154f, 0x8eb: 0x1553, 0x8ec: 0x1557, 0x8ed: 0x15bb, 0x8ee: 0x142b, 0x8ef: 0x14c7, + 0x8f0: 0x0757, 0x8f1: 0x077b, 0x8f2: 0x078f, 0x8f3: 0x084b, 0x8f4: 0x0857, 0x8f5: 0x0897, + 0x8f6: 0x094b, 0x8f7: 0x0967, 0x8f8: 0x096f, 0x8f9: 0x09ab, 0x8fa: 0x09b7, 0x8fb: 0x0a93, + 0x8fc: 0x0a9b, 0x8fd: 0x0ba3, 0x8fe: 0x0bcb, 0x8ff: 0x0bd3, + // Block 0x24, offset 0x900 + 0x900: 0x0beb, 0x901: 0x0c97, 0x902: 0x0cc7, 0x903: 0x0ce7, 0x904: 0x0d57, 0x905: 0x0e1b, + 0x906: 0x0e37, 0x907: 0x0e67, 0x908: 0x0ebb, 0x909: 0x0edb, 0x90a: 0x0f4f, 0x90b: 0x102f, + 0x90c: 0x104b, 0x90d: 0x1053, 0x90e: 0x104f, 0x90f: 0x1057, 0x910: 0x105b, 0x911: 0x105f, + 0x912: 0x1073, 0x913: 0x1077, 0x914: 0x109b, 0x915: 0x10af, 0x916: 0x10cb, 0x917: 0x112f, + 0x918: 0x1137, 0x919: 0x113f, 0x91a: 0x1153, 0x91b: 0x117b, 0x91c: 0x11cb, 0x91d: 0x11ff, + 0x91e: 0x11ff, 0x91f: 0x1267, 0x920: 0x130f, 0x921: 0x1327, 0x922: 0x135b, 0x923: 0x135f, + 0x924: 0x13a3, 0x925: 0x13a7, 0x926: 0x13ff, 0x927: 0x1407, 0x928: 0x14db, 0x929: 0x151f, + 0x92a: 0x1537, 0x92b: 0x0b9b, 0x92c: 0x171e, 0x92d: 0x11e3, + 0x930: 0x06df, 0x931: 0x07e3, 0x932: 0x07a3, 0x933: 0x074b, 0x934: 0x078b, 0x935: 0x07b7, + 0x936: 0x0847, 0x937: 0x0863, 0x938: 0x094b, 0x939: 0x0937, 0x93a: 0x0947, 0x93b: 0x0963, + 0x93c: 0x09af, 0x93d: 0x09bf, 0x93e: 0x0a03, 0x93f: 0x0a0f, + // Block 0x25, offset 0x940 + 0x940: 0x0a2b, 0x941: 0x0a3b, 0x942: 0x0b23, 0x943: 0x0b2b, 0x944: 0x0b5b, 0x945: 0x0b7b, + 0x946: 0x0bab, 0x947: 0x0bc3, 0x948: 0x0bb3, 0x949: 0x0bd3, 0x94a: 0x0bc7, 0x94b: 0x0beb, + 0x94c: 0x0c07, 0x94d: 0x0c5f, 0x94e: 0x0c6b, 0x94f: 0x0c73, 0x950: 0x0c9b, 0x951: 0x0cdf, + 0x952: 0x0d0f, 0x953: 0x0d13, 0x954: 0x0d27, 0x955: 0x0da7, 0x956: 0x0db7, 0x957: 0x0e0f, + 0x958: 0x0e5b, 0x959: 0x0e53, 0x95a: 0x0e67, 0x95b: 0x0e83, 0x95c: 0x0ebb, 0x95d: 0x1013, + 0x95e: 0x0edf, 0x95f: 0x0f13, 0x960: 0x0f1f, 0x961: 0x0f5f, 0x962: 0x0f7b, 0x963: 0x0f9f, + 0x964: 0x0fc3, 0x965: 0x0fc7, 0x966: 0x0fe3, 0x967: 0x0fe7, 0x968: 0x0ff7, 0x969: 0x100b, + 0x96a: 0x1007, 0x96b: 0x1037, 0x96c: 0x10b3, 0x96d: 0x10cb, 0x96e: 0x10e3, 0x96f: 0x111b, + 0x970: 0x112f, 0x971: 0x114b, 0x972: 0x117b, 0x973: 0x122f, 0x974: 0x1257, 0x975: 0x12cb, + 0x976: 0x1313, 0x977: 0x131f, 0x978: 0x1327, 0x979: 0x133f, 0x97a: 0x1353, 0x97b: 0x1343, + 0x97c: 0x135b, 0x97d: 0x1357, 0x97e: 0x134f, 0x97f: 0x135f, + // Block 0x26, offset 0x980 + 0x980: 0x136b, 0x981: 0x13a7, 0x982: 0x13e3, 0x983: 0x1413, 0x984: 0x144b, 0x985: 0x146b, + 0x986: 0x14b7, 0x987: 0x14db, 0x988: 0x14fb, 0x989: 0x150f, 0x98a: 0x151f, 0x98b: 0x152b, + 0x98c: 0x1537, 0x98d: 0x158b, 0x98e: 0x162b, 0x98f: 0x16b5, 0x990: 0x16b0, 0x991: 0x16e2, + 0x992: 0x0607, 0x993: 0x062f, 0x994: 0x0633, 0x995: 0x1764, 0x996: 0x1791, 0x997: 0x1809, + 0x998: 0x1617, 0x999: 0x1627, + // Block 0x27, offset 0x9c0 + 0x9c0: 0x06fb, 0x9c1: 0x06f3, 0x9c2: 0x0703, 0x9c3: 0x1647, 0x9c4: 0x0747, 0x9c5: 0x0757, + 0x9c6: 0x075b, 0x9c7: 0x0763, 0x9c8: 0x076b, 0x9c9: 0x076f, 0x9ca: 0x077b, 0x9cb: 0x0773, + 0x9cc: 0x05b3, 0x9cd: 0x165b, 0x9ce: 0x078f, 0x9cf: 0x0793, 0x9d0: 0x0797, 0x9d1: 0x07b3, + 0x9d2: 0x164c, 0x9d3: 0x05b7, 0x9d4: 0x079f, 0x9d5: 0x07bf, 0x9d6: 0x1656, 0x9d7: 0x07cf, + 0x9d8: 0x07d7, 0x9d9: 0x0737, 0x9da: 0x07df, 0x9db: 0x07e3, 0x9dc: 0x1831, 0x9dd: 0x07ff, + 0x9de: 0x0807, 0x9df: 0x05bf, 0x9e0: 0x081f, 0x9e1: 0x0823, 0x9e2: 0x082b, 0x9e3: 0x082f, + 0x9e4: 0x05c3, 0x9e5: 0x0847, 0x9e6: 0x084b, 0x9e7: 0x0857, 0x9e8: 0x0863, 0x9e9: 0x0867, + 0x9ea: 0x086b, 0x9eb: 0x0873, 0x9ec: 0x0893, 0x9ed: 0x0897, 0x9ee: 0x089f, 0x9ef: 0x08af, + 0x9f0: 0x08b7, 0x9f1: 0x08bb, 0x9f2: 0x08bb, 0x9f3: 0x08bb, 0x9f4: 0x166a, 0x9f5: 0x0e93, + 0x9f6: 0x08cf, 0x9f7: 0x08d7, 0x9f8: 0x166f, 0x9f9: 0x08e3, 0x9fa: 0x08eb, 0x9fb: 0x08f3, + 0x9fc: 0x091b, 0x9fd: 0x0907, 0x9fe: 0x0913, 0x9ff: 0x0917, + // Block 0x28, offset 0xa00 + 0xa00: 0x091f, 0xa01: 0x0927, 0xa02: 0x092b, 0xa03: 0x0933, 0xa04: 0x093b, 0xa05: 0x093f, + 0xa06: 0x093f, 0xa07: 0x0947, 0xa08: 0x094f, 0xa09: 0x0953, 0xa0a: 0x095f, 0xa0b: 0x0983, + 0xa0c: 0x0967, 0xa0d: 0x0987, 0xa0e: 0x096b, 0xa0f: 0x0973, 0xa10: 0x080b, 0xa11: 0x09cf, + 0xa12: 0x0997, 0xa13: 0x099b, 0xa14: 0x099f, 0xa15: 0x0993, 0xa16: 0x09a7, 0xa17: 0x09a3, + 0xa18: 0x09bb, 0xa19: 0x1674, 0xa1a: 0x09d7, 0xa1b: 0x09db, 0xa1c: 0x09e3, 0xa1d: 0x09ef, + 0xa1e: 0x09f7, 0xa1f: 0x0a13, 0xa20: 0x1679, 0xa21: 0x167e, 0xa22: 0x0a1f, 0xa23: 0x0a23, + 0xa24: 0x0a27, 0xa25: 0x0a1b, 0xa26: 0x0a2f, 0xa27: 0x05c7, 0xa28: 0x05cb, 0xa29: 0x0a37, + 0xa2a: 0x0a3f, 0xa2b: 0x0a3f, 0xa2c: 0x1683, 0xa2d: 0x0a5b, 0xa2e: 0x0a5f, 0xa2f: 0x0a63, + 0xa30: 0x0a6b, 0xa31: 0x1688, 0xa32: 0x0a73, 0xa33: 0x0a77, 0xa34: 0x0b4f, 0xa35: 0x0a7f, + 0xa36: 0x05cf, 0xa37: 0x0a8b, 0xa38: 0x0a9b, 0xa39: 0x0aa7, 0xa3a: 0x0aa3, 0xa3b: 0x1692, + 0xa3c: 0x0aaf, 0xa3d: 0x1697, 0xa3e: 0x0abb, 0xa3f: 0x0ab7, + // Block 0x29, offset 0xa40 + 0xa40: 0x0abf, 0xa41: 0x0acf, 0xa42: 0x0ad3, 0xa43: 0x05d3, 0xa44: 0x0ae3, 0xa45: 0x0aeb, + 0xa46: 0x0aef, 0xa47: 0x0af3, 0xa48: 0x05d7, 0xa49: 0x169c, 0xa4a: 0x05db, 0xa4b: 0x0b0f, + 0xa4c: 0x0b13, 0xa4d: 0x0b17, 0xa4e: 0x0b1f, 0xa4f: 0x1863, 0xa50: 0x0b37, 0xa51: 0x16a6, + 0xa52: 0x16a6, 0xa53: 0x11d7, 0xa54: 0x0b47, 0xa55: 0x0b47, 0xa56: 0x05df, 0xa57: 0x16c9, + 0xa58: 0x179b, 0xa59: 0x0b57, 0xa5a: 0x0b5f, 0xa5b: 0x05e3, 0xa5c: 0x0b73, 0xa5d: 0x0b83, + 0xa5e: 0x0b87, 0xa5f: 0x0b8f, 0xa60: 0x0b9f, 0xa61: 0x05eb, 0xa62: 0x05e7, 0xa63: 0x0ba3, + 0xa64: 0x16ab, 0xa65: 0x0ba7, 0xa66: 0x0bbb, 0xa67: 0x0bbf, 0xa68: 0x0bc3, 0xa69: 0x0bbf, + 0xa6a: 0x0bcf, 0xa6b: 0x0bd3, 0xa6c: 0x0be3, 0xa6d: 0x0bdb, 0xa6e: 0x0bdf, 0xa6f: 0x0be7, + 0xa70: 0x0beb, 0xa71: 0x0bef, 0xa72: 0x0bfb, 0xa73: 0x0bff, 0xa74: 0x0c17, 0xa75: 0x0c1f, + 0xa76: 0x0c2f, 0xa77: 0x0c43, 0xa78: 0x16ba, 0xa79: 0x0c3f, 0xa7a: 0x0c33, 0xa7b: 0x0c4b, + 0xa7c: 0x0c53, 0xa7d: 0x0c67, 0xa7e: 0x16bf, 0xa7f: 0x0c6f, + // Block 0x2a, offset 0xa80 + 0xa80: 0x0c63, 0xa81: 0x0c5b, 0xa82: 0x05ef, 0xa83: 0x0c77, 0xa84: 0x0c7f, 0xa85: 0x0c87, + 0xa86: 0x0c7b, 0xa87: 0x05f3, 0xa88: 0x0c97, 0xa89: 0x0c9f, 0xa8a: 0x16c4, 0xa8b: 0x0ccb, + 0xa8c: 0x0cff, 0xa8d: 0x0cdb, 0xa8e: 0x05ff, 0xa8f: 0x0ce7, 0xa90: 0x05fb, 0xa91: 0x05f7, + 0xa92: 0x07c3, 0xa93: 0x07c7, 0xa94: 0x0d03, 0xa95: 0x0ceb, 0xa96: 0x11ab, 0xa97: 0x0663, + 0xa98: 0x0d0f, 0xa99: 0x0d13, 0xa9a: 0x0d17, 0xa9b: 0x0d2b, 0xa9c: 0x0d23, 0xa9d: 0x16dd, + 0xa9e: 0x0603, 0xa9f: 0x0d3f, 0xaa0: 0x0d33, 0xaa1: 0x0d4f, 0xaa2: 0x0d57, 0xaa3: 0x16e7, + 0xaa4: 0x0d5b, 0xaa5: 0x0d47, 0xaa6: 0x0d63, 0xaa7: 0x0607, 0xaa8: 0x0d67, 0xaa9: 0x0d6b, + 0xaaa: 0x0d6f, 0xaab: 0x0d7b, 0xaac: 0x16ec, 0xaad: 0x0d83, 0xaae: 0x060b, 0xaaf: 0x0d8f, + 0xab0: 0x16f1, 0xab1: 0x0d93, 0xab2: 0x060f, 0xab3: 0x0d9f, 0xab4: 0x0dab, 0xab5: 0x0db7, + 0xab6: 0x0dbb, 0xab7: 0x16f6, 0xab8: 0x168d, 0xab9: 0x16fb, 0xaba: 0x0ddb, 0xabb: 0x1700, + 0xabc: 0x0de7, 0xabd: 0x0def, 0xabe: 0x0ddf, 0xabf: 0x0dfb, + // Block 0x2b, offset 0xac0 + 0xac0: 0x0e0b, 0xac1: 0x0e1b, 0xac2: 0x0e0f, 0xac3: 0x0e13, 0xac4: 0x0e1f, 0xac5: 0x0e23, + 0xac6: 0x1705, 0xac7: 0x0e07, 0xac8: 0x0e3b, 0xac9: 0x0e3f, 0xaca: 0x0613, 0xacb: 0x0e53, + 0xacc: 0x0e4f, 0xacd: 0x170a, 0xace: 0x0e33, 0xacf: 0x0e6f, 0xad0: 0x170f, 0xad1: 0x1714, + 0xad2: 0x0e73, 0xad3: 0x0e87, 0xad4: 0x0e83, 0xad5: 0x0e7f, 0xad6: 0x0617, 0xad7: 0x0e8b, + 0xad8: 0x0e9b, 0xad9: 0x0e97, 0xada: 0x0ea3, 0xadb: 0x1651, 0xadc: 0x0eb3, 0xadd: 0x1719, + 0xade: 0x0ebf, 0xadf: 0x1723, 0xae0: 0x0ed3, 0xae1: 0x0edf, 0xae2: 0x0ef3, 0xae3: 0x1728, + 0xae4: 0x0f07, 0xae5: 0x0f0b, 0xae6: 0x172d, 0xae7: 0x1732, 0xae8: 0x0f27, 0xae9: 0x0f37, + 0xaea: 0x061b, 0xaeb: 0x0f3b, 0xaec: 0x061f, 0xaed: 0x061f, 0xaee: 0x0f53, 0xaef: 0x0f57, + 0xaf0: 0x0f5f, 0xaf1: 0x0f63, 0xaf2: 0x0f6f, 0xaf3: 0x0623, 0xaf4: 0x0f87, 0xaf5: 0x1737, + 0xaf6: 0x0fa3, 0xaf7: 0x173c, 0xaf8: 0x0faf, 0xaf9: 0x16a1, 0xafa: 0x0fbf, 0xafb: 0x1741, + 0xafc: 0x1746, 0xafd: 0x174b, 0xafe: 0x0627, 0xaff: 0x062b, + // Block 0x2c, offset 0xb00 + 0xb00: 0x0ff7, 0xb01: 0x1755, 0xb02: 0x1750, 0xb03: 0x175a, 0xb04: 0x175f, 0xb05: 0x0fff, + 0xb06: 0x1003, 0xb07: 0x1003, 0xb08: 0x100b, 0xb09: 0x0633, 0xb0a: 0x100f, 0xb0b: 0x0637, + 0xb0c: 0x063b, 0xb0d: 0x1769, 0xb0e: 0x1023, 0xb0f: 0x102b, 0xb10: 0x1037, 0xb11: 0x063f, + 0xb12: 0x176e, 0xb13: 0x105b, 0xb14: 0x1773, 0xb15: 0x1778, 0xb16: 0x107b, 0xb17: 0x1093, + 0xb18: 0x0643, 0xb19: 0x109b, 0xb1a: 0x109f, 0xb1b: 0x10a3, 0xb1c: 0x177d, 0xb1d: 0x1782, + 0xb1e: 0x1782, 0xb1f: 0x10bb, 0xb20: 0x0647, 0xb21: 0x1787, 0xb22: 0x10cf, 0xb23: 0x10d3, + 0xb24: 0x064b, 0xb25: 0x178c, 0xb26: 0x10ef, 0xb27: 0x064f, 0xb28: 0x10ff, 0xb29: 0x10f7, + 0xb2a: 0x1107, 0xb2b: 0x1796, 0xb2c: 0x111f, 0xb2d: 0x0653, 0xb2e: 0x112b, 0xb2f: 0x1133, + 0xb30: 0x1143, 0xb31: 0x0657, 0xb32: 0x17a0, 0xb33: 0x17a5, 0xb34: 0x065b, 0xb35: 0x17aa, + 0xb36: 0x115b, 0xb37: 0x17af, 0xb38: 0x1167, 0xb39: 0x1173, 0xb3a: 0x117b, 0xb3b: 0x17b4, + 0xb3c: 0x17b9, 0xb3d: 0x118f, 0xb3e: 0x17be, 0xb3f: 0x1197, + // Block 0x2d, offset 0xb40 + 0xb40: 0x16ce, 0xb41: 0x065f, 0xb42: 0x11af, 0xb43: 0x11b3, 0xb44: 0x0667, 0xb45: 0x11b7, + 0xb46: 0x0a33, 0xb47: 0x17c3, 0xb48: 0x17c8, 0xb49: 0x16d3, 0xb4a: 0x16d8, 0xb4b: 0x11d7, + 0xb4c: 0x11db, 0xb4d: 0x13f3, 0xb4e: 0x066b, 0xb4f: 0x1207, 0xb50: 0x1203, 0xb51: 0x120b, + 0xb52: 0x083f, 0xb53: 0x120f, 0xb54: 0x1213, 0xb55: 0x1217, 0xb56: 0x121f, 0xb57: 0x17cd, + 0xb58: 0x121b, 0xb59: 0x1223, 0xb5a: 0x1237, 0xb5b: 0x123b, 0xb5c: 0x1227, 0xb5d: 0x123f, + 0xb5e: 0x1253, 0xb5f: 0x1267, 0xb60: 0x1233, 0xb61: 0x1247, 0xb62: 0x124b, 0xb63: 0x124f, + 0xb64: 0x17d2, 0xb65: 0x17dc, 0xb66: 0x17d7, 0xb67: 0x066f, 0xb68: 0x126f, 0xb69: 0x1273, + 0xb6a: 0x127b, 0xb6b: 0x17f0, 0xb6c: 0x127f, 0xb6d: 0x17e1, 0xb6e: 0x0673, 0xb6f: 0x0677, + 0xb70: 0x17e6, 0xb71: 0x17eb, 0xb72: 0x067b, 0xb73: 0x129f, 0xb74: 0x12a3, 0xb75: 0x12a7, + 0xb76: 0x12ab, 0xb77: 0x12b7, 0xb78: 0x12b3, 0xb79: 0x12bf, 0xb7a: 0x12bb, 0xb7b: 0x12cb, + 0xb7c: 0x12c3, 0xb7d: 0x12c7, 0xb7e: 0x12cf, 0xb7f: 0x067f, + // Block 0x2e, offset 0xb80 + 0xb80: 0x12d7, 0xb81: 0x12db, 0xb82: 0x0683, 0xb83: 0x12eb, 0xb84: 0x12ef, 0xb85: 0x17f5, + 0xb86: 0x12fb, 0xb87: 0x12ff, 0xb88: 0x0687, 0xb89: 0x130b, 0xb8a: 0x05bb, 0xb8b: 0x17fa, + 0xb8c: 0x17ff, 0xb8d: 0x068b, 0xb8e: 0x068f, 0xb8f: 0x1337, 0xb90: 0x134f, 0xb91: 0x136b, + 0xb92: 0x137b, 0xb93: 0x1804, 0xb94: 0x138f, 0xb95: 0x1393, 0xb96: 0x13ab, 0xb97: 0x13b7, + 0xb98: 0x180e, 0xb99: 0x1660, 0xb9a: 0x13c3, 0xb9b: 0x13bf, 0xb9c: 0x13cb, 0xb9d: 0x1665, + 0xb9e: 0x13d7, 0xb9f: 0x13e3, 0xba0: 0x1813, 0xba1: 0x1818, 0xba2: 0x1423, 0xba3: 0x142f, + 0xba4: 0x1437, 0xba5: 0x181d, 0xba6: 0x143b, 0xba7: 0x1467, 0xba8: 0x1473, 0xba9: 0x1477, + 0xbaa: 0x146f, 0xbab: 0x1483, 0xbac: 0x1487, 0xbad: 0x1822, 0xbae: 0x1493, 0xbaf: 0x0693, + 0xbb0: 0x149b, 0xbb1: 0x1827, 0xbb2: 0x0697, 0xbb3: 0x14d3, 0xbb4: 0x0ac3, 0xbb5: 0x14eb, + 0xbb6: 0x182c, 0xbb7: 0x1836, 0xbb8: 0x069b, 0xbb9: 0x069f, 0xbba: 0x1513, 0xbbb: 0x183b, + 0xbbc: 0x06a3, 0xbbd: 0x1840, 0xbbe: 0x152b, 0xbbf: 0x152b, + // Block 0x2f, offset 0xbc0 + 0xbc0: 0x1533, 0xbc1: 0x1845, 0xbc2: 0x154b, 0xbc3: 0x06a7, 0xbc4: 0x155b, 0xbc5: 0x1567, + 0xbc6: 0x156f, 0xbc7: 0x1577, 0xbc8: 0x06ab, 0xbc9: 0x184a, 0xbca: 0x158b, 0xbcb: 0x15a7, + 0xbcc: 0x15b3, 0xbcd: 0x06af, 0xbce: 0x06b3, 0xbcf: 0x15b7, 0xbd0: 0x184f, 0xbd1: 0x06b7, + 0xbd2: 0x1854, 0xbd3: 0x1859, 0xbd4: 0x185e, 0xbd5: 0x15db, 0xbd6: 0x06bb, 0xbd7: 0x15ef, + 0xbd8: 0x15f7, 0xbd9: 0x15fb, 0xbda: 0x1603, 0xbdb: 0x160b, 0xbdc: 0x1613, 0xbdd: 0x1868, +} + +// nfcIndex: 22 blocks, 1408 entries, 1408 bytes +// Block 0 is the zero block. +var nfcIndex = [1408]uint8{ + // Block 0x0, offset 0x0 + // Block 0x1, offset 0x40 + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xc2: 0x2e, 0xc3: 0x01, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x2f, 0xc7: 0x04, + 0xc8: 0x05, 0xca: 0x30, 0xcb: 0x31, 0xcc: 0x06, 0xcd: 0x07, 0xce: 0x08, 0xcf: 0x32, + 0xd0: 0x09, 0xd1: 0x33, 0xd2: 0x34, 0xd3: 0x0a, 0xd6: 0x0b, 0xd7: 0x35, + 0xd8: 0x36, 0xd9: 0x0c, 0xdb: 0x37, 0xdc: 0x38, 0xdd: 0x39, 0xdf: 0x3a, + 0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, + 0xea: 0x06, 0xeb: 0x07, 0xec: 0x08, 0xed: 0x09, 0xef: 0x0a, + 0xf0: 0x13, + // Block 0x4, offset 0x100 + 0x120: 0x3b, 0x121: 0x3c, 0x123: 0x0d, 0x124: 0x3d, 0x125: 0x3e, 0x126: 0x3f, 0x127: 0x40, + 0x128: 0x41, 0x129: 0x42, 0x12a: 0x43, 0x12b: 0x44, 0x12c: 0x3f, 0x12d: 0x45, 0x12e: 0x46, 0x12f: 0x47, + 0x131: 0x48, 0x132: 0x49, 0x133: 0x4a, 0x134: 0x4b, 0x135: 0x4c, 0x137: 0x4d, + 0x138: 0x4e, 0x139: 0x4f, 0x13a: 0x50, 0x13b: 0x51, 0x13c: 0x52, 0x13d: 0x53, 0x13e: 0x54, 0x13f: 0x55, + // Block 0x5, offset 0x140 + 0x140: 0x56, 0x142: 0x57, 0x144: 0x58, 0x145: 0x59, 0x146: 0x5a, 0x147: 0x5b, + 0x14d: 0x5c, + 0x15c: 0x5d, 0x15f: 0x5e, + 0x162: 0x5f, 0x164: 0x60, + 0x168: 0x61, 0x169: 0x62, 0x16a: 0x63, 0x16c: 0x0e, 0x16d: 0x64, 0x16e: 0x65, 0x16f: 0x66, + 0x170: 0x67, 0x173: 0x68, 0x177: 0x0f, + 0x178: 0x10, 0x179: 0x11, 0x17a: 0x12, 0x17b: 0x13, 0x17c: 0x14, 0x17d: 0x15, 0x17e: 0x16, 0x17f: 0x17, + // Block 0x6, offset 0x180 + 0x180: 0x69, 0x183: 0x6a, 0x184: 0x6b, 0x186: 0x6c, 0x187: 0x6d, + 0x188: 0x6e, 0x189: 0x18, 0x18a: 0x19, 0x18b: 0x6f, 0x18c: 0x70, + 0x1ab: 0x71, + 0x1b3: 0x72, 0x1b5: 0x73, 0x1b7: 0x74, + // Block 0x7, offset 0x1c0 + 0x1c0: 0x75, 0x1c1: 0x1a, 0x1c2: 0x1b, 0x1c3: 0x1c, 0x1c4: 0x76, 0x1c5: 0x77, + 0x1c9: 0x78, 0x1cc: 0x79, 0x1cd: 0x7a, + // Block 0x8, offset 0x200 + 0x219: 0x7b, 0x21a: 0x7c, 0x21b: 0x7d, + 0x220: 0x7e, 0x223: 0x7f, 0x224: 0x80, 0x225: 0x81, 0x226: 0x82, 0x227: 0x83, + 0x22a: 0x84, 0x22b: 0x85, 0x22f: 0x86, + 0x230: 0x87, 0x231: 0x88, 0x232: 0x89, 0x233: 0x8a, 0x234: 0x8b, 0x235: 0x8c, 0x236: 0x8d, 0x237: 0x87, + 0x238: 0x88, 0x239: 0x89, 0x23a: 0x8a, 0x23b: 0x8b, 0x23c: 0x8c, 0x23d: 0x8d, 0x23e: 0x87, 0x23f: 0x88, + // Block 0x9, offset 0x240 + 0x240: 0x89, 0x241: 0x8a, 0x242: 0x8b, 0x243: 0x8c, 0x244: 0x8d, 0x245: 0x87, 0x246: 0x88, 0x247: 0x89, + 0x248: 0x8a, 0x249: 0x8b, 0x24a: 0x8c, 0x24b: 0x8d, 0x24c: 0x87, 0x24d: 0x88, 0x24e: 0x89, 0x24f: 0x8a, + 0x250: 0x8b, 0x251: 0x8c, 0x252: 0x8d, 0x253: 0x87, 0x254: 0x88, 0x255: 0x89, 0x256: 0x8a, 0x257: 0x8b, + 0x258: 0x8c, 0x259: 0x8d, 0x25a: 0x87, 0x25b: 0x88, 0x25c: 0x89, 0x25d: 0x8a, 0x25e: 0x8b, 0x25f: 0x8c, + 0x260: 0x8d, 0x261: 0x87, 0x262: 0x88, 0x263: 0x89, 0x264: 0x8a, 0x265: 0x8b, 0x266: 0x8c, 0x267: 0x8d, + 0x268: 0x87, 0x269: 0x88, 0x26a: 0x89, 0x26b: 0x8a, 0x26c: 0x8b, 0x26d: 0x8c, 0x26e: 0x8d, 0x26f: 0x87, + 0x270: 0x88, 0x271: 0x89, 0x272: 0x8a, 0x273: 0x8b, 0x274: 0x8c, 0x275: 0x8d, 0x276: 0x87, 0x277: 0x88, + 0x278: 0x89, 0x279: 0x8a, 0x27a: 0x8b, 0x27b: 0x8c, 0x27c: 0x8d, 0x27d: 0x87, 0x27e: 0x88, 0x27f: 0x89, + // Block 0xa, offset 0x280 + 0x280: 0x8a, 0x281: 0x8b, 0x282: 0x8c, 0x283: 0x8d, 0x284: 0x87, 0x285: 0x88, 0x286: 0x89, 0x287: 0x8a, + 0x288: 0x8b, 0x289: 0x8c, 0x28a: 0x8d, 0x28b: 0x87, 0x28c: 0x88, 0x28d: 0x89, 0x28e: 0x8a, 0x28f: 0x8b, + 0x290: 0x8c, 0x291: 0x8d, 0x292: 0x87, 0x293: 0x88, 0x294: 0x89, 0x295: 0x8a, 0x296: 0x8b, 0x297: 0x8c, + 0x298: 0x8d, 0x299: 0x87, 0x29a: 0x88, 0x29b: 0x89, 0x29c: 0x8a, 0x29d: 0x8b, 0x29e: 0x8c, 0x29f: 0x8d, + 0x2a0: 0x87, 0x2a1: 0x88, 0x2a2: 0x89, 0x2a3: 0x8a, 0x2a4: 0x8b, 0x2a5: 0x8c, 0x2a6: 0x8d, 0x2a7: 0x87, + 0x2a8: 0x88, 0x2a9: 0x89, 0x2aa: 0x8a, 0x2ab: 0x8b, 0x2ac: 0x8c, 0x2ad: 0x8d, 0x2ae: 0x87, 0x2af: 0x88, + 0x2b0: 0x89, 0x2b1: 0x8a, 0x2b2: 0x8b, 0x2b3: 0x8c, 0x2b4: 0x8d, 0x2b5: 0x87, 0x2b6: 0x88, 0x2b7: 0x89, + 0x2b8: 0x8a, 0x2b9: 0x8b, 0x2ba: 0x8c, 0x2bb: 0x8d, 0x2bc: 0x87, 0x2bd: 0x88, 0x2be: 0x89, 0x2bf: 0x8a, + // Block 0xb, offset 0x2c0 + 0x2c0: 0x8b, 0x2c1: 0x8c, 0x2c2: 0x8d, 0x2c3: 0x87, 0x2c4: 0x88, 0x2c5: 0x89, 0x2c6: 0x8a, 0x2c7: 0x8b, + 0x2c8: 0x8c, 0x2c9: 0x8d, 0x2ca: 0x87, 0x2cb: 0x88, 0x2cc: 0x89, 0x2cd: 0x8a, 0x2ce: 0x8b, 0x2cf: 0x8c, + 0x2d0: 0x8d, 0x2d1: 0x87, 0x2d2: 0x88, 0x2d3: 0x89, 0x2d4: 0x8a, 0x2d5: 0x8b, 0x2d6: 0x8c, 0x2d7: 0x8d, + 0x2d8: 0x87, 0x2d9: 0x88, 0x2da: 0x89, 0x2db: 0x8a, 0x2dc: 0x8b, 0x2dd: 0x8c, 0x2de: 0x8e, + // Block 0xc, offset 0x300 + 0x324: 0x1d, 0x325: 0x1e, 0x326: 0x1f, 0x327: 0x20, + 0x328: 0x21, 0x329: 0x22, 0x32a: 0x23, 0x32b: 0x24, 0x32c: 0x8f, 0x32d: 0x90, 0x32e: 0x91, + 0x331: 0x92, 0x332: 0x93, 0x333: 0x94, 0x334: 0x95, + 0x338: 0x96, 0x339: 0x97, 0x33a: 0x98, 0x33b: 0x99, 0x33e: 0x9a, 0x33f: 0x9b, + // Block 0xd, offset 0x340 + 0x347: 0x9c, + 0x34b: 0x9d, 0x34d: 0x9e, + 0x368: 0x9f, 0x36b: 0xa0, + 0x374: 0xa1, + 0x37d: 0xa2, + // Block 0xe, offset 0x380 + 0x381: 0xa3, 0x382: 0xa4, 0x384: 0xa5, 0x385: 0x82, 0x387: 0xa6, + 0x388: 0xa7, 0x38b: 0xa8, 0x38c: 0xa9, 0x38d: 0xaa, + 0x391: 0xab, 0x392: 0xac, 0x393: 0xad, 0x396: 0xae, 0x397: 0xaf, + 0x398: 0x73, 0x39a: 0xb0, 0x39c: 0xb1, + 0x3a0: 0xb2, 0x3a7: 0xb3, + 0x3a8: 0xb4, 0x3a9: 0xb5, 0x3aa: 0xb6, + 0x3b0: 0x73, 0x3b5: 0xb7, 0x3b6: 0xb8, + // Block 0xf, offset 0x3c0 + 0x3eb: 0xb9, 0x3ec: 0xba, + // Block 0x10, offset 0x400 + 0x432: 0xbb, + // Block 0x11, offset 0x440 + 0x445: 0xbc, 0x446: 0xbd, 0x447: 0xbe, + 0x449: 0xbf, + // Block 0x12, offset 0x480 + 0x480: 0xc0, 0x484: 0xba, + 0x48b: 0xc1, + 0x4a3: 0xc2, 0x4a5: 0xc3, + // Block 0x13, offset 0x4c0 + 0x4c8: 0xc4, + // Block 0x14, offset 0x500 + 0x520: 0x25, 0x521: 0x26, 0x522: 0x27, 0x523: 0x28, 0x524: 0x29, 0x525: 0x2a, 0x526: 0x2b, 0x527: 0x2c, + 0x528: 0x2d, + // Block 0x15, offset 0x540 + 0x550: 0x0b, 0x551: 0x0c, 0x556: 0x0d, + 0x55b: 0x0e, 0x55d: 0x0f, 0x55e: 0x10, 0x55f: 0x11, + 0x56f: 0x12, +} + +// nfcSparseOffset: 151 entries, 302 bytes +var nfcSparseOffset = []uint16{0x0, 0x5, 0x9, 0xb, 0xd, 0x18, 0x28, 0x2a, 0x2f, 0x3a, 0x49, 0x56, 0x5e, 0x63, 0x68, 0x6a, 0x72, 0x79, 0x7c, 0x84, 0x88, 0x8c, 0x8e, 0x90, 0x99, 0x9d, 0xa4, 0xa9, 0xac, 0xb6, 0xb9, 0xc0, 0xc8, 0xcb, 0xcd, 0xd0, 0xd2, 0xd7, 0xe8, 0xf4, 0xf6, 0xfc, 0xfe, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10b, 0x10e, 0x110, 0x113, 0x116, 0x11a, 0x11f, 0x128, 0x12a, 0x12d, 0x12f, 0x13a, 0x13e, 0x14c, 0x14f, 0x155, 0x15b, 0x166, 0x16a, 0x16c, 0x16e, 0x170, 0x172, 0x174, 0x17a, 0x17e, 0x180, 0x182, 0x18a, 0x18e, 0x191, 0x193, 0x195, 0x197, 0x19a, 0x19c, 0x19e, 0x1a0, 0x1a2, 0x1a8, 0x1ab, 0x1ad, 0x1b4, 0x1ba, 0x1c0, 0x1c8, 0x1ce, 0x1d4, 0x1da, 0x1de, 0x1ec, 0x1f5, 0x1f8, 0x1fb, 0x1fd, 0x200, 0x202, 0x206, 0x20b, 0x20d, 0x20f, 0x214, 0x21a, 0x21c, 0x21e, 0x220, 0x226, 0x229, 0x22b, 0x231, 0x234, 0x23c, 0x243, 0x246, 0x249, 0x24b, 0x24e, 0x256, 0x25a, 0x261, 0x264, 0x26a, 0x26c, 0x26f, 0x271, 0x274, 0x276, 0x278, 0x27a, 0x27c, 0x27f, 0x281, 0x283, 0x285, 0x287, 0x294, 0x29e, 0x2a0, 0x2a2, 0x2a8, 0x2aa, 0x2ac, 0x2af} + +// nfcSparseValues: 689 entries, 2756 bytes +var nfcSparseValues = [689]valueRange{ + // Block 0x0, offset 0x0 + {value: 0x0000, lo: 0x04}, + {value: 0xa100, lo: 0xa8, hi: 0xa8}, + {value: 0x8100, lo: 0xaf, hi: 0xaf}, + {value: 0x8100, lo: 0xb4, hi: 0xb4}, + {value: 0x8100, lo: 0xb8, hi: 0xb8}, + // Block 0x1, offset 0x5 + {value: 0x0091, lo: 0x03}, + {value: 0x46e5, lo: 0xa0, hi: 0xa1}, + {value: 0x4717, lo: 0xaf, hi: 0xb0}, + {value: 0xa000, lo: 0xb7, hi: 0xb7}, + // Block 0x2, offset 0x9 + {value: 0x0000, lo: 0x01}, + {value: 0xa000, lo: 0x92, hi: 0x92}, + // Block 0x3, offset 0xb + {value: 0x0000, lo: 0x01}, + {value: 0x8100, lo: 0x98, hi: 0x9d}, + // Block 0x4, offset 0xd + {value: 0x0006, lo: 0x0a}, + {value: 0xa000, lo: 0x81, hi: 0x81}, + {value: 0xa000, lo: 0x85, hi: 0x85}, + {value: 0xa000, lo: 0x89, hi: 0x89}, + {value: 0x4843, lo: 0x8a, hi: 0x8a}, + {value: 0x4861, lo: 0x8b, hi: 0x8b}, + {value: 0x36ca, lo: 0x8c, hi: 0x8c}, + {value: 0x36e2, lo: 0x8d, hi: 0x8d}, + {value: 0x4879, lo: 0x8e, hi: 0x8e}, + {value: 0xa000, lo: 0x92, hi: 0x92}, + {value: 0x3700, lo: 0x93, hi: 0x94}, + // Block 0x5, offset 0x18 + {value: 0x0000, lo: 0x0f}, + {value: 0xa000, lo: 0x83, hi: 0x83}, + {value: 0xa000, lo: 0x87, hi: 0x87}, + {value: 0xa000, lo: 0x8b, hi: 0x8b}, + {value: 0xa000, lo: 0x8d, hi: 0x8d}, + {value: 0x37a8, lo: 0x90, hi: 0x90}, + {value: 0x37b4, lo: 0x91, hi: 0x91}, + {value: 0x37a2, lo: 0x93, hi: 0x93}, + {value: 0xa000, lo: 0x96, hi: 0x96}, + {value: 0x381a, lo: 0x97, hi: 0x97}, + {value: 0x37e4, lo: 0x9c, hi: 0x9c}, + {value: 0x37cc, lo: 0x9d, hi: 0x9d}, + {value: 0x37f6, lo: 0x9e, hi: 0x9e}, + {value: 0xa000, lo: 0xb4, hi: 0xb5}, + {value: 0x3820, lo: 0xb6, hi: 0xb6}, + {value: 0x3826, lo: 0xb7, hi: 0xb7}, + // Block 0x6, offset 0x28 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0x83, hi: 0x87}, + // Block 0x7, offset 0x2a + {value: 0x0001, lo: 0x04}, + {value: 0x8113, lo: 0x81, hi: 0x82}, + {value: 0x8132, lo: 0x84, hi: 0x84}, + {value: 0x812d, lo: 0x85, hi: 0x85}, + {value: 0x810d, lo: 0x87, hi: 0x87}, + // Block 0x8, offset 0x2f + {value: 0x0000, lo: 0x0a}, + {value: 0x8132, lo: 0x90, hi: 0x97}, + {value: 0x8119, lo: 0x98, hi: 0x98}, + {value: 0x811a, lo: 0x99, hi: 0x99}, + {value: 0x811b, lo: 0x9a, hi: 0x9a}, + {value: 0x3844, lo: 0xa2, hi: 0xa2}, + {value: 0x384a, lo: 0xa3, hi: 0xa3}, + {value: 0x3856, lo: 0xa4, hi: 0xa4}, + {value: 0x3850, lo: 0xa5, hi: 0xa5}, + {value: 0x385c, lo: 0xa6, hi: 0xa6}, + {value: 0xa000, lo: 0xa7, hi: 0xa7}, + // Block 0x9, offset 0x3a + {value: 0x0000, lo: 0x0e}, + {value: 0x386e, lo: 0x80, hi: 0x80}, + {value: 0xa000, lo: 0x81, hi: 0x81}, + {value: 0x3862, lo: 0x82, hi: 0x82}, + {value: 0xa000, lo: 0x92, hi: 0x92}, + {value: 0x3868, lo: 0x93, hi: 0x93}, + {value: 0xa000, lo: 0x95, hi: 0x95}, + {value: 0x8132, lo: 0x96, hi: 0x9c}, + {value: 0x8132, lo: 0x9f, hi: 0xa2}, + {value: 0x812d, lo: 0xa3, hi: 0xa3}, + {value: 0x8132, lo: 0xa4, hi: 0xa4}, + {value: 0x8132, lo: 0xa7, hi: 0xa8}, + {value: 0x812d, lo: 0xaa, hi: 0xaa}, + {value: 0x8132, lo: 0xab, hi: 0xac}, + {value: 0x812d, lo: 0xad, hi: 0xad}, + // Block 0xa, offset 0x49 + {value: 0x0000, lo: 0x0c}, + {value: 0x811f, lo: 0x91, hi: 0x91}, + {value: 0x8132, lo: 0xb0, hi: 0xb0}, + {value: 0x812d, lo: 0xb1, hi: 0xb1}, + {value: 0x8132, lo: 0xb2, hi: 0xb3}, + {value: 0x812d, lo: 0xb4, hi: 0xb4}, + {value: 0x8132, lo: 0xb5, hi: 0xb6}, + {value: 0x812d, lo: 0xb7, hi: 0xb9}, + {value: 0x8132, lo: 0xba, hi: 0xba}, + {value: 0x812d, lo: 0xbb, hi: 0xbc}, + {value: 0x8132, lo: 0xbd, hi: 0xbd}, + {value: 0x812d, lo: 0xbe, hi: 0xbe}, + {value: 0x8132, lo: 0xbf, hi: 0xbf}, + // Block 0xb, offset 0x56 + {value: 0x0005, lo: 0x07}, + {value: 0x8132, lo: 0x80, hi: 0x80}, + {value: 0x8132, lo: 0x81, hi: 0x81}, + {value: 0x812d, lo: 0x82, hi: 0x83}, + {value: 0x812d, lo: 0x84, hi: 0x85}, + {value: 0x812d, lo: 0x86, hi: 0x87}, + {value: 0x812d, lo: 0x88, hi: 0x89}, + {value: 0x8132, lo: 0x8a, hi: 0x8a}, + // Block 0xc, offset 0x5e + {value: 0x0000, lo: 0x04}, + {value: 0x8132, lo: 0xab, hi: 0xb1}, + {value: 0x812d, lo: 0xb2, hi: 0xb2}, + {value: 0x8132, lo: 0xb3, hi: 0xb3}, + {value: 0x812d, lo: 0xbd, hi: 0xbd}, + // Block 0xd, offset 0x63 + {value: 0x0000, lo: 0x04}, + {value: 0x8132, lo: 0x96, hi: 0x99}, + {value: 0x8132, lo: 0x9b, hi: 0xa3}, + {value: 0x8132, lo: 0xa5, hi: 0xa7}, + {value: 0x8132, lo: 0xa9, hi: 0xad}, + // Block 0xe, offset 0x68 + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0x99, hi: 0x9b}, + // Block 0xf, offset 0x6a + {value: 0x0000, lo: 0x07}, + {value: 0xa000, lo: 0xa8, hi: 0xa8}, + {value: 0x3edb, lo: 0xa9, hi: 0xa9}, + {value: 0xa000, lo: 0xb0, hi: 0xb0}, + {value: 0x3ee3, lo: 0xb1, hi: 0xb1}, + {value: 0xa000, lo: 0xb3, hi: 0xb3}, + {value: 0x3eeb, lo: 0xb4, hi: 0xb4}, + {value: 0x9902, lo: 0xbc, hi: 0xbc}, + // Block 0x10, offset 0x72 + {value: 0x0008, lo: 0x06}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x8132, lo: 0x91, hi: 0x91}, + {value: 0x812d, lo: 0x92, hi: 0x92}, + {value: 0x8132, lo: 0x93, hi: 0x93}, + {value: 0x8132, lo: 0x94, hi: 0x94}, + {value: 0x451f, lo: 0x98, hi: 0x9f}, + // Block 0x11, offset 0x79 + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0xbc, hi: 0xbc}, + {value: 0x9900, lo: 0xbe, hi: 0xbe}, + // Block 0x12, offset 0x7c + {value: 0x0008, lo: 0x07}, + {value: 0xa000, lo: 0x87, hi: 0x87}, + {value: 0x2ca1, lo: 0x8b, hi: 0x8c}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x97, hi: 0x97}, + {value: 0x455f, lo: 0x9c, hi: 0x9d}, + {value: 0x456f, lo: 0x9f, hi: 0x9f}, + {value: 0x8132, lo: 0xbe, hi: 0xbe}, + // Block 0x13, offset 0x84 + {value: 0x0000, lo: 0x03}, + {value: 0x4597, lo: 0xb3, hi: 0xb3}, + {value: 0x459f, lo: 0xb6, hi: 0xb6}, + {value: 0x8102, lo: 0xbc, hi: 0xbc}, + // Block 0x14, offset 0x88 + {value: 0x0008, lo: 0x03}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x4577, lo: 0x99, hi: 0x9b}, + {value: 0x458f, lo: 0x9e, hi: 0x9e}, + // Block 0x15, offset 0x8c + {value: 0x0000, lo: 0x01}, + {value: 0x8102, lo: 0xbc, hi: 0xbc}, + // Block 0x16, offset 0x8e + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + // Block 0x17, offset 0x90 + {value: 0x0000, lo: 0x08}, + {value: 0xa000, lo: 0x87, hi: 0x87}, + {value: 0x2cb9, lo: 0x88, hi: 0x88}, + {value: 0x2cb1, lo: 0x8b, hi: 0x8b}, + {value: 0x2cc1, lo: 0x8c, hi: 0x8c}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x96, hi: 0x97}, + {value: 0x45a7, lo: 0x9c, hi: 0x9c}, + {value: 0x45af, lo: 0x9d, hi: 0x9d}, + // Block 0x18, offset 0x99 + {value: 0x0000, lo: 0x03}, + {value: 0xa000, lo: 0x92, hi: 0x92}, + {value: 0x2cc9, lo: 0x94, hi: 0x94}, + {value: 0x9900, lo: 0xbe, hi: 0xbe}, + // Block 0x19, offset 0x9d + {value: 0x0000, lo: 0x06}, + {value: 0xa000, lo: 0x86, hi: 0x87}, + {value: 0x2cd1, lo: 0x8a, hi: 0x8a}, + {value: 0x2ce1, lo: 0x8b, hi: 0x8b}, + {value: 0x2cd9, lo: 0x8c, hi: 0x8c}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x97, hi: 0x97}, + // Block 0x1a, offset 0xa4 + {value: 0x1801, lo: 0x04}, + {value: 0xa000, lo: 0x86, hi: 0x86}, + {value: 0x3ef3, lo: 0x88, hi: 0x88}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x8120, lo: 0x95, hi: 0x96}, + // Block 0x1b, offset 0xa9 + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0xbc, hi: 0xbc}, + {value: 0xa000, lo: 0xbf, hi: 0xbf}, + // Block 0x1c, offset 0xac + {value: 0x0000, lo: 0x09}, + {value: 0x2ce9, lo: 0x80, hi: 0x80}, + {value: 0x9900, lo: 0x82, hi: 0x82}, + {value: 0xa000, lo: 0x86, hi: 0x86}, + {value: 0x2cf1, lo: 0x87, hi: 0x87}, + {value: 0x2cf9, lo: 0x88, hi: 0x88}, + {value: 0x2f53, lo: 0x8a, hi: 0x8a}, + {value: 0x2ddb, lo: 0x8b, hi: 0x8b}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x95, hi: 0x96}, + // Block 0x1d, offset 0xb6 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0xbb, hi: 0xbc}, + {value: 0x9900, lo: 0xbe, hi: 0xbe}, + // Block 0x1e, offset 0xb9 + {value: 0x0000, lo: 0x06}, + {value: 0xa000, lo: 0x86, hi: 0x87}, + {value: 0x2d01, lo: 0x8a, hi: 0x8a}, + {value: 0x2d11, lo: 0x8b, hi: 0x8b}, + {value: 0x2d09, lo: 0x8c, hi: 0x8c}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x97, hi: 0x97}, + // Block 0x1f, offset 0xc0 + {value: 0x6be7, lo: 0x07}, + {value: 0x9904, lo: 0x8a, hi: 0x8a}, + {value: 0x9900, lo: 0x8f, hi: 0x8f}, + {value: 0xa000, lo: 0x99, hi: 0x99}, + {value: 0x3efb, lo: 0x9a, hi: 0x9a}, + {value: 0x2f5b, lo: 0x9c, hi: 0x9c}, + {value: 0x2de6, lo: 0x9d, hi: 0x9d}, + {value: 0x2d19, lo: 0x9e, hi: 0x9f}, + // Block 0x20, offset 0xc8 + {value: 0x0000, lo: 0x02}, + {value: 0x8122, lo: 0xb8, hi: 0xb9}, + {value: 0x8104, lo: 0xba, hi: 0xba}, + // Block 0x21, offset 0xcb + {value: 0x0000, lo: 0x01}, + {value: 0x8123, lo: 0x88, hi: 0x8b}, + // Block 0x22, offset 0xcd + {value: 0x0000, lo: 0x02}, + {value: 0x8124, lo: 0xb8, hi: 0xb9}, + {value: 0x8104, lo: 0xba, hi: 0xba}, + // Block 0x23, offset 0xd0 + {value: 0x0000, lo: 0x01}, + {value: 0x8125, lo: 0x88, hi: 0x8b}, + // Block 0x24, offset 0xd2 + {value: 0x0000, lo: 0x04}, + {value: 0x812d, lo: 0x98, hi: 0x99}, + {value: 0x812d, lo: 0xb5, hi: 0xb5}, + {value: 0x812d, lo: 0xb7, hi: 0xb7}, + {value: 0x812b, lo: 0xb9, hi: 0xb9}, + // Block 0x25, offset 0xd7 + {value: 0x0000, lo: 0x10}, + {value: 0x2647, lo: 0x83, hi: 0x83}, + {value: 0x264e, lo: 0x8d, hi: 0x8d}, + {value: 0x2655, lo: 0x92, hi: 0x92}, + {value: 0x265c, lo: 0x97, hi: 0x97}, + {value: 0x2663, lo: 0x9c, hi: 0x9c}, + {value: 0x2640, lo: 0xa9, hi: 0xa9}, + {value: 0x8126, lo: 0xb1, hi: 0xb1}, + {value: 0x8127, lo: 0xb2, hi: 0xb2}, + {value: 0x4a87, lo: 0xb3, hi: 0xb3}, + {value: 0x8128, lo: 0xb4, hi: 0xb4}, + {value: 0x4a90, lo: 0xb5, hi: 0xb5}, + {value: 0x45b7, lo: 0xb6, hi: 0xb6}, + {value: 0x8200, lo: 0xb7, hi: 0xb7}, + {value: 0x45bf, lo: 0xb8, hi: 0xb8}, + {value: 0x8200, lo: 0xb9, hi: 0xb9}, + {value: 0x8127, lo: 0xba, hi: 0xbd}, + // Block 0x26, offset 0xe8 + {value: 0x0000, lo: 0x0b}, + {value: 0x8127, lo: 0x80, hi: 0x80}, + {value: 0x4a99, lo: 0x81, hi: 0x81}, + {value: 0x8132, lo: 0x82, hi: 0x83}, + {value: 0x8104, lo: 0x84, hi: 0x84}, + {value: 0x8132, lo: 0x86, hi: 0x87}, + {value: 0x2671, lo: 0x93, hi: 0x93}, + {value: 0x2678, lo: 0x9d, hi: 0x9d}, + {value: 0x267f, lo: 0xa2, hi: 0xa2}, + {value: 0x2686, lo: 0xa7, hi: 0xa7}, + {value: 0x268d, lo: 0xac, hi: 0xac}, + {value: 0x266a, lo: 0xb9, hi: 0xb9}, + // Block 0x27, offset 0xf4 + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0x86, hi: 0x86}, + // Block 0x28, offset 0xf6 + {value: 0x0000, lo: 0x05}, + {value: 0xa000, lo: 0xa5, hi: 0xa5}, + {value: 0x2d21, lo: 0xa6, hi: 0xa6}, + {value: 0x9900, lo: 0xae, hi: 0xae}, + {value: 0x8102, lo: 0xb7, hi: 0xb7}, + {value: 0x8104, lo: 0xb9, hi: 0xba}, + // Block 0x29, offset 0xfc + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0x8d, hi: 0x8d}, + // Block 0x2a, offset 0xfe + {value: 0x0000, lo: 0x01}, + {value: 0xa000, lo: 0x80, hi: 0x92}, + // Block 0x2b, offset 0x100 + {value: 0x0000, lo: 0x01}, + {value: 0xb900, lo: 0xa1, hi: 0xb5}, + // Block 0x2c, offset 0x102 + {value: 0x0000, lo: 0x01}, + {value: 0x9900, lo: 0xa8, hi: 0xbf}, + // Block 0x2d, offset 0x104 + {value: 0x0000, lo: 0x01}, + {value: 0x9900, lo: 0x80, hi: 0x82}, + // Block 0x2e, offset 0x106 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0x9d, hi: 0x9f}, + // Block 0x2f, offset 0x108 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x94, hi: 0x94}, + {value: 0x8104, lo: 0xb4, hi: 0xb4}, + // Block 0x30, offset 0x10b + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x92, hi: 0x92}, + {value: 0x8132, lo: 0x9d, hi: 0x9d}, + // Block 0x31, offset 0x10e + {value: 0x0000, lo: 0x01}, + {value: 0x8131, lo: 0xa9, hi: 0xa9}, + // Block 0x32, offset 0x110 + {value: 0x0004, lo: 0x02}, + {value: 0x812e, lo: 0xb9, hi: 0xba}, + {value: 0x812d, lo: 0xbb, hi: 0xbb}, + // Block 0x33, offset 0x113 + {value: 0x0000, lo: 0x02}, + {value: 0x8132, lo: 0x97, hi: 0x97}, + {value: 0x812d, lo: 0x98, hi: 0x98}, + // Block 0x34, offset 0x116 + {value: 0x0000, lo: 0x03}, + {value: 0x8104, lo: 0xa0, hi: 0xa0}, + {value: 0x8132, lo: 0xb5, hi: 0xbc}, + {value: 0x812d, lo: 0xbf, hi: 0xbf}, + // Block 0x35, offset 0x11a + {value: 0x0000, lo: 0x04}, + {value: 0x8132, lo: 0xb0, hi: 0xb4}, + {value: 0x812d, lo: 0xb5, hi: 0xba}, + {value: 0x8132, lo: 0xbb, hi: 0xbc}, + {value: 0x812d, lo: 0xbd, hi: 0xbd}, + // Block 0x36, offset 0x11f + {value: 0x0000, lo: 0x08}, + {value: 0x2d69, lo: 0x80, hi: 0x80}, + {value: 0x2d71, lo: 0x81, hi: 0x81}, + {value: 0xa000, lo: 0x82, hi: 0x82}, + {value: 0x2d79, lo: 0x83, hi: 0x83}, + {value: 0x8104, lo: 0x84, hi: 0x84}, + {value: 0x8132, lo: 0xab, hi: 0xab}, + {value: 0x812d, lo: 0xac, hi: 0xac}, + {value: 0x8132, lo: 0xad, hi: 0xb3}, + // Block 0x37, offset 0x128 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xaa, hi: 0xab}, + // Block 0x38, offset 0x12a + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0xa6, hi: 0xa6}, + {value: 0x8104, lo: 0xb2, hi: 0xb3}, + // Block 0x39, offset 0x12d + {value: 0x0000, lo: 0x01}, + {value: 0x8102, lo: 0xb7, hi: 0xb7}, + // Block 0x3a, offset 0x12f + {value: 0x0000, lo: 0x0a}, + {value: 0x8132, lo: 0x90, hi: 0x92}, + {value: 0x8101, lo: 0x94, hi: 0x94}, + {value: 0x812d, lo: 0x95, hi: 0x99}, + {value: 0x8132, lo: 0x9a, hi: 0x9b}, + {value: 0x812d, lo: 0x9c, hi: 0x9f}, + {value: 0x8132, lo: 0xa0, hi: 0xa0}, + {value: 0x8101, lo: 0xa2, hi: 0xa8}, + {value: 0x812d, lo: 0xad, hi: 0xad}, + {value: 0x8132, lo: 0xb4, hi: 0xb4}, + {value: 0x8132, lo: 0xb8, hi: 0xb9}, + // Block 0x3b, offset 0x13a + {value: 0x0004, lo: 0x03}, + {value: 0x0433, lo: 0x80, hi: 0x81}, + {value: 0x8100, lo: 0x97, hi: 0x97}, + {value: 0x8100, lo: 0xbe, hi: 0xbe}, + // Block 0x3c, offset 0x13e + {value: 0x0000, lo: 0x0d}, + {value: 0x8132, lo: 0x90, hi: 0x91}, + {value: 0x8101, lo: 0x92, hi: 0x93}, + {value: 0x8132, lo: 0x94, hi: 0x97}, + {value: 0x8101, lo: 0x98, hi: 0x9a}, + {value: 0x8132, lo: 0x9b, hi: 0x9c}, + {value: 0x8132, lo: 0xa1, hi: 0xa1}, + {value: 0x8101, lo: 0xa5, hi: 0xa6}, + {value: 0x8132, lo: 0xa7, hi: 0xa7}, + {value: 0x812d, lo: 0xa8, hi: 0xa8}, + {value: 0x8132, lo: 0xa9, hi: 0xa9}, + {value: 0x8101, lo: 0xaa, hi: 0xab}, + {value: 0x812d, lo: 0xac, hi: 0xaf}, + {value: 0x8132, lo: 0xb0, hi: 0xb0}, + // Block 0x3d, offset 0x14c + {value: 0x427e, lo: 0x02}, + {value: 0x01b8, lo: 0xa6, hi: 0xa6}, + {value: 0x0057, lo: 0xaa, hi: 0xab}, + // Block 0x3e, offset 0x14f + {value: 0x0007, lo: 0x05}, + {value: 0xa000, lo: 0x90, hi: 0x90}, + {value: 0xa000, lo: 0x92, hi: 0x92}, + {value: 0xa000, lo: 0x94, hi: 0x94}, + {value: 0x3bbc, lo: 0x9a, hi: 0x9b}, + {value: 0x3bca, lo: 0xae, hi: 0xae}, + // Block 0x3f, offset 0x155 + {value: 0x000e, lo: 0x05}, + {value: 0x3bd1, lo: 0x8d, hi: 0x8e}, + {value: 0x3bd8, lo: 0x8f, hi: 0x8f}, + {value: 0xa000, lo: 0x90, hi: 0x90}, + {value: 0xa000, lo: 0x92, hi: 0x92}, + {value: 0xa000, lo: 0x94, hi: 0x94}, + // Block 0x40, offset 0x15b + {value: 0x6405, lo: 0x0a}, + {value: 0xa000, lo: 0x83, hi: 0x83}, + {value: 0x3be6, lo: 0x84, hi: 0x84}, + {value: 0xa000, lo: 0x88, hi: 0x88}, + {value: 0x3bed, lo: 0x89, hi: 0x89}, + {value: 0xa000, lo: 0x8b, hi: 0x8b}, + {value: 0x3bf4, lo: 0x8c, hi: 0x8c}, + {value: 0xa000, lo: 0xa3, hi: 0xa3}, + {value: 0x3bfb, lo: 0xa4, hi: 0xa5}, + {value: 0x3c02, lo: 0xa6, hi: 0xa6}, + {value: 0xa000, lo: 0xbc, hi: 0xbc}, + // Block 0x41, offset 0x166 + {value: 0x0007, lo: 0x03}, + {value: 0x3c6b, lo: 0xa0, hi: 0xa1}, + {value: 0x3c95, lo: 0xa2, hi: 0xa3}, + {value: 0x3cbf, lo: 0xaa, hi: 0xad}, + // Block 0x42, offset 0x16a + {value: 0x0004, lo: 0x01}, + {value: 0x048b, lo: 0xa9, hi: 0xaa}, + // Block 0x43, offset 0x16c + {value: 0x0000, lo: 0x01}, + {value: 0x44e0, lo: 0x9c, hi: 0x9c}, + // Block 0x44, offset 0x16e + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xaf, hi: 0xb1}, + // Block 0x45, offset 0x170 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xbf, hi: 0xbf}, + // Block 0x46, offset 0x172 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xa0, hi: 0xbf}, + // Block 0x47, offset 0x174 + {value: 0x0000, lo: 0x05}, + {value: 0x812c, lo: 0xaa, hi: 0xaa}, + {value: 0x8131, lo: 0xab, hi: 0xab}, + {value: 0x8133, lo: 0xac, hi: 0xac}, + {value: 0x812e, lo: 0xad, hi: 0xad}, + {value: 0x812f, lo: 0xae, hi: 0xaf}, + // Block 0x48, offset 0x17a + {value: 0x0000, lo: 0x03}, + {value: 0x4aa2, lo: 0xb3, hi: 0xb3}, + {value: 0x4aa2, lo: 0xb5, hi: 0xb6}, + {value: 0x4aa2, lo: 0xba, hi: 0xbf}, + // Block 0x49, offset 0x17e + {value: 0x0000, lo: 0x01}, + {value: 0x4aa2, lo: 0x8f, hi: 0xa3}, + // Block 0x4a, offset 0x180 + {value: 0x0000, lo: 0x01}, + {value: 0x8100, lo: 0xae, hi: 0xbe}, + // Block 0x4b, offset 0x182 + {value: 0x0000, lo: 0x07}, + {value: 0x8100, lo: 0x84, hi: 0x84}, + {value: 0x8100, lo: 0x87, hi: 0x87}, + {value: 0x8100, lo: 0x90, hi: 0x90}, + {value: 0x8100, lo: 0x9e, hi: 0x9e}, + {value: 0x8100, lo: 0xa1, hi: 0xa1}, + {value: 0x8100, lo: 0xb2, hi: 0xb2}, + {value: 0x8100, lo: 0xbb, hi: 0xbb}, + // Block 0x4c, offset 0x18a + {value: 0x0000, lo: 0x03}, + {value: 0x8100, lo: 0x80, hi: 0x80}, + {value: 0x8100, lo: 0x8b, hi: 0x8b}, + {value: 0x8100, lo: 0x8e, hi: 0x8e}, + // Block 0x4d, offset 0x18e + {value: 0x0000, lo: 0x02}, + {value: 0x8132, lo: 0xaf, hi: 0xaf}, + {value: 0x8132, lo: 0xb4, hi: 0xbd}, + // Block 0x4e, offset 0x191 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0x9e, hi: 0x9f}, + // Block 0x4f, offset 0x193 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xb0, hi: 0xb1}, + // Block 0x50, offset 0x195 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x86, hi: 0x86}, + // Block 0x51, offset 0x197 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x84, hi: 0x84}, + {value: 0x8132, lo: 0xa0, hi: 0xb1}, + // Block 0x52, offset 0x19a + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0xab, hi: 0xad}, + // Block 0x53, offset 0x19c + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x93, hi: 0x93}, + // Block 0x54, offset 0x19e + {value: 0x0000, lo: 0x01}, + {value: 0x8102, lo: 0xb3, hi: 0xb3}, + // Block 0x55, offset 0x1a0 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x80, hi: 0x80}, + // Block 0x56, offset 0x1a2 + {value: 0x0000, lo: 0x05}, + {value: 0x8132, lo: 0xb0, hi: 0xb0}, + {value: 0x8132, lo: 0xb2, hi: 0xb3}, + {value: 0x812d, lo: 0xb4, hi: 0xb4}, + {value: 0x8132, lo: 0xb7, hi: 0xb8}, + {value: 0x8132, lo: 0xbe, hi: 0xbf}, + // Block 0x57, offset 0x1a8 + {value: 0x0000, lo: 0x02}, + {value: 0x8132, lo: 0x81, hi: 0x81}, + {value: 0x8104, lo: 0xb6, hi: 0xb6}, + // Block 0x58, offset 0x1ab + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xad, hi: 0xad}, + // Block 0x59, offset 0x1ad + {value: 0x0000, lo: 0x06}, + {value: 0xe500, lo: 0x80, hi: 0x80}, + {value: 0xc600, lo: 0x81, hi: 0x9b}, + {value: 0xe500, lo: 0x9c, hi: 0x9c}, + {value: 0xc600, lo: 0x9d, hi: 0xb7}, + {value: 0xe500, lo: 0xb8, hi: 0xb8}, + {value: 0xc600, lo: 0xb9, hi: 0xbf}, + // Block 0x5a, offset 0x1b4 + {value: 0x0000, lo: 0x05}, + {value: 0xc600, lo: 0x80, hi: 0x93}, + {value: 0xe500, lo: 0x94, hi: 0x94}, + {value: 0xc600, lo: 0x95, hi: 0xaf}, + {value: 0xe500, lo: 0xb0, hi: 0xb0}, + {value: 0xc600, lo: 0xb1, hi: 0xbf}, + // Block 0x5b, offset 0x1ba + {value: 0x0000, lo: 0x05}, + {value: 0xc600, lo: 0x80, hi: 0x8b}, + {value: 0xe500, lo: 0x8c, hi: 0x8c}, + {value: 0xc600, lo: 0x8d, hi: 0xa7}, + {value: 0xe500, lo: 0xa8, hi: 0xa8}, + {value: 0xc600, lo: 0xa9, hi: 0xbf}, + // Block 0x5c, offset 0x1c0 + {value: 0x0000, lo: 0x07}, + {value: 0xc600, lo: 0x80, hi: 0x83}, + {value: 0xe500, lo: 0x84, hi: 0x84}, + {value: 0xc600, lo: 0x85, hi: 0x9f}, + {value: 0xe500, lo: 0xa0, hi: 0xa0}, + {value: 0xc600, lo: 0xa1, hi: 0xbb}, + {value: 0xe500, lo: 0xbc, hi: 0xbc}, + {value: 0xc600, lo: 0xbd, hi: 0xbf}, + // Block 0x5d, offset 0x1c8 + {value: 0x0000, lo: 0x05}, + {value: 0xc600, lo: 0x80, hi: 0x97}, + {value: 0xe500, lo: 0x98, hi: 0x98}, + {value: 0xc600, lo: 0x99, hi: 0xb3}, + {value: 0xe500, lo: 0xb4, hi: 0xb4}, + {value: 0xc600, lo: 0xb5, hi: 0xbf}, + // Block 0x5e, offset 0x1ce + {value: 0x0000, lo: 0x05}, + {value: 0xc600, lo: 0x80, hi: 0x8f}, + {value: 0xe500, lo: 0x90, hi: 0x90}, + {value: 0xc600, lo: 0x91, hi: 0xab}, + {value: 0xe500, lo: 0xac, hi: 0xac}, + {value: 0xc600, lo: 0xad, hi: 0xbf}, + // Block 0x5f, offset 0x1d4 + {value: 0x0000, lo: 0x05}, + {value: 0xc600, lo: 0x80, hi: 0x87}, + {value: 0xe500, lo: 0x88, hi: 0x88}, + {value: 0xc600, lo: 0x89, hi: 0xa3}, + {value: 0xe500, lo: 0xa4, hi: 0xa4}, + {value: 0xc600, lo: 0xa5, hi: 0xbf}, + // Block 0x60, offset 0x1da + {value: 0x0000, lo: 0x03}, + {value: 0xc600, lo: 0x80, hi: 0x87}, + {value: 0xe500, lo: 0x88, hi: 0x88}, + {value: 0xc600, lo: 0x89, hi: 0xa3}, + // Block 0x61, offset 0x1de + {value: 0x0006, lo: 0x0d}, + {value: 0x4393, lo: 0x9d, hi: 0x9d}, + {value: 0x8115, lo: 0x9e, hi: 0x9e}, + {value: 0x4405, lo: 0x9f, hi: 0x9f}, + {value: 0x43f3, lo: 0xaa, hi: 0xab}, + {value: 0x44f7, lo: 0xac, hi: 0xac}, + {value: 0x44ff, lo: 0xad, hi: 0xad}, + {value: 0x434b, lo: 0xae, hi: 0xb1}, + {value: 0x4369, lo: 0xb2, hi: 0xb4}, + {value: 0x4381, lo: 0xb5, hi: 0xb6}, + {value: 0x438d, lo: 0xb8, hi: 0xb8}, + {value: 0x4399, lo: 0xb9, hi: 0xbb}, + {value: 0x43b1, lo: 0xbc, hi: 0xbc}, + {value: 0x43b7, lo: 0xbe, hi: 0xbe}, + // Block 0x62, offset 0x1ec + {value: 0x0006, lo: 0x08}, + {value: 0x43bd, lo: 0x80, hi: 0x81}, + {value: 0x43c9, lo: 0x83, hi: 0x84}, + {value: 0x43db, lo: 0x86, hi: 0x89}, + {value: 0x43ff, lo: 0x8a, hi: 0x8a}, + {value: 0x437b, lo: 0x8b, hi: 0x8b}, + {value: 0x4363, lo: 0x8c, hi: 0x8c}, + {value: 0x43ab, lo: 0x8d, hi: 0x8d}, + {value: 0x43d5, lo: 0x8e, hi: 0x8e}, + // Block 0x63, offset 0x1f5 + {value: 0x0000, lo: 0x02}, + {value: 0x8100, lo: 0xa4, hi: 0xa5}, + {value: 0x8100, lo: 0xb0, hi: 0xb1}, + // Block 0x64, offset 0x1f8 + {value: 0x0000, lo: 0x02}, + {value: 0x8100, lo: 0x9b, hi: 0x9d}, + {value: 0x8200, lo: 0x9e, hi: 0xa3}, + // Block 0x65, offset 0x1fb + {value: 0x0000, lo: 0x01}, + {value: 0x8100, lo: 0x90, hi: 0x90}, + // Block 0x66, offset 0x1fd + {value: 0x0000, lo: 0x02}, + {value: 0x8100, lo: 0x99, hi: 0x99}, + {value: 0x8200, lo: 0xb2, hi: 0xb4}, + // Block 0x67, offset 0x200 + {value: 0x0000, lo: 0x01}, + {value: 0x8100, lo: 0xbc, hi: 0xbd}, + // Block 0x68, offset 0x202 + {value: 0x0000, lo: 0x03}, + {value: 0x8132, lo: 0xa0, hi: 0xa6}, + {value: 0x812d, lo: 0xa7, hi: 0xad}, + {value: 0x8132, lo: 0xae, hi: 0xaf}, + // Block 0x69, offset 0x206 + {value: 0x0000, lo: 0x04}, + {value: 0x8100, lo: 0x89, hi: 0x8c}, + {value: 0x8100, lo: 0xb0, hi: 0xb2}, + {value: 0x8100, lo: 0xb4, hi: 0xb4}, + {value: 0x8100, lo: 0xb6, hi: 0xbf}, + // Block 0x6a, offset 0x20b + {value: 0x0000, lo: 0x01}, + {value: 0x8100, lo: 0x81, hi: 0x8c}, + // Block 0x6b, offset 0x20d + {value: 0x0000, lo: 0x01}, + {value: 0x8100, lo: 0xb5, hi: 0xba}, + // Block 0x6c, offset 0x20f + {value: 0x0000, lo: 0x04}, + {value: 0x4aa2, lo: 0x9e, hi: 0x9f}, + {value: 0x4aa2, lo: 0xa3, hi: 0xa3}, + {value: 0x4aa2, lo: 0xa5, hi: 0xa6}, + {value: 0x4aa2, lo: 0xaa, hi: 0xaf}, + // Block 0x6d, offset 0x214 + {value: 0x0000, lo: 0x05}, + {value: 0x4aa2, lo: 0x82, hi: 0x87}, + {value: 0x4aa2, lo: 0x8a, hi: 0x8f}, + {value: 0x4aa2, lo: 0x92, hi: 0x97}, + {value: 0x4aa2, lo: 0x9a, hi: 0x9c}, + {value: 0x8100, lo: 0xa3, hi: 0xa3}, + // Block 0x6e, offset 0x21a + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0xbd, hi: 0xbd}, + // Block 0x6f, offset 0x21c + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0xa0, hi: 0xa0}, + // Block 0x70, offset 0x21e + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xb6, hi: 0xba}, + // Block 0x71, offset 0x220 + {value: 0x002c, lo: 0x05}, + {value: 0x812d, lo: 0x8d, hi: 0x8d}, + {value: 0x8132, lo: 0x8f, hi: 0x8f}, + {value: 0x8132, lo: 0xb8, hi: 0xb8}, + {value: 0x8101, lo: 0xb9, hi: 0xba}, + {value: 0x8104, lo: 0xbf, hi: 0xbf}, + // Block 0x72, offset 0x226 + {value: 0x0000, lo: 0x02}, + {value: 0x8132, lo: 0xa5, hi: 0xa5}, + {value: 0x812d, lo: 0xa6, hi: 0xa6}, + // Block 0x73, offset 0x229 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xa4, hi: 0xa7}, + // Block 0x74, offset 0x22b + {value: 0x0000, lo: 0x05}, + {value: 0x812d, lo: 0x86, hi: 0x87}, + {value: 0x8132, lo: 0x88, hi: 0x8a}, + {value: 0x812d, lo: 0x8b, hi: 0x8b}, + {value: 0x8132, lo: 0x8c, hi: 0x8c}, + {value: 0x812d, lo: 0x8d, hi: 0x90}, + // Block 0x75, offset 0x231 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x86, hi: 0x86}, + {value: 0x8104, lo: 0xbf, hi: 0xbf}, + // Block 0x76, offset 0x234 + {value: 0x17fe, lo: 0x07}, + {value: 0xa000, lo: 0x99, hi: 0x99}, + {value: 0x423b, lo: 0x9a, hi: 0x9a}, + {value: 0xa000, lo: 0x9b, hi: 0x9b}, + {value: 0x4245, lo: 0x9c, hi: 0x9c}, + {value: 0xa000, lo: 0xa5, hi: 0xa5}, + {value: 0x424f, lo: 0xab, hi: 0xab}, + {value: 0x8104, lo: 0xb9, hi: 0xba}, + // Block 0x77, offset 0x23c + {value: 0x0000, lo: 0x06}, + {value: 0x8132, lo: 0x80, hi: 0x82}, + {value: 0x9900, lo: 0xa7, hi: 0xa7}, + {value: 0x2d81, lo: 0xae, hi: 0xae}, + {value: 0x2d8b, lo: 0xaf, hi: 0xaf}, + {value: 0xa000, lo: 0xb1, hi: 0xb2}, + {value: 0x8104, lo: 0xb3, hi: 0xb4}, + // Block 0x78, offset 0x243 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x80, hi: 0x80}, + {value: 0x8102, lo: 0x8a, hi: 0x8a}, + // Block 0x79, offset 0x246 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0xb5, hi: 0xb5}, + {value: 0x8102, lo: 0xb6, hi: 0xb6}, + // Block 0x7a, offset 0x249 + {value: 0x0002, lo: 0x01}, + {value: 0x8102, lo: 0xa9, hi: 0xaa}, + // Block 0x7b, offset 0x24b + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0xbb, hi: 0xbc}, + {value: 0x9900, lo: 0xbe, hi: 0xbe}, + // Block 0x7c, offset 0x24e + {value: 0x0000, lo: 0x07}, + {value: 0xa000, lo: 0x87, hi: 0x87}, + {value: 0x2d95, lo: 0x8b, hi: 0x8b}, + {value: 0x2d9f, lo: 0x8c, hi: 0x8c}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x97, hi: 0x97}, + {value: 0x8132, lo: 0xa6, hi: 0xac}, + {value: 0x8132, lo: 0xb0, hi: 0xb4}, + // Block 0x7d, offset 0x256 + {value: 0x0000, lo: 0x03}, + {value: 0x8104, lo: 0x82, hi: 0x82}, + {value: 0x8102, lo: 0x86, hi: 0x86}, + {value: 0x8132, lo: 0x9e, hi: 0x9e}, + // Block 0x7e, offset 0x25a + {value: 0x6b57, lo: 0x06}, + {value: 0x9900, lo: 0xb0, hi: 0xb0}, + {value: 0xa000, lo: 0xb9, hi: 0xb9}, + {value: 0x9900, lo: 0xba, hi: 0xba}, + {value: 0x2db3, lo: 0xbb, hi: 0xbb}, + {value: 0x2da9, lo: 0xbc, hi: 0xbd}, + {value: 0x2dbd, lo: 0xbe, hi: 0xbe}, + // Block 0x7f, offset 0x261 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x82, hi: 0x82}, + {value: 0x8102, lo: 0x83, hi: 0x83}, + // Block 0x80, offset 0x264 + {value: 0x0000, lo: 0x05}, + {value: 0x9900, lo: 0xaf, hi: 0xaf}, + {value: 0xa000, lo: 0xb8, hi: 0xb9}, + {value: 0x2dc7, lo: 0xba, hi: 0xba}, + {value: 0x2dd1, lo: 0xbb, hi: 0xbb}, + {value: 0x8104, lo: 0xbf, hi: 0xbf}, + // Block 0x81, offset 0x26a + {value: 0x0000, lo: 0x01}, + {value: 0x8102, lo: 0x80, hi: 0x80}, + // Block 0x82, offset 0x26c + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0xb6, hi: 0xb6}, + {value: 0x8102, lo: 0xb7, hi: 0xb7}, + // Block 0x83, offset 0x26f + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xab, hi: 0xab}, + // Block 0x84, offset 0x271 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0xb9, hi: 0xb9}, + {value: 0x8102, lo: 0xba, hi: 0xba}, + // Block 0x85, offset 0x274 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xa0, hi: 0xa0}, + // Block 0x86, offset 0x276 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xb4, hi: 0xb4}, + // Block 0x87, offset 0x278 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x87, hi: 0x87}, + // Block 0x88, offset 0x27a + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x99, hi: 0x99}, + // Block 0x89, offset 0x27c + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0x82, hi: 0x82}, + {value: 0x8104, lo: 0x84, hi: 0x85}, + // Block 0x8a, offset 0x27f + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x97, hi: 0x97}, + // Block 0x8b, offset 0x281 + {value: 0x0000, lo: 0x01}, + {value: 0x8101, lo: 0xb0, hi: 0xb4}, + // Block 0x8c, offset 0x283 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xb0, hi: 0xb6}, + // Block 0x8d, offset 0x285 + {value: 0x0000, lo: 0x01}, + {value: 0x8101, lo: 0x9e, hi: 0x9e}, + // Block 0x8e, offset 0x287 + {value: 0x0000, lo: 0x0c}, + {value: 0x45cf, lo: 0x9e, hi: 0x9e}, + {value: 0x45d9, lo: 0x9f, hi: 0x9f}, + {value: 0x460d, lo: 0xa0, hi: 0xa0}, + {value: 0x461b, lo: 0xa1, hi: 0xa1}, + {value: 0x4629, lo: 0xa2, hi: 0xa2}, + {value: 0x4637, lo: 0xa3, hi: 0xa3}, + {value: 0x4645, lo: 0xa4, hi: 0xa4}, + {value: 0x812b, lo: 0xa5, hi: 0xa6}, + {value: 0x8101, lo: 0xa7, hi: 0xa9}, + {value: 0x8130, lo: 0xad, hi: 0xad}, + {value: 0x812b, lo: 0xae, hi: 0xb2}, + {value: 0x812d, lo: 0xbb, hi: 0xbf}, + // Block 0x8f, offset 0x294 + {value: 0x0000, lo: 0x09}, + {value: 0x812d, lo: 0x80, hi: 0x82}, + {value: 0x8132, lo: 0x85, hi: 0x89}, + {value: 0x812d, lo: 0x8a, hi: 0x8b}, + {value: 0x8132, lo: 0xaa, hi: 0xad}, + {value: 0x45e3, lo: 0xbb, hi: 0xbb}, + {value: 0x45ed, lo: 0xbc, hi: 0xbc}, + {value: 0x4653, lo: 0xbd, hi: 0xbd}, + {value: 0x466f, lo: 0xbe, hi: 0xbe}, + {value: 0x4661, lo: 0xbf, hi: 0xbf}, + // Block 0x90, offset 0x29e + {value: 0x0000, lo: 0x01}, + {value: 0x467d, lo: 0x80, hi: 0x80}, + // Block 0x91, offset 0x2a0 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0x82, hi: 0x84}, + // Block 0x92, offset 0x2a2 + {value: 0x0000, lo: 0x05}, + {value: 0x8132, lo: 0x80, hi: 0x86}, + {value: 0x8132, lo: 0x88, hi: 0x98}, + {value: 0x8132, lo: 0x9b, hi: 0xa1}, + {value: 0x8132, lo: 0xa3, hi: 0xa4}, + {value: 0x8132, lo: 0xa6, hi: 0xaa}, + // Block 0x93, offset 0x2a8 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xac, hi: 0xaf}, + // Block 0x94, offset 0x2aa + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0x90, hi: 0x96}, + // Block 0x95, offset 0x2ac + {value: 0x0000, lo: 0x02}, + {value: 0x8132, lo: 0x84, hi: 0x89}, + {value: 0x8102, lo: 0x8a, hi: 0x8a}, + // Block 0x96, offset 0x2af + {value: 0x0000, lo: 0x01}, + {value: 0x8100, lo: 0x93, hi: 0x93}, +} + +// lookup returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *nfkcTrie) lookup(s []byte) (v uint16, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return nfkcValues[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := nfkcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := nfkcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = nfkcIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := nfkcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = nfkcIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = nfkcIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *nfkcTrie) lookupUnsafe(s []byte) uint16 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return nfkcValues[c0] + } + i := nfkcIndex[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = nfkcIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = nfkcIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// lookupString returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *nfkcTrie) lookupString(s string) (v uint16, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return nfkcValues[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := nfkcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := nfkcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = nfkcIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := nfkcIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = nfkcIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = nfkcIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *nfkcTrie) lookupStringUnsafe(s string) uint16 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return nfkcValues[c0] + } + i := nfkcIndex[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = nfkcIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = nfkcIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// nfkcTrie. Total size: 18684 bytes (18.25 KiB). Checksum: 113e23c477adfabd. +type nfkcTrie struct{} + +func newNfkcTrie(i int) *nfkcTrie { + return &nfkcTrie{} +} + +// lookupValue determines the type of block n and looks up the value for b. +func (t *nfkcTrie) lookupValue(n uint32, b byte) uint16 { + switch { + case n < 92: + return uint16(nfkcValues[n<<6+uint32(b)]) + default: + n -= 92 + return uint16(nfkcSparse.lookup(n, b)) + } +} + +// nfkcValues: 94 blocks, 6016 entries, 12032 bytes +// The third block is the zero block. +var nfkcValues = [6016]uint16{ + // Block 0x0, offset 0x0 + 0x3c: 0xa000, 0x3d: 0xa000, 0x3e: 0xa000, + // Block 0x1, offset 0x40 + 0x41: 0xa000, 0x42: 0xa000, 0x43: 0xa000, 0x44: 0xa000, 0x45: 0xa000, + 0x46: 0xa000, 0x47: 0xa000, 0x48: 0xa000, 0x49: 0xa000, 0x4a: 0xa000, 0x4b: 0xa000, + 0x4c: 0xa000, 0x4d: 0xa000, 0x4e: 0xa000, 0x4f: 0xa000, 0x50: 0xa000, + 0x52: 0xa000, 0x53: 0xa000, 0x54: 0xa000, 0x55: 0xa000, 0x56: 0xa000, 0x57: 0xa000, + 0x58: 0xa000, 0x59: 0xa000, 0x5a: 0xa000, + 0x61: 0xa000, 0x62: 0xa000, 0x63: 0xa000, + 0x64: 0xa000, 0x65: 0xa000, 0x66: 0xa000, 0x67: 0xa000, 0x68: 0xa000, 0x69: 0xa000, + 0x6a: 0xa000, 0x6b: 0xa000, 0x6c: 0xa000, 0x6d: 0xa000, 0x6e: 0xa000, 0x6f: 0xa000, + 0x70: 0xa000, 0x72: 0xa000, 0x73: 0xa000, 0x74: 0xa000, 0x75: 0xa000, + 0x76: 0xa000, 0x77: 0xa000, 0x78: 0xa000, 0x79: 0xa000, 0x7a: 0xa000, + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xc0: 0x2f72, 0xc1: 0x2f77, 0xc2: 0x468b, 0xc3: 0x2f7c, 0xc4: 0x469a, 0xc5: 0x469f, + 0xc6: 0xa000, 0xc7: 0x46a9, 0xc8: 0x2fe5, 0xc9: 0x2fea, 0xca: 0x46ae, 0xcb: 0x2ffe, + 0xcc: 0x3071, 0xcd: 0x3076, 0xce: 0x307b, 0xcf: 0x46c2, 0xd1: 0x3107, + 0xd2: 0x312a, 0xd3: 0x312f, 0xd4: 0x46cc, 0xd5: 0x46d1, 0xd6: 0x46e0, + 0xd8: 0xa000, 0xd9: 0x31b6, 0xda: 0x31bb, 0xdb: 0x31c0, 0xdc: 0x4712, 0xdd: 0x3238, + 0xe0: 0x327e, 0xe1: 0x3283, 0xe2: 0x471c, 0xe3: 0x3288, + 0xe4: 0x472b, 0xe5: 0x4730, 0xe6: 0xa000, 0xe7: 0x473a, 0xe8: 0x32f1, 0xe9: 0x32f6, + 0xea: 0x473f, 0xeb: 0x330a, 0xec: 0x3382, 0xed: 0x3387, 0xee: 0x338c, 0xef: 0x4753, + 0xf1: 0x3418, 0xf2: 0x343b, 0xf3: 0x3440, 0xf4: 0x475d, 0xf5: 0x4762, + 0xf6: 0x4771, 0xf8: 0xa000, 0xf9: 0x34cc, 0xfa: 0x34d1, 0xfb: 0x34d6, + 0xfc: 0x47a3, 0xfd: 0x3553, 0xff: 0x356c, + // Block 0x4, offset 0x100 + 0x100: 0x2f81, 0x101: 0x328d, 0x102: 0x4690, 0x103: 0x4721, 0x104: 0x2f9f, 0x105: 0x32ab, + 0x106: 0x2fb3, 0x107: 0x32bf, 0x108: 0x2fb8, 0x109: 0x32c4, 0x10a: 0x2fbd, 0x10b: 0x32c9, + 0x10c: 0x2fc2, 0x10d: 0x32ce, 0x10e: 0x2fcc, 0x10f: 0x32d8, + 0x112: 0x46b3, 0x113: 0x4744, 0x114: 0x2ff4, 0x115: 0x3300, 0x116: 0x2ff9, 0x117: 0x3305, + 0x118: 0x3017, 0x119: 0x3323, 0x11a: 0x3008, 0x11b: 0x3314, 0x11c: 0x3030, 0x11d: 0x333c, + 0x11e: 0x303a, 0x11f: 0x3346, 0x120: 0x303f, 0x121: 0x334b, 0x122: 0x3049, 0x123: 0x3355, + 0x124: 0x304e, 0x125: 0x335a, 0x128: 0x3080, 0x129: 0x3391, + 0x12a: 0x3085, 0x12b: 0x3396, 0x12c: 0x308a, 0x12d: 0x339b, 0x12e: 0x30ad, 0x12f: 0x33b9, + 0x130: 0x308f, 0x132: 0x195d, 0x133: 0x19ea, 0x134: 0x30b7, 0x135: 0x33c3, + 0x136: 0x30cb, 0x137: 0x33dc, 0x139: 0x30d5, 0x13a: 0x33e6, 0x13b: 0x30df, + 0x13c: 0x33f0, 0x13d: 0x30da, 0x13e: 0x33eb, 0x13f: 0x1baf, + // Block 0x5, offset 0x140 + 0x140: 0x1c37, 0x143: 0x3102, 0x144: 0x3413, 0x145: 0x311b, + 0x146: 0x342c, 0x147: 0x3111, 0x148: 0x3422, 0x149: 0x1c5f, + 0x14c: 0x46d6, 0x14d: 0x4767, 0x14e: 0x3134, 0x14f: 0x3445, 0x150: 0x313e, 0x151: 0x344f, + 0x154: 0x315c, 0x155: 0x346d, 0x156: 0x3175, 0x157: 0x3486, + 0x158: 0x3166, 0x159: 0x3477, 0x15a: 0x46f9, 0x15b: 0x478a, 0x15c: 0x317f, 0x15d: 0x3490, + 0x15e: 0x318e, 0x15f: 0x349f, 0x160: 0x46fe, 0x161: 0x478f, 0x162: 0x31a7, 0x163: 0x34bd, + 0x164: 0x3198, 0x165: 0x34ae, 0x168: 0x4708, 0x169: 0x4799, + 0x16a: 0x470d, 0x16b: 0x479e, 0x16c: 0x31c5, 0x16d: 0x34db, 0x16e: 0x31cf, 0x16f: 0x34e5, + 0x170: 0x31d4, 0x171: 0x34ea, 0x172: 0x31f2, 0x173: 0x3508, 0x174: 0x3215, 0x175: 0x352b, + 0x176: 0x323d, 0x177: 0x3558, 0x178: 0x3251, 0x179: 0x3260, 0x17a: 0x3580, 0x17b: 0x326a, + 0x17c: 0x358a, 0x17d: 0x326f, 0x17e: 0x358f, 0x17f: 0x00a7, + // Block 0x6, offset 0x180 + 0x184: 0x2df1, 0x185: 0x2df7, + 0x186: 0x2dfd, 0x187: 0x1972, 0x188: 0x1975, 0x189: 0x1a0b, 0x18a: 0x198a, 0x18b: 0x198d, + 0x18c: 0x1a41, 0x18d: 0x2f8b, 0x18e: 0x3297, 0x18f: 0x3099, 0x190: 0x33a5, 0x191: 0x3143, + 0x192: 0x3454, 0x193: 0x31d9, 0x194: 0x34ef, 0x195: 0x39d2, 0x196: 0x3b61, 0x197: 0x39cb, + 0x198: 0x3b5a, 0x199: 0x39d9, 0x19a: 0x3b68, 0x19b: 0x39c4, 0x19c: 0x3b53, + 0x19e: 0x38b3, 0x19f: 0x3a42, 0x1a0: 0x38ac, 0x1a1: 0x3a3b, 0x1a2: 0x35b6, 0x1a3: 0x35c8, + 0x1a6: 0x3044, 0x1a7: 0x3350, 0x1a8: 0x30c1, 0x1a9: 0x33d2, + 0x1aa: 0x46ef, 0x1ab: 0x4780, 0x1ac: 0x3993, 0x1ad: 0x3b22, 0x1ae: 0x35da, 0x1af: 0x35e0, + 0x1b0: 0x33c8, 0x1b1: 0x1942, 0x1b2: 0x1945, 0x1b3: 0x19d2, 0x1b4: 0x302b, 0x1b5: 0x3337, + 0x1b8: 0x30fd, 0x1b9: 0x340e, 0x1ba: 0x38ba, 0x1bb: 0x3a49, + 0x1bc: 0x35b0, 0x1bd: 0x35c2, 0x1be: 0x35bc, 0x1bf: 0x35ce, + // Block 0x7, offset 0x1c0 + 0x1c0: 0x2f90, 0x1c1: 0x329c, 0x1c2: 0x2f95, 0x1c3: 0x32a1, 0x1c4: 0x300d, 0x1c5: 0x3319, + 0x1c6: 0x3012, 0x1c7: 0x331e, 0x1c8: 0x309e, 0x1c9: 0x33aa, 0x1ca: 0x30a3, 0x1cb: 0x33af, + 0x1cc: 0x3148, 0x1cd: 0x3459, 0x1ce: 0x314d, 0x1cf: 0x345e, 0x1d0: 0x316b, 0x1d1: 0x347c, + 0x1d2: 0x3170, 0x1d3: 0x3481, 0x1d4: 0x31de, 0x1d5: 0x34f4, 0x1d6: 0x31e3, 0x1d7: 0x34f9, + 0x1d8: 0x3189, 0x1d9: 0x349a, 0x1da: 0x31a2, 0x1db: 0x34b8, + 0x1de: 0x305d, 0x1df: 0x3369, + 0x1e6: 0x4695, 0x1e7: 0x4726, 0x1e8: 0x46bd, 0x1e9: 0x474e, + 0x1ea: 0x3962, 0x1eb: 0x3af1, 0x1ec: 0x393f, 0x1ed: 0x3ace, 0x1ee: 0x46db, 0x1ef: 0x476c, + 0x1f0: 0x395b, 0x1f1: 0x3aea, 0x1f2: 0x3247, 0x1f3: 0x3562, + // Block 0x8, offset 0x200 + 0x200: 0x9932, 0x201: 0x9932, 0x202: 0x9932, 0x203: 0x9932, 0x204: 0x9932, 0x205: 0x8132, + 0x206: 0x9932, 0x207: 0x9932, 0x208: 0x9932, 0x209: 0x9932, 0x20a: 0x9932, 0x20b: 0x9932, + 0x20c: 0x9932, 0x20d: 0x8132, 0x20e: 0x8132, 0x20f: 0x9932, 0x210: 0x8132, 0x211: 0x9932, + 0x212: 0x8132, 0x213: 0x9932, 0x214: 0x9932, 0x215: 0x8133, 0x216: 0x812d, 0x217: 0x812d, + 0x218: 0x812d, 0x219: 0x812d, 0x21a: 0x8133, 0x21b: 0x992b, 0x21c: 0x812d, 0x21d: 0x812d, + 0x21e: 0x812d, 0x21f: 0x812d, 0x220: 0x812d, 0x221: 0x8129, 0x222: 0x8129, 0x223: 0x992d, + 0x224: 0x992d, 0x225: 0x992d, 0x226: 0x992d, 0x227: 0x9929, 0x228: 0x9929, 0x229: 0x812d, + 0x22a: 0x812d, 0x22b: 0x812d, 0x22c: 0x812d, 0x22d: 0x992d, 0x22e: 0x992d, 0x22f: 0x812d, + 0x230: 0x992d, 0x231: 0x992d, 0x232: 0x812d, 0x233: 0x812d, 0x234: 0x8101, 0x235: 0x8101, + 0x236: 0x8101, 0x237: 0x8101, 0x238: 0x9901, 0x239: 0x812d, 0x23a: 0x812d, 0x23b: 0x812d, + 0x23c: 0x812d, 0x23d: 0x8132, 0x23e: 0x8132, 0x23f: 0x8132, + // Block 0x9, offset 0x240 + 0x240: 0x49b1, 0x241: 0x49b6, 0x242: 0x9932, 0x243: 0x49bb, 0x244: 0x4a74, 0x245: 0x9936, + 0x246: 0x8132, 0x247: 0x812d, 0x248: 0x812d, 0x249: 0x812d, 0x24a: 0x8132, 0x24b: 0x8132, + 0x24c: 0x8132, 0x24d: 0x812d, 0x24e: 0x812d, 0x250: 0x8132, 0x251: 0x8132, + 0x252: 0x8132, 0x253: 0x812d, 0x254: 0x812d, 0x255: 0x812d, 0x256: 0x812d, 0x257: 0x8132, + 0x258: 0x8133, 0x259: 0x812d, 0x25a: 0x812d, 0x25b: 0x8132, 0x25c: 0x8134, 0x25d: 0x8135, + 0x25e: 0x8135, 0x25f: 0x8134, 0x260: 0x8135, 0x261: 0x8135, 0x262: 0x8134, 0x263: 0x8132, + 0x264: 0x8132, 0x265: 0x8132, 0x266: 0x8132, 0x267: 0x8132, 0x268: 0x8132, 0x269: 0x8132, + 0x26a: 0x8132, 0x26b: 0x8132, 0x26c: 0x8132, 0x26d: 0x8132, 0x26e: 0x8132, 0x26f: 0x8132, + 0x274: 0x0170, + 0x27a: 0x42a8, + 0x27e: 0x0037, + // Block 0xa, offset 0x280 + 0x284: 0x425d, 0x285: 0x447e, + 0x286: 0x35ec, 0x287: 0x00ce, 0x288: 0x360a, 0x289: 0x3616, 0x28a: 0x3628, + 0x28c: 0x3646, 0x28e: 0x3658, 0x28f: 0x3676, 0x290: 0x3e0b, 0x291: 0xa000, + 0x295: 0xa000, 0x297: 0xa000, + 0x299: 0xa000, + 0x29f: 0xa000, 0x2a1: 0xa000, + 0x2a5: 0xa000, 0x2a9: 0xa000, + 0x2aa: 0x363a, 0x2ab: 0x366a, 0x2ac: 0x4801, 0x2ad: 0x369a, 0x2ae: 0x482b, 0x2af: 0x36ac, + 0x2b0: 0x3e73, 0x2b1: 0xa000, 0x2b5: 0xa000, + 0x2b7: 0xa000, 0x2b9: 0xa000, + 0x2bf: 0xa000, + // Block 0xb, offset 0x2c0 + 0x2c1: 0xa000, 0x2c5: 0xa000, + 0x2c9: 0xa000, 0x2ca: 0x4843, 0x2cb: 0x4861, + 0x2cc: 0x36ca, 0x2cd: 0x36e2, 0x2ce: 0x4879, 0x2d0: 0x01be, 0x2d1: 0x01d0, + 0x2d2: 0x01ac, 0x2d3: 0x430f, 0x2d4: 0x4315, 0x2d5: 0x01fa, 0x2d6: 0x01e8, + 0x2f0: 0x01d6, 0x2f1: 0x01eb, 0x2f2: 0x01ee, 0x2f4: 0x0188, 0x2f5: 0x01c7, + 0x2f9: 0x01a6, + // Block 0xc, offset 0x300 + 0x300: 0x3724, 0x301: 0x3730, 0x303: 0x371e, + 0x306: 0xa000, 0x307: 0x370c, + 0x30c: 0x3760, 0x30d: 0x3748, 0x30e: 0x3772, 0x310: 0xa000, + 0x313: 0xa000, 0x315: 0xa000, 0x316: 0xa000, 0x317: 0xa000, + 0x318: 0xa000, 0x319: 0x3754, 0x31a: 0xa000, + 0x31e: 0xa000, 0x323: 0xa000, + 0x327: 0xa000, + 0x32b: 0xa000, 0x32d: 0xa000, + 0x330: 0xa000, 0x333: 0xa000, 0x335: 0xa000, + 0x336: 0xa000, 0x337: 0xa000, 0x338: 0xa000, 0x339: 0x37d8, 0x33a: 0xa000, + 0x33e: 0xa000, + // Block 0xd, offset 0x340 + 0x341: 0x3736, 0x342: 0x37ba, + 0x350: 0x3712, 0x351: 0x3796, + 0x352: 0x3718, 0x353: 0x379c, 0x356: 0x372a, 0x357: 0x37ae, + 0x358: 0xa000, 0x359: 0xa000, 0x35a: 0x382c, 0x35b: 0x3832, 0x35c: 0x373c, 0x35d: 0x37c0, + 0x35e: 0x3742, 0x35f: 0x37c6, 0x362: 0x374e, 0x363: 0x37d2, + 0x364: 0x375a, 0x365: 0x37de, 0x366: 0x3766, 0x367: 0x37ea, 0x368: 0xa000, 0x369: 0xa000, + 0x36a: 0x3838, 0x36b: 0x383e, 0x36c: 0x3790, 0x36d: 0x3814, 0x36e: 0x376c, 0x36f: 0x37f0, + 0x370: 0x3778, 0x371: 0x37fc, 0x372: 0x377e, 0x373: 0x3802, 0x374: 0x3784, 0x375: 0x3808, + 0x378: 0x378a, 0x379: 0x380e, + // Block 0xe, offset 0x380 + 0x387: 0x1d64, + 0x391: 0x812d, + 0x392: 0x8132, 0x393: 0x8132, 0x394: 0x8132, 0x395: 0x8132, 0x396: 0x812d, 0x397: 0x8132, + 0x398: 0x8132, 0x399: 0x8132, 0x39a: 0x812e, 0x39b: 0x812d, 0x39c: 0x8132, 0x39d: 0x8132, + 0x39e: 0x8132, 0x39f: 0x8132, 0x3a0: 0x8132, 0x3a1: 0x8132, 0x3a2: 0x812d, 0x3a3: 0x812d, + 0x3a4: 0x812d, 0x3a5: 0x812d, 0x3a6: 0x812d, 0x3a7: 0x812d, 0x3a8: 0x8132, 0x3a9: 0x8132, + 0x3aa: 0x812d, 0x3ab: 0x8132, 0x3ac: 0x8132, 0x3ad: 0x812e, 0x3ae: 0x8131, 0x3af: 0x8132, + 0x3b0: 0x8105, 0x3b1: 0x8106, 0x3b2: 0x8107, 0x3b3: 0x8108, 0x3b4: 0x8109, 0x3b5: 0x810a, + 0x3b6: 0x810b, 0x3b7: 0x810c, 0x3b8: 0x810d, 0x3b9: 0x810e, 0x3ba: 0x810e, 0x3bb: 0x810f, + 0x3bc: 0x8110, 0x3bd: 0x8111, 0x3bf: 0x8112, + // Block 0xf, offset 0x3c0 + 0x3c8: 0xa000, 0x3ca: 0xa000, 0x3cb: 0x8116, + 0x3cc: 0x8117, 0x3cd: 0x8118, 0x3ce: 0x8119, 0x3cf: 0x811a, 0x3d0: 0x811b, 0x3d1: 0x811c, + 0x3d2: 0x811d, 0x3d3: 0x9932, 0x3d4: 0x9932, 0x3d5: 0x992d, 0x3d6: 0x812d, 0x3d7: 0x8132, + 0x3d8: 0x8132, 0x3d9: 0x8132, 0x3da: 0x8132, 0x3db: 0x8132, 0x3dc: 0x812d, 0x3dd: 0x8132, + 0x3de: 0x8132, 0x3df: 0x812d, + 0x3f0: 0x811e, 0x3f5: 0x1d87, + 0x3f6: 0x2016, 0x3f7: 0x2052, 0x3f8: 0x204d, + // Block 0x10, offset 0x400 + 0x413: 0x812d, 0x414: 0x8132, 0x415: 0x8132, 0x416: 0x8132, 0x417: 0x8132, + 0x418: 0x8132, 0x419: 0x8132, 0x41a: 0x8132, 0x41b: 0x8132, 0x41c: 0x8132, 0x41d: 0x8132, + 0x41e: 0x8132, 0x41f: 0x8132, 0x420: 0x8132, 0x421: 0x8132, 0x423: 0x812d, + 0x424: 0x8132, 0x425: 0x8132, 0x426: 0x812d, 0x427: 0x8132, 0x428: 0x8132, 0x429: 0x812d, + 0x42a: 0x8132, 0x42b: 0x8132, 0x42c: 0x8132, 0x42d: 0x812d, 0x42e: 0x812d, 0x42f: 0x812d, + 0x430: 0x8116, 0x431: 0x8117, 0x432: 0x8118, 0x433: 0x8132, 0x434: 0x8132, 0x435: 0x8132, + 0x436: 0x812d, 0x437: 0x8132, 0x438: 0x8132, 0x439: 0x812d, 0x43a: 0x812d, 0x43b: 0x8132, + 0x43c: 0x8132, 0x43d: 0x8132, 0x43e: 0x8132, 0x43f: 0x8132, + // Block 0x11, offset 0x440 + 0x445: 0xa000, + 0x446: 0x2d29, 0x447: 0xa000, 0x448: 0x2d31, 0x449: 0xa000, 0x44a: 0x2d39, 0x44b: 0xa000, + 0x44c: 0x2d41, 0x44d: 0xa000, 0x44e: 0x2d49, 0x451: 0xa000, + 0x452: 0x2d51, + 0x474: 0x8102, 0x475: 0x9900, + 0x47a: 0xa000, 0x47b: 0x2d59, + 0x47c: 0xa000, 0x47d: 0x2d61, 0x47e: 0xa000, 0x47f: 0xa000, + // Block 0x12, offset 0x480 + 0x480: 0x0069, 0x481: 0x006b, 0x482: 0x006f, 0x483: 0x0083, 0x484: 0x00f5, 0x485: 0x00f8, + 0x486: 0x0413, 0x487: 0x0085, 0x488: 0x0089, 0x489: 0x008b, 0x48a: 0x0104, 0x48b: 0x0107, + 0x48c: 0x010a, 0x48d: 0x008f, 0x48f: 0x0097, 0x490: 0x009b, 0x491: 0x00e0, + 0x492: 0x009f, 0x493: 0x00fe, 0x494: 0x0417, 0x495: 0x041b, 0x496: 0x00a1, 0x497: 0x00a9, + 0x498: 0x00ab, 0x499: 0x0423, 0x49a: 0x012b, 0x49b: 0x00ad, 0x49c: 0x0427, 0x49d: 0x01be, + 0x49e: 0x01c1, 0x49f: 0x01c4, 0x4a0: 0x01fa, 0x4a1: 0x01fd, 0x4a2: 0x0093, 0x4a3: 0x00a5, + 0x4a4: 0x00ab, 0x4a5: 0x00ad, 0x4a6: 0x01be, 0x4a7: 0x01c1, 0x4a8: 0x01eb, 0x4a9: 0x01fa, + 0x4aa: 0x01fd, + 0x4b8: 0x020c, + // Block 0x13, offset 0x4c0 + 0x4db: 0x00fb, 0x4dc: 0x0087, 0x4dd: 0x0101, + 0x4de: 0x00d4, 0x4df: 0x010a, 0x4e0: 0x008d, 0x4e1: 0x010d, 0x4e2: 0x0110, 0x4e3: 0x0116, + 0x4e4: 0x011c, 0x4e5: 0x011f, 0x4e6: 0x0122, 0x4e7: 0x042b, 0x4e8: 0x016a, 0x4e9: 0x0128, + 0x4ea: 0x042f, 0x4eb: 0x016d, 0x4ec: 0x0131, 0x4ed: 0x012e, 0x4ee: 0x0134, 0x4ef: 0x0137, + 0x4f0: 0x013a, 0x4f1: 0x013d, 0x4f2: 0x0140, 0x4f3: 0x014c, 0x4f4: 0x014f, 0x4f5: 0x00ec, + 0x4f6: 0x0152, 0x4f7: 0x0155, 0x4f8: 0x041f, 0x4f9: 0x0158, 0x4fa: 0x015b, 0x4fb: 0x00b5, + 0x4fc: 0x015e, 0x4fd: 0x0161, 0x4fe: 0x0164, 0x4ff: 0x01d0, + // Block 0x14, offset 0x500 + 0x500: 0x8132, 0x501: 0x8132, 0x502: 0x812d, 0x503: 0x8132, 0x504: 0x8132, 0x505: 0x8132, + 0x506: 0x8132, 0x507: 0x8132, 0x508: 0x8132, 0x509: 0x8132, 0x50a: 0x812d, 0x50b: 0x8132, + 0x50c: 0x8132, 0x50d: 0x8135, 0x50e: 0x812a, 0x50f: 0x812d, 0x510: 0x8129, 0x511: 0x8132, + 0x512: 0x8132, 0x513: 0x8132, 0x514: 0x8132, 0x515: 0x8132, 0x516: 0x8132, 0x517: 0x8132, + 0x518: 0x8132, 0x519: 0x8132, 0x51a: 0x8132, 0x51b: 0x8132, 0x51c: 0x8132, 0x51d: 0x8132, + 0x51e: 0x8132, 0x51f: 0x8132, 0x520: 0x8132, 0x521: 0x8132, 0x522: 0x8132, 0x523: 0x8132, + 0x524: 0x8132, 0x525: 0x8132, 0x526: 0x8132, 0x527: 0x8132, 0x528: 0x8132, 0x529: 0x8132, + 0x52a: 0x8132, 0x52b: 0x8132, 0x52c: 0x8132, 0x52d: 0x8132, 0x52e: 0x8132, 0x52f: 0x8132, + 0x530: 0x8132, 0x531: 0x8132, 0x532: 0x8132, 0x533: 0x8132, 0x534: 0x8132, 0x535: 0x8132, + 0x536: 0x8133, 0x537: 0x8131, 0x538: 0x8131, 0x539: 0x812d, 0x53b: 0x8132, + 0x53c: 0x8134, 0x53d: 0x812d, 0x53e: 0x8132, 0x53f: 0x812d, + // Block 0x15, offset 0x540 + 0x540: 0x2f9a, 0x541: 0x32a6, 0x542: 0x2fa4, 0x543: 0x32b0, 0x544: 0x2fa9, 0x545: 0x32b5, + 0x546: 0x2fae, 0x547: 0x32ba, 0x548: 0x38cf, 0x549: 0x3a5e, 0x54a: 0x2fc7, 0x54b: 0x32d3, + 0x54c: 0x2fd1, 0x54d: 0x32dd, 0x54e: 0x2fe0, 0x54f: 0x32ec, 0x550: 0x2fd6, 0x551: 0x32e2, + 0x552: 0x2fdb, 0x553: 0x32e7, 0x554: 0x38f2, 0x555: 0x3a81, 0x556: 0x38f9, 0x557: 0x3a88, + 0x558: 0x301c, 0x559: 0x3328, 0x55a: 0x3021, 0x55b: 0x332d, 0x55c: 0x3907, 0x55d: 0x3a96, + 0x55e: 0x3026, 0x55f: 0x3332, 0x560: 0x3035, 0x561: 0x3341, 0x562: 0x3053, 0x563: 0x335f, + 0x564: 0x3062, 0x565: 0x336e, 0x566: 0x3058, 0x567: 0x3364, 0x568: 0x3067, 0x569: 0x3373, + 0x56a: 0x306c, 0x56b: 0x3378, 0x56c: 0x30b2, 0x56d: 0x33be, 0x56e: 0x390e, 0x56f: 0x3a9d, + 0x570: 0x30bc, 0x571: 0x33cd, 0x572: 0x30c6, 0x573: 0x33d7, 0x574: 0x30d0, 0x575: 0x33e1, + 0x576: 0x46c7, 0x577: 0x4758, 0x578: 0x3915, 0x579: 0x3aa4, 0x57a: 0x30e9, 0x57b: 0x33fa, + 0x57c: 0x30e4, 0x57d: 0x33f5, 0x57e: 0x30ee, 0x57f: 0x33ff, + // Block 0x16, offset 0x580 + 0x580: 0x30f3, 0x581: 0x3404, 0x582: 0x30f8, 0x583: 0x3409, 0x584: 0x310c, 0x585: 0x341d, + 0x586: 0x3116, 0x587: 0x3427, 0x588: 0x3125, 0x589: 0x3436, 0x58a: 0x3120, 0x58b: 0x3431, + 0x58c: 0x3938, 0x58d: 0x3ac7, 0x58e: 0x3946, 0x58f: 0x3ad5, 0x590: 0x394d, 0x591: 0x3adc, + 0x592: 0x3954, 0x593: 0x3ae3, 0x594: 0x3152, 0x595: 0x3463, 0x596: 0x3157, 0x597: 0x3468, + 0x598: 0x3161, 0x599: 0x3472, 0x59a: 0x46f4, 0x59b: 0x4785, 0x59c: 0x399a, 0x59d: 0x3b29, + 0x59e: 0x317a, 0x59f: 0x348b, 0x5a0: 0x3184, 0x5a1: 0x3495, 0x5a2: 0x4703, 0x5a3: 0x4794, + 0x5a4: 0x39a1, 0x5a5: 0x3b30, 0x5a6: 0x39a8, 0x5a7: 0x3b37, 0x5a8: 0x39af, 0x5a9: 0x3b3e, + 0x5aa: 0x3193, 0x5ab: 0x34a4, 0x5ac: 0x319d, 0x5ad: 0x34b3, 0x5ae: 0x31b1, 0x5af: 0x34c7, + 0x5b0: 0x31ac, 0x5b1: 0x34c2, 0x5b2: 0x31ed, 0x5b3: 0x3503, 0x5b4: 0x31fc, 0x5b5: 0x3512, + 0x5b6: 0x31f7, 0x5b7: 0x350d, 0x5b8: 0x39b6, 0x5b9: 0x3b45, 0x5ba: 0x39bd, 0x5bb: 0x3b4c, + 0x5bc: 0x3201, 0x5bd: 0x3517, 0x5be: 0x3206, 0x5bf: 0x351c, + // Block 0x17, offset 0x5c0 + 0x5c0: 0x320b, 0x5c1: 0x3521, 0x5c2: 0x3210, 0x5c3: 0x3526, 0x5c4: 0x321f, 0x5c5: 0x3535, + 0x5c6: 0x321a, 0x5c7: 0x3530, 0x5c8: 0x3224, 0x5c9: 0x353f, 0x5ca: 0x3229, 0x5cb: 0x3544, + 0x5cc: 0x322e, 0x5cd: 0x3549, 0x5ce: 0x324c, 0x5cf: 0x3567, 0x5d0: 0x3265, 0x5d1: 0x3585, + 0x5d2: 0x3274, 0x5d3: 0x3594, 0x5d4: 0x3279, 0x5d5: 0x3599, 0x5d6: 0x337d, 0x5d7: 0x34a9, + 0x5d8: 0x353a, 0x5d9: 0x3576, 0x5da: 0x1be3, 0x5db: 0x42da, + 0x5e0: 0x46a4, 0x5e1: 0x4735, 0x5e2: 0x2f86, 0x5e3: 0x3292, + 0x5e4: 0x387b, 0x5e5: 0x3a0a, 0x5e6: 0x3874, 0x5e7: 0x3a03, 0x5e8: 0x3889, 0x5e9: 0x3a18, + 0x5ea: 0x3882, 0x5eb: 0x3a11, 0x5ec: 0x38c1, 0x5ed: 0x3a50, 0x5ee: 0x3897, 0x5ef: 0x3a26, + 0x5f0: 0x3890, 0x5f1: 0x3a1f, 0x5f2: 0x38a5, 0x5f3: 0x3a34, 0x5f4: 0x389e, 0x5f5: 0x3a2d, + 0x5f6: 0x38c8, 0x5f7: 0x3a57, 0x5f8: 0x46b8, 0x5f9: 0x4749, 0x5fa: 0x3003, 0x5fb: 0x330f, + 0x5fc: 0x2fef, 0x5fd: 0x32fb, 0x5fe: 0x38dd, 0x5ff: 0x3a6c, + // Block 0x18, offset 0x600 + 0x600: 0x38d6, 0x601: 0x3a65, 0x602: 0x38eb, 0x603: 0x3a7a, 0x604: 0x38e4, 0x605: 0x3a73, + 0x606: 0x3900, 0x607: 0x3a8f, 0x608: 0x3094, 0x609: 0x33a0, 0x60a: 0x30a8, 0x60b: 0x33b4, + 0x60c: 0x46ea, 0x60d: 0x477b, 0x60e: 0x3139, 0x60f: 0x344a, 0x610: 0x3923, 0x611: 0x3ab2, + 0x612: 0x391c, 0x613: 0x3aab, 0x614: 0x3931, 0x615: 0x3ac0, 0x616: 0x392a, 0x617: 0x3ab9, + 0x618: 0x398c, 0x619: 0x3b1b, 0x61a: 0x3970, 0x61b: 0x3aff, 0x61c: 0x3969, 0x61d: 0x3af8, + 0x61e: 0x397e, 0x61f: 0x3b0d, 0x620: 0x3977, 0x621: 0x3b06, 0x622: 0x3985, 0x623: 0x3b14, + 0x624: 0x31e8, 0x625: 0x34fe, 0x626: 0x31ca, 0x627: 0x34e0, 0x628: 0x39e7, 0x629: 0x3b76, + 0x62a: 0x39e0, 0x62b: 0x3b6f, 0x62c: 0x39f5, 0x62d: 0x3b84, 0x62e: 0x39ee, 0x62f: 0x3b7d, + 0x630: 0x39fc, 0x631: 0x3b8b, 0x632: 0x3233, 0x633: 0x354e, 0x634: 0x325b, 0x635: 0x357b, + 0x636: 0x3256, 0x637: 0x3571, 0x638: 0x3242, 0x639: 0x355d, + // Block 0x19, offset 0x640 + 0x640: 0x4807, 0x641: 0x480d, 0x642: 0x4921, 0x643: 0x4939, 0x644: 0x4929, 0x645: 0x4941, + 0x646: 0x4931, 0x647: 0x4949, 0x648: 0x47ad, 0x649: 0x47b3, 0x64a: 0x4891, 0x64b: 0x48a9, + 0x64c: 0x4899, 0x64d: 0x48b1, 0x64e: 0x48a1, 0x64f: 0x48b9, 0x650: 0x4819, 0x651: 0x481f, + 0x652: 0x3dbb, 0x653: 0x3dcb, 0x654: 0x3dc3, 0x655: 0x3dd3, + 0x658: 0x47b9, 0x659: 0x47bf, 0x65a: 0x3ceb, 0x65b: 0x3cfb, 0x65c: 0x3cf3, 0x65d: 0x3d03, + 0x660: 0x4831, 0x661: 0x4837, 0x662: 0x4951, 0x663: 0x4969, + 0x664: 0x4959, 0x665: 0x4971, 0x666: 0x4961, 0x667: 0x4979, 0x668: 0x47c5, 0x669: 0x47cb, + 0x66a: 0x48c1, 0x66b: 0x48d9, 0x66c: 0x48c9, 0x66d: 0x48e1, 0x66e: 0x48d1, 0x66f: 0x48e9, + 0x670: 0x4849, 0x671: 0x484f, 0x672: 0x3e1b, 0x673: 0x3e33, 0x674: 0x3e23, 0x675: 0x3e3b, + 0x676: 0x3e2b, 0x677: 0x3e43, 0x678: 0x47d1, 0x679: 0x47d7, 0x67a: 0x3d1b, 0x67b: 0x3d33, + 0x67c: 0x3d23, 0x67d: 0x3d3b, 0x67e: 0x3d2b, 0x67f: 0x3d43, + // Block 0x1a, offset 0x680 + 0x680: 0x4855, 0x681: 0x485b, 0x682: 0x3e4b, 0x683: 0x3e5b, 0x684: 0x3e53, 0x685: 0x3e63, + 0x688: 0x47dd, 0x689: 0x47e3, 0x68a: 0x3d4b, 0x68b: 0x3d5b, + 0x68c: 0x3d53, 0x68d: 0x3d63, 0x690: 0x4867, 0x691: 0x486d, + 0x692: 0x3e83, 0x693: 0x3e9b, 0x694: 0x3e8b, 0x695: 0x3ea3, 0x696: 0x3e93, 0x697: 0x3eab, + 0x699: 0x47e9, 0x69b: 0x3d6b, 0x69d: 0x3d73, + 0x69f: 0x3d7b, 0x6a0: 0x487f, 0x6a1: 0x4885, 0x6a2: 0x4981, 0x6a3: 0x4999, + 0x6a4: 0x4989, 0x6a5: 0x49a1, 0x6a6: 0x4991, 0x6a7: 0x49a9, 0x6a8: 0x47ef, 0x6a9: 0x47f5, + 0x6aa: 0x48f1, 0x6ab: 0x4909, 0x6ac: 0x48f9, 0x6ad: 0x4911, 0x6ae: 0x4901, 0x6af: 0x4919, + 0x6b0: 0x47fb, 0x6b1: 0x4321, 0x6b2: 0x3694, 0x6b3: 0x4327, 0x6b4: 0x4825, 0x6b5: 0x432d, + 0x6b6: 0x36a6, 0x6b7: 0x4333, 0x6b8: 0x36c4, 0x6b9: 0x4339, 0x6ba: 0x36dc, 0x6bb: 0x433f, + 0x6bc: 0x4873, 0x6bd: 0x4345, + // Block 0x1b, offset 0x6c0 + 0x6c0: 0x3da3, 0x6c1: 0x3dab, 0x6c2: 0x4187, 0x6c3: 0x41a5, 0x6c4: 0x4191, 0x6c5: 0x41af, + 0x6c6: 0x419b, 0x6c7: 0x41b9, 0x6c8: 0x3cdb, 0x6c9: 0x3ce3, 0x6ca: 0x40d3, 0x6cb: 0x40f1, + 0x6cc: 0x40dd, 0x6cd: 0x40fb, 0x6ce: 0x40e7, 0x6cf: 0x4105, 0x6d0: 0x3deb, 0x6d1: 0x3df3, + 0x6d2: 0x41c3, 0x6d3: 0x41e1, 0x6d4: 0x41cd, 0x6d5: 0x41eb, 0x6d6: 0x41d7, 0x6d7: 0x41f5, + 0x6d8: 0x3d0b, 0x6d9: 0x3d13, 0x6da: 0x410f, 0x6db: 0x412d, 0x6dc: 0x4119, 0x6dd: 0x4137, + 0x6de: 0x4123, 0x6df: 0x4141, 0x6e0: 0x3ec3, 0x6e1: 0x3ecb, 0x6e2: 0x41ff, 0x6e3: 0x421d, + 0x6e4: 0x4209, 0x6e5: 0x4227, 0x6e6: 0x4213, 0x6e7: 0x4231, 0x6e8: 0x3d83, 0x6e9: 0x3d8b, + 0x6ea: 0x414b, 0x6eb: 0x4169, 0x6ec: 0x4155, 0x6ed: 0x4173, 0x6ee: 0x415f, 0x6ef: 0x417d, + 0x6f0: 0x3688, 0x6f1: 0x3682, 0x6f2: 0x3d93, 0x6f3: 0x368e, 0x6f4: 0x3d9b, + 0x6f6: 0x4813, 0x6f7: 0x3db3, 0x6f8: 0x35f8, 0x6f9: 0x35f2, 0x6fa: 0x35e6, 0x6fb: 0x42f1, + 0x6fc: 0x35fe, 0x6fd: 0x428a, 0x6fe: 0x01d3, 0x6ff: 0x428a, + // Block 0x1c, offset 0x700 + 0x700: 0x42a3, 0x701: 0x4485, 0x702: 0x3ddb, 0x703: 0x36a0, 0x704: 0x3de3, + 0x706: 0x483d, 0x707: 0x3dfb, 0x708: 0x3604, 0x709: 0x42f7, 0x70a: 0x3610, 0x70b: 0x42fd, + 0x70c: 0x361c, 0x70d: 0x448c, 0x70e: 0x4493, 0x70f: 0x449a, 0x710: 0x36b8, 0x711: 0x36b2, + 0x712: 0x3e03, 0x713: 0x44e7, 0x716: 0x36be, 0x717: 0x3e13, + 0x718: 0x3634, 0x719: 0x362e, 0x71a: 0x3622, 0x71b: 0x4303, 0x71d: 0x44a1, + 0x71e: 0x44a8, 0x71f: 0x44af, 0x720: 0x36ee, 0x721: 0x36e8, 0x722: 0x3e6b, 0x723: 0x44ef, + 0x724: 0x36d0, 0x725: 0x36d6, 0x726: 0x36f4, 0x727: 0x3e7b, 0x728: 0x3664, 0x729: 0x365e, + 0x72a: 0x3652, 0x72b: 0x430f, 0x72c: 0x364c, 0x72d: 0x4477, 0x72e: 0x447e, 0x72f: 0x0081, + 0x732: 0x3eb3, 0x733: 0x36fa, 0x734: 0x3ebb, + 0x736: 0x488b, 0x737: 0x3ed3, 0x738: 0x3640, 0x739: 0x4309, 0x73a: 0x3670, 0x73b: 0x431b, + 0x73c: 0x367c, 0x73d: 0x425d, 0x73e: 0x428f, + // Block 0x1d, offset 0x740 + 0x740: 0x1bdb, 0x741: 0x1bdf, 0x742: 0x0047, 0x743: 0x1c57, 0x745: 0x1beb, + 0x746: 0x1bef, 0x747: 0x00e9, 0x749: 0x1c5b, 0x74a: 0x008f, 0x74b: 0x0051, + 0x74c: 0x0051, 0x74d: 0x0051, 0x74e: 0x0091, 0x74f: 0x00da, 0x750: 0x0053, 0x751: 0x0053, + 0x752: 0x0059, 0x753: 0x0099, 0x755: 0x005d, 0x756: 0x1990, + 0x759: 0x0061, 0x75a: 0x0063, 0x75b: 0x0065, 0x75c: 0x0065, 0x75d: 0x0065, + 0x760: 0x19a2, 0x761: 0x1bcb, 0x762: 0x19ab, + 0x764: 0x0075, 0x766: 0x01b8, 0x768: 0x0075, + 0x76a: 0x0057, 0x76b: 0x42d5, 0x76c: 0x0045, 0x76d: 0x0047, 0x76f: 0x008b, + 0x770: 0x004b, 0x771: 0x004d, 0x773: 0x005b, 0x774: 0x009f, 0x775: 0x0215, + 0x776: 0x0218, 0x777: 0x021b, 0x778: 0x021e, 0x779: 0x0093, 0x77b: 0x1b9b, + 0x77c: 0x01e8, 0x77d: 0x01c1, 0x77e: 0x0179, 0x77f: 0x01a0, + // Block 0x1e, offset 0x780 + 0x780: 0x0463, 0x785: 0x0049, + 0x786: 0x0089, 0x787: 0x008b, 0x788: 0x0093, 0x789: 0x0095, + 0x790: 0x2231, 0x791: 0x223d, + 0x792: 0x22f1, 0x793: 0x2219, 0x794: 0x229d, 0x795: 0x2225, 0x796: 0x22a3, 0x797: 0x22bb, + 0x798: 0x22c7, 0x799: 0x222b, 0x79a: 0x22cd, 0x79b: 0x2237, 0x79c: 0x22c1, 0x79d: 0x22d3, + 0x79e: 0x22d9, 0x79f: 0x1cbf, 0x7a0: 0x0053, 0x7a1: 0x195a, 0x7a2: 0x1ba7, 0x7a3: 0x1963, + 0x7a4: 0x006d, 0x7a5: 0x19ae, 0x7a6: 0x1bd3, 0x7a7: 0x1d4b, 0x7a8: 0x1966, 0x7a9: 0x0071, + 0x7aa: 0x19ba, 0x7ab: 0x1bd7, 0x7ac: 0x0059, 0x7ad: 0x0047, 0x7ae: 0x0049, 0x7af: 0x005b, + 0x7b0: 0x0093, 0x7b1: 0x19e7, 0x7b2: 0x1c1b, 0x7b3: 0x19f0, 0x7b4: 0x00ad, 0x7b5: 0x1a65, + 0x7b6: 0x1c4f, 0x7b7: 0x1d5f, 0x7b8: 0x19f3, 0x7b9: 0x00b1, 0x7ba: 0x1a68, 0x7bb: 0x1c53, + 0x7bc: 0x0099, 0x7bd: 0x0087, 0x7be: 0x0089, 0x7bf: 0x009b, + // Block 0x1f, offset 0x7c0 + 0x7c1: 0x3c09, 0x7c3: 0xa000, 0x7c4: 0x3c10, 0x7c5: 0xa000, + 0x7c7: 0x3c17, 0x7c8: 0xa000, 0x7c9: 0x3c1e, + 0x7cd: 0xa000, + 0x7e0: 0x2f68, 0x7e1: 0xa000, 0x7e2: 0x3c2c, + 0x7e4: 0xa000, 0x7e5: 0xa000, + 0x7ed: 0x3c25, 0x7ee: 0x2f63, 0x7ef: 0x2f6d, + 0x7f0: 0x3c33, 0x7f1: 0x3c3a, 0x7f2: 0xa000, 0x7f3: 0xa000, 0x7f4: 0x3c41, 0x7f5: 0x3c48, + 0x7f6: 0xa000, 0x7f7: 0xa000, 0x7f8: 0x3c4f, 0x7f9: 0x3c56, 0x7fa: 0xa000, 0x7fb: 0xa000, + 0x7fc: 0xa000, 0x7fd: 0xa000, + // Block 0x20, offset 0x800 + 0x800: 0x3c5d, 0x801: 0x3c64, 0x802: 0xa000, 0x803: 0xa000, 0x804: 0x3c79, 0x805: 0x3c80, + 0x806: 0xa000, 0x807: 0xa000, 0x808: 0x3c87, 0x809: 0x3c8e, + 0x811: 0xa000, + 0x812: 0xa000, + 0x822: 0xa000, + 0x828: 0xa000, 0x829: 0xa000, + 0x82b: 0xa000, 0x82c: 0x3ca3, 0x82d: 0x3caa, 0x82e: 0x3cb1, 0x82f: 0x3cb8, + 0x832: 0xa000, 0x833: 0xa000, 0x834: 0xa000, 0x835: 0xa000, + // Block 0x21, offset 0x840 + 0x860: 0x0023, 0x861: 0x0025, 0x862: 0x0027, 0x863: 0x0029, + 0x864: 0x002b, 0x865: 0x002d, 0x866: 0x002f, 0x867: 0x0031, 0x868: 0x0033, 0x869: 0x1882, + 0x86a: 0x1885, 0x86b: 0x1888, 0x86c: 0x188b, 0x86d: 0x188e, 0x86e: 0x1891, 0x86f: 0x1894, + 0x870: 0x1897, 0x871: 0x189a, 0x872: 0x189d, 0x873: 0x18a6, 0x874: 0x1a6b, 0x875: 0x1a6f, + 0x876: 0x1a73, 0x877: 0x1a77, 0x878: 0x1a7b, 0x879: 0x1a7f, 0x87a: 0x1a83, 0x87b: 0x1a87, + 0x87c: 0x1a8b, 0x87d: 0x1c83, 0x87e: 0x1c88, 0x87f: 0x1c8d, + // Block 0x22, offset 0x880 + 0x880: 0x1c92, 0x881: 0x1c97, 0x882: 0x1c9c, 0x883: 0x1ca1, 0x884: 0x1ca6, 0x885: 0x1cab, + 0x886: 0x1cb0, 0x887: 0x1cb5, 0x888: 0x187f, 0x889: 0x18a3, 0x88a: 0x18c7, 0x88b: 0x18eb, + 0x88c: 0x190f, 0x88d: 0x1918, 0x88e: 0x191e, 0x88f: 0x1924, 0x890: 0x192a, 0x891: 0x1b63, + 0x892: 0x1b67, 0x893: 0x1b6b, 0x894: 0x1b6f, 0x895: 0x1b73, 0x896: 0x1b77, 0x897: 0x1b7b, + 0x898: 0x1b7f, 0x899: 0x1b83, 0x89a: 0x1b87, 0x89b: 0x1b8b, 0x89c: 0x1af7, 0x89d: 0x1afb, + 0x89e: 0x1aff, 0x89f: 0x1b03, 0x8a0: 0x1b07, 0x8a1: 0x1b0b, 0x8a2: 0x1b0f, 0x8a3: 0x1b13, + 0x8a4: 0x1b17, 0x8a5: 0x1b1b, 0x8a6: 0x1b1f, 0x8a7: 0x1b23, 0x8a8: 0x1b27, 0x8a9: 0x1b2b, + 0x8aa: 0x1b2f, 0x8ab: 0x1b33, 0x8ac: 0x1b37, 0x8ad: 0x1b3b, 0x8ae: 0x1b3f, 0x8af: 0x1b43, + 0x8b0: 0x1b47, 0x8b1: 0x1b4b, 0x8b2: 0x1b4f, 0x8b3: 0x1b53, 0x8b4: 0x1b57, 0x8b5: 0x1b5b, + 0x8b6: 0x0043, 0x8b7: 0x0045, 0x8b8: 0x0047, 0x8b9: 0x0049, 0x8ba: 0x004b, 0x8bb: 0x004d, + 0x8bc: 0x004f, 0x8bd: 0x0051, 0x8be: 0x0053, 0x8bf: 0x0055, + // Block 0x23, offset 0x8c0 + 0x8c0: 0x06bf, 0x8c1: 0x06e3, 0x8c2: 0x06ef, 0x8c3: 0x06ff, 0x8c4: 0x0707, 0x8c5: 0x0713, + 0x8c6: 0x071b, 0x8c7: 0x0723, 0x8c8: 0x072f, 0x8c9: 0x0783, 0x8ca: 0x079b, 0x8cb: 0x07ab, + 0x8cc: 0x07bb, 0x8cd: 0x07cb, 0x8ce: 0x07db, 0x8cf: 0x07fb, 0x8d0: 0x07ff, 0x8d1: 0x0803, + 0x8d2: 0x0837, 0x8d3: 0x085f, 0x8d4: 0x086f, 0x8d5: 0x0877, 0x8d6: 0x087b, 0x8d7: 0x0887, + 0x8d8: 0x08a3, 0x8d9: 0x08a7, 0x8da: 0x08bf, 0x8db: 0x08c3, 0x8dc: 0x08cb, 0x8dd: 0x08db, + 0x8de: 0x0977, 0x8df: 0x098b, 0x8e0: 0x09cb, 0x8e1: 0x09df, 0x8e2: 0x09e7, 0x8e3: 0x09eb, + 0x8e4: 0x09fb, 0x8e5: 0x0a17, 0x8e6: 0x0a43, 0x8e7: 0x0a4f, 0x8e8: 0x0a6f, 0x8e9: 0x0a7b, + 0x8ea: 0x0a7f, 0x8eb: 0x0a83, 0x8ec: 0x0a9b, 0x8ed: 0x0a9f, 0x8ee: 0x0acb, 0x8ef: 0x0ad7, + 0x8f0: 0x0adf, 0x8f1: 0x0ae7, 0x8f2: 0x0af7, 0x8f3: 0x0aff, 0x8f4: 0x0b07, 0x8f5: 0x0b33, + 0x8f6: 0x0b37, 0x8f7: 0x0b3f, 0x8f8: 0x0b43, 0x8f9: 0x0b4b, 0x8fa: 0x0b53, 0x8fb: 0x0b63, + 0x8fc: 0x0b7f, 0x8fd: 0x0bf7, 0x8fe: 0x0c0b, 0x8ff: 0x0c0f, + // Block 0x24, offset 0x900 + 0x900: 0x0c8f, 0x901: 0x0c93, 0x902: 0x0ca7, 0x903: 0x0cab, 0x904: 0x0cb3, 0x905: 0x0cbb, + 0x906: 0x0cc3, 0x907: 0x0ccf, 0x908: 0x0cf7, 0x909: 0x0d07, 0x90a: 0x0d1b, 0x90b: 0x0d8b, + 0x90c: 0x0d97, 0x90d: 0x0da7, 0x90e: 0x0db3, 0x90f: 0x0dbf, 0x910: 0x0dc7, 0x911: 0x0dcb, + 0x912: 0x0dcf, 0x913: 0x0dd3, 0x914: 0x0dd7, 0x915: 0x0e8f, 0x916: 0x0ed7, 0x917: 0x0ee3, + 0x918: 0x0ee7, 0x919: 0x0eeb, 0x91a: 0x0eef, 0x91b: 0x0ef7, 0x91c: 0x0efb, 0x91d: 0x0f0f, + 0x91e: 0x0f2b, 0x91f: 0x0f33, 0x920: 0x0f73, 0x921: 0x0f77, 0x922: 0x0f7f, 0x923: 0x0f83, + 0x924: 0x0f8b, 0x925: 0x0f8f, 0x926: 0x0fb3, 0x927: 0x0fb7, 0x928: 0x0fd3, 0x929: 0x0fd7, + 0x92a: 0x0fdb, 0x92b: 0x0fdf, 0x92c: 0x0ff3, 0x92d: 0x1017, 0x92e: 0x101b, 0x92f: 0x101f, + 0x930: 0x1043, 0x931: 0x1083, 0x932: 0x1087, 0x933: 0x10a7, 0x934: 0x10b7, 0x935: 0x10bf, + 0x936: 0x10df, 0x937: 0x1103, 0x938: 0x1147, 0x939: 0x114f, 0x93a: 0x1163, 0x93b: 0x116f, + 0x93c: 0x1177, 0x93d: 0x117f, 0x93e: 0x1183, 0x93f: 0x1187, + // Block 0x25, offset 0x940 + 0x940: 0x119f, 0x941: 0x11a3, 0x942: 0x11bf, 0x943: 0x11c7, 0x944: 0x11cf, 0x945: 0x11d3, + 0x946: 0x11df, 0x947: 0x11e7, 0x948: 0x11eb, 0x949: 0x11ef, 0x94a: 0x11f7, 0x94b: 0x11fb, + 0x94c: 0x129b, 0x94d: 0x12af, 0x94e: 0x12e3, 0x94f: 0x12e7, 0x950: 0x12ef, 0x951: 0x131b, + 0x952: 0x1323, 0x953: 0x132b, 0x954: 0x1333, 0x955: 0x136f, 0x956: 0x1373, 0x957: 0x137b, + 0x958: 0x137f, 0x959: 0x1383, 0x95a: 0x13af, 0x95b: 0x13b3, 0x95c: 0x13bb, 0x95d: 0x13cf, + 0x95e: 0x13d3, 0x95f: 0x13ef, 0x960: 0x13f7, 0x961: 0x13fb, 0x962: 0x141f, 0x963: 0x143f, + 0x964: 0x1453, 0x965: 0x1457, 0x966: 0x145f, 0x967: 0x148b, 0x968: 0x148f, 0x969: 0x149f, + 0x96a: 0x14c3, 0x96b: 0x14cf, 0x96c: 0x14df, 0x96d: 0x14f7, 0x96e: 0x14ff, 0x96f: 0x1503, + 0x970: 0x1507, 0x971: 0x150b, 0x972: 0x1517, 0x973: 0x151b, 0x974: 0x1523, 0x975: 0x153f, + 0x976: 0x1543, 0x977: 0x1547, 0x978: 0x155f, 0x979: 0x1563, 0x97a: 0x156b, 0x97b: 0x157f, + 0x97c: 0x1583, 0x97d: 0x1587, 0x97e: 0x158f, 0x97f: 0x1593, + // Block 0x26, offset 0x980 + 0x986: 0xa000, 0x98b: 0xa000, + 0x98c: 0x3f0b, 0x98d: 0xa000, 0x98e: 0x3f13, 0x98f: 0xa000, 0x990: 0x3f1b, 0x991: 0xa000, + 0x992: 0x3f23, 0x993: 0xa000, 0x994: 0x3f2b, 0x995: 0xa000, 0x996: 0x3f33, 0x997: 0xa000, + 0x998: 0x3f3b, 0x999: 0xa000, 0x99a: 0x3f43, 0x99b: 0xa000, 0x99c: 0x3f4b, 0x99d: 0xa000, + 0x99e: 0x3f53, 0x99f: 0xa000, 0x9a0: 0x3f5b, 0x9a1: 0xa000, 0x9a2: 0x3f63, + 0x9a4: 0xa000, 0x9a5: 0x3f6b, 0x9a6: 0xa000, 0x9a7: 0x3f73, 0x9a8: 0xa000, 0x9a9: 0x3f7b, + 0x9af: 0xa000, + 0x9b0: 0x3f83, 0x9b1: 0x3f8b, 0x9b2: 0xa000, 0x9b3: 0x3f93, 0x9b4: 0x3f9b, 0x9b5: 0xa000, + 0x9b6: 0x3fa3, 0x9b7: 0x3fab, 0x9b8: 0xa000, 0x9b9: 0x3fb3, 0x9ba: 0x3fbb, 0x9bb: 0xa000, + 0x9bc: 0x3fc3, 0x9bd: 0x3fcb, + // Block 0x27, offset 0x9c0 + 0x9d4: 0x3f03, + 0x9d9: 0x9903, 0x9da: 0x9903, 0x9db: 0x42df, 0x9dc: 0x42e5, 0x9dd: 0xa000, + 0x9de: 0x3fd3, 0x9df: 0x26b7, + 0x9e6: 0xa000, + 0x9eb: 0xa000, 0x9ec: 0x3fe3, 0x9ed: 0xa000, 0x9ee: 0x3feb, 0x9ef: 0xa000, + 0x9f0: 0x3ff3, 0x9f1: 0xa000, 0x9f2: 0x3ffb, 0x9f3: 0xa000, 0x9f4: 0x4003, 0x9f5: 0xa000, + 0x9f6: 0x400b, 0x9f7: 0xa000, 0x9f8: 0x4013, 0x9f9: 0xa000, 0x9fa: 0x401b, 0x9fb: 0xa000, + 0x9fc: 0x4023, 0x9fd: 0xa000, 0x9fe: 0x402b, 0x9ff: 0xa000, + // Block 0x28, offset 0xa00 + 0xa00: 0x4033, 0xa01: 0xa000, 0xa02: 0x403b, 0xa04: 0xa000, 0xa05: 0x4043, + 0xa06: 0xa000, 0xa07: 0x404b, 0xa08: 0xa000, 0xa09: 0x4053, + 0xa0f: 0xa000, 0xa10: 0x405b, 0xa11: 0x4063, + 0xa12: 0xa000, 0xa13: 0x406b, 0xa14: 0x4073, 0xa15: 0xa000, 0xa16: 0x407b, 0xa17: 0x4083, + 0xa18: 0xa000, 0xa19: 0x408b, 0xa1a: 0x4093, 0xa1b: 0xa000, 0xa1c: 0x409b, 0xa1d: 0x40a3, + 0xa2f: 0xa000, + 0xa30: 0xa000, 0xa31: 0xa000, 0xa32: 0xa000, 0xa34: 0x3fdb, + 0xa37: 0x40ab, 0xa38: 0x40b3, 0xa39: 0x40bb, 0xa3a: 0x40c3, + 0xa3d: 0xa000, 0xa3e: 0x40cb, 0xa3f: 0x26cc, + // Block 0x29, offset 0xa40 + 0xa40: 0x0367, 0xa41: 0x032b, 0xa42: 0x032f, 0xa43: 0x0333, 0xa44: 0x037b, 0xa45: 0x0337, + 0xa46: 0x033b, 0xa47: 0x033f, 0xa48: 0x0343, 0xa49: 0x0347, 0xa4a: 0x034b, 0xa4b: 0x034f, + 0xa4c: 0x0353, 0xa4d: 0x0357, 0xa4e: 0x035b, 0xa4f: 0x49c0, 0xa50: 0x49c6, 0xa51: 0x49cc, + 0xa52: 0x49d2, 0xa53: 0x49d8, 0xa54: 0x49de, 0xa55: 0x49e4, 0xa56: 0x49ea, 0xa57: 0x49f0, + 0xa58: 0x49f6, 0xa59: 0x49fc, 0xa5a: 0x4a02, 0xa5b: 0x4a08, 0xa5c: 0x4a0e, 0xa5d: 0x4a14, + 0xa5e: 0x4a1a, 0xa5f: 0x4a20, 0xa60: 0x4a26, 0xa61: 0x4a2c, 0xa62: 0x4a32, 0xa63: 0x4a38, + 0xa64: 0x03c3, 0xa65: 0x035f, 0xa66: 0x0363, 0xa67: 0x03e7, 0xa68: 0x03eb, 0xa69: 0x03ef, + 0xa6a: 0x03f3, 0xa6b: 0x03f7, 0xa6c: 0x03fb, 0xa6d: 0x03ff, 0xa6e: 0x036b, 0xa6f: 0x0403, + 0xa70: 0x0407, 0xa71: 0x036f, 0xa72: 0x0373, 0xa73: 0x0377, 0xa74: 0x037f, 0xa75: 0x0383, + 0xa76: 0x0387, 0xa77: 0x038b, 0xa78: 0x038f, 0xa79: 0x0393, 0xa7a: 0x0397, 0xa7b: 0x039b, + 0xa7c: 0x039f, 0xa7d: 0x03a3, 0xa7e: 0x03a7, 0xa7f: 0x03ab, + // Block 0x2a, offset 0xa80 + 0xa80: 0x03af, 0xa81: 0x03b3, 0xa82: 0x040b, 0xa83: 0x040f, 0xa84: 0x03b7, 0xa85: 0x03bb, + 0xa86: 0x03bf, 0xa87: 0x03c7, 0xa88: 0x03cb, 0xa89: 0x03cf, 0xa8a: 0x03d3, 0xa8b: 0x03d7, + 0xa8c: 0x03db, 0xa8d: 0x03df, 0xa8e: 0x03e3, + 0xa92: 0x06bf, 0xa93: 0x071b, 0xa94: 0x06cb, 0xa95: 0x097b, 0xa96: 0x06cf, 0xa97: 0x06e7, + 0xa98: 0x06d3, 0xa99: 0x0f93, 0xa9a: 0x0707, 0xa9b: 0x06db, 0xa9c: 0x06c3, 0xa9d: 0x09ff, + 0xa9e: 0x098f, 0xa9f: 0x072f, + // Block 0x2b, offset 0xac0 + 0xac0: 0x2057, 0xac1: 0x205d, 0xac2: 0x2063, 0xac3: 0x2069, 0xac4: 0x206f, 0xac5: 0x2075, + 0xac6: 0x207b, 0xac7: 0x2081, 0xac8: 0x2087, 0xac9: 0x208d, 0xaca: 0x2093, 0xacb: 0x2099, + 0xacc: 0x209f, 0xacd: 0x20a5, 0xace: 0x2729, 0xacf: 0x2732, 0xad0: 0x273b, 0xad1: 0x2744, + 0xad2: 0x274d, 0xad3: 0x2756, 0xad4: 0x275f, 0xad5: 0x2768, 0xad6: 0x2771, 0xad7: 0x2783, + 0xad8: 0x278c, 0xad9: 0x2795, 0xada: 0x279e, 0xadb: 0x27a7, 0xadc: 0x277a, 0xadd: 0x2baf, + 0xade: 0x2af0, 0xae0: 0x20ab, 0xae1: 0x20c3, 0xae2: 0x20b7, 0xae3: 0x210b, + 0xae4: 0x20c9, 0xae5: 0x20e7, 0xae6: 0x20b1, 0xae7: 0x20e1, 0xae8: 0x20bd, 0xae9: 0x20f3, + 0xaea: 0x2123, 0xaeb: 0x2141, 0xaec: 0x213b, 0xaed: 0x212f, 0xaee: 0x217d, 0xaef: 0x2111, + 0xaf0: 0x211d, 0xaf1: 0x2135, 0xaf2: 0x2129, 0xaf3: 0x2153, 0xaf4: 0x20ff, 0xaf5: 0x2147, + 0xaf6: 0x2171, 0xaf7: 0x2159, 0xaf8: 0x20ed, 0xaf9: 0x20cf, 0xafa: 0x2105, 0xafb: 0x2117, + 0xafc: 0x214d, 0xafd: 0x20d5, 0xafe: 0x2177, 0xaff: 0x20f9, + // Block 0x2c, offset 0xb00 + 0xb00: 0x215f, 0xb01: 0x20db, 0xb02: 0x2165, 0xb03: 0x216b, 0xb04: 0x092f, 0xb05: 0x0b03, + 0xb06: 0x0ca7, 0xb07: 0x10c7, + 0xb10: 0x1bc7, 0xb11: 0x18a9, + 0xb12: 0x18ac, 0xb13: 0x18af, 0xb14: 0x18b2, 0xb15: 0x18b5, 0xb16: 0x18b8, 0xb17: 0x18bb, + 0xb18: 0x18be, 0xb19: 0x18c1, 0xb1a: 0x18ca, 0xb1b: 0x18cd, 0xb1c: 0x18d0, 0xb1d: 0x18d3, + 0xb1e: 0x18d6, 0xb1f: 0x18d9, 0xb20: 0x0313, 0xb21: 0x031b, 0xb22: 0x031f, 0xb23: 0x0327, + 0xb24: 0x032b, 0xb25: 0x032f, 0xb26: 0x0337, 0xb27: 0x033f, 0xb28: 0x0343, 0xb29: 0x034b, + 0xb2a: 0x034f, 0xb2b: 0x0353, 0xb2c: 0x0357, 0xb2d: 0x035b, 0xb2e: 0x2e1b, 0xb2f: 0x2e23, + 0xb30: 0x2e2b, 0xb31: 0x2e33, 0xb32: 0x2e3b, 0xb33: 0x2e43, 0xb34: 0x2e4b, 0xb35: 0x2e53, + 0xb36: 0x2e63, 0xb37: 0x2e6b, 0xb38: 0x2e73, 0xb39: 0x2e7b, 0xb3a: 0x2e83, 0xb3b: 0x2e8b, + 0xb3c: 0x2ed6, 0xb3d: 0x2e9e, 0xb3e: 0x2e5b, + // Block 0x2d, offset 0xb40 + 0xb40: 0x06bf, 0xb41: 0x071b, 0xb42: 0x06cb, 0xb43: 0x097b, 0xb44: 0x071f, 0xb45: 0x07af, + 0xb46: 0x06c7, 0xb47: 0x07ab, 0xb48: 0x070b, 0xb49: 0x0887, 0xb4a: 0x0d07, 0xb4b: 0x0e8f, + 0xb4c: 0x0dd7, 0xb4d: 0x0d1b, 0xb4e: 0x145f, 0xb4f: 0x098b, 0xb50: 0x0ccf, 0xb51: 0x0d4b, + 0xb52: 0x0d0b, 0xb53: 0x104b, 0xb54: 0x08fb, 0xb55: 0x0f03, 0xb56: 0x1387, 0xb57: 0x105f, + 0xb58: 0x0843, 0xb59: 0x108f, 0xb5a: 0x0f9b, 0xb5b: 0x0a17, 0xb5c: 0x140f, 0xb5d: 0x077f, + 0xb5e: 0x08ab, 0xb5f: 0x0df7, 0xb60: 0x1527, 0xb61: 0x0743, 0xb62: 0x07d3, 0xb63: 0x0d9b, + 0xb64: 0x06cf, 0xb65: 0x06e7, 0xb66: 0x06d3, 0xb67: 0x0adb, 0xb68: 0x08ef, 0xb69: 0x087f, + 0xb6a: 0x0a57, 0xb6b: 0x0a4b, 0xb6c: 0x0feb, 0xb6d: 0x073f, 0xb6e: 0x139b, 0xb6f: 0x089b, + 0xb70: 0x09f3, 0xb71: 0x18dc, 0xb72: 0x18df, 0xb73: 0x18e2, 0xb74: 0x18e5, 0xb75: 0x18ee, + 0xb76: 0x18f1, 0xb77: 0x18f4, 0xb78: 0x18f7, 0xb79: 0x18fa, 0xb7a: 0x18fd, 0xb7b: 0x1900, + 0xb7c: 0x1903, 0xb7d: 0x1906, 0xb7e: 0x1909, 0xb7f: 0x1912, + // Block 0x2e, offset 0xb80 + 0xb80: 0x1cc9, 0xb81: 0x1cd8, 0xb82: 0x1ce7, 0xb83: 0x1cf6, 0xb84: 0x1d05, 0xb85: 0x1d14, + 0xb86: 0x1d23, 0xb87: 0x1d32, 0xb88: 0x1d41, 0xb89: 0x218f, 0xb8a: 0x21a1, 0xb8b: 0x21b3, + 0xb8c: 0x1954, 0xb8d: 0x1c07, 0xb8e: 0x19d5, 0xb8f: 0x1bab, 0xb90: 0x04cb, 0xb91: 0x04d3, + 0xb92: 0x04db, 0xb93: 0x04e3, 0xb94: 0x04eb, 0xb95: 0x04ef, 0xb96: 0x04f3, 0xb97: 0x04f7, + 0xb98: 0x04fb, 0xb99: 0x04ff, 0xb9a: 0x0503, 0xb9b: 0x0507, 0xb9c: 0x050b, 0xb9d: 0x050f, + 0xb9e: 0x0513, 0xb9f: 0x0517, 0xba0: 0x051b, 0xba1: 0x0523, 0xba2: 0x0527, 0xba3: 0x052b, + 0xba4: 0x052f, 0xba5: 0x0533, 0xba6: 0x0537, 0xba7: 0x053b, 0xba8: 0x053f, 0xba9: 0x0543, + 0xbaa: 0x0547, 0xbab: 0x054b, 0xbac: 0x054f, 0xbad: 0x0553, 0xbae: 0x0557, 0xbaf: 0x055b, + 0xbb0: 0x055f, 0xbb1: 0x0563, 0xbb2: 0x0567, 0xbb3: 0x056f, 0xbb4: 0x0577, 0xbb5: 0x057f, + 0xbb6: 0x0583, 0xbb7: 0x0587, 0xbb8: 0x058b, 0xbb9: 0x058f, 0xbba: 0x0593, 0xbbb: 0x0597, + 0xbbc: 0x059b, 0xbbd: 0x059f, 0xbbe: 0x05a3, + // Block 0x2f, offset 0xbc0 + 0xbc0: 0x2b0f, 0xbc1: 0x29ab, 0xbc2: 0x2b1f, 0xbc3: 0x2883, 0xbc4: 0x2ee7, 0xbc5: 0x288d, + 0xbc6: 0x2897, 0xbc7: 0x2f2b, 0xbc8: 0x29b8, 0xbc9: 0x28a1, 0xbca: 0x28ab, 0xbcb: 0x28b5, + 0xbcc: 0x29df, 0xbcd: 0x29ec, 0xbce: 0x29c5, 0xbcf: 0x29d2, 0xbd0: 0x2eac, 0xbd1: 0x29f9, + 0xbd2: 0x2a06, 0xbd3: 0x2bc1, 0xbd4: 0x26be, 0xbd5: 0x2bd4, 0xbd6: 0x2be7, 0xbd7: 0x2b2f, + 0xbd8: 0x2a13, 0xbd9: 0x2bfa, 0xbda: 0x2c0d, 0xbdb: 0x2a20, 0xbdc: 0x28bf, 0xbdd: 0x28c9, + 0xbde: 0x2eba, 0xbdf: 0x2a2d, 0xbe0: 0x2b3f, 0xbe1: 0x2ef8, 0xbe2: 0x28d3, 0xbe3: 0x28dd, + 0xbe4: 0x2a3a, 0xbe5: 0x28e7, 0xbe6: 0x28f1, 0xbe7: 0x26d3, 0xbe8: 0x26da, 0xbe9: 0x28fb, + 0xbea: 0x2905, 0xbeb: 0x2c20, 0xbec: 0x2a47, 0xbed: 0x2b4f, 0xbee: 0x2c33, 0xbef: 0x2a54, + 0xbf0: 0x2919, 0xbf1: 0x290f, 0xbf2: 0x2f3f, 0xbf3: 0x2a61, 0xbf4: 0x2c46, 0xbf5: 0x2923, + 0xbf6: 0x2b5f, 0xbf7: 0x292d, 0xbf8: 0x2a7b, 0xbf9: 0x2937, 0xbfa: 0x2a88, 0xbfb: 0x2f09, + 0xbfc: 0x2a6e, 0xbfd: 0x2b6f, 0xbfe: 0x2a95, 0xbff: 0x26e1, + // Block 0x30, offset 0xc00 + 0xc00: 0x2f1a, 0xc01: 0x2941, 0xc02: 0x294b, 0xc03: 0x2aa2, 0xc04: 0x2955, 0xc05: 0x295f, + 0xc06: 0x2969, 0xc07: 0x2b7f, 0xc08: 0x2aaf, 0xc09: 0x26e8, 0xc0a: 0x2c59, 0xc0b: 0x2e93, + 0xc0c: 0x2b8f, 0xc0d: 0x2abc, 0xc0e: 0x2ec8, 0xc0f: 0x2973, 0xc10: 0x297d, 0xc11: 0x2ac9, + 0xc12: 0x26ef, 0xc13: 0x2ad6, 0xc14: 0x2b9f, 0xc15: 0x26f6, 0xc16: 0x2c6c, 0xc17: 0x2987, + 0xc18: 0x1cba, 0xc19: 0x1cce, 0xc1a: 0x1cdd, 0xc1b: 0x1cec, 0xc1c: 0x1cfb, 0xc1d: 0x1d0a, + 0xc1e: 0x1d19, 0xc1f: 0x1d28, 0xc20: 0x1d37, 0xc21: 0x1d46, 0xc22: 0x2195, 0xc23: 0x21a7, + 0xc24: 0x21b9, 0xc25: 0x21c5, 0xc26: 0x21d1, 0xc27: 0x21dd, 0xc28: 0x21e9, 0xc29: 0x21f5, + 0xc2a: 0x2201, 0xc2b: 0x220d, 0xc2c: 0x2249, 0xc2d: 0x2255, 0xc2e: 0x2261, 0xc2f: 0x226d, + 0xc30: 0x2279, 0xc31: 0x1c17, 0xc32: 0x19c9, 0xc33: 0x1936, 0xc34: 0x1be7, 0xc35: 0x1a4a, + 0xc36: 0x1a59, 0xc37: 0x19cf, 0xc38: 0x1bff, 0xc39: 0x1c03, 0xc3a: 0x1960, 0xc3b: 0x2704, + 0xc3c: 0x2712, 0xc3d: 0x26fd, 0xc3e: 0x270b, 0xc3f: 0x2ae3, + // Block 0x31, offset 0xc40 + 0xc40: 0x1a4d, 0xc41: 0x1a35, 0xc42: 0x1c63, 0xc43: 0x1a1d, 0xc44: 0x19f6, 0xc45: 0x1969, + 0xc46: 0x1978, 0xc47: 0x1948, 0xc48: 0x1bf3, 0xc49: 0x1d55, 0xc4a: 0x1a50, 0xc4b: 0x1a38, + 0xc4c: 0x1c67, 0xc4d: 0x1c73, 0xc4e: 0x1a29, 0xc4f: 0x19ff, 0xc50: 0x1957, 0xc51: 0x1c1f, + 0xc52: 0x1bb3, 0xc53: 0x1b9f, 0xc54: 0x1bcf, 0xc55: 0x1c77, 0xc56: 0x1a2c, 0xc57: 0x19cc, + 0xc58: 0x1a02, 0xc59: 0x19e1, 0xc5a: 0x1a44, 0xc5b: 0x1c7b, 0xc5c: 0x1a2f, 0xc5d: 0x19c3, + 0xc5e: 0x1a05, 0xc5f: 0x1c3f, 0xc60: 0x1bf7, 0xc61: 0x1a17, 0xc62: 0x1c27, 0xc63: 0x1c43, + 0xc64: 0x1bfb, 0xc65: 0x1a1a, 0xc66: 0x1c2b, 0xc67: 0x22eb, 0xc68: 0x22ff, 0xc69: 0x1999, + 0xc6a: 0x1c23, 0xc6b: 0x1bb7, 0xc6c: 0x1ba3, 0xc6d: 0x1c4b, 0xc6e: 0x2719, 0xc6f: 0x27b0, + 0xc70: 0x1a5c, 0xc71: 0x1a47, 0xc72: 0x1c7f, 0xc73: 0x1a32, 0xc74: 0x1a53, 0xc75: 0x1a3b, + 0xc76: 0x1c6b, 0xc77: 0x1a20, 0xc78: 0x19f9, 0xc79: 0x1984, 0xc7a: 0x1a56, 0xc7b: 0x1a3e, + 0xc7c: 0x1c6f, 0xc7d: 0x1a23, 0xc7e: 0x19fc, 0xc7f: 0x1987, + // Block 0x32, offset 0xc80 + 0xc80: 0x1c2f, 0xc81: 0x1bbb, 0xc82: 0x1d50, 0xc83: 0x1939, 0xc84: 0x19bd, 0xc85: 0x19c0, + 0xc86: 0x22f8, 0xc87: 0x1b97, 0xc88: 0x19c6, 0xc89: 0x194b, 0xc8a: 0x19e4, 0xc8b: 0x194e, + 0xc8c: 0x19ed, 0xc8d: 0x196c, 0xc8e: 0x196f, 0xc8f: 0x1a08, 0xc90: 0x1a0e, 0xc91: 0x1a11, + 0xc92: 0x1c33, 0xc93: 0x1a14, 0xc94: 0x1a26, 0xc95: 0x1c3b, 0xc96: 0x1c47, 0xc97: 0x1993, + 0xc98: 0x1d5a, 0xc99: 0x1bbf, 0xc9a: 0x1996, 0xc9b: 0x1a5f, 0xc9c: 0x19a8, 0xc9d: 0x19b7, + 0xc9e: 0x22e5, 0xc9f: 0x22df, 0xca0: 0x1cc4, 0xca1: 0x1cd3, 0xca2: 0x1ce2, 0xca3: 0x1cf1, + 0xca4: 0x1d00, 0xca5: 0x1d0f, 0xca6: 0x1d1e, 0xca7: 0x1d2d, 0xca8: 0x1d3c, 0xca9: 0x2189, + 0xcaa: 0x219b, 0xcab: 0x21ad, 0xcac: 0x21bf, 0xcad: 0x21cb, 0xcae: 0x21d7, 0xcaf: 0x21e3, + 0xcb0: 0x21ef, 0xcb1: 0x21fb, 0xcb2: 0x2207, 0xcb3: 0x2243, 0xcb4: 0x224f, 0xcb5: 0x225b, + 0xcb6: 0x2267, 0xcb7: 0x2273, 0xcb8: 0x227f, 0xcb9: 0x2285, 0xcba: 0x228b, 0xcbb: 0x2291, + 0xcbc: 0x2297, 0xcbd: 0x22a9, 0xcbe: 0x22af, 0xcbf: 0x1c13, + // Block 0x33, offset 0xcc0 + 0xcc0: 0x1377, 0xcc1: 0x0cfb, 0xcc2: 0x13d3, 0xcc3: 0x139f, 0xcc4: 0x0e57, 0xcc5: 0x06eb, + 0xcc6: 0x08df, 0xcc7: 0x162b, 0xcc8: 0x162b, 0xcc9: 0x0a0b, 0xcca: 0x145f, 0xccb: 0x0943, + 0xccc: 0x0a07, 0xccd: 0x0bef, 0xcce: 0x0fcf, 0xccf: 0x115f, 0xcd0: 0x1297, 0xcd1: 0x12d3, + 0xcd2: 0x1307, 0xcd3: 0x141b, 0xcd4: 0x0d73, 0xcd5: 0x0dff, 0xcd6: 0x0eab, 0xcd7: 0x0f43, + 0xcd8: 0x125f, 0xcd9: 0x1447, 0xcda: 0x1573, 0xcdb: 0x070f, 0xcdc: 0x08b3, 0xcdd: 0x0d87, + 0xcde: 0x0ecf, 0xcdf: 0x1293, 0xce0: 0x15c3, 0xce1: 0x0ab3, 0xce2: 0x0e77, 0xce3: 0x1283, + 0xce4: 0x1317, 0xce5: 0x0c23, 0xce6: 0x11bb, 0xce7: 0x12df, 0xce8: 0x0b1f, 0xce9: 0x0d0f, + 0xcea: 0x0e17, 0xceb: 0x0f1b, 0xcec: 0x1427, 0xced: 0x074f, 0xcee: 0x07e7, 0xcef: 0x0853, + 0xcf0: 0x0c8b, 0xcf1: 0x0d7f, 0xcf2: 0x0ecb, 0xcf3: 0x0fef, 0xcf4: 0x1177, 0xcf5: 0x128b, + 0xcf6: 0x12a3, 0xcf7: 0x13c7, 0xcf8: 0x14ef, 0xcf9: 0x15a3, 0xcfa: 0x15bf, 0xcfb: 0x102b, + 0xcfc: 0x106b, 0xcfd: 0x1123, 0xcfe: 0x1243, 0xcff: 0x147b, + // Block 0x34, offset 0xd00 + 0xd00: 0x15cb, 0xd01: 0x134b, 0xd02: 0x09c7, 0xd03: 0x0b3b, 0xd04: 0x10db, 0xd05: 0x119b, + 0xd06: 0x0eff, 0xd07: 0x1033, 0xd08: 0x1397, 0xd09: 0x14e7, 0xd0a: 0x09c3, 0xd0b: 0x0a8f, + 0xd0c: 0x0d77, 0xd0d: 0x0e2b, 0xd0e: 0x0e5f, 0xd0f: 0x1113, 0xd10: 0x113b, 0xd11: 0x14a7, + 0xd12: 0x084f, 0xd13: 0x11a7, 0xd14: 0x07f3, 0xd15: 0x07ef, 0xd16: 0x1097, 0xd17: 0x1127, + 0xd18: 0x125b, 0xd19: 0x14af, 0xd1a: 0x1367, 0xd1b: 0x0c27, 0xd1c: 0x0d73, 0xd1d: 0x1357, + 0xd1e: 0x06f7, 0xd1f: 0x0a63, 0xd20: 0x0b93, 0xd21: 0x0f2f, 0xd22: 0x0faf, 0xd23: 0x0873, + 0xd24: 0x103b, 0xd25: 0x075f, 0xd26: 0x0b77, 0xd27: 0x06d7, 0xd28: 0x0deb, 0xd29: 0x0ca3, + 0xd2a: 0x110f, 0xd2b: 0x08c7, 0xd2c: 0x09b3, 0xd2d: 0x0ffb, 0xd2e: 0x1263, 0xd2f: 0x133b, + 0xd30: 0x0db7, 0xd31: 0x13f7, 0xd32: 0x0de3, 0xd33: 0x0c37, 0xd34: 0x121b, 0xd35: 0x0c57, + 0xd36: 0x0fab, 0xd37: 0x072b, 0xd38: 0x07a7, 0xd39: 0x07eb, 0xd3a: 0x0d53, 0xd3b: 0x10fb, + 0xd3c: 0x11f3, 0xd3d: 0x1347, 0xd3e: 0x145b, 0xd3f: 0x085b, + // Block 0x35, offset 0xd40 + 0xd40: 0x090f, 0xd41: 0x0a17, 0xd42: 0x0b2f, 0xd43: 0x0cbf, 0xd44: 0x0e7b, 0xd45: 0x103f, + 0xd46: 0x1497, 0xd47: 0x157b, 0xd48: 0x15cf, 0xd49: 0x15e7, 0xd4a: 0x0837, 0xd4b: 0x0cf3, + 0xd4c: 0x0da3, 0xd4d: 0x13eb, 0xd4e: 0x0afb, 0xd4f: 0x0bd7, 0xd50: 0x0bf3, 0xd51: 0x0c83, + 0xd52: 0x0e6b, 0xd53: 0x0eb7, 0xd54: 0x0f67, 0xd55: 0x108b, 0xd56: 0x112f, 0xd57: 0x1193, + 0xd58: 0x13db, 0xd59: 0x126b, 0xd5a: 0x1403, 0xd5b: 0x147f, 0xd5c: 0x080f, 0xd5d: 0x083b, + 0xd5e: 0x0923, 0xd5f: 0x0ea7, 0xd60: 0x12f3, 0xd61: 0x133b, 0xd62: 0x0b1b, 0xd63: 0x0b8b, + 0xd64: 0x0c4f, 0xd65: 0x0daf, 0xd66: 0x10d7, 0xd67: 0x0f23, 0xd68: 0x073b, 0xd69: 0x097f, + 0xd6a: 0x0a63, 0xd6b: 0x0ac7, 0xd6c: 0x0b97, 0xd6d: 0x0f3f, 0xd6e: 0x0f5b, 0xd6f: 0x116b, + 0xd70: 0x118b, 0xd71: 0x1463, 0xd72: 0x14e3, 0xd73: 0x14f3, 0xd74: 0x152f, 0xd75: 0x0753, + 0xd76: 0x107f, 0xd77: 0x144f, 0xd78: 0x14cb, 0xd79: 0x0baf, 0xd7a: 0x0717, 0xd7b: 0x0777, + 0xd7c: 0x0a67, 0xd7d: 0x0a87, 0xd7e: 0x0caf, 0xd7f: 0x0d73, + // Block 0x36, offset 0xd80 + 0xd80: 0x0ec3, 0xd81: 0x0fcb, 0xd82: 0x1277, 0xd83: 0x1417, 0xd84: 0x1623, 0xd85: 0x0ce3, + 0xd86: 0x14a3, 0xd87: 0x0833, 0xd88: 0x0d2f, 0xd89: 0x0d3b, 0xd8a: 0x0e0f, 0xd8b: 0x0e47, + 0xd8c: 0x0f4b, 0xd8d: 0x0fa7, 0xd8e: 0x1027, 0xd8f: 0x110b, 0xd90: 0x153b, 0xd91: 0x07af, + 0xd92: 0x0c03, 0xd93: 0x14b3, 0xd94: 0x0767, 0xd95: 0x0aab, 0xd96: 0x0e2f, 0xd97: 0x13df, + 0xd98: 0x0b67, 0xd99: 0x0bb7, 0xd9a: 0x0d43, 0xd9b: 0x0f2f, 0xd9c: 0x14bb, 0xd9d: 0x0817, + 0xd9e: 0x08ff, 0xd9f: 0x0a97, 0xda0: 0x0cd3, 0xda1: 0x0d1f, 0xda2: 0x0d5f, 0xda3: 0x0df3, + 0xda4: 0x0f47, 0xda5: 0x0fbb, 0xda6: 0x1157, 0xda7: 0x12f7, 0xda8: 0x1303, 0xda9: 0x1457, + 0xdaa: 0x14d7, 0xdab: 0x0883, 0xdac: 0x0e4b, 0xdad: 0x0903, 0xdae: 0x0ec7, 0xdaf: 0x0f6b, + 0xdb0: 0x1287, 0xdb1: 0x14bf, 0xdb2: 0x15ab, 0xdb3: 0x15d3, 0xdb4: 0x0d37, 0xdb5: 0x0e27, + 0xdb6: 0x11c3, 0xdb7: 0x10b7, 0xdb8: 0x10c3, 0xdb9: 0x10e7, 0xdba: 0x0f17, 0xdbb: 0x0e9f, + 0xdbc: 0x1363, 0xdbd: 0x0733, 0xdbe: 0x122b, 0xdbf: 0x081b, + // Block 0x37, offset 0xdc0 + 0xdc0: 0x080b, 0xdc1: 0x0b0b, 0xdc2: 0x0c2b, 0xdc3: 0x10f3, 0xdc4: 0x0a53, 0xdc5: 0x0e03, + 0xdc6: 0x0cef, 0xdc7: 0x13e7, 0xdc8: 0x12e7, 0xdc9: 0x14ab, 0xdca: 0x1323, 0xdcb: 0x0b27, + 0xdcc: 0x0787, 0xdcd: 0x095b, 0xdd0: 0x09af, + 0xdd2: 0x0cdf, 0xdd5: 0x07f7, 0xdd6: 0x0f1f, 0xdd7: 0x0fe3, + 0xdd8: 0x1047, 0xdd9: 0x1063, 0xdda: 0x1067, 0xddb: 0x107b, 0xddc: 0x14fb, 0xddd: 0x10eb, + 0xdde: 0x116f, 0xde0: 0x128f, 0xde2: 0x1353, + 0xde5: 0x1407, 0xde6: 0x1433, + 0xdea: 0x154f, 0xdeb: 0x1553, 0xdec: 0x1557, 0xded: 0x15bb, 0xdee: 0x142b, 0xdef: 0x14c7, + 0xdf0: 0x0757, 0xdf1: 0x077b, 0xdf2: 0x078f, 0xdf3: 0x084b, 0xdf4: 0x0857, 0xdf5: 0x0897, + 0xdf6: 0x094b, 0xdf7: 0x0967, 0xdf8: 0x096f, 0xdf9: 0x09ab, 0xdfa: 0x09b7, 0xdfb: 0x0a93, + 0xdfc: 0x0a9b, 0xdfd: 0x0ba3, 0xdfe: 0x0bcb, 0xdff: 0x0bd3, + // Block 0x38, offset 0xe00 + 0xe00: 0x0beb, 0xe01: 0x0c97, 0xe02: 0x0cc7, 0xe03: 0x0ce7, 0xe04: 0x0d57, 0xe05: 0x0e1b, + 0xe06: 0x0e37, 0xe07: 0x0e67, 0xe08: 0x0ebb, 0xe09: 0x0edb, 0xe0a: 0x0f4f, 0xe0b: 0x102f, + 0xe0c: 0x104b, 0xe0d: 0x1053, 0xe0e: 0x104f, 0xe0f: 0x1057, 0xe10: 0x105b, 0xe11: 0x105f, + 0xe12: 0x1073, 0xe13: 0x1077, 0xe14: 0x109b, 0xe15: 0x10af, 0xe16: 0x10cb, 0xe17: 0x112f, + 0xe18: 0x1137, 0xe19: 0x113f, 0xe1a: 0x1153, 0xe1b: 0x117b, 0xe1c: 0x11cb, 0xe1d: 0x11ff, + 0xe1e: 0x11ff, 0xe1f: 0x1267, 0xe20: 0x130f, 0xe21: 0x1327, 0xe22: 0x135b, 0xe23: 0x135f, + 0xe24: 0x13a3, 0xe25: 0x13a7, 0xe26: 0x13ff, 0xe27: 0x1407, 0xe28: 0x14db, 0xe29: 0x151f, + 0xe2a: 0x1537, 0xe2b: 0x0b9b, 0xe2c: 0x171e, 0xe2d: 0x11e3, + 0xe30: 0x06df, 0xe31: 0x07e3, 0xe32: 0x07a3, 0xe33: 0x074b, 0xe34: 0x078b, 0xe35: 0x07b7, + 0xe36: 0x0847, 0xe37: 0x0863, 0xe38: 0x094b, 0xe39: 0x0937, 0xe3a: 0x0947, 0xe3b: 0x0963, + 0xe3c: 0x09af, 0xe3d: 0x09bf, 0xe3e: 0x0a03, 0xe3f: 0x0a0f, + // Block 0x39, offset 0xe40 + 0xe40: 0x0a2b, 0xe41: 0x0a3b, 0xe42: 0x0b23, 0xe43: 0x0b2b, 0xe44: 0x0b5b, 0xe45: 0x0b7b, + 0xe46: 0x0bab, 0xe47: 0x0bc3, 0xe48: 0x0bb3, 0xe49: 0x0bd3, 0xe4a: 0x0bc7, 0xe4b: 0x0beb, + 0xe4c: 0x0c07, 0xe4d: 0x0c5f, 0xe4e: 0x0c6b, 0xe4f: 0x0c73, 0xe50: 0x0c9b, 0xe51: 0x0cdf, + 0xe52: 0x0d0f, 0xe53: 0x0d13, 0xe54: 0x0d27, 0xe55: 0x0da7, 0xe56: 0x0db7, 0xe57: 0x0e0f, + 0xe58: 0x0e5b, 0xe59: 0x0e53, 0xe5a: 0x0e67, 0xe5b: 0x0e83, 0xe5c: 0x0ebb, 0xe5d: 0x1013, + 0xe5e: 0x0edf, 0xe5f: 0x0f13, 0xe60: 0x0f1f, 0xe61: 0x0f5f, 0xe62: 0x0f7b, 0xe63: 0x0f9f, + 0xe64: 0x0fc3, 0xe65: 0x0fc7, 0xe66: 0x0fe3, 0xe67: 0x0fe7, 0xe68: 0x0ff7, 0xe69: 0x100b, + 0xe6a: 0x1007, 0xe6b: 0x1037, 0xe6c: 0x10b3, 0xe6d: 0x10cb, 0xe6e: 0x10e3, 0xe6f: 0x111b, + 0xe70: 0x112f, 0xe71: 0x114b, 0xe72: 0x117b, 0xe73: 0x122f, 0xe74: 0x1257, 0xe75: 0x12cb, + 0xe76: 0x1313, 0xe77: 0x131f, 0xe78: 0x1327, 0xe79: 0x133f, 0xe7a: 0x1353, 0xe7b: 0x1343, + 0xe7c: 0x135b, 0xe7d: 0x1357, 0xe7e: 0x134f, 0xe7f: 0x135f, + // Block 0x3a, offset 0xe80 + 0xe80: 0x136b, 0xe81: 0x13a7, 0xe82: 0x13e3, 0xe83: 0x1413, 0xe84: 0x144b, 0xe85: 0x146b, + 0xe86: 0x14b7, 0xe87: 0x14db, 0xe88: 0x14fb, 0xe89: 0x150f, 0xe8a: 0x151f, 0xe8b: 0x152b, + 0xe8c: 0x1537, 0xe8d: 0x158b, 0xe8e: 0x162b, 0xe8f: 0x16b5, 0xe90: 0x16b0, 0xe91: 0x16e2, + 0xe92: 0x0607, 0xe93: 0x062f, 0xe94: 0x0633, 0xe95: 0x1764, 0xe96: 0x1791, 0xe97: 0x1809, + 0xe98: 0x1617, 0xe99: 0x1627, + // Block 0x3b, offset 0xec0 + 0xec0: 0x19d8, 0xec1: 0x19db, 0xec2: 0x19de, 0xec3: 0x1c0b, 0xec4: 0x1c0f, 0xec5: 0x1a62, + 0xec6: 0x1a62, + 0xed3: 0x1d78, 0xed4: 0x1d69, 0xed5: 0x1d6e, 0xed6: 0x1d7d, 0xed7: 0x1d73, + 0xedd: 0x4393, + 0xede: 0x8115, 0xedf: 0x4405, 0xee0: 0x022d, 0xee1: 0x0215, 0xee2: 0x021e, 0xee3: 0x0221, + 0xee4: 0x0224, 0xee5: 0x0227, 0xee6: 0x022a, 0xee7: 0x0230, 0xee8: 0x0233, 0xee9: 0x0017, + 0xeea: 0x43f3, 0xeeb: 0x43f9, 0xeec: 0x44f7, 0xeed: 0x44ff, 0xeee: 0x434b, 0xeef: 0x4351, + 0xef0: 0x4357, 0xef1: 0x435d, 0xef2: 0x4369, 0xef3: 0x436f, 0xef4: 0x4375, 0xef5: 0x4381, + 0xef6: 0x4387, 0xef8: 0x438d, 0xef9: 0x4399, 0xefa: 0x439f, 0xefb: 0x43a5, + 0xefc: 0x43b1, 0xefe: 0x43b7, + // Block 0x3c, offset 0xf00 + 0xf00: 0x43bd, 0xf01: 0x43c3, 0xf03: 0x43c9, 0xf04: 0x43cf, + 0xf06: 0x43db, 0xf07: 0x43e1, 0xf08: 0x43e7, 0xf09: 0x43ed, 0xf0a: 0x43ff, 0xf0b: 0x437b, + 0xf0c: 0x4363, 0xf0d: 0x43ab, 0xf0e: 0x43d5, 0xf0f: 0x1d82, 0xf10: 0x0299, 0xf11: 0x0299, + 0xf12: 0x02a2, 0xf13: 0x02a2, 0xf14: 0x02a2, 0xf15: 0x02a2, 0xf16: 0x02a5, 0xf17: 0x02a5, + 0xf18: 0x02a5, 0xf19: 0x02a5, 0xf1a: 0x02ab, 0xf1b: 0x02ab, 0xf1c: 0x02ab, 0xf1d: 0x02ab, + 0xf1e: 0x029f, 0xf1f: 0x029f, 0xf20: 0x029f, 0xf21: 0x029f, 0xf22: 0x02a8, 0xf23: 0x02a8, + 0xf24: 0x02a8, 0xf25: 0x02a8, 0xf26: 0x029c, 0xf27: 0x029c, 0xf28: 0x029c, 0xf29: 0x029c, + 0xf2a: 0x02cf, 0xf2b: 0x02cf, 0xf2c: 0x02cf, 0xf2d: 0x02cf, 0xf2e: 0x02d2, 0xf2f: 0x02d2, + 0xf30: 0x02d2, 0xf31: 0x02d2, 0xf32: 0x02b1, 0xf33: 0x02b1, 0xf34: 0x02b1, 0xf35: 0x02b1, + 0xf36: 0x02ae, 0xf37: 0x02ae, 0xf38: 0x02ae, 0xf39: 0x02ae, 0xf3a: 0x02b4, 0xf3b: 0x02b4, + 0xf3c: 0x02b4, 0xf3d: 0x02b4, 0xf3e: 0x02b7, 0xf3f: 0x02b7, + // Block 0x3d, offset 0xf40 + 0xf40: 0x02b7, 0xf41: 0x02b7, 0xf42: 0x02c0, 0xf43: 0x02c0, 0xf44: 0x02bd, 0xf45: 0x02bd, + 0xf46: 0x02c3, 0xf47: 0x02c3, 0xf48: 0x02ba, 0xf49: 0x02ba, 0xf4a: 0x02c9, 0xf4b: 0x02c9, + 0xf4c: 0x02c6, 0xf4d: 0x02c6, 0xf4e: 0x02d5, 0xf4f: 0x02d5, 0xf50: 0x02d5, 0xf51: 0x02d5, + 0xf52: 0x02db, 0xf53: 0x02db, 0xf54: 0x02db, 0xf55: 0x02db, 0xf56: 0x02e1, 0xf57: 0x02e1, + 0xf58: 0x02e1, 0xf59: 0x02e1, 0xf5a: 0x02de, 0xf5b: 0x02de, 0xf5c: 0x02de, 0xf5d: 0x02de, + 0xf5e: 0x02e4, 0xf5f: 0x02e4, 0xf60: 0x02e7, 0xf61: 0x02e7, 0xf62: 0x02e7, 0xf63: 0x02e7, + 0xf64: 0x4471, 0xf65: 0x4471, 0xf66: 0x02ed, 0xf67: 0x02ed, 0xf68: 0x02ed, 0xf69: 0x02ed, + 0xf6a: 0x02ea, 0xf6b: 0x02ea, 0xf6c: 0x02ea, 0xf6d: 0x02ea, 0xf6e: 0x0308, 0xf6f: 0x0308, + 0xf70: 0x446b, 0xf71: 0x446b, + // Block 0x3e, offset 0xf80 + 0xf93: 0x02d8, 0xf94: 0x02d8, 0xf95: 0x02d8, 0xf96: 0x02d8, 0xf97: 0x02f6, + 0xf98: 0x02f6, 0xf99: 0x02f3, 0xf9a: 0x02f3, 0xf9b: 0x02f9, 0xf9c: 0x02f9, 0xf9d: 0x2052, + 0xf9e: 0x02ff, 0xf9f: 0x02ff, 0xfa0: 0x02f0, 0xfa1: 0x02f0, 0xfa2: 0x02fc, 0xfa3: 0x02fc, + 0xfa4: 0x0305, 0xfa5: 0x0305, 0xfa6: 0x0305, 0xfa7: 0x0305, 0xfa8: 0x028d, 0xfa9: 0x028d, + 0xfaa: 0x25ad, 0xfab: 0x25ad, 0xfac: 0x261d, 0xfad: 0x261d, 0xfae: 0x25ec, 0xfaf: 0x25ec, + 0xfb0: 0x2608, 0xfb1: 0x2608, 0xfb2: 0x2601, 0xfb3: 0x2601, 0xfb4: 0x260f, 0xfb5: 0x260f, + 0xfb6: 0x2616, 0xfb7: 0x2616, 0xfb8: 0x2616, 0xfb9: 0x25f3, 0xfba: 0x25f3, 0xfbb: 0x25f3, + 0xfbc: 0x0302, 0xfbd: 0x0302, 0xfbe: 0x0302, 0xfbf: 0x0302, + // Block 0x3f, offset 0xfc0 + 0xfc0: 0x25b4, 0xfc1: 0x25bb, 0xfc2: 0x25d7, 0xfc3: 0x25f3, 0xfc4: 0x25fa, 0xfc5: 0x1d8c, + 0xfc6: 0x1d91, 0xfc7: 0x1d96, 0xfc8: 0x1da5, 0xfc9: 0x1db4, 0xfca: 0x1db9, 0xfcb: 0x1dbe, + 0xfcc: 0x1dc3, 0xfcd: 0x1dc8, 0xfce: 0x1dd7, 0xfcf: 0x1de6, 0xfd0: 0x1deb, 0xfd1: 0x1df0, + 0xfd2: 0x1dff, 0xfd3: 0x1e0e, 0xfd4: 0x1e13, 0xfd5: 0x1e18, 0xfd6: 0x1e1d, 0xfd7: 0x1e2c, + 0xfd8: 0x1e31, 0xfd9: 0x1e40, 0xfda: 0x1e45, 0xfdb: 0x1e4a, 0xfdc: 0x1e59, 0xfdd: 0x1e5e, + 0xfde: 0x1e63, 0xfdf: 0x1e6d, 0xfe0: 0x1ea9, 0xfe1: 0x1eb8, 0xfe2: 0x1ec7, 0xfe3: 0x1ecc, + 0xfe4: 0x1ed1, 0xfe5: 0x1edb, 0xfe6: 0x1eea, 0xfe7: 0x1eef, 0xfe8: 0x1efe, 0xfe9: 0x1f03, + 0xfea: 0x1f08, 0xfeb: 0x1f17, 0xfec: 0x1f1c, 0xfed: 0x1f2b, 0xfee: 0x1f30, 0xfef: 0x1f35, + 0xff0: 0x1f3a, 0xff1: 0x1f3f, 0xff2: 0x1f44, 0xff3: 0x1f49, 0xff4: 0x1f4e, 0xff5: 0x1f53, + 0xff6: 0x1f58, 0xff7: 0x1f5d, 0xff8: 0x1f62, 0xff9: 0x1f67, 0xffa: 0x1f6c, 0xffb: 0x1f71, + 0xffc: 0x1f76, 0xffd: 0x1f7b, 0xffe: 0x1f80, 0xfff: 0x1f8a, + // Block 0x40, offset 0x1000 + 0x1000: 0x1f8f, 0x1001: 0x1f94, 0x1002: 0x1f99, 0x1003: 0x1fa3, 0x1004: 0x1fa8, 0x1005: 0x1fb2, + 0x1006: 0x1fb7, 0x1007: 0x1fbc, 0x1008: 0x1fc1, 0x1009: 0x1fc6, 0x100a: 0x1fcb, 0x100b: 0x1fd0, + 0x100c: 0x1fd5, 0x100d: 0x1fda, 0x100e: 0x1fe9, 0x100f: 0x1ff8, 0x1010: 0x1ffd, 0x1011: 0x2002, + 0x1012: 0x2007, 0x1013: 0x200c, 0x1014: 0x2011, 0x1015: 0x201b, 0x1016: 0x2020, 0x1017: 0x2025, + 0x1018: 0x2034, 0x1019: 0x2043, 0x101a: 0x2048, 0x101b: 0x4423, 0x101c: 0x4429, 0x101d: 0x445f, + 0x101e: 0x44b6, 0x101f: 0x44bd, 0x1020: 0x44c4, 0x1021: 0x44cb, 0x1022: 0x44d2, 0x1023: 0x44d9, + 0x1024: 0x25c9, 0x1025: 0x25d0, 0x1026: 0x25d7, 0x1027: 0x25de, 0x1028: 0x25f3, 0x1029: 0x25fa, + 0x102a: 0x1d9b, 0x102b: 0x1da0, 0x102c: 0x1da5, 0x102d: 0x1daa, 0x102e: 0x1db4, 0x102f: 0x1db9, + 0x1030: 0x1dcd, 0x1031: 0x1dd2, 0x1032: 0x1dd7, 0x1033: 0x1ddc, 0x1034: 0x1de6, 0x1035: 0x1deb, + 0x1036: 0x1df5, 0x1037: 0x1dfa, 0x1038: 0x1dff, 0x1039: 0x1e04, 0x103a: 0x1e0e, 0x103b: 0x1e13, + 0x103c: 0x1f3f, 0x103d: 0x1f44, 0x103e: 0x1f53, 0x103f: 0x1f58, + // Block 0x41, offset 0x1040 + 0x1040: 0x1f5d, 0x1041: 0x1f71, 0x1042: 0x1f76, 0x1043: 0x1f7b, 0x1044: 0x1f80, 0x1045: 0x1f99, + 0x1046: 0x1fa3, 0x1047: 0x1fa8, 0x1048: 0x1fad, 0x1049: 0x1fc1, 0x104a: 0x1fdf, 0x104b: 0x1fe4, + 0x104c: 0x1fe9, 0x104d: 0x1fee, 0x104e: 0x1ff8, 0x104f: 0x1ffd, 0x1050: 0x445f, 0x1051: 0x202a, + 0x1052: 0x202f, 0x1053: 0x2034, 0x1054: 0x2039, 0x1055: 0x2043, 0x1056: 0x2048, 0x1057: 0x25b4, + 0x1058: 0x25bb, 0x1059: 0x25c2, 0x105a: 0x25d7, 0x105b: 0x25e5, 0x105c: 0x1d8c, 0x105d: 0x1d91, + 0x105e: 0x1d96, 0x105f: 0x1da5, 0x1060: 0x1daf, 0x1061: 0x1dbe, 0x1062: 0x1dc3, 0x1063: 0x1dc8, + 0x1064: 0x1dd7, 0x1065: 0x1de1, 0x1066: 0x1dff, 0x1067: 0x1e18, 0x1068: 0x1e1d, 0x1069: 0x1e2c, + 0x106a: 0x1e31, 0x106b: 0x1e40, 0x106c: 0x1e4a, 0x106d: 0x1e59, 0x106e: 0x1e5e, 0x106f: 0x1e63, + 0x1070: 0x1e6d, 0x1071: 0x1ea9, 0x1072: 0x1eae, 0x1073: 0x1eb8, 0x1074: 0x1ec7, 0x1075: 0x1ecc, + 0x1076: 0x1ed1, 0x1077: 0x1edb, 0x1078: 0x1eea, 0x1079: 0x1efe, 0x107a: 0x1f03, 0x107b: 0x1f08, + 0x107c: 0x1f17, 0x107d: 0x1f1c, 0x107e: 0x1f2b, 0x107f: 0x1f30, + // Block 0x42, offset 0x1080 + 0x1080: 0x1f35, 0x1081: 0x1f3a, 0x1082: 0x1f49, 0x1083: 0x1f4e, 0x1084: 0x1f62, 0x1085: 0x1f67, + 0x1086: 0x1f6c, 0x1087: 0x1f71, 0x1088: 0x1f76, 0x1089: 0x1f8a, 0x108a: 0x1f8f, 0x108b: 0x1f94, + 0x108c: 0x1f99, 0x108d: 0x1f9e, 0x108e: 0x1fb2, 0x108f: 0x1fb7, 0x1090: 0x1fbc, 0x1091: 0x1fc1, + 0x1092: 0x1fd0, 0x1093: 0x1fd5, 0x1094: 0x1fda, 0x1095: 0x1fe9, 0x1096: 0x1ff3, 0x1097: 0x2002, + 0x1098: 0x2007, 0x1099: 0x4453, 0x109a: 0x201b, 0x109b: 0x2020, 0x109c: 0x2025, 0x109d: 0x2034, + 0x109e: 0x203e, 0x109f: 0x25d7, 0x10a0: 0x25e5, 0x10a1: 0x1da5, 0x10a2: 0x1daf, 0x10a3: 0x1dd7, + 0x10a4: 0x1de1, 0x10a5: 0x1dff, 0x10a6: 0x1e09, 0x10a7: 0x1e6d, 0x10a8: 0x1e72, 0x10a9: 0x1e95, + 0x10aa: 0x1e9a, 0x10ab: 0x1f71, 0x10ac: 0x1f76, 0x10ad: 0x1f99, 0x10ae: 0x1fe9, 0x10af: 0x1ff3, + 0x10b0: 0x2034, 0x10b1: 0x203e, 0x10b2: 0x4507, 0x10b3: 0x450f, 0x10b4: 0x4517, 0x10b5: 0x1ef4, + 0x10b6: 0x1ef9, 0x10b7: 0x1f0d, 0x10b8: 0x1f12, 0x10b9: 0x1f21, 0x10ba: 0x1f26, 0x10bb: 0x1e77, + 0x10bc: 0x1e7c, 0x10bd: 0x1e9f, 0x10be: 0x1ea4, 0x10bf: 0x1e36, + // Block 0x43, offset 0x10c0 + 0x10c0: 0x1e3b, 0x10c1: 0x1e22, 0x10c2: 0x1e27, 0x10c3: 0x1e4f, 0x10c4: 0x1e54, 0x10c5: 0x1ebd, + 0x10c6: 0x1ec2, 0x10c7: 0x1ee0, 0x10c8: 0x1ee5, 0x10c9: 0x1e81, 0x10ca: 0x1e86, 0x10cb: 0x1e8b, + 0x10cc: 0x1e95, 0x10cd: 0x1e90, 0x10ce: 0x1e68, 0x10cf: 0x1eb3, 0x10d0: 0x1ed6, 0x10d1: 0x1ef4, + 0x10d2: 0x1ef9, 0x10d3: 0x1f0d, 0x10d4: 0x1f12, 0x10d5: 0x1f21, 0x10d6: 0x1f26, 0x10d7: 0x1e77, + 0x10d8: 0x1e7c, 0x10d9: 0x1e9f, 0x10da: 0x1ea4, 0x10db: 0x1e36, 0x10dc: 0x1e3b, 0x10dd: 0x1e22, + 0x10de: 0x1e27, 0x10df: 0x1e4f, 0x10e0: 0x1e54, 0x10e1: 0x1ebd, 0x10e2: 0x1ec2, 0x10e3: 0x1ee0, + 0x10e4: 0x1ee5, 0x10e5: 0x1e81, 0x10e6: 0x1e86, 0x10e7: 0x1e8b, 0x10e8: 0x1e95, 0x10e9: 0x1e90, + 0x10ea: 0x1e68, 0x10eb: 0x1eb3, 0x10ec: 0x1ed6, 0x10ed: 0x1e81, 0x10ee: 0x1e86, 0x10ef: 0x1e8b, + 0x10f0: 0x1e95, 0x10f1: 0x1e72, 0x10f2: 0x1e9a, 0x10f3: 0x1eef, 0x10f4: 0x1e59, 0x10f5: 0x1e5e, + 0x10f6: 0x1e63, 0x10f7: 0x1e81, 0x10f8: 0x1e86, 0x10f9: 0x1e8b, 0x10fa: 0x1eef, 0x10fb: 0x1efe, + 0x10fc: 0x440b, 0x10fd: 0x440b, + // Block 0x44, offset 0x1100 + 0x1110: 0x2314, 0x1111: 0x2329, + 0x1112: 0x2329, 0x1113: 0x2330, 0x1114: 0x2337, 0x1115: 0x234c, 0x1116: 0x2353, 0x1117: 0x235a, + 0x1118: 0x237d, 0x1119: 0x237d, 0x111a: 0x23a0, 0x111b: 0x2399, 0x111c: 0x23b5, 0x111d: 0x23a7, + 0x111e: 0x23ae, 0x111f: 0x23d1, 0x1120: 0x23d1, 0x1121: 0x23ca, 0x1122: 0x23d8, 0x1123: 0x23d8, + 0x1124: 0x2402, 0x1125: 0x2402, 0x1126: 0x241e, 0x1127: 0x23e6, 0x1128: 0x23e6, 0x1129: 0x23df, + 0x112a: 0x23f4, 0x112b: 0x23f4, 0x112c: 0x23fb, 0x112d: 0x23fb, 0x112e: 0x2425, 0x112f: 0x2433, + 0x1130: 0x2433, 0x1131: 0x243a, 0x1132: 0x243a, 0x1133: 0x2441, 0x1134: 0x2448, 0x1135: 0x244f, + 0x1136: 0x2456, 0x1137: 0x2456, 0x1138: 0x245d, 0x1139: 0x246b, 0x113a: 0x2479, 0x113b: 0x2472, + 0x113c: 0x2480, 0x113d: 0x2480, 0x113e: 0x2495, 0x113f: 0x249c, + // Block 0x45, offset 0x1140 + 0x1140: 0x24cd, 0x1141: 0x24db, 0x1142: 0x24d4, 0x1143: 0x24b8, 0x1144: 0x24b8, 0x1145: 0x24e2, + 0x1146: 0x24e2, 0x1147: 0x24e9, 0x1148: 0x24e9, 0x1149: 0x2513, 0x114a: 0x251a, 0x114b: 0x2521, + 0x114c: 0x24f7, 0x114d: 0x2505, 0x114e: 0x2528, 0x114f: 0x252f, + 0x1152: 0x24fe, 0x1153: 0x2583, 0x1154: 0x258a, 0x1155: 0x2560, 0x1156: 0x2567, 0x1157: 0x254b, + 0x1158: 0x254b, 0x1159: 0x2552, 0x115a: 0x257c, 0x115b: 0x2575, 0x115c: 0x259f, 0x115d: 0x259f, + 0x115e: 0x230d, 0x115f: 0x2322, 0x1160: 0x231b, 0x1161: 0x2345, 0x1162: 0x233e, 0x1163: 0x2368, + 0x1164: 0x2361, 0x1165: 0x238b, 0x1166: 0x236f, 0x1167: 0x2384, 0x1168: 0x23bc, 0x1169: 0x2409, + 0x116a: 0x23ed, 0x116b: 0x242c, 0x116c: 0x24c6, 0x116d: 0x24f0, 0x116e: 0x2598, 0x116f: 0x2591, + 0x1170: 0x25a6, 0x1171: 0x253d, 0x1172: 0x24a3, 0x1173: 0x256e, 0x1174: 0x2495, 0x1175: 0x24cd, + 0x1176: 0x2464, 0x1177: 0x24b1, 0x1178: 0x2544, 0x1179: 0x2536, 0x117a: 0x24bf, 0x117b: 0x24aa, + 0x117c: 0x24bf, 0x117d: 0x2544, 0x117e: 0x2376, 0x117f: 0x2392, + // Block 0x46, offset 0x1180 + 0x1180: 0x250c, 0x1181: 0x2487, 0x1182: 0x2306, 0x1183: 0x24aa, 0x1184: 0x244f, 0x1185: 0x241e, + 0x1186: 0x23c3, 0x1187: 0x2559, + 0x11b0: 0x2417, 0x11b1: 0x248e, 0x11b2: 0x27c2, 0x11b3: 0x27b9, 0x11b4: 0x27ef, 0x11b5: 0x27dd, + 0x11b6: 0x27cb, 0x11b7: 0x27e6, 0x11b8: 0x27f8, 0x11b9: 0x2410, 0x11ba: 0x2c7f, 0x11bb: 0x2aff, + 0x11bc: 0x27d4, + // Block 0x47, offset 0x11c0 + 0x11d0: 0x0019, 0x11d1: 0x0483, + 0x11d2: 0x0487, 0x11d3: 0x0035, 0x11d4: 0x0037, 0x11d5: 0x0003, 0x11d6: 0x003f, 0x11d7: 0x04bf, + 0x11d8: 0x04c3, 0x11d9: 0x1b5f, + 0x11e0: 0x8132, 0x11e1: 0x8132, 0x11e2: 0x8132, 0x11e3: 0x8132, + 0x11e4: 0x8132, 0x11e5: 0x8132, 0x11e6: 0x8132, 0x11e7: 0x812d, 0x11e8: 0x812d, 0x11e9: 0x812d, + 0x11ea: 0x812d, 0x11eb: 0x812d, 0x11ec: 0x812d, 0x11ed: 0x812d, 0x11ee: 0x8132, 0x11ef: 0x8132, + 0x11f0: 0x1873, 0x11f1: 0x0443, 0x11f2: 0x043f, 0x11f3: 0x007f, 0x11f4: 0x007f, 0x11f5: 0x0011, + 0x11f6: 0x0013, 0x11f7: 0x00b7, 0x11f8: 0x00bb, 0x11f9: 0x04b7, 0x11fa: 0x04bb, 0x11fb: 0x04ab, + 0x11fc: 0x04af, 0x11fd: 0x0493, 0x11fe: 0x0497, 0x11ff: 0x048b, + // Block 0x48, offset 0x1200 + 0x1200: 0x048f, 0x1201: 0x049b, 0x1202: 0x049f, 0x1203: 0x04a3, 0x1204: 0x04a7, + 0x1207: 0x0077, 0x1208: 0x007b, 0x1209: 0x426c, 0x120a: 0x426c, 0x120b: 0x426c, + 0x120c: 0x426c, 0x120d: 0x007f, 0x120e: 0x007f, 0x120f: 0x007f, 0x1210: 0x0019, 0x1211: 0x0483, + 0x1212: 0x001d, 0x1214: 0x0037, 0x1215: 0x0035, 0x1216: 0x003f, 0x1217: 0x0003, + 0x1218: 0x0443, 0x1219: 0x0011, 0x121a: 0x0013, 0x121b: 0x00b7, 0x121c: 0x00bb, 0x121d: 0x04b7, + 0x121e: 0x04bb, 0x121f: 0x0007, 0x1220: 0x000d, 0x1221: 0x0015, 0x1222: 0x0017, 0x1223: 0x001b, + 0x1224: 0x0039, 0x1225: 0x003d, 0x1226: 0x003b, 0x1228: 0x0079, 0x1229: 0x0009, + 0x122a: 0x000b, 0x122b: 0x0041, + 0x1230: 0x42ad, 0x1231: 0x442f, 0x1232: 0x42b2, 0x1234: 0x42b7, + 0x1236: 0x42bc, 0x1237: 0x4435, 0x1238: 0x42c1, 0x1239: 0x443b, 0x123a: 0x42c6, 0x123b: 0x4441, + 0x123c: 0x42cb, 0x123d: 0x4447, 0x123e: 0x42d0, 0x123f: 0x444d, + // Block 0x49, offset 0x1240 + 0x1240: 0x0236, 0x1241: 0x4411, 0x1242: 0x4411, 0x1243: 0x4417, 0x1244: 0x4417, 0x1245: 0x4459, + 0x1246: 0x4459, 0x1247: 0x441d, 0x1248: 0x441d, 0x1249: 0x4465, 0x124a: 0x4465, 0x124b: 0x4465, + 0x124c: 0x4465, 0x124d: 0x0239, 0x124e: 0x0239, 0x124f: 0x023c, 0x1250: 0x023c, 0x1251: 0x023c, + 0x1252: 0x023c, 0x1253: 0x023f, 0x1254: 0x023f, 0x1255: 0x0242, 0x1256: 0x0242, 0x1257: 0x0242, + 0x1258: 0x0242, 0x1259: 0x0245, 0x125a: 0x0245, 0x125b: 0x0245, 0x125c: 0x0245, 0x125d: 0x0248, + 0x125e: 0x0248, 0x125f: 0x0248, 0x1260: 0x0248, 0x1261: 0x024b, 0x1262: 0x024b, 0x1263: 0x024b, + 0x1264: 0x024b, 0x1265: 0x024e, 0x1266: 0x024e, 0x1267: 0x024e, 0x1268: 0x024e, 0x1269: 0x0251, + 0x126a: 0x0251, 0x126b: 0x0254, 0x126c: 0x0254, 0x126d: 0x0257, 0x126e: 0x0257, 0x126f: 0x025a, + 0x1270: 0x025a, 0x1271: 0x025d, 0x1272: 0x025d, 0x1273: 0x025d, 0x1274: 0x025d, 0x1275: 0x0260, + 0x1276: 0x0260, 0x1277: 0x0260, 0x1278: 0x0260, 0x1279: 0x0263, 0x127a: 0x0263, 0x127b: 0x0263, + 0x127c: 0x0263, 0x127d: 0x0266, 0x127e: 0x0266, 0x127f: 0x0266, + // Block 0x4a, offset 0x1280 + 0x1280: 0x0266, 0x1281: 0x0269, 0x1282: 0x0269, 0x1283: 0x0269, 0x1284: 0x0269, 0x1285: 0x026c, + 0x1286: 0x026c, 0x1287: 0x026c, 0x1288: 0x026c, 0x1289: 0x026f, 0x128a: 0x026f, 0x128b: 0x026f, + 0x128c: 0x026f, 0x128d: 0x0272, 0x128e: 0x0272, 0x128f: 0x0272, 0x1290: 0x0272, 0x1291: 0x0275, + 0x1292: 0x0275, 0x1293: 0x0275, 0x1294: 0x0275, 0x1295: 0x0278, 0x1296: 0x0278, 0x1297: 0x0278, + 0x1298: 0x0278, 0x1299: 0x027b, 0x129a: 0x027b, 0x129b: 0x027b, 0x129c: 0x027b, 0x129d: 0x027e, + 0x129e: 0x027e, 0x129f: 0x027e, 0x12a0: 0x027e, 0x12a1: 0x0281, 0x12a2: 0x0281, 0x12a3: 0x0281, + 0x12a4: 0x0281, 0x12a5: 0x0284, 0x12a6: 0x0284, 0x12a7: 0x0284, 0x12a8: 0x0284, 0x12a9: 0x0287, + 0x12aa: 0x0287, 0x12ab: 0x0287, 0x12ac: 0x0287, 0x12ad: 0x028a, 0x12ae: 0x028a, 0x12af: 0x028d, + 0x12b0: 0x028d, 0x12b1: 0x0290, 0x12b2: 0x0290, 0x12b3: 0x0290, 0x12b4: 0x0290, 0x12b5: 0x2e03, + 0x12b6: 0x2e03, 0x12b7: 0x2e0b, 0x12b8: 0x2e0b, 0x12b9: 0x2e13, 0x12ba: 0x2e13, 0x12bb: 0x1f85, + 0x12bc: 0x1f85, + // Block 0x4b, offset 0x12c0 + 0x12c0: 0x0081, 0x12c1: 0x0083, 0x12c2: 0x0085, 0x12c3: 0x0087, 0x12c4: 0x0089, 0x12c5: 0x008b, + 0x12c6: 0x008d, 0x12c7: 0x008f, 0x12c8: 0x0091, 0x12c9: 0x0093, 0x12ca: 0x0095, 0x12cb: 0x0097, + 0x12cc: 0x0099, 0x12cd: 0x009b, 0x12ce: 0x009d, 0x12cf: 0x009f, 0x12d0: 0x00a1, 0x12d1: 0x00a3, + 0x12d2: 0x00a5, 0x12d3: 0x00a7, 0x12d4: 0x00a9, 0x12d5: 0x00ab, 0x12d6: 0x00ad, 0x12d7: 0x00af, + 0x12d8: 0x00b1, 0x12d9: 0x00b3, 0x12da: 0x00b5, 0x12db: 0x00b7, 0x12dc: 0x00b9, 0x12dd: 0x00bb, + 0x12de: 0x00bd, 0x12df: 0x0477, 0x12e0: 0x047b, 0x12e1: 0x0487, 0x12e2: 0x049b, 0x12e3: 0x049f, + 0x12e4: 0x0483, 0x12e5: 0x05ab, 0x12e6: 0x05a3, 0x12e7: 0x04c7, 0x12e8: 0x04cf, 0x12e9: 0x04d7, + 0x12ea: 0x04df, 0x12eb: 0x04e7, 0x12ec: 0x056b, 0x12ed: 0x0573, 0x12ee: 0x057b, 0x12ef: 0x051f, + 0x12f0: 0x05af, 0x12f1: 0x04cb, 0x12f2: 0x04d3, 0x12f3: 0x04db, 0x12f4: 0x04e3, 0x12f5: 0x04eb, + 0x12f6: 0x04ef, 0x12f7: 0x04f3, 0x12f8: 0x04f7, 0x12f9: 0x04fb, 0x12fa: 0x04ff, 0x12fb: 0x0503, + 0x12fc: 0x0507, 0x12fd: 0x050b, 0x12fe: 0x050f, 0x12ff: 0x0513, + // Block 0x4c, offset 0x1300 + 0x1300: 0x0517, 0x1301: 0x051b, 0x1302: 0x0523, 0x1303: 0x0527, 0x1304: 0x052b, 0x1305: 0x052f, + 0x1306: 0x0533, 0x1307: 0x0537, 0x1308: 0x053b, 0x1309: 0x053f, 0x130a: 0x0543, 0x130b: 0x0547, + 0x130c: 0x054b, 0x130d: 0x054f, 0x130e: 0x0553, 0x130f: 0x0557, 0x1310: 0x055b, 0x1311: 0x055f, + 0x1312: 0x0563, 0x1313: 0x0567, 0x1314: 0x056f, 0x1315: 0x0577, 0x1316: 0x057f, 0x1317: 0x0583, + 0x1318: 0x0587, 0x1319: 0x058b, 0x131a: 0x058f, 0x131b: 0x0593, 0x131c: 0x0597, 0x131d: 0x05a7, + 0x131e: 0x4a7b, 0x131f: 0x4a81, 0x1320: 0x03c3, 0x1321: 0x0313, 0x1322: 0x0317, 0x1323: 0x4a3e, + 0x1324: 0x031b, 0x1325: 0x4a44, 0x1326: 0x4a4a, 0x1327: 0x031f, 0x1328: 0x0323, 0x1329: 0x0327, + 0x132a: 0x4a50, 0x132b: 0x4a56, 0x132c: 0x4a5c, 0x132d: 0x4a62, 0x132e: 0x4a68, 0x132f: 0x4a6e, + 0x1330: 0x0367, 0x1331: 0x032b, 0x1332: 0x032f, 0x1333: 0x0333, 0x1334: 0x037b, 0x1335: 0x0337, + 0x1336: 0x033b, 0x1337: 0x033f, 0x1338: 0x0343, 0x1339: 0x0347, 0x133a: 0x034b, 0x133b: 0x034f, + 0x133c: 0x0353, 0x133d: 0x0357, 0x133e: 0x035b, + // Block 0x4d, offset 0x1340 + 0x1342: 0x49c0, 0x1343: 0x49c6, 0x1344: 0x49cc, 0x1345: 0x49d2, + 0x1346: 0x49d8, 0x1347: 0x49de, 0x134a: 0x49e4, 0x134b: 0x49ea, + 0x134c: 0x49f0, 0x134d: 0x49f6, 0x134e: 0x49fc, 0x134f: 0x4a02, + 0x1352: 0x4a08, 0x1353: 0x4a0e, 0x1354: 0x4a14, 0x1355: 0x4a1a, 0x1356: 0x4a20, 0x1357: 0x4a26, + 0x135a: 0x4a2c, 0x135b: 0x4a32, 0x135c: 0x4a38, + 0x1360: 0x00bf, 0x1361: 0x00c2, 0x1362: 0x00cb, 0x1363: 0x4267, + 0x1364: 0x00c8, 0x1365: 0x00c5, 0x1366: 0x0447, 0x1368: 0x046b, 0x1369: 0x044b, + 0x136a: 0x044f, 0x136b: 0x0453, 0x136c: 0x0457, 0x136d: 0x046f, 0x136e: 0x0473, + // Block 0x4e, offset 0x1380 + 0x1380: 0x0063, 0x1381: 0x0065, 0x1382: 0x0067, 0x1383: 0x0069, 0x1384: 0x006b, 0x1385: 0x006d, + 0x1386: 0x006f, 0x1387: 0x0071, 0x1388: 0x0073, 0x1389: 0x0075, 0x138a: 0x0083, 0x138b: 0x0085, + 0x138c: 0x0087, 0x138d: 0x0089, 0x138e: 0x008b, 0x138f: 0x008d, 0x1390: 0x008f, 0x1391: 0x0091, + 0x1392: 0x0093, 0x1393: 0x0095, 0x1394: 0x0097, 0x1395: 0x0099, 0x1396: 0x009b, 0x1397: 0x009d, + 0x1398: 0x009f, 0x1399: 0x00a1, 0x139a: 0x00a3, 0x139b: 0x00a5, 0x139c: 0x00a7, 0x139d: 0x00a9, + 0x139e: 0x00ab, 0x139f: 0x00ad, 0x13a0: 0x00af, 0x13a1: 0x00b1, 0x13a2: 0x00b3, 0x13a3: 0x00b5, + 0x13a4: 0x00dd, 0x13a5: 0x00f2, 0x13a8: 0x0173, 0x13a9: 0x0176, + 0x13aa: 0x0179, 0x13ab: 0x017c, 0x13ac: 0x017f, 0x13ad: 0x0182, 0x13ae: 0x0185, 0x13af: 0x0188, + 0x13b0: 0x018b, 0x13b1: 0x018e, 0x13b2: 0x0191, 0x13b3: 0x0194, 0x13b4: 0x0197, 0x13b5: 0x019a, + 0x13b6: 0x019d, 0x13b7: 0x01a0, 0x13b8: 0x01a3, 0x13b9: 0x0188, 0x13ba: 0x01a6, 0x13bb: 0x01a9, + 0x13bc: 0x01ac, 0x13bd: 0x01af, 0x13be: 0x01b2, 0x13bf: 0x01b5, + // Block 0x4f, offset 0x13c0 + 0x13c0: 0x01fd, 0x13c1: 0x0200, 0x13c2: 0x0203, 0x13c3: 0x045b, 0x13c4: 0x01c7, 0x13c5: 0x01d0, + 0x13c6: 0x01d6, 0x13c7: 0x01fa, 0x13c8: 0x01eb, 0x13c9: 0x01e8, 0x13ca: 0x0206, 0x13cb: 0x0209, + 0x13ce: 0x0021, 0x13cf: 0x0023, 0x13d0: 0x0025, 0x13d1: 0x0027, + 0x13d2: 0x0029, 0x13d3: 0x002b, 0x13d4: 0x002d, 0x13d5: 0x002f, 0x13d6: 0x0031, 0x13d7: 0x0033, + 0x13d8: 0x0021, 0x13d9: 0x0023, 0x13da: 0x0025, 0x13db: 0x0027, 0x13dc: 0x0029, 0x13dd: 0x002b, + 0x13de: 0x002d, 0x13df: 0x002f, 0x13e0: 0x0031, 0x13e1: 0x0033, 0x13e2: 0x0021, 0x13e3: 0x0023, + 0x13e4: 0x0025, 0x13e5: 0x0027, 0x13e6: 0x0029, 0x13e7: 0x002b, 0x13e8: 0x002d, 0x13e9: 0x002f, + 0x13ea: 0x0031, 0x13eb: 0x0033, 0x13ec: 0x0021, 0x13ed: 0x0023, 0x13ee: 0x0025, 0x13ef: 0x0027, + 0x13f0: 0x0029, 0x13f1: 0x002b, 0x13f2: 0x002d, 0x13f3: 0x002f, 0x13f4: 0x0031, 0x13f5: 0x0033, + 0x13f6: 0x0021, 0x13f7: 0x0023, 0x13f8: 0x0025, 0x13f9: 0x0027, 0x13fa: 0x0029, 0x13fb: 0x002b, + 0x13fc: 0x002d, 0x13fd: 0x002f, 0x13fe: 0x0031, 0x13ff: 0x0033, + // Block 0x50, offset 0x1400 + 0x1400: 0x0239, 0x1401: 0x023c, 0x1402: 0x0248, 0x1403: 0x0251, 0x1405: 0x028a, + 0x1406: 0x025a, 0x1407: 0x024b, 0x1408: 0x0269, 0x1409: 0x0290, 0x140a: 0x027b, 0x140b: 0x027e, + 0x140c: 0x0281, 0x140d: 0x0284, 0x140e: 0x025d, 0x140f: 0x026f, 0x1410: 0x0275, 0x1411: 0x0263, + 0x1412: 0x0278, 0x1413: 0x0257, 0x1414: 0x0260, 0x1415: 0x0242, 0x1416: 0x0245, 0x1417: 0x024e, + 0x1418: 0x0254, 0x1419: 0x0266, 0x141a: 0x026c, 0x141b: 0x0272, 0x141c: 0x0293, 0x141d: 0x02e4, + 0x141e: 0x02cc, 0x141f: 0x0296, 0x1421: 0x023c, 0x1422: 0x0248, + 0x1424: 0x0287, 0x1427: 0x024b, 0x1429: 0x0290, + 0x142a: 0x027b, 0x142b: 0x027e, 0x142c: 0x0281, 0x142d: 0x0284, 0x142e: 0x025d, 0x142f: 0x026f, + 0x1430: 0x0275, 0x1431: 0x0263, 0x1432: 0x0278, 0x1434: 0x0260, 0x1435: 0x0242, + 0x1436: 0x0245, 0x1437: 0x024e, 0x1439: 0x0266, 0x143b: 0x0272, + // Block 0x51, offset 0x1440 + 0x1442: 0x0248, + 0x1447: 0x024b, 0x1449: 0x0290, 0x144b: 0x027e, + 0x144d: 0x0284, 0x144e: 0x025d, 0x144f: 0x026f, 0x1451: 0x0263, + 0x1452: 0x0278, 0x1454: 0x0260, 0x1457: 0x024e, + 0x1459: 0x0266, 0x145b: 0x0272, 0x145d: 0x02e4, + 0x145f: 0x0296, 0x1461: 0x023c, 0x1462: 0x0248, + 0x1464: 0x0287, 0x1467: 0x024b, 0x1468: 0x0269, 0x1469: 0x0290, + 0x146a: 0x027b, 0x146c: 0x0281, 0x146d: 0x0284, 0x146e: 0x025d, 0x146f: 0x026f, + 0x1470: 0x0275, 0x1471: 0x0263, 0x1472: 0x0278, 0x1474: 0x0260, 0x1475: 0x0242, + 0x1476: 0x0245, 0x1477: 0x024e, 0x1479: 0x0266, 0x147a: 0x026c, 0x147b: 0x0272, + 0x147c: 0x0293, 0x147e: 0x02cc, + // Block 0x52, offset 0x1480 + 0x1480: 0x0239, 0x1481: 0x023c, 0x1482: 0x0248, 0x1483: 0x0251, 0x1484: 0x0287, 0x1485: 0x028a, + 0x1486: 0x025a, 0x1487: 0x024b, 0x1488: 0x0269, 0x1489: 0x0290, 0x148b: 0x027e, + 0x148c: 0x0281, 0x148d: 0x0284, 0x148e: 0x025d, 0x148f: 0x026f, 0x1490: 0x0275, 0x1491: 0x0263, + 0x1492: 0x0278, 0x1493: 0x0257, 0x1494: 0x0260, 0x1495: 0x0242, 0x1496: 0x0245, 0x1497: 0x024e, + 0x1498: 0x0254, 0x1499: 0x0266, 0x149a: 0x026c, 0x149b: 0x0272, + 0x14a1: 0x023c, 0x14a2: 0x0248, 0x14a3: 0x0251, + 0x14a5: 0x028a, 0x14a6: 0x025a, 0x14a7: 0x024b, 0x14a8: 0x0269, 0x14a9: 0x0290, + 0x14ab: 0x027e, 0x14ac: 0x0281, 0x14ad: 0x0284, 0x14ae: 0x025d, 0x14af: 0x026f, + 0x14b0: 0x0275, 0x14b1: 0x0263, 0x14b2: 0x0278, 0x14b3: 0x0257, 0x14b4: 0x0260, 0x14b5: 0x0242, + 0x14b6: 0x0245, 0x14b7: 0x024e, 0x14b8: 0x0254, 0x14b9: 0x0266, 0x14ba: 0x026c, 0x14bb: 0x0272, + // Block 0x53, offset 0x14c0 + 0x14c0: 0x1879, 0x14c1: 0x1876, 0x14c2: 0x187c, 0x14c3: 0x18a0, 0x14c4: 0x18c4, 0x14c5: 0x18e8, + 0x14c6: 0x190c, 0x14c7: 0x1915, 0x14c8: 0x191b, 0x14c9: 0x1921, 0x14ca: 0x1927, + 0x14d0: 0x1a8f, 0x14d1: 0x1a93, + 0x14d2: 0x1a97, 0x14d3: 0x1a9b, 0x14d4: 0x1a9f, 0x14d5: 0x1aa3, 0x14d6: 0x1aa7, 0x14d7: 0x1aab, + 0x14d8: 0x1aaf, 0x14d9: 0x1ab3, 0x14da: 0x1ab7, 0x14db: 0x1abb, 0x14dc: 0x1abf, 0x14dd: 0x1ac3, + 0x14de: 0x1ac7, 0x14df: 0x1acb, 0x14e0: 0x1acf, 0x14e1: 0x1ad3, 0x14e2: 0x1ad7, 0x14e3: 0x1adb, + 0x14e4: 0x1adf, 0x14e5: 0x1ae3, 0x14e6: 0x1ae7, 0x14e7: 0x1aeb, 0x14e8: 0x1aef, 0x14e9: 0x1af3, + 0x14ea: 0x2721, 0x14eb: 0x0047, 0x14ec: 0x0065, 0x14ed: 0x193c, 0x14ee: 0x19b4, + 0x14f0: 0x0043, 0x14f1: 0x0045, 0x14f2: 0x0047, 0x14f3: 0x0049, 0x14f4: 0x004b, 0x14f5: 0x004d, + 0x14f6: 0x004f, 0x14f7: 0x0051, 0x14f8: 0x0053, 0x14f9: 0x0055, 0x14fa: 0x0057, 0x14fb: 0x0059, + 0x14fc: 0x005b, 0x14fd: 0x005d, 0x14fe: 0x005f, 0x14ff: 0x0061, + // Block 0x54, offset 0x1500 + 0x1500: 0x26b0, 0x1501: 0x26c5, 0x1502: 0x0503, + 0x1510: 0x0c0f, 0x1511: 0x0a47, + 0x1512: 0x08d3, 0x1513: 0x45c7, 0x1514: 0x071b, 0x1515: 0x09ef, 0x1516: 0x132f, 0x1517: 0x09ff, + 0x1518: 0x0727, 0x1519: 0x0cd7, 0x151a: 0x0eaf, 0x151b: 0x0caf, 0x151c: 0x0827, 0x151d: 0x0b6b, + 0x151e: 0x07bf, 0x151f: 0x0cb7, 0x1520: 0x0813, 0x1521: 0x1117, 0x1522: 0x0f83, 0x1523: 0x138b, + 0x1524: 0x09d3, 0x1525: 0x090b, 0x1526: 0x0e63, 0x1527: 0x0c1b, 0x1528: 0x0c47, 0x1529: 0x06bf, + 0x152a: 0x06cb, 0x152b: 0x140b, 0x152c: 0x0adb, 0x152d: 0x06e7, 0x152e: 0x08ef, 0x152f: 0x0c3b, + 0x1530: 0x13b3, 0x1531: 0x0c13, 0x1532: 0x106f, 0x1533: 0x10ab, 0x1534: 0x08f7, 0x1535: 0x0e43, + 0x1536: 0x0d0b, 0x1537: 0x0d07, 0x1538: 0x0f97, 0x1539: 0x082b, 0x153a: 0x0957, 0x153b: 0x1443, + // Block 0x55, offset 0x1540 + 0x1540: 0x06fb, 0x1541: 0x06f3, 0x1542: 0x0703, 0x1543: 0x1647, 0x1544: 0x0747, 0x1545: 0x0757, + 0x1546: 0x075b, 0x1547: 0x0763, 0x1548: 0x076b, 0x1549: 0x076f, 0x154a: 0x077b, 0x154b: 0x0773, + 0x154c: 0x05b3, 0x154d: 0x165b, 0x154e: 0x078f, 0x154f: 0x0793, 0x1550: 0x0797, 0x1551: 0x07b3, + 0x1552: 0x164c, 0x1553: 0x05b7, 0x1554: 0x079f, 0x1555: 0x07bf, 0x1556: 0x1656, 0x1557: 0x07cf, + 0x1558: 0x07d7, 0x1559: 0x0737, 0x155a: 0x07df, 0x155b: 0x07e3, 0x155c: 0x1831, 0x155d: 0x07ff, + 0x155e: 0x0807, 0x155f: 0x05bf, 0x1560: 0x081f, 0x1561: 0x0823, 0x1562: 0x082b, 0x1563: 0x082f, + 0x1564: 0x05c3, 0x1565: 0x0847, 0x1566: 0x084b, 0x1567: 0x0857, 0x1568: 0x0863, 0x1569: 0x0867, + 0x156a: 0x086b, 0x156b: 0x0873, 0x156c: 0x0893, 0x156d: 0x0897, 0x156e: 0x089f, 0x156f: 0x08af, + 0x1570: 0x08b7, 0x1571: 0x08bb, 0x1572: 0x08bb, 0x1573: 0x08bb, 0x1574: 0x166a, 0x1575: 0x0e93, + 0x1576: 0x08cf, 0x1577: 0x08d7, 0x1578: 0x166f, 0x1579: 0x08e3, 0x157a: 0x08eb, 0x157b: 0x08f3, + 0x157c: 0x091b, 0x157d: 0x0907, 0x157e: 0x0913, 0x157f: 0x0917, + // Block 0x56, offset 0x1580 + 0x1580: 0x091f, 0x1581: 0x0927, 0x1582: 0x092b, 0x1583: 0x0933, 0x1584: 0x093b, 0x1585: 0x093f, + 0x1586: 0x093f, 0x1587: 0x0947, 0x1588: 0x094f, 0x1589: 0x0953, 0x158a: 0x095f, 0x158b: 0x0983, + 0x158c: 0x0967, 0x158d: 0x0987, 0x158e: 0x096b, 0x158f: 0x0973, 0x1590: 0x080b, 0x1591: 0x09cf, + 0x1592: 0x0997, 0x1593: 0x099b, 0x1594: 0x099f, 0x1595: 0x0993, 0x1596: 0x09a7, 0x1597: 0x09a3, + 0x1598: 0x09bb, 0x1599: 0x1674, 0x159a: 0x09d7, 0x159b: 0x09db, 0x159c: 0x09e3, 0x159d: 0x09ef, + 0x159e: 0x09f7, 0x159f: 0x0a13, 0x15a0: 0x1679, 0x15a1: 0x167e, 0x15a2: 0x0a1f, 0x15a3: 0x0a23, + 0x15a4: 0x0a27, 0x15a5: 0x0a1b, 0x15a6: 0x0a2f, 0x15a7: 0x05c7, 0x15a8: 0x05cb, 0x15a9: 0x0a37, + 0x15aa: 0x0a3f, 0x15ab: 0x0a3f, 0x15ac: 0x1683, 0x15ad: 0x0a5b, 0x15ae: 0x0a5f, 0x15af: 0x0a63, + 0x15b0: 0x0a6b, 0x15b1: 0x1688, 0x15b2: 0x0a73, 0x15b3: 0x0a77, 0x15b4: 0x0b4f, 0x15b5: 0x0a7f, + 0x15b6: 0x05cf, 0x15b7: 0x0a8b, 0x15b8: 0x0a9b, 0x15b9: 0x0aa7, 0x15ba: 0x0aa3, 0x15bb: 0x1692, + 0x15bc: 0x0aaf, 0x15bd: 0x1697, 0x15be: 0x0abb, 0x15bf: 0x0ab7, + // Block 0x57, offset 0x15c0 + 0x15c0: 0x0abf, 0x15c1: 0x0acf, 0x15c2: 0x0ad3, 0x15c3: 0x05d3, 0x15c4: 0x0ae3, 0x15c5: 0x0aeb, + 0x15c6: 0x0aef, 0x15c7: 0x0af3, 0x15c8: 0x05d7, 0x15c9: 0x169c, 0x15ca: 0x05db, 0x15cb: 0x0b0f, + 0x15cc: 0x0b13, 0x15cd: 0x0b17, 0x15ce: 0x0b1f, 0x15cf: 0x1863, 0x15d0: 0x0b37, 0x15d1: 0x16a6, + 0x15d2: 0x16a6, 0x15d3: 0x11d7, 0x15d4: 0x0b47, 0x15d5: 0x0b47, 0x15d6: 0x05df, 0x15d7: 0x16c9, + 0x15d8: 0x179b, 0x15d9: 0x0b57, 0x15da: 0x0b5f, 0x15db: 0x05e3, 0x15dc: 0x0b73, 0x15dd: 0x0b83, + 0x15de: 0x0b87, 0x15df: 0x0b8f, 0x15e0: 0x0b9f, 0x15e1: 0x05eb, 0x15e2: 0x05e7, 0x15e3: 0x0ba3, + 0x15e4: 0x16ab, 0x15e5: 0x0ba7, 0x15e6: 0x0bbb, 0x15e7: 0x0bbf, 0x15e8: 0x0bc3, 0x15e9: 0x0bbf, + 0x15ea: 0x0bcf, 0x15eb: 0x0bd3, 0x15ec: 0x0be3, 0x15ed: 0x0bdb, 0x15ee: 0x0bdf, 0x15ef: 0x0be7, + 0x15f0: 0x0beb, 0x15f1: 0x0bef, 0x15f2: 0x0bfb, 0x15f3: 0x0bff, 0x15f4: 0x0c17, 0x15f5: 0x0c1f, + 0x15f6: 0x0c2f, 0x15f7: 0x0c43, 0x15f8: 0x16ba, 0x15f9: 0x0c3f, 0x15fa: 0x0c33, 0x15fb: 0x0c4b, + 0x15fc: 0x0c53, 0x15fd: 0x0c67, 0x15fe: 0x16bf, 0x15ff: 0x0c6f, + // Block 0x58, offset 0x1600 + 0x1600: 0x0c63, 0x1601: 0x0c5b, 0x1602: 0x05ef, 0x1603: 0x0c77, 0x1604: 0x0c7f, 0x1605: 0x0c87, + 0x1606: 0x0c7b, 0x1607: 0x05f3, 0x1608: 0x0c97, 0x1609: 0x0c9f, 0x160a: 0x16c4, 0x160b: 0x0ccb, + 0x160c: 0x0cff, 0x160d: 0x0cdb, 0x160e: 0x05ff, 0x160f: 0x0ce7, 0x1610: 0x05fb, 0x1611: 0x05f7, + 0x1612: 0x07c3, 0x1613: 0x07c7, 0x1614: 0x0d03, 0x1615: 0x0ceb, 0x1616: 0x11ab, 0x1617: 0x0663, + 0x1618: 0x0d0f, 0x1619: 0x0d13, 0x161a: 0x0d17, 0x161b: 0x0d2b, 0x161c: 0x0d23, 0x161d: 0x16dd, + 0x161e: 0x0603, 0x161f: 0x0d3f, 0x1620: 0x0d33, 0x1621: 0x0d4f, 0x1622: 0x0d57, 0x1623: 0x16e7, + 0x1624: 0x0d5b, 0x1625: 0x0d47, 0x1626: 0x0d63, 0x1627: 0x0607, 0x1628: 0x0d67, 0x1629: 0x0d6b, + 0x162a: 0x0d6f, 0x162b: 0x0d7b, 0x162c: 0x16ec, 0x162d: 0x0d83, 0x162e: 0x060b, 0x162f: 0x0d8f, + 0x1630: 0x16f1, 0x1631: 0x0d93, 0x1632: 0x060f, 0x1633: 0x0d9f, 0x1634: 0x0dab, 0x1635: 0x0db7, + 0x1636: 0x0dbb, 0x1637: 0x16f6, 0x1638: 0x168d, 0x1639: 0x16fb, 0x163a: 0x0ddb, 0x163b: 0x1700, + 0x163c: 0x0de7, 0x163d: 0x0def, 0x163e: 0x0ddf, 0x163f: 0x0dfb, + // Block 0x59, offset 0x1640 + 0x1640: 0x0e0b, 0x1641: 0x0e1b, 0x1642: 0x0e0f, 0x1643: 0x0e13, 0x1644: 0x0e1f, 0x1645: 0x0e23, + 0x1646: 0x1705, 0x1647: 0x0e07, 0x1648: 0x0e3b, 0x1649: 0x0e3f, 0x164a: 0x0613, 0x164b: 0x0e53, + 0x164c: 0x0e4f, 0x164d: 0x170a, 0x164e: 0x0e33, 0x164f: 0x0e6f, 0x1650: 0x170f, 0x1651: 0x1714, + 0x1652: 0x0e73, 0x1653: 0x0e87, 0x1654: 0x0e83, 0x1655: 0x0e7f, 0x1656: 0x0617, 0x1657: 0x0e8b, + 0x1658: 0x0e9b, 0x1659: 0x0e97, 0x165a: 0x0ea3, 0x165b: 0x1651, 0x165c: 0x0eb3, 0x165d: 0x1719, + 0x165e: 0x0ebf, 0x165f: 0x1723, 0x1660: 0x0ed3, 0x1661: 0x0edf, 0x1662: 0x0ef3, 0x1663: 0x1728, + 0x1664: 0x0f07, 0x1665: 0x0f0b, 0x1666: 0x172d, 0x1667: 0x1732, 0x1668: 0x0f27, 0x1669: 0x0f37, + 0x166a: 0x061b, 0x166b: 0x0f3b, 0x166c: 0x061f, 0x166d: 0x061f, 0x166e: 0x0f53, 0x166f: 0x0f57, + 0x1670: 0x0f5f, 0x1671: 0x0f63, 0x1672: 0x0f6f, 0x1673: 0x0623, 0x1674: 0x0f87, 0x1675: 0x1737, + 0x1676: 0x0fa3, 0x1677: 0x173c, 0x1678: 0x0faf, 0x1679: 0x16a1, 0x167a: 0x0fbf, 0x167b: 0x1741, + 0x167c: 0x1746, 0x167d: 0x174b, 0x167e: 0x0627, 0x167f: 0x062b, + // Block 0x5a, offset 0x1680 + 0x1680: 0x0ff7, 0x1681: 0x1755, 0x1682: 0x1750, 0x1683: 0x175a, 0x1684: 0x175f, 0x1685: 0x0fff, + 0x1686: 0x1003, 0x1687: 0x1003, 0x1688: 0x100b, 0x1689: 0x0633, 0x168a: 0x100f, 0x168b: 0x0637, + 0x168c: 0x063b, 0x168d: 0x1769, 0x168e: 0x1023, 0x168f: 0x102b, 0x1690: 0x1037, 0x1691: 0x063f, + 0x1692: 0x176e, 0x1693: 0x105b, 0x1694: 0x1773, 0x1695: 0x1778, 0x1696: 0x107b, 0x1697: 0x1093, + 0x1698: 0x0643, 0x1699: 0x109b, 0x169a: 0x109f, 0x169b: 0x10a3, 0x169c: 0x177d, 0x169d: 0x1782, + 0x169e: 0x1782, 0x169f: 0x10bb, 0x16a0: 0x0647, 0x16a1: 0x1787, 0x16a2: 0x10cf, 0x16a3: 0x10d3, + 0x16a4: 0x064b, 0x16a5: 0x178c, 0x16a6: 0x10ef, 0x16a7: 0x064f, 0x16a8: 0x10ff, 0x16a9: 0x10f7, + 0x16aa: 0x1107, 0x16ab: 0x1796, 0x16ac: 0x111f, 0x16ad: 0x0653, 0x16ae: 0x112b, 0x16af: 0x1133, + 0x16b0: 0x1143, 0x16b1: 0x0657, 0x16b2: 0x17a0, 0x16b3: 0x17a5, 0x16b4: 0x065b, 0x16b5: 0x17aa, + 0x16b6: 0x115b, 0x16b7: 0x17af, 0x16b8: 0x1167, 0x16b9: 0x1173, 0x16ba: 0x117b, 0x16bb: 0x17b4, + 0x16bc: 0x17b9, 0x16bd: 0x118f, 0x16be: 0x17be, 0x16bf: 0x1197, + // Block 0x5b, offset 0x16c0 + 0x16c0: 0x16ce, 0x16c1: 0x065f, 0x16c2: 0x11af, 0x16c3: 0x11b3, 0x16c4: 0x0667, 0x16c5: 0x11b7, + 0x16c6: 0x0a33, 0x16c7: 0x17c3, 0x16c8: 0x17c8, 0x16c9: 0x16d3, 0x16ca: 0x16d8, 0x16cb: 0x11d7, + 0x16cc: 0x11db, 0x16cd: 0x13f3, 0x16ce: 0x066b, 0x16cf: 0x1207, 0x16d0: 0x1203, 0x16d1: 0x120b, + 0x16d2: 0x083f, 0x16d3: 0x120f, 0x16d4: 0x1213, 0x16d5: 0x1217, 0x16d6: 0x121f, 0x16d7: 0x17cd, + 0x16d8: 0x121b, 0x16d9: 0x1223, 0x16da: 0x1237, 0x16db: 0x123b, 0x16dc: 0x1227, 0x16dd: 0x123f, + 0x16de: 0x1253, 0x16df: 0x1267, 0x16e0: 0x1233, 0x16e1: 0x1247, 0x16e2: 0x124b, 0x16e3: 0x124f, + 0x16e4: 0x17d2, 0x16e5: 0x17dc, 0x16e6: 0x17d7, 0x16e7: 0x066f, 0x16e8: 0x126f, 0x16e9: 0x1273, + 0x16ea: 0x127b, 0x16eb: 0x17f0, 0x16ec: 0x127f, 0x16ed: 0x17e1, 0x16ee: 0x0673, 0x16ef: 0x0677, + 0x16f0: 0x17e6, 0x16f1: 0x17eb, 0x16f2: 0x067b, 0x16f3: 0x129f, 0x16f4: 0x12a3, 0x16f5: 0x12a7, + 0x16f6: 0x12ab, 0x16f7: 0x12b7, 0x16f8: 0x12b3, 0x16f9: 0x12bf, 0x16fa: 0x12bb, 0x16fb: 0x12cb, + 0x16fc: 0x12c3, 0x16fd: 0x12c7, 0x16fe: 0x12cf, 0x16ff: 0x067f, + // Block 0x5c, offset 0x1700 + 0x1700: 0x12d7, 0x1701: 0x12db, 0x1702: 0x0683, 0x1703: 0x12eb, 0x1704: 0x12ef, 0x1705: 0x17f5, + 0x1706: 0x12fb, 0x1707: 0x12ff, 0x1708: 0x0687, 0x1709: 0x130b, 0x170a: 0x05bb, 0x170b: 0x17fa, + 0x170c: 0x17ff, 0x170d: 0x068b, 0x170e: 0x068f, 0x170f: 0x1337, 0x1710: 0x134f, 0x1711: 0x136b, + 0x1712: 0x137b, 0x1713: 0x1804, 0x1714: 0x138f, 0x1715: 0x1393, 0x1716: 0x13ab, 0x1717: 0x13b7, + 0x1718: 0x180e, 0x1719: 0x1660, 0x171a: 0x13c3, 0x171b: 0x13bf, 0x171c: 0x13cb, 0x171d: 0x1665, + 0x171e: 0x13d7, 0x171f: 0x13e3, 0x1720: 0x1813, 0x1721: 0x1818, 0x1722: 0x1423, 0x1723: 0x142f, + 0x1724: 0x1437, 0x1725: 0x181d, 0x1726: 0x143b, 0x1727: 0x1467, 0x1728: 0x1473, 0x1729: 0x1477, + 0x172a: 0x146f, 0x172b: 0x1483, 0x172c: 0x1487, 0x172d: 0x1822, 0x172e: 0x1493, 0x172f: 0x0693, + 0x1730: 0x149b, 0x1731: 0x1827, 0x1732: 0x0697, 0x1733: 0x14d3, 0x1734: 0x0ac3, 0x1735: 0x14eb, + 0x1736: 0x182c, 0x1737: 0x1836, 0x1738: 0x069b, 0x1739: 0x069f, 0x173a: 0x1513, 0x173b: 0x183b, + 0x173c: 0x06a3, 0x173d: 0x1840, 0x173e: 0x152b, 0x173f: 0x152b, + // Block 0x5d, offset 0x1740 + 0x1740: 0x1533, 0x1741: 0x1845, 0x1742: 0x154b, 0x1743: 0x06a7, 0x1744: 0x155b, 0x1745: 0x1567, + 0x1746: 0x156f, 0x1747: 0x1577, 0x1748: 0x06ab, 0x1749: 0x184a, 0x174a: 0x158b, 0x174b: 0x15a7, + 0x174c: 0x15b3, 0x174d: 0x06af, 0x174e: 0x06b3, 0x174f: 0x15b7, 0x1750: 0x184f, 0x1751: 0x06b7, + 0x1752: 0x1854, 0x1753: 0x1859, 0x1754: 0x185e, 0x1755: 0x15db, 0x1756: 0x06bb, 0x1757: 0x15ef, + 0x1758: 0x15f7, 0x1759: 0x15fb, 0x175a: 0x1603, 0x175b: 0x160b, 0x175c: 0x1613, 0x175d: 0x1868, +} + +// nfkcIndex: 22 blocks, 1408 entries, 2816 bytes +// Block 0 is the zero block. +var nfkcIndex = [1408]uint16{ + // Block 0x0, offset 0x0 + // Block 0x1, offset 0x40 + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xc2: 0x5c, 0xc3: 0x01, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x5d, 0xc7: 0x04, + 0xc8: 0x05, 0xca: 0x5e, 0xcb: 0x5f, 0xcc: 0x06, 0xcd: 0x07, 0xce: 0x08, 0xcf: 0x09, + 0xd0: 0x0a, 0xd1: 0x60, 0xd2: 0x61, 0xd3: 0x0b, 0xd6: 0x0c, 0xd7: 0x62, + 0xd8: 0x63, 0xd9: 0x0d, 0xdb: 0x64, 0xdc: 0x65, 0xdd: 0x66, 0xdf: 0x67, + 0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, + 0xea: 0x06, 0xeb: 0x07, 0xec: 0x08, 0xed: 0x09, 0xef: 0x0a, + 0xf0: 0x13, + // Block 0x4, offset 0x100 + 0x120: 0x68, 0x121: 0x69, 0x123: 0x0e, 0x124: 0x6a, 0x125: 0x6b, 0x126: 0x6c, 0x127: 0x6d, + 0x128: 0x6e, 0x129: 0x6f, 0x12a: 0x70, 0x12b: 0x71, 0x12c: 0x6c, 0x12d: 0x72, 0x12e: 0x73, 0x12f: 0x74, + 0x131: 0x75, 0x132: 0x76, 0x133: 0x77, 0x134: 0x78, 0x135: 0x79, 0x137: 0x7a, + 0x138: 0x7b, 0x139: 0x7c, 0x13a: 0x7d, 0x13b: 0x7e, 0x13c: 0x7f, 0x13d: 0x80, 0x13e: 0x81, 0x13f: 0x82, + // Block 0x5, offset 0x140 + 0x140: 0x83, 0x142: 0x84, 0x143: 0x85, 0x144: 0x86, 0x145: 0x87, 0x146: 0x88, 0x147: 0x89, + 0x14d: 0x8a, + 0x15c: 0x8b, 0x15f: 0x8c, + 0x162: 0x8d, 0x164: 0x8e, + 0x168: 0x8f, 0x169: 0x90, 0x16a: 0x91, 0x16c: 0x0f, 0x16d: 0x92, 0x16e: 0x93, 0x16f: 0x94, + 0x170: 0x95, 0x173: 0x96, 0x174: 0x97, 0x175: 0x10, 0x176: 0x11, 0x177: 0x12, + 0x178: 0x13, 0x179: 0x14, 0x17a: 0x15, 0x17b: 0x16, 0x17c: 0x17, 0x17d: 0x18, 0x17e: 0x19, 0x17f: 0x1a, + // Block 0x6, offset 0x180 + 0x180: 0x98, 0x181: 0x99, 0x182: 0x9a, 0x183: 0x9b, 0x184: 0x1b, 0x185: 0x1c, 0x186: 0x9c, 0x187: 0x9d, + 0x188: 0x9e, 0x189: 0x1d, 0x18a: 0x1e, 0x18b: 0x9f, 0x18c: 0xa0, + 0x191: 0x1f, 0x192: 0x20, 0x193: 0xa1, + 0x1a8: 0xa2, 0x1a9: 0xa3, 0x1ab: 0xa4, + 0x1b1: 0xa5, 0x1b3: 0xa6, 0x1b5: 0xa7, 0x1b7: 0xa8, + 0x1ba: 0xa9, 0x1bb: 0xaa, 0x1bc: 0x21, 0x1bd: 0x22, 0x1be: 0x23, 0x1bf: 0xab, + // Block 0x7, offset 0x1c0 + 0x1c0: 0xac, 0x1c1: 0x24, 0x1c2: 0x25, 0x1c3: 0x26, 0x1c4: 0xad, 0x1c5: 0x27, 0x1c6: 0x28, + 0x1c8: 0x29, 0x1c9: 0x2a, 0x1ca: 0x2b, 0x1cb: 0x2c, 0x1cc: 0x2d, 0x1cd: 0x2e, 0x1ce: 0x2f, 0x1cf: 0x30, + // Block 0x8, offset 0x200 + 0x219: 0xae, 0x21a: 0xaf, 0x21b: 0xb0, 0x21d: 0xb1, 0x21f: 0xb2, + 0x220: 0xb3, 0x223: 0xb4, 0x224: 0xb5, 0x225: 0xb6, 0x226: 0xb7, 0x227: 0xb8, + 0x22a: 0xb9, 0x22b: 0xba, 0x22d: 0xbb, 0x22f: 0xbc, + 0x230: 0xbd, 0x231: 0xbe, 0x232: 0xbf, 0x233: 0xc0, 0x234: 0xc1, 0x235: 0xc2, 0x236: 0xc3, 0x237: 0xbd, + 0x238: 0xbe, 0x239: 0xbf, 0x23a: 0xc0, 0x23b: 0xc1, 0x23c: 0xc2, 0x23d: 0xc3, 0x23e: 0xbd, 0x23f: 0xbe, + // Block 0x9, offset 0x240 + 0x240: 0xbf, 0x241: 0xc0, 0x242: 0xc1, 0x243: 0xc2, 0x244: 0xc3, 0x245: 0xbd, 0x246: 0xbe, 0x247: 0xbf, + 0x248: 0xc0, 0x249: 0xc1, 0x24a: 0xc2, 0x24b: 0xc3, 0x24c: 0xbd, 0x24d: 0xbe, 0x24e: 0xbf, 0x24f: 0xc0, + 0x250: 0xc1, 0x251: 0xc2, 0x252: 0xc3, 0x253: 0xbd, 0x254: 0xbe, 0x255: 0xbf, 0x256: 0xc0, 0x257: 0xc1, + 0x258: 0xc2, 0x259: 0xc3, 0x25a: 0xbd, 0x25b: 0xbe, 0x25c: 0xbf, 0x25d: 0xc0, 0x25e: 0xc1, 0x25f: 0xc2, + 0x260: 0xc3, 0x261: 0xbd, 0x262: 0xbe, 0x263: 0xbf, 0x264: 0xc0, 0x265: 0xc1, 0x266: 0xc2, 0x267: 0xc3, + 0x268: 0xbd, 0x269: 0xbe, 0x26a: 0xbf, 0x26b: 0xc0, 0x26c: 0xc1, 0x26d: 0xc2, 0x26e: 0xc3, 0x26f: 0xbd, + 0x270: 0xbe, 0x271: 0xbf, 0x272: 0xc0, 0x273: 0xc1, 0x274: 0xc2, 0x275: 0xc3, 0x276: 0xbd, 0x277: 0xbe, + 0x278: 0xbf, 0x279: 0xc0, 0x27a: 0xc1, 0x27b: 0xc2, 0x27c: 0xc3, 0x27d: 0xbd, 0x27e: 0xbe, 0x27f: 0xbf, + // Block 0xa, offset 0x280 + 0x280: 0xc0, 0x281: 0xc1, 0x282: 0xc2, 0x283: 0xc3, 0x284: 0xbd, 0x285: 0xbe, 0x286: 0xbf, 0x287: 0xc0, + 0x288: 0xc1, 0x289: 0xc2, 0x28a: 0xc3, 0x28b: 0xbd, 0x28c: 0xbe, 0x28d: 0xbf, 0x28e: 0xc0, 0x28f: 0xc1, + 0x290: 0xc2, 0x291: 0xc3, 0x292: 0xbd, 0x293: 0xbe, 0x294: 0xbf, 0x295: 0xc0, 0x296: 0xc1, 0x297: 0xc2, + 0x298: 0xc3, 0x299: 0xbd, 0x29a: 0xbe, 0x29b: 0xbf, 0x29c: 0xc0, 0x29d: 0xc1, 0x29e: 0xc2, 0x29f: 0xc3, + 0x2a0: 0xbd, 0x2a1: 0xbe, 0x2a2: 0xbf, 0x2a3: 0xc0, 0x2a4: 0xc1, 0x2a5: 0xc2, 0x2a6: 0xc3, 0x2a7: 0xbd, + 0x2a8: 0xbe, 0x2a9: 0xbf, 0x2aa: 0xc0, 0x2ab: 0xc1, 0x2ac: 0xc2, 0x2ad: 0xc3, 0x2ae: 0xbd, 0x2af: 0xbe, + 0x2b0: 0xbf, 0x2b1: 0xc0, 0x2b2: 0xc1, 0x2b3: 0xc2, 0x2b4: 0xc3, 0x2b5: 0xbd, 0x2b6: 0xbe, 0x2b7: 0xbf, + 0x2b8: 0xc0, 0x2b9: 0xc1, 0x2ba: 0xc2, 0x2bb: 0xc3, 0x2bc: 0xbd, 0x2bd: 0xbe, 0x2be: 0xbf, 0x2bf: 0xc0, + // Block 0xb, offset 0x2c0 + 0x2c0: 0xc1, 0x2c1: 0xc2, 0x2c2: 0xc3, 0x2c3: 0xbd, 0x2c4: 0xbe, 0x2c5: 0xbf, 0x2c6: 0xc0, 0x2c7: 0xc1, + 0x2c8: 0xc2, 0x2c9: 0xc3, 0x2ca: 0xbd, 0x2cb: 0xbe, 0x2cc: 0xbf, 0x2cd: 0xc0, 0x2ce: 0xc1, 0x2cf: 0xc2, + 0x2d0: 0xc3, 0x2d1: 0xbd, 0x2d2: 0xbe, 0x2d3: 0xbf, 0x2d4: 0xc0, 0x2d5: 0xc1, 0x2d6: 0xc2, 0x2d7: 0xc3, + 0x2d8: 0xbd, 0x2d9: 0xbe, 0x2da: 0xbf, 0x2db: 0xc0, 0x2dc: 0xc1, 0x2dd: 0xc2, 0x2de: 0xc4, + // Block 0xc, offset 0x300 + 0x324: 0x31, 0x325: 0x32, 0x326: 0x33, 0x327: 0x34, + 0x328: 0x35, 0x329: 0x36, 0x32a: 0x37, 0x32b: 0x38, 0x32c: 0x39, 0x32d: 0x3a, 0x32e: 0x3b, 0x32f: 0x3c, + 0x330: 0x3d, 0x331: 0x3e, 0x332: 0x3f, 0x333: 0x40, 0x334: 0x41, 0x335: 0x42, 0x336: 0x43, 0x337: 0x44, + 0x338: 0x45, 0x339: 0x46, 0x33a: 0x47, 0x33b: 0x48, 0x33c: 0xc5, 0x33d: 0x49, 0x33e: 0x4a, 0x33f: 0x4b, + // Block 0xd, offset 0x340 + 0x347: 0xc6, + 0x34b: 0xc7, 0x34d: 0xc8, + 0x368: 0xc9, 0x36b: 0xca, + 0x374: 0xcb, + 0x37d: 0xcc, + // Block 0xe, offset 0x380 + 0x381: 0xcd, 0x382: 0xce, 0x384: 0xcf, 0x385: 0xb7, 0x387: 0xd0, + 0x388: 0xd1, 0x38b: 0xd2, 0x38c: 0xd3, 0x38d: 0xd4, + 0x391: 0xd5, 0x392: 0xd6, 0x393: 0xd7, 0x396: 0xd8, 0x397: 0xd9, + 0x398: 0xda, 0x39a: 0xdb, 0x39c: 0xdc, + 0x3a0: 0xdd, 0x3a7: 0xde, + 0x3a8: 0xdf, 0x3a9: 0xe0, 0x3aa: 0xe1, + 0x3b0: 0xda, 0x3b5: 0xe2, 0x3b6: 0xe3, + // Block 0xf, offset 0x3c0 + 0x3eb: 0xe4, 0x3ec: 0xe5, + // Block 0x10, offset 0x400 + 0x432: 0xe6, + // Block 0x11, offset 0x440 + 0x445: 0xe7, 0x446: 0xe8, 0x447: 0xe9, + 0x449: 0xea, + 0x450: 0xeb, 0x451: 0xec, 0x452: 0xed, 0x453: 0xee, 0x454: 0xef, 0x455: 0xf0, 0x456: 0xf1, 0x457: 0xf2, + 0x458: 0xf3, 0x459: 0xf4, 0x45a: 0x4c, 0x45b: 0xf5, 0x45c: 0xf6, 0x45d: 0xf7, 0x45e: 0xf8, 0x45f: 0x4d, + // Block 0x12, offset 0x480 + 0x480: 0xf9, 0x484: 0xe5, + 0x48b: 0xfa, + 0x4a3: 0xfb, 0x4a5: 0xfc, + 0x4b8: 0x4e, 0x4b9: 0x4f, 0x4ba: 0x50, + // Block 0x13, offset 0x4c0 + 0x4c4: 0x51, 0x4c5: 0xfd, 0x4c6: 0xfe, + 0x4c8: 0x52, 0x4c9: 0xff, + // Block 0x14, offset 0x500 + 0x520: 0x53, 0x521: 0x54, 0x522: 0x55, 0x523: 0x56, 0x524: 0x57, 0x525: 0x58, 0x526: 0x59, 0x527: 0x5a, + 0x528: 0x5b, + // Block 0x15, offset 0x540 + 0x550: 0x0b, 0x551: 0x0c, 0x556: 0x0d, + 0x55b: 0x0e, 0x55d: 0x0f, 0x55e: 0x10, 0x55f: 0x11, + 0x56f: 0x12, +} + +// nfkcSparseOffset: 164 entries, 328 bytes +var nfkcSparseOffset = []uint16{0x0, 0xe, 0x12, 0x1b, 0x25, 0x35, 0x37, 0x3c, 0x47, 0x56, 0x63, 0x6b, 0x70, 0x75, 0x77, 0x7f, 0x86, 0x89, 0x91, 0x95, 0x99, 0x9b, 0x9d, 0xa6, 0xaa, 0xb1, 0xb6, 0xb9, 0xc3, 0xc6, 0xcd, 0xd5, 0xd9, 0xdb, 0xdf, 0xe3, 0xe9, 0xfa, 0x106, 0x108, 0x10e, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11a, 0x11c, 0x11f, 0x122, 0x124, 0x127, 0x12a, 0x12e, 0x133, 0x13c, 0x13e, 0x141, 0x143, 0x14e, 0x159, 0x167, 0x175, 0x185, 0x193, 0x19a, 0x1a0, 0x1af, 0x1b3, 0x1b5, 0x1b9, 0x1bb, 0x1be, 0x1c0, 0x1c3, 0x1c5, 0x1c8, 0x1ca, 0x1cc, 0x1ce, 0x1da, 0x1e4, 0x1ee, 0x1f1, 0x1f5, 0x1f7, 0x1f9, 0x1fb, 0x1fd, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20e, 0x211, 0x215, 0x217, 0x21e, 0x224, 0x22a, 0x232, 0x238, 0x23e, 0x244, 0x248, 0x24a, 0x24c, 0x24e, 0x250, 0x256, 0x259, 0x25b, 0x261, 0x264, 0x26c, 0x273, 0x276, 0x279, 0x27b, 0x27e, 0x286, 0x28a, 0x291, 0x294, 0x29a, 0x29c, 0x29e, 0x2a1, 0x2a3, 0x2a6, 0x2a8, 0x2aa, 0x2ac, 0x2ae, 0x2b1, 0x2b3, 0x2b5, 0x2b7, 0x2b9, 0x2c6, 0x2d0, 0x2d2, 0x2d4, 0x2d8, 0x2dd, 0x2e9, 0x2ee, 0x2f7, 0x2fd, 0x302, 0x306, 0x30b, 0x30f, 0x31f, 0x32d, 0x33b, 0x349, 0x34f, 0x351, 0x353, 0x356, 0x361, 0x363} + +// nfkcSparseValues: 877 entries, 3508 bytes +var nfkcSparseValues = [877]valueRange{ + // Block 0x0, offset 0x0 + {value: 0x0002, lo: 0x0d}, + {value: 0x0001, lo: 0xa0, hi: 0xa0}, + {value: 0x427b, lo: 0xa8, hi: 0xa8}, + {value: 0x0083, lo: 0xaa, hi: 0xaa}, + {value: 0x4267, lo: 0xaf, hi: 0xaf}, + {value: 0x0025, lo: 0xb2, hi: 0xb3}, + {value: 0x425d, lo: 0xb4, hi: 0xb4}, + {value: 0x01dc, lo: 0xb5, hi: 0xb5}, + {value: 0x4294, lo: 0xb8, hi: 0xb8}, + {value: 0x0023, lo: 0xb9, hi: 0xb9}, + {value: 0x009f, lo: 0xba, hi: 0xba}, + {value: 0x221f, lo: 0xbc, hi: 0xbc}, + {value: 0x2213, lo: 0xbd, hi: 0xbd}, + {value: 0x22b5, lo: 0xbe, hi: 0xbe}, + // Block 0x1, offset 0xe + {value: 0x0091, lo: 0x03}, + {value: 0x46e5, lo: 0xa0, hi: 0xa1}, + {value: 0x4717, lo: 0xaf, hi: 0xb0}, + {value: 0xa000, lo: 0xb7, hi: 0xb7}, + // Block 0x2, offset 0x12 + {value: 0x0003, lo: 0x08}, + {value: 0xa000, lo: 0x92, hi: 0x92}, + {value: 0x0091, lo: 0xb0, hi: 0xb0}, + {value: 0x0119, lo: 0xb1, hi: 0xb1}, + {value: 0x0095, lo: 0xb2, hi: 0xb2}, + {value: 0x00a5, lo: 0xb3, hi: 0xb3}, + {value: 0x0143, lo: 0xb4, hi: 0xb6}, + {value: 0x00af, lo: 0xb7, hi: 0xb7}, + {value: 0x00b3, lo: 0xb8, hi: 0xb8}, + // Block 0x3, offset 0x1b + {value: 0x000a, lo: 0x09}, + {value: 0x4271, lo: 0x98, hi: 0x98}, + {value: 0x4276, lo: 0x99, hi: 0x9a}, + {value: 0x4299, lo: 0x9b, hi: 0x9b}, + {value: 0x4262, lo: 0x9c, hi: 0x9c}, + {value: 0x4285, lo: 0x9d, hi: 0x9d}, + {value: 0x0113, lo: 0xa0, hi: 0xa0}, + {value: 0x0099, lo: 0xa1, hi: 0xa1}, + {value: 0x00a7, lo: 0xa2, hi: 0xa3}, + {value: 0x0167, lo: 0xa4, hi: 0xa4}, + // Block 0x4, offset 0x25 + {value: 0x0000, lo: 0x0f}, + {value: 0xa000, lo: 0x83, hi: 0x83}, + {value: 0xa000, lo: 0x87, hi: 0x87}, + {value: 0xa000, lo: 0x8b, hi: 0x8b}, + {value: 0xa000, lo: 0x8d, hi: 0x8d}, + {value: 0x37a8, lo: 0x90, hi: 0x90}, + {value: 0x37b4, lo: 0x91, hi: 0x91}, + {value: 0x37a2, lo: 0x93, hi: 0x93}, + {value: 0xa000, lo: 0x96, hi: 0x96}, + {value: 0x381a, lo: 0x97, hi: 0x97}, + {value: 0x37e4, lo: 0x9c, hi: 0x9c}, + {value: 0x37cc, lo: 0x9d, hi: 0x9d}, + {value: 0x37f6, lo: 0x9e, hi: 0x9e}, + {value: 0xa000, lo: 0xb4, hi: 0xb5}, + {value: 0x3820, lo: 0xb6, hi: 0xb6}, + {value: 0x3826, lo: 0xb7, hi: 0xb7}, + // Block 0x5, offset 0x35 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0x83, hi: 0x87}, + // Block 0x6, offset 0x37 + {value: 0x0001, lo: 0x04}, + {value: 0x8113, lo: 0x81, hi: 0x82}, + {value: 0x8132, lo: 0x84, hi: 0x84}, + {value: 0x812d, lo: 0x85, hi: 0x85}, + {value: 0x810d, lo: 0x87, hi: 0x87}, + // Block 0x7, offset 0x3c + {value: 0x0000, lo: 0x0a}, + {value: 0x8132, lo: 0x90, hi: 0x97}, + {value: 0x8119, lo: 0x98, hi: 0x98}, + {value: 0x811a, lo: 0x99, hi: 0x99}, + {value: 0x811b, lo: 0x9a, hi: 0x9a}, + {value: 0x3844, lo: 0xa2, hi: 0xa2}, + {value: 0x384a, lo: 0xa3, hi: 0xa3}, + {value: 0x3856, lo: 0xa4, hi: 0xa4}, + {value: 0x3850, lo: 0xa5, hi: 0xa5}, + {value: 0x385c, lo: 0xa6, hi: 0xa6}, + {value: 0xa000, lo: 0xa7, hi: 0xa7}, + // Block 0x8, offset 0x47 + {value: 0x0000, lo: 0x0e}, + {value: 0x386e, lo: 0x80, hi: 0x80}, + {value: 0xa000, lo: 0x81, hi: 0x81}, + {value: 0x3862, lo: 0x82, hi: 0x82}, + {value: 0xa000, lo: 0x92, hi: 0x92}, + {value: 0x3868, lo: 0x93, hi: 0x93}, + {value: 0xa000, lo: 0x95, hi: 0x95}, + {value: 0x8132, lo: 0x96, hi: 0x9c}, + {value: 0x8132, lo: 0x9f, hi: 0xa2}, + {value: 0x812d, lo: 0xa3, hi: 0xa3}, + {value: 0x8132, lo: 0xa4, hi: 0xa4}, + {value: 0x8132, lo: 0xa7, hi: 0xa8}, + {value: 0x812d, lo: 0xaa, hi: 0xaa}, + {value: 0x8132, lo: 0xab, hi: 0xac}, + {value: 0x812d, lo: 0xad, hi: 0xad}, + // Block 0x9, offset 0x56 + {value: 0x0000, lo: 0x0c}, + {value: 0x811f, lo: 0x91, hi: 0x91}, + {value: 0x8132, lo: 0xb0, hi: 0xb0}, + {value: 0x812d, lo: 0xb1, hi: 0xb1}, + {value: 0x8132, lo: 0xb2, hi: 0xb3}, + {value: 0x812d, lo: 0xb4, hi: 0xb4}, + {value: 0x8132, lo: 0xb5, hi: 0xb6}, + {value: 0x812d, lo: 0xb7, hi: 0xb9}, + {value: 0x8132, lo: 0xba, hi: 0xba}, + {value: 0x812d, lo: 0xbb, hi: 0xbc}, + {value: 0x8132, lo: 0xbd, hi: 0xbd}, + {value: 0x812d, lo: 0xbe, hi: 0xbe}, + {value: 0x8132, lo: 0xbf, hi: 0xbf}, + // Block 0xa, offset 0x63 + {value: 0x0005, lo: 0x07}, + {value: 0x8132, lo: 0x80, hi: 0x80}, + {value: 0x8132, lo: 0x81, hi: 0x81}, + {value: 0x812d, lo: 0x82, hi: 0x83}, + {value: 0x812d, lo: 0x84, hi: 0x85}, + {value: 0x812d, lo: 0x86, hi: 0x87}, + {value: 0x812d, lo: 0x88, hi: 0x89}, + {value: 0x8132, lo: 0x8a, hi: 0x8a}, + // Block 0xb, offset 0x6b + {value: 0x0000, lo: 0x04}, + {value: 0x8132, lo: 0xab, hi: 0xb1}, + {value: 0x812d, lo: 0xb2, hi: 0xb2}, + {value: 0x8132, lo: 0xb3, hi: 0xb3}, + {value: 0x812d, lo: 0xbd, hi: 0xbd}, + // Block 0xc, offset 0x70 + {value: 0x0000, lo: 0x04}, + {value: 0x8132, lo: 0x96, hi: 0x99}, + {value: 0x8132, lo: 0x9b, hi: 0xa3}, + {value: 0x8132, lo: 0xa5, hi: 0xa7}, + {value: 0x8132, lo: 0xa9, hi: 0xad}, + // Block 0xd, offset 0x75 + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0x99, hi: 0x9b}, + // Block 0xe, offset 0x77 + {value: 0x0000, lo: 0x07}, + {value: 0xa000, lo: 0xa8, hi: 0xa8}, + {value: 0x3edb, lo: 0xa9, hi: 0xa9}, + {value: 0xa000, lo: 0xb0, hi: 0xb0}, + {value: 0x3ee3, lo: 0xb1, hi: 0xb1}, + {value: 0xa000, lo: 0xb3, hi: 0xb3}, + {value: 0x3eeb, lo: 0xb4, hi: 0xb4}, + {value: 0x9902, lo: 0xbc, hi: 0xbc}, + // Block 0xf, offset 0x7f + {value: 0x0008, lo: 0x06}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x8132, lo: 0x91, hi: 0x91}, + {value: 0x812d, lo: 0x92, hi: 0x92}, + {value: 0x8132, lo: 0x93, hi: 0x93}, + {value: 0x8132, lo: 0x94, hi: 0x94}, + {value: 0x451f, lo: 0x98, hi: 0x9f}, + // Block 0x10, offset 0x86 + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0xbc, hi: 0xbc}, + {value: 0x9900, lo: 0xbe, hi: 0xbe}, + // Block 0x11, offset 0x89 + {value: 0x0008, lo: 0x07}, + {value: 0xa000, lo: 0x87, hi: 0x87}, + {value: 0x2ca1, lo: 0x8b, hi: 0x8c}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x97, hi: 0x97}, + {value: 0x455f, lo: 0x9c, hi: 0x9d}, + {value: 0x456f, lo: 0x9f, hi: 0x9f}, + {value: 0x8132, lo: 0xbe, hi: 0xbe}, + // Block 0x12, offset 0x91 + {value: 0x0000, lo: 0x03}, + {value: 0x4597, lo: 0xb3, hi: 0xb3}, + {value: 0x459f, lo: 0xb6, hi: 0xb6}, + {value: 0x8102, lo: 0xbc, hi: 0xbc}, + // Block 0x13, offset 0x95 + {value: 0x0008, lo: 0x03}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x4577, lo: 0x99, hi: 0x9b}, + {value: 0x458f, lo: 0x9e, hi: 0x9e}, + // Block 0x14, offset 0x99 + {value: 0x0000, lo: 0x01}, + {value: 0x8102, lo: 0xbc, hi: 0xbc}, + // Block 0x15, offset 0x9b + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + // Block 0x16, offset 0x9d + {value: 0x0000, lo: 0x08}, + {value: 0xa000, lo: 0x87, hi: 0x87}, + {value: 0x2cb9, lo: 0x88, hi: 0x88}, + {value: 0x2cb1, lo: 0x8b, hi: 0x8b}, + {value: 0x2cc1, lo: 0x8c, hi: 0x8c}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x96, hi: 0x97}, + {value: 0x45a7, lo: 0x9c, hi: 0x9c}, + {value: 0x45af, lo: 0x9d, hi: 0x9d}, + // Block 0x17, offset 0xa6 + {value: 0x0000, lo: 0x03}, + {value: 0xa000, lo: 0x92, hi: 0x92}, + {value: 0x2cc9, lo: 0x94, hi: 0x94}, + {value: 0x9900, lo: 0xbe, hi: 0xbe}, + // Block 0x18, offset 0xaa + {value: 0x0000, lo: 0x06}, + {value: 0xa000, lo: 0x86, hi: 0x87}, + {value: 0x2cd1, lo: 0x8a, hi: 0x8a}, + {value: 0x2ce1, lo: 0x8b, hi: 0x8b}, + {value: 0x2cd9, lo: 0x8c, hi: 0x8c}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x97, hi: 0x97}, + // Block 0x19, offset 0xb1 + {value: 0x1801, lo: 0x04}, + {value: 0xa000, lo: 0x86, hi: 0x86}, + {value: 0x3ef3, lo: 0x88, hi: 0x88}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x8120, lo: 0x95, hi: 0x96}, + // Block 0x1a, offset 0xb6 + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0xbc, hi: 0xbc}, + {value: 0xa000, lo: 0xbf, hi: 0xbf}, + // Block 0x1b, offset 0xb9 + {value: 0x0000, lo: 0x09}, + {value: 0x2ce9, lo: 0x80, hi: 0x80}, + {value: 0x9900, lo: 0x82, hi: 0x82}, + {value: 0xa000, lo: 0x86, hi: 0x86}, + {value: 0x2cf1, lo: 0x87, hi: 0x87}, + {value: 0x2cf9, lo: 0x88, hi: 0x88}, + {value: 0x2f53, lo: 0x8a, hi: 0x8a}, + {value: 0x2ddb, lo: 0x8b, hi: 0x8b}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x95, hi: 0x96}, + // Block 0x1c, offset 0xc3 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0xbb, hi: 0xbc}, + {value: 0x9900, lo: 0xbe, hi: 0xbe}, + // Block 0x1d, offset 0xc6 + {value: 0x0000, lo: 0x06}, + {value: 0xa000, lo: 0x86, hi: 0x87}, + {value: 0x2d01, lo: 0x8a, hi: 0x8a}, + {value: 0x2d11, lo: 0x8b, hi: 0x8b}, + {value: 0x2d09, lo: 0x8c, hi: 0x8c}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x97, hi: 0x97}, + // Block 0x1e, offset 0xcd + {value: 0x6be7, lo: 0x07}, + {value: 0x9904, lo: 0x8a, hi: 0x8a}, + {value: 0x9900, lo: 0x8f, hi: 0x8f}, + {value: 0xa000, lo: 0x99, hi: 0x99}, + {value: 0x3efb, lo: 0x9a, hi: 0x9a}, + {value: 0x2f5b, lo: 0x9c, hi: 0x9c}, + {value: 0x2de6, lo: 0x9d, hi: 0x9d}, + {value: 0x2d19, lo: 0x9e, hi: 0x9f}, + // Block 0x1f, offset 0xd5 + {value: 0x0000, lo: 0x03}, + {value: 0x2624, lo: 0xb3, hi: 0xb3}, + {value: 0x8122, lo: 0xb8, hi: 0xb9}, + {value: 0x8104, lo: 0xba, hi: 0xba}, + // Block 0x20, offset 0xd9 + {value: 0x0000, lo: 0x01}, + {value: 0x8123, lo: 0x88, hi: 0x8b}, + // Block 0x21, offset 0xdb + {value: 0x0000, lo: 0x03}, + {value: 0x2639, lo: 0xb3, hi: 0xb3}, + {value: 0x8124, lo: 0xb8, hi: 0xb9}, + {value: 0x8104, lo: 0xba, hi: 0xba}, + // Block 0x22, offset 0xdf + {value: 0x0000, lo: 0x03}, + {value: 0x8125, lo: 0x88, hi: 0x8b}, + {value: 0x262b, lo: 0x9c, hi: 0x9c}, + {value: 0x2632, lo: 0x9d, hi: 0x9d}, + // Block 0x23, offset 0xe3 + {value: 0x0000, lo: 0x05}, + {value: 0x030b, lo: 0x8c, hi: 0x8c}, + {value: 0x812d, lo: 0x98, hi: 0x99}, + {value: 0x812d, lo: 0xb5, hi: 0xb5}, + {value: 0x812d, lo: 0xb7, hi: 0xb7}, + {value: 0x812b, lo: 0xb9, hi: 0xb9}, + // Block 0x24, offset 0xe9 + {value: 0x0000, lo: 0x10}, + {value: 0x2647, lo: 0x83, hi: 0x83}, + {value: 0x264e, lo: 0x8d, hi: 0x8d}, + {value: 0x2655, lo: 0x92, hi: 0x92}, + {value: 0x265c, lo: 0x97, hi: 0x97}, + {value: 0x2663, lo: 0x9c, hi: 0x9c}, + {value: 0x2640, lo: 0xa9, hi: 0xa9}, + {value: 0x8126, lo: 0xb1, hi: 0xb1}, + {value: 0x8127, lo: 0xb2, hi: 0xb2}, + {value: 0x4a87, lo: 0xb3, hi: 0xb3}, + {value: 0x8128, lo: 0xb4, hi: 0xb4}, + {value: 0x4a90, lo: 0xb5, hi: 0xb5}, + {value: 0x45b7, lo: 0xb6, hi: 0xb6}, + {value: 0x45f7, lo: 0xb7, hi: 0xb7}, + {value: 0x45bf, lo: 0xb8, hi: 0xb8}, + {value: 0x4602, lo: 0xb9, hi: 0xb9}, + {value: 0x8127, lo: 0xba, hi: 0xbd}, + // Block 0x25, offset 0xfa + {value: 0x0000, lo: 0x0b}, + {value: 0x8127, lo: 0x80, hi: 0x80}, + {value: 0x4a99, lo: 0x81, hi: 0x81}, + {value: 0x8132, lo: 0x82, hi: 0x83}, + {value: 0x8104, lo: 0x84, hi: 0x84}, + {value: 0x8132, lo: 0x86, hi: 0x87}, + {value: 0x2671, lo: 0x93, hi: 0x93}, + {value: 0x2678, lo: 0x9d, hi: 0x9d}, + {value: 0x267f, lo: 0xa2, hi: 0xa2}, + {value: 0x2686, lo: 0xa7, hi: 0xa7}, + {value: 0x268d, lo: 0xac, hi: 0xac}, + {value: 0x266a, lo: 0xb9, hi: 0xb9}, + // Block 0x26, offset 0x106 + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0x86, hi: 0x86}, + // Block 0x27, offset 0x108 + {value: 0x0000, lo: 0x05}, + {value: 0xa000, lo: 0xa5, hi: 0xa5}, + {value: 0x2d21, lo: 0xa6, hi: 0xa6}, + {value: 0x9900, lo: 0xae, hi: 0xae}, + {value: 0x8102, lo: 0xb7, hi: 0xb7}, + {value: 0x8104, lo: 0xb9, hi: 0xba}, + // Block 0x28, offset 0x10e + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0x8d, hi: 0x8d}, + // Block 0x29, offset 0x110 + {value: 0x0000, lo: 0x01}, + {value: 0x030f, lo: 0xbc, hi: 0xbc}, + // Block 0x2a, offset 0x112 + {value: 0x0000, lo: 0x01}, + {value: 0xa000, lo: 0x80, hi: 0x92}, + // Block 0x2b, offset 0x114 + {value: 0x0000, lo: 0x01}, + {value: 0xb900, lo: 0xa1, hi: 0xb5}, + // Block 0x2c, offset 0x116 + {value: 0x0000, lo: 0x01}, + {value: 0x9900, lo: 0xa8, hi: 0xbf}, + // Block 0x2d, offset 0x118 + {value: 0x0000, lo: 0x01}, + {value: 0x9900, lo: 0x80, hi: 0x82}, + // Block 0x2e, offset 0x11a + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0x9d, hi: 0x9f}, + // Block 0x2f, offset 0x11c + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x94, hi: 0x94}, + {value: 0x8104, lo: 0xb4, hi: 0xb4}, + // Block 0x30, offset 0x11f + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x92, hi: 0x92}, + {value: 0x8132, lo: 0x9d, hi: 0x9d}, + // Block 0x31, offset 0x122 + {value: 0x0000, lo: 0x01}, + {value: 0x8131, lo: 0xa9, hi: 0xa9}, + // Block 0x32, offset 0x124 + {value: 0x0004, lo: 0x02}, + {value: 0x812e, lo: 0xb9, hi: 0xba}, + {value: 0x812d, lo: 0xbb, hi: 0xbb}, + // Block 0x33, offset 0x127 + {value: 0x0000, lo: 0x02}, + {value: 0x8132, lo: 0x97, hi: 0x97}, + {value: 0x812d, lo: 0x98, hi: 0x98}, + // Block 0x34, offset 0x12a + {value: 0x0000, lo: 0x03}, + {value: 0x8104, lo: 0xa0, hi: 0xa0}, + {value: 0x8132, lo: 0xb5, hi: 0xbc}, + {value: 0x812d, lo: 0xbf, hi: 0xbf}, + // Block 0x35, offset 0x12e + {value: 0x0000, lo: 0x04}, + {value: 0x8132, lo: 0xb0, hi: 0xb4}, + {value: 0x812d, lo: 0xb5, hi: 0xba}, + {value: 0x8132, lo: 0xbb, hi: 0xbc}, + {value: 0x812d, lo: 0xbd, hi: 0xbd}, + // Block 0x36, offset 0x133 + {value: 0x0000, lo: 0x08}, + {value: 0x2d69, lo: 0x80, hi: 0x80}, + {value: 0x2d71, lo: 0x81, hi: 0x81}, + {value: 0xa000, lo: 0x82, hi: 0x82}, + {value: 0x2d79, lo: 0x83, hi: 0x83}, + {value: 0x8104, lo: 0x84, hi: 0x84}, + {value: 0x8132, lo: 0xab, hi: 0xab}, + {value: 0x812d, lo: 0xac, hi: 0xac}, + {value: 0x8132, lo: 0xad, hi: 0xb3}, + // Block 0x37, offset 0x13c + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xaa, hi: 0xab}, + // Block 0x38, offset 0x13e + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0xa6, hi: 0xa6}, + {value: 0x8104, lo: 0xb2, hi: 0xb3}, + // Block 0x39, offset 0x141 + {value: 0x0000, lo: 0x01}, + {value: 0x8102, lo: 0xb7, hi: 0xb7}, + // Block 0x3a, offset 0x143 + {value: 0x0000, lo: 0x0a}, + {value: 0x8132, lo: 0x90, hi: 0x92}, + {value: 0x8101, lo: 0x94, hi: 0x94}, + {value: 0x812d, lo: 0x95, hi: 0x99}, + {value: 0x8132, lo: 0x9a, hi: 0x9b}, + {value: 0x812d, lo: 0x9c, hi: 0x9f}, + {value: 0x8132, lo: 0xa0, hi: 0xa0}, + {value: 0x8101, lo: 0xa2, hi: 0xa8}, + {value: 0x812d, lo: 0xad, hi: 0xad}, + {value: 0x8132, lo: 0xb4, hi: 0xb4}, + {value: 0x8132, lo: 0xb8, hi: 0xb9}, + // Block 0x3b, offset 0x14e + {value: 0x0002, lo: 0x0a}, + {value: 0x0043, lo: 0xac, hi: 0xac}, + {value: 0x00d1, lo: 0xad, hi: 0xad}, + {value: 0x0045, lo: 0xae, hi: 0xae}, + {value: 0x0049, lo: 0xb0, hi: 0xb1}, + {value: 0x00e6, lo: 0xb2, hi: 0xb2}, + {value: 0x004f, lo: 0xb3, hi: 0xba}, + {value: 0x005f, lo: 0xbc, hi: 0xbc}, + {value: 0x00ef, lo: 0xbd, hi: 0xbd}, + {value: 0x0061, lo: 0xbe, hi: 0xbe}, + {value: 0x0065, lo: 0xbf, hi: 0xbf}, + // Block 0x3c, offset 0x159 + {value: 0x0000, lo: 0x0d}, + {value: 0x0001, lo: 0x80, hi: 0x8a}, + {value: 0x043b, lo: 0x91, hi: 0x91}, + {value: 0x429e, lo: 0x97, hi: 0x97}, + {value: 0x001d, lo: 0xa4, hi: 0xa4}, + {value: 0x1873, lo: 0xa5, hi: 0xa5}, + {value: 0x1b5f, lo: 0xa6, hi: 0xa6}, + {value: 0x0001, lo: 0xaf, hi: 0xaf}, + {value: 0x2694, lo: 0xb3, hi: 0xb3}, + {value: 0x2801, lo: 0xb4, hi: 0xb4}, + {value: 0x269b, lo: 0xb6, hi: 0xb6}, + {value: 0x280b, lo: 0xb7, hi: 0xb7}, + {value: 0x186d, lo: 0xbc, hi: 0xbc}, + {value: 0x426c, lo: 0xbe, hi: 0xbe}, + // Block 0x3d, offset 0x167 + {value: 0x0002, lo: 0x0d}, + {value: 0x1933, lo: 0x87, hi: 0x87}, + {value: 0x1930, lo: 0x88, hi: 0x88}, + {value: 0x1870, lo: 0x89, hi: 0x89}, + {value: 0x2991, lo: 0x97, hi: 0x97}, + {value: 0x0001, lo: 0x9f, hi: 0x9f}, + {value: 0x0021, lo: 0xb0, hi: 0xb0}, + {value: 0x0093, lo: 0xb1, hi: 0xb1}, + {value: 0x0029, lo: 0xb4, hi: 0xb9}, + {value: 0x0017, lo: 0xba, hi: 0xba}, + {value: 0x0467, lo: 0xbb, hi: 0xbb}, + {value: 0x003b, lo: 0xbc, hi: 0xbc}, + {value: 0x0011, lo: 0xbd, hi: 0xbe}, + {value: 0x009d, lo: 0xbf, hi: 0xbf}, + // Block 0x3e, offset 0x175 + {value: 0x0002, lo: 0x0f}, + {value: 0x0021, lo: 0x80, hi: 0x89}, + {value: 0x0017, lo: 0x8a, hi: 0x8a}, + {value: 0x0467, lo: 0x8b, hi: 0x8b}, + {value: 0x003b, lo: 0x8c, hi: 0x8c}, + {value: 0x0011, lo: 0x8d, hi: 0x8e}, + {value: 0x0083, lo: 0x90, hi: 0x90}, + {value: 0x008b, lo: 0x91, hi: 0x91}, + {value: 0x009f, lo: 0x92, hi: 0x92}, + {value: 0x00b1, lo: 0x93, hi: 0x93}, + {value: 0x0104, lo: 0x94, hi: 0x94}, + {value: 0x0091, lo: 0x95, hi: 0x95}, + {value: 0x0097, lo: 0x96, hi: 0x99}, + {value: 0x00a1, lo: 0x9a, hi: 0x9a}, + {value: 0x00a7, lo: 0x9b, hi: 0x9c}, + {value: 0x199c, lo: 0xa8, hi: 0xa8}, + // Block 0x3f, offset 0x185 + {value: 0x0000, lo: 0x0d}, + {value: 0x8132, lo: 0x90, hi: 0x91}, + {value: 0x8101, lo: 0x92, hi: 0x93}, + {value: 0x8132, lo: 0x94, hi: 0x97}, + {value: 0x8101, lo: 0x98, hi: 0x9a}, + {value: 0x8132, lo: 0x9b, hi: 0x9c}, + {value: 0x8132, lo: 0xa1, hi: 0xa1}, + {value: 0x8101, lo: 0xa5, hi: 0xa6}, + {value: 0x8132, lo: 0xa7, hi: 0xa7}, + {value: 0x812d, lo: 0xa8, hi: 0xa8}, + {value: 0x8132, lo: 0xa9, hi: 0xa9}, + {value: 0x8101, lo: 0xaa, hi: 0xab}, + {value: 0x812d, lo: 0xac, hi: 0xaf}, + {value: 0x8132, lo: 0xb0, hi: 0xb0}, + // Block 0x40, offset 0x193 + {value: 0x0007, lo: 0x06}, + {value: 0x2183, lo: 0x89, hi: 0x89}, + {value: 0xa000, lo: 0x90, hi: 0x90}, + {value: 0xa000, lo: 0x92, hi: 0x92}, + {value: 0xa000, lo: 0x94, hi: 0x94}, + {value: 0x3bbc, lo: 0x9a, hi: 0x9b}, + {value: 0x3bca, lo: 0xae, hi: 0xae}, + // Block 0x41, offset 0x19a + {value: 0x000e, lo: 0x05}, + {value: 0x3bd1, lo: 0x8d, hi: 0x8e}, + {value: 0x3bd8, lo: 0x8f, hi: 0x8f}, + {value: 0xa000, lo: 0x90, hi: 0x90}, + {value: 0xa000, lo: 0x92, hi: 0x92}, + {value: 0xa000, lo: 0x94, hi: 0x94}, + // Block 0x42, offset 0x1a0 + {value: 0x0173, lo: 0x0e}, + {value: 0xa000, lo: 0x83, hi: 0x83}, + {value: 0x3be6, lo: 0x84, hi: 0x84}, + {value: 0xa000, lo: 0x88, hi: 0x88}, + {value: 0x3bed, lo: 0x89, hi: 0x89}, + {value: 0xa000, lo: 0x8b, hi: 0x8b}, + {value: 0x3bf4, lo: 0x8c, hi: 0x8c}, + {value: 0xa000, lo: 0xa3, hi: 0xa3}, + {value: 0x3bfb, lo: 0xa4, hi: 0xa4}, + {value: 0xa000, lo: 0xa5, hi: 0xa5}, + {value: 0x3c02, lo: 0xa6, hi: 0xa6}, + {value: 0x26a2, lo: 0xac, hi: 0xad}, + {value: 0x26a9, lo: 0xaf, hi: 0xaf}, + {value: 0x281f, lo: 0xb0, hi: 0xb0}, + {value: 0xa000, lo: 0xbc, hi: 0xbc}, + // Block 0x43, offset 0x1af + {value: 0x0007, lo: 0x03}, + {value: 0x3c6b, lo: 0xa0, hi: 0xa1}, + {value: 0x3c95, lo: 0xa2, hi: 0xa3}, + {value: 0x3cbf, lo: 0xaa, hi: 0xad}, + // Block 0x44, offset 0x1b3 + {value: 0x0004, lo: 0x01}, + {value: 0x048b, lo: 0xa9, hi: 0xaa}, + // Block 0x45, offset 0x1b5 + {value: 0x0002, lo: 0x03}, + {value: 0x0057, lo: 0x80, hi: 0x8f}, + {value: 0x0083, lo: 0x90, hi: 0xa9}, + {value: 0x0021, lo: 0xaa, hi: 0xaa}, + // Block 0x46, offset 0x1b9 + {value: 0x0000, lo: 0x01}, + {value: 0x299e, lo: 0x8c, hi: 0x8c}, + // Block 0x47, offset 0x1bb + {value: 0x0266, lo: 0x02}, + {value: 0x1b8f, lo: 0xb4, hi: 0xb4}, + {value: 0x192d, lo: 0xb5, hi: 0xb6}, + // Block 0x48, offset 0x1be + {value: 0x0000, lo: 0x01}, + {value: 0x44e0, lo: 0x9c, hi: 0x9c}, + // Block 0x49, offset 0x1c0 + {value: 0x0000, lo: 0x02}, + {value: 0x0095, lo: 0xbc, hi: 0xbc}, + {value: 0x006d, lo: 0xbd, hi: 0xbd}, + // Block 0x4a, offset 0x1c3 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xaf, hi: 0xb1}, + // Block 0x4b, offset 0x1c5 + {value: 0x0000, lo: 0x02}, + {value: 0x047f, lo: 0xaf, hi: 0xaf}, + {value: 0x8104, lo: 0xbf, hi: 0xbf}, + // Block 0x4c, offset 0x1c8 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xa0, hi: 0xbf}, + // Block 0x4d, offset 0x1ca + {value: 0x0000, lo: 0x01}, + {value: 0x0dc3, lo: 0x9f, hi: 0x9f}, + // Block 0x4e, offset 0x1cc + {value: 0x0000, lo: 0x01}, + {value: 0x162f, lo: 0xb3, hi: 0xb3}, + // Block 0x4f, offset 0x1ce + {value: 0x0004, lo: 0x0b}, + {value: 0x1597, lo: 0x80, hi: 0x82}, + {value: 0x15af, lo: 0x83, hi: 0x83}, + {value: 0x15c7, lo: 0x84, hi: 0x85}, + {value: 0x15d7, lo: 0x86, hi: 0x89}, + {value: 0x15eb, lo: 0x8a, hi: 0x8c}, + {value: 0x15ff, lo: 0x8d, hi: 0x8d}, + {value: 0x1607, lo: 0x8e, hi: 0x8e}, + {value: 0x160f, lo: 0x8f, hi: 0x90}, + {value: 0x161b, lo: 0x91, hi: 0x93}, + {value: 0x162b, lo: 0x94, hi: 0x94}, + {value: 0x1633, lo: 0x95, hi: 0x95}, + // Block 0x50, offset 0x1da + {value: 0x0004, lo: 0x09}, + {value: 0x0001, lo: 0x80, hi: 0x80}, + {value: 0x812c, lo: 0xaa, hi: 0xaa}, + {value: 0x8131, lo: 0xab, hi: 0xab}, + {value: 0x8133, lo: 0xac, hi: 0xac}, + {value: 0x812e, lo: 0xad, hi: 0xad}, + {value: 0x812f, lo: 0xae, hi: 0xae}, + {value: 0x812f, lo: 0xaf, hi: 0xaf}, + {value: 0x04b3, lo: 0xb6, hi: 0xb6}, + {value: 0x0887, lo: 0xb8, hi: 0xba}, + // Block 0x51, offset 0x1e4 + {value: 0x0006, lo: 0x09}, + {value: 0x0313, lo: 0xb1, hi: 0xb1}, + {value: 0x0317, lo: 0xb2, hi: 0xb2}, + {value: 0x4a3e, lo: 0xb3, hi: 0xb3}, + {value: 0x031b, lo: 0xb4, hi: 0xb4}, + {value: 0x4a44, lo: 0xb5, hi: 0xb6}, + {value: 0x031f, lo: 0xb7, hi: 0xb7}, + {value: 0x0323, lo: 0xb8, hi: 0xb8}, + {value: 0x0327, lo: 0xb9, hi: 0xb9}, + {value: 0x4a50, lo: 0xba, hi: 0xbf}, + // Block 0x52, offset 0x1ee + {value: 0x0000, lo: 0x02}, + {value: 0x8132, lo: 0xaf, hi: 0xaf}, + {value: 0x8132, lo: 0xb4, hi: 0xbd}, + // Block 0x53, offset 0x1f1 + {value: 0x0000, lo: 0x03}, + {value: 0x020f, lo: 0x9c, hi: 0x9c}, + {value: 0x0212, lo: 0x9d, hi: 0x9d}, + {value: 0x8132, lo: 0x9e, hi: 0x9f}, + // Block 0x54, offset 0x1f5 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xb0, hi: 0xb1}, + // Block 0x55, offset 0x1f7 + {value: 0x0000, lo: 0x01}, + {value: 0x163b, lo: 0xb0, hi: 0xb0}, + // Block 0x56, offset 0x1f9 + {value: 0x000c, lo: 0x01}, + {value: 0x00d7, lo: 0xb8, hi: 0xb9}, + // Block 0x57, offset 0x1fb + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x86, hi: 0x86}, + // Block 0x58, offset 0x1fd + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x84, hi: 0x84}, + {value: 0x8132, lo: 0xa0, hi: 0xb1}, + // Block 0x59, offset 0x200 + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0xab, hi: 0xad}, + // Block 0x5a, offset 0x202 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x93, hi: 0x93}, + // Block 0x5b, offset 0x204 + {value: 0x0000, lo: 0x01}, + {value: 0x8102, lo: 0xb3, hi: 0xb3}, + // Block 0x5c, offset 0x206 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x80, hi: 0x80}, + // Block 0x5d, offset 0x208 + {value: 0x0000, lo: 0x05}, + {value: 0x8132, lo: 0xb0, hi: 0xb0}, + {value: 0x8132, lo: 0xb2, hi: 0xb3}, + {value: 0x812d, lo: 0xb4, hi: 0xb4}, + {value: 0x8132, lo: 0xb7, hi: 0xb8}, + {value: 0x8132, lo: 0xbe, hi: 0xbf}, + // Block 0x5e, offset 0x20e + {value: 0x0000, lo: 0x02}, + {value: 0x8132, lo: 0x81, hi: 0x81}, + {value: 0x8104, lo: 0xb6, hi: 0xb6}, + // Block 0x5f, offset 0x211 + {value: 0x0008, lo: 0x03}, + {value: 0x1637, lo: 0x9c, hi: 0x9d}, + {value: 0x0125, lo: 0x9e, hi: 0x9e}, + {value: 0x1643, lo: 0x9f, hi: 0x9f}, + // Block 0x60, offset 0x215 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xad, hi: 0xad}, + // Block 0x61, offset 0x217 + {value: 0x0000, lo: 0x06}, + {value: 0xe500, lo: 0x80, hi: 0x80}, + {value: 0xc600, lo: 0x81, hi: 0x9b}, + {value: 0xe500, lo: 0x9c, hi: 0x9c}, + {value: 0xc600, lo: 0x9d, hi: 0xb7}, + {value: 0xe500, lo: 0xb8, hi: 0xb8}, + {value: 0xc600, lo: 0xb9, hi: 0xbf}, + // Block 0x62, offset 0x21e + {value: 0x0000, lo: 0x05}, + {value: 0xc600, lo: 0x80, hi: 0x93}, + {value: 0xe500, lo: 0x94, hi: 0x94}, + {value: 0xc600, lo: 0x95, hi: 0xaf}, + {value: 0xe500, lo: 0xb0, hi: 0xb0}, + {value: 0xc600, lo: 0xb1, hi: 0xbf}, + // Block 0x63, offset 0x224 + {value: 0x0000, lo: 0x05}, + {value: 0xc600, lo: 0x80, hi: 0x8b}, + {value: 0xe500, lo: 0x8c, hi: 0x8c}, + {value: 0xc600, lo: 0x8d, hi: 0xa7}, + {value: 0xe500, lo: 0xa8, hi: 0xa8}, + {value: 0xc600, lo: 0xa9, hi: 0xbf}, + // Block 0x64, offset 0x22a + {value: 0x0000, lo: 0x07}, + {value: 0xc600, lo: 0x80, hi: 0x83}, + {value: 0xe500, lo: 0x84, hi: 0x84}, + {value: 0xc600, lo: 0x85, hi: 0x9f}, + {value: 0xe500, lo: 0xa0, hi: 0xa0}, + {value: 0xc600, lo: 0xa1, hi: 0xbb}, + {value: 0xe500, lo: 0xbc, hi: 0xbc}, + {value: 0xc600, lo: 0xbd, hi: 0xbf}, + // Block 0x65, offset 0x232 + {value: 0x0000, lo: 0x05}, + {value: 0xc600, lo: 0x80, hi: 0x97}, + {value: 0xe500, lo: 0x98, hi: 0x98}, + {value: 0xc600, lo: 0x99, hi: 0xb3}, + {value: 0xe500, lo: 0xb4, hi: 0xb4}, + {value: 0xc600, lo: 0xb5, hi: 0xbf}, + // Block 0x66, offset 0x238 + {value: 0x0000, lo: 0x05}, + {value: 0xc600, lo: 0x80, hi: 0x8f}, + {value: 0xe500, lo: 0x90, hi: 0x90}, + {value: 0xc600, lo: 0x91, hi: 0xab}, + {value: 0xe500, lo: 0xac, hi: 0xac}, + {value: 0xc600, lo: 0xad, hi: 0xbf}, + // Block 0x67, offset 0x23e + {value: 0x0000, lo: 0x05}, + {value: 0xc600, lo: 0x80, hi: 0x87}, + {value: 0xe500, lo: 0x88, hi: 0x88}, + {value: 0xc600, lo: 0x89, hi: 0xa3}, + {value: 0xe500, lo: 0xa4, hi: 0xa4}, + {value: 0xc600, lo: 0xa5, hi: 0xbf}, + // Block 0x68, offset 0x244 + {value: 0x0000, lo: 0x03}, + {value: 0xc600, lo: 0x80, hi: 0x87}, + {value: 0xe500, lo: 0x88, hi: 0x88}, + {value: 0xc600, lo: 0x89, hi: 0xa3}, + // Block 0x69, offset 0x248 + {value: 0x0002, lo: 0x01}, + {value: 0x0003, lo: 0x81, hi: 0xbf}, + // Block 0x6a, offset 0x24a + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0xbd, hi: 0xbd}, + // Block 0x6b, offset 0x24c + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0xa0, hi: 0xa0}, + // Block 0x6c, offset 0x24e + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xb6, hi: 0xba}, + // Block 0x6d, offset 0x250 + {value: 0x002c, lo: 0x05}, + {value: 0x812d, lo: 0x8d, hi: 0x8d}, + {value: 0x8132, lo: 0x8f, hi: 0x8f}, + {value: 0x8132, lo: 0xb8, hi: 0xb8}, + {value: 0x8101, lo: 0xb9, hi: 0xba}, + {value: 0x8104, lo: 0xbf, hi: 0xbf}, + // Block 0x6e, offset 0x256 + {value: 0x0000, lo: 0x02}, + {value: 0x8132, lo: 0xa5, hi: 0xa5}, + {value: 0x812d, lo: 0xa6, hi: 0xa6}, + // Block 0x6f, offset 0x259 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xa4, hi: 0xa7}, + // Block 0x70, offset 0x25b + {value: 0x0000, lo: 0x05}, + {value: 0x812d, lo: 0x86, hi: 0x87}, + {value: 0x8132, lo: 0x88, hi: 0x8a}, + {value: 0x812d, lo: 0x8b, hi: 0x8b}, + {value: 0x8132, lo: 0x8c, hi: 0x8c}, + {value: 0x812d, lo: 0x8d, hi: 0x90}, + // Block 0x71, offset 0x261 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x86, hi: 0x86}, + {value: 0x8104, lo: 0xbf, hi: 0xbf}, + // Block 0x72, offset 0x264 + {value: 0x17fe, lo: 0x07}, + {value: 0xa000, lo: 0x99, hi: 0x99}, + {value: 0x423b, lo: 0x9a, hi: 0x9a}, + {value: 0xa000, lo: 0x9b, hi: 0x9b}, + {value: 0x4245, lo: 0x9c, hi: 0x9c}, + {value: 0xa000, lo: 0xa5, hi: 0xa5}, + {value: 0x424f, lo: 0xab, hi: 0xab}, + {value: 0x8104, lo: 0xb9, hi: 0xba}, + // Block 0x73, offset 0x26c + {value: 0x0000, lo: 0x06}, + {value: 0x8132, lo: 0x80, hi: 0x82}, + {value: 0x9900, lo: 0xa7, hi: 0xa7}, + {value: 0x2d81, lo: 0xae, hi: 0xae}, + {value: 0x2d8b, lo: 0xaf, hi: 0xaf}, + {value: 0xa000, lo: 0xb1, hi: 0xb2}, + {value: 0x8104, lo: 0xb3, hi: 0xb4}, + // Block 0x74, offset 0x273 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x80, hi: 0x80}, + {value: 0x8102, lo: 0x8a, hi: 0x8a}, + // Block 0x75, offset 0x276 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0xb5, hi: 0xb5}, + {value: 0x8102, lo: 0xb6, hi: 0xb6}, + // Block 0x76, offset 0x279 + {value: 0x0002, lo: 0x01}, + {value: 0x8102, lo: 0xa9, hi: 0xaa}, + // Block 0x77, offset 0x27b + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0xbb, hi: 0xbc}, + {value: 0x9900, lo: 0xbe, hi: 0xbe}, + // Block 0x78, offset 0x27e + {value: 0x0000, lo: 0x07}, + {value: 0xa000, lo: 0x87, hi: 0x87}, + {value: 0x2d95, lo: 0x8b, hi: 0x8b}, + {value: 0x2d9f, lo: 0x8c, hi: 0x8c}, + {value: 0x8104, lo: 0x8d, hi: 0x8d}, + {value: 0x9900, lo: 0x97, hi: 0x97}, + {value: 0x8132, lo: 0xa6, hi: 0xac}, + {value: 0x8132, lo: 0xb0, hi: 0xb4}, + // Block 0x79, offset 0x286 + {value: 0x0000, lo: 0x03}, + {value: 0x8104, lo: 0x82, hi: 0x82}, + {value: 0x8102, lo: 0x86, hi: 0x86}, + {value: 0x8132, lo: 0x9e, hi: 0x9e}, + // Block 0x7a, offset 0x28a + {value: 0x6b57, lo: 0x06}, + {value: 0x9900, lo: 0xb0, hi: 0xb0}, + {value: 0xa000, lo: 0xb9, hi: 0xb9}, + {value: 0x9900, lo: 0xba, hi: 0xba}, + {value: 0x2db3, lo: 0xbb, hi: 0xbb}, + {value: 0x2da9, lo: 0xbc, hi: 0xbd}, + {value: 0x2dbd, lo: 0xbe, hi: 0xbe}, + // Block 0x7b, offset 0x291 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0x82, hi: 0x82}, + {value: 0x8102, lo: 0x83, hi: 0x83}, + // Block 0x7c, offset 0x294 + {value: 0x0000, lo: 0x05}, + {value: 0x9900, lo: 0xaf, hi: 0xaf}, + {value: 0xa000, lo: 0xb8, hi: 0xb9}, + {value: 0x2dc7, lo: 0xba, hi: 0xba}, + {value: 0x2dd1, lo: 0xbb, hi: 0xbb}, + {value: 0x8104, lo: 0xbf, hi: 0xbf}, + // Block 0x7d, offset 0x29a + {value: 0x0000, lo: 0x01}, + {value: 0x8102, lo: 0x80, hi: 0x80}, + // Block 0x7e, offset 0x29c + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xbf, hi: 0xbf}, + // Block 0x7f, offset 0x29e + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0xb6, hi: 0xb6}, + {value: 0x8102, lo: 0xb7, hi: 0xb7}, + // Block 0x80, offset 0x2a1 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xab, hi: 0xab}, + // Block 0x81, offset 0x2a3 + {value: 0x0000, lo: 0x02}, + {value: 0x8104, lo: 0xb9, hi: 0xb9}, + {value: 0x8102, lo: 0xba, hi: 0xba}, + // Block 0x82, offset 0x2a6 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xa0, hi: 0xa0}, + // Block 0x83, offset 0x2a8 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0xb4, hi: 0xb4}, + // Block 0x84, offset 0x2aa + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x87, hi: 0x87}, + // Block 0x85, offset 0x2ac + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x99, hi: 0x99}, + // Block 0x86, offset 0x2ae + {value: 0x0000, lo: 0x02}, + {value: 0x8102, lo: 0x82, hi: 0x82}, + {value: 0x8104, lo: 0x84, hi: 0x85}, + // Block 0x87, offset 0x2b1 + {value: 0x0000, lo: 0x01}, + {value: 0x8104, lo: 0x97, hi: 0x97}, + // Block 0x88, offset 0x2b3 + {value: 0x0000, lo: 0x01}, + {value: 0x8101, lo: 0xb0, hi: 0xb4}, + // Block 0x89, offset 0x2b5 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xb0, hi: 0xb6}, + // Block 0x8a, offset 0x2b7 + {value: 0x0000, lo: 0x01}, + {value: 0x8101, lo: 0x9e, hi: 0x9e}, + // Block 0x8b, offset 0x2b9 + {value: 0x0000, lo: 0x0c}, + {value: 0x45cf, lo: 0x9e, hi: 0x9e}, + {value: 0x45d9, lo: 0x9f, hi: 0x9f}, + {value: 0x460d, lo: 0xa0, hi: 0xa0}, + {value: 0x461b, lo: 0xa1, hi: 0xa1}, + {value: 0x4629, lo: 0xa2, hi: 0xa2}, + {value: 0x4637, lo: 0xa3, hi: 0xa3}, + {value: 0x4645, lo: 0xa4, hi: 0xa4}, + {value: 0x812b, lo: 0xa5, hi: 0xa6}, + {value: 0x8101, lo: 0xa7, hi: 0xa9}, + {value: 0x8130, lo: 0xad, hi: 0xad}, + {value: 0x812b, lo: 0xae, hi: 0xb2}, + {value: 0x812d, lo: 0xbb, hi: 0xbf}, + // Block 0x8c, offset 0x2c6 + {value: 0x0000, lo: 0x09}, + {value: 0x812d, lo: 0x80, hi: 0x82}, + {value: 0x8132, lo: 0x85, hi: 0x89}, + {value: 0x812d, lo: 0x8a, hi: 0x8b}, + {value: 0x8132, lo: 0xaa, hi: 0xad}, + {value: 0x45e3, lo: 0xbb, hi: 0xbb}, + {value: 0x45ed, lo: 0xbc, hi: 0xbc}, + {value: 0x4653, lo: 0xbd, hi: 0xbd}, + {value: 0x466f, lo: 0xbe, hi: 0xbe}, + {value: 0x4661, lo: 0xbf, hi: 0xbf}, + // Block 0x8d, offset 0x2d0 + {value: 0x0000, lo: 0x01}, + {value: 0x467d, lo: 0x80, hi: 0x80}, + // Block 0x8e, offset 0x2d2 + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0x82, hi: 0x84}, + // Block 0x8f, offset 0x2d4 + {value: 0x0002, lo: 0x03}, + {value: 0x0043, lo: 0x80, hi: 0x99}, + {value: 0x0083, lo: 0x9a, hi: 0xb3}, + {value: 0x0043, lo: 0xb4, hi: 0xbf}, + // Block 0x90, offset 0x2d8 + {value: 0x0002, lo: 0x04}, + {value: 0x005b, lo: 0x80, hi: 0x8d}, + {value: 0x0083, lo: 0x8e, hi: 0x94}, + {value: 0x0093, lo: 0x96, hi: 0xa7}, + {value: 0x0043, lo: 0xa8, hi: 0xbf}, + // Block 0x91, offset 0x2dd + {value: 0x0002, lo: 0x0b}, + {value: 0x0073, lo: 0x80, hi: 0x81}, + {value: 0x0083, lo: 0x82, hi: 0x9b}, + {value: 0x0043, lo: 0x9c, hi: 0x9c}, + {value: 0x0047, lo: 0x9e, hi: 0x9f}, + {value: 0x004f, lo: 0xa2, hi: 0xa2}, + {value: 0x0055, lo: 0xa5, hi: 0xa6}, + {value: 0x005d, lo: 0xa9, hi: 0xac}, + {value: 0x0067, lo: 0xae, hi: 0xb5}, + {value: 0x0083, lo: 0xb6, hi: 0xb9}, + {value: 0x008d, lo: 0xbb, hi: 0xbb}, + {value: 0x0091, lo: 0xbd, hi: 0xbf}, + // Block 0x92, offset 0x2e9 + {value: 0x0002, lo: 0x04}, + {value: 0x0097, lo: 0x80, hi: 0x83}, + {value: 0x00a1, lo: 0x85, hi: 0x8f}, + {value: 0x0043, lo: 0x90, hi: 0xa9}, + {value: 0x0083, lo: 0xaa, hi: 0xbf}, + // Block 0x93, offset 0x2ee + {value: 0x0002, lo: 0x08}, + {value: 0x00af, lo: 0x80, hi: 0x83}, + {value: 0x0043, lo: 0x84, hi: 0x85}, + {value: 0x0049, lo: 0x87, hi: 0x8a}, + {value: 0x0055, lo: 0x8d, hi: 0x94}, + {value: 0x0067, lo: 0x96, hi: 0x9c}, + {value: 0x0083, lo: 0x9e, hi: 0xb7}, + {value: 0x0043, lo: 0xb8, hi: 0xb9}, + {value: 0x0049, lo: 0xbb, hi: 0xbe}, + // Block 0x94, offset 0x2f7 + {value: 0x0002, lo: 0x05}, + {value: 0x0053, lo: 0x80, hi: 0x84}, + {value: 0x005f, lo: 0x86, hi: 0x86}, + {value: 0x0067, lo: 0x8a, hi: 0x90}, + {value: 0x0083, lo: 0x92, hi: 0xab}, + {value: 0x0043, lo: 0xac, hi: 0xbf}, + // Block 0x95, offset 0x2fd + {value: 0x0002, lo: 0x04}, + {value: 0x006b, lo: 0x80, hi: 0x85}, + {value: 0x0083, lo: 0x86, hi: 0x9f}, + {value: 0x0043, lo: 0xa0, hi: 0xb9}, + {value: 0x0083, lo: 0xba, hi: 0xbf}, + // Block 0x96, offset 0x302 + {value: 0x0002, lo: 0x03}, + {value: 0x008f, lo: 0x80, hi: 0x93}, + {value: 0x0043, lo: 0x94, hi: 0xad}, + {value: 0x0083, lo: 0xae, hi: 0xbf}, + // Block 0x97, offset 0x306 + {value: 0x0002, lo: 0x04}, + {value: 0x00a7, lo: 0x80, hi: 0x87}, + {value: 0x0043, lo: 0x88, hi: 0xa1}, + {value: 0x0083, lo: 0xa2, hi: 0xbb}, + {value: 0x0043, lo: 0xbc, hi: 0xbf}, + // Block 0x98, offset 0x30b + {value: 0x0002, lo: 0x03}, + {value: 0x004b, lo: 0x80, hi: 0x95}, + {value: 0x0083, lo: 0x96, hi: 0xaf}, + {value: 0x0043, lo: 0xb0, hi: 0xbf}, + // Block 0x99, offset 0x30f + {value: 0x0003, lo: 0x0f}, + {value: 0x01b8, lo: 0x80, hi: 0x80}, + {value: 0x045f, lo: 0x81, hi: 0x81}, + {value: 0x01bb, lo: 0x82, hi: 0x9a}, + {value: 0x045b, lo: 0x9b, hi: 0x9b}, + {value: 0x01c7, lo: 0x9c, hi: 0x9c}, + {value: 0x01d0, lo: 0x9d, hi: 0x9d}, + {value: 0x01d6, lo: 0x9e, hi: 0x9e}, + {value: 0x01fa, lo: 0x9f, hi: 0x9f}, + {value: 0x01eb, lo: 0xa0, hi: 0xa0}, + {value: 0x01e8, lo: 0xa1, hi: 0xa1}, + {value: 0x0173, lo: 0xa2, hi: 0xb2}, + {value: 0x0188, lo: 0xb3, hi: 0xb3}, + {value: 0x01a6, lo: 0xb4, hi: 0xba}, + {value: 0x045f, lo: 0xbb, hi: 0xbb}, + {value: 0x01bb, lo: 0xbc, hi: 0xbf}, + // Block 0x9a, offset 0x31f + {value: 0x0003, lo: 0x0d}, + {value: 0x01c7, lo: 0x80, hi: 0x94}, + {value: 0x045b, lo: 0x95, hi: 0x95}, + {value: 0x01c7, lo: 0x96, hi: 0x96}, + {value: 0x01d0, lo: 0x97, hi: 0x97}, + {value: 0x01d6, lo: 0x98, hi: 0x98}, + {value: 0x01fa, lo: 0x99, hi: 0x99}, + {value: 0x01eb, lo: 0x9a, hi: 0x9a}, + {value: 0x01e8, lo: 0x9b, hi: 0x9b}, + {value: 0x0173, lo: 0x9c, hi: 0xac}, + {value: 0x0188, lo: 0xad, hi: 0xad}, + {value: 0x01a6, lo: 0xae, hi: 0xb4}, + {value: 0x045f, lo: 0xb5, hi: 0xb5}, + {value: 0x01bb, lo: 0xb6, hi: 0xbf}, + // Block 0x9b, offset 0x32d + {value: 0x0003, lo: 0x0d}, + {value: 0x01d9, lo: 0x80, hi: 0x8e}, + {value: 0x045b, lo: 0x8f, hi: 0x8f}, + {value: 0x01c7, lo: 0x90, hi: 0x90}, + {value: 0x01d0, lo: 0x91, hi: 0x91}, + {value: 0x01d6, lo: 0x92, hi: 0x92}, + {value: 0x01fa, lo: 0x93, hi: 0x93}, + {value: 0x01eb, lo: 0x94, hi: 0x94}, + {value: 0x01e8, lo: 0x95, hi: 0x95}, + {value: 0x0173, lo: 0x96, hi: 0xa6}, + {value: 0x0188, lo: 0xa7, hi: 0xa7}, + {value: 0x01a6, lo: 0xa8, hi: 0xae}, + {value: 0x045f, lo: 0xaf, hi: 0xaf}, + {value: 0x01bb, lo: 0xb0, hi: 0xbf}, + // Block 0x9c, offset 0x33b + {value: 0x0003, lo: 0x0d}, + {value: 0x01eb, lo: 0x80, hi: 0x88}, + {value: 0x045b, lo: 0x89, hi: 0x89}, + {value: 0x01c7, lo: 0x8a, hi: 0x8a}, + {value: 0x01d0, lo: 0x8b, hi: 0x8b}, + {value: 0x01d6, lo: 0x8c, hi: 0x8c}, + {value: 0x01fa, lo: 0x8d, hi: 0x8d}, + {value: 0x01eb, lo: 0x8e, hi: 0x8e}, + {value: 0x01e8, lo: 0x8f, hi: 0x8f}, + {value: 0x0173, lo: 0x90, hi: 0xa0}, + {value: 0x0188, lo: 0xa1, hi: 0xa1}, + {value: 0x01a6, lo: 0xa2, hi: 0xa8}, + {value: 0x045f, lo: 0xa9, hi: 0xa9}, + {value: 0x01bb, lo: 0xaa, hi: 0xbf}, + // Block 0x9d, offset 0x349 + {value: 0x0000, lo: 0x05}, + {value: 0x8132, lo: 0x80, hi: 0x86}, + {value: 0x8132, lo: 0x88, hi: 0x98}, + {value: 0x8132, lo: 0x9b, hi: 0xa1}, + {value: 0x8132, lo: 0xa3, hi: 0xa4}, + {value: 0x8132, lo: 0xa6, hi: 0xaa}, + // Block 0x9e, offset 0x34f + {value: 0x0000, lo: 0x01}, + {value: 0x8132, lo: 0xac, hi: 0xaf}, + // Block 0x9f, offset 0x351 + {value: 0x0000, lo: 0x01}, + {value: 0x812d, lo: 0x90, hi: 0x96}, + // Block 0xa0, offset 0x353 + {value: 0x0000, lo: 0x02}, + {value: 0x8132, lo: 0x84, hi: 0x89}, + {value: 0x8102, lo: 0x8a, hi: 0x8a}, + // Block 0xa1, offset 0x356 + {value: 0x0002, lo: 0x0a}, + {value: 0x0063, lo: 0x80, hi: 0x89}, + {value: 0x1951, lo: 0x8a, hi: 0x8a}, + {value: 0x1984, lo: 0x8b, hi: 0x8b}, + {value: 0x199f, lo: 0x8c, hi: 0x8c}, + {value: 0x19a5, lo: 0x8d, hi: 0x8d}, + {value: 0x1bc3, lo: 0x8e, hi: 0x8e}, + {value: 0x19b1, lo: 0x8f, hi: 0x8f}, + {value: 0x197b, lo: 0xaa, hi: 0xaa}, + {value: 0x197e, lo: 0xab, hi: 0xab}, + {value: 0x1981, lo: 0xac, hi: 0xac}, + // Block 0xa2, offset 0x361 + {value: 0x0000, lo: 0x01}, + {value: 0x193f, lo: 0x90, hi: 0x90}, + // Block 0xa3, offset 0x363 + {value: 0x0028, lo: 0x09}, + {value: 0x2865, lo: 0x80, hi: 0x80}, + {value: 0x2829, lo: 0x81, hi: 0x81}, + {value: 0x2833, lo: 0x82, hi: 0x82}, + {value: 0x2847, lo: 0x83, hi: 0x84}, + {value: 0x2851, lo: 0x85, hi: 0x86}, + {value: 0x283d, lo: 0x87, hi: 0x87}, + {value: 0x285b, lo: 0x88, hi: 0x88}, + {value: 0x0b6f, lo: 0x90, hi: 0x90}, + {value: 0x08e7, lo: 0x91, hi: 0x91}, +} + +// recompMap: 7520 bytes (entries only) +var recompMap map[uint32]rune +var recompMapOnce sync.Once + +const recompMapPacked = "" + + "\x00A\x03\x00\x00\x00\x00\xc0" + // 0x00410300: 0x000000C0 + "\x00A\x03\x01\x00\x00\x00\xc1" + // 0x00410301: 0x000000C1 + "\x00A\x03\x02\x00\x00\x00\xc2" + // 0x00410302: 0x000000C2 + "\x00A\x03\x03\x00\x00\x00\xc3" + // 0x00410303: 0x000000C3 + "\x00A\x03\b\x00\x00\x00\xc4" + // 0x00410308: 0x000000C4 + "\x00A\x03\n\x00\x00\x00\xc5" + // 0x0041030A: 0x000000C5 + "\x00C\x03'\x00\x00\x00\xc7" + // 0x00430327: 0x000000C7 + "\x00E\x03\x00\x00\x00\x00\xc8" + // 0x00450300: 0x000000C8 + "\x00E\x03\x01\x00\x00\x00\xc9" + // 0x00450301: 0x000000C9 + "\x00E\x03\x02\x00\x00\x00\xca" + // 0x00450302: 0x000000CA + "\x00E\x03\b\x00\x00\x00\xcb" + // 0x00450308: 0x000000CB + "\x00I\x03\x00\x00\x00\x00\xcc" + // 0x00490300: 0x000000CC + "\x00I\x03\x01\x00\x00\x00\xcd" + // 0x00490301: 0x000000CD + "\x00I\x03\x02\x00\x00\x00\xce" + // 0x00490302: 0x000000CE + "\x00I\x03\b\x00\x00\x00\xcf" + // 0x00490308: 0x000000CF + "\x00N\x03\x03\x00\x00\x00\xd1" + // 0x004E0303: 0x000000D1 + "\x00O\x03\x00\x00\x00\x00\xd2" + // 0x004F0300: 0x000000D2 + "\x00O\x03\x01\x00\x00\x00\xd3" + // 0x004F0301: 0x000000D3 + "\x00O\x03\x02\x00\x00\x00\xd4" + // 0x004F0302: 0x000000D4 + "\x00O\x03\x03\x00\x00\x00\xd5" + // 0x004F0303: 0x000000D5 + "\x00O\x03\b\x00\x00\x00\xd6" + // 0x004F0308: 0x000000D6 + "\x00U\x03\x00\x00\x00\x00\xd9" + // 0x00550300: 0x000000D9 + "\x00U\x03\x01\x00\x00\x00\xda" + // 0x00550301: 0x000000DA + "\x00U\x03\x02\x00\x00\x00\xdb" + // 0x00550302: 0x000000DB + "\x00U\x03\b\x00\x00\x00\xdc" + // 0x00550308: 0x000000DC + "\x00Y\x03\x01\x00\x00\x00\xdd" + // 0x00590301: 0x000000DD + "\x00a\x03\x00\x00\x00\x00\xe0" + // 0x00610300: 0x000000E0 + "\x00a\x03\x01\x00\x00\x00\xe1" + // 0x00610301: 0x000000E1 + "\x00a\x03\x02\x00\x00\x00\xe2" + // 0x00610302: 0x000000E2 + "\x00a\x03\x03\x00\x00\x00\xe3" + // 0x00610303: 0x000000E3 + "\x00a\x03\b\x00\x00\x00\xe4" + // 0x00610308: 0x000000E4 + "\x00a\x03\n\x00\x00\x00\xe5" + // 0x0061030A: 0x000000E5 + "\x00c\x03'\x00\x00\x00\xe7" + // 0x00630327: 0x000000E7 + "\x00e\x03\x00\x00\x00\x00\xe8" + // 0x00650300: 0x000000E8 + "\x00e\x03\x01\x00\x00\x00\xe9" + // 0x00650301: 0x000000E9 + "\x00e\x03\x02\x00\x00\x00\xea" + // 0x00650302: 0x000000EA + "\x00e\x03\b\x00\x00\x00\xeb" + // 0x00650308: 0x000000EB + "\x00i\x03\x00\x00\x00\x00\xec" + // 0x00690300: 0x000000EC + "\x00i\x03\x01\x00\x00\x00\xed" + // 0x00690301: 0x000000ED + "\x00i\x03\x02\x00\x00\x00\xee" + // 0x00690302: 0x000000EE + "\x00i\x03\b\x00\x00\x00\xef" + // 0x00690308: 0x000000EF + "\x00n\x03\x03\x00\x00\x00\xf1" + // 0x006E0303: 0x000000F1 + "\x00o\x03\x00\x00\x00\x00\xf2" + // 0x006F0300: 0x000000F2 + "\x00o\x03\x01\x00\x00\x00\xf3" + // 0x006F0301: 0x000000F3 + "\x00o\x03\x02\x00\x00\x00\xf4" + // 0x006F0302: 0x000000F4 + "\x00o\x03\x03\x00\x00\x00\xf5" + // 0x006F0303: 0x000000F5 + "\x00o\x03\b\x00\x00\x00\xf6" + // 0x006F0308: 0x000000F6 + "\x00u\x03\x00\x00\x00\x00\xf9" + // 0x00750300: 0x000000F9 + "\x00u\x03\x01\x00\x00\x00\xfa" + // 0x00750301: 0x000000FA + "\x00u\x03\x02\x00\x00\x00\xfb" + // 0x00750302: 0x000000FB + "\x00u\x03\b\x00\x00\x00\xfc" + // 0x00750308: 0x000000FC + "\x00y\x03\x01\x00\x00\x00\xfd" + // 0x00790301: 0x000000FD + "\x00y\x03\b\x00\x00\x00\xff" + // 0x00790308: 0x000000FF + "\x00A\x03\x04\x00\x00\x01\x00" + // 0x00410304: 0x00000100 + "\x00a\x03\x04\x00\x00\x01\x01" + // 0x00610304: 0x00000101 + "\x00A\x03\x06\x00\x00\x01\x02" + // 0x00410306: 0x00000102 + "\x00a\x03\x06\x00\x00\x01\x03" + // 0x00610306: 0x00000103 + "\x00A\x03(\x00\x00\x01\x04" + // 0x00410328: 0x00000104 + "\x00a\x03(\x00\x00\x01\x05" + // 0x00610328: 0x00000105 + "\x00C\x03\x01\x00\x00\x01\x06" + // 0x00430301: 0x00000106 + "\x00c\x03\x01\x00\x00\x01\a" + // 0x00630301: 0x00000107 + "\x00C\x03\x02\x00\x00\x01\b" + // 0x00430302: 0x00000108 + "\x00c\x03\x02\x00\x00\x01\t" + // 0x00630302: 0x00000109 + "\x00C\x03\a\x00\x00\x01\n" + // 0x00430307: 0x0000010A + "\x00c\x03\a\x00\x00\x01\v" + // 0x00630307: 0x0000010B + "\x00C\x03\f\x00\x00\x01\f" + // 0x0043030C: 0x0000010C + "\x00c\x03\f\x00\x00\x01\r" + // 0x0063030C: 0x0000010D + "\x00D\x03\f\x00\x00\x01\x0e" + // 0x0044030C: 0x0000010E + "\x00d\x03\f\x00\x00\x01\x0f" + // 0x0064030C: 0x0000010F + "\x00E\x03\x04\x00\x00\x01\x12" + // 0x00450304: 0x00000112 + "\x00e\x03\x04\x00\x00\x01\x13" + // 0x00650304: 0x00000113 + "\x00E\x03\x06\x00\x00\x01\x14" + // 0x00450306: 0x00000114 + "\x00e\x03\x06\x00\x00\x01\x15" + // 0x00650306: 0x00000115 + "\x00E\x03\a\x00\x00\x01\x16" + // 0x00450307: 0x00000116 + "\x00e\x03\a\x00\x00\x01\x17" + // 0x00650307: 0x00000117 + "\x00E\x03(\x00\x00\x01\x18" + // 0x00450328: 0x00000118 + "\x00e\x03(\x00\x00\x01\x19" + // 0x00650328: 0x00000119 + "\x00E\x03\f\x00\x00\x01\x1a" + // 0x0045030C: 0x0000011A + "\x00e\x03\f\x00\x00\x01\x1b" + // 0x0065030C: 0x0000011B + "\x00G\x03\x02\x00\x00\x01\x1c" + // 0x00470302: 0x0000011C + "\x00g\x03\x02\x00\x00\x01\x1d" + // 0x00670302: 0x0000011D + "\x00G\x03\x06\x00\x00\x01\x1e" + // 0x00470306: 0x0000011E + "\x00g\x03\x06\x00\x00\x01\x1f" + // 0x00670306: 0x0000011F + "\x00G\x03\a\x00\x00\x01 " + // 0x00470307: 0x00000120 + "\x00g\x03\a\x00\x00\x01!" + // 0x00670307: 0x00000121 + "\x00G\x03'\x00\x00\x01\"" + // 0x00470327: 0x00000122 + "\x00g\x03'\x00\x00\x01#" + // 0x00670327: 0x00000123 + "\x00H\x03\x02\x00\x00\x01$" + // 0x00480302: 0x00000124 + "\x00h\x03\x02\x00\x00\x01%" + // 0x00680302: 0x00000125 + "\x00I\x03\x03\x00\x00\x01(" + // 0x00490303: 0x00000128 + "\x00i\x03\x03\x00\x00\x01)" + // 0x00690303: 0x00000129 + "\x00I\x03\x04\x00\x00\x01*" + // 0x00490304: 0x0000012A + "\x00i\x03\x04\x00\x00\x01+" + // 0x00690304: 0x0000012B + "\x00I\x03\x06\x00\x00\x01," + // 0x00490306: 0x0000012C + "\x00i\x03\x06\x00\x00\x01-" + // 0x00690306: 0x0000012D + "\x00I\x03(\x00\x00\x01." + // 0x00490328: 0x0000012E + "\x00i\x03(\x00\x00\x01/" + // 0x00690328: 0x0000012F + "\x00I\x03\a\x00\x00\x010" + // 0x00490307: 0x00000130 + "\x00J\x03\x02\x00\x00\x014" + // 0x004A0302: 0x00000134 + "\x00j\x03\x02\x00\x00\x015" + // 0x006A0302: 0x00000135 + "\x00K\x03'\x00\x00\x016" + // 0x004B0327: 0x00000136 + "\x00k\x03'\x00\x00\x017" + // 0x006B0327: 0x00000137 + "\x00L\x03\x01\x00\x00\x019" + // 0x004C0301: 0x00000139 + "\x00l\x03\x01\x00\x00\x01:" + // 0x006C0301: 0x0000013A + "\x00L\x03'\x00\x00\x01;" + // 0x004C0327: 0x0000013B + "\x00l\x03'\x00\x00\x01<" + // 0x006C0327: 0x0000013C + "\x00L\x03\f\x00\x00\x01=" + // 0x004C030C: 0x0000013D + "\x00l\x03\f\x00\x00\x01>" + // 0x006C030C: 0x0000013E + "\x00N\x03\x01\x00\x00\x01C" + // 0x004E0301: 0x00000143 + "\x00n\x03\x01\x00\x00\x01D" + // 0x006E0301: 0x00000144 + "\x00N\x03'\x00\x00\x01E" + // 0x004E0327: 0x00000145 + "\x00n\x03'\x00\x00\x01F" + // 0x006E0327: 0x00000146 + "\x00N\x03\f\x00\x00\x01G" + // 0x004E030C: 0x00000147 + "\x00n\x03\f\x00\x00\x01H" + // 0x006E030C: 0x00000148 + "\x00O\x03\x04\x00\x00\x01L" + // 0x004F0304: 0x0000014C + "\x00o\x03\x04\x00\x00\x01M" + // 0x006F0304: 0x0000014D + "\x00O\x03\x06\x00\x00\x01N" + // 0x004F0306: 0x0000014E + "\x00o\x03\x06\x00\x00\x01O" + // 0x006F0306: 0x0000014F + "\x00O\x03\v\x00\x00\x01P" + // 0x004F030B: 0x00000150 + "\x00o\x03\v\x00\x00\x01Q" + // 0x006F030B: 0x00000151 + "\x00R\x03\x01\x00\x00\x01T" + // 0x00520301: 0x00000154 + "\x00r\x03\x01\x00\x00\x01U" + // 0x00720301: 0x00000155 + "\x00R\x03'\x00\x00\x01V" + // 0x00520327: 0x00000156 + "\x00r\x03'\x00\x00\x01W" + // 0x00720327: 0x00000157 + "\x00R\x03\f\x00\x00\x01X" + // 0x0052030C: 0x00000158 + "\x00r\x03\f\x00\x00\x01Y" + // 0x0072030C: 0x00000159 + "\x00S\x03\x01\x00\x00\x01Z" + // 0x00530301: 0x0000015A + "\x00s\x03\x01\x00\x00\x01[" + // 0x00730301: 0x0000015B + "\x00S\x03\x02\x00\x00\x01\\" + // 0x00530302: 0x0000015C + "\x00s\x03\x02\x00\x00\x01]" + // 0x00730302: 0x0000015D + "\x00S\x03'\x00\x00\x01^" + // 0x00530327: 0x0000015E + "\x00s\x03'\x00\x00\x01_" + // 0x00730327: 0x0000015F + "\x00S\x03\f\x00\x00\x01`" + // 0x0053030C: 0x00000160 + "\x00s\x03\f\x00\x00\x01a" + // 0x0073030C: 0x00000161 + "\x00T\x03'\x00\x00\x01b" + // 0x00540327: 0x00000162 + "\x00t\x03'\x00\x00\x01c" + // 0x00740327: 0x00000163 + "\x00T\x03\f\x00\x00\x01d" + // 0x0054030C: 0x00000164 + "\x00t\x03\f\x00\x00\x01e" + // 0x0074030C: 0x00000165 + "\x00U\x03\x03\x00\x00\x01h" + // 0x00550303: 0x00000168 + "\x00u\x03\x03\x00\x00\x01i" + // 0x00750303: 0x00000169 + "\x00U\x03\x04\x00\x00\x01j" + // 0x00550304: 0x0000016A + "\x00u\x03\x04\x00\x00\x01k" + // 0x00750304: 0x0000016B + "\x00U\x03\x06\x00\x00\x01l" + // 0x00550306: 0x0000016C + "\x00u\x03\x06\x00\x00\x01m" + // 0x00750306: 0x0000016D + "\x00U\x03\n\x00\x00\x01n" + // 0x0055030A: 0x0000016E + "\x00u\x03\n\x00\x00\x01o" + // 0x0075030A: 0x0000016F + "\x00U\x03\v\x00\x00\x01p" + // 0x0055030B: 0x00000170 + "\x00u\x03\v\x00\x00\x01q" + // 0x0075030B: 0x00000171 + "\x00U\x03(\x00\x00\x01r" + // 0x00550328: 0x00000172 + "\x00u\x03(\x00\x00\x01s" + // 0x00750328: 0x00000173 + "\x00W\x03\x02\x00\x00\x01t" + // 0x00570302: 0x00000174 + "\x00w\x03\x02\x00\x00\x01u" + // 0x00770302: 0x00000175 + "\x00Y\x03\x02\x00\x00\x01v" + // 0x00590302: 0x00000176 + "\x00y\x03\x02\x00\x00\x01w" + // 0x00790302: 0x00000177 + "\x00Y\x03\b\x00\x00\x01x" + // 0x00590308: 0x00000178 + "\x00Z\x03\x01\x00\x00\x01y" + // 0x005A0301: 0x00000179 + "\x00z\x03\x01\x00\x00\x01z" + // 0x007A0301: 0x0000017A + "\x00Z\x03\a\x00\x00\x01{" + // 0x005A0307: 0x0000017B + "\x00z\x03\a\x00\x00\x01|" + // 0x007A0307: 0x0000017C + "\x00Z\x03\f\x00\x00\x01}" + // 0x005A030C: 0x0000017D + "\x00z\x03\f\x00\x00\x01~" + // 0x007A030C: 0x0000017E + "\x00O\x03\x1b\x00\x00\x01\xa0" + // 0x004F031B: 0x000001A0 + "\x00o\x03\x1b\x00\x00\x01\xa1" + // 0x006F031B: 0x000001A1 + "\x00U\x03\x1b\x00\x00\x01\xaf" + // 0x0055031B: 0x000001AF + "\x00u\x03\x1b\x00\x00\x01\xb0" + // 0x0075031B: 0x000001B0 + "\x00A\x03\f\x00\x00\x01\xcd" + // 0x0041030C: 0x000001CD + "\x00a\x03\f\x00\x00\x01\xce" + // 0x0061030C: 0x000001CE + "\x00I\x03\f\x00\x00\x01\xcf" + // 0x0049030C: 0x000001CF + "\x00i\x03\f\x00\x00\x01\xd0" + // 0x0069030C: 0x000001D0 + "\x00O\x03\f\x00\x00\x01\xd1" + // 0x004F030C: 0x000001D1 + "\x00o\x03\f\x00\x00\x01\xd2" + // 0x006F030C: 0x000001D2 + "\x00U\x03\f\x00\x00\x01\xd3" + // 0x0055030C: 0x000001D3 + "\x00u\x03\f\x00\x00\x01\xd4" + // 0x0075030C: 0x000001D4 + "\x00\xdc\x03\x04\x00\x00\x01\xd5" + // 0x00DC0304: 0x000001D5 + "\x00\xfc\x03\x04\x00\x00\x01\xd6" + // 0x00FC0304: 0x000001D6 + "\x00\xdc\x03\x01\x00\x00\x01\xd7" + // 0x00DC0301: 0x000001D7 + "\x00\xfc\x03\x01\x00\x00\x01\xd8" + // 0x00FC0301: 0x000001D8 + "\x00\xdc\x03\f\x00\x00\x01\xd9" + // 0x00DC030C: 0x000001D9 + "\x00\xfc\x03\f\x00\x00\x01\xda" + // 0x00FC030C: 0x000001DA + "\x00\xdc\x03\x00\x00\x00\x01\xdb" + // 0x00DC0300: 0x000001DB + "\x00\xfc\x03\x00\x00\x00\x01\xdc" + // 0x00FC0300: 0x000001DC + "\x00\xc4\x03\x04\x00\x00\x01\xde" + // 0x00C40304: 0x000001DE + "\x00\xe4\x03\x04\x00\x00\x01\xdf" + // 0x00E40304: 0x000001DF + "\x02&\x03\x04\x00\x00\x01\xe0" + // 0x02260304: 0x000001E0 + "\x02'\x03\x04\x00\x00\x01\xe1" + // 0x02270304: 0x000001E1 + "\x00\xc6\x03\x04\x00\x00\x01\xe2" + // 0x00C60304: 0x000001E2 + "\x00\xe6\x03\x04\x00\x00\x01\xe3" + // 0x00E60304: 0x000001E3 + "\x00G\x03\f\x00\x00\x01\xe6" + // 0x0047030C: 0x000001E6 + "\x00g\x03\f\x00\x00\x01\xe7" + // 0x0067030C: 0x000001E7 + "\x00K\x03\f\x00\x00\x01\xe8" + // 0x004B030C: 0x000001E8 + "\x00k\x03\f\x00\x00\x01\xe9" + // 0x006B030C: 0x000001E9 + "\x00O\x03(\x00\x00\x01\xea" + // 0x004F0328: 0x000001EA + "\x00o\x03(\x00\x00\x01\xeb" + // 0x006F0328: 0x000001EB + "\x01\xea\x03\x04\x00\x00\x01\xec" + // 0x01EA0304: 0x000001EC + "\x01\xeb\x03\x04\x00\x00\x01\xed" + // 0x01EB0304: 0x000001ED + "\x01\xb7\x03\f\x00\x00\x01\xee" + // 0x01B7030C: 0x000001EE + "\x02\x92\x03\f\x00\x00\x01\xef" + // 0x0292030C: 0x000001EF + "\x00j\x03\f\x00\x00\x01\xf0" + // 0x006A030C: 0x000001F0 + "\x00G\x03\x01\x00\x00\x01\xf4" + // 0x00470301: 0x000001F4 + "\x00g\x03\x01\x00\x00\x01\xf5" + // 0x00670301: 0x000001F5 + "\x00N\x03\x00\x00\x00\x01\xf8" + // 0x004E0300: 0x000001F8 + "\x00n\x03\x00\x00\x00\x01\xf9" + // 0x006E0300: 0x000001F9 + "\x00\xc5\x03\x01\x00\x00\x01\xfa" + // 0x00C50301: 0x000001FA + "\x00\xe5\x03\x01\x00\x00\x01\xfb" + // 0x00E50301: 0x000001FB + "\x00\xc6\x03\x01\x00\x00\x01\xfc" + // 0x00C60301: 0x000001FC + "\x00\xe6\x03\x01\x00\x00\x01\xfd" + // 0x00E60301: 0x000001FD + "\x00\xd8\x03\x01\x00\x00\x01\xfe" + // 0x00D80301: 0x000001FE + "\x00\xf8\x03\x01\x00\x00\x01\xff" + // 0x00F80301: 0x000001FF + "\x00A\x03\x0f\x00\x00\x02\x00" + // 0x0041030F: 0x00000200 + "\x00a\x03\x0f\x00\x00\x02\x01" + // 0x0061030F: 0x00000201 + "\x00A\x03\x11\x00\x00\x02\x02" + // 0x00410311: 0x00000202 + "\x00a\x03\x11\x00\x00\x02\x03" + // 0x00610311: 0x00000203 + "\x00E\x03\x0f\x00\x00\x02\x04" + // 0x0045030F: 0x00000204 + "\x00e\x03\x0f\x00\x00\x02\x05" + // 0x0065030F: 0x00000205 + "\x00E\x03\x11\x00\x00\x02\x06" + // 0x00450311: 0x00000206 + "\x00e\x03\x11\x00\x00\x02\a" + // 0x00650311: 0x00000207 + "\x00I\x03\x0f\x00\x00\x02\b" + // 0x0049030F: 0x00000208 + "\x00i\x03\x0f\x00\x00\x02\t" + // 0x0069030F: 0x00000209 + "\x00I\x03\x11\x00\x00\x02\n" + // 0x00490311: 0x0000020A + "\x00i\x03\x11\x00\x00\x02\v" + // 0x00690311: 0x0000020B + "\x00O\x03\x0f\x00\x00\x02\f" + // 0x004F030F: 0x0000020C + "\x00o\x03\x0f\x00\x00\x02\r" + // 0x006F030F: 0x0000020D + "\x00O\x03\x11\x00\x00\x02\x0e" + // 0x004F0311: 0x0000020E + "\x00o\x03\x11\x00\x00\x02\x0f" + // 0x006F0311: 0x0000020F + "\x00R\x03\x0f\x00\x00\x02\x10" + // 0x0052030F: 0x00000210 + "\x00r\x03\x0f\x00\x00\x02\x11" + // 0x0072030F: 0x00000211 + "\x00R\x03\x11\x00\x00\x02\x12" + // 0x00520311: 0x00000212 + "\x00r\x03\x11\x00\x00\x02\x13" + // 0x00720311: 0x00000213 + "\x00U\x03\x0f\x00\x00\x02\x14" + // 0x0055030F: 0x00000214 + "\x00u\x03\x0f\x00\x00\x02\x15" + // 0x0075030F: 0x00000215 + "\x00U\x03\x11\x00\x00\x02\x16" + // 0x00550311: 0x00000216 + "\x00u\x03\x11\x00\x00\x02\x17" + // 0x00750311: 0x00000217 + "\x00S\x03&\x00\x00\x02\x18" + // 0x00530326: 0x00000218 + "\x00s\x03&\x00\x00\x02\x19" + // 0x00730326: 0x00000219 + "\x00T\x03&\x00\x00\x02\x1a" + // 0x00540326: 0x0000021A + "\x00t\x03&\x00\x00\x02\x1b" + // 0x00740326: 0x0000021B + "\x00H\x03\f\x00\x00\x02\x1e" + // 0x0048030C: 0x0000021E + "\x00h\x03\f\x00\x00\x02\x1f" + // 0x0068030C: 0x0000021F + "\x00A\x03\a\x00\x00\x02&" + // 0x00410307: 0x00000226 + "\x00a\x03\a\x00\x00\x02'" + // 0x00610307: 0x00000227 + "\x00E\x03'\x00\x00\x02(" + // 0x00450327: 0x00000228 + "\x00e\x03'\x00\x00\x02)" + // 0x00650327: 0x00000229 + "\x00\xd6\x03\x04\x00\x00\x02*" + // 0x00D60304: 0x0000022A + "\x00\xf6\x03\x04\x00\x00\x02+" + // 0x00F60304: 0x0000022B + "\x00\xd5\x03\x04\x00\x00\x02," + // 0x00D50304: 0x0000022C + "\x00\xf5\x03\x04\x00\x00\x02-" + // 0x00F50304: 0x0000022D + "\x00O\x03\a\x00\x00\x02." + // 0x004F0307: 0x0000022E + "\x00o\x03\a\x00\x00\x02/" + // 0x006F0307: 0x0000022F + "\x02.\x03\x04\x00\x00\x020" + // 0x022E0304: 0x00000230 + "\x02/\x03\x04\x00\x00\x021" + // 0x022F0304: 0x00000231 + "\x00Y\x03\x04\x00\x00\x022" + // 0x00590304: 0x00000232 + "\x00y\x03\x04\x00\x00\x023" + // 0x00790304: 0x00000233 + "\x00\xa8\x03\x01\x00\x00\x03\x85" + // 0x00A80301: 0x00000385 + "\x03\x91\x03\x01\x00\x00\x03\x86" + // 0x03910301: 0x00000386 + "\x03\x95\x03\x01\x00\x00\x03\x88" + // 0x03950301: 0x00000388 + "\x03\x97\x03\x01\x00\x00\x03\x89" + // 0x03970301: 0x00000389 + "\x03\x99\x03\x01\x00\x00\x03\x8a" + // 0x03990301: 0x0000038A + "\x03\x9f\x03\x01\x00\x00\x03\x8c" + // 0x039F0301: 0x0000038C + "\x03\xa5\x03\x01\x00\x00\x03\x8e" + // 0x03A50301: 0x0000038E + "\x03\xa9\x03\x01\x00\x00\x03\x8f" + // 0x03A90301: 0x0000038F + "\x03\xca\x03\x01\x00\x00\x03\x90" + // 0x03CA0301: 0x00000390 + "\x03\x99\x03\b\x00\x00\x03\xaa" + // 0x03990308: 0x000003AA + "\x03\xa5\x03\b\x00\x00\x03\xab" + // 0x03A50308: 0x000003AB + "\x03\xb1\x03\x01\x00\x00\x03\xac" + // 0x03B10301: 0x000003AC + "\x03\xb5\x03\x01\x00\x00\x03\xad" + // 0x03B50301: 0x000003AD + "\x03\xb7\x03\x01\x00\x00\x03\xae" + // 0x03B70301: 0x000003AE + "\x03\xb9\x03\x01\x00\x00\x03\xaf" + // 0x03B90301: 0x000003AF + "\x03\xcb\x03\x01\x00\x00\x03\xb0" + // 0x03CB0301: 0x000003B0 + "\x03\xb9\x03\b\x00\x00\x03\xca" + // 0x03B90308: 0x000003CA + "\x03\xc5\x03\b\x00\x00\x03\xcb" + // 0x03C50308: 0x000003CB + "\x03\xbf\x03\x01\x00\x00\x03\xcc" + // 0x03BF0301: 0x000003CC + "\x03\xc5\x03\x01\x00\x00\x03\xcd" + // 0x03C50301: 0x000003CD + "\x03\xc9\x03\x01\x00\x00\x03\xce" + // 0x03C90301: 0x000003CE + "\x03\xd2\x03\x01\x00\x00\x03\xd3" + // 0x03D20301: 0x000003D3 + "\x03\xd2\x03\b\x00\x00\x03\xd4" + // 0x03D20308: 0x000003D4 + "\x04\x15\x03\x00\x00\x00\x04\x00" + // 0x04150300: 0x00000400 + "\x04\x15\x03\b\x00\x00\x04\x01" + // 0x04150308: 0x00000401 + "\x04\x13\x03\x01\x00\x00\x04\x03" + // 0x04130301: 0x00000403 + "\x04\x06\x03\b\x00\x00\x04\a" + // 0x04060308: 0x00000407 + "\x04\x1a\x03\x01\x00\x00\x04\f" + // 0x041A0301: 0x0000040C + "\x04\x18\x03\x00\x00\x00\x04\r" + // 0x04180300: 0x0000040D + "\x04#\x03\x06\x00\x00\x04\x0e" + // 0x04230306: 0x0000040E + "\x04\x18\x03\x06\x00\x00\x04\x19" + // 0x04180306: 0x00000419 + "\x048\x03\x06\x00\x00\x049" + // 0x04380306: 0x00000439 + "\x045\x03\x00\x00\x00\x04P" + // 0x04350300: 0x00000450 + "\x045\x03\b\x00\x00\x04Q" + // 0x04350308: 0x00000451 + "\x043\x03\x01\x00\x00\x04S" + // 0x04330301: 0x00000453 + "\x04V\x03\b\x00\x00\x04W" + // 0x04560308: 0x00000457 + "\x04:\x03\x01\x00\x00\x04\\" + // 0x043A0301: 0x0000045C + "\x048\x03\x00\x00\x00\x04]" + // 0x04380300: 0x0000045D + "\x04C\x03\x06\x00\x00\x04^" + // 0x04430306: 0x0000045E + "\x04t\x03\x0f\x00\x00\x04v" + // 0x0474030F: 0x00000476 + "\x04u\x03\x0f\x00\x00\x04w" + // 0x0475030F: 0x00000477 + "\x04\x16\x03\x06\x00\x00\x04\xc1" + // 0x04160306: 0x000004C1 + "\x046\x03\x06\x00\x00\x04\xc2" + // 0x04360306: 0x000004C2 + "\x04\x10\x03\x06\x00\x00\x04\xd0" + // 0x04100306: 0x000004D0 + "\x040\x03\x06\x00\x00\x04\xd1" + // 0x04300306: 0x000004D1 + "\x04\x10\x03\b\x00\x00\x04\xd2" + // 0x04100308: 0x000004D2 + "\x040\x03\b\x00\x00\x04\xd3" + // 0x04300308: 0x000004D3 + "\x04\x15\x03\x06\x00\x00\x04\xd6" + // 0x04150306: 0x000004D6 + "\x045\x03\x06\x00\x00\x04\xd7" + // 0x04350306: 0x000004D7 + "\x04\xd8\x03\b\x00\x00\x04\xda" + // 0x04D80308: 0x000004DA + "\x04\xd9\x03\b\x00\x00\x04\xdb" + // 0x04D90308: 0x000004DB + "\x04\x16\x03\b\x00\x00\x04\xdc" + // 0x04160308: 0x000004DC + "\x046\x03\b\x00\x00\x04\xdd" + // 0x04360308: 0x000004DD + "\x04\x17\x03\b\x00\x00\x04\xde" + // 0x04170308: 0x000004DE + "\x047\x03\b\x00\x00\x04\xdf" + // 0x04370308: 0x000004DF + "\x04\x18\x03\x04\x00\x00\x04\xe2" + // 0x04180304: 0x000004E2 + "\x048\x03\x04\x00\x00\x04\xe3" + // 0x04380304: 0x000004E3 + "\x04\x18\x03\b\x00\x00\x04\xe4" + // 0x04180308: 0x000004E4 + "\x048\x03\b\x00\x00\x04\xe5" + // 0x04380308: 0x000004E5 + "\x04\x1e\x03\b\x00\x00\x04\xe6" + // 0x041E0308: 0x000004E6 + "\x04>\x03\b\x00\x00\x04\xe7" + // 0x043E0308: 0x000004E7 + "\x04\xe8\x03\b\x00\x00\x04\xea" + // 0x04E80308: 0x000004EA + "\x04\xe9\x03\b\x00\x00\x04\xeb" + // 0x04E90308: 0x000004EB + "\x04-\x03\b\x00\x00\x04\xec" + // 0x042D0308: 0x000004EC + "\x04M\x03\b\x00\x00\x04\xed" + // 0x044D0308: 0x000004ED + "\x04#\x03\x04\x00\x00\x04\xee" + // 0x04230304: 0x000004EE + "\x04C\x03\x04\x00\x00\x04\xef" + // 0x04430304: 0x000004EF + "\x04#\x03\b\x00\x00\x04\xf0" + // 0x04230308: 0x000004F0 + "\x04C\x03\b\x00\x00\x04\xf1" + // 0x04430308: 0x000004F1 + "\x04#\x03\v\x00\x00\x04\xf2" + // 0x0423030B: 0x000004F2 + "\x04C\x03\v\x00\x00\x04\xf3" + // 0x0443030B: 0x000004F3 + "\x04'\x03\b\x00\x00\x04\xf4" + // 0x04270308: 0x000004F4 + "\x04G\x03\b\x00\x00\x04\xf5" + // 0x04470308: 0x000004F5 + "\x04+\x03\b\x00\x00\x04\xf8" + // 0x042B0308: 0x000004F8 + "\x04K\x03\b\x00\x00\x04\xf9" + // 0x044B0308: 0x000004F9 + "\x06'\x06S\x00\x00\x06\"" + // 0x06270653: 0x00000622 + "\x06'\x06T\x00\x00\x06#" + // 0x06270654: 0x00000623 + "\x06H\x06T\x00\x00\x06$" + // 0x06480654: 0x00000624 + "\x06'\x06U\x00\x00\x06%" + // 0x06270655: 0x00000625 + "\x06J\x06T\x00\x00\x06&" + // 0x064A0654: 0x00000626 + "\x06\xd5\x06T\x00\x00\x06\xc0" + // 0x06D50654: 0x000006C0 + "\x06\xc1\x06T\x00\x00\x06\xc2" + // 0x06C10654: 0x000006C2 + "\x06\xd2\x06T\x00\x00\x06\xd3" + // 0x06D20654: 0x000006D3 + "\t(\t<\x00\x00\t)" + // 0x0928093C: 0x00000929 + "\t0\t<\x00\x00\t1" + // 0x0930093C: 0x00000931 + "\t3\t<\x00\x00\t4" + // 0x0933093C: 0x00000934 + "\t\xc7\t\xbe\x00\x00\t\xcb" + // 0x09C709BE: 0x000009CB + "\t\xc7\t\xd7\x00\x00\t\xcc" + // 0x09C709D7: 0x000009CC + "\vG\vV\x00\x00\vH" + // 0x0B470B56: 0x00000B48 + "\vG\v>\x00\x00\vK" + // 0x0B470B3E: 0x00000B4B + "\vG\vW\x00\x00\vL" + // 0x0B470B57: 0x00000B4C + "\v\x92\v\xd7\x00\x00\v\x94" + // 0x0B920BD7: 0x00000B94 + "\v\xc6\v\xbe\x00\x00\v\xca" + // 0x0BC60BBE: 0x00000BCA + "\v\xc7\v\xbe\x00\x00\v\xcb" + // 0x0BC70BBE: 0x00000BCB + "\v\xc6\v\xd7\x00\x00\v\xcc" + // 0x0BC60BD7: 0x00000BCC + "\fF\fV\x00\x00\fH" + // 0x0C460C56: 0x00000C48 + "\f\xbf\f\xd5\x00\x00\f\xc0" + // 0x0CBF0CD5: 0x00000CC0 + "\f\xc6\f\xd5\x00\x00\f\xc7" + // 0x0CC60CD5: 0x00000CC7 + "\f\xc6\f\xd6\x00\x00\f\xc8" + // 0x0CC60CD6: 0x00000CC8 + "\f\xc6\f\xc2\x00\x00\f\xca" + // 0x0CC60CC2: 0x00000CCA + "\f\xca\f\xd5\x00\x00\f\xcb" + // 0x0CCA0CD5: 0x00000CCB + "\rF\r>\x00\x00\rJ" + // 0x0D460D3E: 0x00000D4A + "\rG\r>\x00\x00\rK" + // 0x0D470D3E: 0x00000D4B + "\rF\rW\x00\x00\rL" + // 0x0D460D57: 0x00000D4C + "\r\xd9\r\xca\x00\x00\r\xda" + // 0x0DD90DCA: 0x00000DDA + "\r\xd9\r\xcf\x00\x00\r\xdc" + // 0x0DD90DCF: 0x00000DDC + "\r\xdc\r\xca\x00\x00\r\xdd" + // 0x0DDC0DCA: 0x00000DDD + "\r\xd9\r\xdf\x00\x00\r\xde" + // 0x0DD90DDF: 0x00000DDE + "\x10%\x10.\x00\x00\x10&" + // 0x1025102E: 0x00001026 + "\x1b\x05\x1b5\x00\x00\x1b\x06" + // 0x1B051B35: 0x00001B06 + "\x1b\a\x1b5\x00\x00\x1b\b" + // 0x1B071B35: 0x00001B08 + "\x1b\t\x1b5\x00\x00\x1b\n" + // 0x1B091B35: 0x00001B0A + "\x1b\v\x1b5\x00\x00\x1b\f" + // 0x1B0B1B35: 0x00001B0C + "\x1b\r\x1b5\x00\x00\x1b\x0e" + // 0x1B0D1B35: 0x00001B0E + "\x1b\x11\x1b5\x00\x00\x1b\x12" + // 0x1B111B35: 0x00001B12 + "\x1b:\x1b5\x00\x00\x1b;" + // 0x1B3A1B35: 0x00001B3B + "\x1b<\x1b5\x00\x00\x1b=" + // 0x1B3C1B35: 0x00001B3D + "\x1b>\x1b5\x00\x00\x1b@" + // 0x1B3E1B35: 0x00001B40 + "\x1b?\x1b5\x00\x00\x1bA" + // 0x1B3F1B35: 0x00001B41 + "\x1bB\x1b5\x00\x00\x1bC" + // 0x1B421B35: 0x00001B43 + "\x00A\x03%\x00\x00\x1e\x00" + // 0x00410325: 0x00001E00 + "\x00a\x03%\x00\x00\x1e\x01" + // 0x00610325: 0x00001E01 + "\x00B\x03\a\x00\x00\x1e\x02" + // 0x00420307: 0x00001E02 + "\x00b\x03\a\x00\x00\x1e\x03" + // 0x00620307: 0x00001E03 + "\x00B\x03#\x00\x00\x1e\x04" + // 0x00420323: 0x00001E04 + "\x00b\x03#\x00\x00\x1e\x05" + // 0x00620323: 0x00001E05 + "\x00B\x031\x00\x00\x1e\x06" + // 0x00420331: 0x00001E06 + "\x00b\x031\x00\x00\x1e\a" + // 0x00620331: 0x00001E07 + "\x00\xc7\x03\x01\x00\x00\x1e\b" + // 0x00C70301: 0x00001E08 + "\x00\xe7\x03\x01\x00\x00\x1e\t" + // 0x00E70301: 0x00001E09 + "\x00D\x03\a\x00\x00\x1e\n" + // 0x00440307: 0x00001E0A + "\x00d\x03\a\x00\x00\x1e\v" + // 0x00640307: 0x00001E0B + "\x00D\x03#\x00\x00\x1e\f" + // 0x00440323: 0x00001E0C + "\x00d\x03#\x00\x00\x1e\r" + // 0x00640323: 0x00001E0D + "\x00D\x031\x00\x00\x1e\x0e" + // 0x00440331: 0x00001E0E + "\x00d\x031\x00\x00\x1e\x0f" + // 0x00640331: 0x00001E0F + "\x00D\x03'\x00\x00\x1e\x10" + // 0x00440327: 0x00001E10 + "\x00d\x03'\x00\x00\x1e\x11" + // 0x00640327: 0x00001E11 + "\x00D\x03-\x00\x00\x1e\x12" + // 0x0044032D: 0x00001E12 + "\x00d\x03-\x00\x00\x1e\x13" + // 0x0064032D: 0x00001E13 + "\x01\x12\x03\x00\x00\x00\x1e\x14" + // 0x01120300: 0x00001E14 + "\x01\x13\x03\x00\x00\x00\x1e\x15" + // 0x01130300: 0x00001E15 + "\x01\x12\x03\x01\x00\x00\x1e\x16" + // 0x01120301: 0x00001E16 + "\x01\x13\x03\x01\x00\x00\x1e\x17" + // 0x01130301: 0x00001E17 + "\x00E\x03-\x00\x00\x1e\x18" + // 0x0045032D: 0x00001E18 + "\x00e\x03-\x00\x00\x1e\x19" + // 0x0065032D: 0x00001E19 + "\x00E\x030\x00\x00\x1e\x1a" + // 0x00450330: 0x00001E1A + "\x00e\x030\x00\x00\x1e\x1b" + // 0x00650330: 0x00001E1B + "\x02(\x03\x06\x00\x00\x1e\x1c" + // 0x02280306: 0x00001E1C + "\x02)\x03\x06\x00\x00\x1e\x1d" + // 0x02290306: 0x00001E1D + "\x00F\x03\a\x00\x00\x1e\x1e" + // 0x00460307: 0x00001E1E + "\x00f\x03\a\x00\x00\x1e\x1f" + // 0x00660307: 0x00001E1F + "\x00G\x03\x04\x00\x00\x1e " + // 0x00470304: 0x00001E20 + "\x00g\x03\x04\x00\x00\x1e!" + // 0x00670304: 0x00001E21 + "\x00H\x03\a\x00\x00\x1e\"" + // 0x00480307: 0x00001E22 + "\x00h\x03\a\x00\x00\x1e#" + // 0x00680307: 0x00001E23 + "\x00H\x03#\x00\x00\x1e$" + // 0x00480323: 0x00001E24 + "\x00h\x03#\x00\x00\x1e%" + // 0x00680323: 0x00001E25 + "\x00H\x03\b\x00\x00\x1e&" + // 0x00480308: 0x00001E26 + "\x00h\x03\b\x00\x00\x1e'" + // 0x00680308: 0x00001E27 + "\x00H\x03'\x00\x00\x1e(" + // 0x00480327: 0x00001E28 + "\x00h\x03'\x00\x00\x1e)" + // 0x00680327: 0x00001E29 + "\x00H\x03.\x00\x00\x1e*" + // 0x0048032E: 0x00001E2A + "\x00h\x03.\x00\x00\x1e+" + // 0x0068032E: 0x00001E2B + "\x00I\x030\x00\x00\x1e," + // 0x00490330: 0x00001E2C + "\x00i\x030\x00\x00\x1e-" + // 0x00690330: 0x00001E2D + "\x00\xcf\x03\x01\x00\x00\x1e." + // 0x00CF0301: 0x00001E2E + "\x00\xef\x03\x01\x00\x00\x1e/" + // 0x00EF0301: 0x00001E2F + "\x00K\x03\x01\x00\x00\x1e0" + // 0x004B0301: 0x00001E30 + "\x00k\x03\x01\x00\x00\x1e1" + // 0x006B0301: 0x00001E31 + "\x00K\x03#\x00\x00\x1e2" + // 0x004B0323: 0x00001E32 + "\x00k\x03#\x00\x00\x1e3" + // 0x006B0323: 0x00001E33 + "\x00K\x031\x00\x00\x1e4" + // 0x004B0331: 0x00001E34 + "\x00k\x031\x00\x00\x1e5" + // 0x006B0331: 0x00001E35 + "\x00L\x03#\x00\x00\x1e6" + // 0x004C0323: 0x00001E36 + "\x00l\x03#\x00\x00\x1e7" + // 0x006C0323: 0x00001E37 + "\x1e6\x03\x04\x00\x00\x1e8" + // 0x1E360304: 0x00001E38 + "\x1e7\x03\x04\x00\x00\x1e9" + // 0x1E370304: 0x00001E39 + "\x00L\x031\x00\x00\x1e:" + // 0x004C0331: 0x00001E3A + "\x00l\x031\x00\x00\x1e;" + // 0x006C0331: 0x00001E3B + "\x00L\x03-\x00\x00\x1e<" + // 0x004C032D: 0x00001E3C + "\x00l\x03-\x00\x00\x1e=" + // 0x006C032D: 0x00001E3D + "\x00M\x03\x01\x00\x00\x1e>" + // 0x004D0301: 0x00001E3E + "\x00m\x03\x01\x00\x00\x1e?" + // 0x006D0301: 0x00001E3F + "\x00M\x03\a\x00\x00\x1e@" + // 0x004D0307: 0x00001E40 + "\x00m\x03\a\x00\x00\x1eA" + // 0x006D0307: 0x00001E41 + "\x00M\x03#\x00\x00\x1eB" + // 0x004D0323: 0x00001E42 + "\x00m\x03#\x00\x00\x1eC" + // 0x006D0323: 0x00001E43 + "\x00N\x03\a\x00\x00\x1eD" + // 0x004E0307: 0x00001E44 + "\x00n\x03\a\x00\x00\x1eE" + // 0x006E0307: 0x00001E45 + "\x00N\x03#\x00\x00\x1eF" + // 0x004E0323: 0x00001E46 + "\x00n\x03#\x00\x00\x1eG" + // 0x006E0323: 0x00001E47 + "\x00N\x031\x00\x00\x1eH" + // 0x004E0331: 0x00001E48 + "\x00n\x031\x00\x00\x1eI" + // 0x006E0331: 0x00001E49 + "\x00N\x03-\x00\x00\x1eJ" + // 0x004E032D: 0x00001E4A + "\x00n\x03-\x00\x00\x1eK" + // 0x006E032D: 0x00001E4B + "\x00\xd5\x03\x01\x00\x00\x1eL" + // 0x00D50301: 0x00001E4C + "\x00\xf5\x03\x01\x00\x00\x1eM" + // 0x00F50301: 0x00001E4D + "\x00\xd5\x03\b\x00\x00\x1eN" + // 0x00D50308: 0x00001E4E + "\x00\xf5\x03\b\x00\x00\x1eO" + // 0x00F50308: 0x00001E4F + "\x01L\x03\x00\x00\x00\x1eP" + // 0x014C0300: 0x00001E50 + "\x01M\x03\x00\x00\x00\x1eQ" + // 0x014D0300: 0x00001E51 + "\x01L\x03\x01\x00\x00\x1eR" + // 0x014C0301: 0x00001E52 + "\x01M\x03\x01\x00\x00\x1eS" + // 0x014D0301: 0x00001E53 + "\x00P\x03\x01\x00\x00\x1eT" + // 0x00500301: 0x00001E54 + "\x00p\x03\x01\x00\x00\x1eU" + // 0x00700301: 0x00001E55 + "\x00P\x03\a\x00\x00\x1eV" + // 0x00500307: 0x00001E56 + "\x00p\x03\a\x00\x00\x1eW" + // 0x00700307: 0x00001E57 + "\x00R\x03\a\x00\x00\x1eX" + // 0x00520307: 0x00001E58 + "\x00r\x03\a\x00\x00\x1eY" + // 0x00720307: 0x00001E59 + "\x00R\x03#\x00\x00\x1eZ" + // 0x00520323: 0x00001E5A + "\x00r\x03#\x00\x00\x1e[" + // 0x00720323: 0x00001E5B + "\x1eZ\x03\x04\x00\x00\x1e\\" + // 0x1E5A0304: 0x00001E5C + "\x1e[\x03\x04\x00\x00\x1e]" + // 0x1E5B0304: 0x00001E5D + "\x00R\x031\x00\x00\x1e^" + // 0x00520331: 0x00001E5E + "\x00r\x031\x00\x00\x1e_" + // 0x00720331: 0x00001E5F + "\x00S\x03\a\x00\x00\x1e`" + // 0x00530307: 0x00001E60 + "\x00s\x03\a\x00\x00\x1ea" + // 0x00730307: 0x00001E61 + "\x00S\x03#\x00\x00\x1eb" + // 0x00530323: 0x00001E62 + "\x00s\x03#\x00\x00\x1ec" + // 0x00730323: 0x00001E63 + "\x01Z\x03\a\x00\x00\x1ed" + // 0x015A0307: 0x00001E64 + "\x01[\x03\a\x00\x00\x1ee" + // 0x015B0307: 0x00001E65 + "\x01`\x03\a\x00\x00\x1ef" + // 0x01600307: 0x00001E66 + "\x01a\x03\a\x00\x00\x1eg" + // 0x01610307: 0x00001E67 + "\x1eb\x03\a\x00\x00\x1eh" + // 0x1E620307: 0x00001E68 + "\x1ec\x03\a\x00\x00\x1ei" + // 0x1E630307: 0x00001E69 + "\x00T\x03\a\x00\x00\x1ej" + // 0x00540307: 0x00001E6A + "\x00t\x03\a\x00\x00\x1ek" + // 0x00740307: 0x00001E6B + "\x00T\x03#\x00\x00\x1el" + // 0x00540323: 0x00001E6C + "\x00t\x03#\x00\x00\x1em" + // 0x00740323: 0x00001E6D + "\x00T\x031\x00\x00\x1en" + // 0x00540331: 0x00001E6E + "\x00t\x031\x00\x00\x1eo" + // 0x00740331: 0x00001E6F + "\x00T\x03-\x00\x00\x1ep" + // 0x0054032D: 0x00001E70 + "\x00t\x03-\x00\x00\x1eq" + // 0x0074032D: 0x00001E71 + "\x00U\x03$\x00\x00\x1er" + // 0x00550324: 0x00001E72 + "\x00u\x03$\x00\x00\x1es" + // 0x00750324: 0x00001E73 + "\x00U\x030\x00\x00\x1et" + // 0x00550330: 0x00001E74 + "\x00u\x030\x00\x00\x1eu" + // 0x00750330: 0x00001E75 + "\x00U\x03-\x00\x00\x1ev" + // 0x0055032D: 0x00001E76 + "\x00u\x03-\x00\x00\x1ew" + // 0x0075032D: 0x00001E77 + "\x01h\x03\x01\x00\x00\x1ex" + // 0x01680301: 0x00001E78 + "\x01i\x03\x01\x00\x00\x1ey" + // 0x01690301: 0x00001E79 + "\x01j\x03\b\x00\x00\x1ez" + // 0x016A0308: 0x00001E7A + "\x01k\x03\b\x00\x00\x1e{" + // 0x016B0308: 0x00001E7B + "\x00V\x03\x03\x00\x00\x1e|" + // 0x00560303: 0x00001E7C + "\x00v\x03\x03\x00\x00\x1e}" + // 0x00760303: 0x00001E7D + "\x00V\x03#\x00\x00\x1e~" + // 0x00560323: 0x00001E7E + "\x00v\x03#\x00\x00\x1e\u007f" + // 0x00760323: 0x00001E7F + "\x00W\x03\x00\x00\x00\x1e\x80" + // 0x00570300: 0x00001E80 + "\x00w\x03\x00\x00\x00\x1e\x81" + // 0x00770300: 0x00001E81 + "\x00W\x03\x01\x00\x00\x1e\x82" + // 0x00570301: 0x00001E82 + "\x00w\x03\x01\x00\x00\x1e\x83" + // 0x00770301: 0x00001E83 + "\x00W\x03\b\x00\x00\x1e\x84" + // 0x00570308: 0x00001E84 + "\x00w\x03\b\x00\x00\x1e\x85" + // 0x00770308: 0x00001E85 + "\x00W\x03\a\x00\x00\x1e\x86" + // 0x00570307: 0x00001E86 + "\x00w\x03\a\x00\x00\x1e\x87" + // 0x00770307: 0x00001E87 + "\x00W\x03#\x00\x00\x1e\x88" + // 0x00570323: 0x00001E88 + "\x00w\x03#\x00\x00\x1e\x89" + // 0x00770323: 0x00001E89 + "\x00X\x03\a\x00\x00\x1e\x8a" + // 0x00580307: 0x00001E8A + "\x00x\x03\a\x00\x00\x1e\x8b" + // 0x00780307: 0x00001E8B + "\x00X\x03\b\x00\x00\x1e\x8c" + // 0x00580308: 0x00001E8C + "\x00x\x03\b\x00\x00\x1e\x8d" + // 0x00780308: 0x00001E8D + "\x00Y\x03\a\x00\x00\x1e\x8e" + // 0x00590307: 0x00001E8E + "\x00y\x03\a\x00\x00\x1e\x8f" + // 0x00790307: 0x00001E8F + "\x00Z\x03\x02\x00\x00\x1e\x90" + // 0x005A0302: 0x00001E90 + "\x00z\x03\x02\x00\x00\x1e\x91" + // 0x007A0302: 0x00001E91 + "\x00Z\x03#\x00\x00\x1e\x92" + // 0x005A0323: 0x00001E92 + "\x00z\x03#\x00\x00\x1e\x93" + // 0x007A0323: 0x00001E93 + "\x00Z\x031\x00\x00\x1e\x94" + // 0x005A0331: 0x00001E94 + "\x00z\x031\x00\x00\x1e\x95" + // 0x007A0331: 0x00001E95 + "\x00h\x031\x00\x00\x1e\x96" + // 0x00680331: 0x00001E96 + "\x00t\x03\b\x00\x00\x1e\x97" + // 0x00740308: 0x00001E97 + "\x00w\x03\n\x00\x00\x1e\x98" + // 0x0077030A: 0x00001E98 + "\x00y\x03\n\x00\x00\x1e\x99" + // 0x0079030A: 0x00001E99 + "\x01\u007f\x03\a\x00\x00\x1e\x9b" + // 0x017F0307: 0x00001E9B + "\x00A\x03#\x00\x00\x1e\xa0" + // 0x00410323: 0x00001EA0 + "\x00a\x03#\x00\x00\x1e\xa1" + // 0x00610323: 0x00001EA1 + "\x00A\x03\t\x00\x00\x1e\xa2" + // 0x00410309: 0x00001EA2 + "\x00a\x03\t\x00\x00\x1e\xa3" + // 0x00610309: 0x00001EA3 + "\x00\xc2\x03\x01\x00\x00\x1e\xa4" + // 0x00C20301: 0x00001EA4 + "\x00\xe2\x03\x01\x00\x00\x1e\xa5" + // 0x00E20301: 0x00001EA5 + "\x00\xc2\x03\x00\x00\x00\x1e\xa6" + // 0x00C20300: 0x00001EA6 + "\x00\xe2\x03\x00\x00\x00\x1e\xa7" + // 0x00E20300: 0x00001EA7 + "\x00\xc2\x03\t\x00\x00\x1e\xa8" + // 0x00C20309: 0x00001EA8 + "\x00\xe2\x03\t\x00\x00\x1e\xa9" + // 0x00E20309: 0x00001EA9 + "\x00\xc2\x03\x03\x00\x00\x1e\xaa" + // 0x00C20303: 0x00001EAA + "\x00\xe2\x03\x03\x00\x00\x1e\xab" + // 0x00E20303: 0x00001EAB + "\x1e\xa0\x03\x02\x00\x00\x1e\xac" + // 0x1EA00302: 0x00001EAC + "\x1e\xa1\x03\x02\x00\x00\x1e\xad" + // 0x1EA10302: 0x00001EAD + "\x01\x02\x03\x01\x00\x00\x1e\xae" + // 0x01020301: 0x00001EAE + "\x01\x03\x03\x01\x00\x00\x1e\xaf" + // 0x01030301: 0x00001EAF + "\x01\x02\x03\x00\x00\x00\x1e\xb0" + // 0x01020300: 0x00001EB0 + "\x01\x03\x03\x00\x00\x00\x1e\xb1" + // 0x01030300: 0x00001EB1 + "\x01\x02\x03\t\x00\x00\x1e\xb2" + // 0x01020309: 0x00001EB2 + "\x01\x03\x03\t\x00\x00\x1e\xb3" + // 0x01030309: 0x00001EB3 + "\x01\x02\x03\x03\x00\x00\x1e\xb4" + // 0x01020303: 0x00001EB4 + "\x01\x03\x03\x03\x00\x00\x1e\xb5" + // 0x01030303: 0x00001EB5 + "\x1e\xa0\x03\x06\x00\x00\x1e\xb6" + // 0x1EA00306: 0x00001EB6 + "\x1e\xa1\x03\x06\x00\x00\x1e\xb7" + // 0x1EA10306: 0x00001EB7 + "\x00E\x03#\x00\x00\x1e\xb8" + // 0x00450323: 0x00001EB8 + "\x00e\x03#\x00\x00\x1e\xb9" + // 0x00650323: 0x00001EB9 + "\x00E\x03\t\x00\x00\x1e\xba" + // 0x00450309: 0x00001EBA + "\x00e\x03\t\x00\x00\x1e\xbb" + // 0x00650309: 0x00001EBB + "\x00E\x03\x03\x00\x00\x1e\xbc" + // 0x00450303: 0x00001EBC + "\x00e\x03\x03\x00\x00\x1e\xbd" + // 0x00650303: 0x00001EBD + "\x00\xca\x03\x01\x00\x00\x1e\xbe" + // 0x00CA0301: 0x00001EBE + "\x00\xea\x03\x01\x00\x00\x1e\xbf" + // 0x00EA0301: 0x00001EBF + "\x00\xca\x03\x00\x00\x00\x1e\xc0" + // 0x00CA0300: 0x00001EC0 + "\x00\xea\x03\x00\x00\x00\x1e\xc1" + // 0x00EA0300: 0x00001EC1 + "\x00\xca\x03\t\x00\x00\x1e\xc2" + // 0x00CA0309: 0x00001EC2 + "\x00\xea\x03\t\x00\x00\x1e\xc3" + // 0x00EA0309: 0x00001EC3 + "\x00\xca\x03\x03\x00\x00\x1e\xc4" + // 0x00CA0303: 0x00001EC4 + "\x00\xea\x03\x03\x00\x00\x1e\xc5" + // 0x00EA0303: 0x00001EC5 + "\x1e\xb8\x03\x02\x00\x00\x1e\xc6" + // 0x1EB80302: 0x00001EC6 + "\x1e\xb9\x03\x02\x00\x00\x1e\xc7" + // 0x1EB90302: 0x00001EC7 + "\x00I\x03\t\x00\x00\x1e\xc8" + // 0x00490309: 0x00001EC8 + "\x00i\x03\t\x00\x00\x1e\xc9" + // 0x00690309: 0x00001EC9 + "\x00I\x03#\x00\x00\x1e\xca" + // 0x00490323: 0x00001ECA + "\x00i\x03#\x00\x00\x1e\xcb" + // 0x00690323: 0x00001ECB + "\x00O\x03#\x00\x00\x1e\xcc" + // 0x004F0323: 0x00001ECC + "\x00o\x03#\x00\x00\x1e\xcd" + // 0x006F0323: 0x00001ECD + "\x00O\x03\t\x00\x00\x1e\xce" + // 0x004F0309: 0x00001ECE + "\x00o\x03\t\x00\x00\x1e\xcf" + // 0x006F0309: 0x00001ECF + "\x00\xd4\x03\x01\x00\x00\x1e\xd0" + // 0x00D40301: 0x00001ED0 + "\x00\xf4\x03\x01\x00\x00\x1e\xd1" + // 0x00F40301: 0x00001ED1 + "\x00\xd4\x03\x00\x00\x00\x1e\xd2" + // 0x00D40300: 0x00001ED2 + "\x00\xf4\x03\x00\x00\x00\x1e\xd3" + // 0x00F40300: 0x00001ED3 + "\x00\xd4\x03\t\x00\x00\x1e\xd4" + // 0x00D40309: 0x00001ED4 + "\x00\xf4\x03\t\x00\x00\x1e\xd5" + // 0x00F40309: 0x00001ED5 + "\x00\xd4\x03\x03\x00\x00\x1e\xd6" + // 0x00D40303: 0x00001ED6 + "\x00\xf4\x03\x03\x00\x00\x1e\xd7" + // 0x00F40303: 0x00001ED7 + "\x1e\xcc\x03\x02\x00\x00\x1e\xd8" + // 0x1ECC0302: 0x00001ED8 + "\x1e\xcd\x03\x02\x00\x00\x1e\xd9" + // 0x1ECD0302: 0x00001ED9 + "\x01\xa0\x03\x01\x00\x00\x1e\xda" + // 0x01A00301: 0x00001EDA + "\x01\xa1\x03\x01\x00\x00\x1e\xdb" + // 0x01A10301: 0x00001EDB + "\x01\xa0\x03\x00\x00\x00\x1e\xdc" + // 0x01A00300: 0x00001EDC + "\x01\xa1\x03\x00\x00\x00\x1e\xdd" + // 0x01A10300: 0x00001EDD + "\x01\xa0\x03\t\x00\x00\x1e\xde" + // 0x01A00309: 0x00001EDE + "\x01\xa1\x03\t\x00\x00\x1e\xdf" + // 0x01A10309: 0x00001EDF + "\x01\xa0\x03\x03\x00\x00\x1e\xe0" + // 0x01A00303: 0x00001EE0 + "\x01\xa1\x03\x03\x00\x00\x1e\xe1" + // 0x01A10303: 0x00001EE1 + "\x01\xa0\x03#\x00\x00\x1e\xe2" + // 0x01A00323: 0x00001EE2 + "\x01\xa1\x03#\x00\x00\x1e\xe3" + // 0x01A10323: 0x00001EE3 + "\x00U\x03#\x00\x00\x1e\xe4" + // 0x00550323: 0x00001EE4 + "\x00u\x03#\x00\x00\x1e\xe5" + // 0x00750323: 0x00001EE5 + "\x00U\x03\t\x00\x00\x1e\xe6" + // 0x00550309: 0x00001EE6 + "\x00u\x03\t\x00\x00\x1e\xe7" + // 0x00750309: 0x00001EE7 + "\x01\xaf\x03\x01\x00\x00\x1e\xe8" + // 0x01AF0301: 0x00001EE8 + "\x01\xb0\x03\x01\x00\x00\x1e\xe9" + // 0x01B00301: 0x00001EE9 + "\x01\xaf\x03\x00\x00\x00\x1e\xea" + // 0x01AF0300: 0x00001EEA + "\x01\xb0\x03\x00\x00\x00\x1e\xeb" + // 0x01B00300: 0x00001EEB + "\x01\xaf\x03\t\x00\x00\x1e\xec" + // 0x01AF0309: 0x00001EEC + "\x01\xb0\x03\t\x00\x00\x1e\xed" + // 0x01B00309: 0x00001EED + "\x01\xaf\x03\x03\x00\x00\x1e\xee" + // 0x01AF0303: 0x00001EEE + "\x01\xb0\x03\x03\x00\x00\x1e\xef" + // 0x01B00303: 0x00001EEF + "\x01\xaf\x03#\x00\x00\x1e\xf0" + // 0x01AF0323: 0x00001EF0 + "\x01\xb0\x03#\x00\x00\x1e\xf1" + // 0x01B00323: 0x00001EF1 + "\x00Y\x03\x00\x00\x00\x1e\xf2" + // 0x00590300: 0x00001EF2 + "\x00y\x03\x00\x00\x00\x1e\xf3" + // 0x00790300: 0x00001EF3 + "\x00Y\x03#\x00\x00\x1e\xf4" + // 0x00590323: 0x00001EF4 + "\x00y\x03#\x00\x00\x1e\xf5" + // 0x00790323: 0x00001EF5 + "\x00Y\x03\t\x00\x00\x1e\xf6" + // 0x00590309: 0x00001EF6 + "\x00y\x03\t\x00\x00\x1e\xf7" + // 0x00790309: 0x00001EF7 + "\x00Y\x03\x03\x00\x00\x1e\xf8" + // 0x00590303: 0x00001EF8 + "\x00y\x03\x03\x00\x00\x1e\xf9" + // 0x00790303: 0x00001EF9 + "\x03\xb1\x03\x13\x00\x00\x1f\x00" + // 0x03B10313: 0x00001F00 + "\x03\xb1\x03\x14\x00\x00\x1f\x01" + // 0x03B10314: 0x00001F01 + "\x1f\x00\x03\x00\x00\x00\x1f\x02" + // 0x1F000300: 0x00001F02 + "\x1f\x01\x03\x00\x00\x00\x1f\x03" + // 0x1F010300: 0x00001F03 + "\x1f\x00\x03\x01\x00\x00\x1f\x04" + // 0x1F000301: 0x00001F04 + "\x1f\x01\x03\x01\x00\x00\x1f\x05" + // 0x1F010301: 0x00001F05 + "\x1f\x00\x03B\x00\x00\x1f\x06" + // 0x1F000342: 0x00001F06 + "\x1f\x01\x03B\x00\x00\x1f\a" + // 0x1F010342: 0x00001F07 + "\x03\x91\x03\x13\x00\x00\x1f\b" + // 0x03910313: 0x00001F08 + "\x03\x91\x03\x14\x00\x00\x1f\t" + // 0x03910314: 0x00001F09 + "\x1f\b\x03\x00\x00\x00\x1f\n" + // 0x1F080300: 0x00001F0A + "\x1f\t\x03\x00\x00\x00\x1f\v" + // 0x1F090300: 0x00001F0B + "\x1f\b\x03\x01\x00\x00\x1f\f" + // 0x1F080301: 0x00001F0C + "\x1f\t\x03\x01\x00\x00\x1f\r" + // 0x1F090301: 0x00001F0D + "\x1f\b\x03B\x00\x00\x1f\x0e" + // 0x1F080342: 0x00001F0E + "\x1f\t\x03B\x00\x00\x1f\x0f" + // 0x1F090342: 0x00001F0F + "\x03\xb5\x03\x13\x00\x00\x1f\x10" + // 0x03B50313: 0x00001F10 + "\x03\xb5\x03\x14\x00\x00\x1f\x11" + // 0x03B50314: 0x00001F11 + "\x1f\x10\x03\x00\x00\x00\x1f\x12" + // 0x1F100300: 0x00001F12 + "\x1f\x11\x03\x00\x00\x00\x1f\x13" + // 0x1F110300: 0x00001F13 + "\x1f\x10\x03\x01\x00\x00\x1f\x14" + // 0x1F100301: 0x00001F14 + "\x1f\x11\x03\x01\x00\x00\x1f\x15" + // 0x1F110301: 0x00001F15 + "\x03\x95\x03\x13\x00\x00\x1f\x18" + // 0x03950313: 0x00001F18 + "\x03\x95\x03\x14\x00\x00\x1f\x19" + // 0x03950314: 0x00001F19 + "\x1f\x18\x03\x00\x00\x00\x1f\x1a" + // 0x1F180300: 0x00001F1A + "\x1f\x19\x03\x00\x00\x00\x1f\x1b" + // 0x1F190300: 0x00001F1B + "\x1f\x18\x03\x01\x00\x00\x1f\x1c" + // 0x1F180301: 0x00001F1C + "\x1f\x19\x03\x01\x00\x00\x1f\x1d" + // 0x1F190301: 0x00001F1D + "\x03\xb7\x03\x13\x00\x00\x1f " + // 0x03B70313: 0x00001F20 + "\x03\xb7\x03\x14\x00\x00\x1f!" + // 0x03B70314: 0x00001F21 + "\x1f \x03\x00\x00\x00\x1f\"" + // 0x1F200300: 0x00001F22 + "\x1f!\x03\x00\x00\x00\x1f#" + // 0x1F210300: 0x00001F23 + "\x1f \x03\x01\x00\x00\x1f$" + // 0x1F200301: 0x00001F24 + "\x1f!\x03\x01\x00\x00\x1f%" + // 0x1F210301: 0x00001F25 + "\x1f \x03B\x00\x00\x1f&" + // 0x1F200342: 0x00001F26 + "\x1f!\x03B\x00\x00\x1f'" + // 0x1F210342: 0x00001F27 + "\x03\x97\x03\x13\x00\x00\x1f(" + // 0x03970313: 0x00001F28 + "\x03\x97\x03\x14\x00\x00\x1f)" + // 0x03970314: 0x00001F29 + "\x1f(\x03\x00\x00\x00\x1f*" + // 0x1F280300: 0x00001F2A + "\x1f)\x03\x00\x00\x00\x1f+" + // 0x1F290300: 0x00001F2B + "\x1f(\x03\x01\x00\x00\x1f," + // 0x1F280301: 0x00001F2C + "\x1f)\x03\x01\x00\x00\x1f-" + // 0x1F290301: 0x00001F2D + "\x1f(\x03B\x00\x00\x1f." + // 0x1F280342: 0x00001F2E + "\x1f)\x03B\x00\x00\x1f/" + // 0x1F290342: 0x00001F2F + "\x03\xb9\x03\x13\x00\x00\x1f0" + // 0x03B90313: 0x00001F30 + "\x03\xb9\x03\x14\x00\x00\x1f1" + // 0x03B90314: 0x00001F31 + "\x1f0\x03\x00\x00\x00\x1f2" + // 0x1F300300: 0x00001F32 + "\x1f1\x03\x00\x00\x00\x1f3" + // 0x1F310300: 0x00001F33 + "\x1f0\x03\x01\x00\x00\x1f4" + // 0x1F300301: 0x00001F34 + "\x1f1\x03\x01\x00\x00\x1f5" + // 0x1F310301: 0x00001F35 + "\x1f0\x03B\x00\x00\x1f6" + // 0x1F300342: 0x00001F36 + "\x1f1\x03B\x00\x00\x1f7" + // 0x1F310342: 0x00001F37 + "\x03\x99\x03\x13\x00\x00\x1f8" + // 0x03990313: 0x00001F38 + "\x03\x99\x03\x14\x00\x00\x1f9" + // 0x03990314: 0x00001F39 + "\x1f8\x03\x00\x00\x00\x1f:" + // 0x1F380300: 0x00001F3A + "\x1f9\x03\x00\x00\x00\x1f;" + // 0x1F390300: 0x00001F3B + "\x1f8\x03\x01\x00\x00\x1f<" + // 0x1F380301: 0x00001F3C + "\x1f9\x03\x01\x00\x00\x1f=" + // 0x1F390301: 0x00001F3D + "\x1f8\x03B\x00\x00\x1f>" + // 0x1F380342: 0x00001F3E + "\x1f9\x03B\x00\x00\x1f?" + // 0x1F390342: 0x00001F3F + "\x03\xbf\x03\x13\x00\x00\x1f@" + // 0x03BF0313: 0x00001F40 + "\x03\xbf\x03\x14\x00\x00\x1fA" + // 0x03BF0314: 0x00001F41 + "\x1f@\x03\x00\x00\x00\x1fB" + // 0x1F400300: 0x00001F42 + "\x1fA\x03\x00\x00\x00\x1fC" + // 0x1F410300: 0x00001F43 + "\x1f@\x03\x01\x00\x00\x1fD" + // 0x1F400301: 0x00001F44 + "\x1fA\x03\x01\x00\x00\x1fE" + // 0x1F410301: 0x00001F45 + "\x03\x9f\x03\x13\x00\x00\x1fH" + // 0x039F0313: 0x00001F48 + "\x03\x9f\x03\x14\x00\x00\x1fI" + // 0x039F0314: 0x00001F49 + "\x1fH\x03\x00\x00\x00\x1fJ" + // 0x1F480300: 0x00001F4A + "\x1fI\x03\x00\x00\x00\x1fK" + // 0x1F490300: 0x00001F4B + "\x1fH\x03\x01\x00\x00\x1fL" + // 0x1F480301: 0x00001F4C + "\x1fI\x03\x01\x00\x00\x1fM" + // 0x1F490301: 0x00001F4D + "\x03\xc5\x03\x13\x00\x00\x1fP" + // 0x03C50313: 0x00001F50 + "\x03\xc5\x03\x14\x00\x00\x1fQ" + // 0x03C50314: 0x00001F51 + "\x1fP\x03\x00\x00\x00\x1fR" + // 0x1F500300: 0x00001F52 + "\x1fQ\x03\x00\x00\x00\x1fS" + // 0x1F510300: 0x00001F53 + "\x1fP\x03\x01\x00\x00\x1fT" + // 0x1F500301: 0x00001F54 + "\x1fQ\x03\x01\x00\x00\x1fU" + // 0x1F510301: 0x00001F55 + "\x1fP\x03B\x00\x00\x1fV" + // 0x1F500342: 0x00001F56 + "\x1fQ\x03B\x00\x00\x1fW" + // 0x1F510342: 0x00001F57 + "\x03\xa5\x03\x14\x00\x00\x1fY" + // 0x03A50314: 0x00001F59 + "\x1fY\x03\x00\x00\x00\x1f[" + // 0x1F590300: 0x00001F5B + "\x1fY\x03\x01\x00\x00\x1f]" + // 0x1F590301: 0x00001F5D + "\x1fY\x03B\x00\x00\x1f_" + // 0x1F590342: 0x00001F5F + "\x03\xc9\x03\x13\x00\x00\x1f`" + // 0x03C90313: 0x00001F60 + "\x03\xc9\x03\x14\x00\x00\x1fa" + // 0x03C90314: 0x00001F61 + "\x1f`\x03\x00\x00\x00\x1fb" + // 0x1F600300: 0x00001F62 + "\x1fa\x03\x00\x00\x00\x1fc" + // 0x1F610300: 0x00001F63 + "\x1f`\x03\x01\x00\x00\x1fd" + // 0x1F600301: 0x00001F64 + "\x1fa\x03\x01\x00\x00\x1fe" + // 0x1F610301: 0x00001F65 + "\x1f`\x03B\x00\x00\x1ff" + // 0x1F600342: 0x00001F66 + "\x1fa\x03B\x00\x00\x1fg" + // 0x1F610342: 0x00001F67 + "\x03\xa9\x03\x13\x00\x00\x1fh" + // 0x03A90313: 0x00001F68 + "\x03\xa9\x03\x14\x00\x00\x1fi" + // 0x03A90314: 0x00001F69 + "\x1fh\x03\x00\x00\x00\x1fj" + // 0x1F680300: 0x00001F6A + "\x1fi\x03\x00\x00\x00\x1fk" + // 0x1F690300: 0x00001F6B + "\x1fh\x03\x01\x00\x00\x1fl" + // 0x1F680301: 0x00001F6C + "\x1fi\x03\x01\x00\x00\x1fm" + // 0x1F690301: 0x00001F6D + "\x1fh\x03B\x00\x00\x1fn" + // 0x1F680342: 0x00001F6E + "\x1fi\x03B\x00\x00\x1fo" + // 0x1F690342: 0x00001F6F + "\x03\xb1\x03\x00\x00\x00\x1fp" + // 0x03B10300: 0x00001F70 + "\x03\xb5\x03\x00\x00\x00\x1fr" + // 0x03B50300: 0x00001F72 + "\x03\xb7\x03\x00\x00\x00\x1ft" + // 0x03B70300: 0x00001F74 + "\x03\xb9\x03\x00\x00\x00\x1fv" + // 0x03B90300: 0x00001F76 + "\x03\xbf\x03\x00\x00\x00\x1fx" + // 0x03BF0300: 0x00001F78 + "\x03\xc5\x03\x00\x00\x00\x1fz" + // 0x03C50300: 0x00001F7A + "\x03\xc9\x03\x00\x00\x00\x1f|" + // 0x03C90300: 0x00001F7C + "\x1f\x00\x03E\x00\x00\x1f\x80" + // 0x1F000345: 0x00001F80 + "\x1f\x01\x03E\x00\x00\x1f\x81" + // 0x1F010345: 0x00001F81 + "\x1f\x02\x03E\x00\x00\x1f\x82" + // 0x1F020345: 0x00001F82 + "\x1f\x03\x03E\x00\x00\x1f\x83" + // 0x1F030345: 0x00001F83 + "\x1f\x04\x03E\x00\x00\x1f\x84" + // 0x1F040345: 0x00001F84 + "\x1f\x05\x03E\x00\x00\x1f\x85" + // 0x1F050345: 0x00001F85 + "\x1f\x06\x03E\x00\x00\x1f\x86" + // 0x1F060345: 0x00001F86 + "\x1f\a\x03E\x00\x00\x1f\x87" + // 0x1F070345: 0x00001F87 + "\x1f\b\x03E\x00\x00\x1f\x88" + // 0x1F080345: 0x00001F88 + "\x1f\t\x03E\x00\x00\x1f\x89" + // 0x1F090345: 0x00001F89 + "\x1f\n\x03E\x00\x00\x1f\x8a" + // 0x1F0A0345: 0x00001F8A + "\x1f\v\x03E\x00\x00\x1f\x8b" + // 0x1F0B0345: 0x00001F8B + "\x1f\f\x03E\x00\x00\x1f\x8c" + // 0x1F0C0345: 0x00001F8C + "\x1f\r\x03E\x00\x00\x1f\x8d" + // 0x1F0D0345: 0x00001F8D + "\x1f\x0e\x03E\x00\x00\x1f\x8e" + // 0x1F0E0345: 0x00001F8E + "\x1f\x0f\x03E\x00\x00\x1f\x8f" + // 0x1F0F0345: 0x00001F8F + "\x1f \x03E\x00\x00\x1f\x90" + // 0x1F200345: 0x00001F90 + "\x1f!\x03E\x00\x00\x1f\x91" + // 0x1F210345: 0x00001F91 + "\x1f\"\x03E\x00\x00\x1f\x92" + // 0x1F220345: 0x00001F92 + "\x1f#\x03E\x00\x00\x1f\x93" + // 0x1F230345: 0x00001F93 + "\x1f$\x03E\x00\x00\x1f\x94" + // 0x1F240345: 0x00001F94 + "\x1f%\x03E\x00\x00\x1f\x95" + // 0x1F250345: 0x00001F95 + "\x1f&\x03E\x00\x00\x1f\x96" + // 0x1F260345: 0x00001F96 + "\x1f'\x03E\x00\x00\x1f\x97" + // 0x1F270345: 0x00001F97 + "\x1f(\x03E\x00\x00\x1f\x98" + // 0x1F280345: 0x00001F98 + "\x1f)\x03E\x00\x00\x1f\x99" + // 0x1F290345: 0x00001F99 + "\x1f*\x03E\x00\x00\x1f\x9a" + // 0x1F2A0345: 0x00001F9A + "\x1f+\x03E\x00\x00\x1f\x9b" + // 0x1F2B0345: 0x00001F9B + "\x1f,\x03E\x00\x00\x1f\x9c" + // 0x1F2C0345: 0x00001F9C + "\x1f-\x03E\x00\x00\x1f\x9d" + // 0x1F2D0345: 0x00001F9D + "\x1f.\x03E\x00\x00\x1f\x9e" + // 0x1F2E0345: 0x00001F9E + "\x1f/\x03E\x00\x00\x1f\x9f" + // 0x1F2F0345: 0x00001F9F + "\x1f`\x03E\x00\x00\x1f\xa0" + // 0x1F600345: 0x00001FA0 + "\x1fa\x03E\x00\x00\x1f\xa1" + // 0x1F610345: 0x00001FA1 + "\x1fb\x03E\x00\x00\x1f\xa2" + // 0x1F620345: 0x00001FA2 + "\x1fc\x03E\x00\x00\x1f\xa3" + // 0x1F630345: 0x00001FA3 + "\x1fd\x03E\x00\x00\x1f\xa4" + // 0x1F640345: 0x00001FA4 + "\x1fe\x03E\x00\x00\x1f\xa5" + // 0x1F650345: 0x00001FA5 + "\x1ff\x03E\x00\x00\x1f\xa6" + // 0x1F660345: 0x00001FA6 + "\x1fg\x03E\x00\x00\x1f\xa7" + // 0x1F670345: 0x00001FA7 + "\x1fh\x03E\x00\x00\x1f\xa8" + // 0x1F680345: 0x00001FA8 + "\x1fi\x03E\x00\x00\x1f\xa9" + // 0x1F690345: 0x00001FA9 + "\x1fj\x03E\x00\x00\x1f\xaa" + // 0x1F6A0345: 0x00001FAA + "\x1fk\x03E\x00\x00\x1f\xab" + // 0x1F6B0345: 0x00001FAB + "\x1fl\x03E\x00\x00\x1f\xac" + // 0x1F6C0345: 0x00001FAC + "\x1fm\x03E\x00\x00\x1f\xad" + // 0x1F6D0345: 0x00001FAD + "\x1fn\x03E\x00\x00\x1f\xae" + // 0x1F6E0345: 0x00001FAE + "\x1fo\x03E\x00\x00\x1f\xaf" + // 0x1F6F0345: 0x00001FAF + "\x03\xb1\x03\x06\x00\x00\x1f\xb0" + // 0x03B10306: 0x00001FB0 + "\x03\xb1\x03\x04\x00\x00\x1f\xb1" + // 0x03B10304: 0x00001FB1 + "\x1fp\x03E\x00\x00\x1f\xb2" + // 0x1F700345: 0x00001FB2 + "\x03\xb1\x03E\x00\x00\x1f\xb3" + // 0x03B10345: 0x00001FB3 + "\x03\xac\x03E\x00\x00\x1f\xb4" + // 0x03AC0345: 0x00001FB4 + "\x03\xb1\x03B\x00\x00\x1f\xb6" + // 0x03B10342: 0x00001FB6 + "\x1f\xb6\x03E\x00\x00\x1f\xb7" + // 0x1FB60345: 0x00001FB7 + "\x03\x91\x03\x06\x00\x00\x1f\xb8" + // 0x03910306: 0x00001FB8 + "\x03\x91\x03\x04\x00\x00\x1f\xb9" + // 0x03910304: 0x00001FB9 + "\x03\x91\x03\x00\x00\x00\x1f\xba" + // 0x03910300: 0x00001FBA + "\x03\x91\x03E\x00\x00\x1f\xbc" + // 0x03910345: 0x00001FBC + "\x00\xa8\x03B\x00\x00\x1f\xc1" + // 0x00A80342: 0x00001FC1 + "\x1ft\x03E\x00\x00\x1f\xc2" + // 0x1F740345: 0x00001FC2 + "\x03\xb7\x03E\x00\x00\x1f\xc3" + // 0x03B70345: 0x00001FC3 + "\x03\xae\x03E\x00\x00\x1f\xc4" + // 0x03AE0345: 0x00001FC4 + "\x03\xb7\x03B\x00\x00\x1f\xc6" + // 0x03B70342: 0x00001FC6 + "\x1f\xc6\x03E\x00\x00\x1f\xc7" + // 0x1FC60345: 0x00001FC7 + "\x03\x95\x03\x00\x00\x00\x1f\xc8" + // 0x03950300: 0x00001FC8 + "\x03\x97\x03\x00\x00\x00\x1f\xca" + // 0x03970300: 0x00001FCA + "\x03\x97\x03E\x00\x00\x1f\xcc" + // 0x03970345: 0x00001FCC + "\x1f\xbf\x03\x00\x00\x00\x1f\xcd" + // 0x1FBF0300: 0x00001FCD + "\x1f\xbf\x03\x01\x00\x00\x1f\xce" + // 0x1FBF0301: 0x00001FCE + "\x1f\xbf\x03B\x00\x00\x1f\xcf" + // 0x1FBF0342: 0x00001FCF + "\x03\xb9\x03\x06\x00\x00\x1f\xd0" + // 0x03B90306: 0x00001FD0 + "\x03\xb9\x03\x04\x00\x00\x1f\xd1" + // 0x03B90304: 0x00001FD1 + "\x03\xca\x03\x00\x00\x00\x1f\xd2" + // 0x03CA0300: 0x00001FD2 + "\x03\xb9\x03B\x00\x00\x1f\xd6" + // 0x03B90342: 0x00001FD6 + "\x03\xca\x03B\x00\x00\x1f\xd7" + // 0x03CA0342: 0x00001FD7 + "\x03\x99\x03\x06\x00\x00\x1f\xd8" + // 0x03990306: 0x00001FD8 + "\x03\x99\x03\x04\x00\x00\x1f\xd9" + // 0x03990304: 0x00001FD9 + "\x03\x99\x03\x00\x00\x00\x1f\xda" + // 0x03990300: 0x00001FDA + "\x1f\xfe\x03\x00\x00\x00\x1f\xdd" + // 0x1FFE0300: 0x00001FDD + "\x1f\xfe\x03\x01\x00\x00\x1f\xde" + // 0x1FFE0301: 0x00001FDE + "\x1f\xfe\x03B\x00\x00\x1f\xdf" + // 0x1FFE0342: 0x00001FDF + "\x03\xc5\x03\x06\x00\x00\x1f\xe0" + // 0x03C50306: 0x00001FE0 + "\x03\xc5\x03\x04\x00\x00\x1f\xe1" + // 0x03C50304: 0x00001FE1 + "\x03\xcb\x03\x00\x00\x00\x1f\xe2" + // 0x03CB0300: 0x00001FE2 + "\x03\xc1\x03\x13\x00\x00\x1f\xe4" + // 0x03C10313: 0x00001FE4 + "\x03\xc1\x03\x14\x00\x00\x1f\xe5" + // 0x03C10314: 0x00001FE5 + "\x03\xc5\x03B\x00\x00\x1f\xe6" + // 0x03C50342: 0x00001FE6 + "\x03\xcb\x03B\x00\x00\x1f\xe7" + // 0x03CB0342: 0x00001FE7 + "\x03\xa5\x03\x06\x00\x00\x1f\xe8" + // 0x03A50306: 0x00001FE8 + "\x03\xa5\x03\x04\x00\x00\x1f\xe9" + // 0x03A50304: 0x00001FE9 + "\x03\xa5\x03\x00\x00\x00\x1f\xea" + // 0x03A50300: 0x00001FEA + "\x03\xa1\x03\x14\x00\x00\x1f\xec" + // 0x03A10314: 0x00001FEC + "\x00\xa8\x03\x00\x00\x00\x1f\xed" + // 0x00A80300: 0x00001FED + "\x1f|\x03E\x00\x00\x1f\xf2" + // 0x1F7C0345: 0x00001FF2 + "\x03\xc9\x03E\x00\x00\x1f\xf3" + // 0x03C90345: 0x00001FF3 + "\x03\xce\x03E\x00\x00\x1f\xf4" + // 0x03CE0345: 0x00001FF4 + "\x03\xc9\x03B\x00\x00\x1f\xf6" + // 0x03C90342: 0x00001FF6 + "\x1f\xf6\x03E\x00\x00\x1f\xf7" + // 0x1FF60345: 0x00001FF7 + "\x03\x9f\x03\x00\x00\x00\x1f\xf8" + // 0x039F0300: 0x00001FF8 + "\x03\xa9\x03\x00\x00\x00\x1f\xfa" + // 0x03A90300: 0x00001FFA + "\x03\xa9\x03E\x00\x00\x1f\xfc" + // 0x03A90345: 0x00001FFC + "!\x90\x038\x00\x00!\x9a" + // 0x21900338: 0x0000219A + "!\x92\x038\x00\x00!\x9b" + // 0x21920338: 0x0000219B + "!\x94\x038\x00\x00!\xae" + // 0x21940338: 0x000021AE + "!\xd0\x038\x00\x00!\xcd" + // 0x21D00338: 0x000021CD + "!\xd4\x038\x00\x00!\xce" + // 0x21D40338: 0x000021CE + "!\xd2\x038\x00\x00!\xcf" + // 0x21D20338: 0x000021CF + "\"\x03\x038\x00\x00\"\x04" + // 0x22030338: 0x00002204 + "\"\b\x038\x00\x00\"\t" + // 0x22080338: 0x00002209 + "\"\v\x038\x00\x00\"\f" + // 0x220B0338: 0x0000220C + "\"#\x038\x00\x00\"$" + // 0x22230338: 0x00002224 + "\"%\x038\x00\x00\"&" + // 0x22250338: 0x00002226 + "\"<\x038\x00\x00\"A" + // 0x223C0338: 0x00002241 + "\"C\x038\x00\x00\"D" + // 0x22430338: 0x00002244 + "\"E\x038\x00\x00\"G" + // 0x22450338: 0x00002247 + "\"H\x038\x00\x00\"I" + // 0x22480338: 0x00002249 + "\x00=\x038\x00\x00\"`" + // 0x003D0338: 0x00002260 + "\"a\x038\x00\x00\"b" + // 0x22610338: 0x00002262 + "\"M\x038\x00\x00\"m" + // 0x224D0338: 0x0000226D + "\x00<\x038\x00\x00\"n" + // 0x003C0338: 0x0000226E + "\x00>\x038\x00\x00\"o" + // 0x003E0338: 0x0000226F + "\"d\x038\x00\x00\"p" + // 0x22640338: 0x00002270 + "\"e\x038\x00\x00\"q" + // 0x22650338: 0x00002271 + "\"r\x038\x00\x00\"t" + // 0x22720338: 0x00002274 + "\"s\x038\x00\x00\"u" + // 0x22730338: 0x00002275 + "\"v\x038\x00\x00\"x" + // 0x22760338: 0x00002278 + "\"w\x038\x00\x00\"y" + // 0x22770338: 0x00002279 + "\"z\x038\x00\x00\"\x80" + // 0x227A0338: 0x00002280 + "\"{\x038\x00\x00\"\x81" + // 0x227B0338: 0x00002281 + "\"\x82\x038\x00\x00\"\x84" + // 0x22820338: 0x00002284 + "\"\x83\x038\x00\x00\"\x85" + // 0x22830338: 0x00002285 + "\"\x86\x038\x00\x00\"\x88" + // 0x22860338: 0x00002288 + "\"\x87\x038\x00\x00\"\x89" + // 0x22870338: 0x00002289 + "\"\xa2\x038\x00\x00\"\xac" + // 0x22A20338: 0x000022AC + "\"\xa8\x038\x00\x00\"\xad" + // 0x22A80338: 0x000022AD + "\"\xa9\x038\x00\x00\"\xae" + // 0x22A90338: 0x000022AE + "\"\xab\x038\x00\x00\"\xaf" + // 0x22AB0338: 0x000022AF + "\"|\x038\x00\x00\"\xe0" + // 0x227C0338: 0x000022E0 + "\"}\x038\x00\x00\"\xe1" + // 0x227D0338: 0x000022E1 + "\"\x91\x038\x00\x00\"\xe2" + // 0x22910338: 0x000022E2 + "\"\x92\x038\x00\x00\"\xe3" + // 0x22920338: 0x000022E3 + "\"\xb2\x038\x00\x00\"\xea" + // 0x22B20338: 0x000022EA + "\"\xb3\x038\x00\x00\"\xeb" + // 0x22B30338: 0x000022EB + "\"\xb4\x038\x00\x00\"\xec" + // 0x22B40338: 0x000022EC + "\"\xb5\x038\x00\x00\"\xed" + // 0x22B50338: 0x000022ED + "0K0\x99\x00\x000L" + // 0x304B3099: 0x0000304C + "0M0\x99\x00\x000N" + // 0x304D3099: 0x0000304E + "0O0\x99\x00\x000P" + // 0x304F3099: 0x00003050 + "0Q0\x99\x00\x000R" + // 0x30513099: 0x00003052 + "0S0\x99\x00\x000T" + // 0x30533099: 0x00003054 + "0U0\x99\x00\x000V" + // 0x30553099: 0x00003056 + "0W0\x99\x00\x000X" + // 0x30573099: 0x00003058 + "0Y0\x99\x00\x000Z" + // 0x30593099: 0x0000305A + "0[0\x99\x00\x000\\" + // 0x305B3099: 0x0000305C + "0]0\x99\x00\x000^" + // 0x305D3099: 0x0000305E + "0_0\x99\x00\x000`" + // 0x305F3099: 0x00003060 + "0a0\x99\x00\x000b" + // 0x30613099: 0x00003062 + "0d0\x99\x00\x000e" + // 0x30643099: 0x00003065 + "0f0\x99\x00\x000g" + // 0x30663099: 0x00003067 + "0h0\x99\x00\x000i" + // 0x30683099: 0x00003069 + "0o0\x99\x00\x000p" + // 0x306F3099: 0x00003070 + "0o0\x9a\x00\x000q" + // 0x306F309A: 0x00003071 + "0r0\x99\x00\x000s" + // 0x30723099: 0x00003073 + "0r0\x9a\x00\x000t" + // 0x3072309A: 0x00003074 + "0u0\x99\x00\x000v" + // 0x30753099: 0x00003076 + "0u0\x9a\x00\x000w" + // 0x3075309A: 0x00003077 + "0x0\x99\x00\x000y" + // 0x30783099: 0x00003079 + "0x0\x9a\x00\x000z" + // 0x3078309A: 0x0000307A + "0{0\x99\x00\x000|" + // 0x307B3099: 0x0000307C + "0{0\x9a\x00\x000}" + // 0x307B309A: 0x0000307D + "0F0\x99\x00\x000\x94" + // 0x30463099: 0x00003094 + "0\x9d0\x99\x00\x000\x9e" + // 0x309D3099: 0x0000309E + "0\xab0\x99\x00\x000\xac" + // 0x30AB3099: 0x000030AC + "0\xad0\x99\x00\x000\xae" + // 0x30AD3099: 0x000030AE + "0\xaf0\x99\x00\x000\xb0" + // 0x30AF3099: 0x000030B0 + "0\xb10\x99\x00\x000\xb2" + // 0x30B13099: 0x000030B2 + "0\xb30\x99\x00\x000\xb4" + // 0x30B33099: 0x000030B4 + "0\xb50\x99\x00\x000\xb6" + // 0x30B53099: 0x000030B6 + "0\xb70\x99\x00\x000\xb8" + // 0x30B73099: 0x000030B8 + "0\xb90\x99\x00\x000\xba" + // 0x30B93099: 0x000030BA + "0\xbb0\x99\x00\x000\xbc" + // 0x30BB3099: 0x000030BC + "0\xbd0\x99\x00\x000\xbe" + // 0x30BD3099: 0x000030BE + "0\xbf0\x99\x00\x000\xc0" + // 0x30BF3099: 0x000030C0 + "0\xc10\x99\x00\x000\xc2" + // 0x30C13099: 0x000030C2 + "0\xc40\x99\x00\x000\xc5" + // 0x30C43099: 0x000030C5 + "0\xc60\x99\x00\x000\xc7" + // 0x30C63099: 0x000030C7 + "0\xc80\x99\x00\x000\xc9" + // 0x30C83099: 0x000030C9 + "0\xcf0\x99\x00\x000\xd0" + // 0x30CF3099: 0x000030D0 + "0\xcf0\x9a\x00\x000\xd1" + // 0x30CF309A: 0x000030D1 + "0\xd20\x99\x00\x000\xd3" + // 0x30D23099: 0x000030D3 + "0\xd20\x9a\x00\x000\xd4" + // 0x30D2309A: 0x000030D4 + "0\xd50\x99\x00\x000\xd6" + // 0x30D53099: 0x000030D6 + "0\xd50\x9a\x00\x000\xd7" + // 0x30D5309A: 0x000030D7 + "0\xd80\x99\x00\x000\xd9" + // 0x30D83099: 0x000030D9 + "0\xd80\x9a\x00\x000\xda" + // 0x30D8309A: 0x000030DA + "0\xdb0\x99\x00\x000\xdc" + // 0x30DB3099: 0x000030DC + "0\xdb0\x9a\x00\x000\xdd" + // 0x30DB309A: 0x000030DD + "0\xa60\x99\x00\x000\xf4" + // 0x30A63099: 0x000030F4 + "0\xef0\x99\x00\x000\xf7" + // 0x30EF3099: 0x000030F7 + "0\xf00\x99\x00\x000\xf8" + // 0x30F03099: 0x000030F8 + "0\xf10\x99\x00\x000\xf9" + // 0x30F13099: 0x000030F9 + "0\xf20\x99\x00\x000\xfa" + // 0x30F23099: 0x000030FA + "0\xfd0\x99\x00\x000\xfe" + // 0x30FD3099: 0x000030FE + "\x10\x99\x10\xba\x00\x01\x10\x9a" + // 0x109910BA: 0x0001109A + "\x10\x9b\x10\xba\x00\x01\x10\x9c" + // 0x109B10BA: 0x0001109C + "\x10\xa5\x10\xba\x00\x01\x10\xab" + // 0x10A510BA: 0x000110AB + "\x111\x11'\x00\x01\x11." + // 0x11311127: 0x0001112E + "\x112\x11'\x00\x01\x11/" + // 0x11321127: 0x0001112F + "\x13G\x13>\x00\x01\x13K" + // 0x1347133E: 0x0001134B + "\x13G\x13W\x00\x01\x13L" + // 0x13471357: 0x0001134C + "\x14\xb9\x14\xba\x00\x01\x14\xbb" + // 0x14B914BA: 0x000114BB + "\x14\xb9\x14\xb0\x00\x01\x14\xbc" + // 0x14B914B0: 0x000114BC + "\x14\xb9\x14\xbd\x00\x01\x14\xbe" + // 0x14B914BD: 0x000114BE + "\x15\xb8\x15\xaf\x00\x01\x15\xba" + // 0x15B815AF: 0x000115BA + "\x15\xb9\x15\xaf\x00\x01\x15\xbb" + // 0x15B915AF: 0x000115BB + "" + // Total size of tables: 55KB (55977 bytes) diff --git a/vendor/golang.org/x/text/width/tables11.0.0.go b/vendor/golang.org/x/text/width/tables11.0.0.go index d6def0e7be5..3c75e428fd0 100644 --- a/vendor/golang.org/x/text/width/tables11.0.0.go +++ b/vendor/golang.org/x/text/width/tables11.0.0.go @@ -1,6 +1,6 @@ // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. -// +build go1.13 +// +build go1.13,!go1.14 package width diff --git a/vendor/golang.org/x/text/width/tables12.0.0.go b/vendor/golang.org/x/text/width/tables12.0.0.go new file mode 100644 index 00000000000..5c859677a79 --- /dev/null +++ b/vendor/golang.org/x/text/width/tables12.0.0.go @@ -0,0 +1,1350 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +// +build go1.14 + +package width + +// UnicodeVersion is the Unicode version from which the tables in this package are derived. +const UnicodeVersion = "12.0.0" + +// lookup returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *widthTrie) lookup(s []byte) (v uint16, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return widthValues[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := widthIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := widthIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = widthIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := widthIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = widthIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = widthIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *widthTrie) lookupUnsafe(s []byte) uint16 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return widthValues[c0] + } + i := widthIndex[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = widthIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = widthIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// lookupString returns the trie value for the first UTF-8 encoding in s and +// the width in bytes of this encoding. The size will be 0 if s does not +// hold enough bytes to complete the encoding. len(s) must be greater than 0. +func (t *widthTrie) lookupString(s string) (v uint16, sz int) { + c0 := s[0] + switch { + case c0 < 0x80: // is ASCII + return widthValues[c0], 1 + case c0 < 0xC2: + return 0, 1 // Illegal UTF-8: not a starter, not ASCII. + case c0 < 0xE0: // 2-byte UTF-8 + if len(s) < 2 { + return 0, 0 + } + i := widthIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c1), 2 + case c0 < 0xF0: // 3-byte UTF-8 + if len(s) < 3 { + return 0, 0 + } + i := widthIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = widthIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c2), 3 + case c0 < 0xF8: // 4-byte UTF-8 + if len(s) < 4 { + return 0, 0 + } + i := widthIndex[c0] + c1 := s[1] + if c1 < 0x80 || 0xC0 <= c1 { + return 0, 1 // Illegal UTF-8: not a continuation byte. + } + o := uint32(i)<<6 + uint32(c1) + i = widthIndex[o] + c2 := s[2] + if c2 < 0x80 || 0xC0 <= c2 { + return 0, 2 // Illegal UTF-8: not a continuation byte. + } + o = uint32(i)<<6 + uint32(c2) + i = widthIndex[o] + c3 := s[3] + if c3 < 0x80 || 0xC0 <= c3 { + return 0, 3 // Illegal UTF-8: not a continuation byte. + } + return t.lookupValue(uint32(i), c3), 4 + } + // Illegal rune + return 0, 1 +} + +// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s. +// s must start with a full and valid UTF-8 encoded rune. +func (t *widthTrie) lookupStringUnsafe(s string) uint16 { + c0 := s[0] + if c0 < 0x80 { // is ASCII + return widthValues[c0] + } + i := widthIndex[c0] + if c0 < 0xE0 { // 2-byte UTF-8 + return t.lookupValue(uint32(i), s[1]) + } + i = widthIndex[uint32(i)<<6+uint32(s[1])] + if c0 < 0xF0 { // 3-byte UTF-8 + return t.lookupValue(uint32(i), s[2]) + } + i = widthIndex[uint32(i)<<6+uint32(s[2])] + if c0 < 0xF8 { // 4-byte UTF-8 + return t.lookupValue(uint32(i), s[3]) + } + return 0 +} + +// widthTrie. Total size: 14720 bytes (14.38 KiB). Checksum: 3f4f2516ded5489b. +type widthTrie struct{} + +func newWidthTrie(i int) *widthTrie { + return &widthTrie{} +} + +// lookupValue determines the type of block n and looks up the value for b. +func (t *widthTrie) lookupValue(n uint32, b byte) uint16 { + switch { + default: + return uint16(widthValues[n<<6+uint32(b)]) + } +} + +// widthValues: 104 blocks, 6656 entries, 13312 bytes +// The third block is the zero block. +var widthValues = [6656]uint16{ + // Block 0x0, offset 0x0 + 0x20: 0x6001, 0x21: 0x6002, 0x22: 0x6002, 0x23: 0x6002, + 0x24: 0x6002, 0x25: 0x6002, 0x26: 0x6002, 0x27: 0x6002, 0x28: 0x6002, 0x29: 0x6002, + 0x2a: 0x6002, 0x2b: 0x6002, 0x2c: 0x6002, 0x2d: 0x6002, 0x2e: 0x6002, 0x2f: 0x6002, + 0x30: 0x6002, 0x31: 0x6002, 0x32: 0x6002, 0x33: 0x6002, 0x34: 0x6002, 0x35: 0x6002, + 0x36: 0x6002, 0x37: 0x6002, 0x38: 0x6002, 0x39: 0x6002, 0x3a: 0x6002, 0x3b: 0x6002, + 0x3c: 0x6002, 0x3d: 0x6002, 0x3e: 0x6002, 0x3f: 0x6002, + // Block 0x1, offset 0x40 + 0x40: 0x6003, 0x41: 0x6003, 0x42: 0x6003, 0x43: 0x6003, 0x44: 0x6003, 0x45: 0x6003, + 0x46: 0x6003, 0x47: 0x6003, 0x48: 0x6003, 0x49: 0x6003, 0x4a: 0x6003, 0x4b: 0x6003, + 0x4c: 0x6003, 0x4d: 0x6003, 0x4e: 0x6003, 0x4f: 0x6003, 0x50: 0x6003, 0x51: 0x6003, + 0x52: 0x6003, 0x53: 0x6003, 0x54: 0x6003, 0x55: 0x6003, 0x56: 0x6003, 0x57: 0x6003, + 0x58: 0x6003, 0x59: 0x6003, 0x5a: 0x6003, 0x5b: 0x6003, 0x5c: 0x6003, 0x5d: 0x6003, + 0x5e: 0x6003, 0x5f: 0x6003, 0x60: 0x6004, 0x61: 0x6004, 0x62: 0x6004, 0x63: 0x6004, + 0x64: 0x6004, 0x65: 0x6004, 0x66: 0x6004, 0x67: 0x6004, 0x68: 0x6004, 0x69: 0x6004, + 0x6a: 0x6004, 0x6b: 0x6004, 0x6c: 0x6004, 0x6d: 0x6004, 0x6e: 0x6004, 0x6f: 0x6004, + 0x70: 0x6004, 0x71: 0x6004, 0x72: 0x6004, 0x73: 0x6004, 0x74: 0x6004, 0x75: 0x6004, + 0x76: 0x6004, 0x77: 0x6004, 0x78: 0x6004, 0x79: 0x6004, 0x7a: 0x6004, 0x7b: 0x6004, + 0x7c: 0x6004, 0x7d: 0x6004, 0x7e: 0x6004, + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xe1: 0x2000, 0xe2: 0x6005, 0xe3: 0x6005, + 0xe4: 0x2000, 0xe5: 0x6006, 0xe6: 0x6005, 0xe7: 0x2000, 0xe8: 0x2000, + 0xea: 0x2000, 0xec: 0x6007, 0xed: 0x2000, 0xee: 0x2000, 0xef: 0x6008, + 0xf0: 0x2000, 0xf1: 0x2000, 0xf2: 0x2000, 0xf3: 0x2000, 0xf4: 0x2000, + 0xf6: 0x2000, 0xf7: 0x2000, 0xf8: 0x2000, 0xf9: 0x2000, 0xfa: 0x2000, + 0xfc: 0x2000, 0xfd: 0x2000, 0xfe: 0x2000, 0xff: 0x2000, + // Block 0x4, offset 0x100 + 0x106: 0x2000, + 0x110: 0x2000, + 0x117: 0x2000, + 0x118: 0x2000, + 0x11e: 0x2000, 0x11f: 0x2000, 0x120: 0x2000, 0x121: 0x2000, + 0x126: 0x2000, 0x128: 0x2000, 0x129: 0x2000, + 0x12a: 0x2000, 0x12c: 0x2000, 0x12d: 0x2000, + 0x130: 0x2000, 0x132: 0x2000, 0x133: 0x2000, + 0x137: 0x2000, 0x138: 0x2000, 0x139: 0x2000, 0x13a: 0x2000, + 0x13c: 0x2000, 0x13e: 0x2000, + // Block 0x5, offset 0x140 + 0x141: 0x2000, + 0x151: 0x2000, + 0x153: 0x2000, + 0x15b: 0x2000, + 0x166: 0x2000, 0x167: 0x2000, + 0x16b: 0x2000, + 0x171: 0x2000, 0x172: 0x2000, 0x173: 0x2000, + 0x178: 0x2000, + 0x17f: 0x2000, + // Block 0x6, offset 0x180 + 0x180: 0x2000, 0x181: 0x2000, 0x182: 0x2000, 0x184: 0x2000, + 0x188: 0x2000, 0x189: 0x2000, 0x18a: 0x2000, 0x18b: 0x2000, + 0x18d: 0x2000, + 0x192: 0x2000, 0x193: 0x2000, + 0x1a6: 0x2000, 0x1a7: 0x2000, + 0x1ab: 0x2000, + // Block 0x7, offset 0x1c0 + 0x1ce: 0x2000, 0x1d0: 0x2000, + 0x1d2: 0x2000, 0x1d4: 0x2000, 0x1d6: 0x2000, + 0x1d8: 0x2000, 0x1da: 0x2000, 0x1dc: 0x2000, + // Block 0x8, offset 0x200 + 0x211: 0x2000, + 0x221: 0x2000, + // Block 0x9, offset 0x240 + 0x244: 0x2000, + 0x247: 0x2000, 0x249: 0x2000, 0x24a: 0x2000, 0x24b: 0x2000, + 0x24d: 0x2000, 0x250: 0x2000, + 0x258: 0x2000, 0x259: 0x2000, 0x25a: 0x2000, 0x25b: 0x2000, 0x25d: 0x2000, + 0x25f: 0x2000, + // Block 0xa, offset 0x280 + 0x280: 0x2000, 0x281: 0x2000, 0x282: 0x2000, 0x283: 0x2000, 0x284: 0x2000, 0x285: 0x2000, + 0x286: 0x2000, 0x287: 0x2000, 0x288: 0x2000, 0x289: 0x2000, 0x28a: 0x2000, 0x28b: 0x2000, + 0x28c: 0x2000, 0x28d: 0x2000, 0x28e: 0x2000, 0x28f: 0x2000, 0x290: 0x2000, 0x291: 0x2000, + 0x292: 0x2000, 0x293: 0x2000, 0x294: 0x2000, 0x295: 0x2000, 0x296: 0x2000, 0x297: 0x2000, + 0x298: 0x2000, 0x299: 0x2000, 0x29a: 0x2000, 0x29b: 0x2000, 0x29c: 0x2000, 0x29d: 0x2000, + 0x29e: 0x2000, 0x29f: 0x2000, 0x2a0: 0x2000, 0x2a1: 0x2000, 0x2a2: 0x2000, 0x2a3: 0x2000, + 0x2a4: 0x2000, 0x2a5: 0x2000, 0x2a6: 0x2000, 0x2a7: 0x2000, 0x2a8: 0x2000, 0x2a9: 0x2000, + 0x2aa: 0x2000, 0x2ab: 0x2000, 0x2ac: 0x2000, 0x2ad: 0x2000, 0x2ae: 0x2000, 0x2af: 0x2000, + 0x2b0: 0x2000, 0x2b1: 0x2000, 0x2b2: 0x2000, 0x2b3: 0x2000, 0x2b4: 0x2000, 0x2b5: 0x2000, + 0x2b6: 0x2000, 0x2b7: 0x2000, 0x2b8: 0x2000, 0x2b9: 0x2000, 0x2ba: 0x2000, 0x2bb: 0x2000, + 0x2bc: 0x2000, 0x2bd: 0x2000, 0x2be: 0x2000, 0x2bf: 0x2000, + // Block 0xb, offset 0x2c0 + 0x2c0: 0x2000, 0x2c1: 0x2000, 0x2c2: 0x2000, 0x2c3: 0x2000, 0x2c4: 0x2000, 0x2c5: 0x2000, + 0x2c6: 0x2000, 0x2c7: 0x2000, 0x2c8: 0x2000, 0x2c9: 0x2000, 0x2ca: 0x2000, 0x2cb: 0x2000, + 0x2cc: 0x2000, 0x2cd: 0x2000, 0x2ce: 0x2000, 0x2cf: 0x2000, 0x2d0: 0x2000, 0x2d1: 0x2000, + 0x2d2: 0x2000, 0x2d3: 0x2000, 0x2d4: 0x2000, 0x2d5: 0x2000, 0x2d6: 0x2000, 0x2d7: 0x2000, + 0x2d8: 0x2000, 0x2d9: 0x2000, 0x2da: 0x2000, 0x2db: 0x2000, 0x2dc: 0x2000, 0x2dd: 0x2000, + 0x2de: 0x2000, 0x2df: 0x2000, 0x2e0: 0x2000, 0x2e1: 0x2000, 0x2e2: 0x2000, 0x2e3: 0x2000, + 0x2e4: 0x2000, 0x2e5: 0x2000, 0x2e6: 0x2000, 0x2e7: 0x2000, 0x2e8: 0x2000, 0x2e9: 0x2000, + 0x2ea: 0x2000, 0x2eb: 0x2000, 0x2ec: 0x2000, 0x2ed: 0x2000, 0x2ee: 0x2000, 0x2ef: 0x2000, + // Block 0xc, offset 0x300 + 0x311: 0x2000, + 0x312: 0x2000, 0x313: 0x2000, 0x314: 0x2000, 0x315: 0x2000, 0x316: 0x2000, 0x317: 0x2000, + 0x318: 0x2000, 0x319: 0x2000, 0x31a: 0x2000, 0x31b: 0x2000, 0x31c: 0x2000, 0x31d: 0x2000, + 0x31e: 0x2000, 0x31f: 0x2000, 0x320: 0x2000, 0x321: 0x2000, 0x323: 0x2000, + 0x324: 0x2000, 0x325: 0x2000, 0x326: 0x2000, 0x327: 0x2000, 0x328: 0x2000, 0x329: 0x2000, + 0x331: 0x2000, 0x332: 0x2000, 0x333: 0x2000, 0x334: 0x2000, 0x335: 0x2000, + 0x336: 0x2000, 0x337: 0x2000, 0x338: 0x2000, 0x339: 0x2000, 0x33a: 0x2000, 0x33b: 0x2000, + 0x33c: 0x2000, 0x33d: 0x2000, 0x33e: 0x2000, 0x33f: 0x2000, + // Block 0xd, offset 0x340 + 0x340: 0x2000, 0x341: 0x2000, 0x343: 0x2000, 0x344: 0x2000, 0x345: 0x2000, + 0x346: 0x2000, 0x347: 0x2000, 0x348: 0x2000, 0x349: 0x2000, + // Block 0xe, offset 0x380 + 0x381: 0x2000, + 0x390: 0x2000, 0x391: 0x2000, + 0x392: 0x2000, 0x393: 0x2000, 0x394: 0x2000, 0x395: 0x2000, 0x396: 0x2000, 0x397: 0x2000, + 0x398: 0x2000, 0x399: 0x2000, 0x39a: 0x2000, 0x39b: 0x2000, 0x39c: 0x2000, 0x39d: 0x2000, + 0x39e: 0x2000, 0x39f: 0x2000, 0x3a0: 0x2000, 0x3a1: 0x2000, 0x3a2: 0x2000, 0x3a3: 0x2000, + 0x3a4: 0x2000, 0x3a5: 0x2000, 0x3a6: 0x2000, 0x3a7: 0x2000, 0x3a8: 0x2000, 0x3a9: 0x2000, + 0x3aa: 0x2000, 0x3ab: 0x2000, 0x3ac: 0x2000, 0x3ad: 0x2000, 0x3ae: 0x2000, 0x3af: 0x2000, + 0x3b0: 0x2000, 0x3b1: 0x2000, 0x3b2: 0x2000, 0x3b3: 0x2000, 0x3b4: 0x2000, 0x3b5: 0x2000, + 0x3b6: 0x2000, 0x3b7: 0x2000, 0x3b8: 0x2000, 0x3b9: 0x2000, 0x3ba: 0x2000, 0x3bb: 0x2000, + 0x3bc: 0x2000, 0x3bd: 0x2000, 0x3be: 0x2000, 0x3bf: 0x2000, + // Block 0xf, offset 0x3c0 + 0x3c0: 0x2000, 0x3c1: 0x2000, 0x3c2: 0x2000, 0x3c3: 0x2000, 0x3c4: 0x2000, 0x3c5: 0x2000, + 0x3c6: 0x2000, 0x3c7: 0x2000, 0x3c8: 0x2000, 0x3c9: 0x2000, 0x3ca: 0x2000, 0x3cb: 0x2000, + 0x3cc: 0x2000, 0x3cd: 0x2000, 0x3ce: 0x2000, 0x3cf: 0x2000, 0x3d1: 0x2000, + // Block 0x10, offset 0x400 + 0x400: 0x4000, 0x401: 0x4000, 0x402: 0x4000, 0x403: 0x4000, 0x404: 0x4000, 0x405: 0x4000, + 0x406: 0x4000, 0x407: 0x4000, 0x408: 0x4000, 0x409: 0x4000, 0x40a: 0x4000, 0x40b: 0x4000, + 0x40c: 0x4000, 0x40d: 0x4000, 0x40e: 0x4000, 0x40f: 0x4000, 0x410: 0x4000, 0x411: 0x4000, + 0x412: 0x4000, 0x413: 0x4000, 0x414: 0x4000, 0x415: 0x4000, 0x416: 0x4000, 0x417: 0x4000, + 0x418: 0x4000, 0x419: 0x4000, 0x41a: 0x4000, 0x41b: 0x4000, 0x41c: 0x4000, 0x41d: 0x4000, + 0x41e: 0x4000, 0x41f: 0x4000, 0x420: 0x4000, 0x421: 0x4000, 0x422: 0x4000, 0x423: 0x4000, + 0x424: 0x4000, 0x425: 0x4000, 0x426: 0x4000, 0x427: 0x4000, 0x428: 0x4000, 0x429: 0x4000, + 0x42a: 0x4000, 0x42b: 0x4000, 0x42c: 0x4000, 0x42d: 0x4000, 0x42e: 0x4000, 0x42f: 0x4000, + 0x430: 0x4000, 0x431: 0x4000, 0x432: 0x4000, 0x433: 0x4000, 0x434: 0x4000, 0x435: 0x4000, + 0x436: 0x4000, 0x437: 0x4000, 0x438: 0x4000, 0x439: 0x4000, 0x43a: 0x4000, 0x43b: 0x4000, + 0x43c: 0x4000, 0x43d: 0x4000, 0x43e: 0x4000, 0x43f: 0x4000, + // Block 0x11, offset 0x440 + 0x440: 0x4000, 0x441: 0x4000, 0x442: 0x4000, 0x443: 0x4000, 0x444: 0x4000, 0x445: 0x4000, + 0x446: 0x4000, 0x447: 0x4000, 0x448: 0x4000, 0x449: 0x4000, 0x44a: 0x4000, 0x44b: 0x4000, + 0x44c: 0x4000, 0x44d: 0x4000, 0x44e: 0x4000, 0x44f: 0x4000, 0x450: 0x4000, 0x451: 0x4000, + 0x452: 0x4000, 0x453: 0x4000, 0x454: 0x4000, 0x455: 0x4000, 0x456: 0x4000, 0x457: 0x4000, + 0x458: 0x4000, 0x459: 0x4000, 0x45a: 0x4000, 0x45b: 0x4000, 0x45c: 0x4000, 0x45d: 0x4000, + 0x45e: 0x4000, 0x45f: 0x4000, + // Block 0x12, offset 0x480 + 0x490: 0x2000, + 0x493: 0x2000, 0x494: 0x2000, 0x495: 0x2000, 0x496: 0x2000, + 0x498: 0x2000, 0x499: 0x2000, 0x49c: 0x2000, 0x49d: 0x2000, + 0x4a0: 0x2000, 0x4a1: 0x2000, 0x4a2: 0x2000, + 0x4a4: 0x2000, 0x4a5: 0x2000, 0x4a6: 0x2000, 0x4a7: 0x2000, + 0x4b0: 0x2000, 0x4b2: 0x2000, 0x4b3: 0x2000, 0x4b5: 0x2000, + 0x4bb: 0x2000, + 0x4be: 0x2000, + // Block 0x13, offset 0x4c0 + 0x4f4: 0x2000, + 0x4ff: 0x2000, + // Block 0x14, offset 0x500 + 0x501: 0x2000, 0x502: 0x2000, 0x503: 0x2000, 0x504: 0x2000, + 0x529: 0xa009, + 0x52c: 0x2000, + // Block 0x15, offset 0x540 + 0x543: 0x2000, 0x545: 0x2000, + 0x549: 0x2000, + 0x553: 0x2000, 0x556: 0x2000, + 0x561: 0x2000, 0x562: 0x2000, + 0x566: 0x2000, + 0x56b: 0x2000, + // Block 0x16, offset 0x580 + 0x593: 0x2000, 0x594: 0x2000, + 0x59b: 0x2000, 0x59c: 0x2000, 0x59d: 0x2000, + 0x59e: 0x2000, 0x5a0: 0x2000, 0x5a1: 0x2000, 0x5a2: 0x2000, 0x5a3: 0x2000, + 0x5a4: 0x2000, 0x5a5: 0x2000, 0x5a6: 0x2000, 0x5a7: 0x2000, 0x5a8: 0x2000, 0x5a9: 0x2000, + 0x5aa: 0x2000, 0x5ab: 0x2000, + 0x5b0: 0x2000, 0x5b1: 0x2000, 0x5b2: 0x2000, 0x5b3: 0x2000, 0x5b4: 0x2000, 0x5b5: 0x2000, + 0x5b6: 0x2000, 0x5b7: 0x2000, 0x5b8: 0x2000, 0x5b9: 0x2000, + // Block 0x17, offset 0x5c0 + 0x5c9: 0x2000, + 0x5d0: 0x200a, 0x5d1: 0x200b, + 0x5d2: 0x200a, 0x5d3: 0x200c, 0x5d4: 0x2000, 0x5d5: 0x2000, 0x5d6: 0x2000, 0x5d7: 0x2000, + 0x5d8: 0x2000, 0x5d9: 0x2000, + 0x5f8: 0x2000, 0x5f9: 0x2000, + // Block 0x18, offset 0x600 + 0x612: 0x2000, 0x614: 0x2000, + 0x627: 0x2000, + // Block 0x19, offset 0x640 + 0x640: 0x2000, 0x642: 0x2000, 0x643: 0x2000, + 0x647: 0x2000, 0x648: 0x2000, 0x64b: 0x2000, + 0x64f: 0x2000, 0x651: 0x2000, + 0x655: 0x2000, + 0x65a: 0x2000, 0x65d: 0x2000, + 0x65e: 0x2000, 0x65f: 0x2000, 0x660: 0x2000, 0x663: 0x2000, + 0x665: 0x2000, 0x667: 0x2000, 0x668: 0x2000, 0x669: 0x2000, + 0x66a: 0x2000, 0x66b: 0x2000, 0x66c: 0x2000, 0x66e: 0x2000, + 0x674: 0x2000, 0x675: 0x2000, + 0x676: 0x2000, 0x677: 0x2000, + 0x67c: 0x2000, 0x67d: 0x2000, + // Block 0x1a, offset 0x680 + 0x688: 0x2000, + 0x68c: 0x2000, + 0x692: 0x2000, + 0x6a0: 0x2000, 0x6a1: 0x2000, + 0x6a4: 0x2000, 0x6a5: 0x2000, 0x6a6: 0x2000, 0x6a7: 0x2000, + 0x6aa: 0x2000, 0x6ab: 0x2000, 0x6ae: 0x2000, 0x6af: 0x2000, + // Block 0x1b, offset 0x6c0 + 0x6c2: 0x2000, 0x6c3: 0x2000, + 0x6c6: 0x2000, 0x6c7: 0x2000, + 0x6d5: 0x2000, + 0x6d9: 0x2000, + 0x6e5: 0x2000, + 0x6ff: 0x2000, + // Block 0x1c, offset 0x700 + 0x712: 0x2000, + 0x71a: 0x4000, 0x71b: 0x4000, + 0x729: 0x4000, + 0x72a: 0x4000, + // Block 0x1d, offset 0x740 + 0x769: 0x4000, + 0x76a: 0x4000, 0x76b: 0x4000, 0x76c: 0x4000, + 0x770: 0x4000, 0x773: 0x4000, + // Block 0x1e, offset 0x780 + 0x7a0: 0x2000, 0x7a1: 0x2000, 0x7a2: 0x2000, 0x7a3: 0x2000, + 0x7a4: 0x2000, 0x7a5: 0x2000, 0x7a6: 0x2000, 0x7a7: 0x2000, 0x7a8: 0x2000, 0x7a9: 0x2000, + 0x7aa: 0x2000, 0x7ab: 0x2000, 0x7ac: 0x2000, 0x7ad: 0x2000, 0x7ae: 0x2000, 0x7af: 0x2000, + 0x7b0: 0x2000, 0x7b1: 0x2000, 0x7b2: 0x2000, 0x7b3: 0x2000, 0x7b4: 0x2000, 0x7b5: 0x2000, + 0x7b6: 0x2000, 0x7b7: 0x2000, 0x7b8: 0x2000, 0x7b9: 0x2000, 0x7ba: 0x2000, 0x7bb: 0x2000, + 0x7bc: 0x2000, 0x7bd: 0x2000, 0x7be: 0x2000, 0x7bf: 0x2000, + // Block 0x1f, offset 0x7c0 + 0x7c0: 0x2000, 0x7c1: 0x2000, 0x7c2: 0x2000, 0x7c3: 0x2000, 0x7c4: 0x2000, 0x7c5: 0x2000, + 0x7c6: 0x2000, 0x7c7: 0x2000, 0x7c8: 0x2000, 0x7c9: 0x2000, 0x7ca: 0x2000, 0x7cb: 0x2000, + 0x7cc: 0x2000, 0x7cd: 0x2000, 0x7ce: 0x2000, 0x7cf: 0x2000, 0x7d0: 0x2000, 0x7d1: 0x2000, + 0x7d2: 0x2000, 0x7d3: 0x2000, 0x7d4: 0x2000, 0x7d5: 0x2000, 0x7d6: 0x2000, 0x7d7: 0x2000, + 0x7d8: 0x2000, 0x7d9: 0x2000, 0x7da: 0x2000, 0x7db: 0x2000, 0x7dc: 0x2000, 0x7dd: 0x2000, + 0x7de: 0x2000, 0x7df: 0x2000, 0x7e0: 0x2000, 0x7e1: 0x2000, 0x7e2: 0x2000, 0x7e3: 0x2000, + 0x7e4: 0x2000, 0x7e5: 0x2000, 0x7e6: 0x2000, 0x7e7: 0x2000, 0x7e8: 0x2000, 0x7e9: 0x2000, + 0x7eb: 0x2000, 0x7ec: 0x2000, 0x7ed: 0x2000, 0x7ee: 0x2000, 0x7ef: 0x2000, + 0x7f0: 0x2000, 0x7f1: 0x2000, 0x7f2: 0x2000, 0x7f3: 0x2000, 0x7f4: 0x2000, 0x7f5: 0x2000, + 0x7f6: 0x2000, 0x7f7: 0x2000, 0x7f8: 0x2000, 0x7f9: 0x2000, 0x7fa: 0x2000, 0x7fb: 0x2000, + 0x7fc: 0x2000, 0x7fd: 0x2000, 0x7fe: 0x2000, 0x7ff: 0x2000, + // Block 0x20, offset 0x800 + 0x800: 0x2000, 0x801: 0x2000, 0x802: 0x200d, 0x803: 0x2000, 0x804: 0x2000, 0x805: 0x2000, + 0x806: 0x2000, 0x807: 0x2000, 0x808: 0x2000, 0x809: 0x2000, 0x80a: 0x2000, 0x80b: 0x2000, + 0x80c: 0x2000, 0x80d: 0x2000, 0x80e: 0x2000, 0x80f: 0x2000, 0x810: 0x2000, 0x811: 0x2000, + 0x812: 0x2000, 0x813: 0x2000, 0x814: 0x2000, 0x815: 0x2000, 0x816: 0x2000, 0x817: 0x2000, + 0x818: 0x2000, 0x819: 0x2000, 0x81a: 0x2000, 0x81b: 0x2000, 0x81c: 0x2000, 0x81d: 0x2000, + 0x81e: 0x2000, 0x81f: 0x2000, 0x820: 0x2000, 0x821: 0x2000, 0x822: 0x2000, 0x823: 0x2000, + 0x824: 0x2000, 0x825: 0x2000, 0x826: 0x2000, 0x827: 0x2000, 0x828: 0x2000, 0x829: 0x2000, + 0x82a: 0x2000, 0x82b: 0x2000, 0x82c: 0x2000, 0x82d: 0x2000, 0x82e: 0x2000, 0x82f: 0x2000, + 0x830: 0x2000, 0x831: 0x2000, 0x832: 0x2000, 0x833: 0x2000, 0x834: 0x2000, 0x835: 0x2000, + 0x836: 0x2000, 0x837: 0x2000, 0x838: 0x2000, 0x839: 0x2000, 0x83a: 0x2000, 0x83b: 0x2000, + 0x83c: 0x2000, 0x83d: 0x2000, 0x83e: 0x2000, 0x83f: 0x2000, + // Block 0x21, offset 0x840 + 0x840: 0x2000, 0x841: 0x2000, 0x842: 0x2000, 0x843: 0x2000, 0x844: 0x2000, 0x845: 0x2000, + 0x846: 0x2000, 0x847: 0x2000, 0x848: 0x2000, 0x849: 0x2000, 0x84a: 0x2000, 0x84b: 0x2000, + 0x850: 0x2000, 0x851: 0x2000, + 0x852: 0x2000, 0x853: 0x2000, 0x854: 0x2000, 0x855: 0x2000, 0x856: 0x2000, 0x857: 0x2000, + 0x858: 0x2000, 0x859: 0x2000, 0x85a: 0x2000, 0x85b: 0x2000, 0x85c: 0x2000, 0x85d: 0x2000, + 0x85e: 0x2000, 0x85f: 0x2000, 0x860: 0x2000, 0x861: 0x2000, 0x862: 0x2000, 0x863: 0x2000, + 0x864: 0x2000, 0x865: 0x2000, 0x866: 0x2000, 0x867: 0x2000, 0x868: 0x2000, 0x869: 0x2000, + 0x86a: 0x2000, 0x86b: 0x2000, 0x86c: 0x2000, 0x86d: 0x2000, 0x86e: 0x2000, 0x86f: 0x2000, + 0x870: 0x2000, 0x871: 0x2000, 0x872: 0x2000, 0x873: 0x2000, + // Block 0x22, offset 0x880 + 0x880: 0x2000, 0x881: 0x2000, 0x882: 0x2000, 0x883: 0x2000, 0x884: 0x2000, 0x885: 0x2000, + 0x886: 0x2000, 0x887: 0x2000, 0x888: 0x2000, 0x889: 0x2000, 0x88a: 0x2000, 0x88b: 0x2000, + 0x88c: 0x2000, 0x88d: 0x2000, 0x88e: 0x2000, 0x88f: 0x2000, + 0x892: 0x2000, 0x893: 0x2000, 0x894: 0x2000, 0x895: 0x2000, + 0x8a0: 0x200e, 0x8a1: 0x2000, 0x8a3: 0x2000, + 0x8a4: 0x2000, 0x8a5: 0x2000, 0x8a6: 0x2000, 0x8a7: 0x2000, 0x8a8: 0x2000, 0x8a9: 0x2000, + 0x8b2: 0x2000, 0x8b3: 0x2000, + 0x8b6: 0x2000, 0x8b7: 0x2000, + 0x8bc: 0x2000, 0x8bd: 0x2000, + // Block 0x23, offset 0x8c0 + 0x8c0: 0x2000, 0x8c1: 0x2000, + 0x8c6: 0x2000, 0x8c7: 0x2000, 0x8c8: 0x2000, 0x8cb: 0x200f, + 0x8ce: 0x2000, 0x8cf: 0x2000, 0x8d0: 0x2000, 0x8d1: 0x2000, + 0x8e2: 0x2000, 0x8e3: 0x2000, + 0x8e4: 0x2000, 0x8e5: 0x2000, + 0x8ef: 0x2000, + 0x8fd: 0x4000, 0x8fe: 0x4000, + // Block 0x24, offset 0x900 + 0x905: 0x2000, + 0x906: 0x2000, 0x909: 0x2000, + 0x90e: 0x2000, 0x90f: 0x2000, + 0x914: 0x4000, 0x915: 0x4000, + 0x91c: 0x2000, + 0x91e: 0x2000, + // Block 0x25, offset 0x940 + 0x940: 0x2000, 0x942: 0x2000, + 0x948: 0x4000, 0x949: 0x4000, 0x94a: 0x4000, 0x94b: 0x4000, + 0x94c: 0x4000, 0x94d: 0x4000, 0x94e: 0x4000, 0x94f: 0x4000, 0x950: 0x4000, 0x951: 0x4000, + 0x952: 0x4000, 0x953: 0x4000, + 0x960: 0x2000, 0x961: 0x2000, 0x963: 0x2000, + 0x964: 0x2000, 0x965: 0x2000, 0x967: 0x2000, 0x968: 0x2000, 0x969: 0x2000, + 0x96a: 0x2000, 0x96c: 0x2000, 0x96d: 0x2000, 0x96f: 0x2000, + 0x97f: 0x4000, + // Block 0x26, offset 0x980 + 0x993: 0x4000, + 0x99e: 0x2000, 0x99f: 0x2000, 0x9a1: 0x4000, + 0x9aa: 0x4000, 0x9ab: 0x4000, + 0x9bd: 0x4000, 0x9be: 0x4000, 0x9bf: 0x2000, + // Block 0x27, offset 0x9c0 + 0x9c4: 0x4000, 0x9c5: 0x4000, + 0x9c6: 0x2000, 0x9c7: 0x2000, 0x9c8: 0x2000, 0x9c9: 0x2000, 0x9ca: 0x2000, 0x9cb: 0x2000, + 0x9cc: 0x2000, 0x9cd: 0x2000, 0x9ce: 0x4000, 0x9cf: 0x2000, 0x9d0: 0x2000, 0x9d1: 0x2000, + 0x9d2: 0x2000, 0x9d3: 0x2000, 0x9d4: 0x4000, 0x9d5: 0x2000, 0x9d6: 0x2000, 0x9d7: 0x2000, + 0x9d8: 0x2000, 0x9d9: 0x2000, 0x9da: 0x2000, 0x9db: 0x2000, 0x9dc: 0x2000, 0x9dd: 0x2000, + 0x9de: 0x2000, 0x9df: 0x2000, 0x9e0: 0x2000, 0x9e1: 0x2000, 0x9e3: 0x2000, + 0x9e8: 0x2000, 0x9e9: 0x2000, + 0x9ea: 0x4000, 0x9eb: 0x2000, 0x9ec: 0x2000, 0x9ed: 0x2000, 0x9ee: 0x2000, 0x9ef: 0x2000, + 0x9f0: 0x2000, 0x9f1: 0x2000, 0x9f2: 0x4000, 0x9f3: 0x4000, 0x9f4: 0x2000, 0x9f5: 0x4000, + 0x9f6: 0x2000, 0x9f7: 0x2000, 0x9f8: 0x2000, 0x9f9: 0x2000, 0x9fa: 0x4000, 0x9fb: 0x2000, + 0x9fc: 0x2000, 0x9fd: 0x4000, 0x9fe: 0x2000, 0x9ff: 0x2000, + // Block 0x28, offset 0xa00 + 0xa05: 0x4000, + 0xa0a: 0x4000, 0xa0b: 0x4000, + 0xa28: 0x4000, + 0xa3d: 0x2000, + // Block 0x29, offset 0xa40 + 0xa4c: 0x4000, 0xa4e: 0x4000, + 0xa53: 0x4000, 0xa54: 0x4000, 0xa55: 0x4000, 0xa57: 0x4000, + 0xa76: 0x2000, 0xa77: 0x2000, 0xa78: 0x2000, 0xa79: 0x2000, 0xa7a: 0x2000, 0xa7b: 0x2000, + 0xa7c: 0x2000, 0xa7d: 0x2000, 0xa7e: 0x2000, 0xa7f: 0x2000, + // Block 0x2a, offset 0xa80 + 0xa95: 0x4000, 0xa96: 0x4000, 0xa97: 0x4000, + 0xab0: 0x4000, + 0xabf: 0x4000, + // Block 0x2b, offset 0xac0 + 0xae6: 0x6000, 0xae7: 0x6000, 0xae8: 0x6000, 0xae9: 0x6000, + 0xaea: 0x6000, 0xaeb: 0x6000, 0xaec: 0x6000, 0xaed: 0x6000, + // Block 0x2c, offset 0xb00 + 0xb05: 0x6010, + 0xb06: 0x6011, + // Block 0x2d, offset 0xb40 + 0xb5b: 0x4000, 0xb5c: 0x4000, + // Block 0x2e, offset 0xb80 + 0xb90: 0x4000, + 0xb95: 0x4000, 0xb96: 0x2000, 0xb97: 0x2000, + 0xb98: 0x2000, 0xb99: 0x2000, + // Block 0x2f, offset 0xbc0 + 0xbc0: 0x4000, 0xbc1: 0x4000, 0xbc2: 0x4000, 0xbc3: 0x4000, 0xbc4: 0x4000, 0xbc5: 0x4000, + 0xbc6: 0x4000, 0xbc7: 0x4000, 0xbc8: 0x4000, 0xbc9: 0x4000, 0xbca: 0x4000, 0xbcb: 0x4000, + 0xbcc: 0x4000, 0xbcd: 0x4000, 0xbce: 0x4000, 0xbcf: 0x4000, 0xbd0: 0x4000, 0xbd1: 0x4000, + 0xbd2: 0x4000, 0xbd3: 0x4000, 0xbd4: 0x4000, 0xbd5: 0x4000, 0xbd6: 0x4000, 0xbd7: 0x4000, + 0xbd8: 0x4000, 0xbd9: 0x4000, 0xbdb: 0x4000, 0xbdc: 0x4000, 0xbdd: 0x4000, + 0xbde: 0x4000, 0xbdf: 0x4000, 0xbe0: 0x4000, 0xbe1: 0x4000, 0xbe2: 0x4000, 0xbe3: 0x4000, + 0xbe4: 0x4000, 0xbe5: 0x4000, 0xbe6: 0x4000, 0xbe7: 0x4000, 0xbe8: 0x4000, 0xbe9: 0x4000, + 0xbea: 0x4000, 0xbeb: 0x4000, 0xbec: 0x4000, 0xbed: 0x4000, 0xbee: 0x4000, 0xbef: 0x4000, + 0xbf0: 0x4000, 0xbf1: 0x4000, 0xbf2: 0x4000, 0xbf3: 0x4000, 0xbf4: 0x4000, 0xbf5: 0x4000, + 0xbf6: 0x4000, 0xbf7: 0x4000, 0xbf8: 0x4000, 0xbf9: 0x4000, 0xbfa: 0x4000, 0xbfb: 0x4000, + 0xbfc: 0x4000, 0xbfd: 0x4000, 0xbfe: 0x4000, 0xbff: 0x4000, + // Block 0x30, offset 0xc00 + 0xc00: 0x4000, 0xc01: 0x4000, 0xc02: 0x4000, 0xc03: 0x4000, 0xc04: 0x4000, 0xc05: 0x4000, + 0xc06: 0x4000, 0xc07: 0x4000, 0xc08: 0x4000, 0xc09: 0x4000, 0xc0a: 0x4000, 0xc0b: 0x4000, + 0xc0c: 0x4000, 0xc0d: 0x4000, 0xc0e: 0x4000, 0xc0f: 0x4000, 0xc10: 0x4000, 0xc11: 0x4000, + 0xc12: 0x4000, 0xc13: 0x4000, 0xc14: 0x4000, 0xc15: 0x4000, 0xc16: 0x4000, 0xc17: 0x4000, + 0xc18: 0x4000, 0xc19: 0x4000, 0xc1a: 0x4000, 0xc1b: 0x4000, 0xc1c: 0x4000, 0xc1d: 0x4000, + 0xc1e: 0x4000, 0xc1f: 0x4000, 0xc20: 0x4000, 0xc21: 0x4000, 0xc22: 0x4000, 0xc23: 0x4000, + 0xc24: 0x4000, 0xc25: 0x4000, 0xc26: 0x4000, 0xc27: 0x4000, 0xc28: 0x4000, 0xc29: 0x4000, + 0xc2a: 0x4000, 0xc2b: 0x4000, 0xc2c: 0x4000, 0xc2d: 0x4000, 0xc2e: 0x4000, 0xc2f: 0x4000, + 0xc30: 0x4000, 0xc31: 0x4000, 0xc32: 0x4000, 0xc33: 0x4000, + // Block 0x31, offset 0xc40 + 0xc40: 0x4000, 0xc41: 0x4000, 0xc42: 0x4000, 0xc43: 0x4000, 0xc44: 0x4000, 0xc45: 0x4000, + 0xc46: 0x4000, 0xc47: 0x4000, 0xc48: 0x4000, 0xc49: 0x4000, 0xc4a: 0x4000, 0xc4b: 0x4000, + 0xc4c: 0x4000, 0xc4d: 0x4000, 0xc4e: 0x4000, 0xc4f: 0x4000, 0xc50: 0x4000, 0xc51: 0x4000, + 0xc52: 0x4000, 0xc53: 0x4000, 0xc54: 0x4000, 0xc55: 0x4000, + 0xc70: 0x4000, 0xc71: 0x4000, 0xc72: 0x4000, 0xc73: 0x4000, 0xc74: 0x4000, 0xc75: 0x4000, + 0xc76: 0x4000, 0xc77: 0x4000, 0xc78: 0x4000, 0xc79: 0x4000, 0xc7a: 0x4000, 0xc7b: 0x4000, + // Block 0x32, offset 0xc80 + 0xc80: 0x9012, 0xc81: 0x4013, 0xc82: 0x4014, 0xc83: 0x4000, 0xc84: 0x4000, 0xc85: 0x4000, + 0xc86: 0x4000, 0xc87: 0x4000, 0xc88: 0x4000, 0xc89: 0x4000, 0xc8a: 0x4000, 0xc8b: 0x4000, + 0xc8c: 0x4015, 0xc8d: 0x4015, 0xc8e: 0x4000, 0xc8f: 0x4000, 0xc90: 0x4000, 0xc91: 0x4000, + 0xc92: 0x4000, 0xc93: 0x4000, 0xc94: 0x4000, 0xc95: 0x4000, 0xc96: 0x4000, 0xc97: 0x4000, + 0xc98: 0x4000, 0xc99: 0x4000, 0xc9a: 0x4000, 0xc9b: 0x4000, 0xc9c: 0x4000, 0xc9d: 0x4000, + 0xc9e: 0x4000, 0xc9f: 0x4000, 0xca0: 0x4000, 0xca1: 0x4000, 0xca2: 0x4000, 0xca3: 0x4000, + 0xca4: 0x4000, 0xca5: 0x4000, 0xca6: 0x4000, 0xca7: 0x4000, 0xca8: 0x4000, 0xca9: 0x4000, + 0xcaa: 0x4000, 0xcab: 0x4000, 0xcac: 0x4000, 0xcad: 0x4000, 0xcae: 0x4000, 0xcaf: 0x4000, + 0xcb0: 0x4000, 0xcb1: 0x4000, 0xcb2: 0x4000, 0xcb3: 0x4000, 0xcb4: 0x4000, 0xcb5: 0x4000, + 0xcb6: 0x4000, 0xcb7: 0x4000, 0xcb8: 0x4000, 0xcb9: 0x4000, 0xcba: 0x4000, 0xcbb: 0x4000, + 0xcbc: 0x4000, 0xcbd: 0x4000, 0xcbe: 0x4000, + // Block 0x33, offset 0xcc0 + 0xcc1: 0x4000, 0xcc2: 0x4000, 0xcc3: 0x4000, 0xcc4: 0x4000, 0xcc5: 0x4000, + 0xcc6: 0x4000, 0xcc7: 0x4000, 0xcc8: 0x4000, 0xcc9: 0x4000, 0xcca: 0x4000, 0xccb: 0x4000, + 0xccc: 0x4000, 0xccd: 0x4000, 0xcce: 0x4000, 0xccf: 0x4000, 0xcd0: 0x4000, 0xcd1: 0x4000, + 0xcd2: 0x4000, 0xcd3: 0x4000, 0xcd4: 0x4000, 0xcd5: 0x4000, 0xcd6: 0x4000, 0xcd7: 0x4000, + 0xcd8: 0x4000, 0xcd9: 0x4000, 0xcda: 0x4000, 0xcdb: 0x4000, 0xcdc: 0x4000, 0xcdd: 0x4000, + 0xcde: 0x4000, 0xcdf: 0x4000, 0xce0: 0x4000, 0xce1: 0x4000, 0xce2: 0x4000, 0xce3: 0x4000, + 0xce4: 0x4000, 0xce5: 0x4000, 0xce6: 0x4000, 0xce7: 0x4000, 0xce8: 0x4000, 0xce9: 0x4000, + 0xcea: 0x4000, 0xceb: 0x4000, 0xcec: 0x4000, 0xced: 0x4000, 0xcee: 0x4000, 0xcef: 0x4000, + 0xcf0: 0x4000, 0xcf1: 0x4000, 0xcf2: 0x4000, 0xcf3: 0x4000, 0xcf4: 0x4000, 0xcf5: 0x4000, + 0xcf6: 0x4000, 0xcf7: 0x4000, 0xcf8: 0x4000, 0xcf9: 0x4000, 0xcfa: 0x4000, 0xcfb: 0x4000, + 0xcfc: 0x4000, 0xcfd: 0x4000, 0xcfe: 0x4000, 0xcff: 0x4000, + // Block 0x34, offset 0xd00 + 0xd00: 0x4000, 0xd01: 0x4000, 0xd02: 0x4000, 0xd03: 0x4000, 0xd04: 0x4000, 0xd05: 0x4000, + 0xd06: 0x4000, 0xd07: 0x4000, 0xd08: 0x4000, 0xd09: 0x4000, 0xd0a: 0x4000, 0xd0b: 0x4000, + 0xd0c: 0x4000, 0xd0d: 0x4000, 0xd0e: 0x4000, 0xd0f: 0x4000, 0xd10: 0x4000, 0xd11: 0x4000, + 0xd12: 0x4000, 0xd13: 0x4000, 0xd14: 0x4000, 0xd15: 0x4000, 0xd16: 0x4000, + 0xd19: 0x4016, 0xd1a: 0x4017, 0xd1b: 0x4000, 0xd1c: 0x4000, 0xd1d: 0x4000, + 0xd1e: 0x4000, 0xd1f: 0x4000, 0xd20: 0x4000, 0xd21: 0x4018, 0xd22: 0x4019, 0xd23: 0x401a, + 0xd24: 0x401b, 0xd25: 0x401c, 0xd26: 0x401d, 0xd27: 0x401e, 0xd28: 0x401f, 0xd29: 0x4020, + 0xd2a: 0x4021, 0xd2b: 0x4022, 0xd2c: 0x4000, 0xd2d: 0x4010, 0xd2e: 0x4000, 0xd2f: 0x4023, + 0xd30: 0x4000, 0xd31: 0x4024, 0xd32: 0x4000, 0xd33: 0x4025, 0xd34: 0x4000, 0xd35: 0x4026, + 0xd36: 0x4000, 0xd37: 0x401a, 0xd38: 0x4000, 0xd39: 0x4027, 0xd3a: 0x4000, 0xd3b: 0x4028, + 0xd3c: 0x4000, 0xd3d: 0x4020, 0xd3e: 0x4000, 0xd3f: 0x4029, + // Block 0x35, offset 0xd40 + 0xd40: 0x4000, 0xd41: 0x402a, 0xd42: 0x4000, 0xd43: 0x402b, 0xd44: 0x402c, 0xd45: 0x4000, + 0xd46: 0x4017, 0xd47: 0x4000, 0xd48: 0x402d, 0xd49: 0x4000, 0xd4a: 0x402e, 0xd4b: 0x402f, + 0xd4c: 0x4030, 0xd4d: 0x4017, 0xd4e: 0x4016, 0xd4f: 0x4017, 0xd50: 0x4000, 0xd51: 0x4000, + 0xd52: 0x4031, 0xd53: 0x4000, 0xd54: 0x4000, 0xd55: 0x4031, 0xd56: 0x4000, 0xd57: 0x4000, + 0xd58: 0x4032, 0xd59: 0x4000, 0xd5a: 0x4000, 0xd5b: 0x4032, 0xd5c: 0x4000, 0xd5d: 0x4000, + 0xd5e: 0x4033, 0xd5f: 0x402e, 0xd60: 0x4034, 0xd61: 0x4035, 0xd62: 0x4034, 0xd63: 0x4036, + 0xd64: 0x4037, 0xd65: 0x4024, 0xd66: 0x4035, 0xd67: 0x4025, 0xd68: 0x4038, 0xd69: 0x4038, + 0xd6a: 0x4039, 0xd6b: 0x4039, 0xd6c: 0x403a, 0xd6d: 0x403a, 0xd6e: 0x4000, 0xd6f: 0x4035, + 0xd70: 0x4000, 0xd71: 0x4000, 0xd72: 0x403b, 0xd73: 0x403c, 0xd74: 0x4000, 0xd75: 0x4000, + 0xd76: 0x4000, 0xd77: 0x4000, 0xd78: 0x4000, 0xd79: 0x4000, 0xd7a: 0x4000, 0xd7b: 0x403d, + 0xd7c: 0x401c, 0xd7d: 0x4000, 0xd7e: 0x4000, 0xd7f: 0x4000, + // Block 0x36, offset 0xd80 + 0xd85: 0x4000, + 0xd86: 0x4000, 0xd87: 0x4000, 0xd88: 0x4000, 0xd89: 0x4000, 0xd8a: 0x4000, 0xd8b: 0x4000, + 0xd8c: 0x4000, 0xd8d: 0x4000, 0xd8e: 0x4000, 0xd8f: 0x4000, 0xd90: 0x4000, 0xd91: 0x4000, + 0xd92: 0x4000, 0xd93: 0x4000, 0xd94: 0x4000, 0xd95: 0x4000, 0xd96: 0x4000, 0xd97: 0x4000, + 0xd98: 0x4000, 0xd99: 0x4000, 0xd9a: 0x4000, 0xd9b: 0x4000, 0xd9c: 0x4000, 0xd9d: 0x4000, + 0xd9e: 0x4000, 0xd9f: 0x4000, 0xda0: 0x4000, 0xda1: 0x4000, 0xda2: 0x4000, 0xda3: 0x4000, + 0xda4: 0x4000, 0xda5: 0x4000, 0xda6: 0x4000, 0xda7: 0x4000, 0xda8: 0x4000, 0xda9: 0x4000, + 0xdaa: 0x4000, 0xdab: 0x4000, 0xdac: 0x4000, 0xdad: 0x4000, 0xdae: 0x4000, 0xdaf: 0x4000, + 0xdb1: 0x403e, 0xdb2: 0x403e, 0xdb3: 0x403e, 0xdb4: 0x403e, 0xdb5: 0x403e, + 0xdb6: 0x403e, 0xdb7: 0x403e, 0xdb8: 0x403e, 0xdb9: 0x403e, 0xdba: 0x403e, 0xdbb: 0x403e, + 0xdbc: 0x403e, 0xdbd: 0x403e, 0xdbe: 0x403e, 0xdbf: 0x403e, + // Block 0x37, offset 0xdc0 + 0xdc0: 0x4037, 0xdc1: 0x4037, 0xdc2: 0x4037, 0xdc3: 0x4037, 0xdc4: 0x4037, 0xdc5: 0x4037, + 0xdc6: 0x4037, 0xdc7: 0x4037, 0xdc8: 0x4037, 0xdc9: 0x4037, 0xdca: 0x4037, 0xdcb: 0x4037, + 0xdcc: 0x4037, 0xdcd: 0x4037, 0xdce: 0x4037, 0xdcf: 0x400e, 0xdd0: 0x403f, 0xdd1: 0x4040, + 0xdd2: 0x4041, 0xdd3: 0x4040, 0xdd4: 0x403f, 0xdd5: 0x4042, 0xdd6: 0x4043, 0xdd7: 0x4044, + 0xdd8: 0x4040, 0xdd9: 0x4041, 0xdda: 0x4040, 0xddb: 0x4045, 0xddc: 0x4009, 0xddd: 0x4045, + 0xdde: 0x4046, 0xddf: 0x4045, 0xde0: 0x4047, 0xde1: 0x400b, 0xde2: 0x400a, 0xde3: 0x400c, + 0xde4: 0x4048, 0xde5: 0x4000, 0xde6: 0x4000, 0xde7: 0x4000, 0xde8: 0x4000, 0xde9: 0x4000, + 0xdea: 0x4000, 0xdeb: 0x4000, 0xdec: 0x4000, 0xded: 0x4000, 0xdee: 0x4000, 0xdef: 0x4000, + 0xdf0: 0x4000, 0xdf1: 0x4000, 0xdf2: 0x4000, 0xdf3: 0x4000, 0xdf4: 0x4000, 0xdf5: 0x4000, + 0xdf6: 0x4000, 0xdf7: 0x4000, 0xdf8: 0x4000, 0xdf9: 0x4000, 0xdfa: 0x4000, 0xdfb: 0x4000, + 0xdfc: 0x4000, 0xdfd: 0x4000, 0xdfe: 0x4000, 0xdff: 0x4000, + // Block 0x38, offset 0xe00 + 0xe00: 0x4000, 0xe01: 0x4000, 0xe02: 0x4000, 0xe03: 0x4000, 0xe04: 0x4000, 0xe05: 0x4000, + 0xe06: 0x4000, 0xe07: 0x4000, 0xe08: 0x4000, 0xe09: 0x4000, 0xe0a: 0x4000, 0xe0b: 0x4000, + 0xe0c: 0x4000, 0xe0d: 0x4000, 0xe0e: 0x4000, 0xe10: 0x4000, 0xe11: 0x4000, + 0xe12: 0x4000, 0xe13: 0x4000, 0xe14: 0x4000, 0xe15: 0x4000, 0xe16: 0x4000, 0xe17: 0x4000, + 0xe18: 0x4000, 0xe19: 0x4000, 0xe1a: 0x4000, 0xe1b: 0x4000, 0xe1c: 0x4000, 0xe1d: 0x4000, + 0xe1e: 0x4000, 0xe1f: 0x4000, 0xe20: 0x4000, 0xe21: 0x4000, 0xe22: 0x4000, 0xe23: 0x4000, + 0xe24: 0x4000, 0xe25: 0x4000, 0xe26: 0x4000, 0xe27: 0x4000, 0xe28: 0x4000, 0xe29: 0x4000, + 0xe2a: 0x4000, 0xe2b: 0x4000, 0xe2c: 0x4000, 0xe2d: 0x4000, 0xe2e: 0x4000, 0xe2f: 0x4000, + 0xe30: 0x4000, 0xe31: 0x4000, 0xe32: 0x4000, 0xe33: 0x4000, 0xe34: 0x4000, 0xe35: 0x4000, + 0xe36: 0x4000, 0xe37: 0x4000, 0xe38: 0x4000, 0xe39: 0x4000, 0xe3a: 0x4000, + // Block 0x39, offset 0xe40 + 0xe40: 0x4000, 0xe41: 0x4000, 0xe42: 0x4000, 0xe43: 0x4000, 0xe44: 0x4000, 0xe45: 0x4000, + 0xe46: 0x4000, 0xe47: 0x4000, 0xe48: 0x4000, 0xe49: 0x4000, 0xe4a: 0x4000, 0xe4b: 0x4000, + 0xe4c: 0x4000, 0xe4d: 0x4000, 0xe4e: 0x4000, 0xe4f: 0x4000, 0xe50: 0x4000, 0xe51: 0x4000, + 0xe52: 0x4000, 0xe53: 0x4000, 0xe54: 0x4000, 0xe55: 0x4000, 0xe56: 0x4000, 0xe57: 0x4000, + 0xe58: 0x4000, 0xe59: 0x4000, 0xe5a: 0x4000, 0xe5b: 0x4000, 0xe5c: 0x4000, 0xe5d: 0x4000, + 0xe5e: 0x4000, 0xe5f: 0x4000, 0xe60: 0x4000, 0xe61: 0x4000, 0xe62: 0x4000, 0xe63: 0x4000, + 0xe70: 0x4000, 0xe71: 0x4000, 0xe72: 0x4000, 0xe73: 0x4000, 0xe74: 0x4000, 0xe75: 0x4000, + 0xe76: 0x4000, 0xe77: 0x4000, 0xe78: 0x4000, 0xe79: 0x4000, 0xe7a: 0x4000, 0xe7b: 0x4000, + 0xe7c: 0x4000, 0xe7d: 0x4000, 0xe7e: 0x4000, 0xe7f: 0x4000, + // Block 0x3a, offset 0xe80 + 0xe80: 0x4000, 0xe81: 0x4000, 0xe82: 0x4000, 0xe83: 0x4000, 0xe84: 0x4000, 0xe85: 0x4000, + 0xe86: 0x4000, 0xe87: 0x4000, 0xe88: 0x4000, 0xe89: 0x4000, 0xe8a: 0x4000, 0xe8b: 0x4000, + 0xe8c: 0x4000, 0xe8d: 0x4000, 0xe8e: 0x4000, 0xe8f: 0x4000, 0xe90: 0x4000, 0xe91: 0x4000, + 0xe92: 0x4000, 0xe93: 0x4000, 0xe94: 0x4000, 0xe95: 0x4000, 0xe96: 0x4000, 0xe97: 0x4000, + 0xe98: 0x4000, 0xe99: 0x4000, 0xe9a: 0x4000, 0xe9b: 0x4000, 0xe9c: 0x4000, 0xe9d: 0x4000, + 0xe9e: 0x4000, 0xea0: 0x4000, 0xea1: 0x4000, 0xea2: 0x4000, 0xea3: 0x4000, + 0xea4: 0x4000, 0xea5: 0x4000, 0xea6: 0x4000, 0xea7: 0x4000, 0xea8: 0x4000, 0xea9: 0x4000, + 0xeaa: 0x4000, 0xeab: 0x4000, 0xeac: 0x4000, 0xead: 0x4000, 0xeae: 0x4000, 0xeaf: 0x4000, + 0xeb0: 0x4000, 0xeb1: 0x4000, 0xeb2: 0x4000, 0xeb3: 0x4000, 0xeb4: 0x4000, 0xeb5: 0x4000, + 0xeb6: 0x4000, 0xeb7: 0x4000, 0xeb8: 0x4000, 0xeb9: 0x4000, 0xeba: 0x4000, 0xebb: 0x4000, + 0xebc: 0x4000, 0xebd: 0x4000, 0xebe: 0x4000, 0xebf: 0x4000, + // Block 0x3b, offset 0xec0 + 0xec0: 0x4000, 0xec1: 0x4000, 0xec2: 0x4000, 0xec3: 0x4000, 0xec4: 0x4000, 0xec5: 0x4000, + 0xec6: 0x4000, 0xec7: 0x4000, 0xec8: 0x2000, 0xec9: 0x2000, 0xeca: 0x2000, 0xecb: 0x2000, + 0xecc: 0x2000, 0xecd: 0x2000, 0xece: 0x2000, 0xecf: 0x2000, 0xed0: 0x4000, 0xed1: 0x4000, + 0xed2: 0x4000, 0xed3: 0x4000, 0xed4: 0x4000, 0xed5: 0x4000, 0xed6: 0x4000, 0xed7: 0x4000, + 0xed8: 0x4000, 0xed9: 0x4000, 0xeda: 0x4000, 0xedb: 0x4000, 0xedc: 0x4000, 0xedd: 0x4000, + 0xede: 0x4000, 0xedf: 0x4000, 0xee0: 0x4000, 0xee1: 0x4000, 0xee2: 0x4000, 0xee3: 0x4000, + 0xee4: 0x4000, 0xee5: 0x4000, 0xee6: 0x4000, 0xee7: 0x4000, 0xee8: 0x4000, 0xee9: 0x4000, + 0xeea: 0x4000, 0xeeb: 0x4000, 0xeec: 0x4000, 0xeed: 0x4000, 0xeee: 0x4000, 0xeef: 0x4000, + 0xef0: 0x4000, 0xef1: 0x4000, 0xef2: 0x4000, 0xef3: 0x4000, 0xef4: 0x4000, 0xef5: 0x4000, + 0xef6: 0x4000, 0xef7: 0x4000, 0xef8: 0x4000, 0xef9: 0x4000, 0xefa: 0x4000, 0xefb: 0x4000, + 0xefc: 0x4000, 0xefd: 0x4000, 0xefe: 0x4000, 0xeff: 0x4000, + // Block 0x3c, offset 0xf00 + 0xf00: 0x4000, 0xf01: 0x4000, 0xf02: 0x4000, 0xf03: 0x4000, 0xf04: 0x4000, 0xf05: 0x4000, + 0xf06: 0x4000, 0xf07: 0x4000, 0xf08: 0x4000, 0xf09: 0x4000, 0xf0a: 0x4000, 0xf0b: 0x4000, + 0xf0c: 0x4000, 0xf0d: 0x4000, 0xf0e: 0x4000, 0xf0f: 0x4000, 0xf10: 0x4000, 0xf11: 0x4000, + 0xf12: 0x4000, 0xf13: 0x4000, 0xf14: 0x4000, 0xf15: 0x4000, 0xf16: 0x4000, 0xf17: 0x4000, + 0xf18: 0x4000, 0xf19: 0x4000, 0xf1a: 0x4000, 0xf1b: 0x4000, 0xf1c: 0x4000, 0xf1d: 0x4000, + 0xf1e: 0x4000, 0xf1f: 0x4000, 0xf20: 0x4000, 0xf21: 0x4000, 0xf22: 0x4000, 0xf23: 0x4000, + 0xf24: 0x4000, 0xf25: 0x4000, 0xf26: 0x4000, 0xf27: 0x4000, 0xf28: 0x4000, 0xf29: 0x4000, + 0xf2a: 0x4000, 0xf2b: 0x4000, 0xf2c: 0x4000, 0xf2d: 0x4000, 0xf2e: 0x4000, 0xf2f: 0x4000, + 0xf30: 0x4000, 0xf31: 0x4000, 0xf32: 0x4000, 0xf33: 0x4000, 0xf34: 0x4000, 0xf35: 0x4000, + 0xf36: 0x4000, 0xf37: 0x4000, 0xf38: 0x4000, 0xf39: 0x4000, 0xf3a: 0x4000, 0xf3b: 0x4000, + 0xf3c: 0x4000, 0xf3d: 0x4000, 0xf3e: 0x4000, + // Block 0x3d, offset 0xf40 + 0xf40: 0x4000, 0xf41: 0x4000, 0xf42: 0x4000, 0xf43: 0x4000, 0xf44: 0x4000, 0xf45: 0x4000, + 0xf46: 0x4000, 0xf47: 0x4000, 0xf48: 0x4000, 0xf49: 0x4000, 0xf4a: 0x4000, 0xf4b: 0x4000, + 0xf4c: 0x4000, 0xf50: 0x4000, 0xf51: 0x4000, + 0xf52: 0x4000, 0xf53: 0x4000, 0xf54: 0x4000, 0xf55: 0x4000, 0xf56: 0x4000, 0xf57: 0x4000, + 0xf58: 0x4000, 0xf59: 0x4000, 0xf5a: 0x4000, 0xf5b: 0x4000, 0xf5c: 0x4000, 0xf5d: 0x4000, + 0xf5e: 0x4000, 0xf5f: 0x4000, 0xf60: 0x4000, 0xf61: 0x4000, 0xf62: 0x4000, 0xf63: 0x4000, + 0xf64: 0x4000, 0xf65: 0x4000, 0xf66: 0x4000, 0xf67: 0x4000, 0xf68: 0x4000, 0xf69: 0x4000, + 0xf6a: 0x4000, 0xf6b: 0x4000, 0xf6c: 0x4000, 0xf6d: 0x4000, 0xf6e: 0x4000, 0xf6f: 0x4000, + 0xf70: 0x4000, 0xf71: 0x4000, 0xf72: 0x4000, 0xf73: 0x4000, 0xf74: 0x4000, 0xf75: 0x4000, + 0xf76: 0x4000, 0xf77: 0x4000, 0xf78: 0x4000, 0xf79: 0x4000, 0xf7a: 0x4000, 0xf7b: 0x4000, + 0xf7c: 0x4000, 0xf7d: 0x4000, 0xf7e: 0x4000, 0xf7f: 0x4000, + // Block 0x3e, offset 0xf80 + 0xf80: 0x4000, 0xf81: 0x4000, 0xf82: 0x4000, 0xf83: 0x4000, 0xf84: 0x4000, 0xf85: 0x4000, + 0xf86: 0x4000, + // Block 0x3f, offset 0xfc0 + 0xfe0: 0x4000, 0xfe1: 0x4000, 0xfe2: 0x4000, 0xfe3: 0x4000, + 0xfe4: 0x4000, 0xfe5: 0x4000, 0xfe6: 0x4000, 0xfe7: 0x4000, 0xfe8: 0x4000, 0xfe9: 0x4000, + 0xfea: 0x4000, 0xfeb: 0x4000, 0xfec: 0x4000, 0xfed: 0x4000, 0xfee: 0x4000, 0xfef: 0x4000, + 0xff0: 0x4000, 0xff1: 0x4000, 0xff2: 0x4000, 0xff3: 0x4000, 0xff4: 0x4000, 0xff5: 0x4000, + 0xff6: 0x4000, 0xff7: 0x4000, 0xff8: 0x4000, 0xff9: 0x4000, 0xffa: 0x4000, 0xffb: 0x4000, + 0xffc: 0x4000, + // Block 0x40, offset 0x1000 + 0x1000: 0x4000, 0x1001: 0x4000, 0x1002: 0x4000, 0x1003: 0x4000, 0x1004: 0x4000, 0x1005: 0x4000, + 0x1006: 0x4000, 0x1007: 0x4000, 0x1008: 0x4000, 0x1009: 0x4000, 0x100a: 0x4000, 0x100b: 0x4000, + 0x100c: 0x4000, 0x100d: 0x4000, 0x100e: 0x4000, 0x100f: 0x4000, 0x1010: 0x4000, 0x1011: 0x4000, + 0x1012: 0x4000, 0x1013: 0x4000, 0x1014: 0x4000, 0x1015: 0x4000, 0x1016: 0x4000, 0x1017: 0x4000, + 0x1018: 0x4000, 0x1019: 0x4000, 0x101a: 0x4000, 0x101b: 0x4000, 0x101c: 0x4000, 0x101d: 0x4000, + 0x101e: 0x4000, 0x101f: 0x4000, 0x1020: 0x4000, 0x1021: 0x4000, 0x1022: 0x4000, 0x1023: 0x4000, + // Block 0x41, offset 0x1040 + 0x1040: 0x2000, 0x1041: 0x2000, 0x1042: 0x2000, 0x1043: 0x2000, 0x1044: 0x2000, 0x1045: 0x2000, + 0x1046: 0x2000, 0x1047: 0x2000, 0x1048: 0x2000, 0x1049: 0x2000, 0x104a: 0x2000, 0x104b: 0x2000, + 0x104c: 0x2000, 0x104d: 0x2000, 0x104e: 0x2000, 0x104f: 0x2000, 0x1050: 0x4000, 0x1051: 0x4000, + 0x1052: 0x4000, 0x1053: 0x4000, 0x1054: 0x4000, 0x1055: 0x4000, 0x1056: 0x4000, 0x1057: 0x4000, + 0x1058: 0x4000, 0x1059: 0x4000, + 0x1070: 0x4000, 0x1071: 0x4000, 0x1072: 0x4000, 0x1073: 0x4000, 0x1074: 0x4000, 0x1075: 0x4000, + 0x1076: 0x4000, 0x1077: 0x4000, 0x1078: 0x4000, 0x1079: 0x4000, 0x107a: 0x4000, 0x107b: 0x4000, + 0x107c: 0x4000, 0x107d: 0x4000, 0x107e: 0x4000, 0x107f: 0x4000, + // Block 0x42, offset 0x1080 + 0x1080: 0x4000, 0x1081: 0x4000, 0x1082: 0x4000, 0x1083: 0x4000, 0x1084: 0x4000, 0x1085: 0x4000, + 0x1086: 0x4000, 0x1087: 0x4000, 0x1088: 0x4000, 0x1089: 0x4000, 0x108a: 0x4000, 0x108b: 0x4000, + 0x108c: 0x4000, 0x108d: 0x4000, 0x108e: 0x4000, 0x108f: 0x4000, 0x1090: 0x4000, 0x1091: 0x4000, + 0x1092: 0x4000, 0x1094: 0x4000, 0x1095: 0x4000, 0x1096: 0x4000, 0x1097: 0x4000, + 0x1098: 0x4000, 0x1099: 0x4000, 0x109a: 0x4000, 0x109b: 0x4000, 0x109c: 0x4000, 0x109d: 0x4000, + 0x109e: 0x4000, 0x109f: 0x4000, 0x10a0: 0x4000, 0x10a1: 0x4000, 0x10a2: 0x4000, 0x10a3: 0x4000, + 0x10a4: 0x4000, 0x10a5: 0x4000, 0x10a6: 0x4000, 0x10a8: 0x4000, 0x10a9: 0x4000, + 0x10aa: 0x4000, 0x10ab: 0x4000, + // Block 0x43, offset 0x10c0 + 0x10c1: 0x9012, 0x10c2: 0x9012, 0x10c3: 0x9012, 0x10c4: 0x9012, 0x10c5: 0x9012, + 0x10c6: 0x9012, 0x10c7: 0x9012, 0x10c8: 0x9012, 0x10c9: 0x9012, 0x10ca: 0x9012, 0x10cb: 0x9012, + 0x10cc: 0x9012, 0x10cd: 0x9012, 0x10ce: 0x9012, 0x10cf: 0x9012, 0x10d0: 0x9012, 0x10d1: 0x9012, + 0x10d2: 0x9012, 0x10d3: 0x9012, 0x10d4: 0x9012, 0x10d5: 0x9012, 0x10d6: 0x9012, 0x10d7: 0x9012, + 0x10d8: 0x9012, 0x10d9: 0x9012, 0x10da: 0x9012, 0x10db: 0x9012, 0x10dc: 0x9012, 0x10dd: 0x9012, + 0x10de: 0x9012, 0x10df: 0x9012, 0x10e0: 0x9049, 0x10e1: 0x9049, 0x10e2: 0x9049, 0x10e3: 0x9049, + 0x10e4: 0x9049, 0x10e5: 0x9049, 0x10e6: 0x9049, 0x10e7: 0x9049, 0x10e8: 0x9049, 0x10e9: 0x9049, + 0x10ea: 0x9049, 0x10eb: 0x9049, 0x10ec: 0x9049, 0x10ed: 0x9049, 0x10ee: 0x9049, 0x10ef: 0x9049, + 0x10f0: 0x9049, 0x10f1: 0x9049, 0x10f2: 0x9049, 0x10f3: 0x9049, 0x10f4: 0x9049, 0x10f5: 0x9049, + 0x10f6: 0x9049, 0x10f7: 0x9049, 0x10f8: 0x9049, 0x10f9: 0x9049, 0x10fa: 0x9049, 0x10fb: 0x9049, + 0x10fc: 0x9049, 0x10fd: 0x9049, 0x10fe: 0x9049, 0x10ff: 0x9049, + // Block 0x44, offset 0x1100 + 0x1100: 0x9049, 0x1101: 0x9049, 0x1102: 0x9049, 0x1103: 0x9049, 0x1104: 0x9049, 0x1105: 0x9049, + 0x1106: 0x9049, 0x1107: 0x9049, 0x1108: 0x9049, 0x1109: 0x9049, 0x110a: 0x9049, 0x110b: 0x9049, + 0x110c: 0x9049, 0x110d: 0x9049, 0x110e: 0x9049, 0x110f: 0x9049, 0x1110: 0x9049, 0x1111: 0x9049, + 0x1112: 0x9049, 0x1113: 0x9049, 0x1114: 0x9049, 0x1115: 0x9049, 0x1116: 0x9049, 0x1117: 0x9049, + 0x1118: 0x9049, 0x1119: 0x9049, 0x111a: 0x9049, 0x111b: 0x9049, 0x111c: 0x9049, 0x111d: 0x9049, + 0x111e: 0x9049, 0x111f: 0x904a, 0x1120: 0x904b, 0x1121: 0xb04c, 0x1122: 0xb04d, 0x1123: 0xb04d, + 0x1124: 0xb04e, 0x1125: 0xb04f, 0x1126: 0xb050, 0x1127: 0xb051, 0x1128: 0xb052, 0x1129: 0xb053, + 0x112a: 0xb054, 0x112b: 0xb055, 0x112c: 0xb056, 0x112d: 0xb057, 0x112e: 0xb058, 0x112f: 0xb059, + 0x1130: 0xb05a, 0x1131: 0xb05b, 0x1132: 0xb05c, 0x1133: 0xb05d, 0x1134: 0xb05e, 0x1135: 0xb05f, + 0x1136: 0xb060, 0x1137: 0xb061, 0x1138: 0xb062, 0x1139: 0xb063, 0x113a: 0xb064, 0x113b: 0xb065, + 0x113c: 0xb052, 0x113d: 0xb066, 0x113e: 0xb067, 0x113f: 0xb055, + // Block 0x45, offset 0x1140 + 0x1140: 0xb068, 0x1141: 0xb069, 0x1142: 0xb06a, 0x1143: 0xb06b, 0x1144: 0xb05a, 0x1145: 0xb056, + 0x1146: 0xb06c, 0x1147: 0xb06d, 0x1148: 0xb06b, 0x1149: 0xb06e, 0x114a: 0xb06b, 0x114b: 0xb06f, + 0x114c: 0xb06f, 0x114d: 0xb070, 0x114e: 0xb070, 0x114f: 0xb071, 0x1150: 0xb056, 0x1151: 0xb072, + 0x1152: 0xb073, 0x1153: 0xb072, 0x1154: 0xb074, 0x1155: 0xb073, 0x1156: 0xb075, 0x1157: 0xb075, + 0x1158: 0xb076, 0x1159: 0xb076, 0x115a: 0xb077, 0x115b: 0xb077, 0x115c: 0xb073, 0x115d: 0xb078, + 0x115e: 0xb079, 0x115f: 0xb067, 0x1160: 0xb07a, 0x1161: 0xb07b, 0x1162: 0xb07b, 0x1163: 0xb07b, + 0x1164: 0xb07b, 0x1165: 0xb07b, 0x1166: 0xb07b, 0x1167: 0xb07b, 0x1168: 0xb07b, 0x1169: 0xb07b, + 0x116a: 0xb07b, 0x116b: 0xb07b, 0x116c: 0xb07b, 0x116d: 0xb07b, 0x116e: 0xb07b, 0x116f: 0xb07b, + 0x1170: 0xb07c, 0x1171: 0xb07c, 0x1172: 0xb07c, 0x1173: 0xb07c, 0x1174: 0xb07c, 0x1175: 0xb07c, + 0x1176: 0xb07c, 0x1177: 0xb07c, 0x1178: 0xb07c, 0x1179: 0xb07c, 0x117a: 0xb07c, 0x117b: 0xb07c, + 0x117c: 0xb07c, 0x117d: 0xb07c, 0x117e: 0xb07c, + // Block 0x46, offset 0x1180 + 0x1182: 0xb07d, 0x1183: 0xb07e, 0x1184: 0xb07f, 0x1185: 0xb080, + 0x1186: 0xb07f, 0x1187: 0xb07e, 0x118a: 0xb081, 0x118b: 0xb082, + 0x118c: 0xb083, 0x118d: 0xb07f, 0x118e: 0xb080, 0x118f: 0xb07f, + 0x1192: 0xb084, 0x1193: 0xb085, 0x1194: 0xb084, 0x1195: 0xb086, 0x1196: 0xb084, 0x1197: 0xb087, + 0x119a: 0xb088, 0x119b: 0xb089, 0x119c: 0xb08a, + 0x11a0: 0x908b, 0x11a1: 0x908b, 0x11a2: 0x908c, 0x11a3: 0x908d, + 0x11a4: 0x908b, 0x11a5: 0x908e, 0x11a6: 0x908f, 0x11a8: 0xb090, 0x11a9: 0xb091, + 0x11aa: 0xb092, 0x11ab: 0xb091, 0x11ac: 0xb093, 0x11ad: 0xb094, 0x11ae: 0xb095, + 0x11bd: 0x2000, + // Block 0x47, offset 0x11c0 + 0x11e0: 0x4000, 0x11e1: 0x4000, 0x11e2: 0x4000, 0x11e3: 0x4000, + // Block 0x48, offset 0x1200 + 0x1200: 0x4000, 0x1201: 0x4000, 0x1202: 0x4000, 0x1203: 0x4000, 0x1204: 0x4000, 0x1205: 0x4000, + 0x1206: 0x4000, 0x1207: 0x4000, 0x1208: 0x4000, 0x1209: 0x4000, 0x120a: 0x4000, 0x120b: 0x4000, + 0x120c: 0x4000, 0x120d: 0x4000, 0x120e: 0x4000, 0x120f: 0x4000, 0x1210: 0x4000, 0x1211: 0x4000, + 0x1212: 0x4000, 0x1213: 0x4000, 0x1214: 0x4000, 0x1215: 0x4000, 0x1216: 0x4000, 0x1217: 0x4000, + 0x1218: 0x4000, 0x1219: 0x4000, 0x121a: 0x4000, 0x121b: 0x4000, 0x121c: 0x4000, 0x121d: 0x4000, + 0x121e: 0x4000, 0x121f: 0x4000, 0x1220: 0x4000, 0x1221: 0x4000, 0x1222: 0x4000, 0x1223: 0x4000, + 0x1224: 0x4000, 0x1225: 0x4000, 0x1226: 0x4000, 0x1227: 0x4000, 0x1228: 0x4000, 0x1229: 0x4000, + 0x122a: 0x4000, 0x122b: 0x4000, 0x122c: 0x4000, 0x122d: 0x4000, 0x122e: 0x4000, 0x122f: 0x4000, + 0x1230: 0x4000, 0x1231: 0x4000, 0x1232: 0x4000, 0x1233: 0x4000, 0x1234: 0x4000, 0x1235: 0x4000, + 0x1236: 0x4000, 0x1237: 0x4000, + // Block 0x49, offset 0x1240 + 0x1240: 0x4000, 0x1241: 0x4000, 0x1242: 0x4000, 0x1243: 0x4000, 0x1244: 0x4000, 0x1245: 0x4000, + 0x1246: 0x4000, 0x1247: 0x4000, 0x1248: 0x4000, 0x1249: 0x4000, 0x124a: 0x4000, 0x124b: 0x4000, + 0x124c: 0x4000, 0x124d: 0x4000, 0x124e: 0x4000, 0x124f: 0x4000, 0x1250: 0x4000, 0x1251: 0x4000, + 0x1252: 0x4000, 0x1253: 0x4000, 0x1254: 0x4000, 0x1255: 0x4000, 0x1256: 0x4000, 0x1257: 0x4000, + 0x1258: 0x4000, 0x1259: 0x4000, 0x125a: 0x4000, 0x125b: 0x4000, 0x125c: 0x4000, 0x125d: 0x4000, + 0x125e: 0x4000, 0x125f: 0x4000, 0x1260: 0x4000, 0x1261: 0x4000, 0x1262: 0x4000, 0x1263: 0x4000, + 0x1264: 0x4000, 0x1265: 0x4000, 0x1266: 0x4000, 0x1267: 0x4000, 0x1268: 0x4000, 0x1269: 0x4000, + 0x126a: 0x4000, 0x126b: 0x4000, 0x126c: 0x4000, 0x126d: 0x4000, 0x126e: 0x4000, 0x126f: 0x4000, + 0x1270: 0x4000, 0x1271: 0x4000, 0x1272: 0x4000, + // Block 0x4a, offset 0x1280 + 0x1280: 0x4000, 0x1281: 0x4000, 0x1282: 0x4000, 0x1283: 0x4000, 0x1284: 0x4000, 0x1285: 0x4000, + 0x1286: 0x4000, 0x1287: 0x4000, 0x1288: 0x4000, 0x1289: 0x4000, 0x128a: 0x4000, 0x128b: 0x4000, + 0x128c: 0x4000, 0x128d: 0x4000, 0x128e: 0x4000, 0x128f: 0x4000, 0x1290: 0x4000, 0x1291: 0x4000, + 0x1292: 0x4000, 0x1293: 0x4000, 0x1294: 0x4000, 0x1295: 0x4000, 0x1296: 0x4000, 0x1297: 0x4000, + 0x1298: 0x4000, 0x1299: 0x4000, 0x129a: 0x4000, 0x129b: 0x4000, 0x129c: 0x4000, 0x129d: 0x4000, + 0x129e: 0x4000, + // Block 0x4b, offset 0x12c0 + 0x12d0: 0x4000, 0x12d1: 0x4000, + 0x12d2: 0x4000, + 0x12e4: 0x4000, 0x12e5: 0x4000, 0x12e6: 0x4000, 0x12e7: 0x4000, + 0x12f0: 0x4000, 0x12f1: 0x4000, 0x12f2: 0x4000, 0x12f3: 0x4000, 0x12f4: 0x4000, 0x12f5: 0x4000, + 0x12f6: 0x4000, 0x12f7: 0x4000, 0x12f8: 0x4000, 0x12f9: 0x4000, 0x12fa: 0x4000, 0x12fb: 0x4000, + 0x12fc: 0x4000, 0x12fd: 0x4000, 0x12fe: 0x4000, 0x12ff: 0x4000, + // Block 0x4c, offset 0x1300 + 0x1300: 0x4000, 0x1301: 0x4000, 0x1302: 0x4000, 0x1303: 0x4000, 0x1304: 0x4000, 0x1305: 0x4000, + 0x1306: 0x4000, 0x1307: 0x4000, 0x1308: 0x4000, 0x1309: 0x4000, 0x130a: 0x4000, 0x130b: 0x4000, + 0x130c: 0x4000, 0x130d: 0x4000, 0x130e: 0x4000, 0x130f: 0x4000, 0x1310: 0x4000, 0x1311: 0x4000, + 0x1312: 0x4000, 0x1313: 0x4000, 0x1314: 0x4000, 0x1315: 0x4000, 0x1316: 0x4000, 0x1317: 0x4000, + 0x1318: 0x4000, 0x1319: 0x4000, 0x131a: 0x4000, 0x131b: 0x4000, 0x131c: 0x4000, 0x131d: 0x4000, + 0x131e: 0x4000, 0x131f: 0x4000, 0x1320: 0x4000, 0x1321: 0x4000, 0x1322: 0x4000, 0x1323: 0x4000, + 0x1324: 0x4000, 0x1325: 0x4000, 0x1326: 0x4000, 0x1327: 0x4000, 0x1328: 0x4000, 0x1329: 0x4000, + 0x132a: 0x4000, 0x132b: 0x4000, 0x132c: 0x4000, 0x132d: 0x4000, 0x132e: 0x4000, 0x132f: 0x4000, + 0x1330: 0x4000, 0x1331: 0x4000, 0x1332: 0x4000, 0x1333: 0x4000, 0x1334: 0x4000, 0x1335: 0x4000, + 0x1336: 0x4000, 0x1337: 0x4000, 0x1338: 0x4000, 0x1339: 0x4000, 0x133a: 0x4000, 0x133b: 0x4000, + // Block 0x4d, offset 0x1340 + 0x1344: 0x4000, + // Block 0x4e, offset 0x1380 + 0x138f: 0x4000, + // Block 0x4f, offset 0x13c0 + 0x13c0: 0x2000, 0x13c1: 0x2000, 0x13c2: 0x2000, 0x13c3: 0x2000, 0x13c4: 0x2000, 0x13c5: 0x2000, + 0x13c6: 0x2000, 0x13c7: 0x2000, 0x13c8: 0x2000, 0x13c9: 0x2000, 0x13ca: 0x2000, + 0x13d0: 0x2000, 0x13d1: 0x2000, + 0x13d2: 0x2000, 0x13d3: 0x2000, 0x13d4: 0x2000, 0x13d5: 0x2000, 0x13d6: 0x2000, 0x13d7: 0x2000, + 0x13d8: 0x2000, 0x13d9: 0x2000, 0x13da: 0x2000, 0x13db: 0x2000, 0x13dc: 0x2000, 0x13dd: 0x2000, + 0x13de: 0x2000, 0x13df: 0x2000, 0x13e0: 0x2000, 0x13e1: 0x2000, 0x13e2: 0x2000, 0x13e3: 0x2000, + 0x13e4: 0x2000, 0x13e5: 0x2000, 0x13e6: 0x2000, 0x13e7: 0x2000, 0x13e8: 0x2000, 0x13e9: 0x2000, + 0x13ea: 0x2000, 0x13eb: 0x2000, 0x13ec: 0x2000, 0x13ed: 0x2000, + 0x13f0: 0x2000, 0x13f1: 0x2000, 0x13f2: 0x2000, 0x13f3: 0x2000, 0x13f4: 0x2000, 0x13f5: 0x2000, + 0x13f6: 0x2000, 0x13f7: 0x2000, 0x13f8: 0x2000, 0x13f9: 0x2000, 0x13fa: 0x2000, 0x13fb: 0x2000, + 0x13fc: 0x2000, 0x13fd: 0x2000, 0x13fe: 0x2000, 0x13ff: 0x2000, + // Block 0x50, offset 0x1400 + 0x1400: 0x2000, 0x1401: 0x2000, 0x1402: 0x2000, 0x1403: 0x2000, 0x1404: 0x2000, 0x1405: 0x2000, + 0x1406: 0x2000, 0x1407: 0x2000, 0x1408: 0x2000, 0x1409: 0x2000, 0x140a: 0x2000, 0x140b: 0x2000, + 0x140c: 0x2000, 0x140d: 0x2000, 0x140e: 0x2000, 0x140f: 0x2000, 0x1410: 0x2000, 0x1411: 0x2000, + 0x1412: 0x2000, 0x1413: 0x2000, 0x1414: 0x2000, 0x1415: 0x2000, 0x1416: 0x2000, 0x1417: 0x2000, + 0x1418: 0x2000, 0x1419: 0x2000, 0x141a: 0x2000, 0x141b: 0x2000, 0x141c: 0x2000, 0x141d: 0x2000, + 0x141e: 0x2000, 0x141f: 0x2000, 0x1420: 0x2000, 0x1421: 0x2000, 0x1422: 0x2000, 0x1423: 0x2000, + 0x1424: 0x2000, 0x1425: 0x2000, 0x1426: 0x2000, 0x1427: 0x2000, 0x1428: 0x2000, 0x1429: 0x2000, + 0x1430: 0x2000, 0x1431: 0x2000, 0x1432: 0x2000, 0x1433: 0x2000, 0x1434: 0x2000, 0x1435: 0x2000, + 0x1436: 0x2000, 0x1437: 0x2000, 0x1438: 0x2000, 0x1439: 0x2000, 0x143a: 0x2000, 0x143b: 0x2000, + 0x143c: 0x2000, 0x143d: 0x2000, 0x143e: 0x2000, 0x143f: 0x2000, + // Block 0x51, offset 0x1440 + 0x1440: 0x2000, 0x1441: 0x2000, 0x1442: 0x2000, 0x1443: 0x2000, 0x1444: 0x2000, 0x1445: 0x2000, + 0x1446: 0x2000, 0x1447: 0x2000, 0x1448: 0x2000, 0x1449: 0x2000, 0x144a: 0x2000, 0x144b: 0x2000, + 0x144c: 0x2000, 0x144d: 0x2000, 0x144e: 0x4000, 0x144f: 0x2000, 0x1450: 0x2000, 0x1451: 0x4000, + 0x1452: 0x4000, 0x1453: 0x4000, 0x1454: 0x4000, 0x1455: 0x4000, 0x1456: 0x4000, 0x1457: 0x4000, + 0x1458: 0x4000, 0x1459: 0x4000, 0x145a: 0x4000, 0x145b: 0x2000, 0x145c: 0x2000, 0x145d: 0x2000, + 0x145e: 0x2000, 0x145f: 0x2000, 0x1460: 0x2000, 0x1461: 0x2000, 0x1462: 0x2000, 0x1463: 0x2000, + 0x1464: 0x2000, 0x1465: 0x2000, 0x1466: 0x2000, 0x1467: 0x2000, 0x1468: 0x2000, 0x1469: 0x2000, + 0x146a: 0x2000, 0x146b: 0x2000, 0x146c: 0x2000, + // Block 0x52, offset 0x1480 + 0x1480: 0x4000, 0x1481: 0x4000, 0x1482: 0x4000, + 0x1490: 0x4000, 0x1491: 0x4000, + 0x1492: 0x4000, 0x1493: 0x4000, 0x1494: 0x4000, 0x1495: 0x4000, 0x1496: 0x4000, 0x1497: 0x4000, + 0x1498: 0x4000, 0x1499: 0x4000, 0x149a: 0x4000, 0x149b: 0x4000, 0x149c: 0x4000, 0x149d: 0x4000, + 0x149e: 0x4000, 0x149f: 0x4000, 0x14a0: 0x4000, 0x14a1: 0x4000, 0x14a2: 0x4000, 0x14a3: 0x4000, + 0x14a4: 0x4000, 0x14a5: 0x4000, 0x14a6: 0x4000, 0x14a7: 0x4000, 0x14a8: 0x4000, 0x14a9: 0x4000, + 0x14aa: 0x4000, 0x14ab: 0x4000, 0x14ac: 0x4000, 0x14ad: 0x4000, 0x14ae: 0x4000, 0x14af: 0x4000, + 0x14b0: 0x4000, 0x14b1: 0x4000, 0x14b2: 0x4000, 0x14b3: 0x4000, 0x14b4: 0x4000, 0x14b5: 0x4000, + 0x14b6: 0x4000, 0x14b7: 0x4000, 0x14b8: 0x4000, 0x14b9: 0x4000, 0x14ba: 0x4000, 0x14bb: 0x4000, + // Block 0x53, offset 0x14c0 + 0x14c0: 0x4000, 0x14c1: 0x4000, 0x14c2: 0x4000, 0x14c3: 0x4000, 0x14c4: 0x4000, 0x14c5: 0x4000, + 0x14c6: 0x4000, 0x14c7: 0x4000, 0x14c8: 0x4000, + 0x14d0: 0x4000, 0x14d1: 0x4000, + 0x14e0: 0x4000, 0x14e1: 0x4000, 0x14e2: 0x4000, 0x14e3: 0x4000, + 0x14e4: 0x4000, 0x14e5: 0x4000, + // Block 0x54, offset 0x1500 + 0x1500: 0x4000, 0x1501: 0x4000, 0x1502: 0x4000, 0x1503: 0x4000, 0x1504: 0x4000, 0x1505: 0x4000, + 0x1506: 0x4000, 0x1507: 0x4000, 0x1508: 0x4000, 0x1509: 0x4000, 0x150a: 0x4000, 0x150b: 0x4000, + 0x150c: 0x4000, 0x150d: 0x4000, 0x150e: 0x4000, 0x150f: 0x4000, 0x1510: 0x4000, 0x1511: 0x4000, + 0x1512: 0x4000, 0x1513: 0x4000, 0x1514: 0x4000, 0x1515: 0x4000, 0x1516: 0x4000, 0x1517: 0x4000, + 0x1518: 0x4000, 0x1519: 0x4000, 0x151a: 0x4000, 0x151b: 0x4000, 0x151c: 0x4000, 0x151d: 0x4000, + 0x151e: 0x4000, 0x151f: 0x4000, 0x1520: 0x4000, + 0x152d: 0x4000, 0x152e: 0x4000, 0x152f: 0x4000, + 0x1530: 0x4000, 0x1531: 0x4000, 0x1532: 0x4000, 0x1533: 0x4000, 0x1534: 0x4000, 0x1535: 0x4000, + 0x1537: 0x4000, 0x1538: 0x4000, 0x1539: 0x4000, 0x153a: 0x4000, 0x153b: 0x4000, + 0x153c: 0x4000, 0x153d: 0x4000, 0x153e: 0x4000, 0x153f: 0x4000, + // Block 0x55, offset 0x1540 + 0x1540: 0x4000, 0x1541: 0x4000, 0x1542: 0x4000, 0x1543: 0x4000, 0x1544: 0x4000, 0x1545: 0x4000, + 0x1546: 0x4000, 0x1547: 0x4000, 0x1548: 0x4000, 0x1549: 0x4000, 0x154a: 0x4000, 0x154b: 0x4000, + 0x154c: 0x4000, 0x154d: 0x4000, 0x154e: 0x4000, 0x154f: 0x4000, 0x1550: 0x4000, 0x1551: 0x4000, + 0x1552: 0x4000, 0x1553: 0x4000, 0x1554: 0x4000, 0x1555: 0x4000, 0x1556: 0x4000, 0x1557: 0x4000, + 0x1558: 0x4000, 0x1559: 0x4000, 0x155a: 0x4000, 0x155b: 0x4000, 0x155c: 0x4000, 0x155d: 0x4000, + 0x155e: 0x4000, 0x155f: 0x4000, 0x1560: 0x4000, 0x1561: 0x4000, 0x1562: 0x4000, 0x1563: 0x4000, + 0x1564: 0x4000, 0x1565: 0x4000, 0x1566: 0x4000, 0x1567: 0x4000, 0x1568: 0x4000, 0x1569: 0x4000, + 0x156a: 0x4000, 0x156b: 0x4000, 0x156c: 0x4000, 0x156d: 0x4000, 0x156e: 0x4000, 0x156f: 0x4000, + 0x1570: 0x4000, 0x1571: 0x4000, 0x1572: 0x4000, 0x1573: 0x4000, 0x1574: 0x4000, 0x1575: 0x4000, + 0x1576: 0x4000, 0x1577: 0x4000, 0x1578: 0x4000, 0x1579: 0x4000, 0x157a: 0x4000, 0x157b: 0x4000, + 0x157c: 0x4000, 0x157e: 0x4000, 0x157f: 0x4000, + // Block 0x56, offset 0x1580 + 0x1580: 0x4000, 0x1581: 0x4000, 0x1582: 0x4000, 0x1583: 0x4000, 0x1584: 0x4000, 0x1585: 0x4000, + 0x1586: 0x4000, 0x1587: 0x4000, 0x1588: 0x4000, 0x1589: 0x4000, 0x158a: 0x4000, 0x158b: 0x4000, + 0x158c: 0x4000, 0x158d: 0x4000, 0x158e: 0x4000, 0x158f: 0x4000, 0x1590: 0x4000, 0x1591: 0x4000, + 0x1592: 0x4000, 0x1593: 0x4000, + 0x15a0: 0x4000, 0x15a1: 0x4000, 0x15a2: 0x4000, 0x15a3: 0x4000, + 0x15a4: 0x4000, 0x15a5: 0x4000, 0x15a6: 0x4000, 0x15a7: 0x4000, 0x15a8: 0x4000, 0x15a9: 0x4000, + 0x15aa: 0x4000, 0x15ab: 0x4000, 0x15ac: 0x4000, 0x15ad: 0x4000, 0x15ae: 0x4000, 0x15af: 0x4000, + 0x15b0: 0x4000, 0x15b1: 0x4000, 0x15b2: 0x4000, 0x15b3: 0x4000, 0x15b4: 0x4000, 0x15b5: 0x4000, + 0x15b6: 0x4000, 0x15b7: 0x4000, 0x15b8: 0x4000, 0x15b9: 0x4000, 0x15ba: 0x4000, 0x15bb: 0x4000, + 0x15bc: 0x4000, 0x15bd: 0x4000, 0x15be: 0x4000, 0x15bf: 0x4000, + // Block 0x57, offset 0x15c0 + 0x15c0: 0x4000, 0x15c1: 0x4000, 0x15c2: 0x4000, 0x15c3: 0x4000, 0x15c4: 0x4000, 0x15c5: 0x4000, + 0x15c6: 0x4000, 0x15c7: 0x4000, 0x15c8: 0x4000, 0x15c9: 0x4000, 0x15ca: 0x4000, + 0x15cf: 0x4000, 0x15d0: 0x4000, 0x15d1: 0x4000, + 0x15d2: 0x4000, 0x15d3: 0x4000, + 0x15e0: 0x4000, 0x15e1: 0x4000, 0x15e2: 0x4000, 0x15e3: 0x4000, + 0x15e4: 0x4000, 0x15e5: 0x4000, 0x15e6: 0x4000, 0x15e7: 0x4000, 0x15e8: 0x4000, 0x15e9: 0x4000, + 0x15ea: 0x4000, 0x15eb: 0x4000, 0x15ec: 0x4000, 0x15ed: 0x4000, 0x15ee: 0x4000, 0x15ef: 0x4000, + 0x15f0: 0x4000, 0x15f4: 0x4000, + 0x15f8: 0x4000, 0x15f9: 0x4000, 0x15fa: 0x4000, 0x15fb: 0x4000, + 0x15fc: 0x4000, 0x15fd: 0x4000, 0x15fe: 0x4000, 0x15ff: 0x4000, + // Block 0x58, offset 0x1600 + 0x1600: 0x4000, 0x1602: 0x4000, 0x1603: 0x4000, 0x1604: 0x4000, 0x1605: 0x4000, + 0x1606: 0x4000, 0x1607: 0x4000, 0x1608: 0x4000, 0x1609: 0x4000, 0x160a: 0x4000, 0x160b: 0x4000, + 0x160c: 0x4000, 0x160d: 0x4000, 0x160e: 0x4000, 0x160f: 0x4000, 0x1610: 0x4000, 0x1611: 0x4000, + 0x1612: 0x4000, 0x1613: 0x4000, 0x1614: 0x4000, 0x1615: 0x4000, 0x1616: 0x4000, 0x1617: 0x4000, + 0x1618: 0x4000, 0x1619: 0x4000, 0x161a: 0x4000, 0x161b: 0x4000, 0x161c: 0x4000, 0x161d: 0x4000, + 0x161e: 0x4000, 0x161f: 0x4000, 0x1620: 0x4000, 0x1621: 0x4000, 0x1622: 0x4000, 0x1623: 0x4000, + 0x1624: 0x4000, 0x1625: 0x4000, 0x1626: 0x4000, 0x1627: 0x4000, 0x1628: 0x4000, 0x1629: 0x4000, + 0x162a: 0x4000, 0x162b: 0x4000, 0x162c: 0x4000, 0x162d: 0x4000, 0x162e: 0x4000, 0x162f: 0x4000, + 0x1630: 0x4000, 0x1631: 0x4000, 0x1632: 0x4000, 0x1633: 0x4000, 0x1634: 0x4000, 0x1635: 0x4000, + 0x1636: 0x4000, 0x1637: 0x4000, 0x1638: 0x4000, 0x1639: 0x4000, 0x163a: 0x4000, 0x163b: 0x4000, + 0x163c: 0x4000, 0x163d: 0x4000, 0x163e: 0x4000, 0x163f: 0x4000, + // Block 0x59, offset 0x1640 + 0x1640: 0x4000, 0x1641: 0x4000, 0x1642: 0x4000, 0x1643: 0x4000, 0x1644: 0x4000, 0x1645: 0x4000, + 0x1646: 0x4000, 0x1647: 0x4000, 0x1648: 0x4000, 0x1649: 0x4000, 0x164a: 0x4000, 0x164b: 0x4000, + 0x164c: 0x4000, 0x164d: 0x4000, 0x164e: 0x4000, 0x164f: 0x4000, 0x1650: 0x4000, 0x1651: 0x4000, + 0x1652: 0x4000, 0x1653: 0x4000, 0x1654: 0x4000, 0x1655: 0x4000, 0x1656: 0x4000, 0x1657: 0x4000, + 0x1658: 0x4000, 0x1659: 0x4000, 0x165a: 0x4000, 0x165b: 0x4000, 0x165c: 0x4000, 0x165d: 0x4000, + 0x165e: 0x4000, 0x165f: 0x4000, 0x1660: 0x4000, 0x1661: 0x4000, 0x1662: 0x4000, 0x1663: 0x4000, + 0x1664: 0x4000, 0x1665: 0x4000, 0x1666: 0x4000, 0x1667: 0x4000, 0x1668: 0x4000, 0x1669: 0x4000, + 0x166a: 0x4000, 0x166b: 0x4000, 0x166c: 0x4000, 0x166d: 0x4000, 0x166e: 0x4000, 0x166f: 0x4000, + 0x1670: 0x4000, 0x1671: 0x4000, 0x1672: 0x4000, 0x1673: 0x4000, 0x1674: 0x4000, 0x1675: 0x4000, + 0x1676: 0x4000, 0x1677: 0x4000, 0x1678: 0x4000, 0x1679: 0x4000, 0x167a: 0x4000, 0x167b: 0x4000, + 0x167c: 0x4000, 0x167f: 0x4000, + // Block 0x5a, offset 0x1680 + 0x1680: 0x4000, 0x1681: 0x4000, 0x1682: 0x4000, 0x1683: 0x4000, 0x1684: 0x4000, 0x1685: 0x4000, + 0x1686: 0x4000, 0x1687: 0x4000, 0x1688: 0x4000, 0x1689: 0x4000, 0x168a: 0x4000, 0x168b: 0x4000, + 0x168c: 0x4000, 0x168d: 0x4000, 0x168e: 0x4000, 0x168f: 0x4000, 0x1690: 0x4000, 0x1691: 0x4000, + 0x1692: 0x4000, 0x1693: 0x4000, 0x1694: 0x4000, 0x1695: 0x4000, 0x1696: 0x4000, 0x1697: 0x4000, + 0x1698: 0x4000, 0x1699: 0x4000, 0x169a: 0x4000, 0x169b: 0x4000, 0x169c: 0x4000, 0x169d: 0x4000, + 0x169e: 0x4000, 0x169f: 0x4000, 0x16a0: 0x4000, 0x16a1: 0x4000, 0x16a2: 0x4000, 0x16a3: 0x4000, + 0x16a4: 0x4000, 0x16a5: 0x4000, 0x16a6: 0x4000, 0x16a7: 0x4000, 0x16a8: 0x4000, 0x16a9: 0x4000, + 0x16aa: 0x4000, 0x16ab: 0x4000, 0x16ac: 0x4000, 0x16ad: 0x4000, 0x16ae: 0x4000, 0x16af: 0x4000, + 0x16b0: 0x4000, 0x16b1: 0x4000, 0x16b2: 0x4000, 0x16b3: 0x4000, 0x16b4: 0x4000, 0x16b5: 0x4000, + 0x16b6: 0x4000, 0x16b7: 0x4000, 0x16b8: 0x4000, 0x16b9: 0x4000, 0x16ba: 0x4000, 0x16bb: 0x4000, + 0x16bc: 0x4000, 0x16bd: 0x4000, + // Block 0x5b, offset 0x16c0 + 0x16cb: 0x4000, + 0x16cc: 0x4000, 0x16cd: 0x4000, 0x16ce: 0x4000, 0x16d0: 0x4000, 0x16d1: 0x4000, + 0x16d2: 0x4000, 0x16d3: 0x4000, 0x16d4: 0x4000, 0x16d5: 0x4000, 0x16d6: 0x4000, 0x16d7: 0x4000, + 0x16d8: 0x4000, 0x16d9: 0x4000, 0x16da: 0x4000, 0x16db: 0x4000, 0x16dc: 0x4000, 0x16dd: 0x4000, + 0x16de: 0x4000, 0x16df: 0x4000, 0x16e0: 0x4000, 0x16e1: 0x4000, 0x16e2: 0x4000, 0x16e3: 0x4000, + 0x16e4: 0x4000, 0x16e5: 0x4000, 0x16e6: 0x4000, 0x16e7: 0x4000, + 0x16fa: 0x4000, + // Block 0x5c, offset 0x1700 + 0x1715: 0x4000, 0x1716: 0x4000, + 0x1724: 0x4000, + // Block 0x5d, offset 0x1740 + 0x177b: 0x4000, + 0x177c: 0x4000, 0x177d: 0x4000, 0x177e: 0x4000, 0x177f: 0x4000, + // Block 0x5e, offset 0x1780 + 0x1780: 0x4000, 0x1781: 0x4000, 0x1782: 0x4000, 0x1783: 0x4000, 0x1784: 0x4000, 0x1785: 0x4000, + 0x1786: 0x4000, 0x1787: 0x4000, 0x1788: 0x4000, 0x1789: 0x4000, 0x178a: 0x4000, 0x178b: 0x4000, + 0x178c: 0x4000, 0x178d: 0x4000, 0x178e: 0x4000, 0x178f: 0x4000, + // Block 0x5f, offset 0x17c0 + 0x17c0: 0x4000, 0x17c1: 0x4000, 0x17c2: 0x4000, 0x17c3: 0x4000, 0x17c4: 0x4000, 0x17c5: 0x4000, + 0x17cc: 0x4000, 0x17d0: 0x4000, 0x17d1: 0x4000, + 0x17d2: 0x4000, 0x17d5: 0x4000, + 0x17eb: 0x4000, 0x17ec: 0x4000, + 0x17f4: 0x4000, 0x17f5: 0x4000, + 0x17f6: 0x4000, 0x17f7: 0x4000, 0x17f8: 0x4000, 0x17f9: 0x4000, 0x17fa: 0x4000, + // Block 0x60, offset 0x1800 + 0x1820: 0x4000, 0x1821: 0x4000, 0x1822: 0x4000, 0x1823: 0x4000, + 0x1824: 0x4000, 0x1825: 0x4000, 0x1826: 0x4000, 0x1827: 0x4000, 0x1828: 0x4000, 0x1829: 0x4000, + 0x182a: 0x4000, 0x182b: 0x4000, + // Block 0x61, offset 0x1840 + 0x184d: 0x4000, 0x184e: 0x4000, 0x184f: 0x4000, 0x1850: 0x4000, 0x1851: 0x4000, + 0x1852: 0x4000, 0x1853: 0x4000, 0x1854: 0x4000, 0x1855: 0x4000, 0x1856: 0x4000, 0x1857: 0x4000, + 0x1858: 0x4000, 0x1859: 0x4000, 0x185a: 0x4000, 0x185b: 0x4000, 0x185c: 0x4000, 0x185d: 0x4000, + 0x185e: 0x4000, 0x185f: 0x4000, 0x1860: 0x4000, 0x1861: 0x4000, 0x1862: 0x4000, 0x1863: 0x4000, + 0x1864: 0x4000, 0x1865: 0x4000, 0x1866: 0x4000, 0x1867: 0x4000, 0x1868: 0x4000, 0x1869: 0x4000, + 0x186a: 0x4000, 0x186b: 0x4000, 0x186c: 0x4000, 0x186d: 0x4000, 0x186e: 0x4000, 0x186f: 0x4000, + 0x1870: 0x4000, 0x1871: 0x4000, 0x1872: 0x4000, 0x1873: 0x4000, 0x1874: 0x4000, 0x1875: 0x4000, + 0x1876: 0x4000, 0x1877: 0x4000, 0x1878: 0x4000, 0x1879: 0x4000, 0x187a: 0x4000, 0x187b: 0x4000, + 0x187c: 0x4000, 0x187d: 0x4000, 0x187e: 0x4000, 0x187f: 0x4000, + // Block 0x62, offset 0x1880 + 0x1880: 0x4000, 0x1881: 0x4000, 0x1882: 0x4000, 0x1883: 0x4000, 0x1884: 0x4000, 0x1885: 0x4000, + 0x1886: 0x4000, 0x1887: 0x4000, 0x1888: 0x4000, 0x1889: 0x4000, 0x188a: 0x4000, 0x188b: 0x4000, + 0x188c: 0x4000, 0x188d: 0x4000, 0x188e: 0x4000, 0x188f: 0x4000, 0x1890: 0x4000, 0x1891: 0x4000, + 0x1892: 0x4000, 0x1893: 0x4000, 0x1894: 0x4000, 0x1895: 0x4000, 0x1896: 0x4000, 0x1897: 0x4000, + 0x1898: 0x4000, 0x1899: 0x4000, 0x189a: 0x4000, 0x189b: 0x4000, 0x189c: 0x4000, 0x189d: 0x4000, + 0x189e: 0x4000, 0x189f: 0x4000, 0x18a0: 0x4000, 0x18a1: 0x4000, 0x18a2: 0x4000, 0x18a3: 0x4000, + 0x18a4: 0x4000, 0x18a5: 0x4000, 0x18a6: 0x4000, 0x18a7: 0x4000, 0x18a8: 0x4000, 0x18a9: 0x4000, + 0x18aa: 0x4000, 0x18ab: 0x4000, 0x18ac: 0x4000, 0x18ad: 0x4000, 0x18ae: 0x4000, 0x18af: 0x4000, + 0x18b0: 0x4000, 0x18b1: 0x4000, 0x18b3: 0x4000, 0x18b4: 0x4000, 0x18b5: 0x4000, + 0x18b6: 0x4000, 0x18ba: 0x4000, 0x18bb: 0x4000, + 0x18bc: 0x4000, 0x18bd: 0x4000, 0x18be: 0x4000, 0x18bf: 0x4000, + // Block 0x63, offset 0x18c0 + 0x18c0: 0x4000, 0x18c1: 0x4000, 0x18c2: 0x4000, 0x18c3: 0x4000, 0x18c4: 0x4000, 0x18c5: 0x4000, + 0x18c6: 0x4000, 0x18c7: 0x4000, 0x18c8: 0x4000, 0x18c9: 0x4000, 0x18ca: 0x4000, 0x18cb: 0x4000, + 0x18cc: 0x4000, 0x18cd: 0x4000, 0x18ce: 0x4000, 0x18cf: 0x4000, 0x18d0: 0x4000, 0x18d1: 0x4000, + 0x18d2: 0x4000, 0x18d3: 0x4000, 0x18d4: 0x4000, 0x18d5: 0x4000, 0x18d6: 0x4000, 0x18d7: 0x4000, + 0x18d8: 0x4000, 0x18d9: 0x4000, 0x18da: 0x4000, 0x18db: 0x4000, 0x18dc: 0x4000, 0x18dd: 0x4000, + 0x18de: 0x4000, 0x18df: 0x4000, 0x18e0: 0x4000, 0x18e1: 0x4000, 0x18e2: 0x4000, + 0x18e5: 0x4000, 0x18e6: 0x4000, 0x18e7: 0x4000, 0x18e8: 0x4000, 0x18e9: 0x4000, + 0x18ea: 0x4000, 0x18ee: 0x4000, 0x18ef: 0x4000, + 0x18f0: 0x4000, 0x18f1: 0x4000, 0x18f2: 0x4000, 0x18f3: 0x4000, 0x18f4: 0x4000, 0x18f5: 0x4000, + 0x18f6: 0x4000, 0x18f7: 0x4000, 0x18f8: 0x4000, 0x18f9: 0x4000, 0x18fa: 0x4000, 0x18fb: 0x4000, + 0x18fc: 0x4000, 0x18fd: 0x4000, 0x18fe: 0x4000, 0x18ff: 0x4000, + // Block 0x64, offset 0x1900 + 0x1900: 0x4000, 0x1901: 0x4000, 0x1902: 0x4000, 0x1903: 0x4000, 0x1904: 0x4000, 0x1905: 0x4000, + 0x1906: 0x4000, 0x1907: 0x4000, 0x1908: 0x4000, 0x1909: 0x4000, 0x190a: 0x4000, + 0x190d: 0x4000, 0x190e: 0x4000, 0x190f: 0x4000, 0x1910: 0x4000, 0x1911: 0x4000, + 0x1912: 0x4000, 0x1913: 0x4000, 0x1914: 0x4000, 0x1915: 0x4000, 0x1916: 0x4000, 0x1917: 0x4000, + 0x1918: 0x4000, 0x1919: 0x4000, 0x191a: 0x4000, 0x191b: 0x4000, 0x191c: 0x4000, 0x191d: 0x4000, + 0x191e: 0x4000, 0x191f: 0x4000, 0x1920: 0x4000, 0x1921: 0x4000, 0x1922: 0x4000, 0x1923: 0x4000, + 0x1924: 0x4000, 0x1925: 0x4000, 0x1926: 0x4000, 0x1927: 0x4000, 0x1928: 0x4000, 0x1929: 0x4000, + 0x192a: 0x4000, 0x192b: 0x4000, 0x192c: 0x4000, 0x192d: 0x4000, 0x192e: 0x4000, 0x192f: 0x4000, + 0x1930: 0x4000, 0x1931: 0x4000, 0x1932: 0x4000, 0x1933: 0x4000, 0x1934: 0x4000, 0x1935: 0x4000, + 0x1936: 0x4000, 0x1937: 0x4000, 0x1938: 0x4000, 0x1939: 0x4000, 0x193a: 0x4000, 0x193b: 0x4000, + 0x193c: 0x4000, 0x193d: 0x4000, 0x193e: 0x4000, 0x193f: 0x4000, + // Block 0x65, offset 0x1940 + 0x1970: 0x4000, 0x1971: 0x4000, 0x1972: 0x4000, 0x1973: 0x4000, + 0x1978: 0x4000, 0x1979: 0x4000, 0x197a: 0x4000, + // Block 0x66, offset 0x1980 + 0x1980: 0x4000, 0x1981: 0x4000, 0x1982: 0x4000, + 0x1990: 0x4000, 0x1991: 0x4000, + 0x1992: 0x4000, 0x1993: 0x4000, 0x1994: 0x4000, 0x1995: 0x4000, + // Block 0x67, offset 0x19c0 + 0x19c0: 0x2000, 0x19c1: 0x2000, 0x19c2: 0x2000, 0x19c3: 0x2000, 0x19c4: 0x2000, 0x19c5: 0x2000, + 0x19c6: 0x2000, 0x19c7: 0x2000, 0x19c8: 0x2000, 0x19c9: 0x2000, 0x19ca: 0x2000, 0x19cb: 0x2000, + 0x19cc: 0x2000, 0x19cd: 0x2000, 0x19ce: 0x2000, 0x19cf: 0x2000, 0x19d0: 0x2000, 0x19d1: 0x2000, + 0x19d2: 0x2000, 0x19d3: 0x2000, 0x19d4: 0x2000, 0x19d5: 0x2000, 0x19d6: 0x2000, 0x19d7: 0x2000, + 0x19d8: 0x2000, 0x19d9: 0x2000, 0x19da: 0x2000, 0x19db: 0x2000, 0x19dc: 0x2000, 0x19dd: 0x2000, + 0x19de: 0x2000, 0x19df: 0x2000, 0x19e0: 0x2000, 0x19e1: 0x2000, 0x19e2: 0x2000, 0x19e3: 0x2000, + 0x19e4: 0x2000, 0x19e5: 0x2000, 0x19e6: 0x2000, 0x19e7: 0x2000, 0x19e8: 0x2000, 0x19e9: 0x2000, + 0x19ea: 0x2000, 0x19eb: 0x2000, 0x19ec: 0x2000, 0x19ed: 0x2000, 0x19ee: 0x2000, 0x19ef: 0x2000, + 0x19f0: 0x2000, 0x19f1: 0x2000, 0x19f2: 0x2000, 0x19f3: 0x2000, 0x19f4: 0x2000, 0x19f5: 0x2000, + 0x19f6: 0x2000, 0x19f7: 0x2000, 0x19f8: 0x2000, 0x19f9: 0x2000, 0x19fa: 0x2000, 0x19fb: 0x2000, + 0x19fc: 0x2000, 0x19fd: 0x2000, +} + +// widthIndex: 22 blocks, 1408 entries, 1408 bytes +// Block 0 is the zero block. +var widthIndex = [1408]uint8{ + // Block 0x0, offset 0x0 + // Block 0x1, offset 0x40 + // Block 0x2, offset 0x80 + // Block 0x3, offset 0xc0 + 0xc2: 0x01, 0xc3: 0x02, 0xc4: 0x03, 0xc5: 0x04, 0xc7: 0x05, + 0xc9: 0x06, 0xcb: 0x07, 0xcc: 0x08, 0xcd: 0x09, 0xce: 0x0a, 0xcf: 0x0b, + 0xd0: 0x0c, 0xd1: 0x0d, + 0xe1: 0x02, 0xe2: 0x03, 0xe3: 0x04, 0xe4: 0x05, 0xe5: 0x06, 0xe6: 0x06, 0xe7: 0x06, + 0xe8: 0x06, 0xe9: 0x06, 0xea: 0x07, 0xeb: 0x06, 0xec: 0x06, 0xed: 0x08, 0xee: 0x09, 0xef: 0x0a, + 0xf0: 0x0f, 0xf3: 0x12, 0xf4: 0x13, + // Block 0x4, offset 0x100 + 0x104: 0x0e, 0x105: 0x0f, + // Block 0x5, offset 0x140 + 0x140: 0x10, 0x141: 0x11, 0x142: 0x12, 0x144: 0x13, 0x145: 0x14, 0x146: 0x15, 0x147: 0x16, + 0x148: 0x17, 0x149: 0x18, 0x14a: 0x19, 0x14c: 0x1a, 0x14f: 0x1b, + 0x151: 0x1c, 0x152: 0x08, 0x153: 0x1d, 0x154: 0x1e, 0x155: 0x1f, 0x156: 0x20, 0x157: 0x21, + 0x158: 0x22, 0x159: 0x23, 0x15a: 0x24, 0x15b: 0x25, 0x15c: 0x26, 0x15d: 0x27, 0x15e: 0x28, 0x15f: 0x29, + 0x166: 0x2a, + 0x16c: 0x2b, 0x16d: 0x2c, + 0x17a: 0x2d, 0x17b: 0x2e, 0x17c: 0x0e, 0x17d: 0x0e, 0x17e: 0x0e, 0x17f: 0x2f, + // Block 0x6, offset 0x180 + 0x180: 0x30, 0x181: 0x31, 0x182: 0x32, 0x183: 0x33, 0x184: 0x34, 0x185: 0x35, 0x186: 0x36, 0x187: 0x37, + 0x188: 0x38, 0x189: 0x39, 0x18a: 0x0e, 0x18b: 0x3a, 0x18c: 0x0e, 0x18d: 0x0e, 0x18e: 0x0e, 0x18f: 0x0e, + 0x190: 0x0e, 0x191: 0x0e, 0x192: 0x0e, 0x193: 0x0e, 0x194: 0x0e, 0x195: 0x0e, 0x196: 0x0e, 0x197: 0x0e, + 0x198: 0x0e, 0x199: 0x0e, 0x19a: 0x0e, 0x19b: 0x0e, 0x19c: 0x0e, 0x19d: 0x0e, 0x19e: 0x0e, 0x19f: 0x0e, + 0x1a0: 0x0e, 0x1a1: 0x0e, 0x1a2: 0x0e, 0x1a3: 0x0e, 0x1a4: 0x0e, 0x1a5: 0x0e, 0x1a6: 0x0e, 0x1a7: 0x0e, + 0x1a8: 0x0e, 0x1a9: 0x0e, 0x1aa: 0x0e, 0x1ab: 0x0e, 0x1ac: 0x0e, 0x1ad: 0x0e, 0x1ae: 0x0e, 0x1af: 0x0e, + 0x1b0: 0x0e, 0x1b1: 0x0e, 0x1b2: 0x0e, 0x1b3: 0x0e, 0x1b4: 0x0e, 0x1b5: 0x0e, 0x1b6: 0x0e, 0x1b7: 0x0e, + 0x1b8: 0x0e, 0x1b9: 0x0e, 0x1ba: 0x0e, 0x1bb: 0x0e, 0x1bc: 0x0e, 0x1bd: 0x0e, 0x1be: 0x0e, 0x1bf: 0x0e, + // Block 0x7, offset 0x1c0 + 0x1c0: 0x0e, 0x1c1: 0x0e, 0x1c2: 0x0e, 0x1c3: 0x0e, 0x1c4: 0x0e, 0x1c5: 0x0e, 0x1c6: 0x0e, 0x1c7: 0x0e, + 0x1c8: 0x0e, 0x1c9: 0x0e, 0x1ca: 0x0e, 0x1cb: 0x0e, 0x1cc: 0x0e, 0x1cd: 0x0e, 0x1ce: 0x0e, 0x1cf: 0x0e, + 0x1d0: 0x0e, 0x1d1: 0x0e, 0x1d2: 0x0e, 0x1d3: 0x0e, 0x1d4: 0x0e, 0x1d5: 0x0e, 0x1d6: 0x0e, 0x1d7: 0x0e, + 0x1d8: 0x0e, 0x1d9: 0x0e, 0x1da: 0x0e, 0x1db: 0x0e, 0x1dc: 0x0e, 0x1dd: 0x0e, 0x1de: 0x0e, 0x1df: 0x0e, + 0x1e0: 0x0e, 0x1e1: 0x0e, 0x1e2: 0x0e, 0x1e3: 0x0e, 0x1e4: 0x0e, 0x1e5: 0x0e, 0x1e6: 0x0e, 0x1e7: 0x0e, + 0x1e8: 0x0e, 0x1e9: 0x0e, 0x1ea: 0x0e, 0x1eb: 0x0e, 0x1ec: 0x0e, 0x1ed: 0x0e, 0x1ee: 0x0e, 0x1ef: 0x0e, + 0x1f0: 0x0e, 0x1f1: 0x0e, 0x1f2: 0x0e, 0x1f3: 0x0e, 0x1f4: 0x0e, 0x1f5: 0x0e, 0x1f6: 0x0e, + 0x1f8: 0x0e, 0x1f9: 0x0e, 0x1fa: 0x0e, 0x1fb: 0x0e, 0x1fc: 0x0e, 0x1fd: 0x0e, 0x1fe: 0x0e, 0x1ff: 0x0e, + // Block 0x8, offset 0x200 + 0x200: 0x0e, 0x201: 0x0e, 0x202: 0x0e, 0x203: 0x0e, 0x204: 0x0e, 0x205: 0x0e, 0x206: 0x0e, 0x207: 0x0e, + 0x208: 0x0e, 0x209: 0x0e, 0x20a: 0x0e, 0x20b: 0x0e, 0x20c: 0x0e, 0x20d: 0x0e, 0x20e: 0x0e, 0x20f: 0x0e, + 0x210: 0x0e, 0x211: 0x0e, 0x212: 0x0e, 0x213: 0x0e, 0x214: 0x0e, 0x215: 0x0e, 0x216: 0x0e, 0x217: 0x0e, + 0x218: 0x0e, 0x219: 0x0e, 0x21a: 0x0e, 0x21b: 0x0e, 0x21c: 0x0e, 0x21d: 0x0e, 0x21e: 0x0e, 0x21f: 0x0e, + 0x220: 0x0e, 0x221: 0x0e, 0x222: 0x0e, 0x223: 0x0e, 0x224: 0x0e, 0x225: 0x0e, 0x226: 0x0e, 0x227: 0x0e, + 0x228: 0x0e, 0x229: 0x0e, 0x22a: 0x0e, 0x22b: 0x0e, 0x22c: 0x0e, 0x22d: 0x0e, 0x22e: 0x0e, 0x22f: 0x0e, + 0x230: 0x0e, 0x231: 0x0e, 0x232: 0x0e, 0x233: 0x0e, 0x234: 0x0e, 0x235: 0x0e, 0x236: 0x0e, 0x237: 0x0e, + 0x238: 0x0e, 0x239: 0x0e, 0x23a: 0x0e, 0x23b: 0x0e, 0x23c: 0x0e, 0x23d: 0x0e, 0x23e: 0x0e, 0x23f: 0x0e, + // Block 0x9, offset 0x240 + 0x240: 0x0e, 0x241: 0x0e, 0x242: 0x0e, 0x243: 0x0e, 0x244: 0x0e, 0x245: 0x0e, 0x246: 0x0e, 0x247: 0x0e, + 0x248: 0x0e, 0x249: 0x0e, 0x24a: 0x0e, 0x24b: 0x0e, 0x24c: 0x0e, 0x24d: 0x0e, 0x24e: 0x0e, 0x24f: 0x0e, + 0x250: 0x0e, 0x251: 0x0e, 0x252: 0x3b, 0x253: 0x3c, + 0x265: 0x3d, + 0x270: 0x0e, 0x271: 0x0e, 0x272: 0x0e, 0x273: 0x0e, 0x274: 0x0e, 0x275: 0x0e, 0x276: 0x0e, 0x277: 0x0e, + 0x278: 0x0e, 0x279: 0x0e, 0x27a: 0x0e, 0x27b: 0x0e, 0x27c: 0x0e, 0x27d: 0x0e, 0x27e: 0x0e, 0x27f: 0x0e, + // Block 0xa, offset 0x280 + 0x280: 0x0e, 0x281: 0x0e, 0x282: 0x0e, 0x283: 0x0e, 0x284: 0x0e, 0x285: 0x0e, 0x286: 0x0e, 0x287: 0x0e, + 0x288: 0x0e, 0x289: 0x0e, 0x28a: 0x0e, 0x28b: 0x0e, 0x28c: 0x0e, 0x28d: 0x0e, 0x28e: 0x0e, 0x28f: 0x0e, + 0x290: 0x0e, 0x291: 0x0e, 0x292: 0x0e, 0x293: 0x0e, 0x294: 0x0e, 0x295: 0x0e, 0x296: 0x0e, 0x297: 0x0e, + 0x298: 0x0e, 0x299: 0x0e, 0x29a: 0x0e, 0x29b: 0x0e, 0x29c: 0x0e, 0x29d: 0x0e, 0x29e: 0x3e, + // Block 0xb, offset 0x2c0 + 0x2c0: 0x08, 0x2c1: 0x08, 0x2c2: 0x08, 0x2c3: 0x08, 0x2c4: 0x08, 0x2c5: 0x08, 0x2c6: 0x08, 0x2c7: 0x08, + 0x2c8: 0x08, 0x2c9: 0x08, 0x2ca: 0x08, 0x2cb: 0x08, 0x2cc: 0x08, 0x2cd: 0x08, 0x2ce: 0x08, 0x2cf: 0x08, + 0x2d0: 0x08, 0x2d1: 0x08, 0x2d2: 0x08, 0x2d3: 0x08, 0x2d4: 0x08, 0x2d5: 0x08, 0x2d6: 0x08, 0x2d7: 0x08, + 0x2d8: 0x08, 0x2d9: 0x08, 0x2da: 0x08, 0x2db: 0x08, 0x2dc: 0x08, 0x2dd: 0x08, 0x2de: 0x08, 0x2df: 0x08, + 0x2e0: 0x08, 0x2e1: 0x08, 0x2e2: 0x08, 0x2e3: 0x08, 0x2e4: 0x08, 0x2e5: 0x08, 0x2e6: 0x08, 0x2e7: 0x08, + 0x2e8: 0x08, 0x2e9: 0x08, 0x2ea: 0x08, 0x2eb: 0x08, 0x2ec: 0x08, 0x2ed: 0x08, 0x2ee: 0x08, 0x2ef: 0x08, + 0x2f0: 0x08, 0x2f1: 0x08, 0x2f2: 0x08, 0x2f3: 0x08, 0x2f4: 0x08, 0x2f5: 0x08, 0x2f6: 0x08, 0x2f7: 0x08, + 0x2f8: 0x08, 0x2f9: 0x08, 0x2fa: 0x08, 0x2fb: 0x08, 0x2fc: 0x08, 0x2fd: 0x08, 0x2fe: 0x08, 0x2ff: 0x08, + // Block 0xc, offset 0x300 + 0x300: 0x08, 0x301: 0x08, 0x302: 0x08, 0x303: 0x08, 0x304: 0x08, 0x305: 0x08, 0x306: 0x08, 0x307: 0x08, + 0x308: 0x08, 0x309: 0x08, 0x30a: 0x08, 0x30b: 0x08, 0x30c: 0x08, 0x30d: 0x08, 0x30e: 0x08, 0x30f: 0x08, + 0x310: 0x08, 0x311: 0x08, 0x312: 0x08, 0x313: 0x08, 0x314: 0x08, 0x315: 0x08, 0x316: 0x08, 0x317: 0x08, + 0x318: 0x08, 0x319: 0x08, 0x31a: 0x08, 0x31b: 0x08, 0x31c: 0x08, 0x31d: 0x08, 0x31e: 0x08, 0x31f: 0x08, + 0x320: 0x08, 0x321: 0x08, 0x322: 0x08, 0x323: 0x08, 0x324: 0x0e, 0x325: 0x0e, 0x326: 0x0e, 0x327: 0x0e, + 0x328: 0x0e, 0x329: 0x0e, 0x32a: 0x0e, 0x32b: 0x0e, + 0x338: 0x3f, 0x339: 0x40, 0x33c: 0x41, 0x33d: 0x42, 0x33e: 0x43, 0x33f: 0x44, + // Block 0xd, offset 0x340 + 0x37f: 0x45, + // Block 0xe, offset 0x380 + 0x380: 0x0e, 0x381: 0x0e, 0x382: 0x0e, 0x383: 0x0e, 0x384: 0x0e, 0x385: 0x0e, 0x386: 0x0e, 0x387: 0x0e, + 0x388: 0x0e, 0x389: 0x0e, 0x38a: 0x0e, 0x38b: 0x0e, 0x38c: 0x0e, 0x38d: 0x0e, 0x38e: 0x0e, 0x38f: 0x0e, + 0x390: 0x0e, 0x391: 0x0e, 0x392: 0x0e, 0x393: 0x0e, 0x394: 0x0e, 0x395: 0x0e, 0x396: 0x0e, 0x397: 0x0e, + 0x398: 0x0e, 0x399: 0x0e, 0x39a: 0x0e, 0x39b: 0x0e, 0x39c: 0x0e, 0x39d: 0x0e, 0x39e: 0x0e, 0x39f: 0x46, + 0x3a0: 0x0e, 0x3a1: 0x0e, 0x3a2: 0x0e, 0x3a3: 0x0e, 0x3a4: 0x0e, 0x3a5: 0x0e, 0x3a6: 0x0e, 0x3a7: 0x0e, + 0x3a8: 0x0e, 0x3a9: 0x0e, 0x3aa: 0x0e, 0x3ab: 0x47, + // Block 0xf, offset 0x3c0 + 0x3c0: 0x0e, 0x3c1: 0x0e, 0x3c2: 0x0e, 0x3c3: 0x0e, 0x3c4: 0x48, 0x3c5: 0x49, 0x3c6: 0x0e, 0x3c7: 0x0e, + 0x3c8: 0x0e, 0x3c9: 0x0e, 0x3ca: 0x0e, 0x3cb: 0x4a, + // Block 0x10, offset 0x400 + 0x400: 0x4b, 0x403: 0x4c, 0x404: 0x4d, 0x405: 0x4e, 0x406: 0x4f, + 0x408: 0x50, 0x409: 0x51, 0x40c: 0x52, 0x40d: 0x53, 0x40e: 0x54, 0x40f: 0x55, + 0x410: 0x3a, 0x411: 0x56, 0x412: 0x0e, 0x413: 0x57, 0x414: 0x58, 0x415: 0x59, 0x416: 0x5a, 0x417: 0x5b, + 0x418: 0x0e, 0x419: 0x5c, 0x41a: 0x0e, 0x41b: 0x5d, 0x41f: 0x5e, + 0x424: 0x5f, 0x425: 0x60, 0x426: 0x61, 0x427: 0x62, + 0x429: 0x63, 0x42a: 0x64, + // Block 0x11, offset 0x440 + 0x456: 0x0b, 0x457: 0x06, + 0x458: 0x0c, 0x45b: 0x0d, 0x45f: 0x0e, + 0x460: 0x06, 0x461: 0x06, 0x462: 0x06, 0x463: 0x06, 0x464: 0x06, 0x465: 0x06, 0x466: 0x06, 0x467: 0x06, + 0x468: 0x06, 0x469: 0x06, 0x46a: 0x06, 0x46b: 0x06, 0x46c: 0x06, 0x46d: 0x06, 0x46e: 0x06, 0x46f: 0x06, + 0x470: 0x06, 0x471: 0x06, 0x472: 0x06, 0x473: 0x06, 0x474: 0x06, 0x475: 0x06, 0x476: 0x06, 0x477: 0x06, + 0x478: 0x06, 0x479: 0x06, 0x47a: 0x06, 0x47b: 0x06, 0x47c: 0x06, 0x47d: 0x06, 0x47e: 0x06, 0x47f: 0x06, + // Block 0x12, offset 0x480 + 0x484: 0x08, 0x485: 0x08, 0x486: 0x08, 0x487: 0x09, + // Block 0x13, offset 0x4c0 + 0x4c0: 0x08, 0x4c1: 0x08, 0x4c2: 0x08, 0x4c3: 0x08, 0x4c4: 0x08, 0x4c5: 0x08, 0x4c6: 0x08, 0x4c7: 0x08, + 0x4c8: 0x08, 0x4c9: 0x08, 0x4ca: 0x08, 0x4cb: 0x08, 0x4cc: 0x08, 0x4cd: 0x08, 0x4ce: 0x08, 0x4cf: 0x08, + 0x4d0: 0x08, 0x4d1: 0x08, 0x4d2: 0x08, 0x4d3: 0x08, 0x4d4: 0x08, 0x4d5: 0x08, 0x4d6: 0x08, 0x4d7: 0x08, + 0x4d8: 0x08, 0x4d9: 0x08, 0x4da: 0x08, 0x4db: 0x08, 0x4dc: 0x08, 0x4dd: 0x08, 0x4de: 0x08, 0x4df: 0x08, + 0x4e0: 0x08, 0x4e1: 0x08, 0x4e2: 0x08, 0x4e3: 0x08, 0x4e4: 0x08, 0x4e5: 0x08, 0x4e6: 0x08, 0x4e7: 0x08, + 0x4e8: 0x08, 0x4e9: 0x08, 0x4ea: 0x08, 0x4eb: 0x08, 0x4ec: 0x08, 0x4ed: 0x08, 0x4ee: 0x08, 0x4ef: 0x08, + 0x4f0: 0x08, 0x4f1: 0x08, 0x4f2: 0x08, 0x4f3: 0x08, 0x4f4: 0x08, 0x4f5: 0x08, 0x4f6: 0x08, 0x4f7: 0x08, + 0x4f8: 0x08, 0x4f9: 0x08, 0x4fa: 0x08, 0x4fb: 0x08, 0x4fc: 0x08, 0x4fd: 0x08, 0x4fe: 0x08, 0x4ff: 0x65, + // Block 0x14, offset 0x500 + 0x520: 0x10, + 0x530: 0x09, 0x531: 0x09, 0x532: 0x09, 0x533: 0x09, 0x534: 0x09, 0x535: 0x09, 0x536: 0x09, 0x537: 0x09, + 0x538: 0x09, 0x539: 0x09, 0x53a: 0x09, 0x53b: 0x09, 0x53c: 0x09, 0x53d: 0x09, 0x53e: 0x09, 0x53f: 0x11, + // Block 0x15, offset 0x540 + 0x540: 0x09, 0x541: 0x09, 0x542: 0x09, 0x543: 0x09, 0x544: 0x09, 0x545: 0x09, 0x546: 0x09, 0x547: 0x09, + 0x548: 0x09, 0x549: 0x09, 0x54a: 0x09, 0x54b: 0x09, 0x54c: 0x09, 0x54d: 0x09, 0x54e: 0x09, 0x54f: 0x11, +} + +// inverseData contains 4-byte entries of the following format: +// <0 padding> +// The last byte of the UTF-8-encoded rune is xor-ed with the last byte of the +// UTF-8 encoding of the original rune. Mappings often have the following +// pattern: +// A -> A (U+FF21 -> U+0041) +// B -> B (U+FF22 -> U+0042) +// ... +// By xor-ing the last byte the same entry can be shared by many mappings. This +// reduces the total number of distinct entries by about two thirds. +// The resulting entry for the aforementioned mappings is +// { 0x01, 0xE0, 0x00, 0x00 } +// Using this entry to map U+FF21 (UTF-8 [EF BC A1]), we get +// E0 ^ A1 = 41. +// Similarly, for U+FF22 (UTF-8 [EF BC A2]), we get +// E0 ^ A2 = 42. +// Note that because of the xor-ing, the byte sequence stored in the entry is +// not valid UTF-8. +var inverseData = [150][4]byte{ + {0x00, 0x00, 0x00, 0x00}, + {0x03, 0xe3, 0x80, 0xa0}, + {0x03, 0xef, 0xbc, 0xa0}, + {0x03, 0xef, 0xbc, 0xe0}, + {0x03, 0xef, 0xbd, 0xe0}, + {0x03, 0xef, 0xbf, 0x02}, + {0x03, 0xef, 0xbf, 0x00}, + {0x03, 0xef, 0xbf, 0x0e}, + {0x03, 0xef, 0xbf, 0x0c}, + {0x03, 0xef, 0xbf, 0x0f}, + {0x03, 0xef, 0xbf, 0x39}, + {0x03, 0xef, 0xbf, 0x3b}, + {0x03, 0xef, 0xbf, 0x3f}, + {0x03, 0xef, 0xbf, 0x2a}, + {0x03, 0xef, 0xbf, 0x0d}, + {0x03, 0xef, 0xbf, 0x25}, + {0x03, 0xef, 0xbd, 0x1a}, + {0x03, 0xef, 0xbd, 0x26}, + {0x01, 0xa0, 0x00, 0x00}, + {0x03, 0xef, 0xbd, 0x25}, + {0x03, 0xef, 0xbd, 0x23}, + {0x03, 0xef, 0xbd, 0x2e}, + {0x03, 0xef, 0xbe, 0x07}, + {0x03, 0xef, 0xbe, 0x05}, + {0x03, 0xef, 0xbd, 0x06}, + {0x03, 0xef, 0xbd, 0x13}, + {0x03, 0xef, 0xbd, 0x0b}, + {0x03, 0xef, 0xbd, 0x16}, + {0x03, 0xef, 0xbd, 0x0c}, + {0x03, 0xef, 0xbd, 0x15}, + {0x03, 0xef, 0xbd, 0x0d}, + {0x03, 0xef, 0xbd, 0x1c}, + {0x03, 0xef, 0xbd, 0x02}, + {0x03, 0xef, 0xbd, 0x1f}, + {0x03, 0xef, 0xbd, 0x1d}, + {0x03, 0xef, 0xbd, 0x17}, + {0x03, 0xef, 0xbd, 0x08}, + {0x03, 0xef, 0xbd, 0x09}, + {0x03, 0xef, 0xbd, 0x0e}, + {0x03, 0xef, 0xbd, 0x04}, + {0x03, 0xef, 0xbd, 0x05}, + {0x03, 0xef, 0xbe, 0x3f}, + {0x03, 0xef, 0xbe, 0x00}, + {0x03, 0xef, 0xbd, 0x2c}, + {0x03, 0xef, 0xbe, 0x06}, + {0x03, 0xef, 0xbe, 0x0c}, + {0x03, 0xef, 0xbe, 0x0f}, + {0x03, 0xef, 0xbe, 0x0d}, + {0x03, 0xef, 0xbe, 0x0b}, + {0x03, 0xef, 0xbe, 0x19}, + {0x03, 0xef, 0xbe, 0x15}, + {0x03, 0xef, 0xbe, 0x11}, + {0x03, 0xef, 0xbe, 0x31}, + {0x03, 0xef, 0xbe, 0x33}, + {0x03, 0xef, 0xbd, 0x0f}, + {0x03, 0xef, 0xbe, 0x30}, + {0x03, 0xef, 0xbe, 0x3e}, + {0x03, 0xef, 0xbe, 0x32}, + {0x03, 0xef, 0xbe, 0x36}, + {0x03, 0xef, 0xbd, 0x14}, + {0x03, 0xef, 0xbe, 0x2e}, + {0x03, 0xef, 0xbd, 0x1e}, + {0x03, 0xef, 0xbe, 0x10}, + {0x03, 0xef, 0xbf, 0x13}, + {0x03, 0xef, 0xbf, 0x15}, + {0x03, 0xef, 0xbf, 0x17}, + {0x03, 0xef, 0xbf, 0x1f}, + {0x03, 0xef, 0xbf, 0x1d}, + {0x03, 0xef, 0xbf, 0x1b}, + {0x03, 0xef, 0xbf, 0x09}, + {0x03, 0xef, 0xbf, 0x0b}, + {0x03, 0xef, 0xbf, 0x37}, + {0x03, 0xef, 0xbe, 0x04}, + {0x01, 0xe0, 0x00, 0x00}, + {0x03, 0xe2, 0xa6, 0x1a}, + {0x03, 0xe2, 0xa6, 0x26}, + {0x03, 0xe3, 0x80, 0x23}, + {0x03, 0xe3, 0x80, 0x2e}, + {0x03, 0xe3, 0x80, 0x25}, + {0x03, 0xe3, 0x83, 0x1e}, + {0x03, 0xe3, 0x83, 0x14}, + {0x03, 0xe3, 0x82, 0x06}, + {0x03, 0xe3, 0x82, 0x0b}, + {0x03, 0xe3, 0x82, 0x0c}, + {0x03, 0xe3, 0x82, 0x0d}, + {0x03, 0xe3, 0x82, 0x02}, + {0x03, 0xe3, 0x83, 0x0f}, + {0x03, 0xe3, 0x83, 0x08}, + {0x03, 0xe3, 0x83, 0x09}, + {0x03, 0xe3, 0x83, 0x2c}, + {0x03, 0xe3, 0x83, 0x0c}, + {0x03, 0xe3, 0x82, 0x13}, + {0x03, 0xe3, 0x82, 0x16}, + {0x03, 0xe3, 0x82, 0x15}, + {0x03, 0xe3, 0x82, 0x1c}, + {0x03, 0xe3, 0x82, 0x1f}, + {0x03, 0xe3, 0x82, 0x1d}, + {0x03, 0xe3, 0x82, 0x1a}, + {0x03, 0xe3, 0x82, 0x17}, + {0x03, 0xe3, 0x82, 0x08}, + {0x03, 0xe3, 0x82, 0x09}, + {0x03, 0xe3, 0x82, 0x0e}, + {0x03, 0xe3, 0x82, 0x04}, + {0x03, 0xe3, 0x82, 0x05}, + {0x03, 0xe3, 0x82, 0x3f}, + {0x03, 0xe3, 0x83, 0x00}, + {0x03, 0xe3, 0x83, 0x06}, + {0x03, 0xe3, 0x83, 0x05}, + {0x03, 0xe3, 0x83, 0x0d}, + {0x03, 0xe3, 0x83, 0x0b}, + {0x03, 0xe3, 0x83, 0x07}, + {0x03, 0xe3, 0x83, 0x19}, + {0x03, 0xe3, 0x83, 0x15}, + {0x03, 0xe3, 0x83, 0x11}, + {0x03, 0xe3, 0x83, 0x31}, + {0x03, 0xe3, 0x83, 0x33}, + {0x03, 0xe3, 0x83, 0x30}, + {0x03, 0xe3, 0x83, 0x3e}, + {0x03, 0xe3, 0x83, 0x32}, + {0x03, 0xe3, 0x83, 0x36}, + {0x03, 0xe3, 0x83, 0x2e}, + {0x03, 0xe3, 0x82, 0x07}, + {0x03, 0xe3, 0x85, 0x04}, + {0x03, 0xe3, 0x84, 0x10}, + {0x03, 0xe3, 0x85, 0x30}, + {0x03, 0xe3, 0x85, 0x0d}, + {0x03, 0xe3, 0x85, 0x13}, + {0x03, 0xe3, 0x85, 0x15}, + {0x03, 0xe3, 0x85, 0x17}, + {0x03, 0xe3, 0x85, 0x1f}, + {0x03, 0xe3, 0x85, 0x1d}, + {0x03, 0xe3, 0x85, 0x1b}, + {0x03, 0xe3, 0x85, 0x09}, + {0x03, 0xe3, 0x85, 0x0f}, + {0x03, 0xe3, 0x85, 0x0b}, + {0x03, 0xe3, 0x85, 0x37}, + {0x03, 0xe3, 0x85, 0x3b}, + {0x03, 0xe3, 0x85, 0x39}, + {0x03, 0xe3, 0x85, 0x3f}, + {0x02, 0xc2, 0x02, 0x00}, + {0x02, 0xc2, 0x0e, 0x00}, + {0x02, 0xc2, 0x0c, 0x00}, + {0x02, 0xc2, 0x00, 0x00}, + {0x03, 0xe2, 0x82, 0x0f}, + {0x03, 0xe2, 0x94, 0x2a}, + {0x03, 0xe2, 0x86, 0x39}, + {0x03, 0xe2, 0x86, 0x3b}, + {0x03, 0xe2, 0x86, 0x3f}, + {0x03, 0xe2, 0x96, 0x0d}, + {0x03, 0xe2, 0x97, 0x25}, +} + +// Total table size 15320 bytes (14KiB) diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go index ae93e247197..563f70429a6 100644 --- a/vendor/golang.org/x/time/rate/rate.go +++ b/vendor/golang.org/x/time/rate/rate.go @@ -223,7 +223,12 @@ func (lim *Limiter) Wait(ctx context.Context) (err error) { // canceled, or the expected wait time exceeds the Context's Deadline. // The burst limit is ignored if the rate limit is Inf. func (lim *Limiter) WaitN(ctx context.Context, n int) (err error) { - if n > lim.burst && lim.limit != Inf { + lim.mu.Lock() + burst := lim.burst + limit := lim.limit + lim.mu.Unlock() + + if n > burst && limit != Inf { return fmt.Errorf("rate: Wait(n=%d) exceeds limiter's burst %d", n, lim.burst) } // Check if ctx is already cancelled @@ -281,6 +286,23 @@ func (lim *Limiter) SetLimitAt(now time.Time, newLimit Limit) { lim.limit = newLimit } +// SetBurst is shorthand for SetBurstAt(time.Now(), newBurst). +func (lim *Limiter) SetBurst(newBurst int) { + lim.SetBurstAt(time.Now(), newBurst) +} + +// SetBurstAt sets a new burst size for the limiter. +func (lim *Limiter) SetBurstAt(now time.Time, newBurst int) { + lim.mu.Lock() + defer lim.mu.Unlock() + + now, _, tokens := lim.advance(now) + + lim.last = now + lim.tokens = tokens + lim.burst = newBurst +} + // reserveN is a helper method for AllowN, ReserveN, and WaitN. // maxFutureReserve specifies the maximum reservation wait duration allowed. // reserveN returns Reservation, not *Reservation, to avoid allocation in AllowN and WaitN. @@ -370,5 +392,9 @@ func (limit Limit) durationFromTokens(tokens float64) time.Duration { // tokensFromDuration is a unit conversion function from a time duration to the number of tokens // which could be accumulated during that duration at a rate of limit tokens per second. func (limit Limit) tokensFromDuration(d time.Duration) float64 { - return d.Seconds() * float64(limit) + // Split the integer and fractional parts ourself to minimize rounding errors. + // See golang.org/issues/34861. + sec := float64(d/time.Second) * float64(limit) + nsec := float64(d%time.Second) * float64(limit) + return sec + nsec/1e9 } diff --git a/vendor/golang.org/x/tools/go/ast/astutil/imports.go b/vendor/golang.org/x/tools/go/ast/astutil/imports.go index 3e4b195368b..2087ceec9cf 100644 --- a/vendor/golang.org/x/tools/go/ast/astutil/imports.go +++ b/vendor/golang.org/x/tools/go/ast/astutil/imports.go @@ -275,9 +275,10 @@ func DeleteNamedImport(fset *token.FileSet, f *ast.File, name, path string) (del // We deleted an entry but now there may be // a blank line-sized hole where the import was. - if line-lastLine > 1 { + if line-lastLine > 1 || !gen.Rparen.IsValid() { // There was a blank line immediately preceding the deleted import, - // so there's no need to close the hole. + // so there's no need to close the hole. The right parenthesis is + // invalid after AddImport to an import statement without parenthesis. // Do nothing. } else if line != fset.File(gen.Rparen).LineCount() { // There was no blank line. Close the hole. diff --git a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go deleted file mode 100644 index f8363d8faae..00000000000 --- a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package gcexportdata provides functions for locating, reading, and -// writing export data files containing type information produced by the -// gc compiler. This package supports go1.7 export data format and all -// later versions. -// -// Although it might seem convenient for this package to live alongside -// go/types in the standard library, this would cause version skew -// problems for developer tools that use it, since they must be able to -// consume the outputs of the gc compiler both before and after a Go -// update such as from Go 1.7 to Go 1.8. Because this package lives in -// golang.org/x/tools, sites can update their version of this repo some -// time before the Go 1.8 release and rebuild and redeploy their -// developer tools, which will then be able to consume both Go 1.7 and -// Go 1.8 export data files, so they will work before and after the -// Go update. (See discussion at https://golang.org/issue/15651.) -// -package gcexportdata // import "golang.org/x/tools/go/gcexportdata" - -import ( - "bufio" - "bytes" - "fmt" - "go/token" - "go/types" - "io" - "io/ioutil" - - "golang.org/x/tools/go/internal/gcimporter" -) - -// Find returns the name of an object (.o) or archive (.a) file -// containing type information for the specified import path, -// using the workspace layout conventions of go/build. -// If no file was found, an empty filename is returned. -// -// A relative srcDir is interpreted relative to the current working directory. -// -// Find also returns the package's resolved (canonical) import path, -// reflecting the effects of srcDir and vendoring on importPath. -func Find(importPath, srcDir string) (filename, path string) { - return gcimporter.FindPkg(importPath, srcDir) -} - -// NewReader returns a reader for the export data section of an object -// (.o) or archive (.a) file read from r. The new reader may provide -// additional trailing data beyond the end of the export data. -func NewReader(r io.Reader) (io.Reader, error) { - buf := bufio.NewReader(r) - _, err := gcimporter.FindExportData(buf) - // If we ever switch to a zip-like archive format with the ToC - // at the end, we can return the correct portion of export data, - // but for now we must return the entire rest of the file. - return buf, err -} - -// Read reads export data from in, decodes it, and returns type -// information for the package. -// The package name is specified by path. -// File position information is added to fset. -// -// Read may inspect and add to the imports map to ensure that references -// within the export data to other packages are consistent. The caller -// must ensure that imports[path] does not exist, or exists but is -// incomplete (see types.Package.Complete), and Read inserts the -// resulting package into this map entry. -// -// On return, the state of the reader is undefined. -func Read(in io.Reader, fset *token.FileSet, imports map[string]*types.Package, path string) (*types.Package, error) { - data, err := ioutil.ReadAll(in) - if err != nil { - return nil, fmt.Errorf("reading export data for %q: %v", path, err) - } - - if bytes.HasPrefix(data, []byte("!")) { - return nil, fmt.Errorf("can't read export data for %q directly from an archive file (call gcexportdata.NewReader first to extract export data)", path) - } - - // The App Engine Go runtime v1.6 uses the old export data format. - // TODO(adonovan): delete once v1.7 has been around for a while. - if bytes.HasPrefix(data, []byte("package ")) { - return gcimporter.ImportData(imports, path, path, bytes.NewReader(data)) - } - - // The indexed export format starts with an 'i'; the older - // binary export format starts with a 'c', 'd', or 'v' - // (from "version"). Select appropriate importer. - if len(data) > 0 && data[0] == 'i' { - _, pkg, err := gcimporter.IImportData(fset, imports, data[1:], path) - return pkg, err - } - - _, pkg, err := gcimporter.BImportData(fset, imports, data, path) - return pkg, err -} - -// Write writes encoded type information for the specified package to out. -// The FileSet provides file position information for named objects. -func Write(out io.Writer, fset *token.FileSet, pkg *types.Package) error { - b, err := gcimporter.IExportData(fset, pkg) - if err != nil { - return err - } - _, err = out.Write(b) - return err -} diff --git a/vendor/golang.org/x/tools/go/gcexportdata/importer.go b/vendor/golang.org/x/tools/go/gcexportdata/importer.go deleted file mode 100644 index efe221e7e14..00000000000 --- a/vendor/golang.org/x/tools/go/gcexportdata/importer.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gcexportdata - -import ( - "fmt" - "go/token" - "go/types" - "os" -) - -// NewImporter returns a new instance of the types.Importer interface -// that reads type information from export data files written by gc. -// The Importer also satisfies types.ImporterFrom. -// -// Export data files are located using "go build" workspace conventions -// and the build.Default context. -// -// Use this importer instead of go/importer.For("gc", ...) to avoid the -// version-skew problems described in the documentation of this package, -// or to control the FileSet or access the imports map populated during -// package loading. -// -func NewImporter(fset *token.FileSet, imports map[string]*types.Package) types.ImporterFrom { - return importer{fset, imports} -} - -type importer struct { - fset *token.FileSet - imports map[string]*types.Package -} - -func (imp importer) Import(importPath string) (*types.Package, error) { - return imp.ImportFrom(importPath, "", 0) -} - -func (imp importer) ImportFrom(importPath, srcDir string, mode types.ImportMode) (_ *types.Package, err error) { - filename, path := Find(importPath, srcDir) - if filename == "" { - if importPath == "unsafe" { - // Even for unsafe, call Find first in case - // the package was vendored. - return types.Unsafe, nil - } - return nil, fmt.Errorf("can't find import: %s", importPath) - } - - if pkg, ok := imp.imports[path]; ok && pkg.Complete() { - return pkg, nil // cache hit - } - - // open file - f, err := os.Open(filename) - if err != nil { - return nil, err - } - defer func() { - f.Close() - if err != nil { - // add file name to error - err = fmt.Errorf("reading export data: %s: %v", filename, err) - } - }() - - r, err := NewReader(f) - if err != nil { - return nil, err - } - - return Read(r, imp.fset, imp.imports, path) -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go deleted file mode 100644 index a807d0aaa28..00000000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go +++ /dev/null @@ -1,852 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Binary package export. -// This file was derived from $GOROOT/src/cmd/compile/internal/gc/bexport.go; -// see that file for specification of the format. - -package gcimporter - -import ( - "bytes" - "encoding/binary" - "fmt" - "go/ast" - "go/constant" - "go/token" - "go/types" - "math" - "math/big" - "sort" - "strings" -) - -// If debugFormat is set, each integer and string value is preceded by a marker -// and position information in the encoding. This mechanism permits an importer -// to recognize immediately when it is out of sync. The importer recognizes this -// mode automatically (i.e., it can import export data produced with debugging -// support even if debugFormat is not set at the time of import). This mode will -// lead to massively larger export data (by a factor of 2 to 3) and should only -// be enabled during development and debugging. -// -// NOTE: This flag is the first flag to enable if importing dies because of -// (suspected) format errors, and whenever a change is made to the format. -const debugFormat = false // default: false - -// If trace is set, debugging output is printed to std out. -const trace = false // default: false - -// Current export format version. Increase with each format change. -// Note: The latest binary (non-indexed) export format is at version 6. -// This exporter is still at level 4, but it doesn't matter since -// the binary importer can handle older versions just fine. -// 6: package height (CL 105038) -- NOT IMPLEMENTED HERE -// 5: improved position encoding efficiency (issue 20080, CL 41619) -- NOT IMPLEMEMTED HERE -// 4: type name objects support type aliases, uses aliasTag -// 3: Go1.8 encoding (same as version 2, aliasTag defined but never used) -// 2: removed unused bool in ODCL export (compiler only) -// 1: header format change (more regular), export package for _ struct fields -// 0: Go1.7 encoding -const exportVersion = 4 - -// trackAllTypes enables cycle tracking for all types, not just named -// types. The existing compiler invariants assume that unnamed types -// that are not completely set up are not used, or else there are spurious -// errors. -// If disabled, only named types are tracked, possibly leading to slightly -// less efficient encoding in rare cases. It also prevents the export of -// some corner-case type declarations (but those are not handled correctly -// with with the textual export format either). -// TODO(gri) enable and remove once issues caused by it are fixed -const trackAllTypes = false - -type exporter struct { - fset *token.FileSet - out bytes.Buffer - - // object -> index maps, indexed in order of serialization - strIndex map[string]int - pkgIndex map[*types.Package]int - typIndex map[types.Type]int - - // position encoding - posInfoFormat bool - prevFile string - prevLine int - - // debugging support - written int // bytes written - indent int // for trace -} - -// internalError represents an error generated inside this package. -type internalError string - -func (e internalError) Error() string { return "gcimporter: " + string(e) } - -func internalErrorf(format string, args ...interface{}) error { - return internalError(fmt.Sprintf(format, args...)) -} - -// BExportData returns binary export data for pkg. -// If no file set is provided, position info will be missing. -func BExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) { - defer func() { - if e := recover(); e != nil { - if ierr, ok := e.(internalError); ok { - err = ierr - return - } - // Not an internal error; panic again. - panic(e) - } - }() - - p := exporter{ - fset: fset, - strIndex: map[string]int{"": 0}, // empty string is mapped to 0 - pkgIndex: make(map[*types.Package]int), - typIndex: make(map[types.Type]int), - posInfoFormat: true, // TODO(gri) might become a flag, eventually - } - - // write version info - // The version string must start with "version %d" where %d is the version - // number. Additional debugging information may follow after a blank; that - // text is ignored by the importer. - p.rawStringln(fmt.Sprintf("version %d", exportVersion)) - var debug string - if debugFormat { - debug = "debug" - } - p.rawStringln(debug) // cannot use p.bool since it's affected by debugFormat; also want to see this clearly - p.bool(trackAllTypes) - p.bool(p.posInfoFormat) - - // --- generic export data --- - - // populate type map with predeclared "known" types - for index, typ := range predeclared() { - p.typIndex[typ] = index - } - if len(p.typIndex) != len(predeclared()) { - return nil, internalError("duplicate entries in type map?") - } - - // write package data - p.pkg(pkg, true) - if trace { - p.tracef("\n") - } - - // write objects - objcount := 0 - scope := pkg.Scope() - for _, name := range scope.Names() { - if !ast.IsExported(name) { - continue - } - if trace { - p.tracef("\n") - } - p.obj(scope.Lookup(name)) - objcount++ - } - - // indicate end of list - if trace { - p.tracef("\n") - } - p.tag(endTag) - - // for self-verification only (redundant) - p.int(objcount) - - if trace { - p.tracef("\n") - } - - // --- end of export data --- - - return p.out.Bytes(), nil -} - -func (p *exporter) pkg(pkg *types.Package, emptypath bool) { - if pkg == nil { - panic(internalError("unexpected nil pkg")) - } - - // if we saw the package before, write its index (>= 0) - if i, ok := p.pkgIndex[pkg]; ok { - p.index('P', i) - return - } - - // otherwise, remember the package, write the package tag (< 0) and package data - if trace { - p.tracef("P%d = { ", len(p.pkgIndex)) - defer p.tracef("} ") - } - p.pkgIndex[pkg] = len(p.pkgIndex) - - p.tag(packageTag) - p.string(pkg.Name()) - if emptypath { - p.string("") - } else { - p.string(pkg.Path()) - } -} - -func (p *exporter) obj(obj types.Object) { - switch obj := obj.(type) { - case *types.Const: - p.tag(constTag) - p.pos(obj) - p.qualifiedName(obj) - p.typ(obj.Type()) - p.value(obj.Val()) - - case *types.TypeName: - if obj.IsAlias() { - p.tag(aliasTag) - p.pos(obj) - p.qualifiedName(obj) - } else { - p.tag(typeTag) - } - p.typ(obj.Type()) - - case *types.Var: - p.tag(varTag) - p.pos(obj) - p.qualifiedName(obj) - p.typ(obj.Type()) - - case *types.Func: - p.tag(funcTag) - p.pos(obj) - p.qualifiedName(obj) - sig := obj.Type().(*types.Signature) - p.paramList(sig.Params(), sig.Variadic()) - p.paramList(sig.Results(), false) - - default: - panic(internalErrorf("unexpected object %v (%T)", obj, obj)) - } -} - -func (p *exporter) pos(obj types.Object) { - if !p.posInfoFormat { - return - } - - file, line := p.fileLine(obj) - if file == p.prevFile { - // common case: write line delta - // delta == 0 means different file or no line change - delta := line - p.prevLine - p.int(delta) - if delta == 0 { - p.int(-1) // -1 means no file change - } - } else { - // different file - p.int(0) - // Encode filename as length of common prefix with previous - // filename, followed by (possibly empty) suffix. Filenames - // frequently share path prefixes, so this can save a lot - // of space and make export data size less dependent on file - // path length. The suffix is unlikely to be empty because - // file names tend to end in ".go". - n := commonPrefixLen(p.prevFile, file) - p.int(n) // n >= 0 - p.string(file[n:]) // write suffix only - p.prevFile = file - p.int(line) - } - p.prevLine = line -} - -func (p *exporter) fileLine(obj types.Object) (file string, line int) { - if p.fset != nil { - pos := p.fset.Position(obj.Pos()) - file = pos.Filename - line = pos.Line - } - return -} - -func commonPrefixLen(a, b string) int { - if len(a) > len(b) { - a, b = b, a - } - // len(a) <= len(b) - i := 0 - for i < len(a) && a[i] == b[i] { - i++ - } - return i -} - -func (p *exporter) qualifiedName(obj types.Object) { - p.string(obj.Name()) - p.pkg(obj.Pkg(), false) -} - -func (p *exporter) typ(t types.Type) { - if t == nil { - panic(internalError("nil type")) - } - - // Possible optimization: Anonymous pointer types *T where - // T is a named type are common. We could canonicalize all - // such types *T to a single type PT = *T. This would lead - // to at most one *T entry in typIndex, and all future *T's - // would be encoded as the respective index directly. Would - // save 1 byte (pointerTag) per *T and reduce the typIndex - // size (at the cost of a canonicalization map). We can do - // this later, without encoding format change. - - // if we saw the type before, write its index (>= 0) - if i, ok := p.typIndex[t]; ok { - p.index('T', i) - return - } - - // otherwise, remember the type, write the type tag (< 0) and type data - if trackAllTypes { - if trace { - p.tracef("T%d = {>\n", len(p.typIndex)) - defer p.tracef("<\n} ") - } - p.typIndex[t] = len(p.typIndex) - } - - switch t := t.(type) { - case *types.Named: - if !trackAllTypes { - // if we don't track all types, track named types now - p.typIndex[t] = len(p.typIndex) - } - - p.tag(namedTag) - p.pos(t.Obj()) - p.qualifiedName(t.Obj()) - p.typ(t.Underlying()) - if !types.IsInterface(t) { - p.assocMethods(t) - } - - case *types.Array: - p.tag(arrayTag) - p.int64(t.Len()) - p.typ(t.Elem()) - - case *types.Slice: - p.tag(sliceTag) - p.typ(t.Elem()) - - case *dddSlice: - p.tag(dddTag) - p.typ(t.elem) - - case *types.Struct: - p.tag(structTag) - p.fieldList(t) - - case *types.Pointer: - p.tag(pointerTag) - p.typ(t.Elem()) - - case *types.Signature: - p.tag(signatureTag) - p.paramList(t.Params(), t.Variadic()) - p.paramList(t.Results(), false) - - case *types.Interface: - p.tag(interfaceTag) - p.iface(t) - - case *types.Map: - p.tag(mapTag) - p.typ(t.Key()) - p.typ(t.Elem()) - - case *types.Chan: - p.tag(chanTag) - p.int(int(3 - t.Dir())) // hack - p.typ(t.Elem()) - - default: - panic(internalErrorf("unexpected type %T: %s", t, t)) - } -} - -func (p *exporter) assocMethods(named *types.Named) { - // Sort methods (for determinism). - var methods []*types.Func - for i := 0; i < named.NumMethods(); i++ { - methods = append(methods, named.Method(i)) - } - sort.Sort(methodsByName(methods)) - - p.int(len(methods)) - - if trace && methods != nil { - p.tracef("associated methods {>\n") - } - - for i, m := range methods { - if trace && i > 0 { - p.tracef("\n") - } - - p.pos(m) - name := m.Name() - p.string(name) - if !exported(name) { - p.pkg(m.Pkg(), false) - } - - sig := m.Type().(*types.Signature) - p.paramList(types.NewTuple(sig.Recv()), false) - p.paramList(sig.Params(), sig.Variadic()) - p.paramList(sig.Results(), false) - p.int(0) // dummy value for go:nointerface pragma - ignored by importer - } - - if trace && methods != nil { - p.tracef("<\n} ") - } -} - -type methodsByName []*types.Func - -func (x methodsByName) Len() int { return len(x) } -func (x methodsByName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } -func (x methodsByName) Less(i, j int) bool { return x[i].Name() < x[j].Name() } - -func (p *exporter) fieldList(t *types.Struct) { - if trace && t.NumFields() > 0 { - p.tracef("fields {>\n") - defer p.tracef("<\n} ") - } - - p.int(t.NumFields()) - for i := 0; i < t.NumFields(); i++ { - if trace && i > 0 { - p.tracef("\n") - } - p.field(t.Field(i)) - p.string(t.Tag(i)) - } -} - -func (p *exporter) field(f *types.Var) { - if !f.IsField() { - panic(internalError("field expected")) - } - - p.pos(f) - p.fieldName(f) - p.typ(f.Type()) -} - -func (p *exporter) iface(t *types.Interface) { - // TODO(gri): enable importer to load embedded interfaces, - // then emit Embeddeds and ExplicitMethods separately here. - p.int(0) - - n := t.NumMethods() - if trace && n > 0 { - p.tracef("methods {>\n") - defer p.tracef("<\n} ") - } - p.int(n) - for i := 0; i < n; i++ { - if trace && i > 0 { - p.tracef("\n") - } - p.method(t.Method(i)) - } -} - -func (p *exporter) method(m *types.Func) { - sig := m.Type().(*types.Signature) - if sig.Recv() == nil { - panic(internalError("method expected")) - } - - p.pos(m) - p.string(m.Name()) - if m.Name() != "_" && !ast.IsExported(m.Name()) { - p.pkg(m.Pkg(), false) - } - - // interface method; no need to encode receiver. - p.paramList(sig.Params(), sig.Variadic()) - p.paramList(sig.Results(), false) -} - -func (p *exporter) fieldName(f *types.Var) { - name := f.Name() - - if f.Anonymous() { - // anonymous field - we distinguish between 3 cases: - // 1) field name matches base type name and is exported - // 2) field name matches base type name and is not exported - // 3) field name doesn't match base type name (alias name) - bname := basetypeName(f.Type()) - if name == bname { - if ast.IsExported(name) { - name = "" // 1) we don't need to know the field name or package - } else { - name = "?" // 2) use unexported name "?" to force package export - } - } else { - // 3) indicate alias and export name as is - // (this requires an extra "@" but this is a rare case) - p.string("@") - } - } - - p.string(name) - if name != "" && !ast.IsExported(name) { - p.pkg(f.Pkg(), false) - } -} - -func basetypeName(typ types.Type) string { - switch typ := deref(typ).(type) { - case *types.Basic: - return typ.Name() - case *types.Named: - return typ.Obj().Name() - default: - return "" // unnamed type - } -} - -func (p *exporter) paramList(params *types.Tuple, variadic bool) { - // use negative length to indicate unnamed parameters - // (look at the first parameter only since either all - // names are present or all are absent) - n := params.Len() - if n > 0 && params.At(0).Name() == "" { - n = -n - } - p.int(n) - for i := 0; i < params.Len(); i++ { - q := params.At(i) - t := q.Type() - if variadic && i == params.Len()-1 { - t = &dddSlice{t.(*types.Slice).Elem()} - } - p.typ(t) - if n > 0 { - name := q.Name() - p.string(name) - if name != "_" { - p.pkg(q.Pkg(), false) - } - } - p.string("") // no compiler-specific info - } -} - -func (p *exporter) value(x constant.Value) { - if trace { - p.tracef("= ") - } - - switch x.Kind() { - case constant.Bool: - tag := falseTag - if constant.BoolVal(x) { - tag = trueTag - } - p.tag(tag) - - case constant.Int: - if v, exact := constant.Int64Val(x); exact { - // common case: x fits into an int64 - use compact encoding - p.tag(int64Tag) - p.int64(v) - return - } - // uncommon case: large x - use float encoding - // (powers of 2 will be encoded efficiently with exponent) - p.tag(floatTag) - p.float(constant.ToFloat(x)) - - case constant.Float: - p.tag(floatTag) - p.float(x) - - case constant.Complex: - p.tag(complexTag) - p.float(constant.Real(x)) - p.float(constant.Imag(x)) - - case constant.String: - p.tag(stringTag) - p.string(constant.StringVal(x)) - - case constant.Unknown: - // package contains type errors - p.tag(unknownTag) - - default: - panic(internalErrorf("unexpected value %v (%T)", x, x)) - } -} - -func (p *exporter) float(x constant.Value) { - if x.Kind() != constant.Float { - panic(internalErrorf("unexpected constant %v, want float", x)) - } - // extract sign (there is no -0) - sign := constant.Sign(x) - if sign == 0 { - // x == 0 - p.int(0) - return - } - // x != 0 - - var f big.Float - if v, exact := constant.Float64Val(x); exact { - // float64 - f.SetFloat64(v) - } else if num, denom := constant.Num(x), constant.Denom(x); num.Kind() == constant.Int { - // TODO(gri): add big.Rat accessor to constant.Value. - r := valueToRat(num) - f.SetRat(r.Quo(r, valueToRat(denom))) - } else { - // Value too large to represent as a fraction => inaccessible. - // TODO(gri): add big.Float accessor to constant.Value. - f.SetFloat64(math.MaxFloat64) // FIXME - } - - // extract exponent such that 0.5 <= m < 1.0 - var m big.Float - exp := f.MantExp(&m) - - // extract mantissa as *big.Int - // - set exponent large enough so mant satisfies mant.IsInt() - // - get *big.Int from mant - m.SetMantExp(&m, int(m.MinPrec())) - mant, acc := m.Int(nil) - if acc != big.Exact { - panic(internalError("internal error")) - } - - p.int(sign) - p.int(exp) - p.string(string(mant.Bytes())) -} - -func valueToRat(x constant.Value) *big.Rat { - // Convert little-endian to big-endian. - // I can't believe this is necessary. - bytes := constant.Bytes(x) - for i := 0; i < len(bytes)/2; i++ { - bytes[i], bytes[len(bytes)-1-i] = bytes[len(bytes)-1-i], bytes[i] - } - return new(big.Rat).SetInt(new(big.Int).SetBytes(bytes)) -} - -func (p *exporter) bool(b bool) bool { - if trace { - p.tracef("[") - defer p.tracef("= %v] ", b) - } - - x := 0 - if b { - x = 1 - } - p.int(x) - return b -} - -// ---------------------------------------------------------------------------- -// Low-level encoders - -func (p *exporter) index(marker byte, index int) { - if index < 0 { - panic(internalError("invalid index < 0")) - } - if debugFormat { - p.marker('t') - } - if trace { - p.tracef("%c%d ", marker, index) - } - p.rawInt64(int64(index)) -} - -func (p *exporter) tag(tag int) { - if tag >= 0 { - panic(internalError("invalid tag >= 0")) - } - if debugFormat { - p.marker('t') - } - if trace { - p.tracef("%s ", tagString[-tag]) - } - p.rawInt64(int64(tag)) -} - -func (p *exporter) int(x int) { - p.int64(int64(x)) -} - -func (p *exporter) int64(x int64) { - if debugFormat { - p.marker('i') - } - if trace { - p.tracef("%d ", x) - } - p.rawInt64(x) -} - -func (p *exporter) string(s string) { - if debugFormat { - p.marker('s') - } - if trace { - p.tracef("%q ", s) - } - // if we saw the string before, write its index (>= 0) - // (the empty string is mapped to 0) - if i, ok := p.strIndex[s]; ok { - p.rawInt64(int64(i)) - return - } - // otherwise, remember string and write its negative length and bytes - p.strIndex[s] = len(p.strIndex) - p.rawInt64(-int64(len(s))) - for i := 0; i < len(s); i++ { - p.rawByte(s[i]) - } -} - -// marker emits a marker byte and position information which makes -// it easy for a reader to detect if it is "out of sync". Used for -// debugFormat format only. -func (p *exporter) marker(m byte) { - p.rawByte(m) - // Enable this for help tracking down the location - // of an incorrect marker when running in debugFormat. - if false && trace { - p.tracef("#%d ", p.written) - } - p.rawInt64(int64(p.written)) -} - -// rawInt64 should only be used by low-level encoders. -func (p *exporter) rawInt64(x int64) { - var tmp [binary.MaxVarintLen64]byte - n := binary.PutVarint(tmp[:], x) - for i := 0; i < n; i++ { - p.rawByte(tmp[i]) - } -} - -// rawStringln should only be used to emit the initial version string. -func (p *exporter) rawStringln(s string) { - for i := 0; i < len(s); i++ { - p.rawByte(s[i]) - } - p.rawByte('\n') -} - -// rawByte is the bottleneck interface to write to p.out. -// rawByte escapes b as follows (any encoding does that -// hides '$'): -// -// '$' => '|' 'S' -// '|' => '|' '|' -// -// Necessary so other tools can find the end of the -// export data by searching for "$$". -// rawByte should only be used by low-level encoders. -func (p *exporter) rawByte(b byte) { - switch b { - case '$': - // write '$' as '|' 'S' - b = 'S' - fallthrough - case '|': - // write '|' as '|' '|' - p.out.WriteByte('|') - p.written++ - } - p.out.WriteByte(b) - p.written++ -} - -// tracef is like fmt.Printf but it rewrites the format string -// to take care of indentation. -func (p *exporter) tracef(format string, args ...interface{}) { - if strings.ContainsAny(format, "<>\n") { - var buf bytes.Buffer - for i := 0; i < len(format); i++ { - // no need to deal with runes - ch := format[i] - switch ch { - case '>': - p.indent++ - continue - case '<': - p.indent-- - continue - } - buf.WriteByte(ch) - if ch == '\n' { - for j := p.indent; j > 0; j-- { - buf.WriteString(". ") - } - } - } - format = buf.String() - } - fmt.Printf(format, args...) -} - -// Debugging support. -// (tagString is only used when tracing is enabled) -var tagString = [...]string{ - // Packages - -packageTag: "package", - - // Types - -namedTag: "named type", - -arrayTag: "array", - -sliceTag: "slice", - -dddTag: "ddd", - -structTag: "struct", - -pointerTag: "pointer", - -signatureTag: "signature", - -interfaceTag: "interface", - -mapTag: "map", - -chanTag: "chan", - - // Values - -falseTag: "false", - -trueTag: "true", - -int64Tag: "int64", - -floatTag: "float", - -fractionTag: "fraction", - -complexTag: "complex", - -stringTag: "string", - -unknownTag: "unknown", - - // Type aliases - -aliasTag: "alias", -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go deleted file mode 100644 index e9f73d14a18..00000000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go +++ /dev/null @@ -1,1039 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file is a copy of $GOROOT/src/go/internal/gcimporter/bimport.go. - -package gcimporter - -import ( - "encoding/binary" - "fmt" - "go/constant" - "go/token" - "go/types" - "sort" - "strconv" - "strings" - "sync" - "unicode" - "unicode/utf8" -) - -type importer struct { - imports map[string]*types.Package - data []byte - importpath string - buf []byte // for reading strings - version int // export format version - - // object lists - strList []string // in order of appearance - pathList []string // in order of appearance - pkgList []*types.Package // in order of appearance - typList []types.Type // in order of appearance - interfaceList []*types.Interface // for delayed completion only - trackAllTypes bool - - // position encoding - posInfoFormat bool - prevFile string - prevLine int - fake fakeFileSet - - // debugging support - debugFormat bool - read int // bytes read -} - -// BImportData imports a package from the serialized package data -// and returns the number of bytes consumed and a reference to the package. -// If the export data version is not recognized or the format is otherwise -// compromised, an error is returned. -func BImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { - // catch panics and return them as errors - const currentVersion = 6 - version := -1 // unknown version - defer func() { - if e := recover(); e != nil { - // Return a (possibly nil or incomplete) package unchanged (see #16088). - if version > currentVersion { - err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e) - } else { - err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e) - } - } - }() - - p := importer{ - imports: imports, - data: data, - importpath: path, - version: version, - strList: []string{""}, // empty string is mapped to 0 - pathList: []string{""}, // empty string is mapped to 0 - fake: fakeFileSet{ - fset: fset, - files: make(map[string]*token.File), - }, - } - - // read version info - var versionstr string - if b := p.rawByte(); b == 'c' || b == 'd' { - // Go1.7 encoding; first byte encodes low-level - // encoding format (compact vs debug). - // For backward-compatibility only (avoid problems with - // old installed packages). Newly compiled packages use - // the extensible format string. - // TODO(gri) Remove this support eventually; after Go1.8. - if b == 'd' { - p.debugFormat = true - } - p.trackAllTypes = p.rawByte() == 'a' - p.posInfoFormat = p.int() != 0 - versionstr = p.string() - if versionstr == "v1" { - version = 0 - } - } else { - // Go1.8 extensible encoding - // read version string and extract version number (ignore anything after the version number) - versionstr = p.rawStringln(b) - if s := strings.SplitN(versionstr, " ", 3); len(s) >= 2 && s[0] == "version" { - if v, err := strconv.Atoi(s[1]); err == nil && v > 0 { - version = v - } - } - } - p.version = version - - // read version specific flags - extend as necessary - switch p.version { - // case currentVersion: - // ... - // fallthrough - case currentVersion, 5, 4, 3, 2, 1: - p.debugFormat = p.rawStringln(p.rawByte()) == "debug" - p.trackAllTypes = p.int() != 0 - p.posInfoFormat = p.int() != 0 - case 0: - // Go1.7 encoding format - nothing to do here - default: - errorf("unknown bexport format version %d (%q)", p.version, versionstr) - } - - // --- generic export data --- - - // populate typList with predeclared "known" types - p.typList = append(p.typList, predeclared()...) - - // read package data - pkg = p.pkg() - - // read objects of phase 1 only (see cmd/compile/internal/gc/bexport.go) - objcount := 0 - for { - tag := p.tagOrIndex() - if tag == endTag { - break - } - p.obj(tag) - objcount++ - } - - // self-verification - if count := p.int(); count != objcount { - errorf("got %d objects; want %d", objcount, count) - } - - // ignore compiler-specific import data - - // complete interfaces - // TODO(gri) re-investigate if we still need to do this in a delayed fashion - for _, typ := range p.interfaceList { - typ.Complete() - } - - // record all referenced packages as imports - list := append(([]*types.Package)(nil), p.pkgList[1:]...) - sort.Sort(byPath(list)) - pkg.SetImports(list) - - // package was imported completely and without errors - pkg.MarkComplete() - - return p.read, pkg, nil -} - -func errorf(format string, args ...interface{}) { - panic(fmt.Sprintf(format, args...)) -} - -func (p *importer) pkg() *types.Package { - // if the package was seen before, i is its index (>= 0) - i := p.tagOrIndex() - if i >= 0 { - return p.pkgList[i] - } - - // otherwise, i is the package tag (< 0) - if i != packageTag { - errorf("unexpected package tag %d version %d", i, p.version) - } - - // read package data - name := p.string() - var path string - if p.version >= 5 { - path = p.path() - } else { - path = p.string() - } - if p.version >= 6 { - p.int() // package height; unused by go/types - } - - // we should never see an empty package name - if name == "" { - errorf("empty package name in import") - } - - // an empty path denotes the package we are currently importing; - // it must be the first package we see - if (path == "") != (len(p.pkgList) == 0) { - errorf("package path %q for pkg index %d", path, len(p.pkgList)) - } - - // if the package was imported before, use that one; otherwise create a new one - if path == "" { - path = p.importpath - } - pkg := p.imports[path] - if pkg == nil { - pkg = types.NewPackage(path, name) - p.imports[path] = pkg - } else if pkg.Name() != name { - errorf("conflicting names %s and %s for package %q", pkg.Name(), name, path) - } - p.pkgList = append(p.pkgList, pkg) - - return pkg -} - -// objTag returns the tag value for each object kind. -func objTag(obj types.Object) int { - switch obj.(type) { - case *types.Const: - return constTag - case *types.TypeName: - return typeTag - case *types.Var: - return varTag - case *types.Func: - return funcTag - default: - errorf("unexpected object: %v (%T)", obj, obj) // panics - panic("unreachable") - } -} - -func sameObj(a, b types.Object) bool { - // Because unnamed types are not canonicalized, we cannot simply compare types for - // (pointer) identity. - // Ideally we'd check equality of constant values as well, but this is good enough. - return objTag(a) == objTag(b) && types.Identical(a.Type(), b.Type()) -} - -func (p *importer) declare(obj types.Object) { - pkg := obj.Pkg() - if alt := pkg.Scope().Insert(obj); alt != nil { - // This can only trigger if we import a (non-type) object a second time. - // Excluding type aliases, this cannot happen because 1) we only import a package - // once; and b) we ignore compiler-specific export data which may contain - // functions whose inlined function bodies refer to other functions that - // were already imported. - // However, type aliases require reexporting the original type, so we need - // to allow it (see also the comment in cmd/compile/internal/gc/bimport.go, - // method importer.obj, switch case importing functions). - // TODO(gri) review/update this comment once the gc compiler handles type aliases. - if !sameObj(obj, alt) { - errorf("inconsistent import:\n\t%v\npreviously imported as:\n\t%v\n", obj, alt) - } - } -} - -func (p *importer) obj(tag int) { - switch tag { - case constTag: - pos := p.pos() - pkg, name := p.qualifiedName() - typ := p.typ(nil, nil) - val := p.value() - p.declare(types.NewConst(pos, pkg, name, typ, val)) - - case aliasTag: - // TODO(gri) verify type alias hookup is correct - pos := p.pos() - pkg, name := p.qualifiedName() - typ := p.typ(nil, nil) - p.declare(types.NewTypeName(pos, pkg, name, typ)) - - case typeTag: - p.typ(nil, nil) - - case varTag: - pos := p.pos() - pkg, name := p.qualifiedName() - typ := p.typ(nil, nil) - p.declare(types.NewVar(pos, pkg, name, typ)) - - case funcTag: - pos := p.pos() - pkg, name := p.qualifiedName() - params, isddd := p.paramList() - result, _ := p.paramList() - sig := types.NewSignature(nil, params, result, isddd) - p.declare(types.NewFunc(pos, pkg, name, sig)) - - default: - errorf("unexpected object tag %d", tag) - } -} - -const deltaNewFile = -64 // see cmd/compile/internal/gc/bexport.go - -func (p *importer) pos() token.Pos { - if !p.posInfoFormat { - return token.NoPos - } - - file := p.prevFile - line := p.prevLine - delta := p.int() - line += delta - if p.version >= 5 { - if delta == deltaNewFile { - if n := p.int(); n >= 0 { - // file changed - file = p.path() - line = n - } - } - } else { - if delta == 0 { - if n := p.int(); n >= 0 { - // file changed - file = p.prevFile[:n] + p.string() - line = p.int() - } - } - } - p.prevFile = file - p.prevLine = line - - return p.fake.pos(file, line, 0) -} - -// Synthesize a token.Pos -type fakeFileSet struct { - fset *token.FileSet - files map[string]*token.File -} - -func (s *fakeFileSet) pos(file string, line, column int) token.Pos { - // TODO(mdempsky): Make use of column. - - // Since we don't know the set of needed file positions, we - // reserve maxlines positions per file. - const maxlines = 64 * 1024 - f := s.files[file] - if f == nil { - f = s.fset.AddFile(file, -1, maxlines) - s.files[file] = f - // Allocate the fake linebreak indices on first use. - // TODO(adonovan): opt: save ~512KB using a more complex scheme? - fakeLinesOnce.Do(func() { - fakeLines = make([]int, maxlines) - for i := range fakeLines { - fakeLines[i] = i - } - }) - f.SetLines(fakeLines) - } - - if line > maxlines { - line = 1 - } - - // Treat the file as if it contained only newlines - // and column=1: use the line number as the offset. - return f.Pos(line - 1) -} - -var ( - fakeLines []int - fakeLinesOnce sync.Once -) - -func (p *importer) qualifiedName() (pkg *types.Package, name string) { - name = p.string() - pkg = p.pkg() - return -} - -func (p *importer) record(t types.Type) { - p.typList = append(p.typList, t) -} - -// A dddSlice is a types.Type representing ...T parameters. -// It only appears for parameter types and does not escape -// the importer. -type dddSlice struct { - elem types.Type -} - -func (t *dddSlice) Underlying() types.Type { return t } -func (t *dddSlice) String() string { return "..." + t.elem.String() } - -// parent is the package which declared the type; parent == nil means -// the package currently imported. The parent package is needed for -// exported struct fields and interface methods which don't contain -// explicit package information in the export data. -// -// A non-nil tname is used as the "owner" of the result type; i.e., -// the result type is the underlying type of tname. tname is used -// to give interface methods a named receiver type where possible. -func (p *importer) typ(parent *types.Package, tname *types.Named) types.Type { - // if the type was seen before, i is its index (>= 0) - i := p.tagOrIndex() - if i >= 0 { - return p.typList[i] - } - - // otherwise, i is the type tag (< 0) - switch i { - case namedTag: - // read type object - pos := p.pos() - parent, name := p.qualifiedName() - scope := parent.Scope() - obj := scope.Lookup(name) - - // if the object doesn't exist yet, create and insert it - if obj == nil { - obj = types.NewTypeName(pos, parent, name, nil) - scope.Insert(obj) - } - - if _, ok := obj.(*types.TypeName); !ok { - errorf("pkg = %s, name = %s => %s", parent, name, obj) - } - - // associate new named type with obj if it doesn't exist yet - t0 := types.NewNamed(obj.(*types.TypeName), nil, nil) - - // but record the existing type, if any - tname := obj.Type().(*types.Named) // tname is either t0 or the existing type - p.record(tname) - - // read underlying type - t0.SetUnderlying(p.typ(parent, t0)) - - // interfaces don't have associated methods - if types.IsInterface(t0) { - return tname - } - - // read associated methods - for i := p.int(); i > 0; i-- { - // TODO(gri) replace this with something closer to fieldName - pos := p.pos() - name := p.string() - if !exported(name) { - p.pkg() - } - - recv, _ := p.paramList() // TODO(gri) do we need a full param list for the receiver? - params, isddd := p.paramList() - result, _ := p.paramList() - p.int() // go:nointerface pragma - discarded - - sig := types.NewSignature(recv.At(0), params, result, isddd) - t0.AddMethod(types.NewFunc(pos, parent, name, sig)) - } - - return tname - - case arrayTag: - t := new(types.Array) - if p.trackAllTypes { - p.record(t) - } - - n := p.int64() - *t = *types.NewArray(p.typ(parent, nil), n) - return t - - case sliceTag: - t := new(types.Slice) - if p.trackAllTypes { - p.record(t) - } - - *t = *types.NewSlice(p.typ(parent, nil)) - return t - - case dddTag: - t := new(dddSlice) - if p.trackAllTypes { - p.record(t) - } - - t.elem = p.typ(parent, nil) - return t - - case structTag: - t := new(types.Struct) - if p.trackAllTypes { - p.record(t) - } - - *t = *types.NewStruct(p.fieldList(parent)) - return t - - case pointerTag: - t := new(types.Pointer) - if p.trackAllTypes { - p.record(t) - } - - *t = *types.NewPointer(p.typ(parent, nil)) - return t - - case signatureTag: - t := new(types.Signature) - if p.trackAllTypes { - p.record(t) - } - - params, isddd := p.paramList() - result, _ := p.paramList() - *t = *types.NewSignature(nil, params, result, isddd) - return t - - case interfaceTag: - // Create a dummy entry in the type list. This is safe because we - // cannot expect the interface type to appear in a cycle, as any - // such cycle must contain a named type which would have been - // first defined earlier. - // TODO(gri) Is this still true now that we have type aliases? - // See issue #23225. - n := len(p.typList) - if p.trackAllTypes { - p.record(nil) - } - - var embeddeds []types.Type - for n := p.int(); n > 0; n-- { - p.pos() - embeddeds = append(embeddeds, p.typ(parent, nil)) - } - - t := newInterface(p.methodList(parent, tname), embeddeds) - p.interfaceList = append(p.interfaceList, t) - if p.trackAllTypes { - p.typList[n] = t - } - return t - - case mapTag: - t := new(types.Map) - if p.trackAllTypes { - p.record(t) - } - - key := p.typ(parent, nil) - val := p.typ(parent, nil) - *t = *types.NewMap(key, val) - return t - - case chanTag: - t := new(types.Chan) - if p.trackAllTypes { - p.record(t) - } - - dir := chanDir(p.int()) - val := p.typ(parent, nil) - *t = *types.NewChan(dir, val) - return t - - default: - errorf("unexpected type tag %d", i) // panics - panic("unreachable") - } -} - -func chanDir(d int) types.ChanDir { - // tag values must match the constants in cmd/compile/internal/gc/go.go - switch d { - case 1 /* Crecv */ : - return types.RecvOnly - case 2 /* Csend */ : - return types.SendOnly - case 3 /* Cboth */ : - return types.SendRecv - default: - errorf("unexpected channel dir %d", d) - return 0 - } -} - -func (p *importer) fieldList(parent *types.Package) (fields []*types.Var, tags []string) { - if n := p.int(); n > 0 { - fields = make([]*types.Var, n) - tags = make([]string, n) - for i := range fields { - fields[i], tags[i] = p.field(parent) - } - } - return -} - -func (p *importer) field(parent *types.Package) (*types.Var, string) { - pos := p.pos() - pkg, name, alias := p.fieldName(parent) - typ := p.typ(parent, nil) - tag := p.string() - - anonymous := false - if name == "" { - // anonymous field - typ must be T or *T and T must be a type name - switch typ := deref(typ).(type) { - case *types.Basic: // basic types are named types - pkg = nil // // objects defined in Universe scope have no package - name = typ.Name() - case *types.Named: - name = typ.Obj().Name() - default: - errorf("named base type expected") - } - anonymous = true - } else if alias { - // anonymous field: we have an explicit name because it's an alias - anonymous = true - } - - return types.NewField(pos, pkg, name, typ, anonymous), tag -} - -func (p *importer) methodList(parent *types.Package, baseType *types.Named) (methods []*types.Func) { - if n := p.int(); n > 0 { - methods = make([]*types.Func, n) - for i := range methods { - methods[i] = p.method(parent, baseType) - } - } - return -} - -func (p *importer) method(parent *types.Package, baseType *types.Named) *types.Func { - pos := p.pos() - pkg, name, _ := p.fieldName(parent) - // If we don't have a baseType, use a nil receiver. - // A receiver using the actual interface type (which - // we don't know yet) will be filled in when we call - // types.Interface.Complete. - var recv *types.Var - if baseType != nil { - recv = types.NewVar(token.NoPos, parent, "", baseType) - } - params, isddd := p.paramList() - result, _ := p.paramList() - sig := types.NewSignature(recv, params, result, isddd) - return types.NewFunc(pos, pkg, name, sig) -} - -func (p *importer) fieldName(parent *types.Package) (pkg *types.Package, name string, alias bool) { - name = p.string() - pkg = parent - if pkg == nil { - // use the imported package instead - pkg = p.pkgList[0] - } - if p.version == 0 && name == "_" { - // version 0 didn't export a package for _ fields - return - } - switch name { - case "": - // 1) field name matches base type name and is exported: nothing to do - case "?": - // 2) field name matches base type name and is not exported: need package - name = "" - pkg = p.pkg() - case "@": - // 3) field name doesn't match type name (alias) - name = p.string() - alias = true - fallthrough - default: - if !exported(name) { - pkg = p.pkg() - } - } - return -} - -func (p *importer) paramList() (*types.Tuple, bool) { - n := p.int() - if n == 0 { - return nil, false - } - // negative length indicates unnamed parameters - named := true - if n < 0 { - n = -n - named = false - } - // n > 0 - params := make([]*types.Var, n) - isddd := false - for i := range params { - params[i], isddd = p.param(named) - } - return types.NewTuple(params...), isddd -} - -func (p *importer) param(named bool) (*types.Var, bool) { - t := p.typ(nil, nil) - td, isddd := t.(*dddSlice) - if isddd { - t = types.NewSlice(td.elem) - } - - var pkg *types.Package - var name string - if named { - name = p.string() - if name == "" { - errorf("expected named parameter") - } - if name != "_" { - pkg = p.pkg() - } - if i := strings.Index(name, "·"); i > 0 { - name = name[:i] // cut off gc-specific parameter numbering - } - } - - // read and discard compiler-specific info - p.string() - - return types.NewVar(token.NoPos, pkg, name, t), isddd -} - -func exported(name string) bool { - ch, _ := utf8.DecodeRuneInString(name) - return unicode.IsUpper(ch) -} - -func (p *importer) value() constant.Value { - switch tag := p.tagOrIndex(); tag { - case falseTag: - return constant.MakeBool(false) - case trueTag: - return constant.MakeBool(true) - case int64Tag: - return constant.MakeInt64(p.int64()) - case floatTag: - return p.float() - case complexTag: - re := p.float() - im := p.float() - return constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) - case stringTag: - return constant.MakeString(p.string()) - case unknownTag: - return constant.MakeUnknown() - default: - errorf("unexpected value tag %d", tag) // panics - panic("unreachable") - } -} - -func (p *importer) float() constant.Value { - sign := p.int() - if sign == 0 { - return constant.MakeInt64(0) - } - - exp := p.int() - mant := []byte(p.string()) // big endian - - // remove leading 0's if any - for len(mant) > 0 && mant[0] == 0 { - mant = mant[1:] - } - - // convert to little endian - // TODO(gri) go/constant should have a more direct conversion function - // (e.g., once it supports a big.Float based implementation) - for i, j := 0, len(mant)-1; i < j; i, j = i+1, j-1 { - mant[i], mant[j] = mant[j], mant[i] - } - - // adjust exponent (constant.MakeFromBytes creates an integer value, - // but mant represents the mantissa bits such that 0.5 <= mant < 1.0) - exp -= len(mant) << 3 - if len(mant) > 0 { - for msd := mant[len(mant)-1]; msd&0x80 == 0; msd <<= 1 { - exp++ - } - } - - x := constant.MakeFromBytes(mant) - switch { - case exp < 0: - d := constant.Shift(constant.MakeInt64(1), token.SHL, uint(-exp)) - x = constant.BinaryOp(x, token.QUO, d) - case exp > 0: - x = constant.Shift(x, token.SHL, uint(exp)) - } - - if sign < 0 { - x = constant.UnaryOp(token.SUB, x, 0) - } - return x -} - -// ---------------------------------------------------------------------------- -// Low-level decoders - -func (p *importer) tagOrIndex() int { - if p.debugFormat { - p.marker('t') - } - - return int(p.rawInt64()) -} - -func (p *importer) int() int { - x := p.int64() - if int64(int(x)) != x { - errorf("exported integer too large") - } - return int(x) -} - -func (p *importer) int64() int64 { - if p.debugFormat { - p.marker('i') - } - - return p.rawInt64() -} - -func (p *importer) path() string { - if p.debugFormat { - p.marker('p') - } - // if the path was seen before, i is its index (>= 0) - // (the empty string is at index 0) - i := p.rawInt64() - if i >= 0 { - return p.pathList[i] - } - // otherwise, i is the negative path length (< 0) - a := make([]string, -i) - for n := range a { - a[n] = p.string() - } - s := strings.Join(a, "/") - p.pathList = append(p.pathList, s) - return s -} - -func (p *importer) string() string { - if p.debugFormat { - p.marker('s') - } - // if the string was seen before, i is its index (>= 0) - // (the empty string is at index 0) - i := p.rawInt64() - if i >= 0 { - return p.strList[i] - } - // otherwise, i is the negative string length (< 0) - if n := int(-i); n <= cap(p.buf) { - p.buf = p.buf[:n] - } else { - p.buf = make([]byte, n) - } - for i := range p.buf { - p.buf[i] = p.rawByte() - } - s := string(p.buf) - p.strList = append(p.strList, s) - return s -} - -func (p *importer) marker(want byte) { - if got := p.rawByte(); got != want { - errorf("incorrect marker: got %c; want %c (pos = %d)", got, want, p.read) - } - - pos := p.read - if n := int(p.rawInt64()); n != pos { - errorf("incorrect position: got %d; want %d", n, pos) - } -} - -// rawInt64 should only be used by low-level decoders. -func (p *importer) rawInt64() int64 { - i, err := binary.ReadVarint(p) - if err != nil { - errorf("read error: %v", err) - } - return i -} - -// rawStringln should only be used to read the initial version string. -func (p *importer) rawStringln(b byte) string { - p.buf = p.buf[:0] - for b != '\n' { - p.buf = append(p.buf, b) - b = p.rawByte() - } - return string(p.buf) -} - -// needed for binary.ReadVarint in rawInt64 -func (p *importer) ReadByte() (byte, error) { - return p.rawByte(), nil -} - -// byte is the bottleneck interface for reading p.data. -// It unescapes '|' 'S' to '$' and '|' '|' to '|'. -// rawByte should only be used by low-level decoders. -func (p *importer) rawByte() byte { - b := p.data[0] - r := 1 - if b == '|' { - b = p.data[1] - r = 2 - switch b { - case 'S': - b = '$' - case '|': - // nothing to do - default: - errorf("unexpected escape sequence in export data") - } - } - p.data = p.data[r:] - p.read += r - return b - -} - -// ---------------------------------------------------------------------------- -// Export format - -// Tags. Must be < 0. -const ( - // Objects - packageTag = -(iota + 1) - constTag - typeTag - varTag - funcTag - endTag - - // Types - namedTag - arrayTag - sliceTag - dddTag - structTag - pointerTag - signatureTag - interfaceTag - mapTag - chanTag - - // Values - falseTag - trueTag - int64Tag - floatTag - fractionTag // not used by gc - complexTag - stringTag - nilTag // only used by gc (appears in exported inlined function bodies) - unknownTag // not used by gc (only appears in packages with errors) - - // Type aliases - aliasTag -) - -var predeclOnce sync.Once -var predecl []types.Type // initialized lazily - -func predeclared() []types.Type { - predeclOnce.Do(func() { - // initialize lazily to be sure that all - // elements have been initialized before - predecl = []types.Type{ // basic types - types.Typ[types.Bool], - types.Typ[types.Int], - types.Typ[types.Int8], - types.Typ[types.Int16], - types.Typ[types.Int32], - types.Typ[types.Int64], - types.Typ[types.Uint], - types.Typ[types.Uint8], - types.Typ[types.Uint16], - types.Typ[types.Uint32], - types.Typ[types.Uint64], - types.Typ[types.Uintptr], - types.Typ[types.Float32], - types.Typ[types.Float64], - types.Typ[types.Complex64], - types.Typ[types.Complex128], - types.Typ[types.String], - - // basic type aliases - types.Universe.Lookup("byte").Type(), - types.Universe.Lookup("rune").Type(), - - // error - types.Universe.Lookup("error").Type(), - - // untyped types - types.Typ[types.UntypedBool], - types.Typ[types.UntypedInt], - types.Typ[types.UntypedRune], - types.Typ[types.UntypedFloat], - types.Typ[types.UntypedComplex], - types.Typ[types.UntypedString], - types.Typ[types.UntypedNil], - - // package unsafe - types.Typ[types.UnsafePointer], - - // invalid type - types.Typ[types.Invalid], // only appears in packages with errors - - // used internally by gc; never used by this package or in .a files - anyType{}, - } - }) - return predecl -} - -type anyType struct{} - -func (t anyType) Underlying() types.Type { return t } -func (t anyType) String() string { return "any" } diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go b/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go deleted file mode 100644 index f33dc5613e7..00000000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file is a copy of $GOROOT/src/go/internal/gcimporter/exportdata.go. - -// This file implements FindExportData. - -package gcimporter - -import ( - "bufio" - "fmt" - "io" - "strconv" - "strings" -) - -func readGopackHeader(r *bufio.Reader) (name string, size int, err error) { - // See $GOROOT/include/ar.h. - hdr := make([]byte, 16+12+6+6+8+10+2) - _, err = io.ReadFull(r, hdr) - if err != nil { - return - } - // leave for debugging - if false { - fmt.Printf("header: %s", hdr) - } - s := strings.TrimSpace(string(hdr[16+12+6+6+8:][:10])) - size, err = strconv.Atoi(s) - if err != nil || hdr[len(hdr)-2] != '`' || hdr[len(hdr)-1] != '\n' { - err = fmt.Errorf("invalid archive header") - return - } - name = strings.TrimSpace(string(hdr[:16])) - return -} - -// FindExportData positions the reader r at the beginning of the -// export data section of an underlying GC-created object/archive -// file by reading from it. The reader must be positioned at the -// start of the file before calling this function. The hdr result -// is the string before the export data, either "$$" or "$$B". -// -func FindExportData(r *bufio.Reader) (hdr string, err error) { - // Read first line to make sure this is an object file. - line, err := r.ReadSlice('\n') - if err != nil { - err = fmt.Errorf("can't find export data (%v)", err) - return - } - - if string(line) == "!\n" { - // Archive file. Scan to __.PKGDEF. - var name string - if name, _, err = readGopackHeader(r); err != nil { - return - } - - // First entry should be __.PKGDEF. - if name != "__.PKGDEF" { - err = fmt.Errorf("go archive is missing __.PKGDEF") - return - } - - // Read first line of __.PKGDEF data, so that line - // is once again the first line of the input. - if line, err = r.ReadSlice('\n'); err != nil { - err = fmt.Errorf("can't find export data (%v)", err) - return - } - } - - // Now at __.PKGDEF in archive or still at beginning of file. - // Either way, line should begin with "go object ". - if !strings.HasPrefix(string(line), "go object ") { - err = fmt.Errorf("not a Go object file") - return - } - - // Skip over object header to export data. - // Begins after first line starting with $$. - for line[0] != '$' { - if line, err = r.ReadSlice('\n'); err != nil { - err = fmt.Errorf("can't find export data (%v)", err) - return - } - } - hdr = string(line) - - return -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go deleted file mode 100644 index 9cf186605f6..00000000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go +++ /dev/null @@ -1,1078 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file is a modified copy of $GOROOT/src/go/internal/gcimporter/gcimporter.go, -// but it also contains the original source-based importer code for Go1.6. -// Once we stop supporting 1.6, we can remove that code. - -// Package gcimporter provides various functions for reading -// gc-generated object files that can be used to implement the -// Importer interface defined by the Go 1.5 standard library package. -package gcimporter // import "golang.org/x/tools/go/internal/gcimporter" - -import ( - "bufio" - "errors" - "fmt" - "go/build" - "go/constant" - "go/token" - "go/types" - "io" - "io/ioutil" - "os" - "path/filepath" - "sort" - "strconv" - "strings" - "text/scanner" -) - -// debugging/development support -const debug = false - -var pkgExts = [...]string{".a", ".o"} - -// FindPkg returns the filename and unique package id for an import -// path based on package information provided by build.Import (using -// the build.Default build.Context). A relative srcDir is interpreted -// relative to the current working directory. -// If no file was found, an empty filename is returned. -// -func FindPkg(path, srcDir string) (filename, id string) { - if path == "" { - return - } - - var noext string - switch { - default: - // "x" -> "$GOPATH/pkg/$GOOS_$GOARCH/x.ext", "x" - // Don't require the source files to be present. - if abs, err := filepath.Abs(srcDir); err == nil { // see issue 14282 - srcDir = abs - } - bp, _ := build.Import(path, srcDir, build.FindOnly|build.AllowBinary) - if bp.PkgObj == "" { - id = path // make sure we have an id to print in error message - return - } - noext = strings.TrimSuffix(bp.PkgObj, ".a") - id = bp.ImportPath - - case build.IsLocalImport(path): - // "./x" -> "/this/directory/x.ext", "/this/directory/x" - noext = filepath.Join(srcDir, path) - id = noext - - case filepath.IsAbs(path): - // for completeness only - go/build.Import - // does not support absolute imports - // "/x" -> "/x.ext", "/x" - noext = path - id = path - } - - if false { // for debugging - if path != id { - fmt.Printf("%s -> %s\n", path, id) - } - } - - // try extensions - for _, ext := range pkgExts { - filename = noext + ext - if f, err := os.Stat(filename); err == nil && !f.IsDir() { - return - } - } - - filename = "" // not found - return -} - -// ImportData imports a package by reading the gc-generated export data, -// adds the corresponding package object to the packages map indexed by id, -// and returns the object. -// -// The packages map must contains all packages already imported. The data -// reader position must be the beginning of the export data section. The -// filename is only used in error messages. -// -// If packages[id] contains the completely imported package, that package -// can be used directly, and there is no need to call this function (but -// there is also no harm but for extra time used). -// -func ImportData(packages map[string]*types.Package, filename, id string, data io.Reader) (pkg *types.Package, err error) { - // support for parser error handling - defer func() { - switch r := recover().(type) { - case nil: - // nothing to do - case importError: - err = r - default: - panic(r) // internal error - } - }() - - var p parser - p.init(filename, id, data, packages) - pkg = p.parseExport() - - return -} - -// Import imports a gc-generated package given its import path and srcDir, adds -// the corresponding package object to the packages map, and returns the object. -// The packages map must contain all packages already imported. -// -func Import(packages map[string]*types.Package, path, srcDir string, lookup func(path string) (io.ReadCloser, error)) (pkg *types.Package, err error) { - var rc io.ReadCloser - var filename, id string - if lookup != nil { - // With custom lookup specified, assume that caller has - // converted path to a canonical import path for use in the map. - if path == "unsafe" { - return types.Unsafe, nil - } - id = path - - // No need to re-import if the package was imported completely before. - if pkg = packages[id]; pkg != nil && pkg.Complete() { - return - } - f, err := lookup(path) - if err != nil { - return nil, err - } - rc = f - } else { - filename, id = FindPkg(path, srcDir) - if filename == "" { - if path == "unsafe" { - return types.Unsafe, nil - } - return nil, fmt.Errorf("can't find import: %q", id) - } - - // no need to re-import if the package was imported completely before - if pkg = packages[id]; pkg != nil && pkg.Complete() { - return - } - - // open file - f, err := os.Open(filename) - if err != nil { - return nil, err - } - defer func() { - if err != nil { - // add file name to error - err = fmt.Errorf("%s: %v", filename, err) - } - }() - rc = f - } - defer rc.Close() - - var hdr string - buf := bufio.NewReader(rc) - if hdr, err = FindExportData(buf); err != nil { - return - } - - switch hdr { - case "$$\n": - // Work-around if we don't have a filename; happens only if lookup != nil. - // Either way, the filename is only needed for importer error messages, so - // this is fine. - if filename == "" { - filename = path - } - return ImportData(packages, filename, id, buf) - - case "$$B\n": - var data []byte - data, err = ioutil.ReadAll(buf) - if err != nil { - break - } - - // TODO(gri): allow clients of go/importer to provide a FileSet. - // Or, define a new standard go/types/gcexportdata package. - fset := token.NewFileSet() - - // The indexed export format starts with an 'i'; the older - // binary export format starts with a 'c', 'd', or 'v' - // (from "version"). Select appropriate importer. - if len(data) > 0 && data[0] == 'i' { - _, pkg, err = IImportData(fset, packages, data[1:], id) - } else { - _, pkg, err = BImportData(fset, packages, data, id) - } - - default: - err = fmt.Errorf("unknown export data header: %q", hdr) - } - - return -} - -// ---------------------------------------------------------------------------- -// Parser - -// TODO(gri) Imported objects don't have position information. -// Ideally use the debug table line info; alternatively -// create some fake position (or the position of the -// import). That way error messages referring to imported -// objects can print meaningful information. - -// parser parses the exports inside a gc compiler-produced -// object/archive file and populates its scope with the results. -type parser struct { - scanner scanner.Scanner - tok rune // current token - lit string // literal string; only valid for Ident, Int, String tokens - id string // package id of imported package - sharedPkgs map[string]*types.Package // package id -> package object (across importer) - localPkgs map[string]*types.Package // package id -> package object (just this package) -} - -func (p *parser) init(filename, id string, src io.Reader, packages map[string]*types.Package) { - p.scanner.Init(src) - p.scanner.Error = func(_ *scanner.Scanner, msg string) { p.error(msg) } - p.scanner.Mode = scanner.ScanIdents | scanner.ScanInts | scanner.ScanChars | scanner.ScanStrings | scanner.ScanComments | scanner.SkipComments - p.scanner.Whitespace = 1<<'\t' | 1<<' ' - p.scanner.Filename = filename // for good error messages - p.next() - p.id = id - p.sharedPkgs = packages - if debug { - // check consistency of packages map - for _, pkg := range packages { - if pkg.Name() == "" { - fmt.Printf("no package name for %s\n", pkg.Path()) - } - } - } -} - -func (p *parser) next() { - p.tok = p.scanner.Scan() - switch p.tok { - case scanner.Ident, scanner.Int, scanner.Char, scanner.String, '·': - p.lit = p.scanner.TokenText() - default: - p.lit = "" - } - if debug { - fmt.Printf("%s: %q -> %q\n", scanner.TokenString(p.tok), p.scanner.TokenText(), p.lit) - } -} - -func declTypeName(pkg *types.Package, name string) *types.TypeName { - scope := pkg.Scope() - if obj := scope.Lookup(name); obj != nil { - return obj.(*types.TypeName) - } - obj := types.NewTypeName(token.NoPos, pkg, name, nil) - // a named type may be referred to before the underlying type - // is known - set it up - types.NewNamed(obj, nil, nil) - scope.Insert(obj) - return obj -} - -// ---------------------------------------------------------------------------- -// Error handling - -// Internal errors are boxed as importErrors. -type importError struct { - pos scanner.Position - err error -} - -func (e importError) Error() string { - return fmt.Sprintf("import error %s (byte offset = %d): %s", e.pos, e.pos.Offset, e.err) -} - -func (p *parser) error(err interface{}) { - if s, ok := err.(string); ok { - err = errors.New(s) - } - // panic with a runtime.Error if err is not an error - panic(importError{p.scanner.Pos(), err.(error)}) -} - -func (p *parser) errorf(format string, args ...interface{}) { - p.error(fmt.Sprintf(format, args...)) -} - -func (p *parser) expect(tok rune) string { - lit := p.lit - if p.tok != tok { - p.errorf("expected %s, got %s (%s)", scanner.TokenString(tok), scanner.TokenString(p.tok), lit) - } - p.next() - return lit -} - -func (p *parser) expectSpecial(tok string) { - sep := 'x' // not white space - i := 0 - for i < len(tok) && p.tok == rune(tok[i]) && sep > ' ' { - sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token - p.next() - i++ - } - if i < len(tok) { - p.errorf("expected %q, got %q", tok, tok[0:i]) - } -} - -func (p *parser) expectKeyword(keyword string) { - lit := p.expect(scanner.Ident) - if lit != keyword { - p.errorf("expected keyword %s, got %q", keyword, lit) - } -} - -// ---------------------------------------------------------------------------- -// Qualified and unqualified names - -// PackageId = string_lit . -// -func (p *parser) parsePackageId() string { - id, err := strconv.Unquote(p.expect(scanner.String)) - if err != nil { - p.error(err) - } - // id == "" stands for the imported package id - // (only known at time of package installation) - if id == "" { - id = p.id - } - return id -} - -// PackageName = ident . -// -func (p *parser) parsePackageName() string { - return p.expect(scanner.Ident) -} - -// dotIdentifier = ( ident | '·' ) { ident | int | '·' } . -func (p *parser) parseDotIdent() string { - ident := "" - if p.tok != scanner.Int { - sep := 'x' // not white space - for (p.tok == scanner.Ident || p.tok == scanner.Int || p.tok == '·') && sep > ' ' { - ident += p.lit - sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token - p.next() - } - } - if ident == "" { - p.expect(scanner.Ident) // use expect() for error handling - } - return ident -} - -// QualifiedName = "@" PackageId "." ( "?" | dotIdentifier ) . -// -func (p *parser) parseQualifiedName() (id, name string) { - p.expect('@') - id = p.parsePackageId() - p.expect('.') - // Per rev f280b8a485fd (10/2/2013), qualified names may be used for anonymous fields. - if p.tok == '?' { - p.next() - } else { - name = p.parseDotIdent() - } - return -} - -// getPkg returns the package for a given id. If the package is -// not found, create the package and add it to the p.localPkgs -// and p.sharedPkgs maps. name is the (expected) name of the -// package. If name == "", the package name is expected to be -// set later via an import clause in the export data. -// -// id identifies a package, usually by a canonical package path like -// "encoding/json" but possibly by a non-canonical import path like -// "./json". -// -func (p *parser) getPkg(id, name string) *types.Package { - // package unsafe is not in the packages maps - handle explicitly - if id == "unsafe" { - return types.Unsafe - } - - pkg := p.localPkgs[id] - if pkg == nil { - // first import of id from this package - pkg = p.sharedPkgs[id] - if pkg == nil { - // first import of id by this importer; - // add (possibly unnamed) pkg to shared packages - pkg = types.NewPackage(id, name) - p.sharedPkgs[id] = pkg - } - // add (possibly unnamed) pkg to local packages - if p.localPkgs == nil { - p.localPkgs = make(map[string]*types.Package) - } - p.localPkgs[id] = pkg - } else if name != "" { - // package exists already and we have an expected package name; - // make sure names match or set package name if necessary - if pname := pkg.Name(); pname == "" { - pkg.SetName(name) - } else if pname != name { - p.errorf("%s package name mismatch: %s (given) vs %s (expected)", id, pname, name) - } - } - return pkg -} - -// parseExportedName is like parseQualifiedName, but -// the package id is resolved to an imported *types.Package. -// -func (p *parser) parseExportedName() (pkg *types.Package, name string) { - id, name := p.parseQualifiedName() - pkg = p.getPkg(id, "") - return -} - -// ---------------------------------------------------------------------------- -// Types - -// BasicType = identifier . -// -func (p *parser) parseBasicType() types.Type { - id := p.expect(scanner.Ident) - obj := types.Universe.Lookup(id) - if obj, ok := obj.(*types.TypeName); ok { - return obj.Type() - } - p.errorf("not a basic type: %s", id) - return nil -} - -// ArrayType = "[" int_lit "]" Type . -// -func (p *parser) parseArrayType(parent *types.Package) types.Type { - // "[" already consumed and lookahead known not to be "]" - lit := p.expect(scanner.Int) - p.expect(']') - elem := p.parseType(parent) - n, err := strconv.ParseInt(lit, 10, 64) - if err != nil { - p.error(err) - } - return types.NewArray(elem, n) -} - -// MapType = "map" "[" Type "]" Type . -// -func (p *parser) parseMapType(parent *types.Package) types.Type { - p.expectKeyword("map") - p.expect('[') - key := p.parseType(parent) - p.expect(']') - elem := p.parseType(parent) - return types.NewMap(key, elem) -} - -// Name = identifier | "?" | QualifiedName . -// -// For unqualified and anonymous names, the returned package is the parent -// package unless parent == nil, in which case the returned package is the -// package being imported. (The parent package is not nil if the the name -// is an unqualified struct field or interface method name belonging to a -// type declared in another package.) -// -// For qualified names, the returned package is nil (and not created if -// it doesn't exist yet) unless materializePkg is set (which creates an -// unnamed package with valid package path). In the latter case, a -// subsequent import clause is expected to provide a name for the package. -// -func (p *parser) parseName(parent *types.Package, materializePkg bool) (pkg *types.Package, name string) { - pkg = parent - if pkg == nil { - pkg = p.sharedPkgs[p.id] - } - switch p.tok { - case scanner.Ident: - name = p.lit - p.next() - case '?': - // anonymous - p.next() - case '@': - // exported name prefixed with package path - pkg = nil - var id string - id, name = p.parseQualifiedName() - if materializePkg { - pkg = p.getPkg(id, "") - } - default: - p.error("name expected") - } - return -} - -func deref(typ types.Type) types.Type { - if p, _ := typ.(*types.Pointer); p != nil { - return p.Elem() - } - return typ -} - -// Field = Name Type [ string_lit ] . -// -func (p *parser) parseField(parent *types.Package) (*types.Var, string) { - pkg, name := p.parseName(parent, true) - - if name == "_" { - // Blank fields should be package-qualified because they - // are unexported identifiers, but gc does not qualify them. - // Assuming that the ident belongs to the current package - // causes types to change during re-exporting, leading - // to spurious "can't assign A to B" errors from go/types. - // As a workaround, pretend all blank fields belong - // to the same unique dummy package. - const blankpkg = "<_>" - pkg = p.getPkg(blankpkg, blankpkg) - } - - typ := p.parseType(parent) - anonymous := false - if name == "" { - // anonymous field - typ must be T or *T and T must be a type name - switch typ := deref(typ).(type) { - case *types.Basic: // basic types are named types - pkg = nil // objects defined in Universe scope have no package - name = typ.Name() - case *types.Named: - name = typ.Obj().Name() - default: - p.errorf("anonymous field expected") - } - anonymous = true - } - tag := "" - if p.tok == scanner.String { - s := p.expect(scanner.String) - var err error - tag, err = strconv.Unquote(s) - if err != nil { - p.errorf("invalid struct tag %s: %s", s, err) - } - } - return types.NewField(token.NoPos, pkg, name, typ, anonymous), tag -} - -// StructType = "struct" "{" [ FieldList ] "}" . -// FieldList = Field { ";" Field } . -// -func (p *parser) parseStructType(parent *types.Package) types.Type { - var fields []*types.Var - var tags []string - - p.expectKeyword("struct") - p.expect('{') - for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ { - if i > 0 { - p.expect(';') - } - fld, tag := p.parseField(parent) - if tag != "" && tags == nil { - tags = make([]string, i) - } - if tags != nil { - tags = append(tags, tag) - } - fields = append(fields, fld) - } - p.expect('}') - - return types.NewStruct(fields, tags) -} - -// Parameter = ( identifier | "?" ) [ "..." ] Type [ string_lit ] . -// -func (p *parser) parseParameter() (par *types.Var, isVariadic bool) { - _, name := p.parseName(nil, false) - // remove gc-specific parameter numbering - if i := strings.Index(name, "·"); i >= 0 { - name = name[:i] - } - if p.tok == '.' { - p.expectSpecial("...") - isVariadic = true - } - typ := p.parseType(nil) - if isVariadic { - typ = types.NewSlice(typ) - } - // ignore argument tag (e.g. "noescape") - if p.tok == scanner.String { - p.next() - } - // TODO(gri) should we provide a package? - par = types.NewVar(token.NoPos, nil, name, typ) - return -} - -// Parameters = "(" [ ParameterList ] ")" . -// ParameterList = { Parameter "," } Parameter . -// -func (p *parser) parseParameters() (list []*types.Var, isVariadic bool) { - p.expect('(') - for p.tok != ')' && p.tok != scanner.EOF { - if len(list) > 0 { - p.expect(',') - } - par, variadic := p.parseParameter() - list = append(list, par) - if variadic { - if isVariadic { - p.error("... not on final argument") - } - isVariadic = true - } - } - p.expect(')') - - return -} - -// Signature = Parameters [ Result ] . -// Result = Type | Parameters . -// -func (p *parser) parseSignature(recv *types.Var) *types.Signature { - params, isVariadic := p.parseParameters() - - // optional result type - var results []*types.Var - if p.tok == '(' { - var variadic bool - results, variadic = p.parseParameters() - if variadic { - p.error("... not permitted on result type") - } - } - - return types.NewSignature(recv, types.NewTuple(params...), types.NewTuple(results...), isVariadic) -} - -// InterfaceType = "interface" "{" [ MethodList ] "}" . -// MethodList = Method { ";" Method } . -// Method = Name Signature . -// -// The methods of embedded interfaces are always "inlined" -// by the compiler and thus embedded interfaces are never -// visible in the export data. -// -func (p *parser) parseInterfaceType(parent *types.Package) types.Type { - var methods []*types.Func - - p.expectKeyword("interface") - p.expect('{') - for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ { - if i > 0 { - p.expect(';') - } - pkg, name := p.parseName(parent, true) - sig := p.parseSignature(nil) - methods = append(methods, types.NewFunc(token.NoPos, pkg, name, sig)) - } - p.expect('}') - - // Complete requires the type's embedded interfaces to be fully defined, - // but we do not define any - return types.NewInterface(methods, nil).Complete() -} - -// ChanType = ( "chan" [ "<-" ] | "<-" "chan" ) Type . -// -func (p *parser) parseChanType(parent *types.Package) types.Type { - dir := types.SendRecv - if p.tok == scanner.Ident { - p.expectKeyword("chan") - if p.tok == '<' { - p.expectSpecial("<-") - dir = types.SendOnly - } - } else { - p.expectSpecial("<-") - p.expectKeyword("chan") - dir = types.RecvOnly - } - elem := p.parseType(parent) - return types.NewChan(dir, elem) -} - -// Type = -// BasicType | TypeName | ArrayType | SliceType | StructType | -// PointerType | FuncType | InterfaceType | MapType | ChanType | -// "(" Type ")" . -// -// BasicType = ident . -// TypeName = ExportedName . -// SliceType = "[" "]" Type . -// PointerType = "*" Type . -// FuncType = "func" Signature . -// -func (p *parser) parseType(parent *types.Package) types.Type { - switch p.tok { - case scanner.Ident: - switch p.lit { - default: - return p.parseBasicType() - case "struct": - return p.parseStructType(parent) - case "func": - // FuncType - p.next() - return p.parseSignature(nil) - case "interface": - return p.parseInterfaceType(parent) - case "map": - return p.parseMapType(parent) - case "chan": - return p.parseChanType(parent) - } - case '@': - // TypeName - pkg, name := p.parseExportedName() - return declTypeName(pkg, name).Type() - case '[': - p.next() // look ahead - if p.tok == ']' { - // SliceType - p.next() - return types.NewSlice(p.parseType(parent)) - } - return p.parseArrayType(parent) - case '*': - // PointerType - p.next() - return types.NewPointer(p.parseType(parent)) - case '<': - return p.parseChanType(parent) - case '(': - // "(" Type ")" - p.next() - typ := p.parseType(parent) - p.expect(')') - return typ - } - p.errorf("expected type, got %s (%q)", scanner.TokenString(p.tok), p.lit) - return nil -} - -// ---------------------------------------------------------------------------- -// Declarations - -// ImportDecl = "import" PackageName PackageId . -// -func (p *parser) parseImportDecl() { - p.expectKeyword("import") - name := p.parsePackageName() - p.getPkg(p.parsePackageId(), name) -} - -// int_lit = [ "+" | "-" ] { "0" ... "9" } . -// -func (p *parser) parseInt() string { - s := "" - switch p.tok { - case '-': - s = "-" - p.next() - case '+': - p.next() - } - return s + p.expect(scanner.Int) -} - -// number = int_lit [ "p" int_lit ] . -// -func (p *parser) parseNumber() (typ *types.Basic, val constant.Value) { - // mantissa - mant := constant.MakeFromLiteral(p.parseInt(), token.INT, 0) - if mant == nil { - panic("invalid mantissa") - } - - if p.lit == "p" { - // exponent (base 2) - p.next() - exp, err := strconv.ParseInt(p.parseInt(), 10, 0) - if err != nil { - p.error(err) - } - if exp < 0 { - denom := constant.MakeInt64(1) - denom = constant.Shift(denom, token.SHL, uint(-exp)) - typ = types.Typ[types.UntypedFloat] - val = constant.BinaryOp(mant, token.QUO, denom) - return - } - if exp > 0 { - mant = constant.Shift(mant, token.SHL, uint(exp)) - } - typ = types.Typ[types.UntypedFloat] - val = mant - return - } - - typ = types.Typ[types.UntypedInt] - val = mant - return -} - -// ConstDecl = "const" ExportedName [ Type ] "=" Literal . -// Literal = bool_lit | int_lit | float_lit | complex_lit | rune_lit | string_lit . -// bool_lit = "true" | "false" . -// complex_lit = "(" float_lit "+" float_lit "i" ")" . -// rune_lit = "(" int_lit "+" int_lit ")" . -// string_lit = `"` { unicode_char } `"` . -// -func (p *parser) parseConstDecl() { - p.expectKeyword("const") - pkg, name := p.parseExportedName() - - var typ0 types.Type - if p.tok != '=' { - // constant types are never structured - no need for parent type - typ0 = p.parseType(nil) - } - - p.expect('=') - var typ types.Type - var val constant.Value - switch p.tok { - case scanner.Ident: - // bool_lit - if p.lit != "true" && p.lit != "false" { - p.error("expected true or false") - } - typ = types.Typ[types.UntypedBool] - val = constant.MakeBool(p.lit == "true") - p.next() - - case '-', scanner.Int: - // int_lit - typ, val = p.parseNumber() - - case '(': - // complex_lit or rune_lit - p.next() - if p.tok == scanner.Char { - p.next() - p.expect('+') - typ = types.Typ[types.UntypedRune] - _, val = p.parseNumber() - p.expect(')') - break - } - _, re := p.parseNumber() - p.expect('+') - _, im := p.parseNumber() - p.expectKeyword("i") - p.expect(')') - typ = types.Typ[types.UntypedComplex] - val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) - - case scanner.Char: - // rune_lit - typ = types.Typ[types.UntypedRune] - val = constant.MakeFromLiteral(p.lit, token.CHAR, 0) - p.next() - - case scanner.String: - // string_lit - typ = types.Typ[types.UntypedString] - val = constant.MakeFromLiteral(p.lit, token.STRING, 0) - p.next() - - default: - p.errorf("expected literal got %s", scanner.TokenString(p.tok)) - } - - if typ0 == nil { - typ0 = typ - } - - pkg.Scope().Insert(types.NewConst(token.NoPos, pkg, name, typ0, val)) -} - -// TypeDecl = "type" ExportedName Type . -// -func (p *parser) parseTypeDecl() { - p.expectKeyword("type") - pkg, name := p.parseExportedName() - obj := declTypeName(pkg, name) - - // The type object may have been imported before and thus already - // have a type associated with it. We still need to parse the type - // structure, but throw it away if the object already has a type. - // This ensures that all imports refer to the same type object for - // a given type declaration. - typ := p.parseType(pkg) - - if name := obj.Type().(*types.Named); name.Underlying() == nil { - name.SetUnderlying(typ) - } -} - -// VarDecl = "var" ExportedName Type . -// -func (p *parser) parseVarDecl() { - p.expectKeyword("var") - pkg, name := p.parseExportedName() - typ := p.parseType(pkg) - pkg.Scope().Insert(types.NewVar(token.NoPos, pkg, name, typ)) -} - -// Func = Signature [ Body ] . -// Body = "{" ... "}" . -// -func (p *parser) parseFunc(recv *types.Var) *types.Signature { - sig := p.parseSignature(recv) - if p.tok == '{' { - p.next() - for i := 1; i > 0; p.next() { - switch p.tok { - case '{': - i++ - case '}': - i-- - } - } - } - return sig -} - -// MethodDecl = "func" Receiver Name Func . -// Receiver = "(" ( identifier | "?" ) [ "*" ] ExportedName ")" . -// -func (p *parser) parseMethodDecl() { - // "func" already consumed - p.expect('(') - recv, _ := p.parseParameter() // receiver - p.expect(')') - - // determine receiver base type object - base := deref(recv.Type()).(*types.Named) - - // parse method name, signature, and possibly inlined body - _, name := p.parseName(nil, false) - sig := p.parseFunc(recv) - - // methods always belong to the same package as the base type object - pkg := base.Obj().Pkg() - - // add method to type unless type was imported before - // and method exists already - // TODO(gri) This leads to a quadratic algorithm - ok for now because method counts are small. - base.AddMethod(types.NewFunc(token.NoPos, pkg, name, sig)) -} - -// FuncDecl = "func" ExportedName Func . -// -func (p *parser) parseFuncDecl() { - // "func" already consumed - pkg, name := p.parseExportedName() - typ := p.parseFunc(nil) - pkg.Scope().Insert(types.NewFunc(token.NoPos, pkg, name, typ)) -} - -// Decl = [ ImportDecl | ConstDecl | TypeDecl | VarDecl | FuncDecl | MethodDecl ] "\n" . -// -func (p *parser) parseDecl() { - if p.tok == scanner.Ident { - switch p.lit { - case "import": - p.parseImportDecl() - case "const": - p.parseConstDecl() - case "type": - p.parseTypeDecl() - case "var": - p.parseVarDecl() - case "func": - p.next() // look ahead - if p.tok == '(' { - p.parseMethodDecl() - } else { - p.parseFuncDecl() - } - } - } - p.expect('\n') -} - -// ---------------------------------------------------------------------------- -// Export - -// Export = "PackageClause { Decl } "$$" . -// PackageClause = "package" PackageName [ "safe" ] "\n" . -// -func (p *parser) parseExport() *types.Package { - p.expectKeyword("package") - name := p.parsePackageName() - if p.tok == scanner.Ident && p.lit == "safe" { - // package was compiled with -u option - ignore - p.next() - } - p.expect('\n') - - pkg := p.getPkg(p.id, name) - - for p.tok != '$' && p.tok != scanner.EOF { - p.parseDecl() - } - - if ch := p.scanner.Peek(); p.tok != '$' || ch != '$' { - // don't call next()/expect() since reading past the - // export data may cause scanner errors (e.g. NUL chars) - p.errorf("expected '$$', got %s %c", scanner.TokenString(p.tok), ch) - } - - if n := p.scanner.ErrorCount; n != 0 { - p.errorf("expected no scanner errors, got %d", n) - } - - // Record all locally referenced packages as imports. - var imports []*types.Package - for id, pkg2 := range p.localPkgs { - if pkg2.Name() == "" { - p.errorf("%s package has no name", id) - } - if id == p.id { - continue // avoid self-edge - } - imports = append(imports, pkg2) - } - sort.Sort(byPath(imports)) - pkg.SetImports(imports) - - // package was imported completely and without errors - pkg.MarkComplete() - - return pkg -} - -type byPath []*types.Package - -func (a byPath) Len() int { return len(a) } -func (a byPath) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a byPath) Less(i, j int) bool { return a[i].Path() < a[j].Path() } diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go deleted file mode 100644 index 5f00153f896..00000000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go +++ /dev/null @@ -1,726 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Indexed binary package export. -// This file was derived from $GOROOT/src/cmd/compile/internal/gc/iexport.go; -// see that file for specification of the format. - -package gcimporter - -import ( - "bytes" - "encoding/binary" - "go/ast" - "go/constant" - "go/token" - "go/types" - "io" - "math/big" - "reflect" - "sort" -) - -// Current indexed export format version. Increase with each format change. -// 0: Go1.11 encoding -const iexportVersion = 0 - -// IExportData returns the binary export data for pkg. -// If no file set is provided, position info will be missing. -func IExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) { - defer func() { - if e := recover(); e != nil { - if ierr, ok := e.(internalError); ok { - err = ierr - return - } - // Not an internal error; panic again. - panic(e) - } - }() - - p := iexporter{ - out: bytes.NewBuffer(nil), - fset: fset, - allPkgs: map[*types.Package]bool{}, - stringIndex: map[string]uint64{}, - declIndex: map[types.Object]uint64{}, - typIndex: map[types.Type]uint64{}, - } - - for i, pt := range predeclared() { - p.typIndex[pt] = uint64(i) - } - if len(p.typIndex) > predeclReserved { - panic(internalErrorf("too many predeclared types: %d > %d", len(p.typIndex), predeclReserved)) - } - - // Initialize work queue with exported declarations. - scope := pkg.Scope() - for _, name := range scope.Names() { - if ast.IsExported(name) { - p.pushDecl(scope.Lookup(name)) - } - } - - // Loop until no more work. - for !p.declTodo.empty() { - p.doDecl(p.declTodo.popHead()) - } - - // Append indices to data0 section. - dataLen := uint64(p.data0.Len()) - w := p.newWriter() - w.writeIndex(p.declIndex, pkg) - w.flush() - - // Assemble header. - var hdr intWriter - hdr.WriteByte('i') - hdr.uint64(iexportVersion) - hdr.uint64(uint64(p.strings.Len())) - hdr.uint64(dataLen) - - // Flush output. - io.Copy(p.out, &hdr) - io.Copy(p.out, &p.strings) - io.Copy(p.out, &p.data0) - - return p.out.Bytes(), nil -} - -// writeIndex writes out an object index. mainIndex indicates whether -// we're writing out the main index, which is also read by -// non-compiler tools and includes a complete package description -// (i.e., name and height). -func (w *exportWriter) writeIndex(index map[types.Object]uint64, localpkg *types.Package) { - // Build a map from packages to objects from that package. - pkgObjs := map[*types.Package][]types.Object{} - - // For the main index, make sure to include every package that - // we reference, even if we're not exporting (or reexporting) - // any symbols from it. - pkgObjs[localpkg] = nil - for pkg := range w.p.allPkgs { - pkgObjs[pkg] = nil - } - - for obj := range index { - pkgObjs[obj.Pkg()] = append(pkgObjs[obj.Pkg()], obj) - } - - var pkgs []*types.Package - for pkg, objs := range pkgObjs { - pkgs = append(pkgs, pkg) - - sort.Slice(objs, func(i, j int) bool { - return objs[i].Name() < objs[j].Name() - }) - } - - sort.Slice(pkgs, func(i, j int) bool { - return pkgs[i].Path() < pkgs[j].Path() - }) - - w.uint64(uint64(len(pkgs))) - for _, pkg := range pkgs { - w.string(pkg.Path()) - w.string(pkg.Name()) - w.uint64(uint64(0)) // package height is not needed for go/types - - objs := pkgObjs[pkg] - w.uint64(uint64(len(objs))) - for _, obj := range objs { - w.string(obj.Name()) - w.uint64(index[obj]) - } - } -} - -type iexporter struct { - fset *token.FileSet - out *bytes.Buffer - - // allPkgs tracks all packages that have been referenced by - // the export data, so we can ensure to include them in the - // main index. - allPkgs map[*types.Package]bool - - declTodo objQueue - - strings intWriter - stringIndex map[string]uint64 - - data0 intWriter - declIndex map[types.Object]uint64 - typIndex map[types.Type]uint64 -} - -// stringOff returns the offset of s within the string section. -// If not already present, it's added to the end. -func (p *iexporter) stringOff(s string) uint64 { - off, ok := p.stringIndex[s] - if !ok { - off = uint64(p.strings.Len()) - p.stringIndex[s] = off - - p.strings.uint64(uint64(len(s))) - p.strings.WriteString(s) - } - return off -} - -// pushDecl adds n to the declaration work queue, if not already present. -func (p *iexporter) pushDecl(obj types.Object) { - // Package unsafe is known to the compiler and predeclared. - assert(obj.Pkg() != types.Unsafe) - - if _, ok := p.declIndex[obj]; ok { - return - } - - p.declIndex[obj] = ^uint64(0) // mark n present in work queue - p.declTodo.pushTail(obj) -} - -// exportWriter handles writing out individual data section chunks. -type exportWriter struct { - p *iexporter - - data intWriter - currPkg *types.Package - prevFile string - prevLine int64 -} - -func (p *iexporter) doDecl(obj types.Object) { - w := p.newWriter() - w.setPkg(obj.Pkg(), false) - - switch obj := obj.(type) { - case *types.Var: - w.tag('V') - w.pos(obj.Pos()) - w.typ(obj.Type(), obj.Pkg()) - - case *types.Func: - sig, _ := obj.Type().(*types.Signature) - if sig.Recv() != nil { - panic(internalErrorf("unexpected method: %v", sig)) - } - w.tag('F') - w.pos(obj.Pos()) - w.signature(sig) - - case *types.Const: - w.tag('C') - w.pos(obj.Pos()) - w.value(obj.Type(), obj.Val()) - - case *types.TypeName: - if obj.IsAlias() { - w.tag('A') - w.pos(obj.Pos()) - w.typ(obj.Type(), obj.Pkg()) - break - } - - // Defined type. - w.tag('T') - w.pos(obj.Pos()) - - underlying := obj.Type().Underlying() - w.typ(underlying, obj.Pkg()) - - t := obj.Type() - if types.IsInterface(t) { - break - } - - named, ok := t.(*types.Named) - if !ok { - panic(internalErrorf("%s is not a defined type", t)) - } - - n := named.NumMethods() - w.uint64(uint64(n)) - for i := 0; i < n; i++ { - m := named.Method(i) - w.pos(m.Pos()) - w.string(m.Name()) - sig, _ := m.Type().(*types.Signature) - w.param(sig.Recv()) - w.signature(sig) - } - - default: - panic(internalErrorf("unexpected object: %v", obj)) - } - - p.declIndex[obj] = w.flush() -} - -func (w *exportWriter) tag(tag byte) { - w.data.WriteByte(tag) -} - -func (w *exportWriter) pos(pos token.Pos) { - if w.p.fset == nil { - w.int64(0) - return - } - - p := w.p.fset.Position(pos) - file := p.Filename - line := int64(p.Line) - - // When file is the same as the last position (common case), - // we can save a few bytes by delta encoding just the line - // number. - // - // Note: Because data objects may be read out of order (or not - // at all), we can only apply delta encoding within a single - // object. This is handled implicitly by tracking prevFile and - // prevLine as fields of exportWriter. - - if file == w.prevFile { - delta := line - w.prevLine - w.int64(delta) - if delta == deltaNewFile { - w.int64(-1) - } - } else { - w.int64(deltaNewFile) - w.int64(line) // line >= 0 - w.string(file) - w.prevFile = file - } - w.prevLine = line -} - -func (w *exportWriter) pkg(pkg *types.Package) { - // Ensure any referenced packages are declared in the main index. - w.p.allPkgs[pkg] = true - - w.string(pkg.Path()) -} - -func (w *exportWriter) qualifiedIdent(obj types.Object) { - // Ensure any referenced declarations are written out too. - w.p.pushDecl(obj) - - w.string(obj.Name()) - w.pkg(obj.Pkg()) -} - -func (w *exportWriter) typ(t types.Type, pkg *types.Package) { - w.data.uint64(w.p.typOff(t, pkg)) -} - -func (p *iexporter) newWriter() *exportWriter { - return &exportWriter{p: p} -} - -func (w *exportWriter) flush() uint64 { - off := uint64(w.p.data0.Len()) - io.Copy(&w.p.data0, &w.data) - return off -} - -func (p *iexporter) typOff(t types.Type, pkg *types.Package) uint64 { - off, ok := p.typIndex[t] - if !ok { - w := p.newWriter() - w.doTyp(t, pkg) - off = predeclReserved + w.flush() - p.typIndex[t] = off - } - return off -} - -func (w *exportWriter) startType(k itag) { - w.data.uint64(uint64(k)) -} - -func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { - switch t := t.(type) { - case *types.Named: - w.startType(definedType) - w.qualifiedIdent(t.Obj()) - - case *types.Pointer: - w.startType(pointerType) - w.typ(t.Elem(), pkg) - - case *types.Slice: - w.startType(sliceType) - w.typ(t.Elem(), pkg) - - case *types.Array: - w.startType(arrayType) - w.uint64(uint64(t.Len())) - w.typ(t.Elem(), pkg) - - case *types.Chan: - w.startType(chanType) - // 1 RecvOnly; 2 SendOnly; 3 SendRecv - var dir uint64 - switch t.Dir() { - case types.RecvOnly: - dir = 1 - case types.SendOnly: - dir = 2 - case types.SendRecv: - dir = 3 - } - w.uint64(dir) - w.typ(t.Elem(), pkg) - - case *types.Map: - w.startType(mapType) - w.typ(t.Key(), pkg) - w.typ(t.Elem(), pkg) - - case *types.Signature: - w.startType(signatureType) - w.setPkg(pkg, true) - w.signature(t) - - case *types.Struct: - w.startType(structType) - w.setPkg(pkg, true) - - n := t.NumFields() - w.uint64(uint64(n)) - for i := 0; i < n; i++ { - f := t.Field(i) - w.pos(f.Pos()) - w.string(f.Name()) - w.typ(f.Type(), pkg) - w.bool(f.Anonymous()) - w.string(t.Tag(i)) // note (or tag) - } - - case *types.Interface: - w.startType(interfaceType) - w.setPkg(pkg, true) - - n := t.NumEmbeddeds() - w.uint64(uint64(n)) - for i := 0; i < n; i++ { - f := t.Embedded(i) - w.pos(f.Obj().Pos()) - w.typ(f.Obj().Type(), f.Obj().Pkg()) - } - - n = t.NumExplicitMethods() - w.uint64(uint64(n)) - for i := 0; i < n; i++ { - m := t.ExplicitMethod(i) - w.pos(m.Pos()) - w.string(m.Name()) - sig, _ := m.Type().(*types.Signature) - w.signature(sig) - } - - default: - panic(internalErrorf("unexpected type: %v, %v", t, reflect.TypeOf(t))) - } -} - -func (w *exportWriter) setPkg(pkg *types.Package, write bool) { - if write { - w.pkg(pkg) - } - - w.currPkg = pkg -} - -func (w *exportWriter) signature(sig *types.Signature) { - w.paramList(sig.Params()) - w.paramList(sig.Results()) - if sig.Params().Len() > 0 { - w.bool(sig.Variadic()) - } -} - -func (w *exportWriter) paramList(tup *types.Tuple) { - n := tup.Len() - w.uint64(uint64(n)) - for i := 0; i < n; i++ { - w.param(tup.At(i)) - } -} - -func (w *exportWriter) param(obj types.Object) { - w.pos(obj.Pos()) - w.localIdent(obj) - w.typ(obj.Type(), obj.Pkg()) -} - -func (w *exportWriter) value(typ types.Type, v constant.Value) { - w.typ(typ, nil) - - switch v.Kind() { - case constant.Bool: - w.bool(constant.BoolVal(v)) - case constant.Int: - var i big.Int - if i64, exact := constant.Int64Val(v); exact { - i.SetInt64(i64) - } else if ui64, exact := constant.Uint64Val(v); exact { - i.SetUint64(ui64) - } else { - i.SetString(v.ExactString(), 10) - } - w.mpint(&i, typ) - case constant.Float: - f := constantToFloat(v) - w.mpfloat(f, typ) - case constant.Complex: - w.mpfloat(constantToFloat(constant.Real(v)), typ) - w.mpfloat(constantToFloat(constant.Imag(v)), typ) - case constant.String: - w.string(constant.StringVal(v)) - case constant.Unknown: - // package contains type errors - default: - panic(internalErrorf("unexpected value %v (%T)", v, v)) - } -} - -// constantToFloat converts a constant.Value with kind constant.Float to a -// big.Float. -func constantToFloat(x constant.Value) *big.Float { - assert(x.Kind() == constant.Float) - // Use the same floating-point precision (512) as cmd/compile - // (see Mpprec in cmd/compile/internal/gc/mpfloat.go). - const mpprec = 512 - var f big.Float - f.SetPrec(mpprec) - if v, exact := constant.Float64Val(x); exact { - // float64 - f.SetFloat64(v) - } else if num, denom := constant.Num(x), constant.Denom(x); num.Kind() == constant.Int { - // TODO(gri): add big.Rat accessor to constant.Value. - n := valueToRat(num) - d := valueToRat(denom) - f.SetRat(n.Quo(n, d)) - } else { - // Value too large to represent as a fraction => inaccessible. - // TODO(gri): add big.Float accessor to constant.Value. - _, ok := f.SetString(x.ExactString()) - assert(ok) - } - return &f -} - -// mpint exports a multi-precision integer. -// -// For unsigned types, small values are written out as a single -// byte. Larger values are written out as a length-prefixed big-endian -// byte string, where the length prefix is encoded as its complement. -// For example, bytes 0, 1, and 2 directly represent the integer -// values 0, 1, and 2; while bytes 255, 254, and 253 indicate a 1-, -// 2-, and 3-byte big-endian string follow. -// -// Encoding for signed types use the same general approach as for -// unsigned types, except small values use zig-zag encoding and the -// bottom bit of length prefix byte for large values is reserved as a -// sign bit. -// -// The exact boundary between small and large encodings varies -// according to the maximum number of bytes needed to encode a value -// of type typ. As a special case, 8-bit types are always encoded as a -// single byte. -// -// TODO(mdempsky): Is this level of complexity really worthwhile? -func (w *exportWriter) mpint(x *big.Int, typ types.Type) { - basic, ok := typ.Underlying().(*types.Basic) - if !ok { - panic(internalErrorf("unexpected type %v (%T)", typ.Underlying(), typ.Underlying())) - } - - signed, maxBytes := intSize(basic) - - negative := x.Sign() < 0 - if !signed && negative { - panic(internalErrorf("negative unsigned integer; type %v, value %v", typ, x)) - } - - b := x.Bytes() - if len(b) > 0 && b[0] == 0 { - panic(internalErrorf("leading zeros")) - } - if uint(len(b)) > maxBytes { - panic(internalErrorf("bad mpint length: %d > %d (type %v, value %v)", len(b), maxBytes, typ, x)) - } - - maxSmall := 256 - maxBytes - if signed { - maxSmall = 256 - 2*maxBytes - } - if maxBytes == 1 { - maxSmall = 256 - } - - // Check if x can use small value encoding. - if len(b) <= 1 { - var ux uint - if len(b) == 1 { - ux = uint(b[0]) - } - if signed { - ux <<= 1 - if negative { - ux-- - } - } - if ux < maxSmall { - w.data.WriteByte(byte(ux)) - return - } - } - - n := 256 - uint(len(b)) - if signed { - n = 256 - 2*uint(len(b)) - if negative { - n |= 1 - } - } - if n < maxSmall || n >= 256 { - panic(internalErrorf("encoding mistake: %d, %v, %v => %d", len(b), signed, negative, n)) - } - - w.data.WriteByte(byte(n)) - w.data.Write(b) -} - -// mpfloat exports a multi-precision floating point number. -// -// The number's value is decomposed into mantissa × 2**exponent, where -// mantissa is an integer. The value is written out as mantissa (as a -// multi-precision integer) and then the exponent, except exponent is -// omitted if mantissa is zero. -func (w *exportWriter) mpfloat(f *big.Float, typ types.Type) { - if f.IsInf() { - panic("infinite constant") - } - - // Break into f = mant × 2**exp, with 0.5 <= mant < 1. - var mant big.Float - exp := int64(f.MantExp(&mant)) - - // Scale so that mant is an integer. - prec := mant.MinPrec() - mant.SetMantExp(&mant, int(prec)) - exp -= int64(prec) - - manti, acc := mant.Int(nil) - if acc != big.Exact { - panic(internalErrorf("mantissa scaling failed for %f (%s)", f, acc)) - } - w.mpint(manti, typ) - if manti.Sign() != 0 { - w.int64(exp) - } -} - -func (w *exportWriter) bool(b bool) bool { - var x uint64 - if b { - x = 1 - } - w.uint64(x) - return b -} - -func (w *exportWriter) int64(x int64) { w.data.int64(x) } -func (w *exportWriter) uint64(x uint64) { w.data.uint64(x) } -func (w *exportWriter) string(s string) { w.uint64(w.p.stringOff(s)) } - -func (w *exportWriter) localIdent(obj types.Object) { - // Anonymous parameters. - if obj == nil { - w.string("") - return - } - - name := obj.Name() - if name == "_" { - w.string("_") - return - } - - w.string(name) -} - -type intWriter struct { - bytes.Buffer -} - -func (w *intWriter) int64(x int64) { - var buf [binary.MaxVarintLen64]byte - n := binary.PutVarint(buf[:], x) - w.Write(buf[:n]) -} - -func (w *intWriter) uint64(x uint64) { - var buf [binary.MaxVarintLen64]byte - n := binary.PutUvarint(buf[:], x) - w.Write(buf[:n]) -} - -func assert(cond bool) { - if !cond { - panic("internal error: assertion failed") - } -} - -// The below is copied from go/src/cmd/compile/internal/gc/syntax.go. - -// objQueue is a FIFO queue of types.Object. The zero value of objQueue is -// a ready-to-use empty queue. -type objQueue struct { - ring []types.Object - head, tail int -} - -// empty returns true if q contains no Nodes. -func (q *objQueue) empty() bool { - return q.head == q.tail -} - -// pushTail appends n to the tail of the queue. -func (q *objQueue) pushTail(obj types.Object) { - if len(q.ring) == 0 { - q.ring = make([]types.Object, 16) - } else if q.head+len(q.ring) == q.tail { - // Grow the ring. - nring := make([]types.Object, len(q.ring)*2) - // Copy the old elements. - part := q.ring[q.head%len(q.ring):] - if q.tail-q.head <= len(part) { - part = part[:q.tail-q.head] - copy(nring, part) - } else { - pos := copy(nring, part) - copy(nring[pos:], q.ring[:q.tail%len(q.ring)]) - } - q.ring, q.head, q.tail = nring, 0, q.tail-q.head - } - - q.ring[q.tail%len(q.ring)] = obj - q.tail++ -} - -// popHead pops a node from the head of the queue. It panics if q is empty. -func (q *objQueue) popHead() types.Object { - if q.empty() { - panic("dequeue empty") - } - obj := q.ring[q.head%len(q.ring)] - q.head++ - return obj -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go deleted file mode 100644 index 3af95f4a16a..00000000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go +++ /dev/null @@ -1,636 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Indexed package import. -// See cmd/compile/internal/gc/iexport.go for the export data format. - -// This file is a copy of $GOROOT/src/go/internal/gcimporter/iimport.go. - -package gcimporter - -import ( - "bytes" - "encoding/binary" - "fmt" - "go/constant" - "go/token" - "go/types" - "io" - "sort" -) - -type intReader struct { - *bytes.Reader - path string -} - -func (r *intReader) int64() int64 { - i, err := binary.ReadVarint(r.Reader) - if err != nil { - errorf("import %q: read varint error: %v", r.path, err) - } - return i -} - -func (r *intReader) uint64() uint64 { - i, err := binary.ReadUvarint(r.Reader) - if err != nil { - errorf("import %q: read varint error: %v", r.path, err) - } - return i -} - -const predeclReserved = 32 - -type itag uint64 - -const ( - // Types - definedType itag = iota - pointerType - sliceType - arrayType - chanType - mapType - signatureType - structType - interfaceType -) - -// IImportData imports a package from the serialized package data -// and returns the number of bytes consumed and a reference to the package. -// If the export data version is not recognized or the format is otherwise -// compromised, an error is returned. -func IImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { - const currentVersion = 1 - version := int64(-1) - defer func() { - if e := recover(); e != nil { - if version > currentVersion { - err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e) - } else { - err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e) - } - } - }() - - r := &intReader{bytes.NewReader(data), path} - - version = int64(r.uint64()) - switch version { - case currentVersion, 0: - default: - errorf("unknown iexport format version %d", version) - } - - sLen := int64(r.uint64()) - dLen := int64(r.uint64()) - - whence, _ := r.Seek(0, io.SeekCurrent) - stringData := data[whence : whence+sLen] - declData := data[whence+sLen : whence+sLen+dLen] - r.Seek(sLen+dLen, io.SeekCurrent) - - p := iimporter{ - ipath: path, - version: int(version), - - stringData: stringData, - stringCache: make(map[uint64]string), - pkgCache: make(map[uint64]*types.Package), - - declData: declData, - pkgIndex: make(map[*types.Package]map[string]uint64), - typCache: make(map[uint64]types.Type), - - fake: fakeFileSet{ - fset: fset, - files: make(map[string]*token.File), - }, - } - - for i, pt := range predeclared() { - p.typCache[uint64(i)] = pt - } - - pkgList := make([]*types.Package, r.uint64()) - for i := range pkgList { - pkgPathOff := r.uint64() - pkgPath := p.stringAt(pkgPathOff) - pkgName := p.stringAt(r.uint64()) - _ = r.uint64() // package height; unused by go/types - - if pkgPath == "" { - pkgPath = path - } - pkg := imports[pkgPath] - if pkg == nil { - pkg = types.NewPackage(pkgPath, pkgName) - imports[pkgPath] = pkg - } else if pkg.Name() != pkgName { - errorf("conflicting names %s and %s for package %q", pkg.Name(), pkgName, path) - } - - p.pkgCache[pkgPathOff] = pkg - - nameIndex := make(map[string]uint64) - for nSyms := r.uint64(); nSyms > 0; nSyms-- { - name := p.stringAt(r.uint64()) - nameIndex[name] = r.uint64() - } - - p.pkgIndex[pkg] = nameIndex - pkgList[i] = pkg - } - if len(pkgList) == 0 { - errorf("no packages found for %s", path) - panic("unreachable") - } - var localpkg *types.Package - for _, pkg := range pkgList { - if pkg.Path() == path { - localpkg = pkg - break - } - } - if localpkg == nil { - localpkg = pkgList[0] - } - - names := make([]string, 0, len(p.pkgIndex[localpkg])) - for name := range p.pkgIndex[localpkg] { - names = append(names, name) - } - sort.Strings(names) - for _, name := range names { - p.doDecl(localpkg, name) - } - - for _, typ := range p.interfaceList { - typ.Complete() - } - - // record all referenced packages as imports - list := append(([]*types.Package)(nil), pkgList[1:]...) - sort.Sort(byPath(list)) - localpkg.SetImports(list) - - // package was imported completely and without errors - localpkg.MarkComplete() - - consumed, _ := r.Seek(0, io.SeekCurrent) - return int(consumed), localpkg, nil -} - -type iimporter struct { - ipath string - version int - - stringData []byte - stringCache map[uint64]string - pkgCache map[uint64]*types.Package - - declData []byte - pkgIndex map[*types.Package]map[string]uint64 - typCache map[uint64]types.Type - - fake fakeFileSet - interfaceList []*types.Interface -} - -func (p *iimporter) doDecl(pkg *types.Package, name string) { - // See if we've already imported this declaration. - if obj := pkg.Scope().Lookup(name); obj != nil { - return - } - - off, ok := p.pkgIndex[pkg][name] - if !ok { - errorf("%v.%v not in index", pkg, name) - } - - r := &importReader{p: p, currPkg: pkg} - r.declReader.Reset(p.declData[off:]) - - r.obj(name) -} - -func (p *iimporter) stringAt(off uint64) string { - if s, ok := p.stringCache[off]; ok { - return s - } - - slen, n := binary.Uvarint(p.stringData[off:]) - if n <= 0 { - errorf("varint failed") - } - spos := off + uint64(n) - s := string(p.stringData[spos : spos+slen]) - p.stringCache[off] = s - return s -} - -func (p *iimporter) pkgAt(off uint64) *types.Package { - if pkg, ok := p.pkgCache[off]; ok { - return pkg - } - path := p.stringAt(off) - errorf("missing package %q in %q", path, p.ipath) - return nil -} - -func (p *iimporter) typAt(off uint64, base *types.Named) types.Type { - if t, ok := p.typCache[off]; ok && (base == nil || !isInterface(t)) { - return t - } - - if off < predeclReserved { - errorf("predeclared type missing from cache: %v", off) - } - - r := &importReader{p: p} - r.declReader.Reset(p.declData[off-predeclReserved:]) - t := r.doType(base) - - if base == nil || !isInterface(t) { - p.typCache[off] = t - } - return t -} - -type importReader struct { - p *iimporter - declReader bytes.Reader - currPkg *types.Package - prevFile string - prevLine int64 - prevColumn int64 -} - -func (r *importReader) obj(name string) { - tag := r.byte() - pos := r.pos() - - switch tag { - case 'A': - typ := r.typ() - - r.declare(types.NewTypeName(pos, r.currPkg, name, typ)) - - case 'C': - typ, val := r.value() - - r.declare(types.NewConst(pos, r.currPkg, name, typ, val)) - - case 'F': - sig := r.signature(nil) - - r.declare(types.NewFunc(pos, r.currPkg, name, sig)) - - case 'T': - // Types can be recursive. We need to setup a stub - // declaration before recursing. - obj := types.NewTypeName(pos, r.currPkg, name, nil) - named := types.NewNamed(obj, nil, nil) - r.declare(obj) - - underlying := r.p.typAt(r.uint64(), named).Underlying() - named.SetUnderlying(underlying) - - if !isInterface(underlying) { - for n := r.uint64(); n > 0; n-- { - mpos := r.pos() - mname := r.ident() - recv := r.param() - msig := r.signature(recv) - - named.AddMethod(types.NewFunc(mpos, r.currPkg, mname, msig)) - } - } - - case 'V': - typ := r.typ() - - r.declare(types.NewVar(pos, r.currPkg, name, typ)) - - default: - errorf("unexpected tag: %v", tag) - } -} - -func (r *importReader) declare(obj types.Object) { - obj.Pkg().Scope().Insert(obj) -} - -func (r *importReader) value() (typ types.Type, val constant.Value) { - typ = r.typ() - - switch b := typ.Underlying().(*types.Basic); b.Info() & types.IsConstType { - case types.IsBoolean: - val = constant.MakeBool(r.bool()) - - case types.IsString: - val = constant.MakeString(r.string()) - - case types.IsInteger: - val = r.mpint(b) - - case types.IsFloat: - val = r.mpfloat(b) - - case types.IsComplex: - re := r.mpfloat(b) - im := r.mpfloat(b) - val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) - - default: - if b.Kind() == types.Invalid { - val = constant.MakeUnknown() - return - } - errorf("unexpected type %v", typ) // panics - panic("unreachable") - } - - return -} - -func intSize(b *types.Basic) (signed bool, maxBytes uint) { - if (b.Info() & types.IsUntyped) != 0 { - return true, 64 - } - - switch b.Kind() { - case types.Float32, types.Complex64: - return true, 3 - case types.Float64, types.Complex128: - return true, 7 - } - - signed = (b.Info() & types.IsUnsigned) == 0 - switch b.Kind() { - case types.Int8, types.Uint8: - maxBytes = 1 - case types.Int16, types.Uint16: - maxBytes = 2 - case types.Int32, types.Uint32: - maxBytes = 4 - default: - maxBytes = 8 - } - - return -} - -func (r *importReader) mpint(b *types.Basic) constant.Value { - signed, maxBytes := intSize(b) - - maxSmall := 256 - maxBytes - if signed { - maxSmall = 256 - 2*maxBytes - } - if maxBytes == 1 { - maxSmall = 256 - } - - n, _ := r.declReader.ReadByte() - if uint(n) < maxSmall { - v := int64(n) - if signed { - v >>= 1 - if n&1 != 0 { - v = ^v - } - } - return constant.MakeInt64(v) - } - - v := -n - if signed { - v = -(n &^ 1) >> 1 - } - if v < 1 || uint(v) > maxBytes { - errorf("weird decoding: %v, %v => %v", n, signed, v) - } - - buf := make([]byte, v) - io.ReadFull(&r.declReader, buf) - - // convert to little endian - // TODO(gri) go/constant should have a more direct conversion function - // (e.g., once it supports a big.Float based implementation) - for i, j := 0, len(buf)-1; i < j; i, j = i+1, j-1 { - buf[i], buf[j] = buf[j], buf[i] - } - - x := constant.MakeFromBytes(buf) - if signed && n&1 != 0 { - x = constant.UnaryOp(token.SUB, x, 0) - } - return x -} - -func (r *importReader) mpfloat(b *types.Basic) constant.Value { - x := r.mpint(b) - if constant.Sign(x) == 0 { - return x - } - - exp := r.int64() - switch { - case exp > 0: - x = constant.Shift(x, token.SHL, uint(exp)) - case exp < 0: - d := constant.Shift(constant.MakeInt64(1), token.SHL, uint(-exp)) - x = constant.BinaryOp(x, token.QUO, d) - } - return x -} - -func (r *importReader) ident() string { - return r.string() -} - -func (r *importReader) qualifiedIdent() (*types.Package, string) { - name := r.string() - pkg := r.pkg() - return pkg, name -} - -func (r *importReader) pos() token.Pos { - if r.p.version >= 1 { - r.posv1() - } else { - r.posv0() - } - - if r.prevFile == "" && r.prevLine == 0 && r.prevColumn == 0 { - return token.NoPos - } - return r.p.fake.pos(r.prevFile, int(r.prevLine), int(r.prevColumn)) -} - -func (r *importReader) posv0() { - delta := r.int64() - if delta != deltaNewFile { - r.prevLine += delta - } else if l := r.int64(); l == -1 { - r.prevLine += deltaNewFile - } else { - r.prevFile = r.string() - r.prevLine = l - } -} - -func (r *importReader) posv1() { - delta := r.int64() - r.prevColumn += delta >> 1 - if delta&1 != 0 { - delta = r.int64() - r.prevLine += delta >> 1 - if delta&1 != 0 { - r.prevFile = r.string() - } - } -} - -func (r *importReader) typ() types.Type { - return r.p.typAt(r.uint64(), nil) -} - -func isInterface(t types.Type) bool { - _, ok := t.(*types.Interface) - return ok -} - -func (r *importReader) pkg() *types.Package { return r.p.pkgAt(r.uint64()) } -func (r *importReader) string() string { return r.p.stringAt(r.uint64()) } - -func (r *importReader) doType(base *types.Named) types.Type { - switch k := r.kind(); k { - default: - errorf("unexpected kind tag in %q: %v", r.p.ipath, k) - return nil - - case definedType: - pkg, name := r.qualifiedIdent() - r.p.doDecl(pkg, name) - return pkg.Scope().Lookup(name).(*types.TypeName).Type() - case pointerType: - return types.NewPointer(r.typ()) - case sliceType: - return types.NewSlice(r.typ()) - case arrayType: - n := r.uint64() - return types.NewArray(r.typ(), int64(n)) - case chanType: - dir := chanDir(int(r.uint64())) - return types.NewChan(dir, r.typ()) - case mapType: - return types.NewMap(r.typ(), r.typ()) - case signatureType: - r.currPkg = r.pkg() - return r.signature(nil) - - case structType: - r.currPkg = r.pkg() - - fields := make([]*types.Var, r.uint64()) - tags := make([]string, len(fields)) - for i := range fields { - fpos := r.pos() - fname := r.ident() - ftyp := r.typ() - emb := r.bool() - tag := r.string() - - fields[i] = types.NewField(fpos, r.currPkg, fname, ftyp, emb) - tags[i] = tag - } - return types.NewStruct(fields, tags) - - case interfaceType: - r.currPkg = r.pkg() - - embeddeds := make([]types.Type, r.uint64()) - for i := range embeddeds { - _ = r.pos() - embeddeds[i] = r.typ() - } - - methods := make([]*types.Func, r.uint64()) - for i := range methods { - mpos := r.pos() - mname := r.ident() - - // TODO(mdempsky): Matches bimport.go, but I - // don't agree with this. - var recv *types.Var - if base != nil { - recv = types.NewVar(token.NoPos, r.currPkg, "", base) - } - - msig := r.signature(recv) - methods[i] = types.NewFunc(mpos, r.currPkg, mname, msig) - } - - typ := newInterface(methods, embeddeds) - r.p.interfaceList = append(r.p.interfaceList, typ) - return typ - } -} - -func (r *importReader) kind() itag { - return itag(r.uint64()) -} - -func (r *importReader) signature(recv *types.Var) *types.Signature { - params := r.paramList() - results := r.paramList() - variadic := params.Len() > 0 && r.bool() - return types.NewSignature(recv, params, results, variadic) -} - -func (r *importReader) paramList() *types.Tuple { - xs := make([]*types.Var, r.uint64()) - for i := range xs { - xs[i] = r.param() - } - return types.NewTuple(xs...) -} - -func (r *importReader) param() *types.Var { - pos := r.pos() - name := r.ident() - typ := r.typ() - return types.NewParam(pos, r.currPkg, name, typ) -} - -func (r *importReader) bool() bool { - return r.uint64() != 0 -} - -func (r *importReader) int64() int64 { - n, err := binary.ReadVarint(&r.declReader) - if err != nil { - errorf("readVarint: %v", err) - } - return n -} - -func (r *importReader) uint64() uint64 { - n, err := binary.ReadUvarint(&r.declReader) - if err != nil { - errorf("readUvarint: %v", err) - } - return n -} - -func (r *importReader) byte() byte { - x, err := r.declReader.ReadByte() - if err != nil { - errorf("declReader.ReadByte: %v", err) - } - return x -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go deleted file mode 100644 index 463f2522714..00000000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.11 - -package gcimporter - -import "go/types" - -func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { - named := make([]*types.Named, len(embeddeds)) - for i, e := range embeddeds { - var ok bool - named[i], ok = e.(*types.Named) - if !ok { - panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11") - } - } - return types.NewInterface(methods, named) -} diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go deleted file mode 100644 index ab28b95cbb8..00000000000 --- a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.11 - -package gcimporter - -import "go/types" - -func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { - return types.NewInterfaceType(methods, embeddeds) -} diff --git a/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go b/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go deleted file mode 100644 index ea15d57be1a..00000000000 --- a/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package packagesdriver fetches type sizes for go/packages and go/analysis. -package packagesdriver - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "go/types" - "log" - "os" - "os/exec" - "strings" - "time" -) - -var debug = false - -// GetSizes returns the sizes used by the underlying driver with the given parameters. -func GetSizes(ctx context.Context, buildFlags, env []string, dir string, usesExportData bool) (types.Sizes, error) { - // TODO(matloob): Clean this up. This code is mostly a copy of packages.findExternalDriver. - const toolPrefix = "GOPACKAGESDRIVER=" - tool := "" - for _, env := range env { - if val := strings.TrimPrefix(env, toolPrefix); val != env { - tool = val - } - } - - if tool == "" { - var err error - tool, err = exec.LookPath("gopackagesdriver") - if err != nil { - // We did not find the driver, so use "go list". - tool = "off" - } - } - - if tool == "off" { - return GetSizesGolist(ctx, buildFlags, env, dir, usesExportData) - } - - req, err := json.Marshal(struct { - Command string `json:"command"` - Env []string `json:"env"` - BuildFlags []string `json:"build_flags"` - }{ - Command: "sizes", - Env: env, - BuildFlags: buildFlags, - }) - if err != nil { - return nil, fmt.Errorf("failed to encode message to driver tool: %v", err) - } - - buf := new(bytes.Buffer) - cmd := exec.CommandContext(ctx, tool) - cmd.Dir = dir - cmd.Env = env - cmd.Stdin = bytes.NewReader(req) - cmd.Stdout = buf - cmd.Stderr = new(bytes.Buffer) - if err := cmd.Run(); err != nil { - return nil, fmt.Errorf("%v: %v: %s", tool, err, cmd.Stderr) - } - var response struct { - // Sizes, if not nil, is the types.Sizes to use when type checking. - Sizes *types.StdSizes - } - if err := json.Unmarshal(buf.Bytes(), &response); err != nil { - return nil, err - } - return response.Sizes, nil -} - -func GetSizesGolist(ctx context.Context, buildFlags, env []string, dir string, usesExportData bool) (types.Sizes, error) { - args := []string{"list", "-f", "{{context.GOARCH}} {{context.Compiler}}"} - args = append(args, buildFlags...) - args = append(args, "--", "unsafe") - stdout, err := InvokeGo(ctx, env, dir, usesExportData, args...) - var goarch, compiler string - if err != nil { - if strings.Contains(err.Error(), "cannot find main module") { - // User's running outside of a module. All bets are off. Get GOARCH and guess compiler is gc. - // TODO(matloob): Is this a problem in practice? - envout, enverr := InvokeGo(ctx, env, dir, usesExportData, "env", "GOARCH") - if enverr != nil { - return nil, err - } - goarch = strings.TrimSpace(envout.String()) - compiler = "gc" - } else { - return nil, err - } - } else { - fields := strings.Fields(stdout.String()) - if len(fields) < 2 { - return nil, fmt.Errorf("could not determine GOARCH and Go compiler") - } - goarch = fields[0] - compiler = fields[1] - } - return types.SizesFor(compiler, goarch), nil -} - -// InvokeGo returns the stdout of a go command invocation. -func InvokeGo(ctx context.Context, env []string, dir string, usesExportData bool, args ...string) (*bytes.Buffer, error) { - if debug { - defer func(start time.Time) { log.Printf("%s for %v", time.Since(start), cmdDebugStr(env, args...)) }(time.Now()) - } - stdout := new(bytes.Buffer) - stderr := new(bytes.Buffer) - cmd := exec.CommandContext(ctx, "go", args...) - // On darwin the cwd gets resolved to the real path, which breaks anything that - // expects the working directory to keep the original path, including the - // go command when dealing with modules. - // The Go stdlib has a special feature where if the cwd and the PWD are the - // same node then it trusts the PWD, so by setting it in the env for the child - // process we fix up all the paths returned by the go command. - cmd.Env = append(append([]string{}, env...), "PWD="+dir) - cmd.Dir = dir - cmd.Stdout = stdout - cmd.Stderr = stderr - if err := cmd.Run(); err != nil { - exitErr, ok := err.(*exec.ExitError) - if !ok { - // Catastrophic error: - // - executable not found - // - context cancellation - return nil, fmt.Errorf("couldn't exec 'go %v': %s %T", args, err, err) - } - - // Export mode entails a build. - // If that build fails, errors appear on stderr - // (despite the -e flag) and the Export field is blank. - // Do not fail in that case. - if !usesExportData { - return nil, fmt.Errorf("go %v: %s: %s", args, exitErr, stderr) - } - } - - // As of writing, go list -export prints some non-fatal compilation - // errors to stderr, even with -e set. We would prefer that it put - // them in the Package.Error JSON (see https://golang.org/issue/26319). - // In the meantime, there's nowhere good to put them, but they can - // be useful for debugging. Print them if $GOPACKAGESPRINTGOLISTERRORS - // is set. - if len(stderr.Bytes()) != 0 && os.Getenv("GOPACKAGESPRINTGOLISTERRORS") != "" { - fmt.Fprintf(os.Stderr, "%s stderr: <<%s>>\n", cmdDebugStr(env, args...), stderr) - } - - // debugging - if false { - fmt.Fprintf(os.Stderr, "%s stdout: <<%s>>\n", cmdDebugStr(env, args...), stdout) - } - - return stdout, nil -} - -func cmdDebugStr(envlist []string, args ...string) string { - env := make(map[string]string) - for _, kv := range envlist { - split := strings.Split(kv, "=") - k, v := split[0], split[1] - env[k] = v - } - - return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v PWD=%v go %v", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["PWD"], args) -} diff --git a/vendor/golang.org/x/tools/go/packages/doc.go b/vendor/golang.org/x/tools/go/packages/doc.go deleted file mode 100644 index 3799f8ed8be..00000000000 --- a/vendor/golang.org/x/tools/go/packages/doc.go +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package packages loads Go packages for inspection and analysis. - -The Load function takes as input a list of patterns and return a list of Package -structs describing individual packages matched by those patterns. -The LoadMode controls the amount of detail in the loaded packages. - -Load passes most patterns directly to the underlying build tool, -but all patterns with the prefix "query=", where query is a -non-empty string of letters from [a-z], are reserved and may be -interpreted as query operators. - -Two query operators are currently supported: "file" and "pattern". - -The query "file=path/to/file.go" matches the package or packages enclosing -the Go source file path/to/file.go. For example "file=~/go/src/fmt/print.go" -might return the packages "fmt" and "fmt [fmt.test]". - -The query "pattern=string" causes "string" to be passed directly to -the underlying build tool. In most cases this is unnecessary, -but an application can use Load("pattern=" + x) as an escaping mechanism -to ensure that x is not interpreted as a query operator if it contains '='. - -All other query operators are reserved for future use and currently -cause Load to report an error. - -The Package struct provides basic information about the package, including - - - ID, a unique identifier for the package in the returned set; - - GoFiles, the names of the package's Go source files; - - Imports, a map from source import strings to the Packages they name; - - Types, the type information for the package's exported symbols; - - Syntax, the parsed syntax trees for the package's source code; and - - TypeInfo, the result of a complete type-check of the package syntax trees. - -(See the documentation for type Package for the complete list of fields -and more detailed descriptions.) - -For example, - - Load(nil, "bytes", "unicode...") - -returns four Package structs describing the standard library packages -bytes, unicode, unicode/utf16, and unicode/utf8. Note that one pattern -can match multiple packages and that a package might be matched by -multiple patterns: in general it is not possible to determine which -packages correspond to which patterns. - -Note that the list returned by Load contains only the packages matched -by the patterns. Their dependencies can be found by walking the import -graph using the Imports fields. - -The Load function can be configured by passing a pointer to a Config as -the first argument. A nil Config is equivalent to the zero Config, which -causes Load to run in LoadFiles mode, collecting minimal information. -See the documentation for type Config for details. - -As noted earlier, the Config.Mode controls the amount of detail -reported about the loaded packages, with each mode returning all the data of the -previous mode with some extra added. See the documentation for type LoadMode -for details. - -Most tools should pass their command-line arguments (after any flags) -uninterpreted to the loader, so that the loader can interpret them -according to the conventions of the underlying build system. -See the Example function for typical usage. - -*/ -package packages // import "golang.org/x/tools/go/packages" - -/* - -Motivation and design considerations - -The new package's design solves problems addressed by two existing -packages: go/build, which locates and describes packages, and -golang.org/x/tools/go/loader, which loads, parses and type-checks them. -The go/build.Package structure encodes too much of the 'go build' way -of organizing projects, leaving us in need of a data type that describes a -package of Go source code independent of the underlying build system. -We wanted something that works equally well with go build and vgo, and -also other build systems such as Bazel and Blaze, making it possible to -construct analysis tools that work in all these environments. -Tools such as errcheck and staticcheck were essentially unavailable to -the Go community at Google, and some of Google's internal tools for Go -are unavailable externally. -This new package provides a uniform way to obtain package metadata by -querying each of these build systems, optionally supporting their -preferred command-line notations for packages, so that tools integrate -neatly with users' build environments. The Metadata query function -executes an external query tool appropriate to the current workspace. - -Loading packages always returns the complete import graph "all the way down", -even if all you want is information about a single package, because the query -mechanisms of all the build systems we currently support ({go,vgo} list, and -blaze/bazel aspect-based query) cannot provide detailed information -about one package without visiting all its dependencies too, so there is -no additional asymptotic cost to providing transitive information. -(This property might not be true of a hypothetical 5th build system.) - -In calls to TypeCheck, all initial packages, and any package that -transitively depends on one of them, must be loaded from source. -Consider A->B->C->D->E: if A,C are initial, A,B,C must be loaded from -source; D may be loaded from export data, and E may not be loaded at all -(though it's possible that D's export data mentions it, so a -types.Package may be created for it and exposed.) - -The old loader had a feature to suppress type-checking of function -bodies on a per-package basis, primarily intended to reduce the work of -obtaining type information for imported packages. Now that imports are -satisfied by export data, the optimization no longer seems necessary. - -Despite some early attempts, the old loader did not exploit export data, -instead always using the equivalent of WholeProgram mode. This was due -to the complexity of mixing source and export data packages (now -resolved by the upward traversal mentioned above), and because export data -files were nearly always missing or stale. Now that 'go build' supports -caching, all the underlying build systems can guarantee to produce -export data in a reasonable (amortized) time. - -Test "main" packages synthesized by the build system are now reported as -first-class packages, avoiding the need for clients (such as go/ssa) to -reinvent this generation logic. - -One way in which go/packages is simpler than the old loader is in its -treatment of in-package tests. In-package tests are packages that -consist of all the files of the library under test, plus the test files. -The old loader constructed in-package tests by a two-phase process of -mutation called "augmentation": first it would construct and type check -all the ordinary library packages and type-check the packages that -depend on them; then it would add more (test) files to the package and -type-check again. This two-phase approach had four major problems: -1) in processing the tests, the loader modified the library package, - leaving no way for a client application to see both the test - package and the library package; one would mutate into the other. -2) because test files can declare additional methods on types defined in - the library portion of the package, the dispatch of method calls in - the library portion was affected by the presence of the test files. - This should have been a clue that the packages were logically - different. -3) this model of "augmentation" assumed at most one in-package test - per library package, which is true of projects using 'go build', - but not other build systems. -4) because of the two-phase nature of test processing, all packages that - import the library package had to be processed before augmentation, - forcing a "one-shot" API and preventing the client from calling Load - in several times in sequence as is now possible in WholeProgram mode. - (TypeCheck mode has a similar one-shot restriction for a different reason.) - -Early drafts of this package supported "multi-shot" operation. -Although it allowed clients to make a sequence of calls (or concurrent -calls) to Load, building up the graph of Packages incrementally, -it was of marginal value: it complicated the API -(since it allowed some options to vary across calls but not others), -it complicated the implementation, -it cannot be made to work in Types mode, as explained above, -and it was less efficient than making one combined call (when this is possible). -Among the clients we have inspected, none made multiple calls to load -but could not be easily and satisfactorily modified to make only a single call. -However, applications changes may be required. -For example, the ssadump command loads the user-specified packages -and in addition the runtime package. It is tempting to simply append -"runtime" to the user-provided list, but that does not work if the user -specified an ad-hoc package such as [a.go b.go]. -Instead, ssadump no longer requests the runtime package, -but seeks it among the dependencies of the user-specified packages, -and emits an error if it is not found. - -Overlays: The Overlay field in the Config allows providing alternate contents -for Go source files, by providing a mapping from file path to contents. -go/packages will pull in new imports added in overlay files when go/packages -is run in LoadImports mode or greater. -Overlay support for the go list driver isn't complete yet: if the file doesn't -exist on disk, it will only be recognized in an overlay if it is a non-test file -and the package would be reported even without the overlay. - -Questions & Tasks - -- Add GOARCH/GOOS? - They are not portable concepts, but could be made portable. - Our goal has been to allow users to express themselves using the conventions - of the underlying build system: if the build system honors GOARCH - during a build and during a metadata query, then so should - applications built atop that query mechanism. - Conversely, if the target architecture of the build is determined by - command-line flags, the application can pass the relevant - flags through to the build system using a command such as: - myapp -query_flag="--cpu=amd64" -query_flag="--os=darwin" - However, this approach is low-level, unwieldy, and non-portable. - GOOS and GOARCH seem important enough to warrant a dedicated option. - -- How should we handle partial failures such as a mixture of good and - malformed patterns, existing and non-existent packages, successful and - failed builds, import failures, import cycles, and so on, in a call to - Load? - -- Support bazel, blaze, and go1.10 list, not just go1.11 list. - -- Handle (and test) various partial success cases, e.g. - a mixture of good packages and: - invalid patterns - nonexistent packages - empty packages - packages with malformed package or import declarations - unreadable files - import cycles - other parse errors - type errors - Make sure we record errors at the correct place in the graph. - -- Missing packages among initial arguments are not reported. - Return bogus packages for them, like golist does. - -- "undeclared name" errors (for example) are reported out of source file - order. I suspect this is due to the breadth-first resolution now used - by go/types. Is that a bug? Discuss with gri. - -*/ diff --git a/vendor/golang.org/x/tools/go/packages/external.go b/vendor/golang.org/x/tools/go/packages/external.go deleted file mode 100644 index b696b687097..00000000000 --- a/vendor/golang.org/x/tools/go/packages/external.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file enables an external tool to intercept package requests. -// If the tool is present then its results are used in preference to -// the go list command. - -package packages - -import ( - "bytes" - "encoding/json" - "fmt" - "os/exec" - "strings" -) - -// The Driver Protocol -// -// The driver, given the inputs to a call to Load, returns metadata about the packages specified. -// This allows for different build systems to support go/packages by telling go/packages how the -// packages' source is organized. -// The driver is a binary, either specified by the GOPACKAGESDRIVER environment variable or in -// the path as gopackagesdriver. It's given the inputs to load in its argv. See the package -// documentation in doc.go for the full description of the patterns that need to be supported. -// A driver receives as a JSON-serialized driverRequest struct in standard input and will -// produce a JSON-serialized driverResponse (see definition in packages.go) in its standard output. - -// driverRequest is used to provide the portion of Load's Config that is needed by a driver. -type driverRequest struct { - Mode LoadMode `json:"mode"` - // Env specifies the environment the underlying build system should be run in. - Env []string `json:"env"` - // BuildFlags are flags that should be passed to the underlying build system. - BuildFlags []string `json:"build_flags"` - // Tests specifies whether the patterns should also return test packages. - Tests bool `json:"tests"` - // Overlay maps file paths (relative to the driver's working directory) to the byte contents - // of overlay files. - Overlay map[string][]byte `json:"overlay"` -} - -// findExternalDriver returns the file path of a tool that supplies -// the build system package structure, or "" if not found." -// If GOPACKAGESDRIVER is set in the environment findExternalTool returns its -// value, otherwise it searches for a binary named gopackagesdriver on the PATH. -func findExternalDriver(cfg *Config) driver { - const toolPrefix = "GOPACKAGESDRIVER=" - tool := "" - for _, env := range cfg.Env { - if val := strings.TrimPrefix(env, toolPrefix); val != env { - tool = val - } - } - if tool != "" && tool == "off" { - return nil - } - if tool == "" { - var err error - tool, err = exec.LookPath("gopackagesdriver") - if err != nil { - return nil - } - } - return func(cfg *Config, words ...string) (*driverResponse, error) { - req, err := json.Marshal(driverRequest{ - Mode: cfg.Mode, - Env: cfg.Env, - BuildFlags: cfg.BuildFlags, - Tests: cfg.Tests, - Overlay: cfg.Overlay, - }) - if err != nil { - return nil, fmt.Errorf("failed to encode message to driver tool: %v", err) - } - - buf := new(bytes.Buffer) - cmd := exec.CommandContext(cfg.Context, tool, words...) - cmd.Dir = cfg.Dir - cmd.Env = cfg.Env - cmd.Stdin = bytes.NewReader(req) - cmd.Stdout = buf - cmd.Stderr = new(bytes.Buffer) - if err := cmd.Run(); err != nil { - return nil, fmt.Errorf("%v: %v: %s", tool, err, cmd.Stderr) - } - var response driverResponse - if err := json.Unmarshal(buf.Bytes(), &response); err != nil { - return nil, err - } - return &response, nil - } -} diff --git a/vendor/golang.org/x/tools/go/packages/golist.go b/vendor/golang.org/x/tools/go/packages/golist.go deleted file mode 100644 index 6bfde438601..00000000000 --- a/vendor/golang.org/x/tools/go/packages/golist.go +++ /dev/null @@ -1,1122 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package packages - -import ( - "bytes" - "encoding/json" - "fmt" - "go/types" - "io/ioutil" - "log" - "os" - "os/exec" - "path" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "sync" - "time" - "unicode" - - "golang.org/x/tools/go/internal/packagesdriver" - "golang.org/x/tools/internal/gopathwalk" - "golang.org/x/tools/internal/semver" - "golang.org/x/tools/internal/span" -) - -// debug controls verbose logging. -var debug, _ = strconv.ParseBool(os.Getenv("GOPACKAGESDEBUG")) - -// A goTooOldError reports that the go command -// found by exec.LookPath is too old to use the new go list behavior. -type goTooOldError struct { - error -} - -// responseDeduper wraps a driverResponse, deduplicating its contents. -type responseDeduper struct { - seenRoots map[string]bool - seenPackages map[string]*Package - dr *driverResponse -} - -// init fills in r with a driverResponse. -func (r *responseDeduper) init(dr *driverResponse) { - r.dr = dr - r.seenRoots = map[string]bool{} - r.seenPackages = map[string]*Package{} - for _, pkg := range dr.Packages { - r.seenPackages[pkg.ID] = pkg - } - for _, root := range dr.Roots { - r.seenRoots[root] = true - } -} - -func (r *responseDeduper) addPackage(p *Package) { - if r.seenPackages[p.ID] != nil { - return - } - r.seenPackages[p.ID] = p - r.dr.Packages = append(r.dr.Packages, p) -} - -func (r *responseDeduper) addRoot(id string) { - if r.seenRoots[id] { - return - } - r.seenRoots[id] = true - r.dr.Roots = append(r.dr.Roots, id) -} - -// goInfo contains global information from the go tool. -type goInfo struct { - rootDirs map[string]string - env goEnv -} - -type goEnv struct { - modulesOn bool -} - -func determineEnv(cfg *Config) goEnv { - buf, err := invokeGo(cfg, "env", "GOMOD") - if err != nil { - return goEnv{} - } - gomod := bytes.TrimSpace(buf.Bytes()) - - env := goEnv{} - env.modulesOn = len(gomod) > 0 - return env -} - -// goListDriver uses the go list command to interpret the patterns and produce -// the build system package structure. -// See driver for more details. -func goListDriver(cfg *Config, patterns ...string) (*driverResponse, error) { - var sizes types.Sizes - var sizeserr error - var sizeswg sync.WaitGroup - if cfg.Mode&NeedTypesSizes != 0 || cfg.Mode&NeedTypes != 0 { - sizeswg.Add(1) - go func() { - sizes, sizeserr = getSizes(cfg) - sizeswg.Done() - }() - } - - // start fetching rootDirs - var info goInfo - var rootDirsReady, envReady = make(chan struct{}), make(chan struct{}) - go func() { - info.rootDirs = determineRootDirs(cfg) - close(rootDirsReady) - }() - go func() { - info.env = determineEnv(cfg) - close(envReady) - }() - getGoInfo := func() *goInfo { - <-rootDirsReady - <-envReady - return &info - } - - // always pass getGoInfo to golistDriver - golistDriver := func(cfg *Config, patterns ...string) (*driverResponse, error) { - return golistDriver(cfg, getGoInfo, patterns...) - } - - // Determine files requested in contains patterns - var containFiles []string - var packagesNamed []string - restPatterns := make([]string, 0, len(patterns)) - // Extract file= and other [querytype]= patterns. Report an error if querytype - // doesn't exist. -extractQueries: - for _, pattern := range patterns { - eqidx := strings.Index(pattern, "=") - if eqidx < 0 { - restPatterns = append(restPatterns, pattern) - } else { - query, value := pattern[:eqidx], pattern[eqidx+len("="):] - switch query { - case "file": - containFiles = append(containFiles, value) - case "pattern": - restPatterns = append(restPatterns, value) - case "iamashamedtousethedisabledqueryname": - packagesNamed = append(packagesNamed, value) - case "": // not a reserved query - restPatterns = append(restPatterns, pattern) - default: - for _, rune := range query { - if rune < 'a' || rune > 'z' { // not a reserved query - restPatterns = append(restPatterns, pattern) - continue extractQueries - } - } - // Reject all other patterns containing "=" - return nil, fmt.Errorf("invalid query type %q in query pattern %q", query, pattern) - } - } - } - - response := &responseDeduper{} - var err error - - // See if we have any patterns to pass through to go list. Zero initial - // patterns also requires a go list call, since it's the equivalent of - // ".". - if len(restPatterns) > 0 || len(patterns) == 0 { - dr, err := golistDriver(cfg, restPatterns...) - if err != nil { - return nil, err - } - response.init(dr) - } else { - response.init(&driverResponse{}) - } - - sizeswg.Wait() - if sizeserr != nil { - return nil, sizeserr - } - // types.SizesFor always returns nil or a *types.StdSizes - response.dr.Sizes, _ = sizes.(*types.StdSizes) - - var containsCandidates []string - - if len(containFiles) != 0 { - if err := runContainsQueries(cfg, golistDriver, response, containFiles, getGoInfo); err != nil { - return nil, err - } - } - - if len(packagesNamed) != 0 { - if err := runNamedQueries(cfg, golistDriver, response, packagesNamed); err != nil { - return nil, err - } - } - - modifiedPkgs, needPkgs, err := processGolistOverlay(cfg, response, getGoInfo) - if err != nil { - return nil, err - } - if len(containFiles) > 0 { - containsCandidates = append(containsCandidates, modifiedPkgs...) - containsCandidates = append(containsCandidates, needPkgs...) - } - if err := addNeededOverlayPackages(cfg, golistDriver, response, needPkgs, getGoInfo); err != nil { - return nil, err - } - // Check candidate packages for containFiles. - if len(containFiles) > 0 { - for _, id := range containsCandidates { - pkg, ok := response.seenPackages[id] - if !ok { - response.addPackage(&Package{ - ID: id, - Errors: []Error{ - { - Kind: ListError, - Msg: fmt.Sprintf("package %s expected but not seen", id), - }, - }, - }) - continue - } - for _, f := range containFiles { - for _, g := range pkg.GoFiles { - if sameFile(f, g) { - response.addRoot(id) - } - } - } - } - } - - return response.dr, nil -} - -func addNeededOverlayPackages(cfg *Config, driver driver, response *responseDeduper, pkgs []string, getGoInfo func() *goInfo) error { - if len(pkgs) == 0 { - return nil - } - drivercfg := *cfg - if getGoInfo().env.modulesOn { - drivercfg.BuildFlags = append(drivercfg.BuildFlags, "-mod=readonly") - } - dr, err := driver(&drivercfg, pkgs...) - - if err != nil { - return err - } - for _, pkg := range dr.Packages { - response.addPackage(pkg) - } - _, needPkgs, err := processGolistOverlay(cfg, response, getGoInfo) - if err != nil { - return err - } - if err := addNeededOverlayPackages(cfg, driver, response, needPkgs, getGoInfo); err != nil { - return err - } - return nil -} - -func runContainsQueries(cfg *Config, driver driver, response *responseDeduper, queries []string, goInfo func() *goInfo) error { - for _, query := range queries { - // TODO(matloob): Do only one query per directory. - fdir := filepath.Dir(query) - // Pass absolute path of directory to go list so that it knows to treat it as a directory, - // not a package path. - pattern, err := filepath.Abs(fdir) - if err != nil { - return fmt.Errorf("could not determine absolute path of file= query path %q: %v", query, err) - } - dirResponse, err := driver(cfg, pattern) - if err != nil { - var queryErr error - if dirResponse, queryErr = adHocPackage(cfg, driver, pattern, query); queryErr != nil { - return err // return the original error - } - } - // `go list` can report errors for files that are not listed as part of a package's GoFiles. - // In the case of an invalid Go file, we should assume that it is part of package if only - // one package is in the response. The file may have valid contents in an overlay. - if len(dirResponse.Packages) == 1 { - pkg := dirResponse.Packages[0] - for i, err := range pkg.Errors { - s := errorSpan(err) - if !s.IsValid() { - break - } - if len(pkg.CompiledGoFiles) == 0 { - break - } - dir := filepath.Dir(pkg.CompiledGoFiles[0]) - filename := filepath.Join(dir, filepath.Base(s.URI().Filename())) - if info, err := os.Stat(filename); err != nil || info.IsDir() { - break - } - if !contains(pkg.CompiledGoFiles, filename) { - pkg.CompiledGoFiles = append(pkg.CompiledGoFiles, filename) - pkg.GoFiles = append(pkg.GoFiles, filename) - pkg.Errors = append(pkg.Errors[:i], pkg.Errors[i+1:]...) - } - } - } - // A final attempt to construct an ad-hoc package. - if len(dirResponse.Packages) == 1 && len(dirResponse.Packages[0].Errors) == 1 { - var queryErr error - if dirResponse, queryErr = adHocPackage(cfg, driver, pattern, query); queryErr != nil { - return err // return the original error - } - } - isRoot := make(map[string]bool, len(dirResponse.Roots)) - for _, root := range dirResponse.Roots { - isRoot[root] = true - } - for _, pkg := range dirResponse.Packages { - // Add any new packages to the main set - // We don't bother to filter packages that will be dropped by the changes of roots, - // that will happen anyway during graph construction outside this function. - // Over-reporting packages is not a problem. - response.addPackage(pkg) - // if the package was not a root one, it cannot have the file - if !isRoot[pkg.ID] { - continue - } - for _, pkgFile := range pkg.GoFiles { - if filepath.Base(query) == filepath.Base(pkgFile) { - response.addRoot(pkg.ID) - break - } - } - } - } - return nil -} - -// adHocPackage attempts to construct an ad-hoc package given a query that failed. -func adHocPackage(cfg *Config, driver driver, pattern, query string) (*driverResponse, error) { - // There was an error loading the package. Try to load the file as an ad-hoc package. - // Usually the error will appear in a returned package, but may not if we're in modules mode - // and the ad-hoc is located outside a module. - dirResponse, err := driver(cfg, query) - if err != nil { - return nil, err - } - // Special case to handle issue #33482: - // If this is a file= query for ad-hoc packages where the file only exists on an overlay, - // and exists outside of a module, add the file in for the package. - if len(dirResponse.Packages) == 1 && (dirResponse.Packages[0].ID == "command-line-arguments" || dirResponse.Packages[0].PkgPath == filepath.ToSlash(query)) { - if len(dirResponse.Packages[0].GoFiles) == 0 { - filename := filepath.Join(pattern, filepath.Base(query)) // avoid recomputing abspath - // TODO(matloob): check if the file is outside of a root dir? - for path := range cfg.Overlay { - if path == filename { - dirResponse.Packages[0].Errors = nil - dirResponse.Packages[0].GoFiles = []string{path} - dirResponse.Packages[0].CompiledGoFiles = []string{path} - } - } - } - } - return dirResponse, nil -} - -func contains(files []string, filename string) bool { - for _, f := range files { - if f == filename { - return true - } - } - return false -} - -// errorSpan attempts to parse a standard `go list` error message -// by stripping off the trailing error message. -// -// It works only on errors whose message is prefixed by colon, -// followed by a space (": "). For example: -// -// attributes.go:13:1: expected 'package', found 'type' -// -func errorSpan(err Error) span.Span { - if err.Pos == "" { - input := strings.TrimSpace(err.Msg) - msgIndex := strings.Index(input, ": ") - if msgIndex < 0 { - return span.Parse(input) - } - return span.Parse(input[:msgIndex]) - } - return span.Parse(err.Pos) -} - -// modCacheRegexp splits a path in a module cache into module, module version, and package. -var modCacheRegexp = regexp.MustCompile(`(.*)@([^/\\]*)(.*)`) - -func runNamedQueries(cfg *Config, driver driver, response *responseDeduper, queries []string) error { - // calling `go env` isn't free; bail out if there's nothing to do. - if len(queries) == 0 { - return nil - } - // Determine which directories are relevant to scan. - roots, modRoot, err := roots(cfg) - if err != nil { - return err - } - - // Scan the selected directories. Simple matches, from GOPATH/GOROOT - // or the local module, can simply be "go list"ed. Matches from the - // module cache need special treatment. - var matchesMu sync.Mutex - var simpleMatches, modCacheMatches []string - add := func(root gopathwalk.Root, dir string) { - // Walk calls this concurrently; protect the result slices. - matchesMu.Lock() - defer matchesMu.Unlock() - - path := dir - if dir != root.Path { - path = dir[len(root.Path)+1:] - } - if pathMatchesQueries(path, queries) { - switch root.Type { - case gopathwalk.RootModuleCache: - modCacheMatches = append(modCacheMatches, path) - case gopathwalk.RootCurrentModule: - // We'd need to read go.mod to find the full - // import path. Relative's easier. - rel, err := filepath.Rel(cfg.Dir, dir) - if err != nil { - // This ought to be impossible, since - // we found dir in the current module. - panic(err) - } - simpleMatches = append(simpleMatches, "./"+rel) - case gopathwalk.RootGOPATH, gopathwalk.RootGOROOT: - simpleMatches = append(simpleMatches, path) - } - } - } - - startWalk := time.Now() - gopathwalk.Walk(roots, add, gopathwalk.Options{ModulesEnabled: modRoot != "", Debug: debug}) - cfg.Logf("%v for walk", time.Since(startWalk)) - - // Weird special case: the top-level package in a module will be in - // whatever directory the user checked the repository out into. It's - // more reasonable for that to not match the package name. So, if there - // are any Go files in the mod root, query it just to be safe. - if modRoot != "" { - rel, err := filepath.Rel(cfg.Dir, modRoot) - if err != nil { - panic(err) // See above. - } - - files, err := ioutil.ReadDir(modRoot) - if err != nil { - panic(err) // See above. - } - - for _, f := range files { - if strings.HasSuffix(f.Name(), ".go") { - simpleMatches = append(simpleMatches, rel) - break - } - } - } - - addResponse := func(r *driverResponse) { - for _, pkg := range r.Packages { - response.addPackage(pkg) - for _, name := range queries { - if pkg.Name == name { - response.addRoot(pkg.ID) - break - } - } - } - } - - if len(simpleMatches) != 0 { - resp, err := driver(cfg, simpleMatches...) - if err != nil { - return err - } - addResponse(resp) - } - - // Module cache matches are tricky. We want to avoid downloading new - // versions of things, so we need to use the ones present in the cache. - // go list doesn't accept version specifiers, so we have to write out a - // temporary module, and do the list in that module. - if len(modCacheMatches) != 0 { - // Collect all the matches, deduplicating by major version - // and preferring the newest. - type modInfo struct { - mod string - major string - } - mods := make(map[modInfo]string) - var imports []string - for _, modPath := range modCacheMatches { - matches := modCacheRegexp.FindStringSubmatch(modPath) - mod, ver := filepath.ToSlash(matches[1]), matches[2] - importPath := filepath.ToSlash(filepath.Join(matches[1], matches[3])) - - major := semver.Major(ver) - if prevVer, ok := mods[modInfo{mod, major}]; !ok || semver.Compare(ver, prevVer) > 0 { - mods[modInfo{mod, major}] = ver - } - - imports = append(imports, importPath) - } - - // Build the temporary module. - var gomod bytes.Buffer - gomod.WriteString("module modquery\nrequire (\n") - for mod, version := range mods { - gomod.WriteString("\t" + mod.mod + " " + version + "\n") - } - gomod.WriteString(")\n") - - tmpCfg := *cfg - - // We're only trying to look at stuff in the module cache, so - // disable the network. This should speed things up, and has - // prevented errors in at least one case, #28518. - tmpCfg.Env = append([]string{"GOPROXY=off"}, cfg.Env...) - - var err error - tmpCfg.Dir, err = ioutil.TempDir("", "gopackages-modquery") - if err != nil { - return err - } - defer os.RemoveAll(tmpCfg.Dir) - - if err := ioutil.WriteFile(filepath.Join(tmpCfg.Dir, "go.mod"), gomod.Bytes(), 0777); err != nil { - return fmt.Errorf("writing go.mod for module cache query: %v", err) - } - - // Run the query, using the import paths calculated from the matches above. - resp, err := driver(&tmpCfg, imports...) - if err != nil { - return fmt.Errorf("querying module cache matches: %v", err) - } - addResponse(resp) - } - - return nil -} - -func getSizes(cfg *Config) (types.Sizes, error) { - return packagesdriver.GetSizesGolist(cfg.Context, cfg.BuildFlags, cfg.Env, cfg.Dir, usesExportData(cfg)) -} - -// roots selects the appropriate paths to walk based on the passed-in configuration, -// particularly the environment and the presence of a go.mod in cfg.Dir's parents. -func roots(cfg *Config) ([]gopathwalk.Root, string, error) { - stdout, err := invokeGo(cfg, "env", "GOROOT", "GOPATH", "GOMOD") - if err != nil { - return nil, "", err - } - - fields := strings.Split(stdout.String(), "\n") - if len(fields) != 4 || len(fields[3]) != 0 { - return nil, "", fmt.Errorf("go env returned unexpected output: %q", stdout.String()) - } - goroot, gopath, gomod := fields[0], filepath.SplitList(fields[1]), fields[2] - var modDir string - if gomod != "" { - modDir = filepath.Dir(gomod) - } - - var roots []gopathwalk.Root - // Always add GOROOT. - roots = append(roots, gopathwalk.Root{ - Path: filepath.Join(goroot, "/src"), - Type: gopathwalk.RootGOROOT, - }) - // If modules are enabled, scan the module dir. - if modDir != "" { - roots = append(roots, gopathwalk.Root{ - Path: modDir, - Type: gopathwalk.RootCurrentModule, - }) - } - // Add either GOPATH/src or GOPATH/pkg/mod, depending on module mode. - for _, p := range gopath { - if modDir != "" { - roots = append(roots, gopathwalk.Root{ - Path: filepath.Join(p, "/pkg/mod"), - Type: gopathwalk.RootModuleCache, - }) - } else { - roots = append(roots, gopathwalk.Root{ - Path: filepath.Join(p, "/src"), - Type: gopathwalk.RootGOPATH, - }) - } - } - - return roots, modDir, nil -} - -// These functions were copied from goimports. See further documentation there. - -// pathMatchesQueries is adapted from pkgIsCandidate. -// TODO: is it reasonable to do Contains here, rather than an exact match on a path component? -func pathMatchesQueries(path string, queries []string) bool { - lastTwo := lastTwoComponents(path) - for _, query := range queries { - if strings.Contains(lastTwo, query) { - return true - } - if hasHyphenOrUpperASCII(lastTwo) && !hasHyphenOrUpperASCII(query) { - lastTwo = lowerASCIIAndRemoveHyphen(lastTwo) - if strings.Contains(lastTwo, query) { - return true - } - } - } - return false -} - -// lastTwoComponents returns at most the last two path components -// of v, using either / or \ as the path separator. -func lastTwoComponents(v string) string { - nslash := 0 - for i := len(v) - 1; i >= 0; i-- { - if v[i] == '/' || v[i] == '\\' { - nslash++ - if nslash == 2 { - return v[i:] - } - } - } - return v -} - -func hasHyphenOrUpperASCII(s string) bool { - for i := 0; i < len(s); i++ { - b := s[i] - if b == '-' || ('A' <= b && b <= 'Z') { - return true - } - } - return false -} - -func lowerASCIIAndRemoveHyphen(s string) (ret string) { - buf := make([]byte, 0, len(s)) - for i := 0; i < len(s); i++ { - b := s[i] - switch { - case b == '-': - continue - case 'A' <= b && b <= 'Z': - buf = append(buf, b+('a'-'A')) - default: - buf = append(buf, b) - } - } - return string(buf) -} - -// Fields must match go list; -// see $GOROOT/src/cmd/go/internal/load/pkg.go. -type jsonPackage struct { - ImportPath string - Dir string - Name string - Export string - GoFiles []string - CompiledGoFiles []string - CFiles []string - CgoFiles []string - CXXFiles []string - MFiles []string - HFiles []string - FFiles []string - SFiles []string - SwigFiles []string - SwigCXXFiles []string - SysoFiles []string - Imports []string - ImportMap map[string]string - Deps []string - TestGoFiles []string - TestImports []string - XTestGoFiles []string - XTestImports []string - ForTest string // q in a "p [q.test]" package, else "" - DepOnly bool - - Error *jsonPackageError -} - -type jsonPackageError struct { - ImportStack []string - Pos string - Err string -} - -func otherFiles(p *jsonPackage) [][]string { - return [][]string{p.CFiles, p.CXXFiles, p.MFiles, p.HFiles, p.FFiles, p.SFiles, p.SwigFiles, p.SwigCXXFiles, p.SysoFiles} -} - -// golistDriver uses the "go list" command to expand the pattern -// words and return metadata for the specified packages. dir may be -// "" and env may be nil, as per os/exec.Command. -func golistDriver(cfg *Config, rootsDirs func() *goInfo, words ...string) (*driverResponse, error) { - // go list uses the following identifiers in ImportPath and Imports: - // - // "p" -- importable package or main (command) - // "q.test" -- q's test executable - // "p [q.test]" -- variant of p as built for q's test executable - // "q_test [q.test]" -- q's external test package - // - // The packages p that are built differently for a test q.test - // are q itself, plus any helpers used by the external test q_test, - // typically including "testing" and all its dependencies. - - // Run "go list" for complete - // information on the specified packages. - buf, err := invokeGo(cfg, golistargs(cfg, words)...) - if err != nil { - return nil, err - } - seen := make(map[string]*jsonPackage) - // Decode the JSON and convert it to Package form. - var response driverResponse - for dec := json.NewDecoder(buf); dec.More(); { - p := new(jsonPackage) - if err := dec.Decode(p); err != nil { - return nil, fmt.Errorf("JSON decoding failed: %v", err) - } - - if p.ImportPath == "" { - // The documentation for go list says that “[e]rroneous packages will have - // a non-empty ImportPath”. If for some reason it comes back empty, we - // prefer to error out rather than silently discarding data or handing - // back a package without any way to refer to it. - if p.Error != nil { - return nil, Error{ - Pos: p.Error.Pos, - Msg: p.Error.Err, - } - } - return nil, fmt.Errorf("package missing import path: %+v", p) - } - - // Work around https://golang.org/issue/33157: - // go list -e, when given an absolute path, will find the package contained at - // that directory. But when no package exists there, it will return a fake package - // with an error and the ImportPath set to the absolute path provided to go list. - // Try to convert that absolute path to what its package path would be if it's - // contained in a known module or GOPATH entry. This will allow the package to be - // properly "reclaimed" when overlays are processed. - if filepath.IsAbs(p.ImportPath) && p.Error != nil { - pkgPath, ok := getPkgPath(cfg, p.ImportPath, rootsDirs) - if ok { - p.ImportPath = pkgPath - } - } - - if old, found := seen[p.ImportPath]; found { - if !reflect.DeepEqual(p, old) { - return nil, fmt.Errorf("internal error: go list gives conflicting information for package %v", p.ImportPath) - } - // skip the duplicate - continue - } - seen[p.ImportPath] = p - - pkg := &Package{ - Name: p.Name, - ID: p.ImportPath, - GoFiles: absJoin(p.Dir, p.GoFiles, p.CgoFiles), - CompiledGoFiles: absJoin(p.Dir, p.CompiledGoFiles), - OtherFiles: absJoin(p.Dir, otherFiles(p)...), - } - - // Work around https://golang.org/issue/28749: - // cmd/go puts assembly, C, and C++ files in CompiledGoFiles. - // Filter out any elements of CompiledGoFiles that are also in OtherFiles. - // We have to keep this workaround in place until go1.12 is a distant memory. - if len(pkg.OtherFiles) > 0 { - other := make(map[string]bool, len(pkg.OtherFiles)) - for _, f := range pkg.OtherFiles { - other[f] = true - } - - out := pkg.CompiledGoFiles[:0] - for _, f := range pkg.CompiledGoFiles { - if other[f] { - continue - } - out = append(out, f) - } - pkg.CompiledGoFiles = out - } - - // Extract the PkgPath from the package's ID. - if i := strings.IndexByte(pkg.ID, ' '); i >= 0 { - pkg.PkgPath = pkg.ID[:i] - } else { - pkg.PkgPath = pkg.ID - } - - if pkg.PkgPath == "unsafe" { - pkg.GoFiles = nil // ignore fake unsafe.go file - } - - // Assume go list emits only absolute paths for Dir. - if p.Dir != "" && !filepath.IsAbs(p.Dir) { - log.Fatalf("internal error: go list returned non-absolute Package.Dir: %s", p.Dir) - } - - if p.Export != "" && !filepath.IsAbs(p.Export) { - pkg.ExportFile = filepath.Join(p.Dir, p.Export) - } else { - pkg.ExportFile = p.Export - } - - // imports - // - // Imports contains the IDs of all imported packages. - // ImportsMap records (path, ID) only where they differ. - ids := make(map[string]bool) - for _, id := range p.Imports { - ids[id] = true - } - pkg.Imports = make(map[string]*Package) - for path, id := range p.ImportMap { - pkg.Imports[path] = &Package{ID: id} // non-identity import - delete(ids, id) - } - for id := range ids { - if id == "C" { - continue - } - - pkg.Imports[id] = &Package{ID: id} // identity import - } - if !p.DepOnly { - response.Roots = append(response.Roots, pkg.ID) - } - - // Work around for pre-go.1.11 versions of go list. - // TODO(matloob): they should be handled by the fallback. - // Can we delete this? - if len(pkg.CompiledGoFiles) == 0 { - pkg.CompiledGoFiles = pkg.GoFiles - } - - if p.Error != nil { - pkg.Errors = append(pkg.Errors, Error{ - Pos: p.Error.Pos, - Msg: strings.TrimSpace(p.Error.Err), // Trim to work around golang.org/issue/32363. - }) - } - - response.Packages = append(response.Packages, pkg) - } - - return &response, nil -} - -// getPkgPath finds the package path of a directory if it's relative to a root directory. -func getPkgPath(cfg *Config, dir string, goInfo func() *goInfo) (string, bool) { - absDir, err := filepath.Abs(dir) - if err != nil { - cfg.Logf("error getting absolute path of %s: %v", dir, err) - return "", false - } - for rdir, rpath := range goInfo().rootDirs { - absRdir, err := filepath.Abs(rdir) - if err != nil { - cfg.Logf("error getting absolute path of %s: %v", rdir, err) - continue - } - // Make sure that the directory is in the module, - // to avoid creating a path relative to another module. - if !strings.HasPrefix(absDir, absRdir) { - cfg.Logf("%s does not have prefix %s", absDir, absRdir) - continue - } - // TODO(matloob): This doesn't properly handle symlinks. - r, err := filepath.Rel(rdir, dir) - if err != nil { - continue - } - if rpath != "" { - // We choose only one root even though the directory even it can belong in multiple modules - // or GOPATH entries. This is okay because we only need to work with absolute dirs when a - // file is missing from disk, for instance when gopls calls go/packages in an overlay. - // Once the file is saved, gopls, or the next invocation of the tool will get the correct - // result straight from golist. - // TODO(matloob): Implement module tiebreaking? - return path.Join(rpath, filepath.ToSlash(r)), true - } - return filepath.ToSlash(r), true - } - return "", false -} - -// absJoin absolutizes and flattens the lists of files. -func absJoin(dir string, fileses ...[]string) (res []string) { - for _, files := range fileses { - for _, file := range files { - if !filepath.IsAbs(file) { - file = filepath.Join(dir, file) - } - res = append(res, file) - } - } - return res -} - -func golistargs(cfg *Config, words []string) []string { - const findFlags = NeedImports | NeedTypes | NeedSyntax | NeedTypesInfo - fullargs := []string{ - "list", "-e", "-json", - fmt.Sprintf("-compiled=%t", cfg.Mode&(NeedCompiledGoFiles|NeedSyntax|NeedTypesInfo|NeedTypesSizes) != 0), - fmt.Sprintf("-test=%t", cfg.Tests), - fmt.Sprintf("-export=%t", usesExportData(cfg)), - fmt.Sprintf("-deps=%t", cfg.Mode&NeedImports != 0), - // go list doesn't let you pass -test and -find together, - // probably because you'd just get the TestMain. - fmt.Sprintf("-find=%t", !cfg.Tests && cfg.Mode&findFlags == 0), - } - fullargs = append(fullargs, cfg.BuildFlags...) - fullargs = append(fullargs, "--") - fullargs = append(fullargs, words...) - return fullargs -} - -// invokeGo returns the stdout of a go command invocation. -func invokeGo(cfg *Config, args ...string) (*bytes.Buffer, error) { - stdout := new(bytes.Buffer) - stderr := new(bytes.Buffer) - cmd := exec.CommandContext(cfg.Context, "go", args...) - // On darwin the cwd gets resolved to the real path, which breaks anything that - // expects the working directory to keep the original path, including the - // go command when dealing with modules. - // The Go stdlib has a special feature where if the cwd and the PWD are the - // same node then it trusts the PWD, so by setting it in the env for the child - // process we fix up all the paths returned by the go command. - cmd.Env = append(append([]string{}, cfg.Env...), "PWD="+cfg.Dir) - cmd.Dir = cfg.Dir - cmd.Stdout = stdout - cmd.Stderr = stderr - defer func(start time.Time) { - cfg.Logf("%s for %v, stderr: <<%s>> stdout: <<%s>>\n", time.Since(start), cmdDebugStr(cmd, args...), stderr, stdout) - }(time.Now()) - - if err := cmd.Run(); err != nil { - // Check for 'go' executable not being found. - if ee, ok := err.(*exec.Error); ok && ee.Err == exec.ErrNotFound { - return nil, fmt.Errorf("'go list' driver requires 'go', but %s", exec.ErrNotFound) - } - - exitErr, ok := err.(*exec.ExitError) - if !ok { - // Catastrophic error: - // - context cancellation - return nil, fmt.Errorf("couldn't exec 'go %v': %s %T", args, err, err) - } - - // Old go version? - if strings.Contains(stderr.String(), "flag provided but not defined") { - return nil, goTooOldError{fmt.Errorf("unsupported version of go: %s: %s", exitErr, stderr)} - } - - // Related to #24854 - if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "unexpected directory layout") { - return nil, fmt.Errorf("%s", stderr.String()) - } - - // Is there an error running the C compiler in cgo? This will be reported in the "Error" field - // and should be suppressed by go list -e. - // - // This condition is not perfect yet because the error message can include other error messages than runtime/cgo. - isPkgPathRune := func(r rune) bool { - // From https://golang.org/ref/spec#Import_declarations: - // Implementation restriction: A compiler may restrict ImportPaths to non-empty strings - // using only characters belonging to Unicode's L, M, N, P, and S general categories - // (the Graphic characters without spaces) and may also exclude the - // characters !"#$%&'()*,:;<=>?[\]^`{|} and the Unicode replacement character U+FFFD. - return unicode.IsOneOf([]*unicode.RangeTable{unicode.L, unicode.M, unicode.N, unicode.P, unicode.S}, r) && - !strings.ContainsRune("!\"#$%&'()*,:;<=>?[\\]^`{|}\uFFFD", r) - } - if len(stderr.String()) > 0 && strings.HasPrefix(stderr.String(), "# ") { - if strings.HasPrefix(strings.TrimLeftFunc(stderr.String()[len("# "):], isPkgPathRune), "\n") { - return stdout, nil - } - } - - // This error only appears in stderr. See golang.org/cl/166398 for a fix in go list to show - // the error in the Err section of stdout in case -e option is provided. - // This fix is provided for backwards compatibility. - if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "named files must be .go files") { - output := fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err": %q}}`, - strings.Trim(stderr.String(), "\n")) - return bytes.NewBufferString(output), nil - } - - // Similar to the previous error, but currently lacks a fix in Go. - if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "named files must all be in one directory") { - output := fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err": %q}}`, - strings.Trim(stderr.String(), "\n")) - return bytes.NewBufferString(output), nil - } - - // Backwards compatibility for Go 1.11 because 1.12 and 1.13 put the directory in the ImportPath. - // If the package doesn't exist, put the absolute path of the directory into the error message, - // as Go 1.13 list does. - const noSuchDirectory = "no such directory" - if len(stderr.String()) > 0 && strings.Contains(stderr.String(), noSuchDirectory) { - errstr := stderr.String() - abspath := strings.TrimSpace(errstr[strings.Index(errstr, noSuchDirectory)+len(noSuchDirectory):]) - output := fmt.Sprintf(`{"ImportPath": %q,"Incomplete": true,"Error": {"Pos": "","Err": %q}}`, - abspath, strings.Trim(stderr.String(), "\n")) - return bytes.NewBufferString(output), nil - } - - // Workaround for #29280: go list -e has incorrect behavior when an ad-hoc package doesn't exist. - // Note that the error message we look for in this case is different that the one looked for above. - if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "no such file or directory") { - output := fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err": %q}}`, - strings.Trim(stderr.String(), "\n")) - return bytes.NewBufferString(output), nil - } - - // Workaround for #34273. go list -e with GO111MODULE=on has incorrect behavior when listing a - // directory outside any module. - if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "outside available modules") { - output := fmt.Sprintf(`{"ImportPath": %q,"Incomplete": true,"Error": {"Pos": "","Err": %q}}`, - // TODO(matloob): command-line-arguments isn't correct here. - "command-line-arguments", strings.Trim(stderr.String(), "\n")) - return bytes.NewBufferString(output), nil - - } - - // Workaround for an instance of golang.org/issue/26755: go list -e will return a non-zero exit - // status if there's a dependency on a package that doesn't exist. But it should return - // a zero exit status and set an error on that package. - if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "no Go files in") { - // Don't clobber stdout if `go list` actually returned something. - if len(stdout.String()) > 0 { - return stdout, nil - } - // try to extract package name from string - stderrStr := stderr.String() - var importPath string - colon := strings.Index(stderrStr, ":") - if colon > 0 && strings.HasPrefix(stderrStr, "go build ") { - importPath = stderrStr[len("go build "):colon] - } - output := fmt.Sprintf(`{"ImportPath": %q,"Incomplete": true,"Error": {"Pos": "","Err": %q}}`, - importPath, strings.Trim(stderrStr, "\n")) - return bytes.NewBufferString(output), nil - } - - // Export mode entails a build. - // If that build fails, errors appear on stderr - // (despite the -e flag) and the Export field is blank. - // Do not fail in that case. - // The same is true if an ad-hoc package given to go list doesn't exist. - // TODO(matloob): Remove these once we can depend on go list to exit with a zero status with -e even when - // packages don't exist or a build fails. - if !usesExportData(cfg) && !containsGoFile(args) { - return nil, fmt.Errorf("go %v: %s: %s", args, exitErr, stderr) - } - } - - // As of writing, go list -export prints some non-fatal compilation - // errors to stderr, even with -e set. We would prefer that it put - // them in the Package.Error JSON (see https://golang.org/issue/26319). - // In the meantime, there's nowhere good to put them, but they can - // be useful for debugging. Print them if $GOPACKAGESPRINTGOLISTERRORS - // is set. - if len(stderr.Bytes()) != 0 && os.Getenv("GOPACKAGESPRINTGOLISTERRORS") != "" { - fmt.Fprintf(os.Stderr, "%s stderr: <<%s>>\n", cmdDebugStr(cmd, args...), stderr) - } - return stdout, nil -} - -func containsGoFile(s []string) bool { - for _, f := range s { - if strings.HasSuffix(f, ".go") { - return true - } - } - return false -} - -func cmdDebugStr(cmd *exec.Cmd, args ...string) string { - env := make(map[string]string) - for _, kv := range cmd.Env { - split := strings.Split(kv, "=") - k, v := split[0], split[1] - env[k] = v - } - var quotedArgs []string - for _, arg := range args { - quotedArgs = append(quotedArgs, strconv.Quote(arg)) - } - - return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v PWD=%v go %s", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["PWD"], strings.Join(quotedArgs, " ")) -} diff --git a/vendor/golang.org/x/tools/go/packages/golist_overlay.go b/vendor/golang.org/x/tools/go/packages/golist_overlay.go deleted file mode 100644 index a7de62299d6..00000000000 --- a/vendor/golang.org/x/tools/go/packages/golist_overlay.go +++ /dev/null @@ -1,293 +0,0 @@ -package packages - -import ( - "bytes" - "encoding/json" - "fmt" - "go/parser" - "go/token" - "path/filepath" - "strconv" - "strings" -) - -// processGolistOverlay provides rudimentary support for adding -// files that don't exist on disk to an overlay. The results can be -// sometimes incorrect. -// TODO(matloob): Handle unsupported cases, including the following: -// - determining the correct package to add given a new import path -func processGolistOverlay(cfg *Config, response *responseDeduper, rootDirs func() *goInfo) (modifiedPkgs, needPkgs []string, err error) { - havePkgs := make(map[string]string) // importPath -> non-test package ID - needPkgsSet := make(map[string]bool) - modifiedPkgsSet := make(map[string]bool) - - for _, pkg := range response.dr.Packages { - // This is an approximation of import path to id. This can be - // wrong for tests, vendored packages, and a number of other cases. - havePkgs[pkg.PkgPath] = pkg.ID - } - - // If no new imports are added, it is safe to avoid loading any needPkgs. - // Otherwise, it's hard to tell which package is actually being loaded - // (due to vendoring) and whether any modified package will show up - // in the transitive set of dependencies (because new imports are added, - // potentially modifying the transitive set of dependencies). - var overlayAddsImports bool - - for opath, contents := range cfg.Overlay { - base := filepath.Base(opath) - dir := filepath.Dir(opath) - var pkg *Package // if opath belongs to both a package and its test variant, this will be the test variant - var testVariantOf *Package // if opath is a test file, this is the package it is testing - var fileExists bool - isTestFile := strings.HasSuffix(opath, "_test.go") - pkgName, ok := extractPackageName(opath, contents) - if !ok { - // Don't bother adding a file that doesn't even have a parsable package statement - // to the overlay. - continue - } - nextPackage: - for _, p := range response.dr.Packages { - if pkgName != p.Name && p.ID != "command-line-arguments" { - continue - } - for _, f := range p.GoFiles { - if !sameFile(filepath.Dir(f), dir) { - continue - } - // Make sure to capture information on the package's test variant, if needed. - if isTestFile && !hasTestFiles(p) { - // TODO(matloob): Are there packages other than the 'production' variant - // of a package that this can match? This shouldn't match the test main package - // because the file is generated in another directory. - testVariantOf = p - continue nextPackage - } - if pkg != nil && p != pkg && pkg.PkgPath == p.PkgPath { - // If we've already seen the test variant, - // make sure to label which package it is a test variant of. - if hasTestFiles(pkg) { - testVariantOf = p - continue nextPackage - } - // If we have already seen the package of which this is a test variant. - if hasTestFiles(p) { - testVariantOf = pkg - } - } - pkg = p - if filepath.Base(f) == base { - fileExists = true - } - } - } - // The overlay could have included an entirely new package. - if pkg == nil { - // Try to find the module or gopath dir the file is contained in. - // Then for modules, add the module opath to the beginning. - pkgPath, ok := getPkgPath(cfg, dir, rootDirs) - if !ok { - break - } - isXTest := strings.HasSuffix(pkgName, "_test") - if isXTest { - pkgPath += "_test" - } - id := pkgPath - if isTestFile && !isXTest { - id = fmt.Sprintf("%s [%s.test]", pkgPath, pkgPath) - } - // Try to reclaim a package with the same id if it exists in the response. - for _, p := range response.dr.Packages { - if reclaimPackage(p, id, opath, contents) { - pkg = p - break - } - } - // Otherwise, create a new package - if pkg == nil { - pkg = &Package{PkgPath: pkgPath, ID: id, Name: pkgName, Imports: make(map[string]*Package)} - response.addPackage(pkg) - havePkgs[pkg.PkgPath] = id - // Add the production package's sources for a test variant. - if isTestFile && !isXTest && testVariantOf != nil { - pkg.GoFiles = append(pkg.GoFiles, testVariantOf.GoFiles...) - pkg.CompiledGoFiles = append(pkg.CompiledGoFiles, testVariantOf.CompiledGoFiles...) - } - } - } - if !fileExists { - pkg.GoFiles = append(pkg.GoFiles, opath) - // TODO(matloob): Adding the file to CompiledGoFiles can exhibit the wrong behavior - // if the file will be ignored due to its build tags. - pkg.CompiledGoFiles = append(pkg.CompiledGoFiles, opath) - modifiedPkgsSet[pkg.ID] = true - } - imports, err := extractImports(opath, contents) - if err != nil { - // Let the parser or type checker report errors later. - continue - } - for _, imp := range imports { - _, found := pkg.Imports[imp] - if !found { - overlayAddsImports = true - // TODO(matloob): Handle cases when the following block isn't correct. - // These include imports of vendored packages, etc. - id, ok := havePkgs[imp] - if !ok { - id = imp - } - pkg.Imports[imp] = &Package{ID: id} - // Add dependencies to the non-test variant version of this package as wel. - if testVariantOf != nil { - testVariantOf.Imports[imp] = &Package{ID: id} - } - } - } - continue - } - - // toPkgPath tries to guess the package path given the id. - // This isn't always correct -- it's certainly wrong for - // vendored packages' paths. - toPkgPath := func(id string) string { - // TODO(matloob): Handle vendor paths. - i := strings.IndexByte(id, ' ') - if i >= 0 { - return id[:i] - } - return id - } - - // Do another pass now that new packages have been created to determine the - // set of missing packages. - for _, pkg := range response.dr.Packages { - for _, imp := range pkg.Imports { - pkgPath := toPkgPath(imp.ID) - if _, ok := havePkgs[pkgPath]; !ok { - needPkgsSet[pkgPath] = true - } - } - } - - if overlayAddsImports { - needPkgs = make([]string, 0, len(needPkgsSet)) - for pkg := range needPkgsSet { - needPkgs = append(needPkgs, pkg) - } - } - modifiedPkgs = make([]string, 0, len(modifiedPkgsSet)) - for pkg := range modifiedPkgsSet { - modifiedPkgs = append(modifiedPkgs, pkg) - } - return modifiedPkgs, needPkgs, err -} - -func hasTestFiles(p *Package) bool { - for _, f := range p.GoFiles { - if strings.HasSuffix(f, "_test.go") { - return true - } - } - return false -} - -// determineRootDirs returns a mapping from directories code can be contained in to the -// corresponding import path prefixes of those directories. -// Its result is used to try to determine the import path for a package containing -// an overlay file. -func determineRootDirs(cfg *Config) map[string]string { - // Assume modules first: - out, err := invokeGo(cfg, "list", "-m", "-json", "all") - if err != nil { - return determineRootDirsGOPATH(cfg) - } - m := map[string]string{} - type jsonMod struct{ Path, Dir string } - for dec := json.NewDecoder(out); dec.More(); { - mod := new(jsonMod) - if err := dec.Decode(mod); err != nil { - return m // Give up and return an empty map. Package won't be found for overlay. - } - if mod.Dir != "" && mod.Path != "" { - // This is a valid module; add it to the map. - m[mod.Dir] = mod.Path - } - } - return m -} - -func determineRootDirsGOPATH(cfg *Config) map[string]string { - m := map[string]string{} - out, err := invokeGo(cfg, "env", "GOPATH") - if err != nil { - // Could not determine root dir mapping. Everything is best-effort, so just return an empty map. - // When we try to find the import path for a directory, there will be no root-dir match and - // we'll give up. - return m - } - for _, p := range filepath.SplitList(string(bytes.TrimSpace(out.Bytes()))) { - m[filepath.Join(p, "src")] = "" - } - return m -} - -func extractImports(filename string, contents []byte) ([]string, error) { - f, err := parser.ParseFile(token.NewFileSet(), filename, contents, parser.ImportsOnly) // TODO(matloob): reuse fileset? - if err != nil { - return nil, err - } - var res []string - for _, imp := range f.Imports { - quotedPath := imp.Path.Value - path, err := strconv.Unquote(quotedPath) - if err != nil { - return nil, err - } - res = append(res, path) - } - return res, nil -} - -// reclaimPackage attempts to reuse a package that failed to load in an overlay. -// -// If the package has errors and has no Name, GoFiles, or Imports, -// then it's possible that it doesn't yet exist on disk. -func reclaimPackage(pkg *Package, id string, filename string, contents []byte) bool { - // TODO(rstambler): Check the message of the actual error? - // It differs between $GOPATH and module mode. - if pkg.ID != id { - return false - } - if len(pkg.Errors) != 1 { - return false - } - if pkg.Name != "" || pkg.ExportFile != "" { - return false - } - if len(pkg.GoFiles) > 0 || len(pkg.CompiledGoFiles) > 0 || len(pkg.OtherFiles) > 0 { - return false - } - if len(pkg.Imports) > 0 { - return false - } - pkgName, ok := extractPackageName(filename, contents) - if !ok { - return false - } - pkg.Name = pkgName - pkg.Errors = nil - return true -} - -func extractPackageName(filename string, contents []byte) (string, bool) { - // TODO(rstambler): Check the message of the actual error? - // It differs between $GOPATH and module mode. - f, err := parser.ParseFile(token.NewFileSet(), filename, contents, parser.PackageClauseOnly) // TODO(matloob): reuse fileset? - if err != nil { - return "", false - } - return f.Name.Name, true -} diff --git a/vendor/golang.org/x/tools/go/packages/packages.go b/vendor/golang.org/x/tools/go/packages/packages.go deleted file mode 100644 index b29c91369e1..00000000000 --- a/vendor/golang.org/x/tools/go/packages/packages.go +++ /dev/null @@ -1,1113 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package packages - -// See doc.go for package documentation and implementation notes. - -import ( - "context" - "encoding/json" - "fmt" - "go/ast" - "go/parser" - "go/scanner" - "go/token" - "go/types" - "io/ioutil" - "log" - "os" - "path/filepath" - "strings" - "sync" - - "golang.org/x/tools/go/gcexportdata" -) - -// A LoadMode controls the amount of detail to return when loading. -// The bits below can be combined to specify which fields should be -// filled in the result packages. -// The zero value is a special case, equivalent to combining -// the NeedName, NeedFiles, and NeedCompiledGoFiles bits. -// ID and Errors (if present) will always be filled. -// Load may return more information than requested. -type LoadMode int - -const ( - // NeedName adds Name and PkgPath. - NeedName LoadMode = 1 << iota - - // NeedFiles adds GoFiles and OtherFiles. - NeedFiles - - // NeedCompiledGoFiles adds CompiledGoFiles. - NeedCompiledGoFiles - - // NeedImports adds Imports. If NeedDeps is not set, the Imports field will contain - // "placeholder" Packages with only the ID set. - NeedImports - - // NeedDeps adds the fields requested by the LoadMode in the packages in Imports. - NeedDeps - - // NeedExportsFile adds ExportsFile. - NeedExportsFile - - // NeedTypes adds Types, Fset, and IllTyped. - NeedTypes - - // NeedSyntax adds Syntax. - NeedSyntax - - // NeedTypesInfo adds TypesInfo. - NeedTypesInfo - - // NeedTypesSizes adds TypesSizes. - NeedTypesSizes -) - -const ( - // Deprecated: LoadFiles exists for historical compatibility - // and should not be used. Please directly specify the needed fields using the Need values. - LoadFiles = NeedName | NeedFiles | NeedCompiledGoFiles - - // Deprecated: LoadImports exists for historical compatibility - // and should not be used. Please directly specify the needed fields using the Need values. - LoadImports = LoadFiles | NeedImports - - // Deprecated: LoadTypes exists for historical compatibility - // and should not be used. Please directly specify the needed fields using the Need values. - LoadTypes = LoadImports | NeedTypes | NeedTypesSizes - - // Deprecated: LoadSyntax exists for historical compatibility - // and should not be used. Please directly specify the needed fields using the Need values. - LoadSyntax = LoadTypes | NeedSyntax | NeedTypesInfo - - // Deprecated: LoadAllSyntax exists for historical compatibility - // and should not be used. Please directly specify the needed fields using the Need values. - LoadAllSyntax = LoadSyntax | NeedDeps -) - -// A Config specifies details about how packages should be loaded. -// The zero value is a valid configuration. -// Calls to Load do not modify this struct. -type Config struct { - // Mode controls the level of information returned for each package. - Mode LoadMode - - // Context specifies the context for the load operation. - // If the context is cancelled, the loader may stop early - // and return an ErrCancelled error. - // If Context is nil, the load cannot be cancelled. - Context context.Context - - // Logf is the logger for the config. - // If the user provides a logger, debug logging is enabled. - // If the GOPACKAGESDEBUG environment variable is set to true, - // but the logger is nil, default to log.Printf. - Logf func(format string, args ...interface{}) - - // Dir is the directory in which to run the build system's query tool - // that provides information about the packages. - // If Dir is empty, the tool is run in the current directory. - Dir string - - // Env is the environment to use when invoking the build system's query tool. - // If Env is nil, the current environment is used. - // As in os/exec's Cmd, only the last value in the slice for - // each environment key is used. To specify the setting of only - // a few variables, append to the current environment, as in: - // - // opt.Env = append(os.Environ(), "GOOS=plan9", "GOARCH=386") - // - Env []string - - // BuildFlags is a list of command-line flags to be passed through to - // the build system's query tool. - BuildFlags []string - - // Fset provides source position information for syntax trees and types. - // If Fset is nil, Load will use a new fileset, but preserve Fset's value. - Fset *token.FileSet - - // ParseFile is called to read and parse each file - // when preparing a package's type-checked syntax tree. - // It must be safe to call ParseFile simultaneously from multiple goroutines. - // If ParseFile is nil, the loader will uses parser.ParseFile. - // - // ParseFile should parse the source from src and use filename only for - // recording position information. - // - // An application may supply a custom implementation of ParseFile - // to change the effective file contents or the behavior of the parser, - // or to modify the syntax tree. For example, selectively eliminating - // unwanted function bodies can significantly accelerate type checking. - ParseFile func(fset *token.FileSet, filename string, src []byte) (*ast.File, error) - - // If Tests is set, the loader includes not just the packages - // matching a particular pattern but also any related test packages, - // including test-only variants of the package and the test executable. - // - // For example, when using the go command, loading "fmt" with Tests=true - // returns four packages, with IDs "fmt" (the standard package), - // "fmt [fmt.test]" (the package as compiled for the test), - // "fmt_test" (the test functions from source files in package fmt_test), - // and "fmt.test" (the test binary). - // - // In build systems with explicit names for tests, - // setting Tests may have no effect. - Tests bool - - // Overlay provides a mapping of absolute file paths to file contents. - // If the file with the given path already exists, the parser will use the - // alternative file contents provided by the map. - // - // Overlays provide incomplete support for when a given file doesn't - // already exist on disk. See the package doc above for more details. - Overlay map[string][]byte -} - -// driver is the type for functions that query the build system for the -// packages named by the patterns. -type driver func(cfg *Config, patterns ...string) (*driverResponse, error) - -// driverResponse contains the results for a driver query. -type driverResponse struct { - // Sizes, if not nil, is the types.Sizes to use when type checking. - Sizes *types.StdSizes - - // Roots is the set of package IDs that make up the root packages. - // We have to encode this separately because when we encode a single package - // we cannot know if it is one of the roots as that requires knowledge of the - // graph it is part of. - Roots []string `json:",omitempty"` - - // Packages is the full set of packages in the graph. - // The packages are not connected into a graph. - // The Imports if populated will be stubs that only have their ID set. - // Imports will be connected and then type and syntax information added in a - // later pass (see refine). - Packages []*Package -} - -// Load loads and returns the Go packages named by the given patterns. -// -// Config specifies loading options; -// nil behaves the same as an empty Config. -// -// Load returns an error if any of the patterns was invalid -// as defined by the underlying build system. -// It may return an empty list of packages without an error, -// for instance for an empty expansion of a valid wildcard. -// Errors associated with a particular package are recorded in the -// corresponding Package's Errors list, and do not cause Load to -// return an error. Clients may need to handle such errors before -// proceeding with further analysis. The PrintErrors function is -// provided for convenient display of all errors. -func Load(cfg *Config, patterns ...string) ([]*Package, error) { - l := newLoader(cfg) - response, err := defaultDriver(&l.Config, patterns...) - if err != nil { - return nil, err - } - l.sizes = response.Sizes - return l.refine(response.Roots, response.Packages...) -} - -// defaultDriver is a driver that looks for an external driver binary, and if -// it does not find it falls back to the built in go list driver. -func defaultDriver(cfg *Config, patterns ...string) (*driverResponse, error) { - driver := findExternalDriver(cfg) - if driver == nil { - driver = goListDriver - } - return driver(cfg, patterns...) -} - -// A Package describes a loaded Go package. -type Package struct { - // ID is a unique identifier for a package, - // in a syntax provided by the underlying build system. - // - // Because the syntax varies based on the build system, - // clients should treat IDs as opaque and not attempt to - // interpret them. - ID string - - // Name is the package name as it appears in the package source code. - Name string - - // PkgPath is the package path as used by the go/types package. - PkgPath string - - // Errors contains any errors encountered querying the metadata - // of the package, or while parsing or type-checking its files. - Errors []Error - - // GoFiles lists the absolute file paths of the package's Go source files. - GoFiles []string - - // CompiledGoFiles lists the absolute file paths of the package's source - // files that were presented to the compiler. - // This may differ from GoFiles if files are processed before compilation. - CompiledGoFiles []string - - // OtherFiles lists the absolute file paths of the package's non-Go source files, - // including assembly, C, C++, Fortran, Objective-C, SWIG, and so on. - OtherFiles []string - - // ExportFile is the absolute path to a file containing type - // information for the package as provided by the build system. - ExportFile string - - // Imports maps import paths appearing in the package's Go source files - // to corresponding loaded Packages. - Imports map[string]*Package - - // Types provides type information for the package. - // The NeedTypes LoadMode bit sets this field for packages matching the - // patterns; type information for dependencies may be missing or incomplete, - // unless NeedDeps and NeedImports are also set. - Types *types.Package - - // Fset provides position information for Types, TypesInfo, and Syntax. - // It is set only when Types is set. - Fset *token.FileSet - - // IllTyped indicates whether the package or any dependency contains errors. - // It is set only when Types is set. - IllTyped bool - - // Syntax is the package's syntax trees, for the files listed in CompiledGoFiles. - // - // The NeedSyntax LoadMode bit populates this field for packages matching the patterns. - // If NeedDeps and NeedImports are also set, this field will also be populated - // for dependencies. - Syntax []*ast.File - - // TypesInfo provides type information about the package's syntax trees. - // It is set only when Syntax is set. - TypesInfo *types.Info - - // TypesSizes provides the effective size function for types in TypesInfo. - TypesSizes types.Sizes -} - -// An Error describes a problem with a package's metadata, syntax, or types. -type Error struct { - Pos string // "file:line:col" or "file:line" or "" or "-" - Msg string - Kind ErrorKind -} - -// ErrorKind describes the source of the error, allowing the user to -// differentiate between errors generated by the driver, the parser, or the -// type-checker. -type ErrorKind int - -const ( - UnknownError ErrorKind = iota - ListError - ParseError - TypeError -) - -func (err Error) Error() string { - pos := err.Pos - if pos == "" { - pos = "-" // like token.Position{}.String() - } - return pos + ": " + err.Msg -} - -// flatPackage is the JSON form of Package -// It drops all the type and syntax fields, and transforms the Imports -// -// TODO(adonovan): identify this struct with Package, effectively -// publishing the JSON protocol. -type flatPackage struct { - ID string - Name string `json:",omitempty"` - PkgPath string `json:",omitempty"` - Errors []Error `json:",omitempty"` - GoFiles []string `json:",omitempty"` - CompiledGoFiles []string `json:",omitempty"` - OtherFiles []string `json:",omitempty"` - ExportFile string `json:",omitempty"` - Imports map[string]string `json:",omitempty"` -} - -// MarshalJSON returns the Package in its JSON form. -// For the most part, the structure fields are written out unmodified, and -// the type and syntax fields are skipped. -// The imports are written out as just a map of path to package id. -// The errors are written using a custom type that tries to preserve the -// structure of error types we know about. -// -// This method exists to enable support for additional build systems. It is -// not intended for use by clients of the API and we may change the format. -func (p *Package) MarshalJSON() ([]byte, error) { - flat := &flatPackage{ - ID: p.ID, - Name: p.Name, - PkgPath: p.PkgPath, - Errors: p.Errors, - GoFiles: p.GoFiles, - CompiledGoFiles: p.CompiledGoFiles, - OtherFiles: p.OtherFiles, - ExportFile: p.ExportFile, - } - if len(p.Imports) > 0 { - flat.Imports = make(map[string]string, len(p.Imports)) - for path, ipkg := range p.Imports { - flat.Imports[path] = ipkg.ID - } - } - return json.Marshal(flat) -} - -// UnmarshalJSON reads in a Package from its JSON format. -// See MarshalJSON for details about the format accepted. -func (p *Package) UnmarshalJSON(b []byte) error { - flat := &flatPackage{} - if err := json.Unmarshal(b, &flat); err != nil { - return err - } - *p = Package{ - ID: flat.ID, - Name: flat.Name, - PkgPath: flat.PkgPath, - Errors: flat.Errors, - GoFiles: flat.GoFiles, - CompiledGoFiles: flat.CompiledGoFiles, - OtherFiles: flat.OtherFiles, - ExportFile: flat.ExportFile, - } - if len(flat.Imports) > 0 { - p.Imports = make(map[string]*Package, len(flat.Imports)) - for path, id := range flat.Imports { - p.Imports[path] = &Package{ID: id} - } - } - return nil -} - -func (p *Package) String() string { return p.ID } - -// loaderPackage augments Package with state used during the loading phase -type loaderPackage struct { - *Package - importErrors map[string]error // maps each bad import to its error - loadOnce sync.Once - color uint8 // for cycle detection - needsrc bool // load from source (Mode >= LoadTypes) - needtypes bool // type information is either requested or depended on - initial bool // package was matched by a pattern -} - -// loader holds the working state of a single call to load. -type loader struct { - pkgs map[string]*loaderPackage - Config - sizes types.Sizes - parseCache map[string]*parseValue - parseCacheMu sync.Mutex - exportMu sync.Mutex // enforces mutual exclusion of exportdata operations - - // Config.Mode contains the implied mode (see impliedLoadMode). - // Implied mode contains all the fields we need the data for. - // In requestedMode there are the actually requested fields. - // We'll zero them out before returning packages to the user. - // This makes it easier for us to get the conditions where - // we need certain modes right. - requestedMode LoadMode -} - -type parseValue struct { - f *ast.File - err error - ready chan struct{} -} - -func newLoader(cfg *Config) *loader { - ld := &loader{ - parseCache: map[string]*parseValue{}, - } - if cfg != nil { - ld.Config = *cfg - // If the user has provided a logger, use it. - ld.Config.Logf = cfg.Logf - } - if ld.Config.Logf == nil { - // If the GOPACKAGESDEBUG environment variable is set to true, - // but the user has not provided a logger, default to log.Printf. - if debug { - ld.Config.Logf = log.Printf - } else { - ld.Config.Logf = func(format string, args ...interface{}) {} - } - } - if ld.Config.Mode == 0 { - ld.Config.Mode = NeedName | NeedFiles | NeedCompiledGoFiles // Preserve zero behavior of Mode for backwards compatibility. - } - if ld.Config.Env == nil { - ld.Config.Env = os.Environ() - } - if ld.Context == nil { - ld.Context = context.Background() - } - if ld.Dir == "" { - if dir, err := os.Getwd(); err == nil { - ld.Dir = dir - } - } - - // Save the actually requested fields. We'll zero them out before returning packages to the user. - ld.requestedMode = ld.Mode - ld.Mode = impliedLoadMode(ld.Mode) - - if ld.Mode&NeedTypes != 0 { - if ld.Fset == nil { - ld.Fset = token.NewFileSet() - } - - // ParseFile is required even in LoadTypes mode - // because we load source if export data is missing. - if ld.ParseFile == nil { - ld.ParseFile = func(fset *token.FileSet, filename string, src []byte) (*ast.File, error) { - const mode = parser.AllErrors | parser.ParseComments - return parser.ParseFile(fset, filename, src, mode) - } - } - } - - return ld -} - -// refine connects the supplied packages into a graph and then adds type and -// and syntax information as requested by the LoadMode. -func (ld *loader) refine(roots []string, list ...*Package) ([]*Package, error) { - rootMap := make(map[string]int, len(roots)) - for i, root := range roots { - rootMap[root] = i - } - ld.pkgs = make(map[string]*loaderPackage) - // first pass, fixup and build the map and roots - var initial = make([]*loaderPackage, len(roots)) - for _, pkg := range list { - rootIndex := -1 - if i, found := rootMap[pkg.ID]; found { - rootIndex = i - } - lpkg := &loaderPackage{ - Package: pkg, - needtypes: (ld.Mode&(NeedTypes|NeedTypesInfo) != 0 && ld.Mode&NeedDeps != 0 && rootIndex < 0) || rootIndex >= 0, - needsrc: (ld.Mode&(NeedSyntax|NeedTypesInfo) != 0 && ld.Mode&NeedDeps != 0 && rootIndex < 0) || rootIndex >= 0 || - len(ld.Overlay) > 0 || // Overlays can invalidate export data. TODO(matloob): make this check fine-grained based on dependencies on overlaid files - pkg.ExportFile == "" && pkg.PkgPath != "unsafe", - } - ld.pkgs[lpkg.ID] = lpkg - if rootIndex >= 0 { - initial[rootIndex] = lpkg - lpkg.initial = true - } - } - for i, root := range roots { - if initial[i] == nil { - return nil, fmt.Errorf("root package %v is missing", root) - } - } - - // Materialize the import graph. - - const ( - white = 0 // new - grey = 1 // in progress - black = 2 // complete - ) - - // visit traverses the import graph, depth-first, - // and materializes the graph as Packages.Imports. - // - // Valid imports are saved in the Packages.Import map. - // Invalid imports (cycles and missing nodes) are saved in the importErrors map. - // Thus, even in the presence of both kinds of errors, the Import graph remains a DAG. - // - // visit returns whether the package needs src or has a transitive - // dependency on a package that does. These are the only packages - // for which we load source code. - var stack []*loaderPackage - var visit func(lpkg *loaderPackage) bool - var srcPkgs []*loaderPackage - visit = func(lpkg *loaderPackage) bool { - switch lpkg.color { - case black: - return lpkg.needsrc - case grey: - panic("internal error: grey node") - } - lpkg.color = grey - stack = append(stack, lpkg) // push - stubs := lpkg.Imports // the structure form has only stubs with the ID in the Imports - // If NeedImports isn't set, the imports fields will all be zeroed out. - if ld.Mode&NeedImports != 0 { - lpkg.Imports = make(map[string]*Package, len(stubs)) - for importPath, ipkg := range stubs { - var importErr error - imp := ld.pkgs[ipkg.ID] - if imp == nil { - // (includes package "C" when DisableCgo) - importErr = fmt.Errorf("missing package: %q", ipkg.ID) - } else if imp.color == grey { - importErr = fmt.Errorf("import cycle: %s", stack) - } - if importErr != nil { - if lpkg.importErrors == nil { - lpkg.importErrors = make(map[string]error) - } - lpkg.importErrors[importPath] = importErr - continue - } - - if visit(imp) { - lpkg.needsrc = true - } - lpkg.Imports[importPath] = imp.Package - } - } - if lpkg.needsrc { - srcPkgs = append(srcPkgs, lpkg) - } - if ld.Mode&NeedTypesSizes != 0 { - lpkg.TypesSizes = ld.sizes - } - stack = stack[:len(stack)-1] // pop - lpkg.color = black - - return lpkg.needsrc - } - - if ld.Mode&NeedImports == 0 { - // We do this to drop the stub import packages that we are not even going to try to resolve. - for _, lpkg := range initial { - lpkg.Imports = nil - } - } else { - // For each initial package, create its import DAG. - for _, lpkg := range initial { - visit(lpkg) - } - } - if ld.Mode&NeedImports != 0 && ld.Mode&NeedTypes != 0 { - for _, lpkg := range srcPkgs { - // Complete type information is required for the - // immediate dependencies of each source package. - for _, ipkg := range lpkg.Imports { - imp := ld.pkgs[ipkg.ID] - imp.needtypes = true - } - } - } - // Load type data if needed, starting at - // the initial packages (roots of the import DAG). - if ld.Mode&NeedTypes != 0 { - var wg sync.WaitGroup - for _, lpkg := range initial { - wg.Add(1) - go func(lpkg *loaderPackage) { - ld.loadRecursive(lpkg) - wg.Done() - }(lpkg) - } - wg.Wait() - } - - result := make([]*Package, len(initial)) - for i, lpkg := range initial { - result[i] = lpkg.Package - } - for i := range ld.pkgs { - // Clear all unrequested fields, for extra de-Hyrum-ization. - if ld.requestedMode&NeedName == 0 { - ld.pkgs[i].Name = "" - ld.pkgs[i].PkgPath = "" - } - if ld.requestedMode&NeedFiles == 0 { - ld.pkgs[i].GoFiles = nil - ld.pkgs[i].OtherFiles = nil - } - if ld.requestedMode&NeedCompiledGoFiles == 0 { - ld.pkgs[i].CompiledGoFiles = nil - } - if ld.requestedMode&NeedImports == 0 { - ld.pkgs[i].Imports = nil - } - if ld.requestedMode&NeedExportsFile == 0 { - ld.pkgs[i].ExportFile = "" - } - if ld.requestedMode&NeedTypes == 0 { - ld.pkgs[i].Types = nil - ld.pkgs[i].Fset = nil - ld.pkgs[i].IllTyped = false - } - if ld.requestedMode&NeedSyntax == 0 { - ld.pkgs[i].Syntax = nil - } - if ld.requestedMode&NeedTypesInfo == 0 { - ld.pkgs[i].TypesInfo = nil - } - if ld.requestedMode&NeedTypesSizes == 0 { - ld.pkgs[i].TypesSizes = nil - } - } - - return result, nil -} - -// loadRecursive loads the specified package and its dependencies, -// recursively, in parallel, in topological order. -// It is atomic and idempotent. -// Precondition: ld.Mode&NeedTypes. -func (ld *loader) loadRecursive(lpkg *loaderPackage) { - lpkg.loadOnce.Do(func() { - // Load the direct dependencies, in parallel. - var wg sync.WaitGroup - for _, ipkg := range lpkg.Imports { - imp := ld.pkgs[ipkg.ID] - wg.Add(1) - go func(imp *loaderPackage) { - ld.loadRecursive(imp) - wg.Done() - }(imp) - } - wg.Wait() - ld.loadPackage(lpkg) - }) -} - -// loadPackage loads the specified package. -// It must be called only once per Package, -// after immediate dependencies are loaded. -// Precondition: ld.Mode & NeedTypes. -func (ld *loader) loadPackage(lpkg *loaderPackage) { - if lpkg.PkgPath == "unsafe" { - // Fill in the blanks to avoid surprises. - lpkg.Types = types.Unsafe - lpkg.Fset = ld.Fset - lpkg.Syntax = []*ast.File{} - lpkg.TypesInfo = new(types.Info) - lpkg.TypesSizes = ld.sizes - return - } - - // Call NewPackage directly with explicit name. - // This avoids skew between golist and go/types when the files' - // package declarations are inconsistent. - lpkg.Types = types.NewPackage(lpkg.PkgPath, lpkg.Name) - lpkg.Fset = ld.Fset - - // Subtle: we populate all Types fields with an empty Package - // before loading export data so that export data processing - // never has to create a types.Package for an indirect dependency, - // which would then require that such created packages be explicitly - // inserted back into the Import graph as a final step after export data loading. - // The Diamond test exercises this case. - if !lpkg.needtypes { - return - } - if !lpkg.needsrc { - ld.loadFromExportData(lpkg) - return // not a source package, don't get syntax trees - } - - appendError := func(err error) { - // Convert various error types into the one true Error. - var errs []Error - switch err := err.(type) { - case Error: - // from driver - errs = append(errs, err) - - case *os.PathError: - // from parser - errs = append(errs, Error{ - Pos: err.Path + ":1", - Msg: err.Err.Error(), - Kind: ParseError, - }) - - case scanner.ErrorList: - // from parser - for _, err := range err { - errs = append(errs, Error{ - Pos: err.Pos.String(), - Msg: err.Msg, - Kind: ParseError, - }) - } - - case types.Error: - // from type checker - errs = append(errs, Error{ - Pos: err.Fset.Position(err.Pos).String(), - Msg: err.Msg, - Kind: TypeError, - }) - - default: - // unexpected impoverished error from parser? - errs = append(errs, Error{ - Pos: "-", - Msg: err.Error(), - Kind: UnknownError, - }) - - // If you see this error message, please file a bug. - log.Printf("internal error: error %q (%T) without position", err, err) - } - - lpkg.Errors = append(lpkg.Errors, errs...) - } - - if len(lpkg.CompiledGoFiles) == 0 && lpkg.ExportFile != "" { - // The config requested loading sources and types, but sources are missing. - // Add an error to the package and fall back to loading from export data. - appendError(Error{"-", fmt.Sprintf("sources missing for package %s", lpkg.ID), ParseError}) - ld.loadFromExportData(lpkg) - return // can't get syntax trees for this package - } - - files, errs := ld.parseFiles(lpkg.CompiledGoFiles) - for _, err := range errs { - appendError(err) - } - - lpkg.Syntax = files - - lpkg.TypesInfo = &types.Info{ - Types: make(map[ast.Expr]types.TypeAndValue), - Defs: make(map[*ast.Ident]types.Object), - Uses: make(map[*ast.Ident]types.Object), - Implicits: make(map[ast.Node]types.Object), - Scopes: make(map[ast.Node]*types.Scope), - Selections: make(map[*ast.SelectorExpr]*types.Selection), - } - lpkg.TypesSizes = ld.sizes - - importer := importerFunc(func(path string) (*types.Package, error) { - if path == "unsafe" { - return types.Unsafe, nil - } - - // The imports map is keyed by import path. - ipkg := lpkg.Imports[path] - if ipkg == nil { - if err := lpkg.importErrors[path]; err != nil { - return nil, err - } - // There was skew between the metadata and the - // import declarations, likely due to an edit - // race, or because the ParseFile feature was - // used to supply alternative file contents. - return nil, fmt.Errorf("no metadata for %s", path) - } - - if ipkg.Types != nil && ipkg.Types.Complete() { - return ipkg.Types, nil - } - log.Fatalf("internal error: package %q without types was imported from %q", path, lpkg) - panic("unreachable") - }) - - // type-check - tc := &types.Config{ - Importer: importer, - - // Type-check bodies of functions only in non-initial packages. - // Example: for import graph A->B->C and initial packages {A,C}, - // we can ignore function bodies in B. - IgnoreFuncBodies: ld.Mode&NeedDeps == 0 && !lpkg.initial, - - Error: appendError, - Sizes: ld.sizes, - } - types.NewChecker(tc, ld.Fset, lpkg.Types, lpkg.TypesInfo).Files(lpkg.Syntax) - - lpkg.importErrors = nil // no longer needed - - // If !Cgo, the type-checker uses FakeImportC mode, so - // it doesn't invoke the importer for import "C", - // nor report an error for the import, - // or for any undefined C.f reference. - // We must detect this explicitly and correctly - // mark the package as IllTyped (by reporting an error). - // TODO(adonovan): if these errors are annoying, - // we could just set IllTyped quietly. - if tc.FakeImportC { - outer: - for _, f := range lpkg.Syntax { - for _, imp := range f.Imports { - if imp.Path.Value == `"C"` { - err := types.Error{Fset: ld.Fset, Pos: imp.Pos(), Msg: `import "C" ignored`} - appendError(err) - break outer - } - } - } - } - - // Record accumulated errors. - illTyped := len(lpkg.Errors) > 0 - if !illTyped { - for _, imp := range lpkg.Imports { - if imp.IllTyped { - illTyped = true - break - } - } - } - lpkg.IllTyped = illTyped -} - -// An importFunc is an implementation of the single-method -// types.Importer interface based on a function value. -type importerFunc func(path string) (*types.Package, error) - -func (f importerFunc) Import(path string) (*types.Package, error) { return f(path) } - -// We use a counting semaphore to limit -// the number of parallel I/O calls per process. -var ioLimit = make(chan bool, 20) - -func (ld *loader) parseFile(filename string) (*ast.File, error) { - ld.parseCacheMu.Lock() - v, ok := ld.parseCache[filename] - if ok { - // cache hit - ld.parseCacheMu.Unlock() - <-v.ready - } else { - // cache miss - v = &parseValue{ready: make(chan struct{})} - ld.parseCache[filename] = v - ld.parseCacheMu.Unlock() - - var src []byte - for f, contents := range ld.Config.Overlay { - if sameFile(f, filename) { - src = contents - } - } - var err error - if src == nil { - ioLimit <- true // wait - src, err = ioutil.ReadFile(filename) - <-ioLimit // signal - } - if err != nil { - v.err = err - } else { - v.f, v.err = ld.ParseFile(ld.Fset, filename, src) - } - - close(v.ready) - } - return v.f, v.err -} - -// parseFiles reads and parses the Go source files and returns the ASTs -// of the ones that could be at least partially parsed, along with a -// list of I/O and parse errors encountered. -// -// Because files are scanned in parallel, the token.Pos -// positions of the resulting ast.Files are not ordered. -// -func (ld *loader) parseFiles(filenames []string) ([]*ast.File, []error) { - var wg sync.WaitGroup - n := len(filenames) - parsed := make([]*ast.File, n) - errors := make([]error, n) - for i, file := range filenames { - if ld.Config.Context.Err() != nil { - parsed[i] = nil - errors[i] = ld.Config.Context.Err() - continue - } - wg.Add(1) - go func(i int, filename string) { - parsed[i], errors[i] = ld.parseFile(filename) - wg.Done() - }(i, file) - } - wg.Wait() - - // Eliminate nils, preserving order. - var o int - for _, f := range parsed { - if f != nil { - parsed[o] = f - o++ - } - } - parsed = parsed[:o] - - o = 0 - for _, err := range errors { - if err != nil { - errors[o] = err - o++ - } - } - errors = errors[:o] - - return parsed, errors -} - -// sameFile returns true if x and y have the same basename and denote -// the same file. -// -func sameFile(x, y string) bool { - if x == y { - // It could be the case that y doesn't exist. - // For instance, it may be an overlay file that - // hasn't been written to disk. To handle that case - // let x == y through. (We added the exact absolute path - // string to the CompiledGoFiles list, so the unwritten - // overlay case implies x==y.) - return true - } - if strings.EqualFold(filepath.Base(x), filepath.Base(y)) { // (optimisation) - if xi, err := os.Stat(x); err == nil { - if yi, err := os.Stat(y); err == nil { - return os.SameFile(xi, yi) - } - } - } - return false -} - -// loadFromExportData returns type information for the specified -// package, loading it from an export data file on the first request. -func (ld *loader) loadFromExportData(lpkg *loaderPackage) (*types.Package, error) { - if lpkg.PkgPath == "" { - log.Fatalf("internal error: Package %s has no PkgPath", lpkg) - } - - // Because gcexportdata.Read has the potential to create or - // modify the types.Package for each node in the transitive - // closure of dependencies of lpkg, all exportdata operations - // must be sequential. (Finer-grained locking would require - // changes to the gcexportdata API.) - // - // The exportMu lock guards the Package.Pkg field and the - // types.Package it points to, for each Package in the graph. - // - // Not all accesses to Package.Pkg need to be protected by exportMu: - // graph ordering ensures that direct dependencies of source - // packages are fully loaded before the importer reads their Pkg field. - ld.exportMu.Lock() - defer ld.exportMu.Unlock() - - if tpkg := lpkg.Types; tpkg != nil && tpkg.Complete() { - return tpkg, nil // cache hit - } - - lpkg.IllTyped = true // fail safe - - if lpkg.ExportFile == "" { - // Errors while building export data will have been printed to stderr. - return nil, fmt.Errorf("no export data file") - } - f, err := os.Open(lpkg.ExportFile) - if err != nil { - return nil, err - } - defer f.Close() - - // Read gc export data. - // - // We don't currently support gccgo export data because all - // underlying workspaces use the gc toolchain. (Even build - // systems that support gccgo don't use it for workspace - // queries.) - r, err := gcexportdata.NewReader(f) - if err != nil { - return nil, fmt.Errorf("reading %s: %v", lpkg.ExportFile, err) - } - - // Build the view. - // - // The gcexportdata machinery has no concept of package ID. - // It identifies packages by their PkgPath, which although not - // globally unique is unique within the scope of one invocation - // of the linker, type-checker, or gcexportdata. - // - // So, we must build a PkgPath-keyed view of the global - // (conceptually ID-keyed) cache of packages and pass it to - // gcexportdata. The view must contain every existing - // package that might possibly be mentioned by the - // current package---its transitive closure. - // - // In loadPackage, we unconditionally create a types.Package for - // each dependency so that export data loading does not - // create new ones. - // - // TODO(adonovan): it would be simpler and more efficient - // if the export data machinery invoked a callback to - // get-or-create a package instead of a map. - // - view := make(map[string]*types.Package) // view seen by gcexportdata - seen := make(map[*loaderPackage]bool) // all visited packages - var visit func(pkgs map[string]*Package) - visit = func(pkgs map[string]*Package) { - for _, p := range pkgs { - lpkg := ld.pkgs[p.ID] - if !seen[lpkg] { - seen[lpkg] = true - view[lpkg.PkgPath] = lpkg.Types - visit(lpkg.Imports) - } - } - } - visit(lpkg.Imports) - - viewLen := len(view) + 1 // adding the self package - // Parse the export data. - // (May modify incomplete packages in view but not create new ones.) - tpkg, err := gcexportdata.Read(r, ld.Fset, view, lpkg.PkgPath) - if err != nil { - return nil, fmt.Errorf("reading %s: %v", lpkg.ExportFile, err) - } - if viewLen != len(view) { - log.Fatalf("Unexpected package creation during export data loading") - } - - lpkg.Types = tpkg - lpkg.IllTyped = false - - return tpkg, nil -} - -// impliedLoadMode returns loadMode with its dependencies. -func impliedLoadMode(loadMode LoadMode) LoadMode { - if loadMode&NeedTypesInfo != 0 && loadMode&NeedImports == 0 { - // If NeedTypesInfo, go/packages needs to do typechecking itself so it can - // associate type info with the AST. To do so, we need the export data - // for dependencies, which means we need to ask for the direct dependencies. - // NeedImports is used to ask for the direct dependencies. - loadMode |= NeedImports - } - - if loadMode&NeedDeps != 0 && loadMode&NeedImports == 0 { - // With NeedDeps we need to load at least direct dependencies. - // NeedImports is used to ask for the direct dependencies. - loadMode |= NeedImports - } - - return loadMode -} - -func usesExportData(cfg *Config) bool { - return cfg.Mode&NeedExportsFile != 0 || cfg.Mode&NeedTypes != 0 && cfg.Mode&NeedDeps == 0 -} diff --git a/vendor/golang.org/x/tools/go/packages/visit.go b/vendor/golang.org/x/tools/go/packages/visit.go deleted file mode 100644 index b13cb081fcb..00000000000 --- a/vendor/golang.org/x/tools/go/packages/visit.go +++ /dev/null @@ -1,55 +0,0 @@ -package packages - -import ( - "fmt" - "os" - "sort" -) - -// Visit visits all the packages in the import graph whose roots are -// pkgs, calling the optional pre function the first time each package -// is encountered (preorder), and the optional post function after a -// package's dependencies have been visited (postorder). -// The boolean result of pre(pkg) determines whether -// the imports of package pkg are visited. -func Visit(pkgs []*Package, pre func(*Package) bool, post func(*Package)) { - seen := make(map[*Package]bool) - var visit func(*Package) - visit = func(pkg *Package) { - if !seen[pkg] { - seen[pkg] = true - - if pre == nil || pre(pkg) { - paths := make([]string, 0, len(pkg.Imports)) - for path := range pkg.Imports { - paths = append(paths, path) - } - sort.Strings(paths) // Imports is a map, this makes visit stable - for _, path := range paths { - visit(pkg.Imports[path]) - } - } - - if post != nil { - post(pkg) - } - } - } - for _, pkg := range pkgs { - visit(pkg) - } -} - -// PrintErrors prints to os.Stderr the accumulated errors of all -// packages in the import graph rooted at pkgs, dependencies first. -// PrintErrors returns the number of errors printed. -func PrintErrors(pkgs []*Package) int { - var n int - Visit(pkgs, nil, func(pkg *Package) { - for _, err := range pkg.Errors { - fmt.Fprintln(os.Stderr, err) - n++ - } - }) - return n -} diff --git a/vendor/golang.org/x/tools/imports/forward.go b/vendor/golang.org/x/tools/imports/forward.go index eef25969ded..dbe5b49a9f3 100644 --- a/vendor/golang.org/x/tools/imports/forward.go +++ b/vendor/golang.org/x/tools/imports/forward.go @@ -4,6 +4,8 @@ package imports // import "golang.org/x/tools/imports" import ( "go/build" + "log" + "os" intimp "golang.org/x/tools/internal/imports" ) @@ -42,7 +44,10 @@ func Process(filename string, src []byte, opt *Options) ([]byte, error) { Env: &intimp.ProcessEnv{ GOPATH: build.Default.GOPATH, GOROOT: build.Default.GOROOT, - Debug: Debug, + GOFLAGS: os.Getenv("GOFLAGS"), + GO111MODULE: os.Getenv("GO111MODULE"), + GOPROXY: os.Getenv("GOPROXY"), + GOSUMDB: os.Getenv("GOSUMDB"), LocalPrefix: LocalPrefix, }, AllErrors: opt.AllErrors, @@ -52,6 +57,9 @@ func Process(filename string, src []byte, opt *Options) ([]byte, error) { TabIndent: opt.TabIndent, TabWidth: opt.TabWidth, } + if Debug { + intopt.Env.Logf = log.Printf + } return intimp.Process(filename, src, intopt) } diff --git a/vendor/golang.org/x/tools/internal/event/core/event.go b/vendor/golang.org/x/tools/internal/event/core/event.go new file mode 100644 index 00000000000..e37b4949150 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/event/core/event.go @@ -0,0 +1,85 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package core provides support for event based telemetry. +package core + +import ( + "fmt" + "time" + + "golang.org/x/tools/internal/event/label" +) + +// Event holds the information about an event of note that ocurred. +type Event struct { + at time.Time + + // As events are often on the stack, storing the first few labels directly + // in the event can avoid an allocation at all for the very common cases of + // simple events. + // The length needs to be large enough to cope with the majority of events + // but no so large as to cause undue stack pressure. + // A log message with two values will use 3 labels (one for each value and + // one for the message itself). + + static [3]label.Label // inline storage for the first few labels + dynamic []label.Label // dynamically sized storage for remaining labels +} + +// eventLabelMap implements label.Map for a the labels of an Event. +type eventLabelMap struct { + event Event +} + +func (ev Event) At() time.Time { return ev.at } + +func (ev Event) Format(f fmt.State, r rune) { + if !ev.at.IsZero() { + fmt.Fprint(f, ev.at.Format("2006/01/02 15:04:05 ")) + } + for index := 0; ev.Valid(index); index++ { + if l := ev.Label(index); l.Valid() { + fmt.Fprintf(f, "\n\t%v", l) + } + } +} + +func (ev Event) Valid(index int) bool { + return index >= 0 && index < len(ev.static)+len(ev.dynamic) +} + +func (ev Event) Label(index int) label.Label { + if index < len(ev.static) { + return ev.static[index] + } + return ev.dynamic[index-len(ev.static)] +} + +func (ev Event) Find(key label.Key) label.Label { + for _, l := range ev.static { + if l.Key() == key { + return l + } + } + for _, l := range ev.dynamic { + if l.Key() == key { + return l + } + } + return label.Label{} +} + +func MakeEvent(static [3]label.Label, labels []label.Label) Event { + return Event{ + static: static, + dynamic: labels, + } +} + +// CloneEvent event returns a copy of the event with the time adjusted to at. +func CloneEvent(ev Event, at time.Time) Event { + ev.at = at + return ev +} diff --git a/vendor/golang.org/x/tools/internal/event/core/export.go b/vendor/golang.org/x/tools/internal/event/core/export.go new file mode 100644 index 00000000000..05f3a9a5791 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/event/core/export.go @@ -0,0 +1,70 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package core + +import ( + "context" + "sync/atomic" + "time" + "unsafe" + + "golang.org/x/tools/internal/event/label" +) + +// Exporter is a function that handles events. +// It may return a modified context and event. +type Exporter func(context.Context, Event, label.Map) context.Context + +var ( + exporter unsafe.Pointer +) + +// SetExporter sets the global exporter function that handles all events. +// The exporter is called synchronously from the event call site, so it should +// return quickly so as not to hold up user code. +func SetExporter(e Exporter) { + p := unsafe.Pointer(&e) + if e == nil { + // &e is always valid, and so p is always valid, but for the early abort + // of ProcessEvent to be efficient it needs to make the nil check on the + // pointer without having to dereference it, so we make the nil function + // also a nil pointer + p = nil + } + atomic.StorePointer(&exporter, p) +} + +// deliver is called to deliver an event to the supplied exporter. +// it will fill in the time. +func deliver(ctx context.Context, exporter Exporter, ev Event) context.Context { + // add the current time to the event + ev.at = time.Now() + // hand the event off to the current exporter + return exporter(ctx, ev, ev) +} + +// Export is called to deliver an event to the global exporter if set. +func Export(ctx context.Context, ev Event) context.Context { + // get the global exporter and abort early if there is not one + exporterPtr := (*Exporter)(atomic.LoadPointer(&exporter)) + if exporterPtr == nil { + return ctx + } + return deliver(ctx, *exporterPtr, ev) +} + +// ExportPair is called to deliver a start event to the supplied exporter. +// It also returns a function that will deliver the end event to the same +// exporter. +// It will fill in the time. +func ExportPair(ctx context.Context, begin, end Event) (context.Context, func()) { + // get the global exporter and abort early if there is not one + exporterPtr := (*Exporter)(atomic.LoadPointer(&exporter)) + if exporterPtr == nil { + return ctx, func() {} + } + ctx = deliver(ctx, *exporterPtr, begin) + return ctx, func() { deliver(ctx, *exporterPtr, end) } +} diff --git a/vendor/golang.org/x/tools/internal/event/core/fast.go b/vendor/golang.org/x/tools/internal/event/core/fast.go new file mode 100644 index 00000000000..06c1d4615e6 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/event/core/fast.go @@ -0,0 +1,77 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package core + +import ( + "context" + + "golang.org/x/tools/internal/event/keys" + "golang.org/x/tools/internal/event/label" +) + +// Log1 takes a message and one label delivers a log event to the exporter. +// It is a customized version of Print that is faster and does no allocation. +func Log1(ctx context.Context, message string, t1 label.Label) { + Export(ctx, MakeEvent([3]label.Label{ + keys.Msg.Of(message), + t1, + }, nil)) +} + +// Log2 takes a message and two labels and delivers a log event to the exporter. +// It is a customized version of Print that is faster and does no allocation. +func Log2(ctx context.Context, message string, t1 label.Label, t2 label.Label) { + Export(ctx, MakeEvent([3]label.Label{ + keys.Msg.Of(message), + t1, + t2, + }, nil)) +} + +// Metric1 sends a label event to the exporter with the supplied labels. +func Metric1(ctx context.Context, t1 label.Label) context.Context { + return Export(ctx, MakeEvent([3]label.Label{ + keys.Metric.New(), + t1, + }, nil)) +} + +// Metric2 sends a label event to the exporter with the supplied labels. +func Metric2(ctx context.Context, t1, t2 label.Label) context.Context { + return Export(ctx, MakeEvent([3]label.Label{ + keys.Metric.New(), + t1, + t2, + }, nil)) +} + +// Start1 sends a span start event with the supplied label list to the exporter. +// It also returns a function that will end the span, which should normally be +// deferred. +func Start1(ctx context.Context, name string, t1 label.Label) (context.Context, func()) { + return ExportPair(ctx, + MakeEvent([3]label.Label{ + keys.Start.Of(name), + t1, + }, nil), + MakeEvent([3]label.Label{ + keys.End.New(), + }, nil)) +} + +// Start2 sends a span start event with the supplied label list to the exporter. +// It also returns a function that will end the span, which should normally be +// deferred. +func Start2(ctx context.Context, name string, t1, t2 label.Label) (context.Context, func()) { + return ExportPair(ctx, + MakeEvent([3]label.Label{ + keys.Start.Of(name), + t1, + t2, + }, nil), + MakeEvent([3]label.Label{ + keys.End.New(), + }, nil)) +} diff --git a/vendor/golang.org/x/tools/internal/event/doc.go b/vendor/golang.org/x/tools/internal/event/doc.go new file mode 100644 index 00000000000..5dc6e6babed --- /dev/null +++ b/vendor/golang.org/x/tools/internal/event/doc.go @@ -0,0 +1,7 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package event provides a set of packages that cover the main +// concepts of telemetry in an implementation agnostic way. +package event diff --git a/vendor/golang.org/x/tools/internal/event/event.go b/vendor/golang.org/x/tools/internal/event/event.go new file mode 100644 index 00000000000..4d55e577d1a --- /dev/null +++ b/vendor/golang.org/x/tools/internal/event/event.go @@ -0,0 +1,127 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package event + +import ( + "context" + + "golang.org/x/tools/internal/event/core" + "golang.org/x/tools/internal/event/keys" + "golang.org/x/tools/internal/event/label" +) + +// Exporter is a function that handles events. +// It may return a modified context and event. +type Exporter func(context.Context, core.Event, label.Map) context.Context + +// SetExporter sets the global exporter function that handles all events. +// The exporter is called synchronously from the event call site, so it should +// return quickly so as not to hold up user code. +func SetExporter(e Exporter) { + core.SetExporter(core.Exporter(e)) +} + +// Log takes a message and a label list and combines them into a single event +// before delivering them to the exporter. +func Log(ctx context.Context, message string, labels ...label.Label) { + core.Export(ctx, core.MakeEvent([3]label.Label{ + keys.Msg.Of(message), + }, labels)) +} + +// IsLog returns true if the event was built by the Log function. +// It is intended to be used in exporters to identify the semantics of the +// event when deciding what to do with it. +func IsLog(ev core.Event) bool { + return ev.Label(0).Key() == keys.Msg +} + +// Error takes a message and a label list and combines them into a single event +// before delivering them to the exporter. It captures the error in the +// delivered event. +func Error(ctx context.Context, message string, err error, labels ...label.Label) { + core.Export(ctx, core.MakeEvent([3]label.Label{ + keys.Msg.Of(message), + keys.Err.Of(err), + }, labels)) +} + +// IsError returns true if the event was built by the Error function. +// It is intended to be used in exporters to identify the semantics of the +// event when deciding what to do with it. +func IsError(ev core.Event) bool { + return ev.Label(0).Key() == keys.Msg && + ev.Label(1).Key() == keys.Err +} + +// Metric sends a label event to the exporter with the supplied labels. +func Metric(ctx context.Context, labels ...label.Label) { + core.Export(ctx, core.MakeEvent([3]label.Label{ + keys.Metric.New(), + }, labels)) +} + +// IsMetric returns true if the event was built by the Metric function. +// It is intended to be used in exporters to identify the semantics of the +// event when deciding what to do with it. +func IsMetric(ev core.Event) bool { + return ev.Label(0).Key() == keys.Metric +} + +// Label sends a label event to the exporter with the supplied labels. +func Label(ctx context.Context, labels ...label.Label) context.Context { + return core.Export(ctx, core.MakeEvent([3]label.Label{ + keys.Label.New(), + }, labels)) +} + +// IsLabel returns true if the event was built by the Label function. +// It is intended to be used in exporters to identify the semantics of the +// event when deciding what to do with it. +func IsLabel(ev core.Event) bool { + return ev.Label(0).Key() == keys.Label +} + +// Start sends a span start event with the supplied label list to the exporter. +// It also returns a function that will end the span, which should normally be +// deferred. +func Start(ctx context.Context, name string, labels ...label.Label) (context.Context, func()) { + return core.ExportPair(ctx, + core.MakeEvent([3]label.Label{ + keys.Start.Of(name), + }, labels), + core.MakeEvent([3]label.Label{ + keys.End.New(), + }, nil)) +} + +// IsStart returns true if the event was built by the Start function. +// It is intended to be used in exporters to identify the semantics of the +// event when deciding what to do with it. +func IsStart(ev core.Event) bool { + return ev.Label(0).Key() == keys.Start +} + +// IsEnd returns true if the event was built by the End function. +// It is intended to be used in exporters to identify the semantics of the +// event when deciding what to do with it. +func IsEnd(ev core.Event) bool { + return ev.Label(0).Key() == keys.End +} + +// Detach returns a context without an associated span. +// This allows the creation of spans that are not children of the current span. +func Detach(ctx context.Context) context.Context { + return core.Export(ctx, core.MakeEvent([3]label.Label{ + keys.Detach.New(), + }, nil)) +} + +// IsDetach returns true if the event was built by the Detach function. +// It is intended to be used in exporters to identify the semantics of the +// event when deciding what to do with it. +func IsDetach(ev core.Event) bool { + return ev.Label(0).Key() == keys.Detach +} diff --git a/vendor/golang.org/x/tools/internal/event/keys/keys.go b/vendor/golang.org/x/tools/internal/event/keys/keys.go new file mode 100644 index 00000000000..a02206e3015 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/event/keys/keys.go @@ -0,0 +1,564 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package keys + +import ( + "fmt" + "io" + "math" + "strconv" + + "golang.org/x/tools/internal/event/label" +) + +// Value represents a key for untyped values. +type Value struct { + name string + description string +} + +// New creates a new Key for untyped values. +func New(name, description string) *Value { + return &Value{name: name, description: description} +} + +func (k *Value) Name() string { return k.name } +func (k *Value) Description() string { return k.description } + +func (k *Value) Format(w io.Writer, buf []byte, l label.Label) { + fmt.Fprint(w, k.From(l)) +} + +// Get can be used to get a label for the key from a label.Map. +func (k *Value) Get(lm label.Map) interface{} { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return nil +} + +// From can be used to get a value from a Label. +func (k *Value) From(t label.Label) interface{} { return t.UnpackValue() } + +// Of creates a new Label with this key and the supplied value. +func (k *Value) Of(value interface{}) label.Label { return label.OfValue(k, value) } + +// Tag represents a key for tagging labels that have no value. +// These are used when the existence of the label is the entire information it +// carries, such as marking events to be of a specific kind, or from a specific +// package. +type Tag struct { + name string + description string +} + +// NewTag creates a new Key for tagging labels. +func NewTag(name, description string) *Tag { + return &Tag{name: name, description: description} +} + +func (k *Tag) Name() string { return k.name } +func (k *Tag) Description() string { return k.description } + +func (k *Tag) Format(w io.Writer, buf []byte, l label.Label) {} + +// New creates a new Label with this key. +func (k *Tag) New() label.Label { return label.OfValue(k, nil) } + +// Int represents a key +type Int struct { + name string + description string +} + +// NewInt creates a new Key for int values. +func NewInt(name, description string) *Int { + return &Int{name: name, description: description} +} + +func (k *Int) Name() string { return k.name } +func (k *Int) Description() string { return k.description } + +func (k *Int) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *Int) Of(v int) label.Label { return label.Of64(k, uint64(v)) } + +// Get can be used to get a label for the key from a label.Map. +func (k *Int) Get(lm label.Map) int { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *Int) From(t label.Label) int { return int(t.Unpack64()) } + +// Int8 represents a key +type Int8 struct { + name string + description string +} + +// NewInt8 creates a new Key for int8 values. +func NewInt8(name, description string) *Int8 { + return &Int8{name: name, description: description} +} + +func (k *Int8) Name() string { return k.name } +func (k *Int8) Description() string { return k.description } + +func (k *Int8) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *Int8) Of(v int8) label.Label { return label.Of64(k, uint64(v)) } + +// Get can be used to get a label for the key from a label.Map. +func (k *Int8) Get(lm label.Map) int8 { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *Int8) From(t label.Label) int8 { return int8(t.Unpack64()) } + +// Int16 represents a key +type Int16 struct { + name string + description string +} + +// NewInt16 creates a new Key for int16 values. +func NewInt16(name, description string) *Int16 { + return &Int16{name: name, description: description} +} + +func (k *Int16) Name() string { return k.name } +func (k *Int16) Description() string { return k.description } + +func (k *Int16) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *Int16) Of(v int16) label.Label { return label.Of64(k, uint64(v)) } + +// Get can be used to get a label for the key from a label.Map. +func (k *Int16) Get(lm label.Map) int16 { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *Int16) From(t label.Label) int16 { return int16(t.Unpack64()) } + +// Int32 represents a key +type Int32 struct { + name string + description string +} + +// NewInt32 creates a new Key for int32 values. +func NewInt32(name, description string) *Int32 { + return &Int32{name: name, description: description} +} + +func (k *Int32) Name() string { return k.name } +func (k *Int32) Description() string { return k.description } + +func (k *Int32) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *Int32) Of(v int32) label.Label { return label.Of64(k, uint64(v)) } + +// Get can be used to get a label for the key from a label.Map. +func (k *Int32) Get(lm label.Map) int32 { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *Int32) From(t label.Label) int32 { return int32(t.Unpack64()) } + +// Int64 represents a key +type Int64 struct { + name string + description string +} + +// NewInt64 creates a new Key for int64 values. +func NewInt64(name, description string) *Int64 { + return &Int64{name: name, description: description} +} + +func (k *Int64) Name() string { return k.name } +func (k *Int64) Description() string { return k.description } + +func (k *Int64) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendInt(buf, k.From(l), 10)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *Int64) Of(v int64) label.Label { return label.Of64(k, uint64(v)) } + +// Get can be used to get a label for the key from a label.Map. +func (k *Int64) Get(lm label.Map) int64 { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *Int64) From(t label.Label) int64 { return int64(t.Unpack64()) } + +// UInt represents a key +type UInt struct { + name string + description string +} + +// NewUInt creates a new Key for uint values. +func NewUInt(name, description string) *UInt { + return &UInt{name: name, description: description} +} + +func (k *UInt) Name() string { return k.name } +func (k *UInt) Description() string { return k.description } + +func (k *UInt) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *UInt) Of(v uint) label.Label { return label.Of64(k, uint64(v)) } + +// Get can be used to get a label for the key from a label.Map. +func (k *UInt) Get(lm label.Map) uint { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *UInt) From(t label.Label) uint { return uint(t.Unpack64()) } + +// UInt8 represents a key +type UInt8 struct { + name string + description string +} + +// NewUInt8 creates a new Key for uint8 values. +func NewUInt8(name, description string) *UInt8 { + return &UInt8{name: name, description: description} +} + +func (k *UInt8) Name() string { return k.name } +func (k *UInt8) Description() string { return k.description } + +func (k *UInt8) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *UInt8) Of(v uint8) label.Label { return label.Of64(k, uint64(v)) } + +// Get can be used to get a label for the key from a label.Map. +func (k *UInt8) Get(lm label.Map) uint8 { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *UInt8) From(t label.Label) uint8 { return uint8(t.Unpack64()) } + +// UInt16 represents a key +type UInt16 struct { + name string + description string +} + +// NewUInt16 creates a new Key for uint16 values. +func NewUInt16(name, description string) *UInt16 { + return &UInt16{name: name, description: description} +} + +func (k *UInt16) Name() string { return k.name } +func (k *UInt16) Description() string { return k.description } + +func (k *UInt16) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *UInt16) Of(v uint16) label.Label { return label.Of64(k, uint64(v)) } + +// Get can be used to get a label for the key from a label.Map. +func (k *UInt16) Get(lm label.Map) uint16 { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *UInt16) From(t label.Label) uint16 { return uint16(t.Unpack64()) } + +// UInt32 represents a key +type UInt32 struct { + name string + description string +} + +// NewUInt32 creates a new Key for uint32 values. +func NewUInt32(name, description string) *UInt32 { + return &UInt32{name: name, description: description} +} + +func (k *UInt32) Name() string { return k.name } +func (k *UInt32) Description() string { return k.description } + +func (k *UInt32) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *UInt32) Of(v uint32) label.Label { return label.Of64(k, uint64(v)) } + +// Get can be used to get a label for the key from a label.Map. +func (k *UInt32) Get(lm label.Map) uint32 { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *UInt32) From(t label.Label) uint32 { return uint32(t.Unpack64()) } + +// UInt64 represents a key +type UInt64 struct { + name string + description string +} + +// NewUInt64 creates a new Key for uint64 values. +func NewUInt64(name, description string) *UInt64 { + return &UInt64{name: name, description: description} +} + +func (k *UInt64) Name() string { return k.name } +func (k *UInt64) Description() string { return k.description } + +func (k *UInt64) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendUint(buf, k.From(l), 10)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *UInt64) Of(v uint64) label.Label { return label.Of64(k, v) } + +// Get can be used to get a label for the key from a label.Map. +func (k *UInt64) Get(lm label.Map) uint64 { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *UInt64) From(t label.Label) uint64 { return t.Unpack64() } + +// Float32 represents a key +type Float32 struct { + name string + description string +} + +// NewFloat32 creates a new Key for float32 values. +func NewFloat32(name, description string) *Float32 { + return &Float32{name: name, description: description} +} + +func (k *Float32) Name() string { return k.name } +func (k *Float32) Description() string { return k.description } + +func (k *Float32) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendFloat(buf, float64(k.From(l)), 'E', -1, 32)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *Float32) Of(v float32) label.Label { + return label.Of64(k, uint64(math.Float32bits(v))) +} + +// Get can be used to get a label for the key from a label.Map. +func (k *Float32) Get(lm label.Map) float32 { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *Float32) From(t label.Label) float32 { + return math.Float32frombits(uint32(t.Unpack64())) +} + +// Float64 represents a key +type Float64 struct { + name string + description string +} + +// NewFloat64 creates a new Key for int64 values. +func NewFloat64(name, description string) *Float64 { + return &Float64{name: name, description: description} +} + +func (k *Float64) Name() string { return k.name } +func (k *Float64) Description() string { return k.description } + +func (k *Float64) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendFloat(buf, k.From(l), 'E', -1, 64)) +} + +// Of creates a new Label with this key and the supplied value. +func (k *Float64) Of(v float64) label.Label { + return label.Of64(k, math.Float64bits(v)) +} + +// Get can be used to get a label for the key from a label.Map. +func (k *Float64) Get(lm label.Map) float64 { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return 0 +} + +// From can be used to get a value from a Label. +func (k *Float64) From(t label.Label) float64 { + return math.Float64frombits(t.Unpack64()) +} + +// String represents a key +type String struct { + name string + description string +} + +// NewString creates a new Key for int64 values. +func NewString(name, description string) *String { + return &String{name: name, description: description} +} + +func (k *String) Name() string { return k.name } +func (k *String) Description() string { return k.description } + +func (k *String) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendQuote(buf, k.From(l))) +} + +// Of creates a new Label with this key and the supplied value. +func (k *String) Of(v string) label.Label { return label.OfString(k, v) } + +// Get can be used to get a label for the key from a label.Map. +func (k *String) Get(lm label.Map) string { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return "" +} + +// From can be used to get a value from a Label. +func (k *String) From(t label.Label) string { return t.UnpackString() } + +// Boolean represents a key +type Boolean struct { + name string + description string +} + +// NewBoolean creates a new Key for bool values. +func NewBoolean(name, description string) *Boolean { + return &Boolean{name: name, description: description} +} + +func (k *Boolean) Name() string { return k.name } +func (k *Boolean) Description() string { return k.description } + +func (k *Boolean) Format(w io.Writer, buf []byte, l label.Label) { + w.Write(strconv.AppendBool(buf, k.From(l))) +} + +// Of creates a new Label with this key and the supplied value. +func (k *Boolean) Of(v bool) label.Label { + if v { + return label.Of64(k, 1) + } + return label.Of64(k, 0) +} + +// Get can be used to get a label for the key from a label.Map. +func (k *Boolean) Get(lm label.Map) bool { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return false +} + +// From can be used to get a value from a Label. +func (k *Boolean) From(t label.Label) bool { return t.Unpack64() > 0 } + +// Error represents a key +type Error struct { + name string + description string +} + +// NewError creates a new Key for int64 values. +func NewError(name, description string) *Error { + return &Error{name: name, description: description} +} + +func (k *Error) Name() string { return k.name } +func (k *Error) Description() string { return k.description } + +func (k *Error) Format(w io.Writer, buf []byte, l label.Label) { + io.WriteString(w, k.From(l).Error()) +} + +// Of creates a new Label with this key and the supplied value. +func (k *Error) Of(v error) label.Label { return label.OfValue(k, v) } + +// Get can be used to get a label for the key from a label.Map. +func (k *Error) Get(lm label.Map) error { + if t := lm.Find(k); t.Valid() { + return k.From(t) + } + return nil +} + +// From can be used to get a value from a Label. +func (k *Error) From(t label.Label) error { + err, _ := t.UnpackValue().(error) + return err +} diff --git a/vendor/golang.org/x/tools/internal/event/keys/standard.go b/vendor/golang.org/x/tools/internal/event/keys/standard.go new file mode 100644 index 00000000000..7e958665921 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/event/keys/standard.go @@ -0,0 +1,22 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package keys + +var ( + // Msg is a key used to add message strings to label lists. + Msg = NewString("message", "a readable message") + // Label is a key used to indicate an event adds labels to the context. + Label = NewTag("label", "a label context marker") + // Start is used for things like traces that have a name. + Start = NewString("start", "span start") + // Metric is a key used to indicate an event records metrics. + End = NewTag("end", "a span end marker") + // Metric is a key used to indicate an event records metrics. + Detach = NewTag("detach", "a span detach marker") + // Err is a key used to add error values to label lists. + Err = NewError("error", "an error that occurred") + // Metric is a key used to indicate an event records metrics. + Metric = NewTag("metric", "a metric event marker") +) diff --git a/vendor/golang.org/x/tools/internal/event/label/label.go b/vendor/golang.org/x/tools/internal/event/label/label.go new file mode 100644 index 00000000000..b55c12eb250 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/event/label/label.go @@ -0,0 +1,213 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package label + +import ( + "fmt" + "io" + "reflect" + "unsafe" +) + +// Key is used as the identity of a Label. +// Keys are intended to be compared by pointer only, the name should be unique +// for communicating with external systems, but it is not required or enforced. +type Key interface { + // Name returns the key name. + Name() string + // Description returns a string that can be used to describe the value. + Description() string + + // Format is used in formatting to append the value of the label to the + // supplied buffer. + // The formatter may use the supplied buf as a scratch area to avoid + // allocations. + Format(w io.Writer, buf []byte, l Label) +} + +// Label holds a key and value pair. +// It is normally used when passing around lists of labels. +type Label struct { + key Key + packed uint64 + untyped interface{} +} + +// Map is the interface to a collection of Labels indexed by key. +type Map interface { + // Find returns the label that matches the supplied key. + Find(key Key) Label +} + +// List is the interface to something that provides an iterable +// list of labels. +// Iteration should start from 0 and continue until Valid returns false. +type List interface { + // Valid returns true if the index is within range for the list. + // It does not imply the label at that index will itself be valid. + Valid(index int) bool + // Label returns the label at the given index. + Label(index int) Label +} + +// list implements LabelList for a list of Labels. +type list struct { + labels []Label +} + +// filter wraps a LabelList filtering out specific labels. +type filter struct { + keys []Key + underlying List +} + +// listMap implements LabelMap for a simple list of labels. +type listMap struct { + labels []Label +} + +// mapChain implements LabelMap for a list of underlying LabelMap. +type mapChain struct { + maps []Map +} + +// OfValue creates a new label from the key and value. +// This method is for implementing new key types, label creation should +// normally be done with the Of method of the key. +func OfValue(k Key, value interface{}) Label { return Label{key: k, untyped: value} } + +// UnpackValue assumes the label was built using LabelOfValue and returns the value +// that was passed to that constructor. +// This method is for implementing new key types, for type safety normal +// access should be done with the From method of the key. +func (t Label) UnpackValue() interface{} { return t.untyped } + +// Of64 creates a new label from a key and a uint64. This is often +// used for non uint64 values that can be packed into a uint64. +// This method is for implementing new key types, label creation should +// normally be done with the Of method of the key. +func Of64(k Key, v uint64) Label { return Label{key: k, packed: v} } + +// Unpack64 assumes the label was built using LabelOf64 and returns the value that +// was passed to that constructor. +// This method is for implementing new key types, for type safety normal +// access should be done with the From method of the key. +func (t Label) Unpack64() uint64 { return t.packed } + +// OfString creates a new label from a key and a string. +// This method is for implementing new key types, label creation should +// normally be done with the Of method of the key. +func OfString(k Key, v string) Label { + hdr := (*reflect.StringHeader)(unsafe.Pointer(&v)) + return Label{ + key: k, + packed: uint64(hdr.Len), + untyped: unsafe.Pointer(hdr.Data), + } +} + +// UnpackString assumes the label was built using LabelOfString and returns the +// value that was passed to that constructor. +// This method is for implementing new key types, for type safety normal +// access should be done with the From method of the key. +func (t Label) UnpackString() string { + var v string + hdr := (*reflect.StringHeader)(unsafe.Pointer(&v)) + hdr.Data = uintptr(t.untyped.(unsafe.Pointer)) + hdr.Len = int(t.packed) + return *(*string)(unsafe.Pointer(hdr)) +} + +// Valid returns true if the Label is a valid one (it has a key). +func (t Label) Valid() bool { return t.key != nil } + +// Key returns the key of this Label. +func (t Label) Key() Key { return t.key } + +// Format is used for debug printing of labels. +func (t Label) Format(f fmt.State, r rune) { + if !t.Valid() { + io.WriteString(f, `nil`) + return + } + io.WriteString(f, t.Key().Name()) + io.WriteString(f, "=") + var buf [128]byte + t.Key().Format(f, buf[:0], t) +} + +func (l *list) Valid(index int) bool { + return index >= 0 && index < len(l.labels) +} + +func (l *list) Label(index int) Label { + return l.labels[index] +} + +func (f *filter) Valid(index int) bool { + return f.underlying.Valid(index) +} + +func (f *filter) Label(index int) Label { + l := f.underlying.Label(index) + for _, f := range f.keys { + if l.Key() == f { + return Label{} + } + } + return l +} + +func (lm listMap) Find(key Key) Label { + for _, l := range lm.labels { + if l.Key() == key { + return l + } + } + return Label{} +} + +func (c mapChain) Find(key Key) Label { + for _, src := range c.maps { + l := src.Find(key) + if l.Valid() { + return l + } + } + return Label{} +} + +var emptyList = &list{} + +func NewList(labels ...Label) List { + if len(labels) == 0 { + return emptyList + } + return &list{labels: labels} +} + +func Filter(l List, keys ...Key) List { + if len(keys) == 0 { + return l + } + return &filter{keys: keys, underlying: l} +} + +func NewMap(labels ...Label) Map { + return listMap{labels: labels} +} + +func MergeMaps(srcs ...Map) Map { + var nonNil []Map + for _, src := range srcs { + if src != nil { + nonNil = append(nonNil, src) + } + } + if len(nonNil) == 1 { + return nonNil[0] + } + return mapChain{maps: nonNil} +} diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk.go index 7219c8e9ff1..9887f7e7a01 100644 --- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk.go +++ b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk.go @@ -14,14 +14,14 @@ import ( "sync" ) -// TraverseLink is used as a return value from WalkFuncs to indicate that the +// ErrTraverseLink is used as a return value from WalkFuncs to indicate that the // symlink named in the call may be traversed. -var TraverseLink = errors.New("fastwalk: traverse symlink, assuming target is a directory") +var ErrTraverseLink = errors.New("fastwalk: traverse symlink, assuming target is a directory") -// SkipFiles is a used as a return value from WalkFuncs to indicate that the +// ErrSkipFiles is a used as a return value from WalkFuncs to indicate that the // callback should not be called for any other files in the current directory. // Child directories will still be traversed. -var SkipFiles = errors.New("fastwalk: skip remaining files in directory") +var ErrSkipFiles = errors.New("fastwalk: skip remaining files in directory") // Walk is a faster implementation of filepath.Walk. // @@ -167,7 +167,7 @@ func (w *walker) onDirEnt(dirName, baseName string, typ os.FileMode) error { err := w.fn(joined, typ) if typ == os.ModeSymlink { - if err == TraverseLink { + if err == ErrTraverseLink { // Set callbackDone so we don't call it twice for both the // symlink-as-symlink and the symlink-as-directory later: w.enqueue(walkItem{dir: joined, callbackDone: true}) diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go index a906b87595b..b0d6327a9e6 100644 --- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go +++ b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go @@ -26,7 +26,7 @@ func readDir(dirName string, fn func(dirName, entName string, typ os.FileMode) e continue } if err := fn(dirName, fi.Name(), fi.Mode()&os.ModeType); err != nil { - if err == SkipFiles { + if err == ErrSkipFiles { skipFiles = true continue } diff --git a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go index 3369b1a0b2d..5901a8f6160 100644 --- a/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go +++ b/vendor/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go @@ -66,7 +66,7 @@ func readDir(dirName string, fn func(dirName, entName string, typ os.FileMode) e continue } if err := fn(dirName, name, typ); err != nil { - if err == SkipFiles { + if err == ErrSkipFiles { skipFiles = true continue } @@ -76,8 +76,9 @@ func readDir(dirName string, fn func(dirName, entName string, typ os.FileMode) e } func parseDirEnt(buf []byte) (consumed int, name string, typ os.FileMode) { - // golang.org/issue/15653 - dirent := (*syscall.Dirent)(unsafe.Pointer(&buf[0])) + // golang.org/issue/37269 + dirent := &syscall.Dirent{} + copy((*[unsafe.Sizeof(syscall.Dirent{})]byte)(unsafe.Pointer(dirent))[:], buf) if v := unsafe.Offsetof(dirent.Reclen) + unsafe.Sizeof(dirent.Reclen); uintptr(len(buf)) < v { panic(fmt.Sprintf("buf size of %d smaller than dirent header size %d", len(buf), v)) } diff --git a/vendor/golang.org/x/tools/internal/gocommand/invoke.go b/vendor/golang.org/x/tools/internal/gocommand/invoke.go new file mode 100644 index 00000000000..68d8d414600 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/gocommand/invoke.go @@ -0,0 +1,210 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package gocommand is a helper for calling the go command. +package gocommand + +import ( + "bytes" + "context" + "fmt" + "io" + "os" + "os/exec" + "regexp" + "strings" + "sync" + "time" + + "golang.org/x/tools/internal/event" +) + +// An Runner will run go command invocations and serialize +// them if it sees a concurrency error. +type Runner struct { + // LoadMu guards packages.Load calls and associated state. + loadMu sync.Mutex + // locked is true when we hold the mutex and have incremented. + locked bool + serializeLoads int +} + +// 1.13: go: updates to go.mod needed, but contents have changed +// 1.14: go: updating go.mod: existing contents have changed since last read +var modConcurrencyError = regexp.MustCompile(`go:.*go.mod.*contents have changed`) + +// Run is a convenience wrapper around RunRaw. +// It returns only stdout and a "friendly" error. +func (runner *Runner) Run(ctx context.Context, inv Invocation) (*bytes.Buffer, error) { + stdout, _, friendly, _ := runner.runRaw(ctx, inv) + return stdout, friendly +} + +// RunPiped runs the invocation serially, always waiting for any concurrent +// invocations to complete first. +func (runner *Runner) RunPiped(ctx context.Context, inv Invocation, stdout, stderr io.Writer) error { + _, err := runner.runPiped(ctx, inv, stdout, stderr) + return err +} + +// RunRaw runs the invocation, serializing requests only if they fight over +// go.mod changes. +func (runner *Runner) RunRaw(ctx context.Context, inv Invocation) (*bytes.Buffer, *bytes.Buffer, error, error) { + return runner.runRaw(ctx, inv) +} + +func (runner *Runner) runPiped(ctx context.Context, inv Invocation, stdout, stderr io.Writer) (error, error) { + runner.loadMu.Lock() + runner.serializeLoads++ + runner.locked = true + + defer func() { + runner.locked = false + runner.serializeLoads-- + runner.loadMu.Unlock() + }() + + return inv.runWithFriendlyError(ctx, stdout, stderr) +} + +func (runner *Runner) runRaw(ctx context.Context, inv Invocation) (*bytes.Buffer, *bytes.Buffer, error, error) { + // We want to run invocations concurrently as much as possible. However, + // if go.mod updates are needed, only one can make them and the others will + // fail. We need to retry in those cases, but we don't want to thrash so + // badly we never recover. To avoid that, once we've seen one concurrency + // error, start serializing everything until the backlog has cleared out. + runner.loadMu.Lock() + if runner.serializeLoads == 0 { + runner.loadMu.Unlock() + } else { + runner.locked = true + runner.serializeLoads++ + } + defer func() { + if runner.locked { + runner.locked = false + runner.serializeLoads-- + runner.loadMu.Unlock() + } + }() + + for { + stdout, stderr := &bytes.Buffer{}, &bytes.Buffer{} + friendlyErr, err := inv.runWithFriendlyError(ctx, stdout, stderr) + if friendlyErr == nil || !modConcurrencyError.MatchString(friendlyErr.Error()) { + return stdout, stderr, friendlyErr, err + } + event.Error(ctx, "Load concurrency error, will retry serially", err) + if !runner.locked { + runner.loadMu.Lock() + runner.serializeLoads++ + runner.locked = true + } + } +} + +// An Invocation represents a call to the go command. +type Invocation struct { + Verb string + Args []string + BuildFlags []string + Env []string + WorkingDir string + Logf func(format string, args ...interface{}) +} + +func (i *Invocation) runWithFriendlyError(ctx context.Context, stdout, stderr io.Writer) (friendlyError error, rawError error) { + rawError = i.run(ctx, stdout, stderr) + if rawError != nil { + friendlyError = rawError + // Check for 'go' executable not being found. + if ee, ok := rawError.(*exec.Error); ok && ee.Err == exec.ErrNotFound { + friendlyError = fmt.Errorf("go command required, not found: %v", ee) + } + if ctx.Err() != nil { + friendlyError = ctx.Err() + } + friendlyError = fmt.Errorf("err: %v: stderr: %s", friendlyError, stderr) + } + return +} + +func (i *Invocation) run(ctx context.Context, stdout, stderr io.Writer) error { + log := i.Logf + if log == nil { + log = func(string, ...interface{}) {} + } + + goArgs := []string{i.Verb} + switch i.Verb { + case "mod": + // mod needs the sub-verb before build flags. + goArgs = append(goArgs, i.Args[0]) + goArgs = append(goArgs, i.BuildFlags...) + goArgs = append(goArgs, i.Args[1:]...) + case "env": + // env doesn't take build flags. + goArgs = append(goArgs, i.Args...) + default: + goArgs = append(goArgs, i.BuildFlags...) + goArgs = append(goArgs, i.Args...) + } + cmd := exec.Command("go", goArgs...) + cmd.Stdout = stdout + cmd.Stderr = stderr + // On darwin the cwd gets resolved to the real path, which breaks anything that + // expects the working directory to keep the original path, including the + // go command when dealing with modules. + // The Go stdlib has a special feature where if the cwd and the PWD are the + // same node then it trusts the PWD, so by setting it in the env for the child + // process we fix up all the paths returned by the go command. + cmd.Env = append(os.Environ(), i.Env...) + if i.WorkingDir != "" { + cmd.Env = append(cmd.Env, "PWD="+i.WorkingDir) + cmd.Dir = i.WorkingDir + } + + defer func(start time.Time) { log("%s for %v", time.Since(start), cmdDebugStr(cmd)) }(time.Now()) + + return runCmdContext(ctx, cmd) +} + +// runCmdContext is like exec.CommandContext except it sends os.Interrupt +// before os.Kill. +func runCmdContext(ctx context.Context, cmd *exec.Cmd) error { + if err := cmd.Start(); err != nil { + return err + } + resChan := make(chan error, 1) + go func() { + resChan <- cmd.Wait() + }() + + select { + case err := <-resChan: + return err + case <-ctx.Done(): + } + // Cancelled. Interrupt and see if it ends voluntarily. + cmd.Process.Signal(os.Interrupt) + select { + case err := <-resChan: + return err + case <-time.After(time.Second): + } + // Didn't shut down in response to interrupt. Kill it hard. + cmd.Process.Kill() + return <-resChan +} + +func cmdDebugStr(cmd *exec.Cmd) string { + env := make(map[string]string) + for _, kv := range cmd.Env { + split := strings.Split(kv, "=") + k, v := split[0], split[1] + env[k] = v + } + + return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v GOPROXY=%v PWD=%v go %v", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["GOPROXY"], env["PWD"], cmd.Args) +} diff --git a/vendor/golang.org/x/tools/internal/gocommand/vendor.go b/vendor/golang.org/x/tools/internal/gocommand/vendor.go new file mode 100644 index 00000000000..1cd8d8473e9 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/gocommand/vendor.go @@ -0,0 +1,102 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gocommand + +import ( + "bytes" + "context" + "fmt" + "os" + "path/filepath" + "regexp" + "strings" + + "golang.org/x/mod/semver" +) + +// ModuleJSON holds information about a module. +type ModuleJSON struct { + Path string // module path + Replace *ModuleJSON // replaced by this module + Main bool // is this the main module? + Indirect bool // is this module only an indirect dependency of main module? + Dir string // directory holding files for this module, if any + GoMod string // path to go.mod file for this module, if any + GoVersion string // go version used in module +} + +var modFlagRegexp = regexp.MustCompile(`-mod[ =](\w+)`) + +// VendorEnabled reports whether vendoring is enabled. It takes a *Runner to execute Go commands +// with the supplied context.Context and Invocation. The Invocation can contain pre-defined fields, +// of which only Verb and Args are modified to run the appropriate Go command. +// Inspired by setDefaultBuildMod in modload/init.go +func VendorEnabled(ctx context.Context, inv Invocation, r *Runner) (*ModuleJSON, bool, error) { + mainMod, go114, err := getMainModuleAnd114(ctx, inv, r) + if err != nil { + return nil, false, err + } + + // We check the GOFLAGS to see if there is anything overridden or not. + inv.Verb = "env" + inv.Args = []string{"GOFLAGS"} + stdout, err := r.Run(ctx, inv) + if err != nil { + return nil, false, err + } + goflags := string(bytes.TrimSpace(stdout.Bytes())) + matches := modFlagRegexp.FindStringSubmatch(goflags) + var modFlag string + if len(matches) != 0 { + modFlag = matches[1] + } + if modFlag != "" { + // Don't override an explicit '-mod=' argument. + return mainMod, modFlag == "vendor", nil + } + if mainMod == nil || !go114 { + return mainMod, false, nil + } + // Check 1.14's automatic vendor mode. + if fi, err := os.Stat(filepath.Join(mainMod.Dir, "vendor")); err == nil && fi.IsDir() { + if mainMod.GoVersion != "" && semver.Compare("v"+mainMod.GoVersion, "v1.14") >= 0 { + // The Go version is at least 1.14, and a vendor directory exists. + // Set -mod=vendor by default. + return mainMod, true, nil + } + } + return mainMod, false, nil +} + +// getMainModuleAnd114 gets the main module's information and whether the +// go command in use is 1.14+. This is the information needed to figure out +// if vendoring should be enabled. +func getMainModuleAnd114(ctx context.Context, inv Invocation, r *Runner) (*ModuleJSON, bool, error) { + const format = `{{.Path}} +{{.Dir}} +{{.GoMod}} +{{.GoVersion}} +{{range context.ReleaseTags}}{{if eq . "go1.14"}}{{.}}{{end}}{{end}} +` + inv.Verb = "list" + inv.Args = []string{"-m", "-f", format} + stdout, err := r.Run(ctx, inv) + if err != nil { + return nil, false, err + } + + lines := strings.Split(stdout.String(), "\n") + if len(lines) < 5 { + return nil, false, fmt.Errorf("unexpected stdout: %q", stdout.String()) + } + mod := &ModuleJSON{ + Path: lines[0], + Dir: lines[1], + GoMod: lines[2], + GoVersion: lines[3], + Main: true, + } + return mod, lines[4] == "go1.14", nil +} diff --git a/vendor/golang.org/x/tools/internal/gopathwalk/walk.go b/vendor/golang.org/x/tools/internal/gopathwalk/walk.go index 60eb67b697c..390cb9db795 100644 --- a/vendor/golang.org/x/tools/internal/gopathwalk/walk.go +++ b/vendor/golang.org/x/tools/internal/gopathwalk/walk.go @@ -16,14 +16,17 @@ import ( "os" "path/filepath" "strings" + "time" "golang.org/x/tools/internal/fastwalk" ) // Options controls the behavior of a Walk call. type Options struct { - Debug bool // Enable debug logging - ModulesEnabled bool // Search module caches. Also disables legacy goimports ignore rules. + // If Logf is non-nil, debug logging is enabled through this function. + Logf func(format string, args ...interface{}) + // Search module caches. Also disables legacy goimports ignore rules. + ModulesEnabled bool } // RootType indicates the type of a Root. @@ -76,15 +79,17 @@ func WalkSkip(roots []Root, add func(root Root, dir string), skip func(root Root } } +// walkDir creates a walker and starts fastwalk with this walker. func walkDir(root Root, add func(Root, string), skip func(root Root, dir string) bool, opts Options) { if _, err := os.Stat(root.Path); os.IsNotExist(err) { - if opts.Debug { - log.Printf("skipping nonexistent directory: %v", root.Path) + if opts.Logf != nil { + opts.Logf("skipping nonexistent directory: %v", root.Path) } return } - if opts.Debug { - log.Printf("scanning %s", root.Path) + start := time.Now() + if opts.Logf != nil { + opts.Logf("gopathwalk: scanning %s", root.Path) } w := &walker{ root: root, @@ -97,8 +102,8 @@ func walkDir(root Root, add func(Root, string), skip func(root Root, dir string) log.Printf("gopathwalk: scanning directory %v: %v", root.Path, err) } - if opts.Debug { - log.Printf("scanned %s", root.Path) + if opts.Logf != nil { + opts.Logf("gopathwalk: scanned %s in %v", root.Path, time.Since(start)) } } @@ -112,7 +117,7 @@ type walker struct { ignoredDirs []os.FileInfo // The ignored directories, loaded from .goimportsignore files. } -// init initializes the walker based on its Options. +// init initializes the walker based on its Options func (w *walker) init() { var ignoredPaths []string if w.root.Type == RootModuleCache { @@ -127,11 +132,11 @@ func (w *walker) init() { full := filepath.Join(w.root.Path, p) if fi, err := os.Stat(full); err == nil { w.ignoredDirs = append(w.ignoredDirs, fi) - if w.opts.Debug { - log.Printf("Directory added to ignore list: %s", full) + if w.opts.Logf != nil { + w.opts.Logf("Directory added to ignore list: %s", full) } - } else if w.opts.Debug { - log.Printf("Error statting ignored directory: %v", err) + } else if w.opts.Logf != nil { + w.opts.Logf("Error statting ignored directory: %v", err) } } } @@ -142,11 +147,11 @@ func (w *walker) init() { func (w *walker) getIgnoredDirs(path string) []string { file := filepath.Join(path, ".goimportsignore") slurp, err := ioutil.ReadFile(file) - if w.opts.Debug { + if w.opts.Logf != nil { if err != nil { - log.Print(err) + w.opts.Logf("%v", err) } else { - log.Printf("Read %s", file) + w.opts.Logf("Read %s", file) } } if err != nil { @@ -165,6 +170,7 @@ func (w *walker) getIgnoredDirs(path string) []string { return ignoredDirs } +// shouldSkipDir reports whether the file should be skipped or not. func (w *walker) shouldSkipDir(fi os.FileInfo, dir string) bool { for _, ignoredDir := range w.ignoredDirs { if os.SameFile(fi, ignoredDir) { @@ -178,20 +184,21 @@ func (w *walker) shouldSkipDir(fi os.FileInfo, dir string) bool { return false } +// walk walks through the given path. func (w *walker) walk(path string, typ os.FileMode) error { dir := filepath.Dir(path) if typ.IsRegular() { if dir == w.root.Path && (w.root.Type == RootGOROOT || w.root.Type == RootGOPATH) { // Doesn't make sense to have regular files // directly in your $GOPATH/src or $GOROOT/src. - return fastwalk.SkipFiles + return fastwalk.ErrSkipFiles } if !strings.HasSuffix(path, ".go") { return nil } w.add(w.root, dir) - return fastwalk.SkipFiles + return fastwalk.ErrSkipFiles } if typ == os.ModeDir { base := filepath.Base(path) @@ -219,7 +226,7 @@ func (w *walker) walk(path string, typ os.FileMode) error { return nil } if w.shouldTraverse(dir, fi) { - return fastwalk.TraverseLink + return fastwalk.ErrTraverseLink } } return nil diff --git a/vendor/golang.org/x/tools/internal/imports/fix.go b/vendor/golang.org/x/tools/internal/imports/fix.go index bcfbb07ed87..36292d79a7c 100644 --- a/vendor/golang.org/x/tools/internal/imports/fix.go +++ b/vendor/golang.org/x/tools/internal/imports/fix.go @@ -14,19 +14,18 @@ import ( "go/token" "io/ioutil" "os" - "os/exec" "path" "path/filepath" + "reflect" "sort" "strconv" "strings" "sync" - "time" "unicode" "unicode/utf8" "golang.org/x/tools/go/ast/astutil" - "golang.org/x/tools/go/packages" + "golang.org/x/tools/internal/gocommand" "golang.org/x/tools/internal/gopathwalk" ) @@ -51,7 +50,8 @@ var importToGroup = []func(env *ProcessEnv, importPath string) (num int, ok bool return }, func(_ *ProcessEnv, importPath string) (num int, ok bool) { - if strings.Contains(importPath, ".") { + firstComponent := strings.Split(importPath, "/")[0] + if strings.Contains(firstComponent, ".") { return 1, true } return @@ -81,7 +81,8 @@ type ImportFix struct { // IdentName is the identifier that this fix will add or remove. IdentName string // FixType is the type of fix this is (AddImport, DeleteImport, SetImportName). - FixType ImportFixType + FixType ImportFixType + Relevance int // see pkg } // An ImportInfo represents a single import statement. @@ -262,7 +263,7 @@ type pass struct { // loadPackageNames saves the package names for everything referenced by imports. func (p *pass) loadPackageNames(imports []*ImportInfo) error { - if p.env.Debug { + if p.env.Logf != nil { p.env.Logf("loading package names for %v packages", len(imports)) defer func() { p.env.Logf("done loading package names for %v packages", len(imports)) @@ -301,7 +302,7 @@ func (p *pass) importIdentifier(imp *ImportInfo) string { if known != nil && known.name != "" { return known.name } - return importPathToAssumedName(imp.ImportPath) + return ImportPathToAssumedName(imp.ImportPath) } // load reads in everything necessary to run a pass, and reports whether the @@ -334,7 +335,7 @@ func (p *pass) load() ([]*ImportFix, bool) { if p.loadRealPackageNames { err := p.loadPackageNames(append(imports, p.candidates...)) if err != nil { - if p.env.Debug { + if p.env.Logf != nil { p.env.Logf("loading package names: %v", err) } return nil, false @@ -434,7 +435,7 @@ func (p *pass) importSpecName(imp *ImportInfo) string { } ident := p.importIdentifier(imp) - if ident == importPathToAssumedName(imp.ImportPath) { + if ident == ImportPathToAssumedName(imp.ImportPath) { return "" // ident not needed since the assumed and real names are the same. } return ident @@ -475,9 +476,9 @@ func (p *pass) assumeSiblingImportsValid() { } for left, rights := range refs { if imp, ok := importsByName[left]; ok { - if _, ok := stdlib[imp.ImportPath]; ok { + if m, ok := stdlib[imp.ImportPath]; ok { // We have the stdlib in memory; no need to guess. - rights = stdlib[imp.ImportPath] + rights = copyExports(m) } p.addCandidate(imp, &packageInfo{ // no name; we already know it. @@ -528,7 +529,7 @@ func getFixes(fset *token.FileSet, f *ast.File, filename string, env *ProcessEnv return nil, err } srcDir := filepath.Dir(abs) - if env.Debug { + if env.Logf != nil { env.Logf("fixImports(filename=%q), abs=%q, srcDir=%q ...", filename, abs, srcDir) } @@ -536,7 +537,7 @@ func getFixes(fset *token.FileSet, f *ast.File, filename string, env *ProcessEnv // derive package names from import paths, see if the file is already // complete. We can't add any imports yet, because we don't know // if missing references are actually package vars. - p := &pass{fset: fset, f: f, srcDir: srcDir} + p := &pass{fset: fset, f: f, srcDir: srcDir, env: env} if fixes, done := p.load(); done { return fixes, nil } @@ -558,8 +559,7 @@ func getFixes(fset *token.FileSet, f *ast.File, filename string, env *ProcessEnv } // Third pass: get real package names where we had previously used - // the naive algorithm. This is the first step that will use the - // environment, so we provide it here for the first time. + // the naive algorithm. p = &pass{fset: fset, f: f, srcDir: srcDir, env: env} p.loadRealPackageNames = true p.otherFiles = otherFiles @@ -584,51 +584,192 @@ func getFixes(fset *token.FileSet, f *ast.File, filename string, env *ProcessEnv return fixes, nil } +// Highest relevance, used for the standard library. Chosen arbitrarily to +// match pre-existing gopls code. +const MaxRelevance = 7 + +// getCandidatePkgs works with the passed callback to find all acceptable packages. +// It deduplicates by import path, and uses a cached stdlib rather than reading +// from disk. +func getCandidatePkgs(ctx context.Context, wrappedCallback *scanCallback, filename, filePkg string, env *ProcessEnv) error { + notSelf := func(p *pkg) bool { + return p.packageName != filePkg || p.dir != filepath.Dir(filename) + } + // Start off with the standard library. + for importPath, exports := range stdlib { + p := &pkg{ + dir: filepath.Join(env.GOROOT, "src", importPath), + importPathShort: importPath, + packageName: path.Base(importPath), + relevance: MaxRelevance, + } + if notSelf(p) && wrappedCallback.packageNameLoaded(p) { + wrappedCallback.exportsLoaded(p, exports) + } + } + + var mu sync.Mutex + dupCheck := map[string]struct{}{} + + scanFilter := &scanCallback{ + rootFound: func(root gopathwalk.Root) bool { + // Exclude goroot results -- getting them is relatively expensive, not cached, + // and generally redundant with the in-memory version. + return root.Type != gopathwalk.RootGOROOT && wrappedCallback.rootFound(root) + }, + dirFound: wrappedCallback.dirFound, + packageNameLoaded: func(pkg *pkg) bool { + mu.Lock() + defer mu.Unlock() + if _, ok := dupCheck[pkg.importPathShort]; ok { + return false + } + dupCheck[pkg.importPathShort] = struct{}{} + return notSelf(pkg) && wrappedCallback.packageNameLoaded(pkg) + }, + exportsLoaded: func(pkg *pkg, exports []string) { + // If we're an x_test, load the package under test's test variant. + if strings.HasSuffix(filePkg, "_test") && pkg.dir == filepath.Dir(filename) { + var err error + _, exports, err = loadExportsFromFiles(ctx, env, pkg.dir, true) + if err != nil { + return + } + } + wrappedCallback.exportsLoaded(pkg, exports) + }, + } + return env.GetResolver().scan(ctx, scanFilter) +} + +func ScoreImportPaths(ctx context.Context, env *ProcessEnv, paths []string) map[string]int { + result := make(map[string]int) + for _, path := range paths { + result[path] = env.GetResolver().scoreImportPath(ctx, path) + } + return result +} + +func PrimeCache(ctx context.Context, env *ProcessEnv) error { + // Fully scan the disk for directories, but don't actually read any Go files. + callback := &scanCallback{ + rootFound: func(gopathwalk.Root) bool { + return true + }, + dirFound: func(pkg *pkg) bool { + return false + }, + packageNameLoaded: func(pkg *pkg) bool { + return false + }, + } + return getCandidatePkgs(ctx, callback, "", "", env) +} + +func candidateImportName(pkg *pkg) string { + if ImportPathToAssumedName(pkg.importPathShort) != pkg.packageName { + return pkg.packageName + } + return "" +} + // getAllCandidates gets all of the candidates to be imported, regardless of if they are needed. -func getAllCandidates(filename string, env *ProcessEnv) ([]ImportFix, error) { - // TODO(suzmue): scan for additional candidates and filter out - // current package. - - // Get the stdlib candidates and sort by import path. - var paths []string - for importPath := range stdlib { - paths = append(paths, importPath) +func getAllCandidates(ctx context.Context, wrapped func(ImportFix), searchPrefix, filename, filePkg string, env *ProcessEnv) error { + callback := &scanCallback{ + rootFound: func(gopathwalk.Root) bool { + return true + }, + dirFound: func(pkg *pkg) bool { + if !canUse(filename, pkg.dir) { + return false + } + // Try the assumed package name first, then a simpler path match + // in case of packages named vN, which are not uncommon. + return strings.HasPrefix(ImportPathToAssumedName(pkg.importPathShort), searchPrefix) || + strings.HasPrefix(path.Base(pkg.importPathShort), searchPrefix) + }, + packageNameLoaded: func(pkg *pkg) bool { + if !strings.HasPrefix(pkg.packageName, searchPrefix) { + return false + } + wrapped(ImportFix{ + StmtInfo: ImportInfo{ + ImportPath: pkg.importPathShort, + Name: candidateImportName(pkg), + }, + IdentName: pkg.packageName, + FixType: AddImport, + Relevance: pkg.relevance, + }) + return false + }, } - sort.Strings(paths) + return getCandidatePkgs(ctx, callback, filename, filePkg, env) +} - var imports []ImportFix - for _, importPath := range paths { - imports = append(imports, ImportFix{ - StmtInfo: ImportInfo{ - ImportPath: importPath, - }, - IdentName: path.Base(importPath), - FixType: AddImport, - }) +// A PackageExport is a package and its exports. +type PackageExport struct { + Fix *ImportFix + Exports []string +} + +func getPackageExports(ctx context.Context, wrapped func(PackageExport), searchPkg, filename, filePkg string, env *ProcessEnv) error { + callback := &scanCallback{ + rootFound: func(gopathwalk.Root) bool { + return true + }, + dirFound: func(pkg *pkg) bool { + return pkgIsCandidate(filename, references{searchPkg: nil}, pkg) + }, + packageNameLoaded: func(pkg *pkg) bool { + return pkg.packageName == searchPkg + }, + exportsLoaded: func(pkg *pkg, exports []string) { + sort.Strings(exports) + wrapped(PackageExport{ + Fix: &ImportFix{ + StmtInfo: ImportInfo{ + ImportPath: pkg.importPathShort, + Name: candidateImportName(pkg), + }, + IdentName: pkg.packageName, + FixType: AddImport, + Relevance: pkg.relevance, + }, + Exports: exports, + }) + }, } - return imports, nil + return getCandidatePkgs(ctx, callback, filename, filePkg, env) } // ProcessEnv contains environment variables and settings that affect the use of // the go command, the go/build package, etc. type ProcessEnv struct { LocalPrefix string - Debug bool + + GocmdRunner *gocommand.Runner + + BuildFlags []string // If non-empty, these will be used instead of the // process-wide values. GOPATH, GOROOT, GO111MODULE, GOPROXY, GOFLAGS, GOSUMDB string WorkingDir string - // If true, use go/packages regardless of the environment. - ForceGoPackages bool - - // Logf is the default logger for the ProcessEnv. + // If Logf is non-nil, debug logging is enabled through this function. Logf func(format string, args ...interface{}) resolver Resolver } +// CopyConfig copies the env's configuration into a new env. +func (e *ProcessEnv) CopyConfig() *ProcessEnv { + copy := *e + copy.resolver = nil + return © +} + func (e *ProcessEnv) env() []string { env := os.Environ() add := func(k, v string) { @@ -652,69 +793,59 @@ func (e *ProcessEnv) GetResolver() Resolver { if e.resolver != nil { return e.resolver } - if e.ForceGoPackages { - e.resolver = &goPackagesResolver{env: e} - return e.resolver - } - - out, err := e.invokeGo("env", "GOMOD") + out, err := e.invokeGo(context.TODO(), "env", "GOMOD") if err != nil || len(bytes.TrimSpace(out.Bytes())) == 0 { - e.resolver = &gopathResolver{env: e} + e.resolver = newGopathResolver(e) return e.resolver } - e.resolver = &ModuleResolver{env: e} + e.resolver = newModuleResolver(e) return e.resolver } -func (e *ProcessEnv) newPackagesConfig(mode packages.LoadMode) *packages.Config { - return &packages.Config{ - Mode: mode, - Dir: e.WorkingDir, - Env: e.env(), - } -} - func (e *ProcessEnv) buildContext() *build.Context { ctx := build.Default ctx.GOROOT = e.GOROOT ctx.GOPATH = e.GOPATH + + // As of Go 1.14, build.Context has a Dir field + // (see golang.org/issue/34860). + // Populate it only if present. + rc := reflect.ValueOf(&ctx).Elem() + dir := rc.FieldByName("Dir") + if !dir.IsValid() { + // Working drafts of Go 1.14 named the field "WorkingDir" instead. + // TODO(bcmills): Remove this case after the Go 1.14 beta has been released. + dir = rc.FieldByName("WorkingDir") + } + if dir.IsValid() && dir.Kind() == reflect.String { + dir.SetString(e.WorkingDir) + } + return &ctx } -func (e *ProcessEnv) invokeGo(args ...string) (*bytes.Buffer, error) { - cmd := exec.Command("go", args...) - stdout := &bytes.Buffer{} - stderr := &bytes.Buffer{} - cmd.Stdout = stdout - cmd.Stderr = stderr - cmd.Env = e.env() - cmd.Dir = e.WorkingDir - - if e.Debug { - defer func(start time.Time) { e.Logf("%s for %v", time.Since(start), cmdDebugStr(cmd)) }(time.Now()) +func (e *ProcessEnv) invokeGo(ctx context.Context, verb string, args ...string) (*bytes.Buffer, error) { + inv := gocommand.Invocation{ + Verb: verb, + Args: args, + BuildFlags: e.BuildFlags, + Env: e.env(), + Logf: e.Logf, + WorkingDir: e.WorkingDir, } - if err := cmd.Run(); err != nil { - return nil, fmt.Errorf("running go: %v (stderr:\n%s)", err, stderr) - } - return stdout, nil -} - -func cmdDebugStr(cmd *exec.Cmd) string { - env := make(map[string]string) - for _, kv := range cmd.Env { - split := strings.Split(kv, "=") - k, v := split[0], split[1] - env[k] = v - } - - return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v GOPROXY=%v PWD=%v go %v", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["GOPROXY"], env["PWD"], cmd.Args) + return e.GocmdRunner.Run(ctx, inv) } func addStdlibCandidates(pass *pass, refs references) { add := func(pkg string) { + // Prevent self-imports. + if path.Base(pkg) == pass.f.Name.Name && filepath.Join(pass.env.GOROOT, "src", pkg) == pass.srcDir { + return + } + exports := copyExports(stdlib[pkg]) pass.addCandidate( &ImportInfo{ImportPath: pkg}, - &packageInfo{name: path.Base(pkg), exports: stdlib[pkg]}) + &packageInfo{name: path.Base(pkg), exports: exports}) } for left := range refs { if left == "rand" { @@ -735,88 +866,65 @@ func addStdlibCandidates(pass *pass, refs references) { type Resolver interface { // loadPackageNames loads the package names in importPaths. loadPackageNames(importPaths []string, srcDir string) (map[string]string, error) - // scan finds (at least) the packages satisfying refs. The returned slice is unordered. - scan(refs references) ([]*pkg, error) + // scan works with callback to search for packages. See scanCallback for details. + scan(ctx context.Context, callback *scanCallback) error // loadExports returns the set of exported symbols in the package at dir. - // It returns an error if the package name in dir does not match expectPackage. // loadExports may be called concurrently. - loadExports(ctx context.Context, expectPackage string, pkg *pkg) (map[string]bool, error) + loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []string, error) + // scoreImportPath returns the relevance for an import path. + scoreImportPath(ctx context.Context, path string) int + + ClearForNewScan() } -// gopackagesResolver implements resolver for GOPATH and module workspaces using go/packages. -type goPackagesResolver struct { - env *ProcessEnv -} - -func (r *goPackagesResolver) loadPackageNames(importPaths []string, srcDir string) (map[string]string, error) { - if len(importPaths) == 0 { - return nil, nil - } - cfg := r.env.newPackagesConfig(packages.LoadFiles) - pkgs, err := packages.Load(cfg, importPaths...) - if err != nil { - return nil, err - } - names := map[string]string{} - for _, pkg := range pkgs { - names[VendorlessPath(pkg.PkgPath)] = pkg.Name - } - // We may not have found all the packages. Guess the rest. - for _, path := range importPaths { - if _, ok := names[path]; ok { - continue - } - names[path] = importPathToAssumedName(path) - } - return names, nil - -} - -func (r *goPackagesResolver) scan(refs references) ([]*pkg, error) { - var loadQueries []string - for pkgName := range refs { - loadQueries = append(loadQueries, "iamashamedtousethedisabledqueryname="+pkgName) - } - sort.Strings(loadQueries) - cfg := r.env.newPackagesConfig(packages.LoadFiles) - goPackages, err := packages.Load(cfg, loadQueries...) - if err != nil { - return nil, err - } - - var scan []*pkg - for _, goPackage := range goPackages { - scan = append(scan, &pkg{ - dir: filepath.Dir(goPackage.CompiledGoFiles[0]), - importPathShort: VendorlessPath(goPackage.PkgPath), - goPackage: goPackage, - }) - } - return scan, nil -} - -func (r *goPackagesResolver) loadExports(ctx context.Context, expectPackage string, pkg *pkg) (map[string]bool, error) { - if pkg.goPackage == nil { - return nil, fmt.Errorf("goPackage not set") - } - exports := map[string]bool{} - fset := token.NewFileSet() - for _, fname := range pkg.goPackage.CompiledGoFiles { - f, err := parser.ParseFile(fset, fname, nil, 0) - if err != nil { - return nil, fmt.Errorf("parsing %s: %v", fname, err) - } - for name := range f.Scope.Objects { - if ast.IsExported(name) { - exports[name] = true - } - } - } - return exports, nil +// A scanCallback controls a call to scan and receives its results. +// In general, minor errors will be silently discarded; a user should not +// expect to receive a full series of calls for everything. +type scanCallback struct { + // rootFound is called before scanning a new root dir. If it returns true, + // the root will be scanned. Returning false will not necessarily prevent + // directories from that root making it to dirFound. + rootFound func(gopathwalk.Root) bool + // dirFound is called when a directory is found that is possibly a Go package. + // pkg will be populated with everything except packageName. + // If it returns true, the package's name will be loaded. + dirFound func(pkg *pkg) bool + // packageNameLoaded is called when a package is found and its name is loaded. + // If it returns true, the package's exports will be loaded. + packageNameLoaded func(pkg *pkg) bool + // exportsLoaded is called when a package's exports have been loaded. + exportsLoaded func(pkg *pkg, exports []string) } func addExternalCandidates(pass *pass, refs references, filename string) error { - dirScan, err := pass.env.GetResolver().scan(refs) + var mu sync.Mutex + found := make(map[string][]pkgDistance) + callback := &scanCallback{ + rootFound: func(gopathwalk.Root) bool { + return true // We want everything. + }, + dirFound: func(pkg *pkg) bool { + return pkgIsCandidate(filename, refs, pkg) + }, + packageNameLoaded: func(pkg *pkg) bool { + if _, want := refs[pkg.packageName]; !want { + return false + } + if pkg.dir == pass.srcDir && pass.f.Name.Name == pkg.packageName { + // The candidate is in the same directory and has the + // same package name. Don't try to import ourselves. + return false + } + if !canUse(filename, pkg.dir) { + return false + } + mu.Lock() + defer mu.Unlock() + found[pkg.packageName] = append(found[pkg.packageName], pkgDistance{pkg, distance(pass.srcDir, pkg.dir)}) + return false // We'll do our own loading after we sort. + }, + } + err := pass.env.GetResolver().scan(context.Background(), callback) if err != nil { return err } @@ -843,7 +951,7 @@ func addExternalCandidates(pass *pass, refs references, filename string) error { go func(pkgName string, symbols map[string]bool) { defer wg.Done() - found, err := findImport(ctx, pass, dirScan, pkgName, symbols, filename) + found, err := findImport(ctx, pass, found[pkgName], pkgName, symbols, filename) if err != nil { firstErrOnce.Do(func() { @@ -887,7 +995,7 @@ func notIdentifier(ch rune) bool { ch >= utf8.RuneSelf && (unicode.IsLetter(ch) || unicode.IsDigit(ch))) } -// importPathToAssumedName returns the assumed package name of an import path. +// ImportPathToAssumedName returns the assumed package name of an import path. // It does this using only string parsing of the import path. // It picks the last element of the path that does not look like a major // version, and then picks the valid identifier off the start of that element. @@ -895,7 +1003,7 @@ func notIdentifier(ch rune) bool { // clarity. // This function could be moved to a standard package and exported if we want // for use in other tools. -func importPathToAssumedName(importPath string) string { +func ImportPathToAssumedName(importPath string) string { base := path.Base(importPath) if strings.HasPrefix(base, "v") { if _, err := strconv.Atoi(base[1:]); err == nil { @@ -914,7 +1022,33 @@ func importPathToAssumedName(importPath string) string { // gopathResolver implements resolver for GOPATH workspaces. type gopathResolver struct { - env *ProcessEnv + env *ProcessEnv + walked bool + cache *dirInfoCache + scanSema chan struct{} // scanSema prevents concurrent scans. +} + +func newGopathResolver(env *ProcessEnv) *gopathResolver { + r := &gopathResolver{ + env: env, + cache: &dirInfoCache{ + dirs: map[string]*directoryPackageInfo{}, + listeners: map[*int]cacheListener{}, + }, + scanSema: make(chan struct{}, 1), + } + r.scanSema <- struct{}{} + return r +} + +func (r *gopathResolver) ClearForNewScan() { + <-r.scanSema + r.cache = &dirInfoCache{ + dirs: map[string]*directoryPackageInfo{}, + listeners: map[*int]cacheListener{}, + } + r.walked = false + r.scanSema <- struct{}{} } func (r *gopathResolver) loadPackageNames(importPaths []string, srcDir string) (map[string]string, error) { @@ -997,9 +1131,10 @@ func packageDirToName(dir string) (packageName string, err error) { } type pkg struct { - goPackage *packages.Package dir string // absolute file path to pkg directory ("/usr/lib/go/src/net/http") importPathShort string // vendorless import path ("net/http", "a/b") + packageName string // package name loaded from source if requested + relevance int // a weakly-defined score of how relevant a package is. 0 is most relevant. } type pkgDistance struct { @@ -1043,32 +1178,101 @@ func distance(basepath, targetpath string) int { return strings.Count(p, string(filepath.Separator)) + 1 } -func (r *gopathResolver) scan(_ references) ([]*pkg, error) { - dupCheck := make(map[string]bool) - var result []*pkg - - var mu sync.Mutex - +func (r *gopathResolver) scan(ctx context.Context, callback *scanCallback) error { add := func(root gopathwalk.Root, dir string) { - mu.Lock() - defer mu.Unlock() - - if _, dup := dupCheck[dir]; dup { + // We assume cached directories have not changed. We can skip them and their + // children. + if _, ok := r.cache.Load(dir); ok { return } - dupCheck[dir] = true + importpath := filepath.ToSlash(dir[len(root.Path)+len("/"):]) - result = append(result, &pkg{ - importPathShort: VendorlessPath(importpath), - dir: dir, - }) + info := directoryPackageInfo{ + status: directoryScanned, + dir: dir, + rootType: root.Type, + nonCanonicalImportPath: VendorlessPath(importpath), + } + r.cache.Store(dir, info) } - gopathwalk.Walk(gopathwalk.SrcDirsRoots(r.env.buildContext()), add, gopathwalk.Options{Debug: r.env.Debug, ModulesEnabled: false}) - return result, nil + processDir := func(info directoryPackageInfo) { + // Skip this directory if we were not able to get the package information successfully. + if scanned, err := info.reachedStatus(directoryScanned); !scanned || err != nil { + return + } + + p := &pkg{ + importPathShort: info.nonCanonicalImportPath, + dir: info.dir, + relevance: MaxRelevance - 1, + } + if info.rootType == gopathwalk.RootGOROOT { + p.relevance = MaxRelevance + } + + if !callback.dirFound(p) { + return + } + var err error + p.packageName, err = r.cache.CachePackageName(info) + if err != nil { + return + } + + if !callback.packageNameLoaded(p) { + return + } + if _, exports, err := r.loadExports(ctx, p, false); err == nil { + callback.exportsLoaded(p, exports) + } + } + stop := r.cache.ScanAndListen(ctx, processDir) + defer stop() + // The callback is not necessarily safe to use in the goroutine below. Process roots eagerly. + roots := filterRoots(gopathwalk.SrcDirsRoots(r.env.buildContext()), callback.rootFound) + // We can't cancel walks, because we need them to finish to have a usable + // cache. Instead, run them in a separate goroutine and detach. + scanDone := make(chan struct{}) + go func() { + select { + case <-ctx.Done(): + return + case <-r.scanSema: + } + defer func() { r.scanSema <- struct{}{} }() + gopathwalk.Walk(roots, add, gopathwalk.Options{Logf: r.env.Logf, ModulesEnabled: false}) + close(scanDone) + }() + select { + case <-ctx.Done(): + case <-scanDone: + } + return nil } -func (r *gopathResolver) loadExports(ctx context.Context, expectPackage string, pkg *pkg) (map[string]bool, error) { - return loadExportsFromFiles(ctx, r.env, expectPackage, pkg.dir) +func (r *gopathResolver) scoreImportPath(ctx context.Context, path string) int { + if _, ok := stdlib[path]; ok { + return MaxRelevance + } + return MaxRelevance - 1 +} + +func filterRoots(roots []gopathwalk.Root, include func(gopathwalk.Root) bool) []gopathwalk.Root { + var result []gopathwalk.Root + for _, root := range roots { + if !include(root) { + continue + } + result = append(result, root) + } + return result +} + +func (r *gopathResolver) loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []string, error) { + if info, ok := r.cache.Load(pkg.dir); ok && !includeTest { + return r.cache.CacheExports(ctx, r.env, info) + } + return loadExportsFromFiles(ctx, r.env, pkg.dir, includeTest) } // VendorlessPath returns the devendorized version of the import path ipath. @@ -1084,18 +1288,18 @@ func VendorlessPath(ipath string) string { return ipath } -func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, expectPackage string, dir string) (map[string]bool, error) { - exports := make(map[string]bool) +func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, includeTest bool) (string, []string, error) { + var exports []string // Look for non-test, buildable .go files which could provide exports. all, err := ioutil.ReadDir(dir) if err != nil { - return nil, err + return "", nil, err } var files []os.FileInfo for _, fi := range all { name := fi.Name() - if !strings.HasSuffix(name, ".go") || strings.HasSuffix(name, "_test.go") { + if !strings.HasSuffix(name, ".go") || (!includeTest && strings.HasSuffix(name, "_test.go")) { continue } match, err := env.buildContext().MatchFile(dir, fi.Name()) @@ -1106,87 +1310,66 @@ func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, expectPackage st } if len(files) == 0 { - return nil, fmt.Errorf("dir %v contains no buildable, non-test .go files", dir) + return "", nil, fmt.Errorf("dir %v contains no buildable, non-test .go files", dir) } + var pkgName string fset := token.NewFileSet() for _, fi := range files { select { case <-ctx.Done(): - return nil, ctx.Err() + return "", nil, ctx.Err() default: } fullFile := filepath.Join(dir, fi.Name()) f, err := parser.ParseFile(fset, fullFile, nil, 0) if err != nil { - return nil, fmt.Errorf("parsing %s: %v", fullFile, err) + if env.Logf != nil { + env.Logf("error parsing %v: %v", fullFile, err) + } + continue } - pkgName := f.Name.Name - if pkgName == "documentation" { + if f.Name.Name == "documentation" { // Special case from go/build.ImportDir, not // handled by MatchFile above. continue } - if pkgName != expectPackage { - return nil, fmt.Errorf("scan of dir %v is not expected package %v (actually %v)", dir, expectPackage, pkgName) + if includeTest && strings.HasSuffix(f.Name.Name, "_test") { + // x_test package. We want internal test files only. + continue } + pkgName = f.Name.Name for name := range f.Scope.Objects { if ast.IsExported(name) { - exports[name] = true + exports = append(exports, name) } } } - if env.Debug { - exportList := make([]string, 0, len(exports)) - for k := range exports { - exportList = append(exportList, k) - } - sort.Strings(exportList) - env.Logf("loaded exports in dir %v (package %v): %v", dir, expectPackage, strings.Join(exportList, ", ")) + if env.Logf != nil { + sortedExports := append([]string(nil), exports...) + sort.Strings(sortedExports) + env.Logf("loaded exports in dir %v (package %v): %v", dir, pkgName, strings.Join(sortedExports, ", ")) } - return exports, nil + return pkgName, exports, nil } // findImport searches for a package with the given symbols. // If no package is found, findImport returns ("", false, nil) -func findImport(ctx context.Context, pass *pass, dirScan []*pkg, pkgName string, symbols map[string]bool, filename string) (*pkg, error) { - pkgDir, err := filepath.Abs(filename) - if err != nil { - return nil, err - } - pkgDir = filepath.Dir(pkgDir) - - // Find candidate packages, looking only at their directory names first. - var candidates []pkgDistance - for _, pkg := range dirScan { - if pkg.dir == pkgDir && pass.f.Name.Name == pkgName { - // The candidate is in the same directory and has the - // same package name. Don't try to import ourselves. - continue - } - if pkgIsCandidate(filename, pkgName, pkg) { - candidates = append(candidates, pkgDistance{ - pkg: pkg, - distance: distance(pkgDir, pkg.dir), - }) - } - } - +func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgName string, symbols map[string]bool, filename string) (*pkg, error) { // Sort the candidates by their import package length, // assuming that shorter package names are better than long // ones. Note that this sorts by the de-vendored name, so // there's no "penalty" for vendoring. sort.Sort(byDistanceOrImportPathShortLength(candidates)) - if pass.env.Debug { + if pass.env.Logf != nil { for i, c := range candidates { pass.env.Logf("%s candidate %d/%d: %v in %v", pkgName, i+1, len(candidates), c.pkg.importPathShort, c.pkg.dir) } } // Collect exports for packages with matching names. - rescv := make([]chan *pkg, len(candidates)) for i := range candidates { rescv[i] = make(chan *pkg, 1) @@ -1218,22 +1401,29 @@ func findImport(ctx context.Context, pass *pass, dirScan []*pkg, pkgName string, wg.Done() }() - if pass.env.Debug { + if pass.env.Logf != nil { pass.env.Logf("loading exports in dir %s (seeking package %s)", c.pkg.dir, pkgName) } - exports, err := pass.env.GetResolver().loadExports(ctx, pkgName, c.pkg) + // If we're an x_test, load the package under test's test variant. + includeTest := strings.HasSuffix(pass.f.Name.Name, "_test") && c.pkg.dir == pass.srcDir + _, exports, err := pass.env.GetResolver().loadExports(ctx, c.pkg, includeTest) if err != nil { - if pass.env.Debug { + if pass.env.Logf != nil { pass.env.Logf("loading exports in dir %s (seeking package %s): %v", c.pkg.dir, pkgName, err) } resc <- nil return } + exportsMap := make(map[string]bool, len(exports)) + for _, sym := range exports { + exportsMap[sym] = true + } + // If it doesn't have the right // symbols, send nil to mean no match. for symbol := range symbols { - if !exports[symbol] { + if !exportsMap[symbol] { resc <- nil return } @@ -1265,7 +1455,7 @@ func findImport(ctx context.Context, pass *pass, dirScan []*pkg, pkgName string, // filename is the file being formatted. // pkgIdent is the package being searched for, like "client" (if // searching for "client.New") -func pkgIsCandidate(filename, pkgIdent string, pkg *pkg) bool { +func pkgIsCandidate(filename string, refs references, pkg *pkg) bool { // Check "internal" and "vendor" visibility: if !canUse(filename, pkg.dir) { return false @@ -1283,17 +1473,18 @@ func pkgIsCandidate(filename, pkgIdent string, pkg *pkg) bool { // "bar", which is strongly discouraged // anyway. There's no reason goimports needs // to be slow just to accommodate that. - lastTwo := lastTwoComponents(pkg.importPathShort) - if strings.Contains(lastTwo, pkgIdent) { - return true - } - if hasHyphenOrUpperASCII(lastTwo) && !hasHyphenOrUpperASCII(pkgIdent) { - lastTwo = lowerASCIIAndRemoveHyphen(lastTwo) + for pkgIdent := range refs { + lastTwo := lastTwoComponents(pkg.importPathShort) if strings.Contains(lastTwo, pkgIdent) { return true } + if hasHyphenOrUpperASCII(lastTwo) && !hasHyphenOrUpperASCII(pkgIdent) { + lastTwo = lowerASCIIAndRemoveHyphen(lastTwo) + if strings.Contains(lastTwo, pkgIdent) { + return true + } + } } - return false } @@ -1383,3 +1574,11 @@ type visitFn func(node ast.Node) ast.Visitor func (fn visitFn) Visit(node ast.Node) ast.Visitor { return fn(node) } + +func copyExports(pkg []string) map[string]bool { + m := make(map[string]bool, len(pkg)) + for _, v := range pkg { + m[v] = true + } + return m +} diff --git a/vendor/golang.org/x/tools/internal/imports/imports.go b/vendor/golang.org/x/tools/internal/imports/imports.go index 2c074cb2db3..f43d6b22e54 100644 --- a/vendor/golang.org/x/tools/internal/imports/imports.go +++ b/vendor/golang.org/x/tools/internal/imports/imports.go @@ -11,6 +11,7 @@ package imports import ( "bufio" "bytes" + "context" "fmt" "go/ast" "go/build" @@ -20,12 +21,13 @@ import ( "go/token" "io" "io/ioutil" - "log" + "os" "regexp" "strconv" "strings" "golang.org/x/tools/go/ast/astutil" + "golang.org/x/tools/internal/gocommand" ) // Options is golang.org/x/tools/imports.Options with extra internal-only options. @@ -83,33 +85,54 @@ func FixImports(filename string, src []byte, opt *Options) (fixes []*ImportFix, return getFixes(fileSet, file, filename, opt.Env) } -// ApplyFix will apply all of the fixes to the file and format it. -func ApplyFixes(fixes []*ImportFix, filename string, src []byte, opt *Options) (formatted []byte, err error) { +// ApplyFixes applies all of the fixes to the file and formats it. extraMode +// is added in when parsing the file. +func ApplyFixes(fixes []*ImportFix, filename string, src []byte, opt *Options, extraMode parser.Mode) (formatted []byte, err error) { src, opt, err = initialize(filename, src, opt) if err != nil { return nil, err } + // Don't use parse() -- we don't care about fragments or statement lists + // here, and we need to work with unparseable files. fileSet := token.NewFileSet() - file, adjust, err := parse(fileSet, filename, src, opt) - if err != nil { + parserMode := parser.Mode(0) + if opt.Comments { + parserMode |= parser.ParseComments + } + if opt.AllErrors { + parserMode |= parser.AllErrors + } + parserMode |= extraMode + + file, err := parser.ParseFile(fileSet, filename, src, parserMode) + if file == nil { return nil, err } // Apply the fixes to the file. apply(fileSet, file, fixes) - return formatFile(fileSet, file, src, adjust, opt) + return formatFile(fileSet, file, src, nil, opt) } -// GetAllCandidates gets all of the standard library candidate packages to import in -// sorted order on import path. -func GetAllCandidates(filename string, opt *Options) (pkgs []ImportFix, err error) { - _, opt, err = initialize(filename, []byte{}, opt) +// GetAllCandidates gets all of the packages starting with prefix that can be +// imported by filename, sorted by import path. +func GetAllCandidates(ctx context.Context, callback func(ImportFix), searchPrefix, filename, filePkg string, opt *Options) error { + _, opt, err := initialize(filename, []byte{}, opt) if err != nil { - return nil, err + return err } - return getAllCandidates(filename, opt.Env) + return getAllCandidates(ctx, callback, searchPrefix, filename, filePkg, opt.Env) +} + +// GetPackageExports returns all known packages with name pkg and their exports. +func GetPackageExports(ctx context.Context, callback func(PackageExport), searchPkg, filename, filePkg string, opt *Options) error { + _, opt, err := initialize(filename, []byte{}, opt) + if err != nil { + return err + } + return getPackageExports(ctx, callback, searchPkg, filename, filePkg, opt.Env) } // initialize sets the values for opt and src. @@ -124,16 +147,18 @@ func initialize(filename string, src []byte, opt *Options) ([]byte, *Options, er // Set the env if the user has not provided it. if opt.Env == nil { opt.Env = &ProcessEnv{ - GOPATH: build.Default.GOPATH, - GOROOT: build.Default.GOROOT, + GOPATH: build.Default.GOPATH, + GOROOT: build.Default.GOROOT, + GOFLAGS: os.Getenv("GOFLAGS"), + GO111MODULE: os.Getenv("GO111MODULE"), + GOPROXY: os.Getenv("GOPROXY"), + GOSUMDB: os.Getenv("GOSUMDB"), } } - - // Set the logger if the user has not provided it. - if opt.Env.Logf == nil { - opt.Env.Logf = log.Printf + // Set the gocmdRunner if the user has not provided it. + if opt.Env.GocmdRunner == nil { + opt.Env.GocmdRunner = &gocommand.Runner{} } - if src == nil { b, err := ioutil.ReadFile(filename) if err != nil { diff --git a/vendor/golang.org/x/tools/internal/imports/mod.go b/vendor/golang.org/x/tools/internal/imports/mod.go index 387799bdacf..4e816e8bcf1 100644 --- a/vendor/golang.org/x/tools/internal/imports/mod.go +++ b/vendor/golang.org/x/tools/internal/imports/mod.go @@ -13,11 +13,10 @@ import ( "sort" "strconv" "strings" - "sync" - "time" + "golang.org/x/mod/module" + "golang.org/x/tools/internal/gocommand" "golang.org/x/tools/internal/gopathwalk" - "golang.org/x/tools/internal/module" ) // ModuleResolver implements resolver for modules using the go command as little @@ -25,90 +24,180 @@ import ( type ModuleResolver struct { env *ProcessEnv moduleCacheDir string + dummyVendorMod *gocommand.ModuleJSON // If vendoring is enabled, the pseudo-module that represents the /vendor directory. + roots []gopathwalk.Root + scanSema chan struct{} // scanSema prevents concurrent scans and guards scannedRoots. + scannedRoots map[gopathwalk.Root]bool - Initialized bool - Main *ModuleJSON - ModsByModPath []*ModuleJSON // All modules, ordered by # of path components in module Path... - ModsByDir []*ModuleJSON // ...or Dir. + initialized bool + main *gocommand.ModuleJSON + modsByModPath []*gocommand.ModuleJSON // All modules, ordered by # of path components in module Path... + modsByDir []*gocommand.ModuleJSON // ...or Dir. - // moduleCacheInfo stores information about the module cache. - moduleCacheInfo *moduleCacheInfo + // moduleCacheCache stores information about the module cache. + moduleCacheCache *dirInfoCache + otherCache *dirInfoCache } -type ModuleJSON struct { - Path string // module path - Version string // module version - Versions []string // available module versions (with -versions) - Replace *ModuleJSON // replaced by this module - Time *time.Time // time version was created - Update *ModuleJSON // available update, if any (with -u) - Main bool // is this the main module? - Indirect bool // is this module only an indirect dependency of main module? - Dir string // directory holding files for this module, if any - GoMod string // path to go.mod file for this module, if any - Error *ModuleErrorJSON // error loading module -} - -type ModuleErrorJSON struct { - Err string // the error itself +func newModuleResolver(e *ProcessEnv) *ModuleResolver { + r := &ModuleResolver{ + env: e, + scanSema: make(chan struct{}, 1), + } + r.scanSema <- struct{}{} + return r } func (r *ModuleResolver) init() error { - if r.Initialized { + if r.initialized { return nil } - stdout, err := r.env.invokeGo("list", "-m", "-json", "...") + + inv := gocommand.Invocation{ + BuildFlags: r.env.BuildFlags, + Env: r.env.env(), + Logf: r.env.Logf, + WorkingDir: r.env.WorkingDir, + } + mainMod, vendorEnabled, err := gocommand.VendorEnabled(context.TODO(), inv, r.env.GocmdRunner) + if err != nil { + return err + } + + if mainMod != nil && vendorEnabled { + // Vendor mode is on, so all the non-Main modules are irrelevant, + // and we need to search /vendor for everything. + r.main = mainMod + r.dummyVendorMod = &gocommand.ModuleJSON{ + Path: "", + Dir: filepath.Join(mainMod.Dir, "vendor"), + } + r.modsByModPath = []*gocommand.ModuleJSON{mainMod, r.dummyVendorMod} + r.modsByDir = []*gocommand.ModuleJSON{mainMod, r.dummyVendorMod} + } else { + // Vendor mode is off, so run go list -m ... to find everything. + r.initAllMods() + } + + r.moduleCacheDir = filepath.Join(filepath.SplitList(r.env.GOPATH)[0], "/pkg/mod") + + sort.Slice(r.modsByModPath, func(i, j int) bool { + count := func(x int) int { + return strings.Count(r.modsByModPath[x].Path, "/") + } + return count(j) < count(i) // descending order + }) + sort.Slice(r.modsByDir, func(i, j int) bool { + count := func(x int) int { + return strings.Count(r.modsByDir[x].Dir, "/") + } + return count(j) < count(i) // descending order + }) + + r.roots = []gopathwalk.Root{ + {filepath.Join(r.env.GOROOT, "/src"), gopathwalk.RootGOROOT}, + } + if r.main != nil { + r.roots = append(r.roots, gopathwalk.Root{r.main.Dir, gopathwalk.RootCurrentModule}) + } + if vendorEnabled { + r.roots = append(r.roots, gopathwalk.Root{r.dummyVendorMod.Dir, gopathwalk.RootOther}) + } else { + addDep := func(mod *gocommand.ModuleJSON) { + if mod.Replace == nil { + // This is redundant with the cache, but we'll skip it cheaply enough. + r.roots = append(r.roots, gopathwalk.Root{mod.Dir, gopathwalk.RootModuleCache}) + } else { + r.roots = append(r.roots, gopathwalk.Root{mod.Dir, gopathwalk.RootOther}) + } + } + // Walk dependent modules before scanning the full mod cache, direct deps first. + for _, mod := range r.modsByModPath { + if !mod.Indirect && !mod.Main { + addDep(mod) + } + } + for _, mod := range r.modsByModPath { + if mod.Indirect && !mod.Main { + addDep(mod) + } + } + r.roots = append(r.roots, gopathwalk.Root{r.moduleCacheDir, gopathwalk.RootModuleCache}) + } + + r.scannedRoots = map[gopathwalk.Root]bool{} + if r.moduleCacheCache == nil { + r.moduleCacheCache = &dirInfoCache{ + dirs: map[string]*directoryPackageInfo{}, + listeners: map[*int]cacheListener{}, + } + } + if r.otherCache == nil { + r.otherCache = &dirInfoCache{ + dirs: map[string]*directoryPackageInfo{}, + listeners: map[*int]cacheListener{}, + } + } + r.initialized = true + return nil +} + +func (r *ModuleResolver) initAllMods() error { + stdout, err := r.env.invokeGo(context.TODO(), "list", "-m", "-json", "...") if err != nil { return err } for dec := json.NewDecoder(stdout); dec.More(); { - mod := &ModuleJSON{} + mod := &gocommand.ModuleJSON{} if err := dec.Decode(mod); err != nil { return err } if mod.Dir == "" { - if r.env.Debug { + if r.env.Logf != nil { r.env.Logf("module %v has not been downloaded and will be ignored", mod.Path) } // Can't do anything with a module that's not downloaded. continue } - r.ModsByModPath = append(r.ModsByModPath, mod) - r.ModsByDir = append(r.ModsByDir, mod) + // golang/go#36193: the go command doesn't always clean paths. + mod.Dir = filepath.Clean(mod.Dir) + r.modsByModPath = append(r.modsByModPath, mod) + r.modsByDir = append(r.modsByDir, mod) if mod.Main { - r.Main = mod + r.main = mod } } - - sort.Slice(r.ModsByModPath, func(i, j int) bool { - count := func(x int) int { - return strings.Count(r.ModsByModPath[x].Path, "/") - } - return count(j) < count(i) // descending order - }) - sort.Slice(r.ModsByDir, func(i, j int) bool { - count := func(x int) int { - return strings.Count(r.ModsByDir[x].Dir, "/") - } - return count(j) < count(i) // descending order - }) - - if r.moduleCacheInfo == nil { - r.moduleCacheInfo = &moduleCacheInfo{ - modCacheDirInfo: make(map[string]*directoryPackageInfo), - } - } - - r.Initialized = true return nil } +func (r *ModuleResolver) ClearForNewScan() { + <-r.scanSema + r.scannedRoots = map[gopathwalk.Root]bool{} + r.otherCache = &dirInfoCache{ + dirs: map[string]*directoryPackageInfo{}, + listeners: map[*int]cacheListener{}, + } + r.scanSema <- struct{}{} +} + +func (r *ModuleResolver) ClearForNewMod() { + <-r.scanSema + *r = ModuleResolver{ + env: r.env, + moduleCacheCache: r.moduleCacheCache, + otherCache: r.otherCache, + scanSema: r.scanSema, + } + r.init() + r.scanSema <- struct{}{} +} + // findPackage returns the module and directory that contains the package at // the given import path, or returns nil, "" if no module is in scope. -func (r *ModuleResolver) findPackage(importPath string) (*ModuleJSON, string) { +func (r *ModuleResolver) findPackage(importPath string) (*gocommand.ModuleJSON, string) { // This can't find packages in the stdlib, but that's harmless for all // the existing code paths. - for _, m := range r.ModsByModPath { + for _, m := range r.modsByModPath { if !strings.HasPrefix(importPath, m.Path) { continue } @@ -118,22 +207,31 @@ func (r *ModuleResolver) findPackage(importPath string) (*ModuleJSON, string) { continue } - if info, ok := r.moduleCacheInfo.Load(pkgDir); ok { - if packageScanned, err := info.reachedStatus(directoryScanned); packageScanned { + if info, ok := r.cacheLoad(pkgDir); ok { + if loaded, err := info.reachedStatus(nameLoaded); loaded { if err != nil { - // There was some error with scanning this directory. - // It does not contain a valid package. - continue + continue // No package in this dir. } return m, pkgDir } + if scanned, err := info.reachedStatus(directoryScanned); scanned && err != nil { + continue // Dir is unreadable, etc. + } + // This is slightly wrong: a directory doesn't have to have an + // importable package to count as a package for package-to-module + // resolution. package main or _test files should count but + // don't. + // TODO(heschi): fix this. + if _, err := r.cachePackageName(info); err == nil { + return m, pkgDir + } } + // Not cached. Read the filesystem. pkgFiles, err := ioutil.ReadDir(pkgDir) if err != nil { continue } - // A module only contains a package if it has buildable go // files in that directory. If not, it could be provided by an // outer module. See #29736. @@ -146,9 +244,43 @@ func (r *ModuleResolver) findPackage(importPath string) (*ModuleJSON, string) { return nil, "" } +func (r *ModuleResolver) cacheLoad(dir string) (directoryPackageInfo, bool) { + if info, ok := r.moduleCacheCache.Load(dir); ok { + return info, ok + } + return r.otherCache.Load(dir) +} + +func (r *ModuleResolver) cacheStore(info directoryPackageInfo) { + if info.rootType == gopathwalk.RootModuleCache { + r.moduleCacheCache.Store(info.dir, info) + } else { + r.otherCache.Store(info.dir, info) + } +} + +func (r *ModuleResolver) cacheKeys() []string { + return append(r.moduleCacheCache.Keys(), r.otherCache.Keys()...) +} + +// cachePackageName caches the package name for a dir already in the cache. +func (r *ModuleResolver) cachePackageName(info directoryPackageInfo) (string, error) { + if info.rootType == gopathwalk.RootModuleCache { + return r.moduleCacheCache.CachePackageName(info) + } + return r.otherCache.CachePackageName(info) +} + +func (r *ModuleResolver) cacheExports(ctx context.Context, env *ProcessEnv, info directoryPackageInfo) (string, []string, error) { + if info.rootType == gopathwalk.RootModuleCache { + return r.moduleCacheCache.CacheExports(ctx, env, info) + } + return r.otherCache.CacheExports(ctx, env, info) +} + // findModuleByDir returns the module that contains dir, or nil if no such // module is in scope. -func (r *ModuleResolver) findModuleByDir(dir string) *ModuleJSON { +func (r *ModuleResolver) findModuleByDir(dir string) *gocommand.ModuleJSON { // This is quite tricky and may not be correct. dir could be: // - a package in the main module. // - a replace target underneath the main module's directory. @@ -159,7 +291,7 @@ func (r *ModuleResolver) findModuleByDir(dir string) *ModuleJSON { // - in /vendor/ in -mod=vendor mode. // - nested module? Dunno. // Rumor has it that replace targets cannot contain other replace targets. - for _, m := range r.ModsByDir { + for _, m := range r.modsByDir { if !strings.HasPrefix(dir, m.Dir) { continue } @@ -175,7 +307,7 @@ func (r *ModuleResolver) findModuleByDir(dir string) *ModuleJSON { // dirIsNestedModule reports if dir is contained in a nested module underneath // mod, not actually in mod. -func (r *ModuleResolver) dirIsNestedModule(dir string, mod *ModuleJSON) bool { +func (r *ModuleResolver) dirIsNestedModule(dir string, mod *gocommand.ModuleJSON) bool { if !strings.HasPrefix(dir, mod.Dir) { return false } @@ -184,28 +316,45 @@ func (r *ModuleResolver) dirIsNestedModule(dir string, mod *ModuleJSON) bool { // so it cannot be a nested module. return false } - mf := r.findModFile(dir) - if mf == "" { + if mod != nil && mod == r.dummyVendorMod { + // The /vendor pseudomodule is flattened and doesn't actually count. return false } - return filepath.Dir(mf) != mod.Dir + modDir, _ := r.modInfo(dir) + if modDir == "" { + return false + } + return modDir != mod.Dir } -func (r *ModuleResolver) findModFile(dir string) string { +func (r *ModuleResolver) modInfo(dir string) (modDir string, modName string) { + readModName := func(modFile string) string { + modBytes, err := ioutil.ReadFile(modFile) + if err != nil { + return "" + } + return modulePath(modBytes) + } + if r.dirInModuleCache(dir) { matches := modCacheRegexp.FindStringSubmatch(dir) index := strings.Index(dir, matches[1]+"@"+matches[2]) - return filepath.Join(dir[:index], matches[1]+"@"+matches[2], "go.mod") + modDir := filepath.Join(dir[:index], matches[1]+"@"+matches[2]) + return modDir, readModName(filepath.Join(modDir, "go.mod")) } for { + if info, ok := r.cacheLoad(dir); ok { + return info.moduleDir, info.moduleName + } f := filepath.Join(dir, "go.mod") info, err := os.Stat(f) if err == nil && !info.IsDir() { - return f + return dir, readModName(f) } + d := filepath.Dir(dir) if len(d) >= len(dir) { - return "" // reached top of file system, no go.mod + return "", "" // reached top of file system, no go.mod } dir = d } @@ -237,47 +386,50 @@ func (r *ModuleResolver) loadPackageNames(importPaths []string, srcDir string) ( return names, nil } -func (r *ModuleResolver) scan(_ references) ([]*pkg, error) { +func (r *ModuleResolver) scan(ctx context.Context, callback *scanCallback) error { if err := r.init(); err != nil { - return nil, err + return err } - // Walk GOROOT, GOPATH/pkg/mod, and the main module. - roots := []gopathwalk.Root{ - {filepath.Join(r.env.GOROOT, "/src"), gopathwalk.RootGOROOT}, - } - if r.Main != nil { - roots = append(roots, gopathwalk.Root{r.Main.Dir, gopathwalk.RootCurrentModule}) - } - if r.moduleCacheDir == "" { - r.moduleCacheDir = filepath.Join(filepath.SplitList(r.env.GOPATH)[0], "/pkg/mod") - } - roots = append(roots, gopathwalk.Root{r.moduleCacheDir, gopathwalk.RootModuleCache}) - - // Walk replace targets, just in case they're not in any of the above. - for _, mod := range r.ModsByModPath { - if mod.Replace != nil { - roots = append(roots, gopathwalk.Root{mod.Dir, gopathwalk.RootOther}) + processDir := func(info directoryPackageInfo) { + // Skip this directory if we were not able to get the package information successfully. + if scanned, err := info.reachedStatus(directoryScanned); !scanned || err != nil { + return } + pkg, err := r.canonicalize(info) + if err != nil { + return + } + + if !callback.dirFound(pkg) { + return + } + pkg.packageName, err = r.cachePackageName(info) + if err != nil { + return + } + + if !callback.packageNameLoaded(pkg) { + return + } + _, exports, err := r.loadExports(ctx, pkg, false) + if err != nil { + return + } + callback.exportsLoaded(pkg, exports) } - var result []*pkg - dupCheck := make(map[string]bool) - var mu sync.Mutex + // Start processing everything in the cache, and listen for the new stuff + // we discover in the walk below. + stop1 := r.moduleCacheCache.ScanAndListen(ctx, processDir) + defer stop1() + stop2 := r.otherCache.ScanAndListen(ctx, processDir) + defer stop2() - // Packages in the module cache are immutable. If we have - // already seen this package on a previous scan of the module - // cache, return that result. + // We assume cached directories are fully cached, including all their + // children, and have not changed. We can skip them. skip := func(root gopathwalk.Root, dir string) bool { - mu.Lock() - defer mu.Unlock() - // If we have already processed this directory on this walk, skip it. - if _, dup := dupCheck[dir]; dup { - return true - } - - // If we have saved this directory information, skip it. - info, ok := r.moduleCacheInfo.Load(dir) + info, ok := r.cacheLoad(dir) if !ok { return false } @@ -288,168 +440,171 @@ func (r *ModuleResolver) scan(_ references) ([]*pkg, error) { return packageScanned } + // Add anything new to the cache, and process it if we're still listening. add := func(root gopathwalk.Root, dir string) { - mu.Lock() - defer mu.Unlock() - if _, dup := dupCheck[dir]; dup { - return - } - - info, err := r.scanDirForPackage(root, dir) - if err != nil { - return - } - if root.Type == gopathwalk.RootModuleCache { - // Save this package information in the cache and return. - // Packages from the module cache are added after Walk. - r.moduleCacheInfo.Store(dir, info) - return - } - - // Skip this package if there was an error loading package info. - if info.err != nil { - return - } - - // The rest of this function canonicalizes the packages using the results - // of initializing the resolver from 'go list -m'. - res, err := r.canonicalize(root.Type, info.nonCanonicalImportPath, info.dir, info.needsReplace) - if err != nil { - return - } - - result = append(result, res) + r.cacheStore(r.scanDirForPackage(root, dir)) } - gopathwalk.WalkSkip(roots, add, skip, gopathwalk.Options{Debug: r.env.Debug, ModulesEnabled: true}) - - // Add the packages from the modules in the mod cache that were skipped. - for _, dir := range r.moduleCacheInfo.Keys() { - info, ok := r.moduleCacheInfo.Load(dir) - if !ok { - continue + // r.roots and the callback are not necessarily safe to use in the + // goroutine below. Process them eagerly. + roots := filterRoots(r.roots, callback.rootFound) + // We can't cancel walks, because we need them to finish to have a usable + // cache. Instead, run them in a separate goroutine and detach. + scanDone := make(chan struct{}) + go func() { + select { + case <-ctx.Done(): + return + case <-r.scanSema: } + defer func() { r.scanSema <- struct{}{} }() + // We have the lock on r.scannedRoots, and no other scans can run. + for _, root := range roots { + if ctx.Err() != nil { + return + } - // Skip this directory if we were not able to get the package information successfully. - if scanned, err := info.reachedStatus(directoryScanned); !scanned || err != nil { - continue + if r.scannedRoots[root] { + continue + } + gopathwalk.WalkSkip([]gopathwalk.Root{root}, add, skip, gopathwalk.Options{Logf: r.env.Logf, ModulesEnabled: true}) + r.scannedRoots[root] = true } - - res, err := r.canonicalize(gopathwalk.RootModuleCache, info.nonCanonicalImportPath, info.dir, info.needsReplace) - if err != nil { - continue - } - result = append(result, res) + close(scanDone) + }() + select { + case <-ctx.Done(): + case <-scanDone: } + return nil +} - return result, nil +func (r *ModuleResolver) scoreImportPath(ctx context.Context, path string) int { + if _, ok := stdlib[path]; ok { + return MaxRelevance + } + mod, _ := r.findPackage(path) + return modRelevance(mod) +} + +func modRelevance(mod *gocommand.ModuleJSON) int { + switch { + case mod == nil: // out of scope + return MaxRelevance - 4 + case mod.Indirect: + return MaxRelevance - 3 + case !mod.Main: + return MaxRelevance - 2 + default: + return MaxRelevance - 1 // main module ties with stdlib + } } // canonicalize gets the result of canonicalizing the packages using the results // of initializing the resolver from 'go list -m'. -func (r *ModuleResolver) canonicalize(rootType gopathwalk.RootType, importPath, dir string, needsReplace bool) (res *pkg, err error) { +func (r *ModuleResolver) canonicalize(info directoryPackageInfo) (*pkg, error) { // Packages in GOROOT are already canonical, regardless of the std/cmd modules. - if rootType == gopathwalk.RootGOROOT { + if info.rootType == gopathwalk.RootGOROOT { return &pkg{ - importPathShort: importPath, - dir: dir, + importPathShort: info.nonCanonicalImportPath, + dir: info.dir, + packageName: path.Base(info.nonCanonicalImportPath), + relevance: MaxRelevance, }, nil } + importPath := info.nonCanonicalImportPath + mod := r.findModuleByDir(info.dir) // Check if the directory is underneath a module that's in scope. - if mod := r.findModuleByDir(dir); mod != nil { + if mod != nil { // It is. If dir is the target of a replace directive, // our guessed import path is wrong. Use the real one. - if mod.Dir == dir { + if mod.Dir == info.dir { importPath = mod.Path } else { - dirInMod := dir[len(mod.Dir)+len("/"):] + dirInMod := info.dir[len(mod.Dir)+len("/"):] importPath = path.Join(mod.Path, filepath.ToSlash(dirInMod)) } - } else if needsReplace { - return nil, fmt.Errorf("needed this package to be in scope: %s", dir) + } else if !strings.HasPrefix(importPath, info.moduleName) { + // The module's name doesn't match the package's import path. It + // probably needs a replace directive we don't have. + return nil, fmt.Errorf("package in %q is not valid without a replace statement", info.dir) } + res := &pkg{ + importPathShort: importPath, + dir: info.dir, + relevance: modRelevance(mod), + } // We may have discovered a package that has a different version // in scope already. Canonicalize to that one if possible. if _, canonicalDir := r.findPackage(importPath); canonicalDir != "" { - dir = canonicalDir + res.dir = canonicalDir } - return &pkg{ - importPathShort: VendorlessPath(importPath), - dir: dir, - }, nil + return res, nil } -func (r *ModuleResolver) loadExports(ctx context.Context, expectPackage string, pkg *pkg) (map[string]bool, error) { +func (r *ModuleResolver) loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []string, error) { if err := r.init(); err != nil { - return nil, err + return "", nil, err } - return loadExportsFromFiles(ctx, r.env, expectPackage, pkg.dir) + if info, ok := r.cacheLoad(pkg.dir); ok && !includeTest { + return r.cacheExports(ctx, r.env, info) + } + return loadExportsFromFiles(ctx, r.env, pkg.dir, includeTest) } -func (r *ModuleResolver) scanDirForPackage(root gopathwalk.Root, dir string) (directoryPackageInfo, error) { +func (r *ModuleResolver) scanDirForPackage(root gopathwalk.Root, dir string) directoryPackageInfo { subdir := "" if dir != root.Path { subdir = dir[len(root.Path)+len("/"):] } importPath := filepath.ToSlash(subdir) if strings.HasPrefix(importPath, "vendor/") { - // Ignore vendor dirs. If -mod=vendor is on, then things - // should mostly just work, but when it's not vendor/ - // is a mess. There's no easy way to tell if it's on. - // We can still find things in the mod cache and - // map them into /vendor when -mod=vendor is on. - return directoryPackageInfo{}, fmt.Errorf("vendor directory") + // Only enter vendor directories if they're explicitly requested as a root. + return directoryPackageInfo{ + status: directoryScanned, + err: fmt.Errorf("unwanted vendor directory"), + } } switch root.Type { case gopathwalk.RootCurrentModule: - importPath = path.Join(r.Main.Path, filepath.ToSlash(subdir)) + importPath = path.Join(r.main.Path, filepath.ToSlash(subdir)) case gopathwalk.RootModuleCache: matches := modCacheRegexp.FindStringSubmatch(subdir) if len(matches) == 0 { return directoryPackageInfo{ status: directoryScanned, err: fmt.Errorf("invalid module cache path: %v", subdir), - }, nil + } } - modPath, err := module.DecodePath(filepath.ToSlash(matches[1])) + modPath, err := module.UnescapePath(filepath.ToSlash(matches[1])) if err != nil { - if r.env.Debug { + if r.env.Logf != nil { r.env.Logf("decoding module cache path %q: %v", subdir, err) } return directoryPackageInfo{ status: directoryScanned, err: fmt.Errorf("decoding module cache path %q: %v", subdir, err), - }, nil + } } importPath = path.Join(modPath, filepath.ToSlash(matches[3])) - case gopathwalk.RootGOROOT: - importPath = subdir } + modDir, modName := r.modInfo(dir) result := directoryPackageInfo{ status: directoryScanned, dir: dir, + rootType: root.Type, nonCanonicalImportPath: importPath, - needsReplace: false, + moduleDir: modDir, + moduleName: modName, } if root.Type == gopathwalk.RootGOROOT { // stdlib packages are always in scope, despite the confusing go.mod - return result, nil + return result } - // Check that this package is not obviously impossible to import. - modFile := r.findModFile(dir) - - modBytes, err := ioutil.ReadFile(modFile) - if err == nil && !strings.HasPrefix(importPath, modulePath(modBytes)) { - // The module's declared path does not match - // its expected path. It probably needs a - // replace directive we don't have. - result.needsReplace = true - } - - return result, nil + return result } // modCacheRegexp splits a path in a module cache into module, module version, and package. diff --git a/vendor/golang.org/x/tools/internal/imports/mod_cache.go b/vendor/golang.org/x/tools/internal/imports/mod_cache.go index f96b92d0099..5b4f03accdd 100644 --- a/vendor/golang.org/x/tools/internal/imports/mod_cache.go +++ b/vendor/golang.org/x/tools/internal/imports/mod_cache.go @@ -1,12 +1,13 @@ package imports import ( + "context" + "fmt" "sync" + + "golang.org/x/tools/internal/gopathwalk" ) -// ModuleResolver implements Resolver for modules using the go command as little -// as feasible. -// // To find packages to import, the resolver needs to know about all of the // the packages that could be imported. This includes packages that are // already in modules that are in (1) the current module, (2) replace targets, @@ -30,6 +31,8 @@ type directoryPackageStatus int const ( _ directoryPackageStatus = iota directoryScanned + nameLoaded + exportsLoaded ) type directoryPackageInfo struct { @@ -38,17 +41,26 @@ type directoryPackageInfo struct { // err is non-nil when there was an error trying to reach status. err error - // Set when status > directoryScanned. + // Set when status >= directoryScanned. // dir is the absolute directory of this package. - dir string - // nonCanonicalImportPath is the expected import path for this package. - // This may not be an import path that can be used to import this package. + dir string + rootType gopathwalk.RootType + // nonCanonicalImportPath is the package's expected import path. It may + // not actually be importable at that path. nonCanonicalImportPath string - // needsReplace is true if the nonCanonicalImportPath does not match the - // the modules declared path, making it impossible to import without a - // replace directive. - needsReplace bool + + // Module-related information. + moduleDir string // The directory that is the module root of this dir. + moduleName string // The module name that contains this dir. + + // Set when status >= nameLoaded. + + packageName string // the package name, as declared in the source. + + // Set when status >= exportsLoaded. + + exports []string } // reachedStatus returns true when info has a status at least target and any error associated with @@ -63,8 +75,8 @@ func (info *directoryPackageInfo) reachedStatus(target directoryPackageStatus) ( return true, nil } -// moduleCacheInfo is a concurrency safe map for storing information about -// the directories in the module cache. +// dirInfoCache is a concurrency safe map for storing information about +// directories that may contain packages. // // The information in this cache is built incrementally. Entries are initialized in scan. // No new keys should be added in any other functions, as all directories containing @@ -73,37 +85,101 @@ func (info *directoryPackageInfo) reachedStatus(target directoryPackageStatus) ( // Other functions, including loadExports and findPackage, may update entries in this cache // as they discover new things about the directory. // -// We do not need to protect the data in the cache for multiple writes, because it only stores -// module cache directories, which do not change. If two competing stores take place, there will be -// one store that wins. Although this could result in a loss of information it will not be incorrect -// and may just result in recomputing the same result later. +// The information in the cache is not expected to change for the cache's +// lifetime, so there is no protection against competing writes. Users should +// take care not to hold the cache across changes to the underlying files. // // TODO(suzmue): consider other concurrency strategies and data structures (RWLocks, sync.Map, etc) -type moduleCacheInfo struct { +type dirInfoCache struct { mu sync.Mutex - // modCacheDirInfo stores information about packages in - // module cache directories. Keyed by absolute directory. - modCacheDirInfo map[string]*directoryPackageInfo + // dirs stores information about packages in directories, keyed by absolute path. + dirs map[string]*directoryPackageInfo + listeners map[*int]cacheListener +} + +type cacheListener func(directoryPackageInfo) + +// ScanAndListen calls listener on all the items in the cache, and on anything +// newly added. The returned stop function waits for all in-flight callbacks to +// finish and blocks new ones. +func (d *dirInfoCache) ScanAndListen(ctx context.Context, listener cacheListener) func() { + ctx, cancel := context.WithCancel(ctx) + + // Flushing out all the callbacks is tricky without knowing how many there + // are going to be. Setting an arbitrary limit makes it much easier. + const maxInFlight = 10 + sema := make(chan struct{}, maxInFlight) + for i := 0; i < maxInFlight; i++ { + sema <- struct{}{} + } + + cookie := new(int) // A unique ID we can use for the listener. + + // We can't hold mu while calling the listener. + d.mu.Lock() + var keys []string + for key := range d.dirs { + keys = append(keys, key) + } + d.listeners[cookie] = func(info directoryPackageInfo) { + select { + case <-ctx.Done(): + return + case <-sema: + } + listener(info) + sema <- struct{}{} + } + d.mu.Unlock() + + stop := func() { + cancel() + d.mu.Lock() + delete(d.listeners, cookie) + d.mu.Unlock() + for i := 0; i < maxInFlight; i++ { + <-sema + } + } + + // Process the pre-existing keys. + for _, k := range keys { + select { + case <-ctx.Done(): + return stop + default: + } + if v, ok := d.Load(k); ok { + listener(v) + } + } + + return stop } // Store stores the package info for dir. -func (d *moduleCacheInfo) Store(dir string, info directoryPackageInfo) { +func (d *dirInfoCache) Store(dir string, info directoryPackageInfo) { d.mu.Lock() - defer d.mu.Unlock() - d.modCacheDirInfo[dir] = &directoryPackageInfo{ - status: info.status, - err: info.err, - dir: info.dir, - nonCanonicalImportPath: info.nonCanonicalImportPath, - needsReplace: info.needsReplace, + _, old := d.dirs[dir] + d.dirs[dir] = &info + var listeners []cacheListener + for _, l := range d.listeners { + listeners = append(listeners, l) + } + d.mu.Unlock() + + if !old { + for _, l := range listeners { + l(info) + } } } // Load returns a copy of the directoryPackageInfo for absolute directory dir. -func (d *moduleCacheInfo) Load(dir string) (directoryPackageInfo, bool) { +func (d *dirInfoCache) Load(dir string) (directoryPackageInfo, bool) { d.mu.Lock() defer d.mu.Unlock() - info, ok := d.modCacheDirInfo[dir] + info, ok := d.dirs[dir] if !ok { return directoryPackageInfo{}, false } @@ -111,11 +187,46 @@ func (d *moduleCacheInfo) Load(dir string) (directoryPackageInfo, bool) { } // Keys returns the keys currently present in d. -func (d *moduleCacheInfo) Keys() (keys []string) { +func (d *dirInfoCache) Keys() (keys []string) { d.mu.Lock() defer d.mu.Unlock() - for key := range d.modCacheDirInfo { + for key := range d.dirs { keys = append(keys, key) } return keys } + +func (d *dirInfoCache) CachePackageName(info directoryPackageInfo) (string, error) { + if loaded, err := info.reachedStatus(nameLoaded); loaded { + return info.packageName, err + } + if scanned, err := info.reachedStatus(directoryScanned); !scanned || err != nil { + return "", fmt.Errorf("cannot read package name, scan error: %v", err) + } + info.packageName, info.err = packageDirToName(info.dir) + info.status = nameLoaded + d.Store(info.dir, info) + return info.packageName, info.err +} + +func (d *dirInfoCache) CacheExports(ctx context.Context, env *ProcessEnv, info directoryPackageInfo) (string, []string, error) { + if reached, _ := info.reachedStatus(exportsLoaded); reached { + return info.packageName, info.exports, info.err + } + if reached, err := info.reachedStatus(nameLoaded); reached && err != nil { + return "", nil, err + } + info.packageName, info.exports, info.err = loadExportsFromFiles(ctx, env, info.dir, false) + if info.err == context.Canceled || info.err == context.DeadlineExceeded { + return info.packageName, info.exports, info.err + } + // The cache structure wants things to proceed linearly. We can skip a + // step here, but only if we succeed. + if info.status == nameLoaded || info.err == nil { + info.status = exportsLoaded + } else { + info.status = nameLoaded + } + d.Store(info.dir, info) + return info.packageName, info.exports, info.err +} diff --git a/vendor/golang.org/x/tools/internal/imports/zstdlib.go b/vendor/golang.org/x/tools/internal/imports/zstdlib.go index 544339e53b2..16252111ff2 100644 --- a/vendor/golang.org/x/tools/internal/imports/zstdlib.go +++ b/vendor/golang.org/x/tools/internal/imports/zstdlib.go @@ -2,10376 +2,10463 @@ package imports -var stdlib = map[string]map[string]bool{ - "archive/tar": map[string]bool{ - "ErrFieldTooLong": true, - "ErrHeader": true, - "ErrWriteAfterClose": true, - "ErrWriteTooLong": true, - "FileInfoHeader": true, - "Format": true, - "FormatGNU": true, - "FormatPAX": true, - "FormatUSTAR": true, - "FormatUnknown": true, - "Header": true, - "NewReader": true, - "NewWriter": true, - "Reader": true, - "TypeBlock": true, - "TypeChar": true, - "TypeCont": true, - "TypeDir": true, - "TypeFifo": true, - "TypeGNULongLink": true, - "TypeGNULongName": true, - "TypeGNUSparse": true, - "TypeLink": true, - "TypeReg": true, - "TypeRegA": true, - "TypeSymlink": true, - "TypeXGlobalHeader": true, - "TypeXHeader": true, - "Writer": true, - }, - "archive/zip": map[string]bool{ - "Compressor": true, - "Decompressor": true, - "Deflate": true, - "ErrAlgorithm": true, - "ErrChecksum": true, - "ErrFormat": true, - "File": true, - "FileHeader": true, - "FileInfoHeader": true, - "NewReader": true, - "NewWriter": true, - "OpenReader": true, - "ReadCloser": true, - "Reader": true, - "RegisterCompressor": true, - "RegisterDecompressor": true, - "Store": true, - "Writer": true, - }, - "bufio": map[string]bool{ - "ErrAdvanceTooFar": true, - "ErrBufferFull": true, - "ErrFinalToken": true, - "ErrInvalidUnreadByte": true, - "ErrInvalidUnreadRune": true, - "ErrNegativeAdvance": true, - "ErrNegativeCount": true, - "ErrTooLong": true, - "MaxScanTokenSize": true, - "NewReadWriter": true, - "NewReader": true, - "NewReaderSize": true, - "NewScanner": true, - "NewWriter": true, - "NewWriterSize": true, - "ReadWriter": true, - "Reader": true, - "ScanBytes": true, - "ScanLines": true, - "ScanRunes": true, - "ScanWords": true, - "Scanner": true, - "SplitFunc": true, - "Writer": true, - }, - "bytes": map[string]bool{ - "Buffer": true, - "Compare": true, - "Contains": true, - "ContainsAny": true, - "ContainsRune": true, - "Count": true, - "Equal": true, - "EqualFold": true, - "ErrTooLarge": true, - "Fields": true, - "FieldsFunc": true, - "HasPrefix": true, - "HasSuffix": true, - "Index": true, - "IndexAny": true, - "IndexByte": true, - "IndexFunc": true, - "IndexRune": true, - "Join": true, - "LastIndex": true, - "LastIndexAny": true, - "LastIndexByte": true, - "LastIndexFunc": true, - "Map": true, - "MinRead": true, - "NewBuffer": true, - "NewBufferString": true, - "NewReader": true, - "Reader": true, - "Repeat": true, - "Replace": true, - "ReplaceAll": true, - "Runes": true, - "Split": true, - "SplitAfter": true, - "SplitAfterN": true, - "SplitN": true, - "Title": true, - "ToLower": true, - "ToLowerSpecial": true, - "ToTitle": true, - "ToTitleSpecial": true, - "ToUpper": true, - "ToUpperSpecial": true, - "ToValidUTF8": true, - "Trim": true, - "TrimFunc": true, - "TrimLeft": true, - "TrimLeftFunc": true, - "TrimPrefix": true, - "TrimRight": true, - "TrimRightFunc": true, - "TrimSpace": true, - "TrimSuffix": true, - }, - "compress/bzip2": map[string]bool{ - "NewReader": true, - "StructuralError": true, - }, - "compress/flate": map[string]bool{ - "BestCompression": true, - "BestSpeed": true, - "CorruptInputError": true, - "DefaultCompression": true, - "HuffmanOnly": true, - "InternalError": true, - "NewReader": true, - "NewReaderDict": true, - "NewWriter": true, - "NewWriterDict": true, - "NoCompression": true, - "ReadError": true, - "Reader": true, - "Resetter": true, - "WriteError": true, - "Writer": true, - }, - "compress/gzip": map[string]bool{ - "BestCompression": true, - "BestSpeed": true, - "DefaultCompression": true, - "ErrChecksum": true, - "ErrHeader": true, - "Header": true, - "HuffmanOnly": true, - "NewReader": true, - "NewWriter": true, - "NewWriterLevel": true, - "NoCompression": true, - "Reader": true, - "Writer": true, - }, - "compress/lzw": map[string]bool{ - "LSB": true, - "MSB": true, - "NewReader": true, - "NewWriter": true, - "Order": true, - }, - "compress/zlib": map[string]bool{ - "BestCompression": true, - "BestSpeed": true, - "DefaultCompression": true, - "ErrChecksum": true, - "ErrDictionary": true, - "ErrHeader": true, - "HuffmanOnly": true, - "NewReader": true, - "NewReaderDict": true, - "NewWriter": true, - "NewWriterLevel": true, - "NewWriterLevelDict": true, - "NoCompression": true, - "Resetter": true, - "Writer": true, - }, - "container/heap": map[string]bool{ - "Fix": true, - "Init": true, - "Interface": true, - "Pop": true, - "Push": true, - "Remove": true, - }, - "container/list": map[string]bool{ - "Element": true, - "List": true, - "New": true, - }, - "container/ring": map[string]bool{ - "New": true, - "Ring": true, - }, - "context": map[string]bool{ - "Background": true, - "CancelFunc": true, - "Canceled": true, - "Context": true, - "DeadlineExceeded": true, - "TODO": true, - "WithCancel": true, - "WithDeadline": true, - "WithTimeout": true, - "WithValue": true, - }, - "crypto": map[string]bool{ - "BLAKE2b_256": true, - "BLAKE2b_384": true, - "BLAKE2b_512": true, - "BLAKE2s_256": true, - "Decrypter": true, - "DecrypterOpts": true, - "Hash": true, - "MD4": true, - "MD5": true, - "MD5SHA1": true, - "PrivateKey": true, - "PublicKey": true, - "RIPEMD160": true, - "RegisterHash": true, - "SHA1": true, - "SHA224": true, - "SHA256": true, - "SHA384": true, - "SHA3_224": true, - "SHA3_256": true, - "SHA3_384": true, - "SHA3_512": true, - "SHA512": true, - "SHA512_224": true, - "SHA512_256": true, - "Signer": true, - "SignerOpts": true, - }, - "crypto/aes": map[string]bool{ - "BlockSize": true, - "KeySizeError": true, - "NewCipher": true, - }, - "crypto/cipher": map[string]bool{ - "AEAD": true, - "Block": true, - "BlockMode": true, - "NewCBCDecrypter": true, - "NewCBCEncrypter": true, - "NewCFBDecrypter": true, - "NewCFBEncrypter": true, - "NewCTR": true, - "NewGCM": true, - "NewGCMWithNonceSize": true, - "NewGCMWithTagSize": true, - "NewOFB": true, - "Stream": true, - "StreamReader": true, - "StreamWriter": true, - }, - "crypto/des": map[string]bool{ - "BlockSize": true, - "KeySizeError": true, - "NewCipher": true, - "NewTripleDESCipher": true, - }, - "crypto/dsa": map[string]bool{ - "ErrInvalidPublicKey": true, - "GenerateKey": true, - "GenerateParameters": true, - "L1024N160": true, - "L2048N224": true, - "L2048N256": true, - "L3072N256": true, - "ParameterSizes": true, - "Parameters": true, - "PrivateKey": true, - "PublicKey": true, - "Sign": true, - "Verify": true, - }, - "crypto/ecdsa": map[string]bool{ - "GenerateKey": true, - "PrivateKey": true, - "PublicKey": true, - "Sign": true, - "Verify": true, - }, - "crypto/ed25519": map[string]bool{ - "GenerateKey": true, - "NewKeyFromSeed": true, - "PrivateKey": true, - "PrivateKeySize": true, - "PublicKey": true, - "PublicKeySize": true, - "SeedSize": true, - "Sign": true, - "SignatureSize": true, - "Verify": true, - }, - "crypto/elliptic": map[string]bool{ - "Curve": true, - "CurveParams": true, - "GenerateKey": true, - "Marshal": true, - "P224": true, - "P256": true, - "P384": true, - "P521": true, - "Unmarshal": true, - }, - "crypto/hmac": map[string]bool{ - "Equal": true, - "New": true, - }, - "crypto/md5": map[string]bool{ - "BlockSize": true, - "New": true, - "Size": true, - "Sum": true, - }, - "crypto/rand": map[string]bool{ - "Int": true, - "Prime": true, - "Read": true, - "Reader": true, - }, - "crypto/rc4": map[string]bool{ - "Cipher": true, - "KeySizeError": true, - "NewCipher": true, - }, - "crypto/rsa": map[string]bool{ - "CRTValue": true, - "DecryptOAEP": true, - "DecryptPKCS1v15": true, - "DecryptPKCS1v15SessionKey": true, - "EncryptOAEP": true, - "EncryptPKCS1v15": true, - "ErrDecryption": true, - "ErrMessageTooLong": true, - "ErrVerification": true, - "GenerateKey": true, - "GenerateMultiPrimeKey": true, - "OAEPOptions": true, - "PKCS1v15DecryptOptions": true, - "PSSOptions": true, - "PSSSaltLengthAuto": true, - "PSSSaltLengthEqualsHash": true, - "PrecomputedValues": true, - "PrivateKey": true, - "PublicKey": true, - "SignPKCS1v15": true, - "SignPSS": true, - "VerifyPKCS1v15": true, - "VerifyPSS": true, - }, - "crypto/sha1": map[string]bool{ - "BlockSize": true, - "New": true, - "Size": true, - "Sum": true, - }, - "crypto/sha256": map[string]bool{ - "BlockSize": true, - "New": true, - "New224": true, - "Size": true, - "Size224": true, - "Sum224": true, - "Sum256": true, - }, - "crypto/sha512": map[string]bool{ - "BlockSize": true, - "New": true, - "New384": true, - "New512_224": true, - "New512_256": true, - "Size": true, - "Size224": true, - "Size256": true, - "Size384": true, - "Sum384": true, - "Sum512": true, - "Sum512_224": true, - "Sum512_256": true, - }, - "crypto/subtle": map[string]bool{ - "ConstantTimeByteEq": true, - "ConstantTimeCompare": true, - "ConstantTimeCopy": true, - "ConstantTimeEq": true, - "ConstantTimeLessOrEq": true, - "ConstantTimeSelect": true, - }, - "crypto/tls": map[string]bool{ - "Certificate": true, - "CertificateRequestInfo": true, - "Client": true, - "ClientAuthType": true, - "ClientHelloInfo": true, - "ClientSessionCache": true, - "ClientSessionState": true, - "Config": true, - "Conn": true, - "ConnectionState": true, - "CurveID": true, - "CurveP256": true, - "CurveP384": true, - "CurveP521": true, - "Dial": true, - "DialWithDialer": true, - "ECDSAWithP256AndSHA256": true, - "ECDSAWithP384AndSHA384": true, - "ECDSAWithP521AndSHA512": true, - "ECDSAWithSHA1": true, - "Ed25519": true, - "Listen": true, - "LoadX509KeyPair": true, - "NewLRUClientSessionCache": true, - "NewListener": true, - "NoClientCert": true, - "PKCS1WithSHA1": true, - "PKCS1WithSHA256": true, - "PKCS1WithSHA384": true, - "PKCS1WithSHA512": true, - "PSSWithSHA256": true, - "PSSWithSHA384": true, - "PSSWithSHA512": true, - "RecordHeaderError": true, - "RenegotiateFreelyAsClient": true, - "RenegotiateNever": true, - "RenegotiateOnceAsClient": true, - "RenegotiationSupport": true, - "RequestClientCert": true, - "RequireAndVerifyClientCert": true, - "RequireAnyClientCert": true, - "Server": true, - "SignatureScheme": true, - "TLS_AES_128_GCM_SHA256": true, - "TLS_AES_256_GCM_SHA384": true, - "TLS_CHACHA20_POLY1305_SHA256": true, - "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": true, - "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": true, - "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": true, - "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": true, - "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": true, - "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": true, - "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": true, - "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": true, - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": true, - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": true, - "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": true, - "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": true, - "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": true, - "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": true, - "TLS_ECDHE_RSA_WITH_RC4_128_SHA": true, - "TLS_FALLBACK_SCSV": true, - "TLS_RSA_WITH_3DES_EDE_CBC_SHA": true, - "TLS_RSA_WITH_AES_128_CBC_SHA": true, - "TLS_RSA_WITH_AES_128_CBC_SHA256": true, - "TLS_RSA_WITH_AES_128_GCM_SHA256": true, - "TLS_RSA_WITH_AES_256_CBC_SHA": true, - "TLS_RSA_WITH_AES_256_GCM_SHA384": true, - "TLS_RSA_WITH_RC4_128_SHA": true, - "VerifyClientCertIfGiven": true, - "VersionSSL30": true, - "VersionTLS10": true, - "VersionTLS11": true, - "VersionTLS12": true, - "VersionTLS13": true, - "X25519": true, - "X509KeyPair": true, - }, - "crypto/x509": map[string]bool{ - "CANotAuthorizedForExtKeyUsage": true, - "CANotAuthorizedForThisName": true, - "CertPool": true, - "Certificate": true, - "CertificateInvalidError": true, - "CertificateRequest": true, - "ConstraintViolationError": true, - "CreateCertificate": true, - "CreateCertificateRequest": true, - "DSA": true, - "DSAWithSHA1": true, - "DSAWithSHA256": true, - "DecryptPEMBlock": true, - "ECDSA": true, - "ECDSAWithSHA1": true, - "ECDSAWithSHA256": true, - "ECDSAWithSHA384": true, - "ECDSAWithSHA512": true, - "Ed25519": true, - "EncryptPEMBlock": true, - "ErrUnsupportedAlgorithm": true, - "Expired": true, - "ExtKeyUsage": true, - "ExtKeyUsageAny": true, - "ExtKeyUsageClientAuth": true, - "ExtKeyUsageCodeSigning": true, - "ExtKeyUsageEmailProtection": true, - "ExtKeyUsageIPSECEndSystem": true, - "ExtKeyUsageIPSECTunnel": true, - "ExtKeyUsageIPSECUser": true, - "ExtKeyUsageMicrosoftCommercialCodeSigning": true, - "ExtKeyUsageMicrosoftKernelCodeSigning": true, - "ExtKeyUsageMicrosoftServerGatedCrypto": true, - "ExtKeyUsageNetscapeServerGatedCrypto": true, - "ExtKeyUsageOCSPSigning": true, - "ExtKeyUsageServerAuth": true, - "ExtKeyUsageTimeStamping": true, - "HostnameError": true, - "IncompatibleUsage": true, - "IncorrectPasswordError": true, - "InsecureAlgorithmError": true, - "InvalidReason": true, - "IsEncryptedPEMBlock": true, - "KeyUsage": true, - "KeyUsageCRLSign": true, - "KeyUsageCertSign": true, - "KeyUsageContentCommitment": true, - "KeyUsageDataEncipherment": true, - "KeyUsageDecipherOnly": true, - "KeyUsageDigitalSignature": true, - "KeyUsageEncipherOnly": true, - "KeyUsageKeyAgreement": true, - "KeyUsageKeyEncipherment": true, - "MD2WithRSA": true, - "MD5WithRSA": true, - "MarshalECPrivateKey": true, - "MarshalPKCS1PrivateKey": true, - "MarshalPKCS1PublicKey": true, - "MarshalPKCS8PrivateKey": true, - "MarshalPKIXPublicKey": true, - "NameConstraintsWithoutSANs": true, - "NameMismatch": true, - "NewCertPool": true, - "NotAuthorizedToSign": true, - "PEMCipher": true, - "PEMCipher3DES": true, - "PEMCipherAES128": true, - "PEMCipherAES192": true, - "PEMCipherAES256": true, - "PEMCipherDES": true, - "ParseCRL": true, - "ParseCertificate": true, - "ParseCertificateRequest": true, - "ParseCertificates": true, - "ParseDERCRL": true, - "ParseECPrivateKey": true, - "ParsePKCS1PrivateKey": true, - "ParsePKCS1PublicKey": true, - "ParsePKCS8PrivateKey": true, - "ParsePKIXPublicKey": true, - "PublicKeyAlgorithm": true, - "PureEd25519": true, - "RSA": true, - "SHA1WithRSA": true, - "SHA256WithRSA": true, - "SHA256WithRSAPSS": true, - "SHA384WithRSA": true, - "SHA384WithRSAPSS": true, - "SHA512WithRSA": true, - "SHA512WithRSAPSS": true, - "SignatureAlgorithm": true, - "SystemCertPool": true, - "SystemRootsError": true, - "TooManyConstraints": true, - "TooManyIntermediates": true, - "UnconstrainedName": true, - "UnhandledCriticalExtension": true, - "UnknownAuthorityError": true, - "UnknownPublicKeyAlgorithm": true, - "UnknownSignatureAlgorithm": true, - "VerifyOptions": true, - }, - "crypto/x509/pkix": map[string]bool{ - "AlgorithmIdentifier": true, - "AttributeTypeAndValue": true, - "AttributeTypeAndValueSET": true, - "CertificateList": true, - "Extension": true, - "Name": true, - "RDNSequence": true, - "RelativeDistinguishedNameSET": true, - "RevokedCertificate": true, - "TBSCertificateList": true, - }, - "database/sql": map[string]bool{ - "ColumnType": true, - "Conn": true, - "DB": true, - "DBStats": true, - "Drivers": true, - "ErrConnDone": true, - "ErrNoRows": true, - "ErrTxDone": true, - "IsolationLevel": true, - "LevelDefault": true, - "LevelLinearizable": true, - "LevelReadCommitted": true, - "LevelReadUncommitted": true, - "LevelRepeatableRead": true, - "LevelSerializable": true, - "LevelSnapshot": true, - "LevelWriteCommitted": true, - "Named": true, - "NamedArg": true, - "NullBool": true, - "NullFloat64": true, - "NullInt32": true, - "NullInt64": true, - "NullString": true, - "NullTime": true, - "Open": true, - "OpenDB": true, - "Out": true, - "RawBytes": true, - "Register": true, - "Result": true, - "Row": true, - "Rows": true, - "Scanner": true, - "Stmt": true, - "Tx": true, - "TxOptions": true, - }, - "database/sql/driver": map[string]bool{ - "Bool": true, - "ColumnConverter": true, - "Conn": true, - "ConnBeginTx": true, - "ConnPrepareContext": true, - "Connector": true, - "DefaultParameterConverter": true, - "Driver": true, - "DriverContext": true, - "ErrBadConn": true, - "ErrRemoveArgument": true, - "ErrSkip": true, - "Execer": true, - "ExecerContext": true, - "Int32": true, - "IsScanValue": true, - "IsValue": true, - "IsolationLevel": true, - "NamedValue": true, - "NamedValueChecker": true, - "NotNull": true, - "Null": true, - "Pinger": true, - "Queryer": true, - "QueryerContext": true, - "Result": true, - "ResultNoRows": true, - "Rows": true, - "RowsAffected": true, - "RowsColumnTypeDatabaseTypeName": true, - "RowsColumnTypeLength": true, - "RowsColumnTypeNullable": true, - "RowsColumnTypePrecisionScale": true, - "RowsColumnTypeScanType": true, - "RowsNextResultSet": true, - "SessionResetter": true, - "Stmt": true, - "StmtExecContext": true, - "StmtQueryContext": true, - "String": true, - "Tx": true, - "TxOptions": true, - "Value": true, - "ValueConverter": true, - "Valuer": true, - }, - "debug/dwarf": map[string]bool{ - "AddrType": true, - "ArrayType": true, - "Attr": true, - "AttrAbstractOrigin": true, - "AttrAccessibility": true, - "AttrAddrClass": true, - "AttrAllocated": true, - "AttrArtificial": true, - "AttrAssociated": true, - "AttrBaseTypes": true, - "AttrBitOffset": true, - "AttrBitSize": true, - "AttrByteSize": true, - "AttrCallColumn": true, - "AttrCallFile": true, - "AttrCallLine": true, - "AttrCalling": true, - "AttrCommonRef": true, - "AttrCompDir": true, - "AttrConstValue": true, - "AttrContainingType": true, - "AttrCount": true, - "AttrDataLocation": true, - "AttrDataMemberLoc": true, - "AttrDeclColumn": true, - "AttrDeclFile": true, - "AttrDeclLine": true, - "AttrDeclaration": true, - "AttrDefaultValue": true, - "AttrDescription": true, - "AttrDiscr": true, - "AttrDiscrList": true, - "AttrDiscrValue": true, - "AttrEncoding": true, - "AttrEntrypc": true, - "AttrExtension": true, - "AttrExternal": true, - "AttrFrameBase": true, - "AttrFriend": true, - "AttrHighpc": true, - "AttrIdentifierCase": true, - "AttrImport": true, - "AttrInline": true, - "AttrIsOptional": true, - "AttrLanguage": true, - "AttrLocation": true, - "AttrLowerBound": true, - "AttrLowpc": true, - "AttrMacroInfo": true, - "AttrName": true, - "AttrNamelistItem": true, - "AttrOrdering": true, - "AttrPriority": true, - "AttrProducer": true, - "AttrPrototyped": true, - "AttrRanges": true, - "AttrReturnAddr": true, - "AttrSegment": true, - "AttrSibling": true, - "AttrSpecification": true, - "AttrStartScope": true, - "AttrStaticLink": true, - "AttrStmtList": true, - "AttrStride": true, - "AttrStrideSize": true, - "AttrStringLength": true, - "AttrTrampoline": true, - "AttrType": true, - "AttrUpperBound": true, - "AttrUseLocation": true, - "AttrUseUTF8": true, - "AttrVarParam": true, - "AttrVirtuality": true, - "AttrVisibility": true, - "AttrVtableElemLoc": true, - "BasicType": true, - "BoolType": true, - "CharType": true, - "Class": true, - "ClassAddress": true, - "ClassBlock": true, - "ClassConstant": true, - "ClassExprLoc": true, - "ClassFlag": true, - "ClassLinePtr": true, - "ClassLocListPtr": true, - "ClassMacPtr": true, - "ClassRangeListPtr": true, - "ClassReference": true, - "ClassReferenceAlt": true, - "ClassReferenceSig": true, - "ClassString": true, - "ClassStringAlt": true, - "ClassUnknown": true, - "CommonType": true, - "ComplexType": true, - "Data": true, - "DecodeError": true, - "DotDotDotType": true, - "Entry": true, - "EnumType": true, - "EnumValue": true, - "ErrUnknownPC": true, - "Field": true, - "FloatType": true, - "FuncType": true, - "IntType": true, - "LineEntry": true, - "LineFile": true, - "LineReader": true, - "LineReaderPos": true, - "New": true, - "Offset": true, - "PtrType": true, - "QualType": true, - "Reader": true, - "StructField": true, - "StructType": true, - "Tag": true, - "TagAccessDeclaration": true, - "TagArrayType": true, - "TagBaseType": true, - "TagCatchDwarfBlock": true, - "TagClassType": true, - "TagCommonDwarfBlock": true, - "TagCommonInclusion": true, - "TagCompileUnit": true, - "TagCondition": true, - "TagConstType": true, - "TagConstant": true, - "TagDwarfProcedure": true, - "TagEntryPoint": true, - "TagEnumerationType": true, - "TagEnumerator": true, - "TagFileType": true, - "TagFormalParameter": true, - "TagFriend": true, - "TagImportedDeclaration": true, - "TagImportedModule": true, - "TagImportedUnit": true, - "TagInheritance": true, - "TagInlinedSubroutine": true, - "TagInterfaceType": true, - "TagLabel": true, - "TagLexDwarfBlock": true, - "TagMember": true, - "TagModule": true, - "TagMutableType": true, - "TagNamelist": true, - "TagNamelistItem": true, - "TagNamespace": true, - "TagPackedType": true, - "TagPartialUnit": true, - "TagPointerType": true, - "TagPtrToMemberType": true, - "TagReferenceType": true, - "TagRestrictType": true, - "TagRvalueReferenceType": true, - "TagSetType": true, - "TagSharedType": true, - "TagStringType": true, - "TagStructType": true, - "TagSubprogram": true, - "TagSubrangeType": true, - "TagSubroutineType": true, - "TagTemplateAlias": true, - "TagTemplateTypeParameter": true, - "TagTemplateValueParameter": true, - "TagThrownType": true, - "TagTryDwarfBlock": true, - "TagTypeUnit": true, - "TagTypedef": true, - "TagUnionType": true, - "TagUnspecifiedParameters": true, - "TagUnspecifiedType": true, - "TagVariable": true, - "TagVariant": true, - "TagVariantPart": true, - "TagVolatileType": true, - "TagWithStmt": true, - "Type": true, - "TypedefType": true, - "UcharType": true, - "UintType": true, - "UnspecifiedType": true, - "UnsupportedType": true, - "VoidType": true, - }, - "debug/elf": map[string]bool{ - "ARM_MAGIC_TRAMP_NUMBER": true, - "COMPRESS_HIOS": true, - "COMPRESS_HIPROC": true, - "COMPRESS_LOOS": true, - "COMPRESS_LOPROC": true, - "COMPRESS_ZLIB": true, - "Chdr32": true, - "Chdr64": true, - "Class": true, - "CompressionType": true, - "DF_BIND_NOW": true, - "DF_ORIGIN": true, - "DF_STATIC_TLS": true, - "DF_SYMBOLIC": true, - "DF_TEXTREL": true, - "DT_BIND_NOW": true, - "DT_DEBUG": true, - "DT_ENCODING": true, - "DT_FINI": true, - "DT_FINI_ARRAY": true, - "DT_FINI_ARRAYSZ": true, - "DT_FLAGS": true, - "DT_HASH": true, - "DT_HIOS": true, - "DT_HIPROC": true, - "DT_INIT": true, - "DT_INIT_ARRAY": true, - "DT_INIT_ARRAYSZ": true, - "DT_JMPREL": true, - "DT_LOOS": true, - "DT_LOPROC": true, - "DT_NEEDED": true, - "DT_NULL": true, - "DT_PLTGOT": true, - "DT_PLTREL": true, - "DT_PLTRELSZ": true, - "DT_PREINIT_ARRAY": true, - "DT_PREINIT_ARRAYSZ": true, - "DT_REL": true, - "DT_RELA": true, - "DT_RELAENT": true, - "DT_RELASZ": true, - "DT_RELENT": true, - "DT_RELSZ": true, - "DT_RPATH": true, - "DT_RUNPATH": true, - "DT_SONAME": true, - "DT_STRSZ": true, - "DT_STRTAB": true, - "DT_SYMBOLIC": true, - "DT_SYMENT": true, - "DT_SYMTAB": true, - "DT_TEXTREL": true, - "DT_VERNEED": true, - "DT_VERNEEDNUM": true, - "DT_VERSYM": true, - "Data": true, - "Dyn32": true, - "Dyn64": true, - "DynFlag": true, - "DynTag": true, - "EI_ABIVERSION": true, - "EI_CLASS": true, - "EI_DATA": true, - "EI_NIDENT": true, - "EI_OSABI": true, - "EI_PAD": true, - "EI_VERSION": true, - "ELFCLASS32": true, - "ELFCLASS64": true, - "ELFCLASSNONE": true, - "ELFDATA2LSB": true, - "ELFDATA2MSB": true, - "ELFDATANONE": true, - "ELFMAG": true, - "ELFOSABI_86OPEN": true, - "ELFOSABI_AIX": true, - "ELFOSABI_ARM": true, - "ELFOSABI_AROS": true, - "ELFOSABI_CLOUDABI": true, - "ELFOSABI_FENIXOS": true, - "ELFOSABI_FREEBSD": true, - "ELFOSABI_HPUX": true, - "ELFOSABI_HURD": true, - "ELFOSABI_IRIX": true, - "ELFOSABI_LINUX": true, - "ELFOSABI_MODESTO": true, - "ELFOSABI_NETBSD": true, - "ELFOSABI_NONE": true, - "ELFOSABI_NSK": true, - "ELFOSABI_OPENBSD": true, - "ELFOSABI_OPENVMS": true, - "ELFOSABI_SOLARIS": true, - "ELFOSABI_STANDALONE": true, - "ELFOSABI_TRU64": true, - "EM_386": true, - "EM_486": true, - "EM_56800EX": true, - "EM_68HC05": true, - "EM_68HC08": true, - "EM_68HC11": true, - "EM_68HC12": true, - "EM_68HC16": true, - "EM_68K": true, - "EM_78KOR": true, - "EM_8051": true, - "EM_860": true, - "EM_88K": true, - "EM_960": true, - "EM_AARCH64": true, - "EM_ALPHA": true, - "EM_ALPHA_STD": true, - "EM_ALTERA_NIOS2": true, - "EM_AMDGPU": true, - "EM_ARC": true, - "EM_ARCA": true, - "EM_ARC_COMPACT": true, - "EM_ARC_COMPACT2": true, - "EM_ARM": true, - "EM_AVR": true, - "EM_AVR32": true, - "EM_BA1": true, - "EM_BA2": true, - "EM_BLACKFIN": true, - "EM_BPF": true, - "EM_C166": true, - "EM_CDP": true, - "EM_CE": true, - "EM_CLOUDSHIELD": true, - "EM_COGE": true, - "EM_COLDFIRE": true, - "EM_COOL": true, - "EM_COREA_1ST": true, - "EM_COREA_2ND": true, - "EM_CR": true, - "EM_CR16": true, - "EM_CRAYNV2": true, - "EM_CRIS": true, - "EM_CRX": true, - "EM_CSR_KALIMBA": true, - "EM_CUDA": true, - "EM_CYPRESS_M8C": true, - "EM_D10V": true, - "EM_D30V": true, - "EM_DSP24": true, - "EM_DSPIC30F": true, - "EM_DXP": true, - "EM_ECOG1": true, - "EM_ECOG16": true, - "EM_ECOG1X": true, - "EM_ECOG2": true, - "EM_ETPU": true, - "EM_EXCESS": true, - "EM_F2MC16": true, - "EM_FIREPATH": true, - "EM_FR20": true, - "EM_FR30": true, - "EM_FT32": true, - "EM_FX66": true, - "EM_H8S": true, - "EM_H8_300": true, - "EM_H8_300H": true, - "EM_H8_500": true, - "EM_HUANY": true, - "EM_IA_64": true, - "EM_INTEL205": true, - "EM_INTEL206": true, - "EM_INTEL207": true, - "EM_INTEL208": true, - "EM_INTEL209": true, - "EM_IP2K": true, - "EM_JAVELIN": true, - "EM_K10M": true, - "EM_KM32": true, - "EM_KMX16": true, - "EM_KMX32": true, - "EM_KMX8": true, - "EM_KVARC": true, - "EM_L10M": true, - "EM_LANAI": true, - "EM_LATTICEMICO32": true, - "EM_M16C": true, - "EM_M32": true, - "EM_M32C": true, - "EM_M32R": true, - "EM_MANIK": true, - "EM_MAX": true, - "EM_MAXQ30": true, - "EM_MCHP_PIC": true, - "EM_MCST_ELBRUS": true, - "EM_ME16": true, - "EM_METAG": true, - "EM_MICROBLAZE": true, - "EM_MIPS": true, - "EM_MIPS_RS3_LE": true, - "EM_MIPS_RS4_BE": true, - "EM_MIPS_X": true, - "EM_MMA": true, - "EM_MMDSP_PLUS": true, - "EM_MMIX": true, - "EM_MN10200": true, - "EM_MN10300": true, - "EM_MOXIE": true, - "EM_MSP430": true, - "EM_NCPU": true, - "EM_NDR1": true, - "EM_NDS32": true, - "EM_NONE": true, - "EM_NORC": true, - "EM_NS32K": true, - "EM_OPEN8": true, - "EM_OPENRISC": true, - "EM_PARISC": true, - "EM_PCP": true, - "EM_PDP10": true, - "EM_PDP11": true, - "EM_PDSP": true, - "EM_PJ": true, - "EM_PPC": true, - "EM_PPC64": true, - "EM_PRISM": true, - "EM_QDSP6": true, - "EM_R32C": true, - "EM_RCE": true, - "EM_RH32": true, - "EM_RISCV": true, - "EM_RL78": true, - "EM_RS08": true, - "EM_RX": true, - "EM_S370": true, - "EM_S390": true, - "EM_SCORE7": true, - "EM_SEP": true, - "EM_SE_C17": true, - "EM_SE_C33": true, - "EM_SH": true, - "EM_SHARC": true, - "EM_SLE9X": true, - "EM_SNP1K": true, - "EM_SPARC": true, - "EM_SPARC32PLUS": true, - "EM_SPARCV9": true, - "EM_ST100": true, - "EM_ST19": true, - "EM_ST200": true, - "EM_ST7": true, - "EM_ST9PLUS": true, - "EM_STARCORE": true, - "EM_STM8": true, - "EM_STXP7X": true, - "EM_SVX": true, - "EM_TILE64": true, - "EM_TILEGX": true, - "EM_TILEPRO": true, - "EM_TINYJ": true, - "EM_TI_ARP32": true, - "EM_TI_C2000": true, - "EM_TI_C5500": true, - "EM_TI_C6000": true, - "EM_TI_PRU": true, - "EM_TMM_GPP": true, - "EM_TPC": true, - "EM_TRICORE": true, - "EM_TRIMEDIA": true, - "EM_TSK3000": true, - "EM_UNICORE": true, - "EM_V800": true, - "EM_V850": true, - "EM_VAX": true, - "EM_VIDEOCORE": true, - "EM_VIDEOCORE3": true, - "EM_VIDEOCORE5": true, - "EM_VISIUM": true, - "EM_VPP500": true, - "EM_X86_64": true, - "EM_XCORE": true, - "EM_XGATE": true, - "EM_XIMO16": true, - "EM_XTENSA": true, - "EM_Z80": true, - "EM_ZSP": true, - "ET_CORE": true, - "ET_DYN": true, - "ET_EXEC": true, - "ET_HIOS": true, - "ET_HIPROC": true, - "ET_LOOS": true, - "ET_LOPROC": true, - "ET_NONE": true, - "ET_REL": true, - "EV_CURRENT": true, - "EV_NONE": true, - "ErrNoSymbols": true, - "File": true, - "FileHeader": true, - "FormatError": true, - "Header32": true, - "Header64": true, - "ImportedSymbol": true, - "Machine": true, - "NT_FPREGSET": true, - "NT_PRPSINFO": true, - "NT_PRSTATUS": true, - "NType": true, - "NewFile": true, - "OSABI": true, - "Open": true, - "PF_MASKOS": true, - "PF_MASKPROC": true, - "PF_R": true, - "PF_W": true, - "PF_X": true, - "PT_DYNAMIC": true, - "PT_HIOS": true, - "PT_HIPROC": true, - "PT_INTERP": true, - "PT_LOAD": true, - "PT_LOOS": true, - "PT_LOPROC": true, - "PT_NOTE": true, - "PT_NULL": true, - "PT_PHDR": true, - "PT_SHLIB": true, - "PT_TLS": true, - "Prog": true, - "Prog32": true, - "Prog64": true, - "ProgFlag": true, - "ProgHeader": true, - "ProgType": true, - "R_386": true, - "R_386_16": true, - "R_386_32": true, - "R_386_32PLT": true, - "R_386_8": true, - "R_386_COPY": true, - "R_386_GLOB_DAT": true, - "R_386_GOT32": true, - "R_386_GOT32X": true, - "R_386_GOTOFF": true, - "R_386_GOTPC": true, - "R_386_IRELATIVE": true, - "R_386_JMP_SLOT": true, - "R_386_NONE": true, - "R_386_PC16": true, - "R_386_PC32": true, - "R_386_PC8": true, - "R_386_PLT32": true, - "R_386_RELATIVE": true, - "R_386_SIZE32": true, - "R_386_TLS_DESC": true, - "R_386_TLS_DESC_CALL": true, - "R_386_TLS_DTPMOD32": true, - "R_386_TLS_DTPOFF32": true, - "R_386_TLS_GD": true, - "R_386_TLS_GD_32": true, - "R_386_TLS_GD_CALL": true, - "R_386_TLS_GD_POP": true, - "R_386_TLS_GD_PUSH": true, - "R_386_TLS_GOTDESC": true, - "R_386_TLS_GOTIE": true, - "R_386_TLS_IE": true, - "R_386_TLS_IE_32": true, - "R_386_TLS_LDM": true, - "R_386_TLS_LDM_32": true, - "R_386_TLS_LDM_CALL": true, - "R_386_TLS_LDM_POP": true, - "R_386_TLS_LDM_PUSH": true, - "R_386_TLS_LDO_32": true, - "R_386_TLS_LE": true, - "R_386_TLS_LE_32": true, - "R_386_TLS_TPOFF": true, - "R_386_TLS_TPOFF32": true, - "R_390": true, - "R_390_12": true, - "R_390_16": true, - "R_390_20": true, - "R_390_32": true, - "R_390_64": true, - "R_390_8": true, - "R_390_COPY": true, - "R_390_GLOB_DAT": true, - "R_390_GOT12": true, - "R_390_GOT16": true, - "R_390_GOT20": true, - "R_390_GOT32": true, - "R_390_GOT64": true, - "R_390_GOTENT": true, - "R_390_GOTOFF": true, - "R_390_GOTOFF16": true, - "R_390_GOTOFF64": true, - "R_390_GOTPC": true, - "R_390_GOTPCDBL": true, - "R_390_GOTPLT12": true, - "R_390_GOTPLT16": true, - "R_390_GOTPLT20": true, - "R_390_GOTPLT32": true, - "R_390_GOTPLT64": true, - "R_390_GOTPLTENT": true, - "R_390_GOTPLTOFF16": true, - "R_390_GOTPLTOFF32": true, - "R_390_GOTPLTOFF64": true, - "R_390_JMP_SLOT": true, - "R_390_NONE": true, - "R_390_PC16": true, - "R_390_PC16DBL": true, - "R_390_PC32": true, - "R_390_PC32DBL": true, - "R_390_PC64": true, - "R_390_PLT16DBL": true, - "R_390_PLT32": true, - "R_390_PLT32DBL": true, - "R_390_PLT64": true, - "R_390_RELATIVE": true, - "R_390_TLS_DTPMOD": true, - "R_390_TLS_DTPOFF": true, - "R_390_TLS_GD32": true, - "R_390_TLS_GD64": true, - "R_390_TLS_GDCALL": true, - "R_390_TLS_GOTIE12": true, - "R_390_TLS_GOTIE20": true, - "R_390_TLS_GOTIE32": true, - "R_390_TLS_GOTIE64": true, - "R_390_TLS_IE32": true, - "R_390_TLS_IE64": true, - "R_390_TLS_IEENT": true, - "R_390_TLS_LDCALL": true, - "R_390_TLS_LDM32": true, - "R_390_TLS_LDM64": true, - "R_390_TLS_LDO32": true, - "R_390_TLS_LDO64": true, - "R_390_TLS_LE32": true, - "R_390_TLS_LE64": true, - "R_390_TLS_LOAD": true, - "R_390_TLS_TPOFF": true, - "R_AARCH64": true, - "R_AARCH64_ABS16": true, - "R_AARCH64_ABS32": true, - "R_AARCH64_ABS64": true, - "R_AARCH64_ADD_ABS_LO12_NC": true, - "R_AARCH64_ADR_GOT_PAGE": true, - "R_AARCH64_ADR_PREL_LO21": true, - "R_AARCH64_ADR_PREL_PG_HI21": true, - "R_AARCH64_ADR_PREL_PG_HI21_NC": true, - "R_AARCH64_CALL26": true, - "R_AARCH64_CONDBR19": true, - "R_AARCH64_COPY": true, - "R_AARCH64_GLOB_DAT": true, - "R_AARCH64_GOT_LD_PREL19": true, - "R_AARCH64_IRELATIVE": true, - "R_AARCH64_JUMP26": true, - "R_AARCH64_JUMP_SLOT": true, - "R_AARCH64_LD64_GOTOFF_LO15": true, - "R_AARCH64_LD64_GOTPAGE_LO15": true, - "R_AARCH64_LD64_GOT_LO12_NC": true, - "R_AARCH64_LDST128_ABS_LO12_NC": true, - "R_AARCH64_LDST16_ABS_LO12_NC": true, - "R_AARCH64_LDST32_ABS_LO12_NC": true, - "R_AARCH64_LDST64_ABS_LO12_NC": true, - "R_AARCH64_LDST8_ABS_LO12_NC": true, - "R_AARCH64_LD_PREL_LO19": true, - "R_AARCH64_MOVW_SABS_G0": true, - "R_AARCH64_MOVW_SABS_G1": true, - "R_AARCH64_MOVW_SABS_G2": true, - "R_AARCH64_MOVW_UABS_G0": true, - "R_AARCH64_MOVW_UABS_G0_NC": true, - "R_AARCH64_MOVW_UABS_G1": true, - "R_AARCH64_MOVW_UABS_G1_NC": true, - "R_AARCH64_MOVW_UABS_G2": true, - "R_AARCH64_MOVW_UABS_G2_NC": true, - "R_AARCH64_MOVW_UABS_G3": true, - "R_AARCH64_NONE": true, - "R_AARCH64_NULL": true, - "R_AARCH64_P32_ABS16": true, - "R_AARCH64_P32_ABS32": true, - "R_AARCH64_P32_ADD_ABS_LO12_NC": true, - "R_AARCH64_P32_ADR_GOT_PAGE": true, - "R_AARCH64_P32_ADR_PREL_LO21": true, - "R_AARCH64_P32_ADR_PREL_PG_HI21": true, - "R_AARCH64_P32_CALL26": true, - "R_AARCH64_P32_CONDBR19": true, - "R_AARCH64_P32_COPY": true, - "R_AARCH64_P32_GLOB_DAT": true, - "R_AARCH64_P32_GOT_LD_PREL19": true, - "R_AARCH64_P32_IRELATIVE": true, - "R_AARCH64_P32_JUMP26": true, - "R_AARCH64_P32_JUMP_SLOT": true, - "R_AARCH64_P32_LD32_GOT_LO12_NC": true, - "R_AARCH64_P32_LDST128_ABS_LO12_NC": true, - "R_AARCH64_P32_LDST16_ABS_LO12_NC": true, - "R_AARCH64_P32_LDST32_ABS_LO12_NC": true, - "R_AARCH64_P32_LDST64_ABS_LO12_NC": true, - "R_AARCH64_P32_LDST8_ABS_LO12_NC": true, - "R_AARCH64_P32_LD_PREL_LO19": true, - "R_AARCH64_P32_MOVW_SABS_G0": true, - "R_AARCH64_P32_MOVW_UABS_G0": true, - "R_AARCH64_P32_MOVW_UABS_G0_NC": true, - "R_AARCH64_P32_MOVW_UABS_G1": true, - "R_AARCH64_P32_PREL16": true, - "R_AARCH64_P32_PREL32": true, - "R_AARCH64_P32_RELATIVE": true, - "R_AARCH64_P32_TLSDESC": true, - "R_AARCH64_P32_TLSDESC_ADD_LO12_NC": true, - "R_AARCH64_P32_TLSDESC_ADR_PAGE21": true, - "R_AARCH64_P32_TLSDESC_ADR_PREL21": true, - "R_AARCH64_P32_TLSDESC_CALL": true, - "R_AARCH64_P32_TLSDESC_LD32_LO12_NC": true, - "R_AARCH64_P32_TLSDESC_LD_PREL19": true, - "R_AARCH64_P32_TLSGD_ADD_LO12_NC": true, - "R_AARCH64_P32_TLSGD_ADR_PAGE21": true, - "R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21": true, - "R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC": true, - "R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19": true, - "R_AARCH64_P32_TLSLE_ADD_TPREL_HI12": true, - "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12": true, - "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC": true, - "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0": true, - "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC": true, - "R_AARCH64_P32_TLSLE_MOVW_TPREL_G1": true, - "R_AARCH64_P32_TLS_DTPMOD": true, - "R_AARCH64_P32_TLS_DTPREL": true, - "R_AARCH64_P32_TLS_TPREL": true, - "R_AARCH64_P32_TSTBR14": true, - "R_AARCH64_PREL16": true, - "R_AARCH64_PREL32": true, - "R_AARCH64_PREL64": true, - "R_AARCH64_RELATIVE": true, - "R_AARCH64_TLSDESC": true, - "R_AARCH64_TLSDESC_ADD": true, - "R_AARCH64_TLSDESC_ADD_LO12_NC": true, - "R_AARCH64_TLSDESC_ADR_PAGE21": true, - "R_AARCH64_TLSDESC_ADR_PREL21": true, - "R_AARCH64_TLSDESC_CALL": true, - "R_AARCH64_TLSDESC_LD64_LO12_NC": true, - "R_AARCH64_TLSDESC_LDR": true, - "R_AARCH64_TLSDESC_LD_PREL19": true, - "R_AARCH64_TLSDESC_OFF_G0_NC": true, - "R_AARCH64_TLSDESC_OFF_G1": true, - "R_AARCH64_TLSGD_ADD_LO12_NC": true, - "R_AARCH64_TLSGD_ADR_PAGE21": true, - "R_AARCH64_TLSGD_ADR_PREL21": true, - "R_AARCH64_TLSGD_MOVW_G0_NC": true, - "R_AARCH64_TLSGD_MOVW_G1": true, - "R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21": true, - "R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC": true, - "R_AARCH64_TLSIE_LD_GOTTPREL_PREL19": true, - "R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC": true, - "R_AARCH64_TLSIE_MOVW_GOTTPREL_G1": true, - "R_AARCH64_TLSLD_ADR_PAGE21": true, - "R_AARCH64_TLSLD_ADR_PREL21": true, - "R_AARCH64_TLSLD_LDST128_DTPREL_LO12": true, - "R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC": true, - "R_AARCH64_TLSLE_ADD_TPREL_HI12": true, - "R_AARCH64_TLSLE_ADD_TPREL_LO12": true, - "R_AARCH64_TLSLE_ADD_TPREL_LO12_NC": true, - "R_AARCH64_TLSLE_LDST128_TPREL_LO12": true, - "R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC": true, - "R_AARCH64_TLSLE_MOVW_TPREL_G0": true, - "R_AARCH64_TLSLE_MOVW_TPREL_G0_NC": true, - "R_AARCH64_TLSLE_MOVW_TPREL_G1": true, - "R_AARCH64_TLSLE_MOVW_TPREL_G1_NC": true, - "R_AARCH64_TLSLE_MOVW_TPREL_G2": true, - "R_AARCH64_TLS_DTPMOD64": true, - "R_AARCH64_TLS_DTPREL64": true, - "R_AARCH64_TLS_TPREL64": true, - "R_AARCH64_TSTBR14": true, - "R_ALPHA": true, - "R_ALPHA_BRADDR": true, - "R_ALPHA_COPY": true, - "R_ALPHA_GLOB_DAT": true, - "R_ALPHA_GPDISP": true, - "R_ALPHA_GPREL32": true, - "R_ALPHA_GPRELHIGH": true, - "R_ALPHA_GPRELLOW": true, - "R_ALPHA_GPVALUE": true, - "R_ALPHA_HINT": true, - "R_ALPHA_IMMED_BR_HI32": true, - "R_ALPHA_IMMED_GP_16": true, - "R_ALPHA_IMMED_GP_HI32": true, - "R_ALPHA_IMMED_LO32": true, - "R_ALPHA_IMMED_SCN_HI32": true, - "R_ALPHA_JMP_SLOT": true, - "R_ALPHA_LITERAL": true, - "R_ALPHA_LITUSE": true, - "R_ALPHA_NONE": true, - "R_ALPHA_OP_PRSHIFT": true, - "R_ALPHA_OP_PSUB": true, - "R_ALPHA_OP_PUSH": true, - "R_ALPHA_OP_STORE": true, - "R_ALPHA_REFLONG": true, - "R_ALPHA_REFQUAD": true, - "R_ALPHA_RELATIVE": true, - "R_ALPHA_SREL16": true, - "R_ALPHA_SREL32": true, - "R_ALPHA_SREL64": true, - "R_ARM": true, - "R_ARM_ABS12": true, - "R_ARM_ABS16": true, - "R_ARM_ABS32": true, - "R_ARM_ABS32_NOI": true, - "R_ARM_ABS8": true, - "R_ARM_ALU_PCREL_15_8": true, - "R_ARM_ALU_PCREL_23_15": true, - "R_ARM_ALU_PCREL_7_0": true, - "R_ARM_ALU_PC_G0": true, - "R_ARM_ALU_PC_G0_NC": true, - "R_ARM_ALU_PC_G1": true, - "R_ARM_ALU_PC_G1_NC": true, - "R_ARM_ALU_PC_G2": true, - "R_ARM_ALU_SBREL_19_12_NC": true, - "R_ARM_ALU_SBREL_27_20_CK": true, - "R_ARM_ALU_SB_G0": true, - "R_ARM_ALU_SB_G0_NC": true, - "R_ARM_ALU_SB_G1": true, - "R_ARM_ALU_SB_G1_NC": true, - "R_ARM_ALU_SB_G2": true, - "R_ARM_AMP_VCALL9": true, - "R_ARM_BASE_ABS": true, - "R_ARM_CALL": true, - "R_ARM_COPY": true, - "R_ARM_GLOB_DAT": true, - "R_ARM_GNU_VTENTRY": true, - "R_ARM_GNU_VTINHERIT": true, - "R_ARM_GOT32": true, - "R_ARM_GOTOFF": true, - "R_ARM_GOTOFF12": true, - "R_ARM_GOTPC": true, - "R_ARM_GOTRELAX": true, - "R_ARM_GOT_ABS": true, - "R_ARM_GOT_BREL12": true, - "R_ARM_GOT_PREL": true, - "R_ARM_IRELATIVE": true, - "R_ARM_JUMP24": true, - "R_ARM_JUMP_SLOT": true, - "R_ARM_LDC_PC_G0": true, - "R_ARM_LDC_PC_G1": true, - "R_ARM_LDC_PC_G2": true, - "R_ARM_LDC_SB_G0": true, - "R_ARM_LDC_SB_G1": true, - "R_ARM_LDC_SB_G2": true, - "R_ARM_LDRS_PC_G0": true, - "R_ARM_LDRS_PC_G1": true, - "R_ARM_LDRS_PC_G2": true, - "R_ARM_LDRS_SB_G0": true, - "R_ARM_LDRS_SB_G1": true, - "R_ARM_LDRS_SB_G2": true, - "R_ARM_LDR_PC_G1": true, - "R_ARM_LDR_PC_G2": true, - "R_ARM_LDR_SBREL_11_10_NC": true, - "R_ARM_LDR_SB_G0": true, - "R_ARM_LDR_SB_G1": true, - "R_ARM_LDR_SB_G2": true, - "R_ARM_ME_TOO": true, - "R_ARM_MOVT_ABS": true, - "R_ARM_MOVT_BREL": true, - "R_ARM_MOVT_PREL": true, - "R_ARM_MOVW_ABS_NC": true, - "R_ARM_MOVW_BREL": true, - "R_ARM_MOVW_BREL_NC": true, - "R_ARM_MOVW_PREL_NC": true, - "R_ARM_NONE": true, - "R_ARM_PC13": true, - "R_ARM_PC24": true, - "R_ARM_PLT32": true, - "R_ARM_PLT32_ABS": true, - "R_ARM_PREL31": true, - "R_ARM_PRIVATE_0": true, - "R_ARM_PRIVATE_1": true, - "R_ARM_PRIVATE_10": true, - "R_ARM_PRIVATE_11": true, - "R_ARM_PRIVATE_12": true, - "R_ARM_PRIVATE_13": true, - "R_ARM_PRIVATE_14": true, - "R_ARM_PRIVATE_15": true, - "R_ARM_PRIVATE_2": true, - "R_ARM_PRIVATE_3": true, - "R_ARM_PRIVATE_4": true, - "R_ARM_PRIVATE_5": true, - "R_ARM_PRIVATE_6": true, - "R_ARM_PRIVATE_7": true, - "R_ARM_PRIVATE_8": true, - "R_ARM_PRIVATE_9": true, - "R_ARM_RABS32": true, - "R_ARM_RBASE": true, - "R_ARM_REL32": true, - "R_ARM_REL32_NOI": true, - "R_ARM_RELATIVE": true, - "R_ARM_RPC24": true, - "R_ARM_RREL32": true, - "R_ARM_RSBREL32": true, - "R_ARM_RXPC25": true, - "R_ARM_SBREL31": true, - "R_ARM_SBREL32": true, - "R_ARM_SWI24": true, - "R_ARM_TARGET1": true, - "R_ARM_TARGET2": true, - "R_ARM_THM_ABS5": true, - "R_ARM_THM_ALU_ABS_G0_NC": true, - "R_ARM_THM_ALU_ABS_G1_NC": true, - "R_ARM_THM_ALU_ABS_G2_NC": true, - "R_ARM_THM_ALU_ABS_G3": true, - "R_ARM_THM_ALU_PREL_11_0": true, - "R_ARM_THM_GOT_BREL12": true, - "R_ARM_THM_JUMP11": true, - "R_ARM_THM_JUMP19": true, - "R_ARM_THM_JUMP24": true, - "R_ARM_THM_JUMP6": true, - "R_ARM_THM_JUMP8": true, - "R_ARM_THM_MOVT_ABS": true, - "R_ARM_THM_MOVT_BREL": true, - "R_ARM_THM_MOVT_PREL": true, - "R_ARM_THM_MOVW_ABS_NC": true, - "R_ARM_THM_MOVW_BREL": true, - "R_ARM_THM_MOVW_BREL_NC": true, - "R_ARM_THM_MOVW_PREL_NC": true, - "R_ARM_THM_PC12": true, - "R_ARM_THM_PC22": true, - "R_ARM_THM_PC8": true, - "R_ARM_THM_RPC22": true, - "R_ARM_THM_SWI8": true, - "R_ARM_THM_TLS_CALL": true, - "R_ARM_THM_TLS_DESCSEQ16": true, - "R_ARM_THM_TLS_DESCSEQ32": true, - "R_ARM_THM_XPC22": true, - "R_ARM_TLS_CALL": true, - "R_ARM_TLS_DESCSEQ": true, - "R_ARM_TLS_DTPMOD32": true, - "R_ARM_TLS_DTPOFF32": true, - "R_ARM_TLS_GD32": true, - "R_ARM_TLS_GOTDESC": true, - "R_ARM_TLS_IE12GP": true, - "R_ARM_TLS_IE32": true, - "R_ARM_TLS_LDM32": true, - "R_ARM_TLS_LDO12": true, - "R_ARM_TLS_LDO32": true, - "R_ARM_TLS_LE12": true, - "R_ARM_TLS_LE32": true, - "R_ARM_TLS_TPOFF32": true, - "R_ARM_V4BX": true, - "R_ARM_XPC25": true, - "R_INFO": true, - "R_INFO32": true, - "R_MIPS": true, - "R_MIPS_16": true, - "R_MIPS_26": true, - "R_MIPS_32": true, - "R_MIPS_64": true, - "R_MIPS_ADD_IMMEDIATE": true, - "R_MIPS_CALL16": true, - "R_MIPS_CALL_HI16": true, - "R_MIPS_CALL_LO16": true, - "R_MIPS_DELETE": true, - "R_MIPS_GOT16": true, - "R_MIPS_GOT_DISP": true, - "R_MIPS_GOT_HI16": true, - "R_MIPS_GOT_LO16": true, - "R_MIPS_GOT_OFST": true, - "R_MIPS_GOT_PAGE": true, - "R_MIPS_GPREL16": true, - "R_MIPS_GPREL32": true, - "R_MIPS_HI16": true, - "R_MIPS_HIGHER": true, - "R_MIPS_HIGHEST": true, - "R_MIPS_INSERT_A": true, - "R_MIPS_INSERT_B": true, - "R_MIPS_JALR": true, - "R_MIPS_LITERAL": true, - "R_MIPS_LO16": true, - "R_MIPS_NONE": true, - "R_MIPS_PC16": true, - "R_MIPS_PJUMP": true, - "R_MIPS_REL16": true, - "R_MIPS_REL32": true, - "R_MIPS_RELGOT": true, - "R_MIPS_SCN_DISP": true, - "R_MIPS_SHIFT5": true, - "R_MIPS_SHIFT6": true, - "R_MIPS_SUB": true, - "R_MIPS_TLS_DTPMOD32": true, - "R_MIPS_TLS_DTPMOD64": true, - "R_MIPS_TLS_DTPREL32": true, - "R_MIPS_TLS_DTPREL64": true, - "R_MIPS_TLS_DTPREL_HI16": true, - "R_MIPS_TLS_DTPREL_LO16": true, - "R_MIPS_TLS_GD": true, - "R_MIPS_TLS_GOTTPREL": true, - "R_MIPS_TLS_LDM": true, - "R_MIPS_TLS_TPREL32": true, - "R_MIPS_TLS_TPREL64": true, - "R_MIPS_TLS_TPREL_HI16": true, - "R_MIPS_TLS_TPREL_LO16": true, - "R_PPC": true, - "R_PPC64": true, - "R_PPC64_ADDR14": true, - "R_PPC64_ADDR14_BRNTAKEN": true, - "R_PPC64_ADDR14_BRTAKEN": true, - "R_PPC64_ADDR16": true, - "R_PPC64_ADDR16_DS": true, - "R_PPC64_ADDR16_HA": true, - "R_PPC64_ADDR16_HI": true, - "R_PPC64_ADDR16_HIGH": true, - "R_PPC64_ADDR16_HIGHA": true, - "R_PPC64_ADDR16_HIGHER": true, - "R_PPC64_ADDR16_HIGHERA": true, - "R_PPC64_ADDR16_HIGHEST": true, - "R_PPC64_ADDR16_HIGHESTA": true, - "R_PPC64_ADDR16_LO": true, - "R_PPC64_ADDR16_LO_DS": true, - "R_PPC64_ADDR24": true, - "R_PPC64_ADDR32": true, - "R_PPC64_ADDR64": true, - "R_PPC64_ADDR64_LOCAL": true, - "R_PPC64_DTPMOD64": true, - "R_PPC64_DTPREL16": true, - "R_PPC64_DTPREL16_DS": true, - "R_PPC64_DTPREL16_HA": true, - "R_PPC64_DTPREL16_HI": true, - "R_PPC64_DTPREL16_HIGH": true, - "R_PPC64_DTPREL16_HIGHA": true, - "R_PPC64_DTPREL16_HIGHER": true, - "R_PPC64_DTPREL16_HIGHERA": true, - "R_PPC64_DTPREL16_HIGHEST": true, - "R_PPC64_DTPREL16_HIGHESTA": true, - "R_PPC64_DTPREL16_LO": true, - "R_PPC64_DTPREL16_LO_DS": true, - "R_PPC64_DTPREL64": true, - "R_PPC64_ENTRY": true, - "R_PPC64_GOT16": true, - "R_PPC64_GOT16_DS": true, - "R_PPC64_GOT16_HA": true, - "R_PPC64_GOT16_HI": true, - "R_PPC64_GOT16_LO": true, - "R_PPC64_GOT16_LO_DS": true, - "R_PPC64_GOT_DTPREL16_DS": true, - "R_PPC64_GOT_DTPREL16_HA": true, - "R_PPC64_GOT_DTPREL16_HI": true, - "R_PPC64_GOT_DTPREL16_LO_DS": true, - "R_PPC64_GOT_TLSGD16": true, - "R_PPC64_GOT_TLSGD16_HA": true, - "R_PPC64_GOT_TLSGD16_HI": true, - "R_PPC64_GOT_TLSGD16_LO": true, - "R_PPC64_GOT_TLSLD16": true, - "R_PPC64_GOT_TLSLD16_HA": true, - "R_PPC64_GOT_TLSLD16_HI": true, - "R_PPC64_GOT_TLSLD16_LO": true, - "R_PPC64_GOT_TPREL16_DS": true, - "R_PPC64_GOT_TPREL16_HA": true, - "R_PPC64_GOT_TPREL16_HI": true, - "R_PPC64_GOT_TPREL16_LO_DS": true, - "R_PPC64_IRELATIVE": true, - "R_PPC64_JMP_IREL": true, - "R_PPC64_JMP_SLOT": true, - "R_PPC64_NONE": true, - "R_PPC64_PLT16_LO_DS": true, - "R_PPC64_PLTGOT16": true, - "R_PPC64_PLTGOT16_DS": true, - "R_PPC64_PLTGOT16_HA": true, - "R_PPC64_PLTGOT16_HI": true, - "R_PPC64_PLTGOT16_LO": true, - "R_PPC64_PLTGOT_LO_DS": true, - "R_PPC64_REL14": true, - "R_PPC64_REL14_BRNTAKEN": true, - "R_PPC64_REL14_BRTAKEN": true, - "R_PPC64_REL16": true, - "R_PPC64_REL16DX_HA": true, - "R_PPC64_REL16_HA": true, - "R_PPC64_REL16_HI": true, - "R_PPC64_REL16_LO": true, - "R_PPC64_REL24": true, - "R_PPC64_REL24_NOTOC": true, - "R_PPC64_REL32": true, - "R_PPC64_REL64": true, - "R_PPC64_SECTOFF_DS": true, - "R_PPC64_SECTOFF_LO_DS": true, - "R_PPC64_TLS": true, - "R_PPC64_TLSGD": true, - "R_PPC64_TLSLD": true, - "R_PPC64_TOC": true, - "R_PPC64_TOC16": true, - "R_PPC64_TOC16_DS": true, - "R_PPC64_TOC16_HA": true, - "R_PPC64_TOC16_HI": true, - "R_PPC64_TOC16_LO": true, - "R_PPC64_TOC16_LO_DS": true, - "R_PPC64_TOCSAVE": true, - "R_PPC64_TPREL16": true, - "R_PPC64_TPREL16_DS": true, - "R_PPC64_TPREL16_HA": true, - "R_PPC64_TPREL16_HI": true, - "R_PPC64_TPREL16_HIGH": true, - "R_PPC64_TPREL16_HIGHA": true, - "R_PPC64_TPREL16_HIGHER": true, - "R_PPC64_TPREL16_HIGHERA": true, - "R_PPC64_TPREL16_HIGHEST": true, - "R_PPC64_TPREL16_HIGHESTA": true, - "R_PPC64_TPREL16_LO": true, - "R_PPC64_TPREL16_LO_DS": true, - "R_PPC64_TPREL64": true, - "R_PPC_ADDR14": true, - "R_PPC_ADDR14_BRNTAKEN": true, - "R_PPC_ADDR14_BRTAKEN": true, - "R_PPC_ADDR16": true, - "R_PPC_ADDR16_HA": true, - "R_PPC_ADDR16_HI": true, - "R_PPC_ADDR16_LO": true, - "R_PPC_ADDR24": true, - "R_PPC_ADDR32": true, - "R_PPC_COPY": true, - "R_PPC_DTPMOD32": true, - "R_PPC_DTPREL16": true, - "R_PPC_DTPREL16_HA": true, - "R_PPC_DTPREL16_HI": true, - "R_PPC_DTPREL16_LO": true, - "R_PPC_DTPREL32": true, - "R_PPC_EMB_BIT_FLD": true, - "R_PPC_EMB_MRKREF": true, - "R_PPC_EMB_NADDR16": true, - "R_PPC_EMB_NADDR16_HA": true, - "R_PPC_EMB_NADDR16_HI": true, - "R_PPC_EMB_NADDR16_LO": true, - "R_PPC_EMB_NADDR32": true, - "R_PPC_EMB_RELSDA": true, - "R_PPC_EMB_RELSEC16": true, - "R_PPC_EMB_RELST_HA": true, - "R_PPC_EMB_RELST_HI": true, - "R_PPC_EMB_RELST_LO": true, - "R_PPC_EMB_SDA21": true, - "R_PPC_EMB_SDA2I16": true, - "R_PPC_EMB_SDA2REL": true, - "R_PPC_EMB_SDAI16": true, - "R_PPC_GLOB_DAT": true, - "R_PPC_GOT16": true, - "R_PPC_GOT16_HA": true, - "R_PPC_GOT16_HI": true, - "R_PPC_GOT16_LO": true, - "R_PPC_GOT_TLSGD16": true, - "R_PPC_GOT_TLSGD16_HA": true, - "R_PPC_GOT_TLSGD16_HI": true, - "R_PPC_GOT_TLSGD16_LO": true, - "R_PPC_GOT_TLSLD16": true, - "R_PPC_GOT_TLSLD16_HA": true, - "R_PPC_GOT_TLSLD16_HI": true, - "R_PPC_GOT_TLSLD16_LO": true, - "R_PPC_GOT_TPREL16": true, - "R_PPC_GOT_TPREL16_HA": true, - "R_PPC_GOT_TPREL16_HI": true, - "R_PPC_GOT_TPREL16_LO": true, - "R_PPC_JMP_SLOT": true, - "R_PPC_LOCAL24PC": true, - "R_PPC_NONE": true, - "R_PPC_PLT16_HA": true, - "R_PPC_PLT16_HI": true, - "R_PPC_PLT16_LO": true, - "R_PPC_PLT32": true, - "R_PPC_PLTREL24": true, - "R_PPC_PLTREL32": true, - "R_PPC_REL14": true, - "R_PPC_REL14_BRNTAKEN": true, - "R_PPC_REL14_BRTAKEN": true, - "R_PPC_REL24": true, - "R_PPC_REL32": true, - "R_PPC_RELATIVE": true, - "R_PPC_SDAREL16": true, - "R_PPC_SECTOFF": true, - "R_PPC_SECTOFF_HA": true, - "R_PPC_SECTOFF_HI": true, - "R_PPC_SECTOFF_LO": true, - "R_PPC_TLS": true, - "R_PPC_TPREL16": true, - "R_PPC_TPREL16_HA": true, - "R_PPC_TPREL16_HI": true, - "R_PPC_TPREL16_LO": true, - "R_PPC_TPREL32": true, - "R_PPC_UADDR16": true, - "R_PPC_UADDR32": true, - "R_RISCV": true, - "R_RISCV_32": true, - "R_RISCV_32_PCREL": true, - "R_RISCV_64": true, - "R_RISCV_ADD16": true, - "R_RISCV_ADD32": true, - "R_RISCV_ADD64": true, - "R_RISCV_ADD8": true, - "R_RISCV_ALIGN": true, - "R_RISCV_BRANCH": true, - "R_RISCV_CALL": true, - "R_RISCV_CALL_PLT": true, - "R_RISCV_COPY": true, - "R_RISCV_GNU_VTENTRY": true, - "R_RISCV_GNU_VTINHERIT": true, - "R_RISCV_GOT_HI20": true, - "R_RISCV_GPREL_I": true, - "R_RISCV_GPREL_S": true, - "R_RISCV_HI20": true, - "R_RISCV_JAL": true, - "R_RISCV_JUMP_SLOT": true, - "R_RISCV_LO12_I": true, - "R_RISCV_LO12_S": true, - "R_RISCV_NONE": true, - "R_RISCV_PCREL_HI20": true, - "R_RISCV_PCREL_LO12_I": true, - "R_RISCV_PCREL_LO12_S": true, - "R_RISCV_RELATIVE": true, - "R_RISCV_RELAX": true, - "R_RISCV_RVC_BRANCH": true, - "R_RISCV_RVC_JUMP": true, - "R_RISCV_RVC_LUI": true, - "R_RISCV_SET16": true, - "R_RISCV_SET32": true, - "R_RISCV_SET6": true, - "R_RISCV_SET8": true, - "R_RISCV_SUB16": true, - "R_RISCV_SUB32": true, - "R_RISCV_SUB6": true, - "R_RISCV_SUB64": true, - "R_RISCV_SUB8": true, - "R_RISCV_TLS_DTPMOD32": true, - "R_RISCV_TLS_DTPMOD64": true, - "R_RISCV_TLS_DTPREL32": true, - "R_RISCV_TLS_DTPREL64": true, - "R_RISCV_TLS_GD_HI20": true, - "R_RISCV_TLS_GOT_HI20": true, - "R_RISCV_TLS_TPREL32": true, - "R_RISCV_TLS_TPREL64": true, - "R_RISCV_TPREL_ADD": true, - "R_RISCV_TPREL_HI20": true, - "R_RISCV_TPREL_I": true, - "R_RISCV_TPREL_LO12_I": true, - "R_RISCV_TPREL_LO12_S": true, - "R_RISCV_TPREL_S": true, - "R_SPARC": true, - "R_SPARC_10": true, - "R_SPARC_11": true, - "R_SPARC_13": true, - "R_SPARC_16": true, - "R_SPARC_22": true, - "R_SPARC_32": true, - "R_SPARC_5": true, - "R_SPARC_6": true, - "R_SPARC_64": true, - "R_SPARC_7": true, - "R_SPARC_8": true, - "R_SPARC_COPY": true, - "R_SPARC_DISP16": true, - "R_SPARC_DISP32": true, - "R_SPARC_DISP64": true, - "R_SPARC_DISP8": true, - "R_SPARC_GLOB_DAT": true, - "R_SPARC_GLOB_JMP": true, - "R_SPARC_GOT10": true, - "R_SPARC_GOT13": true, - "R_SPARC_GOT22": true, - "R_SPARC_H44": true, - "R_SPARC_HH22": true, - "R_SPARC_HI22": true, - "R_SPARC_HIPLT22": true, - "R_SPARC_HIX22": true, - "R_SPARC_HM10": true, - "R_SPARC_JMP_SLOT": true, - "R_SPARC_L44": true, - "R_SPARC_LM22": true, - "R_SPARC_LO10": true, - "R_SPARC_LOPLT10": true, - "R_SPARC_LOX10": true, - "R_SPARC_M44": true, - "R_SPARC_NONE": true, - "R_SPARC_OLO10": true, - "R_SPARC_PC10": true, - "R_SPARC_PC22": true, - "R_SPARC_PCPLT10": true, - "R_SPARC_PCPLT22": true, - "R_SPARC_PCPLT32": true, - "R_SPARC_PC_HH22": true, - "R_SPARC_PC_HM10": true, - "R_SPARC_PC_LM22": true, - "R_SPARC_PLT32": true, - "R_SPARC_PLT64": true, - "R_SPARC_REGISTER": true, - "R_SPARC_RELATIVE": true, - "R_SPARC_UA16": true, - "R_SPARC_UA32": true, - "R_SPARC_UA64": true, - "R_SPARC_WDISP16": true, - "R_SPARC_WDISP19": true, - "R_SPARC_WDISP22": true, - "R_SPARC_WDISP30": true, - "R_SPARC_WPLT30": true, - "R_SYM32": true, - "R_SYM64": true, - "R_TYPE32": true, - "R_TYPE64": true, - "R_X86_64": true, - "R_X86_64_16": true, - "R_X86_64_32": true, - "R_X86_64_32S": true, - "R_X86_64_64": true, - "R_X86_64_8": true, - "R_X86_64_COPY": true, - "R_X86_64_DTPMOD64": true, - "R_X86_64_DTPOFF32": true, - "R_X86_64_DTPOFF64": true, - "R_X86_64_GLOB_DAT": true, - "R_X86_64_GOT32": true, - "R_X86_64_GOT64": true, - "R_X86_64_GOTOFF64": true, - "R_X86_64_GOTPC32": true, - "R_X86_64_GOTPC32_TLSDESC": true, - "R_X86_64_GOTPC64": true, - "R_X86_64_GOTPCREL": true, - "R_X86_64_GOTPCREL64": true, - "R_X86_64_GOTPCRELX": true, - "R_X86_64_GOTPLT64": true, - "R_X86_64_GOTTPOFF": true, - "R_X86_64_IRELATIVE": true, - "R_X86_64_JMP_SLOT": true, - "R_X86_64_NONE": true, - "R_X86_64_PC16": true, - "R_X86_64_PC32": true, - "R_X86_64_PC32_BND": true, - "R_X86_64_PC64": true, - "R_X86_64_PC8": true, - "R_X86_64_PLT32": true, - "R_X86_64_PLT32_BND": true, - "R_X86_64_PLTOFF64": true, - "R_X86_64_RELATIVE": true, - "R_X86_64_RELATIVE64": true, - "R_X86_64_REX_GOTPCRELX": true, - "R_X86_64_SIZE32": true, - "R_X86_64_SIZE64": true, - "R_X86_64_TLSDESC": true, - "R_X86_64_TLSDESC_CALL": true, - "R_X86_64_TLSGD": true, - "R_X86_64_TLSLD": true, - "R_X86_64_TPOFF32": true, - "R_X86_64_TPOFF64": true, - "Rel32": true, - "Rel64": true, - "Rela32": true, - "Rela64": true, - "SHF_ALLOC": true, - "SHF_COMPRESSED": true, - "SHF_EXECINSTR": true, - "SHF_GROUP": true, - "SHF_INFO_LINK": true, - "SHF_LINK_ORDER": true, - "SHF_MASKOS": true, - "SHF_MASKPROC": true, - "SHF_MERGE": true, - "SHF_OS_NONCONFORMING": true, - "SHF_STRINGS": true, - "SHF_TLS": true, - "SHF_WRITE": true, - "SHN_ABS": true, - "SHN_COMMON": true, - "SHN_HIOS": true, - "SHN_HIPROC": true, - "SHN_HIRESERVE": true, - "SHN_LOOS": true, - "SHN_LOPROC": true, - "SHN_LORESERVE": true, - "SHN_UNDEF": true, - "SHN_XINDEX": true, - "SHT_DYNAMIC": true, - "SHT_DYNSYM": true, - "SHT_FINI_ARRAY": true, - "SHT_GNU_ATTRIBUTES": true, - "SHT_GNU_HASH": true, - "SHT_GNU_LIBLIST": true, - "SHT_GNU_VERDEF": true, - "SHT_GNU_VERNEED": true, - "SHT_GNU_VERSYM": true, - "SHT_GROUP": true, - "SHT_HASH": true, - "SHT_HIOS": true, - "SHT_HIPROC": true, - "SHT_HIUSER": true, - "SHT_INIT_ARRAY": true, - "SHT_LOOS": true, - "SHT_LOPROC": true, - "SHT_LOUSER": true, - "SHT_NOBITS": true, - "SHT_NOTE": true, - "SHT_NULL": true, - "SHT_PREINIT_ARRAY": true, - "SHT_PROGBITS": true, - "SHT_REL": true, - "SHT_RELA": true, - "SHT_SHLIB": true, - "SHT_STRTAB": true, - "SHT_SYMTAB": true, - "SHT_SYMTAB_SHNDX": true, - "STB_GLOBAL": true, - "STB_HIOS": true, - "STB_HIPROC": true, - "STB_LOCAL": true, - "STB_LOOS": true, - "STB_LOPROC": true, - "STB_WEAK": true, - "STT_COMMON": true, - "STT_FILE": true, - "STT_FUNC": true, - "STT_HIOS": true, - "STT_HIPROC": true, - "STT_LOOS": true, - "STT_LOPROC": true, - "STT_NOTYPE": true, - "STT_OBJECT": true, - "STT_SECTION": true, - "STT_TLS": true, - "STV_DEFAULT": true, - "STV_HIDDEN": true, - "STV_INTERNAL": true, - "STV_PROTECTED": true, - "ST_BIND": true, - "ST_INFO": true, - "ST_TYPE": true, - "ST_VISIBILITY": true, - "Section": true, - "Section32": true, - "Section64": true, - "SectionFlag": true, - "SectionHeader": true, - "SectionIndex": true, - "SectionType": true, - "Sym32": true, - "Sym32Size": true, - "Sym64": true, - "Sym64Size": true, - "SymBind": true, - "SymType": true, - "SymVis": true, - "Symbol": true, - "Type": true, - "Version": true, - }, - "debug/gosym": map[string]bool{ - "DecodingError": true, - "Func": true, - "LineTable": true, - "NewLineTable": true, - "NewTable": true, - "Obj": true, - "Sym": true, - "Table": true, - "UnknownFileError": true, - "UnknownLineError": true, - }, - "debug/macho": map[string]bool{ - "ARM64_RELOC_ADDEND": true, - "ARM64_RELOC_BRANCH26": true, - "ARM64_RELOC_GOT_LOAD_PAGE21": true, - "ARM64_RELOC_GOT_LOAD_PAGEOFF12": true, - "ARM64_RELOC_PAGE21": true, - "ARM64_RELOC_PAGEOFF12": true, - "ARM64_RELOC_POINTER_TO_GOT": true, - "ARM64_RELOC_SUBTRACTOR": true, - "ARM64_RELOC_TLVP_LOAD_PAGE21": true, - "ARM64_RELOC_TLVP_LOAD_PAGEOFF12": true, - "ARM64_RELOC_UNSIGNED": true, - "ARM_RELOC_BR24": true, - "ARM_RELOC_HALF": true, - "ARM_RELOC_HALF_SECTDIFF": true, - "ARM_RELOC_LOCAL_SECTDIFF": true, - "ARM_RELOC_PAIR": true, - "ARM_RELOC_PB_LA_PTR": true, - "ARM_RELOC_SECTDIFF": true, - "ARM_RELOC_VANILLA": true, - "ARM_THUMB_32BIT_BRANCH": true, - "ARM_THUMB_RELOC_BR22": true, - "Cpu": true, - "Cpu386": true, - "CpuAmd64": true, - "CpuArm": true, - "CpuArm64": true, - "CpuPpc": true, - "CpuPpc64": true, - "Dylib": true, - "DylibCmd": true, - "Dysymtab": true, - "DysymtabCmd": true, - "ErrNotFat": true, - "FatArch": true, - "FatArchHeader": true, - "FatFile": true, - "File": true, - "FileHeader": true, - "FlagAllModsBound": true, - "FlagAllowStackExecution": true, - "FlagAppExtensionSafe": true, - "FlagBindAtLoad": true, - "FlagBindsToWeak": true, - "FlagCanonical": true, - "FlagDeadStrippableDylib": true, - "FlagDyldLink": true, - "FlagForceFlat": true, - "FlagHasTLVDescriptors": true, - "FlagIncrLink": true, - "FlagLazyInit": true, - "FlagNoFixPrebinding": true, - "FlagNoHeapExecution": true, - "FlagNoMultiDefs": true, - "FlagNoReexportedDylibs": true, - "FlagNoUndefs": true, - "FlagPIE": true, - "FlagPrebindable": true, - "FlagPrebound": true, - "FlagRootSafe": true, - "FlagSetuidSafe": true, - "FlagSplitSegs": true, - "FlagSubsectionsViaSymbols": true, - "FlagTwoLevel": true, - "FlagWeakDefines": true, - "FormatError": true, - "GENERIC_RELOC_LOCAL_SECTDIFF": true, - "GENERIC_RELOC_PAIR": true, - "GENERIC_RELOC_PB_LA_PTR": true, - "GENERIC_RELOC_SECTDIFF": true, - "GENERIC_RELOC_TLV": true, - "GENERIC_RELOC_VANILLA": true, - "Load": true, - "LoadBytes": true, - "LoadCmd": true, - "LoadCmdDylib": true, - "LoadCmdDylinker": true, - "LoadCmdDysymtab": true, - "LoadCmdRpath": true, - "LoadCmdSegment": true, - "LoadCmdSegment64": true, - "LoadCmdSymtab": true, - "LoadCmdThread": true, - "LoadCmdUnixThread": true, - "Magic32": true, - "Magic64": true, - "MagicFat": true, - "NewFatFile": true, - "NewFile": true, - "Nlist32": true, - "Nlist64": true, - "Open": true, - "OpenFat": true, - "Regs386": true, - "RegsAMD64": true, - "Reloc": true, - "RelocTypeARM": true, - "RelocTypeARM64": true, - "RelocTypeGeneric": true, - "RelocTypeX86_64": true, - "Rpath": true, - "RpathCmd": true, - "Section": true, - "Section32": true, - "Section64": true, - "SectionHeader": true, - "Segment": true, - "Segment32": true, - "Segment64": true, - "SegmentHeader": true, - "Symbol": true, - "Symtab": true, - "SymtabCmd": true, - "Thread": true, - "Type": true, - "TypeBundle": true, - "TypeDylib": true, - "TypeExec": true, - "TypeObj": true, - "X86_64_RELOC_BRANCH": true, - "X86_64_RELOC_GOT": true, - "X86_64_RELOC_GOT_LOAD": true, - "X86_64_RELOC_SIGNED": true, - "X86_64_RELOC_SIGNED_1": true, - "X86_64_RELOC_SIGNED_2": true, - "X86_64_RELOC_SIGNED_4": true, - "X86_64_RELOC_SUBTRACTOR": true, - "X86_64_RELOC_TLV": true, - "X86_64_RELOC_UNSIGNED": true, - }, - "debug/pe": map[string]bool{ - "COFFSymbol": true, - "COFFSymbolSize": true, - "DataDirectory": true, - "File": true, - "FileHeader": true, - "FormatError": true, - "IMAGE_DIRECTORY_ENTRY_ARCHITECTURE": true, - "IMAGE_DIRECTORY_ENTRY_BASERELOC": true, - "IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT": true, - "IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR": true, - "IMAGE_DIRECTORY_ENTRY_DEBUG": true, - "IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT": true, - "IMAGE_DIRECTORY_ENTRY_EXCEPTION": true, - "IMAGE_DIRECTORY_ENTRY_EXPORT": true, - "IMAGE_DIRECTORY_ENTRY_GLOBALPTR": true, - "IMAGE_DIRECTORY_ENTRY_IAT": true, - "IMAGE_DIRECTORY_ENTRY_IMPORT": true, - "IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG": true, - "IMAGE_DIRECTORY_ENTRY_RESOURCE": true, - "IMAGE_DIRECTORY_ENTRY_SECURITY": true, - "IMAGE_DIRECTORY_ENTRY_TLS": true, - "IMAGE_FILE_MACHINE_AM33": true, - "IMAGE_FILE_MACHINE_AMD64": true, - "IMAGE_FILE_MACHINE_ARM": true, - "IMAGE_FILE_MACHINE_ARM64": true, - "IMAGE_FILE_MACHINE_ARMNT": true, - "IMAGE_FILE_MACHINE_EBC": true, - "IMAGE_FILE_MACHINE_I386": true, - "IMAGE_FILE_MACHINE_IA64": true, - "IMAGE_FILE_MACHINE_M32R": true, - "IMAGE_FILE_MACHINE_MIPS16": true, - "IMAGE_FILE_MACHINE_MIPSFPU": true, - "IMAGE_FILE_MACHINE_MIPSFPU16": true, - "IMAGE_FILE_MACHINE_POWERPC": true, - "IMAGE_FILE_MACHINE_POWERPCFP": true, - "IMAGE_FILE_MACHINE_R4000": true, - "IMAGE_FILE_MACHINE_SH3": true, - "IMAGE_FILE_MACHINE_SH3DSP": true, - "IMAGE_FILE_MACHINE_SH4": true, - "IMAGE_FILE_MACHINE_SH5": true, - "IMAGE_FILE_MACHINE_THUMB": true, - "IMAGE_FILE_MACHINE_UNKNOWN": true, - "IMAGE_FILE_MACHINE_WCEMIPSV2": true, - "ImportDirectory": true, - "NewFile": true, - "Open": true, - "OptionalHeader32": true, - "OptionalHeader64": true, - "Reloc": true, - "Section": true, - "SectionHeader": true, - "SectionHeader32": true, - "StringTable": true, - "Symbol": true, - }, - "debug/plan9obj": map[string]bool{ - "File": true, - "FileHeader": true, - "Magic386": true, - "Magic64": true, - "MagicAMD64": true, - "MagicARM": true, - "NewFile": true, - "Open": true, - "Section": true, - "SectionHeader": true, - "Sym": true, - }, - "encoding": map[string]bool{ - "BinaryMarshaler": true, - "BinaryUnmarshaler": true, - "TextMarshaler": true, - "TextUnmarshaler": true, - }, - "encoding/ascii85": map[string]bool{ - "CorruptInputError": true, - "Decode": true, - "Encode": true, - "MaxEncodedLen": true, - "NewDecoder": true, - "NewEncoder": true, - }, - "encoding/asn1": map[string]bool{ - "BitString": true, - "ClassApplication": true, - "ClassContextSpecific": true, - "ClassPrivate": true, - "ClassUniversal": true, - "Enumerated": true, - "Flag": true, - "Marshal": true, - "MarshalWithParams": true, - "NullBytes": true, - "NullRawValue": true, - "ObjectIdentifier": true, - "RawContent": true, - "RawValue": true, - "StructuralError": true, - "SyntaxError": true, - "TagBitString": true, - "TagBoolean": true, - "TagEnum": true, - "TagGeneralString": true, - "TagGeneralizedTime": true, - "TagIA5String": true, - "TagInteger": true, - "TagNull": true, - "TagNumericString": true, - "TagOID": true, - "TagOctetString": true, - "TagPrintableString": true, - "TagSequence": true, - "TagSet": true, - "TagT61String": true, - "TagUTCTime": true, - "TagUTF8String": true, - "Unmarshal": true, - "UnmarshalWithParams": true, - }, - "encoding/base32": map[string]bool{ - "CorruptInputError": true, - "Encoding": true, - "HexEncoding": true, - "NewDecoder": true, - "NewEncoder": true, - "NewEncoding": true, - "NoPadding": true, - "StdEncoding": true, - "StdPadding": true, - }, - "encoding/base64": map[string]bool{ - "CorruptInputError": true, - "Encoding": true, - "NewDecoder": true, - "NewEncoder": true, - "NewEncoding": true, - "NoPadding": true, - "RawStdEncoding": true, - "RawURLEncoding": true, - "StdEncoding": true, - "StdPadding": true, - "URLEncoding": true, - }, - "encoding/binary": map[string]bool{ - "BigEndian": true, - "ByteOrder": true, - "LittleEndian": true, - "MaxVarintLen16": true, - "MaxVarintLen32": true, - "MaxVarintLen64": true, - "PutUvarint": true, - "PutVarint": true, - "Read": true, - "ReadUvarint": true, - "ReadVarint": true, - "Size": true, - "Uvarint": true, - "Varint": true, - "Write": true, - }, - "encoding/csv": map[string]bool{ - "ErrBareQuote": true, - "ErrFieldCount": true, - "ErrQuote": true, - "ErrTrailingComma": true, - "NewReader": true, - "NewWriter": true, - "ParseError": true, - "Reader": true, - "Writer": true, - }, - "encoding/gob": map[string]bool{ - "CommonType": true, - "Decoder": true, - "Encoder": true, - "GobDecoder": true, - "GobEncoder": true, - "NewDecoder": true, - "NewEncoder": true, - "Register": true, - "RegisterName": true, - }, - "encoding/hex": map[string]bool{ - "Decode": true, - "DecodeString": true, - "DecodedLen": true, - "Dump": true, - "Dumper": true, - "Encode": true, - "EncodeToString": true, - "EncodedLen": true, - "ErrLength": true, - "InvalidByteError": true, - "NewDecoder": true, - "NewEncoder": true, - }, - "encoding/json": map[string]bool{ - "Compact": true, - "Decoder": true, - "Delim": true, - "Encoder": true, - "HTMLEscape": true, - "Indent": true, - "InvalidUTF8Error": true, - "InvalidUnmarshalError": true, - "Marshal": true, - "MarshalIndent": true, - "Marshaler": true, - "MarshalerError": true, - "NewDecoder": true, - "NewEncoder": true, - "Number": true, - "RawMessage": true, - "SyntaxError": true, - "Token": true, - "Unmarshal": true, - "UnmarshalFieldError": true, - "UnmarshalTypeError": true, - "Unmarshaler": true, - "UnsupportedTypeError": true, - "UnsupportedValueError": true, - "Valid": true, - }, - "encoding/pem": map[string]bool{ - "Block": true, - "Decode": true, - "Encode": true, - "EncodeToMemory": true, - }, - "encoding/xml": map[string]bool{ - "Attr": true, - "CharData": true, - "Comment": true, - "CopyToken": true, - "Decoder": true, - "Directive": true, - "Encoder": true, - "EndElement": true, - "Escape": true, - "EscapeText": true, - "HTMLAutoClose": true, - "HTMLEntity": true, - "Header": true, - "Marshal": true, - "MarshalIndent": true, - "Marshaler": true, - "MarshalerAttr": true, - "Name": true, - "NewDecoder": true, - "NewEncoder": true, - "NewTokenDecoder": true, - "ProcInst": true, - "StartElement": true, - "SyntaxError": true, - "TagPathError": true, - "Token": true, - "TokenReader": true, - "Unmarshal": true, - "UnmarshalError": true, - "Unmarshaler": true, - "UnmarshalerAttr": true, - "UnsupportedTypeError": true, - }, - "errors": map[string]bool{ - "As": true, - "Is": true, - "New": true, - "Unwrap": true, - }, - "expvar": map[string]bool{ - "Do": true, - "Float": true, - "Func": true, - "Get": true, - "Handler": true, - "Int": true, - "KeyValue": true, - "Map": true, - "NewFloat": true, - "NewInt": true, - "NewMap": true, - "NewString": true, - "Publish": true, - "String": true, - "Var": true, - }, - "flag": map[string]bool{ - "Arg": true, - "Args": true, - "Bool": true, - "BoolVar": true, - "CommandLine": true, - "ContinueOnError": true, - "Duration": true, - "DurationVar": true, - "ErrHelp": true, - "ErrorHandling": true, - "ExitOnError": true, - "Flag": true, - "FlagSet": true, - "Float64": true, - "Float64Var": true, - "Getter": true, - "Int": true, - "Int64": true, - "Int64Var": true, - "IntVar": true, - "Lookup": true, - "NArg": true, - "NFlag": true, - "NewFlagSet": true, - "PanicOnError": true, - "Parse": true, - "Parsed": true, - "PrintDefaults": true, - "Set": true, - "String": true, - "StringVar": true, - "Uint": true, - "Uint64": true, - "Uint64Var": true, - "UintVar": true, - "UnquoteUsage": true, - "Usage": true, - "Value": true, - "Var": true, - "Visit": true, - "VisitAll": true, - }, - "fmt": map[string]bool{ - "Errorf": true, - "Formatter": true, - "Fprint": true, - "Fprintf": true, - "Fprintln": true, - "Fscan": true, - "Fscanf": true, - "Fscanln": true, - "GoStringer": true, - "Print": true, - "Printf": true, - "Println": true, - "Scan": true, - "ScanState": true, - "Scanf": true, - "Scanln": true, - "Scanner": true, - "Sprint": true, - "Sprintf": true, - "Sprintln": true, - "Sscan": true, - "Sscanf": true, - "Sscanln": true, - "State": true, - "Stringer": true, - }, - "go/ast": map[string]bool{ - "ArrayType": true, - "AssignStmt": true, - "Bad": true, - "BadDecl": true, - "BadExpr": true, - "BadStmt": true, - "BasicLit": true, - "BinaryExpr": true, - "BlockStmt": true, - "BranchStmt": true, - "CallExpr": true, - "CaseClause": true, - "ChanDir": true, - "ChanType": true, - "CommClause": true, - "Comment": true, - "CommentGroup": true, - "CommentMap": true, - "CompositeLit": true, - "Con": true, - "Decl": true, - "DeclStmt": true, - "DeferStmt": true, - "Ellipsis": true, - "EmptyStmt": true, - "Expr": true, - "ExprStmt": true, - "Field": true, - "FieldFilter": true, - "FieldList": true, - "File": true, - "FileExports": true, - "Filter": true, - "FilterDecl": true, - "FilterFile": true, - "FilterFuncDuplicates": true, - "FilterImportDuplicates": true, - "FilterPackage": true, - "FilterUnassociatedComments": true, - "ForStmt": true, - "Fprint": true, - "Fun": true, - "FuncDecl": true, - "FuncLit": true, - "FuncType": true, - "GenDecl": true, - "GoStmt": true, - "Ident": true, - "IfStmt": true, - "ImportSpec": true, - "Importer": true, - "IncDecStmt": true, - "IndexExpr": true, - "Inspect": true, - "InterfaceType": true, - "IsExported": true, - "KeyValueExpr": true, - "LabeledStmt": true, - "Lbl": true, - "MapType": true, - "MergeMode": true, - "MergePackageFiles": true, - "NewCommentMap": true, - "NewIdent": true, - "NewObj": true, - "NewPackage": true, - "NewScope": true, - "Node": true, - "NotNilFilter": true, - "ObjKind": true, - "Object": true, - "Package": true, - "PackageExports": true, - "ParenExpr": true, - "Pkg": true, - "Print": true, - "RECV": true, - "RangeStmt": true, - "ReturnStmt": true, - "SEND": true, - "Scope": true, - "SelectStmt": true, - "SelectorExpr": true, - "SendStmt": true, - "SliceExpr": true, - "SortImports": true, - "Spec": true, - "StarExpr": true, - "Stmt": true, - "StructType": true, - "SwitchStmt": true, - "Typ": true, - "TypeAssertExpr": true, - "TypeSpec": true, - "TypeSwitchStmt": true, - "UnaryExpr": true, - "ValueSpec": true, - "Var": true, - "Visitor": true, - "Walk": true, - }, - "go/build": map[string]bool{ - "AllowBinary": true, - "ArchChar": true, - "Context": true, - "Default": true, - "FindOnly": true, - "IgnoreVendor": true, - "Import": true, - "ImportComment": true, - "ImportDir": true, - "ImportMode": true, - "IsLocalImport": true, - "MultiplePackageError": true, - "NoGoError": true, - "Package": true, - "ToolDir": true, - }, - "go/constant": map[string]bool{ - "BinaryOp": true, - "BitLen": true, - "Bool": true, - "BoolVal": true, - "Bytes": true, - "Compare": true, - "Complex": true, - "Denom": true, - "Float": true, - "Float32Val": true, - "Float64Val": true, - "Imag": true, - "Int": true, - "Int64Val": true, - "Kind": true, - "Make": true, - "MakeBool": true, - "MakeFloat64": true, - "MakeFromBytes": true, - "MakeFromLiteral": true, - "MakeImag": true, - "MakeInt64": true, - "MakeString": true, - "MakeUint64": true, - "MakeUnknown": true, - "Num": true, - "Real": true, - "Shift": true, - "Sign": true, - "String": true, - "StringVal": true, - "ToComplex": true, - "ToFloat": true, - "ToInt": true, - "Uint64Val": true, - "UnaryOp": true, - "Unknown": true, - "Val": true, - "Value": true, - }, - "go/doc": map[string]bool{ - "AllDecls": true, - "AllMethods": true, - "Example": true, - "Examples": true, - "Filter": true, - "Func": true, - "IllegalPrefixes": true, - "IsPredeclared": true, - "Mode": true, - "New": true, - "Note": true, - "Package": true, - "PreserveAST": true, - "Synopsis": true, - "ToHTML": true, - "ToText": true, - "Type": true, - "Value": true, - }, - "go/format": map[string]bool{ - "Node": true, - "Source": true, - }, - "go/importer": map[string]bool{ - "Default": true, - "For": true, - "ForCompiler": true, - "Lookup": true, - }, - "go/parser": map[string]bool{ - "AllErrors": true, - "DeclarationErrors": true, - "ImportsOnly": true, - "Mode": true, - "PackageClauseOnly": true, - "ParseComments": true, - "ParseDir": true, - "ParseExpr": true, - "ParseExprFrom": true, - "ParseFile": true, - "SpuriousErrors": true, - "Trace": true, - }, - "go/printer": map[string]bool{ - "CommentedNode": true, - "Config": true, - "Fprint": true, - "Mode": true, - "RawFormat": true, - "SourcePos": true, - "TabIndent": true, - "UseSpaces": true, - }, - "go/scanner": map[string]bool{ - "Error": true, - "ErrorHandler": true, - "ErrorList": true, - "Mode": true, - "PrintError": true, - "ScanComments": true, - "Scanner": true, - }, - "go/token": map[string]bool{ - "ADD": true, - "ADD_ASSIGN": true, - "AND": true, - "AND_ASSIGN": true, - "AND_NOT": true, - "AND_NOT_ASSIGN": true, - "ARROW": true, - "ASSIGN": true, - "BREAK": true, - "CASE": true, - "CHAN": true, - "CHAR": true, - "COLON": true, - "COMMA": true, - "COMMENT": true, - "CONST": true, - "CONTINUE": true, - "DEC": true, - "DEFAULT": true, - "DEFER": true, - "DEFINE": true, - "ELLIPSIS": true, - "ELSE": true, - "EOF": true, - "EQL": true, - "FALLTHROUGH": true, - "FLOAT": true, - "FOR": true, - "FUNC": true, - "File": true, - "FileSet": true, - "GEQ": true, - "GO": true, - "GOTO": true, - "GTR": true, - "HighestPrec": true, - "IDENT": true, - "IF": true, - "ILLEGAL": true, - "IMAG": true, - "IMPORT": true, - "INC": true, - "INT": true, - "INTERFACE": true, - "IsExported": true, - "IsIdentifier": true, - "IsKeyword": true, - "LAND": true, - "LBRACE": true, - "LBRACK": true, - "LEQ": true, - "LOR": true, - "LPAREN": true, - "LSS": true, - "Lookup": true, - "LowestPrec": true, - "MAP": true, - "MUL": true, - "MUL_ASSIGN": true, - "NEQ": true, - "NOT": true, - "NewFileSet": true, - "NoPos": true, - "OR": true, - "OR_ASSIGN": true, - "PACKAGE": true, - "PERIOD": true, - "Pos": true, - "Position": true, - "QUO": true, - "QUO_ASSIGN": true, - "RANGE": true, - "RBRACE": true, - "RBRACK": true, - "REM": true, - "REM_ASSIGN": true, - "RETURN": true, - "RPAREN": true, - "SELECT": true, - "SEMICOLON": true, - "SHL": true, - "SHL_ASSIGN": true, - "SHR": true, - "SHR_ASSIGN": true, - "STRING": true, - "STRUCT": true, - "SUB": true, - "SUB_ASSIGN": true, - "SWITCH": true, - "TYPE": true, - "Token": true, - "UnaryPrec": true, - "VAR": true, - "XOR": true, - "XOR_ASSIGN": true, - }, - "go/types": map[string]bool{ - "Array": true, - "AssertableTo": true, - "AssignableTo": true, - "Basic": true, - "BasicInfo": true, - "BasicKind": true, - "Bool": true, - "Builtin": true, - "Byte": true, - "Chan": true, - "ChanDir": true, - "CheckExpr": true, - "Checker": true, - "Comparable": true, - "Complex128": true, - "Complex64": true, - "Config": true, - "Const": true, - "ConvertibleTo": true, - "DefPredeclaredTestFuncs": true, - "Default": true, - "Error": true, - "Eval": true, - "ExprString": true, - "FieldVal": true, - "Float32": true, - "Float64": true, - "Func": true, - "Id": true, - "Identical": true, - "IdenticalIgnoreTags": true, - "Implements": true, - "ImportMode": true, - "Importer": true, - "ImporterFrom": true, - "Info": true, - "Initializer": true, - "Int": true, - "Int16": true, - "Int32": true, - "Int64": true, - "Int8": true, - "Interface": true, - "Invalid": true, - "IsBoolean": true, - "IsComplex": true, - "IsConstType": true, - "IsFloat": true, - "IsInteger": true, - "IsInterface": true, - "IsNumeric": true, - "IsOrdered": true, - "IsString": true, - "IsUnsigned": true, - "IsUntyped": true, - "Label": true, - "LookupFieldOrMethod": true, - "Map": true, - "MethodExpr": true, - "MethodSet": true, - "MethodVal": true, - "MissingMethod": true, - "Named": true, - "NewArray": true, - "NewChan": true, - "NewChecker": true, - "NewConst": true, - "NewField": true, - "NewFunc": true, - "NewInterface": true, - "NewInterfaceType": true, - "NewLabel": true, - "NewMap": true, - "NewMethodSet": true, - "NewNamed": true, - "NewPackage": true, - "NewParam": true, - "NewPkgName": true, - "NewPointer": true, - "NewScope": true, - "NewSignature": true, - "NewSlice": true, - "NewStruct": true, - "NewTuple": true, - "NewTypeName": true, - "NewVar": true, - "Nil": true, - "Object": true, - "ObjectString": true, - "Package": true, - "PkgName": true, - "Pointer": true, - "Qualifier": true, - "RecvOnly": true, - "RelativeTo": true, - "Rune": true, - "Scope": true, - "Selection": true, - "SelectionKind": true, - "SelectionString": true, - "SendOnly": true, - "SendRecv": true, - "Signature": true, - "Sizes": true, - "SizesFor": true, - "Slice": true, - "StdSizes": true, - "String": true, - "Struct": true, - "Tuple": true, - "Typ": true, - "Type": true, - "TypeAndValue": true, - "TypeName": true, - "TypeString": true, - "Uint": true, - "Uint16": true, - "Uint32": true, - "Uint64": true, - "Uint8": true, - "Uintptr": true, - "Universe": true, - "Unsafe": true, - "UnsafePointer": true, - "UntypedBool": true, - "UntypedComplex": true, - "UntypedFloat": true, - "UntypedInt": true, - "UntypedNil": true, - "UntypedRune": true, - "UntypedString": true, - "Var": true, - "WriteExpr": true, - "WriteSignature": true, - "WriteType": true, - }, - "hash": map[string]bool{ - "Hash": true, - "Hash32": true, - "Hash64": true, - }, - "hash/adler32": map[string]bool{ - "Checksum": true, - "New": true, - "Size": true, - }, - "hash/crc32": map[string]bool{ - "Castagnoli": true, - "Checksum": true, - "ChecksumIEEE": true, - "IEEE": true, - "IEEETable": true, - "Koopman": true, - "MakeTable": true, - "New": true, - "NewIEEE": true, - "Size": true, - "Table": true, - "Update": true, - }, - "hash/crc64": map[string]bool{ - "Checksum": true, - "ECMA": true, - "ISO": true, - "MakeTable": true, - "New": true, - "Size": true, - "Table": true, - "Update": true, - }, - "hash/fnv": map[string]bool{ - "New128": true, - "New128a": true, - "New32": true, - "New32a": true, - "New64": true, - "New64a": true, - }, - "html": map[string]bool{ - "EscapeString": true, - "UnescapeString": true, - }, - "html/template": map[string]bool{ - "CSS": true, - "ErrAmbigContext": true, - "ErrBadHTML": true, - "ErrBranchEnd": true, - "ErrEndContext": true, - "ErrNoSuchTemplate": true, - "ErrOutputContext": true, - "ErrPartialCharset": true, - "ErrPartialEscape": true, - "ErrPredefinedEscaper": true, - "ErrRangeLoopReentry": true, - "ErrSlashAmbig": true, - "Error": true, - "ErrorCode": true, - "FuncMap": true, - "HTML": true, - "HTMLAttr": true, - "HTMLEscape": true, - "HTMLEscapeString": true, - "HTMLEscaper": true, - "IsTrue": true, - "JS": true, - "JSEscape": true, - "JSEscapeString": true, - "JSEscaper": true, - "JSStr": true, - "Must": true, - "New": true, - "OK": true, - "ParseFiles": true, - "ParseGlob": true, - "Srcset": true, - "Template": true, - "URL": true, - "URLQueryEscaper": true, - }, - "image": map[string]bool{ - "Alpha": true, - "Alpha16": true, - "Black": true, - "CMYK": true, - "Config": true, - "Decode": true, - "DecodeConfig": true, - "ErrFormat": true, - "Gray": true, - "Gray16": true, - "Image": true, - "NRGBA": true, - "NRGBA64": true, - "NYCbCrA": true, - "NewAlpha": true, - "NewAlpha16": true, - "NewCMYK": true, - "NewGray": true, - "NewGray16": true, - "NewNRGBA": true, - "NewNRGBA64": true, - "NewNYCbCrA": true, - "NewPaletted": true, - "NewRGBA": true, - "NewRGBA64": true, - "NewUniform": true, - "NewYCbCr": true, - "Opaque": true, - "Paletted": true, - "PalettedImage": true, - "Point": true, - "Pt": true, - "RGBA": true, - "RGBA64": true, - "Rect": true, - "Rectangle": true, - "RegisterFormat": true, - "Transparent": true, - "Uniform": true, - "White": true, - "YCbCr": true, - "YCbCrSubsampleRatio": true, - "YCbCrSubsampleRatio410": true, - "YCbCrSubsampleRatio411": true, - "YCbCrSubsampleRatio420": true, - "YCbCrSubsampleRatio422": true, - "YCbCrSubsampleRatio440": true, - "YCbCrSubsampleRatio444": true, - "ZP": true, - "ZR": true, - }, - "image/color": map[string]bool{ - "Alpha": true, - "Alpha16": true, - "Alpha16Model": true, - "AlphaModel": true, - "Black": true, - "CMYK": true, - "CMYKModel": true, - "CMYKToRGB": true, - "Color": true, - "Gray": true, - "Gray16": true, - "Gray16Model": true, - "GrayModel": true, - "Model": true, - "ModelFunc": true, - "NRGBA": true, - "NRGBA64": true, - "NRGBA64Model": true, - "NRGBAModel": true, - "NYCbCrA": true, - "NYCbCrAModel": true, - "Opaque": true, - "Palette": true, - "RGBA": true, - "RGBA64": true, - "RGBA64Model": true, - "RGBAModel": true, - "RGBToCMYK": true, - "RGBToYCbCr": true, - "Transparent": true, - "White": true, - "YCbCr": true, - "YCbCrModel": true, - "YCbCrToRGB": true, - }, - "image/color/palette": map[string]bool{ - "Plan9": true, - "WebSafe": true, - }, - "image/draw": map[string]bool{ - "Draw": true, - "DrawMask": true, - "Drawer": true, - "FloydSteinberg": true, - "Image": true, - "Op": true, - "Over": true, - "Quantizer": true, - "Src": true, - }, - "image/gif": map[string]bool{ - "Decode": true, - "DecodeAll": true, - "DecodeConfig": true, - "DisposalBackground": true, - "DisposalNone": true, - "DisposalPrevious": true, - "Encode": true, - "EncodeAll": true, - "GIF": true, - "Options": true, - }, - "image/jpeg": map[string]bool{ - "Decode": true, - "DecodeConfig": true, - "DefaultQuality": true, - "Encode": true, - "FormatError": true, - "Options": true, - "Reader": true, - "UnsupportedError": true, - }, - "image/png": map[string]bool{ - "BestCompression": true, - "BestSpeed": true, - "CompressionLevel": true, - "Decode": true, - "DecodeConfig": true, - "DefaultCompression": true, - "Encode": true, - "Encoder": true, - "EncoderBuffer": true, - "EncoderBufferPool": true, - "FormatError": true, - "NoCompression": true, - "UnsupportedError": true, - }, - "index/suffixarray": map[string]bool{ - "Index": true, - "New": true, - }, - "io": map[string]bool{ - "ByteReader": true, - "ByteScanner": true, - "ByteWriter": true, - "Closer": true, - "Copy": true, - "CopyBuffer": true, - "CopyN": true, - "EOF": true, - "ErrClosedPipe": true, - "ErrNoProgress": true, - "ErrShortBuffer": true, - "ErrShortWrite": true, - "ErrUnexpectedEOF": true, - "LimitReader": true, - "LimitedReader": true, - "MultiReader": true, - "MultiWriter": true, - "NewSectionReader": true, - "Pipe": true, - "PipeReader": true, - "PipeWriter": true, - "ReadAtLeast": true, - "ReadCloser": true, - "ReadFull": true, - "ReadSeeker": true, - "ReadWriteCloser": true, - "ReadWriteSeeker": true, - "ReadWriter": true, - "Reader": true, - "ReaderAt": true, - "ReaderFrom": true, - "RuneReader": true, - "RuneScanner": true, - "SectionReader": true, - "SeekCurrent": true, - "SeekEnd": true, - "SeekStart": true, - "Seeker": true, - "StringWriter": true, - "TeeReader": true, - "WriteCloser": true, - "WriteSeeker": true, - "WriteString": true, - "Writer": true, - "WriterAt": true, - "WriterTo": true, - }, - "io/ioutil": map[string]bool{ - "Discard": true, - "NopCloser": true, - "ReadAll": true, - "ReadDir": true, - "ReadFile": true, - "TempDir": true, - "TempFile": true, - "WriteFile": true, - }, - "log": map[string]bool{ - "Fatal": true, - "Fatalf": true, - "Fatalln": true, - "Flags": true, - "LUTC": true, - "Ldate": true, - "Llongfile": true, - "Lmicroseconds": true, - "Logger": true, - "Lshortfile": true, - "LstdFlags": true, - "Ltime": true, - "New": true, - "Output": true, - "Panic": true, - "Panicf": true, - "Panicln": true, - "Prefix": true, - "Print": true, - "Printf": true, - "Println": true, - "SetFlags": true, - "SetOutput": true, - "SetPrefix": true, - "Writer": true, - }, - "log/syslog": map[string]bool{ - "Dial": true, - "LOG_ALERT": true, - "LOG_AUTH": true, - "LOG_AUTHPRIV": true, - "LOG_CRIT": true, - "LOG_CRON": true, - "LOG_DAEMON": true, - "LOG_DEBUG": true, - "LOG_EMERG": true, - "LOG_ERR": true, - "LOG_FTP": true, - "LOG_INFO": true, - "LOG_KERN": true, - "LOG_LOCAL0": true, - "LOG_LOCAL1": true, - "LOG_LOCAL2": true, - "LOG_LOCAL3": true, - "LOG_LOCAL4": true, - "LOG_LOCAL5": true, - "LOG_LOCAL6": true, - "LOG_LOCAL7": true, - "LOG_LPR": true, - "LOG_MAIL": true, - "LOG_NEWS": true, - "LOG_NOTICE": true, - "LOG_SYSLOG": true, - "LOG_USER": true, - "LOG_UUCP": true, - "LOG_WARNING": true, - "New": true, - "NewLogger": true, - "Priority": true, - "Writer": true, - }, - "math": map[string]bool{ - "Abs": true, - "Acos": true, - "Acosh": true, - "Asin": true, - "Asinh": true, - "Atan": true, - "Atan2": true, - "Atanh": true, - "Cbrt": true, - "Ceil": true, - "Copysign": true, - "Cos": true, - "Cosh": true, - "Dim": true, - "E": true, - "Erf": true, - "Erfc": true, - "Erfcinv": true, - "Erfinv": true, - "Exp": true, - "Exp2": true, - "Expm1": true, - "Float32bits": true, - "Float32frombits": true, - "Float64bits": true, - "Float64frombits": true, - "Floor": true, - "Frexp": true, - "Gamma": true, - "Hypot": true, - "Ilogb": true, - "Inf": true, - "IsInf": true, - "IsNaN": true, - "J0": true, - "J1": true, - "Jn": true, - "Ldexp": true, - "Lgamma": true, - "Ln10": true, - "Ln2": true, - "Log": true, - "Log10": true, - "Log10E": true, - "Log1p": true, - "Log2": true, - "Log2E": true, - "Logb": true, - "Max": true, - "MaxFloat32": true, - "MaxFloat64": true, - "MaxInt16": true, - "MaxInt32": true, - "MaxInt64": true, - "MaxInt8": true, - "MaxUint16": true, - "MaxUint32": true, - "MaxUint64": true, - "MaxUint8": true, - "Min": true, - "MinInt16": true, - "MinInt32": true, - "MinInt64": true, - "MinInt8": true, - "Mod": true, - "Modf": true, - "NaN": true, - "Nextafter": true, - "Nextafter32": true, - "Phi": true, - "Pi": true, - "Pow": true, - "Pow10": true, - "Remainder": true, - "Round": true, - "RoundToEven": true, - "Signbit": true, - "Sin": true, - "Sincos": true, - "Sinh": true, - "SmallestNonzeroFloat32": true, - "SmallestNonzeroFloat64": true, - "Sqrt": true, - "Sqrt2": true, - "SqrtE": true, - "SqrtPhi": true, - "SqrtPi": true, - "Tan": true, - "Tanh": true, - "Trunc": true, - "Y0": true, - "Y1": true, - "Yn": true, - }, - "math/big": map[string]bool{ - "Above": true, - "Accuracy": true, - "AwayFromZero": true, - "Below": true, - "ErrNaN": true, - "Exact": true, - "Float": true, - "Int": true, - "Jacobi": true, - "MaxBase": true, - "MaxExp": true, - "MaxPrec": true, - "MinExp": true, - "NewFloat": true, - "NewInt": true, - "NewRat": true, - "ParseFloat": true, - "Rat": true, - "RoundingMode": true, - "ToNearestAway": true, - "ToNearestEven": true, - "ToNegativeInf": true, - "ToPositiveInf": true, - "ToZero": true, - "Word": true, - }, - "math/bits": map[string]bool{ - "Add": true, - "Add32": true, - "Add64": true, - "Div": true, - "Div32": true, - "Div64": true, - "LeadingZeros": true, - "LeadingZeros16": true, - "LeadingZeros32": true, - "LeadingZeros64": true, - "LeadingZeros8": true, - "Len": true, - "Len16": true, - "Len32": true, - "Len64": true, - "Len8": true, - "Mul": true, - "Mul32": true, - "Mul64": true, - "OnesCount": true, - "OnesCount16": true, - "OnesCount32": true, - "OnesCount64": true, - "OnesCount8": true, - "Reverse": true, - "Reverse16": true, - "Reverse32": true, - "Reverse64": true, - "Reverse8": true, - "ReverseBytes": true, - "ReverseBytes16": true, - "ReverseBytes32": true, - "ReverseBytes64": true, - "RotateLeft": true, - "RotateLeft16": true, - "RotateLeft32": true, - "RotateLeft64": true, - "RotateLeft8": true, - "Sub": true, - "Sub32": true, - "Sub64": true, - "TrailingZeros": true, - "TrailingZeros16": true, - "TrailingZeros32": true, - "TrailingZeros64": true, - "TrailingZeros8": true, - "UintSize": true, - }, - "math/cmplx": map[string]bool{ - "Abs": true, - "Acos": true, - "Acosh": true, - "Asin": true, - "Asinh": true, - "Atan": true, - "Atanh": true, - "Conj": true, - "Cos": true, - "Cosh": true, - "Cot": true, - "Exp": true, - "Inf": true, - "IsInf": true, - "IsNaN": true, - "Log": true, - "Log10": true, - "NaN": true, - "Phase": true, - "Polar": true, - "Pow": true, - "Rect": true, - "Sin": true, - "Sinh": true, - "Sqrt": true, - "Tan": true, - "Tanh": true, - }, - "math/rand": map[string]bool{ - "ExpFloat64": true, - "Float32": true, - "Float64": true, - "Int": true, - "Int31": true, - "Int31n": true, - "Int63": true, - "Int63n": true, - "Intn": true, - "New": true, - "NewSource": true, - "NewZipf": true, - "NormFloat64": true, - "Perm": true, - "Rand": true, - "Read": true, - "Seed": true, - "Shuffle": true, - "Source": true, - "Source64": true, - "Uint32": true, - "Uint64": true, - "Zipf": true, - }, - "mime": map[string]bool{ - "AddExtensionType": true, - "BEncoding": true, - "ErrInvalidMediaParameter": true, - "ExtensionsByType": true, - "FormatMediaType": true, - "ParseMediaType": true, - "QEncoding": true, - "TypeByExtension": true, - "WordDecoder": true, - "WordEncoder": true, - }, - "mime/multipart": map[string]bool{ - "ErrMessageTooLarge": true, - "File": true, - "FileHeader": true, - "Form": true, - "NewReader": true, - "NewWriter": true, - "Part": true, - "Reader": true, - "Writer": true, - }, - "mime/quotedprintable": map[string]bool{ - "NewReader": true, - "NewWriter": true, - "Reader": true, - "Writer": true, - }, - "net": map[string]bool{ - "Addr": true, - "AddrError": true, - "Buffers": true, - "CIDRMask": true, - "Conn": true, - "DNSConfigError": true, - "DNSError": true, - "DefaultResolver": true, - "Dial": true, - "DialIP": true, - "DialTCP": true, - "DialTimeout": true, - "DialUDP": true, - "DialUnix": true, - "Dialer": true, - "ErrWriteToConnected": true, - "Error": true, - "FileConn": true, - "FileListener": true, - "FilePacketConn": true, - "FlagBroadcast": true, - "FlagLoopback": true, - "FlagMulticast": true, - "FlagPointToPoint": true, - "FlagUp": true, - "Flags": true, - "HardwareAddr": true, - "IP": true, - "IPAddr": true, - "IPConn": true, - "IPMask": true, - "IPNet": true, - "IPv4": true, - "IPv4Mask": true, - "IPv4allrouter": true, - "IPv4allsys": true, - "IPv4bcast": true, - "IPv4len": true, - "IPv4zero": true, - "IPv6interfacelocalallnodes": true, - "IPv6len": true, - "IPv6linklocalallnodes": true, - "IPv6linklocalallrouters": true, - "IPv6loopback": true, - "IPv6unspecified": true, - "IPv6zero": true, - "Interface": true, - "InterfaceAddrs": true, - "InterfaceByIndex": true, - "InterfaceByName": true, - "Interfaces": true, - "InvalidAddrError": true, - "JoinHostPort": true, - "Listen": true, - "ListenConfig": true, - "ListenIP": true, - "ListenMulticastUDP": true, - "ListenPacket": true, - "ListenTCP": true, - "ListenUDP": true, - "ListenUnix": true, - "ListenUnixgram": true, - "Listener": true, - "LookupAddr": true, - "LookupCNAME": true, - "LookupHost": true, - "LookupIP": true, - "LookupMX": true, - "LookupNS": true, - "LookupPort": true, - "LookupSRV": true, - "LookupTXT": true, - "MX": true, - "NS": true, - "OpError": true, - "PacketConn": true, - "ParseCIDR": true, - "ParseError": true, - "ParseIP": true, - "ParseMAC": true, - "Pipe": true, - "ResolveIPAddr": true, - "ResolveTCPAddr": true, - "ResolveUDPAddr": true, - "ResolveUnixAddr": true, - "Resolver": true, - "SRV": true, - "SplitHostPort": true, - "TCPAddr": true, - "TCPConn": true, - "TCPListener": true, - "UDPAddr": true, - "UDPConn": true, - "UnixAddr": true, - "UnixConn": true, - "UnixListener": true, - "UnknownNetworkError": true, - }, - "net/http": map[string]bool{ - "CanonicalHeaderKey": true, - "Client": true, - "CloseNotifier": true, - "ConnState": true, - "Cookie": true, - "CookieJar": true, - "DefaultClient": true, - "DefaultMaxHeaderBytes": true, - "DefaultMaxIdleConnsPerHost": true, - "DefaultServeMux": true, - "DefaultTransport": true, - "DetectContentType": true, - "Dir": true, - "ErrAbortHandler": true, - "ErrBodyNotAllowed": true, - "ErrBodyReadAfterClose": true, - "ErrContentLength": true, - "ErrHandlerTimeout": true, - "ErrHeaderTooLong": true, - "ErrHijacked": true, - "ErrLineTooLong": true, - "ErrMissingBoundary": true, - "ErrMissingContentLength": true, - "ErrMissingFile": true, - "ErrNoCookie": true, - "ErrNoLocation": true, - "ErrNotMultipart": true, - "ErrNotSupported": true, - "ErrServerClosed": true, - "ErrShortBody": true, - "ErrSkipAltProtocol": true, - "ErrUnexpectedTrailer": true, - "ErrUseLastResponse": true, - "ErrWriteAfterFlush": true, - "Error": true, - "File": true, - "FileServer": true, - "FileSystem": true, - "Flusher": true, - "Get": true, - "Handle": true, - "HandleFunc": true, - "Handler": true, - "HandlerFunc": true, - "Head": true, - "Header": true, - "Hijacker": true, - "ListenAndServe": true, - "ListenAndServeTLS": true, - "LocalAddrContextKey": true, - "MaxBytesReader": true, - "MethodConnect": true, - "MethodDelete": true, - "MethodGet": true, - "MethodHead": true, - "MethodOptions": true, - "MethodPatch": true, - "MethodPost": true, - "MethodPut": true, - "MethodTrace": true, - "NewFileTransport": true, - "NewRequest": true, - "NewRequestWithContext": true, - "NewServeMux": true, - "NoBody": true, - "NotFound": true, - "NotFoundHandler": true, - "ParseHTTPVersion": true, - "ParseTime": true, - "Post": true, - "PostForm": true, - "ProtocolError": true, - "ProxyFromEnvironment": true, - "ProxyURL": true, - "PushOptions": true, - "Pusher": true, - "ReadRequest": true, - "ReadResponse": true, - "Redirect": true, - "RedirectHandler": true, - "Request": true, - "Response": true, - "ResponseWriter": true, - "RoundTripper": true, - "SameSite": true, - "SameSiteDefaultMode": true, - "SameSiteLaxMode": true, - "SameSiteNoneMode": true, - "SameSiteStrictMode": true, - "Serve": true, - "ServeContent": true, - "ServeFile": true, - "ServeMux": true, - "ServeTLS": true, - "Server": true, - "ServerContextKey": true, - "SetCookie": true, - "StateActive": true, - "StateClosed": true, - "StateHijacked": true, - "StateIdle": true, - "StateNew": true, - "StatusAccepted": true, - "StatusAlreadyReported": true, - "StatusBadGateway": true, - "StatusBadRequest": true, - "StatusConflict": true, - "StatusContinue": true, - "StatusCreated": true, - "StatusEarlyHints": true, - "StatusExpectationFailed": true, - "StatusFailedDependency": true, - "StatusForbidden": true, - "StatusFound": true, - "StatusGatewayTimeout": true, - "StatusGone": true, - "StatusHTTPVersionNotSupported": true, - "StatusIMUsed": true, - "StatusInsufficientStorage": true, - "StatusInternalServerError": true, - "StatusLengthRequired": true, - "StatusLocked": true, - "StatusLoopDetected": true, - "StatusMethodNotAllowed": true, - "StatusMisdirectedRequest": true, - "StatusMovedPermanently": true, - "StatusMultiStatus": true, - "StatusMultipleChoices": true, - "StatusNetworkAuthenticationRequired": true, - "StatusNoContent": true, - "StatusNonAuthoritativeInfo": true, - "StatusNotAcceptable": true, - "StatusNotExtended": true, - "StatusNotFound": true, - "StatusNotImplemented": true, - "StatusNotModified": true, - "StatusOK": true, - "StatusPartialContent": true, - "StatusPaymentRequired": true, - "StatusPermanentRedirect": true, - "StatusPreconditionFailed": true, - "StatusPreconditionRequired": true, - "StatusProcessing": true, - "StatusProxyAuthRequired": true, - "StatusRequestEntityTooLarge": true, - "StatusRequestHeaderFieldsTooLarge": true, - "StatusRequestTimeout": true, - "StatusRequestURITooLong": true, - "StatusRequestedRangeNotSatisfiable": true, - "StatusResetContent": true, - "StatusSeeOther": true, - "StatusServiceUnavailable": true, - "StatusSwitchingProtocols": true, - "StatusTeapot": true, - "StatusTemporaryRedirect": true, - "StatusText": true, - "StatusTooEarly": true, - "StatusTooManyRequests": true, - "StatusUnauthorized": true, - "StatusUnavailableForLegalReasons": true, - "StatusUnprocessableEntity": true, - "StatusUnsupportedMediaType": true, - "StatusUpgradeRequired": true, - "StatusUseProxy": true, - "StatusVariantAlsoNegotiates": true, - "StripPrefix": true, - "TimeFormat": true, - "TimeoutHandler": true, - "TrailerPrefix": true, - "Transport": true, - }, - "net/http/cgi": map[string]bool{ - "Handler": true, - "Request": true, - "RequestFromMap": true, - "Serve": true, - }, - "net/http/cookiejar": map[string]bool{ - "Jar": true, - "New": true, - "Options": true, - "PublicSuffixList": true, - }, - "net/http/fcgi": map[string]bool{ - "ErrConnClosed": true, - "ErrRequestAborted": true, - "ProcessEnv": true, - "Serve": true, - }, - "net/http/httptest": map[string]bool{ - "DefaultRemoteAddr": true, - "NewRecorder": true, - "NewRequest": true, - "NewServer": true, - "NewTLSServer": true, - "NewUnstartedServer": true, - "ResponseRecorder": true, - "Server": true, - }, - "net/http/httptrace": map[string]bool{ - "ClientTrace": true, - "ContextClientTrace": true, - "DNSDoneInfo": true, - "DNSStartInfo": true, - "GotConnInfo": true, - "WithClientTrace": true, - "WroteRequestInfo": true, - }, - "net/http/httputil": map[string]bool{ - "BufferPool": true, - "ClientConn": true, - "DumpRequest": true, - "DumpRequestOut": true, - "DumpResponse": true, - "ErrClosed": true, - "ErrLineTooLong": true, - "ErrPersistEOF": true, - "ErrPipeline": true, - "NewChunkedReader": true, - "NewChunkedWriter": true, - "NewClientConn": true, - "NewProxyClientConn": true, - "NewServerConn": true, - "NewSingleHostReverseProxy": true, - "ReverseProxy": true, - "ServerConn": true, - }, - "net/http/pprof": map[string]bool{ - "Cmdline": true, - "Handler": true, - "Index": true, - "Profile": true, - "Symbol": true, - "Trace": true, - }, - "net/mail": map[string]bool{ - "Address": true, - "AddressParser": true, - "ErrHeaderNotPresent": true, - "Header": true, - "Message": true, - "ParseAddress": true, - "ParseAddressList": true, - "ParseDate": true, - "ReadMessage": true, - }, - "net/rpc": map[string]bool{ - "Accept": true, - "Call": true, - "Client": true, - "ClientCodec": true, - "DefaultDebugPath": true, - "DefaultRPCPath": true, - "DefaultServer": true, - "Dial": true, - "DialHTTP": true, - "DialHTTPPath": true, - "ErrShutdown": true, - "HandleHTTP": true, - "NewClient": true, - "NewClientWithCodec": true, - "NewServer": true, - "Register": true, - "RegisterName": true, - "Request": true, - "Response": true, - "ServeCodec": true, - "ServeConn": true, - "ServeRequest": true, - "Server": true, - "ServerCodec": true, - "ServerError": true, - }, - "net/rpc/jsonrpc": map[string]bool{ - "Dial": true, - "NewClient": true, - "NewClientCodec": true, - "NewServerCodec": true, - "ServeConn": true, - }, - "net/smtp": map[string]bool{ - "Auth": true, - "CRAMMD5Auth": true, - "Client": true, - "Dial": true, - "NewClient": true, - "PlainAuth": true, - "SendMail": true, - "ServerInfo": true, - }, - "net/textproto": map[string]bool{ - "CanonicalMIMEHeaderKey": true, - "Conn": true, - "Dial": true, - "Error": true, - "MIMEHeader": true, - "NewConn": true, - "NewReader": true, - "NewWriter": true, - "Pipeline": true, - "ProtocolError": true, - "Reader": true, - "TrimBytes": true, - "TrimString": true, - "Writer": true, - }, - "net/url": map[string]bool{ - "Error": true, - "EscapeError": true, - "InvalidHostError": true, - "Parse": true, - "ParseQuery": true, - "ParseRequestURI": true, - "PathEscape": true, - "PathUnescape": true, - "QueryEscape": true, - "QueryUnescape": true, - "URL": true, - "User": true, - "UserPassword": true, - "Userinfo": true, - "Values": true, - }, - "os": map[string]bool{ - "Args": true, - "Chdir": true, - "Chmod": true, - "Chown": true, - "Chtimes": true, - "Clearenv": true, - "Create": true, - "DevNull": true, - "Environ": true, - "ErrClosed": true, - "ErrExist": true, - "ErrInvalid": true, - "ErrNoDeadline": true, - "ErrNotExist": true, - "ErrPermission": true, - "Executable": true, - "Exit": true, - "Expand": true, - "ExpandEnv": true, - "File": true, - "FileInfo": true, - "FileMode": true, - "FindProcess": true, - "Getegid": true, - "Getenv": true, - "Geteuid": true, - "Getgid": true, - "Getgroups": true, - "Getpagesize": true, - "Getpid": true, - "Getppid": true, - "Getuid": true, - "Getwd": true, - "Hostname": true, - "Interrupt": true, - "IsExist": true, - "IsNotExist": true, - "IsPathSeparator": true, - "IsPermission": true, - "IsTimeout": true, - "Kill": true, - "Lchown": true, - "Link": true, - "LinkError": true, - "LookupEnv": true, - "Lstat": true, - "Mkdir": true, - "MkdirAll": true, - "ModeAppend": true, - "ModeCharDevice": true, - "ModeDevice": true, - "ModeDir": true, - "ModeExclusive": true, - "ModeIrregular": true, - "ModeNamedPipe": true, - "ModePerm": true, - "ModeSetgid": true, - "ModeSetuid": true, - "ModeSocket": true, - "ModeSticky": true, - "ModeSymlink": true, - "ModeTemporary": true, - "ModeType": true, - "NewFile": true, - "NewSyscallError": true, - "O_APPEND": true, - "O_CREATE": true, - "O_EXCL": true, - "O_RDONLY": true, - "O_RDWR": true, - "O_SYNC": true, - "O_TRUNC": true, - "O_WRONLY": true, - "Open": true, - "OpenFile": true, - "PathError": true, - "PathListSeparator": true, - "PathSeparator": true, - "Pipe": true, - "ProcAttr": true, - "Process": true, - "ProcessState": true, - "Readlink": true, - "Remove": true, - "RemoveAll": true, - "Rename": true, - "SEEK_CUR": true, - "SEEK_END": true, - "SEEK_SET": true, - "SameFile": true, - "Setenv": true, - "Signal": true, - "StartProcess": true, - "Stat": true, - "Stderr": true, - "Stdin": true, - "Stdout": true, - "Symlink": true, - "SyscallError": true, - "TempDir": true, - "Truncate": true, - "Unsetenv": true, - "UserCacheDir": true, - "UserConfigDir": true, - "UserHomeDir": true, - }, - "os/exec": map[string]bool{ - "Cmd": true, - "Command": true, - "CommandContext": true, - "ErrNotFound": true, - "Error": true, - "ExitError": true, - "LookPath": true, - }, - "os/signal": map[string]bool{ - "Ignore": true, - "Ignored": true, - "Notify": true, - "Reset": true, - "Stop": true, - }, - "os/user": map[string]bool{ - "Current": true, - "Group": true, - "Lookup": true, - "LookupGroup": true, - "LookupGroupId": true, - "LookupId": true, - "UnknownGroupError": true, - "UnknownGroupIdError": true, - "UnknownUserError": true, - "UnknownUserIdError": true, - "User": true, - }, - "path": map[string]bool{ - "Base": true, - "Clean": true, - "Dir": true, - "ErrBadPattern": true, - "Ext": true, - "IsAbs": true, - "Join": true, - "Match": true, - "Split": true, - }, - "path/filepath": map[string]bool{ - "Abs": true, - "Base": true, - "Clean": true, - "Dir": true, - "ErrBadPattern": true, - "EvalSymlinks": true, - "Ext": true, - "FromSlash": true, - "Glob": true, - "HasPrefix": true, - "IsAbs": true, - "Join": true, - "ListSeparator": true, - "Match": true, - "Rel": true, - "Separator": true, - "SkipDir": true, - "Split": true, - "SplitList": true, - "ToSlash": true, - "VolumeName": true, - "Walk": true, - "WalkFunc": true, - }, - "plugin": map[string]bool{ - "Open": true, - "Plugin": true, - "Symbol": true, - }, - "reflect": map[string]bool{ - "Append": true, - "AppendSlice": true, - "Array": true, - "ArrayOf": true, - "Bool": true, - "BothDir": true, - "Chan": true, - "ChanDir": true, - "ChanOf": true, - "Complex128": true, - "Complex64": true, - "Copy": true, - "DeepEqual": true, - "Float32": true, - "Float64": true, - "Func": true, - "FuncOf": true, - "Indirect": true, - "Int": true, - "Int16": true, - "Int32": true, - "Int64": true, - "Int8": true, - "Interface": true, - "Invalid": true, - "Kind": true, - "MakeChan": true, - "MakeFunc": true, - "MakeMap": true, - "MakeMapWithSize": true, - "MakeSlice": true, - "Map": true, - "MapIter": true, - "MapOf": true, - "Method": true, - "New": true, - "NewAt": true, - "Ptr": true, - "PtrTo": true, - "RecvDir": true, - "Select": true, - "SelectCase": true, - "SelectDefault": true, - "SelectDir": true, - "SelectRecv": true, - "SelectSend": true, - "SendDir": true, - "Slice": true, - "SliceHeader": true, - "SliceOf": true, - "String": true, - "StringHeader": true, - "Struct": true, - "StructField": true, - "StructOf": true, - "StructTag": true, - "Swapper": true, - "Type": true, - "TypeOf": true, - "Uint": true, - "Uint16": true, - "Uint32": true, - "Uint64": true, - "Uint8": true, - "Uintptr": true, - "UnsafePointer": true, - "Value": true, - "ValueError": true, - "ValueOf": true, - "Zero": true, - }, - "regexp": map[string]bool{ - "Compile": true, - "CompilePOSIX": true, - "Match": true, - "MatchReader": true, - "MatchString": true, - "MustCompile": true, - "MustCompilePOSIX": true, - "QuoteMeta": true, - "Regexp": true, - }, - "regexp/syntax": map[string]bool{ - "ClassNL": true, - "Compile": true, - "DotNL": true, - "EmptyBeginLine": true, - "EmptyBeginText": true, - "EmptyEndLine": true, - "EmptyEndText": true, - "EmptyNoWordBoundary": true, - "EmptyOp": true, - "EmptyOpContext": true, - "EmptyWordBoundary": true, - "ErrInternalError": true, - "ErrInvalidCharClass": true, - "ErrInvalidCharRange": true, - "ErrInvalidEscape": true, - "ErrInvalidNamedCapture": true, - "ErrInvalidPerlOp": true, - "ErrInvalidRepeatOp": true, - "ErrInvalidRepeatSize": true, - "ErrInvalidUTF8": true, - "ErrMissingBracket": true, - "ErrMissingParen": true, - "ErrMissingRepeatArgument": true, - "ErrTrailingBackslash": true, - "ErrUnexpectedParen": true, - "Error": true, - "ErrorCode": true, - "Flags": true, - "FoldCase": true, - "Inst": true, - "InstAlt": true, - "InstAltMatch": true, - "InstCapture": true, - "InstEmptyWidth": true, - "InstFail": true, - "InstMatch": true, - "InstNop": true, - "InstOp": true, - "InstRune": true, - "InstRune1": true, - "InstRuneAny": true, - "InstRuneAnyNotNL": true, - "IsWordChar": true, - "Literal": true, - "MatchNL": true, - "NonGreedy": true, - "OneLine": true, - "Op": true, - "OpAlternate": true, - "OpAnyChar": true, - "OpAnyCharNotNL": true, - "OpBeginLine": true, - "OpBeginText": true, - "OpCapture": true, - "OpCharClass": true, - "OpConcat": true, - "OpEmptyMatch": true, - "OpEndLine": true, - "OpEndText": true, - "OpLiteral": true, - "OpNoMatch": true, - "OpNoWordBoundary": true, - "OpPlus": true, - "OpQuest": true, - "OpRepeat": true, - "OpStar": true, - "OpWordBoundary": true, - "POSIX": true, - "Parse": true, - "Perl": true, - "PerlX": true, - "Prog": true, - "Regexp": true, - "Simple": true, - "UnicodeGroups": true, - "WasDollar": true, - }, - "runtime": map[string]bool{ - "BlockProfile": true, - "BlockProfileRecord": true, - "Breakpoint": true, - "CPUProfile": true, - "Caller": true, - "Callers": true, - "CallersFrames": true, - "Compiler": true, - "Error": true, - "Frame": true, - "Frames": true, - "Func": true, - "FuncForPC": true, - "GC": true, - "GOARCH": true, - "GOMAXPROCS": true, - "GOOS": true, - "GOROOT": true, - "Goexit": true, - "GoroutineProfile": true, - "Gosched": true, - "KeepAlive": true, - "LockOSThread": true, - "MemProfile": true, - "MemProfileRate": true, - "MemProfileRecord": true, - "MemStats": true, - "MutexProfile": true, - "NumCPU": true, - "NumCgoCall": true, - "NumGoroutine": true, - "ReadMemStats": true, - "ReadTrace": true, - "SetBlockProfileRate": true, - "SetCPUProfileRate": true, - "SetCgoTraceback": true, - "SetFinalizer": true, - "SetMutexProfileFraction": true, - "Stack": true, - "StackRecord": true, - "StartTrace": true, - "StopTrace": true, - "ThreadCreateProfile": true, - "TypeAssertionError": true, - "UnlockOSThread": true, - "Version": true, - }, - "runtime/debug": map[string]bool{ - "BuildInfo": true, - "FreeOSMemory": true, - "GCStats": true, - "Module": true, - "PrintStack": true, - "ReadBuildInfo": true, - "ReadGCStats": true, - "SetGCPercent": true, - "SetMaxStack": true, - "SetMaxThreads": true, - "SetPanicOnFault": true, - "SetTraceback": true, - "Stack": true, - "WriteHeapDump": true, - }, - "runtime/pprof": map[string]bool{ - "Do": true, - "ForLabels": true, - "Label": true, - "LabelSet": true, - "Labels": true, - "Lookup": true, - "NewProfile": true, - "Profile": true, - "Profiles": true, - "SetGoroutineLabels": true, - "StartCPUProfile": true, - "StopCPUProfile": true, - "WithLabels": true, - "WriteHeapProfile": true, - }, - "runtime/trace": map[string]bool{ - "IsEnabled": true, - "Log": true, - "Logf": true, - "NewTask": true, - "Region": true, - "Start": true, - "StartRegion": true, - "Stop": true, - "Task": true, - "WithRegion": true, - }, - "sort": map[string]bool{ - "Float64Slice": true, - "Float64s": true, - "Float64sAreSorted": true, - "IntSlice": true, - "Interface": true, - "Ints": true, - "IntsAreSorted": true, - "IsSorted": true, - "Reverse": true, - "Search": true, - "SearchFloat64s": true, - "SearchInts": true, - "SearchStrings": true, - "Slice": true, - "SliceIsSorted": true, - "SliceStable": true, - "Sort": true, - "Stable": true, - "StringSlice": true, - "Strings": true, - "StringsAreSorted": true, - }, - "strconv": map[string]bool{ - "AppendBool": true, - "AppendFloat": true, - "AppendInt": true, - "AppendQuote": true, - "AppendQuoteRune": true, - "AppendQuoteRuneToASCII": true, - "AppendQuoteRuneToGraphic": true, - "AppendQuoteToASCII": true, - "AppendQuoteToGraphic": true, - "AppendUint": true, - "Atoi": true, - "CanBackquote": true, - "ErrRange": true, - "ErrSyntax": true, - "FormatBool": true, - "FormatFloat": true, - "FormatInt": true, - "FormatUint": true, - "IntSize": true, - "IsGraphic": true, - "IsPrint": true, - "Itoa": true, - "NumError": true, - "ParseBool": true, - "ParseFloat": true, - "ParseInt": true, - "ParseUint": true, - "Quote": true, - "QuoteRune": true, - "QuoteRuneToASCII": true, - "QuoteRuneToGraphic": true, - "QuoteToASCII": true, - "QuoteToGraphic": true, - "Unquote": true, - "UnquoteChar": true, - }, - "strings": map[string]bool{ - "Builder": true, - "Compare": true, - "Contains": true, - "ContainsAny": true, - "ContainsRune": true, - "Count": true, - "EqualFold": true, - "Fields": true, - "FieldsFunc": true, - "HasPrefix": true, - "HasSuffix": true, - "Index": true, - "IndexAny": true, - "IndexByte": true, - "IndexFunc": true, - "IndexRune": true, - "Join": true, - "LastIndex": true, - "LastIndexAny": true, - "LastIndexByte": true, - "LastIndexFunc": true, - "Map": true, - "NewReader": true, - "NewReplacer": true, - "Reader": true, - "Repeat": true, - "Replace": true, - "ReplaceAll": true, - "Replacer": true, - "Split": true, - "SplitAfter": true, - "SplitAfterN": true, - "SplitN": true, - "Title": true, - "ToLower": true, - "ToLowerSpecial": true, - "ToTitle": true, - "ToTitleSpecial": true, - "ToUpper": true, - "ToUpperSpecial": true, - "ToValidUTF8": true, - "Trim": true, - "TrimFunc": true, - "TrimLeft": true, - "TrimLeftFunc": true, - "TrimPrefix": true, - "TrimRight": true, - "TrimRightFunc": true, - "TrimSpace": true, - "TrimSuffix": true, - }, - "sync": map[string]bool{ - "Cond": true, - "Locker": true, - "Map": true, - "Mutex": true, - "NewCond": true, - "Once": true, - "Pool": true, - "RWMutex": true, - "WaitGroup": true, - }, - "sync/atomic": map[string]bool{ - "AddInt32": true, - "AddInt64": true, - "AddUint32": true, - "AddUint64": true, - "AddUintptr": true, - "CompareAndSwapInt32": true, - "CompareAndSwapInt64": true, - "CompareAndSwapPointer": true, - "CompareAndSwapUint32": true, - "CompareAndSwapUint64": true, - "CompareAndSwapUintptr": true, - "LoadInt32": true, - "LoadInt64": true, - "LoadPointer": true, - "LoadUint32": true, - "LoadUint64": true, - "LoadUintptr": true, - "StoreInt32": true, - "StoreInt64": true, - "StorePointer": true, - "StoreUint32": true, - "StoreUint64": true, - "StoreUintptr": true, - "SwapInt32": true, - "SwapInt64": true, - "SwapPointer": true, - "SwapUint32": true, - "SwapUint64": true, - "SwapUintptr": true, - "Value": true, - }, - "syscall": map[string]bool{ - "AF_ALG": true, - "AF_APPLETALK": true, - "AF_ARP": true, - "AF_ASH": true, - "AF_ATM": true, - "AF_ATMPVC": true, - "AF_ATMSVC": true, - "AF_AX25": true, - "AF_BLUETOOTH": true, - "AF_BRIDGE": true, - "AF_CAIF": true, - "AF_CAN": true, - "AF_CCITT": true, - "AF_CHAOS": true, - "AF_CNT": true, - "AF_COIP": true, - "AF_DATAKIT": true, - "AF_DECnet": true, - "AF_DLI": true, - "AF_E164": true, - "AF_ECMA": true, - "AF_ECONET": true, - "AF_ENCAP": true, - "AF_FILE": true, - "AF_HYLINK": true, - "AF_IEEE80211": true, - "AF_IEEE802154": true, - "AF_IMPLINK": true, - "AF_INET": true, - "AF_INET6": true, - "AF_INET6_SDP": true, - "AF_INET_SDP": true, - "AF_IPX": true, - "AF_IRDA": true, - "AF_ISDN": true, - "AF_ISO": true, - "AF_IUCV": true, - "AF_KEY": true, - "AF_LAT": true, - "AF_LINK": true, - "AF_LLC": true, - "AF_LOCAL": true, - "AF_MAX": true, - "AF_MPLS": true, - "AF_NATM": true, - "AF_NDRV": true, - "AF_NETBEUI": true, - "AF_NETBIOS": true, - "AF_NETGRAPH": true, - "AF_NETLINK": true, - "AF_NETROM": true, - "AF_NS": true, - "AF_OROUTE": true, - "AF_OSI": true, - "AF_PACKET": true, - "AF_PHONET": true, - "AF_PPP": true, - "AF_PPPOX": true, - "AF_PUP": true, - "AF_RDS": true, - "AF_RESERVED_36": true, - "AF_ROSE": true, - "AF_ROUTE": true, - "AF_RXRPC": true, - "AF_SCLUSTER": true, - "AF_SECURITY": true, - "AF_SIP": true, - "AF_SLOW": true, - "AF_SNA": true, - "AF_SYSTEM": true, - "AF_TIPC": true, - "AF_UNIX": true, - "AF_UNSPEC": true, - "AF_VENDOR00": true, - "AF_VENDOR01": true, - "AF_VENDOR02": true, - "AF_VENDOR03": true, - "AF_VENDOR04": true, - "AF_VENDOR05": true, - "AF_VENDOR06": true, - "AF_VENDOR07": true, - "AF_VENDOR08": true, - "AF_VENDOR09": true, - "AF_VENDOR10": true, - "AF_VENDOR11": true, - "AF_VENDOR12": true, - "AF_VENDOR13": true, - "AF_VENDOR14": true, - "AF_VENDOR15": true, - "AF_VENDOR16": true, - "AF_VENDOR17": true, - "AF_VENDOR18": true, - "AF_VENDOR19": true, - "AF_VENDOR20": true, - "AF_VENDOR21": true, - "AF_VENDOR22": true, - "AF_VENDOR23": true, - "AF_VENDOR24": true, - "AF_VENDOR25": true, - "AF_VENDOR26": true, - "AF_VENDOR27": true, - "AF_VENDOR28": true, - "AF_VENDOR29": true, - "AF_VENDOR30": true, - "AF_VENDOR31": true, - "AF_VENDOR32": true, - "AF_VENDOR33": true, - "AF_VENDOR34": true, - "AF_VENDOR35": true, - "AF_VENDOR36": true, - "AF_VENDOR37": true, - "AF_VENDOR38": true, - "AF_VENDOR39": true, - "AF_VENDOR40": true, - "AF_VENDOR41": true, - "AF_VENDOR42": true, - "AF_VENDOR43": true, - "AF_VENDOR44": true, - "AF_VENDOR45": true, - "AF_VENDOR46": true, - "AF_VENDOR47": true, - "AF_WANPIPE": true, - "AF_X25": true, - "AI_CANONNAME": true, - "AI_NUMERICHOST": true, - "AI_PASSIVE": true, - "APPLICATION_ERROR": true, - "ARPHRD_ADAPT": true, - "ARPHRD_APPLETLK": true, - "ARPHRD_ARCNET": true, - "ARPHRD_ASH": true, - "ARPHRD_ATM": true, - "ARPHRD_AX25": true, - "ARPHRD_BIF": true, - "ARPHRD_CHAOS": true, - "ARPHRD_CISCO": true, - "ARPHRD_CSLIP": true, - "ARPHRD_CSLIP6": true, - "ARPHRD_DDCMP": true, - "ARPHRD_DLCI": true, - "ARPHRD_ECONET": true, - "ARPHRD_EETHER": true, - "ARPHRD_ETHER": true, - "ARPHRD_EUI64": true, - "ARPHRD_FCAL": true, - "ARPHRD_FCFABRIC": true, - "ARPHRD_FCPL": true, - "ARPHRD_FCPP": true, - "ARPHRD_FDDI": true, - "ARPHRD_FRAD": true, - "ARPHRD_FRELAY": true, - "ARPHRD_HDLC": true, - "ARPHRD_HIPPI": true, - "ARPHRD_HWX25": true, - "ARPHRD_IEEE1394": true, - "ARPHRD_IEEE802": true, - "ARPHRD_IEEE80211": true, - "ARPHRD_IEEE80211_PRISM": true, - "ARPHRD_IEEE80211_RADIOTAP": true, - "ARPHRD_IEEE802154": true, - "ARPHRD_IEEE802154_PHY": true, - "ARPHRD_IEEE802_TR": true, - "ARPHRD_INFINIBAND": true, - "ARPHRD_IPDDP": true, - "ARPHRD_IPGRE": true, - "ARPHRD_IRDA": true, - "ARPHRD_LAPB": true, - "ARPHRD_LOCALTLK": true, - "ARPHRD_LOOPBACK": true, - "ARPHRD_METRICOM": true, - "ARPHRD_NETROM": true, - "ARPHRD_NONE": true, - "ARPHRD_PIMREG": true, - "ARPHRD_PPP": true, - "ARPHRD_PRONET": true, - "ARPHRD_RAWHDLC": true, - "ARPHRD_ROSE": true, - "ARPHRD_RSRVD": true, - "ARPHRD_SIT": true, - "ARPHRD_SKIP": true, - "ARPHRD_SLIP": true, - "ARPHRD_SLIP6": true, - "ARPHRD_STRIP": true, - "ARPHRD_TUNNEL": true, - "ARPHRD_TUNNEL6": true, - "ARPHRD_VOID": true, - "ARPHRD_X25": true, - "AUTHTYPE_CLIENT": true, - "AUTHTYPE_SERVER": true, - "Accept": true, - "Accept4": true, - "AcceptEx": true, - "Access": true, - "Acct": true, - "AddrinfoW": true, - "Adjtime": true, - "Adjtimex": true, - "AttachLsf": true, - "B0": true, - "B1000000": true, - "B110": true, - "B115200": true, - "B1152000": true, - "B1200": true, - "B134": true, - "B14400": true, - "B150": true, - "B1500000": true, - "B1800": true, - "B19200": true, - "B200": true, - "B2000000": true, - "B230400": true, - "B2400": true, - "B2500000": true, - "B28800": true, - "B300": true, - "B3000000": true, - "B3500000": true, - "B38400": true, - "B4000000": true, - "B460800": true, - "B4800": true, - "B50": true, - "B500000": true, - "B57600": true, - "B576000": true, - "B600": true, - "B7200": true, - "B75": true, - "B76800": true, - "B921600": true, - "B9600": true, - "BASE_PROTOCOL": true, - "BIOCFEEDBACK": true, - "BIOCFLUSH": true, - "BIOCGBLEN": true, - "BIOCGDIRECTION": true, - "BIOCGDIRFILT": true, - "BIOCGDLT": true, - "BIOCGDLTLIST": true, - "BIOCGETBUFMODE": true, - "BIOCGETIF": true, - "BIOCGETZMAX": true, - "BIOCGFEEDBACK": true, - "BIOCGFILDROP": true, - "BIOCGHDRCMPLT": true, - "BIOCGRSIG": true, - "BIOCGRTIMEOUT": true, - "BIOCGSEESENT": true, - "BIOCGSTATS": true, - "BIOCGSTATSOLD": true, - "BIOCGTSTAMP": true, - "BIOCIMMEDIATE": true, - "BIOCLOCK": true, - "BIOCPROMISC": true, - "BIOCROTZBUF": true, - "BIOCSBLEN": true, - "BIOCSDIRECTION": true, - "BIOCSDIRFILT": true, - "BIOCSDLT": true, - "BIOCSETBUFMODE": true, - "BIOCSETF": true, - "BIOCSETFNR": true, - "BIOCSETIF": true, - "BIOCSETWF": true, - "BIOCSETZBUF": true, - "BIOCSFEEDBACK": true, - "BIOCSFILDROP": true, - "BIOCSHDRCMPLT": true, - "BIOCSRSIG": true, - "BIOCSRTIMEOUT": true, - "BIOCSSEESENT": true, - "BIOCSTCPF": true, - "BIOCSTSTAMP": true, - "BIOCSUDPF": true, - "BIOCVERSION": true, - "BPF_A": true, - "BPF_ABS": true, - "BPF_ADD": true, - "BPF_ALIGNMENT": true, - "BPF_ALIGNMENT32": true, - "BPF_ALU": true, - "BPF_AND": true, - "BPF_B": true, - "BPF_BUFMODE_BUFFER": true, - "BPF_BUFMODE_ZBUF": true, - "BPF_DFLTBUFSIZE": true, - "BPF_DIRECTION_IN": true, - "BPF_DIRECTION_OUT": true, - "BPF_DIV": true, - "BPF_H": true, - "BPF_IMM": true, - "BPF_IND": true, - "BPF_JA": true, - "BPF_JEQ": true, - "BPF_JGE": true, - "BPF_JGT": true, - "BPF_JMP": true, - "BPF_JSET": true, - "BPF_K": true, - "BPF_LD": true, - "BPF_LDX": true, - "BPF_LEN": true, - "BPF_LSH": true, - "BPF_MAJOR_VERSION": true, - "BPF_MAXBUFSIZE": true, - "BPF_MAXINSNS": true, - "BPF_MEM": true, - "BPF_MEMWORDS": true, - "BPF_MINBUFSIZE": true, - "BPF_MINOR_VERSION": true, - "BPF_MISC": true, - "BPF_MSH": true, - "BPF_MUL": true, - "BPF_NEG": true, - "BPF_OR": true, - "BPF_RELEASE": true, - "BPF_RET": true, - "BPF_RSH": true, - "BPF_ST": true, - "BPF_STX": true, - "BPF_SUB": true, - "BPF_TAX": true, - "BPF_TXA": true, - "BPF_T_BINTIME": true, - "BPF_T_BINTIME_FAST": true, - "BPF_T_BINTIME_MONOTONIC": true, - "BPF_T_BINTIME_MONOTONIC_FAST": true, - "BPF_T_FAST": true, - "BPF_T_FLAG_MASK": true, - "BPF_T_FORMAT_MASK": true, - "BPF_T_MICROTIME": true, - "BPF_T_MICROTIME_FAST": true, - "BPF_T_MICROTIME_MONOTONIC": true, - "BPF_T_MICROTIME_MONOTONIC_FAST": true, - "BPF_T_MONOTONIC": true, - "BPF_T_MONOTONIC_FAST": true, - "BPF_T_NANOTIME": true, - "BPF_T_NANOTIME_FAST": true, - "BPF_T_NANOTIME_MONOTONIC": true, - "BPF_T_NANOTIME_MONOTONIC_FAST": true, - "BPF_T_NONE": true, - "BPF_T_NORMAL": true, - "BPF_W": true, - "BPF_X": true, - "BRKINT": true, - "Bind": true, - "BindToDevice": true, - "BpfBuflen": true, - "BpfDatalink": true, - "BpfHdr": true, - "BpfHeadercmpl": true, - "BpfInsn": true, - "BpfInterface": true, - "BpfJump": true, - "BpfProgram": true, - "BpfStat": true, - "BpfStats": true, - "BpfStmt": true, - "BpfTimeout": true, - "BpfTimeval": true, - "BpfVersion": true, - "BpfZbuf": true, - "BpfZbufHeader": true, - "ByHandleFileInformation": true, - "BytePtrFromString": true, - "ByteSliceFromString": true, - "CCR0_FLUSH": true, - "CERT_CHAIN_POLICY_AUTHENTICODE": true, - "CERT_CHAIN_POLICY_AUTHENTICODE_TS": true, - "CERT_CHAIN_POLICY_BASE": true, - "CERT_CHAIN_POLICY_BASIC_CONSTRAINTS": true, - "CERT_CHAIN_POLICY_EV": true, - "CERT_CHAIN_POLICY_MICROSOFT_ROOT": true, - "CERT_CHAIN_POLICY_NT_AUTH": true, - "CERT_CHAIN_POLICY_SSL": true, - "CERT_E_CN_NO_MATCH": true, - "CERT_E_EXPIRED": true, - "CERT_E_PURPOSE": true, - "CERT_E_ROLE": true, - "CERT_E_UNTRUSTEDROOT": true, - "CERT_STORE_ADD_ALWAYS": true, - "CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG": true, - "CERT_STORE_PROV_MEMORY": true, - "CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT": true, - "CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT": true, - "CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT": true, - "CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT": true, - "CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT": true, - "CERT_TRUST_INVALID_BASIC_CONSTRAINTS": true, - "CERT_TRUST_INVALID_EXTENSION": true, - "CERT_TRUST_INVALID_NAME_CONSTRAINTS": true, - "CERT_TRUST_INVALID_POLICY_CONSTRAINTS": true, - "CERT_TRUST_IS_CYCLIC": true, - "CERT_TRUST_IS_EXPLICIT_DISTRUST": true, - "CERT_TRUST_IS_NOT_SIGNATURE_VALID": true, - "CERT_TRUST_IS_NOT_TIME_VALID": true, - "CERT_TRUST_IS_NOT_VALID_FOR_USAGE": true, - "CERT_TRUST_IS_OFFLINE_REVOCATION": true, - "CERT_TRUST_IS_REVOKED": true, - "CERT_TRUST_IS_UNTRUSTED_ROOT": true, - "CERT_TRUST_NO_ERROR": true, - "CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY": true, - "CERT_TRUST_REVOCATION_STATUS_UNKNOWN": true, - "CFLUSH": true, - "CLOCAL": true, - "CLONE_CHILD_CLEARTID": true, - "CLONE_CHILD_SETTID": true, - "CLONE_CSIGNAL": true, - "CLONE_DETACHED": true, - "CLONE_FILES": true, - "CLONE_FS": true, - "CLONE_IO": true, - "CLONE_NEWIPC": true, - "CLONE_NEWNET": true, - "CLONE_NEWNS": true, - "CLONE_NEWPID": true, - "CLONE_NEWUSER": true, - "CLONE_NEWUTS": true, - "CLONE_PARENT": true, - "CLONE_PARENT_SETTID": true, - "CLONE_PID": true, - "CLONE_PTRACE": true, - "CLONE_SETTLS": true, - "CLONE_SIGHAND": true, - "CLONE_SYSVSEM": true, - "CLONE_THREAD": true, - "CLONE_UNTRACED": true, - "CLONE_VFORK": true, - "CLONE_VM": true, - "CPUID_CFLUSH": true, - "CREAD": true, - "CREATE_ALWAYS": true, - "CREATE_NEW": true, - "CREATE_NEW_PROCESS_GROUP": true, - "CREATE_UNICODE_ENVIRONMENT": true, - "CRYPT_DEFAULT_CONTAINER_OPTIONAL": true, - "CRYPT_DELETEKEYSET": true, - "CRYPT_MACHINE_KEYSET": true, - "CRYPT_NEWKEYSET": true, - "CRYPT_SILENT": true, - "CRYPT_VERIFYCONTEXT": true, - "CS5": true, - "CS6": true, - "CS7": true, - "CS8": true, - "CSIZE": true, - "CSTART": true, - "CSTATUS": true, - "CSTOP": true, - "CSTOPB": true, - "CSUSP": true, - "CTL_MAXNAME": true, - "CTL_NET": true, - "CTL_QUERY": true, - "CTRL_BREAK_EVENT": true, - "CTRL_C_EVENT": true, - "CancelIo": true, - "CancelIoEx": true, - "CertAddCertificateContextToStore": true, - "CertChainContext": true, - "CertChainElement": true, - "CertChainPara": true, - "CertChainPolicyPara": true, - "CertChainPolicyStatus": true, - "CertCloseStore": true, - "CertContext": true, - "CertCreateCertificateContext": true, - "CertEnhKeyUsage": true, - "CertEnumCertificatesInStore": true, - "CertFreeCertificateChain": true, - "CertFreeCertificateContext": true, - "CertGetCertificateChain": true, - "CertInfo": true, - "CertOpenStore": true, - "CertOpenSystemStore": true, - "CertRevocationCrlInfo": true, - "CertRevocationInfo": true, - "CertSimpleChain": true, - "CertTrustListInfo": true, - "CertTrustStatus": true, - "CertUsageMatch": true, - "CertVerifyCertificateChainPolicy": true, - "Chdir": true, - "CheckBpfVersion": true, - "Chflags": true, - "Chmod": true, - "Chown": true, - "Chroot": true, - "Clearenv": true, - "Close": true, - "CloseHandle": true, - "CloseOnExec": true, - "Closesocket": true, - "CmsgLen": true, - "CmsgSpace": true, - "Cmsghdr": true, - "CommandLineToArgv": true, - "ComputerName": true, - "Conn": true, - "Connect": true, - "ConnectEx": true, - "ConvertSidToStringSid": true, - "ConvertStringSidToSid": true, - "CopySid": true, - "Creat": true, - "CreateDirectory": true, - "CreateFile": true, - "CreateFileMapping": true, - "CreateHardLink": true, - "CreateIoCompletionPort": true, - "CreatePipe": true, - "CreateProcess": true, - "CreateProcessAsUser": true, - "CreateSymbolicLink": true, - "CreateToolhelp32Snapshot": true, - "Credential": true, - "CryptAcquireContext": true, - "CryptGenRandom": true, - "CryptReleaseContext": true, - "DIOCBSFLUSH": true, - "DIOCOSFPFLUSH": true, - "DLL": true, - "DLLError": true, - "DLT_A429": true, - "DLT_A653_ICM": true, - "DLT_AIRONET_HEADER": true, - "DLT_AOS": true, - "DLT_APPLE_IP_OVER_IEEE1394": true, - "DLT_ARCNET": true, - "DLT_ARCNET_LINUX": true, - "DLT_ATM_CLIP": true, - "DLT_ATM_RFC1483": true, - "DLT_AURORA": true, - "DLT_AX25": true, - "DLT_AX25_KISS": true, - "DLT_BACNET_MS_TP": true, - "DLT_BLUETOOTH_HCI_H4": true, - "DLT_BLUETOOTH_HCI_H4_WITH_PHDR": true, - "DLT_CAN20B": true, - "DLT_CAN_SOCKETCAN": true, - "DLT_CHAOS": true, - "DLT_CHDLC": true, - "DLT_CISCO_IOS": true, - "DLT_C_HDLC": true, - "DLT_C_HDLC_WITH_DIR": true, - "DLT_DBUS": true, - "DLT_DECT": true, - "DLT_DOCSIS": true, - "DLT_DVB_CI": true, - "DLT_ECONET": true, - "DLT_EN10MB": true, - "DLT_EN3MB": true, - "DLT_ENC": true, - "DLT_ERF": true, - "DLT_ERF_ETH": true, - "DLT_ERF_POS": true, - "DLT_FC_2": true, - "DLT_FC_2_WITH_FRAME_DELIMS": true, - "DLT_FDDI": true, - "DLT_FLEXRAY": true, - "DLT_FRELAY": true, - "DLT_FRELAY_WITH_DIR": true, - "DLT_GCOM_SERIAL": true, - "DLT_GCOM_T1E1": true, - "DLT_GPF_F": true, - "DLT_GPF_T": true, - "DLT_GPRS_LLC": true, - "DLT_GSMTAP_ABIS": true, - "DLT_GSMTAP_UM": true, - "DLT_HDLC": true, - "DLT_HHDLC": true, - "DLT_HIPPI": true, - "DLT_IBM_SN": true, - "DLT_IBM_SP": true, - "DLT_IEEE802": true, - "DLT_IEEE802_11": true, - "DLT_IEEE802_11_RADIO": true, - "DLT_IEEE802_11_RADIO_AVS": true, - "DLT_IEEE802_15_4": true, - "DLT_IEEE802_15_4_LINUX": true, - "DLT_IEEE802_15_4_NOFCS": true, - "DLT_IEEE802_15_4_NONASK_PHY": true, - "DLT_IEEE802_16_MAC_CPS": true, - "DLT_IEEE802_16_MAC_CPS_RADIO": true, - "DLT_IPFILTER": true, - "DLT_IPMB": true, - "DLT_IPMB_LINUX": true, - "DLT_IPNET": true, - "DLT_IPOIB": true, - "DLT_IPV4": true, - "DLT_IPV6": true, - "DLT_IP_OVER_FC": true, - "DLT_JUNIPER_ATM1": true, - "DLT_JUNIPER_ATM2": true, - "DLT_JUNIPER_ATM_CEMIC": true, - "DLT_JUNIPER_CHDLC": true, - "DLT_JUNIPER_ES": true, - "DLT_JUNIPER_ETHER": true, - "DLT_JUNIPER_FIBRECHANNEL": true, - "DLT_JUNIPER_FRELAY": true, - "DLT_JUNIPER_GGSN": true, - "DLT_JUNIPER_ISM": true, - "DLT_JUNIPER_MFR": true, - "DLT_JUNIPER_MLFR": true, - "DLT_JUNIPER_MLPPP": true, - "DLT_JUNIPER_MONITOR": true, - "DLT_JUNIPER_PIC_PEER": true, - "DLT_JUNIPER_PPP": true, - "DLT_JUNIPER_PPPOE": true, - "DLT_JUNIPER_PPPOE_ATM": true, - "DLT_JUNIPER_SERVICES": true, - "DLT_JUNIPER_SRX_E2E": true, - "DLT_JUNIPER_ST": true, - "DLT_JUNIPER_VP": true, - "DLT_JUNIPER_VS": true, - "DLT_LAPB_WITH_DIR": true, - "DLT_LAPD": true, - "DLT_LIN": true, - "DLT_LINUX_EVDEV": true, - "DLT_LINUX_IRDA": true, - "DLT_LINUX_LAPD": true, - "DLT_LINUX_PPP_WITHDIRECTION": true, - "DLT_LINUX_SLL": true, - "DLT_LOOP": true, - "DLT_LTALK": true, - "DLT_MATCHING_MAX": true, - "DLT_MATCHING_MIN": true, - "DLT_MFR": true, - "DLT_MOST": true, - "DLT_MPEG_2_TS": true, - "DLT_MPLS": true, - "DLT_MTP2": true, - "DLT_MTP2_WITH_PHDR": true, - "DLT_MTP3": true, - "DLT_MUX27010": true, - "DLT_NETANALYZER": true, - "DLT_NETANALYZER_TRANSPARENT": true, - "DLT_NFC_LLCP": true, - "DLT_NFLOG": true, - "DLT_NG40": true, - "DLT_NULL": true, - "DLT_PCI_EXP": true, - "DLT_PFLOG": true, - "DLT_PFSYNC": true, - "DLT_PPI": true, - "DLT_PPP": true, - "DLT_PPP_BSDOS": true, - "DLT_PPP_ETHER": true, - "DLT_PPP_PPPD": true, - "DLT_PPP_SERIAL": true, - "DLT_PPP_WITH_DIR": true, - "DLT_PPP_WITH_DIRECTION": true, - "DLT_PRISM_HEADER": true, - "DLT_PRONET": true, - "DLT_RAIF1": true, - "DLT_RAW": true, - "DLT_RAWAF_MASK": true, - "DLT_RIO": true, - "DLT_SCCP": true, - "DLT_SITA": true, - "DLT_SLIP": true, - "DLT_SLIP_BSDOS": true, - "DLT_STANAG_5066_D_PDU": true, - "DLT_SUNATM": true, - "DLT_SYMANTEC_FIREWALL": true, - "DLT_TZSP": true, - "DLT_USB": true, - "DLT_USB_LINUX": true, - "DLT_USB_LINUX_MMAPPED": true, - "DLT_USER0": true, - "DLT_USER1": true, - "DLT_USER10": true, - "DLT_USER11": true, - "DLT_USER12": true, - "DLT_USER13": true, - "DLT_USER14": true, - "DLT_USER15": true, - "DLT_USER2": true, - "DLT_USER3": true, - "DLT_USER4": true, - "DLT_USER5": true, - "DLT_USER6": true, - "DLT_USER7": true, - "DLT_USER8": true, - "DLT_USER9": true, - "DLT_WIHART": true, - "DLT_X2E_SERIAL": true, - "DLT_X2E_XORAYA": true, - "DNSMXData": true, - "DNSPTRData": true, - "DNSRecord": true, - "DNSSRVData": true, - "DNSTXTData": true, - "DNS_INFO_NO_RECORDS": true, - "DNS_TYPE_A": true, - "DNS_TYPE_A6": true, - "DNS_TYPE_AAAA": true, - "DNS_TYPE_ADDRS": true, - "DNS_TYPE_AFSDB": true, - "DNS_TYPE_ALL": true, - "DNS_TYPE_ANY": true, - "DNS_TYPE_ATMA": true, - "DNS_TYPE_AXFR": true, - "DNS_TYPE_CERT": true, - "DNS_TYPE_CNAME": true, - "DNS_TYPE_DHCID": true, - "DNS_TYPE_DNAME": true, - "DNS_TYPE_DNSKEY": true, - "DNS_TYPE_DS": true, - "DNS_TYPE_EID": true, - "DNS_TYPE_GID": true, - "DNS_TYPE_GPOS": true, - "DNS_TYPE_HINFO": true, - "DNS_TYPE_ISDN": true, - "DNS_TYPE_IXFR": true, - "DNS_TYPE_KEY": true, - "DNS_TYPE_KX": true, - "DNS_TYPE_LOC": true, - "DNS_TYPE_MAILA": true, - "DNS_TYPE_MAILB": true, - "DNS_TYPE_MB": true, - "DNS_TYPE_MD": true, - "DNS_TYPE_MF": true, - "DNS_TYPE_MG": true, - "DNS_TYPE_MINFO": true, - "DNS_TYPE_MR": true, - "DNS_TYPE_MX": true, - "DNS_TYPE_NAPTR": true, - "DNS_TYPE_NBSTAT": true, - "DNS_TYPE_NIMLOC": true, - "DNS_TYPE_NS": true, - "DNS_TYPE_NSAP": true, - "DNS_TYPE_NSAPPTR": true, - "DNS_TYPE_NSEC": true, - "DNS_TYPE_NULL": true, - "DNS_TYPE_NXT": true, - "DNS_TYPE_OPT": true, - "DNS_TYPE_PTR": true, - "DNS_TYPE_PX": true, - "DNS_TYPE_RP": true, - "DNS_TYPE_RRSIG": true, - "DNS_TYPE_RT": true, - "DNS_TYPE_SIG": true, - "DNS_TYPE_SINK": true, - "DNS_TYPE_SOA": true, - "DNS_TYPE_SRV": true, - "DNS_TYPE_TEXT": true, - "DNS_TYPE_TKEY": true, - "DNS_TYPE_TSIG": true, - "DNS_TYPE_UID": true, - "DNS_TYPE_UINFO": true, - "DNS_TYPE_UNSPEC": true, - "DNS_TYPE_WINS": true, - "DNS_TYPE_WINSR": true, - "DNS_TYPE_WKS": true, - "DNS_TYPE_X25": true, - "DT_BLK": true, - "DT_CHR": true, - "DT_DIR": true, - "DT_FIFO": true, - "DT_LNK": true, - "DT_REG": true, - "DT_SOCK": true, - "DT_UNKNOWN": true, - "DT_WHT": true, - "DUPLICATE_CLOSE_SOURCE": true, - "DUPLICATE_SAME_ACCESS": true, - "DeleteFile": true, - "DetachLsf": true, - "DeviceIoControl": true, - "Dirent": true, - "DnsNameCompare": true, - "DnsQuery": true, - "DnsRecordListFree": true, - "DnsSectionAdditional": true, - "DnsSectionAnswer": true, - "DnsSectionAuthority": true, - "DnsSectionQuestion": true, - "Dup": true, - "Dup2": true, - "Dup3": true, - "DuplicateHandle": true, - "E2BIG": true, - "EACCES": true, - "EADDRINUSE": true, - "EADDRNOTAVAIL": true, - "EADV": true, - "EAFNOSUPPORT": true, - "EAGAIN": true, - "EALREADY": true, - "EAUTH": true, - "EBADARCH": true, - "EBADE": true, - "EBADEXEC": true, - "EBADF": true, - "EBADFD": true, - "EBADMACHO": true, - "EBADMSG": true, - "EBADR": true, - "EBADRPC": true, - "EBADRQC": true, - "EBADSLT": true, - "EBFONT": true, - "EBUSY": true, - "ECANCELED": true, - "ECAPMODE": true, - "ECHILD": true, - "ECHO": true, - "ECHOCTL": true, - "ECHOE": true, - "ECHOK": true, - "ECHOKE": true, - "ECHONL": true, - "ECHOPRT": true, - "ECHRNG": true, - "ECOMM": true, - "ECONNABORTED": true, - "ECONNREFUSED": true, - "ECONNRESET": true, - "EDEADLK": true, - "EDEADLOCK": true, - "EDESTADDRREQ": true, - "EDEVERR": true, - "EDOM": true, - "EDOOFUS": true, - "EDOTDOT": true, - "EDQUOT": true, - "EEXIST": true, - "EFAULT": true, - "EFBIG": true, - "EFER_LMA": true, - "EFER_LME": true, - "EFER_NXE": true, - "EFER_SCE": true, - "EFTYPE": true, - "EHOSTDOWN": true, - "EHOSTUNREACH": true, - "EHWPOISON": true, - "EIDRM": true, - "EILSEQ": true, - "EINPROGRESS": true, - "EINTR": true, - "EINVAL": true, - "EIO": true, - "EIPSEC": true, - "EISCONN": true, - "EISDIR": true, - "EISNAM": true, - "EKEYEXPIRED": true, - "EKEYREJECTED": true, - "EKEYREVOKED": true, - "EL2HLT": true, - "EL2NSYNC": true, - "EL3HLT": true, - "EL3RST": true, - "ELAST": true, - "ELF_NGREG": true, - "ELF_PRARGSZ": true, - "ELIBACC": true, - "ELIBBAD": true, - "ELIBEXEC": true, - "ELIBMAX": true, - "ELIBSCN": true, - "ELNRNG": true, - "ELOOP": true, - "EMEDIUMTYPE": true, - "EMFILE": true, - "EMLINK": true, - "EMSGSIZE": true, - "EMT_TAGOVF": true, - "EMULTIHOP": true, - "EMUL_ENABLED": true, - "EMUL_LINUX": true, - "EMUL_LINUX32": true, - "EMUL_MAXID": true, - "EMUL_NATIVE": true, - "ENAMETOOLONG": true, - "ENAVAIL": true, - "ENDRUNDISC": true, - "ENEEDAUTH": true, - "ENETDOWN": true, - "ENETRESET": true, - "ENETUNREACH": true, - "ENFILE": true, - "ENOANO": true, - "ENOATTR": true, - "ENOBUFS": true, - "ENOCSI": true, - "ENODATA": true, - "ENODEV": true, - "ENOENT": true, - "ENOEXEC": true, - "ENOKEY": true, - "ENOLCK": true, - "ENOLINK": true, - "ENOMEDIUM": true, - "ENOMEM": true, - "ENOMSG": true, - "ENONET": true, - "ENOPKG": true, - "ENOPOLICY": true, - "ENOPROTOOPT": true, - "ENOSPC": true, - "ENOSR": true, - "ENOSTR": true, - "ENOSYS": true, - "ENOTBLK": true, - "ENOTCAPABLE": true, - "ENOTCONN": true, - "ENOTDIR": true, - "ENOTEMPTY": true, - "ENOTNAM": true, - "ENOTRECOVERABLE": true, - "ENOTSOCK": true, - "ENOTSUP": true, - "ENOTTY": true, - "ENOTUNIQ": true, - "ENXIO": true, - "EN_SW_CTL_INF": true, - "EN_SW_CTL_PREC": true, - "EN_SW_CTL_ROUND": true, - "EN_SW_DATACHAIN": true, - "EN_SW_DENORM": true, - "EN_SW_INVOP": true, - "EN_SW_OVERFLOW": true, - "EN_SW_PRECLOSS": true, - "EN_SW_UNDERFLOW": true, - "EN_SW_ZERODIV": true, - "EOPNOTSUPP": true, - "EOVERFLOW": true, - "EOWNERDEAD": true, - "EPERM": true, - "EPFNOSUPPORT": true, - "EPIPE": true, - "EPOLLERR": true, - "EPOLLET": true, - "EPOLLHUP": true, - "EPOLLIN": true, - "EPOLLMSG": true, - "EPOLLONESHOT": true, - "EPOLLOUT": true, - "EPOLLPRI": true, - "EPOLLRDBAND": true, - "EPOLLRDHUP": true, - "EPOLLRDNORM": true, - "EPOLLWRBAND": true, - "EPOLLWRNORM": true, - "EPOLL_CLOEXEC": true, - "EPOLL_CTL_ADD": true, - "EPOLL_CTL_DEL": true, - "EPOLL_CTL_MOD": true, - "EPOLL_NONBLOCK": true, - "EPROCLIM": true, - "EPROCUNAVAIL": true, - "EPROGMISMATCH": true, - "EPROGUNAVAIL": true, - "EPROTO": true, - "EPROTONOSUPPORT": true, - "EPROTOTYPE": true, - "EPWROFF": true, - "ERANGE": true, - "EREMCHG": true, - "EREMOTE": true, - "EREMOTEIO": true, - "ERESTART": true, - "ERFKILL": true, - "EROFS": true, - "ERPCMISMATCH": true, - "ERROR_ACCESS_DENIED": true, - "ERROR_ALREADY_EXISTS": true, - "ERROR_BROKEN_PIPE": true, - "ERROR_BUFFER_OVERFLOW": true, - "ERROR_DIR_NOT_EMPTY": true, - "ERROR_ENVVAR_NOT_FOUND": true, - "ERROR_FILE_EXISTS": true, - "ERROR_FILE_NOT_FOUND": true, - "ERROR_HANDLE_EOF": true, - "ERROR_INSUFFICIENT_BUFFER": true, - "ERROR_IO_PENDING": true, - "ERROR_MOD_NOT_FOUND": true, - "ERROR_MORE_DATA": true, - "ERROR_NETNAME_DELETED": true, - "ERROR_NOT_FOUND": true, - "ERROR_NO_MORE_FILES": true, - "ERROR_OPERATION_ABORTED": true, - "ERROR_PATH_NOT_FOUND": true, - "ERROR_PRIVILEGE_NOT_HELD": true, - "ERROR_PROC_NOT_FOUND": true, - "ESHLIBVERS": true, - "ESHUTDOWN": true, - "ESOCKTNOSUPPORT": true, - "ESPIPE": true, - "ESRCH": true, - "ESRMNT": true, - "ESTALE": true, - "ESTRPIPE": true, - "ETHERCAP_JUMBO_MTU": true, - "ETHERCAP_VLAN_HWTAGGING": true, - "ETHERCAP_VLAN_MTU": true, - "ETHERMIN": true, - "ETHERMTU": true, - "ETHERMTU_JUMBO": true, - "ETHERTYPE_8023": true, - "ETHERTYPE_AARP": true, - "ETHERTYPE_ACCTON": true, - "ETHERTYPE_AEONIC": true, - "ETHERTYPE_ALPHA": true, - "ETHERTYPE_AMBER": true, - "ETHERTYPE_AMOEBA": true, - "ETHERTYPE_AOE": true, - "ETHERTYPE_APOLLO": true, - "ETHERTYPE_APOLLODOMAIN": true, - "ETHERTYPE_APPLETALK": true, - "ETHERTYPE_APPLITEK": true, - "ETHERTYPE_ARGONAUT": true, - "ETHERTYPE_ARP": true, - "ETHERTYPE_AT": true, - "ETHERTYPE_ATALK": true, - "ETHERTYPE_ATOMIC": true, - "ETHERTYPE_ATT": true, - "ETHERTYPE_ATTSTANFORD": true, - "ETHERTYPE_AUTOPHON": true, - "ETHERTYPE_AXIS": true, - "ETHERTYPE_BCLOOP": true, - "ETHERTYPE_BOFL": true, - "ETHERTYPE_CABLETRON": true, - "ETHERTYPE_CHAOS": true, - "ETHERTYPE_COMDESIGN": true, - "ETHERTYPE_COMPUGRAPHIC": true, - "ETHERTYPE_COUNTERPOINT": true, - "ETHERTYPE_CRONUS": true, - "ETHERTYPE_CRONUSVLN": true, - "ETHERTYPE_DCA": true, - "ETHERTYPE_DDE": true, - "ETHERTYPE_DEBNI": true, - "ETHERTYPE_DECAM": true, - "ETHERTYPE_DECCUST": true, - "ETHERTYPE_DECDIAG": true, - "ETHERTYPE_DECDNS": true, - "ETHERTYPE_DECDTS": true, - "ETHERTYPE_DECEXPER": true, - "ETHERTYPE_DECLAST": true, - "ETHERTYPE_DECLTM": true, - "ETHERTYPE_DECMUMPS": true, - "ETHERTYPE_DECNETBIOS": true, - "ETHERTYPE_DELTACON": true, - "ETHERTYPE_DIDDLE": true, - "ETHERTYPE_DLOG1": true, - "ETHERTYPE_DLOG2": true, - "ETHERTYPE_DN": true, - "ETHERTYPE_DOGFIGHT": true, - "ETHERTYPE_DSMD": true, - "ETHERTYPE_ECMA": true, - "ETHERTYPE_ENCRYPT": true, - "ETHERTYPE_ES": true, - "ETHERTYPE_EXCELAN": true, - "ETHERTYPE_EXPERDATA": true, - "ETHERTYPE_FLIP": true, - "ETHERTYPE_FLOWCONTROL": true, - "ETHERTYPE_FRARP": true, - "ETHERTYPE_GENDYN": true, - "ETHERTYPE_HAYES": true, - "ETHERTYPE_HIPPI_FP": true, - "ETHERTYPE_HITACHI": true, - "ETHERTYPE_HP": true, - "ETHERTYPE_IEEEPUP": true, - "ETHERTYPE_IEEEPUPAT": true, - "ETHERTYPE_IMLBL": true, - "ETHERTYPE_IMLBLDIAG": true, - "ETHERTYPE_IP": true, - "ETHERTYPE_IPAS": true, - "ETHERTYPE_IPV6": true, - "ETHERTYPE_IPX": true, - "ETHERTYPE_IPXNEW": true, - "ETHERTYPE_KALPANA": true, - "ETHERTYPE_LANBRIDGE": true, - "ETHERTYPE_LANPROBE": true, - "ETHERTYPE_LAT": true, - "ETHERTYPE_LBACK": true, - "ETHERTYPE_LITTLE": true, - "ETHERTYPE_LLDP": true, - "ETHERTYPE_LOGICRAFT": true, - "ETHERTYPE_LOOPBACK": true, - "ETHERTYPE_MATRA": true, - "ETHERTYPE_MAX": true, - "ETHERTYPE_MERIT": true, - "ETHERTYPE_MICP": true, - "ETHERTYPE_MOPDL": true, - "ETHERTYPE_MOPRC": true, - "ETHERTYPE_MOTOROLA": true, - "ETHERTYPE_MPLS": true, - "ETHERTYPE_MPLS_MCAST": true, - "ETHERTYPE_MUMPS": true, - "ETHERTYPE_NBPCC": true, - "ETHERTYPE_NBPCLAIM": true, - "ETHERTYPE_NBPCLREQ": true, - "ETHERTYPE_NBPCLRSP": true, - "ETHERTYPE_NBPCREQ": true, - "ETHERTYPE_NBPCRSP": true, - "ETHERTYPE_NBPDG": true, - "ETHERTYPE_NBPDGB": true, - "ETHERTYPE_NBPDLTE": true, - "ETHERTYPE_NBPRAR": true, - "ETHERTYPE_NBPRAS": true, - "ETHERTYPE_NBPRST": true, - "ETHERTYPE_NBPSCD": true, - "ETHERTYPE_NBPVCD": true, - "ETHERTYPE_NBS": true, - "ETHERTYPE_NCD": true, - "ETHERTYPE_NESTAR": true, - "ETHERTYPE_NETBEUI": true, - "ETHERTYPE_NOVELL": true, - "ETHERTYPE_NS": true, - "ETHERTYPE_NSAT": true, - "ETHERTYPE_NSCOMPAT": true, - "ETHERTYPE_NTRAILER": true, - "ETHERTYPE_OS9": true, - "ETHERTYPE_OS9NET": true, - "ETHERTYPE_PACER": true, - "ETHERTYPE_PAE": true, - "ETHERTYPE_PCS": true, - "ETHERTYPE_PLANNING": true, - "ETHERTYPE_PPP": true, - "ETHERTYPE_PPPOE": true, - "ETHERTYPE_PPPOEDISC": true, - "ETHERTYPE_PRIMENTS": true, - "ETHERTYPE_PUP": true, - "ETHERTYPE_PUPAT": true, - "ETHERTYPE_QINQ": true, - "ETHERTYPE_RACAL": true, - "ETHERTYPE_RATIONAL": true, - "ETHERTYPE_RAWFR": true, - "ETHERTYPE_RCL": true, - "ETHERTYPE_RDP": true, - "ETHERTYPE_RETIX": true, - "ETHERTYPE_REVARP": true, - "ETHERTYPE_SCA": true, - "ETHERTYPE_SECTRA": true, - "ETHERTYPE_SECUREDATA": true, - "ETHERTYPE_SGITW": true, - "ETHERTYPE_SG_BOUNCE": true, - "ETHERTYPE_SG_DIAG": true, - "ETHERTYPE_SG_NETGAMES": true, - "ETHERTYPE_SG_RESV": true, - "ETHERTYPE_SIMNET": true, - "ETHERTYPE_SLOW": true, - "ETHERTYPE_SLOWPROTOCOLS": true, - "ETHERTYPE_SNA": true, - "ETHERTYPE_SNMP": true, - "ETHERTYPE_SONIX": true, - "ETHERTYPE_SPIDER": true, - "ETHERTYPE_SPRITE": true, - "ETHERTYPE_STP": true, - "ETHERTYPE_TALARIS": true, - "ETHERTYPE_TALARISMC": true, - "ETHERTYPE_TCPCOMP": true, - "ETHERTYPE_TCPSM": true, - "ETHERTYPE_TEC": true, - "ETHERTYPE_TIGAN": true, - "ETHERTYPE_TRAIL": true, - "ETHERTYPE_TRANSETHER": true, - "ETHERTYPE_TYMSHARE": true, - "ETHERTYPE_UBBST": true, - "ETHERTYPE_UBDEBUG": true, - "ETHERTYPE_UBDIAGLOOP": true, - "ETHERTYPE_UBDL": true, - "ETHERTYPE_UBNIU": true, - "ETHERTYPE_UBNMC": true, - "ETHERTYPE_VALID": true, - "ETHERTYPE_VARIAN": true, - "ETHERTYPE_VAXELN": true, - "ETHERTYPE_VEECO": true, - "ETHERTYPE_VEXP": true, - "ETHERTYPE_VGLAB": true, - "ETHERTYPE_VINES": true, - "ETHERTYPE_VINESECHO": true, - "ETHERTYPE_VINESLOOP": true, - "ETHERTYPE_VITAL": true, - "ETHERTYPE_VLAN": true, - "ETHERTYPE_VLTLMAN": true, - "ETHERTYPE_VPROD": true, - "ETHERTYPE_VURESERVED": true, - "ETHERTYPE_WATERLOO": true, - "ETHERTYPE_WELLFLEET": true, - "ETHERTYPE_X25": true, - "ETHERTYPE_X75": true, - "ETHERTYPE_XNSSM": true, - "ETHERTYPE_XTP": true, - "ETHER_ADDR_LEN": true, - "ETHER_ALIGN": true, - "ETHER_CRC_LEN": true, - "ETHER_CRC_POLY_BE": true, - "ETHER_CRC_POLY_LE": true, - "ETHER_HDR_LEN": true, - "ETHER_MAX_DIX_LEN": true, - "ETHER_MAX_LEN": true, - "ETHER_MAX_LEN_JUMBO": true, - "ETHER_MIN_LEN": true, - "ETHER_PPPOE_ENCAP_LEN": true, - "ETHER_TYPE_LEN": true, - "ETHER_VLAN_ENCAP_LEN": true, - "ETH_P_1588": true, - "ETH_P_8021Q": true, - "ETH_P_802_2": true, - "ETH_P_802_3": true, - "ETH_P_AARP": true, - "ETH_P_ALL": true, - "ETH_P_AOE": true, - "ETH_P_ARCNET": true, - "ETH_P_ARP": true, - "ETH_P_ATALK": true, - "ETH_P_ATMFATE": true, - "ETH_P_ATMMPOA": true, - "ETH_P_AX25": true, - "ETH_P_BPQ": true, - "ETH_P_CAIF": true, - "ETH_P_CAN": true, - "ETH_P_CONTROL": true, - "ETH_P_CUST": true, - "ETH_P_DDCMP": true, - "ETH_P_DEC": true, - "ETH_P_DIAG": true, - "ETH_P_DNA_DL": true, - "ETH_P_DNA_RC": true, - "ETH_P_DNA_RT": true, - "ETH_P_DSA": true, - "ETH_P_ECONET": true, - "ETH_P_EDSA": true, - "ETH_P_FCOE": true, - "ETH_P_FIP": true, - "ETH_P_HDLC": true, - "ETH_P_IEEE802154": true, - "ETH_P_IEEEPUP": true, - "ETH_P_IEEEPUPAT": true, - "ETH_P_IP": true, - "ETH_P_IPV6": true, - "ETH_P_IPX": true, - "ETH_P_IRDA": true, - "ETH_P_LAT": true, - "ETH_P_LINK_CTL": true, - "ETH_P_LOCALTALK": true, - "ETH_P_LOOP": true, - "ETH_P_MOBITEX": true, - "ETH_P_MPLS_MC": true, - "ETH_P_MPLS_UC": true, - "ETH_P_PAE": true, - "ETH_P_PAUSE": true, - "ETH_P_PHONET": true, - "ETH_P_PPPTALK": true, - "ETH_P_PPP_DISC": true, - "ETH_P_PPP_MP": true, - "ETH_P_PPP_SES": true, - "ETH_P_PUP": true, - "ETH_P_PUPAT": true, - "ETH_P_RARP": true, - "ETH_P_SCA": true, - "ETH_P_SLOW": true, - "ETH_P_SNAP": true, - "ETH_P_TEB": true, - "ETH_P_TIPC": true, - "ETH_P_TRAILER": true, - "ETH_P_TR_802_2": true, - "ETH_P_WAN_PPP": true, - "ETH_P_WCCP": true, - "ETH_P_X25": true, - "ETIME": true, - "ETIMEDOUT": true, - "ETOOMANYREFS": true, - "ETXTBSY": true, - "EUCLEAN": true, - "EUNATCH": true, - "EUSERS": true, - "EVFILT_AIO": true, - "EVFILT_FS": true, - "EVFILT_LIO": true, - "EVFILT_MACHPORT": true, - "EVFILT_PROC": true, - "EVFILT_READ": true, - "EVFILT_SIGNAL": true, - "EVFILT_SYSCOUNT": true, - "EVFILT_THREADMARKER": true, - "EVFILT_TIMER": true, - "EVFILT_USER": true, - "EVFILT_VM": true, - "EVFILT_VNODE": true, - "EVFILT_WRITE": true, - "EV_ADD": true, - "EV_CLEAR": true, - "EV_DELETE": true, - "EV_DISABLE": true, - "EV_DISPATCH": true, - "EV_DROP": true, - "EV_ENABLE": true, - "EV_EOF": true, - "EV_ERROR": true, - "EV_FLAG0": true, - "EV_FLAG1": true, - "EV_ONESHOT": true, - "EV_OOBAND": true, - "EV_POLL": true, - "EV_RECEIPT": true, - "EV_SYSFLAGS": true, - "EWINDOWS": true, - "EWOULDBLOCK": true, - "EXDEV": true, - "EXFULL": true, - "EXTA": true, - "EXTB": true, - "EXTPROC": true, - "Environ": true, - "EpollCreate": true, - "EpollCreate1": true, - "EpollCtl": true, - "EpollEvent": true, - "EpollWait": true, - "Errno": true, - "EscapeArg": true, - "Exchangedata": true, - "Exec": true, - "Exit": true, - "ExitProcess": true, - "FD_CLOEXEC": true, - "FD_SETSIZE": true, - "FILE_ACTION_ADDED": true, - "FILE_ACTION_MODIFIED": true, - "FILE_ACTION_REMOVED": true, - "FILE_ACTION_RENAMED_NEW_NAME": true, - "FILE_ACTION_RENAMED_OLD_NAME": true, - "FILE_APPEND_DATA": true, - "FILE_ATTRIBUTE_ARCHIVE": true, - "FILE_ATTRIBUTE_DIRECTORY": true, - "FILE_ATTRIBUTE_HIDDEN": true, - "FILE_ATTRIBUTE_NORMAL": true, - "FILE_ATTRIBUTE_READONLY": true, - "FILE_ATTRIBUTE_REPARSE_POINT": true, - "FILE_ATTRIBUTE_SYSTEM": true, - "FILE_BEGIN": true, - "FILE_CURRENT": true, - "FILE_END": true, - "FILE_FLAG_BACKUP_SEMANTICS": true, - "FILE_FLAG_OPEN_REPARSE_POINT": true, - "FILE_FLAG_OVERLAPPED": true, - "FILE_LIST_DIRECTORY": true, - "FILE_MAP_COPY": true, - "FILE_MAP_EXECUTE": true, - "FILE_MAP_READ": true, - "FILE_MAP_WRITE": true, - "FILE_NOTIFY_CHANGE_ATTRIBUTES": true, - "FILE_NOTIFY_CHANGE_CREATION": true, - "FILE_NOTIFY_CHANGE_DIR_NAME": true, - "FILE_NOTIFY_CHANGE_FILE_NAME": true, - "FILE_NOTIFY_CHANGE_LAST_ACCESS": true, - "FILE_NOTIFY_CHANGE_LAST_WRITE": true, - "FILE_NOTIFY_CHANGE_SIZE": true, - "FILE_SHARE_DELETE": true, - "FILE_SHARE_READ": true, - "FILE_SHARE_WRITE": true, - "FILE_SKIP_COMPLETION_PORT_ON_SUCCESS": true, - "FILE_SKIP_SET_EVENT_ON_HANDLE": true, - "FILE_TYPE_CHAR": true, - "FILE_TYPE_DISK": true, - "FILE_TYPE_PIPE": true, - "FILE_TYPE_REMOTE": true, - "FILE_TYPE_UNKNOWN": true, - "FILE_WRITE_ATTRIBUTES": true, - "FLUSHO": true, - "FORMAT_MESSAGE_ALLOCATE_BUFFER": true, - "FORMAT_MESSAGE_ARGUMENT_ARRAY": true, - "FORMAT_MESSAGE_FROM_HMODULE": true, - "FORMAT_MESSAGE_FROM_STRING": true, - "FORMAT_MESSAGE_FROM_SYSTEM": true, - "FORMAT_MESSAGE_IGNORE_INSERTS": true, - "FORMAT_MESSAGE_MAX_WIDTH_MASK": true, - "FSCTL_GET_REPARSE_POINT": true, - "F_ADDFILESIGS": true, - "F_ADDSIGS": true, - "F_ALLOCATEALL": true, - "F_ALLOCATECONTIG": true, - "F_CANCEL": true, - "F_CHKCLEAN": true, - "F_CLOSEM": true, - "F_DUP2FD": true, - "F_DUP2FD_CLOEXEC": true, - "F_DUPFD": true, - "F_DUPFD_CLOEXEC": true, - "F_EXLCK": true, - "F_FLUSH_DATA": true, - "F_FREEZE_FS": true, - "F_FSCTL": true, - "F_FSDIRMASK": true, - "F_FSIN": true, - "F_FSINOUT": true, - "F_FSOUT": true, - "F_FSPRIV": true, - "F_FSVOID": true, - "F_FULLFSYNC": true, - "F_GETFD": true, - "F_GETFL": true, - "F_GETLEASE": true, - "F_GETLK": true, - "F_GETLK64": true, - "F_GETLKPID": true, - "F_GETNOSIGPIPE": true, - "F_GETOWN": true, - "F_GETOWN_EX": true, - "F_GETPATH": true, - "F_GETPATH_MTMINFO": true, - "F_GETPIPE_SZ": true, - "F_GETPROTECTIONCLASS": true, - "F_GETSIG": true, - "F_GLOBAL_NOCACHE": true, - "F_LOCK": true, - "F_LOG2PHYS": true, - "F_LOG2PHYS_EXT": true, - "F_MARKDEPENDENCY": true, - "F_MAXFD": true, - "F_NOCACHE": true, - "F_NODIRECT": true, - "F_NOTIFY": true, - "F_OGETLK": true, - "F_OK": true, - "F_OSETLK": true, - "F_OSETLKW": true, - "F_PARAM_MASK": true, - "F_PARAM_MAX": true, - "F_PATHPKG_CHECK": true, - "F_PEOFPOSMODE": true, - "F_PREALLOCATE": true, - "F_RDADVISE": true, - "F_RDAHEAD": true, - "F_RDLCK": true, - "F_READAHEAD": true, - "F_READBOOTSTRAP": true, - "F_SETBACKINGSTORE": true, - "F_SETFD": true, - "F_SETFL": true, - "F_SETLEASE": true, - "F_SETLK": true, - "F_SETLK64": true, - "F_SETLKW": true, - "F_SETLKW64": true, - "F_SETLK_REMOTE": true, - "F_SETNOSIGPIPE": true, - "F_SETOWN": true, - "F_SETOWN_EX": true, - "F_SETPIPE_SZ": true, - "F_SETPROTECTIONCLASS": true, - "F_SETSIG": true, - "F_SETSIZE": true, - "F_SHLCK": true, - "F_TEST": true, - "F_THAW_FS": true, - "F_TLOCK": true, - "F_ULOCK": true, - "F_UNLCK": true, - "F_UNLCKSYS": true, - "F_VOLPOSMODE": true, - "F_WRITEBOOTSTRAP": true, - "F_WRLCK": true, - "Faccessat": true, - "Fallocate": true, - "Fbootstraptransfer_t": true, - "Fchdir": true, - "Fchflags": true, - "Fchmod": true, - "Fchmodat": true, - "Fchown": true, - "Fchownat": true, - "FcntlFlock": true, - "FdSet": true, - "Fdatasync": true, - "FileNotifyInformation": true, - "Filetime": true, - "FindClose": true, - "FindFirstFile": true, - "FindNextFile": true, - "Flock": true, - "Flock_t": true, - "FlushBpf": true, - "FlushFileBuffers": true, - "FlushViewOfFile": true, - "ForkExec": true, - "ForkLock": true, - "FormatMessage": true, - "Fpathconf": true, - "FreeAddrInfoW": true, - "FreeEnvironmentStrings": true, - "FreeLibrary": true, - "Fsid": true, - "Fstat": true, - "Fstatat": true, - "Fstatfs": true, - "Fstore_t": true, - "Fsync": true, - "Ftruncate": true, - "FullPath": true, - "Futimes": true, - "Futimesat": true, - "GENERIC_ALL": true, - "GENERIC_EXECUTE": true, - "GENERIC_READ": true, - "GENERIC_WRITE": true, - "GUID": true, - "GetAcceptExSockaddrs": true, - "GetAdaptersInfo": true, - "GetAddrInfoW": true, - "GetCommandLine": true, - "GetComputerName": true, - "GetConsoleMode": true, - "GetCurrentDirectory": true, - "GetCurrentProcess": true, - "GetEnvironmentStrings": true, - "GetEnvironmentVariable": true, - "GetExitCodeProcess": true, - "GetFileAttributes": true, - "GetFileAttributesEx": true, - "GetFileExInfoStandard": true, - "GetFileExMaxInfoLevel": true, - "GetFileInformationByHandle": true, - "GetFileType": true, - "GetFullPathName": true, - "GetHostByName": true, - "GetIfEntry": true, - "GetLastError": true, - "GetLengthSid": true, - "GetLongPathName": true, - "GetProcAddress": true, - "GetProcessTimes": true, - "GetProtoByName": true, - "GetQueuedCompletionStatus": true, - "GetServByName": true, - "GetShortPathName": true, - "GetStartupInfo": true, - "GetStdHandle": true, - "GetSystemTimeAsFileTime": true, - "GetTempPath": true, - "GetTimeZoneInformation": true, - "GetTokenInformation": true, - "GetUserNameEx": true, - "GetUserProfileDirectory": true, - "GetVersion": true, - "Getcwd": true, - "Getdents": true, - "Getdirentries": true, - "Getdtablesize": true, - "Getegid": true, - "Getenv": true, - "Geteuid": true, - "Getfsstat": true, - "Getgid": true, - "Getgroups": true, - "Getpagesize": true, - "Getpeername": true, - "Getpgid": true, - "Getpgrp": true, - "Getpid": true, - "Getppid": true, - "Getpriority": true, - "Getrlimit": true, - "Getrusage": true, - "Getsid": true, - "Getsockname": true, - "Getsockopt": true, - "GetsockoptByte": true, - "GetsockoptICMPv6Filter": true, - "GetsockoptIPMreq": true, - "GetsockoptIPMreqn": true, - "GetsockoptIPv6MTUInfo": true, - "GetsockoptIPv6Mreq": true, - "GetsockoptInet4Addr": true, - "GetsockoptInt": true, - "GetsockoptUcred": true, - "Gettid": true, - "Gettimeofday": true, - "Getuid": true, - "Getwd": true, - "Getxattr": true, - "HANDLE_FLAG_INHERIT": true, - "HKEY_CLASSES_ROOT": true, - "HKEY_CURRENT_CONFIG": true, - "HKEY_CURRENT_USER": true, - "HKEY_DYN_DATA": true, - "HKEY_LOCAL_MACHINE": true, - "HKEY_PERFORMANCE_DATA": true, - "HKEY_USERS": true, - "HUPCL": true, - "Handle": true, - "Hostent": true, - "ICANON": true, - "ICMP6_FILTER": true, - "ICMPV6_FILTER": true, - "ICMPv6Filter": true, - "ICRNL": true, - "IEXTEN": true, - "IFAN_ARRIVAL": true, - "IFAN_DEPARTURE": true, - "IFA_ADDRESS": true, - "IFA_ANYCAST": true, - "IFA_BROADCAST": true, - "IFA_CACHEINFO": true, - "IFA_F_DADFAILED": true, - "IFA_F_DEPRECATED": true, - "IFA_F_HOMEADDRESS": true, - "IFA_F_NODAD": true, - "IFA_F_OPTIMISTIC": true, - "IFA_F_PERMANENT": true, - "IFA_F_SECONDARY": true, - "IFA_F_TEMPORARY": true, - "IFA_F_TENTATIVE": true, - "IFA_LABEL": true, - "IFA_LOCAL": true, - "IFA_MAX": true, - "IFA_MULTICAST": true, - "IFA_ROUTE": true, - "IFA_UNSPEC": true, - "IFF_ALLMULTI": true, - "IFF_ALTPHYS": true, - "IFF_AUTOMEDIA": true, - "IFF_BROADCAST": true, - "IFF_CANTCHANGE": true, - "IFF_CANTCONFIG": true, - "IFF_DEBUG": true, - "IFF_DRV_OACTIVE": true, - "IFF_DRV_RUNNING": true, - "IFF_DYING": true, - "IFF_DYNAMIC": true, - "IFF_LINK0": true, - "IFF_LINK1": true, - "IFF_LINK2": true, - "IFF_LOOPBACK": true, - "IFF_MASTER": true, - "IFF_MONITOR": true, - "IFF_MULTICAST": true, - "IFF_NOARP": true, - "IFF_NOTRAILERS": true, - "IFF_NO_PI": true, - "IFF_OACTIVE": true, - "IFF_ONE_QUEUE": true, - "IFF_POINTOPOINT": true, - "IFF_POINTTOPOINT": true, - "IFF_PORTSEL": true, - "IFF_PPROMISC": true, - "IFF_PROMISC": true, - "IFF_RENAMING": true, - "IFF_RUNNING": true, - "IFF_SIMPLEX": true, - "IFF_SLAVE": true, - "IFF_SMART": true, - "IFF_STATICARP": true, - "IFF_TAP": true, - "IFF_TUN": true, - "IFF_TUN_EXCL": true, - "IFF_UP": true, - "IFF_VNET_HDR": true, - "IFLA_ADDRESS": true, - "IFLA_BROADCAST": true, - "IFLA_COST": true, - "IFLA_IFALIAS": true, - "IFLA_IFNAME": true, - "IFLA_LINK": true, - "IFLA_LINKINFO": true, - "IFLA_LINKMODE": true, - "IFLA_MAP": true, - "IFLA_MASTER": true, - "IFLA_MAX": true, - "IFLA_MTU": true, - "IFLA_NET_NS_PID": true, - "IFLA_OPERSTATE": true, - "IFLA_PRIORITY": true, - "IFLA_PROTINFO": true, - "IFLA_QDISC": true, - "IFLA_STATS": true, - "IFLA_TXQLEN": true, - "IFLA_UNSPEC": true, - "IFLA_WEIGHT": true, - "IFLA_WIRELESS": true, - "IFNAMSIZ": true, - "IFT_1822": true, - "IFT_A12MPPSWITCH": true, - "IFT_AAL2": true, - "IFT_AAL5": true, - "IFT_ADSL": true, - "IFT_AFLANE8023": true, - "IFT_AFLANE8025": true, - "IFT_ARAP": true, - "IFT_ARCNET": true, - "IFT_ARCNETPLUS": true, - "IFT_ASYNC": true, - "IFT_ATM": true, - "IFT_ATMDXI": true, - "IFT_ATMFUNI": true, - "IFT_ATMIMA": true, - "IFT_ATMLOGICAL": true, - "IFT_ATMRADIO": true, - "IFT_ATMSUBINTERFACE": true, - "IFT_ATMVCIENDPT": true, - "IFT_ATMVIRTUAL": true, - "IFT_BGPPOLICYACCOUNTING": true, - "IFT_BLUETOOTH": true, - "IFT_BRIDGE": true, - "IFT_BSC": true, - "IFT_CARP": true, - "IFT_CCTEMUL": true, - "IFT_CELLULAR": true, - "IFT_CEPT": true, - "IFT_CES": true, - "IFT_CHANNEL": true, - "IFT_CNR": true, - "IFT_COFFEE": true, - "IFT_COMPOSITELINK": true, - "IFT_DCN": true, - "IFT_DIGITALPOWERLINE": true, - "IFT_DIGITALWRAPPEROVERHEADCHANNEL": true, - "IFT_DLSW": true, - "IFT_DOCSCABLEDOWNSTREAM": true, - "IFT_DOCSCABLEMACLAYER": true, - "IFT_DOCSCABLEUPSTREAM": true, - "IFT_DOCSCABLEUPSTREAMCHANNEL": true, - "IFT_DS0": true, - "IFT_DS0BUNDLE": true, - "IFT_DS1FDL": true, - "IFT_DS3": true, - "IFT_DTM": true, - "IFT_DUMMY": true, - "IFT_DVBASILN": true, - "IFT_DVBASIOUT": true, - "IFT_DVBRCCDOWNSTREAM": true, - "IFT_DVBRCCMACLAYER": true, - "IFT_DVBRCCUPSTREAM": true, - "IFT_ECONET": true, - "IFT_ENC": true, - "IFT_EON": true, - "IFT_EPLRS": true, - "IFT_ESCON": true, - "IFT_ETHER": true, - "IFT_FAITH": true, - "IFT_FAST": true, - "IFT_FASTETHER": true, - "IFT_FASTETHERFX": true, - "IFT_FDDI": true, - "IFT_FIBRECHANNEL": true, - "IFT_FRAMERELAYINTERCONNECT": true, - "IFT_FRAMERELAYMPI": true, - "IFT_FRDLCIENDPT": true, - "IFT_FRELAY": true, - "IFT_FRELAYDCE": true, - "IFT_FRF16MFRBUNDLE": true, - "IFT_FRFORWARD": true, - "IFT_G703AT2MB": true, - "IFT_G703AT64K": true, - "IFT_GIF": true, - "IFT_GIGABITETHERNET": true, - "IFT_GR303IDT": true, - "IFT_GR303RDT": true, - "IFT_H323GATEKEEPER": true, - "IFT_H323PROXY": true, - "IFT_HDH1822": true, - "IFT_HDLC": true, - "IFT_HDSL2": true, - "IFT_HIPERLAN2": true, - "IFT_HIPPI": true, - "IFT_HIPPIINTERFACE": true, - "IFT_HOSTPAD": true, - "IFT_HSSI": true, - "IFT_HY": true, - "IFT_IBM370PARCHAN": true, - "IFT_IDSL": true, - "IFT_IEEE1394": true, - "IFT_IEEE80211": true, - "IFT_IEEE80212": true, - "IFT_IEEE8023ADLAG": true, - "IFT_IFGSN": true, - "IFT_IMT": true, - "IFT_INFINIBAND": true, - "IFT_INTERLEAVE": true, - "IFT_IP": true, - "IFT_IPFORWARD": true, - "IFT_IPOVERATM": true, - "IFT_IPOVERCDLC": true, - "IFT_IPOVERCLAW": true, - "IFT_IPSWITCH": true, - "IFT_IPXIP": true, - "IFT_ISDN": true, - "IFT_ISDNBASIC": true, - "IFT_ISDNPRIMARY": true, - "IFT_ISDNS": true, - "IFT_ISDNU": true, - "IFT_ISO88022LLC": true, - "IFT_ISO88023": true, - "IFT_ISO88024": true, - "IFT_ISO88025": true, - "IFT_ISO88025CRFPINT": true, - "IFT_ISO88025DTR": true, - "IFT_ISO88025FIBER": true, - "IFT_ISO88026": true, - "IFT_ISUP": true, - "IFT_L2VLAN": true, - "IFT_L3IPVLAN": true, - "IFT_L3IPXVLAN": true, - "IFT_LAPB": true, - "IFT_LAPD": true, - "IFT_LAPF": true, - "IFT_LINEGROUP": true, - "IFT_LOCALTALK": true, - "IFT_LOOP": true, - "IFT_MEDIAMAILOVERIP": true, - "IFT_MFSIGLINK": true, - "IFT_MIOX25": true, - "IFT_MODEM": true, - "IFT_MPC": true, - "IFT_MPLS": true, - "IFT_MPLSTUNNEL": true, - "IFT_MSDSL": true, - "IFT_MVL": true, - "IFT_MYRINET": true, - "IFT_NFAS": true, - "IFT_NSIP": true, - "IFT_OPTICALCHANNEL": true, - "IFT_OPTICALTRANSPORT": true, - "IFT_OTHER": true, - "IFT_P10": true, - "IFT_P80": true, - "IFT_PARA": true, - "IFT_PDP": true, - "IFT_PFLOG": true, - "IFT_PFLOW": true, - "IFT_PFSYNC": true, - "IFT_PLC": true, - "IFT_PON155": true, - "IFT_PON622": true, - "IFT_POS": true, - "IFT_PPP": true, - "IFT_PPPMULTILINKBUNDLE": true, - "IFT_PROPATM": true, - "IFT_PROPBWAP2MP": true, - "IFT_PROPCNLS": true, - "IFT_PROPDOCSWIRELESSDOWNSTREAM": true, - "IFT_PROPDOCSWIRELESSMACLAYER": true, - "IFT_PROPDOCSWIRELESSUPSTREAM": true, - "IFT_PROPMUX": true, - "IFT_PROPVIRTUAL": true, - "IFT_PROPWIRELESSP2P": true, - "IFT_PTPSERIAL": true, - "IFT_PVC": true, - "IFT_Q2931": true, - "IFT_QLLC": true, - "IFT_RADIOMAC": true, - "IFT_RADSL": true, - "IFT_REACHDSL": true, - "IFT_RFC1483": true, - "IFT_RS232": true, - "IFT_RSRB": true, - "IFT_SDLC": true, - "IFT_SDSL": true, - "IFT_SHDSL": true, - "IFT_SIP": true, - "IFT_SIPSIG": true, - "IFT_SIPTG": true, - "IFT_SLIP": true, - "IFT_SMDSDXI": true, - "IFT_SMDSICIP": true, - "IFT_SONET": true, - "IFT_SONETOVERHEADCHANNEL": true, - "IFT_SONETPATH": true, - "IFT_SONETVT": true, - "IFT_SRP": true, - "IFT_SS7SIGLINK": true, - "IFT_STACKTOSTACK": true, - "IFT_STARLAN": true, - "IFT_STF": true, - "IFT_T1": true, - "IFT_TDLC": true, - "IFT_TELINK": true, - "IFT_TERMPAD": true, - "IFT_TR008": true, - "IFT_TRANSPHDLC": true, - "IFT_TUNNEL": true, - "IFT_ULTRA": true, - "IFT_USB": true, - "IFT_V11": true, - "IFT_V35": true, - "IFT_V36": true, - "IFT_V37": true, - "IFT_VDSL": true, - "IFT_VIRTUALIPADDRESS": true, - "IFT_VIRTUALTG": true, - "IFT_VOICEDID": true, - "IFT_VOICEEM": true, - "IFT_VOICEEMFGD": true, - "IFT_VOICEENCAP": true, - "IFT_VOICEFGDEANA": true, - "IFT_VOICEFXO": true, - "IFT_VOICEFXS": true, - "IFT_VOICEOVERATM": true, - "IFT_VOICEOVERCABLE": true, - "IFT_VOICEOVERFRAMERELAY": true, - "IFT_VOICEOVERIP": true, - "IFT_X213": true, - "IFT_X25": true, - "IFT_X25DDN": true, - "IFT_X25HUNTGROUP": true, - "IFT_X25MLP": true, - "IFT_X25PLE": true, - "IFT_XETHER": true, - "IGNBRK": true, - "IGNCR": true, - "IGNORE": true, - "IGNPAR": true, - "IMAXBEL": true, - "INFINITE": true, - "INLCR": true, - "INPCK": true, - "INVALID_FILE_ATTRIBUTES": true, - "IN_ACCESS": true, - "IN_ALL_EVENTS": true, - "IN_ATTRIB": true, - "IN_CLASSA_HOST": true, - "IN_CLASSA_MAX": true, - "IN_CLASSA_NET": true, - "IN_CLASSA_NSHIFT": true, - "IN_CLASSB_HOST": true, - "IN_CLASSB_MAX": true, - "IN_CLASSB_NET": true, - "IN_CLASSB_NSHIFT": true, - "IN_CLASSC_HOST": true, - "IN_CLASSC_NET": true, - "IN_CLASSC_NSHIFT": true, - "IN_CLASSD_HOST": true, - "IN_CLASSD_NET": true, - "IN_CLASSD_NSHIFT": true, - "IN_CLOEXEC": true, - "IN_CLOSE": true, - "IN_CLOSE_NOWRITE": true, - "IN_CLOSE_WRITE": true, - "IN_CREATE": true, - "IN_DELETE": true, - "IN_DELETE_SELF": true, - "IN_DONT_FOLLOW": true, - "IN_EXCL_UNLINK": true, - "IN_IGNORED": true, - "IN_ISDIR": true, - "IN_LINKLOCALNETNUM": true, - "IN_LOOPBACKNET": true, - "IN_MASK_ADD": true, - "IN_MODIFY": true, - "IN_MOVE": true, - "IN_MOVED_FROM": true, - "IN_MOVED_TO": true, - "IN_MOVE_SELF": true, - "IN_NONBLOCK": true, - "IN_ONESHOT": true, - "IN_ONLYDIR": true, - "IN_OPEN": true, - "IN_Q_OVERFLOW": true, - "IN_RFC3021_HOST": true, - "IN_RFC3021_MASK": true, - "IN_RFC3021_NET": true, - "IN_RFC3021_NSHIFT": true, - "IN_UNMOUNT": true, - "IOC_IN": true, - "IOC_INOUT": true, - "IOC_OUT": true, - "IOC_VENDOR": true, - "IOC_WS2": true, - "IO_REPARSE_TAG_SYMLINK": true, - "IPMreq": true, - "IPMreqn": true, - "IPPROTO_3PC": true, - "IPPROTO_ADFS": true, - "IPPROTO_AH": true, - "IPPROTO_AHIP": true, - "IPPROTO_APES": true, - "IPPROTO_ARGUS": true, - "IPPROTO_AX25": true, - "IPPROTO_BHA": true, - "IPPROTO_BLT": true, - "IPPROTO_BRSATMON": true, - "IPPROTO_CARP": true, - "IPPROTO_CFTP": true, - "IPPROTO_CHAOS": true, - "IPPROTO_CMTP": true, - "IPPROTO_COMP": true, - "IPPROTO_CPHB": true, - "IPPROTO_CPNX": true, - "IPPROTO_DCCP": true, - "IPPROTO_DDP": true, - "IPPROTO_DGP": true, - "IPPROTO_DIVERT": true, - "IPPROTO_DIVERT_INIT": true, - "IPPROTO_DIVERT_RESP": true, - "IPPROTO_DONE": true, - "IPPROTO_DSTOPTS": true, - "IPPROTO_EGP": true, - "IPPROTO_EMCON": true, - "IPPROTO_ENCAP": true, - "IPPROTO_EON": true, - "IPPROTO_ESP": true, - "IPPROTO_ETHERIP": true, - "IPPROTO_FRAGMENT": true, - "IPPROTO_GGP": true, - "IPPROTO_GMTP": true, - "IPPROTO_GRE": true, - "IPPROTO_HELLO": true, - "IPPROTO_HMP": true, - "IPPROTO_HOPOPTS": true, - "IPPROTO_ICMP": true, - "IPPROTO_ICMPV6": true, - "IPPROTO_IDP": true, - "IPPROTO_IDPR": true, - "IPPROTO_IDRP": true, - "IPPROTO_IGMP": true, - "IPPROTO_IGP": true, - "IPPROTO_IGRP": true, - "IPPROTO_IL": true, - "IPPROTO_INLSP": true, - "IPPROTO_INP": true, - "IPPROTO_IP": true, - "IPPROTO_IPCOMP": true, - "IPPROTO_IPCV": true, - "IPPROTO_IPEIP": true, - "IPPROTO_IPIP": true, - "IPPROTO_IPPC": true, - "IPPROTO_IPV4": true, - "IPPROTO_IPV6": true, - "IPPROTO_IPV6_ICMP": true, - "IPPROTO_IRTP": true, - "IPPROTO_KRYPTOLAN": true, - "IPPROTO_LARP": true, - "IPPROTO_LEAF1": true, - "IPPROTO_LEAF2": true, - "IPPROTO_MAX": true, - "IPPROTO_MAXID": true, - "IPPROTO_MEAS": true, - "IPPROTO_MH": true, - "IPPROTO_MHRP": true, - "IPPROTO_MICP": true, - "IPPROTO_MOBILE": true, - "IPPROTO_MPLS": true, - "IPPROTO_MTP": true, - "IPPROTO_MUX": true, - "IPPROTO_ND": true, - "IPPROTO_NHRP": true, - "IPPROTO_NONE": true, - "IPPROTO_NSP": true, - "IPPROTO_NVPII": true, - "IPPROTO_OLD_DIVERT": true, - "IPPROTO_OSPFIGP": true, - "IPPROTO_PFSYNC": true, - "IPPROTO_PGM": true, - "IPPROTO_PIGP": true, - "IPPROTO_PIM": true, - "IPPROTO_PRM": true, - "IPPROTO_PUP": true, - "IPPROTO_PVP": true, - "IPPROTO_RAW": true, - "IPPROTO_RCCMON": true, - "IPPROTO_RDP": true, - "IPPROTO_ROUTING": true, - "IPPROTO_RSVP": true, - "IPPROTO_RVD": true, - "IPPROTO_SATEXPAK": true, - "IPPROTO_SATMON": true, - "IPPROTO_SCCSP": true, - "IPPROTO_SCTP": true, - "IPPROTO_SDRP": true, - "IPPROTO_SEND": true, - "IPPROTO_SEP": true, - "IPPROTO_SKIP": true, - "IPPROTO_SPACER": true, - "IPPROTO_SRPC": true, - "IPPROTO_ST": true, - "IPPROTO_SVMTP": true, - "IPPROTO_SWIPE": true, - "IPPROTO_TCF": true, - "IPPROTO_TCP": true, - "IPPROTO_TLSP": true, - "IPPROTO_TP": true, - "IPPROTO_TPXX": true, - "IPPROTO_TRUNK1": true, - "IPPROTO_TRUNK2": true, - "IPPROTO_TTP": true, - "IPPROTO_UDP": true, - "IPPROTO_UDPLITE": true, - "IPPROTO_VINES": true, - "IPPROTO_VISA": true, - "IPPROTO_VMTP": true, - "IPPROTO_VRRP": true, - "IPPROTO_WBEXPAK": true, - "IPPROTO_WBMON": true, - "IPPROTO_WSN": true, - "IPPROTO_XNET": true, - "IPPROTO_XTP": true, - "IPV6_2292DSTOPTS": true, - "IPV6_2292HOPLIMIT": true, - "IPV6_2292HOPOPTS": true, - "IPV6_2292NEXTHOP": true, - "IPV6_2292PKTINFO": true, - "IPV6_2292PKTOPTIONS": true, - "IPV6_2292RTHDR": true, - "IPV6_ADDRFORM": true, - "IPV6_ADD_MEMBERSHIP": true, - "IPV6_AUTHHDR": true, - "IPV6_AUTH_LEVEL": true, - "IPV6_AUTOFLOWLABEL": true, - "IPV6_BINDANY": true, - "IPV6_BINDV6ONLY": true, - "IPV6_BOUND_IF": true, - "IPV6_CHECKSUM": true, - "IPV6_DEFAULT_MULTICAST_HOPS": true, - "IPV6_DEFAULT_MULTICAST_LOOP": true, - "IPV6_DEFHLIM": true, - "IPV6_DONTFRAG": true, - "IPV6_DROP_MEMBERSHIP": true, - "IPV6_DSTOPTS": true, - "IPV6_ESP_NETWORK_LEVEL": true, - "IPV6_ESP_TRANS_LEVEL": true, - "IPV6_FAITH": true, - "IPV6_FLOWINFO_MASK": true, - "IPV6_FLOWLABEL_MASK": true, - "IPV6_FRAGTTL": true, - "IPV6_FW_ADD": true, - "IPV6_FW_DEL": true, - "IPV6_FW_FLUSH": true, - "IPV6_FW_GET": true, - "IPV6_FW_ZERO": true, - "IPV6_HLIMDEC": true, - "IPV6_HOPLIMIT": true, - "IPV6_HOPOPTS": true, - "IPV6_IPCOMP_LEVEL": true, - "IPV6_IPSEC_POLICY": true, - "IPV6_JOIN_ANYCAST": true, - "IPV6_JOIN_GROUP": true, - "IPV6_LEAVE_ANYCAST": true, - "IPV6_LEAVE_GROUP": true, - "IPV6_MAXHLIM": true, - "IPV6_MAXOPTHDR": true, - "IPV6_MAXPACKET": true, - "IPV6_MAX_GROUP_SRC_FILTER": true, - "IPV6_MAX_MEMBERSHIPS": true, - "IPV6_MAX_SOCK_SRC_FILTER": true, - "IPV6_MIN_MEMBERSHIPS": true, - "IPV6_MMTU": true, - "IPV6_MSFILTER": true, - "IPV6_MTU": true, - "IPV6_MTU_DISCOVER": true, - "IPV6_MULTICAST_HOPS": true, - "IPV6_MULTICAST_IF": true, - "IPV6_MULTICAST_LOOP": true, - "IPV6_NEXTHOP": true, - "IPV6_OPTIONS": true, - "IPV6_PATHMTU": true, - "IPV6_PIPEX": true, - "IPV6_PKTINFO": true, - "IPV6_PMTUDISC_DO": true, - "IPV6_PMTUDISC_DONT": true, - "IPV6_PMTUDISC_PROBE": true, - "IPV6_PMTUDISC_WANT": true, - "IPV6_PORTRANGE": true, - "IPV6_PORTRANGE_DEFAULT": true, - "IPV6_PORTRANGE_HIGH": true, - "IPV6_PORTRANGE_LOW": true, - "IPV6_PREFER_TEMPADDR": true, - "IPV6_RECVDSTOPTS": true, - "IPV6_RECVDSTPORT": true, - "IPV6_RECVERR": true, - "IPV6_RECVHOPLIMIT": true, - "IPV6_RECVHOPOPTS": true, - "IPV6_RECVPATHMTU": true, - "IPV6_RECVPKTINFO": true, - "IPV6_RECVRTHDR": true, - "IPV6_RECVTCLASS": true, - "IPV6_ROUTER_ALERT": true, - "IPV6_RTABLE": true, - "IPV6_RTHDR": true, - "IPV6_RTHDRDSTOPTS": true, - "IPV6_RTHDR_LOOSE": true, - "IPV6_RTHDR_STRICT": true, - "IPV6_RTHDR_TYPE_0": true, - "IPV6_RXDSTOPTS": true, - "IPV6_RXHOPOPTS": true, - "IPV6_SOCKOPT_RESERVED1": true, - "IPV6_TCLASS": true, - "IPV6_UNICAST_HOPS": true, - "IPV6_USE_MIN_MTU": true, - "IPV6_V6ONLY": true, - "IPV6_VERSION": true, - "IPV6_VERSION_MASK": true, - "IPV6_XFRM_POLICY": true, - "IP_ADD_MEMBERSHIP": true, - "IP_ADD_SOURCE_MEMBERSHIP": true, - "IP_AUTH_LEVEL": true, - "IP_BINDANY": true, - "IP_BLOCK_SOURCE": true, - "IP_BOUND_IF": true, - "IP_DEFAULT_MULTICAST_LOOP": true, - "IP_DEFAULT_MULTICAST_TTL": true, - "IP_DF": true, - "IP_DIVERTFL": true, - "IP_DONTFRAG": true, - "IP_DROP_MEMBERSHIP": true, - "IP_DROP_SOURCE_MEMBERSHIP": true, - "IP_DUMMYNET3": true, - "IP_DUMMYNET_CONFIGURE": true, - "IP_DUMMYNET_DEL": true, - "IP_DUMMYNET_FLUSH": true, - "IP_DUMMYNET_GET": true, - "IP_EF": true, - "IP_ERRORMTU": true, - "IP_ESP_NETWORK_LEVEL": true, - "IP_ESP_TRANS_LEVEL": true, - "IP_FAITH": true, - "IP_FREEBIND": true, - "IP_FW3": true, - "IP_FW_ADD": true, - "IP_FW_DEL": true, - "IP_FW_FLUSH": true, - "IP_FW_GET": true, - "IP_FW_NAT_CFG": true, - "IP_FW_NAT_DEL": true, - "IP_FW_NAT_GET_CONFIG": true, - "IP_FW_NAT_GET_LOG": true, - "IP_FW_RESETLOG": true, - "IP_FW_TABLE_ADD": true, - "IP_FW_TABLE_DEL": true, - "IP_FW_TABLE_FLUSH": true, - "IP_FW_TABLE_GETSIZE": true, - "IP_FW_TABLE_LIST": true, - "IP_FW_ZERO": true, - "IP_HDRINCL": true, - "IP_IPCOMP_LEVEL": true, - "IP_IPSECFLOWINFO": true, - "IP_IPSEC_LOCAL_AUTH": true, - "IP_IPSEC_LOCAL_CRED": true, - "IP_IPSEC_LOCAL_ID": true, - "IP_IPSEC_POLICY": true, - "IP_IPSEC_REMOTE_AUTH": true, - "IP_IPSEC_REMOTE_CRED": true, - "IP_IPSEC_REMOTE_ID": true, - "IP_MAXPACKET": true, - "IP_MAX_GROUP_SRC_FILTER": true, - "IP_MAX_MEMBERSHIPS": true, - "IP_MAX_SOCK_MUTE_FILTER": true, - "IP_MAX_SOCK_SRC_FILTER": true, - "IP_MAX_SOURCE_FILTER": true, - "IP_MF": true, - "IP_MINFRAGSIZE": true, - "IP_MINTTL": true, - "IP_MIN_MEMBERSHIPS": true, - "IP_MSFILTER": true, - "IP_MSS": true, - "IP_MTU": true, - "IP_MTU_DISCOVER": true, - "IP_MULTICAST_IF": true, - "IP_MULTICAST_IFINDEX": true, - "IP_MULTICAST_LOOP": true, - "IP_MULTICAST_TTL": true, - "IP_MULTICAST_VIF": true, - "IP_NAT__XXX": true, - "IP_OFFMASK": true, - "IP_OLD_FW_ADD": true, - "IP_OLD_FW_DEL": true, - "IP_OLD_FW_FLUSH": true, - "IP_OLD_FW_GET": true, - "IP_OLD_FW_RESETLOG": true, - "IP_OLD_FW_ZERO": true, - "IP_ONESBCAST": true, - "IP_OPTIONS": true, - "IP_ORIGDSTADDR": true, - "IP_PASSSEC": true, - "IP_PIPEX": true, - "IP_PKTINFO": true, - "IP_PKTOPTIONS": true, - "IP_PMTUDISC": true, - "IP_PMTUDISC_DO": true, - "IP_PMTUDISC_DONT": true, - "IP_PMTUDISC_PROBE": true, - "IP_PMTUDISC_WANT": true, - "IP_PORTRANGE": true, - "IP_PORTRANGE_DEFAULT": true, - "IP_PORTRANGE_HIGH": true, - "IP_PORTRANGE_LOW": true, - "IP_RECVDSTADDR": true, - "IP_RECVDSTPORT": true, - "IP_RECVERR": true, - "IP_RECVIF": true, - "IP_RECVOPTS": true, - "IP_RECVORIGDSTADDR": true, - "IP_RECVPKTINFO": true, - "IP_RECVRETOPTS": true, - "IP_RECVRTABLE": true, - "IP_RECVTOS": true, - "IP_RECVTTL": true, - "IP_RETOPTS": true, - "IP_RF": true, - "IP_ROUTER_ALERT": true, - "IP_RSVP_OFF": true, - "IP_RSVP_ON": true, - "IP_RSVP_VIF_OFF": true, - "IP_RSVP_VIF_ON": true, - "IP_RTABLE": true, - "IP_SENDSRCADDR": true, - "IP_STRIPHDR": true, - "IP_TOS": true, - "IP_TRAFFIC_MGT_BACKGROUND": true, - "IP_TRANSPARENT": true, - "IP_TTL": true, - "IP_UNBLOCK_SOURCE": true, - "IP_XFRM_POLICY": true, - "IPv6MTUInfo": true, - "IPv6Mreq": true, - "ISIG": true, - "ISTRIP": true, - "IUCLC": true, - "IUTF8": true, - "IXANY": true, - "IXOFF": true, - "IXON": true, - "IfAddrmsg": true, - "IfAnnounceMsghdr": true, - "IfData": true, - "IfInfomsg": true, - "IfMsghdr": true, - "IfaMsghdr": true, - "IfmaMsghdr": true, - "IfmaMsghdr2": true, - "ImplementsGetwd": true, - "Inet4Pktinfo": true, - "Inet6Pktinfo": true, - "InotifyAddWatch": true, - "InotifyEvent": true, - "InotifyInit": true, - "InotifyInit1": true, - "InotifyRmWatch": true, - "InterfaceAddrMessage": true, - "InterfaceAnnounceMessage": true, - "InterfaceInfo": true, - "InterfaceMessage": true, - "InterfaceMulticastAddrMessage": true, - "InvalidHandle": true, - "Ioperm": true, - "Iopl": true, - "Iovec": true, - "IpAdapterInfo": true, - "IpAddrString": true, - "IpAddressString": true, - "IpMaskString": true, - "Issetugid": true, - "KEY_ALL_ACCESS": true, - "KEY_CREATE_LINK": true, - "KEY_CREATE_SUB_KEY": true, - "KEY_ENUMERATE_SUB_KEYS": true, - "KEY_EXECUTE": true, - "KEY_NOTIFY": true, - "KEY_QUERY_VALUE": true, - "KEY_READ": true, - "KEY_SET_VALUE": true, - "KEY_WOW64_32KEY": true, - "KEY_WOW64_64KEY": true, - "KEY_WRITE": true, - "Kevent": true, - "Kevent_t": true, - "Kill": true, - "Klogctl": true, - "Kqueue": true, - "LANG_ENGLISH": true, - "LAYERED_PROTOCOL": true, - "LCNT_OVERLOAD_FLUSH": true, - "LINUX_REBOOT_CMD_CAD_OFF": true, - "LINUX_REBOOT_CMD_CAD_ON": true, - "LINUX_REBOOT_CMD_HALT": true, - "LINUX_REBOOT_CMD_KEXEC": true, - "LINUX_REBOOT_CMD_POWER_OFF": true, - "LINUX_REBOOT_CMD_RESTART": true, - "LINUX_REBOOT_CMD_RESTART2": true, - "LINUX_REBOOT_CMD_SW_SUSPEND": true, - "LINUX_REBOOT_MAGIC1": true, - "LINUX_REBOOT_MAGIC2": true, - "LOCK_EX": true, - "LOCK_NB": true, - "LOCK_SH": true, - "LOCK_UN": true, - "LazyDLL": true, - "LazyProc": true, - "Lchown": true, - "Linger": true, - "Link": true, - "Listen": true, - "Listxattr": true, - "LoadCancelIoEx": true, - "LoadConnectEx": true, - "LoadCreateSymbolicLink": true, - "LoadDLL": true, - "LoadGetAddrInfo": true, - "LoadLibrary": true, - "LoadSetFileCompletionNotificationModes": true, - "LocalFree": true, - "Log2phys_t": true, - "LookupAccountName": true, - "LookupAccountSid": true, - "LookupSID": true, - "LsfJump": true, - "LsfSocket": true, - "LsfStmt": true, - "Lstat": true, - "MADV_AUTOSYNC": true, - "MADV_CAN_REUSE": true, - "MADV_CORE": true, - "MADV_DOFORK": true, - "MADV_DONTFORK": true, - "MADV_DONTNEED": true, - "MADV_FREE": true, - "MADV_FREE_REUSABLE": true, - "MADV_FREE_REUSE": true, - "MADV_HUGEPAGE": true, - "MADV_HWPOISON": true, - "MADV_MERGEABLE": true, - "MADV_NOCORE": true, - "MADV_NOHUGEPAGE": true, - "MADV_NORMAL": true, - "MADV_NOSYNC": true, - "MADV_PROTECT": true, - "MADV_RANDOM": true, - "MADV_REMOVE": true, - "MADV_SEQUENTIAL": true, - "MADV_SPACEAVAIL": true, - "MADV_UNMERGEABLE": true, - "MADV_WILLNEED": true, - "MADV_ZERO_WIRED_PAGES": true, - "MAP_32BIT": true, - "MAP_ALIGNED_SUPER": true, - "MAP_ALIGNMENT_16MB": true, - "MAP_ALIGNMENT_1TB": true, - "MAP_ALIGNMENT_256TB": true, - "MAP_ALIGNMENT_4GB": true, - "MAP_ALIGNMENT_64KB": true, - "MAP_ALIGNMENT_64PB": true, - "MAP_ALIGNMENT_MASK": true, - "MAP_ALIGNMENT_SHIFT": true, - "MAP_ANON": true, - "MAP_ANONYMOUS": true, - "MAP_COPY": true, - "MAP_DENYWRITE": true, - "MAP_EXECUTABLE": true, - "MAP_FILE": true, - "MAP_FIXED": true, - "MAP_FLAGMASK": true, - "MAP_GROWSDOWN": true, - "MAP_HASSEMAPHORE": true, - "MAP_HUGETLB": true, - "MAP_INHERIT": true, - "MAP_INHERIT_COPY": true, - "MAP_INHERIT_DEFAULT": true, - "MAP_INHERIT_DONATE_COPY": true, - "MAP_INHERIT_NONE": true, - "MAP_INHERIT_SHARE": true, - "MAP_JIT": true, - "MAP_LOCKED": true, - "MAP_NOCACHE": true, - "MAP_NOCORE": true, - "MAP_NOEXTEND": true, - "MAP_NONBLOCK": true, - "MAP_NORESERVE": true, - "MAP_NOSYNC": true, - "MAP_POPULATE": true, - "MAP_PREFAULT_READ": true, - "MAP_PRIVATE": true, - "MAP_RENAME": true, - "MAP_RESERVED0080": true, - "MAP_RESERVED0100": true, - "MAP_SHARED": true, - "MAP_STACK": true, - "MAP_TRYFIXED": true, - "MAP_TYPE": true, - "MAP_WIRED": true, - "MAXIMUM_REPARSE_DATA_BUFFER_SIZE": true, - "MAXLEN_IFDESCR": true, - "MAXLEN_PHYSADDR": true, - "MAX_ADAPTER_ADDRESS_LENGTH": true, - "MAX_ADAPTER_DESCRIPTION_LENGTH": true, - "MAX_ADAPTER_NAME_LENGTH": true, - "MAX_COMPUTERNAME_LENGTH": true, - "MAX_INTERFACE_NAME_LEN": true, - "MAX_LONG_PATH": true, - "MAX_PATH": true, - "MAX_PROTOCOL_CHAIN": true, - "MCL_CURRENT": true, - "MCL_FUTURE": true, - "MNT_DETACH": true, - "MNT_EXPIRE": true, - "MNT_FORCE": true, - "MSG_BCAST": true, - "MSG_CMSG_CLOEXEC": true, - "MSG_COMPAT": true, - "MSG_CONFIRM": true, - "MSG_CONTROLMBUF": true, - "MSG_CTRUNC": true, - "MSG_DONTROUTE": true, - "MSG_DONTWAIT": true, - "MSG_EOF": true, - "MSG_EOR": true, - "MSG_ERRQUEUE": true, - "MSG_FASTOPEN": true, - "MSG_FIN": true, - "MSG_FLUSH": true, - "MSG_HAVEMORE": true, - "MSG_HOLD": true, - "MSG_IOVUSRSPACE": true, - "MSG_LENUSRSPACE": true, - "MSG_MCAST": true, - "MSG_MORE": true, - "MSG_NAMEMBUF": true, - "MSG_NBIO": true, - "MSG_NEEDSA": true, - "MSG_NOSIGNAL": true, - "MSG_NOTIFICATION": true, - "MSG_OOB": true, - "MSG_PEEK": true, - "MSG_PROXY": true, - "MSG_RCVMORE": true, - "MSG_RST": true, - "MSG_SEND": true, - "MSG_SYN": true, - "MSG_TRUNC": true, - "MSG_TRYHARD": true, - "MSG_USERFLAGS": true, - "MSG_WAITALL": true, - "MSG_WAITFORONE": true, - "MSG_WAITSTREAM": true, - "MS_ACTIVE": true, - "MS_ASYNC": true, - "MS_BIND": true, - "MS_DEACTIVATE": true, - "MS_DIRSYNC": true, - "MS_INVALIDATE": true, - "MS_I_VERSION": true, - "MS_KERNMOUNT": true, - "MS_KILLPAGES": true, - "MS_MANDLOCK": true, - "MS_MGC_MSK": true, - "MS_MGC_VAL": true, - "MS_MOVE": true, - "MS_NOATIME": true, - "MS_NODEV": true, - "MS_NODIRATIME": true, - "MS_NOEXEC": true, - "MS_NOSUID": true, - "MS_NOUSER": true, - "MS_POSIXACL": true, - "MS_PRIVATE": true, - "MS_RDONLY": true, - "MS_REC": true, - "MS_RELATIME": true, - "MS_REMOUNT": true, - "MS_RMT_MASK": true, - "MS_SHARED": true, - "MS_SILENT": true, - "MS_SLAVE": true, - "MS_STRICTATIME": true, - "MS_SYNC": true, - "MS_SYNCHRONOUS": true, - "MS_UNBINDABLE": true, - "Madvise": true, - "MapViewOfFile": true, - "MaxTokenInfoClass": true, - "Mclpool": true, - "MibIfRow": true, - "Mkdir": true, - "Mkdirat": true, - "Mkfifo": true, - "Mknod": true, - "Mknodat": true, - "Mlock": true, - "Mlockall": true, - "Mmap": true, - "Mount": true, - "MoveFile": true, - "Mprotect": true, - "Msghdr": true, - "Munlock": true, - "Munlockall": true, - "Munmap": true, - "MustLoadDLL": true, - "NAME_MAX": true, - "NETLINK_ADD_MEMBERSHIP": true, - "NETLINK_AUDIT": true, - "NETLINK_BROADCAST_ERROR": true, - "NETLINK_CONNECTOR": true, - "NETLINK_DNRTMSG": true, - "NETLINK_DROP_MEMBERSHIP": true, - "NETLINK_ECRYPTFS": true, - "NETLINK_FIB_LOOKUP": true, - "NETLINK_FIREWALL": true, - "NETLINK_GENERIC": true, - "NETLINK_INET_DIAG": true, - "NETLINK_IP6_FW": true, - "NETLINK_ISCSI": true, - "NETLINK_KOBJECT_UEVENT": true, - "NETLINK_NETFILTER": true, - "NETLINK_NFLOG": true, - "NETLINK_NO_ENOBUFS": true, - "NETLINK_PKTINFO": true, - "NETLINK_RDMA": true, - "NETLINK_ROUTE": true, - "NETLINK_SCSITRANSPORT": true, - "NETLINK_SELINUX": true, - "NETLINK_UNUSED": true, - "NETLINK_USERSOCK": true, - "NETLINK_XFRM": true, - "NET_RT_DUMP": true, - "NET_RT_DUMP2": true, - "NET_RT_FLAGS": true, - "NET_RT_IFLIST": true, - "NET_RT_IFLIST2": true, - "NET_RT_IFLISTL": true, - "NET_RT_IFMALIST": true, - "NET_RT_MAXID": true, - "NET_RT_OIFLIST": true, - "NET_RT_OOIFLIST": true, - "NET_RT_STAT": true, - "NET_RT_STATS": true, - "NET_RT_TABLE": true, - "NET_RT_TRASH": true, - "NLA_ALIGNTO": true, - "NLA_F_NESTED": true, - "NLA_F_NET_BYTEORDER": true, - "NLA_HDRLEN": true, - "NLMSG_ALIGNTO": true, - "NLMSG_DONE": true, - "NLMSG_ERROR": true, - "NLMSG_HDRLEN": true, - "NLMSG_MIN_TYPE": true, - "NLMSG_NOOP": true, - "NLMSG_OVERRUN": true, - "NLM_F_ACK": true, - "NLM_F_APPEND": true, - "NLM_F_ATOMIC": true, - "NLM_F_CREATE": true, - "NLM_F_DUMP": true, - "NLM_F_ECHO": true, - "NLM_F_EXCL": true, - "NLM_F_MATCH": true, - "NLM_F_MULTI": true, - "NLM_F_REPLACE": true, - "NLM_F_REQUEST": true, - "NLM_F_ROOT": true, - "NOFLSH": true, - "NOTE_ABSOLUTE": true, - "NOTE_ATTRIB": true, - "NOTE_CHILD": true, - "NOTE_DELETE": true, - "NOTE_EOF": true, - "NOTE_EXEC": true, - "NOTE_EXIT": true, - "NOTE_EXITSTATUS": true, - "NOTE_EXTEND": true, - "NOTE_FFAND": true, - "NOTE_FFCOPY": true, - "NOTE_FFCTRLMASK": true, - "NOTE_FFLAGSMASK": true, - "NOTE_FFNOP": true, - "NOTE_FFOR": true, - "NOTE_FORK": true, - "NOTE_LINK": true, - "NOTE_LOWAT": true, - "NOTE_NONE": true, - "NOTE_NSECONDS": true, - "NOTE_PCTRLMASK": true, - "NOTE_PDATAMASK": true, - "NOTE_REAP": true, - "NOTE_RENAME": true, - "NOTE_RESOURCEEND": true, - "NOTE_REVOKE": true, - "NOTE_SECONDS": true, - "NOTE_SIGNAL": true, - "NOTE_TRACK": true, - "NOTE_TRACKERR": true, - "NOTE_TRIGGER": true, - "NOTE_TRUNCATE": true, - "NOTE_USECONDS": true, - "NOTE_VM_ERROR": true, - "NOTE_VM_PRESSURE": true, - "NOTE_VM_PRESSURE_SUDDEN_TERMINATE": true, - "NOTE_VM_PRESSURE_TERMINATE": true, - "NOTE_WRITE": true, - "NameCanonical": true, - "NameCanonicalEx": true, - "NameDisplay": true, - "NameDnsDomain": true, - "NameFullyQualifiedDN": true, - "NameSamCompatible": true, - "NameServicePrincipal": true, - "NameUniqueId": true, - "NameUnknown": true, - "NameUserPrincipal": true, - "Nanosleep": true, - "NetApiBufferFree": true, - "NetGetJoinInformation": true, - "NetSetupDomainName": true, - "NetSetupUnjoined": true, - "NetSetupUnknownStatus": true, - "NetSetupWorkgroupName": true, - "NetUserGetInfo": true, - "NetlinkMessage": true, - "NetlinkRIB": true, - "NetlinkRouteAttr": true, - "NetlinkRouteRequest": true, - "NewCallback": true, - "NewCallbackCDecl": true, - "NewLazyDLL": true, - "NlAttr": true, - "NlMsgerr": true, - "NlMsghdr": true, - "NsecToFiletime": true, - "NsecToTimespec": true, - "NsecToTimeval": true, - "Ntohs": true, - "OCRNL": true, - "OFDEL": true, - "OFILL": true, - "OFIOGETBMAP": true, - "OID_PKIX_KP_SERVER_AUTH": true, - "OID_SERVER_GATED_CRYPTO": true, - "OID_SGC_NETSCAPE": true, - "OLCUC": true, - "ONLCR": true, - "ONLRET": true, - "ONOCR": true, - "ONOEOT": true, - "OPEN_ALWAYS": true, - "OPEN_EXISTING": true, - "OPOST": true, - "O_ACCMODE": true, - "O_ALERT": true, - "O_ALT_IO": true, - "O_APPEND": true, - "O_ASYNC": true, - "O_CLOEXEC": true, - "O_CREAT": true, - "O_DIRECT": true, - "O_DIRECTORY": true, - "O_DSYNC": true, - "O_EVTONLY": true, - "O_EXCL": true, - "O_EXEC": true, - "O_EXLOCK": true, - "O_FSYNC": true, - "O_LARGEFILE": true, - "O_NDELAY": true, - "O_NOATIME": true, - "O_NOCTTY": true, - "O_NOFOLLOW": true, - "O_NONBLOCK": true, - "O_NOSIGPIPE": true, - "O_POPUP": true, - "O_RDONLY": true, - "O_RDWR": true, - "O_RSYNC": true, - "O_SHLOCK": true, - "O_SYMLINK": true, - "O_SYNC": true, - "O_TRUNC": true, - "O_TTY_INIT": true, - "O_WRONLY": true, - "Open": true, - "OpenCurrentProcessToken": true, - "OpenProcess": true, - "OpenProcessToken": true, - "Openat": true, - "Overlapped": true, - "PACKET_ADD_MEMBERSHIP": true, - "PACKET_BROADCAST": true, - "PACKET_DROP_MEMBERSHIP": true, - "PACKET_FASTROUTE": true, - "PACKET_HOST": true, - "PACKET_LOOPBACK": true, - "PACKET_MR_ALLMULTI": true, - "PACKET_MR_MULTICAST": true, - "PACKET_MR_PROMISC": true, - "PACKET_MULTICAST": true, - "PACKET_OTHERHOST": true, - "PACKET_OUTGOING": true, - "PACKET_RECV_OUTPUT": true, - "PACKET_RX_RING": true, - "PACKET_STATISTICS": true, - "PAGE_EXECUTE_READ": true, - "PAGE_EXECUTE_READWRITE": true, - "PAGE_EXECUTE_WRITECOPY": true, - "PAGE_READONLY": true, - "PAGE_READWRITE": true, - "PAGE_WRITECOPY": true, - "PARENB": true, - "PARMRK": true, - "PARODD": true, - "PENDIN": true, - "PFL_HIDDEN": true, - "PFL_MATCHES_PROTOCOL_ZERO": true, - "PFL_MULTIPLE_PROTO_ENTRIES": true, - "PFL_NETWORKDIRECT_PROVIDER": true, - "PFL_RECOMMENDED_PROTO_ENTRY": true, - "PF_FLUSH": true, - "PKCS_7_ASN_ENCODING": true, - "PMC5_PIPELINE_FLUSH": true, - "PRIO_PGRP": true, - "PRIO_PROCESS": true, - "PRIO_USER": true, - "PRI_IOFLUSH": true, - "PROCESS_QUERY_INFORMATION": true, - "PROCESS_TERMINATE": true, - "PROT_EXEC": true, - "PROT_GROWSDOWN": true, - "PROT_GROWSUP": true, - "PROT_NONE": true, - "PROT_READ": true, - "PROT_WRITE": true, - "PROV_DH_SCHANNEL": true, - "PROV_DSS": true, - "PROV_DSS_DH": true, - "PROV_EC_ECDSA_FULL": true, - "PROV_EC_ECDSA_SIG": true, - "PROV_EC_ECNRA_FULL": true, - "PROV_EC_ECNRA_SIG": true, - "PROV_FORTEZZA": true, - "PROV_INTEL_SEC": true, - "PROV_MS_EXCHANGE": true, - "PROV_REPLACE_OWF": true, - "PROV_RNG": true, - "PROV_RSA_AES": true, - "PROV_RSA_FULL": true, - "PROV_RSA_SCHANNEL": true, - "PROV_RSA_SIG": true, - "PROV_SPYRUS_LYNKS": true, - "PROV_SSL": true, - "PR_CAPBSET_DROP": true, - "PR_CAPBSET_READ": true, - "PR_CLEAR_SECCOMP_FILTER": true, - "PR_ENDIAN_BIG": true, - "PR_ENDIAN_LITTLE": true, - "PR_ENDIAN_PPC_LITTLE": true, - "PR_FPEMU_NOPRINT": true, - "PR_FPEMU_SIGFPE": true, - "PR_FP_EXC_ASYNC": true, - "PR_FP_EXC_DISABLED": true, - "PR_FP_EXC_DIV": true, - "PR_FP_EXC_INV": true, - "PR_FP_EXC_NONRECOV": true, - "PR_FP_EXC_OVF": true, - "PR_FP_EXC_PRECISE": true, - "PR_FP_EXC_RES": true, - "PR_FP_EXC_SW_ENABLE": true, - "PR_FP_EXC_UND": true, - "PR_GET_DUMPABLE": true, - "PR_GET_ENDIAN": true, - "PR_GET_FPEMU": true, - "PR_GET_FPEXC": true, - "PR_GET_KEEPCAPS": true, - "PR_GET_NAME": true, - "PR_GET_PDEATHSIG": true, - "PR_GET_SECCOMP": true, - "PR_GET_SECCOMP_FILTER": true, - "PR_GET_SECUREBITS": true, - "PR_GET_TIMERSLACK": true, - "PR_GET_TIMING": true, - "PR_GET_TSC": true, - "PR_GET_UNALIGN": true, - "PR_MCE_KILL": true, - "PR_MCE_KILL_CLEAR": true, - "PR_MCE_KILL_DEFAULT": true, - "PR_MCE_KILL_EARLY": true, - "PR_MCE_KILL_GET": true, - "PR_MCE_KILL_LATE": true, - "PR_MCE_KILL_SET": true, - "PR_SECCOMP_FILTER_EVENT": true, - "PR_SECCOMP_FILTER_SYSCALL": true, - "PR_SET_DUMPABLE": true, - "PR_SET_ENDIAN": true, - "PR_SET_FPEMU": true, - "PR_SET_FPEXC": true, - "PR_SET_KEEPCAPS": true, - "PR_SET_NAME": true, - "PR_SET_PDEATHSIG": true, - "PR_SET_PTRACER": true, - "PR_SET_SECCOMP": true, - "PR_SET_SECCOMP_FILTER": true, - "PR_SET_SECUREBITS": true, - "PR_SET_TIMERSLACK": true, - "PR_SET_TIMING": true, - "PR_SET_TSC": true, - "PR_SET_UNALIGN": true, - "PR_TASK_PERF_EVENTS_DISABLE": true, - "PR_TASK_PERF_EVENTS_ENABLE": true, - "PR_TIMING_STATISTICAL": true, - "PR_TIMING_TIMESTAMP": true, - "PR_TSC_ENABLE": true, - "PR_TSC_SIGSEGV": true, - "PR_UNALIGN_NOPRINT": true, - "PR_UNALIGN_SIGBUS": true, - "PTRACE_ARCH_PRCTL": true, - "PTRACE_ATTACH": true, - "PTRACE_CONT": true, - "PTRACE_DETACH": true, - "PTRACE_EVENT_CLONE": true, - "PTRACE_EVENT_EXEC": true, - "PTRACE_EVENT_EXIT": true, - "PTRACE_EVENT_FORK": true, - "PTRACE_EVENT_VFORK": true, - "PTRACE_EVENT_VFORK_DONE": true, - "PTRACE_GETCRUNCHREGS": true, - "PTRACE_GETEVENTMSG": true, - "PTRACE_GETFPREGS": true, - "PTRACE_GETFPXREGS": true, - "PTRACE_GETHBPREGS": true, - "PTRACE_GETREGS": true, - "PTRACE_GETREGSET": true, - "PTRACE_GETSIGINFO": true, - "PTRACE_GETVFPREGS": true, - "PTRACE_GETWMMXREGS": true, - "PTRACE_GET_THREAD_AREA": true, - "PTRACE_KILL": true, - "PTRACE_OLDSETOPTIONS": true, - "PTRACE_O_MASK": true, - "PTRACE_O_TRACECLONE": true, - "PTRACE_O_TRACEEXEC": true, - "PTRACE_O_TRACEEXIT": true, - "PTRACE_O_TRACEFORK": true, - "PTRACE_O_TRACESYSGOOD": true, - "PTRACE_O_TRACEVFORK": true, - "PTRACE_O_TRACEVFORKDONE": true, - "PTRACE_PEEKDATA": true, - "PTRACE_PEEKTEXT": true, - "PTRACE_PEEKUSR": true, - "PTRACE_POKEDATA": true, - "PTRACE_POKETEXT": true, - "PTRACE_POKEUSR": true, - "PTRACE_SETCRUNCHREGS": true, - "PTRACE_SETFPREGS": true, - "PTRACE_SETFPXREGS": true, - "PTRACE_SETHBPREGS": true, - "PTRACE_SETOPTIONS": true, - "PTRACE_SETREGS": true, - "PTRACE_SETREGSET": true, - "PTRACE_SETSIGINFO": true, - "PTRACE_SETVFPREGS": true, - "PTRACE_SETWMMXREGS": true, - "PTRACE_SET_SYSCALL": true, - "PTRACE_SET_THREAD_AREA": true, - "PTRACE_SINGLEBLOCK": true, - "PTRACE_SINGLESTEP": true, - "PTRACE_SYSCALL": true, - "PTRACE_SYSEMU": true, - "PTRACE_SYSEMU_SINGLESTEP": true, - "PTRACE_TRACEME": true, - "PT_ATTACH": true, - "PT_ATTACHEXC": true, - "PT_CONTINUE": true, - "PT_DATA_ADDR": true, - "PT_DENY_ATTACH": true, - "PT_DETACH": true, - "PT_FIRSTMACH": true, - "PT_FORCEQUOTA": true, - "PT_KILL": true, - "PT_MASK": true, - "PT_READ_D": true, - "PT_READ_I": true, - "PT_READ_U": true, - "PT_SIGEXC": true, - "PT_STEP": true, - "PT_TEXT_ADDR": true, - "PT_TEXT_END_ADDR": true, - "PT_THUPDATE": true, - "PT_TRACE_ME": true, - "PT_WRITE_D": true, - "PT_WRITE_I": true, - "PT_WRITE_U": true, - "ParseDirent": true, - "ParseNetlinkMessage": true, - "ParseNetlinkRouteAttr": true, - "ParseRoutingMessage": true, - "ParseRoutingSockaddr": true, - "ParseSocketControlMessage": true, - "ParseUnixCredentials": true, - "ParseUnixRights": true, - "PathMax": true, - "Pathconf": true, - "Pause": true, - "Pipe": true, - "Pipe2": true, - "PivotRoot": true, - "Pointer": true, - "PostQueuedCompletionStatus": true, - "Pread": true, - "Proc": true, - "ProcAttr": true, - "Process32First": true, - "Process32Next": true, - "ProcessEntry32": true, - "ProcessInformation": true, - "Protoent": true, - "PtraceAttach": true, - "PtraceCont": true, - "PtraceDetach": true, - "PtraceGetEventMsg": true, - "PtraceGetRegs": true, - "PtracePeekData": true, - "PtracePeekText": true, - "PtracePokeData": true, - "PtracePokeText": true, - "PtraceRegs": true, - "PtraceSetOptions": true, - "PtraceSetRegs": true, - "PtraceSingleStep": true, - "PtraceSyscall": true, - "Pwrite": true, - "REG_BINARY": true, - "REG_DWORD": true, - "REG_DWORD_BIG_ENDIAN": true, - "REG_DWORD_LITTLE_ENDIAN": true, - "REG_EXPAND_SZ": true, - "REG_FULL_RESOURCE_DESCRIPTOR": true, - "REG_LINK": true, - "REG_MULTI_SZ": true, - "REG_NONE": true, - "REG_QWORD": true, - "REG_QWORD_LITTLE_ENDIAN": true, - "REG_RESOURCE_LIST": true, - "REG_RESOURCE_REQUIREMENTS_LIST": true, - "REG_SZ": true, - "RLIMIT_AS": true, - "RLIMIT_CORE": true, - "RLIMIT_CPU": true, - "RLIMIT_DATA": true, - "RLIMIT_FSIZE": true, - "RLIMIT_NOFILE": true, - "RLIMIT_STACK": true, - "RLIM_INFINITY": true, - "RTAX_ADVMSS": true, - "RTAX_AUTHOR": true, - "RTAX_BRD": true, - "RTAX_CWND": true, - "RTAX_DST": true, - "RTAX_FEATURES": true, - "RTAX_FEATURE_ALLFRAG": true, - "RTAX_FEATURE_ECN": true, - "RTAX_FEATURE_SACK": true, - "RTAX_FEATURE_TIMESTAMP": true, - "RTAX_GATEWAY": true, - "RTAX_GENMASK": true, - "RTAX_HOPLIMIT": true, - "RTAX_IFA": true, - "RTAX_IFP": true, - "RTAX_INITCWND": true, - "RTAX_INITRWND": true, - "RTAX_LABEL": true, - "RTAX_LOCK": true, - "RTAX_MAX": true, - "RTAX_MTU": true, - "RTAX_NETMASK": true, - "RTAX_REORDERING": true, - "RTAX_RTO_MIN": true, - "RTAX_RTT": true, - "RTAX_RTTVAR": true, - "RTAX_SRC": true, - "RTAX_SRCMASK": true, - "RTAX_SSTHRESH": true, - "RTAX_TAG": true, - "RTAX_UNSPEC": true, - "RTAX_WINDOW": true, - "RTA_ALIGNTO": true, - "RTA_AUTHOR": true, - "RTA_BRD": true, - "RTA_CACHEINFO": true, - "RTA_DST": true, - "RTA_FLOW": true, - "RTA_GATEWAY": true, - "RTA_GENMASK": true, - "RTA_IFA": true, - "RTA_IFP": true, - "RTA_IIF": true, - "RTA_LABEL": true, - "RTA_MAX": true, - "RTA_METRICS": true, - "RTA_MULTIPATH": true, - "RTA_NETMASK": true, - "RTA_OIF": true, - "RTA_PREFSRC": true, - "RTA_PRIORITY": true, - "RTA_SRC": true, - "RTA_SRCMASK": true, - "RTA_TABLE": true, - "RTA_TAG": true, - "RTA_UNSPEC": true, - "RTCF_DIRECTSRC": true, - "RTCF_DOREDIRECT": true, - "RTCF_LOG": true, - "RTCF_MASQ": true, - "RTCF_NAT": true, - "RTCF_VALVE": true, - "RTF_ADDRCLASSMASK": true, - "RTF_ADDRCONF": true, - "RTF_ALLONLINK": true, - "RTF_ANNOUNCE": true, - "RTF_BLACKHOLE": true, - "RTF_BROADCAST": true, - "RTF_CACHE": true, - "RTF_CLONED": true, - "RTF_CLONING": true, - "RTF_CONDEMNED": true, - "RTF_DEFAULT": true, - "RTF_DELCLONE": true, - "RTF_DONE": true, - "RTF_DYNAMIC": true, - "RTF_FLOW": true, - "RTF_FMASK": true, - "RTF_GATEWAY": true, - "RTF_GWFLAG_COMPAT": true, - "RTF_HOST": true, - "RTF_IFREF": true, - "RTF_IFSCOPE": true, - "RTF_INTERFACE": true, - "RTF_IRTT": true, - "RTF_LINKRT": true, - "RTF_LLDATA": true, - "RTF_LLINFO": true, - "RTF_LOCAL": true, - "RTF_MASK": true, - "RTF_MODIFIED": true, - "RTF_MPATH": true, - "RTF_MPLS": true, - "RTF_MSS": true, - "RTF_MTU": true, - "RTF_MULTICAST": true, - "RTF_NAT": true, - "RTF_NOFORWARD": true, - "RTF_NONEXTHOP": true, - "RTF_NOPMTUDISC": true, - "RTF_PERMANENT_ARP": true, - "RTF_PINNED": true, - "RTF_POLICY": true, - "RTF_PRCLONING": true, - "RTF_PROTO1": true, - "RTF_PROTO2": true, - "RTF_PROTO3": true, - "RTF_REINSTATE": true, - "RTF_REJECT": true, - "RTF_RNH_LOCKED": true, - "RTF_SOURCE": true, - "RTF_SRC": true, - "RTF_STATIC": true, - "RTF_STICKY": true, - "RTF_THROW": true, - "RTF_TUNNEL": true, - "RTF_UP": true, - "RTF_USETRAILERS": true, - "RTF_WASCLONED": true, - "RTF_WINDOW": true, - "RTF_XRESOLVE": true, - "RTM_ADD": true, - "RTM_BASE": true, - "RTM_CHANGE": true, - "RTM_CHGADDR": true, - "RTM_DELACTION": true, - "RTM_DELADDR": true, - "RTM_DELADDRLABEL": true, - "RTM_DELETE": true, - "RTM_DELLINK": true, - "RTM_DELMADDR": true, - "RTM_DELNEIGH": true, - "RTM_DELQDISC": true, - "RTM_DELROUTE": true, - "RTM_DELRULE": true, - "RTM_DELTCLASS": true, - "RTM_DELTFILTER": true, - "RTM_DESYNC": true, - "RTM_F_CLONED": true, - "RTM_F_EQUALIZE": true, - "RTM_F_NOTIFY": true, - "RTM_F_PREFIX": true, - "RTM_GET": true, - "RTM_GET2": true, - "RTM_GETACTION": true, - "RTM_GETADDR": true, - "RTM_GETADDRLABEL": true, - "RTM_GETANYCAST": true, - "RTM_GETDCB": true, - "RTM_GETLINK": true, - "RTM_GETMULTICAST": true, - "RTM_GETNEIGH": true, - "RTM_GETNEIGHTBL": true, - "RTM_GETQDISC": true, - "RTM_GETROUTE": true, - "RTM_GETRULE": true, - "RTM_GETTCLASS": true, - "RTM_GETTFILTER": true, - "RTM_IEEE80211": true, - "RTM_IFANNOUNCE": true, - "RTM_IFINFO": true, - "RTM_IFINFO2": true, - "RTM_LLINFO_UPD": true, - "RTM_LOCK": true, - "RTM_LOSING": true, - "RTM_MAX": true, - "RTM_MAXSIZE": true, - "RTM_MISS": true, - "RTM_NEWACTION": true, - "RTM_NEWADDR": true, - "RTM_NEWADDRLABEL": true, - "RTM_NEWLINK": true, - "RTM_NEWMADDR": true, - "RTM_NEWMADDR2": true, - "RTM_NEWNDUSEROPT": true, - "RTM_NEWNEIGH": true, - "RTM_NEWNEIGHTBL": true, - "RTM_NEWPREFIX": true, - "RTM_NEWQDISC": true, - "RTM_NEWROUTE": true, - "RTM_NEWRULE": true, - "RTM_NEWTCLASS": true, - "RTM_NEWTFILTER": true, - "RTM_NR_FAMILIES": true, - "RTM_NR_MSGTYPES": true, - "RTM_OIFINFO": true, - "RTM_OLDADD": true, - "RTM_OLDDEL": true, - "RTM_OOIFINFO": true, - "RTM_REDIRECT": true, - "RTM_RESOLVE": true, - "RTM_RTTUNIT": true, - "RTM_SETDCB": true, - "RTM_SETGATE": true, - "RTM_SETLINK": true, - "RTM_SETNEIGHTBL": true, - "RTM_VERSION": true, - "RTNH_ALIGNTO": true, - "RTNH_F_DEAD": true, - "RTNH_F_ONLINK": true, - "RTNH_F_PERVASIVE": true, - "RTNLGRP_IPV4_IFADDR": true, - "RTNLGRP_IPV4_MROUTE": true, - "RTNLGRP_IPV4_ROUTE": true, - "RTNLGRP_IPV4_RULE": true, - "RTNLGRP_IPV6_IFADDR": true, - "RTNLGRP_IPV6_IFINFO": true, - "RTNLGRP_IPV6_MROUTE": true, - "RTNLGRP_IPV6_PREFIX": true, - "RTNLGRP_IPV6_ROUTE": true, - "RTNLGRP_IPV6_RULE": true, - "RTNLGRP_LINK": true, - "RTNLGRP_ND_USEROPT": true, - "RTNLGRP_NEIGH": true, - "RTNLGRP_NONE": true, - "RTNLGRP_NOTIFY": true, - "RTNLGRP_TC": true, - "RTN_ANYCAST": true, - "RTN_BLACKHOLE": true, - "RTN_BROADCAST": true, - "RTN_LOCAL": true, - "RTN_MAX": true, - "RTN_MULTICAST": true, - "RTN_NAT": true, - "RTN_PROHIBIT": true, - "RTN_THROW": true, - "RTN_UNICAST": true, - "RTN_UNREACHABLE": true, - "RTN_UNSPEC": true, - "RTN_XRESOLVE": true, - "RTPROT_BIRD": true, - "RTPROT_BOOT": true, - "RTPROT_DHCP": true, - "RTPROT_DNROUTED": true, - "RTPROT_GATED": true, - "RTPROT_KERNEL": true, - "RTPROT_MRT": true, - "RTPROT_NTK": true, - "RTPROT_RA": true, - "RTPROT_REDIRECT": true, - "RTPROT_STATIC": true, - "RTPROT_UNSPEC": true, - "RTPROT_XORP": true, - "RTPROT_ZEBRA": true, - "RTV_EXPIRE": true, - "RTV_HOPCOUNT": true, - "RTV_MTU": true, - "RTV_RPIPE": true, - "RTV_RTT": true, - "RTV_RTTVAR": true, - "RTV_SPIPE": true, - "RTV_SSTHRESH": true, - "RTV_WEIGHT": true, - "RT_CACHING_CONTEXT": true, - "RT_CLASS_DEFAULT": true, - "RT_CLASS_LOCAL": true, - "RT_CLASS_MAIN": true, - "RT_CLASS_MAX": true, - "RT_CLASS_UNSPEC": true, - "RT_DEFAULT_FIB": true, - "RT_NORTREF": true, - "RT_SCOPE_HOST": true, - "RT_SCOPE_LINK": true, - "RT_SCOPE_NOWHERE": true, - "RT_SCOPE_SITE": true, - "RT_SCOPE_UNIVERSE": true, - "RT_TABLEID_MAX": true, - "RT_TABLE_COMPAT": true, - "RT_TABLE_DEFAULT": true, - "RT_TABLE_LOCAL": true, - "RT_TABLE_MAIN": true, - "RT_TABLE_MAX": true, - "RT_TABLE_UNSPEC": true, - "RUSAGE_CHILDREN": true, - "RUSAGE_SELF": true, - "RUSAGE_THREAD": true, - "Radvisory_t": true, - "RawConn": true, - "RawSockaddr": true, - "RawSockaddrAny": true, - "RawSockaddrDatalink": true, - "RawSockaddrInet4": true, - "RawSockaddrInet6": true, - "RawSockaddrLinklayer": true, - "RawSockaddrNetlink": true, - "RawSockaddrUnix": true, - "RawSyscall": true, - "RawSyscall6": true, - "Read": true, - "ReadConsole": true, - "ReadDirectoryChanges": true, - "ReadDirent": true, - "ReadFile": true, - "Readlink": true, - "Reboot": true, - "Recvfrom": true, - "Recvmsg": true, - "RegCloseKey": true, - "RegEnumKeyEx": true, - "RegOpenKeyEx": true, - "RegQueryInfoKey": true, - "RegQueryValueEx": true, - "RemoveDirectory": true, - "Removexattr": true, - "Rename": true, - "Renameat": true, - "Revoke": true, - "Rlimit": true, - "Rmdir": true, - "RouteMessage": true, - "RouteRIB": true, - "RoutingMessage": true, - "RtAttr": true, - "RtGenmsg": true, - "RtMetrics": true, - "RtMsg": true, - "RtMsghdr": true, - "RtNexthop": true, - "Rusage": true, - "SCM_BINTIME": true, - "SCM_CREDENTIALS": true, - "SCM_CREDS": true, - "SCM_RIGHTS": true, - "SCM_TIMESTAMP": true, - "SCM_TIMESTAMPING": true, - "SCM_TIMESTAMPNS": true, - "SCM_TIMESTAMP_MONOTONIC": true, - "SHUT_RD": true, - "SHUT_RDWR": true, - "SHUT_WR": true, - "SID": true, - "SIDAndAttributes": true, - "SIGABRT": true, - "SIGALRM": true, - "SIGBUS": true, - "SIGCHLD": true, - "SIGCLD": true, - "SIGCONT": true, - "SIGEMT": true, - "SIGFPE": true, - "SIGHUP": true, - "SIGILL": true, - "SIGINFO": true, - "SIGINT": true, - "SIGIO": true, - "SIGIOT": true, - "SIGKILL": true, - "SIGLIBRT": true, - "SIGLWP": true, - "SIGPIPE": true, - "SIGPOLL": true, - "SIGPROF": true, - "SIGPWR": true, - "SIGQUIT": true, - "SIGSEGV": true, - "SIGSTKFLT": true, - "SIGSTOP": true, - "SIGSYS": true, - "SIGTERM": true, - "SIGTHR": true, - "SIGTRAP": true, - "SIGTSTP": true, - "SIGTTIN": true, - "SIGTTOU": true, - "SIGUNUSED": true, - "SIGURG": true, - "SIGUSR1": true, - "SIGUSR2": true, - "SIGVTALRM": true, - "SIGWINCH": true, - "SIGXCPU": true, - "SIGXFSZ": true, - "SIOCADDDLCI": true, - "SIOCADDMULTI": true, - "SIOCADDRT": true, - "SIOCAIFADDR": true, - "SIOCAIFGROUP": true, - "SIOCALIFADDR": true, - "SIOCARPIPLL": true, - "SIOCATMARK": true, - "SIOCAUTOADDR": true, - "SIOCAUTONETMASK": true, - "SIOCBRDGADD": true, - "SIOCBRDGADDS": true, - "SIOCBRDGARL": true, - "SIOCBRDGDADDR": true, - "SIOCBRDGDEL": true, - "SIOCBRDGDELS": true, - "SIOCBRDGFLUSH": true, - "SIOCBRDGFRL": true, - "SIOCBRDGGCACHE": true, - "SIOCBRDGGFD": true, - "SIOCBRDGGHT": true, - "SIOCBRDGGIFFLGS": true, - "SIOCBRDGGMA": true, - "SIOCBRDGGPARAM": true, - "SIOCBRDGGPRI": true, - "SIOCBRDGGRL": true, - "SIOCBRDGGSIFS": true, - "SIOCBRDGGTO": true, - "SIOCBRDGIFS": true, - "SIOCBRDGRTS": true, - "SIOCBRDGSADDR": true, - "SIOCBRDGSCACHE": true, - "SIOCBRDGSFD": true, - "SIOCBRDGSHT": true, - "SIOCBRDGSIFCOST": true, - "SIOCBRDGSIFFLGS": true, - "SIOCBRDGSIFPRIO": true, - "SIOCBRDGSMA": true, - "SIOCBRDGSPRI": true, - "SIOCBRDGSPROTO": true, - "SIOCBRDGSTO": true, - "SIOCBRDGSTXHC": true, - "SIOCDARP": true, - "SIOCDELDLCI": true, - "SIOCDELMULTI": true, - "SIOCDELRT": true, - "SIOCDEVPRIVATE": true, - "SIOCDIFADDR": true, - "SIOCDIFGROUP": true, - "SIOCDIFPHYADDR": true, - "SIOCDLIFADDR": true, - "SIOCDRARP": true, - "SIOCGARP": true, - "SIOCGDRVSPEC": true, - "SIOCGETKALIVE": true, - "SIOCGETLABEL": true, - "SIOCGETPFLOW": true, - "SIOCGETPFSYNC": true, - "SIOCGETSGCNT": true, - "SIOCGETVIFCNT": true, - "SIOCGETVLAN": true, - "SIOCGHIWAT": true, - "SIOCGIFADDR": true, - "SIOCGIFADDRPREF": true, - "SIOCGIFALIAS": true, - "SIOCGIFALTMTU": true, - "SIOCGIFASYNCMAP": true, - "SIOCGIFBOND": true, - "SIOCGIFBR": true, - "SIOCGIFBRDADDR": true, - "SIOCGIFCAP": true, - "SIOCGIFCONF": true, - "SIOCGIFCOUNT": true, - "SIOCGIFDATA": true, - "SIOCGIFDESCR": true, - "SIOCGIFDEVMTU": true, - "SIOCGIFDLT": true, - "SIOCGIFDSTADDR": true, - "SIOCGIFENCAP": true, - "SIOCGIFFIB": true, - "SIOCGIFFLAGS": true, - "SIOCGIFGATTR": true, - "SIOCGIFGENERIC": true, - "SIOCGIFGMEMB": true, - "SIOCGIFGROUP": true, - "SIOCGIFHARDMTU": true, - "SIOCGIFHWADDR": true, - "SIOCGIFINDEX": true, - "SIOCGIFKPI": true, - "SIOCGIFMAC": true, - "SIOCGIFMAP": true, - "SIOCGIFMEDIA": true, - "SIOCGIFMEM": true, - "SIOCGIFMETRIC": true, - "SIOCGIFMTU": true, - "SIOCGIFNAME": true, - "SIOCGIFNETMASK": true, - "SIOCGIFPDSTADDR": true, - "SIOCGIFPFLAGS": true, - "SIOCGIFPHYS": true, - "SIOCGIFPRIORITY": true, - "SIOCGIFPSRCADDR": true, - "SIOCGIFRDOMAIN": true, - "SIOCGIFRTLABEL": true, - "SIOCGIFSLAVE": true, - "SIOCGIFSTATUS": true, - "SIOCGIFTIMESLOT": true, - "SIOCGIFTXQLEN": true, - "SIOCGIFVLAN": true, - "SIOCGIFWAKEFLAGS": true, - "SIOCGIFXFLAGS": true, - "SIOCGLIFADDR": true, - "SIOCGLIFPHYADDR": true, - "SIOCGLIFPHYRTABLE": true, - "SIOCGLIFPHYTTL": true, - "SIOCGLINKSTR": true, - "SIOCGLOWAT": true, - "SIOCGPGRP": true, - "SIOCGPRIVATE_0": true, - "SIOCGPRIVATE_1": true, - "SIOCGRARP": true, - "SIOCGSPPPPARAMS": true, - "SIOCGSTAMP": true, - "SIOCGSTAMPNS": true, - "SIOCGVH": true, - "SIOCGVNETID": true, - "SIOCIFCREATE": true, - "SIOCIFCREATE2": true, - "SIOCIFDESTROY": true, - "SIOCIFGCLONERS": true, - "SIOCINITIFADDR": true, - "SIOCPROTOPRIVATE": true, - "SIOCRSLVMULTI": true, - "SIOCRTMSG": true, - "SIOCSARP": true, - "SIOCSDRVSPEC": true, - "SIOCSETKALIVE": true, - "SIOCSETLABEL": true, - "SIOCSETPFLOW": true, - "SIOCSETPFSYNC": true, - "SIOCSETVLAN": true, - "SIOCSHIWAT": true, - "SIOCSIFADDR": true, - "SIOCSIFADDRPREF": true, - "SIOCSIFALTMTU": true, - "SIOCSIFASYNCMAP": true, - "SIOCSIFBOND": true, - "SIOCSIFBR": true, - "SIOCSIFBRDADDR": true, - "SIOCSIFCAP": true, - "SIOCSIFDESCR": true, - "SIOCSIFDSTADDR": true, - "SIOCSIFENCAP": true, - "SIOCSIFFIB": true, - "SIOCSIFFLAGS": true, - "SIOCSIFGATTR": true, - "SIOCSIFGENERIC": true, - "SIOCSIFHWADDR": true, - "SIOCSIFHWBROADCAST": true, - "SIOCSIFKPI": true, - "SIOCSIFLINK": true, - "SIOCSIFLLADDR": true, - "SIOCSIFMAC": true, - "SIOCSIFMAP": true, - "SIOCSIFMEDIA": true, - "SIOCSIFMEM": true, - "SIOCSIFMETRIC": true, - "SIOCSIFMTU": true, - "SIOCSIFNAME": true, - "SIOCSIFNETMASK": true, - "SIOCSIFPFLAGS": true, - "SIOCSIFPHYADDR": true, - "SIOCSIFPHYS": true, - "SIOCSIFPRIORITY": true, - "SIOCSIFRDOMAIN": true, - "SIOCSIFRTLABEL": true, - "SIOCSIFRVNET": true, - "SIOCSIFSLAVE": true, - "SIOCSIFTIMESLOT": true, - "SIOCSIFTXQLEN": true, - "SIOCSIFVLAN": true, - "SIOCSIFVNET": true, - "SIOCSIFXFLAGS": true, - "SIOCSLIFPHYADDR": true, - "SIOCSLIFPHYRTABLE": true, - "SIOCSLIFPHYTTL": true, - "SIOCSLINKSTR": true, - "SIOCSLOWAT": true, - "SIOCSPGRP": true, - "SIOCSRARP": true, - "SIOCSSPPPPARAMS": true, - "SIOCSVH": true, - "SIOCSVNETID": true, - "SIOCZIFDATA": true, - "SIO_GET_EXTENSION_FUNCTION_POINTER": true, - "SIO_GET_INTERFACE_LIST": true, - "SIO_KEEPALIVE_VALS": true, - "SIO_UDP_CONNRESET": true, - "SOCK_CLOEXEC": true, - "SOCK_DCCP": true, - "SOCK_DGRAM": true, - "SOCK_FLAGS_MASK": true, - "SOCK_MAXADDRLEN": true, - "SOCK_NONBLOCK": true, - "SOCK_NOSIGPIPE": true, - "SOCK_PACKET": true, - "SOCK_RAW": true, - "SOCK_RDM": true, - "SOCK_SEQPACKET": true, - "SOCK_STREAM": true, - "SOL_AAL": true, - "SOL_ATM": true, - "SOL_DECNET": true, - "SOL_ICMPV6": true, - "SOL_IP": true, - "SOL_IPV6": true, - "SOL_IRDA": true, - "SOL_PACKET": true, - "SOL_RAW": true, - "SOL_SOCKET": true, - "SOL_TCP": true, - "SOL_X25": true, - "SOMAXCONN": true, - "SO_ACCEPTCONN": true, - "SO_ACCEPTFILTER": true, - "SO_ATTACH_FILTER": true, - "SO_BINDANY": true, - "SO_BINDTODEVICE": true, - "SO_BINTIME": true, - "SO_BROADCAST": true, - "SO_BSDCOMPAT": true, - "SO_DEBUG": true, - "SO_DETACH_FILTER": true, - "SO_DOMAIN": true, - "SO_DONTROUTE": true, - "SO_DONTTRUNC": true, - "SO_ERROR": true, - "SO_KEEPALIVE": true, - "SO_LABEL": true, - "SO_LINGER": true, - "SO_LINGER_SEC": true, - "SO_LISTENINCQLEN": true, - "SO_LISTENQLEN": true, - "SO_LISTENQLIMIT": true, - "SO_MARK": true, - "SO_NETPROC": true, - "SO_NKE": true, - "SO_NOADDRERR": true, - "SO_NOHEADER": true, - "SO_NOSIGPIPE": true, - "SO_NOTIFYCONFLICT": true, - "SO_NO_CHECK": true, - "SO_NO_DDP": true, - "SO_NO_OFFLOAD": true, - "SO_NP_EXTENSIONS": true, - "SO_NREAD": true, - "SO_NWRITE": true, - "SO_OOBINLINE": true, - "SO_OVERFLOWED": true, - "SO_PASSCRED": true, - "SO_PASSSEC": true, - "SO_PEERCRED": true, - "SO_PEERLABEL": true, - "SO_PEERNAME": true, - "SO_PEERSEC": true, - "SO_PRIORITY": true, - "SO_PROTOCOL": true, - "SO_PROTOTYPE": true, - "SO_RANDOMPORT": true, - "SO_RCVBUF": true, - "SO_RCVBUFFORCE": true, - "SO_RCVLOWAT": true, - "SO_RCVTIMEO": true, - "SO_RESTRICTIONS": true, - "SO_RESTRICT_DENYIN": true, - "SO_RESTRICT_DENYOUT": true, - "SO_RESTRICT_DENYSET": true, - "SO_REUSEADDR": true, - "SO_REUSEPORT": true, - "SO_REUSESHAREUID": true, - "SO_RTABLE": true, - "SO_RXQ_OVFL": true, - "SO_SECURITY_AUTHENTICATION": true, - "SO_SECURITY_ENCRYPTION_NETWORK": true, - "SO_SECURITY_ENCRYPTION_TRANSPORT": true, - "SO_SETFIB": true, - "SO_SNDBUF": true, - "SO_SNDBUFFORCE": true, - "SO_SNDLOWAT": true, - "SO_SNDTIMEO": true, - "SO_SPLICE": true, - "SO_TIMESTAMP": true, - "SO_TIMESTAMPING": true, - "SO_TIMESTAMPNS": true, - "SO_TIMESTAMP_MONOTONIC": true, - "SO_TYPE": true, - "SO_UPCALLCLOSEWAIT": true, - "SO_UPDATE_ACCEPT_CONTEXT": true, - "SO_UPDATE_CONNECT_CONTEXT": true, - "SO_USELOOPBACK": true, - "SO_USER_COOKIE": true, - "SO_VENDOR": true, - "SO_WANTMORE": true, - "SO_WANTOOBFLAG": true, - "SSLExtraCertChainPolicyPara": true, - "STANDARD_RIGHTS_ALL": true, - "STANDARD_RIGHTS_EXECUTE": true, - "STANDARD_RIGHTS_READ": true, - "STANDARD_RIGHTS_REQUIRED": true, - "STANDARD_RIGHTS_WRITE": true, - "STARTF_USESHOWWINDOW": true, - "STARTF_USESTDHANDLES": true, - "STD_ERROR_HANDLE": true, - "STD_INPUT_HANDLE": true, - "STD_OUTPUT_HANDLE": true, - "SUBLANG_ENGLISH_US": true, - "SW_FORCEMINIMIZE": true, - "SW_HIDE": true, - "SW_MAXIMIZE": true, - "SW_MINIMIZE": true, - "SW_NORMAL": true, - "SW_RESTORE": true, - "SW_SHOW": true, - "SW_SHOWDEFAULT": true, - "SW_SHOWMAXIMIZED": true, - "SW_SHOWMINIMIZED": true, - "SW_SHOWMINNOACTIVE": true, - "SW_SHOWNA": true, - "SW_SHOWNOACTIVATE": true, - "SW_SHOWNORMAL": true, - "SYMBOLIC_LINK_FLAG_DIRECTORY": true, - "SYNCHRONIZE": true, - "SYSCTL_VERSION": true, - "SYSCTL_VERS_0": true, - "SYSCTL_VERS_1": true, - "SYSCTL_VERS_MASK": true, - "SYS_ABORT2": true, - "SYS_ACCEPT": true, - "SYS_ACCEPT4": true, - "SYS_ACCEPT_NOCANCEL": true, - "SYS_ACCESS": true, - "SYS_ACCESS_EXTENDED": true, - "SYS_ACCT": true, - "SYS_ADD_KEY": true, - "SYS_ADD_PROFIL": true, - "SYS_ADJFREQ": true, - "SYS_ADJTIME": true, - "SYS_ADJTIMEX": true, - "SYS_AFS_SYSCALL": true, - "SYS_AIO_CANCEL": true, - "SYS_AIO_ERROR": true, - "SYS_AIO_FSYNC": true, - "SYS_AIO_READ": true, - "SYS_AIO_RETURN": true, - "SYS_AIO_SUSPEND": true, - "SYS_AIO_SUSPEND_NOCANCEL": true, - "SYS_AIO_WRITE": true, - "SYS_ALARM": true, - "SYS_ARCH_PRCTL": true, - "SYS_ARM_FADVISE64_64": true, - "SYS_ARM_SYNC_FILE_RANGE": true, - "SYS_ATGETMSG": true, - "SYS_ATPGETREQ": true, - "SYS_ATPGETRSP": true, - "SYS_ATPSNDREQ": true, - "SYS_ATPSNDRSP": true, - "SYS_ATPUTMSG": true, - "SYS_ATSOCKET": true, - "SYS_AUDIT": true, - "SYS_AUDITCTL": true, - "SYS_AUDITON": true, - "SYS_AUDIT_SESSION_JOIN": true, - "SYS_AUDIT_SESSION_PORT": true, - "SYS_AUDIT_SESSION_SELF": true, - "SYS_BDFLUSH": true, - "SYS_BIND": true, - "SYS_BINDAT": true, - "SYS_BREAK": true, - "SYS_BRK": true, - "SYS_BSDTHREAD_CREATE": true, - "SYS_BSDTHREAD_REGISTER": true, - "SYS_BSDTHREAD_TERMINATE": true, - "SYS_CAPGET": true, - "SYS_CAPSET": true, - "SYS_CAP_ENTER": true, - "SYS_CAP_FCNTLS_GET": true, - "SYS_CAP_FCNTLS_LIMIT": true, - "SYS_CAP_GETMODE": true, - "SYS_CAP_GETRIGHTS": true, - "SYS_CAP_IOCTLS_GET": true, - "SYS_CAP_IOCTLS_LIMIT": true, - "SYS_CAP_NEW": true, - "SYS_CAP_RIGHTS_GET": true, - "SYS_CAP_RIGHTS_LIMIT": true, - "SYS_CHDIR": true, - "SYS_CHFLAGS": true, - "SYS_CHFLAGSAT": true, - "SYS_CHMOD": true, - "SYS_CHMOD_EXTENDED": true, - "SYS_CHOWN": true, - "SYS_CHOWN32": true, - "SYS_CHROOT": true, - "SYS_CHUD": true, - "SYS_CLOCK_ADJTIME": true, - "SYS_CLOCK_GETCPUCLOCKID2": true, - "SYS_CLOCK_GETRES": true, - "SYS_CLOCK_GETTIME": true, - "SYS_CLOCK_NANOSLEEP": true, - "SYS_CLOCK_SETTIME": true, - "SYS_CLONE": true, - "SYS_CLOSE": true, - "SYS_CLOSEFROM": true, - "SYS_CLOSE_NOCANCEL": true, - "SYS_CONNECT": true, - "SYS_CONNECTAT": true, - "SYS_CONNECT_NOCANCEL": true, - "SYS_COPYFILE": true, - "SYS_CPUSET": true, - "SYS_CPUSET_GETAFFINITY": true, - "SYS_CPUSET_GETID": true, - "SYS_CPUSET_SETAFFINITY": true, - "SYS_CPUSET_SETID": true, - "SYS_CREAT": true, - "SYS_CREATE_MODULE": true, - "SYS_CSOPS": true, - "SYS_DELETE": true, - "SYS_DELETE_MODULE": true, - "SYS_DUP": true, - "SYS_DUP2": true, - "SYS_DUP3": true, - "SYS_EACCESS": true, - "SYS_EPOLL_CREATE": true, - "SYS_EPOLL_CREATE1": true, - "SYS_EPOLL_CTL": true, - "SYS_EPOLL_CTL_OLD": true, - "SYS_EPOLL_PWAIT": true, - "SYS_EPOLL_WAIT": true, - "SYS_EPOLL_WAIT_OLD": true, - "SYS_EVENTFD": true, - "SYS_EVENTFD2": true, - "SYS_EXCHANGEDATA": true, - "SYS_EXECVE": true, - "SYS_EXIT": true, - "SYS_EXIT_GROUP": true, - "SYS_EXTATTRCTL": true, - "SYS_EXTATTR_DELETE_FD": true, - "SYS_EXTATTR_DELETE_FILE": true, - "SYS_EXTATTR_DELETE_LINK": true, - "SYS_EXTATTR_GET_FD": true, - "SYS_EXTATTR_GET_FILE": true, - "SYS_EXTATTR_GET_LINK": true, - "SYS_EXTATTR_LIST_FD": true, - "SYS_EXTATTR_LIST_FILE": true, - "SYS_EXTATTR_LIST_LINK": true, - "SYS_EXTATTR_SET_FD": true, - "SYS_EXTATTR_SET_FILE": true, - "SYS_EXTATTR_SET_LINK": true, - "SYS_FACCESSAT": true, - "SYS_FADVISE64": true, - "SYS_FADVISE64_64": true, - "SYS_FALLOCATE": true, - "SYS_FANOTIFY_INIT": true, - "SYS_FANOTIFY_MARK": true, - "SYS_FCHDIR": true, - "SYS_FCHFLAGS": true, - "SYS_FCHMOD": true, - "SYS_FCHMODAT": true, - "SYS_FCHMOD_EXTENDED": true, - "SYS_FCHOWN": true, - "SYS_FCHOWN32": true, - "SYS_FCHOWNAT": true, - "SYS_FCHROOT": true, - "SYS_FCNTL": true, - "SYS_FCNTL64": true, - "SYS_FCNTL_NOCANCEL": true, - "SYS_FDATASYNC": true, - "SYS_FEXECVE": true, - "SYS_FFCLOCK_GETCOUNTER": true, - "SYS_FFCLOCK_GETESTIMATE": true, - "SYS_FFCLOCK_SETESTIMATE": true, - "SYS_FFSCTL": true, - "SYS_FGETATTRLIST": true, - "SYS_FGETXATTR": true, - "SYS_FHOPEN": true, - "SYS_FHSTAT": true, - "SYS_FHSTATFS": true, - "SYS_FILEPORT_MAKEFD": true, - "SYS_FILEPORT_MAKEPORT": true, - "SYS_FKTRACE": true, - "SYS_FLISTXATTR": true, - "SYS_FLOCK": true, - "SYS_FORK": true, - "SYS_FPATHCONF": true, - "SYS_FREEBSD6_FTRUNCATE": true, - "SYS_FREEBSD6_LSEEK": true, - "SYS_FREEBSD6_MMAP": true, - "SYS_FREEBSD6_PREAD": true, - "SYS_FREEBSD6_PWRITE": true, - "SYS_FREEBSD6_TRUNCATE": true, - "SYS_FREMOVEXATTR": true, - "SYS_FSCTL": true, - "SYS_FSETATTRLIST": true, - "SYS_FSETXATTR": true, - "SYS_FSGETPATH": true, - "SYS_FSTAT": true, - "SYS_FSTAT64": true, - "SYS_FSTAT64_EXTENDED": true, - "SYS_FSTATAT": true, - "SYS_FSTATAT64": true, - "SYS_FSTATFS": true, - "SYS_FSTATFS64": true, - "SYS_FSTATV": true, - "SYS_FSTATVFS1": true, - "SYS_FSTAT_EXTENDED": true, - "SYS_FSYNC": true, - "SYS_FSYNC_NOCANCEL": true, - "SYS_FSYNC_RANGE": true, - "SYS_FTIME": true, - "SYS_FTRUNCATE": true, - "SYS_FTRUNCATE64": true, - "SYS_FUTEX": true, - "SYS_FUTIMENS": true, - "SYS_FUTIMES": true, - "SYS_FUTIMESAT": true, - "SYS_GETATTRLIST": true, - "SYS_GETAUDIT": true, - "SYS_GETAUDIT_ADDR": true, - "SYS_GETAUID": true, - "SYS_GETCONTEXT": true, - "SYS_GETCPU": true, - "SYS_GETCWD": true, - "SYS_GETDENTS": true, - "SYS_GETDENTS64": true, - "SYS_GETDIRENTRIES": true, - "SYS_GETDIRENTRIES64": true, - "SYS_GETDIRENTRIESATTR": true, - "SYS_GETDTABLECOUNT": true, - "SYS_GETDTABLESIZE": true, - "SYS_GETEGID": true, - "SYS_GETEGID32": true, - "SYS_GETEUID": true, - "SYS_GETEUID32": true, - "SYS_GETFH": true, - "SYS_GETFSSTAT": true, - "SYS_GETFSSTAT64": true, - "SYS_GETGID": true, - "SYS_GETGID32": true, - "SYS_GETGROUPS": true, - "SYS_GETGROUPS32": true, - "SYS_GETHOSTUUID": true, - "SYS_GETITIMER": true, - "SYS_GETLCID": true, - "SYS_GETLOGIN": true, - "SYS_GETLOGINCLASS": true, - "SYS_GETPEERNAME": true, - "SYS_GETPGID": true, - "SYS_GETPGRP": true, - "SYS_GETPID": true, - "SYS_GETPMSG": true, - "SYS_GETPPID": true, - "SYS_GETPRIORITY": true, - "SYS_GETRESGID": true, - "SYS_GETRESGID32": true, - "SYS_GETRESUID": true, - "SYS_GETRESUID32": true, - "SYS_GETRLIMIT": true, - "SYS_GETRTABLE": true, - "SYS_GETRUSAGE": true, - "SYS_GETSGROUPS": true, - "SYS_GETSID": true, - "SYS_GETSOCKNAME": true, - "SYS_GETSOCKOPT": true, - "SYS_GETTHRID": true, - "SYS_GETTID": true, - "SYS_GETTIMEOFDAY": true, - "SYS_GETUID": true, - "SYS_GETUID32": true, - "SYS_GETVFSSTAT": true, - "SYS_GETWGROUPS": true, - "SYS_GETXATTR": true, - "SYS_GET_KERNEL_SYMS": true, - "SYS_GET_MEMPOLICY": true, - "SYS_GET_ROBUST_LIST": true, - "SYS_GET_THREAD_AREA": true, - "SYS_GTTY": true, - "SYS_IDENTITYSVC": true, - "SYS_IDLE": true, - "SYS_INITGROUPS": true, - "SYS_INIT_MODULE": true, - "SYS_INOTIFY_ADD_WATCH": true, - "SYS_INOTIFY_INIT": true, - "SYS_INOTIFY_INIT1": true, - "SYS_INOTIFY_RM_WATCH": true, - "SYS_IOCTL": true, - "SYS_IOPERM": true, - "SYS_IOPL": true, - "SYS_IOPOLICYSYS": true, - "SYS_IOPRIO_GET": true, - "SYS_IOPRIO_SET": true, - "SYS_IO_CANCEL": true, - "SYS_IO_DESTROY": true, - "SYS_IO_GETEVENTS": true, - "SYS_IO_SETUP": true, - "SYS_IO_SUBMIT": true, - "SYS_IPC": true, - "SYS_ISSETUGID": true, - "SYS_JAIL": true, - "SYS_JAIL_ATTACH": true, - "SYS_JAIL_GET": true, - "SYS_JAIL_REMOVE": true, - "SYS_JAIL_SET": true, - "SYS_KDEBUG_TRACE": true, - "SYS_KENV": true, - "SYS_KEVENT": true, - "SYS_KEVENT64": true, - "SYS_KEXEC_LOAD": true, - "SYS_KEYCTL": true, - "SYS_KILL": true, - "SYS_KLDFIND": true, - "SYS_KLDFIRSTMOD": true, - "SYS_KLDLOAD": true, - "SYS_KLDNEXT": true, - "SYS_KLDSTAT": true, - "SYS_KLDSYM": true, - "SYS_KLDUNLOAD": true, - "SYS_KLDUNLOADF": true, - "SYS_KQUEUE": true, - "SYS_KQUEUE1": true, - "SYS_KTIMER_CREATE": true, - "SYS_KTIMER_DELETE": true, - "SYS_KTIMER_GETOVERRUN": true, - "SYS_KTIMER_GETTIME": true, - "SYS_KTIMER_SETTIME": true, - "SYS_KTRACE": true, - "SYS_LCHFLAGS": true, - "SYS_LCHMOD": true, - "SYS_LCHOWN": true, - "SYS_LCHOWN32": true, - "SYS_LGETFH": true, - "SYS_LGETXATTR": true, - "SYS_LINK": true, - "SYS_LINKAT": true, - "SYS_LIO_LISTIO": true, - "SYS_LISTEN": true, - "SYS_LISTXATTR": true, - "SYS_LLISTXATTR": true, - "SYS_LOCK": true, - "SYS_LOOKUP_DCOOKIE": true, - "SYS_LPATHCONF": true, - "SYS_LREMOVEXATTR": true, - "SYS_LSEEK": true, - "SYS_LSETXATTR": true, - "SYS_LSTAT": true, - "SYS_LSTAT64": true, - "SYS_LSTAT64_EXTENDED": true, - "SYS_LSTATV": true, - "SYS_LSTAT_EXTENDED": true, - "SYS_LUTIMES": true, - "SYS_MAC_SYSCALL": true, - "SYS_MADVISE": true, - "SYS_MADVISE1": true, - "SYS_MAXSYSCALL": true, - "SYS_MBIND": true, - "SYS_MIGRATE_PAGES": true, - "SYS_MINCORE": true, - "SYS_MINHERIT": true, - "SYS_MKCOMPLEX": true, - "SYS_MKDIR": true, - "SYS_MKDIRAT": true, - "SYS_MKDIR_EXTENDED": true, - "SYS_MKFIFO": true, - "SYS_MKFIFOAT": true, - "SYS_MKFIFO_EXTENDED": true, - "SYS_MKNOD": true, - "SYS_MKNODAT": true, - "SYS_MLOCK": true, - "SYS_MLOCKALL": true, - "SYS_MMAP": true, - "SYS_MMAP2": true, - "SYS_MODCTL": true, - "SYS_MODFIND": true, - "SYS_MODFNEXT": true, - "SYS_MODIFY_LDT": true, - "SYS_MODNEXT": true, - "SYS_MODSTAT": true, - "SYS_MODWATCH": true, - "SYS_MOUNT": true, - "SYS_MOVE_PAGES": true, - "SYS_MPROTECT": true, - "SYS_MPX": true, - "SYS_MQUERY": true, - "SYS_MQ_GETSETATTR": true, - "SYS_MQ_NOTIFY": true, - "SYS_MQ_OPEN": true, - "SYS_MQ_TIMEDRECEIVE": true, - "SYS_MQ_TIMEDSEND": true, - "SYS_MQ_UNLINK": true, - "SYS_MREMAP": true, - "SYS_MSGCTL": true, - "SYS_MSGGET": true, - "SYS_MSGRCV": true, - "SYS_MSGRCV_NOCANCEL": true, - "SYS_MSGSND": true, - "SYS_MSGSND_NOCANCEL": true, - "SYS_MSGSYS": true, - "SYS_MSYNC": true, - "SYS_MSYNC_NOCANCEL": true, - "SYS_MUNLOCK": true, - "SYS_MUNLOCKALL": true, - "SYS_MUNMAP": true, - "SYS_NAME_TO_HANDLE_AT": true, - "SYS_NANOSLEEP": true, - "SYS_NEWFSTATAT": true, - "SYS_NFSCLNT": true, - "SYS_NFSSERVCTL": true, - "SYS_NFSSVC": true, - "SYS_NFSTAT": true, - "SYS_NICE": true, - "SYS_NLSTAT": true, - "SYS_NMOUNT": true, - "SYS_NSTAT": true, - "SYS_NTP_ADJTIME": true, - "SYS_NTP_GETTIME": true, - "SYS_OABI_SYSCALL_BASE": true, - "SYS_OBREAK": true, - "SYS_OLDFSTAT": true, - "SYS_OLDLSTAT": true, - "SYS_OLDOLDUNAME": true, - "SYS_OLDSTAT": true, - "SYS_OLDUNAME": true, - "SYS_OPEN": true, - "SYS_OPENAT": true, - "SYS_OPENBSD_POLL": true, - "SYS_OPEN_BY_HANDLE_AT": true, - "SYS_OPEN_EXTENDED": true, - "SYS_OPEN_NOCANCEL": true, - "SYS_OVADVISE": true, - "SYS_PACCEPT": true, - "SYS_PATHCONF": true, - "SYS_PAUSE": true, - "SYS_PCICONFIG_IOBASE": true, - "SYS_PCICONFIG_READ": true, - "SYS_PCICONFIG_WRITE": true, - "SYS_PDFORK": true, - "SYS_PDGETPID": true, - "SYS_PDKILL": true, - "SYS_PERF_EVENT_OPEN": true, - "SYS_PERSONALITY": true, - "SYS_PID_HIBERNATE": true, - "SYS_PID_RESUME": true, - "SYS_PID_SHUTDOWN_SOCKETS": true, - "SYS_PID_SUSPEND": true, - "SYS_PIPE": true, - "SYS_PIPE2": true, - "SYS_PIVOT_ROOT": true, - "SYS_PMC_CONTROL": true, - "SYS_PMC_GET_INFO": true, - "SYS_POLL": true, - "SYS_POLLTS": true, - "SYS_POLL_NOCANCEL": true, - "SYS_POSIX_FADVISE": true, - "SYS_POSIX_FALLOCATE": true, - "SYS_POSIX_OPENPT": true, - "SYS_POSIX_SPAWN": true, - "SYS_PPOLL": true, - "SYS_PRCTL": true, - "SYS_PREAD": true, - "SYS_PREAD64": true, - "SYS_PREADV": true, - "SYS_PREAD_NOCANCEL": true, - "SYS_PRLIMIT64": true, - "SYS_PROCCTL": true, - "SYS_PROCESS_POLICY": true, - "SYS_PROCESS_VM_READV": true, - "SYS_PROCESS_VM_WRITEV": true, - "SYS_PROC_INFO": true, - "SYS_PROF": true, - "SYS_PROFIL": true, - "SYS_PSELECT": true, - "SYS_PSELECT6": true, - "SYS_PSET_ASSIGN": true, - "SYS_PSET_CREATE": true, - "SYS_PSET_DESTROY": true, - "SYS_PSYNCH_CVBROAD": true, - "SYS_PSYNCH_CVCLRPREPOST": true, - "SYS_PSYNCH_CVSIGNAL": true, - "SYS_PSYNCH_CVWAIT": true, - "SYS_PSYNCH_MUTEXDROP": true, - "SYS_PSYNCH_MUTEXWAIT": true, - "SYS_PSYNCH_RW_DOWNGRADE": true, - "SYS_PSYNCH_RW_LONGRDLOCK": true, - "SYS_PSYNCH_RW_RDLOCK": true, - "SYS_PSYNCH_RW_UNLOCK": true, - "SYS_PSYNCH_RW_UNLOCK2": true, - "SYS_PSYNCH_RW_UPGRADE": true, - "SYS_PSYNCH_RW_WRLOCK": true, - "SYS_PSYNCH_RW_YIELDWRLOCK": true, - "SYS_PTRACE": true, - "SYS_PUTPMSG": true, - "SYS_PWRITE": true, - "SYS_PWRITE64": true, - "SYS_PWRITEV": true, - "SYS_PWRITE_NOCANCEL": true, - "SYS_QUERY_MODULE": true, - "SYS_QUOTACTL": true, - "SYS_RASCTL": true, - "SYS_RCTL_ADD_RULE": true, - "SYS_RCTL_GET_LIMITS": true, - "SYS_RCTL_GET_RACCT": true, - "SYS_RCTL_GET_RULES": true, - "SYS_RCTL_REMOVE_RULE": true, - "SYS_READ": true, - "SYS_READAHEAD": true, - "SYS_READDIR": true, - "SYS_READLINK": true, - "SYS_READLINKAT": true, - "SYS_READV": true, - "SYS_READV_NOCANCEL": true, - "SYS_READ_NOCANCEL": true, - "SYS_REBOOT": true, - "SYS_RECV": true, - "SYS_RECVFROM": true, - "SYS_RECVFROM_NOCANCEL": true, - "SYS_RECVMMSG": true, - "SYS_RECVMSG": true, - "SYS_RECVMSG_NOCANCEL": true, - "SYS_REMAP_FILE_PAGES": true, - "SYS_REMOVEXATTR": true, - "SYS_RENAME": true, - "SYS_RENAMEAT": true, - "SYS_REQUEST_KEY": true, - "SYS_RESTART_SYSCALL": true, - "SYS_REVOKE": true, - "SYS_RFORK": true, - "SYS_RMDIR": true, - "SYS_RTPRIO": true, - "SYS_RTPRIO_THREAD": true, - "SYS_RT_SIGACTION": true, - "SYS_RT_SIGPENDING": true, - "SYS_RT_SIGPROCMASK": true, - "SYS_RT_SIGQUEUEINFO": true, - "SYS_RT_SIGRETURN": true, - "SYS_RT_SIGSUSPEND": true, - "SYS_RT_SIGTIMEDWAIT": true, - "SYS_RT_TGSIGQUEUEINFO": true, - "SYS_SBRK": true, - "SYS_SCHED_GETAFFINITY": true, - "SYS_SCHED_GETPARAM": true, - "SYS_SCHED_GETSCHEDULER": true, - "SYS_SCHED_GET_PRIORITY_MAX": true, - "SYS_SCHED_GET_PRIORITY_MIN": true, - "SYS_SCHED_RR_GET_INTERVAL": true, - "SYS_SCHED_SETAFFINITY": true, - "SYS_SCHED_SETPARAM": true, - "SYS_SCHED_SETSCHEDULER": true, - "SYS_SCHED_YIELD": true, - "SYS_SCTP_GENERIC_RECVMSG": true, - "SYS_SCTP_GENERIC_SENDMSG": true, - "SYS_SCTP_GENERIC_SENDMSG_IOV": true, - "SYS_SCTP_PEELOFF": true, - "SYS_SEARCHFS": true, - "SYS_SECURITY": true, - "SYS_SELECT": true, - "SYS_SELECT_NOCANCEL": true, - "SYS_SEMCONFIG": true, - "SYS_SEMCTL": true, - "SYS_SEMGET": true, - "SYS_SEMOP": true, - "SYS_SEMSYS": true, - "SYS_SEMTIMEDOP": true, - "SYS_SEM_CLOSE": true, - "SYS_SEM_DESTROY": true, - "SYS_SEM_GETVALUE": true, - "SYS_SEM_INIT": true, - "SYS_SEM_OPEN": true, - "SYS_SEM_POST": true, - "SYS_SEM_TRYWAIT": true, - "SYS_SEM_UNLINK": true, - "SYS_SEM_WAIT": true, - "SYS_SEM_WAIT_NOCANCEL": true, - "SYS_SEND": true, - "SYS_SENDFILE": true, - "SYS_SENDFILE64": true, - "SYS_SENDMMSG": true, - "SYS_SENDMSG": true, - "SYS_SENDMSG_NOCANCEL": true, - "SYS_SENDTO": true, - "SYS_SENDTO_NOCANCEL": true, - "SYS_SETATTRLIST": true, - "SYS_SETAUDIT": true, - "SYS_SETAUDIT_ADDR": true, - "SYS_SETAUID": true, - "SYS_SETCONTEXT": true, - "SYS_SETDOMAINNAME": true, - "SYS_SETEGID": true, - "SYS_SETEUID": true, - "SYS_SETFIB": true, - "SYS_SETFSGID": true, - "SYS_SETFSGID32": true, - "SYS_SETFSUID": true, - "SYS_SETFSUID32": true, - "SYS_SETGID": true, - "SYS_SETGID32": true, - "SYS_SETGROUPS": true, - "SYS_SETGROUPS32": true, - "SYS_SETHOSTNAME": true, - "SYS_SETITIMER": true, - "SYS_SETLCID": true, - "SYS_SETLOGIN": true, - "SYS_SETLOGINCLASS": true, - "SYS_SETNS": true, - "SYS_SETPGID": true, - "SYS_SETPRIORITY": true, - "SYS_SETPRIVEXEC": true, - "SYS_SETREGID": true, - "SYS_SETREGID32": true, - "SYS_SETRESGID": true, - "SYS_SETRESGID32": true, - "SYS_SETRESUID": true, - "SYS_SETRESUID32": true, - "SYS_SETREUID": true, - "SYS_SETREUID32": true, - "SYS_SETRLIMIT": true, - "SYS_SETRTABLE": true, - "SYS_SETSGROUPS": true, - "SYS_SETSID": true, - "SYS_SETSOCKOPT": true, - "SYS_SETTID": true, - "SYS_SETTID_WITH_PID": true, - "SYS_SETTIMEOFDAY": true, - "SYS_SETUID": true, - "SYS_SETUID32": true, - "SYS_SETWGROUPS": true, - "SYS_SETXATTR": true, - "SYS_SET_MEMPOLICY": true, - "SYS_SET_ROBUST_LIST": true, - "SYS_SET_THREAD_AREA": true, - "SYS_SET_TID_ADDRESS": true, - "SYS_SGETMASK": true, - "SYS_SHARED_REGION_CHECK_NP": true, - "SYS_SHARED_REGION_MAP_AND_SLIDE_NP": true, - "SYS_SHMAT": true, - "SYS_SHMCTL": true, - "SYS_SHMDT": true, - "SYS_SHMGET": true, - "SYS_SHMSYS": true, - "SYS_SHM_OPEN": true, - "SYS_SHM_UNLINK": true, - "SYS_SHUTDOWN": true, - "SYS_SIGACTION": true, - "SYS_SIGALTSTACK": true, - "SYS_SIGNAL": true, - "SYS_SIGNALFD": true, - "SYS_SIGNALFD4": true, - "SYS_SIGPENDING": true, - "SYS_SIGPROCMASK": true, - "SYS_SIGQUEUE": true, - "SYS_SIGQUEUEINFO": true, - "SYS_SIGRETURN": true, - "SYS_SIGSUSPEND": true, - "SYS_SIGSUSPEND_NOCANCEL": true, - "SYS_SIGTIMEDWAIT": true, - "SYS_SIGWAIT": true, - "SYS_SIGWAITINFO": true, - "SYS_SOCKET": true, - "SYS_SOCKETCALL": true, - "SYS_SOCKETPAIR": true, - "SYS_SPLICE": true, - "SYS_SSETMASK": true, - "SYS_SSTK": true, - "SYS_STACK_SNAPSHOT": true, - "SYS_STAT": true, - "SYS_STAT64": true, - "SYS_STAT64_EXTENDED": true, - "SYS_STATFS": true, - "SYS_STATFS64": true, - "SYS_STATV": true, - "SYS_STATVFS1": true, - "SYS_STAT_EXTENDED": true, - "SYS_STIME": true, - "SYS_STTY": true, - "SYS_SWAPCONTEXT": true, - "SYS_SWAPCTL": true, - "SYS_SWAPOFF": true, - "SYS_SWAPON": true, - "SYS_SYMLINK": true, - "SYS_SYMLINKAT": true, - "SYS_SYNC": true, - "SYS_SYNCFS": true, - "SYS_SYNC_FILE_RANGE": true, - "SYS_SYSARCH": true, - "SYS_SYSCALL": true, - "SYS_SYSCALL_BASE": true, - "SYS_SYSFS": true, - "SYS_SYSINFO": true, - "SYS_SYSLOG": true, - "SYS_TEE": true, - "SYS_TGKILL": true, - "SYS_THREAD_SELFID": true, - "SYS_THR_CREATE": true, - "SYS_THR_EXIT": true, - "SYS_THR_KILL": true, - "SYS_THR_KILL2": true, - "SYS_THR_NEW": true, - "SYS_THR_SELF": true, - "SYS_THR_SET_NAME": true, - "SYS_THR_SUSPEND": true, - "SYS_THR_WAKE": true, - "SYS_TIME": true, - "SYS_TIMERFD_CREATE": true, - "SYS_TIMERFD_GETTIME": true, - "SYS_TIMERFD_SETTIME": true, - "SYS_TIMER_CREATE": true, - "SYS_TIMER_DELETE": true, - "SYS_TIMER_GETOVERRUN": true, - "SYS_TIMER_GETTIME": true, - "SYS_TIMER_SETTIME": true, - "SYS_TIMES": true, - "SYS_TKILL": true, - "SYS_TRUNCATE": true, - "SYS_TRUNCATE64": true, - "SYS_TUXCALL": true, - "SYS_UGETRLIMIT": true, - "SYS_ULIMIT": true, - "SYS_UMASK": true, - "SYS_UMASK_EXTENDED": true, - "SYS_UMOUNT": true, - "SYS_UMOUNT2": true, - "SYS_UNAME": true, - "SYS_UNDELETE": true, - "SYS_UNLINK": true, - "SYS_UNLINKAT": true, - "SYS_UNMOUNT": true, - "SYS_UNSHARE": true, - "SYS_USELIB": true, - "SYS_USTAT": true, - "SYS_UTIME": true, - "SYS_UTIMENSAT": true, - "SYS_UTIMES": true, - "SYS_UTRACE": true, - "SYS_UUIDGEN": true, - "SYS_VADVISE": true, - "SYS_VFORK": true, - "SYS_VHANGUP": true, - "SYS_VM86": true, - "SYS_VM86OLD": true, - "SYS_VMSPLICE": true, - "SYS_VM_PRESSURE_MONITOR": true, - "SYS_VSERVER": true, - "SYS_WAIT4": true, - "SYS_WAIT4_NOCANCEL": true, - "SYS_WAIT6": true, - "SYS_WAITEVENT": true, - "SYS_WAITID": true, - "SYS_WAITID_NOCANCEL": true, - "SYS_WAITPID": true, - "SYS_WATCHEVENT": true, - "SYS_WORKQ_KERNRETURN": true, - "SYS_WORKQ_OPEN": true, - "SYS_WRITE": true, - "SYS_WRITEV": true, - "SYS_WRITEV_NOCANCEL": true, - "SYS_WRITE_NOCANCEL": true, - "SYS_YIELD": true, - "SYS__LLSEEK": true, - "SYS__LWP_CONTINUE": true, - "SYS__LWP_CREATE": true, - "SYS__LWP_CTL": true, - "SYS__LWP_DETACH": true, - "SYS__LWP_EXIT": true, - "SYS__LWP_GETNAME": true, - "SYS__LWP_GETPRIVATE": true, - "SYS__LWP_KILL": true, - "SYS__LWP_PARK": true, - "SYS__LWP_SELF": true, - "SYS__LWP_SETNAME": true, - "SYS__LWP_SETPRIVATE": true, - "SYS__LWP_SUSPEND": true, - "SYS__LWP_UNPARK": true, - "SYS__LWP_UNPARK_ALL": true, - "SYS__LWP_WAIT": true, - "SYS__LWP_WAKEUP": true, - "SYS__NEWSELECT": true, - "SYS__PSET_BIND": true, - "SYS__SCHED_GETAFFINITY": true, - "SYS__SCHED_GETPARAM": true, - "SYS__SCHED_SETAFFINITY": true, - "SYS__SCHED_SETPARAM": true, - "SYS__SYSCTL": true, - "SYS__UMTX_LOCK": true, - "SYS__UMTX_OP": true, - "SYS__UMTX_UNLOCK": true, - "SYS___ACL_ACLCHECK_FD": true, - "SYS___ACL_ACLCHECK_FILE": true, - "SYS___ACL_ACLCHECK_LINK": true, - "SYS___ACL_DELETE_FD": true, - "SYS___ACL_DELETE_FILE": true, - "SYS___ACL_DELETE_LINK": true, - "SYS___ACL_GET_FD": true, - "SYS___ACL_GET_FILE": true, - "SYS___ACL_GET_LINK": true, - "SYS___ACL_SET_FD": true, - "SYS___ACL_SET_FILE": true, - "SYS___ACL_SET_LINK": true, - "SYS___CLONE": true, - "SYS___DISABLE_THREADSIGNAL": true, - "SYS___GETCWD": true, - "SYS___GETLOGIN": true, - "SYS___GET_TCB": true, - "SYS___MAC_EXECVE": true, - "SYS___MAC_GETFSSTAT": true, - "SYS___MAC_GET_FD": true, - "SYS___MAC_GET_FILE": true, - "SYS___MAC_GET_LCID": true, - "SYS___MAC_GET_LCTX": true, - "SYS___MAC_GET_LINK": true, - "SYS___MAC_GET_MOUNT": true, - "SYS___MAC_GET_PID": true, - "SYS___MAC_GET_PROC": true, - "SYS___MAC_MOUNT": true, - "SYS___MAC_SET_FD": true, - "SYS___MAC_SET_FILE": true, - "SYS___MAC_SET_LCTX": true, - "SYS___MAC_SET_LINK": true, - "SYS___MAC_SET_PROC": true, - "SYS___MAC_SYSCALL": true, - "SYS___OLD_SEMWAIT_SIGNAL": true, - "SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL": true, - "SYS___POSIX_CHOWN": true, - "SYS___POSIX_FCHOWN": true, - "SYS___POSIX_LCHOWN": true, - "SYS___POSIX_RENAME": true, - "SYS___PTHREAD_CANCELED": true, - "SYS___PTHREAD_CHDIR": true, - "SYS___PTHREAD_FCHDIR": true, - "SYS___PTHREAD_KILL": true, - "SYS___PTHREAD_MARKCANCEL": true, - "SYS___PTHREAD_SIGMASK": true, - "SYS___QUOTACTL": true, - "SYS___SEMCTL": true, - "SYS___SEMWAIT_SIGNAL": true, - "SYS___SEMWAIT_SIGNAL_NOCANCEL": true, - "SYS___SETLOGIN": true, - "SYS___SETUGID": true, - "SYS___SET_TCB": true, - "SYS___SIGACTION_SIGTRAMP": true, - "SYS___SIGTIMEDWAIT": true, - "SYS___SIGWAIT": true, - "SYS___SIGWAIT_NOCANCEL": true, - "SYS___SYSCTL": true, - "SYS___TFORK": true, - "SYS___THREXIT": true, - "SYS___THRSIGDIVERT": true, - "SYS___THRSLEEP": true, - "SYS___THRWAKEUP": true, - "S_ARCH1": true, - "S_ARCH2": true, - "S_BLKSIZE": true, - "S_IEXEC": true, - "S_IFBLK": true, - "S_IFCHR": true, - "S_IFDIR": true, - "S_IFIFO": true, - "S_IFLNK": true, - "S_IFMT": true, - "S_IFREG": true, - "S_IFSOCK": true, - "S_IFWHT": true, - "S_IREAD": true, - "S_IRGRP": true, - "S_IROTH": true, - "S_IRUSR": true, - "S_IRWXG": true, - "S_IRWXO": true, - "S_IRWXU": true, - "S_ISGID": true, - "S_ISTXT": true, - "S_ISUID": true, - "S_ISVTX": true, - "S_IWGRP": true, - "S_IWOTH": true, - "S_IWRITE": true, - "S_IWUSR": true, - "S_IXGRP": true, - "S_IXOTH": true, - "S_IXUSR": true, - "S_LOGIN_SET": true, - "SecurityAttributes": true, - "Seek": true, - "Select": true, - "Sendfile": true, - "Sendmsg": true, - "SendmsgN": true, - "Sendto": true, - "Servent": true, - "SetBpf": true, - "SetBpfBuflen": true, - "SetBpfDatalink": true, - "SetBpfHeadercmpl": true, - "SetBpfImmediate": true, - "SetBpfInterface": true, - "SetBpfPromisc": true, - "SetBpfTimeout": true, - "SetCurrentDirectory": true, - "SetEndOfFile": true, - "SetEnvironmentVariable": true, - "SetFileAttributes": true, - "SetFileCompletionNotificationModes": true, - "SetFilePointer": true, - "SetFileTime": true, - "SetHandleInformation": true, - "SetKevent": true, - "SetLsfPromisc": true, - "SetNonblock": true, - "Setdomainname": true, - "Setegid": true, - "Setenv": true, - "Seteuid": true, - "Setfsgid": true, - "Setfsuid": true, - "Setgid": true, - "Setgroups": true, - "Sethostname": true, - "Setlogin": true, - "Setpgid": true, - "Setpriority": true, - "Setprivexec": true, - "Setregid": true, - "Setresgid": true, - "Setresuid": true, - "Setreuid": true, - "Setrlimit": true, - "Setsid": true, - "Setsockopt": true, - "SetsockoptByte": true, - "SetsockoptICMPv6Filter": true, - "SetsockoptIPMreq": true, - "SetsockoptIPMreqn": true, - "SetsockoptIPv6Mreq": true, - "SetsockoptInet4Addr": true, - "SetsockoptInt": true, - "SetsockoptLinger": true, - "SetsockoptString": true, - "SetsockoptTimeval": true, - "Settimeofday": true, - "Setuid": true, - "Setxattr": true, - "Shutdown": true, - "SidTypeAlias": true, - "SidTypeComputer": true, - "SidTypeDeletedAccount": true, - "SidTypeDomain": true, - "SidTypeGroup": true, - "SidTypeInvalid": true, - "SidTypeLabel": true, - "SidTypeUnknown": true, - "SidTypeUser": true, - "SidTypeWellKnownGroup": true, - "Signal": true, - "SizeofBpfHdr": true, - "SizeofBpfInsn": true, - "SizeofBpfProgram": true, - "SizeofBpfStat": true, - "SizeofBpfVersion": true, - "SizeofBpfZbuf": true, - "SizeofBpfZbufHeader": true, - "SizeofCmsghdr": true, - "SizeofICMPv6Filter": true, - "SizeofIPMreq": true, - "SizeofIPMreqn": true, - "SizeofIPv6MTUInfo": true, - "SizeofIPv6Mreq": true, - "SizeofIfAddrmsg": true, - "SizeofIfAnnounceMsghdr": true, - "SizeofIfData": true, - "SizeofIfInfomsg": true, - "SizeofIfMsghdr": true, - "SizeofIfaMsghdr": true, - "SizeofIfmaMsghdr": true, - "SizeofIfmaMsghdr2": true, - "SizeofInet4Pktinfo": true, - "SizeofInet6Pktinfo": true, - "SizeofInotifyEvent": true, - "SizeofLinger": true, - "SizeofMsghdr": true, - "SizeofNlAttr": true, - "SizeofNlMsgerr": true, - "SizeofNlMsghdr": true, - "SizeofRtAttr": true, - "SizeofRtGenmsg": true, - "SizeofRtMetrics": true, - "SizeofRtMsg": true, - "SizeofRtMsghdr": true, - "SizeofRtNexthop": true, - "SizeofSockFilter": true, - "SizeofSockFprog": true, - "SizeofSockaddrAny": true, - "SizeofSockaddrDatalink": true, - "SizeofSockaddrInet4": true, - "SizeofSockaddrInet6": true, - "SizeofSockaddrLinklayer": true, - "SizeofSockaddrNetlink": true, - "SizeofSockaddrUnix": true, - "SizeofTCPInfo": true, - "SizeofUcred": true, - "SlicePtrFromStrings": true, - "SockFilter": true, - "SockFprog": true, - "Sockaddr": true, - "SockaddrDatalink": true, - "SockaddrGen": true, - "SockaddrInet4": true, - "SockaddrInet6": true, - "SockaddrLinklayer": true, - "SockaddrNetlink": true, - "SockaddrUnix": true, - "Socket": true, - "SocketControlMessage": true, - "SocketDisableIPv6": true, - "Socketpair": true, - "Splice": true, - "StartProcess": true, - "StartupInfo": true, - "Stat": true, - "Stat_t": true, - "Statfs": true, - "Statfs_t": true, - "Stderr": true, - "Stdin": true, - "Stdout": true, - "StringBytePtr": true, - "StringByteSlice": true, - "StringSlicePtr": true, - "StringToSid": true, - "StringToUTF16": true, - "StringToUTF16Ptr": true, - "Symlink": true, - "Sync": true, - "SyncFileRange": true, - "SysProcAttr": true, - "SysProcIDMap": true, - "Syscall": true, - "Syscall12": true, - "Syscall15": true, - "Syscall18": true, - "Syscall6": true, - "Syscall9": true, - "Sysctl": true, - "SysctlUint32": true, - "Sysctlnode": true, - "Sysinfo": true, - "Sysinfo_t": true, - "Systemtime": true, - "TCGETS": true, - "TCIFLUSH": true, - "TCIOFLUSH": true, - "TCOFLUSH": true, - "TCPInfo": true, - "TCPKeepalive": true, - "TCP_CA_NAME_MAX": true, - "TCP_CONGCTL": true, - "TCP_CONGESTION": true, - "TCP_CONNECTIONTIMEOUT": true, - "TCP_CORK": true, - "TCP_DEFER_ACCEPT": true, - "TCP_INFO": true, - "TCP_KEEPALIVE": true, - "TCP_KEEPCNT": true, - "TCP_KEEPIDLE": true, - "TCP_KEEPINIT": true, - "TCP_KEEPINTVL": true, - "TCP_LINGER2": true, - "TCP_MAXBURST": true, - "TCP_MAXHLEN": true, - "TCP_MAXOLEN": true, - "TCP_MAXSEG": true, - "TCP_MAXWIN": true, - "TCP_MAX_SACK": true, - "TCP_MAX_WINSHIFT": true, - "TCP_MD5SIG": true, - "TCP_MD5SIG_MAXKEYLEN": true, - "TCP_MINMSS": true, - "TCP_MINMSSOVERLOAD": true, - "TCP_MSS": true, - "TCP_NODELAY": true, - "TCP_NOOPT": true, - "TCP_NOPUSH": true, - "TCP_NSTATES": true, - "TCP_QUICKACK": true, - "TCP_RXT_CONNDROPTIME": true, - "TCP_RXT_FINDROP": true, - "TCP_SACK_ENABLE": true, - "TCP_SYNCNT": true, - "TCP_VENDOR": true, - "TCP_WINDOW_CLAMP": true, - "TCSAFLUSH": true, - "TCSETS": true, - "TF_DISCONNECT": true, - "TF_REUSE_SOCKET": true, - "TF_USE_DEFAULT_WORKER": true, - "TF_USE_KERNEL_APC": true, - "TF_USE_SYSTEM_THREAD": true, - "TF_WRITE_BEHIND": true, - "TH32CS_INHERIT": true, - "TH32CS_SNAPALL": true, - "TH32CS_SNAPHEAPLIST": true, - "TH32CS_SNAPMODULE": true, - "TH32CS_SNAPMODULE32": true, - "TH32CS_SNAPPROCESS": true, - "TH32CS_SNAPTHREAD": true, - "TIME_ZONE_ID_DAYLIGHT": true, - "TIME_ZONE_ID_STANDARD": true, - "TIME_ZONE_ID_UNKNOWN": true, - "TIOCCBRK": true, - "TIOCCDTR": true, - "TIOCCONS": true, - "TIOCDCDTIMESTAMP": true, - "TIOCDRAIN": true, - "TIOCDSIMICROCODE": true, - "TIOCEXCL": true, - "TIOCEXT": true, - "TIOCFLAG_CDTRCTS": true, - "TIOCFLAG_CLOCAL": true, - "TIOCFLAG_CRTSCTS": true, - "TIOCFLAG_MDMBUF": true, - "TIOCFLAG_PPS": true, - "TIOCFLAG_SOFTCAR": true, - "TIOCFLUSH": true, - "TIOCGDEV": true, - "TIOCGDRAINWAIT": true, - "TIOCGETA": true, - "TIOCGETD": true, - "TIOCGFLAGS": true, - "TIOCGICOUNT": true, - "TIOCGLCKTRMIOS": true, - "TIOCGLINED": true, - "TIOCGPGRP": true, - "TIOCGPTN": true, - "TIOCGQSIZE": true, - "TIOCGRANTPT": true, - "TIOCGRS485": true, - "TIOCGSERIAL": true, - "TIOCGSID": true, - "TIOCGSIZE": true, - "TIOCGSOFTCAR": true, - "TIOCGTSTAMP": true, - "TIOCGWINSZ": true, - "TIOCINQ": true, - "TIOCIXOFF": true, - "TIOCIXON": true, - "TIOCLINUX": true, - "TIOCMBIC": true, - "TIOCMBIS": true, - "TIOCMGDTRWAIT": true, - "TIOCMGET": true, - "TIOCMIWAIT": true, - "TIOCMODG": true, - "TIOCMODS": true, - "TIOCMSDTRWAIT": true, - "TIOCMSET": true, - "TIOCM_CAR": true, - "TIOCM_CD": true, - "TIOCM_CTS": true, - "TIOCM_DCD": true, - "TIOCM_DSR": true, - "TIOCM_DTR": true, - "TIOCM_LE": true, - "TIOCM_RI": true, - "TIOCM_RNG": true, - "TIOCM_RTS": true, - "TIOCM_SR": true, - "TIOCM_ST": true, - "TIOCNOTTY": true, - "TIOCNXCL": true, - "TIOCOUTQ": true, - "TIOCPKT": true, - "TIOCPKT_DATA": true, - "TIOCPKT_DOSTOP": true, - "TIOCPKT_FLUSHREAD": true, - "TIOCPKT_FLUSHWRITE": true, - "TIOCPKT_IOCTL": true, - "TIOCPKT_NOSTOP": true, - "TIOCPKT_START": true, - "TIOCPKT_STOP": true, - "TIOCPTMASTER": true, - "TIOCPTMGET": true, - "TIOCPTSNAME": true, - "TIOCPTYGNAME": true, - "TIOCPTYGRANT": true, - "TIOCPTYUNLK": true, - "TIOCRCVFRAME": true, - "TIOCREMOTE": true, - "TIOCSBRK": true, - "TIOCSCONS": true, - "TIOCSCTTY": true, - "TIOCSDRAINWAIT": true, - "TIOCSDTR": true, - "TIOCSERCONFIG": true, - "TIOCSERGETLSR": true, - "TIOCSERGETMULTI": true, - "TIOCSERGSTRUCT": true, - "TIOCSERGWILD": true, - "TIOCSERSETMULTI": true, - "TIOCSERSWILD": true, - "TIOCSER_TEMT": true, - "TIOCSETA": true, - "TIOCSETAF": true, - "TIOCSETAW": true, - "TIOCSETD": true, - "TIOCSFLAGS": true, - "TIOCSIG": true, - "TIOCSLCKTRMIOS": true, - "TIOCSLINED": true, - "TIOCSPGRP": true, - "TIOCSPTLCK": true, - "TIOCSQSIZE": true, - "TIOCSRS485": true, - "TIOCSSERIAL": true, - "TIOCSSIZE": true, - "TIOCSSOFTCAR": true, - "TIOCSTART": true, - "TIOCSTAT": true, - "TIOCSTI": true, - "TIOCSTOP": true, - "TIOCSTSTAMP": true, - "TIOCSWINSZ": true, - "TIOCTIMESTAMP": true, - "TIOCUCNTL": true, - "TIOCVHANGUP": true, - "TIOCXMTFRAME": true, - "TOKEN_ADJUST_DEFAULT": true, - "TOKEN_ADJUST_GROUPS": true, - "TOKEN_ADJUST_PRIVILEGES": true, - "TOKEN_ADJUST_SESSIONID": true, - "TOKEN_ALL_ACCESS": true, - "TOKEN_ASSIGN_PRIMARY": true, - "TOKEN_DUPLICATE": true, - "TOKEN_EXECUTE": true, - "TOKEN_IMPERSONATE": true, - "TOKEN_QUERY": true, - "TOKEN_QUERY_SOURCE": true, - "TOKEN_READ": true, - "TOKEN_WRITE": true, - "TOSTOP": true, - "TRUNCATE_EXISTING": true, - "TUNATTACHFILTER": true, - "TUNDETACHFILTER": true, - "TUNGETFEATURES": true, - "TUNGETIFF": true, - "TUNGETSNDBUF": true, - "TUNGETVNETHDRSZ": true, - "TUNSETDEBUG": true, - "TUNSETGROUP": true, - "TUNSETIFF": true, - "TUNSETLINK": true, - "TUNSETNOCSUM": true, - "TUNSETOFFLOAD": true, - "TUNSETOWNER": true, - "TUNSETPERSIST": true, - "TUNSETSNDBUF": true, - "TUNSETTXFILTER": true, - "TUNSETVNETHDRSZ": true, - "Tee": true, - "TerminateProcess": true, - "Termios": true, - "Tgkill": true, - "Time": true, - "Time_t": true, - "Times": true, - "Timespec": true, - "TimespecToNsec": true, - "Timeval": true, - "Timeval32": true, - "TimevalToNsec": true, - "Timex": true, - "Timezoneinformation": true, - "Tms": true, - "Token": true, - "TokenAccessInformation": true, - "TokenAuditPolicy": true, - "TokenDefaultDacl": true, - "TokenElevation": true, - "TokenElevationType": true, - "TokenGroups": true, - "TokenGroupsAndPrivileges": true, - "TokenHasRestrictions": true, - "TokenImpersonationLevel": true, - "TokenIntegrityLevel": true, - "TokenLinkedToken": true, - "TokenLogonSid": true, - "TokenMandatoryPolicy": true, - "TokenOrigin": true, - "TokenOwner": true, - "TokenPrimaryGroup": true, - "TokenPrivileges": true, - "TokenRestrictedSids": true, - "TokenSandBoxInert": true, - "TokenSessionId": true, - "TokenSessionReference": true, - "TokenSource": true, - "TokenStatistics": true, - "TokenType": true, - "TokenUIAccess": true, - "TokenUser": true, - "TokenVirtualizationAllowed": true, - "TokenVirtualizationEnabled": true, - "Tokenprimarygroup": true, - "Tokenuser": true, - "TranslateAccountName": true, - "TranslateName": true, - "TransmitFile": true, - "TransmitFileBuffers": true, - "Truncate": true, - "UNIX_PATH_MAX": true, - "USAGE_MATCH_TYPE_AND": true, - "USAGE_MATCH_TYPE_OR": true, - "UTF16FromString": true, - "UTF16PtrFromString": true, - "UTF16ToString": true, - "Ucred": true, - "Umask": true, - "Uname": true, - "Undelete": true, - "UnixCredentials": true, - "UnixRights": true, - "Unlink": true, - "Unlinkat": true, - "UnmapViewOfFile": true, - "Unmount": true, - "Unsetenv": true, - "Unshare": true, - "UserInfo10": true, - "Ustat": true, - "Ustat_t": true, - "Utimbuf": true, - "Utime": true, - "Utimes": true, - "UtimesNano": true, - "Utsname": true, - "VDISCARD": true, - "VDSUSP": true, - "VEOF": true, - "VEOL": true, - "VEOL2": true, - "VERASE": true, - "VERASE2": true, - "VINTR": true, - "VKILL": true, - "VLNEXT": true, - "VMIN": true, - "VQUIT": true, - "VREPRINT": true, - "VSTART": true, - "VSTATUS": true, - "VSTOP": true, - "VSUSP": true, - "VSWTC": true, - "VT0": true, - "VT1": true, - "VTDLY": true, - "VTIME": true, - "VWERASE": true, - "VirtualLock": true, - "VirtualUnlock": true, - "WAIT_ABANDONED": true, - "WAIT_FAILED": true, - "WAIT_OBJECT_0": true, - "WAIT_TIMEOUT": true, - "WALL": true, - "WALLSIG": true, - "WALTSIG": true, - "WCLONE": true, - "WCONTINUED": true, - "WCOREFLAG": true, - "WEXITED": true, - "WLINUXCLONE": true, - "WNOHANG": true, - "WNOTHREAD": true, - "WNOWAIT": true, - "WNOZOMBIE": true, - "WOPTSCHECKED": true, - "WORDSIZE": true, - "WSABuf": true, - "WSACleanup": true, - "WSADESCRIPTION_LEN": true, - "WSAData": true, - "WSAEACCES": true, - "WSAECONNABORTED": true, - "WSAECONNRESET": true, - "WSAEnumProtocols": true, - "WSAID_CONNECTEX": true, - "WSAIoctl": true, - "WSAPROTOCOL_LEN": true, - "WSAProtocolChain": true, - "WSAProtocolInfo": true, - "WSARecv": true, - "WSARecvFrom": true, - "WSASYS_STATUS_LEN": true, - "WSASend": true, - "WSASendTo": true, - "WSASendto": true, - "WSAStartup": true, - "WSTOPPED": true, - "WTRAPPED": true, - "WUNTRACED": true, - "Wait4": true, - "WaitForSingleObject": true, - "WaitStatus": true, - "Win32FileAttributeData": true, - "Win32finddata": true, - "Write": true, - "WriteConsole": true, - "WriteFile": true, - "X509_ASN_ENCODING": true, - "XCASE": true, - "XP1_CONNECTIONLESS": true, - "XP1_CONNECT_DATA": true, - "XP1_DISCONNECT_DATA": true, - "XP1_EXPEDITED_DATA": true, - "XP1_GRACEFUL_CLOSE": true, - "XP1_GUARANTEED_DELIVERY": true, - "XP1_GUARANTEED_ORDER": true, - "XP1_IFS_HANDLES": true, - "XP1_MESSAGE_ORIENTED": true, - "XP1_MULTIPOINT_CONTROL_PLANE": true, - "XP1_MULTIPOINT_DATA_PLANE": true, - "XP1_PARTIAL_MESSAGE": true, - "XP1_PSEUDO_STREAM": true, - "XP1_QOS_SUPPORTED": true, - "XP1_SAN_SUPPORT_SDP": true, - "XP1_SUPPORT_BROADCAST": true, - "XP1_SUPPORT_MULTIPOINT": true, - "XP1_UNI_RECV": true, - "XP1_UNI_SEND": true, - }, - "syscall/js": map[string]bool{ - "CopyBytesToGo": true, - "CopyBytesToJS": true, - "Error": true, - "Func": true, - "FuncOf": true, - "Global": true, - "Null": true, - "Type": true, - "TypeBoolean": true, - "TypeFunction": true, - "TypeNull": true, - "TypeNumber": true, - "TypeObject": true, - "TypeString": true, - "TypeSymbol": true, - "TypeUndefined": true, - "Undefined": true, - "Value": true, - "ValueError": true, - "ValueOf": true, - "Wrapper": true, - }, - "testing": map[string]bool{ - "AllocsPerRun": true, - "B": true, - "Benchmark": true, - "BenchmarkResult": true, - "Cover": true, - "CoverBlock": true, - "CoverMode": true, - "Coverage": true, - "Init": true, - "InternalBenchmark": true, - "InternalExample": true, - "InternalTest": true, - "M": true, - "Main": true, - "MainStart": true, - "PB": true, - "RegisterCover": true, - "RunBenchmarks": true, - "RunExamples": true, - "RunTests": true, - "Short": true, - "T": true, - "TB": true, - "Verbose": true, - }, - "testing/iotest": map[string]bool{ - "DataErrReader": true, - "ErrTimeout": true, - "HalfReader": true, - "NewReadLogger": true, - "NewWriteLogger": true, - "OneByteReader": true, - "TimeoutReader": true, - "TruncateWriter": true, - }, - "testing/quick": map[string]bool{ - "Check": true, - "CheckEqual": true, - "CheckEqualError": true, - "CheckError": true, - "Config": true, - "Generator": true, - "SetupError": true, - "Value": true, - }, - "text/scanner": map[string]bool{ - "Char": true, - "Comment": true, - "EOF": true, - "Float": true, - "GoTokens": true, - "GoWhitespace": true, - "Ident": true, - "Int": true, - "Position": true, - "RawString": true, - "ScanChars": true, - "ScanComments": true, - "ScanFloats": true, - "ScanIdents": true, - "ScanInts": true, - "ScanRawStrings": true, - "ScanStrings": true, - "Scanner": true, - "SkipComments": true, - "String": true, - "TokenString": true, - }, - "text/tabwriter": map[string]bool{ - "AlignRight": true, - "Debug": true, - "DiscardEmptyColumns": true, - "Escape": true, - "FilterHTML": true, - "NewWriter": true, - "StripEscape": true, - "TabIndent": true, - "Writer": true, - }, - "text/template": map[string]bool{ - "ExecError": true, - "FuncMap": true, - "HTMLEscape": true, - "HTMLEscapeString": true, - "HTMLEscaper": true, - "IsTrue": true, - "JSEscape": true, - "JSEscapeString": true, - "JSEscaper": true, - "Must": true, - "New": true, - "ParseFiles": true, - "ParseGlob": true, - "Template": true, - "URLQueryEscaper": true, - }, - "text/template/parse": map[string]bool{ - "ActionNode": true, - "BoolNode": true, - "BranchNode": true, - "ChainNode": true, - "CommandNode": true, - "DotNode": true, - "FieldNode": true, - "IdentifierNode": true, - "IfNode": true, - "IsEmptyTree": true, - "ListNode": true, - "New": true, - "NewIdentifier": true, - "NilNode": true, - "Node": true, - "NodeAction": true, - "NodeBool": true, - "NodeChain": true, - "NodeCommand": true, - "NodeDot": true, - "NodeField": true, - "NodeIdentifier": true, - "NodeIf": true, - "NodeList": true, - "NodeNil": true, - "NodeNumber": true, - "NodePipe": true, - "NodeRange": true, - "NodeString": true, - "NodeTemplate": true, - "NodeText": true, - "NodeType": true, - "NodeVariable": true, - "NodeWith": true, - "NumberNode": true, - "Parse": true, - "PipeNode": true, - "Pos": true, - "RangeNode": true, - "StringNode": true, - "TemplateNode": true, - "TextNode": true, - "Tree": true, - "VariableNode": true, - "WithNode": true, - }, - "time": map[string]bool{ - "ANSIC": true, - "After": true, - "AfterFunc": true, - "April": true, - "August": true, - "Date": true, - "December": true, - "Duration": true, - "February": true, - "FixedZone": true, - "Friday": true, - "Hour": true, - "January": true, - "July": true, - "June": true, - "Kitchen": true, - "LoadLocation": true, - "LoadLocationFromTZData": true, - "Local": true, - "Location": true, - "March": true, - "May": true, - "Microsecond": true, - "Millisecond": true, - "Minute": true, - "Monday": true, - "Month": true, - "Nanosecond": true, - "NewTicker": true, - "NewTimer": true, - "November": true, - "Now": true, - "October": true, - "Parse": true, - "ParseDuration": true, - "ParseError": true, - "ParseInLocation": true, - "RFC1123": true, - "RFC1123Z": true, - "RFC3339": true, - "RFC3339Nano": true, - "RFC822": true, - "RFC822Z": true, - "RFC850": true, - "RubyDate": true, - "Saturday": true, - "Second": true, - "September": true, - "Since": true, - "Sleep": true, - "Stamp": true, - "StampMicro": true, - "StampMilli": true, - "StampNano": true, - "Sunday": true, - "Thursday": true, - "Tick": true, - "Ticker": true, - "Time": true, - "Timer": true, - "Tuesday": true, - "UTC": true, - "Unix": true, - "UnixDate": true, - "Until": true, - "Wednesday": true, - "Weekday": true, - }, - "unicode": map[string]bool{ - "ASCII_Hex_Digit": true, - "Adlam": true, - "Ahom": true, - "Anatolian_Hieroglyphs": true, - "Arabic": true, - "Armenian": true, - "Avestan": true, - "AzeriCase": true, - "Balinese": true, - "Bamum": true, - "Bassa_Vah": true, - "Batak": true, - "Bengali": true, - "Bhaiksuki": true, - "Bidi_Control": true, - "Bopomofo": true, - "Brahmi": true, - "Braille": true, - "Buginese": true, - "Buhid": true, - "C": true, - "Canadian_Aboriginal": true, - "Carian": true, - "CaseRange": true, - "CaseRanges": true, - "Categories": true, - "Caucasian_Albanian": true, - "Cc": true, - "Cf": true, - "Chakma": true, - "Cham": true, - "Cherokee": true, - "Co": true, - "Common": true, - "Coptic": true, - "Cs": true, - "Cuneiform": true, - "Cypriot": true, - "Cyrillic": true, - "Dash": true, - "Deprecated": true, - "Deseret": true, - "Devanagari": true, - "Diacritic": true, - "Digit": true, - "Dogra": true, - "Duployan": true, - "Egyptian_Hieroglyphs": true, - "Elbasan": true, - "Ethiopic": true, - "Extender": true, - "FoldCategory": true, - "FoldScript": true, - "Georgian": true, - "Glagolitic": true, - "Gothic": true, - "Grantha": true, - "GraphicRanges": true, - "Greek": true, - "Gujarati": true, - "Gunjala_Gondi": true, - "Gurmukhi": true, - "Han": true, - "Hangul": true, - "Hanifi_Rohingya": true, - "Hanunoo": true, - "Hatran": true, - "Hebrew": true, - "Hex_Digit": true, - "Hiragana": true, - "Hyphen": true, - "IDS_Binary_Operator": true, - "IDS_Trinary_Operator": true, - "Ideographic": true, - "Imperial_Aramaic": true, - "In": true, - "Inherited": true, - "Inscriptional_Pahlavi": true, - "Inscriptional_Parthian": true, - "Is": true, - "IsControl": true, - "IsDigit": true, - "IsGraphic": true, - "IsLetter": true, - "IsLower": true, - "IsMark": true, - "IsNumber": true, - "IsOneOf": true, - "IsPrint": true, - "IsPunct": true, - "IsSpace": true, - "IsSymbol": true, - "IsTitle": true, - "IsUpper": true, - "Javanese": true, - "Join_Control": true, - "Kaithi": true, - "Kannada": true, - "Katakana": true, - "Kayah_Li": true, - "Kharoshthi": true, - "Khmer": true, - "Khojki": true, - "Khudawadi": true, - "L": true, - "Lao": true, - "Latin": true, - "Lepcha": true, - "Letter": true, - "Limbu": true, - "Linear_A": true, - "Linear_B": true, - "Lisu": true, - "Ll": true, - "Lm": true, - "Lo": true, - "Logical_Order_Exception": true, - "Lower": true, - "LowerCase": true, - "Lt": true, - "Lu": true, - "Lycian": true, - "Lydian": true, - "M": true, - "Mahajani": true, - "Makasar": true, - "Malayalam": true, - "Mandaic": true, - "Manichaean": true, - "Marchen": true, - "Mark": true, - "Masaram_Gondi": true, - "MaxASCII": true, - "MaxCase": true, - "MaxLatin1": true, - "MaxRune": true, - "Mc": true, - "Me": true, - "Medefaidrin": true, - "Meetei_Mayek": true, - "Mende_Kikakui": true, - "Meroitic_Cursive": true, - "Meroitic_Hieroglyphs": true, - "Miao": true, - "Mn": true, - "Modi": true, - "Mongolian": true, - "Mro": true, - "Multani": true, - "Myanmar": true, - "N": true, - "Nabataean": true, - "Nd": true, - "New_Tai_Lue": true, - "Newa": true, - "Nko": true, - "Nl": true, - "No": true, - "Noncharacter_Code_Point": true, - "Number": true, - "Nushu": true, - "Ogham": true, - "Ol_Chiki": true, - "Old_Hungarian": true, - "Old_Italic": true, - "Old_North_Arabian": true, - "Old_Permic": true, - "Old_Persian": true, - "Old_Sogdian": true, - "Old_South_Arabian": true, - "Old_Turkic": true, - "Oriya": true, - "Osage": true, - "Osmanya": true, - "Other": true, - "Other_Alphabetic": true, - "Other_Default_Ignorable_Code_Point": true, - "Other_Grapheme_Extend": true, - "Other_ID_Continue": true, - "Other_ID_Start": true, - "Other_Lowercase": true, - "Other_Math": true, - "Other_Uppercase": true, - "P": true, - "Pahawh_Hmong": true, - "Palmyrene": true, - "Pattern_Syntax": true, - "Pattern_White_Space": true, - "Pau_Cin_Hau": true, - "Pc": true, - "Pd": true, - "Pe": true, - "Pf": true, - "Phags_Pa": true, - "Phoenician": true, - "Pi": true, - "Po": true, - "Prepended_Concatenation_Mark": true, - "PrintRanges": true, - "Properties": true, - "Ps": true, - "Psalter_Pahlavi": true, - "Punct": true, - "Quotation_Mark": true, - "Radical": true, - "Range16": true, - "Range32": true, - "RangeTable": true, - "Regional_Indicator": true, - "Rejang": true, - "ReplacementChar": true, - "Runic": true, - "S": true, - "STerm": true, - "Samaritan": true, - "Saurashtra": true, - "Sc": true, - "Scripts": true, - "Sentence_Terminal": true, - "Sharada": true, - "Shavian": true, - "Siddham": true, - "SignWriting": true, - "SimpleFold": true, - "Sinhala": true, - "Sk": true, - "Sm": true, - "So": true, - "Soft_Dotted": true, - "Sogdian": true, - "Sora_Sompeng": true, - "Soyombo": true, - "Space": true, - "SpecialCase": true, - "Sundanese": true, - "Syloti_Nagri": true, - "Symbol": true, - "Syriac": true, - "Tagalog": true, - "Tagbanwa": true, - "Tai_Le": true, - "Tai_Tham": true, - "Tai_Viet": true, - "Takri": true, - "Tamil": true, - "Tangut": true, - "Telugu": true, - "Terminal_Punctuation": true, - "Thaana": true, - "Thai": true, - "Tibetan": true, - "Tifinagh": true, - "Tirhuta": true, - "Title": true, - "TitleCase": true, - "To": true, - "ToLower": true, - "ToTitle": true, - "ToUpper": true, - "TurkishCase": true, - "Ugaritic": true, - "Unified_Ideograph": true, - "Upper": true, - "UpperCase": true, - "UpperLower": true, - "Vai": true, - "Variation_Selector": true, - "Version": true, - "Warang_Citi": true, - "White_Space": true, - "Yi": true, - "Z": true, - "Zanabazar_Square": true, - "Zl": true, - "Zp": true, - "Zs": true, - }, - "unicode/utf16": map[string]bool{ - "Decode": true, - "DecodeRune": true, - "Encode": true, - "EncodeRune": true, - "IsSurrogate": true, - }, - "unicode/utf8": map[string]bool{ - "DecodeLastRune": true, - "DecodeLastRuneInString": true, - "DecodeRune": true, - "DecodeRuneInString": true, - "EncodeRune": true, - "FullRune": true, - "FullRuneInString": true, - "MaxRune": true, - "RuneCount": true, - "RuneCountInString": true, - "RuneError": true, - "RuneLen": true, - "RuneSelf": true, - "RuneStart": true, - "UTFMax": true, - "Valid": true, - "ValidRune": true, - "ValidString": true, - }, - "unsafe": map[string]bool{ - "Alignof": true, - "ArbitraryType": true, - "Offsetof": true, - "Pointer": true, - "Sizeof": true, +var stdlib = map[string][]string{ + "archive/tar": []string{ + "ErrFieldTooLong", + "ErrHeader", + "ErrWriteAfterClose", + "ErrWriteTooLong", + "FileInfoHeader", + "Format", + "FormatGNU", + "FormatPAX", + "FormatUSTAR", + "FormatUnknown", + "Header", + "NewReader", + "NewWriter", + "Reader", + "TypeBlock", + "TypeChar", + "TypeCont", + "TypeDir", + "TypeFifo", + "TypeGNULongLink", + "TypeGNULongName", + "TypeGNUSparse", + "TypeLink", + "TypeReg", + "TypeRegA", + "TypeSymlink", + "TypeXGlobalHeader", + "TypeXHeader", + "Writer", + }, + "archive/zip": []string{ + "Compressor", + "Decompressor", + "Deflate", + "ErrAlgorithm", + "ErrChecksum", + "ErrFormat", + "File", + "FileHeader", + "FileInfoHeader", + "NewReader", + "NewWriter", + "OpenReader", + "ReadCloser", + "Reader", + "RegisterCompressor", + "RegisterDecompressor", + "Store", + "Writer", + }, + "bufio": []string{ + "ErrAdvanceTooFar", + "ErrBufferFull", + "ErrFinalToken", + "ErrInvalidUnreadByte", + "ErrInvalidUnreadRune", + "ErrNegativeAdvance", + "ErrNegativeCount", + "ErrTooLong", + "MaxScanTokenSize", + "NewReadWriter", + "NewReader", + "NewReaderSize", + "NewScanner", + "NewWriter", + "NewWriterSize", + "ReadWriter", + "Reader", + "ScanBytes", + "ScanLines", + "ScanRunes", + "ScanWords", + "Scanner", + "SplitFunc", + "Writer", + }, + "bytes": []string{ + "Buffer", + "Compare", + "Contains", + "ContainsAny", + "ContainsRune", + "Count", + "Equal", + "EqualFold", + "ErrTooLarge", + "Fields", + "FieldsFunc", + "HasPrefix", + "HasSuffix", + "Index", + "IndexAny", + "IndexByte", + "IndexFunc", + "IndexRune", + "Join", + "LastIndex", + "LastIndexAny", + "LastIndexByte", + "LastIndexFunc", + "Map", + "MinRead", + "NewBuffer", + "NewBufferString", + "NewReader", + "Reader", + "Repeat", + "Replace", + "ReplaceAll", + "Runes", + "Split", + "SplitAfter", + "SplitAfterN", + "SplitN", + "Title", + "ToLower", + "ToLowerSpecial", + "ToTitle", + "ToTitleSpecial", + "ToUpper", + "ToUpperSpecial", + "ToValidUTF8", + "Trim", + "TrimFunc", + "TrimLeft", + "TrimLeftFunc", + "TrimPrefix", + "TrimRight", + "TrimRightFunc", + "TrimSpace", + "TrimSuffix", + }, + "compress/bzip2": []string{ + "NewReader", + "StructuralError", + }, + "compress/flate": []string{ + "BestCompression", + "BestSpeed", + "CorruptInputError", + "DefaultCompression", + "HuffmanOnly", + "InternalError", + "NewReader", + "NewReaderDict", + "NewWriter", + "NewWriterDict", + "NoCompression", + "ReadError", + "Reader", + "Resetter", + "WriteError", + "Writer", + }, + "compress/gzip": []string{ + "BestCompression", + "BestSpeed", + "DefaultCompression", + "ErrChecksum", + "ErrHeader", + "Header", + "HuffmanOnly", + "NewReader", + "NewWriter", + "NewWriterLevel", + "NoCompression", + "Reader", + "Writer", + }, + "compress/lzw": []string{ + "LSB", + "MSB", + "NewReader", + "NewWriter", + "Order", + }, + "compress/zlib": []string{ + "BestCompression", + "BestSpeed", + "DefaultCompression", + "ErrChecksum", + "ErrDictionary", + "ErrHeader", + "HuffmanOnly", + "NewReader", + "NewReaderDict", + "NewWriter", + "NewWriterLevel", + "NewWriterLevelDict", + "NoCompression", + "Resetter", + "Writer", + }, + "container/heap": []string{ + "Fix", + "Init", + "Interface", + "Pop", + "Push", + "Remove", + }, + "container/list": []string{ + "Element", + "List", + "New", + }, + "container/ring": []string{ + "New", + "Ring", + }, + "context": []string{ + "Background", + "CancelFunc", + "Canceled", + "Context", + "DeadlineExceeded", + "TODO", + "WithCancel", + "WithDeadline", + "WithTimeout", + "WithValue", + }, + "crypto": []string{ + "BLAKE2b_256", + "BLAKE2b_384", + "BLAKE2b_512", + "BLAKE2s_256", + "Decrypter", + "DecrypterOpts", + "Hash", + "MD4", + "MD5", + "MD5SHA1", + "PrivateKey", + "PublicKey", + "RIPEMD160", + "RegisterHash", + "SHA1", + "SHA224", + "SHA256", + "SHA384", + "SHA3_224", + "SHA3_256", + "SHA3_384", + "SHA3_512", + "SHA512", + "SHA512_224", + "SHA512_256", + "Signer", + "SignerOpts", + }, + "crypto/aes": []string{ + "BlockSize", + "KeySizeError", + "NewCipher", + }, + "crypto/cipher": []string{ + "AEAD", + "Block", + "BlockMode", + "NewCBCDecrypter", + "NewCBCEncrypter", + "NewCFBDecrypter", + "NewCFBEncrypter", + "NewCTR", + "NewGCM", + "NewGCMWithNonceSize", + "NewGCMWithTagSize", + "NewOFB", + "Stream", + "StreamReader", + "StreamWriter", + }, + "crypto/des": []string{ + "BlockSize", + "KeySizeError", + "NewCipher", + "NewTripleDESCipher", + }, + "crypto/dsa": []string{ + "ErrInvalidPublicKey", + "GenerateKey", + "GenerateParameters", + "L1024N160", + "L2048N224", + "L2048N256", + "L3072N256", + "ParameterSizes", + "Parameters", + "PrivateKey", + "PublicKey", + "Sign", + "Verify", + }, + "crypto/ecdsa": []string{ + "GenerateKey", + "PrivateKey", + "PublicKey", + "Sign", + "Verify", + }, + "crypto/ed25519": []string{ + "GenerateKey", + "NewKeyFromSeed", + "PrivateKey", + "PrivateKeySize", + "PublicKey", + "PublicKeySize", + "SeedSize", + "Sign", + "SignatureSize", + "Verify", + }, + "crypto/elliptic": []string{ + "Curve", + "CurveParams", + "GenerateKey", + "Marshal", + "P224", + "P256", + "P384", + "P521", + "Unmarshal", + }, + "crypto/hmac": []string{ + "Equal", + "New", + }, + "crypto/md5": []string{ + "BlockSize", + "New", + "Size", + "Sum", + }, + "crypto/rand": []string{ + "Int", + "Prime", + "Read", + "Reader", + }, + "crypto/rc4": []string{ + "Cipher", + "KeySizeError", + "NewCipher", + }, + "crypto/rsa": []string{ + "CRTValue", + "DecryptOAEP", + "DecryptPKCS1v15", + "DecryptPKCS1v15SessionKey", + "EncryptOAEP", + "EncryptPKCS1v15", + "ErrDecryption", + "ErrMessageTooLong", + "ErrVerification", + "GenerateKey", + "GenerateMultiPrimeKey", + "OAEPOptions", + "PKCS1v15DecryptOptions", + "PSSOptions", + "PSSSaltLengthAuto", + "PSSSaltLengthEqualsHash", + "PrecomputedValues", + "PrivateKey", + "PublicKey", + "SignPKCS1v15", + "SignPSS", + "VerifyPKCS1v15", + "VerifyPSS", + }, + "crypto/sha1": []string{ + "BlockSize", + "New", + "Size", + "Sum", + }, + "crypto/sha256": []string{ + "BlockSize", + "New", + "New224", + "Size", + "Size224", + "Sum224", + "Sum256", + }, + "crypto/sha512": []string{ + "BlockSize", + "New", + "New384", + "New512_224", + "New512_256", + "Size", + "Size224", + "Size256", + "Size384", + "Sum384", + "Sum512", + "Sum512_224", + "Sum512_256", + }, + "crypto/subtle": []string{ + "ConstantTimeByteEq", + "ConstantTimeCompare", + "ConstantTimeCopy", + "ConstantTimeEq", + "ConstantTimeLessOrEq", + "ConstantTimeSelect", + }, + "crypto/tls": []string{ + "Certificate", + "CertificateRequestInfo", + "CipherSuite", + "CipherSuiteName", + "CipherSuites", + "Client", + "ClientAuthType", + "ClientHelloInfo", + "ClientSessionCache", + "ClientSessionState", + "Config", + "Conn", + "ConnectionState", + "CurveID", + "CurveP256", + "CurveP384", + "CurveP521", + "Dial", + "DialWithDialer", + "ECDSAWithP256AndSHA256", + "ECDSAWithP384AndSHA384", + "ECDSAWithP521AndSHA512", + "ECDSAWithSHA1", + "Ed25519", + "InsecureCipherSuites", + "Listen", + "LoadX509KeyPair", + "NewLRUClientSessionCache", + "NewListener", + "NoClientCert", + "PKCS1WithSHA1", + "PKCS1WithSHA256", + "PKCS1WithSHA384", + "PKCS1WithSHA512", + "PSSWithSHA256", + "PSSWithSHA384", + "PSSWithSHA512", + "RecordHeaderError", + "RenegotiateFreelyAsClient", + "RenegotiateNever", + "RenegotiateOnceAsClient", + "RenegotiationSupport", + "RequestClientCert", + "RequireAndVerifyClientCert", + "RequireAnyClientCert", + "Server", + "SignatureScheme", + "TLS_AES_128_GCM_SHA256", + "TLS_AES_256_GCM_SHA384", + "TLS_CHACHA20_POLY1305_SHA256", + "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", + "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", + "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", + "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", + "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", + "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305", + "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", + "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", + "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", + "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", + "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", + "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", + "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", + "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", + "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305", + "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", + "TLS_ECDHE_RSA_WITH_RC4_128_SHA", + "TLS_FALLBACK_SCSV", + "TLS_RSA_WITH_3DES_EDE_CBC_SHA", + "TLS_RSA_WITH_AES_128_CBC_SHA", + "TLS_RSA_WITH_AES_128_CBC_SHA256", + "TLS_RSA_WITH_AES_128_GCM_SHA256", + "TLS_RSA_WITH_AES_256_CBC_SHA", + "TLS_RSA_WITH_AES_256_GCM_SHA384", + "TLS_RSA_WITH_RC4_128_SHA", + "VerifyClientCertIfGiven", + "VersionSSL30", + "VersionTLS10", + "VersionTLS11", + "VersionTLS12", + "VersionTLS13", + "X25519", + "X509KeyPair", + }, + "crypto/x509": []string{ + "CANotAuthorizedForExtKeyUsage", + "CANotAuthorizedForThisName", + "CertPool", + "Certificate", + "CertificateInvalidError", + "CertificateRequest", + "ConstraintViolationError", + "CreateCertificate", + "CreateCertificateRequest", + "DSA", + "DSAWithSHA1", + "DSAWithSHA256", + "DecryptPEMBlock", + "ECDSA", + "ECDSAWithSHA1", + "ECDSAWithSHA256", + "ECDSAWithSHA384", + "ECDSAWithSHA512", + "Ed25519", + "EncryptPEMBlock", + "ErrUnsupportedAlgorithm", + "Expired", + "ExtKeyUsage", + "ExtKeyUsageAny", + "ExtKeyUsageClientAuth", + "ExtKeyUsageCodeSigning", + "ExtKeyUsageEmailProtection", + "ExtKeyUsageIPSECEndSystem", + "ExtKeyUsageIPSECTunnel", + "ExtKeyUsageIPSECUser", + "ExtKeyUsageMicrosoftCommercialCodeSigning", + "ExtKeyUsageMicrosoftKernelCodeSigning", + "ExtKeyUsageMicrosoftServerGatedCrypto", + "ExtKeyUsageNetscapeServerGatedCrypto", + "ExtKeyUsageOCSPSigning", + "ExtKeyUsageServerAuth", + "ExtKeyUsageTimeStamping", + "HostnameError", + "IncompatibleUsage", + "IncorrectPasswordError", + "InsecureAlgorithmError", + "InvalidReason", + "IsEncryptedPEMBlock", + "KeyUsage", + "KeyUsageCRLSign", + "KeyUsageCertSign", + "KeyUsageContentCommitment", + "KeyUsageDataEncipherment", + "KeyUsageDecipherOnly", + "KeyUsageDigitalSignature", + "KeyUsageEncipherOnly", + "KeyUsageKeyAgreement", + "KeyUsageKeyEncipherment", + "MD2WithRSA", + "MD5WithRSA", + "MarshalECPrivateKey", + "MarshalPKCS1PrivateKey", + "MarshalPKCS1PublicKey", + "MarshalPKCS8PrivateKey", + "MarshalPKIXPublicKey", + "NameConstraintsWithoutSANs", + "NameMismatch", + "NewCertPool", + "NotAuthorizedToSign", + "PEMCipher", + "PEMCipher3DES", + "PEMCipherAES128", + "PEMCipherAES192", + "PEMCipherAES256", + "PEMCipherDES", + "ParseCRL", + "ParseCertificate", + "ParseCertificateRequest", + "ParseCertificates", + "ParseDERCRL", + "ParseECPrivateKey", + "ParsePKCS1PrivateKey", + "ParsePKCS1PublicKey", + "ParsePKCS8PrivateKey", + "ParsePKIXPublicKey", + "PublicKeyAlgorithm", + "PureEd25519", + "RSA", + "SHA1WithRSA", + "SHA256WithRSA", + "SHA256WithRSAPSS", + "SHA384WithRSA", + "SHA384WithRSAPSS", + "SHA512WithRSA", + "SHA512WithRSAPSS", + "SignatureAlgorithm", + "SystemCertPool", + "SystemRootsError", + "TooManyConstraints", + "TooManyIntermediates", + "UnconstrainedName", + "UnhandledCriticalExtension", + "UnknownAuthorityError", + "UnknownPublicKeyAlgorithm", + "UnknownSignatureAlgorithm", + "VerifyOptions", + }, + "crypto/x509/pkix": []string{ + "AlgorithmIdentifier", + "AttributeTypeAndValue", + "AttributeTypeAndValueSET", + "CertificateList", + "Extension", + "Name", + "RDNSequence", + "RelativeDistinguishedNameSET", + "RevokedCertificate", + "TBSCertificateList", + }, + "database/sql": []string{ + "ColumnType", + "Conn", + "DB", + "DBStats", + "Drivers", + "ErrConnDone", + "ErrNoRows", + "ErrTxDone", + "IsolationLevel", + "LevelDefault", + "LevelLinearizable", + "LevelReadCommitted", + "LevelReadUncommitted", + "LevelRepeatableRead", + "LevelSerializable", + "LevelSnapshot", + "LevelWriteCommitted", + "Named", + "NamedArg", + "NullBool", + "NullFloat64", + "NullInt32", + "NullInt64", + "NullString", + "NullTime", + "Open", + "OpenDB", + "Out", + "RawBytes", + "Register", + "Result", + "Row", + "Rows", + "Scanner", + "Stmt", + "Tx", + "TxOptions", + }, + "database/sql/driver": []string{ + "Bool", + "ColumnConverter", + "Conn", + "ConnBeginTx", + "ConnPrepareContext", + "Connector", + "DefaultParameterConverter", + "Driver", + "DriverContext", + "ErrBadConn", + "ErrRemoveArgument", + "ErrSkip", + "Execer", + "ExecerContext", + "Int32", + "IsScanValue", + "IsValue", + "IsolationLevel", + "NamedValue", + "NamedValueChecker", + "NotNull", + "Null", + "Pinger", + "Queryer", + "QueryerContext", + "Result", + "ResultNoRows", + "Rows", + "RowsAffected", + "RowsColumnTypeDatabaseTypeName", + "RowsColumnTypeLength", + "RowsColumnTypeNullable", + "RowsColumnTypePrecisionScale", + "RowsColumnTypeScanType", + "RowsNextResultSet", + "SessionResetter", + "Stmt", + "StmtExecContext", + "StmtQueryContext", + "String", + "Tx", + "TxOptions", + "Value", + "ValueConverter", + "Valuer", + }, + "debug/dwarf": []string{ + "AddrType", + "ArrayType", + "Attr", + "AttrAbstractOrigin", + "AttrAccessibility", + "AttrAddrBase", + "AttrAddrClass", + "AttrAlignment", + "AttrAllocated", + "AttrArtificial", + "AttrAssociated", + "AttrBaseTypes", + "AttrBinaryScale", + "AttrBitOffset", + "AttrBitSize", + "AttrByteSize", + "AttrCallAllCalls", + "AttrCallAllSourceCalls", + "AttrCallAllTailCalls", + "AttrCallColumn", + "AttrCallDataLocation", + "AttrCallDataValue", + "AttrCallFile", + "AttrCallLine", + "AttrCallOrigin", + "AttrCallPC", + "AttrCallParameter", + "AttrCallReturnPC", + "AttrCallTailCall", + "AttrCallTarget", + "AttrCallTargetClobbered", + "AttrCallValue", + "AttrCalling", + "AttrCommonRef", + "AttrCompDir", + "AttrConstExpr", + "AttrConstValue", + "AttrContainingType", + "AttrCount", + "AttrDataBitOffset", + "AttrDataLocation", + "AttrDataMemberLoc", + "AttrDecimalScale", + "AttrDecimalSign", + "AttrDeclColumn", + "AttrDeclFile", + "AttrDeclLine", + "AttrDeclaration", + "AttrDefaultValue", + "AttrDefaulted", + "AttrDeleted", + "AttrDescription", + "AttrDigitCount", + "AttrDiscr", + "AttrDiscrList", + "AttrDiscrValue", + "AttrDwoName", + "AttrElemental", + "AttrEncoding", + "AttrEndianity", + "AttrEntrypc", + "AttrEnumClass", + "AttrExplicit", + "AttrExportSymbols", + "AttrExtension", + "AttrExternal", + "AttrFrameBase", + "AttrFriend", + "AttrHighpc", + "AttrIdentifierCase", + "AttrImport", + "AttrInline", + "AttrIsOptional", + "AttrLanguage", + "AttrLinkageName", + "AttrLocation", + "AttrLoclistsBase", + "AttrLowerBound", + "AttrLowpc", + "AttrMacroInfo", + "AttrMacros", + "AttrMainSubprogram", + "AttrMutable", + "AttrName", + "AttrNamelistItem", + "AttrNoreturn", + "AttrObjectPointer", + "AttrOrdering", + "AttrPictureString", + "AttrPriority", + "AttrProducer", + "AttrPrototyped", + "AttrPure", + "AttrRanges", + "AttrRank", + "AttrRecursive", + "AttrReference", + "AttrReturnAddr", + "AttrRnglistsBase", + "AttrRvalueReference", + "AttrSegment", + "AttrSibling", + "AttrSignature", + "AttrSmall", + "AttrSpecification", + "AttrStartScope", + "AttrStaticLink", + "AttrStmtList", + "AttrStrOffsetsBase", + "AttrStride", + "AttrStrideSize", + "AttrStringLength", + "AttrStringLengthBitSize", + "AttrStringLengthByteSize", + "AttrThreadsScaled", + "AttrTrampoline", + "AttrType", + "AttrUpperBound", + "AttrUseLocation", + "AttrUseUTF8", + "AttrVarParam", + "AttrVirtuality", + "AttrVisibility", + "AttrVtableElemLoc", + "BasicType", + "BoolType", + "CharType", + "Class", + "ClassAddrPtr", + "ClassAddress", + "ClassBlock", + "ClassConstant", + "ClassExprLoc", + "ClassFlag", + "ClassLinePtr", + "ClassLocList", + "ClassLocListPtr", + "ClassMacPtr", + "ClassRangeListPtr", + "ClassReference", + "ClassReferenceAlt", + "ClassReferenceSig", + "ClassRngList", + "ClassRngListsPtr", + "ClassStrOffsetsPtr", + "ClassString", + "ClassStringAlt", + "ClassUnknown", + "CommonType", + "ComplexType", + "Data", + "DecodeError", + "DotDotDotType", + "Entry", + "EnumType", + "EnumValue", + "ErrUnknownPC", + "Field", + "FloatType", + "FuncType", + "IntType", + "LineEntry", + "LineFile", + "LineReader", + "LineReaderPos", + "New", + "Offset", + "PtrType", + "QualType", + "Reader", + "StructField", + "StructType", + "Tag", + "TagAccessDeclaration", + "TagArrayType", + "TagAtomicType", + "TagBaseType", + "TagCallSite", + "TagCallSiteParameter", + "TagCatchDwarfBlock", + "TagClassType", + "TagCoarrayType", + "TagCommonDwarfBlock", + "TagCommonInclusion", + "TagCompileUnit", + "TagCondition", + "TagConstType", + "TagConstant", + "TagDwarfProcedure", + "TagDynamicType", + "TagEntryPoint", + "TagEnumerationType", + "TagEnumerator", + "TagFileType", + "TagFormalParameter", + "TagFriend", + "TagGenericSubrange", + "TagImmutableType", + "TagImportedDeclaration", + "TagImportedModule", + "TagImportedUnit", + "TagInheritance", + "TagInlinedSubroutine", + "TagInterfaceType", + "TagLabel", + "TagLexDwarfBlock", + "TagMember", + "TagModule", + "TagMutableType", + "TagNamelist", + "TagNamelistItem", + "TagNamespace", + "TagPackedType", + "TagPartialUnit", + "TagPointerType", + "TagPtrToMemberType", + "TagReferenceType", + "TagRestrictType", + "TagRvalueReferenceType", + "TagSetType", + "TagSharedType", + "TagSkeletonUnit", + "TagStringType", + "TagStructType", + "TagSubprogram", + "TagSubrangeType", + "TagSubroutineType", + "TagTemplateAlias", + "TagTemplateTypeParameter", + "TagTemplateValueParameter", + "TagThrownType", + "TagTryDwarfBlock", + "TagTypeUnit", + "TagTypedef", + "TagUnionType", + "TagUnspecifiedParameters", + "TagUnspecifiedType", + "TagVariable", + "TagVariant", + "TagVariantPart", + "TagVolatileType", + "TagWithStmt", + "Type", + "TypedefType", + "UcharType", + "UintType", + "UnspecifiedType", + "UnsupportedType", + "VoidType", + }, + "debug/elf": []string{ + "ARM_MAGIC_TRAMP_NUMBER", + "COMPRESS_HIOS", + "COMPRESS_HIPROC", + "COMPRESS_LOOS", + "COMPRESS_LOPROC", + "COMPRESS_ZLIB", + "Chdr32", + "Chdr64", + "Class", + "CompressionType", + "DF_BIND_NOW", + "DF_ORIGIN", + "DF_STATIC_TLS", + "DF_SYMBOLIC", + "DF_TEXTREL", + "DT_BIND_NOW", + "DT_DEBUG", + "DT_ENCODING", + "DT_FINI", + "DT_FINI_ARRAY", + "DT_FINI_ARRAYSZ", + "DT_FLAGS", + "DT_HASH", + "DT_HIOS", + "DT_HIPROC", + "DT_INIT", + "DT_INIT_ARRAY", + "DT_INIT_ARRAYSZ", + "DT_JMPREL", + "DT_LOOS", + "DT_LOPROC", + "DT_NEEDED", + "DT_NULL", + "DT_PLTGOT", + "DT_PLTREL", + "DT_PLTRELSZ", + "DT_PREINIT_ARRAY", + "DT_PREINIT_ARRAYSZ", + "DT_REL", + "DT_RELA", + "DT_RELAENT", + "DT_RELASZ", + "DT_RELENT", + "DT_RELSZ", + "DT_RPATH", + "DT_RUNPATH", + "DT_SONAME", + "DT_STRSZ", + "DT_STRTAB", + "DT_SYMBOLIC", + "DT_SYMENT", + "DT_SYMTAB", + "DT_TEXTREL", + "DT_VERNEED", + "DT_VERNEEDNUM", + "DT_VERSYM", + "Data", + "Dyn32", + "Dyn64", + "DynFlag", + "DynTag", + "EI_ABIVERSION", + "EI_CLASS", + "EI_DATA", + "EI_NIDENT", + "EI_OSABI", + "EI_PAD", + "EI_VERSION", + "ELFCLASS32", + "ELFCLASS64", + "ELFCLASSNONE", + "ELFDATA2LSB", + "ELFDATA2MSB", + "ELFDATANONE", + "ELFMAG", + "ELFOSABI_86OPEN", + "ELFOSABI_AIX", + "ELFOSABI_ARM", + "ELFOSABI_AROS", + "ELFOSABI_CLOUDABI", + "ELFOSABI_FENIXOS", + "ELFOSABI_FREEBSD", + "ELFOSABI_HPUX", + "ELFOSABI_HURD", + "ELFOSABI_IRIX", + "ELFOSABI_LINUX", + "ELFOSABI_MODESTO", + "ELFOSABI_NETBSD", + "ELFOSABI_NONE", + "ELFOSABI_NSK", + "ELFOSABI_OPENBSD", + "ELFOSABI_OPENVMS", + "ELFOSABI_SOLARIS", + "ELFOSABI_STANDALONE", + "ELFOSABI_TRU64", + "EM_386", + "EM_486", + "EM_56800EX", + "EM_68HC05", + "EM_68HC08", + "EM_68HC11", + "EM_68HC12", + "EM_68HC16", + "EM_68K", + "EM_78KOR", + "EM_8051", + "EM_860", + "EM_88K", + "EM_960", + "EM_AARCH64", + "EM_ALPHA", + "EM_ALPHA_STD", + "EM_ALTERA_NIOS2", + "EM_AMDGPU", + "EM_ARC", + "EM_ARCA", + "EM_ARC_COMPACT", + "EM_ARC_COMPACT2", + "EM_ARM", + "EM_AVR", + "EM_AVR32", + "EM_BA1", + "EM_BA2", + "EM_BLACKFIN", + "EM_BPF", + "EM_C166", + "EM_CDP", + "EM_CE", + "EM_CLOUDSHIELD", + "EM_COGE", + "EM_COLDFIRE", + "EM_COOL", + "EM_COREA_1ST", + "EM_COREA_2ND", + "EM_CR", + "EM_CR16", + "EM_CRAYNV2", + "EM_CRIS", + "EM_CRX", + "EM_CSR_KALIMBA", + "EM_CUDA", + "EM_CYPRESS_M8C", + "EM_D10V", + "EM_D30V", + "EM_DSP24", + "EM_DSPIC30F", + "EM_DXP", + "EM_ECOG1", + "EM_ECOG16", + "EM_ECOG1X", + "EM_ECOG2", + "EM_ETPU", + "EM_EXCESS", + "EM_F2MC16", + "EM_FIREPATH", + "EM_FR20", + "EM_FR30", + "EM_FT32", + "EM_FX66", + "EM_H8S", + "EM_H8_300", + "EM_H8_300H", + "EM_H8_500", + "EM_HUANY", + "EM_IA_64", + "EM_INTEL205", + "EM_INTEL206", + "EM_INTEL207", + "EM_INTEL208", + "EM_INTEL209", + "EM_IP2K", + "EM_JAVELIN", + "EM_K10M", + "EM_KM32", + "EM_KMX16", + "EM_KMX32", + "EM_KMX8", + "EM_KVARC", + "EM_L10M", + "EM_LANAI", + "EM_LATTICEMICO32", + "EM_M16C", + "EM_M32", + "EM_M32C", + "EM_M32R", + "EM_MANIK", + "EM_MAX", + "EM_MAXQ30", + "EM_MCHP_PIC", + "EM_MCST_ELBRUS", + "EM_ME16", + "EM_METAG", + "EM_MICROBLAZE", + "EM_MIPS", + "EM_MIPS_RS3_LE", + "EM_MIPS_RS4_BE", + "EM_MIPS_X", + "EM_MMA", + "EM_MMDSP_PLUS", + "EM_MMIX", + "EM_MN10200", + "EM_MN10300", + "EM_MOXIE", + "EM_MSP430", + "EM_NCPU", + "EM_NDR1", + "EM_NDS32", + "EM_NONE", + "EM_NORC", + "EM_NS32K", + "EM_OPEN8", + "EM_OPENRISC", + "EM_PARISC", + "EM_PCP", + "EM_PDP10", + "EM_PDP11", + "EM_PDSP", + "EM_PJ", + "EM_PPC", + "EM_PPC64", + "EM_PRISM", + "EM_QDSP6", + "EM_R32C", + "EM_RCE", + "EM_RH32", + "EM_RISCV", + "EM_RL78", + "EM_RS08", + "EM_RX", + "EM_S370", + "EM_S390", + "EM_SCORE7", + "EM_SEP", + "EM_SE_C17", + "EM_SE_C33", + "EM_SH", + "EM_SHARC", + "EM_SLE9X", + "EM_SNP1K", + "EM_SPARC", + "EM_SPARC32PLUS", + "EM_SPARCV9", + "EM_ST100", + "EM_ST19", + "EM_ST200", + "EM_ST7", + "EM_ST9PLUS", + "EM_STARCORE", + "EM_STM8", + "EM_STXP7X", + "EM_SVX", + "EM_TILE64", + "EM_TILEGX", + "EM_TILEPRO", + "EM_TINYJ", + "EM_TI_ARP32", + "EM_TI_C2000", + "EM_TI_C5500", + "EM_TI_C6000", + "EM_TI_PRU", + "EM_TMM_GPP", + "EM_TPC", + "EM_TRICORE", + "EM_TRIMEDIA", + "EM_TSK3000", + "EM_UNICORE", + "EM_V800", + "EM_V850", + "EM_VAX", + "EM_VIDEOCORE", + "EM_VIDEOCORE3", + "EM_VIDEOCORE5", + "EM_VISIUM", + "EM_VPP500", + "EM_X86_64", + "EM_XCORE", + "EM_XGATE", + "EM_XIMO16", + "EM_XTENSA", + "EM_Z80", + "EM_ZSP", + "ET_CORE", + "ET_DYN", + "ET_EXEC", + "ET_HIOS", + "ET_HIPROC", + "ET_LOOS", + "ET_LOPROC", + "ET_NONE", + "ET_REL", + "EV_CURRENT", + "EV_NONE", + "ErrNoSymbols", + "File", + "FileHeader", + "FormatError", + "Header32", + "Header64", + "ImportedSymbol", + "Machine", + "NT_FPREGSET", + "NT_PRPSINFO", + "NT_PRSTATUS", + "NType", + "NewFile", + "OSABI", + "Open", + "PF_MASKOS", + "PF_MASKPROC", + "PF_R", + "PF_W", + "PF_X", + "PT_DYNAMIC", + "PT_HIOS", + "PT_HIPROC", + "PT_INTERP", + "PT_LOAD", + "PT_LOOS", + "PT_LOPROC", + "PT_NOTE", + "PT_NULL", + "PT_PHDR", + "PT_SHLIB", + "PT_TLS", + "Prog", + "Prog32", + "Prog64", + "ProgFlag", + "ProgHeader", + "ProgType", + "R_386", + "R_386_16", + "R_386_32", + "R_386_32PLT", + "R_386_8", + "R_386_COPY", + "R_386_GLOB_DAT", + "R_386_GOT32", + "R_386_GOT32X", + "R_386_GOTOFF", + "R_386_GOTPC", + "R_386_IRELATIVE", + "R_386_JMP_SLOT", + "R_386_NONE", + "R_386_PC16", + "R_386_PC32", + "R_386_PC8", + "R_386_PLT32", + "R_386_RELATIVE", + "R_386_SIZE32", + "R_386_TLS_DESC", + "R_386_TLS_DESC_CALL", + "R_386_TLS_DTPMOD32", + "R_386_TLS_DTPOFF32", + "R_386_TLS_GD", + "R_386_TLS_GD_32", + "R_386_TLS_GD_CALL", + "R_386_TLS_GD_POP", + "R_386_TLS_GD_PUSH", + "R_386_TLS_GOTDESC", + "R_386_TLS_GOTIE", + "R_386_TLS_IE", + "R_386_TLS_IE_32", + "R_386_TLS_LDM", + "R_386_TLS_LDM_32", + "R_386_TLS_LDM_CALL", + "R_386_TLS_LDM_POP", + "R_386_TLS_LDM_PUSH", + "R_386_TLS_LDO_32", + "R_386_TLS_LE", + "R_386_TLS_LE_32", + "R_386_TLS_TPOFF", + "R_386_TLS_TPOFF32", + "R_390", + "R_390_12", + "R_390_16", + "R_390_20", + "R_390_32", + "R_390_64", + "R_390_8", + "R_390_COPY", + "R_390_GLOB_DAT", + "R_390_GOT12", + "R_390_GOT16", + "R_390_GOT20", + "R_390_GOT32", + "R_390_GOT64", + "R_390_GOTENT", + "R_390_GOTOFF", + "R_390_GOTOFF16", + "R_390_GOTOFF64", + "R_390_GOTPC", + "R_390_GOTPCDBL", + "R_390_GOTPLT12", + "R_390_GOTPLT16", + "R_390_GOTPLT20", + "R_390_GOTPLT32", + "R_390_GOTPLT64", + "R_390_GOTPLTENT", + "R_390_GOTPLTOFF16", + "R_390_GOTPLTOFF32", + "R_390_GOTPLTOFF64", + "R_390_JMP_SLOT", + "R_390_NONE", + "R_390_PC16", + "R_390_PC16DBL", + "R_390_PC32", + "R_390_PC32DBL", + "R_390_PC64", + "R_390_PLT16DBL", + "R_390_PLT32", + "R_390_PLT32DBL", + "R_390_PLT64", + "R_390_RELATIVE", + "R_390_TLS_DTPMOD", + "R_390_TLS_DTPOFF", + "R_390_TLS_GD32", + "R_390_TLS_GD64", + "R_390_TLS_GDCALL", + "R_390_TLS_GOTIE12", + "R_390_TLS_GOTIE20", + "R_390_TLS_GOTIE32", + "R_390_TLS_GOTIE64", + "R_390_TLS_IE32", + "R_390_TLS_IE64", + "R_390_TLS_IEENT", + "R_390_TLS_LDCALL", + "R_390_TLS_LDM32", + "R_390_TLS_LDM64", + "R_390_TLS_LDO32", + "R_390_TLS_LDO64", + "R_390_TLS_LE32", + "R_390_TLS_LE64", + "R_390_TLS_LOAD", + "R_390_TLS_TPOFF", + "R_AARCH64", + "R_AARCH64_ABS16", + "R_AARCH64_ABS32", + "R_AARCH64_ABS64", + "R_AARCH64_ADD_ABS_LO12_NC", + "R_AARCH64_ADR_GOT_PAGE", + "R_AARCH64_ADR_PREL_LO21", + "R_AARCH64_ADR_PREL_PG_HI21", + "R_AARCH64_ADR_PREL_PG_HI21_NC", + "R_AARCH64_CALL26", + "R_AARCH64_CONDBR19", + "R_AARCH64_COPY", + "R_AARCH64_GLOB_DAT", + "R_AARCH64_GOT_LD_PREL19", + "R_AARCH64_IRELATIVE", + "R_AARCH64_JUMP26", + "R_AARCH64_JUMP_SLOT", + "R_AARCH64_LD64_GOTOFF_LO15", + "R_AARCH64_LD64_GOTPAGE_LO15", + "R_AARCH64_LD64_GOT_LO12_NC", + "R_AARCH64_LDST128_ABS_LO12_NC", + "R_AARCH64_LDST16_ABS_LO12_NC", + "R_AARCH64_LDST32_ABS_LO12_NC", + "R_AARCH64_LDST64_ABS_LO12_NC", + "R_AARCH64_LDST8_ABS_LO12_NC", + "R_AARCH64_LD_PREL_LO19", + "R_AARCH64_MOVW_SABS_G0", + "R_AARCH64_MOVW_SABS_G1", + "R_AARCH64_MOVW_SABS_G2", + "R_AARCH64_MOVW_UABS_G0", + "R_AARCH64_MOVW_UABS_G0_NC", + "R_AARCH64_MOVW_UABS_G1", + "R_AARCH64_MOVW_UABS_G1_NC", + "R_AARCH64_MOVW_UABS_G2", + "R_AARCH64_MOVW_UABS_G2_NC", + "R_AARCH64_MOVW_UABS_G3", + "R_AARCH64_NONE", + "R_AARCH64_NULL", + "R_AARCH64_P32_ABS16", + "R_AARCH64_P32_ABS32", + "R_AARCH64_P32_ADD_ABS_LO12_NC", + "R_AARCH64_P32_ADR_GOT_PAGE", + "R_AARCH64_P32_ADR_PREL_LO21", + "R_AARCH64_P32_ADR_PREL_PG_HI21", + "R_AARCH64_P32_CALL26", + "R_AARCH64_P32_CONDBR19", + "R_AARCH64_P32_COPY", + "R_AARCH64_P32_GLOB_DAT", + "R_AARCH64_P32_GOT_LD_PREL19", + "R_AARCH64_P32_IRELATIVE", + "R_AARCH64_P32_JUMP26", + "R_AARCH64_P32_JUMP_SLOT", + "R_AARCH64_P32_LD32_GOT_LO12_NC", + "R_AARCH64_P32_LDST128_ABS_LO12_NC", + "R_AARCH64_P32_LDST16_ABS_LO12_NC", + "R_AARCH64_P32_LDST32_ABS_LO12_NC", + "R_AARCH64_P32_LDST64_ABS_LO12_NC", + "R_AARCH64_P32_LDST8_ABS_LO12_NC", + "R_AARCH64_P32_LD_PREL_LO19", + "R_AARCH64_P32_MOVW_SABS_G0", + "R_AARCH64_P32_MOVW_UABS_G0", + "R_AARCH64_P32_MOVW_UABS_G0_NC", + "R_AARCH64_P32_MOVW_UABS_G1", + "R_AARCH64_P32_PREL16", + "R_AARCH64_P32_PREL32", + "R_AARCH64_P32_RELATIVE", + "R_AARCH64_P32_TLSDESC", + "R_AARCH64_P32_TLSDESC_ADD_LO12_NC", + "R_AARCH64_P32_TLSDESC_ADR_PAGE21", + "R_AARCH64_P32_TLSDESC_ADR_PREL21", + "R_AARCH64_P32_TLSDESC_CALL", + "R_AARCH64_P32_TLSDESC_LD32_LO12_NC", + "R_AARCH64_P32_TLSDESC_LD_PREL19", + "R_AARCH64_P32_TLSGD_ADD_LO12_NC", + "R_AARCH64_P32_TLSGD_ADR_PAGE21", + "R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21", + "R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC", + "R_AARCH64_P32_TLSIE_LD_GOTTPREL_PREL19", + "R_AARCH64_P32_TLSLE_ADD_TPREL_HI12", + "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12", + "R_AARCH64_P32_TLSLE_ADD_TPREL_LO12_NC", + "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0", + "R_AARCH64_P32_TLSLE_MOVW_TPREL_G0_NC", + "R_AARCH64_P32_TLSLE_MOVW_TPREL_G1", + "R_AARCH64_P32_TLS_DTPMOD", + "R_AARCH64_P32_TLS_DTPREL", + "R_AARCH64_P32_TLS_TPREL", + "R_AARCH64_P32_TSTBR14", + "R_AARCH64_PREL16", + "R_AARCH64_PREL32", + "R_AARCH64_PREL64", + "R_AARCH64_RELATIVE", + "R_AARCH64_TLSDESC", + "R_AARCH64_TLSDESC_ADD", + "R_AARCH64_TLSDESC_ADD_LO12_NC", + "R_AARCH64_TLSDESC_ADR_PAGE21", + "R_AARCH64_TLSDESC_ADR_PREL21", + "R_AARCH64_TLSDESC_CALL", + "R_AARCH64_TLSDESC_LD64_LO12_NC", + "R_AARCH64_TLSDESC_LDR", + "R_AARCH64_TLSDESC_LD_PREL19", + "R_AARCH64_TLSDESC_OFF_G0_NC", + "R_AARCH64_TLSDESC_OFF_G1", + "R_AARCH64_TLSGD_ADD_LO12_NC", + "R_AARCH64_TLSGD_ADR_PAGE21", + "R_AARCH64_TLSGD_ADR_PREL21", + "R_AARCH64_TLSGD_MOVW_G0_NC", + "R_AARCH64_TLSGD_MOVW_G1", + "R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21", + "R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC", + "R_AARCH64_TLSIE_LD_GOTTPREL_PREL19", + "R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC", + "R_AARCH64_TLSIE_MOVW_GOTTPREL_G1", + "R_AARCH64_TLSLD_ADR_PAGE21", + "R_AARCH64_TLSLD_ADR_PREL21", + "R_AARCH64_TLSLD_LDST128_DTPREL_LO12", + "R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC", + "R_AARCH64_TLSLE_ADD_TPREL_HI12", + "R_AARCH64_TLSLE_ADD_TPREL_LO12", + "R_AARCH64_TLSLE_ADD_TPREL_LO12_NC", + "R_AARCH64_TLSLE_LDST128_TPREL_LO12", + "R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC", + "R_AARCH64_TLSLE_MOVW_TPREL_G0", + "R_AARCH64_TLSLE_MOVW_TPREL_G0_NC", + "R_AARCH64_TLSLE_MOVW_TPREL_G1", + "R_AARCH64_TLSLE_MOVW_TPREL_G1_NC", + "R_AARCH64_TLSLE_MOVW_TPREL_G2", + "R_AARCH64_TLS_DTPMOD64", + "R_AARCH64_TLS_DTPREL64", + "R_AARCH64_TLS_TPREL64", + "R_AARCH64_TSTBR14", + "R_ALPHA", + "R_ALPHA_BRADDR", + "R_ALPHA_COPY", + "R_ALPHA_GLOB_DAT", + "R_ALPHA_GPDISP", + "R_ALPHA_GPREL32", + "R_ALPHA_GPRELHIGH", + "R_ALPHA_GPRELLOW", + "R_ALPHA_GPVALUE", + "R_ALPHA_HINT", + "R_ALPHA_IMMED_BR_HI32", + "R_ALPHA_IMMED_GP_16", + "R_ALPHA_IMMED_GP_HI32", + "R_ALPHA_IMMED_LO32", + "R_ALPHA_IMMED_SCN_HI32", + "R_ALPHA_JMP_SLOT", + "R_ALPHA_LITERAL", + "R_ALPHA_LITUSE", + "R_ALPHA_NONE", + "R_ALPHA_OP_PRSHIFT", + "R_ALPHA_OP_PSUB", + "R_ALPHA_OP_PUSH", + "R_ALPHA_OP_STORE", + "R_ALPHA_REFLONG", + "R_ALPHA_REFQUAD", + "R_ALPHA_RELATIVE", + "R_ALPHA_SREL16", + "R_ALPHA_SREL32", + "R_ALPHA_SREL64", + "R_ARM", + "R_ARM_ABS12", + "R_ARM_ABS16", + "R_ARM_ABS32", + "R_ARM_ABS32_NOI", + "R_ARM_ABS8", + "R_ARM_ALU_PCREL_15_8", + "R_ARM_ALU_PCREL_23_15", + "R_ARM_ALU_PCREL_7_0", + "R_ARM_ALU_PC_G0", + "R_ARM_ALU_PC_G0_NC", + "R_ARM_ALU_PC_G1", + "R_ARM_ALU_PC_G1_NC", + "R_ARM_ALU_PC_G2", + "R_ARM_ALU_SBREL_19_12_NC", + "R_ARM_ALU_SBREL_27_20_CK", + "R_ARM_ALU_SB_G0", + "R_ARM_ALU_SB_G0_NC", + "R_ARM_ALU_SB_G1", + "R_ARM_ALU_SB_G1_NC", + "R_ARM_ALU_SB_G2", + "R_ARM_AMP_VCALL9", + "R_ARM_BASE_ABS", + "R_ARM_CALL", + "R_ARM_COPY", + "R_ARM_GLOB_DAT", + "R_ARM_GNU_VTENTRY", + "R_ARM_GNU_VTINHERIT", + "R_ARM_GOT32", + "R_ARM_GOTOFF", + "R_ARM_GOTOFF12", + "R_ARM_GOTPC", + "R_ARM_GOTRELAX", + "R_ARM_GOT_ABS", + "R_ARM_GOT_BREL12", + "R_ARM_GOT_PREL", + "R_ARM_IRELATIVE", + "R_ARM_JUMP24", + "R_ARM_JUMP_SLOT", + "R_ARM_LDC_PC_G0", + "R_ARM_LDC_PC_G1", + "R_ARM_LDC_PC_G2", + "R_ARM_LDC_SB_G0", + "R_ARM_LDC_SB_G1", + "R_ARM_LDC_SB_G2", + "R_ARM_LDRS_PC_G0", + "R_ARM_LDRS_PC_G1", + "R_ARM_LDRS_PC_G2", + "R_ARM_LDRS_SB_G0", + "R_ARM_LDRS_SB_G1", + "R_ARM_LDRS_SB_G2", + "R_ARM_LDR_PC_G1", + "R_ARM_LDR_PC_G2", + "R_ARM_LDR_SBREL_11_10_NC", + "R_ARM_LDR_SB_G0", + "R_ARM_LDR_SB_G1", + "R_ARM_LDR_SB_G2", + "R_ARM_ME_TOO", + "R_ARM_MOVT_ABS", + "R_ARM_MOVT_BREL", + "R_ARM_MOVT_PREL", + "R_ARM_MOVW_ABS_NC", + "R_ARM_MOVW_BREL", + "R_ARM_MOVW_BREL_NC", + "R_ARM_MOVW_PREL_NC", + "R_ARM_NONE", + "R_ARM_PC13", + "R_ARM_PC24", + "R_ARM_PLT32", + "R_ARM_PLT32_ABS", + "R_ARM_PREL31", + "R_ARM_PRIVATE_0", + "R_ARM_PRIVATE_1", + "R_ARM_PRIVATE_10", + "R_ARM_PRIVATE_11", + "R_ARM_PRIVATE_12", + "R_ARM_PRIVATE_13", + "R_ARM_PRIVATE_14", + "R_ARM_PRIVATE_15", + "R_ARM_PRIVATE_2", + "R_ARM_PRIVATE_3", + "R_ARM_PRIVATE_4", + "R_ARM_PRIVATE_5", + "R_ARM_PRIVATE_6", + "R_ARM_PRIVATE_7", + "R_ARM_PRIVATE_8", + "R_ARM_PRIVATE_9", + "R_ARM_RABS32", + "R_ARM_RBASE", + "R_ARM_REL32", + "R_ARM_REL32_NOI", + "R_ARM_RELATIVE", + "R_ARM_RPC24", + "R_ARM_RREL32", + "R_ARM_RSBREL32", + "R_ARM_RXPC25", + "R_ARM_SBREL31", + "R_ARM_SBREL32", + "R_ARM_SWI24", + "R_ARM_TARGET1", + "R_ARM_TARGET2", + "R_ARM_THM_ABS5", + "R_ARM_THM_ALU_ABS_G0_NC", + "R_ARM_THM_ALU_ABS_G1_NC", + "R_ARM_THM_ALU_ABS_G2_NC", + "R_ARM_THM_ALU_ABS_G3", + "R_ARM_THM_ALU_PREL_11_0", + "R_ARM_THM_GOT_BREL12", + "R_ARM_THM_JUMP11", + "R_ARM_THM_JUMP19", + "R_ARM_THM_JUMP24", + "R_ARM_THM_JUMP6", + "R_ARM_THM_JUMP8", + "R_ARM_THM_MOVT_ABS", + "R_ARM_THM_MOVT_BREL", + "R_ARM_THM_MOVT_PREL", + "R_ARM_THM_MOVW_ABS_NC", + "R_ARM_THM_MOVW_BREL", + "R_ARM_THM_MOVW_BREL_NC", + "R_ARM_THM_MOVW_PREL_NC", + "R_ARM_THM_PC12", + "R_ARM_THM_PC22", + "R_ARM_THM_PC8", + "R_ARM_THM_RPC22", + "R_ARM_THM_SWI8", + "R_ARM_THM_TLS_CALL", + "R_ARM_THM_TLS_DESCSEQ16", + "R_ARM_THM_TLS_DESCSEQ32", + "R_ARM_THM_XPC22", + "R_ARM_TLS_CALL", + "R_ARM_TLS_DESCSEQ", + "R_ARM_TLS_DTPMOD32", + "R_ARM_TLS_DTPOFF32", + "R_ARM_TLS_GD32", + "R_ARM_TLS_GOTDESC", + "R_ARM_TLS_IE12GP", + "R_ARM_TLS_IE32", + "R_ARM_TLS_LDM32", + "R_ARM_TLS_LDO12", + "R_ARM_TLS_LDO32", + "R_ARM_TLS_LE12", + "R_ARM_TLS_LE32", + "R_ARM_TLS_TPOFF32", + "R_ARM_V4BX", + "R_ARM_XPC25", + "R_INFO", + "R_INFO32", + "R_MIPS", + "R_MIPS_16", + "R_MIPS_26", + "R_MIPS_32", + "R_MIPS_64", + "R_MIPS_ADD_IMMEDIATE", + "R_MIPS_CALL16", + "R_MIPS_CALL_HI16", + "R_MIPS_CALL_LO16", + "R_MIPS_DELETE", + "R_MIPS_GOT16", + "R_MIPS_GOT_DISP", + "R_MIPS_GOT_HI16", + "R_MIPS_GOT_LO16", + "R_MIPS_GOT_OFST", + "R_MIPS_GOT_PAGE", + "R_MIPS_GPREL16", + "R_MIPS_GPREL32", + "R_MIPS_HI16", + "R_MIPS_HIGHER", + "R_MIPS_HIGHEST", + "R_MIPS_INSERT_A", + "R_MIPS_INSERT_B", + "R_MIPS_JALR", + "R_MIPS_LITERAL", + "R_MIPS_LO16", + "R_MIPS_NONE", + "R_MIPS_PC16", + "R_MIPS_PJUMP", + "R_MIPS_REL16", + "R_MIPS_REL32", + "R_MIPS_RELGOT", + "R_MIPS_SCN_DISP", + "R_MIPS_SHIFT5", + "R_MIPS_SHIFT6", + "R_MIPS_SUB", + "R_MIPS_TLS_DTPMOD32", + "R_MIPS_TLS_DTPMOD64", + "R_MIPS_TLS_DTPREL32", + "R_MIPS_TLS_DTPREL64", + "R_MIPS_TLS_DTPREL_HI16", + "R_MIPS_TLS_DTPREL_LO16", + "R_MIPS_TLS_GD", + "R_MIPS_TLS_GOTTPREL", + "R_MIPS_TLS_LDM", + "R_MIPS_TLS_TPREL32", + "R_MIPS_TLS_TPREL64", + "R_MIPS_TLS_TPREL_HI16", + "R_MIPS_TLS_TPREL_LO16", + "R_PPC", + "R_PPC64", + "R_PPC64_ADDR14", + "R_PPC64_ADDR14_BRNTAKEN", + "R_PPC64_ADDR14_BRTAKEN", + "R_PPC64_ADDR16", + "R_PPC64_ADDR16_DS", + "R_PPC64_ADDR16_HA", + "R_PPC64_ADDR16_HI", + "R_PPC64_ADDR16_HIGH", + "R_PPC64_ADDR16_HIGHA", + "R_PPC64_ADDR16_HIGHER", + "R_PPC64_ADDR16_HIGHERA", + "R_PPC64_ADDR16_HIGHEST", + "R_PPC64_ADDR16_HIGHESTA", + "R_PPC64_ADDR16_LO", + "R_PPC64_ADDR16_LO_DS", + "R_PPC64_ADDR24", + "R_PPC64_ADDR32", + "R_PPC64_ADDR64", + "R_PPC64_ADDR64_LOCAL", + "R_PPC64_DTPMOD64", + "R_PPC64_DTPREL16", + "R_PPC64_DTPREL16_DS", + "R_PPC64_DTPREL16_HA", + "R_PPC64_DTPREL16_HI", + "R_PPC64_DTPREL16_HIGH", + "R_PPC64_DTPREL16_HIGHA", + "R_PPC64_DTPREL16_HIGHER", + "R_PPC64_DTPREL16_HIGHERA", + "R_PPC64_DTPREL16_HIGHEST", + "R_PPC64_DTPREL16_HIGHESTA", + "R_PPC64_DTPREL16_LO", + "R_PPC64_DTPREL16_LO_DS", + "R_PPC64_DTPREL64", + "R_PPC64_ENTRY", + "R_PPC64_GOT16", + "R_PPC64_GOT16_DS", + "R_PPC64_GOT16_HA", + "R_PPC64_GOT16_HI", + "R_PPC64_GOT16_LO", + "R_PPC64_GOT16_LO_DS", + "R_PPC64_GOT_DTPREL16_DS", + "R_PPC64_GOT_DTPREL16_HA", + "R_PPC64_GOT_DTPREL16_HI", + "R_PPC64_GOT_DTPREL16_LO_DS", + "R_PPC64_GOT_TLSGD16", + "R_PPC64_GOT_TLSGD16_HA", + "R_PPC64_GOT_TLSGD16_HI", + "R_PPC64_GOT_TLSGD16_LO", + "R_PPC64_GOT_TLSLD16", + "R_PPC64_GOT_TLSLD16_HA", + "R_PPC64_GOT_TLSLD16_HI", + "R_PPC64_GOT_TLSLD16_LO", + "R_PPC64_GOT_TPREL16_DS", + "R_PPC64_GOT_TPREL16_HA", + "R_PPC64_GOT_TPREL16_HI", + "R_PPC64_GOT_TPREL16_LO_DS", + "R_PPC64_IRELATIVE", + "R_PPC64_JMP_IREL", + "R_PPC64_JMP_SLOT", + "R_PPC64_NONE", + "R_PPC64_PLT16_LO_DS", + "R_PPC64_PLTGOT16", + "R_PPC64_PLTGOT16_DS", + "R_PPC64_PLTGOT16_HA", + "R_PPC64_PLTGOT16_HI", + "R_PPC64_PLTGOT16_LO", + "R_PPC64_PLTGOT_LO_DS", + "R_PPC64_REL14", + "R_PPC64_REL14_BRNTAKEN", + "R_PPC64_REL14_BRTAKEN", + "R_PPC64_REL16", + "R_PPC64_REL16DX_HA", + "R_PPC64_REL16_HA", + "R_PPC64_REL16_HI", + "R_PPC64_REL16_LO", + "R_PPC64_REL24", + "R_PPC64_REL24_NOTOC", + "R_PPC64_REL32", + "R_PPC64_REL64", + "R_PPC64_SECTOFF_DS", + "R_PPC64_SECTOFF_LO_DS", + "R_PPC64_TLS", + "R_PPC64_TLSGD", + "R_PPC64_TLSLD", + "R_PPC64_TOC", + "R_PPC64_TOC16", + "R_PPC64_TOC16_DS", + "R_PPC64_TOC16_HA", + "R_PPC64_TOC16_HI", + "R_PPC64_TOC16_LO", + "R_PPC64_TOC16_LO_DS", + "R_PPC64_TOCSAVE", + "R_PPC64_TPREL16", + "R_PPC64_TPREL16_DS", + "R_PPC64_TPREL16_HA", + "R_PPC64_TPREL16_HI", + "R_PPC64_TPREL16_HIGH", + "R_PPC64_TPREL16_HIGHA", + "R_PPC64_TPREL16_HIGHER", + "R_PPC64_TPREL16_HIGHERA", + "R_PPC64_TPREL16_HIGHEST", + "R_PPC64_TPREL16_HIGHESTA", + "R_PPC64_TPREL16_LO", + "R_PPC64_TPREL16_LO_DS", + "R_PPC64_TPREL64", + "R_PPC_ADDR14", + "R_PPC_ADDR14_BRNTAKEN", + "R_PPC_ADDR14_BRTAKEN", + "R_PPC_ADDR16", + "R_PPC_ADDR16_HA", + "R_PPC_ADDR16_HI", + "R_PPC_ADDR16_LO", + "R_PPC_ADDR24", + "R_PPC_ADDR32", + "R_PPC_COPY", + "R_PPC_DTPMOD32", + "R_PPC_DTPREL16", + "R_PPC_DTPREL16_HA", + "R_PPC_DTPREL16_HI", + "R_PPC_DTPREL16_LO", + "R_PPC_DTPREL32", + "R_PPC_EMB_BIT_FLD", + "R_PPC_EMB_MRKREF", + "R_PPC_EMB_NADDR16", + "R_PPC_EMB_NADDR16_HA", + "R_PPC_EMB_NADDR16_HI", + "R_PPC_EMB_NADDR16_LO", + "R_PPC_EMB_NADDR32", + "R_PPC_EMB_RELSDA", + "R_PPC_EMB_RELSEC16", + "R_PPC_EMB_RELST_HA", + "R_PPC_EMB_RELST_HI", + "R_PPC_EMB_RELST_LO", + "R_PPC_EMB_SDA21", + "R_PPC_EMB_SDA2I16", + "R_PPC_EMB_SDA2REL", + "R_PPC_EMB_SDAI16", + "R_PPC_GLOB_DAT", + "R_PPC_GOT16", + "R_PPC_GOT16_HA", + "R_PPC_GOT16_HI", + "R_PPC_GOT16_LO", + "R_PPC_GOT_TLSGD16", + "R_PPC_GOT_TLSGD16_HA", + "R_PPC_GOT_TLSGD16_HI", + "R_PPC_GOT_TLSGD16_LO", + "R_PPC_GOT_TLSLD16", + "R_PPC_GOT_TLSLD16_HA", + "R_PPC_GOT_TLSLD16_HI", + "R_PPC_GOT_TLSLD16_LO", + "R_PPC_GOT_TPREL16", + "R_PPC_GOT_TPREL16_HA", + "R_PPC_GOT_TPREL16_HI", + "R_PPC_GOT_TPREL16_LO", + "R_PPC_JMP_SLOT", + "R_PPC_LOCAL24PC", + "R_PPC_NONE", + "R_PPC_PLT16_HA", + "R_PPC_PLT16_HI", + "R_PPC_PLT16_LO", + "R_PPC_PLT32", + "R_PPC_PLTREL24", + "R_PPC_PLTREL32", + "R_PPC_REL14", + "R_PPC_REL14_BRNTAKEN", + "R_PPC_REL14_BRTAKEN", + "R_PPC_REL24", + "R_PPC_REL32", + "R_PPC_RELATIVE", + "R_PPC_SDAREL16", + "R_PPC_SECTOFF", + "R_PPC_SECTOFF_HA", + "R_PPC_SECTOFF_HI", + "R_PPC_SECTOFF_LO", + "R_PPC_TLS", + "R_PPC_TPREL16", + "R_PPC_TPREL16_HA", + "R_PPC_TPREL16_HI", + "R_PPC_TPREL16_LO", + "R_PPC_TPREL32", + "R_PPC_UADDR16", + "R_PPC_UADDR32", + "R_RISCV", + "R_RISCV_32", + "R_RISCV_32_PCREL", + "R_RISCV_64", + "R_RISCV_ADD16", + "R_RISCV_ADD32", + "R_RISCV_ADD64", + "R_RISCV_ADD8", + "R_RISCV_ALIGN", + "R_RISCV_BRANCH", + "R_RISCV_CALL", + "R_RISCV_CALL_PLT", + "R_RISCV_COPY", + "R_RISCV_GNU_VTENTRY", + "R_RISCV_GNU_VTINHERIT", + "R_RISCV_GOT_HI20", + "R_RISCV_GPREL_I", + "R_RISCV_GPREL_S", + "R_RISCV_HI20", + "R_RISCV_JAL", + "R_RISCV_JUMP_SLOT", + "R_RISCV_LO12_I", + "R_RISCV_LO12_S", + "R_RISCV_NONE", + "R_RISCV_PCREL_HI20", + "R_RISCV_PCREL_LO12_I", + "R_RISCV_PCREL_LO12_S", + "R_RISCV_RELATIVE", + "R_RISCV_RELAX", + "R_RISCV_RVC_BRANCH", + "R_RISCV_RVC_JUMP", + "R_RISCV_RVC_LUI", + "R_RISCV_SET16", + "R_RISCV_SET32", + "R_RISCV_SET6", + "R_RISCV_SET8", + "R_RISCV_SUB16", + "R_RISCV_SUB32", + "R_RISCV_SUB6", + "R_RISCV_SUB64", + "R_RISCV_SUB8", + "R_RISCV_TLS_DTPMOD32", + "R_RISCV_TLS_DTPMOD64", + "R_RISCV_TLS_DTPREL32", + "R_RISCV_TLS_DTPREL64", + "R_RISCV_TLS_GD_HI20", + "R_RISCV_TLS_GOT_HI20", + "R_RISCV_TLS_TPREL32", + "R_RISCV_TLS_TPREL64", + "R_RISCV_TPREL_ADD", + "R_RISCV_TPREL_HI20", + "R_RISCV_TPREL_I", + "R_RISCV_TPREL_LO12_I", + "R_RISCV_TPREL_LO12_S", + "R_RISCV_TPREL_S", + "R_SPARC", + "R_SPARC_10", + "R_SPARC_11", + "R_SPARC_13", + "R_SPARC_16", + "R_SPARC_22", + "R_SPARC_32", + "R_SPARC_5", + "R_SPARC_6", + "R_SPARC_64", + "R_SPARC_7", + "R_SPARC_8", + "R_SPARC_COPY", + "R_SPARC_DISP16", + "R_SPARC_DISP32", + "R_SPARC_DISP64", + "R_SPARC_DISP8", + "R_SPARC_GLOB_DAT", + "R_SPARC_GLOB_JMP", + "R_SPARC_GOT10", + "R_SPARC_GOT13", + "R_SPARC_GOT22", + "R_SPARC_H44", + "R_SPARC_HH22", + "R_SPARC_HI22", + "R_SPARC_HIPLT22", + "R_SPARC_HIX22", + "R_SPARC_HM10", + "R_SPARC_JMP_SLOT", + "R_SPARC_L44", + "R_SPARC_LM22", + "R_SPARC_LO10", + "R_SPARC_LOPLT10", + "R_SPARC_LOX10", + "R_SPARC_M44", + "R_SPARC_NONE", + "R_SPARC_OLO10", + "R_SPARC_PC10", + "R_SPARC_PC22", + "R_SPARC_PCPLT10", + "R_SPARC_PCPLT22", + "R_SPARC_PCPLT32", + "R_SPARC_PC_HH22", + "R_SPARC_PC_HM10", + "R_SPARC_PC_LM22", + "R_SPARC_PLT32", + "R_SPARC_PLT64", + "R_SPARC_REGISTER", + "R_SPARC_RELATIVE", + "R_SPARC_UA16", + "R_SPARC_UA32", + "R_SPARC_UA64", + "R_SPARC_WDISP16", + "R_SPARC_WDISP19", + "R_SPARC_WDISP22", + "R_SPARC_WDISP30", + "R_SPARC_WPLT30", + "R_SYM32", + "R_SYM64", + "R_TYPE32", + "R_TYPE64", + "R_X86_64", + "R_X86_64_16", + "R_X86_64_32", + "R_X86_64_32S", + "R_X86_64_64", + "R_X86_64_8", + "R_X86_64_COPY", + "R_X86_64_DTPMOD64", + "R_X86_64_DTPOFF32", + "R_X86_64_DTPOFF64", + "R_X86_64_GLOB_DAT", + "R_X86_64_GOT32", + "R_X86_64_GOT64", + "R_X86_64_GOTOFF64", + "R_X86_64_GOTPC32", + "R_X86_64_GOTPC32_TLSDESC", + "R_X86_64_GOTPC64", + "R_X86_64_GOTPCREL", + "R_X86_64_GOTPCREL64", + "R_X86_64_GOTPCRELX", + "R_X86_64_GOTPLT64", + "R_X86_64_GOTTPOFF", + "R_X86_64_IRELATIVE", + "R_X86_64_JMP_SLOT", + "R_X86_64_NONE", + "R_X86_64_PC16", + "R_X86_64_PC32", + "R_X86_64_PC32_BND", + "R_X86_64_PC64", + "R_X86_64_PC8", + "R_X86_64_PLT32", + "R_X86_64_PLT32_BND", + "R_X86_64_PLTOFF64", + "R_X86_64_RELATIVE", + "R_X86_64_RELATIVE64", + "R_X86_64_REX_GOTPCRELX", + "R_X86_64_SIZE32", + "R_X86_64_SIZE64", + "R_X86_64_TLSDESC", + "R_X86_64_TLSDESC_CALL", + "R_X86_64_TLSGD", + "R_X86_64_TLSLD", + "R_X86_64_TPOFF32", + "R_X86_64_TPOFF64", + "Rel32", + "Rel64", + "Rela32", + "Rela64", + "SHF_ALLOC", + "SHF_COMPRESSED", + "SHF_EXECINSTR", + "SHF_GROUP", + "SHF_INFO_LINK", + "SHF_LINK_ORDER", + "SHF_MASKOS", + "SHF_MASKPROC", + "SHF_MERGE", + "SHF_OS_NONCONFORMING", + "SHF_STRINGS", + "SHF_TLS", + "SHF_WRITE", + "SHN_ABS", + "SHN_COMMON", + "SHN_HIOS", + "SHN_HIPROC", + "SHN_HIRESERVE", + "SHN_LOOS", + "SHN_LOPROC", + "SHN_LORESERVE", + "SHN_UNDEF", + "SHN_XINDEX", + "SHT_DYNAMIC", + "SHT_DYNSYM", + "SHT_FINI_ARRAY", + "SHT_GNU_ATTRIBUTES", + "SHT_GNU_HASH", + "SHT_GNU_LIBLIST", + "SHT_GNU_VERDEF", + "SHT_GNU_VERNEED", + "SHT_GNU_VERSYM", + "SHT_GROUP", + "SHT_HASH", + "SHT_HIOS", + "SHT_HIPROC", + "SHT_HIUSER", + "SHT_INIT_ARRAY", + "SHT_LOOS", + "SHT_LOPROC", + "SHT_LOUSER", + "SHT_NOBITS", + "SHT_NOTE", + "SHT_NULL", + "SHT_PREINIT_ARRAY", + "SHT_PROGBITS", + "SHT_REL", + "SHT_RELA", + "SHT_SHLIB", + "SHT_STRTAB", + "SHT_SYMTAB", + "SHT_SYMTAB_SHNDX", + "STB_GLOBAL", + "STB_HIOS", + "STB_HIPROC", + "STB_LOCAL", + "STB_LOOS", + "STB_LOPROC", + "STB_WEAK", + "STT_COMMON", + "STT_FILE", + "STT_FUNC", + "STT_HIOS", + "STT_HIPROC", + "STT_LOOS", + "STT_LOPROC", + "STT_NOTYPE", + "STT_OBJECT", + "STT_SECTION", + "STT_TLS", + "STV_DEFAULT", + "STV_HIDDEN", + "STV_INTERNAL", + "STV_PROTECTED", + "ST_BIND", + "ST_INFO", + "ST_TYPE", + "ST_VISIBILITY", + "Section", + "Section32", + "Section64", + "SectionFlag", + "SectionHeader", + "SectionIndex", + "SectionType", + "Sym32", + "Sym32Size", + "Sym64", + "Sym64Size", + "SymBind", + "SymType", + "SymVis", + "Symbol", + "Type", + "Version", + }, + "debug/gosym": []string{ + "DecodingError", + "Func", + "LineTable", + "NewLineTable", + "NewTable", + "Obj", + "Sym", + "Table", + "UnknownFileError", + "UnknownLineError", + }, + "debug/macho": []string{ + "ARM64_RELOC_ADDEND", + "ARM64_RELOC_BRANCH26", + "ARM64_RELOC_GOT_LOAD_PAGE21", + "ARM64_RELOC_GOT_LOAD_PAGEOFF12", + "ARM64_RELOC_PAGE21", + "ARM64_RELOC_PAGEOFF12", + "ARM64_RELOC_POINTER_TO_GOT", + "ARM64_RELOC_SUBTRACTOR", + "ARM64_RELOC_TLVP_LOAD_PAGE21", + "ARM64_RELOC_TLVP_LOAD_PAGEOFF12", + "ARM64_RELOC_UNSIGNED", + "ARM_RELOC_BR24", + "ARM_RELOC_HALF", + "ARM_RELOC_HALF_SECTDIFF", + "ARM_RELOC_LOCAL_SECTDIFF", + "ARM_RELOC_PAIR", + "ARM_RELOC_PB_LA_PTR", + "ARM_RELOC_SECTDIFF", + "ARM_RELOC_VANILLA", + "ARM_THUMB_32BIT_BRANCH", + "ARM_THUMB_RELOC_BR22", + "Cpu", + "Cpu386", + "CpuAmd64", + "CpuArm", + "CpuArm64", + "CpuPpc", + "CpuPpc64", + "Dylib", + "DylibCmd", + "Dysymtab", + "DysymtabCmd", + "ErrNotFat", + "FatArch", + "FatArchHeader", + "FatFile", + "File", + "FileHeader", + "FlagAllModsBound", + "FlagAllowStackExecution", + "FlagAppExtensionSafe", + "FlagBindAtLoad", + "FlagBindsToWeak", + "FlagCanonical", + "FlagDeadStrippableDylib", + "FlagDyldLink", + "FlagForceFlat", + "FlagHasTLVDescriptors", + "FlagIncrLink", + "FlagLazyInit", + "FlagNoFixPrebinding", + "FlagNoHeapExecution", + "FlagNoMultiDefs", + "FlagNoReexportedDylibs", + "FlagNoUndefs", + "FlagPIE", + "FlagPrebindable", + "FlagPrebound", + "FlagRootSafe", + "FlagSetuidSafe", + "FlagSplitSegs", + "FlagSubsectionsViaSymbols", + "FlagTwoLevel", + "FlagWeakDefines", + "FormatError", + "GENERIC_RELOC_LOCAL_SECTDIFF", + "GENERIC_RELOC_PAIR", + "GENERIC_RELOC_PB_LA_PTR", + "GENERIC_RELOC_SECTDIFF", + "GENERIC_RELOC_TLV", + "GENERIC_RELOC_VANILLA", + "Load", + "LoadBytes", + "LoadCmd", + "LoadCmdDylib", + "LoadCmdDylinker", + "LoadCmdDysymtab", + "LoadCmdRpath", + "LoadCmdSegment", + "LoadCmdSegment64", + "LoadCmdSymtab", + "LoadCmdThread", + "LoadCmdUnixThread", + "Magic32", + "Magic64", + "MagicFat", + "NewFatFile", + "NewFile", + "Nlist32", + "Nlist64", + "Open", + "OpenFat", + "Regs386", + "RegsAMD64", + "Reloc", + "RelocTypeARM", + "RelocTypeARM64", + "RelocTypeGeneric", + "RelocTypeX86_64", + "Rpath", + "RpathCmd", + "Section", + "Section32", + "Section64", + "SectionHeader", + "Segment", + "Segment32", + "Segment64", + "SegmentHeader", + "Symbol", + "Symtab", + "SymtabCmd", + "Thread", + "Type", + "TypeBundle", + "TypeDylib", + "TypeExec", + "TypeObj", + "X86_64_RELOC_BRANCH", + "X86_64_RELOC_GOT", + "X86_64_RELOC_GOT_LOAD", + "X86_64_RELOC_SIGNED", + "X86_64_RELOC_SIGNED_1", + "X86_64_RELOC_SIGNED_2", + "X86_64_RELOC_SIGNED_4", + "X86_64_RELOC_SUBTRACTOR", + "X86_64_RELOC_TLV", + "X86_64_RELOC_UNSIGNED", + }, + "debug/pe": []string{ + "COFFSymbol", + "COFFSymbolSize", + "DataDirectory", + "File", + "FileHeader", + "FormatError", + "IMAGE_DIRECTORY_ENTRY_ARCHITECTURE", + "IMAGE_DIRECTORY_ENTRY_BASERELOC", + "IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT", + "IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR", + "IMAGE_DIRECTORY_ENTRY_DEBUG", + "IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT", + "IMAGE_DIRECTORY_ENTRY_EXCEPTION", + "IMAGE_DIRECTORY_ENTRY_EXPORT", + "IMAGE_DIRECTORY_ENTRY_GLOBALPTR", + "IMAGE_DIRECTORY_ENTRY_IAT", + "IMAGE_DIRECTORY_ENTRY_IMPORT", + "IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG", + "IMAGE_DIRECTORY_ENTRY_RESOURCE", + "IMAGE_DIRECTORY_ENTRY_SECURITY", + "IMAGE_DIRECTORY_ENTRY_TLS", + "IMAGE_FILE_MACHINE_AM33", + "IMAGE_FILE_MACHINE_AMD64", + "IMAGE_FILE_MACHINE_ARM", + "IMAGE_FILE_MACHINE_ARM64", + "IMAGE_FILE_MACHINE_ARMNT", + "IMAGE_FILE_MACHINE_EBC", + "IMAGE_FILE_MACHINE_I386", + "IMAGE_FILE_MACHINE_IA64", + "IMAGE_FILE_MACHINE_M32R", + "IMAGE_FILE_MACHINE_MIPS16", + "IMAGE_FILE_MACHINE_MIPSFPU", + "IMAGE_FILE_MACHINE_MIPSFPU16", + "IMAGE_FILE_MACHINE_POWERPC", + "IMAGE_FILE_MACHINE_POWERPCFP", + "IMAGE_FILE_MACHINE_R4000", + "IMAGE_FILE_MACHINE_SH3", + "IMAGE_FILE_MACHINE_SH3DSP", + "IMAGE_FILE_MACHINE_SH4", + "IMAGE_FILE_MACHINE_SH5", + "IMAGE_FILE_MACHINE_THUMB", + "IMAGE_FILE_MACHINE_UNKNOWN", + "IMAGE_FILE_MACHINE_WCEMIPSV2", + "ImportDirectory", + "NewFile", + "Open", + "OptionalHeader32", + "OptionalHeader64", + "Reloc", + "Section", + "SectionHeader", + "SectionHeader32", + "StringTable", + "Symbol", + }, + "debug/plan9obj": []string{ + "File", + "FileHeader", + "Magic386", + "Magic64", + "MagicAMD64", + "MagicARM", + "NewFile", + "Open", + "Section", + "SectionHeader", + "Sym", + }, + "encoding": []string{ + "BinaryMarshaler", + "BinaryUnmarshaler", + "TextMarshaler", + "TextUnmarshaler", + }, + "encoding/ascii85": []string{ + "CorruptInputError", + "Decode", + "Encode", + "MaxEncodedLen", + "NewDecoder", + "NewEncoder", + }, + "encoding/asn1": []string{ + "BitString", + "ClassApplication", + "ClassContextSpecific", + "ClassPrivate", + "ClassUniversal", + "Enumerated", + "Flag", + "Marshal", + "MarshalWithParams", + "NullBytes", + "NullRawValue", + "ObjectIdentifier", + "RawContent", + "RawValue", + "StructuralError", + "SyntaxError", + "TagBMPString", + "TagBitString", + "TagBoolean", + "TagEnum", + "TagGeneralString", + "TagGeneralizedTime", + "TagIA5String", + "TagInteger", + "TagNull", + "TagNumericString", + "TagOID", + "TagOctetString", + "TagPrintableString", + "TagSequence", + "TagSet", + "TagT61String", + "TagUTCTime", + "TagUTF8String", + "Unmarshal", + "UnmarshalWithParams", + }, + "encoding/base32": []string{ + "CorruptInputError", + "Encoding", + "HexEncoding", + "NewDecoder", + "NewEncoder", + "NewEncoding", + "NoPadding", + "StdEncoding", + "StdPadding", + }, + "encoding/base64": []string{ + "CorruptInputError", + "Encoding", + "NewDecoder", + "NewEncoder", + "NewEncoding", + "NoPadding", + "RawStdEncoding", + "RawURLEncoding", + "StdEncoding", + "StdPadding", + "URLEncoding", + }, + "encoding/binary": []string{ + "BigEndian", + "ByteOrder", + "LittleEndian", + "MaxVarintLen16", + "MaxVarintLen32", + "MaxVarintLen64", + "PutUvarint", + "PutVarint", + "Read", + "ReadUvarint", + "ReadVarint", + "Size", + "Uvarint", + "Varint", + "Write", + }, + "encoding/csv": []string{ + "ErrBareQuote", + "ErrFieldCount", + "ErrQuote", + "ErrTrailingComma", + "NewReader", + "NewWriter", + "ParseError", + "Reader", + "Writer", + }, + "encoding/gob": []string{ + "CommonType", + "Decoder", + "Encoder", + "GobDecoder", + "GobEncoder", + "NewDecoder", + "NewEncoder", + "Register", + "RegisterName", + }, + "encoding/hex": []string{ + "Decode", + "DecodeString", + "DecodedLen", + "Dump", + "Dumper", + "Encode", + "EncodeToString", + "EncodedLen", + "ErrLength", + "InvalidByteError", + "NewDecoder", + "NewEncoder", + }, + "encoding/json": []string{ + "Compact", + "Decoder", + "Delim", + "Encoder", + "HTMLEscape", + "Indent", + "InvalidUTF8Error", + "InvalidUnmarshalError", + "Marshal", + "MarshalIndent", + "Marshaler", + "MarshalerError", + "NewDecoder", + "NewEncoder", + "Number", + "RawMessage", + "SyntaxError", + "Token", + "Unmarshal", + "UnmarshalFieldError", + "UnmarshalTypeError", + "Unmarshaler", + "UnsupportedTypeError", + "UnsupportedValueError", + "Valid", + }, + "encoding/pem": []string{ + "Block", + "Decode", + "Encode", + "EncodeToMemory", + }, + "encoding/xml": []string{ + "Attr", + "CharData", + "Comment", + "CopyToken", + "Decoder", + "Directive", + "Encoder", + "EndElement", + "Escape", + "EscapeText", + "HTMLAutoClose", + "HTMLEntity", + "Header", + "Marshal", + "MarshalIndent", + "Marshaler", + "MarshalerAttr", + "Name", + "NewDecoder", + "NewEncoder", + "NewTokenDecoder", + "ProcInst", + "StartElement", + "SyntaxError", + "TagPathError", + "Token", + "TokenReader", + "Unmarshal", + "UnmarshalError", + "Unmarshaler", + "UnmarshalerAttr", + "UnsupportedTypeError", + }, + "errors": []string{ + "As", + "Is", + "New", + "Unwrap", + }, + "expvar": []string{ + "Do", + "Float", + "Func", + "Get", + "Handler", + "Int", + "KeyValue", + "Map", + "NewFloat", + "NewInt", + "NewMap", + "NewString", + "Publish", + "String", + "Var", + }, + "flag": []string{ + "Arg", + "Args", + "Bool", + "BoolVar", + "CommandLine", + "ContinueOnError", + "Duration", + "DurationVar", + "ErrHelp", + "ErrorHandling", + "ExitOnError", + "Flag", + "FlagSet", + "Float64", + "Float64Var", + "Getter", + "Int", + "Int64", + "Int64Var", + "IntVar", + "Lookup", + "NArg", + "NFlag", + "NewFlagSet", + "PanicOnError", + "Parse", + "Parsed", + "PrintDefaults", + "Set", + "String", + "StringVar", + "Uint", + "Uint64", + "Uint64Var", + "UintVar", + "UnquoteUsage", + "Usage", + "Value", + "Var", + "Visit", + "VisitAll", + }, + "fmt": []string{ + "Errorf", + "Formatter", + "Fprint", + "Fprintf", + "Fprintln", + "Fscan", + "Fscanf", + "Fscanln", + "GoStringer", + "Print", + "Printf", + "Println", + "Scan", + "ScanState", + "Scanf", + "Scanln", + "Scanner", + "Sprint", + "Sprintf", + "Sprintln", + "Sscan", + "Sscanf", + "Sscanln", + "State", + "Stringer", + }, + "go/ast": []string{ + "ArrayType", + "AssignStmt", + "Bad", + "BadDecl", + "BadExpr", + "BadStmt", + "BasicLit", + "BinaryExpr", + "BlockStmt", + "BranchStmt", + "CallExpr", + "CaseClause", + "ChanDir", + "ChanType", + "CommClause", + "Comment", + "CommentGroup", + "CommentMap", + "CompositeLit", + "Con", + "Decl", + "DeclStmt", + "DeferStmt", + "Ellipsis", + "EmptyStmt", + "Expr", + "ExprStmt", + "Field", + "FieldFilter", + "FieldList", + "File", + "FileExports", + "Filter", + "FilterDecl", + "FilterFile", + "FilterFuncDuplicates", + "FilterImportDuplicates", + "FilterPackage", + "FilterUnassociatedComments", + "ForStmt", + "Fprint", + "Fun", + "FuncDecl", + "FuncLit", + "FuncType", + "GenDecl", + "GoStmt", + "Ident", + "IfStmt", + "ImportSpec", + "Importer", + "IncDecStmt", + "IndexExpr", + "Inspect", + "InterfaceType", + "IsExported", + "KeyValueExpr", + "LabeledStmt", + "Lbl", + "MapType", + "MergeMode", + "MergePackageFiles", + "NewCommentMap", + "NewIdent", + "NewObj", + "NewPackage", + "NewScope", + "Node", + "NotNilFilter", + "ObjKind", + "Object", + "Package", + "PackageExports", + "ParenExpr", + "Pkg", + "Print", + "RECV", + "RangeStmt", + "ReturnStmt", + "SEND", + "Scope", + "SelectStmt", + "SelectorExpr", + "SendStmt", + "SliceExpr", + "SortImports", + "Spec", + "StarExpr", + "Stmt", + "StructType", + "SwitchStmt", + "Typ", + "TypeAssertExpr", + "TypeSpec", + "TypeSwitchStmt", + "UnaryExpr", + "ValueSpec", + "Var", + "Visitor", + "Walk", + }, + "go/build": []string{ + "AllowBinary", + "ArchChar", + "Context", + "Default", + "FindOnly", + "IgnoreVendor", + "Import", + "ImportComment", + "ImportDir", + "ImportMode", + "IsLocalImport", + "MultiplePackageError", + "NoGoError", + "Package", + "ToolDir", + }, + "go/constant": []string{ + "BinaryOp", + "BitLen", + "Bool", + "BoolVal", + "Bytes", + "Compare", + "Complex", + "Denom", + "Float", + "Float32Val", + "Float64Val", + "Imag", + "Int", + "Int64Val", + "Kind", + "Make", + "MakeBool", + "MakeFloat64", + "MakeFromBytes", + "MakeFromLiteral", + "MakeImag", + "MakeInt64", + "MakeString", + "MakeUint64", + "MakeUnknown", + "Num", + "Real", + "Shift", + "Sign", + "String", + "StringVal", + "ToComplex", + "ToFloat", + "ToInt", + "Uint64Val", + "UnaryOp", + "Unknown", + "Val", + "Value", + }, + "go/doc": []string{ + "AllDecls", + "AllMethods", + "Example", + "Examples", + "Filter", + "Func", + "IllegalPrefixes", + "IsPredeclared", + "Mode", + "New", + "NewFromFiles", + "Note", + "Package", + "PreserveAST", + "Synopsis", + "ToHTML", + "ToText", + "Type", + "Value", + }, + "go/format": []string{ + "Node", + "Source", + }, + "go/importer": []string{ + "Default", + "For", + "ForCompiler", + "Lookup", + }, + "go/parser": []string{ + "AllErrors", + "DeclarationErrors", + "ImportsOnly", + "Mode", + "PackageClauseOnly", + "ParseComments", + "ParseDir", + "ParseExpr", + "ParseExprFrom", + "ParseFile", + "SpuriousErrors", + "Trace", + }, + "go/printer": []string{ + "CommentedNode", + "Config", + "Fprint", + "Mode", + "RawFormat", + "SourcePos", + "TabIndent", + "UseSpaces", + }, + "go/scanner": []string{ + "Error", + "ErrorHandler", + "ErrorList", + "Mode", + "PrintError", + "ScanComments", + "Scanner", + }, + "go/token": []string{ + "ADD", + "ADD_ASSIGN", + "AND", + "AND_ASSIGN", + "AND_NOT", + "AND_NOT_ASSIGN", + "ARROW", + "ASSIGN", + "BREAK", + "CASE", + "CHAN", + "CHAR", + "COLON", + "COMMA", + "COMMENT", + "CONST", + "CONTINUE", + "DEC", + "DEFAULT", + "DEFER", + "DEFINE", + "ELLIPSIS", + "ELSE", + "EOF", + "EQL", + "FALLTHROUGH", + "FLOAT", + "FOR", + "FUNC", + "File", + "FileSet", + "GEQ", + "GO", + "GOTO", + "GTR", + "HighestPrec", + "IDENT", + "IF", + "ILLEGAL", + "IMAG", + "IMPORT", + "INC", + "INT", + "INTERFACE", + "IsExported", + "IsIdentifier", + "IsKeyword", + "LAND", + "LBRACE", + "LBRACK", + "LEQ", + "LOR", + "LPAREN", + "LSS", + "Lookup", + "LowestPrec", + "MAP", + "MUL", + "MUL_ASSIGN", + "NEQ", + "NOT", + "NewFileSet", + "NoPos", + "OR", + "OR_ASSIGN", + "PACKAGE", + "PERIOD", + "Pos", + "Position", + "QUO", + "QUO_ASSIGN", + "RANGE", + "RBRACE", + "RBRACK", + "REM", + "REM_ASSIGN", + "RETURN", + "RPAREN", + "SELECT", + "SEMICOLON", + "SHL", + "SHL_ASSIGN", + "SHR", + "SHR_ASSIGN", + "STRING", + "STRUCT", + "SUB", + "SUB_ASSIGN", + "SWITCH", + "TYPE", + "Token", + "UnaryPrec", + "VAR", + "XOR", + "XOR_ASSIGN", + }, + "go/types": []string{ + "Array", + "AssertableTo", + "AssignableTo", + "Basic", + "BasicInfo", + "BasicKind", + "Bool", + "Builtin", + "Byte", + "Chan", + "ChanDir", + "CheckExpr", + "Checker", + "Comparable", + "Complex128", + "Complex64", + "Config", + "Const", + "ConvertibleTo", + "DefPredeclaredTestFuncs", + "Default", + "Error", + "Eval", + "ExprString", + "FieldVal", + "Float32", + "Float64", + "Func", + "Id", + "Identical", + "IdenticalIgnoreTags", + "Implements", + "ImportMode", + "Importer", + "ImporterFrom", + "Info", + "Initializer", + "Int", + "Int16", + "Int32", + "Int64", + "Int8", + "Interface", + "Invalid", + "IsBoolean", + "IsComplex", + "IsConstType", + "IsFloat", + "IsInteger", + "IsInterface", + "IsNumeric", + "IsOrdered", + "IsString", + "IsUnsigned", + "IsUntyped", + "Label", + "LookupFieldOrMethod", + "Map", + "MethodExpr", + "MethodSet", + "MethodVal", + "MissingMethod", + "Named", + "NewArray", + "NewChan", + "NewChecker", + "NewConst", + "NewField", + "NewFunc", + "NewInterface", + "NewInterfaceType", + "NewLabel", + "NewMap", + "NewMethodSet", + "NewNamed", + "NewPackage", + "NewParam", + "NewPkgName", + "NewPointer", + "NewScope", + "NewSignature", + "NewSlice", + "NewStruct", + "NewTuple", + "NewTypeName", + "NewVar", + "Nil", + "Object", + "ObjectString", + "Package", + "PkgName", + "Pointer", + "Qualifier", + "RecvOnly", + "RelativeTo", + "Rune", + "Scope", + "Selection", + "SelectionKind", + "SelectionString", + "SendOnly", + "SendRecv", + "Signature", + "Sizes", + "SizesFor", + "Slice", + "StdSizes", + "String", + "Struct", + "Tuple", + "Typ", + "Type", + "TypeAndValue", + "TypeName", + "TypeString", + "Uint", + "Uint16", + "Uint32", + "Uint64", + "Uint8", + "Uintptr", + "Universe", + "Unsafe", + "UnsafePointer", + "UntypedBool", + "UntypedComplex", + "UntypedFloat", + "UntypedInt", + "UntypedNil", + "UntypedRune", + "UntypedString", + "Var", + "WriteExpr", + "WriteSignature", + "WriteType", + }, + "hash": []string{ + "Hash", + "Hash32", + "Hash64", + }, + "hash/adler32": []string{ + "Checksum", + "New", + "Size", + }, + "hash/crc32": []string{ + "Castagnoli", + "Checksum", + "ChecksumIEEE", + "IEEE", + "IEEETable", + "Koopman", + "MakeTable", + "New", + "NewIEEE", + "Size", + "Table", + "Update", + }, + "hash/crc64": []string{ + "Checksum", + "ECMA", + "ISO", + "MakeTable", + "New", + "Size", + "Table", + "Update", + }, + "hash/fnv": []string{ + "New128", + "New128a", + "New32", + "New32a", + "New64", + "New64a", + }, + "hash/maphash": []string{ + "Hash", + "MakeSeed", + "Seed", + }, + "html": []string{ + "EscapeString", + "UnescapeString", + }, + "html/template": []string{ + "CSS", + "ErrAmbigContext", + "ErrBadHTML", + "ErrBranchEnd", + "ErrEndContext", + "ErrNoSuchTemplate", + "ErrOutputContext", + "ErrPartialCharset", + "ErrPartialEscape", + "ErrPredefinedEscaper", + "ErrRangeLoopReentry", + "ErrSlashAmbig", + "Error", + "ErrorCode", + "FuncMap", + "HTML", + "HTMLAttr", + "HTMLEscape", + "HTMLEscapeString", + "HTMLEscaper", + "IsTrue", + "JS", + "JSEscape", + "JSEscapeString", + "JSEscaper", + "JSStr", + "Must", + "New", + "OK", + "ParseFiles", + "ParseGlob", + "Srcset", + "Template", + "URL", + "URLQueryEscaper", + }, + "image": []string{ + "Alpha", + "Alpha16", + "Black", + "CMYK", + "Config", + "Decode", + "DecodeConfig", + "ErrFormat", + "Gray", + "Gray16", + "Image", + "NRGBA", + "NRGBA64", + "NYCbCrA", + "NewAlpha", + "NewAlpha16", + "NewCMYK", + "NewGray", + "NewGray16", + "NewNRGBA", + "NewNRGBA64", + "NewNYCbCrA", + "NewPaletted", + "NewRGBA", + "NewRGBA64", + "NewUniform", + "NewYCbCr", + "Opaque", + "Paletted", + "PalettedImage", + "Point", + "Pt", + "RGBA", + "RGBA64", + "Rect", + "Rectangle", + "RegisterFormat", + "Transparent", + "Uniform", + "White", + "YCbCr", + "YCbCrSubsampleRatio", + "YCbCrSubsampleRatio410", + "YCbCrSubsampleRatio411", + "YCbCrSubsampleRatio420", + "YCbCrSubsampleRatio422", + "YCbCrSubsampleRatio440", + "YCbCrSubsampleRatio444", + "ZP", + "ZR", + }, + "image/color": []string{ + "Alpha", + "Alpha16", + "Alpha16Model", + "AlphaModel", + "Black", + "CMYK", + "CMYKModel", + "CMYKToRGB", + "Color", + "Gray", + "Gray16", + "Gray16Model", + "GrayModel", + "Model", + "ModelFunc", + "NRGBA", + "NRGBA64", + "NRGBA64Model", + "NRGBAModel", + "NYCbCrA", + "NYCbCrAModel", + "Opaque", + "Palette", + "RGBA", + "RGBA64", + "RGBA64Model", + "RGBAModel", + "RGBToCMYK", + "RGBToYCbCr", + "Transparent", + "White", + "YCbCr", + "YCbCrModel", + "YCbCrToRGB", + }, + "image/color/palette": []string{ + "Plan9", + "WebSafe", + }, + "image/draw": []string{ + "Draw", + "DrawMask", + "Drawer", + "FloydSteinberg", + "Image", + "Op", + "Over", + "Quantizer", + "Src", + }, + "image/gif": []string{ + "Decode", + "DecodeAll", + "DecodeConfig", + "DisposalBackground", + "DisposalNone", + "DisposalPrevious", + "Encode", + "EncodeAll", + "GIF", + "Options", + }, + "image/jpeg": []string{ + "Decode", + "DecodeConfig", + "DefaultQuality", + "Encode", + "FormatError", + "Options", + "Reader", + "UnsupportedError", + }, + "image/png": []string{ + "BestCompression", + "BestSpeed", + "CompressionLevel", + "Decode", + "DecodeConfig", + "DefaultCompression", + "Encode", + "Encoder", + "EncoderBuffer", + "EncoderBufferPool", + "FormatError", + "NoCompression", + "UnsupportedError", + }, + "index/suffixarray": []string{ + "Index", + "New", + }, + "io": []string{ + "ByteReader", + "ByteScanner", + "ByteWriter", + "Closer", + "Copy", + "CopyBuffer", + "CopyN", + "EOF", + "ErrClosedPipe", + "ErrNoProgress", + "ErrShortBuffer", + "ErrShortWrite", + "ErrUnexpectedEOF", + "LimitReader", + "LimitedReader", + "MultiReader", + "MultiWriter", + "NewSectionReader", + "Pipe", + "PipeReader", + "PipeWriter", + "ReadAtLeast", + "ReadCloser", + "ReadFull", + "ReadSeeker", + "ReadWriteCloser", + "ReadWriteSeeker", + "ReadWriter", + "Reader", + "ReaderAt", + "ReaderFrom", + "RuneReader", + "RuneScanner", + "SectionReader", + "SeekCurrent", + "SeekEnd", + "SeekStart", + "Seeker", + "StringWriter", + "TeeReader", + "WriteCloser", + "WriteSeeker", + "WriteString", + "Writer", + "WriterAt", + "WriterTo", + }, + "io/ioutil": []string{ + "Discard", + "NopCloser", + "ReadAll", + "ReadDir", + "ReadFile", + "TempDir", + "TempFile", + "WriteFile", + }, + "log": []string{ + "Fatal", + "Fatalf", + "Fatalln", + "Flags", + "LUTC", + "Ldate", + "Llongfile", + "Lmicroseconds", + "Lmsgprefix", + "Logger", + "Lshortfile", + "LstdFlags", + "Ltime", + "New", + "Output", + "Panic", + "Panicf", + "Panicln", + "Prefix", + "Print", + "Printf", + "Println", + "SetFlags", + "SetOutput", + "SetPrefix", + "Writer", + }, + "log/syslog": []string{ + "Dial", + "LOG_ALERT", + "LOG_AUTH", + "LOG_AUTHPRIV", + "LOG_CRIT", + "LOG_CRON", + "LOG_DAEMON", + "LOG_DEBUG", + "LOG_EMERG", + "LOG_ERR", + "LOG_FTP", + "LOG_INFO", + "LOG_KERN", + "LOG_LOCAL0", + "LOG_LOCAL1", + "LOG_LOCAL2", + "LOG_LOCAL3", + "LOG_LOCAL4", + "LOG_LOCAL5", + "LOG_LOCAL6", + "LOG_LOCAL7", + "LOG_LPR", + "LOG_MAIL", + "LOG_NEWS", + "LOG_NOTICE", + "LOG_SYSLOG", + "LOG_USER", + "LOG_UUCP", + "LOG_WARNING", + "New", + "NewLogger", + "Priority", + "Writer", + }, + "math": []string{ + "Abs", + "Acos", + "Acosh", + "Asin", + "Asinh", + "Atan", + "Atan2", + "Atanh", + "Cbrt", + "Ceil", + "Copysign", + "Cos", + "Cosh", + "Dim", + "E", + "Erf", + "Erfc", + "Erfcinv", + "Erfinv", + "Exp", + "Exp2", + "Expm1", + "FMA", + "Float32bits", + "Float32frombits", + "Float64bits", + "Float64frombits", + "Floor", + "Frexp", + "Gamma", + "Hypot", + "Ilogb", + "Inf", + "IsInf", + "IsNaN", + "J0", + "J1", + "Jn", + "Ldexp", + "Lgamma", + "Ln10", + "Ln2", + "Log", + "Log10", + "Log10E", + "Log1p", + "Log2", + "Log2E", + "Logb", + "Max", + "MaxFloat32", + "MaxFloat64", + "MaxInt16", + "MaxInt32", + "MaxInt64", + "MaxInt8", + "MaxUint16", + "MaxUint32", + "MaxUint64", + "MaxUint8", + "Min", + "MinInt16", + "MinInt32", + "MinInt64", + "MinInt8", + "Mod", + "Modf", + "NaN", + "Nextafter", + "Nextafter32", + "Phi", + "Pi", + "Pow", + "Pow10", + "Remainder", + "Round", + "RoundToEven", + "Signbit", + "Sin", + "Sincos", + "Sinh", + "SmallestNonzeroFloat32", + "SmallestNonzeroFloat64", + "Sqrt", + "Sqrt2", + "SqrtE", + "SqrtPhi", + "SqrtPi", + "Tan", + "Tanh", + "Trunc", + "Y0", + "Y1", + "Yn", + }, + "math/big": []string{ + "Above", + "Accuracy", + "AwayFromZero", + "Below", + "ErrNaN", + "Exact", + "Float", + "Int", + "Jacobi", + "MaxBase", + "MaxExp", + "MaxPrec", + "MinExp", + "NewFloat", + "NewInt", + "NewRat", + "ParseFloat", + "Rat", + "RoundingMode", + "ToNearestAway", + "ToNearestEven", + "ToNegativeInf", + "ToPositiveInf", + "ToZero", + "Word", + }, + "math/bits": []string{ + "Add", + "Add32", + "Add64", + "Div", + "Div32", + "Div64", + "LeadingZeros", + "LeadingZeros16", + "LeadingZeros32", + "LeadingZeros64", + "LeadingZeros8", + "Len", + "Len16", + "Len32", + "Len64", + "Len8", + "Mul", + "Mul32", + "Mul64", + "OnesCount", + "OnesCount16", + "OnesCount32", + "OnesCount64", + "OnesCount8", + "Rem", + "Rem32", + "Rem64", + "Reverse", + "Reverse16", + "Reverse32", + "Reverse64", + "Reverse8", + "ReverseBytes", + "ReverseBytes16", + "ReverseBytes32", + "ReverseBytes64", + "RotateLeft", + "RotateLeft16", + "RotateLeft32", + "RotateLeft64", + "RotateLeft8", + "Sub", + "Sub32", + "Sub64", + "TrailingZeros", + "TrailingZeros16", + "TrailingZeros32", + "TrailingZeros64", + "TrailingZeros8", + "UintSize", + }, + "math/cmplx": []string{ + "Abs", + "Acos", + "Acosh", + "Asin", + "Asinh", + "Atan", + "Atanh", + "Conj", + "Cos", + "Cosh", + "Cot", + "Exp", + "Inf", + "IsInf", + "IsNaN", + "Log", + "Log10", + "NaN", + "Phase", + "Polar", + "Pow", + "Rect", + "Sin", + "Sinh", + "Sqrt", + "Tan", + "Tanh", + }, + "math/rand": []string{ + "ExpFloat64", + "Float32", + "Float64", + "Int", + "Int31", + "Int31n", + "Int63", + "Int63n", + "Intn", + "New", + "NewSource", + "NewZipf", + "NormFloat64", + "Perm", + "Rand", + "Read", + "Seed", + "Shuffle", + "Source", + "Source64", + "Uint32", + "Uint64", + "Zipf", + }, + "mime": []string{ + "AddExtensionType", + "BEncoding", + "ErrInvalidMediaParameter", + "ExtensionsByType", + "FormatMediaType", + "ParseMediaType", + "QEncoding", + "TypeByExtension", + "WordDecoder", + "WordEncoder", + }, + "mime/multipart": []string{ + "ErrMessageTooLarge", + "File", + "FileHeader", + "Form", + "NewReader", + "NewWriter", + "Part", + "Reader", + "Writer", + }, + "mime/quotedprintable": []string{ + "NewReader", + "NewWriter", + "Reader", + "Writer", + }, + "net": []string{ + "Addr", + "AddrError", + "Buffers", + "CIDRMask", + "Conn", + "DNSConfigError", + "DNSError", + "DefaultResolver", + "Dial", + "DialIP", + "DialTCP", + "DialTimeout", + "DialUDP", + "DialUnix", + "Dialer", + "ErrWriteToConnected", + "Error", + "FileConn", + "FileListener", + "FilePacketConn", + "FlagBroadcast", + "FlagLoopback", + "FlagMulticast", + "FlagPointToPoint", + "FlagUp", + "Flags", + "HardwareAddr", + "IP", + "IPAddr", + "IPConn", + "IPMask", + "IPNet", + "IPv4", + "IPv4Mask", + "IPv4allrouter", + "IPv4allsys", + "IPv4bcast", + "IPv4len", + "IPv4zero", + "IPv6interfacelocalallnodes", + "IPv6len", + "IPv6linklocalallnodes", + "IPv6linklocalallrouters", + "IPv6loopback", + "IPv6unspecified", + "IPv6zero", + "Interface", + "InterfaceAddrs", + "InterfaceByIndex", + "InterfaceByName", + "Interfaces", + "InvalidAddrError", + "JoinHostPort", + "Listen", + "ListenConfig", + "ListenIP", + "ListenMulticastUDP", + "ListenPacket", + "ListenTCP", + "ListenUDP", + "ListenUnix", + "ListenUnixgram", + "Listener", + "LookupAddr", + "LookupCNAME", + "LookupHost", + "LookupIP", + "LookupMX", + "LookupNS", + "LookupPort", + "LookupSRV", + "LookupTXT", + "MX", + "NS", + "OpError", + "PacketConn", + "ParseCIDR", + "ParseError", + "ParseIP", + "ParseMAC", + "Pipe", + "ResolveIPAddr", + "ResolveTCPAddr", + "ResolveUDPAddr", + "ResolveUnixAddr", + "Resolver", + "SRV", + "SplitHostPort", + "TCPAddr", + "TCPConn", + "TCPListener", + "UDPAddr", + "UDPConn", + "UnixAddr", + "UnixConn", + "UnixListener", + "UnknownNetworkError", + }, + "net/http": []string{ + "CanonicalHeaderKey", + "Client", + "CloseNotifier", + "ConnState", + "Cookie", + "CookieJar", + "DefaultClient", + "DefaultMaxHeaderBytes", + "DefaultMaxIdleConnsPerHost", + "DefaultServeMux", + "DefaultTransport", + "DetectContentType", + "Dir", + "ErrAbortHandler", + "ErrBodyNotAllowed", + "ErrBodyReadAfterClose", + "ErrContentLength", + "ErrHandlerTimeout", + "ErrHeaderTooLong", + "ErrHijacked", + "ErrLineTooLong", + "ErrMissingBoundary", + "ErrMissingContentLength", + "ErrMissingFile", + "ErrNoCookie", + "ErrNoLocation", + "ErrNotMultipart", + "ErrNotSupported", + "ErrServerClosed", + "ErrShortBody", + "ErrSkipAltProtocol", + "ErrUnexpectedTrailer", + "ErrUseLastResponse", + "ErrWriteAfterFlush", + "Error", + "File", + "FileServer", + "FileSystem", + "Flusher", + "Get", + "Handle", + "HandleFunc", + "Handler", + "HandlerFunc", + "Head", + "Header", + "Hijacker", + "ListenAndServe", + "ListenAndServeTLS", + "LocalAddrContextKey", + "MaxBytesReader", + "MethodConnect", + "MethodDelete", + "MethodGet", + "MethodHead", + "MethodOptions", + "MethodPatch", + "MethodPost", + "MethodPut", + "MethodTrace", + "NewFileTransport", + "NewRequest", + "NewRequestWithContext", + "NewServeMux", + "NoBody", + "NotFound", + "NotFoundHandler", + "ParseHTTPVersion", + "ParseTime", + "Post", + "PostForm", + "ProtocolError", + "ProxyFromEnvironment", + "ProxyURL", + "PushOptions", + "Pusher", + "ReadRequest", + "ReadResponse", + "Redirect", + "RedirectHandler", + "Request", + "Response", + "ResponseWriter", + "RoundTripper", + "SameSite", + "SameSiteDefaultMode", + "SameSiteLaxMode", + "SameSiteNoneMode", + "SameSiteStrictMode", + "Serve", + "ServeContent", + "ServeFile", + "ServeMux", + "ServeTLS", + "Server", + "ServerContextKey", + "SetCookie", + "StateActive", + "StateClosed", + "StateHijacked", + "StateIdle", + "StateNew", + "StatusAccepted", + "StatusAlreadyReported", + "StatusBadGateway", + "StatusBadRequest", + "StatusConflict", + "StatusContinue", + "StatusCreated", + "StatusEarlyHints", + "StatusExpectationFailed", + "StatusFailedDependency", + "StatusForbidden", + "StatusFound", + "StatusGatewayTimeout", + "StatusGone", + "StatusHTTPVersionNotSupported", + "StatusIMUsed", + "StatusInsufficientStorage", + "StatusInternalServerError", + "StatusLengthRequired", + "StatusLocked", + "StatusLoopDetected", + "StatusMethodNotAllowed", + "StatusMisdirectedRequest", + "StatusMovedPermanently", + "StatusMultiStatus", + "StatusMultipleChoices", + "StatusNetworkAuthenticationRequired", + "StatusNoContent", + "StatusNonAuthoritativeInfo", + "StatusNotAcceptable", + "StatusNotExtended", + "StatusNotFound", + "StatusNotImplemented", + "StatusNotModified", + "StatusOK", + "StatusPartialContent", + "StatusPaymentRequired", + "StatusPermanentRedirect", + "StatusPreconditionFailed", + "StatusPreconditionRequired", + "StatusProcessing", + "StatusProxyAuthRequired", + "StatusRequestEntityTooLarge", + "StatusRequestHeaderFieldsTooLarge", + "StatusRequestTimeout", + "StatusRequestURITooLong", + "StatusRequestedRangeNotSatisfiable", + "StatusResetContent", + "StatusSeeOther", + "StatusServiceUnavailable", + "StatusSwitchingProtocols", + "StatusTeapot", + "StatusTemporaryRedirect", + "StatusText", + "StatusTooEarly", + "StatusTooManyRequests", + "StatusUnauthorized", + "StatusUnavailableForLegalReasons", + "StatusUnprocessableEntity", + "StatusUnsupportedMediaType", + "StatusUpgradeRequired", + "StatusUseProxy", + "StatusVariantAlsoNegotiates", + "StripPrefix", + "TimeFormat", + "TimeoutHandler", + "TrailerPrefix", + "Transport", + }, + "net/http/cgi": []string{ + "Handler", + "Request", + "RequestFromMap", + "Serve", + }, + "net/http/cookiejar": []string{ + "Jar", + "New", + "Options", + "PublicSuffixList", + }, + "net/http/fcgi": []string{ + "ErrConnClosed", + "ErrRequestAborted", + "ProcessEnv", + "Serve", + }, + "net/http/httptest": []string{ + "DefaultRemoteAddr", + "NewRecorder", + "NewRequest", + "NewServer", + "NewTLSServer", + "NewUnstartedServer", + "ResponseRecorder", + "Server", + }, + "net/http/httptrace": []string{ + "ClientTrace", + "ContextClientTrace", + "DNSDoneInfo", + "DNSStartInfo", + "GotConnInfo", + "WithClientTrace", + "WroteRequestInfo", + }, + "net/http/httputil": []string{ + "BufferPool", + "ClientConn", + "DumpRequest", + "DumpRequestOut", + "DumpResponse", + "ErrClosed", + "ErrLineTooLong", + "ErrPersistEOF", + "ErrPipeline", + "NewChunkedReader", + "NewChunkedWriter", + "NewClientConn", + "NewProxyClientConn", + "NewServerConn", + "NewSingleHostReverseProxy", + "ReverseProxy", + "ServerConn", + }, + "net/http/pprof": []string{ + "Cmdline", + "Handler", + "Index", + "Profile", + "Symbol", + "Trace", + }, + "net/mail": []string{ + "Address", + "AddressParser", + "ErrHeaderNotPresent", + "Header", + "Message", + "ParseAddress", + "ParseAddressList", + "ParseDate", + "ReadMessage", + }, + "net/rpc": []string{ + "Accept", + "Call", + "Client", + "ClientCodec", + "DefaultDebugPath", + "DefaultRPCPath", + "DefaultServer", + "Dial", + "DialHTTP", + "DialHTTPPath", + "ErrShutdown", + "HandleHTTP", + "NewClient", + "NewClientWithCodec", + "NewServer", + "Register", + "RegisterName", + "Request", + "Response", + "ServeCodec", + "ServeConn", + "ServeRequest", + "Server", + "ServerCodec", + "ServerError", + }, + "net/rpc/jsonrpc": []string{ + "Dial", + "NewClient", + "NewClientCodec", + "NewServerCodec", + "ServeConn", + }, + "net/smtp": []string{ + "Auth", + "CRAMMD5Auth", + "Client", + "Dial", + "NewClient", + "PlainAuth", + "SendMail", + "ServerInfo", + }, + "net/textproto": []string{ + "CanonicalMIMEHeaderKey", + "Conn", + "Dial", + "Error", + "MIMEHeader", + "NewConn", + "NewReader", + "NewWriter", + "Pipeline", + "ProtocolError", + "Reader", + "TrimBytes", + "TrimString", + "Writer", + }, + "net/url": []string{ + "Error", + "EscapeError", + "InvalidHostError", + "Parse", + "ParseQuery", + "ParseRequestURI", + "PathEscape", + "PathUnescape", + "QueryEscape", + "QueryUnescape", + "URL", + "User", + "UserPassword", + "Userinfo", + "Values", + }, + "os": []string{ + "Args", + "Chdir", + "Chmod", + "Chown", + "Chtimes", + "Clearenv", + "Create", + "DevNull", + "Environ", + "ErrClosed", + "ErrExist", + "ErrInvalid", + "ErrNoDeadline", + "ErrNotExist", + "ErrPermission", + "Executable", + "Exit", + "Expand", + "ExpandEnv", + "File", + "FileInfo", + "FileMode", + "FindProcess", + "Getegid", + "Getenv", + "Geteuid", + "Getgid", + "Getgroups", + "Getpagesize", + "Getpid", + "Getppid", + "Getuid", + "Getwd", + "Hostname", + "Interrupt", + "IsExist", + "IsNotExist", + "IsPathSeparator", + "IsPermission", + "IsTimeout", + "Kill", + "Lchown", + "Link", + "LinkError", + "LookupEnv", + "Lstat", + "Mkdir", + "MkdirAll", + "ModeAppend", + "ModeCharDevice", + "ModeDevice", + "ModeDir", + "ModeExclusive", + "ModeIrregular", + "ModeNamedPipe", + "ModePerm", + "ModeSetgid", + "ModeSetuid", + "ModeSocket", + "ModeSticky", + "ModeSymlink", + "ModeTemporary", + "ModeType", + "NewFile", + "NewSyscallError", + "O_APPEND", + "O_CREATE", + "O_EXCL", + "O_RDONLY", + "O_RDWR", + "O_SYNC", + "O_TRUNC", + "O_WRONLY", + "Open", + "OpenFile", + "PathError", + "PathListSeparator", + "PathSeparator", + "Pipe", + "ProcAttr", + "Process", + "ProcessState", + "Readlink", + "Remove", + "RemoveAll", + "Rename", + "SEEK_CUR", + "SEEK_END", + "SEEK_SET", + "SameFile", + "Setenv", + "Signal", + "StartProcess", + "Stat", + "Stderr", + "Stdin", + "Stdout", + "Symlink", + "SyscallError", + "TempDir", + "Truncate", + "Unsetenv", + "UserCacheDir", + "UserConfigDir", + "UserHomeDir", + }, + "os/exec": []string{ + "Cmd", + "Command", + "CommandContext", + "ErrNotFound", + "Error", + "ExitError", + "LookPath", + }, + "os/signal": []string{ + "Ignore", + "Ignored", + "Notify", + "Reset", + "Stop", + }, + "os/user": []string{ + "Current", + "Group", + "Lookup", + "LookupGroup", + "LookupGroupId", + "LookupId", + "UnknownGroupError", + "UnknownGroupIdError", + "UnknownUserError", + "UnknownUserIdError", + "User", + }, + "path": []string{ + "Base", + "Clean", + "Dir", + "ErrBadPattern", + "Ext", + "IsAbs", + "Join", + "Match", + "Split", + }, + "path/filepath": []string{ + "Abs", + "Base", + "Clean", + "Dir", + "ErrBadPattern", + "EvalSymlinks", + "Ext", + "FromSlash", + "Glob", + "HasPrefix", + "IsAbs", + "Join", + "ListSeparator", + "Match", + "Rel", + "Separator", + "SkipDir", + "Split", + "SplitList", + "ToSlash", + "VolumeName", + "Walk", + "WalkFunc", + }, + "plugin": []string{ + "Open", + "Plugin", + "Symbol", + }, + "reflect": []string{ + "Append", + "AppendSlice", + "Array", + "ArrayOf", + "Bool", + "BothDir", + "Chan", + "ChanDir", + "ChanOf", + "Complex128", + "Complex64", + "Copy", + "DeepEqual", + "Float32", + "Float64", + "Func", + "FuncOf", + "Indirect", + "Int", + "Int16", + "Int32", + "Int64", + "Int8", + "Interface", + "Invalid", + "Kind", + "MakeChan", + "MakeFunc", + "MakeMap", + "MakeMapWithSize", + "MakeSlice", + "Map", + "MapIter", + "MapOf", + "Method", + "New", + "NewAt", + "Ptr", + "PtrTo", + "RecvDir", + "Select", + "SelectCase", + "SelectDefault", + "SelectDir", + "SelectRecv", + "SelectSend", + "SendDir", + "Slice", + "SliceHeader", + "SliceOf", + "String", + "StringHeader", + "Struct", + "StructField", + "StructOf", + "StructTag", + "Swapper", + "Type", + "TypeOf", + "Uint", + "Uint16", + "Uint32", + "Uint64", + "Uint8", + "Uintptr", + "UnsafePointer", + "Value", + "ValueError", + "ValueOf", + "Zero", + }, + "regexp": []string{ + "Compile", + "CompilePOSIX", + "Match", + "MatchReader", + "MatchString", + "MustCompile", + "MustCompilePOSIX", + "QuoteMeta", + "Regexp", + }, + "regexp/syntax": []string{ + "ClassNL", + "Compile", + "DotNL", + "EmptyBeginLine", + "EmptyBeginText", + "EmptyEndLine", + "EmptyEndText", + "EmptyNoWordBoundary", + "EmptyOp", + "EmptyOpContext", + "EmptyWordBoundary", + "ErrInternalError", + "ErrInvalidCharClass", + "ErrInvalidCharRange", + "ErrInvalidEscape", + "ErrInvalidNamedCapture", + "ErrInvalidPerlOp", + "ErrInvalidRepeatOp", + "ErrInvalidRepeatSize", + "ErrInvalidUTF8", + "ErrMissingBracket", + "ErrMissingParen", + "ErrMissingRepeatArgument", + "ErrTrailingBackslash", + "ErrUnexpectedParen", + "Error", + "ErrorCode", + "Flags", + "FoldCase", + "Inst", + "InstAlt", + "InstAltMatch", + "InstCapture", + "InstEmptyWidth", + "InstFail", + "InstMatch", + "InstNop", + "InstOp", + "InstRune", + "InstRune1", + "InstRuneAny", + "InstRuneAnyNotNL", + "IsWordChar", + "Literal", + "MatchNL", + "NonGreedy", + "OneLine", + "Op", + "OpAlternate", + "OpAnyChar", + "OpAnyCharNotNL", + "OpBeginLine", + "OpBeginText", + "OpCapture", + "OpCharClass", + "OpConcat", + "OpEmptyMatch", + "OpEndLine", + "OpEndText", + "OpLiteral", + "OpNoMatch", + "OpNoWordBoundary", + "OpPlus", + "OpQuest", + "OpRepeat", + "OpStar", + "OpWordBoundary", + "POSIX", + "Parse", + "Perl", + "PerlX", + "Prog", + "Regexp", + "Simple", + "UnicodeGroups", + "WasDollar", + }, + "runtime": []string{ + "BlockProfile", + "BlockProfileRecord", + "Breakpoint", + "CPUProfile", + "Caller", + "Callers", + "CallersFrames", + "Compiler", + "Error", + "Frame", + "Frames", + "Func", + "FuncForPC", + "GC", + "GOARCH", + "GOMAXPROCS", + "GOOS", + "GOROOT", + "Goexit", + "GoroutineProfile", + "Gosched", + "KeepAlive", + "LockOSThread", + "MemProfile", + "MemProfileRate", + "MemProfileRecord", + "MemStats", + "MutexProfile", + "NumCPU", + "NumCgoCall", + "NumGoroutine", + "ReadMemStats", + "ReadTrace", + "SetBlockProfileRate", + "SetCPUProfileRate", + "SetCgoTraceback", + "SetFinalizer", + "SetMutexProfileFraction", + "Stack", + "StackRecord", + "StartTrace", + "StopTrace", + "ThreadCreateProfile", + "TypeAssertionError", + "UnlockOSThread", + "Version", + }, + "runtime/debug": []string{ + "BuildInfo", + "FreeOSMemory", + "GCStats", + "Module", + "PrintStack", + "ReadBuildInfo", + "ReadGCStats", + "SetGCPercent", + "SetMaxStack", + "SetMaxThreads", + "SetPanicOnFault", + "SetTraceback", + "Stack", + "WriteHeapDump", + }, + "runtime/pprof": []string{ + "Do", + "ForLabels", + "Label", + "LabelSet", + "Labels", + "Lookup", + "NewProfile", + "Profile", + "Profiles", + "SetGoroutineLabels", + "StartCPUProfile", + "StopCPUProfile", + "WithLabels", + "WriteHeapProfile", + }, + "runtime/trace": []string{ + "IsEnabled", + "Log", + "Logf", + "NewTask", + "Region", + "Start", + "StartRegion", + "Stop", + "Task", + "WithRegion", + }, + "sort": []string{ + "Float64Slice", + "Float64s", + "Float64sAreSorted", + "IntSlice", + "Interface", + "Ints", + "IntsAreSorted", + "IsSorted", + "Reverse", + "Search", + "SearchFloat64s", + "SearchInts", + "SearchStrings", + "Slice", + "SliceIsSorted", + "SliceStable", + "Sort", + "Stable", + "StringSlice", + "Strings", + "StringsAreSorted", + }, + "strconv": []string{ + "AppendBool", + "AppendFloat", + "AppendInt", + "AppendQuote", + "AppendQuoteRune", + "AppendQuoteRuneToASCII", + "AppendQuoteRuneToGraphic", + "AppendQuoteToASCII", + "AppendQuoteToGraphic", + "AppendUint", + "Atoi", + "CanBackquote", + "ErrRange", + "ErrSyntax", + "FormatBool", + "FormatFloat", + "FormatInt", + "FormatUint", + "IntSize", + "IsGraphic", + "IsPrint", + "Itoa", + "NumError", + "ParseBool", + "ParseFloat", + "ParseInt", + "ParseUint", + "Quote", + "QuoteRune", + "QuoteRuneToASCII", + "QuoteRuneToGraphic", + "QuoteToASCII", + "QuoteToGraphic", + "Unquote", + "UnquoteChar", + }, + "strings": []string{ + "Builder", + "Compare", + "Contains", + "ContainsAny", + "ContainsRune", + "Count", + "EqualFold", + "Fields", + "FieldsFunc", + "HasPrefix", + "HasSuffix", + "Index", + "IndexAny", + "IndexByte", + "IndexFunc", + "IndexRune", + "Join", + "LastIndex", + "LastIndexAny", + "LastIndexByte", + "LastIndexFunc", + "Map", + "NewReader", + "NewReplacer", + "Reader", + "Repeat", + "Replace", + "ReplaceAll", + "Replacer", + "Split", + "SplitAfter", + "SplitAfterN", + "SplitN", + "Title", + "ToLower", + "ToLowerSpecial", + "ToTitle", + "ToTitleSpecial", + "ToUpper", + "ToUpperSpecial", + "ToValidUTF8", + "Trim", + "TrimFunc", + "TrimLeft", + "TrimLeftFunc", + "TrimPrefix", + "TrimRight", + "TrimRightFunc", + "TrimSpace", + "TrimSuffix", + }, + "sync": []string{ + "Cond", + "Locker", + "Map", + "Mutex", + "NewCond", + "Once", + "Pool", + "RWMutex", + "WaitGroup", + }, + "sync/atomic": []string{ + "AddInt32", + "AddInt64", + "AddUint32", + "AddUint64", + "AddUintptr", + "CompareAndSwapInt32", + "CompareAndSwapInt64", + "CompareAndSwapPointer", + "CompareAndSwapUint32", + "CompareAndSwapUint64", + "CompareAndSwapUintptr", + "LoadInt32", + "LoadInt64", + "LoadPointer", + "LoadUint32", + "LoadUint64", + "LoadUintptr", + "StoreInt32", + "StoreInt64", + "StorePointer", + "StoreUint32", + "StoreUint64", + "StoreUintptr", + "SwapInt32", + "SwapInt64", + "SwapPointer", + "SwapUint32", + "SwapUint64", + "SwapUintptr", + "Value", + }, + "syscall": []string{ + "AF_ALG", + "AF_APPLETALK", + "AF_ARP", + "AF_ASH", + "AF_ATM", + "AF_ATMPVC", + "AF_ATMSVC", + "AF_AX25", + "AF_BLUETOOTH", + "AF_BRIDGE", + "AF_CAIF", + "AF_CAN", + "AF_CCITT", + "AF_CHAOS", + "AF_CNT", + "AF_COIP", + "AF_DATAKIT", + "AF_DECnet", + "AF_DLI", + "AF_E164", + "AF_ECMA", + "AF_ECONET", + "AF_ENCAP", + "AF_FILE", + "AF_HYLINK", + "AF_IEEE80211", + "AF_IEEE802154", + "AF_IMPLINK", + "AF_INET", + "AF_INET6", + "AF_INET6_SDP", + "AF_INET_SDP", + "AF_IPX", + "AF_IRDA", + "AF_ISDN", + "AF_ISO", + "AF_IUCV", + "AF_KEY", + "AF_LAT", + "AF_LINK", + "AF_LLC", + "AF_LOCAL", + "AF_MAX", + "AF_MPLS", + "AF_NATM", + "AF_NDRV", + "AF_NETBEUI", + "AF_NETBIOS", + "AF_NETGRAPH", + "AF_NETLINK", + "AF_NETROM", + "AF_NS", + "AF_OROUTE", + "AF_OSI", + "AF_PACKET", + "AF_PHONET", + "AF_PPP", + "AF_PPPOX", + "AF_PUP", + "AF_RDS", + "AF_RESERVED_36", + "AF_ROSE", + "AF_ROUTE", + "AF_RXRPC", + "AF_SCLUSTER", + "AF_SECURITY", + "AF_SIP", + "AF_SLOW", + "AF_SNA", + "AF_SYSTEM", + "AF_TIPC", + "AF_UNIX", + "AF_UNSPEC", + "AF_VENDOR00", + "AF_VENDOR01", + "AF_VENDOR02", + "AF_VENDOR03", + "AF_VENDOR04", + "AF_VENDOR05", + "AF_VENDOR06", + "AF_VENDOR07", + "AF_VENDOR08", + "AF_VENDOR09", + "AF_VENDOR10", + "AF_VENDOR11", + "AF_VENDOR12", + "AF_VENDOR13", + "AF_VENDOR14", + "AF_VENDOR15", + "AF_VENDOR16", + "AF_VENDOR17", + "AF_VENDOR18", + "AF_VENDOR19", + "AF_VENDOR20", + "AF_VENDOR21", + "AF_VENDOR22", + "AF_VENDOR23", + "AF_VENDOR24", + "AF_VENDOR25", + "AF_VENDOR26", + "AF_VENDOR27", + "AF_VENDOR28", + "AF_VENDOR29", + "AF_VENDOR30", + "AF_VENDOR31", + "AF_VENDOR32", + "AF_VENDOR33", + "AF_VENDOR34", + "AF_VENDOR35", + "AF_VENDOR36", + "AF_VENDOR37", + "AF_VENDOR38", + "AF_VENDOR39", + "AF_VENDOR40", + "AF_VENDOR41", + "AF_VENDOR42", + "AF_VENDOR43", + "AF_VENDOR44", + "AF_VENDOR45", + "AF_VENDOR46", + "AF_VENDOR47", + "AF_WANPIPE", + "AF_X25", + "AI_CANONNAME", + "AI_NUMERICHOST", + "AI_PASSIVE", + "APPLICATION_ERROR", + "ARPHRD_ADAPT", + "ARPHRD_APPLETLK", + "ARPHRD_ARCNET", + "ARPHRD_ASH", + "ARPHRD_ATM", + "ARPHRD_AX25", + "ARPHRD_BIF", + "ARPHRD_CHAOS", + "ARPHRD_CISCO", + "ARPHRD_CSLIP", + "ARPHRD_CSLIP6", + "ARPHRD_DDCMP", + "ARPHRD_DLCI", + "ARPHRD_ECONET", + "ARPHRD_EETHER", + "ARPHRD_ETHER", + "ARPHRD_EUI64", + "ARPHRD_FCAL", + "ARPHRD_FCFABRIC", + "ARPHRD_FCPL", + "ARPHRD_FCPP", + "ARPHRD_FDDI", + "ARPHRD_FRAD", + "ARPHRD_FRELAY", + "ARPHRD_HDLC", + "ARPHRD_HIPPI", + "ARPHRD_HWX25", + "ARPHRD_IEEE1394", + "ARPHRD_IEEE802", + "ARPHRD_IEEE80211", + "ARPHRD_IEEE80211_PRISM", + "ARPHRD_IEEE80211_RADIOTAP", + "ARPHRD_IEEE802154", + "ARPHRD_IEEE802154_PHY", + "ARPHRD_IEEE802_TR", + "ARPHRD_INFINIBAND", + "ARPHRD_IPDDP", + "ARPHRD_IPGRE", + "ARPHRD_IRDA", + "ARPHRD_LAPB", + "ARPHRD_LOCALTLK", + "ARPHRD_LOOPBACK", + "ARPHRD_METRICOM", + "ARPHRD_NETROM", + "ARPHRD_NONE", + "ARPHRD_PIMREG", + "ARPHRD_PPP", + "ARPHRD_PRONET", + "ARPHRD_RAWHDLC", + "ARPHRD_ROSE", + "ARPHRD_RSRVD", + "ARPHRD_SIT", + "ARPHRD_SKIP", + "ARPHRD_SLIP", + "ARPHRD_SLIP6", + "ARPHRD_STRIP", + "ARPHRD_TUNNEL", + "ARPHRD_TUNNEL6", + "ARPHRD_VOID", + "ARPHRD_X25", + "AUTHTYPE_CLIENT", + "AUTHTYPE_SERVER", + "Accept", + "Accept4", + "AcceptEx", + "Access", + "Acct", + "AddrinfoW", + "Adjtime", + "Adjtimex", + "AttachLsf", + "B0", + "B1000000", + "B110", + "B115200", + "B1152000", + "B1200", + "B134", + "B14400", + "B150", + "B1500000", + "B1800", + "B19200", + "B200", + "B2000000", + "B230400", + "B2400", + "B2500000", + "B28800", + "B300", + "B3000000", + "B3500000", + "B38400", + "B4000000", + "B460800", + "B4800", + "B50", + "B500000", + "B57600", + "B576000", + "B600", + "B7200", + "B75", + "B76800", + "B921600", + "B9600", + "BASE_PROTOCOL", + "BIOCFEEDBACK", + "BIOCFLUSH", + "BIOCGBLEN", + "BIOCGDIRECTION", + "BIOCGDIRFILT", + "BIOCGDLT", + "BIOCGDLTLIST", + "BIOCGETBUFMODE", + "BIOCGETIF", + "BIOCGETZMAX", + "BIOCGFEEDBACK", + "BIOCGFILDROP", + "BIOCGHDRCMPLT", + "BIOCGRSIG", + "BIOCGRTIMEOUT", + "BIOCGSEESENT", + "BIOCGSTATS", + "BIOCGSTATSOLD", + "BIOCGTSTAMP", + "BIOCIMMEDIATE", + "BIOCLOCK", + "BIOCPROMISC", + "BIOCROTZBUF", + "BIOCSBLEN", + "BIOCSDIRECTION", + "BIOCSDIRFILT", + "BIOCSDLT", + "BIOCSETBUFMODE", + "BIOCSETF", + "BIOCSETFNR", + "BIOCSETIF", + "BIOCSETWF", + "BIOCSETZBUF", + "BIOCSFEEDBACK", + "BIOCSFILDROP", + "BIOCSHDRCMPLT", + "BIOCSRSIG", + "BIOCSRTIMEOUT", + "BIOCSSEESENT", + "BIOCSTCPF", + "BIOCSTSTAMP", + "BIOCSUDPF", + "BIOCVERSION", + "BPF_A", + "BPF_ABS", + "BPF_ADD", + "BPF_ALIGNMENT", + "BPF_ALIGNMENT32", + "BPF_ALU", + "BPF_AND", + "BPF_B", + "BPF_BUFMODE_BUFFER", + "BPF_BUFMODE_ZBUF", + "BPF_DFLTBUFSIZE", + "BPF_DIRECTION_IN", + "BPF_DIRECTION_OUT", + "BPF_DIV", + "BPF_H", + "BPF_IMM", + "BPF_IND", + "BPF_JA", + "BPF_JEQ", + "BPF_JGE", + "BPF_JGT", + "BPF_JMP", + "BPF_JSET", + "BPF_K", + "BPF_LD", + "BPF_LDX", + "BPF_LEN", + "BPF_LSH", + "BPF_MAJOR_VERSION", + "BPF_MAXBUFSIZE", + "BPF_MAXINSNS", + "BPF_MEM", + "BPF_MEMWORDS", + "BPF_MINBUFSIZE", + "BPF_MINOR_VERSION", + "BPF_MISC", + "BPF_MSH", + "BPF_MUL", + "BPF_NEG", + "BPF_OR", + "BPF_RELEASE", + "BPF_RET", + "BPF_RSH", + "BPF_ST", + "BPF_STX", + "BPF_SUB", + "BPF_TAX", + "BPF_TXA", + "BPF_T_BINTIME", + "BPF_T_BINTIME_FAST", + "BPF_T_BINTIME_MONOTONIC", + "BPF_T_BINTIME_MONOTONIC_FAST", + "BPF_T_FAST", + "BPF_T_FLAG_MASK", + "BPF_T_FORMAT_MASK", + "BPF_T_MICROTIME", + "BPF_T_MICROTIME_FAST", + "BPF_T_MICROTIME_MONOTONIC", + "BPF_T_MICROTIME_MONOTONIC_FAST", + "BPF_T_MONOTONIC", + "BPF_T_MONOTONIC_FAST", + "BPF_T_NANOTIME", + "BPF_T_NANOTIME_FAST", + "BPF_T_NANOTIME_MONOTONIC", + "BPF_T_NANOTIME_MONOTONIC_FAST", + "BPF_T_NONE", + "BPF_T_NORMAL", + "BPF_W", + "BPF_X", + "BRKINT", + "Bind", + "BindToDevice", + "BpfBuflen", + "BpfDatalink", + "BpfHdr", + "BpfHeadercmpl", + "BpfInsn", + "BpfInterface", + "BpfJump", + "BpfProgram", + "BpfStat", + "BpfStats", + "BpfStmt", + "BpfTimeout", + "BpfTimeval", + "BpfVersion", + "BpfZbuf", + "BpfZbufHeader", + "ByHandleFileInformation", + "BytePtrFromString", + "ByteSliceFromString", + "CCR0_FLUSH", + "CERT_CHAIN_POLICY_AUTHENTICODE", + "CERT_CHAIN_POLICY_AUTHENTICODE_TS", + "CERT_CHAIN_POLICY_BASE", + "CERT_CHAIN_POLICY_BASIC_CONSTRAINTS", + "CERT_CHAIN_POLICY_EV", + "CERT_CHAIN_POLICY_MICROSOFT_ROOT", + "CERT_CHAIN_POLICY_NT_AUTH", + "CERT_CHAIN_POLICY_SSL", + "CERT_E_CN_NO_MATCH", + "CERT_E_EXPIRED", + "CERT_E_PURPOSE", + "CERT_E_ROLE", + "CERT_E_UNTRUSTEDROOT", + "CERT_STORE_ADD_ALWAYS", + "CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG", + "CERT_STORE_PROV_MEMORY", + "CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT", + "CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT", + "CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT", + "CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT", + "CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT", + "CERT_TRUST_INVALID_BASIC_CONSTRAINTS", + "CERT_TRUST_INVALID_EXTENSION", + "CERT_TRUST_INVALID_NAME_CONSTRAINTS", + "CERT_TRUST_INVALID_POLICY_CONSTRAINTS", + "CERT_TRUST_IS_CYCLIC", + "CERT_TRUST_IS_EXPLICIT_DISTRUST", + "CERT_TRUST_IS_NOT_SIGNATURE_VALID", + "CERT_TRUST_IS_NOT_TIME_VALID", + "CERT_TRUST_IS_NOT_VALID_FOR_USAGE", + "CERT_TRUST_IS_OFFLINE_REVOCATION", + "CERT_TRUST_IS_REVOKED", + "CERT_TRUST_IS_UNTRUSTED_ROOT", + "CERT_TRUST_NO_ERROR", + "CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY", + "CERT_TRUST_REVOCATION_STATUS_UNKNOWN", + "CFLUSH", + "CLOCAL", + "CLONE_CHILD_CLEARTID", + "CLONE_CHILD_SETTID", + "CLONE_CSIGNAL", + "CLONE_DETACHED", + "CLONE_FILES", + "CLONE_FS", + "CLONE_IO", + "CLONE_NEWIPC", + "CLONE_NEWNET", + "CLONE_NEWNS", + "CLONE_NEWPID", + "CLONE_NEWUSER", + "CLONE_NEWUTS", + "CLONE_PARENT", + "CLONE_PARENT_SETTID", + "CLONE_PID", + "CLONE_PTRACE", + "CLONE_SETTLS", + "CLONE_SIGHAND", + "CLONE_SYSVSEM", + "CLONE_THREAD", + "CLONE_UNTRACED", + "CLONE_VFORK", + "CLONE_VM", + "CPUID_CFLUSH", + "CREAD", + "CREATE_ALWAYS", + "CREATE_NEW", + "CREATE_NEW_PROCESS_GROUP", + "CREATE_UNICODE_ENVIRONMENT", + "CRYPT_DEFAULT_CONTAINER_OPTIONAL", + "CRYPT_DELETEKEYSET", + "CRYPT_MACHINE_KEYSET", + "CRYPT_NEWKEYSET", + "CRYPT_SILENT", + "CRYPT_VERIFYCONTEXT", + "CS5", + "CS6", + "CS7", + "CS8", + "CSIZE", + "CSTART", + "CSTATUS", + "CSTOP", + "CSTOPB", + "CSUSP", + "CTL_MAXNAME", + "CTL_NET", + "CTL_QUERY", + "CTRL_BREAK_EVENT", + "CTRL_CLOSE_EVENT", + "CTRL_C_EVENT", + "CTRL_LOGOFF_EVENT", + "CTRL_SHUTDOWN_EVENT", + "CancelIo", + "CancelIoEx", + "CertAddCertificateContextToStore", + "CertChainContext", + "CertChainElement", + "CertChainPara", + "CertChainPolicyPara", + "CertChainPolicyStatus", + "CertCloseStore", + "CertContext", + "CertCreateCertificateContext", + "CertEnhKeyUsage", + "CertEnumCertificatesInStore", + "CertFreeCertificateChain", + "CertFreeCertificateContext", + "CertGetCertificateChain", + "CertInfo", + "CertOpenStore", + "CertOpenSystemStore", + "CertRevocationCrlInfo", + "CertRevocationInfo", + "CertSimpleChain", + "CertTrustListInfo", + "CertTrustStatus", + "CertUsageMatch", + "CertVerifyCertificateChainPolicy", + "Chdir", + "CheckBpfVersion", + "Chflags", + "Chmod", + "Chown", + "Chroot", + "Clearenv", + "Close", + "CloseHandle", + "CloseOnExec", + "Closesocket", + "CmsgLen", + "CmsgSpace", + "Cmsghdr", + "CommandLineToArgv", + "ComputerName", + "Conn", + "Connect", + "ConnectEx", + "ConvertSidToStringSid", + "ConvertStringSidToSid", + "CopySid", + "Creat", + "CreateDirectory", + "CreateFile", + "CreateFileMapping", + "CreateHardLink", + "CreateIoCompletionPort", + "CreatePipe", + "CreateProcess", + "CreateProcessAsUser", + "CreateSymbolicLink", + "CreateToolhelp32Snapshot", + "Credential", + "CryptAcquireContext", + "CryptGenRandom", + "CryptReleaseContext", + "DIOCBSFLUSH", + "DIOCOSFPFLUSH", + "DLL", + "DLLError", + "DLT_A429", + "DLT_A653_ICM", + "DLT_AIRONET_HEADER", + "DLT_AOS", + "DLT_APPLE_IP_OVER_IEEE1394", + "DLT_ARCNET", + "DLT_ARCNET_LINUX", + "DLT_ATM_CLIP", + "DLT_ATM_RFC1483", + "DLT_AURORA", + "DLT_AX25", + "DLT_AX25_KISS", + "DLT_BACNET_MS_TP", + "DLT_BLUETOOTH_HCI_H4", + "DLT_BLUETOOTH_HCI_H4_WITH_PHDR", + "DLT_CAN20B", + "DLT_CAN_SOCKETCAN", + "DLT_CHAOS", + "DLT_CHDLC", + "DLT_CISCO_IOS", + "DLT_C_HDLC", + "DLT_C_HDLC_WITH_DIR", + "DLT_DBUS", + "DLT_DECT", + "DLT_DOCSIS", + "DLT_DVB_CI", + "DLT_ECONET", + "DLT_EN10MB", + "DLT_EN3MB", + "DLT_ENC", + "DLT_ERF", + "DLT_ERF_ETH", + "DLT_ERF_POS", + "DLT_FC_2", + "DLT_FC_2_WITH_FRAME_DELIMS", + "DLT_FDDI", + "DLT_FLEXRAY", + "DLT_FRELAY", + "DLT_FRELAY_WITH_DIR", + "DLT_GCOM_SERIAL", + "DLT_GCOM_T1E1", + "DLT_GPF_F", + "DLT_GPF_T", + "DLT_GPRS_LLC", + "DLT_GSMTAP_ABIS", + "DLT_GSMTAP_UM", + "DLT_HDLC", + "DLT_HHDLC", + "DLT_HIPPI", + "DLT_IBM_SN", + "DLT_IBM_SP", + "DLT_IEEE802", + "DLT_IEEE802_11", + "DLT_IEEE802_11_RADIO", + "DLT_IEEE802_11_RADIO_AVS", + "DLT_IEEE802_15_4", + "DLT_IEEE802_15_4_LINUX", + "DLT_IEEE802_15_4_NOFCS", + "DLT_IEEE802_15_4_NONASK_PHY", + "DLT_IEEE802_16_MAC_CPS", + "DLT_IEEE802_16_MAC_CPS_RADIO", + "DLT_IPFILTER", + "DLT_IPMB", + "DLT_IPMB_LINUX", + "DLT_IPNET", + "DLT_IPOIB", + "DLT_IPV4", + "DLT_IPV6", + "DLT_IP_OVER_FC", + "DLT_JUNIPER_ATM1", + "DLT_JUNIPER_ATM2", + "DLT_JUNIPER_ATM_CEMIC", + "DLT_JUNIPER_CHDLC", + "DLT_JUNIPER_ES", + "DLT_JUNIPER_ETHER", + "DLT_JUNIPER_FIBRECHANNEL", + "DLT_JUNIPER_FRELAY", + "DLT_JUNIPER_GGSN", + "DLT_JUNIPER_ISM", + "DLT_JUNIPER_MFR", + "DLT_JUNIPER_MLFR", + "DLT_JUNIPER_MLPPP", + "DLT_JUNIPER_MONITOR", + "DLT_JUNIPER_PIC_PEER", + "DLT_JUNIPER_PPP", + "DLT_JUNIPER_PPPOE", + "DLT_JUNIPER_PPPOE_ATM", + "DLT_JUNIPER_SERVICES", + "DLT_JUNIPER_SRX_E2E", + "DLT_JUNIPER_ST", + "DLT_JUNIPER_VP", + "DLT_JUNIPER_VS", + "DLT_LAPB_WITH_DIR", + "DLT_LAPD", + "DLT_LIN", + "DLT_LINUX_EVDEV", + "DLT_LINUX_IRDA", + "DLT_LINUX_LAPD", + "DLT_LINUX_PPP_WITHDIRECTION", + "DLT_LINUX_SLL", + "DLT_LOOP", + "DLT_LTALK", + "DLT_MATCHING_MAX", + "DLT_MATCHING_MIN", + "DLT_MFR", + "DLT_MOST", + "DLT_MPEG_2_TS", + "DLT_MPLS", + "DLT_MTP2", + "DLT_MTP2_WITH_PHDR", + "DLT_MTP3", + "DLT_MUX27010", + "DLT_NETANALYZER", + "DLT_NETANALYZER_TRANSPARENT", + "DLT_NFC_LLCP", + "DLT_NFLOG", + "DLT_NG40", + "DLT_NULL", + "DLT_PCI_EXP", + "DLT_PFLOG", + "DLT_PFSYNC", + "DLT_PPI", + "DLT_PPP", + "DLT_PPP_BSDOS", + "DLT_PPP_ETHER", + "DLT_PPP_PPPD", + "DLT_PPP_SERIAL", + "DLT_PPP_WITH_DIR", + "DLT_PPP_WITH_DIRECTION", + "DLT_PRISM_HEADER", + "DLT_PRONET", + "DLT_RAIF1", + "DLT_RAW", + "DLT_RAWAF_MASK", + "DLT_RIO", + "DLT_SCCP", + "DLT_SITA", + "DLT_SLIP", + "DLT_SLIP_BSDOS", + "DLT_STANAG_5066_D_PDU", + "DLT_SUNATM", + "DLT_SYMANTEC_FIREWALL", + "DLT_TZSP", + "DLT_USB", + "DLT_USB_LINUX", + "DLT_USB_LINUX_MMAPPED", + "DLT_USER0", + "DLT_USER1", + "DLT_USER10", + "DLT_USER11", + "DLT_USER12", + "DLT_USER13", + "DLT_USER14", + "DLT_USER15", + "DLT_USER2", + "DLT_USER3", + "DLT_USER4", + "DLT_USER5", + "DLT_USER6", + "DLT_USER7", + "DLT_USER8", + "DLT_USER9", + "DLT_WIHART", + "DLT_X2E_SERIAL", + "DLT_X2E_XORAYA", + "DNSMXData", + "DNSPTRData", + "DNSRecord", + "DNSSRVData", + "DNSTXTData", + "DNS_INFO_NO_RECORDS", + "DNS_TYPE_A", + "DNS_TYPE_A6", + "DNS_TYPE_AAAA", + "DNS_TYPE_ADDRS", + "DNS_TYPE_AFSDB", + "DNS_TYPE_ALL", + "DNS_TYPE_ANY", + "DNS_TYPE_ATMA", + "DNS_TYPE_AXFR", + "DNS_TYPE_CERT", + "DNS_TYPE_CNAME", + "DNS_TYPE_DHCID", + "DNS_TYPE_DNAME", + "DNS_TYPE_DNSKEY", + "DNS_TYPE_DS", + "DNS_TYPE_EID", + "DNS_TYPE_GID", + "DNS_TYPE_GPOS", + "DNS_TYPE_HINFO", + "DNS_TYPE_ISDN", + "DNS_TYPE_IXFR", + "DNS_TYPE_KEY", + "DNS_TYPE_KX", + "DNS_TYPE_LOC", + "DNS_TYPE_MAILA", + "DNS_TYPE_MAILB", + "DNS_TYPE_MB", + "DNS_TYPE_MD", + "DNS_TYPE_MF", + "DNS_TYPE_MG", + "DNS_TYPE_MINFO", + "DNS_TYPE_MR", + "DNS_TYPE_MX", + "DNS_TYPE_NAPTR", + "DNS_TYPE_NBSTAT", + "DNS_TYPE_NIMLOC", + "DNS_TYPE_NS", + "DNS_TYPE_NSAP", + "DNS_TYPE_NSAPPTR", + "DNS_TYPE_NSEC", + "DNS_TYPE_NULL", + "DNS_TYPE_NXT", + "DNS_TYPE_OPT", + "DNS_TYPE_PTR", + "DNS_TYPE_PX", + "DNS_TYPE_RP", + "DNS_TYPE_RRSIG", + "DNS_TYPE_RT", + "DNS_TYPE_SIG", + "DNS_TYPE_SINK", + "DNS_TYPE_SOA", + "DNS_TYPE_SRV", + "DNS_TYPE_TEXT", + "DNS_TYPE_TKEY", + "DNS_TYPE_TSIG", + "DNS_TYPE_UID", + "DNS_TYPE_UINFO", + "DNS_TYPE_UNSPEC", + "DNS_TYPE_WINS", + "DNS_TYPE_WINSR", + "DNS_TYPE_WKS", + "DNS_TYPE_X25", + "DT_BLK", + "DT_CHR", + "DT_DIR", + "DT_FIFO", + "DT_LNK", + "DT_REG", + "DT_SOCK", + "DT_UNKNOWN", + "DT_WHT", + "DUPLICATE_CLOSE_SOURCE", + "DUPLICATE_SAME_ACCESS", + "DeleteFile", + "DetachLsf", + "DeviceIoControl", + "Dirent", + "DnsNameCompare", + "DnsQuery", + "DnsRecordListFree", + "DnsSectionAdditional", + "DnsSectionAnswer", + "DnsSectionAuthority", + "DnsSectionQuestion", + "Dup", + "Dup2", + "Dup3", + "DuplicateHandle", + "E2BIG", + "EACCES", + "EADDRINUSE", + "EADDRNOTAVAIL", + "EADV", + "EAFNOSUPPORT", + "EAGAIN", + "EALREADY", + "EAUTH", + "EBADARCH", + "EBADE", + "EBADEXEC", + "EBADF", + "EBADFD", + "EBADMACHO", + "EBADMSG", + "EBADR", + "EBADRPC", + "EBADRQC", + "EBADSLT", + "EBFONT", + "EBUSY", + "ECANCELED", + "ECAPMODE", + "ECHILD", + "ECHO", + "ECHOCTL", + "ECHOE", + "ECHOK", + "ECHOKE", + "ECHONL", + "ECHOPRT", + "ECHRNG", + "ECOMM", + "ECONNABORTED", + "ECONNREFUSED", + "ECONNRESET", + "EDEADLK", + "EDEADLOCK", + "EDESTADDRREQ", + "EDEVERR", + "EDOM", + "EDOOFUS", + "EDOTDOT", + "EDQUOT", + "EEXIST", + "EFAULT", + "EFBIG", + "EFER_LMA", + "EFER_LME", + "EFER_NXE", + "EFER_SCE", + "EFTYPE", + "EHOSTDOWN", + "EHOSTUNREACH", + "EHWPOISON", + "EIDRM", + "EILSEQ", + "EINPROGRESS", + "EINTR", + "EINVAL", + "EIO", + "EIPSEC", + "EISCONN", + "EISDIR", + "EISNAM", + "EKEYEXPIRED", + "EKEYREJECTED", + "EKEYREVOKED", + "EL2HLT", + "EL2NSYNC", + "EL3HLT", + "EL3RST", + "ELAST", + "ELF_NGREG", + "ELF_PRARGSZ", + "ELIBACC", + "ELIBBAD", + "ELIBEXEC", + "ELIBMAX", + "ELIBSCN", + "ELNRNG", + "ELOOP", + "EMEDIUMTYPE", + "EMFILE", + "EMLINK", + "EMSGSIZE", + "EMT_TAGOVF", + "EMULTIHOP", + "EMUL_ENABLED", + "EMUL_LINUX", + "EMUL_LINUX32", + "EMUL_MAXID", + "EMUL_NATIVE", + "ENAMETOOLONG", + "ENAVAIL", + "ENDRUNDISC", + "ENEEDAUTH", + "ENETDOWN", + "ENETRESET", + "ENETUNREACH", + "ENFILE", + "ENOANO", + "ENOATTR", + "ENOBUFS", + "ENOCSI", + "ENODATA", + "ENODEV", + "ENOENT", + "ENOEXEC", + "ENOKEY", + "ENOLCK", + "ENOLINK", + "ENOMEDIUM", + "ENOMEM", + "ENOMSG", + "ENONET", + "ENOPKG", + "ENOPOLICY", + "ENOPROTOOPT", + "ENOSPC", + "ENOSR", + "ENOSTR", + "ENOSYS", + "ENOTBLK", + "ENOTCAPABLE", + "ENOTCONN", + "ENOTDIR", + "ENOTEMPTY", + "ENOTNAM", + "ENOTRECOVERABLE", + "ENOTSOCK", + "ENOTSUP", + "ENOTTY", + "ENOTUNIQ", + "ENXIO", + "EN_SW_CTL_INF", + "EN_SW_CTL_PREC", + "EN_SW_CTL_ROUND", + "EN_SW_DATACHAIN", + "EN_SW_DENORM", + "EN_SW_INVOP", + "EN_SW_OVERFLOW", + "EN_SW_PRECLOSS", + "EN_SW_UNDERFLOW", + "EN_SW_ZERODIV", + "EOPNOTSUPP", + "EOVERFLOW", + "EOWNERDEAD", + "EPERM", + "EPFNOSUPPORT", + "EPIPE", + "EPOLLERR", + "EPOLLET", + "EPOLLHUP", + "EPOLLIN", + "EPOLLMSG", + "EPOLLONESHOT", + "EPOLLOUT", + "EPOLLPRI", + "EPOLLRDBAND", + "EPOLLRDHUP", + "EPOLLRDNORM", + "EPOLLWRBAND", + "EPOLLWRNORM", + "EPOLL_CLOEXEC", + "EPOLL_CTL_ADD", + "EPOLL_CTL_DEL", + "EPOLL_CTL_MOD", + "EPOLL_NONBLOCK", + "EPROCLIM", + "EPROCUNAVAIL", + "EPROGMISMATCH", + "EPROGUNAVAIL", + "EPROTO", + "EPROTONOSUPPORT", + "EPROTOTYPE", + "EPWROFF", + "ERANGE", + "EREMCHG", + "EREMOTE", + "EREMOTEIO", + "ERESTART", + "ERFKILL", + "EROFS", + "ERPCMISMATCH", + "ERROR_ACCESS_DENIED", + "ERROR_ALREADY_EXISTS", + "ERROR_BROKEN_PIPE", + "ERROR_BUFFER_OVERFLOW", + "ERROR_DIR_NOT_EMPTY", + "ERROR_ENVVAR_NOT_FOUND", + "ERROR_FILE_EXISTS", + "ERROR_FILE_NOT_FOUND", + "ERROR_HANDLE_EOF", + "ERROR_INSUFFICIENT_BUFFER", + "ERROR_IO_PENDING", + "ERROR_MOD_NOT_FOUND", + "ERROR_MORE_DATA", + "ERROR_NETNAME_DELETED", + "ERROR_NOT_FOUND", + "ERROR_NO_MORE_FILES", + "ERROR_OPERATION_ABORTED", + "ERROR_PATH_NOT_FOUND", + "ERROR_PRIVILEGE_NOT_HELD", + "ERROR_PROC_NOT_FOUND", + "ESHLIBVERS", + "ESHUTDOWN", + "ESOCKTNOSUPPORT", + "ESPIPE", + "ESRCH", + "ESRMNT", + "ESTALE", + "ESTRPIPE", + "ETHERCAP_JUMBO_MTU", + "ETHERCAP_VLAN_HWTAGGING", + "ETHERCAP_VLAN_MTU", + "ETHERMIN", + "ETHERMTU", + "ETHERMTU_JUMBO", + "ETHERTYPE_8023", + "ETHERTYPE_AARP", + "ETHERTYPE_ACCTON", + "ETHERTYPE_AEONIC", + "ETHERTYPE_ALPHA", + "ETHERTYPE_AMBER", + "ETHERTYPE_AMOEBA", + "ETHERTYPE_AOE", + "ETHERTYPE_APOLLO", + "ETHERTYPE_APOLLODOMAIN", + "ETHERTYPE_APPLETALK", + "ETHERTYPE_APPLITEK", + "ETHERTYPE_ARGONAUT", + "ETHERTYPE_ARP", + "ETHERTYPE_AT", + "ETHERTYPE_ATALK", + "ETHERTYPE_ATOMIC", + "ETHERTYPE_ATT", + "ETHERTYPE_ATTSTANFORD", + "ETHERTYPE_AUTOPHON", + "ETHERTYPE_AXIS", + "ETHERTYPE_BCLOOP", + "ETHERTYPE_BOFL", + "ETHERTYPE_CABLETRON", + "ETHERTYPE_CHAOS", + "ETHERTYPE_COMDESIGN", + "ETHERTYPE_COMPUGRAPHIC", + "ETHERTYPE_COUNTERPOINT", + "ETHERTYPE_CRONUS", + "ETHERTYPE_CRONUSVLN", + "ETHERTYPE_DCA", + "ETHERTYPE_DDE", + "ETHERTYPE_DEBNI", + "ETHERTYPE_DECAM", + "ETHERTYPE_DECCUST", + "ETHERTYPE_DECDIAG", + "ETHERTYPE_DECDNS", + "ETHERTYPE_DECDTS", + "ETHERTYPE_DECEXPER", + "ETHERTYPE_DECLAST", + "ETHERTYPE_DECLTM", + "ETHERTYPE_DECMUMPS", + "ETHERTYPE_DECNETBIOS", + "ETHERTYPE_DELTACON", + "ETHERTYPE_DIDDLE", + "ETHERTYPE_DLOG1", + "ETHERTYPE_DLOG2", + "ETHERTYPE_DN", + "ETHERTYPE_DOGFIGHT", + "ETHERTYPE_DSMD", + "ETHERTYPE_ECMA", + "ETHERTYPE_ENCRYPT", + "ETHERTYPE_ES", + "ETHERTYPE_EXCELAN", + "ETHERTYPE_EXPERDATA", + "ETHERTYPE_FLIP", + "ETHERTYPE_FLOWCONTROL", + "ETHERTYPE_FRARP", + "ETHERTYPE_GENDYN", + "ETHERTYPE_HAYES", + "ETHERTYPE_HIPPI_FP", + "ETHERTYPE_HITACHI", + "ETHERTYPE_HP", + "ETHERTYPE_IEEEPUP", + "ETHERTYPE_IEEEPUPAT", + "ETHERTYPE_IMLBL", + "ETHERTYPE_IMLBLDIAG", + "ETHERTYPE_IP", + "ETHERTYPE_IPAS", + "ETHERTYPE_IPV6", + "ETHERTYPE_IPX", + "ETHERTYPE_IPXNEW", + "ETHERTYPE_KALPANA", + "ETHERTYPE_LANBRIDGE", + "ETHERTYPE_LANPROBE", + "ETHERTYPE_LAT", + "ETHERTYPE_LBACK", + "ETHERTYPE_LITTLE", + "ETHERTYPE_LLDP", + "ETHERTYPE_LOGICRAFT", + "ETHERTYPE_LOOPBACK", + "ETHERTYPE_MATRA", + "ETHERTYPE_MAX", + "ETHERTYPE_MERIT", + "ETHERTYPE_MICP", + "ETHERTYPE_MOPDL", + "ETHERTYPE_MOPRC", + "ETHERTYPE_MOTOROLA", + "ETHERTYPE_MPLS", + "ETHERTYPE_MPLS_MCAST", + "ETHERTYPE_MUMPS", + "ETHERTYPE_NBPCC", + "ETHERTYPE_NBPCLAIM", + "ETHERTYPE_NBPCLREQ", + "ETHERTYPE_NBPCLRSP", + "ETHERTYPE_NBPCREQ", + "ETHERTYPE_NBPCRSP", + "ETHERTYPE_NBPDG", + "ETHERTYPE_NBPDGB", + "ETHERTYPE_NBPDLTE", + "ETHERTYPE_NBPRAR", + "ETHERTYPE_NBPRAS", + "ETHERTYPE_NBPRST", + "ETHERTYPE_NBPSCD", + "ETHERTYPE_NBPVCD", + "ETHERTYPE_NBS", + "ETHERTYPE_NCD", + "ETHERTYPE_NESTAR", + "ETHERTYPE_NETBEUI", + "ETHERTYPE_NOVELL", + "ETHERTYPE_NS", + "ETHERTYPE_NSAT", + "ETHERTYPE_NSCOMPAT", + "ETHERTYPE_NTRAILER", + "ETHERTYPE_OS9", + "ETHERTYPE_OS9NET", + "ETHERTYPE_PACER", + "ETHERTYPE_PAE", + "ETHERTYPE_PCS", + "ETHERTYPE_PLANNING", + "ETHERTYPE_PPP", + "ETHERTYPE_PPPOE", + "ETHERTYPE_PPPOEDISC", + "ETHERTYPE_PRIMENTS", + "ETHERTYPE_PUP", + "ETHERTYPE_PUPAT", + "ETHERTYPE_QINQ", + "ETHERTYPE_RACAL", + "ETHERTYPE_RATIONAL", + "ETHERTYPE_RAWFR", + "ETHERTYPE_RCL", + "ETHERTYPE_RDP", + "ETHERTYPE_RETIX", + "ETHERTYPE_REVARP", + "ETHERTYPE_SCA", + "ETHERTYPE_SECTRA", + "ETHERTYPE_SECUREDATA", + "ETHERTYPE_SGITW", + "ETHERTYPE_SG_BOUNCE", + "ETHERTYPE_SG_DIAG", + "ETHERTYPE_SG_NETGAMES", + "ETHERTYPE_SG_RESV", + "ETHERTYPE_SIMNET", + "ETHERTYPE_SLOW", + "ETHERTYPE_SLOWPROTOCOLS", + "ETHERTYPE_SNA", + "ETHERTYPE_SNMP", + "ETHERTYPE_SONIX", + "ETHERTYPE_SPIDER", + "ETHERTYPE_SPRITE", + "ETHERTYPE_STP", + "ETHERTYPE_TALARIS", + "ETHERTYPE_TALARISMC", + "ETHERTYPE_TCPCOMP", + "ETHERTYPE_TCPSM", + "ETHERTYPE_TEC", + "ETHERTYPE_TIGAN", + "ETHERTYPE_TRAIL", + "ETHERTYPE_TRANSETHER", + "ETHERTYPE_TYMSHARE", + "ETHERTYPE_UBBST", + "ETHERTYPE_UBDEBUG", + "ETHERTYPE_UBDIAGLOOP", + "ETHERTYPE_UBDL", + "ETHERTYPE_UBNIU", + "ETHERTYPE_UBNMC", + "ETHERTYPE_VALID", + "ETHERTYPE_VARIAN", + "ETHERTYPE_VAXELN", + "ETHERTYPE_VEECO", + "ETHERTYPE_VEXP", + "ETHERTYPE_VGLAB", + "ETHERTYPE_VINES", + "ETHERTYPE_VINESECHO", + "ETHERTYPE_VINESLOOP", + "ETHERTYPE_VITAL", + "ETHERTYPE_VLAN", + "ETHERTYPE_VLTLMAN", + "ETHERTYPE_VPROD", + "ETHERTYPE_VURESERVED", + "ETHERTYPE_WATERLOO", + "ETHERTYPE_WELLFLEET", + "ETHERTYPE_X25", + "ETHERTYPE_X75", + "ETHERTYPE_XNSSM", + "ETHERTYPE_XTP", + "ETHER_ADDR_LEN", + "ETHER_ALIGN", + "ETHER_CRC_LEN", + "ETHER_CRC_POLY_BE", + "ETHER_CRC_POLY_LE", + "ETHER_HDR_LEN", + "ETHER_MAX_DIX_LEN", + "ETHER_MAX_LEN", + "ETHER_MAX_LEN_JUMBO", + "ETHER_MIN_LEN", + "ETHER_PPPOE_ENCAP_LEN", + "ETHER_TYPE_LEN", + "ETHER_VLAN_ENCAP_LEN", + "ETH_P_1588", + "ETH_P_8021Q", + "ETH_P_802_2", + "ETH_P_802_3", + "ETH_P_AARP", + "ETH_P_ALL", + "ETH_P_AOE", + "ETH_P_ARCNET", + "ETH_P_ARP", + "ETH_P_ATALK", + "ETH_P_ATMFATE", + "ETH_P_ATMMPOA", + "ETH_P_AX25", + "ETH_P_BPQ", + "ETH_P_CAIF", + "ETH_P_CAN", + "ETH_P_CONTROL", + "ETH_P_CUST", + "ETH_P_DDCMP", + "ETH_P_DEC", + "ETH_P_DIAG", + "ETH_P_DNA_DL", + "ETH_P_DNA_RC", + "ETH_P_DNA_RT", + "ETH_P_DSA", + "ETH_P_ECONET", + "ETH_P_EDSA", + "ETH_P_FCOE", + "ETH_P_FIP", + "ETH_P_HDLC", + "ETH_P_IEEE802154", + "ETH_P_IEEEPUP", + "ETH_P_IEEEPUPAT", + "ETH_P_IP", + "ETH_P_IPV6", + "ETH_P_IPX", + "ETH_P_IRDA", + "ETH_P_LAT", + "ETH_P_LINK_CTL", + "ETH_P_LOCALTALK", + "ETH_P_LOOP", + "ETH_P_MOBITEX", + "ETH_P_MPLS_MC", + "ETH_P_MPLS_UC", + "ETH_P_PAE", + "ETH_P_PAUSE", + "ETH_P_PHONET", + "ETH_P_PPPTALK", + "ETH_P_PPP_DISC", + "ETH_P_PPP_MP", + "ETH_P_PPP_SES", + "ETH_P_PUP", + "ETH_P_PUPAT", + "ETH_P_RARP", + "ETH_P_SCA", + "ETH_P_SLOW", + "ETH_P_SNAP", + "ETH_P_TEB", + "ETH_P_TIPC", + "ETH_P_TRAILER", + "ETH_P_TR_802_2", + "ETH_P_WAN_PPP", + "ETH_P_WCCP", + "ETH_P_X25", + "ETIME", + "ETIMEDOUT", + "ETOOMANYREFS", + "ETXTBSY", + "EUCLEAN", + "EUNATCH", + "EUSERS", + "EVFILT_AIO", + "EVFILT_FS", + "EVFILT_LIO", + "EVFILT_MACHPORT", + "EVFILT_PROC", + "EVFILT_READ", + "EVFILT_SIGNAL", + "EVFILT_SYSCOUNT", + "EVFILT_THREADMARKER", + "EVFILT_TIMER", + "EVFILT_USER", + "EVFILT_VM", + "EVFILT_VNODE", + "EVFILT_WRITE", + "EV_ADD", + "EV_CLEAR", + "EV_DELETE", + "EV_DISABLE", + "EV_DISPATCH", + "EV_DROP", + "EV_ENABLE", + "EV_EOF", + "EV_ERROR", + "EV_FLAG0", + "EV_FLAG1", + "EV_ONESHOT", + "EV_OOBAND", + "EV_POLL", + "EV_RECEIPT", + "EV_SYSFLAGS", + "EWINDOWS", + "EWOULDBLOCK", + "EXDEV", + "EXFULL", + "EXTA", + "EXTB", + "EXTPROC", + "Environ", + "EpollCreate", + "EpollCreate1", + "EpollCtl", + "EpollEvent", + "EpollWait", + "Errno", + "EscapeArg", + "Exchangedata", + "Exec", + "Exit", + "ExitProcess", + "FD_CLOEXEC", + "FD_SETSIZE", + "FILE_ACTION_ADDED", + "FILE_ACTION_MODIFIED", + "FILE_ACTION_REMOVED", + "FILE_ACTION_RENAMED_NEW_NAME", + "FILE_ACTION_RENAMED_OLD_NAME", + "FILE_APPEND_DATA", + "FILE_ATTRIBUTE_ARCHIVE", + "FILE_ATTRIBUTE_DIRECTORY", + "FILE_ATTRIBUTE_HIDDEN", + "FILE_ATTRIBUTE_NORMAL", + "FILE_ATTRIBUTE_READONLY", + "FILE_ATTRIBUTE_REPARSE_POINT", + "FILE_ATTRIBUTE_SYSTEM", + "FILE_BEGIN", + "FILE_CURRENT", + "FILE_END", + "FILE_FLAG_BACKUP_SEMANTICS", + "FILE_FLAG_OPEN_REPARSE_POINT", + "FILE_FLAG_OVERLAPPED", + "FILE_LIST_DIRECTORY", + "FILE_MAP_COPY", + "FILE_MAP_EXECUTE", + "FILE_MAP_READ", + "FILE_MAP_WRITE", + "FILE_NOTIFY_CHANGE_ATTRIBUTES", + "FILE_NOTIFY_CHANGE_CREATION", + "FILE_NOTIFY_CHANGE_DIR_NAME", + "FILE_NOTIFY_CHANGE_FILE_NAME", + "FILE_NOTIFY_CHANGE_LAST_ACCESS", + "FILE_NOTIFY_CHANGE_LAST_WRITE", + "FILE_NOTIFY_CHANGE_SIZE", + "FILE_SHARE_DELETE", + "FILE_SHARE_READ", + "FILE_SHARE_WRITE", + "FILE_SKIP_COMPLETION_PORT_ON_SUCCESS", + "FILE_SKIP_SET_EVENT_ON_HANDLE", + "FILE_TYPE_CHAR", + "FILE_TYPE_DISK", + "FILE_TYPE_PIPE", + "FILE_TYPE_REMOTE", + "FILE_TYPE_UNKNOWN", + "FILE_WRITE_ATTRIBUTES", + "FLUSHO", + "FORMAT_MESSAGE_ALLOCATE_BUFFER", + "FORMAT_MESSAGE_ARGUMENT_ARRAY", + "FORMAT_MESSAGE_FROM_HMODULE", + "FORMAT_MESSAGE_FROM_STRING", + "FORMAT_MESSAGE_FROM_SYSTEM", + "FORMAT_MESSAGE_IGNORE_INSERTS", + "FORMAT_MESSAGE_MAX_WIDTH_MASK", + "FSCTL_GET_REPARSE_POINT", + "F_ADDFILESIGS", + "F_ADDSIGS", + "F_ALLOCATEALL", + "F_ALLOCATECONTIG", + "F_CANCEL", + "F_CHKCLEAN", + "F_CLOSEM", + "F_DUP2FD", + "F_DUP2FD_CLOEXEC", + "F_DUPFD", + "F_DUPFD_CLOEXEC", + "F_EXLCK", + "F_FLUSH_DATA", + "F_FREEZE_FS", + "F_FSCTL", + "F_FSDIRMASK", + "F_FSIN", + "F_FSINOUT", + "F_FSOUT", + "F_FSPRIV", + "F_FSVOID", + "F_FULLFSYNC", + "F_GETFD", + "F_GETFL", + "F_GETLEASE", + "F_GETLK", + "F_GETLK64", + "F_GETLKPID", + "F_GETNOSIGPIPE", + "F_GETOWN", + "F_GETOWN_EX", + "F_GETPATH", + "F_GETPATH_MTMINFO", + "F_GETPIPE_SZ", + "F_GETPROTECTIONCLASS", + "F_GETSIG", + "F_GLOBAL_NOCACHE", + "F_LOCK", + "F_LOG2PHYS", + "F_LOG2PHYS_EXT", + "F_MARKDEPENDENCY", + "F_MAXFD", + "F_NOCACHE", + "F_NODIRECT", + "F_NOTIFY", + "F_OGETLK", + "F_OK", + "F_OSETLK", + "F_OSETLKW", + "F_PARAM_MASK", + "F_PARAM_MAX", + "F_PATHPKG_CHECK", + "F_PEOFPOSMODE", + "F_PREALLOCATE", + "F_RDADVISE", + "F_RDAHEAD", + "F_RDLCK", + "F_READAHEAD", + "F_READBOOTSTRAP", + "F_SETBACKINGSTORE", + "F_SETFD", + "F_SETFL", + "F_SETLEASE", + "F_SETLK", + "F_SETLK64", + "F_SETLKW", + "F_SETLKW64", + "F_SETLK_REMOTE", + "F_SETNOSIGPIPE", + "F_SETOWN", + "F_SETOWN_EX", + "F_SETPIPE_SZ", + "F_SETPROTECTIONCLASS", + "F_SETSIG", + "F_SETSIZE", + "F_SHLCK", + "F_TEST", + "F_THAW_FS", + "F_TLOCK", + "F_ULOCK", + "F_UNLCK", + "F_UNLCKSYS", + "F_VOLPOSMODE", + "F_WRITEBOOTSTRAP", + "F_WRLCK", + "Faccessat", + "Fallocate", + "Fbootstraptransfer_t", + "Fchdir", + "Fchflags", + "Fchmod", + "Fchmodat", + "Fchown", + "Fchownat", + "FcntlFlock", + "FdSet", + "Fdatasync", + "FileNotifyInformation", + "Filetime", + "FindClose", + "FindFirstFile", + "FindNextFile", + "Flock", + "Flock_t", + "FlushBpf", + "FlushFileBuffers", + "FlushViewOfFile", + "ForkExec", + "ForkLock", + "FormatMessage", + "Fpathconf", + "FreeAddrInfoW", + "FreeEnvironmentStrings", + "FreeLibrary", + "Fsid", + "Fstat", + "Fstatat", + "Fstatfs", + "Fstore_t", + "Fsync", + "Ftruncate", + "FullPath", + "Futimes", + "Futimesat", + "GENERIC_ALL", + "GENERIC_EXECUTE", + "GENERIC_READ", + "GENERIC_WRITE", + "GUID", + "GetAcceptExSockaddrs", + "GetAdaptersInfo", + "GetAddrInfoW", + "GetCommandLine", + "GetComputerName", + "GetConsoleMode", + "GetCurrentDirectory", + "GetCurrentProcess", + "GetEnvironmentStrings", + "GetEnvironmentVariable", + "GetExitCodeProcess", + "GetFileAttributes", + "GetFileAttributesEx", + "GetFileExInfoStandard", + "GetFileExMaxInfoLevel", + "GetFileInformationByHandle", + "GetFileType", + "GetFullPathName", + "GetHostByName", + "GetIfEntry", + "GetLastError", + "GetLengthSid", + "GetLongPathName", + "GetProcAddress", + "GetProcessTimes", + "GetProtoByName", + "GetQueuedCompletionStatus", + "GetServByName", + "GetShortPathName", + "GetStartupInfo", + "GetStdHandle", + "GetSystemTimeAsFileTime", + "GetTempPath", + "GetTimeZoneInformation", + "GetTokenInformation", + "GetUserNameEx", + "GetUserProfileDirectory", + "GetVersion", + "Getcwd", + "Getdents", + "Getdirentries", + "Getdtablesize", + "Getegid", + "Getenv", + "Geteuid", + "Getfsstat", + "Getgid", + "Getgroups", + "Getpagesize", + "Getpeername", + "Getpgid", + "Getpgrp", + "Getpid", + "Getppid", + "Getpriority", + "Getrlimit", + "Getrusage", + "Getsid", + "Getsockname", + "Getsockopt", + "GetsockoptByte", + "GetsockoptICMPv6Filter", + "GetsockoptIPMreq", + "GetsockoptIPMreqn", + "GetsockoptIPv6MTUInfo", + "GetsockoptIPv6Mreq", + "GetsockoptInet4Addr", + "GetsockoptInt", + "GetsockoptUcred", + "Gettid", + "Gettimeofday", + "Getuid", + "Getwd", + "Getxattr", + "HANDLE_FLAG_INHERIT", + "HKEY_CLASSES_ROOT", + "HKEY_CURRENT_CONFIG", + "HKEY_CURRENT_USER", + "HKEY_DYN_DATA", + "HKEY_LOCAL_MACHINE", + "HKEY_PERFORMANCE_DATA", + "HKEY_USERS", + "HUPCL", + "Handle", + "Hostent", + "ICANON", + "ICMP6_FILTER", + "ICMPV6_FILTER", + "ICMPv6Filter", + "ICRNL", + "IEXTEN", + "IFAN_ARRIVAL", + "IFAN_DEPARTURE", + "IFA_ADDRESS", + "IFA_ANYCAST", + "IFA_BROADCAST", + "IFA_CACHEINFO", + "IFA_F_DADFAILED", + "IFA_F_DEPRECATED", + "IFA_F_HOMEADDRESS", + "IFA_F_NODAD", + "IFA_F_OPTIMISTIC", + "IFA_F_PERMANENT", + "IFA_F_SECONDARY", + "IFA_F_TEMPORARY", + "IFA_F_TENTATIVE", + "IFA_LABEL", + "IFA_LOCAL", + "IFA_MAX", + "IFA_MULTICAST", + "IFA_ROUTE", + "IFA_UNSPEC", + "IFF_ALLMULTI", + "IFF_ALTPHYS", + "IFF_AUTOMEDIA", + "IFF_BROADCAST", + "IFF_CANTCHANGE", + "IFF_CANTCONFIG", + "IFF_DEBUG", + "IFF_DRV_OACTIVE", + "IFF_DRV_RUNNING", + "IFF_DYING", + "IFF_DYNAMIC", + "IFF_LINK0", + "IFF_LINK1", + "IFF_LINK2", + "IFF_LOOPBACK", + "IFF_MASTER", + "IFF_MONITOR", + "IFF_MULTICAST", + "IFF_NOARP", + "IFF_NOTRAILERS", + "IFF_NO_PI", + "IFF_OACTIVE", + "IFF_ONE_QUEUE", + "IFF_POINTOPOINT", + "IFF_POINTTOPOINT", + "IFF_PORTSEL", + "IFF_PPROMISC", + "IFF_PROMISC", + "IFF_RENAMING", + "IFF_RUNNING", + "IFF_SIMPLEX", + "IFF_SLAVE", + "IFF_SMART", + "IFF_STATICARP", + "IFF_TAP", + "IFF_TUN", + "IFF_TUN_EXCL", + "IFF_UP", + "IFF_VNET_HDR", + "IFLA_ADDRESS", + "IFLA_BROADCAST", + "IFLA_COST", + "IFLA_IFALIAS", + "IFLA_IFNAME", + "IFLA_LINK", + "IFLA_LINKINFO", + "IFLA_LINKMODE", + "IFLA_MAP", + "IFLA_MASTER", + "IFLA_MAX", + "IFLA_MTU", + "IFLA_NET_NS_PID", + "IFLA_OPERSTATE", + "IFLA_PRIORITY", + "IFLA_PROTINFO", + "IFLA_QDISC", + "IFLA_STATS", + "IFLA_TXQLEN", + "IFLA_UNSPEC", + "IFLA_WEIGHT", + "IFLA_WIRELESS", + "IFNAMSIZ", + "IFT_1822", + "IFT_A12MPPSWITCH", + "IFT_AAL2", + "IFT_AAL5", + "IFT_ADSL", + "IFT_AFLANE8023", + "IFT_AFLANE8025", + "IFT_ARAP", + "IFT_ARCNET", + "IFT_ARCNETPLUS", + "IFT_ASYNC", + "IFT_ATM", + "IFT_ATMDXI", + "IFT_ATMFUNI", + "IFT_ATMIMA", + "IFT_ATMLOGICAL", + "IFT_ATMRADIO", + "IFT_ATMSUBINTERFACE", + "IFT_ATMVCIENDPT", + "IFT_ATMVIRTUAL", + "IFT_BGPPOLICYACCOUNTING", + "IFT_BLUETOOTH", + "IFT_BRIDGE", + "IFT_BSC", + "IFT_CARP", + "IFT_CCTEMUL", + "IFT_CELLULAR", + "IFT_CEPT", + "IFT_CES", + "IFT_CHANNEL", + "IFT_CNR", + "IFT_COFFEE", + "IFT_COMPOSITELINK", + "IFT_DCN", + "IFT_DIGITALPOWERLINE", + "IFT_DIGITALWRAPPEROVERHEADCHANNEL", + "IFT_DLSW", + "IFT_DOCSCABLEDOWNSTREAM", + "IFT_DOCSCABLEMACLAYER", + "IFT_DOCSCABLEUPSTREAM", + "IFT_DOCSCABLEUPSTREAMCHANNEL", + "IFT_DS0", + "IFT_DS0BUNDLE", + "IFT_DS1FDL", + "IFT_DS3", + "IFT_DTM", + "IFT_DUMMY", + "IFT_DVBASILN", + "IFT_DVBASIOUT", + "IFT_DVBRCCDOWNSTREAM", + "IFT_DVBRCCMACLAYER", + "IFT_DVBRCCUPSTREAM", + "IFT_ECONET", + "IFT_ENC", + "IFT_EON", + "IFT_EPLRS", + "IFT_ESCON", + "IFT_ETHER", + "IFT_FAITH", + "IFT_FAST", + "IFT_FASTETHER", + "IFT_FASTETHERFX", + "IFT_FDDI", + "IFT_FIBRECHANNEL", + "IFT_FRAMERELAYINTERCONNECT", + "IFT_FRAMERELAYMPI", + "IFT_FRDLCIENDPT", + "IFT_FRELAY", + "IFT_FRELAYDCE", + "IFT_FRF16MFRBUNDLE", + "IFT_FRFORWARD", + "IFT_G703AT2MB", + "IFT_G703AT64K", + "IFT_GIF", + "IFT_GIGABITETHERNET", + "IFT_GR303IDT", + "IFT_GR303RDT", + "IFT_H323GATEKEEPER", + "IFT_H323PROXY", + "IFT_HDH1822", + "IFT_HDLC", + "IFT_HDSL2", + "IFT_HIPERLAN2", + "IFT_HIPPI", + "IFT_HIPPIINTERFACE", + "IFT_HOSTPAD", + "IFT_HSSI", + "IFT_HY", + "IFT_IBM370PARCHAN", + "IFT_IDSL", + "IFT_IEEE1394", + "IFT_IEEE80211", + "IFT_IEEE80212", + "IFT_IEEE8023ADLAG", + "IFT_IFGSN", + "IFT_IMT", + "IFT_INFINIBAND", + "IFT_INTERLEAVE", + "IFT_IP", + "IFT_IPFORWARD", + "IFT_IPOVERATM", + "IFT_IPOVERCDLC", + "IFT_IPOVERCLAW", + "IFT_IPSWITCH", + "IFT_IPXIP", + "IFT_ISDN", + "IFT_ISDNBASIC", + "IFT_ISDNPRIMARY", + "IFT_ISDNS", + "IFT_ISDNU", + "IFT_ISO88022LLC", + "IFT_ISO88023", + "IFT_ISO88024", + "IFT_ISO88025", + "IFT_ISO88025CRFPINT", + "IFT_ISO88025DTR", + "IFT_ISO88025FIBER", + "IFT_ISO88026", + "IFT_ISUP", + "IFT_L2VLAN", + "IFT_L3IPVLAN", + "IFT_L3IPXVLAN", + "IFT_LAPB", + "IFT_LAPD", + "IFT_LAPF", + "IFT_LINEGROUP", + "IFT_LOCALTALK", + "IFT_LOOP", + "IFT_MEDIAMAILOVERIP", + "IFT_MFSIGLINK", + "IFT_MIOX25", + "IFT_MODEM", + "IFT_MPC", + "IFT_MPLS", + "IFT_MPLSTUNNEL", + "IFT_MSDSL", + "IFT_MVL", + "IFT_MYRINET", + "IFT_NFAS", + "IFT_NSIP", + "IFT_OPTICALCHANNEL", + "IFT_OPTICALTRANSPORT", + "IFT_OTHER", + "IFT_P10", + "IFT_P80", + "IFT_PARA", + "IFT_PDP", + "IFT_PFLOG", + "IFT_PFLOW", + "IFT_PFSYNC", + "IFT_PLC", + "IFT_PON155", + "IFT_PON622", + "IFT_POS", + "IFT_PPP", + "IFT_PPPMULTILINKBUNDLE", + "IFT_PROPATM", + "IFT_PROPBWAP2MP", + "IFT_PROPCNLS", + "IFT_PROPDOCSWIRELESSDOWNSTREAM", + "IFT_PROPDOCSWIRELESSMACLAYER", + "IFT_PROPDOCSWIRELESSUPSTREAM", + "IFT_PROPMUX", + "IFT_PROPVIRTUAL", + "IFT_PROPWIRELESSP2P", + "IFT_PTPSERIAL", + "IFT_PVC", + "IFT_Q2931", + "IFT_QLLC", + "IFT_RADIOMAC", + "IFT_RADSL", + "IFT_REACHDSL", + "IFT_RFC1483", + "IFT_RS232", + "IFT_RSRB", + "IFT_SDLC", + "IFT_SDSL", + "IFT_SHDSL", + "IFT_SIP", + "IFT_SIPSIG", + "IFT_SIPTG", + "IFT_SLIP", + "IFT_SMDSDXI", + "IFT_SMDSICIP", + "IFT_SONET", + "IFT_SONETOVERHEADCHANNEL", + "IFT_SONETPATH", + "IFT_SONETVT", + "IFT_SRP", + "IFT_SS7SIGLINK", + "IFT_STACKTOSTACK", + "IFT_STARLAN", + "IFT_STF", + "IFT_T1", + "IFT_TDLC", + "IFT_TELINK", + "IFT_TERMPAD", + "IFT_TR008", + "IFT_TRANSPHDLC", + "IFT_TUNNEL", + "IFT_ULTRA", + "IFT_USB", + "IFT_V11", + "IFT_V35", + "IFT_V36", + "IFT_V37", + "IFT_VDSL", + "IFT_VIRTUALIPADDRESS", + "IFT_VIRTUALTG", + "IFT_VOICEDID", + "IFT_VOICEEM", + "IFT_VOICEEMFGD", + "IFT_VOICEENCAP", + "IFT_VOICEFGDEANA", + "IFT_VOICEFXO", + "IFT_VOICEFXS", + "IFT_VOICEOVERATM", + "IFT_VOICEOVERCABLE", + "IFT_VOICEOVERFRAMERELAY", + "IFT_VOICEOVERIP", + "IFT_X213", + "IFT_X25", + "IFT_X25DDN", + "IFT_X25HUNTGROUP", + "IFT_X25MLP", + "IFT_X25PLE", + "IFT_XETHER", + "IGNBRK", + "IGNCR", + "IGNORE", + "IGNPAR", + "IMAXBEL", + "INFINITE", + "INLCR", + "INPCK", + "INVALID_FILE_ATTRIBUTES", + "IN_ACCESS", + "IN_ALL_EVENTS", + "IN_ATTRIB", + "IN_CLASSA_HOST", + "IN_CLASSA_MAX", + "IN_CLASSA_NET", + "IN_CLASSA_NSHIFT", + "IN_CLASSB_HOST", + "IN_CLASSB_MAX", + "IN_CLASSB_NET", + "IN_CLASSB_NSHIFT", + "IN_CLASSC_HOST", + "IN_CLASSC_NET", + "IN_CLASSC_NSHIFT", + "IN_CLASSD_HOST", + "IN_CLASSD_NET", + "IN_CLASSD_NSHIFT", + "IN_CLOEXEC", + "IN_CLOSE", + "IN_CLOSE_NOWRITE", + "IN_CLOSE_WRITE", + "IN_CREATE", + "IN_DELETE", + "IN_DELETE_SELF", + "IN_DONT_FOLLOW", + "IN_EXCL_UNLINK", + "IN_IGNORED", + "IN_ISDIR", + "IN_LINKLOCALNETNUM", + "IN_LOOPBACKNET", + "IN_MASK_ADD", + "IN_MODIFY", + "IN_MOVE", + "IN_MOVED_FROM", + "IN_MOVED_TO", + "IN_MOVE_SELF", + "IN_NONBLOCK", + "IN_ONESHOT", + "IN_ONLYDIR", + "IN_OPEN", + "IN_Q_OVERFLOW", + "IN_RFC3021_HOST", + "IN_RFC3021_MASK", + "IN_RFC3021_NET", + "IN_RFC3021_NSHIFT", + "IN_UNMOUNT", + "IOC_IN", + "IOC_INOUT", + "IOC_OUT", + "IOC_VENDOR", + "IOC_WS2", + "IO_REPARSE_TAG_SYMLINK", + "IPMreq", + "IPMreqn", + "IPPROTO_3PC", + "IPPROTO_ADFS", + "IPPROTO_AH", + "IPPROTO_AHIP", + "IPPROTO_APES", + "IPPROTO_ARGUS", + "IPPROTO_AX25", + "IPPROTO_BHA", + "IPPROTO_BLT", + "IPPROTO_BRSATMON", + "IPPROTO_CARP", + "IPPROTO_CFTP", + "IPPROTO_CHAOS", + "IPPROTO_CMTP", + "IPPROTO_COMP", + "IPPROTO_CPHB", + "IPPROTO_CPNX", + "IPPROTO_DCCP", + "IPPROTO_DDP", + "IPPROTO_DGP", + "IPPROTO_DIVERT", + "IPPROTO_DIVERT_INIT", + "IPPROTO_DIVERT_RESP", + "IPPROTO_DONE", + "IPPROTO_DSTOPTS", + "IPPROTO_EGP", + "IPPROTO_EMCON", + "IPPROTO_ENCAP", + "IPPROTO_EON", + "IPPROTO_ESP", + "IPPROTO_ETHERIP", + "IPPROTO_FRAGMENT", + "IPPROTO_GGP", + "IPPROTO_GMTP", + "IPPROTO_GRE", + "IPPROTO_HELLO", + "IPPROTO_HMP", + "IPPROTO_HOPOPTS", + "IPPROTO_ICMP", + "IPPROTO_ICMPV6", + "IPPROTO_IDP", + "IPPROTO_IDPR", + "IPPROTO_IDRP", + "IPPROTO_IGMP", + "IPPROTO_IGP", + "IPPROTO_IGRP", + "IPPROTO_IL", + "IPPROTO_INLSP", + "IPPROTO_INP", + "IPPROTO_IP", + "IPPROTO_IPCOMP", + "IPPROTO_IPCV", + "IPPROTO_IPEIP", + "IPPROTO_IPIP", + "IPPROTO_IPPC", + "IPPROTO_IPV4", + "IPPROTO_IPV6", + "IPPROTO_IPV6_ICMP", + "IPPROTO_IRTP", + "IPPROTO_KRYPTOLAN", + "IPPROTO_LARP", + "IPPROTO_LEAF1", + "IPPROTO_LEAF2", + "IPPROTO_MAX", + "IPPROTO_MAXID", + "IPPROTO_MEAS", + "IPPROTO_MH", + "IPPROTO_MHRP", + "IPPROTO_MICP", + "IPPROTO_MOBILE", + "IPPROTO_MPLS", + "IPPROTO_MTP", + "IPPROTO_MUX", + "IPPROTO_ND", + "IPPROTO_NHRP", + "IPPROTO_NONE", + "IPPROTO_NSP", + "IPPROTO_NVPII", + "IPPROTO_OLD_DIVERT", + "IPPROTO_OSPFIGP", + "IPPROTO_PFSYNC", + "IPPROTO_PGM", + "IPPROTO_PIGP", + "IPPROTO_PIM", + "IPPROTO_PRM", + "IPPROTO_PUP", + "IPPROTO_PVP", + "IPPROTO_RAW", + "IPPROTO_RCCMON", + "IPPROTO_RDP", + "IPPROTO_ROUTING", + "IPPROTO_RSVP", + "IPPROTO_RVD", + "IPPROTO_SATEXPAK", + "IPPROTO_SATMON", + "IPPROTO_SCCSP", + "IPPROTO_SCTP", + "IPPROTO_SDRP", + "IPPROTO_SEND", + "IPPROTO_SEP", + "IPPROTO_SKIP", + "IPPROTO_SPACER", + "IPPROTO_SRPC", + "IPPROTO_ST", + "IPPROTO_SVMTP", + "IPPROTO_SWIPE", + "IPPROTO_TCF", + "IPPROTO_TCP", + "IPPROTO_TLSP", + "IPPROTO_TP", + "IPPROTO_TPXX", + "IPPROTO_TRUNK1", + "IPPROTO_TRUNK2", + "IPPROTO_TTP", + "IPPROTO_UDP", + "IPPROTO_UDPLITE", + "IPPROTO_VINES", + "IPPROTO_VISA", + "IPPROTO_VMTP", + "IPPROTO_VRRP", + "IPPROTO_WBEXPAK", + "IPPROTO_WBMON", + "IPPROTO_WSN", + "IPPROTO_XNET", + "IPPROTO_XTP", + "IPV6_2292DSTOPTS", + "IPV6_2292HOPLIMIT", + "IPV6_2292HOPOPTS", + "IPV6_2292NEXTHOP", + "IPV6_2292PKTINFO", + "IPV6_2292PKTOPTIONS", + "IPV6_2292RTHDR", + "IPV6_ADDRFORM", + "IPV6_ADD_MEMBERSHIP", + "IPV6_AUTHHDR", + "IPV6_AUTH_LEVEL", + "IPV6_AUTOFLOWLABEL", + "IPV6_BINDANY", + "IPV6_BINDV6ONLY", + "IPV6_BOUND_IF", + "IPV6_CHECKSUM", + "IPV6_DEFAULT_MULTICAST_HOPS", + "IPV6_DEFAULT_MULTICAST_LOOP", + "IPV6_DEFHLIM", + "IPV6_DONTFRAG", + "IPV6_DROP_MEMBERSHIP", + "IPV6_DSTOPTS", + "IPV6_ESP_NETWORK_LEVEL", + "IPV6_ESP_TRANS_LEVEL", + "IPV6_FAITH", + "IPV6_FLOWINFO_MASK", + "IPV6_FLOWLABEL_MASK", + "IPV6_FRAGTTL", + "IPV6_FW_ADD", + "IPV6_FW_DEL", + "IPV6_FW_FLUSH", + "IPV6_FW_GET", + "IPV6_FW_ZERO", + "IPV6_HLIMDEC", + "IPV6_HOPLIMIT", + "IPV6_HOPOPTS", + "IPV6_IPCOMP_LEVEL", + "IPV6_IPSEC_POLICY", + "IPV6_JOIN_ANYCAST", + "IPV6_JOIN_GROUP", + "IPV6_LEAVE_ANYCAST", + "IPV6_LEAVE_GROUP", + "IPV6_MAXHLIM", + "IPV6_MAXOPTHDR", + "IPV6_MAXPACKET", + "IPV6_MAX_GROUP_SRC_FILTER", + "IPV6_MAX_MEMBERSHIPS", + "IPV6_MAX_SOCK_SRC_FILTER", + "IPV6_MIN_MEMBERSHIPS", + "IPV6_MMTU", + "IPV6_MSFILTER", + "IPV6_MTU", + "IPV6_MTU_DISCOVER", + "IPV6_MULTICAST_HOPS", + "IPV6_MULTICAST_IF", + "IPV6_MULTICAST_LOOP", + "IPV6_NEXTHOP", + "IPV6_OPTIONS", + "IPV6_PATHMTU", + "IPV6_PIPEX", + "IPV6_PKTINFO", + "IPV6_PMTUDISC_DO", + "IPV6_PMTUDISC_DONT", + "IPV6_PMTUDISC_PROBE", + "IPV6_PMTUDISC_WANT", + "IPV6_PORTRANGE", + "IPV6_PORTRANGE_DEFAULT", + "IPV6_PORTRANGE_HIGH", + "IPV6_PORTRANGE_LOW", + "IPV6_PREFER_TEMPADDR", + "IPV6_RECVDSTOPTS", + "IPV6_RECVDSTPORT", + "IPV6_RECVERR", + "IPV6_RECVHOPLIMIT", + "IPV6_RECVHOPOPTS", + "IPV6_RECVPATHMTU", + "IPV6_RECVPKTINFO", + "IPV6_RECVRTHDR", + "IPV6_RECVTCLASS", + "IPV6_ROUTER_ALERT", + "IPV6_RTABLE", + "IPV6_RTHDR", + "IPV6_RTHDRDSTOPTS", + "IPV6_RTHDR_LOOSE", + "IPV6_RTHDR_STRICT", + "IPV6_RTHDR_TYPE_0", + "IPV6_RXDSTOPTS", + "IPV6_RXHOPOPTS", + "IPV6_SOCKOPT_RESERVED1", + "IPV6_TCLASS", + "IPV6_UNICAST_HOPS", + "IPV6_USE_MIN_MTU", + "IPV6_V6ONLY", + "IPV6_VERSION", + "IPV6_VERSION_MASK", + "IPV6_XFRM_POLICY", + "IP_ADD_MEMBERSHIP", + "IP_ADD_SOURCE_MEMBERSHIP", + "IP_AUTH_LEVEL", + "IP_BINDANY", + "IP_BLOCK_SOURCE", + "IP_BOUND_IF", + "IP_DEFAULT_MULTICAST_LOOP", + "IP_DEFAULT_MULTICAST_TTL", + "IP_DF", + "IP_DIVERTFL", + "IP_DONTFRAG", + "IP_DROP_MEMBERSHIP", + "IP_DROP_SOURCE_MEMBERSHIP", + "IP_DUMMYNET3", + "IP_DUMMYNET_CONFIGURE", + "IP_DUMMYNET_DEL", + "IP_DUMMYNET_FLUSH", + "IP_DUMMYNET_GET", + "IP_EF", + "IP_ERRORMTU", + "IP_ESP_NETWORK_LEVEL", + "IP_ESP_TRANS_LEVEL", + "IP_FAITH", + "IP_FREEBIND", + "IP_FW3", + "IP_FW_ADD", + "IP_FW_DEL", + "IP_FW_FLUSH", + "IP_FW_GET", + "IP_FW_NAT_CFG", + "IP_FW_NAT_DEL", + "IP_FW_NAT_GET_CONFIG", + "IP_FW_NAT_GET_LOG", + "IP_FW_RESETLOG", + "IP_FW_TABLE_ADD", + "IP_FW_TABLE_DEL", + "IP_FW_TABLE_FLUSH", + "IP_FW_TABLE_GETSIZE", + "IP_FW_TABLE_LIST", + "IP_FW_ZERO", + "IP_HDRINCL", + "IP_IPCOMP_LEVEL", + "IP_IPSECFLOWINFO", + "IP_IPSEC_LOCAL_AUTH", + "IP_IPSEC_LOCAL_CRED", + "IP_IPSEC_LOCAL_ID", + "IP_IPSEC_POLICY", + "IP_IPSEC_REMOTE_AUTH", + "IP_IPSEC_REMOTE_CRED", + "IP_IPSEC_REMOTE_ID", + "IP_MAXPACKET", + "IP_MAX_GROUP_SRC_FILTER", + "IP_MAX_MEMBERSHIPS", + "IP_MAX_SOCK_MUTE_FILTER", + "IP_MAX_SOCK_SRC_FILTER", + "IP_MAX_SOURCE_FILTER", + "IP_MF", + "IP_MINFRAGSIZE", + "IP_MINTTL", + "IP_MIN_MEMBERSHIPS", + "IP_MSFILTER", + "IP_MSS", + "IP_MTU", + "IP_MTU_DISCOVER", + "IP_MULTICAST_IF", + "IP_MULTICAST_IFINDEX", + "IP_MULTICAST_LOOP", + "IP_MULTICAST_TTL", + "IP_MULTICAST_VIF", + "IP_NAT__XXX", + "IP_OFFMASK", + "IP_OLD_FW_ADD", + "IP_OLD_FW_DEL", + "IP_OLD_FW_FLUSH", + "IP_OLD_FW_GET", + "IP_OLD_FW_RESETLOG", + "IP_OLD_FW_ZERO", + "IP_ONESBCAST", + "IP_OPTIONS", + "IP_ORIGDSTADDR", + "IP_PASSSEC", + "IP_PIPEX", + "IP_PKTINFO", + "IP_PKTOPTIONS", + "IP_PMTUDISC", + "IP_PMTUDISC_DO", + "IP_PMTUDISC_DONT", + "IP_PMTUDISC_PROBE", + "IP_PMTUDISC_WANT", + "IP_PORTRANGE", + "IP_PORTRANGE_DEFAULT", + "IP_PORTRANGE_HIGH", + "IP_PORTRANGE_LOW", + "IP_RECVDSTADDR", + "IP_RECVDSTPORT", + "IP_RECVERR", + "IP_RECVIF", + "IP_RECVOPTS", + "IP_RECVORIGDSTADDR", + "IP_RECVPKTINFO", + "IP_RECVRETOPTS", + "IP_RECVRTABLE", + "IP_RECVTOS", + "IP_RECVTTL", + "IP_RETOPTS", + "IP_RF", + "IP_ROUTER_ALERT", + "IP_RSVP_OFF", + "IP_RSVP_ON", + "IP_RSVP_VIF_OFF", + "IP_RSVP_VIF_ON", + "IP_RTABLE", + "IP_SENDSRCADDR", + "IP_STRIPHDR", + "IP_TOS", + "IP_TRAFFIC_MGT_BACKGROUND", + "IP_TRANSPARENT", + "IP_TTL", + "IP_UNBLOCK_SOURCE", + "IP_XFRM_POLICY", + "IPv6MTUInfo", + "IPv6Mreq", + "ISIG", + "ISTRIP", + "IUCLC", + "IUTF8", + "IXANY", + "IXOFF", + "IXON", + "IfAddrmsg", + "IfAnnounceMsghdr", + "IfData", + "IfInfomsg", + "IfMsghdr", + "IfaMsghdr", + "IfmaMsghdr", + "IfmaMsghdr2", + "ImplementsGetwd", + "Inet4Pktinfo", + "Inet6Pktinfo", + "InotifyAddWatch", + "InotifyEvent", + "InotifyInit", + "InotifyInit1", + "InotifyRmWatch", + "InterfaceAddrMessage", + "InterfaceAnnounceMessage", + "InterfaceInfo", + "InterfaceMessage", + "InterfaceMulticastAddrMessage", + "InvalidHandle", + "Ioperm", + "Iopl", + "Iovec", + "IpAdapterInfo", + "IpAddrString", + "IpAddressString", + "IpMaskString", + "Issetugid", + "KEY_ALL_ACCESS", + "KEY_CREATE_LINK", + "KEY_CREATE_SUB_KEY", + "KEY_ENUMERATE_SUB_KEYS", + "KEY_EXECUTE", + "KEY_NOTIFY", + "KEY_QUERY_VALUE", + "KEY_READ", + "KEY_SET_VALUE", + "KEY_WOW64_32KEY", + "KEY_WOW64_64KEY", + "KEY_WRITE", + "Kevent", + "Kevent_t", + "Kill", + "Klogctl", + "Kqueue", + "LANG_ENGLISH", + "LAYERED_PROTOCOL", + "LCNT_OVERLOAD_FLUSH", + "LINUX_REBOOT_CMD_CAD_OFF", + "LINUX_REBOOT_CMD_CAD_ON", + "LINUX_REBOOT_CMD_HALT", + "LINUX_REBOOT_CMD_KEXEC", + "LINUX_REBOOT_CMD_POWER_OFF", + "LINUX_REBOOT_CMD_RESTART", + "LINUX_REBOOT_CMD_RESTART2", + "LINUX_REBOOT_CMD_SW_SUSPEND", + "LINUX_REBOOT_MAGIC1", + "LINUX_REBOOT_MAGIC2", + "LOCK_EX", + "LOCK_NB", + "LOCK_SH", + "LOCK_UN", + "LazyDLL", + "LazyProc", + "Lchown", + "Linger", + "Link", + "Listen", + "Listxattr", + "LoadCancelIoEx", + "LoadConnectEx", + "LoadCreateSymbolicLink", + "LoadDLL", + "LoadGetAddrInfo", + "LoadLibrary", + "LoadSetFileCompletionNotificationModes", + "LocalFree", + "Log2phys_t", + "LookupAccountName", + "LookupAccountSid", + "LookupSID", + "LsfJump", + "LsfSocket", + "LsfStmt", + "Lstat", + "MADV_AUTOSYNC", + "MADV_CAN_REUSE", + "MADV_CORE", + "MADV_DOFORK", + "MADV_DONTFORK", + "MADV_DONTNEED", + "MADV_FREE", + "MADV_FREE_REUSABLE", + "MADV_FREE_REUSE", + "MADV_HUGEPAGE", + "MADV_HWPOISON", + "MADV_MERGEABLE", + "MADV_NOCORE", + "MADV_NOHUGEPAGE", + "MADV_NORMAL", + "MADV_NOSYNC", + "MADV_PROTECT", + "MADV_RANDOM", + "MADV_REMOVE", + "MADV_SEQUENTIAL", + "MADV_SPACEAVAIL", + "MADV_UNMERGEABLE", + "MADV_WILLNEED", + "MADV_ZERO_WIRED_PAGES", + "MAP_32BIT", + "MAP_ALIGNED_SUPER", + "MAP_ALIGNMENT_16MB", + "MAP_ALIGNMENT_1TB", + "MAP_ALIGNMENT_256TB", + "MAP_ALIGNMENT_4GB", + "MAP_ALIGNMENT_64KB", + "MAP_ALIGNMENT_64PB", + "MAP_ALIGNMENT_MASK", + "MAP_ALIGNMENT_SHIFT", + "MAP_ANON", + "MAP_ANONYMOUS", + "MAP_COPY", + "MAP_DENYWRITE", + "MAP_EXECUTABLE", + "MAP_FILE", + "MAP_FIXED", + "MAP_FLAGMASK", + "MAP_GROWSDOWN", + "MAP_HASSEMAPHORE", + "MAP_HUGETLB", + "MAP_INHERIT", + "MAP_INHERIT_COPY", + "MAP_INHERIT_DEFAULT", + "MAP_INHERIT_DONATE_COPY", + "MAP_INHERIT_NONE", + "MAP_INHERIT_SHARE", + "MAP_JIT", + "MAP_LOCKED", + "MAP_NOCACHE", + "MAP_NOCORE", + "MAP_NOEXTEND", + "MAP_NONBLOCK", + "MAP_NORESERVE", + "MAP_NOSYNC", + "MAP_POPULATE", + "MAP_PREFAULT_READ", + "MAP_PRIVATE", + "MAP_RENAME", + "MAP_RESERVED0080", + "MAP_RESERVED0100", + "MAP_SHARED", + "MAP_STACK", + "MAP_TRYFIXED", + "MAP_TYPE", + "MAP_WIRED", + "MAXIMUM_REPARSE_DATA_BUFFER_SIZE", + "MAXLEN_IFDESCR", + "MAXLEN_PHYSADDR", + "MAX_ADAPTER_ADDRESS_LENGTH", + "MAX_ADAPTER_DESCRIPTION_LENGTH", + "MAX_ADAPTER_NAME_LENGTH", + "MAX_COMPUTERNAME_LENGTH", + "MAX_INTERFACE_NAME_LEN", + "MAX_LONG_PATH", + "MAX_PATH", + "MAX_PROTOCOL_CHAIN", + "MCL_CURRENT", + "MCL_FUTURE", + "MNT_DETACH", + "MNT_EXPIRE", + "MNT_FORCE", + "MSG_BCAST", + "MSG_CMSG_CLOEXEC", + "MSG_COMPAT", + "MSG_CONFIRM", + "MSG_CONTROLMBUF", + "MSG_CTRUNC", + "MSG_DONTROUTE", + "MSG_DONTWAIT", + "MSG_EOF", + "MSG_EOR", + "MSG_ERRQUEUE", + "MSG_FASTOPEN", + "MSG_FIN", + "MSG_FLUSH", + "MSG_HAVEMORE", + "MSG_HOLD", + "MSG_IOVUSRSPACE", + "MSG_LENUSRSPACE", + "MSG_MCAST", + "MSG_MORE", + "MSG_NAMEMBUF", + "MSG_NBIO", + "MSG_NEEDSA", + "MSG_NOSIGNAL", + "MSG_NOTIFICATION", + "MSG_OOB", + "MSG_PEEK", + "MSG_PROXY", + "MSG_RCVMORE", + "MSG_RST", + "MSG_SEND", + "MSG_SYN", + "MSG_TRUNC", + "MSG_TRYHARD", + "MSG_USERFLAGS", + "MSG_WAITALL", + "MSG_WAITFORONE", + "MSG_WAITSTREAM", + "MS_ACTIVE", + "MS_ASYNC", + "MS_BIND", + "MS_DEACTIVATE", + "MS_DIRSYNC", + "MS_INVALIDATE", + "MS_I_VERSION", + "MS_KERNMOUNT", + "MS_KILLPAGES", + "MS_MANDLOCK", + "MS_MGC_MSK", + "MS_MGC_VAL", + "MS_MOVE", + "MS_NOATIME", + "MS_NODEV", + "MS_NODIRATIME", + "MS_NOEXEC", + "MS_NOSUID", + "MS_NOUSER", + "MS_POSIXACL", + "MS_PRIVATE", + "MS_RDONLY", + "MS_REC", + "MS_RELATIME", + "MS_REMOUNT", + "MS_RMT_MASK", + "MS_SHARED", + "MS_SILENT", + "MS_SLAVE", + "MS_STRICTATIME", + "MS_SYNC", + "MS_SYNCHRONOUS", + "MS_UNBINDABLE", + "Madvise", + "MapViewOfFile", + "MaxTokenInfoClass", + "Mclpool", + "MibIfRow", + "Mkdir", + "Mkdirat", + "Mkfifo", + "Mknod", + "Mknodat", + "Mlock", + "Mlockall", + "Mmap", + "Mount", + "MoveFile", + "Mprotect", + "Msghdr", + "Munlock", + "Munlockall", + "Munmap", + "MustLoadDLL", + "NAME_MAX", + "NETLINK_ADD_MEMBERSHIP", + "NETLINK_AUDIT", + "NETLINK_BROADCAST_ERROR", + "NETLINK_CONNECTOR", + "NETLINK_DNRTMSG", + "NETLINK_DROP_MEMBERSHIP", + "NETLINK_ECRYPTFS", + "NETLINK_FIB_LOOKUP", + "NETLINK_FIREWALL", + "NETLINK_GENERIC", + "NETLINK_INET_DIAG", + "NETLINK_IP6_FW", + "NETLINK_ISCSI", + "NETLINK_KOBJECT_UEVENT", + "NETLINK_NETFILTER", + "NETLINK_NFLOG", + "NETLINK_NO_ENOBUFS", + "NETLINK_PKTINFO", + "NETLINK_RDMA", + "NETLINK_ROUTE", + "NETLINK_SCSITRANSPORT", + "NETLINK_SELINUX", + "NETLINK_UNUSED", + "NETLINK_USERSOCK", + "NETLINK_XFRM", + "NET_RT_DUMP", + "NET_RT_DUMP2", + "NET_RT_FLAGS", + "NET_RT_IFLIST", + "NET_RT_IFLIST2", + "NET_RT_IFLISTL", + "NET_RT_IFMALIST", + "NET_RT_MAXID", + "NET_RT_OIFLIST", + "NET_RT_OOIFLIST", + "NET_RT_STAT", + "NET_RT_STATS", + "NET_RT_TABLE", + "NET_RT_TRASH", + "NLA_ALIGNTO", + "NLA_F_NESTED", + "NLA_F_NET_BYTEORDER", + "NLA_HDRLEN", + "NLMSG_ALIGNTO", + "NLMSG_DONE", + "NLMSG_ERROR", + "NLMSG_HDRLEN", + "NLMSG_MIN_TYPE", + "NLMSG_NOOP", + "NLMSG_OVERRUN", + "NLM_F_ACK", + "NLM_F_APPEND", + "NLM_F_ATOMIC", + "NLM_F_CREATE", + "NLM_F_DUMP", + "NLM_F_ECHO", + "NLM_F_EXCL", + "NLM_F_MATCH", + "NLM_F_MULTI", + "NLM_F_REPLACE", + "NLM_F_REQUEST", + "NLM_F_ROOT", + "NOFLSH", + "NOTE_ABSOLUTE", + "NOTE_ATTRIB", + "NOTE_CHILD", + "NOTE_DELETE", + "NOTE_EOF", + "NOTE_EXEC", + "NOTE_EXIT", + "NOTE_EXITSTATUS", + "NOTE_EXTEND", + "NOTE_FFAND", + "NOTE_FFCOPY", + "NOTE_FFCTRLMASK", + "NOTE_FFLAGSMASK", + "NOTE_FFNOP", + "NOTE_FFOR", + "NOTE_FORK", + "NOTE_LINK", + "NOTE_LOWAT", + "NOTE_NONE", + "NOTE_NSECONDS", + "NOTE_PCTRLMASK", + "NOTE_PDATAMASK", + "NOTE_REAP", + "NOTE_RENAME", + "NOTE_RESOURCEEND", + "NOTE_REVOKE", + "NOTE_SECONDS", + "NOTE_SIGNAL", + "NOTE_TRACK", + "NOTE_TRACKERR", + "NOTE_TRIGGER", + "NOTE_TRUNCATE", + "NOTE_USECONDS", + "NOTE_VM_ERROR", + "NOTE_VM_PRESSURE", + "NOTE_VM_PRESSURE_SUDDEN_TERMINATE", + "NOTE_VM_PRESSURE_TERMINATE", + "NOTE_WRITE", + "NameCanonical", + "NameCanonicalEx", + "NameDisplay", + "NameDnsDomain", + "NameFullyQualifiedDN", + "NameSamCompatible", + "NameServicePrincipal", + "NameUniqueId", + "NameUnknown", + "NameUserPrincipal", + "Nanosleep", + "NetApiBufferFree", + "NetGetJoinInformation", + "NetSetupDomainName", + "NetSetupUnjoined", + "NetSetupUnknownStatus", + "NetSetupWorkgroupName", + "NetUserGetInfo", + "NetlinkMessage", + "NetlinkRIB", + "NetlinkRouteAttr", + "NetlinkRouteRequest", + "NewCallback", + "NewCallbackCDecl", + "NewLazyDLL", + "NlAttr", + "NlMsgerr", + "NlMsghdr", + "NsecToFiletime", + "NsecToTimespec", + "NsecToTimeval", + "Ntohs", + "OCRNL", + "OFDEL", + "OFILL", + "OFIOGETBMAP", + "OID_PKIX_KP_SERVER_AUTH", + "OID_SERVER_GATED_CRYPTO", + "OID_SGC_NETSCAPE", + "OLCUC", + "ONLCR", + "ONLRET", + "ONOCR", + "ONOEOT", + "OPEN_ALWAYS", + "OPEN_EXISTING", + "OPOST", + "O_ACCMODE", + "O_ALERT", + "O_ALT_IO", + "O_APPEND", + "O_ASYNC", + "O_CLOEXEC", + "O_CREAT", + "O_DIRECT", + "O_DIRECTORY", + "O_DSYNC", + "O_EVTONLY", + "O_EXCL", + "O_EXEC", + "O_EXLOCK", + "O_FSYNC", + "O_LARGEFILE", + "O_NDELAY", + "O_NOATIME", + "O_NOCTTY", + "O_NOFOLLOW", + "O_NONBLOCK", + "O_NOSIGPIPE", + "O_POPUP", + "O_RDONLY", + "O_RDWR", + "O_RSYNC", + "O_SHLOCK", + "O_SYMLINK", + "O_SYNC", + "O_TRUNC", + "O_TTY_INIT", + "O_WRONLY", + "Open", + "OpenCurrentProcessToken", + "OpenProcess", + "OpenProcessToken", + "Openat", + "Overlapped", + "PACKET_ADD_MEMBERSHIP", + "PACKET_BROADCAST", + "PACKET_DROP_MEMBERSHIP", + "PACKET_FASTROUTE", + "PACKET_HOST", + "PACKET_LOOPBACK", + "PACKET_MR_ALLMULTI", + "PACKET_MR_MULTICAST", + "PACKET_MR_PROMISC", + "PACKET_MULTICAST", + "PACKET_OTHERHOST", + "PACKET_OUTGOING", + "PACKET_RECV_OUTPUT", + "PACKET_RX_RING", + "PACKET_STATISTICS", + "PAGE_EXECUTE_READ", + "PAGE_EXECUTE_READWRITE", + "PAGE_EXECUTE_WRITECOPY", + "PAGE_READONLY", + "PAGE_READWRITE", + "PAGE_WRITECOPY", + "PARENB", + "PARMRK", + "PARODD", + "PENDIN", + "PFL_HIDDEN", + "PFL_MATCHES_PROTOCOL_ZERO", + "PFL_MULTIPLE_PROTO_ENTRIES", + "PFL_NETWORKDIRECT_PROVIDER", + "PFL_RECOMMENDED_PROTO_ENTRY", + "PF_FLUSH", + "PKCS_7_ASN_ENCODING", + "PMC5_PIPELINE_FLUSH", + "PRIO_PGRP", + "PRIO_PROCESS", + "PRIO_USER", + "PRI_IOFLUSH", + "PROCESS_QUERY_INFORMATION", + "PROCESS_TERMINATE", + "PROT_EXEC", + "PROT_GROWSDOWN", + "PROT_GROWSUP", + "PROT_NONE", + "PROT_READ", + "PROT_WRITE", + "PROV_DH_SCHANNEL", + "PROV_DSS", + "PROV_DSS_DH", + "PROV_EC_ECDSA_FULL", + "PROV_EC_ECDSA_SIG", + "PROV_EC_ECNRA_FULL", + "PROV_EC_ECNRA_SIG", + "PROV_FORTEZZA", + "PROV_INTEL_SEC", + "PROV_MS_EXCHANGE", + "PROV_REPLACE_OWF", + "PROV_RNG", + "PROV_RSA_AES", + "PROV_RSA_FULL", + "PROV_RSA_SCHANNEL", + "PROV_RSA_SIG", + "PROV_SPYRUS_LYNKS", + "PROV_SSL", + "PR_CAPBSET_DROP", + "PR_CAPBSET_READ", + "PR_CLEAR_SECCOMP_FILTER", + "PR_ENDIAN_BIG", + "PR_ENDIAN_LITTLE", + "PR_ENDIAN_PPC_LITTLE", + "PR_FPEMU_NOPRINT", + "PR_FPEMU_SIGFPE", + "PR_FP_EXC_ASYNC", + "PR_FP_EXC_DISABLED", + "PR_FP_EXC_DIV", + "PR_FP_EXC_INV", + "PR_FP_EXC_NONRECOV", + "PR_FP_EXC_OVF", + "PR_FP_EXC_PRECISE", + "PR_FP_EXC_RES", + "PR_FP_EXC_SW_ENABLE", + "PR_FP_EXC_UND", + "PR_GET_DUMPABLE", + "PR_GET_ENDIAN", + "PR_GET_FPEMU", + "PR_GET_FPEXC", + "PR_GET_KEEPCAPS", + "PR_GET_NAME", + "PR_GET_PDEATHSIG", + "PR_GET_SECCOMP", + "PR_GET_SECCOMP_FILTER", + "PR_GET_SECUREBITS", + "PR_GET_TIMERSLACK", + "PR_GET_TIMING", + "PR_GET_TSC", + "PR_GET_UNALIGN", + "PR_MCE_KILL", + "PR_MCE_KILL_CLEAR", + "PR_MCE_KILL_DEFAULT", + "PR_MCE_KILL_EARLY", + "PR_MCE_KILL_GET", + "PR_MCE_KILL_LATE", + "PR_MCE_KILL_SET", + "PR_SECCOMP_FILTER_EVENT", + "PR_SECCOMP_FILTER_SYSCALL", + "PR_SET_DUMPABLE", + "PR_SET_ENDIAN", + "PR_SET_FPEMU", + "PR_SET_FPEXC", + "PR_SET_KEEPCAPS", + "PR_SET_NAME", + "PR_SET_PDEATHSIG", + "PR_SET_PTRACER", + "PR_SET_SECCOMP", + "PR_SET_SECCOMP_FILTER", + "PR_SET_SECUREBITS", + "PR_SET_TIMERSLACK", + "PR_SET_TIMING", + "PR_SET_TSC", + "PR_SET_UNALIGN", + "PR_TASK_PERF_EVENTS_DISABLE", + "PR_TASK_PERF_EVENTS_ENABLE", + "PR_TIMING_STATISTICAL", + "PR_TIMING_TIMESTAMP", + "PR_TSC_ENABLE", + "PR_TSC_SIGSEGV", + "PR_UNALIGN_NOPRINT", + "PR_UNALIGN_SIGBUS", + "PTRACE_ARCH_PRCTL", + "PTRACE_ATTACH", + "PTRACE_CONT", + "PTRACE_DETACH", + "PTRACE_EVENT_CLONE", + "PTRACE_EVENT_EXEC", + "PTRACE_EVENT_EXIT", + "PTRACE_EVENT_FORK", + "PTRACE_EVENT_VFORK", + "PTRACE_EVENT_VFORK_DONE", + "PTRACE_GETCRUNCHREGS", + "PTRACE_GETEVENTMSG", + "PTRACE_GETFPREGS", + "PTRACE_GETFPXREGS", + "PTRACE_GETHBPREGS", + "PTRACE_GETREGS", + "PTRACE_GETREGSET", + "PTRACE_GETSIGINFO", + "PTRACE_GETVFPREGS", + "PTRACE_GETWMMXREGS", + "PTRACE_GET_THREAD_AREA", + "PTRACE_KILL", + "PTRACE_OLDSETOPTIONS", + "PTRACE_O_MASK", + "PTRACE_O_TRACECLONE", + "PTRACE_O_TRACEEXEC", + "PTRACE_O_TRACEEXIT", + "PTRACE_O_TRACEFORK", + "PTRACE_O_TRACESYSGOOD", + "PTRACE_O_TRACEVFORK", + "PTRACE_O_TRACEVFORKDONE", + "PTRACE_PEEKDATA", + "PTRACE_PEEKTEXT", + "PTRACE_PEEKUSR", + "PTRACE_POKEDATA", + "PTRACE_POKETEXT", + "PTRACE_POKEUSR", + "PTRACE_SETCRUNCHREGS", + "PTRACE_SETFPREGS", + "PTRACE_SETFPXREGS", + "PTRACE_SETHBPREGS", + "PTRACE_SETOPTIONS", + "PTRACE_SETREGS", + "PTRACE_SETREGSET", + "PTRACE_SETSIGINFO", + "PTRACE_SETVFPREGS", + "PTRACE_SETWMMXREGS", + "PTRACE_SET_SYSCALL", + "PTRACE_SET_THREAD_AREA", + "PTRACE_SINGLEBLOCK", + "PTRACE_SINGLESTEP", + "PTRACE_SYSCALL", + "PTRACE_SYSEMU", + "PTRACE_SYSEMU_SINGLESTEP", + "PTRACE_TRACEME", + "PT_ATTACH", + "PT_ATTACHEXC", + "PT_CONTINUE", + "PT_DATA_ADDR", + "PT_DENY_ATTACH", + "PT_DETACH", + "PT_FIRSTMACH", + "PT_FORCEQUOTA", + "PT_KILL", + "PT_MASK", + "PT_READ_D", + "PT_READ_I", + "PT_READ_U", + "PT_SIGEXC", + "PT_STEP", + "PT_TEXT_ADDR", + "PT_TEXT_END_ADDR", + "PT_THUPDATE", + "PT_TRACE_ME", + "PT_WRITE_D", + "PT_WRITE_I", + "PT_WRITE_U", + "ParseDirent", + "ParseNetlinkMessage", + "ParseNetlinkRouteAttr", + "ParseRoutingMessage", + "ParseRoutingSockaddr", + "ParseSocketControlMessage", + "ParseUnixCredentials", + "ParseUnixRights", + "PathMax", + "Pathconf", + "Pause", + "Pipe", + "Pipe2", + "PivotRoot", + "Pointer", + "PostQueuedCompletionStatus", + "Pread", + "Proc", + "ProcAttr", + "Process32First", + "Process32Next", + "ProcessEntry32", + "ProcessInformation", + "Protoent", + "PtraceAttach", + "PtraceCont", + "PtraceDetach", + "PtraceGetEventMsg", + "PtraceGetRegs", + "PtracePeekData", + "PtracePeekText", + "PtracePokeData", + "PtracePokeText", + "PtraceRegs", + "PtraceSetOptions", + "PtraceSetRegs", + "PtraceSingleStep", + "PtraceSyscall", + "Pwrite", + "REG_BINARY", + "REG_DWORD", + "REG_DWORD_BIG_ENDIAN", + "REG_DWORD_LITTLE_ENDIAN", + "REG_EXPAND_SZ", + "REG_FULL_RESOURCE_DESCRIPTOR", + "REG_LINK", + "REG_MULTI_SZ", + "REG_NONE", + "REG_QWORD", + "REG_QWORD_LITTLE_ENDIAN", + "REG_RESOURCE_LIST", + "REG_RESOURCE_REQUIREMENTS_LIST", + "REG_SZ", + "RLIMIT_AS", + "RLIMIT_CORE", + "RLIMIT_CPU", + "RLIMIT_DATA", + "RLIMIT_FSIZE", + "RLIMIT_NOFILE", + "RLIMIT_STACK", + "RLIM_INFINITY", + "RTAX_ADVMSS", + "RTAX_AUTHOR", + "RTAX_BRD", + "RTAX_CWND", + "RTAX_DST", + "RTAX_FEATURES", + "RTAX_FEATURE_ALLFRAG", + "RTAX_FEATURE_ECN", + "RTAX_FEATURE_SACK", + "RTAX_FEATURE_TIMESTAMP", + "RTAX_GATEWAY", + "RTAX_GENMASK", + "RTAX_HOPLIMIT", + "RTAX_IFA", + "RTAX_IFP", + "RTAX_INITCWND", + "RTAX_INITRWND", + "RTAX_LABEL", + "RTAX_LOCK", + "RTAX_MAX", + "RTAX_MTU", + "RTAX_NETMASK", + "RTAX_REORDERING", + "RTAX_RTO_MIN", + "RTAX_RTT", + "RTAX_RTTVAR", + "RTAX_SRC", + "RTAX_SRCMASK", + "RTAX_SSTHRESH", + "RTAX_TAG", + "RTAX_UNSPEC", + "RTAX_WINDOW", + "RTA_ALIGNTO", + "RTA_AUTHOR", + "RTA_BRD", + "RTA_CACHEINFO", + "RTA_DST", + "RTA_FLOW", + "RTA_GATEWAY", + "RTA_GENMASK", + "RTA_IFA", + "RTA_IFP", + "RTA_IIF", + "RTA_LABEL", + "RTA_MAX", + "RTA_METRICS", + "RTA_MULTIPATH", + "RTA_NETMASK", + "RTA_OIF", + "RTA_PREFSRC", + "RTA_PRIORITY", + "RTA_SRC", + "RTA_SRCMASK", + "RTA_TABLE", + "RTA_TAG", + "RTA_UNSPEC", + "RTCF_DIRECTSRC", + "RTCF_DOREDIRECT", + "RTCF_LOG", + "RTCF_MASQ", + "RTCF_NAT", + "RTCF_VALVE", + "RTF_ADDRCLASSMASK", + "RTF_ADDRCONF", + "RTF_ALLONLINK", + "RTF_ANNOUNCE", + "RTF_BLACKHOLE", + "RTF_BROADCAST", + "RTF_CACHE", + "RTF_CLONED", + "RTF_CLONING", + "RTF_CONDEMNED", + "RTF_DEFAULT", + "RTF_DELCLONE", + "RTF_DONE", + "RTF_DYNAMIC", + "RTF_FLOW", + "RTF_FMASK", + "RTF_GATEWAY", + "RTF_GWFLAG_COMPAT", + "RTF_HOST", + "RTF_IFREF", + "RTF_IFSCOPE", + "RTF_INTERFACE", + "RTF_IRTT", + "RTF_LINKRT", + "RTF_LLDATA", + "RTF_LLINFO", + "RTF_LOCAL", + "RTF_MASK", + "RTF_MODIFIED", + "RTF_MPATH", + "RTF_MPLS", + "RTF_MSS", + "RTF_MTU", + "RTF_MULTICAST", + "RTF_NAT", + "RTF_NOFORWARD", + "RTF_NONEXTHOP", + "RTF_NOPMTUDISC", + "RTF_PERMANENT_ARP", + "RTF_PINNED", + "RTF_POLICY", + "RTF_PRCLONING", + "RTF_PROTO1", + "RTF_PROTO2", + "RTF_PROTO3", + "RTF_REINSTATE", + "RTF_REJECT", + "RTF_RNH_LOCKED", + "RTF_SOURCE", + "RTF_SRC", + "RTF_STATIC", + "RTF_STICKY", + "RTF_THROW", + "RTF_TUNNEL", + "RTF_UP", + "RTF_USETRAILERS", + "RTF_WASCLONED", + "RTF_WINDOW", + "RTF_XRESOLVE", + "RTM_ADD", + "RTM_BASE", + "RTM_CHANGE", + "RTM_CHGADDR", + "RTM_DELACTION", + "RTM_DELADDR", + "RTM_DELADDRLABEL", + "RTM_DELETE", + "RTM_DELLINK", + "RTM_DELMADDR", + "RTM_DELNEIGH", + "RTM_DELQDISC", + "RTM_DELROUTE", + "RTM_DELRULE", + "RTM_DELTCLASS", + "RTM_DELTFILTER", + "RTM_DESYNC", + "RTM_F_CLONED", + "RTM_F_EQUALIZE", + "RTM_F_NOTIFY", + "RTM_F_PREFIX", + "RTM_GET", + "RTM_GET2", + "RTM_GETACTION", + "RTM_GETADDR", + "RTM_GETADDRLABEL", + "RTM_GETANYCAST", + "RTM_GETDCB", + "RTM_GETLINK", + "RTM_GETMULTICAST", + "RTM_GETNEIGH", + "RTM_GETNEIGHTBL", + "RTM_GETQDISC", + "RTM_GETROUTE", + "RTM_GETRULE", + "RTM_GETTCLASS", + "RTM_GETTFILTER", + "RTM_IEEE80211", + "RTM_IFANNOUNCE", + "RTM_IFINFO", + "RTM_IFINFO2", + "RTM_LLINFO_UPD", + "RTM_LOCK", + "RTM_LOSING", + "RTM_MAX", + "RTM_MAXSIZE", + "RTM_MISS", + "RTM_NEWACTION", + "RTM_NEWADDR", + "RTM_NEWADDRLABEL", + "RTM_NEWLINK", + "RTM_NEWMADDR", + "RTM_NEWMADDR2", + "RTM_NEWNDUSEROPT", + "RTM_NEWNEIGH", + "RTM_NEWNEIGHTBL", + "RTM_NEWPREFIX", + "RTM_NEWQDISC", + "RTM_NEWROUTE", + "RTM_NEWRULE", + "RTM_NEWTCLASS", + "RTM_NEWTFILTER", + "RTM_NR_FAMILIES", + "RTM_NR_MSGTYPES", + "RTM_OIFINFO", + "RTM_OLDADD", + "RTM_OLDDEL", + "RTM_OOIFINFO", + "RTM_REDIRECT", + "RTM_RESOLVE", + "RTM_RTTUNIT", + "RTM_SETDCB", + "RTM_SETGATE", + "RTM_SETLINK", + "RTM_SETNEIGHTBL", + "RTM_VERSION", + "RTNH_ALIGNTO", + "RTNH_F_DEAD", + "RTNH_F_ONLINK", + "RTNH_F_PERVASIVE", + "RTNLGRP_IPV4_IFADDR", + "RTNLGRP_IPV4_MROUTE", + "RTNLGRP_IPV4_ROUTE", + "RTNLGRP_IPV4_RULE", + "RTNLGRP_IPV6_IFADDR", + "RTNLGRP_IPV6_IFINFO", + "RTNLGRP_IPV6_MROUTE", + "RTNLGRP_IPV6_PREFIX", + "RTNLGRP_IPV6_ROUTE", + "RTNLGRP_IPV6_RULE", + "RTNLGRP_LINK", + "RTNLGRP_ND_USEROPT", + "RTNLGRP_NEIGH", + "RTNLGRP_NONE", + "RTNLGRP_NOTIFY", + "RTNLGRP_TC", + "RTN_ANYCAST", + "RTN_BLACKHOLE", + "RTN_BROADCAST", + "RTN_LOCAL", + "RTN_MAX", + "RTN_MULTICAST", + "RTN_NAT", + "RTN_PROHIBIT", + "RTN_THROW", + "RTN_UNICAST", + "RTN_UNREACHABLE", + "RTN_UNSPEC", + "RTN_XRESOLVE", + "RTPROT_BIRD", + "RTPROT_BOOT", + "RTPROT_DHCP", + "RTPROT_DNROUTED", + "RTPROT_GATED", + "RTPROT_KERNEL", + "RTPROT_MRT", + "RTPROT_NTK", + "RTPROT_RA", + "RTPROT_REDIRECT", + "RTPROT_STATIC", + "RTPROT_UNSPEC", + "RTPROT_XORP", + "RTPROT_ZEBRA", + "RTV_EXPIRE", + "RTV_HOPCOUNT", + "RTV_MTU", + "RTV_RPIPE", + "RTV_RTT", + "RTV_RTTVAR", + "RTV_SPIPE", + "RTV_SSTHRESH", + "RTV_WEIGHT", + "RT_CACHING_CONTEXT", + "RT_CLASS_DEFAULT", + "RT_CLASS_LOCAL", + "RT_CLASS_MAIN", + "RT_CLASS_MAX", + "RT_CLASS_UNSPEC", + "RT_DEFAULT_FIB", + "RT_NORTREF", + "RT_SCOPE_HOST", + "RT_SCOPE_LINK", + "RT_SCOPE_NOWHERE", + "RT_SCOPE_SITE", + "RT_SCOPE_UNIVERSE", + "RT_TABLEID_MAX", + "RT_TABLE_COMPAT", + "RT_TABLE_DEFAULT", + "RT_TABLE_LOCAL", + "RT_TABLE_MAIN", + "RT_TABLE_MAX", + "RT_TABLE_UNSPEC", + "RUSAGE_CHILDREN", + "RUSAGE_SELF", + "RUSAGE_THREAD", + "Radvisory_t", + "RawConn", + "RawSockaddr", + "RawSockaddrAny", + "RawSockaddrDatalink", + "RawSockaddrInet4", + "RawSockaddrInet6", + "RawSockaddrLinklayer", + "RawSockaddrNetlink", + "RawSockaddrUnix", + "RawSyscall", + "RawSyscall6", + "Read", + "ReadConsole", + "ReadDirectoryChanges", + "ReadDirent", + "ReadFile", + "Readlink", + "Reboot", + "Recvfrom", + "Recvmsg", + "RegCloseKey", + "RegEnumKeyEx", + "RegOpenKeyEx", + "RegQueryInfoKey", + "RegQueryValueEx", + "RemoveDirectory", + "Removexattr", + "Rename", + "Renameat", + "Revoke", + "Rlimit", + "Rmdir", + "RouteMessage", + "RouteRIB", + "RoutingMessage", + "RtAttr", + "RtGenmsg", + "RtMetrics", + "RtMsg", + "RtMsghdr", + "RtNexthop", + "Rusage", + "SCM_BINTIME", + "SCM_CREDENTIALS", + "SCM_CREDS", + "SCM_RIGHTS", + "SCM_TIMESTAMP", + "SCM_TIMESTAMPING", + "SCM_TIMESTAMPNS", + "SCM_TIMESTAMP_MONOTONIC", + "SHUT_RD", + "SHUT_RDWR", + "SHUT_WR", + "SID", + "SIDAndAttributes", + "SIGABRT", + "SIGALRM", + "SIGBUS", + "SIGCHLD", + "SIGCLD", + "SIGCONT", + "SIGEMT", + "SIGFPE", + "SIGHUP", + "SIGILL", + "SIGINFO", + "SIGINT", + "SIGIO", + "SIGIOT", + "SIGKILL", + "SIGLIBRT", + "SIGLWP", + "SIGPIPE", + "SIGPOLL", + "SIGPROF", + "SIGPWR", + "SIGQUIT", + "SIGSEGV", + "SIGSTKFLT", + "SIGSTOP", + "SIGSYS", + "SIGTERM", + "SIGTHR", + "SIGTRAP", + "SIGTSTP", + "SIGTTIN", + "SIGTTOU", + "SIGUNUSED", + "SIGURG", + "SIGUSR1", + "SIGUSR2", + "SIGVTALRM", + "SIGWINCH", + "SIGXCPU", + "SIGXFSZ", + "SIOCADDDLCI", + "SIOCADDMULTI", + "SIOCADDRT", + "SIOCAIFADDR", + "SIOCAIFGROUP", + "SIOCALIFADDR", + "SIOCARPIPLL", + "SIOCATMARK", + "SIOCAUTOADDR", + "SIOCAUTONETMASK", + "SIOCBRDGADD", + "SIOCBRDGADDS", + "SIOCBRDGARL", + "SIOCBRDGDADDR", + "SIOCBRDGDEL", + "SIOCBRDGDELS", + "SIOCBRDGFLUSH", + "SIOCBRDGFRL", + "SIOCBRDGGCACHE", + "SIOCBRDGGFD", + "SIOCBRDGGHT", + "SIOCBRDGGIFFLGS", + "SIOCBRDGGMA", + "SIOCBRDGGPARAM", + "SIOCBRDGGPRI", + "SIOCBRDGGRL", + "SIOCBRDGGSIFS", + "SIOCBRDGGTO", + "SIOCBRDGIFS", + "SIOCBRDGRTS", + "SIOCBRDGSADDR", + "SIOCBRDGSCACHE", + "SIOCBRDGSFD", + "SIOCBRDGSHT", + "SIOCBRDGSIFCOST", + "SIOCBRDGSIFFLGS", + "SIOCBRDGSIFPRIO", + "SIOCBRDGSMA", + "SIOCBRDGSPRI", + "SIOCBRDGSPROTO", + "SIOCBRDGSTO", + "SIOCBRDGSTXHC", + "SIOCDARP", + "SIOCDELDLCI", + "SIOCDELMULTI", + "SIOCDELRT", + "SIOCDEVPRIVATE", + "SIOCDIFADDR", + "SIOCDIFGROUP", + "SIOCDIFPHYADDR", + "SIOCDLIFADDR", + "SIOCDRARP", + "SIOCGARP", + "SIOCGDRVSPEC", + "SIOCGETKALIVE", + "SIOCGETLABEL", + "SIOCGETPFLOW", + "SIOCGETPFSYNC", + "SIOCGETSGCNT", + "SIOCGETVIFCNT", + "SIOCGETVLAN", + "SIOCGHIWAT", + "SIOCGIFADDR", + "SIOCGIFADDRPREF", + "SIOCGIFALIAS", + "SIOCGIFALTMTU", + "SIOCGIFASYNCMAP", + "SIOCGIFBOND", + "SIOCGIFBR", + "SIOCGIFBRDADDR", + "SIOCGIFCAP", + "SIOCGIFCONF", + "SIOCGIFCOUNT", + "SIOCGIFDATA", + "SIOCGIFDESCR", + "SIOCGIFDEVMTU", + "SIOCGIFDLT", + "SIOCGIFDSTADDR", + "SIOCGIFENCAP", + "SIOCGIFFIB", + "SIOCGIFFLAGS", + "SIOCGIFGATTR", + "SIOCGIFGENERIC", + "SIOCGIFGMEMB", + "SIOCGIFGROUP", + "SIOCGIFHARDMTU", + "SIOCGIFHWADDR", + "SIOCGIFINDEX", + "SIOCGIFKPI", + "SIOCGIFMAC", + "SIOCGIFMAP", + "SIOCGIFMEDIA", + "SIOCGIFMEM", + "SIOCGIFMETRIC", + "SIOCGIFMTU", + "SIOCGIFNAME", + "SIOCGIFNETMASK", + "SIOCGIFPDSTADDR", + "SIOCGIFPFLAGS", + "SIOCGIFPHYS", + "SIOCGIFPRIORITY", + "SIOCGIFPSRCADDR", + "SIOCGIFRDOMAIN", + "SIOCGIFRTLABEL", + "SIOCGIFSLAVE", + "SIOCGIFSTATUS", + "SIOCGIFTIMESLOT", + "SIOCGIFTXQLEN", + "SIOCGIFVLAN", + "SIOCGIFWAKEFLAGS", + "SIOCGIFXFLAGS", + "SIOCGLIFADDR", + "SIOCGLIFPHYADDR", + "SIOCGLIFPHYRTABLE", + "SIOCGLIFPHYTTL", + "SIOCGLINKSTR", + "SIOCGLOWAT", + "SIOCGPGRP", + "SIOCGPRIVATE_0", + "SIOCGPRIVATE_1", + "SIOCGRARP", + "SIOCGSPPPPARAMS", + "SIOCGSTAMP", + "SIOCGSTAMPNS", + "SIOCGVH", + "SIOCGVNETID", + "SIOCIFCREATE", + "SIOCIFCREATE2", + "SIOCIFDESTROY", + "SIOCIFGCLONERS", + "SIOCINITIFADDR", + "SIOCPROTOPRIVATE", + "SIOCRSLVMULTI", + "SIOCRTMSG", + "SIOCSARP", + "SIOCSDRVSPEC", + "SIOCSETKALIVE", + "SIOCSETLABEL", + "SIOCSETPFLOW", + "SIOCSETPFSYNC", + "SIOCSETVLAN", + "SIOCSHIWAT", + "SIOCSIFADDR", + "SIOCSIFADDRPREF", + "SIOCSIFALTMTU", + "SIOCSIFASYNCMAP", + "SIOCSIFBOND", + "SIOCSIFBR", + "SIOCSIFBRDADDR", + "SIOCSIFCAP", + "SIOCSIFDESCR", + "SIOCSIFDSTADDR", + "SIOCSIFENCAP", + "SIOCSIFFIB", + "SIOCSIFFLAGS", + "SIOCSIFGATTR", + "SIOCSIFGENERIC", + "SIOCSIFHWADDR", + "SIOCSIFHWBROADCAST", + "SIOCSIFKPI", + "SIOCSIFLINK", + "SIOCSIFLLADDR", + "SIOCSIFMAC", + "SIOCSIFMAP", + "SIOCSIFMEDIA", + "SIOCSIFMEM", + "SIOCSIFMETRIC", + "SIOCSIFMTU", + "SIOCSIFNAME", + "SIOCSIFNETMASK", + "SIOCSIFPFLAGS", + "SIOCSIFPHYADDR", + "SIOCSIFPHYS", + "SIOCSIFPRIORITY", + "SIOCSIFRDOMAIN", + "SIOCSIFRTLABEL", + "SIOCSIFRVNET", + "SIOCSIFSLAVE", + "SIOCSIFTIMESLOT", + "SIOCSIFTXQLEN", + "SIOCSIFVLAN", + "SIOCSIFVNET", + "SIOCSIFXFLAGS", + "SIOCSLIFPHYADDR", + "SIOCSLIFPHYRTABLE", + "SIOCSLIFPHYTTL", + "SIOCSLINKSTR", + "SIOCSLOWAT", + "SIOCSPGRP", + "SIOCSRARP", + "SIOCSSPPPPARAMS", + "SIOCSVH", + "SIOCSVNETID", + "SIOCZIFDATA", + "SIO_GET_EXTENSION_FUNCTION_POINTER", + "SIO_GET_INTERFACE_LIST", + "SIO_KEEPALIVE_VALS", + "SIO_UDP_CONNRESET", + "SOCK_CLOEXEC", + "SOCK_DCCP", + "SOCK_DGRAM", + "SOCK_FLAGS_MASK", + "SOCK_MAXADDRLEN", + "SOCK_NONBLOCK", + "SOCK_NOSIGPIPE", + "SOCK_PACKET", + "SOCK_RAW", + "SOCK_RDM", + "SOCK_SEQPACKET", + "SOCK_STREAM", + "SOL_AAL", + "SOL_ATM", + "SOL_DECNET", + "SOL_ICMPV6", + "SOL_IP", + "SOL_IPV6", + "SOL_IRDA", + "SOL_PACKET", + "SOL_RAW", + "SOL_SOCKET", + "SOL_TCP", + "SOL_X25", + "SOMAXCONN", + "SO_ACCEPTCONN", + "SO_ACCEPTFILTER", + "SO_ATTACH_FILTER", + "SO_BINDANY", + "SO_BINDTODEVICE", + "SO_BINTIME", + "SO_BROADCAST", + "SO_BSDCOMPAT", + "SO_DEBUG", + "SO_DETACH_FILTER", + "SO_DOMAIN", + "SO_DONTROUTE", + "SO_DONTTRUNC", + "SO_ERROR", + "SO_KEEPALIVE", + "SO_LABEL", + "SO_LINGER", + "SO_LINGER_SEC", + "SO_LISTENINCQLEN", + "SO_LISTENQLEN", + "SO_LISTENQLIMIT", + "SO_MARK", + "SO_NETPROC", + "SO_NKE", + "SO_NOADDRERR", + "SO_NOHEADER", + "SO_NOSIGPIPE", + "SO_NOTIFYCONFLICT", + "SO_NO_CHECK", + "SO_NO_DDP", + "SO_NO_OFFLOAD", + "SO_NP_EXTENSIONS", + "SO_NREAD", + "SO_NWRITE", + "SO_OOBINLINE", + "SO_OVERFLOWED", + "SO_PASSCRED", + "SO_PASSSEC", + "SO_PEERCRED", + "SO_PEERLABEL", + "SO_PEERNAME", + "SO_PEERSEC", + "SO_PRIORITY", + "SO_PROTOCOL", + "SO_PROTOTYPE", + "SO_RANDOMPORT", + "SO_RCVBUF", + "SO_RCVBUFFORCE", + "SO_RCVLOWAT", + "SO_RCVTIMEO", + "SO_RESTRICTIONS", + "SO_RESTRICT_DENYIN", + "SO_RESTRICT_DENYOUT", + "SO_RESTRICT_DENYSET", + "SO_REUSEADDR", + "SO_REUSEPORT", + "SO_REUSESHAREUID", + "SO_RTABLE", + "SO_RXQ_OVFL", + "SO_SECURITY_AUTHENTICATION", + "SO_SECURITY_ENCRYPTION_NETWORK", + "SO_SECURITY_ENCRYPTION_TRANSPORT", + "SO_SETFIB", + "SO_SNDBUF", + "SO_SNDBUFFORCE", + "SO_SNDLOWAT", + "SO_SNDTIMEO", + "SO_SPLICE", + "SO_TIMESTAMP", + "SO_TIMESTAMPING", + "SO_TIMESTAMPNS", + "SO_TIMESTAMP_MONOTONIC", + "SO_TYPE", + "SO_UPCALLCLOSEWAIT", + "SO_UPDATE_ACCEPT_CONTEXT", + "SO_UPDATE_CONNECT_CONTEXT", + "SO_USELOOPBACK", + "SO_USER_COOKIE", + "SO_VENDOR", + "SO_WANTMORE", + "SO_WANTOOBFLAG", + "SSLExtraCertChainPolicyPara", + "STANDARD_RIGHTS_ALL", + "STANDARD_RIGHTS_EXECUTE", + "STANDARD_RIGHTS_READ", + "STANDARD_RIGHTS_REQUIRED", + "STANDARD_RIGHTS_WRITE", + "STARTF_USESHOWWINDOW", + "STARTF_USESTDHANDLES", + "STD_ERROR_HANDLE", + "STD_INPUT_HANDLE", + "STD_OUTPUT_HANDLE", + "SUBLANG_ENGLISH_US", + "SW_FORCEMINIMIZE", + "SW_HIDE", + "SW_MAXIMIZE", + "SW_MINIMIZE", + "SW_NORMAL", + "SW_RESTORE", + "SW_SHOW", + "SW_SHOWDEFAULT", + "SW_SHOWMAXIMIZED", + "SW_SHOWMINIMIZED", + "SW_SHOWMINNOACTIVE", + "SW_SHOWNA", + "SW_SHOWNOACTIVATE", + "SW_SHOWNORMAL", + "SYMBOLIC_LINK_FLAG_DIRECTORY", + "SYNCHRONIZE", + "SYSCTL_VERSION", + "SYSCTL_VERS_0", + "SYSCTL_VERS_1", + "SYSCTL_VERS_MASK", + "SYS_ABORT2", + "SYS_ACCEPT", + "SYS_ACCEPT4", + "SYS_ACCEPT_NOCANCEL", + "SYS_ACCESS", + "SYS_ACCESS_EXTENDED", + "SYS_ACCT", + "SYS_ADD_KEY", + "SYS_ADD_PROFIL", + "SYS_ADJFREQ", + "SYS_ADJTIME", + "SYS_ADJTIMEX", + "SYS_AFS_SYSCALL", + "SYS_AIO_CANCEL", + "SYS_AIO_ERROR", + "SYS_AIO_FSYNC", + "SYS_AIO_READ", + "SYS_AIO_RETURN", + "SYS_AIO_SUSPEND", + "SYS_AIO_SUSPEND_NOCANCEL", + "SYS_AIO_WRITE", + "SYS_ALARM", + "SYS_ARCH_PRCTL", + "SYS_ARM_FADVISE64_64", + "SYS_ARM_SYNC_FILE_RANGE", + "SYS_ATGETMSG", + "SYS_ATPGETREQ", + "SYS_ATPGETRSP", + "SYS_ATPSNDREQ", + "SYS_ATPSNDRSP", + "SYS_ATPUTMSG", + "SYS_ATSOCKET", + "SYS_AUDIT", + "SYS_AUDITCTL", + "SYS_AUDITON", + "SYS_AUDIT_SESSION_JOIN", + "SYS_AUDIT_SESSION_PORT", + "SYS_AUDIT_SESSION_SELF", + "SYS_BDFLUSH", + "SYS_BIND", + "SYS_BINDAT", + "SYS_BREAK", + "SYS_BRK", + "SYS_BSDTHREAD_CREATE", + "SYS_BSDTHREAD_REGISTER", + "SYS_BSDTHREAD_TERMINATE", + "SYS_CAPGET", + "SYS_CAPSET", + "SYS_CAP_ENTER", + "SYS_CAP_FCNTLS_GET", + "SYS_CAP_FCNTLS_LIMIT", + "SYS_CAP_GETMODE", + "SYS_CAP_GETRIGHTS", + "SYS_CAP_IOCTLS_GET", + "SYS_CAP_IOCTLS_LIMIT", + "SYS_CAP_NEW", + "SYS_CAP_RIGHTS_GET", + "SYS_CAP_RIGHTS_LIMIT", + "SYS_CHDIR", + "SYS_CHFLAGS", + "SYS_CHFLAGSAT", + "SYS_CHMOD", + "SYS_CHMOD_EXTENDED", + "SYS_CHOWN", + "SYS_CHOWN32", + "SYS_CHROOT", + "SYS_CHUD", + "SYS_CLOCK_ADJTIME", + "SYS_CLOCK_GETCPUCLOCKID2", + "SYS_CLOCK_GETRES", + "SYS_CLOCK_GETTIME", + "SYS_CLOCK_NANOSLEEP", + "SYS_CLOCK_SETTIME", + "SYS_CLONE", + "SYS_CLOSE", + "SYS_CLOSEFROM", + "SYS_CLOSE_NOCANCEL", + "SYS_CONNECT", + "SYS_CONNECTAT", + "SYS_CONNECT_NOCANCEL", + "SYS_COPYFILE", + "SYS_CPUSET", + "SYS_CPUSET_GETAFFINITY", + "SYS_CPUSET_GETID", + "SYS_CPUSET_SETAFFINITY", + "SYS_CPUSET_SETID", + "SYS_CREAT", + "SYS_CREATE_MODULE", + "SYS_CSOPS", + "SYS_DELETE", + "SYS_DELETE_MODULE", + "SYS_DUP", + "SYS_DUP2", + "SYS_DUP3", + "SYS_EACCESS", + "SYS_EPOLL_CREATE", + "SYS_EPOLL_CREATE1", + "SYS_EPOLL_CTL", + "SYS_EPOLL_CTL_OLD", + "SYS_EPOLL_PWAIT", + "SYS_EPOLL_WAIT", + "SYS_EPOLL_WAIT_OLD", + "SYS_EVENTFD", + "SYS_EVENTFD2", + "SYS_EXCHANGEDATA", + "SYS_EXECVE", + "SYS_EXIT", + "SYS_EXIT_GROUP", + "SYS_EXTATTRCTL", + "SYS_EXTATTR_DELETE_FD", + "SYS_EXTATTR_DELETE_FILE", + "SYS_EXTATTR_DELETE_LINK", + "SYS_EXTATTR_GET_FD", + "SYS_EXTATTR_GET_FILE", + "SYS_EXTATTR_GET_LINK", + "SYS_EXTATTR_LIST_FD", + "SYS_EXTATTR_LIST_FILE", + "SYS_EXTATTR_LIST_LINK", + "SYS_EXTATTR_SET_FD", + "SYS_EXTATTR_SET_FILE", + "SYS_EXTATTR_SET_LINK", + "SYS_FACCESSAT", + "SYS_FADVISE64", + "SYS_FADVISE64_64", + "SYS_FALLOCATE", + "SYS_FANOTIFY_INIT", + "SYS_FANOTIFY_MARK", + "SYS_FCHDIR", + "SYS_FCHFLAGS", + "SYS_FCHMOD", + "SYS_FCHMODAT", + "SYS_FCHMOD_EXTENDED", + "SYS_FCHOWN", + "SYS_FCHOWN32", + "SYS_FCHOWNAT", + "SYS_FCHROOT", + "SYS_FCNTL", + "SYS_FCNTL64", + "SYS_FCNTL_NOCANCEL", + "SYS_FDATASYNC", + "SYS_FEXECVE", + "SYS_FFCLOCK_GETCOUNTER", + "SYS_FFCLOCK_GETESTIMATE", + "SYS_FFCLOCK_SETESTIMATE", + "SYS_FFSCTL", + "SYS_FGETATTRLIST", + "SYS_FGETXATTR", + "SYS_FHOPEN", + "SYS_FHSTAT", + "SYS_FHSTATFS", + "SYS_FILEPORT_MAKEFD", + "SYS_FILEPORT_MAKEPORT", + "SYS_FKTRACE", + "SYS_FLISTXATTR", + "SYS_FLOCK", + "SYS_FORK", + "SYS_FPATHCONF", + "SYS_FREEBSD6_FTRUNCATE", + "SYS_FREEBSD6_LSEEK", + "SYS_FREEBSD6_MMAP", + "SYS_FREEBSD6_PREAD", + "SYS_FREEBSD6_PWRITE", + "SYS_FREEBSD6_TRUNCATE", + "SYS_FREMOVEXATTR", + "SYS_FSCTL", + "SYS_FSETATTRLIST", + "SYS_FSETXATTR", + "SYS_FSGETPATH", + "SYS_FSTAT", + "SYS_FSTAT64", + "SYS_FSTAT64_EXTENDED", + "SYS_FSTATAT", + "SYS_FSTATAT64", + "SYS_FSTATFS", + "SYS_FSTATFS64", + "SYS_FSTATV", + "SYS_FSTATVFS1", + "SYS_FSTAT_EXTENDED", + "SYS_FSYNC", + "SYS_FSYNC_NOCANCEL", + "SYS_FSYNC_RANGE", + "SYS_FTIME", + "SYS_FTRUNCATE", + "SYS_FTRUNCATE64", + "SYS_FUTEX", + "SYS_FUTIMENS", + "SYS_FUTIMES", + "SYS_FUTIMESAT", + "SYS_GETATTRLIST", + "SYS_GETAUDIT", + "SYS_GETAUDIT_ADDR", + "SYS_GETAUID", + "SYS_GETCONTEXT", + "SYS_GETCPU", + "SYS_GETCWD", + "SYS_GETDENTS", + "SYS_GETDENTS64", + "SYS_GETDIRENTRIES", + "SYS_GETDIRENTRIES64", + "SYS_GETDIRENTRIESATTR", + "SYS_GETDTABLECOUNT", + "SYS_GETDTABLESIZE", + "SYS_GETEGID", + "SYS_GETEGID32", + "SYS_GETEUID", + "SYS_GETEUID32", + "SYS_GETFH", + "SYS_GETFSSTAT", + "SYS_GETFSSTAT64", + "SYS_GETGID", + "SYS_GETGID32", + "SYS_GETGROUPS", + "SYS_GETGROUPS32", + "SYS_GETHOSTUUID", + "SYS_GETITIMER", + "SYS_GETLCID", + "SYS_GETLOGIN", + "SYS_GETLOGINCLASS", + "SYS_GETPEERNAME", + "SYS_GETPGID", + "SYS_GETPGRP", + "SYS_GETPID", + "SYS_GETPMSG", + "SYS_GETPPID", + "SYS_GETPRIORITY", + "SYS_GETRESGID", + "SYS_GETRESGID32", + "SYS_GETRESUID", + "SYS_GETRESUID32", + "SYS_GETRLIMIT", + "SYS_GETRTABLE", + "SYS_GETRUSAGE", + "SYS_GETSGROUPS", + "SYS_GETSID", + "SYS_GETSOCKNAME", + "SYS_GETSOCKOPT", + "SYS_GETTHRID", + "SYS_GETTID", + "SYS_GETTIMEOFDAY", + "SYS_GETUID", + "SYS_GETUID32", + "SYS_GETVFSSTAT", + "SYS_GETWGROUPS", + "SYS_GETXATTR", + "SYS_GET_KERNEL_SYMS", + "SYS_GET_MEMPOLICY", + "SYS_GET_ROBUST_LIST", + "SYS_GET_THREAD_AREA", + "SYS_GTTY", + "SYS_IDENTITYSVC", + "SYS_IDLE", + "SYS_INITGROUPS", + "SYS_INIT_MODULE", + "SYS_INOTIFY_ADD_WATCH", + "SYS_INOTIFY_INIT", + "SYS_INOTIFY_INIT1", + "SYS_INOTIFY_RM_WATCH", + "SYS_IOCTL", + "SYS_IOPERM", + "SYS_IOPL", + "SYS_IOPOLICYSYS", + "SYS_IOPRIO_GET", + "SYS_IOPRIO_SET", + "SYS_IO_CANCEL", + "SYS_IO_DESTROY", + "SYS_IO_GETEVENTS", + "SYS_IO_SETUP", + "SYS_IO_SUBMIT", + "SYS_IPC", + "SYS_ISSETUGID", + "SYS_JAIL", + "SYS_JAIL_ATTACH", + "SYS_JAIL_GET", + "SYS_JAIL_REMOVE", + "SYS_JAIL_SET", + "SYS_KDEBUG_TRACE", + "SYS_KENV", + "SYS_KEVENT", + "SYS_KEVENT64", + "SYS_KEXEC_LOAD", + "SYS_KEYCTL", + "SYS_KILL", + "SYS_KLDFIND", + "SYS_KLDFIRSTMOD", + "SYS_KLDLOAD", + "SYS_KLDNEXT", + "SYS_KLDSTAT", + "SYS_KLDSYM", + "SYS_KLDUNLOAD", + "SYS_KLDUNLOADF", + "SYS_KQUEUE", + "SYS_KQUEUE1", + "SYS_KTIMER_CREATE", + "SYS_KTIMER_DELETE", + "SYS_KTIMER_GETOVERRUN", + "SYS_KTIMER_GETTIME", + "SYS_KTIMER_SETTIME", + "SYS_KTRACE", + "SYS_LCHFLAGS", + "SYS_LCHMOD", + "SYS_LCHOWN", + "SYS_LCHOWN32", + "SYS_LGETFH", + "SYS_LGETXATTR", + "SYS_LINK", + "SYS_LINKAT", + "SYS_LIO_LISTIO", + "SYS_LISTEN", + "SYS_LISTXATTR", + "SYS_LLISTXATTR", + "SYS_LOCK", + "SYS_LOOKUP_DCOOKIE", + "SYS_LPATHCONF", + "SYS_LREMOVEXATTR", + "SYS_LSEEK", + "SYS_LSETXATTR", + "SYS_LSTAT", + "SYS_LSTAT64", + "SYS_LSTAT64_EXTENDED", + "SYS_LSTATV", + "SYS_LSTAT_EXTENDED", + "SYS_LUTIMES", + "SYS_MAC_SYSCALL", + "SYS_MADVISE", + "SYS_MADVISE1", + "SYS_MAXSYSCALL", + "SYS_MBIND", + "SYS_MIGRATE_PAGES", + "SYS_MINCORE", + "SYS_MINHERIT", + "SYS_MKCOMPLEX", + "SYS_MKDIR", + "SYS_MKDIRAT", + "SYS_MKDIR_EXTENDED", + "SYS_MKFIFO", + "SYS_MKFIFOAT", + "SYS_MKFIFO_EXTENDED", + "SYS_MKNOD", + "SYS_MKNODAT", + "SYS_MLOCK", + "SYS_MLOCKALL", + "SYS_MMAP", + "SYS_MMAP2", + "SYS_MODCTL", + "SYS_MODFIND", + "SYS_MODFNEXT", + "SYS_MODIFY_LDT", + "SYS_MODNEXT", + "SYS_MODSTAT", + "SYS_MODWATCH", + "SYS_MOUNT", + "SYS_MOVE_PAGES", + "SYS_MPROTECT", + "SYS_MPX", + "SYS_MQUERY", + "SYS_MQ_GETSETATTR", + "SYS_MQ_NOTIFY", + "SYS_MQ_OPEN", + "SYS_MQ_TIMEDRECEIVE", + "SYS_MQ_TIMEDSEND", + "SYS_MQ_UNLINK", + "SYS_MREMAP", + "SYS_MSGCTL", + "SYS_MSGGET", + "SYS_MSGRCV", + "SYS_MSGRCV_NOCANCEL", + "SYS_MSGSND", + "SYS_MSGSND_NOCANCEL", + "SYS_MSGSYS", + "SYS_MSYNC", + "SYS_MSYNC_NOCANCEL", + "SYS_MUNLOCK", + "SYS_MUNLOCKALL", + "SYS_MUNMAP", + "SYS_NAME_TO_HANDLE_AT", + "SYS_NANOSLEEP", + "SYS_NEWFSTATAT", + "SYS_NFSCLNT", + "SYS_NFSSERVCTL", + "SYS_NFSSVC", + "SYS_NFSTAT", + "SYS_NICE", + "SYS_NLSTAT", + "SYS_NMOUNT", + "SYS_NSTAT", + "SYS_NTP_ADJTIME", + "SYS_NTP_GETTIME", + "SYS_OABI_SYSCALL_BASE", + "SYS_OBREAK", + "SYS_OLDFSTAT", + "SYS_OLDLSTAT", + "SYS_OLDOLDUNAME", + "SYS_OLDSTAT", + "SYS_OLDUNAME", + "SYS_OPEN", + "SYS_OPENAT", + "SYS_OPENBSD_POLL", + "SYS_OPEN_BY_HANDLE_AT", + "SYS_OPEN_EXTENDED", + "SYS_OPEN_NOCANCEL", + "SYS_OVADVISE", + "SYS_PACCEPT", + "SYS_PATHCONF", + "SYS_PAUSE", + "SYS_PCICONFIG_IOBASE", + "SYS_PCICONFIG_READ", + "SYS_PCICONFIG_WRITE", + "SYS_PDFORK", + "SYS_PDGETPID", + "SYS_PDKILL", + "SYS_PERF_EVENT_OPEN", + "SYS_PERSONALITY", + "SYS_PID_HIBERNATE", + "SYS_PID_RESUME", + "SYS_PID_SHUTDOWN_SOCKETS", + "SYS_PID_SUSPEND", + "SYS_PIPE", + "SYS_PIPE2", + "SYS_PIVOT_ROOT", + "SYS_PMC_CONTROL", + "SYS_PMC_GET_INFO", + "SYS_POLL", + "SYS_POLLTS", + "SYS_POLL_NOCANCEL", + "SYS_POSIX_FADVISE", + "SYS_POSIX_FALLOCATE", + "SYS_POSIX_OPENPT", + "SYS_POSIX_SPAWN", + "SYS_PPOLL", + "SYS_PRCTL", + "SYS_PREAD", + "SYS_PREAD64", + "SYS_PREADV", + "SYS_PREAD_NOCANCEL", + "SYS_PRLIMIT64", + "SYS_PROCCTL", + "SYS_PROCESS_POLICY", + "SYS_PROCESS_VM_READV", + "SYS_PROCESS_VM_WRITEV", + "SYS_PROC_INFO", + "SYS_PROF", + "SYS_PROFIL", + "SYS_PSELECT", + "SYS_PSELECT6", + "SYS_PSET_ASSIGN", + "SYS_PSET_CREATE", + "SYS_PSET_DESTROY", + "SYS_PSYNCH_CVBROAD", + "SYS_PSYNCH_CVCLRPREPOST", + "SYS_PSYNCH_CVSIGNAL", + "SYS_PSYNCH_CVWAIT", + "SYS_PSYNCH_MUTEXDROP", + "SYS_PSYNCH_MUTEXWAIT", + "SYS_PSYNCH_RW_DOWNGRADE", + "SYS_PSYNCH_RW_LONGRDLOCK", + "SYS_PSYNCH_RW_RDLOCK", + "SYS_PSYNCH_RW_UNLOCK", + "SYS_PSYNCH_RW_UNLOCK2", + "SYS_PSYNCH_RW_UPGRADE", + "SYS_PSYNCH_RW_WRLOCK", + "SYS_PSYNCH_RW_YIELDWRLOCK", + "SYS_PTRACE", + "SYS_PUTPMSG", + "SYS_PWRITE", + "SYS_PWRITE64", + "SYS_PWRITEV", + "SYS_PWRITE_NOCANCEL", + "SYS_QUERY_MODULE", + "SYS_QUOTACTL", + "SYS_RASCTL", + "SYS_RCTL_ADD_RULE", + "SYS_RCTL_GET_LIMITS", + "SYS_RCTL_GET_RACCT", + "SYS_RCTL_GET_RULES", + "SYS_RCTL_REMOVE_RULE", + "SYS_READ", + "SYS_READAHEAD", + "SYS_READDIR", + "SYS_READLINK", + "SYS_READLINKAT", + "SYS_READV", + "SYS_READV_NOCANCEL", + "SYS_READ_NOCANCEL", + "SYS_REBOOT", + "SYS_RECV", + "SYS_RECVFROM", + "SYS_RECVFROM_NOCANCEL", + "SYS_RECVMMSG", + "SYS_RECVMSG", + "SYS_RECVMSG_NOCANCEL", + "SYS_REMAP_FILE_PAGES", + "SYS_REMOVEXATTR", + "SYS_RENAME", + "SYS_RENAMEAT", + "SYS_REQUEST_KEY", + "SYS_RESTART_SYSCALL", + "SYS_REVOKE", + "SYS_RFORK", + "SYS_RMDIR", + "SYS_RTPRIO", + "SYS_RTPRIO_THREAD", + "SYS_RT_SIGACTION", + "SYS_RT_SIGPENDING", + "SYS_RT_SIGPROCMASK", + "SYS_RT_SIGQUEUEINFO", + "SYS_RT_SIGRETURN", + "SYS_RT_SIGSUSPEND", + "SYS_RT_SIGTIMEDWAIT", + "SYS_RT_TGSIGQUEUEINFO", + "SYS_SBRK", + "SYS_SCHED_GETAFFINITY", + "SYS_SCHED_GETPARAM", + "SYS_SCHED_GETSCHEDULER", + "SYS_SCHED_GET_PRIORITY_MAX", + "SYS_SCHED_GET_PRIORITY_MIN", + "SYS_SCHED_RR_GET_INTERVAL", + "SYS_SCHED_SETAFFINITY", + "SYS_SCHED_SETPARAM", + "SYS_SCHED_SETSCHEDULER", + "SYS_SCHED_YIELD", + "SYS_SCTP_GENERIC_RECVMSG", + "SYS_SCTP_GENERIC_SENDMSG", + "SYS_SCTP_GENERIC_SENDMSG_IOV", + "SYS_SCTP_PEELOFF", + "SYS_SEARCHFS", + "SYS_SECURITY", + "SYS_SELECT", + "SYS_SELECT_NOCANCEL", + "SYS_SEMCONFIG", + "SYS_SEMCTL", + "SYS_SEMGET", + "SYS_SEMOP", + "SYS_SEMSYS", + "SYS_SEMTIMEDOP", + "SYS_SEM_CLOSE", + "SYS_SEM_DESTROY", + "SYS_SEM_GETVALUE", + "SYS_SEM_INIT", + "SYS_SEM_OPEN", + "SYS_SEM_POST", + "SYS_SEM_TRYWAIT", + "SYS_SEM_UNLINK", + "SYS_SEM_WAIT", + "SYS_SEM_WAIT_NOCANCEL", + "SYS_SEND", + "SYS_SENDFILE", + "SYS_SENDFILE64", + "SYS_SENDMMSG", + "SYS_SENDMSG", + "SYS_SENDMSG_NOCANCEL", + "SYS_SENDTO", + "SYS_SENDTO_NOCANCEL", + "SYS_SETATTRLIST", + "SYS_SETAUDIT", + "SYS_SETAUDIT_ADDR", + "SYS_SETAUID", + "SYS_SETCONTEXT", + "SYS_SETDOMAINNAME", + "SYS_SETEGID", + "SYS_SETEUID", + "SYS_SETFIB", + "SYS_SETFSGID", + "SYS_SETFSGID32", + "SYS_SETFSUID", + "SYS_SETFSUID32", + "SYS_SETGID", + "SYS_SETGID32", + "SYS_SETGROUPS", + "SYS_SETGROUPS32", + "SYS_SETHOSTNAME", + "SYS_SETITIMER", + "SYS_SETLCID", + "SYS_SETLOGIN", + "SYS_SETLOGINCLASS", + "SYS_SETNS", + "SYS_SETPGID", + "SYS_SETPRIORITY", + "SYS_SETPRIVEXEC", + "SYS_SETREGID", + "SYS_SETREGID32", + "SYS_SETRESGID", + "SYS_SETRESGID32", + "SYS_SETRESUID", + "SYS_SETRESUID32", + "SYS_SETREUID", + "SYS_SETREUID32", + "SYS_SETRLIMIT", + "SYS_SETRTABLE", + "SYS_SETSGROUPS", + "SYS_SETSID", + "SYS_SETSOCKOPT", + "SYS_SETTID", + "SYS_SETTID_WITH_PID", + "SYS_SETTIMEOFDAY", + "SYS_SETUID", + "SYS_SETUID32", + "SYS_SETWGROUPS", + "SYS_SETXATTR", + "SYS_SET_MEMPOLICY", + "SYS_SET_ROBUST_LIST", + "SYS_SET_THREAD_AREA", + "SYS_SET_TID_ADDRESS", + "SYS_SGETMASK", + "SYS_SHARED_REGION_CHECK_NP", + "SYS_SHARED_REGION_MAP_AND_SLIDE_NP", + "SYS_SHMAT", + "SYS_SHMCTL", + "SYS_SHMDT", + "SYS_SHMGET", + "SYS_SHMSYS", + "SYS_SHM_OPEN", + "SYS_SHM_UNLINK", + "SYS_SHUTDOWN", + "SYS_SIGACTION", + "SYS_SIGALTSTACK", + "SYS_SIGNAL", + "SYS_SIGNALFD", + "SYS_SIGNALFD4", + "SYS_SIGPENDING", + "SYS_SIGPROCMASK", + "SYS_SIGQUEUE", + "SYS_SIGQUEUEINFO", + "SYS_SIGRETURN", + "SYS_SIGSUSPEND", + "SYS_SIGSUSPEND_NOCANCEL", + "SYS_SIGTIMEDWAIT", + "SYS_SIGWAIT", + "SYS_SIGWAITINFO", + "SYS_SOCKET", + "SYS_SOCKETCALL", + "SYS_SOCKETPAIR", + "SYS_SPLICE", + "SYS_SSETMASK", + "SYS_SSTK", + "SYS_STACK_SNAPSHOT", + "SYS_STAT", + "SYS_STAT64", + "SYS_STAT64_EXTENDED", + "SYS_STATFS", + "SYS_STATFS64", + "SYS_STATV", + "SYS_STATVFS1", + "SYS_STAT_EXTENDED", + "SYS_STIME", + "SYS_STTY", + "SYS_SWAPCONTEXT", + "SYS_SWAPCTL", + "SYS_SWAPOFF", + "SYS_SWAPON", + "SYS_SYMLINK", + "SYS_SYMLINKAT", + "SYS_SYNC", + "SYS_SYNCFS", + "SYS_SYNC_FILE_RANGE", + "SYS_SYSARCH", + "SYS_SYSCALL", + "SYS_SYSCALL_BASE", + "SYS_SYSFS", + "SYS_SYSINFO", + "SYS_SYSLOG", + "SYS_TEE", + "SYS_TGKILL", + "SYS_THREAD_SELFID", + "SYS_THR_CREATE", + "SYS_THR_EXIT", + "SYS_THR_KILL", + "SYS_THR_KILL2", + "SYS_THR_NEW", + "SYS_THR_SELF", + "SYS_THR_SET_NAME", + "SYS_THR_SUSPEND", + "SYS_THR_WAKE", + "SYS_TIME", + "SYS_TIMERFD_CREATE", + "SYS_TIMERFD_GETTIME", + "SYS_TIMERFD_SETTIME", + "SYS_TIMER_CREATE", + "SYS_TIMER_DELETE", + "SYS_TIMER_GETOVERRUN", + "SYS_TIMER_GETTIME", + "SYS_TIMER_SETTIME", + "SYS_TIMES", + "SYS_TKILL", + "SYS_TRUNCATE", + "SYS_TRUNCATE64", + "SYS_TUXCALL", + "SYS_UGETRLIMIT", + "SYS_ULIMIT", + "SYS_UMASK", + "SYS_UMASK_EXTENDED", + "SYS_UMOUNT", + "SYS_UMOUNT2", + "SYS_UNAME", + "SYS_UNDELETE", + "SYS_UNLINK", + "SYS_UNLINKAT", + "SYS_UNMOUNT", + "SYS_UNSHARE", + "SYS_USELIB", + "SYS_USTAT", + "SYS_UTIME", + "SYS_UTIMENSAT", + "SYS_UTIMES", + "SYS_UTRACE", + "SYS_UUIDGEN", + "SYS_VADVISE", + "SYS_VFORK", + "SYS_VHANGUP", + "SYS_VM86", + "SYS_VM86OLD", + "SYS_VMSPLICE", + "SYS_VM_PRESSURE_MONITOR", + "SYS_VSERVER", + "SYS_WAIT4", + "SYS_WAIT4_NOCANCEL", + "SYS_WAIT6", + "SYS_WAITEVENT", + "SYS_WAITID", + "SYS_WAITID_NOCANCEL", + "SYS_WAITPID", + "SYS_WATCHEVENT", + "SYS_WORKQ_KERNRETURN", + "SYS_WORKQ_OPEN", + "SYS_WRITE", + "SYS_WRITEV", + "SYS_WRITEV_NOCANCEL", + "SYS_WRITE_NOCANCEL", + "SYS_YIELD", + "SYS__LLSEEK", + "SYS__LWP_CONTINUE", + "SYS__LWP_CREATE", + "SYS__LWP_CTL", + "SYS__LWP_DETACH", + "SYS__LWP_EXIT", + "SYS__LWP_GETNAME", + "SYS__LWP_GETPRIVATE", + "SYS__LWP_KILL", + "SYS__LWP_PARK", + "SYS__LWP_SELF", + "SYS__LWP_SETNAME", + "SYS__LWP_SETPRIVATE", + "SYS__LWP_SUSPEND", + "SYS__LWP_UNPARK", + "SYS__LWP_UNPARK_ALL", + "SYS__LWP_WAIT", + "SYS__LWP_WAKEUP", + "SYS__NEWSELECT", + "SYS__PSET_BIND", + "SYS__SCHED_GETAFFINITY", + "SYS__SCHED_GETPARAM", + "SYS__SCHED_SETAFFINITY", + "SYS__SCHED_SETPARAM", + "SYS__SYSCTL", + "SYS__UMTX_LOCK", + "SYS__UMTX_OP", + "SYS__UMTX_UNLOCK", + "SYS___ACL_ACLCHECK_FD", + "SYS___ACL_ACLCHECK_FILE", + "SYS___ACL_ACLCHECK_LINK", + "SYS___ACL_DELETE_FD", + "SYS___ACL_DELETE_FILE", + "SYS___ACL_DELETE_LINK", + "SYS___ACL_GET_FD", + "SYS___ACL_GET_FILE", + "SYS___ACL_GET_LINK", + "SYS___ACL_SET_FD", + "SYS___ACL_SET_FILE", + "SYS___ACL_SET_LINK", + "SYS___CLONE", + "SYS___DISABLE_THREADSIGNAL", + "SYS___GETCWD", + "SYS___GETLOGIN", + "SYS___GET_TCB", + "SYS___MAC_EXECVE", + "SYS___MAC_GETFSSTAT", + "SYS___MAC_GET_FD", + "SYS___MAC_GET_FILE", + "SYS___MAC_GET_LCID", + "SYS___MAC_GET_LCTX", + "SYS___MAC_GET_LINK", + "SYS___MAC_GET_MOUNT", + "SYS___MAC_GET_PID", + "SYS___MAC_GET_PROC", + "SYS___MAC_MOUNT", + "SYS___MAC_SET_FD", + "SYS___MAC_SET_FILE", + "SYS___MAC_SET_LCTX", + "SYS___MAC_SET_LINK", + "SYS___MAC_SET_PROC", + "SYS___MAC_SYSCALL", + "SYS___OLD_SEMWAIT_SIGNAL", + "SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL", + "SYS___POSIX_CHOWN", + "SYS___POSIX_FCHOWN", + "SYS___POSIX_LCHOWN", + "SYS___POSIX_RENAME", + "SYS___PTHREAD_CANCELED", + "SYS___PTHREAD_CHDIR", + "SYS___PTHREAD_FCHDIR", + "SYS___PTHREAD_KILL", + "SYS___PTHREAD_MARKCANCEL", + "SYS___PTHREAD_SIGMASK", + "SYS___QUOTACTL", + "SYS___SEMCTL", + "SYS___SEMWAIT_SIGNAL", + "SYS___SEMWAIT_SIGNAL_NOCANCEL", + "SYS___SETLOGIN", + "SYS___SETUGID", + "SYS___SET_TCB", + "SYS___SIGACTION_SIGTRAMP", + "SYS___SIGTIMEDWAIT", + "SYS___SIGWAIT", + "SYS___SIGWAIT_NOCANCEL", + "SYS___SYSCTL", + "SYS___TFORK", + "SYS___THREXIT", + "SYS___THRSIGDIVERT", + "SYS___THRSLEEP", + "SYS___THRWAKEUP", + "S_ARCH1", + "S_ARCH2", + "S_BLKSIZE", + "S_IEXEC", + "S_IFBLK", + "S_IFCHR", + "S_IFDIR", + "S_IFIFO", + "S_IFLNK", + "S_IFMT", + "S_IFREG", + "S_IFSOCK", + "S_IFWHT", + "S_IREAD", + "S_IRGRP", + "S_IROTH", + "S_IRUSR", + "S_IRWXG", + "S_IRWXO", + "S_IRWXU", + "S_ISGID", + "S_ISTXT", + "S_ISUID", + "S_ISVTX", + "S_IWGRP", + "S_IWOTH", + "S_IWRITE", + "S_IWUSR", + "S_IXGRP", + "S_IXOTH", + "S_IXUSR", + "S_LOGIN_SET", + "SecurityAttributes", + "Seek", + "Select", + "Sendfile", + "Sendmsg", + "SendmsgN", + "Sendto", + "Servent", + "SetBpf", + "SetBpfBuflen", + "SetBpfDatalink", + "SetBpfHeadercmpl", + "SetBpfImmediate", + "SetBpfInterface", + "SetBpfPromisc", + "SetBpfTimeout", + "SetCurrentDirectory", + "SetEndOfFile", + "SetEnvironmentVariable", + "SetFileAttributes", + "SetFileCompletionNotificationModes", + "SetFilePointer", + "SetFileTime", + "SetHandleInformation", + "SetKevent", + "SetLsfPromisc", + "SetNonblock", + "Setdomainname", + "Setegid", + "Setenv", + "Seteuid", + "Setfsgid", + "Setfsuid", + "Setgid", + "Setgroups", + "Sethostname", + "Setlogin", + "Setpgid", + "Setpriority", + "Setprivexec", + "Setregid", + "Setresgid", + "Setresuid", + "Setreuid", + "Setrlimit", + "Setsid", + "Setsockopt", + "SetsockoptByte", + "SetsockoptICMPv6Filter", + "SetsockoptIPMreq", + "SetsockoptIPMreqn", + "SetsockoptIPv6Mreq", + "SetsockoptInet4Addr", + "SetsockoptInt", + "SetsockoptLinger", + "SetsockoptString", + "SetsockoptTimeval", + "Settimeofday", + "Setuid", + "Setxattr", + "Shutdown", + "SidTypeAlias", + "SidTypeComputer", + "SidTypeDeletedAccount", + "SidTypeDomain", + "SidTypeGroup", + "SidTypeInvalid", + "SidTypeLabel", + "SidTypeUnknown", + "SidTypeUser", + "SidTypeWellKnownGroup", + "Signal", + "SizeofBpfHdr", + "SizeofBpfInsn", + "SizeofBpfProgram", + "SizeofBpfStat", + "SizeofBpfVersion", + "SizeofBpfZbuf", + "SizeofBpfZbufHeader", + "SizeofCmsghdr", + "SizeofICMPv6Filter", + "SizeofIPMreq", + "SizeofIPMreqn", + "SizeofIPv6MTUInfo", + "SizeofIPv6Mreq", + "SizeofIfAddrmsg", + "SizeofIfAnnounceMsghdr", + "SizeofIfData", + "SizeofIfInfomsg", + "SizeofIfMsghdr", + "SizeofIfaMsghdr", + "SizeofIfmaMsghdr", + "SizeofIfmaMsghdr2", + "SizeofInet4Pktinfo", + "SizeofInet6Pktinfo", + "SizeofInotifyEvent", + "SizeofLinger", + "SizeofMsghdr", + "SizeofNlAttr", + "SizeofNlMsgerr", + "SizeofNlMsghdr", + "SizeofRtAttr", + "SizeofRtGenmsg", + "SizeofRtMetrics", + "SizeofRtMsg", + "SizeofRtMsghdr", + "SizeofRtNexthop", + "SizeofSockFilter", + "SizeofSockFprog", + "SizeofSockaddrAny", + "SizeofSockaddrDatalink", + "SizeofSockaddrInet4", + "SizeofSockaddrInet6", + "SizeofSockaddrLinklayer", + "SizeofSockaddrNetlink", + "SizeofSockaddrUnix", + "SizeofTCPInfo", + "SizeofUcred", + "SlicePtrFromStrings", + "SockFilter", + "SockFprog", + "Sockaddr", + "SockaddrDatalink", + "SockaddrGen", + "SockaddrInet4", + "SockaddrInet6", + "SockaddrLinklayer", + "SockaddrNetlink", + "SockaddrUnix", + "Socket", + "SocketControlMessage", + "SocketDisableIPv6", + "Socketpair", + "Splice", + "StartProcess", + "StartupInfo", + "Stat", + "Stat_t", + "Statfs", + "Statfs_t", + "Stderr", + "Stdin", + "Stdout", + "StringBytePtr", + "StringByteSlice", + "StringSlicePtr", + "StringToSid", + "StringToUTF16", + "StringToUTF16Ptr", + "Symlink", + "Sync", + "SyncFileRange", + "SysProcAttr", + "SysProcIDMap", + "Syscall", + "Syscall12", + "Syscall15", + "Syscall18", + "Syscall6", + "Syscall9", + "Sysctl", + "SysctlUint32", + "Sysctlnode", + "Sysinfo", + "Sysinfo_t", + "Systemtime", + "TCGETS", + "TCIFLUSH", + "TCIOFLUSH", + "TCOFLUSH", + "TCPInfo", + "TCPKeepalive", + "TCP_CA_NAME_MAX", + "TCP_CONGCTL", + "TCP_CONGESTION", + "TCP_CONNECTIONTIMEOUT", + "TCP_CORK", + "TCP_DEFER_ACCEPT", + "TCP_INFO", + "TCP_KEEPALIVE", + "TCP_KEEPCNT", + "TCP_KEEPIDLE", + "TCP_KEEPINIT", + "TCP_KEEPINTVL", + "TCP_LINGER2", + "TCP_MAXBURST", + "TCP_MAXHLEN", + "TCP_MAXOLEN", + "TCP_MAXSEG", + "TCP_MAXWIN", + "TCP_MAX_SACK", + "TCP_MAX_WINSHIFT", + "TCP_MD5SIG", + "TCP_MD5SIG_MAXKEYLEN", + "TCP_MINMSS", + "TCP_MINMSSOVERLOAD", + "TCP_MSS", + "TCP_NODELAY", + "TCP_NOOPT", + "TCP_NOPUSH", + "TCP_NSTATES", + "TCP_QUICKACK", + "TCP_RXT_CONNDROPTIME", + "TCP_RXT_FINDROP", + "TCP_SACK_ENABLE", + "TCP_SYNCNT", + "TCP_VENDOR", + "TCP_WINDOW_CLAMP", + "TCSAFLUSH", + "TCSETS", + "TF_DISCONNECT", + "TF_REUSE_SOCKET", + "TF_USE_DEFAULT_WORKER", + "TF_USE_KERNEL_APC", + "TF_USE_SYSTEM_THREAD", + "TF_WRITE_BEHIND", + "TH32CS_INHERIT", + "TH32CS_SNAPALL", + "TH32CS_SNAPHEAPLIST", + "TH32CS_SNAPMODULE", + "TH32CS_SNAPMODULE32", + "TH32CS_SNAPPROCESS", + "TH32CS_SNAPTHREAD", + "TIME_ZONE_ID_DAYLIGHT", + "TIME_ZONE_ID_STANDARD", + "TIME_ZONE_ID_UNKNOWN", + "TIOCCBRK", + "TIOCCDTR", + "TIOCCONS", + "TIOCDCDTIMESTAMP", + "TIOCDRAIN", + "TIOCDSIMICROCODE", + "TIOCEXCL", + "TIOCEXT", + "TIOCFLAG_CDTRCTS", + "TIOCFLAG_CLOCAL", + "TIOCFLAG_CRTSCTS", + "TIOCFLAG_MDMBUF", + "TIOCFLAG_PPS", + "TIOCFLAG_SOFTCAR", + "TIOCFLUSH", + "TIOCGDEV", + "TIOCGDRAINWAIT", + "TIOCGETA", + "TIOCGETD", + "TIOCGFLAGS", + "TIOCGICOUNT", + "TIOCGLCKTRMIOS", + "TIOCGLINED", + "TIOCGPGRP", + "TIOCGPTN", + "TIOCGQSIZE", + "TIOCGRANTPT", + "TIOCGRS485", + "TIOCGSERIAL", + "TIOCGSID", + "TIOCGSIZE", + "TIOCGSOFTCAR", + "TIOCGTSTAMP", + "TIOCGWINSZ", + "TIOCINQ", + "TIOCIXOFF", + "TIOCIXON", + "TIOCLINUX", + "TIOCMBIC", + "TIOCMBIS", + "TIOCMGDTRWAIT", + "TIOCMGET", + "TIOCMIWAIT", + "TIOCMODG", + "TIOCMODS", + "TIOCMSDTRWAIT", + "TIOCMSET", + "TIOCM_CAR", + "TIOCM_CD", + "TIOCM_CTS", + "TIOCM_DCD", + "TIOCM_DSR", + "TIOCM_DTR", + "TIOCM_LE", + "TIOCM_RI", + "TIOCM_RNG", + "TIOCM_RTS", + "TIOCM_SR", + "TIOCM_ST", + "TIOCNOTTY", + "TIOCNXCL", + "TIOCOUTQ", + "TIOCPKT", + "TIOCPKT_DATA", + "TIOCPKT_DOSTOP", + "TIOCPKT_FLUSHREAD", + "TIOCPKT_FLUSHWRITE", + "TIOCPKT_IOCTL", + "TIOCPKT_NOSTOP", + "TIOCPKT_START", + "TIOCPKT_STOP", + "TIOCPTMASTER", + "TIOCPTMGET", + "TIOCPTSNAME", + "TIOCPTYGNAME", + "TIOCPTYGRANT", + "TIOCPTYUNLK", + "TIOCRCVFRAME", + "TIOCREMOTE", + "TIOCSBRK", + "TIOCSCONS", + "TIOCSCTTY", + "TIOCSDRAINWAIT", + "TIOCSDTR", + "TIOCSERCONFIG", + "TIOCSERGETLSR", + "TIOCSERGETMULTI", + "TIOCSERGSTRUCT", + "TIOCSERGWILD", + "TIOCSERSETMULTI", + "TIOCSERSWILD", + "TIOCSER_TEMT", + "TIOCSETA", + "TIOCSETAF", + "TIOCSETAW", + "TIOCSETD", + "TIOCSFLAGS", + "TIOCSIG", + "TIOCSLCKTRMIOS", + "TIOCSLINED", + "TIOCSPGRP", + "TIOCSPTLCK", + "TIOCSQSIZE", + "TIOCSRS485", + "TIOCSSERIAL", + "TIOCSSIZE", + "TIOCSSOFTCAR", + "TIOCSTART", + "TIOCSTAT", + "TIOCSTI", + "TIOCSTOP", + "TIOCSTSTAMP", + "TIOCSWINSZ", + "TIOCTIMESTAMP", + "TIOCUCNTL", + "TIOCVHANGUP", + "TIOCXMTFRAME", + "TOKEN_ADJUST_DEFAULT", + "TOKEN_ADJUST_GROUPS", + "TOKEN_ADJUST_PRIVILEGES", + "TOKEN_ADJUST_SESSIONID", + "TOKEN_ALL_ACCESS", + "TOKEN_ASSIGN_PRIMARY", + "TOKEN_DUPLICATE", + "TOKEN_EXECUTE", + "TOKEN_IMPERSONATE", + "TOKEN_QUERY", + "TOKEN_QUERY_SOURCE", + "TOKEN_READ", + "TOKEN_WRITE", + "TOSTOP", + "TRUNCATE_EXISTING", + "TUNATTACHFILTER", + "TUNDETACHFILTER", + "TUNGETFEATURES", + "TUNGETIFF", + "TUNGETSNDBUF", + "TUNGETVNETHDRSZ", + "TUNSETDEBUG", + "TUNSETGROUP", + "TUNSETIFF", + "TUNSETLINK", + "TUNSETNOCSUM", + "TUNSETOFFLOAD", + "TUNSETOWNER", + "TUNSETPERSIST", + "TUNSETSNDBUF", + "TUNSETTXFILTER", + "TUNSETVNETHDRSZ", + "Tee", + "TerminateProcess", + "Termios", + "Tgkill", + "Time", + "Time_t", + "Times", + "Timespec", + "TimespecToNsec", + "Timeval", + "Timeval32", + "TimevalToNsec", + "Timex", + "Timezoneinformation", + "Tms", + "Token", + "TokenAccessInformation", + "TokenAuditPolicy", + "TokenDefaultDacl", + "TokenElevation", + "TokenElevationType", + "TokenGroups", + "TokenGroupsAndPrivileges", + "TokenHasRestrictions", + "TokenImpersonationLevel", + "TokenIntegrityLevel", + "TokenLinkedToken", + "TokenLogonSid", + "TokenMandatoryPolicy", + "TokenOrigin", + "TokenOwner", + "TokenPrimaryGroup", + "TokenPrivileges", + "TokenRestrictedSids", + "TokenSandBoxInert", + "TokenSessionId", + "TokenSessionReference", + "TokenSource", + "TokenStatistics", + "TokenType", + "TokenUIAccess", + "TokenUser", + "TokenVirtualizationAllowed", + "TokenVirtualizationEnabled", + "Tokenprimarygroup", + "Tokenuser", + "TranslateAccountName", + "TranslateName", + "TransmitFile", + "TransmitFileBuffers", + "Truncate", + "UNIX_PATH_MAX", + "USAGE_MATCH_TYPE_AND", + "USAGE_MATCH_TYPE_OR", + "UTF16FromString", + "UTF16PtrFromString", + "UTF16ToString", + "Ucred", + "Umask", + "Uname", + "Undelete", + "UnixCredentials", + "UnixRights", + "Unlink", + "Unlinkat", + "UnmapViewOfFile", + "Unmount", + "Unsetenv", + "Unshare", + "UserInfo10", + "Ustat", + "Ustat_t", + "Utimbuf", + "Utime", + "Utimes", + "UtimesNano", + "Utsname", + "VDISCARD", + "VDSUSP", + "VEOF", + "VEOL", + "VEOL2", + "VERASE", + "VERASE2", + "VINTR", + "VKILL", + "VLNEXT", + "VMIN", + "VQUIT", + "VREPRINT", + "VSTART", + "VSTATUS", + "VSTOP", + "VSUSP", + "VSWTC", + "VT0", + "VT1", + "VTDLY", + "VTIME", + "VWERASE", + "VirtualLock", + "VirtualUnlock", + "WAIT_ABANDONED", + "WAIT_FAILED", + "WAIT_OBJECT_0", + "WAIT_TIMEOUT", + "WALL", + "WALLSIG", + "WALTSIG", + "WCLONE", + "WCONTINUED", + "WCOREFLAG", + "WEXITED", + "WLINUXCLONE", + "WNOHANG", + "WNOTHREAD", + "WNOWAIT", + "WNOZOMBIE", + "WOPTSCHECKED", + "WORDSIZE", + "WSABuf", + "WSACleanup", + "WSADESCRIPTION_LEN", + "WSAData", + "WSAEACCES", + "WSAECONNABORTED", + "WSAECONNRESET", + "WSAEnumProtocols", + "WSAID_CONNECTEX", + "WSAIoctl", + "WSAPROTOCOL_LEN", + "WSAProtocolChain", + "WSAProtocolInfo", + "WSARecv", + "WSARecvFrom", + "WSASYS_STATUS_LEN", + "WSASend", + "WSASendTo", + "WSASendto", + "WSAStartup", + "WSTOPPED", + "WTRAPPED", + "WUNTRACED", + "Wait4", + "WaitForSingleObject", + "WaitStatus", + "Win32FileAttributeData", + "Win32finddata", + "Write", + "WriteConsole", + "WriteFile", + "X509_ASN_ENCODING", + "XCASE", + "XP1_CONNECTIONLESS", + "XP1_CONNECT_DATA", + "XP1_DISCONNECT_DATA", + "XP1_EXPEDITED_DATA", + "XP1_GRACEFUL_CLOSE", + "XP1_GUARANTEED_DELIVERY", + "XP1_GUARANTEED_ORDER", + "XP1_IFS_HANDLES", + "XP1_MESSAGE_ORIENTED", + "XP1_MULTIPOINT_CONTROL_PLANE", + "XP1_MULTIPOINT_DATA_PLANE", + "XP1_PARTIAL_MESSAGE", + "XP1_PSEUDO_STREAM", + "XP1_QOS_SUPPORTED", + "XP1_SAN_SUPPORT_SDP", + "XP1_SUPPORT_BROADCAST", + "XP1_SUPPORT_MULTIPOINT", + "XP1_UNI_RECV", + "XP1_UNI_SEND", + }, + "syscall/js": []string{ + "CopyBytesToGo", + "CopyBytesToJS", + "Error", + "Func", + "FuncOf", + "Global", + "Null", + "Type", + "TypeBoolean", + "TypeFunction", + "TypeNull", + "TypeNumber", + "TypeObject", + "TypeString", + "TypeSymbol", + "TypeUndefined", + "Undefined", + "Value", + "ValueError", + "ValueOf", + "Wrapper", + }, + "testing": []string{ + "AllocsPerRun", + "B", + "Benchmark", + "BenchmarkResult", + "Cover", + "CoverBlock", + "CoverMode", + "Coverage", + "Init", + "InternalBenchmark", + "InternalExample", + "InternalTest", + "M", + "Main", + "MainStart", + "PB", + "RegisterCover", + "RunBenchmarks", + "RunExamples", + "RunTests", + "Short", + "T", + "TB", + "Verbose", + }, + "testing/iotest": []string{ + "DataErrReader", + "ErrTimeout", + "HalfReader", + "NewReadLogger", + "NewWriteLogger", + "OneByteReader", + "TimeoutReader", + "TruncateWriter", + }, + "testing/quick": []string{ + "Check", + "CheckEqual", + "CheckEqualError", + "CheckError", + "Config", + "Generator", + "SetupError", + "Value", + }, + "text/scanner": []string{ + "Char", + "Comment", + "EOF", + "Float", + "GoTokens", + "GoWhitespace", + "Ident", + "Int", + "Position", + "RawString", + "ScanChars", + "ScanComments", + "ScanFloats", + "ScanIdents", + "ScanInts", + "ScanRawStrings", + "ScanStrings", + "Scanner", + "SkipComments", + "String", + "TokenString", + }, + "text/tabwriter": []string{ + "AlignRight", + "Debug", + "DiscardEmptyColumns", + "Escape", + "FilterHTML", + "NewWriter", + "StripEscape", + "TabIndent", + "Writer", + }, + "text/template": []string{ + "ExecError", + "FuncMap", + "HTMLEscape", + "HTMLEscapeString", + "HTMLEscaper", + "IsTrue", + "JSEscape", + "JSEscapeString", + "JSEscaper", + "Must", + "New", + "ParseFiles", + "ParseGlob", + "Template", + "URLQueryEscaper", + }, + "text/template/parse": []string{ + "ActionNode", + "BoolNode", + "BranchNode", + "ChainNode", + "CommandNode", + "DotNode", + "FieldNode", + "IdentifierNode", + "IfNode", + "IsEmptyTree", + "ListNode", + "New", + "NewIdentifier", + "NilNode", + "Node", + "NodeAction", + "NodeBool", + "NodeChain", + "NodeCommand", + "NodeDot", + "NodeField", + "NodeIdentifier", + "NodeIf", + "NodeList", + "NodeNil", + "NodeNumber", + "NodePipe", + "NodeRange", + "NodeString", + "NodeTemplate", + "NodeText", + "NodeType", + "NodeVariable", + "NodeWith", + "NumberNode", + "Parse", + "PipeNode", + "Pos", + "RangeNode", + "StringNode", + "TemplateNode", + "TextNode", + "Tree", + "VariableNode", + "WithNode", + }, + "time": []string{ + "ANSIC", + "After", + "AfterFunc", + "April", + "August", + "Date", + "December", + "Duration", + "February", + "FixedZone", + "Friday", + "Hour", + "January", + "July", + "June", + "Kitchen", + "LoadLocation", + "LoadLocationFromTZData", + "Local", + "Location", + "March", + "May", + "Microsecond", + "Millisecond", + "Minute", + "Monday", + "Month", + "Nanosecond", + "NewTicker", + "NewTimer", + "November", + "Now", + "October", + "Parse", + "ParseDuration", + "ParseError", + "ParseInLocation", + "RFC1123", + "RFC1123Z", + "RFC3339", + "RFC3339Nano", + "RFC822", + "RFC822Z", + "RFC850", + "RubyDate", + "Saturday", + "Second", + "September", + "Since", + "Sleep", + "Stamp", + "StampMicro", + "StampMilli", + "StampNano", + "Sunday", + "Thursday", + "Tick", + "Ticker", + "Time", + "Timer", + "Tuesday", + "UTC", + "Unix", + "UnixDate", + "Until", + "Wednesday", + "Weekday", + }, + "unicode": []string{ + "ASCII_Hex_Digit", + "Adlam", + "Ahom", + "Anatolian_Hieroglyphs", + "Arabic", + "Armenian", + "Avestan", + "AzeriCase", + "Balinese", + "Bamum", + "Bassa_Vah", + "Batak", + "Bengali", + "Bhaiksuki", + "Bidi_Control", + "Bopomofo", + "Brahmi", + "Braille", + "Buginese", + "Buhid", + "C", + "Canadian_Aboriginal", + "Carian", + "CaseRange", + "CaseRanges", + "Categories", + "Caucasian_Albanian", + "Cc", + "Cf", + "Chakma", + "Cham", + "Cherokee", + "Co", + "Common", + "Coptic", + "Cs", + "Cuneiform", + "Cypriot", + "Cyrillic", + "Dash", + "Deprecated", + "Deseret", + "Devanagari", + "Diacritic", + "Digit", + "Dogra", + "Duployan", + "Egyptian_Hieroglyphs", + "Elbasan", + "Elymaic", + "Ethiopic", + "Extender", + "FoldCategory", + "FoldScript", + "Georgian", + "Glagolitic", + "Gothic", + "Grantha", + "GraphicRanges", + "Greek", + "Gujarati", + "Gunjala_Gondi", + "Gurmukhi", + "Han", + "Hangul", + "Hanifi_Rohingya", + "Hanunoo", + "Hatran", + "Hebrew", + "Hex_Digit", + "Hiragana", + "Hyphen", + "IDS_Binary_Operator", + "IDS_Trinary_Operator", + "Ideographic", + "Imperial_Aramaic", + "In", + "Inherited", + "Inscriptional_Pahlavi", + "Inscriptional_Parthian", + "Is", + "IsControl", + "IsDigit", + "IsGraphic", + "IsLetter", + "IsLower", + "IsMark", + "IsNumber", + "IsOneOf", + "IsPrint", + "IsPunct", + "IsSpace", + "IsSymbol", + "IsTitle", + "IsUpper", + "Javanese", + "Join_Control", + "Kaithi", + "Kannada", + "Katakana", + "Kayah_Li", + "Kharoshthi", + "Khmer", + "Khojki", + "Khudawadi", + "L", + "Lao", + "Latin", + "Lepcha", + "Letter", + "Limbu", + "Linear_A", + "Linear_B", + "Lisu", + "Ll", + "Lm", + "Lo", + "Logical_Order_Exception", + "Lower", + "LowerCase", + "Lt", + "Lu", + "Lycian", + "Lydian", + "M", + "Mahajani", + "Makasar", + "Malayalam", + "Mandaic", + "Manichaean", + "Marchen", + "Mark", + "Masaram_Gondi", + "MaxASCII", + "MaxCase", + "MaxLatin1", + "MaxRune", + "Mc", + "Me", + "Medefaidrin", + "Meetei_Mayek", + "Mende_Kikakui", + "Meroitic_Cursive", + "Meroitic_Hieroglyphs", + "Miao", + "Mn", + "Modi", + "Mongolian", + "Mro", + "Multani", + "Myanmar", + "N", + "Nabataean", + "Nandinagari", + "Nd", + "New_Tai_Lue", + "Newa", + "Nko", + "Nl", + "No", + "Noncharacter_Code_Point", + "Number", + "Nushu", + "Nyiakeng_Puachue_Hmong", + "Ogham", + "Ol_Chiki", + "Old_Hungarian", + "Old_Italic", + "Old_North_Arabian", + "Old_Permic", + "Old_Persian", + "Old_Sogdian", + "Old_South_Arabian", + "Old_Turkic", + "Oriya", + "Osage", + "Osmanya", + "Other", + "Other_Alphabetic", + "Other_Default_Ignorable_Code_Point", + "Other_Grapheme_Extend", + "Other_ID_Continue", + "Other_ID_Start", + "Other_Lowercase", + "Other_Math", + "Other_Uppercase", + "P", + "Pahawh_Hmong", + "Palmyrene", + "Pattern_Syntax", + "Pattern_White_Space", + "Pau_Cin_Hau", + "Pc", + "Pd", + "Pe", + "Pf", + "Phags_Pa", + "Phoenician", + "Pi", + "Po", + "Prepended_Concatenation_Mark", + "PrintRanges", + "Properties", + "Ps", + "Psalter_Pahlavi", + "Punct", + "Quotation_Mark", + "Radical", + "Range16", + "Range32", + "RangeTable", + "Regional_Indicator", + "Rejang", + "ReplacementChar", + "Runic", + "S", + "STerm", + "Samaritan", + "Saurashtra", + "Sc", + "Scripts", + "Sentence_Terminal", + "Sharada", + "Shavian", + "Siddham", + "SignWriting", + "SimpleFold", + "Sinhala", + "Sk", + "Sm", + "So", + "Soft_Dotted", + "Sogdian", + "Sora_Sompeng", + "Soyombo", + "Space", + "SpecialCase", + "Sundanese", + "Syloti_Nagri", + "Symbol", + "Syriac", + "Tagalog", + "Tagbanwa", + "Tai_Le", + "Tai_Tham", + "Tai_Viet", + "Takri", + "Tamil", + "Tangut", + "Telugu", + "Terminal_Punctuation", + "Thaana", + "Thai", + "Tibetan", + "Tifinagh", + "Tirhuta", + "Title", + "TitleCase", + "To", + "ToLower", + "ToTitle", + "ToUpper", + "TurkishCase", + "Ugaritic", + "Unified_Ideograph", + "Upper", + "UpperCase", + "UpperLower", + "Vai", + "Variation_Selector", + "Version", + "Wancho", + "Warang_Citi", + "White_Space", + "Yi", + "Z", + "Zanabazar_Square", + "Zl", + "Zp", + "Zs", + }, + "unicode/utf16": []string{ + "Decode", + "DecodeRune", + "Encode", + "EncodeRune", + "IsSurrogate", + }, + "unicode/utf8": []string{ + "DecodeLastRune", + "DecodeLastRuneInString", + "DecodeRune", + "DecodeRuneInString", + "EncodeRune", + "FullRune", + "FullRuneInString", + "MaxRune", + "RuneCount", + "RuneCountInString", + "RuneError", + "RuneLen", + "RuneSelf", + "RuneStart", + "UTFMax", + "Valid", + "ValidRune", + "ValidString", + }, + "unsafe": []string{ + "Alignof", + "ArbitraryType", + "Offsetof", + "Pointer", + "Sizeof", }, } diff --git a/vendor/golang.org/x/tools/internal/span/parse.go b/vendor/golang.org/x/tools/internal/span/parse.go deleted file mode 100644 index b3f268a38ae..00000000000 --- a/vendor/golang.org/x/tools/internal/span/parse.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package span - -import ( - "strconv" - "strings" - "unicode/utf8" -) - -// Parse returns the location represented by the input. -// All inputs are valid locations, as they can always be a pure filename. -// The returned span will be normalized, and thus if printed may produce a -// different string. -func Parse(input string) Span { - // :0:0#0-0:0#0 - valid := input - var hold, offset int - hadCol := false - suf := rstripSuffix(input) - if suf.sep == "#" { - offset = suf.num - suf = rstripSuffix(suf.remains) - } - if suf.sep == ":" { - valid = suf.remains - hold = suf.num - hadCol = true - suf = rstripSuffix(suf.remains) - } - switch { - case suf.sep == ":": - return New(NewURI(suf.remains), NewPoint(suf.num, hold, offset), Point{}) - case suf.sep == "-": - // we have a span, fall out of the case to continue - default: - // separator not valid, rewind to either the : or the start - return New(NewURI(valid), NewPoint(hold, 0, offset), Point{}) - } - // only the span form can get here - // at this point we still don't know what the numbers we have mean - // if have not yet seen a : then we might have either a line or a column depending - // on whether start has a column or not - // we build an end point and will fix it later if needed - end := NewPoint(suf.num, hold, offset) - hold, offset = 0, 0 - suf = rstripSuffix(suf.remains) - if suf.sep == "#" { - offset = suf.num - suf = rstripSuffix(suf.remains) - } - if suf.sep != ":" { - // turns out we don't have a span after all, rewind - return New(NewURI(valid), end, Point{}) - } - valid = suf.remains - hold = suf.num - suf = rstripSuffix(suf.remains) - if suf.sep != ":" { - // line#offset only - return New(NewURI(valid), NewPoint(hold, 0, offset), end) - } - // we have a column, so if end only had one number, it is also the column - if !hadCol { - end = NewPoint(suf.num, end.v.Line, end.v.Offset) - } - return New(NewURI(suf.remains), NewPoint(suf.num, hold, offset), end) -} - -type suffix struct { - remains string - sep string - num int -} - -func rstripSuffix(input string) suffix { - if len(input) == 0 { - return suffix{"", "", -1} - } - remains := input - num := -1 - // first see if we have a number at the end - last := strings.LastIndexFunc(remains, func(r rune) bool { return r < '0' || r > '9' }) - if last >= 0 && last < len(remains)-1 { - number, err := strconv.ParseInt(remains[last+1:], 10, 64) - if err == nil { - num = int(number) - remains = remains[:last+1] - } - } - // now see if we have a trailing separator - r, w := utf8.DecodeLastRuneInString(remains) - if r != ':' && r != '#' && r == '#' { - return suffix{input, "", -1} - } - remains = remains[:len(remains)-w] - return suffix{remains, string(r), num} -} diff --git a/vendor/golang.org/x/tools/internal/span/span.go b/vendor/golang.org/x/tools/internal/span/span.go deleted file mode 100644 index 4d2ad098667..00000000000 --- a/vendor/golang.org/x/tools/internal/span/span.go +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package span contains support for representing with positions and ranges in -// text files. -package span - -import ( - "encoding/json" - "fmt" - "path" -) - -// Span represents a source code range in standardized form. -type Span struct { - v span -} - -// Point represents a single point within a file. -// In general this should only be used as part of a Span, as on its own it -// does not carry enough information. -type Point struct { - v point -} - -type span struct { - URI URI `json:"uri"` - Start point `json:"start"` - End point `json:"end"` -} - -type point struct { - Line int `json:"line"` - Column int `json:"column"` - Offset int `json:"offset"` -} - -// Invalid is a span that reports false from IsValid -var Invalid = Span{v: span{Start: invalidPoint.v, End: invalidPoint.v}} - -var invalidPoint = Point{v: point{Line: 0, Column: 0, Offset: -1}} - -// Converter is the interface to an object that can convert between line:column -// and offset forms for a single file. -type Converter interface { - //ToPosition converts from an offset to a line:column pair. - ToPosition(offset int) (int, int, error) - //ToOffset converts from a line:column pair to an offset. - ToOffset(line, col int) (int, error) -} - -func New(uri URI, start Point, end Point) Span { - s := Span{v: span{URI: uri, Start: start.v, End: end.v}} - s.v.clean() - return s -} - -func NewPoint(line, col, offset int) Point { - p := Point{v: point{Line: line, Column: col, Offset: offset}} - p.v.clean() - return p -} - -func Compare(a, b Span) int { - if r := CompareURI(a.URI(), b.URI()); r != 0 { - return r - } - if r := comparePoint(a.v.Start, b.v.Start); r != 0 { - return r - } - return comparePoint(a.v.End, b.v.End) -} - -func ComparePoint(a, b Point) int { - return comparePoint(a.v, b.v) -} - -func comparePoint(a, b point) int { - if !a.hasPosition() { - if a.Offset < b.Offset { - return -1 - } - if a.Offset > b.Offset { - return 1 - } - return 0 - } - if a.Line < b.Line { - return -1 - } - if a.Line > b.Line { - return 1 - } - if a.Column < b.Column { - return -1 - } - if a.Column > b.Column { - return 1 - } - return 0 -} - -func (s Span) HasPosition() bool { return s.v.Start.hasPosition() } -func (s Span) HasOffset() bool { return s.v.Start.hasOffset() } -func (s Span) IsValid() bool { return s.v.Start.isValid() } -func (s Span) IsPoint() bool { return s.v.Start == s.v.End } -func (s Span) URI() URI { return s.v.URI } -func (s Span) Start() Point { return Point{s.v.Start} } -func (s Span) End() Point { return Point{s.v.End} } -func (s *Span) MarshalJSON() ([]byte, error) { return json.Marshal(&s.v) } -func (s *Span) UnmarshalJSON(b []byte) error { return json.Unmarshal(b, &s.v) } - -func (p Point) HasPosition() bool { return p.v.hasPosition() } -func (p Point) HasOffset() bool { return p.v.hasOffset() } -func (p Point) IsValid() bool { return p.v.isValid() } -func (p *Point) MarshalJSON() ([]byte, error) { return json.Marshal(&p.v) } -func (p *Point) UnmarshalJSON(b []byte) error { return json.Unmarshal(b, &p.v) } -func (p Point) Line() int { - if !p.v.hasPosition() { - panic(fmt.Errorf("position not set in %v", p.v)) - } - return p.v.Line -} -func (p Point) Column() int { - if !p.v.hasPosition() { - panic(fmt.Errorf("position not set in %v", p.v)) - } - return p.v.Column -} -func (p Point) Offset() int { - if !p.v.hasOffset() { - panic(fmt.Errorf("offset not set in %v", p.v)) - } - return p.v.Offset -} - -func (p point) hasPosition() bool { return p.Line > 0 } -func (p point) hasOffset() bool { return p.Offset >= 0 } -func (p point) isValid() bool { return p.hasPosition() || p.hasOffset() } -func (p point) isZero() bool { - return (p.Line == 1 && p.Column == 1) || (!p.hasPosition() && p.Offset == 0) -} - -func (s *span) clean() { - //this presumes the points are already clean - if !s.End.isValid() || (s.End == point{}) { - s.End = s.Start - } -} - -func (p *point) clean() { - if p.Line < 0 { - p.Line = 0 - } - if p.Column <= 0 { - if p.Line > 0 { - p.Column = 1 - } else { - p.Column = 0 - } - } - if p.Offset == 0 && (p.Line > 1 || p.Column > 1) { - p.Offset = -1 - } -} - -// Format implements fmt.Formatter to print the Location in a standard form. -// The format produced is one that can be read back in using Parse. -func (s Span) Format(f fmt.State, c rune) { - fullForm := f.Flag('+') - preferOffset := f.Flag('#') - // we should always have a uri, simplify if it is file format - //TODO: make sure the end of the uri is unambiguous - uri := string(s.v.URI) - if c == 'f' { - uri = path.Base(uri) - } else if !fullForm { - uri = s.v.URI.Filename() - } - fmt.Fprint(f, uri) - if !s.IsValid() || (!fullForm && s.v.Start.isZero() && s.v.End.isZero()) { - return - } - // see which bits of start to write - printOffset := s.HasOffset() && (fullForm || preferOffset || !s.HasPosition()) - printLine := s.HasPosition() && (fullForm || !printOffset) - printColumn := printLine && (fullForm || (s.v.Start.Column > 1 || s.v.End.Column > 1)) - fmt.Fprint(f, ":") - if printLine { - fmt.Fprintf(f, "%d", s.v.Start.Line) - } - if printColumn { - fmt.Fprintf(f, ":%d", s.v.Start.Column) - } - if printOffset { - fmt.Fprintf(f, "#%d", s.v.Start.Offset) - } - // start is written, do we need end? - if s.IsPoint() { - return - } - // we don't print the line if it did not change - printLine = fullForm || (printLine && s.v.End.Line > s.v.Start.Line) - fmt.Fprint(f, "-") - if printLine { - fmt.Fprintf(f, "%d", s.v.End.Line) - } - if printColumn { - if printLine { - fmt.Fprint(f, ":") - } - fmt.Fprintf(f, "%d", s.v.End.Column) - } - if printOffset { - fmt.Fprintf(f, "#%d", s.v.End.Offset) - } -} - -func (s Span) WithPosition(c Converter) (Span, error) { - if err := s.update(c, true, false); err != nil { - return Span{}, err - } - return s, nil -} - -func (s Span) WithOffset(c Converter) (Span, error) { - if err := s.update(c, false, true); err != nil { - return Span{}, err - } - return s, nil -} - -func (s Span) WithAll(c Converter) (Span, error) { - if err := s.update(c, true, true); err != nil { - return Span{}, err - } - return s, nil -} - -func (s *Span) update(c Converter, withPos, withOffset bool) error { - if !s.IsValid() { - return fmt.Errorf("cannot add information to an invalid span") - } - if withPos && !s.HasPosition() { - if err := s.v.Start.updatePosition(c); err != nil { - return err - } - if s.v.End.Offset == s.v.Start.Offset { - s.v.End = s.v.Start - } else if err := s.v.End.updatePosition(c); err != nil { - return err - } - } - if withOffset && (!s.HasOffset() || (s.v.End.hasPosition() && !s.v.End.hasOffset())) { - if err := s.v.Start.updateOffset(c); err != nil { - return err - } - if s.v.End.Line == s.v.Start.Line && s.v.End.Column == s.v.Start.Column { - s.v.End.Offset = s.v.Start.Offset - } else if err := s.v.End.updateOffset(c); err != nil { - return err - } - } - return nil -} - -func (p *point) updatePosition(c Converter) error { - line, col, err := c.ToPosition(p.Offset) - if err != nil { - return err - } - p.Line = line - p.Column = col - return nil -} - -func (p *point) updateOffset(c Converter) error { - offset, err := c.ToOffset(p.Line, p.Column) - if err != nil { - return err - } - p.Offset = offset - return nil -} diff --git a/vendor/golang.org/x/tools/internal/span/token.go b/vendor/golang.org/x/tools/internal/span/token.go deleted file mode 100644 index ce44541b2fc..00000000000 --- a/vendor/golang.org/x/tools/internal/span/token.go +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package span - -import ( - "fmt" - "go/token" -) - -// Range represents a source code range in token.Pos form. -// It also carries the FileSet that produced the positions, so that it is -// self contained. -type Range struct { - FileSet *token.FileSet - Start token.Pos - End token.Pos -} - -// TokenConverter is a Converter backed by a token file set and file. -// It uses the file set methods to work out the conversions, which -// makes it fast and does not require the file contents. -type TokenConverter struct { - fset *token.FileSet - file *token.File -} - -// NewRange creates a new Range from a FileSet and two positions. -// To represent a point pass a 0 as the end pos. -func NewRange(fset *token.FileSet, start, end token.Pos) Range { - return Range{ - FileSet: fset, - Start: start, - End: end, - } -} - -// NewTokenConverter returns an implementation of Converter backed by a -// token.File. -func NewTokenConverter(fset *token.FileSet, f *token.File) *TokenConverter { - return &TokenConverter{fset: fset, file: f} -} - -// NewContentConverter returns an implementation of Converter for the -// given file content. -func NewContentConverter(filename string, content []byte) *TokenConverter { - fset := token.NewFileSet() - f := fset.AddFile(filename, -1, len(content)) - f.SetLinesForContent(content) - return &TokenConverter{fset: fset, file: f} -} - -// IsPoint returns true if the range represents a single point. -func (r Range) IsPoint() bool { - return r.Start == r.End -} - -// Span converts a Range to a Span that represents the Range. -// It will fill in all the members of the Span, calculating the line and column -// information. -func (r Range) Span() (Span, error) { - f := r.FileSet.File(r.Start) - if f == nil { - return Span{}, fmt.Errorf("file not found in FileSet") - } - s := Span{v: span{URI: FileURI(f.Name())}} - var err error - s.v.Start.Offset, err = offset(f, r.Start) - if err != nil { - return Span{}, err - } - if r.End.IsValid() { - s.v.End.Offset, err = offset(f, r.End) - if err != nil { - return Span{}, err - } - } - s.v.Start.clean() - s.v.End.clean() - s.v.clean() - converter := NewTokenConverter(r.FileSet, f) - return s.WithPosition(converter) -} - -// offset is a copy of the Offset function in go/token, but with the adjustment -// that it does not panic on invalid positions. -func offset(f *token.File, pos token.Pos) (int, error) { - if int(pos) < f.Base() || int(pos) > f.Base()+f.Size() { - return 0, fmt.Errorf("invalid pos") - } - return int(pos) - f.Base(), nil -} - -// Range converts a Span to a Range that represents the Span for the supplied -// File. -func (s Span) Range(converter *TokenConverter) (Range, error) { - s, err := s.WithOffset(converter) - if err != nil { - return Range{}, err - } - // go/token will panic if the offset is larger than the file's size, - // so check here to avoid panicking. - if s.Start().Offset() > converter.file.Size() { - return Range{}, fmt.Errorf("start offset %v is past the end of the file %v", s.Start(), converter.file.Size()) - } - if s.End().Offset() > converter.file.Size() { - return Range{}, fmt.Errorf("end offset %v is past the end of the file %v", s.End(), converter.file.Size()) - } - return Range{ - FileSet: converter.fset, - Start: converter.file.Pos(s.Start().Offset()), - End: converter.file.Pos(s.End().Offset()), - }, nil -} - -func (l *TokenConverter) ToPosition(offset int) (int, int, error) { - if offset > l.file.Size() { - return 0, 0, fmt.Errorf("offset %v is past the end of the file %v", offset, l.file.Size()) - } - pos := l.file.Pos(offset) - p := l.fset.Position(pos) - if offset == l.file.Size() { - return p.Line + 1, 1, nil - } - return p.Line, p.Column, nil -} - -func (l *TokenConverter) ToOffset(line, col int) (int, error) { - if line < 0 { - return -1, fmt.Errorf("line is not valid") - } - lineMax := l.file.LineCount() + 1 - if line > lineMax { - return -1, fmt.Errorf("line is beyond end of file %v", lineMax) - } else if line == lineMax { - if col > 1 { - return -1, fmt.Errorf("column is beyond end of file") - } - // at the end of the file, allowing for a trailing eol - return l.file.Size(), nil - } - pos := lineStart(l.file, line) - if !pos.IsValid() { - return -1, fmt.Errorf("line is not in file") - } - // we assume that column is in bytes here, and that the first byte of a - // line is at column 1 - pos += token.Pos(col - 1) - return offset(l.file, pos) -} diff --git a/vendor/golang.org/x/tools/internal/span/token111.go b/vendor/golang.org/x/tools/internal/span/token111.go deleted file mode 100644 index bf7a5406b6e..00000000000 --- a/vendor/golang.org/x/tools/internal/span/token111.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.12 - -package span - -import ( - "go/token" -) - -// lineStart is the pre-Go 1.12 version of (*token.File).LineStart. For Go -// versions <= 1.11, we borrow logic from the analysisutil package. -// TODO(rstambler): Delete this file when we no longer support Go 1.11. -func lineStart(f *token.File, line int) token.Pos { - // Use binary search to find the start offset of this line. - - min := 0 // inclusive - max := f.Size() // exclusive - for { - offset := (min + max) / 2 - pos := f.Pos(offset) - posn := f.Position(pos) - if posn.Line == line { - return pos - (token.Pos(posn.Column) - 1) - } - - if min+1 >= max { - return token.NoPos - } - - if posn.Line < line { - min = offset - } else { - max = offset - } - } -} diff --git a/vendor/golang.org/x/tools/internal/span/token112.go b/vendor/golang.org/x/tools/internal/span/token112.go deleted file mode 100644 index 017aec9c13e..00000000000 --- a/vendor/golang.org/x/tools/internal/span/token112.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.12 - -package span - -import ( - "go/token" -) - -// TODO(rstambler): Delete this file when we no longer support Go 1.11. -func lineStart(f *token.File, line int) token.Pos { - return f.LineStart(line) -} diff --git a/vendor/golang.org/x/tools/internal/span/uri.go b/vendor/golang.org/x/tools/internal/span/uri.go deleted file mode 100644 index e05a9e6ef5d..00000000000 --- a/vendor/golang.org/x/tools/internal/span/uri.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package span - -import ( - "fmt" - "net/url" - "os" - "path" - "path/filepath" - "runtime" - "strings" - "unicode" -) - -const fileScheme = "file" - -// URI represents the full URI for a file. -type URI string - -// Filename returns the file path for the given URI. -// It is an error to call this on a URI that is not a valid filename. -func (uri URI) Filename() string { - filename, err := filename(uri) - if err != nil { - panic(err) - } - return filepath.FromSlash(filename) -} - -func filename(uri URI) (string, error) { - if uri == "" { - return "", nil - } - u, err := url.ParseRequestURI(string(uri)) - if err != nil { - return "", err - } - if u.Scheme != fileScheme { - return "", fmt.Errorf("only file URIs are supported, got %q from %q", u.Scheme, uri) - } - if isWindowsDriveURI(u.Path) { - u.Path = u.Path[1:] - } - return u.Path, nil -} - -// NewURI returns a span URI for the string. -// It will attempt to detect if the string is a file path or uri. -func NewURI(s string) URI { - if u, err := url.PathUnescape(s); err == nil { - s = u - } - if strings.HasPrefix(s, fileScheme+"://") { - return URI(s) - } - return FileURI(s) -} - -func CompareURI(a, b URI) int { - if equalURI(a, b) { - return 0 - } - if a < b { - return -1 - } - return 1 -} - -func equalURI(a, b URI) bool { - if a == b { - return true - } - // If we have the same URI basename, we may still have the same file URIs. - if !strings.EqualFold(path.Base(string(a)), path.Base(string(b))) { - return false - } - fa, err := filename(a) - if err != nil { - return false - } - fb, err := filename(b) - if err != nil { - return false - } - // Stat the files to check if they are equal. - infoa, err := os.Stat(filepath.FromSlash(fa)) - if err != nil { - return false - } - infob, err := os.Stat(filepath.FromSlash(fb)) - if err != nil { - return false - } - return os.SameFile(infoa, infob) -} - -// FileURI returns a span URI for the supplied file path. -// It will always have the file scheme. -func FileURI(path string) URI { - if path == "" { - return "" - } - // Handle standard library paths that contain the literal "$GOROOT". - // TODO(rstambler): The go/packages API should allow one to determine a user's $GOROOT. - const prefix = "$GOROOT" - if len(path) >= len(prefix) && strings.EqualFold(prefix, path[:len(prefix)]) { - suffix := path[len(prefix):] - path = runtime.GOROOT() + suffix - } - if !isWindowsDrivePath(path) { - if abs, err := filepath.Abs(path); err == nil { - path = abs - } - } - // Check the file path again, in case it became absolute. - if isWindowsDrivePath(path) { - path = "/" + path - } - path = filepath.ToSlash(path) - u := url.URL{ - Scheme: fileScheme, - Path: path, - } - uri := u.String() - if unescaped, err := url.PathUnescape(uri); err == nil { - uri = unescaped - } - return URI(uri) -} - -// isWindowsDrivePath returns true if the file path is of the form used by -// Windows. We check if the path begins with a drive letter, followed by a ":". -func isWindowsDrivePath(path string) bool { - if len(path) < 4 { - return false - } - return unicode.IsLetter(rune(path[0])) && path[1] == ':' -} - -// isWindowsDriveURI returns true if the file URI is of the format used by -// Windows URIs. The url.Parse package does not specially handle Windows paths -// (see https://golang.org/issue/6027). We check if the URI path has -// a drive prefix (e.g. "/C:"). If so, we trim the leading "/". -func isWindowsDriveURI(uri string) bool { - if len(uri) < 4 { - return false - } - return uri[0] == '/' && unicode.IsLetter(rune(uri[1])) && uri[2] == ':' -} diff --git a/vendor/golang.org/x/tools/internal/span/utf16.go b/vendor/golang.org/x/tools/internal/span/utf16.go deleted file mode 100644 index 561b3fa50a8..00000000000 --- a/vendor/golang.org/x/tools/internal/span/utf16.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package span - -import ( - "fmt" - "unicode/utf16" - "unicode/utf8" -) - -// ToUTF16Column calculates the utf16 column expressed by the point given the -// supplied file contents. -// This is used to convert from the native (always in bytes) column -// representation and the utf16 counts used by some editors. -func ToUTF16Column(p Point, content []byte) (int, error) { - if content == nil { - return -1, fmt.Errorf("ToUTF16Column: missing content") - } - if !p.HasPosition() { - return -1, fmt.Errorf("ToUTF16Column: point is missing position") - } - if !p.HasOffset() { - return -1, fmt.Errorf("ToUTF16Column: point is missing offset") - } - offset := p.Offset() // 0-based - colZero := p.Column() - 1 // 0-based - if colZero == 0 { - // 0-based column 0, so it must be chr 1 - return 1, nil - } else if colZero < 0 { - return -1, fmt.Errorf("ToUTF16Column: column is invalid (%v)", colZero) - } - // work out the offset at the start of the line using the column - lineOffset := offset - colZero - if lineOffset < 0 || offset > len(content) { - return -1, fmt.Errorf("ToUTF16Column: offsets %v-%v outside file contents (%v)", lineOffset, offset, len(content)) - } - // Use the offset to pick out the line start. - // This cannot panic: offset > len(content) and lineOffset < offset. - start := content[lineOffset:] - - // Now, truncate down to the supplied column. - start = start[:colZero] - - // and count the number of utf16 characters - // in theory we could do this by hand more efficiently... - return len(utf16.Encode([]rune(string(start)))) + 1, nil -} - -// FromUTF16Column advances the point by the utf16 character offset given the -// supplied line contents. -// This is used to convert from the utf16 counts used by some editors to the -// native (always in bytes) column representation. -func FromUTF16Column(p Point, chr int, content []byte) (Point, error) { - if !p.HasOffset() { - return Point{}, fmt.Errorf("FromUTF16Column: point is missing offset") - } - // if chr is 1 then no adjustment needed - if chr <= 1 { - return p, nil - } - if p.Offset() >= len(content) { - return p, fmt.Errorf("FromUTF16Column: offset (%v) greater than length of content (%v)", p.Offset(), len(content)) - } - remains := content[p.Offset():] - // scan forward the specified number of characters - for count := 1; count < chr; count++ { - if len(remains) <= 0 { - return Point{}, fmt.Errorf("FromUTF16Column: chr goes beyond the content") - } - r, w := utf8.DecodeRune(remains) - if r == '\n' { - // Per the LSP spec: - // - // > If the character value is greater than the line length it - // > defaults back to the line length. - break - } - remains = remains[w:] - if r >= 0x10000 { - // a two point rune - count++ - // if we finished in a two point rune, do not advance past the first - if count >= chr { - break - } - } - p.v.Column += w - p.v.Offset += w - } - return p, nil -} diff --git a/vendor/golang.org/x/xerrors/LICENSE b/vendor/golang.org/x/xerrors/LICENSE new file mode 100644 index 00000000000..e4a47e17f14 --- /dev/null +++ b/vendor/golang.org/x/xerrors/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2019 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/xerrors/PATENTS b/vendor/golang.org/x/xerrors/PATENTS new file mode 100644 index 00000000000..733099041f8 --- /dev/null +++ b/vendor/golang.org/x/xerrors/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/xerrors/README b/vendor/golang.org/x/xerrors/README new file mode 100644 index 00000000000..aac7867a560 --- /dev/null +++ b/vendor/golang.org/x/xerrors/README @@ -0,0 +1,2 @@ +This repository holds the transition packages for the new Go 1.13 error values. +See golang.org/design/29934-error-values. diff --git a/vendor/golang.org/x/xerrors/adaptor.go b/vendor/golang.org/x/xerrors/adaptor.go new file mode 100644 index 00000000000..4317f248331 --- /dev/null +++ b/vendor/golang.org/x/xerrors/adaptor.go @@ -0,0 +1,193 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +import ( + "bytes" + "fmt" + "io" + "reflect" + "strconv" +) + +// FormatError calls the FormatError method of f with an errors.Printer +// configured according to s and verb, and writes the result to s. +func FormatError(f Formatter, s fmt.State, verb rune) { + // Assuming this function is only called from the Format method, and given + // that FormatError takes precedence over Format, it cannot be called from + // any package that supports errors.Formatter. It is therefore safe to + // disregard that State may be a specific printer implementation and use one + // of our choice instead. + + // limitations: does not support printing error as Go struct. + + var ( + sep = " " // separator before next error + p = &state{State: s} + direct = true + ) + + var err error = f + + switch verb { + // Note that this switch must match the preference order + // for ordinary string printing (%#v before %+v, and so on). + + case 'v': + if s.Flag('#') { + if stringer, ok := err.(fmt.GoStringer); ok { + io.WriteString(&p.buf, stringer.GoString()) + goto exit + } + // proceed as if it were %v + } else if s.Flag('+') { + p.printDetail = true + sep = "\n - " + } + case 's': + case 'q', 'x', 'X': + // Use an intermediate buffer in the rare cases that precision, + // truncation, or one of the alternative verbs (q, x, and X) are + // specified. + direct = false + + default: + p.buf.WriteString("%!") + p.buf.WriteRune(verb) + p.buf.WriteByte('(') + switch { + case err != nil: + p.buf.WriteString(reflect.TypeOf(f).String()) + default: + p.buf.WriteString("") + } + p.buf.WriteByte(')') + io.Copy(s, &p.buf) + return + } + +loop: + for { + switch v := err.(type) { + case Formatter: + err = v.FormatError((*printer)(p)) + case fmt.Formatter: + v.Format(p, 'v') + break loop + default: + io.WriteString(&p.buf, v.Error()) + break loop + } + if err == nil { + break + } + if p.needColon || !p.printDetail { + p.buf.WriteByte(':') + p.needColon = false + } + p.buf.WriteString(sep) + p.inDetail = false + p.needNewline = false + } + +exit: + width, okW := s.Width() + prec, okP := s.Precision() + + if !direct || (okW && width > 0) || okP { + // Construct format string from State s. + format := []byte{'%'} + if s.Flag('-') { + format = append(format, '-') + } + if s.Flag('+') { + format = append(format, '+') + } + if s.Flag(' ') { + format = append(format, ' ') + } + if okW { + format = strconv.AppendInt(format, int64(width), 10) + } + if okP { + format = append(format, '.') + format = strconv.AppendInt(format, int64(prec), 10) + } + format = append(format, string(verb)...) + fmt.Fprintf(s, string(format), p.buf.String()) + } else { + io.Copy(s, &p.buf) + } +} + +var detailSep = []byte("\n ") + +// state tracks error printing state. It implements fmt.State. +type state struct { + fmt.State + buf bytes.Buffer + + printDetail bool + inDetail bool + needColon bool + needNewline bool +} + +func (s *state) Write(b []byte) (n int, err error) { + if s.printDetail { + if len(b) == 0 { + return 0, nil + } + if s.inDetail && s.needColon { + s.needNewline = true + if b[0] == '\n' { + b = b[1:] + } + } + k := 0 + for i, c := range b { + if s.needNewline { + if s.inDetail && s.needColon { + s.buf.WriteByte(':') + s.needColon = false + } + s.buf.Write(detailSep) + s.needNewline = false + } + if c == '\n' { + s.buf.Write(b[k:i]) + k = i + 1 + s.needNewline = true + } + } + s.buf.Write(b[k:]) + if !s.inDetail { + s.needColon = true + } + } else if !s.inDetail { + s.buf.Write(b) + } + return len(b), nil +} + +// printer wraps a state to implement an xerrors.Printer. +type printer state + +func (s *printer) Print(args ...interface{}) { + if !s.inDetail || s.printDetail { + fmt.Fprint((*state)(s), args...) + } +} + +func (s *printer) Printf(format string, args ...interface{}) { + if !s.inDetail || s.printDetail { + fmt.Fprintf((*state)(s), format, args...) + } +} + +func (s *printer) Detail() bool { + s.inDetail = true + return s.printDetail +} diff --git a/vendor/golang.org/x/xerrors/codereview.cfg b/vendor/golang.org/x/xerrors/codereview.cfg new file mode 100644 index 00000000000..3f8b14b64e8 --- /dev/null +++ b/vendor/golang.org/x/xerrors/codereview.cfg @@ -0,0 +1 @@ +issuerepo: golang/go diff --git a/vendor/golang.org/x/xerrors/doc.go b/vendor/golang.org/x/xerrors/doc.go new file mode 100644 index 00000000000..eef99d9d54d --- /dev/null +++ b/vendor/golang.org/x/xerrors/doc.go @@ -0,0 +1,22 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package xerrors implements functions to manipulate errors. +// +// This package is based on the Go 2 proposal for error values: +// https://golang.org/design/29934-error-values +// +// These functions were incorporated into the standard library's errors package +// in Go 1.13: +// - Is +// - As +// - Unwrap +// +// Also, Errorf's %w verb was incorporated into fmt.Errorf. +// +// Use this package to get equivalent behavior in all supported Go versions. +// +// No other features of this package were included in Go 1.13, and at present +// there are no plans to include any of them. +package xerrors // import "golang.org/x/xerrors" diff --git a/vendor/golang.org/x/xerrors/errors.go b/vendor/golang.org/x/xerrors/errors.go new file mode 100644 index 00000000000..e88d3772d86 --- /dev/null +++ b/vendor/golang.org/x/xerrors/errors.go @@ -0,0 +1,33 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +import "fmt" + +// errorString is a trivial implementation of error. +type errorString struct { + s string + frame Frame +} + +// New returns an error that formats as the given text. +// +// The returned error contains a Frame set to the caller's location and +// implements Formatter to show this information when printed with details. +func New(text string) error { + return &errorString{text, Caller(1)} +} + +func (e *errorString) Error() string { + return e.s +} + +func (e *errorString) Format(s fmt.State, v rune) { FormatError(e, s, v) } + +func (e *errorString) FormatError(p Printer) (next error) { + p.Print(e.s) + e.frame.Format(p) + return nil +} diff --git a/vendor/golang.org/x/xerrors/fmt.go b/vendor/golang.org/x/xerrors/fmt.go new file mode 100644 index 00000000000..829862ddf6a --- /dev/null +++ b/vendor/golang.org/x/xerrors/fmt.go @@ -0,0 +1,187 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +import ( + "fmt" + "strings" + "unicode" + "unicode/utf8" + + "golang.org/x/xerrors/internal" +) + +const percentBangString = "%!" + +// Errorf formats according to a format specifier and returns the string as a +// value that satisfies error. +// +// The returned error includes the file and line number of the caller when +// formatted with additional detail enabled. If the last argument is an error +// the returned error's Format method will return it if the format string ends +// with ": %s", ": %v", or ": %w". If the last argument is an error and the +// format string ends with ": %w", the returned error implements an Unwrap +// method returning it. +// +// If the format specifier includes a %w verb with an error operand in a +// position other than at the end, the returned error will still implement an +// Unwrap method returning the operand, but the error's Format method will not +// return the wrapped error. +// +// It is invalid to include more than one %w verb or to supply it with an +// operand that does not implement the error interface. The %w verb is otherwise +// a synonym for %v. +func Errorf(format string, a ...interface{}) error { + format = formatPlusW(format) + // Support a ": %[wsv]" suffix, which works well with xerrors.Formatter. + wrap := strings.HasSuffix(format, ": %w") + idx, format2, ok := parsePercentW(format) + percentWElsewhere := !wrap && idx >= 0 + if !percentWElsewhere && (wrap || strings.HasSuffix(format, ": %s") || strings.HasSuffix(format, ": %v")) { + err := errorAt(a, len(a)-1) + if err == nil { + return &noWrapError{fmt.Sprintf(format, a...), nil, Caller(1)} + } + // TODO: this is not entirely correct. The error value could be + // printed elsewhere in format if it mixes numbered with unnumbered + // substitutions. With relatively small changes to doPrintf we can + // have it optionally ignore extra arguments and pass the argument + // list in its entirety. + msg := fmt.Sprintf(format[:len(format)-len(": %s")], a[:len(a)-1]...) + frame := Frame{} + if internal.EnableTrace { + frame = Caller(1) + } + if wrap { + return &wrapError{msg, err, frame} + } + return &noWrapError{msg, err, frame} + } + // Support %w anywhere. + // TODO: don't repeat the wrapped error's message when %w occurs in the middle. + msg := fmt.Sprintf(format2, a...) + if idx < 0 { + return &noWrapError{msg, nil, Caller(1)} + } + err := errorAt(a, idx) + if !ok || err == nil { + // Too many %ws or argument of %w is not an error. Approximate the Go + // 1.13 fmt.Errorf message. + return &noWrapError{fmt.Sprintf("%sw(%s)", percentBangString, msg), nil, Caller(1)} + } + frame := Frame{} + if internal.EnableTrace { + frame = Caller(1) + } + return &wrapError{msg, err, frame} +} + +func errorAt(args []interface{}, i int) error { + if i < 0 || i >= len(args) { + return nil + } + err, ok := args[i].(error) + if !ok { + return nil + } + return err +} + +// formatPlusW is used to avoid the vet check that will barf at %w. +func formatPlusW(s string) string { + return s +} + +// Return the index of the only %w in format, or -1 if none. +// Also return a rewritten format string with %w replaced by %v, and +// false if there is more than one %w. +// TODO: handle "%[N]w". +func parsePercentW(format string) (idx int, newFormat string, ok bool) { + // Loosely copied from golang.org/x/tools/go/analysis/passes/printf/printf.go. + idx = -1 + ok = true + n := 0 + sz := 0 + var isW bool + for i := 0; i < len(format); i += sz { + if format[i] != '%' { + sz = 1 + continue + } + // "%%" is not a format directive. + if i+1 < len(format) && format[i+1] == '%' { + sz = 2 + continue + } + sz, isW = parsePrintfVerb(format[i:]) + if isW { + if idx >= 0 { + ok = false + } else { + idx = n + } + // "Replace" the last character, the 'w', with a 'v'. + p := i + sz - 1 + format = format[:p] + "v" + format[p+1:] + } + n++ + } + return idx, format, ok +} + +// Parse the printf verb starting with a % at s[0]. +// Return how many bytes it occupies and whether the verb is 'w'. +func parsePrintfVerb(s string) (int, bool) { + // Assume only that the directive is a sequence of non-letters followed by a single letter. + sz := 0 + var r rune + for i := 1; i < len(s); i += sz { + r, sz = utf8.DecodeRuneInString(s[i:]) + if unicode.IsLetter(r) { + return i + sz, r == 'w' + } + } + return len(s), false +} + +type noWrapError struct { + msg string + err error + frame Frame +} + +func (e *noWrapError) Error() string { + return fmt.Sprint(e) +} + +func (e *noWrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) } + +func (e *noWrapError) FormatError(p Printer) (next error) { + p.Print(e.msg) + e.frame.Format(p) + return e.err +} + +type wrapError struct { + msg string + err error + frame Frame +} + +func (e *wrapError) Error() string { + return fmt.Sprint(e) +} + +func (e *wrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) } + +func (e *wrapError) FormatError(p Printer) (next error) { + p.Print(e.msg) + e.frame.Format(p) + return e.err +} + +func (e *wrapError) Unwrap() error { + return e.err +} diff --git a/vendor/golang.org/x/xerrors/format.go b/vendor/golang.org/x/xerrors/format.go new file mode 100644 index 00000000000..1bc9c26b97f --- /dev/null +++ b/vendor/golang.org/x/xerrors/format.go @@ -0,0 +1,34 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +// A Formatter formats error messages. +type Formatter interface { + error + + // FormatError prints the receiver's first error and returns the next error in + // the error chain, if any. + FormatError(p Printer) (next error) +} + +// A Printer formats error messages. +// +// The most common implementation of Printer is the one provided by package fmt +// during Printf (as of Go 1.13). Localization packages such as golang.org/x/text/message +// typically provide their own implementations. +type Printer interface { + // Print appends args to the message output. + Print(args ...interface{}) + + // Printf writes a formatted string. + Printf(format string, args ...interface{}) + + // Detail reports whether error detail is requested. + // After the first call to Detail, all text written to the Printer + // is formatted as additional detail, or ignored when + // detail has not been requested. + // If Detail returns false, the caller can avoid printing the detail at all. + Detail() bool +} diff --git a/vendor/golang.org/x/xerrors/frame.go b/vendor/golang.org/x/xerrors/frame.go new file mode 100644 index 00000000000..0de628ec501 --- /dev/null +++ b/vendor/golang.org/x/xerrors/frame.go @@ -0,0 +1,56 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +import ( + "runtime" +) + +// A Frame contains part of a call stack. +type Frame struct { + // Make room for three PCs: the one we were asked for, what it called, + // and possibly a PC for skipPleaseUseCallersFrames. See: + // https://go.googlesource.com/go/+/032678e0fb/src/runtime/extern.go#169 + frames [3]uintptr +} + +// Caller returns a Frame that describes a frame on the caller's stack. +// The argument skip is the number of frames to skip over. +// Caller(0) returns the frame for the caller of Caller. +func Caller(skip int) Frame { + var s Frame + runtime.Callers(skip+1, s.frames[:]) + return s +} + +// location reports the file, line, and function of a frame. +// +// The returned function may be "" even if file and line are not. +func (f Frame) location() (function, file string, line int) { + frames := runtime.CallersFrames(f.frames[:]) + if _, ok := frames.Next(); !ok { + return "", "", 0 + } + fr, ok := frames.Next() + if !ok { + return "", "", 0 + } + return fr.Function, fr.File, fr.Line +} + +// Format prints the stack as error detail. +// It should be called from an error's Format implementation +// after printing any other error detail. +func (f Frame) Format(p Printer) { + if p.Detail() { + function, file, line := f.location() + if function != "" { + p.Printf("%s\n ", function) + } + if file != "" { + p.Printf("%s:%d\n", file, line) + } + } +} diff --git a/vendor/golang.org/x/xerrors/go.mod b/vendor/golang.org/x/xerrors/go.mod new file mode 100644 index 00000000000..870d4f612db --- /dev/null +++ b/vendor/golang.org/x/xerrors/go.mod @@ -0,0 +1,3 @@ +module golang.org/x/xerrors + +go 1.11 diff --git a/vendor/golang.org/x/xerrors/internal/internal.go b/vendor/golang.org/x/xerrors/internal/internal.go new file mode 100644 index 00000000000..89f4eca5df7 --- /dev/null +++ b/vendor/golang.org/x/xerrors/internal/internal.go @@ -0,0 +1,8 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package internal + +// EnableTrace indicates whether stack information should be recorded in errors. +var EnableTrace = true diff --git a/vendor/golang.org/x/xerrors/wrap.go b/vendor/golang.org/x/xerrors/wrap.go new file mode 100644 index 00000000000..9a3b510374e --- /dev/null +++ b/vendor/golang.org/x/xerrors/wrap.go @@ -0,0 +1,106 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xerrors + +import ( + "reflect" +) + +// A Wrapper provides context around another error. +type Wrapper interface { + // Unwrap returns the next error in the error chain. + // If there is no next error, Unwrap returns nil. + Unwrap() error +} + +// Opaque returns an error with the same error formatting as err +// but that does not match err and cannot be unwrapped. +func Opaque(err error) error { + return noWrapper{err} +} + +type noWrapper struct { + error +} + +func (e noWrapper) FormatError(p Printer) (next error) { + if f, ok := e.error.(Formatter); ok { + return f.FormatError(p) + } + p.Print(e.error) + return nil +} + +// Unwrap returns the result of calling the Unwrap method on err, if err implements +// Unwrap. Otherwise, Unwrap returns nil. +func Unwrap(err error) error { + u, ok := err.(Wrapper) + if !ok { + return nil + } + return u.Unwrap() +} + +// Is reports whether any error in err's chain matches target. +// +// An error is considered to match a target if it is equal to that target or if +// it implements a method Is(error) bool such that Is(target) returns true. +func Is(err, target error) bool { + if target == nil { + return err == target + } + + isComparable := reflect.TypeOf(target).Comparable() + for { + if isComparable && err == target { + return true + } + if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { + return true + } + // TODO: consider supporing target.Is(err). This would allow + // user-definable predicates, but also may allow for coping with sloppy + // APIs, thereby making it easier to get away with them. + if err = Unwrap(err); err == nil { + return false + } + } +} + +// As finds the first error in err's chain that matches the type to which target +// points, and if so, sets the target to its value and returns true. An error +// matches a type if it is assignable to the target type, or if it has a method +// As(interface{}) bool such that As(target) returns true. As will panic if target +// is not a non-nil pointer to a type which implements error or is of interface type. +// +// The As method should set the target to its value and return true if err +// matches the type to which target points. +func As(err error, target interface{}) bool { + if target == nil { + panic("errors: target cannot be nil") + } + val := reflect.ValueOf(target) + typ := val.Type() + if typ.Kind() != reflect.Ptr || val.IsNil() { + panic("errors: target must be a non-nil pointer") + } + if e := typ.Elem(); e.Kind() != reflect.Interface && !e.Implements(errorType) { + panic("errors: *target must be interface or implement error") + } + targetType := typ.Elem() + for err != nil { + if reflect.TypeOf(err).AssignableTo(targetType) { + val.Elem().Set(reflect.ValueOf(err)) + return true + } + if x, ok := err.(interface{ As(interface{}) bool }); ok && x.As(target) { + return true + } + err = Unwrap(err) + } + return false +} + +var errorType = reflect.TypeOf((*error)(nil)).Elem() diff --git a/vendor/google.golang.org/api/AUTHORS b/vendor/google.golang.org/api/AUTHORS index f73b7257457..f07029059d2 100644 --- a/vendor/google.golang.org/api/AUTHORS +++ b/vendor/google.golang.org/api/AUTHORS @@ -8,3 +8,4 @@ # Please keep the list sorted. Google Inc. +LightStep Inc. diff --git a/vendor/google.golang.org/api/CONTRIBUTORS b/vendor/google.golang.org/api/CONTRIBUTORS index fe55ebff072..788677b8f04 100644 --- a/vendor/google.golang.org/api/CONTRIBUTORS +++ b/vendor/google.golang.org/api/CONTRIBUTORS @@ -45,6 +45,7 @@ Jason Hall Johan Euphrosine Kostik Shtoyk Kunpei Sakai +Matthew Dolan Matthew Whisenhunt Michael McGreevy Nick Craig-Wood diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json b/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json index f2867149af1..b02835ff2d0 100644 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json +++ b/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json @@ -24,12 +24,12 @@ } }, "basePath": "/compute/alpha/projects/", - "baseUrl": "https://www.googleapis.com/compute/alpha/projects/", + "baseUrl": "https://compute.googleapis.com/compute/alpha/projects/", "batchPath": "batch/compute/alpha", "description": "Creates and runs virtual machines on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "etag": "\"VPK3KBfpaEgZ16pozGOoMYfKc0U/CGOuQXfe0oClVxpR-J11Xr1lOIU\"", + "etag": "\"F5McR9eEaw0XRpaO3M9gbIugkbs/2JMk4mi9Sl8hl-E8WAls6YNXjFU\"", "icons": { "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" @@ -89,7 +89,7 @@ "acceleratorTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of accelerator types.", + "description": "Retrieves an aggregated list of accelerator types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.acceleratorTypes.aggregatedList", "parameterOrder": [ @@ -138,7 +138,7 @@ ] }, "get": { - "description": "Returns the specified accelerator type.", + "description": "Returns the specified accelerator type. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.acceleratorTypes.get", "parameterOrder": [ @@ -180,7 +180,7 @@ ] }, "list": { - "description": "Retrieves a list of accelerator types available to the specified project.", + "description": "Retrieves a list of accelerator types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.acceleratorTypes.list", "parameterOrder": [ @@ -241,7 +241,7 @@ "addresses": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of addresses.", + "description": "Retrieves an aggregated list of addresses. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.addresses.aggregatedList", "parameterOrder": [ @@ -290,7 +290,7 @@ ] }, "delete": { - "description": "Deletes the specified address resource.", + "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.addresses.delete", "parameterOrder": [ @@ -336,7 +336,7 @@ ] }, "get": { - "description": "Returns the specified address resource.", + "description": "Returns the specified address resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.addresses.get", "parameterOrder": [ @@ -378,7 +378,7 @@ ] }, "insert": { - "description": "Creates an address resource in the specified project using the data included in the request.", + "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.addresses.insert", "parameterOrder": [ @@ -419,7 +419,7 @@ ] }, "list": { - "description": "Retrieves a list of addresses contained within the specified region.", + "description": "Retrieves a list of addresses contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.addresses.list", "parameterOrder": [ @@ -476,7 +476,7 @@ ] }, "setLabels": { - "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.addresses.setLabels", "parameterOrder": [ @@ -525,7 +525,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.addresses.testIamPermissions", "parameterOrder": [ @@ -574,7 +574,7 @@ "autoscalers": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of autoscalers.", + "description": "Retrieves an aggregated list of autoscalers. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.autoscalers.aggregatedList", "parameterOrder": [ @@ -623,7 +623,7 @@ ] }, "delete": { - "description": "Deletes the specified autoscaler.", + "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.autoscalers.delete", "parameterOrder": [ @@ -669,7 +669,7 @@ ] }, "get": { - "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.", + "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.autoscalers.get", "parameterOrder": [ @@ -711,7 +711,7 @@ ] }, "insert": { - "description": "Creates an autoscaler in the specified project using the data included in the request.", + "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.autoscalers.insert", "parameterOrder": [ @@ -752,7 +752,7 @@ ] }, "list": { - "description": "Retrieves a list of autoscalers contained within the specified zone.", + "description": "Retrieves a list of autoscalers contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.autoscalers.list", "parameterOrder": [ @@ -809,7 +809,7 @@ ] }, "patch": { - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.autoscalers.patch", "parameterOrder": [ @@ -856,7 +856,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.autoscalers.testIamPermissions", "parameterOrder": [ @@ -901,7 +901,7 @@ ] }, "update": { - "description": "Updates an autoscaler in the specified project using the data included in the request.", + "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.autoscalers.update", "parameterOrder": [ @@ -952,7 +952,7 @@ "backendBuckets": { "methods": { "addSignedUrlKey": { - "description": "Adds a key for validating requests with signed URLs for this backend bucket.", + "description": "Adds a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendBuckets.addSignedUrlKey", "parameterOrder": [ @@ -992,7 +992,7 @@ ] }, "delete": { - "description": "Deletes the specified BackendBucket resource.", + "description": "Deletes the specified BackendBucket resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.backendBuckets.delete", "parameterOrder": [ @@ -1030,7 +1030,7 @@ ] }, "deleteSignedUrlKey": { - "description": "Deletes a key for validating requests with signed URLs for this backend bucket.", + "description": "Deletes a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendBuckets.deleteSignedUrlKey", "parameterOrder": [ @@ -1074,7 +1074,7 @@ ] }, "get": { - "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request.", + "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendBuckets.get", "parameterOrder": [ @@ -1108,7 +1108,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendBuckets.getIamPolicy", "parameterOrder": [ @@ -1116,6 +1116,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -1142,7 +1148,7 @@ ] }, "insert": { - "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", + "description": "Creates a BackendBucket resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendBuckets.insert", "parameterOrder": [ @@ -1175,7 +1181,7 @@ ] }, "list": { - "description": "Retrieves the list of BackendBucket resources available to the specified project.", + "description": "Retrieves the list of BackendBucket resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendBuckets.list", "parameterOrder": [ @@ -1224,7 +1230,7 @@ ] }, "patch": { - "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.backendBuckets.patch", "parameterOrder": [ @@ -1265,7 +1271,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendBuckets.setIamPolicy", "parameterOrder": [ @@ -1301,7 +1307,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendBuckets.testIamPermissions", "parameterOrder": [ @@ -1338,7 +1344,7 @@ ] }, "update": { - "description": "Updates the specified BackendBucket resource with the data included in the request.", + "description": "Updates the specified BackendBucket resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.backendBuckets.update", "parameterOrder": [ @@ -1383,7 +1389,7 @@ "backendServices": { "methods": { "addSignedUrlKey": { - "description": "Adds a key for validating requests with signed URLs for this backend service.", + "description": "Adds a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.addSignedUrlKey", "parameterOrder": [ @@ -1423,7 +1429,7 @@ ] }, "aggregatedList": { - "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendServices.aggregatedList", "parameterOrder": [ @@ -1472,7 +1478,7 @@ ] }, "delete": { - "description": "Deletes the specified BackendService resource.", + "description": "Deletes the specified BackendService resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.backendServices.delete", "parameterOrder": [ @@ -1510,7 +1516,7 @@ ] }, "deleteSignedUrlKey": { - "description": "Deletes a key for validating requests with signed URLs for this backend service.", + "description": "Deletes a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.deleteSignedUrlKey", "parameterOrder": [ @@ -1554,7 +1560,7 @@ ] }, "get": { - "description": "Returns the specified BackendService resource. Gets a list of available backend services.", + "description": "Returns the specified BackendService resource. Gets a list of available backend services. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendServices.get", "parameterOrder": [ @@ -1588,7 +1594,7 @@ ] }, "getHealth": { - "description": "Gets the most recent health check results for this BackendService.", + "description": "Gets the most recent health check results for this BackendService. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.getHealth", "parameterOrder": [ @@ -1624,7 +1630,7 @@ ] }, "insert": { - "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", + "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.insert", "parameterOrder": [ @@ -1657,7 +1663,7 @@ ] }, "list": { - "description": "Retrieves the list of BackendService resources available to the specified project.", + "description": "Retrieves the list of BackendService resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendServices.list", "parameterOrder": [ @@ -1706,7 +1712,7 @@ ] }, "patch": { - "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.backendServices.patch", "parameterOrder": [ @@ -1747,7 +1753,7 @@ ] }, "setSecurityPolicy": { - "description": "Sets the security policy for the specified backend service.", + "description": "Sets the security policy for the specified backend service. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.setSecurityPolicy", "parameterOrder": [ @@ -1787,7 +1793,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.testIamPermissions", "parameterOrder": [ @@ -1824,7 +1830,7 @@ ] }, "update": { - "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.backendServices.update", "parameterOrder": [ @@ -1869,7 +1875,7 @@ "diskTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of disk types.", + "description": "Retrieves an aggregated list of disk types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.diskTypes.aggregatedList", "parameterOrder": [ @@ -1918,7 +1924,7 @@ ] }, "get": { - "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request.", + "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.diskTypes.get", "parameterOrder": [ @@ -1960,7 +1966,7 @@ ] }, "list": { - "description": "Retrieves a list of disk types available to the specified project.", + "description": "Retrieves a list of disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.diskTypes.list", "parameterOrder": [ @@ -2021,7 +2027,7 @@ "disks": { "methods": { "addResourcePolicies": { - "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", + "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.addResourcePolicies", "parameterOrder": [ @@ -2070,7 +2076,7 @@ ] }, "aggregatedList": { - "description": "Retrieves an aggregated list of persistent disks.", + "description": "Retrieves an aggregated list of persistent disks. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.aggregatedList", "parameterOrder": [ @@ -2119,7 +2125,7 @@ ] }, "createSnapshot": { - "description": "Creates a snapshot of a specified persistent disk.", + "description": "Creates a snapshot of a specified persistent disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.createSnapshot", "parameterOrder": [ @@ -2173,7 +2179,7 @@ ] }, "delete": { - "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.disks.delete", "parameterOrder": [ @@ -2218,7 +2224,7 @@ ] }, "get": { - "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.", + "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.get", "parameterOrder": [ @@ -2260,7 +2266,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.getIamPolicy", "parameterOrder": [ @@ -2269,6 +2275,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -2302,7 +2314,7 @@ ] }, "insert": { - "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", + "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.insert", "parameterOrder": [ @@ -2348,7 +2360,7 @@ ] }, "list": { - "description": "Retrieves a list of persistent disks contained within the specified zone.", + "description": "Retrieves a list of persistent disks contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.list", "parameterOrder": [ @@ -2405,7 +2417,7 @@ ] }, "removeResourcePolicies": { - "description": "Removes resource policies from a disk.", + "description": "Removes resource policies from a disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.removeResourcePolicies", "parameterOrder": [ @@ -2454,7 +2466,7 @@ ] }, "resize": { - "description": "Resizes the specified persistent disk. You can only increase the size of the disk.", + "description": "Resizes the specified persistent disk. You can only increase the size of the disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.resize", "parameterOrder": [ @@ -2503,7 +2515,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.setIamPolicy", "parameterOrder": [ @@ -2547,7 +2559,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.setLabels", "parameterOrder": [ @@ -2596,7 +2608,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.testIamPermissions", "parameterOrder": [ @@ -2645,7 +2657,7 @@ "externalVpnGateways": { "methods": { "delete": { - "description": "Deletes the specified externalVpnGateway.", + "description": "Deletes the specified externalVpnGateway. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.externalVpnGateways.delete", "parameterOrder": [ @@ -2683,7 +2695,7 @@ ] }, "get": { - "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.", + "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.externalVpnGateways.get", "parameterOrder": [ @@ -2717,7 +2729,7 @@ ] }, "insert": { - "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request.", + "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.externalVpnGateways.insert", "parameterOrder": [ @@ -2750,7 +2762,7 @@ ] }, "list": { - "description": "Retrieves the list of ExternalVpnGateway available to the specified project.", + "description": "Retrieves the list of ExternalVpnGateway available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.externalVpnGateways.list", "parameterOrder": [ @@ -2799,7 +2811,7 @@ ] }, "setLabels": { - "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.externalVpnGateways.setLabels", "parameterOrder": [ @@ -2835,7 +2847,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.externalVpnGateways.testIamPermissions", "parameterOrder": [ @@ -2876,7 +2888,7 @@ "firewalls": { "methods": { "delete": { - "description": "Deletes the specified firewall.", + "description": "Deletes the specified firewall. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.firewalls.delete", "parameterOrder": [ @@ -2914,7 +2926,7 @@ ] }, "get": { - "description": "Returns the specified firewall.", + "description": "Returns the specified firewall. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.firewalls.get", "parameterOrder": [ @@ -2948,7 +2960,7 @@ ] }, "insert": { - "description": "Creates a firewall rule in the specified project using the data included in the request.", + "description": "Creates a firewall rule in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.firewalls.insert", "parameterOrder": [ @@ -2981,7 +2993,7 @@ ] }, "list": { - "description": "Retrieves the list of firewall rules available to the specified project.", + "description": "Retrieves the list of firewall rules available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.firewalls.list", "parameterOrder": [ @@ -3030,7 +3042,7 @@ ] }, "patch": { - "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.firewalls.patch", "parameterOrder": [ @@ -3071,7 +3083,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.firewalls.testIamPermissions", "parameterOrder": [ @@ -3108,7 +3120,7 @@ ] }, "update": { - "description": "Updates the specified firewall rule with the data included in the request. The PUT method can only update the following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", + "description": "Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.firewalls.update", "parameterOrder": [ @@ -3153,7 +3165,7 @@ "forwardingRules": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of forwarding rules.", + "description": "Retrieves an aggregated list of forwarding rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.forwardingRules.aggregatedList", "parameterOrder": [ @@ -3202,7 +3214,7 @@ ] }, "delete": { - "description": "Deletes the specified ForwardingRule resource.", + "description": "Deletes the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.forwardingRules.delete", "parameterOrder": [ @@ -3248,7 +3260,7 @@ ] }, "get": { - "description": "Returns the specified ForwardingRule resource.", + "description": "Returns the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.forwardingRules.get", "parameterOrder": [ @@ -3290,7 +3302,7 @@ ] }, "insert": { - "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.forwardingRules.insert", "parameterOrder": [ @@ -3331,7 +3343,7 @@ ] }, "list": { - "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", + "description": "Retrieves a list of ForwardingRule resources available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.forwardingRules.list", "parameterOrder": [ @@ -3388,7 +3400,7 @@ ] }, "patch": { - "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.forwardingRules.patch", "parameterOrder": [ @@ -3437,7 +3449,7 @@ ] }, "setLabels": { - "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.forwardingRules.setLabels", "parameterOrder": [ @@ -3486,7 +3498,7 @@ ] }, "setTarget": { - "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", + "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.forwardingRules.setTarget", "parameterOrder": [ @@ -3535,7 +3547,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.forwardingRules.testIamPermissions", "parameterOrder": [ @@ -3584,7 +3596,7 @@ "globalAddresses": { "methods": { "delete": { - "description": "Deletes the specified address resource.", + "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.globalAddresses.delete", "parameterOrder": [ @@ -3622,7 +3634,7 @@ ] }, "get": { - "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request.", + "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalAddresses.get", "parameterOrder": [ @@ -3656,7 +3668,7 @@ ] }, "insert": { - "description": "Creates an address resource in the specified project using the data included in the request.", + "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalAddresses.insert", "parameterOrder": [ @@ -3689,7 +3701,7 @@ ] }, "list": { - "description": "Retrieves a list of global addresses.", + "description": "Retrieves a list of global addresses. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalAddresses.list", "parameterOrder": [ @@ -3738,7 +3750,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalAddresses.setLabels", "parameterOrder": [ @@ -3774,7 +3786,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalAddresses.testIamPermissions", "parameterOrder": [ @@ -3815,7 +3827,7 @@ "globalForwardingRules": { "methods": { "delete": { - "description": "Deletes the specified GlobalForwardingRule resource.", + "description": "Deletes the specified GlobalForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.globalForwardingRules.delete", "parameterOrder": [ @@ -3853,7 +3865,7 @@ ] }, "get": { - "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.", + "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalForwardingRules.get", "parameterOrder": [ @@ -3887,7 +3899,7 @@ ] }, "insert": { - "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", + "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalForwardingRules.insert", "parameterOrder": [ @@ -3920,7 +3932,7 @@ ] }, "list": { - "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", + "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalForwardingRules.list", "parameterOrder": [ @@ -3969,7 +3981,7 @@ ] }, "patch": { - "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.globalForwardingRules.patch", "parameterOrder": [ @@ -4010,7 +4022,7 @@ ] }, "setLabels": { - "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalForwardingRules.setLabels", "parameterOrder": [ @@ -4046,7 +4058,7 @@ ] }, "setTarget": { - "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", + "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalForwardingRules.setTarget", "parameterOrder": [ @@ -4087,7 +4099,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalForwardingRules.testIamPermissions", "parameterOrder": [ @@ -4128,7 +4140,7 @@ "globalNetworkEndpointGroups": { "methods": { "attachNetworkEndpoints": { - "description": "Attach a network endpoint to the specified network endpoint group.", + "description": "Attach a network endpoint to the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalNetworkEndpointGroups.attachNetworkEndpoints", "parameterOrder": [ @@ -4168,7 +4180,7 @@ ] }, "delete": { - "description": "Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it.", + "description": "Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.globalNetworkEndpointGroups.delete", "parameterOrder": [ @@ -4205,7 +4217,7 @@ ] }, "detachNetworkEndpoints": { - "description": "Detach the network endpoint from the specified network endpoint group.", + "description": "Detach the network endpoint from the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalNetworkEndpointGroups.detachNetworkEndpoints", "parameterOrder": [ @@ -4245,7 +4257,7 @@ ] }, "get": { - "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.", + "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalNetworkEndpointGroups.get", "parameterOrder": [ @@ -4278,7 +4290,7 @@ ] }, "insert": { - "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalNetworkEndpointGroups.insert", "parameterOrder": [ @@ -4311,7 +4323,7 @@ ] }, "list": { - "description": "Retrieves the list of network endpoint groups that are located in the specified project.", + "description": "Retrieves the list of network endpoint groups that are located in the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalNetworkEndpointGroups.list", "parameterOrder": [ @@ -4360,7 +4372,7 @@ ] }, "listNetworkEndpoints": { - "description": "Lists the network endpoints in the specified network endpoint group.", + "description": "Lists the network endpoints in the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalNetworkEndpointGroups.listNetworkEndpoints", "parameterOrder": [ @@ -4420,7 +4432,7 @@ "globalOperations": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of all operations.", + "description": "Retrieves an aggregated list of all operations. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalOperations.aggregatedList", "parameterOrder": [ @@ -4469,7 +4481,7 @@ ] }, "delete": { - "description": "Deletes the specified Operations resource.", + "description": "Deletes the specified Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.globalOperations.delete", "parameterOrder": [ @@ -4499,7 +4511,7 @@ ] }, "get": { - "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request.", + "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalOperations.get", "parameterOrder": [ @@ -4533,7 +4545,7 @@ ] }, "list": { - "description": "Retrieves a list of Operation resources contained within the specified project.", + "description": "Retrieves a list of Operation resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalOperations.list", "parameterOrder": [ @@ -4582,7 +4594,7 @@ ] }, "wait": { - "description": "Waits for the specified Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE.", + "description": "Waits for the specified Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalOperations.wait", "parameterOrder": [ @@ -4620,7 +4632,7 @@ "globalOrganizationOperations": { "methods": { "delete": { - "description": "Deletes the specified Operations resource.", + "description": "Deletes the specified Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.globalOrganizationOperations.delete", "parameterOrder": [ @@ -4647,7 +4659,7 @@ ] }, "get": { - "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request.", + "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalOrganizationOperations.get", "parameterOrder": [ @@ -4678,7 +4690,7 @@ ] }, "list": { - "description": "Retrieves a list of Operation resources contained within the specified organization.", + "description": "Retrieves a list of Operation resources contained within the specified organization. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalOrganizationOperations.list", "parameters": { @@ -4722,7 +4734,7 @@ ] }, "wait": { - "description": "Waits for the specified Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE.", + "description": "Waits for the specified Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalOrganizationOperations.wait", "parameterOrder": [ @@ -4754,10 +4766,209 @@ } } }, + "globalPublicDelegatedPrefixes": { + "methods": { + "delete": { + "description": "Deletes the specified global PublicDelegatedPrefix. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.globalPublicDelegatedPrefixes.delete", + "parameterOrder": [ + "project", + "publicDelegatedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified global PublicDelegatedPrefix resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.globalPublicDelegatedPrefixes.get", + "parameterOrder": [ + "project", + "publicDelegatedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + "response": { + "$ref": "PublicDelegatedPrefix" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.globalPublicDelegatedPrefixes.insert", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/publicDelegatedPrefixes", + "request": { + "$ref": "PublicDelegatedPrefix" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Lists the global PublicDelegatedPrefixes for a project. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.globalPublicDelegatedPrefixes.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/publicDelegatedPrefixes", + "response": { + "$ref": "PublicDelegatedPrefixList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PATCH", + "id": "compute.globalPublicDelegatedPrefixes.patch", + "parameterOrder": [ + "project", + "publicDelegatedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + "request": { + "$ref": "PublicDelegatedPrefix" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "healthChecks": { "methods": { "aggregatedList": { - "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.healthChecks.aggregatedList", "parameterOrder": [ @@ -4806,7 +5017,7 @@ ] }, "delete": { - "description": "Deletes the specified HealthCheck resource.", + "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.healthChecks.delete", "parameterOrder": [ @@ -4844,7 +5055,7 @@ ] }, "get": { - "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", + "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.healthChecks.get", "parameterOrder": [ @@ -4878,7 +5089,7 @@ ] }, "insert": { - "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.healthChecks.insert", "parameterOrder": [ @@ -4911,7 +5122,7 @@ ] }, "list": { - "description": "Retrieves the list of HealthCheck resources available to the specified project.", + "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.healthChecks.list", "parameterOrder": [ @@ -4960,7 +5171,7 @@ ] }, "patch": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.healthChecks.patch", "parameterOrder": [ @@ -5001,7 +5212,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.healthChecks.testIamPermissions", "parameterOrder": [ @@ -5038,7 +5249,7 @@ ] }, "update": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.healthChecks.update", "parameterOrder": [ @@ -5083,7 +5294,7 @@ "httpHealthChecks": { "methods": { "delete": { - "description": "Deletes the specified HttpHealthCheck resource.", + "description": "Deletes the specified HttpHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.httpHealthChecks.delete", "parameterOrder": [ @@ -5121,7 +5332,7 @@ ] }, "get": { - "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request.", + "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpHealthChecks.get", "parameterOrder": [ @@ -5155,7 +5366,7 @@ ] }, "insert": { - "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.httpHealthChecks.insert", "parameterOrder": [ @@ -5188,7 +5399,7 @@ ] }, "list": { - "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", + "description": "Retrieves the list of HttpHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpHealthChecks.list", "parameterOrder": [ @@ -5237,7 +5448,7 @@ ] }, "patch": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.httpHealthChecks.patch", "parameterOrder": [ @@ -5278,7 +5489,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.httpHealthChecks.testIamPermissions", "parameterOrder": [ @@ -5315,7 +5526,7 @@ ] }, "update": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.httpHealthChecks.update", "parameterOrder": [ @@ -5360,7 +5571,7 @@ "httpsHealthChecks": { "methods": { "delete": { - "description": "Deletes the specified HttpsHealthCheck resource.", + "description": "Deletes the specified HttpsHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.httpsHealthChecks.delete", "parameterOrder": [ @@ -5398,7 +5609,7 @@ ] }, "get": { - "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request.", + "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpsHealthChecks.get", "parameterOrder": [ @@ -5432,7 +5643,7 @@ ] }, "insert": { - "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.httpsHealthChecks.insert", "parameterOrder": [ @@ -5465,7 +5676,7 @@ ] }, "list": { - "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", + "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpsHealthChecks.list", "parameterOrder": [ @@ -5514,7 +5725,7 @@ ] }, "patch": { - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.httpsHealthChecks.patch", "parameterOrder": [ @@ -5555,7 +5766,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.httpsHealthChecks.testIamPermissions", "parameterOrder": [ @@ -5592,7 +5803,7 @@ ] }, "update": { - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.httpsHealthChecks.update", "parameterOrder": [ @@ -5637,7 +5848,7 @@ "images": { "methods": { "delete": { - "description": "Deletes the specified image.", + "description": "Deletes the specified image. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.images.delete", "parameterOrder": [ @@ -5675,7 +5886,7 @@ ] }, "deprecate": { - "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", + "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.deprecate", "parameterOrder": [ @@ -5716,7 +5927,7 @@ ] }, "get": { - "description": "Returns the specified image. Gets a list of available images by making a list() request.", + "description": "Returns the specified image. Gets a list of available images by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.get", "parameterOrder": [ @@ -5750,7 +5961,7 @@ ] }, "getFromFamily": { - "description": "Returns the latest image that is part of an image family and is not deprecated.", + "description": "Returns the latest image that is part of an image family and is not deprecated. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.getFromFamily", "parameterOrder": [ @@ -5784,7 +5995,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.getIamPolicy", "parameterOrder": [ @@ -5792,6 +6003,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -5818,7 +6035,7 @@ ] }, "insert": { - "description": "Creates an image in the specified project using the data included in the request.", + "description": "Creates an image in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.insert", "parameterOrder": [ @@ -5859,7 +6076,7 @@ ] }, "list": { - "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.list", "parameterOrder": [ @@ -5908,7 +6125,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.setIamPolicy", "parameterOrder": [ @@ -5944,7 +6161,7 @@ ] }, "setLabels": { - "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.setLabels", "parameterOrder": [ @@ -5980,7 +6197,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.testIamPermissions", "parameterOrder": [ @@ -6021,7 +6238,7 @@ "instanceGroupManagers": { "methods": { "abandonInstances": { - "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.abandonInstances", "parameterOrder": [ @@ -6068,7 +6285,7 @@ ] }, "aggregatedList": { - "description": "Retrieves the list of managed instance groups and groups them by zone.", + "description": "Retrieves the list of managed instance groups and groups them by zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroupManagers.aggregatedList", "parameterOrder": [ @@ -6117,7 +6334,7 @@ ] }, "applyUpdatesToInstances": { - "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.", + "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.applyUpdatesToInstances", "parameterOrder": [ @@ -6159,7 +6376,7 @@ ] }, "createInstances": { - "description": "Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.", + "description": "Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.createInstances", "parameterOrder": [ @@ -6206,7 +6423,7 @@ ] }, "delete": { - "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", + "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instanceGroupManagers.delete", "parameterOrder": [ @@ -6250,7 +6467,7 @@ ] }, "deleteInstances": { - "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.deleteInstances", "parameterOrder": [ @@ -6297,7 +6514,7 @@ ] }, "deletePerInstanceConfigs": { - "description": "Deletes selected per-instance configs for the managed instance group.", + "description": "Deletes selected per-instance configs for the managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.deletePerInstanceConfigs", "parameterOrder": [ @@ -6339,7 +6556,7 @@ ] }, "get": { - "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.", + "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroupManagers.get", "parameterOrder": [ @@ -6379,7 +6596,7 @@ ] }, "insert": { - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.insert", "parameterOrder": [ @@ -6419,7 +6636,7 @@ ] }, "list": { - "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", + "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroupManagers.list", "parameterOrder": [ @@ -6474,8 +6691,71 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "listErrors": { + "description": "Lists all errors thrown by actions on instances for a given managed instance group. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.instanceGroupManagers.listErrors", + "parameterOrder": [ + "project", + "zone", + "instanceGroupManager" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "instanceGroupManager": { + "description": "The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors", + "response": { + "$ref": "InstanceGroupManagersListErrorsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "listManagedInstances": { - "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", + "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.listManagedInstances", "parameterOrder": [ @@ -6538,7 +6818,7 @@ ] }, "listPerInstanceConfigs": { - "description": "Lists all of the per-instance configs defined for the managed instance group.", + "description": "Lists all of the per-instance configs defined for the managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.listPerInstanceConfigs", "parameterOrder": [ @@ -6601,7 +6881,7 @@ ] }, "patch": { - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instanceGroupManagers.patch", "parameterOrder": [ @@ -6648,7 +6928,7 @@ ] }, "patchPerInstanceConfigs": { - "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", + "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.patchPerInstanceConfigs", "parameterOrder": [ @@ -6695,7 +6975,7 @@ ] }, "recreateInstances": { - "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.recreateInstances", "parameterOrder": [ @@ -6742,7 +7022,7 @@ ] }, "resize": { - "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.resize", "parameterOrder": [ @@ -6794,7 +7074,7 @@ ] }, "resizeAdvanced": { - "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.resizeAdvanced", "parameterOrder": [ @@ -6841,7 +7121,7 @@ ] }, "setAutoHealingPolicies": { - "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.", + "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.setAutoHealingPolicies", "parameterOrder": [ @@ -6888,7 +7168,7 @@ ] }, "setInstanceTemplate": { - "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", + "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.setInstanceTemplate", "parameterOrder": [ @@ -6935,7 +7215,7 @@ ] }, "setTargetPools": { - "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", + "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.setTargetPools", "parameterOrder": [ @@ -6982,7 +7262,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.testIamPermissions", "parameterOrder": [ @@ -7027,7 +7307,7 @@ ] }, "update": { - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.instanceGroupManagers.update", "parameterOrder": [ @@ -7074,7 +7354,7 @@ ] }, "updatePerInstanceConfigs": { - "description": "Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", + "description": "Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.updatePerInstanceConfigs", "parameterOrder": [ @@ -7125,7 +7405,7 @@ "instanceGroups": { "methods": { "addInstances": { - "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", + "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.addInstances", "parameterOrder": [ @@ -7172,7 +7452,7 @@ ] }, "aggregatedList": { - "description": "Retrieves the list of instance groups and sorts them by zone.", + "description": "Retrieves the list of instance groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroups.aggregatedList", "parameterOrder": [ @@ -7221,7 +7501,7 @@ ] }, "delete": { - "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", + "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instanceGroups.delete", "parameterOrder": [ @@ -7265,7 +7545,7 @@ ] }, "get": { - "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request.", + "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroups.get", "parameterOrder": [ @@ -7305,7 +7585,7 @@ ] }, "insert": { - "description": "Creates an instance group in the specified project using the parameters that are included in the request.", + "description": "Creates an instance group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.insert", "parameterOrder": [ @@ -7345,7 +7625,7 @@ ] }, "list": { - "description": "Retrieves the list of instance groups that are located in the specified project and zone.", + "description": "Retrieves the list of instance groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroups.list", "parameterOrder": [ @@ -7401,7 +7681,7 @@ ] }, "listInstances": { - "description": "Lists the instances in the specified instance group.", + "description": "Lists the instances in the specified instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.listInstances", "parameterOrder": [ @@ -7467,7 +7747,7 @@ ] }, "removeInstances": { - "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", + "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.removeInstances", "parameterOrder": [ @@ -7514,7 +7794,7 @@ ] }, "setNamedPorts": { - "description": "Sets the named ports for the specified instance group.", + "description": "Sets the named ports for the specified instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.setNamedPorts", "parameterOrder": [ @@ -7561,7 +7841,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.testIamPermissions", "parameterOrder": [ @@ -7610,7 +7890,7 @@ "instanceTemplates": { "methods": { "delete": { - "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", + "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instanceTemplates.delete", "parameterOrder": [ @@ -7648,7 +7928,7 @@ ] }, "get": { - "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request.", + "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceTemplates.get", "parameterOrder": [ @@ -7682,7 +7962,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceTemplates.getIamPolicy", "parameterOrder": [ @@ -7690,6 +7970,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -7716,7 +8002,7 @@ ] }, "insert": { - "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", + "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceTemplates.insert", "parameterOrder": [ @@ -7749,7 +8035,7 @@ ] }, "list": { - "description": "Retrieves a list of instance templates that are contained within the specified project.", + "description": "Retrieves a list of instance templates that are contained within the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceTemplates.list", "parameterOrder": [ @@ -7798,7 +8084,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceTemplates.setIamPolicy", "parameterOrder": [ @@ -7834,7 +8120,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceTemplates.testIamPermissions", "parameterOrder": [ @@ -7875,7 +8161,7 @@ "instances": { "methods": { "addAccessConfig": { - "description": "Adds an access config to an instance's network interface.", + "description": "Adds an access config to an instance's network interface. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.addAccessConfig", "parameterOrder": [ @@ -7931,7 +8217,7 @@ ] }, "addResourcePolicies": { - "description": "Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.", + "description": "Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.addResourcePolicies", "parameterOrder": [ @@ -7980,7 +8266,7 @@ ] }, "aggregatedList": { - "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones.", + "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.aggregatedList", "parameterOrder": [ @@ -8029,7 +8315,7 @@ ] }, "attachDisk": { - "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", + "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.attachDisk", "parameterOrder": [ @@ -8083,7 +8369,7 @@ ] }, "delete": { - "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", + "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instances.delete", "parameterOrder": [ @@ -8129,7 +8415,7 @@ ] }, "deleteAccessConfig": { - "description": "Deletes an access config from an instance's network interface.", + "description": "Deletes an access config from an instance's network interface. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.deleteAccessConfig", "parameterOrder": [ @@ -8189,7 +8475,7 @@ ] }, "detachDisk": { - "description": "Detaches a disk from an instance.", + "description": "Detaches a disk from an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.detachDisk", "parameterOrder": [ @@ -8242,7 +8528,7 @@ ] }, "get": { - "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request.", + "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.get", "parameterOrder": [ @@ -8284,7 +8570,7 @@ ] }, "getEffectiveFirewalls": { - "description": "Returns effective firewalls applied to an interface of the instance.", + "description": "Returns effective firewalls applied to an interface of the instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getEffectiveFirewalls", "parameterOrder": [ @@ -8333,7 +8619,7 @@ ] }, "getGuestAttributes": { - "description": "Returns the specified guest attributes entry.", + "description": "Returns the specified guest attributes entry. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getGuestAttributes", "parameterOrder": [ @@ -8385,7 +8671,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getIamPolicy", "parameterOrder": [ @@ -8394,6 +8680,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -8427,7 +8719,7 @@ ] }, "getSerialPortOutput": { - "description": "Returns the last 1 MB of serial port output from the specified instance.", + "description": "Returns the last 1 MB of serial port output from the specified instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getSerialPortOutput", "parameterOrder": [ @@ -8484,7 +8776,7 @@ ] }, "getShieldedInstanceIdentity": { - "description": "Returns the Shielded Instance Identity of an instance", + "description": "Returns the Shielded Instance Identity of an instance (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getShieldedInstanceIdentity", "parameterOrder": [ @@ -8526,7 +8818,7 @@ ] }, "getShieldedVmIdentity": { - "description": "Returns the Shielded VM Identity of an instance", + "description": "Returns the Shielded VM Identity of an instance (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getShieldedVmIdentity", "parameterOrder": [ @@ -8568,7 +8860,7 @@ ] }, "insert": { - "description": "Creates an instance resource in the specified project using the data included in the request.", + "description": "Creates an instance resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.insert", "parameterOrder": [ @@ -8619,7 +8911,7 @@ ] }, "list": { - "description": "Retrieves the list of instances contained within the specified zone.", + "description": "Retrieves the list of instances contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.list", "parameterOrder": [ @@ -8676,7 +8968,7 @@ ] }, "listReferrers": { - "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.", + "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.listReferrers", "parameterOrder": [ @@ -8741,7 +9033,7 @@ ] }, "removeResourcePolicies": { - "description": "Removes resource policies from an instance.", + "description": "Removes resource policies from an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.removeResourcePolicies", "parameterOrder": [ @@ -8790,7 +9082,7 @@ ] }, "reset": { - "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", + "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.reset", "parameterOrder": [ @@ -8836,7 +9128,7 @@ ] }, "resume": { - "description": "Resumes an instance that was suspended using the instances().suspend method.", + "description": "Resumes an instance that was suspended using the instances().suspend method. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.resume", "parameterOrder": [ @@ -8885,7 +9177,7 @@ ] }, "setDeletionProtection": { - "description": "Sets deletion protection on the instance.", + "description": "Sets deletion protection on the instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setDeletionProtection", "parameterOrder": [ @@ -8937,7 +9229,7 @@ ] }, "setDiskAutoDelete": { - "description": "Sets the auto-delete flag for a disk attached to an instance.", + "description": "Sets the auto-delete flag for a disk attached to an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setDiskAutoDelete", "parameterOrder": [ @@ -8998,7 +9290,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setIamPolicy", "parameterOrder": [ @@ -9042,7 +9334,7 @@ ] }, "setLabels": { - "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setLabels", "parameterOrder": [ @@ -9091,7 +9383,7 @@ ] }, "setMachineResources": { - "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", + "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMachineResources", "parameterOrder": [ @@ -9140,7 +9432,7 @@ ] }, "setMachineType": { - "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", + "description": "Changes the machine type for a stopped instance to the machine type specified in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMachineType", "parameterOrder": [ @@ -9189,7 +9481,7 @@ ] }, "setMetadata": { - "description": "Sets metadata for the specified instance to the data included in the request.", + "description": "Sets metadata for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMetadata", "parameterOrder": [ @@ -9238,7 +9530,7 @@ ] }, "setMinCpuPlatform": { - "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", + "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMinCpuPlatform", "parameterOrder": [ @@ -9286,8 +9578,57 @@ "https://www.googleapis.com/auth/compute" ] }, + "setName": { + "description": "Sets name of an instance. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.instances.setName", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "The instance name for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instances/{instance}/setName", + "request": { + "$ref": "InstancesSetNameRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setScheduling": { - "description": "Sets an instance's scheduling options.", + "description": "Sets an instance's scheduling options. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setScheduling", "parameterOrder": [ @@ -9336,7 +9677,7 @@ ] }, "setServiceAccount": { - "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", + "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setServiceAccount", "parameterOrder": [ @@ -9385,7 +9726,7 @@ ] }, "setShieldedInstanceIntegrityPolicy": { - "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.setShieldedInstanceIntegrityPolicy", "parameterOrder": [ @@ -9434,7 +9775,7 @@ ] }, "setShieldedVmIntegrityPolicy": { - "description": "Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.setShieldedVmIntegrityPolicy", "parameterOrder": [ @@ -9483,7 +9824,7 @@ ] }, "setTags": { - "description": "Sets network tags for the specified instance to the data included in the request.", + "description": "Sets network tags for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setTags", "parameterOrder": [ @@ -9532,7 +9873,7 @@ ] }, "simulateMaintenanceEvent": { - "description": "Simulates a maintenance event on the instance.", + "description": "Simulates a maintenance event on the instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.simulateMaintenanceEvent", "parameterOrder": [ @@ -9573,7 +9914,7 @@ ] }, "start": { - "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.start", "parameterOrder": [ @@ -9619,7 +9960,7 @@ ] }, "startWithEncryptionKey": { - "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.startWithEncryptionKey", "parameterOrder": [ @@ -9668,7 +10009,7 @@ ] }, "stop": { - "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", + "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.stop", "parameterOrder": [ @@ -9719,7 +10060,7 @@ ] }, "suspend": { - "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.", + "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.suspend", "parameterOrder": [ @@ -9770,7 +10111,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.testIamPermissions", "parameterOrder": [ @@ -9815,7 +10156,7 @@ ] }, "updateAccessConfig": { - "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.updateAccessConfig", "parameterOrder": [ @@ -9871,7 +10212,7 @@ ] }, "updateDisplayDevice": { - "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.updateDisplayDevice", "parameterOrder": [ @@ -9920,7 +10261,7 @@ ] }, "updateNetworkInterface": { - "description": "Updates an instance's network interface. This method follows PATCH semantics.", + "description": "Updates an instance's network interface. This method follows PATCH semantics. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.updateNetworkInterface", "parameterOrder": [ @@ -9976,7 +10317,7 @@ ] }, "updateShieldedInstanceConfig": { - "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.updateShieldedInstanceConfig", "parameterOrder": [ @@ -10025,7 +10366,7 @@ ] }, "updateShieldedVmConfig": { - "description": "Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.updateShieldedVmConfig", "parameterOrder": [ @@ -10078,7 +10419,7 @@ "interconnectAttachments": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of interconnect attachments.", + "description": "Retrieves an aggregated list of interconnect attachments. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectAttachments.aggregatedList", "parameterOrder": [ @@ -10127,7 +10468,7 @@ ] }, "delete": { - "description": "Deletes the specified interconnect attachment.", + "description": "Deletes the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.interconnectAttachments.delete", "parameterOrder": [ @@ -10173,7 +10514,7 @@ ] }, "get": { - "description": "Returns the specified interconnect attachment.", + "description": "Returns the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectAttachments.get", "parameterOrder": [ @@ -10215,7 +10556,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectAttachments.getIamPolicy", "parameterOrder": [ @@ -10224,6 +10565,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -10257,7 +10604,7 @@ ] }, "insert": { - "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", + "description": "Creates an InterconnectAttachment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnectAttachments.insert", "parameterOrder": [ @@ -10303,7 +10650,7 @@ ] }, "list": { - "description": "Retrieves the list of interconnect attachments contained within the specified region.", + "description": "Retrieves the list of interconnect attachments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectAttachments.list", "parameterOrder": [ @@ -10360,7 +10707,7 @@ ] }, "patch": { - "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.interconnectAttachments.patch", "parameterOrder": [ @@ -10409,7 +10756,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnectAttachments.setIamPolicy", "parameterOrder": [ @@ -10453,7 +10800,7 @@ ] }, "setLabels": { - "description": "Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnectAttachments.setLabels", "parameterOrder": [ @@ -10502,7 +10849,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnectAttachments.testIamPermissions", "parameterOrder": [ @@ -10551,7 +10898,7 @@ "interconnectLocations": { "methods": { "get": { - "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.", + "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectLocations.get", "parameterOrder": [ @@ -10585,7 +10932,7 @@ ] }, "list": { - "description": "Retrieves the list of interconnect locations available to the specified project.", + "description": "Retrieves the list of interconnect locations available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectLocations.list", "parameterOrder": [ @@ -10634,7 +10981,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnectLocations.testIamPermissions", "parameterOrder": [ @@ -10675,7 +11022,7 @@ "interconnects": { "methods": { "delete": { - "description": "Deletes the specified interconnect.", + "description": "Deletes the specified interconnect. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.interconnects.delete", "parameterOrder": [ @@ -10713,7 +11060,7 @@ ] }, "get": { - "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.", + "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnects.get", "parameterOrder": [ @@ -10747,7 +11094,7 @@ ] }, "getDiagnostics": { - "description": "Returns the interconnectDiagnostics for the specified interconnect.", + "description": "Returns the interconnectDiagnostics for the specified interconnect. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnects.getDiagnostics", "parameterOrder": [ @@ -10781,7 +11128,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnects.getIamPolicy", "parameterOrder": [ @@ -10789,6 +11136,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -10815,7 +11168,7 @@ ] }, "insert": { - "description": "Creates a Interconnect in the specified project using the data included in the request.", + "description": "Creates a Interconnect in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnects.insert", "parameterOrder": [ @@ -10848,7 +11201,7 @@ ] }, "list": { - "description": "Retrieves the list of interconnect available to the specified project.", + "description": "Retrieves the list of interconnect available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnects.list", "parameterOrder": [ @@ -10897,7 +11250,7 @@ ] }, "patch": { - "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.interconnects.patch", "parameterOrder": [ @@ -10938,7 +11291,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnects.setIamPolicy", "parameterOrder": [ @@ -10974,7 +11327,7 @@ ] }, "setLabels": { - "description": "Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnects.setLabels", "parameterOrder": [ @@ -11010,7 +11363,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnects.testIamPermissions", "parameterOrder": [ @@ -11051,7 +11404,7 @@ "licenseCodes": { "methods": { "get": { - "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code.", + "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenseCodes.get", "parameterOrder": [ @@ -11085,7 +11438,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenseCodes.getIamPolicy", "parameterOrder": [ @@ -11093,6 +11446,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -11119,7 +11478,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.licenseCodes.setIamPolicy", "parameterOrder": [ @@ -11155,7 +11514,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.licenseCodes.testIamPermissions", "parameterOrder": [ @@ -11196,7 +11555,7 @@ "licenses": { "methods": { "delete": { - "description": "Deletes the specified license.", + "description": "Deletes the specified license. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.licenses.delete", "parameterOrder": [ @@ -11234,7 +11593,7 @@ ] }, "get": { - "description": "Returns the specified License resource.", + "description": "Returns the specified License resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenses.get", "parameterOrder": [ @@ -11268,7 +11627,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenses.getIamPolicy", "parameterOrder": [ @@ -11276,6 +11635,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -11302,7 +11667,7 @@ ] }, "insert": { - "description": "Create a License resource in the specified project.", + "description": "Create a License resource in the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.licenses.insert", "parameterOrder": [ @@ -11338,7 +11703,7 @@ ] }, "list": { - "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenses.list", "parameterOrder": [ @@ -11387,7 +11752,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.licenses.setIamPolicy", "parameterOrder": [ @@ -11423,7 +11788,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.licenses.testIamPermissions", "parameterOrder": [ @@ -11464,7 +11829,7 @@ "machineImages": { "methods": { "delete": { - "description": "Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone.", + "description": "Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.machineImages.delete", "parameterOrder": [ @@ -11502,7 +11867,7 @@ ] }, "get": { - "description": "Returns the specified machine image. Gets a list of available machine images by making a list() request.", + "description": "Returns the specified machine image. Gets a list of available machine images by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineImages.get", "parameterOrder": [ @@ -11536,7 +11901,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineImages.getIamPolicy", "parameterOrder": [ @@ -11544,6 +11909,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -11570,7 +11941,7 @@ ] }, "insert": { - "description": "Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance.", + "description": "Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.machineImages.insert", "parameterOrder": [ @@ -11608,7 +11979,7 @@ ] }, "list": { - "description": "Retrieves a list of machine images that are contained within the specified project.", + "description": "Retrieves a list of machine images that are contained within the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineImages.list", "parameterOrder": [ @@ -11657,7 +12028,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.machineImages.setIamPolicy", "parameterOrder": [ @@ -11693,7 +12064,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.machineImages.testIamPermissions", "parameterOrder": [ @@ -11734,7 +12105,7 @@ "machineTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of machine types.", + "description": "Retrieves an aggregated list of machine types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineTypes.aggregatedList", "parameterOrder": [ @@ -11783,7 +12154,7 @@ ] }, "get": { - "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request.", + "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineTypes.get", "parameterOrder": [ @@ -11825,7 +12196,7 @@ ] }, "list": { - "description": "Retrieves a list of machine types available to the specified project.", + "description": "Retrieves a list of machine types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineTypes.list", "parameterOrder": [ @@ -11886,7 +12257,7 @@ "networkEndpointGroups": { "methods": { "aggregatedList": { - "description": "Retrieves the list of network endpoint groups and sorts them by zone.", + "description": "Retrieves the list of network endpoint groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networkEndpointGroups.aggregatedList", "parameterOrder": [ @@ -11935,7 +12306,7 @@ ] }, "attachNetworkEndpoints": { - "description": "Attach a list of network endpoints to the specified network endpoint group.", + "description": "Attach a list of network endpoints to the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.attachNetworkEndpoints", "parameterOrder": [ @@ -11982,7 +12353,7 @@ ] }, "delete": { - "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.", + "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.networkEndpointGroups.delete", "parameterOrder": [ @@ -12026,7 +12397,7 @@ ] }, "detachNetworkEndpoints": { - "description": "Detach a list of network endpoints from the specified network endpoint group.", + "description": "Detach a list of network endpoints from the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.detachNetworkEndpoints", "parameterOrder": [ @@ -12073,7 +12444,7 @@ ] }, "get": { - "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.", + "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networkEndpointGroups.get", "parameterOrder": [ @@ -12113,7 +12484,7 @@ ] }, "insert": { - "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.insert", "parameterOrder": [ @@ -12153,7 +12524,7 @@ ] }, "list": { - "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone.", + "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networkEndpointGroups.list", "parameterOrder": [ @@ -12209,7 +12580,7 @@ ] }, "listNetworkEndpoints": { - "description": "Lists the network endpoints in the specified network endpoint group.", + "description": "Lists the network endpoints in the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.listNetworkEndpoints", "parameterOrder": [ @@ -12275,7 +12646,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.testIamPermissions", "parameterOrder": [ @@ -12324,7 +12695,7 @@ "networks": { "methods": { "addPeering": { - "description": "Adds a peering to the specified network.", + "description": "Adds a peering to the specified network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.addPeering", "parameterOrder": [ @@ -12365,7 +12736,7 @@ ] }, "delete": { - "description": "Deletes the specified network.", + "description": "Deletes the specified network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.networks.delete", "parameterOrder": [ @@ -12403,7 +12774,7 @@ ] }, "get": { - "description": "Returns the specified network. Gets a list of available networks by making a list() request.", + "description": "Returns the specified network. Gets a list of available networks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networks.get", "parameterOrder": [ @@ -12437,7 +12808,7 @@ ] }, "getEffectiveFirewalls": { - "description": "Returns the effective firewalls on a given network.", + "description": "Returns the effective firewalls on a given network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networks.getEffectiveFirewalls", "parameterOrder": [ @@ -12471,7 +12842,7 @@ ] }, "insert": { - "description": "Creates a network in the specified project using the data included in the request.", + "description": "Creates a network in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.insert", "parameterOrder": [ @@ -12504,7 +12875,7 @@ ] }, "list": { - "description": "Retrieves the list of networks available to the specified project.", + "description": "Retrieves the list of networks available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networks.list", "parameterOrder": [ @@ -12553,7 +12924,7 @@ ] }, "listIpAddresses": { - "description": "Lists the internal IP addresses in the specified network.", + "description": "Lists the internal IP addresses in the specified network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networks.listIpAddresses", "parameterOrder": [ @@ -12615,7 +12986,7 @@ ] }, "listIpOwners": { - "description": "Lists the internal IP owners in the specified network.", + "description": "Lists the internal IP owners in the specified network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networks.listIpOwners", "parameterOrder": [ @@ -12699,7 +13070,7 @@ ] }, "listPeeringRoutes": { - "description": "Lists the peering routes exchanged over peering connection.", + "description": "Lists the peering routes exchanged over peering connection. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networks.listPeeringRoutes", "parameterOrder": [ @@ -12779,7 +13150,7 @@ ] }, "patch": { - "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.", + "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.networks.patch", "parameterOrder": [ @@ -12820,7 +13191,7 @@ ] }, "removePeering": { - "description": "Removes a peering from the specified network.", + "description": "Removes a peering from the specified network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.removePeering", "parameterOrder": [ @@ -12861,7 +13232,7 @@ ] }, "switchToCustomMode": { - "description": "Switches the network mode from auto subnet mode to custom subnet mode.", + "description": "Switches the network mode from auto subnet mode to custom subnet mode. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.switchToCustomMode", "parameterOrder": [ @@ -12899,7 +13270,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.testIamPermissions", "parameterOrder": [ @@ -12936,7 +13307,7 @@ ] }, "updatePeering": { - "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes", + "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.networks.updatePeering", "parameterOrder": [ @@ -12981,7 +13352,7 @@ "nodeGroups": { "methods": { "addNodes": { - "description": "Adds specified number of nodes to the node group.", + "description": "Adds specified number of nodes to the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.addNodes", "parameterOrder": [ @@ -13030,7 +13401,7 @@ ] }, "aggregatedList": { - "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.", + "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.aggregatedList", "parameterOrder": [ @@ -13079,7 +13450,7 @@ ] }, "delete": { - "description": "Deletes the specified NodeGroup resource.", + "description": "Deletes the specified NodeGroup resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.nodeGroups.delete", "parameterOrder": [ @@ -13125,7 +13496,7 @@ ] }, "deleteNodes": { - "description": "Deletes specified nodes from the node group.", + "description": "Deletes specified nodes from the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.deleteNodes", "parameterOrder": [ @@ -13135,7 +13506,7 @@ ], "parameters": { "nodeGroup": { - "description": "Name of the NodeGroup resource to delete.", + "description": "Name of the NodeGroup resource whose nodes will be deleted.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -13174,7 +13545,7 @@ ] }, "get": { - "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead.", + "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.get", "parameterOrder": [ @@ -13216,7 +13587,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.getIamPolicy", "parameterOrder": [ @@ -13225,6 +13596,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -13258,7 +13635,7 @@ ] }, "insert": { - "description": "Creates a NodeGroup resource in the specified project using the data included in the request.", + "description": "Creates a NodeGroup resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.insert", "parameterOrder": [ @@ -13307,7 +13684,7 @@ ] }, "list": { - "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.", + "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.list", "parameterOrder": [ @@ -13364,7 +13741,7 @@ ] }, "listNodes": { - "description": "Lists nodes in the node group.", + "description": "Lists nodes in the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.listNodes", "parameterOrder": [ @@ -13428,8 +13805,57 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "patch": { + "description": "Patch the node group. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PATCH", + "id": "compute.nodeGroups.patch", + "parameterOrder": [ + "project", + "zone", + "nodeGroup" + ], + "parameters": { + "nodeGroup": { + "description": "Name of the NodeGroup resource to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/nodeGroups/{nodeGroup}", + "request": { + "$ref": "NodeGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setAutoscalingPolicy": { - "description": "Sets the autoscaling policy of the node group.", + "description": "Sets the autoscaling policy of the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.setAutoscalingPolicy", "parameterOrder": [ @@ -13478,7 +13904,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.setIamPolicy", "parameterOrder": [ @@ -13522,7 +13948,7 @@ ] }, "setNodeTemplate": { - "description": "Updates the node template of the node group.", + "description": "Updates the node template of the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.setNodeTemplate", "parameterOrder": [ @@ -13571,7 +13997,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.testIamPermissions", "parameterOrder": [ @@ -13620,7 +14046,7 @@ "nodeTemplates": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of node templates.", + "description": "Retrieves an aggregated list of node templates. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.aggregatedList", "parameterOrder": [ @@ -13669,7 +14095,7 @@ ] }, "delete": { - "description": "Deletes the specified NodeTemplate resource.", + "description": "Deletes the specified NodeTemplate resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.nodeTemplates.delete", "parameterOrder": [ @@ -13715,7 +14141,7 @@ ] }, "get": { - "description": "Returns the specified node template. Gets a list of available node templates by making a list() request.", + "description": "Returns the specified node template. Gets a list of available node templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.get", "parameterOrder": [ @@ -13757,7 +14183,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.getIamPolicy", "parameterOrder": [ @@ -13766,6 +14192,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -13799,7 +14231,7 @@ ] }, "insert": { - "description": "Creates a NodeTemplate resource in the specified project using the data included in the request.", + "description": "Creates a NodeTemplate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeTemplates.insert", "parameterOrder": [ @@ -13840,7 +14272,7 @@ ] }, "list": { - "description": "Retrieves a list of node templates available to the specified project.", + "description": "Retrieves a list of node templates available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.list", "parameterOrder": [ @@ -13897,7 +14329,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeTemplates.setIamPolicy", "parameterOrder": [ @@ -13941,7 +14373,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeTemplates.testIamPermissions", "parameterOrder": [ @@ -13990,7 +14422,7 @@ "nodeTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of node types.", + "description": "Retrieves an aggregated list of node types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTypes.aggregatedList", "parameterOrder": [ @@ -14039,7 +14471,7 @@ ] }, "get": { - "description": "Returns the specified node type. Gets a list of available node types by making a list() request.", + "description": "Returns the specified node type. Gets a list of available node types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTypes.get", "parameterOrder": [ @@ -14081,7 +14513,7 @@ ] }, "list": { - "description": "Retrieves a list of node types available to the specified project.", + "description": "Retrieves a list of node types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTypes.list", "parameterOrder": [ @@ -14142,7 +14574,7 @@ "organizationSecurityPolicies": { "methods": { "addAssociation": { - "description": "Inserts an association for the specified security policy.", + "description": "Inserts an association for the specified security policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.addAssociation", "parameterOrder": [ @@ -14162,7 +14594,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" } @@ -14180,7 +14612,7 @@ ] }, "addRule": { - "description": "Inserts a rule into a security policy.", + "description": "Inserts a rule into a security policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.addRule", "parameterOrder": [ @@ -14195,7 +14627,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" } @@ -14213,7 +14645,7 @@ ] }, "copyRules": { - "description": "Copies rules to the specified security policy.", + "description": "Copies rules to the specified security policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.copyRules", "parameterOrder": [ @@ -14228,7 +14660,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" }, @@ -14248,7 +14680,7 @@ ] }, "delete": { - "description": "Deletes the specified policy.", + "description": "Deletes the specified policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.organizationSecurityPolicies.delete", "parameterOrder": [ @@ -14263,7 +14695,7 @@ "securityPolicy": { "description": "Name of the security policy to delete.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" } @@ -14278,7 +14710,7 @@ ] }, "get": { - "description": "List all of the ordered rules present in a single specified policy.", + "description": "List all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.get", "parameterOrder": [ @@ -14288,7 +14720,7 @@ "securityPolicy": { "description": "Name of the security policy to get.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" } @@ -14304,7 +14736,7 @@ ] }, "getAssociation": { - "description": "Gets an association with the specified name.", + "description": "Gets an association with the specified name. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.getAssociation", "parameterOrder": [ @@ -14319,7 +14751,7 @@ "securityPolicy": { "description": "Name of the security policy to which the queried rule belongs.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" } @@ -14335,7 +14767,7 @@ ] }, "getRule": { - "description": "Gets a rule at the specified priority.", + "description": "Gets a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.getRule", "parameterOrder": [ @@ -14351,7 +14783,7 @@ "securityPolicy": { "description": "Name of the security policy to which the queried rule belongs.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" } @@ -14367,7 +14799,7 @@ ] }, "insert": { - "description": "Creates a new policy in the specified project using the data included in the request.", + "description": "Creates a new policy in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.insert", "parameters": { @@ -14395,7 +14827,7 @@ ] }, "list": { - "description": "List all the policies that have been configured for the specified project.", + "description": "List all the policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.list", "parameters": { @@ -14439,7 +14871,7 @@ ] }, "listAssociations": { - "description": "Lists associations of a specified target, i.e., organization or folder.", + "description": "Lists associations of a specified target, i.e., organization or folder. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.organizationSecurityPolicies.listAssociations", "parameters": { @@ -14459,7 +14891,7 @@ ] }, "move": { - "description": "Moves the specified security policy.", + "description": "Moves the specified security policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.move", "parameterOrder": [ @@ -14479,7 +14911,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" } @@ -14494,7 +14926,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request.", + "description": "Patches the specified policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.organizationSecurityPolicies.patch", "parameterOrder": [ @@ -14509,7 +14941,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" } @@ -14527,7 +14959,7 @@ ] }, "patchRule": { - "description": "Patches a rule at the specified priority.", + "description": "Patches a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.patchRule", "parameterOrder": [ @@ -14548,7 +14980,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" } @@ -14566,7 +14998,7 @@ ] }, "removeAssociation": { - "description": "Removes an association for the specified security policy.", + "description": "Removes an association for the specified security policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.removeAssociation", "parameterOrder": [ @@ -14586,7 +15018,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" } @@ -14601,7 +15033,7 @@ ] }, "removeRule": { - "description": "Deletes a rule at the specified priority.", + "description": "Deletes a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.organizationSecurityPolicies.removeRule", "parameterOrder": [ @@ -14622,7 +15054,7 @@ "securityPolicy": { "description": "Name of the security policy to update.", "location": "path", - "pattern": "[0-9]{0,20}", + "pattern": "(securityPolicies/)?[0-9]{0,20}", "required": true, "type": "string" } @@ -14638,10 +15070,343 @@ } } }, + "packetMirrorings": { + "methods": { + "aggregatedList": { + "description": "Retrieves an aggregated list of packetMirrorings. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.packetMirrorings.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/packetMirrorings", + "response": { + "$ref": "PacketMirroringAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified PacketMirroring resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.packetMirrorings.delete", + "parameterOrder": [ + "project", + "region", + "packetMirroring" + ], + "parameters": { + "packetMirroring": { + "description": "Name of the PacketMirroring resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified PacketMirroring resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.packetMirrorings.get", + "parameterOrder": [ + "project", + "region", + "packetMirroring" + ], + "parameters": { + "packetMirroring": { + "description": "Name of the PacketMirroring resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + "response": { + "$ref": "PacketMirroring" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a PacketMirroring resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.packetMirrorings.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings", + "request": { + "$ref": "PacketMirroring" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves a list of PacketMirroring resources available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.packetMirrorings.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings", + "response": { + "$ref": "PacketMirroringList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PATCH", + "id": "compute.packetMirrorings.patch", + "parameterOrder": [ + "project", + "region", + "packetMirroring" + ], + "parameters": { + "packetMirroring": { + "description": "Name of the PacketMirroring resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + "request": { + "$ref": "PacketMirroring" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.packetMirrorings.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "projects": { "methods": { "disableXpnHost": { - "description": "Disable this project as a shared VPC host project.", + "description": "Disable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.disableXpnHost", "parameterOrder": [ @@ -14671,7 +15436,7 @@ ] }, "disableXpnResource": { - "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", + "description": "Disable a service resource (also known as service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.disableXpnResource", "parameterOrder": [ @@ -14704,7 +15469,7 @@ ] }, "enableXpnHost": { - "description": "Enable this project as a shared VPC host project.", + "description": "Enable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.enableXpnHost", "parameterOrder": [ @@ -14734,7 +15499,7 @@ ] }, "enableXpnResource": { - "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", + "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.enableXpnResource", "parameterOrder": [ @@ -14767,7 +15532,7 @@ ] }, "get": { - "description": "Returns the specified Project resource.", + "description": "Returns the specified Project resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.projects.get", "parameterOrder": [ @@ -14793,7 +15558,7 @@ ] }, "getXpnHost": { - "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists.", + "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.projects.getXpnHost", "parameterOrder": [ @@ -14818,7 +15583,7 @@ ] }, "getXpnResources": { - "description": "Gets service resources (a.k.a service project) associated with this host project.", + "description": "Gets service resources (a.k.a service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.projects.getXpnResources", "parameterOrder": [ @@ -14866,7 +15631,7 @@ ] }, "listXpnHosts": { - "description": "Lists all shared VPC host projects visible to the user in an organization.", + "description": "Lists all shared VPC host projects visible to the user in an organization. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.listXpnHosts", "parameterOrder": [ @@ -14917,7 +15682,7 @@ ] }, "moveDisk": { - "description": "Moves a persistent disk from one zone to another.", + "description": "Moves a persistent disk from one zone to another. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.moveDisk", "parameterOrder": [ @@ -14950,7 +15715,7 @@ ] }, "moveInstance": { - "description": "Moves an instance and its attached persistent disks from one zone to another.", + "description": "Moves an instance and its attached persistent disks from one zone to another. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.moveInstance", "parameterOrder": [ @@ -14983,7 +15748,7 @@ ] }, "setCommonInstanceMetadata": { - "description": "Sets metadata common to all instances within the specified project using the data included in the request.", + "description": "Sets metadata common to all instances within the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.setCommonInstanceMetadata", "parameterOrder": [ @@ -15016,7 +15781,7 @@ ] }, "setDefaultNetworkTier": { - "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.", + "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.setDefaultNetworkTier", "parameterOrder": [ @@ -15049,7 +15814,7 @@ ] }, "setDefaultServiceAccount": { - "description": "Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to \"default\".", + "description": "Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to \"default\". (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.setDefaultServiceAccount", "parameterOrder": [ @@ -15082,7 +15847,7 @@ ] }, "setUsageExportBucket": { - "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", + "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.setUsageExportBucket", "parameterOrder": [ @@ -15119,10 +15884,497 @@ } } }, + "publicAdvertisedPrefixes": { + "methods": { + "delete": { + "description": "Deletes the specified PublicAdvertisedPrefix (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.publicAdvertisedPrefixes.delete", + "parameterOrder": [ + "project", + "publicAdvertisedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicAdvertisedPrefix": { + "description": "Name of the PublicAdvertisedPrefix resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified PublicAdvertisedPrefix resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.publicAdvertisedPrefixes.get", + "parameterOrder": [ + "project", + "publicAdvertisedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicAdvertisedPrefix": { + "description": "Name of the PublicAdvertisedPrefix resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", + "response": { + "$ref": "PublicAdvertisedPrefix" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a PublicAdvertisedPrefix in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.publicAdvertisedPrefixes.insert", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/publicAdvertisedPrefixes", + "request": { + "$ref": "PublicAdvertisedPrefix" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Lists the PublicAdvertisedPrefixes for a project. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.publicAdvertisedPrefixes.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/publicAdvertisedPrefixes", + "response": { + "$ref": "PublicAdvertisedPrefixList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PATCH", + "id": "compute.publicAdvertisedPrefixes.patch", + "parameterOrder": [ + "project", + "publicAdvertisedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicAdvertisedPrefix": { + "description": "Name of the PublicAdvertisedPrefix resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", + "request": { + "$ref": "PublicAdvertisedPrefix" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "publicDelegatedPrefixes": { + "methods": { + "aggregatedList": { + "description": "Lists all PublicDelegatedPrefix resources owned by the specific project across all scopes. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.publicDelegatedPrefixes.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/publicDelegatedPrefixes", + "response": { + "$ref": "PublicDelegatedPrefixAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified PublicDelegatedPrefix in the given region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.publicDelegatedPrefixes.delete", + "parameterOrder": [ + "project", + "region", + "publicDelegatedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region of this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified PublicDelegatedPrefix resource in the given region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.publicDelegatedPrefixes.get", + "parameterOrder": [ + "project", + "region", + "publicDelegatedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region of this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", + "response": { + "$ref": "PublicDelegatedPrefix" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a PublicDelegatedPrefix in the specified project in the given region using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.publicDelegatedPrefixes.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region of this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/publicDelegatedPrefixes", + "request": { + "$ref": "PublicDelegatedPrefix" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Lists the PublicDelegatedPrefixes for a project in the given region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.publicDelegatedPrefixes.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region of this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/publicDelegatedPrefixes", + "response": { + "$ref": "PublicDelegatedPrefixList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patches the specified PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PATCH", + "id": "compute.publicDelegatedPrefixes.patch", + "parameterOrder": [ + "project", + "region", + "publicDelegatedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", + "request": { + "$ref": "PublicDelegatedPrefix" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "regionAutoscalers": { "methods": { "delete": { - "description": "Deletes the specified autoscaler.", + "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionAutoscalers.delete", "parameterOrder": [ @@ -15168,7 +16420,7 @@ ] }, "get": { - "description": "Returns the specified autoscaler.", + "description": "Returns the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionAutoscalers.get", "parameterOrder": [ @@ -15210,7 +16462,7 @@ ] }, "insert": { - "description": "Creates an autoscaler in the specified project using the data included in the request.", + "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionAutoscalers.insert", "parameterOrder": [ @@ -15251,7 +16503,7 @@ ] }, "list": { - "description": "Retrieves a list of autoscalers contained within the specified region.", + "description": "Retrieves a list of autoscalers contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionAutoscalers.list", "parameterOrder": [ @@ -15308,7 +16560,7 @@ ] }, "patch": { - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionAutoscalers.patch", "parameterOrder": [ @@ -15355,7 +16607,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionAutoscalers.testIamPermissions", "parameterOrder": [ @@ -15400,7 +16652,7 @@ ] }, "update": { - "description": "Updates an autoscaler in the specified project using the data included in the request.", + "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionAutoscalers.update", "parameterOrder": [ @@ -15451,7 +16703,7 @@ "regionBackendServices": { "methods": { "delete": { - "description": "Deletes the specified regional BackendService resource.", + "description": "Deletes the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionBackendServices.delete", "parameterOrder": [ @@ -15497,7 +16749,7 @@ ] }, "get": { - "description": "Returns the specified regional BackendService resource.", + "description": "Returns the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionBackendServices.get", "parameterOrder": [ @@ -15539,7 +16791,7 @@ ] }, "getHealth": { - "description": "Gets the most recent health check results for this regional BackendService.", + "description": "Gets the most recent health check results for this regional BackendService. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionBackendServices.getHealth", "parameterOrder": [ @@ -15583,7 +16835,7 @@ ] }, "insert": { - "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", + "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionBackendServices.insert", "parameterOrder": [ @@ -15624,7 +16876,7 @@ ] }, "list": { - "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", + "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionBackendServices.list", "parameterOrder": [ @@ -15681,7 +16933,7 @@ ] }, "patch": { - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionBackendServices.patch", "parameterOrder": [ @@ -15730,7 +16982,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionBackendServices.testIamPermissions", "parameterOrder": [ @@ -15775,7 +17027,7 @@ ] }, "update": { - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionBackendServices.update", "parameterOrder": [ @@ -15828,7 +17080,7 @@ "regionCommitments": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of commitments.", + "description": "Retrieves an aggregated list of commitments. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionCommitments.aggregatedList", "parameterOrder": [ @@ -15877,7 +17129,7 @@ ] }, "get": { - "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request.", + "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionCommitments.get", "parameterOrder": [ @@ -15919,7 +17171,7 @@ ] }, "insert": { - "description": "Creates a commitment in the specified project using the data included in the request.", + "description": "Creates a commitment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionCommitments.insert", "parameterOrder": [ @@ -15960,7 +17212,7 @@ ] }, "list": { - "description": "Retrieves a list of commitments contained within the specified region.", + "description": "Retrieves a list of commitments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionCommitments.list", "parameterOrder": [ @@ -16017,7 +17269,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionCommitments.testIamPermissions", "parameterOrder": [ @@ -16062,7 +17314,7 @@ ] }, "updateReservations": { - "description": "Update the shape of reservations for GPUS/Local SSDs of reservations within the commitments.", + "description": "Update the shape of reservations for GPUS/Local SSDs of reservations within the commitments. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionCommitments.updateReservations", "parameterOrder": [ @@ -16072,7 +17324,7 @@ ], "parameters": { "commitment": { - "description": "Name of the commitment of which the reservation's capacities are being updated.", + "description": "Name of the commitment for which the reservation is being updated.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -16115,7 +17367,7 @@ "regionDiskTypes": { "methods": { "get": { - "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request.", + "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDiskTypes.get", "parameterOrder": [ @@ -16157,7 +17409,7 @@ ] }, "list": { - "description": "Retrieves a list of regional disk types available to the specified project.", + "description": "Retrieves a list of regional disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDiskTypes.list", "parameterOrder": [ @@ -16218,7 +17470,7 @@ "regionDisks": { "methods": { "addResourcePolicies": { - "description": "Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", + "description": "Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.addResourcePolicies", "parameterOrder": [ @@ -16267,7 +17519,7 @@ ] }, "createSnapshot": { - "description": "Creates a snapshot of this regional disk.", + "description": "Creates a snapshot of this regional disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.createSnapshot", "parameterOrder": [ @@ -16321,7 +17573,7 @@ ] }, "delete": { - "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionDisks.delete", "parameterOrder": [ @@ -16366,7 +17618,7 @@ ] }, "get": { - "description": "Returns a specified regional persistent disk.", + "description": "Returns a specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDisks.get", "parameterOrder": [ @@ -16408,7 +17660,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDisks.getIamPolicy", "parameterOrder": [ @@ -16417,6 +17669,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -16450,7 +17708,7 @@ ] }, "insert": { - "description": "Creates a persistent regional disk in the specified project using the data included in the request.", + "description": "Creates a persistent regional disk in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.insert", "parameterOrder": [ @@ -16496,7 +17754,7 @@ ] }, "list": { - "description": "Retrieves the list of persistent disks contained within the specified region.", + "description": "Retrieves the list of persistent disks contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDisks.list", "parameterOrder": [ @@ -16553,7 +17811,7 @@ ] }, "removeResourcePolicies": { - "description": "Removes resource policies from a regional disk.", + "description": "Removes resource policies from a regional disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.removeResourcePolicies", "parameterOrder": [ @@ -16602,7 +17860,7 @@ ] }, "resize": { - "description": "Resizes the specified regional persistent disk.", + "description": "Resizes the specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.resize", "parameterOrder": [ @@ -16651,7 +17909,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.setIamPolicy", "parameterOrder": [ @@ -16695,7 +17953,7 @@ ] }, "setLabels": { - "description": "Sets the labels on the target regional disk.", + "description": "Sets the labels on the target regional disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.setLabels", "parameterOrder": [ @@ -16744,7 +18002,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.testIamPermissions", "parameterOrder": [ @@ -16793,7 +18051,7 @@ "regionHealthCheckServices": { "methods": { "delete": { - "description": "Deletes the specified regional HealthCheckService.", + "description": "Deletes the specified regional HealthCheckService. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionHealthCheckServices.delete", "parameterOrder": [ @@ -16838,7 +18096,7 @@ ] }, "get": { - "description": "Returns the specified regional HealthCheckService resource.", + "description": "Returns the specified regional HealthCheckService resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionHealthCheckServices.get", "parameterOrder": [ @@ -16879,7 +18137,7 @@ ] }, "insert": { - "description": "Creates a regional HealthCheckService resource in the specified project and region using the data included in the request.", + "description": "Creates a regional HealthCheckService resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionHealthCheckServices.insert", "parameterOrder": [ @@ -16920,7 +18178,7 @@ ] }, "list": { - "description": "Lists all the HealthCheckService resources that have been configured for the specified project in the given region.", + "description": "Lists all the HealthCheckService resources that have been configured for the specified project in the given region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionHealthCheckServices.list", "parameterOrder": [ @@ -16977,7 +18235,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionHealthCheckServices.testIamPermissions", "parameterOrder": [ @@ -17026,7 +18284,7 @@ "regionHealthChecks": { "methods": { "delete": { - "description": "Deletes the specified HealthCheck resource.", + "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionHealthChecks.delete", "parameterOrder": [ @@ -17072,7 +18330,7 @@ ] }, "get": { - "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", + "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionHealthChecks.get", "parameterOrder": [ @@ -17114,7 +18372,7 @@ ] }, "insert": { - "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionHealthChecks.insert", "parameterOrder": [ @@ -17155,7 +18413,7 @@ ] }, "list": { - "description": "Retrieves the list of HealthCheck resources available to the specified project.", + "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionHealthChecks.list", "parameterOrder": [ @@ -17212,7 +18470,7 @@ ] }, "patch": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionHealthChecks.patch", "parameterOrder": [ @@ -17261,7 +18519,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionHealthChecks.testIamPermissions", "parameterOrder": [ @@ -17306,7 +18564,7 @@ ] }, "update": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionHealthChecks.update", "parameterOrder": [ @@ -17359,7 +18617,7 @@ "regionInstanceGroupManagers": { "methods": { "abandonInstances": { - "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.abandonInstances", "parameterOrder": [ @@ -17406,7 +18664,7 @@ ] }, "applyUpdatesToInstances": { - "description": "Apply updates to selected instances the managed instance group.", + "description": "Apply updates to selected instances the managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.applyUpdatesToInstances", "parameterOrder": [ @@ -17448,7 +18706,7 @@ ] }, "createInstances": { - "description": "Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.", + "description": "Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.createInstances", "parameterOrder": [ @@ -17495,7 +18753,7 @@ ] }, "delete": { - "description": "Deletes the specified managed instance group and all of the instances in that group.", + "description": "Deletes the specified managed instance group and all of the instances in that group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionInstanceGroupManagers.delete", "parameterOrder": [ @@ -17539,7 +18797,7 @@ ] }, "deleteInstances": { - "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.deleteInstances", "parameterOrder": [ @@ -17586,7 +18844,7 @@ ] }, "deletePerInstanceConfigs": { - "description": "Deletes selected per-instance configs for the managed instance group.", + "description": "Deletes selected per-instance configs for the managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.deletePerInstanceConfigs", "parameterOrder": [ @@ -17628,7 +18886,7 @@ ] }, "get": { - "description": "Returns all of the details about the specified managed instance group.", + "description": "Returns all of the details about the specified managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroupManagers.get", "parameterOrder": [ @@ -17668,7 +18926,7 @@ ] }, "insert": { - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.insert", "parameterOrder": [ @@ -17708,7 +18966,7 @@ ] }, "list": { - "description": "Retrieves the list of managed instance groups that are contained within the specified region.", + "description": "Retrieves the list of managed instance groups that are contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroupManagers.list", "parameterOrder": [ @@ -17763,8 +19021,71 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "listErrors": { + "description": "Lists all errors thrown by actions on instances for a given regional managed instance group. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.regionInstanceGroupManagers.listErrors", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "instanceGroupManager": { + "description": "The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request. This should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors", + "response": { + "$ref": "RegionInstanceGroupManagersListErrorsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "listManagedInstances": { - "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", + "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.listManagedInstances", "parameterOrder": [ @@ -17827,7 +19148,7 @@ ] }, "listPerInstanceConfigs": { - "description": "Lists all of the per-instance configs defined for the managed instance group.", + "description": "Lists all of the per-instance configs defined for the managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.listPerInstanceConfigs", "parameterOrder": [ @@ -17890,7 +19211,7 @@ ] }, "patch": { - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionInstanceGroupManagers.patch", "parameterOrder": [ @@ -17937,7 +19258,7 @@ ] }, "patchPerInstanceConfigs": { - "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", + "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.patchPerInstanceConfigs", "parameterOrder": [ @@ -17984,7 +19305,7 @@ ] }, "recreateInstances": { - "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.recreateInstances", "parameterOrder": [ @@ -18031,7 +19352,7 @@ ] }, "resize": { - "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.resize", "parameterOrder": [ @@ -18084,7 +19405,7 @@ ] }, "setAutoHealingPolicies": { - "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.", + "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", "parameterOrder": [ @@ -18131,7 +19452,7 @@ ] }, "setInstanceTemplate": { - "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", + "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", "parameterOrder": [ @@ -18178,7 +19499,7 @@ ] }, "setTargetPools": { - "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", + "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.setTargetPools", "parameterOrder": [ @@ -18225,7 +19546,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.testIamPermissions", "parameterOrder": [ @@ -18270,7 +19591,7 @@ ] }, "update": { - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionInstanceGroupManagers.update", "parameterOrder": [ @@ -18317,7 +19638,7 @@ ] }, "updatePerInstanceConfigs": { - "description": "Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", + "description": "Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", "parameterOrder": [ @@ -18368,7 +19689,7 @@ "regionInstanceGroups": { "methods": { "get": { - "description": "Returns the specified instance group resource.", + "description": "Returns the specified instance group resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroups.get", "parameterOrder": [ @@ -18408,7 +19729,7 @@ ] }, "list": { - "description": "Retrieves the list of instance group resources contained within the specified region.", + "description": "Retrieves the list of instance group resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroups.list", "parameterOrder": [ @@ -18464,7 +19785,7 @@ ] }, "listInstances": { - "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", + "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroups.listInstances", "parameterOrder": [ @@ -18530,7 +19851,7 @@ ] }, "setNamedPorts": { - "description": "Sets the named ports for the specified regional instance group.", + "description": "Sets the named ports for the specified regional instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroups.setNamedPorts", "parameterOrder": [ @@ -18577,7 +19898,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroups.testIamPermissions", "parameterOrder": [ @@ -18626,7 +19947,7 @@ "regionNotificationEndpoints": { "methods": { "delete": { - "description": "Deletes the specified NotificationEndpoint in the given region", + "description": "Deletes the specified NotificationEndpoint in the given region (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionNotificationEndpoints.delete", "parameterOrder": [ @@ -18672,7 +19993,7 @@ ] }, "get": { - "description": "Returns the specified NotificationEndpoint resource in the given region.", + "description": "Returns the specified NotificationEndpoint resource in the given region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionNotificationEndpoints.get", "parameterOrder": [ @@ -18714,7 +20035,7 @@ ] }, "insert": { - "description": "Create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request.", + "description": "Create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionNotificationEndpoints.insert", "parameterOrder": [ @@ -18755,7 +20076,7 @@ ] }, "list": { - "description": "Lists the NotificationEndpoints for a project in the given region.", + "description": "Lists the NotificationEndpoints for a project in the given region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionNotificationEndpoints.list", "parameterOrder": [ @@ -18812,7 +20133,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionNotificationEndpoints.testIamPermissions", "parameterOrder": [ @@ -18861,7 +20182,7 @@ "regionOperations": { "methods": { "delete": { - "description": "Deletes the specified region-specific Operations resource.", + "description": "Deletes the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionOperations.delete", "parameterOrder": [ @@ -18899,7 +20220,7 @@ ] }, "get": { - "description": "Retrieves the specified region-specific Operations resource.", + "description": "Retrieves the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionOperations.get", "parameterOrder": [ @@ -18941,7 +20262,7 @@ ] }, "list": { - "description": "Retrieves a list of Operation resources contained within the specified region.", + "description": "Retrieves a list of Operation resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionOperations.list", "parameterOrder": [ @@ -18998,7 +20319,7 @@ ] }, "wait": { - "description": "Waits for the specified region-specific Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE.", + "description": "Waits for the specified region-specific Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionOperations.wait", "parameterOrder": [ @@ -19044,7 +20365,7 @@ "regionSslCertificates": { "methods": { "delete": { - "description": "Deletes the specified SslCertificate resource in the region.", + "description": "Deletes the specified SslCertificate resource in the region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionSslCertificates.delete", "parameterOrder": [ @@ -19090,7 +20411,7 @@ ] }, "get": { - "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.", + "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionSslCertificates.get", "parameterOrder": [ @@ -19132,7 +20453,7 @@ ] }, "insert": { - "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request", + "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionSslCertificates.insert", "parameterOrder": [ @@ -19173,7 +20494,7 @@ ] }, "list": { - "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region.", + "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionSslCertificates.list", "parameterOrder": [ @@ -19230,7 +20551,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource and region.", + "description": "Returns permissions that a caller has on the specified resource and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionSslCertificates.testIamPermissions", "parameterOrder": [ @@ -19279,7 +20600,7 @@ "regionTargetHttpProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetHttpProxy resource.", + "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionTargetHttpProxies.delete", "parameterOrder": [ @@ -19325,7 +20646,7 @@ ] }, "get": { - "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionTargetHttpProxies.get", "parameterOrder": [ @@ -19367,7 +20688,7 @@ ] }, "insert": { - "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request.", + "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpProxies.insert", "parameterOrder": [ @@ -19408,7 +20729,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.", + "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionTargetHttpProxies.list", "parameterOrder": [ @@ -19465,7 +20786,7 @@ ] }, "setUrlMap": { - "description": "Changes the URL map for TargetHttpProxy.", + "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpProxies.setUrlMap", "parameterOrder": [ @@ -19514,7 +20835,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpProxies.testIamPermissions", "parameterOrder": [ @@ -19563,7 +20884,7 @@ "regionTargetHttpsProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetHttpsProxy resource.", + "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionTargetHttpsProxies.delete", "parameterOrder": [ @@ -19609,7 +20930,7 @@ ] }, "get": { - "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionTargetHttpsProxies.get", "parameterOrder": [ @@ -19651,7 +20972,7 @@ ] }, "insert": { - "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.", + "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpsProxies.insert", "parameterOrder": [ @@ -19692,7 +21013,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.", + "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionTargetHttpsProxies.list", "parameterOrder": [ @@ -19749,7 +21070,7 @@ ] }, "setSslCertificates": { - "description": "Replaces SslCertificates for TargetHttpsProxy.", + "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpsProxies.setSslCertificates", "parameterOrder": [ @@ -19798,7 +21119,7 @@ ] }, "setUrlMap": { - "description": "Changes the URL map for TargetHttpsProxy.", + "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpsProxies.setUrlMap", "parameterOrder": [ @@ -19847,7 +21168,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpsProxies.testIamPermissions", "parameterOrder": [ @@ -19896,7 +21217,7 @@ "regionUrlMaps": { "methods": { "delete": { - "description": "Deletes the specified UrlMap resource.", + "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionUrlMaps.delete", "parameterOrder": [ @@ -19942,7 +21263,7 @@ ] }, "get": { - "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.", + "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionUrlMaps.get", "parameterOrder": [ @@ -19984,7 +21305,7 @@ ] }, "insert": { - "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionUrlMaps.insert", "parameterOrder": [ @@ -20025,7 +21346,7 @@ ] }, "invalidateCache": { - "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", + "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionUrlMaps.invalidateCache", "parameterOrder": [ @@ -20074,7 +21395,7 @@ ] }, "list": { - "description": "Retrieves the list of UrlMap resources available to the specified project in the specified region.", + "description": "Retrieves the list of UrlMap resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionUrlMaps.list", "parameterOrder": [ @@ -20131,7 +21452,7 @@ ] }, "patch": { - "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionUrlMaps.patch", "parameterOrder": [ @@ -20180,7 +21501,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionUrlMaps.testIamPermissions", "parameterOrder": [ @@ -20225,7 +21546,7 @@ ] }, "update": { - "description": "Updates the specified UrlMap resource with the data included in the request.", + "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionUrlMaps.update", "parameterOrder": [ @@ -20274,7 +21595,7 @@ ] }, "validate": { - "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionUrlMaps.validate", "parameterOrder": [ @@ -20322,7 +21643,7 @@ "regions": { "methods": { "get": { - "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request.", + "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regions.get", "parameterOrder": [ @@ -20356,7 +21677,7 @@ ] }, "list": { - "description": "Retrieves the list of region resources available to the specified project.", + "description": "Retrieves the list of region resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regions.list", "parameterOrder": [ @@ -20409,7 +21730,7 @@ "reservations": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of reservations.", + "description": "Retrieves an aggregated list of reservations. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.reservations.aggregatedList", "parameterOrder": [ @@ -20458,7 +21779,7 @@ ] }, "delete": { - "description": "Deletes the specified reservation.", + "description": "Deletes the specified reservation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.reservations.delete", "parameterOrder": [ @@ -20504,7 +21825,7 @@ ] }, "get": { - "description": "Retrieves all information of the specified reservation.", + "description": "Retrieves information about the specified reservation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.reservations.get", "parameterOrder": [ @@ -20546,7 +21867,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.reservations.getIamPolicy", "parameterOrder": [ @@ -20555,6 +21876,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -20588,7 +21915,7 @@ ] }, "insert": { - "description": "Creates a new reservation.", + "description": "Creates a new reservation. For more information, read Reserving zonal resources. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.reservations.insert", "parameterOrder": [ @@ -20629,7 +21956,7 @@ ] }, "list": { - "description": "A list all the reservations that have been configured for the specified project in specified zone.", + "description": "A list of all the reservations that have been configured for the specified project in specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.reservations.list", "parameterOrder": [ @@ -20686,7 +22013,7 @@ ] }, "resize": { - "description": "Resizes the reservation (applicable to standalone reservations only)", + "description": "Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.reservations.resize", "parameterOrder": [ @@ -20735,7 +22062,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.reservations.setIamPolicy", "parameterOrder": [ @@ -20779,7 +22106,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.reservations.testIamPermissions", "parameterOrder": [ @@ -20828,7 +22155,7 @@ "resourcePolicies": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of resource policies.", + "description": "Retrieves an aggregated list of resource policies. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.resourcePolicies.aggregatedList", "parameterOrder": [ @@ -20877,7 +22204,7 @@ ] }, "delete": { - "description": "Deletes the specified resource policy.", + "description": "Deletes the specified resource policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.resourcePolicies.delete", "parameterOrder": [ @@ -20923,7 +22250,7 @@ ] }, "get": { - "description": "Retrieves all information of the specified resource policy.", + "description": "Retrieves all information of the specified resource policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.resourcePolicies.get", "parameterOrder": [ @@ -20965,7 +22292,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.resourcePolicies.getIamPolicy", "parameterOrder": [ @@ -20974,6 +22301,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -21007,7 +22340,7 @@ ] }, "insert": { - "description": "Creates a new resource policy.", + "description": "Creates a new resource policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.resourcePolicies.insert", "parameterOrder": [ @@ -21048,7 +22381,7 @@ ] }, "list": { - "description": "A list all the resource policies that have been configured for the specified project in specified region.", + "description": "A list all the resource policies that have been configured for the specified project in specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.resourcePolicies.list", "parameterOrder": [ @@ -21105,7 +22438,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.resourcePolicies.setIamPolicy", "parameterOrder": [ @@ -21149,7 +22482,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.resourcePolicies.testIamPermissions", "parameterOrder": [ @@ -21198,7 +22531,7 @@ "routers": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of routers.", + "description": "Retrieves an aggregated list of routers. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.aggregatedList", "parameterOrder": [ @@ -21247,7 +22580,7 @@ ] }, "delete": { - "description": "Deletes the specified Router resource.", + "description": "Deletes the specified Router resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.routers.delete", "parameterOrder": [ @@ -21293,7 +22626,7 @@ ] }, "get": { - "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request.", + "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.get", "parameterOrder": [ @@ -21335,7 +22668,7 @@ ] }, "getNatMappingInfo": { - "description": "Retrieves runtime Nat mapping information of VM endpoints.", + "description": "Retrieves runtime Nat mapping information of VM endpoints. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.getNatMappingInfo", "parameterOrder": [ @@ -21405,7 +22738,7 @@ ] }, "getRouterStatus": { - "description": "Retrieves runtime information of the specified router.", + "description": "Retrieves runtime information of the specified router. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.getRouterStatus", "parameterOrder": [ @@ -21447,7 +22780,7 @@ ] }, "insert": { - "description": "Creates a Router resource in the specified project and region using the data included in the request.", + "description": "Creates a Router resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routers.insert", "parameterOrder": [ @@ -21488,7 +22821,7 @@ ] }, "list": { - "description": "Retrieves a list of Router resources available to the specified project.", + "description": "Retrieves a list of Router resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.list", "parameterOrder": [ @@ -21545,7 +22878,7 @@ ] }, "patch": { - "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.routers.patch", "parameterOrder": [ @@ -21594,7 +22927,7 @@ ] }, "preview": { - "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", + "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routers.preview", "parameterOrder": [ @@ -21639,7 +22972,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routers.testIamPermissions", "parameterOrder": [ @@ -21684,7 +23017,7 @@ ] }, "update": { - "description": "Updates the specified Router resource with the data included in the request.", + "description": "Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.routers.update", "parameterOrder": [ @@ -21737,7 +23070,7 @@ "routes": { "methods": { "delete": { - "description": "Deletes the specified Route resource.", + "description": "Deletes the specified Route resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.routes.delete", "parameterOrder": [ @@ -21775,7 +23108,7 @@ ] }, "get": { - "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request.", + "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routes.get", "parameterOrder": [ @@ -21809,7 +23142,7 @@ ] }, "insert": { - "description": "Creates a Route resource in the specified project using the data included in the request.", + "description": "Creates a Route resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routes.insert", "parameterOrder": [ @@ -21842,7 +23175,7 @@ ] }, "list": { - "description": "Retrieves the list of Route resources available to the specified project.", + "description": "Retrieves the list of Route resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routes.list", "parameterOrder": [ @@ -21891,7 +23224,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routes.testIamPermissions", "parameterOrder": [ @@ -21932,7 +23265,7 @@ "securityPolicies": { "methods": { "addRule": { - "description": "Inserts a rule into a security policy.", + "description": "Inserts a rule into a security policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.addRule", "parameterOrder": [ @@ -21973,7 +23306,7 @@ ] }, "delete": { - "description": "Deletes the specified policy.", + "description": "Deletes the specified policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.securityPolicies.delete", "parameterOrder": [ @@ -22011,7 +23344,7 @@ ] }, "get": { - "description": "List all of the ordered rules present in a single specified policy.", + "description": "List all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.securityPolicies.get", "parameterOrder": [ @@ -22045,7 +23378,7 @@ ] }, "getRule": { - "description": "Gets a rule at the specified priority.", + "description": "Gets a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.securityPolicies.getRule", "parameterOrder": [ @@ -22085,7 +23418,7 @@ ] }, "insert": { - "description": "Creates a new policy in the specified project using the data included in the request.", + "description": "Creates a new policy in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.insert", "parameterOrder": [ @@ -22123,7 +23456,7 @@ ] }, "list": { - "description": "List all the policies that have been configured for the specified project.", + "description": "List all the policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.securityPolicies.list", "parameterOrder": [ @@ -22172,7 +23505,7 @@ ] }, "listPreconfiguredExpressionSets": { - "description": "Gets the current list of preconfigured Web Application Firewall (WAF) expressions.", + "description": "Gets the current list of preconfigured Web Application Firewall (WAF) expressions. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.securityPolicies.listPreconfiguredExpressionSets", "parameterOrder": [ @@ -22220,7 +23553,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request.", + "description": "Patches the specified policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.securityPolicies.patch", "parameterOrder": [ @@ -22261,7 +23594,7 @@ ] }, "patchRule": { - "description": "Patches a rule at the specified priority.", + "description": "Patches a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.patchRule", "parameterOrder": [ @@ -22308,7 +23641,7 @@ ] }, "removeRule": { - "description": "Deletes a rule at the specified priority.", + "description": "Deletes a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.removeRule", "parameterOrder": [ @@ -22347,7 +23680,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.setLabels", "parameterOrder": [ @@ -22383,7 +23716,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.testIamPermissions", "parameterOrder": [ @@ -22424,7 +23757,7 @@ "snapshots": { "methods": { "delete": { - "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.", + "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.snapshots.delete", "parameterOrder": [ @@ -22462,7 +23795,7 @@ ] }, "get": { - "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.", + "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.snapshots.get", "parameterOrder": [ @@ -22496,7 +23829,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.snapshots.getIamPolicy", "parameterOrder": [ @@ -22504,6 +23837,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -22530,7 +23869,7 @@ ] }, "list": { - "description": "Retrieves the list of Snapshot resources contained within the specified project.", + "description": "Retrieves the list of Snapshot resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.snapshots.list", "parameterOrder": [ @@ -22579,7 +23918,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.snapshots.setIamPolicy", "parameterOrder": [ @@ -22615,7 +23954,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.snapshots.setLabels", "parameterOrder": [ @@ -22651,7 +23990,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.snapshots.testIamPermissions", "parameterOrder": [ @@ -22692,7 +24031,7 @@ "sslCertificates": { "methods": { "aggregatedList": { - "description": "Retrieves the list of all SslCertificate resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all SslCertificate resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslCertificates.aggregatedList", "parameterOrder": [ @@ -22741,7 +24080,7 @@ ] }, "delete": { - "description": "Deletes the specified SslCertificate resource.", + "description": "Deletes the specified SslCertificate resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.sslCertificates.delete", "parameterOrder": [ @@ -22779,7 +24118,7 @@ ] }, "get": { - "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request.", + "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslCertificates.get", "parameterOrder": [ @@ -22813,7 +24152,7 @@ ] }, "insert": { - "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", + "description": "Creates a SslCertificate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.sslCertificates.insert", "parameterOrder": [ @@ -22846,7 +24185,7 @@ ] }, "list": { - "description": "Retrieves the list of SslCertificate resources available to the specified project.", + "description": "Retrieves the list of SslCertificate resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslCertificates.list", "parameterOrder": [ @@ -22895,7 +24234,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.sslCertificates.testIamPermissions", "parameterOrder": [ @@ -22936,7 +24275,7 @@ "sslPolicies": { "methods": { "delete": { - "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.", + "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.sslPolicies.delete", "parameterOrder": [ @@ -22973,7 +24312,7 @@ ] }, "get": { - "description": "Lists all of the ordered rules present in a single specified policy.", + "description": "Lists all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslPolicies.get", "parameterOrder": [ @@ -23006,7 +24345,7 @@ ] }, "insert": { - "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request.", + "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.sslPolicies.insert", "parameterOrder": [ @@ -23039,7 +24378,7 @@ ] }, "list": { - "description": "Lists all the SSL policies that have been configured for the specified project.", + "description": "Lists all the SSL policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslPolicies.list", "parameterOrder": [ @@ -23088,7 +24427,7 @@ ] }, "listAvailableFeatures": { - "description": "Lists all features that can be specified in the SSL policy when using custom profile.", + "description": "Lists all features that can be specified in the SSL policy when using custom profile. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslPolicies.listAvailableFeatures", "parameterOrder": [ @@ -23137,7 +24476,7 @@ ] }, "patch": { - "description": "Patches the specified SSL policy with the data included in the request.", + "description": "Patches the specified SSL policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.sslPolicies.patch", "parameterOrder": [ @@ -23177,7 +24516,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.sslPolicies.testIamPermissions", "parameterOrder": [ @@ -23218,7 +24557,7 @@ "subnetworks": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of subnetworks.", + "description": "Retrieves an aggregated list of subnetworks. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.aggregatedList", "parameterOrder": [ @@ -23267,7 +24606,7 @@ ] }, "delete": { - "description": "Deletes the specified subnetwork.", + "description": "Deletes the specified subnetwork. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.subnetworks.delete", "parameterOrder": [ @@ -23313,7 +24652,7 @@ ] }, "expandIpCidrRange": { - "description": "Expands the IP CIDR range of the subnetwork to a specified value.", + "description": "Expands the IP CIDR range of the subnetwork to a specified value. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.expandIpCidrRange", "parameterOrder": [ @@ -23362,7 +24701,7 @@ ] }, "get": { - "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request.", + "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.get", "parameterOrder": [ @@ -23404,7 +24743,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.getIamPolicy", "parameterOrder": [ @@ -23413,6 +24752,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -23446,7 +24791,7 @@ ] }, "insert": { - "description": "Creates a subnetwork in the specified project using the data included in the request.", + "description": "Creates a subnetwork in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.insert", "parameterOrder": [ @@ -23487,7 +24832,7 @@ ] }, "list": { - "description": "Retrieves a list of subnetworks available to the specified project.", + "description": "Retrieves a list of subnetworks available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.list", "parameterOrder": [ @@ -23544,7 +24889,7 @@ ] }, "listUsable": { - "description": "Retrieves an aggregated list of usable subnetworks.", + "description": "Retrieves an aggregated list of all usable subnetworks in the project. The list contains all of the subnetworks in the project and the subnetworks that were shared by a Shared VPC host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.listUsable", "parameterOrder": [ @@ -23593,7 +24938,7 @@ ] }, "patch": { - "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.", + "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.subnetworks.patch", "parameterOrder": [ @@ -23648,7 +24993,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.setIamPolicy", "parameterOrder": [ @@ -23692,7 +25037,7 @@ ] }, "setPrivateIpGoogleAccess": { - "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", + "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.setPrivateIpGoogleAccess", "parameterOrder": [ @@ -23741,7 +25086,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.testIamPermissions", "parameterOrder": [ @@ -23790,7 +25135,7 @@ "targetHttpProxies": { "methods": { "aggregatedList": { - "description": "Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpProxies.aggregatedList", "parameterOrder": [ @@ -23839,7 +25184,7 @@ ] }, "delete": { - "description": "Deletes the specified TargetHttpProxy resource.", + "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetHttpProxies.delete", "parameterOrder": [ @@ -23877,7 +25222,7 @@ ] }, "get": { - "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request.", + "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpProxies.get", "parameterOrder": [ @@ -23911,7 +25256,7 @@ ] }, "insert": { - "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpProxies.insert", "parameterOrder": [ @@ -23944,7 +25289,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", + "description": "Retrieves the list of TargetHttpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpProxies.list", "parameterOrder": [ @@ -23993,7 +25338,7 @@ ] }, "setUrlMap": { - "description": "Changes the URL map for TargetHttpProxy.", + "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpProxies.setUrlMap", "parameterOrder": [ @@ -24034,7 +25379,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpProxies.testIamPermissions", "parameterOrder": [ @@ -24075,7 +25420,7 @@ "targetHttpsProxies": { "methods": { "aggregatedList": { - "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpsProxies.aggregatedList", "parameterOrder": [ @@ -24124,7 +25469,7 @@ ] }, "delete": { - "description": "Deletes the specified TargetHttpsProxy resource.", + "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetHttpsProxies.delete", "parameterOrder": [ @@ -24162,7 +25507,7 @@ ] }, "get": { - "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request.", + "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpsProxies.get", "parameterOrder": [ @@ -24196,7 +25541,7 @@ ] }, "insert": { - "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.insert", "parameterOrder": [ @@ -24229,7 +25574,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", + "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpsProxies.list", "parameterOrder": [ @@ -24278,7 +25623,7 @@ ] }, "setQuicOverride": { - "description": "Sets the QUIC override policy for TargetHttpsProxy.", + "description": "Sets the QUIC override policy for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setQuicOverride", "parameterOrder": [ @@ -24318,7 +25663,7 @@ ] }, "setSslCertificates": { - "description": "Replaces SslCertificates for TargetHttpsProxy.", + "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setSslCertificates", "parameterOrder": [ @@ -24359,7 +25704,7 @@ ] }, "setSslPolicy": { - "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends.", + "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setSslPolicy", "parameterOrder": [ @@ -24399,7 +25744,7 @@ ] }, "setUrlMap": { - "description": "Changes the URL map for TargetHttpsProxy.", + "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setUrlMap", "parameterOrder": [ @@ -24440,7 +25785,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.testIamPermissions", "parameterOrder": [ @@ -24481,7 +25826,7 @@ "targetInstances": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of target instances.", + "description": "Retrieves an aggregated list of target instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetInstances.aggregatedList", "parameterOrder": [ @@ -24530,7 +25875,7 @@ ] }, "delete": { - "description": "Deletes the specified TargetInstance resource.", + "description": "Deletes the specified TargetInstance resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetInstances.delete", "parameterOrder": [ @@ -24576,7 +25921,7 @@ ] }, "get": { - "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.", + "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetInstances.get", "parameterOrder": [ @@ -24618,7 +25963,7 @@ ] }, "insert": { - "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", + "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetInstances.insert", "parameterOrder": [ @@ -24659,7 +26004,7 @@ ] }, "list": { - "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", + "description": "Retrieves a list of TargetInstance resources available to the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetInstances.list", "parameterOrder": [ @@ -24716,7 +26061,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetInstances.testIamPermissions", "parameterOrder": [ @@ -24765,7 +26110,7 @@ "targetPools": { "methods": { "addHealthCheck": { - "description": "Adds health check URLs to a target pool.", + "description": "Adds health check URLs to a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.addHealthCheck", "parameterOrder": [ @@ -24814,7 +26159,7 @@ ] }, "addInstance": { - "description": "Adds an instance to a target pool.", + "description": "Adds an instance to a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.addInstance", "parameterOrder": [ @@ -24863,7 +26208,7 @@ ] }, "aggregatedList": { - "description": "Retrieves an aggregated list of target pools.", + "description": "Retrieves an aggregated list of target pools. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetPools.aggregatedList", "parameterOrder": [ @@ -24912,7 +26257,7 @@ ] }, "delete": { - "description": "Deletes the specified target pool.", + "description": "Deletes the specified target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetPools.delete", "parameterOrder": [ @@ -24958,7 +26303,7 @@ ] }, "get": { - "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request.", + "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetPools.get", "parameterOrder": [ @@ -25000,7 +26345,7 @@ ] }, "getHealth": { - "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", + "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.getHealth", "parameterOrder": [ @@ -25045,7 +26390,7 @@ ] }, "insert": { - "description": "Creates a target pool in the specified project and region using the data included in the request.", + "description": "Creates a target pool in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.insert", "parameterOrder": [ @@ -25086,7 +26431,7 @@ ] }, "list": { - "description": "Retrieves a list of target pools available to the specified project and region.", + "description": "Retrieves a list of target pools available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetPools.list", "parameterOrder": [ @@ -25143,7 +26488,7 @@ ] }, "removeHealthCheck": { - "description": "Removes health check URL from a target pool.", + "description": "Removes health check URL from a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.removeHealthCheck", "parameterOrder": [ @@ -25192,7 +26537,7 @@ ] }, "removeInstance": { - "description": "Removes instance URL from a target pool.", + "description": "Removes instance URL from a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.removeInstance", "parameterOrder": [ @@ -25241,7 +26586,7 @@ ] }, "setBackup": { - "description": "Changes a backup target pool's configurations.", + "description": "Changes a backup target pool's configurations. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.setBackup", "parameterOrder": [ @@ -25296,7 +26641,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.testIamPermissions", "parameterOrder": [ @@ -25345,7 +26690,7 @@ "targetSslProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetSslProxy resource.", + "description": "Deletes the specified TargetSslProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetSslProxies.delete", "parameterOrder": [ @@ -25383,7 +26728,7 @@ ] }, "get": { - "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request.", + "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetSslProxies.get", "parameterOrder": [ @@ -25417,7 +26762,7 @@ ] }, "insert": { - "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.insert", "parameterOrder": [ @@ -25450,7 +26795,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", + "description": "Retrieves the list of TargetSslProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetSslProxies.list", "parameterOrder": [ @@ -25499,7 +26844,7 @@ ] }, "setBackendService": { - "description": "Changes the BackendService for TargetSslProxy.", + "description": "Changes the BackendService for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setBackendService", "parameterOrder": [ @@ -25540,7 +26885,7 @@ ] }, "setProxyHeader": { - "description": "Changes the ProxyHeaderType for TargetSslProxy.", + "description": "Changes the ProxyHeaderType for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setProxyHeader", "parameterOrder": [ @@ -25581,7 +26926,7 @@ ] }, "setSslCertificates": { - "description": "Changes SslCertificates for TargetSslProxy.", + "description": "Changes SslCertificates for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setSslCertificates", "parameterOrder": [ @@ -25622,7 +26967,7 @@ ] }, "setSslPolicy": { - "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends.", + "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setSslPolicy", "parameterOrder": [ @@ -25662,7 +27007,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.testIamPermissions", "parameterOrder": [ @@ -25703,7 +27048,7 @@ "targetTcpProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetTcpProxy resource.", + "description": "Deletes the specified TargetTcpProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetTcpProxies.delete", "parameterOrder": [ @@ -25741,7 +27086,7 @@ ] }, "get": { - "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.", + "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetTcpProxies.get", "parameterOrder": [ @@ -25775,7 +27120,7 @@ ] }, "insert": { - "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetTcpProxies.insert", "parameterOrder": [ @@ -25808,7 +27153,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", + "description": "Retrieves the list of TargetTcpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetTcpProxies.list", "parameterOrder": [ @@ -25857,7 +27202,7 @@ ] }, "setBackendService": { - "description": "Changes the BackendService for TargetTcpProxy.", + "description": "Changes the BackendService for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetTcpProxies.setBackendService", "parameterOrder": [ @@ -25898,7 +27243,7 @@ ] }, "setProxyHeader": { - "description": "Changes the ProxyHeaderType for TargetTcpProxy.", + "description": "Changes the ProxyHeaderType for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetTcpProxies.setProxyHeader", "parameterOrder": [ @@ -25939,7 +27284,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetTcpProxies.testIamPermissions", "parameterOrder": [ @@ -25980,7 +27325,7 @@ "targetVpnGateways": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of target VPN gateways.", + "description": "Retrieves an aggregated list of target VPN gateways. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetVpnGateways.aggregatedList", "parameterOrder": [ @@ -26029,7 +27374,7 @@ ] }, "delete": { - "description": "Deletes the specified target VPN gateway.", + "description": "Deletes the specified target VPN gateway. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetVpnGateways.delete", "parameterOrder": [ @@ -26075,7 +27420,7 @@ ] }, "get": { - "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.", + "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetVpnGateways.get", "parameterOrder": [ @@ -26117,7 +27462,7 @@ ] }, "insert": { - "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", + "description": "Creates a target VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetVpnGateways.insert", "parameterOrder": [ @@ -26158,7 +27503,7 @@ ] }, "list": { - "description": "Retrieves a list of target VPN gateways available to the specified project and region.", + "description": "Retrieves a list of target VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetVpnGateways.list", "parameterOrder": [ @@ -26215,7 +27560,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetVpnGateways.setLabels", "parameterOrder": [ @@ -26264,7 +27609,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetVpnGateways.testIamPermissions", "parameterOrder": [ @@ -26313,7 +27658,7 @@ "urlMaps": { "methods": { "aggregatedList": { - "description": "Retrieves the list of all UrlMap resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all UrlMap resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.urlMaps.aggregatedList", "parameterOrder": [ @@ -26362,7 +27707,7 @@ ] }, "delete": { - "description": "Deletes the specified UrlMap resource.", + "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.urlMaps.delete", "parameterOrder": [ @@ -26400,7 +27745,7 @@ ] }, "get": { - "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.", + "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.urlMaps.get", "parameterOrder": [ @@ -26434,7 +27779,7 @@ ] }, "insert": { - "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.urlMaps.insert", "parameterOrder": [ @@ -26467,7 +27812,7 @@ ] }, "invalidateCache": { - "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", + "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.urlMaps.invalidateCache", "parameterOrder": [ @@ -26508,7 +27853,7 @@ ] }, "list": { - "description": "Retrieves the list of UrlMap resources available to the specified project.", + "description": "Retrieves the list of UrlMap resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.urlMaps.list", "parameterOrder": [ @@ -26557,7 +27902,7 @@ ] }, "patch": { - "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.urlMaps.patch", "parameterOrder": [ @@ -26598,7 +27943,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.urlMaps.testIamPermissions", "parameterOrder": [ @@ -26635,7 +27980,7 @@ ] }, "update": { - "description": "Updates the specified UrlMap resource with the data included in the request.", + "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.urlMaps.update", "parameterOrder": [ @@ -26676,7 +28021,7 @@ ] }, "validate": { - "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.urlMaps.validate", "parameterOrder": [ @@ -26716,7 +28061,7 @@ "vpnGateways": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of VPN gateways.", + "description": "Retrieves an aggregated list of VPN gateways. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnGateways.aggregatedList", "parameterOrder": [ @@ -26765,7 +28110,7 @@ ] }, "delete": { - "description": "Deletes the specified VPN gateway.", + "description": "Deletes the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.vpnGateways.delete", "parameterOrder": [ @@ -26811,7 +28156,7 @@ ] }, "get": { - "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request.", + "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnGateways.get", "parameterOrder": [ @@ -26853,7 +28198,7 @@ ] }, "getStatus": { - "description": "Returns the status for the specified VPN gateway.", + "description": "Returns the status for the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnGateways.getStatus", "parameterOrder": [ @@ -26895,7 +28240,7 @@ ] }, "insert": { - "description": "Creates a VPN gateway in the specified project and region using the data included in the request.", + "description": "Creates a VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnGateways.insert", "parameterOrder": [ @@ -26936,7 +28281,7 @@ ] }, "list": { - "description": "Retrieves a list of VPN gateways available to the specified project and region.", + "description": "Retrieves a list of VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnGateways.list", "parameterOrder": [ @@ -26993,7 +28338,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnGateways.setLabels", "parameterOrder": [ @@ -27042,7 +28387,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnGateways.testIamPermissions", "parameterOrder": [ @@ -27091,7 +28436,7 @@ "vpnTunnels": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of VPN tunnels.", + "description": "Retrieves an aggregated list of VPN tunnels. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnTunnels.aggregatedList", "parameterOrder": [ @@ -27140,7 +28485,7 @@ ] }, "delete": { - "description": "Deletes the specified VpnTunnel resource.", + "description": "Deletes the specified VpnTunnel resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.vpnTunnels.delete", "parameterOrder": [ @@ -27186,7 +28531,7 @@ ] }, "get": { - "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.", + "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnTunnels.get", "parameterOrder": [ @@ -27228,7 +28573,7 @@ ] }, "insert": { - "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", + "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnTunnels.insert", "parameterOrder": [ @@ -27269,7 +28614,7 @@ ] }, "list": { - "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", + "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnTunnels.list", "parameterOrder": [ @@ -27326,7 +28671,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnTunnels.setLabels", "parameterOrder": [ @@ -27375,7 +28720,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnTunnels.testIamPermissions", "parameterOrder": [ @@ -27424,7 +28769,7 @@ "zoneOperations": { "methods": { "delete": { - "description": "Deletes the specified zone-specific Operations resource.", + "description": "Deletes the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.zoneOperations.delete", "parameterOrder": [ @@ -27462,7 +28807,7 @@ ] }, "get": { - "description": "Retrieves the specified zone-specific Operations resource.", + "description": "Retrieves the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zoneOperations.get", "parameterOrder": [ @@ -27504,7 +28849,7 @@ ] }, "list": { - "description": "Retrieves a list of Operation resources contained within the specified zone.", + "description": "Retrieves a list of Operation resources contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zoneOperations.list", "parameterOrder": [ @@ -27561,7 +28906,7 @@ ] }, "wait": { - "description": "Waits for the specified zone-specific Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE.", + "description": "Waits for the specified zone-specific Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.zoneOperations.wait", "parameterOrder": [ @@ -27607,7 +28952,7 @@ "zones": { "methods": { "get": { - "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request.", + "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zones.get", "parameterOrder": [ @@ -27641,7 +28986,7 @@ ] }, "list": { - "description": "Retrieves the list of Zone resources available to the specified project.", + "description": "Retrieves the list of Zone resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zones.list", "parameterOrder": [ @@ -27692,8 +29037,8 @@ } } }, - "revision": "20190528", - "rootUrl": "https://www.googleapis.com/", + "revision": "20191025", + "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { "description": "A specification of the type and number of accelerator cards attached to the instance.", @@ -27712,7 +29057,7 @@ "type": "object" }, "AcceleratorType": { - "description": "An Accelerator Type resource. (== resource_for beta.acceleratorTypes ==) (== resource_for v1.acceleratorTypes ==)", + "description": "Represents an Accelerator Type resource.\n\nGoogle Cloud Platform provides graphics processing units (accelerators) that you can add to VM instances to improve or accelerate performance when working with intensive workloads. For more information, read GPUs on Compute Engine. (== resource_for beta.acceleratorTypes ==) (== resource_for v1.acceleratorTypes ==)", "id": "AcceleratorType", "properties": { "creationTimestamp": { @@ -28090,7 +29435,7 @@ "type": "string" }, "name": { - "description": "The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.", + "description": "The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.", "type": "string" }, "natIP": { @@ -28116,7 +29461,7 @@ "type": "string" }, "publicPtrDomainName": { - "description": "The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled.", + "description": "The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.", "type": "string" }, "setPublicDns": { @@ -28124,7 +29469,7 @@ "type": "boolean" }, "setPublicPtr": { - "description": "Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name.", + "description": "Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.", "type": "boolean" }, "type": { @@ -28142,7 +29487,7 @@ "type": "object" }, "Address": { - "description": "A reserved address resource. (== resource_for beta.addresses ==) (== resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== resource_for v1.globalAddresses ==)", + "description": "Represents an IP Address resource.\n\nAn address resource represents a regional internal IP address. Regional internal IP addresses are RFC 1918 addresses that come from either a primary or secondary IP range of a subnet in a VPC network. Regional external IP addresses can be assigned to GCP VM instances, Cloud VPN gateways, regional external forwarding rules for network load balancers (in either Standard or Premium Tier), and regional external forwarding rules for HTTP(S), SSL Proxy, and TCP Proxy load balancers in Standard Tier. For more information, read IP addresses.\n\nA globalAddresses resource represent a global external IP address. Global external IP addresses are IPv4 or IPv6 addresses. They can only be assigned to global forwarding rules for HTTP(S), SSL Proxy, or TCP Proxy load balancers in Premium Tier. For more information, read Global resources. (== resource_for beta.addresses ==) (== resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== resource_for v1.globalAddresses ==)", "id": "Address", "properties": { "address": { @@ -28170,7 +29515,7 @@ "type": "string" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "id": { @@ -28179,7 +29524,7 @@ "type": "string" }, "ipVersion": { - "description": "The IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.", + "description": "The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.", "enum": [ "IPV4", "IPV6", @@ -28215,16 +29560,16 @@ "compute.addresses.insert" ] }, - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, "network": { - "description": "The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with VPC_PEERING purpose.", + "description": "The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.", "type": "string" }, "networkTier": { - "description": "This signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer.\n\nIf this field is not specified, it is assumed to be PREMIUM.", + "description": "This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer.\n\nIf this field is not specified, it is assumed to be PREMIUM.", "enum": [ "PREMIUM", "SELECT", @@ -28243,23 +29588,25 @@ "type": "integer" }, "purpose": { - "description": "The purpose of resource, only used with INTERNAL type.", + "description": "The purpose of this resource, which can be one of the following values: \n- `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. \n- `DNS_RESOLVER` for a DNS resolver address in a subnetwork \n- `VPC_PEERING` for addresses that are reserved for VPC peer networks. \n- `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.", "enum": [ "DNS_RESOLVER", "GCE_ENDPOINT", "NAT_AUTO", + "SHARED_LOADBALANCER_VIP", "VPC_PEERING" ], "enumDescriptions": [ "", "", "", + "", "" ], "type": "string" }, "region": { - "description": "[Output Only] URL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL. You cannot set this field in the request body.", + "description": "[Output Only] The URL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL.", "type": "string" }, "selfLink": { @@ -28285,7 +29632,7 @@ "type": "string" }, "subnetwork": { - "description": "The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.", + "description": "The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.", "type": "string" }, "users": { @@ -28621,11 +29968,11 @@ "id": "AliasIpRange", "properties": { "ipCidrRange": { - "description": "The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).", + "description": "The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).", "type": "string" }, "subnetworkRangeName": { - "description": "Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.", + "description": "The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.", "type": "string" } }, @@ -28690,18 +30037,18 @@ "id": "AllocationSpecificSKUReservation", "properties": { "count": { - "description": "Specifies number of resources that are allocated.", + "description": "Specifies the number of resources that are allocated.", "format": "int64", "type": "string" }, "inUseCount": { - "description": "[OutputOnly] Indicates how many resource are in use.", + "description": "[Output Only] Indicates how many instances are in use.", "format": "int64", "type": "string" }, "instanceProperties": { "$ref": "AllocationSpecificSKUAllocationReservedInstanceProperties", - "description": "The instance properties for this specific sku reservation." + "description": "The instance properties for the reservation." } }, "type": "object" @@ -28748,7 +30095,7 @@ "description": "[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property; you can only define one or the other, but not both." }, "interface": { - "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.", + "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. TODO(b/131765817): Update documentation when NVME is supported.", "enum": [ "NVDIMM", "NVME", @@ -28802,7 +30149,7 @@ "description": "[Output Only] shielded vm initial state stored on disk" }, "source": { - "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.\n\nIf desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.\n\nNote that for InstanceTemplate, specify the disk name, not the URL for the disk.", + "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.\n\nIf desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.\n\nNote that for InstanceTemplate, specify the disk name, not the URL for the disk.", "type": "string" }, "type": { @@ -28833,7 +30180,7 @@ "type": "string" }, "diskSizeGb": { - "description": "Specifies the size of the disk in base-2 GB.", + "description": "Specifies the size of the disk in base-2 GB. If not specified, the disk will be the same size as the image (usually 10GB). If specified, the size must be equal to or larger than 10GB.", "format": "int64", "type": "string" }, @@ -28855,6 +30202,20 @@ "description": "Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.", "type": "object" }, + "onUpdateAction": { + "description": "Specifies which action to take on instance update with this disk. Default is to use the existing disk.", + "enum": [ + "RECREATE_DISK", + "RECREATE_DISK_IF_SOURCE_CHANGED", + "USE_EXISTING_DISK" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "replicaZones": { "description": "URLs of the zones where the disk should be replicated to. Only applicable for regional resources.", "items": { @@ -28870,7 +30231,7 @@ "type": "array" }, "sourceImage": { - "description": "The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the image name in the following format:\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\nglobal/images/family/my-image-family\n\n\nIf the source image is deleted later, this field will not be set.", + "description": "The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the image name in the following format:\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\nglobal/images/family/my-image-family\n\n\nIf the source image is deleted later, this field will not be set.", "type": "string" }, "sourceImageEncryptionKey": { @@ -28878,7 +30239,7 @@ "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.\n\nInstance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys." }, "sourceSnapshot": { - "description": "The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.\n\nTo create a disk with a snapshot that you created, specify the snapshot name in the following format:\nglobal/snapshots/my-backup\n\n\nIf the source snapshot is deleted later, this field will not be set.", + "description": "The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.\n\nTo create a disk with a snapshot that you created, specify the snapshot name in the following format:\nglobal/snapshots/my-backup\n\n\nIf the source snapshot is deleted later, this field will not be set.", "type": "string" }, "sourceSnapshotEncryptionKey": { @@ -28889,7 +30250,7 @@ "type": "object" }, "AuditConfig": { - "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"fooservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:bar@gmail.com\" ] } ] } ] }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.", + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"sampleservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] }\n\nFor sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", "id": "AuditConfig", "properties": { "auditLogConfigs": { @@ -28914,7 +30275,7 @@ "type": "object" }, "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.", + "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", "id": "AuditLogConfig", "properties": { "exemptedMembers": { @@ -28924,6 +30285,10 @@ }, "type": "array" }, + "ignoreChildExemptions": { + "description": "", + "type": "boolean" + }, "logType": { "description": "The log type that this config enables.", "enum": [ @@ -29022,7 +30387,7 @@ "type": "object" }, "Autoscaler": { - "description": "Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)", + "description": "Represents an Autoscaler resource.\n\n\n\nUse autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances.\n\nFor zonal managed instance groups resource, use the autoscaler resource.\n\nFor regional managed instance groups, use the regionAutoscalers resource. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)", "id": "Autoscaler", "properties": { "autoscalingPolicy": { @@ -29075,7 +30440,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of the autoscaler configuration.", + "description": "[Output Only] The status of the autoscaler configuration. Current set of possible values: \n- PENDING: Autoscaler backend hasn't read new/updated configuration. \n- DELETING: Configuration is being deleted. \n- ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. \n- ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future.", "enum": [ "ACTIVE", "DELETING", @@ -29340,7 +30705,7 @@ "type": "string" }, "type": { - "description": "The type of error returned.", + "description": "The type of error, warning, or notice returned. Current set of possible values: \n- ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance group are unhealthy (not in RUNNING state). \n- BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service attached to the instance group. \n- CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size greater than maxNumReplicas. \n- CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric samples are not exported often enough to be a credible base for autoscaling. \n- CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified does not exist or does not have the necessary labels. \n- MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to maxNumReplicas. This means the autoscaler cannot add or remove instances from the instance group. \n- MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not receive any data from the custom metric configured for autoscaling. \n- MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is configured to scale based on a load balancing signal but the instance group has not received any requests from the load balancer. \n- MODE_OFF (WARNING): Autoscaling is turned off. The number of instances in the group won't change automatically. The autoscaling configuration is preserved. \n- MODE_ONLY_UP (WARNING): Autoscaling is in the \"Autoscale only up\" mode. The autoscaler can add instances but not remove any. \n- MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be autoscaled because it has more than one backend service attached to it. \n- NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for the necessary resources, such as CPU or number of instances. \n- REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional autoscalers: there is a resource stockout in the chosen region. \n- SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does not exist. \n- UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): Autoscaling does not work with an HTTP/S load balancer that has been configured for maxRate. \n- ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a resource stockout in the chosen zone. For regional autoscalers: in at least one of the zones you're using there is a resource stockout. New values might be added in the future. Some of the values might not be available in all API versions.", "enum": [ "ALL_INSTANCES_UNHEALTHY", "BACKEND_SERVICE_DOES_NOT_EXIST", @@ -29350,6 +30715,8 @@ "MIN_EQUALS_MAX", "MISSING_CUSTOM_METRIC_DATA_POINTS", "MISSING_LOAD_BALANCING_DATA_POINTS", + "MODE_OFF", + "MODE_ONLY_UP", "MORE_THAN_ONE_BACKEND_SERVICE", "NOT_ENOUGH_QUOTA_AVAILABLE", "REGION_RESOURCE_STOCKOUT", @@ -29373,6 +30740,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -29513,11 +30882,9 @@ "enum": [ "OFF", "ON", - "ONLY_DOWN", "ONLY_UP" ], "enumDescriptions": [ - "", "", "", "" @@ -29527,6 +30894,9 @@ "queueBasedScaling": { "$ref": "AutoscalingPolicyQueueBasedScaling", "description": "Configuration parameters of autoscaling based on queuing system." + }, + "scaleDownControl": { + "$ref": "AutoscalingPolicyScaleDownControl" } }, "type": "object" @@ -29630,12 +31000,28 @@ }, "type": "object" }, + "AutoscalingPolicyScaleDownControl": { + "description": "Configuration that allows for slower scale down so that even if Autoscaler recommends an abrupt scale down of a MIG, it will be throttled as specified by the parameters below.", + "id": "AutoscalingPolicyScaleDownControl", + "properties": { + "maxScaledDownReplicas": { + "$ref": "FixedOrPercent", + "description": "Maximum allowed number (or %) of VMs that can be deducted from the peak recommendation during the window autoscaler looks at when computing recommendations. Possibly all these VMs can be deleted at once so user service needs to be prepared to lose that many VMs in one step." + }, + "timeWindowSec": { + "description": "How long back autoscaling should look when computing recommendations to include directives regarding slower scale down, as described above.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Backend": { "description": "Message containing information of one individual backend.", "id": "Backend", "properties": { "balancingMode": { - "description": "Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).\n\nFor Internal Load Balancing, the default and only supported mode is CONNECTION.", + "description": "Specifies the balancing mode for the backend.\n\nWhen choosing a balancing mode, you need to consider the loadBalancingScheme, and protocol for the backend service, as well as the type of backend (instance group or NEG).\n\n \n- If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.\nYou can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.\n\nIf the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load balancers), you must also specify exactly one of the following parameters: maxConnections, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.\n\nIf the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.\n \n- If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).\nYou can use the RATE balancing mode if the protocol for the backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate, maxRatePerInstance, or maxRatePerEndpoint.\n \n- If the load balancing mode is UTILIZATION, the load is spread based on the CPU utilization of instances in an instance group.\nYou can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.", "enum": [ "CONNECTION", "RATE", @@ -29662,21 +31048,21 @@ "type": "boolean" }, "group": { - "description": "The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.\n\nFor Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group.\n\nBackend service can not contain mix of Instance Group and Network Endpoint Group backends.\n\nNote that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.\n\nWhen the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. Network Endpoint Groups are not supported for INTERNAL load balancing scheme.", + "description": "The fully-qualified URL of an instance group or network endpoint group (NEG) resource. The type of backend that a backend service supports depends on the backend service's loadBalancingScheme.\n\n \n- When the loadBalancingScheme for the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either an instance group or a NEG. The backends on the backend service must be either all instance groups or all NEGs. You cannot mix instance group and NEG backends on the same backend service. \n\n\n- When the loadBalancingScheme for the backend service is INTERNAL, the backend must be an instance group in the same region as the backend service. NEGs are not supported. \n\nYou must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.", "type": "string" }, "maxConnections": { - "description": "The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for simultaneous connections for the entire backend (instance group or NEG). If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.\n\nNot available if the backend's balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.", "format": "int32", "type": "integer" }, "maxConnectionsPerEndpoint": { - "description": "The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for simultaneous connections for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of target maximum simultaneous connections for the NEG. If the backend's balancingMode is CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerInstance.\n\nNot available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.", "format": "int32", "type": "integer" }, "maxConnectionsPerInstance": { - "description": "The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for simultaneous connections for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum number of simultaneous connections for the whole instance group. If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerEndpoint.\n\nNot available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.", "format": "int32", "type": "integer" }, @@ -29686,17 +31072,17 @@ "type": "integer" }, "maxRatePerEndpoint": { - "description": "The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for requests per second (RPS) for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum rate for the NEG.\n\nIf the backend's balancingMode is RATE, you must specify either this parameter, maxRate, or maxRatePerInstance.\n\nNot available if the backend's balancingMode is CONNECTION.", "format": "float", "type": "number" }, "maxRatePerInstance": { - "description": "The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for requests per second (RPS) for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum rate for the whole instance group.\n\nIf the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify either this parameter, maxRate, or maxRatePerEndpoint.\n\nNot available if the backend's balancingMode is CONNECTION.", "format": "float", "type": "number" }, "maxUtilization": { - "description": "Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].\n\nThis cannot be used for internal load balancing.", + "description": "Defines the maximum average CPU utilization of a backend VM in an instance group. The valid range is [0.0, 1.0]. This is an optional parameter if the backend's balancingMode is UTILIZATION.\n\nThis parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections, or maxConnectionsPerInstance.", "format": "float", "type": "number" } @@ -29704,7 +31090,7 @@ "type": "object" }, "BackendBucket": { - "description": "A BackendBucket resource. This resource defines a Cloud Storage bucket.", + "description": "Represents a Cloud Storage Bucket resource.\n\nThis Cloud Storage bucket resource is referenced by a URL map of a load balancer. For more information, read Backend Buckets.", "id": "BackendBucket", "properties": { "bucketName": { @@ -29885,18 +31271,14 @@ "type": "object" }, "BackendService": { - "description": "A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity. (== resource_for v1.backendService ==) (== resource_for beta.backendService ==)", + "description": "Represents a Backend Service resource.\n\nA backend service contains configuration values for Google Cloud Platform load balancing services.\n\nFor more information, read Backend Services.\n\n(== resource_for v1.backendService ==) (== resource_for beta.backendService ==)", "id": "BackendService", "properties": { "affinityCookieTtlSec": { - "description": "Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", + "description": "If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value is one day (86,400).", "format": "int32", "type": "integer" }, - "appEngineBackend": { - "$ref": "BackendServiceAppEngineBackend", - "description": "Directs request to an App Engine app. cloudFunctionBackend and backends[] must be empty if this is set." - }, "backends": { "description": "The list of backends that serve this BackendService.", "items": { @@ -29910,11 +31292,7 @@ }, "circuitBreakers": { "$ref": "CircuitBreakers", - "description": "Settings controlling the volume of connections to a backend service.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." - }, - "cloudFunctionBackend": { - "$ref": "BackendServiceCloudFunctionBackend", - "description": "Directs request to a cloud function. appEngineBackend and backends[] must be empty if this is set." + "description": "Settings controlling the volume of connections to a backend service. If not set, this feature is considered disabled.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." }, "connectionDraining": { "$ref": "ConnectionDraining" @@ -29939,11 +31317,12 @@ "type": "string" }, "enableCDN": { - "description": "If true, enable Cloud CDN for this BackendService.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", + "description": "If true, enables Cloud CDN for the backend service. Only applicable if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or HTTPS.", "type": "boolean" }, "failoverPolicy": { - "$ref": "BackendServiceFailoverPolicy" + "$ref": "BackendServiceFailoverPolicy", + "description": "Applicable only to Failover for Internal TCP/UDP Load Balancing. Requires at least one backend instance group to be defined as a backup (failover) backend." }, "fingerprint": { "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a BackendService.", @@ -29971,7 +31350,7 @@ "type": "string" }, "loadBalancingScheme": { - "description": "Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.", + "description": "Specifies the load balancer type. Choose EXTERNAL for load balancers that receive traffic from external clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose INTERNAL_SELF_MANAGED for Traffic Director. A backend service created for one type of load balancing cannot be used with another. For more information, refer to Choosing a load balancer.", "enum": [ "EXTERNAL", "INTERNAL", @@ -30019,21 +31398,25 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "network": { + "description": "The URL of the network to which this backend service belongs. This field can only be spcified when the load balancing scheme is set to INTERNAL.", + "type": "string" + }, "outlierDetection": { "$ref": "OutlierDetection", - "description": "Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." + "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." }, "port": { - "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.\n\nThis cannot be used for internal load balancing.", + "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.\n\nThis cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).", "format": "int32", "type": "integer" }, "portName": { - "description": "Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", + "description": "A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.\n\n\n\nMust be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).", "type": "string" }, "protocol": { - "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", + "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP, depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic Director for more information.", "enum": [ "HTTP", "HTTP2", @@ -30073,7 +31456,7 @@ "type": "string" }, "sessionAffinity": { - "description": "Type of session affinity to use. The default is NONE.\n\nWhen the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.\n\nWhen the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.\n\nWhen the protocol is UDP, this field is not used.", + "description": "Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.\n\nWhen the loadBalancingScheme is EXTERNAL, possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the protocol is HTTP or HTTPS.\n\nWhen the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.\n\nWhen the loadBalancingScheme is INTERNAL_SELF_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.", "enum": [ "CLIENT_IP", "CLIENT_IP_PORT_PROTO", @@ -30095,7 +31478,7 @@ "type": "string" }, "timeoutSec": { - "description": "How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.", + "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information read, Backend service settings The default is 30 seconds.", "format": "int32", "type": "integer" } @@ -30215,25 +31598,6 @@ }, "type": "object" }, - "BackendServiceAppEngineBackend": { - "description": "Configuration of a App Engine backend.", - "id": "BackendServiceAppEngineBackend", - "properties": { - "appEngineService": { - "description": "Optional. App Engine app service name.", - "type": "string" - }, - "targetProject": { - "description": "Required. Project ID of the project hosting the app. This is the project ID of this project. Reference to another project is not allowed.", - "type": "string" - }, - "version": { - "description": "Optional. Version of App Engine app service. When empty, App Engine will do its normal traffic split.", - "type": "string" - } - }, - "type": "object" - }, "BackendServiceCdnPolicy": { "description": "Message containing Cloud CDN configuration for a backend service.", "id": "BackendServiceCdnPolicy", @@ -30257,34 +31621,19 @@ }, "type": "object" }, - "BackendServiceCloudFunctionBackend": { - "description": "Configuration of a Cloud Function backend.", - "id": "BackendServiceCloudFunctionBackend", - "properties": { - "functionName": { - "description": "Required. A cloud function name. Special value ?*? represents all cloud functions in the project.", - "type": "string" - }, - "targetProject": { - "description": "Required. Project ID of the project hosting the cloud function.", - "type": "string" - } - }, - "type": "object" - }, "BackendServiceFailoverPolicy": { "id": "BackendServiceFailoverPolicy", "properties": { "disableConnectionDrainOnFailover": { - "description": "On failover or failback, this field indicates whether connection drain will be honored. Setting this to true has the following effect: connections to the old active pool are not drained. Connections to the new active pool use the timeout of 10 min (currently fixed). Setting to false has the following effect: both old and new connections will have a drain timeout of 10 min.\n\nThis can be set to true only if the protocol is TCP.\n\nThe default is false.", + "description": "This can be set to true only if the protocol is TCP.\n\nThe default is false.", "type": "boolean" }, "dropTrafficIfUnhealthy": { - "description": "This option is used only when no healthy VMs are detected in the primary and backup instance groups. When set to true, traffic is dropped. When set to false, new connections are sent across all VMs in the primary group.\n\nThe default is false.", + "description": "Applicable only to Failover for Internal TCP/UDP Load Balancing. If set to true, connections to the load balancer are dropped when all primary and all backup backend VMs are unhealthy. If set to false, connections are distributed among all primary VMs when all primary and all backup backend VMs are unhealthy.\n\nThe default is false.", "type": "boolean" }, "failoverRatio": { - "description": "The value of the field must be in [0, 1]. If the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend.\n\nIn case where 'failoverRatio' is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the \"force\" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy.\n\nThis field is only used with l4 load balancing.", + "description": "Applicable only to Failover for Internal TCP/UDP Load Balancing. The value of the field must be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the number of healthy primary VMs equals zero. For all other values, the load balancer performs a failover when the total number of healthy primary VMs is less than this ratio.", "format": "float", "type": "number" } @@ -30589,6 +31938,270 @@ }, "type": "object" }, + "BfdPacket": { + "description": "", + "id": "BfdPacket", + "properties": { + "authenticationPresent": { + "description": "The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "controlPlaneIndependent": { + "description": "The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "demand": { + "description": "The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "diagnostic": { + "description": "The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880", + "enum": [ + "ADMINISTRATIVELY_DOWN", + "CONCATENATED_PATH_DOWN", + "CONTROL_DETECTION_TIME_EXPIRED", + "DIAGNOSTIC_UNSPECIFIED", + "ECHO_FUNCTION_FAILED", + "FORWARDING_PLANE_RESET", + "NEIGHBOR_SIGNALED_SESSION_DOWN", + "NO_DIAGNOSTIC", + "PATH_DOWN", + "REVERSE_CONCATENATED_PATH_DOWN" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "final": { + "description": "The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "length": { + "description": "The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "minEchoRxIntervalMs": { + "description": "The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "minRxIntervalMs": { + "description": "The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "minTxIntervalMs": { + "description": "The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "multiplier": { + "description": "The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "multipoint": { + "description": "The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "myDiscriminator": { + "description": "The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "poll": { + "description": "The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "state": { + "description": "The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880", + "enum": [ + "ADMIN_DOWN", + "DOWN", + "INIT", + "STATE_UNSPECIFIED", + "UP" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "version": { + "description": "The version number of the BFD protocol, as specified in section 4.1 of RFC5880.", + "format": "uint32", + "type": "integer" + }, + "yourDiscriminator": { + "description": "The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, + "BfdStatus": { + "description": "Next free: 15", + "id": "BfdStatus", + "properties": { + "bfdSessionInitializationMode": { + "description": "The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer.", + "enum": [ + "ACTIVE", + "DISABLED", + "PASSIVE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "configUpdateTimestampMicros": { + "description": "Unix timestamp of the most recent config update.", + "format": "int64", + "type": "string" + }, + "controlPacketCounts": { + "$ref": "BfdStatusPacketCounts", + "description": "Control packet counts for the current BFD session." + }, + "controlPacketIntervals": { + "description": "Inter-packet time interval statistics for control packets.", + "items": { + "$ref": "PacketIntervals" + }, + "type": "array" + }, + "echoPacketCounts": { + "$ref": "BfdStatusPacketCounts", + "description": "Echo packet counts for the current BFD session." + }, + "echoPacketIntervals": { + "description": "Inter-packet time interval statistics for echo packets.", + "items": { + "$ref": "PacketIntervals" + }, + "type": "array" + }, + "localDiagnostic": { + "description": "The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880", + "enum": [ + "ADMINISTRATIVELY_DOWN", + "CONCATENATED_PATH_DOWN", + "CONTROL_DETECTION_TIME_EXPIRED", + "DIAGNOSTIC_UNSPECIFIED", + "ECHO_FUNCTION_FAILED", + "FORWARDING_PLANE_RESET", + "NEIGHBOR_SIGNALED_SESSION_DOWN", + "NO_DIAGNOSTIC", + "PATH_DOWN", + "REVERSE_CONCATENATED_PATH_DOWN" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "localState": { + "description": "The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880", + "enum": [ + "ADMIN_DOWN", + "DOWN", + "INIT", + "STATE_UNSPECIFIED", + "UP" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "negotiatedLocalControlTxIntervalMs": { + "description": "Negotiated transmit interval for control packets.", + "format": "uint32", + "type": "integer" + }, + "negotiatedLocalEchoTxIntervalMs": { + "description": "Negotiated transmit interval for echo packets.", + "format": "uint32", + "type": "integer" + }, + "rxPacket": { + "$ref": "BfdPacket", + "description": "The most recent Rx control packet for this BFD session." + }, + "txPacket": { + "$ref": "BfdPacket", + "description": "The most recent Tx control packet for this BFD session." + }, + "uptimeMs": { + "description": "Session uptime in milliseconds. Value will be 0 if session is not up.", + "format": "int64", + "type": "string" + }, + "usingEchoMode": { + "description": "Indicates if echo mode is currently being used.", + "type": "boolean" + } + }, + "type": "object" + }, + "BfdStatusPacketCounts": { + "id": "BfdStatusPacketCounts", + "properties": { + "numRx": { + "description": "Number of packets received since the beginning of the current BFD session.", + "format": "uint32", + "type": "integer" + }, + "numRxRejected": { + "description": "Number of packets received that were rejected because of errors since the beginning of the current BFD session.", + "format": "uint32", + "type": "integer" + }, + "numRxSuccessful": { + "description": "Number of packets received that were successfully processed since the beginning of the current BFD session.", + "format": "uint32", + "type": "integer" + }, + "numTx": { + "description": "Number of packets transmitted since the beginning of the current BFD session.", + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, "Binding": { "description": "Associates `members` with a `role`.", "id": "Binding", @@ -30598,7 +32211,7 @@ "description": "The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.", + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.", "items": { "type": "string" }, @@ -30661,22 +32274,14 @@ "description": "gRPC call credentials to access the SDS server.", "id": "CallCredentials", "properties": { - "accessToken": { - "description": "The access token that is used as call credential for the SDS server. This field is used only if callCredentialType is ACCESS_TOKEN.", - "type": "string" - }, "callCredentialType": { - "description": "The type of call credentials to use for GRPC requests to the SDS server. This field can be set to one of the following: ACCESS_TOKEN: An access token is used as call credentials for the SDS server. GCE_VM: The local GCE VM service account credentials are used to access the SDS server. JWT_SERVICE_TOKEN: The user provisioned service account credentials are used to access the SDS server. FROM_PLUGIN: Custom authenticator credentials are used to access the SDS server.", + "description": "The type of call credentials to use for GRPC requests to the SDS server. This field can be set to one of the following: \n- GCE_VM: The local GCE VM service account credentials are used to access the SDS server.\n- FROM_PLUGIN: Custom authenticator credentials are used to access the SDS server.", "enum": [ - "ACCESS_TOKEN", "FROM_PLUGIN", "GCE_VM", - "INVALID", - "JWT_SERVICE_ACCOUNT" + "INVALID" ], "enumDescriptions": [ - "", - "", "", "", "" @@ -30685,11 +32290,7 @@ }, "fromPlugin": { "$ref": "MetadataCredentialsFromPlugin", - "description": "Custom authenticator credentials." - }, - "jwtServiceAccount": { - "$ref": "ServiceAccountJwtAccessCredentials", - "description": "This service account credentials are used as call credentials for the SDS server. This field is used only if callCredentialType is JWT_SERVICE_ACCOUNT." + "description": "Custom authenticator credentials. Valid if callCredentialType is FROM_PLUGIN." } }, "type": "object" @@ -30728,27 +32329,27 @@ "description": "The timeout for new network connections to hosts." }, "maxConnections": { - "description": "The maximum number of connections to the backend cluster. If not specified, the default is 1024.", + "description": "The maximum number of connections to the backend service. If not specified, there is no limit.", "format": "int32", "type": "integer" }, "maxPendingRequests": { - "description": "The maximum number of pending requests allowed to the backend cluster. If not specified, the default is 1024.", + "description": "The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.", "format": "int32", "type": "integer" }, "maxRequests": { - "description": "The maximum number of parallel requests that allowed to the backend cluster. If not specified, the default is 1024.", + "description": "The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.", "format": "int32", "type": "integer" }, "maxRequestsPerConnection": { - "description": "Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.", + "description": "Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.", "format": "int32", "type": "integer" }, "maxRetries": { - "description": "The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 3.", + "description": "The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.", "format": "int32", "type": "integer" } @@ -30794,9 +32395,23 @@ "type": "object" }, "Commitment": { - "description": "Represents a Commitment resource. Creating a Commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts.\n\nCommitted use discounts are subject to Google Cloud Platform's Service Specific Terms. By purchasing a committed use discount, you agree to these terms. Committed use discounts will not renew, so you must purchase a new commitment to continue receiving discounts. (== resource_for beta.commitments ==) (== resource_for v1.commitments ==)", + "description": "Represents a regional Commitment resource.\n\nCreating a commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts. (== resource_for beta.regionCommitments ==) (== resource_for v1.regionCommitments ==)", "id": "Commitment", "properties": { + "category": { + "description": "The category of the commitment. Category MACHINE specifies commitments composed of machine resources such as VCPU or MEMORY, listed in resources. Category LICENSE specifies commitments composed of software licenses, listed in licenseResources. Note that only MACHINE commitments should have a Type specified.", + "enum": [ + "CATEGORY_UNSPECIFIED", + "LICENSE", + "MACHINE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -30819,6 +32434,13 @@ "description": "[Output Only] Type of the resource. Always compute#commitment for commitments.", "type": "string" }, + "licenseResources": { + "description": "A list of commitment amounts for particular licenses.", + "items": { + "$ref": "LicenseResourceCommitment" + }, + "type": "array" + }, "name": { "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -30843,7 +32465,7 @@ "type": "string" }, "reservations": { - "description": "List of reservations for this commitment.", + "description": "List of reservations in this commitment.", "items": { "$ref": "Reservation" }, @@ -30893,10 +32515,16 @@ "enum": [ "COMPUTE_OPTIMIZED", "GENERAL_PURPOSE", + "GENERAL_PURPOSE_E2", + "GENERAL_PURPOSE_N2", + "GENERAL_PURPOSE_N2D", "MEMORY_OPTIMIZED", "TYPE_UNSPECIFIED" ], "enumDescriptions": [ + "", + "", + "", "", "", "", @@ -31303,12 +32931,23 @@ }, "type": "object" }, + "ConfidentialInstanceConfig": { + "description": "A set of Confidential Instance options.", + "id": "ConfidentialInstanceConfig", + "properties": { + "enableConfidentialCompute": { + "description": "Defines whether the instance should have confidential compute enabled.", + "type": "boolean" + } + }, + "type": "object" + }, "ConnectionDraining": { "description": "Message containing connection draining configuration.", "id": "ConnectionDraining", "properties": { "drainingTimeoutSec": { - "description": "Time for which instance will be drained (not accept new connections, but still work to finish started).", + "description": "The amount of time in seconds to allow existing connections to persist while on unhealthy backend VMs. Only applicable if the protocol is not UDP. The valid range is [0, 3600].", "format": "int32", "type": "integer" } @@ -31418,6 +33057,7 @@ "type": "string" }, "kmsKeyServiceAccount": { + "description": "The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.", "type": "string" }, "rawKey": { @@ -31489,7 +33129,7 @@ "type": "object" }, "Disk": { - "description": "A Disk resource. (== resource_for beta.disks ==) (== resource_for v1.disks ==)", + "description": "Represents a Persistent Disk resource.\n\nPersistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options.\n\nThe disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.\n\nThe regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for beta.disks ==) (== resource_for v1.disks ==) (== resource_for v1.regionDisks ==) (== resource_for beta.regionDisks ==)", "id": "Disk", "properties": { "creationTimestamp": { @@ -31504,6 +33144,10 @@ "$ref": "CustomerEncryptionKey", "description": "Encrypts the disk using a customer-supplied encryption key.\n\nAfter you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine).\n\nCustomer-supplied encryption keys do not protect access to metadata of the disk.\n\nIf you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later." }, + "eraseWindowsVssSignature": { + "description": "Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.", + "type": "boolean" + }, "guestOsFeatures": { "description": "A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.", "items": { @@ -31601,6 +33245,10 @@ "description": "[Output Only] Server-defined fully-qualified URL for this resource.", "type": "string" }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource's resource id.", + "type": "string" + }, "sizeGb": { "description": "Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.\n\nIf you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.", "format": "int64", @@ -31639,7 +33287,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of disk creation.", + "description": "[Output Only] The status of disk creation. CREATING: Disk is provisioning. RESTORING: Source data is being copied into the disk. FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: Disk is deleting.", "enum": [ "CREATING", "DELETING", @@ -31966,7 +33614,7 @@ "type": "object" }, "DiskType": { - "description": "A DiskType resource. (== resource_for beta.diskTypes ==) (== resource_for v1.diskTypes ==)", + "description": "Represents a Disk Type resource.\n\nYou can choose from a variety of disk types based on your needs. For more information, read Storage options.\n\nThe diskTypes resource represents disk types for a zonal persistent disk. For more information, read Zonal persistent disks.\n\nThe regionDiskTypes resource represents disk types for a regional persistent disk. For more information, read Regional persistent disks. (== resource_for beta.diskTypes ==) (== resource_for v1.diskTypes ==) (== resource_for v1.regionDiskTypes ==) (== resource_for beta.regionDiskTypes ==)", "id": "DiskType", "properties": { "creationTimestamp": { @@ -32346,7 +33994,7 @@ "id": "DisksAddResourcePoliciesRequest", "properties": { "resourcePolicies": { - "description": "Resource policies to be added to this disk.", + "description": "Resource policies to be added to this disk. Currently you can only specify one policy here.", "items": { "type": "string" }, @@ -32487,6 +34135,18 @@ "DistributionPolicy": { "id": "DistributionPolicy", "properties": { + "targetShape": { + "description": "The shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType). The possible values are EVEN and ANY. For EVEN the group attempts to preserve a balanced number of instances across zones. For ANY the group creates new instances where resources are available to fulfill the request; as a result, instances may be distributed unevenly across zones in this mode. The default value is EVEN.", + "enum": [ + "ANY", + "EVEN" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "zones": { "description": "Zones where the regional managed instance group will create and manage instances.", "items": { @@ -32538,7 +34198,7 @@ "type": "string" }, "imported": { - "description": "If the peering route is imported if there is no confliction.", + "description": "True if the peering route has been imported from a peer. The actual import happens if the field networkPeering.importCustomRoutes is true for this network, and networkPeering.exportCustomRoutes is true for the peer network, and the import does not result in a route conflict.", "type": "boolean" }, "nextHopRegion": { @@ -32929,7 +34589,7 @@ "type": "object" }, "Firewall": { - "description": "Represents a Firewall resource.", + "description": "Represents a Firewall Rule resource.\n\nFirewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.", "id": "Firewall", "properties": { "allowed": { @@ -32937,11 +34597,11 @@ "items": { "properties": { "IPProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.", + "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.", "type": "string" }, "ports": { - "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", + "description": "An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", "items": { "type": "string" }, @@ -32961,11 +34621,11 @@ "items": { "properties": { "IPProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.", + "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.", "type": "string" }, "ports": { - "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", + "description": "An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", "items": { "type": "string" }, @@ -32977,18 +34637,18 @@ "type": "array" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "destinationRanges": { - "description": "If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.", + "description": "If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.", "items": { "type": "string" }, "type": "array" }, "direction": { - "description": "Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.", + "description": "Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.", "enum": [ "EGRESS", "INGRESS" @@ -33000,7 +34660,7 @@ "type": "string" }, "disabled": { - "description": "Denotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.", + "description": "Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.", "type": "boolean" }, "enableLogging": { @@ -33028,16 +34688,16 @@ "compute.firewalls.patch" ] }, - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, "network": { - "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default", + "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default", "type": "string" }, "priority": { - "description": "Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.", + "description": "Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.", "format": "int32", "type": "integer" }, @@ -33050,21 +34710,21 @@ "type": "string" }, "sourceRanges": { - "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.", + "description": "If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.", "items": { "type": "string" }, "type": "array" }, "sourceServiceAccounts": { - "description": "If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.", + "description": "If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.", "items": { "type": "string" }, "type": "array" }, "sourceTags": { - "description": "If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.", + "description": "If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.", "items": { "type": "string" }, @@ -33245,15 +34905,15 @@ "type": "object" }, "ForwardingRule": { - "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== resource_for beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (== resource_for beta.globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==)", + "description": "Represents a Forwarding Rule resource.\n\nA forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud Platform load balancer. Forwarding rules can also reference target instances and Cloud VPN Classic gateways (targetVpnGateway).\n\nFor more information, read Forwarding rule concepts and Using protocol forwarding.\n\n(== resource_for beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (== resource_for beta.globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==)", "id": "ForwardingRule", "properties": { "IPAddress": { - "description": "The IP address that this forwarding rule is serving on behalf of.\n\nAddresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional).\n\nWhen the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.\n\nWhen the load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL reference to an existing Address resource ( internal regional static IP address), with a purpose of GCE_END_POINT and address_type of INTERNAL.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule.\n\nAn address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: \n- 100.1.2.3 \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address \n- projects/project/regions/region/addresses/address \n- regions/region/addresses/address \n- global/addresses/address \n- address", + "description": "IP address that this forwarding rule serves. When a client sends traffic to this IP address, the forwarding rule directs the traffic to the target that you specify in the forwarding rule.\n\nIf you don't specify a reserved IP address, an ephemeral IP address is assigned. Methods for specifying an IP address:\n\n* IPv4 dotted decimal, as in `100.1.2.3` * Full URL, as in https://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name * Partial URL or by name, as in: * projects/project_id/regions/region/addresses/address-name * regions/region/addresses/address-name * global/addresses/address-name * address-name \n\nThe loadBalancingScheme and the forwarding rule's target determine the type of IP address that you can use. For detailed information, refer to [IP address specifications](/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications).", "type": "string" }, "IPProtocol": { - "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL, only TCP and UDP are valid. When the load balancing scheme is INTERNAL_SELF_MANAGED, only TCPis valid.", + "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nFor Internal TCP/UDP Load Balancing, the load balancing scheme is INTERNAL, and one of TCP or UDP are valid. For Traffic Director, the load balancing scheme is INTERNAL_SELF_MANAGED, and only TCPis valid. For Internal HTTP(S) Load Balancing, the load balancing scheme is INTERNAL_MANAGED, and only TCP is valid. For HTTP(S), SSL Proxy, and TCP Proxy Load Balancing, the load balancing scheme is EXTERNAL and only TCP is valid. For Network TCP/UDP Load Balancing, the load balancing scheme is EXTERNAL, and one of TCP or UDP is valid.", "enum": [ "AH", "ESP", @@ -33316,6 +34976,10 @@ ], "type": "string" }, + "isMirroringCollector": { + "description": "Indicates whether or not this load balancer can be used as a collector for packet mirroring. To prevent mirroring loops, instances behind this load balancer will not have their traffic mirrored even if a PacketMirroring rule applies to them. This can only be set to true for load balancers that have their loadBalancingScheme set to INTERNAL.", + "type": "boolean" + }, "kind": { "default": "compute#forwardingRule", "description": "[Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.", @@ -33334,7 +34998,7 @@ "type": "object" }, "loadBalancingScheme": { - "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, INTERNAL_SELF_MANAGED, EXTERNAL. The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of INTERNAL_SELF_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", + "description": "Specifies the forwarding rule type. EXTERNAL is used for: - Classic Cloud VPN gateways - Protocol forwarding to VMs from an external IP address - The following load balancers: HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP.\n\nINTERNAL is used for: - Protocol forwarding to VMs from an internal IP address - Internal TCP/UDP load balancers\n\nINTERNAL_MANAGED is used for: - Internal HTTP(S) load balancers\n\nINTERNAL_SELF_MANAGED is used for: - Traffic Director\n\nFor more information about forwarding rules, refer to Forwarding rule concepts.", "enum": [ "EXTERNAL", "INTERNAL", @@ -33382,11 +35046,11 @@ "type": "string" }, "portRange": { - "description": "This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nSome types of forwarding target have constraints on the acceptable ports: \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetVpnGateway: 500, 4500", + "description": "This field is deprecated. See the port\nfield.", "type": "string" }, "ports": { - "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a list of ports can be configured, for example, ['80'], ['8000','9000'] etc. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.", + "description": "List of comma-separated ports. The forwarding rule forwards packets with matching destination ports. If the forwarding rule's loadBalancingScheme is EXTERNAL, and the forwarding rule references a target pool, specifying ports is optional. You can specify an unlimited number of ports, but they must be contiguous. If you omit ports, GCP forwards traffic on any port of the forwarding rule's protocol.\n\nIf the forwarding rule's loadBalancingScheme is EXTERNAL, and the forwarding rule references a target HTTP proxy, target HTTPS proxy, target TCP proxy, target SSL proxy, or target VPN gateway, you must specify ports using the following constraints:\n\n \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetVpnGateway: 500, 4500 \n\nIf the forwarding rule's loadBalancingScheme is INTERNAL, you must specify ports in one of the following ways:\n\n* A list of up to five ports, which can be non-contiguous * Keyword ALL, which causes the forwarding rule to forward traffic on any port of the forwarding rule's protocol.\n\nThe ports field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.", "items": { "type": "string" }, @@ -33405,7 +35069,7 @@ "type": "string" }, "serviceLabel": { - "description": "An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name.\n\nThe label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.\n\nThis field is only used for internal load balancing.", + "description": "An optional prefix to the service name for this Forwarding Rule. If specified, the prefix is the first label of the fully qualified service name.\n\nThe label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.\n\nThis field is only used for internal load balancing.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -34089,7 +35753,7 @@ "type": "object" }, "HealthCheck": { - "description": "An HealthCheck resource. This resource defines a template for how individual virtual machines should be checked for health, via one of the supported protocols.", + "description": "Represents a Health Check resource.\n\nHealth checks are used for most GCP load balancers and managed instance group auto-healing. For more information, read Health Check Concepts.\n\nTo perform health checks on network load balancers, you must use either httpHealthChecks or httpsHealthChecks.", "id": "HealthCheck", "properties": { "checkIntervalSec": { @@ -34129,6 +35793,10 @@ "description": "Type of the resource.", "type": "string" }, + "logConfig": { + "$ref": "HealthCheckLogConfig", + "description": "Configure logging on this health check." + }, "name": { "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -34302,6 +35970,17 @@ }, "type": "object" }, + "HealthCheckLogConfig": { + "description": "Configuration of logging on a health check. If logging is enabled, logs will be exported to Stackdriver.", + "id": "HealthCheckLogConfig", + "properties": { + "enable": { + "description": "Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.", + "type": "boolean" + } + }, + "type": "object" + }, "HealthCheckReference": { "description": "A full or valid partial URL to a health check. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check \n- projects/project-id/global/httpHealthChecks/health-check \n- global/httpHealthChecks/health-check", "id": "HealthCheckReference", @@ -34331,6 +36010,18 @@ }, "type": "array" }, + "healthStatusAggregationPolicy": { + "description": "Optional. Policy for how the results from multiple health checks for the same endpoint are aggregated. Defaults to NO_AGGREGATION if unspecified. \n- NO_AGGREGATION. An EndpointHealth message is returned for each backend in the health check service. \n- AND. If any backend's health check reports UNHEALTHY, then UNHEALTHY is the HealthState of the entire health check service. If all backend's are healthy, the HealthState of the health check service is HEALTHY. .", + "enum": [ + "AND", + "NO_AGGREGATION" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "healthStatusAggregationStrategy": { "description": "Policy for how the results from multiple health checks for the same endpoint are aggregated. \n- NO_AGGREGATION. An EndpointHealth message is returned for each backend in the health check service. \n- AND. If any backend's health check reports UNHEALTHY, then UNHEALTHY is the HealthState of the entire health check service. If all backend's are healthy, the HealthState of the health check service is HEALTHY. .", "enum": [ @@ -34387,6 +36078,16 @@ }, "type": "object" }, + "HealthCheckServiceReference": { + "description": "A full or valid partial URL to a health check service. For example, the following are valid URLs: \n- https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service \n- projects/project-id/regions/us-west1/healthCheckServices/health-check-service \n- regions/us-west1/healthCheckServices/health-check-service", + "id": "HealthCheckServiceReference", + "properties": { + "healthCheckService": { + "type": "string" + } + }, + "type": "object" + }, "HealthCheckServicesList": { "id": "HealthCheckServicesList", "properties": { @@ -34757,6 +36458,10 @@ "$ref": "HealthCheckReference", "description": "URL of the health check associated with the health state of the network endpoint." }, + "healthCheckService": { + "$ref": "HealthCheckServiceReference", + "description": "URL of the health check service associated with the health state of the network endpoint." + }, "healthState": { "description": "Health state of the network endpoint determined based on the health checks configured.", "enum": [ @@ -34940,7 +36645,7 @@ "type": "object" }, "HttpHealthCheck": { - "description": "An HttpHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTP.", + "description": "Represents a legacy HTTP Health Check resource.\n\nLegacy health checks are required by network load balancers. For more information, read Health Check Concepts.", "id": "HttpHealthCheck", "properties": { "checkIntervalSec": { @@ -34986,7 +36691,7 @@ "type": "integer" }, "requestPath": { - "description": "The request path of the HTTP health check request. The default value is /.", + "description": "The request path of the HTTP health check request. The default value is /. This field does not support query parameters.", "type": "string" }, "selfLink": { @@ -35195,13 +36900,13 @@ "id": "HttpRetryPolicy", "properties": { "numRetries": { - "description": "Specifies the allowed number retries. This number must be \u003e 0.", + "description": "Specifies the allowed number retries. This number must be \u003e 0. If not specified, defaults to 1.", "format": "uint32", "type": "integer" }, "perTryTimeout": { "$ref": "Duration", - "description": "Specifies a non-zero timeout per retry attempt." + "description": "Specifies a non-zero timeout per retry attempt.\nIf not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route." }, "retryConditions": { "description": "Specfies one or more conditions when this retry rule applies. Valid values are: \n- 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \n- gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.\n- \n- connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \n- retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \n- refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. \n- cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled \n- deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \n- resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \n- unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable", @@ -35234,7 +36939,7 @@ }, "timeout": { "$ref": "Duration", - "description": "Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.\nIf not specified, the default value is 15 seconds." + "description": "Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.\nIf not specified, will use the largest timeout among all backend services associated with the route." }, "urlRewrite": { "$ref": "UrlRewrite", @@ -35254,6 +36959,10 @@ "description": "An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.", "id": "HttpRouteRule", "properties": { + "description": { + "description": "The short description conveying the intent of this routeRule.\nThe description can have a maximum length of 1024 characters.", + "type": "string" + }, "headerAction": { "$ref": "HttpHeaderAction", "description": "Specifies changes to request and response headers that need to take effect for the selected backendService.\nThe headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction" @@ -35264,6 +36973,11 @@ }, "type": "array" }, + "priority": { + "description": "For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied.\nYou cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive.\nPriority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.", + "format": "int32", + "type": "integer" + }, "routeAction": { "$ref": "HttpRouteAction", "description": "In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.\nOnly one of routeAction or urlRedirect must be set." @@ -35324,7 +37038,7 @@ "type": "object" }, "HttpsHealthCheck": { - "description": "An HttpsHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTPS.", + "description": "Represents a legacy HTTPS Health Check resource.\n\nLegacy health checks are required by network load balancers. For more information, read Health Check Concepts.", "id": "HttpsHealthCheck", "properties": { "checkIntervalSec": { @@ -35507,7 +37221,7 @@ "type": "object" }, "Image": { - "description": "An Image resource. (== resource_for beta.images ==) (== resource_for v1.images ==)", + "description": "Represents an Image resource.\n\nYou can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for beta.images ==) (== resource_for v1.images ==)", "id": "Image", "properties": { "archiveSizeBytes": { @@ -35700,7 +37414,7 @@ "type": "string" }, "storageLocations": { - "description": "GCS bucket storage location of the image (regional or multi-regional).", + "description": "Cloud Storage bucket storage location of the image (regional or multi-regional).", "items": { "type": "string" }, @@ -35854,13 +37568,16 @@ "type": "object" }, "Instance": { - "description": "An Instance resource. (== resource_for beta.instances ==) (== resource_for v1.instances ==)", + "description": "Represents an Instance resource.\n\nAn instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for beta.instances ==) (== resource_for v1.instances ==)", "id": "Instance", "properties": { "canIpForward": { "description": "Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding.", "type": "boolean" }, + "confidentialInstanceConfig": { + "$ref": "ConfidentialInstanceConfig" + }, "cpuPlatform": { "description": "[Output Only] The CPU platform used by this instance.", "type": "string" @@ -35888,6 +37605,15 @@ "$ref": "DisplayDevice", "description": "Enables display device for the instance." }, + "eraseWindowsVssSignature": { + "description": "Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.", + "type": "boolean" + }, + "fingerprint": { + "description": "Specifies a fingerprint for this resource, which is essentially a hash of the instance's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance.\n\nTo see the latest fingerprint, make get() request to the instance.", + "format": "byte", + "type": "string" + }, "guestAccelerators": { "description": "A list of the type and count of accelerator cards attached to the instance.", "items": { @@ -35896,6 +37622,7 @@ "type": "array" }, "hostname": { + "description": "Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.", "type": "string" }, "id": { @@ -35958,6 +37685,20 @@ }, "type": "array" }, + "postKeyRevocationActionType": { + "description": "Specifies whether this instance will be shut down on key revocation.", + "enum": [ + "NOOP", + "SHUTDOWN", + "UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "preservedStateSizeGb": { "description": "Total amount of preserved state for SUSPENDED instances. Read-only in the api.", "format": "int64", @@ -35965,7 +37706,7 @@ }, "reservationAffinity": { "$ref": "ReservationAffinity", - "description": "The configuration of desired reservations from which this Instance can consume capacity from." + "description": "Specifies the reservations that this instance can consume from." }, "resourcePolicies": { "description": "Resource policies applied to this instance.", @@ -36070,7 +37811,7 @@ "$ref": "InstancesScopedList", "description": "[Output Only] Name of the scope containing this set of instances." }, - "description": "A list of InstancesScopedList resources.", + "description": "An object that contains a list of instances scoped by zone.", "type": "object" }, "kind": { @@ -36171,7 +37912,7 @@ "type": "object" }, "InstanceGroup": { - "description": "InstanceGroups (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==)", + "description": "Represents an unmanaged Instance Group resource.\n\nUse unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. For more information, read Instance groups.\n\nFor zonal unmanaged Instance Group, use instanceGroups resource.\n\nFor regional unmanaged Instance Group, use regionInstanceGroups resource. (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==)", "id": "InstanceGroup", "properties": { "creationTimestamp": { @@ -36471,7 +38212,7 @@ "type": "object" }, "InstanceGroupManager": { - "description": "An Instance Group Manager resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)", + "description": "Represents a Managed Instance Group resource.\n\nAn instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.\n\nFor zonal Managed Instance Group, use the instanceGroupManagers resource.\n\nFor regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)", "id": "InstanceGroupManager", "properties": { "autoHealingPolicies": { @@ -36948,6 +38689,10 @@ "InstanceGroupManagerStatus": { "id": "InstanceGroupManagerStatus", "properties": { + "autoscaler": { + "description": "[Output Only] The URL of the Autoscaler that targets this instance group manager.", + "type": "string" + }, "isStable": { "description": "[Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.", "type": "boolean" @@ -36987,6 +38732,7 @@ "id": "InstanceGroupManagerUpdatePolicy", "properties": { "instanceRedistributionType": { + "description": "The instance redistribution policy for regional managed instance groups. Valid values are: \n- PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region. \n- NONE: For non-autoscaled groups, proactive redistribution is disabled.", "enum": [ "NONE", "PROACTIVE" @@ -37039,6 +38785,7 @@ "type": "string" }, "type": { + "description": "The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).", "enum": [ "OPPORTUNISTIC", "PROACTIVE" @@ -37092,7 +38839,7 @@ "id": "InstanceGroupManagersApplyUpdatesRequest", "properties": { "instances": { - "description": "The list of URLs of one or more instances for which we want to apply updates on this managed instance group. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "description": "The list of URLs of one or more instances for which you want to apply updates. Each URL can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" }, @@ -37115,7 +38862,7 @@ "type": "string" }, "minimalAction": { - "description": "The minimal action that should be perfomed on the instances. By default NONE.", + "description": "The minimal action that you want to perform on each instance during the update: \n- REPLACE: At minimum, delete the instance and create it again. \n- RESTART: Stop the instance and start it again. \n- REFRESH: Do not stop the instance. \n- NONE: Do not disrupt the instance at all. By default, the minimum action is NONE. If your update requires a more disruptive action than you set with this flag, the necessary action is performed to execute the update.", "enum": [ "NONE", "REFRESH", @@ -37131,7 +38878,7 @@ "type": "string" }, "mostDisruptiveAllowedAction": { - "description": "The most disruptive action that allowed to be performed on the instances. By default REPLACE.", + "description": "The most disruptive action that you want to perform on each instance during the update: \n- REPLACE: Delete the instance and create it again. \n- RESTART: Stop the instance and start it again. \n- REFRESH: Do not stop the instance. \n- NONE: Do not disrupt the instance at all. By default, the most disruptive allowed action is REPLACE. If your update requires a more disruptive action than you set with this flag, the update request will fail.", "enum": [ "NONE", "REFRESH", @@ -37180,13 +38927,6 @@ "description": "InstanceGroupManagers.deletePerInstanceConfigs", "id": "InstanceGroupManagersDeletePerInstanceConfigsReq", "properties": { - "instances": { - "description": "The list of instances for which we want to delete per-instance configs on this managed instance group.", - "items": { - "type": "string" - }, - "type": "array" - }, "names": { "description": "The list of instance names for which we want to delete per-instance configs on this managed instance group.", "items": { @@ -37197,6 +38937,23 @@ }, "type": "object" }, + "InstanceGroupManagersListErrorsResponse": { + "id": "InstanceGroupManagersListErrorsResponse", + "properties": { + "items": { + "description": "[Output Only] The list of errors of the managed instance group.", + "items": { + "$ref": "InstanceManagedByIgmError" + }, + "type": "array" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + } + }, + "type": "object" + }, "InstanceGroupManagersListManagedInstancesResponse": { "id": "InstanceGroupManagersListManagedInstancesResponse", "properties": { @@ -37993,6 +39750,78 @@ }, "type": "object" }, + "InstanceManagedByIgmError": { + "id": "InstanceManagedByIgmError", + "properties": { + "error": { + "$ref": "InstanceManagedByIgmErrorManagedInstanceError", + "description": "[Output Only] Contents of the error." + }, + "instanceActionDetails": { + "$ref": "InstanceManagedByIgmErrorInstanceActionDetails", + "description": "[Output Only] Details of the instance action that triggered this error. May be null, if the error was not caused by an action on an instance. This field is optional." + }, + "timestamp": { + "description": "[Output Only] The time that this error occurred. This value is in RFC3339 text format.", + "type": "string" + } + }, + "type": "object" + }, + "InstanceManagedByIgmErrorInstanceActionDetails": { + "id": "InstanceManagedByIgmErrorInstanceActionDetails", + "properties": { + "action": { + "description": "[Output Only] Action that managed instance group was executing on the instance when the error occurred. Possible values:", + "enum": [ + "ABANDONING", + "CREATING", + "CREATING_WITHOUT_RETRIES", + "DELETING", + "NONE", + "RECREATING", + "REFRESHING", + "RESTARTING", + "VERIFYING" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "instance": { + "description": "[Output Only] The URL of the instance. The URL can be set even if the instance has not yet been created.", + "type": "string" + }, + "version": { + "$ref": "ManagedInstanceVersion", + "description": "[Output Only] Version this instance was created from, or was being created from, but the creation failed. Corresponds to one of the versions that were set on the Instance Group Manager resource at the time this instance was being created." + } + }, + "type": "object" + }, + "InstanceManagedByIgmErrorManagedInstanceError": { + "id": "InstanceManagedByIgmErrorManagedInstanceError", + "properties": { + "code": { + "description": "[Output Only] Error code.", + "type": "string" + }, + "message": { + "description": "[Output Only] Error message.", + "type": "string" + } + }, + "type": "object" + }, "InstanceMoveRequest": { "id": "InstanceMoveRequest", "properties": { @@ -38015,6 +39844,10 @@ "description": "Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.", "type": "boolean" }, + "confidentialInstanceConfig": { + "$ref": "ConfidentialInstanceConfig", + "description": "Specifies the Confidential Instance options." + }, "description": { "description": "An optional text description for the instances that are created from this instance template.", "type": "string" @@ -38068,9 +39901,23 @@ }, "type": "array" }, + "postKeyRevocationActionType": { + "description": "Specifies whether this instance will be shut down on key revocation.", + "enum": [ + "NOOP", + "SHUTDOWN", + "UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "reservationAffinity": { "$ref": "ReservationAffinity", - "description": "The configuration of desired reservations which this Instance could consume capacity from." + "description": "Specifies the reservations that this instance can consume from." }, "scheduling": { "$ref": "Scheduling", @@ -38108,7 +39955,7 @@ "type": "object" }, "InstanceTemplate": { - "description": "An Instance Template resource. (== resource_for beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==)", + "description": "Represents an Instance Template resource.\n\nYou can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==)", "id": "InstanceTemplate", "properties": { "creationTimestamp": { @@ -38543,6 +40390,20 @@ }, "type": "object" }, + "InstancesSetNameRequest": { + "id": "InstancesSetNameRequest", + "properties": { + "currentName": { + "description": "The current name of this resource, used to prevent conflicts. Provide the latest name when making a request to change name.", + "type": "string" + }, + "name": { + "description": "The name to be applied to the instance. Needs to be RFC 1035 compliant.", + "type": "string" + } + }, + "type": "object" + }, "InstancesSetServiceAccountRequest": { "id": "InstancesSetServiceAccountRequest", "properties": { @@ -38595,7 +40456,7 @@ "type": "object" }, "Interconnect": { - "description": "Represents an Interconnects resource. The Interconnects resource is a dedicated connection between Google's network and your on-premises network. For more information, see the Dedicated overview page. (== resource_for v1.interconnects ==) (== resource_for beta.interconnects ==)", + "description": "Represents an Interconnect resource.\n\nAn Interconnect resource is a dedicated connection between the GCP network and your on-premises network. For more information, read the Dedicated Interconnect Overview. (== resource_for v1.interconnects ==) (== resource_for beta.interconnects ==)", "id": "Interconnect", "properties": { "adminEnabled": { @@ -38759,7 +40620,7 @@ "type": "object" }, "InterconnectAttachment": { - "description": "Represents an InterconnectAttachment (VLAN attachment) resource. For more information, see Creating VLAN Attachments. (== resource_for beta.interconnectAttachments ==) (== resource_for v1.interconnectAttachments ==)", + "description": "Represents an Interconnect Attachment (VLAN) resource.\n\nYou can use Interconnect attachments (VLANS) to connect your Virtual Private Cloud networks to your on-premises networks through an Interconnect. For more information, read Creating VLAN Attachments. (== resource_for beta.interconnectAttachments ==) (== resource_for v1.interconnectAttachments ==)", "id": "InterconnectAttachment", "properties": { "adminEnabled": { @@ -38767,7 +40628,7 @@ "type": "boolean" }, "bandwidth": { - "description": "Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one of the following values: \n- BPS_50M: 50 Mbit/s \n- BPS_100M: 100 Mbit/s \n- BPS_200M: 200 Mbit/s \n- BPS_300M: 300 Mbit/s \n- BPS_400M: 400 Mbit/s \n- BPS_500M: 500 Mbit/s \n- BPS_1G: 1 Gbit/s \n- BPS_2G: 2 Gbit/s \n- BPS_5G: 5 Gbit/s \n- BPS_10G: 10 Gbit/s", + "description": "Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one of the following values: \n- BPS_50M: 50 Mbit/s \n- BPS_100M: 100 Mbit/s \n- BPS_200M: 200 Mbit/s \n- BPS_300M: 300 Mbit/s \n- BPS_400M: 400 Mbit/s \n- BPS_500M: 500 Mbit/s \n- BPS_1G: 1 Gbit/s \n- BPS_2G: 2 Gbit/s \n- BPS_5G: 5 Gbit/s \n- BPS_10G: 10 Gbit/s \n- BPS_20G: 20 Gbit/s \n- BPS_50G: 50 Gbit/s", "enum": [ "BPS_100M", "BPS_10G", @@ -38836,7 +40697,7 @@ "type": "string" }, "googleReferenceId": { - "description": "[Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.", + "description": "[Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues. [Deprecated] This field is not used.", "type": "string" }, "id": { @@ -38865,6 +40726,11 @@ "description": "Labels to apply to this InterconnectAttachment resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.", "type": "object" }, + "mtu": { + "description": "Maximum Transmission Unit (MTU), in bytes, of packets passing through this interconnect attachment. Only 1440 and 1500 are allowed. If not specified, the value will default to 1440.", + "format": "int32", + "type": "integer" + }, "name": { "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -39567,7 +41433,7 @@ "type": "object" }, "InterconnectLocation": { - "description": "Represents an InterconnectLocations resource. The InterconnectLocations resource describes the locations where you can connect to Google's networks. For more information, see Colocation Facilities.", + "description": "Represents an Interconnect Attachment (VLAN) Location resource.\n\nYou can use this resource to find location details about an Interconnect attachment (VLAN). For more information about interconnect attachments, read Creating VLAN Attachments.", "id": "InterconnectLocation", "properties": { "address": { @@ -39880,6 +41746,7 @@ "enum": [ "ACTIVE", "CANCELLED", + "COMPLETED", "NS_ACTIVE", "NS_CANCELED" ], @@ -39887,6 +41754,7 @@ "", "", "", + "", "" ], "type": "string" @@ -40383,6 +42251,26 @@ }, "type": "object" }, + "LicenseResourceCommitment": { + "description": "Commitment for a particular license resource (a License Commitment is composed of one or more of these).", + "id": "LicenseResourceCommitment", + "properties": { + "amount": { + "description": "The number of licenses purchased.", + "format": "int64", + "type": "string" + }, + "coresPerLicense": { + "description": "Specifies the core range of the instance for which this license applies.", + "type": "string" + }, + "license": { + "description": "Any applicable license URI.", + "type": "string" + } + }, + "type": "object" + }, "LicenseResourceRequirements": { "id": "LicenseResourceRequirements", "properties": { @@ -40568,9 +42456,16 @@ "type": "object" }, "LogConfigCounterOptions": { - "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nSupported field names: - \"authority\", which is \"[token]\" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - \"iam_principal\", a representation of IAMContext.principal even if a token or authority selector is present; or - \"\" (empty string), resulting in a counter with no fields.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support multiple field names (though this may be supported in the future).", + "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nSupported field names: - \"authority\", which is \"[token]\" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - \"iam_principal\", a representation of IAMContext.principal even if a token or authority selector is present; or - \"\" (empty string), resulting in a counter with no fields.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nTODO(b/141846426): Consider supporting \"authority\" and \"iam_principal\" fields in the same counter.", "id": "LogConfigCounterOptions", "properties": { + "customFields": { + "description": "Custom fields.", + "items": { + "$ref": "LogConfigCounterOptionsCustomField" + }, + "type": "array" + }, "field": { "description": "The field value to attribute.", "type": "string" @@ -40582,6 +42477,21 @@ }, "type": "object" }, + "LogConfigCounterOptionsCustomField": { + "description": "Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.", + "id": "LogConfigCounterOptionsCustomField", + "properties": { + "name": { + "description": "Name is the field name.", + "type": "string" + }, + "value": { + "description": "Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.", + "type": "string" + } + }, + "type": "object" + }, "LogConfigDataAccessOptions": { "description": "Write a Data Access (Gin) log", "id": "LogConfigDataAccessOptions", @@ -40613,6 +42523,10 @@ "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" }, + "guestFlush": { + "description": "[Input Only] Specifies to create an application consistent machine image by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS).", + "type": "boolean" + }, "id": { "description": "[Output Only] A unique identifier for this machine image. The server defines this identifier.", "format": "uint64", @@ -40645,6 +42559,13 @@ "description": "[Output Only] Server-defined URL for this resource with the resource id.", "type": "string" }, + "sourceDiskEncryptionKeys": { + "description": "[Input Only] The customer-supplied encryption key of the disks attached to the source instance. Required if the source disk is protected by a customer-supplied encryption key.", + "items": { + "$ref": "SourceDiskEncryptionKey" + }, + "type": "array" + }, "sourceInstance": { "description": "The source instance used to create the machine image. You can provide this as a partial or full URL to the resource. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n- projects/project/zones/zone/instances/instance", "type": "string" @@ -40677,6 +42598,11 @@ "type": "string" }, "type": "array" + }, + "totalStorageBytes": { + "description": "[Output Only] Total size of the storage used by the machine image.", + "format": "int64", + "type": "string" } }, "type": "object" @@ -40685,9 +42611,6 @@ "description": "A list of machine images.", "id": "MachineImageList", "properties": { - "etag": { - "type": "string" - }, "id": { "description": "[Output Only] Unique identifier for the resource; defined by the server.", "type": "string" @@ -40797,7 +42720,7 @@ "type": "object" }, "MachineType": { - "description": "A Machine Type resource. (== resource_for v1.machineTypes ==) (== resource_for beta.machineTypes ==)", + "description": "Represents a Machine Type resource.\n\nYou can use specific machine types for your VM instances based on performance and pricing requirements. For more information, read Machine Types. (== resource_for v1.machineTypes ==) (== resource_for beta.machineTypes ==)", "id": "MachineType", "properties": { "creationTimestamp": { @@ -41264,10 +43187,6 @@ "$ref": "ManagedInstanceLastAttempt", "description": "[Output Only] Information about the last attempt to create or delete the instance." }, - "override": { - "$ref": "ManagedInstanceOverride", - "description": "[Output Only] Override defined for this instance." - }, "preservedStateFromConfig": { "$ref": "PreservedState", "description": "[Output Only] Preserved state applied from per-instance config for this instance." @@ -41313,7 +43232,7 @@ "type": "string" }, "healthState": { - "description": "[Output Only] The current instance health state.", + "description": "[Output Only] The current instance health state. This field will not get promoted to beta/GA and might be removed from alpha APIs after 01/12/2019. Please use detailed_health_state field instead.", "enum": [ "HEALTHY", "UNHEALTHY" @@ -41360,88 +43279,6 @@ }, "type": "object" }, - "ManagedInstanceOverride": { - "description": "Overrides of stateful properties for a given instance", - "id": "ManagedInstanceOverride", - "properties": { - "disks": { - "description": "Disk overrides defined for this instance. According to documentation the maximum number of disks attached to an instance is 128: https://cloud.google.com/compute/docs/disks/ However, compute API defines the limit at 140, so this is what we check.", - "items": { - "$ref": "ManagedInstanceOverrideDiskOverride" - }, - "type": "array" - }, - "metadata": { - "description": "Metadata overrides defined for this instance. TODO(b/69785416) validate the total length is \u003c9 KB", - "items": { - "properties": { - "key": { - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - }, - "description": "Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.", - "pattern": "[a-zA-Z0-9-_]{1,128}", - "type": "string" - }, - "value": { - "annotations": { - "required": [ - "compute.instances.insert", - "compute.projects.setCommonInstanceMetadata" - ] - }, - "description": "Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "origin": { - "description": "[Output Only] Indicates where does the override come from.", - "enum": [ - "AUTO_GENERATED", - "USER_PROVIDED" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ManagedInstanceOverrideDiskOverride": { - "id": "ManagedInstanceOverrideDiskOverride", - "properties": { - "deviceName": { - "description": "The name of the device on the VM", - "type": "string" - }, - "mode": { - "description": "The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "source": { - "description": "The disk that is/will be mounted", - "type": "string" - } - }, - "type": "object" - }, "ManagedInstanceVersion": { "id": "ManagedInstanceVersion", "properties": { @@ -41599,7 +43436,7 @@ "type": "object" }, "Network": { - "description": "Represents a Network resource. Read Virtual Private Cloud (VPC) Network Overview for more information. (== resource_for v1.networks ==) (== resource_for beta.networks ==)", + "description": "Represents a VPC Network resource.\n\nNetworks connect resources to each other and to the internet. For more information, read Virtual Private Cloud (VPC) Network. (== resource_for v1.networks ==) (== resource_for beta.networks ==)", "id": "Network", "properties": { "IPv4Range": { @@ -41628,11 +43465,11 @@ "type": "string" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "gatewayIPv4": { - "description": "[Output Only] The gateway address for default routing out of the network. This value is read only and is selected by GCP.", + "description": "[Output Only] The gateway address for default routing out of the network, selected by GCP.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}", "type": "string" }, @@ -41659,7 +43496,7 @@ "type": "string" }, "mtu": { - "description": "Maximum Transmission Unit in bytes. The minimum value for this field is 1460 and the maximum value is 1600 bytes.", + "description": "Maximum Transmission Unit in bytes. The minimum value for this field is 1460 and the maximum value is 1500 bytes.", "format": "int32", "type": "integer" }, @@ -41681,7 +43518,7 @@ "compute.networks.insert" ] }, - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -41734,7 +43571,7 @@ "type": "string" }, "ipAddress": { - "description": "Optional IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used.", + "description": "Optional IPv4 address of network endpoint. The IP address must belong to a VM in Compute Engine (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used.", "type": "string" }, "port": { @@ -41746,7 +43583,7 @@ "type": "object" }, "NetworkEndpointGroup": { - "description": "Represents a collection of network endpoints.", + "description": "Represents a collection of network endpoints.\n\nFor more information read Setting up network endpoint groups in load balancing. (== resource_for v1.networkEndpointGroups ==) (== resource_for beta.networkEndpointGroups ==)", "id": "NetworkEndpointGroup", "properties": { "annotations": { @@ -41756,6 +43593,18 @@ "description": "Metadata defined as annotations on the network endpoint group.", "type": "object" }, + "appEngine": { + "$ref": "NetworkEndpointGroupAppEngine", + "description": "Only valid when networkEndpointType is \"SERVERLESS\". Only one of cloudRun, appEngine or cloudFunction may be set." + }, + "cloudFunction": { + "$ref": "NetworkEndpointGroupCloudFunction", + "description": "Only valid when networkEndpointType is \"SERVERLESS\". Only one of cloudRun, appEngine or cloudFunction may be set." + }, + "cloudRun": { + "$ref": "NetworkEndpointGroupCloudRun", + "description": "Only valid when networkEndpointType is \"SERVERLESS\". Only one of cloudRun, appEngine or cloudFunction may be set." + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -41795,11 +43644,15 @@ "description": "Type of network endpoints in this network endpoint group. Currently the only supported value is GCE_VM_IP_PORT.", "enum": [ "GCE_VM_IP_PORT", + "GCE_VM_PRIMARY_IP", "INTERNET_FQDN_PORT", "INTERNET_IP_PORT", - "NON_GCP_PRIVATE_IP_PORT" + "NON_GCP_PRIVATE_IP_PORT", + "SERVERLESS" ], "enumDescriptions": [ + "", + "", "", "", "", @@ -41807,6 +43660,10 @@ ], "type": "string" }, + "region": { + "description": "[Output Only] The URL of the region where the network endpoint group is located.", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -41953,6 +43810,59 @@ }, "type": "object" }, + "NetworkEndpointGroupAppEngine": { + "description": "Configuration for an App Engine network endpoint group (NEG). The service is optional, may be provided explicitly or in the URL mask. The version is optional and can only be provided explicitly or in the URL mask when service is present.\n\nNote: App Engine service must be in the same project and located in the same region as the Serverless NEG.", + "id": "NetworkEndpointGroupAppEngine", + "properties": { + "service": { + "description": "Optional serving service.\n\nThe service name must be 1-63 characters long, and comply with RFC1035.\n\nExample value: \"default\", \"my-service\".", + "type": "string" + }, + "urlMask": { + "description": "A template to parse service and version fields from a request URL. URL mask allows for routing to multiple App Engine services without having to create multiple Network Endpoint Groups and backend services.\n\nFor example, the request URLs \"foo1-dot-appname.appspot.com/v1\" and \"foo1-dot-appname.appspot.com/v2\" can be backed by the same Serverless NEG with URL mask \"-dot-appname.appspot.com/\". The URL mask will parse them to { service = \"foo1\", version = \"v1\" } and { service = \"foo1\", version = \"v2\" } respectively.", + "type": "string" + }, + "version": { + "description": "Optional serving version.\n\nThe version must be 1-63 characters long, and comply with RFC1035.\n\nExample value: \"v1\", \"v2\".", + "type": "string" + } + }, + "type": "object" + }, + "NetworkEndpointGroupCloudFunction": { + "description": "Configuration for a Cloud Function network endpoint group (NEG). The function must be provided explicitly or in the URL mask.\n\nNote: Cloud Function must be in the same project and located in the same region as the Serverless NEG.", + "id": "NetworkEndpointGroupCloudFunction", + "properties": { + "function": { + "description": "A user-defined name of the Cloud Function.\n\nThe service name must be 1-63 characters long, and comply with RFC1035.\n\nExample value: \"func1\".", + "type": "string" + }, + "urlMask": { + "description": "A template to parse function field from a request URL. URL mask allows for routing to multiple Cloud Functions without having to create multiple Network Endpoint Groups and backend services.\n\nFor example, request URLs \"mydomain.com/function1\" and \"mydomain.com/function2\" can be backed by the same Serverless NEG with URL mask \"/\". The URL mask will parse them to { function = \"function1\" } and { function = \"function2\" } respectively.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkEndpointGroupCloudRun": { + "description": "Configuration for a Cloud Run network endpoint group (NEG). The service must be provided explicitly or in the URL mask. The tag is optional, may be provided explicitly or in the URL mask.\n\nNote: Cloud Run service must be in the same project and located in the same region as the Serverless NEG.", + "id": "NetworkEndpointGroupCloudRun", + "properties": { + "service": { + "description": "Cloud Run service is the main resource of Cloud Run.\n\nThe tag must be 1-63 characters long, and comply with RFC1035.\n\nExample value: \"run-service\".", + "type": "string" + }, + "tag": { + "description": "Optional Cloud Run tag represents the \"named-revision\" to provide additional fine-grained traffic routing information.\n\nThe tag must be 1-63 characters long, and comply with RFC1035.\n\nExample value: \"revision-0010\".", + "type": "string" + }, + "urlMask": { + "description": "A template to parse service and tag fields from a request URL. URL mask allows for routing to multiple Run services without having to create multiple network endpoint groups and backend services.\n\nFor example, request URLs \"foo1.domain.com/bar1\" and \"foo1.domain.com/bar2\" can be backed by the same Serverless Network Endpoint Group (NEG) with URL mask \".domain.com/\". The URL mask will parse them to { service=\"bar1\", tag=\"foo1\" } and { service=\"bar2\", tag=\"foo2\" } respectively.", + "type": "string" + } + }, + "type": "object" + }, "NetworkEndpointGroupLbNetworkEndpointGroup": { "description": "Load balancing specific fields for network endpoint group.", "id": "NetworkEndpointGroupLbNetworkEndpointGroup", @@ -42378,7 +44288,7 @@ "type": "array" }, "aliasIpRanges": { - "description": "An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.", + "description": "An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.", "items": { "$ref": "AliasIpRange" }, @@ -42399,19 +44309,19 @@ "type": "string" }, "name": { - "description": "[Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.", + "description": "[Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.", "type": "string" }, "network": { - "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nThis field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default", + "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default", "type": "string" }, "networkIP": { - "description": "An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.", + "description": "An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.", "type": "string" }, "subnetwork": { - "description": "The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n- regions/region/subnetworks/subnetwork", + "description": "The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n- regions/region/subnetworks/subnetwork", "type": "string" } }, @@ -42538,11 +44448,11 @@ "type": "boolean" }, "autoCreateRoutes": { - "description": "This field will be deprecated soon. Prefer using exchange_subnet_routes instead. Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.", + "description": "This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", "type": "boolean" }, "exchangeSubnetRoutes": { - "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the peering state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.", + "description": "Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", "type": "boolean" }, "exportCustomRoutes": { @@ -42562,7 +44472,7 @@ "type": "boolean" }, "name": { - "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "type": "string" }, "network": { @@ -42575,7 +44485,7 @@ "type": "integer" }, "state": { - "description": "[Output Only] State for the peering.", + "description": "[Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network.", "enum": [ "ACTIVE", "INACTIVE" @@ -42598,7 +44508,7 @@ "id": "NetworkRoutingConfig", "properties": { "routingMode": { - "description": "The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnets of this network, across regions.", + "description": "The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.", "enum": [ "GLOBAL", "REGIONAL" @@ -42616,15 +44526,15 @@ "id": "NetworksAddPeeringRequest", "properties": { "autoCreateRoutes": { - "description": "This field will be deprecated soon. Prefer using exchange_subnet_routes in network_peering instead. Whether Google Compute Engine manages the routes automatically.", + "description": "This field will be deprecated soon. Use exchange_subnet_routes in network_peering instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", "type": "boolean" }, "exportCustomRoutes": { - "description": "This field will be deprecated soon. Prefer using export_custom_routes in network_peering instead. Whether to export the custom routes to peer network.", + "description": "This field will be deprecated soon. Use export_custom_routes in network_peering instead. Whether to export the custom routes to peer network.", "type": "boolean" }, "importCustomRoutes": { - "description": "This field will be deprecated soon. Prefer using import_custom_routes in network_peering instead. Whether to import the custom routes from peer network.", + "description": "This field will be deprecated soon. Use import_custom_routes in network_peering instead. Whether to import the custom routes from peer network.", "type": "boolean" }, "name": { @@ -42638,7 +44548,7 @@ }, "networkPeering": { "$ref": "NetworkPeering", - "description": "Network peering parameters. In order to specify route policies for peering using import/export custom routes, you will have to fill all peering related parameters (name, peer network, exchange_subnet_routes) in network_peeringfield. Corresponding fields in NetworksAddPeeringRequest will be deprecated soon." + "description": "Network peering parameters. In order to specify route policies for peering using import and export custom routes, you must specify all peering related parameters (name, peer network, exchange_subnet_routes) in the network_peering field. The corresponding fields in NetworksAddPeeringRequest will be deprecated soon." }, "peerNetwork": { "description": "URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.", @@ -42706,7 +44616,7 @@ "type": "object" }, "NodeGroup": { - "description": "A NodeGroup resource. To create a node group, you must first create a node templates. To learn more about node groups and sole-tenant nodes, read the Sole-tenant nodes documentation. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==)", + "description": "Represent a sole-tenant Node Group resource.\n\nA sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==) NextID: 16", "id": "NodeGroup", "properties": { "autoscalingPolicy": { @@ -42720,6 +44630,10 @@ "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" }, + "fingerprint": { + "format": "byte", + "type": "string" + }, "id": { "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64", @@ -42730,13 +44644,15 @@ "description": "[Output Only] The type of the resource. Always compute#nodeGroup for node group.", "type": "string" }, - "managedHoldback": { + "maintenancePolicy": { "enum": [ - "MANAGED_HOLDBACK_UNSPECIFIED", - "OFF", - "ON" + "DEFAULT", + "MAINTENANCE_POLICY_UNSPECIFIED", + "MIGRATE_WITHIN_NODE_GROUP", + "RESTART_IN_PLACE" ], "enumDescriptions": [ + "", "", "", "" @@ -42908,6 +44824,19 @@ "minSize": { "format": "int32", "type": "integer" + }, + "mode": { + "enum": [ + "MODE_UNSPECIFIED", + "OFF", + "ON" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" } }, "type": "object" @@ -43053,6 +44982,10 @@ "$ref": "ServerBinding", "description": "Binding properties for the physical server." }, + "serverId": { + "description": "Server ID associated with this node.", + "type": "string" + }, "status": { "enum": [ "CREATING", @@ -43088,6 +45021,7 @@ "id": "NodeGroupsDeleteNodesRequest", "properties": { "nodes": { + "description": "Names of the nodes to delete.", "items": { "type": "string" }, @@ -43321,7 +45255,7 @@ "type": "object" }, "NodeTemplate": { - "description": "A Node Template resource. To learn more about node templates and sole-tenant nodes, read the Sole-tenant nodes documentation. (== resource_for beta.nodeTemplates ==) (== resource_for v1.nodeTemplates ==)", + "description": "Represent a sole-tenant Node Template resource.\n\nYou can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. (== resource_for beta.nodeTemplates ==) (== resource_for v1.nodeTemplates ==) (== NextID: 16 ==)", "id": "NodeTemplate", "properties": { "creationTimestamp": { @@ -43381,7 +45315,7 @@ }, "serverBinding": { "$ref": "ServerBinding", - "description": "Binding properties for the physical server." + "description": "Sets the binding properties for the physical server. Valid values include: \n- [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server \n- RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible \n\nSee Sole-tenant node options for more information." }, "status": { "description": "[Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.", @@ -43740,7 +45674,7 @@ "type": "object" }, "NodeType": { - "description": "A Node Type resource.", + "description": "Represent a sole-tenant Node Type resource.\n\nEach node within a node group must have a node type. A node type specifies the total amount of cores and memory for that node. Currently, the only available node type is n1-node-96-624 node type that has 96 vCPUs and 624 GB of memory, available in multiple zones. For more information read Node types. (== resource_for beta.nodeTypes ==) (== resource_for v1.nodeTypes ==)", "id": "NodeType", "properties": { "cpuPlatform": { @@ -44177,9 +46111,13 @@ "type": "string" }, "payloadName": { - "description": "Optional. If specified, this field is used to populate the ?name? field in gRPC requests.", + "description": "Optional. If specified, this field is used to populate the \"name\" field in gRPC requests.", "type": "string" }, + "resendInterval": { + "$ref": "Duration", + "description": "Optional. This field is used to configure how often to send a full update of all non-healthy backends. If unspecified, full updates are not sent. If specified, must be in the range between 600 seconds to 3600 seconds. Nanos are disallowed." + }, "retryDurationSec": { "description": "How much time (in seconds) is spent attempting notification retries until a successful response is received. Default is 30s. Limit is 20m (1200s). Must be a positive number.", "format": "uint32", @@ -44300,7 +46238,7 @@ "type": "object" }, "Operation": { - "description": "An Operation resource, used to manage asynchronous API requests. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)", + "description": "Represents an Operation resource.\n\nYou can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.\n\nOperations can be global, regional or zonal. \n- For global operations, use the globalOperations resource. \n- For regional operations, use the regionOperations resource. \n- For zonal operations, use the zonalOperations resource. \n\nFor more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)", "id": "Operation", "properties": { "clientOperationId": { @@ -44356,7 +46294,7 @@ "type": "integer" }, "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "description": "[Output Only] The unique identifier for the operation. This identifier is defined by the server.", "format": "uint64", "type": "string" }, @@ -44370,7 +46308,7 @@ "type": "string" }, "name": { - "description": "[Output Only] Name of the resource.", + "description": "[Output Only] Name of the operation.", "type": "string" }, "operationType": { @@ -44383,7 +46321,7 @@ "type": "integer" }, "region": { - "description": "[Output Only] The URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "description": "[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.", "type": "string" }, "selfLink": { @@ -44514,7 +46452,7 @@ "type": "array" }, "zone": { - "description": "[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "description": "[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.", "type": "string" } }, @@ -44867,12 +46805,12 @@ "type": "object" }, "OutlierDetection": { - "description": "Settings controlling eviction of unhealthy hosts from the load balancing pool.", + "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service.", "id": "OutlierDetection", "properties": { "baseEjectionTime": { "$ref": "Duration", - "description": "The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s." + "description": "The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s." }, "consecutiveErrors": { "description": "Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.", @@ -44880,17 +46818,17 @@ "type": "integer" }, "consecutiveGatewayFailure": { - "description": "The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5.", + "description": "The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.", "format": "int32", "type": "integer" }, "enforcingConsecutiveErrors": { - "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.", + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.", "format": "int32", "type": "integer" }, "enforcingConsecutiveGatewayFailure": { - "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.", + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.", "format": "int32", "type": "integer" }, @@ -44901,10 +46839,10 @@ }, "interval": { "$ref": "Duration", - "description": "Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds." + "description": "Time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service. Defaults to 1 second." }, "maxEjectionPercent": { - "description": "Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%.", + "description": "Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.", "format": "int32", "type": "integer" }, @@ -44926,6 +46864,618 @@ }, "type": "object" }, + "PacketIntervals": { + "description": "Next free: 7", + "id": "PacketIntervals", + "properties": { + "avgMs": { + "description": "Average observed inter-packet interval in milliseconds.", + "format": "int64", + "type": "string" + }, + "duration": { + "description": "From how long ago in the past these intervals were observed.", + "enum": [ + "DURATION_UNSPECIFIED", + "HOUR", + "MAX", + "MINUTE" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + }, + "maxMs": { + "description": "Maximum observed inter-packet interval in milliseconds.", + "format": "int64", + "type": "string" + }, + "minMs": { + "description": "Minimum observed inter-packet interval in milliseconds.", + "format": "int64", + "type": "string" + }, + "numIntervals": { + "description": "Number of inter-packet intervals from which these statistics were derived.", + "format": "int64", + "type": "string" + }, + "type": { + "description": "The type of packets for which inter-packet intervals were computed.", + "enum": [ + "LOOPBACK", + "RECEIVE", + "TRANSMIT", + "TYPE_UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroring": { + "description": "Represents a PacketMirroring resource.", + "id": "PacketMirroring", + "properties": { + "collectorIlb": { + "$ref": "PacketMirroringForwardingRuleInfo", + "description": "The Forwarding Rule resource of type loadBalancingScheme=INTERNAL that will be used as collector for mirrored traffic. The specified forwarding rule must have isMirroringCollector set to true." + }, + "collectors": { + "$ref": "PacketMirroringCollectorInfo", + "description": "PacketMirroring collectorInfos. Each collectorInfo specifies a set of collector VM instances, preferably in the same zone as the mirrored VM(s)" + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "enable": { + "description": "Indicates whether or not this packet mirroring takes effect. If set to FALSE, this packet mirroring policy will not be enforced on the network.\n\nThe default is TRUE.", + "enum": [ + "FALSE", + "TRUE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "filter": { + "$ref": "PacketMirroringFilter", + "description": "Filter for mirrored traffic. If unspecified, all traffic is mirrored." + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#packetMirroring", + "description": "[Output Only] Type of the resource. Always compute#packetMirroring for packet mirrorings.", + "type": "string" + }, + "mirroredResources": { + "$ref": "PacketMirroringMirroredResourceInfo", + "description": "PacketMirroring mirroredResourceInfos. MirroredResourceInfo specifies a set of mirrored VM instances, subnetworks and/or tags for which traffic from/to all VM instances will be mirrored." + }, + "name": { + "annotations": { + "required": [ + "compute.packetMirrorings.insert" + ] + }, + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "network": { + "$ref": "PacketMirroringNetworkInfo", + "annotations": { + "required": [ + "compute.packetMirrorings.insert" + ] + }, + "description": "Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network." + }, + "packetMatchers": { + "description": "PacketMirroring packetMatchers. Each packetMatcher specifies a CIRD filter that will apply to the source or destination IP in the IP header for the mirrored VM traffic.", + "items": { + "$ref": "PacketMirroringPacketMatcher" + }, + "type": "array" + }, + "priority": { + "description": "The priority of applying this configuration. Priority is used to break ties in cases where there is more than one matching rule. In the case of two rules that apply for a given Instance, the one with the lowest-numbered priority value wins.\n\nDefault value is 1000. Valid range is 0 through 65535.", + "format": "uint32", + "type": "integer" + }, + "region": { + "description": "[Output Only] URI of the region where the packetMirroring resides.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource with the resource id.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringAggregatedList": { + "description": "Contains a list of packetMirrorings.", + "id": "PacketMirroringAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "PacketMirroringsScopedList", + "description": "Name of the scope containing this set of packetMirrorings." + }, + "description": "A list of PacketMirroring resources.", + "type": "object" + }, + "kind": { + "default": "compute#packetMirroringAggregatedList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PacketMirroringCollectorInfo": { + "description": "", + "id": "PacketMirroringCollectorInfo", + "properties": { + "instances": { + "description": "A set of virtual machines configured as destination of the mirrored traffic. They must live in zones contained in the same region as this packetMirroring.", + "items": { + "$ref": "PacketMirroringCollectorInfoInstanceInfo" + }, + "type": "array" + } + }, + "type": "object" + }, + "PacketMirroringCollectorInfoInstanceInfo": { + "id": "PacketMirroringCollectorInfoInstanceInfo", + "properties": { + "url": { + "description": "Resource URL to the virtual machine instance configured as destination of the mirrored traffic.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringFilter": { + "id": "PacketMirroringFilter", + "properties": { + "IPProtocols": { + "description": "Protocols that apply as filter on mirrored traffic. If no protocols are specified, all traffic that matches the specified CIDR ranges is mirrored. If neither cidrRanges nor IPProtocols is specified, all traffic is mirrored.", + "items": { + "type": "string" + }, + "type": "array" + }, + "cidrRanges": { + "description": "IP CIDR ranges that apply as filter on the source (ingress) or destination (egress) IP in the IP header. Only IPv4 is supported. If no ranges are specified, all traffic that matches the specified IPProtocols is mirrored. If neither cidrRanges nor IPProtocols is specified, all traffic is mirrored.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "PacketMirroringForwardingRuleInfo": { + "id": "PacketMirroringForwardingRuleInfo", + "properties": { + "canonicalUrl": { + "description": "[Output Only] Unique identifier for the forwarding rule; defined by the server.", + "type": "string" + }, + "url": { + "description": "Resource URL to the forwarding rule representing the ILB configured as destination of the mirrored traffic.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringList": { + "description": "Contains a list of PacketMirroring resources.", + "id": "PacketMirroringList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of PacketMirroring resources.", + "items": { + "$ref": "PacketMirroring" + }, + "type": "array" + }, + "kind": { + "default": "compute#packetMirroringList", + "description": "[Output Only] Type of resource. Always compute#packetMirroring for packetMirrorings.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PacketMirroringMirroredResourceInfo": { + "id": "PacketMirroringMirroredResourceInfo", + "properties": { + "instances": { + "description": "A set of virtual machine instances that are being mirrored. They must live in zones contained in the same region as this packetMirroring.\n\nNote that this config will apply only to those network interfaces of the Instances that belong to the network specified in this packetMirroring.\n\nYou may specify a maximum of 50 Instances.", + "items": { + "$ref": "PacketMirroringMirroredResourceInfoInstanceInfo" + }, + "type": "array" + }, + "subnetworks": { + "description": "A set of subnetworks for which traffic from/to all VM instances will be mirrored. They must live in the same region as this packetMirroring.\n\nYou may specify a maximum of 5 subnetworks.", + "items": { + "$ref": "PacketMirroringMirroredResourceInfoSubnetInfo" + }, + "type": "array" + }, + "tags": { + "description": "A set of mirrored tags. Traffic from/to all VM instances that have one or more of these tags will be mirrored.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "PacketMirroringMirroredResourceInfoInstanceInfo": { + "id": "PacketMirroringMirroredResourceInfoInstanceInfo", + "properties": { + "canonicalUrl": { + "description": "[Output Only] Unique identifier for the instance; defined by the server.", + "type": "string" + }, + "url": { + "description": "Resource URL to the virtual machine instance which is being mirrored.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringMirroredResourceInfoSubnetInfo": { + "id": "PacketMirroringMirroredResourceInfoSubnetInfo", + "properties": { + "canonicalUrl": { + "description": "[Output Only] Unique identifier for the subnetwork; defined by the server.", + "type": "string" + }, + "url": { + "description": "Resource URL to the subnetwork for which traffic from/to all VM instances will be mirrored.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringNetworkInfo": { + "id": "PacketMirroringNetworkInfo", + "properties": { + "canonicalUrl": { + "description": "[Output Only] Unique identifier for the network; defined by the server.", + "type": "string" + }, + "url": { + "description": "URL of the network resource.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringPacketMatcher": { + "description": "", + "id": "PacketMirroringPacketMatcher", + "properties": { + "cidrRange": { + "description": "IP CIDR range that applies as filter on the source or destination IP in the IP header. Only IPv4 is supported.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringsScopedList": { + "id": "PacketMirroringsScopedList", + "properties": { + "packetMirrorings": { + "description": "A list of packetMirrorings contained in this scope.", + "items": { + "$ref": "PacketMirroring" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of packetMirrorings when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "PathMatcher": { "description": "A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used.", "id": "PathMatcher", @@ -44955,14 +47505,14 @@ "type": "string" }, "pathRules": { - "description": "The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.\nFor example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.\nOnly one of pathRules or routeRules must be set.", + "description": "The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.\nFor example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.\nWithin a given pathMatcher, only one of pathRules or routeRules must be set.", "items": { "$ref": "PathRule" }, "type": "array" }, "routeRules": { - "description": "The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect.\nOnly one of pathRules or routeRules must be set.", + "description": "The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect.\nWithin a given pathMatcher, only one of pathRules or routeRules must be set.\nrouteRules are not supported in UrlMaps intended for External Load balancers.", "items": { "$ref": "HttpRouteRule" }, @@ -45016,17 +47566,10 @@ "format": "byte", "type": "string" }, - "instance": { - "description": "The URL of the instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same instance URL exists then it will be updated, otherwise a new one will be created.", - "type": "string" - }, "name": { "description": "The name of the per-instance config and the corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn't exist or is not part of the group will result in a failure.", "type": "string" }, - "override": { - "$ref": "ManagedInstanceOverride" - }, "preservedState": { "$ref": "PreservedState", "description": "Intended preserved state for the given instance. Does not contain state generated based on Stateful Policy." @@ -45123,7 +47666,7 @@ "type": "object" }, "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.\n\n\n\nA `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.\n\n**JSON Example**\n\n{ \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] }\n\n**YAML Example**\n\nbindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer\n\n\n\nFor a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).", + "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.\n\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions (defined by IAM or configured by users). A `binding` can optionally specify a `condition`, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.\n\n**JSON Example**\n\n{ \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [\"user:eve@example.com\"], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ] }\n\n**YAML Example**\n\nbindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\n\nFor a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).", "id": "Policy", "properties": { "auditConfigs": { @@ -45134,14 +47677,14 @@ "type": "array" }, "bindings": { - "description": "Associates a list of `members` to a `role`. `bindings` with no members will result in an error.", + "description": "Associates a list of `members` to a `role`. Optionally may specify a `condition` that determines when binding is in effect. `bindings` with no members will result in an error.", "items": { "$ref": "Binding" }, "type": "array" }, "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten. Due to blind-set semantics of an etag-less policy, 'setIamPolicy' will not fail even if either of incoming or stored policy does not meet the version requirements.", "format": "byte", "type": "string" }, @@ -45157,7 +47700,7 @@ "type": "array" }, "version": { - "description": "Deprecated.", + "description": "Specifies the format of the policy.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.\n\nOperations affecting conditional bindings must specify version 3. This can be either setting a conditional policy, modifying a conditional binding, or removing a conditional binding from the stored conditional policy. Operations on non-conditional policies may specify any valid value or leave the field unset.\n\nIf no etag is provided in the call to `setIamPolicy`, any version compliance checks on the incoming and/or stored policy is skipped.", "format": "int32", "type": "integer" } @@ -45205,11 +47748,9 @@ "description": "These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.", "enum": [ "NEVER", - "ON_PERMANENT_INSTANCE_DELETION", - "WHEN_NOT_IN_USE" + "ON_PERMANENT_INSTANCE_DELETION" ], "enumDescriptions": [ - "", "", "" ], @@ -45295,7 +47836,7 @@ "additionalProperties": { "type": "string" }, - "description": "A map of Istio attribute to expected values. Exact match, prefix match, and suffix match are supported for values. For example, `request.headers[version]: ?v1?`. The properties are ANDed together.", + "description": "A map of Istio attribute to expected values. Exact match, prefix match, and suffix match are supported for values. For example, `request.headers[version]: \"v1\"`. The properties are ANDed together.", "type": "object" }, "users": { @@ -45309,7 +47850,7 @@ "type": "object" }, "Project": { - "description": "A Project resource. For an overview of projects, see Cloud Platform Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for beta.projects ==)", + "description": "Represents a Project resource.\n\nA project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for beta.projects ==)", "id": "Project", "properties": { "commonInstanceMetadata": { @@ -45475,6 +48016,648 @@ }, "type": "object" }, + "PublicAdvertisedPrefix": { + "description": "A public advertised prefix represents an aggregated IP prefix or netblock which customers bring to cloud. The IP prefix is a single unit of route advertisement and is announced globally to the internet.", + "id": "PublicAdvertisedPrefix", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "dnsVerificationIp": { + "description": "The IPv4 address to be used for reverse DNS verification.", + "type": "string" + }, + "fingerprint": { + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a new PublicAdvertisedPrefix. An up-to-date fingerprint must be provided in order to update the PublicAdvertisedPrefix, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a PublicAdvertisedPrefix.", + "format": "byte", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource type. The server generates this identifier.", + "format": "uint64", + "type": "string" + }, + "ipCidrRange": { + "description": "The IPv4 address range, in CIDR format, represented by this public advertised prefix.", + "type": "string" + }, + "kind": { + "default": "compute#publicAdvertisedPrefix", + "description": "[Output Only] Type of the resource. Always compute#publicAdvertisedPrefix for public advertised prefixes.", + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "compute.publicAdvertisedPrefixes.insert" + ] + }, + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "publicDelegatedPrefixs": { + "description": "[Output Only] The list of public delegated prefixes that exist for this public advertised prefix.", + "items": { + "$ref": "PublicAdvertisedPrefixPublicDelegatedPrefix" + }, + "type": "array" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL with id for the resource.", + "type": "string" + }, + "sharedSecret": { + "description": "[Output Only] The shared secret to be used for reverse DNS verification.", + "type": "string" + }, + "status": { + "description": "The status of the public advertised prefix.", + "enum": [ + "INITIAL", + "PREFIX_CONFIGURATION_COMPLETE", + "PREFIX_CONFIGURATION_IN_PROGRESS", + "PREFIX_REMOVAL_IN_PROGRESS", + "PTR_CONFIGURED", + "REVERSE_DNS_LOOKUP_FAILED", + "VALIDATED" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "PublicAdvertisedPrefixList": { + "id": "PublicAdvertisedPrefixList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of PublicAdvertisedPrefix resources.", + "items": { + "$ref": "PublicAdvertisedPrefix" + }, + "type": "array" + }, + "kind": { + "default": "compute#publicAdvertisedPrefixList", + "description": "[Output Only] Type of the resource. Always compute#publicAdvertisedPrefix for public advertised prefixes.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PublicAdvertisedPrefixPublicDelegatedPrefix": { + "description": "Represents a CIDR range which can be used to assign addresses.", + "id": "PublicAdvertisedPrefixPublicDelegatedPrefix", + "properties": { + "name": { + "description": "The name of the public delegated prefix", + "type": "string" + }, + "region": { + "description": "The region of the public delegated prefix if it is regional. If absent, the prefix is global.", + "type": "string" + }, + "status": { + "description": "The status of the public delegated prefix. Possible values are: ACTIVE: The public delegated prefix is active DRAINED: The public delegated prefix is drained.", + "type": "string" + } + }, + "type": "object" + }, + "PublicDelegatedPrefix": { + "description": "A PublicDelegatedPrefix resource represents an IP block within a PublicAdvertisedPrefix that is configured within a single cloud scope (global or region). IPs in the block can be allocated to resources within that scope. Public delegated prefixes may be further broken up into smaller IP blocks in the same scope as the parent block.", + "id": "PublicDelegatedPrefix", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "fingerprint": { + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a new PublicDelegatedPrefix. An up-to-date fingerprint must be provided in order to update the PublicDelegatedPrefix, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a PublicDelegatedPrefix.", + "format": "byte", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource type. The server generates this identifier.", + "format": "uint64", + "type": "string" + }, + "ipCidrRange": { + "description": "The IPv4 address range, in CIDR format, represented by this public delegated prefix.", + "type": "string" + }, + "kind": { + "default": "compute#publicDelegatedPrefix", + "description": "[Output Only] Type of the resource. Always compute#publicDelegatedPrefix for public delegated prefixes.", + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "compute.publicDelegatedPrefixes.insert" + ] + }, + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "parentPrefix": { + "description": "The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix.", + "type": "string" + }, + "publicDelegatedSubPrefixs": { + "description": "The list of sub public delegated prefixes that exist for this public delegated prefix.", + "items": { + "$ref": "PublicDelegatedPrefixPublicDelegatedSubPrefix" + }, + "type": "array" + }, + "region": { + "description": "[Output Only] URL of the region where the public delegated prefix resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL with id for the resource.", + "type": "string" + }, + "status": { + "description": "[Output Only] The status of the public delegated prefix.", + "type": "any" + } + }, + "type": "object" + }, + "PublicDelegatedPrefixAggregatedList": { + "id": "PublicDelegatedPrefixAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "PublicDelegatedPrefixesScopedList", + "description": "[Output Only] Name of the scope containing this set of PublicDelegatedPrefixes." + }, + "description": "A list of PublicDelegatedPrefixesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#publicDelegatedPrefixAggregatedList", + "description": "[Output Only] Type of the resource. Always compute#publicDelegatedPrefixAggregatedList for aggregated lists of public delegated prefixes.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PublicDelegatedPrefixList": { + "id": "PublicDelegatedPrefixList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of PublicDelegatedPrefix resources.", + "items": { + "$ref": "PublicDelegatedPrefix" + }, + "type": "array" + }, + "kind": { + "default": "compute#publicDelegatedPrefixList", + "description": "[Output Only] Type of the resource. Always compute#publicDelegatedPrefixList for public delegated prefixes.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PublicDelegatedPrefixPublicDelegatedSubPrefix": { + "description": "Represents a sub PublicDelegatedPrefix.", + "id": "PublicDelegatedPrefixPublicDelegatedSubPrefix", + "properties": { + "delegateeProject": { + "description": "Name of the project scoping this PublicDelegatedSubPrefix.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "ipCidrRange": { + "description": "The IPv4 address range, in CIDR format, represented by this sub public delegated prefix.", + "type": "string" + }, + "isAddress": { + "description": "Whether the sub prefix is delegated to create Address resources in the delegatee project.", + "type": "boolean" + }, + "name": { + "description": "The name of the sub public delegated prefix.", + "type": "string" + }, + "region": { + "description": "[Output Only] The region of the sub public delegated prefix if it is regional. If absent, the sub prefix is global.", + "type": "string" + }, + "status": { + "description": "[Output Only] The status of the sub public delegated prefix.", + "type": "any" + } + }, + "type": "object" + }, + "PublicDelegatedPrefixesScopedList": { + "id": "PublicDelegatedPrefixesScopedList", + "properties": { + "publicDelegatedPrefixes": { + "description": "[Output Only] A list of PublicDelegatedPrefixes contained in this scope.", + "items": { + "$ref": "PublicDelegatedPrefix" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning which replaces the list of public delegated prefixes when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "Quota": { "description": "A quotas entry.", "id": "Quota", @@ -45492,7 +48675,17 @@ "AUTOSCALERS", "BACKEND_BUCKETS", "BACKEND_SERVICES", + "C2_CPUS", "COMMITMENTS", + "COMMITTED_C2_CPUS", + "COMMITTED_CPUS", + "COMMITTED_LOCAL_SSD_TOTAL_GB", + "COMMITTED_N2_CPUS", + "COMMITTED_NVIDIA_K80_GPUS", + "COMMITTED_NVIDIA_P100_GPUS", + "COMMITTED_NVIDIA_P4_GPUS", + "COMMITTED_NVIDIA_T4_GPUS", + "COMMITTED_NVIDIA_V100_GPUS", "CPUS", "CPUS_ALL_REGIONS", "DISKS_TOTAL_GB", @@ -45511,6 +48704,7 @@ "INTERCONNECTS", "INTERCONNECT_ATTACHMENTS_PER_REGION", "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS", + "INTERCONNECT_TOTAL_GBPS", "INTERNAL_ADDRESSES", "INTERNAL_FORWARDING_RULES_PER_NETWORK", "INTERNAL_FORWARDING_RULES_WITH_GLOBAL_ACCESS_PER_NETWORK", @@ -45522,6 +48716,7 @@ "IN_USE_SNAPSHOT_SCHEDULES", "LOCAL_SSD_TOTAL_GB", "MACHINE_IMAGES", + "N2_CPUS", "NETWORKS", "NETWORK_ENDPOINT_GROUPS", "NVIDIA_K80_GPUS", @@ -45545,10 +48740,12 @@ "PRIVATE_V6_ACCESS_SUBNETWORKS", "REGIONAL_AUTOSCALERS", "REGIONAL_INSTANCE_GROUP_MANAGERS", + "RESERVATIONS", "RESOURCE_POLICIES", "ROUTERS", "ROUTES", "SECURITY_POLICIES", + "SECURITY_POLICY_CEVAL_RULES", "SECURITY_POLICY_RULES", "SNAPSHOTS", "SSD_TOTAL_GB", @@ -45646,6 +48843,20 @@ "", "", "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -45711,7 +48922,7 @@ "type": "object" }, "Region": { - "description": "Region resource. (== resource_for beta.regions ==) (== resource_for v1.regions ==)", + "description": "Represents a Region resource.\n\nA region is a geographical area where a resource is located. For more information, read Regions and Zones. (== resource_for beta.regions ==) (== resource_for v1.regions ==)", "id": "Region", "properties": { "creationTimestamp": { @@ -45893,7 +49104,7 @@ "id": "RegionCommitmentsUpdateReservationsRequest", "properties": { "reservations": { - "description": "List of reservations for the capacity move of VMs with accelerators and local ssds.", + "description": "List of two reservations to transfer GPUs and local SSD between.", "items": { "$ref": "Reservation" }, @@ -46166,13 +49377,6 @@ "description": "RegionInstanceGroupManagers.deletePerInstanceConfigs", "id": "RegionInstanceGroupManagerDeleteInstanceConfigReq", "properties": { - "instances": { - "description": "The list of instances for which we want to delete per-instance configs on this managed instance group.", - "items": { - "type": "string" - }, - "type": "array" - }, "names": { "description": "The list of instance names for which we want to delete per-instance configs on this managed instance group.", "items": { @@ -46341,7 +49545,7 @@ "id": "RegionInstanceGroupManagersApplyUpdatesRequest", "properties": { "instances": { - "description": "The list of instances for which we want to apply changes on this managed instance group.", + "description": "The list of URLs of one or more instances for which you want to apply updates. Each URL can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" }, @@ -46364,7 +49568,7 @@ "type": "string" }, "minimalAction": { - "description": "The minimal action that should be perfomed on the instances. By default NONE.", + "description": "The minimal action that you want to perform on each instance during the update: \n- REPLACE: At minimum, delete the instance and create it again. \n- RESTART: Stop the instance and start it again. \n- REFRESH: Do not stop the instance. \n- NONE: Do not disrupt the instance at all. By default, the minimum action is NONE. If your update requires a more disruptive action than you set with this flag, the necessary action is performed to execute the update.", "enum": [ "NONE", "REFRESH", @@ -46380,7 +49584,7 @@ "type": "string" }, "mostDisruptiveAllowedAction": { - "description": "The most disruptive action that allowed to be performed on the instances. By default REPLACE.", + "description": "The most disruptive action that you want to perform on each instance during the update: \n- REPLACE: Delete the instance and create it again. \n- RESTART: Stop the instance and start it again. \n- REFRESH: Do not stop the instance. \n- NONE: Do not disrupt the instance at all. By default, the most disruptive allowed action is REPLACE. If your update requires a more disruptive action than you set with this flag, the update request will fail.", "enum": [ "NONE", "REFRESH", @@ -46425,6 +49629,23 @@ }, "type": "object" }, + "RegionInstanceGroupManagersListErrorsResponse": { + "id": "RegionInstanceGroupManagersListErrorsResponse", + "properties": { + "items": { + "description": "[Output Only] The list of errors of the managed instance group.", + "items": { + "$ref": "InstanceManagedByIgmError" + }, + "type": "array" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + } + }, + "type": "object" + }, "RegionInstanceGroupManagersListInstanceConfigsResp": { "id": "RegionInstanceGroupManagersListInstanceConfigsResp", "properties": { @@ -46932,11 +50153,11 @@ "type": "object" }, "Reservation": { - "description": "Reservation resource", + "description": "Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for beta.reservations ==) (== resource_for v1.reservations ==)", "id": "Reservation", "properties": { "commitment": { - "description": "[OutputOnly] Full or partial url for parent commitment for reservations which are tied to a commitment.", + "description": "[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.", "type": "string" }, "creationTimestamp": { @@ -46980,18 +50201,36 @@ "description": "Reservation for instances with specific machine shapes." }, "specificReservationRequired": { - "description": "Indicates whether the reservation can be consumed by VMs with \"any reservation\" defined. If the field is set, then only VMs that target the reservation by name using --reservation-affinity can consume this reservation.", + "description": "Indicates whether the reservation can be consumed by VMs with affinity for \"any\" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.", "type": "boolean" }, + "status": { + "description": "[Output Only] The status of the reservation.", + "enum": [ + "CREATING", + "DELETING", + "INVALID", + "READY", + "UPDATING" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, "zone": { - "description": "Zone in which the reservation resides, must be provided if reservation is created with commitment creation.", + "description": "Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.", "type": "string" } }, "type": "object" }, "ReservationAffinity": { - "description": "AllocationAffinity is the configuration of desired allocation which this instance could take capacity from.", + "description": "Specifies the reservations that this instance can consume from.", "id": "ReservationAffinity", "properties": { "consumeReservationType": { @@ -47011,11 +50250,11 @@ "type": "string" }, "key": { - "description": "Corresponds to the label key of reservation resource.", + "description": "Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.", "type": "string" }, "values": { - "description": "Corresponds to the label values of reservation resource.", + "description": "Corresponds to the label values of a reservation resource.", "items": { "type": "string" }, @@ -47703,6 +50942,23 @@ "description": "A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation as well as network locality", "id": "ResourcePolicyGroupPlacementPolicy", "properties": { + "availabilityDomainCount": { + "description": "The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network", + "format": "int32", + "type": "integer" + }, + "distribution": { + "description": "Distribution specifies how the instances are placed at host level. If set to SPREAD, no two instances will be put on the same host", + "enum": [ + "SPREAD", + "UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "locality": { "description": "Specifies network locality", "enum": [ @@ -47964,7 +51220,7 @@ "type": "object" }, "storageLocations": { - "description": "GCS bucket storage location of the auto snapshot (regional or multi-regional).", + "description": "Cloud Storage bucket storage location of the auto snapshot (regional or multi-regional).", "items": { "type": "string" }, @@ -47976,6 +51232,9 @@ "ResourcePolicyVmMaintenancePolicy": { "id": "ResourcePolicyVmMaintenancePolicy", "properties": { + "concurrencyControlGroup": { + "$ref": "ResourcePolicyVmMaintenancePolicyConcurrencyControl" + }, "maintenanceWindow": { "$ref": "ResourcePolicyVmMaintenancePolicyMaintenanceWindow", "description": "Maintenance windows that are applied to VMs covered by this policy." @@ -47983,6 +51242,17 @@ }, "type": "object" }, + "ResourcePolicyVmMaintenancePolicyConcurrencyControl": { + "description": "A concurrency control configuration. Defines a group config that, when attached to an instance, recognizes that instance as part of a group of instances where only up the concurrency_limit of instances in that group can undergo simultaneous maintenance. For more information: go/concurrency-control-design-doc", + "id": "ResourcePolicyVmMaintenancePolicyConcurrencyControl", + "properties": { + "concurrencyLimit": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "ResourcePolicyVmMaintenancePolicyMaintenanceWindow": { "description": "A maintenance window for VMs. When set, we restrict our maintenance operations to this window.", "id": "ResourcePolicyVmMaintenancePolicyMaintenanceWindow", @@ -48046,7 +51316,7 @@ "type": "object" }, "Route": { - "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving an instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, an instance gateway, or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped. (== resource_for beta.routes ==) (== resource_for v1.routes ==)", + "description": "Represents a Route resource.\n\nA route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for beta.routes ==) (== resource_for v1.routes ==)", "id": "Route", "properties": { "creationTimestamp": { @@ -48054,7 +51324,7 @@ "type": "string" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "destRange": { @@ -48082,7 +51352,7 @@ "compute.routes.insert" ] }, - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -48096,11 +51366,11 @@ "type": "string" }, "nextHopGateway": { - "description": "The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/\u003cproject-id\u003e/global/gateways/default-internet-gateway", + "description": "The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway", "type": "string" }, "nextHopIlb": { - "description": "The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule \n- regions/region/forwardingRules/forwardingRule Note that this can only be used when the destination_range is a public (non-RFC 1918) IP CIDR range.", + "description": "The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule \n- regions/region/forwardingRules/forwardingRule", "type": "string" }, "nextHopInstance": { @@ -48133,7 +51403,7 @@ "compute.routes.insert" ] }, - "description": "The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.", + "description": "The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive.", "format": "uint32", "type": "integer" }, @@ -48357,7 +51627,7 @@ "type": "object" }, "Router": { - "description": "Router resource.", + "description": "Represents a Cloud Router resource.\n\nFor more information about Cloud Router, read the the Cloud Router overview.", "id": "Router", "properties": { "bgp": { @@ -48698,11 +51968,21 @@ "type": "string" }, "name": { - "description": "Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.", + "annotations": { + "required": [ + "compute.routers.insert" + ] + }, + "description": "Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, "peerAsn": { + "annotations": { + "required": [ + "compute.routers.insert" + ] + }, "description": "Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.", "format": "uint32", "type": "integer" @@ -48718,12 +51998,12 @@ "id": "RouterBgpPeerBfd", "properties": { "minReceiveInterval": { - "description": "The minimum interval, in milliseconds, between BFD packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If BFD echo mode is enabled on this router and the peer router, this value is used to negotiate the interval between BFD echo packets transmitted by the peer router. Otherwise, it will be used to determine the interval between BFD control packets. If set, this value must be between 33 and 30000. The default is 300.", + "description": "The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.", "format": "uint32", "type": "integer" }, "minTransmitInterval": { - "description": "The minimum interval, in milliseconds, between BFD packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If BFD echo mode is enabled on this router and the peer router, this value is used to negotiate the interval between BFD echo packets transmitted by this router. Otherwise, it will be used to determine the interval between BFD control packets. If set, this value must be between 33 and 30000. The default is 300.", + "description": "The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.", "format": "uint32", "type": "integer" }, @@ -48808,7 +52088,12 @@ "type": "string" }, "name": { - "description": "Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.", + "annotations": { + "required": [ + "compute.routers.insert" + ] + }, + "description": "Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" } @@ -49024,7 +52309,7 @@ "type": "boolean" }, "filter": { - "description": "Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.", + "description": "Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values: \n- ERRORS_ONLY: Export logs only for connection failures. \n- TRANSLATIONS_ONLY: Export logs only for successful connections. \n- ALL: Export logs for all connections, successful and unsuccessful.", "enum": [ "ALL", "ERRORS_ONLY", @@ -49121,6 +52406,9 @@ }, "type": "array" }, + "bfdStatus": { + "$ref": "BfdStatus" + }, "ipAddress": { "description": "IP address of the local BGP interface.", "type": "string" @@ -49183,14 +52471,14 @@ "type": "array" }, "drainAutoAllocatedNatIps": { - "description": "A list of IPs auto-allocated for NAT that are in drain mode. Example: [\"1.1.1.1\", ?179.12.26.133?].", + "description": "A list of IPs auto-allocated for NAT that are in drain mode. Example: [\"1.1.1.1\", \"179.12.26.133\"].", "items": { "type": "string" }, "type": "array" }, "drainUserAllocatedNatIps": { - "description": "A list of IPs user-allocated for NAT that are in drain mode. Example: [\"1.1.1.1\", ?179.12.26.133?].", + "description": "A list of IPs user-allocated for NAT that are in drain mode. Example: [\"1.1.1.1\", \"179.12.26.133\"].", "items": { "type": "string" }, @@ -49572,7 +52860,7 @@ "type": "object" }, "Scheduling": { - "description": "Sets the scheduling options for an Instance.", + "description": "Sets the scheduling options for an Instance. NextID: 9", "id": "Scheduling", "properties": { "automaticRestart": { @@ -49583,13 +52871,17 @@ "description": "Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.", "type": "boolean" }, + "locationHint": { + "description": "An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.", + "type": "string" + }, "minNodeCpus": { "description": "The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.", "format": "int32", "type": "integer" }, "nodeAffinities": { - "description": "A set of node affinity and anti-affinity.", + "description": "A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information.", "items": { "$ref": "SchedulingNodeAffinity" }, @@ -49623,7 +52915,7 @@ "type": "string" }, "operator": { - "description": "Defines the operation of node selection.", + "description": "Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.", "enum": [ "IN", "NOT_IN", @@ -49676,7 +52968,7 @@ "type": "object" }, "SecurityPolicy": { - "description": "A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==)", + "description": "Represents a Cloud Armor Security Policy resource.\n\nOnly external backend services that use load balancers can reference a Security Policy. For more information, read Cloud Armor Security Policy Concepts. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==)", "id": "SecurityPolicy", "properties": { "associations": { @@ -49686,6 +52978,9 @@ }, "type": "array" }, + "cloudArmorConfig": { + "$ref": "SecurityPolicyCloudArmorConfig" + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -49779,6 +53074,17 @@ }, "type": "object" }, + "SecurityPolicyCloudArmorConfig": { + "description": "Configuration options for Cloud Armor.", + "id": "SecurityPolicyCloudArmorConfig", + "properties": { + "enableMl": { + "description": "If set to true, enables Cloud Armor Machine Learning.", + "type": "boolean" + } + }, + "type": "object" + }, "SecurityPolicyList": { "id": "SecurityPolicyList", "properties": { @@ -50082,10 +53388,6 @@ "clientTlsSettings": { "$ref": "ClientTlsSettings", "description": "TLS Settings for the backend service." - }, - "serverSettingsSelector": { - "$ref": "ServerSecuritySettingsSelector", - "description": "The listener config of the XDS client is generated if the selector matches the client." } }, "type": "object" @@ -50139,25 +53441,6 @@ }, "type": "object" }, - "ServerSecuritySettingsSelector": { - "description": "A selector associated with the SecuritySettings. If the labels and port in this selector match the Envoy's label and port, the server side authentication and authorization settings are applied to the Envoy.", - "id": "ServerSecuritySettingsSelector", - "properties": { - "labelMatches": { - "description": "The labels associated with the XDS client.", - "items": { - "$ref": "MetadataFilterLabelMatch" - }, - "type": "array" - }, - "port": { - "description": "The listener port of the XDS client.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "ServerTlsSettings": { "description": "The TLS settings for the server.", "id": "ServerTlsSettings", @@ -50208,22 +53491,6 @@ }, "type": "object" }, - "ServiceAccountJwtAccessCredentials": { - "description": "JWT credentials for a service account.", - "id": "ServiceAccountJwtAccessCredentials", - "properties": { - "jsonKey": { - "description": "Service account key.", - "type": "string" - }, - "tokenLifetimeSeconds": { - "description": "The token lifetime seconds.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, "ShieldedInstanceConfig": { "description": "A set of Shielded Instance options.", "id": "ShieldedInstanceConfig", @@ -50249,7 +53516,7 @@ "properties": { "encryptionKey": { "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Endorsement Key (EK) issued to the Shielded Instance's vTPM." + "description": "An Endorsement Key (EK) made by the RSA 2048 algorithm issued to the Shielded Instance's vTPM." }, "kind": { "default": "compute#shieldedInstanceIdentity", @@ -50258,7 +53525,7 @@ }, "signingKey": { "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Attestation Key (AK) issued to the Shielded Instance's vTPM." + "description": "An Attestation Key (AK) made by the RSA 2048 algorithm issued to the Shielded Instance's vTPM." } }, "type": "object" @@ -50371,11 +53638,11 @@ "type": "object" }, "Snapshot": { - "description": "A persistent disk snapshot resource. (== resource_for beta.snapshots ==) (== resource_for v1.snapshots ==)", + "description": "Represents a Persistent Disk Snapshot resource.\n\nYou can use snapshots to back up data on a regular interval. For more information, read Creating persistent disk snapshots. (== resource_for beta.snapshots ==) (== resource_for v1.snapshots ==)", "id": "Snapshot", "properties": { "autoCreated": { - "description": "[Output Only] Set to true if snapshots are automatically by applying resource policy on the target disk.", + "description": "[Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk.", "type": "boolean" }, "creationTimestamp": { @@ -50387,7 +53654,7 @@ "type": "string" }, "diskSizeGb": { - "description": "[Output Only] Size of the snapshot, specified in GB.", + "description": "[Output Only] Size of the source disk, specified in GB.", "format": "int64", "type": "string" }, @@ -50500,7 +53767,7 @@ "type": "string" }, "storageLocations": { - "description": "GCS bucket storage location of the snapshot (regional or multi-regional).", + "description": "Cloud Storage bucket storage location of the snapshot (regional or multi-regional).", "items": { "type": "string" }, @@ -50621,6 +53888,20 @@ }, "type": "object" }, + "SourceDiskEncryptionKey": { + "id": "SourceDiskEncryptionKey", + "properties": { + "diskEncryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key." + }, + "sourceDisk": { + "description": "URL of the disk attached to the source instance. This can be a full or valid partial URL. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n- projects/project/zones/zone/disks/disk \n- zones/zone/disks/disk", + "type": "string" + } + }, + "type": "object" + }, "SourceInstanceParams": { "description": "A specification of the parameters to use when creating the instance template from a source instance.", "id": "SourceInstanceParams", @@ -50710,7 +53991,7 @@ "type": "object" }, "SslCertificate": { - "description": "An SslCertificate resource. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user. (== resource_for beta.sslCertificates ==) (== resource_for v1.sslCertificates ==)", + "description": "Represents an SSL Certificate resource.\n\nThis SSL certificate resource also contains a private key. You can use SSL keys and certificates to secure connections to a load balancer. For more information, read Creating and Using SSL Certificates. (== resource_for beta.sslCertificates ==) (== resource_for v1.sslCertificates ==)", "id": "SslCertificate", "properties": { "certificate": { @@ -51308,7 +54589,7 @@ "type": "object" }, "SslPolicy": { - "description": "A SSL policy specifies the server-side support for SSL features. This can be attached to a TargetHttpsProxy or a TargetSslProxy. This affects connections between clients and the HTTPS or SSL proxy load balancer. They do not affect the connection between the load balancers and the backends.", + "description": "Represents a Cloud Armor Security Policy resource.\n\nOnly external backend services used by HTTP or HTTPS load balancers can reference a Security Policy. For more information, read read Cloud Armor Security Policy Concepts. (== resource_for beta.sslPolicies ==) (== resource_for v1.sslPolicies ==)", "id": "SslPolicy", "properties": { "creationTimestamp": { @@ -51495,39 +54776,12 @@ "StatefulPolicy": { "id": "StatefulPolicy", "properties": { - "preservedResources": { - "$ref": "StatefulPolicyPreservedResources" - }, "preservedState": { "$ref": "StatefulPolicyPreservedState" } }, "type": "object" }, - "StatefulPolicyPreservedDisk": { - "id": "StatefulPolicyPreservedDisk", - "properties": { - "deviceName": { - "description": "Device name of the disk to be preserved", - "type": "string" - } - }, - "type": "object" - }, - "StatefulPolicyPreservedResources": { - "description": "Configuration of all preserved resources.", - "id": "StatefulPolicyPreservedResources", - "properties": { - "disks": { - "description": "Disks created on the instances that will be preserved on instance delete, resize down, etc.", - "items": { - "$ref": "StatefulPolicyPreservedDisk" - }, - "type": "array" - } - }, - "type": "object" - }, "StatefulPolicyPreservedState": { "description": "Configuration of preserved resources.", "id": "StatefulPolicyPreservedState", @@ -51536,7 +54790,7 @@ "additionalProperties": { "$ref": "StatefulPolicyPreservedStateDiskDevice" }, - "description": "Disks created on the instances that will be preserved on instance delete, resize down, etc. This map is keyed with the device names of the disks.", + "description": "Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.", "type": "object" } }, @@ -51549,11 +54803,9 @@ "description": "These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.", "enum": [ "NEVER", - "ON_PERMANENT_INSTANCE_DELETION", - "WHEN_NOT_IN_USE" + "ON_PERMANENT_INSTANCE_DELETION" ], "enumDescriptions": [ - "", "", "" ], @@ -51563,7 +54815,7 @@ "type": "object" }, "Subnetwork": { - "description": "A Subnetwork resource. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==)", + "description": "Represents a Subnetwork resource.\n\nA subnetwork (also known as a subnet) is a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. For more information, read Virtual Private Cloud (VPC) Network. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==)", "id": "Subnetwork", "properties": { "aggregationInterval": { @@ -51672,23 +54924,34 @@ "enum": [ "DISABLE_GOOGLE_ACCESS", "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE", + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS" ], "enumDescriptions": [ + "", "", "", "" ], "type": "string" }, + "privateIpv6GoogleAccessServiceAccounts": { + "description": "The service accounts can be used to selectively turn on Private IPv6 Google Access only on the VMs primary service account matching the value. This value only takes effect when PrivateIpv6GoogleAccess is ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS or ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS.", + "items": { + "type": "string" + }, + "type": "array" + }, "purpose": { "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918.", "enum": [ + "AGGREGATE", "INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE", "PRIVATE_RFC_1918" ], "enumDescriptions": [ + "", "", "", "" @@ -52005,22 +55268,35 @@ "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging.", "type": "boolean" }, + "filterExpr": { + "description": "Can only be specified if VPC flow logs for this subnetwork is enabled. Export filter used to define which VPC flow logs should be logged.", + "type": "string" + }, "flowSampling": { "description": "Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default is 0.5, which means half of all collected logs are reported.", "format": "float", "type": "number" }, "metadata": { - "description": "Can only be specified if VPC flow logging for this subnetwork is enabled. Configures whether metadata fields should be added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA.", + "description": "Can only be specified if VPC flow logs for this subnetwork is enabled. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA.", "enum": [ + "CUSTOM_METADATA", "EXCLUDE_ALL_METADATA", "INCLUDE_ALL_METADATA" ], "enumDescriptions": [ + "", "", "" ], "type": "string" + }, + "metadataFields": { + "description": "Can only be specified if VPC flow logs for this subnetwork is enabled and \"metadata\" was set to CUSTOM_METADATA.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -52340,7 +55616,7 @@ "type": "object" }, "TargetHttpProxy": { - "description": "A TargetHttpProxy resource. This resource defines an HTTP proxy. (== resource_for beta.targetHttpProxies ==) (== resource_for v1.targetHttpProxies ==)", + "description": "Represents a Target HTTP Proxy resource.\n\nA target HTTP proxy is a component of certain types of load balancers. Global forwarding rules reference a target HTTP proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies. (== resource_for beta.targetHttpProxies ==) (== resource_for v1.targetHttpProxies ==)", "id": "TargetHttpProxy", "properties": { "creationTimestamp": { @@ -52741,7 +56017,7 @@ "type": "object" }, "TargetHttpsProxy": { - "description": "A TargetHttpsProxy resource. This resource defines an HTTPS proxy. (== resource_for beta.targetHttpsProxies ==) (== resource_for v1.targetHttpsProxies ==)", + "description": "Represents a Target HTTPS Proxy resource.\n\nA target HTTPS proxy is a component of certain types of load balancers. Global forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies. (== resource_for beta.targetHttpsProxies ==) (== resource_for v1.targetHttpsProxies ==)", "id": "TargetHttpsProxy", "properties": { "creationTimestamp": { @@ -52772,7 +56048,7 @@ "type": "boolean" }, "quicOverride": { - "description": "Specifies the QUIC override policy for this TargetHttpsProxy resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. Specify ENABLE to always enable QUIC, Enables QUIC when set to ENABLE, and disables QUIC when set to DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE. Not specifying this field is equivalent to specifying NONE.", + "description": "Specifies the QUIC override policy for this TargetHttpsProxy resource. This setting determines whether the load balancer attempts to negotiate QUIC with clients. You can specify NONE, ENABLE, or DISABLE. \n- When quic-override is set to NONE, Google manages whether QUIC is used. \n- When quic-override is set to ENABLE, the load balancer uses QUIC when possible. \n- When quic-override is set to DISABLE, the load balancer doesn't use QUIC. \n- If the quic-override flag is not specified, NONE is implied.\n-", "enum": [ "DISABLE", "ENABLE", @@ -52805,7 +56081,7 @@ "type": "array" }, "sslPolicy": { - "description": "URL of SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured.", + "description": "URL of SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource has no SSL policy configured.", "type": "string" }, "urlMap": { @@ -53040,7 +56316,7 @@ "type": "object" }, "TargetInstance": { - "description": "A TargetInstance resource. This resource defines an endpoint instance that terminates traffic of certain protocols. (== resource_for beta.targetInstances ==) (== resource_for v1.targetInstances ==)", + "description": "Represents a Target Instance resource.\n\nYou can use a target instance to handle traffic for one or more forwarding rules, which is ideal for forwarding protocol traffic that is managed by a single source. For example, ESP, AH, TCP, or UDP. For more information, read Target instances. (== resource_for beta.targetInstances ==) (== resource_for v1.targetInstances ==)", "id": "TargetInstance", "properties": { "creationTimestamp": { @@ -53414,7 +56690,7 @@ "type": "object" }, "TargetPool": { - "description": "A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool. (== resource_for beta.targetPools ==) (== resource_for v1.targetPools ==)", + "description": "Represents a Target Pool resource.\n\nTarget pools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool. For more information, read Using target pools. (== resource_for beta.targetPools ==) (== resource_for v1.targetPools ==)", "id": "TargetPool", "properties": { "backupPool": { @@ -53938,7 +57214,7 @@ "type": "object" }, "TargetSslProxy": { - "description": "A TargetSslProxy resource. This resource defines an SSL proxy. (== resource_for beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==)", + "description": "Represents a Target SSL Proxy resource.\n\nA target SSL proxy is a component of a SSL Proxy load balancer. Global forwarding rules reference a target SSL proxy, and the target proxy then references an external backend service. For more information, read Using Target Proxies. (== resource_for beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==)", "id": "TargetSslProxy", "properties": { "creationTimestamp": { @@ -54139,7 +57415,7 @@ "type": "object" }, "TargetTcpProxy": { - "description": "A TargetTcpProxy resource. This resource defines a TCP proxy. (== resource_for beta.targetTcpProxies ==) (== resource_for v1.targetTcpProxies ==)", + "description": "Represents a Target TCP Proxy resource.\n\nA target TCP proxy is a component of a TCP Proxy load balancer. Global forwarding rules reference target TCP proxy, and the target proxy then references an external backend service. For more information, read TCP Proxy Load Balancing Concepts. (== resource_for beta.targetTcpProxies ==) (== resource_for v1.targetTcpProxies ==)", "id": "TargetTcpProxy", "properties": { "creationTimestamp": { @@ -54301,7 +57577,7 @@ "type": "object" }, "TargetVpnGateway": { - "description": "Represents a Target VPN gateway resource. (== resource_for beta.targetVpnGateways ==) (== resource_for v1.targetVpnGateways ==)", + "description": "Represents a Target VPN Gateway resource.\n\nThe target VPN gateway resource represents a Classic Cloud VPN gateway. For more information, read the the Cloud VPN Overview. (== resource_for beta.targetVpnGateways ==) (== resource_for v1.targetVpnGateways ==)", "id": "TargetVpnGateway", "properties": { "creationTimestamp": { @@ -54868,7 +58144,7 @@ "type": "object" }, "UrlMap": { - "description": "A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the \"longest-match\" of the URL's host and path.", + "description": "Represents a URL Map resource.\n\nA URL map resource is a component of certain types of load balancers. This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.\n\nTo use this resource, the backend service must have a loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED For more information, read URL Map Concepts.", "id": "UrlMap", "properties": { "creationTimestamp": { @@ -56206,7 +59482,7 @@ "type": "object" }, "VpnTunnel": { - "description": "VPN tunnel resource. (== resource_for beta.vpnTunnels ==) (== resource_for v1.vpnTunnels ==)", + "description": "Represents a Cloud VPN Tunnel resource.\n\nFor more information about VPN, read the the Cloud VPN Overview. (== resource_for beta.vpnTunnels ==) (== resource_for v1.vpnTunnels ==)", "id": "VpnTunnel", "properties": { "creationTimestamp": { @@ -56310,7 +59586,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of the VPN tunnel, which can be one of the following: \n- PROVISIONING: Resource is being allocated for the VPN tunnel. \n- WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. \n- FIRST_HANDSHAKE: Successful first handshake with the peer VPN. \n- ESTABLISHED: Secure session is successfully established with the peer VPN. \n- NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS \n- AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). \n- NEGOTIATION_FAILURE: Handshake failed. \n- DEPROVISIONING: Resources are being deallocated for the VPN tunnel. \n- FAILED: Tunnel creation has failed and the tunnel is not ready to be used.", + "description": "[Output Only] The status of the VPN tunnel, which can be one of the following: \n- PROVISIONING: Resource is being allocated for the VPN tunnel. \n- WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. \n- FIRST_HANDSHAKE: Successful first handshake with the peer VPN. \n- ESTABLISHED: Secure session is successfully established with the peer VPN. \n- NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS \n- AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). \n- NEGOTIATION_FAILURE: Handshake failed. \n- DEPROVISIONING: Resources are being deallocated for the VPN tunnel. \n- FAILED: Tunnel creation has failed and the tunnel is not ready to be used. \n- NO_INCOMING_PACKETS: No incoming packets from peer. \n- REJECTED: Tunnel configuration was rejected, can be result of being blacklisted. \n- ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. \n- STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. \n- PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. \n- TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.", "enum": [ "ALLOCATING_RESOURCES", "AUTHORIZATION_ERROR", @@ -56323,6 +59599,7 @@ "NO_INCOMING_PACKETS", "PROVISIONING", "REJECTED", + "STOPPED", "WAITING_FOR_FULL_CONFIG" ], "enumDescriptions": [ @@ -56337,6 +59614,7 @@ "", "", "", + "", "" ], "type": "string" @@ -56864,7 +60142,7 @@ "type": "object" }, "Zone": { - "description": "A Zone resource. (== resource_for beta.zones ==) (== resource_for v1.zones ==) Next ID: 17", + "description": "Represents a Zone resource.\n\nA zone is a deployment area. These deployment areas are subsets of a region. For example the zone us-east1-a is located in the us-east1 region. For more information, read Regions and Zones. (== resource_for beta.zones ==) (== resource_for v1.zones ==)", "id": "Zone", "properties": { "availableCpuPlatforms": { diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go b/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go index 187a2f021e7..f4b1fda0c9e 100644 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go @@ -53,8 +53,8 @@ import ( "strconv" "strings" - gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + gensupport "google.golang.org/api/internal/gensupport" option "google.golang.org/api/option" htransport "google.golang.org/api/transport/http" ) @@ -76,7 +76,7 @@ var _ = context.Canceled const apiId = "compute:alpha" const apiName = "compute" const apiVersion = "alpha" -const basePath = "https://www.googleapis.com/compute/alpha/projects/" +const basePath = "https://compute.googleapis.com/compute/alpha/projects/" // OAuth2 scopes used by this API. const ( @@ -150,6 +150,7 @@ func New(client *http.Client) (*Service, error) { s.GlobalNetworkEndpointGroups = NewGlobalNetworkEndpointGroupsService(s) s.GlobalOperations = NewGlobalOperationsService(s) s.GlobalOrganizationOperations = NewGlobalOrganizationOperationsService(s) + s.GlobalPublicDelegatedPrefixes = NewGlobalPublicDelegatedPrefixesService(s) s.HealthChecks = NewHealthChecksService(s) s.HttpHealthChecks = NewHttpHealthChecksService(s) s.HttpsHealthChecks = NewHttpsHealthChecksService(s) @@ -171,7 +172,10 @@ func New(client *http.Client) (*Service, error) { s.NodeTemplates = NewNodeTemplatesService(s) s.NodeTypes = NewNodeTypesService(s) s.OrganizationSecurityPolicies = NewOrganizationSecurityPoliciesService(s) + s.PacketMirrorings = NewPacketMirroringsService(s) s.Projects = NewProjectsService(s) + s.PublicAdvertisedPrefixes = NewPublicAdvertisedPrefixesService(s) + s.PublicDelegatedPrefixes = NewPublicDelegatedPrefixesService(s) s.RegionAutoscalers = NewRegionAutoscalersService(s) s.RegionBackendServices = NewRegionBackendServicesService(s) s.RegionCommitments = NewRegionCommitmentsService(s) @@ -247,6 +251,8 @@ type Service struct { GlobalOrganizationOperations *GlobalOrganizationOperationsService + GlobalPublicDelegatedPrefixes *GlobalPublicDelegatedPrefixesService + HealthChecks *HealthChecksService HttpHealthChecks *HttpHealthChecksService @@ -289,8 +295,14 @@ type Service struct { OrganizationSecurityPolicies *OrganizationSecurityPoliciesService + PacketMirrorings *PacketMirroringsService + Projects *ProjectsService + PublicAdvertisedPrefixes *PublicAdvertisedPrefixesService + + PublicDelegatedPrefixes *PublicDelegatedPrefixesService + RegionAutoscalers *RegionAutoscalersService RegionBackendServices *RegionBackendServicesService @@ -508,6 +520,15 @@ type GlobalOrganizationOperationsService struct { s *Service } +func NewGlobalPublicDelegatedPrefixesService(s *Service) *GlobalPublicDelegatedPrefixesService { + rs := &GlobalPublicDelegatedPrefixesService{s: s} + return rs +} + +type GlobalPublicDelegatedPrefixesService struct { + s *Service +} + func NewHealthChecksService(s *Service) *HealthChecksService { rs := &HealthChecksService{s: s} return rs @@ -697,6 +718,15 @@ type OrganizationSecurityPoliciesService struct { s *Service } +func NewPacketMirroringsService(s *Service) *PacketMirroringsService { + rs := &PacketMirroringsService{s: s} + return rs +} + +type PacketMirroringsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} return rs @@ -706,6 +736,24 @@ type ProjectsService struct { s *Service } +func NewPublicAdvertisedPrefixesService(s *Service) *PublicAdvertisedPrefixesService { + rs := &PublicAdvertisedPrefixesService{s: s} + return rs +} + +type PublicAdvertisedPrefixesService struct { + s *Service +} + +func NewPublicDelegatedPrefixesService(s *Service) *PublicDelegatedPrefixesService { + rs := &PublicDelegatedPrefixesService{s: s} + return rs +} + +type PublicDelegatedPrefixesService struct { + s *Service +} + func NewRegionAutoscalersService(s *Service) *RegionAutoscalersService { rs := &RegionAutoscalersService{s: s} return rs @@ -1078,7 +1126,12 @@ func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AcceleratorType: An Accelerator Type resource. (== resource_for +// AcceleratorType: Represents an Accelerator Type resource. +// +// Google Cloud Platform provides graphics processing units +// (accelerators) that you can add to VM instances to improve or +// accelerate performance when working with intensive workloads. For +// more information, read GPUs on Compute Engine. (== resource_for // beta.acceleratorTypes ==) (== resource_for v1.acceleratorTypes ==) type AcceleratorType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -1605,8 +1658,8 @@ type AccessConfig struct { Kind string `json:"kind,omitempty"` // Name: The name of this access configuration. The default and - // recommended name is External NAT but you can use any arbitrary string - // you would like. For example, My external IP or Network Access. + // recommended name is External NAT, but you can use any arbitrary + // string, such as My external IP or Network Access. Name string `json:"name,omitempty"` // NatIP: An external IP address associated with this instance. Specify @@ -1638,14 +1691,14 @@ type AccessConfig struct { PublicDnsName string `json:"publicDnsName,omitempty"` // PublicPtrDomainName: The DNS domain name for the public PTR record. - // This field can only be set when the set_public_ptr field is enabled. + // You can set this field only if the `setPublicPtr` field is enabled. PublicPtrDomainName string `json:"publicPtrDomainName,omitempty"` // SetPublicDns: Specifies whether a public DNS ?A? record should be // created for the external IP address of this access configuration. SetPublicDns bool `json:"setPublicDns,omitempty"` - // SetPublicPtr: Specifies whether a public DNS ?PTR? record should be + // SetPublicPtr: Specifies whether a public DNS 'PTR' record should be // created to map the external IP address of the instance to a DNS // domain name. SetPublicPtr bool `json:"setPublicPtr,omitempty"` @@ -1680,9 +1733,25 @@ func (s *AccessConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Address: A reserved address resource. (== resource_for beta.addresses -// ==) (== resource_for v1.addresses ==) (== resource_for -// beta.globalAddresses ==) (== resource_for v1.globalAddresses ==) +// Address: Represents an IP Address resource. +// +// An address resource represents a regional internal IP address. +// Regional internal IP addresses are RFC 1918 addresses that come from +// either a primary or secondary IP range of a subnet in a VPC network. +// Regional external IP addresses can be assigned to GCP VM instances, +// Cloud VPN gateways, regional external forwarding rules for network +// load balancers (in either Standard or Premium Tier), and regional +// external forwarding rules for HTTP(S), SSL Proxy, and TCP Proxy load +// balancers in Standard Tier. For more information, read IP +// addresses. +// +// A globalAddresses resource represent a global external IP address. +// Global external IP addresses are IPv4 or IPv6 addresses. They can +// only be assigned to global forwarding rules for HTTP(S), SSL Proxy, +// or TCP Proxy load balancers in Premium Tier. For more information, +// read Global resources. (== resource_for beta.addresses ==) (== +// resource_for v1.addresses ==) (== resource_for beta.globalAddresses +// ==) (== resource_for v1.globalAddresses ==) type Address struct { // Address: The static IP address represented by this resource. Address string `json:"address,omitempty"` @@ -1702,14 +1771,14 @@ type Address struct { CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional description of this resource. Provide this - // property when you create the resource. + // field when you create the resource. Description string `json:"description,omitempty"` // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // IpVersion: The IP Version that will be used by this address. Valid + // IpVersion: The IP version that will be used by this address. Valid // options are IPV4 or IPV6. This can only be specified for a global // address. // @@ -1743,23 +1812,24 @@ type Address struct { // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. Name string `json:"name,omitempty"` // Network: The URL of the network in which to reserve the address. This - // field can only be used with INTERNAL type with VPC_PEERING purpose. + // field can only be used with INTERNAL type with the VPC_PEERING + // purpose. Network string `json:"network,omitempty"` // NetworkTier: This signifies the networking tier used for configuring - // this Address and can only take the following values: PREMIUM, + // this address and can only take the following values: PREMIUM or // STANDARD. Global forwarding rules can only be Premium Tier. Regional // forwarding rules can be either Premium or Standard Tier. Standard // Tier addresses applied to regional forwarding rules can be used with // any external load balancer. Regional forwarding rules in Premium Tier - // can only be used with a Network load balancer. + // can only be used with a network load balancer. // // If this field is not specified, it is assumed to be PREMIUM. // @@ -1773,19 +1843,27 @@ type Address struct { // range. PrefixLength int64 `json:"prefixLength,omitempty"` - // Purpose: The purpose of resource, only used with INTERNAL type. + // Purpose: The purpose of this resource, which can be one of the + // following values: + // - `GCE_ENDPOINT` for addresses that are used by VM instances, alias + // IP ranges, internal load balancers, and similar resources. + // - `DNS_RESOLVER` for a DNS resolver address in a subnetwork + // - `VPC_PEERING` for addresses that are reserved for VPC peer + // networks. + // - `NAT_AUTO` for addresses that are external IP addresses + // automatically reserved for Cloud NAT. // // Possible values: // "DNS_RESOLVER" // "GCE_ENDPOINT" // "NAT_AUTO" + // "SHARED_LOADBALANCER_VIP" // "VPC_PEERING" Purpose string `json:"purpose,omitempty"` - // Region: [Output Only] URL of the region where the regional address - // resides. This field is not applicable to global addresses. You must - // specify this field as part of the HTTP request URL. You cannot set - // this field in the request body. + // Region: [Output Only] The URL of the region where the regional + // address resides. This field is not applicable to global addresses. + // You must specify this field as part of the HTTP request URL. Region string `json:"region,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -1810,7 +1888,7 @@ type Address struct { // Subnetwork: The URL of the subnetwork in which to reserve the // address. If an IP address is specified, it must be within the // subnetwork's IP range. This field can only be used with INTERNAL type - // with GCE_ENDPOINT/DNS_RESOLVER purposes. + // with a GCE_ENDPOINT or DNS_RESOLVER purpose. Subnetwork string `json:"subnetwork,omitempty"` // Users: [Output Only] The URLs of the resources that are using this @@ -2290,17 +2368,17 @@ func (s *AddressesScopedListWarningData) MarshalJSON() ([]byte, error) { // AliasIpRange: An alias IP range attached to an instance's network // interface. type AliasIpRange struct { - // IpCidrRange: The IP CIDR range represented by this alias IP range. - // This IP CIDR range must belong to the specified subnetwork and cannot + // IpCidrRange: The IP alias ranges to allocate for this interface. This + // IP CIDR range must belong to the specified subnetwork and cannot // contain IP addresses reserved by system or used by other network - // interfaces. This range may be a single IP address (e.g. 10.2.3.4), a - // netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). + // interfaces. This range may be a single IP address (such as 10.2.3.4), + // a netmask (such as /24) or a CIDR-formatted string (such as + // 10.1.2.0/24). IpCidrRange string `json:"ipCidrRange,omitempty"` - // SubnetworkRangeName: Optional subnetwork secondary range name - // specifying the secondary range from which to allocate the IP CIDR - // range for this alias IP range. If left unspecified, the primary range - // of the subnetwork will be used. + // SubnetworkRangeName: The name of a subnetwork secondary IP range from + // which to allocate an IP alias range. If not specified, the primary + // range of the subnetwork is used. SubnetworkRangeName string `json:"subnetworkRangeName,omitempty"` // ForceSendFields is a list of field names (e.g. "IpCidrRange") to @@ -2410,14 +2488,13 @@ func (s *AllocationSpecificSKUAllocationReservedInstanceProperties) MarshalJSON( // AllocationSpecificSKUReservation: This reservation type allows to pre // allocate specific instance configuration. type AllocationSpecificSKUReservation struct { - // Count: Specifies number of resources that are allocated. + // Count: Specifies the number of resources that are allocated. Count int64 `json:"count,omitempty,string"` - // InUseCount: [OutputOnly] Indicates how many resource are in use. + // InUseCount: [Output Only] Indicates how many instances are in use. InUseCount int64 `json:"inUseCount,omitempty,string"` - // InstanceProperties: The instance properties for this specific sku - // reservation. + // InstanceProperties: The instance properties for the reservation. InstanceProperties *AllocationSpecificSKUAllocationReservedInstanceProperties `json:"instanceProperties,omitempty"` // ForceSendFields is a list of field names (e.g. "Count") to @@ -2517,7 +2594,8 @@ type AttachedDisk struct { // disks must always use SCSI and the request will fail if you attempt // to attach a persistent disk in any other format than SCSI. Local SSDs // can use either NVME or SCSI. For performance characteristics of SCSI - // over NVMe, see Local SSD performance. + // over NVMe, see Local SSD performance. TODO(b/131765817): Update + // documentation when NVME is supported. // // Possible values: // "NVDIMM" @@ -2557,8 +2635,8 @@ type AttachedDisk struct { // Source: Specifies a valid partial or full URL to an existing // Persistent Disk resource. When creating a new instance, one of - // initializeParams.sourceImage or disks.source is required except for - // local SSD. + // initializeParams.sourceImage or initializeParams.sourceSnapshot or + // disks.source is required except for local SSD. // // If desired, you can also attach existing non-root persistent disks // using this property. This field is only applicable for persistent @@ -2617,7 +2695,9 @@ type AttachedDiskInitializeParams struct { // automatically generated. DiskName string `json:"diskName,omitempty"` - // DiskSizeGb: Specifies the size of the disk in base-2 GB. + // DiskSizeGb: Specifies the size of the disk in base-2 GB. If not + // specified, the disk will be the same size as the image (usually + // 10GB). If specified, the size must be equal to or larger than 10GB. DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` // DiskType: Specifies the disk type to use to create the instance. If @@ -2651,6 +2731,15 @@ type AttachedDiskInitializeParams struct { // persistent disks. Labels map[string]string `json:"labels,omitempty"` + // OnUpdateAction: Specifies which action to take on instance update + // with this disk. Default is to use the existing disk. + // + // Possible values: + // "RECREATE_DISK" + // "RECREATE_DISK_IF_SOURCE_CHANGED" + // "USE_EXISTING_DISK" + OnUpdateAction string `json:"onUpdateAction,omitempty"` + // ReplicaZones: URLs of the zones where the disk should be replicated // to. Only applicable for regional resources. ReplicaZones []string `json:"replicaZones,omitempty"` @@ -2661,8 +2750,9 @@ type AttachedDiskInitializeParams struct { ResourcePolicies []string `json:"resourcePolicies,omitempty"` // SourceImage: The source image to create this disk. When creating a - // new instance, one of initializeParams.sourceImage or disks.source is - // required except for local SSD. + // new instance, one of initializeParams.sourceImage or + // initializeParams.sourceSnapshot or disks.source is required except + // for local SSD. // // To create a disk with one of the public operating system images, // specify the image by its family name. For example, specify @@ -2705,7 +2795,8 @@ type AttachedDiskInitializeParams struct { // SourceSnapshot: The source snapshot to create this disk. When // creating a new instance, one of initializeParams.sourceSnapshot or - // disks.source is required except for local SSD. + // initializeParams.sourceImage or disks.source is required except for + // local SSD. // // To create a disk with a snapshot that you created, specify the // snapshot name in the following @@ -2757,15 +2848,15 @@ func (s *AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) { // // { "audit_configs": [ { "service": "allServices" "audit_log_configs": // [ { "log_type": "DATA_READ", "exempted_members": [ -// "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { +// "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { // "log_type": "ADMIN_READ", } ] }, { "service": -// "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": +// "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": // "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ -// "user:bar@gmail.com" ] } ] } ] } +// "user:aliya@example.com" ] } ] } ] } // -// For fooservice, this policy enables DATA_READ, DATA_WRITE and -// ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ -// logging, and bar@gmail.com from DATA_WRITE logging. +// For sampleservice, this policy enables DATA_READ, DATA_WRITE and +// ADMIN_READ logging. It also exempts jose@example.com from DATA_READ +// logging, and aliya@example.com from DATA_WRITE logging. type AuditConfig struct { // AuditLogConfigs: The configuration for logging of each type of // permission. @@ -2806,17 +2897,19 @@ func (s *AuditConfig) MarshalJSON() ([]byte, error) { // permissions. Example: // // { "audit_log_configs": [ { "log_type": "DATA_READ", -// "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": +// "exempted_members": [ "user:jose@example.com" ] }, { "log_type": // "DATA_WRITE", } ] } // // This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting -// foo@gmail.com from DATA_READ logging. +// jose@example.com from DATA_READ logging. type AuditLogConfig struct { // ExemptedMembers: Specifies the identities that do not cause logging // for this type of permission. Follows the same format of // [Binding.members][]. ExemptedMembers []string `json:"exemptedMembers,omitempty"` + IgnoreChildExemptions bool `json:"ignoreChildExemptions,omitempty"` + // LogType: The log type that this config enables. // // Possible values: @@ -2977,13 +3070,21 @@ func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Autoscaler: Represents an Autoscaler resource. Autoscalers allow you -// to automatically scale virtual machine instances in managed instance -// groups according to an autoscaling policy that you define. For more -// information, read Autoscaling Groups of Instances. (== resource_for -// beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== -// resource_for beta.regionAutoscalers ==) (== resource_for -// v1.regionAutoscalers ==) +// Autoscaler: Represents an Autoscaler resource. +// +// +// +// Use autoscalers to automatically add or delete instances from a +// managed instance group according to your defined autoscaling policy. +// For more information, read Autoscaling Groups of Instances. +// +// For zonal managed instance groups resource, use the autoscaler +// resource. +// +// For regional managed instance groups, use the regionAutoscalers +// resource. (== resource_for beta.autoscalers ==) (== resource_for +// v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== +// resource_for v1.regionAutoscalers ==) type Autoscaler struct { // AutoscalingPolicy: The configuration parameters for the autoscaling // algorithm. You can define one or more of the policies for an @@ -3038,6 +3139,15 @@ type Autoscaler struct { SelfLinkWithId string `json:"selfLinkWithId,omitempty"` // Status: [Output Only] The status of the autoscaler configuration. + // Current set of possible values: + // - PENDING: Autoscaler backend hasn't read new/updated configuration. + // + // - DELETING: Configuration is being deleted. + // - ACTIVE: Configuration is acknowledged to be effective. Some + // warnings might be present in the statusDetails field. + // - ERROR: Configuration has errors. Actionable for users. Details are + // present in the statusDetails field. New values might be added in the + // future. // // Possible values: // "ACTIVE" @@ -3401,7 +3511,50 @@ type AutoscalerStatusDetails struct { // Message: The status message. Message string `json:"message,omitempty"` - // Type: The type of error returned. + // Type: The type of error, warning, or notice returned. Current set of + // possible values: + // - ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance + // group are unhealthy (not in RUNNING state). + // - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service + // attached to the instance group. + // - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size + // greater than maxNumReplicas. + // - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric + // samples are not exported often enough to be a credible base for + // autoscaling. + // - CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified + // does not exist or does not have the necessary labels. + // - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to + // maxNumReplicas. This means the autoscaler cannot add or remove + // instances from the instance group. + // - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not + // receive any data from the custom metric configured for autoscaling. + // + // - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is + // configured to scale based on a load balancing signal but the instance + // group has not received any requests from the load balancer. + // - MODE_OFF (WARNING): Autoscaling is turned off. The number of + // instances in the group won't change automatically. The autoscaling + // configuration is preserved. + // - MODE_ONLY_UP (WARNING): Autoscaling is in the "Autoscale only up" + // mode. The autoscaler can add instances but not remove any. + // - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be + // autoscaled because it has more than one backend service attached to + // it. + // - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for + // the necessary resources, such as CPU or number of instances. + // - REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional + // autoscalers: there is a resource stockout in the chosen region. + // - SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does + // not exist. + // - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): + // Autoscaling does not work with an HTTP/S load balancer that has been + // configured for maxRate. + // - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a + // resource stockout in the chosen zone. For regional autoscalers: in at + // least one of the zones you're using there is a resource stockout. + // New values might be added in the future. Some of the values might not + // be available in all API versions. // // Possible values: // "ALL_INSTANCES_UNHEALTHY" @@ -3412,6 +3565,8 @@ type AutoscalerStatusDetails struct { // "MIN_EQUALS_MAX" // "MISSING_CUSTOM_METRIC_DATA_POINTS" // "MISSING_LOAD_BALANCING_DATA_POINTS" + // "MODE_OFF" + // "MODE_ONLY_UP" // "MORE_THAN_ONE_BACKEND_SERVICE" // "NOT_ENOUGH_QUOTA_AVAILABLE" // "REGION_RESOURCE_STOCKOUT" @@ -3623,7 +3778,6 @@ type AutoscalingPolicy struct { // Possible values: // "OFF" // "ON" - // "ONLY_DOWN" // "ONLY_UP" Mode string `json:"mode,omitempty"` @@ -3631,6 +3785,8 @@ type AutoscalingPolicy struct { // queuing system. QueueBasedScaling *AutoscalingPolicyQueueBasedScaling `json:"queueBasedScaling,omitempty"` + ScaleDownControl *AutoscalingPolicyScaleDownControl `json:"scaleDownControl,omitempty"` + // ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec") // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -3975,15 +4131,84 @@ func (s *AutoscalingPolicyQueueBasedScalingCloudPubSub) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AutoscalingPolicyScaleDownControl: Configuration that allows for +// slower scale down so that even if Autoscaler recommends an abrupt +// scale down of a MIG, it will be throttled as specified by the +// parameters below. +type AutoscalingPolicyScaleDownControl struct { + // MaxScaledDownReplicas: Maximum allowed number (or %) of VMs that can + // be deducted from the peak recommendation during the window autoscaler + // looks at when computing recommendations. Possibly all these VMs can + // be deleted at once so user service needs to be prepared to lose that + // many VMs in one step. + MaxScaledDownReplicas *FixedOrPercent `json:"maxScaledDownReplicas,omitempty"` + + // TimeWindowSec: How long back autoscaling should look when computing + // recommendations to include directives regarding slower scale down, as + // described above. + TimeWindowSec int64 `json:"timeWindowSec,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "MaxScaledDownReplicas") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxScaledDownReplicas") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AutoscalingPolicyScaleDownControl) MarshalJSON() ([]byte, error) { + type NoMethod AutoscalingPolicyScaleDownControl + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Backend: Message containing information of one individual backend. type Backend struct { - // BalancingMode: Specifies the balancing mode for this backend. For - // global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. - // Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for - // TCP/SSL). + // BalancingMode: Specifies the balancing mode for the backend. // - // For Internal Load Balancing, the default and only supported mode is - // CONNECTION. + // When choosing a balancing mode, you need to consider the + // loadBalancingScheme, and protocol for the backend service, as well as + // the type of backend (instance group or NEG). + // + // + // - If the load balancing mode is CONNECTION, then the load is spread + // based on how many concurrent connections the backend can handle. + // You can use the CONNECTION balancing mode if the protocol for the + // backend service is SSL, TCP, or UDP. + // + // If the loadBalancingScheme for the backend service is EXTERNAL (SSL + // Proxy and TCP Proxy load balancers), you must also specify exactly + // one of the following parameters: maxConnections, + // maxConnectionsPerInstance, or maxConnectionsPerEndpoint. + // + // If the loadBalancingScheme for the backend service is INTERNAL + // (internal TCP/UDP load balancers), you cannot specify any additional + // parameters. + // + // - If the load balancing mode is RATE, the load is spread based on the + // rate of HTTP requests per second (RPS). + // You can use the RATE balancing mode if the protocol for the backend + // service is HTTP or HTTPS. You must specify exactly one of the + // following parameters: maxRate, maxRatePerInstance, or + // maxRatePerEndpoint. + // + // - If the load balancing mode is UTILIZATION, the load is spread based + // on the CPU utilization of instances in an instance group. + // You can use the UTILIZATION balancing mode if the loadBalancingScheme + // of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or + // INTERNAL_MANAGED and the backends are instance groups. There are no + // restrictions on the backend service protocol. // // Possible values: // "CONNECTION" @@ -4010,54 +4235,72 @@ type Backend struct { // BackendService. Failover bool `json:"failover,omitempty"` - // Group: The fully-qualified URL of an Instance Group or Network - // Endpoint Group resource. In case of instance group this defines the - // list of instances that serve traffic. Member virtual machine - // instances from each instance group must live in the same zone as the - // instance group itself. No two backends in a backend service are - // allowed to use same Instance Group resource. + // Group: The fully-qualified URL of an instance group or network + // endpoint group (NEG) resource. The type of backend that a backend + // service supports depends on the backend service's + // loadBalancingScheme. // - // For Network Endpoint Groups this defines list of endpoints. All - // endpoints of Network Endpoint Group must be hosted on instances - // located in the same zone as the Network Endpoint Group. // - // Backend service can not contain mix of Instance Group and Network - // Endpoint Group backends. + // - When the loadBalancingScheme for the backend service is EXTERNAL, + // INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either + // an instance group or a NEG. The backends on the backend service must + // be either all instance groups or all NEGs. You cannot mix instance + // group and NEG backends on the same backend service. // - // Note that you must specify an Instance Group or Network Endpoint - // Group resource using the fully-qualified URL, rather than a partial - // URL. // - // When the BackendService has load balancing scheme INTERNAL, the - // instance group must be within the same region as the BackendService. - // Network Endpoint Groups are not supported for INTERNAL load balancing - // scheme. + // - When the loadBalancingScheme for the backend service is INTERNAL, + // the backend must be an instance group in the same region as the + // backend service. NEGs are not supported. + // + // You must use the fully-qualified URL (starting with + // https://www.googleapis.com/) to specify the instance group or NEG. + // Partial URLs are not supported. Group string `json:"group,omitempty"` - // MaxConnections: The max number of simultaneous connections for the - // group. Can be used with either CONNECTION or UTILIZATION balancing - // modes. For CONNECTION mode, either maxConnections or - // maxConnectionsPerInstance must be set. + // MaxConnections: Defines a maximum target for simultaneous connections + // for the entire backend (instance group or NEG). If the backend's + // balancingMode is UTILIZATION, this is an optional parameter. If the + // backend's balancingMode is CONNECTION, and backend is attached to a + // backend service whose loadBalancingScheme is EXTERNAL, you must + // specify either this parameter, maxConnectionsPerInstance, or + // maxConnectionsPerEndpoint. // - // This cannot be used for internal load balancing. + // Not available if the backend's balancingMode is RATE. If the + // loadBalancingScheme is INTERNAL, then maxConnections is not + // supported, even though the backend requires a balancing mode of + // CONNECTION. MaxConnections int64 `json:"maxConnections,omitempty"` - // MaxConnectionsPerEndpoint: The max number of simultaneous connections - // that a single backend network endpoint can handle. This is used to - // calculate the capacity of the group. Can be used in either CONNECTION - // or UTILIZATION balancing modes. For CONNECTION mode, either - // maxConnections or maxConnectionsPerEndpoint must be set. + // MaxConnectionsPerEndpoint: Defines a maximum target for simultaneous + // connections for an endpoint of a NEG. This is multiplied by the + // number of endpoints in the NEG to implicitly calculate a maximum + // number of target maximum simultaneous connections for the NEG. If the + // backend's balancingMode is CONNECTION, and the backend is attached to + // a backend service whose loadBalancingScheme is EXTERNAL, you must + // specify either this parameter, maxConnections, or + // maxConnectionsPerInstance. // - // This cannot be used for internal load balancing. + // Not available if the backend's balancingMode is RATE. Internal + // TCP/UDP load balancing does not support setting + // maxConnectionsPerEndpoint even though its backends require a + // balancing mode of CONNECTION. MaxConnectionsPerEndpoint int64 `json:"maxConnectionsPerEndpoint,omitempty"` - // MaxConnectionsPerInstance: The max number of simultaneous connections - // that a single backend instance can handle. This is used to calculate - // the capacity of the group. Can be used in either CONNECTION or - // UTILIZATION balancing modes. For CONNECTION mode, either - // maxConnections or maxConnectionsPerInstance must be set. + // MaxConnectionsPerInstance: Defines a maximum target for simultaneous + // connections for a single VM in a backend instance group. This is + // multiplied by the number of instances in the instance group to + // implicitly calculate a target maximum number of simultaneous + // connections for the whole instance group. If the backend's + // balancingMode is UTILIZATION, this is an optional parameter. If the + // backend's balancingMode is CONNECTION, and backend is attached to a + // backend service whose loadBalancingScheme is EXTERNAL, you must + // specify either this parameter, maxConnections, or + // maxConnectionsPerEndpoint. // - // This cannot be used for internal load balancing. + // Not available if the backend's balancingMode is RATE. Internal + // TCP/UDP load balancing does not support setting + // maxConnectionsPerInstance even though its backends require a + // balancing mode of CONNECTION. MaxConnectionsPerInstance int64 `json:"maxConnectionsPerInstance,omitempty"` // MaxRate: The max requests per second (RPS) of the group. Can be used @@ -4068,27 +4311,36 @@ type Backend struct { // This cannot be used for internal load balancing. MaxRate int64 `json:"maxRate,omitempty"` - // MaxRatePerEndpoint: The max requests per second (RPS) that a single - // backend network endpoint can handle. This is used to calculate the - // capacity of the group. Can be used in either balancing mode. For RATE - // mode, either maxRate or maxRatePerEndpoint must be set. + // MaxRatePerEndpoint: Defines a maximum target for requests per second + // (RPS) for an endpoint of a NEG. This is multiplied by the number of + // endpoints in the NEG to implicitly calculate a target maximum rate + // for the NEG. // - // This cannot be used for internal load balancing. + // If the backend's balancingMode is RATE, you must specify either this + // parameter, maxRate, or maxRatePerInstance. + // + // Not available if the backend's balancingMode is CONNECTION. MaxRatePerEndpoint float64 `json:"maxRatePerEndpoint,omitempty"` - // MaxRatePerInstance: The max requests per second (RPS) that a single - // backend instance can handle. This is used to calculate the capacity - // of the group. Can be used in either balancing mode. For RATE mode, - // either maxRate or maxRatePerInstance must be set. + // MaxRatePerInstance: Defines a maximum target for requests per second + // (RPS) for a single VM in a backend instance group. This is multiplied + // by the number of instances in the instance group to implicitly + // calculate a target maximum rate for the whole instance group. // - // This cannot be used for internal load balancing. + // If the backend's balancingMode is UTILIZATION, this is an optional + // parameter. If the backend's balancingMode is RATE, you must specify + // either this parameter, maxRate, or maxRatePerEndpoint. + // + // Not available if the backend's balancingMode is CONNECTION. MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` - // MaxUtilization: Used when balancingMode is UTILIZATION. This ratio - // defines the CPU utilization target for the group. The default is 0.8. - // Valid range is [0.0, 1.0]. + // MaxUtilization: Defines the maximum average CPU utilization of a + // backend VM in an instance group. The valid range is [0.0, 1.0]. This + // is an optional parameter if the backend's balancingMode is + // UTILIZATION. // - // This cannot be used for internal load balancing. + // This parameter can be used in conjunction with maxRate, + // maxRatePerInstance, maxConnections, or maxConnectionsPerInstance. MaxUtilization float64 `json:"maxUtilization,omitempty"` // ForceSendFields is a list of field names (e.g. "BalancingMode") to @@ -4134,8 +4386,10 @@ func (s *Backend) UnmarshalJSON(data []byte) error { return nil } -// BackendBucket: A BackendBucket resource. This resource defines a -// Cloud Storage bucket. +// BackendBucket: Represents a Cloud Storage Bucket resource. +// +// This Cloud Storage bucket resource is referenced by a URL map of a +// load balancer. For more information, read Backend Buckets. type BackendBucket struct { // BucketName: Cloud Storage bucket name. BucketName string `json:"bucketName,omitempty"` @@ -4401,23 +4655,21 @@ func (s *BackendBucketListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// BackendService: A BackendService resource. This resource defines a -// group of backend virtual machines and their serving capacity. (== -// resource_for v1.backendService ==) (== resource_for +// BackendService: Represents a Backend Service resource. +// +// A backend service contains configuration values for Google Cloud +// Platform load balancing services. +// +// For more information, read Backend Services. +// +// (== resource_for v1.backendService ==) (== resource_for // beta.backendService ==) type BackendService struct { - // AffinityCookieTtlSec: Lifetime of cookies in seconds if - // session_affinity is GENERATED_COOKIE. If set to 0, the cookie is - // non-persistent and lasts only until the end of the browser session - // (or equivalent). The maximum allowed value for TTL is one day. - // - // When the load balancing scheme is INTERNAL, this field is not used. + // AffinityCookieTtlSec: If set to 0, the cookie is non-persistent and + // lasts only until the end of the browser session (or equivalent). The + // maximum allowed value is one day (86,400). AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"` - // AppEngineBackend: Directs request to an App Engine app. - // cloudFunctionBackend and backends[] must be empty if this is set. - AppEngineBackend *BackendServiceAppEngineBackend `json:"appEngineBackend,omitempty"` - // Backends: The list of backends that serve this BackendService. Backends []*Backend `json:"backends,omitempty"` @@ -4425,7 +4677,8 @@ type BackendService struct { CdnPolicy *BackendServiceCdnPolicy `json:"cdnPolicy,omitempty"` // CircuitBreakers: Settings controlling the volume of connections to a - // backend service. + // backend service. If not set, this feature is considered + // disabled. // // This field is applicable to either: // - A regional backend service with the service_protocol set to HTTP, @@ -4435,10 +4688,6 @@ type BackendService struct { // INTERNAL_SELF_MANAGED. CircuitBreakers *CircuitBreakers `json:"circuitBreakers,omitempty"` - // CloudFunctionBackend: Directs request to a cloud function. - // appEngineBackend and backends[] must be empty if this is set. - CloudFunctionBackend *BackendServiceCloudFunctionBackend `json:"cloudFunctionBackend,omitempty"` - ConnectionDraining *ConnectionDraining `json:"connectionDraining,omitempty"` // ConsistentHash: Consistent Hash-based load balancing can be used to @@ -4470,11 +4719,14 @@ type BackendService struct { // property when you create the resource. Description string `json:"description,omitempty"` - // EnableCDN: If true, enable Cloud CDN for this BackendService. - // - // When the load balancing scheme is INTERNAL, this field is not used. + // EnableCDN: If true, enables Cloud CDN for the backend service. Only + // applicable if the loadBalancingScheme is EXTERNAL and the protocol is + // HTTP or HTTPS. EnableCDN bool `json:"enableCDN,omitempty"` + // FailoverPolicy: Applicable only to Failover for Internal TCP/UDP Load + // Balancing. Requires at least one backend instance group to be defined + // as a backup (failover) backend. FailoverPolicy *BackendServiceFailoverPolicy `json:"failoverPolicy,omitempty"` // Fingerprint: Fingerprint of this resource. A hash of the contents @@ -4508,10 +4760,13 @@ type BackendService struct { // for backend services. Kind string `json:"kind,omitempty"` - // LoadBalancingScheme: Indicates whether the backend service will be - // used with internal or external load balancing. A backend service - // created for one type of load balancing cannot be used with the other. - // Possible values are INTERNAL and EXTERNAL. + // LoadBalancingScheme: Specifies the load balancer type. Choose + // EXTERNAL for load balancers that receive traffic from external + // clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose + // INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose + // INTERNAL_SELF_MANAGED for Traffic Director. A backend service created + // for one type of load balancing cannot be used with another. For more + // information, refer to Choosing a load balancer. // // Possible values: // "EXTERNAL" @@ -4573,8 +4828,16 @@ type BackendService struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // OutlierDetection: Settings controlling eviction of unhealthy hosts - // from the load balancing pool. This field is applicable to either: + // Network: The URL of the network to which this backend service + // belongs. This field can only be spcified when the load balancing + // scheme is set to INTERNAL. + Network string `json:"network,omitempty"` + + // OutlierDetection: Settings controlling the eviction of unhealthy + // hosts from the load balancing pool for the backend service. If not + // set, this feature is considered disabled. + // + // This field is applicable to either: // - A regional backend service with the service_protocol set to HTTP, // HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. // @@ -4585,24 +4848,30 @@ type BackendService struct { // Port: Deprecated in favor of portName. The TCP port to connect on the // backend. The default value is 80. // - // This cannot be used for internal load balancing. + // This cannot be used if the loadBalancingScheme is INTERNAL (Internal + // TCP/UDP Load Balancing). Port int64 `json:"port,omitempty"` - // PortName: Name of backend port. The same name should appear in the - // instance groups referenced by this service. Required when the load - // balancing scheme is EXTERNAL. + // PortName: A named port on a backend instance group representing the + // port for communication to the backend VMs in that group. Required + // when the loadBalancingScheme is EXTERNAL and the backends are + // instance groups. The named port must be defined on each backend + // instance group. This parameter has no meaning if the backends are + // NEGs. // - // When the load balancing scheme is INTERNAL, this field is not used. + // + // + // Must be omitted when the loadBalancingScheme is INTERNAL (Internal + // TCP/UDP Load Blaancing). PortName string `json:"portName,omitempty"` // Protocol: The protocol this BackendService uses to communicate with // backends. // - // Possible values are HTTP, HTTPS, TCP, and SSL. The default is - // HTTP. - // - // For internal load balancing, the possible values are TCP and UDP, and - // the default is TCP. + // Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP, depending + // on the chosen load balancer or Traffic Director configuration. Refer + // to the documentation for the load balancer or for Traffic Director + // for more information. // // Possible values: // "HTTP" @@ -4641,15 +4910,19 @@ type BackendService struct { SelfLinkWithId string `json:"selfLinkWithId,omitempty"` // SessionAffinity: Type of session affinity to use. The default is - // NONE. + // NONE. Session affinity is not applicable if the --protocol is + // UDP. // - // When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, - // or GENERATED_COOKIE. + // When the loadBalancingScheme is EXTERNAL, possible values are NONE, + // CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the + // protocol is HTTP or HTTPS. // - // When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, - // CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. + // When the loadBalancingScheme is INTERNAL, possible values are NONE, + // CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. // - // When the protocol is UDP, this field is not used. + // When the loadBalancingScheme is INTERNAL_SELF_MANAGED, possible + // values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or + // HTTP_COOKIE. // // Possible values: // "CLIENT_IP" @@ -4661,8 +4934,9 @@ type BackendService struct { // "NONE" SessionAffinity string `json:"sessionAffinity,omitempty"` - // TimeoutSec: How many seconds to wait for the backend before - // considering it a failed request. Default is 30 seconds. + // TimeoutSec: The backend service timeout has a different meaning + // depending on the type of load balancer. For more information read, + // Backend service settings The default is 30 seconds. TimeoutSec int64 `json:"timeoutSec,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -4850,45 +5124,6 @@ func (s *BackendServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// BackendServiceAppEngineBackend: Configuration of a App Engine -// backend. -type BackendServiceAppEngineBackend struct { - // AppEngineService: Optional. App Engine app service name. - AppEngineService string `json:"appEngineService,omitempty"` - - // TargetProject: Required. Project ID of the project hosting the app. - // This is the project ID of this project. Reference to another project - // is not allowed. - TargetProject string `json:"targetProject,omitempty"` - - // Version: Optional. Version of App Engine app service. When empty, App - // Engine will do its normal traffic split. - Version string `json:"version,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AppEngineService") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AppEngineService") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceAppEngineBackend) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceAppEngineBackend - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // BackendServiceCdnPolicy: Message containing Cloud CDN configuration // for a backend service. type BackendServiceCdnPolicy struct { @@ -4933,74 +5168,29 @@ func (s *BackendServiceCdnPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// BackendServiceCloudFunctionBackend: Configuration of a Cloud Function -// backend. -type BackendServiceCloudFunctionBackend struct { - // FunctionName: Required. A cloud function name. Special value ?*? - // represents all cloud functions in the project. - FunctionName string `json:"functionName,omitempty"` - - // TargetProject: Required. Project ID of the project hosting the cloud - // function. - TargetProject string `json:"targetProject,omitempty"` - - // ForceSendFields is a list of field names (e.g. "FunctionName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "FunctionName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *BackendServiceCloudFunctionBackend) MarshalJSON() ([]byte, error) { - type NoMethod BackendServiceCloudFunctionBackend - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - type BackendServiceFailoverPolicy struct { - // DisableConnectionDrainOnFailover: On failover or failback, this field - // indicates whether connection drain will be honored. Setting this to - // true has the following effect: connections to the old active pool are - // not drained. Connections to the new active pool use the timeout of 10 - // min (currently fixed). Setting to false has the following effect: - // both old and new connections will have a drain timeout of 10 - // min. - // - // This can be set to true only if the protocol is TCP. + // DisableConnectionDrainOnFailover: This can be set to true only if the + // protocol is TCP. // // The default is false. DisableConnectionDrainOnFailover bool `json:"disableConnectionDrainOnFailover,omitempty"` - // DropTrafficIfUnhealthy: This option is used only when no healthy VMs - // are detected in the primary and backup instance groups. When set to - // true, traffic is dropped. When set to false, new connections are sent - // across all VMs in the primary group. + // DropTrafficIfUnhealthy: Applicable only to Failover for Internal + // TCP/UDP Load Balancing. If set to true, connections to the load + // balancer are dropped when all primary and all backup backend VMs are + // unhealthy. If set to false, connections are distributed among all + // primary VMs when all primary and all backup backend VMs are + // unhealthy. // // The default is false. DropTrafficIfUnhealthy bool `json:"dropTrafficIfUnhealthy,omitempty"` - // FailoverRatio: The value of the field must be in [0, 1]. If the ratio - // of the healthy VMs in the primary backend is at or below this number, - // traffic arriving at the load-balanced IP will be directed to the - // failover backend. - // - // In case where 'failoverRatio' is not set or all the VMs in the backup - // backend are unhealthy, the traffic will be directed back to the - // primary backend in the "force" mode, where traffic will be spread to - // the healthy VMs with the best effort, or to all VMs when no VM is - // healthy. - // - // This field is only used with l4 load balancing. + // FailoverRatio: Applicable only to Failover for Internal TCP/UDP Load + // Balancing. The value of the field must be in the range [0, 1]. If the + // value is 0, the load balancer performs a failover when the number of + // healthy primary VMs equals zero. For all other values, the load + // balancer performs a failover when the total number of healthy primary + // VMs is less than this ratio. FailoverRatio float64 `json:"failoverRatio,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -5526,6 +5716,266 @@ func (s *BackendServicesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BfdPacket struct { + // AuthenticationPresent: The Authentication Present bit of the BFD + // packet. This is specified in section 4.1 of RFC5880 + AuthenticationPresent bool `json:"authenticationPresent,omitempty"` + + // ControlPlaneIndependent: The Control Plane Independent bit of the BFD + // packet. This is specified in section 4.1 of RFC5880 + ControlPlaneIndependent bool `json:"controlPlaneIndependent,omitempty"` + + // Demand: The demand bit of the BFD packet. This is specified in + // section 4.1 of RFC5880 + Demand bool `json:"demand,omitempty"` + + // Diagnostic: The diagnostic code specifies the local system's reason + // for the last change in session state. This allows remote systems to + // determine the reason that the previous session failed, for example. + // These diagnostic codes are specified in section 4.1 of RFC5880 + // + // Possible values: + // "ADMINISTRATIVELY_DOWN" + // "CONCATENATED_PATH_DOWN" + // "CONTROL_DETECTION_TIME_EXPIRED" + // "DIAGNOSTIC_UNSPECIFIED" + // "ECHO_FUNCTION_FAILED" + // "FORWARDING_PLANE_RESET" + // "NEIGHBOR_SIGNALED_SESSION_DOWN" + // "NO_DIAGNOSTIC" + // "PATH_DOWN" + // "REVERSE_CONCATENATED_PATH_DOWN" + Diagnostic string `json:"diagnostic,omitempty"` + + // Final: The Final bit of the BFD packet. This is specified in section + // 4.1 of RFC5880 + Final bool `json:"final,omitempty"` + + // Length: The length of the BFD Control packet in bytes. This is + // specified in section 4.1 of RFC5880 + Length int64 `json:"length,omitempty"` + + // MinEchoRxIntervalMs: The Required Min Echo RX Interval value in the + // BFD packet. This is specified in section 4.1 of RFC5880 + MinEchoRxIntervalMs int64 `json:"minEchoRxIntervalMs,omitempty"` + + // MinRxIntervalMs: The Required Min RX Interval value in the BFD + // packet. This is specified in section 4.1 of RFC5880 + MinRxIntervalMs int64 `json:"minRxIntervalMs,omitempty"` + + // MinTxIntervalMs: The Desired Min TX Interval value in the BFD packet. + // This is specified in section 4.1 of RFC5880 + MinTxIntervalMs int64 `json:"minTxIntervalMs,omitempty"` + + // Multiplier: The detection time multiplier of the BFD packet. This is + // specified in section 4.1 of RFC5880 + Multiplier int64 `json:"multiplier,omitempty"` + + // Multipoint: The multipoint bit of the BFD packet. This is specified + // in section 4.1 of RFC5880 + Multipoint bool `json:"multipoint,omitempty"` + + // MyDiscriminator: The My Discriminator value in the BFD packet. This + // is specified in section 4.1 of RFC5880 + MyDiscriminator int64 `json:"myDiscriminator,omitempty"` + + // Poll: The Poll bit of the BFD packet. This is specified in section + // 4.1 of RFC5880 + Poll bool `json:"poll,omitempty"` + + // State: The current BFD session state as seen by the transmitting + // system. These states are specified in section 4.1 of RFC5880 + // + // Possible values: + // "ADMIN_DOWN" + // "DOWN" + // "INIT" + // "STATE_UNSPECIFIED" + // "UP" + State string `json:"state,omitempty"` + + // Version: The version number of the BFD protocol, as specified in + // section 4.1 of RFC5880. + Version int64 `json:"version,omitempty"` + + // YourDiscriminator: The Your Discriminator value in the BFD packet. + // This is specified in section 4.1 of RFC5880 + YourDiscriminator int64 `json:"yourDiscriminator,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AuthenticationPresent") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuthenticationPresent") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BfdPacket) MarshalJSON() ([]byte, error) { + type NoMethod BfdPacket + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BfdStatus: Next free: 15 +type BfdStatus struct { + // BfdSessionInitializationMode: The BFD session initialization mode for + // this BGP peer. If set to ACTIVE, the Cloud Router will initiate the + // BFD session for this BGP peer. If set to PASSIVE, the Cloud Router + // will wait for the peer router to initiate the BFD session for this + // BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. + // + // Possible values: + // "ACTIVE" + // "DISABLED" + // "PASSIVE" + BfdSessionInitializationMode string `json:"bfdSessionInitializationMode,omitempty"` + + // ConfigUpdateTimestampMicros: Unix timestamp of the most recent config + // update. + ConfigUpdateTimestampMicros int64 `json:"configUpdateTimestampMicros,omitempty,string"` + + // ControlPacketCounts: Control packet counts for the current BFD + // session. + ControlPacketCounts *BfdStatusPacketCounts `json:"controlPacketCounts,omitempty"` + + // ControlPacketIntervals: Inter-packet time interval statistics for + // control packets. + ControlPacketIntervals []*PacketIntervals `json:"controlPacketIntervals,omitempty"` + + // EchoPacketCounts: Echo packet counts for the current BFD session. + EchoPacketCounts *BfdStatusPacketCounts `json:"echoPacketCounts,omitempty"` + + // EchoPacketIntervals: Inter-packet time interval statistics for echo + // packets. + EchoPacketIntervals []*PacketIntervals `json:"echoPacketIntervals,omitempty"` + + // LocalDiagnostic: The diagnostic code specifies the local system's + // reason for the last change in session state. This allows remote + // systems to determine the reason that the previous session failed, for + // example. These diagnostic codes are specified in section 4.1 of + // RFC5880 + // + // Possible values: + // "ADMINISTRATIVELY_DOWN" + // "CONCATENATED_PATH_DOWN" + // "CONTROL_DETECTION_TIME_EXPIRED" + // "DIAGNOSTIC_UNSPECIFIED" + // "ECHO_FUNCTION_FAILED" + // "FORWARDING_PLANE_RESET" + // "NEIGHBOR_SIGNALED_SESSION_DOWN" + // "NO_DIAGNOSTIC" + // "PATH_DOWN" + // "REVERSE_CONCATENATED_PATH_DOWN" + LocalDiagnostic string `json:"localDiagnostic,omitempty"` + + // LocalState: The current BFD session state as seen by the transmitting + // system. These states are specified in section 4.1 of RFC5880 + // + // Possible values: + // "ADMIN_DOWN" + // "DOWN" + // "INIT" + // "STATE_UNSPECIFIED" + // "UP" + LocalState string `json:"localState,omitempty"` + + // NegotiatedLocalControlTxIntervalMs: Negotiated transmit interval for + // control packets. + NegotiatedLocalControlTxIntervalMs int64 `json:"negotiatedLocalControlTxIntervalMs,omitempty"` + + // NegotiatedLocalEchoTxIntervalMs: Negotiated transmit interval for + // echo packets. + NegotiatedLocalEchoTxIntervalMs int64 `json:"negotiatedLocalEchoTxIntervalMs,omitempty"` + + // RxPacket: The most recent Rx control packet for this BFD session. + RxPacket *BfdPacket `json:"rxPacket,omitempty"` + + // TxPacket: The most recent Tx control packet for this BFD session. + TxPacket *BfdPacket `json:"txPacket,omitempty"` + + // UptimeMs: Session uptime in milliseconds. Value will be 0 if session + // is not up. + UptimeMs int64 `json:"uptimeMs,omitempty,string"` + + // UsingEchoMode: Indicates if echo mode is currently being used. + UsingEchoMode bool `json:"usingEchoMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "BfdSessionInitializationMode") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "BfdSessionInitializationMode") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BfdStatus) MarshalJSON() ([]byte, error) { + type NoMethod BfdStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type BfdStatusPacketCounts struct { + // NumRx: Number of packets received since the beginning of the current + // BFD session. + NumRx int64 `json:"numRx,omitempty"` + + // NumRxRejected: Number of packets received that were rejected because + // of errors since the beginning of the current BFD session. + NumRxRejected int64 `json:"numRxRejected,omitempty"` + + // NumRxSuccessful: Number of packets received that were successfully + // processed since the beginning of the current BFD session. + NumRxSuccessful int64 `json:"numRxSuccessful,omitempty"` + + // NumTx: Number of packets transmitted since the beginning of the + // current BFD session. + NumTx int64 `json:"numTx,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NumRx") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NumRx") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BfdStatusPacketCounts) MarshalJSON() ([]byte, error) { + type NoMethod BfdStatusPacketCounts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members` with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. NOTE: @@ -5545,7 +5995,7 @@ type Binding struct { // account. // // * `user:{emailid}`: An email address that represents a specific - // Google account. For example, `alice@gmail.com` . + // Google account. For example, `alice@example.com` . // // // @@ -5674,50 +6124,39 @@ func (s *CacheKeyPolicy) MarshalJSON() ([]byte, error) { // CallCredentials: gRPC call credentials to access the SDS server. type CallCredentials struct { - // AccessToken: The access token that is used as call credential for the - // SDS server. This field is used only if callCredentialType is - // ACCESS_TOKEN. - AccessToken string `json:"accessToken,omitempty"` - // CallCredentialType: The type of call credentials to use for GRPC // requests to the SDS server. This field can be set to one of the - // following: ACCESS_TOKEN: An access token is used as call credentials - // for the SDS server. GCE_VM: The local GCE VM service account - // credentials are used to access the SDS server. JWT_SERVICE_TOKEN: The - // user provisioned service account credentials are used to access the - // SDS server. FROM_PLUGIN: Custom authenticator credentials are used to + // following: + // - GCE_VM: The local GCE VM service account credentials are used to // access the SDS server. + // - FROM_PLUGIN: Custom authenticator credentials are used to access + // the SDS server. // // Possible values: - // "ACCESS_TOKEN" // "FROM_PLUGIN" // "GCE_VM" // "INVALID" - // "JWT_SERVICE_ACCOUNT" CallCredentialType string `json:"callCredentialType,omitempty"` - // FromPlugin: Custom authenticator credentials. + // FromPlugin: Custom authenticator credentials. Valid if + // callCredentialType is FROM_PLUGIN. FromPlugin *MetadataCredentialsFromPlugin `json:"fromPlugin,omitempty"` - // JwtServiceAccount: This service account credentials are used as call - // credentials for the SDS server. This field is used only if - // callCredentialType is JWT_SERVICE_ACCOUNT. - JwtServiceAccount *ServiceAccountJwtAccessCredentials `json:"jwtServiceAccount,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AccessToken") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CallCredentialType") + // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AccessToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CallCredentialType") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -5774,25 +6213,25 @@ type CircuitBreakers struct { ConnectTimeout *Duration `json:"connectTimeout,omitempty"` // MaxConnections: The maximum number of connections to the backend - // cluster. If not specified, the default is 1024. + // service. If not specified, there is no limit. MaxConnections int64 `json:"maxConnections,omitempty"` // MaxPendingRequests: The maximum number of pending requests allowed to - // the backend cluster. If not specified, the default is 1024. + // the backend service. If not specified, there is no limit. MaxPendingRequests int64 `json:"maxPendingRequests,omitempty"` // MaxRequests: The maximum number of parallel requests that allowed to - // the backend cluster. If not specified, the default is 1024. + // the backend service. If not specified, there is no limit. MaxRequests int64 `json:"maxRequests,omitempty"` - // MaxRequestsPerConnection: Maximum requests for a single backend - // connection. This parameter is respected by both the HTTP/1.1 and - // HTTP/2 implementations. If not specified, there is no limit. Setting - // this parameter to 1 will effectively disable keep alive. + // MaxRequestsPerConnection: Maximum requests for a single connection to + // the backend service. This parameter is respected by both the HTTP/1.1 + // and HTTP/2 implementations. If not specified, there is no limit. + // Setting this parameter to 1 will effectively disable keep alive. MaxRequestsPerConnection int64 `json:"maxRequestsPerConnection,omitempty"` // MaxRetries: The maximum number of parallel retries allowed to the - // backend cluster. If not specified, the default is 3. + // backend cluster. If not specified, the default is 1. MaxRetries int64 `json:"maxRetries,omitempty"` // ForceSendFields is a list of field names (e.g. "ConnectTimeout") to @@ -5876,18 +6315,27 @@ func (s *ClientTlsSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Commitment: Represents a Commitment resource. Creating a Commitment -// resource means that you are purchasing a committed use contract with -// an explicit start and end time. You can create commitments based on -// vCPUs and memory usage and receive discounted rates. For full -// details, read Signing Up for Committed Use Discounts. +// Commitment: Represents a regional Commitment resource. // -// Committed use discounts are subject to Google Cloud Platform's -// Service Specific Terms. By purchasing a committed use discount, you -// agree to these terms. Committed use discounts will not renew, so you -// must purchase a new commitment to continue receiving discounts. (== -// resource_for beta.commitments ==) (== resource_for v1.commitments ==) +// Creating a commitment resource means that you are purchasing a +// committed use contract with an explicit start and end time. You can +// create commitments based on vCPUs and memory usage and receive +// discounted rates. For full details, read Signing Up for Committed Use +// Discounts. (== resource_for beta.regionCommitments ==) (== +// resource_for v1.regionCommitments ==) type Commitment struct { + // Category: The category of the commitment. Category MACHINE specifies + // commitments composed of machine resources such as VCPU or MEMORY, + // listed in resources. Category LICENSE specifies commitments composed + // of software licenses, listed in licenseResources. Note that only + // MACHINE commitments should have a Type specified. + // + // Possible values: + // "CATEGORY_UNSPECIFIED" + // "LICENSE" + // "MACHINE" + Category string `json:"category,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -5908,6 +6356,10 @@ type Commitment struct { // for commitments. Kind string `json:"kind,omitempty"` + // LicenseResources: A list of commitment amounts for particular + // licenses. + LicenseResources []*LicenseResourceCommitment `json:"licenseResources,omitempty"` + // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -5931,7 +6383,7 @@ type Commitment struct { // used. Region string `json:"region,omitempty"` - // Reservations: List of reservations for this commitment. + // Reservations: List of reservations in this commitment. Reservations []*Reservation `json:"reservations,omitempty"` // Resources: A list of commitment amounts for particular resources. @@ -5971,6 +6423,9 @@ type Commitment struct { // Possible values: // "COMPUTE_OPTIMIZED" // "GENERAL_PURPOSE" + // "GENERAL_PURPOSE_E2" + // "GENERAL_PURPOSE_N2" + // "GENERAL_PURPOSE_N2D" // "MEMORY_OPTIMIZED" // "TYPE_UNSPECIFIED" Type string `json:"type,omitempty"` @@ -5979,21 +6434,20 @@ type Commitment struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Category") to + // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Category") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -6512,11 +6966,43 @@ func (s *Condition) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ConfidentialInstanceConfig: A set of Confidential Instance options. +type ConfidentialInstanceConfig struct { + // EnableConfidentialCompute: Defines whether the instance should have + // confidential compute enabled. + EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableConfidentialCompute") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableConfidentialCompute") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ConfidentialInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ConfidentialInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ConnectionDraining: Message containing connection draining // configuration. type ConnectionDraining struct { - // DrainingTimeoutSec: Time for which instance will be drained (not - // accept new connections, but still work to finish started). + // DrainingTimeoutSec: The amount of time in seconds to allow existing + // connections to persist while on unhealthy backend VMs. Only + // applicable if the protocol is not UDP. The valid range is [0, 3600]. DrainingTimeoutSec int64 `json:"drainingTimeoutSec,omitempty"` // ForceSendFields is a list of field names (e.g. "DrainingTimeoutSec") @@ -6698,6 +7184,9 @@ type CustomerEncryptionKey struct { // Cloud KMS. KmsKeyName string `json:"kmsKeyName,omitempty"` + // KmsKeyServiceAccount: The service account being used for the + // encryption request for the given KMS key. If absent, the Compute + // Engine default service account is used. KmsKeyServiceAccount string `json:"kmsKeyServiceAccount,omitempty"` // RawKey: Specifies a 256-bit customer-supplied encryption key, encoded @@ -6843,8 +7332,20 @@ func (s *DeprecationStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Disk: A Disk resource. (== resource_for beta.disks ==) (== -// resource_for v1.disks ==) +// Disk: Represents a Persistent Disk resource. +// +// Persistent disks are required for running your VM instances. Create +// both boot and non-boot (data) persistent disks. For more information, +// read Persistent Disks. For more storage options, read Storage +// options. +// +// The disks resource represents a zonal persistent disk. For more +// information, read Zonal persistent disks. +// +// The regionDisks resource represents a regional persistent disk. For +// more information, read Regional resources. (== resource_for +// beta.disks ==) (== resource_for v1.disks ==) (== resource_for +// v1.regionDisks ==) (== resource_for beta.regionDisks ==) type Disk struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -6870,6 +7371,10 @@ type Disk struct { // you do not need to provide a key to use the disk later. DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` + // EraseWindowsVssSignature: Specifies whether the disk restored from a + // source snapshot should erase Windows specific VSS signature. + EraseWindowsVssSignature bool `json:"eraseWindowsVssSignature,omitempty"` + // GuestOsFeatures: A list of features to enable on the guest operating // system. Applicable only for bootable images. Read Enabling guest // operating system features to see a list of available options. @@ -6956,6 +7461,10 @@ type Disk struct { // resource. SelfLink string `json:"selfLink,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource's + // resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // SizeGb: Size of the persistent disk, specified in GB. You can specify // this field when creating a persistent disk using the sourceImage or // sourceSnapshot parameter, or specify it alone to create an empty @@ -7049,7 +7558,10 @@ type Disk struct { // version of the snapshot that was used. SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - // Status: [Output Only] The status of disk creation. + // Status: [Output Only] The status of disk creation. CREATING: Disk is + // provisioning. RESTORING: Source data is being copied into the disk. + // FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: + // Disk is deleting. // // Possible values: // "CREATING" @@ -7526,8 +8038,19 @@ func (s *DiskMoveRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DiskType: A DiskType resource. (== resource_for beta.diskTypes ==) -// (== resource_for v1.diskTypes ==) +// DiskType: Represents a Disk Type resource. +// +// You can choose from a variety of disk types based on your needs. For +// more information, read Storage options. +// +// The diskTypes resource represents disk types for a zonal persistent +// disk. For more information, read Zonal persistent disks. +// +// The regionDiskTypes resource represents disk types for a regional +// persistent disk. For more information, read Regional persistent +// disks. (== resource_for beta.diskTypes ==) (== resource_for +// v1.diskTypes ==) (== resource_for v1.regionDiskTypes ==) (== +// resource_for beta.regionDiskTypes ==) type DiskType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -8051,6 +8574,7 @@ func (s *DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) { type DisksAddResourcePoliciesRequest struct { // ResourcePolicies: Resource policies to be added to this disk. + // Currently you can only specify one policy here. ResourcePolicies []string `json:"resourcePolicies,omitempty"` // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to @@ -8295,11 +8819,25 @@ func (s *DisplayDevice) MarshalJSON() ([]byte, error) { } type DistributionPolicy struct { + // TargetShape: The shape to which the group converges either + // proactively or on resize events (depending on the value set in + // updatePolicy.instanceRedistributionType). The possible values are + // EVEN and ANY. For EVEN the group attempts to preserve a balanced + // number of instances across zones. For ANY the group creates new + // instances where resources are available to fulfill the request; as a + // result, instances may be distributed unevenly across zones in this + // mode. The default value is EVEN. + // + // Possible values: + // "ANY" + // "EVEN" + TargetShape string `json:"targetShape,omitempty"` + // Zones: Zones where the regional managed instance group will create // and manage instances. Zones []*DistributionPolicyZoneConfiguration `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "Zones") to + // ForceSendFields is a list of field names (e.g. "TargetShape") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -8307,10 +8845,10 @@ type DistributionPolicy struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Zones") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "TargetShape") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -8393,8 +8931,11 @@ type ExchangedPeeringRoute struct { // DestRange: The destination range of the route. DestRange string `json:"destRange,omitempty"` - // Imported: If the peering route is imported if there is no - // confliction. + // Imported: True if the peering route has been imported from a peer. + // The actual import happens if the field + // networkPeering.importCustomRoutes is true for this network, and + // networkPeering.exportCustomRoutes is true for the peer network, and + // the import does not result in a route conflict. Imported bool `json:"imported,omitempty"` // NextHopRegion: The region of peering route next hop, only applies to @@ -8964,7 +9505,10 @@ func (s *FileContentBuffer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Firewall: Represents a Firewall resource. +// Firewall: Represents a Firewall Rule resource. +// +// Firewall rules allow or deny ingress traffic to, and egress traffic +// from your instances. For more information, read Firewall rules. type Firewall struct { // Allowed: The list of ALLOW rules specified by this firewall. Each // rule specifies a protocol and port-range tuple that describes a @@ -8981,29 +9525,30 @@ type Firewall struct { Denied []*FirewallDenied `json:"denied,omitempty"` // Description: An optional description of this resource. Provide this - // property when you create the resource. + // field when you create the resource. Description string `json:"description,omitempty"` // DestinationRanges: If destination ranges are specified, the firewall - // will apply only to traffic that has destination IP address in these + // rule applies only to traffic that has destination IP address in these // ranges. These ranges must be expressed in CIDR format. Only IPv4 is // supported. DestinationRanges []string `json:"destinationRanges,omitempty"` - // Direction: Direction of traffic to which this firewall applies; - // default is INGRESS. Note: For INGRESS traffic, it is NOT supported to - // specify destinationRanges; For EGRESS traffic, it is NOT supported to - // specify sourceRanges OR sourceTags. + // Direction: Direction of traffic to which this firewall applies, + // either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` + // traffic, you cannot specify the destinationRanges field, and for + // `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags + // fields. // // Possible values: // "EGRESS" // "INGRESS" Direction string `json:"direction,omitempty"` - // Disabled: Denotes whether the firewall rule is disabled, i.e not - // applied to the network it is associated with. When set to true, the - // firewall rule is not enforced and the network behaves as if it did - // not exist. If this is unspecified, the firewall rule will be enabled. + // Disabled: Denotes whether the firewall rule is disabled. When set to + // true, the firewall rule is not enforced and the network behaves as if + // it did not exist. If this is unspecified, the firewall rule will be + // enabled. Disabled bool `json:"disabled,omitempty"` // EnableLogging: Deprecated in favor of enable in LogConfig. This field @@ -9027,31 +9572,34 @@ type Firewall struct { // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. Name string `json:"name,omitempty"` // Network: URL of the network resource for this firewall rule. If not // specified when creating a firewall rule, the default network is // used: // global/networks/default - // If you choose to specify this property, you can specify the network - // as a full or partial URL. For example, the following are all valid - // URLs: + // If you choose to specify this field, you can specify the network as a + // full or partial URL. For example, the following are all valid URLs: + // // - // https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network // - projects/myproject/global/networks/my-network // - global/networks/default Network string `json:"network,omitempty"` - // Priority: Priority for this rule. This is an integer between 0 and - // 65535, both inclusive. When not specified, the value assumed is 1000. - // Relative priorities determine precedence of conflicting rules. Lower - // value of priority implies higher precedence (eg, a rule with priority - // 0 has higher precedence than a rule with priority 1). DENY rules take - // precedence over ALLOW rules having equal priority. + // Priority: Priority for this rule. This is an integer between `0` and + // `65535`, both inclusive. The default value is `1000`. Relative + // priorities determine which rule takes effect if multiple rules apply. + // Lower values indicate higher priority. For example, a rule with + // priority `0` has higher precedence than a rule with priority `1`. + // DENY rules take precedence over ALLOW rules if they have equal + // priority. Note that VPC networks have implied rules with a priority + // of `65535`. To avoid conflicts with the implied rules, use a priority + // number less than `65535`. Priority int64 `json:"priority,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -9061,28 +9609,28 @@ type Firewall struct { // with the resource id. SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // SourceRanges: If source ranges are specified, the firewall will apply - // only to traffic that has source IP address in these ranges. These - // ranges must be expressed in CIDR format. One or both of sourceRanges - // and sourceTags may be set. If both properties are set, the firewall - // will apply to traffic that has source IP address within sourceRanges - // OR the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. Only IPv4 is supported. + // SourceRanges: If source ranges are specified, the firewall rule + // applies only to traffic that has a source IP address in these ranges. + // These ranges must be expressed in CIDR format. One or both of + // sourceRanges and sourceTags may be set. If both fields are set, the + // rule applies to traffic that has a source IP address within + // sourceRanges OR a source IP from a resource with a matching tag + // listed in the sourceTags field. The connection does not need to match + // both fields for the rule to apply. Only IPv4 is supported. SourceRanges []string `json:"sourceRanges,omitempty"` // SourceServiceAccounts: If source service accounts are specified, the - // firewall will apply only to traffic originating from an instance with - // a service account in this list. Source service accounts cannot be - // used to control traffic to an instance's external IP address because - // service accounts are associated with an instance, not an IP address. - // sourceRanges can be set at the same time as sourceServiceAccounts. If - // both are set, the firewall will apply to traffic that has source IP - // address within sourceRanges OR the source IP belongs to an instance - // with service account listed in sourceServiceAccount. The connection - // does not need to match both properties for the firewall to apply. - // sourceServiceAccounts cannot be used at the same time as sourceTags - // or targetTags. + // firewall rules apply only to traffic originating from an instance + // with a service account in this list. Source service accounts cannot + // be used to control traffic to an instance's external IP address + // because service accounts are associated with an instance, not an IP + // address. sourceRanges can be set at the same time as + // sourceServiceAccounts. If both are set, the firewall applies to + // traffic that has a source IP address within the sourceRanges OR a + // source IP that belongs to an instance with service account listed in + // sourceServiceAccount. The connection does not need to match both + // fields for the firewall to apply. sourceServiceAccounts cannot be + // used at the same time as sourceTags or targetTags. SourceServiceAccounts []string `json:"sourceServiceAccounts,omitempty"` // SourceTags: If source tags are specified, the firewall rule applies @@ -9092,11 +9640,11 @@ type Firewall struct { // instance's external IP address, it only applies to traffic between // instances in the same virtual network. Because tags are associated // with instances, not IP addresses. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR - // the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. + // sourceTags may be set. If both fields are set, the firewall applies + // to traffic that has a source IP address within sourceRanges OR a + // source IP from a resource with a matching tag listed in the + // sourceTags field. The connection does not need to match both fields + // for the firewall to apply. SourceTags []string `json:"sourceTags,omitempty"` // TargetServiceAccounts: A list of service accounts indicating sets of @@ -9145,13 +9693,13 @@ type FirewallAllowed struct { // IPProtocol: The IP protocol to which this rule applies. The protocol // type is required when creating a firewall rule. This value can either // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. + // esp, ah, ipip, sctp) or the IP protocol number. IPProtocol string `json:"IPProtocol,omitempty"` // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. + // field is only applicable for the UDP or TCP protocol. Each entry must + // be either an integer or a range. If not specified, this rule applies + // to connections through any port. // // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. Ports []string `json:"ports,omitempty"` @@ -9183,13 +9731,13 @@ type FirewallDenied struct { // IPProtocol: The IP protocol to which this rule applies. The protocol // type is required when creating a firewall rule. This value can either // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. + // esp, ah, ipip, sctp) or the IP protocol number. IPProtocol string `json:"IPProtocol,omitempty"` // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. + // field is only applicable for the UDP or TCP protocol. Each entry must + // be either an integer or a range. If not specified, this rule applies + // to connections through any port. // // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. Ports []string `json:"ports,omitempty"` @@ -9456,59 +10004,50 @@ func (s *FixedOrPercent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ForwardingRule: A ForwardingRule resource. A ForwardingRule resource -// specifies which pool of target virtual machines to forward a packet -// to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== -// resource_for beta.forwardingRules ==) (== resource_for +// ForwardingRule: Represents a Forwarding Rule resource. +// +// A forwarding rule and its corresponding IP address represent the +// frontend configuration of a Google Cloud Platform load balancer. +// Forwarding rules can also reference target instances and Cloud VPN +// Classic gateways (targetVpnGateway). +// +// For more information, read Forwarding rule concepts and Using +// protocol forwarding. +// +// (== resource_for beta.forwardingRules ==) (== resource_for // v1.forwardingRules ==) (== resource_for beta.globalForwardingRules // ==) (== resource_for v1.globalForwardingRules ==) (== resource_for // beta.regionForwardingRules ==) (== resource_for // v1.regionForwardingRules ==) type ForwardingRule struct { - // IPAddress: The IP address that this forwarding rule is serving on - // behalf of. + // IPAddress: IP address that this forwarding rule serves. When a client + // sends traffic to this IP address, the forwarding rule directs the + // traffic to the target that you specify in the forwarding rule. // - // Addresses are restricted based on the forwarding rule's load - // balancing scheme (EXTERNAL or INTERNAL) and scope (global or - // regional). + // If you don't specify a reserved IP address, an ephemeral IP address + // is assigned. Methods for specifying an IP address: // - // When the load balancing scheme is EXTERNAL, for global forwarding - // rules, the address must be a global IP, and for regional forwarding - // rules, the address must live in the same region as the forwarding - // rule. If this field is empty, an ephemeral IPv4 address from the same - // scope (global or regional) will be assigned. A regional forwarding - // rule supports IPv4 only. A global forwarding rule supports either - // IPv4 or IPv6. + // * IPv4 dotted decimal, as in `100.1.2.3` * Full URL, as in + // https://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name * Partial URL or by name, as in: * projects/project_id/regions/region/addresses/address-name * regions/region/addresses/address-name * global/addresses/address-name * address-name // - // When the load balancing scheme is INTERNAL_SELF_MANAGED, this must be - // a URL reference to an existing Address resource ( internal regional - // static IP address), with a purpose of GCE_END_POINT and address_type - // of INTERNAL. - // - // When the load balancing scheme is INTERNAL, this can only be an RFC - // 1918 IP address belonging to the network/subnet configured for the - // forwarding rule. By default, if this field is empty, an ephemeral - // internal IP address will be automatically allocated from the IP range - // of the subnet or network configured for this forwarding rule. - // - // An address can be specified either by a literal IP address or a URL - // reference to an existing Address resource. The following examples are - // all valid: - // - 100.1.2.3 - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address - // - projects/project/regions/region/addresses/address - // - regions/region/addresses/address - // - global/addresses/address - // - address + // The loadBalancingScheme and the forwarding rule's target determine + // the type of IP address that you can use. For detailed information, + // refer to [IP address + // specifications](/load-balancing/docs/forwarding-rule-concepts#ip_addre + // ss_specifications). IPAddress string `json:"IPAddress,omitempty"` // IPProtocol: The IP protocol to which this rule applies. Valid options // are TCP, UDP, ESP, AH, SCTP or ICMP. // - // When the load balancing scheme is INTERNAL, only TCP and UDP are - // valid. When the load balancing scheme is INTERNAL_SELF_MANAGED, only - // TCPis valid. + // For Internal TCP/UDP Load Balancing, the load balancing scheme is + // INTERNAL, and one of TCP or UDP are valid. For Traffic Director, the + // load balancing scheme is INTERNAL_SELF_MANAGED, and only TCPis valid. + // For Internal HTTP(S) Load Balancing, the load balancing scheme is + // INTERNAL_MANAGED, and only TCP is valid. For HTTP(S), SSL Proxy, and + // TCP Proxy Load Balancing, the load balancing scheme is EXTERNAL and + // only TCP is valid. For Network TCP/UDP Load Balancing, the load + // balancing scheme is EXTERNAL, and one of TCP or UDP is valid. // // Possible values: // "AH" @@ -9575,6 +10114,14 @@ type ForwardingRule struct { // "UNSPECIFIED_VERSION" IpVersion string `json:"ipVersion,omitempty"` + // IsMirroringCollector: Indicates whether or not this load balancer can + // be used as a collector for packet mirroring. To prevent mirroring + // loops, instances behind this load balancer will not have their + // traffic mirrored even if a PacketMirroring rule applies to them. This + // can only be set to true for load balancers that have their + // loadBalancingScheme set to INTERNAL. + IsMirroringCollector bool `json:"isMirroringCollector,omitempty"` + // Kind: [Output Only] Type of the resource. Always // compute#forwardingRule for Forwarding Rule resources. Kind string `json:"kind,omitempty"` @@ -9596,14 +10143,21 @@ type ForwardingRule struct { // RFC1035. Label values may be empty. Labels map[string]string `json:"labels,omitempty"` - // LoadBalancingScheme: This signifies what the ForwardingRule will be - // used for and can only take the following values: INTERNAL, - // INTERNAL_SELF_MANAGED, EXTERNAL. The value of INTERNAL means that - // this will be used for Internal Network Load Balancing (TCP, UDP). The - // value of INTERNAL_SELF_MANAGED means that this will be used for - // Internal Global HTTP(S) LB. The value of EXTERNAL means that this - // will be used for External Load Balancing (HTTP(S) LB, External - // TCP/UDP LB, SSL Proxy) + // LoadBalancingScheme: Specifies the forwarding rule type. EXTERNAL is + // used for: - Classic Cloud VPN gateways - Protocol forwarding to VMs + // from an external IP address - The following load balancers: HTTP(S), + // SSL Proxy, TCP Proxy, and Network TCP/UDP. + // + // INTERNAL is used for: - Protocol forwarding to VMs from an internal + // IP address - Internal TCP/UDP load balancers + // + // INTERNAL_MANAGED is used for: - Internal HTTP(S) load + // balancers + // + // INTERNAL_SELF_MANAGED is used for: - Traffic Director + // + // For more information about forwarding rules, refer to Forwarding rule + // concepts. // // Possible values: // "EXTERNAL" @@ -9664,17 +10218,24 @@ type ForwardingRule struct { // "STANDARD" NetworkTier string `json:"networkTier,omitempty"` - // PortRange: This field is used along with the target field for - // TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, - // TargetVpnGateway, TargetPool, TargetInstance. + // PortRange: This field is deprecated. See the port + // field. + PortRange string `json:"portRange,omitempty"` + + // Ports: List of comma-separated ports. The forwarding rule forwards + // packets with matching destination ports. If the forwarding rule's + // loadBalancingScheme is EXTERNAL, and the forwarding rule references a + // target pool, specifying ports is optional. You can specify an + // unlimited number of ports, but they must be contiguous. If you omit + // ports, GCP forwards traffic on any port of the forwarding rule's + // protocol. + // + // If the forwarding rule's loadBalancingScheme is EXTERNAL, and the + // forwarding rule references a target HTTP proxy, target HTTPS proxy, + // target TCP proxy, target SSL proxy, or target VPN gateway, you must + // specify ports using the following constraints: // - // Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets - // addressed to ports in the specified range will be forwarded to - // target. Forwarding rules with the same [IPAddress, IPProtocol] pair - // must have disjoint port ranges. // - // Some types of forwarding target have constraints on the acceptable - // ports: // - TargetHttpProxy: 80, 8080 // - TargetHttpsProxy: 443 // - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, @@ -9682,17 +10243,21 @@ type ForwardingRule struct { // - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, // 995, 1688, 1883, 5222 // - TargetVpnGateway: 500, 4500 - PortRange string `json:"portRange,omitempty"` - - // Ports: This field is used along with the backend_service field for - // internal load balancing. // - // When the load balancing scheme is INTERNAL, a list of ports can be - // configured, for example, ['80'], ['8000','9000'] etc. Only packets - // addressed to these ports will be forwarded to the backends configured - // with this forwarding rule. + // If the forwarding rule's loadBalancingScheme is INTERNAL, you must + // specify ports in one of the following ways: // - // You may specify a maximum of up to 5 ports. + // * A list of up to five ports, which can be non-contiguous * Keyword + // ALL, which causes the forwarding rule to forward traffic on any port + // of the forwarding rule's protocol. + // + // The ports field is used along with the target field for + // TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, + // TargetVpnGateway, TargetPool, TargetInstance. + // + // Applicable only when IPProtocol is TCP, UDP, or SCTP. Forwarding + // rules with the same [IPAddress, IPProtocol] pair must have disjoint + // port ranges. Ports []string `json:"ports,omitempty"` // Region: [Output Only] URL of the region where the regional forwarding @@ -9709,8 +10274,8 @@ type ForwardingRule struct { SelfLinkWithId string `json:"selfLinkWithId,omitempty"` // ServiceLabel: An optional prefix to the service name for this - // Forwarding Rule. If specified, will be the first label of the fully - // qualified service name. + // Forwarding Rule. If specified, the prefix is the first label of the + // fully qualified service name. // // The label must be 1-63 characters long, and comply with RFC1035. // Specifically, the label must be 1-63 characters long and match the @@ -10814,9 +11379,14 @@ func (s *HTTPSHealthCheck) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthCheck: An HealthCheck resource. This resource defines a -// template for how individual virtual machines should be checked for -// health, via one of the supported protocols. +// HealthCheck: Represents a Health Check resource. +// +// Health checks are used for most GCP load balancers and managed +// instance group auto-healing. For more information, read Health Check +// Concepts. +// +// To perform health checks on network load balancers, you must use +// either httpHealthChecks or httpsHealthChecks. type HealthCheck struct { // CheckIntervalSec: How often (in seconds) to send a health check. The // default value is 5 seconds. @@ -10847,6 +11417,9 @@ type HealthCheck struct { // Kind: Type of the resource. Kind string `json:"kind,omitempty"` + // LogConfig: Configure logging on this health check. + LogConfig *HealthCheckLogConfig `json:"logConfig,omitempty"` + // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -11080,6 +11653,36 @@ func (s *HealthCheckListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HealthCheckLogConfig: Configuration of logging on a health check. If +// logging is enabled, logs will be exported to Stackdriver. +type HealthCheckLogConfig struct { + // Enable: Indicates whether or not to export logs. This is false by + // default, which means no health check logging will be done. + Enable bool `json:"enable,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enable") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enable") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HealthCheckLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HealthCheckReference: A full or valid partial URL to a health check. // For example, the following are valid URLs: // - @@ -11134,6 +11737,21 @@ type HealthCheckService struct { // HealthChecks 0. + // > 0. If not specified, defaults to 1. NumRetries int64 `json:"numRetries,omitempty"` // PerTryTimeout: Specifies a non-zero timeout per retry attempt. + // If not specified, will use the timeout set in HttpRouteAction. If + // timeout in HttpRouteAction is not set, will use the largest timeout + // among all backend services associated with the route. PerTryTimeout *Duration `json:"perTryTimeout,omitempty"` // RetryConditions: Specfies one or more conditions when this retry rule @@ -12559,10 +13221,11 @@ type HttpRouteAction struct { RetryPolicy *HttpRetryPolicy `json:"retryPolicy,omitempty"` // Timeout: Specifies the timeout for the selected route. Timeout is - // computed from the time the request is has been fully processed (i.e. + // computed from the time the request has been fully processed (i.e. // end-of-stream) up until the response has been completely processed. // Timeout includes all retries. - // If not specified, the default value is 15 seconds. + // If not specified, will use the largest timeout among all backend + // services associated with the route. Timeout *Duration `json:"timeout,omitempty"` // UrlRewrite: The spec to modify the URL of the request, prior to @@ -12608,6 +13271,11 @@ func (s *HttpRouteAction) MarshalJSON() ([]byte, error) { // request and the corresponding routing action that load balancing // proxies will perform. type HttpRouteRule struct { + // Description: The short description conveying the intent of this + // routeRule. + // The description can have a maximum length of 1024 characters. + Description string `json:"description,omitempty"` + // HeaderAction: Specifies changes to request and response headers that // need to take effect for the selected backendService. // The headerAction specified here are applied before the matching @@ -12618,6 +13286,22 @@ type HttpRouteRule struct { MatchRules []*HttpRouteRuleMatch `json:"matchRules,omitempty"` + // Priority: For routeRules within a given pathMatcher, priority + // determines the order in which load balancer will interpret + // routeRules. RouteRules are evaluated in order of priority, from the + // lowest to highest number. The priority of a rule decreases as its + // number increases (1, 2, 3, N+1). The first rule that matches the + // request is applied. + // You cannot configure two or more routeRules with the same priority. + // Priority for each rule must be set to a number between 0 and + // 2147483647 inclusive. + // Priority numbers can have gaps, which enable you to add or remove + // rules in the future without affecting the rest of the rules. For + // example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority + // numbers to which you could add rules numbered from 6 to 8, 10 to 11, + // and 13 to 15 in the future without any impact on existing rules. + Priority int64 `json:"priority,omitempty"` + // RouteAction: In response to a matching matchRule, the load balancer // performs advanced routing actions like URL rewrites, header // transformations, etc. prior to forwarding the request to the selected @@ -12643,7 +13327,7 @@ type HttpRouteRule struct { // If urlRedirect is specified, service or routeAction must not be set. UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderAction") to + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -12651,7 +13335,7 @@ type HttpRouteRule struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderAction") to include + // NullFields is a list of field names (e.g. "Description") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -12751,9 +13435,11 @@ func (s *HttpRouteRuleMatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpsHealthCheck: An HttpsHealthCheck resource. This resource defines -// a template for how individual instances should be checked for health, -// via HTTPS. +// HttpsHealthCheck: Represents a legacy HTTPS Health Check +// resource. +// +// Legacy health checks are required by network load balancers. For more +// information, read Health Check Concepts. type HttpsHealthCheck struct { // CheckIntervalSec: How often (in seconds) to send a health check. The // default value is 5 seconds. @@ -13000,7 +13686,10 @@ func (s *HttpsHealthCheckListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Image: An Image resource. (== resource_for beta.images ==) (== +// Image: Represents an Image resource. +// +// You can use images to create boot disks for your VM instances. For +// more information, read Images. (== resource_for beta.images ==) (== // resource_for v1.images ==) type Image struct { // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google @@ -13180,8 +13869,8 @@ type Image struct { // "READY" Status string `json:"status,omitempty"` - // StorageLocations: GCS bucket storage location of the image (regional - // or multi-regional). + // StorageLocations: Cloud Storage bucket storage location of the image + // (regional or multi-regional). StorageLocations []string `json:"storageLocations,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -13448,8 +14137,11 @@ func (s *InitialStateConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Instance: An Instance resource. (== resource_for beta.instances ==) -// (== resource_for v1.instances ==) +// Instance: Represents an Instance resource. +// +// An instance is a virtual machine that is hosted on Google Cloud +// Platform. For more information, read Virtual Machine Instances. (== +// resource_for beta.instances ==) (== resource_for v1.instances ==) type Instance struct { // CanIpForward: Allows this instance to send and receive packets with // non-matching destination or source IPs. This is required if you plan @@ -13457,6 +14149,8 @@ type Instance struct { // Enabling IP Forwarding. CanIpForward bool `json:"canIpForward,omitempty"` + ConfidentialInstanceConfig *ConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"` + // CpuPlatform: [Output Only] The CPU platform used by this instance. CpuPlatform string `json:"cpuPlatform,omitempty"` @@ -13479,10 +14173,30 @@ type Instance struct { // DisplayDevice: Enables display device for the instance. DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"` + // EraseWindowsVssSignature: Specifies whether the disks restored from + // source snapshots or source machine image should erase Windows + // specific VSS signature. + EraseWindowsVssSignature bool `json:"eraseWindowsVssSignature,omitempty"` + + // Fingerprint: Specifies a fingerprint for this resource, which is + // essentially a hash of the instance's contents and used for optimistic + // locking. The fingerprint is initially generated by Compute Engine and + // changes after every request to modify or update the instance. You + // must always provide an up-to-date fingerprint hash in order to update + // the instance. + // + // To see the latest fingerprint, make get() request to the instance. + Fingerprint string `json:"fingerprint,omitempty"` + // GuestAccelerators: A list of the type and count of accelerator cards // attached to the instance. GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` + // Hostname: Specifies the hostname of the instance. The specified + // hostname must be RFC1035 compliant. If hostname is not specified, the + // default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when + // using the global DNS, and + // [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. Hostname string `json:"hostname,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -13578,12 +14292,21 @@ type Instance struct { // Multiple interfaces are supported per instance. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + // PostKeyRevocationActionType: Specifies whether this instance will be + // shut down on key revocation. + // + // Possible values: + // "NOOP" + // "SHUTDOWN" + // "UNSPECIFIED" + PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` + // PreservedStateSizeGb: Total amount of preserved state for SUSPENDED // instances. Read-only in the api. PreservedStateSizeGb int64 `json:"preservedStateSizeGb,omitempty,string"` - // ReservationAffinity: The configuration of desired reservations from - // which this Instance can consume capacity from. + // ReservationAffinity: Specifies the reservations that this instance + // can consume from. ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` // ResourcePolicies: Resource policies applied to this instance. @@ -13691,7 +14414,7 @@ type InstanceAggregatedList struct { // server. Id string `json:"id,omitempty"` - // Items: A list of InstancesScopedList resources. + // Items: An object that contains a list of instances scoped by zone. Items map[string]InstancesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -13842,10 +14565,18 @@ func (s *InstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceGroup: InstanceGroups (== resource_for beta.instanceGroups -// ==) (== resource_for v1.instanceGroups ==) (== resource_for -// beta.regionInstanceGroups ==) (== resource_for -// v1.regionInstanceGroups ==) +// InstanceGroup: Represents an unmanaged Instance Group resource. +// +// Use unmanaged instance groups if you need to apply load balancing to +// groups of heterogeneous instances or if you need to manage the +// instances yourself. For more information, read Instance groups. +// +// For zonal unmanaged Instance Group, use instanceGroups resource. +// +// For regional unmanaged Instance Group, use regionInstanceGroups +// resource. (== resource_for beta.instanceGroups ==) (== resource_for +// v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) +// (== resource_for v1.regionInstanceGroups ==) type InstanceGroup struct { // CreationTimestamp: [Output Only] The creation timestamp for this // instance group in RFC3339 text format. @@ -14251,8 +14982,18 @@ func (s *InstanceGroupListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceGroupManager: An Instance Group Manager resource. (== -// resource_for beta.instanceGroupManagers ==) (== resource_for +// InstanceGroupManager: Represents a Managed Instance Group +// resource. +// +// An instance group is a collection of VM instances that you can manage +// as a single entity. For more information, read Instance groups. +// +// For zonal Managed Instance Group, use the instanceGroupManagers +// resource. +// +// For regional Managed Instance Group, use the +// regionInstanceGroupManagers resource. (== resource_for +// beta.instanceGroupManagers ==) (== resource_for // v1.instanceGroupManagers ==) (== resource_for // beta.regionInstanceGroupManagers ==) (== resource_for // v1.regionInstanceGroupManagers ==) @@ -14915,6 +15656,10 @@ func (s *InstanceGroupManagerPendingActionsSummary) MarshalJSON() ([]byte, error } type InstanceGroupManagerStatus struct { + // Autoscaler: [Output Only] The URL of the Autoscaler that targets this + // instance group manager. + Autoscaler string `json:"autoscaler,omitempty"` + // IsStable: [Output Only] A bit indicating whether the managed instance // group is in a stable state. A stable state means that: none of the // instances in the managed instance group is currently undergoing any @@ -14932,7 +15677,7 @@ type InstanceGroupManagerStatus struct { // Instance Group Manager. VersionTarget *InstanceGroupManagerStatusVersionTarget `json:"versionTarget,omitempty"` - // ForceSendFields is a list of field names (e.g. "IsStable") to + // ForceSendFields is a list of field names (e.g. "Autoscaler") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -14940,7 +15685,7 @@ type InstanceGroupManagerStatus struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IsStable") to include in + // NullFields is a list of field names (e.g. "Autoscaler") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -15017,6 +15762,13 @@ func (s *InstanceGroupManagerStatusVersionTarget) MarshalJSON() ([]byte, error) } type InstanceGroupManagerUpdatePolicy struct { + // InstanceRedistributionType: The instance redistribution policy for + // regional managed instance groups. Valid values are: + // - PROACTIVE (default): The group attempts to maintain an even + // distribution of VM instances across zones in the region. + // - NONE: For non-autoscaled groups, proactive redistribution is + // disabled. + // // Possible values: // "NONE" // "PROACTIVE" @@ -15080,6 +15832,13 @@ type InstanceGroupManagerUpdatePolicy struct { // "SUBSTITUTE" ReplacementMethod string `json:"replacementMethod,omitempty"` + // Type: The type of update process. You can specify either PROACTIVE so + // that the instance group manager proactively executes actions in order + // to bring instances to their target versions or OPPORTUNISTIC so that + // no action is proactively executed but the update will be performed as + // part of other actions (for example, resizes or recreateInstances + // calls). + // // Possible values: // "OPPORTUNISTIC" // "PROACTIVE" @@ -15194,10 +15953,9 @@ func (s *InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, er // InstanceGroupManagersApplyUpdatesRequest: // InstanceGroupManagers.applyUpdatesToInstances type InstanceGroupManagersApplyUpdatesRequest struct { - // Instances: The list of URLs of one or more instances for which we - // want to apply updates on this managed instance group. This can be a - // full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. + // Instances: The list of URLs of one or more instances for which you + // want to apply updates. Each URL can be a full URL or a partial URL, + // such as zones/[ZONE]/instances/[INSTANCE_NAME]. Instances []string `json:"instances,omitempty"` // MaximalAction: The maximal action that should be performed on the @@ -15211,8 +15969,15 @@ type InstanceGroupManagersApplyUpdatesRequest struct { // "RESTART" MaximalAction string `json:"maximalAction,omitempty"` - // MinimalAction: The minimal action that should be perfomed on the - // instances. By default NONE. + // MinimalAction: The minimal action that you want to perform on each + // instance during the update: + // - REPLACE: At minimum, delete the instance and create it again. + // - RESTART: Stop the instance and start it again. + // - REFRESH: Do not stop the instance. + // - NONE: Do not disrupt the instance at all. By default, the minimum + // action is NONE. If your update requires a more disruptive action than + // you set with this flag, the necessary action is performed to execute + // the update. // // Possible values: // "NONE" @@ -15221,8 +15986,15 @@ type InstanceGroupManagersApplyUpdatesRequest struct { // "RESTART" MinimalAction string `json:"minimalAction,omitempty"` - // MostDisruptiveAllowedAction: The most disruptive action that allowed - // to be performed on the instances. By default REPLACE. + // MostDisruptiveAllowedAction: The most disruptive action that you want + // to perform on each instance during the update: + // - REPLACE: Delete the instance and create it again. + // - RESTART: Stop the instance and start it again. + // - REFRESH: Do not stop the instance. + // - NONE: Do not disrupt the instance at all. By default, the most + // disruptive allowed action is REPLACE. If your update requires a more + // disruptive action than you set with this flag, the update request + // will fail. // // Possible values: // "NONE" @@ -15315,15 +16087,11 @@ func (s *InstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, err // InstanceGroupManagersDeletePerInstanceConfigsReq: // InstanceGroupManagers.deletePerInstanceConfigs type InstanceGroupManagersDeletePerInstanceConfigsReq struct { - // Instances: The list of instances for which we want to delete - // per-instance configs on this managed instance group. - Instances []string `json:"instances,omitempty"` - // Names: The list of instance names for which we want to delete // per-instance configs on this managed instance group. Names []string `json:"names,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to + // ForceSendFields is a list of field names (e.g. "Names") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -15331,8 +16099,8 @@ type InstanceGroupManagersDeletePerInstanceConfigsReq struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Names") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -15346,6 +16114,46 @@ func (s *InstanceGroupManagersDeletePerInstanceConfigsReq) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstanceGroupManagersListErrorsResponse struct { + // Items: [Output Only] The list of errors of the managed instance + // group. + Items []*InstanceManagedByIgmError `json:"items,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Items") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagersListErrorsResponse) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagersListErrorsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagersListManagedInstancesResponse struct { // ManagedInstances: [Output Only] The list of instances in the managed // instance group. @@ -16637,6 +17445,121 @@ func (s *InstanceListReferrersWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstanceManagedByIgmError struct { + // Error: [Output Only] Contents of the error. + Error *InstanceManagedByIgmErrorManagedInstanceError `json:"error,omitempty"` + + // InstanceActionDetails: [Output Only] Details of the instance action + // that triggered this error. May be null, if the error was not caused + // by an action on an instance. This field is optional. + InstanceActionDetails *InstanceManagedByIgmErrorInstanceActionDetails `json:"instanceActionDetails,omitempty"` + + // Timestamp: [Output Only] The time that this error occurred. This + // value is in RFC3339 text format. + Timestamp string `json:"timestamp,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Error") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceManagedByIgmError) MarshalJSON() ([]byte, error) { + type NoMethod InstanceManagedByIgmError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceManagedByIgmErrorInstanceActionDetails struct { + // Action: [Output Only] Action that managed instance group was + // executing on the instance when the error occurred. Possible values: + // + // Possible values: + // "ABANDONING" + // "CREATING" + // "CREATING_WITHOUT_RETRIES" + // "DELETING" + // "NONE" + // "RECREATING" + // "REFRESHING" + // "RESTARTING" + // "VERIFYING" + Action string `json:"action,omitempty"` + + // Instance: [Output Only] The URL of the instance. The URL can be set + // even if the instance has not yet been created. + Instance string `json:"instance,omitempty"` + + // Version: [Output Only] Version this instance was created from, or was + // being created from, but the creation failed. Corresponds to one of + // the versions that were set on the Instance Group Manager resource at + // the time this instance was being created. + Version *ManagedInstanceVersion `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceManagedByIgmErrorInstanceActionDetails) MarshalJSON() ([]byte, error) { + type NoMethod InstanceManagedByIgmErrorInstanceActionDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceManagedByIgmErrorManagedInstanceError struct { + // Code: [Output Only] Error code. + Code string `json:"code,omitempty"` + + // Message: [Output Only] Error message. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceManagedByIgmErrorManagedInstanceError) MarshalJSON() ([]byte, error) { + type NoMethod InstanceManagedByIgmErrorManagedInstanceError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceMoveRequest struct { // DestinationZone: The URL of the destination zone to move the // instance. This can be a full or partial URL. For example, the @@ -16690,6 +17613,10 @@ type InstanceProperties struct { // information. CanIpForward bool `json:"canIpForward,omitempty"` + // ConfidentialInstanceConfig: Specifies the Confidential Instance + // options. + ConfidentialInstanceConfig *ConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"` + // Description: An optional text description for the instances that are // created from this instance template. Description string `json:"description,omitempty"` @@ -16732,8 +17659,17 @@ type InstanceProperties struct { // interface. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - // ReservationAffinity: The configuration of desired reservations which - // this Instance could consume capacity from. + // PostKeyRevocationActionType: Specifies whether this instance will be + // shut down on key revocation. + // + // Possible values: + // "NOOP" + // "SHUTDOWN" + // "UNSPECIFIED" + PostKeyRevocationActionType string `json:"postKeyRevocationActionType,omitempty"` + + // ReservationAffinity: Specifies the reservations that this instance + // can consume from. ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` // Scheduling: Specifies the scheduling options for the instances that @@ -16808,8 +17744,12 @@ func (s *InstanceReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceTemplate: An Instance Template resource. (== resource_for -// beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==) +// InstanceTemplate: Represents an Instance Template resource. +// +// You can use instance templates to create VM instances and managed +// instance groups. For more information, read Instance Templates. (== +// resource_for beta.instanceTemplates ==) (== resource_for +// v1.instanceTemplates ==) type InstanceTemplate struct { // CreationTimestamp: [Output Only] The creation timestamp for this // instance template in RFC3339 text format. @@ -17507,6 +18447,39 @@ func (s *InstancesSetMinCpuPlatformRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstancesSetNameRequest struct { + // CurrentName: The current name of this resource, used to prevent + // conflicts. Provide the latest name when making a request to change + // name. + CurrentName string `json:"currentName,omitempty"` + + // Name: The name to be applied to the instance. Needs to be RFC 1035 + // compliant. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CurrentName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrentName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstancesSetNameRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstancesSetNameRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstancesSetServiceAccountRequest struct { // Email: Email address of the service account. Email string `json:"email,omitempty"` @@ -17614,11 +18587,12 @@ func (s *Int64RangeMatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Interconnect: Represents an Interconnects resource. The Interconnects -// resource is a dedicated connection between Google's network and your -// on-premises network. For more information, see the Dedicated -// overview page. (== resource_for v1.interconnects ==) (== resource_for -// beta.interconnects ==) +// Interconnect: Represents an Interconnect resource. +// +// An Interconnect resource is a dedicated connection between the GCP +// network and your on-premises network. For more information, read the +// Dedicated Interconnect Overview. (== resource_for v1.interconnects +// ==) (== resource_for beta.interconnects ==) type Interconnect struct { // AdminEnabled: Administrative status of the interconnect. When this is // set to true, the Interconnect is functional and can carry traffic. @@ -17810,10 +18784,14 @@ func (s *Interconnect) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachment: Represents an InterconnectAttachment (VLAN -// attachment) resource. For more information, see Creating VLAN -// Attachments. (== resource_for beta.interconnectAttachments ==) (== -// resource_for v1.interconnectAttachments ==) +// InterconnectAttachment: Represents an Interconnect Attachment (VLAN) +// resource. +// +// You can use Interconnect attachments (VLANS) to connect your Virtual +// Private Cloud networks to your on-premises networks through an +// Interconnect. For more information, read Creating VLAN Attachments. +// (== resource_for beta.interconnectAttachments ==) (== resource_for +// v1.interconnectAttachments ==) type InterconnectAttachment struct { // AdminEnabled: Determines whether this Attachment will carry packets. // Not present for PARTNER_PROVIDER. @@ -17835,6 +18813,8 @@ type InterconnectAttachment struct { // - BPS_2G: 2 Gbit/s // - BPS_5G: 5 Gbit/s // - BPS_10G: 10 Gbit/s + // - BPS_20G: 20 Gbit/s + // - BPS_50G: 50 Gbit/s // // Possible values: // "BPS_100M" @@ -17898,7 +18878,7 @@ type InterconnectAttachment struct { // GoogleReferenceId: [Output Only] Google reference ID, to be used when // raising support tickets with Google or otherwise to debug backend - // connectivity issues. + // connectivity issues. [Deprecated] This field is not used. GoogleReferenceId string `json:"googleReferenceId,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -17930,6 +18910,11 @@ type InterconnectAttachment struct { // key/value must comply with RFC1035. Label values may be empty. Labels map[string]string `json:"labels,omitempty"` + // Mtu: Maximum Transmission Unit (MTU), in bytes, of packets passing + // through this interconnect attachment. Only 1440 and 1500 are allowed. + // If not specified, the value will default to 1440. + Mtu int64 `json:"mtu,omitempty"` + // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -19021,10 +20006,12 @@ func (s *InterconnectListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectLocation: Represents an InterconnectLocations resource. -// The InterconnectLocations resource describes the locations where you -// can connect to Google's networks. For more information, see -// Colocation Facilities. +// InterconnectLocation: Represents an Interconnect Attachment (VLAN) +// Location resource. +// +// You can use this resource to find location details about an +// Interconnect attachment (VLAN). For more information about +// interconnect attachments, read Creating VLAN Attachments. type InterconnectLocation struct { // Address: [Output Only] The postal address of the Point of Presence, // each line in the address is separated by a newline character. @@ -19403,6 +20390,7 @@ type InterconnectOutageNotification struct { // Possible values: // "ACTIVE" // "CANCELLED" + // "COMPLETED" // "NS_ACTIVE" // "NS_CANCELED" State string `json:"state,omitempty"` @@ -20126,6 +21114,42 @@ func (s *LicenseCodeLicenseAlias) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LicenseResourceCommitment: Commitment for a particular license +// resource (a License Commitment is composed of one or more of these). +type LicenseResourceCommitment struct { + // Amount: The number of licenses purchased. + Amount int64 `json:"amount,omitempty,string"` + + // CoresPerLicense: Specifies the core range of the instance for which + // this license applies. + CoresPerLicense string `json:"coresPerLicense,omitempty"` + + // License: Any applicable license URI. + License string `json:"license,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Amount") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Amount") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LicenseResourceCommitment) MarshalJSON() ([]byte, error) { + type NoMethod LicenseResourceCommitment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type LicenseResourceRequirements struct { // MinGuestCpuCount: Minimum number of guest cpus required to use the // Instance. Enforced at Instance creation and Instance start. @@ -20440,19 +21464,22 @@ func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { // // Examples: counter { metric: "/debug_access_count" field: // "iam_principal" } ==> increment counter -// /iam/policy/backend_debug_access_count {iam_principal=[value of +// /iam/policy/debug_access_count {iam_principal=[value of // IAMContext.principal]} // -// At this time we do not support multiple field names (though this may -// be supported in the future). +// TODO(b/141846426): Consider supporting "authority" and +// "iam_principal" fields in the same counter. type LogConfigCounterOptions struct { + // CustomFields: Custom fields. + CustomFields []*LogConfigCounterOptionsCustomField `json:"customFields,omitempty"` + // Field: The field value to attribute. Field string `json:"field,omitempty"` // Metric: The metric to update. Metric string `json:"metric,omitempty"` - // ForceSendFields is a list of field names (e.g. "Field") to + // ForceSendFields is a list of field names (e.g. "CustomFields") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -20460,7 +21487,42 @@ type LogConfigCounterOptions struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Field") to include in API + // NullFields is a list of field names (e.g. "CustomFields") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { + type NoMethod LogConfigCounterOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LogConfigCounterOptionsCustomField: Custom fields. These can be used +// to create a counter with arbitrary field/value pairs. See: +// go/rpcsp-custom-fields. +type LogConfigCounterOptionsCustomField struct { + // Name: Name is the field name. + Name string `json:"name,omitempty"` + + // Value: Value is the field value. It is important that in contrast to + // the CounterOptions.field, the value here is a constant that is not + // derived from the IAMContext. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -20469,8 +21531,8 @@ type LogConfigCounterOptions struct { NullFields []string `json:"-"` } -func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { - type NoMethod LogConfigCounterOptions +func (s *LogConfigCounterOptionsCustomField) MarshalJSON() ([]byte, error) { + type NoMethod LogConfigCounterOptionsCustomField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -20519,6 +21581,12 @@ type MachineImage struct { // property when you create the resource. Description string `json:"description,omitempty"` + // GuestFlush: [Input Only] Specifies to create an application + // consistent machine image by informing the OS to prepare for the + // snapshot process. Currently only supported on Windows instances using + // the Volume Shadow Copy Service (VSS). + GuestFlush bool `json:"guestFlush,omitempty"` + // Id: [Output Only] A unique identifier for this machine image. The // server defines this identifier. Id uint64 `json:"id,omitempty,string"` @@ -20562,6 +21630,12 @@ type MachineImage struct { // with the resource id. SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // SourceDiskEncryptionKeys: [Input Only] The customer-supplied + // encryption key of the disks attached to the source instance. Required + // if the source disk is protected by a customer-supplied encryption + // key. + SourceDiskEncryptionKeys []*SourceDiskEncryptionKey `json:"sourceDiskEncryptionKeys,omitempty"` + // SourceInstance: The source instance used to create the machine image. // You can provide this as a partial or full URL to the resource. For // example, the following are valid values: @@ -20589,6 +21663,10 @@ type MachineImage struct { // (regional or multi-regional). StorageLocations []string `json:"storageLocations,omitempty"` + // TotalStorageBytes: [Output Only] Total size of the storage used by + // the machine image. + TotalStorageBytes int64 `json:"totalStorageBytes,omitempty,string"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -20619,8 +21697,6 @@ func (s *MachineImage) MarshalJSON() ([]byte, error) { // MachineImageList: A list of machine images. type MachineImageList struct { - Etag string `json:"etag,omitempty"` - // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` @@ -20650,7 +21726,7 @@ type MachineImageList struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -20658,7 +21734,7 @@ type MachineImageList struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Etag") to include in API + // NullFields is a list of field names (e.g. "Id") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -20774,8 +21850,12 @@ func (s *MachineImageListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineType: A Machine Type resource. (== resource_for -// v1.machineTypes ==) (== resource_for beta.machineTypes ==) +// MachineType: Represents a Machine Type resource. +// +// You can use specific machine types for your VM instances based on +// performance and pricing requirements. For more information, read +// Machine Types. (== resource_for v1.machineTypes ==) (== resource_for +// beta.machineTypes ==) type MachineType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -21381,9 +22461,6 @@ type ManagedInstance struct { // create or delete the instance. LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"` - // Override: [Output Only] Override defined for this instance. - Override *ManagedInstanceOverride `json:"override,omitempty"` - // PreservedStateFromConfig: [Output Only] Preserved state applied from // per-instance config for this instance. PreservedStateFromConfig *PreservedState `json:"preservedStateFromConfig,omitempty"` @@ -21437,7 +22514,10 @@ type ManagedInstanceInstanceHealth struct { // whether the instance is healthy. HealthCheck string `json:"healthCheck,omitempty"` - // HealthState: [Output Only] The current instance health state. + // HealthState: [Output Only] The current instance health state. This + // field will not get promoted to beta/GA and might be removed from + // alpha APIs after 01/12/2019. Please use detailed_health_state field + // instead. // // Possible values: // "HEALTHY" @@ -21560,125 +22640,6 @@ func (s *ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ManagedInstanceOverride: Overrides of stateful properties for a given -// instance -type ManagedInstanceOverride struct { - // Disks: Disk overrides defined for this instance. According to - // documentation the maximum number of disks attached to an instance is - // 128: https://cloud.google.com/compute/docs/disks/ However, compute - // API defines the limit at 140, so this is what we check. - Disks []*ManagedInstanceOverrideDiskOverride `json:"disks,omitempty"` - - // Metadata: Metadata overrides defined for this instance. - // TODO(b/69785416) validate the total length is <9 KB - Metadata []*ManagedInstanceOverrideMetadata `json:"metadata,omitempty"` - - // Origin: [Output Only] Indicates where does the override come from. - // - // Possible values: - // "AUTO_GENERATED" - // "USER_PROVIDED" - Origin string `json:"origin,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceOverride) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceOverride - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceOverrideMetadata struct { - // Key: Key for the metadata entry. Keys must conform to the following - // regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is - // reflected as part of a URL in the metadata server. Additionally, to - // avoid ambiguity, keys must not conflict with any other metadata keys - // for the project. - Key string `json:"key,omitempty"` - - // Value: Value for the metadata entry. These are free-form strings, and - // only have meaning as interpreted by the image running in the - // instance. The only restriction placed on values is that their size - // must be less than or equal to 262144 bytes (256 KiB). - Value string `json:"value,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Key") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceOverrideMetadata) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceOverrideMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -type ManagedInstanceOverrideDiskOverride struct { - // DeviceName: The name of the device on the VM - DeviceName string `json:"deviceName,omitempty"` - - // Mode: The mode in which to attach this disk, either READ_WRITE or - // READ_ONLY. If not specified, the default is to attach the disk in - // READ_WRITE mode. - // - // Possible values: - // "READ_ONLY" - // "READ_WRITE" - Mode string `json:"mode,omitempty"` - - // Source: The disk that is/will be mounted - Source string `json:"source,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DeviceName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DeviceName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ManagedInstanceOverrideDiskOverride) MarshalJSON() ([]byte, error) { - type NoMethod ManagedInstanceOverrideDiskOverride - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - type ManagedInstanceVersion struct { // InstanceTemplate: [Output Only] The intended template of the // instance. This field is empty when current_action is one of { @@ -21993,9 +22954,11 @@ func (s *NamedPort) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Network: Represents a Network resource. Read Virtual Private Cloud -// (VPC) Network Overview for more information. (== resource_for -// v1.networks ==) (== resource_for beta.networks ==) +// Network: Represents a VPC Network resource. +// +// Networks connect resources to each other and to the internet. For +// more information, read Virtual Private Cloud (VPC) Network. (== +// resource_for v1.networks ==) (== resource_for beta.networks ==) type Network struct { // IPv4Range: Deprecated in favor of subnet mode networks. The range of // internal addresses that are legal on this network. This range is a @@ -22025,11 +22988,11 @@ type Network struct { CrossVmEncryption string `json:"crossVmEncryption,omitempty"` // Description: An optional description of this resource. Provide this - // property when you create the resource. + // field when you create the resource. Description string `json:"description,omitempty"` // GatewayIPv4: [Output Only] The gateway address for default routing - // out of the network. This value is read only and is selected by GCP. + // out of the network, selected by GCP. GatewayIPv4 string `json:"gatewayIPv4,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -22049,7 +23012,7 @@ type Network struct { LoadBalancerVmEncryption string `json:"loadBalancerVmEncryption,omitempty"` // Mtu: Maximum Transmission Unit in bytes. The minimum value for this - // field is 1460 and the maximum value is 1600 bytes. + // field is 1460 and the maximum value is 1500 bytes. Mtu int64 `json:"mtu,omitempty"` // MulticastMode: The multicast mode for this network. If set to ZONAL, @@ -22064,10 +23027,10 @@ type Network struct { // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. Name string `json:"name,omitempty"` // Peerings: [Output Only] A list of network peerings for the resource. @@ -22135,10 +23098,10 @@ type NetworkEndpoint struct { Instance string `json:"instance,omitempty"` // IpAddress: Optional IPv4 address of network endpoint. The IP address - // must belong to a VM in GCE (either the primary IP or as part of an - // aliased IP range). If the IP address is not specified, then the - // primary IP address for the VM instance in the network that the - // network endpoint group belongs to will be used. + // must belong to a VM in Compute Engine (either the primary IP or as + // part of an aliased IP range). If the IP address is not specified, + // then the primary IP address for the VM instance in the network that + // the network endpoint group belongs to will be used. IpAddress string `json:"ipAddress,omitempty"` // Port: Optional port number of network endpoint. If not specified and @@ -22169,12 +23132,29 @@ func (s *NetworkEndpoint) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroup: Represents a collection of network endpoints. +// NetworkEndpointGroup: Represents a collection of network +// endpoints. +// +// For more information read Setting up network endpoint groups in load +// balancing. (== resource_for v1.networkEndpointGroups ==) (== +// resource_for beta.networkEndpointGroups ==) type NetworkEndpointGroup struct { // Annotations: Metadata defined as annotations on the network endpoint // group. Annotations map[string]string `json:"annotations,omitempty"` + // AppEngine: Only valid when networkEndpointType is "SERVERLESS". Only + // one of cloudRun, appEngine or cloudFunction may be set. + AppEngine *NetworkEndpointGroupAppEngine `json:"appEngine,omitempty"` + + // CloudFunction: Only valid when networkEndpointType is "SERVERLESS". + // Only one of cloudRun, appEngine or cloudFunction may be set. + CloudFunction *NetworkEndpointGroupCloudFunction `json:"cloudFunction,omitempty"` + + // CloudRun: Only valid when networkEndpointType is "SERVERLESS". Only + // one of cloudRun, appEngine or cloudFunction may be set. + CloudRun *NetworkEndpointGroupCloudRun `json:"cloudRun,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -22218,11 +23198,17 @@ type NetworkEndpointGroup struct { // // Possible values: // "GCE_VM_IP_PORT" + // "GCE_VM_PRIMARY_IP" // "INTERNET_FQDN_PORT" // "INTERNET_IP_PORT" // "NON_GCP_PRIVATE_IP_PORT" + // "SERVERLESS" NetworkEndpointType string `json:"networkEndpointType,omitempty"` + // Region: [Output Only] The URL of the region where the network + // endpoint group is located. + Region string `json:"region,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -22432,6 +23418,174 @@ func (s *NetworkEndpointGroupAggregatedListWarningData) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NetworkEndpointGroupAppEngine: Configuration for an App Engine +// network endpoint group (NEG). The service is optional, may be +// provided explicitly or in the URL mask. The version is optional and +// can only be provided explicitly or in the URL mask when service is +// present. +// +// Note: App Engine service must be in the same project and located in +// the same region as the Serverless NEG. +type NetworkEndpointGroupAppEngine struct { + // Service: Optional serving service. + // + // The service name must be 1-63 characters long, and comply with + // RFC1035. + // + // Example value: "default", "my-service". + Service string `json:"service,omitempty"` + + // UrlMask: A template to parse service and version fields from a + // request URL. URL mask allows for routing to multiple App Engine + // services without having to create multiple Network Endpoint Groups + // and backend services. + // + // For example, the request URLs "foo1-dot-appname.appspot.com/v1" and + // "foo1-dot-appname.appspot.com/v2" can be backed by the same + // Serverless NEG with URL mask "-dot-appname.appspot.com/". The URL + // mask will parse them to { service = "foo1", version = "v1" } and { + // service = "foo1", version = "v2" } respectively. + UrlMask string `json:"urlMask,omitempty"` + + // Version: Optional serving version. + // + // The version must be 1-63 characters long, and comply with + // RFC1035. + // + // Example value: "v1", "v2". + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Service") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Service") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupAppEngine) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupAppEngine + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupCloudFunction: Configuration for a Cloud Function +// network endpoint group (NEG). The function must be provided +// explicitly or in the URL mask. +// +// Note: Cloud Function must be in the same project and located in the +// same region as the Serverless NEG. +type NetworkEndpointGroupCloudFunction struct { + // Function: A user-defined name of the Cloud Function. + // + // The service name must be 1-63 characters long, and comply with + // RFC1035. + // + // Example value: "func1". + Function string `json:"function,omitempty"` + + // UrlMask: A template to parse function field from a request URL. URL + // mask allows for routing to multiple Cloud Functions without having to + // create multiple Network Endpoint Groups and backend services. + // + // For example, request URLs "mydomain.com/function1" and + // "mydomain.com/function2" can be backed by the same Serverless NEG + // with URL mask "/". The URL mask will parse them to { function = + // "function1" } and { function = "function2" } respectively. + UrlMask string `json:"urlMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Function") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Function") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupCloudFunction) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupCloudFunction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkEndpointGroupCloudRun: Configuration for a Cloud Run network +// endpoint group (NEG). The service must be provided explicitly or in +// the URL mask. The tag is optional, may be provided explicitly or in +// the URL mask. +// +// Note: Cloud Run service must be in the same project and located in +// the same region as the Serverless NEG. +type NetworkEndpointGroupCloudRun struct { + // Service: Cloud Run service is the main resource of Cloud Run. + // + // The tag must be 1-63 characters long, and comply with + // RFC1035. + // + // Example value: "run-service". + Service string `json:"service,omitempty"` + + // Tag: Optional Cloud Run tag represents the "named-revision" to + // provide additional fine-grained traffic routing information. + // + // The tag must be 1-63 characters long, and comply with + // RFC1035. + // + // Example value: "revision-0010". + Tag string `json:"tag,omitempty"` + + // UrlMask: A template to parse service and tag fields from a request + // URL. URL mask allows for routing to multiple Run services without + // having to create multiple network endpoint groups and backend + // services. + // + // For example, request URLs "foo1.domain.com/bar1" and + // "foo1.domain.com/bar2" can be backed by the same Serverless Network + // Endpoint Group (NEG) with URL mask ".domain.com/". The URL mask will + // parse them to { service="bar1", tag="foo1" } and { service="bar2", + // tag="foo2" } respectively. + UrlMask string `json:"urlMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Service") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Service") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkEndpointGroupCloudRun) MarshalJSON() ([]byte, error) { + type NoMethod NetworkEndpointGroupCloudRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NetworkEndpointGroupLbNetworkEndpointGroup: Load balancing specific // fields for network endpoint group. type NetworkEndpointGroupLbNetworkEndpointGroup struct { @@ -23085,8 +24239,8 @@ type NetworkInterface struct { AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` // AliasIpRanges: An array of alias IP ranges for this network - // interface. Can only be specified for network interfaces on - // subnet-mode networks. + // interface. You can only specify this field for network interfaces in + // VPC networks. AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"` // Fingerprint: Fingerprint hash of contents stored in this network @@ -23104,8 +24258,9 @@ type NetworkInterface struct { // compute#networkInterface for network interfaces. Kind string `json:"kind,omitempty"` - // Name: [Output Only] The name of the network interface, generated by - // the server. For network devices, these are eth0, eth1, etc. + // Name: [Output Only] The name of the network interface, which is + // generated by the server. For network devices, these are eth0, eth1, + // etc. Name string `json:"name,omitempty"` // Network: URL of the network resource for this instance. When creating @@ -23114,10 +24269,6 @@ type NetworkInterface struct { // is not specified but the subnetwork is specified, the network is // inferred. // - // This field is optional when creating a firewall rule. If not - // specified when creating a firewall rule, the default network - // global/networks/default is used. - // // If you specify this property, you can specify the network as a full // or partial URL. For example, the following are all valid URLs: // - @@ -23126,16 +24277,16 @@ type NetworkInterface struct { // - global/networks/default Network string `json:"network,omitempty"` - // NetworkIP: An IPv4 internal network address to assign to the instance - // for this network interface. If not specified by the user, an unused + // NetworkIP: An IPv4 internal IP address to assign to the instance for + // this network interface. If not specified by the user, an unused // internal IP is assigned by the system. NetworkIP string `json:"networkIP,omitempty"` // Subnetwork: The URL of the Subnetwork resource for this instance. If - // the network resource is in legacy mode, do not provide this property. - // If the network is in auto subnet mode, providing the subnetwork is - // optional. If the network is in custom subnet mode, then this field - // should be specified. If you specify this property, you can specify + // the network resource is in legacy mode, do not specify this field. If + // the network is in auto subnet mode, specifying the subnetwork is + // optional. If the network is in custom subnet mode, specifying the + // subnetwork is required. If you specify this field, you can specify // the subnetwork as a full or partial URL. For example, the following // are all valid URLs: // - @@ -23330,19 +24481,19 @@ type NetworkPeering struct { // can automatically advertise subnets from the peer network. AdvertisePeerSubnetsViaRouters bool `json:"advertisePeerSubnetsViaRouters,omitempty"` - // AutoCreateRoutes: This field will be deprecated soon. Prefer using - // exchange_subnet_routes instead. Indicates whether full mesh - // connectivity is created and managed automatically. When it is set to - // true, Google Compute Engine will automatically create and manage the - // routes between two networks when the state is ACTIVE. Otherwise, user - // needs to create routes manually to route packets to peer network. + // AutoCreateRoutes: This field will be deprecated soon. Use the + // exchange_subnet_routes field instead. Indicates whether full mesh + // connectivity is created and managed automatically between peered + // networks. Currently this field should always be true since Google + // Compute Engine will automatically create and manage subnetwork routes + // between two networks when peering state is ACTIVE. AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - // ExchangeSubnetRoutes: Whether full mesh connectivity is created and - // managed automatically. When it is set to true, Google Compute Engine - // will automatically create and manage the routes between two networks - // when the peering state is ACTIVE. Otherwise, user needs to create - // routes manually to route packets to peer network. + // ExchangeSubnetRoutes: Indicates whether full mesh connectivity is + // created and managed automatically between peered networks. Currently + // this field should always be true since Google Compute Engine will + // automatically create and manage subnetwork routes between two + // networks when peering state is ACTIVE. ExchangeSubnetRoutes bool `json:"exchangeSubnetRoutes,omitempty"` // ExportCustomRoutes: Whether to export the custom routes to peer @@ -23369,10 +24520,9 @@ type NetworkPeering struct { // Name: Name of this peering. Provided by the client when the peering // is created. The name must comply with RFC1035. Specifically, the name // must be 1-63 characters long and match regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all the following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. + // `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase + // letter, and all the following characters must be a dash, lowercase + // letter, or digit, except the last character, which cannot be a dash. Name string `json:"name,omitempty"` // Network: The URL of the peer network. It can be either full URL or @@ -23384,7 +24534,9 @@ type NetworkPeering struct { // PeerMtu: Maximum Transmission Unit in bytes. PeerMtu int64 `json:"peerMtu,omitempty"` - // State: [Output Only] State for the peering. + // State: [Output Only] State for the peering, either `ACTIVE` or + // `INACTIVE`. The peering is `ACTIVE` when there's a matching + // configuration in the peer network. // // Possible values: // "ACTIVE" @@ -23426,9 +24578,9 @@ func (s *NetworkPeering) MarshalJSON() ([]byte, error) { // enforce network-wide. type NetworkRoutingConfig struct { // RoutingMode: The network-wide routing mode to use. If set to - // REGIONAL, this network's cloud routers will only advertise routes + // REGIONAL, this network's Cloud Routers will only advertise routes // with subnets of this network in the same region as the router. If set - // to GLOBAL, this network's cloud routers will advertise routes with + // to GLOBAL, this network's Cloud Routers will advertise routes with // all subnets of this network, across regions. // // Possible values: @@ -23460,17 +24612,20 @@ func (s *NetworkRoutingConfig) MarshalJSON() ([]byte, error) { } type NetworksAddPeeringRequest struct { - // AutoCreateRoutes: This field will be deprecated soon. Prefer using - // exchange_subnet_routes in network_peering instead. Whether Google - // Compute Engine manages the routes automatically. + // AutoCreateRoutes: This field will be deprecated soon. Use + // exchange_subnet_routes in network_peering instead. Indicates whether + // full mesh connectivity is created and managed automatically between + // peered networks. Currently this field should always be true since + // Google Compute Engine will automatically create and manage subnetwork + // routes between two networks when peering state is ACTIVE. AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - // ExportCustomRoutes: This field will be deprecated soon. Prefer using + // ExportCustomRoutes: This field will be deprecated soon. Use // export_custom_routes in network_peering instead. Whether to export // the custom routes to peer network. ExportCustomRoutes bool `json:"exportCustomRoutes,omitempty"` - // ImportCustomRoutes: This field will be deprecated soon. Prefer using + // ImportCustomRoutes: This field will be deprecated soon. Use // import_custom_routes in network_peering instead. Whether to import // the custom routes from peer network. ImportCustomRoutes bool `json:"importCustomRoutes,omitempty"` @@ -23479,10 +24634,11 @@ type NetworksAddPeeringRequest struct { Name string `json:"name,omitempty"` // NetworkPeering: Network peering parameters. In order to specify route - // policies for peering using import/export custom routes, you will have - // to fill all peering related parameters (name, peer network, - // exchange_subnet_routes) in network_peeringfield. Corresponding fields - // in NetworksAddPeeringRequest will be deprecated soon. + // policies for peering using import and export custom routes, you must + // specify all peering related parameters (name, peer network, + // exchange_subnet_routes) in the network_peering field. The + // corresponding fields in NetworksAddPeeringRequest will be deprecated + // soon. NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"` // PeerNetwork: URL of the peer network. It can be either full URL or @@ -23638,10 +24794,15 @@ func (s *NetworksUpdatePeeringRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeGroup: A NodeGroup resource. To create a node group, you must -// first create a node templates. To learn more about node groups and -// sole-tenant nodes, read the Sole-tenant nodes documentation. (== +// NodeGroup: Represent a sole-tenant Node Group resource. +// +// A sole-tenant node is a physical server that is dedicated to hosting +// VM instances only for your specific project. Use sole-tenant nodes to +// keep your instances physically separated from instances in other +// projects, or to group your instances together on the same host +// hardware. For more information, read Sole-tenant nodes. (== // resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==) +// NextID: 16 type NodeGroup struct { AutoscalingPolicy *NodeGroupAutoscalingPolicy `json:"autoscalingPolicy,omitempty"` @@ -23653,6 +24814,8 @@ type NodeGroup struct { // property when you create the resource. Description string `json:"description,omitempty"` + Fingerprint string `json:"fingerprint,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` @@ -23662,10 +24825,11 @@ type NodeGroup struct { Kind string `json:"kind,omitempty"` // Possible values: - // "MANAGED_HOLDBACK_UNSPECIFIED" - // "OFF" - // "ON" - ManagedHoldback string `json:"managedHoldback,omitempty"` + // "DEFAULT" + // "MAINTENANCE_POLICY_UNSPECIFIED" + // "MIGRATE_WITHIN_NODE_GROUP" + // "RESTART_IN_PLACE" + MaintenancePolicy string `json:"maintenancePolicy,omitempty"` // Name: The name of the resource, provided by the client when initially // creating the resource. The resource name must be 1-63 characters @@ -23890,6 +25054,12 @@ type NodeGroupAutoscalingPolicy struct { MinSize int64 `json:"minSize,omitempty"` + // Possible values: + // "MODE_UNSPECIFIED" + // "OFF" + // "ON" + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxSize") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -24084,6 +25254,9 @@ type NodeGroupNode struct { // ServerBinding: Binding properties for the physical server. ServerBinding *ServerBinding `json:"serverBinding,omitempty"` + // ServerId: Server ID associated with this node. + ServerId string `json:"serverId,omitempty"` + // Possible values: // "CREATING" // "DELETING" @@ -24145,6 +25318,7 @@ func (s *NodeGroupsAddNodesRequest) MarshalJSON() ([]byte, error) { } type NodeGroupsDeleteNodesRequest struct { + // Nodes: Names of the nodes to delete. Nodes []string `json:"nodes,omitempty"` // ForceSendFields is a list of field names (e.g. "Nodes") to @@ -24515,10 +25689,12 @@ func (s *NodeGroupsSetNodeTemplateRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTemplate: A Node Template resource. To learn more about node -// templates and sole-tenant nodes, read the Sole-tenant nodes -// documentation. (== resource_for beta.nodeTemplates ==) (== -// resource_for v1.nodeTemplates ==) +// NodeTemplate: Represent a sole-tenant Node Template resource. +// +// You can use a template to define properties for nodes in a node +// group. For more information, read Creating node groups and instances. +// (== resource_for beta.nodeTemplates ==) (== resource_for +// v1.nodeTemplates ==) (== NextID: 16 ==) type NodeTemplate struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -24575,7 +25751,14 @@ type NodeTemplate struct { // with the resource id. SelfLinkWithId string `json:"selfLinkWithId,omitempty"` - // ServerBinding: Binding properties for the physical server. + // ServerBinding: Sets the binding properties for the physical server. + // Valid values include: + // - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available + // physical server + // - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical + // server whenever possible + // + // See Sole-tenant node options for more information. ServerBinding *ServerBinding `json:"serverBinding,omitempty"` // Status: [Output Only] The status of the node template. One of the @@ -25095,7 +26278,14 @@ func (s *NodeTemplatesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeType: A Node Type resource. +// NodeType: Represent a sole-tenant Node Type resource. +// +// Each node within a node group must have a node type. A node type +// specifies the total amount of cores and memory for that node. +// Currently, the only available node type is n1-node-96-624 node type +// that has 96 vCPUs and 624 GB of memory, available in multiple zones. +// For more information read Node types. (== resource_for beta.nodeTypes +// ==) (== resource_for v1.nodeTypes ==) type NodeType struct { // CpuPlatform: [Output Only] The CPU platform used by this node type. CpuPlatform string `json:"cpuPlatform,omitempty"` @@ -25701,9 +26891,15 @@ type NotificationEndpointGrpcSettings struct { Endpoint string `json:"endpoint,omitempty"` // PayloadName: Optional. If specified, this field is used to populate - // the ?name? field in gRPC requests. + // the "name" field in gRPC requests. PayloadName string `json:"payloadName,omitempty"` + // ResendInterval: Optional. This field is used to configure how often + // to send a full update of all non-healthy backends. If unspecified, + // full updates are not sent. If specified, must be in the range between + // 600 seconds to 3600 seconds. Nanos are disallowed. + ResendInterval *Duration `json:"resendInterval,omitempty"` + // RetryDurationSec: How much time (in seconds) is spent attempting // notification retries until a successful response is received. Default // is 30s. Limit is 20m (1200s). Must be a positive number. @@ -25887,8 +27083,19 @@ func (s *NotificationEndpointListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Operation: An Operation resource, used to manage asynchronous API -// requests. (== resource_for v1.globalOperations ==) (== resource_for +// Operation: Represents an Operation resource. +// +// You can use an operation resource to manage asynchronous API +// requests. For more information, read Handling API +// responses. +// +// Operations can be global, regional or zonal. +// - For global operations, use the globalOperations resource. +// - For regional operations, use the regionOperations resource. +// - For zonal operations, use the zonalOperations resource. +// +// For more information, read Global, Regional, and Zonal Resources. +// (== resource_for v1.globalOperations ==) (== resource_for // beta.globalOperations ==) (== resource_for v1.regionOperations ==) // (== resource_for beta.regionOperations ==) (== resource_for // v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) @@ -25921,7 +27128,7 @@ type Operation struct { // 404 means the resource was not found. HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This + // Id: [Output Only] The unique identifier for the operation. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` @@ -25933,7 +27140,7 @@ type Operation struct { // for Operation resources. Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the resource. + // Name: [Output Only] Name of the operation. Name string `json:"name,omitempty"` // OperationType: [Output Only] The type of operation, such as insert, @@ -25948,9 +27155,7 @@ type Operation struct { Progress int64 `json:"progress,omitempty"` // Region: [Output Only] The URL of the region where the operation - // resides. Only available when performing regional operations. You must - // specify this field as part of the HTTP request URL. It is not - // settable as a field in the request body. + // resides. Only applicable when performing regional operations. Region string `json:"region,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -25995,9 +27200,7 @@ type Operation struct { Warnings []*OperationWarnings `json:"warnings,omitempty"` // Zone: [Output Only] The URL of the zone where the operation resides. - // Only available when performing per-zone operations. You must specify - // this field as part of the HTTP request URL. It is not settable as a - // field in the request body. + // Only applicable when performing per-zone operations. Zone string `json:"zone,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -26700,12 +27903,13 @@ func (s *OriginAuthenticationMethod) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OutlierDetection: Settings controlling eviction of unhealthy hosts -// from the load balancing pool. +// OutlierDetection: Settings controlling the eviction of unhealthy +// hosts from the load balancing pool for the backend service. type OutlierDetection struct { // BaseEjectionTime: The base time that a host is ejected for. The real - // time is equal to the base time multiplied by the number of times the - // host has been ejected. Defaults to 30000ms or 30s. + // ejection time is equal to the base ejection time multiplied by the + // number of times the host has been ejected. Defaults to 30000ms or + // 30s. BaseEjectionTime *Duration `json:"baseEjectionTime,omitempty"` // ConsecutiveErrors: Number of errors before a host is ejected from the @@ -26716,19 +27920,19 @@ type OutlierDetection struct { // ConsecutiveGatewayFailure: The number of consecutive gateway failures // (502, 503, 504 status or connection errors that are mapped to one of // those status codes) before a consecutive gateway failure ejection - // occurs. Defaults to 5. + // occurs. Defaults to 3. ConsecutiveGatewayFailure int64 `json:"consecutiveGatewayFailure,omitempty"` // EnforcingConsecutiveErrors: The percentage chance that a host will be // actually ejected when an outlier status is detected through // consecutive 5xx. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 100. + // ramp it up slowly. Defaults to 0. EnforcingConsecutiveErrors int64 `json:"enforcingConsecutiveErrors,omitempty"` // EnforcingConsecutiveGatewayFailure: The percentage chance that a host // will be actually ejected when an outlier status is detected through // consecutive gateway failures. This setting can be used to disable - // ejection or to ramp it up slowly. Defaults to 0. + // ejection or to ramp it up slowly. Defaults to 100. EnforcingConsecutiveGatewayFailure int64 `json:"enforcingConsecutiveGatewayFailure,omitempty"` // EnforcingSuccessRate: The percentage chance that a host will be @@ -26737,13 +27941,13 @@ type OutlierDetection struct { // ramp it up slowly. Defaults to 100. EnforcingSuccessRate int64 `json:"enforcingSuccessRate,omitempty"` - // Interval: Time interval between ejection sweep analysis. This can + // Interval: Time interval between ejection analysis sweeps. This can // result in both new ejections as well as hosts being returned to - // service. Defaults to 10 seconds. + // service. Defaults to 1 second. Interval *Duration `json:"interval,omitempty"` // MaxEjectionPercent: Maximum percentage of hosts in the load balancing - // pool for the backend service that can be ejected. Defaults to 10%. + // pool for the backend service that can be ejected. Defaults to 50%. MaxEjectionPercent int64 `json:"maxEjectionPercent,omitempty"` // SuccessRateMinimumHosts: The number of hosts in a cluster that must @@ -26794,6 +27998,920 @@ func (s *OutlierDetection) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PacketIntervals: Next free: 7 +type PacketIntervals struct { + // AvgMs: Average observed inter-packet interval in milliseconds. + AvgMs int64 `json:"avgMs,omitempty,string"` + + // Duration: From how long ago in the past these intervals were + // observed. + // + // Possible values: + // "DURATION_UNSPECIFIED" + // "HOUR" + // "MAX" + // "MINUTE" + Duration string `json:"duration,omitempty"` + + // MaxMs: Maximum observed inter-packet interval in milliseconds. + MaxMs int64 `json:"maxMs,omitempty,string"` + + // MinMs: Minimum observed inter-packet interval in milliseconds. + MinMs int64 `json:"minMs,omitempty,string"` + + // NumIntervals: Number of inter-packet intervals from which these + // statistics were derived. + NumIntervals int64 `json:"numIntervals,omitempty,string"` + + // Type: The type of packets for which inter-packet intervals were + // computed. + // + // Possible values: + // "LOOPBACK" + // "RECEIVE" + // "TRANSMIT" + // "TYPE_UNSPECIFIED" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AvgMs") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AvgMs") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketIntervals) MarshalJSON() ([]byte, error) { + type NoMethod PacketIntervals + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroring: Represents a PacketMirroring resource. +type PacketMirroring struct { + // CollectorIlb: The Forwarding Rule resource of type + // loadBalancingScheme=INTERNAL that will be used as collector for + // mirrored traffic. The specified forwarding rule must have + // isMirroringCollector set to true. + CollectorIlb *PacketMirroringForwardingRuleInfo `json:"collectorIlb,omitempty"` + + // Collectors: PacketMirroring collectorInfos. Each collectorInfo + // specifies a set of collector VM instances, preferably in the same + // zone as the mirrored VM(s) + Collectors *PacketMirroringCollectorInfo `json:"collectors,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Enable: Indicates whether or not this packet mirroring takes effect. + // If set to FALSE, this packet mirroring policy will not be enforced on + // the network. + // + // The default is TRUE. + // + // Possible values: + // "FALSE" + // "TRUE" + Enable string `json:"enable,omitempty"` + + // Filter: Filter for mirrored traffic. If unspecified, all traffic is + // mirrored. + Filter *PacketMirroringFilter `json:"filter,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#packetMirroring for packet mirrorings. + Kind string `json:"kind,omitempty"` + + // MirroredResources: PacketMirroring mirroredResourceInfos. + // MirroredResourceInfo specifies a set of mirrored VM instances, + // subnetworks and/or tags for which traffic from/to all VM instances + // will be mirrored. + MirroredResources *PacketMirroringMirroredResourceInfo `json:"mirroredResources,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Network: Specifies the mirrored VPC network. Only packets in this + // network will be mirrored. All mirrored VMs should have a NIC in the + // given network. All mirrored subnetworks should belong to the given + // network. + Network *PacketMirroringNetworkInfo `json:"network,omitempty"` + + // PacketMatchers: PacketMirroring packetMatchers. Each packetMatcher + // specifies a CIRD filter that will apply to the source or destination + // IP in the IP header for the mirrored VM traffic. + PacketMatchers []*PacketMirroringPacketMatcher `json:"packetMatchers,omitempty"` + + // Priority: The priority of applying this configuration. Priority is + // used to break ties in cases where there is more than one matching + // rule. In the case of two rules that apply for a given Instance, the + // one with the lowest-numbered priority value wins. + // + // Default value is 1000. Valid range is 0 through 65535. + Priority int64 `json:"priority,omitempty"` + + // Region: [Output Only] URI of the region where the packetMirroring + // resides. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // SelfLinkWithId: [Output Only] Server-defined URL for this resource + // with the resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CollectorIlb") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CollectorIlb") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroring) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroring + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroringAggregatedList: Contains a list of packetMirrorings. +type PacketMirroringAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of PacketMirroring resources. + Items map[string]PacketMirroringsScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *PacketMirroringAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroringAggregatedListWarning: [Output Only] Informational +// warning message. +type PacketMirroringAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*PacketMirroringAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringCollectorInfo struct { + // Instances: A set of virtual machines configured as destination of the + // mirrored traffic. They must live in zones contained in the same + // region as this packetMirroring. + Instances []*PacketMirroringCollectorInfoInstanceInfo `json:"instances,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringCollectorInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringCollectorInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringCollectorInfoInstanceInfo struct { + // Url: Resource URL to the virtual machine instance configured as + // destination of the mirrored traffic. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Url") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Url") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringCollectorInfoInstanceInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringCollectorInfoInstanceInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringFilter struct { + // IPProtocols: Protocols that apply as filter on mirrored traffic. If + // no protocols are specified, all traffic that matches the specified + // CIDR ranges is mirrored. If neither cidrRanges nor IPProtocols is + // specified, all traffic is mirrored. + IPProtocols []string `json:"IPProtocols,omitempty"` + + // CidrRanges: IP CIDR ranges that apply as filter on the source + // (ingress) or destination (egress) IP in the IP header. Only IPv4 is + // supported. If no ranges are specified, all traffic that matches the + // specified IPProtocols is mirrored. If neither cidrRanges nor + // IPProtocols is specified, all traffic is mirrored. + CidrRanges []string `json:"cidrRanges,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IPProtocols") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IPProtocols") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringFilter) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringForwardingRuleInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the forwarding + // rule; defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` + + // Url: Resource URL to the forwarding rule representing the ILB + // configured as destination of the mirrored traffic. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringForwardingRuleInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringForwardingRuleInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroringList: Contains a list of PacketMirroring resources. +type PacketMirroringList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of PacketMirroring resources. + Items []*PacketMirroring `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#packetMirroring + // for packetMirrorings. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *PacketMirroringListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringList) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroringListWarning: [Output Only] Informational warning +// message. +type PacketMirroringListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*PacketMirroringListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringMirroredResourceInfo struct { + // Instances: A set of virtual machine instances that are being + // mirrored. They must live in zones contained in the same region as + // this packetMirroring. + // + // Note that this config will apply only to those network interfaces of + // the Instances that belong to the network specified in this + // packetMirroring. + // + // You may specify a maximum of 50 Instances. + Instances []*PacketMirroringMirroredResourceInfoInstanceInfo `json:"instances,omitempty"` + + // Subnetworks: A set of subnetworks for which traffic from/to all VM + // instances will be mirrored. They must live in the same region as this + // packetMirroring. + // + // You may specify a maximum of 5 subnetworks. + Subnetworks []*PacketMirroringMirroredResourceInfoSubnetInfo `json:"subnetworks,omitempty"` + + // Tags: A set of mirrored tags. Traffic from/to all VM instances that + // have one or more of these tags will be mirrored. + Tags []string `json:"tags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringMirroredResourceInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringMirroredResourceInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringMirroredResourceInfoInstanceInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the instance; + // defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` + + // Url: Resource URL to the virtual machine instance which is being + // mirrored. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringMirroredResourceInfoInstanceInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringMirroredResourceInfoInstanceInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringMirroredResourceInfoSubnetInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the subnetwork; + // defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` + + // Url: Resource URL to the subnetwork for which traffic from/to all VM + // instances will be mirrored. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringMirroredResourceInfoSubnetInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringMirroredResourceInfoSubnetInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringNetworkInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the network; + // defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` + + // Url: URL of the network resource. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringNetworkInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringNetworkInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringPacketMatcher struct { + // CidrRange: IP CIDR range that applies as filter on the source or + // destination IP in the IP header. Only IPv4 is supported. + CidrRange string `json:"cidrRange,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CidrRange") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CidrRange") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringPacketMatcher) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringPacketMatcher + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringsScopedList struct { + // PacketMirrorings: A list of packetMirrorings contained in this scope. + PacketMirrorings []*PacketMirroring `json:"packetMirrorings,omitempty"` + + // Warning: Informational warning which replaces the list of + // packetMirrorings when the list is empty. + Warning *PacketMirroringsScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PacketMirrorings") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PacketMirrorings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringsScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroringsScopedListWarning: Informational warning which +// replaces the list of packetMirrorings when the list is empty. +type PacketMirroringsScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*PacketMirroringsScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringsScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringsScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringsScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PathMatcher: A matcher for the path portion of the URL. The // BackendService from the longest-matched rule will serve the URL. If // no rule was matched, the default service will be used. @@ -26858,7 +28976,8 @@ type PathMatcher struct { // For example: a pathRule with a path /a/b/c/* will match before /a/b/* // irrespective of the order in which those paths appear in this // list. - // Only one of pathRules or routeRules must be set. + // Within a given pathMatcher, only one of pathRules or routeRules must + // be set. PathRules []*PathRule `json:"pathRules,omitempty"` // RouteRules: The list of ordered HTTP route rules. Use this list @@ -26866,7 +28985,10 @@ type PathMatcher struct { // are desired. The order of specifying routeRules matters: the first // rule that matches will cause its specified routing action to take // effect. - // Only one of pathRules or routeRules must be set. + // Within a given pathMatcher, only one of pathRules or routeRules must + // be set. + // routeRules are not supported in UrlMaps intended for External Load + // balancers. RouteRules []*HttpRouteRule `json:"routeRules,omitempty"` // ForceSendFields is a list of field names (e.g. "DefaultRouteAction") @@ -26987,12 +29109,6 @@ type PerInstanceConfig struct { // be unset. Fingerprint string `json:"fingerprint,omitempty"` - // Instance: The URL of the instance. Serves as a merge key during - // UpdatePerInstanceConfigs operation, i.e. if per-instance config with - // the same instance URL exists then it will be updated, otherwise a new - // one will be created. - Instance string `json:"instance,omitempty"` - // Name: The name of the per-instance config and the corresponding // instance. Serves as a merge key during UpdatePerInstanceConfigs // operation, i.e. if per-instance config with the same name exists then @@ -27002,8 +29118,6 @@ type PerInstanceConfig struct { // the group will result in a failure. Name string `json:"name,omitempty"` - Override *ManagedInstanceOverride `json:"override,omitempty"` - // PreservedState: Intended preserved state for the given instance. Does // not contain state generated based on Stateful Policy. PreservedState *PreservedState `json:"preservedState,omitempty"` @@ -27125,29 +29239,36 @@ func (s *PermissionConstraint) MarshalJSON() ([]byte, error) { // // // -// A `Policy` consists of a list of `bindings`. A `binding` binds a list -// of `members` to a `role`, where the members can be user accounts, -// Google groups, Google domains, and service accounts. A `role` is a -// named list of permissions defined by IAM. +// A `Policy` is a collection of `bindings`. A `binding` binds one or +// more `members` to a single `role`. Members can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions (defined by IAM or configured +// by users). A `binding` can optionally specify a `condition`, which is +// a logic expression that further constrains the role binding based on +// attributes about the request and/or target resource. // // **JSON Example** // -// { "bindings": [ { "role": "roles/owner", "members": [ -// "user:mike@example.com", "group:admins@example.com", +// { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", +// "members": [ "user:mike@example.com", "group:admins@example.com", // "domain:google.com", -// "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { -// "role": "roles/viewer", "members": ["user:sean@example.com"] } ] +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": +// ["user:eve@example.com"], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ] // } // // **YAML Example** // // bindings: - members: - user:mike@example.com - // group:admins@example.com - domain:google.com - -// serviceAccount:my-other-app@appspot.gserviceaccount.com role: -// roles/owner - members: - user:sean@example.com role: -// roles/viewer -// -// +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') // // For a description of IAM and its features, see the [IAM developer's // guide](https://cloud.google.com/iam/docs). @@ -27156,8 +29277,9 @@ type Policy struct { // policy. AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` - // Bindings: Associates a list of `members` to a `role`. `bindings` with - // no members will result in an error. + // Bindings: Associates a list of `members` to a `role`. Optionally may + // specify a `condition` that determines when binding is in effect. + // `bindings` with no members will result in an error. Bindings []*Binding `json:"bindings,omitempty"` // Etag: `etag` is used for optimistic concurrency control as a way to @@ -27170,7 +29292,9 @@ type Policy struct { // to the same version of the policy. // // If no `etag` is provided in the call to `setIamPolicy`, then the - // existing policy is overwritten blindly. + // existing policy is overwritten. Due to blind-set semantics of an + // etag-less policy, 'setIamPolicy' will not fail even if either of + // incoming or stored policy does not meet the version requirements. Etag string `json:"etag,omitempty"` IamOwned bool `json:"iamOwned,omitempty"` @@ -27185,7 +29309,19 @@ type Policy struct { // denied. Rules []*Rule `json:"rules,omitempty"` - // Version: Deprecated. + // Version: Specifies the format of the policy. + // + // Valid values are 0, 1, and 3. Requests specifying an invalid value + // will be rejected. + // + // Operations affecting conditional bindings must specify version 3. + // This can be either setting a conditional policy, modifying a + // conditional binding, or removing a conditional binding from the + // stored conditional policy. Operations on non-conditional policies may + // specify any valid value or leave the field unset. + // + // If no etag is provided in the call to `setIamPolicy`, any version + // compliance checks on the incoming and/or stored policy is skipped. Version int64 `json:"version,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -27287,7 +29423,6 @@ type PreservedStatePreservedDisk struct { // Possible values: // "NEVER" // "ON_PERMANENT_INSTANCE_DELETION" - // "WHEN_NOT_IN_USE" AutoDelete string `json:"autoDelete,omitempty"` // Mode: The mode in which to attach this disk, either READ_WRITE or @@ -27356,7 +29491,7 @@ type Principal struct { // Properties: A map of Istio attribute to expected values. Exact match, // prefix match, and suffix match are supported for values. For example, - // `request.headers[version]: ?v1?`. The properties are ANDed together. + // `request.headers[version]: "v1". The properties are ANDed together. Properties map[string]string `json:"properties,omitempty"` // Users: The user names/IDs or service accounts. Exact match, prefix @@ -27386,9 +29521,12 @@ func (s *Principal) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Project: A Project resource. For an overview of projects, see Cloud -// Platform Resource Hierarchy. (== resource_for v1.projects ==) (== -// resource_for beta.projects ==) +// Project: Represents a Project resource. +// +// A project is used to organize resources in a Google Cloud Platform +// environment. For more information, read about the Resource +// Hierarchy. (== resource_for v1.projects ==) (== resource_for +// beta.projects ==) type Project struct { // CommonInstanceMetadata: Metadata key/value pairs available to all // instances contained in this project. See Custom metadata for more @@ -27667,6 +29805,903 @@ func (s *ProjectsSetDefaultServiceAccountRequest) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PublicAdvertisedPrefix: A public advertised prefix represents an +// aggregated IP prefix or netblock which customers bring to cloud. The +// IP prefix is a single unit of route advertisement and is announced +// globally to the internet. +type PublicAdvertisedPrefix struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // DnsVerificationIp: The IPv4 address to be used for reverse DNS + // verification. + DnsVerificationIp string `json:"dnsVerificationIp,omitempty"` + + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a new PublicAdvertisedPrefix. An + // up-to-date fingerprint must be provided in order to update the + // PublicAdvertisedPrefix, otherwise the request will fail with error + // 412 conditionNotMet. + // + // To see the latest fingerprint, make a get() request to retrieve a + // PublicAdvertisedPrefix. + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] The unique identifier for the resource type. The + // server generates this identifier. + Id uint64 `json:"id,omitempty,string"` + + // IpCidrRange: The IPv4 address range, in CIDR format, represented by + // this public advertised prefix. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#publicAdvertisedPrefix for public advertised prefixes. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // PublicDelegatedPrefixs: [Output Only] The list of public delegated + // prefixes that exist for this public advertised prefix. + PublicDelegatedPrefixs []*PublicAdvertisedPrefixPublicDelegatedPrefix `json:"publicDelegatedPrefixs,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // SelfLinkWithId: [Output Only] Server-defined URL with id for the + // resource. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + + // SharedSecret: [Output Only] The shared secret to be used for reverse + // DNS verification. + SharedSecret string `json:"sharedSecret,omitempty"` + + // Status: The status of the public advertised prefix. + // + // Possible values: + // "INITIAL" + // "PREFIX_CONFIGURATION_COMPLETE" + // "PREFIX_CONFIGURATION_IN_PROGRESS" + // "PREFIX_REMOVAL_IN_PROGRESS" + // "PTR_CONFIGURED" + // "REVERSE_DNS_LOOKUP_FAILED" + // "VALIDATED" + Status string `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PublicAdvertisedPrefix) MarshalJSON() ([]byte, error) { + type NoMethod PublicAdvertisedPrefix + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PublicAdvertisedPrefixList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of PublicAdvertisedPrefix resources. + Items []*PublicAdvertisedPrefix `json:"items,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#publicAdvertisedPrefix for public advertised prefixes. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *PublicAdvertisedPrefixListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicAdvertisedPrefixList) MarshalJSON() ([]byte, error) { + type NoMethod PublicAdvertisedPrefixList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PublicAdvertisedPrefixListWarning: [Output Only] Informational +// warning message. +type PublicAdvertisedPrefixListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*PublicAdvertisedPrefixListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicAdvertisedPrefixListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PublicAdvertisedPrefixListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PublicAdvertisedPrefixListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicAdvertisedPrefixListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PublicAdvertisedPrefixListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PublicAdvertisedPrefixPublicDelegatedPrefix: Represents a CIDR range +// which can be used to assign addresses. +type PublicAdvertisedPrefixPublicDelegatedPrefix struct { + // Name: The name of the public delegated prefix + Name string `json:"name,omitempty"` + + // Region: The region of the public delegated prefix if it is regional. + // If absent, the prefix is global. + Region string `json:"region,omitempty"` + + // Status: The status of the public delegated prefix. Possible values + // are: ACTIVE: The public delegated prefix is active DRAINED: The + // public delegated prefix is drained. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicAdvertisedPrefixPublicDelegatedPrefix) MarshalJSON() ([]byte, error) { + type NoMethod PublicAdvertisedPrefixPublicDelegatedPrefix + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PublicDelegatedPrefix: A PublicDelegatedPrefix resource represents an +// IP block within a PublicAdvertisedPrefix that is configured within a +// single cloud scope (global or region). IPs in the block can be +// allocated to resources within that scope. Public delegated prefixes +// may be further broken up into smaller IP blocks in the same scope as +// the parent block. +type PublicDelegatedPrefix struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Fingerprint: Fingerprint of this resource. A hash of the contents + // stored in this object. This field is used in optimistic locking. This + // field will be ignored when inserting a new PublicDelegatedPrefix. An + // up-to-date fingerprint must be provided in order to update the + // PublicDelegatedPrefix, otherwise the request will fail with error 412 + // conditionNotMet. + // + // To see the latest fingerprint, make a get() request to retrieve a + // PublicDelegatedPrefix. + Fingerprint string `json:"fingerprint,omitempty"` + + // Id: [Output Only] The unique identifier for the resource type. The + // server generates this identifier. + Id uint64 `json:"id,omitempty,string"` + + // IpCidrRange: The IPv4 address range, in CIDR format, represented by + // this public delegated prefix. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#publicDelegatedPrefix for public delegated prefixes. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // ParentPrefix: The URL of parent prefix. Either PublicAdvertisedPrefix + // or PublicDelegatedPrefix. + ParentPrefix string `json:"parentPrefix,omitempty"` + + // PublicDelegatedSubPrefixs: The list of sub public delegated prefixes + // that exist for this public delegated prefix. + PublicDelegatedSubPrefixs []*PublicDelegatedPrefixPublicDelegatedSubPrefix `json:"publicDelegatedSubPrefixs,omitempty"` + + // Region: [Output Only] URL of the region where the public delegated + // prefix resides. This field applies only to the region resource. You + // must specify this field as part of the HTTP request URL. It is not + // settable as a field in the request body. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // SelfLinkWithId: [Output Only] Server-defined URL with id for the + // resource. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + + // Status: [Output Only] The status of the public delegated prefix. + Status interface{} `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PublicDelegatedPrefix) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefix + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PublicDelegatedPrefixAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of PublicDelegatedPrefixesScopedList resources. + Items map[string]PublicDelegatedPrefixesScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#publicDelegatedPrefixAggregatedList for aggregated lists of + // public delegated prefixes. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *PublicDelegatedPrefixAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicDelegatedPrefixAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PublicDelegatedPrefixAggregatedListWarning: [Output Only] +// Informational warning message. +type PublicDelegatedPrefixAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*PublicDelegatedPrefixAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicDelegatedPrefixAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PublicDelegatedPrefixAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicDelegatedPrefixAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PublicDelegatedPrefixList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of PublicDelegatedPrefix resources. + Items []*PublicDelegatedPrefix `json:"items,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#publicDelegatedPrefixList for public delegated prefixes. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *PublicDelegatedPrefixListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicDelegatedPrefixList) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PublicDelegatedPrefixListWarning: [Output Only] Informational warning +// message. +type PublicDelegatedPrefixListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*PublicDelegatedPrefixListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicDelegatedPrefixListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PublicDelegatedPrefixListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicDelegatedPrefixListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PublicDelegatedPrefixPublicDelegatedSubPrefix: Represents a sub +// PublicDelegatedPrefix. +type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { + // DelegateeProject: Name of the project scoping this + // PublicDelegatedSubPrefix. + DelegateeProject string `json:"delegateeProject,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // IpCidrRange: The IPv4 address range, in CIDR format, represented by + // this sub public delegated prefix. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // IsAddress: Whether the sub prefix is delegated to create Address + // resources in the delegatee project. + IsAddress bool `json:"isAddress,omitempty"` + + // Name: The name of the sub public delegated prefix. + Name string `json:"name,omitempty"` + + // Region: [Output Only] The region of the sub public delegated prefix + // if it is regional. If absent, the sub prefix is global. + Region string `json:"region,omitempty"` + + // Status: [Output Only] The status of the sub public delegated prefix. + Status interface{} `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DelegateeProject") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DelegateeProject") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PublicDelegatedPrefixPublicDelegatedSubPrefix) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixPublicDelegatedSubPrefix + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PublicDelegatedPrefixesScopedList struct { + // PublicDelegatedPrefixes: [Output Only] A list of + // PublicDelegatedPrefixes contained in this scope. + PublicDelegatedPrefixes []*PublicDelegatedPrefix `json:"publicDelegatedPrefixes,omitempty"` + + // Warning: [Output Only] Informational warning which replaces the list + // of public delegated prefixes when the list is empty. + Warning *PublicDelegatedPrefixesScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PublicDelegatedPrefixes") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PublicDelegatedPrefixes") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PublicDelegatedPrefixesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixesScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PublicDelegatedPrefixesScopedListWarning: [Output Only] Informational +// warning which replaces the list of public delegated prefixes when the +// list is empty. +type PublicDelegatedPrefixesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*PublicDelegatedPrefixesScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicDelegatedPrefixesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixesScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PublicDelegatedPrefixesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicDelegatedPrefixesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PublicDelegatedPrefixesScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Quota: A quotas entry. type Quota struct { // Limit: [Output Only] Quota limit for this metric. @@ -27680,7 +30715,17 @@ type Quota struct { // "AUTOSCALERS" // "BACKEND_BUCKETS" // "BACKEND_SERVICES" + // "C2_CPUS" // "COMMITMENTS" + // "COMMITTED_C2_CPUS" + // "COMMITTED_CPUS" + // "COMMITTED_LOCAL_SSD_TOTAL_GB" + // "COMMITTED_N2_CPUS" + // "COMMITTED_NVIDIA_K80_GPUS" + // "COMMITTED_NVIDIA_P100_GPUS" + // "COMMITTED_NVIDIA_P4_GPUS" + // "COMMITTED_NVIDIA_T4_GPUS" + // "COMMITTED_NVIDIA_V100_GPUS" // "CPUS" // "CPUS_ALL_REGIONS" // "DISKS_TOTAL_GB" @@ -27699,6 +30744,7 @@ type Quota struct { // "INTERCONNECTS" // "INTERCONNECT_ATTACHMENTS_PER_REGION" // "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS" + // "INTERCONNECT_TOTAL_GBPS" // "INTERNAL_ADDRESSES" // "INTERNAL_FORWARDING_RULES_PER_NETWORK" // "INTERNAL_FORWARDING_RULES_WITH_GLOBAL_ACCESS_PER_NETWORK" @@ -27710,6 +30756,7 @@ type Quota struct { // "IN_USE_SNAPSHOT_SCHEDULES" // "LOCAL_SSD_TOTAL_GB" // "MACHINE_IMAGES" + // "N2_CPUS" // "NETWORKS" // "NETWORK_ENDPOINT_GROUPS" // "NVIDIA_K80_GPUS" @@ -27733,10 +30780,12 @@ type Quota struct { // "PRIVATE_V6_ACCESS_SUBNETWORKS" // "REGIONAL_AUTOSCALERS" // "REGIONAL_INSTANCE_GROUP_MANAGERS" + // "RESERVATIONS" // "RESOURCE_POLICIES" // "ROUTERS" // "ROUTES" // "SECURITY_POLICIES" + // "SECURITY_POLICY_CEVAL_RULES" // "SECURITY_POLICY_RULES" // "SNAPSHOTS" // "SSD_TOTAL_GB" @@ -27875,8 +30924,11 @@ func (s *Reference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Region: Region resource. (== resource_for beta.regions ==) (== -// resource_for v1.regions ==) +// Region: Represents a Region resource. +// +// A region is a geographical area where a resource is located. For more +// information, read Regions and Zones. (== resource_for beta.regions +// ==) (== resource_for v1.regions ==) type Region struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -28105,8 +31157,8 @@ func (s *RegionAutoscalerListWarningData) MarshalJSON() ([]byte, error) { } type RegionCommitmentsUpdateReservationsRequest struct { - // Reservations: List of reservations for the capacity move of VMs with - // accelerators and local ssds. + // Reservations: List of two reservations to transfer GPUs and local SSD + // between. Reservations []*Reservation `json:"reservations,omitempty"` // ForceSendFields is a list of field names (e.g. "Reservations") to @@ -28529,15 +31581,11 @@ func (s *RegionInstanceGroupListWarningData) MarshalJSON() ([]byte, error) { // RegionInstanceGroupManagerDeleteInstanceConfigReq: // RegionInstanceGroupManagers.deletePerInstanceConfigs type RegionInstanceGroupManagerDeleteInstanceConfigReq struct { - // Instances: The list of instances for which we want to delete - // per-instance configs on this managed instance group. - Instances []string `json:"instances,omitempty"` - // Names: The list of instance names for which we want to delete // per-instance configs on this managed instance group. Names []string `json:"names,omitempty"` - // ForceSendFields is a list of field names (e.g. "Instances") to + // ForceSendFields is a list of field names (e.g. "Names") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -28545,8 +31593,8 @@ type RegionInstanceGroupManagerDeleteInstanceConfigReq struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Instances") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Names") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -28812,8 +31860,9 @@ func (s *RegionInstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]by // RegionInstanceGroupManagersApplyUpdatesRequest: // InstanceGroupManagers.applyUpdatesToInstances type RegionInstanceGroupManagersApplyUpdatesRequest struct { - // Instances: The list of instances for which we want to apply changes - // on this managed instance group. + // Instances: The list of URLs of one or more instances for which you + // want to apply updates. Each URL can be a full URL or a partial URL, + // such as zones/[ZONE]/instances/[INSTANCE_NAME]. Instances []string `json:"instances,omitempty"` // MaximalAction: The maximal action that should be performed on the @@ -28827,8 +31876,15 @@ type RegionInstanceGroupManagersApplyUpdatesRequest struct { // "RESTART" MaximalAction string `json:"maximalAction,omitempty"` - // MinimalAction: The minimal action that should be perfomed on the - // instances. By default NONE. + // MinimalAction: The minimal action that you want to perform on each + // instance during the update: + // - REPLACE: At minimum, delete the instance and create it again. + // - RESTART: Stop the instance and start it again. + // - REFRESH: Do not stop the instance. + // - NONE: Do not disrupt the instance at all. By default, the minimum + // action is NONE. If your update requires a more disruptive action than + // you set with this flag, the necessary action is performed to execute + // the update. // // Possible values: // "NONE" @@ -28837,8 +31893,15 @@ type RegionInstanceGroupManagersApplyUpdatesRequest struct { // "RESTART" MinimalAction string `json:"minimalAction,omitempty"` - // MostDisruptiveAllowedAction: The most disruptive action that allowed - // to be performed on the instances. By default REPLACE. + // MostDisruptiveAllowedAction: The most disruptive action that you want + // to perform on each instance during the update: + // - REPLACE: Delete the instance and create it again. + // - RESTART: Stop the instance and start it again. + // - REFRESH: Do not stop the instance. + // - NONE: Do not disrupt the instance at all. By default, the most + // disruptive allowed action is REPLACE. If your update requires a more + // disruptive action than you set with this flag, the update request + // will fail. // // Possible values: // "NONE" @@ -28928,6 +31991,46 @@ func (s *RegionInstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type RegionInstanceGroupManagersListErrorsResponse struct { + // Items: [Output Only] The list of errors of the managed instance + // group. + Items []*InstanceManagedByIgmError `json:"items,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Items") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RegionInstanceGroupManagersListErrorsResponse) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersListErrorsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RegionInstanceGroupManagersListInstanceConfigsResp struct { // Items: [Output Only] The list of PerInstanceConfig. Items []*PerInstanceConfig `json:"items,omitempty"` @@ -29778,10 +32881,14 @@ func (s *RequestMirrorPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Reservation: Reservation resource +// Reservation: Represents a reservation resource. A reservation ensures +// that capacity is held in a specific zone even if the reserved VMs are +// not running. For more information, read Reserving zonal resources. +// (== resource_for beta.reservations ==) (== resource_for +// v1.reservations ==) type Reservation struct { - // Commitment: [OutputOnly] Full or partial url for parent commitment - // for reservations which are tied to a commitment. + // Commitment: [Output Only] Full or partial URL to a parent commitment. + // This field displays for reservations that are tied to a commitment. Commitment string `json:"commitment,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -29823,13 +32930,23 @@ type Reservation struct { SpecificReservation *AllocationSpecificSKUReservation `json:"specificReservation,omitempty"` // SpecificReservationRequired: Indicates whether the reservation can be - // consumed by VMs with "any reservation" defined. If the field is set, - // then only VMs that target the reservation by name using - // --reservation-affinity can consume this reservation. + // consumed by VMs with affinity for "any" reservation. If the field is + // set, then only VMs that target the reservation by name can consume + // from this reservation. SpecificReservationRequired bool `json:"specificReservationRequired,omitempty"` - // Zone: Zone in which the reservation resides, must be provided if - // reservation is created with commitment creation. + // Status: [Output Only] The status of the reservation. + // + // Possible values: + // "CREATING" + // "DELETING" + // "INVALID" + // "READY" + // "UPDATING" + Status string `json:"status,omitempty"` + + // Zone: Zone in which the reservation resides. A zone must be provided + // if the reservation is created within a commitment. Zone string `json:"zone,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -29859,8 +32976,8 @@ func (s *Reservation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReservationAffinity: AllocationAffinity is the configuration of -// desired allocation which this instance could take capacity from. +// ReservationAffinity: Specifies the reservations that this instance +// can consume from. type ReservationAffinity struct { // ConsumeReservationType: Specifies the type of reservation from which // this instance can consume resources: ANY_RESERVATION (default), @@ -29874,10 +32991,13 @@ type ReservationAffinity struct { // "UNSPECIFIED" ConsumeReservationType string `json:"consumeReservationType,omitempty"` - // Key: Corresponds to the label key of reservation resource. + // Key: Corresponds to the label key of a reservation resource. To + // target a SPECIFIC_RESERVATION by name, specify + // googleapis.com/reservation-name as the key and specify the name of + // your reservation as its value. Key string `json:"key,omitempty"` - // Values: Corresponds to the label values of reservation resource. + // Values: Corresponds to the label values of a reservation resource. Values []string `json:"values,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -30869,6 +33989,20 @@ func (s *ResourcePolicyDailyCycle) MarshalJSON() ([]byte, error) { // resource placement configuration. It specifies the failure bucket // separation as well as network locality type ResourcePolicyGroupPlacementPolicy struct { + // AvailabilityDomainCount: The number of availability domains instances + // will be spread across. If two instances are in different availability + // domain, they will not be put in the same low latency network + AvailabilityDomainCount int64 `json:"availabilityDomainCount,omitempty"` + + // Distribution: Distribution specifies how the instances are placed at + // host level. If set to SPREAD, no two instances will be put on the + // same host + // + // Possible values: + // "SPREAD" + // "UNSPECIFIED" + Distribution string `json:"distribution,omitempty"` + // Locality: Specifies network locality // // Possible values: @@ -30888,20 +34022,22 @@ type ResourcePolicyGroupPlacementPolicy struct { // VmCount: Number of vms in this placement group VmCount int64 `json:"vmCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "Locality") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AvailabilityDomainCount") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locality") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AvailabilityDomainCount") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -31238,8 +34374,8 @@ type ResourcePolicySnapshotSchedulePolicySnapshotProperties struct { // modified by the setLabels method. Label values may be empty. Labels map[string]string `json:"labels,omitempty"` - // StorageLocations: GCS bucket storage location of the auto snapshot - // (regional or multi-regional). + // StorageLocations: Cloud Storage bucket storage location of the auto + // snapshot (regional or multi-regional). StorageLocations []string `json:"storageLocations,omitempty"` // ForceSendFields is a list of field names (e.g. "GuestFlush") to @@ -31266,19 +34402,55 @@ func (s *ResourcePolicySnapshotSchedulePolicySnapshotProperties) MarshalJSON() ( } type ResourcePolicyVmMaintenancePolicy struct { + ConcurrencyControlGroup *ResourcePolicyVmMaintenancePolicyConcurrencyControl `json:"concurrencyControlGroup,omitempty"` + // MaintenanceWindow: Maintenance windows that are applied to VMs // covered by this policy. MaintenanceWindow *ResourcePolicyVmMaintenancePolicyMaintenanceWindow `json:"maintenanceWindow,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaintenanceWindow") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. + // "ConcurrencyControlGroup") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConcurrencyControlGroup") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ResourcePolicyVmMaintenancePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyVmMaintenancePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourcePolicyVmMaintenancePolicyConcurrencyControl: A concurrency +// control configuration. Defines a group config that, when attached to +// an instance, recognizes that instance as part of a group of instances +// where only up the concurrency_limit of instances in that group can +// undergo simultaneous maintenance. For more information: +// go/concurrency-control-design-doc +type ResourcePolicyVmMaintenancePolicyConcurrencyControl struct { + ConcurrencyLimit int64 `json:"concurrencyLimit,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConcurrencyLimit") to + // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaintenanceWindow") to + // NullFields is a list of field names (e.g. "ConcurrencyLimit") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -31288,8 +34460,8 @@ type ResourcePolicyVmMaintenancePolicy struct { NullFields []string `json:"-"` } -func (s *ResourcePolicyVmMaintenancePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResourcePolicyVmMaintenancePolicy +func (s *ResourcePolicyVmMaintenancePolicyConcurrencyControl) MarshalJSON() ([]byte, error) { + type NoMethod ResourcePolicyVmMaintenancePolicyConcurrencyControl raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -31399,32 +34571,19 @@ func (s *ResourcePolicyWeeklyCycleDayOfWeek) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Route: Represents a Route resource. A route specifies how certain -// packets should be handled by the network. Routes are associated with -// instances by tags and the set of routes for a particular instance is -// called its routing table. +// Route: Represents a Route resource. // -// For each packet leaving an instance, the system searches that -// instance's routing table for a single best matching route. Routes -// match packets by destination IP address, preferring smaller or more -// specific ranges over larger ones. If there is a tie, the system -// selects the route with the smallest priority value. If there is still -// a tie, it uses the layer three and four packet headers to select just -// one of the remaining matching routes. The packet is then forwarded as -// specified by the nextHop field of the winning route - either to -// another instance destination, an instance gateway, or a Google -// Compute Engine-operated gateway. -// -// Packets that do not match any route in the sending instance's routing -// table are dropped. (== resource_for beta.routes ==) (== resource_for -// v1.routes ==) +// A route defines a path from VM instances in the VPC network to a +// specific destination. This destination can be inside or outside the +// VPC network. For more information, read the Routes overview. (== +// resource_for beta.routes ==) (== resource_for v1.routes ==) type Route struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional description of this resource. Provide this - // property when you create the resource. + // field when you create the resource. Description string `json:"description,omitempty"` // DestRange: The destination range of outgoing packets that this route @@ -31442,10 +34601,10 @@ type Route struct { // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. Name string `json:"name,omitempty"` // Network: Fully-qualified URL of the network that this route applies @@ -31455,7 +34614,7 @@ type Route struct { // NextHopGateway: The URL to a gateway that should handle matching // packets. You can only specify the internet gateway using a full or // partial valid URL: - // projects//global/gateways/default-internet-gateway + // projects/project/global/gateways/default-internet-gateway NextHopGateway string `json:"nextHopGateway,omitempty"` // NextHopIlb: The URL to a forwarding rule of type @@ -31464,9 +34623,7 @@ type Route struct { // example, the following are all valid URLs: // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule - // - regions/region/forwardingRules/forwardingRule Note that this can - // only be used when the destination_range is a public (non-RFC 1918) IP - // CIDR range. + // - regions/region/forwardingRules/forwardingRule NextHopIlb string `json:"nextHopIlb,omitempty"` // NextHopInstance: The URL to an instance that should handle matching @@ -31500,9 +34657,9 @@ type Route struct { // Priority: The priority of this route. Priority is used to break ties // in cases where there is more than one matching route of equal prefix - // length. In the case of two routes with equal prefix length, the one - // with the lowest-numbered priority value wins. Default value is 1000. - // Valid range is 0 through 65535. + // length. In cases where multiple routes have equal prefix length, the + // one with the lowest-numbered priority value wins. The default value + // is `1000`. The priority value must be from `0` to `65535`, inclusive. Priority int64 `json:"priority,omitempty"` // SelfLink: [Output Only] Server-defined fully-qualified URL for this @@ -31802,7 +34959,10 @@ func (s *RouteListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Router: Router resource. +// Router: Represents a Cloud Router resource. +// +// For more information about Cloud Router, read the the Cloud Router +// overview. type Router struct { // Bgp: BGP information specific to this router. Bgp *RouterBgp `json:"bgp,omitempty"` @@ -32218,8 +35378,13 @@ type RouterBgpPeer struct { // "MANAGED_BY_USER" ManagementType string `json:"managementType,omitempty"` - // Name: Name of this BGP peer. The name must be 1-63 characters long - // and comply with RFC1035. + // Name: Name of this BGP peer. The name must be 1-63 characters long, + // and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. Name string `json:"name,omitempty"` // PeerAsn: Peer BGP Autonomous System Number (ASN). Each BGP interface @@ -32255,25 +35420,18 @@ func (s *RouterBgpPeer) MarshalJSON() ([]byte, error) { type RouterBgpPeerBfd struct { // MinReceiveInterval: The minimum interval, in milliseconds, between - // BFD packets received from the peer router. The actual value is - // negotiated between the two routers and is equal to the greater of - // this value and the transmit interval of the other router. If BFD echo - // mode is enabled on this router and the peer router, this value is - // used to negotiate the interval between BFD echo packets transmitted - // by the peer router. Otherwise, it will be used to determine the - // interval between BFD control packets. If set, this value must be - // between 33 and 30000. The default is 300. + // BFD control packets received from the peer router. The actual value + // is negotiated between the two routers and is equal to the greater of + // this value and the transmit interval of the other router. If set, + // this value must be between 100 and 30000. The default is 300. MinReceiveInterval int64 `json:"minReceiveInterval,omitempty"` // MinTransmitInterval: The minimum interval, in milliseconds, between - // BFD packets transmitted to the peer router. The actual value is - // negotiated between the two routers and is equal to the greater of + // BFD control packets transmitted to the peer router. The actual value + // is negotiated between the two routers and is equal to the greater of // this value and the corresponding receive interval of the other - // router. If BFD echo mode is enabled on this router and the peer - // router, this value is used to negotiate the interval between BFD echo - // packets transmitted by this router. Otherwise, it will be used to - // determine the interval between BFD control packets. If set, this - // value must be between 33 and 30000. The default is 300. + // router. If set, this value must be between 100 and 30000. The default + // is 300. MinTransmitInterval int64 `json:"minTransmitInterval,omitempty"` // Mode: The BFD session initialization mode for this BGP peer. If set @@ -32390,7 +35548,12 @@ type RouterInterface struct { ManagementType string `json:"managementType,omitempty"` // Name: Name of this interface entry. The name must be 1-63 characters - // long and comply with RFC1035. + // long, and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "IpRange") to @@ -32685,9 +35848,12 @@ type RouterNatLogConfig struct { // default. Enable bool `json:"enable,omitempty"` - // Filter: Specifies the desired filtering of logs on this NAT. If + // Filter: Specify the desired filtering of logs on this NAT. If // unspecified, logs are exported for all connections handled by this - // NAT. + // NAT. This option can take one of the following values: + // - ERRORS_ONLY: Export logs only for connection failures. + // - TRANSLATIONS_ONLY: Export logs only for successful connections. + // - ALL: Export logs for all connections, successful and unsuccessful. // // Possible values: // "ALL" @@ -32806,6 +35972,8 @@ type RouterStatusBgpPeerStatus struct { // AdvertisedRoutes: Routes that were advertised to the remote BGP peer AdvertisedRoutes []*Route `json:"advertisedRoutes,omitempty"` + BfdStatus *BfdStatus `json:"bfdStatus,omitempty"` + // IpAddress: IP address of the local BGP interface. IpAddress string `json:"ipAddress,omitempty"` @@ -32871,11 +36039,11 @@ type RouterStatusNatStatus struct { AutoAllocatedNatIps []string `json:"autoAllocatedNatIps,omitempty"` // DrainAutoAllocatedNatIps: A list of IPs auto-allocated for NAT that - // are in drain mode. Example: ["1.1.1.1", ?179.12.26.133?]. + // are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. DrainAutoAllocatedNatIps []string `json:"drainAutoAllocatedNatIps,omitempty"` // DrainUserAllocatedNatIps: A list of IPs user-allocated for NAT that - // are in drain mode. Example: ["1.1.1.1", ?179.12.26.133?]. + // are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. DrainUserAllocatedNatIps []string `json:"drainUserAllocatedNatIps,omitempty"` // MinExtraNatIpsNeeded: The number of extra IPs to allocate. This will @@ -33363,7 +36531,7 @@ func (s *SavedAttachedDisk) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Scheduling: Sets the scheduling options for an Instance. +// Scheduling: Sets the scheduling options for an Instance. NextID: 9 type Scheduling struct { // AutomaticRestart: Specifies whether the instance should be // automatically restarted if it is terminated by Compute Engine (not @@ -33381,11 +36549,18 @@ type Scheduling struct { // preemptible option is also set. LatencyTolerant bool `json:"latencyTolerant,omitempty"` + // LocationHint: An opaque location hint used to place the instance + // close to other resources. This field is for use by internal tools + // that use the public API. + LocationHint string `json:"locationHint,omitempty"` + // MinNodeCpus: The minimum number of virtual CPUs this instance will // consume when running on a sole-tenant node. MinNodeCpus int64 `json:"minNodeCpus,omitempty"` - // NodeAffinities: A set of node affinity and anti-affinity. + // NodeAffinities: A set of node affinity and anti-affinity + // configurations. Refer to Configuring node affinity for more + // information. NodeAffinities []*SchedulingNodeAffinity `json:"nodeAffinities,omitempty"` // OnHostMaintenance: Defines the maintenance behavior for this @@ -33434,7 +36609,8 @@ type SchedulingNodeAffinity struct { // Key: Corresponds to the label key of Node resource. Key string `json:"key,omitempty"` - // Operator: Defines the operation of node selection. + // Operator: Defines the operation of node selection. Valid operators + // are IN for affinity and NOT_IN for anti-affinity. // // Possible values: // "IN" @@ -33556,14 +36732,19 @@ func (s *SecurityPoliciesWafConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SecurityPolicy: A security policy is comprised of one or more rules. -// It can also be associated with one or more 'targets'. (== -// resource_for v1.securityPolicies ==) (== resource_for -// beta.securityPolicies ==) +// SecurityPolicy: Represents a Cloud Armor Security Policy +// resource. +// +// Only external backend services that use load balancers can reference +// a Security Policy. For more information, read Cloud Armor Security +// Policy Concepts. (== resource_for v1.securityPolicies ==) (== +// resource_for beta.securityPolicies ==) type SecurityPolicy struct { // Associations: A list of assocations that belong to this policy. Associations []*SecurityPolicyAssociation `json:"associations,omitempty"` + CloudArmorConfig *SecurityPolicyCloudArmorConfig `json:"cloudArmorConfig,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -33708,6 +36889,35 @@ func (s *SecurityPolicyAssociation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SecurityPolicyCloudArmorConfig: Configuration options for Cloud +// Armor. +type SecurityPolicyCloudArmorConfig struct { + // EnableMl: If set to true, enables Cloud Armor Machine Learning. + EnableMl bool `json:"enableMl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EnableMl") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableMl") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyCloudArmorConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyCloudArmorConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SecurityPolicyList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. @@ -34179,10 +37389,6 @@ type SecuritySettings struct { // ClientTlsSettings: TLS Settings for the backend service. ClientTlsSettings *ClientTlsSettings `json:"clientTlsSettings,omitempty"` - // ServerSettingsSelector: The listener config of the XDS client is - // generated if the selector matches the client. - ServerSettingsSelector *ServerSecuritySettingsSelector `json:"serverSettingsSelector,omitempty"` - // ForceSendFields is a list of field names (e.g. // "AuthenticationPolicy") to unconditionally include in API requests. // By default, fields with empty values are omitted from API requests. @@ -34289,40 +37495,6 @@ func (s *ServerBinding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ServerSecuritySettingsSelector: A selector associated with the -// SecuritySettings. If the labels and port in this selector match the -// Envoy's label and port, the server side authentication and -// authorization settings are applied to the Envoy. -type ServerSecuritySettingsSelector struct { - // LabelMatches: The labels associated with the XDS client. - LabelMatches []*MetadataFilterLabelMatch `json:"labelMatches,omitempty"` - - // Port: The listener port of the XDS client. - Port int64 `json:"port,omitempty"` - - // ForceSendFields is a list of field names (e.g. "LabelMatches") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "LabelMatches") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ServerSecuritySettingsSelector) MarshalJSON() ([]byte, error) { - type NoMethod ServerSecuritySettingsSelector - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ServerTlsSettings: The TLS settings for the server. type ServerTlsSettings struct { // ProxyTlsContext: Configures the mechanism to obtain security @@ -34402,38 +37574,6 @@ func (s *ServiceAccount) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ServiceAccountJwtAccessCredentials: JWT credentials for a service -// account. -type ServiceAccountJwtAccessCredentials struct { - // JsonKey: Service account key. - JsonKey string `json:"jsonKey,omitempty"` - - // TokenLifetimeSeconds: The token lifetime seconds. - TokenLifetimeSeconds int64 `json:"tokenLifetimeSeconds,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "JsonKey") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "JsonKey") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ServiceAccountJwtAccessCredentials) MarshalJSON() ([]byte, error) { - type NoMethod ServiceAccountJwtAccessCredentials - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // ShieldedInstanceConfig: A set of Shielded Instance options. type ShieldedInstanceConfig struct { // EnableIntegrityMonitoring: Defines whether the instance has integrity @@ -34474,8 +37614,8 @@ func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { // ShieldedInstanceIdentity: A shielded Instance identity entry. type ShieldedInstanceIdentity struct { - // EncryptionKey: An Endorsement Key (EK) issued to the Shielded - // Instance's vTPM. + // EncryptionKey: An Endorsement Key (EK) made by the RSA 2048 algorithm + // issued to the Shielded Instance's vTPM. EncryptionKey *ShieldedInstanceIdentityEntry `json:"encryptionKey,omitempty"` // Kind: [Output Only] Type of the resource. Always @@ -34483,8 +37623,8 @@ type ShieldedInstanceIdentity struct { // entry. Kind string `json:"kind,omitempty"` - // SigningKey: An Attestation Key (AK) issued to the Shielded Instance's - // vTPM. + // SigningKey: An Attestation Key (AK) made by the RSA 2048 algorithm + // issued to the Shielded Instance's vTPM. SigningKey *ShieldedInstanceIdentityEntry `json:"signingKey,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -34756,11 +37896,14 @@ func (s *SignedUrlKey) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Snapshot: A persistent disk snapshot resource. (== resource_for -// beta.snapshots ==) (== resource_for v1.snapshots ==) +// Snapshot: Represents a Persistent Disk Snapshot resource. +// +// You can use snapshots to back up data on a regular interval. For more +// information, read Creating persistent disk snapshots. (== +// resource_for beta.snapshots ==) (== resource_for v1.snapshots ==) type Snapshot struct { // AutoCreated: [Output Only] Set to true if snapshots are automatically - // by applying resource policy on the target disk. + // created by applying resource policy on the target disk. AutoCreated bool `json:"autoCreated,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -34771,7 +37914,7 @@ type Snapshot struct { // property when you create the resource. Description string `json:"description,omitempty"` - // DiskSizeGb: [Output Only] Size of the snapshot, specified in GB. + // DiskSizeGb: [Output Only] Size of the source disk, specified in GB. DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` // GuestOsFeatures: [Output Only] A list of features to enable on the @@ -34887,8 +38030,8 @@ type Snapshot struct { // "UP_TO_DATE" StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - // StorageLocations: GCS bucket storage location of the snapshot - // (regional or multi-regional). + // StorageLocations: Cloud Storage bucket storage location of the + // snapshot (regional or multi-regional). StorageLocations []string `json:"storageLocations,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -35072,6 +38215,45 @@ func (s *SnapshotListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SourceDiskEncryptionKey struct { + // DiskEncryptionKey: The customer-supplied encryption key of the source + // disk. Required if the source disk is protected by a customer-supplied + // encryption key. + DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` + + // SourceDisk: URL of the disk attached to the source instance. This can + // be a full or valid partial URL. For example, the following are valid + // values: + // - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + // - projects/project/zones/zone/disks/disk + // - zones/zone/disks/disk + SourceDisk string `json:"sourceDisk,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskEncryptionKey") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskEncryptionKey") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SourceDiskEncryptionKey) MarshalJSON() ([]byte, error) { + type NoMethod SourceDiskEncryptionKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SourceInstanceParams: A specification of the parameters to use when // creating the instance template from a source instance. type SourceInstanceParams struct { @@ -35196,10 +38378,13 @@ func (s *SourceInstanceProperties) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslCertificate: An SslCertificate resource. This resource provides a -// mechanism to upload an SSL key and certificate to the load balancer -// to serve secure connections from the user. (== resource_for -// beta.sslCertificates ==) (== resource_for v1.sslCertificates ==) +// SslCertificate: Represents an SSL Certificate resource. +// +// This SSL certificate resource also contains a private key. You can +// use SSL keys and certificates to secure connections to a load +// balancer. For more information, read Creating and Using SSL +// Certificates. (== resource_for beta.sslCertificates ==) (== +// resource_for v1.sslCertificates ==) type SslCertificate struct { // Certificate: A local certificate file. The certificate must be in PEM // format. The certificate chain must be no greater than 5 certs long. @@ -36006,11 +39191,12 @@ func (s *SslPoliciesListAvailableFeaturesResponse) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslPolicy: A SSL policy specifies the server-side support for SSL -// features. This can be attached to a TargetHttpsProxy or a -// TargetSslProxy. This affects connections between clients and the -// HTTPS or SSL proxy load balancer. They do not affect the connection -// between the load balancers and the backends. +// SslPolicy: Represents a Cloud Armor Security Policy resource. +// +// Only external backend services used by HTTP or HTTPS load balancers +// can reference a Security Policy. For more information, read read +// Cloud Armor Security Policy Concepts. (== resource_for +// beta.sslPolicies ==) (== resource_for v1.sslPolicies ==) type SslPolicy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -36255,19 +39441,17 @@ func (s *SslPolicyReference) MarshalJSON() ([]byte, error) { } type StatefulPolicy struct { - PreservedResources *StatefulPolicyPreservedResources `json:"preservedResources,omitempty"` - PreservedState *StatefulPolicyPreservedState `json:"preservedState,omitempty"` - // ForceSendFields is a list of field names (e.g. "PreservedResources") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "PreservedState") to + // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PreservedResources") to + // NullFields is a list of field names (e.g. "PreservedState") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -36283,68 +39467,11 @@ func (s *StatefulPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type StatefulPolicyPreservedDisk struct { - // DeviceName: Device name of the disk to be preserved - DeviceName string `json:"deviceName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DeviceName") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DeviceName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *StatefulPolicyPreservedDisk) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicyPreservedDisk - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// StatefulPolicyPreservedResources: Configuration of all preserved -// resources. -type StatefulPolicyPreservedResources struct { - // Disks: Disks created on the instances that will be preserved on - // instance delete, resize down, etc. - Disks []*StatefulPolicyPreservedDisk `json:"disks,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Disks") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Disks") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *StatefulPolicyPreservedResources) MarshalJSON() ([]byte, error) { - type NoMethod StatefulPolicyPreservedResources - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // StatefulPolicyPreservedState: Configuration of preserved resources. type StatefulPolicyPreservedState struct { // Disks: Disks created on the instances that will be preserved on - // instance delete, resize down, etc. This map is keyed with the device - // names of the disks. + // instance delete, update, etc. This map is keyed with the device names + // of the disks. Disks map[string]StatefulPolicyPreservedStateDiskDevice `json:"disks,omitempty"` // ForceSendFields is a list of field names (e.g. "Disks") to @@ -36381,7 +39508,6 @@ type StatefulPolicyPreservedStateDiskDevice struct { // Possible values: // "NEVER" // "ON_PERMANENT_INSTANCE_DELETION" - // "WHEN_NOT_IN_USE" AutoDelete string `json:"autoDelete,omitempty"` // ForceSendFields is a list of field names (e.g. "AutoDelete") to @@ -36407,8 +39533,13 @@ func (s *StatefulPolicyPreservedStateDiskDevice) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Subnetwork: A Subnetwork resource. (== resource_for beta.subnetworks -// ==) (== resource_for v1.subnetworks ==) +// Subnetwork: Represents a Subnetwork resource. +// +// A subnetwork (also known as a subnet) is a logical partition of a +// Virtual Private Cloud network with one primary IP range and zero or +// more secondary IP ranges. For more information, read Virtual Private +// Cloud (VPC) Network. (== resource_for beta.subnetworks ==) (== +// resource_for v1.subnetworks ==) type Subnetwork struct { // AggregationInterval: Can only be specified if VPC flow logging for // this subnetwork is enabled. Sets the aggregation interval for @@ -36551,8 +39682,17 @@ type Subnetwork struct { // "DISABLE_GOOGLE_ACCESS" // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" + // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS" PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` + // PrivateIpv6GoogleAccessServiceAccounts: The service accounts can be + // used to selectively turn on Private IPv6 Google Access only on the + // VMs primary service account matching the value. This value only takes + // effect when PrivateIpv6GoogleAccess is + // ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS or + // ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS. + PrivateIpv6GoogleAccessServiceAccounts []string `json:"privateIpv6GoogleAccessServiceAccounts,omitempty"` + // Purpose: The purpose of the resource. This field can be either // PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with // purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created @@ -36560,6 +39700,7 @@ type Subnetwork struct { // unspecified, the purpose defaults to PRIVATE_RFC_1918. // // Possible values: + // "AGGREGATE" // "INTERNAL_HTTPS_LOAD_BALANCER" // "PRIVATE" // "PRIVATE_RFC_1918" @@ -36992,6 +40133,11 @@ type SubnetworkLogConfig struct { // not set the default behavior is to disable flow logging. Enable bool `json:"enable,omitempty"` + // FilterExpr: Can only be specified if VPC flow logs for this + // subnetwork is enabled. Export filter used to define which VPC flow + // logs should be logged. + FilterExpr string `json:"filterExpr,omitempty"` + // FlowSampling: Can only be specified if VPC flow logging for this // subnetwork is enabled. The value of the field must be in [0, 1]. Set // the sampling rate of VPC flow logs within the subnetwork where 1.0 @@ -37000,15 +40146,21 @@ type SubnetworkLogConfig struct { // reported. FlowSampling float64 `json:"flowSampling,omitempty"` - // Metadata: Can only be specified if VPC flow logging for this - // subnetwork is enabled. Configures whether metadata fields should be - // added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA. + // Metadata: Can only be specified if VPC flow logs for this subnetwork + // is enabled. Configures whether all, none or a subset of metadata + // fields should be added to the reported VPC flow logs. Default is + // INCLUDE_ALL_METADATA. // // Possible values: + // "CUSTOM_METADATA" // "EXCLUDE_ALL_METADATA" // "INCLUDE_ALL_METADATA" Metadata string `json:"metadata,omitempty"` + // MetadataFields: Can only be specified if VPC flow logs for this + // subnetwork is enabled and "metadata" was set to CUSTOM_METADATA. + MetadataFields []string `json:"metadataFields,omitempty"` + // ForceSendFields is a list of field names (e.g. "AggregationInterval") // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -37550,9 +40702,13 @@ func (s *TargetHttpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpProxy: A TargetHttpProxy resource. This resource defines an -// HTTP proxy. (== resource_for beta.targetHttpProxies ==) (== -// resource_for v1.targetHttpProxies ==) +// TargetHttpProxy: Represents a Target HTTP Proxy resource. +// +// A target HTTP proxy is a component of certain types of load +// balancers. Global forwarding rules reference a target HTTP proxy, and +// the target proxy then references a URL map. For more information, +// read Using Target Proxies. (== resource_for beta.targetHttpProxies +// ==) (== resource_for v1.targetHttpProxies ==) type TargetHttpProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -38137,9 +41293,13 @@ func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpsProxy: A TargetHttpsProxy resource. This resource defines -// an HTTPS proxy. (== resource_for beta.targetHttpsProxies ==) (== -// resource_for v1.targetHttpsProxies ==) +// TargetHttpsProxy: Represents a Target HTTPS Proxy resource. +// +// A target HTTPS proxy is a component of certain types of load +// balancers. Global forwarding rules reference a target HTTPS proxy, +// and the target proxy then references a URL map. For more information, +// read Using Target Proxies. (== resource_for beta.targetHttpsProxies +// ==) (== resource_for v1.targetHttpsProxies ==) type TargetHttpsProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -38172,13 +41332,17 @@ type TargetHttpsProxy struct { ProxyBind bool `json:"proxyBind,omitempty"` // QuicOverride: Specifies the QUIC override policy for this - // TargetHttpsProxy resource. This determines whether the load balancer - // will attempt to negotiate QUIC with clients or not. Can specify one - // of NONE, ENABLE, or DISABLE. Specify ENABLE to always enable QUIC, - // Enables QUIC when set to ENABLE, and disables QUIC when set to - // DISABLE. If NONE is specified, uses the QUIC policy with no user - // overrides, which is equivalent to DISABLE. Not specifying this field - // is equivalent to specifying NONE. + // TargetHttpsProxy resource. This setting determines whether the load + // balancer attempts to negotiate QUIC with clients. You can specify + // NONE, ENABLE, or DISABLE. + // - When quic-override is set to NONE, Google manages whether QUIC is + // used. + // - When quic-override is set to ENABLE, the load balancer uses QUIC + // when possible. + // - When quic-override is set to DISABLE, the load balancer doesn't use + // QUIC. + // - If the quic-override flag is not specified, NONE is implied. + // - // // Possible values: // "DISABLE" @@ -38206,7 +41370,7 @@ type TargetHttpsProxy struct { // SslPolicy: URL of SslPolicy resource that will be associated with the // TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource - // will not have any SSL policy configured. + // has no SSL policy configured. SslPolicy string `json:"sslPolicy,omitempty"` // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource @@ -38558,10 +41722,13 @@ func (s *TargetHttpsProxyListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetInstance: A TargetInstance resource. This resource defines an -// endpoint instance that terminates traffic of certain protocols. (== -// resource_for beta.targetInstances ==) (== resource_for -// v1.targetInstances ==) +// TargetInstance: Represents a Target Instance resource. +// +// You can use a target instance to handle traffic for one or more +// forwarding rules, which is ideal for forwarding protocol traffic that +// is managed by a single source. For example, ESP, AH, TCP, or UDP. For +// more information, read Target instances. (== resource_for +// beta.targetInstances ==) (== resource_for v1.targetInstances ==) type TargetInstance struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -39088,10 +42255,13 @@ func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetPool: A TargetPool resource. This resource defines a pool of -// instances, an associated HttpHealthCheck resource, and the fallback -// target pool. (== resource_for beta.targetPools ==) (== resource_for -// v1.targetPools ==) +// TargetPool: Represents a Target Pool resource. +// +// Target pools are used for network TCP/UDP load balancing. A target +// pool references member instances, an associated legacy +// HttpHealthCheck resource, and, optionally, a backup target pool. For +// more information, read Using target pools. (== resource_for +// beta.targetPools ==) (== resource_for v1.targetPools ==) type TargetPool struct { // BackupPool: This field is applicable only when the containing target // pool is serving a forwarding rule as the primary pool, and its @@ -39952,9 +43122,13 @@ func (s *TargetSslProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetSslProxy: A TargetSslProxy resource. This resource defines an -// SSL proxy. (== resource_for beta.targetSslProxies ==) (== -// resource_for v1.targetSslProxies ==) +// TargetSslProxy: Represents a Target SSL Proxy resource. +// +// A target SSL proxy is a component of a SSL Proxy load balancer. +// Global forwarding rules reference a target SSL proxy, and the target +// proxy then references an external backend service. For more +// information, read Using Target Proxies. (== resource_for +// beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==) type TargetSslProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -40250,9 +43424,13 @@ func (s *TargetTcpProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetTcpProxy: A TargetTcpProxy resource. This resource defines a -// TCP proxy. (== resource_for beta.targetTcpProxies ==) (== -// resource_for v1.targetTcpProxies ==) +// TargetTcpProxy: Represents a Target TCP Proxy resource. +// +// A target TCP proxy is a component of a TCP Proxy load balancer. +// Global forwarding rules reference target TCP proxy, and the target +// proxy then references an external backend service. For more +// information, read TCP Proxy Load Balancing Concepts. (== resource_for +// beta.targetTcpProxies ==) (== resource_for v1.targetTcpProxies ==) type TargetTcpProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -40477,7 +43655,10 @@ func (s *TargetTcpProxyListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetVpnGateway: Represents a Target VPN gateway resource. (== +// TargetVpnGateway: Represents a Target VPN Gateway resource. +// +// The target VPN gateway resource represents a Classic Cloud VPN +// gateway. For more information, read the the Cloud VPN Overview. (== // resource_for beta.targetVpnGateways ==) (== resource_for // v1.targetVpnGateways ==) type TargetVpnGateway struct { @@ -41323,9 +44504,15 @@ func (s *UDPHealthCheck) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UrlMap: A UrlMap resource. This resource defines the mapping from URL -// to the BackendService resource, based on the "longest-match" of the -// URL's host and path. +// UrlMap: Represents a URL Map resource. +// +// A URL map resource is a component of certain types of load balancers. +// This resource defines mappings from host names and URL paths to +// either a backend service or a backend bucket. +// +// To use this resource, the backend service must have a +// loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or +// INTERNAL_MANAGED For more information, read URL Map Concepts. type UrlMap struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -43363,8 +46550,10 @@ func (s *VpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnTunnel: VPN tunnel resource. (== resource_for beta.vpnTunnels ==) -// (== resource_for v1.vpnTunnels ==) +// VpnTunnel: Represents a Cloud VPN Tunnel resource. +// +// For more information about VPN, read the the Cloud VPN Overview. (== +// resource_for beta.vpnTunnels ==) (== resource_for v1.vpnTunnels ==) type VpnTunnel struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -43487,6 +46676,17 @@ type VpnTunnel struct { // // - FAILED: Tunnel creation has failed and the tunnel is not ready to // be used. + // - NO_INCOMING_PACKETS: No incoming packets from peer. + // - REJECTED: Tunnel configuration was rejected, can be result of being + // blacklisted. + // - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all + // required resources. + // - STOPPED: Tunnel is stopped due to its Forwarding Rules being + // deleted for Classic VPN tunnels or the project is in frozen state. + // - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, + // probably behind NAT. + // - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed + // for an HA-VPN tunnel. // // Possible values: // "ALLOCATING_RESOURCES" @@ -43500,6 +46700,7 @@ type VpnTunnel struct { // "NO_INCOMING_PACKETS" // "PROVISIONING" // "REJECTED" + // "STOPPED" // "WAITING_FOR_FULL_CONFIG" Status string `json:"status,omitempty"` @@ -44302,8 +47503,12 @@ func (s *XpnResourceId) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Zone: A Zone resource. (== resource_for beta.zones ==) (== -// resource_for v1.zones ==) Next ID: 17 +// Zone: Represents a Zone resource. +// +// A zone is a deployment area. These deployment areas are subsets of a +// region. For example the zone us-east1-a is located in the us-east1 +// region. For more information, read Regions and Zones. (== +// resource_for beta.zones ==) (== resource_for v1.zones ==) type Zone struct { // AvailableCpuPlatforms: [Output Only] Available cpu/platform // selections for the zone. @@ -44614,6 +47819,7 @@ type AcceleratorTypesAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of accelerator types. +// (== suppress_warning http-rest-shadowed ==) func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -44720,6 +47926,7 @@ func (c *AcceleratorTypesAggregatedListCall) Header() http.Header { func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44781,7 +47988,7 @@ func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Retrieves an aggregated list of accelerator types.", + // "description": "Retrieves an aggregated list of accelerator types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.acceleratorTypes.aggregatedList", // "parameterOrder": [ @@ -44866,7 +48073,8 @@ type AcceleratorTypesGetCall struct { header_ http.Header } -// Get: Returns the specified accelerator type. +// Get: Returns the specified accelerator type. (== suppress_warning +// http-rest-shadowed ==) func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -44912,6 +48120,7 @@ func (c *AcceleratorTypesGetCall) Header() http.Header { func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44975,7 +48184,7 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator } return ret, nil // { - // "description": "Returns the specified accelerator type.", + // "description": "Returns the specified accelerator type. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.acceleratorTypes.get", // "parameterOrder": [ @@ -45032,7 +48241,7 @@ type AcceleratorTypesListCall struct { } // List: Retrieves a list of accelerator types available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -45140,6 +48349,7 @@ func (c *AcceleratorTypesListCall) Header() http.Header { func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45202,7 +48412,7 @@ func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*Accelerato } return ret, nil // { - // "description": "Retrieves a list of accelerator types available to the specified project.", + // "description": "Retrieves a list of accelerator types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.acceleratorTypes.list", // "parameterOrder": [ @@ -45293,7 +48503,8 @@ type AddressesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of addresses. +// AggregatedList: Retrieves an aggregated list of addresses. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/aggregatedList func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45401,6 +48612,7 @@ func (c *AddressesAggregatedListCall) Header() http.Header { func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45462,7 +48674,7 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address } return ret, nil // { - // "description": "Retrieves an aggregated list of addresses.", + // "description": "Retrieves an aggregated list of addresses. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.addresses.aggregatedList", // "parameterOrder": [ @@ -45546,7 +48758,8 @@ type AddressesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified address resource. +// Delete: Deletes the specified address resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/delete func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45602,6 +48815,7 @@ func (c *AddressesDeleteCall) Header() http.Header { func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45662,7 +48876,7 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified address resource.", + // "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.addresses.delete", // "parameterOrder": [ @@ -45723,7 +48937,8 @@ type AddressesGetCall struct { header_ http.Header } -// Get: Returns the specified address resource. +// Get: Returns the specified address resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/get func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45770,6 +48985,7 @@ func (c *AddressesGetCall) Header() http.Header { func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45833,7 +49049,7 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { } return ret, nil // { - // "description": "Returns the specified address resource.", + // "description": "Returns the specified address resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.addresses.get", // "parameterOrder": [ @@ -45889,8 +49105,9 @@ type AddressesInsertCall struct { header_ http.Header } -// Insert: Creates an address resource in the specified project using -// the data included in the request. +// Insert: Creates an address resource in the specified project by using +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/insert func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45946,6 +49163,7 @@ func (c *AddressesInsertCall) Header() http.Header { func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46010,7 +49228,7 @@ func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates an address resource in the specified project using the data included in the request.", + // "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.addresses.insert", // "parameterOrder": [ @@ -46066,7 +49284,7 @@ type AddressesListCall struct { } // List: Retrieves a list of addresses contained within the specified -// region. +// region. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/list func (r *AddressesService) List(project string, region string) *AddressesListCall { c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -46175,6 +49393,7 @@ func (c *AddressesListCall) Header() http.Header { func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46237,7 +49456,7 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro } return ret, nil // { - // "description": "Retrieves a list of addresses contained within the specified region.", + // "description": "Retrieves a list of addresses contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.addresses.list", // "parameterOrder": [ @@ -46331,7 +49550,8 @@ type AddressesSetLabelsCall struct { } // SetLabels: Sets the labels on an Address. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *AddressesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *AddressesSetLabelsCall { c := &AddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -46387,6 +49607,7 @@ func (c *AddressesSetLabelsCall) Header() http.Header { func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46452,7 +49673,7 @@ func (c *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.addresses.setLabels", // "parameterOrder": [ @@ -46517,7 +49738,7 @@ type AddressesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall { c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -46554,6 +49775,7 @@ func (c *AddressesTestIamPermissionsCall) Header() http.Header { func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46619,7 +49841,7 @@ func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.addresses.testIamPermissions", // "parameterOrder": [ @@ -46677,7 +49899,8 @@ type AutoscalersAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of autoscalers. +// AggregatedList: Retrieves an aggregated list of autoscalers. (== +// suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -46784,6 +50007,7 @@ func (c *AutoscalersAggregatedListCall) Header() http.Header { func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46845,7 +50069,7 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos } return ret, nil // { - // "description": "Retrieves an aggregated list of autoscalers.", + // "description": "Retrieves an aggregated list of autoscalers. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.autoscalers.aggregatedList", // "parameterOrder": [ @@ -46929,7 +50153,8 @@ type AutoscalersDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified autoscaler. +// Delete: Deletes the specified autoscaler. (== suppress_warning +// http-rest-shadowed ==) func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -46984,6 +50209,7 @@ func (c *AutoscalersDeleteCall) Header() http.Header { func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47044,7 +50270,7 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified autoscaler.", + // "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.autoscalers.delete", // "parameterOrder": [ @@ -47106,7 +50332,8 @@ type AutoscalersGetCall struct { } // Get: Returns the specified autoscaler resource. Gets a list of -// available autoscalers by making a list() request. +// available autoscalers by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -47152,6 +50379,7 @@ func (c *AutoscalersGetCall) Header() http.Header { func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47215,7 +50443,7 @@ func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, erro } return ret, nil // { - // "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.", + // "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.autoscalers.get", // "parameterOrder": [ @@ -47272,7 +50500,7 @@ type AutoscalersInsertCall struct { } // Insert: Creates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -47327,6 +50555,7 @@ func (c *AutoscalersInsertCall) Header() http.Header { func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47391,7 +50620,7 @@ func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", + // "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.autoscalers.insert", // "parameterOrder": [ @@ -47447,7 +50676,7 @@ type AutoscalersListCall struct { } // List: Retrieves a list of autoscalers contained within the specified -// zone. +// zone. (== suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -47555,6 +50784,7 @@ func (c *AutoscalersListCall) Header() http.Header { func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47617,7 +50847,7 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, } return ret, nil // { - // "description": "Retrieves a list of autoscalers contained within the specified zone.", + // "description": "Retrieves a list of autoscalers contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.autoscalers.list", // "parameterOrder": [ @@ -47711,7 +50941,8 @@ type AutoscalersPatchCall struct { // Patch: Updates an autoscaler in the specified project using the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -47773,6 +51004,7 @@ func (c *AutoscalersPatchCall) Header() http.Header { func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47837,7 +51069,7 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.autoscalers.patch", // "parameterOrder": [ @@ -47900,7 +51132,7 @@ type AutoscalersTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall { c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -47937,6 +51169,7 @@ func (c *AutoscalersTestIamPermissionsCall) Header() http.Header { func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48002,7 +51235,7 @@ func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.autoscalers.testIamPermissions", // "parameterOrder": [ @@ -48062,7 +51295,7 @@ type AutoscalersUpdateCall struct { } // Update: Updates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48124,6 +51357,7 @@ func (c *AutoscalersUpdateCall) Header() http.Header { func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48188,7 +51422,7 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.autoscalers.update", // "parameterOrder": [ @@ -48250,7 +51484,7 @@ type BackendBucketsAddSignedUrlKeyCall struct { } // AddSignedUrlKey: Adds a key for validating requests with signed URLs -// for this backend bucket. +// for this backend bucket. (== suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) AddSignedUrlKey(project string, backendBucket string, signedurlkey *SignedUrlKey) *BackendBucketsAddSignedUrlKeyCall { c := &BackendBucketsAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48305,6 +51539,7 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Header() http.Header { func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48369,7 +51604,7 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Adds a key for validating requests with signed URLs for this backend bucket.", + // "description": "Adds a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendBuckets.addSignedUrlKey", // "parameterOrder": [ @@ -48422,7 +51657,8 @@ type BackendBucketsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified BackendBucket resource. +// Delete: Deletes the specified BackendBucket resource. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48476,6 +51712,7 @@ func (c *BackendBucketsDeleteCall) Header() http.Header { func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48535,7 +51772,7 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified BackendBucket resource.", + // "description": "Deletes the specified BackendBucket resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.backendBuckets.delete", // "parameterOrder": [ @@ -48587,7 +51824,8 @@ type BackendBucketsDeleteSignedUrlKeyCall struct { } // DeleteSignedUrlKey: Deletes a key for validating requests with signed -// URLs for this backend bucket. +// URLs for this backend bucket. (== suppress_warning http-rest-shadowed +// ==) func (r *BackendBucketsService) DeleteSignedUrlKey(project string, backendBucket string, keyName string) *BackendBucketsDeleteSignedUrlKeyCall { c := &BackendBucketsDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48642,6 +51880,7 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Header() http.Header { func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48701,7 +51940,7 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a key for validating requests with signed URLs for this backend bucket.", + // "description": "Deletes a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendBuckets.deleteSignedUrlKey", // "parameterOrder": [ @@ -48760,7 +51999,8 @@ type BackendBucketsGetCall struct { } // Get: Returns the specified BackendBucket resource. Gets a list of -// available backend buckets by making a list() request. +// available backend buckets by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48805,6 +52045,7 @@ func (c *BackendBucketsGetCall) Header() http.Header { func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48867,7 +52108,7 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket } return ret, nil // { - // "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request.", + // "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendBuckets.get", // "parameterOrder": [ @@ -48916,7 +52157,8 @@ type BackendBucketsGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *BackendBucketsService) GetIamPolicy(project string, resource string) *BackendBucketsGetIamPolicyCall { c := &BackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48924,6 +52166,13 @@ func (r *BackendBucketsService) GetIamPolicy(project string, resource string) *B return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *BackendBucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendBucketsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -48961,6 +52210,7 @@ func (c *BackendBucketsGetIamPolicyCall) Header() http.Header { func (c *BackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49023,7 +52273,7 @@ func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendBuckets.getIamPolicy", // "parameterOrder": [ @@ -49031,6 +52281,12 @@ func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -49071,7 +52327,8 @@ type BackendBucketsInsertCall struct { } // Insert: Creates a BackendBucket resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49125,6 +52382,7 @@ func (c *BackendBucketsInsertCall) Header() http.Header { func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49188,7 +52446,7 @@ func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", + // "description": "Creates a BackendBucket resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendBuckets.insert", // "parameterOrder": [ @@ -49235,7 +52493,7 @@ type BackendBucketsListCall struct { } // List: Retrieves the list of BackendBucket resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49342,6 +52600,7 @@ func (c *BackendBucketsListCall) Header() http.Header { func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49403,7 +52662,7 @@ func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucke } return ret, nil // { - // "description": "Retrieves the list of BackendBucket resources available to the specified project.", + // "description": "Retrieves the list of BackendBucket resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendBuckets.list", // "parameterOrder": [ @@ -49489,7 +52748,8 @@ type BackendBucketsPatchCall struct { // Patch: Updates the specified BackendBucket resource with the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49544,6 +52804,7 @@ func (c *BackendBucketsPatchCall) Header() http.Header { func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49608,7 +52869,7 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.backendBuckets.patch", // "parameterOrder": [ @@ -49664,7 +52925,8 @@ type BackendBucketsSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *BackendBucketsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendBucketsSetIamPolicyCall { c := &BackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49700,6 +52962,7 @@ func (c *BackendBucketsSetIamPolicyCall) Header() http.Header { func (c *BackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49764,7 +53027,7 @@ func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendBuckets.setIamPolicy", // "parameterOrder": [ @@ -49815,7 +53078,7 @@ type BackendBucketsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendBucketsTestIamPermissionsCall { c := &BackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49851,6 +53114,7 @@ func (c *BackendBucketsTestIamPermissionsCall) Header() http.Header { func (c *BackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49915,7 +53179,7 @@ func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendBuckets.testIamPermissions", // "parameterOrder": [ @@ -49967,7 +53231,7 @@ type BackendBucketsUpdateCall struct { } // Update: Updates the specified BackendBucket resource with the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50022,6 +53286,7 @@ func (c *BackendBucketsUpdateCall) Header() http.Header { func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50086,7 +53351,7 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified BackendBucket resource with the data included in the request.", + // "description": "Updates the specified BackendBucket resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.backendBuckets.update", // "parameterOrder": [ @@ -50142,7 +53407,7 @@ type BackendServicesAddSignedUrlKeyCall struct { } // AddSignedUrlKey: Adds a key for validating requests with signed URLs -// for this backend service. +// for this backend service. (== suppress_warning http-rest-shadowed ==) func (r *BackendServicesService) AddSignedUrlKey(project string, backendService string, signedurlkey *SignedUrlKey) *BackendServicesAddSignedUrlKeyCall { c := &BackendServicesAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50197,6 +53462,7 @@ func (c *BackendServicesAddSignedUrlKeyCall) Header() http.Header { func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50261,7 +53527,7 @@ func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Adds a key for validating requests with signed URLs for this backend service.", + // "description": "Adds a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.addSignedUrlKey", // "parameterOrder": [ @@ -50315,7 +53581,8 @@ type BackendServicesAggregatedListCall struct { } // AggregatedList: Retrieves the list of all BackendService resources, -// regional and global, available to the specified project. +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50422,6 +53689,7 @@ func (c *BackendServicesAggregatedListCall) Header() http.Header { func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50483,7 +53751,7 @@ func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*B } return ret, nil // { - // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendServices.aggregatedList", // "parameterOrder": [ @@ -50566,7 +53834,8 @@ type BackendServicesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified BackendService resource. +// Delete: Deletes the specified BackendService resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/delete func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -50621,6 +53890,7 @@ func (c *BackendServicesDeleteCall) Header() http.Header { func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50680,7 +53950,7 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified BackendService resource.", + // "description": "Deletes the specified BackendService resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.backendServices.delete", // "parameterOrder": [ @@ -50732,7 +54002,8 @@ type BackendServicesDeleteSignedUrlKeyCall struct { } // DeleteSignedUrlKey: Deletes a key for validating requests with signed -// URLs for this backend service. +// URLs for this backend service. (== suppress_warning +// http-rest-shadowed ==) func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendService string, keyName string) *BackendServicesDeleteSignedUrlKeyCall { c := &BackendServicesDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50787,6 +54058,7 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Header() http.Header { func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50846,7 +54118,7 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a key for validating requests with signed URLs for this backend service.", + // "description": "Deletes a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.deleteSignedUrlKey", // "parameterOrder": [ @@ -50905,7 +54177,8 @@ type BackendServicesGetCall struct { } // Get: Returns the specified BackendService resource. Gets a list of -// available backend services. +// available backend services. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -50951,6 +54224,7 @@ func (c *BackendServicesGetCall) Header() http.Header { func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51013,7 +54287,7 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi } return ret, nil // { - // "description": "Returns the specified BackendService resource. Gets a list of available backend services.", + // "description": "Returns the specified BackendService resource. Gets a list of available backend services. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendServices.get", // "parameterOrder": [ @@ -51062,7 +54336,7 @@ type BackendServicesGetHealthCall struct { } // GetHealth: Gets the most recent health check results for this -// BackendService. +// BackendService. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/getHealth func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -51099,6 +54373,7 @@ func (c *BackendServicesGetHealthCall) Header() http.Header { func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51163,7 +54438,7 @@ func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*Backen } return ret, nil // { - // "description": "Gets the most recent health check results for this BackendService.", + // "description": "Gets the most recent health check results for this BackendService. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.getHealth", // "parameterOrder": [ @@ -51215,7 +54490,8 @@ type BackendServicesInsertCall struct { // Insert: Creates a BackendService resource in the specified project // using the data included in the request. There are several // restrictions and guidelines to keep in mind when creating a backend -// service. Read Restrictions and Guidelines for more information. +// service. Read Restrictions and Guidelines for more information. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/insert func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -51270,6 +54546,7 @@ func (c *BackendServicesInsertCall) Header() http.Header { func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51333,7 +54610,7 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", + // "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.insert", // "parameterOrder": [ @@ -51380,7 +54657,7 @@ type BackendServicesListCall struct { } // List: Retrieves the list of BackendService resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/list func (r *BackendServicesService) List(project string) *BackendServicesListCall { c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -51488,6 +54765,7 @@ func (c *BackendServicesListCall) Header() http.Header { func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51549,7 +54827,7 @@ func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServ } return ret, nil // { - // "description": "Retrieves the list of BackendService resources available to the specified project.", + // "description": "Retrieves the list of BackendService resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendServices.list", // "parameterOrder": [ @@ -51638,7 +54916,7 @@ type BackendServicesPatchCall struct { // guidelines to keep in mind when updating a backend service. Read // Restrictions and Guidelines for more information. This method // supports PATCH semantics and uses the JSON merge patch format and -// processing rules. +// processing rules. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/patch func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -51694,6 +54972,7 @@ func (c *BackendServicesPatchCall) Header() http.Header { func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51758,7 +55037,7 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.backendServices.patch", // "parameterOrder": [ @@ -51814,7 +55093,7 @@ type BackendServicesSetSecurityPolicyCall struct { } // SetSecurityPolicy: Sets the security policy for the specified backend -// service. +// service. (== suppress_warning http-rest-shadowed ==) func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall { c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -51869,6 +55148,7 @@ func (c *BackendServicesSetSecurityPolicyCall) Header() http.Header { func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51933,7 +55213,7 @@ func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the security policy for the specified backend service.", + // "description": "Sets the security policy for the specified backend service. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.setSecurityPolicy", // "parameterOrder": [ @@ -51988,7 +55268,7 @@ type BackendServicesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall { c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -52024,6 +55304,7 @@ func (c *BackendServicesTestIamPermissionsCall) Header() http.Header { func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52088,7 +55369,7 @@ func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.testIamPermissions", // "parameterOrder": [ @@ -52142,7 +55423,8 @@ type BackendServicesUpdateCall struct { // Update: Updates the specified BackendService resource with the data // included in the request. There are several restrictions and // guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. +// Restrictions and Guidelines for more information. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/update func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -52198,6 +55480,7 @@ func (c *BackendServicesUpdateCall) Header() http.Header { func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52262,7 +55545,7 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + // "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.backendServices.update", // "parameterOrder": [ @@ -52316,7 +55599,8 @@ type DiskTypesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of disk types. +// AggregatedList: Retrieves an aggregated list of disk types. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/aggregatedList func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -52424,6 +55708,7 @@ func (c *DiskTypesAggregatedListCall) Header() http.Header { func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52485,7 +55770,7 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp } return ret, nil // { - // "description": "Retrieves an aggregated list of disk types.", + // "description": "Retrieves an aggregated list of disk types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.diskTypes.aggregatedList", // "parameterOrder": [ @@ -52571,7 +55856,8 @@ type DiskTypesGetCall struct { } // Get: Returns the specified disk type. Gets a list of available disk -// types by making a list() request. +// types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/get func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -52618,6 +55904,7 @@ func (c *DiskTypesGetCall) Header() http.Header { func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52681,7 +55968,7 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { } return ret, nil // { - // "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request.", + // "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.diskTypes.get", // "parameterOrder": [ @@ -52738,7 +56025,7 @@ type DiskTypesListCall struct { } // List: Retrieves a list of disk types available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/list func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -52847,6 +56134,7 @@ func (c *DiskTypesListCall) Header() http.Header { func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52909,7 +56197,7 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, err } return ret, nil // { - // "description": "Retrieves a list of disk types available to the specified project.", + // "description": "Retrieves a list of disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.diskTypes.list", // "parameterOrder": [ @@ -53004,7 +56292,8 @@ type DisksAddResourcePoliciesCall struct { // AddResourcePolicies: Adds existing resource policies to a disk. You // can only add one policy which will be applied to this disk for -// scheduling snapshot creation. +// scheduling snapshot creation. (== suppress_warning http-rest-shadowed +// ==) func (r *DisksService) AddResourcePolicies(project string, zone string, disk string, disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest) *DisksAddResourcePoliciesCall { c := &DisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -53060,6 +56349,7 @@ func (c *DisksAddResourcePoliciesCall) Header() http.Header { func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53125,7 +56415,7 @@ func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", + // "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.addResourcePolicies", // "parameterOrder": [ @@ -53187,7 +56477,8 @@ type DisksAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of persistent disks. +// AggregatedList: Retrieves an aggregated list of persistent disks. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/aggregatedList func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -53295,6 +56586,7 @@ func (c *DisksAggregatedListCall) Header() http.Header { func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53356,7 +56648,7 @@ func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggrega } return ret, nil // { - // "description": "Retrieves an aggregated list of persistent disks.", + // "description": "Retrieves an aggregated list of persistent disks. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.aggregatedList", // "parameterOrder": [ @@ -53442,6 +56734,7 @@ type DisksCreateSnapshotCall struct { } // CreateSnapshot: Creates a snapshot of a specified persistent disk. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/createSnapshot func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -53507,6 +56800,7 @@ func (c *DisksCreateSnapshotCall) Header() http.Header { func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53572,7 +56866,7 @@ func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a snapshot of a specified persistent disk.", + // "description": "Creates a snapshot of a specified persistent disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.createSnapshot", // "parameterOrder": [ @@ -53643,7 +56937,8 @@ type DisksDeleteCall struct { // Delete: Deletes the specified persistent disk. Deleting a disk // removes its data permanently and is irreversible. However, deleting a // disk does not delete any snapshots previously made from the disk. You -// must separately delete snapshots. +// must separately delete snapshots. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/delete func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -53699,6 +56994,7 @@ func (c *DisksDeleteCall) Header() http.Header { func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53759,7 +57055,7 @@ func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.disks.delete", // "parameterOrder": [ @@ -53820,7 +57116,8 @@ type DisksGetCall struct { } // Get: Returns a specified persistent disk. Gets a list of available -// persistent disks by making a list() request. +// persistent disks by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/get func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -53867,6 +57164,7 @@ func (c *DisksGetCall) Header() http.Header { func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53930,7 +57228,7 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { } return ret, nil // { - // "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.", + // "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.get", // "parameterOrder": [ @@ -53988,7 +57286,8 @@ type DisksGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *DisksService) GetIamPolicy(project string, zone string, resource string) *DisksGetIamPolicyCall { c := &DisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -53997,6 +57296,13 @@ func (r *DisksService) GetIamPolicy(project string, zone string, resource string return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *DisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *DisksGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -54034,6 +57340,7 @@ func (c *DisksGetIamPolicyCall) Header() http.Header { func (c *DisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54097,7 +57404,7 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.getIamPolicy", // "parameterOrder": [ @@ -54106,6 +57413,12 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -54157,7 +57470,8 @@ type DisksInsertCall struct { // data in the request. You can create a disk with a sourceImage, a // sourceSnapshot, or create an empty 500 GB data disk by omitting all // properties. You can also create a disk that is larger than the -// default size by specifying the sizeGb property. +// default size by specifying the sizeGb property. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/insert func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -54220,6 +57534,7 @@ func (c *DisksInsertCall) Header() http.Header { func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54284,7 +57599,7 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", + // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.insert", // "parameterOrder": [ @@ -54345,7 +57660,7 @@ type DisksListCall struct { } // List: Retrieves a list of persistent disks contained within the -// specified zone. +// specified zone. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/list func (r *DisksService) List(project string, zone string) *DisksListCall { c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -54454,6 +57769,7 @@ func (c *DisksListCall) Header() http.Header { func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54516,7 +57832,7 @@ func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { } return ret, nil // { - // "description": "Retrieves a list of persistent disks contained within the specified zone.", + // "description": "Retrieves a list of persistent disks contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.list", // "parameterOrder": [ @@ -54609,7 +57925,8 @@ type DisksRemoveResourcePoliciesCall struct { header_ http.Header } -// RemoveResourcePolicies: Removes resource policies from a disk. +// RemoveResourcePolicies: Removes resource policies from a disk. (== +// suppress_warning http-rest-shadowed ==) func (r *DisksService) RemoveResourcePolicies(project string, zone string, disk string, disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest) *DisksRemoveResourcePoliciesCall { c := &DisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -54665,6 +57982,7 @@ func (c *DisksRemoveResourcePoliciesCall) Header() http.Header { func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54730,7 +58048,7 @@ func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Removes resource policies from a disk.", + // "description": "Removes resource policies from a disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.removeResourcePolicies", // "parameterOrder": [ @@ -54795,7 +58113,7 @@ type DisksResizeCall struct { } // Resize: Resizes the specified persistent disk. You can only increase -// the size of the disk. +// the size of the disk. (== suppress_warning http-rest-shadowed ==) func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -54851,6 +58169,7 @@ func (c *DisksResizeCall) Header() http.Header { func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54916,7 +58235,7 @@ func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Resizes the specified persistent disk. You can only increase the size of the disk.", + // "description": "Resizes the specified persistent disk. You can only increase the size of the disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.resize", // "parameterOrder": [ @@ -54981,7 +58300,8 @@ type DisksSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *DisksService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *DisksSetIamPolicyCall { c := &DisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -55018,6 +58338,7 @@ func (c *DisksSetIamPolicyCall) Header() http.Header { func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55083,7 +58404,7 @@ func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.setIamPolicy", // "parameterOrder": [ @@ -55143,7 +58464,8 @@ type DisksSetLabelsCall struct { } // SetLabels: Sets the labels on a disk. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -55199,6 +58521,7 @@ func (c *DisksSetLabelsCall) Header() http.Header { func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55264,7 +58587,7 @@ func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.setLabels", // "parameterOrder": [ @@ -55329,7 +58652,7 @@ type DisksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall { c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -55366,6 +58689,7 @@ func (c *DisksTestIamPermissionsCall) Header() http.Header { func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55431,7 +58755,7 @@ func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPer } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.testIamPermissions", // "parameterOrder": [ @@ -55489,7 +58813,8 @@ type ExternalVpnGatewaysDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified externalVpnGateway. +// Delete: Deletes the specified externalVpnGateway. (== +// suppress_warning http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) Delete(project string, externalVpnGateway string) *ExternalVpnGatewaysDeleteCall { c := &ExternalVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -55543,6 +58868,7 @@ func (c *ExternalVpnGatewaysDeleteCall) Header() http.Header { func (c *ExternalVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55602,7 +58928,7 @@ func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Deletes the specified externalVpnGateway.", + // "description": "Deletes the specified externalVpnGateway. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.externalVpnGateways.delete", // "parameterOrder": [ @@ -55655,7 +58981,8 @@ type ExternalVpnGatewaysGetCall struct { } // Get: Returns the specified externalVpnGateway. Get a list of -// available externalVpnGateways by making a list() request. +// available externalVpnGateways by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) Get(project string, externalVpnGateway string) *ExternalVpnGatewaysGetCall { c := &ExternalVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -55700,6 +59027,7 @@ func (c *ExternalVpnGatewaysGetCall) Header() http.Header { func (c *ExternalVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55762,7 +59090,7 @@ func (c *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*External } return ret, nil // { - // "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.", + // "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.externalVpnGateways.get", // "parameterOrder": [ @@ -55810,7 +59138,8 @@ type ExternalVpnGatewaysInsertCall struct { } // Insert: Creates a ExternalVpnGateway in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway *ExternalVpnGateway) *ExternalVpnGatewaysInsertCall { c := &ExternalVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -55864,6 +59193,7 @@ func (c *ExternalVpnGatewaysInsertCall) Header() http.Header { func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55927,7 +59257,7 @@ func (c *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request.", + // "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.externalVpnGateways.insert", // "parameterOrder": [ @@ -55974,7 +59304,7 @@ type ExternalVpnGatewaysListCall struct { } // List: Retrieves the list of ExternalVpnGateway available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) List(project string) *ExternalVpnGatewaysListCall { c := &ExternalVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -56081,6 +59411,7 @@ func (c *ExternalVpnGatewaysListCall) Header() http.Header { func (c *ExternalVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56142,7 +59473,7 @@ func (c *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*Externa } return ret, nil // { - // "description": "Retrieves the list of ExternalVpnGateway available to the specified project.", + // "description": "Retrieves the list of ExternalVpnGateway available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.externalVpnGateways.list", // "parameterOrder": [ @@ -56227,7 +59558,8 @@ type ExternalVpnGatewaysSetLabelsCall struct { } // SetLabels: Sets the labels on an ExternalVpnGateway. To learn more -// about labels, read the Labeling Resources documentation. +// about labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ExternalVpnGatewaysSetLabelsCall { c := &ExternalVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -56263,6 +59595,7 @@ func (c *ExternalVpnGatewaysSetLabelsCall) Header() http.Header { func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56327,7 +59660,7 @@ func (c *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.externalVpnGateways.setLabels", // "parameterOrder": [ @@ -56378,7 +59711,7 @@ type ExternalVpnGatewaysTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ExternalVpnGatewaysTestIamPermissionsCall { c := &ExternalVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -56414,6 +59747,7 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) Header() http.Header { func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56478,7 +59812,7 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.externalVpnGateways.testIamPermissions", // "parameterOrder": [ @@ -56528,7 +59862,8 @@ type FirewallsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified firewall. +// Delete: Deletes the specified firewall. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/delete func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -56583,6 +59918,7 @@ func (c *FirewallsDeleteCall) Header() http.Header { func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56642,7 +59978,7 @@ func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified firewall.", + // "description": "Deletes the specified firewall. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.firewalls.delete", // "parameterOrder": [ @@ -56694,7 +60030,8 @@ type FirewallsGetCall struct { header_ http.Header } -// Get: Returns the specified firewall. +// Get: Returns the specified firewall. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/get func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -56740,6 +60077,7 @@ func (c *FirewallsGetCall) Header() http.Header { func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56802,7 +60140,7 @@ func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { } return ret, nil // { - // "description": "Returns the specified firewall.", + // "description": "Returns the specified firewall. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.firewalls.get", // "parameterOrder": [ @@ -56850,7 +60188,8 @@ type FirewallsInsertCall struct { } // Insert: Creates a firewall rule in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/insert func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -56905,6 +60244,7 @@ func (c *FirewallsInsertCall) Header() http.Header { func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56968,7 +60308,7 @@ func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates a firewall rule in the specified project using the data included in the request.", + // "description": "Creates a firewall rule in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.firewalls.insert", // "parameterOrder": [ @@ -57015,7 +60355,7 @@ type FirewallsListCall struct { } // List: Retrieves the list of firewall rules available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/list func (r *FirewallsService) List(project string) *FirewallsListCall { c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -57123,6 +60463,7 @@ func (c *FirewallsListCall) Header() http.Header { func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57184,7 +60525,7 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err } return ret, nil // { - // "description": "Retrieves the list of firewall rules available to the specified project.", + // "description": "Retrieves the list of firewall rules available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.firewalls.list", // "parameterOrder": [ @@ -57270,7 +60611,8 @@ type FirewallsPatchCall struct { // Patch: Updates the specified firewall rule with the data included in // the request. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/patch func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -57326,6 +60668,7 @@ func (c *FirewallsPatchCall) Header() http.Header { func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57390,7 +60733,7 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.firewalls.patch", // "parameterOrder": [ @@ -57446,7 +60789,7 @@ type FirewallsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall { c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -57482,6 +60825,7 @@ func (c *FirewallsTestIamPermissionsCall) Header() http.Header { func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57546,7 +60890,7 @@ func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.firewalls.testIamPermissions", // "parameterOrder": [ @@ -57598,9 +60942,9 @@ type FirewallsUpdateCall struct { } // Update: Updates the specified firewall rule with the data included in -// the request. The PUT method can only update the following fields of -// firewall rule: allowed, description, sourceRanges, sourceTags, -// targetTags. +// the request. Note that all fields will be updated if using PUT, even +// fields that are not specified. To update individual fields, please +// use PATCH instead. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/update func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -57656,6 +61000,7 @@ func (c *FirewallsUpdateCall) Header() http.Header { func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57720,7 +61065,7 @@ func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Updates the specified firewall rule with the data included in the request. The PUT method can only update the following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", + // "description": "Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.firewalls.update", // "parameterOrder": [ @@ -57774,7 +61119,8 @@ type ForwardingRulesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of forwarding rules. +// AggregatedList: Retrieves an aggregated list of forwarding rules. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/aggregatedList func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -57882,6 +61228,7 @@ func (c *ForwardingRulesAggregatedListCall) Header() http.Header { func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57943,7 +61290,7 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F } return ret, nil // { - // "description": "Retrieves an aggregated list of forwarding rules.", + // "description": "Retrieves an aggregated list of forwarding rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.forwardingRules.aggregatedList", // "parameterOrder": [ @@ -58027,7 +61374,8 @@ type ForwardingRulesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified ForwardingRule resource. +// Delete: Deletes the specified ForwardingRule resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/delete func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -58083,6 +61431,7 @@ func (c *ForwardingRulesDeleteCall) Header() http.Header { func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58143,7 +61492,7 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified ForwardingRule resource.", + // "description": "Deletes the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.forwardingRules.delete", // "parameterOrder": [ @@ -58204,7 +61553,8 @@ type ForwardingRulesGetCall struct { header_ http.Header } -// Get: Returns the specified ForwardingRule resource. +// Get: Returns the specified ForwardingRule resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/get func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -58251,6 +61601,7 @@ func (c *ForwardingRulesGetCall) Header() http.Header { func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58314,7 +61665,7 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu } return ret, nil // { - // "description": "Returns the specified ForwardingRule resource.", + // "description": "Returns the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.forwardingRules.get", // "parameterOrder": [ @@ -58371,7 +61722,8 @@ type ForwardingRulesInsertCall struct { } // Insert: Creates a ForwardingRule resource in the specified project -// and region using the data included in the request. +// and region using the data included in the request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/insert func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -58427,6 +61779,7 @@ func (c *ForwardingRulesInsertCall) Header() http.Header { func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58491,7 +61844,7 @@ func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.forwardingRules.insert", // "parameterOrder": [ @@ -58547,7 +61900,8 @@ type ForwardingRulesListCall struct { } // List: Retrieves a list of ForwardingRule resources available to the -// specified project and region. +// specified project and region. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/list func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -58656,6 +62010,7 @@ func (c *ForwardingRulesListCall) Header() http.Header { func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58718,7 +62073,7 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR } return ret, nil // { - // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", + // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.forwardingRules.list", // "parameterOrder": [ @@ -58814,7 +62169,8 @@ type ForwardingRulesPatchCall struct { // Patch: Updates the specified forwarding rule with the data included // in the request. This method supports PATCH semantics and uses the // JSON merge patch format and processing rules. Currently, you can only -// patch the network_tier field. +// patch the network_tier field. (== suppress_warning http-rest-shadowed +// ==) func (r *ForwardingRulesService) Patch(project string, region string, forwardingRule string, forwardingrule *ForwardingRule) *ForwardingRulesPatchCall { c := &ForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -58870,6 +62226,7 @@ func (c *ForwardingRulesPatchCall) Header() http.Header { func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58935,7 +62292,7 @@ func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.forwardingRules.patch", // "parameterOrder": [ @@ -59000,7 +62357,8 @@ type ForwardingRulesSetLabelsCall struct { } // SetLabels: Sets the labels on the specified resource. To learn more -// about labels, read the Labeling Resources documentation. +// about labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *ForwardingRulesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *ForwardingRulesSetLabelsCall { c := &ForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -59056,6 +62414,7 @@ func (c *ForwardingRulesSetLabelsCall) Header() http.Header { func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59121,7 +62480,7 @@ func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.forwardingRules.setLabels", // "parameterOrder": [ @@ -59186,7 +62545,8 @@ type ForwardingRulesSetTargetCall struct { } // SetTarget: Changes target URL for forwarding rule. The new target -// should be of the same type as the old target. +// should be of the same type as the old target. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/setTarget func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -59243,6 +62603,7 @@ func (c *ForwardingRulesSetTargetCall) Header() http.Header { func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59308,7 +62669,7 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", + // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.forwardingRules.setTarget", // "parameterOrder": [ @@ -59373,7 +62734,7 @@ type ForwardingRulesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall { c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -59410,6 +62771,7 @@ func (c *ForwardingRulesTestIamPermissionsCall) Header() http.Header { func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59475,7 +62837,7 @@ func (c *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.forwardingRules.testIamPermissions", // "parameterOrder": [ @@ -59533,7 +62895,8 @@ type GlobalAddressesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified address resource. +// Delete: Deletes the specified address resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/delete func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall { c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -59588,6 +62951,7 @@ func (c *GlobalAddressesDeleteCall) Header() http.Header { func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59647,7 +63011,7 @@ func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified address resource.", + // "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.globalAddresses.delete", // "parameterOrder": [ @@ -59700,7 +63064,8 @@ type GlobalAddressesGetCall struct { } // Get: Returns the specified address resource. Gets a list of available -// addresses by making a list() request. +// addresses by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/get func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -59746,6 +63111,7 @@ func (c *GlobalAddressesGetCall) Header() http.Header { func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59808,7 +63174,7 @@ func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, err } return ret, nil // { - // "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request.", + // "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalAddresses.get", // "parameterOrder": [ @@ -59855,8 +63221,9 @@ type GlobalAddressesInsertCall struct { header_ http.Header } -// Insert: Creates an address resource in the specified project using -// the data included in the request. +// Insert: Creates an address resource in the specified project by using +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/insert func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall { c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -59911,6 +63278,7 @@ func (c *GlobalAddressesInsertCall) Header() http.Header { func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59974,7 +63342,7 @@ func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates an address resource in the specified project using the data included in the request.", + // "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalAddresses.insert", // "parameterOrder": [ @@ -60020,7 +63388,8 @@ type GlobalAddressesListCall struct { header_ http.Header } -// List: Retrieves a list of global addresses. +// List: Retrieves a list of global addresses. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/list func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -60128,6 +63497,7 @@ func (c *GlobalAddressesListCall) Header() http.Header { func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60189,7 +63559,7 @@ func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList } return ret, nil // { - // "description": "Retrieves a list of global addresses.", + // "description": "Retrieves a list of global addresses. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalAddresses.list", // "parameterOrder": [ @@ -60274,7 +63644,8 @@ type GlobalAddressesSetLabelsCall struct { } // SetLabels: Sets the labels on a GlobalAddress. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *GlobalAddressesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalAddressesSetLabelsCall { c := &GlobalAddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -60310,6 +63681,7 @@ func (c *GlobalAddressesSetLabelsCall) Header() http.Header { func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60374,7 +63746,7 @@ func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalAddresses.setLabels", // "parameterOrder": [ @@ -60425,7 +63797,7 @@ type GlobalAddressesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall { c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -60461,6 +63833,7 @@ func (c *GlobalAddressesTestIamPermissionsCall) Header() http.Header { func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60525,7 +63898,7 @@ func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalAddresses.testIamPermissions", // "parameterOrder": [ @@ -60575,7 +63948,8 @@ type GlobalForwardingRulesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified GlobalForwardingRule resource. +// Delete: Deletes the specified GlobalForwardingRule resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/delete func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -60630,6 +64004,7 @@ func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60689,7 +64064,7 @@ func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified GlobalForwardingRule resource.", + // "description": "Deletes the specified GlobalForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.globalForwardingRules.delete", // "parameterOrder": [ @@ -60742,7 +64117,8 @@ type GlobalForwardingRulesGetCall struct { } // Get: Returns the specified GlobalForwardingRule resource. Gets a list -// of available forwarding rules by making a list() request. +// of available forwarding rules by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/get func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -60788,6 +64164,7 @@ func (c *GlobalForwardingRulesGetCall) Header() http.Header { func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60850,7 +64227,7 @@ func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*Forwar } return ret, nil // { - // "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.", + // "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalForwardingRules.get", // "parameterOrder": [ @@ -60898,7 +64275,8 @@ type GlobalForwardingRulesInsertCall struct { } // Insert: Creates a GlobalForwardingRule resource in the specified -// project using the data included in the request. +// project using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/insert func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall { c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -60953,6 +64331,7 @@ func (c *GlobalForwardingRulesInsertCall) Header() http.Header { func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61016,7 +64395,7 @@ func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", + // "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalForwardingRules.insert", // "parameterOrder": [ @@ -61063,7 +64442,7 @@ type GlobalForwardingRulesListCall struct { } // List: Retrieves a list of GlobalForwardingRule resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/list func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -61171,6 +64550,7 @@ func (c *GlobalForwardingRulesListCall) Header() http.Header { func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61232,7 +64612,7 @@ func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*Forwa } return ret, nil // { - // "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", + // "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalForwardingRules.list", // "parameterOrder": [ @@ -61319,7 +64699,8 @@ type GlobalForwardingRulesPatchCall struct { // Patch: Updates the specified forwarding rule with the data included // in the request. This method supports PATCH semantics and uses the // JSON merge patch format and processing rules. Currently, you can only -// patch the network_tier field. +// patch the network_tier field. (== suppress_warning http-rest-shadowed +// ==) func (r *GlobalForwardingRulesService) Patch(project string, forwardingRule string, forwardingrule *ForwardingRule) *GlobalForwardingRulesPatchCall { c := &GlobalForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -61374,6 +64755,7 @@ func (c *GlobalForwardingRulesPatchCall) Header() http.Header { func (c *GlobalForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61438,7 +64820,7 @@ func (c *GlobalForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.globalForwardingRules.patch", // "parameterOrder": [ @@ -61494,7 +64876,8 @@ type GlobalForwardingRulesSetLabelsCall struct { } // SetLabels: Sets the labels on the specified resource. To learn more -// about labels, read the Labeling Resources documentation. +// about labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *GlobalForwardingRulesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalForwardingRulesSetLabelsCall { c := &GlobalForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -61530,6 +64913,7 @@ func (c *GlobalForwardingRulesSetLabelsCall) Header() http.Header { func (c *GlobalForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61594,7 +64978,7 @@ func (c *GlobalForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalForwardingRules.setLabels", // "parameterOrder": [ @@ -61645,7 +65029,8 @@ type GlobalForwardingRulesSetTargetCall struct { } // SetTarget: Changes target URL for the GlobalForwardingRule resource. -// The new target should be of the same type as the old target. +// The new target should be of the same type as the old target. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/setTarget func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall { c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -61701,6 +65086,7 @@ func (c *GlobalForwardingRulesSetTargetCall) Header() http.Header { func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61765,7 +65151,7 @@ func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", + // "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalForwardingRules.setTarget", // "parameterOrder": [ @@ -61821,7 +65207,7 @@ type GlobalForwardingRulesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *GlobalForwardingRulesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalForwardingRulesTestIamPermissionsCall { c := &GlobalForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -61857,6 +65243,7 @@ func (c *GlobalForwardingRulesTestIamPermissionsCall) Header() http.Header { func (c *GlobalForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61921,7 +65308,7 @@ func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalForwardingRules.testIamPermissions", // "parameterOrder": [ @@ -61973,7 +65360,7 @@ type GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall struct { } // AttachNetworkEndpoints: Attach a network endpoint to the specified -// network endpoint group. +// network endpoint group. (== suppress_warning http-rest-shadowed ==) func (r *GlobalNetworkEndpointGroupsService) AttachNetworkEndpoints(project string, networkEndpointGroup string, globalnetworkendpointgroupsattachendpointsrequest *GlobalNetworkEndpointGroupsAttachEndpointsRequest) *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall { c := &GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62028,6 +65415,7 @@ func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.He func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62092,7 +65480,7 @@ func (c *GlobalNetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googl } return ret, nil // { - // "description": "Attach a network endpoint to the specified network endpoint group.", + // "description": "Attach a network endpoint to the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalNetworkEndpointGroups.attachNetworkEndpoints", // "parameterOrder": [ @@ -62147,6 +65535,7 @@ type GlobalNetworkEndpointGroupsDeleteCall struct { // Delete: Deletes the specified network endpoint group.Note that the // NEG cannot be deleted if there are backend services referencing it. +// (== suppress_warning http-rest-shadowed ==) func (r *GlobalNetworkEndpointGroupsService) Delete(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsDeleteCall { c := &GlobalNetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62200,6 +65589,7 @@ func (c *GlobalNetworkEndpointGroupsDeleteCall) Header() http.Header { func (c *GlobalNetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62259,7 +65649,7 @@ func (c *GlobalNetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it.", + // "description": "Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.globalNetworkEndpointGroups.delete", // "parameterOrder": [ @@ -62311,7 +65701,8 @@ type GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall struct { } // DetachNetworkEndpoints: Detach the network endpoint from the -// specified network endpoint group. +// specified network endpoint group. (== suppress_warning +// http-rest-shadowed ==) func (r *GlobalNetworkEndpointGroupsService) DetachNetworkEndpoints(project string, networkEndpointGroup string, globalnetworkendpointgroupsdetachendpointsrequest *GlobalNetworkEndpointGroupsDetachEndpointsRequest) *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall { c := &GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62366,6 +65757,7 @@ func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.He func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62430,7 +65822,7 @@ func (c *GlobalNetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googl } return ret, nil // { - // "description": "Detach the network endpoint from the specified network endpoint group.", + // "description": "Detach the network endpoint from the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalNetworkEndpointGroups.detachNetworkEndpoints", // "parameterOrder": [ @@ -62485,7 +65877,8 @@ type GlobalNetworkEndpointGroupsGetCall struct { } // Get: Returns the specified network endpoint group. Gets a list of -// available network endpoint groups by making a list() request. +// available network endpoint groups by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *GlobalNetworkEndpointGroupsService) Get(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsGetCall { c := &GlobalNetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62530,6 +65923,7 @@ func (c *GlobalNetworkEndpointGroupsGetCall) Header() http.Header { func (c *GlobalNetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62592,7 +65986,7 @@ func (c *GlobalNetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.", + // "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalNetworkEndpointGroups.get", // "parameterOrder": [ @@ -62639,7 +66033,8 @@ type GlobalNetworkEndpointGroupsInsertCall struct { } // Insert: Creates a network endpoint group in the specified project -// using the parameters that are included in the request. +// using the parameters that are included in the request. (== +// suppress_warning http-rest-shadowed ==) func (r *GlobalNetworkEndpointGroupsService) Insert(project string, networkendpointgroup *NetworkEndpointGroup) *GlobalNetworkEndpointGroupsInsertCall { c := &GlobalNetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62693,6 +66088,7 @@ func (c *GlobalNetworkEndpointGroupsInsertCall) Header() http.Header { func (c *GlobalNetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62756,7 +66152,7 @@ func (c *GlobalNetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalNetworkEndpointGroups.insert", // "parameterOrder": [ @@ -62803,7 +66199,7 @@ type GlobalNetworkEndpointGroupsListCall struct { } // List: Retrieves the list of network endpoint groups that are located -// in the specified project. +// in the specified project. (== suppress_warning http-rest-shadowed ==) func (r *GlobalNetworkEndpointGroupsService) List(project string) *GlobalNetworkEndpointGroupsListCall { c := &GlobalNetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62910,6 +66306,7 @@ func (c *GlobalNetworkEndpointGroupsListCall) Header() http.Header { func (c *GlobalNetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62971,7 +66368,7 @@ func (c *GlobalNetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves the list of network endpoint groups that are located in the specified project.", + // "description": "Retrieves the list of network endpoint groups that are located in the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalNetworkEndpointGroups.list", // "parameterOrder": [ @@ -63055,7 +66452,7 @@ type GlobalNetworkEndpointGroupsListNetworkEndpointsCall struct { } // ListNetworkEndpoints: Lists the network endpoints in the specified -// network endpoint group. +// network endpoint group. (== suppress_warning http-rest-shadowed ==) func (r *GlobalNetworkEndpointGroupsService) ListNetworkEndpoints(project string, networkEndpointGroup string) *GlobalNetworkEndpointGroupsListNetworkEndpointsCall { c := &GlobalNetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63153,6 +66550,7 @@ func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Head func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63214,7 +66612,7 @@ func (c *GlobalNetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists the network endpoints in the specified network endpoint group.", + // "description": "Lists the network endpoints in the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalNetworkEndpointGroups.listNetworkEndpoints", // "parameterOrder": [ @@ -63304,7 +66702,8 @@ type GlobalOperationsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of all operations. +// AggregatedList: Retrieves an aggregated list of all operations. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/aggregatedList func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -63412,6 +66811,7 @@ func (c *GlobalOperationsAggregatedListCall) Header() http.Header { func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63473,7 +66873,7 @@ func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Retrieves an aggregated list of all operations.", + // "description": "Retrieves an aggregated list of all operations. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalOperations.aggregatedList", // "parameterOrder": [ @@ -63556,7 +66956,8 @@ type GlobalOperationsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified Operations resource. +// Delete: Deletes the specified Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/delete func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall { c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -63592,6 +66993,7 @@ func (c *GlobalOperationsDeleteCall) Header() http.Header { func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63626,7 +67028,7 @@ func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deletes the specified Operations resource.", + // "description": "Deletes the specified Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.globalOperations.delete", // "parameterOrder": [ @@ -63671,7 +67073,8 @@ type GlobalOperationsGetCall struct { } // Get: Retrieves the specified Operations resource. Gets a list of -// operations by making a list() request. +// operations by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/get func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -63717,6 +67120,7 @@ func (c *GlobalOperationsGetCall) Header() http.Header { func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63779,7 +67183,7 @@ func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request.", + // "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalOperations.get", // "parameterOrder": [ @@ -63827,7 +67231,7 @@ type GlobalOperationsListCall struct { } // List: Retrieves a list of Operation resources contained within the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/list func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -63935,6 +67339,7 @@ func (c *GlobalOperationsListCall) Header() http.Header { func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63996,7 +67401,7 @@ func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified project.", + // "description": "Retrieves a list of Operation resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalOperations.list", // "parameterOrder": [ @@ -64088,7 +67493,7 @@ type GlobalOperationsWaitCall struct { // than the default deadline or zero seconds, in overload situations. b. // There is no guarantee that the operation is actually done when // returns. 4. User should be prepared to retry if the operation is not -// DONE. +// DONE. (== suppress_warning http-rest-shadowed ==) func (r *GlobalOperationsService) Wait(project string, operation string) *GlobalOperationsWaitCall { c := &GlobalOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -64123,6 +67528,7 @@ func (c *GlobalOperationsWaitCall) Header() http.Header { func (c *GlobalOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64182,7 +67588,7 @@ func (c *GlobalOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Waits for the specified Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE.", + // "description": "Waits for the specified Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalOperations.wait", // "parameterOrder": [ @@ -64228,7 +67634,8 @@ type GlobalOrganizationOperationsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified Operations resource. +// Delete: Deletes the specified Operations resource. (== +// suppress_warning http-rest-shadowed ==) func (r *GlobalOrganizationOperationsService) Delete(operation string) *GlobalOrganizationOperationsDeleteCall { c := &GlobalOrganizationOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.operation = operation @@ -64269,6 +67676,7 @@ func (c *GlobalOrganizationOperationsDeleteCall) Header() http.Header { func (c *GlobalOrganizationOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64302,7 +67710,7 @@ func (c *GlobalOrganizationOperationsDeleteCall) Do(opts ...googleapi.CallOption } return nil // { - // "description": "Deletes the specified Operations resource.", + // "description": "Deletes the specified Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.globalOrganizationOperations.delete", // "parameterOrder": [ @@ -64343,7 +67751,8 @@ type GlobalOrganizationOperationsGetCall struct { } // Get: Retrieves the specified Operations resource. Gets a list of -// operations by making a list() request. +// operations by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *GlobalOrganizationOperationsService) Get(operation string) *GlobalOrganizationOperationsGetCall { c := &GlobalOrganizationOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.operation = operation @@ -64394,6 +67803,7 @@ func (c *GlobalOrganizationOperationsGetCall) Header() http.Header { func (c *GlobalOrganizationOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64455,7 +67865,7 @@ func (c *GlobalOrganizationOperationsGetCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request.", + // "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalOrganizationOperations.get", // "parameterOrder": [ @@ -64499,7 +67909,7 @@ type GlobalOrganizationOperationsListCall struct { } // List: Retrieves a list of Operation resources contained within the -// specified organization. +// specified organization. (== suppress_warning http-rest-shadowed ==) func (r *GlobalOrganizationOperationsService) List() *GlobalOrganizationOperationsListCall { c := &GlobalOrganizationOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -64612,6 +68022,7 @@ func (c *GlobalOrganizationOperationsListCall) Header() http.Header { func (c *GlobalOrganizationOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64670,7 +68081,7 @@ func (c *GlobalOrganizationOperationsListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified organization.", + // "description": "Retrieves a list of Operation resources contained within the specified organization. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalOrganizationOperations.list", // "parameters": { @@ -64756,7 +68167,7 @@ type GlobalOrganizationOperationsWaitCall struct { // than the default deadline or zero seconds, in overload situations. b. // There is no guarantee that the operation is actually done when // returns. 4. User should be prepared to retry if the operation is not -// DONE. +// DONE. (== suppress_warning http-rest-shadowed ==) func (r *GlobalOrganizationOperationsService) Wait(operation string) *GlobalOrganizationOperationsWaitCall { c := &GlobalOrganizationOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.operation = operation @@ -64797,6 +68208,7 @@ func (c *GlobalOrganizationOperationsWaitCall) Header() http.Header { func (c *GlobalOrganizationOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64855,7 +68267,7 @@ func (c *GlobalOrganizationOperationsWaitCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Waits for the specified Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE.", + // "description": "Waits for the specified Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalOrganizationOperations.wait", // "parameterOrder": [ @@ -64888,6 +68300,926 @@ func (c *GlobalOrganizationOperationsWaitCall) Do(opts ...googleapi.CallOption) } +// method id "compute.globalPublicDelegatedPrefixes.delete": + +type GlobalPublicDelegatedPrefixesDeleteCall struct { + s *Service + project string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified global PublicDelegatedPrefix. (== +// suppress_warning http-rest-shadowed ==) +func (r *GlobalPublicDelegatedPrefixesService) Delete(project string, publicDelegatedPrefix string) *GlobalPublicDelegatedPrefixesDeleteCall { + c := &GlobalPublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.publicDelegatedPrefix = publicDelegatedPrefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *GlobalPublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalPublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GlobalPublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GlobalPublicDelegatedPrefixesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GlobalPublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "publicDelegatedPrefix": c.publicDelegatedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.globalPublicDelegatedPrefixes.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *GlobalPublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified global PublicDelegatedPrefix. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.globalPublicDelegatedPrefixes.delete", + // "parameterOrder": [ + // "project", + // "publicDelegatedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicDelegatedPrefix": { + // "description": "Name of the PublicDelegatedPrefix resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.globalPublicDelegatedPrefixes.get": + +type GlobalPublicDelegatedPrefixesGetCall struct { + s *Service + project string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified global PublicDelegatedPrefix resource. (== +// suppress_warning http-rest-shadowed ==) +func (r *GlobalPublicDelegatedPrefixesService) Get(project string, publicDelegatedPrefix string) *GlobalPublicDelegatedPrefixesGetCall { + c := &GlobalPublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.publicDelegatedPrefix = publicDelegatedPrefix + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalPublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *GlobalPublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *GlobalPublicDelegatedPrefixesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GlobalPublicDelegatedPrefixesGetCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GlobalPublicDelegatedPrefixesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GlobalPublicDelegatedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "publicDelegatedPrefix": c.publicDelegatedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.globalPublicDelegatedPrefixes.get" call. +// Exactly one of *PublicDelegatedPrefix or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PublicDelegatedPrefix.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *GlobalPublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PublicDelegatedPrefix{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified global PublicDelegatedPrefix resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.globalPublicDelegatedPrefixes.get", + // "parameterOrder": [ + // "project", + // "publicDelegatedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicDelegatedPrefix": { + // "description": "Name of the PublicDelegatedPrefix resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "response": { + // "$ref": "PublicDelegatedPrefix" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.globalPublicDelegatedPrefixes.insert": + +type GlobalPublicDelegatedPrefixesInsertCall struct { + s *Service + project string + publicdelegatedprefix *PublicDelegatedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a global PublicDelegatedPrefix in the specified +// project using the parameters that are included in the request. (== +// suppress_warning http-rest-shadowed ==) +func (r *GlobalPublicDelegatedPrefixesService) Insert(project string, publicdelegatedprefix *PublicDelegatedPrefix) *GlobalPublicDelegatedPrefixesInsertCall { + c := &GlobalPublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.publicdelegatedprefix = publicdelegatedprefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *GlobalPublicDelegatedPrefixesInsertCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalPublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GlobalPublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GlobalPublicDelegatedPrefixesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GlobalPublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/publicDelegatedPrefixes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.globalPublicDelegatedPrefixes.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *GlobalPublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.globalPublicDelegatedPrefixes.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/publicDelegatedPrefixes", + // "request": { + // "$ref": "PublicDelegatedPrefix" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.globalPublicDelegatedPrefixes.list": + +type GlobalPublicDelegatedPrefixesListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the global PublicDelegatedPrefixes for a project. (== +// suppress_warning http-rest-shadowed ==) +func (r *GlobalPublicDelegatedPrefixesService) List(project string) *GlobalPublicDelegatedPrefixesListCall { + c := &GlobalPublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *GlobalPublicDelegatedPrefixesListCall) Filter(filter string) *GlobalPublicDelegatedPrefixesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *GlobalPublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *GlobalPublicDelegatedPrefixesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *GlobalPublicDelegatedPrefixesListCall) OrderBy(orderBy string) *GlobalPublicDelegatedPrefixesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *GlobalPublicDelegatedPrefixesListCall) PageToken(pageToken string) *GlobalPublicDelegatedPrefixesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalPublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *GlobalPublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *GlobalPublicDelegatedPrefixesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GlobalPublicDelegatedPrefixesListCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GlobalPublicDelegatedPrefixesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GlobalPublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/publicDelegatedPrefixes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.globalPublicDelegatedPrefixes.list" call. +// Exactly one of *PublicDelegatedPrefixList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *PublicDelegatedPrefixList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *GlobalPublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PublicDelegatedPrefixList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the global PublicDelegatedPrefixes for a project. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.globalPublicDelegatedPrefixes.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/publicDelegatedPrefixes", + // "response": { + // "$ref": "PublicDelegatedPrefixList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *GlobalPublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.globalPublicDelegatedPrefixes.patch": + +type GlobalPublicDelegatedPrefixesPatchCall struct { + s *Service + project string + publicDelegatedPrefix string + publicdelegatedprefix *PublicDelegatedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified global PublicDelegatedPrefix resource +// with the data included in the request. This method supports PATCH +// semantics and uses JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) +func (r *GlobalPublicDelegatedPrefixesService) Patch(project string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *GlobalPublicDelegatedPrefixesPatchCall { + c := &GlobalPublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.publicDelegatedPrefix = publicDelegatedPrefix + c.publicdelegatedprefix = publicdelegatedprefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *GlobalPublicDelegatedPrefixesPatchCall) RequestId(requestId string) *GlobalPublicDelegatedPrefixesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalPublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *GlobalPublicDelegatedPrefixesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *GlobalPublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *GlobalPublicDelegatedPrefixesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *GlobalPublicDelegatedPrefixesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *GlobalPublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "publicDelegatedPrefix": c.publicDelegatedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.globalPublicDelegatedPrefixes.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *GlobalPublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PATCH", + // "id": "compute.globalPublicDelegatedPrefixes.patch", + // "parameterOrder": [ + // "project", + // "publicDelegatedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicDelegatedPrefix": { + // "description": "Name of the PublicDelegatedPrefix resource to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "request": { + // "$ref": "PublicDelegatedPrefix" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.healthChecks.aggregatedList": type HealthChecksAggregatedListCall struct { @@ -64900,7 +69232,8 @@ type HealthChecksAggregatedListCall struct { } // AggregatedList: Retrieves the list of all HealthCheck resources, -// regional and global, available to the specified project. +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) AggregatedList(project string) *HealthChecksAggregatedListCall { c := &HealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65007,6 +69340,7 @@ func (c *HealthChecksAggregatedListCall) Header() http.Header { func (c *HealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65068,7 +69402,7 @@ func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Heal } return ret, nil // { - // "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.healthChecks.aggregatedList", // "parameterOrder": [ @@ -65151,7 +69485,8 @@ type HealthChecksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified HealthCheck resource. +// Delete: Deletes the specified HealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65205,6 +69540,7 @@ func (c *HealthChecksDeleteCall) Header() http.Header { func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65264,7 +69600,7 @@ func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Deletes the specified HealthCheck resource.", + // "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.healthChecks.delete", // "parameterOrder": [ @@ -65317,7 +69653,8 @@ type HealthChecksGetCall struct { } // Get: Returns the specified HealthCheck resource. Gets a list of -// available health checks by making a list() request. +// available health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65362,6 +69699,7 @@ func (c *HealthChecksGetCall) Header() http.Header { func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65424,7 +69762,7 @@ func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, er } return ret, nil // { - // "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", + // "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.healthChecks.get", // "parameterOrder": [ @@ -65472,7 +69810,8 @@ type HealthChecksInsertCall struct { } // Insert: Creates a HealthCheck resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) *HealthChecksInsertCall { c := &HealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65526,6 +69865,7 @@ func (c *HealthChecksInsertCall) Header() http.Header { func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65589,7 +69929,7 @@ func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + // "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.healthChecks.insert", // "parameterOrder": [ @@ -65636,7 +69976,7 @@ type HealthChecksListCall struct { } // List: Retrieves the list of HealthCheck resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) List(project string) *HealthChecksListCall { c := &HealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65743,6 +70083,7 @@ func (c *HealthChecksListCall) Header() http.Header { func (c *HealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65804,7 +70145,7 @@ func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckLis } return ret, nil // { - // "description": "Retrieves the list of HealthCheck resources available to the specified project.", + // "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.healthChecks.list", // "parameterOrder": [ @@ -65891,6 +70232,7 @@ type HealthChecksPatchCall struct { // Patch: Updates a HealthCheck resource in the specified project using // the data included in the request. This method supports PATCH // semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall { c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65945,6 +70287,7 @@ func (c *HealthChecksPatchCall) Header() http.Header { func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66009,7 +70352,7 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.healthChecks.patch", // "parameterOrder": [ @@ -66065,7 +70408,7 @@ type HealthChecksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HealthChecksTestIamPermissionsCall { c := &HealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66101,6 +70444,7 @@ func (c *HealthChecksTestIamPermissionsCall) Header() http.Header { func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66165,7 +70509,7 @@ func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.healthChecks.testIamPermissions", // "parameterOrder": [ @@ -66217,7 +70561,8 @@ type HealthChecksUpdateCall struct { } // Update: Updates a HealthCheck resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HealthChecksService) Update(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksUpdateCall { c := &HealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66272,6 +70617,7 @@ func (c *HealthChecksUpdateCall) Header() http.Header { func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66336,7 +70682,7 @@ func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.healthChecks.update", // "parameterOrder": [ @@ -66390,7 +70736,8 @@ type HttpHealthChecksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified HttpHealthCheck resource. +// Delete: Deletes the specified HttpHealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/delete func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall { c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -66445,6 +70792,7 @@ func (c *HttpHealthChecksDeleteCall) Header() http.Header { func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66504,7 +70852,7 @@ func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified HttpHealthCheck resource.", + // "description": "Deletes the specified HttpHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.httpHealthChecks.delete", // "parameterOrder": [ @@ -66557,7 +70905,8 @@ type HttpHealthChecksGetCall struct { } // Get: Returns the specified HttpHealthCheck resource. Gets a list of -// available HTTP health checks by making a list() request. +// available HTTP health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/get func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -66603,6 +70952,7 @@ func (c *HttpHealthChecksGetCall) Header() http.Header { func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66665,7 +71015,7 @@ func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthC } return ret, nil // { - // "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request.", + // "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpHealthChecks.get", // "parameterOrder": [ @@ -66713,7 +71063,8 @@ type HttpHealthChecksInsertCall struct { } // Insert: Creates a HttpHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/insert func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall { c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -66768,6 +71119,7 @@ func (c *HttpHealthChecksInsertCall) Header() http.Header { func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66831,7 +71183,7 @@ func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", + // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.httpHealthChecks.insert", // "parameterOrder": [ @@ -66878,7 +71230,7 @@ type HttpHealthChecksListCall struct { } // List: Retrieves the list of HttpHealthCheck resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/list func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall { c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -66986,6 +71338,7 @@ func (c *HttpHealthChecksListCall) Header() http.Header { func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67047,7 +71400,7 @@ func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealth } return ret, nil // { - // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", + // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpHealthChecks.list", // "parameterOrder": [ @@ -67134,6 +71487,7 @@ type HttpHealthChecksPatchCall struct { // Patch: Updates a HttpHealthCheck resource in the specified project // using the data included in the request. This method supports PATCH // semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/patch func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -67189,6 +71543,7 @@ func (c *HttpHealthChecksPatchCall) Header() http.Header { func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67253,7 +71608,7 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.httpHealthChecks.patch", // "parameterOrder": [ @@ -67309,7 +71664,7 @@ type HttpHealthChecksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *HttpHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpHealthChecksTestIamPermissionsCall { c := &HttpHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -67345,6 +71700,7 @@ func (c *HttpHealthChecksTestIamPermissionsCall) Header() http.Header { func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67409,7 +71765,7 @@ func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.httpHealthChecks.testIamPermissions", // "parameterOrder": [ @@ -67461,7 +71817,8 @@ type HttpHealthChecksUpdateCall struct { } // Update: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/update func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall { c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -67517,6 +71874,7 @@ func (c *HttpHealthChecksUpdateCall) Header() http.Header { func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67581,7 +71939,7 @@ func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", + // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.httpHealthChecks.update", // "parameterOrder": [ @@ -67635,7 +71993,8 @@ type HttpsHealthChecksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified HttpsHealthCheck resource. +// Delete: Deletes the specified HttpsHealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall { c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -67689,6 +72048,7 @@ func (c *HttpsHealthChecksDeleteCall) Header() http.Header { func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67748,7 +72108,7 @@ func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified HttpsHealthCheck resource.", + // "description": "Deletes the specified HttpsHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.httpsHealthChecks.delete", // "parameterOrder": [ @@ -67801,7 +72161,8 @@ type HttpsHealthChecksGetCall struct { } // Get: Returns the specified HttpsHealthCheck resource. Gets a list of -// available HTTPS health checks by making a list() request. +// available HTTPS health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall { c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -67846,6 +72207,7 @@ func (c *HttpsHealthChecksGetCall) Header() http.Header { func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67908,7 +72270,7 @@ func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealt } return ret, nil // { - // "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request.", + // "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpsHealthChecks.get", // "parameterOrder": [ @@ -67956,7 +72318,8 @@ type HttpsHealthChecksInsertCall struct { } // Insert: Creates a HttpsHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall { c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68010,6 +72373,7 @@ func (c *HttpsHealthChecksInsertCall) Header() http.Header { func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68073,7 +72437,7 @@ func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", + // "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.httpsHealthChecks.insert", // "parameterOrder": [ @@ -68120,7 +72484,7 @@ type HttpsHealthChecksListCall struct { } // List: Retrieves the list of HttpsHealthCheck resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall { c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68227,6 +72591,7 @@ func (c *HttpsHealthChecksListCall) Header() http.Header { func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68288,7 +72653,7 @@ func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHeal } return ret, nil // { - // "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", + // "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpsHealthChecks.list", // "parameterOrder": [ @@ -68375,6 +72740,7 @@ type HttpsHealthChecksPatchCall struct { // Patch: Updates a HttpsHealthCheck resource in the specified project // using the data included in the request. This method supports PATCH // semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall { c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68429,6 +72795,7 @@ func (c *HttpsHealthChecksPatchCall) Header() http.Header { func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68493,7 +72860,7 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.httpsHealthChecks.patch", // "parameterOrder": [ @@ -68549,7 +72916,7 @@ type HttpsHealthChecksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpsHealthChecksTestIamPermissionsCall { c := &HttpsHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68585,6 +72952,7 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) Header() http.Header { func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68649,7 +73017,7 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.httpsHealthChecks.testIamPermissions", // "parameterOrder": [ @@ -68701,7 +73069,8 @@ type HttpsHealthChecksUpdateCall struct { } // Update: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall { c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68756,6 +73125,7 @@ func (c *HttpsHealthChecksUpdateCall) Header() http.Header { func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68820,7 +73190,7 @@ func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", + // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.httpsHealthChecks.update", // "parameterOrder": [ @@ -68874,7 +73244,8 @@ type ImagesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified image. +// Delete: Deletes the specified image. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/delete func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -68929,6 +73300,7 @@ func (c *ImagesDeleteCall) Header() http.Header { func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68988,7 +73360,7 @@ func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified image.", + // "description": "Deletes the specified image. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.images.delete", // "parameterOrder": [ @@ -69043,7 +73415,7 @@ type ImagesDeprecateCall struct { // Deprecate: Sets the deprecation status of an image. // // If an empty request body is given, clears the deprecation status -// instead. +// instead. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/deprecate func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall { c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -69099,6 +73471,7 @@ func (c *ImagesDeprecateCall) Header() http.Header { func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69163,7 +73536,7 @@ func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", + // "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.deprecate", // "parameterOrder": [ @@ -69219,7 +73592,7 @@ type ImagesGetCall struct { } // Get: Returns the specified image. Gets a list of available images by -// making a list() request. +// making a list() request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/get func (r *ImagesService) Get(project string, image string) *ImagesGetCall { c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -69265,6 +73638,7 @@ func (c *ImagesGetCall) Header() http.Header { func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69327,7 +73701,7 @@ func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) { } return ret, nil // { - // "description": "Returns the specified image. Gets a list of available images by making a list() request.", + // "description": "Returns the specified image. Gets a list of available images by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.get", // "parameterOrder": [ @@ -69376,7 +73750,8 @@ type ImagesGetFromFamilyCall struct { } // GetFromFamily: Returns the latest image that is part of an image -// family and is not deprecated. +// family and is not deprecated. (== suppress_warning http-rest-shadowed +// ==) func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall { c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -69421,6 +73796,7 @@ func (c *ImagesGetFromFamilyCall) Header() http.Header { func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69483,7 +73859,7 @@ func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, erro } return ret, nil // { - // "description": "Returns the latest image that is part of an image family and is not deprecated.", + // "description": "Returns the latest image that is part of an image family and is not deprecated. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.getFromFamily", // "parameterOrder": [ @@ -69532,7 +73908,8 @@ type ImagesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *ImagesService) GetIamPolicy(project string, resource string) *ImagesGetIamPolicyCall { c := &ImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -69540,6 +73917,13 @@ func (r *ImagesService) GetIamPolicy(project string, resource string) *ImagesGet return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *ImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ImagesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -69577,6 +73961,7 @@ func (c *ImagesGetIamPolicyCall) Header() http.Header { func (c *ImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69639,7 +74024,7 @@ func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.getIamPolicy", // "parameterOrder": [ @@ -69647,6 +74032,12 @@ func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -69687,7 +74078,7 @@ type ImagesInsertCall struct { } // Insert: Creates an image in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/insert func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -69749,6 +74140,7 @@ func (c *ImagesInsertCall) Header() http.Header { func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69812,7 +74204,7 @@ func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates an image in the specified project using the data included in the request.", + // "description": "Creates an image in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.insert", // "parameterOrder": [ @@ -69872,7 +74264,7 @@ type ImagesListCall struct { // projects, including publicly-available images, like Debian 8. If you // want to get a list of publicly-available images, use this method to // make a request to the respective image project, such as debian-cloud -// or windows-cloud. +// or windows-cloud. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/list func (r *ImagesService) List(project string) *ImagesListCall { c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -69980,6 +74372,7 @@ func (c *ImagesListCall) Header() http.Header { func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70041,7 +74434,7 @@ func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { } return ret, nil // { - // "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + // "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.list", // "parameterOrder": [ @@ -70126,7 +74519,8 @@ type ImagesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *ImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *ImagesSetIamPolicyCall { c := &ImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -70162,6 +74556,7 @@ func (c *ImagesSetIamPolicyCall) Header() http.Header { func (c *ImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70226,7 +74621,7 @@ func (c *ImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.setIamPolicy", // "parameterOrder": [ @@ -70277,7 +74672,8 @@ type ImagesSetLabelsCall struct { } // SetLabels: Sets the labels on an image. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall { c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -70313,6 +74709,7 @@ func (c *ImagesSetLabelsCall) Header() http.Header { func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70377,7 +74774,7 @@ func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.setLabels", // "parameterOrder": [ @@ -70428,7 +74825,7 @@ type ImagesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall { c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -70464,6 +74861,7 @@ func (c *ImagesTestIamPermissionsCall) Header() http.Header { func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70528,7 +74926,7 @@ func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.testIamPermissions", // "parameterOrder": [ @@ -70596,7 +74994,7 @@ type InstanceGroupManagersAbandonInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall { c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -70652,6 +75050,7 @@ func (c *InstanceGroupManagersAbandonInstancesCall) Header() http.Header { func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70717,7 +75116,7 @@ func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.abandonInstances", // "parameterOrder": [ @@ -70778,7 +75177,7 @@ type InstanceGroupManagersAggregatedListCall struct { } // AggregatedList: Retrieves the list of managed instance groups and -// groups them by zone. +// groups them by zone. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall { c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -70885,6 +75284,7 @@ func (c *InstanceGroupManagersAggregatedListCall) Header() http.Header { func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70947,7 +75347,7 @@ func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Retrieves the list of managed instance groups and groups them by zone.", + // "description": "Retrieves the list of managed instance groups and groups them by zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroupManagers.aggregatedList", // "parameterOrder": [ @@ -71034,7 +75434,8 @@ type InstanceGroupManagersApplyUpdatesToInstancesCall struct { // ApplyUpdatesToInstances: Apply changes to selected instances on the // managed instance group. This method can be used to apply new -// overrides and/or new versions. +// overrides and/or new versions. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) ApplyUpdatesToInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest) *InstanceGroupManagersApplyUpdatesToInstancesCall { c := &InstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71071,6 +75472,7 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71136,7 +75538,7 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.", + // "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.applyUpdatesToInstances", // "parameterOrder": [ @@ -71198,7 +75600,8 @@ type InstanceGroupManagersCreateInstancesCall struct { // instance template. The create instances operation is marked DONE if // the createInstances request is successful. The underlying actions // take additional time. You must separately verify the status of the -// creating or actions with the listmanagedinstances method. +// creating or actions with the listmanagedinstances method. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) CreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest) *InstanceGroupManagersCreateInstancesCall { c := &InstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71253,6 +75656,7 @@ func (c *InstanceGroupManagersCreateInstancesCall) Header() http.Header { func (c *InstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71318,7 +75722,7 @@ func (c *InstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.", + // "description": "Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.createInstances", // "parameterOrder": [ @@ -71382,7 +75786,7 @@ type InstanceGroupManagersDeleteCall struct { // Delete: Deletes the specified managed instance group and all of the // instances in that group. Note that the instance group must not belong // to a backend service. Read Deleting an instance group for more -// information. +// information. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71437,6 +75841,7 @@ func (c *InstanceGroupManagersDeleteCall) Header() http.Header { func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71497,7 +75902,7 @@ func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", + // "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instanceGroupManagers.delete", // "parameterOrder": [ @@ -71571,7 +75976,7 @@ type InstanceGroupManagersDeleteInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall { c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71627,6 +76032,7 @@ func (c *InstanceGroupManagersDeleteInstancesCall) Header() http.Header { func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71692,7 +76098,7 @@ func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.deleteInstances", // "parameterOrder": [ @@ -71755,7 +76161,8 @@ type InstanceGroupManagersDeletePerInstanceConfigsCall struct { } // DeletePerInstanceConfigs: Deletes selected per-instance configs for -// the managed instance group. +// the managed instance group. (== suppress_warning http-rest-shadowed +// ==) func (r *InstanceGroupManagersService) DeletePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteperinstanceconfigsreq *InstanceGroupManagersDeletePerInstanceConfigsReq) *InstanceGroupManagersDeletePerInstanceConfigsCall { c := &InstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71792,6 +76199,7 @@ func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Header() http.Header func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71857,7 +76265,7 @@ func (c *InstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Deletes selected per-instance configs for the managed instance group.", + // "description": "Deletes selected per-instance configs for the managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.deletePerInstanceConfigs", // "parameterOrder": [ @@ -71916,7 +76324,7 @@ type InstanceGroupManagersGetCall struct { // Get: Returns all of the details about the specified managed instance // group. Gets a list of available managed instance groups by making a -// list() request. +// list() request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71962,6 +76370,7 @@ func (c *InstanceGroupManagersGetCall) Header() http.Header { func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72025,7 +76434,7 @@ func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*Instan } return ret, nil // { - // "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.", + // "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroupManagers.get", // "parameterOrder": [ @@ -72089,6 +76498,7 @@ type InstanceGroupManagersInsertCall struct { // // A managed instance group can have up to 1000 VM instances per group. // Please contact Cloud Support if you need an increase in this limit. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall { c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72143,6 +76553,7 @@ func (c *InstanceGroupManagersInsertCall) Header() http.Header { func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72207,7 +76618,7 @@ func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", + // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.insert", // "parameterOrder": [ @@ -72262,7 +76673,8 @@ type InstanceGroupManagersListCall struct { } // List: Retrieves a list of managed instance groups that are contained -// within the specified project and zone. +// within the specified project and zone. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall { c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72370,6 +76782,7 @@ func (c *InstanceGroupManagersListCall) Header() http.Header { func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72432,7 +76845,7 @@ func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*Insta } return ret, nil // { - // "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", + // "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroupManagers.list", // "parameterOrder": [ @@ -72511,6 +76924,281 @@ func (c *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*Insta } } +// method id "compute.instanceGroupManagers.listErrors": + +type InstanceGroupManagersListErrorsCall struct { + s *Service + project string + zone string + instanceGroupManager string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListErrors: Lists all errors thrown by actions on instances for a +// given managed instance group. (== suppress_warning http-rest-shadowed +// ==) +func (r *InstanceGroupManagersService) ListErrors(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListErrorsCall { + c := &InstanceGroupManagersListErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instanceGroupManager = instanceGroupManager + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *InstanceGroupManagersListErrorsCall) Filter(filter string) *InstanceGroupManagersListErrorsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *InstanceGroupManagersListErrorsCall) MaxResults(maxResults int64) *InstanceGroupManagersListErrorsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *InstanceGroupManagersListErrorsCall) OrderBy(orderBy string) *InstanceGroupManagersListErrorsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *InstanceGroupManagersListErrorsCall) PageToken(pageToken string) *InstanceGroupManagersListErrorsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstanceGroupManagersListErrorsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListErrorsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstanceGroupManagersListErrorsCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListErrorsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstanceGroupManagersListErrorsCall) Context(ctx context.Context) *InstanceGroupManagersListErrorsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstanceGroupManagersListErrorsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instanceGroupManagers.listErrors" call. +// Exactly one of *InstanceGroupManagersListErrorsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *InstanceGroupManagersListErrorsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListErrorsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &InstanceGroupManagersListErrorsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all errors thrown by actions on instances for a given managed instance group. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.instanceGroupManagers.listErrors", + // "parameterOrder": [ + // "project", + // "zone", + // "instanceGroupManager" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "instanceGroupManager": { + // "description": "The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors", + // "response": { + // "$ref": "InstanceGroupManagersListErrorsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *InstanceGroupManagersListErrorsCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListErrorsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.instanceGroupManagers.listManagedInstances": type InstanceGroupManagersListManagedInstancesCall struct { @@ -72528,7 +77216,8 @@ type InstanceGroupManagersListManagedInstancesCall struct { // indicates the action that the managed instance group is performing on // the instance. For example, if the group is still creating an // instance, the currentAction is CREATING. If a previous action failed, -// the list displays the errors for that failed action. +// the list displays the errors for that failed action. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall { c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72627,6 +77316,7 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Header() http.Header { func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72689,7 +77379,7 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", + // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.listManagedInstances", // "parameterOrder": [ @@ -72788,7 +77478,8 @@ type InstanceGroupManagersListPerInstanceConfigsCall struct { } // ListPerInstanceConfigs: Lists all of the per-instance configs defined -// for the managed instance group. +// for the managed instance group. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) ListPerInstanceConfigs(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListPerInstanceConfigsCall { c := &InstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72887,6 +77578,7 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { func (c *InstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72949,7 +77641,7 @@ func (c *InstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Lists all of the per-instance configs defined for the managed instance group.", + // "description": "Lists all of the per-instance configs defined for the managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.listPerInstanceConfigs", // "parameterOrder": [ @@ -73054,7 +77746,7 @@ type InstanceGroupManagersPatchCall struct { // process of being patched. You must separately verify the status of // the individual instances with the listManagedInstances method. This // method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. +// and processing rules. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Patch(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersPatchCall { c := &InstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73110,6 +77802,7 @@ func (c *InstanceGroupManagersPatchCall) Header() http.Header { func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73175,7 +77868,7 @@ func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instanceGroupManagers.patch", // "parameterOrder": [ @@ -73240,7 +77933,8 @@ type InstanceGroupManagersPatchPerInstanceConfigsCall struct { // PatchPerInstanceConfigs: Insert or patch (for the ones that already // exist) per-instance configs for the managed instance group. // perInstanceConfig.instance serves as a key used to distinguish -// whether to perform insert or patch. +// whether to perform insert or patch. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) PatchPerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagerspatchperinstanceconfigsreq *InstanceGroupManagersPatchPerInstanceConfigsReq) *InstanceGroupManagersPatchPerInstanceConfigsCall { c := &InstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73296,6 +77990,7 @@ func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.Header func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73361,7 +78056,7 @@ func (c *InstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", + // "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.patchPerInstanceConfigs", // "parameterOrder": [ @@ -73437,7 +78132,7 @@ type InstanceGroupManagersRecreateInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall { c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73493,6 +78188,7 @@ func (c *InstanceGroupManagersRecreateInstancesCall) Header() http.Header { func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73558,7 +78254,7 @@ func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.recreateInstances", // "parameterOrder": [ @@ -73640,6 +78336,7 @@ type InstanceGroupManagersResizeCall struct { // If the group is part of a backend service that has enabled connection // draining, it can take up to 60 seconds after the connection draining // duration has elapsed before the VM instance is removed or deleted. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall { c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73695,6 +78392,7 @@ func (c *InstanceGroupManagersResizeCall) Header() http.Header { func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73755,7 +78453,7 @@ func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.resize", // "parameterOrder": [ @@ -73837,6 +78535,7 @@ type InstanceGroupManagersResizeAdvancedCall struct { // If the group is part of a backend service that has enabled connection // draining, it can take up to 60 seconds after the connection draining // duration has elapsed before the VM instance is removed or deleted. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) ResizeAdvanced(project string, zone string, instanceGroupManager string, instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest) *InstanceGroupManagersResizeAdvancedCall { c := &InstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73892,6 +78591,7 @@ func (c *InstanceGroupManagersResizeAdvancedCall) Header() http.Header { func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73957,7 +78657,7 @@ func (c *InstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.resizeAdvanced", // "parameterOrder": [ @@ -74020,7 +78720,8 @@ type InstanceGroupManagersSetAutoHealingPoliciesCall struct { } // SetAutoHealingPolicies: Modifies the autohealing policies. -// [Deprecated] This method is deprecated. Please use Patch instead. +// [Deprecated] This method is deprecated. Please use Patch instead. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall { c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74076,6 +78777,7 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74141,7 +78843,7 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.", + // "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.setAutoHealingPolicies", // "parameterOrder": [ @@ -74205,7 +78907,8 @@ type InstanceGroupManagersSetInstanceTemplateCall struct { // SetInstanceTemplate: Specifies the instance template to use when // creating new instances in this group. The templates for existing -// instances in the group do not change unless you recreate them. +// instances in the group do not change unless you recreate them. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall { c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74261,6 +78964,7 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74326,7 +79030,7 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", + // "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.setInstanceTemplate", // "parameterOrder": [ @@ -74394,7 +79098,8 @@ type InstanceGroupManagersSetTargetPoolsCall struct { // group. This operation is marked DONE when you make the request even // if the instances have not yet been added to their target pools. The // change might take some time to apply to all of the instances in the -// group depending on the size of the group. +// group depending on the size of the group. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall { c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74450,6 +79155,7 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header { func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74515,7 +79221,7 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", + // "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.setTargetPools", // "parameterOrder": [ @@ -74578,7 +79284,7 @@ type InstanceGroupManagersTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupManagersTestIamPermissionsCall { c := &InstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74615,6 +79321,7 @@ func (c *InstanceGroupManagersTestIamPermissionsCall) Header() http.Header { func (c *InstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74680,7 +79387,7 @@ func (c *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.testIamPermissions", // "parameterOrder": [ @@ -74744,7 +79451,8 @@ type InstanceGroupManagersUpdateCall struct { // you specify in the request. This operation is marked as DONE when the // group is updated even if the instances in the group have not yet been // updated. You must separately verify the status of the individual -// instances with the listManagedInstances method. +// instances with the listManagedInstances method. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) Update(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersUpdateCall { c := &InstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74800,6 +79508,7 @@ func (c *InstanceGroupManagersUpdateCall) Header() http.Header { func (c *InstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74865,7 +79574,7 @@ func (c *InstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.instanceGroupManagers.update", // "parameterOrder": [ @@ -74930,7 +79639,8 @@ type InstanceGroupManagersUpdatePerInstanceConfigsCall struct { // UpdatePerInstanceConfigs: Insert or update (for the ones that already // exist) per-instance configs for the managed instance group. // perInstanceConfig.instance serves as a key used to distinguish -// whether to perform insert or patch. +// whether to perform insert or patch. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) UpdatePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq) *InstanceGroupManagersUpdatePerInstanceConfigsCall { c := &InstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74986,6 +79696,7 @@ func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75051,7 +79762,7 @@ func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", + // "description": "Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.updatePerInstanceConfigs", // "parameterOrder": [ @@ -75115,7 +79826,8 @@ type InstanceGroupsAddInstancesCall struct { // AddInstances: Adds a list of instances to the specified instance // group. All of the instances in the instance group must be in the same -// network/subnetwork. Read Adding instances for more information. +// network/subnetwork. Read Adding instances for more information. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75171,6 +79883,7 @@ func (c *InstanceGroupsAddInstancesCall) Header() http.Header { func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75236,7 +79949,7 @@ func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", + // "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.addInstances", // "parameterOrder": [ @@ -75297,7 +80010,7 @@ type InstanceGroupsAggregatedListCall struct { } // AggregatedList: Retrieves the list of instance groups and sorts them -// by zone. +// by zone. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75404,6 +80117,7 @@ func (c *InstanceGroupsAggregatedListCall) Header() http.Header { func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75465,7 +80179,7 @@ func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*In } return ret, nil // { - // "description": "Retrieves the list of instance groups and sorts them by zone.", + // "description": "Retrieves the list of instance groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroups.aggregatedList", // "parameterOrder": [ @@ -75552,7 +80266,7 @@ type InstanceGroupsDeleteCall struct { // Delete: Deletes the specified instance group. The instances in the // group are not deleted. Note that instance group must not belong to a // backend service. Read Deleting an instance group for more -// information. +// information. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75607,6 +80321,7 @@ func (c *InstanceGroupsDeleteCall) Header() http.Header { func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75667,7 +80382,7 @@ func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", + // "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instanceGroups.delete", // "parameterOrder": [ @@ -75727,7 +80442,8 @@ type InstanceGroupsGetCall struct { } // Get: Returns the specified instance group. Gets a list of available -// instance groups by making a list() request. +// instance groups by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75773,6 +80489,7 @@ func (c *InstanceGroupsGetCall) Header() http.Header { func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75836,7 +80553,7 @@ func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup } return ret, nil // { - // "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request.", + // "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroups.get", // "parameterOrder": [ @@ -75891,7 +80608,8 @@ type InstanceGroupsInsertCall struct { } // Insert: Creates an instance group in the specified project using the -// parameters that are included in the request. +// parameters that are included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75946,6 +80664,7 @@ func (c *InstanceGroupsInsertCall) Header() http.Header { func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76010,7 +80729,7 @@ func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates an instance group in the specified project using the parameters that are included in the request.", + // "description": "Creates an instance group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.insert", // "parameterOrder": [ @@ -76065,7 +80784,8 @@ type InstanceGroupsListCall struct { } // List: Retrieves the list of instance groups that are located in the -// specified project and zone. +// specified project and zone. (== suppress_warning http-rest-shadowed +// ==) func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76173,6 +80893,7 @@ func (c *InstanceGroupsListCall) Header() http.Header { func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76235,7 +80956,7 @@ func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGrou } return ret, nil // { - // "description": "Retrieves the list of instance groups that are located in the specified project and zone.", + // "description": "Retrieves the list of instance groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroups.list", // "parameterOrder": [ @@ -76328,6 +81049,7 @@ type InstanceGroupsListInstancesCall struct { } // ListInstances: Lists the instances in the specified instance group. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76427,6 +81149,7 @@ func (c *InstanceGroupsListInstancesCall) Header() http.Header { func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76492,7 +81215,7 @@ func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*Ins } return ret, nil // { - // "description": "Lists the instances in the specified instance group.", + // "description": "Lists the instances in the specified instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.listInstances", // "parameterOrder": [ @@ -76599,7 +81322,8 @@ type InstanceGroupsRemoveInstancesCall struct { // // If the group is part of a backend service that has enabled connection // draining, it can take up to 60 seconds after the connection draining -// duration before the VM instance is removed or deleted. +// duration before the VM instance is removed or deleted. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76655,6 +81379,7 @@ func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76720,7 +81445,7 @@ func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", + // "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.removeInstances", // "parameterOrder": [ @@ -76783,6 +81508,7 @@ type InstanceGroupsSetNamedPortsCall struct { } // SetNamedPorts: Sets the named ports for the specified instance group. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76838,6 +81564,7 @@ func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76903,7 +81630,7 @@ func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Sets the named ports for the specified instance group.", + // "description": "Sets the named ports for the specified instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.setNamedPorts", // "parameterOrder": [ @@ -76966,7 +81693,7 @@ type InstanceGroupsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupsTestIamPermissionsCall { c := &InstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -77003,6 +81730,7 @@ func (c *InstanceGroupsTestIamPermissionsCall) Header() http.Header { func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77068,7 +81796,7 @@ func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.testIamPermissions", // "parameterOrder": [ @@ -77129,6 +81857,7 @@ type InstanceTemplatesDeleteCall struct { // Delete: Deletes the specified instance template. Deleting an instance // template is permanent and cannot be undone. It is not possible to // delete templates that are already in use by a managed instance group. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -77183,6 +81912,7 @@ func (c *InstanceTemplatesDeleteCall) Header() http.Header { func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77242,7 +81972,7 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", + // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instanceTemplates.delete", // "parameterOrder": [ @@ -77295,7 +82025,8 @@ type InstanceTemplatesGetCall struct { } // Get: Returns the specified instance template. Gets a list of -// available instance templates by making a list() request. +// available instance templates by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/get func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -77341,6 +82072,7 @@ func (c *InstanceTemplatesGetCall) Header() http.Header { func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77403,7 +82135,7 @@ func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTe } return ret, nil // { - // "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request.", + // "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceTemplates.get", // "parameterOrder": [ @@ -77452,7 +82184,8 @@ type InstanceTemplatesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) *InstanceTemplatesGetIamPolicyCall { c := &InstanceTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -77460,6 +82193,13 @@ func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InstanceTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstanceTemplatesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -77497,6 +82237,7 @@ func (c *InstanceTemplatesGetIamPolicyCall) Header() http.Header { func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77559,7 +82300,7 @@ func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceTemplates.getIamPolicy", // "parameterOrder": [ @@ -77567,6 +82308,12 @@ func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -77610,7 +82357,8 @@ type InstanceTemplatesInsertCall struct { // the data that is included in the request. If you are creating a new // template to update an existing instance group, your new instance // template must use the same network or, if applicable, the same -// subnetwork as the original template. +// subnetwork as the original template. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/insert func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -77665,6 +82413,7 @@ func (c *InstanceTemplatesInsertCall) Header() http.Header { func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77728,7 +82477,7 @@ func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", + // "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceTemplates.insert", // "parameterOrder": [ @@ -77775,7 +82524,8 @@ type InstanceTemplatesListCall struct { } // List: Retrieves a list of instance templates that are contained -// within the specified project. +// within the specified project. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/list func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -77883,6 +82633,7 @@ func (c *InstanceTemplatesListCall) Header() http.Header { func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77944,7 +82695,7 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT } return ret, nil // { - // "description": "Retrieves a list of instance templates that are contained within the specified project.", + // "description": "Retrieves a list of instance templates that are contained within the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceTemplates.list", // "parameterOrder": [ @@ -78029,7 +82780,8 @@ type InstanceTemplatesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceTemplatesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InstanceTemplatesSetIamPolicyCall { c := &InstanceTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78065,6 +82817,7 @@ func (c *InstanceTemplatesSetIamPolicyCall) Header() http.Header { func (c *InstanceTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78129,7 +82882,7 @@ func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceTemplates.setIamPolicy", // "parameterOrder": [ @@ -78180,7 +82933,7 @@ type InstanceTemplatesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall { c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78216,6 +82969,7 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header { func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78280,7 +83034,7 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceTemplates.testIamPermissions", // "parameterOrder": [ @@ -78333,7 +83087,7 @@ type InstancesAddAccessConfigCall struct { } // AddAccessConfig: Adds an access config to an instance's network -// interface. +// interface. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/addAccessConfig func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -78391,6 +83145,7 @@ func (c *InstancesAddAccessConfigCall) Header() http.Header { func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78456,7 +83211,7 @@ func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Adds an access config to an instance's network interface.", + // "description": "Adds an access config to an instance's network interface. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.addAccessConfig", // "parameterOrder": [ @@ -78529,7 +83284,8 @@ type InstancesAddResourcePoliciesCall struct { // AddResourcePolicies: Adds existing resource policies to an instance. // You can only add one policy right now which will be applied to this -// instance for scheduling live migrations. +// instance for scheduling live migrations. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) AddResourcePolicies(project string, zone string, instance string, instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest) *InstancesAddResourcePoliciesCall { c := &InstancesAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78585,6 +83341,7 @@ func (c *InstancesAddResourcePoliciesCall) Header() http.Header { func (c *InstancesAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78650,7 +83407,7 @@ func (c *InstancesAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.", + // "description": "Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.addResourcePolicies", // "parameterOrder": [ @@ -78713,7 +83470,8 @@ type InstancesAggregatedListCall struct { } // AggregatedList: Retrieves aggregated list of all of the instances in -// your project across all regions and zones. +// your project across all regions and zones. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/aggregatedList func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -78821,6 +83579,7 @@ func (c *InstancesAggregatedListCall) Header() http.Header { func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78882,7 +83641,7 @@ func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Instanc } return ret, nil // { - // "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones.", + // "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.aggregatedList", // "parameterOrder": [ @@ -78970,7 +83729,8 @@ type InstancesAttachDiskCall struct { // AttachDisk: Attaches an existing Disk resource to an instance. You // must first create the disk before you can attach it. It is not // possible to create and attach a disk at the same time. For more -// information, read Adding a persistent disk to your instance. +// information, read Adding a persistent disk to your instance. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/attachDisk func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -79035,6 +83795,7 @@ func (c *InstancesAttachDiskCall) Header() http.Header { func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79100,7 +83861,7 @@ func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", + // "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.attachDisk", // "parameterOrder": [ @@ -79169,7 +83930,8 @@ type InstancesDeleteCall struct { } // Delete: Deletes the specified Instance resource. For more -// information, see Stopping or Deleting an Instance. +// information, see Stopping or Deleting an Instance. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/delete func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -79225,6 +83987,7 @@ func (c *InstancesDeleteCall) Header() http.Header { func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79285,7 +84048,7 @@ func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", + // "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instances.delete", // "parameterOrder": [ @@ -79346,7 +84109,7 @@ type InstancesDeleteAccessConfigCall struct { } // DeleteAccessConfig: Deletes an access config from an instance's -// network interface. +// network interface. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/deleteAccessConfig func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -79404,6 +84167,7 @@ func (c *InstancesDeleteAccessConfigCall) Header() http.Header { func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79464,7 +84228,7 @@ func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes an access config from an instance's network interface.", + // "description": "Deletes an access config from an instance's network interface. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.deleteAccessConfig", // "parameterOrder": [ @@ -79538,7 +84302,8 @@ type InstancesDetachDiskCall struct { header_ http.Header } -// DetachDisk: Detaches a disk from an instance. +// DetachDisk: Detaches a disk from an instance. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/detachDisk func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -79595,6 +84360,7 @@ func (c *InstancesDetachDiskCall) Header() http.Header { func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79655,7 +84421,7 @@ func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Detaches a disk from an instance.", + // "description": "Detaches a disk from an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.detachDisk", // "parameterOrder": [ @@ -79724,7 +84490,8 @@ type InstancesGetCall struct { } // Get: Returns the specified Instance resource. Gets a list of -// available instances by making a list() request. +// available instances by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/get func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -79771,6 +84538,7 @@ func (c *InstancesGetCall) Header() http.Header { func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79834,7 +84602,7 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { } return ret, nil // { - // "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request.", + // "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.get", // "parameterOrder": [ @@ -79892,7 +84660,8 @@ type InstancesGetEffectiveFirewallsCall struct { } // GetEffectiveFirewalls: Returns effective firewalls applied to an -// interface of the instance. +// interface of the instance. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) GetEffectiveFirewalls(project string, zone string, instance string, networkInterface string) *InstancesGetEffectiveFirewallsCall { c := &InstancesGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79939,6 +84708,7 @@ func (c *InstancesGetEffectiveFirewallsCall) Header() http.Header { func (c *InstancesGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80003,7 +84773,7 @@ func (c *InstancesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns effective firewalls applied to an interface of the instance.", + // "description": "Returns effective firewalls applied to an interface of the instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getEffectiveFirewalls", // "parameterOrder": [ @@ -80067,7 +84837,8 @@ type InstancesGetGuestAttributesCall struct { header_ http.Header } -// GetGuestAttributes: Returns the specified guest attributes entry. +// GetGuestAttributes: Returns the specified guest attributes entry. (== +// suppress_warning http-rest-shadowed ==) func (r *InstancesService) GetGuestAttributes(project string, zone string, instance string) *InstancesGetGuestAttributesCall { c := &InstancesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80127,6 +84898,7 @@ func (c *InstancesGetGuestAttributesCall) Header() http.Header { func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80190,7 +84962,7 @@ func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*Gue } return ret, nil // { - // "description": "Returns the specified guest attributes entry.", + // "description": "Returns the specified guest attributes entry. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getGuestAttributes", // "parameterOrder": [ @@ -80258,7 +85030,8 @@ type InstancesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) GetIamPolicy(project string, zone string, resource string) *InstancesGetIamPolicyCall { c := &InstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80267,6 +85040,13 @@ func (r *InstancesService) GetIamPolicy(project string, zone string, resource st return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstancesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -80304,6 +85084,7 @@ func (c *InstancesGetIamPolicyCall) Header() http.Header { func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80367,7 +85148,7 @@ func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getIamPolicy", // "parameterOrder": [ @@ -80376,6 +85157,12 @@ func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -80425,7 +85212,7 @@ type InstancesGetSerialPortOutputCall struct { } // GetSerialPortOutput: Returns the last 1 MB of serial port output from -// the specified instance. +// the specified instance. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/getSerialPortOutput func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -80490,6 +85277,7 @@ func (c *InstancesGetSerialPortOutputCall) Header() http.Header { func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80553,7 +85341,7 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se } return ret, nil // { - // "description": "Returns the last 1 MB of serial port output from the specified instance.", + // "description": "Returns the last 1 MB of serial port output from the specified instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getSerialPortOutput", // "parameterOrder": [ @@ -80626,7 +85414,7 @@ type InstancesGetShieldedInstanceIdentityCall struct { } // GetShieldedInstanceIdentity: Returns the Shielded Instance Identity -// of an instance +// of an instance (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone string, instance string) *InstancesGetShieldedInstanceIdentityCall { c := &InstancesGetShieldedInstanceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80672,6 +85460,7 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Header() http.Header { func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80735,7 +85524,7 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Returns the Shielded Instance Identity of an instance", + // "description": "Returns the Shielded Instance Identity of an instance (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getShieldedInstanceIdentity", // "parameterOrder": [ @@ -80793,7 +85582,7 @@ type InstancesGetShieldedVmIdentityCall struct { } // GetShieldedVmIdentity: Returns the Shielded VM Identity of an -// instance +// instance (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) GetShieldedVmIdentity(project string, zone string, instance string) *InstancesGetShieldedVmIdentityCall { c := &InstancesGetShieldedVmIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80839,6 +85628,7 @@ func (c *InstancesGetShieldedVmIdentityCall) Header() http.Header { func (c *InstancesGetShieldedVmIdentityCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80902,7 +85692,7 @@ func (c *InstancesGetShieldedVmIdentityCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns the Shielded VM Identity of an instance", + // "description": "Returns the Shielded VM Identity of an instance (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getShieldedVmIdentity", // "parameterOrder": [ @@ -80959,7 +85749,8 @@ type InstancesInsertCall struct { } // Insert: Creates an instance resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/insert func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -81044,6 +85835,7 @@ func (c *InstancesInsertCall) Header() http.Header { func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81108,7 +85900,7 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates an instance resource in the specified project using the data included in the request.", + // "description": "Creates an instance resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.insert", // "parameterOrder": [ @@ -81174,7 +85966,7 @@ type InstancesListCall struct { } // List: Retrieves the list of instances contained within the specified -// zone. +// zone. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/list func (r *InstancesService) List(project string, zone string) *InstancesListCall { c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -81283,6 +86075,7 @@ func (c *InstancesListCall) Header() http.Header { func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81345,7 +86138,7 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, err } return ret, nil // { - // "description": "Retrieves the list of instances contained within the specified zone.", + // "description": "Retrieves the list of instances contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.list", // "parameterOrder": [ @@ -81440,7 +86233,8 @@ type InstancesListReferrersCall struct { // ListReferrers: Retrieves the list of referrers to instances contained // within the specified zone. For more information, read Viewing -// Referrers to VM Instances. +// Referrers to VM Instances. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall { c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -81549,6 +86343,7 @@ func (c *InstancesListReferrersCall) Header() http.Header { func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81612,7 +86407,7 @@ func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*Instance } return ret, nil // { - // "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.", + // "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.listReferrers", // "parameterOrder": [ @@ -81714,6 +86509,7 @@ type InstancesRemoveResourcePoliciesCall struct { } // RemoveResourcePolicies: Removes resource policies from an instance. +// (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) RemoveResourcePolicies(project string, zone string, instance string, instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest) *InstancesRemoveResourcePoliciesCall { c := &InstancesRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -81769,6 +86565,7 @@ func (c *InstancesRemoveResourcePoliciesCall) Header() http.Header { func (c *InstancesRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81834,7 +86631,7 @@ func (c *InstancesRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Removes resource policies from an instance.", + // "description": "Removes resource policies from an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.removeResourcePolicies", // "parameterOrder": [ @@ -81899,7 +86696,7 @@ type InstancesResetCall struct { // Reset: Performs a reset on the instance. This is a hard reset the VM // does not do a graceful shutdown. For more information, see Resetting -// an instance. +// an instance. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/reset func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -81955,6 +86752,7 @@ func (c *InstancesResetCall) Header() http.Header { func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82015,7 +86813,7 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", + // "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.reset", // "parameterOrder": [ @@ -82077,7 +86875,8 @@ type InstancesResumeCall struct { } // Resume: Resumes an instance that was suspended using the -// instances().suspend method. +// instances().suspend method. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) Resume(project string, zone string, instance string, instancesresumerequest *InstancesResumeRequest) *InstancesResumeCall { c := &InstancesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82133,6 +86932,7 @@ func (c *InstancesResumeCall) Header() http.Header { func (c *InstancesResumeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82198,7 +86998,7 @@ func (c *InstancesResumeCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Resumes an instance that was suspended using the instances().suspend method.", + // "description": "Resumes an instance that was suspended using the instances().suspend method. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.resume", // "parameterOrder": [ @@ -82261,7 +87061,8 @@ type InstancesSetDeletionProtectionCall struct { header_ http.Header } -// SetDeletionProtection: Sets deletion protection on the instance. +// SetDeletionProtection: Sets deletion protection on the instance. (== +// suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetDeletionProtection(project string, zone string, resource string) *InstancesSetDeletionProtectionCall { c := &InstancesSetDeletionProtectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82323,6 +87124,7 @@ func (c *InstancesSetDeletionProtectionCall) Header() http.Header { func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82383,7 +87185,7 @@ func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Sets deletion protection on the instance.", + // "description": "Sets deletion protection on the instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setDeletionProtection", // "parameterOrder": [ @@ -82450,7 +87252,7 @@ type InstancesSetDiskAutoDeleteCall struct { } // SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to -// an instance. +// an instance. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setDiskAutoDelete func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -82508,6 +87310,7 @@ func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82568,7 +87371,7 @@ func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Sets the auto-delete flag for a disk attached to an instance.", + // "description": "Sets the auto-delete flag for a disk attached to an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setDiskAutoDelete", // "parameterOrder": [ @@ -82645,7 +87448,8 @@ type InstancesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstancesSetIamPolicyCall { c := &InstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82682,6 +87486,7 @@ func (c *InstancesSetIamPolicyCall) Header() http.Header { func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82747,7 +87552,7 @@ func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setIamPolicy", // "parameterOrder": [ @@ -82807,7 +87612,8 @@ type InstancesSetLabelsCall struct { } // SetLabels: Sets labels on an instance. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82863,6 +87669,7 @@ func (c *InstancesSetLabelsCall) Header() http.Header { func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82928,7 +87735,7 @@ func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setLabels", // "parameterOrder": [ @@ -82993,7 +87800,8 @@ type InstancesSetMachineResourcesCall struct { } // SetMachineResources: Changes the number and/or type of accelerator -// for a stopped instance to the values specified in the request. +// for a stopped instance to the values specified in the request. (== +// suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83049,6 +87857,7 @@ func (c *InstancesSetMachineResourcesCall) Header() http.Header { func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83114,7 +87923,7 @@ func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", + // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMachineResources", // "parameterOrder": [ @@ -83179,7 +87988,8 @@ type InstancesSetMachineTypeCall struct { } // SetMachineType: Changes the machine type for a stopped instance to -// the machine type specified in the request. +// the machine type specified in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83235,6 +88045,7 @@ func (c *InstancesSetMachineTypeCall) Header() http.Header { func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83300,7 +88111,7 @@ func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", + // "description": "Changes the machine type for a stopped instance to the machine type specified in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMachineType", // "parameterOrder": [ @@ -83365,7 +88176,7 @@ type InstancesSetMetadataCall struct { } // SetMetadata: Sets metadata for the specified instance to the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setMetadata func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -83422,6 +88233,7 @@ func (c *InstancesSetMetadataCall) Header() http.Header { func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83487,7 +88299,7 @@ func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Sets metadata for the specified instance to the data included in the request.", + // "description": "Sets metadata for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMetadata", // "parameterOrder": [ @@ -83554,7 +88366,7 @@ type InstancesSetMinCpuPlatformCall struct { // SetMinCpuPlatform: Changes the minimum CPU platform that this // instance should use. This method can only be called on a stopped // instance. For more information, read Specifying a Minimum CPU -// Platform. +// Platform. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall { c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83610,6 +88422,7 @@ func (c *InstancesSetMinCpuPlatformCall) Header() http.Header { func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83675,7 +88488,7 @@ func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", + // "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMinCpuPlatform", // "parameterOrder": [ @@ -83726,6 +88539,193 @@ func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Oper } +// method id "compute.instances.setName": + +type InstancesSetNameCall struct { + s *Service + project string + zone string + instance string + instancessetnamerequest *InstancesSetNameRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetName: Sets name of an instance. (== suppress_warning +// http-rest-shadowed ==) +func (r *InstancesService) SetName(project string, zone string, instance string, instancessetnamerequest *InstancesSetNameRequest) *InstancesSetNameCall { + c := &InstancesSetNameCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + c.instancessetnamerequest = instancessetnamerequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesSetNameCall) RequestId(requestId string) *InstancesSetNameCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesSetNameCall) Fields(s ...googleapi.Field) *InstancesSetNameCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesSetNameCall) Context(ctx context.Context) *InstancesSetNameCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesSetNameCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesSetNameCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetnamerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setName") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.setName" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesSetNameCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets name of an instance. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.instances.setName", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "The instance name for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/setName", + // "request": { + // "$ref": "InstancesSetNameRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.instances.setScheduling": type InstancesSetSchedulingCall struct { @@ -83739,7 +88739,8 @@ type InstancesSetSchedulingCall struct { header_ http.Header } -// SetScheduling: Sets an instance's scheduling options. +// SetScheduling: Sets an instance's scheduling options. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setScheduling func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -83796,6 +88797,7 @@ func (c *InstancesSetSchedulingCall) Header() http.Header { func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83861,7 +88863,7 @@ func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Sets an instance's scheduling options.", + // "description": "Sets an instance's scheduling options. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setScheduling", // "parameterOrder": [ @@ -83927,7 +88929,7 @@ type InstancesSetServiceAccountCall struct { // SetServiceAccount: Sets the service account on the instance. For more // information, read Changing the service account and access scopes for -// an instance. +// an instance. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83983,6 +88985,7 @@ func (c *InstancesSetServiceAccountCall) Header() http.Header { func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84048,7 +89051,7 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", + // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setServiceAccount", // "parameterOrder": [ @@ -84115,7 +89118,8 @@ type InstancesSetShieldedInstanceIntegrityPolicyCall struct { // SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance // integrity policy for an instance. You can only use this method on a // running instance. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. +// JSON merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -84171,6 +89175,7 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84236,7 +89241,7 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.setShieldedInstanceIntegrityPolicy", // "parameterOrder": [ @@ -84303,7 +89308,8 @@ type InstancesSetShieldedVmIntegrityPolicyCall struct { // SetShieldedVmIntegrityPolicy: Sets the Shielded VM integrity policy // for a VM instance. You can only use this method on a running VM // instance. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetShieldedVmIntegrityPolicy(project string, zone string, instance string, shieldedvmintegritypolicy *ShieldedVmIntegrityPolicy) *InstancesSetShieldedVmIntegrityPolicyCall { c := &InstancesSetShieldedVmIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -84359,6 +89365,7 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) Header() http.Header { func (c *InstancesSetShieldedVmIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84424,7 +89431,7 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.setShieldedVmIntegrityPolicy", // "parameterOrder": [ @@ -84489,7 +89496,7 @@ type InstancesSetTagsCall struct { } // SetTags: Sets network tags for the specified instance to the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setTags func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -84546,6 +89553,7 @@ func (c *InstancesSetTagsCall) Header() http.Header { func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84611,7 +89619,7 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Sets network tags for the specified instance to the data included in the request.", + // "description": "Sets network tags for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setTags", // "parameterOrder": [ @@ -84675,7 +89683,7 @@ type InstancesSimulateMaintenanceEventCall struct { } // SimulateMaintenanceEvent: Simulates a maintenance event on the -// instance. +// instance. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -84711,6 +89719,7 @@ func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84771,7 +89780,7 @@ func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Simulates a maintenance event on the instance.", + // "description": "Simulates a maintenance event on the instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.simulateMaintenanceEvent", // "parameterOrder": [ @@ -84827,7 +89836,8 @@ type InstancesStartCall struct { } // Start: Starts an instance that was stopped using the instances().stop -// method. For more information, see Restart an instance. +// method. For more information, see Restart an instance. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/start func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -84883,6 +89893,7 @@ func (c *InstancesStartCall) Header() http.Header { func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84943,7 +89954,7 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.start", // "parameterOrder": [ @@ -85006,7 +90017,7 @@ type InstancesStartWithEncryptionKeyCall struct { // StartWithEncryptionKey: Starts an instance that was stopped using the // instances().stop method. For more information, see Restart an -// instance. +// instance. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85062,6 +90073,7 @@ func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85127,7 +90139,7 @@ func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.startWithEncryptionKey", // "parameterOrder": [ @@ -85195,7 +90207,8 @@ type InstancesStopCall struct { // incur VM usage charges while they are stopped. However, resources // that the VM is using, such as persistent disks and static IP // addresses, will continue to be charged until they are deleted. For -// more information, see Stopping an instance. +// more information, see Stopping an instance. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/stop func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -85259,6 +90272,7 @@ func (c *InstancesStopCall) Header() http.Header { func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85319,7 +90333,7 @@ func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", + // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.stop", // "parameterOrder": [ @@ -85389,7 +90403,8 @@ type InstancesSuspendCall struct { // time. Suspended instances incur reduced per-minute, virtual machine // usage charges while they are suspended. Any resources the virtual // machine is using, such as persistent disks and static IP addresses, -// will continue to be charged until they are deleted. +// will continue to be charged until they are deleted. (== +// suppress_warning http-rest-shadowed ==) func (r *InstancesService) Suspend(project string, zone string, instance string) *InstancesSuspendCall { c := &InstancesSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85452,6 +90467,7 @@ func (c *InstancesSuspendCall) Header() http.Header { func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85512,7 +90528,7 @@ func (c *InstancesSuspendCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.", + // "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.suspend", // "parameterOrder": [ @@ -85579,7 +90595,7 @@ type InstancesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall { c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85616,6 +90632,7 @@ func (c *InstancesTestIamPermissionsCall) Header() http.Header { func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85681,7 +90698,7 @@ func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.testIamPermissions", // "parameterOrder": [ @@ -85744,7 +90761,8 @@ type InstancesUpdateAccessConfigCall struct { // UpdateAccessConfig: Updates the specified access config from an // instance's network interface with the data included in the request. // This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. +// format and processing rules. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) UpdateAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesUpdateAccessConfigCall { c := &InstancesUpdateAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85801,6 +90819,7 @@ func (c *InstancesUpdateAccessConfigCall) Header() http.Header { func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85866,7 +90885,7 @@ func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.updateAccessConfig", // "parameterOrder": [ @@ -85940,7 +90959,7 @@ type InstancesUpdateDisplayDeviceCall struct { // UpdateDisplayDevice: Updates the Display config for a VM instance. // You can only use this method on a stopped VM instance. This method // supports PATCH semantics and uses the JSON merge patch format and -// processing rules. +// processing rules. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) UpdateDisplayDevice(project string, zone string, instance string, displaydevice *DisplayDevice) *InstancesUpdateDisplayDeviceCall { c := &InstancesUpdateDisplayDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85996,6 +91015,7 @@ func (c *InstancesUpdateDisplayDeviceCall) Header() http.Header { func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86061,7 +91081,7 @@ func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.updateDisplayDevice", // "parameterOrder": [ @@ -86126,7 +91146,8 @@ type InstancesUpdateNetworkInterfaceCall struct { } // UpdateNetworkInterface: Updates an instance's network interface. This -// method follows PATCH semantics. +// method follows PATCH semantics. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall { c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -86183,6 +91204,7 @@ func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header { func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86248,7 +91270,7 @@ func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates an instance's network interface. This method follows PATCH semantics.", + // "description": "Updates an instance's network interface. This method follows PATCH semantics. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.updateNetworkInterface", // "parameterOrder": [ @@ -86322,7 +91344,8 @@ type InstancesUpdateShieldedInstanceConfigCall struct { // UpdateShieldedInstanceConfig: Updates the Shielded Instance config // for an instance. You can only use this method on a stopped instance. // This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. +// format and processing rules. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone string, instance string, shieldedinstanceconfig *ShieldedInstanceConfig) *InstancesUpdateShieldedInstanceConfigCall { c := &InstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -86378,6 +91401,7 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) Header() http.Header { func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86443,7 +91467,7 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.updateShieldedInstanceConfig", // "parameterOrder": [ @@ -86510,7 +91534,7 @@ type InstancesUpdateShieldedVmConfigCall struct { // UpdateShieldedVmConfig: Updates the Shielded VM config for a VM // instance. You can only use this method on a stopped VM instance. This // method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. +// and processing rules. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) UpdateShieldedVmConfig(project string, zone string, instance string, shieldedvmconfig *ShieldedVmConfig) *InstancesUpdateShieldedVmConfigCall { c := &InstancesUpdateShieldedVmConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -86566,6 +91590,7 @@ func (c *InstancesUpdateShieldedVmConfigCall) Header() http.Header { func (c *InstancesUpdateShieldedVmConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86631,7 +91656,7 @@ func (c *InstancesUpdateShieldedVmConfigCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.updateShieldedVmConfig", // "parameterOrder": [ @@ -86694,7 +91719,7 @@ type InterconnectAttachmentsAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of interconnect -// attachments. +// attachments. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) AggregatedList(project string) *InterconnectAttachmentsAggregatedListCall { c := &InterconnectAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -86801,6 +91826,7 @@ func (c *InterconnectAttachmentsAggregatedListCall) Header() http.Header { func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86863,7 +91889,7 @@ func (c *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Retrieves an aggregated list of interconnect attachments.", + // "description": "Retrieves an aggregated list of interconnect attachments. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectAttachments.aggregatedList", // "parameterOrder": [ @@ -86947,7 +91973,8 @@ type InterconnectAttachmentsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified interconnect attachment. +// Delete: Deletes the specified interconnect attachment. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Delete(project string, region string, interconnectAttachment string) *InterconnectAttachmentsDeleteCall { c := &InterconnectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87002,6 +92029,7 @@ func (c *InterconnectAttachmentsDeleteCall) Header() http.Header { func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87062,7 +92090,7 @@ func (c *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Deletes the specified interconnect attachment.", + // "description": "Deletes the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.interconnectAttachments.delete", // "parameterOrder": [ @@ -87123,7 +92151,8 @@ type InterconnectAttachmentsGetCall struct { header_ http.Header } -// Get: Returns the specified interconnect attachment. +// Get: Returns the specified interconnect attachment. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Get(project string, region string, interconnectAttachment string) *InterconnectAttachmentsGetCall { c := &InterconnectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87169,6 +92198,7 @@ func (c *InterconnectAttachmentsGetCall) Header() http.Header { func (c *InterconnectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87232,7 +92262,7 @@ func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Inte } return ret, nil // { - // "description": "Returns the specified interconnect attachment.", + // "description": "Returns the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectAttachments.get", // "parameterOrder": [ @@ -87290,7 +92320,8 @@ type InterconnectAttachmentsGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectAttachmentsService) GetIamPolicy(project string, region string, resource string) *InterconnectAttachmentsGetIamPolicyCall { c := &InterconnectAttachmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87299,6 +92330,13 @@ func (r *InterconnectAttachmentsService) GetIamPolicy(project string, region str return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InterconnectAttachmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InterconnectAttachmentsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -87336,6 +92374,7 @@ func (c *InterconnectAttachmentsGetIamPolicyCall) Header() http.Header { func (c *InterconnectAttachmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87399,7 +92438,7 @@ func (c *InterconnectAttachmentsGetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectAttachments.getIamPolicy", // "parameterOrder": [ @@ -87408,6 +92447,12 @@ func (c *InterconnectAttachmentsGetIamPolicyCall) Do(opts ...googleapi.CallOptio // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -87456,7 +92501,8 @@ type InterconnectAttachmentsInsertCall struct { } // Insert: Creates an InterconnectAttachment in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Insert(project string, region string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsInsertCall { c := &InterconnectAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87518,6 +92564,7 @@ func (c *InterconnectAttachmentsInsertCall) Header() http.Header { func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87582,7 +92629,7 @@ func (c *InterconnectAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", + // "description": "Creates an InterconnectAttachment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnectAttachments.insert", // "parameterOrder": [ @@ -87643,7 +92690,7 @@ type InterconnectAttachmentsListCall struct { } // List: Retrieves the list of interconnect attachments contained within -// the specified region. +// the specified region. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) List(project string, region string) *InterconnectAttachmentsListCall { c := &InterconnectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87751,6 +92798,7 @@ func (c *InterconnectAttachmentsListCall) Header() http.Header { func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87813,7 +92861,7 @@ func (c *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*Int } return ret, nil // { - // "description": "Retrieves the list of interconnect attachments contained within the specified region.", + // "description": "Retrieves the list of interconnect attachments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectAttachments.list", // "parameterOrder": [ @@ -87908,7 +92956,8 @@ type InterconnectAttachmentsPatchCall struct { // Patch: Updates the specified interconnect attachment with the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Patch(project string, region string, interconnectAttachment string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsPatchCall { c := &InterconnectAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87964,6 +93013,7 @@ func (c *InterconnectAttachmentsPatchCall) Header() http.Header { func (c *InterconnectAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88029,7 +93079,7 @@ func (c *InterconnectAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.interconnectAttachments.patch", // "parameterOrder": [ @@ -88094,7 +93144,8 @@ type InterconnectAttachmentsSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectAttachmentsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *InterconnectAttachmentsSetIamPolicyCall { c := &InterconnectAttachmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88131,6 +93182,7 @@ func (c *InterconnectAttachmentsSetIamPolicyCall) Header() http.Header { func (c *InterconnectAttachmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88196,7 +93248,7 @@ func (c *InterconnectAttachmentsSetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnectAttachments.setIamPolicy", // "parameterOrder": [ @@ -88256,7 +93308,8 @@ type InterconnectAttachmentsSetLabelsCall struct { } // SetLabels: Sets the labels on an InterconnectAttachment. To learn -// more about labels, read the Labeling Resources documentation. +// more about labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *InterconnectAttachmentsSetLabelsCall { c := &InterconnectAttachmentsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88312,6 +93365,7 @@ func (c *InterconnectAttachmentsSetLabelsCall) Header() http.Header { func (c *InterconnectAttachmentsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88377,7 +93431,7 @@ func (c *InterconnectAttachmentsSetLabelsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnectAttachments.setLabels", // "parameterOrder": [ @@ -88442,7 +93496,7 @@ type InterconnectAttachmentsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectAttachmentsTestIamPermissionsCall { c := &InterconnectAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88479,6 +93533,7 @@ func (c *InterconnectAttachmentsTestIamPermissionsCall) Header() http.Header { func (c *InterconnectAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88544,7 +93599,7 @@ func (c *InterconnectAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnectAttachments.testIamPermissions", // "parameterOrder": [ @@ -88605,7 +93660,7 @@ type InterconnectLocationsGetCall struct { // Get: Returns the details for the specified interconnect location. // Gets a list of available interconnect locations by making a list() -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectLocationsService) Get(project string, interconnectLocation string) *InterconnectLocationsGetCall { c := &InterconnectLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88650,6 +93705,7 @@ func (c *InterconnectLocationsGetCall) Header() http.Header { func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88712,7 +93768,7 @@ func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*Interc } return ret, nil // { - // "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.", + // "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectLocations.get", // "parameterOrder": [ @@ -88760,7 +93816,7 @@ type InterconnectLocationsListCall struct { } // List: Retrieves the list of interconnect locations available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectLocationsService) List(project string) *InterconnectLocationsListCall { c := &InterconnectLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88867,6 +93923,7 @@ func (c *InterconnectLocationsListCall) Header() http.Header { func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88928,7 +93985,7 @@ func (c *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*Inter } return ret, nil // { - // "description": "Retrieves the list of interconnect locations available to the specified project.", + // "description": "Retrieves the list of interconnect locations available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectLocations.list", // "parameterOrder": [ @@ -89013,7 +94070,7 @@ type InterconnectLocationsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectLocationsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectLocationsTestIamPermissionsCall { c := &InterconnectLocationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89049,6 +94106,7 @@ func (c *InterconnectLocationsTestIamPermissionsCall) Header() http.Header { func (c *InterconnectLocationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89113,7 +94171,7 @@ func (c *InterconnectLocationsTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnectLocations.testIamPermissions", // "parameterOrder": [ @@ -89163,7 +94221,8 @@ type InterconnectsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified interconnect. +// Delete: Deletes the specified interconnect. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectsService) Delete(project string, interconnect string) *InterconnectsDeleteCall { c := &InterconnectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89217,6 +94276,7 @@ func (c *InterconnectsDeleteCall) Header() http.Header { func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89276,7 +94336,7 @@ func (c *InterconnectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified interconnect.", + // "description": "Deletes the specified interconnect. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.interconnects.delete", // "parameterOrder": [ @@ -89329,7 +94389,8 @@ type InterconnectsGetCall struct { } // Get: Returns the specified interconnect. Get a list of available -// interconnects by making a list() request. +// interconnects by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectsService) Get(project string, interconnect string) *InterconnectsGetCall { c := &InterconnectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89374,6 +94435,7 @@ func (c *InterconnectsGetCall) Header() http.Header { func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89436,7 +94498,7 @@ func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, } return ret, nil // { - // "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.", + // "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnects.get", // "parameterOrder": [ @@ -89485,7 +94547,7 @@ type InterconnectsGetDiagnosticsCall struct { } // GetDiagnostics: Returns the interconnectDiagnostics for the specified -// interconnect. +// interconnect. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectsService) GetDiagnostics(project string, interconnect string) *InterconnectsGetDiagnosticsCall { c := &InterconnectsGetDiagnosticsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89530,6 +94592,7 @@ func (c *InterconnectsGetDiagnosticsCall) Header() http.Header { func (c *InterconnectsGetDiagnosticsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89593,7 +94656,7 @@ func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*Int } return ret, nil // { - // "description": "Returns the interconnectDiagnostics for the specified interconnect.", + // "description": "Returns the interconnectDiagnostics for the specified interconnect. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnects.getDiagnostics", // "parameterOrder": [ @@ -89642,7 +94705,8 @@ type InterconnectsGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectsService) GetIamPolicy(project string, resource string) *InterconnectsGetIamPolicyCall { c := &InterconnectsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89650,6 +94714,13 @@ func (r *InterconnectsService) GetIamPolicy(project string, resource string) *In return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InterconnectsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InterconnectsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -89687,6 +94758,7 @@ func (c *InterconnectsGetIamPolicyCall) Header() http.Header { func (c *InterconnectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89749,7 +94821,7 @@ func (c *InterconnectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnects.getIamPolicy", // "parameterOrder": [ @@ -89757,6 +94829,12 @@ func (c *InterconnectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -89797,7 +94875,8 @@ type InterconnectsInsertCall struct { } // Insert: Creates a Interconnect in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) func (r *InterconnectsService) Insert(project string, interconnect *Interconnect) *InterconnectsInsertCall { c := &InterconnectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89851,6 +94930,7 @@ func (c *InterconnectsInsertCall) Header() http.Header { func (c *InterconnectsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89914,7 +94994,7 @@ func (c *InterconnectsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a Interconnect in the specified project using the data included in the request.", + // "description": "Creates a Interconnect in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnects.insert", // "parameterOrder": [ @@ -89961,7 +95041,7 @@ type InterconnectsListCall struct { } // List: Retrieves the list of interconnect available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectsService) List(project string) *InterconnectsListCall { c := &InterconnectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90068,6 +95148,7 @@ func (c *InterconnectsListCall) Header() http.Header { func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90129,7 +95210,7 @@ func (c *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectL } return ret, nil // { - // "description": "Retrieves the list of interconnect available to the specified project.", + // "description": "Retrieves the list of interconnect available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnects.list", // "parameterOrder": [ @@ -90215,7 +95296,8 @@ type InterconnectsPatchCall struct { // Patch: Updates the specified interconnect with the data included in // the request. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectsService) Patch(project string, interconnect string, interconnect2 *Interconnect) *InterconnectsPatchCall { c := &InterconnectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90270,6 +95352,7 @@ func (c *InterconnectsPatchCall) Header() http.Header { func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90334,7 +95417,7 @@ func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.interconnects.patch", // "parameterOrder": [ @@ -90390,7 +95473,8 @@ type InterconnectsSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InterconnectsSetIamPolicyCall { c := &InterconnectsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90426,6 +95510,7 @@ func (c *InterconnectsSetIamPolicyCall) Header() http.Header { func (c *InterconnectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90490,7 +95575,7 @@ func (c *InterconnectsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnects.setIamPolicy", // "parameterOrder": [ @@ -90541,7 +95626,8 @@ type InterconnectsSetLabelsCall struct { } // SetLabels: Sets the labels on an Interconnect. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *InterconnectsSetLabelsCall { c := &InterconnectsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90577,6 +95663,7 @@ func (c *InterconnectsSetLabelsCall) Header() http.Header { func (c *InterconnectsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90641,7 +95728,7 @@ func (c *InterconnectsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnects.setLabels", // "parameterOrder": [ @@ -90692,7 +95779,7 @@ type InterconnectsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectsTestIamPermissionsCall { c := &InterconnectsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90728,6 +95815,7 @@ func (c *InterconnectsTestIamPermissionsCall) Header() http.Header { func (c *InterconnectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90792,7 +95880,7 @@ func (c *InterconnectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnects.testIamPermissions", // "parameterOrder": [ @@ -90845,6 +95933,7 @@ type LicenseCodesGetCall struct { // Get: Return a specified license code. License codes are mirrored // across all projects that have permissions to read the License Code. +// (== suppress_warning http-rest-shadowed ==) func (r *LicenseCodesService) Get(project string, licenseCode string) *LicenseCodesGetCall { c := &LicenseCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90889,6 +95978,7 @@ func (c *LicenseCodesGetCall) Header() http.Header { func (c *LicenseCodesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90951,7 +96041,7 @@ func (c *LicenseCodesGetCall) Do(opts ...googleapi.CallOption) (*LicenseCode, er } return ret, nil // { - // "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code.", + // "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenseCodes.get", // "parameterOrder": [ @@ -91000,7 +96090,8 @@ type LicenseCodesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *LicenseCodesService) GetIamPolicy(project string, resource string) *LicenseCodesGetIamPolicyCall { c := &LicenseCodesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91008,6 +96099,13 @@ func (r *LicenseCodesService) GetIamPolicy(project string, resource string) *Lic return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *LicenseCodesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *LicenseCodesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -91045,6 +96143,7 @@ func (c *LicenseCodesGetIamPolicyCall) Header() http.Header { func (c *LicenseCodesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91107,7 +96206,7 @@ func (c *LicenseCodesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenseCodes.getIamPolicy", // "parameterOrder": [ @@ -91115,6 +96214,12 @@ func (c *LicenseCodesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -91156,7 +96261,8 @@ type LicenseCodesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *LicenseCodesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *LicenseCodesSetIamPolicyCall { c := &LicenseCodesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91192,6 +96298,7 @@ func (c *LicenseCodesSetIamPolicyCall) Header() http.Header { func (c *LicenseCodesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91256,7 +96363,7 @@ func (c *LicenseCodesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.licenseCodes.setIamPolicy", // "parameterOrder": [ @@ -91307,7 +96414,7 @@ type LicenseCodesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *LicenseCodesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicenseCodesTestIamPermissionsCall { c := &LicenseCodesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91343,6 +96450,7 @@ func (c *LicenseCodesTestIamPermissionsCall) Header() http.Header { func (c *LicenseCodesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91407,7 +96515,7 @@ func (c *LicenseCodesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.licenseCodes.testIamPermissions", // "parameterOrder": [ @@ -91457,7 +96565,8 @@ type LicensesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified license. +// Delete: Deletes the specified license. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) Delete(project string, license string) *LicensesDeleteCall { c := &LicensesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91511,6 +96620,7 @@ func (c *LicensesDeleteCall) Header() http.Header { func (c *LicensesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91570,7 +96680,7 @@ func (c *LicensesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Deletes the specified license.", + // "description": "Deletes the specified license. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.licenses.delete", // "parameterOrder": [ @@ -91622,7 +96732,8 @@ type LicensesGetCall struct { header_ http.Header } -// Get: Returns the specified License resource. +// Get: Returns the specified License resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/licenses/get func (r *LicensesService) Get(project string, license string) *LicensesGetCall { c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -91668,6 +96779,7 @@ func (c *LicensesGetCall) Header() http.Header { func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91730,7 +96842,7 @@ func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) { } return ret, nil // { - // "description": "Returns the specified License resource.", + // "description": "Returns the specified License resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenses.get", // "parameterOrder": [ @@ -91779,7 +96891,8 @@ type LicensesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) GetIamPolicy(project string, resource string) *LicensesGetIamPolicyCall { c := &LicensesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91787,6 +96900,13 @@ func (r *LicensesService) GetIamPolicy(project string, resource string) *License return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *LicensesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *LicensesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -91824,6 +96944,7 @@ func (c *LicensesGetIamPolicyCall) Header() http.Header { func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91886,7 +97007,7 @@ func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenses.getIamPolicy", // "parameterOrder": [ @@ -91894,6 +97015,12 @@ func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -91933,7 +97060,8 @@ type LicensesInsertCall struct { header_ http.Header } -// Insert: Create a License resource in the specified project. +// Insert: Create a License resource in the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *LicensesService) Insert(project string, license *License) *LicensesInsertCall { c := &LicensesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91987,6 +97115,7 @@ func (c *LicensesInsertCall) Header() http.Header { func (c *LicensesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92050,7 +97179,7 @@ func (c *LicensesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Create a License resource in the specified project.", + // "description": "Create a License resource in the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.licenses.insert", // "parameterOrder": [ @@ -92104,7 +97233,8 @@ type LicensesListCall struct { // projects, including licenses attached to publicly-available images, // like Debian 9. If you want to get a list of publicly-available // licenses, use this method to make a request to the respective image -// project, such as debian-cloud or windows-cloud. +// project, such as debian-cloud or windows-cloud. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) List(project string) *LicensesListCall { c := &LicensesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92211,6 +97341,7 @@ func (c *LicensesListCall) Header() http.Header { func (c *LicensesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92272,7 +97403,7 @@ func (c *LicensesListCall) Do(opts ...googleapi.CallOption) (*LicensesListRespon } return ret, nil // { - // "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + // "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenses.list", // "parameterOrder": [ @@ -92357,7 +97488,8 @@ type LicensesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *LicensesSetIamPolicyCall { c := &LicensesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92393,6 +97525,7 @@ func (c *LicensesSetIamPolicyCall) Header() http.Header { func (c *LicensesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92457,7 +97590,7 @@ func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.licenses.setIamPolicy", // "parameterOrder": [ @@ -92508,7 +97641,7 @@ type LicensesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *LicensesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicensesTestIamPermissionsCall { c := &LicensesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92544,6 +97677,7 @@ func (c *LicensesTestIamPermissionsCall) Header() http.Header { func (c *LicensesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92608,7 +97742,7 @@ func (c *LicensesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.licenses.testIamPermissions", // "parameterOrder": [ @@ -92659,7 +97793,8 @@ type MachineImagesDeleteCall struct { } // Delete: Deletes the specified machine image. Deleting a machine image -// is permanent and cannot be undone. +// is permanent and cannot be undone. (== suppress_warning +// http-rest-shadowed ==) func (r *MachineImagesService) Delete(project string, machineImage string) *MachineImagesDeleteCall { c := &MachineImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92713,6 +97848,7 @@ func (c *MachineImagesDeleteCall) Header() http.Header { func (c *MachineImagesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92772,7 +97908,7 @@ func (c *MachineImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone.", + // "description": "Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.machineImages.delete", // "parameterOrder": [ @@ -92825,7 +97961,8 @@ type MachineImagesGetCall struct { } // Get: Returns the specified machine image. Gets a list of available -// machine images by making a list() request. +// machine images by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *MachineImagesService) Get(project string, machineImage string) *MachineImagesGetCall { c := &MachineImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92870,6 +98007,7 @@ func (c *MachineImagesGetCall) Header() http.Header { func (c *MachineImagesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92932,7 +98070,7 @@ func (c *MachineImagesGetCall) Do(opts ...googleapi.CallOption) (*MachineImage, } return ret, nil // { - // "description": "Returns the specified machine image. Gets a list of available machine images by making a list() request.", + // "description": "Returns the specified machine image. Gets a list of available machine images by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineImages.get", // "parameterOrder": [ @@ -92981,7 +98119,8 @@ type MachineImagesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *MachineImagesService) GetIamPolicy(project string, resource string) *MachineImagesGetIamPolicyCall { c := &MachineImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92989,6 +98128,13 @@ func (r *MachineImagesService) GetIamPolicy(project string, resource string) *Ma return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *MachineImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *MachineImagesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -93026,6 +98172,7 @@ func (c *MachineImagesGetIamPolicyCall) Header() http.Header { func (c *MachineImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93088,7 +98235,7 @@ func (c *MachineImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineImages.getIamPolicy", // "parameterOrder": [ @@ -93096,6 +98243,12 @@ func (c *MachineImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -93139,7 +98292,7 @@ type MachineImagesInsertCall struct { // data that is included in the request. If you are creating a new // machine image to update an existing instance, your new machine image // should use the same network or, if applicable, the same subnetwork as -// the original instance. +// the original instance. (== suppress_warning http-rest-shadowed ==) func (r *MachineImagesService) Insert(project string, machineimage *MachineImage) *MachineImagesInsertCall { c := &MachineImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93201,6 +98354,7 @@ func (c *MachineImagesInsertCall) Header() http.Header { func (c *MachineImagesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93264,7 +98418,7 @@ func (c *MachineImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance.", + // "description": "Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.machineImages.insert", // "parameterOrder": [ @@ -93316,7 +98470,7 @@ type MachineImagesListCall struct { } // List: Retrieves a list of machine images that are contained within -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) func (r *MachineImagesService) List(project string) *MachineImagesListCall { c := &MachineImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93423,6 +98577,7 @@ func (c *MachineImagesListCall) Header() http.Header { func (c *MachineImagesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93484,7 +98639,7 @@ func (c *MachineImagesListCall) Do(opts ...googleapi.CallOption) (*MachineImageL } return ret, nil // { - // "description": "Retrieves a list of machine images that are contained within the specified project.", + // "description": "Retrieves a list of machine images that are contained within the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineImages.list", // "parameterOrder": [ @@ -93569,7 +98724,8 @@ type MachineImagesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *MachineImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *MachineImagesSetIamPolicyCall { c := &MachineImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93605,6 +98761,7 @@ func (c *MachineImagesSetIamPolicyCall) Header() http.Header { func (c *MachineImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93669,7 +98826,7 @@ func (c *MachineImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.machineImages.setIamPolicy", // "parameterOrder": [ @@ -93720,7 +98877,7 @@ type MachineImagesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *MachineImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *MachineImagesTestIamPermissionsCall { c := &MachineImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93756,6 +98913,7 @@ func (c *MachineImagesTestIamPermissionsCall) Header() http.Header { func (c *MachineImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93820,7 +98978,7 @@ func (c *MachineImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.machineImages.testIamPermissions", // "parameterOrder": [ @@ -93870,7 +99028,8 @@ type MachineTypesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of machine types. +// AggregatedList: Retrieves an aggregated list of machine types. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/aggregatedList func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -93978,6 +99137,7 @@ func (c *MachineTypesAggregatedListCall) Header() http.Header { func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94039,7 +99199,7 @@ func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Mach } return ret, nil // { - // "description": "Retrieves an aggregated list of machine types.", + // "description": "Retrieves an aggregated list of machine types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineTypes.aggregatedList", // "parameterOrder": [ @@ -94125,7 +99285,8 @@ type MachineTypesGetCall struct { } // Get: Returns the specified machine type. Gets a list of available -// machine types by making a list() request. +// machine types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/get func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -94172,6 +99333,7 @@ func (c *MachineTypesGetCall) Header() http.Header { func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94235,7 +99397,7 @@ func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, er } return ret, nil // { - // "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request.", + // "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineTypes.get", // "parameterOrder": [ @@ -94292,7 +99454,7 @@ type MachineTypesListCall struct { } // List: Retrieves a list of machine types available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/list func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -94401,6 +99563,7 @@ func (c *MachineTypesListCall) Header() http.Header { func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94463,7 +99626,7 @@ func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeLis } return ret, nil // { - // "description": "Retrieves a list of machine types available to the specified project.", + // "description": "Retrieves a list of machine types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineTypes.list", // "parameterOrder": [ @@ -94555,7 +99718,7 @@ type NetworkEndpointGroupsAggregatedListCall struct { } // AggregatedList: Retrieves the list of network endpoint groups and -// sorts them by zone. +// sorts them by zone. (== suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94662,6 +99825,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94724,7 +99888,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Retrieves the list of network endpoint groups and sorts them by zone.", + // "description": "Retrieves the list of network endpoint groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networkEndpointGroups.aggregatedList", // "parameterOrder": [ @@ -94810,7 +99974,8 @@ type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { } // AttachNetworkEndpoints: Attach a list of network endpoints to the -// specified network endpoint group. +// specified network endpoint group. (== suppress_warning +// http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94866,6 +100031,7 @@ func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94931,7 +100097,7 @@ func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Attach a list of network endpoints to the specified network endpoint group.", + // "description": "Attach a list of network endpoints to the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.attachNetworkEndpoints", // "parameterOrder": [ @@ -94995,7 +100161,8 @@ type NetworkEndpointGroupsDeleteCall struct { // Delete: Deletes the specified network endpoint group. The network // endpoints in the NEG and the VM instances they belong to are not // terminated when the NEG is deleted. Note that the NEG cannot be -// deleted if there are backend services referencing it. +// deleted if there are backend services referencing it. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95050,6 +100217,7 @@ func (c *NetworkEndpointGroupsDeleteCall) Header() http.Header { func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95110,7 +100278,7 @@ func (c *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.", + // "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.networkEndpointGroups.delete", // "parameterOrder": [ @@ -95170,7 +100338,8 @@ type NetworkEndpointGroupsDetachNetworkEndpointsCall struct { } // DetachNetworkEndpoints: Detach a list of network endpoints from the -// specified network endpoint group. +// specified network endpoint group. (== suppress_warning +// http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) DetachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest) *NetworkEndpointGroupsDetachNetworkEndpointsCall { c := &NetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95226,6 +100395,7 @@ func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95291,7 +100461,7 @@ func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Detach a list of network endpoints from the specified network endpoint group.", + // "description": "Detach a list of network endpoints from the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.detachNetworkEndpoints", // "parameterOrder": [ @@ -95354,7 +100524,8 @@ type NetworkEndpointGroupsGetCall struct { } // Get: Returns the specified network endpoint group. Gets a list of -// available network endpoint groups by making a list() request. +// available network endpoint groups by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) Get(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsGetCall { c := &NetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95400,6 +100571,7 @@ func (c *NetworkEndpointGroupsGetCall) Header() http.Header { func (c *NetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95463,7 +100635,7 @@ func (c *NetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*Networ } return ret, nil // { - // "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.", + // "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networkEndpointGroups.get", // "parameterOrder": [ @@ -95518,7 +100690,8 @@ type NetworkEndpointGroupsInsertCall struct { } // Insert: Creates a network endpoint group in the specified project -// using the parameters that are included in the request. +// using the parameters that are included in the request. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) Insert(project string, zone string, networkendpointgroup *NetworkEndpointGroup) *NetworkEndpointGroupsInsertCall { c := &NetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95573,6 +100746,7 @@ func (c *NetworkEndpointGroupsInsertCall) Header() http.Header { func (c *NetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95637,7 +100811,7 @@ func (c *NetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.insert", // "parameterOrder": [ @@ -95692,7 +100866,8 @@ type NetworkEndpointGroupsListCall struct { } // List: Retrieves the list of network endpoint groups that are located -// in the specified project and zone. +// in the specified project and zone. (== suppress_warning +// http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) List(project string, zone string) *NetworkEndpointGroupsListCall { c := &NetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95800,6 +100975,7 @@ func (c *NetworkEndpointGroupsListCall) Header() http.Header { func (c *NetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95862,7 +101038,7 @@ func (c *NetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*Netwo } return ret, nil // { - // "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone.", + // "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networkEndpointGroups.list", // "parameterOrder": [ @@ -95955,7 +101131,7 @@ type NetworkEndpointGroupsListNetworkEndpointsCall struct { } // ListNetworkEndpoints: Lists the network endpoints in the specified -// network endpoint group. +// network endpoint group. (== suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) ListNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest) *NetworkEndpointGroupsListNetworkEndpointsCall { c := &NetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96055,6 +101231,7 @@ func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { func (c *NetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96122,7 +101299,7 @@ func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists the network endpoints in the specified network endpoint group.", + // "description": "Lists the network endpoints in the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.listNetworkEndpoints", // "parameterOrder": [ @@ -96225,7 +101402,7 @@ type NetworkEndpointGroupsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkEndpointGroupsTestIamPermissionsCall { c := &NetworkEndpointGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96262,6 +101439,7 @@ func (c *NetworkEndpointGroupsTestIamPermissionsCall) Header() http.Header { func (c *NetworkEndpointGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96327,7 +101505,7 @@ func (c *NetworkEndpointGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.testIamPermissions", // "parameterOrder": [ @@ -96386,7 +101564,8 @@ type NetworksAddPeeringCall struct { header_ http.Header } -// AddPeering: Adds a peering to the specified network. +// AddPeering: Adds a peering to the specified network. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96441,6 +101620,7 @@ func (c *NetworksAddPeeringCall) Header() http.Header { func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96505,7 +101685,7 @@ func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Adds a peering to the specified network.", + // "description": "Adds a peering to the specified network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.addPeering", // "parameterOrder": [ @@ -96559,7 +101739,8 @@ type NetworksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified network. +// Delete: Deletes the specified network. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/delete func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -96614,6 +101795,7 @@ func (c *NetworksDeleteCall) Header() http.Header { func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96673,7 +101855,7 @@ func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Deletes the specified network.", + // "description": "Deletes the specified network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.networks.delete", // "parameterOrder": [ @@ -96726,7 +101908,8 @@ type NetworksGetCall struct { } // Get: Returns the specified network. Gets a list of available networks -// by making a list() request. +// by making a list() request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/get func (r *NetworksService) Get(project string, network string) *NetworksGetCall { c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -96772,6 +101955,7 @@ func (c *NetworksGetCall) Header() http.Header { func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96834,7 +102018,7 @@ func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { } return ret, nil // { - // "description": "Returns the specified network. Gets a list of available networks by making a list() request.", + // "description": "Returns the specified network. Gets a list of available networks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networks.get", // "parameterOrder": [ @@ -96883,7 +102067,7 @@ type NetworksGetEffectiveFirewallsCall struct { } // GetEffectiveFirewalls: Returns the effective firewalls on a given -// network. +// network. (== suppress_warning http-rest-shadowed ==) func (r *NetworksService) GetEffectiveFirewalls(project string, network string) *NetworksGetEffectiveFirewallsCall { c := &NetworksGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96928,6 +102112,7 @@ func (c *NetworksGetEffectiveFirewallsCall) Header() http.Header { func (c *NetworksGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96991,7 +102176,7 @@ func (c *NetworksGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*N } return ret, nil // { - // "description": "Returns the effective firewalls on a given network.", + // "description": "Returns the effective firewalls on a given network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networks.getEffectiveFirewalls", // "parameterOrder": [ @@ -97039,7 +102224,7 @@ type NetworksInsertCall struct { } // Insert: Creates a network in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/insert func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -97094,6 +102279,7 @@ func (c *NetworksInsertCall) Header() http.Header { func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97157,7 +102343,7 @@ func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Creates a network in the specified project using the data included in the request.", + // "description": "Creates a network in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.insert", // "parameterOrder": [ @@ -97204,7 +102390,7 @@ type NetworksListCall struct { } // List: Retrieves the list of networks available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/list func (r *NetworksService) List(project string) *NetworksListCall { c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -97312,6 +102498,7 @@ func (c *NetworksListCall) Header() http.Header { func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97373,7 +102560,7 @@ func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error } return ret, nil // { - // "description": "Retrieves the list of networks available to the specified project.", + // "description": "Retrieves the list of networks available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networks.list", // "parameterOrder": [ @@ -97458,7 +102645,7 @@ type NetworksListIpAddressesCall struct { } // ListIpAddresses: Lists the internal IP addresses in the specified -// network. +// network. (== suppress_warning http-rest-shadowed ==) func (r *NetworksService) ListIpAddresses(project string, network string) *NetworksListIpAddressesCall { c := &NetworksListIpAddressesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -97574,6 +102761,7 @@ func (c *NetworksListIpAddressesCall) Header() http.Header { func (c *NetworksListIpAddressesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97636,7 +102824,7 @@ func (c *NetworksListIpAddressesCall) Do(opts ...googleapi.CallOption) (*IpAddre } return ret, nil // { - // "description": "Lists the internal IP addresses in the specified network.", + // "description": "Lists the internal IP addresses in the specified network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networks.listIpAddresses", // "parameterOrder": [ @@ -97734,6 +102922,7 @@ type NetworksListIpOwnersCall struct { } // ListIpOwners: Lists the internal IP owners in the specified network. +// (== suppress_warning http-rest-shadowed ==) func (r *NetworksService) ListIpOwners(project string, network string) *NetworksListIpOwnersCall { c := &NetworksListIpOwnersCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -97876,6 +103065,7 @@ func (c *NetworksListIpOwnersCall) Header() http.Header { func (c *NetworksListIpOwnersCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97938,7 +103128,7 @@ func (c *NetworksListIpOwnersCall) Do(opts ...googleapi.CallOption) (*IpOwnerLis } return ret, nil // { - // "description": "Lists the internal IP owners in the specified network.", + // "description": "Lists the internal IP owners in the specified network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networks.listIpOwners", // "parameterOrder": [ @@ -98058,7 +103248,7 @@ type NetworksListPeeringRoutesCall struct { } // ListPeeringRoutes: Lists the peering routes exchanged over peering -// connection. +// connection. (== suppress_warning http-rest-shadowed ==) func (r *NetworksService) ListPeeringRoutes(project string, network string) *NetworksListPeeringRoutesCall { c := &NetworksListPeeringRoutesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98192,6 +103382,7 @@ func (c *NetworksListPeeringRoutesCall) Header() http.Header { func (c *NetworksListPeeringRoutesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98254,7 +103445,7 @@ func (c *NetworksListPeeringRoutesCall) Do(opts ...googleapi.CallOption) (*Excha } return ret, nil // { - // "description": "Lists the peering routes exchanged over peering connection.", + // "description": "Lists the peering routes exchanged over peering connection. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networks.listPeeringRoutes", // "parameterOrder": [ @@ -98371,7 +103562,8 @@ type NetworksPatchCall struct { // Patch: Patches the specified network with the data included in the // request. Only the following fields can be modified: -// routingConfig.routingMode. +// routingConfig.routingMode. (== suppress_warning http-rest-shadowed +// ==) func (r *NetworksService) Patch(project string, network string, network2 *Network) *NetworksPatchCall { c := &NetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98426,6 +103618,7 @@ func (c *NetworksPatchCall) Header() http.Header { func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98490,7 +103683,7 @@ func (c *NetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.", + // "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.networks.patch", // "parameterOrder": [ @@ -98545,7 +103738,8 @@ type NetworksRemovePeeringCall struct { header_ http.Header } -// RemovePeering: Removes a peering from the specified network. +// RemovePeering: Removes a peering from the specified network. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworksService) RemovePeering(project string, network string, networksremovepeeringrequest *NetworksRemovePeeringRequest) *NetworksRemovePeeringCall { c := &NetworksRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98600,6 +103794,7 @@ func (c *NetworksRemovePeeringCall) Header() http.Header { func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98664,7 +103859,7 @@ func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Removes a peering from the specified network.", + // "description": "Removes a peering from the specified network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.removePeering", // "parameterOrder": [ @@ -98719,7 +103914,7 @@ type NetworksSwitchToCustomModeCall struct { } // SwitchToCustomMode: Switches the network mode from auto subnet mode -// to custom subnet mode. +// to custom subnet mode. (== suppress_warning http-rest-shadowed ==) func (r *NetworksService) SwitchToCustomMode(project string, network string) *NetworksSwitchToCustomModeCall { c := &NetworksSwitchToCustomModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98773,6 +103968,7 @@ func (c *NetworksSwitchToCustomModeCall) Header() http.Header { func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98832,7 +104028,7 @@ func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Switches the network mode from auto subnet mode to custom subnet mode.", + // "description": "Switches the network mode from auto subnet mode to custom subnet mode. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.switchToCustomMode", // "parameterOrder": [ @@ -98885,7 +104081,7 @@ type NetworksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *NetworksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworksTestIamPermissionsCall { c := &NetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98921,6 +104117,7 @@ func (c *NetworksTestIamPermissionsCall) Header() http.Header { func (c *NetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98985,7 +104182,7 @@ func (c *NetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.testIamPermissions", // "parameterOrder": [ @@ -99039,7 +104236,8 @@ type NetworksUpdatePeeringCall struct { // UpdatePeering: Updates the specified network peering with the data // included in the request Only the following fields can be modified: // NetworkPeering.export_custom_routes, and -// NetworkPeering.import_custom_routes +// NetworkPeering.import_custom_routes (== suppress_warning +// http-rest-shadowed ==) func (r *NetworksService) UpdatePeering(project string, network string, networksupdatepeeringrequest *NetworksUpdatePeeringRequest) *NetworksUpdatePeeringCall { c := &NetworksUpdatePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99094,6 +104292,7 @@ func (c *NetworksUpdatePeeringCall) Header() http.Header { func (c *NetworksUpdatePeeringCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99158,7 +104357,7 @@ func (c *NetworksUpdatePeeringCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes", + // "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.networks.updatePeering", // "parameterOrder": [ @@ -99214,7 +104413,8 @@ type NodeGroupsAddNodesCall struct { header_ http.Header } -// AddNodes: Adds specified number of nodes to the node group. +// AddNodes: Adds specified number of nodes to the node group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) AddNodes(project string, zone string, nodeGroup string, nodegroupsaddnodesrequest *NodeGroupsAddNodesRequest) *NodeGroupsAddNodesCall { c := &NodeGroupsAddNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99270,6 +104470,7 @@ func (c *NodeGroupsAddNodesCall) Header() http.Header { func (c *NodeGroupsAddNodesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99335,7 +104536,7 @@ func (c *NodeGroupsAddNodesCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Adds specified number of nodes to the node group.", + // "description": "Adds specified number of nodes to the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.addNodes", // "parameterOrder": [ @@ -99398,7 +104599,8 @@ type NodeGroupsAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of node groups. Note: -// use nodeGroups.listNodes for more details about each group. +// use nodeGroups.listNodes for more details about each group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) AggregatedList(project string) *NodeGroupsAggregatedListCall { c := &NodeGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99505,6 +104707,7 @@ func (c *NodeGroupsAggregatedListCall) Header() http.Header { func (c *NodeGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99566,7 +104769,7 @@ func (c *NodeGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeGr } return ret, nil // { - // "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.", + // "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.aggregatedList", // "parameterOrder": [ @@ -99650,7 +104853,8 @@ type NodeGroupsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified NodeGroup resource. +// Delete: Deletes the specified NodeGroup resource. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) Delete(project string, zone string, nodeGroup string) *NodeGroupsDeleteCall { c := &NodeGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99705,6 +104909,7 @@ func (c *NodeGroupsDeleteCall) Header() http.Header { func (c *NodeGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99765,7 +104970,7 @@ func (c *NodeGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Deletes the specified NodeGroup resource.", + // "description": "Deletes the specified NodeGroup resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.nodeGroups.delete", // "parameterOrder": [ @@ -99826,7 +105031,8 @@ type NodeGroupsDeleteNodesCall struct { header_ http.Header } -// DeleteNodes: Deletes specified nodes from the node group. +// DeleteNodes: Deletes specified nodes from the node group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) DeleteNodes(project string, zone string, nodeGroup string, nodegroupsdeletenodesrequest *NodeGroupsDeleteNodesRequest) *NodeGroupsDeleteNodesCall { c := &NodeGroupsDeleteNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99882,6 +105088,7 @@ func (c *NodeGroupsDeleteNodesCall) Header() http.Header { func (c *NodeGroupsDeleteNodesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99947,7 +105154,7 @@ func (c *NodeGroupsDeleteNodesCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes specified nodes from the node group.", + // "description": "Deletes specified nodes from the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.deleteNodes", // "parameterOrder": [ @@ -99957,7 +105164,7 @@ func (c *NodeGroupsDeleteNodesCall) Do(opts ...googleapi.CallOption) (*Operation // ], // "parameters": { // "nodeGroup": { - // "description": "Name of the NodeGroup resource to delete.", + // "description": "Name of the NodeGroup resource whose nodes will be deleted.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -100013,7 +105220,8 @@ type NodeGroupsGetCall struct { // Get: Returns the specified NodeGroup. Get a list of available // NodeGroups by making a list() request. Note: the "nodes" field should -// not be used. Use nodeGroups.listNodes instead. +// not be used. Use nodeGroups.listNodes instead. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) Get(project string, zone string, nodeGroup string) *NodeGroupsGetCall { c := &NodeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -100059,6 +105267,7 @@ func (c *NodeGroupsGetCall) Header() http.Header { func (c *NodeGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100122,7 +105331,7 @@ func (c *NodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, error) } return ret, nil // { - // "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead.", + // "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.get", // "parameterOrder": [ @@ -100180,7 +105389,8 @@ type NodeGroupsGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) GetIamPolicy(project string, zone string, resource string) *NodeGroupsGetIamPolicyCall { c := &NodeGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -100189,6 +105399,13 @@ func (r *NodeGroupsService) GetIamPolicy(project string, zone string, resource s return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *NodeGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeGroupsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -100226,6 +105443,7 @@ func (c *NodeGroupsGetIamPolicyCall) Header() http.Header { func (c *NodeGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100289,7 +105507,7 @@ func (c *NodeGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.getIamPolicy", // "parameterOrder": [ @@ -100298,6 +105516,12 @@ func (c *NodeGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -100346,7 +105570,8 @@ type NodeGroupsInsertCall struct { } // Insert: Creates a NodeGroup resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) Insert(project string, zone string, initialNodeCount int64, nodegroup *NodeGroup) *NodeGroupsInsertCall { c := &NodeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -100402,6 +105627,7 @@ func (c *NodeGroupsInsertCall) Header() http.Header { func (c *NodeGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100466,7 +105692,7 @@ func (c *NodeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Creates a NodeGroup resource in the specified project using the data included in the request.", + // "description": "Creates a NodeGroup resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.insert", // "parameterOrder": [ @@ -100531,7 +105757,7 @@ type NodeGroupsListCall struct { // List: Retrieves a list of node groups available to the specified // project. Note: use nodeGroups.listNodes for more details about each -// group. +// group. (== suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) List(project string, zone string) *NodeGroupsListCall { c := &NodeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -100639,6 +105865,7 @@ func (c *NodeGroupsListCall) Header() http.Header { func (c *NodeGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100701,7 +105928,7 @@ func (c *NodeGroupsListCall) Do(opts ...googleapi.CallOption) (*NodeGroupList, e } return ret, nil // { - // "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.", + // "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.list", // "parameterOrder": [ @@ -100793,7 +106020,8 @@ type NodeGroupsListNodesCall struct { header_ http.Header } -// ListNodes: Lists nodes in the node group. +// ListNodes: Lists nodes in the node group. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) ListNodes(project string, zone string, nodeGroup string) *NodeGroupsListNodesCall { c := &NodeGroupsListNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -100892,6 +106120,7 @@ func (c *NodeGroupsListNodesCall) Header() http.Header { func (c *NodeGroupsListNodesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100952,7 +106181,7 @@ func (c *NodeGroupsListNodesCall) Do(opts ...googleapi.CallOption) (*NodeGroupsL } return ret, nil // { - // "description": "Lists nodes in the node group.", + // "description": "Lists nodes in the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.listNodes", // "parameterOrder": [ @@ -101040,6 +106269,193 @@ func (c *NodeGroupsListNodesCall) Pages(ctx context.Context, f func(*NodeGroupsL } } +// method id "compute.nodeGroups.patch": + +type NodeGroupsPatchCall struct { + s *Service + project string + zone string + nodeGroup string + nodegroup *NodeGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patch the node group. (== suppress_warning http-rest-shadowed +// ==) +func (r *NodeGroupsService) Patch(project string, zone string, nodeGroup string, nodegroup *NodeGroup) *NodeGroupsPatchCall { + c := &NodeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.nodeGroup = nodeGroup + c.nodegroup = nodegroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NodeGroupsPatchCall) RequestId(requestId string) *NodeGroupsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NodeGroupsPatchCall) Fields(s ...googleapi.Field) *NodeGroupsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NodeGroupsPatchCall) Context(ctx context.Context) *NodeGroupsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NodeGroupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NodeGroupsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/nodeGroups/{nodeGroup}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "nodeGroup": c.nodeGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.nodeGroups.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NodeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patch the node group. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PATCH", + // "id": "compute.nodeGroups.patch", + // "parameterOrder": [ + // "project", + // "zone", + // "nodeGroup" + // ], + // "parameters": { + // "nodeGroup": { + // "description": "Name of the NodeGroup resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/nodeGroups/{nodeGroup}", + // "request": { + // "$ref": "NodeGroup" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.nodeGroups.setAutoscalingPolicy": type NodeGroupsSetAutoscalingPolicyCall struct { @@ -101054,6 +106470,7 @@ type NodeGroupsSetAutoscalingPolicyCall struct { } // SetAutoscalingPolicy: Sets the autoscaling policy of the node group. +// (== suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) SetAutoscalingPolicy(project string, zone string, nodeGroup string, nodegroupssetautoscalingpolicyrequest *NodeGroupsSetAutoscalingPolicyRequest) *NodeGroupsSetAutoscalingPolicyCall { c := &NodeGroupsSetAutoscalingPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -101109,6 +106526,7 @@ func (c *NodeGroupsSetAutoscalingPolicyCall) Header() http.Header { func (c *NodeGroupsSetAutoscalingPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101174,7 +106592,7 @@ func (c *NodeGroupsSetAutoscalingPolicyCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Sets the autoscaling policy of the node group.", + // "description": "Sets the autoscaling policy of the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.setAutoscalingPolicy", // "parameterOrder": [ @@ -101239,7 +106657,8 @@ type NodeGroupsSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *NodeGroupsSetIamPolicyCall { c := &NodeGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -101276,6 +106695,7 @@ func (c *NodeGroupsSetIamPolicyCall) Header() http.Header { func (c *NodeGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101341,7 +106761,7 @@ func (c *NodeGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.setIamPolicy", // "parameterOrder": [ @@ -101400,7 +106820,8 @@ type NodeGroupsSetNodeTemplateCall struct { header_ http.Header } -// SetNodeTemplate: Updates the node template of the node group. +// SetNodeTemplate: Updates the node template of the node group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) SetNodeTemplate(project string, zone string, nodeGroup string, nodegroupssetnodetemplaterequest *NodeGroupsSetNodeTemplateRequest) *NodeGroupsSetNodeTemplateCall { c := &NodeGroupsSetNodeTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -101456,6 +106877,7 @@ func (c *NodeGroupsSetNodeTemplateCall) Header() http.Header { func (c *NodeGroupsSetNodeTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101521,7 +106943,7 @@ func (c *NodeGroupsSetNodeTemplateCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Updates the node template of the node group.", + // "description": "Updates the node template of the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.setNodeTemplate", // "parameterOrder": [ @@ -101586,7 +107008,7 @@ type NodeGroupsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeGroupsTestIamPermissionsCall { c := &NodeGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -101623,6 +107045,7 @@ func (c *NodeGroupsTestIamPermissionsCall) Header() http.Header { func (c *NodeGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101688,7 +107111,7 @@ func (c *NodeGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Te } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.testIamPermissions", // "parameterOrder": [ @@ -101746,7 +107169,8 @@ type NodeTemplatesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of node templates. +// AggregatedList: Retrieves an aggregated list of node templates. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) AggregatedList(project string) *NodeTemplatesAggregatedListCall { c := &NodeTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -101853,6 +107277,7 @@ func (c *NodeTemplatesAggregatedListCall) Header() http.Header { func (c *NodeTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101914,7 +107339,7 @@ func (c *NodeTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Nod } return ret, nil // { - // "description": "Retrieves an aggregated list of node templates.", + // "description": "Retrieves an aggregated list of node templates. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.aggregatedList", // "parameterOrder": [ @@ -101998,7 +107423,8 @@ type NodeTemplatesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified NodeTemplate resource. +// Delete: Deletes the specified NodeTemplate resource. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) Delete(project string, region string, nodeTemplate string) *NodeTemplatesDeleteCall { c := &NodeTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102053,6 +107479,7 @@ func (c *NodeTemplatesDeleteCall) Header() http.Header { func (c *NodeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102113,7 +107540,7 @@ func (c *NodeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified NodeTemplate resource.", + // "description": "Deletes the specified NodeTemplate resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.nodeTemplates.delete", // "parameterOrder": [ @@ -102175,7 +107602,8 @@ type NodeTemplatesGetCall struct { } // Get: Returns the specified node template. Gets a list of available -// node templates by making a list() request. +// node templates by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) Get(project string, region string, nodeTemplate string) *NodeTemplatesGetCall { c := &NodeTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102221,6 +107649,7 @@ func (c *NodeTemplatesGetCall) Header() http.Header { func (c *NodeTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102284,7 +107713,7 @@ func (c *NodeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*NodeTemplate, } return ret, nil // { - // "description": "Returns the specified node template. Gets a list of available node templates by making a list() request.", + // "description": "Returns the specified node template. Gets a list of available node templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.get", // "parameterOrder": [ @@ -102342,7 +107771,8 @@ type NodeTemplatesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) GetIamPolicy(project string, region string, resource string) *NodeTemplatesGetIamPolicyCall { c := &NodeTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102351,6 +107781,13 @@ func (r *NodeTemplatesService) GetIamPolicy(project string, region string, resou return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *NodeTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeTemplatesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -102388,6 +107825,7 @@ func (c *NodeTemplatesGetIamPolicyCall) Header() http.Header { func (c *NodeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102451,7 +107889,7 @@ func (c *NodeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.getIamPolicy", // "parameterOrder": [ @@ -102460,6 +107898,12 @@ func (c *NodeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -102508,7 +107952,8 @@ type NodeTemplatesInsertCall struct { } // Insert: Creates a NodeTemplate resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) Insert(project string, region string, nodetemplate *NodeTemplate) *NodeTemplatesInsertCall { c := &NodeTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102563,6 +108008,7 @@ func (c *NodeTemplatesInsertCall) Header() http.Header { func (c *NodeTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102627,7 +108073,7 @@ func (c *NodeTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a NodeTemplate resource in the specified project using the data included in the request.", + // "description": "Creates a NodeTemplate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeTemplates.insert", // "parameterOrder": [ @@ -102683,7 +108129,7 @@ type NodeTemplatesListCall struct { } // List: Retrieves a list of node templates available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) List(project string, region string) *NodeTemplatesListCall { c := &NodeTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102791,6 +108237,7 @@ func (c *NodeTemplatesListCall) Header() http.Header { func (c *NodeTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102853,7 +108300,7 @@ func (c *NodeTemplatesListCall) Do(opts ...googleapi.CallOption) (*NodeTemplateL } return ret, nil // { - // "description": "Retrieves a list of node templates available to the specified project.", + // "description": "Retrieves a list of node templates available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.list", // "parameterOrder": [ @@ -102947,7 +108394,8 @@ type NodeTemplatesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NodeTemplatesSetIamPolicyCall { c := &NodeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102984,6 +108432,7 @@ func (c *NodeTemplatesSetIamPolicyCall) Header() http.Header { func (c *NodeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103049,7 +108498,7 @@ func (c *NodeTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeTemplates.setIamPolicy", // "parameterOrder": [ @@ -103109,7 +108558,7 @@ type NodeTemplatesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeTemplatesTestIamPermissionsCall { c := &NodeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103146,6 +108595,7 @@ func (c *NodeTemplatesTestIamPermissionsCall) Header() http.Header { func (c *NodeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103211,7 +108661,7 @@ func (c *NodeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeTemplates.testIamPermissions", // "parameterOrder": [ @@ -103269,7 +108719,8 @@ type NodeTypesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of node types. +// AggregatedList: Retrieves an aggregated list of node types. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeTypesService) AggregatedList(project string) *NodeTypesAggregatedListCall { c := &NodeTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103376,6 +108827,7 @@ func (c *NodeTypesAggregatedListCall) Header() http.Header { func (c *NodeTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103437,7 +108889,7 @@ func (c *NodeTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTyp } return ret, nil // { - // "description": "Retrieves an aggregated list of node types.", + // "description": "Retrieves an aggregated list of node types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTypes.aggregatedList", // "parameterOrder": [ @@ -103523,7 +108975,8 @@ type NodeTypesGetCall struct { } // Get: Returns the specified node type. Gets a list of available node -// types by making a list() request. +// types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTypesService) Get(project string, zone string, nodeType string) *NodeTypesGetCall { c := &NodeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103569,6 +109022,7 @@ func (c *NodeTypesGetCall) Header() http.Header { func (c *NodeTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103632,7 +109086,7 @@ func (c *NodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, error) { } return ret, nil // { - // "description": "Returns the specified node type. Gets a list of available node types by making a list() request.", + // "description": "Returns the specified node type. Gets a list of available node types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTypes.get", // "parameterOrder": [ @@ -103689,7 +109143,7 @@ type NodeTypesListCall struct { } // List: Retrieves a list of node types available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *NodeTypesService) List(project string, zone string) *NodeTypesListCall { c := &NodeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103797,6 +109251,7 @@ func (c *NodeTypesListCall) Header() http.Header { func (c *NodeTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103859,7 +109314,7 @@ func (c *NodeTypesListCall) Do(opts ...googleapi.CallOption) (*NodeTypeList, err } return ret, nil // { - // "description": "Retrieves a list of node types available to the specified project.", + // "description": "Retrieves a list of node types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTypes.list", // "parameterOrder": [ @@ -103951,7 +109406,7 @@ type OrganizationSecurityPoliciesAddAssociationCall struct { } // AddAssociation: Inserts an association for the specified security -// policy. +// policy. (== suppress_warning http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) AddAssociation(securityPolicy string, securitypolicyassociation *SecurityPolicyAssociation) *OrganizationSecurityPoliciesAddAssociationCall { c := &OrganizationSecurityPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -104015,6 +109470,7 @@ func (c *OrganizationSecurityPoliciesAddAssociationCall) Header() http.Header { func (c *OrganizationSecurityPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104078,7 +109534,7 @@ func (c *OrganizationSecurityPoliciesAddAssociationCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Inserts an association for the specified security policy.", + // "description": "Inserts an association for the specified security policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.organizationSecurityPolicies.addAssociation", // "parameterOrder": [ @@ -104098,7 +109554,7 @@ func (c *OrganizationSecurityPoliciesAddAssociationCall) Do(opts ...googleapi.Ca // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } @@ -104129,7 +109585,8 @@ type OrganizationSecurityPoliciesAddRuleCall struct { header_ http.Header } -// AddRule: Inserts a rule into a security policy. +// AddRule: Inserts a rule into a security policy. (== suppress_warning +// http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) AddRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesAddRuleCall { c := &OrganizationSecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -104183,6 +109640,7 @@ func (c *OrganizationSecurityPoliciesAddRuleCall) Header() http.Header { func (c *OrganizationSecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104246,7 +109704,7 @@ func (c *OrganizationSecurityPoliciesAddRuleCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Inserts a rule into a security policy.", + // "description": "Inserts a rule into a security policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.organizationSecurityPolicies.addRule", // "parameterOrder": [ @@ -104261,7 +109719,7 @@ func (c *OrganizationSecurityPoliciesAddRuleCall) Do(opts ...googleapi.CallOptio // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } @@ -104291,7 +109749,8 @@ type OrganizationSecurityPoliciesCopyRulesCall struct { header_ http.Header } -// CopyRules: Copies rules to the specified security policy. +// CopyRules: Copies rules to the specified security policy. (== +// suppress_warning http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) CopyRules(securityPolicy string) *OrganizationSecurityPoliciesCopyRulesCall { c := &OrganizationSecurityPoliciesCopyRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -104351,6 +109810,7 @@ func (c *OrganizationSecurityPoliciesCopyRulesCall) Header() http.Header { func (c *OrganizationSecurityPoliciesCopyRulesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104409,7 +109869,7 @@ func (c *OrganizationSecurityPoliciesCopyRulesCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Copies rules to the specified security policy.", + // "description": "Copies rules to the specified security policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.organizationSecurityPolicies.copyRules", // "parameterOrder": [ @@ -104424,7 +109884,7 @@ func (c *OrganizationSecurityPoliciesCopyRulesCall) Do(opts ...googleapi.CallOpt // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // }, @@ -104456,7 +109916,8 @@ type OrganizationSecurityPoliciesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified policy. +// Delete: Deletes the specified policy. (== suppress_warning +// http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) Delete(securityPolicy string) *OrganizationSecurityPoliciesDeleteCall { c := &OrganizationSecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -104509,6 +109970,7 @@ func (c *OrganizationSecurityPoliciesDeleteCall) Header() http.Header { func (c *OrganizationSecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104567,7 +110029,7 @@ func (c *OrganizationSecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Deletes the specified policy.", + // "description": "Deletes the specified policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.organizationSecurityPolicies.delete", // "parameterOrder": [ @@ -104582,7 +110044,7 @@ func (c *OrganizationSecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption // "securityPolicy": { // "description": "Name of the security policy to delete.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } @@ -104611,7 +110073,7 @@ type OrganizationSecurityPoliciesGetCall struct { } // Get: List all of the ordered rules present in a single specified -// policy. +// policy. (== suppress_warning http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) Get(securityPolicy string) *OrganizationSecurityPoliciesGetCall { c := &OrganizationSecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -104655,6 +110117,7 @@ func (c *OrganizationSecurityPoliciesGetCall) Header() http.Header { func (c *OrganizationSecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104716,7 +110179,7 @@ func (c *OrganizationSecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "List all of the ordered rules present in a single specified policy.", + // "description": "List all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.organizationSecurityPolicies.get", // "parameterOrder": [ @@ -104726,7 +110189,7 @@ func (c *OrganizationSecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) ( // "securityPolicy": { // "description": "Name of the security policy to get.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } @@ -104755,7 +110218,8 @@ type OrganizationSecurityPoliciesGetAssociationCall struct { header_ http.Header } -// GetAssociation: Gets an association with the specified name. +// GetAssociation: Gets an association with the specified name. (== +// suppress_warning http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) GetAssociation(securityPolicy string) *OrganizationSecurityPoliciesGetAssociationCall { c := &OrganizationSecurityPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -104806,6 +110270,7 @@ func (c *OrganizationSecurityPoliciesGetAssociationCall) Header() http.Header { func (c *OrganizationSecurityPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104867,7 +110332,7 @@ func (c *OrganizationSecurityPoliciesGetAssociationCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Gets an association with the specified name.", + // "description": "Gets an association with the specified name. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.organizationSecurityPolicies.getAssociation", // "parameterOrder": [ @@ -104882,7 +110347,7 @@ func (c *OrganizationSecurityPoliciesGetAssociationCall) Do(opts ...googleapi.Ca // "securityPolicy": { // "description": "Name of the security policy to which the queried rule belongs.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } @@ -104911,7 +110376,8 @@ type OrganizationSecurityPoliciesGetRuleCall struct { header_ http.Header } -// GetRule: Gets a rule at the specified priority. +// GetRule: Gets a rule at the specified priority. (== suppress_warning +// http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) GetRule(securityPolicy string) *OrganizationSecurityPoliciesGetRuleCall { c := &OrganizationSecurityPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -104962,6 +110428,7 @@ func (c *OrganizationSecurityPoliciesGetRuleCall) Header() http.Header { func (c *OrganizationSecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105023,7 +110490,7 @@ func (c *OrganizationSecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets a rule at the specified priority.", + // "description": "Gets a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.organizationSecurityPolicies.getRule", // "parameterOrder": [ @@ -105039,7 +110506,7 @@ func (c *OrganizationSecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOptio // "securityPolicy": { // "description": "Name of the security policy to which the queried rule belongs.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } @@ -105068,7 +110535,7 @@ type OrganizationSecurityPoliciesInsertCall struct { } // Insert: Creates a new policy in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) Insert(securitypolicy *SecurityPolicy) *OrganizationSecurityPoliciesInsertCall { c := &OrganizationSecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securitypolicy = securitypolicy @@ -105128,6 +110595,7 @@ func (c *OrganizationSecurityPoliciesInsertCall) Header() http.Header { func (c *OrganizationSecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105188,7 +110656,7 @@ func (c *OrganizationSecurityPoliciesInsertCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Creates a new policy in the specified project using the data included in the request.", + // "description": "Creates a new policy in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.organizationSecurityPolicies.insert", // "parameters": { @@ -105229,7 +110697,7 @@ type OrganizationSecurityPoliciesListCall struct { } // List: List all the policies that have been configured for the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) List() *OrganizationSecurityPoliciesListCall { c := &OrganizationSecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -105342,6 +110810,7 @@ func (c *OrganizationSecurityPoliciesListCall) Header() http.Header { func (c *OrganizationSecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105400,7 +110869,7 @@ func (c *OrganizationSecurityPoliciesListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "List all the policies that have been configured for the specified project.", + // "description": "List all the policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.organizationSecurityPolicies.list", // "parameters": { @@ -105478,7 +110947,7 @@ type OrganizationSecurityPoliciesListAssociationsCall struct { } // ListAssociations: Lists associations of a specified target, i.e., -// organization or folder. +// organization or folder. (== suppress_warning http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) ListAssociations() *OrganizationSecurityPoliciesListAssociationsCall { c := &OrganizationSecurityPoliciesListAssociationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -105529,6 +110998,7 @@ func (c *OrganizationSecurityPoliciesListAssociationsCall) Header() http.Header func (c *OrganizationSecurityPoliciesListAssociationsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105589,7 +111059,7 @@ func (c *OrganizationSecurityPoliciesListAssociationsCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Lists associations of a specified target, i.e., organization or folder.", + // "description": "Lists associations of a specified target, i.e., organization or folder. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.organizationSecurityPolicies.listAssociations", // "parameters": { @@ -105621,7 +111091,8 @@ type OrganizationSecurityPoliciesMoveCall struct { header_ http.Header } -// Move: Moves the specified security policy. +// Move: Moves the specified security policy. (== suppress_warning +// http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) Move(securityPolicy string) *OrganizationSecurityPoliciesMoveCall { c := &OrganizationSecurityPoliciesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -105681,6 +111152,7 @@ func (c *OrganizationSecurityPoliciesMoveCall) Header() http.Header { func (c *OrganizationSecurityPoliciesMoveCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105739,7 +111211,7 @@ func (c *OrganizationSecurityPoliciesMoveCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Moves the specified security policy.", + // "description": "Moves the specified security policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.organizationSecurityPolicies.move", // "parameterOrder": [ @@ -105759,7 +111231,7 @@ func (c *OrganizationSecurityPoliciesMoveCall) Do(opts ...googleapi.CallOption) // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } @@ -105788,7 +111260,7 @@ type OrganizationSecurityPoliciesPatchCall struct { } // Patch: Patches the specified policy with the data included in the -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) Patch(securityPolicy string, securitypolicy *SecurityPolicy) *OrganizationSecurityPoliciesPatchCall { c := &OrganizationSecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -105842,6 +111314,7 @@ func (c *OrganizationSecurityPoliciesPatchCall) Header() http.Header { func (c *OrganizationSecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105905,7 +111378,7 @@ func (c *OrganizationSecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request.", + // "description": "Patches the specified policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.organizationSecurityPolicies.patch", // "parameterOrder": [ @@ -105920,7 +111393,7 @@ func (c *OrganizationSecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } @@ -105951,7 +111424,8 @@ type OrganizationSecurityPoliciesPatchRuleCall struct { header_ http.Header } -// PatchRule: Patches a rule at the specified priority. +// PatchRule: Patches a rule at the specified priority. (== +// suppress_warning http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) PatchRule(securityPolicy string, securitypolicyrule *SecurityPolicyRule) *OrganizationSecurityPoliciesPatchRuleCall { c := &OrganizationSecurityPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -106012,6 +111486,7 @@ func (c *OrganizationSecurityPoliciesPatchRuleCall) Header() http.Header { func (c *OrganizationSecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106075,7 +111550,7 @@ func (c *OrganizationSecurityPoliciesPatchRuleCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Patches a rule at the specified priority.", + // "description": "Patches a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.organizationSecurityPolicies.patchRule", // "parameterOrder": [ @@ -106096,7 +111571,7 @@ func (c *OrganizationSecurityPoliciesPatchRuleCall) Do(opts ...googleapi.CallOpt // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } @@ -106127,7 +111602,7 @@ type OrganizationSecurityPoliciesRemoveAssociationCall struct { } // RemoveAssociation: Removes an association for the specified security -// policy. +// policy. (== suppress_warning http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) RemoveAssociation(securityPolicy string) *OrganizationSecurityPoliciesRemoveAssociationCall { c := &OrganizationSecurityPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -106187,6 +111662,7 @@ func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Header() http.Header func (c *OrganizationSecurityPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106245,7 +111721,7 @@ func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Removes an association for the specified security policy.", + // "description": "Removes an association for the specified security policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.organizationSecurityPolicies.removeAssociation", // "parameterOrder": [ @@ -106265,7 +111741,7 @@ func (c *OrganizationSecurityPoliciesRemoveAssociationCall) Do(opts ...googleapi // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } @@ -106292,7 +111768,8 @@ type OrganizationSecurityPoliciesRemoveRuleCall struct { header_ http.Header } -// RemoveRule: Deletes a rule at the specified priority. +// RemoveRule: Deletes a rule at the specified priority. (== +// suppress_warning http-rest-shadowed ==) func (r *OrganizationSecurityPoliciesService) RemoveRule(securityPolicy string) *OrganizationSecurityPoliciesRemoveRuleCall { c := &OrganizationSecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.securityPolicy = securityPolicy @@ -106352,6 +111829,7 @@ func (c *OrganizationSecurityPoliciesRemoveRuleCall) Header() http.Header { func (c *OrganizationSecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106410,7 +111888,7 @@ func (c *OrganizationSecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Deletes a rule at the specified priority.", + // "description": "Deletes a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.organizationSecurityPolicies.removeRule", // "parameterOrder": [ @@ -106431,7 +111909,7 @@ func (c *OrganizationSecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOp // "securityPolicy": { // "description": "Name of the security policy to update.", // "location": "path", - // "pattern": "[0-9]{0,20}", + // "pattern": "(securityPolicies/)?[0-9]{0,20}", // "required": true, // "type": "string" // } @@ -106448,6 +111926,1399 @@ func (c *OrganizationSecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOp } +// method id "compute.packetMirrorings.aggregatedList": + +type PacketMirroringsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of packetMirrorings. (== +// suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) AggregatedList(project string) *PacketMirroringsAggregatedListCall { + c := &PacketMirroringsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *PacketMirroringsAggregatedListCall) Filter(filter string) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *PacketMirroringsAggregatedListCall) MaxResults(maxResults int64) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *PacketMirroringsAggregatedListCall) OrderBy(orderBy string) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *PacketMirroringsAggregatedListCall) PageToken(pageToken string) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsAggregatedListCall) Fields(s ...googleapi.Field) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PacketMirroringsAggregatedListCall) IfNoneMatch(entityTag string) *PacketMirroringsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsAggregatedListCall) Context(ctx context.Context) *PacketMirroringsAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/packetMirrorings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.aggregatedList" call. +// Exactly one of *PacketMirroringAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *PacketMirroringAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PacketMirroringsAggregatedListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PacketMirroringAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of packetMirrorings. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.packetMirrorings.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/packetMirrorings", + // "response": { + // "$ref": "PacketMirroringAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PacketMirroringsAggregatedListCall) Pages(ctx context.Context, f func(*PacketMirroringAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.packetMirrorings.delete": + +type PacketMirroringsDeleteCall struct { + s *Service + project string + region string + packetMirroring string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified PacketMirroring resource. (== +// suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) Delete(project string, region string, packetMirroring string) *PacketMirroringsDeleteCall { + c := &PacketMirroringsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.packetMirroring = packetMirroring + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PacketMirroringsDeleteCall) RequestId(requestId string) *PacketMirroringsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsDeleteCall) Fields(s ...googleapi.Field) *PacketMirroringsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsDeleteCall) Context(ctx context.Context) *PacketMirroringsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings/{packetMirroring}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "packetMirroring": c.packetMirroring, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PacketMirroringsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified PacketMirroring resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.packetMirrorings.delete", + // "parameterOrder": [ + // "project", + // "region", + // "packetMirroring" + // ], + // "parameters": { + // "packetMirroring": { + // "description": "Name of the PacketMirroring resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.packetMirrorings.get": + +type PacketMirroringsGetCall struct { + s *Service + project string + region string + packetMirroring string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified PacketMirroring resource. (== +// suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) Get(project string, region string, packetMirroring string) *PacketMirroringsGetCall { + c := &PacketMirroringsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.packetMirroring = packetMirroring + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsGetCall) Fields(s ...googleapi.Field) *PacketMirroringsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PacketMirroringsGetCall) IfNoneMatch(entityTag string) *PacketMirroringsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsGetCall) Context(ctx context.Context) *PacketMirroringsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings/{packetMirroring}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "packetMirroring": c.packetMirroring, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.get" call. +// Exactly one of *PacketMirroring or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *PacketMirroring.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PacketMirroringsGetCall) Do(opts ...googleapi.CallOption) (*PacketMirroring, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PacketMirroring{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified PacketMirroring resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.packetMirrorings.get", + // "parameterOrder": [ + // "project", + // "region", + // "packetMirroring" + // ], + // "parameters": { + // "packetMirroring": { + // "description": "Name of the PacketMirroring resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + // "response": { + // "$ref": "PacketMirroring" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.packetMirrorings.insert": + +type PacketMirroringsInsertCall struct { + s *Service + project string + region string + packetmirroring *PacketMirroring + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a PacketMirroring resource in the specified project +// and region using the data included in the request. (== +// suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) Insert(project string, region string, packetmirroring *PacketMirroring) *PacketMirroringsInsertCall { + c := &PacketMirroringsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.packetmirroring = packetmirroring + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PacketMirroringsInsertCall) RequestId(requestId string) *PacketMirroringsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsInsertCall) Fields(s ...googleapi.Field) *PacketMirroringsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsInsertCall) Context(ctx context.Context) *PacketMirroringsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.packetmirroring) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PacketMirroringsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a PacketMirroring resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.packetMirrorings.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings", + // "request": { + // "$ref": "PacketMirroring" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.packetMirrorings.list": + +type PacketMirroringsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of PacketMirroring resources available to the +// specified project and region. (== suppress_warning http-rest-shadowed +// ==) +func (r *PacketMirroringsService) List(project string, region string) *PacketMirroringsListCall { + c := &PacketMirroringsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *PacketMirroringsListCall) Filter(filter string) *PacketMirroringsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *PacketMirroringsListCall) MaxResults(maxResults int64) *PacketMirroringsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *PacketMirroringsListCall) OrderBy(orderBy string) *PacketMirroringsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *PacketMirroringsListCall) PageToken(pageToken string) *PacketMirroringsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsListCall) Fields(s ...googleapi.Field) *PacketMirroringsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PacketMirroringsListCall) IfNoneMatch(entityTag string) *PacketMirroringsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsListCall) Context(ctx context.Context) *PacketMirroringsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.list" call. +// Exactly one of *PacketMirroringList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PacketMirroringList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PacketMirroringsListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PacketMirroringList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of PacketMirroring resources available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.packetMirrorings.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings", + // "response": { + // "$ref": "PacketMirroringList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PacketMirroringsListCall) Pages(ctx context.Context, f func(*PacketMirroringList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.packetMirrorings.patch": + +type PacketMirroringsPatchCall struct { + s *Service + project string + region string + packetMirroring string + packetmirroring *PacketMirroring + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified PacketMirroring resource with the data +// included in the request. This method supports PATCH semantics and +// uses JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) Patch(project string, region string, packetMirroring string, packetmirroring *PacketMirroring) *PacketMirroringsPatchCall { + c := &PacketMirroringsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.packetMirroring = packetMirroring + c.packetmirroring = packetmirroring + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PacketMirroringsPatchCall) RequestId(requestId string) *PacketMirroringsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsPatchCall) Fields(s ...googleapi.Field) *PacketMirroringsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsPatchCall) Context(ctx context.Context) *PacketMirroringsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.packetmirroring) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings/{packetMirroring}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "packetMirroring": c.packetMirroring, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PacketMirroringsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PATCH", + // "id": "compute.packetMirrorings.patch", + // "parameterOrder": [ + // "project", + // "region", + // "packetMirroring" + // ], + // "parameters": { + // "packetMirroring": { + // "description": "Name of the PacketMirroring resource to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + // "request": { + // "$ref": "PacketMirroring" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.packetMirrorings.testIamPermissions": + +type PacketMirroringsTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. (== suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *PacketMirroringsTestIamPermissionsCall { + c := &PacketMirroringsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsTestIamPermissionsCall) Fields(s ...googleapi.Field) *PacketMirroringsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsTestIamPermissionsCall) Context(ctx context.Context) *PacketMirroringsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PacketMirroringsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.packetMirrorings.testIamPermissions", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.projects.disableXpnHost": type ProjectsDisableXpnHostCall struct { @@ -106459,6 +113330,7 @@ type ProjectsDisableXpnHostCall struct { } // DisableXpnHost: Disable this project as a shared VPC host project. +// (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall { c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -106511,6 +113383,7 @@ func (c *ProjectsDisableXpnHostCall) Header() http.Header { func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106569,7 +113442,7 @@ func (c *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Disable this project as a shared VPC host project.", + // "description": "Disable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.disableXpnHost", // "parameterOrder": [ @@ -106612,8 +113485,9 @@ type ProjectsDisableXpnResourceCall struct { header_ http.Header } -// DisableXpnResource: Disable a serivce resource (a.k.a service -// project) associated with this host project. +// DisableXpnResource: Disable a service resource (also known as service +// project) associated with this host project. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall { c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -106667,6 +113541,7 @@ func (c *ProjectsDisableXpnResourceCall) Header() http.Header { func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106730,7 +113605,7 @@ func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", + // "description": "Disable a service resource (also known as service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.disableXpnResource", // "parameterOrder": [ @@ -106775,7 +113650,8 @@ type ProjectsEnableXpnHostCall struct { header_ http.Header } -// EnableXpnHost: Enable this project as a shared VPC host project. +// EnableXpnHost: Enable this project as a shared VPC host project. (== +// suppress_warning http-rest-shadowed ==) func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall { c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -106828,6 +113704,7 @@ func (c *ProjectsEnableXpnHostCall) Header() http.Header { func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106886,7 +113763,7 @@ func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Enable this project as a shared VPC host project.", + // "description": "Enable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.enableXpnHost", // "parameterOrder": [ @@ -106931,7 +113808,8 @@ type ProjectsEnableXpnResourceCall struct { // EnableXpnResource: Enable service resource (a.k.a service project) // for a host project, so that subnets in the host project can be used -// by instances in the service project. +// by instances in the service project. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall { c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -106985,6 +113863,7 @@ func (c *ProjectsEnableXpnResourceCall) Header() http.Header { func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107048,7 +113927,7 @@ func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", + // "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.enableXpnResource", // "parameterOrder": [ @@ -107094,7 +113973,8 @@ type ProjectsGetCall struct { header_ http.Header } -// Get: Returns the specified Project resource. +// Get: Returns the specified Project resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/projects/get func (r *ProjectsService) Get(project string) *ProjectsGetCall { c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -107139,6 +114019,7 @@ func (c *ProjectsGetCall) Header() http.Header { func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107200,7 +114081,7 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { } return ret, nil // { - // "description": "Returns the specified Project resource.", + // "description": "Returns the specified Project resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.projects.get", // "parameterOrder": [ @@ -107240,7 +114121,8 @@ type ProjectsGetXpnHostCall struct { } // GetXpnHost: Gets the shared VPC host project that this project links -// to. May be empty if no link exists. +// to. May be empty if no link exists. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall { c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107284,6 +114166,7 @@ func (c *ProjectsGetXpnHostCall) Header() http.Header { func (c *ProjectsGetXpnHostCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107345,7 +114228,7 @@ func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, err } return ret, nil // { - // "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists.", + // "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.projects.getXpnHost", // "parameterOrder": [ @@ -107384,7 +114267,8 @@ type ProjectsGetXpnResourcesCall struct { } // GetXpnResources: Gets service resources (a.k.a service project) -// associated with this host project. +// associated with this host project. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall { c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107491,6 +114375,7 @@ func (c *ProjectsGetXpnResourcesCall) Header() http.Header { func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107552,7 +114437,7 @@ func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*Project } return ret, nil // { - // "description": "Gets service resources (a.k.a service project) associated with this host project.", + // "description": "Gets service resources (a.k.a service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.projects.getXpnResources", // "parameterOrder": [ @@ -107635,7 +114520,7 @@ type ProjectsListXpnHostsCall struct { } // ListXpnHosts: Lists all shared VPC host projects visible to the user -// in an organization. +// in an organization. (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall { c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107733,6 +114618,7 @@ func (c *ProjectsListXpnHostsCall) Header() http.Header { func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107796,7 +114682,7 @@ func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostLis } return ret, nil // { - // "description": "Lists all shared VPC host projects visible to the user in an organization.", + // "description": "Lists all shared VPC host projects visible to the user in an organization. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.listXpnHosts", // "parameterOrder": [ @@ -107881,7 +114767,8 @@ type ProjectsMoveDiskCall struct { header_ http.Header } -// MoveDisk: Moves a persistent disk from one zone to another. +// MoveDisk: Moves a persistent disk from one zone to another. (== +// suppress_warning http-rest-shadowed ==) func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall { c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107935,6 +114822,7 @@ func (c *ProjectsMoveDiskCall) Header() http.Header { func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107998,7 +114886,7 @@ func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Moves a persistent disk from one zone to another.", + // "description": "Moves a persistent disk from one zone to another. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.moveDisk", // "parameterOrder": [ @@ -108045,7 +114933,7 @@ type ProjectsMoveInstanceCall struct { } // MoveInstance: Moves an instance and its attached persistent disks -// from one zone to another. +// from one zone to another. (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall { c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -108099,6 +114987,7 @@ func (c *ProjectsMoveInstanceCall) Header() http.Header { func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108162,7 +115051,7 @@ func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Moves an instance and its attached persistent disks from one zone to another.", + // "description": "Moves an instance and its attached persistent disks from one zone to another. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.moveInstance", // "parameterOrder": [ @@ -108210,6 +115099,7 @@ type ProjectsSetCommonInstanceMetadataCall struct { // SetCommonInstanceMetadata: Sets metadata common to all instances // within the specified project using the data included in the request. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setCommonInstanceMetadata func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall { c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -108264,6 +115154,7 @@ func (c *ProjectsSetCommonInstanceMetadataCall) Header() http.Header { func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108327,7 +115218,7 @@ func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets metadata common to all instances within the specified project using the data included in the request.", + // "description": "Sets metadata common to all instances within the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.setCommonInstanceMetadata", // "parameterOrder": [ @@ -108376,7 +115267,7 @@ type ProjectsSetDefaultNetworkTierCall struct { // SetDefaultNetworkTier: Sets the default network tier of the project. // The default network tier is used when an // address/forwardingRule/instance is created without specifying the -// network tier field. +// network tier field. (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) SetDefaultNetworkTier(project string, projectssetdefaultnetworktierrequest *ProjectsSetDefaultNetworkTierRequest) *ProjectsSetDefaultNetworkTierCall { c := &ProjectsSetDefaultNetworkTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -108430,6 +115321,7 @@ func (c *ProjectsSetDefaultNetworkTierCall) Header() http.Header { func (c *ProjectsSetDefaultNetworkTierCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108493,7 +115385,7 @@ func (c *ProjectsSetDefaultNetworkTierCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.", + // "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.setDefaultNetworkTier", // "parameterOrder": [ @@ -108541,7 +115433,8 @@ type ProjectsSetDefaultServiceAccountCall struct { // SetDefaultServiceAccount: Sets the default service account of the // project. The default service account is used when a VM instance is -// created with the service account email address set to "default". +// created with the service account email address set to "default". (== +// suppress_warning http-rest-shadowed ==) func (r *ProjectsService) SetDefaultServiceAccount(project string, projectssetdefaultserviceaccountrequest *ProjectsSetDefaultServiceAccountRequest) *ProjectsSetDefaultServiceAccountCall { c := &ProjectsSetDefaultServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -108595,6 +115488,7 @@ func (c *ProjectsSetDefaultServiceAccountCall) Header() http.Header { func (c *ProjectsSetDefaultServiceAccountCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108658,7 +115552,7 @@ func (c *ProjectsSetDefaultServiceAccountCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to \"default\".", + // "description": "Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to \"default\". (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.setDefaultServiceAccount", // "parameterOrder": [ @@ -108707,7 +115601,7 @@ type ProjectsSetUsageExportBucketCall struct { // SetUsageExportBucket: Enables the usage export feature and sets the // usage export bucket where reports are stored. If you provide an empty // request body using this method, the usage export feature will be -// disabled. +// disabled. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setUsageExportBucket func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall { c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -108762,6 +115656,7 @@ func (c *ProjectsSetUsageExportBucketCall) Header() http.Header { func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108825,7 +115720,7 @@ func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", + // "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.setUsageExportBucket", // "parameterOrder": [ @@ -108863,6 +115758,2156 @@ func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Op } +// method id "compute.publicAdvertisedPrefixes.delete": + +type PublicAdvertisedPrefixesDeleteCall struct { + s *Service + project string + publicAdvertisedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified PublicAdvertisedPrefix (== +// suppress_warning http-rest-shadowed ==) +func (r *PublicAdvertisedPrefixesService) Delete(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesDeleteCall { + c := &PublicAdvertisedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.publicAdvertisedPrefix = publicAdvertisedPrefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PublicAdvertisedPrefixesDeleteCall) RequestId(requestId string) *PublicAdvertisedPrefixesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PublicAdvertisedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PublicAdvertisedPrefixesDeleteCall) Context(ctx context.Context) *PublicAdvertisedPrefixesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PublicAdvertisedPrefixesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicAdvertisedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "publicAdvertisedPrefix": c.publicAdvertisedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicAdvertisedPrefixes.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublicAdvertisedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified PublicAdvertisedPrefix (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.publicAdvertisedPrefixes.delete", + // "parameterOrder": [ + // "project", + // "publicAdvertisedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicAdvertisedPrefix": { + // "description": "Name of the PublicAdvertisedPrefix resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.publicAdvertisedPrefixes.get": + +type PublicAdvertisedPrefixesGetCall struct { + s *Service + project string + publicAdvertisedPrefix string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified PublicAdvertisedPrefix resource. (== +// suppress_warning http-rest-shadowed ==) +func (r *PublicAdvertisedPrefixesService) Get(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesGetCall { + c := &PublicAdvertisedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.publicAdvertisedPrefix = publicAdvertisedPrefix + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PublicAdvertisedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PublicAdvertisedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicAdvertisedPrefixesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PublicAdvertisedPrefixesGetCall) Context(ctx context.Context) *PublicAdvertisedPrefixesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PublicAdvertisedPrefixesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicAdvertisedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "publicAdvertisedPrefix": c.publicAdvertisedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicAdvertisedPrefixes.get" call. +// Exactly one of *PublicAdvertisedPrefix or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PublicAdvertisedPrefix.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PublicAdvertisedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicAdvertisedPrefix, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PublicAdvertisedPrefix{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified PublicAdvertisedPrefix resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.publicAdvertisedPrefixes.get", + // "parameterOrder": [ + // "project", + // "publicAdvertisedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicAdvertisedPrefix": { + // "description": "Name of the PublicAdvertisedPrefix resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", + // "response": { + // "$ref": "PublicAdvertisedPrefix" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.publicAdvertisedPrefixes.insert": + +type PublicAdvertisedPrefixesInsertCall struct { + s *Service + project string + publicadvertisedprefix *PublicAdvertisedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a PublicAdvertisedPrefix in the specified project +// using the parameters that are included in the request. (== +// suppress_warning http-rest-shadowed ==) +func (r *PublicAdvertisedPrefixesService) Insert(project string, publicadvertisedprefix *PublicAdvertisedPrefix) *PublicAdvertisedPrefixesInsertCall { + c := &PublicAdvertisedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.publicadvertisedprefix = publicadvertisedprefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PublicAdvertisedPrefixesInsertCall) RequestId(requestId string) *PublicAdvertisedPrefixesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PublicAdvertisedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PublicAdvertisedPrefixesInsertCall) Context(ctx context.Context) *PublicAdvertisedPrefixesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PublicAdvertisedPrefixesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicAdvertisedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicadvertisedprefix) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/publicAdvertisedPrefixes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicAdvertisedPrefixes.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublicAdvertisedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a PublicAdvertisedPrefix in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.publicAdvertisedPrefixes.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/publicAdvertisedPrefixes", + // "request": { + // "$ref": "PublicAdvertisedPrefix" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.publicAdvertisedPrefixes.list": + +type PublicAdvertisedPrefixesListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the PublicAdvertisedPrefixes for a project. (== +// suppress_warning http-rest-shadowed ==) +func (r *PublicAdvertisedPrefixesService) List(project string) *PublicAdvertisedPrefixesListCall { + c := &PublicAdvertisedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *PublicAdvertisedPrefixesListCall) Filter(filter string) *PublicAdvertisedPrefixesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *PublicAdvertisedPrefixesListCall) MaxResults(maxResults int64) *PublicAdvertisedPrefixesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *PublicAdvertisedPrefixesListCall) OrderBy(orderBy string) *PublicAdvertisedPrefixesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *PublicAdvertisedPrefixesListCall) PageToken(pageToken string) *PublicAdvertisedPrefixesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PublicAdvertisedPrefixesListCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PublicAdvertisedPrefixesListCall) IfNoneMatch(entityTag string) *PublicAdvertisedPrefixesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PublicAdvertisedPrefixesListCall) Context(ctx context.Context) *PublicAdvertisedPrefixesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PublicAdvertisedPrefixesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicAdvertisedPrefixesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/publicAdvertisedPrefixes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicAdvertisedPrefixes.list" call. +// Exactly one of *PublicAdvertisedPrefixList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *PublicAdvertisedPrefixList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PublicAdvertisedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicAdvertisedPrefixList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PublicAdvertisedPrefixList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the PublicAdvertisedPrefixes for a project. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.publicAdvertisedPrefixes.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/publicAdvertisedPrefixes", + // "response": { + // "$ref": "PublicAdvertisedPrefixList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PublicAdvertisedPrefixesListCall) Pages(ctx context.Context, f func(*PublicAdvertisedPrefixList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.publicAdvertisedPrefixes.patch": + +type PublicAdvertisedPrefixesPatchCall struct { + s *Service + project string + publicAdvertisedPrefix string + publicadvertisedprefix *PublicAdvertisedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified Router resource with the data included +// in the request. This method supports PATCH semantics and uses JSON +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) +func (r *PublicAdvertisedPrefixesService) Patch(project string, publicAdvertisedPrefix string, publicadvertisedprefix *PublicAdvertisedPrefix) *PublicAdvertisedPrefixesPatchCall { + c := &PublicAdvertisedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.publicAdvertisedPrefix = publicAdvertisedPrefix + c.publicadvertisedprefix = publicadvertisedprefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PublicAdvertisedPrefixesPatchCall) RequestId(requestId string) *PublicAdvertisedPrefixesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PublicAdvertisedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PublicAdvertisedPrefixesPatchCall) Context(ctx context.Context) *PublicAdvertisedPrefixesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PublicAdvertisedPrefixesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicAdvertisedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicadvertisedprefix) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "publicAdvertisedPrefix": c.publicAdvertisedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicAdvertisedPrefixes.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublicAdvertisedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PATCH", + // "id": "compute.publicAdvertisedPrefixes.patch", + // "parameterOrder": [ + // "project", + // "publicAdvertisedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicAdvertisedPrefix": { + // "description": "Name of the PublicAdvertisedPrefix resource to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", + // "request": { + // "$ref": "PublicAdvertisedPrefix" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.publicDelegatedPrefixes.aggregatedList": + +type PublicDelegatedPrefixesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Lists all PublicDelegatedPrefix resources owned by +// the specific project across all scopes. (== suppress_warning +// http-rest-shadowed ==) +func (r *PublicDelegatedPrefixesService) AggregatedList(project string) *PublicDelegatedPrefixesAggregatedListCall { + c := &PublicDelegatedPrefixesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *PublicDelegatedPrefixesAggregatedListCall) Filter(filter string) *PublicDelegatedPrefixesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *PublicDelegatedPrefixesAggregatedListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *PublicDelegatedPrefixesAggregatedListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *PublicDelegatedPrefixesAggregatedListCall) PageToken(pageToken string) *PublicDelegatedPrefixesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PublicDelegatedPrefixesAggregatedListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PublicDelegatedPrefixesAggregatedListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PublicDelegatedPrefixesAggregatedListCall) Context(ctx context.Context) *PublicDelegatedPrefixesAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PublicDelegatedPrefixesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicDelegatedPrefixesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/publicDelegatedPrefixes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicDelegatedPrefixes.aggregatedList" call. +// Exactly one of *PublicDelegatedPrefixAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *PublicDelegatedPrefixAggregatedList.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *PublicDelegatedPrefixesAggregatedListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PublicDelegatedPrefixAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all PublicDelegatedPrefix resources owned by the specific project across all scopes. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.publicDelegatedPrefixes.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/publicDelegatedPrefixes", + // "response": { + // "$ref": "PublicDelegatedPrefixAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PublicDelegatedPrefixesAggregatedListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.publicDelegatedPrefixes.delete": + +type PublicDelegatedPrefixesDeleteCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified PublicDelegatedPrefix in the given +// region. (== suppress_warning http-rest-shadowed ==) +func (r *PublicDelegatedPrefixesService) Delete(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesDeleteCall { + c := &PublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.publicDelegatedPrefix = publicDelegatedPrefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *PublicDelegatedPrefixesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *PublicDelegatedPrefixesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PublicDelegatedPrefixesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicDelegatedPrefixes.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified PublicDelegatedPrefix in the given region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.publicDelegatedPrefixes.delete", + // "parameterOrder": [ + // "project", + // "region", + // "publicDelegatedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicDelegatedPrefix": { + // "description": "Name of the PublicDelegatedPrefix resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region of this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.publicDelegatedPrefixes.get": + +type PublicDelegatedPrefixesGetCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified PublicDelegatedPrefix resource in the +// given region. (== suppress_warning http-rest-shadowed ==) +func (r *PublicDelegatedPrefixesService) Get(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesGetCall { + c := &PublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.publicDelegatedPrefix = publicDelegatedPrefix + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PublicDelegatedPrefixesGetCall) Context(ctx context.Context) *PublicDelegatedPrefixesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PublicDelegatedPrefixesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicDelegatedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicDelegatedPrefixes.get" call. +// Exactly one of *PublicDelegatedPrefix or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PublicDelegatedPrefix.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PublicDelegatedPrefix{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified PublicDelegatedPrefix resource in the given region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.publicDelegatedPrefixes.get", + // "parameterOrder": [ + // "project", + // "region", + // "publicDelegatedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicDelegatedPrefix": { + // "description": "Name of the PublicDelegatedPrefix resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region of this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "response": { + // "$ref": "PublicDelegatedPrefix" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.publicDelegatedPrefixes.insert": + +type PublicDelegatedPrefixesInsertCall struct { + s *Service + project string + region string + publicdelegatedprefix *PublicDelegatedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a PublicDelegatedPrefix in the specified project in +// the given region using the parameters that are included in the +// request. (== suppress_warning http-rest-shadowed ==) +func (r *PublicDelegatedPrefixesService) Insert(project string, region string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesInsertCall { + c := &PublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.publicdelegatedprefix = publicdelegatedprefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PublicDelegatedPrefixesInsertCall) RequestId(requestId string) *PublicDelegatedPrefixesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *PublicDelegatedPrefixesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PublicDelegatedPrefixesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/publicDelegatedPrefixes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicDelegatedPrefixes.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a PublicDelegatedPrefix in the specified project in the given region using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.publicDelegatedPrefixes.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region of this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/publicDelegatedPrefixes", + // "request": { + // "$ref": "PublicDelegatedPrefix" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.publicDelegatedPrefixes.list": + +type PublicDelegatedPrefixesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the PublicDelegatedPrefixes for a project in the given +// region. (== suppress_warning http-rest-shadowed ==) +func (r *PublicDelegatedPrefixesService) List(project string, region string) *PublicDelegatedPrefixesListCall { + c := &PublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *PublicDelegatedPrefixesListCall) Filter(filter string) *PublicDelegatedPrefixesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *PublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *PublicDelegatedPrefixesListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *PublicDelegatedPrefixesListCall) PageToken(pageToken string) *PublicDelegatedPrefixesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PublicDelegatedPrefixesListCall) Context(ctx context.Context) *PublicDelegatedPrefixesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PublicDelegatedPrefixesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/publicDelegatedPrefixes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicDelegatedPrefixes.list" call. +// Exactly one of *PublicDelegatedPrefixList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *PublicDelegatedPrefixList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PublicDelegatedPrefixList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the PublicDelegatedPrefixes for a project in the given region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.publicDelegatedPrefixes.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region of this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/publicDelegatedPrefixes", + // "response": { + // "$ref": "PublicDelegatedPrefixList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.publicDelegatedPrefixes.patch": + +type PublicDelegatedPrefixesPatchCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + publicdelegatedprefix *PublicDelegatedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified PublicDelegatedPrefix resource with the +// data included in the request. This method supports PATCH semantics +// and uses JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) +func (r *PublicDelegatedPrefixesService) Patch(project string, region string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesPatchCall { + c := &PublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.publicDelegatedPrefix = publicDelegatedPrefix + c.publicdelegatedprefix = publicdelegatedprefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PublicDelegatedPrefixesPatchCall) RequestId(requestId string) *PublicDelegatedPrefixesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *PublicDelegatedPrefixesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PublicDelegatedPrefixesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.publicDelegatedPrefixes.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patches the specified PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PATCH", + // "id": "compute.publicDelegatedPrefixes.patch", + // "parameterOrder": [ + // "project", + // "region", + // "publicDelegatedPrefix" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "publicDelegatedPrefix": { + // "description": "Name of the PublicDelegatedPrefix resource to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", + // "request": { + // "$ref": "PublicDelegatedPrefix" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionAutoscalers.delete": type RegionAutoscalersDeleteCall struct { @@ -108875,7 +117920,8 @@ type RegionAutoscalersDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified autoscaler. +// Delete: Deletes the specified autoscaler. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -108930,6 +117976,7 @@ func (c *RegionAutoscalersDeleteCall) Header() http.Header { func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108990,7 +118037,7 @@ func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified autoscaler.", + // "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionAutoscalers.delete", // "parameterOrder": [ @@ -109051,7 +118098,8 @@ type RegionAutoscalersGetCall struct { header_ http.Header } -// Get: Returns the specified autoscaler. +// Get: Returns the specified autoscaler. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -109097,6 +118145,7 @@ func (c *RegionAutoscalersGetCall) Header() http.Header { func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109160,7 +118209,7 @@ func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler } return ret, nil // { - // "description": "Returns the specified autoscaler.", + // "description": "Returns the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionAutoscalers.get", // "parameterOrder": [ @@ -109217,7 +118266,7 @@ type RegionAutoscalersInsertCall struct { } // Insert: Creates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -109272,6 +118321,7 @@ func (c *RegionAutoscalersInsertCall) Header() http.Header { func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109336,7 +118386,7 @@ func (c *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", + // "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionAutoscalers.insert", // "parameterOrder": [ @@ -109392,7 +118442,7 @@ type RegionAutoscalersListCall struct { } // List: Retrieves a list of autoscalers contained within the specified -// region. +// region. (== suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -109500,6 +118550,7 @@ func (c *RegionAutoscalersListCall) Header() http.Header { func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109562,7 +118613,7 @@ func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAut } return ret, nil // { - // "description": "Retrieves a list of autoscalers contained within the specified region.", + // "description": "Retrieves a list of autoscalers contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionAutoscalers.list", // "parameterOrder": [ @@ -109656,7 +118707,8 @@ type RegionAutoscalersPatchCall struct { // Patch: Updates an autoscaler in the specified project using the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -109718,6 +118770,7 @@ func (c *RegionAutoscalersPatchCall) Header() http.Header { func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109782,7 +118835,7 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionAutoscalers.patch", // "parameterOrder": [ @@ -109845,7 +118898,7 @@ type RegionAutoscalersTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionAutoscalersTestIamPermissionsCall { c := &RegionAutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -109882,6 +118935,7 @@ func (c *RegionAutoscalersTestIamPermissionsCall) Header() http.Header { func (c *RegionAutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109947,7 +119001,7 @@ func (c *RegionAutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionAutoscalers.testIamPermissions", // "parameterOrder": [ @@ -110007,7 +119061,7 @@ type RegionAutoscalersUpdateCall struct { } // Update: Updates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -110069,6 +119123,7 @@ func (c *RegionAutoscalersUpdateCall) Header() http.Header { func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110133,7 +119188,7 @@ func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionAutoscalers.update", // "parameterOrder": [ @@ -110194,7 +119249,8 @@ type RegionBackendServicesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified regional BackendService resource. +// Delete: Deletes the specified regional BackendService resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -110249,6 +119305,7 @@ func (c *RegionBackendServicesDeleteCall) Header() http.Header { func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110309,7 +119366,7 @@ func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified regional BackendService resource.", + // "description": "Deletes the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionBackendServices.delete", // "parameterOrder": [ @@ -110370,7 +119427,8 @@ type RegionBackendServicesGetCall struct { header_ http.Header } -// Get: Returns the specified regional BackendService resource. +// Get: Returns the specified regional BackendService resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -110416,6 +119474,7 @@ func (c *RegionBackendServicesGetCall) Header() http.Header { func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110479,7 +119538,7 @@ func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*Backen } return ret, nil // { - // "description": "Returns the specified regional BackendService resource.", + // "description": "Returns the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionBackendServices.get", // "parameterOrder": [ @@ -110537,7 +119596,7 @@ type RegionBackendServicesGetHealthCall struct { } // GetHealth: Gets the most recent health check results for this -// regional BackendService. +// regional BackendService. (== suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -110574,6 +119633,7 @@ func (c *RegionBackendServicesGetHealthCall) Header() http.Header { func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110639,7 +119699,7 @@ func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the most recent health check results for this regional BackendService.", + // "description": "Gets the most recent health check results for this regional BackendService. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionBackendServices.getHealth", // "parameterOrder": [ @@ -110701,7 +119761,7 @@ type RegionBackendServicesInsertCall struct { // project using the data included in the request. There are several // restrictions and guidelines to keep in mind when creating a regional // backend service. Read Restrictions and Guidelines for more -// information. +// information. (== suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -110756,6 +119816,7 @@ func (c *RegionBackendServicesInsertCall) Header() http.Header { func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110820,7 +119881,7 @@ func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", + // "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionBackendServices.insert", // "parameterOrder": [ @@ -110876,7 +119937,8 @@ type RegionBackendServicesListCall struct { } // List: Retrieves the list of regional BackendService resources -// available to the specified project in the given region. +// available to the specified project in the given region. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -110984,6 +120046,7 @@ func (c *RegionBackendServicesListCall) Header() http.Header { func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111046,7 +120109,7 @@ func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*Backe } return ret, nil // { - // "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", + // "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionBackendServices.list", // "parameterOrder": [ @@ -111144,7 +120207,7 @@ type RegionBackendServicesPatchCall struct { // guidelines to keep in mind when updating a backend service. Read // Restrictions and Guidelines for more information. This method // supports PATCH semantics and uses the JSON merge patch format and -// processing rules. +// processing rules. (== suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -111200,6 +120263,7 @@ func (c *RegionBackendServicesPatchCall) Header() http.Header { func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111265,7 +120329,7 @@ func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionBackendServices.patch", // "parameterOrder": [ @@ -111330,7 +120394,7 @@ type RegionBackendServicesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -111367,6 +120431,7 @@ func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111432,7 +120497,7 @@ func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionBackendServices.testIamPermissions", // "parameterOrder": [ @@ -111495,7 +120560,8 @@ type RegionBackendServicesUpdateCall struct { // Update: Updates the specified regional BackendService resource with // the data included in the request. There are several restrictions and // guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. +// Restrictions and Guidelines for more information. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -111551,6 +120617,7 @@ func (c *RegionBackendServicesUpdateCall) Header() http.Header { func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111616,7 +120683,7 @@ func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionBackendServices.update", // "parameterOrder": [ @@ -111678,7 +120745,8 @@ type RegionCommitmentsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of commitments. +// AggregatedList: Retrieves an aggregated list of commitments. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -111785,6 +120853,7 @@ func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111846,7 +120915,7 @@ func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves an aggregated list of commitments.", + // "description": "Retrieves an aggregated list of commitments. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionCommitments.aggregatedList", // "parameterOrder": [ @@ -111932,7 +121001,8 @@ type RegionCommitmentsGetCall struct { } // Get: Returns the specified commitment resource. Gets a list of -// available commitments by making a list() request. +// available commitments by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -111978,6 +121048,7 @@ func (c *RegionCommitmentsGetCall) Header() http.Header { func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112041,7 +121112,7 @@ func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment } return ret, nil // { - // "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request.", + // "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionCommitments.get", // "parameterOrder": [ @@ -112098,7 +121169,7 @@ type RegionCommitmentsInsertCall struct { } // Insert: Creates a commitment in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -112153,6 +121224,7 @@ func (c *RegionCommitmentsInsertCall) Header() http.Header { func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112217,7 +121289,7 @@ func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a commitment in the specified project using the data included in the request.", + // "description": "Creates a commitment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionCommitments.insert", // "parameterOrder": [ @@ -112273,7 +121345,7 @@ type RegionCommitmentsListCall struct { } // List: Retrieves a list of commitments contained within the specified -// region. +// region. (== suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -112381,6 +121453,7 @@ func (c *RegionCommitmentsListCall) Header() http.Header { func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112443,7 +121516,7 @@ func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*Commitmen } return ret, nil // { - // "description": "Retrieves a list of commitments contained within the specified region.", + // "description": "Retrieves a list of commitments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionCommitments.list", // "parameterOrder": [ @@ -112537,7 +121610,7 @@ type RegionCommitmentsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCommitmentsTestIamPermissionsCall { c := &RegionCommitmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -112574,6 +121647,7 @@ func (c *RegionCommitmentsTestIamPermissionsCall) Header() http.Header { func (c *RegionCommitmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112639,7 +121713,7 @@ func (c *RegionCommitmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionCommitments.testIamPermissions", // "parameterOrder": [ @@ -112700,7 +121774,8 @@ type RegionCommitmentsUpdateReservationsCall struct { } // UpdateReservations: Update the shape of reservations for GPUS/Local -// SSDs of reservations within the commitments. +// SSDs of reservations within the commitments. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionCommitmentsService) UpdateReservations(project string, region string, commitment string, regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest) *RegionCommitmentsUpdateReservationsCall { c := &RegionCommitmentsUpdateReservationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -112756,6 +121831,7 @@ func (c *RegionCommitmentsUpdateReservationsCall) Header() http.Header { func (c *RegionCommitmentsUpdateReservationsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112821,7 +121897,7 @@ func (c *RegionCommitmentsUpdateReservationsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Update the shape of reservations for GPUS/Local SSDs of reservations within the commitments.", + // "description": "Update the shape of reservations for GPUS/Local SSDs of reservations within the commitments. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionCommitments.updateReservations", // "parameterOrder": [ @@ -112831,7 +121907,7 @@ func (c *RegionCommitmentsUpdateReservationsCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "commitment": { - // "description": "Name of the commitment of which the reservation's capacities are being updated.", + // "description": "Name of the commitment for which the reservation is being updated.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -112886,7 +121962,8 @@ type RegionDiskTypesGetCall struct { } // Get: Returns the specified regional disk type. Gets a list of -// available disk types by making a list() request. +// available disk types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -112932,6 +122009,7 @@ func (c *RegionDiskTypesGetCall) Header() http.Header { func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112995,7 +122073,7 @@ func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, er } return ret, nil // { - // "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request.", + // "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDiskTypes.get", // "parameterOrder": [ @@ -113052,7 +122130,7 @@ type RegionDiskTypesListCall struct { } // List: Retrieves a list of regional disk types available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -113160,6 +122238,7 @@ func (c *RegionDiskTypesListCall) Header() http.Header { func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113222,7 +122301,7 @@ func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskT } return ret, nil // { - // "description": "Retrieves a list of regional disk types available to the specified project.", + // "description": "Retrieves a list of regional disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDiskTypes.list", // "parameterOrder": [ @@ -113317,7 +122396,8 @@ type RegionDisksAddResourcePoliciesCall struct { // AddResourcePolicies: Adds existing resource policies to a regional // disk. You can only add one policy which will be applied to this disk -// for scheduling snapshot creation. +// for scheduling snapshot creation. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDisksService) AddResourcePolicies(project string, region string, disk string, regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest) *RegionDisksAddResourcePoliciesCall { c := &RegionDisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -113373,6 +122453,7 @@ func (c *RegionDisksAddResourcePoliciesCall) Header() http.Header { func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113438,7 +122519,7 @@ func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", + // "description": "Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.addResourcePolicies", // "parameterOrder": [ @@ -113502,7 +122583,8 @@ type RegionDisksCreateSnapshotCall struct { header_ http.Header } -// CreateSnapshot: Creates a snapshot of this regional disk. +// CreateSnapshot: Creates a snapshot of this regional disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -113567,6 +122649,7 @@ func (c *RegionDisksCreateSnapshotCall) Header() http.Header { func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113632,7 +122715,7 @@ func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Creates a snapshot of this regional disk.", + // "description": "Creates a snapshot of this regional disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.createSnapshot", // "parameterOrder": [ @@ -113704,6 +122787,7 @@ type RegionDisksDeleteCall struct { // regional disk removes all the replicas of its data permanently and is // irreversible. However, deleting a disk does not delete any snapshots // previously made from the disk. You must separately delete snapshots. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -113758,6 +122842,7 @@ func (c *RegionDisksDeleteCall) Header() http.Header { func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113818,7 +122903,7 @@ func (c *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + // "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionDisks.delete", // "parameterOrder": [ @@ -113878,7 +122963,8 @@ type RegionDisksGetCall struct { header_ http.Header } -// Get: Returns a specified regional persistent disk. +// Get: Returns a specified regional persistent disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -113924,6 +123010,7 @@ func (c *RegionDisksGetCall) Header() http.Header { func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113987,7 +123074,7 @@ func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { } return ret, nil // { - // "description": "Returns a specified regional persistent disk.", + // "description": "Returns a specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDisks.get", // "parameterOrder": [ @@ -114045,7 +123132,8 @@ type RegionDisksGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDisksService) GetIamPolicy(project string, region string, resource string) *RegionDisksGetIamPolicyCall { c := &RegionDisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -114054,6 +123142,13 @@ func (r *RegionDisksService) GetIamPolicy(project string, region string, resourc return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *RegionDisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionDisksGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -114091,6 +123186,7 @@ func (c *RegionDisksGetIamPolicyCall) Header() http.Header { func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114154,7 +123250,7 @@ func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDisks.getIamPolicy", // "parameterOrder": [ @@ -114163,6 +123259,12 @@ func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -114211,7 +123313,8 @@ type RegionDisksInsertCall struct { } // Insert: Creates a persistent regional disk in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -114273,6 +123376,7 @@ func (c *RegionDisksInsertCall) Header() http.Header { func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114337,7 +123441,7 @@ func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates a persistent regional disk in the specified project using the data included in the request.", + // "description": "Creates a persistent regional disk in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.insert", // "parameterOrder": [ @@ -114398,7 +123502,7 @@ type RegionDisksListCall struct { } // List: Retrieves the list of persistent disks contained within the -// specified region. +// specified region. (== suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -114506,6 +123610,7 @@ func (c *RegionDisksListCall) Header() http.Header { func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114568,7 +123673,7 @@ func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error } return ret, nil // { - // "description": "Retrieves the list of persistent disks contained within the specified region.", + // "description": "Retrieves the list of persistent disks contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDisks.list", // "parameterOrder": [ @@ -114662,7 +123767,7 @@ type RegionDisksRemoveResourcePoliciesCall struct { } // RemoveResourcePolicies: Removes resource policies from a regional -// disk. +// disk. (== suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) RemoveResourcePolicies(project string, region string, disk string, regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest) *RegionDisksRemoveResourcePoliciesCall { c := &RegionDisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -114718,6 +123823,7 @@ func (c *RegionDisksRemoveResourcePoliciesCall) Header() http.Header { func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114783,7 +123889,7 @@ func (c *RegionDisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Removes resource policies from a regional disk.", + // "description": "Removes resource policies from a regional disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.removeResourcePolicies", // "parameterOrder": [ @@ -114847,7 +123953,8 @@ type RegionDisksResizeCall struct { header_ http.Header } -// Resize: Resizes the specified regional persistent disk. +// Resize: Resizes the specified regional persistent disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -114903,6 +124010,7 @@ func (c *RegionDisksResizeCall) Header() http.Header { func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114968,7 +124076,7 @@ func (c *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Resizes the specified regional persistent disk.", + // "description": "Resizes the specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.resize", // "parameterOrder": [ @@ -115033,7 +124141,8 @@ type RegionDisksSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDisksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionDisksSetIamPolicyCall { c := &RegionDisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -115070,6 +124179,7 @@ func (c *RegionDisksSetIamPolicyCall) Header() http.Header { func (c *RegionDisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115135,7 +124245,7 @@ func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.setIamPolicy", // "parameterOrder": [ @@ -115194,7 +124304,8 @@ type RegionDisksSetLabelsCall struct { header_ http.Header } -// SetLabels: Sets the labels on the target regional disk. +// SetLabels: Sets the labels on the target regional disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -115250,6 +124361,7 @@ func (c *RegionDisksSetLabelsCall) Header() http.Header { func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115315,7 +124427,7 @@ func (c *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Sets the labels on the target regional disk.", + // "description": "Sets the labels on the target regional disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.setLabels", // "parameterOrder": [ @@ -115380,7 +124492,7 @@ type RegionDisksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { c := &RegionDisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -115417,6 +124529,7 @@ func (c *RegionDisksTestIamPermissionsCall) Header() http.Header { func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115482,7 +124595,7 @@ func (c *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.testIamPermissions", // "parameterOrder": [ @@ -115541,7 +124654,8 @@ type RegionHealthCheckServicesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified regional HealthCheckService. +// Delete: Deletes the specified regional HealthCheckService. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionHealthCheckServicesService) Delete(project string, region string, healthCheckService string) *RegionHealthCheckServicesDeleteCall { c := &RegionHealthCheckServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -115596,6 +124710,7 @@ func (c *RegionHealthCheckServicesDeleteCall) Header() http.Header { func (c *RegionHealthCheckServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115656,7 +124771,7 @@ func (c *RegionHealthCheckServicesDeleteCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Deletes the specified regional HealthCheckService.", + // "description": "Deletes the specified regional HealthCheckService. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionHealthCheckServices.delete", // "parameterOrder": [ @@ -115716,7 +124831,8 @@ type RegionHealthCheckServicesGetCall struct { header_ http.Header } -// Get: Returns the specified regional HealthCheckService resource. +// Get: Returns the specified regional HealthCheckService resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionHealthCheckServicesService) Get(project string, region string, healthCheckService string) *RegionHealthCheckServicesGetCall { c := &RegionHealthCheckServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -115762,6 +124878,7 @@ func (c *RegionHealthCheckServicesGetCall) Header() http.Header { func (c *RegionHealthCheckServicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115825,7 +124942,7 @@ func (c *RegionHealthCheckServicesGetCall) Do(opts ...googleapi.CallOption) (*He } return ret, nil // { - // "description": "Returns the specified regional HealthCheckService resource.", + // "description": "Returns the specified regional HealthCheckService resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionHealthCheckServices.get", // "parameterOrder": [ @@ -115882,6 +124999,7 @@ type RegionHealthCheckServicesInsertCall struct { // Insert: Creates a regional HealthCheckService resource in the // specified project and region using the data included in the request. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionHealthCheckServicesService) Insert(project string, region string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesInsertCall { c := &RegionHealthCheckServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -115936,6 +125054,7 @@ func (c *RegionHealthCheckServicesInsertCall) Header() http.Header { func (c *RegionHealthCheckServicesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116000,7 +125119,7 @@ func (c *RegionHealthCheckServicesInsertCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Creates a regional HealthCheckService resource in the specified project and region using the data included in the request.", + // "description": "Creates a regional HealthCheckService resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionHealthCheckServices.insert", // "parameterOrder": [ @@ -116056,7 +125175,8 @@ type RegionHealthCheckServicesListCall struct { } // List: Lists all the HealthCheckService resources that have been -// configured for the specified project in the given region. +// configured for the specified project in the given region. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionHealthCheckServicesService) List(project string, region string) *RegionHealthCheckServicesListCall { c := &RegionHealthCheckServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -116164,6 +125284,7 @@ func (c *RegionHealthCheckServicesListCall) Header() http.Header { func (c *RegionHealthCheckServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116226,7 +125347,7 @@ func (c *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*H } return ret, nil // { - // "description": "Lists all the HealthCheckService resources that have been configured for the specified project in the given region.", + // "description": "Lists all the HealthCheckService resources that have been configured for the specified project in the given region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionHealthCheckServices.list", // "parameterOrder": [ @@ -116320,7 +125441,7 @@ type RegionHealthCheckServicesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionHealthCheckServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthCheckServicesTestIamPermissionsCall { c := &RegionHealthCheckServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -116357,6 +125478,7 @@ func (c *RegionHealthCheckServicesTestIamPermissionsCall) Header() http.Header { func (c *RegionHealthCheckServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116422,7 +125544,7 @@ func (c *RegionHealthCheckServicesTestIamPermissionsCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionHealthCheckServices.testIamPermissions", // "parameterOrder": [ @@ -116481,7 +125603,8 @@ type RegionHealthChecksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified HealthCheck resource. +// Delete: Deletes the specified HealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionHealthChecksService) Delete(project string, region string, healthCheck string) *RegionHealthChecksDeleteCall { c := &RegionHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -116536,6 +125659,7 @@ func (c *RegionHealthChecksDeleteCall) Header() http.Header { func (c *RegionHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116596,7 +125720,7 @@ func (c *RegionHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Deletes the specified HealthCheck resource.", + // "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionHealthChecks.delete", // "parameterOrder": [ @@ -116658,7 +125782,8 @@ type RegionHealthChecksGetCall struct { } // Get: Returns the specified HealthCheck resource. Gets a list of -// available health checks by making a list() request. +// available health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionHealthChecksService) Get(project string, region string, healthCheck string) *RegionHealthChecksGetCall { c := &RegionHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -116704,6 +125829,7 @@ func (c *RegionHealthChecksGetCall) Header() http.Header { func (c *RegionHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116767,7 +125893,7 @@ func (c *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthChe } return ret, nil // { - // "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", + // "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionHealthChecks.get", // "parameterOrder": [ @@ -116824,7 +125950,8 @@ type RegionHealthChecksInsertCall struct { } // Insert: Creates a HealthCheck resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionHealthChecksService) Insert(project string, region string, healthcheck *HealthCheck) *RegionHealthChecksInsertCall { c := &RegionHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -116879,6 +126006,7 @@ func (c *RegionHealthChecksInsertCall) Header() http.Header { func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116943,7 +126071,7 @@ func (c *RegionHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + // "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionHealthChecks.insert", // "parameterOrder": [ @@ -116999,7 +126127,7 @@ type RegionHealthChecksListCall struct { } // List: Retrieves the list of HealthCheck resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *RegionHealthChecksService) List(project string, region string) *RegionHealthChecksListCall { c := &RegionHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -117107,6 +126235,7 @@ func (c *RegionHealthChecksListCall) Header() http.Header { func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117169,7 +126298,7 @@ func (c *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCh } return ret, nil // { - // "description": "Retrieves the list of HealthCheck resources available to the specified project.", + // "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionHealthChecks.list", // "parameterOrder": [ @@ -117265,6 +126394,7 @@ type RegionHealthChecksPatchCall struct { // Patch: Updates a HealthCheck resource in the specified project using // the data included in the request. This method supports PATCH // semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionHealthChecksService) Patch(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksPatchCall { c := &RegionHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -117320,6 +126450,7 @@ func (c *RegionHealthChecksPatchCall) Header() http.Header { func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117385,7 +126516,7 @@ func (c *RegionHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionHealthChecks.patch", // "parameterOrder": [ @@ -117450,7 +126581,7 @@ type RegionHealthChecksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionHealthChecksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthChecksTestIamPermissionsCall { c := &RegionHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -117487,6 +126618,7 @@ func (c *RegionHealthChecksTestIamPermissionsCall) Header() http.Header { func (c *RegionHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117552,7 +126684,7 @@ func (c *RegionHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionHealthChecks.testIamPermissions", // "parameterOrder": [ @@ -117613,7 +126745,8 @@ type RegionHealthChecksUpdateCall struct { } // Update: Updates a HealthCheck resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionHealthChecksService) Update(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksUpdateCall { c := &RegionHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -117669,6 +126802,7 @@ func (c *RegionHealthChecksUpdateCall) Header() http.Header { func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117734,7 +126868,7 @@ func (c *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionHealthChecks.update", // "parameterOrder": [ @@ -117814,7 +126948,7 @@ type RegionInstanceGroupManagersAbandonInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest) *RegionInstanceGroupManagersAbandonInstancesCall { c := &RegionInstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -117870,6 +127004,7 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header { func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117935,7 +127070,7 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.abandonInstances", // "parameterOrder": [ @@ -117998,7 +127133,7 @@ type RegionInstanceGroupManagersApplyUpdatesToInstancesCall struct { } // ApplyUpdatesToInstances: Apply updates to selected instances the -// managed instance group. +// managed instance group. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) ApplyUpdatesToInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { c := &RegionInstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -118035,6 +127170,7 @@ func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.H func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118100,7 +127236,7 @@ func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...goog } return ret, nil // { - // "description": "Apply updates to selected instances the managed instance group.", + // "description": "Apply updates to selected instances the managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.applyUpdatesToInstances", // "parameterOrder": [ @@ -118162,7 +127298,8 @@ type RegionInstanceGroupManagersCreateInstancesCall struct { // current instance template. The create instances operation is marked // DONE if the createInstances request is successful. The underlying // actions take additional time. You must separately verify the status -// of the creating or actions with the listmanagedinstances method. +// of the creating or actions with the listmanagedinstances method. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) CreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagerscreateinstancesrequest *RegionInstanceGroupManagersCreateInstancesRequest) *RegionInstanceGroupManagersCreateInstancesCall { c := &RegionInstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -118217,6 +127354,7 @@ func (c *RegionInstanceGroupManagersCreateInstancesCall) Header() http.Header { func (c *RegionInstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118282,7 +127420,7 @@ func (c *RegionInstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.", + // "description": "Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.createInstances", // "parameterOrder": [ @@ -118344,7 +127482,7 @@ type RegionInstanceGroupManagersDeleteCall struct { } // Delete: Deletes the specified managed instance group and all of the -// instances in that group. +// instances in that group. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Delete(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersDeleteCall { c := &RegionInstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -118399,6 +127537,7 @@ func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header { func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118459,7 +127598,7 @@ func (c *RegionInstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes the specified managed instance group and all of the instances in that group.", + // "description": "Deletes the specified managed instance group and all of the instances in that group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionInstanceGroupManagers.delete", // "parameterOrder": [ @@ -118534,7 +127673,7 @@ type RegionInstanceGroupManagersDeleteInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest) *RegionInstanceGroupManagersDeleteInstancesCall { c := &RegionInstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -118590,6 +127729,7 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header { func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118655,7 +127795,7 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.deleteInstances", // "parameterOrder": [ @@ -118718,7 +127858,8 @@ type RegionInstanceGroupManagersDeletePerInstanceConfigsCall struct { } // DeletePerInstanceConfigs: Deletes selected per-instance configs for -// the managed instance group. +// the managed instance group. (== suppress_warning http-rest-shadowed +// ==) func (r *RegionInstanceGroupManagersService) DeletePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerdeleteinstanceconfigreq *RegionInstanceGroupManagerDeleteInstanceConfigReq) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { c := &RegionInstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -118755,6 +127896,7 @@ func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Header() http. func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118820,7 +127962,7 @@ func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...goo } return ret, nil // { - // "description": "Deletes selected per-instance configs for the managed instance group.", + // "description": "Deletes selected per-instance configs for the managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.deletePerInstanceConfigs", // "parameterOrder": [ @@ -118878,7 +128020,7 @@ type RegionInstanceGroupManagersGetCall struct { } // Get: Returns all of the details about the specified managed instance -// group. +// group. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Get(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersGetCall { c := &RegionInstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -118924,6 +128066,7 @@ func (c *RegionInstanceGroupManagersGetCall) Header() http.Header { func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118987,7 +128130,7 @@ func (c *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns all of the details about the specified managed instance group.", + // "description": "Returns all of the details about the specified managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroupManagers.get", // "parameterOrder": [ @@ -119050,6 +128193,7 @@ type RegionInstanceGroupManagersInsertCall struct { // listmanagedinstances method. // // A regional managed instance group can contain up to 2000 instances. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Insert(project string, region string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersInsertCall { c := &RegionInstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -119104,6 +128248,7 @@ func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header { func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119168,7 +128313,7 @@ func (c *RegionInstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", + // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.insert", // "parameterOrder": [ @@ -119223,7 +128368,8 @@ type RegionInstanceGroupManagersListCall struct { } // List: Retrieves the list of managed instance groups that are -// contained within the specified region. +// contained within the specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) List(project string, region string) *RegionInstanceGroupManagersListCall { c := &RegionInstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -119331,6 +128477,7 @@ func (c *RegionInstanceGroupManagersListCall) Header() http.Header { func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119393,7 +128540,7 @@ func (c *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves the list of managed instance groups that are contained within the specified region.", + // "description": "Retrieves the list of managed instance groups that are contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroupManagers.list", // "parameterOrder": [ @@ -119472,6 +128619,282 @@ func (c *RegionInstanceGroupManagersListCall) Pages(ctx context.Context, f func( } } +// method id "compute.regionInstanceGroupManagers.listErrors": + +type RegionInstanceGroupManagersListErrorsCall struct { + s *Service + project string + region string + instanceGroupManager string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListErrors: Lists all errors thrown by actions on instances for a +// given regional managed instance group. (== suppress_warning +// http-rest-shadowed ==) +func (r *RegionInstanceGroupManagersService) ListErrors(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListErrorsCall { + c := &RegionInstanceGroupManagersListErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *RegionInstanceGroupManagersListErrorsCall) Filter(filter string) *RegionInstanceGroupManagersListErrorsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *RegionInstanceGroupManagersListErrorsCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListErrorsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *RegionInstanceGroupManagersListErrorsCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListErrorsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *RegionInstanceGroupManagersListErrorsCall) PageToken(pageToken string) *RegionInstanceGroupManagersListErrorsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceGroupManagersListErrorsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListErrorsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionInstanceGroupManagersListErrorsCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListErrorsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionInstanceGroupManagersListErrorsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListErrorsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceGroupManagersListErrorsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.listErrors" call. +// Exactly one of *RegionInstanceGroupManagersListErrorsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *RegionInstanceGroupManagersListErrorsResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionInstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListErrorsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &RegionInstanceGroupManagersListErrorsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all errors thrown by actions on instances for a given regional managed instance group. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.regionInstanceGroupManagers.listErrors", + // "parameterOrder": [ + // "project", + // "region", + // "instanceGroupManager" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "instanceGroupManager": { + // "description": "The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request. This should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors", + // "response": { + // "$ref": "RegionInstanceGroupManagersListErrorsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionInstanceGroupManagersListErrorsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListErrorsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.regionInstanceGroupManagers.listManagedInstances": type RegionInstanceGroupManagersListManagedInstancesCall struct { @@ -119487,7 +128910,7 @@ type RegionInstanceGroupManagersListManagedInstancesCall struct { // ListManagedInstances: Lists the instances in the managed instance // group and instances that are scheduled to be created. The list // includes any current actions that the group has scheduled for its -// instances. +// instances. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall { c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -119586,6 +129009,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Head func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119648,7 +129072,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", + // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.listManagedInstances", // "parameterOrder": [ @@ -119747,7 +129171,8 @@ type RegionInstanceGroupManagersListPerInstanceConfigsCall struct { } // ListPerInstanceConfigs: Lists all of the per-instance configs defined -// for the managed instance group. +// for the managed instance group. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) ListPerInstanceConfigs(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { c := &RegionInstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -119846,6 +129271,7 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Header() http.He func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119908,7 +129334,7 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googl } return ret, nil // { - // "description": "Lists all of the per-instance configs defined for the managed instance group.", + // "description": "Lists all of the per-instance configs defined for the managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.listPerInstanceConfigs", // "parameterOrder": [ @@ -120013,7 +129439,7 @@ type RegionInstanceGroupManagersPatchCall struct { // process of being patched. You must separately verify the status of // the individual instances with the listmanagedinstances method. This // method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. +// and processing rules. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall { c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -120069,6 +129495,7 @@ func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120134,7 +129561,7 @@ func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionInstanceGroupManagers.patch", // "parameterOrder": [ @@ -120199,7 +129626,8 @@ type RegionInstanceGroupManagersPatchPerInstanceConfigsCall struct { // PatchPerInstanceConfigs: Insert or patch (for the ones that already // exist) per-instance configs for the managed instance group. // perInstanceConfig.instance serves as a key used to distinguish -// whether to perform insert or patch. +// whether to perform insert or patch. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) PatchPerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { c := &RegionInstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -120255,6 +129683,7 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.H func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120320,7 +129749,7 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...goog } return ret, nil // { - // "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", + // "description": "Insert or patch (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.patchPerInstanceConfigs", // "parameterOrder": [ @@ -120396,7 +129825,7 @@ type RegionInstanceGroupManagersRecreateInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -120452,6 +129881,7 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120517,7 +129947,7 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.recreateInstances", // "parameterOrder": [ @@ -120591,6 +130021,7 @@ type RegionInstanceGroupManagersResizeCall struct { // If the group is part of a backend service that has enabled connection // draining, it can take up to 60 seconds after the connection draining // duration has elapsed before the VM instance is removed or deleted. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -120646,6 +130077,7 @@ func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120706,7 +130138,7 @@ func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.resize", // "parameterOrder": [ @@ -120776,7 +130208,8 @@ type RegionInstanceGroupManagersSetAutoHealingPoliciesCall struct { // SetAutoHealingPolicies: Modifies the autohealing policy for the // instances in this managed instance group. [Deprecated] This method is -// deprecated. Please use Patch instead. +// deprecated. Please use Patch instead. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) SetAutoHealingPolicies(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { c := &RegionInstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -120832,6 +130265,7 @@ func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.He func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120897,7 +130331,7 @@ func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googl } return ret, nil // { - // "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.", + // "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", // "parameterOrder": [ @@ -120961,7 +130395,8 @@ type RegionInstanceGroupManagersSetInstanceTemplateCall struct { // SetInstanceTemplate: Sets the instance template to use when creating // new instances or recreating instances in this group. Existing -// instances are not affected. +// instances are not affected. (== suppress_warning http-rest-shadowed +// ==) func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -121017,6 +130452,7 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Heade func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121082,7 +130518,7 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", + // "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", // "parameterOrder": [ @@ -121146,7 +130582,7 @@ type RegionInstanceGroupManagersSetTargetPoolsCall struct { // SetTargetPools: Modifies the target pools to which all new instances // in this group are assigned. Existing instances in the group are not -// affected. +// affected. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -121202,6 +130638,7 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121267,7 +130704,7 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", + // "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.setTargetPools", // "parameterOrder": [ @@ -121330,7 +130767,7 @@ type RegionInstanceGroupManagersTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupManagersTestIamPermissionsCall { c := &RegionInstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -121367,6 +130804,7 @@ func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Header() http.Header func (c *RegionInstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121432,7 +130870,7 @@ func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.testIamPermissions", // "parameterOrder": [ @@ -121496,7 +130934,8 @@ type RegionInstanceGroupManagersUpdateCall struct { // you specify in the request. This operation is marked as DONE when the // group is updated even if the instances in the group have not yet been // updated. You must separately verify the status of the individual -// instances with the listmanagedinstances method. +// instances with the listmanagedinstances method. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Update(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersUpdateCall { c := &RegionInstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -121552,6 +130991,7 @@ func (c *RegionInstanceGroupManagersUpdateCall) Header() http.Header { func (c *RegionInstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121617,7 +131057,7 @@ func (c *RegionInstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionInstanceGroupManagers.update", // "parameterOrder": [ @@ -121682,7 +131122,8 @@ type RegionInstanceGroupManagersUpdatePerInstanceConfigsCall struct { // UpdatePerInstanceConfigs: Insert or update (for the ones that already // exist) per-instance configs for the managed instance group. // perInstanceConfig.instance serves as a key used to distinguish -// whether to perform insert or patch. +// whether to perform insert or patch. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) UpdatePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerupdateinstanceconfigreq *RegionInstanceGroupManagerUpdateInstanceConfigReq) *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall { c := &RegionInstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -121738,6 +131179,7 @@ func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http. func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121803,7 +131245,7 @@ func (c *RegionInstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...goo } return ret, nil // { - // "description": "Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch.", + // "description": "Insert or update (for the ones that already exist) per-instance configs for the managed instance group. perInstanceConfig.instance serves as a key used to distinguish whether to perform insert or patch. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.updatePerInstanceConfigs", // "parameterOrder": [ @@ -121865,7 +131307,8 @@ type RegionInstanceGroupsGetCall struct { header_ http.Header } -// Get: Returns the specified instance group resource. +// Get: Returns the specified instance group resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupsService) Get(project string, region string, instanceGroup string) *RegionInstanceGroupsGetCall { c := &RegionInstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -121911,6 +131354,7 @@ func (c *RegionInstanceGroupsGetCall) Header() http.Header { func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121974,7 +131418,7 @@ func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*Instanc } return ret, nil // { - // "description": "Returns the specified instance group resource.", + // "description": "Returns the specified instance group resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroups.get", // "parameterOrder": [ @@ -122029,7 +131473,7 @@ type RegionInstanceGroupsListCall struct { } // List: Retrieves the list of instance group resources contained within -// the specified region. +// the specified region. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupsService) List(project string, region string) *RegionInstanceGroupsListCall { c := &RegionInstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -122137,6 +131581,7 @@ func (c *RegionInstanceGroupsListCall) Header() http.Header { func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122199,7 +131644,7 @@ func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*Region } return ret, nil // { - // "description": "Retrieves the list of instance group resources contained within the specified region.", + // "description": "Retrieves the list of instance group resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroups.list", // "parameterOrder": [ @@ -122294,7 +131739,8 @@ type RegionInstanceGroupsListInstancesCall struct { // ListInstances: Lists the instances in the specified instance group // and displays information about the named ports. Depending on the // specified options, this method can list all instances or only the -// instances that are running. +// instances that are running. (== suppress_warning http-rest-shadowed +// ==) func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall { c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -122394,6 +131840,7 @@ func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header { func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122460,7 +131907,7 @@ func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", + // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroups.listInstances", // "parameterOrder": [ @@ -122563,7 +132010,7 @@ type RegionInstanceGroupsSetNamedPortsCall struct { } // SetNamedPorts: Sets the named ports for the specified regional -// instance group. +// instance group. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region string, instanceGroup string, regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest) *RegionInstanceGroupsSetNamedPortsCall { c := &RegionInstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -122619,6 +132066,7 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header { func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122684,7 +132132,7 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the named ports for the specified regional instance group.", + // "description": "Sets the named ports for the specified regional instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroups.setNamedPorts", // "parameterOrder": [ @@ -122747,7 +132195,7 @@ type RegionInstanceGroupsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupsTestIamPermissionsCall { c := &RegionInstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -122784,6 +132232,7 @@ func (c *RegionInstanceGroupsTestIamPermissionsCall) Header() http.Header { func (c *RegionInstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122849,7 +132298,7 @@ func (c *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroups.testIamPermissions", // "parameterOrder": [ @@ -122909,7 +132358,7 @@ type RegionNotificationEndpointsDeleteCall struct { } // Delete: Deletes the specified NotificationEndpoint in the given -// region +// region (== suppress_warning http-rest-shadowed ==) func (r *RegionNotificationEndpointsService) Delete(project string, region string, notificationEndpoint string) *RegionNotificationEndpointsDeleteCall { c := &RegionNotificationEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -122964,6 +132413,7 @@ func (c *RegionNotificationEndpointsDeleteCall) Header() http.Header { func (c *RegionNotificationEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123024,7 +132474,7 @@ func (c *RegionNotificationEndpointsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes the specified NotificationEndpoint in the given region", + // "description": "Deletes the specified NotificationEndpoint in the given region (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionNotificationEndpoints.delete", // "parameterOrder": [ @@ -123086,7 +132536,7 @@ type RegionNotificationEndpointsGetCall struct { } // Get: Returns the specified NotificationEndpoint resource in the given -// region. +// region. (== suppress_warning http-rest-shadowed ==) func (r *RegionNotificationEndpointsService) Get(project string, region string, notificationEndpoint string) *RegionNotificationEndpointsGetCall { c := &RegionNotificationEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -123132,6 +132582,7 @@ func (c *RegionNotificationEndpointsGetCall) Header() http.Header { func (c *RegionNotificationEndpointsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123195,7 +132646,7 @@ func (c *RegionNotificationEndpointsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns the specified NotificationEndpoint resource in the given region.", + // "description": "Returns the specified NotificationEndpoint resource in the given region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionNotificationEndpoints.get", // "parameterOrder": [ @@ -123253,6 +132704,7 @@ type RegionNotificationEndpointsInsertCall struct { // Insert: Create a NotificationEndpoint in the specified project in the // given region using the parameters that are included in the request. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionNotificationEndpointsService) Insert(project string, region string, notificationendpoint *NotificationEndpoint) *RegionNotificationEndpointsInsertCall { c := &RegionNotificationEndpointsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -123307,6 +132759,7 @@ func (c *RegionNotificationEndpointsInsertCall) Header() http.Header { func (c *RegionNotificationEndpointsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123371,7 +132824,7 @@ func (c *RegionNotificationEndpointsInsertCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request.", + // "description": "Create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionNotificationEndpoints.insert", // "parameterOrder": [ @@ -123427,7 +132880,7 @@ type RegionNotificationEndpointsListCall struct { } // List: Lists the NotificationEndpoints for a project in the given -// region. +// region. (== suppress_warning http-rest-shadowed ==) func (r *RegionNotificationEndpointsService) List(project string, region string) *RegionNotificationEndpointsListCall { c := &RegionNotificationEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -123535,6 +132988,7 @@ func (c *RegionNotificationEndpointsListCall) Header() http.Header { func (c *RegionNotificationEndpointsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123597,7 +133051,7 @@ func (c *RegionNotificationEndpointsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists the NotificationEndpoints for a project in the given region.", + // "description": "Lists the NotificationEndpoints for a project in the given region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionNotificationEndpoints.list", // "parameterOrder": [ @@ -123691,7 +133145,7 @@ type RegionNotificationEndpointsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionNotificationEndpointsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionNotificationEndpointsTestIamPermissionsCall { c := &RegionNotificationEndpointsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -123728,6 +133182,7 @@ func (c *RegionNotificationEndpointsTestIamPermissionsCall) Header() http.Header func (c *RegionNotificationEndpointsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123793,7 +133248,7 @@ func (c *RegionNotificationEndpointsTestIamPermissionsCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionNotificationEndpoints.testIamPermissions", // "parameterOrder": [ @@ -123853,6 +133308,7 @@ type RegionOperationsDeleteCall struct { } // Delete: Deletes the specified region-specific Operations resource. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/delete func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall { c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -123889,6 +133345,7 @@ func (c *RegionOperationsDeleteCall) Header() http.Header { func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123924,7 +133381,7 @@ func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deletes the specified region-specific Operations resource.", + // "description": "Deletes the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionOperations.delete", // "parameterOrder": [ @@ -123977,7 +133434,8 @@ type RegionOperationsGetCall struct { header_ http.Header } -// Get: Retrieves the specified region-specific Operations resource. +// Get: Retrieves the specified region-specific Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/get func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall { c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -124024,6 +133482,7 @@ func (c *RegionOperationsGetCall) Header() http.Header { func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124087,7 +133546,7 @@ func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Retrieves the specified region-specific Operations resource.", + // "description": "Retrieves the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionOperations.get", // "parameterOrder": [ @@ -124144,7 +133603,7 @@ type RegionOperationsListCall struct { } // List: Retrieves a list of Operation resources contained within the -// specified region. +// specified region. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/list func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall { c := &RegionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -124253,6 +133712,7 @@ func (c *RegionOperationsListCall) Header() http.Header { func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124315,7 +133775,7 @@ func (c *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified region.", + // "description": "Retrieves a list of Operation resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionOperations.list", // "parameterOrder": [ @@ -124416,7 +133876,7 @@ type RegionOperationsWaitCall struct { // can wait less than the default deadline or zero seconds, in overload // situations. b. There is no guarantee that the operation is actually // done when returns. 4. User should be prepared to retry if the -// operation is not DONE. +// operation is not DONE. (== suppress_warning http-rest-shadowed ==) func (r *RegionOperationsService) Wait(project string, region string, operation string) *RegionOperationsWaitCall { c := &RegionOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -124452,6 +133912,7 @@ func (c *RegionOperationsWaitCall) Header() http.Header { func (c *RegionOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124512,7 +133973,7 @@ func (c *RegionOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Waits for the specified region-specific Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE.", + // "description": "Waits for the specified region-specific Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionOperations.wait", // "parameterOrder": [ @@ -124569,6 +134030,7 @@ type RegionSslCertificatesDeleteCall struct { } // Delete: Deletes the specified SslCertificate resource in the region. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionSslCertificatesService) Delete(project string, region string, sslCertificate string) *RegionSslCertificatesDeleteCall { c := &RegionSslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -124623,6 +134085,7 @@ func (c *RegionSslCertificatesDeleteCall) Header() http.Header { func (c *RegionSslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124683,7 +134146,7 @@ func (c *RegionSslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified SslCertificate resource in the region.", + // "description": "Deletes the specified SslCertificate resource in the region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionSslCertificates.delete", // "parameterOrder": [ @@ -124746,7 +134209,7 @@ type RegionSslCertificatesGetCall struct { // Get: Returns the specified SslCertificate resource in the specified // region. Get a list of available SSL certificates by making a list() -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *RegionSslCertificatesService) Get(project string, region string, sslCertificate string) *RegionSslCertificatesGetCall { c := &RegionSslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -124792,6 +134255,7 @@ func (c *RegionSslCertificatesGetCall) Header() http.Header { func (c *RegionSslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124855,7 +134319,7 @@ func (c *RegionSslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCer } return ret, nil // { - // "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.", + // "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionSslCertificates.get", // "parameterOrder": [ @@ -124912,7 +134376,8 @@ type RegionSslCertificatesInsertCall struct { } // Insert: Creates a SslCertificate resource in the specified project -// and region using the data included in the request +// and region using the data included in the request (== +// suppress_warning http-rest-shadowed ==) func (r *RegionSslCertificatesService) Insert(project string, region string, sslcertificate *SslCertificate) *RegionSslCertificatesInsertCall { c := &RegionSslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -124967,6 +134432,7 @@ func (c *RegionSslCertificatesInsertCall) Header() http.Header { func (c *RegionSslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125031,7 +134497,7 @@ func (c *RegionSslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request", + // "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionSslCertificates.insert", // "parameterOrder": [ @@ -125087,7 +134553,8 @@ type RegionSslCertificatesListCall struct { } // List: Retrieves the list of SslCertificate resources available to the -// specified project in the specified region. +// specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionSslCertificatesService) List(project string, region string) *RegionSslCertificatesListCall { c := &RegionSslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -125195,6 +134662,7 @@ func (c *RegionSslCertificatesListCall) Header() http.Header { func (c *RegionSslCertificatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125257,7 +134725,7 @@ func (c *RegionSslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCe } return ret, nil // { - // "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region.", + // "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionSslCertificates.list", // "parameterOrder": [ @@ -125351,7 +134819,8 @@ type RegionSslCertificatesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource and region. +// specified resource and region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionSslCertificatesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionSslCertificatesTestIamPermissionsCall { c := &RegionSslCertificatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -125388,6 +134857,7 @@ func (c *RegionSslCertificatesTestIamPermissionsCall) Header() http.Header { func (c *RegionSslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125453,7 +134923,7 @@ func (c *RegionSslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource and region.", + // "description": "Returns permissions that a caller has on the specified resource and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionSslCertificates.testIamPermissions", // "parameterOrder": [ @@ -125512,7 +134982,8 @@ type RegionTargetHttpProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetHttpProxy resource. +// Delete: Deletes the specified TargetHttpProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpProxiesService) Delete(project string, region string, targetHttpProxy string) *RegionTargetHttpProxiesDeleteCall { c := &RegionTargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -125567,6 +135038,7 @@ func (c *RegionTargetHttpProxiesDeleteCall) Header() http.Header { func (c *RegionTargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125627,7 +135099,7 @@ func (c *RegionTargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Deletes the specified TargetHttpProxy resource.", + // "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionTargetHttpProxies.delete", // "parameterOrder": [ @@ -125690,7 +135162,7 @@ type RegionTargetHttpProxiesGetCall struct { // Get: Returns the specified TargetHttpProxy resource in the specified // region. Gets a list of available target HTTP proxies by making a -// list() request. +// list() request. (== suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpProxiesService) Get(project string, region string, targetHttpProxy string) *RegionTargetHttpProxiesGetCall { c := &RegionTargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -125736,6 +135208,7 @@ func (c *RegionTargetHttpProxiesGetCall) Header() http.Header { func (c *RegionTargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125799,7 +135272,7 @@ func (c *RegionTargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*Targ } return ret, nil // { - // "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + // "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionTargetHttpProxies.get", // "parameterOrder": [ @@ -125856,7 +135329,8 @@ type RegionTargetHttpProxiesInsertCall struct { } // Insert: Creates a TargetHttpProxy resource in the specified project -// and region using the data included in the request. +// and region using the data included in the request. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpProxiesService) Insert(project string, region string, targethttpproxy *TargetHttpProxy) *RegionTargetHttpProxiesInsertCall { c := &RegionTargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -125911,6 +135385,7 @@ func (c *RegionTargetHttpProxiesInsertCall) Header() http.Header { func (c *RegionTargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125975,7 +135450,7 @@ func (c *RegionTargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request.", + // "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpProxies.insert", // "parameterOrder": [ @@ -126031,7 +135506,8 @@ type RegionTargetHttpProxiesListCall struct { } // List: Retrieves the list of TargetHttpProxy resources available to -// the specified project in the specified region. +// the specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionTargetHttpProxiesService) List(project string, region string) *RegionTargetHttpProxiesListCall { c := &RegionTargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -126139,6 +135615,7 @@ func (c *RegionTargetHttpProxiesListCall) Header() http.Header { func (c *RegionTargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126201,7 +135678,7 @@ func (c *RegionTargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*Tar } return ret, nil // { - // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.", + // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionTargetHttpProxies.list", // "parameterOrder": [ @@ -126294,7 +135771,8 @@ type RegionTargetHttpProxiesSetUrlMapCall struct { header_ http.Header } -// SetUrlMap: Changes the URL map for TargetHttpProxy. +// SetUrlMap: Changes the URL map for TargetHttpProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpProxiesService) SetUrlMap(project string, region string, targetHttpProxy string, urlmapreference *UrlMapReference) *RegionTargetHttpProxiesSetUrlMapCall { c := &RegionTargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -126350,6 +135828,7 @@ func (c *RegionTargetHttpProxiesSetUrlMapCall) Header() http.Header { func (c *RegionTargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126415,7 +135894,7 @@ func (c *RegionTargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the URL map for TargetHttpProxy.", + // "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpProxies.setUrlMap", // "parameterOrder": [ @@ -126480,7 +135959,7 @@ type RegionTargetHttpProxiesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpProxiesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionTargetHttpProxiesTestIamPermissionsCall { c := &RegionTargetHttpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -126517,6 +135996,7 @@ func (c *RegionTargetHttpProxiesTestIamPermissionsCall) Header() http.Header { func (c *RegionTargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126582,7 +136062,7 @@ func (c *RegionTargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpProxies.testIamPermissions", // "parameterOrder": [ @@ -126641,7 +136121,8 @@ type RegionTargetHttpsProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetHttpsProxy resource. +// Delete: Deletes the specified TargetHttpsProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) Delete(project string, region string, targetHttpsProxy string) *RegionTargetHttpsProxiesDeleteCall { c := &RegionTargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -126696,6 +136177,7 @@ func (c *RegionTargetHttpsProxiesDeleteCall) Header() http.Header { func (c *RegionTargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126756,7 +136238,7 @@ func (c *RegionTargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Deletes the specified TargetHttpsProxy resource.", + // "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionTargetHttpsProxies.delete", // "parameterOrder": [ @@ -126819,7 +136301,7 @@ type RegionTargetHttpsProxiesGetCall struct { // Get: Returns the specified TargetHttpsProxy resource in the specified // region. Gets a list of available target HTTP proxies by making a -// list() request. +// list() request. (== suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) Get(project string, region string, targetHttpsProxy string) *RegionTargetHttpsProxiesGetCall { c := &RegionTargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -126865,6 +136347,7 @@ func (c *RegionTargetHttpsProxiesGetCall) Header() http.Header { func (c *RegionTargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126928,7 +136411,7 @@ func (c *RegionTargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*Tar } return ret, nil // { - // "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + // "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionTargetHttpsProxies.get", // "parameterOrder": [ @@ -126985,7 +136468,8 @@ type RegionTargetHttpsProxiesInsertCall struct { } // Insert: Creates a TargetHttpsProxy resource in the specified project -// and region using the data included in the request. +// and region using the data included in the request. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) Insert(project string, region string, targethttpsproxy *TargetHttpsProxy) *RegionTargetHttpsProxiesInsertCall { c := &RegionTargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -127040,6 +136524,7 @@ func (c *RegionTargetHttpsProxiesInsertCall) Header() http.Header { func (c *RegionTargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127104,7 +136589,7 @@ func (c *RegionTargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.", + // "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpsProxies.insert", // "parameterOrder": [ @@ -127160,7 +136645,8 @@ type RegionTargetHttpsProxiesListCall struct { } // List: Retrieves the list of TargetHttpsProxy resources available to -// the specified project in the specified region. +// the specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) List(project string, region string) *RegionTargetHttpsProxiesListCall { c := &RegionTargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -127268,6 +136754,7 @@ func (c *RegionTargetHttpsProxiesListCall) Header() http.Header { func (c *RegionTargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127330,7 +136817,7 @@ func (c *RegionTargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*Ta } return ret, nil // { - // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.", + // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionTargetHttpsProxies.list", // "parameterOrder": [ @@ -127424,6 +136911,7 @@ type RegionTargetHttpsProxiesSetSslCertificatesCall struct { } // SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) SetSslCertificates(project string, region string, targetHttpsProxy string, regiontargethttpsproxiessetsslcertificatesrequest *RegionTargetHttpsProxiesSetSslCertificatesRequest) *RegionTargetHttpsProxiesSetSslCertificatesCall { c := &RegionTargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -127479,6 +136967,7 @@ func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127544,7 +137033,7 @@ func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Replaces SslCertificates for TargetHttpsProxy.", + // "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpsProxies.setSslCertificates", // "parameterOrder": [ @@ -127608,7 +137097,8 @@ type RegionTargetHttpsProxiesSetUrlMapCall struct { header_ http.Header } -// SetUrlMap: Changes the URL map for TargetHttpsProxy. +// SetUrlMap: Changes the URL map for TargetHttpsProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) SetUrlMap(project string, region string, targetHttpsProxy string, urlmapreference *UrlMapReference) *RegionTargetHttpsProxiesSetUrlMapCall { c := &RegionTargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -127664,6 +137154,7 @@ func (c *RegionTargetHttpsProxiesSetUrlMapCall) Header() http.Header { func (c *RegionTargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127729,7 +137220,7 @@ func (c *RegionTargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the URL map for TargetHttpsProxy.", + // "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpsProxies.setUrlMap", // "parameterOrder": [ @@ -127794,7 +137285,7 @@ type RegionTargetHttpsProxiesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionTargetHttpsProxiesTestIamPermissionsCall { c := &RegionTargetHttpsProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -127831,6 +137322,7 @@ func (c *RegionTargetHttpsProxiesTestIamPermissionsCall) Header() http.Header { func (c *RegionTargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127896,7 +137388,7 @@ func (c *RegionTargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpsProxies.testIamPermissions", // "parameterOrder": [ @@ -127955,7 +137447,8 @@ type RegionUrlMapsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified UrlMap resource. +// Delete: Deletes the specified UrlMap resource. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionUrlMapsService) Delete(project string, region string, urlMap string) *RegionUrlMapsDeleteCall { c := &RegionUrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -127998,6 +137491,7 @@ func (c *RegionUrlMapsDeleteCall) Header() http.Header { func (c *RegionUrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128058,7 +137552,7 @@ func (c *RegionUrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified UrlMap resource.", + // "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionUrlMaps.delete", // "parameterOrder": [ @@ -128120,7 +137614,8 @@ type RegionUrlMapsGetCall struct { } // Get: Returns the specified UrlMap resource. Gets a list of available -// URL maps by making a list() request. +// URL maps by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionUrlMapsService) Get(project string, region string, urlMap string) *RegionUrlMapsGetCall { c := &RegionUrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -128166,6 +137661,7 @@ func (c *RegionUrlMapsGetCall) Header() http.Header { func (c *RegionUrlMapsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128229,7 +137725,7 @@ func (c *RegionUrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) } return ret, nil // { - // "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.", + // "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionUrlMaps.get", // "parameterOrder": [ @@ -128286,7 +137782,8 @@ type RegionUrlMapsInsertCall struct { } // Insert: Creates a UrlMap resource in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) func (r *RegionUrlMapsService) Insert(project string, region string, urlmap *UrlMap) *RegionUrlMapsInsertCall { c := &RegionUrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -128329,6 +137826,7 @@ func (c *RegionUrlMapsInsertCall) Header() http.Header { func (c *RegionUrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128393,7 +137891,7 @@ func (c *RegionUrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + // "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionUrlMaps.insert", // "parameterOrder": [ @@ -128450,7 +137948,8 @@ type RegionUrlMapsInvalidateCacheCall struct { } // InvalidateCache: Initiates a cache invalidation operation, -// invalidating the specified path, scoped to the specified UrlMap. +// invalidating the specified path, scoped to the specified UrlMap. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionUrlMapsService) InvalidateCache(project string, region string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *RegionUrlMapsInvalidateCacheCall { c := &RegionUrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -128494,6 +137993,7 @@ func (c *RegionUrlMapsInvalidateCacheCall) Header() http.Header { func (c *RegionUrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128559,7 +138059,7 @@ func (c *RegionUrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", + // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionUrlMaps.invalidateCache", // "parameterOrder": [ @@ -128623,7 +138123,8 @@ type RegionUrlMapsListCall struct { } // List: Retrieves the list of UrlMap resources available to the -// specified project in the specified region. +// specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionUrlMapsService) List(project string, region string) *RegionUrlMapsListCall { c := &RegionUrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -128731,6 +138232,7 @@ func (c *RegionUrlMapsListCall) Header() http.Header { func (c *RegionUrlMapsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128793,7 +138295,7 @@ func (c *RegionUrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, e } return ret, nil // { - // "description": "Retrieves the list of UrlMap resources available to the specified project in the specified region.", + // "description": "Retrieves the list of UrlMap resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionUrlMaps.list", // "parameterOrder": [ @@ -128888,7 +138390,8 @@ type RegionUrlMapsPatchCall struct { // Patch: Patches the specified UrlMap resource with the data included // in the request. This method supports PATCH semantics and uses JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionUrlMapsService) Patch(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsPatchCall { c := &RegionUrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -128932,6 +138435,7 @@ func (c *RegionUrlMapsPatchCall) Header() http.Header { func (c *RegionUrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128997,7 +138501,7 @@ func (c *RegionUrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionUrlMaps.patch", // "parameterOrder": [ @@ -129062,7 +138566,7 @@ type RegionUrlMapsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionUrlMapsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionUrlMapsTestIamPermissionsCall { c := &RegionUrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -129099,6 +138603,7 @@ func (c *RegionUrlMapsTestIamPermissionsCall) Header() http.Header { func (c *RegionUrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129164,7 +138669,7 @@ func (c *RegionUrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionUrlMaps.testIamPermissions", // "parameterOrder": [ @@ -129225,7 +138730,7 @@ type RegionUrlMapsUpdateCall struct { } // Update: Updates the specified UrlMap resource with the data included -// in the request. +// in the request. (== suppress_warning http-rest-shadowed ==) func (r *RegionUrlMapsService) Update(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsUpdateCall { c := &RegionUrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -129269,6 +138774,7 @@ func (c *RegionUrlMapsUpdateCall) Header() http.Header { func (c *RegionUrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129334,7 +138840,7 @@ func (c *RegionUrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified UrlMap resource with the data included in the request.", + // "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionUrlMaps.update", // "parameterOrder": [ @@ -129400,7 +138906,7 @@ type RegionUrlMapsValidateCall struct { // Validate: Runs static validation for the UrlMap. In particular, the // tests of the provided UrlMap will be run. Calling this method does -// NOT create the UrlMap. +// NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==) func (r *RegionUrlMapsService) Validate(project string, region string, urlMap string, regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest) *RegionUrlMapsValidateCall { c := &RegionUrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -129437,6 +138943,7 @@ func (c *RegionUrlMapsValidateCall) Header() http.Header { func (c *RegionUrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129502,7 +139009,7 @@ func (c *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsVa } return ret, nil // { - // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionUrlMaps.validate", // "parameterOrder": [ @@ -129561,7 +139068,8 @@ type RegionsGetCall struct { } // Get: Returns the specified Region resource. Gets a list of available -// regions by making a list() request. +// regions by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regions/get func (r *RegionsService) Get(project string, region string) *RegionsGetCall { c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -129607,6 +139115,7 @@ func (c *RegionsGetCall) Header() http.Header { func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129669,7 +139178,7 @@ func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { } return ret, nil // { - // "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request.", + // "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regions.get", // "parameterOrder": [ @@ -129717,7 +139226,7 @@ type RegionsListCall struct { } // List: Retrieves the list of region resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regions/list func (r *RegionsService) List(project string) *RegionsListCall { c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -129825,6 +139334,7 @@ func (c *RegionsListCall) Header() http.Header { func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129886,7 +139396,7 @@ func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) } return ret, nil // { - // "description": "Retrieves the list of region resources available to the specified project.", + // "description": "Retrieves the list of region resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regions.list", // "parameterOrder": [ @@ -129969,7 +139479,8 @@ type ReservationsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of reservations. +// AggregatedList: Retrieves an aggregated list of reservations. (== +// suppress_warning http-rest-shadowed ==) func (r *ReservationsService) AggregatedList(project string) *ReservationsAggregatedListCall { c := &ReservationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -130076,6 +139587,7 @@ func (c *ReservationsAggregatedListCall) Header() http.Header { func (c *ReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130137,7 +139649,7 @@ func (c *ReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Rese } return ret, nil // { - // "description": "Retrieves an aggregated list of reservations.", + // "description": "Retrieves an aggregated list of reservations. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.reservations.aggregatedList", // "parameterOrder": [ @@ -130221,7 +139733,8 @@ type ReservationsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified reservation. +// Delete: Deletes the specified reservation. (== suppress_warning +// http-rest-shadowed ==) func (r *ReservationsService) Delete(project string, zone string, reservation string) *ReservationsDeleteCall { c := &ReservationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -130276,6 +139789,7 @@ func (c *ReservationsDeleteCall) Header() http.Header { func (c *ReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130336,7 +139850,7 @@ func (c *ReservationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Deletes the specified reservation.", + // "description": "Deletes the specified reservation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.reservations.delete", // "parameterOrder": [ @@ -130397,7 +139911,8 @@ type ReservationsGetCall struct { header_ http.Header } -// Get: Retrieves all information of the specified reservation. +// Get: Retrieves information about the specified reservation. (== +// suppress_warning http-rest-shadowed ==) func (r *ReservationsService) Get(project string, zone string, reservation string) *ReservationsGetCall { c := &ReservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -130443,6 +139958,7 @@ func (c *ReservationsGetCall) Header() http.Header { func (c *ReservationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130506,7 +140022,7 @@ func (c *ReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, er } return ret, nil // { - // "description": "Retrieves all information of the specified reservation.", + // "description": "Retrieves information about the specified reservation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.reservations.get", // "parameterOrder": [ @@ -130564,7 +140080,8 @@ type ReservationsGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *ReservationsService) GetIamPolicy(project string, zone string, resource string) *ReservationsGetIamPolicyCall { c := &ReservationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -130573,6 +140090,13 @@ func (r *ReservationsService) GetIamPolicy(project string, zone string, resource return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *ReservationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -130610,6 +140134,7 @@ func (c *ReservationsGetIamPolicyCall) Header() http.Header { func (c *ReservationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130673,7 +140198,7 @@ func (c *ReservationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.reservations.getIamPolicy", // "parameterOrder": [ @@ -130682,6 +140207,12 @@ func (c *ReservationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -130729,7 +140260,9 @@ type ReservationsInsertCall struct { header_ http.Header } -// Insert: Creates a new reservation. +// Insert: Creates a new reservation. For more information, read +// Reserving zonal resources. (== suppress_warning http-rest-shadowed +// ==) func (r *ReservationsService) Insert(project string, zone string, reservation *Reservation) *ReservationsInsertCall { c := &ReservationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -130784,6 +140317,7 @@ func (c *ReservationsInsertCall) Header() http.Header { func (c *ReservationsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130848,7 +140382,7 @@ func (c *ReservationsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Creates a new reservation.", + // "description": "Creates a new reservation. For more information, read Reserving zonal resources. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.reservations.insert", // "parameterOrder": [ @@ -130903,8 +140437,9 @@ type ReservationsListCall struct { header_ http.Header } -// List: A list all the reservations that have been configured for the -// specified project in specified zone. +// List: A list of all the reservations that have been configured for +// the specified project in specified zone. (== suppress_warning +// http-rest-shadowed ==) func (r *ReservationsService) List(project string, zone string) *ReservationsListCall { c := &ReservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131012,6 +140547,7 @@ func (c *ReservationsListCall) Header() http.Header { func (c *ReservationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131074,7 +140610,7 @@ func (c *ReservationsListCall) Do(opts ...googleapi.CallOption) (*ReservationLis } return ret, nil // { - // "description": "A list all the reservations that have been configured for the specified project in specified zone.", + // "description": "A list of all the reservations that have been configured for the specified project in specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.reservations.list", // "parameterOrder": [ @@ -131168,7 +140704,8 @@ type ReservationsResizeCall struct { } // Resize: Resizes the reservation (applicable to standalone -// reservations only) +// reservations only). For more information, read Modifying +// reservations. (== suppress_warning http-rest-shadowed ==) func (r *ReservationsService) Resize(project string, zone string, reservation string, reservationsresizerequest *ReservationsResizeRequest) *ReservationsResizeCall { c := &ReservationsResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131224,6 +140761,7 @@ func (c *ReservationsResizeCall) Header() http.Header { func (c *ReservationsResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131289,7 +140827,7 @@ func (c *ReservationsResizeCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Resizes the reservation (applicable to standalone reservations only)", + // "description": "Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.reservations.resize", // "parameterOrder": [ @@ -131354,7 +140892,8 @@ type ReservationsSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *ReservationsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *ReservationsSetIamPolicyCall { c := &ReservationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131391,6 +140930,7 @@ func (c *ReservationsSetIamPolicyCall) Header() http.Header { func (c *ReservationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131456,7 +140996,7 @@ func (c *ReservationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.reservations.setIamPolicy", // "parameterOrder": [ @@ -131516,7 +141056,7 @@ type ReservationsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *ReservationsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationsTestIamPermissionsCall { c := &ReservationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131553,6 +141093,7 @@ func (c *ReservationsTestIamPermissionsCall) Header() http.Header { func (c *ReservationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131618,7 +141159,7 @@ func (c *ReservationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.reservations.testIamPermissions", // "parameterOrder": [ @@ -131677,6 +141218,7 @@ type ResourcePoliciesAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of resource policies. +// (== suppress_warning http-rest-shadowed ==) func (r *ResourcePoliciesService) AggregatedList(project string) *ResourcePoliciesAggregatedListCall { c := &ResourcePoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131783,6 +141325,7 @@ func (c *ResourcePoliciesAggregatedListCall) Header() http.Header { func (c *ResourcePoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131844,7 +141387,7 @@ func (c *ResourcePoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Retrieves an aggregated list of resource policies.", + // "description": "Retrieves an aggregated list of resource policies. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.resourcePolicies.aggregatedList", // "parameterOrder": [ @@ -131928,7 +141471,8 @@ type ResourcePoliciesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified resource policy. +// Delete: Deletes the specified resource policy. (== suppress_warning +// http-rest-shadowed ==) func (r *ResourcePoliciesService) Delete(project string, region string, resourcePolicy string) *ResourcePoliciesDeleteCall { c := &ResourcePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131983,6 +141527,7 @@ func (c *ResourcePoliciesDeleteCall) Header() http.Header { func (c *ResourcePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132043,7 +141588,7 @@ func (c *ResourcePoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified resource policy.", + // "description": "Deletes the specified resource policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.resourcePolicies.delete", // "parameterOrder": [ @@ -132104,7 +141649,8 @@ type ResourcePoliciesGetCall struct { header_ http.Header } -// Get: Retrieves all information of the specified resource policy. +// Get: Retrieves all information of the specified resource policy. (== +// suppress_warning http-rest-shadowed ==) func (r *ResourcePoliciesService) Get(project string, region string, resourcePolicy string) *ResourcePoliciesGetCall { c := &ResourcePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -132150,6 +141696,7 @@ func (c *ResourcePoliciesGetCall) Header() http.Header { func (c *ResourcePoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132213,7 +141760,7 @@ func (c *ResourcePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResourcePol } return ret, nil // { - // "description": "Retrieves all information of the specified resource policy.", + // "description": "Retrieves all information of the specified resource policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.resourcePolicies.get", // "parameterOrder": [ @@ -132271,7 +141818,8 @@ type ResourcePoliciesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *ResourcePoliciesService) GetIamPolicy(project string, region string, resource string) *ResourcePoliciesGetIamPolicyCall { c := &ResourcePoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -132280,6 +141828,13 @@ func (r *ResourcePoliciesService) GetIamPolicy(project string, region string, re return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *ResourcePoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ResourcePoliciesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -132317,6 +141872,7 @@ func (c *ResourcePoliciesGetIamPolicyCall) Header() http.Header { func (c *ResourcePoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132380,7 +141936,7 @@ func (c *ResourcePoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.resourcePolicies.getIamPolicy", // "parameterOrder": [ @@ -132389,6 +141945,12 @@ func (c *ResourcePoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -132436,7 +141998,8 @@ type ResourcePoliciesInsertCall struct { header_ http.Header } -// Insert: Creates a new resource policy. +// Insert: Creates a new resource policy. (== suppress_warning +// http-rest-shadowed ==) func (r *ResourcePoliciesService) Insert(project string, region string, resourcepolicy *ResourcePolicy) *ResourcePoliciesInsertCall { c := &ResourcePoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -132491,6 +142054,7 @@ func (c *ResourcePoliciesInsertCall) Header() http.Header { func (c *ResourcePoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132555,7 +142119,7 @@ func (c *ResourcePoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a new resource policy.", + // "description": "Creates a new resource policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.resourcePolicies.insert", // "parameterOrder": [ @@ -132611,7 +142175,8 @@ type ResourcePoliciesListCall struct { } // List: A list all the resource policies that have been configured for -// the specified project in specified region. +// the specified project in specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *ResourcePoliciesService) List(project string, region string) *ResourcePoliciesListCall { c := &ResourcePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -132719,6 +142284,7 @@ func (c *ResourcePoliciesListCall) Header() http.Header { func (c *ResourcePoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132781,7 +142347,7 @@ func (c *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePo } return ret, nil // { - // "description": "A list all the resource policies that have been configured for the specified project in specified region.", + // "description": "A list all the resource policies that have been configured for the specified project in specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.resourcePolicies.list", // "parameterOrder": [ @@ -132875,7 +142441,8 @@ type ResourcePoliciesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *ResourcePoliciesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *ResourcePoliciesSetIamPolicyCall { c := &ResourcePoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -132912,6 +142479,7 @@ func (c *ResourcePoliciesSetIamPolicyCall) Header() http.Header { func (c *ResourcePoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132977,7 +142545,7 @@ func (c *ResourcePoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.resourcePolicies.setIamPolicy", // "parameterOrder": [ @@ -133037,7 +142605,7 @@ type ResourcePoliciesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *ResourcePoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ResourcePoliciesTestIamPermissionsCall { c := &ResourcePoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -133074,6 +142642,7 @@ func (c *ResourcePoliciesTestIamPermissionsCall) Header() http.Header { func (c *ResourcePoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133139,7 +142708,7 @@ func (c *ResourcePoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.resourcePolicies.testIamPermissions", // "parameterOrder": [ @@ -133197,7 +142766,8 @@ type RoutersAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of routers. +// AggregatedList: Retrieves an aggregated list of routers. (== +// suppress_warning http-rest-shadowed ==) func (r *RoutersService) AggregatedList(project string) *RoutersAggregatedListCall { c := &RoutersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -133304,6 +142874,7 @@ func (c *RoutersAggregatedListCall) Header() http.Header { func (c *RoutersAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133365,7 +142936,7 @@ func (c *RoutersAggregatedListCall) Do(opts ...googleapi.CallOption) (*RouterAgg } return ret, nil // { - // "description": "Retrieves an aggregated list of routers.", + // "description": "Retrieves an aggregated list of routers. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.aggregatedList", // "parameterOrder": [ @@ -133449,7 +143020,8 @@ type RoutersDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified Router resource. +// Delete: Deletes the specified Router resource. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Delete(project string, region string, router string) *RoutersDeleteCall { c := &RoutersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -133504,6 +143076,7 @@ func (c *RoutersDeleteCall) Header() http.Header { func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133564,7 +143137,7 @@ func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified Router resource.", + // "description": "Deletes the specified Router resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.routers.delete", // "parameterOrder": [ @@ -133626,7 +143199,8 @@ type RoutersGetCall struct { } // Get: Returns the specified Router resource. Gets a list of available -// routers by making a list() request. +// routers by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Get(project string, region string, router string) *RoutersGetCall { c := &RoutersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -133672,6 +143246,7 @@ func (c *RoutersGetCall) Header() http.Header { func (c *RoutersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133735,7 +143310,7 @@ func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) { } return ret, nil // { - // "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request.", + // "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.get", // "parameterOrder": [ @@ -133793,7 +143368,7 @@ type RoutersGetNatMappingInfoCall struct { } // GetNatMappingInfo: Retrieves runtime Nat mapping information of VM -// endpoints. +// endpoints. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) GetNatMappingInfo(project string, region string, router string) *RoutersGetNatMappingInfoCall { c := &RoutersGetNatMappingInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -133911,6 +143486,7 @@ func (c *RoutersGetNatMappingInfoCall) Header() http.Header { func (c *RoutersGetNatMappingInfoCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133974,7 +143550,7 @@ func (c *RoutersGetNatMappingInfoCall) Do(opts ...googleapi.CallOption) (*VmEndp } return ret, nil // { - // "description": "Retrieves runtime Nat mapping information of VM endpoints.", + // "description": "Retrieves runtime Nat mapping information of VM endpoints. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.getNatMappingInfo", // "parameterOrder": [ @@ -134081,7 +143657,7 @@ type RoutersGetRouterStatusCall struct { } // GetRouterStatus: Retrieves runtime information of the specified -// router. +// router. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) GetRouterStatus(project string, region string, router string) *RoutersGetRouterStatusCall { c := &RoutersGetRouterStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -134127,6 +143703,7 @@ func (c *RoutersGetRouterStatusCall) Header() http.Header { func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134190,7 +143767,7 @@ func (c *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterSt } return ret, nil // { - // "description": "Retrieves runtime information of the specified router.", + // "description": "Retrieves runtime information of the specified router. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.getRouterStatus", // "parameterOrder": [ @@ -134247,7 +143824,8 @@ type RoutersInsertCall struct { } // Insert: Creates a Router resource in the specified project and region -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Insert(project string, region string, router *Router) *RoutersInsertCall { c := &RoutersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -134302,6 +143880,7 @@ func (c *RoutersInsertCall) Header() http.Header { func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134366,7 +143945,7 @@ func (c *RoutersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates a Router resource in the specified project and region using the data included in the request.", + // "description": "Creates a Router resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routers.insert", // "parameterOrder": [ @@ -134422,7 +144001,7 @@ type RoutersListCall struct { } // List: Retrieves a list of Router resources available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) List(project string, region string) *RoutersListCall { c := &RoutersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -134530,6 +144109,7 @@ func (c *RoutersListCall) Header() http.Header { func (c *RoutersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134592,7 +144172,7 @@ func (c *RoutersListCall) Do(opts ...googleapi.CallOption) (*RouterList, error) } return ret, nil // { - // "description": "Retrieves a list of Router resources available to the specified project.", + // "description": "Retrieves a list of Router resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.list", // "parameterOrder": [ @@ -134687,7 +144267,8 @@ type RoutersPatchCall struct { // Patch: Patches the specified Router resource with the data included // in the request. This method supports PATCH semantics and uses JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall { c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -134743,6 +144324,7 @@ func (c *RoutersPatchCall) Header() http.Header { func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134808,7 +144390,7 @@ func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + // "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.routers.patch", // "parameterOrder": [ @@ -134874,7 +144456,7 @@ type RoutersPreviewCall struct { // Preview: Preview fields auto-generated during router create and // update operations. Calling this method does NOT create or update the -// router. +// router. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) Preview(project string, region string, router string, router2 *Router) *RoutersPreviewCall { c := &RoutersPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -134911,6 +144493,7 @@ func (c *RoutersPreviewCall) Header() http.Header { func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134976,7 +144559,7 @@ func (c *RoutersPreviewCall) Do(opts ...googleapi.CallOption) (*RoutersPreviewRe } return ret, nil // { - // "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", + // "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routers.preview", // "parameterOrder": [ @@ -135037,7 +144620,7 @@ type RoutersTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutersTestIamPermissionsCall { c := &RoutersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -135074,6 +144657,7 @@ func (c *RoutersTestIamPermissionsCall) Header() http.Header { func (c *RoutersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135139,7 +144723,7 @@ func (c *RoutersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestP } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routers.testIamPermissions", // "parameterOrder": [ @@ -135200,7 +144784,10 @@ type RoutersUpdateCall struct { } // Update: Updates the specified Router resource with the data included -// in the request. +// in the request. This method conforms to PUT semantics, which requests +// that the state of the target resource be created or replaced with the +// state defined by the representation enclosed in the request message +// payload. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) Update(project string, region string, router string, router2 *Router) *RoutersUpdateCall { c := &RoutersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -135256,6 +144843,7 @@ func (c *RoutersUpdateCall) Header() http.Header { func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135321,7 +144909,7 @@ func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Updates the specified Router resource with the data included in the request.", + // "description": "Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.routers.update", // "parameterOrder": [ @@ -135383,7 +144971,8 @@ type RoutesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified Route resource. +// Delete: Deletes the specified Route resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/delete func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -135438,6 +145027,7 @@ func (c *RoutesDeleteCall) Header() http.Header { func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135497,7 +145087,7 @@ func (c *RoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified Route resource.", + // "description": "Deletes the specified Route resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.routes.delete", // "parameterOrder": [ @@ -135550,7 +145140,8 @@ type RoutesGetCall struct { } // Get: Returns the specified Route resource. Gets a list of available -// routes by making a list() request. +// routes by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/get func (r *RoutesService) Get(project string, route string) *RoutesGetCall { c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -135596,6 +145187,7 @@ func (c *RoutesGetCall) Header() http.Header { func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135658,7 +145250,7 @@ func (c *RoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) { } return ret, nil // { - // "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request.", + // "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routes.get", // "parameterOrder": [ @@ -135706,7 +145298,8 @@ type RoutesInsertCall struct { } // Insert: Creates a Route resource in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/insert func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { c := &RoutesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -135761,6 +145354,7 @@ func (c *RoutesInsertCall) Header() http.Header { func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135824,7 +145418,7 @@ func (c *RoutesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates a Route resource in the specified project using the data included in the request.", + // "description": "Creates a Route resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routes.insert", // "parameterOrder": [ @@ -135871,7 +145465,7 @@ type RoutesListCall struct { } // List: Retrieves the list of Route resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/list func (r *RoutesService) List(project string) *RoutesListCall { c := &RoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -135979,6 +145573,7 @@ func (c *RoutesListCall) Header() http.Header { func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136040,7 +145635,7 @@ func (c *RoutesListCall) Do(opts ...googleapi.CallOption) (*RouteList, error) { } return ret, nil // { - // "description": "Retrieves the list of Route resources available to the specified project.", + // "description": "Retrieves the list of Route resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routes.list", // "parameterOrder": [ @@ -136125,7 +145720,7 @@ type RoutesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RoutesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutesTestIamPermissionsCall { c := &RoutesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -136161,6 +145756,7 @@ func (c *RoutesTestIamPermissionsCall) Header() http.Header { func (c *RoutesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136225,7 +145821,7 @@ func (c *RoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routes.testIamPermissions", // "parameterOrder": [ @@ -136276,7 +145872,8 @@ type SecurityPoliciesAddRuleCall struct { header_ http.Header } -// AddRule: Inserts a rule into a security policy. +// AddRule: Inserts a rule into a security policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SecurityPoliciesService) AddRule(project string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *SecurityPoliciesAddRuleCall { c := &SecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -136319,6 +145916,7 @@ func (c *SecurityPoliciesAddRuleCall) Header() http.Header { func (c *SecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136383,7 +145981,7 @@ func (c *SecurityPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Inserts a rule into a security policy.", + // "description": "Inserts a rule into a security policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.addRule", // "parameterOrder": [ @@ -136437,7 +146035,8 @@ type SecurityPoliciesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified policy. +// Delete: Deletes the specified policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SecurityPoliciesService) Delete(project string, securityPolicy string) *SecurityPoliciesDeleteCall { c := &SecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -136491,6 +146090,7 @@ func (c *SecurityPoliciesDeleteCall) Header() http.Header { func (c *SecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136550,7 +146150,7 @@ func (c *SecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified policy.", + // "description": "Deletes the specified policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.securityPolicies.delete", // "parameterOrder": [ @@ -136603,7 +146203,7 @@ type SecurityPoliciesGetCall struct { } // Get: List all of the ordered rules present in a single specified -// policy. +// policy. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) Get(project string, securityPolicy string) *SecurityPoliciesGetCall { c := &SecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -136648,6 +146248,7 @@ func (c *SecurityPoliciesGetCall) Header() http.Header { func (c *SecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136710,7 +146311,7 @@ func (c *SecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPol } return ret, nil // { - // "description": "List all of the ordered rules present in a single specified policy.", + // "description": "List all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.securityPolicies.get", // "parameterOrder": [ @@ -136758,7 +146359,8 @@ type SecurityPoliciesGetRuleCall struct { header_ http.Header } -// GetRule: Gets a rule at the specified priority. +// GetRule: Gets a rule at the specified priority. (== suppress_warning +// http-rest-shadowed ==) func (r *SecurityPoliciesService) GetRule(project string, securityPolicy string) *SecurityPoliciesGetRuleCall { c := &SecurityPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -136810,6 +146412,7 @@ func (c *SecurityPoliciesGetRuleCall) Header() http.Header { func (c *SecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136872,7 +146475,7 @@ func (c *SecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*Securit } return ret, nil // { - // "description": "Gets a rule at the specified priority.", + // "description": "Gets a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.securityPolicies.getRule", // "parameterOrder": [ @@ -136926,7 +146529,7 @@ type SecurityPoliciesInsertCall struct { } // Insert: Creates a new policy in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) Insert(project string, securitypolicy *SecurityPolicy) *SecurityPoliciesInsertCall { c := &SecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -136987,6 +146590,7 @@ func (c *SecurityPoliciesInsertCall) Header() http.Header { func (c *SecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137050,7 +146654,7 @@ func (c *SecurityPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a new policy in the specified project using the data included in the request.", + // "description": "Creates a new policy in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.insert", // "parameterOrder": [ @@ -137102,7 +146706,7 @@ type SecurityPoliciesListCall struct { } // List: List all the policies that have been configured for the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) List(project string) *SecurityPoliciesListCall { c := &SecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -137209,6 +146813,7 @@ func (c *SecurityPoliciesListCall) Header() http.Header { func (c *SecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137270,7 +146875,7 @@ func (c *SecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPo } return ret, nil // { - // "description": "List all the policies that have been configured for the specified project.", + // "description": "List all the policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.securityPolicies.list", // "parameterOrder": [ @@ -137354,7 +146959,8 @@ type SecurityPoliciesListPreconfiguredExpressionSetsCall struct { } // ListPreconfiguredExpressionSets: Gets the current list of -// preconfigured Web Application Firewall (WAF) expressions. +// preconfigured Web Application Firewall (WAF) expressions. (== +// suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) ListPreconfiguredExpressionSets(project string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { c := &SecurityPoliciesListPreconfiguredExpressionSetsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -137461,6 +147067,7 @@ func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Header() http.Head func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137525,7 +147132,7 @@ func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Do(opts ...googlea } return ret, nil // { - // "description": "Gets the current list of preconfigured Web Application Firewall (WAF) expressions.", + // "description": "Gets the current list of preconfigured Web Application Firewall (WAF) expressions. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.securityPolicies.listPreconfiguredExpressionSets", // "parameterOrder": [ @@ -137588,7 +147195,7 @@ type SecurityPoliciesPatchCall struct { } // Patch: Patches the specified policy with the data included in the -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) Patch(project string, securityPolicy string, securitypolicy *SecurityPolicy) *SecurityPoliciesPatchCall { c := &SecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -137643,6 +147250,7 @@ func (c *SecurityPoliciesPatchCall) Header() http.Header { func (c *SecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137707,7 +147315,7 @@ func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request.", + // "description": "Patches the specified policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.securityPolicies.patch", // "parameterOrder": [ @@ -137762,7 +147370,8 @@ type SecurityPoliciesPatchRuleCall struct { header_ http.Header } -// PatchRule: Patches a rule at the specified priority. +// PatchRule: Patches a rule at the specified priority. (== +// suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) PatchRule(project string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *SecurityPoliciesPatchRuleCall { c := &SecurityPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -137812,6 +147421,7 @@ func (c *SecurityPoliciesPatchRuleCall) Header() http.Header { func (c *SecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137876,7 +147486,7 @@ func (c *SecurityPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Patches a rule at the specified priority.", + // "description": "Patches a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.patchRule", // "parameterOrder": [ @@ -137936,7 +147546,8 @@ type SecurityPoliciesRemoveRuleCall struct { header_ http.Header } -// RemoveRule: Deletes a rule at the specified priority. +// RemoveRule: Deletes a rule at the specified priority. (== +// suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) RemoveRule(project string, securityPolicy string) *SecurityPoliciesRemoveRuleCall { c := &SecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -137978,6 +147589,7 @@ func (c *SecurityPoliciesRemoveRuleCall) Header() http.Header { func (c *SecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138037,7 +147649,7 @@ func (c *SecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Deletes a rule at the specified priority.", + // "description": "Deletes a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.removeRule", // "parameterOrder": [ @@ -138091,7 +147703,8 @@ type SecurityPoliciesSetLabelsCall struct { } // SetLabels: Sets the labels on a security policy. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SecurityPoliciesSetLabelsCall { c := &SecurityPoliciesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -138127,6 +147740,7 @@ func (c *SecurityPoliciesSetLabelsCall) Header() http.Header { func (c *SecurityPoliciesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138191,7 +147805,7 @@ func (c *SecurityPoliciesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.setLabels", // "parameterOrder": [ @@ -138242,7 +147856,7 @@ type SecurityPoliciesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SecurityPoliciesTestIamPermissionsCall { c := &SecurityPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -138278,6 +147892,7 @@ func (c *SecurityPoliciesTestIamPermissionsCall) Header() http.Header { func (c *SecurityPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138342,7 +147957,7 @@ func (c *SecurityPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.testIamPermissions", // "parameterOrder": [ @@ -138398,7 +148013,8 @@ type SnapshotsDeleteCall struct { // deletion is needed for subsequent snapshots, the data will be moved // to the next corresponding snapshot. // -// For more information, see Deleting snapshots. +// For more information, see Deleting snapshots. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall { c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -138453,6 +148069,7 @@ func (c *SnapshotsDeleteCall) Header() http.Header { func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138512,7 +148129,7 @@ func (c *SnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.", + // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.snapshots.delete", // "parameterOrder": [ @@ -138565,7 +148182,8 @@ type SnapshotsGetCall struct { } // Get: Returns the specified Snapshot resource. Gets a list of -// available snapshots by making a list() request. +// available snapshots by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/get func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall { c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -138611,6 +148229,7 @@ func (c *SnapshotsGetCall) Header() http.Header { func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138673,7 +148292,7 @@ func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { } return ret, nil // { - // "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.", + // "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.snapshots.get", // "parameterOrder": [ @@ -138722,7 +148341,8 @@ type SnapshotsGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *SnapshotsService) GetIamPolicy(project string, resource string) *SnapshotsGetIamPolicyCall { c := &SnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -138730,6 +148350,13 @@ func (r *SnapshotsService) GetIamPolicy(project string, resource string) *Snapsh return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *SnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *SnapshotsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -138767,6 +148394,7 @@ func (c *SnapshotsGetIamPolicyCall) Header() http.Header { func (c *SnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138829,7 +148457,7 @@ func (c *SnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.snapshots.getIamPolicy", // "parameterOrder": [ @@ -138837,6 +148465,12 @@ func (c *SnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -138877,7 +148511,7 @@ type SnapshotsListCall struct { } // List: Retrieves the list of Snapshot resources contained within the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/list func (r *SnapshotsService) List(project string) *SnapshotsListCall { c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -138985,6 +148619,7 @@ func (c *SnapshotsListCall) Header() http.Header { func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139046,7 +148681,7 @@ func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, err } return ret, nil // { - // "description": "Retrieves the list of Snapshot resources contained within the specified project.", + // "description": "Retrieves the list of Snapshot resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.snapshots.list", // "parameterOrder": [ @@ -139131,7 +148766,8 @@ type SnapshotsSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SnapshotsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *SnapshotsSetIamPolicyCall { c := &SnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -139167,6 +148803,7 @@ func (c *SnapshotsSetIamPolicyCall) Header() http.Header { func (c *SnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139231,7 +148868,7 @@ func (c *SnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.snapshots.setIamPolicy", // "parameterOrder": [ @@ -139282,7 +148919,8 @@ type SnapshotsSetLabelsCall struct { } // SetLabels: Sets the labels on a snapshot. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *SnapshotsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SnapshotsSetLabelsCall { c := &SnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -139318,6 +148956,7 @@ func (c *SnapshotsSetLabelsCall) Header() http.Header { func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139382,7 +149021,7 @@ func (c *SnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.snapshots.setLabels", // "parameterOrder": [ @@ -139433,7 +149072,7 @@ type SnapshotsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SnapshotsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SnapshotsTestIamPermissionsCall { c := &SnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -139469,6 +149108,7 @@ func (c *SnapshotsTestIamPermissionsCall) Header() http.Header { func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139533,7 +149173,7 @@ func (c *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.snapshots.testIamPermissions", // "parameterOrder": [ @@ -139584,7 +149224,8 @@ type SslCertificatesAggregatedListCall struct { } // AggregatedList: Retrieves the list of all SslCertificate resources, -// regional and global, available to the specified project. +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) AggregatedList(project string) *SslCertificatesAggregatedListCall { c := &SslCertificatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -139691,6 +149332,7 @@ func (c *SslCertificatesAggregatedListCall) Header() http.Header { func (c *SslCertificatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139752,7 +149394,7 @@ func (c *SslCertificatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*S } return ret, nil // { - // "description": "Retrieves the list of all SslCertificate resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all SslCertificate resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslCertificates.aggregatedList", // "parameterOrder": [ @@ -139835,7 +149477,8 @@ type SslCertificatesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified SslCertificate resource. +// Delete: Deletes the specified SslCertificate resource. (== +// suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) Delete(project string, sslCertificate string) *SslCertificatesDeleteCall { c := &SslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -139889,6 +149532,7 @@ func (c *SslCertificatesDeleteCall) Header() http.Header { func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139948,7 +149592,7 @@ func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified SslCertificate resource.", + // "description": "Deletes the specified SslCertificate resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.sslCertificates.delete", // "parameterOrder": [ @@ -140001,7 +149645,8 @@ type SslCertificatesGetCall struct { } // Get: Returns the specified SslCertificate resource. Gets a list of -// available SSL certificates by making a list() request. +// available SSL certificates by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall { c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -140046,6 +149691,7 @@ func (c *SslCertificatesGetCall) Header() http.Header { func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -140108,7 +149754,7 @@ func (c *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertifica } return ret, nil // { - // "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request.", + // "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslCertificates.get", // "parameterOrder": [ @@ -140156,7 +149802,8 @@ type SslCertificatesInsertCall struct { } // Insert: Creates a SslCertificate resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCertificate) *SslCertificatesInsertCall { c := &SslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -140210,6 +149857,7 @@ func (c *SslCertificatesInsertCall) Header() http.Header { func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -140273,7 +149921,7 @@ func (c *SslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", + // "description": "Creates a SslCertificate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.sslCertificates.insert", // "parameterOrder": [ @@ -140320,7 +149968,7 @@ type SslCertificatesListCall struct { } // List: Retrieves the list of SslCertificate resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) List(project string) *SslCertificatesListCall { c := &SslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -140427,6 +150075,7 @@ func (c *SslCertificatesListCall) Header() http.Header { func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -140488,7 +150137,7 @@ func (c *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertific } return ret, nil // { - // "description": "Retrieves the list of SslCertificate resources available to the specified project.", + // "description": "Retrieves the list of SslCertificate resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslCertificates.list", // "parameterOrder": [ @@ -140573,7 +150222,7 @@ type SslCertificatesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslCertificatesTestIamPermissionsCall { c := &SslCertificatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -140609,6 +150258,7 @@ func (c *SslCertificatesTestIamPermissionsCall) Header() http.Header { func (c *SslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -140673,7 +150323,7 @@ func (c *SslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.sslCertificates.testIamPermissions", // "parameterOrder": [ @@ -140725,7 +150375,7 @@ type SslPoliciesDeleteCall struct { // Delete: Deletes the specified SSL policy. The SSL policy resource can // be deleted only if it is not in use by any TargetHttpsProxy or -// TargetSslProxy resources. +// TargetSslProxy resources. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Delete(project string, sslPolicy string) *SslPoliciesDeleteCall { c := &SslPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -140779,6 +150429,7 @@ func (c *SslPoliciesDeleteCall) Header() http.Header { func (c *SslPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -140838,7 +150489,7 @@ func (c *SslPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.", + // "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.sslPolicies.delete", // "parameterOrder": [ @@ -140890,7 +150541,7 @@ type SslPoliciesGetCall struct { } // Get: Lists all of the ordered rules present in a single specified -// policy. +// policy. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Get(project string, sslPolicy string) *SslPoliciesGetCall { c := &SslPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -140935,6 +150586,7 @@ func (c *SslPoliciesGetCall) Header() http.Header { func (c *SslPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -140997,7 +150649,7 @@ func (c *SslPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SslPolicy, error } return ret, nil // { - // "description": "Lists all of the ordered rules present in a single specified policy.", + // "description": "Lists all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslPolicies.get", // "parameterOrder": [ @@ -141044,7 +150696,8 @@ type SslPoliciesInsertCall struct { } // Insert: Returns the specified SSL policy resource. Gets a list of -// available SSL policies by making a list() request. +// available SSL policies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Insert(project string, sslpolicy *SslPolicy) *SslPoliciesInsertCall { c := &SslPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -141098,6 +150751,7 @@ func (c *SslPoliciesInsertCall) Header() http.Header { func (c *SslPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -141161,7 +150815,7 @@ func (c *SslPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request.", + // "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.sslPolicies.insert", // "parameterOrder": [ @@ -141208,7 +150862,7 @@ type SslPoliciesListCall struct { } // List: Lists all the SSL policies that have been configured for the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) List(project string) *SslPoliciesListCall { c := &SslPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -141315,6 +150969,7 @@ func (c *SslPoliciesListCall) Header() http.Header { func (c *SslPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -141376,7 +151031,7 @@ func (c *SslPoliciesListCall) Do(opts ...googleapi.CallOption) (*SslPoliciesList } return ret, nil // { - // "description": "Lists all the SSL policies that have been configured for the specified project.", + // "description": "Lists all the SSL policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslPolicies.list", // "parameterOrder": [ @@ -141460,7 +151115,8 @@ type SslPoliciesListAvailableFeaturesCall struct { } // ListAvailableFeatures: Lists all features that can be specified in -// the SSL policy when using custom profile. +// the SSL policy when using custom profile. (== suppress_warning +// http-rest-shadowed ==) func (r *SslPoliciesService) ListAvailableFeatures(project string) *SslPoliciesListAvailableFeaturesCall { c := &SslPoliciesListAvailableFeaturesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -141567,6 +151223,7 @@ func (c *SslPoliciesListAvailableFeaturesCall) Header() http.Header { func (c *SslPoliciesListAvailableFeaturesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -141630,7 +151287,7 @@ func (c *SslPoliciesListAvailableFeaturesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists all features that can be specified in the SSL policy when using custom profile.", + // "description": "Lists all features that can be specified in the SSL policy when using custom profile. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslPolicies.listAvailableFeatures", // "parameterOrder": [ @@ -141694,7 +151351,7 @@ type SslPoliciesPatchCall struct { } // Patch: Patches the specified SSL policy with the data included in the -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Patch(project string, sslPolicy string, sslpolicy *SslPolicy) *SslPoliciesPatchCall { c := &SslPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -141749,6 +151406,7 @@ func (c *SslPoliciesPatchCall) Header() http.Header { func (c *SslPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -141813,7 +151471,7 @@ func (c *SslPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Patches the specified SSL policy with the data included in the request.", + // "description": "Patches the specified SSL policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.sslPolicies.patch", // "parameterOrder": [ @@ -141868,7 +151526,7 @@ type SslPoliciesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslPoliciesTestIamPermissionsCall { c := &SslPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -141904,6 +151562,7 @@ func (c *SslPoliciesTestIamPermissionsCall) Header() http.Header { func (c *SslPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -141968,7 +151627,7 @@ func (c *SslPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.sslPolicies.testIamPermissions", // "parameterOrder": [ @@ -142018,7 +151677,8 @@ type SubnetworksAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of subnetworks. +// AggregatedList: Retrieves an aggregated list of subnetworks. (== +// suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) AggregatedList(project string) *SubnetworksAggregatedListCall { c := &SubnetworksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -142125,6 +151785,7 @@ func (c *SubnetworksAggregatedListCall) Header() http.Header { func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -142186,7 +151847,7 @@ func (c *SubnetworksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Subne } return ret, nil // { - // "description": "Retrieves an aggregated list of subnetworks.", + // "description": "Retrieves an aggregated list of subnetworks. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.aggregatedList", // "parameterOrder": [ @@ -142270,7 +151931,8 @@ type SubnetworksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified subnetwork. +// Delete: Deletes the specified subnetwork. (== suppress_warning +// http-rest-shadowed ==) func (r *SubnetworksService) Delete(project string, region string, subnetwork string) *SubnetworksDeleteCall { c := &SubnetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -142325,6 +151987,7 @@ func (c *SubnetworksDeleteCall) Header() http.Header { func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -142385,7 +152048,7 @@ func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified subnetwork.", + // "description": "Deletes the specified subnetwork. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.subnetworks.delete", // "parameterOrder": [ @@ -142447,7 +152110,7 @@ type SubnetworksExpandIpCidrRangeCall struct { } // ExpandIpCidrRange: Expands the IP CIDR range of the subnetwork to a -// specified value. +// specified value. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) ExpandIpCidrRange(project string, region string, subnetwork string, subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest) *SubnetworksExpandIpCidrRangeCall { c := &SubnetworksExpandIpCidrRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -142503,6 +152166,7 @@ func (c *SubnetworksExpandIpCidrRangeCall) Header() http.Header { func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -142568,7 +152232,7 @@ func (c *SubnetworksExpandIpCidrRangeCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Expands the IP CIDR range of the subnetwork to a specified value.", + // "description": "Expands the IP CIDR range of the subnetwork to a specified value. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.expandIpCidrRange", // "parameterOrder": [ @@ -142633,7 +152297,8 @@ type SubnetworksGetCall struct { } // Get: Returns the specified subnetwork. Gets a list of available -// subnetworks list() request. +// subnetworks list() request. (== suppress_warning http-rest-shadowed +// ==) func (r *SubnetworksService) Get(project string, region string, subnetwork string) *SubnetworksGetCall { c := &SubnetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -142679,6 +152344,7 @@ func (c *SubnetworksGetCall) Header() http.Header { func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -142742,7 +152408,7 @@ func (c *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, erro } return ret, nil // { - // "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request.", + // "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.get", // "parameterOrder": [ @@ -142800,7 +152466,8 @@ type SubnetworksGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *SubnetworksService) GetIamPolicy(project string, region string, resource string) *SubnetworksGetIamPolicyCall { c := &SubnetworksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -142809,6 +152476,13 @@ func (r *SubnetworksService) GetIamPolicy(project string, region string, resourc return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *SubnetworksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *SubnetworksGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -142846,6 +152520,7 @@ func (c *SubnetworksGetIamPolicyCall) Header() http.Header { func (c *SubnetworksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -142909,7 +152584,7 @@ func (c *SubnetworksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.getIamPolicy", // "parameterOrder": [ @@ -142918,6 +152593,12 @@ func (c *SubnetworksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -142966,7 +152647,7 @@ type SubnetworksInsertCall struct { } // Insert: Creates a subnetwork in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) Insert(project string, region string, subnetwork *Subnetwork) *SubnetworksInsertCall { c := &SubnetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -143021,6 +152702,7 @@ func (c *SubnetworksInsertCall) Header() http.Header { func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -143085,7 +152767,7 @@ func (c *SubnetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates a subnetwork in the specified project using the data included in the request.", + // "description": "Creates a subnetwork in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.insert", // "parameterOrder": [ @@ -143141,7 +152823,7 @@ type SubnetworksListCall struct { } // List: Retrieves a list of subnetworks available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) List(project string, region string) *SubnetworksListCall { c := &SubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -143249,6 +152931,7 @@ func (c *SubnetworksListCall) Header() http.Header { func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -143311,7 +152994,7 @@ func (c *SubnetworksListCall) Do(opts ...googleapi.CallOption) (*SubnetworkList, } return ret, nil // { - // "description": "Retrieves a list of subnetworks available to the specified project.", + // "description": "Retrieves a list of subnetworks available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.list", // "parameterOrder": [ @@ -143402,7 +153085,10 @@ type SubnetworksListUsableCall struct { header_ http.Header } -// ListUsable: Retrieves an aggregated list of usable subnetworks. +// ListUsable: Retrieves an aggregated list of all usable subnetworks in +// the project. The list contains all of the subnetworks in the project +// and the subnetworks that were shared by a Shared VPC host project. +// (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) ListUsable(project string) *SubnetworksListUsableCall { c := &SubnetworksListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -143509,6 +153195,7 @@ func (c *SubnetworksListUsableCall) Header() http.Header { func (c *SubnetworksListUsableCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -143570,7 +153257,7 @@ func (c *SubnetworksListUsableCall) Do(opts ...googleapi.CallOption) (*UsableSub } return ret, nil // { - // "description": "Retrieves an aggregated list of usable subnetworks.", + // "description": "Retrieves an aggregated list of all usable subnetworks in the project. The list contains all of the subnetworks in the project and the subnetworks that were shared by a Shared VPC host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.listUsable", // "parameterOrder": [ @@ -143658,7 +153345,8 @@ type SubnetworksPatchCall struct { // Patch: Patches the specified subnetwork with the data included in the // request. Only certain fields can up updated with a patch request as // indicated in the field descriptions. You must specify the current -// fingeprint of the subnetwork resource being patched. +// fingeprint of the subnetwork resource being patched. (== +// suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) Patch(project string, region string, subnetwork string, subnetwork2 *Subnetwork) *SubnetworksPatchCall { c := &SubnetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -143729,6 +153417,7 @@ func (c *SubnetworksPatchCall) Header() http.Header { func (c *SubnetworksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -143794,7 +153483,7 @@ func (c *SubnetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.", + // "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.subnetworks.patch", // "parameterOrder": [ @@ -143865,7 +153554,8 @@ type SubnetworksSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SubnetworksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *SubnetworksSetIamPolicyCall { c := &SubnetworksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -143902,6 +153592,7 @@ func (c *SubnetworksSetIamPolicyCall) Header() http.Header { func (c *SubnetworksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -143967,7 +153658,7 @@ func (c *SubnetworksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.setIamPolicy", // "parameterOrder": [ @@ -144028,7 +153719,7 @@ type SubnetworksSetPrivateIpGoogleAccessCall struct { // SetPrivateIpGoogleAccess: Set whether VMs in this subnet can access // Google services without assigning external IP addresses through -// Private Google Access. +// Private Google Access. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) SetPrivateIpGoogleAccess(project string, region string, subnetwork string, subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest) *SubnetworksSetPrivateIpGoogleAccessCall { c := &SubnetworksSetPrivateIpGoogleAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -144084,6 +153775,7 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) Header() http.Header { func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -144149,7 +153841,7 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", + // "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.setPrivateIpGoogleAccess", // "parameterOrder": [ @@ -144214,7 +153906,7 @@ type SubnetworksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *SubnetworksTestIamPermissionsCall { c := &SubnetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -144251,6 +153943,7 @@ func (c *SubnetworksTestIamPermissionsCall) Header() http.Header { func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -144316,7 +154009,7 @@ func (c *SubnetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.testIamPermissions", // "parameterOrder": [ @@ -144375,7 +154068,8 @@ type TargetHttpProxiesAggregatedListCall struct { } // AggregatedList: Retrieves the list of all TargetHttpProxy resources, -// regional and global, available to the specified project. +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpProxiesService) AggregatedList(project string) *TargetHttpProxiesAggregatedListCall { c := &TargetHttpProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -144482,6 +154176,7 @@ func (c *TargetHttpProxiesAggregatedListCall) Header() http.Header { func (c *TargetHttpProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -144543,7 +154238,7 @@ func (c *TargetHttpProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpProxies.aggregatedList", // "parameterOrder": [ @@ -144626,7 +154321,8 @@ type TargetHttpProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetHttpProxy resource. +// Delete: Deletes the specified TargetHttpProxy resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/delete func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall { c := &TargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -144681,6 +154377,7 @@ func (c *TargetHttpProxiesDeleteCall) Header() http.Header { func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -144740,7 +154437,7 @@ func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified TargetHttpProxy resource.", + // "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetHttpProxies.delete", // "parameterOrder": [ @@ -144793,7 +154490,8 @@ type TargetHttpProxiesGetCall struct { } // Get: Returns the specified TargetHttpProxy resource. Gets a list of -// available target HTTP proxies by making a list() request. +// available target HTTP proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/get func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall { c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -144839,6 +154537,7 @@ func (c *TargetHttpProxiesGetCall) Header() http.Header { func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -144901,7 +154600,7 @@ func (c *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttp } return ret, nil // { - // "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request.", + // "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpProxies.get", // "parameterOrder": [ @@ -144949,7 +154648,8 @@ type TargetHttpProxiesInsertCall struct { } // Insert: Creates a TargetHttpProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/insert func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall { c := &TargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -145004,6 +154704,7 @@ func (c *TargetHttpProxiesInsertCall) Header() http.Header { func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -145067,7 +154768,7 @@ func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpProxies.insert", // "parameterOrder": [ @@ -145114,7 +154815,7 @@ type TargetHttpProxiesListCall struct { } // List: Retrieves the list of TargetHttpProxy resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/list func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall { c := &TargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -145222,6 +154923,7 @@ func (c *TargetHttpProxiesListCall) Header() http.Header { func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -145283,7 +154985,7 @@ func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHtt } return ret, nil // { - // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpProxies.list", // "parameterOrder": [ @@ -145367,7 +155069,8 @@ type TargetHttpProxiesSetUrlMapCall struct { header_ http.Header } -// SetUrlMap: Changes the URL map for TargetHttpProxy. +// SetUrlMap: Changes the URL map for TargetHttpProxy. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/setUrlMap func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall { c := &TargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -145423,6 +155126,7 @@ func (c *TargetHttpProxiesSetUrlMapCall) Header() http.Header { func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -145487,7 +155191,7 @@ func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Changes the URL map for TargetHttpProxy.", + // "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpProxies.setUrlMap", // "parameterOrder": [ @@ -145543,7 +155247,7 @@ type TargetHttpProxiesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpProxiesTestIamPermissionsCall { c := &TargetHttpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -145579,6 +155283,7 @@ func (c *TargetHttpProxiesTestIamPermissionsCall) Header() http.Header { func (c *TargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -145643,7 +155348,7 @@ func (c *TargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpProxies.testIamPermissions", // "parameterOrder": [ @@ -145694,7 +155399,8 @@ type TargetHttpsProxiesAggregatedListCall struct { } // AggregatedList: Retrieves the list of all TargetHttpsProxy resources, -// regional and global, available to the specified project. +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) AggregatedList(project string) *TargetHttpsProxiesAggregatedListCall { c := &TargetHttpsProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -145801,6 +155507,7 @@ func (c *TargetHttpsProxiesAggregatedListCall) Header() http.Header { func (c *TargetHttpsProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -145862,7 +155569,7 @@ func (c *TargetHttpsProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpsProxies.aggregatedList", // "parameterOrder": [ @@ -145945,7 +155652,8 @@ type TargetHttpsProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetHttpsProxy resource. +// Delete: Deletes the specified TargetHttpsProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy string) *TargetHttpsProxiesDeleteCall { c := &TargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -145999,6 +155707,7 @@ func (c *TargetHttpsProxiesDeleteCall) Header() http.Header { func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -146058,7 +155767,7 @@ func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Deletes the specified TargetHttpsProxy resource.", + // "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetHttpsProxies.delete", // "parameterOrder": [ @@ -146111,7 +155820,8 @@ type TargetHttpsProxiesGetCall struct { } // Get: Returns the specified TargetHttpsProxy resource. Gets a list of -// available target HTTPS proxies by making a list() request. +// available target HTTPS proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall { c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -146156,6 +155866,7 @@ func (c *TargetHttpsProxiesGetCall) Header() http.Header { func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -146218,7 +155929,7 @@ func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHtt } return ret, nil // { - // "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request.", + // "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpsProxies.get", // "parameterOrder": [ @@ -146266,7 +155977,8 @@ type TargetHttpsProxiesInsertCall struct { } // Insert: Creates a TargetHttpsProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesInsertCall { c := &TargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -146320,6 +156032,7 @@ func (c *TargetHttpsProxiesInsertCall) Header() http.Header { func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -146383,7 +156096,7 @@ func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.insert", // "parameterOrder": [ @@ -146430,7 +156143,7 @@ type TargetHttpsProxiesListCall struct { } // List: Retrieves the list of TargetHttpsProxy resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesListCall { c := &TargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -146537,6 +156250,7 @@ func (c *TargetHttpsProxiesListCall) Header() http.Header { func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -146598,7 +156312,7 @@ func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHt } return ret, nil // { - // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpsProxies.list", // "parameterOrder": [ @@ -146683,6 +156397,7 @@ type TargetHttpsProxiesSetQuicOverrideCall struct { } // SetQuicOverride: Sets the QUIC override policy for TargetHttpsProxy. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetQuicOverride(project string, targetHttpsProxy string, targethttpsproxiessetquicoverriderequest *TargetHttpsProxiesSetQuicOverrideRequest) *TargetHttpsProxiesSetQuicOverrideCall { c := &TargetHttpsProxiesSetQuicOverrideCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -146737,6 +156452,7 @@ func (c *TargetHttpsProxiesSetQuicOverrideCall) Header() http.Header { func (c *TargetHttpsProxiesSetQuicOverrideCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -146801,7 +156517,7 @@ func (c *TargetHttpsProxiesSetQuicOverrideCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the QUIC override policy for TargetHttpsProxy.", + // "description": "Sets the QUIC override policy for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setQuicOverride", // "parameterOrder": [ @@ -146856,6 +156572,7 @@ type TargetHttpsProxiesSetSslCertificatesCall struct { } // SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHttpsProxy string, targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest) *TargetHttpsProxiesSetSslCertificatesCall { c := &TargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -146910,6 +156627,7 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -146974,7 +156692,7 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Replaces SslCertificates for TargetHttpsProxy.", + // "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setSslCertificates", // "parameterOrder": [ @@ -147033,7 +156751,7 @@ type TargetHttpsProxiesSetSslPolicyCall struct { // policy specifies the server-side support for SSL features. This // affects connections between clients and the HTTPS proxy load // balancer. They do not affect the connection between the load balancer -// and the backends. +// and the backends. (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetSslPolicy(project string, targetHttpsProxy string, sslpolicyreference *SslPolicyReference) *TargetHttpsProxiesSetSslPolicyCall { c := &TargetHttpsProxiesSetSslPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -147088,6 +156806,7 @@ func (c *TargetHttpsProxiesSetSslPolicyCall) Header() http.Header { func (c *TargetHttpsProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -147152,7 +156871,7 @@ func (c *TargetHttpsProxiesSetSslPolicyCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends.", + // "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setSslPolicy", // "parameterOrder": [ @@ -147206,7 +156925,8 @@ type TargetHttpsProxiesSetUrlMapCall struct { header_ http.Header } -// SetUrlMap: Changes the URL map for TargetHttpsProxy. +// SetUrlMap: Changes the URL map for TargetHttpsProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy string, urlmapreference *UrlMapReference) *TargetHttpsProxiesSetUrlMapCall { c := &TargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -147261,6 +156981,7 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Header() http.Header { func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -147325,7 +157046,7 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Changes the URL map for TargetHttpsProxy.", + // "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setUrlMap", // "parameterOrder": [ @@ -147381,7 +157102,7 @@ type TargetHttpsProxiesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpsProxiesTestIamPermissionsCall { c := &TargetHttpsProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -147417,6 +157138,7 @@ func (c *TargetHttpsProxiesTestIamPermissionsCall) Header() http.Header { func (c *TargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -147481,7 +157203,7 @@ func (c *TargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.testIamPermissions", // "parameterOrder": [ @@ -147531,7 +157253,8 @@ type TargetInstancesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of target instances. +// AggregatedList: Retrieves an aggregated list of target instances. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/aggregatedList func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall { c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -147639,6 +157362,7 @@ func (c *TargetInstancesAggregatedListCall) Header() http.Header { func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -147700,7 +157424,7 @@ func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Retrieves an aggregated list of target instances.", + // "description": "Retrieves an aggregated list of target instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetInstances.aggregatedList", // "parameterOrder": [ @@ -147784,7 +157508,8 @@ type TargetInstancesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetInstance resource. +// Delete: Deletes the specified TargetInstance resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/delete func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall { c := &TargetInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -147840,6 +157565,7 @@ func (c *TargetInstancesDeleteCall) Header() http.Header { func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -147900,7 +157626,7 @@ func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified TargetInstance resource.", + // "description": "Deletes the specified TargetInstance resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetInstances.delete", // "parameterOrder": [ @@ -147962,7 +157688,8 @@ type TargetInstancesGetCall struct { } // Get: Returns the specified TargetInstance resource. Gets a list of -// available target instances by making a list() request. +// available target instances by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/get func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall { c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -148009,6 +157736,7 @@ func (c *TargetInstancesGetCall) Header() http.Header { func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -148072,7 +157800,7 @@ func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstan } return ret, nil // { - // "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.", + // "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetInstances.get", // "parameterOrder": [ @@ -148129,7 +157857,8 @@ type TargetInstancesInsertCall struct { } // Insert: Creates a TargetInstance resource in the specified project -// and zone using the data included in the request. +// and zone using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/insert func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall { c := &TargetInstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -148185,6 +157914,7 @@ func (c *TargetInstancesInsertCall) Header() http.Header { func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -148249,7 +157979,7 @@ func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", + // "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetInstances.insert", // "parameterOrder": [ @@ -148305,7 +158035,8 @@ type TargetInstancesListCall struct { } // List: Retrieves a list of TargetInstance resources available to the -// specified project and zone. +// specified project and zone. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/list func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall { c := &TargetInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -148414,6 +158145,7 @@ func (c *TargetInstancesListCall) Header() http.Header { func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -148476,7 +158208,7 @@ func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInsta } return ret, nil // { - // "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", + // "description": "Retrieves a list of TargetInstance resources available to the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetInstances.list", // "parameterOrder": [ @@ -148570,7 +158302,7 @@ type TargetInstancesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetInstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetInstancesTestIamPermissionsCall { c := &TargetInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -148607,6 +158339,7 @@ func (c *TargetInstancesTestIamPermissionsCall) Header() http.Header { func (c *TargetInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -148672,7 +158405,7 @@ func (c *TargetInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetInstances.testIamPermissions", // "parameterOrder": [ @@ -148732,7 +158465,8 @@ type TargetPoolsAddHealthCheckCall struct { header_ http.Header } -// AddHealthCheck: Adds health check URLs to a target pool. +// AddHealthCheck: Adds health check URLs to a target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addHealthCheck func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall { c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -148789,6 +158523,7 @@ func (c *TargetPoolsAddHealthCheckCall) Header() http.Header { func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -148854,7 +158589,7 @@ func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Adds health check URLs to a target pool.", + // "description": "Adds health check URLs to a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.addHealthCheck", // "parameterOrder": [ @@ -148918,7 +158653,8 @@ type TargetPoolsAddInstanceCall struct { header_ http.Header } -// AddInstance: Adds an instance to a target pool. +// AddInstance: Adds an instance to a target pool. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addInstance func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall { c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -148975,6 +158711,7 @@ func (c *TargetPoolsAddInstanceCall) Header() http.Header { func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -149040,7 +158777,7 @@ func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Adds an instance to a target pool.", + // "description": "Adds an instance to a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.addInstance", // "parameterOrder": [ @@ -149102,7 +158839,8 @@ type TargetPoolsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of target pools. +// AggregatedList: Retrieves an aggregated list of target pools. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/aggregatedList func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall { c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -149210,6 +158948,7 @@ func (c *TargetPoolsAggregatedListCall) Header() http.Header { func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -149271,7 +159010,7 @@ func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Targe } return ret, nil // { - // "description": "Retrieves an aggregated list of target pools.", + // "description": "Retrieves an aggregated list of target pools. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetPools.aggregatedList", // "parameterOrder": [ @@ -149355,7 +159094,8 @@ type TargetPoolsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified target pool. +// Delete: Deletes the specified target pool. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/delete func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall { c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -149411,6 +159151,7 @@ func (c *TargetPoolsDeleteCall) Header() http.Header { func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -149471,7 +159212,7 @@ func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified target pool.", + // "description": "Deletes the specified target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetPools.delete", // "parameterOrder": [ @@ -149533,7 +159274,8 @@ type TargetPoolsGetCall struct { } // Get: Returns the specified target pool. Gets a list of available -// target pools by making a list() request. +// target pools by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/get func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall { c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -149580,6 +159322,7 @@ func (c *TargetPoolsGetCall) Header() http.Header { func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -149643,7 +159386,7 @@ func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, erro } return ret, nil // { - // "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request.", + // "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetPools.get", // "parameterOrder": [ @@ -149701,7 +159444,8 @@ type TargetPoolsGetHealthCall struct { } // GetHealth: Gets the most recent health check results for each IP for -// the instance that is referenced by the given target pool. +// the instance that is referenced by the given target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/getHealth func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall { c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -149739,6 +159483,7 @@ func (c *TargetPoolsGetHealthCall) Header() http.Header { func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -149804,7 +159549,7 @@ func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPool } return ret, nil // { - // "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", + // "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.getHealth", // "parameterOrder": [ @@ -149864,7 +159609,8 @@ type TargetPoolsInsertCall struct { } // Insert: Creates a target pool in the specified project and region -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/insert func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall { c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -149920,6 +159666,7 @@ func (c *TargetPoolsInsertCall) Header() http.Header { func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -149984,7 +159731,7 @@ func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates a target pool in the specified project and region using the data included in the request.", + // "description": "Creates a target pool in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.insert", // "parameterOrder": [ @@ -150040,7 +159787,7 @@ type TargetPoolsListCall struct { } // List: Retrieves a list of target pools available to the specified -// project and region. +// project and region. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/list func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall { c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -150149,6 +159896,7 @@ func (c *TargetPoolsListCall) Header() http.Header { func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -150211,7 +159959,7 @@ func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, } return ret, nil // { - // "description": "Retrieves a list of target pools available to the specified project and region.", + // "description": "Retrieves a list of target pools available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetPools.list", // "parameterOrder": [ @@ -150304,7 +160052,8 @@ type TargetPoolsRemoveHealthCheckCall struct { header_ http.Header } -// RemoveHealthCheck: Removes health check URL from a target pool. +// RemoveHealthCheck: Removes health check URL from a target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeHealthCheck func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall { c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -150361,6 +160110,7 @@ func (c *TargetPoolsRemoveHealthCheckCall) Header() http.Header { func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -150426,7 +160176,7 @@ func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Removes health check URL from a target pool.", + // "description": "Removes health check URL from a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.removeHealthCheck", // "parameterOrder": [ @@ -150490,7 +160240,8 @@ type TargetPoolsRemoveInstanceCall struct { header_ http.Header } -// RemoveInstance: Removes instance URL from a target pool. +// RemoveInstance: Removes instance URL from a target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeInstance func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall { c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -150547,6 +160298,7 @@ func (c *TargetPoolsRemoveInstanceCall) Header() http.Header { func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -150612,7 +160364,7 @@ func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Removes instance URL from a target pool.", + // "description": "Removes instance URL from a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.removeInstance", // "parameterOrder": [ @@ -150676,7 +160428,8 @@ type TargetPoolsSetBackupCall struct { header_ http.Header } -// SetBackup: Changes a backup target pool's configurations. +// SetBackup: Changes a backup target pool's configurations. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/setBackup func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall { c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -150740,6 +160493,7 @@ func (c *TargetPoolsSetBackupCall) Header() http.Header { func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -150805,7 +160559,7 @@ func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Changes a backup target pool's configurations.", + // "description": "Changes a backup target pool's configurations. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.setBackup", // "parameterOrder": [ @@ -150876,7 +160630,7 @@ type TargetPoolsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetPoolsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetPoolsTestIamPermissionsCall { c := &TargetPoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -150913,6 +160667,7 @@ func (c *TargetPoolsTestIamPermissionsCall) Header() http.Header { func (c *TargetPoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -150978,7 +160733,7 @@ func (c *TargetPoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.testIamPermissions", // "parameterOrder": [ @@ -151036,7 +160791,8 @@ type TargetSslProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetSslProxy resource. +// Delete: Deletes the specified TargetSslProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) Delete(project string, targetSslProxy string) *TargetSslProxiesDeleteCall { c := &TargetSslProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -151090,6 +160846,7 @@ func (c *TargetSslProxiesDeleteCall) Header() http.Header { func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -151149,7 +160906,7 @@ func (c *TargetSslProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified TargetSslProxy resource.", + // "description": "Deletes the specified TargetSslProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetSslProxies.delete", // "parameterOrder": [ @@ -151202,7 +160959,8 @@ type TargetSslProxiesGetCall struct { } // Get: Returns the specified TargetSslProxy resource. Gets a list of -// available target SSL proxies by making a list() request. +// available target SSL proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) Get(project string, targetSslProxy string) *TargetSslProxiesGetCall { c := &TargetSslProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -151247,6 +161005,7 @@ func (c *TargetSslProxiesGetCall) Header() http.Header { func (c *TargetSslProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -151309,7 +161068,7 @@ func (c *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslPr } return ret, nil // { - // "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request.", + // "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetSslProxies.get", // "parameterOrder": [ @@ -151357,7 +161116,8 @@ type TargetSslProxiesInsertCall struct { } // Insert: Creates a TargetSslProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetSslProxiesService) Insert(project string, targetsslproxy *TargetSslProxy) *TargetSslProxiesInsertCall { c := &TargetSslProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -151411,6 +161171,7 @@ func (c *TargetSslProxiesInsertCall) Header() http.Header { func (c *TargetSslProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -151474,7 +161235,7 @@ func (c *TargetSslProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.insert", // "parameterOrder": [ @@ -151521,7 +161282,7 @@ type TargetSslProxiesListCall struct { } // List: Retrieves the list of TargetSslProxy resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) List(project string) *TargetSslProxiesListCall { c := &TargetSslProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -151628,6 +161389,7 @@ func (c *TargetSslProxiesListCall) Header() http.Header { func (c *TargetSslProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -151689,7 +161451,7 @@ func (c *TargetSslProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetSslP } return ret, nil // { - // "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetSslProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetSslProxies.list", // "parameterOrder": [ @@ -151773,7 +161535,8 @@ type TargetSslProxiesSetBackendServiceCall struct { header_ http.Header } -// SetBackendService: Changes the BackendService for TargetSslProxy. +// SetBackendService: Changes the BackendService for TargetSslProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetBackendService(project string, targetSslProxy string, targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest) *TargetSslProxiesSetBackendServiceCall { c := &TargetSslProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -151828,6 +161591,7 @@ func (c *TargetSslProxiesSetBackendServiceCall) Header() http.Header { func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -151892,7 +161656,7 @@ func (c *TargetSslProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the BackendService for TargetSslProxy.", + // "description": "Changes the BackendService for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setBackendService", // "parameterOrder": [ @@ -151947,7 +161711,8 @@ type TargetSslProxiesSetProxyHeaderCall struct { header_ http.Header } -// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy. +// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetProxyHeader(project string, targetSslProxy string, targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest) *TargetSslProxiesSetProxyHeaderCall { c := &TargetSslProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -152002,6 +161767,7 @@ func (c *TargetSslProxiesSetProxyHeaderCall) Header() http.Header { func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -152066,7 +161832,7 @@ func (c *TargetSslProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Changes the ProxyHeaderType for TargetSslProxy.", + // "description": "Changes the ProxyHeaderType for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setProxyHeader", // "parameterOrder": [ @@ -152121,7 +161887,8 @@ type TargetSslProxiesSetSslCertificatesCall struct { header_ http.Header } -// SetSslCertificates: Changes SslCertificates for TargetSslProxy. +// SetSslCertificates: Changes SslCertificates for TargetSslProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetSslCertificates(project string, targetSslProxy string, targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest) *TargetSslProxiesSetSslCertificatesCall { c := &TargetSslProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -152176,6 +161943,7 @@ func (c *TargetSslProxiesSetSslCertificatesCall) Header() http.Header { func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -152240,7 +162008,7 @@ func (c *TargetSslProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Changes SslCertificates for TargetSslProxy.", + // "description": "Changes SslCertificates for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setSslCertificates", // "parameterOrder": [ @@ -152299,6 +162067,7 @@ type TargetSslProxiesSetSslPolicyCall struct { // specifies the server-side support for SSL features. This affects // connections between clients and the SSL proxy load balancer. They do // not affect the connection between the load balancer and the backends. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetSslPolicy(project string, targetSslProxy string, sslpolicyreference *SslPolicyReference) *TargetSslProxiesSetSslPolicyCall { c := &TargetSslProxiesSetSslPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -152353,6 +162122,7 @@ func (c *TargetSslProxiesSetSslPolicyCall) Header() http.Header { func (c *TargetSslProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -152417,7 +162187,7 @@ func (c *TargetSslProxiesSetSslPolicyCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends.", + // "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setSslPolicy", // "parameterOrder": [ @@ -152472,7 +162242,7 @@ type TargetSslProxiesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetSslProxiesTestIamPermissionsCall { c := &TargetSslProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -152508,6 +162278,7 @@ func (c *TargetSslProxiesTestIamPermissionsCall) Header() http.Header { func (c *TargetSslProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -152572,7 +162343,7 @@ func (c *TargetSslProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.testIamPermissions", // "parameterOrder": [ @@ -152622,7 +162393,8 @@ type TargetTcpProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetTcpProxy resource. +// Delete: Deletes the specified TargetTcpProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) Delete(project string, targetTcpProxy string) *TargetTcpProxiesDeleteCall { c := &TargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -152676,6 +162448,7 @@ func (c *TargetTcpProxiesDeleteCall) Header() http.Header { func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -152735,7 +162508,7 @@ func (c *TargetTcpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified TargetTcpProxy resource.", + // "description": "Deletes the specified TargetTcpProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetTcpProxies.delete", // "parameterOrder": [ @@ -152788,7 +162561,8 @@ type TargetTcpProxiesGetCall struct { } // Get: Returns the specified TargetTcpProxy resource. Gets a list of -// available target TCP proxies by making a list() request. +// available target TCP proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) Get(project string, targetTcpProxy string) *TargetTcpProxiesGetCall { c := &TargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -152833,6 +162607,7 @@ func (c *TargetTcpProxiesGetCall) Header() http.Header { func (c *TargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -152895,7 +162670,7 @@ func (c *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpPr } return ret, nil // { - // "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.", + // "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetTcpProxies.get", // "parameterOrder": [ @@ -152943,7 +162718,8 @@ type TargetTcpProxiesInsertCall struct { } // Insert: Creates a TargetTcpProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetTcpProxiesService) Insert(project string, targettcpproxy *TargetTcpProxy) *TargetTcpProxiesInsertCall { c := &TargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -152997,6 +162773,7 @@ func (c *TargetTcpProxiesInsertCall) Header() http.Header { func (c *TargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -153060,7 +162837,7 @@ func (c *TargetTcpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetTcpProxies.insert", // "parameterOrder": [ @@ -153107,7 +162884,7 @@ type TargetTcpProxiesListCall struct { } // List: Retrieves the list of TargetTcpProxy resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) List(project string) *TargetTcpProxiesListCall { c := &TargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -153214,6 +162991,7 @@ func (c *TargetTcpProxiesListCall) Header() http.Header { func (c *TargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -153275,7 +163053,7 @@ func (c *TargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpP } return ret, nil // { - // "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetTcpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetTcpProxies.list", // "parameterOrder": [ @@ -153359,7 +163137,8 @@ type TargetTcpProxiesSetBackendServiceCall struct { header_ http.Header } -// SetBackendService: Changes the BackendService for TargetTcpProxy. +// SetBackendService: Changes the BackendService for TargetTcpProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) SetBackendService(project string, targetTcpProxy string, targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest) *TargetTcpProxiesSetBackendServiceCall { c := &TargetTcpProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -153414,6 +163193,7 @@ func (c *TargetTcpProxiesSetBackendServiceCall) Header() http.Header { func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -153478,7 +163258,7 @@ func (c *TargetTcpProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the BackendService for TargetTcpProxy.", + // "description": "Changes the BackendService for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetTcpProxies.setBackendService", // "parameterOrder": [ @@ -153533,7 +163313,8 @@ type TargetTcpProxiesSetProxyHeaderCall struct { header_ http.Header } -// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy. +// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) SetProxyHeader(project string, targetTcpProxy string, targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest) *TargetTcpProxiesSetProxyHeaderCall { c := &TargetTcpProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -153588,6 +163369,7 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) Header() http.Header { func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -153652,7 +163434,7 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Changes the ProxyHeaderType for TargetTcpProxy.", + // "description": "Changes the ProxyHeaderType for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetTcpProxies.setProxyHeader", // "parameterOrder": [ @@ -153708,7 +163490,7 @@ type TargetTcpProxiesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetTcpProxiesTestIamPermissionsCall { c := &TargetTcpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -153744,6 +163526,7 @@ func (c *TargetTcpProxiesTestIamPermissionsCall) Header() http.Header { func (c *TargetTcpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -153808,7 +163591,7 @@ func (c *TargetTcpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetTcpProxies.testIamPermissions", // "parameterOrder": [ @@ -153859,6 +163642,7 @@ type TargetVpnGatewaysAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of target VPN gateways. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall { c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -153965,6 +163749,7 @@ func (c *TargetVpnGatewaysAggregatedListCall) Header() http.Header { func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -154026,7 +163811,7 @@ func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves an aggregated list of target VPN gateways.", + // "description": "Retrieves an aggregated list of target VPN gateways. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.aggregatedList", // "parameterOrder": [ @@ -154110,7 +163895,8 @@ type TargetVpnGatewaysDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified target VPN gateway. +// Delete: Deletes the specified target VPN gateway. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall { c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -154165,6 +163951,7 @@ func (c *TargetVpnGatewaysDeleteCall) Header() http.Header { func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -154225,7 +164012,7 @@ func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified target VPN gateway.", + // "description": "Deletes the specified target VPN gateway. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetVpnGateways.delete", // "parameterOrder": [ @@ -154287,7 +164074,8 @@ type TargetVpnGatewaysGetCall struct { } // Get: Returns the specified target VPN gateway. Gets a list of -// available target VPN gateways by making a list() request. +// available target VPN gateways by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall { c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -154333,6 +164121,7 @@ func (c *TargetVpnGatewaysGetCall) Header() http.Header { func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -154396,7 +164185,7 @@ func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnG } return ret, nil // { - // "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.", + // "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.get", // "parameterOrder": [ @@ -154453,7 +164242,8 @@ type TargetVpnGatewaysInsertCall struct { } // Insert: Creates a target VPN gateway in the specified project and -// region using the data included in the request. +// region using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall { c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -154508,6 +164298,7 @@ func (c *TargetVpnGatewaysInsertCall) Header() http.Header { func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -154572,7 +164363,7 @@ func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", + // "description": "Creates a target VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetVpnGateways.insert", // "parameterOrder": [ @@ -154628,7 +164419,8 @@ type TargetVpnGatewaysListCall struct { } // List: Retrieves a list of target VPN gateways available to the -// specified project and region. +// specified project and region. (== suppress_warning http-rest-shadowed +// ==) func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall { c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -154736,6 +164528,7 @@ func (c *TargetVpnGatewaysListCall) Header() http.Header { func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -154798,7 +164591,7 @@ func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpn } return ret, nil // { - // "description": "Retrieves a list of target VPN gateways available to the specified project and region.", + // "description": "Retrieves a list of target VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.list", // "parameterOrder": [ @@ -154892,7 +164685,8 @@ type TargetVpnGatewaysSetLabelsCall struct { } // SetLabels: Sets the labels on a TargetVpnGateway. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *TargetVpnGatewaysSetLabelsCall { c := &TargetVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -154948,6 +164742,7 @@ func (c *TargetVpnGatewaysSetLabelsCall) Header() http.Header { func (c *TargetVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -155013,7 +164808,7 @@ func (c *TargetVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetVpnGateways.setLabels", // "parameterOrder": [ @@ -155078,7 +164873,7 @@ type TargetVpnGatewaysTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetVpnGatewaysTestIamPermissionsCall { c := &TargetVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -155115,6 +164910,7 @@ func (c *TargetVpnGatewaysTestIamPermissionsCall) Header() http.Header { func (c *TargetVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -155180,7 +164976,7 @@ func (c *TargetVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetVpnGateways.testIamPermissions", // "parameterOrder": [ @@ -155239,7 +165035,8 @@ type UrlMapsAggregatedListCall struct { } // AggregatedList: Retrieves the list of all UrlMap resources, regional -// and global, available to the specified project. +// and global, available to the specified project. (== suppress_warning +// http-rest-shadowed ==) func (r *UrlMapsService) AggregatedList(project string) *UrlMapsAggregatedListCall { c := &UrlMapsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -155346,6 +165143,7 @@ func (c *UrlMapsAggregatedListCall) Header() http.Header { func (c *UrlMapsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -155407,7 +165205,7 @@ func (c *UrlMapsAggregatedListCall) Do(opts ...googleapi.CallOption) (*UrlMapsAg } return ret, nil // { - // "description": "Retrieves the list of all UrlMap resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all UrlMap resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.urlMaps.aggregatedList", // "parameterOrder": [ @@ -155490,7 +165288,8 @@ type UrlMapsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified UrlMap resource. +// Delete: Deletes the specified UrlMap resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/delete func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall { c := &UrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -155545,6 +165344,7 @@ func (c *UrlMapsDeleteCall) Header() http.Header { func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -155604,7 +165404,7 @@ func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified UrlMap resource.", + // "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.urlMaps.delete", // "parameterOrder": [ @@ -155657,7 +165457,8 @@ type UrlMapsGetCall struct { } // Get: Returns the specified UrlMap resource. Gets a list of available -// URL maps by making a list() request. +// URL maps by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/get func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -155703,6 +165504,7 @@ func (c *UrlMapsGetCall) Header() http.Header { func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -155765,7 +165567,7 @@ func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) { } return ret, nil // { - // "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.", + // "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.urlMaps.get", // "parameterOrder": [ @@ -155813,7 +165615,8 @@ type UrlMapsInsertCall struct { } // Insert: Creates a UrlMap resource in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/insert func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall { c := &UrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -155868,6 +165671,7 @@ func (c *UrlMapsInsertCall) Header() http.Header { func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -155931,7 +165735,7 @@ func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + // "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.urlMaps.insert", // "parameterOrder": [ @@ -155979,7 +165783,8 @@ type UrlMapsInvalidateCacheCall struct { } // InvalidateCache: Initiates a cache invalidation operation, -// invalidating the specified path, scoped to the specified UrlMap. +// invalidating the specified path, scoped to the specified UrlMap. (== +// suppress_warning http-rest-shadowed ==) func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *UrlMapsInvalidateCacheCall { c := &UrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -156034,6 +165839,7 @@ func (c *UrlMapsInvalidateCacheCall) Header() http.Header { func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -156098,7 +165904,7 @@ func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", + // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.urlMaps.invalidateCache", // "parameterOrder": [ @@ -156153,7 +165959,7 @@ type UrlMapsListCall struct { } // List: Retrieves the list of UrlMap resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/list func (r *UrlMapsService) List(project string) *UrlMapsListCall { c := &UrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -156261,6 +166067,7 @@ func (c *UrlMapsListCall) Header() http.Header { func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -156322,7 +166129,7 @@ func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error) } return ret, nil // { - // "description": "Retrieves the list of UrlMap resources available to the specified project.", + // "description": "Retrieves the list of UrlMap resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.urlMaps.list", // "parameterOrder": [ @@ -156408,7 +166215,8 @@ type UrlMapsPatchCall struct { // Patch: Patches the specified UrlMap resource with the data included // in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. +// JSON merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall { c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -156464,6 +166272,7 @@ func (c *UrlMapsPatchCall) Header() http.Header { func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -156528,7 +166337,7 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.urlMaps.patch", // "parameterOrder": [ @@ -156584,7 +166393,7 @@ type UrlMapsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *UrlMapsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *UrlMapsTestIamPermissionsCall { c := &UrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -156620,6 +166429,7 @@ func (c *UrlMapsTestIamPermissionsCall) Header() http.Header { func (c *UrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -156684,7 +166494,7 @@ func (c *UrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestP } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.urlMaps.testIamPermissions", // "parameterOrder": [ @@ -156736,7 +166546,7 @@ type UrlMapsUpdateCall struct { } // Update: Updates the specified UrlMap resource with the data included -// in the request. +// in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/update func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall { c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -156792,6 +166602,7 @@ func (c *UrlMapsUpdateCall) Header() http.Header { func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -156856,7 +166667,7 @@ func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Updates the specified UrlMap resource with the data included in the request.", + // "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.urlMaps.update", // "parameterOrder": [ @@ -156913,7 +166724,7 @@ type UrlMapsValidateCall struct { // Validate: Runs static validation for the UrlMap. In particular, the // tests of the provided UrlMap will be run. Calling this method does -// NOT create the UrlMap. +// NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/validate func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall { c := &UrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -156950,6 +166761,7 @@ func (c *UrlMapsValidateCall) Header() http.Header { func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -157014,7 +166826,7 @@ func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidate } return ret, nil // { - // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.urlMaps.validate", // "parameterOrder": [ @@ -157063,7 +166875,8 @@ type VpnGatewaysAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of VPN gateways. +// AggregatedList: Retrieves an aggregated list of VPN gateways. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnGatewaysService) AggregatedList(project string) *VpnGatewaysAggregatedListCall { c := &VpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -157170,6 +166983,7 @@ func (c *VpnGatewaysAggregatedListCall) Header() http.Header { func (c *VpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -157231,7 +167045,7 @@ func (c *VpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnGa } return ret, nil // { - // "description": "Retrieves an aggregated list of VPN gateways.", + // "description": "Retrieves an aggregated list of VPN gateways. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnGateways.aggregatedList", // "parameterOrder": [ @@ -157315,7 +167129,8 @@ type VpnGatewaysDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified VPN gateway. +// Delete: Deletes the specified VPN gateway. (== suppress_warning +// http-rest-shadowed ==) func (r *VpnGatewaysService) Delete(project string, region string, vpnGateway string) *VpnGatewaysDeleteCall { c := &VpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -157370,6 +167185,7 @@ func (c *VpnGatewaysDeleteCall) Header() http.Header { func (c *VpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -157430,7 +167246,7 @@ func (c *VpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified VPN gateway.", + // "description": "Deletes the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.vpnGateways.delete", // "parameterOrder": [ @@ -157492,7 +167308,8 @@ type VpnGatewaysGetCall struct { } // Get: Returns the specified VPN gateway. Gets a list of available VPN -// gateways by making a list() request. +// gateways by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *VpnGatewaysService) Get(project string, region string, vpnGateway string) *VpnGatewaysGetCall { c := &VpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -157538,6 +167355,7 @@ func (c *VpnGatewaysGetCall) Header() http.Header { func (c *VpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -157601,7 +167419,7 @@ func (c *VpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*VpnGateway, erro } return ret, nil // { - // "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request.", + // "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnGateways.get", // "parameterOrder": [ @@ -157658,7 +167476,8 @@ type VpnGatewaysGetStatusCall struct { header_ http.Header } -// GetStatus: Returns the status for the specified VPN gateway. +// GetStatus: Returns the status for the specified VPN gateway. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnGatewaysService) GetStatus(project string, region string, vpnGateway string) *VpnGatewaysGetStatusCall { c := &VpnGatewaysGetStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -157704,6 +167523,7 @@ func (c *VpnGatewaysGetStatusCall) Header() http.Header { func (c *VpnGatewaysGetStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -157767,7 +167587,7 @@ func (c *VpnGatewaysGetStatusCall) Do(opts ...googleapi.CallOption) (*VpnGateway } return ret, nil // { - // "description": "Returns the status for the specified VPN gateway.", + // "description": "Returns the status for the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnGateways.getStatus", // "parameterOrder": [ @@ -157824,7 +167644,8 @@ type VpnGatewaysInsertCall struct { } // Insert: Creates a VPN gateway in the specified project and region -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *VpnGatewaysService) Insert(project string, region string, vpngateway *VpnGateway) *VpnGatewaysInsertCall { c := &VpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -157879,6 +167700,7 @@ func (c *VpnGatewaysInsertCall) Header() http.Header { func (c *VpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -157943,7 +167765,7 @@ func (c *VpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates a VPN gateway in the specified project and region using the data included in the request.", + // "description": "Creates a VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnGateways.insert", // "parameterOrder": [ @@ -157999,7 +167821,7 @@ type VpnGatewaysListCall struct { } // List: Retrieves a list of VPN gateways available to the specified -// project and region. +// project and region. (== suppress_warning http-rest-shadowed ==) func (r *VpnGatewaysService) List(project string, region string) *VpnGatewaysListCall { c := &VpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -158107,6 +167929,7 @@ func (c *VpnGatewaysListCall) Header() http.Header { func (c *VpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -158169,7 +167992,7 @@ func (c *VpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*VpnGatewayList, } return ret, nil // { - // "description": "Retrieves a list of VPN gateways available to the specified project and region.", + // "description": "Retrieves a list of VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnGateways.list", // "parameterOrder": [ @@ -158263,7 +168086,8 @@ type VpnGatewaysSetLabelsCall struct { } // SetLabels: Sets the labels on a VpnGateway. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnGatewaysService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *VpnGatewaysSetLabelsCall { c := &VpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -158319,6 +168143,7 @@ func (c *VpnGatewaysSetLabelsCall) Header() http.Header { func (c *VpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -158384,7 +168209,7 @@ func (c *VpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnGateways.setLabels", // "parameterOrder": [ @@ -158449,7 +168274,7 @@ type VpnGatewaysTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *VpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnGatewaysTestIamPermissionsCall { c := &VpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -158486,6 +168311,7 @@ func (c *VpnGatewaysTestIamPermissionsCall) Header() http.Header { func (c *VpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -158551,7 +168377,7 @@ func (c *VpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnGateways.testIamPermissions", // "parameterOrder": [ @@ -158609,7 +168435,8 @@ type VpnTunnelsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of VPN tunnels. +// AggregatedList: Retrieves an aggregated list of VPN tunnels. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall { c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -158716,6 +168543,7 @@ func (c *VpnTunnelsAggregatedListCall) Header() http.Header { func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -158777,7 +168605,7 @@ func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTun } return ret, nil // { - // "description": "Retrieves an aggregated list of VPN tunnels.", + // "description": "Retrieves an aggregated list of VPN tunnels. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnTunnels.aggregatedList", // "parameterOrder": [ @@ -158861,7 +168689,8 @@ type VpnTunnelsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified VpnTunnel resource. +// Delete: Deletes the specified VpnTunnel resource. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel string) *VpnTunnelsDeleteCall { c := &VpnTunnelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -158916,6 +168745,7 @@ func (c *VpnTunnelsDeleteCall) Header() http.Header { func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -158976,7 +168806,7 @@ func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Deletes the specified VpnTunnel resource.", + // "description": "Deletes the specified VpnTunnel resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.vpnTunnels.delete", // "parameterOrder": [ @@ -159038,7 +168868,8 @@ type VpnTunnelsGetCall struct { } // Get: Returns the specified VpnTunnel resource. Gets a list of -// available VPN tunnels by making a list() request. +// available VPN tunnels by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall { c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -159084,6 +168915,7 @@ func (c *VpnTunnelsGetCall) Header() http.Header { func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -159147,7 +168979,7 @@ func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error) } return ret, nil // { - // "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.", + // "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnTunnels.get", // "parameterOrder": [ @@ -159204,7 +169036,8 @@ type VpnTunnelsInsertCall struct { } // Insert: Creates a VpnTunnel resource in the specified project and -// region using the data included in the request. +// region using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *VpnTunnel) *VpnTunnelsInsertCall { c := &VpnTunnelsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -159259,6 +169092,7 @@ func (c *VpnTunnelsInsertCall) Header() http.Header { func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -159323,7 +169157,7 @@ func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", + // "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnTunnels.insert", // "parameterOrder": [ @@ -159379,7 +169213,8 @@ type VpnTunnelsListCall struct { } // List: Retrieves a list of VpnTunnel resources contained in the -// specified project and region. +// specified project and region. (== suppress_warning http-rest-shadowed +// ==) func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall { c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -159487,6 +169322,7 @@ func (c *VpnTunnelsListCall) Header() http.Header { func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -159549,7 +169385,7 @@ func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, e } return ret, nil // { - // "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", + // "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnTunnels.list", // "parameterOrder": [ @@ -159643,7 +169479,8 @@ type VpnTunnelsSetLabelsCall struct { } // SetLabels: Sets the labels on a VpnTunnel. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *VpnTunnelsSetLabelsCall { c := &VpnTunnelsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -159699,6 +169536,7 @@ func (c *VpnTunnelsSetLabelsCall) Header() http.Header { func (c *VpnTunnelsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -159764,7 +169602,7 @@ func (c *VpnTunnelsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnTunnels.setLabels", // "parameterOrder": [ @@ -159829,7 +169667,7 @@ type VpnTunnelsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnTunnelsTestIamPermissionsCall { c := &VpnTunnelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -159866,6 +169704,7 @@ func (c *VpnTunnelsTestIamPermissionsCall) Header() http.Header { func (c *VpnTunnelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -159931,7 +169770,7 @@ func (c *VpnTunnelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Te } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnTunnels.testIamPermissions", // "parameterOrder": [ @@ -159990,7 +169829,8 @@ type ZoneOperationsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified zone-specific Operations resource. +// Delete: Deletes the specified zone-specific Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/delete func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall { c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -160027,6 +169867,7 @@ func (c *ZoneOperationsDeleteCall) Header() http.Header { func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -160062,7 +169903,7 @@ func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deletes the specified zone-specific Operations resource.", + // "description": "Deletes the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.zoneOperations.delete", // "parameterOrder": [ @@ -160115,7 +169956,8 @@ type ZoneOperationsGetCall struct { header_ http.Header } -// Get: Retrieves the specified zone-specific Operations resource. +// Get: Retrieves the specified zone-specific Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/get func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall { c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -160162,6 +170004,7 @@ func (c *ZoneOperationsGetCall) Header() http.Header { func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -160225,7 +170068,7 @@ func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Retrieves the specified zone-specific Operations resource.", + // "description": "Retrieves the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zoneOperations.get", // "parameterOrder": [ @@ -160282,7 +170125,7 @@ type ZoneOperationsListCall struct { } // List: Retrieves a list of Operation resources contained within the -// specified zone. +// specified zone. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/list func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -160391,6 +170234,7 @@ func (c *ZoneOperationsListCall) Header() http.Header { func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -160453,7 +170297,7 @@ func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationLis } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified zone.", + // "description": "Retrieves a list of Operation resources contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zoneOperations.list", // "parameterOrder": [ @@ -160554,7 +170398,7 @@ type ZoneOperationsWaitCall struct { // can wait less than the default deadline or zero seconds, in overload // situations. b. There is no guarantee that the operation is actually // done when returns. 4. User should be prepared to retry if the -// operation is not DONE. +// operation is not DONE. (== suppress_warning http-rest-shadowed ==) func (r *ZoneOperationsService) Wait(project string, zone string, operation string) *ZoneOperationsWaitCall { c := &ZoneOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -160590,6 +170434,7 @@ func (c *ZoneOperationsWaitCall) Header() http.Header { func (c *ZoneOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -160650,7 +170495,7 @@ func (c *ZoneOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Waits for the specified zone-specific Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE.", + // "description": "Waits for the specified zone-specific Operations resource until it is done or timeout, and retrieves the specified Operations resource. 1. Immediately returns when the operation is already done. 2. Waits for no more than the default deadline (2 minutes, subject to change) and then returns the current state of the operation, which may be DONE or still in progress. 3. Is best-effort: a. The server can wait less than the default deadline or zero seconds, in overload situations. b. There is no guarantee that the operation is actually done when returns. 4. User should be prepared to retry if the operation is not DONE. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.zoneOperations.wait", // "parameterOrder": [ @@ -160707,7 +170552,8 @@ type ZonesGetCall struct { } // Get: Returns the specified Zone resource. Gets a list of available -// zones by making a list() request. +// zones by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zones/get func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -160753,6 +170599,7 @@ func (c *ZonesGetCall) Header() http.Header { func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -160815,7 +170662,7 @@ func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) { } return ret, nil // { - // "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request.", + // "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zones.get", // "parameterOrder": [ @@ -160863,7 +170710,7 @@ type ZonesListCall struct { } // List: Retrieves the list of Zone resources available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zones/list func (r *ZonesService) List(project string) *ZonesListCall { c := &ZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -160971,6 +170818,7 @@ func (c *ZonesListCall) Header() http.Header { func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -161032,7 +170880,7 @@ func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) { } return ret, nil // { - // "description": "Retrieves the list of Zone resources available to the specified project.", + // "description": "Retrieves the list of Zone resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zones.list", // "parameterOrder": [ diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json b/vendor/google.golang.org/api/compute/v0.beta/compute-api.json index 5d69c1962dd..7d5a6197518 100644 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json +++ b/vendor/google.golang.org/api/compute/v0.beta/compute-api.json @@ -24,12 +24,12 @@ } }, "basePath": "/compute/beta/projects/", - "baseUrl": "https://www.googleapis.com/compute/beta/projects/", + "baseUrl": "https://compute.googleapis.com/compute/beta/projects/", "batchPath": "batch/compute/beta", "description": "Creates and runs virtual machines on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "etag": "\"VPK3KBfpaEgZ16pozGOoMYfKc0U/_AHzCpq0AAQFZQWJBiL19RSPIkQ\"", + "etag": "\"F5McR9eEaw0XRpaO3M9gbIugkbs/hKefFaV_EHeuWl56VWtayyiw33A\"", "icons": { "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" @@ -89,7 +89,7 @@ "acceleratorTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of accelerator types.", + "description": "Retrieves an aggregated list of accelerator types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.acceleratorTypes.aggregatedList", "parameterOrder": [ @@ -138,7 +138,7 @@ ] }, "get": { - "description": "Returns the specified accelerator type.", + "description": "Returns the specified accelerator type. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.acceleratorTypes.get", "parameterOrder": [ @@ -180,7 +180,7 @@ ] }, "list": { - "description": "Retrieves a list of accelerator types available to the specified project.", + "description": "Retrieves a list of accelerator types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.acceleratorTypes.list", "parameterOrder": [ @@ -241,7 +241,7 @@ "addresses": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of addresses.", + "description": "Retrieves an aggregated list of addresses. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.addresses.aggregatedList", "parameterOrder": [ @@ -290,7 +290,7 @@ ] }, "delete": { - "description": "Deletes the specified address resource.", + "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.addresses.delete", "parameterOrder": [ @@ -336,7 +336,7 @@ ] }, "get": { - "description": "Returns the specified address resource.", + "description": "Returns the specified address resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.addresses.get", "parameterOrder": [ @@ -378,7 +378,7 @@ ] }, "insert": { - "description": "Creates an address resource in the specified project using the data included in the request.", + "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.addresses.insert", "parameterOrder": [ @@ -419,7 +419,7 @@ ] }, "list": { - "description": "Retrieves a list of addresses contained within the specified region.", + "description": "Retrieves a list of addresses contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.addresses.list", "parameterOrder": [ @@ -476,7 +476,7 @@ ] }, "setLabels": { - "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.addresses.setLabels", "parameterOrder": [ @@ -525,7 +525,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.addresses.testIamPermissions", "parameterOrder": [ @@ -574,7 +574,7 @@ "autoscalers": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of autoscalers.", + "description": "Retrieves an aggregated list of autoscalers. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.autoscalers.aggregatedList", "parameterOrder": [ @@ -623,7 +623,7 @@ ] }, "delete": { - "description": "Deletes the specified autoscaler.", + "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.autoscalers.delete", "parameterOrder": [ @@ -669,7 +669,7 @@ ] }, "get": { - "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.", + "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.autoscalers.get", "parameterOrder": [ @@ -711,7 +711,7 @@ ] }, "insert": { - "description": "Creates an autoscaler in the specified project using the data included in the request.", + "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.autoscalers.insert", "parameterOrder": [ @@ -752,7 +752,7 @@ ] }, "list": { - "description": "Retrieves a list of autoscalers contained within the specified zone.", + "description": "Retrieves a list of autoscalers contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.autoscalers.list", "parameterOrder": [ @@ -809,7 +809,7 @@ ] }, "patch": { - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.autoscalers.patch", "parameterOrder": [ @@ -856,7 +856,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.autoscalers.testIamPermissions", "parameterOrder": [ @@ -901,7 +901,7 @@ ] }, "update": { - "description": "Updates an autoscaler in the specified project using the data included in the request.", + "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.autoscalers.update", "parameterOrder": [ @@ -952,7 +952,7 @@ "backendBuckets": { "methods": { "addSignedUrlKey": { - "description": "Adds a key for validating requests with signed URLs for this backend bucket.", + "description": "Adds a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendBuckets.addSignedUrlKey", "parameterOrder": [ @@ -992,7 +992,7 @@ ] }, "delete": { - "description": "Deletes the specified BackendBucket resource.", + "description": "Deletes the specified BackendBucket resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.backendBuckets.delete", "parameterOrder": [ @@ -1030,7 +1030,7 @@ ] }, "deleteSignedUrlKey": { - "description": "Deletes a key for validating requests with signed URLs for this backend bucket.", + "description": "Deletes a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendBuckets.deleteSignedUrlKey", "parameterOrder": [ @@ -1074,7 +1074,7 @@ ] }, "get": { - "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request.", + "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendBuckets.get", "parameterOrder": [ @@ -1108,7 +1108,7 @@ ] }, "insert": { - "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", + "description": "Creates a BackendBucket resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendBuckets.insert", "parameterOrder": [ @@ -1141,7 +1141,7 @@ ] }, "list": { - "description": "Retrieves the list of BackendBucket resources available to the specified project.", + "description": "Retrieves the list of BackendBucket resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendBuckets.list", "parameterOrder": [ @@ -1190,7 +1190,7 @@ ] }, "patch": { - "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.backendBuckets.patch", "parameterOrder": [ @@ -1231,7 +1231,7 @@ ] }, "update": { - "description": "Updates the specified BackendBucket resource with the data included in the request.", + "description": "Updates the specified BackendBucket resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.backendBuckets.update", "parameterOrder": [ @@ -1276,7 +1276,7 @@ "backendServices": { "methods": { "addSignedUrlKey": { - "description": "Adds a key for validating requests with signed URLs for this backend service.", + "description": "Adds a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.addSignedUrlKey", "parameterOrder": [ @@ -1316,7 +1316,7 @@ ] }, "aggregatedList": { - "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendServices.aggregatedList", "parameterOrder": [ @@ -1365,7 +1365,7 @@ ] }, "delete": { - "description": "Deletes the specified BackendService resource.", + "description": "Deletes the specified BackendService resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.backendServices.delete", "parameterOrder": [ @@ -1403,7 +1403,7 @@ ] }, "deleteSignedUrlKey": { - "description": "Deletes a key for validating requests with signed URLs for this backend service.", + "description": "Deletes a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.deleteSignedUrlKey", "parameterOrder": [ @@ -1447,7 +1447,7 @@ ] }, "get": { - "description": "Returns the specified BackendService resource. Gets a list of available backend services.", + "description": "Returns the specified BackendService resource. Gets a list of available backend services. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendServices.get", "parameterOrder": [ @@ -1481,7 +1481,7 @@ ] }, "getHealth": { - "description": "Gets the most recent health check results for this BackendService.", + "description": "Gets the most recent health check results for this BackendService. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.getHealth", "parameterOrder": [ @@ -1517,7 +1517,7 @@ ] }, "insert": { - "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", + "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.insert", "parameterOrder": [ @@ -1550,7 +1550,7 @@ ] }, "list": { - "description": "Retrieves the list of BackendService resources available to the specified project.", + "description": "Retrieves the list of BackendService resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendServices.list", "parameterOrder": [ @@ -1599,7 +1599,7 @@ ] }, "patch": { - "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.backendServices.patch", "parameterOrder": [ @@ -1640,7 +1640,7 @@ ] }, "setSecurityPolicy": { - "description": "Sets the security policy for the specified backend service.", + "description": "Sets the security policy for the specified backend service. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.setSecurityPolicy", "parameterOrder": [ @@ -1680,7 +1680,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.testIamPermissions", "parameterOrder": [ @@ -1717,7 +1717,7 @@ ] }, "update": { - "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.backendServices.update", "parameterOrder": [ @@ -1762,7 +1762,7 @@ "diskTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of disk types.", + "description": "Retrieves an aggregated list of disk types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.diskTypes.aggregatedList", "parameterOrder": [ @@ -1811,7 +1811,7 @@ ] }, "get": { - "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request.", + "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.diskTypes.get", "parameterOrder": [ @@ -1853,7 +1853,7 @@ ] }, "list": { - "description": "Retrieves a list of disk types available to the specified project.", + "description": "Retrieves a list of disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.diskTypes.list", "parameterOrder": [ @@ -1914,7 +1914,7 @@ "disks": { "methods": { "addResourcePolicies": { - "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", + "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.addResourcePolicies", "parameterOrder": [ @@ -1963,7 +1963,7 @@ ] }, "aggregatedList": { - "description": "Retrieves an aggregated list of persistent disks.", + "description": "Retrieves an aggregated list of persistent disks. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.aggregatedList", "parameterOrder": [ @@ -2012,7 +2012,7 @@ ] }, "createSnapshot": { - "description": "Creates a snapshot of a specified persistent disk.", + "description": "Creates a snapshot of a specified persistent disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.createSnapshot", "parameterOrder": [ @@ -2066,7 +2066,7 @@ ] }, "delete": { - "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.disks.delete", "parameterOrder": [ @@ -2111,7 +2111,7 @@ ] }, "get": { - "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.", + "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.get", "parameterOrder": [ @@ -2153,7 +2153,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.getIamPolicy", "parameterOrder": [ @@ -2162,6 +2162,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -2195,7 +2201,7 @@ ] }, "insert": { - "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", + "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.insert", "parameterOrder": [ @@ -2241,7 +2247,7 @@ ] }, "list": { - "description": "Retrieves a list of persistent disks contained within the specified zone.", + "description": "Retrieves a list of persistent disks contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.list", "parameterOrder": [ @@ -2298,7 +2304,7 @@ ] }, "removeResourcePolicies": { - "description": "Removes resource policies from a disk.", + "description": "Removes resource policies from a disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.removeResourcePolicies", "parameterOrder": [ @@ -2347,7 +2353,7 @@ ] }, "resize": { - "description": "Resizes the specified persistent disk. You can only increase the size of the disk.", + "description": "Resizes the specified persistent disk. You can only increase the size of the disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.resize", "parameterOrder": [ @@ -2396,7 +2402,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.setIamPolicy", "parameterOrder": [ @@ -2440,7 +2446,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.setLabels", "parameterOrder": [ @@ -2489,7 +2495,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.testIamPermissions", "parameterOrder": [ @@ -2538,7 +2544,7 @@ "externalVpnGateways": { "methods": { "delete": { - "description": "Deletes the specified externalVpnGateway.", + "description": "Deletes the specified externalVpnGateway. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.externalVpnGateways.delete", "parameterOrder": [ @@ -2576,7 +2582,7 @@ ] }, "get": { - "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.", + "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.externalVpnGateways.get", "parameterOrder": [ @@ -2610,7 +2616,7 @@ ] }, "insert": { - "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request.", + "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.externalVpnGateways.insert", "parameterOrder": [ @@ -2643,7 +2649,7 @@ ] }, "list": { - "description": "Retrieves the list of ExternalVpnGateway available to the specified project.", + "description": "Retrieves the list of ExternalVpnGateway available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.externalVpnGateways.list", "parameterOrder": [ @@ -2692,7 +2698,7 @@ ] }, "setLabels": { - "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.externalVpnGateways.setLabels", "parameterOrder": [ @@ -2728,7 +2734,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.externalVpnGateways.testIamPermissions", "parameterOrder": [ @@ -2769,7 +2775,7 @@ "firewalls": { "methods": { "delete": { - "description": "Deletes the specified firewall.", + "description": "Deletes the specified firewall. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.firewalls.delete", "parameterOrder": [ @@ -2807,7 +2813,7 @@ ] }, "get": { - "description": "Returns the specified firewall.", + "description": "Returns the specified firewall. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.firewalls.get", "parameterOrder": [ @@ -2841,7 +2847,7 @@ ] }, "insert": { - "description": "Creates a firewall rule in the specified project using the data included in the request.", + "description": "Creates a firewall rule in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.firewalls.insert", "parameterOrder": [ @@ -2874,7 +2880,7 @@ ] }, "list": { - "description": "Retrieves the list of firewall rules available to the specified project.", + "description": "Retrieves the list of firewall rules available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.firewalls.list", "parameterOrder": [ @@ -2923,7 +2929,7 @@ ] }, "patch": { - "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.firewalls.patch", "parameterOrder": [ @@ -2964,7 +2970,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.firewalls.testIamPermissions", "parameterOrder": [ @@ -3001,7 +3007,7 @@ ] }, "update": { - "description": "Updates the specified firewall rule with the data included in the request. The PUT method can only update the following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", + "description": "Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.firewalls.update", "parameterOrder": [ @@ -3046,7 +3052,7 @@ "forwardingRules": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of forwarding rules.", + "description": "Retrieves an aggregated list of forwarding rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.forwardingRules.aggregatedList", "parameterOrder": [ @@ -3095,7 +3101,7 @@ ] }, "delete": { - "description": "Deletes the specified ForwardingRule resource.", + "description": "Deletes the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.forwardingRules.delete", "parameterOrder": [ @@ -3141,7 +3147,7 @@ ] }, "get": { - "description": "Returns the specified ForwardingRule resource.", + "description": "Returns the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.forwardingRules.get", "parameterOrder": [ @@ -3183,7 +3189,7 @@ ] }, "insert": { - "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.forwardingRules.insert", "parameterOrder": [ @@ -3224,7 +3230,7 @@ ] }, "list": { - "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", + "description": "Retrieves a list of ForwardingRule resources available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.forwardingRules.list", "parameterOrder": [ @@ -3281,7 +3287,7 @@ ] }, "patch": { - "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.forwardingRules.patch", "parameterOrder": [ @@ -3330,7 +3336,7 @@ ] }, "setLabels": { - "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.forwardingRules.setLabels", "parameterOrder": [ @@ -3379,7 +3385,7 @@ ] }, "setTarget": { - "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", + "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.forwardingRules.setTarget", "parameterOrder": [ @@ -3428,7 +3434,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.forwardingRules.testIamPermissions", "parameterOrder": [ @@ -3477,7 +3483,7 @@ "globalAddresses": { "methods": { "delete": { - "description": "Deletes the specified address resource.", + "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.globalAddresses.delete", "parameterOrder": [ @@ -3515,7 +3521,7 @@ ] }, "get": { - "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request.", + "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalAddresses.get", "parameterOrder": [ @@ -3549,7 +3555,7 @@ ] }, "insert": { - "description": "Creates an address resource in the specified project using the data included in the request.", + "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalAddresses.insert", "parameterOrder": [ @@ -3582,7 +3588,7 @@ ] }, "list": { - "description": "Retrieves a list of global addresses.", + "description": "Retrieves a list of global addresses. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalAddresses.list", "parameterOrder": [ @@ -3631,7 +3637,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalAddresses.setLabels", "parameterOrder": [ @@ -3667,7 +3673,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalAddresses.testIamPermissions", "parameterOrder": [ @@ -3708,7 +3714,7 @@ "globalForwardingRules": { "methods": { "delete": { - "description": "Deletes the specified GlobalForwardingRule resource.", + "description": "Deletes the specified GlobalForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.globalForwardingRules.delete", "parameterOrder": [ @@ -3746,7 +3752,7 @@ ] }, "get": { - "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.", + "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalForwardingRules.get", "parameterOrder": [ @@ -3780,7 +3786,7 @@ ] }, "insert": { - "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", + "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalForwardingRules.insert", "parameterOrder": [ @@ -3813,7 +3819,7 @@ ] }, "list": { - "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", + "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalForwardingRules.list", "parameterOrder": [ @@ -3862,7 +3868,7 @@ ] }, "patch": { - "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.globalForwardingRules.patch", "parameterOrder": [ @@ -3903,7 +3909,7 @@ ] }, "setLabels": { - "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalForwardingRules.setLabels", "parameterOrder": [ @@ -3939,7 +3945,7 @@ ] }, "setTarget": { - "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", + "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalForwardingRules.setTarget", "parameterOrder": [ @@ -3980,7 +3986,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalForwardingRules.testIamPermissions", "parameterOrder": [ @@ -4021,7 +4027,7 @@ "globalOperations": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of all operations.", + "description": "Retrieves an aggregated list of all operations. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalOperations.aggregatedList", "parameterOrder": [ @@ -4070,7 +4076,7 @@ ] }, "delete": { - "description": "Deletes the specified Operations resource.", + "description": "Deletes the specified Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.globalOperations.delete", "parameterOrder": [ @@ -4100,7 +4106,7 @@ ] }, "get": { - "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request.", + "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalOperations.get", "parameterOrder": [ @@ -4134,7 +4140,7 @@ ] }, "list": { - "description": "Retrieves a list of Operation resources contained within the specified project.", + "description": "Retrieves a list of Operation resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalOperations.list", "parameterOrder": [ @@ -4187,7 +4193,7 @@ "healthChecks": { "methods": { "aggregatedList": { - "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.healthChecks.aggregatedList", "parameterOrder": [ @@ -4236,7 +4242,7 @@ ] }, "delete": { - "description": "Deletes the specified HealthCheck resource.", + "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.healthChecks.delete", "parameterOrder": [ @@ -4274,7 +4280,7 @@ ] }, "get": { - "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", + "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.healthChecks.get", "parameterOrder": [ @@ -4308,7 +4314,7 @@ ] }, "insert": { - "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.healthChecks.insert", "parameterOrder": [ @@ -4341,7 +4347,7 @@ ] }, "list": { - "description": "Retrieves the list of HealthCheck resources available to the specified project.", + "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.healthChecks.list", "parameterOrder": [ @@ -4390,7 +4396,7 @@ ] }, "patch": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.healthChecks.patch", "parameterOrder": [ @@ -4431,7 +4437,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.healthChecks.testIamPermissions", "parameterOrder": [ @@ -4468,7 +4474,7 @@ ] }, "update": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.healthChecks.update", "parameterOrder": [ @@ -4513,7 +4519,7 @@ "httpHealthChecks": { "methods": { "delete": { - "description": "Deletes the specified HttpHealthCheck resource.", + "description": "Deletes the specified HttpHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.httpHealthChecks.delete", "parameterOrder": [ @@ -4551,7 +4557,7 @@ ] }, "get": { - "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request.", + "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpHealthChecks.get", "parameterOrder": [ @@ -4585,7 +4591,7 @@ ] }, "insert": { - "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.httpHealthChecks.insert", "parameterOrder": [ @@ -4618,7 +4624,7 @@ ] }, "list": { - "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", + "description": "Retrieves the list of HttpHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpHealthChecks.list", "parameterOrder": [ @@ -4667,7 +4673,7 @@ ] }, "patch": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.httpHealthChecks.patch", "parameterOrder": [ @@ -4708,7 +4714,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.httpHealthChecks.testIamPermissions", "parameterOrder": [ @@ -4745,7 +4751,7 @@ ] }, "update": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.httpHealthChecks.update", "parameterOrder": [ @@ -4790,7 +4796,7 @@ "httpsHealthChecks": { "methods": { "delete": { - "description": "Deletes the specified HttpsHealthCheck resource.", + "description": "Deletes the specified HttpsHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.httpsHealthChecks.delete", "parameterOrder": [ @@ -4828,7 +4834,7 @@ ] }, "get": { - "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request.", + "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpsHealthChecks.get", "parameterOrder": [ @@ -4862,7 +4868,7 @@ ] }, "insert": { - "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.httpsHealthChecks.insert", "parameterOrder": [ @@ -4895,7 +4901,7 @@ ] }, "list": { - "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", + "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpsHealthChecks.list", "parameterOrder": [ @@ -4944,7 +4950,7 @@ ] }, "patch": { - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.httpsHealthChecks.patch", "parameterOrder": [ @@ -4985,7 +4991,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.httpsHealthChecks.testIamPermissions", "parameterOrder": [ @@ -5022,7 +5028,7 @@ ] }, "update": { - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.httpsHealthChecks.update", "parameterOrder": [ @@ -5067,7 +5073,7 @@ "images": { "methods": { "delete": { - "description": "Deletes the specified image.", + "description": "Deletes the specified image. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.images.delete", "parameterOrder": [ @@ -5105,7 +5111,7 @@ ] }, "deprecate": { - "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", + "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.deprecate", "parameterOrder": [ @@ -5146,7 +5152,7 @@ ] }, "get": { - "description": "Returns the specified image. Gets a list of available images by making a list() request.", + "description": "Returns the specified image. Gets a list of available images by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.get", "parameterOrder": [ @@ -5180,7 +5186,7 @@ ] }, "getFromFamily": { - "description": "Returns the latest image that is part of an image family and is not deprecated.", + "description": "Returns the latest image that is part of an image family and is not deprecated. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.getFromFamily", "parameterOrder": [ @@ -5214,7 +5220,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.getIamPolicy", "parameterOrder": [ @@ -5222,6 +5228,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -5248,7 +5260,7 @@ ] }, "insert": { - "description": "Creates an image in the specified project using the data included in the request.", + "description": "Creates an image in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.insert", "parameterOrder": [ @@ -5289,7 +5301,7 @@ ] }, "list": { - "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.list", "parameterOrder": [ @@ -5338,7 +5350,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.setIamPolicy", "parameterOrder": [ @@ -5374,7 +5386,7 @@ ] }, "setLabels": { - "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.setLabels", "parameterOrder": [ @@ -5410,7 +5422,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.testIamPermissions", "parameterOrder": [ @@ -5451,7 +5463,7 @@ "instanceGroupManagers": { "methods": { "abandonInstances": { - "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.abandonInstances", "parameterOrder": [ @@ -5498,7 +5510,7 @@ ] }, "aggregatedList": { - "description": "Retrieves the list of managed instance groups and groups them by zone.", + "description": "Retrieves the list of managed instance groups and groups them by zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroupManagers.aggregatedList", "parameterOrder": [ @@ -5547,7 +5559,7 @@ ] }, "applyUpdatesToInstances": { - "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.", + "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.applyUpdatesToInstances", "parameterOrder": [ @@ -5588,8 +5600,55 @@ "https://www.googleapis.com/auth/compute" ] }, + "createInstances": { + "description": "Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.instanceGroupManagers.createInstances", + "parameterOrder": [ + "project", + "zone", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group. It should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances", + "request": { + "$ref": "InstanceGroupManagersCreateInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "delete": { - "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", + "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instanceGroupManagers.delete", "parameterOrder": [ @@ -5633,7 +5692,7 @@ ] }, "deleteInstances": { - "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.deleteInstances", "parameterOrder": [ @@ -5680,7 +5739,7 @@ ] }, "get": { - "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.", + "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroupManagers.get", "parameterOrder": [ @@ -5720,7 +5779,7 @@ ] }, "insert": { - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.insert", "parameterOrder": [ @@ -5760,7 +5819,7 @@ ] }, "list": { - "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", + "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroupManagers.list", "parameterOrder": [ @@ -5816,7 +5875,7 @@ ] }, "listManagedInstances": { - "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", + "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.listManagedInstances", "parameterOrder": [ @@ -5879,7 +5938,7 @@ ] }, "patch": { - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instanceGroupManagers.patch", "parameterOrder": [ @@ -5926,7 +5985,7 @@ ] }, "recreateInstances": { - "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.recreateInstances", "parameterOrder": [ @@ -5973,7 +6032,7 @@ ] }, "resize": { - "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.resize", "parameterOrder": [ @@ -6025,7 +6084,7 @@ ] }, "resizeAdvanced": { - "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.resizeAdvanced", "parameterOrder": [ @@ -6072,7 +6131,7 @@ ] }, "setAutoHealingPolicies": { - "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.", + "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.setAutoHealingPolicies", "parameterOrder": [ @@ -6119,7 +6178,7 @@ ] }, "setInstanceTemplate": { - "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", + "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.setInstanceTemplate", "parameterOrder": [ @@ -6166,7 +6225,7 @@ ] }, "setTargetPools": { - "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", + "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.setTargetPools", "parameterOrder": [ @@ -6213,7 +6272,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.testIamPermissions", "parameterOrder": [ @@ -6258,7 +6317,7 @@ ] }, "update": { - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.instanceGroupManagers.update", "parameterOrder": [ @@ -6309,7 +6368,7 @@ "instanceGroups": { "methods": { "addInstances": { - "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", + "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.addInstances", "parameterOrder": [ @@ -6356,7 +6415,7 @@ ] }, "aggregatedList": { - "description": "Retrieves the list of instance groups and sorts them by zone.", + "description": "Retrieves the list of instance groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroups.aggregatedList", "parameterOrder": [ @@ -6405,7 +6464,7 @@ ] }, "delete": { - "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", + "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instanceGroups.delete", "parameterOrder": [ @@ -6449,7 +6508,7 @@ ] }, "get": { - "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request.", + "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroups.get", "parameterOrder": [ @@ -6489,7 +6548,7 @@ ] }, "insert": { - "description": "Creates an instance group in the specified project using the parameters that are included in the request.", + "description": "Creates an instance group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.insert", "parameterOrder": [ @@ -6529,7 +6588,7 @@ ] }, "list": { - "description": "Retrieves the list of instance groups that are located in the specified project and zone.", + "description": "Retrieves the list of instance groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroups.list", "parameterOrder": [ @@ -6585,7 +6644,7 @@ ] }, "listInstances": { - "description": "Lists the instances in the specified instance group.", + "description": "Lists the instances in the specified instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.listInstances", "parameterOrder": [ @@ -6651,7 +6710,7 @@ ] }, "removeInstances": { - "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", + "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.removeInstances", "parameterOrder": [ @@ -6698,7 +6757,7 @@ ] }, "setNamedPorts": { - "description": "Sets the named ports for the specified instance group.", + "description": "Sets the named ports for the specified instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.setNamedPorts", "parameterOrder": [ @@ -6745,7 +6804,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.testIamPermissions", "parameterOrder": [ @@ -6794,7 +6853,7 @@ "instanceTemplates": { "methods": { "delete": { - "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", + "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instanceTemplates.delete", "parameterOrder": [ @@ -6832,7 +6891,7 @@ ] }, "get": { - "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request.", + "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceTemplates.get", "parameterOrder": [ @@ -6866,7 +6925,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceTemplates.getIamPolicy", "parameterOrder": [ @@ -6874,6 +6933,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -6900,7 +6965,7 @@ ] }, "insert": { - "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", + "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceTemplates.insert", "parameterOrder": [ @@ -6933,7 +6998,7 @@ ] }, "list": { - "description": "Retrieves a list of instance templates that are contained within the specified project.", + "description": "Retrieves a list of instance templates that are contained within the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceTemplates.list", "parameterOrder": [ @@ -6982,7 +7047,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceTemplates.setIamPolicy", "parameterOrder": [ @@ -7018,7 +7083,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceTemplates.testIamPermissions", "parameterOrder": [ @@ -7059,7 +7124,7 @@ "instances": { "methods": { "addAccessConfig": { - "description": "Adds an access config to an instance's network interface.", + "description": "Adds an access config to an instance's network interface. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.addAccessConfig", "parameterOrder": [ @@ -7115,7 +7180,7 @@ ] }, "aggregatedList": { - "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones.", + "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.aggregatedList", "parameterOrder": [ @@ -7164,7 +7229,7 @@ ] }, "attachDisk": { - "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", + "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.attachDisk", "parameterOrder": [ @@ -7218,7 +7283,7 @@ ] }, "delete": { - "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", + "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instances.delete", "parameterOrder": [ @@ -7264,7 +7329,7 @@ ] }, "deleteAccessConfig": { - "description": "Deletes an access config from an instance's network interface.", + "description": "Deletes an access config from an instance's network interface. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.deleteAccessConfig", "parameterOrder": [ @@ -7324,7 +7389,7 @@ ] }, "detachDisk": { - "description": "Detaches a disk from an instance.", + "description": "Detaches a disk from an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.detachDisk", "parameterOrder": [ @@ -7377,7 +7442,7 @@ ] }, "get": { - "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request.", + "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.get", "parameterOrder": [ @@ -7419,7 +7484,7 @@ ] }, "getGuestAttributes": { - "description": "Returns the specified guest attributes entry.", + "description": "Returns the specified guest attributes entry. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getGuestAttributes", "parameterOrder": [ @@ -7471,7 +7536,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getIamPolicy", "parameterOrder": [ @@ -7480,6 +7545,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -7513,7 +7584,7 @@ ] }, "getSerialPortOutput": { - "description": "Returns the last 1 MB of serial port output from the specified instance.", + "description": "Returns the last 1 MB of serial port output from the specified instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getSerialPortOutput", "parameterOrder": [ @@ -7570,7 +7641,7 @@ ] }, "getShieldedInstanceIdentity": { - "description": "Returns the Shielded Instance Identity of an instance", + "description": "Returns the Shielded Instance Identity of an instance (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getShieldedInstanceIdentity", "parameterOrder": [ @@ -7612,7 +7683,7 @@ ] }, "getShieldedVmIdentity": { - "description": "Returns the Shielded VM Identity of an instance", + "description": "Returns the Shielded VM Identity of an instance (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getShieldedVmIdentity", "parameterOrder": [ @@ -7654,7 +7725,7 @@ ] }, "insert": { - "description": "Creates an instance resource in the specified project using the data included in the request.", + "description": "Creates an instance resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.insert", "parameterOrder": [ @@ -7679,6 +7750,11 @@ "location": "query", "type": "string" }, + "sourceMachineImage": { + "description": "Specifies instance machine to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage \n- projects/project/global/global/machineImages/machineImage \n- global/machineImages/machineImage", + "location": "query", + "type": "string" + }, "zone": { "description": "The name of the zone for this request.", "location": "path", @@ -7700,7 +7776,7 @@ ] }, "list": { - "description": "Retrieves the list of instances contained within the specified zone.", + "description": "Retrieves the list of instances contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.list", "parameterOrder": [ @@ -7757,7 +7833,7 @@ ] }, "listReferrers": { - "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.", + "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.listReferrers", "parameterOrder": [ @@ -7822,7 +7898,7 @@ ] }, "reset": { - "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", + "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.reset", "parameterOrder": [ @@ -7868,7 +7944,7 @@ ] }, "resume": { - "description": "Resumes an instance that was suspended using the instances().suspend method.", + "description": "Resumes an instance that was suspended using the instances().suspend method. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.resume", "parameterOrder": [ @@ -7917,7 +7993,7 @@ ] }, "setDeletionProtection": { - "description": "Sets deletion protection on the instance.", + "description": "Sets deletion protection on the instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setDeletionProtection", "parameterOrder": [ @@ -7969,7 +8045,7 @@ ] }, "setDiskAutoDelete": { - "description": "Sets the auto-delete flag for a disk attached to an instance.", + "description": "Sets the auto-delete flag for a disk attached to an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setDiskAutoDelete", "parameterOrder": [ @@ -8030,7 +8106,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setIamPolicy", "parameterOrder": [ @@ -8074,7 +8150,7 @@ ] }, "setLabels": { - "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setLabels", "parameterOrder": [ @@ -8123,7 +8199,7 @@ ] }, "setMachineResources": { - "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", + "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMachineResources", "parameterOrder": [ @@ -8172,7 +8248,7 @@ ] }, "setMachineType": { - "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", + "description": "Changes the machine type for a stopped instance to the machine type specified in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMachineType", "parameterOrder": [ @@ -8221,7 +8297,7 @@ ] }, "setMetadata": { - "description": "Sets metadata for the specified instance to the data included in the request.", + "description": "Sets metadata for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMetadata", "parameterOrder": [ @@ -8270,7 +8346,7 @@ ] }, "setMinCpuPlatform": { - "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", + "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMinCpuPlatform", "parameterOrder": [ @@ -8319,7 +8395,7 @@ ] }, "setScheduling": { - "description": "Sets an instance's scheduling options.", + "description": "Sets an instance's scheduling options. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setScheduling", "parameterOrder": [ @@ -8368,7 +8444,7 @@ ] }, "setServiceAccount": { - "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", + "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setServiceAccount", "parameterOrder": [ @@ -8417,7 +8493,7 @@ ] }, "setShieldedInstanceIntegrityPolicy": { - "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.setShieldedInstanceIntegrityPolicy", "parameterOrder": [ @@ -8466,7 +8542,7 @@ ] }, "setShieldedVmIntegrityPolicy": { - "description": "Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.setShieldedVmIntegrityPolicy", "parameterOrder": [ @@ -8515,7 +8591,7 @@ ] }, "setTags": { - "description": "Sets network tags for the specified instance to the data included in the request.", + "description": "Sets network tags for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setTags", "parameterOrder": [ @@ -8564,7 +8640,7 @@ ] }, "simulateMaintenanceEvent": { - "description": "Simulates a maintenance event on the instance.", + "description": "Simulates a maintenance event on the instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.simulateMaintenanceEvent", "parameterOrder": [ @@ -8605,7 +8681,7 @@ ] }, "start": { - "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.start", "parameterOrder": [ @@ -8651,7 +8727,7 @@ ] }, "startWithEncryptionKey": { - "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.startWithEncryptionKey", "parameterOrder": [ @@ -8700,7 +8776,7 @@ ] }, "stop": { - "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", + "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.stop", "parameterOrder": [ @@ -8746,7 +8822,7 @@ ] }, "suspend": { - "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.", + "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.suspend", "parameterOrder": [ @@ -8797,7 +8873,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.testIamPermissions", "parameterOrder": [ @@ -8842,7 +8918,7 @@ ] }, "updateAccessConfig": { - "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.updateAccessConfig", "parameterOrder": [ @@ -8898,7 +8974,7 @@ ] }, "updateDisplayDevice": { - "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.updateDisplayDevice", "parameterOrder": [ @@ -8947,7 +9023,7 @@ ] }, "updateNetworkInterface": { - "description": "Updates an instance's network interface. This method follows PATCH semantics.", + "description": "Updates an instance's network interface. This method follows PATCH semantics. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.updateNetworkInterface", "parameterOrder": [ @@ -9003,7 +9079,7 @@ ] }, "updateShieldedInstanceConfig": { - "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.updateShieldedInstanceConfig", "parameterOrder": [ @@ -9052,7 +9128,7 @@ ] }, "updateShieldedVmConfig": { - "description": "Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.updateShieldedVmConfig", "parameterOrder": [ @@ -9105,7 +9181,7 @@ "interconnectAttachments": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of interconnect attachments.", + "description": "Retrieves an aggregated list of interconnect attachments. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectAttachments.aggregatedList", "parameterOrder": [ @@ -9154,7 +9230,7 @@ ] }, "delete": { - "description": "Deletes the specified interconnect attachment.", + "description": "Deletes the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.interconnectAttachments.delete", "parameterOrder": [ @@ -9200,7 +9276,7 @@ ] }, "get": { - "description": "Returns the specified interconnect attachment.", + "description": "Returns the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectAttachments.get", "parameterOrder": [ @@ -9242,7 +9318,7 @@ ] }, "insert": { - "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", + "description": "Creates an InterconnectAttachment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnectAttachments.insert", "parameterOrder": [ @@ -9283,7 +9359,7 @@ ] }, "list": { - "description": "Retrieves the list of interconnect attachments contained within the specified region.", + "description": "Retrieves the list of interconnect attachments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectAttachments.list", "parameterOrder": [ @@ -9340,7 +9416,7 @@ ] }, "patch": { - "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.interconnectAttachments.patch", "parameterOrder": [ @@ -9389,7 +9465,7 @@ ] }, "setLabels": { - "description": "Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnectAttachments.setLabels", "parameterOrder": [ @@ -9438,7 +9514,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnectAttachments.testIamPermissions", "parameterOrder": [ @@ -9487,7 +9563,7 @@ "interconnectLocations": { "methods": { "get": { - "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.", + "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectLocations.get", "parameterOrder": [ @@ -9521,7 +9597,7 @@ ] }, "list": { - "description": "Retrieves the list of interconnect locations available to the specified project.", + "description": "Retrieves the list of interconnect locations available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectLocations.list", "parameterOrder": [ @@ -9574,7 +9650,7 @@ "interconnects": { "methods": { "delete": { - "description": "Deletes the specified interconnect.", + "description": "Deletes the specified interconnect. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.interconnects.delete", "parameterOrder": [ @@ -9612,7 +9688,7 @@ ] }, "get": { - "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.", + "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnects.get", "parameterOrder": [ @@ -9646,7 +9722,7 @@ ] }, "getDiagnostics": { - "description": "Returns the interconnectDiagnostics for the specified interconnect.", + "description": "Returns the interconnectDiagnostics for the specified interconnect. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnects.getDiagnostics", "parameterOrder": [ @@ -9680,7 +9756,7 @@ ] }, "insert": { - "description": "Creates a Interconnect in the specified project using the data included in the request.", + "description": "Creates a Interconnect in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnects.insert", "parameterOrder": [ @@ -9713,7 +9789,7 @@ ] }, "list": { - "description": "Retrieves the list of interconnect available to the specified project.", + "description": "Retrieves the list of interconnect available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnects.list", "parameterOrder": [ @@ -9762,7 +9838,7 @@ ] }, "patch": { - "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.interconnects.patch", "parameterOrder": [ @@ -9803,7 +9879,7 @@ ] }, "setLabels": { - "description": "Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnects.setLabels", "parameterOrder": [ @@ -9839,7 +9915,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnects.testIamPermissions", "parameterOrder": [ @@ -9880,7 +9956,7 @@ "licenseCodes": { "methods": { "get": { - "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code.", + "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenseCodes.get", "parameterOrder": [ @@ -9918,7 +9994,7 @@ "licenses": { "methods": { "delete": { - "description": "Deletes the specified license.", + "description": "Deletes the specified license. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.licenses.delete", "parameterOrder": [ @@ -9956,7 +10032,7 @@ ] }, "get": { - "description": "Returns the specified License resource.", + "description": "Returns the specified License resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenses.get", "parameterOrder": [ @@ -9990,7 +10066,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenses.getIamPolicy", "parameterOrder": [ @@ -9998,6 +10074,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -10024,7 +10106,7 @@ ] }, "insert": { - "description": "Create a License resource in the specified project.", + "description": "Create a License resource in the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.licenses.insert", "parameterOrder": [ @@ -10060,7 +10142,7 @@ ] }, "list": { - "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenses.list", "parameterOrder": [ @@ -10109,7 +10191,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.licenses.setIamPolicy", "parameterOrder": [ @@ -10146,10 +10228,286 @@ } } }, + "machineImages": { + "methods": { + "delete": { + "description": "Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.machineImages.delete", + "parameterOrder": [ + "project", + "machineImage" + ], + "parameters": { + "machineImage": { + "description": "The name of the machine image to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/machineImages/{machineImage}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified machine image. Gets a list of available machine images by making a list() request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.machineImages.get", + "parameterOrder": [ + "project", + "machineImage" + ], + "parameters": { + "machineImage": { + "description": "The name of the machine image.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/machineImages/{machineImage}", + "response": { + "$ref": "MachineImage" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.machineImages.getIamPolicy", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/machineImages/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.machineImages.insert", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "sourceInstance": { + "description": "Required. Source instance that is used to create the machine image from.", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/machineImages", + "request": { + "$ref": "MachineImage" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves a list of machine images that are contained within the specified project. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.machineImages.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/machineImages", + "response": { + "$ref": "MachineImageList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.machineImages.setIamPolicy", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/machineImages/{resource}/setIamPolicy", + "request": { + "$ref": "GlobalSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.machineImages.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/machineImages/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "machineTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of machine types.", + "description": "Retrieves an aggregated list of machine types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineTypes.aggregatedList", "parameterOrder": [ @@ -10198,7 +10556,7 @@ ] }, "get": { - "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request.", + "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineTypes.get", "parameterOrder": [ @@ -10240,7 +10598,7 @@ ] }, "list": { - "description": "Retrieves a list of machine types available to the specified project.", + "description": "Retrieves a list of machine types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineTypes.list", "parameterOrder": [ @@ -10301,7 +10659,7 @@ "networkEndpointGroups": { "methods": { "aggregatedList": { - "description": "Retrieves the list of network endpoint groups and sorts them by zone.", + "description": "Retrieves the list of network endpoint groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networkEndpointGroups.aggregatedList", "parameterOrder": [ @@ -10350,7 +10708,7 @@ ] }, "attachNetworkEndpoints": { - "description": "Attach a list of network endpoints to the specified network endpoint group.", + "description": "Attach a list of network endpoints to the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.attachNetworkEndpoints", "parameterOrder": [ @@ -10397,7 +10755,7 @@ ] }, "delete": { - "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.", + "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.networkEndpointGroups.delete", "parameterOrder": [ @@ -10441,7 +10799,7 @@ ] }, "detachNetworkEndpoints": { - "description": "Detach a list of network endpoints from the specified network endpoint group.", + "description": "Detach a list of network endpoints from the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.detachNetworkEndpoints", "parameterOrder": [ @@ -10488,7 +10846,7 @@ ] }, "get": { - "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.", + "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networkEndpointGroups.get", "parameterOrder": [ @@ -10528,7 +10886,7 @@ ] }, "insert": { - "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.insert", "parameterOrder": [ @@ -10568,7 +10926,7 @@ ] }, "list": { - "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone.", + "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networkEndpointGroups.list", "parameterOrder": [ @@ -10624,7 +10982,7 @@ ] }, "listNetworkEndpoints": { - "description": "Lists the network endpoints in the specified network endpoint group.", + "description": "Lists the network endpoints in the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.listNetworkEndpoints", "parameterOrder": [ @@ -10690,7 +11048,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.testIamPermissions", "parameterOrder": [ @@ -10739,7 +11097,7 @@ "networks": { "methods": { "addPeering": { - "description": "Adds a peering to the specified network.", + "description": "Adds a peering to the specified network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.addPeering", "parameterOrder": [ @@ -10780,7 +11138,7 @@ ] }, "delete": { - "description": "Deletes the specified network.", + "description": "Deletes the specified network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.networks.delete", "parameterOrder": [ @@ -10818,7 +11176,7 @@ ] }, "get": { - "description": "Returns the specified network. Gets a list of available networks by making a list() request.", + "description": "Returns the specified network. Gets a list of available networks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networks.get", "parameterOrder": [ @@ -10852,7 +11210,7 @@ ] }, "insert": { - "description": "Creates a network in the specified project using the data included in the request.", + "description": "Creates a network in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.insert", "parameterOrder": [ @@ -10885,7 +11243,7 @@ ] }, "list": { - "description": "Retrieves the list of networks available to the specified project.", + "description": "Retrieves the list of networks available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networks.list", "parameterOrder": [ @@ -10934,7 +11292,7 @@ ] }, "listPeeringRoutes": { - "description": "Lists the peering routes exchanged over peering connection.", + "description": "Lists the peering routes exchanged over peering connection. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networks.listPeeringRoutes", "parameterOrder": [ @@ -11014,7 +11372,7 @@ ] }, "patch": { - "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.", + "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.networks.patch", "parameterOrder": [ @@ -11055,7 +11413,7 @@ ] }, "removePeering": { - "description": "Removes a peering from the specified network.", + "description": "Removes a peering from the specified network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.removePeering", "parameterOrder": [ @@ -11096,7 +11454,7 @@ ] }, "switchToCustomMode": { - "description": "Switches the network mode from auto subnet mode to custom subnet mode.", + "description": "Switches the network mode from auto subnet mode to custom subnet mode. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.switchToCustomMode", "parameterOrder": [ @@ -11134,7 +11492,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.testIamPermissions", "parameterOrder": [ @@ -11171,7 +11529,7 @@ ] }, "updatePeering": { - "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes", + "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.networks.updatePeering", "parameterOrder": [ @@ -11216,7 +11574,7 @@ "nodeGroups": { "methods": { "addNodes": { - "description": "Adds specified number of nodes to the node group.", + "description": "Adds specified number of nodes to the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.addNodes", "parameterOrder": [ @@ -11265,7 +11623,7 @@ ] }, "aggregatedList": { - "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.", + "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.aggregatedList", "parameterOrder": [ @@ -11314,7 +11672,7 @@ ] }, "delete": { - "description": "Deletes the specified NodeGroup resource.", + "description": "Deletes the specified NodeGroup resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.nodeGroups.delete", "parameterOrder": [ @@ -11360,7 +11718,7 @@ ] }, "deleteNodes": { - "description": "Deletes specified nodes from the node group.", + "description": "Deletes specified nodes from the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.deleteNodes", "parameterOrder": [ @@ -11370,7 +11728,7 @@ ], "parameters": { "nodeGroup": { - "description": "Name of the NodeGroup resource to delete.", + "description": "Name of the NodeGroup resource whose nodes will be deleted.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -11409,7 +11767,7 @@ ] }, "get": { - "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead.", + "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.get", "parameterOrder": [ @@ -11451,7 +11809,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.getIamPolicy", "parameterOrder": [ @@ -11460,6 +11818,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -11493,7 +11857,7 @@ ] }, "insert": { - "description": "Creates a NodeGroup resource in the specified project using the data included in the request.", + "description": "Creates a NodeGroup resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.insert", "parameterOrder": [ @@ -11542,7 +11906,7 @@ ] }, "list": { - "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.", + "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.list", "parameterOrder": [ @@ -11599,7 +11963,7 @@ ] }, "listNodes": { - "description": "Lists nodes in the node group.", + "description": "Lists nodes in the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.listNodes", "parameterOrder": [ @@ -11664,7 +12028,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.setIamPolicy", "parameterOrder": [ @@ -11708,7 +12072,7 @@ ] }, "setNodeTemplate": { - "description": "Updates the node template of the node group.", + "description": "Updates the node template of the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.setNodeTemplate", "parameterOrder": [ @@ -11757,7 +12121,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.testIamPermissions", "parameterOrder": [ @@ -11806,7 +12170,7 @@ "nodeTemplates": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of node templates.", + "description": "Retrieves an aggregated list of node templates. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.aggregatedList", "parameterOrder": [ @@ -11855,7 +12219,7 @@ ] }, "delete": { - "description": "Deletes the specified NodeTemplate resource.", + "description": "Deletes the specified NodeTemplate resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.nodeTemplates.delete", "parameterOrder": [ @@ -11901,7 +12265,7 @@ ] }, "get": { - "description": "Returns the specified node template. Gets a list of available node templates by making a list() request.", + "description": "Returns the specified node template. Gets a list of available node templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.get", "parameterOrder": [ @@ -11943,7 +12307,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.getIamPolicy", "parameterOrder": [ @@ -11952,6 +12316,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -11985,7 +12355,7 @@ ] }, "insert": { - "description": "Creates a NodeTemplate resource in the specified project using the data included in the request.", + "description": "Creates a NodeTemplate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeTemplates.insert", "parameterOrder": [ @@ -12026,7 +12396,7 @@ ] }, "list": { - "description": "Retrieves a list of node templates available to the specified project.", + "description": "Retrieves a list of node templates available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.list", "parameterOrder": [ @@ -12083,7 +12453,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeTemplates.setIamPolicy", "parameterOrder": [ @@ -12127,7 +12497,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeTemplates.testIamPermissions", "parameterOrder": [ @@ -12176,7 +12546,7 @@ "nodeTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of node types.", + "description": "Retrieves an aggregated list of node types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTypes.aggregatedList", "parameterOrder": [ @@ -12225,7 +12595,7 @@ ] }, "get": { - "description": "Returns the specified node type. Gets a list of available node types by making a list() request.", + "description": "Returns the specified node type. Gets a list of available node types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTypes.get", "parameterOrder": [ @@ -12267,7 +12637,7 @@ ] }, "list": { - "description": "Retrieves a list of node types available to the specified project.", + "description": "Retrieves a list of node types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTypes.list", "parameterOrder": [ @@ -12325,10 +12695,343 @@ } } }, + "packetMirrorings": { + "methods": { + "aggregatedList": { + "description": "Retrieves an aggregated list of packetMirrorings. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.packetMirrorings.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/packetMirrorings", + "response": { + "$ref": "PacketMirroringAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified PacketMirroring resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.packetMirrorings.delete", + "parameterOrder": [ + "project", + "region", + "packetMirroring" + ], + "parameters": { + "packetMirroring": { + "description": "Name of the PacketMirroring resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified PacketMirroring resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.packetMirrorings.get", + "parameterOrder": [ + "project", + "region", + "packetMirroring" + ], + "parameters": { + "packetMirroring": { + "description": "Name of the PacketMirroring resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + "response": { + "$ref": "PacketMirroring" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a PacketMirroring resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.packetMirrorings.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings", + "request": { + "$ref": "PacketMirroring" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves a list of PacketMirroring resources available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.packetMirrorings.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings", + "response": { + "$ref": "PacketMirroringList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PATCH", + "id": "compute.packetMirrorings.patch", + "parameterOrder": [ + "project", + "region", + "packetMirroring" + ], + "parameters": { + "packetMirroring": { + "description": "Name of the PacketMirroring resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + "request": { + "$ref": "PacketMirroring" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.packetMirrorings.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "projects": { "methods": { "disableXpnHost": { - "description": "Disable this project as a shared VPC host project.", + "description": "Disable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.disableXpnHost", "parameterOrder": [ @@ -12358,7 +13061,7 @@ ] }, "disableXpnResource": { - "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", + "description": "Disable a service resource (also known as service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.disableXpnResource", "parameterOrder": [ @@ -12391,7 +13094,7 @@ ] }, "enableXpnHost": { - "description": "Enable this project as a shared VPC host project.", + "description": "Enable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.enableXpnHost", "parameterOrder": [ @@ -12421,7 +13124,7 @@ ] }, "enableXpnResource": { - "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", + "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.enableXpnResource", "parameterOrder": [ @@ -12454,7 +13157,7 @@ ] }, "get": { - "description": "Returns the specified Project resource.", + "description": "Returns the specified Project resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.projects.get", "parameterOrder": [ @@ -12480,7 +13183,7 @@ ] }, "getXpnHost": { - "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists.", + "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.projects.getXpnHost", "parameterOrder": [ @@ -12505,7 +13208,7 @@ ] }, "getXpnResources": { - "description": "Gets service resources (a.k.a service project) associated with this host project.", + "description": "Gets service resources (a.k.a service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.projects.getXpnResources", "parameterOrder": [ @@ -12553,7 +13256,7 @@ ] }, "listXpnHosts": { - "description": "Lists all shared VPC host projects visible to the user in an organization.", + "description": "Lists all shared VPC host projects visible to the user in an organization. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.listXpnHosts", "parameterOrder": [ @@ -12604,7 +13307,7 @@ ] }, "moveDisk": { - "description": "Moves a persistent disk from one zone to another.", + "description": "Moves a persistent disk from one zone to another. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.moveDisk", "parameterOrder": [ @@ -12637,7 +13340,7 @@ ] }, "moveInstance": { - "description": "Moves an instance and its attached persistent disks from one zone to another.", + "description": "Moves an instance and its attached persistent disks from one zone to another. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.moveInstance", "parameterOrder": [ @@ -12670,7 +13373,7 @@ ] }, "setCommonInstanceMetadata": { - "description": "Sets metadata common to all instances within the specified project using the data included in the request.", + "description": "Sets metadata common to all instances within the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.setCommonInstanceMetadata", "parameterOrder": [ @@ -12703,7 +13406,7 @@ ] }, "setDefaultNetworkTier": { - "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.", + "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.setDefaultNetworkTier", "parameterOrder": [ @@ -12736,7 +13439,7 @@ ] }, "setUsageExportBucket": { - "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", + "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.setUsageExportBucket", "parameterOrder": [ @@ -12776,7 +13479,7 @@ "regionAutoscalers": { "methods": { "delete": { - "description": "Deletes the specified autoscaler.", + "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionAutoscalers.delete", "parameterOrder": [ @@ -12822,7 +13525,7 @@ ] }, "get": { - "description": "Returns the specified autoscaler.", + "description": "Returns the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionAutoscalers.get", "parameterOrder": [ @@ -12864,7 +13567,7 @@ ] }, "insert": { - "description": "Creates an autoscaler in the specified project using the data included in the request.", + "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionAutoscalers.insert", "parameterOrder": [ @@ -12905,7 +13608,7 @@ ] }, "list": { - "description": "Retrieves a list of autoscalers contained within the specified region.", + "description": "Retrieves a list of autoscalers contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionAutoscalers.list", "parameterOrder": [ @@ -12962,7 +13665,7 @@ ] }, "patch": { - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionAutoscalers.patch", "parameterOrder": [ @@ -13009,7 +13712,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionAutoscalers.testIamPermissions", "parameterOrder": [ @@ -13054,7 +13757,7 @@ ] }, "update": { - "description": "Updates an autoscaler in the specified project using the data included in the request.", + "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionAutoscalers.update", "parameterOrder": [ @@ -13105,7 +13808,7 @@ "regionBackendServices": { "methods": { "delete": { - "description": "Deletes the specified regional BackendService resource.", + "description": "Deletes the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionBackendServices.delete", "parameterOrder": [ @@ -13151,7 +13854,7 @@ ] }, "get": { - "description": "Returns the specified regional BackendService resource.", + "description": "Returns the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionBackendServices.get", "parameterOrder": [ @@ -13193,7 +13896,7 @@ ] }, "getHealth": { - "description": "Gets the most recent health check results for this regional BackendService.", + "description": "Gets the most recent health check results for this regional BackendService. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionBackendServices.getHealth", "parameterOrder": [ @@ -13237,7 +13940,7 @@ ] }, "insert": { - "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", + "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionBackendServices.insert", "parameterOrder": [ @@ -13278,7 +13981,7 @@ ] }, "list": { - "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", + "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionBackendServices.list", "parameterOrder": [ @@ -13335,7 +14038,7 @@ ] }, "patch": { - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionBackendServices.patch", "parameterOrder": [ @@ -13384,7 +14087,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionBackendServices.testIamPermissions", "parameterOrder": [ @@ -13429,7 +14132,7 @@ ] }, "update": { - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionBackendServices.update", "parameterOrder": [ @@ -13482,7 +14185,7 @@ "regionCommitments": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of commitments.", + "description": "Retrieves an aggregated list of commitments. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionCommitments.aggregatedList", "parameterOrder": [ @@ -13531,7 +14234,7 @@ ] }, "get": { - "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request.", + "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionCommitments.get", "parameterOrder": [ @@ -13573,7 +14276,7 @@ ] }, "insert": { - "description": "Creates a commitment in the specified project using the data included in the request.", + "description": "Creates a commitment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionCommitments.insert", "parameterOrder": [ @@ -13614,7 +14317,7 @@ ] }, "list": { - "description": "Retrieves a list of commitments contained within the specified region.", + "description": "Retrieves a list of commitments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionCommitments.list", "parameterOrder": [ @@ -13671,7 +14374,7 @@ ] }, "updateReservations": { - "description": "Update the shape of reservations for GPUS/Local SSDs of reservations within the commitments.", + "description": "Update the shape of reservations for GPUS/Local SSDs of reservations within the commitments. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionCommitments.updateReservations", "parameterOrder": [ @@ -13681,7 +14384,7 @@ ], "parameters": { "commitment": { - "description": "Name of the commitment of which the reservation's capacities are being updated.", + "description": "Name of the commitment for which the reservation is being updated.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -13724,7 +14427,7 @@ "regionDiskTypes": { "methods": { "get": { - "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request.", + "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDiskTypes.get", "parameterOrder": [ @@ -13766,7 +14469,7 @@ ] }, "list": { - "description": "Retrieves a list of regional disk types available to the specified project.", + "description": "Retrieves a list of regional disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDiskTypes.list", "parameterOrder": [ @@ -13827,7 +14530,7 @@ "regionDisks": { "methods": { "addResourcePolicies": { - "description": "Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", + "description": "Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.addResourcePolicies", "parameterOrder": [ @@ -13876,7 +14579,7 @@ ] }, "createSnapshot": { - "description": "Creates a snapshot of this regional disk.", + "description": "Creates a snapshot of this regional disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.createSnapshot", "parameterOrder": [ @@ -13925,7 +14628,7 @@ ] }, "delete": { - "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionDisks.delete", "parameterOrder": [ @@ -13970,7 +14673,7 @@ ] }, "get": { - "description": "Returns a specified regional persistent disk.", + "description": "Returns a specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDisks.get", "parameterOrder": [ @@ -14012,7 +14715,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDisks.getIamPolicy", "parameterOrder": [ @@ -14021,6 +14724,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -14054,7 +14763,7 @@ ] }, "insert": { - "description": "Creates a persistent regional disk in the specified project using the data included in the request.", + "description": "Creates a persistent regional disk in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.insert", "parameterOrder": [ @@ -14100,7 +14809,7 @@ ] }, "list": { - "description": "Retrieves the list of persistent disks contained within the specified region.", + "description": "Retrieves the list of persistent disks contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDisks.list", "parameterOrder": [ @@ -14157,7 +14866,7 @@ ] }, "removeResourcePolicies": { - "description": "Removes resource policies from a regional disk.", + "description": "Removes resource policies from a regional disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.removeResourcePolicies", "parameterOrder": [ @@ -14206,7 +14915,7 @@ ] }, "resize": { - "description": "Resizes the specified regional persistent disk.", + "description": "Resizes the specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.resize", "parameterOrder": [ @@ -14255,7 +14964,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.setIamPolicy", "parameterOrder": [ @@ -14299,7 +15008,7 @@ ] }, "setLabels": { - "description": "Sets the labels on the target regional disk.", + "description": "Sets the labels on the target regional disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.setLabels", "parameterOrder": [ @@ -14348,7 +15057,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.testIamPermissions", "parameterOrder": [ @@ -14397,7 +15106,7 @@ "regionHealthChecks": { "methods": { "delete": { - "description": "Deletes the specified HealthCheck resource.", + "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionHealthChecks.delete", "parameterOrder": [ @@ -14443,7 +15152,7 @@ ] }, "get": { - "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", + "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionHealthChecks.get", "parameterOrder": [ @@ -14485,7 +15194,7 @@ ] }, "insert": { - "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionHealthChecks.insert", "parameterOrder": [ @@ -14526,7 +15235,7 @@ ] }, "list": { - "description": "Retrieves the list of HealthCheck resources available to the specified project.", + "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionHealthChecks.list", "parameterOrder": [ @@ -14583,7 +15292,7 @@ ] }, "patch": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionHealthChecks.patch", "parameterOrder": [ @@ -14632,7 +15341,7 @@ ] }, "update": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionHealthChecks.update", "parameterOrder": [ @@ -14685,7 +15394,7 @@ "regionInstanceGroupManagers": { "methods": { "abandonInstances": { - "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.abandonInstances", "parameterOrder": [ @@ -14732,7 +15441,7 @@ ] }, "applyUpdatesToInstances": { - "description": "Apply updates to selected instances the managed instance group.", + "description": "Apply updates to selected instances the managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.applyUpdatesToInstances", "parameterOrder": [ @@ -14773,8 +15482,55 @@ "https://www.googleapis.com/auth/compute" ] }, + "createInstances": { + "description": "Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagers.createInstances", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group. It should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region where the managed instance group is located. It should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances", + "request": { + "$ref": "RegionInstanceGroupManagersCreateInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "delete": { - "description": "Deletes the specified managed instance group and all of the instances in that group.", + "description": "Deletes the specified managed instance group and all of the instances in that group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionInstanceGroupManagers.delete", "parameterOrder": [ @@ -14818,7 +15574,7 @@ ] }, "deleteInstances": { - "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.deleteInstances", "parameterOrder": [ @@ -14865,7 +15621,7 @@ ] }, "get": { - "description": "Returns all of the details about the specified managed instance group.", + "description": "Returns all of the details about the specified managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroupManagers.get", "parameterOrder": [ @@ -14905,7 +15661,7 @@ ] }, "insert": { - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.insert", "parameterOrder": [ @@ -14945,7 +15701,7 @@ ] }, "list": { - "description": "Retrieves the list of managed instance groups that are contained within the specified region.", + "description": "Retrieves the list of managed instance groups that are contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroupManagers.list", "parameterOrder": [ @@ -15001,7 +15757,7 @@ ] }, "listManagedInstances": { - "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", + "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.listManagedInstances", "parameterOrder": [ @@ -15064,7 +15820,7 @@ ] }, "patch": { - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionInstanceGroupManagers.patch", "parameterOrder": [ @@ -15111,7 +15867,7 @@ ] }, "recreateInstances": { - "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.recreateInstances", "parameterOrder": [ @@ -15158,7 +15914,7 @@ ] }, "resize": { - "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.resize", "parameterOrder": [ @@ -15211,7 +15967,7 @@ ] }, "setAutoHealingPolicies": { - "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.", + "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", "parameterOrder": [ @@ -15258,7 +16014,7 @@ ] }, "setInstanceTemplate": { - "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", + "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", "parameterOrder": [ @@ -15305,7 +16061,7 @@ ] }, "setTargetPools": { - "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", + "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.setTargetPools", "parameterOrder": [ @@ -15352,7 +16108,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.testIamPermissions", "parameterOrder": [ @@ -15397,7 +16153,7 @@ ] }, "update": { - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionInstanceGroupManagers.update", "parameterOrder": [ @@ -15448,7 +16204,7 @@ "regionInstanceGroups": { "methods": { "get": { - "description": "Returns the specified instance group resource.", + "description": "Returns the specified instance group resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroups.get", "parameterOrder": [ @@ -15488,7 +16244,7 @@ ] }, "list": { - "description": "Retrieves the list of instance group resources contained within the specified region.", + "description": "Retrieves the list of instance group resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroups.list", "parameterOrder": [ @@ -15544,7 +16300,7 @@ ] }, "listInstances": { - "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", + "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroups.listInstances", "parameterOrder": [ @@ -15610,7 +16366,7 @@ ] }, "setNamedPorts": { - "description": "Sets the named ports for the specified regional instance group.", + "description": "Sets the named ports for the specified regional instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroups.setNamedPorts", "parameterOrder": [ @@ -15657,7 +16413,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroups.testIamPermissions", "parameterOrder": [ @@ -15706,7 +16462,7 @@ "regionOperations": { "methods": { "delete": { - "description": "Deletes the specified region-specific Operations resource.", + "description": "Deletes the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionOperations.delete", "parameterOrder": [ @@ -15744,7 +16500,7 @@ ] }, "get": { - "description": "Retrieves the specified region-specific Operations resource.", + "description": "Retrieves the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionOperations.get", "parameterOrder": [ @@ -15786,7 +16542,7 @@ ] }, "list": { - "description": "Retrieves a list of Operation resources contained within the specified region.", + "description": "Retrieves a list of Operation resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionOperations.list", "parameterOrder": [ @@ -15847,7 +16603,7 @@ "regionSslCertificates": { "methods": { "delete": { - "description": "Deletes the specified SslCertificate resource in the region.", + "description": "Deletes the specified SslCertificate resource in the region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionSslCertificates.delete", "parameterOrder": [ @@ -15893,7 +16649,7 @@ ] }, "get": { - "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.", + "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionSslCertificates.get", "parameterOrder": [ @@ -15935,7 +16691,7 @@ ] }, "insert": { - "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request", + "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionSslCertificates.insert", "parameterOrder": [ @@ -15976,7 +16732,7 @@ ] }, "list": { - "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region.", + "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionSslCertificates.list", "parameterOrder": [ @@ -16037,7 +16793,7 @@ "regionTargetHttpProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetHttpProxy resource.", + "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionTargetHttpProxies.delete", "parameterOrder": [ @@ -16083,7 +16839,7 @@ ] }, "get": { - "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionTargetHttpProxies.get", "parameterOrder": [ @@ -16125,7 +16881,7 @@ ] }, "insert": { - "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request.", + "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpProxies.insert", "parameterOrder": [ @@ -16166,7 +16922,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.", + "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionTargetHttpProxies.list", "parameterOrder": [ @@ -16223,7 +16979,7 @@ ] }, "setUrlMap": { - "description": "Changes the URL map for TargetHttpProxy.", + "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpProxies.setUrlMap", "parameterOrder": [ @@ -16276,7 +17032,7 @@ "regionTargetHttpsProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetHttpsProxy resource.", + "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionTargetHttpsProxies.delete", "parameterOrder": [ @@ -16322,7 +17078,7 @@ ] }, "get": { - "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionTargetHttpsProxies.get", "parameterOrder": [ @@ -16364,7 +17120,7 @@ ] }, "insert": { - "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.", + "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpsProxies.insert", "parameterOrder": [ @@ -16405,7 +17161,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.", + "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionTargetHttpsProxies.list", "parameterOrder": [ @@ -16462,7 +17218,7 @@ ] }, "setSslCertificates": { - "description": "Replaces SslCertificates for TargetHttpsProxy.", + "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpsProxies.setSslCertificates", "parameterOrder": [ @@ -16511,7 +17267,7 @@ ] }, "setUrlMap": { - "description": "Changes the URL map for TargetHttpsProxy.", + "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionTargetHttpsProxies.setUrlMap", "parameterOrder": [ @@ -16564,7 +17320,7 @@ "regionUrlMaps": { "methods": { "delete": { - "description": "Deletes the specified UrlMap resource.", + "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionUrlMaps.delete", "parameterOrder": [ @@ -16610,7 +17366,7 @@ ] }, "get": { - "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.", + "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionUrlMaps.get", "parameterOrder": [ @@ -16652,7 +17408,7 @@ ] }, "insert": { - "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionUrlMaps.insert", "parameterOrder": [ @@ -16693,7 +17449,7 @@ ] }, "invalidateCache": { - "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", + "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionUrlMaps.invalidateCache", "parameterOrder": [ @@ -16742,7 +17498,7 @@ ] }, "list": { - "description": "Retrieves the list of UrlMap resources available to the specified project in the specified region.", + "description": "Retrieves the list of UrlMap resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionUrlMaps.list", "parameterOrder": [ @@ -16799,7 +17555,7 @@ ] }, "patch": { - "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionUrlMaps.patch", "parameterOrder": [ @@ -16848,7 +17604,7 @@ ] }, "update": { - "description": "Updates the specified UrlMap resource with the data included in the request.", + "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionUrlMaps.update", "parameterOrder": [ @@ -16897,7 +17653,7 @@ ] }, "validate": { - "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionUrlMaps.validate", "parameterOrder": [ @@ -16945,7 +17701,7 @@ "regions": { "methods": { "get": { - "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request.", + "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regions.get", "parameterOrder": [ @@ -16979,7 +17735,7 @@ ] }, "list": { - "description": "Retrieves the list of region resources available to the specified project.", + "description": "Retrieves the list of region resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regions.list", "parameterOrder": [ @@ -17032,7 +17788,7 @@ "reservations": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of reservations.", + "description": "Retrieves an aggregated list of reservations. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.reservations.aggregatedList", "parameterOrder": [ @@ -17081,7 +17837,7 @@ ] }, "delete": { - "description": "Deletes the specified reservation.", + "description": "Deletes the specified reservation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.reservations.delete", "parameterOrder": [ @@ -17127,7 +17883,7 @@ ] }, "get": { - "description": "Retrieves all information of the specified reservation.", + "description": "Retrieves information about the specified reservation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.reservations.get", "parameterOrder": [ @@ -17169,7 +17925,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.reservations.getIamPolicy", "parameterOrder": [ @@ -17178,6 +17934,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -17211,7 +17973,7 @@ ] }, "insert": { - "description": "Creates a new reservation.", + "description": "Creates a new reservation. For more information, read Reserving zonal resources. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.reservations.insert", "parameterOrder": [ @@ -17252,7 +18014,7 @@ ] }, "list": { - "description": "A list all the reservations that have been configured for the specified project in specified zone.", + "description": "A list of all the reservations that have been configured for the specified project in specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.reservations.list", "parameterOrder": [ @@ -17309,7 +18071,7 @@ ] }, "resize": { - "description": "Resizes the reservation (applicable to standalone reservations only)", + "description": "Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.reservations.resize", "parameterOrder": [ @@ -17358,7 +18120,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.reservations.setIamPolicy", "parameterOrder": [ @@ -17402,7 +18164,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.reservations.testIamPermissions", "parameterOrder": [ @@ -17451,7 +18213,7 @@ "resourcePolicies": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of resource policies.", + "description": "Retrieves an aggregated list of resource policies. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.resourcePolicies.aggregatedList", "parameterOrder": [ @@ -17500,7 +18262,7 @@ ] }, "delete": { - "description": "Deletes the specified resource policy.", + "description": "Deletes the specified resource policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.resourcePolicies.delete", "parameterOrder": [ @@ -17546,7 +18308,7 @@ ] }, "get": { - "description": "Retrieves all information of the specified resource policy.", + "description": "Retrieves all information of the specified resource policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.resourcePolicies.get", "parameterOrder": [ @@ -17587,8 +18349,56 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.resourcePolicies.getIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { - "description": "Creates a new resource policy.", + "description": "Creates a new resource policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.resourcePolicies.insert", "parameterOrder": [ @@ -17629,7 +18439,7 @@ ] }, "list": { - "description": "A list all the resource policies that have been configured for the specified project in specified region.", + "description": "A list all the resource policies that have been configured for the specified project in specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.resourcePolicies.list", "parameterOrder": [ @@ -17685,8 +18495,52 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.resourcePolicies.setIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy", + "request": { + "$ref": "RegionSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.resourcePolicies.testIamPermissions", "parameterOrder": [ @@ -17735,7 +18589,7 @@ "routers": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of routers.", + "description": "Retrieves an aggregated list of routers. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.aggregatedList", "parameterOrder": [ @@ -17784,7 +18638,7 @@ ] }, "delete": { - "description": "Deletes the specified Router resource.", + "description": "Deletes the specified Router resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.routers.delete", "parameterOrder": [ @@ -17830,7 +18684,7 @@ ] }, "get": { - "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request.", + "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.get", "parameterOrder": [ @@ -17872,7 +18726,7 @@ ] }, "getNatMappingInfo": { - "description": "Retrieves runtime Nat mapping information of VM endpoints.", + "description": "Retrieves runtime Nat mapping information of VM endpoints. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.getNatMappingInfo", "parameterOrder": [ @@ -17894,6 +18748,11 @@ "minimum": "0", "type": "integer" }, + "natName": { + "description": "Name of the nat service to filter the Nat Mapping information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.", + "location": "query", + "type": "string" + }, "orderBy": { "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", "location": "query", @@ -17937,7 +18796,7 @@ ] }, "getRouterStatus": { - "description": "Retrieves runtime information of the specified router.", + "description": "Retrieves runtime information of the specified router. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.getRouterStatus", "parameterOrder": [ @@ -17979,7 +18838,7 @@ ] }, "insert": { - "description": "Creates a Router resource in the specified project and region using the data included in the request.", + "description": "Creates a Router resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routers.insert", "parameterOrder": [ @@ -18020,7 +18879,7 @@ ] }, "list": { - "description": "Retrieves a list of Router resources available to the specified project.", + "description": "Retrieves a list of Router resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.list", "parameterOrder": [ @@ -18077,7 +18936,7 @@ ] }, "patch": { - "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.routers.patch", "parameterOrder": [ @@ -18126,7 +18985,7 @@ ] }, "preview": { - "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", + "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routers.preview", "parameterOrder": [ @@ -18171,7 +19030,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routers.testIamPermissions", "parameterOrder": [ @@ -18216,7 +19075,7 @@ ] }, "update": { - "description": "Updates the specified Router resource with the data included in the request.", + "description": "Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.routers.update", "parameterOrder": [ @@ -18269,7 +19128,7 @@ "routes": { "methods": { "delete": { - "description": "Deletes the specified Route resource.", + "description": "Deletes the specified Route resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.routes.delete", "parameterOrder": [ @@ -18307,7 +19166,7 @@ ] }, "get": { - "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request.", + "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routes.get", "parameterOrder": [ @@ -18341,7 +19200,7 @@ ] }, "insert": { - "description": "Creates a Route resource in the specified project using the data included in the request.", + "description": "Creates a Route resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routes.insert", "parameterOrder": [ @@ -18374,7 +19233,7 @@ ] }, "list": { - "description": "Retrieves the list of Route resources available to the specified project.", + "description": "Retrieves the list of Route resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routes.list", "parameterOrder": [ @@ -18423,7 +19282,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routes.testIamPermissions", "parameterOrder": [ @@ -18464,7 +19323,7 @@ "securityPolicies": { "methods": { "addRule": { - "description": "Inserts a rule into a security policy.", + "description": "Inserts a rule into a security policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.addRule", "parameterOrder": [ @@ -18505,7 +19364,7 @@ ] }, "delete": { - "description": "Deletes the specified policy.", + "description": "Deletes the specified policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.securityPolicies.delete", "parameterOrder": [ @@ -18543,7 +19402,7 @@ ] }, "get": { - "description": "List all of the ordered rules present in a single specified policy.", + "description": "List all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.securityPolicies.get", "parameterOrder": [ @@ -18577,7 +19436,7 @@ ] }, "getRule": { - "description": "Gets a rule at the specified priority.", + "description": "Gets a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.securityPolicies.getRule", "parameterOrder": [ @@ -18617,7 +19476,7 @@ ] }, "insert": { - "description": "Creates a new policy in the specified project using the data included in the request.", + "description": "Creates a new policy in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.insert", "parameterOrder": [ @@ -18655,7 +19514,7 @@ ] }, "list": { - "description": "List all the policies that have been configured for the specified project.", + "description": "List all the policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.securityPolicies.list", "parameterOrder": [ @@ -18704,7 +19563,7 @@ ] }, "listPreconfiguredExpressionSets": { - "description": "Gets the current list of preconfigured Web Application Firewall (WAF) expressions.", + "description": "Gets the current list of preconfigured Web Application Firewall (WAF) expressions. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.securityPolicies.listPreconfiguredExpressionSets", "parameterOrder": [ @@ -18752,7 +19611,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request.", + "description": "Patches the specified policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.securityPolicies.patch", "parameterOrder": [ @@ -18793,7 +19652,7 @@ ] }, "patchRule": { - "description": "Patches a rule at the specified priority.", + "description": "Patches a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.patchRule", "parameterOrder": [ @@ -18840,7 +19699,7 @@ ] }, "removeRule": { - "description": "Deletes a rule at the specified priority.", + "description": "Deletes a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.removeRule", "parameterOrder": [ @@ -18879,7 +19738,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.setLabels", "parameterOrder": [ @@ -18915,7 +19774,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.testIamPermissions", "parameterOrder": [ @@ -18956,7 +19815,7 @@ "snapshots": { "methods": { "delete": { - "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.", + "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.snapshots.delete", "parameterOrder": [ @@ -18994,7 +19853,7 @@ ] }, "get": { - "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.", + "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.snapshots.get", "parameterOrder": [ @@ -19028,7 +19887,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.snapshots.getIamPolicy", "parameterOrder": [ @@ -19036,6 +19895,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -19062,7 +19927,7 @@ ] }, "list": { - "description": "Retrieves the list of Snapshot resources contained within the specified project.", + "description": "Retrieves the list of Snapshot resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.snapshots.list", "parameterOrder": [ @@ -19111,7 +19976,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.snapshots.setIamPolicy", "parameterOrder": [ @@ -19147,7 +20012,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.snapshots.setLabels", "parameterOrder": [ @@ -19183,7 +20048,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.snapshots.testIamPermissions", "parameterOrder": [ @@ -19224,7 +20089,7 @@ "sslCertificates": { "methods": { "aggregatedList": { - "description": "Retrieves the list of all SslCertificate resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all SslCertificate resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslCertificates.aggregatedList", "parameterOrder": [ @@ -19273,7 +20138,7 @@ ] }, "delete": { - "description": "Deletes the specified SslCertificate resource.", + "description": "Deletes the specified SslCertificate resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.sslCertificates.delete", "parameterOrder": [ @@ -19311,7 +20176,7 @@ ] }, "get": { - "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request.", + "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslCertificates.get", "parameterOrder": [ @@ -19345,7 +20210,7 @@ ] }, "insert": { - "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", + "description": "Creates a SslCertificate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.sslCertificates.insert", "parameterOrder": [ @@ -19378,7 +20243,7 @@ ] }, "list": { - "description": "Retrieves the list of SslCertificate resources available to the specified project.", + "description": "Retrieves the list of SslCertificate resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslCertificates.list", "parameterOrder": [ @@ -19427,7 +20292,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.sslCertificates.testIamPermissions", "parameterOrder": [ @@ -19468,7 +20333,7 @@ "sslPolicies": { "methods": { "delete": { - "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.", + "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.sslPolicies.delete", "parameterOrder": [ @@ -19505,7 +20370,7 @@ ] }, "get": { - "description": "Lists all of the ordered rules present in a single specified policy.", + "description": "Lists all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslPolicies.get", "parameterOrder": [ @@ -19538,7 +20403,7 @@ ] }, "insert": { - "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request.", + "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.sslPolicies.insert", "parameterOrder": [ @@ -19571,7 +20436,7 @@ ] }, "list": { - "description": "Lists all the SSL policies that have been configured for the specified project.", + "description": "Lists all the SSL policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslPolicies.list", "parameterOrder": [ @@ -19620,7 +20485,7 @@ ] }, "listAvailableFeatures": { - "description": "Lists all features that can be specified in the SSL policy when using custom profile.", + "description": "Lists all features that can be specified in the SSL policy when using custom profile. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslPolicies.listAvailableFeatures", "parameterOrder": [ @@ -19669,7 +20534,7 @@ ] }, "patch": { - "description": "Patches the specified SSL policy with the data included in the request.", + "description": "Patches the specified SSL policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.sslPolicies.patch", "parameterOrder": [ @@ -19709,7 +20574,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.sslPolicies.testIamPermissions", "parameterOrder": [ @@ -19750,7 +20615,7 @@ "subnetworks": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of subnetworks.", + "description": "Retrieves an aggregated list of subnetworks. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.aggregatedList", "parameterOrder": [ @@ -19799,7 +20664,7 @@ ] }, "delete": { - "description": "Deletes the specified subnetwork.", + "description": "Deletes the specified subnetwork. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.subnetworks.delete", "parameterOrder": [ @@ -19845,7 +20710,7 @@ ] }, "expandIpCidrRange": { - "description": "Expands the IP CIDR range of the subnetwork to a specified value.", + "description": "Expands the IP CIDR range of the subnetwork to a specified value. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.expandIpCidrRange", "parameterOrder": [ @@ -19894,7 +20759,7 @@ ] }, "get": { - "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request.", + "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.get", "parameterOrder": [ @@ -19936,7 +20801,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.getIamPolicy", "parameterOrder": [ @@ -19945,6 +20810,12 @@ "resource" ], "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -19978,7 +20849,7 @@ ] }, "insert": { - "description": "Creates a subnetwork in the specified project using the data included in the request.", + "description": "Creates a subnetwork in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.insert", "parameterOrder": [ @@ -20019,7 +20890,7 @@ ] }, "list": { - "description": "Retrieves a list of subnetworks available to the specified project.", + "description": "Retrieves a list of subnetworks available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.list", "parameterOrder": [ @@ -20076,7 +20947,7 @@ ] }, "listUsable": { - "description": "Retrieves an aggregated list of usable subnetworks.", + "description": "Retrieves an aggregated list of all usable subnetworks in the project. The list contains all of the subnetworks in the project and the subnetworks that were shared by a Shared VPC host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.listUsable", "parameterOrder": [ @@ -20125,7 +20996,7 @@ ] }, "patch": { - "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.", + "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.subnetworks.patch", "parameterOrder": [ @@ -20180,7 +21051,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.setIamPolicy", "parameterOrder": [ @@ -20224,7 +21095,7 @@ ] }, "setPrivateIpGoogleAccess": { - "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", + "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.setPrivateIpGoogleAccess", "parameterOrder": [ @@ -20273,7 +21144,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.testIamPermissions", "parameterOrder": [ @@ -20322,7 +21193,7 @@ "targetHttpProxies": { "methods": { "aggregatedList": { - "description": "Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpProxies.aggregatedList", "parameterOrder": [ @@ -20371,7 +21242,7 @@ ] }, "delete": { - "description": "Deletes the specified TargetHttpProxy resource.", + "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetHttpProxies.delete", "parameterOrder": [ @@ -20409,7 +21280,7 @@ ] }, "get": { - "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request.", + "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpProxies.get", "parameterOrder": [ @@ -20443,7 +21314,7 @@ ] }, "insert": { - "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpProxies.insert", "parameterOrder": [ @@ -20476,7 +21347,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", + "description": "Retrieves the list of TargetHttpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpProxies.list", "parameterOrder": [ @@ -20525,7 +21396,7 @@ ] }, "setUrlMap": { - "description": "Changes the URL map for TargetHttpProxy.", + "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpProxies.setUrlMap", "parameterOrder": [ @@ -20566,7 +21437,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpProxies.testIamPermissions", "parameterOrder": [ @@ -20607,7 +21478,7 @@ "targetHttpsProxies": { "methods": { "aggregatedList": { - "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpsProxies.aggregatedList", "parameterOrder": [ @@ -20656,7 +21527,7 @@ ] }, "delete": { - "description": "Deletes the specified TargetHttpsProxy resource.", + "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetHttpsProxies.delete", "parameterOrder": [ @@ -20694,7 +21565,7 @@ ] }, "get": { - "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request.", + "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpsProxies.get", "parameterOrder": [ @@ -20728,7 +21599,7 @@ ] }, "insert": { - "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.insert", "parameterOrder": [ @@ -20761,7 +21632,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", + "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpsProxies.list", "parameterOrder": [ @@ -20810,7 +21681,7 @@ ] }, "setQuicOverride": { - "description": "Sets the QUIC override policy for TargetHttpsProxy.", + "description": "Sets the QUIC override policy for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setQuicOverride", "parameterOrder": [ @@ -20850,7 +21721,7 @@ ] }, "setSslCertificates": { - "description": "Replaces SslCertificates for TargetHttpsProxy.", + "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setSslCertificates", "parameterOrder": [ @@ -20891,7 +21762,7 @@ ] }, "setSslPolicy": { - "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends.", + "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setSslPolicy", "parameterOrder": [ @@ -20931,7 +21802,7 @@ ] }, "setUrlMap": { - "description": "Changes the URL map for TargetHttpsProxy.", + "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setUrlMap", "parameterOrder": [ @@ -20972,7 +21843,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.testIamPermissions", "parameterOrder": [ @@ -21013,7 +21884,7 @@ "targetInstances": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of target instances.", + "description": "Retrieves an aggregated list of target instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetInstances.aggregatedList", "parameterOrder": [ @@ -21062,7 +21933,7 @@ ] }, "delete": { - "description": "Deletes the specified TargetInstance resource.", + "description": "Deletes the specified TargetInstance resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetInstances.delete", "parameterOrder": [ @@ -21108,7 +21979,7 @@ ] }, "get": { - "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.", + "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetInstances.get", "parameterOrder": [ @@ -21150,7 +22021,7 @@ ] }, "insert": { - "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", + "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetInstances.insert", "parameterOrder": [ @@ -21191,7 +22062,7 @@ ] }, "list": { - "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", + "description": "Retrieves a list of TargetInstance resources available to the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetInstances.list", "parameterOrder": [ @@ -21248,7 +22119,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetInstances.testIamPermissions", "parameterOrder": [ @@ -21297,7 +22168,7 @@ "targetPools": { "methods": { "addHealthCheck": { - "description": "Adds health check URLs to a target pool.", + "description": "Adds health check URLs to a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.addHealthCheck", "parameterOrder": [ @@ -21346,7 +22217,7 @@ ] }, "addInstance": { - "description": "Adds an instance to a target pool.", + "description": "Adds an instance to a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.addInstance", "parameterOrder": [ @@ -21395,7 +22266,7 @@ ] }, "aggregatedList": { - "description": "Retrieves an aggregated list of target pools.", + "description": "Retrieves an aggregated list of target pools. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetPools.aggregatedList", "parameterOrder": [ @@ -21444,7 +22315,7 @@ ] }, "delete": { - "description": "Deletes the specified target pool.", + "description": "Deletes the specified target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetPools.delete", "parameterOrder": [ @@ -21490,7 +22361,7 @@ ] }, "get": { - "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request.", + "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetPools.get", "parameterOrder": [ @@ -21532,7 +22403,7 @@ ] }, "getHealth": { - "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", + "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.getHealth", "parameterOrder": [ @@ -21577,7 +22448,7 @@ ] }, "insert": { - "description": "Creates a target pool in the specified project and region using the data included in the request.", + "description": "Creates a target pool in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.insert", "parameterOrder": [ @@ -21618,7 +22489,7 @@ ] }, "list": { - "description": "Retrieves a list of target pools available to the specified project and region.", + "description": "Retrieves a list of target pools available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetPools.list", "parameterOrder": [ @@ -21675,7 +22546,7 @@ ] }, "removeHealthCheck": { - "description": "Removes health check URL from a target pool.", + "description": "Removes health check URL from a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.removeHealthCheck", "parameterOrder": [ @@ -21724,7 +22595,7 @@ ] }, "removeInstance": { - "description": "Removes instance URL from a target pool.", + "description": "Removes instance URL from a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.removeInstance", "parameterOrder": [ @@ -21773,7 +22644,7 @@ ] }, "setBackup": { - "description": "Changes a backup target pool's configurations.", + "description": "Changes a backup target pool's configurations. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.setBackup", "parameterOrder": [ @@ -21828,7 +22699,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.testIamPermissions", "parameterOrder": [ @@ -21877,7 +22748,7 @@ "targetSslProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetSslProxy resource.", + "description": "Deletes the specified TargetSslProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetSslProxies.delete", "parameterOrder": [ @@ -21915,7 +22786,7 @@ ] }, "get": { - "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request.", + "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetSslProxies.get", "parameterOrder": [ @@ -21949,7 +22820,7 @@ ] }, "insert": { - "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.insert", "parameterOrder": [ @@ -21982,7 +22853,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", + "description": "Retrieves the list of TargetSslProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetSslProxies.list", "parameterOrder": [ @@ -22031,7 +22902,7 @@ ] }, "setBackendService": { - "description": "Changes the BackendService for TargetSslProxy.", + "description": "Changes the BackendService for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setBackendService", "parameterOrder": [ @@ -22072,7 +22943,7 @@ ] }, "setProxyHeader": { - "description": "Changes the ProxyHeaderType for TargetSslProxy.", + "description": "Changes the ProxyHeaderType for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setProxyHeader", "parameterOrder": [ @@ -22113,7 +22984,7 @@ ] }, "setSslCertificates": { - "description": "Changes SslCertificates for TargetSslProxy.", + "description": "Changes SslCertificates for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setSslCertificates", "parameterOrder": [ @@ -22154,7 +23025,7 @@ ] }, "setSslPolicy": { - "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends.", + "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setSslPolicy", "parameterOrder": [ @@ -22194,7 +23065,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.testIamPermissions", "parameterOrder": [ @@ -22235,7 +23106,7 @@ "targetTcpProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetTcpProxy resource.", + "description": "Deletes the specified TargetTcpProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetTcpProxies.delete", "parameterOrder": [ @@ -22273,7 +23144,7 @@ ] }, "get": { - "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.", + "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetTcpProxies.get", "parameterOrder": [ @@ -22307,7 +23178,7 @@ ] }, "insert": { - "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetTcpProxies.insert", "parameterOrder": [ @@ -22340,7 +23211,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", + "description": "Retrieves the list of TargetTcpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetTcpProxies.list", "parameterOrder": [ @@ -22389,7 +23260,7 @@ ] }, "setBackendService": { - "description": "Changes the BackendService for TargetTcpProxy.", + "description": "Changes the BackendService for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetTcpProxies.setBackendService", "parameterOrder": [ @@ -22430,7 +23301,7 @@ ] }, "setProxyHeader": { - "description": "Changes the ProxyHeaderType for TargetTcpProxy.", + "description": "Changes the ProxyHeaderType for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetTcpProxies.setProxyHeader", "parameterOrder": [ @@ -22475,7 +23346,7 @@ "targetVpnGateways": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of target VPN gateways.", + "description": "Retrieves an aggregated list of target VPN gateways. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetVpnGateways.aggregatedList", "parameterOrder": [ @@ -22524,7 +23395,7 @@ ] }, "delete": { - "description": "Deletes the specified target VPN gateway.", + "description": "Deletes the specified target VPN gateway. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetVpnGateways.delete", "parameterOrder": [ @@ -22570,7 +23441,7 @@ ] }, "get": { - "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.", + "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetVpnGateways.get", "parameterOrder": [ @@ -22612,7 +23483,7 @@ ] }, "insert": { - "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", + "description": "Creates a target VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetVpnGateways.insert", "parameterOrder": [ @@ -22653,7 +23524,7 @@ ] }, "list": { - "description": "Retrieves a list of target VPN gateways available to the specified project and region.", + "description": "Retrieves a list of target VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetVpnGateways.list", "parameterOrder": [ @@ -22710,7 +23581,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetVpnGateways.setLabels", "parameterOrder": [ @@ -22759,7 +23630,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetVpnGateways.testIamPermissions", "parameterOrder": [ @@ -22808,7 +23679,7 @@ "urlMaps": { "methods": { "aggregatedList": { - "description": "Retrieves the list of all UrlMap resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all UrlMap resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.urlMaps.aggregatedList", "parameterOrder": [ @@ -22857,7 +23728,7 @@ ] }, "delete": { - "description": "Deletes the specified UrlMap resource.", + "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.urlMaps.delete", "parameterOrder": [ @@ -22895,7 +23766,7 @@ ] }, "get": { - "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.", + "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.urlMaps.get", "parameterOrder": [ @@ -22929,7 +23800,7 @@ ] }, "insert": { - "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.urlMaps.insert", "parameterOrder": [ @@ -22962,7 +23833,7 @@ ] }, "invalidateCache": { - "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", + "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.urlMaps.invalidateCache", "parameterOrder": [ @@ -23003,7 +23874,7 @@ ] }, "list": { - "description": "Retrieves the list of UrlMap resources available to the specified project.", + "description": "Retrieves the list of UrlMap resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.urlMaps.list", "parameterOrder": [ @@ -23052,7 +23923,7 @@ ] }, "patch": { - "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.urlMaps.patch", "parameterOrder": [ @@ -23093,7 +23964,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.urlMaps.testIamPermissions", "parameterOrder": [ @@ -23130,7 +24001,7 @@ ] }, "update": { - "description": "Updates the specified UrlMap resource with the data included in the request.", + "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.urlMaps.update", "parameterOrder": [ @@ -23171,7 +24042,7 @@ ] }, "validate": { - "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.urlMaps.validate", "parameterOrder": [ @@ -23211,7 +24082,7 @@ "vpnGateways": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of VPN gateways.", + "description": "Retrieves an aggregated list of VPN gateways. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnGateways.aggregatedList", "parameterOrder": [ @@ -23260,7 +24131,7 @@ ] }, "delete": { - "description": "Deletes the specified VPN gateway.", + "description": "Deletes the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.vpnGateways.delete", "parameterOrder": [ @@ -23306,7 +24177,7 @@ ] }, "get": { - "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request.", + "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnGateways.get", "parameterOrder": [ @@ -23348,7 +24219,7 @@ ] }, "getStatus": { - "description": "Returns the status for the specified VPN gateway.", + "description": "Returns the status for the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnGateways.getStatus", "parameterOrder": [ @@ -23390,7 +24261,7 @@ ] }, "insert": { - "description": "Creates a VPN gateway in the specified project and region using the data included in the request.", + "description": "Creates a VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnGateways.insert", "parameterOrder": [ @@ -23431,7 +24302,7 @@ ] }, "list": { - "description": "Retrieves a list of VPN gateways available to the specified project and region.", + "description": "Retrieves a list of VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnGateways.list", "parameterOrder": [ @@ -23488,7 +24359,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnGateways.setLabels", "parameterOrder": [ @@ -23541,7 +24412,7 @@ "vpnTunnels": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of VPN tunnels.", + "description": "Retrieves an aggregated list of VPN tunnels. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnTunnels.aggregatedList", "parameterOrder": [ @@ -23590,7 +24461,7 @@ ] }, "delete": { - "description": "Deletes the specified VpnTunnel resource.", + "description": "Deletes the specified VpnTunnel resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.vpnTunnels.delete", "parameterOrder": [ @@ -23636,7 +24507,7 @@ ] }, "get": { - "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.", + "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnTunnels.get", "parameterOrder": [ @@ -23678,7 +24549,7 @@ ] }, "insert": { - "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", + "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnTunnels.insert", "parameterOrder": [ @@ -23719,7 +24590,7 @@ ] }, "list": { - "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", + "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnTunnels.list", "parameterOrder": [ @@ -23776,7 +24647,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnTunnels.setLabels", "parameterOrder": [ @@ -23825,7 +24696,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnTunnels.testIamPermissions", "parameterOrder": [ @@ -23874,7 +24745,7 @@ "zoneOperations": { "methods": { "delete": { - "description": "Deletes the specified zone-specific Operations resource.", + "description": "Deletes the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.zoneOperations.delete", "parameterOrder": [ @@ -23912,7 +24783,7 @@ ] }, "get": { - "description": "Retrieves the specified zone-specific Operations resource.", + "description": "Retrieves the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zoneOperations.get", "parameterOrder": [ @@ -23954,7 +24825,7 @@ ] }, "list": { - "description": "Retrieves a list of Operation resources contained within the specified zone.", + "description": "Retrieves a list of Operation resources contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zoneOperations.list", "parameterOrder": [ @@ -24015,7 +24886,7 @@ "zones": { "methods": { "get": { - "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request.", + "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zones.get", "parameterOrder": [ @@ -24049,7 +24920,7 @@ ] }, "list": { - "description": "Retrieves the list of Zone resources available to the specified project.", + "description": "Retrieves the list of Zone resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zones.list", "parameterOrder": [ @@ -24100,8 +24971,8 @@ } } }, - "revision": "20190528", - "rootUrl": "https://www.googleapis.com/", + "revision": "20191025", + "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { "description": "A specification of the type and number of accelerator cards attached to the instance.", @@ -24120,7 +24991,7 @@ "type": "object" }, "AcceleratorType": { - "description": "An Accelerator Type resource. (== resource_for beta.acceleratorTypes ==) (== resource_for v1.acceleratorTypes ==)", + "description": "Represents an Accelerator Type resource.\n\nGoogle Cloud Platform provides graphics processing units (accelerators) that you can add to VM instances to improve or accelerate performance when working with intensive workloads. For more information, read GPUs on Compute Engine. (== resource_for beta.acceleratorTypes ==) (== resource_for v1.acceleratorTypes ==)", "id": "AcceleratorType", "properties": { "creationTimestamp": { @@ -24494,7 +25365,7 @@ "type": "string" }, "name": { - "description": "The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.", + "description": "The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.", "type": "string" }, "natIP": { @@ -24514,11 +25385,11 @@ "type": "string" }, "publicPtrDomainName": { - "description": "The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled.", + "description": "The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.", "type": "string" }, "setPublicPtr": { - "description": "Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name.", + "description": "Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.", "type": "boolean" }, "type": { @@ -24536,7 +25407,7 @@ "type": "object" }, "Address": { - "description": "A reserved address resource. (== resource_for beta.addresses ==) (== resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== resource_for v1.globalAddresses ==)", + "description": "Represents an IP Address resource.\n\nAn address resource represents a regional internal IP address. Regional internal IP addresses are RFC 1918 addresses that come from either a primary or secondary IP range of a subnet in a VPC network. Regional external IP addresses can be assigned to GCP VM instances, Cloud VPN gateways, regional external forwarding rules for network load balancers (in either Standard or Premium Tier), and regional external forwarding rules for HTTP(S), SSL Proxy, and TCP Proxy load balancers in Standard Tier. For more information, read IP addresses.\n\nA globalAddresses resource represent a global external IP address. Global external IP addresses are IPv4 or IPv6 addresses. They can only be assigned to global forwarding rules for HTTP(S), SSL Proxy, or TCP Proxy load balancers in Premium Tier. For more information, read Global resources. (== resource_for beta.addresses ==) (== resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== resource_for v1.globalAddresses ==)", "id": "Address", "properties": { "address": { @@ -24562,7 +25433,7 @@ "type": "string" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "id": { @@ -24571,7 +25442,7 @@ "type": "string" }, "ipVersion": { - "description": "The IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.", + "description": "The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.", "enum": [ "IPV4", "IPV6", @@ -24607,16 +25478,16 @@ "compute.addresses.insert" ] }, - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, "network": { - "description": "The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with VPC_PEERING purpose.", + "description": "The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.", "type": "string" }, "networkTier": { - "description": "This signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer.\n\nIf this field is not specified, it is assumed to be PREMIUM.", + "description": "This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer.\n\nIf this field is not specified, it is assumed to be PREMIUM.", "enum": [ "PREMIUM", "STANDARD" @@ -24633,23 +25504,25 @@ "type": "integer" }, "purpose": { - "description": "The purpose of resource, only used with INTERNAL type.", + "description": "The purpose of this resource, which can be one of the following values: \n- `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. \n- `DNS_RESOLVER` for a DNS resolver address in a subnetwork \n- `VPC_PEERING` for addresses that are reserved for VPC peer networks. \n- `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.", "enum": [ "DNS_RESOLVER", "GCE_ENDPOINT", "NAT_AUTO", + "SHARED_LOADBALANCER_VIP", "VPC_PEERING" ], "enumDescriptions": [ "", "", "", + "", "" ], "type": "string" }, "region": { - "description": "[Output Only] URL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL. You cannot set this field in the request body.", + "description": "[Output Only] The URL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL.", "type": "string" }, "selfLink": { @@ -24671,7 +25544,7 @@ "type": "string" }, "subnetwork": { - "description": "The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.", + "description": "The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.", "type": "string" }, "users": { @@ -25007,11 +25880,11 @@ "id": "AliasIpRange", "properties": { "ipCidrRange": { - "description": "The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).", + "description": "The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).", "type": "string" }, "subnetworkRangeName": { - "description": "Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.", + "description": "The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.", "type": "string" } }, @@ -25074,18 +25947,18 @@ "id": "AllocationSpecificSKUReservation", "properties": { "count": { - "description": "Specifies number of resources that are allocated.", + "description": "Specifies the number of resources that are allocated.", "format": "int64", "type": "string" }, "inUseCount": { - "description": "[OutputOnly] Indicates how many resource are in use.", + "description": "[Output Only] Indicates how many instances are in use.", "format": "int64", "type": "string" }, "instanceProperties": { "$ref": "AllocationSpecificSKUAllocationReservedInstanceProperties", - "description": "The instance properties for this specific sku reservation." + "description": "The instance properties for the reservation." } }, "type": "object" @@ -25127,7 +26000,7 @@ "description": "[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property; you can only define one or the other, but not both." }, "interface": { - "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.", + "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. TODO(b/131765817): Update documentation when NVME is supported.", "enum": [ "NVME", "SCSI" @@ -25163,7 +26036,7 @@ "type": "string" }, "source": { - "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.\n\nIf desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.\n\nNote that for InstanceTemplate, specify the disk name, not the URL for the disk.", + "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.\n\nIf desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.\n\nNote that for InstanceTemplate, specify the disk name, not the URL for the disk.", "type": "string" }, "type": { @@ -25194,7 +26067,7 @@ "type": "string" }, "diskSizeGb": { - "description": "Specifies the size of the disk in base-2 GB.", + "description": "Specifies the size of the disk in base-2 GB. If not specified, the disk will be the same size as the image (usually 10GB). If specified, the size must be equal to or larger than 10GB.", "format": "int64", "type": "string" }, @@ -25224,7 +26097,7 @@ "type": "array" }, "sourceImage": { - "description": "The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the image name in the following format:\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\nglobal/images/family/my-image-family\n\n\nIf the source image is deleted later, this field will not be set.", + "description": "The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the image name in the following format:\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\nglobal/images/family/my-image-family\n\n\nIf the source image is deleted later, this field will not be set.", "type": "string" }, "sourceImageEncryptionKey": { @@ -25232,7 +26105,7 @@ "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.\n\nInstance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys." }, "sourceSnapshot": { - "description": "The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.\n\nTo create a disk with a snapshot that you created, specify the snapshot name in the following format:\nglobal/snapshots/my-backup\n\n\nIf the source snapshot is deleted later, this field will not be set.", + "description": "The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.\n\nTo create a disk with a snapshot that you created, specify the snapshot name in the following format:\nglobal/snapshots/my-backup\n\n\nIf the source snapshot is deleted later, this field will not be set.", "type": "string" }, "sourceSnapshotEncryptionKey": { @@ -25243,7 +26116,7 @@ "type": "object" }, "AuditConfig": { - "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"fooservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:bar@gmail.com\" ] } ] } ] }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.", + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"sampleservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] }\n\nFor sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", "id": "AuditConfig", "properties": { "auditLogConfigs": { @@ -25268,7 +26141,7 @@ "type": "object" }, "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.", + "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", "id": "AuditLogConfig", "properties": { "exemptedMembers": { @@ -25278,6 +26151,10 @@ }, "type": "array" }, + "ignoreChildExemptions": { + "description": "", + "type": "boolean" + }, "logType": { "description": "The log type that this config enables.", "enum": [ @@ -25323,7 +26200,7 @@ "type": "object" }, "Autoscaler": { - "description": "Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)", + "description": "Represents an Autoscaler resource.\n\n\n\nUse autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances.\n\nFor zonal managed instance groups resource, use the autoscaler resource.\n\nFor regional managed instance groups, use the regionAutoscalers resource. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)", "id": "Autoscaler", "properties": { "autoscalingPolicy": { @@ -25358,6 +26235,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "recommendedSize": { + "description": "[Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates recommended MIG size even when autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to the existing managed instance group or autoscaler did not generate its prediction.", + "format": "int32", + "type": "integer" + }, "region": { "description": "[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).", "type": "string" @@ -25367,7 +26249,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of the autoscaler configuration.", + "description": "[Output Only] The status of the autoscaler configuration. Current set of possible values: \n- PENDING: Autoscaler backend hasn't read new/updated configuration. \n- DELETING: Configuration is being deleted. \n- ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. \n- ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future.", "enum": [ "ACTIVE", "DELETING", @@ -25632,7 +26514,7 @@ "type": "string" }, "type": { - "description": "The type of error returned.", + "description": "The type of error, warning, or notice returned. Current set of possible values: \n- ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance group are unhealthy (not in RUNNING state). \n- BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service attached to the instance group. \n- CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size greater than maxNumReplicas. \n- CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric samples are not exported often enough to be a credible base for autoscaling. \n- CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified does not exist or does not have the necessary labels. \n- MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to maxNumReplicas. This means the autoscaler cannot add or remove instances from the instance group. \n- MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not receive any data from the custom metric configured for autoscaling. \n- MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is configured to scale based on a load balancing signal but the instance group has not received any requests from the load balancer. \n- MODE_OFF (WARNING): Autoscaling is turned off. The number of instances in the group won't change automatically. The autoscaling configuration is preserved. \n- MODE_ONLY_UP (WARNING): Autoscaling is in the \"Autoscale only up\" mode. The autoscaler can add instances but not remove any. \n- MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be autoscaled because it has more than one backend service attached to it. \n- NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for the necessary resources, such as CPU or number of instances. \n- REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional autoscalers: there is a resource stockout in the chosen region. \n- SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does not exist. \n- UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): Autoscaling does not work with an HTTP/S load balancer that has been configured for maxRate. \n- ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a resource stockout in the chosen zone. For regional autoscalers: in at least one of the zones you're using there is a resource stockout. New values might be added in the future. Some of the values might not be available in all API versions.", "enum": [ "ALL_INSTANCES_UNHEALTHY", "BACKEND_SERVICE_DOES_NOT_EXIST", @@ -25642,6 +26524,8 @@ "MIN_EQUALS_MAX", "MISSING_CUSTOM_METRIC_DATA_POINTS", "MISSING_LOAD_BALANCING_DATA_POINTS", + "MODE_OFF", + "MODE_ONLY_UP", "MORE_THAN_ONE_BACKEND_SERVICE", "NOT_ENOUGH_QUOTA_AVAILABLE", "REGION_RESOURCE_STOCKOUT", @@ -25665,6 +26549,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -25799,6 +26685,20 @@ "description": "The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.", "format": "int32", "type": "integer" + }, + "mode": { + "description": "Defines operating mode for this policy.", + "enum": [ + "OFF", + "ON", + "ONLY_UP" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" } }, "type": "object" @@ -25871,7 +26771,7 @@ "id": "Backend", "properties": { "balancingMode": { - "description": "Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).\n\nFor Internal Load Balancing, the default and only supported mode is CONNECTION.", + "description": "Specifies the balancing mode for the backend.\n\nWhen choosing a balancing mode, you need to consider the loadBalancingScheme, and protocol for the backend service, as well as the type of backend (instance group or NEG).\n\n \n- If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.\nYou can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.\n\nIf the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load balancers), you must also specify exactly one of the following parameters: maxConnections, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.\n\nIf the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.\n \n- If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).\nYou can use the RATE balancing mode if the protocol for the backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate, maxRatePerInstance, or maxRatePerEndpoint.\n \n- If the load balancing mode is UTILIZATION, the load is spread based on the CPU utilization of instances in an instance group.\nYou can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.", "enum": [ "CONNECTION", "RATE", @@ -25898,21 +26798,21 @@ "type": "boolean" }, "group": { - "description": "The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.\n\nFor Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group.\n\nBackend service can not contain mix of Instance Group and Network Endpoint Group backends.\n\nNote that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.\n\nWhen the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. Network Endpoint Groups are not supported for INTERNAL load balancing scheme.", + "description": "The fully-qualified URL of an instance group or network endpoint group (NEG) resource. The type of backend that a backend service supports depends on the backend service's loadBalancingScheme.\n\n \n- When the loadBalancingScheme for the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either an instance group or a NEG. The backends on the backend service must be either all instance groups or all NEGs. You cannot mix instance group and NEG backends on the same backend service. \n\n\n- When the loadBalancingScheme for the backend service is INTERNAL, the backend must be an instance group in the same region as the backend service. NEGs are not supported. \n\nYou must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.", "type": "string" }, "maxConnections": { - "description": "The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for simultaneous connections for the entire backend (instance group or NEG). If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.\n\nNot available if the backend's balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.", "format": "int32", "type": "integer" }, "maxConnectionsPerEndpoint": { - "description": "The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for simultaneous connections for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of target maximum simultaneous connections for the NEG. If the backend's balancingMode is CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerInstance.\n\nNot available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.", "format": "int32", "type": "integer" }, "maxConnectionsPerInstance": { - "description": "The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for simultaneous connections for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum number of simultaneous connections for the whole instance group. If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerEndpoint.\n\nNot available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.", "format": "int32", "type": "integer" }, @@ -25922,17 +26822,17 @@ "type": "integer" }, "maxRatePerEndpoint": { - "description": "The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for requests per second (RPS) for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum rate for the NEG.\n\nIf the backend's balancingMode is RATE, you must specify either this parameter, maxRate, or maxRatePerInstance.\n\nNot available if the backend's balancingMode is CONNECTION.", "format": "float", "type": "number" }, "maxRatePerInstance": { - "description": "The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for requests per second (RPS) for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum rate for the whole instance group.\n\nIf the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify either this parameter, maxRate, or maxRatePerEndpoint.\n\nNot available if the backend's balancingMode is CONNECTION.", "format": "float", "type": "number" }, "maxUtilization": { - "description": "Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].\n\nThis cannot be used for internal load balancing.", + "description": "Defines the maximum average CPU utilization of a backend VM in an instance group. The valid range is [0.0, 1.0]. This is an optional parameter if the backend's balancingMode is UTILIZATION.\n\nThis parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections, or maxConnectionsPerInstance.", "format": "float", "type": "number" } @@ -25940,7 +26840,7 @@ "type": "object" }, "BackendBucket": { - "description": "A BackendBucket resource. This resource defines a Cloud Storage bucket.", + "description": "Represents a Cloud Storage Bucket resource.\n\nThis Cloud Storage bucket resource is referenced by a URL map of a load balancer. For more information, read Backend Buckets.", "id": "BackendBucket", "properties": { "bucketName": { @@ -26117,11 +27017,11 @@ "type": "object" }, "BackendService": { - "description": "A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity. (== resource_for v1.backendService ==) (== resource_for beta.backendService ==)", + "description": "Represents a Backend Service resource.\n\nA backend service contains configuration values for Google Cloud Platform load balancing services.\n\nFor more information, read Backend Services.\n\n(== resource_for v1.backendService ==) (== resource_for beta.backendService ==)", "id": "BackendService", "properties": { "affinityCookieTtlSec": { - "description": "Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", + "description": "If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value is one day (86,400).", "format": "int32", "type": "integer" }, @@ -26138,7 +27038,7 @@ }, "circuitBreakers": { "$ref": "CircuitBreakers", - "description": "Settings controlling the volume of connections to a backend service.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." + "description": "Settings controlling the volume of connections to a backend service. If not set, this feature is considered disabled.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." }, "connectionDraining": { "$ref": "ConnectionDraining" @@ -26163,11 +27063,12 @@ "type": "string" }, "enableCDN": { - "description": "If true, enable Cloud CDN for this BackendService.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", + "description": "If true, enables Cloud CDN for the backend service. Only applicable if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or HTTPS.", "type": "boolean" }, "failoverPolicy": { - "$ref": "BackendServiceFailoverPolicy" + "$ref": "BackendServiceFailoverPolicy", + "description": "Applicable only to Failover for Internal TCP/UDP Load Balancing. Requires at least one backend instance group to be defined as a backup (failover) backend." }, "fingerprint": { "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a BackendService.", @@ -26195,7 +27096,7 @@ "type": "string" }, "loadBalancingScheme": { - "description": "Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.", + "description": "Specifies the load balancer type. Choose EXTERNAL for load balancers that receive traffic from external clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose INTERNAL_SELF_MANAGED for Traffic Director. A backend service created for one type of load balancing cannot be used with another. For more information, refer to Choosing a load balancer.", "enum": [ "EXTERNAL", "INTERNAL", @@ -26243,21 +27144,25 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "network": { + "description": "The URL of the network to which this backend service belongs. This field can only be spcified when the load balancing scheme is set to INTERNAL.", + "type": "string" + }, "outlierDetection": { "$ref": "OutlierDetection", - "description": "Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." + "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." }, "port": { - "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.\n\nThis cannot be used for internal load balancing.", + "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.\n\nThis cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).", "format": "int32", "type": "integer" }, "portName": { - "description": "Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", + "description": "A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.\n\n\n\nMust be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).", "type": "string" }, "protocol": { - "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", + "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP, depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic Director for more information.", "enum": [ "HTTP", "HTTP2", @@ -26289,7 +27194,7 @@ "type": "string" }, "sessionAffinity": { - "description": "Type of session affinity to use. The default is NONE.\n\nWhen the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.\n\nWhen the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.\n\nWhen the protocol is UDP, this field is not used.", + "description": "Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.\n\nWhen the loadBalancingScheme is EXTERNAL, possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the protocol is HTTP or HTTPS.\n\nWhen the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.\n\nWhen the loadBalancingScheme is INTERNAL_SELF_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.", "enum": [ "CLIENT_IP", "CLIENT_IP_PORT_PROTO", @@ -26311,7 +27216,7 @@ "type": "string" }, "timeoutSec": { - "description": "How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.", + "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information read, Backend service settings The default is 30 seconds.", "format": "int32", "type": "integer" } @@ -26458,15 +27363,15 @@ "id": "BackendServiceFailoverPolicy", "properties": { "disableConnectionDrainOnFailover": { - "description": "On failover or failback, this field indicates whether connection drain will be honored. Setting this to true has the following effect: connections to the old active pool are not drained. Connections to the new active pool use the timeout of 10 min (currently fixed). Setting to false has the following effect: both old and new connections will have a drain timeout of 10 min.\n\nThis can be set to true only if the protocol is TCP.\n\nThe default is false.", + "description": "This can be set to true only if the protocol is TCP.\n\nThe default is false.", "type": "boolean" }, "dropTrafficIfUnhealthy": { - "description": "This option is used only when no healthy VMs are detected in the primary and backup instance groups. When set to true, traffic is dropped. When set to false, new connections are sent across all VMs in the primary group.\n\nThe default is false.", + "description": "Applicable only to Failover for Internal TCP/UDP Load Balancing. If set to true, connections to the load balancer are dropped when all primary and all backup backend VMs are unhealthy. If set to false, connections are distributed among all primary VMs when all primary and all backup backend VMs are unhealthy.\n\nThe default is false.", "type": "boolean" }, "failoverRatio": { - "description": "The value of the field must be in [0, 1]. If the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend.\n\nIn case where 'failoverRatio' is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the \"force\" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy.\n\nThis field is only used with l4 load balancing.", + "description": "Applicable only to Failover for Internal TCP/UDP Load Balancing. The value of the field must be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the number of healthy primary VMs equals zero. For all other values, the load balancer performs a failover when the total number of healthy primary VMs is less than this ratio.", "format": "float", "type": "number" } @@ -26742,6 +27647,250 @@ }, "type": "object" }, + "BfdPacket": { + "description": "", + "id": "BfdPacket", + "properties": { + "authenticationPresent": { + "description": "The Authentication Present bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "controlPlaneIndependent": { + "description": "The Control Plane Independent bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "demand": { + "description": "The demand bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "diagnostic": { + "description": "The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880", + "enum": [ + "ADMINISTRATIVELY_DOWN", + "CONCATENATED_PATH_DOWN", + "CONTROL_DETECTION_TIME_EXPIRED", + "DIAGNOSTIC_UNSPECIFIED", + "ECHO_FUNCTION_FAILED", + "FORWARDING_PLANE_RESET", + "NEIGHBOR_SIGNALED_SESSION_DOWN", + "NO_DIAGNOSTIC", + "PATH_DOWN", + "REVERSE_CONCATENATED_PATH_DOWN" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "final": { + "description": "The Final bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "length": { + "description": "The length of the BFD Control packet in bytes. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "minEchoRxIntervalMs": { + "description": "The Required Min Echo RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "minRxIntervalMs": { + "description": "The Required Min RX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "minTxIntervalMs": { + "description": "The Desired Min TX Interval value in the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "multiplier": { + "description": "The detection time multiplier of the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "multipoint": { + "description": "The multipoint bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "myDiscriminator": { + "description": "The My Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + }, + "poll": { + "description": "The Poll bit of the BFD packet. This is specified in section 4.1 of RFC5880", + "type": "boolean" + }, + "state": { + "description": "The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880", + "enum": [ + "ADMIN_DOWN", + "DOWN", + "INIT", + "STATE_UNSPECIFIED", + "UP" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "version": { + "description": "The version number of the BFD protocol, as specified in section 4.1 of RFC5880.", + "format": "uint32", + "type": "integer" + }, + "yourDiscriminator": { + "description": "The Your Discriminator value in the BFD packet. This is specified in section 4.1 of RFC5880", + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, + "BfdStatus": { + "description": "Next free: 15", + "id": "BfdStatus", + "properties": { + "bfdSessionInitializationMode": { + "description": "The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer.", + "enum": [ + "ACTIVE", + "DISABLED", + "PASSIVE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "configUpdateTimestampMicros": { + "description": "Unix timestamp of the most recent config update.", + "format": "int64", + "type": "string" + }, + "controlPacketCounts": { + "$ref": "BfdStatusPacketCounts", + "description": "Control packet counts for the current BFD session." + }, + "controlPacketIntervals": { + "description": "Inter-packet time interval statistics for control packets.", + "items": { + "$ref": "PacketIntervals" + }, + "type": "array" + }, + "localDiagnostic": { + "description": "The diagnostic code specifies the local system's reason for the last change in session state. This allows remote systems to determine the reason that the previous session failed, for example. These diagnostic codes are specified in section 4.1 of RFC5880", + "enum": [ + "ADMINISTRATIVELY_DOWN", + "CONCATENATED_PATH_DOWN", + "CONTROL_DETECTION_TIME_EXPIRED", + "DIAGNOSTIC_UNSPECIFIED", + "ECHO_FUNCTION_FAILED", + "FORWARDING_PLANE_RESET", + "NEIGHBOR_SIGNALED_SESSION_DOWN", + "NO_DIAGNOSTIC", + "PATH_DOWN", + "REVERSE_CONCATENATED_PATH_DOWN" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "localState": { + "description": "The current BFD session state as seen by the transmitting system. These states are specified in section 4.1 of RFC5880", + "enum": [ + "ADMIN_DOWN", + "DOWN", + "INIT", + "STATE_UNSPECIFIED", + "UP" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "negotiatedLocalControlTxIntervalMs": { + "description": "Negotiated transmit interval for control packets.", + "format": "uint32", + "type": "integer" + }, + "rxPacket": { + "$ref": "BfdPacket", + "description": "The most recent Rx control packet for this BFD session." + }, + "txPacket": { + "$ref": "BfdPacket", + "description": "The most recent Tx control packet for this BFD session." + }, + "uptimeMs": { + "description": "Session uptime in milliseconds. Value will be 0 if session is not up.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "BfdStatusPacketCounts": { + "id": "BfdStatusPacketCounts", + "properties": { + "numRx": { + "description": "Number of packets received since the beginning of the current BFD session.", + "format": "uint32", + "type": "integer" + }, + "numRxRejected": { + "description": "Number of packets received that were rejected because of errors since the beginning of the current BFD session.", + "format": "uint32", + "type": "integer" + }, + "numRxSuccessful": { + "description": "Number of packets received that were successfully processed since the beginning of the current BFD session.", + "format": "uint32", + "type": "integer" + }, + "numTx": { + "description": "Number of packets transmitted since the beginning of the current BFD session.", + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, "Binding": { "description": "Associates `members` with a `role`.", "id": "Binding", @@ -26751,7 +27900,7 @@ "description": "The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.", + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.", "items": { "type": "string" }, @@ -26819,27 +27968,27 @@ "description": "The timeout for new network connections to hosts." }, "maxConnections": { - "description": "The maximum number of connections to the backend cluster. If not specified, the default is 1024.", + "description": "The maximum number of connections to the backend service. If not specified, there is no limit.", "format": "int32", "type": "integer" }, "maxPendingRequests": { - "description": "The maximum number of pending requests allowed to the backend cluster. If not specified, the default is 1024.", + "description": "The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.", "format": "int32", "type": "integer" }, "maxRequests": { - "description": "The maximum number of parallel requests that allowed to the backend cluster. If not specified, the default is 1024.", + "description": "The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.", "format": "int32", "type": "integer" }, "maxRequestsPerConnection": { - "description": "Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.", + "description": "Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.", "format": "int32", "type": "integer" }, "maxRetries": { - "description": "The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 3.", + "description": "The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.", "format": "int32", "type": "integer" } @@ -26847,7 +27996,7 @@ "type": "object" }, "Commitment": { - "description": "Represents a Commitment resource. Creating a Commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts.\n\nCommitted use discounts are subject to Google Cloud Platform's Service Specific Terms. By purchasing a committed use discount, you agree to these terms. Committed use discounts will not renew, so you must purchase a new commitment to continue receiving discounts. (== resource_for beta.commitments ==) (== resource_for v1.commitments ==)", + "description": "Represents a regional Commitment resource.\n\nCreating a commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts. (== resource_for beta.regionCommitments ==) (== resource_for v1.regionCommitments ==)", "id": "Commitment", "properties": { "creationTimestamp": { @@ -26896,7 +28045,7 @@ "type": "string" }, "reservations": { - "description": "List of reservations for this commitment.", + "description": "List of reservations in this commitment.", "items": { "$ref": "Reservation" }, @@ -26936,6 +28085,28 @@ "statusMessage": { "description": "[Output Only] An optional, human-readable explanation of the status.", "type": "string" + }, + "type": { + "description": "The type of commitment, which affects the discount rate and the eligible resources. Type MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized machines.", + "enum": [ + "COMPUTE_OPTIMIZED", + "GENERAL_PURPOSE", + "GENERAL_PURPOSE_E2", + "GENERAL_PURPOSE_N2", + "GENERAL_PURPOSE_N2D", + "MEMORY_OPTIMIZED", + "TYPE_UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" } }, "type": "object" @@ -27341,7 +28512,7 @@ "id": "ConnectionDraining", "properties": { "drainingTimeoutSec": { - "description": "Time for which instance will be drained (not accept new connections, but still work to finish started).", + "description": "The amount of time in seconds to allow existing connections to persist while on unhealthy backend VMs. Only applicable if the protocol is not UDP. The valid range is [0, 3600].", "format": "int32", "type": "integer" } @@ -27450,6 +28621,10 @@ "description": "The name of the encryption key that is stored in Google Cloud KMS.", "type": "string" }, + "kmsKeyServiceAccount": { + "description": "The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.", + "type": "string" + }, "rawKey": { "description": "Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.", "type": "string" @@ -27519,7 +28694,7 @@ "type": "object" }, "Disk": { - "description": "A Disk resource. (== resource_for beta.disks ==) (== resource_for v1.disks ==)", + "description": "Represents a Persistent Disk resource.\n\nPersistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options.\n\nThe disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.\n\nThe regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for beta.disks ==) (== resource_for v1.disks ==) (== resource_for v1.regionDisks ==) (== resource_for beta.regionDisks ==)", "id": "Disk", "properties": { "creationTimestamp": { @@ -27534,6 +28709,10 @@ "$ref": "CustomerEncryptionKey", "description": "Encrypts the disk using a customer-supplied encryption key.\n\nAfter you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot, to create a disk image, to create a machine image, or to attach the disk to a virtual machine).\n\nCustomer-supplied encryption keys do not protect access to metadata of the disk.\n\nIf you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later." }, + "eraseWindowsVssSignature": { + "description": "Specifies whether the disk restored from a source snapshot should erase Windows specific VSS signature.", + "type": "boolean" + }, "guestOsFeatures": { "description": "A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.", "items": { @@ -27657,7 +28836,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of disk creation.", + "description": "[Output Only] The status of disk creation. CREATING: Disk is provisioning. RESTORING: Source data is being copied into the disk. FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: Disk is deleting.", "enum": [ "CREATING", "DELETING", @@ -27984,7 +29163,7 @@ "type": "object" }, "DiskType": { - "description": "A DiskType resource. (== resource_for beta.diskTypes ==) (== resource_for v1.diskTypes ==)", + "description": "Represents a Disk Type resource.\n\nYou can choose from a variety of disk types based on your needs. For more information, read Storage options.\n\nThe diskTypes resource represents disk types for a zonal persistent disk. For more information, read Zonal persistent disks.\n\nThe regionDiskTypes resource represents disk types for a regional persistent disk. For more information, read Regional persistent disks. (== resource_for beta.diskTypes ==) (== resource_for v1.diskTypes ==) (== resource_for v1.regionDiskTypes ==) (== resource_for beta.regionDiskTypes ==)", "id": "DiskType", "properties": { "creationTimestamp": { @@ -28360,7 +29539,7 @@ "id": "DisksAddResourcePoliciesRequest", "properties": { "resourcePolicies": { - "description": "Resource policies to be added to this disk.", + "description": "Resource policies to be added to this disk. Currently you can only specify one policy here.", "items": { "type": "string" }, @@ -28552,7 +29731,7 @@ "type": "string" }, "imported": { - "description": "If the peering route is imported if there is no confliction.", + "description": "True if the peering route has been imported from a peer. The actual import happens if the field networkPeering.importCustomRoutes is true for this network, and networkPeering.exportCustomRoutes is true for the peer network, and the import does not result in a route conflict.", "type": "boolean" }, "nextHopRegion": { @@ -28919,7 +30098,7 @@ "type": "object" }, "Firewall": { - "description": "Represents a Firewall resource.", + "description": "Represents a Firewall Rule resource.\n\nFirewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.", "id": "Firewall", "properties": { "allowed": { @@ -28927,11 +30106,11 @@ "items": { "properties": { "IPProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.", + "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.", "type": "string" }, "ports": { - "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", + "description": "An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", "items": { "type": "string" }, @@ -28951,11 +30130,11 @@ "items": { "properties": { "IPProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.", + "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.", "type": "string" }, "ports": { - "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", + "description": "An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", "items": { "type": "string" }, @@ -28967,18 +30146,18 @@ "type": "array" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "destinationRanges": { - "description": "If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.", + "description": "If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.", "items": { "type": "string" }, "type": "array" }, "direction": { - "description": "Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.", + "description": "Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.", "enum": [ "EGRESS", "INGRESS" @@ -28990,7 +30169,7 @@ "type": "string" }, "disabled": { - "description": "Denotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.", + "description": "Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.", "type": "boolean" }, "enableLogging": { @@ -29018,16 +30197,16 @@ "compute.firewalls.patch" ] }, - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, "network": { - "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default", + "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default", "type": "string" }, "priority": { - "description": "Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.", + "description": "Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.", "format": "int32", "type": "integer" }, @@ -29036,21 +30215,21 @@ "type": "string" }, "sourceRanges": { - "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.", + "description": "If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.", "items": { "type": "string" }, "type": "array" }, "sourceServiceAccounts": { - "description": "If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.", + "description": "If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.", "items": { "type": "string" }, "type": "array" }, "sourceTags": { - "description": "If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.", + "description": "If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.", "items": { "type": "string" }, @@ -29219,15 +30398,15 @@ "type": "object" }, "ForwardingRule": { - "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== resource_for beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (== resource_for beta.globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==)", + "description": "Represents a Forwarding Rule resource.\n\nA forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud Platform load balancer. Forwarding rules can also reference target instances and Cloud VPN Classic gateways (targetVpnGateway).\n\nFor more information, read Forwarding rule concepts and Using protocol forwarding.\n\n(== resource_for beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (== resource_for beta.globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==)", "id": "ForwardingRule", "properties": { "IPAddress": { - "description": "The IP address that this forwarding rule is serving on behalf of.\n\nAddresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional).\n\nWhen the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.\n\nWhen the load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL reference to an existing Address resource ( internal regional static IP address), with a purpose of GCE_END_POINT and address_type of INTERNAL.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule.\n\nAn address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: \n- 100.1.2.3 \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address \n- projects/project/regions/region/addresses/address \n- regions/region/addresses/address \n- global/addresses/address \n- address", + "description": "IP address that this forwarding rule serves. When a client sends traffic to this IP address, the forwarding rule directs the traffic to the target that you specify in the forwarding rule.\n\nIf you don't specify a reserved IP address, an ephemeral IP address is assigned. Methods for specifying an IP address:\n\n* IPv4 dotted decimal, as in `100.1.2.3` * Full URL, as in https://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name * Partial URL or by name, as in: * projects/project_id/regions/region/addresses/address-name * regions/region/addresses/address-name * global/addresses/address-name * address-name \n\nThe loadBalancingScheme and the forwarding rule's target determine the type of IP address that you can use. For detailed information, refer to [IP address specifications](/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications).", "type": "string" }, "IPProtocol": { - "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL, only TCP and UDP are valid. When the load balancing scheme is INTERNAL_SELF_MANAGED, only TCPis valid.", + "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nFor Internal TCP/UDP Load Balancing, the load balancing scheme is INTERNAL, and one of TCP or UDP are valid. For Traffic Director, the load balancing scheme is INTERNAL_SELF_MANAGED, and only TCPis valid. For Internal HTTP(S) Load Balancing, the load balancing scheme is INTERNAL_MANAGED, and only TCP is valid. For HTTP(S), SSL Proxy, and TCP Proxy Load Balancing, the load balancing scheme is EXTERNAL and only TCP is valid. For Network TCP/UDP Load Balancing, the load balancing scheme is EXTERNAL, and one of TCP or UDP is valid.", "enum": [ "AH", "ESP", @@ -29290,6 +30469,10 @@ ], "type": "string" }, + "isMirroringCollector": { + "description": "Indicates whether or not this load balancer can be used as a collector for packet mirroring. To prevent mirroring loops, instances behind this load balancer will not have their traffic mirrored even if a PacketMirroring rule applies to them. This can only be set to true for load balancers that have their loadBalancingScheme set to INTERNAL.", + "type": "boolean" + }, "kind": { "default": "compute#forwardingRule", "description": "[Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources.", @@ -29308,7 +30491,7 @@ "type": "object" }, "loadBalancingScheme": { - "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, INTERNAL_SELF_MANAGED, EXTERNAL. The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of INTERNAL_SELF_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", + "description": "Specifies the forwarding rule type. EXTERNAL is used for: - Classic Cloud VPN gateways - Protocol forwarding to VMs from an external IP address - The following load balancers: HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP.\n\nINTERNAL is used for: - Protocol forwarding to VMs from an internal IP address - Internal TCP/UDP load balancers\n\nINTERNAL_MANAGED is used for: - Internal HTTP(S) load balancers\n\nINTERNAL_SELF_MANAGED is used for: - Traffic Director\n\nFor more information about forwarding rules, refer to Forwarding rule concepts.", "enum": [ "EXTERNAL", "INTERNAL", @@ -29354,11 +30537,11 @@ "type": "string" }, "portRange": { - "description": "This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nSome types of forwarding target have constraints on the acceptable ports: \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetVpnGateway: 500, 4500", + "description": "This field is deprecated. See the port\nfield.", "type": "string" }, "ports": { - "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a list of ports can be configured, for example, ['80'], ['8000','9000'] etc. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.", + "description": "List of comma-separated ports. The forwarding rule forwards packets with matching destination ports. If the forwarding rule's loadBalancingScheme is EXTERNAL, and the forwarding rule references a target pool, specifying ports is optional. You can specify an unlimited number of ports, but they must be contiguous. If you omit ports, GCP forwards traffic on any port of the forwarding rule's protocol.\n\nIf the forwarding rule's loadBalancingScheme is EXTERNAL, and the forwarding rule references a target HTTP proxy, target HTTPS proxy, target TCP proxy, target SSL proxy, or target VPN gateway, you must specify ports using the following constraints:\n\n \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetVpnGateway: 500, 4500 \n\nIf the forwarding rule's loadBalancingScheme is INTERNAL, you must specify ports in one of the following ways:\n\n* A list of up to five ports, which can be non-contiguous * Keyword ALL, which causes the forwarding rule to forward traffic on any port of the forwarding rule's protocol.\n\nThe ports field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.", "items": { "type": "string" }, @@ -29373,7 +30556,7 @@ "type": "string" }, "serviceLabel": { - "description": "An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name.\n\nThe label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.\n\nThis field is only used for internal load balancing.", + "description": "An optional prefix to the service name for this Forwarding Rule. If specified, the prefix is the first label of the fully qualified service name.\n\nThe label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.\n\nThis field is only used for internal load balancing.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -29831,6 +31014,7 @@ "description": "The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.", "enum": [ "FEATURE_TYPE_UNSPECIFIED", + "GVNIC", "MULTI_IP_SUBNET", "SECURE_BOOT", "UEFI_COMPATIBLE", @@ -29843,6 +31027,7 @@ "", "", "", + "", "" ], "type": "string" @@ -30010,7 +31195,7 @@ "type": "object" }, "HealthCheck": { - "description": "An HealthCheck resource. This resource defines a template for how individual virtual machines should be checked for health, via one of the supported protocols.", + "description": "Represents a Health Check resource.\n\nHealth checks are used for most GCP load balancers and managed instance group auto-healing. For more information, read Health Check Concepts.\n\nTo perform health checks on network load balancers, you must use either httpHealthChecks or httpsHealthChecks.", "id": "HealthCheck", "properties": { "checkIntervalSec": { @@ -30659,7 +31844,7 @@ "type": "object" }, "HttpHealthCheck": { - "description": "An HttpHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTP.", + "description": "Represents a legacy HTTP Health Check resource.\n\nLegacy health checks are required by network load balancers. For more information, read Health Check Concepts.", "id": "HttpHealthCheck", "properties": { "checkIntervalSec": { @@ -30705,7 +31890,7 @@ "type": "integer" }, "requestPath": { - "description": "The request path of the HTTP health check request. The default value is /.", + "description": "The request path of the HTTP health check request. The default value is /. This field does not support query parameters.", "type": "string" }, "selfLink": { @@ -30910,13 +32095,13 @@ "id": "HttpRetryPolicy", "properties": { "numRetries": { - "description": "Specifies the allowed number retries. This number must be \u003e 0.", + "description": "Specifies the allowed number retries. This number must be \u003e 0. If not specified, defaults to 1.", "format": "uint32", "type": "integer" }, "perTryTimeout": { "$ref": "Duration", - "description": "Specifies a non-zero timeout per retry attempt." + "description": "Specifies a non-zero timeout per retry attempt.\nIf not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route." }, "retryConditions": { "description": "Specfies one or more conditions when this retry rule applies. Valid values are: \n- 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \n- gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.\n- \n- connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \n- retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \n- refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. \n- cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled \n- deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \n- resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \n- unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable", @@ -30949,7 +32134,7 @@ }, "timeout": { "$ref": "Duration", - "description": "Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.\nIf not specified, the default value is 15 seconds." + "description": "Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.\nIf not specified, will use the largest timeout among all backend services associated with the route." }, "urlRewrite": { "$ref": "UrlRewrite", @@ -30969,6 +32154,10 @@ "description": "An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.", "id": "HttpRouteRule", "properties": { + "description": { + "description": "The short description conveying the intent of this routeRule.\nThe description can have a maximum length of 1024 characters.", + "type": "string" + }, "headerAction": { "$ref": "HttpHeaderAction", "description": "Specifies changes to request and response headers that need to take effect for the selected backendService.\nThe headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction" @@ -30979,6 +32168,11 @@ }, "type": "array" }, + "priority": { + "description": "For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied.\nYou cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive.\nPriority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.", + "format": "int32", + "type": "integer" + }, "routeAction": { "$ref": "HttpRouteAction", "description": "In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.\nOnly one of routeAction or urlRedirect must be set." @@ -31039,7 +32233,7 @@ "type": "object" }, "HttpsHealthCheck": { - "description": "An HttpsHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTPS.", + "description": "Represents a legacy HTTPS Health Check resource.\n\nLegacy health checks are required by network load balancers. For more information, read Health Check Concepts.", "id": "HttpsHealthCheck", "properties": { "checkIntervalSec": { @@ -31218,7 +32412,7 @@ "type": "object" }, "Image": { - "description": "An Image resource. (== resource_for beta.images ==) (== resource_for v1.images ==)", + "description": "Represents an Image resource.\n\nYou can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for beta.images ==) (== resource_for v1.images ==)", "id": "Image", "properties": { "archiveSizeBytes": { @@ -31403,7 +32597,7 @@ "type": "string" }, "storageLocations": { - "description": "GCS bucket storage location of the image (regional or multi-regional).", + "description": "Cloud Storage bucket storage location of the image (regional or multi-regional).", "items": { "type": "string" }, @@ -31525,7 +32719,7 @@ "type": "object" }, "Instance": { - "description": "An Instance resource. (== resource_for beta.instances ==) (== resource_for v1.instances ==)", + "description": "Represents an Instance resource.\n\nAn instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for beta.instances ==) (== resource_for v1.instances ==)", "id": "Instance", "properties": { "canIpForward": { @@ -31559,6 +32753,10 @@ "$ref": "DisplayDevice", "description": "Enables display device for the instance." }, + "eraseWindowsVssSignature": { + "description": "Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.", + "type": "boolean" + }, "guestAccelerators": { "description": "A list of the type and count of accelerator cards attached to the instance.", "items": { @@ -31567,6 +32765,7 @@ "type": "array" }, "hostname": { + "description": "Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.", "type": "string" }, "id": { @@ -31627,7 +32826,7 @@ }, "reservationAffinity": { "$ref": "ReservationAffinity", - "description": "The configuration of desired reservations from which this Instance can consume capacity from." + "description": "Specifies the reservations that this instance can consume from." }, "scheduling": { "$ref": "Scheduling", @@ -31656,6 +32855,14 @@ "shieldedVmIntegrityPolicy": { "$ref": "ShieldedVmIntegrityPolicy" }, + "sourceMachineImage": { + "description": "Source machine image", + "type": "string" + }, + "sourceMachineImageEncryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "Source GMI encryption key when creating an instance from GMI." + }, "startRestricted": { "description": "[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.", "type": "boolean" @@ -31713,7 +32920,7 @@ "$ref": "InstancesScopedList", "description": "[Output Only] Name of the scope containing this set of instances." }, - "description": "A list of InstancesScopedList resources.", + "description": "An object that contains a list of instances scoped by zone.", "type": "object" }, "kind": { @@ -31814,7 +33021,7 @@ "type": "object" }, "InstanceGroup": { - "description": "InstanceGroups (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==)", + "description": "Represents an unmanaged Instance Group resource.\n\nUse unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. For more information, read Instance groups.\n\nFor zonal unmanaged Instance Group, use instanceGroups resource.\n\nFor regional unmanaged Instance Group, use regionInstanceGroups resource. (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==)", "id": "InstanceGroup", "properties": { "creationTimestamp": { @@ -32110,7 +33317,7 @@ "type": "object" }, "InstanceGroupManager": { - "description": "An Instance Group Manager resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)", + "description": "Represents a Managed Instance Group resource.\n\nAn instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.\n\nFor zonal Managed Instance Group, use the instanceGroupManagers resource.\n\nFor regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)", "id": "InstanceGroupManager", "properties": { "autoHealingPolicies": { @@ -32600,6 +33807,7 @@ "id": "InstanceGroupManagerUpdatePolicy", "properties": { "instanceRedistributionType": { + "description": "The instance redistribution policy for regional managed instance groups. Valid values are: \n- PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region. \n- NONE: For non-autoscaled groups, proactive redistribution is disabled.", "enum": [ "NONE", "PROACTIVE" @@ -32626,16 +33834,21 @@ "minimalAction": { "description": "Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.", "enum": [ + "NONE", + "REFRESH", "REPLACE", "RESTART" ], "enumDescriptions": [ + "", + "", "", "" ], "type": "string" }, "type": { + "description": "The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).", "enum": [ "OPPORTUNISTIC", "PROACTIVE" @@ -32685,31 +33898,39 @@ "id": "InstanceGroupManagersApplyUpdatesRequest", "properties": { "instances": { - "description": "The list of URLs of one or more instances for which we want to apply updates on this managed instance group. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "description": "The list of URLs of one or more instances for which you want to apply updates. Each URL can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" }, "type": "array" }, "minimalAction": { - "description": "The minimal action that should be perfomed on the instances. By default NONE.", + "description": "The minimal action that you want to perform on each instance during the update: \n- REPLACE: At minimum, delete the instance and create it again. \n- RESTART: Stop the instance and start it again. \n- REFRESH: Do not stop the instance. \n- NONE: Do not disrupt the instance at all. By default, the minimum action is NONE. If your update requires a more disruptive action than you set with this flag, the necessary action is performed to execute the update.", "enum": [ + "NONE", + "REFRESH", "REPLACE", "RESTART" ], "enumDescriptions": [ + "", + "", "", "" ], "type": "string" }, "mostDisruptiveAllowedAction": { - "description": "The most disruptive action that allowed to be performed on the instances. By default REPLACE.", + "description": "The most disruptive action that you want to perform on each instance during the update: \n- REPLACE: Delete the instance and create it again. \n- RESTART: Stop the instance and start it again. \n- REFRESH: Do not stop the instance. \n- NONE: Do not disrupt the instance at all. By default, the most disruptive allowed action is REPLACE. If your update requires a more disruptive action than you set with this flag, the update request will fail.", "enum": [ + "NONE", + "REFRESH", "REPLACE", "RESTART" ], "enumDescriptions": [ + "", + "", "", "" ], @@ -32718,6 +33939,20 @@ }, "type": "object" }, + "InstanceGroupManagersCreateInstancesRequest": { + "description": "InstanceGroupManagers.createInstances", + "id": "InstanceGroupManagersCreateInstancesRequest", + "properties": { + "instances": { + "description": "[Required] List of specifications of per-instance configs.", + "items": { + "$ref": "PerInstanceConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "InstanceGroupManagersDeleteInstancesRequest": { "id": "InstanceGroupManagersDeleteInstancesRequest", "properties": { @@ -33478,7 +34713,7 @@ }, "reservationAffinity": { "$ref": "ReservationAffinity", - "description": "The configuration of desired reservations which this Instance could consume capacity from." + "description": "Specifies the reservations that this instance can consume from." }, "scheduling": { "$ref": "Scheduling", @@ -33516,7 +34751,7 @@ "type": "object" }, "InstanceTemplate": { - "description": "An Instance Template resource. (== resource_for beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==)", + "description": "Represents an Instance Template resource.\n\nYou can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==)", "id": "InstanceTemplate", "properties": { "creationTimestamp": { @@ -33930,7 +35165,7 @@ "type": "object" }, "Interconnect": { - "description": "Represents an Interconnects resource. The Interconnects resource is a dedicated connection between Google's network and your on-premises network. For more information, see the Dedicated overview page. (== resource_for v1.interconnects ==) (== resource_for beta.interconnects ==)", + "description": "Represents an Interconnect resource.\n\nAn Interconnect resource is a dedicated connection between the GCP network and your on-premises network. For more information, read the Dedicated Interconnect Overview. (== resource_for v1.interconnects ==) (== resource_for beta.interconnects ==)", "id": "Interconnect", "properties": { "adminEnabled": { @@ -34090,7 +35325,7 @@ "type": "object" }, "InterconnectAttachment": { - "description": "Represents an InterconnectAttachment (VLAN attachment) resource. For more information, see Creating VLAN Attachments. (== resource_for beta.interconnectAttachments ==) (== resource_for v1.interconnectAttachments ==)", + "description": "Represents an Interconnect Attachment (VLAN) resource.\n\nYou can use Interconnect attachments (VLANS) to connect your Virtual Private Cloud networks to your on-premises networks through an Interconnect. For more information, read Creating VLAN Attachments. (== resource_for beta.interconnectAttachments ==) (== resource_for v1.interconnectAttachments ==)", "id": "InterconnectAttachment", "properties": { "adminEnabled": { @@ -34098,16 +35333,18 @@ "type": "boolean" }, "bandwidth": { - "description": "Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one of the following values: \n- BPS_50M: 50 Mbit/s \n- BPS_100M: 100 Mbit/s \n- BPS_200M: 200 Mbit/s \n- BPS_300M: 300 Mbit/s \n- BPS_400M: 400 Mbit/s \n- BPS_500M: 500 Mbit/s \n- BPS_1G: 1 Gbit/s \n- BPS_2G: 2 Gbit/s \n- BPS_5G: 5 Gbit/s \n- BPS_10G: 10 Gbit/s", + "description": "Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one of the following values: \n- BPS_50M: 50 Mbit/s \n- BPS_100M: 100 Mbit/s \n- BPS_200M: 200 Mbit/s \n- BPS_300M: 300 Mbit/s \n- BPS_400M: 400 Mbit/s \n- BPS_500M: 500 Mbit/s \n- BPS_1G: 1 Gbit/s \n- BPS_2G: 2 Gbit/s \n- BPS_5G: 5 Gbit/s \n- BPS_10G: 10 Gbit/s \n- BPS_20G: 20 Gbit/s \n- BPS_50G: 50 Gbit/s", "enum": [ "BPS_100M", "BPS_10G", "BPS_1G", "BPS_200M", + "BPS_20G", "BPS_2G", "BPS_300M", "BPS_400M", "BPS_500M", + "BPS_50G", "BPS_50M", "BPS_5G" ], @@ -34121,6 +35358,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -34163,7 +35402,7 @@ "type": "string" }, "googleReferenceId": { - "description": "[Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.", + "description": "[Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues. [Deprecated] This field is not used.", "type": "string" }, "id": { @@ -34890,7 +36129,7 @@ "type": "object" }, "InterconnectLocation": { - "description": "Represents an InterconnectLocations resource. The InterconnectLocations resource describes the locations where you can connect to Google's networks. For more information, see Colocation Facilities.", + "description": "Represents an Interconnect Attachment (VLAN) Location resource.\n\nYou can use this resource to find location details about an Interconnect attachment (VLAN). For more information about interconnect attachments, read Creating VLAN Attachments.", "id": "InterconnectLocation", "properties": { "address": { @@ -35199,6 +36438,7 @@ "enum": [ "ACTIVE", "CANCELLED", + "COMPLETED", "NS_ACTIVE", "NS_CANCELED" ], @@ -35206,6 +36446,7 @@ "", "", "", + "", "" ], "type": "string" @@ -35526,9 +36767,16 @@ "type": "object" }, "LogConfigCounterOptions": { - "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nSupported field names: - \"authority\", which is \"[token]\" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - \"iam_principal\", a representation of IAMContext.principal even if a token or authority selector is present; or - \"\" (empty string), resulting in a counter with no fields.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support multiple field names (though this may be supported in the future).", + "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nSupported field names: - \"authority\", which is \"[token]\" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - \"iam_principal\", a representation of IAMContext.principal even if a token or authority selector is present; or - \"\" (empty string), resulting in a counter with no fields.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nTODO(b/141846426): Consider supporting \"authority\" and \"iam_principal\" fields in the same counter.", "id": "LogConfigCounterOptions", "properties": { + "customFields": { + "description": "Custom fields.", + "items": { + "$ref": "LogConfigCounterOptionsCustomField" + }, + "type": "array" + }, "field": { "description": "The field value to attribute.", "type": "string" @@ -35540,6 +36788,21 @@ }, "type": "object" }, + "LogConfigCounterOptionsCustomField": { + "description": "Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.", + "id": "LogConfigCounterOptionsCustomField", + "properties": { + "name": { + "description": "Name is the field name.", + "type": "string" + }, + "value": { + "description": "Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.", + "type": "string" + } + }, + "type": "object" + }, "LogConfigDataAccessOptions": { "description": "Write a Data Access (Gin) log", "id": "LogConfigDataAccessOptions", @@ -35559,8 +36822,212 @@ }, "type": "object" }, + "MachineImage": { + "description": "Machine image resource.", + "id": "MachineImage", + "properties": { + "creationTimestamp": { + "description": "[Output Only] The creation timestamp for this machine image in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "guestFlush": { + "description": "[Input Only] Specifies to create an application consistent machine image by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS).", + "type": "boolean" + }, + "id": { + "description": "[Output Only] A unique identifier for this machine image. The server defines this identifier.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#machineImage", + "description": "[Output Only] The resource type, which is always compute#machineImage for machine image.", + "type": "string" + }, + "machineImageEncryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "Encrypts the machine image using a customer-supplied encryption key.\n\nAfter you encrypt a machine image using a customer-supplied key, you must provide the same key if you use the machine image later. For example, you must provide the encryption key when you create an instance from the encrypted machine image in a future request.\n\nCustomer-supplied encryption keys do not protect access to metadata of the machine image.\n\nIf you do not provide an encryption key when creating the machine image, then the machine image will be encrypted using an automatically generated key and you do not need to provide a key to use the machine image later." + }, + "name": { + "annotations": { + "required": [ + "compute.machineImages.insert" + ] + }, + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] The URL for this machine image. The server defines this URL.", + "type": "string" + }, + "sourceDiskEncryptionKeys": { + "description": "[Input Only] The customer-supplied encryption key of the disks attached to the source instance. Required if the source disk is protected by a customer-supplied encryption key.", + "items": { + "$ref": "SourceDiskEncryptionKey" + }, + "type": "array" + }, + "sourceInstance": { + "description": "The source instance used to create the machine image. You can provide this as a partial or full URL to the resource. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n- projects/project/zones/zone/instances/instance", + "type": "string" + }, + "sourceInstanceProperties": { + "$ref": "SourceInstanceProperties", + "description": "[Output Only] Properties of source instance." + }, + "status": { + "description": "[Output Only] The status of the machine image. One of the following values: INVALID, CREATING, READY, DELETING, and UPLOADING.", + "enum": [ + "CREATING", + "DELETING", + "INVALID", + "READY", + "UPLOADING" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "storageLocations": { + "description": "GCS bucket storage location of the machine image (regional or multi-regional).", + "items": { + "type": "string" + }, + "type": "array" + }, + "totalStorageBytes": { + "description": "[Output Only] Total size of the storage used by the machine image.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "MachineImageList": { + "description": "A list of machine images.", + "id": "MachineImageList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of MachineImage resources.", + "items": { + "$ref": "MachineImage" + }, + "type": "array" + }, + "kind": { + "default": "compute#machineImageList", + "description": "[Output Only] The resource type, which is always compute#machineImagesListResponse for machine image lists.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "MachineType": { - "description": "A Machine Type resource. (== resource_for v1.machineTypes ==) (== resource_for beta.machineTypes ==)", + "description": "Represents a Machine Type resource.\n\nYou can use specific machine types for your VM instances based on performance and pricing requirements. For more information, read Machine Types. (== resource_for v1.machineTypes ==) (== resource_for beta.machineTypes ==)", "id": "MachineType", "properties": { "creationTimestamp": { @@ -35982,6 +37449,13 @@ "description": "[Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.", "type": "string" }, + "instanceHealth": { + "description": "[Output Only] Health state of the instance per health-check.", + "items": { + "$ref": "ManagedInstanceInstanceHealth" + }, + "type": "array" + }, "instanceStatus": { "description": "[Output Only] The status of the instance. This field is empty when the instance does not exist.", "enum": [ @@ -36019,6 +37493,34 @@ }, "type": "object" }, + "ManagedInstanceInstanceHealth": { + "id": "ManagedInstanceInstanceHealth", + "properties": { + "detailedHealthState": { + "description": "[Output Only] The current detailed instance health state.", + "enum": [ + "DRAINING", + "HEALTHY", + "TIMEOUT", + "UNHEALTHY", + "UNKNOWN" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "healthCheck": { + "description": "[Output Only] The URL for the health check that verifies whether the instance is healthy.", + "type": "string" + } + }, + "type": "object" + }, "ManagedInstanceLastAttempt": { "id": "ManagedInstanceLastAttempt", "properties": { @@ -36173,7 +37675,7 @@ "type": "object" }, "Network": { - "description": "Represents a Network resource. Read Virtual Private Cloud (VPC) Network Overview for more information. (== resource_for v1.networks ==) (== resource_for beta.networks ==)", + "description": "Represents a VPC Network resource.\n\nNetworks connect resources to each other and to the internet. For more information, read Virtual Private Cloud (VPC) Network. (== resource_for v1.networks ==) (== resource_for beta.networks ==)", "id": "Network", "properties": { "IPv4Range": { @@ -36190,11 +37692,11 @@ "type": "string" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "gatewayIPv4": { - "description": "[Output Only] The gateway address for default routing out of the network. This value is read only and is selected by GCP.", + "description": "[Output Only] The gateway address for default routing out of the network, selected by GCP.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}", "type": "string" }, @@ -36214,7 +37716,7 @@ "compute.networks.insert" ] }, - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -36252,7 +37754,7 @@ "type": "string" }, "ipAddress": { - "description": "Optional IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used.", + "description": "Optional IPv4 address of network endpoint. The IP address must belong to a VM in Compute Engine (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used.", "type": "string" }, "port": { @@ -36264,7 +37766,7 @@ "type": "object" }, "NetworkEndpointGroup": { - "description": "Represents a collection of network endpoints.", + "description": "Represents a collection of network endpoints.\n\nFor more information read Setting up network endpoint groups in load balancing. (== resource_for v1.networkEndpointGroups ==) (== resource_for beta.networkEndpointGroups ==)", "id": "NetworkEndpointGroup", "properties": { "creationTimestamp": { @@ -36853,7 +38355,7 @@ "type": "array" }, "aliasIpRanges": { - "description": "An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.", + "description": "An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.", "items": { "$ref": "AliasIpRange" }, @@ -36864,25 +38366,29 @@ "format": "byte", "type": "string" }, + "ipv6Address": { + "description": "[Output Only] An IPv6 internal network address for this network interface.", + "type": "string" + }, "kind": { "default": "compute#networkInterface", "description": "[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.", "type": "string" }, "name": { - "description": "[Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.", + "description": "[Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.", "type": "string" }, "network": { - "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nThis field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default", + "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default", "type": "string" }, "networkIP": { - "description": "An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.", + "description": "An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.", "type": "string" }, "subnetwork": { - "description": "The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n- regions/region/subnetworks/subnetwork", + "description": "The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n- regions/region/subnetworks/subnetwork", "type": "string" } }, @@ -37005,11 +38511,11 @@ "id": "NetworkPeering", "properties": { "autoCreateRoutes": { - "description": "This field will be deprecated soon. Prefer using exchange_subnet_routes instead. Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.", + "description": "This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", "type": "boolean" }, "exchangeSubnetRoutes": { - "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the peering state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.", + "description": "Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", "type": "boolean" }, "exportCustomRoutes": { @@ -37021,7 +38527,7 @@ "type": "boolean" }, "name": { - "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "type": "string" }, "network": { @@ -37029,7 +38535,7 @@ "type": "string" }, "state": { - "description": "[Output Only] State for the peering.", + "description": "[Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network.", "enum": [ "ACTIVE", "INACTIVE" @@ -37052,7 +38558,7 @@ "id": "NetworkRoutingConfig", "properties": { "routingMode": { - "description": "The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnets of this network, across regions.", + "description": "The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.", "enum": [ "GLOBAL", "REGIONAL" @@ -37070,7 +38576,7 @@ "id": "NetworksAddPeeringRequest", "properties": { "autoCreateRoutes": { - "description": "This field will be deprecated soon. Prefer using exchange_subnet_routes in network_peering instead. Whether Google Compute Engine manages the routes automatically.", + "description": "This field will be deprecated soon. Use exchange_subnet_routes in network_peering instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", "type": "boolean" }, "name": { @@ -37084,7 +38590,7 @@ }, "networkPeering": { "$ref": "NetworkPeering", - "description": "Network peering parameters. In order to specify route policies for peering using import/export custom routes, you will have to fill all peering related parameters (name, peer network, exchange_subnet_routes) in network_peeringfield. Corresponding fields in NetworksAddPeeringRequest will be deprecated soon." + "description": "Network peering parameters. In order to specify route policies for peering using import and export custom routes, you must specify all peering related parameters (name, peer network, exchange_subnet_routes) in the network_peering field. The corresponding fields in NetworksAddPeeringRequest will be deprecated soon." }, "peerNetwork": { "description": "URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.", @@ -37113,7 +38619,7 @@ "type": "object" }, "NodeGroup": { - "description": "A NodeGroup resource. To create a node group, you must first create a node templates. To learn more about node groups and sole-tenant nodes, read the Sole-tenant nodes documentation. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==)", + "description": "Represent a sole-tenant Node Group resource.\n\nA sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==) NextID: 16", "id": "NodeGroup", "properties": { "creationTimestamp": { @@ -37454,6 +38960,7 @@ "id": "NodeGroupsDeleteNodesRequest", "properties": { "nodes": { + "description": "Names of the nodes to delete.", "items": { "type": "string" }, @@ -37678,7 +39185,7 @@ "type": "object" }, "NodeTemplate": { - "description": "A Node Template resource. To learn more about node templates and sole-tenant nodes, read the Sole-tenant nodes documentation. (== resource_for beta.nodeTemplates ==) (== resource_for v1.nodeTemplates ==)", + "description": "Represent a sole-tenant Node Template resource.\n\nYou can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. (== resource_for beta.nodeTemplates ==) (== resource_for v1.nodeTemplates ==) (== NextID: 16 ==)", "id": "NodeTemplate", "properties": { "creationTimestamp": { @@ -37728,7 +39235,7 @@ }, "serverBinding": { "$ref": "ServerBinding", - "description": "Binding properties for the physical server." + "description": "Sets the binding properties for the physical server. Valid values include: \n- [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server \n- RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible \n\nSee Sole-tenant node options for more information." }, "status": { "description": "[Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.", @@ -38087,7 +39594,7 @@ "type": "object" }, "NodeType": { - "description": "A Node Type resource.", + "description": "Represent a sole-tenant Node Type resource.\n\nEach node within a node group must have a node type. A node type specifies the total amount of cores and memory for that node. Currently, the only available node type is n1-node-96-624 node type that has 96 vCPUs and 624 GB of memory, available in multiple zones. For more information read Node types. (== resource_for beta.nodeTypes ==) (== resource_for v1.nodeTypes ==)", "id": "NodeType", "properties": { "cpuPlatform": { @@ -38466,7 +39973,7 @@ "type": "object" }, "Operation": { - "description": "An Operation resource, used to manage asynchronous API requests. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)", + "description": "Represents an Operation resource.\n\nYou can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.\n\nOperations can be global, regional or zonal. \n- For global operations, use the globalOperations resource. \n- For regional operations, use the regionOperations resource. \n- For zonal operations, use the zonalOperations resource. \n\nFor more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)", "id": "Operation", "properties": { "clientOperationId": { @@ -38522,7 +40029,7 @@ "type": "integer" }, "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "description": "[Output Only] The unique identifier for the operation. This identifier is defined by the server.", "format": "uint64", "type": "string" }, @@ -38536,7 +40043,7 @@ "type": "string" }, "name": { - "description": "[Output Only] Name of the resource.", + "description": "[Output Only] Name of the operation.", "type": "string" }, "operationType": { @@ -38549,7 +40056,7 @@ "type": "integer" }, "region": { - "description": "[Output Only] The URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "description": "[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.", "type": "string" }, "selfLink": { @@ -38676,7 +40183,7 @@ "type": "array" }, "zone": { - "description": "[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "description": "[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.", "type": "string" } }, @@ -39001,12 +40508,12 @@ "type": "object" }, "OutlierDetection": { - "description": "Settings controlling eviction of unhealthy hosts from the load balancing pool.", + "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service.", "id": "OutlierDetection", "properties": { "baseEjectionTime": { "$ref": "Duration", - "description": "The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s." + "description": "The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s." }, "consecutiveErrors": { "description": "Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.", @@ -39014,17 +40521,17 @@ "type": "integer" }, "consecutiveGatewayFailure": { - "description": "The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5.", + "description": "The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.", "format": "int32", "type": "integer" }, "enforcingConsecutiveErrors": { - "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.", + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.", "format": "int32", "type": "integer" }, "enforcingConsecutiveGatewayFailure": { - "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.", + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.", "format": "int32", "type": "integer" }, @@ -39035,10 +40542,10 @@ }, "interval": { "$ref": "Duration", - "description": "Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds." + "description": "Time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service. Defaults to 1 second." }, "maxEjectionPercent": { - "description": "Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%.", + "description": "Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.", "format": "int32", "type": "integer" }, @@ -39060,6 +40567,568 @@ }, "type": "object" }, + "PacketIntervals": { + "description": "Next free: 7", + "id": "PacketIntervals", + "properties": { + "avgMs": { + "description": "Average observed inter-packet interval in milliseconds.", + "format": "int64", + "type": "string" + }, + "duration": { + "description": "From how long ago in the past these intervals were observed.", + "enum": [ + "DURATION_UNSPECIFIED", + "HOUR", + "MAX", + "MINUTE" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + }, + "maxMs": { + "description": "Maximum observed inter-packet interval in milliseconds.", + "format": "int64", + "type": "string" + }, + "minMs": { + "description": "Minimum observed inter-packet interval in milliseconds.", + "format": "int64", + "type": "string" + }, + "numIntervals": { + "description": "Number of inter-packet intervals from which these statistics were derived.", + "format": "int64", + "type": "string" + }, + "type": { + "description": "The type of packets for which inter-packet intervals were computed.", + "enum": [ + "LOOPBACK", + "RECEIVE", + "TRANSMIT", + "TYPE_UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroring": { + "description": "Represents a PacketMirroring resource.", + "id": "PacketMirroring", + "properties": { + "collectorIlb": { + "$ref": "PacketMirroringForwardingRuleInfo", + "description": "The Forwarding Rule resource of type loadBalancingScheme=INTERNAL that will be used as collector for mirrored traffic. The specified forwarding rule must have isMirroringCollector set to true." + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "enable": { + "description": "Indicates whether or not this packet mirroring takes effect. If set to FALSE, this packet mirroring policy will not be enforced on the network.\n\nThe default is TRUE.", + "enum": [ + "FALSE", + "TRUE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "filter": { + "$ref": "PacketMirroringFilter", + "description": "Filter for mirrored traffic. If unspecified, all traffic is mirrored." + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#packetMirroring", + "description": "[Output Only] Type of the resource. Always compute#packetMirroring for packet mirrorings.", + "type": "string" + }, + "mirroredResources": { + "$ref": "PacketMirroringMirroredResourceInfo", + "description": "PacketMirroring mirroredResourceInfos. MirroredResourceInfo specifies a set of mirrored VM instances, subnetworks and/or tags for which traffic from/to all VM instances will be mirrored." + }, + "name": { + "annotations": { + "required": [ + "compute.packetMirrorings.insert" + ] + }, + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "network": { + "$ref": "PacketMirroringNetworkInfo", + "annotations": { + "required": [ + "compute.packetMirrorings.insert" + ] + }, + "description": "Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network." + }, + "priority": { + "description": "The priority of applying this configuration. Priority is used to break ties in cases where there is more than one matching rule. In the case of two rules that apply for a given Instance, the one with the lowest-numbered priority value wins.\n\nDefault value is 1000. Valid range is 0 through 65535.", + "format": "uint32", + "type": "integer" + }, + "region": { + "description": "[Output Only] URI of the region where the packetMirroring resides.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringAggregatedList": { + "description": "Contains a list of packetMirrorings.", + "id": "PacketMirroringAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "PacketMirroringsScopedList", + "description": "Name of the scope containing this set of packetMirrorings." + }, + "description": "A list of PacketMirroring resources.", + "type": "object" + }, + "kind": { + "default": "compute#packetMirroringAggregatedList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PacketMirroringFilter": { + "id": "PacketMirroringFilter", + "properties": { + "IPProtocols": { + "description": "Protocols that apply as filter on mirrored traffic. If no protocols are specified, all traffic that matches the specified CIDR ranges is mirrored. If neither cidrRanges nor IPProtocols is specified, all traffic is mirrored.", + "items": { + "type": "string" + }, + "type": "array" + }, + "cidrRanges": { + "description": "IP CIDR ranges that apply as filter on the source (ingress) or destination (egress) IP in the IP header. Only IPv4 is supported. If no ranges are specified, all traffic that matches the specified IPProtocols is mirrored. If neither cidrRanges nor IPProtocols is specified, all traffic is mirrored.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "PacketMirroringForwardingRuleInfo": { + "id": "PacketMirroringForwardingRuleInfo", + "properties": { + "canonicalUrl": { + "description": "[Output Only] Unique identifier for the forwarding rule; defined by the server.", + "type": "string" + }, + "url": { + "description": "Resource URL to the forwarding rule representing the ILB configured as destination of the mirrored traffic.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringList": { + "description": "Contains a list of PacketMirroring resources.", + "id": "PacketMirroringList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of PacketMirroring resources.", + "items": { + "$ref": "PacketMirroring" + }, + "type": "array" + }, + "kind": { + "default": "compute#packetMirroringList", + "description": "[Output Only] Type of resource. Always compute#packetMirroring for packetMirrorings.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PacketMirroringMirroredResourceInfo": { + "id": "PacketMirroringMirroredResourceInfo", + "properties": { + "instances": { + "description": "A set of virtual machine instances that are being mirrored. They must live in zones contained in the same region as this packetMirroring.\n\nNote that this config will apply only to those network interfaces of the Instances that belong to the network specified in this packetMirroring.\n\nYou may specify a maximum of 50 Instances.", + "items": { + "$ref": "PacketMirroringMirroredResourceInfoInstanceInfo" + }, + "type": "array" + }, + "subnetworks": { + "description": "A set of subnetworks for which traffic from/to all VM instances will be mirrored. They must live in the same region as this packetMirroring.\n\nYou may specify a maximum of 5 subnetworks.", + "items": { + "$ref": "PacketMirroringMirroredResourceInfoSubnetInfo" + }, + "type": "array" + }, + "tags": { + "description": "A set of mirrored tags. Traffic from/to all VM instances that have one or more of these tags will be mirrored.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "PacketMirroringMirroredResourceInfoInstanceInfo": { + "id": "PacketMirroringMirroredResourceInfoInstanceInfo", + "properties": { + "canonicalUrl": { + "description": "[Output Only] Unique identifier for the instance; defined by the server.", + "type": "string" + }, + "url": { + "description": "Resource URL to the virtual machine instance which is being mirrored.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringMirroredResourceInfoSubnetInfo": { + "id": "PacketMirroringMirroredResourceInfoSubnetInfo", + "properties": { + "canonicalUrl": { + "description": "[Output Only] Unique identifier for the subnetwork; defined by the server.", + "type": "string" + }, + "url": { + "description": "Resource URL to the subnetwork for which traffic from/to all VM instances will be mirrored.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringNetworkInfo": { + "id": "PacketMirroringNetworkInfo", + "properties": { + "canonicalUrl": { + "description": "[Output Only] Unique identifier for the network; defined by the server.", + "type": "string" + }, + "url": { + "description": "URL of the network resource.", + "type": "string" + } + }, + "type": "object" + }, + "PacketMirroringsScopedList": { + "id": "PacketMirroringsScopedList", + "properties": { + "packetMirrorings": { + "description": "A list of packetMirrorings contained in this scope.", + "items": { + "$ref": "PacketMirroring" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of packetMirrorings when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "PathMatcher": { "description": "A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used.", "id": "PathMatcher", @@ -39089,14 +41158,14 @@ "type": "string" }, "pathRules": { - "description": "The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.\nFor example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.\nOnly one of pathRules or routeRules must be set.", + "description": "The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.\nFor example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.\nWithin a given pathMatcher, only one of pathRules or routeRules must be set.", "items": { "$ref": "PathRule" }, "type": "array" }, "routeRules": { - "description": "The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect.\nOnly one of pathRules or routeRules must be set.", + "description": "The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect.\nWithin a given pathMatcher, only one of pathRules or routeRules must be set.\nrouteRules are not supported in UrlMaps intended for External Load balancers.", "items": { "$ref": "HttpRouteRule" }, @@ -39131,8 +41200,23 @@ }, "type": "object" }, + "PerInstanceConfig": { + "id": "PerInstanceConfig", + "properties": { + "fingerprint": { + "description": "Fingerprint of this per-instance config. This field may be used in optimistic locking. It will be ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance config or the field needs to be unset.", + "format": "byte", + "type": "string" + }, + "name": { + "description": "The name of the per-instance config and the corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn't exist or is not part of the group will result in a failure.", + "type": "string" + } + }, + "type": "object" + }, "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.\n\n\n\nA `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.\n\n**JSON Example**\n\n{ \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] }\n\n**YAML Example**\n\nbindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer\n\n\n\nFor a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).", + "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.\n\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions (defined by IAM or configured by users). A `binding` can optionally specify a `condition`, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.\n\n**JSON Example**\n\n{ \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [\"user:eve@example.com\"], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ] }\n\n**YAML Example**\n\nbindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\n\nFor a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).", "id": "Policy", "properties": { "auditConfigs": { @@ -39143,14 +41227,14 @@ "type": "array" }, "bindings": { - "description": "Associates a list of `members` to a `role`. `bindings` with no members will result in an error.", + "description": "Associates a list of `members` to a `role`. Optionally may specify a `condition` that determines when binding is in effect. `bindings` with no members will result in an error.", "items": { "$ref": "Binding" }, "type": "array" }, "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten. Due to blind-set semantics of an etag-less policy, 'setIamPolicy' will not fail even if either of incoming or stored policy does not meet the version requirements.", "format": "byte", "type": "string" }, @@ -39166,7 +41250,7 @@ "type": "array" }, "version": { - "description": "Deprecated.", + "description": "Specifies the format of the policy.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.\n\nOperations affecting conditional bindings must specify version 3. This can be either setting a conditional policy, modifying a conditional binding, or removing a conditional binding from the stored conditional policy. Operations on non-conditional policies may specify any valid value or leave the field unset.\n\nIf no etag is provided in the call to `setIamPolicy`, any version compliance checks on the incoming and/or stored policy is skipped.", "format": "int32", "type": "integer" } @@ -39187,7 +41271,7 @@ "type": "object" }, "Project": { - "description": "A Project resource. For an overview of projects, see Cloud Platform Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for beta.projects ==)", + "description": "Represents a Project resource.\n\nA project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for beta.projects ==)", "id": "Project", "properties": { "commonInstanceMetadata": { @@ -39354,7 +41438,17 @@ "AUTOSCALERS", "BACKEND_BUCKETS", "BACKEND_SERVICES", + "C2_CPUS", "COMMITMENTS", + "COMMITTED_C2_CPUS", + "COMMITTED_CPUS", + "COMMITTED_LOCAL_SSD_TOTAL_GB", + "COMMITTED_N2_CPUS", + "COMMITTED_NVIDIA_K80_GPUS", + "COMMITTED_NVIDIA_P100_GPUS", + "COMMITTED_NVIDIA_P4_GPUS", + "COMMITTED_NVIDIA_T4_GPUS", + "COMMITTED_NVIDIA_V100_GPUS", "CPUS", "CPUS_ALL_REGIONS", "DISKS_TOTAL_GB", @@ -39372,11 +41466,14 @@ "INTERCONNECTS", "INTERCONNECT_ATTACHMENTS_PER_REGION", "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS", + "INTERCONNECT_TOTAL_GBPS", "INTERNAL_ADDRESSES", "IN_USE_ADDRESSES", "IN_USE_BACKUP_SCHEDULES", "IN_USE_SNAPSHOT_SCHEDULES", "LOCAL_SSD_TOTAL_GB", + "MACHINE_IMAGES", + "N2_CPUS", "NETWORKS", "NETWORK_ENDPOINT_GROUPS", "NVIDIA_K80_GPUS", @@ -39397,12 +41494,15 @@ "PREEMPTIBLE_NVIDIA_T4_GPUS", "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS", "PREEMPTIBLE_NVIDIA_V100_GPUS", + "PRIVATE_V6_ACCESS_SUBNETWORKS", "REGIONAL_AUTOSCALERS", "REGIONAL_INSTANCE_GROUP_MANAGERS", + "RESERVATIONS", "RESOURCE_POLICIES", "ROUTERS", "ROUTES", "SECURITY_POLICIES", + "SECURITY_POLICY_CEVAL_RULES", "SECURITY_POLICY_RULES", "SNAPSHOTS", "SSD_TOTAL_GB", @@ -39488,6 +41588,22 @@ "", "", "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -39529,7 +41645,7 @@ "type": "object" }, "Region": { - "description": "Region resource. (== resource_for beta.regions ==) (== resource_for v1.regions ==)", + "description": "Represents a Region resource.\n\nA region is a geographical area where a resource is located. For more information, read Regions and Zones. (== resource_for beta.regions ==) (== resource_for v1.regions ==)", "id": "Region", "properties": { "creationTimestamp": { @@ -39707,7 +41823,7 @@ "id": "RegionCommitmentsUpdateReservationsRequest", "properties": { "reservations": { - "description": "List of reservations for the capacity move of VMs with accelerators and local ssds.", + "description": "List of two reservations to transfer GPUs and local SSD between.", "items": { "$ref": "Reservation" }, @@ -40106,31 +42222,39 @@ "id": "RegionInstanceGroupManagersApplyUpdatesRequest", "properties": { "instances": { - "description": "The list of instances for which we want to apply changes on this managed instance group.", + "description": "The list of URLs of one or more instances for which you want to apply updates. Each URL can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" }, "type": "array" }, "minimalAction": { - "description": "The minimal action that should be perfomed on the instances. By default NONE.", + "description": "The minimal action that you want to perform on each instance during the update: \n- REPLACE: At minimum, delete the instance and create it again. \n- RESTART: Stop the instance and start it again. \n- REFRESH: Do not stop the instance. \n- NONE: Do not disrupt the instance at all. By default, the minimum action is NONE. If your update requires a more disruptive action than you set with this flag, the necessary action is performed to execute the update.", "enum": [ + "NONE", + "REFRESH", "REPLACE", "RESTART" ], "enumDescriptions": [ + "", + "", "", "" ], "type": "string" }, "mostDisruptiveAllowedAction": { - "description": "The most disruptive action that allowed to be performed on the instances. By default REPLACE.", + "description": "The most disruptive action that you want to perform on each instance during the update: \n- REPLACE: Delete the instance and create it again. \n- RESTART: Stop the instance and start it again. \n- REFRESH: Do not stop the instance. \n- NONE: Do not disrupt the instance at all. By default, the most disruptive allowed action is REPLACE. If your update requires a more disruptive action than you set with this flag, the update request will fail.", "enum": [ + "NONE", + "REFRESH", "REPLACE", "RESTART" ], "enumDescriptions": [ + "", + "", "", "" ], @@ -40139,6 +42263,20 @@ }, "type": "object" }, + "RegionInstanceGroupManagersCreateInstancesRequest": { + "description": "RegionInstanceGroupManagers.createInstances", + "id": "RegionInstanceGroupManagersCreateInstancesRequest", + "properties": { + "instances": { + "description": "[Required] List of specifications of per-instance configs.", + "items": { + "$ref": "PerInstanceConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "RegionInstanceGroupManagersDeleteInstancesRequest": { "id": "RegionInstanceGroupManagersDeleteInstancesRequest", "properties": { @@ -40561,11 +42699,11 @@ "type": "object" }, "Reservation": { - "description": "Reservation resource", + "description": "Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for beta.reservations ==) (== resource_for v1.reservations ==)", "id": "Reservation", "properties": { "commitment": { - "description": "[OutputOnly] Full or partial url for parent commitment for reservations which are tied to a commitment.", + "description": "[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.", "type": "string" }, "creationTimestamp": { @@ -40605,18 +42743,36 @@ "description": "Reservation for instances with specific machine shapes." }, "specificReservationRequired": { - "description": "Indicates whether the reservation can be consumed by VMs with \"any reservation\" defined. If the field is set, then only VMs that target the reservation by name using --reservation-affinity can consume this reservation.", + "description": "Indicates whether the reservation can be consumed by VMs with affinity for \"any\" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.", "type": "boolean" }, + "status": { + "description": "[Output Only] The status of the reservation.", + "enum": [ + "CREATING", + "DELETING", + "INVALID", + "READY", + "UPDATING" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, "zone": { - "description": "Zone in which the reservation resides, must be provided if reservation is created with commitment creation.", + "description": "Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.", "type": "string" } }, "type": "object" }, "ReservationAffinity": { - "description": "AllocationAffinity is the configuration of desired allocation which this instance could take capacity from.", + "description": "Specifies the reservations that this instance can consume from.", "id": "ReservationAffinity", "properties": { "consumeReservationType": { @@ -40636,11 +42792,11 @@ "type": "string" }, "key": { - "description": "Corresponds to the label key of reservation resource.", + "description": "Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.", "type": "string" }, "values": { - "description": "Corresponds to the label values of reservation resource.", + "description": "Corresponds to the label values of a reservation resource.", "items": { "type": "string" }, @@ -41523,7 +43679,7 @@ "type": "object" }, "storageLocations": { - "description": "GCS bucket storage location of the auto snapshot (regional or multi-regional).", + "description": "Cloud Storage bucket storage location of the auto snapshot (regional or multi-regional).", "items": { "type": "string" }, @@ -41585,7 +43741,7 @@ "type": "object" }, "Route": { - "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving an instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, an instance gateway, or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped. (== resource_for beta.routes ==) (== resource_for v1.routes ==)", + "description": "Represents a Route resource.\n\nA route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for beta.routes ==) (== resource_for v1.routes ==)", "id": "Route", "properties": { "creationTimestamp": { @@ -41593,7 +43749,7 @@ "type": "string" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "destRange": { @@ -41621,7 +43777,7 @@ "compute.routes.insert" ] }, - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -41635,11 +43791,11 @@ "type": "string" }, "nextHopGateway": { - "description": "The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/\u003cproject-id\u003e/global/gateways/default-internet-gateway", + "description": "The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway", "type": "string" }, "nextHopIlb": { - "description": "The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule \n- regions/region/forwardingRules/forwardingRule Note that this can only be used when the destination_range is a public (non-RFC 1918) IP CIDR range.", + "description": "The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule \n- regions/region/forwardingRules/forwardingRule", "type": "string" }, "nextHopInstance": { @@ -41672,7 +43828,7 @@ "compute.routes.insert" ] }, - "description": "The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.", + "description": "The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive.", "format": "uint32", "type": "integer" }, @@ -41892,7 +44048,7 @@ "type": "object" }, "Router": { - "description": "Router resource.", + "description": "Represents a Cloud Router resource.\n\nFor more information about Cloud Router, read the the Cloud Router overview.", "id": "Router", "properties": { "bgp": { @@ -42135,6 +44291,11 @@ "description": "Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN.", "format": "uint32", "type": "integer" + }, + "keepaliveInterval": { + "description": "The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer?s hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 1 and 120. The default is 20.", + "format": "uint32", + "type": "integer" } }, "type": "object" @@ -42179,6 +44340,22 @@ "format": "uint32", "type": "integer" }, + "bfd": { + "$ref": "RouterBgpPeerBfd", + "description": "BFD configuration for the BGP peering." + }, + "enable": { + "description": "The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.", + "enum": [ + "FALSE", + "TRUE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "interfaceName": { "description": "Name of the interface the BGP peer is associated with.", "type": "string" @@ -42200,11 +44377,21 @@ "type": "string" }, "name": { - "description": "Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.", + "annotations": { + "required": [ + "compute.routers.insert" + ] + }, + "description": "Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, "peerAsn": { + "annotations": { + "required": [ + "compute.routers.insert" + ] + }, "description": "Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.", "format": "uint32", "type": "integer" @@ -42216,6 +44403,41 @@ }, "type": "object" }, + "RouterBgpPeerBfd": { + "id": "RouterBgpPeerBfd", + "properties": { + "minReceiveInterval": { + "description": "The minimum interval, in milliseconds, between BFD control packets received from the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the transmit interval of the other router. If set, this value must be between 100 and 30000. The default is 300.", + "format": "uint32", + "type": "integer" + }, + "minTransmitInterval": { + "description": "The minimum interval, in milliseconds, between BFD control packets transmitted to the peer router. The actual value is negotiated between the two routers and is equal to the greater of this value and the corresponding receive interval of the other router. If set, this value must be between 100 and 30000. The default is 300.", + "format": "uint32", + "type": "integer" + }, + "multiplier": { + "description": "The number of consecutive BFD packets that must be missed before BFD declares that a peer is unavailable. If set, the value must be a value between 2 and 16. The default is 3.", + "format": "uint32", + "type": "integer" + }, + "sessionInitializationMode": { + "description": "The BFD session initialization mode for this BGP peer. If set to ACTIVE, the Cloud Router will initiate the BFD session for this BGP peer. If set to PASSIVE, the Cloud Router will wait for the peer router to initiate the BFD session for this BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The default is PASSIVE.", + "enum": [ + "ACTIVE", + "DISABLED", + "PASSIVE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "RouterInterface": { "id": "RouterInterface", "properties": { @@ -42244,7 +44466,12 @@ "type": "string" }, "name": { - "description": "Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.", + "annotations": { + "required": [ + "compute.routers.insert" + ] + }, + "description": "Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" } @@ -42367,6 +44594,13 @@ "description": "Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.", "id": "RouterNat", "properties": { + "drainNatIps": { + "description": "A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.", + "items": { + "type": "string" + }, + "type": "array" + }, "icmpIdleTimeoutSec": { "description": "Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.", "format": "int32", @@ -42453,7 +44687,7 @@ "type": "boolean" }, "filter": { - "description": "Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.", + "description": "Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values: \n- ERRORS_ONLY: Export logs only for connection failures. \n- TRANSLATIONS_ONLY: Export logs only for successful connections. \n- ALL: Export logs for all connections, successful and unsuccessful.", "enum": [ "ALL", "ERRORS_ONLY", @@ -42550,6 +44784,9 @@ }, "type": "array" }, + "bfdStatus": { + "$ref": "BfdStatus" + }, "ipAddress": { "description": "IP address of the local BGP interface.", "type": "string" @@ -42611,6 +44848,20 @@ }, "type": "array" }, + "drainAutoAllocatedNatIps": { + "description": "A list of IPs auto-allocated for NAT that are in drain mode. Example: [\"1.1.1.1\", \"179.12.26.133\"].", + "items": { + "type": "string" + }, + "type": "array" + }, + "drainUserAllocatedNatIps": { + "description": "A list of IPs user-allocated for NAT that are in drain mode. Example: [\"1.1.1.1\", \"179.12.26.133\"].", + "items": { + "type": "string" + }, + "type": "array" + }, "minExtraNatIpsNeeded": { "description": "The number of extra IPs to allocate. This will be greater than 0 only if user-specified IPs are NOT enough to allow all configured VMs to use NAT. This value is meaningful only when auto-allocation of NAT IPs is *not* used.", "format": "int32", @@ -42875,8 +45126,117 @@ }, "type": "object" }, + "SavedAttachedDisk": { + "description": "An instance-attached disk resource.", + "id": "SavedAttachedDisk", + "properties": { + "autoDelete": { + "description": "Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).", + "type": "boolean" + }, + "boot": { + "description": "Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.", + "type": "boolean" + }, + "deviceName": { + "description": "Specifies the name of the disk attached to the source instance.", + "type": "string" + }, + "diskEncryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "The encryption key for the disk." + }, + "diskSizeGb": { + "description": "The size of the disk in base-2 GB.", + "format": "int64", + "type": "string" + }, + "guestOsFeatures": { + "description": "A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.", + "items": { + "$ref": "GuestOsFeature" + }, + "type": "array" + }, + "index": { + "description": "Specifies zero-based index of the disk that is attached to the source instance.", + "format": "int32", + "type": "integer" + }, + "interface": { + "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME.", + "enum": [ + "NVME", + "SCSI" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "kind": { + "default": "compute#savedAttachedDisk", + "description": "[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.", + "type": "string" + }, + "licenses": { + "description": "[Output Only] Any valid publicly visible licenses.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mode": { + "description": "The mode in which this disk is attached to the source instance, either READ_WRITE or READ_ONLY.", + "enum": [ + "READ_ONLY", + "READ_WRITE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "source": { + "description": "Specifies a URL of the disk attached to the source instance.", + "type": "string" + }, + "storageBytes": { + "description": "[Output Only] A size of the storage used by the disk's snapshot by this machine image.", + "format": "int64", + "type": "string" + }, + "storageBytesStatus": { + "description": "[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.", + "enum": [ + "UPDATING", + "UP_TO_DATE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "type": { + "description": "Specifies the type of the attached disk, either SCRATCH or PERSISTENT.", + "enum": [ + "PERSISTENT", + "SCRATCH" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "Scheduling": { - "description": "Sets the scheduling options for an Instance.", + "description": "Sets the scheduling options for an Instance. NextID: 9", "id": "Scheduling", "properties": { "automaticRestart": { @@ -42884,7 +45244,7 @@ "type": "boolean" }, "nodeAffinities": { - "description": "A set of node affinity and anti-affinity.", + "description": "A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information.", "items": { "$ref": "SchedulingNodeAffinity" }, @@ -42918,7 +45278,7 @@ "type": "string" }, "operator": { - "description": "Defines the operation of node selection.", + "description": "Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.", "enum": [ "IN", "NOT_IN", @@ -42960,7 +45320,7 @@ "type": "object" }, "SecurityPolicy": { - "description": "A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==)", + "description": "Represents a Cloud Armor Security Policy resource.\n\nOnly external backend services that use load balancers can reference a Security Policy. For more information, read Cloud Armor Security Policy Concepts. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==)", "id": "SecurityPolicy", "properties": { "creationTimestamp": { @@ -43296,7 +45656,7 @@ "properties": { "encryptionKey": { "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Endorsement Key (EK) issued to the Shielded Instance's vTPM." + "description": "An Endorsement Key (EK) made by the RSA 2048 algorithm issued to the Shielded Instance's vTPM." }, "kind": { "default": "compute#shieldedInstanceIdentity", @@ -43305,7 +45665,7 @@ }, "signingKey": { "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Attestation Key (AK) issued to the Shielded Instance's vTPM." + "description": "An Attestation Key (AK) made by the RSA 2048 algorithm issued to the Shielded Instance's vTPM." } }, "type": "object" @@ -43418,11 +45778,11 @@ "type": "object" }, "Snapshot": { - "description": "A persistent disk snapshot resource. (== resource_for beta.snapshots ==) (== resource_for v1.snapshots ==)", + "description": "Represents a Persistent Disk Snapshot resource.\n\nYou can use snapshots to back up data on a regular interval. For more information, read Creating persistent disk snapshots. (== resource_for beta.snapshots ==) (== resource_for v1.snapshots ==)", "id": "Snapshot", "properties": { "autoCreated": { - "description": "[Output Only] Set to true if snapshots are automatically by applying resource policy on the target disk.", + "description": "[Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk.", "type": "boolean" }, "creationTimestamp": { @@ -43434,7 +45794,7 @@ "type": "string" }, "diskSizeGb": { - "description": "[Output Only] Size of the snapshot, specified in GB.", + "description": "[Output Only] Size of the source disk, specified in GB.", "format": "int64", "type": "string" }, @@ -43536,7 +45896,7 @@ "type": "string" }, "storageLocations": { - "description": "GCS bucket storage location of the snapshot (regional or multi-regional).", + "description": "Cloud Storage bucket storage location of the snapshot (regional or multi-regional).", "items": { "type": "string" }, @@ -43657,6 +46017,20 @@ }, "type": "object" }, + "SourceDiskEncryptionKey": { + "id": "SourceDiskEncryptionKey", + "properties": { + "diskEncryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key." + }, + "sourceDisk": { + "description": "URL of the disk attached to the source instance. This can be a full or valid partial URL. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n- projects/project/zones/zone/disks/disk \n- zones/zone/disks/disk", + "type": "string" + } + }, + "type": "object" + }, "SourceInstanceParams": { "description": "A specification of the parameters to use when creating the instance template from a source instance.", "id": "SourceInstanceParams", @@ -43671,8 +46045,82 @@ }, "type": "object" }, + "SourceInstanceProperties": { + "description": "", + "id": "SourceInstanceProperties", + "properties": { + "canIpForward": { + "description": "Enables instances created based on this machine image to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.", + "type": "boolean" + }, + "deletionProtection": { + "description": "Whether the instance created from this machine image should be protected against deletion.", + "type": "boolean" + }, + "description": { + "description": "An optional text description for the instances that are created from this machine image.", + "type": "string" + }, + "disks": { + "description": "An array of disks that are associated with the instances that are created from this machine image.", + "items": { + "$ref": "SavedAttachedDisk" + }, + "type": "array" + }, + "guestAccelerators": { + "description": "A list of guest accelerator cards' type and count to use for instances created from this machine image.", + "items": { + "$ref": "AcceleratorConfig" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to instances that are created from this machine image.", + "type": "object" + }, + "machineType": { + "description": "The machine type to use for instances that are created from this machine image.", + "type": "string" + }, + "metadata": { + "$ref": "Metadata", + "description": "The metadata key/value pairs to assign to instances that are created from this machine image. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information." + }, + "minCpuPlatform": { + "description": "Minimum cpu/platform to be used by instances created from this machine image. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: \"Intel Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\". For more information, read Specifying a Minimum CPU Platform.", + "type": "string" + }, + "networkInterfaces": { + "description": "An array of network access configurations for this interface.", + "items": { + "$ref": "NetworkInterface" + }, + "type": "array" + }, + "scheduling": { + "$ref": "Scheduling", + "description": "Specifies the scheduling options for the instances that are created from this machine image." + }, + "serviceAccounts": { + "description": "A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this machine image. Use metadata queries to obtain the access tokens for these instances.", + "items": { + "$ref": "ServiceAccount" + }, + "type": "array" + }, + "tags": { + "$ref": "Tags", + "description": "A list of tags to apply to the instances that are created from this machine image. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035." + } + }, + "type": "object" + }, "SslCertificate": { - "description": "An SslCertificate resource. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user. (== resource_for beta.sslCertificates ==) (== resource_for v1.sslCertificates ==)", + "description": "Represents an SSL Certificate resource.\n\nThis SSL certificate resource also contains a private key. You can use SSL keys and certificates to secure connections to a load balancer. For more information, read Creating and Using SSL Certificates. (== resource_for beta.sslCertificates ==) (== resource_for v1.sslCertificates ==)", "id": "SslCertificate", "properties": { "certificate": { @@ -44266,7 +46714,7 @@ "type": "object" }, "SslPolicy": { - "description": "A SSL policy specifies the server-side support for SSL features. This can be attached to a TargetHttpsProxy or a TargetSslProxy. This affects connections between clients and the HTTPS or SSL proxy load balancer. They do not affect the connection between the load balancers and the backends.", + "description": "Represents a Cloud Armor Security Policy resource.\n\nOnly external backend services used by HTTP or HTTPS load balancers can reference a Security Policy. For more information, read read Cloud Armor Security Policy Concepts. (== resource_for beta.sslPolicies ==) (== resource_for v1.sslPolicies ==)", "id": "SslPolicy", "properties": { "creationTimestamp": { @@ -44443,7 +46891,7 @@ "type": "object" }, "Subnetwork": { - "description": "A Subnetwork resource. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==)", + "description": "Represents a Subnetwork resource.\n\nA subnetwork (also known as a subnet) is a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. For more information, read Virtual Private Cloud (VPC) Network. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==)", "id": "Subnetwork", "properties": { "allowSubnetCidrRoutesOverlap": { @@ -44480,6 +46928,10 @@ "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field can be set only at resource creation time.", "type": "string" }, + "ipv6CidrRange": { + "description": "[Output Only] The range of internal IPv6 addresses that are owned by this subnetwork.", + "type": "string" + }, "kind": { "default": "compute#subnetwork", "description": "[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.", @@ -44502,6 +46954,29 @@ "description": "Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess.", "type": "boolean" }, + "privateIpv6GoogleAccess": { + "description": "The private IPv6 google access type for the VMs in this subnet. This is an expanded field of enablePrivateV6Access. If both fields are set, privateIpv6GoogleAccess will take priority.\n\nThis field can be both set at resource creation time and updated using patch.", + "enum": [ + "DISABLE_GOOGLE_ACCESS", + "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE", + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE", + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + }, + "privateIpv6GoogleAccessServiceAccounts": { + "description": "The service accounts can be used to selectively turn on Private IPv6 Google Access only on the VMs primary service account matching the value. This value only takes effect when PrivateIpv6GoogleAccess is ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS or ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS.", + "items": { + "type": "string" + }, + "type": "array" + }, "purpose": { "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918.", "enum": [ @@ -44816,7 +47291,7 @@ "type": "number" }, "metadata": { - "description": "Can only be specified if VPC flow logging for this subnetwork is enabled. Configures whether metadata fields should be added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA.", + "description": "Can only be specified if VPC flow logs for this subnetwork is enabled. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA.", "enum": [ "EXCLUDE_ALL_METADATA", "INCLUDE_ALL_METADATA" @@ -45121,7 +47596,7 @@ "type": "object" }, "TargetHttpProxy": { - "description": "A TargetHttpProxy resource. This resource defines an HTTP proxy. (== resource_for beta.targetHttpProxies ==) (== resource_for v1.targetHttpProxies ==)", + "description": "Represents a Target HTTP Proxy resource.\n\nA target HTTP proxy is a component of certain types of load balancers. Global forwarding rules reference a target HTTP proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies. (== resource_for beta.targetHttpProxies ==) (== resource_for v1.targetHttpProxies ==)", "id": "TargetHttpProxy", "properties": { "creationTimestamp": { @@ -45514,7 +47989,7 @@ "type": "object" }, "TargetHttpsProxy": { - "description": "A TargetHttpsProxy resource. This resource defines an HTTPS proxy. (== resource_for beta.targetHttpsProxies ==) (== resource_for v1.targetHttpsProxies ==)", + "description": "Represents a Target HTTPS Proxy resource.\n\nA target HTTPS proxy is a component of certain types of load balancers. Global forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies. (== resource_for beta.targetHttpsProxies ==) (== resource_for v1.targetHttpsProxies ==)", "id": "TargetHttpsProxy", "properties": { "creationTimestamp": { @@ -45541,7 +48016,7 @@ "type": "string" }, "quicOverride": { - "description": "Specifies the QUIC override policy for this TargetHttpsProxy resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. Specify ENABLE to always enable QUIC, Enables QUIC when set to ENABLE, and disables QUIC when set to DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE. Not specifying this field is equivalent to specifying NONE.", + "description": "Specifies the QUIC override policy for this TargetHttpsProxy resource. This setting determines whether the load balancer attempts to negotiate QUIC with clients. You can specify NONE, ENABLE, or DISABLE. \n- When quic-override is set to NONE, Google manages whether QUIC is used. \n- When quic-override is set to ENABLE, the load balancer uses QUIC when possible. \n- When quic-override is set to DISABLE, the load balancer doesn't use QUIC. \n- If the quic-override flag is not specified, NONE is implied.\n-", "enum": [ "DISABLE", "ENABLE", @@ -45570,7 +48045,7 @@ "type": "array" }, "sslPolicy": { - "description": "URL of SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured.", + "description": "URL of SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource has no SSL policy configured.", "type": "string" }, "urlMap": { @@ -45805,7 +48280,7 @@ "type": "object" }, "TargetInstance": { - "description": "A TargetInstance resource. This resource defines an endpoint instance that terminates traffic of certain protocols. (== resource_for beta.targetInstances ==) (== resource_for v1.targetInstances ==)", + "description": "Represents a Target Instance resource.\n\nYou can use a target instance to handle traffic for one or more forwarding rules, which is ideal for forwarding protocol traffic that is managed by a single source. For example, ESP, AH, TCP, or UDP. For more information, read Target instances. (== resource_for beta.targetInstances ==) (== resource_for v1.targetInstances ==)", "id": "TargetInstance", "properties": { "creationTimestamp": { @@ -46175,7 +48650,7 @@ "type": "object" }, "TargetPool": { - "description": "A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool. (== resource_for beta.targetPools ==) (== resource_for v1.targetPools ==)", + "description": "Represents a Target Pool resource.\n\nTarget pools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool. For more information, read Using target pools. (== resource_for beta.targetPools ==) (== resource_for v1.targetPools ==)", "id": "TargetPool", "properties": { "backupPool": { @@ -46695,7 +49170,7 @@ "type": "object" }, "TargetSslProxy": { - "description": "A TargetSslProxy resource. This resource defines an SSL proxy. (== resource_for beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==)", + "description": "Represents a Target SSL Proxy resource.\n\nA target SSL proxy is a component of a SSL Proxy load balancer. Global forwarding rules reference a target SSL proxy, and the target proxy then references an external backend service. For more information, read Using Target Proxies. (== resource_for beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==)", "id": "TargetSslProxy", "properties": { "creationTimestamp": { @@ -46896,7 +49371,7 @@ "type": "object" }, "TargetTcpProxy": { - "description": "A TargetTcpProxy resource. This resource defines a TCP proxy. (== resource_for beta.targetTcpProxies ==) (== resource_for v1.targetTcpProxies ==)", + "description": "Represents a Target TCP Proxy resource.\n\nA target TCP proxy is a component of a TCP Proxy load balancer. Global forwarding rules reference target TCP proxy, and the target proxy then references an external backend service. For more information, read TCP Proxy Load Balancing Concepts. (== resource_for beta.targetTcpProxies ==) (== resource_for v1.targetTcpProxies ==)", "id": "TargetTcpProxy", "properties": { "creationTimestamp": { @@ -47058,7 +49533,7 @@ "type": "object" }, "TargetVpnGateway": { - "description": "Represents a Target VPN gateway resource. (== resource_for beta.targetVpnGateways ==) (== resource_for v1.targetVpnGateways ==)", + "description": "Represents a Target VPN Gateway resource.\n\nThe target VPN gateway resource represents a Classic Cloud VPN gateway. For more information, read the the Cloud VPN Overview. (== resource_for beta.targetVpnGateways ==) (== resource_for v1.targetVpnGateways ==)", "id": "TargetVpnGateway", "properties": { "creationTimestamp": { @@ -47514,7 +49989,7 @@ "type": "object" }, "UrlMap": { - "description": "A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the \"longest-match\" of the URL's host and path.", + "description": "Represents a URL Map resource.\n\nA URL map resource is a component of certain types of load balancers. This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.\n\nTo use this resource, the backend service must have a loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED For more information, read URL Map Concepts.", "id": "UrlMap", "properties": { "creationTimestamp": { @@ -48192,6 +50667,13 @@ "description": "Contain information of Nat mapping for an interface of this endpoint.", "id": "VmEndpointNatMappingsInterfaceNatMappings", "properties": { + "drainNatIpPortRanges": { + "description": "List of all drain IP:port-range mappings assigned to this interface. These ranges are inclusive, that is, both the first and the last ports can be used for NAT. Example: [\"2.2.2.2:12345-12355\", \"1.1.1.1:2234-2234\"].", + "items": { + "type": "string" + }, + "type": "array" + }, "natIpPortRanges": { "description": "A list of all IP:port-range mappings assigned to this interface. These ranges are inclusive, that is, both the first and the last ports can be used for NAT. Example: [\"2.2.2.2:12345-12355\", \"1.1.1.1:2234-2234\"].", "items": { @@ -48199,6 +50681,11 @@ }, "type": "array" }, + "numTotalDrainNatPorts": { + "description": "Total number of drain ports across all NAT IPs allocated to this interface. It equals to the aggregated port number in the field drain_nat_ip_port_ranges.", + "format": "int32", + "type": "integer" + }, "numTotalNatPorts": { "description": "Total number of ports across all NAT IPs allocated to this interface. It equals to the aggregated port number in the field nat_ip_port_ranges.", "format": "int32", @@ -48831,7 +51318,7 @@ "type": "object" }, "VpnTunnel": { - "description": "VPN tunnel resource. (== resource_for beta.vpnTunnels ==) (== resource_for v1.vpnTunnels ==)", + "description": "Represents a Cloud VPN Tunnel resource.\n\nFor more information about VPN, read the the Cloud VPN Overview. (== resource_for beta.vpnTunnels ==) (== resource_for v1.vpnTunnels ==)", "id": "VpnTunnel", "properties": { "creationTimestamp": { @@ -48935,7 +51422,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of the VPN tunnel, which can be one of the following: \n- PROVISIONING: Resource is being allocated for the VPN tunnel. \n- WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. \n- FIRST_HANDSHAKE: Successful first handshake with the peer VPN. \n- ESTABLISHED: Secure session is successfully established with the peer VPN. \n- NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS \n- AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). \n- NEGOTIATION_FAILURE: Handshake failed. \n- DEPROVISIONING: Resources are being deallocated for the VPN tunnel. \n- FAILED: Tunnel creation has failed and the tunnel is not ready to be used.", + "description": "[Output Only] The status of the VPN tunnel, which can be one of the following: \n- PROVISIONING: Resource is being allocated for the VPN tunnel. \n- WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. \n- FIRST_HANDSHAKE: Successful first handshake with the peer VPN. \n- ESTABLISHED: Secure session is successfully established with the peer VPN. \n- NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS \n- AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). \n- NEGOTIATION_FAILURE: Handshake failed. \n- DEPROVISIONING: Resources are being deallocated for the VPN tunnel. \n- FAILED: Tunnel creation has failed and the tunnel is not ready to be used. \n- NO_INCOMING_PACKETS: No incoming packets from peer. \n- REJECTED: Tunnel configuration was rejected, can be result of being blacklisted. \n- ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. \n- STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. \n- PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. \n- TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.", "enum": [ "ALLOCATING_RESOURCES", "AUTHORIZATION_ERROR", @@ -48948,6 +51435,7 @@ "NO_INCOMING_PACKETS", "PROVISIONING", "REJECTED", + "STOPPED", "WAITING_FOR_FULL_CONFIG" ], "enumDescriptions": [ @@ -48962,6 +51450,7 @@ "", "", "", + "", "" ], "type": "string" @@ -49489,7 +51978,7 @@ "type": "object" }, "Zone": { - "description": "A Zone resource. (== resource_for beta.zones ==) (== resource_for v1.zones ==) Next ID: 17", + "description": "Represents a Zone resource.\n\nA zone is a deployment area. These deployment areas are subsets of a region. For example the zone us-east1-a is located in the us-east1 region. For more information, read Regions and Zones. (== resource_for beta.zones ==) (== resource_for v1.zones ==)", "id": "Zone", "properties": { "availableCpuPlatforms": { diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go b/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go index 1d47d2b15c1..9c23edddf9e 100644 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go @@ -53,8 +53,8 @@ import ( "strconv" "strings" - gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + gensupport "google.golang.org/api/internal/gensupport" option "google.golang.org/api/option" htransport "google.golang.org/api/transport/http" ) @@ -76,7 +76,7 @@ var _ = context.Canceled const apiId = "compute:beta" const apiName = "compute" const apiVersion = "beta" -const basePath = "https://www.googleapis.com/compute/beta/projects/" +const basePath = "https://compute.googleapis.com/compute/beta/projects/" // OAuth2 scopes used by this API. const ( @@ -161,12 +161,14 @@ func New(client *http.Client) (*Service, error) { s.Interconnects = NewInterconnectsService(s) s.LicenseCodes = NewLicenseCodesService(s) s.Licenses = NewLicensesService(s) + s.MachineImages = NewMachineImagesService(s) s.MachineTypes = NewMachineTypesService(s) s.NetworkEndpointGroups = NewNetworkEndpointGroupsService(s) s.Networks = NewNetworksService(s) s.NodeGroups = NewNodeGroupsService(s) s.NodeTemplates = NewNodeTemplatesService(s) s.NodeTypes = NewNodeTypesService(s) + s.PacketMirrorings = NewPacketMirroringsService(s) s.Projects = NewProjectsService(s) s.RegionAutoscalers = NewRegionAutoscalersService(s) s.RegionBackendServices = NewRegionBackendServicesService(s) @@ -263,6 +265,8 @@ type Service struct { Licenses *LicensesService + MachineImages *MachineImagesService + MachineTypes *MachineTypesService NetworkEndpointGroups *NetworkEndpointGroupsService @@ -275,6 +279,8 @@ type Service struct { NodeTypes *NodeTypesService + PacketMirrorings *PacketMirroringsService + Projects *ProjectsService RegionAutoscalers *RegionAutoscalersService @@ -589,6 +595,15 @@ type LicensesService struct { s *Service } +func NewMachineImagesService(s *Service) *MachineImagesService { + rs := &MachineImagesService{s: s} + return rs +} + +type MachineImagesService struct { + s *Service +} + func NewMachineTypesService(s *Service) *MachineTypesService { rs := &MachineTypesService{s: s} return rs @@ -643,6 +658,15 @@ type NodeTypesService struct { s *Service } +func NewPacketMirroringsService(s *Service) *PacketMirroringsService { + rs := &PacketMirroringsService{s: s} + return rs +} + +type PacketMirroringsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} return rs @@ -1006,7 +1030,12 @@ func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AcceleratorType: An Accelerator Type resource. (== resource_for +// AcceleratorType: Represents an Accelerator Type resource. +// +// Google Cloud Platform provides graphics processing units +// (accelerators) that you can add to VM instances to improve or +// accelerate performance when working with intensive workloads. For +// more information, read GPUs on Compute Engine. (== resource_for // beta.acceleratorTypes ==) (== resource_for v1.acceleratorTypes ==) type AcceleratorType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -1529,8 +1558,8 @@ type AccessConfig struct { Kind string `json:"kind,omitempty"` // Name: The name of this access configuration. The default and - // recommended name is External NAT but you can use any arbitrary string - // you would like. For example, My external IP or Network Access. + // recommended name is External NAT, but you can use any arbitrary + // string, such as My external IP or Network Access. Name string `json:"name,omitempty"` // NatIP: An external IP address associated with this instance. Specify @@ -1557,10 +1586,10 @@ type AccessConfig struct { NetworkTier string `json:"networkTier,omitempty"` // PublicPtrDomainName: The DNS domain name for the public PTR record. - // This field can only be set when the set_public_ptr field is enabled. + // You can set this field only if the `setPublicPtr` field is enabled. PublicPtrDomainName string `json:"publicPtrDomainName,omitempty"` - // SetPublicPtr: Specifies whether a public DNS ?PTR? record should be + // SetPublicPtr: Specifies whether a public DNS 'PTR' record should be // created to map the external IP address of the instance to a DNS // domain name. SetPublicPtr bool `json:"setPublicPtr,omitempty"` @@ -1595,9 +1624,25 @@ func (s *AccessConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Address: A reserved address resource. (== resource_for beta.addresses -// ==) (== resource_for v1.addresses ==) (== resource_for -// beta.globalAddresses ==) (== resource_for v1.globalAddresses ==) +// Address: Represents an IP Address resource. +// +// An address resource represents a regional internal IP address. +// Regional internal IP addresses are RFC 1918 addresses that come from +// either a primary or secondary IP range of a subnet in a VPC network. +// Regional external IP addresses can be assigned to GCP VM instances, +// Cloud VPN gateways, regional external forwarding rules for network +// load balancers (in either Standard or Premium Tier), and regional +// external forwarding rules for HTTP(S), SSL Proxy, and TCP Proxy load +// balancers in Standard Tier. For more information, read IP +// addresses. +// +// A globalAddresses resource represent a global external IP address. +// Global external IP addresses are IPv4 or IPv6 addresses. They can +// only be assigned to global forwarding rules for HTTP(S), SSL Proxy, +// or TCP Proxy load balancers in Premium Tier. For more information, +// read Global resources. (== resource_for beta.addresses ==) (== +// resource_for v1.addresses ==) (== resource_for beta.globalAddresses +// ==) (== resource_for v1.globalAddresses ==) type Address struct { // Address: The static IP address represented by this resource. Address string `json:"address,omitempty"` @@ -1616,14 +1661,14 @@ type Address struct { CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional description of this resource. Provide this - // property when you create the resource. + // field when you create the resource. Description string `json:"description,omitempty"` // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // IpVersion: The IP Version that will be used by this address. Valid + // IpVersion: The IP version that will be used by this address. Valid // options are IPV4 or IPV6. This can only be specified for a global // address. // @@ -1657,23 +1702,24 @@ type Address struct { // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. Name string `json:"name,omitempty"` // Network: The URL of the network in which to reserve the address. This - // field can only be used with INTERNAL type with VPC_PEERING purpose. + // field can only be used with INTERNAL type with the VPC_PEERING + // purpose. Network string `json:"network,omitempty"` // NetworkTier: This signifies the networking tier used for configuring - // this Address and can only take the following values: PREMIUM, + // this address and can only take the following values: PREMIUM or // STANDARD. Global forwarding rules can only be Premium Tier. Regional // forwarding rules can be either Premium or Standard Tier. Standard // Tier addresses applied to regional forwarding rules can be used with // any external load balancer. Regional forwarding rules in Premium Tier - // can only be used with a Network load balancer. + // can only be used with a network load balancer. // // If this field is not specified, it is assumed to be PREMIUM. // @@ -1686,19 +1732,27 @@ type Address struct { // range. PrefixLength int64 `json:"prefixLength,omitempty"` - // Purpose: The purpose of resource, only used with INTERNAL type. + // Purpose: The purpose of this resource, which can be one of the + // following values: + // - `GCE_ENDPOINT` for addresses that are used by VM instances, alias + // IP ranges, internal load balancers, and similar resources. + // - `DNS_RESOLVER` for a DNS resolver address in a subnetwork + // - `VPC_PEERING` for addresses that are reserved for VPC peer + // networks. + // - `NAT_AUTO` for addresses that are external IP addresses + // automatically reserved for Cloud NAT. // // Possible values: // "DNS_RESOLVER" // "GCE_ENDPOINT" // "NAT_AUTO" + // "SHARED_LOADBALANCER_VIP" // "VPC_PEERING" Purpose string `json:"purpose,omitempty"` - // Region: [Output Only] URL of the region where the regional address - // resides. This field is not applicable to global addresses. You must - // specify this field as part of the HTTP request URL. You cannot set - // this field in the request body. + // Region: [Output Only] The URL of the region where the regional + // address resides. This field is not applicable to global addresses. + // You must specify this field as part of the HTTP request URL. Region string `json:"region,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -1719,7 +1773,7 @@ type Address struct { // Subnetwork: The URL of the subnetwork in which to reserve the // address. If an IP address is specified, it must be within the // subnetwork's IP range. This field can only be used with INTERNAL type - // with GCE_ENDPOINT/DNS_RESOLVER purposes. + // with a GCE_ENDPOINT or DNS_RESOLVER purpose. Subnetwork string `json:"subnetwork,omitempty"` // Users: [Output Only] The URLs of the resources that are using this @@ -2199,17 +2253,17 @@ func (s *AddressesScopedListWarningData) MarshalJSON() ([]byte, error) { // AliasIpRange: An alias IP range attached to an instance's network // interface. type AliasIpRange struct { - // IpCidrRange: The IP CIDR range represented by this alias IP range. - // This IP CIDR range must belong to the specified subnetwork and cannot + // IpCidrRange: The IP alias ranges to allocate for this interface. This + // IP CIDR range must belong to the specified subnetwork and cannot // contain IP addresses reserved by system or used by other network - // interfaces. This range may be a single IP address (e.g. 10.2.3.4), a - // netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). + // interfaces. This range may be a single IP address (such as 10.2.3.4), + // a netmask (such as /24) or a CIDR-formatted string (such as + // 10.1.2.0/24). IpCidrRange string `json:"ipCidrRange,omitempty"` - // SubnetworkRangeName: Optional subnetwork secondary range name - // specifying the secondary range from which to allocate the IP CIDR - // range for this alias IP range. If left unspecified, the primary range - // of the subnetwork will be used. + // SubnetworkRangeName: The name of a subnetwork secondary IP range from + // which to allocate an IP alias range. If not specified, the primary + // range of the subnetwork is used. SubnetworkRangeName string `json:"subnetworkRangeName,omitempty"` // ForceSendFields is a list of field names (e.g. "IpCidrRange") to @@ -2318,14 +2372,13 @@ func (s *AllocationSpecificSKUAllocationReservedInstanceProperties) MarshalJSON( // AllocationSpecificSKUReservation: This reservation type allows to pre // allocate specific instance configuration. type AllocationSpecificSKUReservation struct { - // Count: Specifies number of resources that are allocated. + // Count: Specifies the number of resources that are allocated. Count int64 `json:"count,omitempty,string"` - // InUseCount: [OutputOnly] Indicates how many resource are in use. + // InUseCount: [Output Only] Indicates how many instances are in use. InUseCount int64 `json:"inUseCount,omitempty,string"` - // InstanceProperties: The instance properties for this specific sku - // reservation. + // InstanceProperties: The instance properties for the reservation. InstanceProperties *AllocationSpecificSKUAllocationReservedInstanceProperties `json:"instanceProperties,omitempty"` // ForceSendFields is a list of field names (e.g. "Count") to @@ -2421,7 +2474,8 @@ type AttachedDisk struct { // disks must always use SCSI and the request will fail if you attempt // to attach a persistent disk in any other format than SCSI. Local SSDs // can use either NVME or SCSI. For performance characteristics of SCSI - // over NVMe, see Local SSD performance. + // over NVMe, see Local SSD performance. TODO(b/131765817): Update + // documentation when NVME is supported. // // Possible values: // "NVME" @@ -2446,8 +2500,8 @@ type AttachedDisk struct { // Source: Specifies a valid partial or full URL to an existing // Persistent Disk resource. When creating a new instance, one of - // initializeParams.sourceImage or disks.source is required except for - // local SSD. + // initializeParams.sourceImage or initializeParams.sourceSnapshot or + // disks.source is required except for local SSD. // // If desired, you can also attach existing non-root persistent disks // using this property. This field is only applicable for persistent @@ -2506,7 +2560,9 @@ type AttachedDiskInitializeParams struct { // automatically generated. DiskName string `json:"diskName,omitempty"` - // DiskSizeGb: Specifies the size of the disk in base-2 GB. + // DiskSizeGb: Specifies the size of the disk in base-2 GB. If not + // specified, the disk will be the same size as the image (usually + // 10GB). If specified, the size must be equal to or larger than 10GB. DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` // DiskType: Specifies the disk type to use to create the instance. If @@ -2546,8 +2602,9 @@ type AttachedDiskInitializeParams struct { ResourcePolicies []string `json:"resourcePolicies,omitempty"` // SourceImage: The source image to create this disk. When creating a - // new instance, one of initializeParams.sourceImage or disks.source is - // required except for local SSD. + // new instance, one of initializeParams.sourceImage or + // initializeParams.sourceSnapshot or disks.source is required except + // for local SSD. // // To create a disk with one of the public operating system images, // specify the image by its family name. For example, specify @@ -2590,7 +2647,8 @@ type AttachedDiskInitializeParams struct { // SourceSnapshot: The source snapshot to create this disk. When // creating a new instance, one of initializeParams.sourceSnapshot or - // disks.source is required except for local SSD. + // initializeParams.sourceImage or disks.source is required except for + // local SSD. // // To create a disk with a snapshot that you created, specify the // snapshot name in the following @@ -2642,15 +2700,15 @@ func (s *AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) { // // { "audit_configs": [ { "service": "allServices" "audit_log_configs": // [ { "log_type": "DATA_READ", "exempted_members": [ -// "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { +// "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { // "log_type": "ADMIN_READ", } ] }, { "service": -// "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": +// "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": // "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ -// "user:bar@gmail.com" ] } ] } ] } +// "user:aliya@example.com" ] } ] } ] } // -// For fooservice, this policy enables DATA_READ, DATA_WRITE and -// ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ -// logging, and bar@gmail.com from DATA_WRITE logging. +// For sampleservice, this policy enables DATA_READ, DATA_WRITE and +// ADMIN_READ logging. It also exempts jose@example.com from DATA_READ +// logging, and aliya@example.com from DATA_WRITE logging. type AuditConfig struct { // AuditLogConfigs: The configuration for logging of each type of // permission. @@ -2691,17 +2749,19 @@ func (s *AuditConfig) MarshalJSON() ([]byte, error) { // permissions. Example: // // { "audit_log_configs": [ { "log_type": "DATA_READ", -// "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": +// "exempted_members": [ "user:jose@example.com" ] }, { "log_type": // "DATA_WRITE", } ] } // // This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting -// foo@gmail.com from DATA_READ logging. +// jose@example.com from DATA_READ logging. type AuditLogConfig struct { // ExemptedMembers: Specifies the identities that do not cause logging // for this type of permission. Follows the same format of // [Binding.members][]. ExemptedMembers []string `json:"exemptedMembers,omitempty"` + IgnoreChildExemptions bool `json:"ignoreChildExemptions,omitempty"` + // LogType: The log type that this config enables. // // Possible values: @@ -2772,13 +2832,21 @@ func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Autoscaler: Represents an Autoscaler resource. Autoscalers allow you -// to automatically scale virtual machine instances in managed instance -// groups according to an autoscaling policy that you define. For more -// information, read Autoscaling Groups of Instances. (== resource_for -// beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== -// resource_for beta.regionAutoscalers ==) (== resource_for -// v1.regionAutoscalers ==) +// Autoscaler: Represents an Autoscaler resource. +// +// +// +// Use autoscalers to automatically add or delete instances from a +// managed instance group according to your defined autoscaling policy. +// For more information, read Autoscaling Groups of Instances. +// +// For zonal managed instance groups resource, use the autoscaler +// resource. +// +// For regional managed instance groups, use the regionAutoscalers +// resource. (== resource_for beta.autoscalers ==) (== resource_for +// v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== +// resource_for v1.regionAutoscalers ==) type Autoscaler struct { // AutoscalingPolicy: The configuration parameters for the autoscaling // algorithm. You can define one or more of the policies for an @@ -2814,6 +2882,13 @@ type Autoscaler struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` + // RecommendedSize: [Output Only] Target recommended MIG size (number of + // instances) computed by autoscaler. Autoscaler calculates recommended + // MIG size even when autoscaling policy mode is different from ON. This + // field is empty when autoscaler is not connected to the existing + // managed instance group or autoscaler did not generate its prediction. + RecommendedSize int64 `json:"recommendedSize,omitempty"` + // Region: [Output Only] URL of the region where the instance group // resides (for autoscalers living in regional scope). Region string `json:"region,omitempty"` @@ -2822,6 +2897,15 @@ type Autoscaler struct { SelfLink string `json:"selfLink,omitempty"` // Status: [Output Only] The status of the autoscaler configuration. + // Current set of possible values: + // - PENDING: Autoscaler backend hasn't read new/updated configuration. + // + // - DELETING: Configuration is being deleted. + // - ACTIVE: Configuration is acknowledged to be effective. Some + // warnings might be present in the statusDetails field. + // - ERROR: Configuration has errors. Actionable for users. Details are + // present in the statusDetails field. New values might be added in the + // future. // // Possible values: // "ACTIVE" @@ -3185,7 +3269,50 @@ type AutoscalerStatusDetails struct { // Message: The status message. Message string `json:"message,omitempty"` - // Type: The type of error returned. + // Type: The type of error, warning, or notice returned. Current set of + // possible values: + // - ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance + // group are unhealthy (not in RUNNING state). + // - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service + // attached to the instance group. + // - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size + // greater than maxNumReplicas. + // - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric + // samples are not exported often enough to be a credible base for + // autoscaling. + // - CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified + // does not exist or does not have the necessary labels. + // - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to + // maxNumReplicas. This means the autoscaler cannot add or remove + // instances from the instance group. + // - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not + // receive any data from the custom metric configured for autoscaling. + // + // - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is + // configured to scale based on a load balancing signal but the instance + // group has not received any requests from the load balancer. + // - MODE_OFF (WARNING): Autoscaling is turned off. The number of + // instances in the group won't change automatically. The autoscaling + // configuration is preserved. + // - MODE_ONLY_UP (WARNING): Autoscaling is in the "Autoscale only up" + // mode. The autoscaler can add instances but not remove any. + // - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be + // autoscaled because it has more than one backend service attached to + // it. + // - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for + // the necessary resources, such as CPU or number of instances. + // - REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional + // autoscalers: there is a resource stockout in the chosen region. + // - SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does + // not exist. + // - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): + // Autoscaling does not work with an HTTP/S load balancer that has been + // configured for maxRate. + // - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a + // resource stockout in the chosen zone. For regional autoscalers: in at + // least one of the zones you're using there is a resource stockout. + // New values might be added in the future. Some of the values might not + // be available in all API versions. // // Possible values: // "ALL_INSTANCES_UNHEALTHY" @@ -3196,6 +3323,8 @@ type AutoscalerStatusDetails struct { // "MIN_EQUALS_MAX" // "MISSING_CUSTOM_METRIC_DATA_POINTS" // "MISSING_LOAD_BALANCING_DATA_POINTS" + // "MODE_OFF" + // "MODE_ONLY_UP" // "MORE_THAN_ONE_BACKEND_SERVICE" // "NOT_ENOUGH_QUOTA_AVAILABLE" // "REGION_RESOURCE_STOCKOUT" @@ -3402,6 +3531,14 @@ type AutoscalingPolicy struct { // instances allowed. MinNumReplicas int64 `json:"minNumReplicas,omitempty"` + // Mode: Defines operating mode for this policy. + // + // Possible values: + // "OFF" + // "ON" + // "ONLY_UP" + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec") // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -3650,13 +3787,40 @@ func (s *AutoscalingPolicyLoadBalancingUtilization) UnmarshalJSON(data []byte) e // Backend: Message containing information of one individual backend. type Backend struct { - // BalancingMode: Specifies the balancing mode for this backend. For - // global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. - // Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for - // TCP/SSL). + // BalancingMode: Specifies the balancing mode for the backend. // - // For Internal Load Balancing, the default and only supported mode is - // CONNECTION. + // When choosing a balancing mode, you need to consider the + // loadBalancingScheme, and protocol for the backend service, as well as + // the type of backend (instance group or NEG). + // + // + // - If the load balancing mode is CONNECTION, then the load is spread + // based on how many concurrent connections the backend can handle. + // You can use the CONNECTION balancing mode if the protocol for the + // backend service is SSL, TCP, or UDP. + // + // If the loadBalancingScheme for the backend service is EXTERNAL (SSL + // Proxy and TCP Proxy load balancers), you must also specify exactly + // one of the following parameters: maxConnections, + // maxConnectionsPerInstance, or maxConnectionsPerEndpoint. + // + // If the loadBalancingScheme for the backend service is INTERNAL + // (internal TCP/UDP load balancers), you cannot specify any additional + // parameters. + // + // - If the load balancing mode is RATE, the load is spread based on the + // rate of HTTP requests per second (RPS). + // You can use the RATE balancing mode if the protocol for the backend + // service is HTTP or HTTPS. You must specify exactly one of the + // following parameters: maxRate, maxRatePerInstance, or + // maxRatePerEndpoint. + // + // - If the load balancing mode is UTILIZATION, the load is spread based + // on the CPU utilization of instances in an instance group. + // You can use the UTILIZATION balancing mode if the loadBalancingScheme + // of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or + // INTERNAL_MANAGED and the backends are instance groups. There are no + // restrictions on the backend service protocol. // // Possible values: // "CONNECTION" @@ -3683,54 +3847,72 @@ type Backend struct { // BackendService. Failover bool `json:"failover,omitempty"` - // Group: The fully-qualified URL of an Instance Group or Network - // Endpoint Group resource. In case of instance group this defines the - // list of instances that serve traffic. Member virtual machine - // instances from each instance group must live in the same zone as the - // instance group itself. No two backends in a backend service are - // allowed to use same Instance Group resource. + // Group: The fully-qualified URL of an instance group or network + // endpoint group (NEG) resource. The type of backend that a backend + // service supports depends on the backend service's + // loadBalancingScheme. // - // For Network Endpoint Groups this defines list of endpoints. All - // endpoints of Network Endpoint Group must be hosted on instances - // located in the same zone as the Network Endpoint Group. // - // Backend service can not contain mix of Instance Group and Network - // Endpoint Group backends. + // - When the loadBalancingScheme for the backend service is EXTERNAL, + // INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either + // an instance group or a NEG. The backends on the backend service must + // be either all instance groups or all NEGs. You cannot mix instance + // group and NEG backends on the same backend service. // - // Note that you must specify an Instance Group or Network Endpoint - // Group resource using the fully-qualified URL, rather than a partial - // URL. // - // When the BackendService has load balancing scheme INTERNAL, the - // instance group must be within the same region as the BackendService. - // Network Endpoint Groups are not supported for INTERNAL load balancing - // scheme. + // - When the loadBalancingScheme for the backend service is INTERNAL, + // the backend must be an instance group in the same region as the + // backend service. NEGs are not supported. + // + // You must use the fully-qualified URL (starting with + // https://www.googleapis.com/) to specify the instance group or NEG. + // Partial URLs are not supported. Group string `json:"group,omitempty"` - // MaxConnections: The max number of simultaneous connections for the - // group. Can be used with either CONNECTION or UTILIZATION balancing - // modes. For CONNECTION mode, either maxConnections or - // maxConnectionsPerInstance must be set. + // MaxConnections: Defines a maximum target for simultaneous connections + // for the entire backend (instance group or NEG). If the backend's + // balancingMode is UTILIZATION, this is an optional parameter. If the + // backend's balancingMode is CONNECTION, and backend is attached to a + // backend service whose loadBalancingScheme is EXTERNAL, you must + // specify either this parameter, maxConnectionsPerInstance, or + // maxConnectionsPerEndpoint. // - // This cannot be used for internal load balancing. + // Not available if the backend's balancingMode is RATE. If the + // loadBalancingScheme is INTERNAL, then maxConnections is not + // supported, even though the backend requires a balancing mode of + // CONNECTION. MaxConnections int64 `json:"maxConnections,omitempty"` - // MaxConnectionsPerEndpoint: The max number of simultaneous connections - // that a single backend network endpoint can handle. This is used to - // calculate the capacity of the group. Can be used in either CONNECTION - // or UTILIZATION balancing modes. For CONNECTION mode, either - // maxConnections or maxConnectionsPerEndpoint must be set. + // MaxConnectionsPerEndpoint: Defines a maximum target for simultaneous + // connections for an endpoint of a NEG. This is multiplied by the + // number of endpoints in the NEG to implicitly calculate a maximum + // number of target maximum simultaneous connections for the NEG. If the + // backend's balancingMode is CONNECTION, and the backend is attached to + // a backend service whose loadBalancingScheme is EXTERNAL, you must + // specify either this parameter, maxConnections, or + // maxConnectionsPerInstance. // - // This cannot be used for internal load balancing. + // Not available if the backend's balancingMode is RATE. Internal + // TCP/UDP load balancing does not support setting + // maxConnectionsPerEndpoint even though its backends require a + // balancing mode of CONNECTION. MaxConnectionsPerEndpoint int64 `json:"maxConnectionsPerEndpoint,omitempty"` - // MaxConnectionsPerInstance: The max number of simultaneous connections - // that a single backend instance can handle. This is used to calculate - // the capacity of the group. Can be used in either CONNECTION or - // UTILIZATION balancing modes. For CONNECTION mode, either - // maxConnections or maxConnectionsPerInstance must be set. + // MaxConnectionsPerInstance: Defines a maximum target for simultaneous + // connections for a single VM in a backend instance group. This is + // multiplied by the number of instances in the instance group to + // implicitly calculate a target maximum number of simultaneous + // connections for the whole instance group. If the backend's + // balancingMode is UTILIZATION, this is an optional parameter. If the + // backend's balancingMode is CONNECTION, and backend is attached to a + // backend service whose loadBalancingScheme is EXTERNAL, you must + // specify either this parameter, maxConnections, or + // maxConnectionsPerEndpoint. // - // This cannot be used for internal load balancing. + // Not available if the backend's balancingMode is RATE. Internal + // TCP/UDP load balancing does not support setting + // maxConnectionsPerInstance even though its backends require a + // balancing mode of CONNECTION. MaxConnectionsPerInstance int64 `json:"maxConnectionsPerInstance,omitempty"` // MaxRate: The max requests per second (RPS) of the group. Can be used @@ -3741,27 +3923,36 @@ type Backend struct { // This cannot be used for internal load balancing. MaxRate int64 `json:"maxRate,omitempty"` - // MaxRatePerEndpoint: The max requests per second (RPS) that a single - // backend network endpoint can handle. This is used to calculate the - // capacity of the group. Can be used in either balancing mode. For RATE - // mode, either maxRate or maxRatePerEndpoint must be set. + // MaxRatePerEndpoint: Defines a maximum target for requests per second + // (RPS) for an endpoint of a NEG. This is multiplied by the number of + // endpoints in the NEG to implicitly calculate a target maximum rate + // for the NEG. // - // This cannot be used for internal load balancing. + // If the backend's balancingMode is RATE, you must specify either this + // parameter, maxRate, or maxRatePerInstance. + // + // Not available if the backend's balancingMode is CONNECTION. MaxRatePerEndpoint float64 `json:"maxRatePerEndpoint,omitempty"` - // MaxRatePerInstance: The max requests per second (RPS) that a single - // backend instance can handle. This is used to calculate the capacity - // of the group. Can be used in either balancing mode. For RATE mode, - // either maxRate or maxRatePerInstance must be set. + // MaxRatePerInstance: Defines a maximum target for requests per second + // (RPS) for a single VM in a backend instance group. This is multiplied + // by the number of instances in the instance group to implicitly + // calculate a target maximum rate for the whole instance group. // - // This cannot be used for internal load balancing. + // If the backend's balancingMode is UTILIZATION, this is an optional + // parameter. If the backend's balancingMode is RATE, you must specify + // either this parameter, maxRate, or maxRatePerEndpoint. + // + // Not available if the backend's balancingMode is CONNECTION. MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` - // MaxUtilization: Used when balancingMode is UTILIZATION. This ratio - // defines the CPU utilization target for the group. The default is 0.8. - // Valid range is [0.0, 1.0]. + // MaxUtilization: Defines the maximum average CPU utilization of a + // backend VM in an instance group. The valid range is [0.0, 1.0]. This + // is an optional parameter if the backend's balancingMode is + // UTILIZATION. // - // This cannot be used for internal load balancing. + // This parameter can be used in conjunction with maxRate, + // maxRatePerInstance, maxConnections, or maxConnectionsPerInstance. MaxUtilization float64 `json:"maxUtilization,omitempty"` // ForceSendFields is a list of field names (e.g. "BalancingMode") to @@ -3807,8 +3998,10 @@ func (s *Backend) UnmarshalJSON(data []byte) error { return nil } -// BackendBucket: A BackendBucket resource. This resource defines a -// Cloud Storage bucket. +// BackendBucket: Represents a Cloud Storage Bucket resource. +// +// This Cloud Storage bucket resource is referenced by a URL map of a +// load balancer. For more information, read Backend Buckets. type BackendBucket struct { // BucketName: Cloud Storage bucket name. BucketName string `json:"bucketName,omitempty"` @@ -4070,17 +4263,19 @@ func (s *BackendBucketListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// BackendService: A BackendService resource. This resource defines a -// group of backend virtual machines and their serving capacity. (== -// resource_for v1.backendService ==) (== resource_for +// BackendService: Represents a Backend Service resource. +// +// A backend service contains configuration values for Google Cloud +// Platform load balancing services. +// +// For more information, read Backend Services. +// +// (== resource_for v1.backendService ==) (== resource_for // beta.backendService ==) type BackendService struct { - // AffinityCookieTtlSec: Lifetime of cookies in seconds if - // session_affinity is GENERATED_COOKIE. If set to 0, the cookie is - // non-persistent and lasts only until the end of the browser session - // (or equivalent). The maximum allowed value for TTL is one day. - // - // When the load balancing scheme is INTERNAL, this field is not used. + // AffinityCookieTtlSec: If set to 0, the cookie is non-persistent and + // lasts only until the end of the browser session (or equivalent). The + // maximum allowed value is one day (86,400). AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"` // Backends: The list of backends that serve this BackendService. @@ -4090,7 +4285,8 @@ type BackendService struct { CdnPolicy *BackendServiceCdnPolicy `json:"cdnPolicy,omitempty"` // CircuitBreakers: Settings controlling the volume of connections to a - // backend service. + // backend service. If not set, this feature is considered + // disabled. // // This field is applicable to either: // - A regional backend service with the service_protocol set to HTTP, @@ -4131,11 +4327,14 @@ type BackendService struct { // property when you create the resource. Description string `json:"description,omitempty"` - // EnableCDN: If true, enable Cloud CDN for this BackendService. - // - // When the load balancing scheme is INTERNAL, this field is not used. + // EnableCDN: If true, enables Cloud CDN for the backend service. Only + // applicable if the loadBalancingScheme is EXTERNAL and the protocol is + // HTTP or HTTPS. EnableCDN bool `json:"enableCDN,omitempty"` + // FailoverPolicy: Applicable only to Failover for Internal TCP/UDP Load + // Balancing. Requires at least one backend instance group to be defined + // as a backup (failover) backend. FailoverPolicy *BackendServiceFailoverPolicy `json:"failoverPolicy,omitempty"` // Fingerprint: Fingerprint of this resource. A hash of the contents @@ -4169,10 +4368,13 @@ type BackendService struct { // for backend services. Kind string `json:"kind,omitempty"` - // LoadBalancingScheme: Indicates whether the backend service will be - // used with internal or external load balancing. A backend service - // created for one type of load balancing cannot be used with the other. - // Possible values are INTERNAL and EXTERNAL. + // LoadBalancingScheme: Specifies the load balancer type. Choose + // EXTERNAL for load balancers that receive traffic from external + // clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose + // INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose + // INTERNAL_SELF_MANAGED for Traffic Director. A backend service created + // for one type of load balancing cannot be used with another. For more + // information, refer to Choosing a load balancer. // // Possible values: // "EXTERNAL" @@ -4234,8 +4436,16 @@ type BackendService struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // OutlierDetection: Settings controlling eviction of unhealthy hosts - // from the load balancing pool. This field is applicable to either: + // Network: The URL of the network to which this backend service + // belongs. This field can only be spcified when the load balancing + // scheme is set to INTERNAL. + Network string `json:"network,omitempty"` + + // OutlierDetection: Settings controlling the eviction of unhealthy + // hosts from the load balancing pool for the backend service. If not + // set, this feature is considered disabled. + // + // This field is applicable to either: // - A regional backend service with the service_protocol set to HTTP, // HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. // @@ -4246,24 +4456,30 @@ type BackendService struct { // Port: Deprecated in favor of portName. The TCP port to connect on the // backend. The default value is 80. // - // This cannot be used for internal load balancing. + // This cannot be used if the loadBalancingScheme is INTERNAL (Internal + // TCP/UDP Load Balancing). Port int64 `json:"port,omitempty"` - // PortName: Name of backend port. The same name should appear in the - // instance groups referenced by this service. Required when the load - // balancing scheme is EXTERNAL. + // PortName: A named port on a backend instance group representing the + // port for communication to the backend VMs in that group. Required + // when the loadBalancingScheme is EXTERNAL and the backends are + // instance groups. The named port must be defined on each backend + // instance group. This parameter has no meaning if the backends are + // NEGs. // - // When the load balancing scheme is INTERNAL, this field is not used. + // + // + // Must be omitted when the loadBalancingScheme is INTERNAL (Internal + // TCP/UDP Load Blaancing). PortName string `json:"portName,omitempty"` // Protocol: The protocol this BackendService uses to communicate with // backends. // - // Possible values are HTTP, HTTPS, TCP, and SSL. The default is - // HTTP. - // - // For internal load balancing, the possible values are TCP and UDP, and - // the default is TCP. + // Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP, depending + // on the chosen load balancer or Traffic Director configuration. Refer + // to the documentation for the load balancer or for Traffic Director + // for more information. // // Possible values: // "HTTP" @@ -4288,15 +4504,19 @@ type BackendService struct { SelfLink string `json:"selfLink,omitempty"` // SessionAffinity: Type of session affinity to use. The default is - // NONE. + // NONE. Session affinity is not applicable if the --protocol is + // UDP. // - // When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, - // or GENERATED_COOKIE. + // When the loadBalancingScheme is EXTERNAL, possible values are NONE, + // CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the + // protocol is HTTP or HTTPS. // - // When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, - // CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. + // When the loadBalancingScheme is INTERNAL, possible values are NONE, + // CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. // - // When the protocol is UDP, this field is not used. + // When the loadBalancingScheme is INTERNAL_SELF_MANAGED, possible + // values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or + // HTTP_COOKIE. // // Possible values: // "CLIENT_IP" @@ -4308,8 +4528,9 @@ type BackendService struct { // "NONE" SessionAffinity string `json:"sessionAffinity,omitempty"` - // TimeoutSec: How many seconds to wait for the backend before - // considering it a failed request. Default is 30 seconds. + // TimeoutSec: The backend service timeout has a different meaning + // depending on the type of load balancer. For more information read, + // Backend service settings The default is 30 seconds. TimeoutSec int64 `json:"timeoutSec,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -4542,39 +4763,28 @@ func (s *BackendServiceCdnPolicy) MarshalJSON() ([]byte, error) { } type BackendServiceFailoverPolicy struct { - // DisableConnectionDrainOnFailover: On failover or failback, this field - // indicates whether connection drain will be honored. Setting this to - // true has the following effect: connections to the old active pool are - // not drained. Connections to the new active pool use the timeout of 10 - // min (currently fixed). Setting to false has the following effect: - // both old and new connections will have a drain timeout of 10 - // min. - // - // This can be set to true only if the protocol is TCP. + // DisableConnectionDrainOnFailover: This can be set to true only if the + // protocol is TCP. // // The default is false. DisableConnectionDrainOnFailover bool `json:"disableConnectionDrainOnFailover,omitempty"` - // DropTrafficIfUnhealthy: This option is used only when no healthy VMs - // are detected in the primary and backup instance groups. When set to - // true, traffic is dropped. When set to false, new connections are sent - // across all VMs in the primary group. + // DropTrafficIfUnhealthy: Applicable only to Failover for Internal + // TCP/UDP Load Balancing. If set to true, connections to the load + // balancer are dropped when all primary and all backup backend VMs are + // unhealthy. If set to false, connections are distributed among all + // primary VMs when all primary and all backup backend VMs are + // unhealthy. // // The default is false. DropTrafficIfUnhealthy bool `json:"dropTrafficIfUnhealthy,omitempty"` - // FailoverRatio: The value of the field must be in [0, 1]. If the ratio - // of the healthy VMs in the primary backend is at or below this number, - // traffic arriving at the load-balanced IP will be directed to the - // failover backend. - // - // In case where 'failoverRatio' is not set or all the VMs in the backup - // backend are unhealthy, the traffic will be directed back to the - // primary backend in the "force" mode, where traffic will be spread to - // the healthy VMs with the best effort, or to all VMs when no VM is - // healthy. - // - // This field is only used with l4 load balancing. + // FailoverRatio: Applicable only to Failover for Internal TCP/UDP Load + // Balancing. The value of the field must be in the range [0, 1]. If the + // value is 0, the load balancer performs a failover when the number of + // healthy primary VMs equals zero. For all other values, the load + // balancer performs a failover when the total number of healthy primary + // VMs is less than this ratio. FailoverRatio float64 `json:"failoverRatio,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -5056,6 +5266,252 @@ func (s *BackendServicesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BfdPacket struct { + // AuthenticationPresent: The Authentication Present bit of the BFD + // packet. This is specified in section 4.1 of RFC5880 + AuthenticationPresent bool `json:"authenticationPresent,omitempty"` + + // ControlPlaneIndependent: The Control Plane Independent bit of the BFD + // packet. This is specified in section 4.1 of RFC5880 + ControlPlaneIndependent bool `json:"controlPlaneIndependent,omitempty"` + + // Demand: The demand bit of the BFD packet. This is specified in + // section 4.1 of RFC5880 + Demand bool `json:"demand,omitempty"` + + // Diagnostic: The diagnostic code specifies the local system's reason + // for the last change in session state. This allows remote systems to + // determine the reason that the previous session failed, for example. + // These diagnostic codes are specified in section 4.1 of RFC5880 + // + // Possible values: + // "ADMINISTRATIVELY_DOWN" + // "CONCATENATED_PATH_DOWN" + // "CONTROL_DETECTION_TIME_EXPIRED" + // "DIAGNOSTIC_UNSPECIFIED" + // "ECHO_FUNCTION_FAILED" + // "FORWARDING_PLANE_RESET" + // "NEIGHBOR_SIGNALED_SESSION_DOWN" + // "NO_DIAGNOSTIC" + // "PATH_DOWN" + // "REVERSE_CONCATENATED_PATH_DOWN" + Diagnostic string `json:"diagnostic,omitempty"` + + // Final: The Final bit of the BFD packet. This is specified in section + // 4.1 of RFC5880 + Final bool `json:"final,omitempty"` + + // Length: The length of the BFD Control packet in bytes. This is + // specified in section 4.1 of RFC5880 + Length int64 `json:"length,omitempty"` + + // MinEchoRxIntervalMs: The Required Min Echo RX Interval value in the + // BFD packet. This is specified in section 4.1 of RFC5880 + MinEchoRxIntervalMs int64 `json:"minEchoRxIntervalMs,omitempty"` + + // MinRxIntervalMs: The Required Min RX Interval value in the BFD + // packet. This is specified in section 4.1 of RFC5880 + MinRxIntervalMs int64 `json:"minRxIntervalMs,omitempty"` + + // MinTxIntervalMs: The Desired Min TX Interval value in the BFD packet. + // This is specified in section 4.1 of RFC5880 + MinTxIntervalMs int64 `json:"minTxIntervalMs,omitempty"` + + // Multiplier: The detection time multiplier of the BFD packet. This is + // specified in section 4.1 of RFC5880 + Multiplier int64 `json:"multiplier,omitempty"` + + // Multipoint: The multipoint bit of the BFD packet. This is specified + // in section 4.1 of RFC5880 + Multipoint bool `json:"multipoint,omitempty"` + + // MyDiscriminator: The My Discriminator value in the BFD packet. This + // is specified in section 4.1 of RFC5880 + MyDiscriminator int64 `json:"myDiscriminator,omitempty"` + + // Poll: The Poll bit of the BFD packet. This is specified in section + // 4.1 of RFC5880 + Poll bool `json:"poll,omitempty"` + + // State: The current BFD session state as seen by the transmitting + // system. These states are specified in section 4.1 of RFC5880 + // + // Possible values: + // "ADMIN_DOWN" + // "DOWN" + // "INIT" + // "STATE_UNSPECIFIED" + // "UP" + State string `json:"state,omitempty"` + + // Version: The version number of the BFD protocol, as specified in + // section 4.1 of RFC5880. + Version int64 `json:"version,omitempty"` + + // YourDiscriminator: The Your Discriminator value in the BFD packet. + // This is specified in section 4.1 of RFC5880 + YourDiscriminator int64 `json:"yourDiscriminator,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AuthenticationPresent") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuthenticationPresent") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BfdPacket) MarshalJSON() ([]byte, error) { + type NoMethod BfdPacket + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BfdStatus: Next free: 15 +type BfdStatus struct { + // BfdSessionInitializationMode: The BFD session initialization mode for + // this BGP peer. If set to ACTIVE, the Cloud Router will initiate the + // BFD session for this BGP peer. If set to PASSIVE, the Cloud Router + // will wait for the peer router to initiate the BFD session for this + // BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. + // + // Possible values: + // "ACTIVE" + // "DISABLED" + // "PASSIVE" + BfdSessionInitializationMode string `json:"bfdSessionInitializationMode,omitempty"` + + // ConfigUpdateTimestampMicros: Unix timestamp of the most recent config + // update. + ConfigUpdateTimestampMicros int64 `json:"configUpdateTimestampMicros,omitempty,string"` + + // ControlPacketCounts: Control packet counts for the current BFD + // session. + ControlPacketCounts *BfdStatusPacketCounts `json:"controlPacketCounts,omitempty"` + + // ControlPacketIntervals: Inter-packet time interval statistics for + // control packets. + ControlPacketIntervals []*PacketIntervals `json:"controlPacketIntervals,omitempty"` + + // LocalDiagnostic: The diagnostic code specifies the local system's + // reason for the last change in session state. This allows remote + // systems to determine the reason that the previous session failed, for + // example. These diagnostic codes are specified in section 4.1 of + // RFC5880 + // + // Possible values: + // "ADMINISTRATIVELY_DOWN" + // "CONCATENATED_PATH_DOWN" + // "CONTROL_DETECTION_TIME_EXPIRED" + // "DIAGNOSTIC_UNSPECIFIED" + // "ECHO_FUNCTION_FAILED" + // "FORWARDING_PLANE_RESET" + // "NEIGHBOR_SIGNALED_SESSION_DOWN" + // "NO_DIAGNOSTIC" + // "PATH_DOWN" + // "REVERSE_CONCATENATED_PATH_DOWN" + LocalDiagnostic string `json:"localDiagnostic,omitempty"` + + // LocalState: The current BFD session state as seen by the transmitting + // system. These states are specified in section 4.1 of RFC5880 + // + // Possible values: + // "ADMIN_DOWN" + // "DOWN" + // "INIT" + // "STATE_UNSPECIFIED" + // "UP" + LocalState string `json:"localState,omitempty"` + + // NegotiatedLocalControlTxIntervalMs: Negotiated transmit interval for + // control packets. + NegotiatedLocalControlTxIntervalMs int64 `json:"negotiatedLocalControlTxIntervalMs,omitempty"` + + // RxPacket: The most recent Rx control packet for this BFD session. + RxPacket *BfdPacket `json:"rxPacket,omitempty"` + + // TxPacket: The most recent Tx control packet for this BFD session. + TxPacket *BfdPacket `json:"txPacket,omitempty"` + + // UptimeMs: Session uptime in milliseconds. Value will be 0 if session + // is not up. + UptimeMs int64 `json:"uptimeMs,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "BfdSessionInitializationMode") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "BfdSessionInitializationMode") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BfdStatus) MarshalJSON() ([]byte, error) { + type NoMethod BfdStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type BfdStatusPacketCounts struct { + // NumRx: Number of packets received since the beginning of the current + // BFD session. + NumRx int64 `json:"numRx,omitempty"` + + // NumRxRejected: Number of packets received that were rejected because + // of errors since the beginning of the current BFD session. + NumRxRejected int64 `json:"numRxRejected,omitempty"` + + // NumRxSuccessful: Number of packets received that were successfully + // processed since the beginning of the current BFD session. + NumRxSuccessful int64 `json:"numRxSuccessful,omitempty"` + + // NumTx: Number of packets transmitted since the beginning of the + // current BFD session. + NumTx int64 `json:"numTx,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NumRx") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NumRx") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BfdStatusPacketCounts) MarshalJSON() ([]byte, error) { + type NoMethod BfdStatusPacketCounts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members` with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. NOTE: @@ -5075,7 +5531,7 @@ type Binding struct { // account. // // * `user:{emailid}`: An email address that represents a specific - // Google account. For example, `alice@gmail.com` . + // Google account. For example, `alice@example.com` . // // // @@ -5209,25 +5665,25 @@ type CircuitBreakers struct { ConnectTimeout *Duration `json:"connectTimeout,omitempty"` // MaxConnections: The maximum number of connections to the backend - // cluster. If not specified, the default is 1024. + // service. If not specified, there is no limit. MaxConnections int64 `json:"maxConnections,omitempty"` // MaxPendingRequests: The maximum number of pending requests allowed to - // the backend cluster. If not specified, the default is 1024. + // the backend service. If not specified, there is no limit. MaxPendingRequests int64 `json:"maxPendingRequests,omitempty"` // MaxRequests: The maximum number of parallel requests that allowed to - // the backend cluster. If not specified, the default is 1024. + // the backend service. If not specified, there is no limit. MaxRequests int64 `json:"maxRequests,omitempty"` - // MaxRequestsPerConnection: Maximum requests for a single backend - // connection. This parameter is respected by both the HTTP/1.1 and - // HTTP/2 implementations. If not specified, there is no limit. Setting - // this parameter to 1 will effectively disable keep alive. + // MaxRequestsPerConnection: Maximum requests for a single connection to + // the backend service. This parameter is respected by both the HTTP/1.1 + // and HTTP/2 implementations. If not specified, there is no limit. + // Setting this parameter to 1 will effectively disable keep alive. MaxRequestsPerConnection int64 `json:"maxRequestsPerConnection,omitempty"` // MaxRetries: The maximum number of parallel retries allowed to the - // backend cluster. If not specified, the default is 3. + // backend cluster. If not specified, the default is 1. MaxRetries int64 `json:"maxRetries,omitempty"` // ForceSendFields is a list of field names (e.g. "ConnectTimeout") to @@ -5254,17 +5710,14 @@ func (s *CircuitBreakers) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Commitment: Represents a Commitment resource. Creating a Commitment -// resource means that you are purchasing a committed use contract with -// an explicit start and end time. You can create commitments based on -// vCPUs and memory usage and receive discounted rates. For full -// details, read Signing Up for Committed Use Discounts. +// Commitment: Represents a regional Commitment resource. // -// Committed use discounts are subject to Google Cloud Platform's -// Service Specific Terms. By purchasing a committed use discount, you -// agree to these terms. Committed use discounts will not renew, so you -// must purchase a new commitment to continue receiving discounts. (== -// resource_for beta.commitments ==) (== resource_for v1.commitments ==) +// Creating a commitment resource means that you are purchasing a +// committed use contract with an explicit start and end time. You can +// create commitments based on vCPUs and memory usage and receive +// discounted rates. For full details, read Signing Up for Committed Use +// Discounts. (== resource_for beta.regionCommitments ==) (== +// resource_for v1.regionCommitments ==) type Commitment struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -5309,7 +5762,7 @@ type Commitment struct { // used. Region string `json:"region,omitempty"` - // Reservations: List of reservations for this commitment. + // Reservations: List of reservations in this commitment. Reservations []*Reservation `json:"reservations,omitempty"` // Resources: A list of commitment amounts for particular resources. @@ -5338,6 +5791,20 @@ type Commitment struct { // of the status. StatusMessage string `json:"statusMessage,omitempty"` + // Type: The type of commitment, which affects the discount rate and the + // eligible resources. Type MEMORY_OPTIMIZED specifies a commitment that + // will only apply to memory optimized machines. + // + // Possible values: + // "COMPUTE_OPTIMIZED" + // "GENERAL_PURPOSE" + // "GENERAL_PURPOSE_E2" + // "GENERAL_PURPOSE_N2" + // "GENERAL_PURPOSE_N2D" + // "MEMORY_OPTIMIZED" + // "TYPE_UNSPECIFIED" + Type string `json:"type,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -5878,8 +6345,9 @@ func (s *Condition) MarshalJSON() ([]byte, error) { // ConnectionDraining: Message containing connection draining // configuration. type ConnectionDraining struct { - // DrainingTimeoutSec: Time for which instance will be drained (not - // accept new connections, but still work to finish started). + // DrainingTimeoutSec: The amount of time in seconds to allow existing + // connections to persist while on unhealthy backend VMs. Only + // applicable if the protocol is not UDP. The valid range is [0, 3600]. DrainingTimeoutSec int64 `json:"drainingTimeoutSec,omitempty"` // ForceSendFields is a list of field names (e.g. "DrainingTimeoutSec") @@ -6061,6 +6529,11 @@ type CustomerEncryptionKey struct { // Cloud KMS. KmsKeyName string `json:"kmsKeyName,omitempty"` + // KmsKeyServiceAccount: The service account being used for the + // encryption request for the given KMS key. If absent, the Compute + // Engine default service account is used. + KmsKeyServiceAccount string `json:"kmsKeyServiceAccount,omitempty"` + // RawKey: Specifies a 256-bit customer-supplied encryption key, encoded // in RFC 4648 base64 to either encrypt or decrypt this resource. RawKey string `json:"rawKey,omitempty"` @@ -6204,8 +6677,20 @@ func (s *DeprecationStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Disk: A Disk resource. (== resource_for beta.disks ==) (== -// resource_for v1.disks ==) +// Disk: Represents a Persistent Disk resource. +// +// Persistent disks are required for running your VM instances. Create +// both boot and non-boot (data) persistent disks. For more information, +// read Persistent Disks. For more storage options, read Storage +// options. +// +// The disks resource represents a zonal persistent disk. For more +// information, read Zonal persistent disks. +// +// The regionDisks resource represents a regional persistent disk. For +// more information, read Regional resources. (== resource_for +// beta.disks ==) (== resource_for v1.disks ==) (== resource_for +// v1.regionDisks ==) (== resource_for beta.regionDisks ==) type Disk struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -6231,6 +6716,10 @@ type Disk struct { // you do not need to provide a key to use the disk later. DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` + // EraseWindowsVssSignature: Specifies whether the disk restored from a + // source snapshot should erase Windows specific VSS signature. + EraseWindowsVssSignature bool `json:"eraseWindowsVssSignature,omitempty"` + // GuestOsFeatures: A list of features to enable on the guest operating // system. Applicable only for bootable images. Read Enabling guest // operating system features to see a list of available options. @@ -6389,7 +6878,10 @@ type Disk struct { // version of the snapshot that was used. SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - // Status: [Output Only] The status of disk creation. + // Status: [Output Only] The status of disk creation. CREATING: Disk is + // provisioning. RESTORING: Source data is being copied into the disk. + // FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: + // Disk is deleting. // // Possible values: // "CREATING" @@ -6866,8 +7358,19 @@ func (s *DiskMoveRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DiskType: A DiskType resource. (== resource_for beta.diskTypes ==) -// (== resource_for v1.diskTypes ==) +// DiskType: Represents a Disk Type resource. +// +// You can choose from a variety of disk types based on your needs. For +// more information, read Storage options. +// +// The diskTypes resource represents disk types for a zonal persistent +// disk. For more information, read Zonal persistent disks. +// +// The regionDiskTypes resource represents disk types for a regional +// persistent disk. For more information, read Regional persistent +// disks. (== resource_for beta.diskTypes ==) (== resource_for +// v1.diskTypes ==) (== resource_for v1.regionDiskTypes ==) (== +// resource_for beta.regionDiskTypes ==) type DiskType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -7387,6 +7890,7 @@ func (s *DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) { type DisksAddResourcePoliciesRequest struct { // ResourcePolicies: Resource policies to be added to this disk. + // Currently you can only specify one policy here. ResourcePolicies []string `json:"resourcePolicies,omitempty"` // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to @@ -7729,8 +8233,11 @@ type ExchangedPeeringRoute struct { // DestRange: The destination range of the route. DestRange string `json:"destRange,omitempty"` - // Imported: If the peering route is imported if there is no - // confliction. + // Imported: True if the peering route has been imported from a peer. + // The actual import happens if the field + // networkPeering.importCustomRoutes is true for this network, and + // networkPeering.exportCustomRoutes is true for the peer network, and + // the import does not result in a route conflict. Imported bool `json:"imported,omitempty"` // NextHopRegion: The region of peering route next hop, only applies to @@ -8267,7 +8774,10 @@ func (s *ExternalVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Firewall: Represents a Firewall resource. +// Firewall: Represents a Firewall Rule resource. +// +// Firewall rules allow or deny ingress traffic to, and egress traffic +// from your instances. For more information, read Firewall rules. type Firewall struct { // Allowed: The list of ALLOW rules specified by this firewall. Each // rule specifies a protocol and port-range tuple that describes a @@ -8284,29 +8794,30 @@ type Firewall struct { Denied []*FirewallDenied `json:"denied,omitempty"` // Description: An optional description of this resource. Provide this - // property when you create the resource. + // field when you create the resource. Description string `json:"description,omitempty"` // DestinationRanges: If destination ranges are specified, the firewall - // will apply only to traffic that has destination IP address in these + // rule applies only to traffic that has destination IP address in these // ranges. These ranges must be expressed in CIDR format. Only IPv4 is // supported. DestinationRanges []string `json:"destinationRanges,omitempty"` - // Direction: Direction of traffic to which this firewall applies; - // default is INGRESS. Note: For INGRESS traffic, it is NOT supported to - // specify destinationRanges; For EGRESS traffic, it is NOT supported to - // specify sourceRanges OR sourceTags. + // Direction: Direction of traffic to which this firewall applies, + // either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` + // traffic, you cannot specify the destinationRanges field, and for + // `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags + // fields. // // Possible values: // "EGRESS" // "INGRESS" Direction string `json:"direction,omitempty"` - // Disabled: Denotes whether the firewall rule is disabled, i.e not - // applied to the network it is associated with. When set to true, the - // firewall rule is not enforced and the network behaves as if it did - // not exist. If this is unspecified, the firewall rule will be enabled. + // Disabled: Denotes whether the firewall rule is disabled. When set to + // true, the firewall rule is not enforced and the network behaves as if + // it did not exist. If this is unspecified, the firewall rule will be + // enabled. Disabled bool `json:"disabled,omitempty"` // EnableLogging: Deprecated in favor of enable in LogConfig. This field @@ -8330,58 +8841,61 @@ type Firewall struct { // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. Name string `json:"name,omitempty"` // Network: URL of the network resource for this firewall rule. If not // specified when creating a firewall rule, the default network is // used: // global/networks/default - // If you choose to specify this property, you can specify the network - // as a full or partial URL. For example, the following are all valid - // URLs: + // If you choose to specify this field, you can specify the network as a + // full or partial URL. For example, the following are all valid URLs: + // // - // https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network // - projects/myproject/global/networks/my-network // - global/networks/default Network string `json:"network,omitempty"` - // Priority: Priority for this rule. This is an integer between 0 and - // 65535, both inclusive. When not specified, the value assumed is 1000. - // Relative priorities determine precedence of conflicting rules. Lower - // value of priority implies higher precedence (eg, a rule with priority - // 0 has higher precedence than a rule with priority 1). DENY rules take - // precedence over ALLOW rules having equal priority. + // Priority: Priority for this rule. This is an integer between `0` and + // `65535`, both inclusive. The default value is `1000`. Relative + // priorities determine which rule takes effect if multiple rules apply. + // Lower values indicate higher priority. For example, a rule with + // priority `0` has higher precedence than a rule with priority `1`. + // DENY rules take precedence over ALLOW rules if they have equal + // priority. Note that VPC networks have implied rules with a priority + // of `65535`. To avoid conflicts with the implied rules, use a priority + // number less than `65535`. Priority int64 `json:"priority,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // SourceRanges: If source ranges are specified, the firewall will apply - // only to traffic that has source IP address in these ranges. These - // ranges must be expressed in CIDR format. One or both of sourceRanges - // and sourceTags may be set. If both properties are set, the firewall - // will apply to traffic that has source IP address within sourceRanges - // OR the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. Only IPv4 is supported. + // SourceRanges: If source ranges are specified, the firewall rule + // applies only to traffic that has a source IP address in these ranges. + // These ranges must be expressed in CIDR format. One or both of + // sourceRanges and sourceTags may be set. If both fields are set, the + // rule applies to traffic that has a source IP address within + // sourceRanges OR a source IP from a resource with a matching tag + // listed in the sourceTags field. The connection does not need to match + // both fields for the rule to apply. Only IPv4 is supported. SourceRanges []string `json:"sourceRanges,omitempty"` // SourceServiceAccounts: If source service accounts are specified, the - // firewall will apply only to traffic originating from an instance with - // a service account in this list. Source service accounts cannot be - // used to control traffic to an instance's external IP address because - // service accounts are associated with an instance, not an IP address. - // sourceRanges can be set at the same time as sourceServiceAccounts. If - // both are set, the firewall will apply to traffic that has source IP - // address within sourceRanges OR the source IP belongs to an instance - // with service account listed in sourceServiceAccount. The connection - // does not need to match both properties for the firewall to apply. - // sourceServiceAccounts cannot be used at the same time as sourceTags - // or targetTags. + // firewall rules apply only to traffic originating from an instance + // with a service account in this list. Source service accounts cannot + // be used to control traffic to an instance's external IP address + // because service accounts are associated with an instance, not an IP + // address. sourceRanges can be set at the same time as + // sourceServiceAccounts. If both are set, the firewall applies to + // traffic that has a source IP address within the sourceRanges OR a + // source IP that belongs to an instance with service account listed in + // sourceServiceAccount. The connection does not need to match both + // fields for the firewall to apply. sourceServiceAccounts cannot be + // used at the same time as sourceTags or targetTags. SourceServiceAccounts []string `json:"sourceServiceAccounts,omitempty"` // SourceTags: If source tags are specified, the firewall rule applies @@ -8391,11 +8905,11 @@ type Firewall struct { // instance's external IP address, it only applies to traffic between // instances in the same virtual network. Because tags are associated // with instances, not IP addresses. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR - // the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. + // sourceTags may be set. If both fields are set, the firewall applies + // to traffic that has a source IP address within sourceRanges OR a + // source IP from a resource with a matching tag listed in the + // sourceTags field. The connection does not need to match both fields + // for the firewall to apply. SourceTags []string `json:"sourceTags,omitempty"` // TargetServiceAccounts: A list of service accounts indicating sets of @@ -8444,13 +8958,13 @@ type FirewallAllowed struct { // IPProtocol: The IP protocol to which this rule applies. The protocol // type is required when creating a firewall rule. This value can either // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. + // esp, ah, ipip, sctp) or the IP protocol number. IPProtocol string `json:"IPProtocol,omitempty"` // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. + // field is only applicable for the UDP or TCP protocol. Each entry must + // be either an integer or a range. If not specified, this rule applies + // to connections through any port. // // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. Ports []string `json:"ports,omitempty"` @@ -8482,13 +8996,13 @@ type FirewallDenied struct { // IPProtocol: The IP protocol to which this rule applies. The protocol // type is required when creating a firewall rule. This value can either // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. + // esp, ah, ipip, sctp) or the IP protocol number. IPProtocol string `json:"IPProtocol,omitempty"` // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. + // field is only applicable for the UDP or TCP protocol. Each entry must + // be either an integer or a range. If not specified, this rule applies + // to connections through any port. // // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. Ports []string `json:"ports,omitempty"` @@ -8746,59 +9260,50 @@ func (s *FixedOrPercent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ForwardingRule: A ForwardingRule resource. A ForwardingRule resource -// specifies which pool of target virtual machines to forward a packet -// to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== -// resource_for beta.forwardingRules ==) (== resource_for +// ForwardingRule: Represents a Forwarding Rule resource. +// +// A forwarding rule and its corresponding IP address represent the +// frontend configuration of a Google Cloud Platform load balancer. +// Forwarding rules can also reference target instances and Cloud VPN +// Classic gateways (targetVpnGateway). +// +// For more information, read Forwarding rule concepts and Using +// protocol forwarding. +// +// (== resource_for beta.forwardingRules ==) (== resource_for // v1.forwardingRules ==) (== resource_for beta.globalForwardingRules // ==) (== resource_for v1.globalForwardingRules ==) (== resource_for // beta.regionForwardingRules ==) (== resource_for // v1.regionForwardingRules ==) type ForwardingRule struct { - // IPAddress: The IP address that this forwarding rule is serving on - // behalf of. + // IPAddress: IP address that this forwarding rule serves. When a client + // sends traffic to this IP address, the forwarding rule directs the + // traffic to the target that you specify in the forwarding rule. // - // Addresses are restricted based on the forwarding rule's load - // balancing scheme (EXTERNAL or INTERNAL) and scope (global or - // regional). + // If you don't specify a reserved IP address, an ephemeral IP address + // is assigned. Methods for specifying an IP address: // - // When the load balancing scheme is EXTERNAL, for global forwarding - // rules, the address must be a global IP, and for regional forwarding - // rules, the address must live in the same region as the forwarding - // rule. If this field is empty, an ephemeral IPv4 address from the same - // scope (global or regional) will be assigned. A regional forwarding - // rule supports IPv4 only. A global forwarding rule supports either - // IPv4 or IPv6. + // * IPv4 dotted decimal, as in `100.1.2.3` * Full URL, as in + // https://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name * Partial URL or by name, as in: * projects/project_id/regions/region/addresses/address-name * regions/region/addresses/address-name * global/addresses/address-name * address-name // - // When the load balancing scheme is INTERNAL_SELF_MANAGED, this must be - // a URL reference to an existing Address resource ( internal regional - // static IP address), with a purpose of GCE_END_POINT and address_type - // of INTERNAL. - // - // When the load balancing scheme is INTERNAL, this can only be an RFC - // 1918 IP address belonging to the network/subnet configured for the - // forwarding rule. By default, if this field is empty, an ephemeral - // internal IP address will be automatically allocated from the IP range - // of the subnet or network configured for this forwarding rule. - // - // An address can be specified either by a literal IP address or a URL - // reference to an existing Address resource. The following examples are - // all valid: - // - 100.1.2.3 - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address - // - projects/project/regions/region/addresses/address - // - regions/region/addresses/address - // - global/addresses/address - // - address + // The loadBalancingScheme and the forwarding rule's target determine + // the type of IP address that you can use. For detailed information, + // refer to [IP address + // specifications](/load-balancing/docs/forwarding-rule-concepts#ip_addre + // ss_specifications). IPAddress string `json:"IPAddress,omitempty"` // IPProtocol: The IP protocol to which this rule applies. Valid options // are TCP, UDP, ESP, AH, SCTP or ICMP. // - // When the load balancing scheme is INTERNAL, only TCP and UDP are - // valid. When the load balancing scheme is INTERNAL_SELF_MANAGED, only - // TCPis valid. + // For Internal TCP/UDP Load Balancing, the load balancing scheme is + // INTERNAL, and one of TCP or UDP are valid. For Traffic Director, the + // load balancing scheme is INTERNAL_SELF_MANAGED, and only TCPis valid. + // For Internal HTTP(S) Load Balancing, the load balancing scheme is + // INTERNAL_MANAGED, and only TCP is valid. For HTTP(S), SSL Proxy, and + // TCP Proxy Load Balancing, the load balancing scheme is EXTERNAL and + // only TCP is valid. For Network TCP/UDP Load Balancing, the load + // balancing scheme is EXTERNAL, and one of TCP or UDP is valid. // // Possible values: // "AH" @@ -8865,6 +9370,14 @@ type ForwardingRule struct { // "UNSPECIFIED_VERSION" IpVersion string `json:"ipVersion,omitempty"` + // IsMirroringCollector: Indicates whether or not this load balancer can + // be used as a collector for packet mirroring. To prevent mirroring + // loops, instances behind this load balancer will not have their + // traffic mirrored even if a PacketMirroring rule applies to them. This + // can only be set to true for load balancers that have their + // loadBalancingScheme set to INTERNAL. + IsMirroringCollector bool `json:"isMirroringCollector,omitempty"` + // Kind: [Output Only] Type of the resource. Always // compute#forwardingRule for Forwarding Rule resources. Kind string `json:"kind,omitempty"` @@ -8886,14 +9399,21 @@ type ForwardingRule struct { // RFC1035. Label values may be empty. Labels map[string]string `json:"labels,omitempty"` - // LoadBalancingScheme: This signifies what the ForwardingRule will be - // used for and can only take the following values: INTERNAL, - // INTERNAL_SELF_MANAGED, EXTERNAL. The value of INTERNAL means that - // this will be used for Internal Network Load Balancing (TCP, UDP). The - // value of INTERNAL_SELF_MANAGED means that this will be used for - // Internal Global HTTP(S) LB. The value of EXTERNAL means that this - // will be used for External Load Balancing (HTTP(S) LB, External - // TCP/UDP LB, SSL Proxy) + // LoadBalancingScheme: Specifies the forwarding rule type. EXTERNAL is + // used for: - Classic Cloud VPN gateways - Protocol forwarding to VMs + // from an external IP address - The following load balancers: HTTP(S), + // SSL Proxy, TCP Proxy, and Network TCP/UDP. + // + // INTERNAL is used for: - Protocol forwarding to VMs from an internal + // IP address - Internal TCP/UDP load balancers + // + // INTERNAL_MANAGED is used for: - Internal HTTP(S) load + // balancers + // + // INTERNAL_SELF_MANAGED is used for: - Traffic Director + // + // For more information about forwarding rules, refer to Forwarding rule + // concepts. // // Possible values: // "EXTERNAL" @@ -8953,17 +9473,24 @@ type ForwardingRule struct { // "STANDARD" NetworkTier string `json:"networkTier,omitempty"` - // PortRange: This field is used along with the target field for - // TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, - // TargetVpnGateway, TargetPool, TargetInstance. + // PortRange: This field is deprecated. See the port + // field. + PortRange string `json:"portRange,omitempty"` + + // Ports: List of comma-separated ports. The forwarding rule forwards + // packets with matching destination ports. If the forwarding rule's + // loadBalancingScheme is EXTERNAL, and the forwarding rule references a + // target pool, specifying ports is optional. You can specify an + // unlimited number of ports, but they must be contiguous. If you omit + // ports, GCP forwards traffic on any port of the forwarding rule's + // protocol. + // + // If the forwarding rule's loadBalancingScheme is EXTERNAL, and the + // forwarding rule references a target HTTP proxy, target HTTPS proxy, + // target TCP proxy, target SSL proxy, or target VPN gateway, you must + // specify ports using the following constraints: // - // Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets - // addressed to ports in the specified range will be forwarded to - // target. Forwarding rules with the same [IPAddress, IPProtocol] pair - // must have disjoint port ranges. // - // Some types of forwarding target have constraints on the acceptable - // ports: // - TargetHttpProxy: 80, 8080 // - TargetHttpsProxy: 443 // - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, @@ -8971,17 +9498,21 @@ type ForwardingRule struct { // - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, // 995, 1688, 1883, 5222 // - TargetVpnGateway: 500, 4500 - PortRange string `json:"portRange,omitempty"` - - // Ports: This field is used along with the backend_service field for - // internal load balancing. // - // When the load balancing scheme is INTERNAL, a list of ports can be - // configured, for example, ['80'], ['8000','9000'] etc. Only packets - // addressed to these ports will be forwarded to the backends configured - // with this forwarding rule. + // If the forwarding rule's loadBalancingScheme is INTERNAL, you must + // specify ports in one of the following ways: // - // You may specify a maximum of up to 5 ports. + // * A list of up to five ports, which can be non-contiguous * Keyword + // ALL, which causes the forwarding rule to forward traffic on any port + // of the forwarding rule's protocol. + // + // The ports field is used along with the target field for + // TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, + // TargetVpnGateway, TargetPool, TargetInstance. + // + // Applicable only when IPProtocol is TCP, UDP, or SCTP. Forwarding + // rules with the same [IPAddress, IPProtocol] pair must have disjoint + // port ranges. Ports []string `json:"ports,omitempty"` // Region: [Output Only] URL of the region where the regional forwarding @@ -8994,8 +9525,8 @@ type ForwardingRule struct { SelfLink string `json:"selfLink,omitempty"` // ServiceLabel: An optional prefix to the service name for this - // Forwarding Rule. If specified, will be the first label of the fully - // qualified service name. + // Forwarding Rule. If specified, the prefix is the first label of the + // fully qualified service name. // // The label must be 1-63 characters long, and comply with RFC1035. // Specifically, the label must be 1-63 characters long and match the @@ -9731,6 +10262,7 @@ type GuestOsFeature struct { // // Possible values: // "FEATURE_TYPE_UNSPECIFIED" + // "GVNIC" // "MULTI_IP_SUBNET" // "SECURE_BOOT" // "UEFI_COMPATIBLE" @@ -10007,9 +10539,14 @@ func (s *HTTPSHealthCheck) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthCheck: An HealthCheck resource. This resource defines a -// template for how individual virtual machines should be checked for -// health, via one of the supported protocols. +// HealthCheck: Represents a Health Check resource. +// +// Health checks are used for most GCP load balancers and managed +// instance group auto-healing. For more information, read Health Check +// Concepts. +// +// To perform health checks on network load balancers, you must use +// either httpHealthChecks or httpsHealthChecks. type HealthCheck struct { // CheckIntervalSec: How often (in seconds) to send a health check. The // default value is 5 seconds. @@ -11019,9 +11556,11 @@ func (s *HttpHeaderOption) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpHealthCheck: An HttpHealthCheck resource. This resource defines a -// template for how individual instances should be checked for health, -// via HTTP. +// HttpHealthCheck: Represents a legacy HTTP Health Check +// resource. +// +// Legacy health checks are required by network load balancers. For more +// information, read Health Check Concepts. type HttpHealthCheck struct { // CheckIntervalSec: How often (in seconds) to send a health check. The // default value is 5 seconds. @@ -11066,7 +11605,7 @@ type HttpHealthCheck struct { Port int64 `json:"port,omitempty"` // RequestPath: The request path of the HTTP health check request. The - // default value is /. + // default value is /. This field does not support query parameters. RequestPath string `json:"requestPath,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -11392,10 +11931,13 @@ func (s *HttpRedirectAction) MarshalJSON() ([]byte, error) { // HttpRetryPolicy: The retry policy associates with HttpRouteRule type HttpRetryPolicy struct { // NumRetries: Specifies the allowed number retries. This number must be - // > 0. + // > 0. If not specified, defaults to 1. NumRetries int64 `json:"numRetries,omitempty"` // PerTryTimeout: Specifies a non-zero timeout per retry attempt. + // If not specified, will use the timeout set in HttpRouteAction. If + // timeout in HttpRouteAction is not set, will use the largest timeout + // among all backend services associated with the route. PerTryTimeout *Duration `json:"perTryTimeout,omitempty"` // RetryConditions: Specfies one or more conditions when this retry rule @@ -11475,10 +12017,11 @@ type HttpRouteAction struct { RetryPolicy *HttpRetryPolicy `json:"retryPolicy,omitempty"` // Timeout: Specifies the timeout for the selected route. Timeout is - // computed from the time the request is has been fully processed (i.e. + // computed from the time the request has been fully processed (i.e. // end-of-stream) up until the response has been completely processed. // Timeout includes all retries. - // If not specified, the default value is 15 seconds. + // If not specified, will use the largest timeout among all backend + // services associated with the route. Timeout *Duration `json:"timeout,omitempty"` // UrlRewrite: The spec to modify the URL of the request, prior to @@ -11524,6 +12067,11 @@ func (s *HttpRouteAction) MarshalJSON() ([]byte, error) { // request and the corresponding routing action that load balancing // proxies will perform. type HttpRouteRule struct { + // Description: The short description conveying the intent of this + // routeRule. + // The description can have a maximum length of 1024 characters. + Description string `json:"description,omitempty"` + // HeaderAction: Specifies changes to request and response headers that // need to take effect for the selected backendService. // The headerAction specified here are applied before the matching @@ -11534,6 +12082,22 @@ type HttpRouteRule struct { MatchRules []*HttpRouteRuleMatch `json:"matchRules,omitempty"` + // Priority: For routeRules within a given pathMatcher, priority + // determines the order in which load balancer will interpret + // routeRules. RouteRules are evaluated in order of priority, from the + // lowest to highest number. The priority of a rule decreases as its + // number increases (1, 2, 3, N+1). The first rule that matches the + // request is applied. + // You cannot configure two or more routeRules with the same priority. + // Priority for each rule must be set to a number between 0 and + // 2147483647 inclusive. + // Priority numbers can have gaps, which enable you to add or remove + // rules in the future without affecting the rest of the rules. For + // example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority + // numbers to which you could add rules numbered from 6 to 8, 10 to 11, + // and 13 to 15 in the future without any impact on existing rules. + Priority int64 `json:"priority,omitempty"` + // RouteAction: In response to a matching matchRule, the load balancer // performs advanced routing actions like URL rewrites, header // transformations, etc. prior to forwarding the request to the selected @@ -11559,7 +12123,7 @@ type HttpRouteRule struct { // If urlRedirect is specified, service or routeAction must not be set. UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` - // ForceSendFields is a list of field names (e.g. "HeaderAction") to + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -11567,7 +12131,7 @@ type HttpRouteRule struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HeaderAction") to include + // NullFields is a list of field names (e.g. "Description") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -11667,9 +12231,11 @@ func (s *HttpRouteRuleMatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpsHealthCheck: An HttpsHealthCheck resource. This resource defines -// a template for how individual instances should be checked for health, -// via HTTPS. +// HttpsHealthCheck: Represents a legacy HTTPS Health Check +// resource. +// +// Legacy health checks are required by network load balancers. For more +// information, read Health Check Concepts. type HttpsHealthCheck struct { // CheckIntervalSec: How often (in seconds) to send a health check. The // default value is 5 seconds. @@ -11912,7 +12478,10 @@ func (s *HttpsHealthCheckListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Image: An Image resource. (== resource_for beta.images ==) (== +// Image: Represents an Image resource. +// +// You can use images to create boot disks for your VM instances. For +// more information, read Images. (== resource_for beta.images ==) (== // resource_for v1.images ==) type Image struct { // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google @@ -12084,8 +12653,8 @@ type Image struct { // "READY" Status string `json:"status,omitempty"` - // StorageLocations: GCS bucket storage location of the image (regional - // or multi-regional). + // StorageLocations: Cloud Storage bucket storage location of the image + // (regional or multi-regional). StorageLocations []string `json:"storageLocations,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -12314,8 +12883,11 @@ func (s *ImageListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Instance: An Instance resource. (== resource_for beta.instances ==) -// (== resource_for v1.instances ==) +// Instance: Represents an Instance resource. +// +// An instance is a virtual machine that is hosted on Google Cloud +// Platform. For more information, read Virtual Machine Instances. (== +// resource_for beta.instances ==) (== resource_for v1.instances ==) type Instance struct { // CanIpForward: Allows this instance to send and receive packets with // non-matching destination or source IPs. This is required if you plan @@ -12345,10 +12917,20 @@ type Instance struct { // DisplayDevice: Enables display device for the instance. DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"` + // EraseWindowsVssSignature: Specifies whether the disks restored from + // source snapshots or source machine image should erase Windows + // specific VSS signature. + EraseWindowsVssSignature bool `json:"eraseWindowsVssSignature,omitempty"` + // GuestAccelerators: A list of the type and count of accelerator cards // attached to the instance. GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` + // Hostname: Specifies the hostname of the instance. The specified + // hostname must be RFC1035 compliant. If hostname is not specified, the + // default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when + // using the global DNS, and + // [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. Hostname string `json:"hostname,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -12423,8 +13005,8 @@ type Instance struct { // Multiple interfaces are supported per instance. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - // ReservationAffinity: The configuration of desired reservations from - // which this Instance can consume capacity from. + // ReservationAffinity: Specifies the reservations that this instance + // can consume from. ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` // Scheduling: Sets the scheduling options for this instance. @@ -12450,6 +13032,13 @@ type Instance struct { ShieldedVmIntegrityPolicy *ShieldedVmIntegrityPolicy `json:"shieldedVmIntegrityPolicy,omitempty"` + // SourceMachineImage: Source machine image + SourceMachineImage string `json:"sourceMachineImage,omitempty"` + + // SourceMachineImageEncryptionKey: Source GMI encryption key when + // creating an instance from GMI. + SourceMachineImageEncryptionKey *CustomerEncryptionKey `json:"sourceMachineImageEncryptionKey,omitempty"` + // StartRestricted: [Output Only] Whether a VM has been restricted for // start because Compute Engine has detected suspicious activity. StartRestricted bool `json:"startRestricted,omitempty"` @@ -12518,7 +13107,7 @@ type InstanceAggregatedList struct { // server. Id string `json:"id,omitempty"` - // Items: A list of InstancesScopedList resources. + // Items: An object that contains a list of instances scoped by zone. Items map[string]InstancesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -12669,10 +13258,18 @@ func (s *InstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceGroup: InstanceGroups (== resource_for beta.instanceGroups -// ==) (== resource_for v1.instanceGroups ==) (== resource_for -// beta.regionInstanceGroups ==) (== resource_for -// v1.regionInstanceGroups ==) +// InstanceGroup: Represents an unmanaged Instance Group resource. +// +// Use unmanaged instance groups if you need to apply load balancing to +// groups of heterogeneous instances or if you need to manage the +// instances yourself. For more information, read Instance groups. +// +// For zonal unmanaged Instance Group, use instanceGroups resource. +// +// For regional unmanaged Instance Group, use regionInstanceGroups +// resource. (== resource_for beta.instanceGroups ==) (== resource_for +// v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) +// (== resource_for v1.regionInstanceGroups ==) type InstanceGroup struct { // CreationTimestamp: [Output Only] The creation timestamp for this // instance group in RFC3339 text format. @@ -13074,8 +13671,18 @@ func (s *InstanceGroupListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceGroupManager: An Instance Group Manager resource. (== -// resource_for beta.instanceGroupManagers ==) (== resource_for +// InstanceGroupManager: Represents a Managed Instance Group +// resource. +// +// An instance group is a collection of VM instances that you can manage +// as a single entity. For more information, read Instance groups. +// +// For zonal Managed Instance Group, use the instanceGroupManagers +// resource. +// +// For regional Managed Instance Group, use the +// regionInstanceGroupManagers resource. (== resource_for +// beta.instanceGroupManagers ==) (== resource_for // v1.instanceGroupManagers ==) (== resource_for // beta.regionInstanceGroupManagers ==) (== resource_for // v1.regionInstanceGroupManagers ==) @@ -13781,6 +14388,13 @@ func (s *InstanceGroupManagerStatusVersionTarget) MarshalJSON() ([]byte, error) } type InstanceGroupManagerUpdatePolicy struct { + // InstanceRedistributionType: The instance redistribution policy for + // regional managed instance groups. Valid values are: + // - PROACTIVE (default): The group attempts to maintain an even + // distribution of VM instances across zones in the region. + // - NONE: For non-autoscaled groups, proactive redistribution is + // disabled. + // // Possible values: // "NONE" // "PROACTIVE" @@ -13830,10 +14444,19 @@ type InstanceGroupManagerUpdatePolicy struct { // disruptive action. // // Possible values: + // "NONE" + // "REFRESH" // "REPLACE" // "RESTART" MinimalAction string `json:"minimalAction,omitempty"` + // Type: The type of update process. You can specify either PROACTIVE so + // that the instance group manager proactively executes actions in order + // to bring instances to their target versions or OPPORTUNISTIC so that + // no action is proactively executed but the update will be performed as + // part of other actions (for example, resizes or recreateInstances + // calls). + // // Possible values: // "OPPORTUNISTIC" // "PROACTIVE" @@ -13943,24 +14566,41 @@ func (s *InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, er // InstanceGroupManagersApplyUpdatesRequest: // InstanceGroupManagers.applyUpdatesToInstances type InstanceGroupManagersApplyUpdatesRequest struct { - // Instances: The list of URLs of one or more instances for which we - // want to apply updates on this managed instance group. This can be a - // full URL or a partial URL, such as - // zones/[ZONE]/instances/[INSTANCE_NAME]. + // Instances: The list of URLs of one or more instances for which you + // want to apply updates. Each URL can be a full URL or a partial URL, + // such as zones/[ZONE]/instances/[INSTANCE_NAME]. Instances []string `json:"instances,omitempty"` - // MinimalAction: The minimal action that should be perfomed on the - // instances. By default NONE. + // MinimalAction: The minimal action that you want to perform on each + // instance during the update: + // - REPLACE: At minimum, delete the instance and create it again. + // - RESTART: Stop the instance and start it again. + // - REFRESH: Do not stop the instance. + // - NONE: Do not disrupt the instance at all. By default, the minimum + // action is NONE. If your update requires a more disruptive action than + // you set with this flag, the necessary action is performed to execute + // the update. // // Possible values: + // "NONE" + // "REFRESH" // "REPLACE" // "RESTART" MinimalAction string `json:"minimalAction,omitempty"` - // MostDisruptiveAllowedAction: The most disruptive action that allowed - // to be performed on the instances. By default REPLACE. + // MostDisruptiveAllowedAction: The most disruptive action that you want + // to perform on each instance during the update: + // - REPLACE: Delete the instance and create it again. + // - RESTART: Stop the instance and start it again. + // - REFRESH: Do not stop the instance. + // - NONE: Do not disrupt the instance at all. By default, the most + // disruptive allowed action is REPLACE. If your update requires a more + // disruptive action than you set with this flag, the update request + // will fail. // // Possible values: + // "NONE" + // "REFRESH" // "REPLACE" // "RESTART" MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` @@ -13988,6 +14628,35 @@ func (s *InstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceGroupManagersCreateInstancesRequest: +// InstanceGroupManagers.createInstances +type InstanceGroupManagersCreateInstancesRequest struct { + // Instances: [Required] List of specifications of per-instance configs. + Instances []*PerInstanceConfig `json:"instances,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagersCreateInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagersCreateInstancesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagersDeleteInstancesRequest struct { // Instances: The URLs of one or more instances to delete. This can be a // full URL or a partial URL, such as @@ -15197,8 +15866,8 @@ type InstanceProperties struct { // interface. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - // ReservationAffinity: The configuration of desired reservations which - // this Instance could consume capacity from. + // ReservationAffinity: Specifies the reservations that this instance + // can consume from. ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` // Scheduling: Specifies the scheduling options for the instances that @@ -15273,8 +15942,12 @@ func (s *InstanceReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceTemplate: An Instance Template resource. (== resource_for -// beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==) +// InstanceTemplate: Represents an Instance Template resource. +// +// You can use instance templates to create VM instances and managed +// instance groups. For more information, read Instance Templates. (== +// resource_for beta.instanceTemplates ==) (== resource_for +// v1.instanceTemplates ==) type InstanceTemplate struct { // CreationTimestamp: [Output Only] The creation timestamp for this // instance template in RFC3339 text format. @@ -15942,11 +16615,12 @@ func (s *Int64RangeMatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Interconnect: Represents an Interconnects resource. The Interconnects -// resource is a dedicated connection between Google's network and your -// on-premises network. For more information, see the Dedicated -// overview page. (== resource_for v1.interconnects ==) (== resource_for -// beta.interconnects ==) +// Interconnect: Represents an Interconnect resource. +// +// An Interconnect resource is a dedicated connection between the GCP +// network and your on-premises network. For more information, read the +// Dedicated Interconnect Overview. (== resource_for v1.interconnects +// ==) (== resource_for beta.interconnects ==) type Interconnect struct { // AdminEnabled: Administrative status of the interconnect. When this is // set to true, the Interconnect is functional and can carry traffic. @@ -16134,10 +16808,14 @@ func (s *Interconnect) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachment: Represents an InterconnectAttachment (VLAN -// attachment) resource. For more information, see Creating VLAN -// Attachments. (== resource_for beta.interconnectAttachments ==) (== -// resource_for v1.interconnectAttachments ==) +// InterconnectAttachment: Represents an Interconnect Attachment (VLAN) +// resource. +// +// You can use Interconnect attachments (VLANS) to connect your Virtual +// Private Cloud networks to your on-premises networks through an +// Interconnect. For more information, read Creating VLAN Attachments. +// (== resource_for beta.interconnectAttachments ==) (== resource_for +// v1.interconnectAttachments ==) type InterconnectAttachment struct { // AdminEnabled: Determines whether this Attachment will carry packets. // Not present for PARTNER_PROVIDER. @@ -16159,16 +16837,20 @@ type InterconnectAttachment struct { // - BPS_2G: 2 Gbit/s // - BPS_5G: 5 Gbit/s // - BPS_10G: 10 Gbit/s + // - BPS_20G: 20 Gbit/s + // - BPS_50G: 50 Gbit/s // // Possible values: // "BPS_100M" // "BPS_10G" // "BPS_1G" // "BPS_200M" + // "BPS_20G" // "BPS_2G" // "BPS_300M" // "BPS_400M" // "BPS_500M" + // "BPS_50G" // "BPS_50M" // "BPS_5G" Bandwidth string `json:"bandwidth,omitempty"` @@ -16220,7 +16902,7 @@ type InterconnectAttachment struct { // GoogleReferenceId: [Output Only] Google reference ID, to be used when // raising support tickets with Google or otherwise to debug backend - // connectivity issues. + // connectivity issues. [Deprecated] This field is not used. GoogleReferenceId string `json:"googleReferenceId,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -17339,10 +18021,12 @@ func (s *InterconnectListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectLocation: Represents an InterconnectLocations resource. -// The InterconnectLocations resource describes the locations where you -// can connect to Google's networks. For more information, see -// Colocation Facilities. +// InterconnectLocation: Represents an Interconnect Attachment (VLAN) +// Location resource. +// +// You can use this resource to find location details about an +// Interconnect attachment (VLAN). For more information about +// interconnect attachments, read Creating VLAN Attachments. type InterconnectLocation struct { // Address: [Output Only] The postal address of the Point of Presence, // each line in the address is separated by a newline character. @@ -17717,6 +18401,7 @@ type InterconnectOutageNotification struct { // Possible values: // "ACTIVE" // "CANCELLED" + // "COMPLETED" // "NS_ACTIVE" // "NS_CANCELED" State string `json:"state,omitempty"` @@ -18223,19 +18908,22 @@ func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { // // Examples: counter { metric: "/debug_access_count" field: // "iam_principal" } ==> increment counter -// /iam/policy/backend_debug_access_count {iam_principal=[value of +// /iam/policy/debug_access_count {iam_principal=[value of // IAMContext.principal]} // -// At this time we do not support multiple field names (though this may -// be supported in the future). +// TODO(b/141846426): Consider supporting "authority" and +// "iam_principal" fields in the same counter. type LogConfigCounterOptions struct { + // CustomFields: Custom fields. + CustomFields []*LogConfigCounterOptionsCustomField `json:"customFields,omitempty"` + // Field: The field value to attribute. Field string `json:"field,omitempty"` // Metric: The metric to update. Metric string `json:"metric,omitempty"` - // ForceSendFields is a list of field names (e.g. "Field") to + // ForceSendFields is a list of field names (e.g. "CustomFields") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -18243,7 +18931,42 @@ type LogConfigCounterOptions struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Field") to include in API + // NullFields is a list of field names (e.g. "CustomFields") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { + type NoMethod LogConfigCounterOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LogConfigCounterOptionsCustomField: Custom fields. These can be used +// to create a counter with arbitrary field/value pairs. See: +// go/rpcsp-custom-fields. +type LogConfigCounterOptionsCustomField struct { + // Name: Name is the field name. + Name string `json:"name,omitempty"` + + // Value: Value is the field value. It is important that in contrast to + // the CounterOptions.field, the value here is a constant that is not + // derived from the IAMContext. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -18252,8 +18975,8 @@ type LogConfigCounterOptions struct { NullFields []string `json:"-"` } -func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { - type NoMethod LogConfigCounterOptions +func (s *LogConfigCounterOptionsCustomField) MarshalJSON() ([]byte, error) { + type NoMethod LogConfigCounterOptionsCustomField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -18292,8 +19015,287 @@ func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineType: A Machine Type resource. (== resource_for -// v1.machineTypes ==) (== resource_for beta.machineTypes ==) +// MachineImage: Machine image resource. +type MachineImage struct { + // CreationTimestamp: [Output Only] The creation timestamp for this + // machine image in RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // GuestFlush: [Input Only] Specifies to create an application + // consistent machine image by informing the OS to prepare for the + // snapshot process. Currently only supported on Windows instances using + // the Volume Shadow Copy Service (VSS). + GuestFlush bool `json:"guestFlush,omitempty"` + + // Id: [Output Only] A unique identifier for this machine image. The + // server defines this identifier. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] The resource type, which is always + // compute#machineImage for machine image. + Kind string `json:"kind,omitempty"` + + // MachineImageEncryptionKey: Encrypts the machine image using a + // customer-supplied encryption key. + // + // After you encrypt a machine image using a customer-supplied key, you + // must provide the same key if you use the machine image later. For + // example, you must provide the encryption key when you create an + // instance from the encrypted machine image in a future + // request. + // + // Customer-supplied encryption keys do not protect access to metadata + // of the machine image. + // + // If you do not provide an encryption key when creating the machine + // image, then the machine image will be encrypted using an + // automatically generated key and you do not need to provide a key to + // use the machine image later. + MachineImageEncryptionKey *CustomerEncryptionKey `json:"machineImageEncryptionKey,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // SelfLink: [Output Only] The URL for this machine image. The server + // defines this URL. + SelfLink string `json:"selfLink,omitempty"` + + // SourceDiskEncryptionKeys: [Input Only] The customer-supplied + // encryption key of the disks attached to the source instance. Required + // if the source disk is protected by a customer-supplied encryption + // key. + SourceDiskEncryptionKeys []*SourceDiskEncryptionKey `json:"sourceDiskEncryptionKeys,omitempty"` + + // SourceInstance: The source instance used to create the machine image. + // You can provide this as a partial or full URL to the resource. For + // example, the following are valid values: + // - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + // - projects/project/zones/zone/instances/instance + SourceInstance string `json:"sourceInstance,omitempty"` + + // SourceInstanceProperties: [Output Only] Properties of source + // instance. + SourceInstanceProperties *SourceInstanceProperties `json:"sourceInstanceProperties,omitempty"` + + // Status: [Output Only] The status of the machine image. One of the + // following values: INVALID, CREATING, READY, DELETING, and UPLOADING. + // + // Possible values: + // "CREATING" + // "DELETING" + // "INVALID" + // "READY" + // "UPLOADING" + Status string `json:"status,omitempty"` + + // StorageLocations: GCS bucket storage location of the machine image + // (regional or multi-regional). + StorageLocations []string `json:"storageLocations,omitempty"` + + // TotalStorageBytes: [Output Only] Total size of the storage used by + // the machine image. + TotalStorageBytes int64 `json:"totalStorageBytes,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MachineImage) MarshalJSON() ([]byte, error) { + type NoMethod MachineImage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachineImageList: A list of machine images. +type MachineImageList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of MachineImage resources. + Items []*MachineImage `json:"items,omitempty"` + + // Kind: [Output Only] The resource type, which is always + // compute#machineImagesListResponse for machine image lists. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *MachineImageListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MachineImageList) MarshalJSON() ([]byte, error) { + type NoMethod MachineImageList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachineImageListWarning: [Output Only] Informational warning message. +type MachineImageListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*MachineImageListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MachineImageListWarning) MarshalJSON() ([]byte, error) { + type NoMethod MachineImageListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type MachineImageListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MachineImageListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod MachineImageListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MachineType: Represents a Machine Type resource. +// +// You can use specific machine types for your VM instances based on +// performance and pricing requirements. For more information, read +// Machine Types. (== resource_for v1.machineTypes ==) (== resource_for +// beta.machineTypes ==) type MachineType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -18867,6 +19869,10 @@ type ManagedInstance struct { // even if the instance has not yet been created. Instance string `json:"instance,omitempty"` + // InstanceHealth: [Output Only] Health state of the instance per + // health-check. + InstanceHealth []*ManagedInstanceInstanceHealth `json:"instanceHealth,omitempty"` + // InstanceStatus: [Output Only] The status of the instance. This field // is empty when the instance does not exist. // @@ -18912,6 +19918,46 @@ func (s *ManagedInstance) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ManagedInstanceInstanceHealth struct { + // DetailedHealthState: [Output Only] The current detailed instance + // health state. + // + // Possible values: + // "DRAINING" + // "HEALTHY" + // "TIMEOUT" + // "UNHEALTHY" + // "UNKNOWN" + DetailedHealthState string `json:"detailedHealthState,omitempty"` + + // HealthCheck: [Output Only] The URL for the health check that verifies + // whether the instance is healthy. + HealthCheck string `json:"healthCheck,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetailedHealthState") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetailedHealthState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ManagedInstanceInstanceHealth) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstanceInstanceHealth + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ManagedInstanceLastAttempt struct { // Errors: [Output Only] Encountered errors during the last attempt to // create or delete the instance. @@ -19248,9 +20294,11 @@ func (s *NamedPort) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Network: Represents a Network resource. Read Virtual Private Cloud -// (VPC) Network Overview for more information. (== resource_for -// v1.networks ==) (== resource_for beta.networks ==) +// Network: Represents a VPC Network resource. +// +// Networks connect resources to each other and to the internet. For +// more information, read Virtual Private Cloud (VPC) Network. (== +// resource_for v1.networks ==) (== resource_for beta.networks ==) type Network struct { // IPv4Range: Deprecated in favor of subnet mode networks. The range of // internal addresses that are legal on this network. This range is a @@ -19272,11 +20320,11 @@ type Network struct { CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional description of this resource. Provide this - // property when you create the resource. + // field when you create the resource. Description string `json:"description,omitempty"` // GatewayIPv4: [Output Only] The gateway address for default routing - // out of the network. This value is read only and is selected by GCP. + // out of the network, selected by GCP. GatewayIPv4 string `json:"gatewayIPv4,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -19290,10 +20338,10 @@ type Network struct { // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. Name string `json:"name,omitempty"` // Peerings: [Output Only] A list of network peerings for the resource. @@ -19349,10 +20397,10 @@ type NetworkEndpoint struct { Instance string `json:"instance,omitempty"` // IpAddress: Optional IPv4 address of network endpoint. The IP address - // must belong to a VM in GCE (either the primary IP or as part of an - // aliased IP range). If the IP address is not specified, then the - // primary IP address for the VM instance in the network that the - // network endpoint group belongs to will be used. + // must belong to a VM in Compute Engine (either the primary IP or as + // part of an aliased IP range). If the IP address is not specified, + // then the primary IP address for the VM instance in the network that + // the network endpoint group belongs to will be used. IpAddress string `json:"ipAddress,omitempty"` // Port: Optional port number of network endpoint. If not specified and @@ -19383,7 +20431,12 @@ func (s *NetworkEndpoint) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NetworkEndpointGroup: Represents a collection of network endpoints. +// NetworkEndpointGroup: Represents a collection of network +// endpoints. +// +// For more information read Setting up network endpoint groups in load +// balancing. (== resource_for v1.networkEndpointGroups ==) (== +// resource_for beta.networkEndpointGroups ==) type NetworkEndpointGroup struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -20248,8 +21301,8 @@ type NetworkInterface struct { AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` // AliasIpRanges: An array of alias IP ranges for this network - // interface. Can only be specified for network interfaces on - // subnet-mode networks. + // interface. You can only specify this field for network interfaces in + // VPC networks. AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"` // Fingerprint: Fingerprint hash of contents stored in this network @@ -20259,12 +21312,17 @@ type NetworkInterface struct { // fail with error 412 conditionNotMet. Fingerprint string `json:"fingerprint,omitempty"` + // Ipv6Address: [Output Only] An IPv6 internal network address for this + // network interface. + Ipv6Address string `json:"ipv6Address,omitempty"` + // Kind: [Output Only] Type of the resource. Always // compute#networkInterface for network interfaces. Kind string `json:"kind,omitempty"` - // Name: [Output Only] The name of the network interface, generated by - // the server. For network devices, these are eth0, eth1, etc. + // Name: [Output Only] The name of the network interface, which is + // generated by the server. For network devices, these are eth0, eth1, + // etc. Name string `json:"name,omitempty"` // Network: URL of the network resource for this instance. When creating @@ -20273,10 +21331,6 @@ type NetworkInterface struct { // is not specified but the subnetwork is specified, the network is // inferred. // - // This field is optional when creating a firewall rule. If not - // specified when creating a firewall rule, the default network - // global/networks/default is used. - // // If you specify this property, you can specify the network as a full // or partial URL. For example, the following are all valid URLs: // - @@ -20285,16 +21339,16 @@ type NetworkInterface struct { // - global/networks/default Network string `json:"network,omitempty"` - // NetworkIP: An IPv4 internal network address to assign to the instance - // for this network interface. If not specified by the user, an unused + // NetworkIP: An IPv4 internal IP address to assign to the instance for + // this network interface. If not specified by the user, an unused // internal IP is assigned by the system. NetworkIP string `json:"networkIP,omitempty"` // Subnetwork: The URL of the Subnetwork resource for this instance. If - // the network resource is in legacy mode, do not provide this property. - // If the network is in auto subnet mode, providing the subnetwork is - // optional. If the network is in custom subnet mode, then this field - // should be specified. If you specify this property, you can specify + // the network resource is in legacy mode, do not specify this field. If + // the network is in auto subnet mode, specifying the subnetwork is + // optional. If the network is in custom subnet mode, specifying the + // subnetwork is required. If you specify this field, you can specify // the subnetwork as a full or partial URL. For example, the following // are all valid URLs: // - @@ -20485,19 +21539,19 @@ func (s *NetworkListWarningData) MarshalJSON() ([]byte, error) { // flag indicating whether Google Compute Engine should automatically // create routes for the peering. type NetworkPeering struct { - // AutoCreateRoutes: This field will be deprecated soon. Prefer using - // exchange_subnet_routes instead. Indicates whether full mesh - // connectivity is created and managed automatically. When it is set to - // true, Google Compute Engine will automatically create and manage the - // routes between two networks when the state is ACTIVE. Otherwise, user - // needs to create routes manually to route packets to peer network. + // AutoCreateRoutes: This field will be deprecated soon. Use the + // exchange_subnet_routes field instead. Indicates whether full mesh + // connectivity is created and managed automatically between peered + // networks. Currently this field should always be true since Google + // Compute Engine will automatically create and manage subnetwork routes + // between two networks when peering state is ACTIVE. AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` - // ExchangeSubnetRoutes: Whether full mesh connectivity is created and - // managed automatically. When it is set to true, Google Compute Engine - // will automatically create and manage the routes between two networks - // when the peering state is ACTIVE. Otherwise, user needs to create - // routes manually to route packets to peer network. + // ExchangeSubnetRoutes: Indicates whether full mesh connectivity is + // created and managed automatically between peered networks. Currently + // this field should always be true since Google Compute Engine will + // automatically create and manage subnetwork routes between two + // networks when peering state is ACTIVE. ExchangeSubnetRoutes bool `json:"exchangeSubnetRoutes,omitempty"` // ExportCustomRoutes: Whether to export the custom routes to peer @@ -20511,10 +21565,9 @@ type NetworkPeering struct { // Name: Name of this peering. Provided by the client when the peering // is created. The name must comply with RFC1035. Specifically, the name // must be 1-63 characters long and match regular expression - // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be - // a lowercase letter, and all the following characters must be a dash, - // lowercase letter, or digit, except the last character, which cannot - // be a dash. + // `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase + // letter, and all the following characters must be a dash, lowercase + // letter, or digit, except the last character, which cannot be a dash. Name string `json:"name,omitempty"` // Network: The URL of the peer network. It can be either full URL or @@ -20523,7 +21576,9 @@ type NetworkPeering struct { // network is in the same project as the current network. Network string `json:"network,omitempty"` - // State: [Output Only] State for the peering. + // State: [Output Only] State for the peering, either `ACTIVE` or + // `INACTIVE`. The peering is `ACTIVE` when there's a matching + // configuration in the peer network. // // Possible values: // "ACTIVE" @@ -20564,9 +21619,9 @@ func (s *NetworkPeering) MarshalJSON() ([]byte, error) { // enforce network-wide. type NetworkRoutingConfig struct { // RoutingMode: The network-wide routing mode to use. If set to - // REGIONAL, this network's cloud routers will only advertise routes + // REGIONAL, this network's Cloud Routers will only advertise routes // with subnets of this network in the same region as the router. If set - // to GLOBAL, this network's cloud routers will advertise routes with + // to GLOBAL, this network's Cloud Routers will advertise routes with // all subnets of this network, across regions. // // Possible values: @@ -20598,19 +21653,23 @@ func (s *NetworkRoutingConfig) MarshalJSON() ([]byte, error) { } type NetworksAddPeeringRequest struct { - // AutoCreateRoutes: This field will be deprecated soon. Prefer using - // exchange_subnet_routes in network_peering instead. Whether Google - // Compute Engine manages the routes automatically. + // AutoCreateRoutes: This field will be deprecated soon. Use + // exchange_subnet_routes in network_peering instead. Indicates whether + // full mesh connectivity is created and managed automatically between + // peered networks. Currently this field should always be true since + // Google Compute Engine will automatically create and manage subnetwork + // routes between two networks when peering state is ACTIVE. AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"` // Name: Name of the peering, which should conform to RFC1035. Name string `json:"name,omitempty"` // NetworkPeering: Network peering parameters. In order to specify route - // policies for peering using import/export custom routes, you will have - // to fill all peering related parameters (name, peer network, - // exchange_subnet_routes) in network_peeringfield. Corresponding fields - // in NetworksAddPeeringRequest will be deprecated soon. + // policies for peering using import and export custom routes, you must + // specify all peering related parameters (name, peer network, + // exchange_subnet_routes) in the network_peering field. The + // corresponding fields in NetworksAddPeeringRequest will be deprecated + // soon. NetworkPeering *NetworkPeering `json:"networkPeering,omitempty"` // PeerNetwork: URL of the peer network. It can be either full URL or @@ -20697,10 +21756,15 @@ func (s *NetworksUpdatePeeringRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeGroup: A NodeGroup resource. To create a node group, you must -// first create a node templates. To learn more about node groups and -// sole-tenant nodes, read the Sole-tenant nodes documentation. (== +// NodeGroup: Represent a sole-tenant Node Group resource. +// +// A sole-tenant node is a physical server that is dedicated to hosting +// VM instances only for your specific project. Use sole-tenant nodes to +// keep your instances physically separated from instances in other +// projects, or to group your instances together on the same host +// hardware. For more information, read Sole-tenant nodes. (== // resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==) +// NextID: 16 type NodeGroup struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -21161,6 +22225,7 @@ func (s *NodeGroupsAddNodesRequest) MarshalJSON() ([]byte, error) { } type NodeGroupsDeleteNodesRequest struct { + // Nodes: Names of the nodes to delete. Nodes []string `json:"nodes,omitempty"` // ForceSendFields is a list of field names (e.g. "Nodes") to @@ -21504,10 +22569,12 @@ func (s *NodeGroupsSetNodeTemplateRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeTemplate: A Node Template resource. To learn more about node -// templates and sole-tenant nodes, read the Sole-tenant nodes -// documentation. (== resource_for beta.nodeTemplates ==) (== -// resource_for v1.nodeTemplates ==) +// NodeTemplate: Represent a sole-tenant Node Template resource. +// +// You can use a template to define properties for nodes in a node +// group. For more information, read Creating node groups and instances. +// (== resource_for beta.nodeTemplates ==) (== resource_for +// v1.nodeTemplates ==) (== NextID: 16 ==) type NodeTemplate struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -21558,7 +22625,14 @@ type NodeTemplate struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // ServerBinding: Binding properties for the physical server. + // ServerBinding: Sets the binding properties for the physical server. + // Valid values include: + // - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available + // physical server + // - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical + // server whenever possible + // + // See Sole-tenant node options for more information. ServerBinding *ServerBinding `json:"serverBinding,omitempty"` // Status: [Output Only] The status of the node template. One of the @@ -22078,7 +23152,14 @@ func (s *NodeTemplatesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// NodeType: A Node Type resource. +// NodeType: Represent a sole-tenant Node Type resource. +// +// Each node within a node group must have a node type. A node type +// specifies the total amount of cores and memory for that node. +// Currently, the only available node type is n1-node-96-624 node type +// that has 96 vCPUs and 624 GB of memory, available in multiple zones. +// For more information read Node types. (== resource_for beta.nodeTypes +// ==) (== resource_for v1.nodeTypes ==) type NodeType struct { // CpuPlatform: [Output Only] The CPU platform used by this node type. CpuPlatform string `json:"cpuPlatform,omitempty"` @@ -22596,8 +23677,19 @@ func (s *NodeTypesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Operation: An Operation resource, used to manage asynchronous API -// requests. (== resource_for v1.globalOperations ==) (== resource_for +// Operation: Represents an Operation resource. +// +// You can use an operation resource to manage asynchronous API +// requests. For more information, read Handling API +// responses. +// +// Operations can be global, regional or zonal. +// - For global operations, use the globalOperations resource. +// - For regional operations, use the regionOperations resource. +// - For zonal operations, use the zonalOperations resource. +// +// For more information, read Global, Regional, and Zonal Resources. +// (== resource_for v1.globalOperations ==) (== resource_for // beta.globalOperations ==) (== resource_for v1.regionOperations ==) // (== resource_for beta.regionOperations ==) (== resource_for // v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) @@ -22630,7 +23722,7 @@ type Operation struct { // 404 means the resource was not found. HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` - // Id: [Output Only] The unique identifier for the resource. This + // Id: [Output Only] The unique identifier for the operation. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` @@ -22642,7 +23734,7 @@ type Operation struct { // for Operation resources. Kind string `json:"kind,omitempty"` - // Name: [Output Only] Name of the resource. + // Name: [Output Only] Name of the operation. Name string `json:"name,omitempty"` // OperationType: [Output Only] The type of operation, such as insert, @@ -22657,9 +23749,7 @@ type Operation struct { Progress int64 `json:"progress,omitempty"` // Region: [Output Only] The URL of the region where the operation - // resides. Only available when performing regional operations. You must - // specify this field as part of the HTTP request URL. It is not - // settable as a field in the request body. + // resides. Only applicable when performing regional operations. Region string `json:"region,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -22700,9 +23790,7 @@ type Operation struct { Warnings []*OperationWarnings `json:"warnings,omitempty"` // Zone: [Output Only] The URL of the zone where the operation resides. - // Only available when performing per-zone operations. You must specify - // this field as part of the HTTP request URL. It is not settable as a - // field in the request body. + // Only applicable when performing per-zone operations. Zone string `json:"zone,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -23341,12 +24429,13 @@ func (s *OperationsScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// OutlierDetection: Settings controlling eviction of unhealthy hosts -// from the load balancing pool. +// OutlierDetection: Settings controlling the eviction of unhealthy +// hosts from the load balancing pool for the backend service. type OutlierDetection struct { // BaseEjectionTime: The base time that a host is ejected for. The real - // time is equal to the base time multiplied by the number of times the - // host has been ejected. Defaults to 30000ms or 30s. + // ejection time is equal to the base ejection time multiplied by the + // number of times the host has been ejected. Defaults to 30000ms or + // 30s. BaseEjectionTime *Duration `json:"baseEjectionTime,omitempty"` // ConsecutiveErrors: Number of errors before a host is ejected from the @@ -23357,19 +24446,19 @@ type OutlierDetection struct { // ConsecutiveGatewayFailure: The number of consecutive gateway failures // (502, 503, 504 status or connection errors that are mapped to one of // those status codes) before a consecutive gateway failure ejection - // occurs. Defaults to 5. + // occurs. Defaults to 3. ConsecutiveGatewayFailure int64 `json:"consecutiveGatewayFailure,omitempty"` // EnforcingConsecutiveErrors: The percentage chance that a host will be // actually ejected when an outlier status is detected through // consecutive 5xx. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 100. + // ramp it up slowly. Defaults to 0. EnforcingConsecutiveErrors int64 `json:"enforcingConsecutiveErrors,omitempty"` // EnforcingConsecutiveGatewayFailure: The percentage chance that a host // will be actually ejected when an outlier status is detected through // consecutive gateway failures. This setting can be used to disable - // ejection or to ramp it up slowly. Defaults to 0. + // ejection or to ramp it up slowly. Defaults to 100. EnforcingConsecutiveGatewayFailure int64 `json:"enforcingConsecutiveGatewayFailure,omitempty"` // EnforcingSuccessRate: The percentage chance that a host will be @@ -23378,13 +24467,13 @@ type OutlierDetection struct { // ramp it up slowly. Defaults to 100. EnforcingSuccessRate int64 `json:"enforcingSuccessRate,omitempty"` - // Interval: Time interval between ejection sweep analysis. This can + // Interval: Time interval between ejection analysis sweeps. This can // result in both new ejections as well as hosts being returned to - // service. Defaults to 10 seconds. + // service. Defaults to 1 second. Interval *Duration `json:"interval,omitempty"` // MaxEjectionPercent: Maximum percentage of hosts in the load balancing - // pool for the backend service that can be ejected. Defaults to 10%. + // pool for the backend service that can be ejected. Defaults to 50%. MaxEjectionPercent int64 `json:"maxEjectionPercent,omitempty"` // SuccessRateMinimumHosts: The number of hosts in a cluster that must @@ -23435,6 +24524,821 @@ func (s *OutlierDetection) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PacketIntervals: Next free: 7 +type PacketIntervals struct { + // AvgMs: Average observed inter-packet interval in milliseconds. + AvgMs int64 `json:"avgMs,omitempty,string"` + + // Duration: From how long ago in the past these intervals were + // observed. + // + // Possible values: + // "DURATION_UNSPECIFIED" + // "HOUR" + // "MAX" + // "MINUTE" + Duration string `json:"duration,omitempty"` + + // MaxMs: Maximum observed inter-packet interval in milliseconds. + MaxMs int64 `json:"maxMs,omitempty,string"` + + // MinMs: Minimum observed inter-packet interval in milliseconds. + MinMs int64 `json:"minMs,omitempty,string"` + + // NumIntervals: Number of inter-packet intervals from which these + // statistics were derived. + NumIntervals int64 `json:"numIntervals,omitempty,string"` + + // Type: The type of packets for which inter-packet intervals were + // computed. + // + // Possible values: + // "LOOPBACK" + // "RECEIVE" + // "TRANSMIT" + // "TYPE_UNSPECIFIED" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AvgMs") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AvgMs") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketIntervals) MarshalJSON() ([]byte, error) { + type NoMethod PacketIntervals + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroring: Represents a PacketMirroring resource. +type PacketMirroring struct { + // CollectorIlb: The Forwarding Rule resource of type + // loadBalancingScheme=INTERNAL that will be used as collector for + // mirrored traffic. The specified forwarding rule must have + // isMirroringCollector set to true. + CollectorIlb *PacketMirroringForwardingRuleInfo `json:"collectorIlb,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Enable: Indicates whether or not this packet mirroring takes effect. + // If set to FALSE, this packet mirroring policy will not be enforced on + // the network. + // + // The default is TRUE. + // + // Possible values: + // "FALSE" + // "TRUE" + Enable string `json:"enable,omitempty"` + + // Filter: Filter for mirrored traffic. If unspecified, all traffic is + // mirrored. + Filter *PacketMirroringFilter `json:"filter,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#packetMirroring for packet mirrorings. + Kind string `json:"kind,omitempty"` + + // MirroredResources: PacketMirroring mirroredResourceInfos. + // MirroredResourceInfo specifies a set of mirrored VM instances, + // subnetworks and/or tags for which traffic from/to all VM instances + // will be mirrored. + MirroredResources *PacketMirroringMirroredResourceInfo `json:"mirroredResources,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Network: Specifies the mirrored VPC network. Only packets in this + // network will be mirrored. All mirrored VMs should have a NIC in the + // given network. All mirrored subnetworks should belong to the given + // network. + Network *PacketMirroringNetworkInfo `json:"network,omitempty"` + + // Priority: The priority of applying this configuration. Priority is + // used to break ties in cases where there is more than one matching + // rule. In the case of two rules that apply for a given Instance, the + // one with the lowest-numbered priority value wins. + // + // Default value is 1000. Valid range is 0 through 65535. + Priority int64 `json:"priority,omitempty"` + + // Region: [Output Only] URI of the region where the packetMirroring + // resides. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CollectorIlb") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CollectorIlb") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroring) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroring + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroringAggregatedList: Contains a list of packetMirrorings. +type PacketMirroringAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of PacketMirroring resources. + Items map[string]PacketMirroringsScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *PacketMirroringAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroringAggregatedListWarning: [Output Only] Informational +// warning message. +type PacketMirroringAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*PacketMirroringAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringFilter struct { + // IPProtocols: Protocols that apply as filter on mirrored traffic. If + // no protocols are specified, all traffic that matches the specified + // CIDR ranges is mirrored. If neither cidrRanges nor IPProtocols is + // specified, all traffic is mirrored. + IPProtocols []string `json:"IPProtocols,omitempty"` + + // CidrRanges: IP CIDR ranges that apply as filter on the source + // (ingress) or destination (egress) IP in the IP header. Only IPv4 is + // supported. If no ranges are specified, all traffic that matches the + // specified IPProtocols is mirrored. If neither cidrRanges nor + // IPProtocols is specified, all traffic is mirrored. + CidrRanges []string `json:"cidrRanges,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IPProtocols") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IPProtocols") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringFilter) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringForwardingRuleInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the forwarding + // rule; defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` + + // Url: Resource URL to the forwarding rule representing the ILB + // configured as destination of the mirrored traffic. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringForwardingRuleInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringForwardingRuleInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroringList: Contains a list of PacketMirroring resources. +type PacketMirroringList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of PacketMirroring resources. + Items []*PacketMirroring `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#packetMirroring + // for packetMirrorings. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *PacketMirroringListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringList) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroringListWarning: [Output Only] Informational warning +// message. +type PacketMirroringListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*PacketMirroringListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringMirroredResourceInfo struct { + // Instances: A set of virtual machine instances that are being + // mirrored. They must live in zones contained in the same region as + // this packetMirroring. + // + // Note that this config will apply only to those network interfaces of + // the Instances that belong to the network specified in this + // packetMirroring. + // + // You may specify a maximum of 50 Instances. + Instances []*PacketMirroringMirroredResourceInfoInstanceInfo `json:"instances,omitempty"` + + // Subnetworks: A set of subnetworks for which traffic from/to all VM + // instances will be mirrored. They must live in the same region as this + // packetMirroring. + // + // You may specify a maximum of 5 subnetworks. + Subnetworks []*PacketMirroringMirroredResourceInfoSubnetInfo `json:"subnetworks,omitempty"` + + // Tags: A set of mirrored tags. Traffic from/to all VM instances that + // have one or more of these tags will be mirrored. + Tags []string `json:"tags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringMirroredResourceInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringMirroredResourceInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringMirroredResourceInfoInstanceInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the instance; + // defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` + + // Url: Resource URL to the virtual machine instance which is being + // mirrored. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringMirroredResourceInfoInstanceInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringMirroredResourceInfoInstanceInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringMirroredResourceInfoSubnetInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the subnetwork; + // defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` + + // Url: Resource URL to the subnetwork for which traffic from/to all VM + // instances will be mirrored. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringMirroredResourceInfoSubnetInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringMirroredResourceInfoSubnetInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringNetworkInfo struct { + // CanonicalUrl: [Output Only] Unique identifier for the network; + // defined by the server. + CanonicalUrl string `json:"canonicalUrl,omitempty"` + + // Url: URL of the network resource. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanonicalUrl") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CanonicalUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringNetworkInfo) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringNetworkInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringsScopedList struct { + // PacketMirrorings: A list of packetMirrorings contained in this scope. + PacketMirrorings []*PacketMirroring `json:"packetMirrorings,omitempty"` + + // Warning: Informational warning which replaces the list of + // packetMirrorings when the list is empty. + Warning *PacketMirroringsScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PacketMirrorings") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PacketMirrorings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringsScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PacketMirroringsScopedListWarning: Informational warning which +// replaces the list of packetMirrorings when the list is empty. +type PacketMirroringsScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*PacketMirroringsScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringsScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PacketMirroringsScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PacketMirroringsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod PacketMirroringsScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PathMatcher: A matcher for the path portion of the URL. The // BackendService from the longest-matched rule will serve the URL. If // no rule was matched, the default service will be used. @@ -23499,7 +25403,8 @@ type PathMatcher struct { // For example: a pathRule with a path /a/b/c/* will match before /a/b/* // irrespective of the order in which those paths appear in this // list. - // Only one of pathRules or routeRules must be set. + // Within a given pathMatcher, only one of pathRules or routeRules must + // be set. PathRules []*PathRule `json:"pathRules,omitempty"` // RouteRules: The list of ordered HTTP route rules. Use this list @@ -23507,7 +25412,10 @@ type PathMatcher struct { // are desired. The order of specifying routeRules matters: the first // rule that matches will cause its specified routing action to take // effect. - // Only one of pathRules or routeRules must be set. + // Within a given pathMatcher, only one of pathRules or routeRules must + // be set. + // routeRules are not supported in UrlMaps intended for External Load + // balancers. RouteRules []*HttpRouteRule `json:"routeRules,omitempty"` // ForceSendFields is a list of field names (e.g. "DefaultRouteAction") @@ -23591,35 +25499,82 @@ func (s *PathRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type PerInstanceConfig struct { + // Fingerprint: Fingerprint of this per-instance config. This field may + // be used in optimistic locking. It will be ignored when inserting a + // per-instance config. An up-to-date fingerprint must be provided in + // order to update an existing per-instance config or the field needs to + // be unset. + Fingerprint string `json:"fingerprint,omitempty"` + + // Name: The name of the per-instance config and the corresponding + // instance. Serves as a merge key during UpdatePerInstanceConfigs + // operation, i.e. if per-instance config with the same name exists then + // it will be updated, otherwise a new one will be created for the VM + // instance with the same name. An attempt to create a per-instance + // config for a VM instance that either doesn't exist or is not part of + // the group will result in a failure. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fingerprint") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Fingerprint") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PerInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod PerInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Policy: Defines an Identity and Access Management (IAM) policy. It is // used to specify access control policies for Cloud Platform // resources. // // // -// A `Policy` consists of a list of `bindings`. A `binding` binds a list -// of `members` to a `role`, where the members can be user accounts, -// Google groups, Google domains, and service accounts. A `role` is a -// named list of permissions defined by IAM. +// A `Policy` is a collection of `bindings`. A `binding` binds one or +// more `members` to a single `role`. Members can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions (defined by IAM or configured +// by users). A `binding` can optionally specify a `condition`, which is +// a logic expression that further constrains the role binding based on +// attributes about the request and/or target resource. // // **JSON Example** // -// { "bindings": [ { "role": "roles/owner", "members": [ -// "user:mike@example.com", "group:admins@example.com", +// { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", +// "members": [ "user:mike@example.com", "group:admins@example.com", // "domain:google.com", -// "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { -// "role": "roles/viewer", "members": ["user:sean@example.com"] } ] +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": +// ["user:eve@example.com"], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ] // } // // **YAML Example** // // bindings: - members: - user:mike@example.com - // group:admins@example.com - domain:google.com - -// serviceAccount:my-other-app@appspot.gserviceaccount.com role: -// roles/owner - members: - user:sean@example.com role: -// roles/viewer -// -// +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') // // For a description of IAM and its features, see the [IAM developer's // guide](https://cloud.google.com/iam/docs). @@ -23628,8 +25583,9 @@ type Policy struct { // policy. AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` - // Bindings: Associates a list of `members` to a `role`. `bindings` with - // no members will result in an error. + // Bindings: Associates a list of `members` to a `role`. Optionally may + // specify a `condition` that determines when binding is in effect. + // `bindings` with no members will result in an error. Bindings []*Binding `json:"bindings,omitempty"` // Etag: `etag` is used for optimistic concurrency control as a way to @@ -23642,7 +25598,9 @@ type Policy struct { // to the same version of the policy. // // If no `etag` is provided in the call to `setIamPolicy`, then the - // existing policy is overwritten blindly. + // existing policy is overwritten. Due to blind-set semantics of an + // etag-less policy, 'setIamPolicy' will not fail even if either of + // incoming or stored policy does not meet the version requirements. Etag string `json:"etag,omitempty"` IamOwned bool `json:"iamOwned,omitempty"` @@ -23657,7 +25615,19 @@ type Policy struct { // denied. Rules []*Rule `json:"rules,omitempty"` - // Version: Deprecated. + // Version: Specifies the format of the policy. + // + // Valid values are 0, 1, and 3. Requests specifying an invalid value + // will be rejected. + // + // Operations affecting conditional bindings must specify version 3. + // This can be either setting a conditional policy, modifying a + // conditional binding, or removing a conditional binding from the + // stored conditional policy. Operations on non-conditional policies may + // specify any valid value or leave the field unset. + // + // If no etag is provided in the call to `setIamPolicy`, any version + // compliance checks on the incoming and/or stored policy is skipped. Version int64 `json:"version,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -23716,9 +25686,12 @@ func (s *PreconfiguredWafSet) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Project: A Project resource. For an overview of projects, see Cloud -// Platform Resource Hierarchy. (== resource_for v1.projects ==) (== -// resource_for beta.projects ==) +// Project: Represents a Project resource. +// +// A project is used to organize resources in a Google Cloud Platform +// environment. For more information, read about the Resource +// Hierarchy. (== resource_for v1.projects ==) (== resource_for +// beta.projects ==) type Project struct { // CommonInstanceMetadata: Metadata key/value pairs available to all // instances contained in this project. See Custom metadata for more @@ -23979,7 +25952,17 @@ type Quota struct { // "AUTOSCALERS" // "BACKEND_BUCKETS" // "BACKEND_SERVICES" + // "C2_CPUS" // "COMMITMENTS" + // "COMMITTED_C2_CPUS" + // "COMMITTED_CPUS" + // "COMMITTED_LOCAL_SSD_TOTAL_GB" + // "COMMITTED_N2_CPUS" + // "COMMITTED_NVIDIA_K80_GPUS" + // "COMMITTED_NVIDIA_P100_GPUS" + // "COMMITTED_NVIDIA_P4_GPUS" + // "COMMITTED_NVIDIA_T4_GPUS" + // "COMMITTED_NVIDIA_V100_GPUS" // "CPUS" // "CPUS_ALL_REGIONS" // "DISKS_TOTAL_GB" @@ -23997,11 +25980,14 @@ type Quota struct { // "INTERCONNECTS" // "INTERCONNECT_ATTACHMENTS_PER_REGION" // "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS" + // "INTERCONNECT_TOTAL_GBPS" // "INTERNAL_ADDRESSES" // "IN_USE_ADDRESSES" // "IN_USE_BACKUP_SCHEDULES" // "IN_USE_SNAPSHOT_SCHEDULES" // "LOCAL_SSD_TOTAL_GB" + // "MACHINE_IMAGES" + // "N2_CPUS" // "NETWORKS" // "NETWORK_ENDPOINT_GROUPS" // "NVIDIA_K80_GPUS" @@ -24022,12 +26008,15 @@ type Quota struct { // "PREEMPTIBLE_NVIDIA_T4_GPUS" // "PREEMPTIBLE_NVIDIA_T4_VWS_GPUS" // "PREEMPTIBLE_NVIDIA_V100_GPUS" + // "PRIVATE_V6_ACCESS_SUBNETWORKS" // "REGIONAL_AUTOSCALERS" // "REGIONAL_INSTANCE_GROUP_MANAGERS" + // "RESERVATIONS" // "RESOURCE_POLICIES" // "ROUTERS" // "ROUTES" // "SECURITY_POLICIES" + // "SECURITY_POLICY_CEVAL_RULES" // "SECURITY_POLICY_RULES" // "SNAPSHOTS" // "SSD_TOTAL_GB" @@ -24132,8 +26121,11 @@ func (s *Reference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Region: Region resource. (== resource_for beta.regions ==) (== -// resource_for v1.regions ==) +// Region: Represents a Region resource. +// +// A region is a geographical area where a resource is located. For more +// information, read Regions and Zones. (== resource_for beta.regions +// ==) (== resource_for v1.regions ==) type Region struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -24358,8 +26350,8 @@ func (s *RegionAutoscalerListWarningData) MarshalJSON() ([]byte, error) { } type RegionCommitmentsUpdateReservationsRequest struct { - // Reservations: List of reservations for the capacity move of VMs with - // accelerators and local ssds. + // Reservations: List of two reservations to transfer GPUs and local SSD + // between. Reservations []*Reservation `json:"reservations,omitempty"` // ForceSendFields is a list of field names (e.g. "Reservations") to @@ -24969,22 +26961,41 @@ func (s *RegionInstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]by // RegionInstanceGroupManagersApplyUpdatesRequest: // InstanceGroupManagers.applyUpdatesToInstances type RegionInstanceGroupManagersApplyUpdatesRequest struct { - // Instances: The list of instances for which we want to apply changes - // on this managed instance group. + // Instances: The list of URLs of one or more instances for which you + // want to apply updates. Each URL can be a full URL or a partial URL, + // such as zones/[ZONE]/instances/[INSTANCE_NAME]. Instances []string `json:"instances,omitempty"` - // MinimalAction: The minimal action that should be perfomed on the - // instances. By default NONE. + // MinimalAction: The minimal action that you want to perform on each + // instance during the update: + // - REPLACE: At minimum, delete the instance and create it again. + // - RESTART: Stop the instance and start it again. + // - REFRESH: Do not stop the instance. + // - NONE: Do not disrupt the instance at all. By default, the minimum + // action is NONE. If your update requires a more disruptive action than + // you set with this flag, the necessary action is performed to execute + // the update. // // Possible values: + // "NONE" + // "REFRESH" // "REPLACE" // "RESTART" MinimalAction string `json:"minimalAction,omitempty"` - // MostDisruptiveAllowedAction: The most disruptive action that allowed - // to be performed on the instances. By default REPLACE. + // MostDisruptiveAllowedAction: The most disruptive action that you want + // to perform on each instance during the update: + // - REPLACE: Delete the instance and create it again. + // - RESTART: Stop the instance and start it again. + // - REFRESH: Do not stop the instance. + // - NONE: Do not disrupt the instance at all. By default, the most + // disruptive allowed action is REPLACE. If your update requires a more + // disruptive action than you set with this flag, the update request + // will fail. // // Possible values: + // "NONE" + // "REFRESH" // "REPLACE" // "RESTART" MostDisruptiveAllowedAction string `json:"mostDisruptiveAllowedAction,omitempty"` @@ -25012,6 +27023,35 @@ func (s *RegionInstanceGroupManagersApplyUpdatesRequest) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RegionInstanceGroupManagersCreateInstancesRequest: +// RegionInstanceGroupManagers.createInstances +type RegionInstanceGroupManagersCreateInstancesRequest struct { + // Instances: [Required] List of specifications of per-instance configs. + Instances []*PerInstanceConfig `json:"instances,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RegionInstanceGroupManagersCreateInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersCreateInstancesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RegionInstanceGroupManagersDeleteInstancesRequest struct { // Instances: The URLs of one or more instances to delete. This can be a // full URL or a partial URL, such as @@ -25747,10 +27787,14 @@ func (s *RequestMirrorPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Reservation: Reservation resource +// Reservation: Represents a reservation resource. A reservation ensures +// that capacity is held in a specific zone even if the reserved VMs are +// not running. For more information, read Reserving zonal resources. +// (== resource_for beta.reservations ==) (== resource_for +// v1.reservations ==) type Reservation struct { - // Commitment: [OutputOnly] Full or partial url for parent commitment - // for reservations which are tied to a commitment. + // Commitment: [Output Only] Full or partial URL to a parent commitment. + // This field displays for reservations that are tied to a commitment. Commitment string `json:"commitment,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -25788,13 +27832,23 @@ type Reservation struct { SpecificReservation *AllocationSpecificSKUReservation `json:"specificReservation,omitempty"` // SpecificReservationRequired: Indicates whether the reservation can be - // consumed by VMs with "any reservation" defined. If the field is set, - // then only VMs that target the reservation by name using - // --reservation-affinity can consume this reservation. + // consumed by VMs with affinity for "any" reservation. If the field is + // set, then only VMs that target the reservation by name can consume + // from this reservation. SpecificReservationRequired bool `json:"specificReservationRequired,omitempty"` - // Zone: Zone in which the reservation resides, must be provided if - // reservation is created with commitment creation. + // Status: [Output Only] The status of the reservation. + // + // Possible values: + // "CREATING" + // "DELETING" + // "INVALID" + // "READY" + // "UPDATING" + Status string `json:"status,omitempty"` + + // Zone: Zone in which the reservation resides. A zone must be provided + // if the reservation is created within a commitment. Zone string `json:"zone,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -25824,8 +27878,8 @@ func (s *Reservation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReservationAffinity: AllocationAffinity is the configuration of -// desired allocation which this instance could take capacity from. +// ReservationAffinity: Specifies the reservations that this instance +// can consume from. type ReservationAffinity struct { // ConsumeReservationType: Specifies the type of reservation from which // this instance can consume resources: ANY_RESERVATION (default), @@ -25839,10 +27893,13 @@ type ReservationAffinity struct { // "UNSPECIFIED" ConsumeReservationType string `json:"consumeReservationType,omitempty"` - // Key: Corresponds to the label key of reservation resource. + // Key: Corresponds to the label key of a reservation resource. To + // target a SPECIFIC_RESERVATION by name, specify + // googleapis.com/reservation-name as the key and specify the name of + // your reservation as its value. Key string `json:"key,omitempty"` - // Values: Corresponds to the label values of reservation resource. + // Values: Corresponds to the label values of a reservation resource. Values []string `json:"values,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -27136,8 +29193,8 @@ type ResourcePolicySnapshotSchedulePolicySnapshotProperties struct { // modified by the setLabels method. Label values may be empty. Labels map[string]string `json:"labels,omitempty"` - // StorageLocations: GCS bucket storage location of the auto snapshot - // (regional or multi-regional). + // StorageLocations: Cloud Storage bucket storage location of the auto + // snapshot (regional or multi-regional). StorageLocations []string `json:"storageLocations,omitempty"` // ForceSendFields is a list of field names (e.g. "GuestFlush") to @@ -27237,32 +29294,19 @@ func (s *ResourcePolicyWeeklyCycleDayOfWeek) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Route: Represents a Route resource. A route specifies how certain -// packets should be handled by the network. Routes are associated with -// instances by tags and the set of routes for a particular instance is -// called its routing table. +// Route: Represents a Route resource. // -// For each packet leaving an instance, the system searches that -// instance's routing table for a single best matching route. Routes -// match packets by destination IP address, preferring smaller or more -// specific ranges over larger ones. If there is a tie, the system -// selects the route with the smallest priority value. If there is still -// a tie, it uses the layer three and four packet headers to select just -// one of the remaining matching routes. The packet is then forwarded as -// specified by the nextHop field of the winning route - either to -// another instance destination, an instance gateway, or a Google -// Compute Engine-operated gateway. -// -// Packets that do not match any route in the sending instance's routing -// table are dropped. (== resource_for beta.routes ==) (== resource_for -// v1.routes ==) +// A route defines a path from VM instances in the VPC network to a +// specific destination. This destination can be inside or outside the +// VPC network. For more information, read the Routes overview. (== +// resource_for beta.routes ==) (== resource_for v1.routes ==) type Route struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional description of this resource. Provide this - // property when you create the resource. + // field when you create the resource. Description string `json:"description,omitempty"` // DestRange: The destination range of outgoing packets that this route @@ -27280,10 +29324,10 @@ type Route struct { // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. Name string `json:"name,omitempty"` // Network: Fully-qualified URL of the network that this route applies @@ -27293,7 +29337,7 @@ type Route struct { // NextHopGateway: The URL to a gateway that should handle matching // packets. You can only specify the internet gateway using a full or // partial valid URL: - // projects//global/gateways/default-internet-gateway + // projects/project/global/gateways/default-internet-gateway NextHopGateway string `json:"nextHopGateway,omitempty"` // NextHopIlb: The URL to a forwarding rule of type @@ -27302,9 +29346,7 @@ type Route struct { // example, the following are all valid URLs: // - // https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule - // - regions/region/forwardingRules/forwardingRule Note that this can - // only be used when the destination_range is a public (non-RFC 1918) IP - // CIDR range. + // - regions/region/forwardingRules/forwardingRule NextHopIlb string `json:"nextHopIlb,omitempty"` // NextHopInstance: The URL to an instance that should handle matching @@ -27338,9 +29380,9 @@ type Route struct { // Priority: The priority of this route. Priority is used to break ties // in cases where there is more than one matching route of equal prefix - // length. In the case of two routes with equal prefix length, the one - // with the lowest-numbered priority value wins. Default value is 1000. - // Valid range is 0 through 65535. + // length. In cases where multiple routes have equal prefix length, the + // one with the lowest-numbered priority value wins. The default value + // is `1000`. The priority value must be from `0` to `65535`, inclusive. Priority int64 `json:"priority,omitempty"` // SelfLink: [Output Only] Server-defined fully-qualified URL for this @@ -27636,7 +29678,10 @@ func (s *RouteListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Router: Router resource. +// Router: Represents a Cloud Router resource. +// +// For more information about Cloud Router, read the the Cloud Router +// overview. type Router struct { // Bgp: BGP information specific to this router. Bgp *RouterBgp `json:"bgp,omitempty"` @@ -27939,6 +29984,16 @@ type RouterBgp struct { // have the same local ASN. Asn int64 `json:"asn,omitempty"` + // KeepaliveInterval: The interval in seconds between BGP keepalive + // messages that are sent to the peer. Hold time is three times the + // interval at which keepalive messages are sent, and the hold time is + // the maximum number of seconds allowed to elapse between successive + // keepalive messages that BGP receives from a peer. BGP will use the + // smaller of either the local hold time value or the peer?s hold time + // value as the hold time for the BGP connection between the two peers. + // If set, this value must be between 1 and 120. The default is 20. + KeepaliveInterval int64 `json:"keepaliveInterval,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdvertiseMode") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -27999,6 +30054,19 @@ type RouterBgpPeer struct { // length, the routes with the lowest priority value win. AdvertisedRoutePriority int64 `json:"advertisedRoutePriority,omitempty"` + // Bfd: BFD configuration for the BGP peering. + Bfd *RouterBgpPeerBfd `json:"bfd,omitempty"` + + // Enable: The status of the BGP peer connection. If set to FALSE, any + // active session with the peer is terminated and all associated routing + // information is removed. If set to TRUE, the peer connection can be + // established with routing information. The default is TRUE. + // + // Possible values: + // "FALSE" + // "TRUE" + Enable string `json:"enable,omitempty"` + // InterfaceName: Name of the interface the BGP peer is associated with. InterfaceName string `json:"interfaceName,omitempty"` @@ -28021,8 +30089,13 @@ type RouterBgpPeer struct { // "MANAGED_BY_USER" ManagementType string `json:"managementType,omitempty"` - // Name: Name of this BGP peer. The name must be 1-63 characters long - // and comply with RFC1035. + // Name: Name of this BGP peer. The name must be 1-63 characters long, + // and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. Name string `json:"name,omitempty"` // PeerAsn: Peer BGP Autonomous System Number (ASN). Each BGP interface @@ -28056,6 +30129,64 @@ func (s *RouterBgpPeer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type RouterBgpPeerBfd struct { + // MinReceiveInterval: The minimum interval, in milliseconds, between + // BFD control packets received from the peer router. The actual value + // is negotiated between the two routers and is equal to the greater of + // this value and the transmit interval of the other router. If set, + // this value must be between 100 and 30000. The default is 300. + MinReceiveInterval int64 `json:"minReceiveInterval,omitempty"` + + // MinTransmitInterval: The minimum interval, in milliseconds, between + // BFD control packets transmitted to the peer router. The actual value + // is negotiated between the two routers and is equal to the greater of + // this value and the corresponding receive interval of the other + // router. If set, this value must be between 100 and 30000. The default + // is 300. + MinTransmitInterval int64 `json:"minTransmitInterval,omitempty"` + + // Multiplier: The number of consecutive BFD packets that must be missed + // before BFD declares that a peer is unavailable. If set, the value + // must be a value between 2 and 16. The default is 3. + Multiplier int64 `json:"multiplier,omitempty"` + + // SessionInitializationMode: The BFD session initialization mode for + // this BGP peer. If set to ACTIVE, the Cloud Router will initiate the + // BFD session for this BGP peer. If set to PASSIVE, the Cloud Router + // will wait for the peer router to initiate the BFD session for this + // BGP peer. If set to DISABLED, BFD is disabled for this BGP peer. The + // default is PASSIVE. + // + // Possible values: + // "ACTIVE" + // "DISABLED" + // "PASSIVE" + SessionInitializationMode string `json:"sessionInitializationMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MinReceiveInterval") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MinReceiveInterval") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RouterBgpPeerBfd) MarshalJSON() ([]byte, error) { + type NoMethod RouterBgpPeerBfd + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type RouterInterface struct { // IpRange: IP address and range of the interface. The IP range must be // in the RFC3927 link-local IP address space. The value must be a @@ -28092,7 +30223,12 @@ type RouterInterface struct { ManagementType string `json:"managementType,omitempty"` // Name: Name of this interface entry. The name must be 1-63 characters - // long and comply with RFC1035. + // long, and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "IpRange") to @@ -28280,6 +30416,11 @@ func (s *RouterListWarningData) MarshalJSON() ([]byte, error) { // that would be used for NAT. GCP would auto-allocate ephemeral IPs if // no external IPs are provided. type RouterNat struct { + // DrainNatIps: A list of URLs of the IP resources to be drained. These + // IPs must be valid static external IPs that have been assigned to the + // NAT. These IPs should be used for updating/patching a NAT only. + DrainNatIps []string `json:"drainNatIps,omitempty"` + // IcmpIdleTimeoutSec: Timeout (in seconds) for ICMP connections. // Defaults to 30s if not set. IcmpIdleTimeoutSec int64 `json:"icmpIdleTimeoutSec,omitempty"` @@ -28353,21 +30494,20 @@ type RouterNat struct { // to 30s if not set. UdpIdleTimeoutSec int64 `json:"udpIdleTimeoutSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "IcmpIdleTimeoutSec") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "DrainNatIps") to + // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IcmpIdleTimeoutSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "DrainNatIps") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -28383,9 +30523,12 @@ type RouterNatLogConfig struct { // default. Enable bool `json:"enable,omitempty"` - // Filter: Specifies the desired filtering of logs on this NAT. If + // Filter: Specify the desired filtering of logs on this NAT. If // unspecified, logs are exported for all connections handled by this - // NAT. + // NAT. This option can take one of the following values: + // - ERRORS_ONLY: Export logs only for connection failures. + // - TRANSLATIONS_ONLY: Export logs only for successful connections. + // - ALL: Export logs for all connections, successful and unsuccessful. // // Possible values: // "ALL" @@ -28504,6 +30647,8 @@ type RouterStatusBgpPeerStatus struct { // AdvertisedRoutes: Routes that were advertised to the remote BGP peer AdvertisedRoutes []*Route `json:"advertisedRoutes,omitempty"` + BfdStatus *BfdStatus `json:"bfdStatus,omitempty"` + // IpAddress: IP address of the local BGP interface. IpAddress string `json:"ipAddress,omitempty"` @@ -28568,6 +30713,14 @@ type RouterStatusNatStatus struct { // ["1.1.1.1", "129.2.16.89"] AutoAllocatedNatIps []string `json:"autoAllocatedNatIps,omitempty"` + // DrainAutoAllocatedNatIps: A list of IPs auto-allocated for NAT that + // are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. + DrainAutoAllocatedNatIps []string `json:"drainAutoAllocatedNatIps,omitempty"` + + // DrainUserAllocatedNatIps: A list of IPs user-allocated for NAT that + // are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. + DrainUserAllocatedNatIps []string `json:"drainUserAllocatedNatIps,omitempty"` + // MinExtraNatIpsNeeded: The number of extra IPs to allocate. This will // be greater than 0 only if user-specified IPs are NOT enough to allow // all configured VMs to use NAT. This value is meaningful only when @@ -28950,7 +31103,109 @@ func (s *SSLHealthCheck) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Scheduling: Sets the scheduling options for an Instance. +// SavedAttachedDisk: An instance-attached disk resource. +type SavedAttachedDisk struct { + // AutoDelete: Specifies whether the disk will be auto-deleted when the + // instance is deleted (but not when the disk is detached from the + // instance). + AutoDelete bool `json:"autoDelete,omitempty"` + + // Boot: Indicates that this is a boot disk. The virtual machine will + // use the first partition of the disk for its root filesystem. + Boot bool `json:"boot,omitempty"` + + // DeviceName: Specifies the name of the disk attached to the source + // instance. + DeviceName string `json:"deviceName,omitempty"` + + // DiskEncryptionKey: The encryption key for the disk. + DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` + + // DiskSizeGb: The size of the disk in base-2 GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` + + // GuestOsFeatures: A list of features to enable on the guest operating + // system. Applicable only for bootable images. Read Enabling guest + // operating system features to see a list of available options. + GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` + + // Index: Specifies zero-based index of the disk that is attached to the + // source instance. + Index int64 `json:"index,omitempty"` + + // Interface: Specifies the disk interface to use for attaching this + // disk, which is either SCSI or NVME. + // + // Possible values: + // "NVME" + // "SCSI" + Interface string `json:"interface,omitempty"` + + // Kind: [Output Only] Type of the resource. Always compute#attachedDisk + // for attached disks. + Kind string `json:"kind,omitempty"` + + // Licenses: [Output Only] Any valid publicly visible licenses. + Licenses []string `json:"licenses,omitempty"` + + // Mode: The mode in which this disk is attached to the source instance, + // either READ_WRITE or READ_ONLY. + // + // Possible values: + // "READ_ONLY" + // "READ_WRITE" + Mode string `json:"mode,omitempty"` + + // Source: Specifies a URL of the disk attached to the source instance. + Source string `json:"source,omitempty"` + + // StorageBytes: [Output Only] A size of the storage used by the disk's + // snapshot by this machine image. + StorageBytes int64 `json:"storageBytes,omitempty,string"` + + // StorageBytesStatus: [Output Only] An indicator whether storageBytes + // is in a stable state or it is being adjusted as a result of shared + // storage reallocation. This status can either be UPDATING, meaning the + // size of the snapshot is being updated, or UP_TO_DATE, meaning the + // size of the snapshot is up-to-date. + // + // Possible values: + // "UPDATING" + // "UP_TO_DATE" + StorageBytesStatus string `json:"storageBytesStatus,omitempty"` + + // Type: Specifies the type of the attached disk, either SCRATCH or + // PERSISTENT. + // + // Possible values: + // "PERSISTENT" + // "SCRATCH" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoDelete") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AutoDelete") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SavedAttachedDisk) MarshalJSON() ([]byte, error) { + type NoMethod SavedAttachedDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Scheduling: Sets the scheduling options for an Instance. NextID: 9 type Scheduling struct { // AutomaticRestart: Specifies whether the instance should be // automatically restarted if it is terminated by Compute Engine (not @@ -28962,7 +31217,9 @@ type Scheduling struct { // restarted if it is terminated by Compute Engine. AutomaticRestart *bool `json:"automaticRestart,omitempty"` - // NodeAffinities: A set of node affinity and anti-affinity. + // NodeAffinities: A set of node affinity and anti-affinity + // configurations. Refer to Configuring node affinity for more + // information. NodeAffinities []*SchedulingNodeAffinity `json:"nodeAffinities,omitempty"` // OnHostMaintenance: Defines the maintenance behavior for this @@ -29011,7 +31268,8 @@ type SchedulingNodeAffinity struct { // Key: Corresponds to the label key of Node resource. Key string `json:"key,omitempty"` - // Operator: Defines the operation of node selection. + // Operator: Defines the operation of node selection. Valid operators + // are IN for affinity and NOT_IN for anti-affinity. // // Possible values: // "IN" @@ -29103,10 +31361,13 @@ func (s *SecurityPoliciesWafConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SecurityPolicy: A security policy is comprised of one or more rules. -// It can also be associated with one or more 'targets'. (== -// resource_for v1.securityPolicies ==) (== resource_for -// beta.securityPolicies ==) +// SecurityPolicy: Represents a Cloud Armor Security Policy +// resource. +// +// Only external backend services that use load balancers can reference +// a Security Policy. For more information, read Cloud Armor Security +// Policy Concepts. (== resource_for v1.securityPolicies ==) (== +// resource_for beta.securityPolicies ==) type SecurityPolicy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -29659,8 +31920,8 @@ func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { // ShieldedInstanceIdentity: A shielded Instance identity entry. type ShieldedInstanceIdentity struct { - // EncryptionKey: An Endorsement Key (EK) issued to the Shielded - // Instance's vTPM. + // EncryptionKey: An Endorsement Key (EK) made by the RSA 2048 algorithm + // issued to the Shielded Instance's vTPM. EncryptionKey *ShieldedInstanceIdentityEntry `json:"encryptionKey,omitempty"` // Kind: [Output Only] Type of the resource. Always @@ -29668,8 +31929,8 @@ type ShieldedInstanceIdentity struct { // entry. Kind string `json:"kind,omitempty"` - // SigningKey: An Attestation Key (AK) issued to the Shielded Instance's - // vTPM. + // SigningKey: An Attestation Key (AK) made by the RSA 2048 algorithm + // issued to the Shielded Instance's vTPM. SigningKey *ShieldedInstanceIdentityEntry `json:"signingKey,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -29941,11 +32202,14 @@ func (s *SignedUrlKey) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Snapshot: A persistent disk snapshot resource. (== resource_for -// beta.snapshots ==) (== resource_for v1.snapshots ==) +// Snapshot: Represents a Persistent Disk Snapshot resource. +// +// You can use snapshots to back up data on a regular interval. For more +// information, read Creating persistent disk snapshots. (== +// resource_for beta.snapshots ==) (== resource_for v1.snapshots ==) type Snapshot struct { // AutoCreated: [Output Only] Set to true if snapshots are automatically - // by applying resource policy on the target disk. + // created by applying resource policy on the target disk. AutoCreated bool `json:"autoCreated,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -29956,7 +32220,7 @@ type Snapshot struct { // property when you create the resource. Description string `json:"description,omitempty"` - // DiskSizeGb: [Output Only] Size of the snapshot, specified in GB. + // DiskSizeGb: [Output Only] Size of the source disk, specified in GB. DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` // Id: [Output Only] The unique identifier for the resource. This @@ -30062,8 +32326,8 @@ type Snapshot struct { // "UP_TO_DATE" StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - // StorageLocations: GCS bucket storage location of the snapshot - // (regional or multi-regional). + // StorageLocations: Cloud Storage bucket storage location of the + // snapshot (regional or multi-regional). StorageLocations []string `json:"storageLocations,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -30247,6 +32511,45 @@ func (s *SnapshotListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SourceDiskEncryptionKey struct { + // DiskEncryptionKey: The customer-supplied encryption key of the source + // disk. Required if the source disk is protected by a customer-supplied + // encryption key. + DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"` + + // SourceDisk: URL of the disk attached to the source instance. This can + // be a full or valid partial URL. For example, the following are valid + // values: + // - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk + // - projects/project/zones/zone/disks/disk + // - zones/zone/disks/disk + SourceDisk string `json:"sourceDisk,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskEncryptionKey") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskEncryptionKey") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SourceDiskEncryptionKey) MarshalJSON() ([]byte, error) { + type NoMethod SourceDiskEncryptionKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SourceInstanceParams: A specification of the parameters to use when // creating the instance template from a source instance. type SourceInstanceParams struct { @@ -30280,10 +32583,104 @@ func (s *SourceInstanceParams) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslCertificate: An SslCertificate resource. This resource provides a -// mechanism to upload an SSL key and certificate to the load balancer -// to serve secure connections from the user. (== resource_for -// beta.sslCertificates ==) (== resource_for v1.sslCertificates ==) +type SourceInstanceProperties struct { + // CanIpForward: Enables instances created based on this machine image + // to send packets with source IP addresses other than their own and + // receive packets with destination IP addresses other than their own. + // If these instances will be used as an IP gateway or it will be set as + // the next-hop in a Route resource, specify true. If unsure, leave this + // set to false. See the Enable IP forwarding documentation for more + // information. + CanIpForward bool `json:"canIpForward,omitempty"` + + // DeletionProtection: Whether the instance created from this machine + // image should be protected against deletion. + DeletionProtection bool `json:"deletionProtection,omitempty"` + + // Description: An optional text description for the instances that are + // created from this machine image. + Description string `json:"description,omitempty"` + + // Disks: An array of disks that are associated with the instances that + // are created from this machine image. + Disks []*SavedAttachedDisk `json:"disks,omitempty"` + + // GuestAccelerators: A list of guest accelerator cards' type and count + // to use for instances created from this machine image. + GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` + + // Labels: Labels to apply to instances that are created from this + // machine image. + Labels map[string]string `json:"labels,omitempty"` + + // MachineType: The machine type to use for instances that are created + // from this machine image. + MachineType string `json:"machineType,omitempty"` + + // Metadata: The metadata key/value pairs to assign to instances that + // are created from this machine image. These pairs can consist of + // custom metadata or predefined keys. See Project and instance metadata + // for more information. + Metadata *Metadata `json:"metadata,omitempty"` + + // MinCpuPlatform: Minimum cpu/platform to be used by instances created + // from this machine image. The instance may be scheduled on the + // specified or newer cpu/platform. Applicable values are the friendly + // names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or + // minCpuPlatform: "Intel Sandy Bridge". For more information, read + // Specifying a Minimum CPU Platform. + MinCpuPlatform string `json:"minCpuPlatform,omitempty"` + + // NetworkInterfaces: An array of network access configurations for this + // interface. + NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + + // Scheduling: Specifies the scheduling options for the instances that + // are created from this machine image. + Scheduling *Scheduling `json:"scheduling,omitempty"` + + // ServiceAccounts: A list of service accounts with specified scopes. + // Access tokens for these service accounts are available to the + // instances that are created from this machine image. Use metadata + // queries to obtain the access tokens for these instances. + ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` + + // Tags: A list of tags to apply to the instances that are created from + // this machine image. The tags identify valid sources or targets for + // network firewalls. The setTags method can modify this list of tags. + // Each tag within the list must comply with RFC1035. + Tags *Tags `json:"tags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanIpForward") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CanIpForward") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SourceInstanceProperties) MarshalJSON() ([]byte, error) { + type NoMethod SourceInstanceProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SslCertificate: Represents an SSL Certificate resource. +// +// This SSL certificate resource also contains a private key. You can +// use SSL keys and certificates to secure connections to a load +// balancer. For more information, read Creating and Using SSL +// Certificates. (== resource_for beta.sslCertificates ==) (== +// resource_for v1.sslCertificates ==) type SslCertificate struct { // Certificate: A local certificate file. The certificate must be in PEM // format. The certificate chain must be no greater than 5 certs long. @@ -31086,11 +33483,12 @@ func (s *SslPoliciesListAvailableFeaturesResponse) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslPolicy: A SSL policy specifies the server-side support for SSL -// features. This can be attached to a TargetHttpsProxy or a -// TargetSslProxy. This affects connections between clients and the -// HTTPS or SSL proxy load balancer. They do not affect the connection -// between the load balancers and the backends. +// SslPolicy: Represents a Cloud Armor Security Policy resource. +// +// Only external backend services used by HTTP or HTTPS load balancers +// can reference a Security Policy. For more information, read read +// Cloud Armor Security Policy Concepts. (== resource_for +// beta.sslPolicies ==) (== resource_for v1.sslPolicies ==) type SslPolicy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -31325,8 +33723,13 @@ func (s *SslPolicyReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Subnetwork: A Subnetwork resource. (== resource_for beta.subnetworks -// ==) (== resource_for v1.subnetworks ==) +// Subnetwork: Represents a Subnetwork resource. +// +// A subnetwork (also known as a subnet) is a logical partition of a +// Virtual Private Cloud network with one primary IP range and zero or +// more secondary IP ranges. For more information, read Virtual Private +// Cloud (VPC) Network. (== resource_for beta.subnetworks ==) (== +// resource_for v1.subnetworks ==) type Subnetwork struct { // AllowSubnetCidrRoutesOverlap: Whether this subnetwork can conflict // with static routes. Setting this to true allows this subnetwork's @@ -31384,6 +33787,10 @@ type Subnetwork struct { // can be set only at resource creation time. IpCidrRange string `json:"ipCidrRange,omitempty"` + // Ipv6CidrRange: [Output Only] The range of internal IPv6 addresses + // that are owned by this subnetwork. + Ipv6CidrRange string `json:"ipv6CidrRange,omitempty"` + // Kind: [Output Only] Type of the resource. Always compute#subnetwork // for Subnetwork resources. Kind string `json:"kind,omitempty"` @@ -31413,6 +33820,29 @@ type Subnetwork struct { // setPrivateIpGoogleAccess. PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` + // PrivateIpv6GoogleAccess: The private IPv6 google access type for the + // VMs in this subnet. This is an expanded field of + // enablePrivateV6Access. If both fields are set, + // privateIpv6GoogleAccess will take priority. + // + // This field can be both set at resource creation time and updated + // using patch. + // + // Possible values: + // "DISABLE_GOOGLE_ACCESS" + // "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE" + // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE" + // "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS" + PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` + + // PrivateIpv6GoogleAccessServiceAccounts: The service accounts can be + // used to selectively turn on Private IPv6 Google Access only on the + // VMs primary service account matching the value. This value only takes + // effect when PrivateIpv6GoogleAccess is + // ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS or + // ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE_FOR_SERVICE_ACCOUNTS. + PrivateIpv6GoogleAccessServiceAccounts []string `json:"privateIpv6GoogleAccessServiceAccounts,omitempty"` + // Purpose: The purpose of the resource. This field can be either // PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with // purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created @@ -31834,9 +34264,10 @@ type SubnetworkLogConfig struct { // reported. FlowSampling float64 `json:"flowSampling,omitempty"` - // Metadata: Can only be specified if VPC flow logging for this - // subnetwork is enabled. Configures whether metadata fields should be - // added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA. + // Metadata: Can only be specified if VPC flow logs for this subnetwork + // is enabled. Configures whether all, none or a subset of metadata + // fields should be added to the reported VPC flow logs. Default is + // INCLUDE_ALL_METADATA. // // Possible values: // "EXCLUDE_ALL_METADATA" @@ -32365,9 +34796,13 @@ func (s *TargetHttpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpProxy: A TargetHttpProxy resource. This resource defines an -// HTTP proxy. (== resource_for beta.targetHttpProxies ==) (== -// resource_for v1.targetHttpProxies ==) +// TargetHttpProxy: Represents a Target HTTP Proxy resource. +// +// A target HTTP proxy is a component of certain types of load +// balancers. Global forwarding rules reference a target HTTP proxy, and +// the target proxy then references a URL map. For more information, +// read Using Target Proxies. (== resource_for beta.targetHttpProxies +// ==) (== resource_for v1.targetHttpProxies ==) type TargetHttpProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -32943,9 +35378,13 @@ func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpsProxy: A TargetHttpsProxy resource. This resource defines -// an HTTPS proxy. (== resource_for beta.targetHttpsProxies ==) (== -// resource_for v1.targetHttpsProxies ==) +// TargetHttpsProxy: Represents a Target HTTPS Proxy resource. +// +// A target HTTPS proxy is a component of certain types of load +// balancers. Global forwarding rules reference a target HTTPS proxy, +// and the target proxy then references a URL map. For more information, +// read Using Target Proxies. (== resource_for beta.targetHttpsProxies +// ==) (== resource_for v1.targetHttpsProxies ==) type TargetHttpsProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -32973,13 +35412,17 @@ type TargetHttpsProxy struct { Name string `json:"name,omitempty"` // QuicOverride: Specifies the QUIC override policy for this - // TargetHttpsProxy resource. This determines whether the load balancer - // will attempt to negotiate QUIC with clients or not. Can specify one - // of NONE, ENABLE, or DISABLE. Specify ENABLE to always enable QUIC, - // Enables QUIC when set to ENABLE, and disables QUIC when set to - // DISABLE. If NONE is specified, uses the QUIC policy with no user - // overrides, which is equivalent to DISABLE. Not specifying this field - // is equivalent to specifying NONE. + // TargetHttpsProxy resource. This setting determines whether the load + // balancer attempts to negotiate QUIC with clients. You can specify + // NONE, ENABLE, or DISABLE. + // - When quic-override is set to NONE, Google manages whether QUIC is + // used. + // - When quic-override is set to ENABLE, the load balancer uses QUIC + // when possible. + // - When quic-override is set to DISABLE, the load balancer doesn't use + // QUIC. + // - If the quic-override flag is not specified, NONE is implied. + // - // // Possible values: // "DISABLE" @@ -33003,7 +35446,7 @@ type TargetHttpsProxy struct { // SslPolicy: URL of SslPolicy resource that will be associated with the // TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource - // will not have any SSL policy configured. + // has no SSL policy configured. SslPolicy string `json:"sslPolicy,omitempty"` // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource @@ -33355,10 +35798,13 @@ func (s *TargetHttpsProxyListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetInstance: A TargetInstance resource. This resource defines an -// endpoint instance that terminates traffic of certain protocols. (== -// resource_for beta.targetInstances ==) (== resource_for -// v1.targetInstances ==) +// TargetInstance: Represents a Target Instance resource. +// +// You can use a target instance to handle traffic for one or more +// forwarding rules, which is ideal for forwarding protocol traffic that +// is managed by a single source. For example, ESP, AH, TCP, or UDP. For +// more information, read Target instances. (== resource_for +// beta.targetInstances ==) (== resource_for v1.targetInstances ==) type TargetInstance struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -33881,10 +36327,13 @@ func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetPool: A TargetPool resource. This resource defines a pool of -// instances, an associated HttpHealthCheck resource, and the fallback -// target pool. (== resource_for beta.targetPools ==) (== resource_for -// v1.targetPools ==) +// TargetPool: Represents a Target Pool resource. +// +// Target pools are used for network TCP/UDP load balancing. A target +// pool references member instances, an associated legacy +// HttpHealthCheck resource, and, optionally, a backup target pool. For +// more information, read Using target pools. (== resource_for +// beta.targetPools ==) (== resource_for v1.targetPools ==) type TargetPool struct { // BackupPool: This field is applicable only when the containing target // pool is serving a forwarding rule as the primary pool, and its @@ -34741,9 +37190,13 @@ func (s *TargetSslProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetSslProxy: A TargetSslProxy resource. This resource defines an -// SSL proxy. (== resource_for beta.targetSslProxies ==) (== -// resource_for v1.targetSslProxies ==) +// TargetSslProxy: Represents a Target SSL Proxy resource. +// +// A target SSL proxy is a component of a SSL Proxy load balancer. +// Global forwarding rules reference a target SSL proxy, and the target +// proxy then references an external backend service. For more +// information, read Using Target Proxies. (== resource_for +// beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==) type TargetSslProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -35039,9 +37492,13 @@ func (s *TargetTcpProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetTcpProxy: A TargetTcpProxy resource. This resource defines a -// TCP proxy. (== resource_for beta.targetTcpProxies ==) (== -// resource_for v1.targetTcpProxies ==) +// TargetTcpProxy: Represents a Target TCP Proxy resource. +// +// A target TCP proxy is a component of a TCP Proxy load balancer. +// Global forwarding rules reference target TCP proxy, and the target +// proxy then references an external backend service. For more +// information, read TCP Proxy Load Balancing Concepts. (== resource_for +// beta.targetTcpProxies ==) (== resource_for v1.targetTcpProxies ==) type TargetTcpProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -35266,7 +37723,10 @@ func (s *TargetTcpProxyListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetVpnGateway: Represents a Target VPN gateway resource. (== +// TargetVpnGateway: Represents a Target VPN Gateway resource. +// +// The target VPN gateway resource represents a Classic Cloud VPN +// gateway. For more information, read the the Cloud VPN Overview. (== // resource_for beta.targetVpnGateways ==) (== resource_for // v1.targetVpnGateways ==) type TargetVpnGateway struct { @@ -35911,9 +38371,15 @@ func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UrlMap: A UrlMap resource. This resource defines the mapping from URL -// to the BackendService resource, based on the "longest-match" of the -// URL's host and path. +// UrlMap: Represents a URL Map resource. +// +// A URL map resource is a component of certain types of load balancers. +// This resource defines mappings from host names and URL paths to +// either a backend service or a backend bucket. +// +// To use this resource, the backend service must have a +// loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or +// INTERNAL_MANAGED For more information, read URL Map Concepts. type UrlMap struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -36979,12 +39445,23 @@ func (s *VmEndpointNatMappings) MarshalJSON() ([]byte, error) { // VmEndpointNatMappingsInterfaceNatMappings: Contain information of Nat // mapping for an interface of this endpoint. type VmEndpointNatMappingsInterfaceNatMappings struct { + // DrainNatIpPortRanges: List of all drain IP:port-range mappings + // assigned to this interface. These ranges are inclusive, that is, both + // the first and the last ports can be used for NAT. Example: + // ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. + DrainNatIpPortRanges []string `json:"drainNatIpPortRanges,omitempty"` + // NatIpPortRanges: A list of all IP:port-range mappings assigned to // this interface. These ranges are inclusive, that is, both the first // and the last ports can be used for NAT. Example: // ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. NatIpPortRanges []string `json:"natIpPortRanges,omitempty"` + // NumTotalDrainNatPorts: Total number of drain ports across all NAT IPs + // allocated to this interface. It equals to the aggregated port number + // in the field drain_nat_ip_port_ranges. + NumTotalDrainNatPorts int64 `json:"numTotalDrainNatPorts,omitempty"` + // NumTotalNatPorts: Total number of ports across all NAT IPs allocated // to this interface. It equals to the aggregated port number in the // field nat_ip_port_ranges. @@ -36998,15 +39475,16 @@ type VmEndpointNatMappingsInterfaceNatMappings struct { // SourceVirtualIp: Primary IP of the VM for this NIC. SourceVirtualIp string `json:"sourceVirtualIp,omitempty"` - // ForceSendFields is a list of field names (e.g. "NatIpPortRanges") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "DrainNatIpPortRanges") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NatIpPortRanges") to + // NullFields is a list of field names (e.g. "DrainNatIpPortRanges") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -37928,8 +40406,10 @@ func (s *VpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnTunnel: VPN tunnel resource. (== resource_for beta.vpnTunnels ==) -// (== resource_for v1.vpnTunnels ==) +// VpnTunnel: Represents a Cloud VPN Tunnel resource. +// +// For more information about VPN, read the the Cloud VPN Overview. (== +// resource_for beta.vpnTunnels ==) (== resource_for v1.vpnTunnels ==) type VpnTunnel struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -38052,6 +40532,17 @@ type VpnTunnel struct { // // - FAILED: Tunnel creation has failed and the tunnel is not ready to // be used. + // - NO_INCOMING_PACKETS: No incoming packets from peer. + // - REJECTED: Tunnel configuration was rejected, can be result of being + // blacklisted. + // - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all + // required resources. + // - STOPPED: Tunnel is stopped due to its Forwarding Rules being + // deleted for Classic VPN tunnels or the project is in frozen state. + // - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, + // probably behind NAT. + // - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed + // for an HA-VPN tunnel. // // Possible values: // "ALLOCATING_RESOURCES" @@ -38065,6 +40556,7 @@ type VpnTunnel struct { // "NO_INCOMING_PACKETS" // "PROVISIONING" // "REJECTED" + // "STOPPED" // "WAITING_FOR_FULL_CONFIG" Status string `json:"status,omitempty"` @@ -38867,8 +41359,12 @@ func (s *XpnResourceId) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Zone: A Zone resource. (== resource_for beta.zones ==) (== -// resource_for v1.zones ==) Next ID: 17 +// Zone: Represents a Zone resource. +// +// A zone is a deployment area. These deployment areas are subsets of a +// region. For example the zone us-east1-a is located in the us-east1 +// region. For more information, read Regions and Zones. (== +// resource_for beta.zones ==) (== resource_for v1.zones ==) type Zone struct { // AvailableCpuPlatforms: [Output Only] Available cpu/platform // selections for the zone. @@ -39179,6 +41675,7 @@ type AcceleratorTypesAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of accelerator types. +// (== suppress_warning http-rest-shadowed ==) func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -39285,6 +41782,7 @@ func (c *AcceleratorTypesAggregatedListCall) Header() http.Header { func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -39346,7 +41844,7 @@ func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Retrieves an aggregated list of accelerator types.", + // "description": "Retrieves an aggregated list of accelerator types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.acceleratorTypes.aggregatedList", // "parameterOrder": [ @@ -39431,7 +41929,8 @@ type AcceleratorTypesGetCall struct { header_ http.Header } -// Get: Returns the specified accelerator type. +// Get: Returns the specified accelerator type. (== suppress_warning +// http-rest-shadowed ==) func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -39477,6 +41976,7 @@ func (c *AcceleratorTypesGetCall) Header() http.Header { func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -39540,7 +42040,7 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator } return ret, nil // { - // "description": "Returns the specified accelerator type.", + // "description": "Returns the specified accelerator type. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.acceleratorTypes.get", // "parameterOrder": [ @@ -39597,7 +42097,7 @@ type AcceleratorTypesListCall struct { } // List: Retrieves a list of accelerator types available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -39705,6 +42205,7 @@ func (c *AcceleratorTypesListCall) Header() http.Header { func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -39767,7 +42268,7 @@ func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*Accelerato } return ret, nil // { - // "description": "Retrieves a list of accelerator types available to the specified project.", + // "description": "Retrieves a list of accelerator types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.acceleratorTypes.list", // "parameterOrder": [ @@ -39858,7 +42359,8 @@ type AddressesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of addresses. +// AggregatedList: Retrieves an aggregated list of addresses. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/aggregatedList func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -39966,6 +42468,7 @@ func (c *AddressesAggregatedListCall) Header() http.Header { func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -40027,7 +42530,7 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address } return ret, nil // { - // "description": "Retrieves an aggregated list of addresses.", + // "description": "Retrieves an aggregated list of addresses. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.addresses.aggregatedList", // "parameterOrder": [ @@ -40111,7 +42614,8 @@ type AddressesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified address resource. +// Delete: Deletes the specified address resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/delete func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -40167,6 +42671,7 @@ func (c *AddressesDeleteCall) Header() http.Header { func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -40227,7 +42732,7 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified address resource.", + // "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.addresses.delete", // "parameterOrder": [ @@ -40288,7 +42793,8 @@ type AddressesGetCall struct { header_ http.Header } -// Get: Returns the specified address resource. +// Get: Returns the specified address resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/get func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -40335,6 +42841,7 @@ func (c *AddressesGetCall) Header() http.Header { func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -40398,7 +42905,7 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { } return ret, nil // { - // "description": "Returns the specified address resource.", + // "description": "Returns the specified address resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.addresses.get", // "parameterOrder": [ @@ -40454,8 +42961,9 @@ type AddressesInsertCall struct { header_ http.Header } -// Insert: Creates an address resource in the specified project using -// the data included in the request. +// Insert: Creates an address resource in the specified project by using +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/insert func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -40511,6 +43019,7 @@ func (c *AddressesInsertCall) Header() http.Header { func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -40575,7 +43084,7 @@ func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates an address resource in the specified project using the data included in the request.", + // "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.addresses.insert", // "parameterOrder": [ @@ -40631,7 +43140,7 @@ type AddressesListCall struct { } // List: Retrieves a list of addresses contained within the specified -// region. +// region. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/list func (r *AddressesService) List(project string, region string) *AddressesListCall { c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -40740,6 +43249,7 @@ func (c *AddressesListCall) Header() http.Header { func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -40802,7 +43312,7 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro } return ret, nil // { - // "description": "Retrieves a list of addresses contained within the specified region.", + // "description": "Retrieves a list of addresses contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.addresses.list", // "parameterOrder": [ @@ -40896,7 +43406,8 @@ type AddressesSetLabelsCall struct { } // SetLabels: Sets the labels on an Address. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *AddressesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *AddressesSetLabelsCall { c := &AddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -40952,6 +43463,7 @@ func (c *AddressesSetLabelsCall) Header() http.Header { func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41017,7 +43529,7 @@ func (c *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.addresses.setLabels", // "parameterOrder": [ @@ -41082,7 +43594,7 @@ type AddressesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall { c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -41119,6 +43631,7 @@ func (c *AddressesTestIamPermissionsCall) Header() http.Header { func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41184,7 +43697,7 @@ func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.addresses.testIamPermissions", // "parameterOrder": [ @@ -41242,7 +43755,8 @@ type AutoscalersAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of autoscalers. +// AggregatedList: Retrieves an aggregated list of autoscalers. (== +// suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -41349,6 +43863,7 @@ func (c *AutoscalersAggregatedListCall) Header() http.Header { func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41410,7 +43925,7 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos } return ret, nil // { - // "description": "Retrieves an aggregated list of autoscalers.", + // "description": "Retrieves an aggregated list of autoscalers. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.autoscalers.aggregatedList", // "parameterOrder": [ @@ -41494,7 +44009,8 @@ type AutoscalersDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified autoscaler. +// Delete: Deletes the specified autoscaler. (== suppress_warning +// http-rest-shadowed ==) func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -41549,6 +44065,7 @@ func (c *AutoscalersDeleteCall) Header() http.Header { func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41609,7 +44126,7 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified autoscaler.", + // "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.autoscalers.delete", // "parameterOrder": [ @@ -41671,7 +44188,8 @@ type AutoscalersGetCall struct { } // Get: Returns the specified autoscaler resource. Gets a list of -// available autoscalers by making a list() request. +// available autoscalers by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -41717,6 +44235,7 @@ func (c *AutoscalersGetCall) Header() http.Header { func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41780,7 +44299,7 @@ func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, erro } return ret, nil // { - // "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.", + // "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.autoscalers.get", // "parameterOrder": [ @@ -41837,7 +44356,7 @@ type AutoscalersInsertCall struct { } // Insert: Creates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -41892,6 +44411,7 @@ func (c *AutoscalersInsertCall) Header() http.Header { func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41956,7 +44476,7 @@ func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", + // "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.autoscalers.insert", // "parameterOrder": [ @@ -42012,7 +44532,7 @@ type AutoscalersListCall struct { } // List: Retrieves a list of autoscalers contained within the specified -// zone. +// zone. (== suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -42120,6 +44640,7 @@ func (c *AutoscalersListCall) Header() http.Header { func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -42182,7 +44703,7 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, } return ret, nil // { - // "description": "Retrieves a list of autoscalers contained within the specified zone.", + // "description": "Retrieves a list of autoscalers contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.autoscalers.list", // "parameterOrder": [ @@ -42276,7 +44797,8 @@ type AutoscalersPatchCall struct { // Patch: Updates an autoscaler in the specified project using the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -42338,6 +44860,7 @@ func (c *AutoscalersPatchCall) Header() http.Header { func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -42402,7 +44925,7 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.autoscalers.patch", // "parameterOrder": [ @@ -42465,7 +44988,7 @@ type AutoscalersTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall { c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -42502,6 +45025,7 @@ func (c *AutoscalersTestIamPermissionsCall) Header() http.Header { func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -42567,7 +45091,7 @@ func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.autoscalers.testIamPermissions", // "parameterOrder": [ @@ -42627,7 +45151,7 @@ type AutoscalersUpdateCall struct { } // Update: Updates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -42689,6 +45213,7 @@ func (c *AutoscalersUpdateCall) Header() http.Header { func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -42753,7 +45278,7 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.autoscalers.update", // "parameterOrder": [ @@ -42815,7 +45340,7 @@ type BackendBucketsAddSignedUrlKeyCall struct { } // AddSignedUrlKey: Adds a key for validating requests with signed URLs -// for this backend bucket. +// for this backend bucket. (== suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) AddSignedUrlKey(project string, backendBucket string, signedurlkey *SignedUrlKey) *BackendBucketsAddSignedUrlKeyCall { c := &BackendBucketsAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -42870,6 +45395,7 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Header() http.Header { func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -42934,7 +45460,7 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Adds a key for validating requests with signed URLs for this backend bucket.", + // "description": "Adds a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendBuckets.addSignedUrlKey", // "parameterOrder": [ @@ -42987,7 +45513,8 @@ type BackendBucketsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified BackendBucket resource. +// Delete: Deletes the specified BackendBucket resource. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -43041,6 +45568,7 @@ func (c *BackendBucketsDeleteCall) Header() http.Header { func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -43100,7 +45628,7 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified BackendBucket resource.", + // "description": "Deletes the specified BackendBucket resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.backendBuckets.delete", // "parameterOrder": [ @@ -43152,7 +45680,8 @@ type BackendBucketsDeleteSignedUrlKeyCall struct { } // DeleteSignedUrlKey: Deletes a key for validating requests with signed -// URLs for this backend bucket. +// URLs for this backend bucket. (== suppress_warning http-rest-shadowed +// ==) func (r *BackendBucketsService) DeleteSignedUrlKey(project string, backendBucket string, keyName string) *BackendBucketsDeleteSignedUrlKeyCall { c := &BackendBucketsDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -43207,6 +45736,7 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Header() http.Header { func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -43266,7 +45796,7 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a key for validating requests with signed URLs for this backend bucket.", + // "description": "Deletes a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendBuckets.deleteSignedUrlKey", // "parameterOrder": [ @@ -43325,7 +45855,8 @@ type BackendBucketsGetCall struct { } // Get: Returns the specified BackendBucket resource. Gets a list of -// available backend buckets by making a list() request. +// available backend buckets by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -43370,6 +45901,7 @@ func (c *BackendBucketsGetCall) Header() http.Header { func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -43432,7 +45964,7 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket } return ret, nil // { - // "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request.", + // "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendBuckets.get", // "parameterOrder": [ @@ -43480,7 +46012,8 @@ type BackendBucketsInsertCall struct { } // Insert: Creates a BackendBucket resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -43534,6 +46067,7 @@ func (c *BackendBucketsInsertCall) Header() http.Header { func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -43597,7 +46131,7 @@ func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", + // "description": "Creates a BackendBucket resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendBuckets.insert", // "parameterOrder": [ @@ -43644,7 +46178,7 @@ type BackendBucketsListCall struct { } // List: Retrieves the list of BackendBucket resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -43751,6 +46285,7 @@ func (c *BackendBucketsListCall) Header() http.Header { func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -43812,7 +46347,7 @@ func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucke } return ret, nil // { - // "description": "Retrieves the list of BackendBucket resources available to the specified project.", + // "description": "Retrieves the list of BackendBucket resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendBuckets.list", // "parameterOrder": [ @@ -43898,7 +46433,8 @@ type BackendBucketsPatchCall struct { // Patch: Updates the specified BackendBucket resource with the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -43953,6 +46489,7 @@ func (c *BackendBucketsPatchCall) Header() http.Header { func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44017,7 +46554,7 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.backendBuckets.patch", // "parameterOrder": [ @@ -44073,7 +46610,7 @@ type BackendBucketsUpdateCall struct { } // Update: Updates the specified BackendBucket resource with the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -44128,6 +46665,7 @@ func (c *BackendBucketsUpdateCall) Header() http.Header { func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44192,7 +46730,7 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified BackendBucket resource with the data included in the request.", + // "description": "Updates the specified BackendBucket resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.backendBuckets.update", // "parameterOrder": [ @@ -44248,7 +46786,7 @@ type BackendServicesAddSignedUrlKeyCall struct { } // AddSignedUrlKey: Adds a key for validating requests with signed URLs -// for this backend service. +// for this backend service. (== suppress_warning http-rest-shadowed ==) func (r *BackendServicesService) AddSignedUrlKey(project string, backendService string, signedurlkey *SignedUrlKey) *BackendServicesAddSignedUrlKeyCall { c := &BackendServicesAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -44303,6 +46841,7 @@ func (c *BackendServicesAddSignedUrlKeyCall) Header() http.Header { func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44367,7 +46906,7 @@ func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Adds a key for validating requests with signed URLs for this backend service.", + // "description": "Adds a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.addSignedUrlKey", // "parameterOrder": [ @@ -44421,7 +46960,8 @@ type BackendServicesAggregatedListCall struct { } // AggregatedList: Retrieves the list of all BackendService resources, -// regional and global, available to the specified project. +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -44528,6 +47068,7 @@ func (c *BackendServicesAggregatedListCall) Header() http.Header { func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44589,7 +47130,7 @@ func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*B } return ret, nil // { - // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendServices.aggregatedList", // "parameterOrder": [ @@ -44672,7 +47213,8 @@ type BackendServicesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified BackendService resource. +// Delete: Deletes the specified BackendService resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/delete func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -44727,6 +47269,7 @@ func (c *BackendServicesDeleteCall) Header() http.Header { func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44786,7 +47329,7 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified BackendService resource.", + // "description": "Deletes the specified BackendService resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.backendServices.delete", // "parameterOrder": [ @@ -44838,7 +47381,8 @@ type BackendServicesDeleteSignedUrlKeyCall struct { } // DeleteSignedUrlKey: Deletes a key for validating requests with signed -// URLs for this backend service. +// URLs for this backend service. (== suppress_warning +// http-rest-shadowed ==) func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendService string, keyName string) *BackendServicesDeleteSignedUrlKeyCall { c := &BackendServicesDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -44893,6 +47437,7 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Header() http.Header { func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44952,7 +47497,7 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a key for validating requests with signed URLs for this backend service.", + // "description": "Deletes a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.deleteSignedUrlKey", // "parameterOrder": [ @@ -45011,7 +47556,8 @@ type BackendServicesGetCall struct { } // Get: Returns the specified BackendService resource. Gets a list of -// available backend services. +// available backend services. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45057,6 +47603,7 @@ func (c *BackendServicesGetCall) Header() http.Header { func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45119,7 +47666,7 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi } return ret, nil // { - // "description": "Returns the specified BackendService resource. Gets a list of available backend services.", + // "description": "Returns the specified BackendService resource. Gets a list of available backend services. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendServices.get", // "parameterOrder": [ @@ -45168,7 +47715,7 @@ type BackendServicesGetHealthCall struct { } // GetHealth: Gets the most recent health check results for this -// BackendService. +// BackendService. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/getHealth func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45205,6 +47752,7 @@ func (c *BackendServicesGetHealthCall) Header() http.Header { func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45269,7 +47817,7 @@ func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*Backen } return ret, nil // { - // "description": "Gets the most recent health check results for this BackendService.", + // "description": "Gets the most recent health check results for this BackendService. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.getHealth", // "parameterOrder": [ @@ -45321,7 +47869,8 @@ type BackendServicesInsertCall struct { // Insert: Creates a BackendService resource in the specified project // using the data included in the request. There are several // restrictions and guidelines to keep in mind when creating a backend -// service. Read Restrictions and Guidelines for more information. +// service. Read Restrictions and Guidelines for more information. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/insert func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45376,6 +47925,7 @@ func (c *BackendServicesInsertCall) Header() http.Header { func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45439,7 +47989,7 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", + // "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.insert", // "parameterOrder": [ @@ -45486,7 +48036,7 @@ type BackendServicesListCall struct { } // List: Retrieves the list of BackendService resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/list func (r *BackendServicesService) List(project string) *BackendServicesListCall { c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45594,6 +48144,7 @@ func (c *BackendServicesListCall) Header() http.Header { func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45655,7 +48206,7 @@ func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServ } return ret, nil // { - // "description": "Retrieves the list of BackendService resources available to the specified project.", + // "description": "Retrieves the list of BackendService resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendServices.list", // "parameterOrder": [ @@ -45744,7 +48295,7 @@ type BackendServicesPatchCall struct { // guidelines to keep in mind when updating a backend service. Read // Restrictions and Guidelines for more information. This method // supports PATCH semantics and uses the JSON merge patch format and -// processing rules. +// processing rules. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/patch func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45800,6 +48351,7 @@ func (c *BackendServicesPatchCall) Header() http.Header { func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45864,7 +48416,7 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.backendServices.patch", // "parameterOrder": [ @@ -45920,7 +48472,7 @@ type BackendServicesSetSecurityPolicyCall struct { } // SetSecurityPolicy: Sets the security policy for the specified backend -// service. +// service. (== suppress_warning http-rest-shadowed ==) func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall { c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -45975,6 +48527,7 @@ func (c *BackendServicesSetSecurityPolicyCall) Header() http.Header { func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46039,7 +48592,7 @@ func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the security policy for the specified backend service.", + // "description": "Sets the security policy for the specified backend service. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.setSecurityPolicy", // "parameterOrder": [ @@ -46094,7 +48647,7 @@ type BackendServicesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall { c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -46130,6 +48683,7 @@ func (c *BackendServicesTestIamPermissionsCall) Header() http.Header { func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46194,7 +48748,7 @@ func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.testIamPermissions", // "parameterOrder": [ @@ -46248,7 +48802,8 @@ type BackendServicesUpdateCall struct { // Update: Updates the specified BackendService resource with the data // included in the request. There are several restrictions and // guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. +// Restrictions and Guidelines for more information. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/update func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -46304,6 +48859,7 @@ func (c *BackendServicesUpdateCall) Header() http.Header { func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46368,7 +48924,7 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + // "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.backendServices.update", // "parameterOrder": [ @@ -46422,7 +48978,8 @@ type DiskTypesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of disk types. +// AggregatedList: Retrieves an aggregated list of disk types. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/aggregatedList func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -46530,6 +49087,7 @@ func (c *DiskTypesAggregatedListCall) Header() http.Header { func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46591,7 +49149,7 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp } return ret, nil // { - // "description": "Retrieves an aggregated list of disk types.", + // "description": "Retrieves an aggregated list of disk types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.diskTypes.aggregatedList", // "parameterOrder": [ @@ -46677,7 +49235,8 @@ type DiskTypesGetCall struct { } // Get: Returns the specified disk type. Gets a list of available disk -// types by making a list() request. +// types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/get func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -46724,6 +49283,7 @@ func (c *DiskTypesGetCall) Header() http.Header { func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46787,7 +49347,7 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { } return ret, nil // { - // "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request.", + // "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.diskTypes.get", // "parameterOrder": [ @@ -46844,7 +49404,7 @@ type DiskTypesListCall struct { } // List: Retrieves a list of disk types available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/list func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -46953,6 +49513,7 @@ func (c *DiskTypesListCall) Header() http.Header { func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47015,7 +49576,7 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, err } return ret, nil // { - // "description": "Retrieves a list of disk types available to the specified project.", + // "description": "Retrieves a list of disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.diskTypes.list", // "parameterOrder": [ @@ -47110,7 +49671,8 @@ type DisksAddResourcePoliciesCall struct { // AddResourcePolicies: Adds existing resource policies to a disk. You // can only add one policy which will be applied to this disk for -// scheduling snapshot creation. +// scheduling snapshot creation. (== suppress_warning http-rest-shadowed +// ==) func (r *DisksService) AddResourcePolicies(project string, zone string, disk string, disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest) *DisksAddResourcePoliciesCall { c := &DisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -47166,6 +49728,7 @@ func (c *DisksAddResourcePoliciesCall) Header() http.Header { func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47231,7 +49794,7 @@ func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", + // "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.addResourcePolicies", // "parameterOrder": [ @@ -47293,7 +49856,8 @@ type DisksAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of persistent disks. +// AggregatedList: Retrieves an aggregated list of persistent disks. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/aggregatedList func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -47401,6 +49965,7 @@ func (c *DisksAggregatedListCall) Header() http.Header { func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47462,7 +50027,7 @@ func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggrega } return ret, nil // { - // "description": "Retrieves an aggregated list of persistent disks.", + // "description": "Retrieves an aggregated list of persistent disks. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.aggregatedList", // "parameterOrder": [ @@ -47548,6 +50113,7 @@ type DisksCreateSnapshotCall struct { } // CreateSnapshot: Creates a snapshot of a specified persistent disk. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/createSnapshot func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -47613,6 +50179,7 @@ func (c *DisksCreateSnapshotCall) Header() http.Header { func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47678,7 +50245,7 @@ func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a snapshot of a specified persistent disk.", + // "description": "Creates a snapshot of a specified persistent disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.createSnapshot", // "parameterOrder": [ @@ -47749,7 +50316,8 @@ type DisksDeleteCall struct { // Delete: Deletes the specified persistent disk. Deleting a disk // removes its data permanently and is irreversible. However, deleting a // disk does not delete any snapshots previously made from the disk. You -// must separately delete snapshots. +// must separately delete snapshots. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/delete func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -47805,6 +50373,7 @@ func (c *DisksDeleteCall) Header() http.Header { func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47865,7 +50434,7 @@ func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.disks.delete", // "parameterOrder": [ @@ -47926,7 +50495,8 @@ type DisksGetCall struct { } // Get: Returns a specified persistent disk. Gets a list of available -// persistent disks by making a list() request. +// persistent disks by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/get func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -47973,6 +50543,7 @@ func (c *DisksGetCall) Header() http.Header { func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48036,7 +50607,7 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { } return ret, nil // { - // "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.", + // "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.get", // "parameterOrder": [ @@ -48094,7 +50665,8 @@ type DisksGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *DisksService) GetIamPolicy(project string, zone string, resource string) *DisksGetIamPolicyCall { c := &DisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48103,6 +50675,13 @@ func (r *DisksService) GetIamPolicy(project string, zone string, resource string return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *DisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *DisksGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -48140,6 +50719,7 @@ func (c *DisksGetIamPolicyCall) Header() http.Header { func (c *DisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48203,7 +50783,7 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.getIamPolicy", // "parameterOrder": [ @@ -48212,6 +50792,12 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -48263,7 +50849,8 @@ type DisksInsertCall struct { // data in the request. You can create a disk with a sourceImage, a // sourceSnapshot, or create an empty 500 GB data disk by omitting all // properties. You can also create a disk that is larger than the -// default size by specifying the sizeGb property. +// default size by specifying the sizeGb property. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/insert func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -48326,6 +50913,7 @@ func (c *DisksInsertCall) Header() http.Header { func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48390,7 +50978,7 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", + // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.insert", // "parameterOrder": [ @@ -48451,7 +51039,7 @@ type DisksListCall struct { } // List: Retrieves a list of persistent disks contained within the -// specified zone. +// specified zone. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/list func (r *DisksService) List(project string, zone string) *DisksListCall { c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -48560,6 +51148,7 @@ func (c *DisksListCall) Header() http.Header { func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48622,7 +51211,7 @@ func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { } return ret, nil // { - // "description": "Retrieves a list of persistent disks contained within the specified zone.", + // "description": "Retrieves a list of persistent disks contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.list", // "parameterOrder": [ @@ -48715,7 +51304,8 @@ type DisksRemoveResourcePoliciesCall struct { header_ http.Header } -// RemoveResourcePolicies: Removes resource policies from a disk. +// RemoveResourcePolicies: Removes resource policies from a disk. (== +// suppress_warning http-rest-shadowed ==) func (r *DisksService) RemoveResourcePolicies(project string, zone string, disk string, disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest) *DisksRemoveResourcePoliciesCall { c := &DisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48771,6 +51361,7 @@ func (c *DisksRemoveResourcePoliciesCall) Header() http.Header { func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48836,7 +51427,7 @@ func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Removes resource policies from a disk.", + // "description": "Removes resource policies from a disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.removeResourcePolicies", // "parameterOrder": [ @@ -48901,7 +51492,7 @@ type DisksResizeCall struct { } // Resize: Resizes the specified persistent disk. You can only increase -// the size of the disk. +// the size of the disk. (== suppress_warning http-rest-shadowed ==) func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48957,6 +51548,7 @@ func (c *DisksResizeCall) Header() http.Header { func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49022,7 +51614,7 @@ func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Resizes the specified persistent disk. You can only increase the size of the disk.", + // "description": "Resizes the specified persistent disk. You can only increase the size of the disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.resize", // "parameterOrder": [ @@ -49087,7 +51679,8 @@ type DisksSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *DisksService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *DisksSetIamPolicyCall { c := &DisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49124,6 +51717,7 @@ func (c *DisksSetIamPolicyCall) Header() http.Header { func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49189,7 +51783,7 @@ func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.setIamPolicy", // "parameterOrder": [ @@ -49249,7 +51843,8 @@ type DisksSetLabelsCall struct { } // SetLabels: Sets the labels on a disk. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49305,6 +51900,7 @@ func (c *DisksSetLabelsCall) Header() http.Header { func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49370,7 +51966,7 @@ func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.setLabels", // "parameterOrder": [ @@ -49435,7 +52031,7 @@ type DisksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall { c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49472,6 +52068,7 @@ func (c *DisksTestIamPermissionsCall) Header() http.Header { func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49537,7 +52134,7 @@ func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPer } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.testIamPermissions", // "parameterOrder": [ @@ -49595,7 +52192,8 @@ type ExternalVpnGatewaysDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified externalVpnGateway. +// Delete: Deletes the specified externalVpnGateway. (== +// suppress_warning http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) Delete(project string, externalVpnGateway string) *ExternalVpnGatewaysDeleteCall { c := &ExternalVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49649,6 +52247,7 @@ func (c *ExternalVpnGatewaysDeleteCall) Header() http.Header { func (c *ExternalVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49708,7 +52307,7 @@ func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Deletes the specified externalVpnGateway.", + // "description": "Deletes the specified externalVpnGateway. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.externalVpnGateways.delete", // "parameterOrder": [ @@ -49761,7 +52360,8 @@ type ExternalVpnGatewaysGetCall struct { } // Get: Returns the specified externalVpnGateway. Get a list of -// available externalVpnGateways by making a list() request. +// available externalVpnGateways by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) Get(project string, externalVpnGateway string) *ExternalVpnGatewaysGetCall { c := &ExternalVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49806,6 +52406,7 @@ func (c *ExternalVpnGatewaysGetCall) Header() http.Header { func (c *ExternalVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49868,7 +52469,7 @@ func (c *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*External } return ret, nil // { - // "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.", + // "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.externalVpnGateways.get", // "parameterOrder": [ @@ -49916,7 +52517,8 @@ type ExternalVpnGatewaysInsertCall struct { } // Insert: Creates a ExternalVpnGateway in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway *ExternalVpnGateway) *ExternalVpnGatewaysInsertCall { c := &ExternalVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49970,6 +52572,7 @@ func (c *ExternalVpnGatewaysInsertCall) Header() http.Header { func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50033,7 +52636,7 @@ func (c *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request.", + // "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.externalVpnGateways.insert", // "parameterOrder": [ @@ -50080,7 +52683,7 @@ type ExternalVpnGatewaysListCall struct { } // List: Retrieves the list of ExternalVpnGateway available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) List(project string) *ExternalVpnGatewaysListCall { c := &ExternalVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50187,6 +52790,7 @@ func (c *ExternalVpnGatewaysListCall) Header() http.Header { func (c *ExternalVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50248,7 +52852,7 @@ func (c *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*Externa } return ret, nil // { - // "description": "Retrieves the list of ExternalVpnGateway available to the specified project.", + // "description": "Retrieves the list of ExternalVpnGateway available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.externalVpnGateways.list", // "parameterOrder": [ @@ -50333,7 +52937,8 @@ type ExternalVpnGatewaysSetLabelsCall struct { } // SetLabels: Sets the labels on an ExternalVpnGateway. To learn more -// about labels, read the Labeling Resources documentation. +// about labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ExternalVpnGatewaysSetLabelsCall { c := &ExternalVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50369,6 +52974,7 @@ func (c *ExternalVpnGatewaysSetLabelsCall) Header() http.Header { func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50433,7 +53039,7 @@ func (c *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.externalVpnGateways.setLabels", // "parameterOrder": [ @@ -50484,7 +53090,7 @@ type ExternalVpnGatewaysTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *ExternalVpnGatewaysService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ExternalVpnGatewaysTestIamPermissionsCall { c := &ExternalVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50520,6 +53126,7 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) Header() http.Header { func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50584,7 +53191,7 @@ func (c *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.externalVpnGateways.testIamPermissions", // "parameterOrder": [ @@ -50634,7 +53241,8 @@ type FirewallsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified firewall. +// Delete: Deletes the specified firewall. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/delete func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -50689,6 +53297,7 @@ func (c *FirewallsDeleteCall) Header() http.Header { func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50748,7 +53357,7 @@ func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified firewall.", + // "description": "Deletes the specified firewall. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.firewalls.delete", // "parameterOrder": [ @@ -50800,7 +53409,8 @@ type FirewallsGetCall struct { header_ http.Header } -// Get: Returns the specified firewall. +// Get: Returns the specified firewall. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/get func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -50846,6 +53456,7 @@ func (c *FirewallsGetCall) Header() http.Header { func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50908,7 +53519,7 @@ func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { } return ret, nil // { - // "description": "Returns the specified firewall.", + // "description": "Returns the specified firewall. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.firewalls.get", // "parameterOrder": [ @@ -50956,7 +53567,8 @@ type FirewallsInsertCall struct { } // Insert: Creates a firewall rule in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/insert func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -51011,6 +53623,7 @@ func (c *FirewallsInsertCall) Header() http.Header { func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51074,7 +53687,7 @@ func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates a firewall rule in the specified project using the data included in the request.", + // "description": "Creates a firewall rule in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.firewalls.insert", // "parameterOrder": [ @@ -51121,7 +53734,7 @@ type FirewallsListCall struct { } // List: Retrieves the list of firewall rules available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/list func (r *FirewallsService) List(project string) *FirewallsListCall { c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -51229,6 +53842,7 @@ func (c *FirewallsListCall) Header() http.Header { func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51290,7 +53904,7 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err } return ret, nil // { - // "description": "Retrieves the list of firewall rules available to the specified project.", + // "description": "Retrieves the list of firewall rules available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.firewalls.list", // "parameterOrder": [ @@ -51376,7 +53990,8 @@ type FirewallsPatchCall struct { // Patch: Updates the specified firewall rule with the data included in // the request. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/patch func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -51432,6 +54047,7 @@ func (c *FirewallsPatchCall) Header() http.Header { func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51496,7 +54112,7 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.firewalls.patch", // "parameterOrder": [ @@ -51552,7 +54168,7 @@ type FirewallsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall { c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -51588,6 +54204,7 @@ func (c *FirewallsTestIamPermissionsCall) Header() http.Header { func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51652,7 +54269,7 @@ func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.firewalls.testIamPermissions", // "parameterOrder": [ @@ -51704,9 +54321,9 @@ type FirewallsUpdateCall struct { } // Update: Updates the specified firewall rule with the data included in -// the request. The PUT method can only update the following fields of -// firewall rule: allowed, description, sourceRanges, sourceTags, -// targetTags. +// the request. Note that all fields will be updated if using PUT, even +// fields that are not specified. To update individual fields, please +// use PATCH instead. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/update func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -51762,6 +54379,7 @@ func (c *FirewallsUpdateCall) Header() http.Header { func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51826,7 +54444,7 @@ func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Updates the specified firewall rule with the data included in the request. The PUT method can only update the following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", + // "description": "Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.firewalls.update", // "parameterOrder": [ @@ -51880,7 +54498,8 @@ type ForwardingRulesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of forwarding rules. +// AggregatedList: Retrieves an aggregated list of forwarding rules. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/aggregatedList func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -51988,6 +54607,7 @@ func (c *ForwardingRulesAggregatedListCall) Header() http.Header { func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52049,7 +54669,7 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F } return ret, nil // { - // "description": "Retrieves an aggregated list of forwarding rules.", + // "description": "Retrieves an aggregated list of forwarding rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.forwardingRules.aggregatedList", // "parameterOrder": [ @@ -52133,7 +54753,8 @@ type ForwardingRulesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified ForwardingRule resource. +// Delete: Deletes the specified ForwardingRule resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/delete func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -52189,6 +54810,7 @@ func (c *ForwardingRulesDeleteCall) Header() http.Header { func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52249,7 +54871,7 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified ForwardingRule resource.", + // "description": "Deletes the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.forwardingRules.delete", // "parameterOrder": [ @@ -52310,7 +54932,8 @@ type ForwardingRulesGetCall struct { header_ http.Header } -// Get: Returns the specified ForwardingRule resource. +// Get: Returns the specified ForwardingRule resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/get func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -52357,6 +54980,7 @@ func (c *ForwardingRulesGetCall) Header() http.Header { func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52420,7 +55044,7 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu } return ret, nil // { - // "description": "Returns the specified ForwardingRule resource.", + // "description": "Returns the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.forwardingRules.get", // "parameterOrder": [ @@ -52477,7 +55101,8 @@ type ForwardingRulesInsertCall struct { } // Insert: Creates a ForwardingRule resource in the specified project -// and region using the data included in the request. +// and region using the data included in the request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/insert func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -52533,6 +55158,7 @@ func (c *ForwardingRulesInsertCall) Header() http.Header { func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52597,7 +55223,7 @@ func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.forwardingRules.insert", // "parameterOrder": [ @@ -52653,7 +55279,8 @@ type ForwardingRulesListCall struct { } // List: Retrieves a list of ForwardingRule resources available to the -// specified project and region. +// specified project and region. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/list func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -52762,6 +55389,7 @@ func (c *ForwardingRulesListCall) Header() http.Header { func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52824,7 +55452,7 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR } return ret, nil // { - // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", + // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.forwardingRules.list", // "parameterOrder": [ @@ -52920,7 +55548,8 @@ type ForwardingRulesPatchCall struct { // Patch: Updates the specified forwarding rule with the data included // in the request. This method supports PATCH semantics and uses the // JSON merge patch format and processing rules. Currently, you can only -// patch the network_tier field. +// patch the network_tier field. (== suppress_warning http-rest-shadowed +// ==) func (r *ForwardingRulesService) Patch(project string, region string, forwardingRule string, forwardingrule *ForwardingRule) *ForwardingRulesPatchCall { c := &ForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -52976,6 +55605,7 @@ func (c *ForwardingRulesPatchCall) Header() http.Header { func (c *ForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53041,7 +55671,7 @@ func (c *ForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.forwardingRules.patch", // "parameterOrder": [ @@ -53106,7 +55736,8 @@ type ForwardingRulesSetLabelsCall struct { } // SetLabels: Sets the labels on the specified resource. To learn more -// about labels, read the Labeling Resources documentation. +// about labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *ForwardingRulesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *ForwardingRulesSetLabelsCall { c := &ForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -53162,6 +55793,7 @@ func (c *ForwardingRulesSetLabelsCall) Header() http.Header { func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53227,7 +55859,7 @@ func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.forwardingRules.setLabels", // "parameterOrder": [ @@ -53292,7 +55924,8 @@ type ForwardingRulesSetTargetCall struct { } // SetTarget: Changes target URL for forwarding rule. The new target -// should be of the same type as the old target. +// should be of the same type as the old target. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/setTarget func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -53349,6 +55982,7 @@ func (c *ForwardingRulesSetTargetCall) Header() http.Header { func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53414,7 +56048,7 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", + // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.forwardingRules.setTarget", // "parameterOrder": [ @@ -53479,7 +56113,7 @@ type ForwardingRulesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall { c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -53516,6 +56150,7 @@ func (c *ForwardingRulesTestIamPermissionsCall) Header() http.Header { func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53581,7 +56216,7 @@ func (c *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.forwardingRules.testIamPermissions", // "parameterOrder": [ @@ -53639,7 +56274,8 @@ type GlobalAddressesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified address resource. +// Delete: Deletes the specified address resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/delete func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall { c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -53694,6 +56330,7 @@ func (c *GlobalAddressesDeleteCall) Header() http.Header { func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53753,7 +56390,7 @@ func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified address resource.", + // "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.globalAddresses.delete", // "parameterOrder": [ @@ -53806,7 +56443,8 @@ type GlobalAddressesGetCall struct { } // Get: Returns the specified address resource. Gets a list of available -// addresses by making a list() request. +// addresses by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/get func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -53852,6 +56490,7 @@ func (c *GlobalAddressesGetCall) Header() http.Header { func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53914,7 +56553,7 @@ func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, err } return ret, nil // { - // "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request.", + // "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalAddresses.get", // "parameterOrder": [ @@ -53961,8 +56600,9 @@ type GlobalAddressesInsertCall struct { header_ http.Header } -// Insert: Creates an address resource in the specified project using -// the data included in the request. +// Insert: Creates an address resource in the specified project by using +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/insert func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall { c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -54017,6 +56657,7 @@ func (c *GlobalAddressesInsertCall) Header() http.Header { func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54080,7 +56721,7 @@ func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates an address resource in the specified project using the data included in the request.", + // "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalAddresses.insert", // "parameterOrder": [ @@ -54126,7 +56767,8 @@ type GlobalAddressesListCall struct { header_ http.Header } -// List: Retrieves a list of global addresses. +// List: Retrieves a list of global addresses. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/list func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -54234,6 +56876,7 @@ func (c *GlobalAddressesListCall) Header() http.Header { func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54295,7 +56938,7 @@ func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList } return ret, nil // { - // "description": "Retrieves a list of global addresses.", + // "description": "Retrieves a list of global addresses. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalAddresses.list", // "parameterOrder": [ @@ -54380,7 +57023,8 @@ type GlobalAddressesSetLabelsCall struct { } // SetLabels: Sets the labels on a GlobalAddress. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *GlobalAddressesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalAddressesSetLabelsCall { c := &GlobalAddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -54416,6 +57060,7 @@ func (c *GlobalAddressesSetLabelsCall) Header() http.Header { func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54480,7 +57125,7 @@ func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalAddresses.setLabels", // "parameterOrder": [ @@ -54531,7 +57176,7 @@ type GlobalAddressesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall { c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -54567,6 +57212,7 @@ func (c *GlobalAddressesTestIamPermissionsCall) Header() http.Header { func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54631,7 +57277,7 @@ func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalAddresses.testIamPermissions", // "parameterOrder": [ @@ -54681,7 +57327,8 @@ type GlobalForwardingRulesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified GlobalForwardingRule resource. +// Delete: Deletes the specified GlobalForwardingRule resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/delete func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -54736,6 +57383,7 @@ func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54795,7 +57443,7 @@ func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified GlobalForwardingRule resource.", + // "description": "Deletes the specified GlobalForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.globalForwardingRules.delete", // "parameterOrder": [ @@ -54848,7 +57496,8 @@ type GlobalForwardingRulesGetCall struct { } // Get: Returns the specified GlobalForwardingRule resource. Gets a list -// of available forwarding rules by making a list() request. +// of available forwarding rules by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/get func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -54894,6 +57543,7 @@ func (c *GlobalForwardingRulesGetCall) Header() http.Header { func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54956,7 +57606,7 @@ func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*Forwar } return ret, nil // { - // "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.", + // "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalForwardingRules.get", // "parameterOrder": [ @@ -55004,7 +57654,8 @@ type GlobalForwardingRulesInsertCall struct { } // Insert: Creates a GlobalForwardingRule resource in the specified -// project using the data included in the request. +// project using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/insert func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall { c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -55059,6 +57710,7 @@ func (c *GlobalForwardingRulesInsertCall) Header() http.Header { func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55122,7 +57774,7 @@ func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", + // "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalForwardingRules.insert", // "parameterOrder": [ @@ -55169,7 +57821,7 @@ type GlobalForwardingRulesListCall struct { } // List: Retrieves a list of GlobalForwardingRule resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/list func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -55277,6 +57929,7 @@ func (c *GlobalForwardingRulesListCall) Header() http.Header { func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55338,7 +57991,7 @@ func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*Forwa } return ret, nil // { - // "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", + // "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalForwardingRules.list", // "parameterOrder": [ @@ -55425,7 +58078,8 @@ type GlobalForwardingRulesPatchCall struct { // Patch: Updates the specified forwarding rule with the data included // in the request. This method supports PATCH semantics and uses the // JSON merge patch format and processing rules. Currently, you can only -// patch the network_tier field. +// patch the network_tier field. (== suppress_warning http-rest-shadowed +// ==) func (r *GlobalForwardingRulesService) Patch(project string, forwardingRule string, forwardingrule *ForwardingRule) *GlobalForwardingRulesPatchCall { c := &GlobalForwardingRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -55480,6 +58134,7 @@ func (c *GlobalForwardingRulesPatchCall) Header() http.Header { func (c *GlobalForwardingRulesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55544,7 +58199,7 @@ func (c *GlobalForwardingRulesPatchCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.", + // "description": "Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.globalForwardingRules.patch", // "parameterOrder": [ @@ -55600,7 +58255,8 @@ type GlobalForwardingRulesSetLabelsCall struct { } // SetLabels: Sets the labels on the specified resource. To learn more -// about labels, read the Labeling Resources documentation. +// about labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *GlobalForwardingRulesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalForwardingRulesSetLabelsCall { c := &GlobalForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -55636,6 +58292,7 @@ func (c *GlobalForwardingRulesSetLabelsCall) Header() http.Header { func (c *GlobalForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55700,7 +58357,7 @@ func (c *GlobalForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalForwardingRules.setLabels", // "parameterOrder": [ @@ -55751,7 +58408,8 @@ type GlobalForwardingRulesSetTargetCall struct { } // SetTarget: Changes target URL for the GlobalForwardingRule resource. -// The new target should be of the same type as the old target. +// The new target should be of the same type as the old target. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/setTarget func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall { c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -55807,6 +58465,7 @@ func (c *GlobalForwardingRulesSetTargetCall) Header() http.Header { func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55871,7 +58530,7 @@ func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", + // "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalForwardingRules.setTarget", // "parameterOrder": [ @@ -55927,7 +58586,7 @@ type GlobalForwardingRulesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *GlobalForwardingRulesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalForwardingRulesTestIamPermissionsCall { c := &GlobalForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -55963,6 +58622,7 @@ func (c *GlobalForwardingRulesTestIamPermissionsCall) Header() http.Header { func (c *GlobalForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56027,7 +58687,7 @@ func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalForwardingRules.testIamPermissions", // "parameterOrder": [ @@ -56077,7 +58737,8 @@ type GlobalOperationsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of all operations. +// AggregatedList: Retrieves an aggregated list of all operations. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/aggregatedList func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -56185,6 +58846,7 @@ func (c *GlobalOperationsAggregatedListCall) Header() http.Header { func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56246,7 +58908,7 @@ func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Retrieves an aggregated list of all operations.", + // "description": "Retrieves an aggregated list of all operations. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalOperations.aggregatedList", // "parameterOrder": [ @@ -56329,7 +58991,8 @@ type GlobalOperationsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified Operations resource. +// Delete: Deletes the specified Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/delete func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall { c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -56365,6 +59028,7 @@ func (c *GlobalOperationsDeleteCall) Header() http.Header { func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56399,7 +59063,7 @@ func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deletes the specified Operations resource.", + // "description": "Deletes the specified Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.globalOperations.delete", // "parameterOrder": [ @@ -56444,7 +59108,8 @@ type GlobalOperationsGetCall struct { } // Get: Retrieves the specified Operations resource. Gets a list of -// operations by making a list() request. +// operations by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/get func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -56490,6 +59155,7 @@ func (c *GlobalOperationsGetCall) Header() http.Header { func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56552,7 +59218,7 @@ func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request.", + // "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalOperations.get", // "parameterOrder": [ @@ -56600,7 +59266,7 @@ type GlobalOperationsListCall struct { } // List: Retrieves a list of Operation resources contained within the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/list func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -56708,6 +59374,7 @@ func (c *GlobalOperationsListCall) Header() http.Header { func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56769,7 +59436,7 @@ func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified project.", + // "description": "Retrieves a list of Operation resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalOperations.list", // "parameterOrder": [ @@ -56853,7 +59520,8 @@ type HealthChecksAggregatedListCall struct { } // AggregatedList: Retrieves the list of all HealthCheck resources, -// regional and global, available to the specified project. +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) AggregatedList(project string) *HealthChecksAggregatedListCall { c := &HealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -56960,6 +59628,7 @@ func (c *HealthChecksAggregatedListCall) Header() http.Header { func (c *HealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57021,7 +59690,7 @@ func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Heal } return ret, nil // { - // "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.healthChecks.aggregatedList", // "parameterOrder": [ @@ -57104,7 +59773,8 @@ type HealthChecksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified HealthCheck resource. +// Delete: Deletes the specified HealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -57158,6 +59828,7 @@ func (c *HealthChecksDeleteCall) Header() http.Header { func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57217,7 +59888,7 @@ func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Deletes the specified HealthCheck resource.", + // "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.healthChecks.delete", // "parameterOrder": [ @@ -57270,7 +59941,8 @@ type HealthChecksGetCall struct { } // Get: Returns the specified HealthCheck resource. Gets a list of -// available health checks by making a list() request. +// available health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -57315,6 +59987,7 @@ func (c *HealthChecksGetCall) Header() http.Header { func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57377,7 +60050,7 @@ func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, er } return ret, nil // { - // "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", + // "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.healthChecks.get", // "parameterOrder": [ @@ -57425,7 +60098,8 @@ type HealthChecksInsertCall struct { } // Insert: Creates a HealthCheck resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) *HealthChecksInsertCall { c := &HealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -57479,6 +60153,7 @@ func (c *HealthChecksInsertCall) Header() http.Header { func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57542,7 +60217,7 @@ func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + // "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.healthChecks.insert", // "parameterOrder": [ @@ -57589,7 +60264,7 @@ type HealthChecksListCall struct { } // List: Retrieves the list of HealthCheck resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) List(project string) *HealthChecksListCall { c := &HealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -57696,6 +60371,7 @@ func (c *HealthChecksListCall) Header() http.Header { func (c *HealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57757,7 +60433,7 @@ func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckLis } return ret, nil // { - // "description": "Retrieves the list of HealthCheck resources available to the specified project.", + // "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.healthChecks.list", // "parameterOrder": [ @@ -57844,6 +60520,7 @@ type HealthChecksPatchCall struct { // Patch: Updates a HealthCheck resource in the specified project using // the data included in the request. This method supports PATCH // semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall { c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -57898,6 +60575,7 @@ func (c *HealthChecksPatchCall) Header() http.Header { func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57962,7 +60640,7 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.healthChecks.patch", // "parameterOrder": [ @@ -58018,7 +60696,7 @@ type HealthChecksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HealthChecksTestIamPermissionsCall { c := &HealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -58054,6 +60732,7 @@ func (c *HealthChecksTestIamPermissionsCall) Header() http.Header { func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58118,7 +60797,7 @@ func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.healthChecks.testIamPermissions", // "parameterOrder": [ @@ -58170,7 +60849,8 @@ type HealthChecksUpdateCall struct { } // Update: Updates a HealthCheck resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HealthChecksService) Update(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksUpdateCall { c := &HealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -58225,6 +60905,7 @@ func (c *HealthChecksUpdateCall) Header() http.Header { func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58289,7 +60970,7 @@ func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.healthChecks.update", // "parameterOrder": [ @@ -58343,7 +61024,8 @@ type HttpHealthChecksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified HttpHealthCheck resource. +// Delete: Deletes the specified HttpHealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/delete func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall { c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -58398,6 +61080,7 @@ func (c *HttpHealthChecksDeleteCall) Header() http.Header { func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58457,7 +61140,7 @@ func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified HttpHealthCheck resource.", + // "description": "Deletes the specified HttpHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.httpHealthChecks.delete", // "parameterOrder": [ @@ -58510,7 +61193,8 @@ type HttpHealthChecksGetCall struct { } // Get: Returns the specified HttpHealthCheck resource. Gets a list of -// available HTTP health checks by making a list() request. +// available HTTP health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/get func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -58556,6 +61240,7 @@ func (c *HttpHealthChecksGetCall) Header() http.Header { func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58618,7 +61303,7 @@ func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthC } return ret, nil // { - // "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request.", + // "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpHealthChecks.get", // "parameterOrder": [ @@ -58666,7 +61351,8 @@ type HttpHealthChecksInsertCall struct { } // Insert: Creates a HttpHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/insert func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall { c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -58721,6 +61407,7 @@ func (c *HttpHealthChecksInsertCall) Header() http.Header { func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58784,7 +61471,7 @@ func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", + // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.httpHealthChecks.insert", // "parameterOrder": [ @@ -58831,7 +61518,7 @@ type HttpHealthChecksListCall struct { } // List: Retrieves the list of HttpHealthCheck resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/list func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall { c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -58939,6 +61626,7 @@ func (c *HttpHealthChecksListCall) Header() http.Header { func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59000,7 +61688,7 @@ func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealth } return ret, nil // { - // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", + // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpHealthChecks.list", // "parameterOrder": [ @@ -59087,6 +61775,7 @@ type HttpHealthChecksPatchCall struct { // Patch: Updates a HttpHealthCheck resource in the specified project // using the data included in the request. This method supports PATCH // semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/patch func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -59142,6 +61831,7 @@ func (c *HttpHealthChecksPatchCall) Header() http.Header { func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59206,7 +61896,7 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.httpHealthChecks.patch", // "parameterOrder": [ @@ -59262,7 +61952,7 @@ type HttpHealthChecksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *HttpHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpHealthChecksTestIamPermissionsCall { c := &HttpHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -59298,6 +61988,7 @@ func (c *HttpHealthChecksTestIamPermissionsCall) Header() http.Header { func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59362,7 +62053,7 @@ func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.httpHealthChecks.testIamPermissions", // "parameterOrder": [ @@ -59414,7 +62105,8 @@ type HttpHealthChecksUpdateCall struct { } // Update: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/update func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall { c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -59470,6 +62162,7 @@ func (c *HttpHealthChecksUpdateCall) Header() http.Header { func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59534,7 +62227,7 @@ func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", + // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.httpHealthChecks.update", // "parameterOrder": [ @@ -59588,7 +62281,8 @@ type HttpsHealthChecksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified HttpsHealthCheck resource. +// Delete: Deletes the specified HttpsHealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall { c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -59642,6 +62336,7 @@ func (c *HttpsHealthChecksDeleteCall) Header() http.Header { func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59701,7 +62396,7 @@ func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified HttpsHealthCheck resource.", + // "description": "Deletes the specified HttpsHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.httpsHealthChecks.delete", // "parameterOrder": [ @@ -59754,7 +62449,8 @@ type HttpsHealthChecksGetCall struct { } // Get: Returns the specified HttpsHealthCheck resource. Gets a list of -// available HTTPS health checks by making a list() request. +// available HTTPS health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall { c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -59799,6 +62495,7 @@ func (c *HttpsHealthChecksGetCall) Header() http.Header { func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59861,7 +62558,7 @@ func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealt } return ret, nil // { - // "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request.", + // "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpsHealthChecks.get", // "parameterOrder": [ @@ -59909,7 +62606,8 @@ type HttpsHealthChecksInsertCall struct { } // Insert: Creates a HttpsHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall { c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -59963,6 +62661,7 @@ func (c *HttpsHealthChecksInsertCall) Header() http.Header { func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60026,7 +62725,7 @@ func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", + // "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.httpsHealthChecks.insert", // "parameterOrder": [ @@ -60073,7 +62772,7 @@ type HttpsHealthChecksListCall struct { } // List: Retrieves the list of HttpsHealthCheck resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall { c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -60180,6 +62879,7 @@ func (c *HttpsHealthChecksListCall) Header() http.Header { func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60241,7 +62941,7 @@ func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHeal } return ret, nil // { - // "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", + // "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpsHealthChecks.list", // "parameterOrder": [ @@ -60328,6 +63028,7 @@ type HttpsHealthChecksPatchCall struct { // Patch: Updates a HttpsHealthCheck resource in the specified project // using the data included in the request. This method supports PATCH // semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall { c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -60382,6 +63083,7 @@ func (c *HttpsHealthChecksPatchCall) Header() http.Header { func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60446,7 +63148,7 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.httpsHealthChecks.patch", // "parameterOrder": [ @@ -60502,7 +63204,7 @@ type HttpsHealthChecksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpsHealthChecksTestIamPermissionsCall { c := &HttpsHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -60538,6 +63240,7 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) Header() http.Header { func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60602,7 +63305,7 @@ func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.httpsHealthChecks.testIamPermissions", // "parameterOrder": [ @@ -60654,7 +63357,8 @@ type HttpsHealthChecksUpdateCall struct { } // Update: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall { c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -60709,6 +63413,7 @@ func (c *HttpsHealthChecksUpdateCall) Header() http.Header { func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60773,7 +63478,7 @@ func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", + // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.httpsHealthChecks.update", // "parameterOrder": [ @@ -60827,7 +63532,8 @@ type ImagesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified image. +// Delete: Deletes the specified image. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/delete func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -60882,6 +63588,7 @@ func (c *ImagesDeleteCall) Header() http.Header { func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60941,7 +63648,7 @@ func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified image.", + // "description": "Deletes the specified image. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.images.delete", // "parameterOrder": [ @@ -60996,7 +63703,7 @@ type ImagesDeprecateCall struct { // Deprecate: Sets the deprecation status of an image. // // If an empty request body is given, clears the deprecation status -// instead. +// instead. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/deprecate func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall { c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -61052,6 +63759,7 @@ func (c *ImagesDeprecateCall) Header() http.Header { func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61116,7 +63824,7 @@ func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", + // "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.deprecate", // "parameterOrder": [ @@ -61172,7 +63880,7 @@ type ImagesGetCall struct { } // Get: Returns the specified image. Gets a list of available images by -// making a list() request. +// making a list() request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/get func (r *ImagesService) Get(project string, image string) *ImagesGetCall { c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -61218,6 +63926,7 @@ func (c *ImagesGetCall) Header() http.Header { func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61280,7 +63989,7 @@ func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) { } return ret, nil // { - // "description": "Returns the specified image. Gets a list of available images by making a list() request.", + // "description": "Returns the specified image. Gets a list of available images by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.get", // "parameterOrder": [ @@ -61329,7 +64038,8 @@ type ImagesGetFromFamilyCall struct { } // GetFromFamily: Returns the latest image that is part of an image -// family and is not deprecated. +// family and is not deprecated. (== suppress_warning http-rest-shadowed +// ==) func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall { c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -61374,6 +64084,7 @@ func (c *ImagesGetFromFamilyCall) Header() http.Header { func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61436,7 +64147,7 @@ func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, erro } return ret, nil // { - // "description": "Returns the latest image that is part of an image family and is not deprecated.", + // "description": "Returns the latest image that is part of an image family and is not deprecated. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.getFromFamily", // "parameterOrder": [ @@ -61485,7 +64196,8 @@ type ImagesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *ImagesService) GetIamPolicy(project string, resource string) *ImagesGetIamPolicyCall { c := &ImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -61493,6 +64205,13 @@ func (r *ImagesService) GetIamPolicy(project string, resource string) *ImagesGet return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *ImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ImagesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -61530,6 +64249,7 @@ func (c *ImagesGetIamPolicyCall) Header() http.Header { func (c *ImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61592,7 +64312,7 @@ func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.getIamPolicy", // "parameterOrder": [ @@ -61600,6 +64320,12 @@ func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -61640,7 +64366,7 @@ type ImagesInsertCall struct { } // Insert: Creates an image in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/insert func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -61702,6 +64428,7 @@ func (c *ImagesInsertCall) Header() http.Header { func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61765,7 +64492,7 @@ func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates an image in the specified project using the data included in the request.", + // "description": "Creates an image in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.insert", // "parameterOrder": [ @@ -61825,7 +64552,7 @@ type ImagesListCall struct { // projects, including publicly-available images, like Debian 8. If you // want to get a list of publicly-available images, use this method to // make a request to the respective image project, such as debian-cloud -// or windows-cloud. +// or windows-cloud. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/list func (r *ImagesService) List(project string) *ImagesListCall { c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -61933,6 +64660,7 @@ func (c *ImagesListCall) Header() http.Header { func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61994,7 +64722,7 @@ func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { } return ret, nil // { - // "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + // "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.list", // "parameterOrder": [ @@ -62079,7 +64807,8 @@ type ImagesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *ImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *ImagesSetIamPolicyCall { c := &ImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62115,6 +64844,7 @@ func (c *ImagesSetIamPolicyCall) Header() http.Header { func (c *ImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62179,7 +64909,7 @@ func (c *ImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.setIamPolicy", // "parameterOrder": [ @@ -62230,7 +64960,8 @@ type ImagesSetLabelsCall struct { } // SetLabels: Sets the labels on an image. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall { c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62266,6 +64997,7 @@ func (c *ImagesSetLabelsCall) Header() http.Header { func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62330,7 +65062,7 @@ func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.setLabels", // "parameterOrder": [ @@ -62381,7 +65113,7 @@ type ImagesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall { c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62417,6 +65149,7 @@ func (c *ImagesTestIamPermissionsCall) Header() http.Header { func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62481,7 +65214,7 @@ func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.testIamPermissions", // "parameterOrder": [ @@ -62549,7 +65282,7 @@ type InstanceGroupManagersAbandonInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall { c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62605,6 +65338,7 @@ func (c *InstanceGroupManagersAbandonInstancesCall) Header() http.Header { func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62670,7 +65404,7 @@ func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.abandonInstances", // "parameterOrder": [ @@ -62731,7 +65465,7 @@ type InstanceGroupManagersAggregatedListCall struct { } // AggregatedList: Retrieves the list of managed instance groups and -// groups them by zone. +// groups them by zone. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall { c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62838,6 +65572,7 @@ func (c *InstanceGroupManagersAggregatedListCall) Header() http.Header { func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62900,7 +65635,7 @@ func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Retrieves the list of managed instance groups and groups them by zone.", + // "description": "Retrieves the list of managed instance groups and groups them by zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroupManagers.aggregatedList", // "parameterOrder": [ @@ -62987,7 +65722,8 @@ type InstanceGroupManagersApplyUpdatesToInstancesCall struct { // ApplyUpdatesToInstances: Apply changes to selected instances on the // managed instance group. This method can be used to apply new -// overrides and/or new versions. +// overrides and/or new versions. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) ApplyUpdatesToInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersapplyupdatesrequest *InstanceGroupManagersApplyUpdatesRequest) *InstanceGroupManagersApplyUpdatesToInstancesCall { c := &InstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63024,6 +65760,7 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63089,7 +65826,7 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.", + // "description": "Apply changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.applyUpdatesToInstances", // "parameterOrder": [ @@ -63133,6 +65870,195 @@ func (c *InstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi. } +// method id "compute.instanceGroupManagers.createInstances": + +type InstanceGroupManagersCreateInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CreateInstances: Creates instances with per-instance configs in this +// managed instance group. Instances are created using the current +// instance template. The create instances operation is marked DONE if +// the createInstances request is successful. The underlying actions +// take additional time. You must separately verify the status of the +// creating or actions with the listmanagedinstances method. (== +// suppress_warning http-rest-shadowed ==) +func (r *InstanceGroupManagersService) CreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagerscreateinstancesrequest *InstanceGroupManagersCreateInstancesRequest) *InstanceGroupManagersCreateInstancesCall { + c := &InstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagerscreateinstancesrequest = instancegroupmanagerscreateinstancesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstanceGroupManagersCreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersCreateInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstanceGroupManagersCreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersCreateInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstanceGroupManagersCreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersCreateInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstanceGroupManagersCreateInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerscreateinstancesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instanceGroupManagers.createInstances" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.instanceGroupManagers.createInstances", + // "parameterOrder": [ + // "project", + // "zone", + // "instanceGroupManager" + // ], + // "parameters": { + // "instanceGroupManager": { + // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances", + // "request": { + // "$ref": "InstanceGroupManagersCreateInstancesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.instanceGroupManagers.delete": type InstanceGroupManagersDeleteCall struct { @@ -63148,7 +66074,7 @@ type InstanceGroupManagersDeleteCall struct { // Delete: Deletes the specified managed instance group and all of the // instances in that group. Note that the instance group must not belong // to a backend service. Read Deleting an instance group for more -// information. +// information. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63203,6 +66129,7 @@ func (c *InstanceGroupManagersDeleteCall) Header() http.Header { func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63263,7 +66190,7 @@ func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", + // "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instanceGroupManagers.delete", // "parameterOrder": [ @@ -63337,7 +66264,7 @@ type InstanceGroupManagersDeleteInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall { c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63393,6 +66320,7 @@ func (c *InstanceGroupManagersDeleteInstancesCall) Header() http.Header { func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63458,7 +66386,7 @@ func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.deleteInstances", // "parameterOrder": [ @@ -63522,7 +66450,7 @@ type InstanceGroupManagersGetCall struct { // Get: Returns all of the details about the specified managed instance // group. Gets a list of available managed instance groups by making a -// list() request. +// list() request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63568,6 +66496,7 @@ func (c *InstanceGroupManagersGetCall) Header() http.Header { func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63631,7 +66560,7 @@ func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*Instan } return ret, nil // { - // "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.", + // "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroupManagers.get", // "parameterOrder": [ @@ -63695,6 +66624,7 @@ type InstanceGroupManagersInsertCall struct { // // A managed instance group can have up to 1000 VM instances per group. // Please contact Cloud Support if you need an increase in this limit. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall { c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63749,6 +66679,7 @@ func (c *InstanceGroupManagersInsertCall) Header() http.Header { func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63813,7 +66744,7 @@ func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", + // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.insert", // "parameterOrder": [ @@ -63868,7 +66799,8 @@ type InstanceGroupManagersListCall struct { } // List: Retrieves a list of managed instance groups that are contained -// within the specified project and zone. +// within the specified project and zone. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall { c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63976,6 +66908,7 @@ func (c *InstanceGroupManagersListCall) Header() http.Header { func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64038,7 +66971,7 @@ func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*Insta } return ret, nil // { - // "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", + // "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroupManagers.list", // "parameterOrder": [ @@ -64134,7 +67067,8 @@ type InstanceGroupManagersListManagedInstancesCall struct { // indicates the action that the managed instance group is performing on // the instance. For example, if the group is still creating an // instance, the currentAction is CREATING. If a previous action failed, -// the list displays the errors for that failed action. +// the list displays the errors for that failed action. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall { c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -64233,6 +67167,7 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Header() http.Header { func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64295,7 +67230,7 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", + // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.listManagedInstances", // "parameterOrder": [ @@ -64400,7 +67335,7 @@ type InstanceGroupManagersPatchCall struct { // process of being patched. You must separately verify the status of // the individual instances with the listManagedInstances method. This // method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. +// and processing rules. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Patch(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersPatchCall { c := &InstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -64456,6 +67391,7 @@ func (c *InstanceGroupManagersPatchCall) Header() http.Header { func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64521,7 +67457,7 @@ func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instanceGroupManagers.patch", // "parameterOrder": [ @@ -64597,7 +67533,7 @@ type InstanceGroupManagersRecreateInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall { c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -64653,6 +67589,7 @@ func (c *InstanceGroupManagersRecreateInstancesCall) Header() http.Header { func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64718,7 +67655,7 @@ func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.recreateInstances", // "parameterOrder": [ @@ -64800,6 +67737,7 @@ type InstanceGroupManagersResizeCall struct { // If the group is part of a backend service that has enabled connection // draining, it can take up to 60 seconds after the connection draining // duration has elapsed before the VM instance is removed or deleted. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall { c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -64855,6 +67793,7 @@ func (c *InstanceGroupManagersResizeCall) Header() http.Header { func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64915,7 +67854,7 @@ func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.resize", // "parameterOrder": [ @@ -64997,6 +67936,7 @@ type InstanceGroupManagersResizeAdvancedCall struct { // If the group is part of a backend service that has enabled connection // draining, it can take up to 60 seconds after the connection draining // duration has elapsed before the VM instance is removed or deleted. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) ResizeAdvanced(project string, zone string, instanceGroupManager string, instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest) *InstanceGroupManagersResizeAdvancedCall { c := &InstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65052,6 +67992,7 @@ func (c *InstanceGroupManagersResizeAdvancedCall) Header() http.Header { func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65117,7 +68058,7 @@ func (c *InstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.resizeAdvanced", // "parameterOrder": [ @@ -65180,7 +68121,8 @@ type InstanceGroupManagersSetAutoHealingPoliciesCall struct { } // SetAutoHealingPolicies: Modifies the autohealing policies. -// [Deprecated] This method is deprecated. Please use Patch instead. +// [Deprecated] This method is deprecated. Please use Patch instead. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall { c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65236,6 +68178,7 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header { func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65301,7 +68244,7 @@ func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.", + // "description": "Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.setAutoHealingPolicies", // "parameterOrder": [ @@ -65365,7 +68308,8 @@ type InstanceGroupManagersSetInstanceTemplateCall struct { // SetInstanceTemplate: Specifies the instance template to use when // creating new instances in this group. The templates for existing -// instances in the group do not change unless you recreate them. +// instances in the group do not change unless you recreate them. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall { c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65421,6 +68365,7 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65486,7 +68431,7 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", + // "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.setInstanceTemplate", // "parameterOrder": [ @@ -65554,7 +68499,8 @@ type InstanceGroupManagersSetTargetPoolsCall struct { // group. This operation is marked DONE when you make the request even // if the instances have not yet been added to their target pools. The // change might take some time to apply to all of the instances in the -// group depending on the size of the group. +// group depending on the size of the group. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall { c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65610,6 +68556,7 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header { func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65675,7 +68622,7 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", + // "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.setTargetPools", // "parameterOrder": [ @@ -65738,7 +68685,7 @@ type InstanceGroupManagersTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupManagersTestIamPermissionsCall { c := &InstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65775,6 +68722,7 @@ func (c *InstanceGroupManagersTestIamPermissionsCall) Header() http.Header { func (c *InstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65840,7 +68788,7 @@ func (c *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.testIamPermissions", // "parameterOrder": [ @@ -65904,7 +68852,8 @@ type InstanceGroupManagersUpdateCall struct { // you specify in the request. This operation is marked as DONE when the // group is updated even if the instances in the group have not yet been // updated. You must separately verify the status of the individual -// instances with the listManagedInstances method. +// instances with the listManagedInstances method. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) Update(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersUpdateCall { c := &InstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65960,6 +68909,7 @@ func (c *InstanceGroupManagersUpdateCall) Header() http.Header { func (c *InstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66025,7 +68975,7 @@ func (c *InstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.instanceGroupManagers.update", // "parameterOrder": [ @@ -66089,7 +69039,8 @@ type InstanceGroupsAddInstancesCall struct { // AddInstances: Adds a list of instances to the specified instance // group. All of the instances in the instance group must be in the same -// network/subnetwork. Read Adding instances for more information. +// network/subnetwork. Read Adding instances for more information. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66145,6 +69096,7 @@ func (c *InstanceGroupsAddInstancesCall) Header() http.Header { func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66210,7 +69162,7 @@ func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", + // "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.addInstances", // "parameterOrder": [ @@ -66271,7 +69223,7 @@ type InstanceGroupsAggregatedListCall struct { } // AggregatedList: Retrieves the list of instance groups and sorts them -// by zone. +// by zone. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66378,6 +69330,7 @@ func (c *InstanceGroupsAggregatedListCall) Header() http.Header { func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66439,7 +69392,7 @@ func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*In } return ret, nil // { - // "description": "Retrieves the list of instance groups and sorts them by zone.", + // "description": "Retrieves the list of instance groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroups.aggregatedList", // "parameterOrder": [ @@ -66526,7 +69479,7 @@ type InstanceGroupsDeleteCall struct { // Delete: Deletes the specified instance group. The instances in the // group are not deleted. Note that instance group must not belong to a // backend service. Read Deleting an instance group for more -// information. +// information. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66581,6 +69534,7 @@ func (c *InstanceGroupsDeleteCall) Header() http.Header { func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66641,7 +69595,7 @@ func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", + // "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instanceGroups.delete", // "parameterOrder": [ @@ -66701,7 +69655,8 @@ type InstanceGroupsGetCall struct { } // Get: Returns the specified instance group. Gets a list of available -// instance groups by making a list() request. +// instance groups by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66747,6 +69702,7 @@ func (c *InstanceGroupsGetCall) Header() http.Header { func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66810,7 +69766,7 @@ func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup } return ret, nil // { - // "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request.", + // "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroups.get", // "parameterOrder": [ @@ -66865,7 +69821,8 @@ type InstanceGroupsInsertCall struct { } // Insert: Creates an instance group in the specified project using the -// parameters that are included in the request. +// parameters that are included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66920,6 +69877,7 @@ func (c *InstanceGroupsInsertCall) Header() http.Header { func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66984,7 +69942,7 @@ func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates an instance group in the specified project using the parameters that are included in the request.", + // "description": "Creates an instance group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.insert", // "parameterOrder": [ @@ -67039,7 +69997,8 @@ type InstanceGroupsListCall struct { } // List: Retrieves the list of instance groups that are located in the -// specified project and zone. +// specified project and zone. (== suppress_warning http-rest-shadowed +// ==) func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -67147,6 +70106,7 @@ func (c *InstanceGroupsListCall) Header() http.Header { func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67209,7 +70169,7 @@ func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGrou } return ret, nil // { - // "description": "Retrieves the list of instance groups that are located in the specified project and zone.", + // "description": "Retrieves the list of instance groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroups.list", // "parameterOrder": [ @@ -67302,6 +70262,7 @@ type InstanceGroupsListInstancesCall struct { } // ListInstances: Lists the instances in the specified instance group. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -67401,6 +70362,7 @@ func (c *InstanceGroupsListInstancesCall) Header() http.Header { func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67466,7 +70428,7 @@ func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*Ins } return ret, nil // { - // "description": "Lists the instances in the specified instance group.", + // "description": "Lists the instances in the specified instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.listInstances", // "parameterOrder": [ @@ -67573,7 +70535,8 @@ type InstanceGroupsRemoveInstancesCall struct { // // If the group is part of a backend service that has enabled connection // draining, it can take up to 60 seconds after the connection draining -// duration before the VM instance is removed or deleted. +// duration before the VM instance is removed or deleted. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -67629,6 +70592,7 @@ func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67694,7 +70658,7 @@ func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", + // "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.removeInstances", // "parameterOrder": [ @@ -67757,6 +70721,7 @@ type InstanceGroupsSetNamedPortsCall struct { } // SetNamedPorts: Sets the named ports for the specified instance group. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -67812,6 +70777,7 @@ func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67877,7 +70843,7 @@ func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Sets the named ports for the specified instance group.", + // "description": "Sets the named ports for the specified instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.setNamedPorts", // "parameterOrder": [ @@ -67940,7 +70906,7 @@ type InstanceGroupsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupsTestIamPermissionsCall { c := &InstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -67977,6 +70943,7 @@ func (c *InstanceGroupsTestIamPermissionsCall) Header() http.Header { func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68042,7 +71009,7 @@ func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.testIamPermissions", // "parameterOrder": [ @@ -68103,6 +71070,7 @@ type InstanceTemplatesDeleteCall struct { // Delete: Deletes the specified instance template. Deleting an instance // template is permanent and cannot be undone. It is not possible to // delete templates that are already in use by a managed instance group. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -68157,6 +71125,7 @@ func (c *InstanceTemplatesDeleteCall) Header() http.Header { func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68216,7 +71185,7 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", + // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instanceTemplates.delete", // "parameterOrder": [ @@ -68269,7 +71238,8 @@ type InstanceTemplatesGetCall struct { } // Get: Returns the specified instance template. Gets a list of -// available instance templates by making a list() request. +// available instance templates by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/get func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -68315,6 +71285,7 @@ func (c *InstanceTemplatesGetCall) Header() http.Header { func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68377,7 +71348,7 @@ func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTe } return ret, nil // { - // "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request.", + // "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceTemplates.get", // "parameterOrder": [ @@ -68426,7 +71397,8 @@ type InstanceTemplatesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) *InstanceTemplatesGetIamPolicyCall { c := &InstanceTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68434,6 +71406,13 @@ func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InstanceTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstanceTemplatesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -68471,6 +71450,7 @@ func (c *InstanceTemplatesGetIamPolicyCall) Header() http.Header { func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68533,7 +71513,7 @@ func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceTemplates.getIamPolicy", // "parameterOrder": [ @@ -68541,6 +71521,12 @@ func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -68584,7 +71570,8 @@ type InstanceTemplatesInsertCall struct { // the data that is included in the request. If you are creating a new // template to update an existing instance group, your new instance // template must use the same network or, if applicable, the same -// subnetwork as the original template. +// subnetwork as the original template. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/insert func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -68639,6 +71626,7 @@ func (c *InstanceTemplatesInsertCall) Header() http.Header { func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68702,7 +71690,7 @@ func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", + // "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceTemplates.insert", // "parameterOrder": [ @@ -68749,7 +71737,8 @@ type InstanceTemplatesListCall struct { } // List: Retrieves a list of instance templates that are contained -// within the specified project. +// within the specified project. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/list func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -68857,6 +71846,7 @@ func (c *InstanceTemplatesListCall) Header() http.Header { func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68918,7 +71908,7 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT } return ret, nil // { - // "description": "Retrieves a list of instance templates that are contained within the specified project.", + // "description": "Retrieves a list of instance templates that are contained within the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceTemplates.list", // "parameterOrder": [ @@ -69003,7 +71993,8 @@ type InstanceTemplatesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceTemplatesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InstanceTemplatesSetIamPolicyCall { c := &InstanceTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -69039,6 +72030,7 @@ func (c *InstanceTemplatesSetIamPolicyCall) Header() http.Header { func (c *InstanceTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69103,7 +72095,7 @@ func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceTemplates.setIamPolicy", // "parameterOrder": [ @@ -69154,7 +72146,7 @@ type InstanceTemplatesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall { c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -69190,6 +72182,7 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header { func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69254,7 +72247,7 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceTemplates.testIamPermissions", // "parameterOrder": [ @@ -69307,7 +72300,7 @@ type InstancesAddAccessConfigCall struct { } // AddAccessConfig: Adds an access config to an instance's network -// interface. +// interface. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/addAccessConfig func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -69365,6 +72358,7 @@ func (c *InstancesAddAccessConfigCall) Header() http.Header { func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69430,7 +72424,7 @@ func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Adds an access config to an instance's network interface.", + // "description": "Adds an access config to an instance's network interface. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.addAccessConfig", // "parameterOrder": [ @@ -69500,7 +72494,8 @@ type InstancesAggregatedListCall struct { } // AggregatedList: Retrieves aggregated list of all of the instances in -// your project across all regions and zones. +// your project across all regions and zones. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/aggregatedList func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -69608,6 +72603,7 @@ func (c *InstancesAggregatedListCall) Header() http.Header { func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69669,7 +72665,7 @@ func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Instanc } return ret, nil // { - // "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones.", + // "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.aggregatedList", // "parameterOrder": [ @@ -69757,7 +72753,8 @@ type InstancesAttachDiskCall struct { // AttachDisk: Attaches an existing Disk resource to an instance. You // must first create the disk before you can attach it. It is not // possible to create and attach a disk at the same time. For more -// information, read Adding a persistent disk to your instance. +// information, read Adding a persistent disk to your instance. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/attachDisk func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -69822,6 +72819,7 @@ func (c *InstancesAttachDiskCall) Header() http.Header { func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69887,7 +72885,7 @@ func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", + // "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.attachDisk", // "parameterOrder": [ @@ -69956,7 +72954,8 @@ type InstancesDeleteCall struct { } // Delete: Deletes the specified Instance resource. For more -// information, see Stopping or Deleting an Instance. +// information, see Stopping or Deleting an Instance. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/delete func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -70012,6 +73011,7 @@ func (c *InstancesDeleteCall) Header() http.Header { func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70072,7 +73072,7 @@ func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", + // "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instances.delete", // "parameterOrder": [ @@ -70133,7 +73133,7 @@ type InstancesDeleteAccessConfigCall struct { } // DeleteAccessConfig: Deletes an access config from an instance's -// network interface. +// network interface. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/deleteAccessConfig func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -70191,6 +73191,7 @@ func (c *InstancesDeleteAccessConfigCall) Header() http.Header { func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70251,7 +73252,7 @@ func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes an access config from an instance's network interface.", + // "description": "Deletes an access config from an instance's network interface. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.deleteAccessConfig", // "parameterOrder": [ @@ -70325,7 +73326,8 @@ type InstancesDetachDiskCall struct { header_ http.Header } -// DetachDisk: Detaches a disk from an instance. +// DetachDisk: Detaches a disk from an instance. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/detachDisk func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -70382,6 +73384,7 @@ func (c *InstancesDetachDiskCall) Header() http.Header { func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70442,7 +73445,7 @@ func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Detaches a disk from an instance.", + // "description": "Detaches a disk from an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.detachDisk", // "parameterOrder": [ @@ -70511,7 +73514,8 @@ type InstancesGetCall struct { } // Get: Returns the specified Instance resource. Gets a list of -// available instances by making a list() request. +// available instances by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/get func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -70558,6 +73562,7 @@ func (c *InstancesGetCall) Header() http.Header { func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70621,7 +73626,7 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { } return ret, nil // { - // "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request.", + // "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.get", // "parameterOrder": [ @@ -70678,7 +73683,8 @@ type InstancesGetGuestAttributesCall struct { header_ http.Header } -// GetGuestAttributes: Returns the specified guest attributes entry. +// GetGuestAttributes: Returns the specified guest attributes entry. (== +// suppress_warning http-rest-shadowed ==) func (r *InstancesService) GetGuestAttributes(project string, zone string, instance string) *InstancesGetGuestAttributesCall { c := &InstancesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -70738,6 +73744,7 @@ func (c *InstancesGetGuestAttributesCall) Header() http.Header { func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70801,7 +73808,7 @@ func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*Gue } return ret, nil // { - // "description": "Returns the specified guest attributes entry.", + // "description": "Returns the specified guest attributes entry. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getGuestAttributes", // "parameterOrder": [ @@ -70869,7 +73876,8 @@ type InstancesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) GetIamPolicy(project string, zone string, resource string) *InstancesGetIamPolicyCall { c := &InstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -70878,6 +73886,13 @@ func (r *InstancesService) GetIamPolicy(project string, zone string, resource st return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstancesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -70915,6 +73930,7 @@ func (c *InstancesGetIamPolicyCall) Header() http.Header { func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70978,7 +73994,7 @@ func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getIamPolicy", // "parameterOrder": [ @@ -70987,6 +74003,12 @@ func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -71036,7 +74058,7 @@ type InstancesGetSerialPortOutputCall struct { } // GetSerialPortOutput: Returns the last 1 MB of serial port output from -// the specified instance. +// the specified instance. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/getSerialPortOutput func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -71101,6 +74123,7 @@ func (c *InstancesGetSerialPortOutputCall) Header() http.Header { func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71164,7 +74187,7 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se } return ret, nil // { - // "description": "Returns the last 1 MB of serial port output from the specified instance.", + // "description": "Returns the last 1 MB of serial port output from the specified instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getSerialPortOutput", // "parameterOrder": [ @@ -71237,7 +74260,7 @@ type InstancesGetShieldedInstanceIdentityCall struct { } // GetShieldedInstanceIdentity: Returns the Shielded Instance Identity -// of an instance +// of an instance (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone string, instance string) *InstancesGetShieldedInstanceIdentityCall { c := &InstancesGetShieldedInstanceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71283,6 +74306,7 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Header() http.Header { func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71346,7 +74370,7 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Returns the Shielded Instance Identity of an instance", + // "description": "Returns the Shielded Instance Identity of an instance (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getShieldedInstanceIdentity", // "parameterOrder": [ @@ -71404,7 +74428,7 @@ type InstancesGetShieldedVmIdentityCall struct { } // GetShieldedVmIdentity: Returns the Shielded VM Identity of an -// instance +// instance (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) GetShieldedVmIdentity(project string, zone string, instance string) *InstancesGetShieldedVmIdentityCall { c := &InstancesGetShieldedVmIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71450,6 +74474,7 @@ func (c *InstancesGetShieldedVmIdentityCall) Header() http.Header { func (c *InstancesGetShieldedVmIdentityCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71513,7 +74538,7 @@ func (c *InstancesGetShieldedVmIdentityCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns the Shielded VM Identity of an instance", + // "description": "Returns the Shielded VM Identity of an instance (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getShieldedVmIdentity", // "parameterOrder": [ @@ -71570,7 +74595,8 @@ type InstancesInsertCall struct { } // Insert: Creates an instance resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/insert func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -71614,6 +74640,20 @@ func (c *InstancesInsertCall) SourceInstanceTemplate(sourceInstanceTemplate stri return c } +// SourceMachineImage sets the optional parameter "sourceMachineImage": +// Specifies instance machine to create the instance. +// +// This field is optional. It can be a full or partial URL. For example, +// the following are all valid URLs to an instance template: +// - +// https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage +// - projects/project/global/global/machineImages/machineImage +// - global/machineImages/machineImage +func (c *InstancesInsertCall) SourceMachineImage(sourceMachineImage string) *InstancesInsertCall { + c.urlParams_.Set("sourceMachineImage", sourceMachineImage) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -71641,6 +74681,7 @@ func (c *InstancesInsertCall) Header() http.Header { func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71705,7 +74746,7 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates an instance resource in the specified project using the data included in the request.", + // "description": "Creates an instance resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.insert", // "parameterOrder": [ @@ -71730,6 +74771,11 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro // "location": "query", // "type": "string" // }, + // "sourceMachineImage": { + // "description": "Specifies instance machine to create the instance.\n\nThis field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: \n- https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage \n- projects/project/global/global/machineImages/machineImage \n- global/machineImages/machineImage", + // "location": "query", + // "type": "string" + // }, // "zone": { // "description": "The name of the zone for this request.", // "location": "path", @@ -71766,7 +74812,7 @@ type InstancesListCall struct { } // List: Retrieves the list of instances contained within the specified -// zone. +// zone. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/list func (r *InstancesService) List(project string, zone string) *InstancesListCall { c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -71875,6 +74921,7 @@ func (c *InstancesListCall) Header() http.Header { func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71937,7 +74984,7 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, err } return ret, nil // { - // "description": "Retrieves the list of instances contained within the specified zone.", + // "description": "Retrieves the list of instances contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.list", // "parameterOrder": [ @@ -72032,7 +75079,8 @@ type InstancesListReferrersCall struct { // ListReferrers: Retrieves the list of referrers to instances contained // within the specified zone. For more information, read Viewing -// Referrers to VM Instances. +// Referrers to VM Instances. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall { c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72141,6 +75189,7 @@ func (c *InstancesListReferrersCall) Header() http.Header { func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72204,7 +75253,7 @@ func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*Instance } return ret, nil // { - // "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.", + // "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.listReferrers", // "parameterOrder": [ @@ -72306,7 +75355,7 @@ type InstancesResetCall struct { // Reset: Performs a reset on the instance. This is a hard reset the VM // does not do a graceful shutdown. For more information, see Resetting -// an instance. +// an instance. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/reset func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -72362,6 +75411,7 @@ func (c *InstancesResetCall) Header() http.Header { func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72422,7 +75472,7 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", + // "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.reset", // "parameterOrder": [ @@ -72484,7 +75534,8 @@ type InstancesResumeCall struct { } // Resume: Resumes an instance that was suspended using the -// instances().suspend method. +// instances().suspend method. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) Resume(project string, zone string, instance string, instancesresumerequest *InstancesResumeRequest) *InstancesResumeCall { c := &InstancesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72540,6 +75591,7 @@ func (c *InstancesResumeCall) Header() http.Header { func (c *InstancesResumeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72605,7 +75657,7 @@ func (c *InstancesResumeCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Resumes an instance that was suspended using the instances().suspend method.", + // "description": "Resumes an instance that was suspended using the instances().suspend method. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.resume", // "parameterOrder": [ @@ -72668,7 +75720,8 @@ type InstancesSetDeletionProtectionCall struct { header_ http.Header } -// SetDeletionProtection: Sets deletion protection on the instance. +// SetDeletionProtection: Sets deletion protection on the instance. (== +// suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetDeletionProtection(project string, zone string, resource string) *InstancesSetDeletionProtectionCall { c := &InstancesSetDeletionProtectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72730,6 +75783,7 @@ func (c *InstancesSetDeletionProtectionCall) Header() http.Header { func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72790,7 +75844,7 @@ func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Sets deletion protection on the instance.", + // "description": "Sets deletion protection on the instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setDeletionProtection", // "parameterOrder": [ @@ -72857,7 +75911,7 @@ type InstancesSetDiskAutoDeleteCall struct { } // SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to -// an instance. +// an instance. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setDiskAutoDelete func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -72915,6 +75969,7 @@ func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72975,7 +76030,7 @@ func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Sets the auto-delete flag for a disk attached to an instance.", + // "description": "Sets the auto-delete flag for a disk attached to an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setDiskAutoDelete", // "parameterOrder": [ @@ -73052,7 +76107,8 @@ type InstancesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstancesSetIamPolicyCall { c := &InstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73089,6 +76145,7 @@ func (c *InstancesSetIamPolicyCall) Header() http.Header { func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73154,7 +76211,7 @@ func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setIamPolicy", // "parameterOrder": [ @@ -73214,7 +76271,8 @@ type InstancesSetLabelsCall struct { } // SetLabels: Sets labels on an instance. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73270,6 +76328,7 @@ func (c *InstancesSetLabelsCall) Header() http.Header { func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73335,7 +76394,7 @@ func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setLabels", // "parameterOrder": [ @@ -73400,7 +76459,8 @@ type InstancesSetMachineResourcesCall struct { } // SetMachineResources: Changes the number and/or type of accelerator -// for a stopped instance to the values specified in the request. +// for a stopped instance to the values specified in the request. (== +// suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73456,6 +76516,7 @@ func (c *InstancesSetMachineResourcesCall) Header() http.Header { func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73521,7 +76582,7 @@ func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", + // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMachineResources", // "parameterOrder": [ @@ -73586,7 +76647,8 @@ type InstancesSetMachineTypeCall struct { } // SetMachineType: Changes the machine type for a stopped instance to -// the machine type specified in the request. +// the machine type specified in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73642,6 +76704,7 @@ func (c *InstancesSetMachineTypeCall) Header() http.Header { func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73707,7 +76770,7 @@ func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", + // "description": "Changes the machine type for a stopped instance to the machine type specified in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMachineType", // "parameterOrder": [ @@ -73772,7 +76835,7 @@ type InstancesSetMetadataCall struct { } // SetMetadata: Sets metadata for the specified instance to the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setMetadata func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -73829,6 +76892,7 @@ func (c *InstancesSetMetadataCall) Header() http.Header { func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73894,7 +76958,7 @@ func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Sets metadata for the specified instance to the data included in the request.", + // "description": "Sets metadata for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMetadata", // "parameterOrder": [ @@ -73961,7 +77025,7 @@ type InstancesSetMinCpuPlatformCall struct { // SetMinCpuPlatform: Changes the minimum CPU platform that this // instance should use. This method can only be called on a stopped // instance. For more information, read Specifying a Minimum CPU -// Platform. +// Platform. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall { c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74017,6 +77081,7 @@ func (c *InstancesSetMinCpuPlatformCall) Header() http.Header { func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74082,7 +77147,7 @@ func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", + // "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMinCpuPlatform", // "parameterOrder": [ @@ -74146,7 +77211,8 @@ type InstancesSetSchedulingCall struct { header_ http.Header } -// SetScheduling: Sets an instance's scheduling options. +// SetScheduling: Sets an instance's scheduling options. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setScheduling func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -74203,6 +77269,7 @@ func (c *InstancesSetSchedulingCall) Header() http.Header { func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74268,7 +77335,7 @@ func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Sets an instance's scheduling options.", + // "description": "Sets an instance's scheduling options. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setScheduling", // "parameterOrder": [ @@ -74334,7 +77401,7 @@ type InstancesSetServiceAccountCall struct { // SetServiceAccount: Sets the service account on the instance. For more // information, read Changing the service account and access scopes for -// an instance. +// an instance. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74390,6 +77457,7 @@ func (c *InstancesSetServiceAccountCall) Header() http.Header { func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74455,7 +77523,7 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", + // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setServiceAccount", // "parameterOrder": [ @@ -74522,7 +77590,8 @@ type InstancesSetShieldedInstanceIntegrityPolicyCall struct { // SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance // integrity policy for an instance. You can only use this method on a // running instance. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. +// JSON merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74578,6 +77647,7 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74643,7 +77713,7 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.setShieldedInstanceIntegrityPolicy", // "parameterOrder": [ @@ -74710,7 +77780,8 @@ type InstancesSetShieldedVmIntegrityPolicyCall struct { // SetShieldedVmIntegrityPolicy: Sets the Shielded VM integrity policy // for a VM instance. You can only use this method on a running VM // instance. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetShieldedVmIntegrityPolicy(project string, zone string, instance string, shieldedvmintegritypolicy *ShieldedVmIntegrityPolicy) *InstancesSetShieldedVmIntegrityPolicyCall { c := &InstancesSetShieldedVmIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74766,6 +77837,7 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) Header() http.Header { func (c *InstancesSetShieldedVmIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74831,7 +77903,7 @@ func (c *InstancesSetShieldedVmIntegrityPolicyCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.setShieldedVmIntegrityPolicy", // "parameterOrder": [ @@ -74896,7 +77968,7 @@ type InstancesSetTagsCall struct { } // SetTags: Sets network tags for the specified instance to the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setTags func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -74953,6 +78025,7 @@ func (c *InstancesSetTagsCall) Header() http.Header { func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75018,7 +78091,7 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Sets network tags for the specified instance to the data included in the request.", + // "description": "Sets network tags for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setTags", // "parameterOrder": [ @@ -75082,7 +78155,7 @@ type InstancesSimulateMaintenanceEventCall struct { } // SimulateMaintenanceEvent: Simulates a maintenance event on the -// instance. +// instance. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75118,6 +78191,7 @@ func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75178,7 +78252,7 @@ func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Simulates a maintenance event on the instance.", + // "description": "Simulates a maintenance event on the instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.simulateMaintenanceEvent", // "parameterOrder": [ @@ -75234,7 +78308,8 @@ type InstancesStartCall struct { } // Start: Starts an instance that was stopped using the instances().stop -// method. For more information, see Restart an instance. +// method. For more information, see Restart an instance. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/start func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -75290,6 +78365,7 @@ func (c *InstancesStartCall) Header() http.Header { func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75350,7 +78426,7 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.start", // "parameterOrder": [ @@ -75413,7 +78489,7 @@ type InstancesStartWithEncryptionKeyCall struct { // StartWithEncryptionKey: Starts an instance that was stopped using the // instances().stop method. For more information, see Restart an -// instance. +// instance. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75469,6 +78545,7 @@ func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75534,7 +78611,7 @@ func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.startWithEncryptionKey", // "parameterOrder": [ @@ -75602,7 +78679,8 @@ type InstancesStopCall struct { // incur VM usage charges while they are stopped. However, resources // that the VM is using, such as persistent disks and static IP // addresses, will continue to be charged until they are deleted. For -// more information, see Stopping an instance. +// more information, see Stopping an instance. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/stop func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -75658,6 +78736,7 @@ func (c *InstancesStopCall) Header() http.Header { func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75718,7 +78797,7 @@ func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", + // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.stop", // "parameterOrder": [ @@ -75783,7 +78862,8 @@ type InstancesSuspendCall struct { // time. Suspended instances incur reduced per-minute, virtual machine // usage charges while they are suspended. Any resources the virtual // machine is using, such as persistent disks and static IP addresses, -// will continue to be charged until they are deleted. +// will continue to be charged until they are deleted. (== +// suppress_warning http-rest-shadowed ==) func (r *InstancesService) Suspend(project string, zone string, instance string) *InstancesSuspendCall { c := &InstancesSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75846,6 +78926,7 @@ func (c *InstancesSuspendCall) Header() http.Header { func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75906,7 +78987,7 @@ func (c *InstancesSuspendCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.", + // "description": "This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.suspend", // "parameterOrder": [ @@ -75973,7 +79054,7 @@ type InstancesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall { c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76010,6 +79091,7 @@ func (c *InstancesTestIamPermissionsCall) Header() http.Header { func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76075,7 +79157,7 @@ func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.testIamPermissions", // "parameterOrder": [ @@ -76138,7 +79220,8 @@ type InstancesUpdateAccessConfigCall struct { // UpdateAccessConfig: Updates the specified access config from an // instance's network interface with the data included in the request. // This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. +// format and processing rules. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) UpdateAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesUpdateAccessConfigCall { c := &InstancesUpdateAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76195,6 +79278,7 @@ func (c *InstancesUpdateAccessConfigCall) Header() http.Header { func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76260,7 +79344,7 @@ func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.updateAccessConfig", // "parameterOrder": [ @@ -76334,7 +79418,7 @@ type InstancesUpdateDisplayDeviceCall struct { // UpdateDisplayDevice: Updates the Display config for a VM instance. // You can only use this method on a stopped VM instance. This method // supports PATCH semantics and uses the JSON merge patch format and -// processing rules. +// processing rules. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) UpdateDisplayDevice(project string, zone string, instance string, displaydevice *DisplayDevice) *InstancesUpdateDisplayDeviceCall { c := &InstancesUpdateDisplayDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76390,6 +79474,7 @@ func (c *InstancesUpdateDisplayDeviceCall) Header() http.Header { func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76455,7 +79540,7 @@ func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.updateDisplayDevice", // "parameterOrder": [ @@ -76520,7 +79605,8 @@ type InstancesUpdateNetworkInterfaceCall struct { } // UpdateNetworkInterface: Updates an instance's network interface. This -// method follows PATCH semantics. +// method follows PATCH semantics. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall { c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76577,6 +79663,7 @@ func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header { func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76642,7 +79729,7 @@ func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates an instance's network interface. This method follows PATCH semantics.", + // "description": "Updates an instance's network interface. This method follows PATCH semantics. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.updateNetworkInterface", // "parameterOrder": [ @@ -76716,7 +79803,8 @@ type InstancesUpdateShieldedInstanceConfigCall struct { // UpdateShieldedInstanceConfig: Updates the Shielded Instance config // for an instance. You can only use this method on a stopped instance. // This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. +// format and processing rules. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone string, instance string, shieldedinstanceconfig *ShieldedInstanceConfig) *InstancesUpdateShieldedInstanceConfigCall { c := &InstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76772,6 +79860,7 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) Header() http.Header { func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76837,7 +79926,7 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.updateShieldedInstanceConfig", // "parameterOrder": [ @@ -76904,7 +79993,7 @@ type InstancesUpdateShieldedVmConfigCall struct { // UpdateShieldedVmConfig: Updates the Shielded VM config for a VM // instance. You can only use this method on a stopped VM instance. This // method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. +// and processing rules. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) UpdateShieldedVmConfig(project string, zone string, instance string, shieldedvmconfig *ShieldedVmConfig) *InstancesUpdateShieldedVmConfigCall { c := &InstancesUpdateShieldedVmConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76960,6 +80049,7 @@ func (c *InstancesUpdateShieldedVmConfigCall) Header() http.Header { func (c *InstancesUpdateShieldedVmConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77025,7 +80115,7 @@ func (c *InstancesUpdateShieldedVmConfigCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.updateShieldedVmConfig", // "parameterOrder": [ @@ -77088,7 +80178,7 @@ type InterconnectAttachmentsAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of interconnect -// attachments. +// attachments. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) AggregatedList(project string) *InterconnectAttachmentsAggregatedListCall { c := &InterconnectAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -77195,6 +80285,7 @@ func (c *InterconnectAttachmentsAggregatedListCall) Header() http.Header { func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77257,7 +80348,7 @@ func (c *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Retrieves an aggregated list of interconnect attachments.", + // "description": "Retrieves an aggregated list of interconnect attachments. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectAttachments.aggregatedList", // "parameterOrder": [ @@ -77341,7 +80432,8 @@ type InterconnectAttachmentsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified interconnect attachment. +// Delete: Deletes the specified interconnect attachment. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Delete(project string, region string, interconnectAttachment string) *InterconnectAttachmentsDeleteCall { c := &InterconnectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -77396,6 +80488,7 @@ func (c *InterconnectAttachmentsDeleteCall) Header() http.Header { func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77456,7 +80549,7 @@ func (c *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Deletes the specified interconnect attachment.", + // "description": "Deletes the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.interconnectAttachments.delete", // "parameterOrder": [ @@ -77517,7 +80610,8 @@ type InterconnectAttachmentsGetCall struct { header_ http.Header } -// Get: Returns the specified interconnect attachment. +// Get: Returns the specified interconnect attachment. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Get(project string, region string, interconnectAttachment string) *InterconnectAttachmentsGetCall { c := &InterconnectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -77563,6 +80657,7 @@ func (c *InterconnectAttachmentsGetCall) Header() http.Header { func (c *InterconnectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77626,7 +80721,7 @@ func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Inte } return ret, nil // { - // "description": "Returns the specified interconnect attachment.", + // "description": "Returns the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectAttachments.get", // "parameterOrder": [ @@ -77683,7 +80778,8 @@ type InterconnectAttachmentsInsertCall struct { } // Insert: Creates an InterconnectAttachment in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Insert(project string, region string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsInsertCall { c := &InterconnectAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -77738,6 +80834,7 @@ func (c *InterconnectAttachmentsInsertCall) Header() http.Header { func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77802,7 +80899,7 @@ func (c *InterconnectAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", + // "description": "Creates an InterconnectAttachment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnectAttachments.insert", // "parameterOrder": [ @@ -77858,7 +80955,7 @@ type InterconnectAttachmentsListCall struct { } // List: Retrieves the list of interconnect attachments contained within -// the specified region. +// the specified region. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) List(project string, region string) *InterconnectAttachmentsListCall { c := &InterconnectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -77966,6 +81063,7 @@ func (c *InterconnectAttachmentsListCall) Header() http.Header { func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78028,7 +81126,7 @@ func (c *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*Int } return ret, nil // { - // "description": "Retrieves the list of interconnect attachments contained within the specified region.", + // "description": "Retrieves the list of interconnect attachments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectAttachments.list", // "parameterOrder": [ @@ -78123,7 +81221,8 @@ type InterconnectAttachmentsPatchCall struct { // Patch: Updates the specified interconnect attachment with the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Patch(project string, region string, interconnectAttachment string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsPatchCall { c := &InterconnectAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78179,6 +81278,7 @@ func (c *InterconnectAttachmentsPatchCall) Header() http.Header { func (c *InterconnectAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78244,7 +81344,7 @@ func (c *InterconnectAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.interconnectAttachments.patch", // "parameterOrder": [ @@ -78309,7 +81409,8 @@ type InterconnectAttachmentsSetLabelsCall struct { } // SetLabels: Sets the labels on an InterconnectAttachment. To learn -// more about labels, read the Labeling Resources documentation. +// more about labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *InterconnectAttachmentsSetLabelsCall { c := &InterconnectAttachmentsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78365,6 +81466,7 @@ func (c *InterconnectAttachmentsSetLabelsCall) Header() http.Header { func (c *InterconnectAttachmentsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78430,7 +81532,7 @@ func (c *InterconnectAttachmentsSetLabelsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnectAttachments.setLabels", // "parameterOrder": [ @@ -78495,7 +81597,7 @@ type InterconnectAttachmentsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectAttachmentsTestIamPermissionsCall { c := &InterconnectAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78532,6 +81634,7 @@ func (c *InterconnectAttachmentsTestIamPermissionsCall) Header() http.Header { func (c *InterconnectAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78597,7 +81700,7 @@ func (c *InterconnectAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnectAttachments.testIamPermissions", // "parameterOrder": [ @@ -78658,7 +81761,7 @@ type InterconnectLocationsGetCall struct { // Get: Returns the details for the specified interconnect location. // Gets a list of available interconnect locations by making a list() -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectLocationsService) Get(project string, interconnectLocation string) *InterconnectLocationsGetCall { c := &InterconnectLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78703,6 +81806,7 @@ func (c *InterconnectLocationsGetCall) Header() http.Header { func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78765,7 +81869,7 @@ func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*Interc } return ret, nil // { - // "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.", + // "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectLocations.get", // "parameterOrder": [ @@ -78813,7 +81917,7 @@ type InterconnectLocationsListCall struct { } // List: Retrieves the list of interconnect locations available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectLocationsService) List(project string) *InterconnectLocationsListCall { c := &InterconnectLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78920,6 +82024,7 @@ func (c *InterconnectLocationsListCall) Header() http.Header { func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78981,7 +82086,7 @@ func (c *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*Inter } return ret, nil // { - // "description": "Retrieves the list of interconnect locations available to the specified project.", + // "description": "Retrieves the list of interconnect locations available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectLocations.list", // "parameterOrder": [ @@ -79064,7 +82169,8 @@ type InterconnectsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified interconnect. +// Delete: Deletes the specified interconnect. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectsService) Delete(project string, interconnect string) *InterconnectsDeleteCall { c := &InterconnectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79118,6 +82224,7 @@ func (c *InterconnectsDeleteCall) Header() http.Header { func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79177,7 +82284,7 @@ func (c *InterconnectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified interconnect.", + // "description": "Deletes the specified interconnect. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.interconnects.delete", // "parameterOrder": [ @@ -79230,7 +82337,8 @@ type InterconnectsGetCall struct { } // Get: Returns the specified interconnect. Get a list of available -// interconnects by making a list() request. +// interconnects by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectsService) Get(project string, interconnect string) *InterconnectsGetCall { c := &InterconnectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79275,6 +82383,7 @@ func (c *InterconnectsGetCall) Header() http.Header { func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79337,7 +82446,7 @@ func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, } return ret, nil // { - // "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.", + // "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnects.get", // "parameterOrder": [ @@ -79386,7 +82495,7 @@ type InterconnectsGetDiagnosticsCall struct { } // GetDiagnostics: Returns the interconnectDiagnostics for the specified -// interconnect. +// interconnect. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectsService) GetDiagnostics(project string, interconnect string) *InterconnectsGetDiagnosticsCall { c := &InterconnectsGetDiagnosticsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79431,6 +82540,7 @@ func (c *InterconnectsGetDiagnosticsCall) Header() http.Header { func (c *InterconnectsGetDiagnosticsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79494,7 +82604,7 @@ func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*Int } return ret, nil // { - // "description": "Returns the interconnectDiagnostics for the specified interconnect.", + // "description": "Returns the interconnectDiagnostics for the specified interconnect. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnects.getDiagnostics", // "parameterOrder": [ @@ -79542,7 +82652,8 @@ type InterconnectsInsertCall struct { } // Insert: Creates a Interconnect in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) func (r *InterconnectsService) Insert(project string, interconnect *Interconnect) *InterconnectsInsertCall { c := &InterconnectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79596,6 +82707,7 @@ func (c *InterconnectsInsertCall) Header() http.Header { func (c *InterconnectsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79659,7 +82771,7 @@ func (c *InterconnectsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a Interconnect in the specified project using the data included in the request.", + // "description": "Creates a Interconnect in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnects.insert", // "parameterOrder": [ @@ -79706,7 +82818,7 @@ type InterconnectsListCall struct { } // List: Retrieves the list of interconnect available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectsService) List(project string) *InterconnectsListCall { c := &InterconnectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79813,6 +82925,7 @@ func (c *InterconnectsListCall) Header() http.Header { func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79874,7 +82987,7 @@ func (c *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectL } return ret, nil // { - // "description": "Retrieves the list of interconnect available to the specified project.", + // "description": "Retrieves the list of interconnect available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnects.list", // "parameterOrder": [ @@ -79960,7 +83073,8 @@ type InterconnectsPatchCall struct { // Patch: Updates the specified interconnect with the data included in // the request. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectsService) Patch(project string, interconnect string, interconnect2 *Interconnect) *InterconnectsPatchCall { c := &InterconnectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80015,6 +83129,7 @@ func (c *InterconnectsPatchCall) Header() http.Header { func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80079,7 +83194,7 @@ func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.interconnects.patch", // "parameterOrder": [ @@ -80135,7 +83250,8 @@ type InterconnectsSetLabelsCall struct { } // SetLabels: Sets the labels on an Interconnect. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *InterconnectsSetLabelsCall { c := &InterconnectsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80171,6 +83287,7 @@ func (c *InterconnectsSetLabelsCall) Header() http.Header { func (c *InterconnectsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80235,7 +83352,7 @@ func (c *InterconnectsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnects.setLabels", // "parameterOrder": [ @@ -80286,7 +83403,7 @@ type InterconnectsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectsTestIamPermissionsCall { c := &InterconnectsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80322,6 +83439,7 @@ func (c *InterconnectsTestIamPermissionsCall) Header() http.Header { func (c *InterconnectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80386,7 +83504,7 @@ func (c *InterconnectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnects.testIamPermissions", // "parameterOrder": [ @@ -80439,6 +83557,7 @@ type LicenseCodesGetCall struct { // Get: Return a specified license code. License codes are mirrored // across all projects that have permissions to read the License Code. +// (== suppress_warning http-rest-shadowed ==) func (r *LicenseCodesService) Get(project string, licenseCode string) *LicenseCodesGetCall { c := &LicenseCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80483,6 +83602,7 @@ func (c *LicenseCodesGetCall) Header() http.Header { func (c *LicenseCodesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80545,7 +83665,7 @@ func (c *LicenseCodesGetCall) Do(opts ...googleapi.CallOption) (*LicenseCode, er } return ret, nil // { - // "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code.", + // "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenseCodes.get", // "parameterOrder": [ @@ -80592,7 +83712,8 @@ type LicensesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified license. +// Delete: Deletes the specified license. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) Delete(project string, license string) *LicensesDeleteCall { c := &LicensesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80646,6 +83767,7 @@ func (c *LicensesDeleteCall) Header() http.Header { func (c *LicensesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80705,7 +83827,7 @@ func (c *LicensesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Deletes the specified license.", + // "description": "Deletes the specified license. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.licenses.delete", // "parameterOrder": [ @@ -80757,7 +83879,8 @@ type LicensesGetCall struct { header_ http.Header } -// Get: Returns the specified License resource. +// Get: Returns the specified License resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/licenses/get func (r *LicensesService) Get(project string, license string) *LicensesGetCall { c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -80803,6 +83926,7 @@ func (c *LicensesGetCall) Header() http.Header { func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80865,7 +83989,7 @@ func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) { } return ret, nil // { - // "description": "Returns the specified License resource.", + // "description": "Returns the specified License resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenses.get", // "parameterOrder": [ @@ -80914,7 +84038,8 @@ type LicensesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) GetIamPolicy(project string, resource string) *LicensesGetIamPolicyCall { c := &LicensesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80922,6 +84047,13 @@ func (r *LicensesService) GetIamPolicy(project string, resource string) *License return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *LicensesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *LicensesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -80959,6 +84091,7 @@ func (c *LicensesGetIamPolicyCall) Header() http.Header { func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81021,7 +84154,7 @@ func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenses.getIamPolicy", // "parameterOrder": [ @@ -81029,6 +84162,12 @@ func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -81068,7 +84207,8 @@ type LicensesInsertCall struct { header_ http.Header } -// Insert: Create a License resource in the specified project. +// Insert: Create a License resource in the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *LicensesService) Insert(project string, license *License) *LicensesInsertCall { c := &LicensesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -81122,6 +84262,7 @@ func (c *LicensesInsertCall) Header() http.Header { func (c *LicensesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81185,7 +84326,7 @@ func (c *LicensesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Create a License resource in the specified project.", + // "description": "Create a License resource in the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.licenses.insert", // "parameterOrder": [ @@ -81239,7 +84380,8 @@ type LicensesListCall struct { // projects, including licenses attached to publicly-available images, // like Debian 9. If you want to get a list of publicly-available // licenses, use this method to make a request to the respective image -// project, such as debian-cloud or windows-cloud. +// project, such as debian-cloud or windows-cloud. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) List(project string) *LicensesListCall { c := &LicensesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -81346,6 +84488,7 @@ func (c *LicensesListCall) Header() http.Header { func (c *LicensesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81407,7 +84550,7 @@ func (c *LicensesListCall) Do(opts ...googleapi.CallOption) (*LicensesListRespon } return ret, nil // { - // "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + // "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenses.list", // "parameterOrder": [ @@ -81492,7 +84635,8 @@ type LicensesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *LicensesSetIamPolicyCall { c := &LicensesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -81528,6 +84672,7 @@ func (c *LicensesSetIamPolicyCall) Header() http.Header { func (c *LicensesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81592,7 +84737,7 @@ func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.licenses.setIamPolicy", // "parameterOrder": [ @@ -81630,6 +84775,1242 @@ func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er } +// method id "compute.machineImages.delete": + +type MachineImagesDeleteCall struct { + s *Service + project string + machineImage string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified machine image. Deleting a machine image +// is permanent and cannot be undone. (== suppress_warning +// http-rest-shadowed ==) +func (r *MachineImagesService) Delete(project string, machineImage string) *MachineImagesDeleteCall { + c := &MachineImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.machineImage = machineImage + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *MachineImagesDeleteCall) RequestId(requestId string) *MachineImagesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MachineImagesDeleteCall) Fields(s ...googleapi.Field) *MachineImagesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MachineImagesDeleteCall) Context(ctx context.Context) *MachineImagesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MachineImagesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MachineImagesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/machineImages/{machineImage}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "machineImage": c.machineImage, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.machineImages.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *MachineImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.machineImages.delete", + // "parameterOrder": [ + // "project", + // "machineImage" + // ], + // "parameters": { + // "machineImage": { + // "description": "The name of the machine image to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/machineImages/{machineImage}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.machineImages.get": + +type MachineImagesGetCall struct { + s *Service + project string + machineImage string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified machine image. Gets a list of available +// machine images by making a list() request. (== suppress_warning +// http-rest-shadowed ==) +func (r *MachineImagesService) Get(project string, machineImage string) *MachineImagesGetCall { + c := &MachineImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.machineImage = machineImage + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MachineImagesGetCall) Fields(s ...googleapi.Field) *MachineImagesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *MachineImagesGetCall) IfNoneMatch(entityTag string) *MachineImagesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MachineImagesGetCall) Context(ctx context.Context) *MachineImagesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MachineImagesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MachineImagesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/machineImages/{machineImage}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "machineImage": c.machineImage, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.machineImages.get" call. +// Exactly one of *MachineImage or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *MachineImage.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *MachineImagesGetCall) Do(opts ...googleapi.CallOption) (*MachineImage, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &MachineImage{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified machine image. Gets a list of available machine images by making a list() request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.machineImages.get", + // "parameterOrder": [ + // "project", + // "machineImage" + // ], + // "parameters": { + // "machineImage": { + // "description": "The name of the machine image.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/machineImages/{machineImage}", + // "response": { + // "$ref": "MachineImage" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.machineImages.getIamPolicy": + +type MachineImagesGetIamPolicyCall struct { + s *Service + project string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) +func (r *MachineImagesService) GetIamPolicy(project string, resource string) *MachineImagesGetIamPolicyCall { + c := &MachineImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *MachineImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *MachineImagesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MachineImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *MachineImagesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *MachineImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *MachineImagesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MachineImagesGetIamPolicyCall) Context(ctx context.Context) *MachineImagesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MachineImagesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MachineImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/machineImages/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.machineImages.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *MachineImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.machineImages.getIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/machineImages/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.machineImages.insert": + +type MachineImagesInsertCall struct { + s *Service + project string + machineimage *MachineImage + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a machine image in the specified project using the +// data that is included in the request. If you are creating a new +// machine image to update an existing instance, your new machine image +// should use the same network or, if applicable, the same subnetwork as +// the original instance. (== suppress_warning http-rest-shadowed ==) +func (r *MachineImagesService) Insert(project string, machineimage *MachineImage) *MachineImagesInsertCall { + c := &MachineImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.machineimage = machineimage + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *MachineImagesInsertCall) RequestId(requestId string) *MachineImagesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// SourceInstance sets the optional parameter "sourceInstance": +// Required. Source instance that is used to create the machine image +// from. +func (c *MachineImagesInsertCall) SourceInstance(sourceInstance string) *MachineImagesInsertCall { + c.urlParams_.Set("sourceInstance", sourceInstance) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MachineImagesInsertCall) Fields(s ...googleapi.Field) *MachineImagesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MachineImagesInsertCall) Context(ctx context.Context) *MachineImagesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MachineImagesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MachineImagesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.machineimage) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/machineImages") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.machineImages.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *MachineImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a machine image in the specified project using the data that is included in the request. If you are creating a new machine image to update an existing instance, your new machine image should use the same network or, if applicable, the same subnetwork as the original instance. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.machineImages.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "sourceInstance": { + // "description": "Required. Source instance that is used to create the machine image from.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/machineImages", + // "request": { + // "$ref": "MachineImage" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.machineImages.list": + +type MachineImagesListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of machine images that are contained within +// the specified project. (== suppress_warning http-rest-shadowed ==) +func (r *MachineImagesService) List(project string) *MachineImagesListCall { + c := &MachineImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *MachineImagesListCall) Filter(filter string) *MachineImagesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *MachineImagesListCall) MaxResults(maxResults int64) *MachineImagesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *MachineImagesListCall) OrderBy(orderBy string) *MachineImagesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *MachineImagesListCall) PageToken(pageToken string) *MachineImagesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MachineImagesListCall) Fields(s ...googleapi.Field) *MachineImagesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *MachineImagesListCall) IfNoneMatch(entityTag string) *MachineImagesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MachineImagesListCall) Context(ctx context.Context) *MachineImagesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MachineImagesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MachineImagesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/machineImages") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.machineImages.list" call. +// Exactly one of *MachineImageList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *MachineImageList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *MachineImagesListCall) Do(opts ...googleapi.CallOption) (*MachineImageList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &MachineImageList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of machine images that are contained within the specified project. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.machineImages.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/machineImages", + // "response": { + // "$ref": "MachineImageList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *MachineImagesListCall) Pages(ctx context.Context, f func(*MachineImageList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.machineImages.setIamPolicy": + +type MachineImagesSetIamPolicyCall struct { + s *Service + project string + resource string + globalsetpolicyrequest *GlobalSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) +func (r *MachineImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *MachineImagesSetIamPolicyCall { + c := &MachineImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.globalsetpolicyrequest = globalsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MachineImagesSetIamPolicyCall) Fields(s ...googleapi.Field) *MachineImagesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MachineImagesSetIamPolicyCall) Context(ctx context.Context) *MachineImagesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MachineImagesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MachineImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/machineImages/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.machineImages.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *MachineImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.machineImages.setIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/machineImages/{resource}/setIamPolicy", + // "request": { + // "$ref": "GlobalSetPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.machineImages.testIamPermissions": + +type MachineImagesTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. (== suppress_warning http-rest-shadowed ==) +func (r *MachineImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *MachineImagesTestIamPermissionsCall { + c := &MachineImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MachineImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *MachineImagesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MachineImagesTestIamPermissionsCall) Context(ctx context.Context) *MachineImagesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MachineImagesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MachineImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/machineImages/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.machineImages.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *MachineImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.machineImages.testIamPermissions", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/machineImages/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.machineTypes.aggregatedList": type MachineTypesAggregatedListCall struct { @@ -81641,7 +86022,8 @@ type MachineTypesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of machine types. +// AggregatedList: Retrieves an aggregated list of machine types. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/aggregatedList func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -81749,6 +86131,7 @@ func (c *MachineTypesAggregatedListCall) Header() http.Header { func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81810,7 +86193,7 @@ func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Mach } return ret, nil // { - // "description": "Retrieves an aggregated list of machine types.", + // "description": "Retrieves an aggregated list of machine types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineTypes.aggregatedList", // "parameterOrder": [ @@ -81896,7 +86279,8 @@ type MachineTypesGetCall struct { } // Get: Returns the specified machine type. Gets a list of available -// machine types by making a list() request. +// machine types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/get func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -81943,6 +86327,7 @@ func (c *MachineTypesGetCall) Header() http.Header { func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82006,7 +86391,7 @@ func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, er } return ret, nil // { - // "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request.", + // "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineTypes.get", // "parameterOrder": [ @@ -82063,7 +86448,7 @@ type MachineTypesListCall struct { } // List: Retrieves a list of machine types available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/list func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -82172,6 +86557,7 @@ func (c *MachineTypesListCall) Header() http.Header { func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82234,7 +86620,7 @@ func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeLis } return ret, nil // { - // "description": "Retrieves a list of machine types available to the specified project.", + // "description": "Retrieves a list of machine types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineTypes.list", // "parameterOrder": [ @@ -82326,7 +86712,7 @@ type NetworkEndpointGroupsAggregatedListCall struct { } // AggregatedList: Retrieves the list of network endpoint groups and -// sorts them by zone. +// sorts them by zone. (== suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82433,6 +86819,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82495,7 +86882,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Retrieves the list of network endpoint groups and sorts them by zone.", + // "description": "Retrieves the list of network endpoint groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networkEndpointGroups.aggregatedList", // "parameterOrder": [ @@ -82581,7 +86968,8 @@ type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { } // AttachNetworkEndpoints: Attach a list of network endpoints to the -// specified network endpoint group. +// specified network endpoint group. (== suppress_warning +// http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82637,6 +87025,7 @@ func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82702,7 +87091,7 @@ func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Attach a list of network endpoints to the specified network endpoint group.", + // "description": "Attach a list of network endpoints to the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.attachNetworkEndpoints", // "parameterOrder": [ @@ -82766,7 +87155,8 @@ type NetworkEndpointGroupsDeleteCall struct { // Delete: Deletes the specified network endpoint group. The network // endpoints in the NEG and the VM instances they belong to are not // terminated when the NEG is deleted. Note that the NEG cannot be -// deleted if there are backend services referencing it. +// deleted if there are backend services referencing it. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82821,6 +87211,7 @@ func (c *NetworkEndpointGroupsDeleteCall) Header() http.Header { func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82881,7 +87272,7 @@ func (c *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.", + // "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.networkEndpointGroups.delete", // "parameterOrder": [ @@ -82941,7 +87332,8 @@ type NetworkEndpointGroupsDetachNetworkEndpointsCall struct { } // DetachNetworkEndpoints: Detach a list of network endpoints from the -// specified network endpoint group. +// specified network endpoint group. (== suppress_warning +// http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) DetachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest) *NetworkEndpointGroupsDetachNetworkEndpointsCall { c := &NetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82997,6 +87389,7 @@ func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83062,7 +87455,7 @@ func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Detach a list of network endpoints from the specified network endpoint group.", + // "description": "Detach a list of network endpoints from the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.detachNetworkEndpoints", // "parameterOrder": [ @@ -83125,7 +87518,8 @@ type NetworkEndpointGroupsGetCall struct { } // Get: Returns the specified network endpoint group. Gets a list of -// available network endpoint groups by making a list() request. +// available network endpoint groups by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) Get(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsGetCall { c := &NetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83171,6 +87565,7 @@ func (c *NetworkEndpointGroupsGetCall) Header() http.Header { func (c *NetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83234,7 +87629,7 @@ func (c *NetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*Networ } return ret, nil // { - // "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.", + // "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networkEndpointGroups.get", // "parameterOrder": [ @@ -83289,7 +87684,8 @@ type NetworkEndpointGroupsInsertCall struct { } // Insert: Creates a network endpoint group in the specified project -// using the parameters that are included in the request. +// using the parameters that are included in the request. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) Insert(project string, zone string, networkendpointgroup *NetworkEndpointGroup) *NetworkEndpointGroupsInsertCall { c := &NetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83344,6 +87740,7 @@ func (c *NetworkEndpointGroupsInsertCall) Header() http.Header { func (c *NetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83408,7 +87805,7 @@ func (c *NetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.insert", // "parameterOrder": [ @@ -83463,7 +87860,8 @@ type NetworkEndpointGroupsListCall struct { } // List: Retrieves the list of network endpoint groups that are located -// in the specified project and zone. +// in the specified project and zone. (== suppress_warning +// http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) List(project string, zone string) *NetworkEndpointGroupsListCall { c := &NetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83571,6 +87969,7 @@ func (c *NetworkEndpointGroupsListCall) Header() http.Header { func (c *NetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83633,7 +88032,7 @@ func (c *NetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*Netwo } return ret, nil // { - // "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone.", + // "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networkEndpointGroups.list", // "parameterOrder": [ @@ -83726,7 +88125,7 @@ type NetworkEndpointGroupsListNetworkEndpointsCall struct { } // ListNetworkEndpoints: Lists the network endpoints in the specified -// network endpoint group. +// network endpoint group. (== suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) ListNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest) *NetworkEndpointGroupsListNetworkEndpointsCall { c := &NetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83826,6 +88225,7 @@ func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { func (c *NetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83893,7 +88293,7 @@ func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists the network endpoints in the specified network endpoint group.", + // "description": "Lists the network endpoints in the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.listNetworkEndpoints", // "parameterOrder": [ @@ -83996,7 +88396,7 @@ type NetworkEndpointGroupsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkEndpointGroupsTestIamPermissionsCall { c := &NetworkEndpointGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -84033,6 +88433,7 @@ func (c *NetworkEndpointGroupsTestIamPermissionsCall) Header() http.Header { func (c *NetworkEndpointGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84098,7 +88499,7 @@ func (c *NetworkEndpointGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.testIamPermissions", // "parameterOrder": [ @@ -84157,7 +88558,8 @@ type NetworksAddPeeringCall struct { header_ http.Header } -// AddPeering: Adds a peering to the specified network. +// AddPeering: Adds a peering to the specified network. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -84212,6 +88614,7 @@ func (c *NetworksAddPeeringCall) Header() http.Header { func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84276,7 +88679,7 @@ func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Adds a peering to the specified network.", + // "description": "Adds a peering to the specified network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.addPeering", // "parameterOrder": [ @@ -84330,7 +88733,8 @@ type NetworksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified network. +// Delete: Deletes the specified network. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/delete func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -84385,6 +88789,7 @@ func (c *NetworksDeleteCall) Header() http.Header { func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84444,7 +88849,7 @@ func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Deletes the specified network.", + // "description": "Deletes the specified network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.networks.delete", // "parameterOrder": [ @@ -84497,7 +88902,8 @@ type NetworksGetCall struct { } // Get: Returns the specified network. Gets a list of available networks -// by making a list() request. +// by making a list() request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/get func (r *NetworksService) Get(project string, network string) *NetworksGetCall { c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -84543,6 +88949,7 @@ func (c *NetworksGetCall) Header() http.Header { func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84605,7 +89012,7 @@ func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { } return ret, nil // { - // "description": "Returns the specified network. Gets a list of available networks by making a list() request.", + // "description": "Returns the specified network. Gets a list of available networks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networks.get", // "parameterOrder": [ @@ -84653,7 +89060,7 @@ type NetworksInsertCall struct { } // Insert: Creates a network in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/insert func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -84708,6 +89115,7 @@ func (c *NetworksInsertCall) Header() http.Header { func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84771,7 +89179,7 @@ func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Creates a network in the specified project using the data included in the request.", + // "description": "Creates a network in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.insert", // "parameterOrder": [ @@ -84818,7 +89226,7 @@ type NetworksListCall struct { } // List: Retrieves the list of networks available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/list func (r *NetworksService) List(project string) *NetworksListCall { c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -84926,6 +89334,7 @@ func (c *NetworksListCall) Header() http.Header { func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84987,7 +89396,7 @@ func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error } return ret, nil // { - // "description": "Retrieves the list of networks available to the specified project.", + // "description": "Retrieves the list of networks available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networks.list", // "parameterOrder": [ @@ -85072,7 +89481,7 @@ type NetworksListPeeringRoutesCall struct { } // ListPeeringRoutes: Lists the peering routes exchanged over peering -// connection. +// connection. (== suppress_warning http-rest-shadowed ==) func (r *NetworksService) ListPeeringRoutes(project string, network string) *NetworksListPeeringRoutesCall { c := &NetworksListPeeringRoutesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85206,6 +89615,7 @@ func (c *NetworksListPeeringRoutesCall) Header() http.Header { func (c *NetworksListPeeringRoutesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85268,7 +89678,7 @@ func (c *NetworksListPeeringRoutesCall) Do(opts ...googleapi.CallOption) (*Excha } return ret, nil // { - // "description": "Lists the peering routes exchanged over peering connection.", + // "description": "Lists the peering routes exchanged over peering connection. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networks.listPeeringRoutes", // "parameterOrder": [ @@ -85385,7 +89795,8 @@ type NetworksPatchCall struct { // Patch: Patches the specified network with the data included in the // request. Only the following fields can be modified: -// routingConfig.routingMode. +// routingConfig.routingMode. (== suppress_warning http-rest-shadowed +// ==) func (r *NetworksService) Patch(project string, network string, network2 *Network) *NetworksPatchCall { c := &NetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85440,6 +89851,7 @@ func (c *NetworksPatchCall) Header() http.Header { func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85504,7 +89916,7 @@ func (c *NetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.", + // "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.networks.patch", // "parameterOrder": [ @@ -85559,7 +89971,8 @@ type NetworksRemovePeeringCall struct { header_ http.Header } -// RemovePeering: Removes a peering from the specified network. +// RemovePeering: Removes a peering from the specified network. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworksService) RemovePeering(project string, network string, networksremovepeeringrequest *NetworksRemovePeeringRequest) *NetworksRemovePeeringCall { c := &NetworksRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85614,6 +90027,7 @@ func (c *NetworksRemovePeeringCall) Header() http.Header { func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85678,7 +90092,7 @@ func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Removes a peering from the specified network.", + // "description": "Removes a peering from the specified network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.removePeering", // "parameterOrder": [ @@ -85733,7 +90147,7 @@ type NetworksSwitchToCustomModeCall struct { } // SwitchToCustomMode: Switches the network mode from auto subnet mode -// to custom subnet mode. +// to custom subnet mode. (== suppress_warning http-rest-shadowed ==) func (r *NetworksService) SwitchToCustomMode(project string, network string) *NetworksSwitchToCustomModeCall { c := &NetworksSwitchToCustomModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85787,6 +90201,7 @@ func (c *NetworksSwitchToCustomModeCall) Header() http.Header { func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85846,7 +90261,7 @@ func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Switches the network mode from auto subnet mode to custom subnet mode.", + // "description": "Switches the network mode from auto subnet mode to custom subnet mode. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.switchToCustomMode", // "parameterOrder": [ @@ -85899,7 +90314,7 @@ type NetworksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *NetworksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworksTestIamPermissionsCall { c := &NetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85935,6 +90350,7 @@ func (c *NetworksTestIamPermissionsCall) Header() http.Header { func (c *NetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85999,7 +90415,7 @@ func (c *NetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.testIamPermissions", // "parameterOrder": [ @@ -86053,7 +90469,8 @@ type NetworksUpdatePeeringCall struct { // UpdatePeering: Updates the specified network peering with the data // included in the request Only the following fields can be modified: // NetworkPeering.export_custom_routes, and -// NetworkPeering.import_custom_routes +// NetworkPeering.import_custom_routes (== suppress_warning +// http-rest-shadowed ==) func (r *NetworksService) UpdatePeering(project string, network string, networksupdatepeeringrequest *NetworksUpdatePeeringRequest) *NetworksUpdatePeeringCall { c := &NetworksUpdatePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -86108,6 +90525,7 @@ func (c *NetworksUpdatePeeringCall) Header() http.Header { func (c *NetworksUpdatePeeringCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86172,7 +90590,7 @@ func (c *NetworksUpdatePeeringCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes", + // "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.networks.updatePeering", // "parameterOrder": [ @@ -86228,7 +90646,8 @@ type NodeGroupsAddNodesCall struct { header_ http.Header } -// AddNodes: Adds specified number of nodes to the node group. +// AddNodes: Adds specified number of nodes to the node group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) AddNodes(project string, zone string, nodeGroup string, nodegroupsaddnodesrequest *NodeGroupsAddNodesRequest) *NodeGroupsAddNodesCall { c := &NodeGroupsAddNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -86284,6 +90703,7 @@ func (c *NodeGroupsAddNodesCall) Header() http.Header { func (c *NodeGroupsAddNodesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86349,7 +90769,7 @@ func (c *NodeGroupsAddNodesCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Adds specified number of nodes to the node group.", + // "description": "Adds specified number of nodes to the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.addNodes", // "parameterOrder": [ @@ -86412,7 +90832,8 @@ type NodeGroupsAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of node groups. Note: -// use nodeGroups.listNodes for more details about each group. +// use nodeGroups.listNodes for more details about each group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) AggregatedList(project string) *NodeGroupsAggregatedListCall { c := &NodeGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -86519,6 +90940,7 @@ func (c *NodeGroupsAggregatedListCall) Header() http.Header { func (c *NodeGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86580,7 +91002,7 @@ func (c *NodeGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeGr } return ret, nil // { - // "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.", + // "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.aggregatedList", // "parameterOrder": [ @@ -86664,7 +91086,8 @@ type NodeGroupsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified NodeGroup resource. +// Delete: Deletes the specified NodeGroup resource. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) Delete(project string, zone string, nodeGroup string) *NodeGroupsDeleteCall { c := &NodeGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -86719,6 +91142,7 @@ func (c *NodeGroupsDeleteCall) Header() http.Header { func (c *NodeGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86779,7 +91203,7 @@ func (c *NodeGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Deletes the specified NodeGroup resource.", + // "description": "Deletes the specified NodeGroup resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.nodeGroups.delete", // "parameterOrder": [ @@ -86840,7 +91264,8 @@ type NodeGroupsDeleteNodesCall struct { header_ http.Header } -// DeleteNodes: Deletes specified nodes from the node group. +// DeleteNodes: Deletes specified nodes from the node group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) DeleteNodes(project string, zone string, nodeGroup string, nodegroupsdeletenodesrequest *NodeGroupsDeleteNodesRequest) *NodeGroupsDeleteNodesCall { c := &NodeGroupsDeleteNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -86896,6 +91321,7 @@ func (c *NodeGroupsDeleteNodesCall) Header() http.Header { func (c *NodeGroupsDeleteNodesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86961,7 +91387,7 @@ func (c *NodeGroupsDeleteNodesCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes specified nodes from the node group.", + // "description": "Deletes specified nodes from the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.deleteNodes", // "parameterOrder": [ @@ -86971,7 +91397,7 @@ func (c *NodeGroupsDeleteNodesCall) Do(opts ...googleapi.CallOption) (*Operation // ], // "parameters": { // "nodeGroup": { - // "description": "Name of the NodeGroup resource to delete.", + // "description": "Name of the NodeGroup resource whose nodes will be deleted.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -87027,7 +91453,8 @@ type NodeGroupsGetCall struct { // Get: Returns the specified NodeGroup. Get a list of available // NodeGroups by making a list() request. Note: the "nodes" field should -// not be used. Use nodeGroups.listNodes instead. +// not be used. Use nodeGroups.listNodes instead. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) Get(project string, zone string, nodeGroup string) *NodeGroupsGetCall { c := &NodeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87073,6 +91500,7 @@ func (c *NodeGroupsGetCall) Header() http.Header { func (c *NodeGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87136,7 +91564,7 @@ func (c *NodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, error) } return ret, nil // { - // "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead.", + // "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.get", // "parameterOrder": [ @@ -87194,7 +91622,8 @@ type NodeGroupsGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) GetIamPolicy(project string, zone string, resource string) *NodeGroupsGetIamPolicyCall { c := &NodeGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87203,6 +91632,13 @@ func (r *NodeGroupsService) GetIamPolicy(project string, zone string, resource s return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *NodeGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeGroupsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -87240,6 +91676,7 @@ func (c *NodeGroupsGetIamPolicyCall) Header() http.Header { func (c *NodeGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87303,7 +91740,7 @@ func (c *NodeGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.getIamPolicy", // "parameterOrder": [ @@ -87312,6 +91749,12 @@ func (c *NodeGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -87360,7 +91803,8 @@ type NodeGroupsInsertCall struct { } // Insert: Creates a NodeGroup resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) Insert(project string, zone string, initialNodeCount int64, nodegroup *NodeGroup) *NodeGroupsInsertCall { c := &NodeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87416,6 +91860,7 @@ func (c *NodeGroupsInsertCall) Header() http.Header { func (c *NodeGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87480,7 +91925,7 @@ func (c *NodeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Creates a NodeGroup resource in the specified project using the data included in the request.", + // "description": "Creates a NodeGroup resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.insert", // "parameterOrder": [ @@ -87545,7 +91990,7 @@ type NodeGroupsListCall struct { // List: Retrieves a list of node groups available to the specified // project. Note: use nodeGroups.listNodes for more details about each -// group. +// group. (== suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) List(project string, zone string) *NodeGroupsListCall { c := &NodeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87653,6 +92098,7 @@ func (c *NodeGroupsListCall) Header() http.Header { func (c *NodeGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87715,7 +92161,7 @@ func (c *NodeGroupsListCall) Do(opts ...googleapi.CallOption) (*NodeGroupList, e } return ret, nil // { - // "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.", + // "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.list", // "parameterOrder": [ @@ -87807,7 +92253,8 @@ type NodeGroupsListNodesCall struct { header_ http.Header } -// ListNodes: Lists nodes in the node group. +// ListNodes: Lists nodes in the node group. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) ListNodes(project string, zone string, nodeGroup string) *NodeGroupsListNodesCall { c := &NodeGroupsListNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87906,6 +92353,7 @@ func (c *NodeGroupsListNodesCall) Header() http.Header { func (c *NodeGroupsListNodesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87966,7 +92414,7 @@ func (c *NodeGroupsListNodesCall) Do(opts ...googleapi.CallOption) (*NodeGroupsL } return ret, nil // { - // "description": "Lists nodes in the node group.", + // "description": "Lists nodes in the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.listNodes", // "parameterOrder": [ @@ -88068,7 +92516,8 @@ type NodeGroupsSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *NodeGroupsSetIamPolicyCall { c := &NodeGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88105,6 +92554,7 @@ func (c *NodeGroupsSetIamPolicyCall) Header() http.Header { func (c *NodeGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88170,7 +92620,7 @@ func (c *NodeGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.setIamPolicy", // "parameterOrder": [ @@ -88229,7 +92679,8 @@ type NodeGroupsSetNodeTemplateCall struct { header_ http.Header } -// SetNodeTemplate: Updates the node template of the node group. +// SetNodeTemplate: Updates the node template of the node group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) SetNodeTemplate(project string, zone string, nodeGroup string, nodegroupssetnodetemplaterequest *NodeGroupsSetNodeTemplateRequest) *NodeGroupsSetNodeTemplateCall { c := &NodeGroupsSetNodeTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88285,6 +92736,7 @@ func (c *NodeGroupsSetNodeTemplateCall) Header() http.Header { func (c *NodeGroupsSetNodeTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88350,7 +92802,7 @@ func (c *NodeGroupsSetNodeTemplateCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Updates the node template of the node group.", + // "description": "Updates the node template of the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.setNodeTemplate", // "parameterOrder": [ @@ -88415,7 +92867,7 @@ type NodeGroupsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeGroupsTestIamPermissionsCall { c := &NodeGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88452,6 +92904,7 @@ func (c *NodeGroupsTestIamPermissionsCall) Header() http.Header { func (c *NodeGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88517,7 +92970,7 @@ func (c *NodeGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Te } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.testIamPermissions", // "parameterOrder": [ @@ -88575,7 +93028,8 @@ type NodeTemplatesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of node templates. +// AggregatedList: Retrieves an aggregated list of node templates. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) AggregatedList(project string) *NodeTemplatesAggregatedListCall { c := &NodeTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88682,6 +93136,7 @@ func (c *NodeTemplatesAggregatedListCall) Header() http.Header { func (c *NodeTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88743,7 +93198,7 @@ func (c *NodeTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Nod } return ret, nil // { - // "description": "Retrieves an aggregated list of node templates.", + // "description": "Retrieves an aggregated list of node templates. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.aggregatedList", // "parameterOrder": [ @@ -88827,7 +93282,8 @@ type NodeTemplatesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified NodeTemplate resource. +// Delete: Deletes the specified NodeTemplate resource. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) Delete(project string, region string, nodeTemplate string) *NodeTemplatesDeleteCall { c := &NodeTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88882,6 +93338,7 @@ func (c *NodeTemplatesDeleteCall) Header() http.Header { func (c *NodeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88942,7 +93399,7 @@ func (c *NodeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified NodeTemplate resource.", + // "description": "Deletes the specified NodeTemplate resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.nodeTemplates.delete", // "parameterOrder": [ @@ -89004,7 +93461,8 @@ type NodeTemplatesGetCall struct { } // Get: Returns the specified node template. Gets a list of available -// node templates by making a list() request. +// node templates by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) Get(project string, region string, nodeTemplate string) *NodeTemplatesGetCall { c := &NodeTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89050,6 +93508,7 @@ func (c *NodeTemplatesGetCall) Header() http.Header { func (c *NodeTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89113,7 +93572,7 @@ func (c *NodeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*NodeTemplate, } return ret, nil // { - // "description": "Returns the specified node template. Gets a list of available node templates by making a list() request.", + // "description": "Returns the specified node template. Gets a list of available node templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.get", // "parameterOrder": [ @@ -89171,7 +93630,8 @@ type NodeTemplatesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) GetIamPolicy(project string, region string, resource string) *NodeTemplatesGetIamPolicyCall { c := &NodeTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89180,6 +93640,13 @@ func (r *NodeTemplatesService) GetIamPolicy(project string, region string, resou return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *NodeTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeTemplatesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -89217,6 +93684,7 @@ func (c *NodeTemplatesGetIamPolicyCall) Header() http.Header { func (c *NodeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89280,7 +93748,7 @@ func (c *NodeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.getIamPolicy", // "parameterOrder": [ @@ -89289,6 +93757,12 @@ func (c *NodeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -89337,7 +93811,8 @@ type NodeTemplatesInsertCall struct { } // Insert: Creates a NodeTemplate resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) Insert(project string, region string, nodetemplate *NodeTemplate) *NodeTemplatesInsertCall { c := &NodeTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89392,6 +93867,7 @@ func (c *NodeTemplatesInsertCall) Header() http.Header { func (c *NodeTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89456,7 +93932,7 @@ func (c *NodeTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a NodeTemplate resource in the specified project using the data included in the request.", + // "description": "Creates a NodeTemplate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeTemplates.insert", // "parameterOrder": [ @@ -89512,7 +93988,7 @@ type NodeTemplatesListCall struct { } // List: Retrieves a list of node templates available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) List(project string, region string) *NodeTemplatesListCall { c := &NodeTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89620,6 +94096,7 @@ func (c *NodeTemplatesListCall) Header() http.Header { func (c *NodeTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89682,7 +94159,7 @@ func (c *NodeTemplatesListCall) Do(opts ...googleapi.CallOption) (*NodeTemplateL } return ret, nil // { - // "description": "Retrieves a list of node templates available to the specified project.", + // "description": "Retrieves a list of node templates available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.list", // "parameterOrder": [ @@ -89776,7 +94253,8 @@ type NodeTemplatesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NodeTemplatesSetIamPolicyCall { c := &NodeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89813,6 +94291,7 @@ func (c *NodeTemplatesSetIamPolicyCall) Header() http.Header { func (c *NodeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89878,7 +94357,7 @@ func (c *NodeTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeTemplates.setIamPolicy", // "parameterOrder": [ @@ -89938,7 +94417,7 @@ type NodeTemplatesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeTemplatesTestIamPermissionsCall { c := &NodeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89975,6 +94454,7 @@ func (c *NodeTemplatesTestIamPermissionsCall) Header() http.Header { func (c *NodeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90040,7 +94520,7 @@ func (c *NodeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeTemplates.testIamPermissions", // "parameterOrder": [ @@ -90098,7 +94578,8 @@ type NodeTypesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of node types. +// AggregatedList: Retrieves an aggregated list of node types. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeTypesService) AggregatedList(project string) *NodeTypesAggregatedListCall { c := &NodeTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90205,6 +94686,7 @@ func (c *NodeTypesAggregatedListCall) Header() http.Header { func (c *NodeTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90266,7 +94748,7 @@ func (c *NodeTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTyp } return ret, nil // { - // "description": "Retrieves an aggregated list of node types.", + // "description": "Retrieves an aggregated list of node types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTypes.aggregatedList", // "parameterOrder": [ @@ -90352,7 +94834,8 @@ type NodeTypesGetCall struct { } // Get: Returns the specified node type. Gets a list of available node -// types by making a list() request. +// types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTypesService) Get(project string, zone string, nodeType string) *NodeTypesGetCall { c := &NodeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90398,6 +94881,7 @@ func (c *NodeTypesGetCall) Header() http.Header { func (c *NodeTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90461,7 +94945,7 @@ func (c *NodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, error) { } return ret, nil // { - // "description": "Returns the specified node type. Gets a list of available node types by making a list() request.", + // "description": "Returns the specified node type. Gets a list of available node types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTypes.get", // "parameterOrder": [ @@ -90518,7 +95002,7 @@ type NodeTypesListCall struct { } // List: Retrieves a list of node types available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *NodeTypesService) List(project string, zone string) *NodeTypesListCall { c := &NodeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90626,6 +95110,7 @@ func (c *NodeTypesListCall) Header() http.Header { func (c *NodeTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90688,7 +95173,7 @@ func (c *NodeTypesListCall) Do(opts ...googleapi.CallOption) (*NodeTypeList, err } return ret, nil // { - // "description": "Retrieves a list of node types available to the specified project.", + // "description": "Retrieves a list of node types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTypes.list", // "parameterOrder": [ @@ -90768,6 +95253,1399 @@ func (c *NodeTypesListCall) Pages(ctx context.Context, f func(*NodeTypeList) err } } +// method id "compute.packetMirrorings.aggregatedList": + +type PacketMirroringsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of packetMirrorings. (== +// suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) AggregatedList(project string) *PacketMirroringsAggregatedListCall { + c := &PacketMirroringsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *PacketMirroringsAggregatedListCall) Filter(filter string) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *PacketMirroringsAggregatedListCall) MaxResults(maxResults int64) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *PacketMirroringsAggregatedListCall) OrderBy(orderBy string) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *PacketMirroringsAggregatedListCall) PageToken(pageToken string) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsAggregatedListCall) Fields(s ...googleapi.Field) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PacketMirroringsAggregatedListCall) IfNoneMatch(entityTag string) *PacketMirroringsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsAggregatedListCall) Context(ctx context.Context) *PacketMirroringsAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/packetMirrorings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.aggregatedList" call. +// Exactly one of *PacketMirroringAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *PacketMirroringAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PacketMirroringsAggregatedListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PacketMirroringAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of packetMirrorings. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.packetMirrorings.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/packetMirrorings", + // "response": { + // "$ref": "PacketMirroringAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PacketMirroringsAggregatedListCall) Pages(ctx context.Context, f func(*PacketMirroringAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.packetMirrorings.delete": + +type PacketMirroringsDeleteCall struct { + s *Service + project string + region string + packetMirroring string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified PacketMirroring resource. (== +// suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) Delete(project string, region string, packetMirroring string) *PacketMirroringsDeleteCall { + c := &PacketMirroringsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.packetMirroring = packetMirroring + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PacketMirroringsDeleteCall) RequestId(requestId string) *PacketMirroringsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsDeleteCall) Fields(s ...googleapi.Field) *PacketMirroringsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsDeleteCall) Context(ctx context.Context) *PacketMirroringsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings/{packetMirroring}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "packetMirroring": c.packetMirroring, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PacketMirroringsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified PacketMirroring resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.packetMirrorings.delete", + // "parameterOrder": [ + // "project", + // "region", + // "packetMirroring" + // ], + // "parameters": { + // "packetMirroring": { + // "description": "Name of the PacketMirroring resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.packetMirrorings.get": + +type PacketMirroringsGetCall struct { + s *Service + project string + region string + packetMirroring string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified PacketMirroring resource. (== +// suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) Get(project string, region string, packetMirroring string) *PacketMirroringsGetCall { + c := &PacketMirroringsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.packetMirroring = packetMirroring + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsGetCall) Fields(s ...googleapi.Field) *PacketMirroringsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PacketMirroringsGetCall) IfNoneMatch(entityTag string) *PacketMirroringsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsGetCall) Context(ctx context.Context) *PacketMirroringsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings/{packetMirroring}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "packetMirroring": c.packetMirroring, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.get" call. +// Exactly one of *PacketMirroring or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *PacketMirroring.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PacketMirroringsGetCall) Do(opts ...googleapi.CallOption) (*PacketMirroring, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PacketMirroring{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified PacketMirroring resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.packetMirrorings.get", + // "parameterOrder": [ + // "project", + // "region", + // "packetMirroring" + // ], + // "parameters": { + // "packetMirroring": { + // "description": "Name of the PacketMirroring resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + // "response": { + // "$ref": "PacketMirroring" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.packetMirrorings.insert": + +type PacketMirroringsInsertCall struct { + s *Service + project string + region string + packetmirroring *PacketMirroring + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a PacketMirroring resource in the specified project +// and region using the data included in the request. (== +// suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) Insert(project string, region string, packetmirroring *PacketMirroring) *PacketMirroringsInsertCall { + c := &PacketMirroringsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.packetmirroring = packetmirroring + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PacketMirroringsInsertCall) RequestId(requestId string) *PacketMirroringsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsInsertCall) Fields(s ...googleapi.Field) *PacketMirroringsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsInsertCall) Context(ctx context.Context) *PacketMirroringsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.packetmirroring) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PacketMirroringsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a PacketMirroring resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.packetMirrorings.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings", + // "request": { + // "$ref": "PacketMirroring" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.packetMirrorings.list": + +type PacketMirroringsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of PacketMirroring resources available to the +// specified project and region. (== suppress_warning http-rest-shadowed +// ==) +func (r *PacketMirroringsService) List(project string, region string) *PacketMirroringsListCall { + c := &PacketMirroringsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *PacketMirroringsListCall) Filter(filter string) *PacketMirroringsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *PacketMirroringsListCall) MaxResults(maxResults int64) *PacketMirroringsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *PacketMirroringsListCall) OrderBy(orderBy string) *PacketMirroringsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *PacketMirroringsListCall) PageToken(pageToken string) *PacketMirroringsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsListCall) Fields(s ...googleapi.Field) *PacketMirroringsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PacketMirroringsListCall) IfNoneMatch(entityTag string) *PacketMirroringsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsListCall) Context(ctx context.Context) *PacketMirroringsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.list" call. +// Exactly one of *PacketMirroringList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PacketMirroringList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PacketMirroringsListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &PacketMirroringList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of PacketMirroring resources available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.packetMirrorings.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings", + // "response": { + // "$ref": "PacketMirroringList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PacketMirroringsListCall) Pages(ctx context.Context, f func(*PacketMirroringList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.packetMirrorings.patch": + +type PacketMirroringsPatchCall struct { + s *Service + project string + region string + packetMirroring string + packetmirroring *PacketMirroring + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified PacketMirroring resource with the data +// included in the request. This method supports PATCH semantics and +// uses JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) Patch(project string, region string, packetMirroring string, packetmirroring *PacketMirroring) *PacketMirroringsPatchCall { + c := &PacketMirroringsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.packetMirroring = packetMirroring + c.packetmirroring = packetmirroring + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *PacketMirroringsPatchCall) RequestId(requestId string) *PacketMirroringsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsPatchCall) Fields(s ...googleapi.Field) *PacketMirroringsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsPatchCall) Context(ctx context.Context) *PacketMirroringsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.packetmirroring) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings/{packetMirroring}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "packetMirroring": c.packetMirroring, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PacketMirroringsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PATCH", + // "id": "compute.packetMirrorings.patch", + // "parameterOrder": [ + // "project", + // "region", + // "packetMirroring" + // ], + // "parameters": { + // "packetMirroring": { + // "description": "Name of the PacketMirroring resource to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings/{packetMirroring}", + // "request": { + // "$ref": "PacketMirroring" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.packetMirrorings.testIamPermissions": + +type PacketMirroringsTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. (== suppress_warning http-rest-shadowed ==) +func (r *PacketMirroringsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *PacketMirroringsTestIamPermissionsCall { + c := &PacketMirroringsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PacketMirroringsTestIamPermissionsCall) Fields(s ...googleapi.Field) *PacketMirroringsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PacketMirroringsTestIamPermissionsCall) Context(ctx context.Context) *PacketMirroringsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PacketMirroringsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PacketMirroringsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.packetMirrorings.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PacketMirroringsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.packetMirrorings.testIamPermissions", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.projects.disableXpnHost": type ProjectsDisableXpnHostCall struct { @@ -90779,6 +96657,7 @@ type ProjectsDisableXpnHostCall struct { } // DisableXpnHost: Disable this project as a shared VPC host project. +// (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall { c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90831,6 +96710,7 @@ func (c *ProjectsDisableXpnHostCall) Header() http.Header { func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90889,7 +96769,7 @@ func (c *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Disable this project as a shared VPC host project.", + // "description": "Disable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.disableXpnHost", // "parameterOrder": [ @@ -90932,8 +96812,9 @@ type ProjectsDisableXpnResourceCall struct { header_ http.Header } -// DisableXpnResource: Disable a serivce resource (a.k.a service -// project) associated with this host project. +// DisableXpnResource: Disable a service resource (also known as service +// project) associated with this host project. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall { c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90987,6 +96868,7 @@ func (c *ProjectsDisableXpnResourceCall) Header() http.Header { func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91050,7 +96932,7 @@ func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", + // "description": "Disable a service resource (also known as service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.disableXpnResource", // "parameterOrder": [ @@ -91095,7 +96977,8 @@ type ProjectsEnableXpnHostCall struct { header_ http.Header } -// EnableXpnHost: Enable this project as a shared VPC host project. +// EnableXpnHost: Enable this project as a shared VPC host project. (== +// suppress_warning http-rest-shadowed ==) func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall { c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91148,6 +97031,7 @@ func (c *ProjectsEnableXpnHostCall) Header() http.Header { func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91206,7 +97090,7 @@ func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Enable this project as a shared VPC host project.", + // "description": "Enable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.enableXpnHost", // "parameterOrder": [ @@ -91251,7 +97135,8 @@ type ProjectsEnableXpnResourceCall struct { // EnableXpnResource: Enable service resource (a.k.a service project) // for a host project, so that subnets in the host project can be used -// by instances in the service project. +// by instances in the service project. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall { c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91305,6 +97190,7 @@ func (c *ProjectsEnableXpnResourceCall) Header() http.Header { func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91368,7 +97254,7 @@ func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", + // "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.enableXpnResource", // "parameterOrder": [ @@ -91414,7 +97300,8 @@ type ProjectsGetCall struct { header_ http.Header } -// Get: Returns the specified Project resource. +// Get: Returns the specified Project resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/projects/get func (r *ProjectsService) Get(project string) *ProjectsGetCall { c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -91459,6 +97346,7 @@ func (c *ProjectsGetCall) Header() http.Header { func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91520,7 +97408,7 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { } return ret, nil // { - // "description": "Returns the specified Project resource.", + // "description": "Returns the specified Project resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.projects.get", // "parameterOrder": [ @@ -91560,7 +97448,8 @@ type ProjectsGetXpnHostCall struct { } // GetXpnHost: Gets the shared VPC host project that this project links -// to. May be empty if no link exists. +// to. May be empty if no link exists. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall { c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91604,6 +97493,7 @@ func (c *ProjectsGetXpnHostCall) Header() http.Header { func (c *ProjectsGetXpnHostCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91665,7 +97555,7 @@ func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, err } return ret, nil // { - // "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists.", + // "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.projects.getXpnHost", // "parameterOrder": [ @@ -91704,7 +97594,8 @@ type ProjectsGetXpnResourcesCall struct { } // GetXpnResources: Gets service resources (a.k.a service project) -// associated with this host project. +// associated with this host project. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall { c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91811,6 +97702,7 @@ func (c *ProjectsGetXpnResourcesCall) Header() http.Header { func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91872,7 +97764,7 @@ func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*Project } return ret, nil // { - // "description": "Gets service resources (a.k.a service project) associated with this host project.", + // "description": "Gets service resources (a.k.a service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.projects.getXpnResources", // "parameterOrder": [ @@ -91955,7 +97847,7 @@ type ProjectsListXpnHostsCall struct { } // ListXpnHosts: Lists all shared VPC host projects visible to the user -// in an organization. +// in an organization. (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall { c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92053,6 +97945,7 @@ func (c *ProjectsListXpnHostsCall) Header() http.Header { func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92116,7 +98009,7 @@ func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostLis } return ret, nil // { - // "description": "Lists all shared VPC host projects visible to the user in an organization.", + // "description": "Lists all shared VPC host projects visible to the user in an organization. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.listXpnHosts", // "parameterOrder": [ @@ -92201,7 +98094,8 @@ type ProjectsMoveDiskCall struct { header_ http.Header } -// MoveDisk: Moves a persistent disk from one zone to another. +// MoveDisk: Moves a persistent disk from one zone to another. (== +// suppress_warning http-rest-shadowed ==) func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall { c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92255,6 +98149,7 @@ func (c *ProjectsMoveDiskCall) Header() http.Header { func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92318,7 +98213,7 @@ func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Moves a persistent disk from one zone to another.", + // "description": "Moves a persistent disk from one zone to another. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.moveDisk", // "parameterOrder": [ @@ -92365,7 +98260,7 @@ type ProjectsMoveInstanceCall struct { } // MoveInstance: Moves an instance and its attached persistent disks -// from one zone to another. +// from one zone to another. (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall { c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92419,6 +98314,7 @@ func (c *ProjectsMoveInstanceCall) Header() http.Header { func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92482,7 +98378,7 @@ func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Moves an instance and its attached persistent disks from one zone to another.", + // "description": "Moves an instance and its attached persistent disks from one zone to another. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.moveInstance", // "parameterOrder": [ @@ -92530,6 +98426,7 @@ type ProjectsSetCommonInstanceMetadataCall struct { // SetCommonInstanceMetadata: Sets metadata common to all instances // within the specified project using the data included in the request. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setCommonInstanceMetadata func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall { c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -92584,6 +98481,7 @@ func (c *ProjectsSetCommonInstanceMetadataCall) Header() http.Header { func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92647,7 +98545,7 @@ func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets metadata common to all instances within the specified project using the data included in the request.", + // "description": "Sets metadata common to all instances within the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.setCommonInstanceMetadata", // "parameterOrder": [ @@ -92696,7 +98594,7 @@ type ProjectsSetDefaultNetworkTierCall struct { // SetDefaultNetworkTier: Sets the default network tier of the project. // The default network tier is used when an // address/forwardingRule/instance is created without specifying the -// network tier field. +// network tier field. (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) SetDefaultNetworkTier(project string, projectssetdefaultnetworktierrequest *ProjectsSetDefaultNetworkTierRequest) *ProjectsSetDefaultNetworkTierCall { c := &ProjectsSetDefaultNetworkTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92750,6 +98648,7 @@ func (c *ProjectsSetDefaultNetworkTierCall) Header() http.Header { func (c *ProjectsSetDefaultNetworkTierCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92813,7 +98712,7 @@ func (c *ProjectsSetDefaultNetworkTierCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.", + // "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.setDefaultNetworkTier", // "parameterOrder": [ @@ -92862,7 +98761,7 @@ type ProjectsSetUsageExportBucketCall struct { // SetUsageExportBucket: Enables the usage export feature and sets the // usage export bucket where reports are stored. If you provide an empty // request body using this method, the usage export feature will be -// disabled. +// disabled. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setUsageExportBucket func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall { c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -92917,6 +98816,7 @@ func (c *ProjectsSetUsageExportBucketCall) Header() http.Header { func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92980,7 +98880,7 @@ func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", + // "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.setUsageExportBucket", // "parameterOrder": [ @@ -93030,7 +98930,8 @@ type RegionAutoscalersDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified autoscaler. +// Delete: Deletes the specified autoscaler. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93085,6 +98986,7 @@ func (c *RegionAutoscalersDeleteCall) Header() http.Header { func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93145,7 +99047,7 @@ func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified autoscaler.", + // "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionAutoscalers.delete", // "parameterOrder": [ @@ -93206,7 +99108,8 @@ type RegionAutoscalersGetCall struct { header_ http.Header } -// Get: Returns the specified autoscaler. +// Get: Returns the specified autoscaler. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93252,6 +99155,7 @@ func (c *RegionAutoscalersGetCall) Header() http.Header { func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93315,7 +99219,7 @@ func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler } return ret, nil // { - // "description": "Returns the specified autoscaler.", + // "description": "Returns the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionAutoscalers.get", // "parameterOrder": [ @@ -93372,7 +99276,7 @@ type RegionAutoscalersInsertCall struct { } // Insert: Creates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93427,6 +99331,7 @@ func (c *RegionAutoscalersInsertCall) Header() http.Header { func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93491,7 +99396,7 @@ func (c *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", + // "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionAutoscalers.insert", // "parameterOrder": [ @@ -93547,7 +99452,7 @@ type RegionAutoscalersListCall struct { } // List: Retrieves a list of autoscalers contained within the specified -// region. +// region. (== suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93655,6 +99560,7 @@ func (c *RegionAutoscalersListCall) Header() http.Header { func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93717,7 +99623,7 @@ func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAut } return ret, nil // { - // "description": "Retrieves a list of autoscalers contained within the specified region.", + // "description": "Retrieves a list of autoscalers contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionAutoscalers.list", // "parameterOrder": [ @@ -93811,7 +99717,8 @@ type RegionAutoscalersPatchCall struct { // Patch: Updates an autoscaler in the specified project using the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93873,6 +99780,7 @@ func (c *RegionAutoscalersPatchCall) Header() http.Header { func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93937,7 +99845,7 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionAutoscalers.patch", // "parameterOrder": [ @@ -94000,7 +99908,7 @@ type RegionAutoscalersTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionAutoscalersTestIamPermissionsCall { c := &RegionAutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94037,6 +99945,7 @@ func (c *RegionAutoscalersTestIamPermissionsCall) Header() http.Header { func (c *RegionAutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94102,7 +100011,7 @@ func (c *RegionAutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionAutoscalers.testIamPermissions", // "parameterOrder": [ @@ -94162,7 +100071,7 @@ type RegionAutoscalersUpdateCall struct { } // Update: Updates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94224,6 +100133,7 @@ func (c *RegionAutoscalersUpdateCall) Header() http.Header { func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94288,7 +100198,7 @@ func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionAutoscalers.update", // "parameterOrder": [ @@ -94349,7 +100259,8 @@ type RegionBackendServicesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified regional BackendService resource. +// Delete: Deletes the specified regional BackendService resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94404,6 +100315,7 @@ func (c *RegionBackendServicesDeleteCall) Header() http.Header { func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94464,7 +100376,7 @@ func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified regional BackendService resource.", + // "description": "Deletes the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionBackendServices.delete", // "parameterOrder": [ @@ -94525,7 +100437,8 @@ type RegionBackendServicesGetCall struct { header_ http.Header } -// Get: Returns the specified regional BackendService resource. +// Get: Returns the specified regional BackendService resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94571,6 +100484,7 @@ func (c *RegionBackendServicesGetCall) Header() http.Header { func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94634,7 +100548,7 @@ func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*Backen } return ret, nil // { - // "description": "Returns the specified regional BackendService resource.", + // "description": "Returns the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionBackendServices.get", // "parameterOrder": [ @@ -94692,7 +100606,7 @@ type RegionBackendServicesGetHealthCall struct { } // GetHealth: Gets the most recent health check results for this -// regional BackendService. +// regional BackendService. (== suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94729,6 +100643,7 @@ func (c *RegionBackendServicesGetHealthCall) Header() http.Header { func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94794,7 +100709,7 @@ func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the most recent health check results for this regional BackendService.", + // "description": "Gets the most recent health check results for this regional BackendService. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionBackendServices.getHealth", // "parameterOrder": [ @@ -94856,7 +100771,7 @@ type RegionBackendServicesInsertCall struct { // project using the data included in the request. There are several // restrictions and guidelines to keep in mind when creating a regional // backend service. Read Restrictions and Guidelines for more -// information. +// information. (== suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94911,6 +100826,7 @@ func (c *RegionBackendServicesInsertCall) Header() http.Header { func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94975,7 +100891,7 @@ func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", + // "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionBackendServices.insert", // "parameterOrder": [ @@ -95031,7 +100947,8 @@ type RegionBackendServicesListCall struct { } // List: Retrieves the list of regional BackendService resources -// available to the specified project in the given region. +// available to the specified project in the given region. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95139,6 +101056,7 @@ func (c *RegionBackendServicesListCall) Header() http.Header { func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95201,7 +101119,7 @@ func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*Backe } return ret, nil // { - // "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", + // "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionBackendServices.list", // "parameterOrder": [ @@ -95299,7 +101217,7 @@ type RegionBackendServicesPatchCall struct { // guidelines to keep in mind when updating a backend service. Read // Restrictions and Guidelines for more information. This method // supports PATCH semantics and uses the JSON merge patch format and -// processing rules. +// processing rules. (== suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95355,6 +101273,7 @@ func (c *RegionBackendServicesPatchCall) Header() http.Header { func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95420,7 +101339,7 @@ func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionBackendServices.patch", // "parameterOrder": [ @@ -95485,7 +101404,7 @@ type RegionBackendServicesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95522,6 +101441,7 @@ func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95587,7 +101507,7 @@ func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionBackendServices.testIamPermissions", // "parameterOrder": [ @@ -95650,7 +101570,8 @@ type RegionBackendServicesUpdateCall struct { // Update: Updates the specified regional BackendService resource with // the data included in the request. There are several restrictions and // guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. +// Restrictions and Guidelines for more information. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95706,6 +101627,7 @@ func (c *RegionBackendServicesUpdateCall) Header() http.Header { func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95771,7 +101693,7 @@ func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionBackendServices.update", // "parameterOrder": [ @@ -95833,7 +101755,8 @@ type RegionCommitmentsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of commitments. +// AggregatedList: Retrieves an aggregated list of commitments. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95940,6 +101863,7 @@ func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96001,7 +101925,7 @@ func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves an aggregated list of commitments.", + // "description": "Retrieves an aggregated list of commitments. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionCommitments.aggregatedList", // "parameterOrder": [ @@ -96087,7 +102011,8 @@ type RegionCommitmentsGetCall struct { } // Get: Returns the specified commitment resource. Gets a list of -// available commitments by making a list() request. +// available commitments by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96133,6 +102058,7 @@ func (c *RegionCommitmentsGetCall) Header() http.Header { func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96196,7 +102122,7 @@ func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment } return ret, nil // { - // "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request.", + // "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionCommitments.get", // "parameterOrder": [ @@ -96253,7 +102179,7 @@ type RegionCommitmentsInsertCall struct { } // Insert: Creates a commitment in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96308,6 +102234,7 @@ func (c *RegionCommitmentsInsertCall) Header() http.Header { func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96372,7 +102299,7 @@ func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a commitment in the specified project using the data included in the request.", + // "description": "Creates a commitment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionCommitments.insert", // "parameterOrder": [ @@ -96428,7 +102355,7 @@ type RegionCommitmentsListCall struct { } // List: Retrieves a list of commitments contained within the specified -// region. +// region. (== suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96536,6 +102463,7 @@ func (c *RegionCommitmentsListCall) Header() http.Header { func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96598,7 +102526,7 @@ func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*Commitmen } return ret, nil // { - // "description": "Retrieves a list of commitments contained within the specified region.", + // "description": "Retrieves a list of commitments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionCommitments.list", // "parameterOrder": [ @@ -96692,7 +102620,8 @@ type RegionCommitmentsUpdateReservationsCall struct { } // UpdateReservations: Update the shape of reservations for GPUS/Local -// SSDs of reservations within the commitments. +// SSDs of reservations within the commitments. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionCommitmentsService) UpdateReservations(project string, region string, commitment string, regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest) *RegionCommitmentsUpdateReservationsCall { c := &RegionCommitmentsUpdateReservationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96748,6 +102677,7 @@ func (c *RegionCommitmentsUpdateReservationsCall) Header() http.Header { func (c *RegionCommitmentsUpdateReservationsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96813,7 +102743,7 @@ func (c *RegionCommitmentsUpdateReservationsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Update the shape of reservations for GPUS/Local SSDs of reservations within the commitments.", + // "description": "Update the shape of reservations for GPUS/Local SSDs of reservations within the commitments. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionCommitments.updateReservations", // "parameterOrder": [ @@ -96823,7 +102753,7 @@ func (c *RegionCommitmentsUpdateReservationsCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "commitment": { - // "description": "Name of the commitment of which the reservation's capacities are being updated.", + // "description": "Name of the commitment for which the reservation is being updated.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -96878,7 +102808,8 @@ type RegionDiskTypesGetCall struct { } // Get: Returns the specified regional disk type. Gets a list of -// available disk types by making a list() request. +// available disk types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96924,6 +102855,7 @@ func (c *RegionDiskTypesGetCall) Header() http.Header { func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96987,7 +102919,7 @@ func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, er } return ret, nil // { - // "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request.", + // "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDiskTypes.get", // "parameterOrder": [ @@ -97044,7 +102976,7 @@ type RegionDiskTypesListCall struct { } // List: Retrieves a list of regional disk types available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -97152,6 +103084,7 @@ func (c *RegionDiskTypesListCall) Header() http.Header { func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97214,7 +103147,7 @@ func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskT } return ret, nil // { - // "description": "Retrieves a list of regional disk types available to the specified project.", + // "description": "Retrieves a list of regional disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDiskTypes.list", // "parameterOrder": [ @@ -97309,7 +103242,8 @@ type RegionDisksAddResourcePoliciesCall struct { // AddResourcePolicies: Adds existing resource policies to a regional // disk. You can only add one policy which will be applied to this disk -// for scheduling snapshot creation. +// for scheduling snapshot creation. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDisksService) AddResourcePolicies(project string, region string, disk string, regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest) *RegionDisksAddResourcePoliciesCall { c := &RegionDisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -97365,6 +103299,7 @@ func (c *RegionDisksAddResourcePoliciesCall) Header() http.Header { func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97430,7 +103365,7 @@ func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.", + // "description": "Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.addResourcePolicies", // "parameterOrder": [ @@ -97494,7 +103429,8 @@ type RegionDisksCreateSnapshotCall struct { header_ http.Header } -// CreateSnapshot: Creates a snapshot of this regional disk. +// CreateSnapshot: Creates a snapshot of this regional disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -97550,6 +103486,7 @@ func (c *RegionDisksCreateSnapshotCall) Header() http.Header { func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97615,7 +103552,7 @@ func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Creates a snapshot of this regional disk.", + // "description": "Creates a snapshot of this regional disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.createSnapshot", // "parameterOrder": [ @@ -97682,6 +103619,7 @@ type RegionDisksDeleteCall struct { // regional disk removes all the replicas of its data permanently and is // irreversible. However, deleting a disk does not delete any snapshots // previously made from the disk. You must separately delete snapshots. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -97736,6 +103674,7 @@ func (c *RegionDisksDeleteCall) Header() http.Header { func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97796,7 +103735,7 @@ func (c *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + // "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionDisks.delete", // "parameterOrder": [ @@ -97856,7 +103795,8 @@ type RegionDisksGetCall struct { header_ http.Header } -// Get: Returns a specified regional persistent disk. +// Get: Returns a specified regional persistent disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -97902,6 +103842,7 @@ func (c *RegionDisksGetCall) Header() http.Header { func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97965,7 +103906,7 @@ func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { } return ret, nil // { - // "description": "Returns a specified regional persistent disk.", + // "description": "Returns a specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDisks.get", // "parameterOrder": [ @@ -98023,7 +103964,8 @@ type RegionDisksGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDisksService) GetIamPolicy(project string, region string, resource string) *RegionDisksGetIamPolicyCall { c := &RegionDisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98032,6 +103974,13 @@ func (r *RegionDisksService) GetIamPolicy(project string, region string, resourc return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *RegionDisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionDisksGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -98069,6 +104018,7 @@ func (c *RegionDisksGetIamPolicyCall) Header() http.Header { func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98132,7 +104082,7 @@ func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDisks.getIamPolicy", // "parameterOrder": [ @@ -98141,6 +104091,12 @@ func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -98189,7 +104145,8 @@ type RegionDisksInsertCall struct { } // Insert: Creates a persistent regional disk in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98251,6 +104208,7 @@ func (c *RegionDisksInsertCall) Header() http.Header { func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98315,7 +104273,7 @@ func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates a persistent regional disk in the specified project using the data included in the request.", + // "description": "Creates a persistent regional disk in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.insert", // "parameterOrder": [ @@ -98376,7 +104334,7 @@ type RegionDisksListCall struct { } // List: Retrieves the list of persistent disks contained within the -// specified region. +// specified region. (== suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98484,6 +104442,7 @@ func (c *RegionDisksListCall) Header() http.Header { func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98546,7 +104505,7 @@ func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error } return ret, nil // { - // "description": "Retrieves the list of persistent disks contained within the specified region.", + // "description": "Retrieves the list of persistent disks contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDisks.list", // "parameterOrder": [ @@ -98640,7 +104599,7 @@ type RegionDisksRemoveResourcePoliciesCall struct { } // RemoveResourcePolicies: Removes resource policies from a regional -// disk. +// disk. (== suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) RemoveResourcePolicies(project string, region string, disk string, regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest) *RegionDisksRemoveResourcePoliciesCall { c := &RegionDisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98696,6 +104655,7 @@ func (c *RegionDisksRemoveResourcePoliciesCall) Header() http.Header { func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98761,7 +104721,7 @@ func (c *RegionDisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Removes resource policies from a regional disk.", + // "description": "Removes resource policies from a regional disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.removeResourcePolicies", // "parameterOrder": [ @@ -98825,7 +104785,8 @@ type RegionDisksResizeCall struct { header_ http.Header } -// Resize: Resizes the specified regional persistent disk. +// Resize: Resizes the specified regional persistent disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98881,6 +104842,7 @@ func (c *RegionDisksResizeCall) Header() http.Header { func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98946,7 +104908,7 @@ func (c *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Resizes the specified regional persistent disk.", + // "description": "Resizes the specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.resize", // "parameterOrder": [ @@ -99011,7 +104973,8 @@ type RegionDisksSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDisksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionDisksSetIamPolicyCall { c := &RegionDisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99048,6 +105011,7 @@ func (c *RegionDisksSetIamPolicyCall) Header() http.Header { func (c *RegionDisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99113,7 +105077,7 @@ func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.setIamPolicy", // "parameterOrder": [ @@ -99172,7 +105136,8 @@ type RegionDisksSetLabelsCall struct { header_ http.Header } -// SetLabels: Sets the labels on the target regional disk. +// SetLabels: Sets the labels on the target regional disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99228,6 +105193,7 @@ func (c *RegionDisksSetLabelsCall) Header() http.Header { func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99293,7 +105259,7 @@ func (c *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Sets the labels on the target regional disk.", + // "description": "Sets the labels on the target regional disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.setLabels", // "parameterOrder": [ @@ -99358,7 +105324,7 @@ type RegionDisksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { c := &RegionDisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99395,6 +105361,7 @@ func (c *RegionDisksTestIamPermissionsCall) Header() http.Header { func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99460,7 +105427,7 @@ func (c *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.testIamPermissions", // "parameterOrder": [ @@ -99519,7 +105486,8 @@ type RegionHealthChecksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified HealthCheck resource. +// Delete: Deletes the specified HealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionHealthChecksService) Delete(project string, region string, healthCheck string) *RegionHealthChecksDeleteCall { c := &RegionHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99574,6 +105542,7 @@ func (c *RegionHealthChecksDeleteCall) Header() http.Header { func (c *RegionHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99634,7 +105603,7 @@ func (c *RegionHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Deletes the specified HealthCheck resource.", + // "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionHealthChecks.delete", // "parameterOrder": [ @@ -99696,7 +105665,8 @@ type RegionHealthChecksGetCall struct { } // Get: Returns the specified HealthCheck resource. Gets a list of -// available health checks by making a list() request. +// available health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionHealthChecksService) Get(project string, region string, healthCheck string) *RegionHealthChecksGetCall { c := &RegionHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99742,6 +105712,7 @@ func (c *RegionHealthChecksGetCall) Header() http.Header { func (c *RegionHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99805,7 +105776,7 @@ func (c *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthChe } return ret, nil // { - // "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", + // "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionHealthChecks.get", // "parameterOrder": [ @@ -99862,7 +105833,8 @@ type RegionHealthChecksInsertCall struct { } // Insert: Creates a HealthCheck resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionHealthChecksService) Insert(project string, region string, healthcheck *HealthCheck) *RegionHealthChecksInsertCall { c := &RegionHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99917,6 +105889,7 @@ func (c *RegionHealthChecksInsertCall) Header() http.Header { func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99981,7 +105954,7 @@ func (c *RegionHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + // "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionHealthChecks.insert", // "parameterOrder": [ @@ -100037,7 +106010,7 @@ type RegionHealthChecksListCall struct { } // List: Retrieves the list of HealthCheck resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *RegionHealthChecksService) List(project string, region string) *RegionHealthChecksListCall { c := &RegionHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -100145,6 +106118,7 @@ func (c *RegionHealthChecksListCall) Header() http.Header { func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100207,7 +106181,7 @@ func (c *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCh } return ret, nil // { - // "description": "Retrieves the list of HealthCheck resources available to the specified project.", + // "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionHealthChecks.list", // "parameterOrder": [ @@ -100303,6 +106277,7 @@ type RegionHealthChecksPatchCall struct { // Patch: Updates a HealthCheck resource in the specified project using // the data included in the request. This method supports PATCH // semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionHealthChecksService) Patch(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksPatchCall { c := &RegionHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -100358,6 +106333,7 @@ func (c *RegionHealthChecksPatchCall) Header() http.Header { func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100423,7 +106399,7 @@ func (c *RegionHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionHealthChecks.patch", // "parameterOrder": [ @@ -100488,7 +106464,8 @@ type RegionHealthChecksUpdateCall struct { } // Update: Updates a HealthCheck resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionHealthChecksService) Update(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksUpdateCall { c := &RegionHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -100544,6 +106521,7 @@ func (c *RegionHealthChecksUpdateCall) Header() http.Header { func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100609,7 +106587,7 @@ func (c *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionHealthChecks.update", // "parameterOrder": [ @@ -100689,7 +106667,7 @@ type RegionInstanceGroupManagersAbandonInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest) *RegionInstanceGroupManagersAbandonInstancesCall { c := &RegionInstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -100745,6 +106723,7 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header { func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100810,7 +106789,7 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.abandonInstances", // "parameterOrder": [ @@ -100873,7 +106852,7 @@ type RegionInstanceGroupManagersApplyUpdatesToInstancesCall struct { } // ApplyUpdatesToInstances: Apply updates to selected instances the -// managed instance group. +// managed instance group. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) ApplyUpdatesToInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { c := &RegionInstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -100910,6 +106889,7 @@ func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.H func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100975,7 +106955,7 @@ func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...goog } return ret, nil // { - // "description": "Apply updates to selected instances the managed instance group.", + // "description": "Apply updates to selected instances the managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.applyUpdatesToInstances", // "parameterOrder": [ @@ -101019,6 +106999,195 @@ func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...goog } +// method id "compute.regionInstanceGroupManagers.createInstances": + +type RegionInstanceGroupManagersCreateInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerscreateinstancesrequest *RegionInstanceGroupManagersCreateInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CreateInstances: Creates instances with per-instance configs in this +// regional managed instance group. Instances are created using the +// current instance template. The create instances operation is marked +// DONE if the createInstances request is successful. The underlying +// actions take additional time. You must separately verify the status +// of the creating or actions with the listmanagedinstances method. (== +// suppress_warning http-rest-shadowed ==) +func (r *RegionInstanceGroupManagersService) CreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagerscreateinstancesrequest *RegionInstanceGroupManagersCreateInstancesRequest) *RegionInstanceGroupManagersCreateInstancesCall { + c := &RegionInstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.regioninstancegroupmanagerscreateinstancesrequest = regioninstancegroupmanagerscreateinstancesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionInstanceGroupManagersCreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersCreateInstancesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionInstanceGroupManagersCreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersCreateInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionInstanceGroupManagersCreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersCreateInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionInstanceGroupManagersCreateInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerscreateinstancesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.createInstances" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionInstanceGroupManagers.createInstances", + // "parameterOrder": [ + // "project", + // "region", + // "instanceGroupManager" + // ], + // "parameters": { + // "instanceGroupManager": { + // "description": "The name of the managed instance group. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region where the managed instance group is located. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances", + // "request": { + // "$ref": "RegionInstanceGroupManagersCreateInstancesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionInstanceGroupManagers.delete": type RegionInstanceGroupManagersDeleteCall struct { @@ -101032,7 +107201,7 @@ type RegionInstanceGroupManagersDeleteCall struct { } // Delete: Deletes the specified managed instance group and all of the -// instances in that group. +// instances in that group. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Delete(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersDeleteCall { c := &RegionInstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -101087,6 +107256,7 @@ func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header { func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101147,7 +107317,7 @@ func (c *RegionInstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes the specified managed instance group and all of the instances in that group.", + // "description": "Deletes the specified managed instance group and all of the instances in that group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionInstanceGroupManagers.delete", // "parameterOrder": [ @@ -101222,7 +107392,7 @@ type RegionInstanceGroupManagersDeleteInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest) *RegionInstanceGroupManagersDeleteInstancesCall { c := &RegionInstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -101278,6 +107448,7 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header { func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101343,7 +107514,7 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.deleteInstances", // "parameterOrder": [ @@ -101406,7 +107577,7 @@ type RegionInstanceGroupManagersGetCall struct { } // Get: Returns all of the details about the specified managed instance -// group. +// group. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Get(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersGetCall { c := &RegionInstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -101452,6 +107623,7 @@ func (c *RegionInstanceGroupManagersGetCall) Header() http.Header { func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101515,7 +107687,7 @@ func (c *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns all of the details about the specified managed instance group.", + // "description": "Returns all of the details about the specified managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroupManagers.get", // "parameterOrder": [ @@ -101578,6 +107750,7 @@ type RegionInstanceGroupManagersInsertCall struct { // listmanagedinstances method. // // A regional managed instance group can contain up to 2000 instances. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Insert(project string, region string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersInsertCall { c := &RegionInstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -101632,6 +107805,7 @@ func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header { func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101696,7 +107870,7 @@ func (c *RegionInstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", + // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.insert", // "parameterOrder": [ @@ -101751,7 +107925,8 @@ type RegionInstanceGroupManagersListCall struct { } // List: Retrieves the list of managed instance groups that are -// contained within the specified region. +// contained within the specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) List(project string, region string) *RegionInstanceGroupManagersListCall { c := &RegionInstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -101859,6 +108034,7 @@ func (c *RegionInstanceGroupManagersListCall) Header() http.Header { func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101921,7 +108097,7 @@ func (c *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves the list of managed instance groups that are contained within the specified region.", + // "description": "Retrieves the list of managed instance groups that are contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroupManagers.list", // "parameterOrder": [ @@ -102015,7 +108191,7 @@ type RegionInstanceGroupManagersListManagedInstancesCall struct { // ListManagedInstances: Lists the instances in the managed instance // group and instances that are scheduled to be created. The list // includes any current actions that the group has scheduled for its -// instances. +// instances. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall { c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102114,6 +108290,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Head func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102176,7 +108353,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", + // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.listManagedInstances", // "parameterOrder": [ @@ -102281,7 +108458,7 @@ type RegionInstanceGroupManagersPatchCall struct { // process of being patched. You must separately verify the status of // the individual instances with the listmanagedinstances method. This // method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. +// and processing rules. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall { c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102337,6 +108514,7 @@ func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102402,7 +108580,7 @@ func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionInstanceGroupManagers.patch", // "parameterOrder": [ @@ -102478,7 +108656,7 @@ type RegionInstanceGroupManagersRecreateInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102534,6 +108712,7 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102599,7 +108778,7 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.recreateInstances", // "parameterOrder": [ @@ -102673,6 +108852,7 @@ type RegionInstanceGroupManagersResizeCall struct { // If the group is part of a backend service that has enabled connection // draining, it can take up to 60 seconds after the connection draining // duration has elapsed before the VM instance is removed or deleted. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102728,6 +108908,7 @@ func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102788,7 +108969,7 @@ func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.resize", // "parameterOrder": [ @@ -102858,7 +109039,8 @@ type RegionInstanceGroupManagersSetAutoHealingPoliciesCall struct { // SetAutoHealingPolicies: Modifies the autohealing policy for the // instances in this managed instance group. [Deprecated] This method is -// deprecated. Please use Patch instead. +// deprecated. Please use Patch instead. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) SetAutoHealingPolicies(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall { c := &RegionInstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102914,6 +109096,7 @@ func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.He func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102979,7 +109162,7 @@ func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googl } return ret, nil // { - // "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead.", + // "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Please use Patch instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", // "parameterOrder": [ @@ -103043,7 +109226,8 @@ type RegionInstanceGroupManagersSetInstanceTemplateCall struct { // SetInstanceTemplate: Sets the instance template to use when creating // new instances or recreating instances in this group. Existing -// instances are not affected. +// instances are not affected. (== suppress_warning http-rest-shadowed +// ==) func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103099,6 +109283,7 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Heade func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103164,7 +109349,7 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", + // "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", // "parameterOrder": [ @@ -103228,7 +109413,7 @@ type RegionInstanceGroupManagersSetTargetPoolsCall struct { // SetTargetPools: Modifies the target pools to which all new instances // in this group are assigned. Existing instances in the group are not -// affected. +// affected. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103284,6 +109469,7 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103349,7 +109535,7 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", + // "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.setTargetPools", // "parameterOrder": [ @@ -103412,7 +109598,7 @@ type RegionInstanceGroupManagersTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupManagersTestIamPermissionsCall { c := &RegionInstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103449,6 +109635,7 @@ func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Header() http.Header func (c *RegionInstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103514,7 +109701,7 @@ func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.testIamPermissions", // "parameterOrder": [ @@ -103578,7 +109765,8 @@ type RegionInstanceGroupManagersUpdateCall struct { // you specify in the request. This operation is marked as DONE when the // group is updated even if the instances in the group have not yet been // updated. You must separately verify the status of the individual -// instances with the listmanagedinstances method. +// instances with the listmanagedinstances method. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Update(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersUpdateCall { c := &RegionInstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103634,6 +109822,7 @@ func (c *RegionInstanceGroupManagersUpdateCall) Header() http.Header { func (c *RegionInstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103699,7 +109888,7 @@ func (c *RegionInstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionInstanceGroupManagers.update", // "parameterOrder": [ @@ -103761,7 +109950,8 @@ type RegionInstanceGroupsGetCall struct { header_ http.Header } -// Get: Returns the specified instance group resource. +// Get: Returns the specified instance group resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupsService) Get(project string, region string, instanceGroup string) *RegionInstanceGroupsGetCall { c := &RegionInstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103807,6 +109997,7 @@ func (c *RegionInstanceGroupsGetCall) Header() http.Header { func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103870,7 +110061,7 @@ func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*Instanc } return ret, nil // { - // "description": "Returns the specified instance group resource.", + // "description": "Returns the specified instance group resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroups.get", // "parameterOrder": [ @@ -103925,7 +110116,7 @@ type RegionInstanceGroupsListCall struct { } // List: Retrieves the list of instance group resources contained within -// the specified region. +// the specified region. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupsService) List(project string, region string) *RegionInstanceGroupsListCall { c := &RegionInstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -104033,6 +110224,7 @@ func (c *RegionInstanceGroupsListCall) Header() http.Header { func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104095,7 +110287,7 @@ func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*Region } return ret, nil // { - // "description": "Retrieves the list of instance group resources contained within the specified region.", + // "description": "Retrieves the list of instance group resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroups.list", // "parameterOrder": [ @@ -104190,7 +110382,8 @@ type RegionInstanceGroupsListInstancesCall struct { // ListInstances: Lists the instances in the specified instance group // and displays information about the named ports. Depending on the // specified options, this method can list all instances or only the -// instances that are running. +// instances that are running. (== suppress_warning http-rest-shadowed +// ==) func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall { c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -104290,6 +110483,7 @@ func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header { func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104356,7 +110550,7 @@ func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", + // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroups.listInstances", // "parameterOrder": [ @@ -104459,7 +110653,7 @@ type RegionInstanceGroupsSetNamedPortsCall struct { } // SetNamedPorts: Sets the named ports for the specified regional -// instance group. +// instance group. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region string, instanceGroup string, regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest) *RegionInstanceGroupsSetNamedPortsCall { c := &RegionInstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -104515,6 +110709,7 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header { func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104580,7 +110775,7 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the named ports for the specified regional instance group.", + // "description": "Sets the named ports for the specified regional instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroups.setNamedPorts", // "parameterOrder": [ @@ -104643,7 +110838,7 @@ type RegionInstanceGroupsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupsTestIamPermissionsCall { c := &RegionInstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -104680,6 +110875,7 @@ func (c *RegionInstanceGroupsTestIamPermissionsCall) Header() http.Header { func (c *RegionInstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104745,7 +110941,7 @@ func (c *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroups.testIamPermissions", // "parameterOrder": [ @@ -104805,6 +111001,7 @@ type RegionOperationsDeleteCall struct { } // Delete: Deletes the specified region-specific Operations resource. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/delete func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall { c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -104841,6 +111038,7 @@ func (c *RegionOperationsDeleteCall) Header() http.Header { func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104876,7 +111074,7 @@ func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deletes the specified region-specific Operations resource.", + // "description": "Deletes the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionOperations.delete", // "parameterOrder": [ @@ -104929,7 +111127,8 @@ type RegionOperationsGetCall struct { header_ http.Header } -// Get: Retrieves the specified region-specific Operations resource. +// Get: Retrieves the specified region-specific Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/get func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall { c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -104976,6 +111175,7 @@ func (c *RegionOperationsGetCall) Header() http.Header { func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105039,7 +111239,7 @@ func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Retrieves the specified region-specific Operations resource.", + // "description": "Retrieves the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionOperations.get", // "parameterOrder": [ @@ -105096,7 +111296,7 @@ type RegionOperationsListCall struct { } // List: Retrieves a list of Operation resources contained within the -// specified region. +// specified region. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/list func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall { c := &RegionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -105205,6 +111405,7 @@ func (c *RegionOperationsListCall) Header() http.Header { func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105267,7 +111468,7 @@ func (c *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified region.", + // "description": "Retrieves a list of Operation resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionOperations.list", // "parameterOrder": [ @@ -105360,6 +111561,7 @@ type RegionSslCertificatesDeleteCall struct { } // Delete: Deletes the specified SslCertificate resource in the region. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionSslCertificatesService) Delete(project string, region string, sslCertificate string) *RegionSslCertificatesDeleteCall { c := &RegionSslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -105414,6 +111616,7 @@ func (c *RegionSslCertificatesDeleteCall) Header() http.Header { func (c *RegionSslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105474,7 +111677,7 @@ func (c *RegionSslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified SslCertificate resource in the region.", + // "description": "Deletes the specified SslCertificate resource in the region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionSslCertificates.delete", // "parameterOrder": [ @@ -105537,7 +111740,7 @@ type RegionSslCertificatesGetCall struct { // Get: Returns the specified SslCertificate resource in the specified // region. Get a list of available SSL certificates by making a list() -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *RegionSslCertificatesService) Get(project string, region string, sslCertificate string) *RegionSslCertificatesGetCall { c := &RegionSslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -105583,6 +111786,7 @@ func (c *RegionSslCertificatesGetCall) Header() http.Header { func (c *RegionSslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105646,7 +111850,7 @@ func (c *RegionSslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCer } return ret, nil // { - // "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.", + // "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionSslCertificates.get", // "parameterOrder": [ @@ -105703,7 +111907,8 @@ type RegionSslCertificatesInsertCall struct { } // Insert: Creates a SslCertificate resource in the specified project -// and region using the data included in the request +// and region using the data included in the request (== +// suppress_warning http-rest-shadowed ==) func (r *RegionSslCertificatesService) Insert(project string, region string, sslcertificate *SslCertificate) *RegionSslCertificatesInsertCall { c := &RegionSslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -105758,6 +111963,7 @@ func (c *RegionSslCertificatesInsertCall) Header() http.Header { func (c *RegionSslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105822,7 +112028,7 @@ func (c *RegionSslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request", + // "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionSslCertificates.insert", // "parameterOrder": [ @@ -105878,7 +112084,8 @@ type RegionSslCertificatesListCall struct { } // List: Retrieves the list of SslCertificate resources available to the -// specified project in the specified region. +// specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionSslCertificatesService) List(project string, region string) *RegionSslCertificatesListCall { c := &RegionSslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -105986,6 +112193,7 @@ func (c *RegionSslCertificatesListCall) Header() http.Header { func (c *RegionSslCertificatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106048,7 +112256,7 @@ func (c *RegionSslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCe } return ret, nil // { - // "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region.", + // "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionSslCertificates.list", // "parameterOrder": [ @@ -106140,7 +112348,8 @@ type RegionTargetHttpProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetHttpProxy resource. +// Delete: Deletes the specified TargetHttpProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpProxiesService) Delete(project string, region string, targetHttpProxy string) *RegionTargetHttpProxiesDeleteCall { c := &RegionTargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -106195,6 +112404,7 @@ func (c *RegionTargetHttpProxiesDeleteCall) Header() http.Header { func (c *RegionTargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106255,7 +112465,7 @@ func (c *RegionTargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Deletes the specified TargetHttpProxy resource.", + // "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionTargetHttpProxies.delete", // "parameterOrder": [ @@ -106318,7 +112528,7 @@ type RegionTargetHttpProxiesGetCall struct { // Get: Returns the specified TargetHttpProxy resource in the specified // region. Gets a list of available target HTTP proxies by making a -// list() request. +// list() request. (== suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpProxiesService) Get(project string, region string, targetHttpProxy string) *RegionTargetHttpProxiesGetCall { c := &RegionTargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -106364,6 +112574,7 @@ func (c *RegionTargetHttpProxiesGetCall) Header() http.Header { func (c *RegionTargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106427,7 +112638,7 @@ func (c *RegionTargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*Targ } return ret, nil // { - // "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + // "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionTargetHttpProxies.get", // "parameterOrder": [ @@ -106484,7 +112695,8 @@ type RegionTargetHttpProxiesInsertCall struct { } // Insert: Creates a TargetHttpProxy resource in the specified project -// and region using the data included in the request. +// and region using the data included in the request. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpProxiesService) Insert(project string, region string, targethttpproxy *TargetHttpProxy) *RegionTargetHttpProxiesInsertCall { c := &RegionTargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -106539,6 +112751,7 @@ func (c *RegionTargetHttpProxiesInsertCall) Header() http.Header { func (c *RegionTargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106603,7 +112816,7 @@ func (c *RegionTargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request.", + // "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpProxies.insert", // "parameterOrder": [ @@ -106659,7 +112872,8 @@ type RegionTargetHttpProxiesListCall struct { } // List: Retrieves the list of TargetHttpProxy resources available to -// the specified project in the specified region. +// the specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionTargetHttpProxiesService) List(project string, region string) *RegionTargetHttpProxiesListCall { c := &RegionTargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -106767,6 +112981,7 @@ func (c *RegionTargetHttpProxiesListCall) Header() http.Header { func (c *RegionTargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106829,7 +113044,7 @@ func (c *RegionTargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*Tar } return ret, nil // { - // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.", + // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionTargetHttpProxies.list", // "parameterOrder": [ @@ -106922,7 +113137,8 @@ type RegionTargetHttpProxiesSetUrlMapCall struct { header_ http.Header } -// SetUrlMap: Changes the URL map for TargetHttpProxy. +// SetUrlMap: Changes the URL map for TargetHttpProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpProxiesService) SetUrlMap(project string, region string, targetHttpProxy string, urlmapreference *UrlMapReference) *RegionTargetHttpProxiesSetUrlMapCall { c := &RegionTargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -106978,6 +113194,7 @@ func (c *RegionTargetHttpProxiesSetUrlMapCall) Header() http.Header { func (c *RegionTargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107043,7 +113260,7 @@ func (c *RegionTargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the URL map for TargetHttpProxy.", + // "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpProxies.setUrlMap", // "parameterOrder": [ @@ -107106,7 +113323,8 @@ type RegionTargetHttpsProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetHttpsProxy resource. +// Delete: Deletes the specified TargetHttpsProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) Delete(project string, region string, targetHttpsProxy string) *RegionTargetHttpsProxiesDeleteCall { c := &RegionTargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107161,6 +113379,7 @@ func (c *RegionTargetHttpsProxiesDeleteCall) Header() http.Header { func (c *RegionTargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107221,7 +113440,7 @@ func (c *RegionTargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Deletes the specified TargetHttpsProxy resource.", + // "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionTargetHttpsProxies.delete", // "parameterOrder": [ @@ -107284,7 +113503,7 @@ type RegionTargetHttpsProxiesGetCall struct { // Get: Returns the specified TargetHttpsProxy resource in the specified // region. Gets a list of available target HTTP proxies by making a -// list() request. +// list() request. (== suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) Get(project string, region string, targetHttpsProxy string) *RegionTargetHttpsProxiesGetCall { c := &RegionTargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107330,6 +113549,7 @@ func (c *RegionTargetHttpsProxiesGetCall) Header() http.Header { func (c *RegionTargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107393,7 +113613,7 @@ func (c *RegionTargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*Tar } return ret, nil // { - // "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.", + // "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionTargetHttpsProxies.get", // "parameterOrder": [ @@ -107450,7 +113670,8 @@ type RegionTargetHttpsProxiesInsertCall struct { } // Insert: Creates a TargetHttpsProxy resource in the specified project -// and region using the data included in the request. +// and region using the data included in the request. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) Insert(project string, region string, targethttpsproxy *TargetHttpsProxy) *RegionTargetHttpsProxiesInsertCall { c := &RegionTargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107505,6 +113726,7 @@ func (c *RegionTargetHttpsProxiesInsertCall) Header() http.Header { func (c *RegionTargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107569,7 +113791,7 @@ func (c *RegionTargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.", + // "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpsProxies.insert", // "parameterOrder": [ @@ -107625,7 +113847,8 @@ type RegionTargetHttpsProxiesListCall struct { } // List: Retrieves the list of TargetHttpsProxy resources available to -// the specified project in the specified region. +// the specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) List(project string, region string) *RegionTargetHttpsProxiesListCall { c := &RegionTargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107733,6 +113956,7 @@ func (c *RegionTargetHttpsProxiesListCall) Header() http.Header { func (c *RegionTargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107795,7 +114019,7 @@ func (c *RegionTargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*Ta } return ret, nil // { - // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.", + // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionTargetHttpsProxies.list", // "parameterOrder": [ @@ -107889,6 +114113,7 @@ type RegionTargetHttpsProxiesSetSslCertificatesCall struct { } // SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) SetSslCertificates(project string, region string, targetHttpsProxy string, regiontargethttpsproxiessetsslcertificatesrequest *RegionTargetHttpsProxiesSetSslCertificatesRequest) *RegionTargetHttpsProxiesSetSslCertificatesCall { c := &RegionTargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107944,6 +114169,7 @@ func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108009,7 +114235,7 @@ func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Replaces SslCertificates for TargetHttpsProxy.", + // "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpsProxies.setSslCertificates", // "parameterOrder": [ @@ -108073,7 +114299,8 @@ type RegionTargetHttpsProxiesSetUrlMapCall struct { header_ http.Header } -// SetUrlMap: Changes the URL map for TargetHttpsProxy. +// SetUrlMap: Changes the URL map for TargetHttpsProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionTargetHttpsProxiesService) SetUrlMap(project string, region string, targetHttpsProxy string, urlmapreference *UrlMapReference) *RegionTargetHttpsProxiesSetUrlMapCall { c := &RegionTargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -108129,6 +114356,7 @@ func (c *RegionTargetHttpsProxiesSetUrlMapCall) Header() http.Header { func (c *RegionTargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108194,7 +114422,7 @@ func (c *RegionTargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the URL map for TargetHttpsProxy.", + // "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionTargetHttpsProxies.setUrlMap", // "parameterOrder": [ @@ -108257,7 +114485,8 @@ type RegionUrlMapsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified UrlMap resource. +// Delete: Deletes the specified UrlMap resource. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionUrlMapsService) Delete(project string, region string, urlMap string) *RegionUrlMapsDeleteCall { c := &RegionUrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -108300,6 +114529,7 @@ func (c *RegionUrlMapsDeleteCall) Header() http.Header { func (c *RegionUrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108360,7 +114590,7 @@ func (c *RegionUrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified UrlMap resource.", + // "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionUrlMaps.delete", // "parameterOrder": [ @@ -108422,7 +114652,8 @@ type RegionUrlMapsGetCall struct { } // Get: Returns the specified UrlMap resource. Gets a list of available -// URL maps by making a list() request. +// URL maps by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionUrlMapsService) Get(project string, region string, urlMap string) *RegionUrlMapsGetCall { c := &RegionUrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -108468,6 +114699,7 @@ func (c *RegionUrlMapsGetCall) Header() http.Header { func (c *RegionUrlMapsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108531,7 +114763,7 @@ func (c *RegionUrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) } return ret, nil // { - // "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.", + // "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionUrlMaps.get", // "parameterOrder": [ @@ -108588,7 +114820,8 @@ type RegionUrlMapsInsertCall struct { } // Insert: Creates a UrlMap resource in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) func (r *RegionUrlMapsService) Insert(project string, region string, urlmap *UrlMap) *RegionUrlMapsInsertCall { c := &RegionUrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -108631,6 +114864,7 @@ func (c *RegionUrlMapsInsertCall) Header() http.Header { func (c *RegionUrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108695,7 +114929,7 @@ func (c *RegionUrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + // "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionUrlMaps.insert", // "parameterOrder": [ @@ -108752,7 +114986,8 @@ type RegionUrlMapsInvalidateCacheCall struct { } // InvalidateCache: Initiates a cache invalidation operation, -// invalidating the specified path, scoped to the specified UrlMap. +// invalidating the specified path, scoped to the specified UrlMap. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionUrlMapsService) InvalidateCache(project string, region string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *RegionUrlMapsInvalidateCacheCall { c := &RegionUrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -108796,6 +115031,7 @@ func (c *RegionUrlMapsInvalidateCacheCall) Header() http.Header { func (c *RegionUrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108861,7 +115097,7 @@ func (c *RegionUrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", + // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionUrlMaps.invalidateCache", // "parameterOrder": [ @@ -108925,7 +115161,8 @@ type RegionUrlMapsListCall struct { } // List: Retrieves the list of UrlMap resources available to the -// specified project in the specified region. +// specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionUrlMapsService) List(project string, region string) *RegionUrlMapsListCall { c := &RegionUrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -109033,6 +115270,7 @@ func (c *RegionUrlMapsListCall) Header() http.Header { func (c *RegionUrlMapsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109095,7 +115333,7 @@ func (c *RegionUrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, e } return ret, nil // { - // "description": "Retrieves the list of UrlMap resources available to the specified project in the specified region.", + // "description": "Retrieves the list of UrlMap resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionUrlMaps.list", // "parameterOrder": [ @@ -109190,7 +115428,8 @@ type RegionUrlMapsPatchCall struct { // Patch: Patches the specified UrlMap resource with the data included // in the request. This method supports PATCH semantics and uses JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionUrlMapsService) Patch(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsPatchCall { c := &RegionUrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -109234,6 +115473,7 @@ func (c *RegionUrlMapsPatchCall) Header() http.Header { func (c *RegionUrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109299,7 +115539,7 @@ func (c *RegionUrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionUrlMaps.patch", // "parameterOrder": [ @@ -109364,7 +115604,7 @@ type RegionUrlMapsUpdateCall struct { } // Update: Updates the specified UrlMap resource with the data included -// in the request. +// in the request. (== suppress_warning http-rest-shadowed ==) func (r *RegionUrlMapsService) Update(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsUpdateCall { c := &RegionUrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -109408,6 +115648,7 @@ func (c *RegionUrlMapsUpdateCall) Header() http.Header { func (c *RegionUrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109473,7 +115714,7 @@ func (c *RegionUrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified UrlMap resource with the data included in the request.", + // "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionUrlMaps.update", // "parameterOrder": [ @@ -109539,7 +115780,7 @@ type RegionUrlMapsValidateCall struct { // Validate: Runs static validation for the UrlMap. In particular, the // tests of the provided UrlMap will be run. Calling this method does -// NOT create the UrlMap. +// NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==) func (r *RegionUrlMapsService) Validate(project string, region string, urlMap string, regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest) *RegionUrlMapsValidateCall { c := &RegionUrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -109576,6 +115817,7 @@ func (c *RegionUrlMapsValidateCall) Header() http.Header { func (c *RegionUrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109641,7 +115883,7 @@ func (c *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsVa } return ret, nil // { - // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionUrlMaps.validate", // "parameterOrder": [ @@ -109700,7 +115942,8 @@ type RegionsGetCall struct { } // Get: Returns the specified Region resource. Gets a list of available -// regions by making a list() request. +// regions by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regions/get func (r *RegionsService) Get(project string, region string) *RegionsGetCall { c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -109746,6 +115989,7 @@ func (c *RegionsGetCall) Header() http.Header { func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109808,7 +116052,7 @@ func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { } return ret, nil // { - // "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request.", + // "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regions.get", // "parameterOrder": [ @@ -109856,7 +116100,7 @@ type RegionsListCall struct { } // List: Retrieves the list of region resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regions/list func (r *RegionsService) List(project string) *RegionsListCall { c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -109964,6 +116208,7 @@ func (c *RegionsListCall) Header() http.Header { func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110025,7 +116270,7 @@ func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) } return ret, nil // { - // "description": "Retrieves the list of region resources available to the specified project.", + // "description": "Retrieves the list of region resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regions.list", // "parameterOrder": [ @@ -110108,7 +116353,8 @@ type ReservationsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of reservations. +// AggregatedList: Retrieves an aggregated list of reservations. (== +// suppress_warning http-rest-shadowed ==) func (r *ReservationsService) AggregatedList(project string) *ReservationsAggregatedListCall { c := &ReservationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -110215,6 +116461,7 @@ func (c *ReservationsAggregatedListCall) Header() http.Header { func (c *ReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110276,7 +116523,7 @@ func (c *ReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Rese } return ret, nil // { - // "description": "Retrieves an aggregated list of reservations.", + // "description": "Retrieves an aggregated list of reservations. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.reservations.aggregatedList", // "parameterOrder": [ @@ -110360,7 +116607,8 @@ type ReservationsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified reservation. +// Delete: Deletes the specified reservation. (== suppress_warning +// http-rest-shadowed ==) func (r *ReservationsService) Delete(project string, zone string, reservation string) *ReservationsDeleteCall { c := &ReservationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -110415,6 +116663,7 @@ func (c *ReservationsDeleteCall) Header() http.Header { func (c *ReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110475,7 +116724,7 @@ func (c *ReservationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Deletes the specified reservation.", + // "description": "Deletes the specified reservation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.reservations.delete", // "parameterOrder": [ @@ -110536,7 +116785,8 @@ type ReservationsGetCall struct { header_ http.Header } -// Get: Retrieves all information of the specified reservation. +// Get: Retrieves information about the specified reservation. (== +// suppress_warning http-rest-shadowed ==) func (r *ReservationsService) Get(project string, zone string, reservation string) *ReservationsGetCall { c := &ReservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -110582,6 +116832,7 @@ func (c *ReservationsGetCall) Header() http.Header { func (c *ReservationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110645,7 +116896,7 @@ func (c *ReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, er } return ret, nil // { - // "description": "Retrieves all information of the specified reservation.", + // "description": "Retrieves information about the specified reservation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.reservations.get", // "parameterOrder": [ @@ -110703,7 +116954,8 @@ type ReservationsGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *ReservationsService) GetIamPolicy(project string, zone string, resource string) *ReservationsGetIamPolicyCall { c := &ReservationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -110712,6 +116964,13 @@ func (r *ReservationsService) GetIamPolicy(project string, zone string, resource return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *ReservationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ReservationsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -110749,6 +117008,7 @@ func (c *ReservationsGetIamPolicyCall) Header() http.Header { func (c *ReservationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110812,7 +117072,7 @@ func (c *ReservationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.reservations.getIamPolicy", // "parameterOrder": [ @@ -110821,6 +117081,12 @@ func (c *ReservationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -110868,7 +117134,9 @@ type ReservationsInsertCall struct { header_ http.Header } -// Insert: Creates a new reservation. +// Insert: Creates a new reservation. For more information, read +// Reserving zonal resources. (== suppress_warning http-rest-shadowed +// ==) func (r *ReservationsService) Insert(project string, zone string, reservation *Reservation) *ReservationsInsertCall { c := &ReservationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -110923,6 +117191,7 @@ func (c *ReservationsInsertCall) Header() http.Header { func (c *ReservationsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -110987,7 +117256,7 @@ func (c *ReservationsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Creates a new reservation.", + // "description": "Creates a new reservation. For more information, read Reserving zonal resources. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.reservations.insert", // "parameterOrder": [ @@ -111042,8 +117311,9 @@ type ReservationsListCall struct { header_ http.Header } -// List: A list all the reservations that have been configured for the -// specified project in specified zone. +// List: A list of all the reservations that have been configured for +// the specified project in specified zone. (== suppress_warning +// http-rest-shadowed ==) func (r *ReservationsService) List(project string, zone string) *ReservationsListCall { c := &ReservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -111151,6 +117421,7 @@ func (c *ReservationsListCall) Header() http.Header { func (c *ReservationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111213,7 +117484,7 @@ func (c *ReservationsListCall) Do(opts ...googleapi.CallOption) (*ReservationLis } return ret, nil // { - // "description": "A list all the reservations that have been configured for the specified project in specified zone.", + // "description": "A list of all the reservations that have been configured for the specified project in specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.reservations.list", // "parameterOrder": [ @@ -111307,7 +117578,8 @@ type ReservationsResizeCall struct { } // Resize: Resizes the reservation (applicable to standalone -// reservations only) +// reservations only). For more information, read Modifying +// reservations. (== suppress_warning http-rest-shadowed ==) func (r *ReservationsService) Resize(project string, zone string, reservation string, reservationsresizerequest *ReservationsResizeRequest) *ReservationsResizeCall { c := &ReservationsResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -111363,6 +117635,7 @@ func (c *ReservationsResizeCall) Header() http.Header { func (c *ReservationsResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111428,7 +117701,7 @@ func (c *ReservationsResizeCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Resizes the reservation (applicable to standalone reservations only)", + // "description": "Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.reservations.resize", // "parameterOrder": [ @@ -111493,7 +117766,8 @@ type ReservationsSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *ReservationsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *ReservationsSetIamPolicyCall { c := &ReservationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -111530,6 +117804,7 @@ func (c *ReservationsSetIamPolicyCall) Header() http.Header { func (c *ReservationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111595,7 +117870,7 @@ func (c *ReservationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.reservations.setIamPolicy", // "parameterOrder": [ @@ -111655,7 +117930,7 @@ type ReservationsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *ReservationsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationsTestIamPermissionsCall { c := &ReservationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -111692,6 +117967,7 @@ func (c *ReservationsTestIamPermissionsCall) Header() http.Header { func (c *ReservationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111757,7 +118033,7 @@ func (c *ReservationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.reservations.testIamPermissions", // "parameterOrder": [ @@ -111816,6 +118092,7 @@ type ResourcePoliciesAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of resource policies. +// (== suppress_warning http-rest-shadowed ==) func (r *ResourcePoliciesService) AggregatedList(project string) *ResourcePoliciesAggregatedListCall { c := &ResourcePoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -111922,6 +118199,7 @@ func (c *ResourcePoliciesAggregatedListCall) Header() http.Header { func (c *ResourcePoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -111983,7 +118261,7 @@ func (c *ResourcePoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Retrieves an aggregated list of resource policies.", + // "description": "Retrieves an aggregated list of resource policies. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.resourcePolicies.aggregatedList", // "parameterOrder": [ @@ -112067,7 +118345,8 @@ type ResourcePoliciesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified resource policy. +// Delete: Deletes the specified resource policy. (== suppress_warning +// http-rest-shadowed ==) func (r *ResourcePoliciesService) Delete(project string, region string, resourcePolicy string) *ResourcePoliciesDeleteCall { c := &ResourcePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -112122,6 +118401,7 @@ func (c *ResourcePoliciesDeleteCall) Header() http.Header { func (c *ResourcePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112182,7 +118462,7 @@ func (c *ResourcePoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified resource policy.", + // "description": "Deletes the specified resource policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.resourcePolicies.delete", // "parameterOrder": [ @@ -112243,7 +118523,8 @@ type ResourcePoliciesGetCall struct { header_ http.Header } -// Get: Retrieves all information of the specified resource policy. +// Get: Retrieves all information of the specified resource policy. (== +// suppress_warning http-rest-shadowed ==) func (r *ResourcePoliciesService) Get(project string, region string, resourcePolicy string) *ResourcePoliciesGetCall { c := &ResourcePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -112289,6 +118570,7 @@ func (c *ResourcePoliciesGetCall) Header() http.Header { func (c *ResourcePoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112352,7 +118634,7 @@ func (c *ResourcePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResourcePol } return ret, nil // { - // "description": "Retrieves all information of the specified resource policy.", + // "description": "Retrieves all information of the specified resource policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.resourcePolicies.get", // "parameterOrder": [ @@ -112396,6 +118678,188 @@ func (c *ResourcePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResourcePol } +// method id "compute.resourcePolicies.getIamPolicy": + +type ResourcePoliciesGetIamPolicyCall struct { + s *Service + project string + region string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) +func (r *ResourcePoliciesService) GetIamPolicy(project string, region string, resource string) *ResourcePoliciesGetIamPolicyCall { + c := &ResourcePoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *ResourcePoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ResourcePoliciesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcePoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ResourcePoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ResourcePoliciesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcePoliciesGetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcePoliciesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ResourcePoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.resourcePolicies.getIamPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.resourcePolicies.insert": type ResourcePoliciesInsertCall struct { @@ -112408,7 +118872,8 @@ type ResourcePoliciesInsertCall struct { header_ http.Header } -// Insert: Creates a new resource policy. +// Insert: Creates a new resource policy. (== suppress_warning +// http-rest-shadowed ==) func (r *ResourcePoliciesService) Insert(project string, region string, resourcepolicy *ResourcePolicy) *ResourcePoliciesInsertCall { c := &ResourcePoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -112463,6 +118928,7 @@ func (c *ResourcePoliciesInsertCall) Header() http.Header { func (c *ResourcePoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112527,7 +118993,7 @@ func (c *ResourcePoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a new resource policy.", + // "description": "Creates a new resource policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.resourcePolicies.insert", // "parameterOrder": [ @@ -112583,7 +119049,8 @@ type ResourcePoliciesListCall struct { } // List: A list all the resource policies that have been configured for -// the specified project in specified region. +// the specified project in specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *ResourcePoliciesService) List(project string, region string) *ResourcePoliciesListCall { c := &ResourcePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -112691,6 +119158,7 @@ func (c *ResourcePoliciesListCall) Header() http.Header { func (c *ResourcePoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112753,7 +119221,7 @@ func (c *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePo } return ret, nil // { - // "description": "A list all the resource policies that have been configured for the specified project in specified region.", + // "description": "A list all the resource policies that have been configured for the specified project in specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.resourcePolicies.list", // "parameterOrder": [ @@ -112833,6 +119301,170 @@ func (c *ResourcePoliciesListCall) Pages(ctx context.Context, f func(*ResourcePo } } +// method id "compute.resourcePolicies.setIamPolicy": + +type ResourcePoliciesSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) +func (r *ResourcePoliciesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *ResourcePoliciesSetIamPolicyCall { + c := &ResourcePoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcePoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcePoliciesSetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcePoliciesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ResourcePoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.resourcePolicies.setIamPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy", + // "request": { + // "$ref": "RegionSetPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.resourcePolicies.testIamPermissions": type ResourcePoliciesTestIamPermissionsCall struct { @@ -112847,7 +119479,7 @@ type ResourcePoliciesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *ResourcePoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ResourcePoliciesTestIamPermissionsCall { c := &ResourcePoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -112884,6 +119516,7 @@ func (c *ResourcePoliciesTestIamPermissionsCall) Header() http.Header { func (c *ResourcePoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -112949,7 +119582,7 @@ func (c *ResourcePoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.resourcePolicies.testIamPermissions", // "parameterOrder": [ @@ -113007,7 +119640,8 @@ type RoutersAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of routers. +// AggregatedList: Retrieves an aggregated list of routers. (== +// suppress_warning http-rest-shadowed ==) func (r *RoutersService) AggregatedList(project string) *RoutersAggregatedListCall { c := &RoutersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -113114,6 +119748,7 @@ func (c *RoutersAggregatedListCall) Header() http.Header { func (c *RoutersAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113175,7 +119810,7 @@ func (c *RoutersAggregatedListCall) Do(opts ...googleapi.CallOption) (*RouterAgg } return ret, nil // { - // "description": "Retrieves an aggregated list of routers.", + // "description": "Retrieves an aggregated list of routers. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.aggregatedList", // "parameterOrder": [ @@ -113259,7 +119894,8 @@ type RoutersDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified Router resource. +// Delete: Deletes the specified Router resource. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Delete(project string, region string, router string) *RoutersDeleteCall { c := &RoutersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -113314,6 +119950,7 @@ func (c *RoutersDeleteCall) Header() http.Header { func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113374,7 +120011,7 @@ func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified Router resource.", + // "description": "Deletes the specified Router resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.routers.delete", // "parameterOrder": [ @@ -113436,7 +120073,8 @@ type RoutersGetCall struct { } // Get: Returns the specified Router resource. Gets a list of available -// routers by making a list() request. +// routers by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Get(project string, region string, router string) *RoutersGetCall { c := &RoutersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -113482,6 +120120,7 @@ func (c *RoutersGetCall) Header() http.Header { func (c *RoutersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113545,7 +120184,7 @@ func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) { } return ret, nil // { - // "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request.", + // "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.get", // "parameterOrder": [ @@ -113603,7 +120242,7 @@ type RoutersGetNatMappingInfoCall struct { } // GetNatMappingInfo: Retrieves runtime Nat mapping information of VM -// endpoints. +// endpoints. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) GetNatMappingInfo(project string, region string, router string) *RoutersGetNatMappingInfoCall { c := &RoutersGetNatMappingInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -113650,6 +120289,15 @@ func (c *RoutersGetNatMappingInfoCall) MaxResults(maxResults int64) *RoutersGetN return c } +// NatName sets the optional parameter "natName": Name of the nat +// service to filter the Nat Mapping information. If it is omitted, all +// nats for this router will be returned. Name should conform to +// RFC1035. +func (c *RoutersGetNatMappingInfoCall) NatName(natName string) *RoutersGetNatMappingInfoCall { + c.urlParams_.Set("natName", natName) + return c +} + // OrderBy sets the optional parameter "orderBy": Sorts list results by // a certain order. By default, results are returned in alphanumerical // order based on the resource name. @@ -113712,6 +120360,7 @@ func (c *RoutersGetNatMappingInfoCall) Header() http.Header { func (c *RoutersGetNatMappingInfoCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113775,7 +120424,7 @@ func (c *RoutersGetNatMappingInfoCall) Do(opts ...googleapi.CallOption) (*VmEndp } return ret, nil // { - // "description": "Retrieves runtime Nat mapping information of VM endpoints.", + // "description": "Retrieves runtime Nat mapping information of VM endpoints. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.getNatMappingInfo", // "parameterOrder": [ @@ -113797,6 +120446,11 @@ func (c *RoutersGetNatMappingInfoCall) Do(opts ...googleapi.CallOption) (*VmEndp // "minimum": "0", // "type": "integer" // }, + // "natName": { + // "description": "Name of the nat service to filter the Nat Mapping information. If it is omitted, all nats for this router will be returned. Name should conform to RFC1035.", + // "location": "query", + // "type": "string" + // }, // "orderBy": { // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", // "location": "query", @@ -113877,7 +120531,7 @@ type RoutersGetRouterStatusCall struct { } // GetRouterStatus: Retrieves runtime information of the specified -// router. +// router. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) GetRouterStatus(project string, region string, router string) *RoutersGetRouterStatusCall { c := &RoutersGetRouterStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -113923,6 +120577,7 @@ func (c *RoutersGetRouterStatusCall) Header() http.Header { func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -113986,7 +120641,7 @@ func (c *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterSt } return ret, nil // { - // "description": "Retrieves runtime information of the specified router.", + // "description": "Retrieves runtime information of the specified router. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.getRouterStatus", // "parameterOrder": [ @@ -114043,7 +120698,8 @@ type RoutersInsertCall struct { } // Insert: Creates a Router resource in the specified project and region -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Insert(project string, region string, router *Router) *RoutersInsertCall { c := &RoutersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -114098,6 +120754,7 @@ func (c *RoutersInsertCall) Header() http.Header { func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114162,7 +120819,7 @@ func (c *RoutersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates a Router resource in the specified project and region using the data included in the request.", + // "description": "Creates a Router resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routers.insert", // "parameterOrder": [ @@ -114218,7 +120875,7 @@ type RoutersListCall struct { } // List: Retrieves a list of Router resources available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) List(project string, region string) *RoutersListCall { c := &RoutersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -114326,6 +120983,7 @@ func (c *RoutersListCall) Header() http.Header { func (c *RoutersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114388,7 +121046,7 @@ func (c *RoutersListCall) Do(opts ...googleapi.CallOption) (*RouterList, error) } return ret, nil // { - // "description": "Retrieves a list of Router resources available to the specified project.", + // "description": "Retrieves a list of Router resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.list", // "parameterOrder": [ @@ -114483,7 +121141,8 @@ type RoutersPatchCall struct { // Patch: Patches the specified Router resource with the data included // in the request. This method supports PATCH semantics and uses JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall { c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -114539,6 +121198,7 @@ func (c *RoutersPatchCall) Header() http.Header { func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114604,7 +121264,7 @@ func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + // "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.routers.patch", // "parameterOrder": [ @@ -114670,7 +121330,7 @@ type RoutersPreviewCall struct { // Preview: Preview fields auto-generated during router create and // update operations. Calling this method does NOT create or update the -// router. +// router. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) Preview(project string, region string, router string, router2 *Router) *RoutersPreviewCall { c := &RoutersPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -114707,6 +121367,7 @@ func (c *RoutersPreviewCall) Header() http.Header { func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114772,7 +121433,7 @@ func (c *RoutersPreviewCall) Do(opts ...googleapi.CallOption) (*RoutersPreviewRe } return ret, nil // { - // "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", + // "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routers.preview", // "parameterOrder": [ @@ -114833,7 +121494,7 @@ type RoutersTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutersTestIamPermissionsCall { c := &RoutersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -114870,6 +121531,7 @@ func (c *RoutersTestIamPermissionsCall) Header() http.Header { func (c *RoutersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -114935,7 +121597,7 @@ func (c *RoutersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestP } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routers.testIamPermissions", // "parameterOrder": [ @@ -114996,7 +121658,10 @@ type RoutersUpdateCall struct { } // Update: Updates the specified Router resource with the data included -// in the request. +// in the request. This method conforms to PUT semantics, which requests +// that the state of the target resource be created or replaced with the +// state defined by the representation enclosed in the request message +// payload. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) Update(project string, region string, router string, router2 *Router) *RoutersUpdateCall { c := &RoutersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -115052,6 +121717,7 @@ func (c *RoutersUpdateCall) Header() http.Header { func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115117,7 +121783,7 @@ func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Updates the specified Router resource with the data included in the request.", + // "description": "Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.routers.update", // "parameterOrder": [ @@ -115179,7 +121845,8 @@ type RoutesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified Route resource. +// Delete: Deletes the specified Route resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/delete func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -115234,6 +121901,7 @@ func (c *RoutesDeleteCall) Header() http.Header { func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115293,7 +121961,7 @@ func (c *RoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified Route resource.", + // "description": "Deletes the specified Route resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.routes.delete", // "parameterOrder": [ @@ -115346,7 +122014,8 @@ type RoutesGetCall struct { } // Get: Returns the specified Route resource. Gets a list of available -// routes by making a list() request. +// routes by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/get func (r *RoutesService) Get(project string, route string) *RoutesGetCall { c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -115392,6 +122061,7 @@ func (c *RoutesGetCall) Header() http.Header { func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115454,7 +122124,7 @@ func (c *RoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) { } return ret, nil // { - // "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request.", + // "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routes.get", // "parameterOrder": [ @@ -115502,7 +122172,8 @@ type RoutesInsertCall struct { } // Insert: Creates a Route resource in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/insert func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { c := &RoutesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -115557,6 +122228,7 @@ func (c *RoutesInsertCall) Header() http.Header { func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115620,7 +122292,7 @@ func (c *RoutesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates a Route resource in the specified project using the data included in the request.", + // "description": "Creates a Route resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routes.insert", // "parameterOrder": [ @@ -115667,7 +122339,7 @@ type RoutesListCall struct { } // List: Retrieves the list of Route resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/list func (r *RoutesService) List(project string) *RoutesListCall { c := &RoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -115775,6 +122447,7 @@ func (c *RoutesListCall) Header() http.Header { func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -115836,7 +122509,7 @@ func (c *RoutesListCall) Do(opts ...googleapi.CallOption) (*RouteList, error) { } return ret, nil // { - // "description": "Retrieves the list of Route resources available to the specified project.", + // "description": "Retrieves the list of Route resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routes.list", // "parameterOrder": [ @@ -115921,7 +122594,7 @@ type RoutesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RoutesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutesTestIamPermissionsCall { c := &RoutesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -115957,6 +122630,7 @@ func (c *RoutesTestIamPermissionsCall) Header() http.Header { func (c *RoutesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116021,7 +122695,7 @@ func (c *RoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routes.testIamPermissions", // "parameterOrder": [ @@ -116072,7 +122746,8 @@ type SecurityPoliciesAddRuleCall struct { header_ http.Header } -// AddRule: Inserts a rule into a security policy. +// AddRule: Inserts a rule into a security policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SecurityPoliciesService) AddRule(project string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *SecurityPoliciesAddRuleCall { c := &SecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -116115,6 +122790,7 @@ func (c *SecurityPoliciesAddRuleCall) Header() http.Header { func (c *SecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116179,7 +122855,7 @@ func (c *SecurityPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Inserts a rule into a security policy.", + // "description": "Inserts a rule into a security policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.addRule", // "parameterOrder": [ @@ -116233,7 +122909,8 @@ type SecurityPoliciesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified policy. +// Delete: Deletes the specified policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SecurityPoliciesService) Delete(project string, securityPolicy string) *SecurityPoliciesDeleteCall { c := &SecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -116287,6 +122964,7 @@ func (c *SecurityPoliciesDeleteCall) Header() http.Header { func (c *SecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116346,7 +123024,7 @@ func (c *SecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified policy.", + // "description": "Deletes the specified policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.securityPolicies.delete", // "parameterOrder": [ @@ -116399,7 +123077,7 @@ type SecurityPoliciesGetCall struct { } // Get: List all of the ordered rules present in a single specified -// policy. +// policy. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) Get(project string, securityPolicy string) *SecurityPoliciesGetCall { c := &SecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -116444,6 +123122,7 @@ func (c *SecurityPoliciesGetCall) Header() http.Header { func (c *SecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116506,7 +123185,7 @@ func (c *SecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPol } return ret, nil // { - // "description": "List all of the ordered rules present in a single specified policy.", + // "description": "List all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.securityPolicies.get", // "parameterOrder": [ @@ -116554,7 +123233,8 @@ type SecurityPoliciesGetRuleCall struct { header_ http.Header } -// GetRule: Gets a rule at the specified priority. +// GetRule: Gets a rule at the specified priority. (== suppress_warning +// http-rest-shadowed ==) func (r *SecurityPoliciesService) GetRule(project string, securityPolicy string) *SecurityPoliciesGetRuleCall { c := &SecurityPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -116606,6 +123286,7 @@ func (c *SecurityPoliciesGetRuleCall) Header() http.Header { func (c *SecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116668,7 +123349,7 @@ func (c *SecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*Securit } return ret, nil // { - // "description": "Gets a rule at the specified priority.", + // "description": "Gets a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.securityPolicies.getRule", // "parameterOrder": [ @@ -116722,7 +123403,7 @@ type SecurityPoliciesInsertCall struct { } // Insert: Creates a new policy in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) Insert(project string, securitypolicy *SecurityPolicy) *SecurityPoliciesInsertCall { c := &SecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -116783,6 +123464,7 @@ func (c *SecurityPoliciesInsertCall) Header() http.Header { func (c *SecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -116846,7 +123528,7 @@ func (c *SecurityPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a new policy in the specified project using the data included in the request.", + // "description": "Creates a new policy in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.insert", // "parameterOrder": [ @@ -116898,7 +123580,7 @@ type SecurityPoliciesListCall struct { } // List: List all the policies that have been configured for the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) List(project string) *SecurityPoliciesListCall { c := &SecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -117005,6 +123687,7 @@ func (c *SecurityPoliciesListCall) Header() http.Header { func (c *SecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117066,7 +123749,7 @@ func (c *SecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPo } return ret, nil // { - // "description": "List all the policies that have been configured for the specified project.", + // "description": "List all the policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.securityPolicies.list", // "parameterOrder": [ @@ -117150,7 +123833,8 @@ type SecurityPoliciesListPreconfiguredExpressionSetsCall struct { } // ListPreconfiguredExpressionSets: Gets the current list of -// preconfigured Web Application Firewall (WAF) expressions. +// preconfigured Web Application Firewall (WAF) expressions. (== +// suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) ListPreconfiguredExpressionSets(project string) *SecurityPoliciesListPreconfiguredExpressionSetsCall { c := &SecurityPoliciesListPreconfiguredExpressionSetsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -117257,6 +123941,7 @@ func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Header() http.Head func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117321,7 +124006,7 @@ func (c *SecurityPoliciesListPreconfiguredExpressionSetsCall) Do(opts ...googlea } return ret, nil // { - // "description": "Gets the current list of preconfigured Web Application Firewall (WAF) expressions.", + // "description": "Gets the current list of preconfigured Web Application Firewall (WAF) expressions. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.securityPolicies.listPreconfiguredExpressionSets", // "parameterOrder": [ @@ -117384,7 +124069,7 @@ type SecurityPoliciesPatchCall struct { } // Patch: Patches the specified policy with the data included in the -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) Patch(project string, securityPolicy string, securitypolicy *SecurityPolicy) *SecurityPoliciesPatchCall { c := &SecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -117439,6 +124124,7 @@ func (c *SecurityPoliciesPatchCall) Header() http.Header { func (c *SecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117503,7 +124189,7 @@ func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request.", + // "description": "Patches the specified policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.securityPolicies.patch", // "parameterOrder": [ @@ -117558,7 +124244,8 @@ type SecurityPoliciesPatchRuleCall struct { header_ http.Header } -// PatchRule: Patches a rule at the specified priority. +// PatchRule: Patches a rule at the specified priority. (== +// suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) PatchRule(project string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *SecurityPoliciesPatchRuleCall { c := &SecurityPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -117608,6 +124295,7 @@ func (c *SecurityPoliciesPatchRuleCall) Header() http.Header { func (c *SecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117672,7 +124360,7 @@ func (c *SecurityPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Patches a rule at the specified priority.", + // "description": "Patches a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.patchRule", // "parameterOrder": [ @@ -117732,7 +124420,8 @@ type SecurityPoliciesRemoveRuleCall struct { header_ http.Header } -// RemoveRule: Deletes a rule at the specified priority. +// RemoveRule: Deletes a rule at the specified priority. (== +// suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) RemoveRule(project string, securityPolicy string) *SecurityPoliciesRemoveRuleCall { c := &SecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -117774,6 +124463,7 @@ func (c *SecurityPoliciesRemoveRuleCall) Header() http.Header { func (c *SecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117833,7 +124523,7 @@ func (c *SecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Deletes a rule at the specified priority.", + // "description": "Deletes a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.removeRule", // "parameterOrder": [ @@ -117887,7 +124577,8 @@ type SecurityPoliciesSetLabelsCall struct { } // SetLabels: Sets the labels on a security policy. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SecurityPoliciesSetLabelsCall { c := &SecurityPoliciesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -117923,6 +124614,7 @@ func (c *SecurityPoliciesSetLabelsCall) Header() http.Header { func (c *SecurityPoliciesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -117987,7 +124679,7 @@ func (c *SecurityPoliciesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.setLabels", // "parameterOrder": [ @@ -118038,7 +124730,7 @@ type SecurityPoliciesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SecurityPoliciesTestIamPermissionsCall { c := &SecurityPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -118074,6 +124766,7 @@ func (c *SecurityPoliciesTestIamPermissionsCall) Header() http.Header { func (c *SecurityPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118138,7 +124831,7 @@ func (c *SecurityPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.testIamPermissions", // "parameterOrder": [ @@ -118194,7 +124887,8 @@ type SnapshotsDeleteCall struct { // deletion is needed for subsequent snapshots, the data will be moved // to the next corresponding snapshot. // -// For more information, see Deleting snapshots. +// For more information, see Deleting snapshots. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall { c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -118249,6 +124943,7 @@ func (c *SnapshotsDeleteCall) Header() http.Header { func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118308,7 +125003,7 @@ func (c *SnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.", + // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.snapshots.delete", // "parameterOrder": [ @@ -118361,7 +125056,8 @@ type SnapshotsGetCall struct { } // Get: Returns the specified Snapshot resource. Gets a list of -// available snapshots by making a list() request. +// available snapshots by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/get func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall { c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -118407,6 +125103,7 @@ func (c *SnapshotsGetCall) Header() http.Header { func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118469,7 +125166,7 @@ func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { } return ret, nil // { - // "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.", + // "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.snapshots.get", // "parameterOrder": [ @@ -118518,7 +125215,8 @@ type SnapshotsGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *SnapshotsService) GetIamPolicy(project string, resource string) *SnapshotsGetIamPolicyCall { c := &SnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -118526,6 +125224,13 @@ func (r *SnapshotsService) GetIamPolicy(project string, resource string) *Snapsh return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *SnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *SnapshotsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -118563,6 +125268,7 @@ func (c *SnapshotsGetIamPolicyCall) Header() http.Header { func (c *SnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118625,7 +125331,7 @@ func (c *SnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.snapshots.getIamPolicy", // "parameterOrder": [ @@ -118633,6 +125339,12 @@ func (c *SnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -118673,7 +125385,7 @@ type SnapshotsListCall struct { } // List: Retrieves the list of Snapshot resources contained within the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/list func (r *SnapshotsService) List(project string) *SnapshotsListCall { c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -118781,6 +125493,7 @@ func (c *SnapshotsListCall) Header() http.Header { func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -118842,7 +125555,7 @@ func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, err } return ret, nil // { - // "description": "Retrieves the list of Snapshot resources contained within the specified project.", + // "description": "Retrieves the list of Snapshot resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.snapshots.list", // "parameterOrder": [ @@ -118927,7 +125640,8 @@ type SnapshotsSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SnapshotsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *SnapshotsSetIamPolicyCall { c := &SnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -118963,6 +125677,7 @@ func (c *SnapshotsSetIamPolicyCall) Header() http.Header { func (c *SnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119027,7 +125742,7 @@ func (c *SnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.snapshots.setIamPolicy", // "parameterOrder": [ @@ -119078,7 +125793,8 @@ type SnapshotsSetLabelsCall struct { } // SetLabels: Sets the labels on a snapshot. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *SnapshotsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SnapshotsSetLabelsCall { c := &SnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -119114,6 +125830,7 @@ func (c *SnapshotsSetLabelsCall) Header() http.Header { func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119178,7 +125895,7 @@ func (c *SnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.snapshots.setLabels", // "parameterOrder": [ @@ -119229,7 +125946,7 @@ type SnapshotsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SnapshotsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SnapshotsTestIamPermissionsCall { c := &SnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -119265,6 +125982,7 @@ func (c *SnapshotsTestIamPermissionsCall) Header() http.Header { func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119329,7 +126047,7 @@ func (c *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.snapshots.testIamPermissions", // "parameterOrder": [ @@ -119380,7 +126098,8 @@ type SslCertificatesAggregatedListCall struct { } // AggregatedList: Retrieves the list of all SslCertificate resources, -// regional and global, available to the specified project. +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) AggregatedList(project string) *SslCertificatesAggregatedListCall { c := &SslCertificatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -119487,6 +126206,7 @@ func (c *SslCertificatesAggregatedListCall) Header() http.Header { func (c *SslCertificatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119548,7 +126268,7 @@ func (c *SslCertificatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*S } return ret, nil // { - // "description": "Retrieves the list of all SslCertificate resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all SslCertificate resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslCertificates.aggregatedList", // "parameterOrder": [ @@ -119631,7 +126351,8 @@ type SslCertificatesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified SslCertificate resource. +// Delete: Deletes the specified SslCertificate resource. (== +// suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) Delete(project string, sslCertificate string) *SslCertificatesDeleteCall { c := &SslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -119685,6 +126406,7 @@ func (c *SslCertificatesDeleteCall) Header() http.Header { func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119744,7 +126466,7 @@ func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified SslCertificate resource.", + // "description": "Deletes the specified SslCertificate resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.sslCertificates.delete", // "parameterOrder": [ @@ -119797,7 +126519,8 @@ type SslCertificatesGetCall struct { } // Get: Returns the specified SslCertificate resource. Gets a list of -// available SSL certificates by making a list() request. +// available SSL certificates by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall { c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -119842,6 +126565,7 @@ func (c *SslCertificatesGetCall) Header() http.Header { func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -119904,7 +126628,7 @@ func (c *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertifica } return ret, nil // { - // "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request.", + // "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslCertificates.get", // "parameterOrder": [ @@ -119952,7 +126676,8 @@ type SslCertificatesInsertCall struct { } // Insert: Creates a SslCertificate resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCertificate) *SslCertificatesInsertCall { c := &SslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -120006,6 +126731,7 @@ func (c *SslCertificatesInsertCall) Header() http.Header { func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120069,7 +126795,7 @@ func (c *SslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", + // "description": "Creates a SslCertificate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.sslCertificates.insert", // "parameterOrder": [ @@ -120116,7 +126842,7 @@ type SslCertificatesListCall struct { } // List: Retrieves the list of SslCertificate resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) List(project string) *SslCertificatesListCall { c := &SslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -120223,6 +126949,7 @@ func (c *SslCertificatesListCall) Header() http.Header { func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120284,7 +127011,7 @@ func (c *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertific } return ret, nil // { - // "description": "Retrieves the list of SslCertificate resources available to the specified project.", + // "description": "Retrieves the list of SslCertificate resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslCertificates.list", // "parameterOrder": [ @@ -120369,7 +127096,7 @@ type SslCertificatesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslCertificatesTestIamPermissionsCall { c := &SslCertificatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -120405,6 +127132,7 @@ func (c *SslCertificatesTestIamPermissionsCall) Header() http.Header { func (c *SslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120469,7 +127197,7 @@ func (c *SslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.sslCertificates.testIamPermissions", // "parameterOrder": [ @@ -120521,7 +127249,7 @@ type SslPoliciesDeleteCall struct { // Delete: Deletes the specified SSL policy. The SSL policy resource can // be deleted only if it is not in use by any TargetHttpsProxy or -// TargetSslProxy resources. +// TargetSslProxy resources. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Delete(project string, sslPolicy string) *SslPoliciesDeleteCall { c := &SslPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -120575,6 +127303,7 @@ func (c *SslPoliciesDeleteCall) Header() http.Header { func (c *SslPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120634,7 +127363,7 @@ func (c *SslPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.", + // "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.sslPolicies.delete", // "parameterOrder": [ @@ -120686,7 +127415,7 @@ type SslPoliciesGetCall struct { } // Get: Lists all of the ordered rules present in a single specified -// policy. +// policy. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Get(project string, sslPolicy string) *SslPoliciesGetCall { c := &SslPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -120731,6 +127460,7 @@ func (c *SslPoliciesGetCall) Header() http.Header { func (c *SslPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120793,7 +127523,7 @@ func (c *SslPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SslPolicy, error } return ret, nil // { - // "description": "Lists all of the ordered rules present in a single specified policy.", + // "description": "Lists all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslPolicies.get", // "parameterOrder": [ @@ -120840,7 +127570,8 @@ type SslPoliciesInsertCall struct { } // Insert: Returns the specified SSL policy resource. Gets a list of -// available SSL policies by making a list() request. +// available SSL policies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Insert(project string, sslpolicy *SslPolicy) *SslPoliciesInsertCall { c := &SslPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -120894,6 +127625,7 @@ func (c *SslPoliciesInsertCall) Header() http.Header { func (c *SslPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -120957,7 +127689,7 @@ func (c *SslPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request.", + // "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.sslPolicies.insert", // "parameterOrder": [ @@ -121004,7 +127736,7 @@ type SslPoliciesListCall struct { } // List: Lists all the SSL policies that have been configured for the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) List(project string) *SslPoliciesListCall { c := &SslPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -121111,6 +127843,7 @@ func (c *SslPoliciesListCall) Header() http.Header { func (c *SslPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121172,7 +127905,7 @@ func (c *SslPoliciesListCall) Do(opts ...googleapi.CallOption) (*SslPoliciesList } return ret, nil // { - // "description": "Lists all the SSL policies that have been configured for the specified project.", + // "description": "Lists all the SSL policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslPolicies.list", // "parameterOrder": [ @@ -121256,7 +127989,8 @@ type SslPoliciesListAvailableFeaturesCall struct { } // ListAvailableFeatures: Lists all features that can be specified in -// the SSL policy when using custom profile. +// the SSL policy when using custom profile. (== suppress_warning +// http-rest-shadowed ==) func (r *SslPoliciesService) ListAvailableFeatures(project string) *SslPoliciesListAvailableFeaturesCall { c := &SslPoliciesListAvailableFeaturesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -121363,6 +128097,7 @@ func (c *SslPoliciesListAvailableFeaturesCall) Header() http.Header { func (c *SslPoliciesListAvailableFeaturesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121426,7 +128161,7 @@ func (c *SslPoliciesListAvailableFeaturesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists all features that can be specified in the SSL policy when using custom profile.", + // "description": "Lists all features that can be specified in the SSL policy when using custom profile. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslPolicies.listAvailableFeatures", // "parameterOrder": [ @@ -121490,7 +128225,7 @@ type SslPoliciesPatchCall struct { } // Patch: Patches the specified SSL policy with the data included in the -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Patch(project string, sslPolicy string, sslpolicy *SslPolicy) *SslPoliciesPatchCall { c := &SslPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -121545,6 +128280,7 @@ func (c *SslPoliciesPatchCall) Header() http.Header { func (c *SslPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121609,7 +128345,7 @@ func (c *SslPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Patches the specified SSL policy with the data included in the request.", + // "description": "Patches the specified SSL policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.sslPolicies.patch", // "parameterOrder": [ @@ -121664,7 +128400,7 @@ type SslPoliciesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslPoliciesTestIamPermissionsCall { c := &SslPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -121700,6 +128436,7 @@ func (c *SslPoliciesTestIamPermissionsCall) Header() http.Header { func (c *SslPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121764,7 +128501,7 @@ func (c *SslPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.sslPolicies.testIamPermissions", // "parameterOrder": [ @@ -121814,7 +128551,8 @@ type SubnetworksAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of subnetworks. +// AggregatedList: Retrieves an aggregated list of subnetworks. (== +// suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) AggregatedList(project string) *SubnetworksAggregatedListCall { c := &SubnetworksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -121921,6 +128659,7 @@ func (c *SubnetworksAggregatedListCall) Header() http.Header { func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -121982,7 +128721,7 @@ func (c *SubnetworksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Subne } return ret, nil // { - // "description": "Retrieves an aggregated list of subnetworks.", + // "description": "Retrieves an aggregated list of subnetworks. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.aggregatedList", // "parameterOrder": [ @@ -122066,7 +128805,8 @@ type SubnetworksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified subnetwork. +// Delete: Deletes the specified subnetwork. (== suppress_warning +// http-rest-shadowed ==) func (r *SubnetworksService) Delete(project string, region string, subnetwork string) *SubnetworksDeleteCall { c := &SubnetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -122121,6 +128861,7 @@ func (c *SubnetworksDeleteCall) Header() http.Header { func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122181,7 +128922,7 @@ func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified subnetwork.", + // "description": "Deletes the specified subnetwork. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.subnetworks.delete", // "parameterOrder": [ @@ -122243,7 +128984,7 @@ type SubnetworksExpandIpCidrRangeCall struct { } // ExpandIpCidrRange: Expands the IP CIDR range of the subnetwork to a -// specified value. +// specified value. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) ExpandIpCidrRange(project string, region string, subnetwork string, subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest) *SubnetworksExpandIpCidrRangeCall { c := &SubnetworksExpandIpCidrRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -122299,6 +129040,7 @@ func (c *SubnetworksExpandIpCidrRangeCall) Header() http.Header { func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122364,7 +129106,7 @@ func (c *SubnetworksExpandIpCidrRangeCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Expands the IP CIDR range of the subnetwork to a specified value.", + // "description": "Expands the IP CIDR range of the subnetwork to a specified value. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.expandIpCidrRange", // "parameterOrder": [ @@ -122429,7 +129171,8 @@ type SubnetworksGetCall struct { } // Get: Returns the specified subnetwork. Gets a list of available -// subnetworks list() request. +// subnetworks list() request. (== suppress_warning http-rest-shadowed +// ==) func (r *SubnetworksService) Get(project string, region string, subnetwork string) *SubnetworksGetCall { c := &SubnetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -122475,6 +129218,7 @@ func (c *SubnetworksGetCall) Header() http.Header { func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122538,7 +129282,7 @@ func (c *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, erro } return ret, nil // { - // "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request.", + // "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.get", // "parameterOrder": [ @@ -122596,7 +129340,8 @@ type SubnetworksGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *SubnetworksService) GetIamPolicy(project string, region string, resource string) *SubnetworksGetIamPolicyCall { c := &SubnetworksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -122605,6 +129350,13 @@ func (r *SubnetworksService) GetIamPolicy(project string, region string, resourc return c } +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *SubnetworksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *SubnetworksGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -122642,6 +129394,7 @@ func (c *SubnetworksGetIamPolicyCall) Header() http.Header { func (c *SubnetworksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122705,7 +129458,7 @@ func (c *SubnetworksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.getIamPolicy", // "parameterOrder": [ @@ -122714,6 +129467,12 @@ func (c *SubnetworksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, // "resource" // ], // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -122762,7 +129521,7 @@ type SubnetworksInsertCall struct { } // Insert: Creates a subnetwork in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) Insert(project string, region string, subnetwork *Subnetwork) *SubnetworksInsertCall { c := &SubnetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -122817,6 +129576,7 @@ func (c *SubnetworksInsertCall) Header() http.Header { func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -122881,7 +129641,7 @@ func (c *SubnetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates a subnetwork in the specified project using the data included in the request.", + // "description": "Creates a subnetwork in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.insert", // "parameterOrder": [ @@ -122937,7 +129697,7 @@ type SubnetworksListCall struct { } // List: Retrieves a list of subnetworks available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) List(project string, region string) *SubnetworksListCall { c := &SubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -123045,6 +129805,7 @@ func (c *SubnetworksListCall) Header() http.Header { func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123107,7 +129868,7 @@ func (c *SubnetworksListCall) Do(opts ...googleapi.CallOption) (*SubnetworkList, } return ret, nil // { - // "description": "Retrieves a list of subnetworks available to the specified project.", + // "description": "Retrieves a list of subnetworks available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.list", // "parameterOrder": [ @@ -123198,7 +129959,10 @@ type SubnetworksListUsableCall struct { header_ http.Header } -// ListUsable: Retrieves an aggregated list of usable subnetworks. +// ListUsable: Retrieves an aggregated list of all usable subnetworks in +// the project. The list contains all of the subnetworks in the project +// and the subnetworks that were shared by a Shared VPC host project. +// (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) ListUsable(project string) *SubnetworksListUsableCall { c := &SubnetworksListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -123305,6 +130069,7 @@ func (c *SubnetworksListUsableCall) Header() http.Header { func (c *SubnetworksListUsableCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123366,7 +130131,7 @@ func (c *SubnetworksListUsableCall) Do(opts ...googleapi.CallOption) (*UsableSub } return ret, nil // { - // "description": "Retrieves an aggregated list of usable subnetworks.", + // "description": "Retrieves an aggregated list of all usable subnetworks in the project. The list contains all of the subnetworks in the project and the subnetworks that were shared by a Shared VPC host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.listUsable", // "parameterOrder": [ @@ -123454,7 +130219,8 @@ type SubnetworksPatchCall struct { // Patch: Patches the specified subnetwork with the data included in the // request. Only certain fields can up updated with a patch request as // indicated in the field descriptions. You must specify the current -// fingeprint of the subnetwork resource being patched. +// fingeprint of the subnetwork resource being patched. (== +// suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) Patch(project string, region string, subnetwork string, subnetwork2 *Subnetwork) *SubnetworksPatchCall { c := &SubnetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -123525,6 +130291,7 @@ func (c *SubnetworksPatchCall) Header() http.Header { func (c *SubnetworksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123590,7 +130357,7 @@ func (c *SubnetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.", + // "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.subnetworks.patch", // "parameterOrder": [ @@ -123661,7 +130428,8 @@ type SubnetworksSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SubnetworksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *SubnetworksSetIamPolicyCall { c := &SubnetworksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -123698,6 +130466,7 @@ func (c *SubnetworksSetIamPolicyCall) Header() http.Header { func (c *SubnetworksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123763,7 +130532,7 @@ func (c *SubnetworksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.setIamPolicy", // "parameterOrder": [ @@ -123824,7 +130593,7 @@ type SubnetworksSetPrivateIpGoogleAccessCall struct { // SetPrivateIpGoogleAccess: Set whether VMs in this subnet can access // Google services without assigning external IP addresses through -// Private Google Access. +// Private Google Access. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) SetPrivateIpGoogleAccess(project string, region string, subnetwork string, subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest) *SubnetworksSetPrivateIpGoogleAccessCall { c := &SubnetworksSetPrivateIpGoogleAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -123880,6 +130649,7 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) Header() http.Header { func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -123945,7 +130715,7 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", + // "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.setPrivateIpGoogleAccess", // "parameterOrder": [ @@ -124010,7 +130780,7 @@ type SubnetworksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *SubnetworksTestIamPermissionsCall { c := &SubnetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -124047,6 +130817,7 @@ func (c *SubnetworksTestIamPermissionsCall) Header() http.Header { func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124112,7 +130883,7 @@ func (c *SubnetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.testIamPermissions", // "parameterOrder": [ @@ -124171,7 +130942,8 @@ type TargetHttpProxiesAggregatedListCall struct { } // AggregatedList: Retrieves the list of all TargetHttpProxy resources, -// regional and global, available to the specified project. +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpProxiesService) AggregatedList(project string) *TargetHttpProxiesAggregatedListCall { c := &TargetHttpProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -124278,6 +131050,7 @@ func (c *TargetHttpProxiesAggregatedListCall) Header() http.Header { func (c *TargetHttpProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124339,7 +131112,7 @@ func (c *TargetHttpProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpProxies.aggregatedList", // "parameterOrder": [ @@ -124422,7 +131195,8 @@ type TargetHttpProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetHttpProxy resource. +// Delete: Deletes the specified TargetHttpProxy resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/delete func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall { c := &TargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -124477,6 +131251,7 @@ func (c *TargetHttpProxiesDeleteCall) Header() http.Header { func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124536,7 +131311,7 @@ func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified TargetHttpProxy resource.", + // "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetHttpProxies.delete", // "parameterOrder": [ @@ -124589,7 +131364,8 @@ type TargetHttpProxiesGetCall struct { } // Get: Returns the specified TargetHttpProxy resource. Gets a list of -// available target HTTP proxies by making a list() request. +// available target HTTP proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/get func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall { c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -124635,6 +131411,7 @@ func (c *TargetHttpProxiesGetCall) Header() http.Header { func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124697,7 +131474,7 @@ func (c *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttp } return ret, nil // { - // "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request.", + // "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpProxies.get", // "parameterOrder": [ @@ -124745,7 +131522,8 @@ type TargetHttpProxiesInsertCall struct { } // Insert: Creates a TargetHttpProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/insert func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall { c := &TargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -124800,6 +131578,7 @@ func (c *TargetHttpProxiesInsertCall) Header() http.Header { func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -124863,7 +131642,7 @@ func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpProxies.insert", // "parameterOrder": [ @@ -124910,7 +131689,7 @@ type TargetHttpProxiesListCall struct { } // List: Retrieves the list of TargetHttpProxy resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/list func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall { c := &TargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -125018,6 +131797,7 @@ func (c *TargetHttpProxiesListCall) Header() http.Header { func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125079,7 +131859,7 @@ func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHtt } return ret, nil // { - // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpProxies.list", // "parameterOrder": [ @@ -125163,7 +131943,8 @@ type TargetHttpProxiesSetUrlMapCall struct { header_ http.Header } -// SetUrlMap: Changes the URL map for TargetHttpProxy. +// SetUrlMap: Changes the URL map for TargetHttpProxy. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/setUrlMap func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall { c := &TargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -125219,6 +132000,7 @@ func (c *TargetHttpProxiesSetUrlMapCall) Header() http.Header { func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125283,7 +132065,7 @@ func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Changes the URL map for TargetHttpProxy.", + // "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpProxies.setUrlMap", // "parameterOrder": [ @@ -125339,7 +132121,7 @@ type TargetHttpProxiesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpProxiesTestIamPermissionsCall { c := &TargetHttpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -125375,6 +132157,7 @@ func (c *TargetHttpProxiesTestIamPermissionsCall) Header() http.Header { func (c *TargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125439,7 +132222,7 @@ func (c *TargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpProxies.testIamPermissions", // "parameterOrder": [ @@ -125490,7 +132273,8 @@ type TargetHttpsProxiesAggregatedListCall struct { } // AggregatedList: Retrieves the list of all TargetHttpsProxy resources, -// regional and global, available to the specified project. +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) AggregatedList(project string) *TargetHttpsProxiesAggregatedListCall { c := &TargetHttpsProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -125597,6 +132381,7 @@ func (c *TargetHttpsProxiesAggregatedListCall) Header() http.Header { func (c *TargetHttpsProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125658,7 +132443,7 @@ func (c *TargetHttpsProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpsProxies.aggregatedList", // "parameterOrder": [ @@ -125741,7 +132526,8 @@ type TargetHttpsProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetHttpsProxy resource. +// Delete: Deletes the specified TargetHttpsProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy string) *TargetHttpsProxiesDeleteCall { c := &TargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -125795,6 +132581,7 @@ func (c *TargetHttpsProxiesDeleteCall) Header() http.Header { func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -125854,7 +132641,7 @@ func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Deletes the specified TargetHttpsProxy resource.", + // "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetHttpsProxies.delete", // "parameterOrder": [ @@ -125907,7 +132694,8 @@ type TargetHttpsProxiesGetCall struct { } // Get: Returns the specified TargetHttpsProxy resource. Gets a list of -// available target HTTPS proxies by making a list() request. +// available target HTTPS proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall { c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -125952,6 +132740,7 @@ func (c *TargetHttpsProxiesGetCall) Header() http.Header { func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126014,7 +132803,7 @@ func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHtt } return ret, nil // { - // "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request.", + // "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpsProxies.get", // "parameterOrder": [ @@ -126062,7 +132851,8 @@ type TargetHttpsProxiesInsertCall struct { } // Insert: Creates a TargetHttpsProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesInsertCall { c := &TargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -126116,6 +132906,7 @@ func (c *TargetHttpsProxiesInsertCall) Header() http.Header { func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126179,7 +132970,7 @@ func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.insert", // "parameterOrder": [ @@ -126226,7 +133017,7 @@ type TargetHttpsProxiesListCall struct { } // List: Retrieves the list of TargetHttpsProxy resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesListCall { c := &TargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -126333,6 +133124,7 @@ func (c *TargetHttpsProxiesListCall) Header() http.Header { func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126394,7 +133186,7 @@ func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHt } return ret, nil // { - // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpsProxies.list", // "parameterOrder": [ @@ -126479,6 +133271,7 @@ type TargetHttpsProxiesSetQuicOverrideCall struct { } // SetQuicOverride: Sets the QUIC override policy for TargetHttpsProxy. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetQuicOverride(project string, targetHttpsProxy string, targethttpsproxiessetquicoverriderequest *TargetHttpsProxiesSetQuicOverrideRequest) *TargetHttpsProxiesSetQuicOverrideCall { c := &TargetHttpsProxiesSetQuicOverrideCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -126533,6 +133326,7 @@ func (c *TargetHttpsProxiesSetQuicOverrideCall) Header() http.Header { func (c *TargetHttpsProxiesSetQuicOverrideCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126597,7 +133391,7 @@ func (c *TargetHttpsProxiesSetQuicOverrideCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the QUIC override policy for TargetHttpsProxy.", + // "description": "Sets the QUIC override policy for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setQuicOverride", // "parameterOrder": [ @@ -126652,6 +133446,7 @@ type TargetHttpsProxiesSetSslCertificatesCall struct { } // SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHttpsProxy string, targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest) *TargetHttpsProxiesSetSslCertificatesCall { c := &TargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -126706,6 +133501,7 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126770,7 +133566,7 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Replaces SslCertificates for TargetHttpsProxy.", + // "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setSslCertificates", // "parameterOrder": [ @@ -126829,7 +133625,7 @@ type TargetHttpsProxiesSetSslPolicyCall struct { // policy specifies the server-side support for SSL features. This // affects connections between clients and the HTTPS proxy load // balancer. They do not affect the connection between the load balancer -// and the backends. +// and the backends. (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetSslPolicy(project string, targetHttpsProxy string, sslpolicyreference *SslPolicyReference) *TargetHttpsProxiesSetSslPolicyCall { c := &TargetHttpsProxiesSetSslPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -126884,6 +133680,7 @@ func (c *TargetHttpsProxiesSetSslPolicyCall) Header() http.Header { func (c *TargetHttpsProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -126948,7 +133745,7 @@ func (c *TargetHttpsProxiesSetSslPolicyCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends.", + // "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setSslPolicy", // "parameterOrder": [ @@ -127002,7 +133799,8 @@ type TargetHttpsProxiesSetUrlMapCall struct { header_ http.Header } -// SetUrlMap: Changes the URL map for TargetHttpsProxy. +// SetUrlMap: Changes the URL map for TargetHttpsProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy string, urlmapreference *UrlMapReference) *TargetHttpsProxiesSetUrlMapCall { c := &TargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -127057,6 +133855,7 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Header() http.Header { func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127121,7 +133920,7 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Changes the URL map for TargetHttpsProxy.", + // "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setUrlMap", // "parameterOrder": [ @@ -127177,7 +133976,7 @@ type TargetHttpsProxiesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpsProxiesTestIamPermissionsCall { c := &TargetHttpsProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -127213,6 +134012,7 @@ func (c *TargetHttpsProxiesTestIamPermissionsCall) Header() http.Header { func (c *TargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127277,7 +134077,7 @@ func (c *TargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.testIamPermissions", // "parameterOrder": [ @@ -127327,7 +134127,8 @@ type TargetInstancesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of target instances. +// AggregatedList: Retrieves an aggregated list of target instances. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/aggregatedList func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall { c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -127435,6 +134236,7 @@ func (c *TargetInstancesAggregatedListCall) Header() http.Header { func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127496,7 +134298,7 @@ func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Retrieves an aggregated list of target instances.", + // "description": "Retrieves an aggregated list of target instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetInstances.aggregatedList", // "parameterOrder": [ @@ -127580,7 +134382,8 @@ type TargetInstancesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetInstance resource. +// Delete: Deletes the specified TargetInstance resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/delete func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall { c := &TargetInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -127636,6 +134439,7 @@ func (c *TargetInstancesDeleteCall) Header() http.Header { func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127696,7 +134500,7 @@ func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified TargetInstance resource.", + // "description": "Deletes the specified TargetInstance resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetInstances.delete", // "parameterOrder": [ @@ -127758,7 +134562,8 @@ type TargetInstancesGetCall struct { } // Get: Returns the specified TargetInstance resource. Gets a list of -// available target instances by making a list() request. +// available target instances by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/get func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall { c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -127805,6 +134610,7 @@ func (c *TargetInstancesGetCall) Header() http.Header { func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -127868,7 +134674,7 @@ func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstan } return ret, nil // { - // "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.", + // "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetInstances.get", // "parameterOrder": [ @@ -127925,7 +134731,8 @@ type TargetInstancesInsertCall struct { } // Insert: Creates a TargetInstance resource in the specified project -// and zone using the data included in the request. +// and zone using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/insert func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall { c := &TargetInstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -127981,6 +134788,7 @@ func (c *TargetInstancesInsertCall) Header() http.Header { func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128045,7 +134853,7 @@ func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", + // "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetInstances.insert", // "parameterOrder": [ @@ -128101,7 +134909,8 @@ type TargetInstancesListCall struct { } // List: Retrieves a list of TargetInstance resources available to the -// specified project and zone. +// specified project and zone. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/list func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall { c := &TargetInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -128210,6 +135019,7 @@ func (c *TargetInstancesListCall) Header() http.Header { func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128272,7 +135082,7 @@ func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInsta } return ret, nil // { - // "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", + // "description": "Retrieves a list of TargetInstance resources available to the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetInstances.list", // "parameterOrder": [ @@ -128366,7 +135176,7 @@ type TargetInstancesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetInstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetInstancesTestIamPermissionsCall { c := &TargetInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -128403,6 +135213,7 @@ func (c *TargetInstancesTestIamPermissionsCall) Header() http.Header { func (c *TargetInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128468,7 +135279,7 @@ func (c *TargetInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetInstances.testIamPermissions", // "parameterOrder": [ @@ -128528,7 +135339,8 @@ type TargetPoolsAddHealthCheckCall struct { header_ http.Header } -// AddHealthCheck: Adds health check URLs to a target pool. +// AddHealthCheck: Adds health check URLs to a target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addHealthCheck func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall { c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -128585,6 +135397,7 @@ func (c *TargetPoolsAddHealthCheckCall) Header() http.Header { func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128650,7 +135463,7 @@ func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Adds health check URLs to a target pool.", + // "description": "Adds health check URLs to a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.addHealthCheck", // "parameterOrder": [ @@ -128714,7 +135527,8 @@ type TargetPoolsAddInstanceCall struct { header_ http.Header } -// AddInstance: Adds an instance to a target pool. +// AddInstance: Adds an instance to a target pool. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addInstance func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall { c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -128771,6 +135585,7 @@ func (c *TargetPoolsAddInstanceCall) Header() http.Header { func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -128836,7 +135651,7 @@ func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Adds an instance to a target pool.", + // "description": "Adds an instance to a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.addInstance", // "parameterOrder": [ @@ -128898,7 +135713,8 @@ type TargetPoolsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of target pools. +// AggregatedList: Retrieves an aggregated list of target pools. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/aggregatedList func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall { c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -129006,6 +135822,7 @@ func (c *TargetPoolsAggregatedListCall) Header() http.Header { func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129067,7 +135884,7 @@ func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Targe } return ret, nil // { - // "description": "Retrieves an aggregated list of target pools.", + // "description": "Retrieves an aggregated list of target pools. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetPools.aggregatedList", // "parameterOrder": [ @@ -129151,7 +135968,8 @@ type TargetPoolsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified target pool. +// Delete: Deletes the specified target pool. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/delete func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall { c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -129207,6 +136025,7 @@ func (c *TargetPoolsDeleteCall) Header() http.Header { func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129267,7 +136086,7 @@ func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified target pool.", + // "description": "Deletes the specified target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetPools.delete", // "parameterOrder": [ @@ -129329,7 +136148,8 @@ type TargetPoolsGetCall struct { } // Get: Returns the specified target pool. Gets a list of available -// target pools by making a list() request. +// target pools by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/get func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall { c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -129376,6 +136196,7 @@ func (c *TargetPoolsGetCall) Header() http.Header { func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129439,7 +136260,7 @@ func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, erro } return ret, nil // { - // "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request.", + // "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetPools.get", // "parameterOrder": [ @@ -129497,7 +136318,8 @@ type TargetPoolsGetHealthCall struct { } // GetHealth: Gets the most recent health check results for each IP for -// the instance that is referenced by the given target pool. +// the instance that is referenced by the given target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/getHealth func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall { c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -129535,6 +136357,7 @@ func (c *TargetPoolsGetHealthCall) Header() http.Header { func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129600,7 +136423,7 @@ func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPool } return ret, nil // { - // "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", + // "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.getHealth", // "parameterOrder": [ @@ -129660,7 +136483,8 @@ type TargetPoolsInsertCall struct { } // Insert: Creates a target pool in the specified project and region -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/insert func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall { c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -129716,6 +136540,7 @@ func (c *TargetPoolsInsertCall) Header() http.Header { func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -129780,7 +136605,7 @@ func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates a target pool in the specified project and region using the data included in the request.", + // "description": "Creates a target pool in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.insert", // "parameterOrder": [ @@ -129836,7 +136661,7 @@ type TargetPoolsListCall struct { } // List: Retrieves a list of target pools available to the specified -// project and region. +// project and region. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/list func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall { c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -129945,6 +136770,7 @@ func (c *TargetPoolsListCall) Header() http.Header { func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130007,7 +136833,7 @@ func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, } return ret, nil // { - // "description": "Retrieves a list of target pools available to the specified project and region.", + // "description": "Retrieves a list of target pools available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetPools.list", // "parameterOrder": [ @@ -130100,7 +136926,8 @@ type TargetPoolsRemoveHealthCheckCall struct { header_ http.Header } -// RemoveHealthCheck: Removes health check URL from a target pool. +// RemoveHealthCheck: Removes health check URL from a target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeHealthCheck func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall { c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -130157,6 +136984,7 @@ func (c *TargetPoolsRemoveHealthCheckCall) Header() http.Header { func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130222,7 +137050,7 @@ func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Removes health check URL from a target pool.", + // "description": "Removes health check URL from a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.removeHealthCheck", // "parameterOrder": [ @@ -130286,7 +137114,8 @@ type TargetPoolsRemoveInstanceCall struct { header_ http.Header } -// RemoveInstance: Removes instance URL from a target pool. +// RemoveInstance: Removes instance URL from a target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeInstance func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall { c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -130343,6 +137172,7 @@ func (c *TargetPoolsRemoveInstanceCall) Header() http.Header { func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130408,7 +137238,7 @@ func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Removes instance URL from a target pool.", + // "description": "Removes instance URL from a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.removeInstance", // "parameterOrder": [ @@ -130472,7 +137302,8 @@ type TargetPoolsSetBackupCall struct { header_ http.Header } -// SetBackup: Changes a backup target pool's configurations. +// SetBackup: Changes a backup target pool's configurations. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/setBackup func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall { c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -130536,6 +137367,7 @@ func (c *TargetPoolsSetBackupCall) Header() http.Header { func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130601,7 +137433,7 @@ func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Changes a backup target pool's configurations.", + // "description": "Changes a backup target pool's configurations. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.setBackup", // "parameterOrder": [ @@ -130672,7 +137504,7 @@ type TargetPoolsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetPoolsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetPoolsTestIamPermissionsCall { c := &TargetPoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -130709,6 +137541,7 @@ func (c *TargetPoolsTestIamPermissionsCall) Header() http.Header { func (c *TargetPoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130774,7 +137607,7 @@ func (c *TargetPoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.testIamPermissions", // "parameterOrder": [ @@ -130832,7 +137665,8 @@ type TargetSslProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetSslProxy resource. +// Delete: Deletes the specified TargetSslProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) Delete(project string, targetSslProxy string) *TargetSslProxiesDeleteCall { c := &TargetSslProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -130886,6 +137720,7 @@ func (c *TargetSslProxiesDeleteCall) Header() http.Header { func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -130945,7 +137780,7 @@ func (c *TargetSslProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified TargetSslProxy resource.", + // "description": "Deletes the specified TargetSslProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetSslProxies.delete", // "parameterOrder": [ @@ -130998,7 +137833,8 @@ type TargetSslProxiesGetCall struct { } // Get: Returns the specified TargetSslProxy resource. Gets a list of -// available target SSL proxies by making a list() request. +// available target SSL proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) Get(project string, targetSslProxy string) *TargetSslProxiesGetCall { c := &TargetSslProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131043,6 +137879,7 @@ func (c *TargetSslProxiesGetCall) Header() http.Header { func (c *TargetSslProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131105,7 +137942,7 @@ func (c *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslPr } return ret, nil // { - // "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request.", + // "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetSslProxies.get", // "parameterOrder": [ @@ -131153,7 +137990,8 @@ type TargetSslProxiesInsertCall struct { } // Insert: Creates a TargetSslProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetSslProxiesService) Insert(project string, targetsslproxy *TargetSslProxy) *TargetSslProxiesInsertCall { c := &TargetSslProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131207,6 +138045,7 @@ func (c *TargetSslProxiesInsertCall) Header() http.Header { func (c *TargetSslProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131270,7 +138109,7 @@ func (c *TargetSslProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.insert", // "parameterOrder": [ @@ -131317,7 +138156,7 @@ type TargetSslProxiesListCall struct { } // List: Retrieves the list of TargetSslProxy resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) List(project string) *TargetSslProxiesListCall { c := &TargetSslProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131424,6 +138263,7 @@ func (c *TargetSslProxiesListCall) Header() http.Header { func (c *TargetSslProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131485,7 +138325,7 @@ func (c *TargetSslProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetSslP } return ret, nil // { - // "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetSslProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetSslProxies.list", // "parameterOrder": [ @@ -131569,7 +138409,8 @@ type TargetSslProxiesSetBackendServiceCall struct { header_ http.Header } -// SetBackendService: Changes the BackendService for TargetSslProxy. +// SetBackendService: Changes the BackendService for TargetSslProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetBackendService(project string, targetSslProxy string, targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest) *TargetSslProxiesSetBackendServiceCall { c := &TargetSslProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131624,6 +138465,7 @@ func (c *TargetSslProxiesSetBackendServiceCall) Header() http.Header { func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131688,7 +138530,7 @@ func (c *TargetSslProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the BackendService for TargetSslProxy.", + // "description": "Changes the BackendService for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setBackendService", // "parameterOrder": [ @@ -131743,7 +138585,8 @@ type TargetSslProxiesSetProxyHeaderCall struct { header_ http.Header } -// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy. +// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetProxyHeader(project string, targetSslProxy string, targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest) *TargetSslProxiesSetProxyHeaderCall { c := &TargetSslProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131798,6 +138641,7 @@ func (c *TargetSslProxiesSetProxyHeaderCall) Header() http.Header { func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -131862,7 +138706,7 @@ func (c *TargetSslProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Changes the ProxyHeaderType for TargetSslProxy.", + // "description": "Changes the ProxyHeaderType for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setProxyHeader", // "parameterOrder": [ @@ -131917,7 +138761,8 @@ type TargetSslProxiesSetSslCertificatesCall struct { header_ http.Header } -// SetSslCertificates: Changes SslCertificates for TargetSslProxy. +// SetSslCertificates: Changes SslCertificates for TargetSslProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetSslCertificates(project string, targetSslProxy string, targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest) *TargetSslProxiesSetSslCertificatesCall { c := &TargetSslProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -131972,6 +138817,7 @@ func (c *TargetSslProxiesSetSslCertificatesCall) Header() http.Header { func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132036,7 +138882,7 @@ func (c *TargetSslProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Changes SslCertificates for TargetSslProxy.", + // "description": "Changes SslCertificates for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setSslCertificates", // "parameterOrder": [ @@ -132095,6 +138941,7 @@ type TargetSslProxiesSetSslPolicyCall struct { // specifies the server-side support for SSL features. This affects // connections between clients and the SSL proxy load balancer. They do // not affect the connection between the load balancer and the backends. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetSslPolicy(project string, targetSslProxy string, sslpolicyreference *SslPolicyReference) *TargetSslProxiesSetSslPolicyCall { c := &TargetSslProxiesSetSslPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -132149,6 +138996,7 @@ func (c *TargetSslProxiesSetSslPolicyCall) Header() http.Header { func (c *TargetSslProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132213,7 +139061,7 @@ func (c *TargetSslProxiesSetSslPolicyCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends.", + // "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setSslPolicy", // "parameterOrder": [ @@ -132268,7 +139116,7 @@ type TargetSslProxiesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetSslProxiesTestIamPermissionsCall { c := &TargetSslProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -132304,6 +139152,7 @@ func (c *TargetSslProxiesTestIamPermissionsCall) Header() http.Header { func (c *TargetSslProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132368,7 +139217,7 @@ func (c *TargetSslProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.testIamPermissions", // "parameterOrder": [ @@ -132418,7 +139267,8 @@ type TargetTcpProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetTcpProxy resource. +// Delete: Deletes the specified TargetTcpProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) Delete(project string, targetTcpProxy string) *TargetTcpProxiesDeleteCall { c := &TargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -132472,6 +139322,7 @@ func (c *TargetTcpProxiesDeleteCall) Header() http.Header { func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132531,7 +139382,7 @@ func (c *TargetTcpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified TargetTcpProxy resource.", + // "description": "Deletes the specified TargetTcpProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetTcpProxies.delete", // "parameterOrder": [ @@ -132584,7 +139435,8 @@ type TargetTcpProxiesGetCall struct { } // Get: Returns the specified TargetTcpProxy resource. Gets a list of -// available target TCP proxies by making a list() request. +// available target TCP proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) Get(project string, targetTcpProxy string) *TargetTcpProxiesGetCall { c := &TargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -132629,6 +139481,7 @@ func (c *TargetTcpProxiesGetCall) Header() http.Header { func (c *TargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132691,7 +139544,7 @@ func (c *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpPr } return ret, nil // { - // "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.", + // "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetTcpProxies.get", // "parameterOrder": [ @@ -132739,7 +139592,8 @@ type TargetTcpProxiesInsertCall struct { } // Insert: Creates a TargetTcpProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetTcpProxiesService) Insert(project string, targettcpproxy *TargetTcpProxy) *TargetTcpProxiesInsertCall { c := &TargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -132793,6 +139647,7 @@ func (c *TargetTcpProxiesInsertCall) Header() http.Header { func (c *TargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -132856,7 +139711,7 @@ func (c *TargetTcpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetTcpProxies.insert", // "parameterOrder": [ @@ -132903,7 +139758,7 @@ type TargetTcpProxiesListCall struct { } // List: Retrieves the list of TargetTcpProxy resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) List(project string) *TargetTcpProxiesListCall { c := &TargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -133010,6 +139865,7 @@ func (c *TargetTcpProxiesListCall) Header() http.Header { func (c *TargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133071,7 +139927,7 @@ func (c *TargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpP } return ret, nil // { - // "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetTcpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetTcpProxies.list", // "parameterOrder": [ @@ -133155,7 +140011,8 @@ type TargetTcpProxiesSetBackendServiceCall struct { header_ http.Header } -// SetBackendService: Changes the BackendService for TargetTcpProxy. +// SetBackendService: Changes the BackendService for TargetTcpProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) SetBackendService(project string, targetTcpProxy string, targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest) *TargetTcpProxiesSetBackendServiceCall { c := &TargetTcpProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -133210,6 +140067,7 @@ func (c *TargetTcpProxiesSetBackendServiceCall) Header() http.Header { func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133274,7 +140132,7 @@ func (c *TargetTcpProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the BackendService for TargetTcpProxy.", + // "description": "Changes the BackendService for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetTcpProxies.setBackendService", // "parameterOrder": [ @@ -133329,7 +140187,8 @@ type TargetTcpProxiesSetProxyHeaderCall struct { header_ http.Header } -// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy. +// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) SetProxyHeader(project string, targetTcpProxy string, targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest) *TargetTcpProxiesSetProxyHeaderCall { c := &TargetTcpProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -133384,6 +140243,7 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) Header() http.Header { func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133448,7 +140308,7 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Changes the ProxyHeaderType for TargetTcpProxy.", + // "description": "Changes the ProxyHeaderType for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetTcpProxies.setProxyHeader", // "parameterOrder": [ @@ -133503,6 +140363,7 @@ type TargetVpnGatewaysAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of target VPN gateways. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall { c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -133609,6 +140470,7 @@ func (c *TargetVpnGatewaysAggregatedListCall) Header() http.Header { func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133670,7 +140532,7 @@ func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves an aggregated list of target VPN gateways.", + // "description": "Retrieves an aggregated list of target VPN gateways. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.aggregatedList", // "parameterOrder": [ @@ -133754,7 +140616,8 @@ type TargetVpnGatewaysDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified target VPN gateway. +// Delete: Deletes the specified target VPN gateway. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall { c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -133809,6 +140672,7 @@ func (c *TargetVpnGatewaysDeleteCall) Header() http.Header { func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -133869,7 +140733,7 @@ func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified target VPN gateway.", + // "description": "Deletes the specified target VPN gateway. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetVpnGateways.delete", // "parameterOrder": [ @@ -133931,7 +140795,8 @@ type TargetVpnGatewaysGetCall struct { } // Get: Returns the specified target VPN gateway. Gets a list of -// available target VPN gateways by making a list() request. +// available target VPN gateways by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall { c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -133977,6 +140842,7 @@ func (c *TargetVpnGatewaysGetCall) Header() http.Header { func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134040,7 +140906,7 @@ func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnG } return ret, nil // { - // "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.", + // "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.get", // "parameterOrder": [ @@ -134097,7 +140963,8 @@ type TargetVpnGatewaysInsertCall struct { } // Insert: Creates a target VPN gateway in the specified project and -// region using the data included in the request. +// region using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall { c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -134152,6 +141019,7 @@ func (c *TargetVpnGatewaysInsertCall) Header() http.Header { func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134216,7 +141084,7 @@ func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", + // "description": "Creates a target VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetVpnGateways.insert", // "parameterOrder": [ @@ -134272,7 +141140,8 @@ type TargetVpnGatewaysListCall struct { } // List: Retrieves a list of target VPN gateways available to the -// specified project and region. +// specified project and region. (== suppress_warning http-rest-shadowed +// ==) func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall { c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -134380,6 +141249,7 @@ func (c *TargetVpnGatewaysListCall) Header() http.Header { func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134442,7 +141312,7 @@ func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpn } return ret, nil // { - // "description": "Retrieves a list of target VPN gateways available to the specified project and region.", + // "description": "Retrieves a list of target VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.list", // "parameterOrder": [ @@ -134536,7 +141406,8 @@ type TargetVpnGatewaysSetLabelsCall struct { } // SetLabels: Sets the labels on a TargetVpnGateway. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *TargetVpnGatewaysSetLabelsCall { c := &TargetVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -134592,6 +141463,7 @@ func (c *TargetVpnGatewaysSetLabelsCall) Header() http.Header { func (c *TargetVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134657,7 +141529,7 @@ func (c *TargetVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetVpnGateways.setLabels", // "parameterOrder": [ @@ -134722,7 +141594,7 @@ type TargetVpnGatewaysTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetVpnGatewaysTestIamPermissionsCall { c := &TargetVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -134759,6 +141631,7 @@ func (c *TargetVpnGatewaysTestIamPermissionsCall) Header() http.Header { func (c *TargetVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -134824,7 +141697,7 @@ func (c *TargetVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetVpnGateways.testIamPermissions", // "parameterOrder": [ @@ -134883,7 +141756,8 @@ type UrlMapsAggregatedListCall struct { } // AggregatedList: Retrieves the list of all UrlMap resources, regional -// and global, available to the specified project. +// and global, available to the specified project. (== suppress_warning +// http-rest-shadowed ==) func (r *UrlMapsService) AggregatedList(project string) *UrlMapsAggregatedListCall { c := &UrlMapsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -134990,6 +141864,7 @@ func (c *UrlMapsAggregatedListCall) Header() http.Header { func (c *UrlMapsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135051,7 +141926,7 @@ func (c *UrlMapsAggregatedListCall) Do(opts ...googleapi.CallOption) (*UrlMapsAg } return ret, nil // { - // "description": "Retrieves the list of all UrlMap resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all UrlMap resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.urlMaps.aggregatedList", // "parameterOrder": [ @@ -135134,7 +142009,8 @@ type UrlMapsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified UrlMap resource. +// Delete: Deletes the specified UrlMap resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/delete func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall { c := &UrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -135189,6 +142065,7 @@ func (c *UrlMapsDeleteCall) Header() http.Header { func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135248,7 +142125,7 @@ func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified UrlMap resource.", + // "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.urlMaps.delete", // "parameterOrder": [ @@ -135301,7 +142178,8 @@ type UrlMapsGetCall struct { } // Get: Returns the specified UrlMap resource. Gets a list of available -// URL maps by making a list() request. +// URL maps by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/get func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -135347,6 +142225,7 @@ func (c *UrlMapsGetCall) Header() http.Header { func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135409,7 +142288,7 @@ func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) { } return ret, nil // { - // "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.", + // "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.urlMaps.get", // "parameterOrder": [ @@ -135457,7 +142336,8 @@ type UrlMapsInsertCall struct { } // Insert: Creates a UrlMap resource in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/insert func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall { c := &UrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -135512,6 +142392,7 @@ func (c *UrlMapsInsertCall) Header() http.Header { func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135575,7 +142456,7 @@ func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + // "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.urlMaps.insert", // "parameterOrder": [ @@ -135623,7 +142504,8 @@ type UrlMapsInvalidateCacheCall struct { } // InvalidateCache: Initiates a cache invalidation operation, -// invalidating the specified path, scoped to the specified UrlMap. +// invalidating the specified path, scoped to the specified UrlMap. (== +// suppress_warning http-rest-shadowed ==) func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *UrlMapsInvalidateCacheCall { c := &UrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -135678,6 +142560,7 @@ func (c *UrlMapsInvalidateCacheCall) Header() http.Header { func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135742,7 +142625,7 @@ func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", + // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.urlMaps.invalidateCache", // "parameterOrder": [ @@ -135797,7 +142680,7 @@ type UrlMapsListCall struct { } // List: Retrieves the list of UrlMap resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/list func (r *UrlMapsService) List(project string) *UrlMapsListCall { c := &UrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -135905,6 +142788,7 @@ func (c *UrlMapsListCall) Header() http.Header { func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -135966,7 +142850,7 @@ func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error) } return ret, nil // { - // "description": "Retrieves the list of UrlMap resources available to the specified project.", + // "description": "Retrieves the list of UrlMap resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.urlMaps.list", // "parameterOrder": [ @@ -136052,7 +142936,8 @@ type UrlMapsPatchCall struct { // Patch: Patches the specified UrlMap resource with the data included // in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. +// JSON merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall { c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -136108,6 +142993,7 @@ func (c *UrlMapsPatchCall) Header() http.Header { func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136172,7 +143058,7 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.urlMaps.patch", // "parameterOrder": [ @@ -136228,7 +143114,7 @@ type UrlMapsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *UrlMapsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *UrlMapsTestIamPermissionsCall { c := &UrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -136264,6 +143150,7 @@ func (c *UrlMapsTestIamPermissionsCall) Header() http.Header { func (c *UrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136328,7 +143215,7 @@ func (c *UrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestP } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.urlMaps.testIamPermissions", // "parameterOrder": [ @@ -136380,7 +143267,7 @@ type UrlMapsUpdateCall struct { } // Update: Updates the specified UrlMap resource with the data included -// in the request. +// in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/update func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall { c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -136436,6 +143323,7 @@ func (c *UrlMapsUpdateCall) Header() http.Header { func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136500,7 +143388,7 @@ func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Updates the specified UrlMap resource with the data included in the request.", + // "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.urlMaps.update", // "parameterOrder": [ @@ -136557,7 +143445,7 @@ type UrlMapsValidateCall struct { // Validate: Runs static validation for the UrlMap. In particular, the // tests of the provided UrlMap will be run. Calling this method does -// NOT create the UrlMap. +// NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/validate func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall { c := &UrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -136594,6 +143482,7 @@ func (c *UrlMapsValidateCall) Header() http.Header { func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136658,7 +143547,7 @@ func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidate } return ret, nil // { - // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.urlMaps.validate", // "parameterOrder": [ @@ -136707,7 +143596,8 @@ type VpnGatewaysAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of VPN gateways. +// AggregatedList: Retrieves an aggregated list of VPN gateways. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnGatewaysService) AggregatedList(project string) *VpnGatewaysAggregatedListCall { c := &VpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -136814,6 +143704,7 @@ func (c *VpnGatewaysAggregatedListCall) Header() http.Header { func (c *VpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -136875,7 +143766,7 @@ func (c *VpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnGa } return ret, nil // { - // "description": "Retrieves an aggregated list of VPN gateways.", + // "description": "Retrieves an aggregated list of VPN gateways. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnGateways.aggregatedList", // "parameterOrder": [ @@ -136959,7 +143850,8 @@ type VpnGatewaysDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified VPN gateway. +// Delete: Deletes the specified VPN gateway. (== suppress_warning +// http-rest-shadowed ==) func (r *VpnGatewaysService) Delete(project string, region string, vpnGateway string) *VpnGatewaysDeleteCall { c := &VpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -137014,6 +143906,7 @@ func (c *VpnGatewaysDeleteCall) Header() http.Header { func (c *VpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137074,7 +143967,7 @@ func (c *VpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified VPN gateway.", + // "description": "Deletes the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.vpnGateways.delete", // "parameterOrder": [ @@ -137136,7 +144029,8 @@ type VpnGatewaysGetCall struct { } // Get: Returns the specified VPN gateway. Gets a list of available VPN -// gateways by making a list() request. +// gateways by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *VpnGatewaysService) Get(project string, region string, vpnGateway string) *VpnGatewaysGetCall { c := &VpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -137182,6 +144076,7 @@ func (c *VpnGatewaysGetCall) Header() http.Header { func (c *VpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137245,7 +144140,7 @@ func (c *VpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*VpnGateway, erro } return ret, nil // { - // "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request.", + // "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnGateways.get", // "parameterOrder": [ @@ -137302,7 +144197,8 @@ type VpnGatewaysGetStatusCall struct { header_ http.Header } -// GetStatus: Returns the status for the specified VPN gateway. +// GetStatus: Returns the status for the specified VPN gateway. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnGatewaysService) GetStatus(project string, region string, vpnGateway string) *VpnGatewaysGetStatusCall { c := &VpnGatewaysGetStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -137348,6 +144244,7 @@ func (c *VpnGatewaysGetStatusCall) Header() http.Header { func (c *VpnGatewaysGetStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137411,7 +144308,7 @@ func (c *VpnGatewaysGetStatusCall) Do(opts ...googleapi.CallOption) (*VpnGateway } return ret, nil // { - // "description": "Returns the status for the specified VPN gateway.", + // "description": "Returns the status for the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnGateways.getStatus", // "parameterOrder": [ @@ -137468,7 +144365,8 @@ type VpnGatewaysInsertCall struct { } // Insert: Creates a VPN gateway in the specified project and region -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *VpnGatewaysService) Insert(project string, region string, vpngateway *VpnGateway) *VpnGatewaysInsertCall { c := &VpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -137523,6 +144421,7 @@ func (c *VpnGatewaysInsertCall) Header() http.Header { func (c *VpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137587,7 +144486,7 @@ func (c *VpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates a VPN gateway in the specified project and region using the data included in the request.", + // "description": "Creates a VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnGateways.insert", // "parameterOrder": [ @@ -137643,7 +144542,7 @@ type VpnGatewaysListCall struct { } // List: Retrieves a list of VPN gateways available to the specified -// project and region. +// project and region. (== suppress_warning http-rest-shadowed ==) func (r *VpnGatewaysService) List(project string, region string) *VpnGatewaysListCall { c := &VpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -137751,6 +144650,7 @@ func (c *VpnGatewaysListCall) Header() http.Header { func (c *VpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -137813,7 +144713,7 @@ func (c *VpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*VpnGatewayList, } return ret, nil // { - // "description": "Retrieves a list of VPN gateways available to the specified project and region.", + // "description": "Retrieves a list of VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnGateways.list", // "parameterOrder": [ @@ -137907,7 +144807,8 @@ type VpnGatewaysSetLabelsCall struct { } // SetLabels: Sets the labels on a VpnGateway. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnGatewaysService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *VpnGatewaysSetLabelsCall { c := &VpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -137963,6 +144864,7 @@ func (c *VpnGatewaysSetLabelsCall) Header() http.Header { func (c *VpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138028,7 +144930,7 @@ func (c *VpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnGateways.setLabels", // "parameterOrder": [ @@ -138090,7 +144992,8 @@ type VpnTunnelsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of VPN tunnels. +// AggregatedList: Retrieves an aggregated list of VPN tunnels. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall { c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -138197,6 +145100,7 @@ func (c *VpnTunnelsAggregatedListCall) Header() http.Header { func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138258,7 +145162,7 @@ func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTun } return ret, nil // { - // "description": "Retrieves an aggregated list of VPN tunnels.", + // "description": "Retrieves an aggregated list of VPN tunnels. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnTunnels.aggregatedList", // "parameterOrder": [ @@ -138342,7 +145246,8 @@ type VpnTunnelsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified VpnTunnel resource. +// Delete: Deletes the specified VpnTunnel resource. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel string) *VpnTunnelsDeleteCall { c := &VpnTunnelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -138397,6 +145302,7 @@ func (c *VpnTunnelsDeleteCall) Header() http.Header { func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138457,7 +145363,7 @@ func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Deletes the specified VpnTunnel resource.", + // "description": "Deletes the specified VpnTunnel resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.vpnTunnels.delete", // "parameterOrder": [ @@ -138519,7 +145425,8 @@ type VpnTunnelsGetCall struct { } // Get: Returns the specified VpnTunnel resource. Gets a list of -// available VPN tunnels by making a list() request. +// available VPN tunnels by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall { c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -138565,6 +145472,7 @@ func (c *VpnTunnelsGetCall) Header() http.Header { func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138628,7 +145536,7 @@ func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error) } return ret, nil // { - // "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.", + // "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnTunnels.get", // "parameterOrder": [ @@ -138685,7 +145593,8 @@ type VpnTunnelsInsertCall struct { } // Insert: Creates a VpnTunnel resource in the specified project and -// region using the data included in the request. +// region using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *VpnTunnel) *VpnTunnelsInsertCall { c := &VpnTunnelsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -138740,6 +145649,7 @@ func (c *VpnTunnelsInsertCall) Header() http.Header { func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -138804,7 +145714,7 @@ func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", + // "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnTunnels.insert", // "parameterOrder": [ @@ -138860,7 +145770,8 @@ type VpnTunnelsListCall struct { } // List: Retrieves a list of VpnTunnel resources contained in the -// specified project and region. +// specified project and region. (== suppress_warning http-rest-shadowed +// ==) func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall { c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -138968,6 +145879,7 @@ func (c *VpnTunnelsListCall) Header() http.Header { func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139030,7 +145942,7 @@ func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, e } return ret, nil // { - // "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", + // "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnTunnels.list", // "parameterOrder": [ @@ -139124,7 +146036,8 @@ type VpnTunnelsSetLabelsCall struct { } // SetLabels: Sets the labels on a VpnTunnel. To learn more about -// labels, read the Labeling Resources documentation. +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *VpnTunnelsSetLabelsCall { c := &VpnTunnelsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -139180,6 +146093,7 @@ func (c *VpnTunnelsSetLabelsCall) Header() http.Header { func (c *VpnTunnelsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139245,7 +146159,7 @@ func (c *VpnTunnelsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnTunnels.setLabels", // "parameterOrder": [ @@ -139310,7 +146224,7 @@ type VpnTunnelsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnTunnelsTestIamPermissionsCall { c := &VpnTunnelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -139347,6 +146261,7 @@ func (c *VpnTunnelsTestIamPermissionsCall) Header() http.Header { func (c *VpnTunnelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139412,7 +146327,7 @@ func (c *VpnTunnelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Te } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnTunnels.testIamPermissions", // "parameterOrder": [ @@ -139471,7 +146386,8 @@ type ZoneOperationsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified zone-specific Operations resource. +// Delete: Deletes the specified zone-specific Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/delete func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall { c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -139508,6 +146424,7 @@ func (c *ZoneOperationsDeleteCall) Header() http.Header { func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139543,7 +146460,7 @@ func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deletes the specified zone-specific Operations resource.", + // "description": "Deletes the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.zoneOperations.delete", // "parameterOrder": [ @@ -139596,7 +146513,8 @@ type ZoneOperationsGetCall struct { header_ http.Header } -// Get: Retrieves the specified zone-specific Operations resource. +// Get: Retrieves the specified zone-specific Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/get func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall { c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -139643,6 +146561,7 @@ func (c *ZoneOperationsGetCall) Header() http.Header { func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139706,7 +146625,7 @@ func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Retrieves the specified zone-specific Operations resource.", + // "description": "Retrieves the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zoneOperations.get", // "parameterOrder": [ @@ -139763,7 +146682,7 @@ type ZoneOperationsListCall struct { } // List: Retrieves a list of Operation resources contained within the -// specified zone. +// specified zone. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/list func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -139872,6 +146791,7 @@ func (c *ZoneOperationsListCall) Header() http.Header { func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -139934,7 +146854,7 @@ func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationLis } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified zone.", + // "description": "Retrieves a list of Operation resources contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zoneOperations.list", // "parameterOrder": [ @@ -140027,7 +146947,8 @@ type ZonesGetCall struct { } // Get: Returns the specified Zone resource. Gets a list of available -// zones by making a list() request. +// zones by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zones/get func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -140073,6 +146994,7 @@ func (c *ZonesGetCall) Header() http.Header { func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -140135,7 +147057,7 @@ func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) { } return ret, nil // { - // "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request.", + // "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zones.get", // "parameterOrder": [ @@ -140183,7 +147105,7 @@ type ZonesListCall struct { } // List: Retrieves the list of Zone resources available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zones/list func (r *ZonesService) List(project string) *ZonesListCall { c := &ZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -140291,6 +147213,7 @@ func (c *ZonesListCall) Header() http.Header { func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -140352,7 +147275,7 @@ func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) { } return ret, nil // { - // "description": "Retrieves the list of Zone resources available to the specified project.", + // "description": "Retrieves the list of Zone resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zones.list", // "parameterOrder": [ diff --git a/vendor/google.golang.org/api/compute/v1/compute-api.json b/vendor/google.golang.org/api/compute/v1/compute-api.json index 39800a7c96a..320670f7862 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-api.json +++ b/vendor/google.golang.org/api/compute/v1/compute-api.json @@ -24,12 +24,12 @@ } }, "basePath": "/compute/v1/projects/", - "baseUrl": "https://www.googleapis.com/compute/v1/projects/", + "baseUrl": "https://compute.googleapis.com/compute/v1/projects/", "batchPath": "batch/compute/v1", "description": "Creates and runs virtual machines on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "etag": "\"VPK3KBfpaEgZ16pozGOoMYfKc0U/isJ5vctr0fRB9VbwWEZjs0c-shw\"", + "etag": "\"F5McR9eEaw0XRpaO3M9gbIugkbs/SaxEFFt9Jrfs1w316mmn35GXCN4\"", "icons": { "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" @@ -89,7 +89,7 @@ "acceleratorTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of accelerator types.", + "description": "Retrieves an aggregated list of accelerator types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.acceleratorTypes.aggregatedList", "parameterOrder": [ @@ -138,7 +138,7 @@ ] }, "get": { - "description": "Returns the specified accelerator type.", + "description": "Returns the specified accelerator type. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.acceleratorTypes.get", "parameterOrder": [ @@ -180,7 +180,7 @@ ] }, "list": { - "description": "Retrieves a list of accelerator types available to the specified project.", + "description": "Retrieves a list of accelerator types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.acceleratorTypes.list", "parameterOrder": [ @@ -241,7 +241,7 @@ "addresses": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of addresses.", + "description": "Retrieves an aggregated list of addresses. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.addresses.aggregatedList", "parameterOrder": [ @@ -290,7 +290,7 @@ ] }, "delete": { - "description": "Deletes the specified address resource.", + "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.addresses.delete", "parameterOrder": [ @@ -336,7 +336,7 @@ ] }, "get": { - "description": "Returns the specified address resource.", + "description": "Returns the specified address resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.addresses.get", "parameterOrder": [ @@ -378,7 +378,7 @@ ] }, "insert": { - "description": "Creates an address resource in the specified project using the data included in the request.", + "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.addresses.insert", "parameterOrder": [ @@ -419,7 +419,7 @@ ] }, "list": { - "description": "Retrieves a list of addresses contained within the specified region.", + "description": "Retrieves a list of addresses contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.addresses.list", "parameterOrder": [ @@ -480,7 +480,7 @@ "autoscalers": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of autoscalers.", + "description": "Retrieves an aggregated list of autoscalers. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.autoscalers.aggregatedList", "parameterOrder": [ @@ -529,7 +529,7 @@ ] }, "delete": { - "description": "Deletes the specified autoscaler.", + "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.autoscalers.delete", "parameterOrder": [ @@ -575,7 +575,7 @@ ] }, "get": { - "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.", + "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.autoscalers.get", "parameterOrder": [ @@ -617,7 +617,7 @@ ] }, "insert": { - "description": "Creates an autoscaler in the specified project using the data included in the request.", + "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.autoscalers.insert", "parameterOrder": [ @@ -658,7 +658,7 @@ ] }, "list": { - "description": "Retrieves a list of autoscalers contained within the specified zone.", + "description": "Retrieves a list of autoscalers contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.autoscalers.list", "parameterOrder": [ @@ -715,7 +715,7 @@ ] }, "patch": { - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.autoscalers.patch", "parameterOrder": [ @@ -762,7 +762,7 @@ ] }, "update": { - "description": "Updates an autoscaler in the specified project using the data included in the request.", + "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.autoscalers.update", "parameterOrder": [ @@ -813,7 +813,7 @@ "backendBuckets": { "methods": { "addSignedUrlKey": { - "description": "Adds a key for validating requests with signed URLs for this backend bucket.", + "description": "Adds a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendBuckets.addSignedUrlKey", "parameterOrder": [ @@ -853,7 +853,7 @@ ] }, "delete": { - "description": "Deletes the specified BackendBucket resource.", + "description": "Deletes the specified BackendBucket resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.backendBuckets.delete", "parameterOrder": [ @@ -891,7 +891,7 @@ ] }, "deleteSignedUrlKey": { - "description": "Deletes a key for validating requests with signed URLs for this backend bucket.", + "description": "Deletes a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendBuckets.deleteSignedUrlKey", "parameterOrder": [ @@ -935,7 +935,7 @@ ] }, "get": { - "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request.", + "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendBuckets.get", "parameterOrder": [ @@ -969,7 +969,7 @@ ] }, "insert": { - "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", + "description": "Creates a BackendBucket resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendBuckets.insert", "parameterOrder": [ @@ -1002,7 +1002,7 @@ ] }, "list": { - "description": "Retrieves the list of BackendBucket resources available to the specified project.", + "description": "Retrieves the list of BackendBucket resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendBuckets.list", "parameterOrder": [ @@ -1051,7 +1051,7 @@ ] }, "patch": { - "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.backendBuckets.patch", "parameterOrder": [ @@ -1092,7 +1092,7 @@ ] }, "update": { - "description": "Updates the specified BackendBucket resource with the data included in the request.", + "description": "Updates the specified BackendBucket resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.backendBuckets.update", "parameterOrder": [ @@ -1137,7 +1137,7 @@ "backendServices": { "methods": { "addSignedUrlKey": { - "description": "Adds a key for validating requests with signed URLs for this backend service.", + "description": "Adds a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.addSignedUrlKey", "parameterOrder": [ @@ -1177,7 +1177,7 @@ ] }, "aggregatedList": { - "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", + "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendServices.aggregatedList", "parameterOrder": [ @@ -1226,7 +1226,7 @@ ] }, "delete": { - "description": "Deletes the specified BackendService resource.", + "description": "Deletes the specified BackendService resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.backendServices.delete", "parameterOrder": [ @@ -1264,7 +1264,7 @@ ] }, "deleteSignedUrlKey": { - "description": "Deletes a key for validating requests with signed URLs for this backend service.", + "description": "Deletes a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.deleteSignedUrlKey", "parameterOrder": [ @@ -1308,7 +1308,7 @@ ] }, "get": { - "description": "Returns the specified BackendService resource. Gets a list of available backend services.", + "description": "Returns the specified BackendService resource. Gets a list of available backend services. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendServices.get", "parameterOrder": [ @@ -1342,7 +1342,7 @@ ] }, "getHealth": { - "description": "Gets the most recent health check results for this BackendService.", + "description": "Gets the most recent health check results for this BackendService. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.getHealth", "parameterOrder": [ @@ -1378,7 +1378,7 @@ ] }, "insert": { - "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", + "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.insert", "parameterOrder": [ @@ -1411,7 +1411,7 @@ ] }, "list": { - "description": "Retrieves the list of BackendService resources available to the specified project.", + "description": "Retrieves the list of BackendService resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.backendServices.list", "parameterOrder": [ @@ -1460,7 +1460,7 @@ ] }, "patch": { - "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.backendServices.patch", "parameterOrder": [ @@ -1501,7 +1501,7 @@ ] }, "setSecurityPolicy": { - "description": "Sets the security policy for the specified backend service.", + "description": "Sets the security policy for the specified backend service. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.backendServices.setSecurityPolicy", "parameterOrder": [ @@ -1541,7 +1541,7 @@ ] }, "update": { - "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.backendServices.update", "parameterOrder": [ @@ -1586,7 +1586,7 @@ "diskTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of disk types.", + "description": "Retrieves an aggregated list of disk types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.diskTypes.aggregatedList", "parameterOrder": [ @@ -1635,7 +1635,7 @@ ] }, "get": { - "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request.", + "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.diskTypes.get", "parameterOrder": [ @@ -1677,7 +1677,7 @@ ] }, "list": { - "description": "Retrieves a list of disk types available to the specified project.", + "description": "Retrieves a list of disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.diskTypes.list", "parameterOrder": [ @@ -1737,8 +1737,57 @@ }, "disks": { "methods": { + "addResourcePolicies": { + "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.disks.addResourcePolicies", + "parameterOrder": [ + "project", + "zone", + "disk" + ], + "parameters": { + "disk": { + "description": "The disk name for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/disks/{disk}/addResourcePolicies", + "request": { + "$ref": "DisksAddResourcePoliciesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "aggregatedList": { - "description": "Retrieves an aggregated list of persistent disks.", + "description": "Retrieves an aggregated list of persistent disks. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.aggregatedList", "parameterOrder": [ @@ -1787,7 +1836,7 @@ ] }, "createSnapshot": { - "description": "Creates a snapshot of a specified persistent disk.", + "description": "Creates a snapshot of a specified persistent disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.createSnapshot", "parameterOrder": [ @@ -1841,7 +1890,7 @@ ] }, "delete": { - "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.disks.delete", "parameterOrder": [ @@ -1886,7 +1935,7 @@ ] }, "get": { - "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.", + "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.get", "parameterOrder": [ @@ -1928,7 +1977,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.getIamPolicy", "parameterOrder": [ @@ -1970,7 +2019,7 @@ ] }, "insert": { - "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", + "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.insert", "parameterOrder": [ @@ -2016,7 +2065,7 @@ ] }, "list": { - "description": "Retrieves a list of persistent disks contained within the specified zone.", + "description": "Retrieves a list of persistent disks contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.disks.list", "parameterOrder": [ @@ -2072,8 +2121,57 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "removeResourcePolicies": { + "description": "Removes resource policies from a disk. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.disks.removeResourcePolicies", + "parameterOrder": [ + "project", + "zone", + "disk" + ], + "parameters": { + "disk": { + "description": "The disk name for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", + "request": { + "$ref": "DisksRemoveResourcePoliciesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "resize": { - "description": "Resizes the specified persistent disk. You can only increase the size of the disk.", + "description": "Resizes the specified persistent disk. You can only increase the size of the disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.resize", "parameterOrder": [ @@ -2122,7 +2220,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.setIamPolicy", "parameterOrder": [ @@ -2166,7 +2264,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.setLabels", "parameterOrder": [ @@ -2215,7 +2313,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.disks.testIamPermissions", "parameterOrder": [ @@ -2261,10 +2359,241 @@ } } }, + "externalVpnGateways": { + "methods": { + "delete": { + "description": "Deletes the specified externalVpnGateway. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.externalVpnGateways.delete", + "parameterOrder": [ + "project", + "externalVpnGateway" + ], + "parameters": { + "externalVpnGateway": { + "description": "Name of the externalVpnGateways to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways/{externalVpnGateway}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.externalVpnGateways.get", + "parameterOrder": [ + "project", + "externalVpnGateway" + ], + "parameters": { + "externalVpnGateway": { + "description": "Name of the externalVpnGateway to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways/{externalVpnGateway}", + "response": { + "$ref": "ExternalVpnGateway" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.externalVpnGateways.insert", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways", + "request": { + "$ref": "ExternalVpnGateway" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of ExternalVpnGateway available to the specified project. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.externalVpnGateways.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways", + "response": { + "$ref": "ExternalVpnGatewayList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setLabels": { + "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.externalVpnGateways.setLabels", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways/{resource}/setLabels", + "request": { + "$ref": "GlobalSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.externalVpnGateways.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/global/externalVpnGateways/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "firewalls": { "methods": { "delete": { - "description": "Deletes the specified firewall.", + "description": "Deletes the specified firewall. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.firewalls.delete", "parameterOrder": [ @@ -2302,7 +2631,7 @@ ] }, "get": { - "description": "Returns the specified firewall.", + "description": "Returns the specified firewall. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.firewalls.get", "parameterOrder": [ @@ -2336,7 +2665,7 @@ ] }, "insert": { - "description": "Creates a firewall rule in the specified project using the data included in the request.", + "description": "Creates a firewall rule in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.firewalls.insert", "parameterOrder": [ @@ -2369,7 +2698,7 @@ ] }, "list": { - "description": "Retrieves the list of firewall rules available to the specified project.", + "description": "Retrieves the list of firewall rules available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.firewalls.list", "parameterOrder": [ @@ -2418,7 +2747,7 @@ ] }, "patch": { - "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.firewalls.patch", "parameterOrder": [ @@ -2459,7 +2788,7 @@ ] }, "update": { - "description": "Updates the specified firewall rule with the data included in the request. The PUT method can only update the following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", + "description": "Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.firewalls.update", "parameterOrder": [ @@ -2504,7 +2833,7 @@ "forwardingRules": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of forwarding rules.", + "description": "Retrieves an aggregated list of forwarding rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.forwardingRules.aggregatedList", "parameterOrder": [ @@ -2553,7 +2882,7 @@ ] }, "delete": { - "description": "Deletes the specified ForwardingRule resource.", + "description": "Deletes the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.forwardingRules.delete", "parameterOrder": [ @@ -2599,7 +2928,7 @@ ] }, "get": { - "description": "Returns the specified ForwardingRule resource.", + "description": "Returns the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.forwardingRules.get", "parameterOrder": [ @@ -2641,7 +2970,7 @@ ] }, "insert": { - "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.forwardingRules.insert", "parameterOrder": [ @@ -2682,7 +3011,7 @@ ] }, "list": { - "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", + "description": "Retrieves a list of ForwardingRule resources available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.forwardingRules.list", "parameterOrder": [ @@ -2739,7 +3068,7 @@ ] }, "setTarget": { - "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", + "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.forwardingRules.setTarget", "parameterOrder": [ @@ -2792,7 +3121,7 @@ "globalAddresses": { "methods": { "delete": { - "description": "Deletes the specified address resource.", + "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.globalAddresses.delete", "parameterOrder": [ @@ -2830,7 +3159,7 @@ ] }, "get": { - "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request.", + "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalAddresses.get", "parameterOrder": [ @@ -2864,7 +3193,7 @@ ] }, "insert": { - "description": "Creates an address resource in the specified project using the data included in the request.", + "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalAddresses.insert", "parameterOrder": [ @@ -2897,7 +3226,7 @@ ] }, "list": { - "description": "Retrieves a list of global addresses.", + "description": "Retrieves a list of global addresses. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalAddresses.list", "parameterOrder": [ @@ -2950,7 +3279,7 @@ "globalForwardingRules": { "methods": { "delete": { - "description": "Deletes the specified GlobalForwardingRule resource.", + "description": "Deletes the specified GlobalForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.globalForwardingRules.delete", "parameterOrder": [ @@ -2988,7 +3317,7 @@ ] }, "get": { - "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.", + "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalForwardingRules.get", "parameterOrder": [ @@ -3022,7 +3351,7 @@ ] }, "insert": { - "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", + "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalForwardingRules.insert", "parameterOrder": [ @@ -3055,7 +3384,7 @@ ] }, "list": { - "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", + "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalForwardingRules.list", "parameterOrder": [ @@ -3104,7 +3433,7 @@ ] }, "setTarget": { - "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", + "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.globalForwardingRules.setTarget", "parameterOrder": [ @@ -3149,7 +3478,7 @@ "globalOperations": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of all operations.", + "description": "Retrieves an aggregated list of all operations. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalOperations.aggregatedList", "parameterOrder": [ @@ -3198,7 +3527,7 @@ ] }, "delete": { - "description": "Deletes the specified Operations resource.", + "description": "Deletes the specified Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.globalOperations.delete", "parameterOrder": [ @@ -3228,7 +3557,7 @@ ] }, "get": { - "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request.", + "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalOperations.get", "parameterOrder": [ @@ -3262,7 +3591,7 @@ ] }, "list": { - "description": "Retrieves a list of Operation resources contained within the specified project.", + "description": "Retrieves a list of Operation resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.globalOperations.list", "parameterOrder": [ @@ -3314,8 +3643,57 @@ }, "healthChecks": { "methods": { + "aggregatedList": { + "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.healthChecks.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/healthChecks", + "response": { + "$ref": "HealthChecksAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "delete": { - "description": "Deletes the specified HealthCheck resource.", + "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.healthChecks.delete", "parameterOrder": [ @@ -3353,7 +3731,7 @@ ] }, "get": { - "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", + "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.healthChecks.get", "parameterOrder": [ @@ -3387,7 +3765,7 @@ ] }, "insert": { - "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.healthChecks.insert", "parameterOrder": [ @@ -3420,7 +3798,7 @@ ] }, "list": { - "description": "Retrieves the list of HealthCheck resources available to the specified project.", + "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.healthChecks.list", "parameterOrder": [ @@ -3469,7 +3847,7 @@ ] }, "patch": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.healthChecks.patch", "parameterOrder": [ @@ -3510,7 +3888,7 @@ ] }, "update": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.healthChecks.update", "parameterOrder": [ @@ -3555,7 +3933,7 @@ "httpHealthChecks": { "methods": { "delete": { - "description": "Deletes the specified HttpHealthCheck resource.", + "description": "Deletes the specified HttpHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.httpHealthChecks.delete", "parameterOrder": [ @@ -3593,7 +3971,7 @@ ] }, "get": { - "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request.", + "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpHealthChecks.get", "parameterOrder": [ @@ -3627,7 +4005,7 @@ ] }, "insert": { - "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.httpHealthChecks.insert", "parameterOrder": [ @@ -3660,7 +4038,7 @@ ] }, "list": { - "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", + "description": "Retrieves the list of HttpHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpHealthChecks.list", "parameterOrder": [ @@ -3709,7 +4087,7 @@ ] }, "patch": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.httpHealthChecks.patch", "parameterOrder": [ @@ -3750,7 +4128,7 @@ ] }, "update": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.httpHealthChecks.update", "parameterOrder": [ @@ -3795,7 +4173,7 @@ "httpsHealthChecks": { "methods": { "delete": { - "description": "Deletes the specified HttpsHealthCheck resource.", + "description": "Deletes the specified HttpsHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.httpsHealthChecks.delete", "parameterOrder": [ @@ -3833,7 +4211,7 @@ ] }, "get": { - "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request.", + "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpsHealthChecks.get", "parameterOrder": [ @@ -3867,7 +4245,7 @@ ] }, "insert": { - "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.httpsHealthChecks.insert", "parameterOrder": [ @@ -3900,7 +4278,7 @@ ] }, "list": { - "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", + "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.httpsHealthChecks.list", "parameterOrder": [ @@ -3949,7 +4327,7 @@ ] }, "patch": { - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.httpsHealthChecks.patch", "parameterOrder": [ @@ -3990,7 +4368,7 @@ ] }, "update": { - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.httpsHealthChecks.update", "parameterOrder": [ @@ -4035,7 +4413,7 @@ "images": { "methods": { "delete": { - "description": "Deletes the specified image.", + "description": "Deletes the specified image. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.images.delete", "parameterOrder": [ @@ -4073,7 +4451,7 @@ ] }, "deprecate": { - "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", + "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.deprecate", "parameterOrder": [ @@ -4114,7 +4492,7 @@ ] }, "get": { - "description": "Returns the specified image. Gets a list of available images by making a list() request.", + "description": "Returns the specified image. Gets a list of available images by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.get", "parameterOrder": [ @@ -4148,7 +4526,7 @@ ] }, "getFromFamily": { - "description": "Returns the latest image that is part of an image family and is not deprecated.", + "description": "Returns the latest image that is part of an image family and is not deprecated. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.getFromFamily", "parameterOrder": [ @@ -4182,7 +4560,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.getIamPolicy", "parameterOrder": [ @@ -4216,7 +4594,7 @@ ] }, "insert": { - "description": "Creates an image in the specified project using the data included in the request.", + "description": "Creates an image in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.insert", "parameterOrder": [ @@ -4257,7 +4635,7 @@ ] }, "list": { - "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.images.list", "parameterOrder": [ @@ -4306,7 +4684,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.setIamPolicy", "parameterOrder": [ @@ -4342,7 +4720,7 @@ ] }, "setLabels": { - "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.setLabels", "parameterOrder": [ @@ -4378,7 +4756,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.images.testIamPermissions", "parameterOrder": [ @@ -4419,7 +4797,7 @@ "instanceGroupManagers": { "methods": { "abandonInstances": { - "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.abandonInstances", "parameterOrder": [ @@ -4466,7 +4844,7 @@ ] }, "aggregatedList": { - "description": "Retrieves the list of managed instance groups and groups them by zone.", + "description": "Retrieves the list of managed instance groups and groups them by zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroupManagers.aggregatedList", "parameterOrder": [ @@ -4515,7 +4893,7 @@ ] }, "delete": { - "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", + "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instanceGroupManagers.delete", "parameterOrder": [ @@ -4559,7 +4937,7 @@ ] }, "deleteInstances": { - "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.deleteInstances", "parameterOrder": [ @@ -4606,7 +4984,7 @@ ] }, "get": { - "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.", + "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroupManagers.get", "parameterOrder": [ @@ -4646,7 +5024,7 @@ ] }, "insert": { - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.insert", "parameterOrder": [ @@ -4686,7 +5064,7 @@ ] }, "list": { - "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", + "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroupManagers.list", "parameterOrder": [ @@ -4742,7 +5120,7 @@ ] }, "listManagedInstances": { - "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", + "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.listManagedInstances", "parameterOrder": [ @@ -4805,7 +5183,7 @@ ] }, "patch": { - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instanceGroupManagers.patch", "parameterOrder": [ @@ -4852,7 +5230,7 @@ ] }, "recreateInstances": { - "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.recreateInstances", "parameterOrder": [ @@ -4899,7 +5277,7 @@ ] }, "resize": { - "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.resize", "parameterOrder": [ @@ -4951,7 +5329,7 @@ ] }, "setInstanceTemplate": { - "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", + "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.setInstanceTemplate", "parameterOrder": [ @@ -4998,7 +5376,7 @@ ] }, "setTargetPools": { - "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", + "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroupManagers.setTargetPools", "parameterOrder": [ @@ -5049,7 +5427,7 @@ "instanceGroups": { "methods": { "addInstances": { - "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", + "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.addInstances", "parameterOrder": [ @@ -5096,7 +5474,7 @@ ] }, "aggregatedList": { - "description": "Retrieves the list of instance groups and sorts them by zone.", + "description": "Retrieves the list of instance groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroups.aggregatedList", "parameterOrder": [ @@ -5145,7 +5523,7 @@ ] }, "delete": { - "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", + "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instanceGroups.delete", "parameterOrder": [ @@ -5189,7 +5567,7 @@ ] }, "get": { - "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request.", + "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroups.get", "parameterOrder": [ @@ -5229,7 +5607,7 @@ ] }, "insert": { - "description": "Creates an instance group in the specified project using the parameters that are included in the request.", + "description": "Creates an instance group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.insert", "parameterOrder": [ @@ -5269,7 +5647,7 @@ ] }, "list": { - "description": "Retrieves the list of instance groups that are located in the specified project and zone.", + "description": "Retrieves the list of instance groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceGroups.list", "parameterOrder": [ @@ -5325,7 +5703,7 @@ ] }, "listInstances": { - "description": "Lists the instances in the specified instance group.", + "description": "Lists the instances in the specified instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.listInstances", "parameterOrder": [ @@ -5391,7 +5769,7 @@ ] }, "removeInstances": { - "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", + "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.removeInstances", "parameterOrder": [ @@ -5438,7 +5816,7 @@ ] }, "setNamedPorts": { - "description": "Sets the named ports for the specified instance group.", + "description": "Sets the named ports for the specified instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceGroups.setNamedPorts", "parameterOrder": [ @@ -5489,7 +5867,7 @@ "instanceTemplates": { "methods": { "delete": { - "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", + "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instanceTemplates.delete", "parameterOrder": [ @@ -5527,7 +5905,7 @@ ] }, "get": { - "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request.", + "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceTemplates.get", "parameterOrder": [ @@ -5561,7 +5939,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceTemplates.getIamPolicy", "parameterOrder": [ @@ -5595,7 +5973,7 @@ ] }, "insert": { - "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", + "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceTemplates.insert", "parameterOrder": [ @@ -5628,7 +6006,7 @@ ] }, "list": { - "description": "Retrieves a list of instance templates that are contained within the specified project.", + "description": "Retrieves a list of instance templates that are contained within the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instanceTemplates.list", "parameterOrder": [ @@ -5677,7 +6055,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceTemplates.setIamPolicy", "parameterOrder": [ @@ -5713,7 +6091,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instanceTemplates.testIamPermissions", "parameterOrder": [ @@ -5754,7 +6132,7 @@ "instances": { "methods": { "addAccessConfig": { - "description": "Adds an access config to an instance's network interface.", + "description": "Adds an access config to an instance's network interface. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.addAccessConfig", "parameterOrder": [ @@ -5810,7 +6188,7 @@ ] }, "aggregatedList": { - "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones.", + "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.aggregatedList", "parameterOrder": [ @@ -5859,7 +6237,7 @@ ] }, "attachDisk": { - "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", + "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.attachDisk", "parameterOrder": [ @@ -5913,7 +6291,7 @@ ] }, "delete": { - "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", + "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.instances.delete", "parameterOrder": [ @@ -5959,7 +6337,7 @@ ] }, "deleteAccessConfig": { - "description": "Deletes an access config from an instance's network interface.", + "description": "Deletes an access config from an instance's network interface. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.deleteAccessConfig", "parameterOrder": [ @@ -6019,7 +6397,7 @@ ] }, "detachDisk": { - "description": "Detaches a disk from an instance.", + "description": "Detaches a disk from an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.detachDisk", "parameterOrder": [ @@ -6072,7 +6450,7 @@ ] }, "get": { - "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request.", + "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.get", "parameterOrder": [ @@ -6113,8 +6491,60 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getGuestAttributes": { + "description": "Returns the specified guest attributes entry. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.instances.getGuestAttributes", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "Name of the instance scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "queryPath": { + "description": "Specifies the guest attributes path to be queried.", + "location": "query", + "type": "string" + }, + "variableKey": { + "description": "Specifies the key for the guest attributes entry.", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instances/{instance}/getGuestAttributes", + "response": { + "$ref": "GuestAttributes" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getIamPolicy", "parameterOrder": [ @@ -6156,7 +6586,7 @@ ] }, "getSerialPortOutput": { - "description": "Returns the last 1 MB of serial port output from the specified instance.", + "description": "Returns the last 1 MB of serial port output from the specified instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getSerialPortOutput", "parameterOrder": [ @@ -6213,7 +6643,7 @@ ] }, "getShieldedInstanceIdentity": { - "description": "Returns the Shielded Instance Identity of an instance", + "description": "Returns the Shielded Instance Identity of an instance (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.getShieldedInstanceIdentity", "parameterOrder": [ @@ -6255,7 +6685,7 @@ ] }, "insert": { - "description": "Creates an instance resource in the specified project using the data included in the request.", + "description": "Creates an instance resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.insert", "parameterOrder": [ @@ -6301,7 +6731,7 @@ ] }, "list": { - "description": "Retrieves the list of instances contained within the specified zone.", + "description": "Retrieves the list of instances contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.list", "parameterOrder": [ @@ -6358,7 +6788,7 @@ ] }, "listReferrers": { - "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.", + "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.instances.listReferrers", "parameterOrder": [ @@ -6423,7 +6853,7 @@ ] }, "reset": { - "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", + "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.reset", "parameterOrder": [ @@ -6469,7 +6899,7 @@ ] }, "setDeletionProtection": { - "description": "Sets deletion protection on the instance.", + "description": "Sets deletion protection on the instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setDeletionProtection", "parameterOrder": [ @@ -6521,7 +6951,7 @@ ] }, "setDiskAutoDelete": { - "description": "Sets the auto-delete flag for a disk attached to an instance.", + "description": "Sets the auto-delete flag for a disk attached to an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setDiskAutoDelete", "parameterOrder": [ @@ -6582,7 +7012,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setIamPolicy", "parameterOrder": [ @@ -6626,7 +7056,7 @@ ] }, "setLabels": { - "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setLabels", "parameterOrder": [ @@ -6675,7 +7105,7 @@ ] }, "setMachineResources": { - "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", + "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMachineResources", "parameterOrder": [ @@ -6724,7 +7154,7 @@ ] }, "setMachineType": { - "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", + "description": "Changes the machine type for a stopped instance to the machine type specified in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMachineType", "parameterOrder": [ @@ -6773,7 +7203,7 @@ ] }, "setMetadata": { - "description": "Sets metadata for the specified instance to the data included in the request.", + "description": "Sets metadata for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMetadata", "parameterOrder": [ @@ -6822,7 +7252,7 @@ ] }, "setMinCpuPlatform": { - "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", + "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setMinCpuPlatform", "parameterOrder": [ @@ -6871,7 +7301,7 @@ ] }, "setScheduling": { - "description": "Sets an instance's scheduling options.", + "description": "Sets an instance's scheduling options. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setScheduling", "parameterOrder": [ @@ -6920,7 +7350,7 @@ ] }, "setServiceAccount": { - "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", + "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setServiceAccount", "parameterOrder": [ @@ -6969,7 +7399,7 @@ ] }, "setShieldedInstanceIntegrityPolicy": { - "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.setShieldedInstanceIntegrityPolicy", "parameterOrder": [ @@ -7018,7 +7448,7 @@ ] }, "setTags": { - "description": "Sets network tags for the specified instance to the data included in the request.", + "description": "Sets network tags for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.setTags", "parameterOrder": [ @@ -7067,7 +7497,7 @@ ] }, "simulateMaintenanceEvent": { - "description": "Simulates a maintenance event on the instance.", + "description": "Simulates a maintenance event on the instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.simulateMaintenanceEvent", "parameterOrder": [ @@ -7108,7 +7538,7 @@ ] }, "start": { - "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.start", "parameterOrder": [ @@ -7154,7 +7584,7 @@ ] }, "startWithEncryptionKey": { - "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.startWithEncryptionKey", "parameterOrder": [ @@ -7203,7 +7633,7 @@ ] }, "stop": { - "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", + "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.stop", "parameterOrder": [ @@ -7249,7 +7679,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.testIamPermissions", "parameterOrder": [ @@ -7294,7 +7724,7 @@ ] }, "updateAccessConfig": { - "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.instances.updateAccessConfig", "parameterOrder": [ @@ -7349,8 +7779,57 @@ "https://www.googleapis.com/auth/compute" ] }, + "updateDisplayDevice": { + "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PATCH", + "id": "compute.instances.updateDisplayDevice", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "Name of the instance scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", + "request": { + "$ref": "DisplayDevice" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "updateNetworkInterface": { - "description": "Updates an instance's network interface. This method follows PATCH semantics.", + "description": "Updates an instance's network interface. This method follows PATCH semantics. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.updateNetworkInterface", "parameterOrder": [ @@ -7406,7 +7885,7 @@ ] }, "updateShieldedInstanceConfig": { - "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.instances.updateShieldedInstanceConfig", "parameterOrder": [ @@ -7459,7 +7938,7 @@ "interconnectAttachments": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of interconnect attachments.", + "description": "Retrieves an aggregated list of interconnect attachments. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectAttachments.aggregatedList", "parameterOrder": [ @@ -7508,7 +7987,7 @@ ] }, "delete": { - "description": "Deletes the specified interconnect attachment.", + "description": "Deletes the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.interconnectAttachments.delete", "parameterOrder": [ @@ -7554,7 +8033,7 @@ ] }, "get": { - "description": "Returns the specified interconnect attachment.", + "description": "Returns the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectAttachments.get", "parameterOrder": [ @@ -7596,7 +8075,7 @@ ] }, "insert": { - "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", + "description": "Creates an InterconnectAttachment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnectAttachments.insert", "parameterOrder": [ @@ -7637,7 +8116,7 @@ ] }, "list": { - "description": "Retrieves the list of interconnect attachments contained within the specified region.", + "description": "Retrieves the list of interconnect attachments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectAttachments.list", "parameterOrder": [ @@ -7694,7 +8173,7 @@ ] }, "patch": { - "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.interconnectAttachments.patch", "parameterOrder": [ @@ -7747,7 +8226,7 @@ "interconnectLocations": { "methods": { "get": { - "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.", + "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectLocations.get", "parameterOrder": [ @@ -7781,7 +8260,7 @@ ] }, "list": { - "description": "Retrieves the list of interconnect locations available to the specified project.", + "description": "Retrieves the list of interconnect locations available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnectLocations.list", "parameterOrder": [ @@ -7834,7 +8313,7 @@ "interconnects": { "methods": { "delete": { - "description": "Deletes the specified interconnect.", + "description": "Deletes the specified interconnect. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.interconnects.delete", "parameterOrder": [ @@ -7872,7 +8351,7 @@ ] }, "get": { - "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.", + "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnects.get", "parameterOrder": [ @@ -7906,7 +8385,7 @@ ] }, "getDiagnostics": { - "description": "Returns the interconnectDiagnostics for the specified interconnect.", + "description": "Returns the interconnectDiagnostics for the specified interconnect. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnects.getDiagnostics", "parameterOrder": [ @@ -7940,7 +8419,7 @@ ] }, "insert": { - "description": "Creates a Interconnect in the specified project using the data included in the request.", + "description": "Creates a Interconnect in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.interconnects.insert", "parameterOrder": [ @@ -7973,7 +8452,7 @@ ] }, "list": { - "description": "Retrieves the list of interconnect available to the specified project.", + "description": "Retrieves the list of interconnect available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.interconnects.list", "parameterOrder": [ @@ -8022,7 +8501,7 @@ ] }, "patch": { - "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.interconnects.patch", "parameterOrder": [ @@ -8067,7 +8546,7 @@ "licenseCodes": { "methods": { "get": { - "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code.", + "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenseCodes.get", "parameterOrder": [ @@ -8101,7 +8580,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.licenseCodes.testIamPermissions", "parameterOrder": [ @@ -8142,7 +8621,7 @@ "licenses": { "methods": { "delete": { - "description": "Deletes the specified license.", + "description": "Deletes the specified license. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.licenses.delete", "parameterOrder": [ @@ -8180,7 +8659,7 @@ ] }, "get": { - "description": "Returns the specified License resource.", + "description": "Returns the specified License resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenses.get", "parameterOrder": [ @@ -8214,7 +8693,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenses.getIamPolicy", "parameterOrder": [ @@ -8248,7 +8727,7 @@ ] }, "insert": { - "description": "Create a License resource in the specified project.", + "description": "Create a License resource in the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.licenses.insert", "parameterOrder": [ @@ -8284,7 +8763,7 @@ ] }, "list": { - "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.licenses.list", "parameterOrder": [ @@ -8333,7 +8812,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.licenses.setIamPolicy", "parameterOrder": [ @@ -8369,7 +8848,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.licenses.testIamPermissions", "parameterOrder": [ @@ -8410,7 +8889,7 @@ "machineTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of machine types.", + "description": "Retrieves an aggregated list of machine types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineTypes.aggregatedList", "parameterOrder": [ @@ -8459,7 +8938,7 @@ ] }, "get": { - "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request.", + "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineTypes.get", "parameterOrder": [ @@ -8501,7 +8980,7 @@ ] }, "list": { - "description": "Retrieves a list of machine types available to the specified project.", + "description": "Retrieves a list of machine types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.machineTypes.list", "parameterOrder": [ @@ -8562,7 +9041,7 @@ "networkEndpointGroups": { "methods": { "aggregatedList": { - "description": "Retrieves the list of network endpoint groups and sorts them by zone.", + "description": "Retrieves the list of network endpoint groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networkEndpointGroups.aggregatedList", "parameterOrder": [ @@ -8611,7 +9090,7 @@ ] }, "attachNetworkEndpoints": { - "description": "Attach a list of network endpoints to the specified network endpoint group.", + "description": "Attach a list of network endpoints to the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.attachNetworkEndpoints", "parameterOrder": [ @@ -8658,7 +9137,7 @@ ] }, "delete": { - "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.", + "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.networkEndpointGroups.delete", "parameterOrder": [ @@ -8702,7 +9181,7 @@ ] }, "detachNetworkEndpoints": { - "description": "Detach a list of network endpoints from the specified network endpoint group.", + "description": "Detach a list of network endpoints from the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.detachNetworkEndpoints", "parameterOrder": [ @@ -8749,7 +9228,7 @@ ] }, "get": { - "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.", + "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networkEndpointGroups.get", "parameterOrder": [ @@ -8789,7 +9268,7 @@ ] }, "insert": { - "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.insert", "parameterOrder": [ @@ -8829,7 +9308,7 @@ ] }, "list": { - "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone.", + "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networkEndpointGroups.list", "parameterOrder": [ @@ -8885,7 +9364,7 @@ ] }, "listNetworkEndpoints": { - "description": "Lists the network endpoints in the specified network endpoint group.", + "description": "Lists the network endpoints in the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.listNetworkEndpoints", "parameterOrder": [ @@ -8951,7 +9430,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networkEndpointGroups.testIamPermissions", "parameterOrder": [ @@ -9000,7 +9479,7 @@ "networks": { "methods": { "addPeering": { - "description": "Adds a peering to the specified network.", + "description": "Adds a peering to the specified network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.addPeering", "parameterOrder": [ @@ -9041,7 +9520,7 @@ ] }, "delete": { - "description": "Deletes the specified network.", + "description": "Deletes the specified network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.networks.delete", "parameterOrder": [ @@ -9079,7 +9558,7 @@ ] }, "get": { - "description": "Returns the specified network. Gets a list of available networks by making a list() request.", + "description": "Returns the specified network. Gets a list of available networks by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networks.get", "parameterOrder": [ @@ -9113,7 +9592,7 @@ ] }, "insert": { - "description": "Creates a network in the specified project using the data included in the request.", + "description": "Creates a network in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.insert", "parameterOrder": [ @@ -9146,7 +9625,7 @@ ] }, "list": { - "description": "Retrieves the list of networks available to the specified project.", + "description": "Retrieves the list of networks available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.networks.list", "parameterOrder": [ @@ -9195,7 +9674,7 @@ ] }, "patch": { - "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.", + "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.networks.patch", "parameterOrder": [ @@ -9236,7 +9715,7 @@ ] }, "removePeering": { - "description": "Removes a peering from the specified network.", + "description": "Removes a peering from the specified network. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.removePeering", "parameterOrder": [ @@ -9277,7 +9756,7 @@ ] }, "switchToCustomMode": { - "description": "Switches the network mode from auto subnet mode to custom subnet mode.", + "description": "Switches the network mode from auto subnet mode to custom subnet mode. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.networks.switchToCustomMode", "parameterOrder": [ @@ -9313,13 +9792,54 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "updatePeering": { + "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PATCH", + "id": "compute.networks.updatePeering", + "parameterOrder": [ + "project", + "network" + ], + "parameters": { + "network": { + "description": "Name of the network resource which the updated peering is belonging to.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/global/networks/{network}/updatePeering", + "request": { + "$ref": "NetworksUpdatePeeringRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, "nodeGroups": { "methods": { "addNodes": { - "description": "Adds specified number of nodes to the node group.", + "description": "Adds specified number of nodes to the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.addNodes", "parameterOrder": [ @@ -9368,7 +9888,7 @@ ] }, "aggregatedList": { - "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.", + "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.aggregatedList", "parameterOrder": [ @@ -9417,7 +9937,7 @@ ] }, "delete": { - "description": "Deletes the specified NodeGroup resource.", + "description": "Deletes the specified NodeGroup resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.nodeGroups.delete", "parameterOrder": [ @@ -9463,7 +9983,7 @@ ] }, "deleteNodes": { - "description": "Deletes specified nodes from the node group.", + "description": "Deletes specified nodes from the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.deleteNodes", "parameterOrder": [ @@ -9473,7 +9993,7 @@ ], "parameters": { "nodeGroup": { - "description": "Name of the NodeGroup resource to delete.", + "description": "Name of the NodeGroup resource whose nodes will be deleted.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -9512,7 +10032,7 @@ ] }, "get": { - "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead.", + "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.get", "parameterOrder": [ @@ -9554,7 +10074,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.getIamPolicy", "parameterOrder": [ @@ -9596,7 +10116,7 @@ ] }, "insert": { - "description": "Creates a NodeGroup resource in the specified project using the data included in the request.", + "description": "Creates a NodeGroup resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.insert", "parameterOrder": [ @@ -9645,7 +10165,7 @@ ] }, "list": { - "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.", + "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeGroups.list", "parameterOrder": [ @@ -9702,7 +10222,7 @@ ] }, "listNodes": { - "description": "Lists nodes in the node group.", + "description": "Lists nodes in the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.listNodes", "parameterOrder": [ @@ -9767,7 +10287,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.setIamPolicy", "parameterOrder": [ @@ -9811,7 +10331,7 @@ ] }, "setNodeTemplate": { - "description": "Updates the node template of the node group.", + "description": "Updates the node template of the node group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.setNodeTemplate", "parameterOrder": [ @@ -9860,7 +10380,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeGroups.testIamPermissions", "parameterOrder": [ @@ -9909,7 +10429,7 @@ "nodeTemplates": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of node templates.", + "description": "Retrieves an aggregated list of node templates. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.aggregatedList", "parameterOrder": [ @@ -9958,7 +10478,7 @@ ] }, "delete": { - "description": "Deletes the specified NodeTemplate resource.", + "description": "Deletes the specified NodeTemplate resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.nodeTemplates.delete", "parameterOrder": [ @@ -10004,7 +10524,7 @@ ] }, "get": { - "description": "Returns the specified node template. Gets a list of available node templates by making a list() request.", + "description": "Returns the specified node template. Gets a list of available node templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.get", "parameterOrder": [ @@ -10046,7 +10566,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.getIamPolicy", "parameterOrder": [ @@ -10088,7 +10608,7 @@ ] }, "insert": { - "description": "Creates a NodeTemplate resource in the specified project using the data included in the request.", + "description": "Creates a NodeTemplate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeTemplates.insert", "parameterOrder": [ @@ -10129,7 +10649,7 @@ ] }, "list": { - "description": "Retrieves a list of node templates available to the specified project.", + "description": "Retrieves a list of node templates available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTemplates.list", "parameterOrder": [ @@ -10186,7 +10706,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeTemplates.setIamPolicy", "parameterOrder": [ @@ -10230,7 +10750,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.nodeTemplates.testIamPermissions", "parameterOrder": [ @@ -10279,7 +10799,7 @@ "nodeTypes": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of node types.", + "description": "Retrieves an aggregated list of node types. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTypes.aggregatedList", "parameterOrder": [ @@ -10328,7 +10848,7 @@ ] }, "get": { - "description": "Returns the specified node type. Gets a list of available node types by making a list() request.", + "description": "Returns the specified node type. Gets a list of available node types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTypes.get", "parameterOrder": [ @@ -10370,7 +10890,7 @@ ] }, "list": { - "description": "Retrieves a list of node types available to the specified project.", + "description": "Retrieves a list of node types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.nodeTypes.list", "parameterOrder": [ @@ -10431,7 +10951,7 @@ "projects": { "methods": { "disableXpnHost": { - "description": "Disable this project as a shared VPC host project.", + "description": "Disable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.disableXpnHost", "parameterOrder": [ @@ -10461,7 +10981,7 @@ ] }, "disableXpnResource": { - "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", + "description": "Disable a service resource (also known as service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.disableXpnResource", "parameterOrder": [ @@ -10494,7 +11014,7 @@ ] }, "enableXpnHost": { - "description": "Enable this project as a shared VPC host project.", + "description": "Enable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.enableXpnHost", "parameterOrder": [ @@ -10524,7 +11044,7 @@ ] }, "enableXpnResource": { - "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", + "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.enableXpnResource", "parameterOrder": [ @@ -10557,7 +11077,7 @@ ] }, "get": { - "description": "Returns the specified Project resource.", + "description": "Returns the specified Project resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.projects.get", "parameterOrder": [ @@ -10583,7 +11103,7 @@ ] }, "getXpnHost": { - "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists.", + "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.projects.getXpnHost", "parameterOrder": [ @@ -10608,7 +11128,7 @@ ] }, "getXpnResources": { - "description": "Gets service resources (a.k.a service project) associated with this host project.", + "description": "Gets service resources (a.k.a service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.projects.getXpnResources", "parameterOrder": [ @@ -10656,7 +11176,7 @@ ] }, "listXpnHosts": { - "description": "Lists all shared VPC host projects visible to the user in an organization.", + "description": "Lists all shared VPC host projects visible to the user in an organization. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.listXpnHosts", "parameterOrder": [ @@ -10707,7 +11227,7 @@ ] }, "moveDisk": { - "description": "Moves a persistent disk from one zone to another.", + "description": "Moves a persistent disk from one zone to another. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.moveDisk", "parameterOrder": [ @@ -10740,7 +11260,7 @@ ] }, "moveInstance": { - "description": "Moves an instance and its attached persistent disks from one zone to another.", + "description": "Moves an instance and its attached persistent disks from one zone to another. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.moveInstance", "parameterOrder": [ @@ -10773,7 +11293,7 @@ ] }, "setCommonInstanceMetadata": { - "description": "Sets metadata common to all instances within the specified project using the data included in the request.", + "description": "Sets metadata common to all instances within the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.setCommonInstanceMetadata", "parameterOrder": [ @@ -10806,7 +11326,7 @@ ] }, "setDefaultNetworkTier": { - "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.", + "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.setDefaultNetworkTier", "parameterOrder": [ @@ -10839,7 +11359,7 @@ ] }, "setUsageExportBucket": { - "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", + "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.projects.setUsageExportBucket", "parameterOrder": [ @@ -10879,7 +11399,7 @@ "regionAutoscalers": { "methods": { "delete": { - "description": "Deletes the specified autoscaler.", + "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionAutoscalers.delete", "parameterOrder": [ @@ -10925,7 +11445,7 @@ ] }, "get": { - "description": "Returns the specified autoscaler.", + "description": "Returns the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionAutoscalers.get", "parameterOrder": [ @@ -10967,7 +11487,7 @@ ] }, "insert": { - "description": "Creates an autoscaler in the specified project using the data included in the request.", + "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionAutoscalers.insert", "parameterOrder": [ @@ -11008,7 +11528,7 @@ ] }, "list": { - "description": "Retrieves a list of autoscalers contained within the specified region.", + "description": "Retrieves a list of autoscalers contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionAutoscalers.list", "parameterOrder": [ @@ -11065,7 +11585,7 @@ ] }, "patch": { - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionAutoscalers.patch", "parameterOrder": [ @@ -11112,7 +11632,7 @@ ] }, "update": { - "description": "Updates an autoscaler in the specified project using the data included in the request.", + "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionAutoscalers.update", "parameterOrder": [ @@ -11163,7 +11683,7 @@ "regionBackendServices": { "methods": { "delete": { - "description": "Deletes the specified regional BackendService resource.", + "description": "Deletes the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionBackendServices.delete", "parameterOrder": [ @@ -11209,7 +11729,7 @@ ] }, "get": { - "description": "Returns the specified regional BackendService resource.", + "description": "Returns the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionBackendServices.get", "parameterOrder": [ @@ -11251,7 +11771,7 @@ ] }, "getHealth": { - "description": "Gets the most recent health check results for this regional BackendService.", + "description": "Gets the most recent health check results for this regional BackendService. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionBackendServices.getHealth", "parameterOrder": [ @@ -11295,7 +11815,7 @@ ] }, "insert": { - "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", + "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionBackendServices.insert", "parameterOrder": [ @@ -11336,7 +11856,7 @@ ] }, "list": { - "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", + "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionBackendServices.list", "parameterOrder": [ @@ -11393,7 +11913,7 @@ ] }, "patch": { - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionBackendServices.patch", "parameterOrder": [ @@ -11442,7 +11962,7 @@ ] }, "update": { - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.regionBackendServices.update", "parameterOrder": [ @@ -11495,7 +12015,7 @@ "regionCommitments": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of commitments.", + "description": "Retrieves an aggregated list of commitments. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionCommitments.aggregatedList", "parameterOrder": [ @@ -11544,7 +12064,7 @@ ] }, "get": { - "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request.", + "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionCommitments.get", "parameterOrder": [ @@ -11586,7 +12106,7 @@ ] }, "insert": { - "description": "Creates a commitment in the specified project using the data included in the request.", + "description": "Creates a commitment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionCommitments.insert", "parameterOrder": [ @@ -11627,7 +12147,7 @@ ] }, "list": { - "description": "Retrieves a list of commitments contained within the specified region.", + "description": "Retrieves a list of commitments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionCommitments.list", "parameterOrder": [ @@ -11688,7 +12208,7 @@ "regionDiskTypes": { "methods": { "get": { - "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request.", + "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDiskTypes.get", "parameterOrder": [ @@ -11730,7 +12250,7 @@ ] }, "list": { - "description": "Retrieves a list of regional disk types available to the specified project.", + "description": "Retrieves a list of regional disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDiskTypes.list", "parameterOrder": [ @@ -11790,8 +12310,57 @@ }, "regionDisks": { "methods": { + "addResourcePolicies": { + "description": "Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionDisks.addResourcePolicies", + "parameterOrder": [ + "project", + "region", + "disk" + ], + "parameters": { + "disk": { + "description": "The disk name for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/disks/{disk}/addResourcePolicies", + "request": { + "$ref": "RegionDisksAddResourcePoliciesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "createSnapshot": { - "description": "Creates a snapshot of this regional disk.", + "description": "Creates a snapshot of this regional disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.createSnapshot", "parameterOrder": [ @@ -11840,7 +12409,7 @@ ] }, "delete": { - "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionDisks.delete", "parameterOrder": [ @@ -11885,7 +12454,7 @@ ] }, "get": { - "description": "Returns a specified regional persistent disk.", + "description": "Returns a specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDisks.get", "parameterOrder": [ @@ -11927,7 +12496,7 @@ ] }, "insert": { - "description": "Creates a persistent regional disk in the specified project using the data included in the request.", + "description": "Creates a persistent regional disk in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.insert", "parameterOrder": [ @@ -11973,7 +12542,7 @@ ] }, "list": { - "description": "Retrieves the list of persistent disks contained within the specified region.", + "description": "Retrieves the list of persistent disks contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionDisks.list", "parameterOrder": [ @@ -12029,8 +12598,57 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "removeResourcePolicies": { + "description": "Removes resource policies from a regional disk. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionDisks.removeResourcePolicies", + "parameterOrder": [ + "project", + "region", + "disk" + ], + "parameters": { + "disk": { + "description": "The disk name for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/disks/{disk}/removeResourcePolicies", + "request": { + "$ref": "RegionDisksRemoveResourcePoliciesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "resize": { - "description": "Resizes the specified regional persistent disk.", + "description": "Resizes the specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.resize", "parameterOrder": [ @@ -12079,7 +12697,7 @@ ] }, "setLabels": { - "description": "Sets the labels on the target regional disk.", + "description": "Sets the labels on the target regional disk. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.setLabels", "parameterOrder": [ @@ -12128,7 +12746,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionDisks.testIamPermissions", "parameterOrder": [ @@ -12174,10 +12792,298 @@ } } }, + "regionHealthChecks": { + "methods": { + "delete": { + "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.regionHealthChecks.delete", + "parameterOrder": [ + "project", + "region", + "healthCheck" + ], + "parameters": { + "healthCheck": { + "description": "Name of the HealthCheck resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/healthChecks/{healthCheck}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.regionHealthChecks.get", + "parameterOrder": [ + "project", + "region", + "healthCheck" + ], + "parameters": { + "healthCheck": { + "description": "Name of the HealthCheck resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/healthChecks/{healthCheck}", + "response": { + "$ref": "HealthCheck" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionHealthChecks.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/healthChecks", + "request": { + "$ref": "HealthCheck" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.regionHealthChecks.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/healthChecks", + "response": { + "$ref": "HealthCheckList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PATCH", + "id": "compute.regionHealthChecks.patch", + "parameterOrder": [ + "project", + "region", + "healthCheck" + ], + "parameters": { + "healthCheck": { + "description": "Name of the HealthCheck resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/healthChecks/{healthCheck}", + "request": { + "$ref": "HealthCheck" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "update": { + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PUT", + "id": "compute.regionHealthChecks.update", + "parameterOrder": [ + "project", + "region", + "healthCheck" + ], + "parameters": { + "healthCheck": { + "description": "Name of the HealthCheck resource to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/healthChecks/{healthCheck}", + "request": { + "$ref": "HealthCheck" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "regionInstanceGroupManagers": { "methods": { "abandonInstances": { - "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.abandonInstances", "parameterOrder": [ @@ -12224,7 +13130,7 @@ ] }, "delete": { - "description": "Deletes the specified managed instance group and all of the instances in that group.", + "description": "Deletes the specified managed instance group and all of the instances in that group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionInstanceGroupManagers.delete", "parameterOrder": [ @@ -12268,7 +13174,7 @@ ] }, "deleteInstances": { - "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.deleteInstances", "parameterOrder": [ @@ -12315,7 +13221,7 @@ ] }, "get": { - "description": "Returns all of the details about the specified managed instance group.", + "description": "Returns all of the details about the specified managed instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroupManagers.get", "parameterOrder": [ @@ -12355,7 +13261,7 @@ ] }, "insert": { - "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", + "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.insert", "parameterOrder": [ @@ -12395,7 +13301,7 @@ ] }, "list": { - "description": "Retrieves the list of managed instance groups that are contained within the specified region.", + "description": "Retrieves the list of managed instance groups that are contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroupManagers.list", "parameterOrder": [ @@ -12451,7 +13357,7 @@ ] }, "listManagedInstances": { - "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", + "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.listManagedInstances", "parameterOrder": [ @@ -12514,7 +13420,7 @@ ] }, "patch": { - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.regionInstanceGroupManagers.patch", "parameterOrder": [ @@ -12561,7 +13467,7 @@ ] }, "recreateInstances": { - "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.recreateInstances", "parameterOrder": [ @@ -12608,7 +13514,7 @@ ] }, "resize": { - "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.resize", "parameterOrder": [ @@ -12661,7 +13567,7 @@ ] }, "setInstanceTemplate": { - "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", + "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", "parameterOrder": [ @@ -12708,7 +13614,7 @@ ] }, "setTargetPools": { - "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", + "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroupManagers.setTargetPools", "parameterOrder": [ @@ -12759,7 +13665,7 @@ "regionInstanceGroups": { "methods": { "get": { - "description": "Returns the specified instance group resource.", + "description": "Returns the specified instance group resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroups.get", "parameterOrder": [ @@ -12799,7 +13705,7 @@ ] }, "list": { - "description": "Retrieves the list of instance group resources contained within the specified region.", + "description": "Retrieves the list of instance group resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionInstanceGroups.list", "parameterOrder": [ @@ -12855,7 +13761,7 @@ ] }, "listInstances": { - "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", + "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroups.listInstances", "parameterOrder": [ @@ -12921,7 +13827,7 @@ ] }, "setNamedPorts": { - "description": "Sets the named ports for the specified regional instance group.", + "description": "Sets the named ports for the specified regional instance group. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.regionInstanceGroups.setNamedPorts", "parameterOrder": [ @@ -12972,7 +13878,7 @@ "regionOperations": { "methods": { "delete": { - "description": "Deletes the specified region-specific Operations resource.", + "description": "Deletes the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.regionOperations.delete", "parameterOrder": [ @@ -13010,7 +13916,7 @@ ] }, "get": { - "description": "Retrieves the specified region-specific Operations resource.", + "description": "Retrieves the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionOperations.get", "parameterOrder": [ @@ -13052,7 +13958,7 @@ ] }, "list": { - "description": "Retrieves a list of Operation resources contained within the specified region.", + "description": "Retrieves a list of Operation resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regionOperations.list", "parameterOrder": [ @@ -13110,10 +14016,1059 @@ } } }, + "regionSslCertificates": { + "methods": { + "delete": { + "description": "Deletes the specified SslCertificate resource in the region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.regionSslCertificates.delete", + "parameterOrder": [ + "project", + "region", + "sslCertificate" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "sslCertificate": { + "description": "Name of the SslCertificate resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/sslCertificates/{sslCertificate}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.regionSslCertificates.get", + "parameterOrder": [ + "project", + "region", + "sslCertificate" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "sslCertificate": { + "description": "Name of the SslCertificate resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/sslCertificates/{sslCertificate}", + "response": { + "$ref": "SslCertificate" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionSslCertificates.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/sslCertificates", + "request": { + "$ref": "SslCertificate" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.regionSslCertificates.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/sslCertificates", + "response": { + "$ref": "SslCertificateList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "regionTargetHttpProxies": { + "methods": { + "delete": { + "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.regionTargetHttpProxies.delete", + "parameterOrder": [ + "project", + "region", + "targetHttpProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "targetHttpProxy": { + "description": "Name of the TargetHttpProxy resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.regionTargetHttpProxies.get", + "parameterOrder": [ + "project", + "region", + "targetHttpProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "targetHttpProxy": { + "description": "Name of the TargetHttpProxy resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + "response": { + "$ref": "TargetHttpProxy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionTargetHttpProxies.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/targetHttpProxies", + "request": { + "$ref": "TargetHttpProxy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.regionTargetHttpProxies.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/targetHttpProxies", + "response": { + "$ref": "TargetHttpProxyList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setUrlMap": { + "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionTargetHttpProxies.setUrlMap", + "parameterOrder": [ + "project", + "region", + "targetHttpProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "targetHttpProxy": { + "description": "Name of the TargetHttpProxy to set a URL map for.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", + "request": { + "$ref": "UrlMapReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "regionTargetHttpsProxies": { + "methods": { + "delete": { + "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.regionTargetHttpsProxies.delete", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "targetHttpsProxy": { + "description": "Name of the TargetHttpsProxy resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.regionTargetHttpsProxies.get", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "targetHttpsProxy": { + "description": "Name of the TargetHttpsProxy resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + "response": { + "$ref": "TargetHttpsProxy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionTargetHttpsProxies.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/targetHttpsProxies", + "request": { + "$ref": "TargetHttpsProxy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.regionTargetHttpsProxies.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/targetHttpsProxies", + "response": { + "$ref": "TargetHttpsProxyList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setSslCertificates": { + "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionTargetHttpsProxies.setSslCertificates", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "targetHttpsProxy": { + "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", + "request": { + "$ref": "RegionTargetHttpsProxiesSetSslCertificatesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setUrlMap": { + "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionTargetHttpsProxies.setUrlMap", + "parameterOrder": [ + "project", + "region", + "targetHttpsProxy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "targetHttpsProxy": { + "description": "Name of the TargetHttpsProxy to set a URL map for.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", + "request": { + "$ref": "UrlMapReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "regionUrlMaps": { + "methods": { + "delete": { + "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.regionUrlMaps.delete", + "parameterOrder": [ + "project", + "region", + "urlMap" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query", + "type": "string" + }, + "urlMap": { + "description": "Name of the UrlMap resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/urlMaps/{urlMap}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.regionUrlMaps.get", + "parameterOrder": [ + "project", + "region", + "urlMap" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "urlMap": { + "description": "Name of the UrlMap resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/urlMaps/{urlMap}", + "response": { + "$ref": "UrlMap" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionUrlMaps.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/urlMaps", + "request": { + "$ref": "UrlMap" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of UrlMap resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.regionUrlMaps.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/urlMaps", + "response": { + "$ref": "UrlMapList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PATCH", + "id": "compute.regionUrlMaps.patch", + "parameterOrder": [ + "project", + "region", + "urlMap" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query", + "type": "string" + }, + "urlMap": { + "description": "Name of the UrlMap resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/urlMaps/{urlMap}", + "request": { + "$ref": "UrlMap" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "update": { + "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "PUT", + "id": "compute.regionUrlMaps.update", + "parameterOrder": [ + "project", + "region", + "urlMap" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + "location": "query", + "type": "string" + }, + "urlMap": { + "description": "Name of the UrlMap resource to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/urlMaps/{urlMap}", + "request": { + "$ref": "UrlMap" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "validate": { + "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.regionUrlMaps.validate", + "parameterOrder": [ + "project", + "region", + "urlMap" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "urlMap": { + "description": "Name of the UrlMap resource to be validated as.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/urlMaps/{urlMap}/validate", + "request": { + "$ref": "RegionUrlMapsValidateRequest" + }, + "response": { + "$ref": "UrlMapsValidateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "regions": { "methods": { "get": { - "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request.", + "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regions.get", "parameterOrder": [ @@ -13147,7 +15102,7 @@ ] }, "list": { - "description": "Retrieves the list of region resources available to the specified project.", + "description": "Retrieves the list of region resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.regions.list", "parameterOrder": [ @@ -13197,10 +15152,799 @@ } } }, + "reservations": { + "methods": { + "aggregatedList": { + "description": "Retrieves an aggregated list of reservations. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.reservations.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/reservations", + "response": { + "$ref": "ReservationAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified reservation. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.reservations.delete", + "parameterOrder": [ + "project", + "zone", + "reservation" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "reservation": { + "description": "Name of the reservation to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{reservation}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Retrieves information about the specified reservation. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.reservations.get", + "parameterOrder": [ + "project", + "zone", + "reservation" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "reservation": { + "description": "Name of the reservation to retrieve.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{reservation}", + "response": { + "$ref": "Reservation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.reservations.getIamPolicy", + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a new reservation. For more information, read Reserving zonal resources. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.reservations.insert", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations", + "request": { + "$ref": "Reservation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "A list of all the reservations that have been configured for the specified project in specified zone. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.reservations.list", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations", + "response": { + "$ref": "ReservationList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "resize": { + "description": "Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.reservations.resize", + "parameterOrder": [ + "project", + "zone", + "reservation" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "reservation": { + "description": "Name of the reservation to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{reservation}/resize", + "request": { + "$ref": "ReservationsResizeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.reservations.setIamPolicy", + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{resource}/setIamPolicy", + "request": { + "$ref": "ZoneSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.reservations.testIamPermissions", + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/zones/{zone}/reservations/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "resourcePolicies": { + "methods": { + "aggregatedList": { + "description": "Retrieves an aggregated list of resource policies. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.resourcePolicies.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/resourcePolicies", + "response": { + "$ref": "ResourcePolicyAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified resource policy. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.resourcePolicies.delete", + "parameterOrder": [ + "project", + "region", + "resourcePolicy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "resourcePolicy": { + "description": "Name of the resource policy to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/resourcePolicies/{resourcePolicy}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Retrieves all information of the specified resource policy. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.resourcePolicies.get", + "parameterOrder": [ + "project", + "region", + "resourcePolicy" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resourcePolicy": { + "description": "Name of the resource policy to retrieve.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/resourcePolicies/{resourcePolicy}", + "response": { + "$ref": "ResourcePolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.resourcePolicies.getIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a new resource policy. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.resourcePolicies.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/resourcePolicies", + "request": { + "$ref": "ResourcePolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "A list all the resource policies that have been configured for the specified project in specified region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.resourcePolicies.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/resourcePolicies", + "response": { + "$ref": "ResourcePolicyList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.resourcePolicies.setIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy", + "request": { + "$ref": "RegionSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.resourcePolicies.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "routers": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of routers.", + "description": "Retrieves an aggregated list of routers. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.aggregatedList", "parameterOrder": [ @@ -13249,7 +15993,7 @@ ] }, "delete": { - "description": "Deletes the specified Router resource.", + "description": "Deletes the specified Router resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.routers.delete", "parameterOrder": [ @@ -13295,7 +16039,7 @@ ] }, "get": { - "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request.", + "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.get", "parameterOrder": [ @@ -13337,7 +16081,7 @@ ] }, "getNatMappingInfo": { - "description": "Retrieves runtime Nat mapping information of VM endpoints.", + "description": "Retrieves runtime Nat mapping information of VM endpoints. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.getNatMappingInfo", "parameterOrder": [ @@ -13402,7 +16146,7 @@ ] }, "getRouterStatus": { - "description": "Retrieves runtime information of the specified router.", + "description": "Retrieves runtime information of the specified router. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.getRouterStatus", "parameterOrder": [ @@ -13444,7 +16188,7 @@ ] }, "insert": { - "description": "Creates a Router resource in the specified project and region using the data included in the request.", + "description": "Creates a Router resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routers.insert", "parameterOrder": [ @@ -13485,7 +16229,7 @@ ] }, "list": { - "description": "Retrieves a list of Router resources available to the specified project.", + "description": "Retrieves a list of Router resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routers.list", "parameterOrder": [ @@ -13542,7 +16286,7 @@ ] }, "patch": { - "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.routers.patch", "parameterOrder": [ @@ -13591,7 +16335,7 @@ ] }, "preview": { - "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", + "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routers.preview", "parameterOrder": [ @@ -13636,7 +16380,7 @@ ] }, "update": { - "description": "Updates the specified Router resource with the data included in the request.", + "description": "Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.routers.update", "parameterOrder": [ @@ -13689,7 +16433,7 @@ "routes": { "methods": { "delete": { - "description": "Deletes the specified Route resource.", + "description": "Deletes the specified Route resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.routes.delete", "parameterOrder": [ @@ -13727,7 +16471,7 @@ ] }, "get": { - "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request.", + "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routes.get", "parameterOrder": [ @@ -13761,7 +16505,7 @@ ] }, "insert": { - "description": "Creates a Route resource in the specified project using the data included in the request.", + "description": "Creates a Route resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.routes.insert", "parameterOrder": [ @@ -13794,7 +16538,7 @@ ] }, "list": { - "description": "Retrieves the list of Route resources available to the specified project.", + "description": "Retrieves the list of Route resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.routes.list", "parameterOrder": [ @@ -13847,7 +16591,7 @@ "securityPolicies": { "methods": { "addRule": { - "description": "Inserts a rule into a security policy.", + "description": "Inserts a rule into a security policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.addRule", "parameterOrder": [ @@ -13883,7 +16627,7 @@ ] }, "delete": { - "description": "Deletes the specified policy.", + "description": "Deletes the specified policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.securityPolicies.delete", "parameterOrder": [ @@ -13921,7 +16665,7 @@ ] }, "get": { - "description": "List all of the ordered rules present in a single specified policy.", + "description": "List all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.securityPolicies.get", "parameterOrder": [ @@ -13955,7 +16699,7 @@ ] }, "getRule": { - "description": "Gets a rule at the specified priority.", + "description": "Gets a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.securityPolicies.getRule", "parameterOrder": [ @@ -13995,7 +16739,7 @@ ] }, "insert": { - "description": "Creates a new policy in the specified project using the data included in the request.", + "description": "Creates a new policy in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.insert", "parameterOrder": [ @@ -14028,7 +16772,7 @@ ] }, "list": { - "description": "List all the policies that have been configured for the specified project.", + "description": "List all the policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.securityPolicies.list", "parameterOrder": [ @@ -14077,7 +16821,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request.", + "description": "Patches the specified policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.securityPolicies.patch", "parameterOrder": [ @@ -14118,7 +16862,7 @@ ] }, "patchRule": { - "description": "Patches a rule at the specified priority.", + "description": "Patches a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.patchRule", "parameterOrder": [ @@ -14160,7 +16904,7 @@ ] }, "removeRule": { - "description": "Deletes a rule at the specified priority.", + "description": "Deletes a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.securityPolicies.removeRule", "parameterOrder": [ @@ -14203,7 +16947,7 @@ "snapshots": { "methods": { "delete": { - "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.", + "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.snapshots.delete", "parameterOrder": [ @@ -14241,7 +16985,7 @@ ] }, "get": { - "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.", + "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.snapshots.get", "parameterOrder": [ @@ -14275,7 +17019,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.snapshots.getIamPolicy", "parameterOrder": [ @@ -14309,7 +17053,7 @@ ] }, "list": { - "description": "Retrieves the list of Snapshot resources contained within the specified project.", + "description": "Retrieves the list of Snapshot resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.snapshots.list", "parameterOrder": [ @@ -14358,7 +17102,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.snapshots.setIamPolicy", "parameterOrder": [ @@ -14394,7 +17138,7 @@ ] }, "setLabels": { - "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", + "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.snapshots.setLabels", "parameterOrder": [ @@ -14430,7 +17174,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.snapshots.testIamPermissions", "parameterOrder": [ @@ -14470,8 +17214,57 @@ }, "sslCertificates": { "methods": { + "aggregatedList": { + "description": "Retrieves the list of all SslCertificate resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.sslCertificates.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/sslCertificates", + "response": { + "$ref": "SslCertificateAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "delete": { - "description": "Deletes the specified SslCertificate resource.", + "description": "Deletes the specified SslCertificate resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.sslCertificates.delete", "parameterOrder": [ @@ -14509,7 +17302,7 @@ ] }, "get": { - "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request.", + "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslCertificates.get", "parameterOrder": [ @@ -14543,7 +17336,7 @@ ] }, "insert": { - "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", + "description": "Creates a SslCertificate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.sslCertificates.insert", "parameterOrder": [ @@ -14576,7 +17369,7 @@ ] }, "list": { - "description": "Retrieves the list of SslCertificate resources available to the specified project.", + "description": "Retrieves the list of SslCertificate resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslCertificates.list", "parameterOrder": [ @@ -14629,7 +17422,7 @@ "sslPolicies": { "methods": { "delete": { - "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.", + "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.sslPolicies.delete", "parameterOrder": [ @@ -14666,7 +17459,7 @@ ] }, "get": { - "description": "Lists all of the ordered rules present in a single specified policy.", + "description": "Lists all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslPolicies.get", "parameterOrder": [ @@ -14699,7 +17492,7 @@ ] }, "insert": { - "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request.", + "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.sslPolicies.insert", "parameterOrder": [ @@ -14732,7 +17525,7 @@ ] }, "list": { - "description": "Lists all the SSL policies that have been configured for the specified project.", + "description": "Lists all the SSL policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslPolicies.list", "parameterOrder": [ @@ -14781,7 +17574,7 @@ ] }, "listAvailableFeatures": { - "description": "Lists all features that can be specified in the SSL policy when using custom profile.", + "description": "Lists all features that can be specified in the SSL policy when using custom profile. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.sslPolicies.listAvailableFeatures", "parameterOrder": [ @@ -14830,7 +17623,7 @@ ] }, "patch": { - "description": "Patches the specified SSL policy with the data included in the request.", + "description": "Patches the specified SSL policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.sslPolicies.patch", "parameterOrder": [ @@ -14874,7 +17667,7 @@ "subnetworks": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of subnetworks.", + "description": "Retrieves an aggregated list of subnetworks. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.aggregatedList", "parameterOrder": [ @@ -14923,7 +17716,7 @@ ] }, "delete": { - "description": "Deletes the specified subnetwork.", + "description": "Deletes the specified subnetwork. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.subnetworks.delete", "parameterOrder": [ @@ -14969,7 +17762,7 @@ ] }, "expandIpCidrRange": { - "description": "Expands the IP CIDR range of the subnetwork to a specified value.", + "description": "Expands the IP CIDR range of the subnetwork to a specified value. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.expandIpCidrRange", "parameterOrder": [ @@ -15018,7 +17811,7 @@ ] }, "get": { - "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request.", + "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.get", "parameterOrder": [ @@ -15060,7 +17853,7 @@ ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.getIamPolicy", "parameterOrder": [ @@ -15102,7 +17895,7 @@ ] }, "insert": { - "description": "Creates a subnetwork in the specified project using the data included in the request.", + "description": "Creates a subnetwork in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.insert", "parameterOrder": [ @@ -15143,7 +17936,7 @@ ] }, "list": { - "description": "Retrieves a list of subnetworks available to the specified project.", + "description": "Retrieves a list of subnetworks available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.list", "parameterOrder": [ @@ -15200,7 +17993,7 @@ ] }, "listUsable": { - "description": "Retrieves an aggregated list of usable subnetworks.", + "description": "Retrieves an aggregated list of all usable subnetworks in the project. The list contains all of the subnetworks in the project and the subnetworks that were shared by a Shared VPC host project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.subnetworks.listUsable", "parameterOrder": [ @@ -15249,7 +18042,7 @@ ] }, "patch": { - "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.", + "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.subnetworks.patch", "parameterOrder": [ @@ -15258,6 +18051,12 @@ "subnetwork" ], "parameters": { + "drainTimeoutSeconds": { + "description": "The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped.", + "format": "int32", + "location": "query", + "type": "integer" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -15298,7 +18097,7 @@ ] }, "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.setIamPolicy", "parameterOrder": [ @@ -15342,7 +18141,7 @@ ] }, "setPrivateIpGoogleAccess": { - "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", + "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.setPrivateIpGoogleAccess", "parameterOrder": [ @@ -15391,7 +18190,7 @@ ] }, "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.subnetworks.testIamPermissions", "parameterOrder": [ @@ -15439,8 +18238,57 @@ }, "targetHttpProxies": { "methods": { + "aggregatedList": { + "description": "Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.targetHttpProxies.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/targetHttpProxies", + "response": { + "$ref": "TargetHttpProxyAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "delete": { - "description": "Deletes the specified TargetHttpProxy resource.", + "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetHttpProxies.delete", "parameterOrder": [ @@ -15478,7 +18326,7 @@ ] }, "get": { - "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request.", + "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpProxies.get", "parameterOrder": [ @@ -15512,7 +18360,7 @@ ] }, "insert": { - "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpProxies.insert", "parameterOrder": [ @@ -15545,7 +18393,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", + "description": "Retrieves the list of TargetHttpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpProxies.list", "parameterOrder": [ @@ -15594,7 +18442,7 @@ ] }, "setUrlMap": { - "description": "Changes the URL map for TargetHttpProxy.", + "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpProxies.setUrlMap", "parameterOrder": [ @@ -15638,8 +18486,57 @@ }, "targetHttpsProxies": { "methods": { + "aggregatedList": { + "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.targetHttpsProxies.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/targetHttpsProxies", + "response": { + "$ref": "TargetHttpsProxyAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "delete": { - "description": "Deletes the specified TargetHttpsProxy resource.", + "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetHttpsProxies.delete", "parameterOrder": [ @@ -15677,7 +18574,7 @@ ] }, "get": { - "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request.", + "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpsProxies.get", "parameterOrder": [ @@ -15711,7 +18608,7 @@ ] }, "insert": { - "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.insert", "parameterOrder": [ @@ -15744,7 +18641,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", + "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetHttpsProxies.list", "parameterOrder": [ @@ -15793,7 +18690,7 @@ ] }, "setQuicOverride": { - "description": "Sets the QUIC override policy for TargetHttpsProxy.", + "description": "Sets the QUIC override policy for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setQuicOverride", "parameterOrder": [ @@ -15833,7 +18730,7 @@ ] }, "setSslCertificates": { - "description": "Replaces SslCertificates for TargetHttpsProxy.", + "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setSslCertificates", "parameterOrder": [ @@ -15874,7 +18771,7 @@ ] }, "setSslPolicy": { - "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends.", + "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setSslPolicy", "parameterOrder": [ @@ -15914,7 +18811,7 @@ ] }, "setUrlMap": { - "description": "Changes the URL map for TargetHttpsProxy.", + "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetHttpsProxies.setUrlMap", "parameterOrder": [ @@ -15959,7 +18856,7 @@ "targetInstances": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of target instances.", + "description": "Retrieves an aggregated list of target instances. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetInstances.aggregatedList", "parameterOrder": [ @@ -16008,7 +18905,7 @@ ] }, "delete": { - "description": "Deletes the specified TargetInstance resource.", + "description": "Deletes the specified TargetInstance resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetInstances.delete", "parameterOrder": [ @@ -16054,7 +18951,7 @@ ] }, "get": { - "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.", + "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetInstances.get", "parameterOrder": [ @@ -16096,7 +18993,7 @@ ] }, "insert": { - "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", + "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetInstances.insert", "parameterOrder": [ @@ -16137,7 +19034,7 @@ ] }, "list": { - "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", + "description": "Retrieves a list of TargetInstance resources available to the specified project and zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetInstances.list", "parameterOrder": [ @@ -16198,7 +19095,7 @@ "targetPools": { "methods": { "addHealthCheck": { - "description": "Adds health check URLs to a target pool.", + "description": "Adds health check URLs to a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.addHealthCheck", "parameterOrder": [ @@ -16247,7 +19144,7 @@ ] }, "addInstance": { - "description": "Adds an instance to a target pool.", + "description": "Adds an instance to a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.addInstance", "parameterOrder": [ @@ -16296,7 +19193,7 @@ ] }, "aggregatedList": { - "description": "Retrieves an aggregated list of target pools.", + "description": "Retrieves an aggregated list of target pools. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetPools.aggregatedList", "parameterOrder": [ @@ -16345,7 +19242,7 @@ ] }, "delete": { - "description": "Deletes the specified target pool.", + "description": "Deletes the specified target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetPools.delete", "parameterOrder": [ @@ -16391,7 +19288,7 @@ ] }, "get": { - "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request.", + "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetPools.get", "parameterOrder": [ @@ -16433,7 +19330,7 @@ ] }, "getHealth": { - "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", + "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.getHealth", "parameterOrder": [ @@ -16478,7 +19375,7 @@ ] }, "insert": { - "description": "Creates a target pool in the specified project and region using the data included in the request.", + "description": "Creates a target pool in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.insert", "parameterOrder": [ @@ -16519,7 +19416,7 @@ ] }, "list": { - "description": "Retrieves a list of target pools available to the specified project and region.", + "description": "Retrieves a list of target pools available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetPools.list", "parameterOrder": [ @@ -16576,7 +19473,7 @@ ] }, "removeHealthCheck": { - "description": "Removes health check URL from a target pool.", + "description": "Removes health check URL from a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.removeHealthCheck", "parameterOrder": [ @@ -16625,7 +19522,7 @@ ] }, "removeInstance": { - "description": "Removes instance URL from a target pool.", + "description": "Removes instance URL from a target pool. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.removeInstance", "parameterOrder": [ @@ -16674,7 +19571,7 @@ ] }, "setBackup": { - "description": "Changes a backup target pool's configurations.", + "description": "Changes a backup target pool's configurations. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetPools.setBackup", "parameterOrder": [ @@ -16733,7 +19630,7 @@ "targetSslProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetSslProxy resource.", + "description": "Deletes the specified TargetSslProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetSslProxies.delete", "parameterOrder": [ @@ -16771,7 +19668,7 @@ ] }, "get": { - "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request.", + "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetSslProxies.get", "parameterOrder": [ @@ -16805,7 +19702,7 @@ ] }, "insert": { - "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.insert", "parameterOrder": [ @@ -16838,7 +19735,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", + "description": "Retrieves the list of TargetSslProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetSslProxies.list", "parameterOrder": [ @@ -16887,7 +19784,7 @@ ] }, "setBackendService": { - "description": "Changes the BackendService for TargetSslProxy.", + "description": "Changes the BackendService for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setBackendService", "parameterOrder": [ @@ -16928,7 +19825,7 @@ ] }, "setProxyHeader": { - "description": "Changes the ProxyHeaderType for TargetSslProxy.", + "description": "Changes the ProxyHeaderType for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setProxyHeader", "parameterOrder": [ @@ -16969,7 +19866,7 @@ ] }, "setSslCertificates": { - "description": "Changes SslCertificates for TargetSslProxy.", + "description": "Changes SslCertificates for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setSslCertificates", "parameterOrder": [ @@ -17010,7 +19907,7 @@ ] }, "setSslPolicy": { - "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends.", + "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetSslProxies.setSslPolicy", "parameterOrder": [ @@ -17054,7 +19951,7 @@ "targetTcpProxies": { "methods": { "delete": { - "description": "Deletes the specified TargetTcpProxy resource.", + "description": "Deletes the specified TargetTcpProxy resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetTcpProxies.delete", "parameterOrder": [ @@ -17092,7 +19989,7 @@ ] }, "get": { - "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.", + "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetTcpProxies.get", "parameterOrder": [ @@ -17126,7 +20023,7 @@ ] }, "insert": { - "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", + "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetTcpProxies.insert", "parameterOrder": [ @@ -17159,7 +20056,7 @@ ] }, "list": { - "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", + "description": "Retrieves the list of TargetTcpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetTcpProxies.list", "parameterOrder": [ @@ -17208,7 +20105,7 @@ ] }, "setBackendService": { - "description": "Changes the BackendService for TargetTcpProxy.", + "description": "Changes the BackendService for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetTcpProxies.setBackendService", "parameterOrder": [ @@ -17249,7 +20146,7 @@ ] }, "setProxyHeader": { - "description": "Changes the ProxyHeaderType for TargetTcpProxy.", + "description": "Changes the ProxyHeaderType for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetTcpProxies.setProxyHeader", "parameterOrder": [ @@ -17294,7 +20191,7 @@ "targetVpnGateways": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of target VPN gateways.", + "description": "Retrieves an aggregated list of target VPN gateways. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetVpnGateways.aggregatedList", "parameterOrder": [ @@ -17343,7 +20240,7 @@ ] }, "delete": { - "description": "Deletes the specified target VPN gateway.", + "description": "Deletes the specified target VPN gateway. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.targetVpnGateways.delete", "parameterOrder": [ @@ -17389,7 +20286,7 @@ ] }, "get": { - "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.", + "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetVpnGateways.get", "parameterOrder": [ @@ -17431,7 +20328,7 @@ ] }, "insert": { - "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", + "description": "Creates a target VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.targetVpnGateways.insert", "parameterOrder": [ @@ -17472,7 +20369,7 @@ ] }, "list": { - "description": "Retrieves a list of target VPN gateways available to the specified project and region.", + "description": "Retrieves a list of target VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.targetVpnGateways.list", "parameterOrder": [ @@ -17532,8 +20429,57 @@ }, "urlMaps": { "methods": { + "aggregatedList": { + "description": "Retrieves the list of all UrlMap resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.urlMaps.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/urlMaps", + "response": { + "$ref": "UrlMapsAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "delete": { - "description": "Deletes the specified UrlMap resource.", + "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.urlMaps.delete", "parameterOrder": [ @@ -17571,7 +20517,7 @@ ] }, "get": { - "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.", + "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.urlMaps.get", "parameterOrder": [ @@ -17605,7 +20551,7 @@ ] }, "insert": { - "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.urlMaps.insert", "parameterOrder": [ @@ -17638,7 +20584,7 @@ ] }, "invalidateCache": { - "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", + "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.urlMaps.invalidateCache", "parameterOrder": [ @@ -17679,7 +20625,7 @@ ] }, "list": { - "description": "Retrieves the list of UrlMap resources available to the specified project.", + "description": "Retrieves the list of UrlMap resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.urlMaps.list", "parameterOrder": [ @@ -17728,7 +20674,7 @@ ] }, "patch": { - "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PATCH", "id": "compute.urlMaps.patch", "parameterOrder": [ @@ -17769,7 +20715,7 @@ ] }, "update": { - "description": "Updates the specified UrlMap resource with the data included in the request.", + "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "PUT", "id": "compute.urlMaps.update", "parameterOrder": [ @@ -17810,7 +20756,7 @@ ] }, "validate": { - "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.urlMaps.validate", "parameterOrder": [ @@ -17847,10 +20793,385 @@ } } }, + "vpnGateways": { + "methods": { + "aggregatedList": { + "description": "Retrieves an aggregated list of VPN gateways. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.vpnGateways.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "{project}/aggregated/vpnGateways", + "response": { + "$ref": "VpnGatewayAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "DELETE", + "id": "compute.vpnGateways.delete", + "parameterOrder": [ + "project", + "region", + "vpnGateway" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "vpnGateway": { + "description": "Name of the VPN gateway to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.vpnGateways.get", + "parameterOrder": [ + "project", + "region", + "vpnGateway" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "vpnGateway": { + "description": "Name of the VPN gateway to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}", + "response": { + "$ref": "VpnGateway" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getStatus": { + "description": "Returns the status for the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.vpnGateways.getStatus", + "parameterOrder": [ + "project", + "region", + "vpnGateway" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "vpnGateway": { + "description": "Name of the VPN gateway to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus", + "response": { + "$ref": "VpnGatewaysGetStatusResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.vpnGateways.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways", + "request": { + "$ref": "VpnGateway" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves a list of VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "GET", + "id": "compute.vpnGateways.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways", + "response": { + "$ref": "VpnGatewayList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setLabels": { + "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.vpnGateways.setLabels", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways/{resource}/setLabels", + "request": { + "$ref": "RegionSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + "httpMethod": "POST", + "id": "compute.vpnGateways.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "vpnTunnels": { "methods": { "aggregatedList": { - "description": "Retrieves an aggregated list of VPN tunnels.", + "description": "Retrieves an aggregated list of VPN tunnels. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnTunnels.aggregatedList", "parameterOrder": [ @@ -17899,7 +21220,7 @@ ] }, "delete": { - "description": "Deletes the specified VpnTunnel resource.", + "description": "Deletes the specified VpnTunnel resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.vpnTunnels.delete", "parameterOrder": [ @@ -17945,7 +21266,7 @@ ] }, "get": { - "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.", + "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnTunnels.get", "parameterOrder": [ @@ -17987,7 +21308,7 @@ ] }, "insert": { - "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", + "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "POST", "id": "compute.vpnTunnels.insert", "parameterOrder": [ @@ -18028,7 +21349,7 @@ ] }, "list": { - "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", + "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.vpnTunnels.list", "parameterOrder": [ @@ -18089,7 +21410,7 @@ "zoneOperations": { "methods": { "delete": { - "description": "Deletes the specified zone-specific Operations resource.", + "description": "Deletes the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "DELETE", "id": "compute.zoneOperations.delete", "parameterOrder": [ @@ -18127,7 +21448,7 @@ ] }, "get": { - "description": "Retrieves the specified zone-specific Operations resource.", + "description": "Retrieves the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zoneOperations.get", "parameterOrder": [ @@ -18169,7 +21490,7 @@ ] }, "list": { - "description": "Retrieves a list of Operation resources contained within the specified zone.", + "description": "Retrieves a list of Operation resources contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zoneOperations.list", "parameterOrder": [ @@ -18230,7 +21551,7 @@ "zones": { "methods": { "get": { - "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request.", + "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zones.get", "parameterOrder": [ @@ -18264,7 +21585,7 @@ ] }, "list": { - "description": "Retrieves the list of Zone resources available to the specified project.", + "description": "Retrieves the list of Zone resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", "httpMethod": "GET", "id": "compute.zones.list", "parameterOrder": [ @@ -18315,8 +21636,8 @@ } } }, - "revision": "20190528", - "rootUrl": "https://www.googleapis.com/", + "revision": "20191025", + "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { "description": "A specification of the type and number of accelerator cards attached to the instance.", @@ -18335,7 +21656,7 @@ "type": "object" }, "AcceleratorType": { - "description": "An Accelerator Type resource. (== resource_for beta.acceleratorTypes ==) (== resource_for v1.acceleratorTypes ==)", + "description": "Represents an Accelerator Type resource.\n\nGoogle Cloud Platform provides graphics processing units (accelerators) that you can add to VM instances to improve or accelerate performance when working with intensive workloads. For more information, read GPUs on Compute Engine. (== resource_for beta.acceleratorTypes ==) (== resource_for v1.acceleratorTypes ==)", "id": "AcceleratorType", "properties": { "creationTimestamp": { @@ -18709,7 +22030,7 @@ "type": "string" }, "name": { - "description": "The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.", + "description": "The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.", "type": "string" }, "natIP": { @@ -18729,11 +22050,11 @@ "type": "string" }, "publicPtrDomainName": { - "description": "The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled.", + "description": "The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.", "type": "string" }, "setPublicPtr": { - "description": "Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name.", + "description": "Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.", "type": "boolean" }, "type": { @@ -18751,7 +22072,7 @@ "type": "object" }, "Address": { - "description": "A reserved address resource. (== resource_for beta.addresses ==) (== resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== resource_for v1.globalAddresses ==)", + "description": "Represents an IP Address resource.\n\nAn address resource represents a regional internal IP address. Regional internal IP addresses are RFC 1918 addresses that come from either a primary or secondary IP range of a subnet in a VPC network. Regional external IP addresses can be assigned to GCP VM instances, Cloud VPN gateways, regional external forwarding rules for network load balancers (in either Standard or Premium Tier), and regional external forwarding rules for HTTP(S), SSL Proxy, and TCP Proxy load balancers in Standard Tier. For more information, read IP addresses.\n\nA globalAddresses resource represent a global external IP address. Global external IP addresses are IPv4 or IPv6 addresses. They can only be assigned to global forwarding rules for HTTP(S), SSL Proxy, or TCP Proxy load balancers in Premium Tier. For more information, read Global resources. (== resource_for beta.addresses ==) (== resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== resource_for v1.globalAddresses ==)", "id": "Address", "properties": { "address": { @@ -18777,7 +22098,7 @@ "type": "string" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "id": { @@ -18786,7 +22107,7 @@ "type": "string" }, "ipVersion": { - "description": "The IP Version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.", + "description": "The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.", "enum": [ "IPV4", "IPV6", @@ -18810,16 +22131,16 @@ "compute.addresses.insert" ] }, - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, "network": { - "description": "The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with VPC_PEERING purpose.", + "description": "The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.", "type": "string" }, "networkTier": { - "description": "This signifies the networking tier used for configuring this Address and can only take the following values: PREMIUM, STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a Network load balancer.\n\nIf this field is not specified, it is assumed to be PREMIUM.", + "description": "This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer.\n\nIf this field is not specified, it is assumed to be PREMIUM.", "enum": [ "PREMIUM", "STANDARD" @@ -18836,7 +22157,7 @@ "type": "integer" }, "purpose": { - "description": "The purpose of resource, only used with INTERNAL type.", + "description": "The purpose of this resource, which can be one of the following values: \n- `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. \n- `DNS_RESOLVER` for a DNS resolver address in a subnetwork \n- `VPC_PEERING` for addresses that are reserved for VPC peer networks. \n- `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.", "enum": [ "DNS_RESOLVER", "GCE_ENDPOINT", @@ -18852,7 +22173,7 @@ "type": "string" }, "region": { - "description": "[Output Only] URL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL. You cannot set this field in the request body.", + "description": "[Output Only] The URL of the region where the regional address resides. This field is not applicable to global addresses. You must specify this field as part of the HTTP request URL.", "type": "string" }, "selfLink": { @@ -18874,7 +22195,7 @@ "type": "string" }, "subnetwork": { - "description": "The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes.", + "description": "The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.", "type": "string" }, "users": { @@ -19210,16 +22531,89 @@ "id": "AliasIpRange", "properties": { "ipCidrRange": { - "description": "The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).", + "description": "The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).", "type": "string" }, "subnetworkRangeName": { - "description": "Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.", + "description": "The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.", "type": "string" } }, "type": "object" }, + "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk": { + "id": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk", + "properties": { + "diskSizeGb": { + "description": "Specifies the size of the disk in base-2 GB.", + "format": "int64", + "type": "string" + }, + "interface": { + "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.", + "enum": [ + "NVME", + "SCSI" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "AllocationSpecificSKUAllocationReservedInstanceProperties": { + "description": "Properties of the SKU instances being reserved.", + "id": "AllocationSpecificSKUAllocationReservedInstanceProperties", + "properties": { + "guestAccelerators": { + "description": "Specifies accelerator type and count.", + "items": { + "$ref": "AcceleratorConfig" + }, + "type": "array" + }, + "localSsds": { + "description": "Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.", + "items": { + "$ref": "AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk" + }, + "type": "array" + }, + "machineType": { + "description": "Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.", + "type": "string" + }, + "minCpuPlatform": { + "description": "Minimum cpu platform the reservation.", + "type": "string" + } + }, + "type": "object" + }, + "AllocationSpecificSKUReservation": { + "description": "This reservation type allows to pre allocate specific instance configuration.", + "id": "AllocationSpecificSKUReservation", + "properties": { + "count": { + "description": "Specifies the number of resources that are allocated.", + "format": "int64", + "type": "string" + }, + "inUseCount": { + "description": "[Output Only] Indicates how many instances are in use.", + "format": "int64", + "type": "string" + }, + "instanceProperties": { + "$ref": "AllocationSpecificSKUAllocationReservedInstanceProperties", + "description": "The instance properties for the reservation." + } + }, + "type": "object" + }, "AttachedDisk": { "description": "An instance-attached disk resource.", "id": "AttachedDisk", @@ -19257,7 +22651,7 @@ "description": "[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property; you can only define one or the other, but not both." }, "interface": { - "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.", + "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. TODO(b/131765817): Update documentation when NVME is supported.", "enum": [ "NVME", "SCSI" @@ -19293,7 +22687,7 @@ "type": "string" }, "source": { - "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.\n\nIf desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.\n\nNote that for InstanceTemplate, specify the disk name, not the URL for the disk.", + "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.\n\nIf desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.\n\nNote that for InstanceTemplate, specify the disk name, not the URL for the disk.", "type": "string" }, "type": { @@ -19324,7 +22718,7 @@ "type": "string" }, "diskSizeGb": { - "description": "Specifies the size of the disk in base-2 GB.", + "description": "Specifies the size of the disk in base-2 GB. If not specified, the disk will be the same size as the image (usually 10GB). If specified, the size must be equal to or larger than 10GB.", "format": "int64", "type": "string" }, @@ -19339,8 +22733,15 @@ "description": "Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.", "type": "object" }, + "resourcePolicies": { + "description": "Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.", + "items": { + "type": "string" + }, + "type": "array" + }, "sourceImage": { - "description": "The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required except for local SSD.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the image name in the following format:\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\nglobal/images/family/my-image-family\n\n\nIf the source image is deleted later, this field will not be set.", + "description": "The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:\nprojects/debian-cloud/global/images/family/debian-9\n\n\nAlternatively, use a specific version of a public operating system image:\nprojects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD\n\n\nTo create a disk with a custom image that you created, specify the image name in the following format:\nglobal/images/my-custom-image\n\n\nYou can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\nglobal/images/family/my-image-family\n\n\nIf the source image is deleted later, this field will not be set.", "type": "string" }, "sourceImageEncryptionKey": { @@ -19348,7 +22749,7 @@ "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.\n\nInstance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys." }, "sourceSnapshot": { - "description": "The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or disks.source is required except for local SSD.\n\nTo create a disk with a snapshot that you created, specify the snapshot name in the following format:\nglobal/snapshots/my-backup\n\n\nIf the source snapshot is deleted later, this field will not be set.", + "description": "The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.\n\nTo create a disk with a snapshot that you created, specify the snapshot name in the following format:\nglobal/snapshots/my-backup\n\n\nIf the source snapshot is deleted later, this field will not be set.", "type": "string" }, "sourceSnapshotEncryptionKey": { @@ -19359,7 +22760,7 @@ "type": "object" }, "AuditConfig": { - "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"fooservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:bar@gmail.com\" ] } ] } ] }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.", + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n{ \"audit_configs\": [ { \"service\": \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\": \"sampleservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] }\n\nFor sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", "id": "AuditConfig", "properties": { "auditLogConfigs": { @@ -19384,7 +22785,7 @@ "type": "object" }, "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:foo@gmail.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.", + "description": "Provides the configuration for logging a type of permissions. Example:\n\n{ \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\", } ] }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", "id": "AuditLogConfig", "properties": { "exemptedMembers": { @@ -19394,6 +22795,10 @@ }, "type": "array" }, + "ignoreChildExemptions": { + "description": "", + "type": "boolean" + }, "logType": { "description": "The log type that this config enables.", "enum": [ @@ -19439,7 +22844,7 @@ "type": "object" }, "Autoscaler": { - "description": "Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)", + "description": "Represents an Autoscaler resource.\n\n\n\nUse autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances.\n\nFor zonal managed instance groups resource, use the autoscaler resource.\n\nFor regional managed instance groups, use the regionAutoscalers resource. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)", "id": "Autoscaler", "properties": { "autoscalingPolicy": { @@ -19483,7 +22888,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of the autoscaler configuration.", + "description": "[Output Only] The status of the autoscaler configuration. Current set of possible values: \n- PENDING: Autoscaler backend hasn't read new/updated configuration. \n- DELETING: Configuration is being deleted. \n- ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. \n- ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future.", "enum": [ "ACTIVE", "DELETING", @@ -19748,7 +23153,7 @@ "type": "string" }, "type": { - "description": "The type of error returned.", + "description": "The type of error, warning, or notice returned. Current set of possible values: \n- ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance group are unhealthy (not in RUNNING state). \n- BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service attached to the instance group. \n- CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size greater than maxNumReplicas. \n- CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric samples are not exported often enough to be a credible base for autoscaling. \n- CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified does not exist or does not have the necessary labels. \n- MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to maxNumReplicas. This means the autoscaler cannot add or remove instances from the instance group. \n- MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not receive any data from the custom metric configured for autoscaling. \n- MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is configured to scale based on a load balancing signal but the instance group has not received any requests from the load balancer. \n- MODE_OFF (WARNING): Autoscaling is turned off. The number of instances in the group won't change automatically. The autoscaling configuration is preserved. \n- MODE_ONLY_UP (WARNING): Autoscaling is in the \"Autoscale only up\" mode. The autoscaler can add instances but not remove any. \n- MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be autoscaled because it has more than one backend service attached to it. \n- NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for the necessary resources, such as CPU or number of instances. \n- REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional autoscalers: there is a resource stockout in the chosen region. \n- SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does not exist. \n- UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): Autoscaling does not work with an HTTP/S load balancer that has been configured for maxRate. \n- ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a resource stockout in the chosen zone. For regional autoscalers: in at least one of the zones you're using there is a resource stockout. New values might be added in the future. Some of the values might not be available in all API versions.", "enum": [ "ALL_INSTANCES_UNHEALTHY", "BACKEND_SERVICE_DOES_NOT_EXIST", @@ -19758,6 +23163,7 @@ "MIN_EQUALS_MAX", "MISSING_CUSTOM_METRIC_DATA_POINTS", "MISSING_LOAD_BALANCING_DATA_POINTS", + "MODE_OFF", "MORE_THAN_ONE_BACKEND_SERVICE", "NOT_ENOUGH_QUOTA_AVAILABLE", "REGION_RESOURCE_STOCKOUT", @@ -19781,6 +23187,7 @@ "", "", "", + "", "" ], "type": "string" @@ -19978,7 +23385,7 @@ "id": "Backend", "properties": { "balancingMode": { - "description": "Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).\n\nFor Internal Load Balancing, the default and only supported mode is CONNECTION.", + "description": "Specifies the balancing mode for the backend.\n\nWhen choosing a balancing mode, you need to consider the loadBalancingScheme, and protocol for the backend service, as well as the type of backend (instance group or NEG).\n\n \n- If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.\nYou can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.\n\nIf the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load balancers), you must also specify exactly one of the following parameters: maxConnections, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.\n\nIf the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.\n \n- If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).\nYou can use the RATE balancing mode if the protocol for the backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate, maxRatePerInstance, or maxRatePerEndpoint.\n \n- If the load balancing mode is UTILIZATION, the load is spread based on the CPU utilization of instances in an instance group.\nYou can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.", "enum": [ "CONNECTION", "RATE", @@ -20001,21 +23408,21 @@ "type": "string" }, "group": { - "description": "The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.\n\nFor Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group.\n\nBackend service can not contain mix of Instance Group and Network Endpoint Group backends.\n\nNote that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.\n\nWhen the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. Network Endpoint Groups are not supported for INTERNAL load balancing scheme.", + "description": "The fully-qualified URL of an instance group or network endpoint group (NEG) resource. The type of backend that a backend service supports depends on the backend service's loadBalancingScheme.\n\n \n- When the loadBalancingScheme for the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either an instance group or a NEG. The backends on the backend service must be either all instance groups or all NEGs. You cannot mix instance group and NEG backends on the same backend service. \n\n\n- When the loadBalancingScheme for the backend service is INTERNAL, the backend must be an instance group in the same region as the backend service. NEGs are not supported. \n\nYou must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.", "type": "string" }, "maxConnections": { - "description": "The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for simultaneous connections for the entire backend (instance group or NEG). If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.\n\nNot available if the backend's balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.", "format": "int32", "type": "integer" }, "maxConnectionsPerEndpoint": { - "description": "The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for simultaneous connections for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of target maximum simultaneous connections for the NEG. If the backend's balancingMode is CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerInstance.\n\nNot available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.", "format": "int32", "type": "integer" }, "maxConnectionsPerInstance": { - "description": "The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for simultaneous connections for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum number of simultaneous connections for the whole instance group. If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerEndpoint.\n\nNot available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.", "format": "int32", "type": "integer" }, @@ -20025,17 +23432,17 @@ "type": "integer" }, "maxRatePerEndpoint": { - "description": "The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for requests per second (RPS) for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum rate for the NEG.\n\nIf the backend's balancingMode is RATE, you must specify either this parameter, maxRate, or maxRatePerInstance.\n\nNot available if the backend's balancingMode is CONNECTION.", "format": "float", "type": "number" }, "maxRatePerInstance": { - "description": "The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.\n\nThis cannot be used for internal load balancing.", + "description": "Defines a maximum target for requests per second (RPS) for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum rate for the whole instance group.\n\nIf the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify either this parameter, maxRate, or maxRatePerEndpoint.\n\nNot available if the backend's balancingMode is CONNECTION.", "format": "float", "type": "number" }, "maxUtilization": { - "description": "Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].\n\nThis cannot be used for internal load balancing.", + "description": "Defines the maximum average CPU utilization of a backend VM in an instance group. The valid range is [0.0, 1.0]. This is an optional parameter if the backend's balancingMode is UTILIZATION.\n\nThis parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections, or maxConnectionsPerInstance.", "format": "float", "type": "number" } @@ -20043,7 +23450,7 @@ "type": "object" }, "BackendBucket": { - "description": "A BackendBucket resource. This resource defines a Cloud Storage bucket.", + "description": "Represents a Cloud Storage Bucket resource.\n\nThis Cloud Storage bucket resource is referenced by a URL map of a load balancer. For more information, read Backend Buckets.", "id": "BackendBucket", "properties": { "bucketName": { @@ -20220,11 +23627,11 @@ "type": "object" }, "BackendService": { - "description": "A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity. (== resource_for v1.backendService ==) (== resource_for beta.backendService ==)", + "description": "Represents a Backend Service resource.\n\nA backend service contains configuration values for Google Cloud Platform load balancing services.\n\nFor more information, read Backend Services.\n\n(== resource_for v1.backendService ==) (== resource_for beta.backendService ==)", "id": "BackendService", "properties": { "affinityCookieTtlSec": { - "description": "Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", + "description": "If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value is one day (86,400).", "format": "int32", "type": "integer" }, @@ -20239,9 +23646,17 @@ "$ref": "BackendServiceCdnPolicy", "description": "Cloud CDN configuration for this BackendService." }, + "circuitBreakers": { + "$ref": "CircuitBreakers", + "description": "Settings controlling the volume of connections to a backend service. If not set, this feature is considered disabled.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." + }, "connectionDraining": { "$ref": "ConnectionDraining" }, + "consistentHash": { + "$ref": "ConsistentHashLoadBalancerSettings", + "description": "Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -20258,7 +23673,7 @@ "type": "string" }, "enableCDN": { - "description": "If true, enable Cloud CDN for this BackendService.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", + "description": "If true, enables Cloud CDN for the backend service. Only applicable if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or HTTPS.", "type": "boolean" }, "fingerprint": { @@ -20287,14 +23702,38 @@ "type": "string" }, "loadBalancingScheme": { - "description": "Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.", + "description": "Specifies the load balancer type. Choose EXTERNAL for load balancers that receive traffic from external clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose INTERNAL_SELF_MANAGED for Traffic Director. A backend service created for one type of load balancing cannot be used with another. For more information, refer to Choosing a load balancer.", "enum": [ "EXTERNAL", "INTERNAL", + "INTERNAL_MANAGED", "INTERNAL_SELF_MANAGED", "INVALID_LOAD_BALANCING_SCHEME" ], "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "localityLbPolicy": { + "description": "The load balancing algorithm used within the scope of the locality. The possible values are: \n- ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. \n- LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. \n- RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. \n- RANDOM: The load balancer selects a random healthy host. \n- ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. \n- MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 \n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.", + "enum": [ + "INVALID_LB_POLICY", + "LEAST_REQUEST", + "MAGLEV", + "ORIGINAL_DESTINATION", + "RANDOM", + "RING_HASH", + "ROUND_ROBIN" + ], + "enumDescriptions": [ + "", + "", + "", "", "", "", @@ -20307,17 +23746,21 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "outlierDetection": { + "$ref": "OutlierDetection", + "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." + }, "port": { - "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.\n\nThis cannot be used for internal load balancing.", + "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.\n\nThis cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).", "format": "int32", "type": "integer" }, "portName": { - "description": "Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", + "description": "A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.\n\n\n\nMust be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).", "type": "string" }, "protocol": { - "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.\n\nFor internal load balancing, the possible values are TCP and UDP, and the default is TCP.", + "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP, depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic Director for more information.", "enum": [ "HTTP", "HTTP2", @@ -20349,12 +23792,14 @@ "type": "string" }, "sessionAffinity": { - "description": "Type of session affinity to use. The default is NONE.\n\nWhen the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.\n\nWhen the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.\n\nWhen the protocol is UDP, this field is not used.", + "description": "Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.\n\nWhen the loadBalancingScheme is EXTERNAL, possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the protocol is HTTP or HTTPS.\n\nWhen the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.\n\nWhen the loadBalancingScheme is INTERNAL_SELF_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.", "enum": [ "CLIENT_IP", "CLIENT_IP_PORT_PROTO", "CLIENT_IP_PROTO", "GENERATED_COOKIE", + "HEADER_FIELD", + "HTTP_COOKIE", "NONE" ], "enumDescriptions": [ @@ -20362,12 +23807,14 @@ "", "", "", + "", + "", "" ], "type": "string" }, "timeoutSec": { - "description": "How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.", + "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information read, Backend service settings The default is 30 seconds.", "format": "int32", "type": "integer" } @@ -20772,7 +24219,7 @@ "description": "The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." }, "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.", + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .\n\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.\n\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.", "items": { "type": "string" }, @@ -20831,8 +24278,40 @@ }, "type": "object" }, + "CircuitBreakers": { + "description": "Settings controlling the volume of connections to a backend service.", + "id": "CircuitBreakers", + "properties": { + "maxConnections": { + "description": "The maximum number of connections to the backend service. If not specified, there is no limit.", + "format": "int32", + "type": "integer" + }, + "maxPendingRequests": { + "description": "The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.", + "format": "int32", + "type": "integer" + }, + "maxRequests": { + "description": "The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.", + "format": "int32", + "type": "integer" + }, + "maxRequestsPerConnection": { + "description": "Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.", + "format": "int32", + "type": "integer" + }, + "maxRetries": { + "description": "The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Commitment": { - "description": "Represents a Commitment resource. Creating a Commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts.\n\nCommitted use discounts are subject to Google Cloud Platform's Service Specific Terms. By purchasing a committed use discount, you agree to these terms. Committed use discounts will not renew, so you must purchase a new commitment to continue receiving discounts. (== resource_for beta.commitments ==) (== resource_for v1.commitments ==)", + "description": "Represents a regional Commitment resource.\n\nCreating a commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts. (== resource_for beta.regionCommitments ==) (== resource_for v1.regionCommitments ==)", "id": "Commitment", "properties": { "creationTimestamp": { @@ -20880,6 +24359,13 @@ "description": "[Output Only] URL of the region where this commitment may be used.", "type": "string" }, + "reservations": { + "description": "List of reservations in this commitment.", + "items": { + "$ref": "Reservation" + }, + "type": "array" + }, "resources": { "description": "A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.", "items": { @@ -21319,7 +24805,101 @@ "id": "ConnectionDraining", "properties": { "drainingTimeoutSec": { - "description": "Time for which instance will be drained (not accept new connections, but still work to finish started).", + "description": "The amount of time in seconds to allow existing connections to persist while on unhealthy backend VMs. Only applicable if the protocol is not UDP. The valid range is [0, 3600].", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ConsistentHashLoadBalancerSettings": { + "description": "This message defines settings for a consistent hash style load balancer.", + "id": "ConsistentHashLoadBalancerSettings", + "properties": { + "httpCookie": { + "$ref": "ConsistentHashLoadBalancerSettingsHttpCookie", + "description": "Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE." + }, + "httpHeaderName": { + "description": "The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.", + "type": "string" + }, + "minimumRingSize": { + "description": "The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ConsistentHashLoadBalancerSettingsHttpCookie": { + "description": "The information about the HTTP Cookie on which the hash function is based for load balancing policies that use a consistent hash.", + "id": "ConsistentHashLoadBalancerSettingsHttpCookie", + "properties": { + "name": { + "description": "Name of the cookie.", + "type": "string" + }, + "path": { + "description": "Path to set for the cookie.", + "type": "string" + }, + "ttl": { + "$ref": "Duration", + "description": "Lifetime of the cookie." + } + }, + "type": "object" + }, + "CorsPolicy": { + "description": "The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing", + "id": "CorsPolicy", + "properties": { + "allowCredentials": { + "description": "In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header.\nDefault is false.", + "type": "boolean" + }, + "allowHeaders": { + "description": "Specifies the content for the Access-Control-Allow-Headers header.", + "items": { + "type": "string" + }, + "type": "array" + }, + "allowMethods": { + "description": "Specifies the content for the Access-Control-Allow-Methods header.", + "items": { + "type": "string" + }, + "type": "array" + }, + "allowOriginRegexes": { + "description": "Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript \nAn origin is allowed if it matches either allow_origins or allow_origin_regex.", + "items": { + "type": "string" + }, + "type": "array" + }, + "allowOrigins": { + "description": "Specifies the list of origins that will be allowed to do CORS requests.\nAn origin is allowed if it matches either allow_origins or allow_origin_regex.", + "items": { + "type": "string" + }, + "type": "array" + }, + "disabled": { + "description": "If true, specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect.", + "type": "boolean" + }, + "exposeHeaders": { + "description": "Specifies the content for the Access-Control-Expose-Headers header.", + "items": { + "type": "string" + }, + "type": "array" + }, + "maxAge": { + "description": "Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header.", "format": "int32", "type": "integer" } @@ -21399,7 +24979,7 @@ "type": "object" }, "Disk": { - "description": "A Disk resource. (== resource_for beta.disks ==) (== resource_for v1.disks ==)", + "description": "Represents a Persistent Disk resource.\n\nPersistent disks are required for running your VM instances. Create both boot and non-boot (data) persistent disks. For more information, read Persistent Disks. For more storage options, read Storage options.\n\nThe disks resource represents a zonal persistent disk. For more information, read Zonal persistent disks.\n\nThe regionDisks resource represents a regional persistent disk. For more information, read Regional resources. (== resource_for beta.disks ==) (== resource_for v1.disks ==) (== resource_for v1.regionDisks ==) (== resource_for beta.regionDisks ==)", "id": "Disk", "properties": { "creationTimestamp": { @@ -21496,6 +25076,13 @@ }, "type": "array" }, + "resourcePolicies": { + "description": "Resource policies applied to this disk for automatic snapshot creations.", + "items": { + "type": "string" + }, + "type": "array" + }, "selfLink": { "description": "[Output Only] Server-defined fully-qualified URL for this resource.", "type": "string" @@ -21530,7 +25117,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of disk creation.", + "description": "[Output Only] The status of disk creation. CREATING: Disk is provisioning. RESTORING: Source data is being copied into the disk. FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: Disk is deleting.", "enum": [ "CREATING", "DELETING", @@ -21845,7 +25432,7 @@ "type": "object" }, "DiskType": { - "description": "A DiskType resource. (== resource_for beta.diskTypes ==) (== resource_for v1.diskTypes ==)", + "description": "Represents a Disk Type resource.\n\nYou can choose from a variety of disk types based on your needs. For more information, read Storage options.\n\nThe diskTypes resource represents disk types for a zonal persistent disk. For more information, read Zonal persistent disks.\n\nThe regionDiskTypes resource represents disk types for a regional persistent disk. For more information, read Regional persistent disks. (== resource_for beta.diskTypes ==) (== resource_for v1.diskTypes ==) (== resource_for v1.regionDiskTypes ==) (== resource_for beta.regionDiskTypes ==)", "id": "DiskType", "properties": { "creationTimestamp": { @@ -22217,6 +25804,32 @@ }, "type": "object" }, + "DisksAddResourcePoliciesRequest": { + "id": "DisksAddResourcePoliciesRequest", + "properties": { + "resourcePolicies": { + "description": "Resource policies to be added to this disk. Currently you can only specify one policy here.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "DisksRemoveResourcePoliciesRequest": { + "id": "DisksRemoveResourcePoliciesRequest", + "properties": { + "resourcePolicies": { + "description": "Resource policies to be removed from this disk.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "DisksResizeRequest": { "id": "DisksResizeRequest", "properties": { @@ -22322,6 +25935,17 @@ }, "type": "object" }, + "DisplayDevice": { + "description": "A set of Display Device options", + "id": "DisplayDevice", + "properties": { + "enableDisplay": { + "description": "Defines whether the instance has Display enabled.", + "type": "boolean" + } + }, + "type": "object" + }, "DistributionPolicy": { "id": "DistributionPolicy", "properties": { @@ -22350,6 +25974,23 @@ }, "type": "object" }, + "Duration": { + "description": "A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". Range is approximately 10,000 years.", + "id": "Duration", + "properties": { + "nanos": { + "description": "Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Expr": { "description": "Represents an expression text. Example:\n\ntitle: \"User account presence\" description: \"Determines whether the request has a user account\" expression: \"size(request.user) \u003e 0\"", "id": "Expr", @@ -22373,8 +26014,211 @@ }, "type": "object" }, + "ExternalVpnGateway": { + "description": "External VPN gateway is the on-premises VPN gateway(s) or another cloud provider?s VPN gateway that connects to your Google Cloud VPN gateway. To create a highly available VPN from Google Cloud to your on-premises side or another Cloud provider's VPN gateway, you must create a external VPN gateway resource in GCP, which provides the information to GCP about your external VPN gateway.", + "id": "ExternalVpnGateway", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "interfaces": { + "description": "List of interfaces for this external VPN gateway.", + "items": { + "$ref": "ExternalVpnGatewayInterface" + }, + "type": "array" + }, + "kind": { + "default": "compute#externalVpnGateway", + "description": "[Output Only] Type of the resource. Always compute#externalVpnGateway for externalVpnGateways.", + "type": "string" + }, + "labelFingerprint": { + "description": "A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway.", + "format": "byte", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to this ExternalVpnGateway resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.", + "type": "object" + }, + "name": { + "annotations": { + "required": [ + "compute.externalVpnGateways.insert" + ] + }, + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "redundancyType": { + "description": "Indicates the user-supplied redundancy type of this external VPN gateway.", + "enum": [ + "FOUR_IPS_REDUNDANCY", + "SINGLE_IP_INTERNALLY_REDUNDANT", + "TWO_IPS_REDUNDANCY" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + } + }, + "type": "object" + }, + "ExternalVpnGatewayInterface": { + "description": "The interface for the external VPN gateway.", + "id": "ExternalVpnGatewayInterface", + "properties": { + "id": { + "description": "The numeric ID of this interface. The allowed input values for this id for different redundancy types of external VPN gateway: SINGLE_IP_INTERNALLY_REDUNDANT - 0 TWO_IPS_REDUNDANCY - 0, 1 FOUR_IPS_REDUNDANCY - 0, 1, 2, 3", + "format": "uint32", + "type": "integer" + }, + "ipAddress": { + "description": "IP address of the interface in the external VPN gateway. Only IPv4 is supported. This IP address can be either from your on-premise gateway or another Cloud provider?s VPN gateway, it cannot be an IP address from Google Compute Engine.", + "type": "string" + } + }, + "type": "object" + }, + "ExternalVpnGatewayList": { + "description": "Response to the list request, and contains a list of externalVpnGateways.", + "id": "ExternalVpnGatewayList", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of ExternalVpnGateway resources.", + "items": { + "$ref": "ExternalVpnGateway" + }, + "type": "array" + }, + "kind": { + "default": "compute#externalVpnGatewayList", + "description": "[Output Only] Type of resource. Always compute#externalVpnGatewayList for lists of externalVpnGateways.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "Firewall": { - "description": "Represents a Firewall resource.", + "description": "Represents a Firewall Rule resource.\n\nFirewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.", "id": "Firewall", "properties": { "allowed": { @@ -22382,11 +26226,11 @@ "items": { "properties": { "IPProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.", + "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.", "type": "string" }, "ports": { - "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", + "description": "An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", "items": { "type": "string" }, @@ -22406,11 +26250,11 @@ "items": { "properties": { "IPProtocol": { - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.", + "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.", "type": "string" }, "ports": { - "description": "An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", + "description": "An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", "items": { "type": "string" }, @@ -22422,18 +26266,18 @@ "type": "array" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "destinationRanges": { - "description": "If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.", + "description": "If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.", "items": { "type": "string" }, "type": "array" }, "direction": { - "description": "Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags.", + "description": "Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.", "enum": [ "EGRESS", "INGRESS" @@ -22445,7 +26289,7 @@ "type": "string" }, "disabled": { - "description": "Denotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.", + "description": "Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.", "type": "boolean" }, "id": { @@ -22469,16 +26313,16 @@ "compute.firewalls.patch" ] }, - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, "network": { - "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default", + "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default", "type": "string" }, "priority": { - "description": "Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority.", + "description": "Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.", "format": "int32", "type": "integer" }, @@ -22487,21 +26331,21 @@ "type": "string" }, "sourceRanges": { - "description": "If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported.", + "description": "If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.", "items": { "type": "string" }, "type": "array" }, "sourceServiceAccounts": { - "description": "If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.", + "description": "If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.", "items": { "type": "string" }, "type": "array" }, "sourceTags": { - "description": "If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.", + "description": "If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.", "items": { "type": "string" }, @@ -22670,15 +26514,15 @@ "type": "object" }, "ForwardingRule": { - "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== resource_for beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (== resource_for beta.globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==)", + "description": "Represents a Forwarding Rule resource.\n\nA forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud Platform load balancer. Forwarding rules can also reference target instances and Cloud VPN Classic gateways (targetVpnGateway).\n\nFor more information, read Forwarding rule concepts and Using protocol forwarding.\n\n(== resource_for beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (== resource_for beta.globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==)", "id": "ForwardingRule", "properties": { "IPAddress": { - "description": "The IP address that this forwarding rule is serving on behalf of.\n\nAddresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional).\n\nWhen the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6.\n\nWhen the load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL reference to an existing Address resource ( internal regional static IP address), with a purpose of GCE_END_POINT and address_type of INTERNAL.\n\nWhen the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule.\n\nAn address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: \n- 100.1.2.3 \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address \n- projects/project/regions/region/addresses/address \n- regions/region/addresses/address \n- global/addresses/address \n- address", + "description": "IP address that this forwarding rule serves. When a client sends traffic to this IP address, the forwarding rule directs the traffic to the target that you specify in the forwarding rule.\n\nIf you don't specify a reserved IP address, an ephemeral IP address is assigned. Methods for specifying an IP address:\n\n* IPv4 dotted decimal, as in `100.1.2.3` * Full URL, as in https://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name * Partial URL or by name, as in: * projects/project_id/regions/region/addresses/address-name * regions/region/addresses/address-name * global/addresses/address-name * address-name \n\nThe loadBalancingScheme and the forwarding rule's target determine the type of IP address that you can use. For detailed information, refer to [IP address specifications](/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications).", "type": "string" }, "IPProtocol": { - "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nWhen the load balancing scheme is INTERNAL, only TCP and UDP are valid. When the load balancing scheme is INTERNAL_SELF_MANAGED, only TCPis valid.", + "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.\n\nFor Internal TCP/UDP Load Balancing, the load balancing scheme is INTERNAL, and one of TCP or UDP are valid. For Traffic Director, the load balancing scheme is INTERNAL_SELF_MANAGED, and only TCPis valid. For Internal HTTP(S) Load Balancing, the load balancing scheme is INTERNAL_MANAGED, and only TCP is valid. For HTTP(S), SSL Proxy, and TCP Proxy Load Balancing, the load balancing scheme is EXTERNAL and only TCP is valid. For Network TCP/UDP Load Balancing, the load balancing scheme is EXTERNAL, and one of TCP or UDP is valid.", "enum": [ "AH", "ESP", @@ -22701,6 +26545,10 @@ "description": "This field is used along with the backend_service field for internal load balancing or with the target field for internal TargetInstance. This field cannot be used with port or portRange fields.\n\nWhen the load balancing scheme is INTERNAL and protocol is TCP/UDP, specify this field to allow packets addressed to any ports will be forwarded to the backends configured with this forwarding rule.", "type": "boolean" }, + "allowGlobalAccess": { + "description": "This field is used along with the backend_service field for internal load balancing or with the target field for internal TargetInstance. If the field is set to TRUE, clients can access ILB from all regions. Otherwise only allows access from clients in the same region as the internal load balancer.", + "type": "boolean" + }, "backendService": { "description": "This field is only used for INTERNAL load balancing.\n\nFor internal load balancing, this field identifies the BackendService resource to receive the matched traffic.", "type": "string" @@ -22738,10 +26586,11 @@ "type": "string" }, "loadBalancingScheme": { - "description": "This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, INTERNAL_SELF_MANAGED, EXTERNAL. The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of INTERNAL_SELF_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)", + "description": "Specifies the forwarding rule type. EXTERNAL is used for: - Classic Cloud VPN gateways - Protocol forwarding to VMs from an external IP address - The following load balancers: HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP.\n\nINTERNAL is used for: - Protocol forwarding to VMs from an internal IP address - Internal TCP/UDP load balancers\n\nINTERNAL_MANAGED is used for: - Internal HTTP(S) load balancers\n\nINTERNAL_SELF_MANAGED is used for: - Traffic Director\n\nFor more information about forwarding rules, refer to Forwarding rule concepts.", "enum": [ "EXTERNAL", "INTERNAL", + "INTERNAL_MANAGED", "INTERNAL_SELF_MANAGED", "INVALID" ], @@ -22749,10 +26598,18 @@ "", "", "", + "", "" ], "type": "string" }, + "metadataFilters": { + "description": "Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.\nFor each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata.\nmetadataFilters specified here can be overridden by those specified in the UrlMap that this ForwardingRule references.\nmetadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.", + "items": { + "$ref": "MetadataFilter" + }, + "type": "array" + }, "name": { "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -22775,11 +26632,11 @@ "type": "string" }, "portRange": { - "description": "This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nSome types of forwarding target have constraints on the acceptable ports: \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetVpnGateway: 500, 4500", + "description": "This field is deprecated. See the port\nfield.", "type": "string" }, "ports": { - "description": "This field is used along with the backend_service field for internal load balancing.\n\nWhen the load balancing scheme is INTERNAL, a list of ports can be configured, for example, ['80'], ['8000','9000'] etc. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule.\n\nYou may specify a maximum of up to 5 ports.", + "description": "List of comma-separated ports. The forwarding rule forwards packets with matching destination ports. If the forwarding rule's loadBalancingScheme is EXTERNAL, and the forwarding rule references a target pool, specifying ports is optional. You can specify an unlimited number of ports, but they must be contiguous. If you omit ports, GCP forwards traffic on any port of the forwarding rule's protocol.\n\nIf the forwarding rule's loadBalancingScheme is EXTERNAL, and the forwarding rule references a target HTTP proxy, target HTTPS proxy, target TCP proxy, target SSL proxy, or target VPN gateway, you must specify ports using the following constraints:\n\n \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 \n- TargetVpnGateway: 500, 4500 \n\nIf the forwarding rule's loadBalancingScheme is INTERNAL, you must specify ports in one of the following ways:\n\n* A list of up to five ports, which can be non-contiguous * Keyword ALL, which causes the forwarding rule to forward traffic on any port of the forwarding rule's protocol.\n\nThe ports field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.", "items": { "type": "string" }, @@ -22794,7 +26651,7 @@ "type": "string" }, "serviceLabel": { - "description": "An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name.\n\nThe label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.\n\nThis field is only used for internal load balancing.", + "description": "An optional prefix to the service name for this Forwarding Rule. If specified, the prefix is the first label of the fully qualified service name.\n\nThe label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.\n\nThis field is only used for internal load balancing.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -23180,6 +27037,70 @@ }, "type": "object" }, + "GuestAttributes": { + "description": "A guest attributes entry.", + "id": "GuestAttributes", + "properties": { + "kind": { + "default": "compute#guestAttributes", + "description": "[Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.", + "type": "string" + }, + "queryPath": { + "description": "The path to be queried. This can be the default namespace ('/') or a nested namespace ('//') or a specified key ('//')", + "type": "string" + }, + "queryValue": { + "$ref": "GuestAttributesValue", + "description": "[Output Only] The value of the requested queried path." + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "variableKey": { + "description": "The key to search for.", + "type": "string" + }, + "variableValue": { + "description": "[Output Only] The value found for the requested key.", + "type": "string" + } + }, + "type": "object" + }, + "GuestAttributesEntry": { + "description": "A guest attributes namespace/key/value entry.", + "id": "GuestAttributesEntry", + "properties": { + "key": { + "description": "Key for the guest attribute entry.", + "type": "string" + }, + "namespace": { + "description": "Namespace for the guest attribute entry.", + "type": "string" + }, + "value": { + "description": "Value for the guest attribute entry.", + "type": "string" + } + }, + "type": "object" + }, + "GuestAttributesValue": { + "description": "Array of guest attribute namespace/key/value tuples.", + "id": "GuestAttributesValue", + "properties": { + "items": { + "items": { + "$ref": "GuestAttributesEntry" + }, + "type": "array" + } + }, + "type": "object" + }, "GuestOsFeature": { "description": "Guest OS features.", "id": "GuestOsFeature", @@ -23367,7 +27288,7 @@ "type": "object" }, "HealthCheck": { - "description": "An HealthCheck resource. This resource defines a template for how individual virtual machines should be checked for health, via one of the supported protocols.", + "description": "Represents a Health Check resource.\n\nHealth checks are used for most GCP load balancers and managed instance group auto-healing. For more information, read Health Check Concepts.\n\nTo perform health checks on network load balancers, you must use either httpHealthChecks or httpsHealthChecks.", "id": "HealthCheck", "properties": { "checkIntervalSec": { @@ -23412,6 +27333,10 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "region": { + "description": "[Output Only] Region where the health check resides. Not applicable to global health checks.", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -23577,6 +27502,212 @@ }, "type": "object" }, + "HealthChecksAggregatedList": { + "id": "HealthChecksAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "HealthChecksScopedList", + "description": "Name of the scope containing this set of HealthChecks." + }, + "description": "A list of HealthChecksScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#healthChecksAggregatedList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "HealthChecksScopedList": { + "id": "HealthChecksScopedList", + "properties": { + "healthChecks": { + "description": "A list of HealthChecks contained in this scope.", + "items": { + "$ref": "HealthCheck" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of backend services when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "HealthStatus": { "id": "HealthStatus", "properties": { @@ -23664,8 +27795,149 @@ }, "type": "object" }, + "HttpFaultAbort": { + "description": "Specification for how requests are aborted as part of fault injection.", + "id": "HttpFaultAbort", + "properties": { + "httpStatus": { + "description": "The HTTP status code used to abort the request.\nThe value must be between 200 and 599 inclusive.", + "format": "uint32", + "type": "integer" + }, + "percentage": { + "description": "The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection.\nThe value must be between 0.0 and 100.0 inclusive.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "HttpFaultDelay": { + "description": "Specifies the delay introduced by Loadbalancer before forwarding the request to the backend service as part of fault injection.", + "id": "HttpFaultDelay", + "properties": { + "fixedDelay": { + "$ref": "Duration", + "description": "Specifies the value of the fixed delay interval." + }, + "percentage": { + "description": "The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection.\nThe value must be between 0.0 and 100.0 inclusive.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "HttpFaultInjection": { + "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.", + "id": "HttpFaultInjection", + "properties": { + "abort": { + "$ref": "HttpFaultAbort", + "description": "The specification for how client requests are aborted as part of fault injection." + }, + "delay": { + "$ref": "HttpFaultDelay", + "description": "The specification for how client requests are delayed as part of fault injection, before being sent to a backend service." + } + }, + "type": "object" + }, + "HttpHeaderAction": { + "description": "The request and response header transformations that take effect before the request is passed along to the selected backendService.", + "id": "HttpHeaderAction", + "properties": { + "requestHeadersToAdd": { + "description": "Headers to add to a matching request prior to forwarding the request to the backendService.", + "items": { + "$ref": "HttpHeaderOption" + }, + "type": "array" + }, + "requestHeadersToRemove": { + "description": "A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService.", + "items": { + "type": "string" + }, + "type": "array" + }, + "responseHeadersToAdd": { + "description": "Headers to add the response prior to sending the response back to the client.", + "items": { + "$ref": "HttpHeaderOption" + }, + "type": "array" + }, + "responseHeadersToRemove": { + "description": "A list of header names for headers that need to be removed from the response prior to sending the response back to the client.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "HttpHeaderMatch": { + "description": "matchRule criteria for request header matches.", + "id": "HttpHeaderMatch", + "properties": { + "exactMatch": { + "description": "The value should exactly match contents of exactMatch.\nOnly one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", + "type": "string" + }, + "headerName": { + "description": "The name of the HTTP header to match.\nFor matching against the HTTP request's authority, use a headerMatch with the header name \":authority\".\nFor matching a request's method, use the headerName \":method\".", + "type": "string" + }, + "invertMatch": { + "description": "If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.\nThe default setting is false.", + "type": "boolean" + }, + "prefixMatch": { + "description": "The value of the header must start with the contents of prefixMatch.\nOnly one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", + "type": "string" + }, + "presentMatch": { + "description": "A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value or not.\nOnly one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", + "type": "boolean" + }, + "rangeMatch": { + "$ref": "Int64RangeMatch", + "description": "The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails.\nFor example for a range [-5, 0] \n- -3 will match. \n- 0 will not match. \n- 0.25 will not match. \n- -3someString will not match. \nOnly one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set." + }, + "regexMatch": { + "description": "The value of the header must match the regualar expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript \nFor matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier.\nOnly one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", + "type": "string" + }, + "suffixMatch": { + "description": "The value of the header must end with the contents of suffixMatch.\nOnly one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", + "type": "string" + } + }, + "type": "object" + }, + "HttpHeaderOption": { + "description": "Specification determining how headers are added to requests or responses.", + "id": "HttpHeaderOption", + "properties": { + "headerName": { + "description": "The name of the header.", + "type": "string" + }, + "headerValue": { + "description": "The value of the header to add.", + "type": "string" + }, + "replace": { + "description": "If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header.\nThe default value is false.", + "type": "boolean" + } + }, + "type": "object" + }, "HttpHealthCheck": { - "description": "An HttpHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTP.", + "description": "Represents a legacy HTTP Health Check resource.\n\nLegacy health checks are required by network load balancers. For more information, read Health Check Concepts.", "id": "HttpHealthCheck", "properties": { "checkIntervalSec": { @@ -23711,7 +27983,7 @@ "type": "integer" }, "requestPath": { - "description": "The request path of the HTTP health check request. The default value is /.", + "description": "The request path of the HTTP health check request. The default value is /. This field does not support query parameters.", "type": "string" }, "selfLink": { @@ -23843,8 +28115,218 @@ }, "type": "object" }, + "HttpQueryParameterMatch": { + "description": "HttpRouteRuleMatch criteria for a request's query parameter.", + "id": "HttpQueryParameterMatch", + "properties": { + "exactMatch": { + "description": "The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.\nOnly one of presentMatch, exactMatch and regexMatch must be set.", + "type": "string" + }, + "name": { + "description": "The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.", + "type": "string" + }, + "presentMatch": { + "description": "Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.\nOnly one of presentMatch, exactMatch and regexMatch must be set.", + "type": "boolean" + }, + "regexMatch": { + "description": "The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript \nOnly one of presentMatch, exactMatch and regexMatch must be set.", + "type": "string" + } + }, + "type": "object" + }, + "HttpRedirectAction": { + "description": "Specifies settings for an HTTP redirect.", + "id": "HttpRedirectAction", + "properties": { + "hostRedirect": { + "description": "The host that will be used in the redirect response instead of the one that was supplied in the request.\nThe value must be between 1 and 255 characters.", + "type": "string" + }, + "httpsRedirect": { + "description": "If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request.\nThis must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.\nThe default is set to false.", + "type": "boolean" + }, + "pathRedirect": { + "description": "The path that will be used in the redirect response instead of the one that was supplied in the request.\nOnly one of pathRedirect or prefixRedirect must be specified.\nThe value must be between 1 and 1024 characters.", + "type": "string" + }, + "prefixRedirect": { + "description": "The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request.", + "type": "string" + }, + "redirectResponseCode": { + "description": "The HTTP Status code to use for this RedirectAction.\nSupported values are: \n- MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. \n- FOUND, which corresponds to 302. \n- SEE_OTHER which corresponds to 303. \n- TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \n- PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained.", + "enum": [ + "FOUND", + "MOVED_PERMANENTLY_DEFAULT", + "PERMANENT_REDIRECT", + "SEE_OTHER", + "TEMPORARY_REDIRECT" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "stripQuery": { + "description": "If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.\nThe default is set to false.", + "type": "boolean" + } + }, + "type": "object" + }, + "HttpRetryPolicy": { + "description": "The retry policy associates with HttpRouteRule", + "id": "HttpRetryPolicy", + "properties": { + "numRetries": { + "description": "Specifies the allowed number retries. This number must be \u003e 0. If not specified, defaults to 1.", + "format": "uint32", + "type": "integer" + }, + "perTryTimeout": { + "$ref": "Duration", + "description": "Specifies a non-zero timeout per retry attempt.\nIf not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route." + }, + "retryConditions": { + "description": "Specfies one or more conditions when this retry rule applies. Valid values are: \n- 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \n- gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504.\n- \n- connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \n- retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \n- refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. \n- cancelledLoadbalancer will retry if the gRPC status code in the response header is set to cancelled \n- deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \n- resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \n- unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "HttpRouteAction": { + "id": "HttpRouteAction", + "properties": { + "corsPolicy": { + "$ref": "CorsPolicy", + "description": "The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing" + }, + "faultInjectionPolicy": { + "$ref": "HttpFaultInjection", + "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.\ntimeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy." + }, + "requestMirrorPolicy": { + "$ref": "RequestMirrorPolicy", + "description": "Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow." + }, + "retryPolicy": { + "$ref": "HttpRetryPolicy", + "description": "Specifies the retry policy associated with this route." + }, + "timeout": { + "$ref": "Duration", + "description": "Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries.\nIf not specified, will use the largest timeout among all backend services associated with the route." + }, + "urlRewrite": { + "$ref": "UrlRewrite", + "description": "The spec to modify the URL of the request, prior to forwarding the request to the matched service" + }, + "weightedBackendServices": { + "description": "A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number.\nOnce a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.", + "items": { + "$ref": "WeightedBackendService" + }, + "type": "array" + } + }, + "type": "object" + }, + "HttpRouteRule": { + "description": "An HttpRouteRule specifies how to match an HTTP request and the corresponding routing action that load balancing proxies will perform.", + "id": "HttpRouteRule", + "properties": { + "description": { + "description": "The short description conveying the intent of this routeRule.\nThe description can have a maximum length of 1024 characters.", + "type": "string" + }, + "headerAction": { + "$ref": "HttpHeaderAction", + "description": "Specifies changes to request and response headers that need to take effect for the selected backendService.\nThe headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction" + }, + "matchRules": { + "items": { + "$ref": "HttpRouteRuleMatch" + }, + "type": "array" + }, + "priority": { + "description": "For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied.\nYou cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive.\nPriority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.", + "format": "int32", + "type": "integer" + }, + "routeAction": { + "$ref": "HttpRouteAction", + "description": "In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.\nOnly one of routeAction or urlRedirect must be set." + }, + "service": { + "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.\nOnly one of urlRedirect, service or routeAction.weightedBackendService must be set.", + "type": "string" + }, + "urlRedirect": { + "$ref": "HttpRedirectAction", + "description": "When this rule is matched, the request is redirected to a URL specified by urlRedirect.\nIf urlRedirect is specified, service or routeAction must not be set." + } + }, + "type": "object" + }, + "HttpRouteRuleMatch": { + "description": "HttpRouteRuleMatch specifies a set of criteria for matching requests to an HttpRouteRule. All specified criteria must be satisfied for a match to occur.", + "id": "HttpRouteRuleMatch", + "properties": { + "fullPathMatch": { + "description": "For satifying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.\nFullPathMatch must be between 1 and 1024 characters.\nOnly one of prefixMatch, fullPathMatch or regexMatch must be specified.", + "type": "string" + }, + "headerMatches": { + "description": "Specifies a list of header match criteria, all of which must match corresponding headers in the request.", + "items": { + "$ref": "HttpHeaderMatch" + }, + "type": "array" + }, + "ignoreCase": { + "description": "Specifies that prefixMatch and fullPathMatch matches are case sensitive.\nThe default value is false.\ncaseSensitive must not be used with regexMatch.", + "type": "boolean" + }, + "metadataFilters": { + "description": "Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies.\nFor each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata.\nmetadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap.\nmetadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED.", + "items": { + "$ref": "MetadataFilter" + }, + "type": "array" + }, + "prefixMatch": { + "description": "For satifying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.\nThe value must be between 1 and 1024 characters.\nOnly one of prefixMatch, fullPathMatch or regexMatch must be specified.", + "type": "string" + }, + "queryParameterMatches": { + "description": "Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request.", + "items": { + "$ref": "HttpQueryParameterMatch" + }, + "type": "array" + }, + "regexMatch": { + "description": "For satifying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript \nOnly one of prefixMatch, fullPathMatch or regexMatch must be specified.", + "type": "string" + } + }, + "type": "object" + }, "HttpsHealthCheck": { - "description": "An HttpsHealthCheck resource. This resource defines a template for how individual instances should be checked for health, via HTTPS.", + "description": "Represents a legacy HTTPS Health Check resource.\n\nLegacy health checks are required by network load balancers. For more information, read Health Check Concepts.", "id": "HttpsHealthCheck", "properties": { "checkIntervalSec": { @@ -24023,7 +28505,7 @@ "type": "object" }, "Image": { - "description": "An Image resource. (== resource_for beta.images ==) (== resource_for v1.images ==)", + "description": "Represents an Image resource.\n\nYou can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for beta.images ==) (== resource_for v1.images ==)", "id": "Image", "properties": { "archiveSizeBytes": { @@ -24206,6 +28688,13 @@ "" ], "type": "string" + }, + "storageLocations": { + "description": "Cloud Storage bucket storage location of the image (regional or multi-regional).", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -24323,7 +28812,7 @@ "type": "object" }, "Instance": { - "description": "An Instance resource. (== resource_for beta.instances ==) (== resource_for v1.instances ==)", + "description": "Represents an Instance resource.\n\nAn instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for beta.instances ==) (== resource_for v1.instances ==)", "id": "Instance", "properties": { "canIpForward": { @@ -24353,6 +28842,10 @@ }, "type": "array" }, + "displayDevice": { + "$ref": "DisplayDevice", + "description": "Enables display device for the instance." + }, "guestAccelerators": { "description": "A list of the type and count of accelerator cards attached to the instance.", "items": { @@ -24361,6 +28854,7 @@ "type": "array" }, "hostname": { + "description": "Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.", "type": "string" }, "id": { @@ -24419,6 +28913,10 @@ }, "type": "array" }, + "reservationAffinity": { + "$ref": "ReservationAffinity", + "description": "Specifies the reservations that this instance can consume from." + }, "scheduling": { "$ref": "Scheduling", "description": "Sets the scheduling options for this instance." @@ -24497,7 +28995,7 @@ "$ref": "InstancesScopedList", "description": "[Output Only] Name of the scope containing this set of instances." }, - "description": "A list of InstancesScopedList resources.", + "description": "An object that contains a list of instances scoped by zone.", "type": "object" }, "kind": { @@ -24598,7 +29096,7 @@ "type": "object" }, "InstanceGroup": { - "description": "InstanceGroups (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==)", + "description": "Represents an unmanaged Instance Group resource.\n\nUse unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. For more information, read Instance groups.\n\nFor zonal unmanaged Instance Group, use instanceGroups resource.\n\nFor regional unmanaged Instance Group, use regionInstanceGroups resource. (== resource_for beta.instanceGroups ==) (== resource_for v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== resource_for v1.regionInstanceGroups ==)", "id": "InstanceGroup", "properties": { "creationTimestamp": { @@ -24894,7 +29392,7 @@ "type": "object" }, "InstanceGroupManager": { - "description": "An Instance Group Manager resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)", + "description": "Represents a Managed Instance Group resource.\n\nAn instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.\n\nFor zonal Managed Instance Group, use the instanceGroupManagers resource.\n\nFor regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1.regionInstanceGroupManagers ==)", "id": "InstanceGroupManager", "properties": { "autoHealingPolicies": { @@ -25344,6 +29842,7 @@ "type": "string" }, "type": { + "description": "The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).", "enum": [ "OPPORTUNISTIC", "PROACTIVE" @@ -26111,6 +30610,10 @@ }, "type": "array" }, + "reservationAffinity": { + "$ref": "ReservationAffinity", + "description": "Specifies the reservations that this instance can consume from." + }, "scheduling": { "$ref": "Scheduling", "description": "Specifies the scheduling options for the instances that are created from this template." @@ -26143,7 +30646,7 @@ "type": "object" }, "InstanceTemplate": { - "description": "An Instance Template resource. (== resource_for beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==)", + "description": "Represents an Instance Template resource.\n\nYou can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==)", "id": "InstanceTemplate", "properties": { "creationTimestamp": { @@ -26522,8 +31025,25 @@ }, "type": "object" }, + "Int64RangeMatch": { + "description": "HttpRouteRuleMatch criteria for field values that must stay within the specified integer range.", + "id": "Int64RangeMatch", + "properties": { + "rangeEnd": { + "description": "The end of the range (exclusive) in signed long integer format.", + "format": "int64", + "type": "string" + }, + "rangeStart": { + "description": "The start of the range (inclusive) in signed long integer format.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Interconnect": { - "description": "Represents an Interconnects resource. The Interconnects resource is a dedicated connection between Google's network and your on-premises network. For more information, see the Dedicated overview page. (== resource_for v1.interconnects ==) (== resource_for beta.interconnects ==)", + "description": "Represents an Interconnect resource.\n\nAn Interconnect resource is a dedicated connection between the GCP network and your on-premises network. For more information, read the Dedicated Interconnect Overview. (== resource_for v1.interconnects ==) (== resource_for beta.interconnects ==)", "id": "Interconnect", "properties": { "adminEnabled": { @@ -26598,9 +31118,11 @@ "linkType": { "description": "Type of link requested, which can take one of the following values: \n- LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics \n- LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. Note that this field indicates the speed of each of the links in the bundle, not the speed of the entire bundle.", "enum": [ + "LINK_TYPE_ETHERNET_100G_LR", "LINK_TYPE_ETHERNET_10G_LR" ], "enumDescriptions": [ + "", "" ], "type": "string" @@ -26669,7 +31191,7 @@ "type": "object" }, "InterconnectAttachment": { - "description": "Represents an InterconnectAttachment (VLAN attachment) resource. For more information, see Creating VLAN Attachments. (== resource_for beta.interconnectAttachments ==) (== resource_for v1.interconnectAttachments ==)", + "description": "Represents an Interconnect Attachment (VLAN) resource.\n\nYou can use Interconnect attachments (VLANS) to connect your Virtual Private Cloud networks to your on-premises networks through an Interconnect. For more information, read Creating VLAN Attachments. (== resource_for beta.interconnectAttachments ==) (== resource_for v1.interconnectAttachments ==)", "id": "InterconnectAttachment", "properties": { "adminEnabled": { @@ -26677,16 +31199,18 @@ "type": "boolean" }, "bandwidth": { - "description": "Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one of the following values: \n- BPS_50M: 50 Mbit/s \n- BPS_100M: 100 Mbit/s \n- BPS_200M: 200 Mbit/s \n- BPS_300M: 300 Mbit/s \n- BPS_400M: 400 Mbit/s \n- BPS_500M: 500 Mbit/s \n- BPS_1G: 1 Gbit/s \n- BPS_2G: 2 Gbit/s \n- BPS_5G: 5 Gbit/s \n- BPS_10G: 10 Gbit/s", + "description": "Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one of the following values: \n- BPS_50M: 50 Mbit/s \n- BPS_100M: 100 Mbit/s \n- BPS_200M: 200 Mbit/s \n- BPS_300M: 300 Mbit/s \n- BPS_400M: 400 Mbit/s \n- BPS_500M: 500 Mbit/s \n- BPS_1G: 1 Gbit/s \n- BPS_2G: 2 Gbit/s \n- BPS_5G: 5 Gbit/s \n- BPS_10G: 10 Gbit/s \n- BPS_20G: 20 Gbit/s \n- BPS_50G: 50 Gbit/s", "enum": [ "BPS_100M", "BPS_10G", "BPS_1G", "BPS_200M", + "BPS_20G", "BPS_2G", "BPS_300M", "BPS_400M", "BPS_500M", + "BPS_50G", "BPS_50M", "BPS_5G" ], @@ -26700,6 +31224,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -26742,7 +31268,7 @@ "type": "string" }, "googleReferenceId": { - "description": "[Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.", + "description": "[Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues. [Deprecated] This field is not used.", "type": "string" }, "id": { @@ -27457,7 +31983,7 @@ "type": "object" }, "InterconnectLocation": { - "description": "Represents an InterconnectLocations resource. The InterconnectLocations resource describes the locations where you can connect to Google's networks. For more information, see Colocation Facilities.", + "description": "Represents an Interconnect Attachment (VLAN) Location resource.\n\nYou can use this resource to find location details about an Interconnect attachment (VLAN). For more information about interconnect attachments, read Creating VLAN Attachments.", "id": "InterconnectLocation", "properties": { "address": { @@ -27766,6 +32292,7 @@ "enum": [ "ACTIVE", "CANCELLED", + "COMPLETED", "NS_ACTIVE", "NS_CANCELED" ], @@ -27773,6 +32300,7 @@ "", "", "", + "", "" ], "type": "string" @@ -28093,9 +32621,16 @@ "type": "object" }, "LogConfigCounterOptions": { - "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nSupported field names: - \"authority\", which is \"[token]\" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - \"iam_principal\", a representation of IAMContext.principal even if a token or authority selector is present; or - \"\" (empty string), resulting in a counter with no fields.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nAt this time we do not support multiple field names (though this may be supported in the future).", + "description": "Increment a streamz counter with the specified metric and field names.\n\nMetric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended.\n\nField names correspond to IAM request parameters and field values are their respective values.\n\nSupported field names: - \"authority\", which is \"[token]\" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - \"iam_principal\", a representation of IAMContext.principal even if a token or authority selector is present; or - \"\" (empty string), resulting in a counter with no fields.\n\nExamples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}\n\nTODO(b/141846426): Consider supporting \"authority\" and \"iam_principal\" fields in the same counter.", "id": "LogConfigCounterOptions", "properties": { + "customFields": { + "description": "Custom fields.", + "items": { + "$ref": "LogConfigCounterOptionsCustomField" + }, + "type": "array" + }, "field": { "description": "The field value to attribute.", "type": "string" @@ -28107,6 +32642,21 @@ }, "type": "object" }, + "LogConfigCounterOptionsCustomField": { + "description": "Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.", + "id": "LogConfigCounterOptionsCustomField", + "properties": { + "name": { + "description": "Name is the field name.", + "type": "string" + }, + "value": { + "description": "Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.", + "type": "string" + } + }, + "type": "object" + }, "LogConfigDataAccessOptions": { "description": "Write a Data Access (Gin) log", "id": "LogConfigDataAccessOptions", @@ -28127,7 +32677,7 @@ "type": "object" }, "MachineType": { - "description": "A Machine Type resource. (== resource_for v1.machineTypes ==) (== resource_for beta.machineTypes ==)", + "description": "Represents a Machine Type resource.\n\nYou can use specific machine types for your VM instances based on performance and pricing requirements. For more information, read Machine Types. (== resource_for v1.machineTypes ==) (== resource_for beta.machineTypes ==)", "id": "MachineType", "properties": { "creationTimestamp": { @@ -28699,6 +33249,49 @@ }, "type": "object" }, + "MetadataFilter": { + "description": "Opaque filter criteria used by loadbalancers to restrict routing configuration to a limited set of loadbalancing proxies. Proxies and sidecars involved in loadbalancing would typically present metadata to the loadbalancers which need to match criteria specified here. If a match takes place, the relevant routing configuration is made available to those proxies.\nFor each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata.\nAn example for using metadataFilters would be: if loadbalancing involves Envoys, they will only receive routing configuration when values in metadataFilters match values supplied in \u003ca href=\"https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node\" Node metadata of their XDS requests to loadbalancers.", + "id": "MetadataFilter", + "properties": { + "filterLabels": { + "description": "The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria \nThis list must not be empty and can have at the most 64 entries.", + "items": { + "$ref": "MetadataFilterLabelMatch" + }, + "type": "array" + }, + "filterMatchCriteria": { + "description": "Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match.\nSupported values are: \n- MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata. \n- MATCH_ALL: All filterLabels must have matching labels in the provided metadata.", + "enum": [ + "MATCH_ALL", + "MATCH_ANY", + "NOT_SET" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "MetadataFilterLabelMatch": { + "description": "MetadataFilter label name value pairs that are expected to match corresponding labels presented as metadata to the loadbalancer.", + "id": "MetadataFilterLabelMatch", + "properties": { + "name": { + "description": "Name of metadata label.\nThe name can have a maximum length of 1024 characters and must be at least 1 character long.", + "type": "string" + }, + "value": { + "description": "The value of the label must match the specified value.\nvalue can have a maximum length of 1024 characters.", + "type": "string" + } + }, + "type": "object" + }, "NamedPort": { "description": "The named port. For example: .", "id": "NamedPort", @@ -28716,7 +33309,7 @@ "type": "object" }, "Network": { - "description": "Represents a Network resource. Read Virtual Private Cloud (VPC) Network Overview for more information. (== resource_for v1.networks ==) (== resource_for beta.networks ==)", + "description": "Represents a VPC Network resource.\n\nNetworks connect resources to each other and to the internet. For more information, read Virtual Private Cloud (VPC) Network. (== resource_for v1.networks ==) (== resource_for beta.networks ==)", "id": "Network", "properties": { "IPv4Range": { @@ -28733,11 +33326,11 @@ "type": "string" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "gatewayIPv4": { - "description": "[Output Only] The gateway address for default routing out of the network. This value is read only and is selected by GCP.", + "description": "[Output Only] The gateway address for default routing out of the network, selected by GCP.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}", "type": "string" }, @@ -28757,7 +33350,7 @@ "compute.networks.insert" ] }, - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -28795,7 +33388,7 @@ "type": "string" }, "ipAddress": { - "description": "Optional IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used.", + "description": "Optional IPv4 address of network endpoint. The IP address must belong to a VM in Compute Engine (either the primary IP or as part of an aliased IP range). If the IP address is not specified, then the primary IP address for the VM instance in the network that the network endpoint group belongs to will be used.", "type": "string" }, "port": { @@ -28807,7 +33400,7 @@ "type": "object" }, "NetworkEndpointGroup": { - "description": "Represents a collection of network endpoints.", + "description": "Represents a collection of network endpoints.\n\nFor more information read Setting up network endpoint groups in load balancing. (== resource_for v1.networkEndpointGroups ==) (== resource_for beta.networkEndpointGroups ==)", "id": "NetworkEndpointGroup", "properties": { "creationTimestamp": { @@ -29368,7 +33961,7 @@ "type": "array" }, "aliasIpRanges": { - "description": "An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.", + "description": "An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.", "items": { "$ref": "AliasIpRange" }, @@ -29385,19 +33978,19 @@ "type": "string" }, "name": { - "description": "[Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc.", + "description": "[Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.", "type": "string" }, "network": { - "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nThis field is optional when creating a firewall rule. If not specified when creating a firewall rule, the default network global/networks/default is used.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default", + "description": "URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.\n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default", "type": "string" }, "networkIP": { - "description": "An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.", + "description": "An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.", "type": "string" }, "subnetwork": { - "description": "The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n- regions/region/subnetworks/subnetwork", + "description": "The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n- regions/region/subnetworks/subnetwork", "type": "string" } }, @@ -29520,15 +34113,23 @@ "id": "NetworkPeering", "properties": { "autoCreateRoutes": { - "description": "This field will be deprecated soon. Prefer using exchange_subnet_routes instead. Indicates whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.", + "description": "This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", "type": "boolean" }, "exchangeSubnetRoutes": { - "description": "Whether full mesh connectivity is created and managed automatically. When it is set to true, Google Compute Engine will automatically create and manage the routes between two networks when the peering state is ACTIVE. Otherwise, user needs to create routes manually to route packets to peer network.", + "description": "Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", + "type": "boolean" + }, + "exportCustomRoutes": { + "description": "Whether to export the custom routes to peer network.", + "type": "boolean" + }, + "importCustomRoutes": { + "description": "Whether to import the custom routes from peer network.", "type": "boolean" }, "name": { - "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "type": "string" }, "network": { @@ -29536,7 +34137,7 @@ "type": "string" }, "state": { - "description": "[Output Only] State for the peering.", + "description": "[Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network.", "enum": [ "ACTIVE", "INACTIVE" @@ -29559,7 +34160,7 @@ "id": "NetworkRoutingConfig", "properties": { "routingMode": { - "description": "The network-wide routing mode to use. If set to REGIONAL, this network's cloud routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's cloud routers will advertise routes with all subnets of this network, across regions.", + "description": "The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.", "enum": [ "GLOBAL", "REGIONAL" @@ -29577,7 +34178,7 @@ "id": "NetworksAddPeeringRequest", "properties": { "autoCreateRoutes": { - "description": "This field will be deprecated soon. Prefer using exchange_subnet_routes in network_peering instead. Whether Google Compute Engine manages the routes automatically.", + "description": "This field will be deprecated soon. Use exchange_subnet_routes in network_peering instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", "type": "boolean" }, "name": { @@ -29591,7 +34192,7 @@ }, "networkPeering": { "$ref": "NetworkPeering", - "description": "Network peering parameters. In order to specify route policies for peering using import/export custom routes, you will have to fill all peering related parameters (name, peer network, exchange_subnet_routes) in network_peeringfield. Corresponding fields in NetworksAddPeeringRequest will be deprecated soon." + "description": "Network peering parameters. In order to specify route policies for peering using import and export custom routes, you must specify all peering related parameters (name, peer network, exchange_subnet_routes) in the network_peering field. The corresponding fields in NetworksAddPeeringRequest will be deprecated soon." }, "peerNetwork": { "description": "URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.", @@ -29610,8 +34211,17 @@ }, "type": "object" }, + "NetworksUpdatePeeringRequest": { + "id": "NetworksUpdatePeeringRequest", + "properties": { + "networkPeering": { + "$ref": "NetworkPeering" + } + }, + "type": "object" + }, "NodeGroup": { - "description": "A NodeGroup resource. To create a node group, you must first create a node templates. To learn more about node groups and sole-tenant nodes, read the Sole-tenant nodes documentation. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==)", + "description": "Represent a sole-tenant Node Group resource.\n\nA sole-tenant node is a physical server that is dedicated to hosting VM instances only for your specific project. Use sole-tenant nodes to keep your instances physically separated from instances in other projects, or to group your instances together on the same host hardware. For more information, read Sole-tenant nodes. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==) NextID: 16", "id": "NodeGroup", "properties": { "creationTimestamp": { @@ -29913,6 +34523,10 @@ "description": "The type of this node.", "type": "string" }, + "serverBinding": { + "$ref": "ServerBinding", + "description": "Binding properties for the physical server." + }, "status": { "enum": [ "CREATING", @@ -29948,6 +34562,7 @@ "id": "NodeGroupsDeleteNodesRequest", "properties": { "nodes": { + "description": "Names of the nodes to delete.", "items": { "type": "string" }, @@ -30172,7 +34787,7 @@ "type": "object" }, "NodeTemplate": { - "description": "A Node Template resource. To learn more about node templates and sole-tenant nodes, read the Sole-tenant nodes documentation. (== resource_for beta.nodeTemplates ==) (== resource_for v1.nodeTemplates ==)", + "description": "Represent a sole-tenant Node Template resource.\n\nYou can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances. (== resource_for beta.nodeTemplates ==) (== resource_for v1.nodeTemplates ==) (== NextID: 16 ==)", "id": "NodeTemplate", "properties": { "creationTimestamp": { @@ -30220,6 +34835,10 @@ "description": "[Output Only] Server-defined URL for the resource.", "type": "string" }, + "serverBinding": { + "$ref": "ServerBinding", + "description": "Sets the binding properties for the physical server. Valid values include: \n- [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server \n- RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible \n\nSee Sole-tenant node options for more information." + }, "status": { "description": "[Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING.", "enum": [ @@ -30577,7 +35196,7 @@ "type": "object" }, "NodeType": { - "description": "A Node Type resource.", + "description": "Represent a sole-tenant Node Type resource.\n\nEach node within a node group must have a node type. A node type specifies the total amount of cores and memory for that node. Currently, the only available node type is n1-node-96-624 node type that has 96 vCPUs and 624 GB of memory, available in multiple zones. For more information read Node types. (== resource_for beta.nodeTypes ==) (== resource_for v1.nodeTypes ==)", "id": "NodeType", "properties": { "cpuPlatform": { @@ -30956,7 +35575,7 @@ "type": "object" }, "Operation": { - "description": "An Operation resource, used to manage asynchronous API requests. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)", + "description": "Represents an Operation resource.\n\nYou can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.\n\nOperations can be global, regional or zonal. \n- For global operations, use the globalOperations resource. \n- For regional operations, use the regionOperations resource. \n- For zonal operations, use the zonalOperations resource. \n\nFor more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)", "id": "Operation", "properties": { "clientOperationId": { @@ -31012,7 +35631,7 @@ "type": "integer" }, "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "description": "[Output Only] The unique identifier for the operation. This identifier is defined by the server.", "format": "uint64", "type": "string" }, @@ -31026,7 +35645,7 @@ "type": "string" }, "name": { - "description": "[Output Only] Name of the resource.", + "description": "[Output Only] Name of the operation.", "type": "string" }, "operationType": { @@ -31039,7 +35658,7 @@ "type": "integer" }, "region": { - "description": "[Output Only] The URL of the region where the operation resides. Only available when performing regional operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "description": "[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.", "type": "string" }, "selfLink": { @@ -31166,7 +35785,7 @@ "type": "array" }, "zone": { - "description": "[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "description": "[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.", "type": "string" } }, @@ -31490,28 +36109,107 @@ }, "type": "object" }, + "OutlierDetection": { + "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service.", + "id": "OutlierDetection", + "properties": { + "baseEjectionTime": { + "$ref": "Duration", + "description": "The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s." + }, + "consecutiveErrors": { + "description": "Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.", + "format": "int32", + "type": "integer" + }, + "consecutiveGatewayFailure": { + "description": "The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.", + "format": "int32", + "type": "integer" + }, + "enforcingConsecutiveErrors": { + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.", + "format": "int32", + "type": "integer" + }, + "enforcingConsecutiveGatewayFailure": { + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.", + "format": "int32", + "type": "integer" + }, + "enforcingSuccessRate": { + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.", + "format": "int32", + "type": "integer" + }, + "interval": { + "$ref": "Duration", + "description": "Time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service. Defaults to 1 second." + }, + "maxEjectionPercent": { + "description": "Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.", + "format": "int32", + "type": "integer" + }, + "successRateMinimumHosts": { + "description": "The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.", + "format": "int32", + "type": "integer" + }, + "successRateRequestVolume": { + "description": "The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.", + "format": "int32", + "type": "integer" + }, + "successRateStdevFactor": { + "description": "This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "PathMatcher": { "description": "A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used.", "id": "PathMatcher", "properties": { + "defaultRouteAction": { + "$ref": "HttpRouteAction", + "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.\nOnly one of defaultRouteAction or defaultUrlRedirect must be set." + }, "defaultService": { "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified.\nOnly one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.\nAuthorization requires one or more of the following Google IAM permissions on the specified resource default_service: \n- compute.backendBuckets.use \n- compute.backendServices.use", "type": "string" }, + "defaultUrlRedirect": { + "$ref": "HttpRedirectAction", + "description": "When when none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect.\nIf defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set." + }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" }, + "headerAction": { + "$ref": "HttpHeaderAction", + "description": "Specifies changes to request and response headers that need to take effect for the selected backendService.\nHeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap" + }, "name": { "description": "The name to which this PathMatcher is referred by the HostRule.", "type": "string" }, "pathRules": { - "description": "The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.\nFor example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.\nOnly one of pathRules or routeRules must be set.", + "description": "The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.\nFor example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.\nWithin a given pathMatcher, only one of pathRules or routeRules must be set.", "items": { "$ref": "PathRule" }, "type": "array" + }, + "routeRules": { + "description": "The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect.\nWithin a given pathMatcher, only one of pathRules or routeRules must be set.\nrouteRules are not supported in UrlMaps intended for External Load balancers.", + "items": { + "$ref": "HttpRouteRule" + }, + "type": "array" } }, "type": "object" @@ -31527,15 +36225,23 @@ }, "type": "array" }, + "routeAction": { + "$ref": "HttpRouteAction", + "description": "In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.\nOnly one of routeAction or urlRedirect must be set." + }, "service": { "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.\nOnly one of urlRedirect, service or routeAction.weightedBackendService must be set.", "type": "string" + }, + "urlRedirect": { + "$ref": "HttpRedirectAction", + "description": "When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.\nIf urlRedirect is specified, service or routeAction must not be set." } }, "type": "object" }, "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.\n\n\n\nA `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.\n\n**JSON Example**\n\n{ \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] }\n\n**YAML Example**\n\nbindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer\n\n\n\nFor a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).", + "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.\n\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions (defined by IAM or configured by users). A `binding` can optionally specify a `condition`, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.\n\n**JSON Example**\n\n{ \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [\"user:eve@example.com\"], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ] }\n\n**YAML Example**\n\nbindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\n\nFor a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).", "id": "Policy", "properties": { "auditConfigs": { @@ -31546,14 +36252,14 @@ "type": "array" }, "bindings": { - "description": "Associates a list of `members` to a `role`. `bindings` with no members will result in an error.", + "description": "Associates a list of `members` to a `role`. Optionally may specify a `condition` that determines when binding is in effect. `bindings` with no members will result in an error.", "items": { "$ref": "Binding" }, "type": "array" }, "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten. Due to blind-set semantics of an etag-less policy, 'setIamPolicy' will not fail even if either of incoming or stored policy does not meet the version requirements.", "format": "byte", "type": "string" }, @@ -31569,7 +36275,7 @@ "type": "array" }, "version": { - "description": "Deprecated.", + "description": "Specifies the format of the policy.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.\n\nOperations affecting conditional bindings must specify version 3. This can be either setting a conditional policy, modifying a conditional binding, or removing a conditional binding from the stored conditional policy. Operations on non-conditional policies may specify any valid value or leave the field unset.\n\nIf no etag is provided in the call to `setIamPolicy`, any version compliance checks on the incoming and/or stored policy is skipped.", "format": "int32", "type": "integer" } @@ -31577,7 +36283,7 @@ "type": "object" }, "Project": { - "description": "A Project resource. For an overview of projects, see Cloud Platform Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for beta.projects ==)", + "description": "Represents a Project resource.\n\nA project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for beta.projects ==)", "id": "Project", "properties": { "commonInstanceMetadata": { @@ -31744,7 +36450,17 @@ "AUTOSCALERS", "BACKEND_BUCKETS", "BACKEND_SERVICES", + "C2_CPUS", "COMMITMENTS", + "COMMITTED_C2_CPUS", + "COMMITTED_CPUS", + "COMMITTED_LOCAL_SSD_TOTAL_GB", + "COMMITTED_N2_CPUS", + "COMMITTED_NVIDIA_K80_GPUS", + "COMMITTED_NVIDIA_P100_GPUS", + "COMMITTED_NVIDIA_P4_GPUS", + "COMMITTED_NVIDIA_T4_GPUS", + "COMMITTED_NVIDIA_V100_GPUS", "CPUS", "CPUS_ALL_REGIONS", "DISKS_TOTAL_GB", @@ -31762,11 +36478,14 @@ "INTERCONNECTS", "INTERCONNECT_ATTACHMENTS_PER_REGION", "INTERCONNECT_ATTACHMENTS_TOTAL_MBPS", + "INTERCONNECT_TOTAL_GBPS", "INTERNAL_ADDRESSES", "IN_USE_ADDRESSES", "IN_USE_BACKUP_SCHEDULES", "IN_USE_SNAPSHOT_SCHEDULES", "LOCAL_SSD_TOTAL_GB", + "MACHINE_IMAGES", + "N2_CPUS", "NETWORKS", "NETWORK_ENDPOINT_GROUPS", "NVIDIA_K80_GPUS", @@ -31789,6 +36508,7 @@ "PREEMPTIBLE_NVIDIA_V100_GPUS", "REGIONAL_AUTOSCALERS", "REGIONAL_INSTANCE_GROUP_MANAGERS", + "RESERVATIONS", "RESOURCE_POLICIES", "ROUTERS", "ROUTES", @@ -31878,6 +36598,20 @@ "", "", "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -31919,7 +36653,7 @@ "type": "object" }, "Region": { - "description": "Region resource. (== resource_for beta.regions ==) (== resource_for v1.regions ==)", + "description": "Represents a Region resource.\n\nA region is a geographical area where a resource is located. For more information, read Regions and Zones. (== resource_for beta.regions ==) (== resource_for v1.regions ==)", "id": "Region", "properties": { "creationTimestamp": { @@ -32204,6 +36938,32 @@ }, "type": "object" }, + "RegionDisksAddResourcePoliciesRequest": { + "id": "RegionDisksAddResourcePoliciesRequest", + "properties": { + "resourcePolicies": { + "description": "Resource policies to be added to this disk.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RegionDisksRemoveResourcePoliciesRequest": { + "id": "RegionDisksRemoveResourcePoliciesRequest", + "properties": { + "resourcePolicies": { + "description": "Resource policies to be removed from this disk.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "RegionDisksResizeRequest": { "id": "RegionDisksResizeRequest", "properties": { @@ -32823,10 +37583,484 @@ }, "type": "object" }, + "RegionTargetHttpsProxiesSetSslCertificatesRequest": { + "id": "RegionTargetHttpsProxiesSetSslCertificatesRequest", + "properties": { + "sslCertificates": { + "description": "New set of SslCertificate resources to associate with this TargetHttpsProxy resource. Currently exactly one SslCertificate resource must be specified.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RegionUrlMapsValidateRequest": { + "id": "RegionUrlMapsValidateRequest", + "properties": { + "resource": { + "$ref": "UrlMap", + "description": "Content of the UrlMap to be validated." + } + }, + "type": "object" + }, + "RequestMirrorPolicy": { + "description": "A policy that specifies how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.", + "id": "RequestMirrorPolicy", + "properties": { + "backendService": { + "description": "The full or partial URL to the BackendService resource being mirrored to.", + "type": "string" + } + }, + "type": "object" + }, + "Reservation": { + "description": "Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for beta.reservations ==) (== resource_for v1.reservations ==)", + "id": "Reservation", + "properties": { + "commitment": { + "description": "[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.", + "type": "string" + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#reservation", + "description": "[Output Only] Type of the resource. Always compute#reservations for reservations.", + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "compute.instances.insert" + ] + }, + "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined fully-qualified URL for this resource.", + "type": "string" + }, + "specificReservation": { + "$ref": "AllocationSpecificSKUReservation", + "description": "Reservation for instances with specific machine shapes." + }, + "specificReservationRequired": { + "description": "Indicates whether the reservation can be consumed by VMs with affinity for \"any\" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.", + "type": "boolean" + }, + "status": { + "description": "[Output Only] The status of the reservation.", + "enum": [ + "CREATING", + "DELETING", + "INVALID", + "READY", + "UPDATING" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "zone": { + "description": "Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.", + "type": "string" + } + }, + "type": "object" + }, + "ReservationAffinity": { + "description": "Specifies the reservations that this instance can consume from.", + "id": "ReservationAffinity", + "properties": { + "consumeReservationType": { + "description": "Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.", + "enum": [ + "ANY_RESERVATION", + "NO_RESERVATION", + "SPECIFIC_RESERVATION", + "UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + }, + "key": { + "description": "Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.", + "type": "string" + }, + "values": { + "description": "Corresponds to the label values of a reservation resource.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReservationAggregatedList": { + "description": "Contains a list of reservations.", + "id": "ReservationAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "ReservationsScopedList", + "description": "Name of the scope containing this set of reservations." + }, + "description": "A list of Allocation resources.", + "type": "object" + }, + "kind": { + "default": "compute#reservationAggregatedList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "ReservationList": { + "id": "ReservationList", + "properties": { + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "type": "string" + }, + "items": { + "description": "[Output Only] A list of Allocation resources.", + "items": { + "$ref": "Reservation" + }, + "type": "array" + }, + "kind": { + "default": "compute#reservationList", + "description": "[Output Only] Type of resource.Always compute#reservationsList for listsof reservations", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "ReservationsResizeRequest": { + "id": "ReservationsResizeRequest", + "properties": { + "specificSkuCount": { + "description": "Number of allocated resources can be resized with minimum = 1 and maximum = 1000.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ReservationsScopedList": { + "id": "ReservationsScopedList", + "properties": { + "reservations": { + "description": "A list of reservations contained in this scope.", + "items": { + "$ref": "Reservation" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of reservations when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "ResourceCommitment": { "description": "Commitment for a particular resource (a Commitment is composed of one or more of these).", "id": "ResourceCommitment", "properties": { + "acceleratorType": { + "description": "Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.", + "type": "string" + }, "amount": { "description": "The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.", "format": "int64", @@ -32835,11 +38069,15 @@ "type": { "description": "Type of resource for which this commitment applies. Possible values are VCPU and MEMORY", "enum": [ + "ACCELERATOR", + "LOCAL_SSD", "MEMORY", "UNSPECIFIED", "VCPU" ], "enumDescriptions": [ + "", + "", "", "", "" @@ -32859,8 +38097,570 @@ }, "type": "object" }, + "ResourcePoliciesScopedList": { + "id": "ResourcePoliciesScopedList", + "properties": { + "resourcePolicies": { + "description": "A list of resourcePolicies contained in this scope.", + "items": { + "$ref": "ResourcePolicy" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of resourcePolicies when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "ResourcePolicy": { + "id": "ResourcePolicy", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#resourcePolicy", + "description": "[Output Only] Type of the resource. Always compute#resource_policies for resource policies.", + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "compute.instances.insert" + ] + }, + "description": "The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "region": { + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined fully-qualified URL for this resource.", + "type": "string" + }, + "snapshotSchedulePolicy": { + "$ref": "ResourcePolicySnapshotSchedulePolicy", + "description": "Resource policy for persistent disks for creating snapshots." + }, + "status": { + "description": "[Output Only] The status of resource policy creation.", + "enum": [ + "CREATING", + "DELETING", + "INVALID", + "READY" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "ResourcePolicyAggregatedList": { + "description": "Contains a list of resourcePolicies.", + "id": "ResourcePolicyAggregatedList", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "ResourcePoliciesScopedList", + "description": "Name of the scope containing this set of resourcePolicies." + }, + "description": "A list of ResourcePolicy resources.", + "type": "object" + }, + "kind": { + "default": "compute#resourcePolicyAggregatedList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "ResourcePolicyDailyCycle": { + "description": "Time window specified for daily operations.", + "id": "ResourcePolicyDailyCycle", + "properties": { + "daysInCycle": { + "description": "Defines a schedule that runs every nth day of the month.", + "format": "int32", + "type": "integer" + }, + "duration": { + "description": "[Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.", + "type": "string" + }, + "startTime": { + "description": "Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.", + "type": "string" + } + }, + "type": "object" + }, + "ResourcePolicyHourlyCycle": { + "description": "Time window specified for hourly operations.", + "id": "ResourcePolicyHourlyCycle", + "properties": { + "duration": { + "description": "[Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.", + "type": "string" + }, + "hoursInCycle": { + "description": "Allows to define schedule that runs every nth hour.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time within the window to start the operations. It must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.", + "type": "string" + } + }, + "type": "object" + }, + "ResourcePolicyList": { + "id": "ResourcePolicyList", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "type": "string" + }, + "items": { + "description": "[Output Only] A list of ResourcePolicy resources.", + "items": { + "$ref": "ResourcePolicy" + }, + "type": "array" + }, + "kind": { + "default": "compute#resourcePolicyList", + "description": "[Output Only] Type of resource.Always compute#resourcePoliciesList for listsof resourcePolicies", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "ResourcePolicySnapshotSchedulePolicy": { + "description": "A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained.", + "id": "ResourcePolicySnapshotSchedulePolicy", + "properties": { + "retentionPolicy": { + "$ref": "ResourcePolicySnapshotSchedulePolicyRetentionPolicy", + "description": "Retention policy applied to snapshots created by this resource policy." + }, + "schedule": { + "$ref": "ResourcePolicySnapshotSchedulePolicySchedule", + "description": "A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy." + }, + "snapshotProperties": { + "$ref": "ResourcePolicySnapshotSchedulePolicySnapshotProperties", + "description": "Properties with which snapshots are created such as labels, encryption keys." + } + }, + "type": "object" + }, + "ResourcePolicySnapshotSchedulePolicyRetentionPolicy": { + "description": "Policy for retention of scheduled snapshots.", + "id": "ResourcePolicySnapshotSchedulePolicyRetentionPolicy", + "properties": { + "maxRetentionDays": { + "description": "Maximum age of the snapshot that is allowed to be kept.", + "format": "int32", + "type": "integer" + }, + "onSourceDiskDelete": { + "description": "Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.", + "enum": [ + "APPLY_RETENTION_POLICY", + "KEEP_AUTO_SNAPSHOTS", + "UNSPECIFIED_ON_SOURCE_DISK_DELETE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "ResourcePolicySnapshotSchedulePolicySchedule": { + "description": "A schedule for disks where the schedueled operations are performed.", + "id": "ResourcePolicySnapshotSchedulePolicySchedule", + "properties": { + "dailySchedule": { + "$ref": "ResourcePolicyDailyCycle" + }, + "hourlySchedule": { + "$ref": "ResourcePolicyHourlyCycle" + }, + "weeklySchedule": { + "$ref": "ResourcePolicyWeeklyCycle" + } + }, + "type": "object" + }, + "ResourcePolicySnapshotSchedulePolicySnapshotProperties": { + "description": "Specified snapshot properties for scheduled snapshots created by this policy.", + "id": "ResourcePolicySnapshotSchedulePolicySnapshotProperties", + "properties": { + "guestFlush": { + "description": "Indication to perform a ?guest aware? snapshot.", + "type": "boolean" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to scheduled snapshots. These can be later modified by the setLabels method. Label values may be empty.", + "type": "object" + }, + "storageLocations": { + "description": "Cloud Storage bucket storage location of the auto snapshot (regional or multi-regional).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ResourcePolicyWeeklyCycle": { + "description": "Time window specified for weekly operations.", + "id": "ResourcePolicyWeeklyCycle", + "properties": { + "dayOfWeeks": { + "description": "Up to 7 intervals/windows, one for each day of the week.", + "items": { + "$ref": "ResourcePolicyWeeklyCycleDayOfWeek" + }, + "type": "array" + } + }, + "type": "object" + }, + "ResourcePolicyWeeklyCycleDayOfWeek": { + "id": "ResourcePolicyWeeklyCycleDayOfWeek", + "properties": { + "day": { + "description": "Allows to define schedule that runs specified day of the week.", + "enum": [ + "FRIDAY", + "INVALID", + "MONDAY", + "SATURDAY", + "SUNDAY", + "THURSDAY", + "TUESDAY", + "WEDNESDAY" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "duration": { + "description": "[Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.", + "type": "string" + }, + "startTime": { + "description": "Time within the window to start the operations. It must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.", + "type": "string" + } + }, + "type": "object" + }, "Route": { - "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving an instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, an instance gateway, or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped. (== resource_for beta.routes ==) (== resource_for v1.routes ==)", + "description": "Represents a Route resource.\n\nA route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for beta.routes ==) (== resource_for v1.routes ==)", "id": "Route", "properties": { "creationTimestamp": { @@ -32868,7 +38668,7 @@ "type": "string" }, "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", + "description": "An optional description of this resource. Provide this field when you create the resource.", "type": "string" }, "destRange": { @@ -32896,7 +38696,7 @@ "compute.routes.insert" ] }, - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -32910,7 +38710,11 @@ "type": "string" }, "nextHopGateway": { - "description": "The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/\u003cproject-id\u003e/global/gateways/default-internet-gateway", + "description": "The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway", + "type": "string" + }, + "nextHopIlb": { + "description": "The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule \n- regions/region/forwardingRules/forwardingRule", "type": "string" }, "nextHopInstance": { @@ -32939,7 +38743,7 @@ "compute.routes.insert" ] }, - "description": "The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.", + "description": "The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In cases where multiple routes have equal prefix length, the one with the lowest-numbered priority value wins. The default value is `1000`. The priority value must be from `0` to `65535`, inclusive.", "format": "uint32", "type": "integer" }, @@ -33159,7 +38963,7 @@ "type": "object" }, "Router": { - "description": "Router resource.", + "description": "Represents a Cloud Router resource.\n\nFor more information about Cloud Router, read the the Cloud Router overview.", "id": "Router", "properties": { "bgp": { @@ -33467,11 +39271,21 @@ "type": "string" }, "name": { - "description": "Name of this BGP peer. The name must be 1-63 characters long and comply with RFC1035.", + "annotations": { + "required": [ + "compute.routers.insert" + ] + }, + "description": "Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, "peerAsn": { + "annotations": { + "required": [ + "compute.routers.insert" + ] + }, "description": "Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.", "format": "uint32", "type": "integer" @@ -33511,7 +39325,12 @@ "type": "string" }, "name": { - "description": "Name of this interface entry. The name must be 1-63 characters long and comply with RFC1035.", + "annotations": { + "required": [ + "compute.routers.insert" + ] + }, + "description": "Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" } @@ -33634,6 +39453,13 @@ "description": "Represents a Nat resource. It enables the VMs within the specified subnetworks to access Internet without external IP addresses. It specifies a list of subnetworks (and the ranges within) that want to use NAT. Customers can also provide the external IPs that would be used for NAT. GCP would auto-allocate ephemeral IPs if no external IPs are provided.", "id": "RouterNat", "properties": { + "drainNatIps": { + "description": "A list of URLs of the IP resources to be drained. These IPs must be valid static external IPs that have been assigned to the NAT. These IPs should be used for updating/patching a NAT only.", + "items": { + "type": "string" + }, + "type": "array" + }, "icmpIdleTimeoutSec": { "description": "Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.", "format": "int32", @@ -33720,7 +39546,7 @@ "type": "boolean" }, "filter": { - "description": "Specifies the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT.", + "description": "Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values: \n- ERRORS_ONLY: Export logs only for connection failures. \n- TRANSLATIONS_ONLY: Export logs only for successful connections. \n- ALL: Export logs for all connections, successful and unsuccessful.", "enum": [ "ALL", "ERRORS_ONLY", @@ -33878,6 +39704,20 @@ }, "type": "array" }, + "drainAutoAllocatedNatIps": { + "description": "A list of IPs auto-allocated for NAT that are in drain mode. Example: [\"1.1.1.1\", \"179.12.26.133\"].", + "items": { + "type": "string" + }, + "type": "array" + }, + "drainUserAllocatedNatIps": { + "description": "A list of IPs user-allocated for NAT that are in drain mode. Example: [\"1.1.1.1\", \"179.12.26.133\"].", + "items": { + "type": "string" + }, + "type": "array" + }, "minExtraNatIpsNeeded": { "description": "The number of extra IPs to allocate. This will be greater than 0 only if user-specified IPs are NOT enough to allow all configured VMs to use NAT. This value is meaningful only when auto-allocation of NAT IPs is *not* used.", "format": "int32", @@ -34143,7 +39983,7 @@ "type": "object" }, "Scheduling": { - "description": "Sets the scheduling options for an Instance.", + "description": "Sets the scheduling options for an Instance. NextID: 9", "id": "Scheduling", "properties": { "automaticRestart": { @@ -34151,7 +39991,7 @@ "type": "boolean" }, "nodeAffinities": { - "description": "A set of node affinity and anti-affinity.", + "description": "A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information.", "items": { "$ref": "SchedulingNodeAffinity" }, @@ -34185,7 +40025,7 @@ "type": "string" }, "operator": { - "description": "Defines the operation of node selection.", + "description": "Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.", "enum": [ "IN", "NOT_IN", @@ -34209,7 +40049,7 @@ "type": "object" }, "SecurityPolicy": { - "description": "A security policy is comprised of one or more rules. It can also be associated with one or more 'targets'. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==)", + "description": "Represents a Cloud Armor Security Policy resource.\n\nOnly external backend services that use load balancers can reference a Security Policy. For more information, read Cloud Armor Security Policy Concepts. (== resource_for v1.securityPolicies ==) (== resource_for beta.securityPolicies ==)", "id": "SecurityPolicy", "properties": { "creationTimestamp": { @@ -34467,6 +40307,25 @@ }, "type": "object" }, + "ServerBinding": { + "id": "ServerBinding", + "properties": { + "type": { + "enum": [ + "RESTART_NODE_ON_ANY_SERVER", + "RESTART_NODE_ON_MINIMAL_SERVERS", + "SERVER_BINDING_TYPE_UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "ServiceAccount": { "description": "A service account.", "id": "ServiceAccount", @@ -34510,7 +40369,7 @@ "properties": { "encryptionKey": { "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Endorsement Key (EK) issued to the Shielded Instance's vTPM." + "description": "An Endorsement Key (EK) made by the RSA 2048 algorithm issued to the Shielded Instance's vTPM." }, "kind": { "default": "compute#shieldedInstanceIdentity", @@ -34519,7 +40378,7 @@ }, "signingKey": { "$ref": "ShieldedInstanceIdentityEntry", - "description": "An Attestation Key (AK) issued to the Shielded Instance's vTPM." + "description": "An Attestation Key (AK) made by the RSA 2048 algorithm issued to the Shielded Instance's vTPM." } }, "type": "object" @@ -34567,9 +40426,13 @@ "type": "object" }, "Snapshot": { - "description": "A persistent disk snapshot resource. (== resource_for beta.snapshots ==) (== resource_for v1.snapshots ==)", + "description": "Represents a Persistent Disk Snapshot resource.\n\nYou can use snapshots to back up data on a regular interval. For more information, read Creating persistent disk snapshots. (== resource_for beta.snapshots ==) (== resource_for v1.snapshots ==)", "id": "Snapshot", "properties": { + "autoCreated": { + "description": "[Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk.", + "type": "boolean" + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -34579,7 +40442,7 @@ "type": "string" }, "diskSizeGb": { - "description": "[Output Only] Size of the snapshot, specified in GB.", + "description": "[Output Only] Size of the source disk, specified in GB.", "format": "int64", "type": "string" }, @@ -34681,7 +40544,7 @@ "type": "string" }, "storageLocations": { - "description": "GCS bucket storage location of the snapshot (regional or multi-regional).", + "description": "Cloud Storage bucket storage location of the snapshot (regional or multi-regional).", "items": { "type": "string" }, @@ -34817,7 +40680,7 @@ "type": "object" }, "SslCertificate": { - "description": "An SslCertificate resource. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user. (== resource_for beta.sslCertificates ==) (== resource_for v1.sslCertificates ==)", + "description": "Represents an SSL Certificate resource.\n\nThis SSL certificate resource also contains a private key. You can use SSL keys and certificates to secure connections to a load balancer. For more information, read Creating and Using SSL Certificates. (== resource_for beta.sslCertificates ==) (== resource_for v1.sslCertificates ==)", "id": "SslCertificate", "properties": { "certificate": { @@ -34851,6 +40714,10 @@ "description": "A write-only private key in PEM format. Only insert requests will include this field.", "type": "string" }, + "region": { + "description": "[Output Only] URL of the region where the regional SSL Certificate resides. This field is not applicable to global SSL Certificate.", + "type": "string" + }, "selfLink": { "description": "[Output only] Server-defined URL for the resource.", "type": "string" @@ -34858,6 +40725,118 @@ }, "type": "object" }, + "SslCertificateAggregatedList": { + "id": "SslCertificateAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "SslCertificatesScopedList", + "description": "Name of the scope containing this set of SslCertificates." + }, + "description": "A list of SslCertificatesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#sslCertificateAggregatedList", + "description": "[Output Only] Type of resource. Always compute#sslCertificateAggregatedList for lists of SSL Certificates.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "SslCertificateList": { "description": "Contains a list of SslCertificate resources.", "id": "SslCertificateList", @@ -34970,6 +40949,100 @@ }, "type": "object" }, + "SslCertificatesScopedList": { + "id": "SslCertificatesScopedList", + "properties": { + "sslCertificates": { + "description": "List of SslCertificates contained in this scope.", + "items": { + "$ref": "SslCertificate" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of backend services when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "SslPoliciesList": { "id": "SslPoliciesList", "properties": { @@ -35094,7 +41167,7 @@ "type": "object" }, "SslPolicy": { - "description": "A SSL policy specifies the server-side support for SSL features. This can be attached to a TargetHttpsProxy or a TargetSslProxy. This affects connections between clients and the HTTPS or SSL proxy load balancer. They do not affect the connection between the load balancers and the backends.", + "description": "Represents a Cloud Armor Security Policy resource.\n\nOnly external backend services used by HTTP or HTTPS load balancers can reference a Security Policy. For more information, read read Cloud Armor Security Policy Concepts. (== resource_for beta.sslPolicies ==) (== resource_for v1.sslPolicies ==)", "id": "SslPolicy", "properties": { "creationTimestamp": { @@ -35271,7 +41344,7 @@ "type": "object" }, "Subnetwork": { - "description": "A Subnetwork resource. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==)", + "description": "Represents a Subnetwork resource.\n\nA subnetwork (also known as a subnet) is a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. For more information, read Virtual Private Cloud (VPC) Network. (== resource_for beta.subnetworks ==) (== resource_for v1.subnetworks ==)", "id": "Subnetwork", "properties": { "creationTimestamp": { @@ -35309,6 +41382,10 @@ "description": "[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.", "type": "string" }, + "logConfig": { + "$ref": "SubnetworkLogConfig", + "description": "This field denotes the VPC flow logging options for this subnetwork. If logging is enabled, logs are exported to Stackdriver." + }, "name": { "description": "The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -35322,10 +41399,36 @@ "description": "Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess.", "type": "boolean" }, + "purpose": { + "description": "The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918.", + "enum": [ + "INTERNAL_HTTPS_LOAD_BALANCER", + "PRIVATE", + "PRIVATE_RFC_1918" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "region": { "description": "URL of the region where the Subnetwork resides. This field can be set only at resource creation time.", "type": "string" }, + "role": { + "description": "The role of subnetwork. Currenly, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", + "enum": [ + "ACTIVE", + "BACKUP" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "secondaryIpRanges": { "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request.", "items": { @@ -35336,6 +41439,18 @@ "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" + }, + "state": { + "description": "[Output Only] The state of the subnetwork, which can be one of READY or DRAINING. A subnetwork that is READY is ready to be used. The state of DRAINING is only applicable to subnetworks that have the purpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to the load balancer are being drained. A subnetwork that is draining cannot be used or modified until it reaches a status of READY.", + "enum": [ + "DRAINING", + "READY" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" } }, "type": "object" @@ -35564,6 +41679,54 @@ }, "type": "object" }, + "SubnetworkLogConfig": { + "description": "The available logging options for this subnetwork.", + "id": "SubnetworkLogConfig", + "properties": { + "aggregationInterval": { + "description": "Can only be specified if VPC flow logging for this subnetwork is enabled. Toggles the aggregation interval for collecting flow logs. Increasing the interval time will reduce the amount of generated flow logs for long lasting connections. Default is an interval of 5 seconds per connection.", + "enum": [ + "INTERVAL_10_MIN", + "INTERVAL_15_MIN", + "INTERVAL_1_MIN", + "INTERVAL_30_SEC", + "INTERVAL_5_MIN", + "INTERVAL_5_SEC" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "enable": { + "description": "Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is to disable flow logging.", + "type": "boolean" + }, + "flowSampling": { + "description": "Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default is 0.5, which means half of all collected logs are reported.", + "format": "float", + "type": "number" + }, + "metadata": { + "description": "Can only be specified if VPC flow logs for this subnetwork is enabled. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default is INCLUDE_ALL_METADATA.", + "enum": [ + "EXCLUDE_ALL_METADATA", + "INCLUDE_ALL_METADATA" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "SubnetworkSecondaryRange": { "description": "Represents a secondary IP range of a subnetwork.", "id": "SubnetworkSecondaryRange", @@ -35760,8 +41923,102 @@ }, "type": "object" }, + "TargetHttpProxiesScopedList": { + "id": "TargetHttpProxiesScopedList", + "properties": { + "targetHttpProxies": { + "description": "A list of TargetHttpProxies contained in this scope.", + "items": { + "$ref": "TargetHttpProxy" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of backend services when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "TargetHttpProxy": { - "description": "A TargetHttpProxy resource. This resource defines an HTTP proxy. (== resource_for beta.targetHttpProxies ==) (== resource_for v1.targetHttpProxies ==)", + "description": "Represents a Target HTTP Proxy resource.\n\nA target HTTP proxy is a component of certain types of load balancers. Global forwarding rules reference a target HTTP proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies. (== resource_for beta.targetHttpProxies ==) (== resource_for v1.targetHttpProxies ==)", "id": "TargetHttpProxy", "properties": { "creationTimestamp": { @@ -35787,6 +42044,10 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "region": { + "description": "[Output Only] URL of the region where the regional Target HTTP Proxy resides. This field is not applicable to global Target HTTP Proxies.", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -35798,6 +42059,37 @@ }, "type": "object" }, + "TargetHttpProxyAggregatedList": { + "id": "TargetHttpProxyAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "TargetHttpProxiesScopedList", + "description": "Name of the scope containing this set of TargetHttpProxies." + }, + "description": "A list of TargetHttpProxiesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#targetHttpProxyAggregatedList", + "description": "[Output Only] Type of resource. Always compute#targetHttpProxyAggregatedList for lists of Target HTTP Proxies.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + } + }, + "type": "object" + }, "TargetHttpProxyList": { "description": "A list of TargetHttpProxy resources.", "id": "TargetHttpProxyList", @@ -35910,6 +42202,100 @@ }, "type": "object" }, + "TargetHttpsProxiesScopedList": { + "id": "TargetHttpsProxiesScopedList", + "properties": { + "targetHttpsProxies": { + "description": "A list of TargetHttpsProxies contained in this scope.", + "items": { + "$ref": "TargetHttpsProxy" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of backend services when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "TargetHttpsProxiesSetQuicOverrideRequest": { "id": "TargetHttpsProxiesSetQuicOverrideRequest", "properties": { @@ -35944,7 +42330,7 @@ "type": "object" }, "TargetHttpsProxy": { - "description": "A TargetHttpsProxy resource. This resource defines an HTTPS proxy. (== resource_for beta.targetHttpsProxies ==) (== resource_for v1.targetHttpsProxies ==)", + "description": "Represents a Target HTTPS Proxy resource.\n\nA target HTTPS proxy is a component of certain types of load balancers. Global forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies. (== resource_for beta.targetHttpsProxies ==) (== resource_for v1.targetHttpsProxies ==)", "id": "TargetHttpsProxy", "properties": { "creationTimestamp": { @@ -35971,7 +42357,7 @@ "type": "string" }, "quicOverride": { - "description": "Specifies the QUIC override policy for this TargetHttpsProxy resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. Specify ENABLE to always enable QUIC, Enables QUIC when set to ENABLE, and disables QUIC when set to DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE. Not specifying this field is equivalent to specifying NONE.", + "description": "Specifies the QUIC override policy for this TargetHttpsProxy resource. This setting determines whether the load balancer attempts to negotiate QUIC with clients. You can specify NONE, ENABLE, or DISABLE. \n- When quic-override is set to NONE, Google manages whether QUIC is used. \n- When quic-override is set to ENABLE, the load balancer uses QUIC when possible. \n- When quic-override is set to DISABLE, the load balancer doesn't use QUIC. \n- If the quic-override flag is not specified, NONE is implied.\n-", "enum": [ "DISABLE", "ENABLE", @@ -35984,6 +42370,10 @@ ], "type": "string" }, + "region": { + "description": "[Output Only] URL of the region where the regional TargetHttpsProxy resides. This field is not applicable to global TargetHttpsProxies.", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -35996,7 +42386,7 @@ "type": "array" }, "sslPolicy": { - "description": "URL of SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured.", + "description": "URL of SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource has no SSL policy configured.", "type": "string" }, "urlMap": { @@ -36006,6 +42396,118 @@ }, "type": "object" }, + "TargetHttpsProxyAggregatedList": { + "id": "TargetHttpsProxyAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "TargetHttpsProxiesScopedList", + "description": "Name of the scope containing this set of TargetHttpsProxies." + }, + "description": "A list of TargetHttpsProxiesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#targetHttpsProxyAggregatedList", + "description": "[Output Only] Type of resource. Always compute#targetHttpsProxyAggregatedList for lists of Target HTTP Proxies.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "TargetHttpsProxyList": { "description": "Contains a list of TargetHttpsProxy resources.", "id": "TargetHttpsProxyList", @@ -36119,7 +42621,7 @@ "type": "object" }, "TargetInstance": { - "description": "A TargetInstance resource. This resource defines an endpoint instance that terminates traffic of certain protocols. (== resource_for beta.targetInstances ==) (== resource_for v1.targetInstances ==)", + "description": "Represents a Target Instance resource.\n\nYou can use a target instance to handle traffic for one or more forwarding rules, which is ideal for forwarding protocol traffic that is managed by a single source. For example, ESP, AH, TCP, or UDP. For more information, read Target instances. (== resource_for beta.targetInstances ==) (== resource_for v1.targetInstances ==)", "id": "TargetInstance", "properties": { "creationTimestamp": { @@ -36489,7 +42991,7 @@ "type": "object" }, "TargetPool": { - "description": "A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool. (== resource_for beta.targetPools ==) (== resource_for v1.targetPools ==)", + "description": "Represents a Target Pool resource.\n\nTarget pools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool. For more information, read Using target pools. (== resource_for beta.targetPools ==) (== resource_for v1.targetPools ==)", "id": "TargetPool", "properties": { "backupPool": { @@ -36553,6 +43055,8 @@ "CLIENT_IP_PORT_PROTO", "CLIENT_IP_PROTO", "GENERATED_COOKIE", + "HEADER_FIELD", + "HTTP_COOKIE", "NONE" ], "enumDescriptions": [ @@ -36560,6 +43064,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -37005,7 +43511,7 @@ "type": "object" }, "TargetSslProxy": { - "description": "A TargetSslProxy resource. This resource defines an SSL proxy. (== resource_for beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==)", + "description": "Represents a Target SSL Proxy resource.\n\nA target SSL proxy is a component of a SSL Proxy load balancer. Global forwarding rules reference a target SSL proxy, and the target proxy then references an external backend service. For more information, read Using Target Proxies. (== resource_for beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==)", "id": "TargetSslProxy", "properties": { "creationTimestamp": { @@ -37206,7 +43712,7 @@ "type": "object" }, "TargetTcpProxy": { - "description": "A TargetTcpProxy resource. This resource defines a TCP proxy. (== resource_for beta.targetTcpProxies ==) (== resource_for v1.targetTcpProxies ==)", + "description": "Represents a Target TCP Proxy resource.\n\nA target TCP proxy is a component of a TCP Proxy load balancer. Global forwarding rules reference target TCP proxy, and the target proxy then references an external backend service. For more information, read TCP Proxy Load Balancing Concepts. (== resource_for beta.targetTcpProxies ==) (== resource_for v1.targetTcpProxies ==)", "id": "TargetTcpProxy", "properties": { "creationTimestamp": { @@ -37368,7 +43874,7 @@ "type": "object" }, "TargetVpnGateway": { - "description": "Represents a Target VPN gateway resource. (== resource_for beta.targetVpnGateways ==) (== resource_for v1.targetVpnGateways ==)", + "description": "Represents a Target VPN Gateway resource.\n\nThe target VPN gateway resource represents a Classic Cloud VPN gateway. For more information, read the the Cloud VPN Overview. (== resource_for beta.targetVpnGateways ==) (== resource_for v1.targetVpnGateways ==)", "id": "TargetVpnGateway", "properties": { "creationTimestamp": { @@ -37812,17 +44318,25 @@ "type": "object" }, "UrlMap": { - "description": "A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the \"longest-match\" of the URL's host and path.", + "description": "Represents a URL Map resource.\n\nA URL map resource is a component of certain types of load balancers. This resource defines mappings from host names and URL paths to either a backend service or a backend bucket.\n\nTo use this resource, the backend service must have a loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED For more information, read URL Map Concepts.", "id": "UrlMap", "properties": { "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" }, + "defaultRouteAction": { + "$ref": "HttpRouteAction", + "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.\nOnly one of defaultRouteAction or defaultUrlRedirect must be set." + }, "defaultService": { "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.\nOnly one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.", "type": "string" }, + "defaultUrlRedirect": { + "$ref": "HttpRedirectAction", + "description": "When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect.\nIf defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set." + }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" @@ -37832,6 +44346,10 @@ "format": "byte", "type": "string" }, + "headerAction": { + "$ref": "HttpHeaderAction", + "description": "Specifies changes to request and response headers that need to take effect for the selected backendService.\nThe headerAction specified here take effect after headerAction specified under pathMatcher." + }, "hostRules": { "description": "The list of HostRules to use against the URL.", "items": { @@ -37861,6 +44379,10 @@ }, "type": "array" }, + "region": { + "description": "[Output Only] URL of the region where the regional URL map resides. This field is not applicable to global URL maps. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -38046,6 +44568,212 @@ }, "type": "object" }, + "UrlMapsAggregatedList": { + "id": "UrlMapsAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "UrlMapsScopedList", + "description": "Name of the scope containing this set of UrlMaps." + }, + "description": "A list of UrlMapsScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#urlMapsAggregatedList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "UrlMapsScopedList": { + "id": "UrlMapsScopedList", + "properties": { + "urlMaps": { + "description": "A list of UrlMaps contained in this scope.", + "items": { + "$ref": "UrlMap" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of backend services when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "UrlMapsValidateRequest": { "id": "UrlMapsValidateRequest", "properties": { @@ -38065,6 +44793,21 @@ }, "type": "object" }, + "UrlRewrite": { + "description": "The spec for modifying the path before sending the request to the matched backend service.", + "id": "UrlRewrite", + "properties": { + "hostRewrite": { + "description": "Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite.\nThe value must be between 1 and 255 characters.", + "type": "string" + }, + "pathPrefixRewrite": { + "description": "Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite.\nThe value must be between 1 and 1024 characters.", + "type": "string" + } + }, + "type": "object" + }, "UsableSubnetwork": { "description": "Subnetwork which the current user has compute.subnetworks.use permission on.", "id": "UsableSubnetwork", @@ -38253,6 +44996,13 @@ "description": "Contain information of Nat mapping for an interface of this endpoint.", "id": "VmEndpointNatMappingsInterfaceNatMappings", "properties": { + "drainNatIpPortRanges": { + "description": "List of all drain IP:port-range mappings assigned to this interface. These ranges are inclusive, that is, both the first and the last ports can be used for NAT. Example: [\"2.2.2.2:12345-12355\", \"1.1.1.1:2234-2234\"].", + "items": { + "type": "string" + }, + "type": "array" + }, "natIpPortRanges": { "description": "A list of all IP:port-range mappings assigned to this interface. These ranges are inclusive, that is, both the first and the last ports can be used for NAT. Example: [\"2.2.2.2:12345-12355\", \"1.1.1.1:2234-2234\"].", "items": { @@ -38260,6 +45010,11 @@ }, "type": "array" }, + "numTotalDrainNatPorts": { + "description": "Total number of drain ports across all NAT IPs allocated to this interface. It equals to the aggregated port number in the field drain_nat_ip_port_ranges.", + "format": "int32", + "type": "integer" + }, "numTotalNatPorts": { "description": "Total number of ports across all NAT IPs allocated to this interface. It equals to the aggregated port number in the field nat_ip_port_ranges.", "format": "int32", @@ -38388,8 +45143,511 @@ }, "type": "object" }, + "VpnGateway": { + "description": "Represents a VPN gateway resource.", + "id": "VpnGateway", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#vpnGateway", + "description": "[Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.", + "type": "string" + }, + "labelFingerprint": { + "description": "A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve an VpnGateway.", + "format": "byte", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels to apply to this VpnGateway resource. These can be later modified by the setLabels method. Each label key/value must comply with RFC1035. Label values may be empty.", + "type": "object" + }, + "name": { + "annotations": { + "required": [ + "compute.vpnGateways.insert" + ] + }, + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "network": { + "annotations": { + "required": [ + "compute.vpnGateways.insert" + ] + }, + "description": "URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.", + "type": "string" + }, + "region": { + "description": "[Output Only] URL of the region where the VPN gateway resides.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "vpnInterfaces": { + "description": "[Output Only] A list of interfaces on this VPN gateway.", + "items": { + "$ref": "VpnGatewayVpnGatewayInterface" + }, + "type": "array" + } + }, + "type": "object" + }, + "VpnGatewayAggregatedList": { + "id": "VpnGatewayAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "VpnGatewaysScopedList", + "description": "[Output Only] Name of the scope containing this set of VPN gateways." + }, + "description": "A list of VpnGateway resources.", + "type": "object" + }, + "kind": { + "default": "compute#vpnGatewayAggregatedList", + "description": "[Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "VpnGatewayList": { + "description": "Contains a list of VpnGateway resources.", + "id": "VpnGatewayList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of VpnGateway resources.", + "items": { + "$ref": "VpnGateway" + }, + "type": "array" + }, + "kind": { + "default": "compute#vpnGatewayList", + "description": "[Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "VpnGatewayStatus": { + "id": "VpnGatewayStatus", + "properties": { + "vpnConnections": { + "description": "List of VPN connection for this VpnGateway.", + "items": { + "$ref": "VpnGatewayStatusVpnConnection" + }, + "type": "array" + } + }, + "type": "object" + }, + "VpnGatewayStatusHighAvailabilityRequirementState": { + "description": "Describes the high availability requirement state for the VPN connection between this Cloud VPN gateway and a peer gateway.", + "id": "VpnGatewayStatusHighAvailabilityRequirementState", + "properties": { + "state": { + "description": "Indicates the high availability requirement state for the VPN connection. Valid values are CONNECTION_REDUNDANCY_MET, CONNECTION_REDUNDANCY_NOT_MET.", + "enum": [ + "CONNECTION_REDUNDANCY_MET", + "CONNECTION_REDUNDANCY_NOT_MET" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "unsatisfiedReason": { + "description": "Indicates the reason why the VPN connection does not meet the high availability redundancy criteria/requirement. Valid values is INCOMPLETE_TUNNELS_COVERAGE.", + "enum": [ + "INCOMPLETE_TUNNELS_COVERAGE" + ], + "enumDescriptions": [ + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "VpnGatewayStatusTunnel": { + "description": "Contains some information about a VPN tunnel.", + "id": "VpnGatewayStatusTunnel", + "properties": { + "localGatewayInterface": { + "description": "The VPN gateway interface this VPN tunnel is associated with.", + "format": "uint32", + "type": "integer" + }, + "peerGatewayInterface": { + "description": "The peer gateway interface this VPN tunnel is connected to, the peer gateway could either be an external VPN gateway or GCP VPN gateway.", + "format": "uint32", + "type": "integer" + }, + "tunnelUrl": { + "description": "URL reference to the VPN tunnel.", + "type": "string" + } + }, + "type": "object" + }, + "VpnGatewayStatusVpnConnection": { + "description": "A VPN connection contains all VPN tunnels connected from this VpnGateway to the same peer gateway. The peer gateway could either be a external VPN gateway or GCP VPN gateway.", + "id": "VpnGatewayStatusVpnConnection", + "properties": { + "peerExternalGateway": { + "description": "URL reference to the peer external VPN gateways to which the VPN tunnels in this VPN connection are connected. This field is mutually exclusive with peer_gcp_gateway.", + "type": "string" + }, + "peerGcpGateway": { + "description": "URL reference to the peer side VPN gateways to which the VPN tunnels in this VPN connection are connected. This field is mutually exclusive with peer_gcp_gateway.", + "type": "string" + }, + "state": { + "$ref": "VpnGatewayStatusHighAvailabilityRequirementState", + "description": "HighAvailabilityRequirementState for the VPN connection." + }, + "tunnels": { + "description": "List of VPN tunnels that are in this VPN connection.", + "items": { + "$ref": "VpnGatewayStatusTunnel" + }, + "type": "array" + } + }, + "type": "object" + }, + "VpnGatewayVpnGatewayInterface": { + "description": "A VPN gateway interface.", + "id": "VpnGatewayVpnGatewayInterface", + "properties": { + "id": { + "description": "The numeric ID of this VPN gateway interface.", + "format": "uint32", + "type": "integer" + }, + "ipAddress": { + "description": "The external IP address for this VPN gateway interface.", + "type": "string" + } + }, + "type": "object" + }, + "VpnGatewaysGetStatusResponse": { + "id": "VpnGatewaysGetStatusResponse", + "properties": { + "result": { + "$ref": "VpnGatewayStatus" + } + }, + "type": "object" + }, + "VpnGatewaysScopedList": { + "id": "VpnGatewaysScopedList", + "properties": { + "vpnGateways": { + "description": "[Output Only] A list of VPN gateways contained in this scope.", + "items": { + "$ref": "VpnGateway" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning which replaces the list of addresses when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "VpnTunnel": { - "description": "VPN tunnel resource. (== resource_for beta.vpnTunnels ==) (== resource_for v1.vpnTunnels ==)", + "description": "Represents a Cloud VPN Tunnel resource.\n\nFor more information about VPN, read the the Cloud VPN Overview. (== resource_for beta.vpnTunnels ==) (== resource_for v1.vpnTunnels ==)", "id": "VpnTunnel", "properties": { "creationTimestamp": { @@ -38436,6 +45694,19 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "peerExternalGateway": { + "description": "URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.", + "type": "string" + }, + "peerExternalGatewayInterface": { + "description": "The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created.", + "format": "int32", + "type": "integer" + }, + "peerGcpGateway": { + "description": "URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.", + "type": "string" + }, "peerIp": { "description": "IP address of the peer VPN gateway. Only IPv4 is supported.", "type": "string" @@ -38468,7 +45739,7 @@ "type": "string" }, "status": { - "description": "[Output Only] The status of the VPN tunnel, which can be one of the following: \n- PROVISIONING: Resource is being allocated for the VPN tunnel. \n- WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. \n- FIRST_HANDSHAKE: Successful first handshake with the peer VPN. \n- ESTABLISHED: Secure session is successfully established with the peer VPN. \n- NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS \n- AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). \n- NEGOTIATION_FAILURE: Handshake failed. \n- DEPROVISIONING: Resources are being deallocated for the VPN tunnel. \n- FAILED: Tunnel creation has failed and the tunnel is not ready to be used.", + "description": "[Output Only] The status of the VPN tunnel, which can be one of the following: \n- PROVISIONING: Resource is being allocated for the VPN tunnel. \n- WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. \n- FIRST_HANDSHAKE: Successful first handshake with the peer VPN. \n- ESTABLISHED: Secure session is successfully established with the peer VPN. \n- NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS \n- AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). \n- NEGOTIATION_FAILURE: Handshake failed. \n- DEPROVISIONING: Resources are being deallocated for the VPN tunnel. \n- FAILED: Tunnel creation has failed and the tunnel is not ready to be used. \n- NO_INCOMING_PACKETS: No incoming packets from peer. \n- REJECTED: Tunnel configuration was rejected, can be result of being blacklisted. \n- ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. \n- STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. \n- PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. \n- TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.", "enum": [ "ALLOCATING_RESOURCES", "AUTHORIZATION_ERROR", @@ -38481,6 +45752,7 @@ "NO_INCOMING_PACKETS", "PROVISIONING", "REJECTED", + "STOPPED", "WAITING_FOR_FULL_CONFIG" ], "enumDescriptions": [ @@ -38495,6 +45767,7 @@ "", "", "", + "", "" ], "type": "string" @@ -38502,6 +45775,15 @@ "targetVpnGateway": { "description": "URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.", "type": "string" + }, + "vpnGateway": { + "description": "URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.", + "type": "string" + }, + "vpnGatewayInterface": { + "description": "The interface ID of the VPN gateway with which this VPN tunnel is associated.", + "format": "int32", + "type": "integer" } }, "type": "object" @@ -38824,6 +46106,26 @@ }, "type": "object" }, + "WeightedBackendService": { + "description": "In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to, WeightedBackendService allows traffic to be split across multiple BackendServices. The volume of traffic for each BackendService is proportional to the weight specified in each WeightedBackendService", + "id": "WeightedBackendService", + "properties": { + "backendService": { + "description": "The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight.", + "type": "string" + }, + "headerAction": { + "$ref": "HttpHeaderAction", + "description": "Specifies changes to request and response headers that need to take effect for the selected backendService.\nheaderAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap." + }, + "weight": { + "description": "Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) .\nThe selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy.\nThe value must be between 0 and 1000", + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, "XpnHostList": { "id": "XpnHostList", "properties": { @@ -38959,7 +46261,7 @@ "type": "object" }, "Zone": { - "description": "A Zone resource. (== resource_for beta.zones ==) (== resource_for v1.zones ==) Next ID: 17", + "description": "Represents a Zone resource.\n\nA zone is a deployment area. These deployment areas are subsets of a region. For example the zone us-east1-a is located in the us-east1 region. For more information, read Regions and Zones. (== resource_for beta.zones ==) (== resource_for v1.zones ==)", "id": "Zone", "properties": { "availableCpuPlatforms": { diff --git a/vendor/google.golang.org/api/compute/v1/compute-gen.go b/vendor/google.golang.org/api/compute/v1/compute-gen.go index 2c40ec89055..a02903b5392 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v1/compute-gen.go @@ -53,8 +53,8 @@ import ( "strconv" "strings" - gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + gensupport "google.golang.org/api/internal/gensupport" option "google.golang.org/api/option" htransport "google.golang.org/api/transport/http" ) @@ -76,7 +76,7 @@ var _ = context.Canceled const apiId = "compute:v1" const apiName = "compute" const apiVersion = "v1" -const basePath = "https://www.googleapis.com/compute/v1/projects/" +const basePath = "https://compute.googleapis.com/compute/v1/projects/" // OAuth2 scopes used by this API. const ( @@ -142,6 +142,7 @@ func New(client *http.Client) (*Service, error) { s.BackendServices = NewBackendServicesService(s) s.DiskTypes = NewDiskTypesService(s) s.Disks = NewDisksService(s) + s.ExternalVpnGateways = NewExternalVpnGatewaysService(s) s.Firewalls = NewFirewallsService(s) s.ForwardingRules = NewForwardingRulesService(s) s.GlobalAddresses = NewGlobalAddressesService(s) @@ -172,10 +173,17 @@ func New(client *http.Client) (*Service, error) { s.RegionCommitments = NewRegionCommitmentsService(s) s.RegionDiskTypes = NewRegionDiskTypesService(s) s.RegionDisks = NewRegionDisksService(s) + s.RegionHealthChecks = NewRegionHealthChecksService(s) s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s) s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) s.RegionOperations = NewRegionOperationsService(s) + s.RegionSslCertificates = NewRegionSslCertificatesService(s) + s.RegionTargetHttpProxies = NewRegionTargetHttpProxiesService(s) + s.RegionTargetHttpsProxies = NewRegionTargetHttpsProxiesService(s) + s.RegionUrlMaps = NewRegionUrlMapsService(s) s.Regions = NewRegionsService(s) + s.Reservations = NewReservationsService(s) + s.ResourcePolicies = NewResourcePoliciesService(s) s.Routers = NewRoutersService(s) s.Routes = NewRoutesService(s) s.SecurityPolicies = NewSecurityPoliciesService(s) @@ -191,6 +199,7 @@ func New(client *http.Client) (*Service, error) { s.TargetTcpProxies = NewTargetTcpProxiesService(s) s.TargetVpnGateways = NewTargetVpnGatewaysService(s) s.UrlMaps = NewUrlMapsService(s) + s.VpnGateways = NewVpnGatewaysService(s) s.VpnTunnels = NewVpnTunnelsService(s) s.ZoneOperations = NewZoneOperationsService(s) s.Zones = NewZonesService(s) @@ -216,6 +225,8 @@ type Service struct { Disks *DisksService + ExternalVpnGateways *ExternalVpnGatewaysService + Firewalls *FirewallsService ForwardingRules *ForwardingRulesService @@ -276,14 +287,28 @@ type Service struct { RegionDisks *RegionDisksService + RegionHealthChecks *RegionHealthChecksService + RegionInstanceGroupManagers *RegionInstanceGroupManagersService RegionInstanceGroups *RegionInstanceGroupsService RegionOperations *RegionOperationsService + RegionSslCertificates *RegionSslCertificatesService + + RegionTargetHttpProxies *RegionTargetHttpProxiesService + + RegionTargetHttpsProxies *RegionTargetHttpsProxiesService + + RegionUrlMaps *RegionUrlMapsService + Regions *RegionsService + Reservations *ReservationsService + + ResourcePolicies *ResourcePoliciesService + Routers *RoutersService Routes *RoutesService @@ -314,6 +339,8 @@ type Service struct { UrlMaps *UrlMapsService + VpnGateways *VpnGatewaysService + VpnTunnels *VpnTunnelsService ZoneOperations *ZoneOperationsService @@ -391,6 +418,15 @@ type DisksService struct { s *Service } +func NewExternalVpnGatewaysService(s *Service) *ExternalVpnGatewaysService { + rs := &ExternalVpnGatewaysService{s: s} + return rs +} + +type ExternalVpnGatewaysService struct { + s *Service +} + func NewFirewallsService(s *Service) *FirewallsService { rs := &FirewallsService{s: s} return rs @@ -661,6 +697,15 @@ type RegionDisksService struct { s *Service } +func NewRegionHealthChecksService(s *Service) *RegionHealthChecksService { + rs := &RegionHealthChecksService{s: s} + return rs +} + +type RegionHealthChecksService struct { + s *Service +} + func NewRegionInstanceGroupManagersService(s *Service) *RegionInstanceGroupManagersService { rs := &RegionInstanceGroupManagersService{s: s} return rs @@ -688,6 +733,42 @@ type RegionOperationsService struct { s *Service } +func NewRegionSslCertificatesService(s *Service) *RegionSslCertificatesService { + rs := &RegionSslCertificatesService{s: s} + return rs +} + +type RegionSslCertificatesService struct { + s *Service +} + +func NewRegionTargetHttpProxiesService(s *Service) *RegionTargetHttpProxiesService { + rs := &RegionTargetHttpProxiesService{s: s} + return rs +} + +type RegionTargetHttpProxiesService struct { + s *Service +} + +func NewRegionTargetHttpsProxiesService(s *Service) *RegionTargetHttpsProxiesService { + rs := &RegionTargetHttpsProxiesService{s: s} + return rs +} + +type RegionTargetHttpsProxiesService struct { + s *Service +} + +func NewRegionUrlMapsService(s *Service) *RegionUrlMapsService { + rs := &RegionUrlMapsService{s: s} + return rs +} + +type RegionUrlMapsService struct { + s *Service +} + func NewRegionsService(s *Service) *RegionsService { rs := &RegionsService{s: s} return rs @@ -697,6 +778,24 @@ type RegionsService struct { s *Service } +func NewReservationsService(s *Service) *ReservationsService { + rs := &ReservationsService{s: s} + return rs +} + +type ReservationsService struct { + s *Service +} + +func NewResourcePoliciesService(s *Service) *ResourcePoliciesService { + rs := &ResourcePoliciesService{s: s} + return rs +} + +type ResourcePoliciesService struct { + s *Service +} + func NewRoutersService(s *Service) *RoutersService { rs := &RoutersService{s: s} return rs @@ -832,6 +931,15 @@ type UrlMapsService struct { s *Service } +func NewVpnGatewaysService(s *Service) *VpnGatewaysService { + rs := &VpnGatewaysService{s: s} + return rs +} + +type VpnGatewaysService struct { + s *Service +} + func NewVpnTunnelsService(s *Service) *VpnTunnelsService { rs := &VpnTunnelsService{s: s} return rs @@ -898,7 +1006,12 @@ func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AcceleratorType: An Accelerator Type resource. (== resource_for +// AcceleratorType: Represents an Accelerator Type resource. +// +// Google Cloud Platform provides graphics processing units +// (accelerators) that you can add to VM instances to improve or +// accelerate performance when working with intensive workloads. For +// more information, read GPUs on Compute Engine. (== resource_for // beta.acceleratorTypes ==) (== resource_for v1.acceleratorTypes ==) type AcceleratorType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -1421,8 +1534,8 @@ type AccessConfig struct { Kind string `json:"kind,omitempty"` // Name: The name of this access configuration. The default and - // recommended name is External NAT but you can use any arbitrary string - // you would like. For example, My external IP or Network Access. + // recommended name is External NAT, but you can use any arbitrary + // string, such as My external IP or Network Access. Name string `json:"name,omitempty"` // NatIP: An external IP address associated with this instance. Specify @@ -1449,10 +1562,10 @@ type AccessConfig struct { NetworkTier string `json:"networkTier,omitempty"` // PublicPtrDomainName: The DNS domain name for the public PTR record. - // This field can only be set when the set_public_ptr field is enabled. + // You can set this field only if the `setPublicPtr` field is enabled. PublicPtrDomainName string `json:"publicPtrDomainName,omitempty"` - // SetPublicPtr: Specifies whether a public DNS ?PTR? record should be + // SetPublicPtr: Specifies whether a public DNS 'PTR' record should be // created to map the external IP address of the instance to a DNS // domain name. SetPublicPtr bool `json:"setPublicPtr,omitempty"` @@ -1487,9 +1600,25 @@ func (s *AccessConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Address: A reserved address resource. (== resource_for beta.addresses -// ==) (== resource_for v1.addresses ==) (== resource_for -// beta.globalAddresses ==) (== resource_for v1.globalAddresses ==) +// Address: Represents an IP Address resource. +// +// An address resource represents a regional internal IP address. +// Regional internal IP addresses are RFC 1918 addresses that come from +// either a primary or secondary IP range of a subnet in a VPC network. +// Regional external IP addresses can be assigned to GCP VM instances, +// Cloud VPN gateways, regional external forwarding rules for network +// load balancers (in either Standard or Premium Tier), and regional +// external forwarding rules for HTTP(S), SSL Proxy, and TCP Proxy load +// balancers in Standard Tier. For more information, read IP +// addresses. +// +// A globalAddresses resource represent a global external IP address. +// Global external IP addresses are IPv4 or IPv6 addresses. They can +// only be assigned to global forwarding rules for HTTP(S), SSL Proxy, +// or TCP Proxy load balancers in Premium Tier. For more information, +// read Global resources. (== resource_for beta.addresses ==) (== +// resource_for v1.addresses ==) (== resource_for beta.globalAddresses +// ==) (== resource_for v1.globalAddresses ==) type Address struct { // Address: The static IP address represented by this resource. Address string `json:"address,omitempty"` @@ -1508,14 +1637,14 @@ type Address struct { CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional description of this resource. Provide this - // property when you create the resource. + // field when you create the resource. Description string `json:"description,omitempty"` // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // IpVersion: The IP Version that will be used by this address. Valid + // IpVersion: The IP version that will be used by this address. Valid // options are IPV4 or IPV6. This can only be specified for a global // address. // @@ -1532,23 +1661,24 @@ type Address struct { // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. Name string `json:"name,omitempty"` // Network: The URL of the network in which to reserve the address. This - // field can only be used with INTERNAL type with VPC_PEERING purpose. + // field can only be used with INTERNAL type with the VPC_PEERING + // purpose. Network string `json:"network,omitempty"` // NetworkTier: This signifies the networking tier used for configuring - // this Address and can only take the following values: PREMIUM, + // this address and can only take the following values: PREMIUM or // STANDARD. Global forwarding rules can only be Premium Tier. Regional // forwarding rules can be either Premium or Standard Tier. Standard // Tier addresses applied to regional forwarding rules can be used with // any external load balancer. Regional forwarding rules in Premium Tier - // can only be used with a Network load balancer. + // can only be used with a network load balancer. // // If this field is not specified, it is assumed to be PREMIUM. // @@ -1561,7 +1691,15 @@ type Address struct { // range. PrefixLength int64 `json:"prefixLength,omitempty"` - // Purpose: The purpose of resource, only used with INTERNAL type. + // Purpose: The purpose of this resource, which can be one of the + // following values: + // - `GCE_ENDPOINT` for addresses that are used by VM instances, alias + // IP ranges, internal load balancers, and similar resources. + // - `DNS_RESOLVER` for a DNS resolver address in a subnetwork + // - `VPC_PEERING` for addresses that are reserved for VPC peer + // networks. + // - `NAT_AUTO` for addresses that are external IP addresses + // automatically reserved for Cloud NAT. // // Possible values: // "DNS_RESOLVER" @@ -1570,10 +1708,9 @@ type Address struct { // "VPC_PEERING" Purpose string `json:"purpose,omitempty"` - // Region: [Output Only] URL of the region where the regional address - // resides. This field is not applicable to global addresses. You must - // specify this field as part of the HTTP request URL. You cannot set - // this field in the request body. + // Region: [Output Only] The URL of the region where the regional + // address resides. This field is not applicable to global addresses. + // You must specify this field as part of the HTTP request URL. Region string `json:"region,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -1594,7 +1731,7 @@ type Address struct { // Subnetwork: The URL of the subnetwork in which to reserve the // address. If an IP address is specified, it must be within the // subnetwork's IP range. This field can only be used with INTERNAL type - // with GCE_ENDPOINT/DNS_RESOLVER purposes. + // with a GCE_ENDPOINT or DNS_RESOLVER purpose. Subnetwork string `json:"subnetwork,omitempty"` // Users: [Output Only] The URLs of the resources that are using this @@ -2074,17 +2211,17 @@ func (s *AddressesScopedListWarningData) MarshalJSON() ([]byte, error) { // AliasIpRange: An alias IP range attached to an instance's network // interface. type AliasIpRange struct { - // IpCidrRange: The IP CIDR range represented by this alias IP range. - // This IP CIDR range must belong to the specified subnetwork and cannot + // IpCidrRange: The IP alias ranges to allocate for this interface. This + // IP CIDR range must belong to the specified subnetwork and cannot // contain IP addresses reserved by system or used by other network - // interfaces. This range may be a single IP address (e.g. 10.2.3.4), a - // netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). + // interfaces. This range may be a single IP address (such as 10.2.3.4), + // a netmask (such as /24) or a CIDR-formatted string (such as + // 10.1.2.0/24). IpCidrRange string `json:"ipCidrRange,omitempty"` - // SubnetworkRangeName: Optional subnetwork secondary range name - // specifying the secondary range from which to allocate the IP CIDR - // range for this alias IP range. If left unspecified, the primary range - // of the subnetwork will be used. + // SubnetworkRangeName: The name of a subnetwork secondary IP range from + // which to allocate an IP alias range. If not specified, the primary + // range of the subnetwork is used. SubnetworkRangeName string `json:"subnetworkRangeName,omitempty"` // ForceSendFields is a list of field names (e.g. "IpCidrRange") to @@ -2110,6 +2247,121 @@ func (s *AliasIpRange) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk struct { + // DiskSizeGb: Specifies the size of the disk in base-2 GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` + + // Interface: Specifies the disk interface to use for attaching this + // disk, which is either SCSI or NVME. The default is SCSI. For + // performance characteristics of SCSI over NVMe, see Local SSD + // performance. + // + // Possible values: + // "NVME" + // "SCSI" + Interface string `json:"interface,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskSizeGb") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk) MarshalJSON() ([]byte, error) { + type NoMethod AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AllocationSpecificSKUAllocationReservedInstanceProperties: Properties +// of the SKU instances being reserved. +type AllocationSpecificSKUAllocationReservedInstanceProperties struct { + // GuestAccelerators: Specifies accelerator type and count. + GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` + + // LocalSsds: Specifies amount of local ssd to reserve with each + // instance. The type of disk is local-ssd. + LocalSsds []*AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk `json:"localSsds,omitempty"` + + // MachineType: Specifies type of machine (name only) which has fixed + // number of vCPUs and fixed amount of memory. This also includes + // specifying custom machine type following + // custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. + MachineType string `json:"machineType,omitempty"` + + // MinCpuPlatform: Minimum cpu platform the reservation. + MinCpuPlatform string `json:"minCpuPlatform,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GuestAccelerators") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GuestAccelerators") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AllocationSpecificSKUAllocationReservedInstanceProperties) MarshalJSON() ([]byte, error) { + type NoMethod AllocationSpecificSKUAllocationReservedInstanceProperties + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AllocationSpecificSKUReservation: This reservation type allows to pre +// allocate specific instance configuration. +type AllocationSpecificSKUReservation struct { + // Count: Specifies the number of resources that are allocated. + Count int64 `json:"count,omitempty,string"` + + // InUseCount: [Output Only] Indicates how many instances are in use. + InUseCount int64 `json:"inUseCount,omitempty,string"` + + // InstanceProperties: The instance properties for the reservation. + InstanceProperties *AllocationSpecificSKUAllocationReservedInstanceProperties `json:"instanceProperties,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Count") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AllocationSpecificSKUReservation) MarshalJSON() ([]byte, error) { + type NoMethod AllocationSpecificSKUReservation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AttachedDisk: An instance-attached disk resource. type AttachedDisk struct { // AutoDelete: Specifies whether the disk will be auto-deleted when the @@ -2180,7 +2432,8 @@ type AttachedDisk struct { // disks must always use SCSI and the request will fail if you attempt // to attach a persistent disk in any other format than SCSI. Local SSDs // can use either NVME or SCSI. For performance characteristics of SCSI - // over NVMe, see Local SSD performance. + // over NVMe, see Local SSD performance. TODO(b/131765817): Update + // documentation when NVME is supported. // // Possible values: // "NVME" @@ -2205,8 +2458,8 @@ type AttachedDisk struct { // Source: Specifies a valid partial or full URL to an existing // Persistent Disk resource. When creating a new instance, one of - // initializeParams.sourceImage or disks.source is required except for - // local SSD. + // initializeParams.sourceImage or initializeParams.sourceSnapshot or + // disks.source is required except for local SSD. // // If desired, you can also attach existing non-root persistent disks // using this property. This field is only applicable for persistent @@ -2265,7 +2518,9 @@ type AttachedDiskInitializeParams struct { // automatically generated. DiskName string `json:"diskName,omitempty"` - // DiskSizeGb: Specifies the size of the disk in base-2 GB. + // DiskSizeGb: Specifies the size of the disk in base-2 GB. If not + // specified, the disk will be the same size as the image (usually + // 10GB). If specified, the size must be equal to or larger than 10GB. DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` // DiskType: Specifies the disk type to use to create the instance. If @@ -2291,9 +2546,15 @@ type AttachedDiskInitializeParams struct { // persistent disks. Labels map[string]string `json:"labels,omitempty"` + // ResourcePolicies: Resource policies applied to this disk for + // automatic snapshot creations. Specified using the full or partial + // URL. For instance template, specify only the resource policy name. + ResourcePolicies []string `json:"resourcePolicies,omitempty"` + // SourceImage: The source image to create this disk. When creating a - // new instance, one of initializeParams.sourceImage or disks.source is - // required except for local SSD. + // new instance, one of initializeParams.sourceImage or + // initializeParams.sourceSnapshot or disks.source is required except + // for local SSD. // // To create a disk with one of the public operating system images, // specify the image by its family name. For example, specify @@ -2336,7 +2597,8 @@ type AttachedDiskInitializeParams struct { // SourceSnapshot: The source snapshot to create this disk. When // creating a new instance, one of initializeParams.sourceSnapshot or - // disks.source is required except for local SSD. + // initializeParams.sourceImage or disks.source is required except for + // local SSD. // // To create a disk with a snapshot that you created, specify the // snapshot name in the following @@ -2388,15 +2650,15 @@ func (s *AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) { // // { "audit_configs": [ { "service": "allServices" "audit_log_configs": // [ { "log_type": "DATA_READ", "exempted_members": [ -// "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { +// "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { // "log_type": "ADMIN_READ", } ] }, { "service": -// "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": +// "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": // "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ -// "user:bar@gmail.com" ] } ] } ] } +// "user:aliya@example.com" ] } ] } ] } // -// For fooservice, this policy enables DATA_READ, DATA_WRITE and -// ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ -// logging, and bar@gmail.com from DATA_WRITE logging. +// For sampleservice, this policy enables DATA_READ, DATA_WRITE and +// ADMIN_READ logging. It also exempts jose@example.com from DATA_READ +// logging, and aliya@example.com from DATA_WRITE logging. type AuditConfig struct { // AuditLogConfigs: The configuration for logging of each type of // permission. @@ -2437,17 +2699,19 @@ func (s *AuditConfig) MarshalJSON() ([]byte, error) { // permissions. Example: // // { "audit_log_configs": [ { "log_type": "DATA_READ", -// "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": +// "exempted_members": [ "user:jose@example.com" ] }, { "log_type": // "DATA_WRITE", } ] } // // This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting -// foo@gmail.com from DATA_READ logging. +// jose@example.com from DATA_READ logging. type AuditLogConfig struct { // ExemptedMembers: Specifies the identities that do not cause logging // for this type of permission. Follows the same format of // [Binding.members][]. ExemptedMembers []string `json:"exemptedMembers,omitempty"` + IgnoreChildExemptions bool `json:"ignoreChildExemptions,omitempty"` + // LogType: The log type that this config enables. // // Possible values: @@ -2518,13 +2782,21 @@ func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Autoscaler: Represents an Autoscaler resource. Autoscalers allow you -// to automatically scale virtual machine instances in managed instance -// groups according to an autoscaling policy that you define. For more -// information, read Autoscaling Groups of Instances. (== resource_for -// beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== -// resource_for beta.regionAutoscalers ==) (== resource_for -// v1.regionAutoscalers ==) +// Autoscaler: Represents an Autoscaler resource. +// +// +// +// Use autoscalers to automatically add or delete instances from a +// managed instance group according to your defined autoscaling policy. +// For more information, read Autoscaling Groups of Instances. +// +// For zonal managed instance groups resource, use the autoscaler +// resource. +// +// For regional managed instance groups, use the regionAutoscalers +// resource. (== resource_for beta.autoscalers ==) (== resource_for +// v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== +// resource_for v1.regionAutoscalers ==) type Autoscaler struct { // AutoscalingPolicy: The configuration parameters for the autoscaling // algorithm. You can define one or more of the policies for an @@ -2568,6 +2840,15 @@ type Autoscaler struct { SelfLink string `json:"selfLink,omitempty"` // Status: [Output Only] The status of the autoscaler configuration. + // Current set of possible values: + // - PENDING: Autoscaler backend hasn't read new/updated configuration. + // + // - DELETING: Configuration is being deleted. + // - ACTIVE: Configuration is acknowledged to be effective. Some + // warnings might be present in the statusDetails field. + // - ERROR: Configuration has errors. Actionable for users. Details are + // present in the statusDetails field. New values might be added in the + // future. // // Possible values: // "ACTIVE" @@ -2931,7 +3212,50 @@ type AutoscalerStatusDetails struct { // Message: The status message. Message string `json:"message,omitempty"` - // Type: The type of error returned. + // Type: The type of error, warning, or notice returned. Current set of + // possible values: + // - ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance + // group are unhealthy (not in RUNNING state). + // - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service + // attached to the instance group. + // - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size + // greater than maxNumReplicas. + // - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric + // samples are not exported often enough to be a credible base for + // autoscaling. + // - CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified + // does not exist or does not have the necessary labels. + // - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to + // maxNumReplicas. This means the autoscaler cannot add or remove + // instances from the instance group. + // - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not + // receive any data from the custom metric configured for autoscaling. + // + // - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is + // configured to scale based on a load balancing signal but the instance + // group has not received any requests from the load balancer. + // - MODE_OFF (WARNING): Autoscaling is turned off. The number of + // instances in the group won't change automatically. The autoscaling + // configuration is preserved. + // - MODE_ONLY_UP (WARNING): Autoscaling is in the "Autoscale only up" + // mode. The autoscaler can add instances but not remove any. + // - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be + // autoscaled because it has more than one backend service attached to + // it. + // - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for + // the necessary resources, such as CPU or number of instances. + // - REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional + // autoscalers: there is a resource stockout in the chosen region. + // - SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does + // not exist. + // - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): + // Autoscaling does not work with an HTTP/S load balancer that has been + // configured for maxRate. + // - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a + // resource stockout in the chosen zone. For regional autoscalers: in at + // least one of the zones you're using there is a resource stockout. + // New values might be added in the future. Some of the values might not + // be available in all API versions. // // Possible values: // "ALL_INSTANCES_UNHEALTHY" @@ -2942,6 +3266,7 @@ type AutoscalerStatusDetails struct { // "MIN_EQUALS_MAX" // "MISSING_CUSTOM_METRIC_DATA_POINTS" // "MISSING_LOAD_BALANCING_DATA_POINTS" + // "MODE_OFF" // "MORE_THAN_ONE_BACKEND_SERVICE" // "NOT_ENOUGH_QUOTA_AVAILABLE" // "REGION_RESOURCE_STOCKOUT" @@ -3343,13 +3668,40 @@ func (s *AutoscalingPolicyLoadBalancingUtilization) UnmarshalJSON(data []byte) e // Backend: Message containing information of one individual backend. type Backend struct { - // BalancingMode: Specifies the balancing mode for this backend. For - // global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. - // Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for - // TCP/SSL). + // BalancingMode: Specifies the balancing mode for the backend. // - // For Internal Load Balancing, the default and only supported mode is - // CONNECTION. + // When choosing a balancing mode, you need to consider the + // loadBalancingScheme, and protocol for the backend service, as well as + // the type of backend (instance group or NEG). + // + // + // - If the load balancing mode is CONNECTION, then the load is spread + // based on how many concurrent connections the backend can handle. + // You can use the CONNECTION balancing mode if the protocol for the + // backend service is SSL, TCP, or UDP. + // + // If the loadBalancingScheme for the backend service is EXTERNAL (SSL + // Proxy and TCP Proxy load balancers), you must also specify exactly + // one of the following parameters: maxConnections, + // maxConnectionsPerInstance, or maxConnectionsPerEndpoint. + // + // If the loadBalancingScheme for the backend service is INTERNAL + // (internal TCP/UDP load balancers), you cannot specify any additional + // parameters. + // + // - If the load balancing mode is RATE, the load is spread based on the + // rate of HTTP requests per second (RPS). + // You can use the RATE balancing mode if the protocol for the backend + // service is HTTP or HTTPS. You must specify exactly one of the + // following parameters: maxRate, maxRatePerInstance, or + // maxRatePerEndpoint. + // + // - If the load balancing mode is UTILIZATION, the load is spread based + // on the CPU utilization of instances in an instance group. + // You can use the UTILIZATION balancing mode if the loadBalancingScheme + // of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or + // INTERNAL_MANAGED and the backends are instance groups. There are no + // restrictions on the backend service protocol. // // Possible values: // "CONNECTION" @@ -3371,54 +3723,72 @@ type Backend struct { // property when you create the resource. Description string `json:"description,omitempty"` - // Group: The fully-qualified URL of an Instance Group or Network - // Endpoint Group resource. In case of instance group this defines the - // list of instances that serve traffic. Member virtual machine - // instances from each instance group must live in the same zone as the - // instance group itself. No two backends in a backend service are - // allowed to use same Instance Group resource. + // Group: The fully-qualified URL of an instance group or network + // endpoint group (NEG) resource. The type of backend that a backend + // service supports depends on the backend service's + // loadBalancingScheme. // - // For Network Endpoint Groups this defines list of endpoints. All - // endpoints of Network Endpoint Group must be hosted on instances - // located in the same zone as the Network Endpoint Group. // - // Backend service can not contain mix of Instance Group and Network - // Endpoint Group backends. + // - When the loadBalancingScheme for the backend service is EXTERNAL, + // INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either + // an instance group or a NEG. The backends on the backend service must + // be either all instance groups or all NEGs. You cannot mix instance + // group and NEG backends on the same backend service. // - // Note that you must specify an Instance Group or Network Endpoint - // Group resource using the fully-qualified URL, rather than a partial - // URL. // - // When the BackendService has load balancing scheme INTERNAL, the - // instance group must be within the same region as the BackendService. - // Network Endpoint Groups are not supported for INTERNAL load balancing - // scheme. + // - When the loadBalancingScheme for the backend service is INTERNAL, + // the backend must be an instance group in the same region as the + // backend service. NEGs are not supported. + // + // You must use the fully-qualified URL (starting with + // https://www.googleapis.com/) to specify the instance group or NEG. + // Partial URLs are not supported. Group string `json:"group,omitempty"` - // MaxConnections: The max number of simultaneous connections for the - // group. Can be used with either CONNECTION or UTILIZATION balancing - // modes. For CONNECTION mode, either maxConnections or - // maxConnectionsPerInstance must be set. + // MaxConnections: Defines a maximum target for simultaneous connections + // for the entire backend (instance group or NEG). If the backend's + // balancingMode is UTILIZATION, this is an optional parameter. If the + // backend's balancingMode is CONNECTION, and backend is attached to a + // backend service whose loadBalancingScheme is EXTERNAL, you must + // specify either this parameter, maxConnectionsPerInstance, or + // maxConnectionsPerEndpoint. // - // This cannot be used for internal load balancing. + // Not available if the backend's balancingMode is RATE. If the + // loadBalancingScheme is INTERNAL, then maxConnections is not + // supported, even though the backend requires a balancing mode of + // CONNECTION. MaxConnections int64 `json:"maxConnections,omitempty"` - // MaxConnectionsPerEndpoint: The max number of simultaneous connections - // that a single backend network endpoint can handle. This is used to - // calculate the capacity of the group. Can be used in either CONNECTION - // or UTILIZATION balancing modes. For CONNECTION mode, either - // maxConnections or maxConnectionsPerEndpoint must be set. + // MaxConnectionsPerEndpoint: Defines a maximum target for simultaneous + // connections for an endpoint of a NEG. This is multiplied by the + // number of endpoints in the NEG to implicitly calculate a maximum + // number of target maximum simultaneous connections for the NEG. If the + // backend's balancingMode is CONNECTION, and the backend is attached to + // a backend service whose loadBalancingScheme is EXTERNAL, you must + // specify either this parameter, maxConnections, or + // maxConnectionsPerInstance. // - // This cannot be used for internal load balancing. + // Not available if the backend's balancingMode is RATE. Internal + // TCP/UDP load balancing does not support setting + // maxConnectionsPerEndpoint even though its backends require a + // balancing mode of CONNECTION. MaxConnectionsPerEndpoint int64 `json:"maxConnectionsPerEndpoint,omitempty"` - // MaxConnectionsPerInstance: The max number of simultaneous connections - // that a single backend instance can handle. This is used to calculate - // the capacity of the group. Can be used in either CONNECTION or - // UTILIZATION balancing modes. For CONNECTION mode, either - // maxConnections or maxConnectionsPerInstance must be set. + // MaxConnectionsPerInstance: Defines a maximum target for simultaneous + // connections for a single VM in a backend instance group. This is + // multiplied by the number of instances in the instance group to + // implicitly calculate a target maximum number of simultaneous + // connections for the whole instance group. If the backend's + // balancingMode is UTILIZATION, this is an optional parameter. If the + // backend's balancingMode is CONNECTION, and backend is attached to a + // backend service whose loadBalancingScheme is EXTERNAL, you must + // specify either this parameter, maxConnections, or + // maxConnectionsPerEndpoint. // - // This cannot be used for internal load balancing. + // Not available if the backend's balancingMode is RATE. Internal + // TCP/UDP load balancing does not support setting + // maxConnectionsPerInstance even though its backends require a + // balancing mode of CONNECTION. MaxConnectionsPerInstance int64 `json:"maxConnectionsPerInstance,omitempty"` // MaxRate: The max requests per second (RPS) of the group. Can be used @@ -3429,27 +3799,36 @@ type Backend struct { // This cannot be used for internal load balancing. MaxRate int64 `json:"maxRate,omitempty"` - // MaxRatePerEndpoint: The max requests per second (RPS) that a single - // backend network endpoint can handle. This is used to calculate the - // capacity of the group. Can be used in either balancing mode. For RATE - // mode, either maxRate or maxRatePerEndpoint must be set. + // MaxRatePerEndpoint: Defines a maximum target for requests per second + // (RPS) for an endpoint of a NEG. This is multiplied by the number of + // endpoints in the NEG to implicitly calculate a target maximum rate + // for the NEG. // - // This cannot be used for internal load balancing. + // If the backend's balancingMode is RATE, you must specify either this + // parameter, maxRate, or maxRatePerInstance. + // + // Not available if the backend's balancingMode is CONNECTION. MaxRatePerEndpoint float64 `json:"maxRatePerEndpoint,omitempty"` - // MaxRatePerInstance: The max requests per second (RPS) that a single - // backend instance can handle. This is used to calculate the capacity - // of the group. Can be used in either balancing mode. For RATE mode, - // either maxRate or maxRatePerInstance must be set. + // MaxRatePerInstance: Defines a maximum target for requests per second + // (RPS) for a single VM in a backend instance group. This is multiplied + // by the number of instances in the instance group to implicitly + // calculate a target maximum rate for the whole instance group. // - // This cannot be used for internal load balancing. + // If the backend's balancingMode is UTILIZATION, this is an optional + // parameter. If the backend's balancingMode is RATE, you must specify + // either this parameter, maxRate, or maxRatePerEndpoint. + // + // Not available if the backend's balancingMode is CONNECTION. MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` - // MaxUtilization: Used when balancingMode is UTILIZATION. This ratio - // defines the CPU utilization target for the group. The default is 0.8. - // Valid range is [0.0, 1.0]. + // MaxUtilization: Defines the maximum average CPU utilization of a + // backend VM in an instance group. The valid range is [0.0, 1.0]. This + // is an optional parameter if the backend's balancingMode is + // UTILIZATION. // - // This cannot be used for internal load balancing. + // This parameter can be used in conjunction with maxRate, + // maxRatePerInstance, maxConnections, or maxConnectionsPerInstance. MaxUtilization float64 `json:"maxUtilization,omitempty"` // ForceSendFields is a list of field names (e.g. "BalancingMode") to @@ -3495,8 +3874,10 @@ func (s *Backend) UnmarshalJSON(data []byte) error { return nil } -// BackendBucket: A BackendBucket resource. This resource defines a -// Cloud Storage bucket. +// BackendBucket: Represents a Cloud Storage Bucket resource. +// +// This Cloud Storage bucket resource is referenced by a URL map of a +// load balancer. For more information, read Backend Buckets. type BackendBucket struct { // BucketName: Cloud Storage bucket name. BucketName string `json:"bucketName,omitempty"` @@ -3758,17 +4139,19 @@ func (s *BackendBucketListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// BackendService: A BackendService resource. This resource defines a -// group of backend virtual machines and their serving capacity. (== -// resource_for v1.backendService ==) (== resource_for +// BackendService: Represents a Backend Service resource. +// +// A backend service contains configuration values for Google Cloud +// Platform load balancing services. +// +// For more information, read Backend Services. +// +// (== resource_for v1.backendService ==) (== resource_for // beta.backendService ==) type BackendService struct { - // AffinityCookieTtlSec: Lifetime of cookies in seconds if - // session_affinity is GENERATED_COOKIE. If set to 0, the cookie is - // non-persistent and lasts only until the end of the browser session - // (or equivalent). The maximum allowed value for TTL is one day. - // - // When the load balancing scheme is INTERNAL, this field is not used. + // AffinityCookieTtlSec: If set to 0, the cookie is non-persistent and + // lasts only until the end of the browser session (or equivalent). The + // maximum allowed value is one day (86,400). AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"` // Backends: The list of backends that serve this BackendService. @@ -3777,8 +4160,37 @@ type BackendService struct { // CdnPolicy: Cloud CDN configuration for this BackendService. CdnPolicy *BackendServiceCdnPolicy `json:"cdnPolicy,omitempty"` + // CircuitBreakers: Settings controlling the volume of connections to a + // backend service. If not set, this feature is considered + // disabled. + // + // This field is applicable to either: + // - A regional backend service with the service_protocol set to HTTP, + // HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. + // + // - A global backend service with the load_balancing_scheme set to + // INTERNAL_SELF_MANAGED. + CircuitBreakers *CircuitBreakers `json:"circuitBreakers,omitempty"` + ConnectionDraining *ConnectionDraining `json:"connectionDraining,omitempty"` + // ConsistentHash: Consistent Hash-based load balancing can be used to + // provide soft session affinity based on HTTP headers, cookies or other + // properties. This load balancing policy is applicable only for HTTP + // connections. The affinity to a particular destination host will be + // lost when one or more hosts are added/removed from the destination + // service. This field specifies parameters that control consistent + // hashing. This field is only applicable when localityLbPolicy is set + // to MAGLEV or RING_HASH. + // + // This field is applicable to either: + // - A regional backend service with the service_protocol set to HTTP, + // HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. + // + // - A global backend service with the load_balancing_scheme set to + // INTERNAL_SELF_MANAGED. + ConsistentHash *ConsistentHashLoadBalancerSettings `json:"consistentHash,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -3791,9 +4203,9 @@ type BackendService struct { // property when you create the resource. Description string `json:"description,omitempty"` - // EnableCDN: If true, enable Cloud CDN for this BackendService. - // - // When the load balancing scheme is INTERNAL, this field is not used. + // EnableCDN: If true, enables Cloud CDN for the backend service. Only + // applicable if the loadBalancingScheme is EXTERNAL and the protocol is + // HTTP or HTTPS. EnableCDN bool `json:"enableCDN,omitempty"` // Fingerprint: Fingerprint of this resource. A hash of the contents @@ -3827,18 +4239,60 @@ type BackendService struct { // for backend services. Kind string `json:"kind,omitempty"` - // LoadBalancingScheme: Indicates whether the backend service will be - // used with internal or external load balancing. A backend service - // created for one type of load balancing cannot be used with the other. - // Possible values are INTERNAL and EXTERNAL. + // LoadBalancingScheme: Specifies the load balancer type. Choose + // EXTERNAL for load balancers that receive traffic from external + // clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose + // INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose + // INTERNAL_SELF_MANAGED for Traffic Director. A backend service created + // for one type of load balancing cannot be used with another. For more + // information, refer to Choosing a load balancer. // // Possible values: // "EXTERNAL" // "INTERNAL" + // "INTERNAL_MANAGED" // "INTERNAL_SELF_MANAGED" // "INVALID_LOAD_BALANCING_SCHEME" LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` + // LocalityLbPolicy: The load balancing algorithm used within the scope + // of the locality. The possible values are: + // - ROUND_ROBIN: This is a simple policy in which each healthy backend + // is selected in round robin order. This is the default. + // - LEAST_REQUEST: An O(1) algorithm which selects two random healthy + // hosts and picks the host which has fewer active requests. + // - RING_HASH: The ring/modulo hash load balancer implements consistent + // hashing to backends. The algorithm has the property that the + // addition/removal of a host from a set of N hosts only affects 1/N of + // the requests. + // - RANDOM: The load balancer selects a random healthy host. + // - ORIGINAL_DESTINATION: Backend host is selected based on the client + // connection metadata, i.e., connections are opened to the same address + // as the destination address of the incoming connection before the + // connection was redirected to the load balancer. + // - MAGLEV: used as a drop in replacement for the ring hash load + // balancer. Maglev is not as stable as ring hash but has faster table + // lookup build times and host selection times. For more information + // about Maglev, refer to https://ai.google/research/pubs/pub44824 + // + // + // This field is applicable to either: + // - A regional backend service with the service_protocol set to HTTP, + // HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. + // + // - A global backend service with the load_balancing_scheme set to + // INTERNAL_SELF_MANAGED. + // + // Possible values: + // "INVALID_LB_POLICY" + // "LEAST_REQUEST" + // "MAGLEV" + // "ORIGINAL_DESTINATION" + // "RANDOM" + // "RING_HASH" + // "ROUND_ROBIN" + LocalityLbPolicy string `json:"localityLbPolicy,omitempty"` + // Name: Name of the resource. Provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -3848,27 +4302,45 @@ type BackendService struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` + // OutlierDetection: Settings controlling the eviction of unhealthy + // hosts from the load balancing pool for the backend service. If not + // set, this feature is considered disabled. + // + // This field is applicable to either: + // - A regional backend service with the service_protocol set to HTTP, + // HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. + // + // - A global backend service with the load_balancing_scheme set to + // INTERNAL_SELF_MANAGED. + OutlierDetection *OutlierDetection `json:"outlierDetection,omitempty"` + // Port: Deprecated in favor of portName. The TCP port to connect on the // backend. The default value is 80. // - // This cannot be used for internal load balancing. + // This cannot be used if the loadBalancingScheme is INTERNAL (Internal + // TCP/UDP Load Balancing). Port int64 `json:"port,omitempty"` - // PortName: Name of backend port. The same name should appear in the - // instance groups referenced by this service. Required when the load - // balancing scheme is EXTERNAL. + // PortName: A named port on a backend instance group representing the + // port for communication to the backend VMs in that group. Required + // when the loadBalancingScheme is EXTERNAL and the backends are + // instance groups. The named port must be defined on each backend + // instance group. This parameter has no meaning if the backends are + // NEGs. // - // When the load balancing scheme is INTERNAL, this field is not used. + // + // + // Must be omitted when the loadBalancingScheme is INTERNAL (Internal + // TCP/UDP Load Blaancing). PortName string `json:"portName,omitempty"` // Protocol: The protocol this BackendService uses to communicate with // backends. // - // Possible values are HTTP, HTTPS, TCP, and SSL. The default is - // HTTP. - // - // For internal load balancing, the possible values are TCP and UDP, and - // the default is TCP. + // Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP, depending + // on the chosen load balancer or Traffic Director configuration. Refer + // to the documentation for the load balancer or for Traffic Director + // for more information. // // Possible values: // "HTTP" @@ -3893,26 +4365,33 @@ type BackendService struct { SelfLink string `json:"selfLink,omitempty"` // SessionAffinity: Type of session affinity to use. The default is - // NONE. + // NONE. Session affinity is not applicable if the --protocol is + // UDP. // - // When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, - // or GENERATED_COOKIE. + // When the loadBalancingScheme is EXTERNAL, possible values are NONE, + // CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the + // protocol is HTTP or HTTPS. // - // When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, - // CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. + // When the loadBalancingScheme is INTERNAL, possible values are NONE, + // CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. // - // When the protocol is UDP, this field is not used. + // When the loadBalancingScheme is INTERNAL_SELF_MANAGED, possible + // values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or + // HTTP_COOKIE. // // Possible values: // "CLIENT_IP" // "CLIENT_IP_PORT_PROTO" // "CLIENT_IP_PROTO" // "GENERATED_COOKIE" + // "HEADER_FIELD" + // "HTTP_COOKIE" // "NONE" SessionAffinity string `json:"sessionAffinity,omitempty"` - // TimeoutSec: How many seconds to wait for the backend before - // considering it a failed request. Default is 30 seconds. + // TimeoutSec: The backend service timeout has a different meaning + // depending on the type of load balancer. For more information read, + // Backend service settings The default is 30 seconds. TimeoutSec int64 `json:"timeoutSec,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -4552,7 +5031,7 @@ type Binding struct { // account. // // * `user:{emailid}`: An email address that represents a specific - // Google account. For example, `alice@gmail.com` . + // Google account. For example, `alice@example.com` . // // // @@ -4679,17 +5158,63 @@ func (s *CacheKeyPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Commitment: Represents a Commitment resource. Creating a Commitment -// resource means that you are purchasing a committed use contract with -// an explicit start and end time. You can create commitments based on -// vCPUs and memory usage and receive discounted rates. For full -// details, read Signing Up for Committed Use Discounts. +// CircuitBreakers: Settings controlling the volume of connections to a +// backend service. +type CircuitBreakers struct { + // MaxConnections: The maximum number of connections to the backend + // service. If not specified, there is no limit. + MaxConnections int64 `json:"maxConnections,omitempty"` + + // MaxPendingRequests: The maximum number of pending requests allowed to + // the backend service. If not specified, there is no limit. + MaxPendingRequests int64 `json:"maxPendingRequests,omitempty"` + + // MaxRequests: The maximum number of parallel requests that allowed to + // the backend service. If not specified, there is no limit. + MaxRequests int64 `json:"maxRequests,omitempty"` + + // MaxRequestsPerConnection: Maximum requests for a single connection to + // the backend service. This parameter is respected by both the HTTP/1.1 + // and HTTP/2 implementations. If not specified, there is no limit. + // Setting this parameter to 1 will effectively disable keep alive. + MaxRequestsPerConnection int64 `json:"maxRequestsPerConnection,omitempty"` + + // MaxRetries: The maximum number of parallel retries allowed to the + // backend cluster. If not specified, the default is 1. + MaxRetries int64 `json:"maxRetries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxConnections") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CircuitBreakers) MarshalJSON() ([]byte, error) { + type NoMethod CircuitBreakers + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Commitment: Represents a regional Commitment resource. // -// Committed use discounts are subject to Google Cloud Platform's -// Service Specific Terms. By purchasing a committed use discount, you -// agree to these terms. Committed use discounts will not renew, so you -// must purchase a new commitment to continue receiving discounts. (== -// resource_for beta.commitments ==) (== resource_for v1.commitments ==) +// Creating a commitment resource means that you are purchasing a +// committed use contract with an explicit start and end time. You can +// create commitments based on vCPUs and memory usage and receive +// discounted rates. For full details, read Signing Up for Committed Use +// Discounts. (== resource_for beta.regionCommitments ==) (== +// resource_for v1.regionCommitments ==) type Commitment struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -4734,6 +5259,9 @@ type Commitment struct { // used. Region string `json:"region,omitempty"` + // Reservations: List of reservations in this commitment. + Reservations []*Reservation `json:"reservations,omitempty"` + // Resources: A list of commitment amounts for particular resources. // Note that VCPU and MEMORY resource commitments must occur together. Resources []*ResourceCommitment `json:"resources,omitempty"` @@ -5300,8 +5828,9 @@ func (s *Condition) MarshalJSON() ([]byte, error) { // ConnectionDraining: Message containing connection draining // configuration. type ConnectionDraining struct { - // DrainingTimeoutSec: Time for which instance will be drained (not - // accept new connections, but still work to finish started). + // DrainingTimeoutSec: The amount of time in seconds to allow existing + // connections to persist while on unhealthy backend VMs. Only + // applicable if the protocol is not UDP. The valid range is [0, 3600]. DrainingTimeoutSec int64 `json:"drainingTimeoutSec,omitempty"` // ForceSendFields is a list of field names (e.g. "DrainingTimeoutSec") @@ -5328,6 +5857,155 @@ func (s *ConnectionDraining) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ConsistentHashLoadBalancerSettings: This message defines settings for +// a consistent hash style load balancer. +type ConsistentHashLoadBalancerSettings struct { + // HttpCookie: Hash is based on HTTP Cookie. This field describes a HTTP + // cookie that will be used as the hash key for the consistent hash load + // balancer. If the cookie is not present, it will be generated. This + // field is applicable if the sessionAffinity is set to HTTP_COOKIE. + HttpCookie *ConsistentHashLoadBalancerSettingsHttpCookie `json:"httpCookie,omitempty"` + + // HttpHeaderName: The hash based on the value of the specified header + // field. This field is applicable if the sessionAffinity is set to + // HEADER_FIELD. + HttpHeaderName string `json:"httpHeaderName,omitempty"` + + // MinimumRingSize: The minimum number of virtual nodes to use for the + // hash ring. Defaults to 1024. Larger ring sizes result in more + // granular load distributions. If the number of hosts in the load + // balancing pool is larger than the ring size, each host will be + // assigned a single virtual node. + MinimumRingSize int64 `json:"minimumRingSize,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "HttpCookie") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HttpCookie") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ConsistentHashLoadBalancerSettings) MarshalJSON() ([]byte, error) { + type NoMethod ConsistentHashLoadBalancerSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ConsistentHashLoadBalancerSettingsHttpCookie: The information about +// the HTTP Cookie on which the hash function is based for load +// balancing policies that use a consistent hash. +type ConsistentHashLoadBalancerSettingsHttpCookie struct { + // Name: Name of the cookie. + Name string `json:"name,omitempty"` + + // Path: Path to set for the cookie. + Path string `json:"path,omitempty"` + + // Ttl: Lifetime of the cookie. + Ttl *Duration `json:"ttl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ConsistentHashLoadBalancerSettingsHttpCookie) MarshalJSON() ([]byte, error) { + type NoMethod ConsistentHashLoadBalancerSettingsHttpCookie + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CorsPolicy: The specification for allowing client side cross-origin +// requests. Please see W3C Recommendation for Cross Origin Resource +// Sharing +type CorsPolicy struct { + // AllowCredentials: In response to a preflight request, setting this to + // true indicates that the actual request can include user credentials. + // This translates to the Access-Control-Allow-Credentials + // header. + // Default is false. + AllowCredentials bool `json:"allowCredentials,omitempty"` + + // AllowHeaders: Specifies the content for the + // Access-Control-Allow-Headers header. + AllowHeaders []string `json:"allowHeaders,omitempty"` + + // AllowMethods: Specifies the content for the + // Access-Control-Allow-Methods header. + AllowMethods []string `json:"allowMethods,omitempty"` + + // AllowOriginRegexes: Specifies the regualar expression patterns that + // match allowed origins. For regular expression grammar please see + // en.cppreference.com/w/cpp/regex/ecmascript + // An origin is allowed if it matches either allow_origins or + // allow_origin_regex. + AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"` + + // AllowOrigins: Specifies the list of origins that will be allowed to + // do CORS requests. + // An origin is allowed if it matches either allow_origins or + // allow_origin_regex. + AllowOrigins []string `json:"allowOrigins,omitempty"` + + // Disabled: If true, specifies the CORS policy is disabled. The default + // value of false, which indicates that the CORS policy is in effect. + Disabled bool `json:"disabled,omitempty"` + + // ExposeHeaders: Specifies the content for the + // Access-Control-Expose-Headers header. + ExposeHeaders []string `json:"exposeHeaders,omitempty"` + + // MaxAge: Specifies how long the results of a preflight request can be + // cached. This translates to the content for the Access-Control-Max-Age + // header. + MaxAge int64 `json:"maxAge,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowCredentials") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowCredentials") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CorsPolicy) MarshalJSON() ([]byte, error) { + type NoMethod CorsPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CustomerEncryptionKey: Represents a customer-supplied encryption key type CustomerEncryptionKey struct { // KmsKeyName: The name of the encryption key that is stored in Google @@ -5462,8 +6140,20 @@ func (s *DeprecationStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Disk: A Disk resource. (== resource_for beta.disks ==) (== -// resource_for v1.disks ==) +// Disk: Represents a Persistent Disk resource. +// +// Persistent disks are required for running your VM instances. Create +// both boot and non-boot (data) persistent disks. For more information, +// read Persistent Disks. For more storage options, read Storage +// options. +// +// The disks resource represents a zonal persistent disk. For more +// information, read Zonal persistent disks. +// +// The regionDisks resource represents a regional persistent disk. For +// more information, read Regional resources. (== resource_for +// beta.disks ==) (== resource_for v1.disks ==) (== resource_for +// v1.regionDisks ==) (== resource_for beta.regionDisks ==) type Disk struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -5563,6 +6253,10 @@ type Disk struct { // to. Only applicable for regional resources. ReplicaZones []string `json:"replicaZones,omitempty"` + // ResourcePolicies: Resource policies applied to this disk for + // automatic snapshot creations. + ResourcePolicies []string `json:"resourcePolicies,omitempty"` + // SelfLink: [Output Only] Server-defined fully-qualified URL for this // resource. SelfLink string `json:"selfLink,omitempty"` @@ -5643,7 +6337,10 @@ type Disk struct { // version of the snapshot that was used. SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - // Status: [Output Only] The status of disk creation. + // Status: [Output Only] The status of disk creation. CREATING: Disk is + // provisioning. RESTORING: Source data is being copied into the disk. + // FAILED: Disk creation failed. READY: Disk is ready for use. DELETING: + // Disk is deleting. // // Possible values: // "CREATING" @@ -6113,8 +6810,19 @@ func (s *DiskMoveRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DiskType: A DiskType resource. (== resource_for beta.diskTypes ==) -// (== resource_for v1.diskTypes ==) +// DiskType: Represents a Disk Type resource. +// +// You can choose from a variety of disk types based on your needs. For +// more information, read Storage options. +// +// The diskTypes resource represents disk types for a zonal persistent +// disk. For more information, read Zonal persistent disks. +// +// The regionDiskTypes resource represents disk types for a regional +// persistent disk. For more information, read Regional persistent +// disks. (== resource_for beta.diskTypes ==) (== resource_for +// v1.diskTypes ==) (== resource_for v1.regionDiskTypes ==) (== +// resource_for beta.regionDiskTypes ==) type DiskType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -6632,6 +7340,63 @@ func (s *DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type DisksAddResourcePoliciesRequest struct { + // ResourcePolicies: Resource policies to be added to this disk. + // Currently you can only specify one policy here. + ResourcePolicies []string `json:"resourcePolicies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResourcePolicies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DisksAddResourcePoliciesRequest) MarshalJSON() ([]byte, error) { + type NoMethod DisksAddResourcePoliciesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type DisksRemoveResourcePoliciesRequest struct { + // ResourcePolicies: Resource policies to be removed from this disk. + ResourcePolicies []string `json:"resourcePolicies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResourcePolicies") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResourcePolicies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DisksRemoveResourcePoliciesRequest) MarshalJSON() ([]byte, error) { + type NoMethod DisksRemoveResourcePoliciesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type DisksResizeRequest struct { // SizeGb: The new size of the persistent disk, which is specified in // GB. @@ -6793,6 +7558,34 @@ func (s *DisksScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DisplayDevice: A set of Display Device options +type DisplayDevice struct { + // EnableDisplay: Defines whether the instance has Display enabled. + EnableDisplay bool `json:"enableDisplay,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EnableDisplay") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableDisplay") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DisplayDevice) MarshalJSON() ([]byte, error) { + type NoMethod DisplayDevice + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type DistributionPolicy struct { // Zones: Zones where the regional managed instance group will create // and manage instances. @@ -6849,6 +7642,45 @@ func (s *DistributionPolicyZoneConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Duration: A Duration represents a fixed-length span of time +// represented as a count of seconds and fractions of seconds at +// nanosecond resolution. It is independent of any calendar and concepts +// like "day" or "month". Range is approximately 10,000 years. +type Duration struct { + // Nanos: Span of time that's a fraction of a second at nanosecond + // resolution. Durations less than one second are represented with a 0 + // `seconds` field and a positive `nanos` field. Must be from 0 to + // 999,999,999 inclusive. + Nanos int64 `json:"nanos,omitempty"` + + // Seconds: Span of time at a resolution of a second. Must be from 0 to + // 315,576,000,000 inclusive. Note: these bounds are computed from: 60 + // sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + Seconds int64 `json:"seconds,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Nanos") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Nanos") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Duration) MarshalJSON() ([]byte, error) { + type NoMethod Duration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Expr: Represents an expression text. Example: // // title: "User account presence" description: "Determines whether the @@ -6899,7 +7731,300 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Firewall: Represents a Firewall resource. +// ExternalVpnGateway: External VPN gateway is the on-premises VPN +// gateway(s) or another cloud provider?s VPN gateway that connects to +// your Google Cloud VPN gateway. To create a highly available VPN from +// Google Cloud to your on-premises side or another Cloud provider's VPN +// gateway, you must create a external VPN gateway resource in GCP, +// which provides the information to GCP about your external VPN +// gateway. +type ExternalVpnGateway struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Interfaces: List of interfaces for this external VPN gateway. + Interfaces []*ExternalVpnGatewayInterface `json:"interfaces,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#externalVpnGateway for externalVpnGateways. + Kind string `json:"kind,omitempty"` + + // LabelFingerprint: A fingerprint for the labels being applied to this + // ExternalVpnGateway, which is essentially a hash of the labels set + // used for optimistic locking. The fingerprint is initially generated + // by Compute Engine and changes after every request to modify or update + // labels. You must always provide an up-to-date fingerprint hash in + // order to update or change labels, otherwise the request will fail + // with error 412 conditionNotMet. + // + // To see the latest fingerprint, make a get() request to retrieve an + // ExternalVpnGateway. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: Labels to apply to this ExternalVpnGateway resource. These + // can be later modified by the setLabels method. Each label key/value + // must comply with RFC1035. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // RedundancyType: Indicates the user-supplied redundancy type of this + // external VPN gateway. + // + // Possible values: + // "FOUR_IPS_REDUNDANCY" + // "SINGLE_IP_INTERNALLY_REDUNDANT" + // "TWO_IPS_REDUNDANCY" + RedundancyType string `json:"redundancyType,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ExternalVpnGateway) MarshalJSON() ([]byte, error) { + type NoMethod ExternalVpnGateway + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExternalVpnGatewayInterface: The interface for the external VPN +// gateway. +type ExternalVpnGatewayInterface struct { + // Id: The numeric ID of this interface. The allowed input values for + // this id for different redundancy types of external VPN gateway: + // SINGLE_IP_INTERNALLY_REDUNDANT - 0 TWO_IPS_REDUNDANCY - 0, 1 + // FOUR_IPS_REDUNDANCY - 0, 1, 2, 3 + Id int64 `json:"id,omitempty"` + + // IpAddress: IP address of the interface in the external VPN gateway. + // Only IPv4 is supported. This IP address can be either from your + // on-premise gateway or another Cloud provider?s VPN gateway, it cannot + // be an IP address from Google Compute Engine. + IpAddress string `json:"ipAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalVpnGatewayInterface) MarshalJSON() ([]byte, error) { + type NoMethod ExternalVpnGatewayInterface + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExternalVpnGatewayList: Response to the list request, and contains a +// list of externalVpnGateways. +type ExternalVpnGatewayList struct { + Etag string `json:"etag,omitempty"` + + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of ExternalVpnGateway resources. + Items []*ExternalVpnGateway `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#externalVpnGatewayList for lists of externalVpnGateways. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *ExternalVpnGatewayListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalVpnGatewayList) MarshalJSON() ([]byte, error) { + type NoMethod ExternalVpnGatewayList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExternalVpnGatewayListWarning: [Output Only] Informational warning +// message. +type ExternalVpnGatewayListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*ExternalVpnGatewayListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalVpnGatewayListWarning) MarshalJSON() ([]byte, error) { + type NoMethod ExternalVpnGatewayListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type ExternalVpnGatewayListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalVpnGatewayListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ExternalVpnGatewayListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Firewall: Represents a Firewall Rule resource. +// +// Firewall rules allow or deny ingress traffic to, and egress traffic +// from your instances. For more information, read Firewall rules. type Firewall struct { // Allowed: The list of ALLOW rules specified by this firewall. Each // rule specifies a protocol and port-range tuple that describes a @@ -6916,29 +8041,30 @@ type Firewall struct { Denied []*FirewallDenied `json:"denied,omitempty"` // Description: An optional description of this resource. Provide this - // property when you create the resource. + // field when you create the resource. Description string `json:"description,omitempty"` // DestinationRanges: If destination ranges are specified, the firewall - // will apply only to traffic that has destination IP address in these + // rule applies only to traffic that has destination IP address in these // ranges. These ranges must be expressed in CIDR format. Only IPv4 is // supported. DestinationRanges []string `json:"destinationRanges,omitempty"` - // Direction: Direction of traffic to which this firewall applies; - // default is INGRESS. Note: For INGRESS traffic, it is NOT supported to - // specify destinationRanges; For EGRESS traffic, it is NOT supported to - // specify sourceRanges OR sourceTags. + // Direction: Direction of traffic to which this firewall applies, + // either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` + // traffic, you cannot specify the destinationRanges field, and for + // `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags + // fields. // // Possible values: // "EGRESS" // "INGRESS" Direction string `json:"direction,omitempty"` - // Disabled: Denotes whether the firewall rule is disabled, i.e not - // applied to the network it is associated with. When set to true, the - // firewall rule is not enforced and the network behaves as if it did - // not exist. If this is unspecified, the firewall rule will be enabled. + // Disabled: Denotes whether the firewall rule is disabled. When set to + // true, the firewall rule is not enforced and the network behaves as if + // it did not exist. If this is unspecified, the firewall rule will be + // enabled. Disabled bool `json:"disabled,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -6957,58 +8083,61 @@ type Firewall struct { // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and - // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means - // the first character must be a lowercase letter, and all following - // characters must be a dash, lowercase letter, or digit, except the - // last character, which cannot be a dash. + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first + // character must be a lowercase letter, and all following characters + // (except for the last character) must be a dash, lowercase letter, or + // digit. The last character must be a lowercase letter or digit. Name string `json:"name,omitempty"` // Network: URL of the network resource for this firewall rule. If not // specified when creating a firewall rule, the default network is // used: // global/networks/default - // If you choose to specify this property, you can specify the network - // as a full or partial URL. For example, the following are all valid - // URLs: + // If you choose to specify this field, you can specify the network as a + // full or partial URL. For example, the following are all valid URLs: + // // - // https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network // - projects/myproject/global/networks/my-network // - global/networks/default Network string `json:"network,omitempty"` - // Priority: Priority for this rule. This is an integer between 0 and - // 65535, both inclusive. When not specified, the value assumed is 1000. - // Relative priorities determine precedence of conflicting rules. Lower - // value of priority implies higher precedence (eg, a rule with priority - // 0 has higher precedence than a rule with priority 1). DENY rules take - // precedence over ALLOW rules having equal priority. + // Priority: Priority for this rule. This is an integer between `0` and + // `65535`, both inclusive. The default value is `1000`. Relative + // priorities determine which rule takes effect if multiple rules apply. + // Lower values indicate higher priority. For example, a rule with + // priority `0` has higher precedence than a rule with priority `1`. + // DENY rules take precedence over ALLOW rules if they have equal + // priority. Note that VPC networks have implied rules with a priority + // of `65535`. To avoid conflicts with the implied rules, use a priority + // number less than `65535`. Priority int64 `json:"priority,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // SourceRanges: If source ranges are specified, the firewall will apply - // only to traffic that has source IP address in these ranges. These - // ranges must be expressed in CIDR format. One or both of sourceRanges - // and sourceTags may be set. If both properties are set, the firewall - // will apply to traffic that has source IP address within sourceRanges - // OR the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. Only IPv4 is supported. + // SourceRanges: If source ranges are specified, the firewall rule + // applies only to traffic that has a source IP address in these ranges. + // These ranges must be expressed in CIDR format. One or both of + // sourceRanges and sourceTags may be set. If both fields are set, the + // rule applies to traffic that has a source IP address within + // sourceRanges OR a source IP from a resource with a matching tag + // listed in the sourceTags field. The connection does not need to match + // both fields for the rule to apply. Only IPv4 is supported. SourceRanges []string `json:"sourceRanges,omitempty"` // SourceServiceAccounts: If source service accounts are specified, the - // firewall will apply only to traffic originating from an instance with - // a service account in this list. Source service accounts cannot be - // used to control traffic to an instance's external IP address because - // service accounts are associated with an instance, not an IP address. - // sourceRanges can be set at the same time as sourceServiceAccounts. If - // both are set, the firewall will apply to traffic that has source IP - // address within sourceRanges OR the source IP belongs to an instance - // with service account listed in sourceServiceAccount. The connection - // does not need to match both properties for the firewall to apply. - // sourceServiceAccounts cannot be used at the same time as sourceTags - // or targetTags. + // firewall rules apply only to traffic originating from an instance + // with a service account in this list. Source service accounts cannot + // be used to control traffic to an instance's external IP address + // because service accounts are associated with an instance, not an IP + // address. sourceRanges can be set at the same time as + // sourceServiceAccounts. If both are set, the firewall applies to + // traffic that has a source IP address within the sourceRanges OR a + // source IP that belongs to an instance with service account listed in + // sourceServiceAccount. The connection does not need to match both + // fields for the firewall to apply. sourceServiceAccounts cannot be + // used at the same time as sourceTags or targetTags. SourceServiceAccounts []string `json:"sourceServiceAccounts,omitempty"` // SourceTags: If source tags are specified, the firewall rule applies @@ -7018,11 +8147,11 @@ type Firewall struct { // instance's external IP address, it only applies to traffic between // instances in the same virtual network. Because tags are associated // with instances, not IP addresses. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR - // the source IP that belongs to a tag listed in the sourceTags - // property. The connection does not need to match both properties for - // the firewall to apply. + // sourceTags may be set. If both fields are set, the firewall applies + // to traffic that has a source IP address within sourceRanges OR a + // source IP from a resource with a matching tag listed in the + // sourceTags field. The connection does not need to match both fields + // for the firewall to apply. SourceTags []string `json:"sourceTags,omitempty"` // TargetServiceAccounts: A list of service accounts indicating sets of @@ -7071,13 +8200,13 @@ type FirewallAllowed struct { // IPProtocol: The IP protocol to which this rule applies. The protocol // type is required when creating a firewall rule. This value can either // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. + // esp, ah, ipip, sctp) or the IP protocol number. IPProtocol string `json:"IPProtocol,omitempty"` // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. + // field is only applicable for the UDP or TCP protocol. Each entry must + // be either an integer or a range. If not specified, this rule applies + // to connections through any port. // // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. Ports []string `json:"ports,omitempty"` @@ -7109,13 +8238,13 @@ type FirewallDenied struct { // IPProtocol: The IP protocol to which this rule applies. The protocol // type is required when creating a firewall rule. This value can either // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, ipip, sctp), or the IP protocol number. + // esp, ah, ipip, sctp) or the IP protocol number. IPProtocol string `json:"IPProtocol,omitempty"` // Ports: An optional list of ports to which this rule applies. This - // field is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule applies to - // connections through any port. + // field is only applicable for the UDP or TCP protocol. Each entry must + // be either an integer or a range. If not specified, this rule applies + // to connections through any port. // // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. Ports []string `json:"ports,omitempty"` @@ -7373,59 +8502,50 @@ func (s *FixedOrPercent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ForwardingRule: A ForwardingRule resource. A ForwardingRule resource -// specifies which pool of target virtual machines to forward a packet -// to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== -// resource_for beta.forwardingRules ==) (== resource_for +// ForwardingRule: Represents a Forwarding Rule resource. +// +// A forwarding rule and its corresponding IP address represent the +// frontend configuration of a Google Cloud Platform load balancer. +// Forwarding rules can also reference target instances and Cloud VPN +// Classic gateways (targetVpnGateway). +// +// For more information, read Forwarding rule concepts and Using +// protocol forwarding. +// +// (== resource_for beta.forwardingRules ==) (== resource_for // v1.forwardingRules ==) (== resource_for beta.globalForwardingRules // ==) (== resource_for v1.globalForwardingRules ==) (== resource_for // beta.regionForwardingRules ==) (== resource_for // v1.regionForwardingRules ==) type ForwardingRule struct { - // IPAddress: The IP address that this forwarding rule is serving on - // behalf of. + // IPAddress: IP address that this forwarding rule serves. When a client + // sends traffic to this IP address, the forwarding rule directs the + // traffic to the target that you specify in the forwarding rule. // - // Addresses are restricted based on the forwarding rule's load - // balancing scheme (EXTERNAL or INTERNAL) and scope (global or - // regional). + // If you don't specify a reserved IP address, an ephemeral IP address + // is assigned. Methods for specifying an IP address: // - // When the load balancing scheme is EXTERNAL, for global forwarding - // rules, the address must be a global IP, and for regional forwarding - // rules, the address must live in the same region as the forwarding - // rule. If this field is empty, an ephemeral IPv4 address from the same - // scope (global or regional) will be assigned. A regional forwarding - // rule supports IPv4 only. A global forwarding rule supports either - // IPv4 or IPv6. + // * IPv4 dotted decimal, as in `100.1.2.3` * Full URL, as in + // https://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name * Partial URL or by name, as in: * projects/project_id/regions/region/addresses/address-name * regions/region/addresses/address-name * global/addresses/address-name * address-name // - // When the load balancing scheme is INTERNAL_SELF_MANAGED, this must be - // a URL reference to an existing Address resource ( internal regional - // static IP address), with a purpose of GCE_END_POINT and address_type - // of INTERNAL. - // - // When the load balancing scheme is INTERNAL, this can only be an RFC - // 1918 IP address belonging to the network/subnet configured for the - // forwarding rule. By default, if this field is empty, an ephemeral - // internal IP address will be automatically allocated from the IP range - // of the subnet or network configured for this forwarding rule. - // - // An address can be specified either by a literal IP address or a URL - // reference to an existing Address resource. The following examples are - // all valid: - // - 100.1.2.3 - // - - // https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address - // - projects/project/regions/region/addresses/address - // - regions/region/addresses/address - // - global/addresses/address - // - address + // The loadBalancingScheme and the forwarding rule's target determine + // the type of IP address that you can use. For detailed information, + // refer to [IP address + // specifications](/load-balancing/docs/forwarding-rule-concepts#ip_addre + // ss_specifications). IPAddress string `json:"IPAddress,omitempty"` // IPProtocol: The IP protocol to which this rule applies. Valid options // are TCP, UDP, ESP, AH, SCTP or ICMP. // - // When the load balancing scheme is INTERNAL, only TCP and UDP are - // valid. When the load balancing scheme is INTERNAL_SELF_MANAGED, only - // TCPis valid. + // For Internal TCP/UDP Load Balancing, the load balancing scheme is + // INTERNAL, and one of TCP or UDP are valid. For Traffic Director, the + // load balancing scheme is INTERNAL_SELF_MANAGED, and only TCPis valid. + // For Internal HTTP(S) Load Balancing, the load balancing scheme is + // INTERNAL_MANAGED, and only TCP is valid. For HTTP(S), SSL Proxy, and + // TCP Proxy Load Balancing, the load balancing scheme is EXTERNAL and + // only TCP is valid. For Network TCP/UDP Load Balancing, the load + // balancing scheme is EXTERNAL, and one of TCP or UDP is valid. // // Possible values: // "AH" @@ -7446,6 +8566,13 @@ type ForwardingRule struct { // forwarded to the backends configured with this forwarding rule. AllPorts bool `json:"allPorts,omitempty"` + // AllowGlobalAccess: This field is used along with the backend_service + // field for internal load balancing or with the target field for + // internal TargetInstance. If the field is set to TRUE, clients can + // access ILB from all regions. Otherwise only allows access from + // clients in the same region as the internal load balancer. + AllowGlobalAccess bool `json:"allowGlobalAccess,omitempty"` + // BackendService: This field is only used for INTERNAL load // balancing. // @@ -7479,22 +8606,47 @@ type ForwardingRule struct { // compute#forwardingRule for Forwarding Rule resources. Kind string `json:"kind,omitempty"` - // LoadBalancingScheme: This signifies what the ForwardingRule will be - // used for and can only take the following values: INTERNAL, - // INTERNAL_SELF_MANAGED, EXTERNAL. The value of INTERNAL means that - // this will be used for Internal Network Load Balancing (TCP, UDP). The - // value of INTERNAL_SELF_MANAGED means that this will be used for - // Internal Global HTTP(S) LB. The value of EXTERNAL means that this - // will be used for External Load Balancing (HTTP(S) LB, External - // TCP/UDP LB, SSL Proxy) + // LoadBalancingScheme: Specifies the forwarding rule type. EXTERNAL is + // used for: - Classic Cloud VPN gateways - Protocol forwarding to VMs + // from an external IP address - The following load balancers: HTTP(S), + // SSL Proxy, TCP Proxy, and Network TCP/UDP. + // + // INTERNAL is used for: - Protocol forwarding to VMs from an internal + // IP address - Internal TCP/UDP load balancers + // + // INTERNAL_MANAGED is used for: - Internal HTTP(S) load + // balancers + // + // INTERNAL_SELF_MANAGED is used for: - Traffic Director + // + // For more information about forwarding rules, refer to Forwarding rule + // concepts. // // Possible values: // "EXTERNAL" // "INTERNAL" + // "INTERNAL_MANAGED" // "INTERNAL_SELF_MANAGED" // "INVALID" LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` + // MetadataFilters: Opaque filter criteria used by Loadbalancer to + // restrict routing configuration to a limited set xDS compliant + // clients. In their xDS requests to Loadbalancer, xDS clients present + // node metadata. If a match takes place, the relevant routing + // configuration is made available to those proxies. + // For each metadataFilter in this list, if its filterMatchCriteria is + // set to MATCH_ANY, at least one of the filterLabels must match the + // corresponding label provided in the metadata. If its + // filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels + // must match with corresponding labels in the provided + // metadata. + // metadataFilters specified here can be overridden by those specified + // in the UrlMap that this ForwardingRule references. + // metadataFilters only applies to Loadbalancers that have their + // loadBalancingScheme set to INTERNAL_SELF_MANAGED. + MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"` + // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with // RFC1035. Specifically, the name must be 1-63 characters long and @@ -7528,17 +8680,24 @@ type ForwardingRule struct { // "STANDARD" NetworkTier string `json:"networkTier,omitempty"` - // PortRange: This field is used along with the target field for - // TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, - // TargetVpnGateway, TargetPool, TargetInstance. + // PortRange: This field is deprecated. See the port + // field. + PortRange string `json:"portRange,omitempty"` + + // Ports: List of comma-separated ports. The forwarding rule forwards + // packets with matching destination ports. If the forwarding rule's + // loadBalancingScheme is EXTERNAL, and the forwarding rule references a + // target pool, specifying ports is optional. You can specify an + // unlimited number of ports, but they must be contiguous. If you omit + // ports, GCP forwards traffic on any port of the forwarding rule's + // protocol. + // + // If the forwarding rule's loadBalancingScheme is EXTERNAL, and the + // forwarding rule references a target HTTP proxy, target HTTPS proxy, + // target TCP proxy, target SSL proxy, or target VPN gateway, you must + // specify ports using the following constraints: // - // Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets - // addressed to ports in the specified range will be forwarded to - // target. Forwarding rules with the same [IPAddress, IPProtocol] pair - // must have disjoint port ranges. // - // Some types of forwarding target have constraints on the acceptable - // ports: // - TargetHttpProxy: 80, 8080 // - TargetHttpsProxy: 443 // - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, @@ -7546,17 +8705,21 @@ type ForwardingRule struct { // - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, // 995, 1688, 1883, 5222 // - TargetVpnGateway: 500, 4500 - PortRange string `json:"portRange,omitempty"` - - // Ports: This field is used along with the backend_service field for - // internal load balancing. // - // When the load balancing scheme is INTERNAL, a list of ports can be - // configured, for example, ['80'], ['8000','9000'] etc. Only packets - // addressed to these ports will be forwarded to the backends configured - // with this forwarding rule. + // If the forwarding rule's loadBalancingScheme is INTERNAL, you must + // specify ports in one of the following ways: // - // You may specify a maximum of up to 5 ports. + // * A list of up to five ports, which can be non-contiguous * Keyword + // ALL, which causes the forwarding rule to forward traffic on any port + // of the forwarding rule's protocol. + // + // The ports field is used along with the target field for + // TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, + // TargetVpnGateway, TargetPool, TargetInstance. + // + // Applicable only when IPProtocol is TCP, UDP, or SCTP. Forwarding + // rules with the same [IPAddress, IPProtocol] pair must have disjoint + // port ranges. Ports []string `json:"ports,omitempty"` // Region: [Output Only] URL of the region where the regional forwarding @@ -7569,8 +8732,8 @@ type ForwardingRule struct { SelfLink string `json:"selfLink,omitempty"` // ServiceLabel: An optional prefix to the service name for this - // Forwarding Rule. If specified, will be the first label of the fully - // qualified service name. + // Forwarding Rule. If specified, the prefix is the first label of the + // fully qualified service name. // // The label must be 1-63 characters long, and comply with RFC1035. // Specifically, the label must be 1-63 characters long and match the @@ -8188,6 +9351,117 @@ func (s *GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GuestAttributes: A guest attributes entry. +type GuestAttributes struct { + // Kind: [Output Only] Type of the resource. Always + // compute#guestAttributes for guest attributes entry. + Kind string `json:"kind,omitempty"` + + // QueryPath: The path to be queried. This can be the default namespace + // ('/') or a nested namespace ('//') or a specified key ('//') + QueryPath string `json:"queryPath,omitempty"` + + // QueryValue: [Output Only] The value of the requested queried path. + QueryValue *GuestAttributesValue `json:"queryValue,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // VariableKey: The key to search for. + VariableKey string `json:"variableKey,omitempty"` + + // VariableValue: [Output Only] The value found for the requested key. + VariableValue string `json:"variableValue,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GuestAttributes) MarshalJSON() ([]byte, error) { + type NoMethod GuestAttributes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GuestAttributesEntry: A guest attributes namespace/key/value entry. +type GuestAttributesEntry struct { + // Key: Key for the guest attribute entry. + Key string `json:"key,omitempty"` + + // Namespace: Namespace for the guest attribute entry. + Namespace string `json:"namespace,omitempty"` + + // Value: Value for the guest attribute entry. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GuestAttributesEntry) MarshalJSON() ([]byte, error) { + type NoMethod GuestAttributesEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GuestAttributesValue: Array of guest attribute namespace/key/value +// tuples. +type GuestAttributesValue struct { + Items []*GuestAttributesEntry `json:"items,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Items") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GuestAttributesValue) MarshalJSON() ([]byte, error) { + type NoMethod GuestAttributesValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GuestOsFeature: Guest OS features. type GuestOsFeature struct { // Type: The ID of a supported feature. Read Enabling guest operating @@ -8471,9 +9745,14 @@ func (s *HTTPSHealthCheck) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HealthCheck: An HealthCheck resource. This resource defines a -// template for how individual virtual machines should be checked for -// health, via one of the supported protocols. +// HealthCheck: Represents a Health Check resource. +// +// Health checks are used for most GCP load balancers and managed +// instance group auto-healing. For more information, read Health Check +// Concepts. +// +// To perform health checks on network load balancers, you must use +// either httpHealthChecks or httpsHealthChecks. type HealthCheck struct { // CheckIntervalSec: How often (in seconds) to send a health check. The // default value is 5 seconds. @@ -8513,6 +9792,10 @@ type HealthCheck struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` + // Region: [Output Only] Region where the health check resides. Not + // applicable to global health checks. + Region string `json:"region,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -8758,6 +10041,293 @@ func (s *HealthCheckReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type HealthChecksAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of HealthChecksScopedList resources. + Items map[string]HealthChecksScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *HealthChecksAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HealthChecksAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HealthChecksAggregatedListWarning: [Output Only] Informational +// warning message. +type HealthChecksAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*HealthChecksAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HealthChecksAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type HealthChecksAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HealthChecksAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type HealthChecksScopedList struct { + // HealthChecks: A list of HealthChecks contained in this scope. + HealthChecks []*HealthCheck `json:"healthChecks,omitempty"` + + // Warning: Informational warning which replaces the list of backend + // services when the list is empty. + Warning *HealthChecksScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HealthChecks") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HealthChecks") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HealthChecksScopedList) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HealthChecksScopedListWarning: Informational warning which replaces +// the list of backend services when the list is empty. +type HealthChecksScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*HealthChecksScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HealthChecksScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type HealthChecksScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HealthChecksScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type HealthStatus struct { // HealthState: Health state of the instance. // @@ -8885,9 +10455,318 @@ func (s *HostRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpHealthCheck: An HttpHealthCheck resource. This resource defines a -// template for how individual instances should be checked for health, -// via HTTP. +// HttpFaultAbort: Specification for how requests are aborted as part of +// fault injection. +type HttpFaultAbort struct { + // HttpStatus: The HTTP status code used to abort the request. + // The value must be between 200 and 599 inclusive. + HttpStatus int64 `json:"httpStatus,omitempty"` + + // Percentage: The percentage of traffic + // (connections/operations/requests) which will be aborted as part of + // fault injection. + // The value must be between 0.0 and 100.0 inclusive. + Percentage float64 `json:"percentage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HttpStatus") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HttpStatus") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpFaultAbort) MarshalJSON() ([]byte, error) { + type NoMethod HttpFaultAbort + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *HttpFaultAbort) UnmarshalJSON(data []byte) error { + type NoMethod HttpFaultAbort + var s1 struct { + Percentage gensupport.JSONFloat64 `json:"percentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Percentage = float64(s1.Percentage) + return nil +} + +// HttpFaultDelay: Specifies the delay introduced by Loadbalancer before +// forwarding the request to the backend service as part of fault +// injection. +type HttpFaultDelay struct { + // FixedDelay: Specifies the value of the fixed delay interval. + FixedDelay *Duration `json:"fixedDelay,omitempty"` + + // Percentage: The percentage of traffic + // (connections/operations/requests) on which delay will be introduced + // as part of fault injection. + // The value must be between 0.0 and 100.0 inclusive. + Percentage float64 `json:"percentage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FixedDelay") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FixedDelay") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpFaultDelay) MarshalJSON() ([]byte, error) { + type NoMethod HttpFaultDelay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *HttpFaultDelay) UnmarshalJSON(data []byte) error { + type NoMethod HttpFaultDelay + var s1 struct { + Percentage gensupport.JSONFloat64 `json:"percentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Percentage = float64(s1.Percentage) + return nil +} + +// HttpFaultInjection: The specification for fault injection introduced +// into traffic to test the resiliency of clients to backend service +// failure. As part of fault injection, when clients send requests to a +// backend service, delays can be introduced by Loadbalancer on a +// percentage of requests before sending those request to the backend +// service. Similarly requests from clients can be aborted by the +// Loadbalancer for a percentage of requests. +type HttpFaultInjection struct { + // Abort: The specification for how client requests are aborted as part + // of fault injection. + Abort *HttpFaultAbort `json:"abort,omitempty"` + + // Delay: The specification for how client requests are delayed as part + // of fault injection, before being sent to a backend service. + Delay *HttpFaultDelay `json:"delay,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Abort") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Abort") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpFaultInjection) MarshalJSON() ([]byte, error) { + type NoMethod HttpFaultInjection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpHeaderAction: The request and response header transformations +// that take effect before the request is passed along to the selected +// backendService. +type HttpHeaderAction struct { + // RequestHeadersToAdd: Headers to add to a matching request prior to + // forwarding the request to the backendService. + RequestHeadersToAdd []*HttpHeaderOption `json:"requestHeadersToAdd,omitempty"` + + // RequestHeadersToRemove: A list of header names for headers that need + // to be removed from the request prior to forwarding the request to the + // backendService. + RequestHeadersToRemove []string `json:"requestHeadersToRemove,omitempty"` + + // ResponseHeadersToAdd: Headers to add the response prior to sending + // the response back to the client. + ResponseHeadersToAdd []*HttpHeaderOption `json:"responseHeadersToAdd,omitempty"` + + // ResponseHeadersToRemove: A list of header names for headers that need + // to be removed from the response prior to sending the response back to + // the client. + ResponseHeadersToRemove []string `json:"responseHeadersToRemove,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestHeadersToAdd") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestHeadersToAdd") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *HttpHeaderAction) MarshalJSON() ([]byte, error) { + type NoMethod HttpHeaderAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpHeaderMatch: matchRule criteria for request header matches. +type HttpHeaderMatch struct { + // ExactMatch: The value should exactly match contents of + // exactMatch. + // Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, + // presentMatch or rangeMatch must be set. + ExactMatch string `json:"exactMatch,omitempty"` + + // HeaderName: The name of the HTTP header to match. + // For matching against the HTTP request's authority, use a headerMatch + // with the header name ":authority". + // For matching a request's method, use the headerName ":method". + HeaderName string `json:"headerName,omitempty"` + + // InvertMatch: If set to false, the headerMatch is considered a match + // if the match criteria above are met. If set to true, the headerMatch + // is considered a match if the match criteria above are NOT met. + // The default setting is false. + InvertMatch bool `json:"invertMatch,omitempty"` + + // PrefixMatch: The value of the header must start with the contents of + // prefixMatch. + // Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, + // presentMatch or rangeMatch must be set. + PrefixMatch string `json:"prefixMatch,omitempty"` + + // PresentMatch: A header with the contents of headerName must exist. + // The match takes place whether or not the request's header has a value + // or not. + // Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, + // presentMatch or rangeMatch must be set. + PresentMatch bool `json:"presentMatch,omitempty"` + + // RangeMatch: The header value must be an integer and its value must be + // in the range specified in rangeMatch. If the header does not contain + // an integer, number or is empty, the match fails. + // For example for a range [-5, 0] + // - -3 will match. + // - 0 will not match. + // - 0.25 will not match. + // - -3someString will not match. + // Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, + // presentMatch or rangeMatch must be set. + RangeMatch *Int64RangeMatch `json:"rangeMatch,omitempty"` + + // RegexMatch: The value of the header must match the regualar + // expression specified in regexMatch. For regular expression grammar, + // please see: en.cppreference.com/w/cpp/regex/ecmascript + // For matching against a port specified in the HTTP request, use a + // headerMatch with headerName set to PORT and a regular expression that + // satisfies the RFC2616 Host header's port specifier. + // Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, + // presentMatch or rangeMatch must be set. + RegexMatch string `json:"regexMatch,omitempty"` + + // SuffixMatch: The value of the header must end with the contents of + // suffixMatch. + // Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, + // presentMatch or rangeMatch must be set. + SuffixMatch string `json:"suffixMatch,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExactMatch") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpHeaderMatch) MarshalJSON() ([]byte, error) { + type NoMethod HttpHeaderMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpHeaderOption: Specification determining how headers are added to +// requests or responses. +type HttpHeaderOption struct { + // HeaderName: The name of the header. + HeaderName string `json:"headerName,omitempty"` + + // HeaderValue: The value of the header to add. + HeaderValue string `json:"headerValue,omitempty"` + + // Replace: If false, headerValue is appended to any values that already + // exist for the header. If true, headerValue is set for the header, + // discarding any values that were set for that header. + // The default value is false. + Replace bool `json:"replace,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HeaderName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HeaderName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpHeaderOption) MarshalJSON() ([]byte, error) { + type NoMethod HttpHeaderOption + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpHealthCheck: Represents a legacy HTTP Health Check +// resource. +// +// Legacy health checks are required by network load balancers. For more +// information, read Health Check Concepts. type HttpHealthCheck struct { // CheckIntervalSec: How often (in seconds) to send a health check. The // default value is 5 seconds. @@ -8932,7 +10811,7 @@ type HttpHealthCheck struct { Port int64 `json:"port,omitempty"` // RequestPath: The request path of the HTTP health check request. The - // default value is /. + // default value is /. This field does not support query parameters. RequestPath string `json:"requestPath,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -9131,9 +11010,438 @@ func (s *HttpHealthCheckListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpsHealthCheck: An HttpsHealthCheck resource. This resource defines -// a template for how individual instances should be checked for health, -// via HTTPS. +// HttpQueryParameterMatch: HttpRouteRuleMatch criteria for a request's +// query parameter. +type HttpQueryParameterMatch struct { + // ExactMatch: The queryParameterMatch matches if the value of the + // parameter exactly matches the contents of exactMatch. + // Only one of presentMatch, exactMatch and regexMatch must be set. + ExactMatch string `json:"exactMatch,omitempty"` + + // Name: The name of the query parameter to match. The query parameter + // must exist in the request, in the absence of which the request match + // fails. + Name string `json:"name,omitempty"` + + // PresentMatch: Specifies that the queryParameterMatch matches if the + // request contains the query parameter, irrespective of whether the + // parameter has a value or not. + // Only one of presentMatch, exactMatch and regexMatch must be set. + PresentMatch bool `json:"presentMatch,omitempty"` + + // RegexMatch: The queryParameterMatch matches if the value of the + // parameter matches the regular expression specified by regexMatch. For + // the regular expression grammar, please see + // en.cppreference.com/w/cpp/regex/ecmascript + // Only one of presentMatch, exactMatch and regexMatch must be set. + RegexMatch string `json:"regexMatch,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExactMatch") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpQueryParameterMatch) MarshalJSON() ([]byte, error) { + type NoMethod HttpQueryParameterMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRedirectAction: Specifies settings for an HTTP redirect. +type HttpRedirectAction struct { + // HostRedirect: The host that will be used in the redirect response + // instead of the one that was supplied in the request. + // The value must be between 1 and 255 characters. + HostRedirect string `json:"hostRedirect,omitempty"` + + // HttpsRedirect: If set to true, the URL scheme in the redirected + // request is set to https. If set to false, the URL scheme of the + // redirected request will remain the same as that of the request. + // This must only be set for UrlMaps used in TargetHttpProxys. Setting + // this true for TargetHttpsProxy is not permitted. + // The default is set to false. + HttpsRedirect bool `json:"httpsRedirect,omitempty"` + + // PathRedirect: The path that will be used in the redirect response + // instead of the one that was supplied in the request. + // Only one of pathRedirect or prefixRedirect must be specified. + // The value must be between 1 and 1024 characters. + PathRedirect string `json:"pathRedirect,omitempty"` + + // PrefixRedirect: The prefix that replaces the prefixMatch specified in + // the HttpRouteRuleMatch, retaining the remaining portion of the URL + // before redirecting the request. + PrefixRedirect string `json:"prefixRedirect,omitempty"` + + // RedirectResponseCode: The HTTP Status code to use for this + // RedirectAction. + // Supported values are: + // - MOVED_PERMANENTLY_DEFAULT, which is the default value and + // corresponds to 301. + // - FOUND, which corresponds to 302. + // - SEE_OTHER which corresponds to 303. + // - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the + // request method will be retained. + // - PERMANENT_REDIRECT, which corresponds to 308. In this case, the + // request method will be retained. + // + // Possible values: + // "FOUND" + // "MOVED_PERMANENTLY_DEFAULT" + // "PERMANENT_REDIRECT" + // "SEE_OTHER" + // "TEMPORARY_REDIRECT" + RedirectResponseCode string `json:"redirectResponseCode,omitempty"` + + // StripQuery: If set to true, any accompanying query portion of the + // original URL is removed prior to redirecting the request. If set to + // false, the query portion of the original URL is retained. + // The default is set to false. + StripQuery bool `json:"stripQuery,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HostRedirect") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HostRedirect") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod HttpRedirectAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRetryPolicy: The retry policy associates with HttpRouteRule +type HttpRetryPolicy struct { + // NumRetries: Specifies the allowed number retries. This number must be + // > 0. If not specified, defaults to 1. + NumRetries int64 `json:"numRetries,omitempty"` + + // PerTryTimeout: Specifies a non-zero timeout per retry attempt. + // If not specified, will use the timeout set in HttpRouteAction. If + // timeout in HttpRouteAction is not set, will use the largest timeout + // among all backend services associated with the route. + PerTryTimeout *Duration `json:"perTryTimeout,omitempty"` + + // RetryConditions: Specfies one or more conditions when this retry rule + // applies. Valid values are: + // - 5xx: Loadbalancer will attempt a retry if the backend service + // responds with any 5xx response code, or if the backend service does + // not respond at all, example: disconnects, reset, read timeout, + // connection failure, and refused streams. + // - gateway-error: Similar to 5xx, but only applies to response codes + // 502, 503 or 504. + // - + // - connect-failure: Loadbalancer will retry on failures connecting to + // backend services, for example due to connection timeouts. + // - retriable-4xx: Loadbalancer will retry for retriable 4xx response + // codes. Currently the only retriable error supported is 409. + // - refused-stream:Loadbalancer will retry if the backend service + // resets the stream with a REFUSED_STREAM error code. This reset type + // indicates that it is safe to retry. + // - cancelledLoadbalancer will retry if the gRPC status code in the + // response header is set to cancelled + // - deadline-exceeded: Loadbalancer will retry if the gRPC status code + // in the response header is set to deadline-exceeded + // - resource-exhausted: Loadbalancer will retry if the gRPC status code + // in the response header is set to resource-exhausted + // - unavailable: Loadbalancer will retry if the gRPC status code in the + // response header is set to unavailable + RetryConditions []string `json:"retryConditions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NumRetries") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NumRetries") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRetryPolicy) MarshalJSON() ([]byte, error) { + type NoMethod HttpRetryPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type HttpRouteAction struct { + // CorsPolicy: The specification for allowing client side cross-origin + // requests. Please see W3C Recommendation for Cross Origin Resource + // Sharing + CorsPolicy *CorsPolicy `json:"corsPolicy,omitempty"` + + // FaultInjectionPolicy: The specification for fault injection + // introduced into traffic to test the resiliency of clients to backend + // service failure. As part of fault injection, when clients send + // requests to a backend service, delays can be introduced by + // Loadbalancer on a percentage of requests before sending those request + // to the backend service. Similarly requests from clients can be + // aborted by the Loadbalancer for a percentage of requests. + // timeout and retry_policy will be ignored by clients that are + // configured with a fault_injection_policy. + FaultInjectionPolicy *HttpFaultInjection `json:"faultInjectionPolicy,omitempty"` + + // RequestMirrorPolicy: Specifies the policy on how requests intended + // for the route's backends are shadowed to a separate mirrored backend + // service. Loadbalancer does not wait for responses from the shadow + // service. Prior to sending traffic to the shadow service, the host / + // authority header is suffixed with -shadow. + RequestMirrorPolicy *RequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"` + + // RetryPolicy: Specifies the retry policy associated with this route. + RetryPolicy *HttpRetryPolicy `json:"retryPolicy,omitempty"` + + // Timeout: Specifies the timeout for the selected route. Timeout is + // computed from the time the request has been fully processed (i.e. + // end-of-stream) up until the response has been completely processed. + // Timeout includes all retries. + // If not specified, will use the largest timeout among all backend + // services associated with the route. + Timeout *Duration `json:"timeout,omitempty"` + + // UrlRewrite: The spec to modify the URL of the request, prior to + // forwarding the request to the matched service + UrlRewrite *UrlRewrite `json:"urlRewrite,omitempty"` + + // WeightedBackendServices: A list of weighted backend services to send + // traffic to when a route match occurs. The weights determine the + // fraction of traffic that flows to their corresponding backend + // service. If all traffic needs to go to a single backend service, + // there must be one weightedBackendService with weight set to a non 0 + // number. + // Once a backendService is identified and before forwarding the request + // to the backend service, advanced routing actions like Url rewrites + // and header transformations are applied depending on additional + // settings specified in this HttpRouteAction. + WeightedBackendServices []*WeightedBackendService `json:"weightedBackendServices,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CorsPolicy") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CorsPolicy") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteAction) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRouteRule: An HttpRouteRule specifies how to match an HTTP +// request and the corresponding routing action that load balancing +// proxies will perform. +type HttpRouteRule struct { + // Description: The short description conveying the intent of this + // routeRule. + // The description can have a maximum length of 1024 characters. + Description string `json:"description,omitempty"` + + // HeaderAction: Specifies changes to request and response headers that + // need to take effect for the selected backendService. + // The headerAction specified here are applied before the matching + // pathMatchers[].headerAction and after + // pathMatchers[].routeRules[].routeAction.weightedBackendService.backend + // ServiceWeightAction[].headerAction + HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` + + MatchRules []*HttpRouteRuleMatch `json:"matchRules,omitempty"` + + // Priority: For routeRules within a given pathMatcher, priority + // determines the order in which load balancer will interpret + // routeRules. RouteRules are evaluated in order of priority, from the + // lowest to highest number. The priority of a rule decreases as its + // number increases (1, 2, 3, N+1). The first rule that matches the + // request is applied. + // You cannot configure two or more routeRules with the same priority. + // Priority for each rule must be set to a number between 0 and + // 2147483647 inclusive. + // Priority numbers can have gaps, which enable you to add or remove + // rules in the future without affecting the rest of the rules. For + // example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority + // numbers to which you could add rules numbered from 6 to 8, 10 to 11, + // and 13 to 15 in the future without any impact on existing rules. + Priority int64 `json:"priority,omitempty"` + + // RouteAction: In response to a matching matchRule, the load balancer + // performs advanced routing actions like URL rewrites, header + // transformations, etc. prior to forwarding the request to the selected + // backend. If routeAction specifies any weightedBackendServices, + // service must not be set. Conversely if service is set, routeAction + // cannot contain any weightedBackendServices. + // Only one of routeAction or urlRedirect must be set. + RouteAction *HttpRouteAction `json:"routeAction,omitempty"` + + // Service: The full or partial URL of the backend service resource to + // which traffic is directed if this rule is matched. If routeAction is + // additionally specified, advanced routing actions like URL Rewrites, + // etc. take effect prior to sending the request to the backend. + // However, if service is specified, routeAction cannot contain any + // weightedBackendService s. Conversely, if routeAction specifies any + // weightedBackendServices, service must not be specified. + // Only one of urlRedirect, service or + // routeAction.weightedBackendService must be set. + Service string `json:"service,omitempty"` + + // UrlRedirect: When this rule is matched, the request is redirected to + // a URL specified by urlRedirect. + // If urlRedirect is specified, service or routeAction must not be set. + UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteRule) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRouteRuleMatch: HttpRouteRuleMatch specifies a set of criteria +// for matching requests to an HttpRouteRule. All specified criteria +// must be satisfied for a match to occur. +type HttpRouteRuleMatch struct { + // FullPathMatch: For satifying the matchRule condition, the path of the + // request must exactly match the value specified in fullPathMatch after + // removing any query parameters and anchor that may be part of the + // original URL. + // FullPathMatch must be between 1 and 1024 characters. + // Only one of prefixMatch, fullPathMatch or regexMatch must be + // specified. + FullPathMatch string `json:"fullPathMatch,omitempty"` + + // HeaderMatches: Specifies a list of header match criteria, all of + // which must match corresponding headers in the request. + HeaderMatches []*HttpHeaderMatch `json:"headerMatches,omitempty"` + + // IgnoreCase: Specifies that prefixMatch and fullPathMatch matches are + // case sensitive. + // The default value is false. + // caseSensitive must not be used with regexMatch. + IgnoreCase bool `json:"ignoreCase,omitempty"` + + // MetadataFilters: Opaque filter criteria used by Loadbalancer to + // restrict routing configuration to a limited set xDS compliant + // clients. In their xDS requests to Loadbalancer, xDS clients present + // node metadata. If a match takes place, the relevant routing + // configuration is made available to those proxies. + // For each metadataFilter in this list, if its filterMatchCriteria is + // set to MATCH_ANY, at least one of the filterLabels must match the + // corresponding label provided in the metadata. If its + // filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels + // must match with corresponding labels in the provided + // metadata. + // metadataFilters specified here can be overrides those specified in + // ForwardingRule that refers to this UrlMap. + // metadataFilters only applies to Loadbalancers that have their + // loadBalancingScheme set to INTERNAL_SELF_MANAGED. + MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"` + + // PrefixMatch: For satifying the matchRule condition, the request's + // path must begin with the specified prefixMatch. prefixMatch must + // begin with a /. + // The value must be between 1 and 1024 characters. + // Only one of prefixMatch, fullPathMatch or regexMatch must be + // specified. + PrefixMatch string `json:"prefixMatch,omitempty"` + + // QueryParameterMatches: Specifies a list of query parameter match + // criteria, all of which must match corresponding query parameters in + // the request. + QueryParameterMatches []*HttpQueryParameterMatch `json:"queryParameterMatches,omitempty"` + + // RegexMatch: For satifying the matchRule condition, the path of the + // request must satisfy the regular expression specified in regexMatch + // after removing any query parameters and anchor supplied with the + // original URL. For regular expression grammar please see + // en.cppreference.com/w/cpp/regex/ecmascript + // Only one of prefixMatch, fullPathMatch or regexMatch must be + // specified. + RegexMatch string `json:"regexMatch,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FullPathMatch") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FullPathMatch") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteRuleMatch) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteRuleMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpsHealthCheck: Represents a legacy HTTPS Health Check +// resource. +// +// Legacy health checks are required by network load balancers. For more +// information, read Health Check Concepts. type HttpsHealthCheck struct { // CheckIntervalSec: How often (in seconds) to send a health check. The // default value is 5 seconds. @@ -9376,7 +11684,10 @@ func (s *HttpsHealthCheckListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Image: An Image resource. (== resource_for beta.images ==) (== +// Image: Represents an Image resource. +// +// You can use images to create boot disks for your VM instances. For +// more information, read Images. (== resource_for beta.images ==) (== // resource_for v1.images ==) type Image struct { // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google @@ -9548,6 +11859,10 @@ type Image struct { // "READY" Status string `json:"status,omitempty"` + // StorageLocations: Cloud Storage bucket storage location of the image + // (regional or multi-regional). + StorageLocations []string `json:"storageLocations,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -9774,8 +12089,11 @@ func (s *ImageListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Instance: An Instance resource. (== resource_for beta.instances ==) -// (== resource_for v1.instances ==) +// Instance: Represents an Instance resource. +// +// An instance is a virtual machine that is hosted on Google Cloud +// Platform. For more information, read Virtual Machine Instances. (== +// resource_for beta.instances ==) (== resource_for v1.instances ==) type Instance struct { // CanIpForward: Allows this instance to send and receive packets with // non-matching destination or source IPs. This is required if you plan @@ -9802,10 +12120,18 @@ type Instance struct { // must be created before you can assign them. Disks []*AttachedDisk `json:"disks,omitempty"` + // DisplayDevice: Enables display device for the instance. + DisplayDevice *DisplayDevice `json:"displayDevice,omitempty"` + // GuestAccelerators: A list of the type and count of accelerator cards // attached to the instance. GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` + // Hostname: Specifies the hostname of the instance. The specified + // hostname must be RFC1035 compliant. If hostname is not specified, the + // default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when + // using the global DNS, and + // [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. Hostname string `json:"hostname,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -9880,6 +12206,10 @@ type Instance struct { // Multiple interfaces are supported per instance. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + // ReservationAffinity: Specifies the reservations that this instance + // can consume from. + ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` + // Scheduling: Sets the scheduling options for this instance. Scheduling *Scheduling `json:"scheduling,omitempty"` @@ -9967,7 +12297,7 @@ type InstanceAggregatedList struct { // server. Id string `json:"id,omitempty"` - // Items: A list of InstancesScopedList resources. + // Items: An object that contains a list of instances scoped by zone. Items map[string]InstancesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -10118,10 +12448,18 @@ func (s *InstanceAggregatedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceGroup: InstanceGroups (== resource_for beta.instanceGroups -// ==) (== resource_for v1.instanceGroups ==) (== resource_for -// beta.regionInstanceGroups ==) (== resource_for -// v1.regionInstanceGroups ==) +// InstanceGroup: Represents an unmanaged Instance Group resource. +// +// Use unmanaged instance groups if you need to apply load balancing to +// groups of heterogeneous instances or if you need to manage the +// instances yourself. For more information, read Instance groups. +// +// For zonal unmanaged Instance Group, use instanceGroups resource. +// +// For regional unmanaged Instance Group, use regionInstanceGroups +// resource. (== resource_for beta.instanceGroups ==) (== resource_for +// v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) +// (== resource_for v1.regionInstanceGroups ==) type InstanceGroup struct { // CreationTimestamp: [Output Only] The creation timestamp for this // instance group in RFC3339 text format. @@ -10523,8 +12861,18 @@ func (s *InstanceGroupListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceGroupManager: An Instance Group Manager resource. (== -// resource_for beta.instanceGroupManagers ==) (== resource_for +// InstanceGroupManager: Represents a Managed Instance Group +// resource. +// +// An instance group is a collection of VM instances that you can manage +// as a single entity. For more information, read Instance groups. +// +// For zonal Managed Instance Group, use the instanceGroupManagers +// resource. +// +// For regional Managed Instance Group, use the +// regionInstanceGroupManagers resource. (== resource_for +// beta.instanceGroupManagers ==) (== resource_for // v1.instanceGroupManagers ==) (== resource_for // beta.regionInstanceGroupManagers ==) (== resource_for // v1.regionInstanceGroupManagers ==) @@ -11163,6 +13511,13 @@ type InstanceGroupManagerUpdatePolicy struct { // "RESTART" MinimalAction string `json:"minimalAction,omitempty"` + // Type: The type of update process. You can specify either PROACTIVE so + // that the instance group manager proactively executes actions in order + // to bring instances to their target versions or OPPORTUNISTIC so that + // no action is proactively executed but the update will be performed as + // part of other actions (for example, resizes or recreateInstances + // calls). + // // Possible values: // "OPPORTUNISTIC" // "PROACTIVE" @@ -12383,6 +14738,10 @@ type InstanceProperties struct { // interface. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + // ReservationAffinity: Specifies the reservations that this instance + // can consume from. + ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"` + // Scheduling: Specifies the scheduling options for the instances that // are created from this template. Scheduling *Scheduling `json:"scheduling,omitempty"` @@ -12451,8 +14810,12 @@ func (s *InstanceReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InstanceTemplate: An Instance Template resource. (== resource_for -// beta.instanceTemplates ==) (== resource_for v1.instanceTemplates ==) +// InstanceTemplate: Represents an Instance Template resource. +// +// You can use instance templates to create VM instances and managed +// instance groups. For more information, read Instance Templates. (== +// resource_for beta.instanceTemplates ==) (== resource_for +// v1.instanceTemplates ==) type InstanceTemplate struct { // CreationTimestamp: [Output Only] The creation timestamp for this // instance template in RFC3339 text format. @@ -13044,11 +15407,46 @@ func (s *InstancesStartWithEncryptionKeyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Interconnect: Represents an Interconnects resource. The Interconnects -// resource is a dedicated connection between Google's network and your -// on-premises network. For more information, see the Dedicated -// overview page. (== resource_for v1.interconnects ==) (== resource_for -// beta.interconnects ==) +// Int64RangeMatch: HttpRouteRuleMatch criteria for field values that +// must stay within the specified integer range. +type Int64RangeMatch struct { + // RangeEnd: The end of the range (exclusive) in signed long integer + // format. + RangeEnd int64 `json:"rangeEnd,omitempty,string"` + + // RangeStart: The start of the range (inclusive) in signed long integer + // format. + RangeStart int64 `json:"rangeStart,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "RangeEnd") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RangeEnd") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Int64RangeMatch) MarshalJSON() ([]byte, error) { + type NoMethod Int64RangeMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Interconnect: Represents an Interconnect resource. +// +// An Interconnect resource is a dedicated connection between the GCP +// network and your on-premises network. For more information, read the +// Dedicated Interconnect Overview. (== resource_for v1.interconnects +// ==) (== resource_for beta.interconnects ==) type Interconnect struct { // AdminEnabled: Administrative status of the interconnect. When this is // set to true, the Interconnect is functional and can carry traffic. @@ -13120,6 +15518,7 @@ type Interconnect struct { // bundle, not the speed of the entire bundle. // // Possible values: + // "LINK_TYPE_ETHERNET_100G_LR" // "LINK_TYPE_ETHERNET_10G_LR" LinkType string `json:"linkType,omitempty"` @@ -13218,10 +15617,14 @@ func (s *Interconnect) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectAttachment: Represents an InterconnectAttachment (VLAN -// attachment) resource. For more information, see Creating VLAN -// Attachments. (== resource_for beta.interconnectAttachments ==) (== -// resource_for v1.interconnectAttachments ==) +// InterconnectAttachment: Represents an Interconnect Attachment (VLAN) +// resource. +// +// You can use Interconnect attachments (VLANS) to connect your Virtual +// Private Cloud networks to your on-premises networks through an +// Interconnect. For more information, read Creating VLAN Attachments. +// (== resource_for beta.interconnectAttachments ==) (== resource_for +// v1.interconnectAttachments ==) type InterconnectAttachment struct { // AdminEnabled: Determines whether this Attachment will carry packets. // Not present for PARTNER_PROVIDER. @@ -13243,16 +15646,20 @@ type InterconnectAttachment struct { // - BPS_2G: 2 Gbit/s // - BPS_5G: 5 Gbit/s // - BPS_10G: 10 Gbit/s + // - BPS_20G: 20 Gbit/s + // - BPS_50G: 50 Gbit/s // // Possible values: // "BPS_100M" // "BPS_10G" // "BPS_1G" // "BPS_200M" + // "BPS_20G" // "BPS_2G" // "BPS_300M" // "BPS_400M" // "BPS_500M" + // "BPS_50G" // "BPS_50M" // "BPS_5G" Bandwidth string `json:"bandwidth,omitempty"` @@ -13304,7 +15711,7 @@ type InterconnectAttachment struct { // GoogleReferenceId: [Output Only] Google reference ID, to be used when // raising support tickets with Google or otherwise to debug backend - // connectivity issues. + // connectivity issues. [Deprecated] This field is not used. GoogleReferenceId string `json:"googleReferenceId,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -14406,10 +16813,12 @@ func (s *InterconnectListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// InterconnectLocation: Represents an InterconnectLocations resource. -// The InterconnectLocations resource describes the locations where you -// can connect to Google's networks. For more information, see -// Colocation Facilities. +// InterconnectLocation: Represents an Interconnect Attachment (VLAN) +// Location resource. +// +// You can use this resource to find location details about an +// Interconnect attachment (VLAN). For more information about +// interconnect attachments, read Creating VLAN Attachments. type InterconnectLocation struct { // Address: [Output Only] The postal address of the Point of Presence, // each line in the address is separated by a newline character. @@ -14784,6 +17193,7 @@ type InterconnectOutageNotification struct { // Possible values: // "ACTIVE" // "CANCELLED" + // "COMPLETED" // "NS_ACTIVE" // "NS_CANCELED" State string `json:"state,omitempty"` @@ -15290,19 +17700,22 @@ func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) { // // Examples: counter { metric: "/debug_access_count" field: // "iam_principal" } ==> increment counter -// /iam/policy/backend_debug_access_count {iam_principal=[value of +// /iam/policy/debug_access_count {iam_principal=[value of // IAMContext.principal]} // -// At this time we do not support multiple field names (though this may -// be supported in the future). +// TODO(b/141846426): Consider supporting "authority" and +// "iam_principal" fields in the same counter. type LogConfigCounterOptions struct { + // CustomFields: Custom fields. + CustomFields []*LogConfigCounterOptionsCustomField `json:"customFields,omitempty"` + // Field: The field value to attribute. Field string `json:"field,omitempty"` // Metric: The metric to update. Metric string `json:"metric,omitempty"` - // ForceSendFields is a list of field names (e.g. "Field") to + // ForceSendFields is a list of field names (e.g. "CustomFields") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -15310,7 +17723,42 @@ type LogConfigCounterOptions struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Field") to include in API + // NullFields is a list of field names (e.g. "CustomFields") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { + type NoMethod LogConfigCounterOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LogConfigCounterOptionsCustomField: Custom fields. These can be used +// to create a counter with arbitrary field/value pairs. See: +// go/rpcsp-custom-fields. +type LogConfigCounterOptionsCustomField struct { + // Name: Name is the field name. + Name string `json:"name,omitempty"` + + // Value: Value is the field value. It is important that in contrast to + // the CounterOptions.field, the value here is a constant that is not + // derived from the IAMContext. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -15319,8 +17767,8 @@ type LogConfigCounterOptions struct { NullFields []string `json:"-"` } -func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) { - type NoMethod LogConfigCounterOptions +func (s *LogConfigCounterOptionsCustomField) MarshalJSON() ([]byte, error) { + type NoMethod LogConfigCounterOptionsCustomField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -15359,8 +17807,12 @@ func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// MachineType: A Machine Type resource. (== resource_for -// v1.machineTypes ==) (== resource_for beta.machineTypes ==) +// MachineType: Represents a Machine Type resource. +// +// You can use specific machine types for your VM instances based on +// performance and pricing requirements. For more information, read +// Machine Types. (== resource_for v1.machineTypes ==) (== resource_for +// beta.machineTypes ==) type MachineType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -16221,6 +18673,103 @@ func (s *MetadataItems) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MetadataFilter: Opaque filter criteria used by loadbalancers to +// restrict routing configuration to a limited set of loadbalancing +// proxies. Proxies and sidecars involved in loadbalancing would +// typically present metadata to the loadbalancers which need to match +// criteria specified here. If a match takes place, the relevant routing +// configuration is made available to those proxies. +// For each metadataFilter in this list, if its filterMatchCriteria is +// set to MATCH_ANY, at least one of the filterLabels must match the +// corresponding label provided in the metadata. If its +// filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels +// must match with corresponding labels in the provided metadata. +// An example for using metadataFilters would be: if loadbalancing +// involves Envoys, they will only receive routing configuration when +// values in metadataFilters match values supplied in /global/gateways/default-internet-gateway + // projects/project/global/gateways/default-internet-gateway NextHopGateway string `json:"nextHopGateway,omitempty"` + // NextHopIlb: The URL to a forwarding rule of type + // loadBalancingScheme=INTERNAL that should handle matching packets. You + // can only specify the forwarding rule as a partial or full URL. For + // example, the following are all valid URLs: + // - + // https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule + // - regions/region/forwardingRules/forwardingRule + NextHopIlb string `json:"nextHopIlb,omitempty"` + // NextHopInstance: The URL to an instance that should handle matching // packets. You can specify this as a full or partial URL. For // example: @@ -22391,9 +26786,9 @@ type Route struct { // Priority: The priority of this route. Priority is used to break ties // in cases where there is more than one matching route of equal prefix - // length. In the case of two routes with equal prefix length, the one - // with the lowest-numbered priority value wins. Default value is 1000. - // Valid range is 0 through 65535. + // length. In cases where multiple routes have equal prefix length, the + // one with the lowest-numbered priority value wins. The default value + // is `1000`. The priority value must be from `0` to `65535`, inclusive. Priority int64 `json:"priority,omitempty"` // SelfLink: [Output Only] Server-defined fully-qualified URL for this @@ -22689,7 +27084,10 @@ func (s *RouteListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Router: Router resource. +// Router: Represents a Cloud Router resource. +// +// For more information about Cloud Router, read the the Cloud Router +// overview. type Router struct { // Bgp: BGP information specific to this router. Bgp *RouterBgp `json:"bgp,omitempty"` @@ -23074,8 +27472,13 @@ type RouterBgpPeer struct { // "MANAGED_BY_USER" ManagementType string `json:"managementType,omitempty"` - // Name: Name of this BGP peer. The name must be 1-63 characters long - // and comply with RFC1035. + // Name: Name of this BGP peer. The name must be 1-63 characters long, + // and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. Name string `json:"name,omitempty"` // PeerAsn: Peer BGP Autonomous System Number (ASN). Each BGP interface @@ -23145,7 +27548,12 @@ type RouterInterface struct { ManagementType string `json:"managementType,omitempty"` // Name: Name of this interface entry. The name must be 1-63 characters - // long and comply with RFC1035. + // long, and comply with RFC1035. Specifically, the name must be 1-63 + // characters long and match the regular expression + // `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be + // a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot + // be a dash. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "IpRange") to @@ -23333,6 +27741,11 @@ func (s *RouterListWarningData) MarshalJSON() ([]byte, error) { // that would be used for NAT. GCP would auto-allocate ephemeral IPs if // no external IPs are provided. type RouterNat struct { + // DrainNatIps: A list of URLs of the IP resources to be drained. These + // IPs must be valid static external IPs that have been assigned to the + // NAT. These IPs should be used for updating/patching a NAT only. + DrainNatIps []string `json:"drainNatIps,omitempty"` + // IcmpIdleTimeoutSec: Timeout (in seconds) for ICMP connections. // Defaults to 30s if not set. IcmpIdleTimeoutSec int64 `json:"icmpIdleTimeoutSec,omitempty"` @@ -23406,21 +27819,20 @@ type RouterNat struct { // to 30s if not set. UdpIdleTimeoutSec int64 `json:"udpIdleTimeoutSec,omitempty"` - // ForceSendFields is a list of field names (e.g. "IcmpIdleTimeoutSec") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "DrainNatIps") to + // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IcmpIdleTimeoutSec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "DrainNatIps") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -23436,9 +27848,12 @@ type RouterNatLogConfig struct { // default. Enable bool `json:"enable,omitempty"` - // Filter: Specifies the desired filtering of logs on this NAT. If + // Filter: Specify the desired filtering of logs on this NAT. If // unspecified, logs are exported for all connections handled by this - // NAT. + // NAT. This option can take one of the following values: + // - ERRORS_ONLY: Export logs only for connection failures. + // - TRANSLATIONS_ONLY: Export logs only for successful connections. + // - ALL: Export logs for all connections, successful and unsuccessful. // // Possible values: // "ALL" @@ -23621,6 +28036,14 @@ type RouterStatusNatStatus struct { // ["1.1.1.1", "129.2.16.89"] AutoAllocatedNatIps []string `json:"autoAllocatedNatIps,omitempty"` + // DrainAutoAllocatedNatIps: A list of IPs auto-allocated for NAT that + // are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. + DrainAutoAllocatedNatIps []string `json:"drainAutoAllocatedNatIps,omitempty"` + + // DrainUserAllocatedNatIps: A list of IPs user-allocated for NAT that + // are in drain mode. Example: ["1.1.1.1", "179.12.26.133"]. + DrainUserAllocatedNatIps []string `json:"drainUserAllocatedNatIps,omitempty"` + // MinExtraNatIpsNeeded: The number of extra IPs to allocate. This will // be greater than 0 only if user-specified IPs are NOT enough to allow // all configured VMs to use NAT. This value is meaningful only when @@ -24003,7 +28426,7 @@ func (s *SSLHealthCheck) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Scheduling: Sets the scheduling options for an Instance. +// Scheduling: Sets the scheduling options for an Instance. NextID: 9 type Scheduling struct { // AutomaticRestart: Specifies whether the instance should be // automatically restarted if it is terminated by Compute Engine (not @@ -24015,7 +28438,9 @@ type Scheduling struct { // restarted if it is terminated by Compute Engine. AutomaticRestart *bool `json:"automaticRestart,omitempty"` - // NodeAffinities: A set of node affinity and anti-affinity. + // NodeAffinities: A set of node affinity and anti-affinity + // configurations. Refer to Configuring node affinity for more + // information. NodeAffinities []*SchedulingNodeAffinity `json:"nodeAffinities,omitempty"` // OnHostMaintenance: Defines the maintenance behavior for this @@ -24064,7 +28489,8 @@ type SchedulingNodeAffinity struct { // Key: Corresponds to the label key of Node resource. Key string `json:"key,omitempty"` - // Operator: Defines the operation of node selection. + // Operator: Defines the operation of node selection. Valid operators + // are IN for affinity and NOT_IN for anti-affinity. // // Possible values: // "IN" @@ -24098,10 +28524,13 @@ func (s *SchedulingNodeAffinity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SecurityPolicy: A security policy is comprised of one or more rules. -// It can also be associated with one or more 'targets'. (== -// resource_for v1.securityPolicies ==) (== resource_for -// beta.securityPolicies ==) +// SecurityPolicy: Represents a Cloud Armor Security Policy +// resource. +// +// Only external backend services that use load balancers can reference +// a Security Policy. For more information, read Cloud Armor Security +// Policy Concepts. (== resource_for v1.securityPolicies ==) (== +// resource_for beta.securityPolicies ==) type SecurityPolicy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -24531,6 +28960,36 @@ func (s *SerialPortOutput) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ServerBinding struct { + // Possible values: + // "RESTART_NODE_ON_ANY_SERVER" + // "RESTART_NODE_ON_MINIMAL_SERVERS" + // "SERVER_BINDING_TYPE_UNSPECIFIED" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServerBinding) MarshalJSON() ([]byte, error) { + type NoMethod ServerBinding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ServiceAccount: A service account. type ServiceAccount struct { // Email: Email address of the service account. @@ -24603,8 +29062,8 @@ func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { // ShieldedInstanceIdentity: A shielded Instance identity entry. type ShieldedInstanceIdentity struct { - // EncryptionKey: An Endorsement Key (EK) issued to the Shielded - // Instance's vTPM. + // EncryptionKey: An Endorsement Key (EK) made by the RSA 2048 algorithm + // issued to the Shielded Instance's vTPM. EncryptionKey *ShieldedInstanceIdentityEntry `json:"encryptionKey,omitempty"` // Kind: [Output Only] Type of the resource. Always @@ -24612,8 +29071,8 @@ type ShieldedInstanceIdentity struct { // entry. Kind string `json:"kind,omitempty"` - // SigningKey: An Attestation Key (AK) issued to the Shielded Instance's - // vTPM. + // SigningKey: An Attestation Key (AK) made by the RSA 2048 algorithm + // issued to the Shielded Instance's vTPM. SigningKey *ShieldedInstanceIdentityEntry `json:"signingKey,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -24744,9 +29203,16 @@ func (s *SignedUrlKey) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Snapshot: A persistent disk snapshot resource. (== resource_for -// beta.snapshots ==) (== resource_for v1.snapshots ==) +// Snapshot: Represents a Persistent Disk Snapshot resource. +// +// You can use snapshots to back up data on a regular interval. For more +// information, read Creating persistent disk snapshots. (== +// resource_for beta.snapshots ==) (== resource_for v1.snapshots ==) type Snapshot struct { + // AutoCreated: [Output Only] Set to true if snapshots are automatically + // created by applying resource policy on the target disk. + AutoCreated bool `json:"autoCreated,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -24755,7 +29221,7 @@ type Snapshot struct { // property when you create the resource. Description string `json:"description,omitempty"` - // DiskSizeGb: [Output Only] Size of the snapshot, specified in GB. + // DiskSizeGb: [Output Only] Size of the source disk, specified in GB. DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` // Id: [Output Only] The unique identifier for the resource. This @@ -24861,29 +29327,28 @@ type Snapshot struct { // "UP_TO_DATE" StorageBytesStatus string `json:"storageBytesStatus,omitempty"` - // StorageLocations: GCS bucket storage location of the snapshot - // (regional or multi-regional). + // StorageLocations: Cloud Storage bucket storage location of the + // snapshot (regional or multi-regional). StorageLocations []string `json:"storageLocations,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AutoCreated") to + // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "AutoCreated") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -25080,10 +29545,13 @@ func (s *SourceInstanceParams) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslCertificate: An SslCertificate resource. This resource provides a -// mechanism to upload an SSL key and certificate to the load balancer -// to serve secure connections from the user. (== resource_for -// beta.sslCertificates ==) (== resource_for v1.sslCertificates ==) +// SslCertificate: Represents an SSL Certificate resource. +// +// This SSL certificate resource also contains a private key. You can +// use SSL keys and certificates to secure connections to a load +// balancer. For more information, read Creating and Using SSL +// Certificates. (== resource_for beta.sslCertificates ==) (== +// resource_for v1.sslCertificates ==) type SslCertificate struct { // Certificate: A local certificate file. The certificate must be in PEM // format. The certificate chain must be no greater than 5 certs long. @@ -25119,6 +29587,11 @@ type SslCertificate struct { // requests will include this field. PrivateKey string `json:"privateKey,omitempty"` + // Region: [Output Only] URL of the region where the regional SSL + // Certificate resides. This field is not applicable to global SSL + // Certificate. + Region string `json:"region,omitempty"` + // SelfLink: [Output only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -25149,6 +29622,161 @@ func (s *SslCertificate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SslCertificateAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of SslCertificatesScopedList resources. + Items map[string]SslCertificatesScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#sslCertificateAggregatedList for lists of SSL Certificates. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *SslCertificateAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SslCertificateAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificateAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SslCertificateAggregatedListWarning: [Output Only] Informational +// warning message. +type SslCertificateAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*SslCertificateAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SslCertificateAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificateAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SslCertificateAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SslCertificateAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificateAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SslCertificateList: Contains a list of SslCertificate resources. type SslCertificateList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -25304,6 +29932,140 @@ func (s *SslCertificateListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SslCertificatesScopedList struct { + // SslCertificates: List of SslCertificates contained in this scope. + SslCertificates []*SslCertificate `json:"sslCertificates,omitempty"` + + // Warning: Informational warning which replaces the list of backend + // services when the list is empty. + Warning *SslCertificatesScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SslCertificates") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SslCertificates") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SslCertificatesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificatesScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SslCertificatesScopedListWarning: Informational warning which +// replaces the list of backend services when the list is empty. +type SslCertificatesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*SslCertificatesScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SslCertificatesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificatesScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SslCertificatesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SslCertificatesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod SslCertificatesScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SslPoliciesList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. @@ -25488,11 +30250,12 @@ func (s *SslPoliciesListAvailableFeaturesResponse) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslPolicy: A SSL policy specifies the server-side support for SSL -// features. This can be attached to a TargetHttpsProxy or a -// TargetSslProxy. This affects connections between clients and the -// HTTPS or SSL proxy load balancer. They do not affect the connection -// between the load balancers and the backends. +// SslPolicy: Represents a Cloud Armor Security Policy resource. +// +// Only external backend services used by HTTP or HTTPS load balancers +// can reference a Security Policy. For more information, read read +// Cloud Armor Security Policy Concepts. (== resource_for +// beta.sslPolicies ==) (== resource_for v1.sslPolicies ==) type SslPolicy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -25727,8 +30490,13 @@ func (s *SslPolicyReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Subnetwork: A Subnetwork resource. (== resource_for beta.subnetworks -// ==) (== resource_for v1.subnetworks ==) +// Subnetwork: Represents a Subnetwork resource. +// +// A subnetwork (also known as a subnet) is a logical partition of a +// Virtual Private Cloud network with one primary IP range and zero or +// more secondary IP ranges. For more information, read Virtual Private +// Cloud (VPC) Network. (== resource_for beta.subnetworks ==) (== +// resource_for v1.subnetworks ==) type Subnetwork struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -25773,6 +30541,10 @@ type Subnetwork struct { // for Subnetwork resources. Kind string `json:"kind,omitempty"` + // LogConfig: This field denotes the VPC flow logging options for this + // subnetwork. If logging is enabled, logs are exported to Stackdriver. + LogConfig *SubnetworkLogConfig `json:"logConfig,omitempty"` + // Name: The name of the resource, provided by the client when initially // creating the resource. The name must be 1-63 characters long, and // comply with RFC1035. Specifically, the name must be 1-63 characters @@ -25794,10 +30566,34 @@ type Subnetwork struct { // setPrivateIpGoogleAccess. PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"` + // Purpose: The purpose of the resource. This field can be either + // PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with + // purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created + // subnetwork that is reserved for Internal HTTP(S) Load Balancing. If + // unspecified, the purpose defaults to PRIVATE_RFC_1918. + // + // Possible values: + // "INTERNAL_HTTPS_LOAD_BALANCER" + // "PRIVATE" + // "PRIVATE_RFC_1918" + Purpose string `json:"purpose,omitempty"` + // Region: URL of the region where the Subnetwork resides. This field // can be set only at resource creation time. Region string `json:"region,omitempty"` + // Role: The role of subnetwork. Currenly, this field is only used when + // purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to + // ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being + // used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one + // that is ready to be promoted to ACTIVE or is currently draining. This + // field can be updated with a patch request. + // + // Possible values: + // "ACTIVE" + // "BACKUP" + Role string `json:"role,omitempty"` + // SecondaryIpRanges: An array of configurations for secondary IP ranges // for VM instances contained in this subnetwork. The primary IP of such // VM must belong to the primary ipCidrRange of the subnetwork. The @@ -25808,6 +30604,19 @@ type Subnetwork struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // State: [Output Only] The state of the subnetwork, which can be one of + // READY or DRAINING. A subnetwork that is READY is ready to be used. + // The state of DRAINING is only applicable to subnetworks that have the + // purpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that + // connections to the load balancer are being drained. A subnetwork that + // is draining cannot be used or modified until it reaches a status of + // READY. + // + // Possible values: + // "DRAINING" + // "READY" + State string `json:"state,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -26146,6 +30955,85 @@ func (s *SubnetworkListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SubnetworkLogConfig: The available logging options for this +// subnetwork. +type SubnetworkLogConfig struct { + // AggregationInterval: Can only be specified if VPC flow logging for + // this subnetwork is enabled. Toggles the aggregation interval for + // collecting flow logs. Increasing the interval time will reduce the + // amount of generated flow logs for long lasting connections. Default + // is an interval of 5 seconds per connection. + // + // Possible values: + // "INTERVAL_10_MIN" + // "INTERVAL_15_MIN" + // "INTERVAL_1_MIN" + // "INTERVAL_30_SEC" + // "INTERVAL_5_MIN" + // "INTERVAL_5_SEC" + AggregationInterval string `json:"aggregationInterval,omitempty"` + + // Enable: Whether to enable flow logging for this subnetwork. If this + // field is not explicitly set, it will not appear in get listings. If + // not set the default behavior is to disable flow logging. + Enable bool `json:"enable,omitempty"` + + // FlowSampling: Can only be specified if VPC flow logging for this + // subnetwork is enabled. The value of the field must be in [0, 1]. Set + // the sampling rate of VPC flow logs within the subnetwork where 1.0 + // means all collected logs are reported and 0.0 means no logs are + // reported. Default is 0.5, which means half of all collected logs are + // reported. + FlowSampling float64 `json:"flowSampling,omitempty"` + + // Metadata: Can only be specified if VPC flow logs for this subnetwork + // is enabled. Configures whether all, none or a subset of metadata + // fields should be added to the reported VPC flow logs. Default is + // INCLUDE_ALL_METADATA. + // + // Possible values: + // "EXCLUDE_ALL_METADATA" + // "INCLUDE_ALL_METADATA" + Metadata string `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationInterval") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationInterval") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SubnetworkLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod SubnetworkLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *SubnetworkLogConfig) UnmarshalJSON(data []byte) error { + type NoMethod SubnetworkLogConfig + var s1 struct { + FlowSampling gensupport.JSONFloat64 `json:"flowSampling"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.FlowSampling = float64(s1.FlowSampling) + return nil +} + // SubnetworkSecondaryRange: Represents a secondary IP range of a // subnetwork. type SubnetworkSecondaryRange struct { @@ -26495,9 +31383,148 @@ func (s *Tags) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpProxy: A TargetHttpProxy resource. This resource defines an -// HTTP proxy. (== resource_for beta.targetHttpProxies ==) (== -// resource_for v1.targetHttpProxies ==) +type TargetHttpProxiesScopedList struct { + // TargetHttpProxies: A list of TargetHttpProxies contained in this + // scope. + TargetHttpProxies []*TargetHttpProxy `json:"targetHttpProxies,omitempty"` + + // Warning: Informational warning which replaces the list of backend + // services when the list is empty. + Warning *TargetHttpProxiesScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetHttpProxies") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TargetHttpProxies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpProxiesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxiesScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TargetHttpProxiesScopedListWarning: Informational warning which +// replaces the list of backend services when the list is empty. +type TargetHttpProxiesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*TargetHttpProxiesScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpProxiesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxiesScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetHttpProxiesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxiesScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TargetHttpProxy: Represents a Target HTTP Proxy resource. +// +// A target HTTP proxy is a component of certain types of load +// balancers. Global forwarding rules reference a target HTTP proxy, and +// the target proxy then references a URL map. For more information, +// read Using Target Proxies. (== resource_for beta.targetHttpProxies +// ==) (== resource_for v1.targetHttpProxies ==) type TargetHttpProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -26524,6 +31551,11 @@ type TargetHttpProxy struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` + // Region: [Output Only] URL of the region where the regional Target + // HTTP Proxy resides. This field is not applicable to global Target + // HTTP Proxies. + Region string `json:"region,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -26559,6 +31591,57 @@ func (s *TargetHttpProxy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type TargetHttpProxyAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of TargetHttpProxiesScopedList resources. + Items map[string]TargetHttpProxiesScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#targetHttpProxyAggregatedList for lists of Target HTTP + // Proxies. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpProxyAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpProxyAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TargetHttpProxyList: A list of TargetHttpProxy resources. type TargetHttpProxyList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -26715,6 +31798,141 @@ func (s *TargetHttpProxyListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type TargetHttpsProxiesScopedList struct { + // TargetHttpsProxies: A list of TargetHttpsProxies contained in this + // scope. + TargetHttpsProxies []*TargetHttpsProxy `json:"targetHttpsProxies,omitempty"` + + // Warning: Informational warning which replaces the list of backend + // services when the list is empty. + Warning *TargetHttpsProxiesScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetHttpsProxies") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TargetHttpsProxies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpsProxiesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxiesScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TargetHttpsProxiesScopedListWarning: Informational warning which +// replaces the list of backend services when the list is empty. +type TargetHttpsProxiesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*TargetHttpsProxiesScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpsProxiesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxiesScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetHttpsProxiesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpsProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxiesScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetHttpsProxiesSetQuicOverrideRequest struct { // QuicOverride: QUIC policy for the TargetHttpsProxy resource. // @@ -26777,9 +31995,13 @@ func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetHttpsProxy: A TargetHttpsProxy resource. This resource defines -// an HTTPS proxy. (== resource_for beta.targetHttpsProxies ==) (== -// resource_for v1.targetHttpsProxies ==) +// TargetHttpsProxy: Represents a Target HTTPS Proxy resource. +// +// A target HTTPS proxy is a component of certain types of load +// balancers. Global forwarding rules reference a target HTTPS proxy, +// and the target proxy then references a URL map. For more information, +// read Using Target Proxies. (== resource_for beta.targetHttpsProxies +// ==) (== resource_for v1.targetHttpsProxies ==) type TargetHttpsProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -26807,13 +32029,17 @@ type TargetHttpsProxy struct { Name string `json:"name,omitempty"` // QuicOverride: Specifies the QUIC override policy for this - // TargetHttpsProxy resource. This determines whether the load balancer - // will attempt to negotiate QUIC with clients or not. Can specify one - // of NONE, ENABLE, or DISABLE. Specify ENABLE to always enable QUIC, - // Enables QUIC when set to ENABLE, and disables QUIC when set to - // DISABLE. If NONE is specified, uses the QUIC policy with no user - // overrides, which is equivalent to DISABLE. Not specifying this field - // is equivalent to specifying NONE. + // TargetHttpsProxy resource. This setting determines whether the load + // balancer attempts to negotiate QUIC with clients. You can specify + // NONE, ENABLE, or DISABLE. + // - When quic-override is set to NONE, Google manages whether QUIC is + // used. + // - When quic-override is set to ENABLE, the load balancer uses QUIC + // when possible. + // - When quic-override is set to DISABLE, the load balancer doesn't use + // QUIC. + // - If the quic-override flag is not specified, NONE is implied. + // - // // Possible values: // "DISABLE" @@ -26821,6 +32047,11 @@ type TargetHttpsProxy struct { // "NONE" QuicOverride string `json:"quicOverride,omitempty"` + // Region: [Output Only] URL of the region where the regional + // TargetHttpsProxy resides. This field is not applicable to global + // TargetHttpsProxies. + Region string `json:"region,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -26832,7 +32063,7 @@ type TargetHttpsProxy struct { // SslPolicy: URL of SslPolicy resource that will be associated with the // TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource - // will not have any SSL policy configured. + // has no SSL policy configured. SslPolicy string `json:"sslPolicy,omitempty"` // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource @@ -26872,6 +32103,162 @@ func (s *TargetHttpsProxy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type TargetHttpsProxyAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of TargetHttpsProxiesScopedList resources. + Items map[string]TargetHttpsProxiesScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#targetHttpsProxyAggregatedList for lists of Target HTTP + // Proxies. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *TargetHttpsProxyAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpsProxyAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxyAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TargetHttpsProxyAggregatedListWarning: [Output Only] Informational +// warning message. +type TargetHttpsProxyAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*TargetHttpsProxyAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpsProxyAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxyAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type TargetHttpsProxyAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TargetHttpsProxyAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod TargetHttpsProxyAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources. type TargetHttpsProxyList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -27028,10 +32415,13 @@ func (s *TargetHttpsProxyListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetInstance: A TargetInstance resource. This resource defines an -// endpoint instance that terminates traffic of certain protocols. (== -// resource_for beta.targetInstances ==) (== resource_for -// v1.targetInstances ==) +// TargetInstance: Represents a Target Instance resource. +// +// You can use a target instance to handle traffic for one or more +// forwarding rules, which is ideal for forwarding protocol traffic that +// is managed by a single source. For example, ESP, AH, TCP, or UDP. For +// more information, read Target instances. (== resource_for +// beta.targetInstances ==) (== resource_for v1.targetInstances ==) type TargetInstance struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -27554,10 +32944,13 @@ func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetPool: A TargetPool resource. This resource defines a pool of -// instances, an associated HttpHealthCheck resource, and the fallback -// target pool. (== resource_for beta.targetPools ==) (== resource_for -// v1.targetPools ==) +// TargetPool: Represents a Target Pool resource. +// +// Target pools are used for network TCP/UDP load balancing. A target +// pool references member instances, an associated legacy +// HttpHealthCheck resource, and, optionally, a backup target pool. For +// more information, read Using target pools. (== resource_for +// beta.targetPools ==) (== resource_for v1.targetPools ==) type TargetPool struct { // BackupPool: This field is applicable only when the containing target // pool is serving a forwarding rule as the primary pool, and its @@ -27654,6 +33047,8 @@ type TargetPool struct { // "CLIENT_IP_PORT_PROTO" // "CLIENT_IP_PROTO" // "GENERATED_COOKIE" + // "HEADER_FIELD" + // "HTTP_COOKIE" // "NONE" SessionAffinity string `json:"sessionAffinity,omitempty"` @@ -28412,9 +33807,13 @@ func (s *TargetSslProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetSslProxy: A TargetSslProxy resource. This resource defines an -// SSL proxy. (== resource_for beta.targetSslProxies ==) (== -// resource_for v1.targetSslProxies ==) +// TargetSslProxy: Represents a Target SSL Proxy resource. +// +// A target SSL proxy is a component of a SSL Proxy load balancer. +// Global forwarding rules reference a target SSL proxy, and the target +// proxy then references an external backend service. For more +// information, read Using Target Proxies. (== resource_for +// beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==) type TargetSslProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -28710,9 +34109,13 @@ func (s *TargetTcpProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetTcpProxy: A TargetTcpProxy resource. This resource defines a -// TCP proxy. (== resource_for beta.targetTcpProxies ==) (== -// resource_for v1.targetTcpProxies ==) +// TargetTcpProxy: Represents a Target TCP Proxy resource. +// +// A target TCP proxy is a component of a TCP Proxy load balancer. +// Global forwarding rules reference target TCP proxy, and the target +// proxy then references an external backend service. For more +// information, read TCP Proxy Load Balancing Concepts. (== resource_for +// beta.targetTcpProxies ==) (== resource_for v1.targetTcpProxies ==) type TargetTcpProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -28937,7 +34340,10 @@ func (s *TargetTcpProxyListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TargetVpnGateway: Represents a Target VPN gateway resource. (== +// TargetVpnGateway: Represents a Target VPN Gateway resource. +// +// The target VPN gateway resource represents a Classic Cloud VPN +// gateway. For more information, read the the Cloud VPN Overview. (== // resource_for beta.targetVpnGateways ==) (== resource_for // v1.targetVpnGateways ==) type TargetVpnGateway struct { @@ -29565,14 +34971,30 @@ func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UrlMap: A UrlMap resource. This resource defines the mapping from URL -// to the BackendService resource, based on the "longest-match" of the -// URL's host and path. +// UrlMap: Represents a URL Map resource. +// +// A URL map resource is a component of certain types of load balancers. +// This resource defines mappings from host names and URL paths to +// either a backend service or a backend bucket. +// +// To use this resource, the backend service must have a +// loadBalancingScheme of either EXTERNAL, INTERNAL_SELF_MANAGED, or +// INTERNAL_MANAGED For more information, read URL Map Concepts. type UrlMap struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` + // DefaultRouteAction: defaultRouteAction takes effect when none of the + // hostRules match. The load balancer performs advanced routing actions + // like URL rewrites, header transformations, etc. prior to forwarding + // the request to the selected backend. If defaultRouteAction specifies + // any weightedBackendServices, defaultService must not be set. + // Conversely if defaultService is set, defaultRouteAction cannot + // contain any weightedBackendServices. + // Only one of defaultRouteAction or defaultUrlRedirect must be set. + DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` + // DefaultService: The full or partial URL of the defaultService // resource to which traffic is directed if none of the hostRules match. // If defaultRouteAction is additionally specified, advanced routing @@ -29585,6 +35007,12 @@ type UrlMap struct { // defaultRouteAction.weightedBackendService must be set. DefaultService string `json:"defaultService,omitempty"` + // DefaultUrlRedirect: When none of the specified hostRules match, the + // request is redirected to a URL specified by defaultUrlRedirect. + // If defaultUrlRedirect is specified, defaultService or + // defaultRouteAction must not be set. + DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` + // Description: An optional description of this resource. Provide this // property when you create the resource. Description string `json:"description,omitempty"` @@ -29599,6 +35027,12 @@ type UrlMap struct { // UrlMap. Fingerprint string `json:"fingerprint,omitempty"` + // HeaderAction: Specifies changes to request and response headers that + // need to take effect for the selected backendService. + // The headerAction specified here take effect after headerAction + // specified under pathMatcher. + HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` + // HostRules: The list of HostRules to use against the URL. HostRules []*HostRule `json:"hostRules,omitempty"` @@ -29622,6 +35056,12 @@ type UrlMap struct { // PathMatchers: The list of named PathMatchers to use against the URL. PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"` + // Region: [Output Only] URL of the region where the regional URL map + // resides. This field is not applicable to global URL maps. You must + // specify this field as part of the HTTP request URL. It is not + // settable as a field in the request body. + Region string `json:"region,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -29915,6 +35355,293 @@ func (s *UrlMapValidationResult) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type UrlMapsAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of UrlMapsScopedList resources. + Items map[string]UrlMapsScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *UrlMapsAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapsAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UrlMapsAggregatedListWarning: [Output Only] Informational warning +// message. +type UrlMapsAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*UrlMapsAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapsAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UrlMapsAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapsAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UrlMapsScopedList struct { + // UrlMaps: A list of UrlMaps contained in this scope. + UrlMaps []*UrlMap `json:"urlMaps,omitempty"` + + // Warning: Informational warning which replaces the list of backend + // services when the list is empty. + Warning *UrlMapsScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UrlMaps") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UrlMaps") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapsScopedList) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UrlMapsScopedListWarning: Informational warning which replaces the +// list of backend services when the list is empty. +type UrlMapsScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*UrlMapsScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapsScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type UrlMapsScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlMapsScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod UrlMapsScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type UrlMapsValidateRequest struct { // Resource: Content of the UrlMap to be validated. Resource *UrlMap `json:"resource,omitempty"` @@ -29972,6 +35699,44 @@ func (s *UrlMapsValidateResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UrlRewrite: The spec for modifying the path before sending the +// request to the matched backend service. +type UrlRewrite struct { + // HostRewrite: Prior to forwarding the request to the selected service, + // the request's host header is replaced with contents of + // hostRewrite. + // The value must be between 1 and 255 characters. + HostRewrite string `json:"hostRewrite,omitempty"` + + // PathPrefixRewrite: Prior to forwarding the request to the selected + // backend service, the matching portion of the request's path is + // replaced by pathPrefixRewrite. + // The value must be between 1 and 1024 characters. + PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HostRewrite") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HostRewrite") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UrlRewrite) MarshalJSON() ([]byte, error) { + type NoMethod UrlRewrite + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UsableSubnetwork: Subnetwork which the current user has // compute.subnetworks.use permission on. type UsableSubnetwork struct { @@ -30280,12 +36045,23 @@ func (s *VmEndpointNatMappings) MarshalJSON() ([]byte, error) { // VmEndpointNatMappingsInterfaceNatMappings: Contain information of Nat // mapping for an interface of this endpoint. type VmEndpointNatMappingsInterfaceNatMappings struct { + // DrainNatIpPortRanges: List of all drain IP:port-range mappings + // assigned to this interface. These ranges are inclusive, that is, both + // the first and the last ports can be used for NAT. Example: + // ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. + DrainNatIpPortRanges []string `json:"drainNatIpPortRanges,omitempty"` + // NatIpPortRanges: A list of all IP:port-range mappings assigned to // this interface. These ranges are inclusive, that is, both the first // and the last ports can be used for NAT. Example: // ["2.2.2.2:12345-12355", "1.1.1.1:2234-2234"]. NatIpPortRanges []string `json:"natIpPortRanges,omitempty"` + // NumTotalDrainNatPorts: Total number of drain ports across all NAT IPs + // allocated to this interface. It equals to the aggregated port number + // in the field drain_nat_ip_port_ranges. + NumTotalDrainNatPorts int64 `json:"numTotalDrainNatPorts,omitempty"` + // NumTotalNatPorts: Total number of ports across all NAT IPs allocated // to this interface. It equals to the aggregated port number in the // field nat_ip_port_ranges. @@ -30299,15 +36075,16 @@ type VmEndpointNatMappingsInterfaceNatMappings struct { // SourceVirtualIp: Primary IP of the VM for this NIC. SourceVirtualIp string `json:"sourceVirtualIp,omitempty"` - // ForceSendFields is a list of field names (e.g. "NatIpPortRanges") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "DrainNatIpPortRanges") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NatIpPortRanges") to + // NullFields is a list of field names (e.g. "DrainNatIpPortRanges") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -30481,8 +36258,758 @@ func (s *VmEndpointNatMappingsListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// VpnTunnel: VPN tunnel resource. (== resource_for beta.vpnTunnels ==) -// (== resource_for v1.vpnTunnels ==) +// VpnGateway: Represents a VPN gateway resource. +type VpnGateway struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of resource. Always compute#vpnGateway for + // VPN gateways. + Kind string `json:"kind,omitempty"` + + // LabelFingerprint: A fingerprint for the labels being applied to this + // VpnGateway, which is essentially a hash of the labels set used for + // optimistic locking. The fingerprint is initially generated by Compute + // Engine and changes after every request to modify or update labels. + // You must always provide an up-to-date fingerprint hash in order to + // update or change labels, otherwise the request will fail with error + // 412 conditionNotMet. + // + // To see the latest fingerprint, make a get() request to retrieve an + // VpnGateway. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + + // Labels: Labels to apply to this VpnGateway resource. These can be + // later modified by the setLabels method. Each label key/value must + // comply with RFC1035. Label values may be empty. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Network: URL of the network to which this VPN gateway is attached. + // Provided by the client when the VPN gateway is created. + Network string `json:"network,omitempty"` + + // Region: [Output Only] URL of the region where the VPN gateway + // resides. + Region string `json:"region,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // VpnInterfaces: [Output Only] A list of interfaces on this VPN + // gateway. + VpnInterfaces []*VpnGatewayVpnGatewayInterface `json:"vpnInterfaces,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGateway) MarshalJSON() ([]byte, error) { + type NoMethod VpnGateway + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of VpnGateway resources. + Items map[string]VpnGatewaysScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#vpnGateway for + // VPN gateways. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *VpnGatewayAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayAggregatedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayAggregatedListWarning: [Output Only] Informational warning +// message. +type VpnGatewayAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*VpnGatewayAggregatedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayAggregatedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayAggregatedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayList: Contains a list of VpnGateway resources. +type VpnGatewayList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of VpnGateway resources. + Items []*VpnGateway `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#vpnGateway for + // VPN gateways. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Warning: [Output Only] Informational warning message. + Warning *VpnGatewayListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayList) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayListWarning: [Output Only] Informational warning message. +type VpnGatewayListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*VpnGatewayListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewayStatus struct { + // VpnConnections: List of VPN connection for this VpnGateway. + VpnConnections []*VpnGatewayStatusVpnConnection `json:"vpnConnections,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpnConnections") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "VpnConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatus) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayStatusHighAvailabilityRequirementState: Describes the high +// availability requirement state for the VPN connection between this +// Cloud VPN gateway and a peer gateway. +type VpnGatewayStatusHighAvailabilityRequirementState struct { + // State: Indicates the high availability requirement state for the VPN + // connection. Valid values are CONNECTION_REDUNDANCY_MET, + // CONNECTION_REDUNDANCY_NOT_MET. + // + // Possible values: + // "CONNECTION_REDUNDANCY_MET" + // "CONNECTION_REDUNDANCY_NOT_MET" + State string `json:"state,omitempty"` + + // UnsatisfiedReason: Indicates the reason why the VPN connection does + // not meet the high availability redundancy criteria/requirement. Valid + // values is INCOMPLETE_TUNNELS_COVERAGE. + // + // Possible values: + // "INCOMPLETE_TUNNELS_COVERAGE" + UnsatisfiedReason string `json:"unsatisfiedReason,omitempty"` + + // ForceSendFields is a list of field names (e.g. "State") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "State") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatusHighAvailabilityRequirementState) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatusHighAvailabilityRequirementState + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayStatusTunnel: Contains some information about a VPN tunnel. +type VpnGatewayStatusTunnel struct { + // LocalGatewayInterface: The VPN gateway interface this VPN tunnel is + // associated with. + LocalGatewayInterface int64 `json:"localGatewayInterface,omitempty"` + + // PeerGatewayInterface: The peer gateway interface this VPN tunnel is + // connected to, the peer gateway could either be an external VPN + // gateway or GCP VPN gateway. + PeerGatewayInterface int64 `json:"peerGatewayInterface,omitempty"` + + // TunnelUrl: URL reference to the VPN tunnel. + TunnelUrl string `json:"tunnelUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "LocalGatewayInterface") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LocalGatewayInterface") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatusTunnel) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatusTunnel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayStatusVpnConnection: A VPN connection contains all VPN +// tunnels connected from this VpnGateway to the same peer gateway. The +// peer gateway could either be a external VPN gateway or GCP VPN +// gateway. +type VpnGatewayStatusVpnConnection struct { + // PeerExternalGateway: URL reference to the peer external VPN gateways + // to which the VPN tunnels in this VPN connection are connected. This + // field is mutually exclusive with peer_gcp_gateway. + PeerExternalGateway string `json:"peerExternalGateway,omitempty"` + + // PeerGcpGateway: URL reference to the peer side VPN gateways to which + // the VPN tunnels in this VPN connection are connected. This field is + // mutually exclusive with peer_gcp_gateway. + PeerGcpGateway string `json:"peerGcpGateway,omitempty"` + + // State: HighAvailabilityRequirementState for the VPN connection. + State *VpnGatewayStatusHighAvailabilityRequirementState `json:"state,omitempty"` + + // Tunnels: List of VPN tunnels that are in this VPN connection. + Tunnels []*VpnGatewayStatusTunnel `json:"tunnels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PeerExternalGateway") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PeerExternalGateway") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayStatusVpnConnection) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayStatusVpnConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewayVpnGatewayInterface: A VPN gateway interface. +type VpnGatewayVpnGatewayInterface struct { + // Id: The numeric ID of this VPN gateway interface. + Id int64 `json:"id,omitempty"` + + // IpAddress: The external IP address for this VPN gateway interface. + IpAddress string `json:"ipAddress,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewayVpnGatewayInterface) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewayVpnGatewayInterface + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewaysGetStatusResponse struct { + Result *VpnGatewayStatus `json:"result,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Result") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Result") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysGetStatusResponse) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysGetStatusResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewaysScopedList struct { + // VpnGateways: [Output Only] A list of VPN gateways contained in this + // scope. + VpnGateways []*VpnGateway `json:"vpnGateways,omitempty"` + + // Warning: [Output Only] Informational warning which replaces the list + // of addresses when the list is empty. + Warning *VpnGatewaysScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VpnGateways") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "VpnGateways") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysScopedList) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysScopedList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnGatewaysScopedListWarning: [Output Only] Informational warning +// which replaces the list of addresses when the list is empty. +type VpnGatewaysScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DEPRECATED_TYPE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "EXPERIMENTAL_TYPE_USED" + // "EXTERNAL_API_WARNING" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "MISSING_TYPE_DEPENDENCY" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SCHEMA_VALIDATION_IGNORED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNDECLARED_PROPERTIES" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*VpnGatewaysScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysScopedListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type VpnGatewaysScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod VpnGatewaysScopedListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpnTunnel: Represents a Cloud VPN Tunnel resource. +// +// For more information about VPN, read the the Cloud VPN Overview. (== +// resource_for beta.vpnTunnels ==) (== resource_for v1.vpnTunnels ==) type VpnTunnel struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -30524,6 +37051,26 @@ type VpnTunnel struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` + // PeerExternalGateway: URL of the peer side external VPN gateway to + // which this VPN tunnel is connected. Provided by the client when the + // VPN tunnel is created. This field is exclusive with the field + // peerGcpGateway. + PeerExternalGateway string `json:"peerExternalGateway,omitempty"` + + // PeerExternalGatewayInterface: The interface ID of the external VPN + // gateway to which this VPN tunnel is connected. Provided by the client + // when the VPN tunnel is created. + PeerExternalGatewayInterface int64 `json:"peerExternalGatewayInterface,omitempty"` + + // PeerGcpGateway: URL of the peer side HA GCP VPN gateway to which this + // VPN tunnel is connected. Provided by the client when the VPN tunnel + // is created. This field can be used when creating highly available VPN + // from VPC network to VPC network, the field is exclusive with the + // field peerExternalGateway. If provided, the VPN tunnel will + // automatically use the same vpnGatewayInterface ID in the peer GCP VPN + // gateway. + PeerGcpGateway string `json:"peerGcpGateway,omitempty"` + // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. PeerIp string `json:"peerIp,omitempty"` @@ -30568,6 +37115,17 @@ type VpnTunnel struct { // // - FAILED: Tunnel creation has failed and the tunnel is not ready to // be used. + // - NO_INCOMING_PACKETS: No incoming packets from peer. + // - REJECTED: Tunnel configuration was rejected, can be result of being + // blacklisted. + // - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all + // required resources. + // - STOPPED: Tunnel is stopped due to its Forwarding Rules being + // deleted for Classic VPN tunnels or the project is in frozen state. + // - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, + // probably behind NAT. + // - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed + // for an HA-VPN tunnel. // // Possible values: // "ALLOCATING_RESOURCES" @@ -30581,6 +37139,7 @@ type VpnTunnel struct { // "NO_INCOMING_PACKETS" // "PROVISIONING" // "REJECTED" + // "STOPPED" // "WAITING_FOR_FULL_CONFIG" Status string `json:"status,omitempty"` @@ -30589,6 +37148,16 @@ type VpnTunnel struct { // created. TargetVpnGateway string `json:"targetVpnGateway,omitempty"` + // VpnGateway: URL of the VPN gateway with which this VPN tunnel is + // associated. Provided by the client when the VPN tunnel is created. + // This must be used (instead of target_vpn_gateway) if a High + // Availability VPN gateway resource is created. + VpnGateway string `json:"vpnGateway,omitempty"` + + // VpnGatewayInterface: The interface ID of the VPN gateway with which + // this VPN tunnel is associated. + VpnGatewayInterface int64 `json:"vpnGatewayInterface,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -31060,6 +37629,58 @@ func (s *VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// WeightedBackendService: In contrast to a single BackendService in +// HttpRouteAction to which all matching traffic is directed to, +// WeightedBackendService allows traffic to be split across multiple +// BackendServices. The volume of traffic for each BackendService is +// proportional to the weight specified in each WeightedBackendService +type WeightedBackendService struct { + // BackendService: The full or partial URL to the default BackendService + // resource. Before forwarding the request to backendService, the + // loadbalancer applies any relevant headerActions specified as part of + // this backendServiceWeight. + BackendService string `json:"backendService,omitempty"` + + // HeaderAction: Specifies changes to request and response headers that + // need to take effect for the selected backendService. + // headerAction specified here take effect before headerAction in the + // enclosing HttpRouteRule, PathMatcher and UrlMap. + HeaderAction *HttpHeaderAction `json:"headerAction,omitempty"` + + // Weight: Specifies the fraction of traffic sent to backendService, + // computed as weight / (sum of all weightedBackendService weights in + // routeAction) . + // The selection of a backend service is determined only for new + // traffic. Once a user's request has been directed to a backendService, + // subsequent requests will be sent to the same backendService as + // determined by the BackendService's session affinity policy. + // The value must be between 0 and 1000 + Weight int64 `json:"weight,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackendService") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BackendService") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *WeightedBackendService) MarshalJSON() ([]byte, error) { + type NoMethod WeightedBackendService + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type XpnHostList struct { // Id: [Output Only] Unique identifier for the resource; defined by the // server. @@ -31251,8 +37872,12 @@ func (s *XpnResourceId) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Zone: A Zone resource. (== resource_for beta.zones ==) (== -// resource_for v1.zones ==) Next ID: 17 +// Zone: Represents a Zone resource. +// +// A zone is a deployment area. These deployment areas are subsets of a +// region. For example the zone us-east1-a is located in the us-east1 +// region. For more information, read Regions and Zones. (== +// resource_for beta.zones ==) (== resource_for v1.zones ==) type Zone struct { // AvailableCpuPlatforms: [Output Only] Available cpu/platform // selections for the zone. @@ -31563,6 +38188,7 @@ type AcceleratorTypesAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of accelerator types. +// (== suppress_warning http-rest-shadowed ==) func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -31669,6 +38295,7 @@ func (c *AcceleratorTypesAggregatedListCall) Header() http.Header { func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -31730,7 +38357,7 @@ func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Retrieves an aggregated list of accelerator types.", + // "description": "Retrieves an aggregated list of accelerator types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.acceleratorTypes.aggregatedList", // "parameterOrder": [ @@ -31815,7 +38442,8 @@ type AcceleratorTypesGetCall struct { header_ http.Header } -// Get: Returns the specified accelerator type. +// Get: Returns the specified accelerator type. (== suppress_warning +// http-rest-shadowed ==) func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -31861,6 +38489,7 @@ func (c *AcceleratorTypesGetCall) Header() http.Header { func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -31924,7 +38553,7 @@ func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*Accelerator } return ret, nil // { - // "description": "Returns the specified accelerator type.", + // "description": "Returns the specified accelerator type. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.acceleratorTypes.get", // "parameterOrder": [ @@ -31981,7 +38610,7 @@ type AcceleratorTypesListCall struct { } // List: Retrieves a list of accelerator types available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -32089,6 +38718,7 @@ func (c *AcceleratorTypesListCall) Header() http.Header { func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -32151,7 +38781,7 @@ func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*Accelerato } return ret, nil // { - // "description": "Retrieves a list of accelerator types available to the specified project.", + // "description": "Retrieves a list of accelerator types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.acceleratorTypes.list", // "parameterOrder": [ @@ -32242,7 +38872,8 @@ type AddressesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of addresses. +// AggregatedList: Retrieves an aggregated list of addresses. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/aggregatedList func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -32350,6 +38981,7 @@ func (c *AddressesAggregatedListCall) Header() http.Header { func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -32411,7 +39043,7 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address } return ret, nil // { - // "description": "Retrieves an aggregated list of addresses.", + // "description": "Retrieves an aggregated list of addresses. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.addresses.aggregatedList", // "parameterOrder": [ @@ -32495,7 +39127,8 @@ type AddressesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified address resource. +// Delete: Deletes the specified address resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/delete func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -32551,6 +39184,7 @@ func (c *AddressesDeleteCall) Header() http.Header { func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -32611,7 +39245,7 @@ func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified address resource.", + // "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.addresses.delete", // "parameterOrder": [ @@ -32672,7 +39306,8 @@ type AddressesGetCall struct { header_ http.Header } -// Get: Returns the specified address resource. +// Get: Returns the specified address resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/get func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -32719,6 +39354,7 @@ func (c *AddressesGetCall) Header() http.Header { func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -32782,7 +39418,7 @@ func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) { } return ret, nil // { - // "description": "Returns the specified address resource.", + // "description": "Returns the specified address resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.addresses.get", // "parameterOrder": [ @@ -32838,8 +39474,9 @@ type AddressesInsertCall struct { header_ http.Header } -// Insert: Creates an address resource in the specified project using -// the data included in the request. +// Insert: Creates an address resource in the specified project by using +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/insert func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -32895,6 +39532,7 @@ func (c *AddressesInsertCall) Header() http.Header { func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -32959,7 +39597,7 @@ func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates an address resource in the specified project using the data included in the request.", + // "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.addresses.insert", // "parameterOrder": [ @@ -33015,7 +39653,7 @@ type AddressesListCall struct { } // List: Retrieves a list of addresses contained within the specified -// region. +// region. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/list func (r *AddressesService) List(project string, region string) *AddressesListCall { c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -33124,6 +39762,7 @@ func (c *AddressesListCall) Header() http.Header { func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -33186,7 +39825,7 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro } return ret, nil // { - // "description": "Retrieves a list of addresses contained within the specified region.", + // "description": "Retrieves a list of addresses contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.addresses.list", // "parameterOrder": [ @@ -33277,7 +39916,8 @@ type AutoscalersAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of autoscalers. +// AggregatedList: Retrieves an aggregated list of autoscalers. (== +// suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -33384,6 +40024,7 @@ func (c *AutoscalersAggregatedListCall) Header() http.Header { func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -33445,7 +40086,7 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos } return ret, nil // { - // "description": "Retrieves an aggregated list of autoscalers.", + // "description": "Retrieves an aggregated list of autoscalers. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.autoscalers.aggregatedList", // "parameterOrder": [ @@ -33529,7 +40170,8 @@ type AutoscalersDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified autoscaler. +// Delete: Deletes the specified autoscaler. (== suppress_warning +// http-rest-shadowed ==) func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -33584,6 +40226,7 @@ func (c *AutoscalersDeleteCall) Header() http.Header { func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -33644,7 +40287,7 @@ func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified autoscaler.", + // "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.autoscalers.delete", // "parameterOrder": [ @@ -33706,7 +40349,8 @@ type AutoscalersGetCall struct { } // Get: Returns the specified autoscaler resource. Gets a list of -// available autoscalers by making a list() request. +// available autoscalers by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -33752,6 +40396,7 @@ func (c *AutoscalersGetCall) Header() http.Header { func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -33815,7 +40460,7 @@ func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, erro } return ret, nil // { - // "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.", + // "description": "Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.autoscalers.get", // "parameterOrder": [ @@ -33872,7 +40517,7 @@ type AutoscalersInsertCall struct { } // Insert: Creates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -33927,6 +40572,7 @@ func (c *AutoscalersInsertCall) Header() http.Header { func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -33991,7 +40637,7 @@ func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", + // "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.autoscalers.insert", // "parameterOrder": [ @@ -34047,7 +40693,7 @@ type AutoscalersListCall struct { } // List: Retrieves a list of autoscalers contained within the specified -// zone. +// zone. (== suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -34155,6 +40801,7 @@ func (c *AutoscalersListCall) Header() http.Header { func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -34217,7 +40864,7 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, } return ret, nil // { - // "description": "Retrieves a list of autoscalers contained within the specified zone.", + // "description": "Retrieves a list of autoscalers contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.autoscalers.list", // "parameterOrder": [ @@ -34311,7 +40958,8 @@ type AutoscalersPatchCall struct { // Patch: Updates an autoscaler in the specified project using the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -34373,6 +41021,7 @@ func (c *AutoscalersPatchCall) Header() http.Header { func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -34437,7 +41086,7 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.autoscalers.patch", // "parameterOrder": [ @@ -34499,7 +41148,7 @@ type AutoscalersUpdateCall struct { } // Update: Updates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -34561,6 +41210,7 @@ func (c *AutoscalersUpdateCall) Header() http.Header { func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -34625,7 +41275,7 @@ func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.autoscalers.update", // "parameterOrder": [ @@ -34687,7 +41337,7 @@ type BackendBucketsAddSignedUrlKeyCall struct { } // AddSignedUrlKey: Adds a key for validating requests with signed URLs -// for this backend bucket. +// for this backend bucket. (== suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) AddSignedUrlKey(project string, backendBucket string, signedurlkey *SignedUrlKey) *BackendBucketsAddSignedUrlKeyCall { c := &BackendBucketsAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -34742,6 +41392,7 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Header() http.Header { func (c *BackendBucketsAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -34806,7 +41457,7 @@ func (c *BackendBucketsAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Adds a key for validating requests with signed URLs for this backend bucket.", + // "description": "Adds a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendBuckets.addSignedUrlKey", // "parameterOrder": [ @@ -34859,7 +41510,8 @@ type BackendBucketsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified BackendBucket resource. +// Delete: Deletes the specified BackendBucket resource. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall { c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -34913,6 +41565,7 @@ func (c *BackendBucketsDeleteCall) Header() http.Header { func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -34972,7 +41625,7 @@ func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified BackendBucket resource.", + // "description": "Deletes the specified BackendBucket resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.backendBuckets.delete", // "parameterOrder": [ @@ -35024,7 +41677,8 @@ type BackendBucketsDeleteSignedUrlKeyCall struct { } // DeleteSignedUrlKey: Deletes a key for validating requests with signed -// URLs for this backend bucket. +// URLs for this backend bucket. (== suppress_warning http-rest-shadowed +// ==) func (r *BackendBucketsService) DeleteSignedUrlKey(project string, backendBucket string, keyName string) *BackendBucketsDeleteSignedUrlKeyCall { c := &BackendBucketsDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -35079,6 +41733,7 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Header() http.Header { func (c *BackendBucketsDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -35138,7 +41793,7 @@ func (c *BackendBucketsDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a key for validating requests with signed URLs for this backend bucket.", + // "description": "Deletes a key for validating requests with signed URLs for this backend bucket. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendBuckets.deleteSignedUrlKey", // "parameterOrder": [ @@ -35197,7 +41852,8 @@ type BackendBucketsGetCall struct { } // Get: Returns the specified BackendBucket resource. Gets a list of -// available backend buckets by making a list() request. +// available backend buckets by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall { c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -35242,6 +41898,7 @@ func (c *BackendBucketsGetCall) Header() http.Header { func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -35304,7 +41961,7 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket } return ret, nil // { - // "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request.", + // "description": "Returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendBuckets.get", // "parameterOrder": [ @@ -35352,7 +42009,8 @@ type BackendBucketsInsertCall struct { } // Insert: Creates a BackendBucket resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall { c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -35406,6 +42064,7 @@ func (c *BackendBucketsInsertCall) Header() http.Header { func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -35469,7 +42128,7 @@ func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", + // "description": "Creates a BackendBucket resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendBuckets.insert", // "parameterOrder": [ @@ -35516,7 +42175,7 @@ type BackendBucketsListCall struct { } // List: Retrieves the list of BackendBucket resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) List(project string) *BackendBucketsListCall { c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -35623,6 +42282,7 @@ func (c *BackendBucketsListCall) Header() http.Header { func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -35684,7 +42344,7 @@ func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucke } return ret, nil // { - // "description": "Retrieves the list of BackendBucket resources available to the specified project.", + // "description": "Retrieves the list of BackendBucket resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendBuckets.list", // "parameterOrder": [ @@ -35770,7 +42430,8 @@ type BackendBucketsPatchCall struct { // Patch: Updates the specified BackendBucket resource with the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -35825,6 +42486,7 @@ func (c *BackendBucketsPatchCall) Header() http.Header { func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -35889,7 +42551,7 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.backendBuckets.patch", // "parameterOrder": [ @@ -35945,7 +42607,7 @@ type BackendBucketsUpdateCall struct { } // Update: Updates the specified BackendBucket resource with the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall { c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -36000,6 +42662,7 @@ func (c *BackendBucketsUpdateCall) Header() http.Header { func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -36064,7 +42727,7 @@ func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified BackendBucket resource with the data included in the request.", + // "description": "Updates the specified BackendBucket resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.backendBuckets.update", // "parameterOrder": [ @@ -36120,7 +42783,7 @@ type BackendServicesAddSignedUrlKeyCall struct { } // AddSignedUrlKey: Adds a key for validating requests with signed URLs -// for this backend service. +// for this backend service. (== suppress_warning http-rest-shadowed ==) func (r *BackendServicesService) AddSignedUrlKey(project string, backendService string, signedurlkey *SignedUrlKey) *BackendServicesAddSignedUrlKeyCall { c := &BackendServicesAddSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -36175,6 +42838,7 @@ func (c *BackendServicesAddSignedUrlKeyCall) Header() http.Header { func (c *BackendServicesAddSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -36239,7 +42903,7 @@ func (c *BackendServicesAddSignedUrlKeyCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Adds a key for validating requests with signed URLs for this backend service.", + // "description": "Adds a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.addSignedUrlKey", // "parameterOrder": [ @@ -36293,7 +42957,8 @@ type BackendServicesAggregatedListCall struct { } // AggregatedList: Retrieves the list of all BackendService resources, -// regional and global, available to the specified project. +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall { c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -36400,6 +43065,7 @@ func (c *BackendServicesAggregatedListCall) Header() http.Header { func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -36461,7 +43127,7 @@ func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*B } return ret, nil // { - // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.", + // "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendServices.aggregatedList", // "parameterOrder": [ @@ -36544,7 +43210,8 @@ type BackendServicesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified BackendService resource. +// Delete: Deletes the specified BackendService resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/delete func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -36599,6 +43266,7 @@ func (c *BackendServicesDeleteCall) Header() http.Header { func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -36658,7 +43326,7 @@ func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified BackendService resource.", + // "description": "Deletes the specified BackendService resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.backendServices.delete", // "parameterOrder": [ @@ -36710,7 +43378,8 @@ type BackendServicesDeleteSignedUrlKeyCall struct { } // DeleteSignedUrlKey: Deletes a key for validating requests with signed -// URLs for this backend service. +// URLs for this backend service. (== suppress_warning +// http-rest-shadowed ==) func (r *BackendServicesService) DeleteSignedUrlKey(project string, backendService string, keyName string) *BackendServicesDeleteSignedUrlKeyCall { c := &BackendServicesDeleteSignedUrlKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -36765,6 +43434,7 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Header() http.Header { func (c *BackendServicesDeleteSignedUrlKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -36824,7 +43494,7 @@ func (c *BackendServicesDeleteSignedUrlKeyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a key for validating requests with signed URLs for this backend service.", + // "description": "Deletes a key for validating requests with signed URLs for this backend service. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.deleteSignedUrlKey", // "parameterOrder": [ @@ -36883,7 +43553,8 @@ type BackendServicesGetCall struct { } // Get: Returns the specified BackendService resource. Gets a list of -// available backend services. +// available backend services. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -36929,6 +43600,7 @@ func (c *BackendServicesGetCall) Header() http.Header { func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -36991,7 +43663,7 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi } return ret, nil // { - // "description": "Returns the specified BackendService resource. Gets a list of available backend services.", + // "description": "Returns the specified BackendService resource. Gets a list of available backend services. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendServices.get", // "parameterOrder": [ @@ -37040,7 +43712,7 @@ type BackendServicesGetHealthCall struct { } // GetHealth: Gets the most recent health check results for this -// BackendService. +// BackendService. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/getHealth func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -37077,6 +43749,7 @@ func (c *BackendServicesGetHealthCall) Header() http.Header { func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -37141,7 +43814,7 @@ func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*Backen } return ret, nil // { - // "description": "Gets the most recent health check results for this BackendService.", + // "description": "Gets the most recent health check results for this BackendService. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.getHealth", // "parameterOrder": [ @@ -37193,7 +43866,8 @@ type BackendServicesInsertCall struct { // Insert: Creates a BackendService resource in the specified project // using the data included in the request. There are several // restrictions and guidelines to keep in mind when creating a backend -// service. Read Restrictions and Guidelines for more information. +// service. Read Restrictions and Guidelines for more information. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/insert func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -37248,6 +43922,7 @@ func (c *BackendServicesInsertCall) Header() http.Header { func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -37311,7 +43986,7 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", + // "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.insert", // "parameterOrder": [ @@ -37358,7 +44033,7 @@ type BackendServicesListCall struct { } // List: Retrieves the list of BackendService resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/list func (r *BackendServicesService) List(project string) *BackendServicesListCall { c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -37466,6 +44141,7 @@ func (c *BackendServicesListCall) Header() http.Header { func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -37527,7 +44203,7 @@ func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServ } return ret, nil // { - // "description": "Retrieves the list of BackendService resources available to the specified project.", + // "description": "Retrieves the list of BackendService resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.backendServices.list", // "parameterOrder": [ @@ -37616,7 +44292,7 @@ type BackendServicesPatchCall struct { // guidelines to keep in mind when updating a backend service. Read // Restrictions and Guidelines for more information. This method // supports PATCH semantics and uses the JSON merge patch format and -// processing rules. +// processing rules. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/patch func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -37672,6 +44348,7 @@ func (c *BackendServicesPatchCall) Header() http.Header { func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -37736,7 +44413,7 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.backendServices.patch", // "parameterOrder": [ @@ -37792,7 +44469,7 @@ type BackendServicesSetSecurityPolicyCall struct { } // SetSecurityPolicy: Sets the security policy for the specified backend -// service. +// service. (== suppress_warning http-rest-shadowed ==) func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall { c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -37847,6 +44524,7 @@ func (c *BackendServicesSetSecurityPolicyCall) Header() http.Header { func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -37911,7 +44589,7 @@ func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the security policy for the specified backend service.", + // "description": "Sets the security policy for the specified backend service. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.backendServices.setSecurityPolicy", // "parameterOrder": [ @@ -37968,7 +44646,8 @@ type BackendServicesUpdateCall struct { // Update: Updates the specified BackendService resource with the data // included in the request. There are several restrictions and // guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. +// Restrictions and Guidelines for more information. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/update func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -38024,6 +44703,7 @@ func (c *BackendServicesUpdateCall) Header() http.Header { func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -38088,7 +44768,7 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + // "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.backendServices.update", // "parameterOrder": [ @@ -38142,7 +44822,8 @@ type DiskTypesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of disk types. +// AggregatedList: Retrieves an aggregated list of disk types. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/aggregatedList func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -38250,6 +44931,7 @@ func (c *DiskTypesAggregatedListCall) Header() http.Header { func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -38311,7 +44993,7 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp } return ret, nil // { - // "description": "Retrieves an aggregated list of disk types.", + // "description": "Retrieves an aggregated list of disk types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.diskTypes.aggregatedList", // "parameterOrder": [ @@ -38397,7 +45079,8 @@ type DiskTypesGetCall struct { } // Get: Returns the specified disk type. Gets a list of available disk -// types by making a list() request. +// types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/get func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -38444,6 +45127,7 @@ func (c *DiskTypesGetCall) Header() http.Header { func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -38507,7 +45191,7 @@ func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { } return ret, nil // { - // "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request.", + // "description": "Returns the specified disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.diskTypes.get", // "parameterOrder": [ @@ -38564,7 +45248,7 @@ type DiskTypesListCall struct { } // List: Retrieves a list of disk types available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/list func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -38673,6 +45357,7 @@ func (c *DiskTypesListCall) Header() http.Header { func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -38735,7 +45420,7 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, err } return ret, nil // { - // "description": "Retrieves a list of disk types available to the specified project.", + // "description": "Retrieves a list of disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.diskTypes.list", // "parameterOrder": [ @@ -38815,6 +45500,195 @@ func (c *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) err } } +// method id "compute.disks.addResourcePolicies": + +type DisksAddResourcePoliciesCall struct { + s *Service + project string + zone string + disk string + disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddResourcePolicies: Adds existing resource policies to a disk. You +// can only add one policy which will be applied to this disk for +// scheduling snapshot creation. (== suppress_warning http-rest-shadowed +// ==) +func (r *DisksService) AddResourcePolicies(project string, zone string, disk string, disksaddresourcepoliciesrequest *DisksAddResourcePoliciesRequest) *DisksAddResourcePoliciesCall { + c := &DisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.disk = disk + c.disksaddresourcepoliciesrequest = disksaddresourcepoliciesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *DisksAddResourcePoliciesCall) RequestId(requestId string) *DisksAddResourcePoliciesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksAddResourcePoliciesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DisksAddResourcePoliciesCall) Context(ctx context.Context) *DisksAddResourcePoliciesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DisksAddResourcePoliciesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksaddresourcepoliciesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/addResourcePolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "disk": c.disk, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.disks.addResourcePolicies" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.disks.addResourcePolicies", + // "parameterOrder": [ + // "project", + // "zone", + // "disk" + // ], + // "parameters": { + // "disk": { + // "description": "The disk name for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/disks/{disk}/addResourcePolicies", + // "request": { + // "$ref": "DisksAddResourcePoliciesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.disks.aggregatedList": type DisksAggregatedListCall struct { @@ -38826,7 +45700,8 @@ type DisksAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of persistent disks. +// AggregatedList: Retrieves an aggregated list of persistent disks. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/aggregatedList func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -38934,6 +45809,7 @@ func (c *DisksAggregatedListCall) Header() http.Header { func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -38995,7 +45871,7 @@ func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggrega } return ret, nil // { - // "description": "Retrieves an aggregated list of persistent disks.", + // "description": "Retrieves an aggregated list of persistent disks. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.aggregatedList", // "parameterOrder": [ @@ -39081,6 +45957,7 @@ type DisksCreateSnapshotCall struct { } // CreateSnapshot: Creates a snapshot of a specified persistent disk. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/createSnapshot func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -39146,6 +46023,7 @@ func (c *DisksCreateSnapshotCall) Header() http.Header { func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -39211,7 +46089,7 @@ func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a snapshot of a specified persistent disk.", + // "description": "Creates a snapshot of a specified persistent disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.createSnapshot", // "parameterOrder": [ @@ -39282,7 +46160,8 @@ type DisksDeleteCall struct { // Delete: Deletes the specified persistent disk. Deleting a disk // removes its data permanently and is irreversible. However, deleting a // disk does not delete any snapshots previously made from the disk. You -// must separately delete snapshots. +// must separately delete snapshots. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/delete func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -39338,6 +46217,7 @@ func (c *DisksDeleteCall) Header() http.Header { func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -39398,7 +46278,7 @@ func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + // "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.disks.delete", // "parameterOrder": [ @@ -39459,7 +46339,8 @@ type DisksGetCall struct { } // Get: Returns a specified persistent disk. Gets a list of available -// persistent disks by making a list() request. +// persistent disks by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/get func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -39506,6 +46387,7 @@ func (c *DisksGetCall) Header() http.Header { func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -39569,7 +46451,7 @@ func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { } return ret, nil // { - // "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.", + // "description": "Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.get", // "parameterOrder": [ @@ -39627,7 +46509,8 @@ type DisksGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *DisksService) GetIamPolicy(project string, zone string, resource string) *DisksGetIamPolicyCall { c := &DisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -39673,6 +46556,7 @@ func (c *DisksGetIamPolicyCall) Header() http.Header { func (c *DisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -39736,7 +46620,7 @@ func (c *DisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.getIamPolicy", // "parameterOrder": [ @@ -39796,7 +46680,8 @@ type DisksInsertCall struct { // data in the request. You can create a disk with a sourceImage, a // sourceSnapshot, or create an empty 500 GB data disk by omitting all // properties. You can also create a disk that is larger than the -// default size by specifying the sizeGb property. +// default size by specifying the sizeGb property. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/insert func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -39859,6 +46744,7 @@ func (c *DisksInsertCall) Header() http.Header { func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -39923,7 +46809,7 @@ func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.", + // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.insert", // "parameterOrder": [ @@ -39984,7 +46870,7 @@ type DisksListCall struct { } // List: Retrieves a list of persistent disks contained within the -// specified zone. +// specified zone. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/list func (r *DisksService) List(project string, zone string) *DisksListCall { c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -40093,6 +46979,7 @@ func (c *DisksListCall) Header() http.Header { func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -40155,7 +47042,7 @@ func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { } return ret, nil // { - // "description": "Retrieves a list of persistent disks contained within the specified zone.", + // "description": "Retrieves a list of persistent disks contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.disks.list", // "parameterOrder": [ @@ -40235,6 +47122,193 @@ func (c *DisksListCall) Pages(ctx context.Context, f func(*DiskList) error) erro } } +// method id "compute.disks.removeResourcePolicies": + +type DisksRemoveResourcePoliciesCall struct { + s *Service + project string + zone string + disk string + disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveResourcePolicies: Removes resource policies from a disk. (== +// suppress_warning http-rest-shadowed ==) +func (r *DisksService) RemoveResourcePolicies(project string, zone string, disk string, disksremoveresourcepoliciesrequest *DisksRemoveResourcePoliciesRequest) *DisksRemoveResourcePoliciesCall { + c := &DisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.disk = disk + c.disksremoveresourcepoliciesrequest = disksremoveresourcepoliciesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *DisksRemoveResourcePoliciesCall) RequestId(requestId string) *DisksRemoveResourcePoliciesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *DisksRemoveResourcePoliciesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DisksRemoveResourcePoliciesCall) Context(ctx context.Context) *DisksRemoveResourcePoliciesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DisksRemoveResourcePoliciesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksremoveresourcepoliciesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/removeResourcePolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "disk": c.disk, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.disks.removeResourcePolicies" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Removes resource policies from a disk. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.disks.removeResourcePolicies", + // "parameterOrder": [ + // "project", + // "zone", + // "disk" + // ], + // "parameters": { + // "disk": { + // "description": "The disk name for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/disks/{disk}/removeResourcePolicies", + // "request": { + // "$ref": "DisksRemoveResourcePoliciesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.disks.resize": type DisksResizeCall struct { @@ -40249,7 +47323,7 @@ type DisksResizeCall struct { } // Resize: Resizes the specified persistent disk. You can only increase -// the size of the disk. +// the size of the disk. (== suppress_warning http-rest-shadowed ==) func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall { c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -40305,6 +47379,7 @@ func (c *DisksResizeCall) Header() http.Header { func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -40370,7 +47445,7 @@ func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { } return ret, nil // { - // "description": "Resizes the specified persistent disk. You can only increase the size of the disk.", + // "description": "Resizes the specified persistent disk. You can only increase the size of the disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.resize", // "parameterOrder": [ @@ -40435,7 +47510,8 @@ type DisksSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *DisksService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *DisksSetIamPolicyCall { c := &DisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -40472,6 +47548,7 @@ func (c *DisksSetIamPolicyCall) Header() http.Header { func (c *DisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -40537,7 +47614,7 @@ func (c *DisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.setIamPolicy", // "parameterOrder": [ @@ -40597,7 +47674,8 @@ type DisksSetLabelsCall struct { } // SetLabels: Sets the labels on a disk. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall { c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -40653,6 +47731,7 @@ func (c *DisksSetLabelsCall) Header() http.Header { func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -40718,7 +47797,7 @@ func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.setLabels", // "parameterOrder": [ @@ -40783,7 +47862,7 @@ type DisksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall { c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -40820,6 +47899,7 @@ func (c *DisksTestIamPermissionsCall) Header() http.Header { func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -40885,7 +47965,7 @@ func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPer } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.disks.testIamPermissions", // "parameterOrder": [ @@ -40932,6 +48012,1055 @@ func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPer } +// method id "compute.externalVpnGateways.delete": + +type ExternalVpnGatewaysDeleteCall struct { + s *Service + project string + externalVpnGateway string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified externalVpnGateway. (== +// suppress_warning http-rest-shadowed ==) +func (r *ExternalVpnGatewaysService) Delete(project string, externalVpnGateway string) *ExternalVpnGatewaysDeleteCall { + c := &ExternalVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.externalVpnGateway = externalVpnGateway + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ExternalVpnGatewaysDeleteCall) RequestId(requestId string) *ExternalVpnGatewaysDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysDeleteCall) Context(ctx context.Context) *ExternalVpnGatewaysDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways/{externalVpnGateway}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "externalVpnGateway": c.externalVpnGateway, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified externalVpnGateway. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.externalVpnGateways.delete", + // "parameterOrder": [ + // "project", + // "externalVpnGateway" + // ], + // "parameters": { + // "externalVpnGateway": { + // "description": "Name of the externalVpnGateways to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways/{externalVpnGateway}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.externalVpnGateways.get": + +type ExternalVpnGatewaysGetCall struct { + s *Service + project string + externalVpnGateway string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified externalVpnGateway. Get a list of +// available externalVpnGateways by making a list() request. (== +// suppress_warning http-rest-shadowed ==) +func (r *ExternalVpnGatewaysService) Get(project string, externalVpnGateway string) *ExternalVpnGatewaysGetCall { + c := &ExternalVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.externalVpnGateway = externalVpnGateway + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysGetCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ExternalVpnGatewaysGetCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysGetCall) Context(ctx context.Context) *ExternalVpnGatewaysGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways/{externalVpnGateway}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "externalVpnGateway": c.externalVpnGateway, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.get" call. +// Exactly one of *ExternalVpnGateway or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ExternalVpnGateway.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGateway, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ExternalVpnGateway{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.externalVpnGateways.get", + // "parameterOrder": [ + // "project", + // "externalVpnGateway" + // ], + // "parameters": { + // "externalVpnGateway": { + // "description": "Name of the externalVpnGateway to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways/{externalVpnGateway}", + // "response": { + // "$ref": "ExternalVpnGateway" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.externalVpnGateways.insert": + +type ExternalVpnGatewaysInsertCall struct { + s *Service + project string + externalvpngateway *ExternalVpnGateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a ExternalVpnGateway in the specified project using +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) +func (r *ExternalVpnGatewaysService) Insert(project string, externalvpngateway *ExternalVpnGateway) *ExternalVpnGatewaysInsertCall { + c := &ExternalVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.externalvpngateway = externalvpngateway + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ExternalVpnGatewaysInsertCall) RequestId(requestId string) *ExternalVpnGatewaysInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysInsertCall) Context(ctx context.Context) *ExternalVpnGatewaysInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.externalvpngateway) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a ExternalVpnGateway in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.externalVpnGateways.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways", + // "request": { + // "$ref": "ExternalVpnGateway" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.externalVpnGateways.list": + +type ExternalVpnGatewaysListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of ExternalVpnGateway available to the +// specified project. (== suppress_warning http-rest-shadowed ==) +func (r *ExternalVpnGatewaysService) List(project string) *ExternalVpnGatewaysListCall { + c := &ExternalVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *ExternalVpnGatewaysListCall) Filter(filter string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *ExternalVpnGatewaysListCall) MaxResults(maxResults int64) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *ExternalVpnGatewaysListCall) OrderBy(orderBy string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *ExternalVpnGatewaysListCall) PageToken(pageToken string) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysListCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ExternalVpnGatewaysListCall) IfNoneMatch(entityTag string) *ExternalVpnGatewaysListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysListCall) Context(ctx context.Context) *ExternalVpnGatewaysListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.list" call. +// Exactly one of *ExternalVpnGatewayList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ExternalVpnGatewayList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*ExternalVpnGatewayList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ExternalVpnGatewayList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of ExternalVpnGateway available to the specified project. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.externalVpnGateways.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways", + // "response": { + // "$ref": "ExternalVpnGatewayList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ExternalVpnGatewaysListCall) Pages(ctx context.Context, f func(*ExternalVpnGatewayList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.externalVpnGateways.setLabels": + +type ExternalVpnGatewaysSetLabelsCall struct { + s *Service + project string + resource string + globalsetlabelsrequest *GlobalSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLabels: Sets the labels on an ExternalVpnGateway. To learn more +// about labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) +func (r *ExternalVpnGatewaysService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ExternalVpnGatewaysSetLabelsCall { + c := &ExternalVpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.globalsetlabelsrequest = globalsetlabelsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysSetLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysSetLabelsCall) Context(ctx context.Context) *ExternalVpnGatewaysSetLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways/{resource}/setLabels") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.setLabels" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.externalVpnGateways.setLabels", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways/{resource}/setLabels", + // "request": { + // "$ref": "GlobalSetLabelsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.externalVpnGateways.testIamPermissions": + +type ExternalVpnGatewaysTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. (== suppress_warning http-rest-shadowed ==) +func (r *ExternalVpnGatewaysService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ExternalVpnGatewaysTestIamPermissionsCall { + c := &ExternalVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ExternalVpnGatewaysTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ExternalVpnGatewaysTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ExternalVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/externalVpnGateways/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.externalVpnGateways.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ExternalVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.externalVpnGateways.testIamPermissions", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/externalVpnGateways/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.firewalls.delete": type FirewallsDeleteCall struct { @@ -40943,7 +49072,8 @@ type FirewallsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified firewall. +// Delete: Deletes the specified firewall. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/delete func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -40998,6 +49128,7 @@ func (c *FirewallsDeleteCall) Header() http.Header { func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41057,7 +49188,7 @@ func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified firewall.", + // "description": "Deletes the specified firewall. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.firewalls.delete", // "parameterOrder": [ @@ -41109,7 +49240,8 @@ type FirewallsGetCall struct { header_ http.Header } -// Get: Returns the specified firewall. +// Get: Returns the specified firewall. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/get func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -41155,6 +49287,7 @@ func (c *FirewallsGetCall) Header() http.Header { func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41217,7 +49350,7 @@ func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) { } return ret, nil // { - // "description": "Returns the specified firewall.", + // "description": "Returns the specified firewall. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.firewalls.get", // "parameterOrder": [ @@ -41265,7 +49398,8 @@ type FirewallsInsertCall struct { } // Insert: Creates a firewall rule in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/insert func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -41320,6 +49454,7 @@ func (c *FirewallsInsertCall) Header() http.Header { func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41383,7 +49518,7 @@ func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates a firewall rule in the specified project using the data included in the request.", + // "description": "Creates a firewall rule in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.firewalls.insert", // "parameterOrder": [ @@ -41430,7 +49565,7 @@ type FirewallsListCall struct { } // List: Retrieves the list of firewall rules available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/list func (r *FirewallsService) List(project string) *FirewallsListCall { c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -41538,6 +49673,7 @@ func (c *FirewallsListCall) Header() http.Header { func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41599,7 +49735,7 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, err } return ret, nil // { - // "description": "Retrieves the list of firewall rules available to the specified project.", + // "description": "Retrieves the list of firewall rules available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.firewalls.list", // "parameterOrder": [ @@ -41685,7 +49821,8 @@ type FirewallsPatchCall struct { // Patch: Updates the specified firewall rule with the data included in // the request. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/patch func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -41741,6 +49878,7 @@ func (c *FirewallsPatchCall) Header() http.Header { func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41805,7 +49943,7 @@ func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.firewalls.patch", // "parameterOrder": [ @@ -41861,9 +49999,9 @@ type FirewallsUpdateCall struct { } // Update: Updates the specified firewall rule with the data included in -// the request. The PUT method can only update the following fields of -// firewall rule: allowed, description, sourceRanges, sourceTags, -// targetTags. +// the request. Note that all fields will be updated if using PUT, even +// fields that are not specified. To update individual fields, please +// use PATCH instead. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/update func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -41919,6 +50057,7 @@ func (c *FirewallsUpdateCall) Header() http.Header { func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -41983,7 +50122,7 @@ func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Updates the specified firewall rule with the data included in the request. The PUT method can only update the following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.", + // "description": "Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.firewalls.update", // "parameterOrder": [ @@ -42037,7 +50176,8 @@ type ForwardingRulesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of forwarding rules. +// AggregatedList: Retrieves an aggregated list of forwarding rules. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/aggregatedList func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -42145,6 +50285,7 @@ func (c *ForwardingRulesAggregatedListCall) Header() http.Header { func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -42206,7 +50347,7 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F } return ret, nil // { - // "description": "Retrieves an aggregated list of forwarding rules.", + // "description": "Retrieves an aggregated list of forwarding rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.forwardingRules.aggregatedList", // "parameterOrder": [ @@ -42290,7 +50431,8 @@ type ForwardingRulesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified ForwardingRule resource. +// Delete: Deletes the specified ForwardingRule resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/delete func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -42346,6 +50488,7 @@ func (c *ForwardingRulesDeleteCall) Header() http.Header { func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -42406,7 +50549,7 @@ func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified ForwardingRule resource.", + // "description": "Deletes the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.forwardingRules.delete", // "parameterOrder": [ @@ -42467,7 +50610,8 @@ type ForwardingRulesGetCall struct { header_ http.Header } -// Get: Returns the specified ForwardingRule resource. +// Get: Returns the specified ForwardingRule resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/get func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -42514,6 +50658,7 @@ func (c *ForwardingRulesGetCall) Header() http.Header { func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -42577,7 +50722,7 @@ func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRu } return ret, nil // { - // "description": "Returns the specified ForwardingRule resource.", + // "description": "Returns the specified ForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.forwardingRules.get", // "parameterOrder": [ @@ -42634,7 +50779,8 @@ type ForwardingRulesInsertCall struct { } // Insert: Creates a ForwardingRule resource in the specified project -// and region using the data included in the request. +// and region using the data included in the request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/insert func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -42690,6 +50836,7 @@ func (c *ForwardingRulesInsertCall) Header() http.Header { func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -42754,7 +50901,7 @@ func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.forwardingRules.insert", // "parameterOrder": [ @@ -42810,7 +50957,8 @@ type ForwardingRulesListCall struct { } // List: Retrieves a list of ForwardingRule resources available to the -// specified project and region. +// specified project and region. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/list func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -42919,6 +51067,7 @@ func (c *ForwardingRulesListCall) Header() http.Header { func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -42981,7 +51130,7 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR } return ret, nil // { - // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", + // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.forwardingRules.list", // "parameterOrder": [ @@ -43075,7 +51224,8 @@ type ForwardingRulesSetTargetCall struct { } // SetTarget: Changes target URL for forwarding rule. The new target -// should be of the same type as the old target. +// should be of the same type as the old target. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/setTarget func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -43132,6 +51282,7 @@ func (c *ForwardingRulesSetTargetCall) Header() http.Header { func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -43197,7 +51348,7 @@ func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.", + // "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.forwardingRules.setTarget", // "parameterOrder": [ @@ -43259,7 +51410,8 @@ type GlobalAddressesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified address resource. +// Delete: Deletes the specified address resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/delete func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall { c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -43314,6 +51466,7 @@ func (c *GlobalAddressesDeleteCall) Header() http.Header { func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -43373,7 +51526,7 @@ func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified address resource.", + // "description": "Deletes the specified address resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.globalAddresses.delete", // "parameterOrder": [ @@ -43426,7 +51579,8 @@ type GlobalAddressesGetCall struct { } // Get: Returns the specified address resource. Gets a list of available -// addresses by making a list() request. +// addresses by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/get func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -43472,6 +51626,7 @@ func (c *GlobalAddressesGetCall) Header() http.Header { func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -43534,7 +51689,7 @@ func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, err } return ret, nil // { - // "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request.", + // "description": "Returns the specified address resource. Gets a list of available addresses by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalAddresses.get", // "parameterOrder": [ @@ -43581,8 +51736,9 @@ type GlobalAddressesInsertCall struct { header_ http.Header } -// Insert: Creates an address resource in the specified project using -// the data included in the request. +// Insert: Creates an address resource in the specified project by using +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/insert func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall { c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -43637,6 +51793,7 @@ func (c *GlobalAddressesInsertCall) Header() http.Header { func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -43700,7 +51857,7 @@ func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates an address resource in the specified project using the data included in the request.", + // "description": "Creates an address resource in the specified project by using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalAddresses.insert", // "parameterOrder": [ @@ -43746,7 +51903,8 @@ type GlobalAddressesListCall struct { header_ http.Header } -// List: Retrieves a list of global addresses. +// List: Retrieves a list of global addresses. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/list func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -43854,6 +52012,7 @@ func (c *GlobalAddressesListCall) Header() http.Header { func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -43915,7 +52074,7 @@ func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList } return ret, nil // { - // "description": "Retrieves a list of global addresses.", + // "description": "Retrieves a list of global addresses. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalAddresses.list", // "parameterOrder": [ @@ -43998,7 +52157,8 @@ type GlobalForwardingRulesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified GlobalForwardingRule resource. +// Delete: Deletes the specified GlobalForwardingRule resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/delete func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -44053,6 +52213,7 @@ func (c *GlobalForwardingRulesDeleteCall) Header() http.Header { func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44112,7 +52273,7 @@ func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified GlobalForwardingRule resource.", + // "description": "Deletes the specified GlobalForwardingRule resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.globalForwardingRules.delete", // "parameterOrder": [ @@ -44165,7 +52326,8 @@ type GlobalForwardingRulesGetCall struct { } // Get: Returns the specified GlobalForwardingRule resource. Gets a list -// of available forwarding rules by making a list() request. +// of available forwarding rules by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/get func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -44211,6 +52373,7 @@ func (c *GlobalForwardingRulesGetCall) Header() http.Header { func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44273,7 +52436,7 @@ func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*Forwar } return ret, nil // { - // "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.", + // "description": "Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalForwardingRules.get", // "parameterOrder": [ @@ -44321,7 +52484,8 @@ type GlobalForwardingRulesInsertCall struct { } // Insert: Creates a GlobalForwardingRule resource in the specified -// project using the data included in the request. +// project using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/insert func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall { c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -44376,6 +52540,7 @@ func (c *GlobalForwardingRulesInsertCall) Header() http.Header { func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44439,7 +52604,7 @@ func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.", + // "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalForwardingRules.insert", // "parameterOrder": [ @@ -44486,7 +52651,7 @@ type GlobalForwardingRulesListCall struct { } // List: Retrieves a list of GlobalForwardingRule resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/list func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -44594,6 +52759,7 @@ func (c *GlobalForwardingRulesListCall) Header() http.Header { func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44655,7 +52821,7 @@ func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*Forwa } return ret, nil // { - // "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.", + // "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalForwardingRules.list", // "parameterOrder": [ @@ -44740,7 +52906,8 @@ type GlobalForwardingRulesSetTargetCall struct { } // SetTarget: Changes target URL for the GlobalForwardingRule resource. -// The new target should be of the same type as the old target. +// The new target should be of the same type as the old target. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/setTarget func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall { c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -44796,6 +52963,7 @@ func (c *GlobalForwardingRulesSetTargetCall) Header() http.Header { func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -44860,7 +53028,7 @@ func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.", + // "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.globalForwardingRules.setTarget", // "parameterOrder": [ @@ -44914,7 +53082,8 @@ type GlobalOperationsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of all operations. +// AggregatedList: Retrieves an aggregated list of all operations. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/aggregatedList func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45022,6 +53191,7 @@ func (c *GlobalOperationsAggregatedListCall) Header() http.Header { func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45083,7 +53253,7 @@ func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Retrieves an aggregated list of all operations.", + // "description": "Retrieves an aggregated list of all operations. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalOperations.aggregatedList", // "parameterOrder": [ @@ -45166,7 +53336,8 @@ type GlobalOperationsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified Operations resource. +// Delete: Deletes the specified Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/delete func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall { c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45202,6 +53373,7 @@ func (c *GlobalOperationsDeleteCall) Header() http.Header { func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45236,7 +53408,7 @@ func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deletes the specified Operations resource.", + // "description": "Deletes the specified Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.globalOperations.delete", // "parameterOrder": [ @@ -45281,7 +53453,8 @@ type GlobalOperationsGetCall struct { } // Get: Retrieves the specified Operations resource. Gets a list of -// operations by making a list() request. +// operations by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/get func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45327,6 +53500,7 @@ func (c *GlobalOperationsGetCall) Header() http.Header { func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45389,7 +53563,7 @@ func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request.", + // "description": "Retrieves the specified Operations resource. Gets a list of operations by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalOperations.get", // "parameterOrder": [ @@ -45437,7 +53611,7 @@ type GlobalOperationsListCall struct { } // List: Retrieves a list of Operation resources contained within the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/list func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -45545,6 +53719,7 @@ func (c *GlobalOperationsListCall) Header() http.Header { func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45606,7 +53781,7 @@ func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified project.", + // "description": "Retrieves a list of Operation resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.globalOperations.list", // "parameterOrder": [ @@ -45678,6 +53853,260 @@ func (c *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationL } } +// method id "compute.healthChecks.aggregatedList": + +type HealthChecksAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of all HealthCheck resources, +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) +func (r *HealthChecksService) AggregatedList(project string) *HealthChecksAggregatedListCall { + c := &HealthChecksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *HealthChecksAggregatedListCall) Filter(filter string) *HealthChecksAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *HealthChecksAggregatedListCall) MaxResults(maxResults int64) *HealthChecksAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *HealthChecksAggregatedListCall) OrderBy(orderBy string) *HealthChecksAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *HealthChecksAggregatedListCall) PageToken(pageToken string) *HealthChecksAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *HealthChecksAggregatedListCall) Fields(s ...googleapi.Field) *HealthChecksAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *HealthChecksAggregatedListCall) IfNoneMatch(entityTag string) *HealthChecksAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *HealthChecksAggregatedListCall) Context(ctx context.Context) *HealthChecksAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *HealthChecksAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *HealthChecksAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/healthChecks") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.healthChecks.aggregatedList" call. +// Exactly one of *HealthChecksAggregatedList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *HealthChecksAggregatedList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *HealthChecksAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthChecksAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &HealthChecksAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.healthChecks.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/healthChecks", + // "response": { + // "$ref": "HealthChecksAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *HealthChecksAggregatedListCall) Pages(ctx context.Context, f func(*HealthChecksAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.healthChecks.delete": type HealthChecksDeleteCall struct { @@ -45689,7 +54118,8 @@ type HealthChecksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified HealthCheck resource. +// Delete: Deletes the specified HealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall { c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -45743,6 +54173,7 @@ func (c *HealthChecksDeleteCall) Header() http.Header { func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45802,7 +54233,7 @@ func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Deletes the specified HealthCheck resource.", + // "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.healthChecks.delete", // "parameterOrder": [ @@ -45855,7 +54286,8 @@ type HealthChecksGetCall struct { } // Get: Returns the specified HealthCheck resource. Gets a list of -// available health checks by making a list() request. +// available health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall { c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -45900,6 +54332,7 @@ func (c *HealthChecksGetCall) Header() http.Header { func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -45962,7 +54395,7 @@ func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, er } return ret, nil // { - // "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", + // "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.healthChecks.get", // "parameterOrder": [ @@ -46010,7 +54443,8 @@ type HealthChecksInsertCall struct { } // Insert: Creates a HealthCheck resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) *HealthChecksInsertCall { c := &HealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -46064,6 +54498,7 @@ func (c *HealthChecksInsertCall) Header() http.Header { func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46127,7 +54562,7 @@ func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + // "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.healthChecks.insert", // "parameterOrder": [ @@ -46174,7 +54609,7 @@ type HealthChecksListCall struct { } // List: Retrieves the list of HealthCheck resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) List(project string) *HealthChecksListCall { c := &HealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -46281,6 +54716,7 @@ func (c *HealthChecksListCall) Header() http.Header { func (c *HealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46342,7 +54778,7 @@ func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckLis } return ret, nil // { - // "description": "Retrieves the list of HealthCheck resources available to the specified project.", + // "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.healthChecks.list", // "parameterOrder": [ @@ -46429,6 +54865,7 @@ type HealthChecksPatchCall struct { // Patch: Updates a HealthCheck resource in the specified project using // the data included in the request. This method supports PATCH // semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall { c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -46483,6 +54920,7 @@ func (c *HealthChecksPatchCall) Header() http.Header { func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46547,7 +54985,7 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.healthChecks.patch", // "parameterOrder": [ @@ -46603,7 +55041,8 @@ type HealthChecksUpdateCall struct { } // Update: Updates a HealthCheck resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HealthChecksService) Update(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksUpdateCall { c := &HealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -46658,6 +55097,7 @@ func (c *HealthChecksUpdateCall) Header() http.Header { func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46722,7 +55162,7 @@ func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.healthChecks.update", // "parameterOrder": [ @@ -46776,7 +55216,8 @@ type HttpHealthChecksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified HttpHealthCheck resource. +// Delete: Deletes the specified HttpHealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/delete func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall { c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -46831,6 +55272,7 @@ func (c *HttpHealthChecksDeleteCall) Header() http.Header { func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -46890,7 +55332,7 @@ func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified HttpHealthCheck resource.", + // "description": "Deletes the specified HttpHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.httpHealthChecks.delete", // "parameterOrder": [ @@ -46943,7 +55385,8 @@ type HttpHealthChecksGetCall struct { } // Get: Returns the specified HttpHealthCheck resource. Gets a list of -// available HTTP health checks by making a list() request. +// available HTTP health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/get func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -46989,6 +55432,7 @@ func (c *HttpHealthChecksGetCall) Header() http.Header { func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47051,7 +55495,7 @@ func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthC } return ret, nil // { - // "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request.", + // "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpHealthChecks.get", // "parameterOrder": [ @@ -47099,7 +55543,8 @@ type HttpHealthChecksInsertCall struct { } // Insert: Creates a HttpHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/insert func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall { c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -47154,6 +55599,7 @@ func (c *HttpHealthChecksInsertCall) Header() http.Header { func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47217,7 +55663,7 @@ func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", + // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.httpHealthChecks.insert", // "parameterOrder": [ @@ -47264,7 +55710,7 @@ type HttpHealthChecksListCall struct { } // List: Retrieves the list of HttpHealthCheck resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/list func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall { c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -47372,6 +55818,7 @@ func (c *HttpHealthChecksListCall) Header() http.Header { func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47433,7 +55880,7 @@ func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealth } return ret, nil // { - // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", + // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpHealthChecks.list", // "parameterOrder": [ @@ -47520,6 +55967,7 @@ type HttpHealthChecksPatchCall struct { // Patch: Updates a HttpHealthCheck resource in the specified project // using the data included in the request. This method supports PATCH // semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/patch func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -47575,6 +56023,7 @@ func (c *HttpHealthChecksPatchCall) Header() http.Header { func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47639,7 +56088,7 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.httpHealthChecks.patch", // "parameterOrder": [ @@ -47695,7 +56144,8 @@ type HttpHealthChecksUpdateCall struct { } // Update: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/update func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall { c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -47751,6 +56201,7 @@ func (c *HttpHealthChecksUpdateCall) Header() http.Header { func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47815,7 +56266,7 @@ func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", + // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.httpHealthChecks.update", // "parameterOrder": [ @@ -47869,7 +56320,8 @@ type HttpsHealthChecksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified HttpsHealthCheck resource. +// Delete: Deletes the specified HttpsHealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall { c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -47923,6 +56375,7 @@ func (c *HttpsHealthChecksDeleteCall) Header() http.Header { func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -47982,7 +56435,7 @@ func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified HttpsHealthCheck resource.", + // "description": "Deletes the specified HttpsHealthCheck resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.httpsHealthChecks.delete", // "parameterOrder": [ @@ -48035,7 +56488,8 @@ type HttpsHealthChecksGetCall struct { } // Get: Returns the specified HttpsHealthCheck resource. Gets a list of -// available HTTPS health checks by making a list() request. +// available HTTPS health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall { c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48080,6 +56534,7 @@ func (c *HttpsHealthChecksGetCall) Header() http.Header { func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48142,7 +56597,7 @@ func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealt } return ret, nil // { - // "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request.", + // "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpsHealthChecks.get", // "parameterOrder": [ @@ -48190,7 +56645,8 @@ type HttpsHealthChecksInsertCall struct { } // Insert: Creates a HttpsHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall { c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48244,6 +56700,7 @@ func (c *HttpsHealthChecksInsertCall) Header() http.Header { func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48307,7 +56764,7 @@ func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", + // "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.httpsHealthChecks.insert", // "parameterOrder": [ @@ -48354,7 +56811,7 @@ type HttpsHealthChecksListCall struct { } // List: Retrieves the list of HttpsHealthCheck resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall { c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48461,6 +56918,7 @@ func (c *HttpsHealthChecksListCall) Header() http.Header { func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48522,7 +56980,7 @@ func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHeal } return ret, nil // { - // "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", + // "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.httpsHealthChecks.list", // "parameterOrder": [ @@ -48609,6 +57067,7 @@ type HttpsHealthChecksPatchCall struct { // Patch: Updates a HttpsHealthCheck resource in the specified project // using the data included in the request. This method supports PATCH // semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall { c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48663,6 +57122,7 @@ func (c *HttpsHealthChecksPatchCall) Header() http.Header { func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48727,7 +57187,7 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.httpsHealthChecks.patch", // "parameterOrder": [ @@ -48783,7 +57243,8 @@ type HttpsHealthChecksUpdateCall struct { } // Update: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall { c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48838,6 +57299,7 @@ func (c *HttpsHealthChecksUpdateCall) Header() http.Header { func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -48902,7 +57364,7 @@ func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.", + // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.httpsHealthChecks.update", // "parameterOrder": [ @@ -48956,7 +57418,8 @@ type ImagesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified image. +// Delete: Deletes the specified image. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/delete func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -49011,6 +57474,7 @@ func (c *ImagesDeleteCall) Header() http.Header { func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49070,7 +57534,7 @@ func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified image.", + // "description": "Deletes the specified image. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.images.delete", // "parameterOrder": [ @@ -49125,7 +57589,7 @@ type ImagesDeprecateCall struct { // Deprecate: Sets the deprecation status of an image. // // If an empty request body is given, clears the deprecation status -// instead. +// instead. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/deprecate func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall { c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -49181,6 +57645,7 @@ func (c *ImagesDeprecateCall) Header() http.Header { func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49245,7 +57710,7 @@ func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", + // "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.deprecate", // "parameterOrder": [ @@ -49301,7 +57766,7 @@ type ImagesGetCall struct { } // Get: Returns the specified image. Gets a list of available images by -// making a list() request. +// making a list() request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/get func (r *ImagesService) Get(project string, image string) *ImagesGetCall { c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -49347,6 +57812,7 @@ func (c *ImagesGetCall) Header() http.Header { func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49409,7 +57875,7 @@ func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) { } return ret, nil // { - // "description": "Returns the specified image. Gets a list of available images by making a list() request.", + // "description": "Returns the specified image. Gets a list of available images by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.get", // "parameterOrder": [ @@ -49458,7 +57924,8 @@ type ImagesGetFromFamilyCall struct { } // GetFromFamily: Returns the latest image that is part of an image -// family and is not deprecated. +// family and is not deprecated. (== suppress_warning http-rest-shadowed +// ==) func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall { c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49503,6 +57970,7 @@ func (c *ImagesGetFromFamilyCall) Header() http.Header { func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49565,7 +58033,7 @@ func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, erro } return ret, nil // { - // "description": "Returns the latest image that is part of an image family and is not deprecated.", + // "description": "Returns the latest image that is part of an image family and is not deprecated. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.getFromFamily", // "parameterOrder": [ @@ -49614,7 +58082,8 @@ type ImagesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *ImagesService) GetIamPolicy(project string, resource string) *ImagesGetIamPolicyCall { c := &ImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -49659,6 +58128,7 @@ func (c *ImagesGetIamPolicyCall) Header() http.Header { func (c *ImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49721,7 +58191,7 @@ func (c *ImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.getIamPolicy", // "parameterOrder": [ @@ -49769,7 +58239,7 @@ type ImagesInsertCall struct { } // Insert: Creates an image in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/insert func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -49831,6 +58301,7 @@ func (c *ImagesInsertCall) Header() http.Header { func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -49894,7 +58365,7 @@ func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates an image in the specified project using the data included in the request.", + // "description": "Creates an image in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.insert", // "parameterOrder": [ @@ -49954,7 +58425,7 @@ type ImagesListCall struct { // projects, including publicly-available images, like Debian 8. If you // want to get a list of publicly-available images, use this method to // make a request to the respective image project, such as debian-cloud -// or windows-cloud. +// or windows-cloud. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/images/list func (r *ImagesService) List(project string) *ImagesListCall { c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -50062,6 +58533,7 @@ func (c *ImagesListCall) Header() http.Header { func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50123,7 +58595,7 @@ func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) { } return ret, nil // { - // "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + // "description": "Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.images.list", // "parameterOrder": [ @@ -50208,7 +58680,8 @@ type ImagesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *ImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *ImagesSetIamPolicyCall { c := &ImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50244,6 +58717,7 @@ func (c *ImagesSetIamPolicyCall) Header() http.Header { func (c *ImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50308,7 +58782,7 @@ func (c *ImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, erro } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.setIamPolicy", // "parameterOrder": [ @@ -50359,7 +58833,8 @@ type ImagesSetLabelsCall struct { } // SetLabels: Sets the labels on an image. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall { c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50395,6 +58870,7 @@ func (c *ImagesSetLabelsCall) Header() http.Header { func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50459,7 +58935,7 @@ func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.setLabels", // "parameterOrder": [ @@ -50510,7 +58986,7 @@ type ImagesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall { c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50546,6 +59022,7 @@ func (c *ImagesTestIamPermissionsCall) Header() http.Header { func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50610,7 +59087,7 @@ func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPe } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.images.testIamPermissions", // "parameterOrder": [ @@ -50678,7 +59155,7 @@ type InstanceGroupManagersAbandonInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall { c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50734,6 +59211,7 @@ func (c *InstanceGroupManagersAbandonInstancesCall) Header() http.Header { func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -50799,7 +59277,7 @@ func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.abandonInstances", // "parameterOrder": [ @@ -50860,7 +59338,7 @@ type InstanceGroupManagersAggregatedListCall struct { } // AggregatedList: Retrieves the list of managed instance groups and -// groups them by zone. +// groups them by zone. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall { c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -50967,6 +59445,7 @@ func (c *InstanceGroupManagersAggregatedListCall) Header() http.Header { func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51029,7 +59508,7 @@ func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Retrieves the list of managed instance groups and groups them by zone.", + // "description": "Retrieves the list of managed instance groups and groups them by zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroupManagers.aggregatedList", // "parameterOrder": [ @@ -51116,7 +59595,7 @@ type InstanceGroupManagersDeleteCall struct { // Delete: Deletes the specified managed instance group and all of the // instances in that group. Note that the instance group must not belong // to a backend service. Read Deleting an instance group for more -// information. +// information. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -51171,6 +59650,7 @@ func (c *InstanceGroupManagersDeleteCall) Header() http.Header { func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51231,7 +59711,7 @@ func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.", + // "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instanceGroupManagers.delete", // "parameterOrder": [ @@ -51305,7 +59785,7 @@ type InstanceGroupManagersDeleteInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall { c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -51361,6 +59841,7 @@ func (c *InstanceGroupManagersDeleteInstancesCall) Header() http.Header { func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51426,7 +59907,7 @@ func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.deleteInstances", // "parameterOrder": [ @@ -51490,7 +59971,7 @@ type InstanceGroupManagersGetCall struct { // Get: Returns all of the details about the specified managed instance // group. Gets a list of available managed instance groups by making a -// list() request. +// list() request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -51536,6 +60017,7 @@ func (c *InstanceGroupManagersGetCall) Header() http.Header { func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51599,7 +60081,7 @@ func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*Instan } return ret, nil // { - // "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.", + // "description": "Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroupManagers.get", // "parameterOrder": [ @@ -51663,6 +60145,7 @@ type InstanceGroupManagersInsertCall struct { // // A managed instance group can have up to 1000 VM instances per group. // Please contact Cloud Support if you need an increase in this limit. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall { c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -51717,6 +60200,7 @@ func (c *InstanceGroupManagersInsertCall) Header() http.Header { func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -51781,7 +60265,7 @@ func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.", + // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.insert", // "parameterOrder": [ @@ -51836,7 +60320,8 @@ type InstanceGroupManagersListCall struct { } // List: Retrieves a list of managed instance groups that are contained -// within the specified project and zone. +// within the specified project and zone. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall { c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -51944,6 +60429,7 @@ func (c *InstanceGroupManagersListCall) Header() http.Header { func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52006,7 +60492,7 @@ func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*Insta } return ret, nil // { - // "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.", + // "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroupManagers.list", // "parameterOrder": [ @@ -52102,7 +60588,8 @@ type InstanceGroupManagersListManagedInstancesCall struct { // indicates the action that the managed instance group is performing on // the instance. For example, if the group is still creating an // instance, the currentAction is CREATING. If a previous action failed, -// the list displays the errors for that failed action. +// the list displays the errors for that failed action. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall { c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -52201,6 +60688,7 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Header() http.Header { func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52263,7 +60751,7 @@ func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.", + // "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.listManagedInstances", // "parameterOrder": [ @@ -52347,7 +60835,7 @@ type InstanceGroupManagersPatchCall struct { // process of being patched. You must separately verify the status of // the individual instances with the listManagedInstances method. This // method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. +// and processing rules. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Patch(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersPatchCall { c := &InstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -52403,6 +60891,7 @@ func (c *InstanceGroupManagersPatchCall) Header() http.Header { func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52468,7 +60957,7 @@ func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instanceGroupManagers.patch", // "parameterOrder": [ @@ -52544,7 +61033,7 @@ type InstanceGroupManagersRecreateInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall { c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -52600,6 +61089,7 @@ func (c *InstanceGroupManagersRecreateInstancesCall) Header() http.Header { func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52665,7 +61155,7 @@ func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.recreateInstances", // "parameterOrder": [ @@ -52747,6 +61237,7 @@ type InstanceGroupManagersResizeCall struct { // If the group is part of a backend service that has enabled connection // draining, it can take up to 60 seconds after the connection draining // duration has elapsed before the VM instance is removed or deleted. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall { c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -52802,6 +61293,7 @@ func (c *InstanceGroupManagersResizeCall) Header() http.Header { func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -52862,7 +61354,7 @@ func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nWhen resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:\n\n+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.\n\nThis list is subject to change.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.resize", // "parameterOrder": [ @@ -52931,7 +61423,8 @@ type InstanceGroupManagersSetInstanceTemplateCall struct { // SetInstanceTemplate: Specifies the instance template to use when // creating new instances in this group. The templates for existing -// instances in the group do not change unless you recreate them. +// instances in the group do not change unless you recreate them. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall { c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -52987,6 +61480,7 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53052,7 +61546,7 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.", + // "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.setInstanceTemplate", // "parameterOrder": [ @@ -53120,7 +61614,8 @@ type InstanceGroupManagersSetTargetPoolsCall struct { // group. This operation is marked DONE when you make the request even // if the instances have not yet been added to their target pools. The // change might take some time to apply to all of the instances in the -// group depending on the size of the group. +// group depending on the size of the group. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall { c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -53176,6 +61671,7 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header { func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53241,7 +61737,7 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", + // "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroupManagers.setTargetPools", // "parameterOrder": [ @@ -53305,7 +61801,8 @@ type InstanceGroupsAddInstancesCall struct { // AddInstances: Adds a list of instances to the specified instance // group. All of the instances in the instance group must be in the same -// network/subnetwork. Read Adding instances for more information. +// network/subnetwork. Read Adding instances for more information. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -53361,6 +61858,7 @@ func (c *InstanceGroupsAddInstancesCall) Header() http.Header { func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53426,7 +61924,7 @@ func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", + // "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.addInstances", // "parameterOrder": [ @@ -53487,7 +61985,7 @@ type InstanceGroupsAggregatedListCall struct { } // AggregatedList: Retrieves the list of instance groups and sorts them -// by zone. +// by zone. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -53594,6 +62092,7 @@ func (c *InstanceGroupsAggregatedListCall) Header() http.Header { func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53655,7 +62154,7 @@ func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*In } return ret, nil // { - // "description": "Retrieves the list of instance groups and sorts them by zone.", + // "description": "Retrieves the list of instance groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroups.aggregatedList", // "parameterOrder": [ @@ -53742,7 +62241,7 @@ type InstanceGroupsDeleteCall struct { // Delete: Deletes the specified instance group. The instances in the // group are not deleted. Note that instance group must not belong to a // backend service. Read Deleting an instance group for more -// information. +// information. (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -53797,6 +62296,7 @@ func (c *InstanceGroupsDeleteCall) Header() http.Header { func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -53857,7 +62357,7 @@ func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", + // "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instanceGroups.delete", // "parameterOrder": [ @@ -53917,7 +62417,8 @@ type InstanceGroupsGetCall struct { } // Get: Returns the specified instance group. Gets a list of available -// instance groups by making a list() request. +// instance groups by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -53963,6 +62464,7 @@ func (c *InstanceGroupsGetCall) Header() http.Header { func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54026,7 +62528,7 @@ func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup } return ret, nil // { - // "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request.", + // "description": "Returns the specified instance group. Gets a list of available instance groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroups.get", // "parameterOrder": [ @@ -54081,7 +62583,8 @@ type InstanceGroupsInsertCall struct { } // Insert: Creates an instance group in the specified project using the -// parameters that are included in the request. +// parameters that are included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -54136,6 +62639,7 @@ func (c *InstanceGroupsInsertCall) Header() http.Header { func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54200,7 +62704,7 @@ func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates an instance group in the specified project using the parameters that are included in the request.", + // "description": "Creates an instance group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.insert", // "parameterOrder": [ @@ -54255,7 +62759,8 @@ type InstanceGroupsListCall struct { } // List: Retrieves the list of instance groups that are located in the -// specified project and zone. +// specified project and zone. (== suppress_warning http-rest-shadowed +// ==) func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -54363,6 +62868,7 @@ func (c *InstanceGroupsListCall) Header() http.Header { func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54425,7 +62931,7 @@ func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGrou } return ret, nil // { - // "description": "Retrieves the list of instance groups that are located in the specified project and zone.", + // "description": "Retrieves the list of instance groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceGroups.list", // "parameterOrder": [ @@ -54518,6 +63024,7 @@ type InstanceGroupsListInstancesCall struct { } // ListInstances: Lists the instances in the specified instance group. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -54617,6 +63124,7 @@ func (c *InstanceGroupsListInstancesCall) Header() http.Header { func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54682,7 +63190,7 @@ func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*Ins } return ret, nil // { - // "description": "Lists the instances in the specified instance group.", + // "description": "Lists the instances in the specified instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.listInstances", // "parameterOrder": [ @@ -54789,7 +63297,8 @@ type InstanceGroupsRemoveInstancesCall struct { // // If the group is part of a backend service that has enabled connection // draining, it can take up to 60 seconds after the connection draining -// duration before the VM instance is removed or deleted. +// duration before the VM instance is removed or deleted. (== +// suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -54845,6 +63354,7 @@ func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -54910,7 +63420,7 @@ func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.", + // "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.removeInstances", // "parameterOrder": [ @@ -54973,6 +63483,7 @@ type InstanceGroupsSetNamedPortsCall struct { } // SetNamedPorts: Sets the named ports for the specified instance group. +// (== suppress_warning http-rest-shadowed ==) func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -55028,6 +63539,7 @@ func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55093,7 +63605,7 @@ func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Sets the named ports for the specified instance group.", + // "description": "Sets the named ports for the specified instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceGroups.setNamedPorts", // "parameterOrder": [ @@ -55156,6 +63668,7 @@ type InstanceTemplatesDeleteCall struct { // Delete: Deletes the specified instance template. Deleting an instance // template is permanent and cannot be undone. It is not possible to // delete templates that are already in use by a managed instance group. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -55210,6 +63723,7 @@ func (c *InstanceTemplatesDeleteCall) Header() http.Header { func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55269,7 +63783,7 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.", + // "description": "Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instanceTemplates.delete", // "parameterOrder": [ @@ -55322,7 +63836,8 @@ type InstanceTemplatesGetCall struct { } // Get: Returns the specified instance template. Gets a list of -// available instance templates by making a list() request. +// available instance templates by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/get func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -55368,6 +63883,7 @@ func (c *InstanceTemplatesGetCall) Header() http.Header { func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55430,7 +63946,7 @@ func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTe } return ret, nil // { - // "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request.", + // "description": "Returns the specified instance template. Gets a list of available instance templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceTemplates.get", // "parameterOrder": [ @@ -55479,7 +63995,8 @@ type InstanceTemplatesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) *InstanceTemplatesGetIamPolicyCall { c := &InstanceTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -55524,6 +64041,7 @@ func (c *InstanceTemplatesGetIamPolicyCall) Header() http.Header { func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55586,7 +64104,7 @@ func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceTemplates.getIamPolicy", // "parameterOrder": [ @@ -55637,7 +64155,8 @@ type InstanceTemplatesInsertCall struct { // the data that is included in the request. If you are creating a new // template to update an existing instance group, your new instance // template must use the same network or, if applicable, the same -// subnetwork as the original template. +// subnetwork as the original template. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/insert func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -55692,6 +64211,7 @@ func (c *InstanceTemplatesInsertCall) Header() http.Header { func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55755,7 +64275,7 @@ func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.", + // "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceTemplates.insert", // "parameterOrder": [ @@ -55802,7 +64322,8 @@ type InstanceTemplatesListCall struct { } // List: Retrieves a list of instance templates that are contained -// within the specified project. +// within the specified project. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/list func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -55910,6 +64431,7 @@ func (c *InstanceTemplatesListCall) Header() http.Header { func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -55971,7 +64493,7 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT } return ret, nil // { - // "description": "Retrieves a list of instance templates that are contained within the specified project.", + // "description": "Retrieves a list of instance templates that are contained within the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instanceTemplates.list", // "parameterOrder": [ @@ -56056,7 +64578,8 @@ type InstanceTemplatesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *InstanceTemplatesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InstanceTemplatesSetIamPolicyCall { c := &InstanceTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -56092,6 +64615,7 @@ func (c *InstanceTemplatesSetIamPolicyCall) Header() http.Header { func (c *InstanceTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56156,7 +64680,7 @@ func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceTemplates.setIamPolicy", // "parameterOrder": [ @@ -56207,7 +64731,7 @@ type InstanceTemplatesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall { c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -56243,6 +64767,7 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header { func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56307,7 +64832,7 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instanceTemplates.testIamPermissions", // "parameterOrder": [ @@ -56360,7 +64885,7 @@ type InstancesAddAccessConfigCall struct { } // AddAccessConfig: Adds an access config to an instance's network -// interface. +// interface. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/addAccessConfig func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -56418,6 +64943,7 @@ func (c *InstancesAddAccessConfigCall) Header() http.Header { func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56483,7 +65009,7 @@ func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Adds an access config to an instance's network interface.", + // "description": "Adds an access config to an instance's network interface. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.addAccessConfig", // "parameterOrder": [ @@ -56553,7 +65079,8 @@ type InstancesAggregatedListCall struct { } // AggregatedList: Retrieves aggregated list of all of the instances in -// your project across all regions and zones. +// your project across all regions and zones. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/aggregatedList func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -56661,6 +65188,7 @@ func (c *InstancesAggregatedListCall) Header() http.Header { func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56722,7 +65250,7 @@ func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Instanc } return ret, nil // { - // "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones.", + // "description": "Retrieves aggregated list of all of the instances in your project across all regions and zones. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.aggregatedList", // "parameterOrder": [ @@ -56810,7 +65338,8 @@ type InstancesAttachDiskCall struct { // AttachDisk: Attaches an existing Disk resource to an instance. You // must first create the disk before you can attach it. It is not // possible to create and attach a disk at the same time. For more -// information, read Adding a persistent disk to your instance. +// information, read Adding a persistent disk to your instance. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/attachDisk func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -56875,6 +65404,7 @@ func (c *InstancesAttachDiskCall) Header() http.Header { func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -56940,7 +65470,7 @@ func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.", + // "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.attachDisk", // "parameterOrder": [ @@ -57009,7 +65539,8 @@ type InstancesDeleteCall struct { } // Delete: Deletes the specified Instance resource. For more -// information, see Stopping or Deleting an Instance. +// information, see Stopping or Deleting an Instance. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/delete func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -57065,6 +65596,7 @@ func (c *InstancesDeleteCall) Header() http.Header { func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57125,7 +65657,7 @@ func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.", + // "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.instances.delete", // "parameterOrder": [ @@ -57186,7 +65718,7 @@ type InstancesDeleteAccessConfigCall struct { } // DeleteAccessConfig: Deletes an access config from an instance's -// network interface. +// network interface. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/deleteAccessConfig func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -57244,6 +65776,7 @@ func (c *InstancesDeleteAccessConfigCall) Header() http.Header { func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57304,7 +65837,7 @@ func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes an access config from an instance's network interface.", + // "description": "Deletes an access config from an instance's network interface. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.deleteAccessConfig", // "parameterOrder": [ @@ -57378,7 +65911,8 @@ type InstancesDetachDiskCall struct { header_ http.Header } -// DetachDisk: Detaches a disk from an instance. +// DetachDisk: Detaches a disk from an instance. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/detachDisk func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -57435,6 +65969,7 @@ func (c *InstancesDetachDiskCall) Header() http.Header { func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57495,7 +66030,7 @@ func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Detaches a disk from an instance.", + // "description": "Detaches a disk from an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.detachDisk", // "parameterOrder": [ @@ -57564,7 +66099,8 @@ type InstancesGetCall struct { } // Get: Returns the specified Instance resource. Gets a list of -// available instances by making a list() request. +// available instances by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/get func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -57611,6 +66147,7 @@ func (c *InstancesGetCall) Header() http.Header { func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57674,7 +66211,7 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { } return ret, nil // { - // "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request.", + // "description": "Returns the specified Instance resource. Gets a list of available instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.get", // "parameterOrder": [ @@ -57718,6 +66255,198 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { } +// method id "compute.instances.getGuestAttributes": + +type InstancesGetGuestAttributesCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetGuestAttributes: Returns the specified guest attributes entry. (== +// suppress_warning http-rest-shadowed ==) +func (r *InstancesService) GetGuestAttributes(project string, zone string, instance string) *InstancesGetGuestAttributesCall { + c := &InstancesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + return c +} + +// QueryPath sets the optional parameter "queryPath": Specifies the +// guest attributes path to be queried. +func (c *InstancesGetGuestAttributesCall) QueryPath(queryPath string) *InstancesGetGuestAttributesCall { + c.urlParams_.Set("queryPath", queryPath) + return c +} + +// VariableKey sets the optional parameter "variableKey": Specifies the +// key for the guest attributes entry. +func (c *InstancesGetGuestAttributesCall) VariableKey(variableKey string) *InstancesGetGuestAttributesCall { + c.urlParams_.Set("variableKey", variableKey) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesGetGuestAttributesCall) Fields(s ...googleapi.Field) *InstancesGetGuestAttributesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstancesGetGuestAttributesCall) IfNoneMatch(entityTag string) *InstancesGetGuestAttributesCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesGetGuestAttributesCall) Context(ctx context.Context) *InstancesGetGuestAttributesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesGetGuestAttributesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/getGuestAttributes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.getGuestAttributes" call. +// Exactly one of *GuestAttributes or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *GuestAttributes.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*GuestAttributes, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GuestAttributes{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified guest attributes entry. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.instances.getGuestAttributes", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "queryPath": { + // "description": "Specifies the guest attributes path to be queried.", + // "location": "query", + // "type": "string" + // }, + // "variableKey": { + // "description": "Specifies the key for the guest attributes entry.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/getGuestAttributes", + // "response": { + // "$ref": "GuestAttributes" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.instances.getIamPolicy": type InstancesGetIamPolicyCall struct { @@ -57732,7 +66461,8 @@ type InstancesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) GetIamPolicy(project string, zone string, resource string) *InstancesGetIamPolicyCall { c := &InstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -57778,6 +66508,7 @@ func (c *InstancesGetIamPolicyCall) Header() http.Header { func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -57841,7 +66572,7 @@ func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getIamPolicy", // "parameterOrder": [ @@ -57899,7 +66630,7 @@ type InstancesGetSerialPortOutputCall struct { } // GetSerialPortOutput: Returns the last 1 MB of serial port output from -// the specified instance. +// the specified instance. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/getSerialPortOutput func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -57964,6 +66695,7 @@ func (c *InstancesGetSerialPortOutputCall) Header() http.Header { func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58027,7 +66759,7 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se } return ret, nil // { - // "description": "Returns the last 1 MB of serial port output from the specified instance.", + // "description": "Returns the last 1 MB of serial port output from the specified instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getSerialPortOutput", // "parameterOrder": [ @@ -58100,7 +66832,7 @@ type InstancesGetShieldedInstanceIdentityCall struct { } // GetShieldedInstanceIdentity: Returns the Shielded Instance Identity -// of an instance +// of an instance (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone string, instance string) *InstancesGetShieldedInstanceIdentityCall { c := &InstancesGetShieldedInstanceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -58146,6 +66878,7 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Header() http.Header { func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58209,7 +66942,7 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Returns the Shielded Instance Identity of an instance", + // "description": "Returns the Shielded Instance Identity of an instance (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.getShieldedInstanceIdentity", // "parameterOrder": [ @@ -58266,7 +66999,8 @@ type InstancesInsertCall struct { } // Insert: Creates an instance resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/insert func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -58337,6 +67071,7 @@ func (c *InstancesInsertCall) Header() http.Header { func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58401,7 +67136,7 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Creates an instance resource in the specified project using the data included in the request.", + // "description": "Creates an instance resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.insert", // "parameterOrder": [ @@ -58462,7 +67197,7 @@ type InstancesListCall struct { } // List: Retrieves the list of instances contained within the specified -// zone. +// zone. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/list func (r *InstancesService) List(project string, zone string) *InstancesListCall { c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -58571,6 +67306,7 @@ func (c *InstancesListCall) Header() http.Header { func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58633,7 +67369,7 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, err } return ret, nil // { - // "description": "Retrieves the list of instances contained within the specified zone.", + // "description": "Retrieves the list of instances contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.list", // "parameterOrder": [ @@ -58728,7 +67464,8 @@ type InstancesListReferrersCall struct { // ListReferrers: Retrieves the list of referrers to instances contained // within the specified zone. For more information, read Viewing -// Referrers to VM Instances. +// Referrers to VM Instances. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall { c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -58837,6 +67574,7 @@ func (c *InstancesListReferrersCall) Header() http.Header { func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -58900,7 +67638,7 @@ func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*Instance } return ret, nil // { - // "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.", + // "description": "Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.instances.listReferrers", // "parameterOrder": [ @@ -59002,7 +67740,7 @@ type InstancesResetCall struct { // Reset: Performs a reset on the instance. This is a hard reset the VM // does not do a graceful shutdown. For more information, see Resetting -// an instance. +// an instance. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/reset func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -59058,6 +67796,7 @@ func (c *InstancesResetCall) Header() http.Header { func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59118,7 +67857,7 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.", + // "description": "Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.reset", // "parameterOrder": [ @@ -59178,7 +67917,8 @@ type InstancesSetDeletionProtectionCall struct { header_ http.Header } -// SetDeletionProtection: Sets deletion protection on the instance. +// SetDeletionProtection: Sets deletion protection on the instance. (== +// suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetDeletionProtection(project string, zone string, resource string) *InstancesSetDeletionProtectionCall { c := &InstancesSetDeletionProtectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -59240,6 +67980,7 @@ func (c *InstancesSetDeletionProtectionCall) Header() http.Header { func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59300,7 +68041,7 @@ func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Sets deletion protection on the instance.", + // "description": "Sets deletion protection on the instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setDeletionProtection", // "parameterOrder": [ @@ -59367,7 +68108,7 @@ type InstancesSetDiskAutoDeleteCall struct { } // SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to -// an instance. +// an instance. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setDiskAutoDelete func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -59425,6 +68166,7 @@ func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59485,7 +68227,7 @@ func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Sets the auto-delete flag for a disk attached to an instance.", + // "description": "Sets the auto-delete flag for a disk attached to an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setDiskAutoDelete", // "parameterOrder": [ @@ -59562,7 +68304,8 @@ type InstancesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstancesSetIamPolicyCall { c := &InstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -59599,6 +68342,7 @@ func (c *InstancesSetIamPolicyCall) Header() http.Header { func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59664,7 +68408,7 @@ func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setIamPolicy", // "parameterOrder": [ @@ -59724,7 +68468,8 @@ type InstancesSetLabelsCall struct { } // SetLabels: Sets labels on an instance. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -59780,6 +68525,7 @@ func (c *InstancesSetLabelsCall) Header() http.Header { func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -59845,7 +68591,7 @@ func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setLabels", // "parameterOrder": [ @@ -59910,7 +68656,8 @@ type InstancesSetMachineResourcesCall struct { } // SetMachineResources: Changes the number and/or type of accelerator -// for a stopped instance to the values specified in the request. +// for a stopped instance to the values specified in the request. (== +// suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -59966,6 +68713,7 @@ func (c *InstancesSetMachineResourcesCall) Header() http.Header { func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60031,7 +68779,7 @@ func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", + // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMachineResources", // "parameterOrder": [ @@ -60096,7 +68844,8 @@ type InstancesSetMachineTypeCall struct { } // SetMachineType: Changes the machine type for a stopped instance to -// the machine type specified in the request. +// the machine type specified in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -60152,6 +68901,7 @@ func (c *InstancesSetMachineTypeCall) Header() http.Header { func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60217,7 +68967,7 @@ func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", + // "description": "Changes the machine type for a stopped instance to the machine type specified in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMachineType", // "parameterOrder": [ @@ -60282,7 +69032,7 @@ type InstancesSetMetadataCall struct { } // SetMetadata: Sets metadata for the specified instance to the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setMetadata func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -60339,6 +69089,7 @@ func (c *InstancesSetMetadataCall) Header() http.Header { func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60404,7 +69155,7 @@ func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Sets metadata for the specified instance to the data included in the request.", + // "description": "Sets metadata for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMetadata", // "parameterOrder": [ @@ -60471,7 +69222,7 @@ type InstancesSetMinCpuPlatformCall struct { // SetMinCpuPlatform: Changes the minimum CPU platform that this // instance should use. This method can only be called on a stopped // instance. For more information, read Specifying a Minimum CPU -// Platform. +// Platform. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall { c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -60527,6 +69278,7 @@ func (c *InstancesSetMinCpuPlatformCall) Header() http.Header { func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60592,7 +69344,7 @@ func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.", + // "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setMinCpuPlatform", // "parameterOrder": [ @@ -60656,7 +69408,8 @@ type InstancesSetSchedulingCall struct { header_ http.Header } -// SetScheduling: Sets an instance's scheduling options. +// SetScheduling: Sets an instance's scheduling options. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setScheduling func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -60713,6 +69466,7 @@ func (c *InstancesSetSchedulingCall) Header() http.Header { func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60778,7 +69532,7 @@ func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Sets an instance's scheduling options.", + // "description": "Sets an instance's scheduling options. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setScheduling", // "parameterOrder": [ @@ -60844,7 +69598,7 @@ type InstancesSetServiceAccountCall struct { // SetServiceAccount: Sets the service account on the instance. For more // information, read Changing the service account and access scopes for -// an instance. +// an instance. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -60900,6 +69654,7 @@ func (c *InstancesSetServiceAccountCall) Header() http.Header { func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -60965,7 +69720,7 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", + // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setServiceAccount", // "parameterOrder": [ @@ -61032,7 +69787,8 @@ type InstancesSetShieldedInstanceIntegrityPolicyCall struct { // SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance // integrity policy for an instance. You can only use this method on a // running instance. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. +// JSON merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -61088,6 +69844,7 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61153,7 +69910,7 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.setShieldedInstanceIntegrityPolicy", // "parameterOrder": [ @@ -61218,7 +69975,7 @@ type InstancesSetTagsCall struct { } // SetTags: Sets network tags for the specified instance to the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setTags func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -61275,6 +70032,7 @@ func (c *InstancesSetTagsCall) Header() http.Header { func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61340,7 +70098,7 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Sets network tags for the specified instance to the data included in the request.", + // "description": "Sets network tags for the specified instance to the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.setTags", // "parameterOrder": [ @@ -61404,7 +70162,7 @@ type InstancesSimulateMaintenanceEventCall struct { } // SimulateMaintenanceEvent: Simulates a maintenance event on the -// instance. +// instance. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -61440,6 +70198,7 @@ func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61500,7 +70259,7 @@ func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Simulates a maintenance event on the instance.", + // "description": "Simulates a maintenance event on the instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.simulateMaintenanceEvent", // "parameterOrder": [ @@ -61556,7 +70315,8 @@ type InstancesStartCall struct { } // Start: Starts an instance that was stopped using the instances().stop -// method. For more information, see Restart an instance. +// method. For more information, see Restart an instance. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/start func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -61612,6 +70372,7 @@ func (c *InstancesStartCall) Header() http.Header { func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61672,7 +70433,7 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.start", // "parameterOrder": [ @@ -61735,7 +70496,7 @@ type InstancesStartWithEncryptionKeyCall struct { // StartWithEncryptionKey: Starts an instance that was stopped using the // instances().stop method. For more information, see Restart an -// instance. +// instance. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -61791,6 +70552,7 @@ func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -61856,7 +70618,7 @@ func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.startWithEncryptionKey", // "parameterOrder": [ @@ -61924,7 +70686,8 @@ type InstancesStopCall struct { // incur VM usage charges while they are stopped. However, resources // that the VM is using, such as persistent disks and static IP // addresses, will continue to be charged until they are deleted. For -// more information, see Stopping an instance. +// more information, see Stopping an instance. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/stop func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -61980,6 +70743,7 @@ func (c *InstancesStopCall) Header() http.Header { func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62040,7 +70804,7 @@ func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", + // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.stop", // "parameterOrder": [ @@ -62102,7 +70866,7 @@ type InstancesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall { c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62139,6 +70903,7 @@ func (c *InstancesTestIamPermissionsCall) Header() http.Header { func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62204,7 +70969,7 @@ func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.testIamPermissions", // "parameterOrder": [ @@ -62267,7 +71032,8 @@ type InstancesUpdateAccessConfigCall struct { // UpdateAccessConfig: Updates the specified access config from an // instance's network interface with the data included in the request. // This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. +// format and processing rules. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) UpdateAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesUpdateAccessConfigCall { c := &InstancesUpdateAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62324,6 +71090,7 @@ func (c *InstancesUpdateAccessConfigCall) Header() http.Header { func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62389,7 +71156,7 @@ func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.instances.updateAccessConfig", // "parameterOrder": [ @@ -62447,6 +71214,195 @@ func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope } +// method id "compute.instances.updateDisplayDevice": + +type InstancesUpdateDisplayDeviceCall struct { + s *Service + project string + zone string + instance string + displaydevice *DisplayDevice + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateDisplayDevice: Updates the Display config for a VM instance. +// You can only use this method on a stopped VM instance. This method +// supports PATCH semantics and uses the JSON merge patch format and +// processing rules. (== suppress_warning http-rest-shadowed ==) +func (r *InstancesService) UpdateDisplayDevice(project string, zone string, instance string, displaydevice *DisplayDevice) *InstancesUpdateDisplayDeviceCall { + c := &InstancesUpdateDisplayDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + c.displaydevice = displaydevice + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesUpdateDisplayDeviceCall) RequestId(requestId string) *InstancesUpdateDisplayDeviceCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesUpdateDisplayDeviceCall) Fields(s ...googleapi.Field) *InstancesUpdateDisplayDeviceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesUpdateDisplayDeviceCall) Context(ctx context.Context) *InstancesUpdateDisplayDeviceCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesUpdateDisplayDeviceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.displaydevice) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateDisplayDevice") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.updateDisplayDevice" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PATCH", + // "id": "compute.instances.updateDisplayDevice", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", + // "request": { + // "$ref": "DisplayDevice" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.instances.updateNetworkInterface": type InstancesUpdateNetworkInterfaceCall struct { @@ -62461,7 +71417,8 @@ type InstancesUpdateNetworkInterfaceCall struct { } // UpdateNetworkInterface: Updates an instance's network interface. This -// method follows PATCH semantics. +// method follows PATCH semantics. (== suppress_warning +// http-rest-shadowed ==) func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall { c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62518,6 +71475,7 @@ func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header { func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62583,7 +71541,7 @@ func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Updates an instance's network interface. This method follows PATCH semantics.", + // "description": "Updates an instance's network interface. This method follows PATCH semantics. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.updateNetworkInterface", // "parameterOrder": [ @@ -62657,7 +71615,8 @@ type InstancesUpdateShieldedInstanceConfigCall struct { // UpdateShieldedInstanceConfig: Updates the Shielded Instance config // for an instance. You can only use this method on a stopped instance. // This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. +// format and processing rules. (== suppress_warning http-rest-shadowed +// ==) func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone string, instance string, shieldedinstanceconfig *ShieldedInstanceConfig) *InstancesUpdateShieldedInstanceConfigCall { c := &InstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62713,6 +71672,7 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) Header() http.Header { func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -62778,7 +71738,7 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.instances.updateShieldedInstanceConfig", // "parameterOrder": [ @@ -62841,7 +71801,7 @@ type InterconnectAttachmentsAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of interconnect -// attachments. +// attachments. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) AggregatedList(project string) *InterconnectAttachmentsAggregatedListCall { c := &InterconnectAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -62948,6 +71908,7 @@ func (c *InterconnectAttachmentsAggregatedListCall) Header() http.Header { func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63010,7 +71971,7 @@ func (c *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Retrieves an aggregated list of interconnect attachments.", + // "description": "Retrieves an aggregated list of interconnect attachments. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectAttachments.aggregatedList", // "parameterOrder": [ @@ -63094,7 +72055,8 @@ type InterconnectAttachmentsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified interconnect attachment. +// Delete: Deletes the specified interconnect attachment. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Delete(project string, region string, interconnectAttachment string) *InterconnectAttachmentsDeleteCall { c := &InterconnectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63149,6 +72111,7 @@ func (c *InterconnectAttachmentsDeleteCall) Header() http.Header { func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63209,7 +72172,7 @@ func (c *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Deletes the specified interconnect attachment.", + // "description": "Deletes the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.interconnectAttachments.delete", // "parameterOrder": [ @@ -63270,7 +72233,8 @@ type InterconnectAttachmentsGetCall struct { header_ http.Header } -// Get: Returns the specified interconnect attachment. +// Get: Returns the specified interconnect attachment. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Get(project string, region string, interconnectAttachment string) *InterconnectAttachmentsGetCall { c := &InterconnectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63316,6 +72280,7 @@ func (c *InterconnectAttachmentsGetCall) Header() http.Header { func (c *InterconnectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63379,7 +72344,7 @@ func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Inte } return ret, nil // { - // "description": "Returns the specified interconnect attachment.", + // "description": "Returns the specified interconnect attachment. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectAttachments.get", // "parameterOrder": [ @@ -63436,7 +72401,8 @@ type InterconnectAttachmentsInsertCall struct { } // Insert: Creates an InterconnectAttachment in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Insert(project string, region string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsInsertCall { c := &InterconnectAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63491,6 +72457,7 @@ func (c *InterconnectAttachmentsInsertCall) Header() http.Header { func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63555,7 +72522,7 @@ func (c *InterconnectAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.", + // "description": "Creates an InterconnectAttachment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnectAttachments.insert", // "parameterOrder": [ @@ -63611,7 +72578,7 @@ type InterconnectAttachmentsListCall struct { } // List: Retrieves the list of interconnect attachments contained within -// the specified region. +// the specified region. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) List(project string, region string) *InterconnectAttachmentsListCall { c := &InterconnectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63719,6 +72686,7 @@ func (c *InterconnectAttachmentsListCall) Header() http.Header { func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63781,7 +72749,7 @@ func (c *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*Int } return ret, nil // { - // "description": "Retrieves the list of interconnect attachments contained within the specified region.", + // "description": "Retrieves the list of interconnect attachments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectAttachments.list", // "parameterOrder": [ @@ -63876,7 +72844,8 @@ type InterconnectAttachmentsPatchCall struct { // Patch: Updates the specified interconnect attachment with the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *InterconnectAttachmentsService) Patch(project string, region string, interconnectAttachment string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsPatchCall { c := &InterconnectAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -63932,6 +72901,7 @@ func (c *InterconnectAttachmentsPatchCall) Header() http.Header { func (c *InterconnectAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -63997,7 +72967,7 @@ func (c *InterconnectAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.interconnectAttachments.patch", // "parameterOrder": [ @@ -64062,7 +73032,7 @@ type InterconnectLocationsGetCall struct { // Get: Returns the details for the specified interconnect location. // Gets a list of available interconnect locations by making a list() -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectLocationsService) Get(project string, interconnectLocation string) *InterconnectLocationsGetCall { c := &InterconnectLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -64107,6 +73077,7 @@ func (c *InterconnectLocationsGetCall) Header() http.Header { func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64169,7 +73140,7 @@ func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*Interc } return ret, nil // { - // "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.", + // "description": "Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectLocations.get", // "parameterOrder": [ @@ -64217,7 +73188,7 @@ type InterconnectLocationsListCall struct { } // List: Retrieves the list of interconnect locations available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectLocationsService) List(project string) *InterconnectLocationsListCall { c := &InterconnectLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -64324,6 +73295,7 @@ func (c *InterconnectLocationsListCall) Header() http.Header { func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64385,7 +73357,7 @@ func (c *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*Inter } return ret, nil // { - // "description": "Retrieves the list of interconnect locations available to the specified project.", + // "description": "Retrieves the list of interconnect locations available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnectLocations.list", // "parameterOrder": [ @@ -64468,7 +73440,8 @@ type InterconnectsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified interconnect. +// Delete: Deletes the specified interconnect. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectsService) Delete(project string, interconnect string) *InterconnectsDeleteCall { c := &InterconnectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -64522,6 +73495,7 @@ func (c *InterconnectsDeleteCall) Header() http.Header { func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64581,7 +73555,7 @@ func (c *InterconnectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified interconnect.", + // "description": "Deletes the specified interconnect. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.interconnects.delete", // "parameterOrder": [ @@ -64634,7 +73608,8 @@ type InterconnectsGetCall struct { } // Get: Returns the specified interconnect. Get a list of available -// interconnects by making a list() request. +// interconnects by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectsService) Get(project string, interconnect string) *InterconnectsGetCall { c := &InterconnectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -64679,6 +73654,7 @@ func (c *InterconnectsGetCall) Header() http.Header { func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64741,7 +73717,7 @@ func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, } return ret, nil // { - // "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.", + // "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnects.get", // "parameterOrder": [ @@ -64790,7 +73766,7 @@ type InterconnectsGetDiagnosticsCall struct { } // GetDiagnostics: Returns the interconnectDiagnostics for the specified -// interconnect. +// interconnect. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectsService) GetDiagnostics(project string, interconnect string) *InterconnectsGetDiagnosticsCall { c := &InterconnectsGetDiagnosticsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -64835,6 +73811,7 @@ func (c *InterconnectsGetDiagnosticsCall) Header() http.Header { func (c *InterconnectsGetDiagnosticsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -64898,7 +73875,7 @@ func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*Int } return ret, nil // { - // "description": "Returns the interconnectDiagnostics for the specified interconnect.", + // "description": "Returns the interconnectDiagnostics for the specified interconnect. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnects.getDiagnostics", // "parameterOrder": [ @@ -64946,7 +73923,8 @@ type InterconnectsInsertCall struct { } // Insert: Creates a Interconnect in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) func (r *InterconnectsService) Insert(project string, interconnect *Interconnect) *InterconnectsInsertCall { c := &InterconnectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65000,6 +73978,7 @@ func (c *InterconnectsInsertCall) Header() http.Header { func (c *InterconnectsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65063,7 +74042,7 @@ func (c *InterconnectsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a Interconnect in the specified project using the data included in the request.", + // "description": "Creates a Interconnect in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.interconnects.insert", // "parameterOrder": [ @@ -65110,7 +74089,7 @@ type InterconnectsListCall struct { } // List: Retrieves the list of interconnect available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *InterconnectsService) List(project string) *InterconnectsListCall { c := &InterconnectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65217,6 +74196,7 @@ func (c *InterconnectsListCall) Header() http.Header { func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65278,7 +74258,7 @@ func (c *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectL } return ret, nil // { - // "description": "Retrieves the list of interconnect available to the specified project.", + // "description": "Retrieves the list of interconnect available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.interconnects.list", // "parameterOrder": [ @@ -65364,7 +74344,8 @@ type InterconnectsPatchCall struct { // Patch: Updates the specified interconnect with the data included in // the request. This method supports PATCH semantics and uses the JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *InterconnectsService) Patch(project string, interconnect string, interconnect2 *Interconnect) *InterconnectsPatchCall { c := &InterconnectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65419,6 +74400,7 @@ func (c *InterconnectsPatchCall) Header() http.Header { func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65483,7 +74465,7 @@ func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.interconnects.patch", // "parameterOrder": [ @@ -65540,6 +74522,7 @@ type LicenseCodesGetCall struct { // Get: Return a specified license code. License codes are mirrored // across all projects that have permissions to read the License Code. +// (== suppress_warning http-rest-shadowed ==) func (r *LicenseCodesService) Get(project string, licenseCode string) *LicenseCodesGetCall { c := &LicenseCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65584,6 +74567,7 @@ func (c *LicenseCodesGetCall) Header() http.Header { func (c *LicenseCodesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65646,7 +74630,7 @@ func (c *LicenseCodesGetCall) Do(opts ...googleapi.CallOption) (*LicenseCode, er } return ret, nil // { - // "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code.", + // "description": "Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenseCodes.get", // "parameterOrder": [ @@ -65695,7 +74679,7 @@ type LicenseCodesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *LicenseCodesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicenseCodesTestIamPermissionsCall { c := &LicenseCodesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65731,6 +74715,7 @@ func (c *LicenseCodesTestIamPermissionsCall) Header() http.Header { func (c *LicenseCodesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65795,7 +74780,7 @@ func (c *LicenseCodesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.licenseCodes.testIamPermissions", // "parameterOrder": [ @@ -65845,7 +74830,8 @@ type LicensesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified license. +// Delete: Deletes the specified license. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) Delete(project string, license string) *LicensesDeleteCall { c := &LicensesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -65899,6 +74885,7 @@ func (c *LicensesDeleteCall) Header() http.Header { func (c *LicensesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -65958,7 +74945,7 @@ func (c *LicensesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Deletes the specified license.", + // "description": "Deletes the specified license. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.licenses.delete", // "parameterOrder": [ @@ -66010,7 +74997,8 @@ type LicensesGetCall struct { header_ http.Header } -// Get: Returns the specified License resource. +// Get: Returns the specified License resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/licenses/get func (r *LicensesService) Get(project string, license string) *LicensesGetCall { c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -66056,6 +75044,7 @@ func (c *LicensesGetCall) Header() http.Header { func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66118,7 +75107,7 @@ func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) { } return ret, nil // { - // "description": "Returns the specified License resource.", + // "description": "Returns the specified License resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenses.get", // "parameterOrder": [ @@ -66167,7 +75156,8 @@ type LicensesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) GetIamPolicy(project string, resource string) *LicensesGetIamPolicyCall { c := &LicensesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66212,6 +75202,7 @@ func (c *LicensesGetIamPolicyCall) Header() http.Header { func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66274,7 +75265,7 @@ func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenses.getIamPolicy", // "parameterOrder": [ @@ -66321,7 +75312,8 @@ type LicensesInsertCall struct { header_ http.Header } -// Insert: Create a License resource in the specified project. +// Insert: Create a License resource in the specified project. (== +// suppress_warning http-rest-shadowed ==) func (r *LicensesService) Insert(project string, license *License) *LicensesInsertCall { c := &LicensesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66375,6 +75367,7 @@ func (c *LicensesInsertCall) Header() http.Header { func (c *LicensesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66438,7 +75431,7 @@ func (c *LicensesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Create a License resource in the specified project.", + // "description": "Create a License resource in the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.licenses.insert", // "parameterOrder": [ @@ -66492,7 +75485,8 @@ type LicensesListCall struct { // projects, including licenses attached to publicly-available images, // like Debian 9. If you want to get a list of publicly-available // licenses, use this method to make a request to the respective image -// project, such as debian-cloud or windows-cloud. +// project, such as debian-cloud or windows-cloud. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) List(project string) *LicensesListCall { c := &LicensesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66599,6 +75593,7 @@ func (c *LicensesListCall) Header() http.Header { func (c *LicensesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66660,7 +75655,7 @@ func (c *LicensesListCall) Do(opts ...googleapi.CallOption) (*LicensesListRespon } return ret, nil // { - // "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.", + // "description": "Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.licenses.list", // "parameterOrder": [ @@ -66745,7 +75740,8 @@ type LicensesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *LicensesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *LicensesSetIamPolicyCall { c := &LicensesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66781,6 +75777,7 @@ func (c *LicensesSetIamPolicyCall) Header() http.Header { func (c *LicensesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66845,7 +75842,7 @@ func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.licenses.setIamPolicy", // "parameterOrder": [ @@ -66896,7 +75893,7 @@ type LicensesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *LicensesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicensesTestIamPermissionsCall { c := &LicensesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -66932,6 +75929,7 @@ func (c *LicensesTestIamPermissionsCall) Header() http.Header { func (c *LicensesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -66996,7 +75994,7 @@ func (c *LicensesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.licenses.testIamPermissions", // "parameterOrder": [ @@ -67046,7 +76044,8 @@ type MachineTypesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of machine types. +// AggregatedList: Retrieves an aggregated list of machine types. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/aggregatedList func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -67154,6 +76153,7 @@ func (c *MachineTypesAggregatedListCall) Header() http.Header { func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67215,7 +76215,7 @@ func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Mach } return ret, nil // { - // "description": "Retrieves an aggregated list of machine types.", + // "description": "Retrieves an aggregated list of machine types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineTypes.aggregatedList", // "parameterOrder": [ @@ -67301,7 +76301,8 @@ type MachineTypesGetCall struct { } // Get: Returns the specified machine type. Gets a list of available -// machine types by making a list() request. +// machine types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/get func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -67348,6 +76349,7 @@ func (c *MachineTypesGetCall) Header() http.Header { func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67411,7 +76413,7 @@ func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, er } return ret, nil // { - // "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request.", + // "description": "Returns the specified machine type. Gets a list of available machine types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineTypes.get", // "parameterOrder": [ @@ -67468,7 +76470,7 @@ type MachineTypesListCall struct { } // List: Retrieves a list of machine types available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/list func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -67577,6 +76579,7 @@ func (c *MachineTypesListCall) Header() http.Header { func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67639,7 +76642,7 @@ func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeLis } return ret, nil // { - // "description": "Retrieves a list of machine types available to the specified project.", + // "description": "Retrieves a list of machine types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.machineTypes.list", // "parameterOrder": [ @@ -67731,7 +76734,7 @@ type NetworkEndpointGroupsAggregatedListCall struct { } // AggregatedList: Retrieves the list of network endpoint groups and -// sorts them by zone. +// sorts them by zone. (== suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -67838,6 +76841,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -67900,7 +76904,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Retrieves the list of network endpoint groups and sorts them by zone.", + // "description": "Retrieves the list of network endpoint groups and sorts them by zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networkEndpointGroups.aggregatedList", // "parameterOrder": [ @@ -67986,7 +76990,8 @@ type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { } // AttachNetworkEndpoints: Attach a list of network endpoints to the -// specified network endpoint group. +// specified network endpoint group. (== suppress_warning +// http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68042,6 +77047,7 @@ func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68107,7 +77113,7 @@ func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Attach a list of network endpoints to the specified network endpoint group.", + // "description": "Attach a list of network endpoints to the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.attachNetworkEndpoints", // "parameterOrder": [ @@ -68171,7 +77177,8 @@ type NetworkEndpointGroupsDeleteCall struct { // Delete: Deletes the specified network endpoint group. The network // endpoints in the NEG and the VM instances they belong to are not // terminated when the NEG is deleted. Note that the NEG cannot be -// deleted if there are backend services referencing it. +// deleted if there are backend services referencing it. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68226,6 +77233,7 @@ func (c *NetworkEndpointGroupsDeleteCall) Header() http.Header { func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68286,7 +77294,7 @@ func (c *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.", + // "description": "Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.networkEndpointGroups.delete", // "parameterOrder": [ @@ -68346,7 +77354,8 @@ type NetworkEndpointGroupsDetachNetworkEndpointsCall struct { } // DetachNetworkEndpoints: Detach a list of network endpoints from the -// specified network endpoint group. +// specified network endpoint group. (== suppress_warning +// http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) DetachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest) *NetworkEndpointGroupsDetachNetworkEndpointsCall { c := &NetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68402,6 +77411,7 @@ func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68467,7 +77477,7 @@ func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Detach a list of network endpoints from the specified network endpoint group.", + // "description": "Detach a list of network endpoints from the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.detachNetworkEndpoints", // "parameterOrder": [ @@ -68530,7 +77540,8 @@ type NetworkEndpointGroupsGetCall struct { } // Get: Returns the specified network endpoint group. Gets a list of -// available network endpoint groups by making a list() request. +// available network endpoint groups by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) Get(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsGetCall { c := &NetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68576,6 +77587,7 @@ func (c *NetworkEndpointGroupsGetCall) Header() http.Header { func (c *NetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68639,7 +77651,7 @@ func (c *NetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*Networ } return ret, nil // { - // "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.", + // "description": "Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networkEndpointGroups.get", // "parameterOrder": [ @@ -68694,7 +77706,8 @@ type NetworkEndpointGroupsInsertCall struct { } // Insert: Creates a network endpoint group in the specified project -// using the parameters that are included in the request. +// using the parameters that are included in the request. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) Insert(project string, zone string, networkendpointgroup *NetworkEndpointGroup) *NetworkEndpointGroupsInsertCall { c := &NetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68749,6 +77762,7 @@ func (c *NetworkEndpointGroupsInsertCall) Header() http.Header { func (c *NetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -68813,7 +77827,7 @@ func (c *NetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request.", + // "description": "Creates a network endpoint group in the specified project using the parameters that are included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.insert", // "parameterOrder": [ @@ -68868,7 +77882,8 @@ type NetworkEndpointGroupsListCall struct { } // List: Retrieves the list of network endpoint groups that are located -// in the specified project and zone. +// in the specified project and zone. (== suppress_warning +// http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) List(project string, zone string) *NetworkEndpointGroupsListCall { c := &NetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -68976,6 +77991,7 @@ func (c *NetworkEndpointGroupsListCall) Header() http.Header { func (c *NetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69038,7 +78054,7 @@ func (c *NetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*Netwo } return ret, nil // { - // "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone.", + // "description": "Retrieves the list of network endpoint groups that are located in the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networkEndpointGroups.list", // "parameterOrder": [ @@ -69131,7 +78147,7 @@ type NetworkEndpointGroupsListNetworkEndpointsCall struct { } // ListNetworkEndpoints: Lists the network endpoints in the specified -// network endpoint group. +// network endpoint group. (== suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) ListNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest) *NetworkEndpointGroupsListNetworkEndpointsCall { c := &NetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -69231,6 +78247,7 @@ func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { func (c *NetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69298,7 +78315,7 @@ func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists the network endpoints in the specified network endpoint group.", + // "description": "Lists the network endpoints in the specified network endpoint group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.listNetworkEndpoints", // "parameterOrder": [ @@ -69401,7 +78418,7 @@ type NetworkEndpointGroupsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *NetworkEndpointGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkEndpointGroupsTestIamPermissionsCall { c := &NetworkEndpointGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -69438,6 +78455,7 @@ func (c *NetworkEndpointGroupsTestIamPermissionsCall) Header() http.Header { func (c *NetworkEndpointGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69503,7 +78521,7 @@ func (c *NetworkEndpointGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networkEndpointGroups.testIamPermissions", // "parameterOrder": [ @@ -69562,7 +78580,8 @@ type NetworksAddPeeringCall struct { header_ http.Header } -// AddPeering: Adds a peering to the specified network. +// AddPeering: Adds a peering to the specified network. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -69617,6 +78636,7 @@ func (c *NetworksAddPeeringCall) Header() http.Header { func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69681,7 +78701,7 @@ func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Adds a peering to the specified network.", + // "description": "Adds a peering to the specified network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.addPeering", // "parameterOrder": [ @@ -69735,7 +78755,8 @@ type NetworksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified network. +// Delete: Deletes the specified network. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/delete func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -69790,6 +78811,7 @@ func (c *NetworksDeleteCall) Header() http.Header { func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -69849,7 +78871,7 @@ func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Deletes the specified network.", + // "description": "Deletes the specified network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.networks.delete", // "parameterOrder": [ @@ -69902,7 +78924,8 @@ type NetworksGetCall struct { } // Get: Returns the specified network. Gets a list of available networks -// by making a list() request. +// by making a list() request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/get func (r *NetworksService) Get(project string, network string) *NetworksGetCall { c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -69948,6 +78971,7 @@ func (c *NetworksGetCall) Header() http.Header { func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70010,7 +79034,7 @@ func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { } return ret, nil // { - // "description": "Returns the specified network. Gets a list of available networks by making a list() request.", + // "description": "Returns the specified network. Gets a list of available networks by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networks.get", // "parameterOrder": [ @@ -70058,7 +79082,7 @@ type NetworksInsertCall struct { } // Insert: Creates a network in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/insert func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -70113,6 +79137,7 @@ func (c *NetworksInsertCall) Header() http.Header { func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70176,7 +79201,7 @@ func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Creates a network in the specified project using the data included in the request.", + // "description": "Creates a network in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.insert", // "parameterOrder": [ @@ -70223,7 +79248,7 @@ type NetworksListCall struct { } // List: Retrieves the list of networks available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/list func (r *NetworksService) List(project string) *NetworksListCall { c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -70331,6 +79356,7 @@ func (c *NetworksListCall) Header() http.Header { func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70392,7 +79418,7 @@ func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error } return ret, nil // { - // "description": "Retrieves the list of networks available to the specified project.", + // "description": "Retrieves the list of networks available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.networks.list", // "parameterOrder": [ @@ -70478,7 +79504,8 @@ type NetworksPatchCall struct { // Patch: Patches the specified network with the data included in the // request. Only the following fields can be modified: -// routingConfig.routingMode. +// routingConfig.routingMode. (== suppress_warning http-rest-shadowed +// ==) func (r *NetworksService) Patch(project string, network string, network2 *Network) *NetworksPatchCall { c := &NetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -70533,6 +79560,7 @@ func (c *NetworksPatchCall) Header() http.Header { func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70597,7 +79625,7 @@ func (c *NetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.", + // "description": "Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.networks.patch", // "parameterOrder": [ @@ -70652,7 +79680,8 @@ type NetworksRemovePeeringCall struct { header_ http.Header } -// RemovePeering: Removes a peering from the specified network. +// RemovePeering: Removes a peering from the specified network. (== +// suppress_warning http-rest-shadowed ==) func (r *NetworksService) RemovePeering(project string, network string, networksremovepeeringrequest *NetworksRemovePeeringRequest) *NetworksRemovePeeringCall { c := &NetworksRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -70707,6 +79736,7 @@ func (c *NetworksRemovePeeringCall) Header() http.Header { func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70771,7 +79801,7 @@ func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Removes a peering from the specified network.", + // "description": "Removes a peering from the specified network. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.removePeering", // "parameterOrder": [ @@ -70826,7 +79856,7 @@ type NetworksSwitchToCustomModeCall struct { } // SwitchToCustomMode: Switches the network mode from auto subnet mode -// to custom subnet mode. +// to custom subnet mode. (== suppress_warning http-rest-shadowed ==) func (r *NetworksService) SwitchToCustomMode(project string, network string) *NetworksSwitchToCustomModeCall { c := &NetworksSwitchToCustomModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -70880,6 +79910,7 @@ func (c *NetworksSwitchToCustomModeCall) Header() http.Header { func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -70939,7 +79970,7 @@ func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Switches the network mode from auto subnet mode to custom subnet mode.", + // "description": "Switches the network mode from auto subnet mode to custom subnet mode. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.networks.switchToCustomMode", // "parameterOrder": [ @@ -70979,6 +80010,185 @@ func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Oper } +// method id "compute.networks.updatePeering": + +type NetworksUpdatePeeringCall struct { + s *Service + project string + network string + networksupdatepeeringrequest *NetworksUpdatePeeringRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdatePeering: Updates the specified network peering with the data +// included in the request Only the following fields can be modified: +// NetworkPeering.export_custom_routes, and +// NetworkPeering.import_custom_routes (== suppress_warning +// http-rest-shadowed ==) +func (r *NetworksService) UpdatePeering(project string, network string, networksupdatepeeringrequest *NetworksUpdatePeeringRequest) *NetworksUpdatePeeringCall { + c := &NetworksUpdatePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.network = network + c.networksupdatepeeringrequest = networksupdatepeeringrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *NetworksUpdatePeeringCall) RequestId(requestId string) *NetworksUpdatePeeringCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworksUpdatePeeringCall) Fields(s ...googleapi.Field) *NetworksUpdatePeeringCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NetworksUpdatePeeringCall) Context(ctx context.Context) *NetworksUpdatePeeringCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NetworksUpdatePeeringCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworksUpdatePeeringCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksupdatepeeringrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/updatePeering") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "network": c.network, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networks.updatePeering" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworksUpdatePeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PATCH", + // "id": "compute.networks.updatePeering", + // "parameterOrder": [ + // "project", + // "network" + // ], + // "parameters": { + // "network": { + // "description": "Name of the network resource which the updated peering is belonging to.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/global/networks/{network}/updatePeering", + // "request": { + // "$ref": "NetworksUpdatePeeringRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.nodeGroups.addNodes": type NodeGroupsAddNodesCall struct { @@ -70992,7 +80202,8 @@ type NodeGroupsAddNodesCall struct { header_ http.Header } -// AddNodes: Adds specified number of nodes to the node group. +// AddNodes: Adds specified number of nodes to the node group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) AddNodes(project string, zone string, nodeGroup string, nodegroupsaddnodesrequest *NodeGroupsAddNodesRequest) *NodeGroupsAddNodesCall { c := &NodeGroupsAddNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71048,6 +80259,7 @@ func (c *NodeGroupsAddNodesCall) Header() http.Header { func (c *NodeGroupsAddNodesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71113,7 +80325,7 @@ func (c *NodeGroupsAddNodesCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Adds specified number of nodes to the node group.", + // "description": "Adds specified number of nodes to the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.addNodes", // "parameterOrder": [ @@ -71176,7 +80388,8 @@ type NodeGroupsAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of node groups. Note: -// use nodeGroups.listNodes for more details about each group. +// use nodeGroups.listNodes for more details about each group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) AggregatedList(project string) *NodeGroupsAggregatedListCall { c := &NodeGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71283,6 +80496,7 @@ func (c *NodeGroupsAggregatedListCall) Header() http.Header { func (c *NodeGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71344,7 +80558,7 @@ func (c *NodeGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeGr } return ret, nil // { - // "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.", + // "description": "Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.aggregatedList", // "parameterOrder": [ @@ -71428,7 +80642,8 @@ type NodeGroupsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified NodeGroup resource. +// Delete: Deletes the specified NodeGroup resource. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) Delete(project string, zone string, nodeGroup string) *NodeGroupsDeleteCall { c := &NodeGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71483,6 +80698,7 @@ func (c *NodeGroupsDeleteCall) Header() http.Header { func (c *NodeGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71543,7 +80759,7 @@ func (c *NodeGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Deletes the specified NodeGroup resource.", + // "description": "Deletes the specified NodeGroup resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.nodeGroups.delete", // "parameterOrder": [ @@ -71604,7 +80820,8 @@ type NodeGroupsDeleteNodesCall struct { header_ http.Header } -// DeleteNodes: Deletes specified nodes from the node group. +// DeleteNodes: Deletes specified nodes from the node group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) DeleteNodes(project string, zone string, nodeGroup string, nodegroupsdeletenodesrequest *NodeGroupsDeleteNodesRequest) *NodeGroupsDeleteNodesCall { c := &NodeGroupsDeleteNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71660,6 +80877,7 @@ func (c *NodeGroupsDeleteNodesCall) Header() http.Header { func (c *NodeGroupsDeleteNodesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71725,7 +80943,7 @@ func (c *NodeGroupsDeleteNodesCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes specified nodes from the node group.", + // "description": "Deletes specified nodes from the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.deleteNodes", // "parameterOrder": [ @@ -71735,7 +80953,7 @@ func (c *NodeGroupsDeleteNodesCall) Do(opts ...googleapi.CallOption) (*Operation // ], // "parameters": { // "nodeGroup": { - // "description": "Name of the NodeGroup resource to delete.", + // "description": "Name of the NodeGroup resource whose nodes will be deleted.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -71791,7 +81009,8 @@ type NodeGroupsGetCall struct { // Get: Returns the specified NodeGroup. Get a list of available // NodeGroups by making a list() request. Note: the "nodes" field should -// not be used. Use nodeGroups.listNodes instead. +// not be used. Use nodeGroups.listNodes instead. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) Get(project string, zone string, nodeGroup string) *NodeGroupsGetCall { c := &NodeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -71837,6 +81056,7 @@ func (c *NodeGroupsGetCall) Header() http.Header { func (c *NodeGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -71900,7 +81120,7 @@ func (c *NodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, error) } return ret, nil // { - // "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead.", + // "description": "Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the \"nodes\" field should not be used. Use nodeGroups.listNodes instead. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.get", // "parameterOrder": [ @@ -71958,7 +81178,8 @@ type NodeGroupsGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) GetIamPolicy(project string, zone string, resource string) *NodeGroupsGetIamPolicyCall { c := &NodeGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72004,6 +81225,7 @@ func (c *NodeGroupsGetIamPolicyCall) Header() http.Header { func (c *NodeGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72067,7 +81289,7 @@ func (c *NodeGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.getIamPolicy", // "parameterOrder": [ @@ -72124,7 +81346,8 @@ type NodeGroupsInsertCall struct { } // Insert: Creates a NodeGroup resource in the specified project using -// the data included in the request. +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) Insert(project string, zone string, initialNodeCount int64, nodegroup *NodeGroup) *NodeGroupsInsertCall { c := &NodeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72180,6 +81403,7 @@ func (c *NodeGroupsInsertCall) Header() http.Header { func (c *NodeGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72244,7 +81468,7 @@ func (c *NodeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Creates a NodeGroup resource in the specified project using the data included in the request.", + // "description": "Creates a NodeGroup resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.insert", // "parameterOrder": [ @@ -72309,7 +81533,7 @@ type NodeGroupsListCall struct { // List: Retrieves a list of node groups available to the specified // project. Note: use nodeGroups.listNodes for more details about each -// group. +// group. (== suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) List(project string, zone string) *NodeGroupsListCall { c := &NodeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72417,6 +81641,7 @@ func (c *NodeGroupsListCall) Header() http.Header { func (c *NodeGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72479,7 +81704,7 @@ func (c *NodeGroupsListCall) Do(opts ...googleapi.CallOption) (*NodeGroupList, e } return ret, nil // { - // "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.", + // "description": "Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeGroups.list", // "parameterOrder": [ @@ -72571,7 +81796,8 @@ type NodeGroupsListNodesCall struct { header_ http.Header } -// ListNodes: Lists nodes in the node group. +// ListNodes: Lists nodes in the node group. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) ListNodes(project string, zone string, nodeGroup string) *NodeGroupsListNodesCall { c := &NodeGroupsListNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72670,6 +81896,7 @@ func (c *NodeGroupsListNodesCall) Header() http.Header { func (c *NodeGroupsListNodesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72730,7 +81957,7 @@ func (c *NodeGroupsListNodesCall) Do(opts ...googleapi.CallOption) (*NodeGroupsL } return ret, nil // { - // "description": "Lists nodes in the node group.", + // "description": "Lists nodes in the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.listNodes", // "parameterOrder": [ @@ -72832,7 +82059,8 @@ type NodeGroupsSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeGroupsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *NodeGroupsSetIamPolicyCall { c := &NodeGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -72869,6 +82097,7 @@ func (c *NodeGroupsSetIamPolicyCall) Header() http.Header { func (c *NodeGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -72934,7 +82163,7 @@ func (c *NodeGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.setIamPolicy", // "parameterOrder": [ @@ -72993,7 +82222,8 @@ type NodeGroupsSetNodeTemplateCall struct { header_ http.Header } -// SetNodeTemplate: Updates the node template of the node group. +// SetNodeTemplate: Updates the node template of the node group. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) SetNodeTemplate(project string, zone string, nodeGroup string, nodegroupssetnodetemplaterequest *NodeGroupsSetNodeTemplateRequest) *NodeGroupsSetNodeTemplateCall { c := &NodeGroupsSetNodeTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73049,6 +82279,7 @@ func (c *NodeGroupsSetNodeTemplateCall) Header() http.Header { func (c *NodeGroupsSetNodeTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73114,7 +82345,7 @@ func (c *NodeGroupsSetNodeTemplateCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Updates the node template of the node group.", + // "description": "Updates the node template of the node group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.setNodeTemplate", // "parameterOrder": [ @@ -73179,7 +82410,7 @@ type NodeGroupsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *NodeGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeGroupsTestIamPermissionsCall { c := &NodeGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73216,6 +82447,7 @@ func (c *NodeGroupsTestIamPermissionsCall) Header() http.Header { func (c *NodeGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73281,7 +82513,7 @@ func (c *NodeGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Te } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeGroups.testIamPermissions", // "parameterOrder": [ @@ -73339,7 +82571,8 @@ type NodeTemplatesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of node templates. +// AggregatedList: Retrieves an aggregated list of node templates. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) AggregatedList(project string) *NodeTemplatesAggregatedListCall { c := &NodeTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73446,6 +82679,7 @@ func (c *NodeTemplatesAggregatedListCall) Header() http.Header { func (c *NodeTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73507,7 +82741,7 @@ func (c *NodeTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Nod } return ret, nil // { - // "description": "Retrieves an aggregated list of node templates.", + // "description": "Retrieves an aggregated list of node templates. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.aggregatedList", // "parameterOrder": [ @@ -73591,7 +82825,8 @@ type NodeTemplatesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified NodeTemplate resource. +// Delete: Deletes the specified NodeTemplate resource. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) Delete(project string, region string, nodeTemplate string) *NodeTemplatesDeleteCall { c := &NodeTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73646,6 +82881,7 @@ func (c *NodeTemplatesDeleteCall) Header() http.Header { func (c *NodeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73706,7 +82942,7 @@ func (c *NodeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Deletes the specified NodeTemplate resource.", + // "description": "Deletes the specified NodeTemplate resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.nodeTemplates.delete", // "parameterOrder": [ @@ -73768,7 +83004,8 @@ type NodeTemplatesGetCall struct { } // Get: Returns the specified node template. Gets a list of available -// node templates by making a list() request. +// node templates by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) Get(project string, region string, nodeTemplate string) *NodeTemplatesGetCall { c := &NodeTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73814,6 +83051,7 @@ func (c *NodeTemplatesGetCall) Header() http.Header { func (c *NodeTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -73877,7 +83115,7 @@ func (c *NodeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*NodeTemplate, } return ret, nil // { - // "description": "Returns the specified node template. Gets a list of available node templates by making a list() request.", + // "description": "Returns the specified node template. Gets a list of available node templates by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.get", // "parameterOrder": [ @@ -73935,7 +83173,8 @@ type NodeTemplatesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) GetIamPolicy(project string, region string, resource string) *NodeTemplatesGetIamPolicyCall { c := &NodeTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -73981,6 +83220,7 @@ func (c *NodeTemplatesGetIamPolicyCall) Header() http.Header { func (c *NodeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74044,7 +83284,7 @@ func (c *NodeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.getIamPolicy", // "parameterOrder": [ @@ -74101,7 +83341,8 @@ type NodeTemplatesInsertCall struct { } // Insert: Creates a NodeTemplate resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) Insert(project string, region string, nodetemplate *NodeTemplate) *NodeTemplatesInsertCall { c := &NodeTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74156,6 +83397,7 @@ func (c *NodeTemplatesInsertCall) Header() http.Header { func (c *NodeTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74220,7 +83462,7 @@ func (c *NodeTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates a NodeTemplate resource in the specified project using the data included in the request.", + // "description": "Creates a NodeTemplate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeTemplates.insert", // "parameterOrder": [ @@ -74276,7 +83518,7 @@ type NodeTemplatesListCall struct { } // List: Retrieves a list of node templates available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) List(project string, region string) *NodeTemplatesListCall { c := &NodeTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74384,6 +83626,7 @@ func (c *NodeTemplatesListCall) Header() http.Header { func (c *NodeTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74446,7 +83689,7 @@ func (c *NodeTemplatesListCall) Do(opts ...googleapi.CallOption) (*NodeTemplateL } return ret, nil // { - // "description": "Retrieves a list of node templates available to the specified project.", + // "description": "Retrieves a list of node templates available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTemplates.list", // "parameterOrder": [ @@ -74540,7 +83783,8 @@ type NodeTemplatesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTemplatesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NodeTemplatesSetIamPolicyCall { c := &NodeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74577,6 +83821,7 @@ func (c *NodeTemplatesSetIamPolicyCall) Header() http.Header { func (c *NodeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74642,7 +83887,7 @@ func (c *NodeTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeTemplates.setIamPolicy", // "parameterOrder": [ @@ -74702,7 +83947,7 @@ type NodeTemplatesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *NodeTemplatesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeTemplatesTestIamPermissionsCall { c := &NodeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74739,6 +83984,7 @@ func (c *NodeTemplatesTestIamPermissionsCall) Header() http.Header { func (c *NodeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -74804,7 +84050,7 @@ func (c *NodeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.nodeTemplates.testIamPermissions", // "parameterOrder": [ @@ -74862,7 +84108,8 @@ type NodeTypesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of node types. +// AggregatedList: Retrieves an aggregated list of node types. (== +// suppress_warning http-rest-shadowed ==) func (r *NodeTypesService) AggregatedList(project string) *NodeTypesAggregatedListCall { c := &NodeTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -74969,6 +84216,7 @@ func (c *NodeTypesAggregatedListCall) Header() http.Header { func (c *NodeTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75030,7 +84278,7 @@ func (c *NodeTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTyp } return ret, nil // { - // "description": "Retrieves an aggregated list of node types.", + // "description": "Retrieves an aggregated list of node types. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTypes.aggregatedList", // "parameterOrder": [ @@ -75116,7 +84364,8 @@ type NodeTypesGetCall struct { } // Get: Returns the specified node type. Gets a list of available node -// types by making a list() request. +// types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *NodeTypesService) Get(project string, zone string, nodeType string) *NodeTypesGetCall { c := &NodeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75162,6 +84411,7 @@ func (c *NodeTypesGetCall) Header() http.Header { func (c *NodeTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75225,7 +84475,7 @@ func (c *NodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, error) { } return ret, nil // { - // "description": "Returns the specified node type. Gets a list of available node types by making a list() request.", + // "description": "Returns the specified node type. Gets a list of available node types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTypes.get", // "parameterOrder": [ @@ -75282,7 +84532,7 @@ type NodeTypesListCall struct { } // List: Retrieves a list of node types available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *NodeTypesService) List(project string, zone string) *NodeTypesListCall { c := &NodeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75390,6 +84640,7 @@ func (c *NodeTypesListCall) Header() http.Header { func (c *NodeTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75452,7 +84703,7 @@ func (c *NodeTypesListCall) Do(opts ...googleapi.CallOption) (*NodeTypeList, err } return ret, nil // { - // "description": "Retrieves a list of node types available to the specified project.", + // "description": "Retrieves a list of node types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.nodeTypes.list", // "parameterOrder": [ @@ -75543,6 +84794,7 @@ type ProjectsDisableXpnHostCall struct { } // DisableXpnHost: Disable this project as a shared VPC host project. +// (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall { c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75595,6 +84847,7 @@ func (c *ProjectsDisableXpnHostCall) Header() http.Header { func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75653,7 +84906,7 @@ func (c *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Disable this project as a shared VPC host project.", + // "description": "Disable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.disableXpnHost", // "parameterOrder": [ @@ -75696,8 +84949,9 @@ type ProjectsDisableXpnResourceCall struct { header_ http.Header } -// DisableXpnResource: Disable a serivce resource (a.k.a service -// project) associated with this host project. +// DisableXpnResource: Disable a service resource (also known as service +// project) associated with this host project. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall { c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75751,6 +85005,7 @@ func (c *ProjectsDisableXpnResourceCall) Header() http.Header { func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75814,7 +85069,7 @@ func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", + // "description": "Disable a service resource (also known as service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.disableXpnResource", // "parameterOrder": [ @@ -75859,7 +85114,8 @@ type ProjectsEnableXpnHostCall struct { header_ http.Header } -// EnableXpnHost: Enable this project as a shared VPC host project. +// EnableXpnHost: Enable this project as a shared VPC host project. (== +// suppress_warning http-rest-shadowed ==) func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall { c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -75912,6 +85168,7 @@ func (c *ProjectsEnableXpnHostCall) Header() http.Header { func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -75970,7 +85227,7 @@ func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Enable this project as a shared VPC host project.", + // "description": "Enable this project as a shared VPC host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.enableXpnHost", // "parameterOrder": [ @@ -76015,7 +85272,8 @@ type ProjectsEnableXpnResourceCall struct { // EnableXpnResource: Enable service resource (a.k.a service project) // for a host project, so that subnets in the host project can be used -// by instances in the service project. +// by instances in the service project. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall { c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76069,6 +85327,7 @@ func (c *ProjectsEnableXpnResourceCall) Header() http.Header { func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76132,7 +85391,7 @@ func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", + // "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.enableXpnResource", // "parameterOrder": [ @@ -76178,7 +85437,8 @@ type ProjectsGetCall struct { header_ http.Header } -// Get: Returns the specified Project resource. +// Get: Returns the specified Project resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/projects/get func (r *ProjectsService) Get(project string) *ProjectsGetCall { c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -76223,6 +85483,7 @@ func (c *ProjectsGetCall) Header() http.Header { func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76284,7 +85545,7 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { } return ret, nil // { - // "description": "Returns the specified Project resource.", + // "description": "Returns the specified Project resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.projects.get", // "parameterOrder": [ @@ -76324,7 +85585,8 @@ type ProjectsGetXpnHostCall struct { } // GetXpnHost: Gets the shared VPC host project that this project links -// to. May be empty if no link exists. +// to. May be empty if no link exists. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall { c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76368,6 +85630,7 @@ func (c *ProjectsGetXpnHostCall) Header() http.Header { func (c *ProjectsGetXpnHostCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76429,7 +85692,7 @@ func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, err } return ret, nil // { - // "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists.", + // "description": "Gets the shared VPC host project that this project links to. May be empty if no link exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.projects.getXpnHost", // "parameterOrder": [ @@ -76468,7 +85731,8 @@ type ProjectsGetXpnResourcesCall struct { } // GetXpnResources: Gets service resources (a.k.a service project) -// associated with this host project. +// associated with this host project. (== suppress_warning +// http-rest-shadowed ==) func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall { c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76575,6 +85839,7 @@ func (c *ProjectsGetXpnResourcesCall) Header() http.Header { func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76636,7 +85901,7 @@ func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*Project } return ret, nil // { - // "description": "Gets service resources (a.k.a service project) associated with this host project.", + // "description": "Gets service resources (a.k.a service project) associated with this host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.projects.getXpnResources", // "parameterOrder": [ @@ -76719,7 +85984,7 @@ type ProjectsListXpnHostsCall struct { } // ListXpnHosts: Lists all shared VPC host projects visible to the user -// in an organization. +// in an organization. (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall { c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -76817,6 +86082,7 @@ func (c *ProjectsListXpnHostsCall) Header() http.Header { func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -76880,7 +86146,7 @@ func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostLis } return ret, nil // { - // "description": "Lists all shared VPC host projects visible to the user in an organization.", + // "description": "Lists all shared VPC host projects visible to the user in an organization. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.listXpnHosts", // "parameterOrder": [ @@ -76965,7 +86231,8 @@ type ProjectsMoveDiskCall struct { header_ http.Header } -// MoveDisk: Moves a persistent disk from one zone to another. +// MoveDisk: Moves a persistent disk from one zone to another. (== +// suppress_warning http-rest-shadowed ==) func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall { c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -77019,6 +86286,7 @@ func (c *ProjectsMoveDiskCall) Header() http.Header { func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77082,7 +86350,7 @@ func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Moves a persistent disk from one zone to another.", + // "description": "Moves a persistent disk from one zone to another. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.moveDisk", // "parameterOrder": [ @@ -77129,7 +86397,7 @@ type ProjectsMoveInstanceCall struct { } // MoveInstance: Moves an instance and its attached persistent disks -// from one zone to another. +// from one zone to another. (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall { c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -77183,6 +86451,7 @@ func (c *ProjectsMoveInstanceCall) Header() http.Header { func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77246,7 +86515,7 @@ func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Moves an instance and its attached persistent disks from one zone to another.", + // "description": "Moves an instance and its attached persistent disks from one zone to another. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.moveInstance", // "parameterOrder": [ @@ -77294,6 +86563,7 @@ type ProjectsSetCommonInstanceMetadataCall struct { // SetCommonInstanceMetadata: Sets metadata common to all instances // within the specified project using the data included in the request. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setCommonInstanceMetadata func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall { c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -77348,6 +86618,7 @@ func (c *ProjectsSetCommonInstanceMetadataCall) Header() http.Header { func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77411,7 +86682,7 @@ func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets metadata common to all instances within the specified project using the data included in the request.", + // "description": "Sets metadata common to all instances within the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.setCommonInstanceMetadata", // "parameterOrder": [ @@ -77460,7 +86731,7 @@ type ProjectsSetDefaultNetworkTierCall struct { // SetDefaultNetworkTier: Sets the default network tier of the project. // The default network tier is used when an // address/forwardingRule/instance is created without specifying the -// network tier field. +// network tier field. (== suppress_warning http-rest-shadowed ==) func (r *ProjectsService) SetDefaultNetworkTier(project string, projectssetdefaultnetworktierrequest *ProjectsSetDefaultNetworkTierRequest) *ProjectsSetDefaultNetworkTierCall { c := &ProjectsSetDefaultNetworkTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -77514,6 +86785,7 @@ func (c *ProjectsSetDefaultNetworkTierCall) Header() http.Header { func (c *ProjectsSetDefaultNetworkTierCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77577,7 +86849,7 @@ func (c *ProjectsSetDefaultNetworkTierCall) Do(opts ...googleapi.CallOption) (*O } return ret, nil // { - // "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.", + // "description": "Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.setDefaultNetworkTier", // "parameterOrder": [ @@ -77626,7 +86898,7 @@ type ProjectsSetUsageExportBucketCall struct { // SetUsageExportBucket: Enables the usage export feature and sets the // usage export bucket where reports are stored. If you provide an empty // request body using this method, the usage export feature will be -// disabled. +// disabled. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setUsageExportBucket func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall { c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -77681,6 +86953,7 @@ func (c *ProjectsSetUsageExportBucketCall) Header() http.Header { func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77744,7 +87017,7 @@ func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", + // "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.projects.setUsageExportBucket", // "parameterOrder": [ @@ -77794,7 +87067,8 @@ type RegionAutoscalersDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified autoscaler. +// Delete: Deletes the specified autoscaler. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -77849,6 +87123,7 @@ func (c *RegionAutoscalersDeleteCall) Header() http.Header { func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -77909,7 +87184,7 @@ func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified autoscaler.", + // "description": "Deletes the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionAutoscalers.delete", // "parameterOrder": [ @@ -77970,7 +87245,8 @@ type RegionAutoscalersGetCall struct { header_ http.Header } -// Get: Returns the specified autoscaler. +// Get: Returns the specified autoscaler. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78016,6 +87292,7 @@ func (c *RegionAutoscalersGetCall) Header() http.Header { func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78079,7 +87356,7 @@ func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler } return ret, nil // { - // "description": "Returns the specified autoscaler.", + // "description": "Returns the specified autoscaler. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionAutoscalers.get", // "parameterOrder": [ @@ -78136,7 +87413,7 @@ type RegionAutoscalersInsertCall struct { } // Insert: Creates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78191,6 +87468,7 @@ func (c *RegionAutoscalersInsertCall) Header() http.Header { func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78255,7 +87533,7 @@ func (c *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates an autoscaler in the specified project using the data included in the request.", + // "description": "Creates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionAutoscalers.insert", // "parameterOrder": [ @@ -78311,7 +87589,7 @@ type RegionAutoscalersListCall struct { } // List: Retrieves a list of autoscalers contained within the specified -// region. +// region. (== suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78419,6 +87697,7 @@ func (c *RegionAutoscalersListCall) Header() http.Header { func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78481,7 +87760,7 @@ func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAut } return ret, nil // { - // "description": "Retrieves a list of autoscalers contained within the specified region.", + // "description": "Retrieves a list of autoscalers contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionAutoscalers.list", // "parameterOrder": [ @@ -78575,7 +87854,8 @@ type RegionAutoscalersPatchCall struct { // Patch: Updates an autoscaler in the specified project using the data // included in the request. This method supports PATCH semantics and -// uses the JSON merge patch format and processing rules. +// uses the JSON merge patch format and processing rules. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78637,6 +87917,7 @@ func (c *RegionAutoscalersPatchCall) Header() http.Header { func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78701,7 +87982,7 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionAutoscalers.patch", // "parameterOrder": [ @@ -78763,7 +88044,7 @@ type RegionAutoscalersUpdateCall struct { } // Update: Updates an autoscaler in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -78825,6 +88106,7 @@ func (c *RegionAutoscalersUpdateCall) Header() http.Header { func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -78889,7 +88171,7 @@ func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionAutoscalers.update", // "parameterOrder": [ @@ -78950,7 +88232,8 @@ type RegionBackendServicesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified regional BackendService resource. +// Delete: Deletes the specified regional BackendService resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79005,6 +88288,7 @@ func (c *RegionBackendServicesDeleteCall) Header() http.Header { func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79065,7 +88349,7 @@ func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Deletes the specified regional BackendService resource.", + // "description": "Deletes the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionBackendServices.delete", // "parameterOrder": [ @@ -79126,7 +88410,8 @@ type RegionBackendServicesGetCall struct { header_ http.Header } -// Get: Returns the specified regional BackendService resource. +// Get: Returns the specified regional BackendService resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79172,6 +88457,7 @@ func (c *RegionBackendServicesGetCall) Header() http.Header { func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79235,7 +88521,7 @@ func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*Backen } return ret, nil // { - // "description": "Returns the specified regional BackendService resource.", + // "description": "Returns the specified regional BackendService resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionBackendServices.get", // "parameterOrder": [ @@ -79293,7 +88579,7 @@ type RegionBackendServicesGetHealthCall struct { } // GetHealth: Gets the most recent health check results for this -// regional BackendService. +// regional BackendService. (== suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79330,6 +88616,7 @@ func (c *RegionBackendServicesGetHealthCall) Header() http.Header { func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79395,7 +88682,7 @@ func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the most recent health check results for this regional BackendService.", + // "description": "Gets the most recent health check results for this regional BackendService. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionBackendServices.getHealth", // "parameterOrder": [ @@ -79457,7 +88744,7 @@ type RegionBackendServicesInsertCall struct { // project using the data included in the request. There are several // restrictions and guidelines to keep in mind when creating a regional // backend service. Read Restrictions and Guidelines for more -// information. +// information. (== suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79512,6 +88799,7 @@ func (c *RegionBackendServicesInsertCall) Header() http.Header { func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79576,7 +88864,7 @@ func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information.", + // "description": "Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionBackendServices.insert", // "parameterOrder": [ @@ -79632,7 +88920,8 @@ type RegionBackendServicesListCall struct { } // List: Retrieves the list of regional BackendService resources -// available to the specified project in the given region. +// available to the specified project in the given region. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79740,6 +89029,7 @@ func (c *RegionBackendServicesListCall) Header() http.Header { func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -79802,7 +89092,7 @@ func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*Backe } return ret, nil // { - // "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.", + // "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionBackendServices.list", // "parameterOrder": [ @@ -79900,7 +89190,7 @@ type RegionBackendServicesPatchCall struct { // guidelines to keep in mind when updating a backend service. Read // Restrictions and Guidelines for more information. This method // supports PATCH semantics and uses the JSON merge patch format and -// processing rules. +// processing rules. (== suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -79956,6 +89246,7 @@ func (c *RegionBackendServicesPatchCall) Header() http.Header { func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80021,7 +89312,7 @@ func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionBackendServices.patch", // "parameterOrder": [ @@ -80088,7 +89379,8 @@ type RegionBackendServicesUpdateCall struct { // Update: Updates the specified regional BackendService resource with // the data included in the request. There are several restrictions and // guidelines to keep in mind when updating a backend service. Read -// Restrictions and Guidelines for more information. +// Restrictions and Guidelines for more information. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80144,6 +89436,7 @@ func (c *RegionBackendServicesUpdateCall) Header() http.Header { func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80209,7 +89502,7 @@ func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", + // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.regionBackendServices.update", // "parameterOrder": [ @@ -80271,7 +89564,8 @@ type RegionCommitmentsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of commitments. +// AggregatedList: Retrieves an aggregated list of commitments. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80378,6 +89672,7 @@ func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80439,7 +89734,7 @@ func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves an aggregated list of commitments.", + // "description": "Retrieves an aggregated list of commitments. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionCommitments.aggregatedList", // "parameterOrder": [ @@ -80525,7 +89820,8 @@ type RegionCommitmentsGetCall struct { } // Get: Returns the specified commitment resource. Gets a list of -// available commitments by making a list() request. +// available commitments by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80571,6 +89867,7 @@ func (c *RegionCommitmentsGetCall) Header() http.Header { func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80634,7 +89931,7 @@ func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment } return ret, nil // { - // "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request.", + // "description": "Returns the specified commitment resource. Gets a list of available commitments by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionCommitments.get", // "parameterOrder": [ @@ -80691,7 +89988,7 @@ type RegionCommitmentsInsertCall struct { } // Insert: Creates a commitment in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80746,6 +90043,7 @@ func (c *RegionCommitmentsInsertCall) Header() http.Header { func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -80810,7 +90108,7 @@ func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a commitment in the specified project using the data included in the request.", + // "description": "Creates a commitment in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionCommitments.insert", // "parameterOrder": [ @@ -80866,7 +90164,7 @@ type RegionCommitmentsListCall struct { } // List: Retrieves a list of commitments contained within the specified -// region. +// region. (== suppress_warning http-rest-shadowed ==) func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -80974,6 +90272,7 @@ func (c *RegionCommitmentsListCall) Header() http.Header { func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81036,7 +90335,7 @@ func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*Commitmen } return ret, nil // { - // "description": "Retrieves a list of commitments contained within the specified region.", + // "description": "Retrieves a list of commitments contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionCommitments.list", // "parameterOrder": [ @@ -81130,7 +90429,8 @@ type RegionDiskTypesGetCall struct { } // Get: Returns the specified regional disk type. Gets a list of -// available disk types by making a list() request. +// available disk types by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -81176,6 +90476,7 @@ func (c *RegionDiskTypesGetCall) Header() http.Header { func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81239,7 +90540,7 @@ func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, er } return ret, nil // { - // "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request.", + // "description": "Returns the specified regional disk type. Gets a list of available disk types by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDiskTypes.get", // "parameterOrder": [ @@ -81296,7 +90597,7 @@ type RegionDiskTypesListCall struct { } // List: Retrieves a list of regional disk types available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -81404,6 +90705,7 @@ func (c *RegionDiskTypesListCall) Header() http.Header { func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81466,7 +90768,7 @@ func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskT } return ret, nil // { - // "description": "Retrieves a list of regional disk types available to the specified project.", + // "description": "Retrieves a list of regional disk types available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDiskTypes.list", // "parameterOrder": [ @@ -81546,6 +90848,195 @@ func (c *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskT } } +// method id "compute.regionDisks.addResourcePolicies": + +type RegionDisksAddResourcePoliciesCall struct { + s *Service + project string + region string + disk string + regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddResourcePolicies: Adds existing resource policies to a regional +// disk. You can only add one policy which will be applied to this disk +// for scheduling snapshot creation. (== suppress_warning +// http-rest-shadowed ==) +func (r *RegionDisksService) AddResourcePolicies(project string, region string, disk string, regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest) *RegionDisksAddResourcePoliciesCall { + c := &RegionDisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.disk = disk + c.regiondisksaddresourcepoliciesrequest = regiondisksaddresourcepoliciesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionDisksAddResourcePoliciesCall) RequestId(requestId string) *RegionDisksAddResourcePoliciesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionDisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksAddResourcePoliciesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionDisksAddResourcePoliciesCall) Context(ctx context.Context) *RegionDisksAddResourcePoliciesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionDisksAddResourcePoliciesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiondisksaddresourcepoliciesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}/addResourcePolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "disk": c.disk, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionDisks.addResourcePolicies" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionDisks.addResourcePolicies", + // "parameterOrder": [ + // "project", + // "region", + // "disk" + // ], + // "parameters": { + // "disk": { + // "description": "The disk name for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/disks/{disk}/addResourcePolicies", + // "request": { + // "$ref": "RegionDisksAddResourcePoliciesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionDisks.createSnapshot": type RegionDisksCreateSnapshotCall struct { @@ -81559,7 +91050,8 @@ type RegionDisksCreateSnapshotCall struct { header_ http.Header } -// CreateSnapshot: Creates a snapshot of this regional disk. +// CreateSnapshot: Creates a snapshot of this regional disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -81615,6 +91107,7 @@ func (c *RegionDisksCreateSnapshotCall) Header() http.Header { func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81680,7 +91173,7 @@ func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Creates a snapshot of this regional disk.", + // "description": "Creates a snapshot of this regional disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.createSnapshot", // "parameterOrder": [ @@ -81747,6 +91240,7 @@ type RegionDisksDeleteCall struct { // regional disk removes all the replicas of its data permanently and is // irreversible. However, deleting a disk does not delete any snapshots // previously made from the disk. You must separately delete snapshots. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -81801,6 +91295,7 @@ func (c *RegionDisksDeleteCall) Header() http.Header { func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -81861,7 +91356,7 @@ func (c *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.", + // "description": "Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionDisks.delete", // "parameterOrder": [ @@ -81921,7 +91416,8 @@ type RegionDisksGetCall struct { header_ http.Header } -// Get: Returns a specified regional persistent disk. +// Get: Returns a specified regional persistent disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -81967,6 +91463,7 @@ func (c *RegionDisksGetCall) Header() http.Header { func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82030,7 +91527,7 @@ func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { } return ret, nil // { - // "description": "Returns a specified regional persistent disk.", + // "description": "Returns a specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDisks.get", // "parameterOrder": [ @@ -82087,7 +91584,8 @@ type RegionDisksInsertCall struct { } // Insert: Creates a persistent regional disk in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82149,6 +91647,7 @@ func (c *RegionDisksInsertCall) Header() http.Header { func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82213,7 +91712,7 @@ func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates a persistent regional disk in the specified project using the data included in the request.", + // "description": "Creates a persistent regional disk in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.insert", // "parameterOrder": [ @@ -82274,7 +91773,7 @@ type RegionDisksListCall struct { } // List: Retrieves the list of persistent disks contained within the -// specified region. +// specified region. (== suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82382,6 +91881,7 @@ func (c *RegionDisksListCall) Header() http.Header { func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82444,7 +91944,7 @@ func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error } return ret, nil // { - // "description": "Retrieves the list of persistent disks contained within the specified region.", + // "description": "Retrieves the list of persistent disks contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionDisks.list", // "parameterOrder": [ @@ -82524,6 +92024,193 @@ func (c *RegionDisksListCall) Pages(ctx context.Context, f func(*DiskList) error } } +// method id "compute.regionDisks.removeResourcePolicies": + +type RegionDisksRemoveResourcePoliciesCall struct { + s *Service + project string + region string + disk string + regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveResourcePolicies: Removes resource policies from a regional +// disk. (== suppress_warning http-rest-shadowed ==) +func (r *RegionDisksService) RemoveResourcePolicies(project string, region string, disk string, regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest) *RegionDisksRemoveResourcePoliciesCall { + c := &RegionDisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.disk = disk + c.regiondisksremoveresourcepoliciesrequest = regiondisksremoveresourcepoliciesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionDisksRemoveResourcePoliciesCall) RequestId(requestId string) *RegionDisksRemoveResourcePoliciesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionDisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksRemoveResourcePoliciesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionDisksRemoveResourcePoliciesCall) Context(ctx context.Context) *RegionDisksRemoveResourcePoliciesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionDisksRemoveResourcePoliciesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiondisksremoveresourcepoliciesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/disks/{disk}/removeResourcePolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "disk": c.disk, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionDisks.removeResourcePolicies" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionDisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Removes resource policies from a regional disk. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionDisks.removeResourcePolicies", + // "parameterOrder": [ + // "project", + // "region", + // "disk" + // ], + // "parameters": { + // "disk": { + // "description": "The disk name for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/disks/{disk}/removeResourcePolicies", + // "request": { + // "$ref": "RegionDisksRemoveResourcePoliciesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionDisks.resize": type RegionDisksResizeCall struct { @@ -82537,7 +92224,8 @@ type RegionDisksResizeCall struct { header_ http.Header } -// Resize: Resizes the specified regional persistent disk. +// Resize: Resizes the specified regional persistent disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82593,6 +92281,7 @@ func (c *RegionDisksResizeCall) Header() http.Header { func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82658,7 +92347,7 @@ func (c *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Resizes the specified regional persistent disk.", + // "description": "Resizes the specified regional persistent disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.resize", // "parameterOrder": [ @@ -82722,7 +92411,8 @@ type RegionDisksSetLabelsCall struct { header_ http.Header } -// SetLabels: Sets the labels on the target regional disk. +// SetLabels: Sets the labels on the target regional disk. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82778,6 +92468,7 @@ func (c *RegionDisksSetLabelsCall) Header() http.Header { func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -82843,7 +92534,7 @@ func (c *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Sets the labels on the target regional disk.", + // "description": "Sets the labels on the target regional disk. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.setLabels", // "parameterOrder": [ @@ -82908,7 +92599,7 @@ type RegionDisksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { c := &RegionDisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -82945,6 +92636,7 @@ func (c *RegionDisksTestIamPermissionsCall) Header() http.Header { func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83010,7 +92702,7 @@ func (c *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionDisks.testIamPermissions", // "parameterOrder": [ @@ -83057,6 +92749,1170 @@ func (c *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } +// method id "compute.regionHealthChecks.delete": + +type RegionHealthChecksDeleteCall struct { + s *Service + project string + region string + healthCheck string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified HealthCheck resource. (== +// suppress_warning http-rest-shadowed ==) +func (r *RegionHealthChecksService) Delete(project string, region string, healthCheck string) *RegionHealthChecksDeleteCall { + c := &RegionHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.healthCheck = healthCheck + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionHealthChecksDeleteCall) RequestId(requestId string) *RegionHealthChecksDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionHealthChecksDeleteCall) Fields(s ...googleapi.Field) *RegionHealthChecksDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionHealthChecksDeleteCall) Context(ctx context.Context) *RegionHealthChecksDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionHealthChecksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/healthChecks/{healthCheck}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionHealthChecks.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified HealthCheck resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.regionHealthChecks.delete", + // "parameterOrder": [ + // "project", + // "region", + // "healthCheck" + // ], + // "parameters": { + // "healthCheck": { + // "description": "Name of the HealthCheck resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/healthChecks/{healthCheck}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionHealthChecks.get": + +type RegionHealthChecksGetCall struct { + s *Service + project string + region string + healthCheck string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified HealthCheck resource. Gets a list of +// available health checks by making a list() request. (== +// suppress_warning http-rest-shadowed ==) +func (r *RegionHealthChecksService) Get(project string, region string, healthCheck string) *RegionHealthChecksGetCall { + c := &RegionHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.healthCheck = healthCheck + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionHealthChecksGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionHealthChecksGetCall) IfNoneMatch(entityTag string) *RegionHealthChecksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionHealthChecksGetCall) Context(ctx context.Context) *RegionHealthChecksGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionHealthChecksGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/healthChecks/{healthCheck}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionHealthChecks.get" call. +// Exactly one of *HealthCheck or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *HealthCheck.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &HealthCheck{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.regionHealthChecks.get", + // "parameterOrder": [ + // "project", + // "region", + // "healthCheck" + // ], + // "parameters": { + // "healthCheck": { + // "description": "Name of the HealthCheck resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/healthChecks/{healthCheck}", + // "response": { + // "$ref": "HealthCheck" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionHealthChecks.insert": + +type RegionHealthChecksInsertCall struct { + s *Service + project string + region string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a HealthCheck resource in the specified project using +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) +func (r *RegionHealthChecksService) Insert(project string, region string, healthcheck *HealthCheck) *RegionHealthChecksInsertCall { + c := &RegionHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.healthcheck = healthcheck + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionHealthChecksInsertCall) RequestId(requestId string) *RegionHealthChecksInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionHealthChecksInsertCall) Fields(s ...googleapi.Field) *RegionHealthChecksInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionHealthChecksInsertCall) Context(ctx context.Context) *RegionHealthChecksInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionHealthChecksInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/healthChecks") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionHealthChecks.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionHealthChecks.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/healthChecks", + // "request": { + // "$ref": "HealthCheck" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionHealthChecks.list": + +type RegionHealthChecksListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of HealthCheck resources available to the +// specified project. (== suppress_warning http-rest-shadowed ==) +func (r *RegionHealthChecksService) List(project string, region string) *RegionHealthChecksListCall { + c := &RegionHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *RegionHealthChecksListCall) Filter(filter string) *RegionHealthChecksListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *RegionHealthChecksListCall) MaxResults(maxResults int64) *RegionHealthChecksListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *RegionHealthChecksListCall) OrderBy(orderBy string) *RegionHealthChecksListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *RegionHealthChecksListCall) PageToken(pageToken string) *RegionHealthChecksListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionHealthChecksListCall) Fields(s ...googleapi.Field) *RegionHealthChecksListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionHealthChecksListCall) IfNoneMatch(entityTag string) *RegionHealthChecksListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionHealthChecksListCall) Context(ctx context.Context) *RegionHealthChecksListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionHealthChecksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/healthChecks") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionHealthChecks.list" call. +// Exactly one of *HealthCheckList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *HealthCheckList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &HealthCheckList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of HealthCheck resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.regionHealthChecks.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/healthChecks", + // "response": { + // "$ref": "HealthCheckList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionHealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.regionHealthChecks.patch": + +type RegionHealthChecksPatchCall struct { + s *Service + project string + region string + healthCheck string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a HealthCheck resource in the specified project using +// the data included in the request. This method supports PATCH +// semantics and uses the JSON merge patch format and processing rules. +// (== suppress_warning http-rest-shadowed ==) +func (r *RegionHealthChecksService) Patch(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksPatchCall { + c := &RegionHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.healthCheck = healthCheck + c.healthcheck = healthcheck + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionHealthChecksPatchCall) RequestId(requestId string) *RegionHealthChecksPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionHealthChecksPatchCall) Fields(s ...googleapi.Field) *RegionHealthChecksPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionHealthChecksPatchCall) Context(ctx context.Context) *RegionHealthChecksPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionHealthChecksPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/healthChecks/{healthCheck}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionHealthChecks.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PATCH", + // "id": "compute.regionHealthChecks.patch", + // "parameterOrder": [ + // "project", + // "region", + // "healthCheck" + // ], + // "parameters": { + // "healthCheck": { + // "description": "Name of the HealthCheck resource to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/healthChecks/{healthCheck}", + // "request": { + // "$ref": "HealthCheck" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionHealthChecks.update": + +type RegionHealthChecksUpdateCall struct { + s *Service + project string + region string + healthCheck string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates a HealthCheck resource in the specified project using +// the data included in the request. (== suppress_warning +// http-rest-shadowed ==) +func (r *RegionHealthChecksService) Update(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksUpdateCall { + c := &RegionHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.healthCheck = healthCheck + c.healthcheck = healthcheck + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionHealthChecksUpdateCall) RequestId(requestId string) *RegionHealthChecksUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionHealthChecksUpdateCall) Fields(s ...googleapi.Field) *RegionHealthChecksUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionHealthChecksUpdateCall) Context(ctx context.Context) *RegionHealthChecksUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionHealthChecksUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/healthChecks/{healthCheck}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionHealthChecks.update" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PUT", + // "id": "compute.regionHealthChecks.update", + // "parameterOrder": [ + // "project", + // "region", + // "healthCheck" + // ], + // "parameters": { + // "healthCheck": { + // "description": "Name of the HealthCheck resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/healthChecks/{healthCheck}", + // "request": { + // "$ref": "HealthCheck" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionInstanceGroupManagers.abandonInstances": type RegionInstanceGroupManagersAbandonInstancesCall struct { @@ -83086,7 +93942,7 @@ type RegionInstanceGroupManagersAbandonInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest) *RegionInstanceGroupManagersAbandonInstancesCall { c := &RegionInstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83142,6 +93998,7 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header { func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83207,7 +94064,7 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.abandonInstances", // "parameterOrder": [ @@ -83269,7 +94126,7 @@ type RegionInstanceGroupManagersDeleteCall struct { } // Delete: Deletes the specified managed instance group and all of the -// instances in that group. +// instances in that group. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Delete(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersDeleteCall { c := &RegionInstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83324,6 +94181,7 @@ func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header { func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83384,7 +94242,7 @@ func (c *RegionInstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes the specified managed instance group and all of the instances in that group.", + // "description": "Deletes the specified managed instance group and all of the instances in that group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionInstanceGroupManagers.delete", // "parameterOrder": [ @@ -83459,7 +94317,7 @@ type RegionInstanceGroupManagersDeleteInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest) *RegionInstanceGroupManagersDeleteInstancesCall { c := &RegionInstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83515,6 +94373,7 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header { func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83580,7 +94439,7 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.deleteInstances", // "parameterOrder": [ @@ -83643,7 +94502,7 @@ type RegionInstanceGroupManagersGetCall struct { } // Get: Returns all of the details about the specified managed instance -// group. +// group. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Get(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersGetCall { c := &RegionInstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83689,6 +94548,7 @@ func (c *RegionInstanceGroupManagersGetCall) Header() http.Header { func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83752,7 +94612,7 @@ func (c *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Returns all of the details about the specified managed instance group.", + // "description": "Returns all of the details about the specified managed instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroupManagers.get", // "parameterOrder": [ @@ -83815,6 +94675,7 @@ type RegionInstanceGroupManagersInsertCall struct { // listmanagedinstances method. // // A regional managed instance group can contain up to 2000 instances. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Insert(project string, region string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersInsertCall { c := &RegionInstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -83869,6 +94730,7 @@ func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header { func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -83933,7 +94795,7 @@ func (c *RegionInstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances.", + // "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.\n\nA regional managed instance group can contain up to 2000 instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.insert", // "parameterOrder": [ @@ -83988,7 +94850,8 @@ type RegionInstanceGroupManagersListCall struct { } // List: Retrieves the list of managed instance groups that are -// contained within the specified region. +// contained within the specified region. (== suppress_warning +// http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) List(project string, region string) *RegionInstanceGroupManagersListCall { c := &RegionInstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -84096,6 +94959,7 @@ func (c *RegionInstanceGroupManagersListCall) Header() http.Header { func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84158,7 +95022,7 @@ func (c *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves the list of managed instance groups that are contained within the specified region.", + // "description": "Retrieves the list of managed instance groups that are contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroupManagers.list", // "parameterOrder": [ @@ -84252,7 +95116,7 @@ type RegionInstanceGroupManagersListManagedInstancesCall struct { // ListManagedInstances: Lists the instances in the managed instance // group and instances that are scheduled to be created. The list // includes any current actions that the group has scheduled for its -// instances. +// instances. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall { c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -84351,6 +95215,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Head func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84413,7 +95278,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.", + // "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.listManagedInstances", // "parameterOrder": [ @@ -84497,7 +95362,7 @@ type RegionInstanceGroupManagersPatchCall struct { // process of being patched. You must separately verify the status of // the individual instances with the listmanagedinstances method. This // method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. +// and processing rules. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall { c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -84553,6 +95418,7 @@ func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84618,7 +95484,7 @@ func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.regionInstanceGroupManagers.patch", // "parameterOrder": [ @@ -84694,7 +95560,7 @@ type RegionInstanceGroupManagersRecreateInstancesCall struct { // deleted. // // You can specify a maximum of 1000 instances with this method per -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -84750,6 +95616,7 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -84815,7 +95682,7 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.", + // "description": "Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.recreateInstances", // "parameterOrder": [ @@ -84889,6 +95756,7 @@ type RegionInstanceGroupManagersResizeCall struct { // If the group is part of a backend service that has enabled connection // draining, it can take up to 60 seconds after the connection draining // duration has elapsed before the VM instance is removed or deleted. +// (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -84944,6 +95812,7 @@ func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85004,7 +95873,7 @@ func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.", + // "description": "Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances.\n\nThe resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.resize", // "parameterOrder": [ @@ -85074,7 +95943,8 @@ type RegionInstanceGroupManagersSetInstanceTemplateCall struct { // SetInstanceTemplate: Sets the instance template to use when creating // new instances or recreating instances in this group. Existing -// instances are not affected. +// instances are not affected. (== suppress_warning http-rest-shadowed +// ==) func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85130,6 +96000,7 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Heade func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85195,7 +96066,7 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", + // "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", // "parameterOrder": [ @@ -85259,7 +96130,7 @@ type RegionInstanceGroupManagersSetTargetPoolsCall struct { // SetTargetPools: Modifies the target pools to which all new instances // in this group are assigned. Existing instances in the group are not -// affected. +// affected. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85315,6 +96186,7 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85380,7 +96252,7 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", + // "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroupManagers.setTargetPools", // "parameterOrder": [ @@ -85442,7 +96314,8 @@ type RegionInstanceGroupsGetCall struct { header_ http.Header } -// Get: Returns the specified instance group resource. +// Get: Returns the specified instance group resource. (== +// suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupsService) Get(project string, region string, instanceGroup string) *RegionInstanceGroupsGetCall { c := &RegionInstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85488,6 +96361,7 @@ func (c *RegionInstanceGroupsGetCall) Header() http.Header { func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85551,7 +96425,7 @@ func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*Instanc } return ret, nil // { - // "description": "Returns the specified instance group resource.", + // "description": "Returns the specified instance group resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroups.get", // "parameterOrder": [ @@ -85606,7 +96480,7 @@ type RegionInstanceGroupsListCall struct { } // List: Retrieves the list of instance group resources contained within -// the specified region. +// the specified region. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupsService) List(project string, region string) *RegionInstanceGroupsListCall { c := &RegionInstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85714,6 +96588,7 @@ func (c *RegionInstanceGroupsListCall) Header() http.Header { func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -85776,7 +96651,7 @@ func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*Region } return ret, nil // { - // "description": "Retrieves the list of instance group resources contained within the specified region.", + // "description": "Retrieves the list of instance group resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionInstanceGroups.list", // "parameterOrder": [ @@ -85871,7 +96746,8 @@ type RegionInstanceGroupsListInstancesCall struct { // ListInstances: Lists the instances in the specified instance group // and displays information about the named ports. Depending on the // specified options, this method can list all instances or only the -// instances that are running. +// instances that are running. (== suppress_warning http-rest-shadowed +// ==) func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall { c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -85971,6 +96847,7 @@ func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header { func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86037,7 +96914,7 @@ func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.", + // "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroups.listInstances", // "parameterOrder": [ @@ -86140,7 +97017,7 @@ type RegionInstanceGroupsSetNamedPortsCall struct { } // SetNamedPorts: Sets the named ports for the specified regional -// instance group. +// instance group. (== suppress_warning http-rest-shadowed ==) func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region string, instanceGroup string, regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest) *RegionInstanceGroupsSetNamedPortsCall { c := &RegionInstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -86196,6 +97073,7 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header { func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86261,7 +97139,7 @@ func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the named ports for the specified regional instance group.", + // "description": "Sets the named ports for the specified regional instance group. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.regionInstanceGroups.setNamedPorts", // "parameterOrder": [ @@ -86323,6 +97201,7 @@ type RegionOperationsDeleteCall struct { } // Delete: Deletes the specified region-specific Operations resource. +// (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/delete func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall { c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -86359,6 +97238,7 @@ func (c *RegionOperationsDeleteCall) Header() http.Header { func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86394,7 +97274,7 @@ func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deletes the specified region-specific Operations resource.", + // "description": "Deletes the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.regionOperations.delete", // "parameterOrder": [ @@ -86447,7 +97327,8 @@ type RegionOperationsGetCall struct { header_ http.Header } -// Get: Retrieves the specified region-specific Operations resource. +// Get: Retrieves the specified region-specific Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/get func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall { c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -86494,6 +97375,7 @@ func (c *RegionOperationsGetCall) Header() http.Header { func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86557,7 +97439,7 @@ func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Retrieves the specified region-specific Operations resource.", + // "description": "Retrieves the specified region-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionOperations.get", // "parameterOrder": [ @@ -86614,7 +97496,7 @@ type RegionOperationsListCall struct { } // List: Retrieves a list of Operation resources contained within the -// specified region. +// specified region. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/list func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall { c := &RegionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -86723,6 +97605,7 @@ func (c *RegionOperationsListCall) Header() http.Header { func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86785,7 +97668,7 @@ func (c *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified region.", + // "description": "Retrieves a list of Operation resources contained within the specified region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regionOperations.list", // "parameterOrder": [ @@ -86865,6 +97748,4211 @@ func (c *RegionOperationsListCall) Pages(ctx context.Context, f func(*OperationL } } +// method id "compute.regionSslCertificates.delete": + +type RegionSslCertificatesDeleteCall struct { + s *Service + project string + region string + sslCertificate string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified SslCertificate resource in the region. +// (== suppress_warning http-rest-shadowed ==) +func (r *RegionSslCertificatesService) Delete(project string, region string, sslCertificate string) *RegionSslCertificatesDeleteCall { + c := &RegionSslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.sslCertificate = sslCertificate + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionSslCertificatesDeleteCall) RequestId(requestId string) *RegionSslCertificatesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionSslCertificatesDeleteCall) Fields(s ...googleapi.Field) *RegionSslCertificatesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionSslCertificatesDeleteCall) Context(ctx context.Context) *RegionSslCertificatesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionSslCertificatesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/sslCertificates/{sslCertificate}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "sslCertificate": c.sslCertificate, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSslCertificates.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionSslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified SslCertificate resource in the region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.regionSslCertificates.delete", + // "parameterOrder": [ + // "project", + // "region", + // "sslCertificate" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "sslCertificate": { + // "description": "Name of the SslCertificate resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/sslCertificates/{sslCertificate}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionSslCertificates.get": + +type RegionSslCertificatesGetCall struct { + s *Service + project string + region string + sslCertificate string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified SslCertificate resource in the specified +// region. Get a list of available SSL certificates by making a list() +// request. (== suppress_warning http-rest-shadowed ==) +func (r *RegionSslCertificatesService) Get(project string, region string, sslCertificate string) *RegionSslCertificatesGetCall { + c := &RegionSslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.sslCertificate = sslCertificate + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionSslCertificatesGetCall) Fields(s ...googleapi.Field) *RegionSslCertificatesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionSslCertificatesGetCall) IfNoneMatch(entityTag string) *RegionSslCertificatesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionSslCertificatesGetCall) Context(ctx context.Context) *RegionSslCertificatesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionSslCertificatesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/sslCertificates/{sslCertificate}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "sslCertificate": c.sslCertificate, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSslCertificates.get" call. +// Exactly one of *SslCertificate or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SslCertificate.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionSslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertificate, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SslCertificate{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.regionSslCertificates.get", + // "parameterOrder": [ + // "project", + // "region", + // "sslCertificate" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "sslCertificate": { + // "description": "Name of the SslCertificate resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/sslCertificates/{sslCertificate}", + // "response": { + // "$ref": "SslCertificate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionSslCertificates.insert": + +type RegionSslCertificatesInsertCall struct { + s *Service + project string + region string + sslcertificate *SslCertificate + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a SslCertificate resource in the specified project +// and region using the data included in the request (== +// suppress_warning http-rest-shadowed ==) +func (r *RegionSslCertificatesService) Insert(project string, region string, sslcertificate *SslCertificate) *RegionSslCertificatesInsertCall { + c := &RegionSslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.sslcertificate = sslcertificate + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionSslCertificatesInsertCall) RequestId(requestId string) *RegionSslCertificatesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionSslCertificatesInsertCall) Fields(s ...googleapi.Field) *RegionSslCertificatesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionSslCertificatesInsertCall) Context(ctx context.Context) *RegionSslCertificatesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionSslCertificatesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertificate) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/sslCertificates") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSslCertificates.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionSslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a SslCertificate resource in the specified project and region using the data included in the request (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionSslCertificates.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/sslCertificates", + // "request": { + // "$ref": "SslCertificate" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionSslCertificates.list": + +type RegionSslCertificatesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of SslCertificate resources available to the +// specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) +func (r *RegionSslCertificatesService) List(project string, region string) *RegionSslCertificatesListCall { + c := &RegionSslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *RegionSslCertificatesListCall) Filter(filter string) *RegionSslCertificatesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *RegionSslCertificatesListCall) MaxResults(maxResults int64) *RegionSslCertificatesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *RegionSslCertificatesListCall) OrderBy(orderBy string) *RegionSslCertificatesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *RegionSslCertificatesListCall) PageToken(pageToken string) *RegionSslCertificatesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionSslCertificatesListCall) Fields(s ...googleapi.Field) *RegionSslCertificatesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionSslCertificatesListCall) IfNoneMatch(entityTag string) *RegionSslCertificatesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionSslCertificatesListCall) Context(ctx context.Context) *RegionSslCertificatesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionSslCertificatesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSslCertificatesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/sslCertificates") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSslCertificates.list" call. +// Exactly one of *SslCertificateList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *SslCertificateList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionSslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertificateList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SslCertificateList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of SslCertificate resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.regionSslCertificates.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/sslCertificates", + // "response": { + // "$ref": "SslCertificateList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionSslCertificatesListCall) Pages(ctx context.Context, f func(*SslCertificateList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.regionTargetHttpProxies.delete": + +type RegionTargetHttpProxiesDeleteCall struct { + s *Service + project string + region string + targetHttpProxy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified TargetHttpProxy resource. (== +// suppress_warning http-rest-shadowed ==) +func (r *RegionTargetHttpProxiesService) Delete(project string, region string, targetHttpProxy string) *RegionTargetHttpProxiesDeleteCall { + c := &RegionTargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.targetHttpProxy = targetHttpProxy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionTargetHttpProxiesDeleteCall) RequestId(requestId string) *RegionTargetHttpProxiesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionTargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionTargetHttpProxiesDeleteCall) Context(ctx context.Context) *RegionTargetHttpProxiesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionTargetHttpProxiesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionTargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetHttpProxy": c.targetHttpProxy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionTargetHttpProxies.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionTargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.regionTargetHttpProxies.delete", + // "parameterOrder": [ + // "project", + // "region", + // "targetHttpProxy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "targetHttpProxy": { + // "description": "Name of the TargetHttpProxy resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionTargetHttpProxies.get": + +type RegionTargetHttpProxiesGetCall struct { + s *Service + project string + region string + targetHttpProxy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified TargetHttpProxy resource in the specified +// region. Gets a list of available target HTTP proxies by making a +// list() request. (== suppress_warning http-rest-shadowed ==) +func (r *RegionTargetHttpProxiesService) Get(project string, region string, targetHttpProxy string) *RegionTargetHttpProxiesGetCall { + c := &RegionTargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.targetHttpProxy = targetHttpProxy + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionTargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionTargetHttpProxiesGetCall) IfNoneMatch(entityTag string) *RegionTargetHttpProxiesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionTargetHttpProxiesGetCall) Context(ctx context.Context) *RegionTargetHttpProxiesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionTargetHttpProxiesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionTargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetHttpProxy": c.targetHttpProxy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionTargetHttpProxies.get" call. +// Exactly one of *TargetHttpProxy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *TargetHttpProxy.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionTargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TargetHttpProxy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.regionTargetHttpProxies.get", + // "parameterOrder": [ + // "project", + // "region", + // "targetHttpProxy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "targetHttpProxy": { + // "description": "Name of the TargetHttpProxy resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}", + // "response": { + // "$ref": "TargetHttpProxy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionTargetHttpProxies.insert": + +type RegionTargetHttpProxiesInsertCall struct { + s *Service + project string + region string + targethttpproxy *TargetHttpProxy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a TargetHttpProxy resource in the specified project +// and region using the data included in the request. (== +// suppress_warning http-rest-shadowed ==) +func (r *RegionTargetHttpProxiesService) Insert(project string, region string, targethttpproxy *TargetHttpProxy) *RegionTargetHttpProxiesInsertCall { + c := &RegionTargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.targethttpproxy = targethttpproxy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionTargetHttpProxiesInsertCall) RequestId(requestId string) *RegionTargetHttpProxiesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionTargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionTargetHttpProxiesInsertCall) Context(ctx context.Context) *RegionTargetHttpProxiesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionTargetHttpProxiesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionTargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpproxy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetHttpProxies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionTargetHttpProxies.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionTargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a TargetHttpProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionTargetHttpProxies.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetHttpProxies", + // "request": { + // "$ref": "TargetHttpProxy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionTargetHttpProxies.list": + +type RegionTargetHttpProxiesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of TargetHttpProxy resources available to +// the specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) +func (r *RegionTargetHttpProxiesService) List(project string, region string) *RegionTargetHttpProxiesListCall { + c := &RegionTargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *RegionTargetHttpProxiesListCall) Filter(filter string) *RegionTargetHttpProxiesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *RegionTargetHttpProxiesListCall) MaxResults(maxResults int64) *RegionTargetHttpProxiesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *RegionTargetHttpProxiesListCall) OrderBy(orderBy string) *RegionTargetHttpProxiesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *RegionTargetHttpProxiesListCall) PageToken(pageToken string) *RegionTargetHttpProxiesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionTargetHttpProxiesListCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionTargetHttpProxiesListCall) IfNoneMatch(entityTag string) *RegionTargetHttpProxiesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionTargetHttpProxiesListCall) Context(ctx context.Context) *RegionTargetHttpProxiesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionTargetHttpProxiesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionTargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetHttpProxies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionTargetHttpProxies.list" call. +// Exactly one of *TargetHttpProxyList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TargetHttpProxyList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionTargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TargetHttpProxyList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.regionTargetHttpProxies.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetHttpProxies", + // "response": { + // "$ref": "TargetHttpProxyList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionTargetHttpProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpProxyList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.regionTargetHttpProxies.setUrlMap": + +type RegionTargetHttpProxiesSetUrlMapCall struct { + s *Service + project string + region string + targetHttpProxy string + urlmapreference *UrlMapReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetUrlMap: Changes the URL map for TargetHttpProxy. (== +// suppress_warning http-rest-shadowed ==) +func (r *RegionTargetHttpProxiesService) SetUrlMap(project string, region string, targetHttpProxy string, urlmapreference *UrlMapReference) *RegionTargetHttpProxiesSetUrlMapCall { + c := &RegionTargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.targetHttpProxy = targetHttpProxy + c.urlmapreference = urlmapreference + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionTargetHttpProxiesSetUrlMapCall) RequestId(requestId string) *RegionTargetHttpProxiesSetUrlMapCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionTargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *RegionTargetHttpProxiesSetUrlMapCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionTargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *RegionTargetHttpProxiesSetUrlMapCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionTargetHttpProxiesSetUrlMapCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionTargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetHttpProxy": c.targetHttpProxy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionTargetHttpProxies.setUrlMap" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionTargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionTargetHttpProxies.setUrlMap", + // "parameterOrder": [ + // "project", + // "region", + // "targetHttpProxy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "targetHttpProxy": { + // "description": "Name of the TargetHttpProxy to set a URL map for.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetHttpProxies/{targetHttpProxy}/setUrlMap", + // "request": { + // "$ref": "UrlMapReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionTargetHttpsProxies.delete": + +type RegionTargetHttpsProxiesDeleteCall struct { + s *Service + project string + region string + targetHttpsProxy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified TargetHttpsProxy resource. (== +// suppress_warning http-rest-shadowed ==) +func (r *RegionTargetHttpsProxiesService) Delete(project string, region string, targetHttpsProxy string) *RegionTargetHttpsProxiesDeleteCall { + c := &RegionTargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.targetHttpsProxy = targetHttpsProxy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionTargetHttpsProxiesDeleteCall) RequestId(requestId string) *RegionTargetHttpsProxiesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionTargetHttpsProxiesDeleteCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionTargetHttpsProxiesDeleteCall) Context(ctx context.Context) *RegionTargetHttpsProxiesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionTargetHttpsProxiesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionTargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetHttpsProxy": c.targetHttpsProxy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionTargetHttpsProxies.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionTargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.regionTargetHttpsProxies.delete", + // "parameterOrder": [ + // "project", + // "region", + // "targetHttpsProxy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "targetHttpsProxy": { + // "description": "Name of the TargetHttpsProxy resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionTargetHttpsProxies.get": + +type RegionTargetHttpsProxiesGetCall struct { + s *Service + project string + region string + targetHttpsProxy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified TargetHttpsProxy resource in the specified +// region. Gets a list of available target HTTP proxies by making a +// list() request. (== suppress_warning http-rest-shadowed ==) +func (r *RegionTargetHttpsProxiesService) Get(project string, region string, targetHttpsProxy string) *RegionTargetHttpsProxiesGetCall { + c := &RegionTargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.targetHttpsProxy = targetHttpsProxy + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionTargetHttpsProxiesGetCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionTargetHttpsProxiesGetCall) IfNoneMatch(entityTag string) *RegionTargetHttpsProxiesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionTargetHttpsProxiesGetCall) Context(ctx context.Context) *RegionTargetHttpsProxiesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionTargetHttpsProxiesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionTargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetHttpsProxy": c.targetHttpsProxy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionTargetHttpsProxies.get" call. +// Exactly one of *TargetHttpsProxy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TargetHttpsProxy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionTargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TargetHttpsProxy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.regionTargetHttpsProxies.get", + // "parameterOrder": [ + // "project", + // "region", + // "targetHttpsProxy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "targetHttpsProxy": { + // "description": "Name of the TargetHttpsProxy resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}", + // "response": { + // "$ref": "TargetHttpsProxy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionTargetHttpsProxies.insert": + +type RegionTargetHttpsProxiesInsertCall struct { + s *Service + project string + region string + targethttpsproxy *TargetHttpsProxy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a TargetHttpsProxy resource in the specified project +// and region using the data included in the request. (== +// suppress_warning http-rest-shadowed ==) +func (r *RegionTargetHttpsProxiesService) Insert(project string, region string, targethttpsproxy *TargetHttpsProxy) *RegionTargetHttpsProxiesInsertCall { + c := &RegionTargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.targethttpsproxy = targethttpsproxy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionTargetHttpsProxiesInsertCall) RequestId(requestId string) *RegionTargetHttpsProxiesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionTargetHttpsProxiesInsertCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionTargetHttpsProxiesInsertCall) Context(ctx context.Context) *RegionTargetHttpsProxiesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionTargetHttpsProxiesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionTargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetHttpsProxies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionTargetHttpsProxies.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionTargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a TargetHttpsProxy resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionTargetHttpsProxies.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetHttpsProxies", + // "request": { + // "$ref": "TargetHttpsProxy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionTargetHttpsProxies.list": + +type RegionTargetHttpsProxiesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of TargetHttpsProxy resources available to +// the specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) +func (r *RegionTargetHttpsProxiesService) List(project string, region string) *RegionTargetHttpsProxiesListCall { + c := &RegionTargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *RegionTargetHttpsProxiesListCall) Filter(filter string) *RegionTargetHttpsProxiesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *RegionTargetHttpsProxiesListCall) MaxResults(maxResults int64) *RegionTargetHttpsProxiesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *RegionTargetHttpsProxiesListCall) OrderBy(orderBy string) *RegionTargetHttpsProxiesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *RegionTargetHttpsProxiesListCall) PageToken(pageToken string) *RegionTargetHttpsProxiesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionTargetHttpsProxiesListCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionTargetHttpsProxiesListCall) IfNoneMatch(entityTag string) *RegionTargetHttpsProxiesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionTargetHttpsProxiesListCall) Context(ctx context.Context) *RegionTargetHttpsProxiesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionTargetHttpsProxiesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionTargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetHttpsProxies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionTargetHttpsProxies.list" call. +// Exactly one of *TargetHttpsProxyList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TargetHttpsProxyList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionTargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TargetHttpsProxyList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.regionTargetHttpsProxies.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetHttpsProxies", + // "response": { + // "$ref": "TargetHttpsProxyList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionTargetHttpsProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.regionTargetHttpsProxies.setSslCertificates": + +type RegionTargetHttpsProxiesSetSslCertificatesCall struct { + s *Service + project string + region string + targetHttpsProxy string + regiontargethttpsproxiessetsslcertificatesrequest *RegionTargetHttpsProxiesSetSslCertificatesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. +// (== suppress_warning http-rest-shadowed ==) +func (r *RegionTargetHttpsProxiesService) SetSslCertificates(project string, region string, targetHttpsProxy string, regiontargethttpsproxiessetsslcertificatesrequest *RegionTargetHttpsProxiesSetSslCertificatesRequest) *RegionTargetHttpsProxiesSetSslCertificatesCall { + c := &RegionTargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.targetHttpsProxy = targetHttpsProxy + c.regiontargethttpsproxiessetsslcertificatesrequest = regiontargethttpsproxiessetsslcertificatesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) RequestId(requestId string) *RegionTargetHttpsProxiesSetSslCertificatesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesSetSslCertificatesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *RegionTargetHttpsProxiesSetSslCertificatesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiontargethttpsproxiessetsslcertificatesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetHttpsProxy": c.targetHttpsProxy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionTargetHttpsProxies.setSslCertificates" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionTargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionTargetHttpsProxies.setSslCertificates", + // "parameterOrder": [ + // "project", + // "region", + // "targetHttpsProxy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "targetHttpsProxy": { + // "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates", + // "request": { + // "$ref": "RegionTargetHttpsProxiesSetSslCertificatesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionTargetHttpsProxies.setUrlMap": + +type RegionTargetHttpsProxiesSetUrlMapCall struct { + s *Service + project string + region string + targetHttpsProxy string + urlmapreference *UrlMapReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetUrlMap: Changes the URL map for TargetHttpsProxy. (== +// suppress_warning http-rest-shadowed ==) +func (r *RegionTargetHttpsProxiesService) SetUrlMap(project string, region string, targetHttpsProxy string, urlmapreference *UrlMapReference) *RegionTargetHttpsProxiesSetUrlMapCall { + c := &RegionTargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.targetHttpsProxy = targetHttpsProxy + c.urlmapreference = urlmapreference + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *RegionTargetHttpsProxiesSetUrlMapCall) RequestId(requestId string) *RegionTargetHttpsProxiesSetUrlMapCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionTargetHttpsProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *RegionTargetHttpsProxiesSetUrlMapCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionTargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *RegionTargetHttpsProxiesSetUrlMapCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionTargetHttpsProxiesSetUrlMapCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionTargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetHttpsProxy": c.targetHttpsProxy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionTargetHttpsProxies.setUrlMap" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionTargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionTargetHttpsProxies.setUrlMap", + // "parameterOrder": [ + // "project", + // "region", + // "targetHttpsProxy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "targetHttpsProxy": { + // "description": "Name of the TargetHttpsProxy to set a URL map for.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap", + // "request": { + // "$ref": "UrlMapReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionUrlMaps.delete": + +type RegionUrlMapsDeleteCall struct { + s *Service + project string + region string + urlMap string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified UrlMap resource. (== suppress_warning +// http-rest-shadowed ==) +func (r *RegionUrlMapsService) Delete(project string, region string, urlMap string) *RegionUrlMapsDeleteCall { + c := &RegionUrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.urlMap = urlMap + return c +} + +// RequestId sets the optional parameter "requestId": begin_interface: +// MixerMutationRequestBuilder Request ID to support idempotency. +func (c *RegionUrlMapsDeleteCall) RequestId(requestId string) *RegionUrlMapsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionUrlMapsDeleteCall) Fields(s ...googleapi.Field) *RegionUrlMapsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionUrlMapsDeleteCall) Context(ctx context.Context) *RegionUrlMapsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionUrlMapsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionUrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/urlMaps/{urlMap}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "urlMap": c.urlMap, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionUrlMaps.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionUrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.regionUrlMaps.delete", + // "parameterOrder": [ + // "project", + // "region", + // "urlMap" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + // "location": "query", + // "type": "string" + // }, + // "urlMap": { + // "description": "Name of the UrlMap resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/urlMaps/{urlMap}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionUrlMaps.get": + +type RegionUrlMapsGetCall struct { + s *Service + project string + region string + urlMap string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified UrlMap resource. Gets a list of available +// URL maps by making a list() request. (== suppress_warning +// http-rest-shadowed ==) +func (r *RegionUrlMapsService) Get(project string, region string, urlMap string) *RegionUrlMapsGetCall { + c := &RegionUrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.urlMap = urlMap + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionUrlMapsGetCall) Fields(s ...googleapi.Field) *RegionUrlMapsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionUrlMapsGetCall) IfNoneMatch(entityTag string) *RegionUrlMapsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionUrlMapsGetCall) Context(ctx context.Context) *RegionUrlMapsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionUrlMapsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionUrlMapsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/urlMaps/{urlMap}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "urlMap": c.urlMap, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionUrlMaps.get" call. +// Exactly one of *UrlMap or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *UrlMap.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *RegionUrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &UrlMap{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.regionUrlMaps.get", + // "parameterOrder": [ + // "project", + // "region", + // "urlMap" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "urlMap": { + // "description": "Name of the UrlMap resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/urlMaps/{urlMap}", + // "response": { + // "$ref": "UrlMap" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionUrlMaps.insert": + +type RegionUrlMapsInsertCall struct { + s *Service + project string + region string + urlmap *UrlMap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a UrlMap resource in the specified project using the +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) +func (r *RegionUrlMapsService) Insert(project string, region string, urlmap *UrlMap) *RegionUrlMapsInsertCall { + c := &RegionUrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.urlmap = urlmap + return c +} + +// RequestId sets the optional parameter "requestId": begin_interface: +// MixerMutationRequestBuilder Request ID to support idempotency. +func (c *RegionUrlMapsInsertCall) RequestId(requestId string) *RegionUrlMapsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionUrlMapsInsertCall) Fields(s ...googleapi.Field) *RegionUrlMapsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionUrlMapsInsertCall) Context(ctx context.Context) *RegionUrlMapsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionUrlMapsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionUrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/urlMaps") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionUrlMaps.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionUrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionUrlMaps.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/urlMaps", + // "request": { + // "$ref": "UrlMap" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionUrlMaps.list": + +type RegionUrlMapsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of UrlMap resources available to the +// specified project in the specified region. (== suppress_warning +// http-rest-shadowed ==) +func (r *RegionUrlMapsService) List(project string, region string) *RegionUrlMapsListCall { + c := &RegionUrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *RegionUrlMapsListCall) Filter(filter string) *RegionUrlMapsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *RegionUrlMapsListCall) MaxResults(maxResults int64) *RegionUrlMapsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *RegionUrlMapsListCall) OrderBy(orderBy string) *RegionUrlMapsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *RegionUrlMapsListCall) PageToken(pageToken string) *RegionUrlMapsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionUrlMapsListCall) Fields(s ...googleapi.Field) *RegionUrlMapsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionUrlMapsListCall) IfNoneMatch(entityTag string) *RegionUrlMapsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionUrlMapsListCall) Context(ctx context.Context) *RegionUrlMapsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionUrlMapsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionUrlMapsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/urlMaps") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionUrlMaps.list" call. +// Exactly one of *UrlMapList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *UrlMapList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionUrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &UrlMapList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of UrlMap resources available to the specified project in the specified region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.regionUrlMaps.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/urlMaps", + // "response": { + // "$ref": "UrlMapList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionUrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.regionUrlMaps.patch": + +type RegionUrlMapsPatchCall struct { + s *Service + project string + region string + urlMap string + urlmap *UrlMap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified UrlMap resource with the data included +// in the request. This method supports PATCH semantics and uses JSON +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) +func (r *RegionUrlMapsService) Patch(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsPatchCall { + c := &RegionUrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.urlMap = urlMap + c.urlmap = urlmap + return c +} + +// RequestId sets the optional parameter "requestId": begin_interface: +// MixerMutationRequestBuilder Request ID to support idempotency. +func (c *RegionUrlMapsPatchCall) RequestId(requestId string) *RegionUrlMapsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionUrlMapsPatchCall) Fields(s ...googleapi.Field) *RegionUrlMapsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionUrlMapsPatchCall) Context(ctx context.Context) *RegionUrlMapsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionUrlMapsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionUrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/urlMaps/{urlMap}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "urlMap": c.urlMap, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionUrlMaps.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionUrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PATCH", + // "id": "compute.regionUrlMaps.patch", + // "parameterOrder": [ + // "project", + // "region", + // "urlMap" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + // "location": "query", + // "type": "string" + // }, + // "urlMap": { + // "description": "Name of the UrlMap resource to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/urlMaps/{urlMap}", + // "request": { + // "$ref": "UrlMap" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionUrlMaps.update": + +type RegionUrlMapsUpdateCall struct { + s *Service + project string + region string + urlMap string + urlmap *UrlMap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the specified UrlMap resource with the data included +// in the request. (== suppress_warning http-rest-shadowed ==) +func (r *RegionUrlMapsService) Update(project string, region string, urlMap string, urlmap *UrlMap) *RegionUrlMapsUpdateCall { + c := &RegionUrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.urlMap = urlMap + c.urlmap = urlmap + return c +} + +// RequestId sets the optional parameter "requestId": begin_interface: +// MixerMutationRequestBuilder Request ID to support idempotency. +func (c *RegionUrlMapsUpdateCall) RequestId(requestId string) *RegionUrlMapsUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionUrlMapsUpdateCall) Fields(s ...googleapi.Field) *RegionUrlMapsUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionUrlMapsUpdateCall) Context(ctx context.Context) *RegionUrlMapsUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionUrlMapsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionUrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/urlMaps/{urlMap}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "urlMap": c.urlMap, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionUrlMaps.update" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionUrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "PUT", + // "id": "compute.regionUrlMaps.update", + // "parameterOrder": [ + // "project", + // "region", + // "urlMap" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.", + // "location": "query", + // "type": "string" + // }, + // "urlMap": { + // "description": "Name of the UrlMap resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/urlMaps/{urlMap}", + // "request": { + // "$ref": "UrlMap" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionUrlMaps.validate": + +type RegionUrlMapsValidateCall struct { + s *Service + project string + region string + urlMap string + regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Validate: Runs static validation for the UrlMap. In particular, the +// tests of the provided UrlMap will be run. Calling this method does +// NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==) +func (r *RegionUrlMapsService) Validate(project string, region string, urlMap string, regionurlmapsvalidaterequest *RegionUrlMapsValidateRequest) *RegionUrlMapsValidateCall { + c := &RegionUrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.urlMap = urlMap + c.regionurlmapsvalidaterequest = regionurlmapsvalidaterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionUrlMapsValidateCall) Fields(s ...googleapi.Field) *RegionUrlMapsValidateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionUrlMapsValidateCall) Context(ctx context.Context) *RegionUrlMapsValidateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionUrlMapsValidateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionUrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionurlmapsvalidaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/urlMaps/{urlMap}/validate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "urlMap": c.urlMap, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionUrlMaps.validate" call. +// Exactly one of *UrlMapsValidateResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *UrlMapsValidateResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionUrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &UrlMapsValidateResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.regionUrlMaps.validate", + // "parameterOrder": [ + // "project", + // "region", + // "urlMap" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "urlMap": { + // "description": "Name of the UrlMap resource to be validated as.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/urlMaps/{urlMap}/validate", + // "request": { + // "$ref": "RegionUrlMapsValidateRequest" + // }, + // "response": { + // "$ref": "UrlMapsValidateResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regions.get": type RegionsGetCall struct { @@ -86878,7 +101966,8 @@ type RegionsGetCall struct { } // Get: Returns the specified Region resource. Gets a list of available -// regions by making a list() request. +// regions by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regions/get func (r *RegionsService) Get(project string, region string) *RegionsGetCall { c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -86924,6 +102013,7 @@ func (c *RegionsGetCall) Header() http.Header { func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -86986,7 +102076,7 @@ func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) { } return ret, nil // { - // "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request.", + // "description": "Returns the specified Region resource. Gets a list of available regions by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regions.get", // "parameterOrder": [ @@ -87034,7 +102124,7 @@ type RegionsListCall struct { } // List: Retrieves the list of region resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/regions/list func (r *RegionsService) List(project string) *RegionsListCall { c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -87142,6 +102232,7 @@ func (c *RegionsListCall) Header() http.Header { func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87203,7 +102294,7 @@ func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) } return ret, nil // { - // "description": "Retrieves the list of region resources available to the specified project.", + // "description": "Retrieves the list of region resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.regions.list", // "parameterOrder": [ @@ -87275,6 +102366,3267 @@ func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) } } +// method id "compute.reservations.aggregatedList": + +type ReservationsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of reservations. (== +// suppress_warning http-rest-shadowed ==) +func (r *ReservationsService) AggregatedList(project string) *ReservationsAggregatedListCall { + c := &ReservationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *ReservationsAggregatedListCall) Filter(filter string) *ReservationsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *ReservationsAggregatedListCall) MaxResults(maxResults int64) *ReservationsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *ReservationsAggregatedListCall) OrderBy(orderBy string) *ReservationsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *ReservationsAggregatedListCall) PageToken(pageToken string) *ReservationsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsAggregatedListCall) Fields(s ...googleapi.Field) *ReservationsAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ReservationsAggregatedListCall) IfNoneMatch(entityTag string) *ReservationsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsAggregatedListCall) Context(ctx context.Context) *ReservationsAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/reservations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.aggregatedList" call. +// Exactly one of *ReservationAggregatedList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ReservationAggregatedList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ReservationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*ReservationAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ReservationAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of reservations. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.reservations.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/reservations", + // "response": { + // "$ref": "ReservationAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ReservationsAggregatedListCall) Pages(ctx context.Context, f func(*ReservationAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.reservations.delete": + +type ReservationsDeleteCall struct { + s *Service + project string + zone string + reservation string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified reservation. (== suppress_warning +// http-rest-shadowed ==) +func (r *ReservationsService) Delete(project string, zone string, reservation string) *ReservationsDeleteCall { + c := &ReservationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ReservationsDeleteCall) RequestId(requestId string) *ReservationsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsDeleteCall) Fields(s ...googleapi.Field) *ReservationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsDeleteCall) Context(ctx context.Context) *ReservationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{reservation}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified reservation. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.reservations.delete", + // "parameterOrder": [ + // "project", + // "zone", + // "reservation" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "reservation": { + // "description": "Name of the reservation to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{reservation}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.reservations.get": + +type ReservationsGetCall struct { + s *Service + project string + zone string + reservation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves information about the specified reservation. (== +// suppress_warning http-rest-shadowed ==) +func (r *ReservationsService) Get(project string, zone string, reservation string) *ReservationsGetCall { + c := &ReservationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsGetCall) Fields(s ...googleapi.Field) *ReservationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ReservationsGetCall) IfNoneMatch(entityTag string) *ReservationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsGetCall) Context(ctx context.Context) *ReservationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{reservation}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.get" call. +// Exactly one of *Reservation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Reservation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationsGetCall) Do(opts ...googleapi.CallOption) (*Reservation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Reservation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves information about the specified reservation. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.reservations.get", + // "parameterOrder": [ + // "project", + // "zone", + // "reservation" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "reservation": { + // "description": "Name of the reservation to retrieve.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{reservation}", + // "response": { + // "$ref": "Reservation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.reservations.getIamPolicy": + +type ReservationsGetIamPolicyCall struct { + s *Service + project string + zone string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) +func (r *ReservationsService) GetIamPolicy(project string, zone string, resource string) *ReservationsGetIamPolicyCall { + c := &ReservationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ReservationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ReservationsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsGetIamPolicyCall) Context(ctx context.Context) *ReservationsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ReservationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.reservations.getIamPolicy", + // "parameterOrder": [ + // "project", + // "zone", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.reservations.insert": + +type ReservationsInsertCall struct { + s *Service + project string + zone string + reservation *Reservation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new reservation. For more information, read +// Reserving zonal resources. (== suppress_warning http-rest-shadowed +// ==) +func (r *ReservationsService) Insert(project string, zone string, reservation *Reservation) *ReservationsInsertCall { + c := &ReservationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ReservationsInsertCall) RequestId(requestId string) *ReservationsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsInsertCall) Fields(s ...googleapi.Field) *ReservationsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsInsertCall) Context(ctx context.Context) *ReservationsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.reservation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new reservation. For more information, read Reserving zonal resources. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.reservations.insert", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations", + // "request": { + // "$ref": "Reservation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.reservations.list": + +type ReservationsListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: A list of all the reservations that have been configured for +// the specified project in specified zone. (== suppress_warning +// http-rest-shadowed ==) +func (r *ReservationsService) List(project string, zone string) *ReservationsListCall { + c := &ReservationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *ReservationsListCall) Filter(filter string) *ReservationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *ReservationsListCall) MaxResults(maxResults int64) *ReservationsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *ReservationsListCall) OrderBy(orderBy string) *ReservationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *ReservationsListCall) PageToken(pageToken string) *ReservationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsListCall) Fields(s ...googleapi.Field) *ReservationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ReservationsListCall) IfNoneMatch(entityTag string) *ReservationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsListCall) Context(ctx context.Context) *ReservationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.list" call. +// Exactly one of *ReservationList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ReservationList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ReservationsListCall) Do(opts ...googleapi.CallOption) (*ReservationList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ReservationList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "A list of all the reservations that have been configured for the specified project in specified zone. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.reservations.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations", + // "response": { + // "$ref": "ReservationList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ReservationsListCall) Pages(ctx context.Context, f func(*ReservationList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.reservations.resize": + +type ReservationsResizeCall struct { + s *Service + project string + zone string + reservation string + reservationsresizerequest *ReservationsResizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Resize: Resizes the reservation (applicable to standalone +// reservations only). For more information, read Modifying +// reservations. (== suppress_warning http-rest-shadowed ==) +func (r *ReservationsService) Resize(project string, zone string, reservation string, reservationsresizerequest *ReservationsResizeRequest) *ReservationsResizeCall { + c := &ReservationsResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + c.reservationsresizerequest = reservationsresizerequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ReservationsResizeCall) RequestId(requestId string) *ReservationsResizeCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsResizeCall) Fields(s ...googleapi.Field) *ReservationsResizeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsResizeCall) Context(ctx context.Context) *ReservationsResizeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsResizeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsResizeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.reservationsresizerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{reservation}/resize") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.resize" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ReservationsResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.reservations.resize", + // "parameterOrder": [ + // "project", + // "zone", + // "reservation" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "reservation": { + // "description": "Name of the reservation to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{reservation}/resize", + // "request": { + // "$ref": "ReservationsResizeRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.reservations.setIamPolicy": + +type ReservationsSetIamPolicyCall struct { + s *Service + project string + zone string + resource string + zonesetpolicyrequest *ZoneSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) +func (r *ReservationsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *ReservationsSetIamPolicyCall { + c := &ReservationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + c.zonesetpolicyrequest = zonesetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ReservationsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsSetIamPolicyCall) Context(ctx context.Context) *ReservationsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ReservationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.reservations.setIamPolicy", + // "parameterOrder": [ + // "project", + // "zone", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{resource}/setIamPolicy", + // "request": { + // "$ref": "ZoneSetPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.reservations.testIamPermissions": + +type ReservationsTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. (== suppress_warning http-rest-shadowed ==) +func (r *ReservationsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *ReservationsTestIamPermissionsCall { + c := &ReservationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ReservationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ReservationsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ReservationsTestIamPermissionsCall) Context(ctx context.Context) *ReservationsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ReservationsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/reservations/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ReservationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.reservations.testIamPermissions", + // "parameterOrder": [ + // "project", + // "zone", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/reservations/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.resourcePolicies.aggregatedList": + +type ResourcePoliciesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of resource policies. +// (== suppress_warning http-rest-shadowed ==) +func (r *ResourcePoliciesService) AggregatedList(project string) *ResourcePoliciesAggregatedListCall { + c := &ResourcePoliciesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *ResourcePoliciesAggregatedListCall) Filter(filter string) *ResourcePoliciesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *ResourcePoliciesAggregatedListCall) MaxResults(maxResults int64) *ResourcePoliciesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *ResourcePoliciesAggregatedListCall) OrderBy(orderBy string) *ResourcePoliciesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *ResourcePoliciesAggregatedListCall) PageToken(pageToken string) *ResourcePoliciesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcePoliciesAggregatedListCall) Fields(s ...googleapi.Field) *ResourcePoliciesAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ResourcePoliciesAggregatedListCall) IfNoneMatch(entityTag string) *ResourcePoliciesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcePoliciesAggregatedListCall) Context(ctx context.Context) *ResourcePoliciesAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcePoliciesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/resourcePolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.aggregatedList" call. +// Exactly one of *ResourcePolicyAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ResourcePolicyAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ResourcePoliciesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ResourcePolicyAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ResourcePolicyAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of resource policies. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.resourcePolicies.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/resourcePolicies", + // "response": { + // "$ref": "ResourcePolicyAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ResourcePoliciesAggregatedListCall) Pages(ctx context.Context, f func(*ResourcePolicyAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.resourcePolicies.delete": + +type ResourcePoliciesDeleteCall struct { + s *Service + project string + region string + resourcePolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified resource policy. (== suppress_warning +// http-rest-shadowed ==) +func (r *ResourcePoliciesService) Delete(project string, region string, resourcePolicy string) *ResourcePoliciesDeleteCall { + c := &ResourcePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resourcePolicy = resourcePolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ResourcePoliciesDeleteCall) RequestId(requestId string) *ResourcePoliciesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResourcePoliciesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcePoliciesDeleteCall) Context(ctx context.Context) *ResourcePoliciesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcePoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/resourcePolicies/{resourcePolicy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resourcePolicy": c.resourcePolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ResourcePoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified resource policy. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.resourcePolicies.delete", + // "parameterOrder": [ + // "project", + // "region", + // "resourcePolicy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "resourcePolicy": { + // "description": "Name of the resource policy to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/resourcePolicies/{resourcePolicy}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.resourcePolicies.get": + +type ResourcePoliciesGetCall struct { + s *Service + project string + region string + resourcePolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves all information of the specified resource policy. (== +// suppress_warning http-rest-shadowed ==) +func (r *ResourcePoliciesService) Get(project string, region string, resourcePolicy string) *ResourcePoliciesGetCall { + c := &ResourcePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resourcePolicy = resourcePolicy + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcePoliciesGetCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ResourcePoliciesGetCall) IfNoneMatch(entityTag string) *ResourcePoliciesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcePoliciesGetCall) Context(ctx context.Context) *ResourcePoliciesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcePoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/resourcePolicies/{resourcePolicy}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resourcePolicy": c.resourcePolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.get" call. +// Exactly one of *ResourcePolicy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *ResourcePolicy.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ResourcePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResourcePolicy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ResourcePolicy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves all information of the specified resource policy. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.resourcePolicies.get", + // "parameterOrder": [ + // "project", + // "region", + // "resourcePolicy" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resourcePolicy": { + // "description": "Name of the resource policy to retrieve.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/resourcePolicies/{resourcePolicy}", + // "response": { + // "$ref": "ResourcePolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.resourcePolicies.getIamPolicy": + +type ResourcePoliciesGetIamPolicyCall struct { + s *Service + project string + region string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) +func (r *ResourcePoliciesService) GetIamPolicy(project string, region string, resource string) *ResourcePoliciesGetIamPolicyCall { + c := &ResourcePoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcePoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ResourcePoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ResourcePoliciesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcePoliciesGetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcePoliciesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ResourcePoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.resourcePolicies.getIamPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/resourcePolicies/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.resourcePolicies.insert": + +type ResourcePoliciesInsertCall struct { + s *Service + project string + region string + resourcepolicy *ResourcePolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new resource policy. (== suppress_warning +// http-rest-shadowed ==) +func (r *ResourcePoliciesService) Insert(project string, region string, resourcepolicy *ResourcePolicy) *ResourcePoliciesInsertCall { + c := &ResourcePoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resourcepolicy = resourcepolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *ResourcePoliciesInsertCall) RequestId(requestId string) *ResourcePoliciesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcePoliciesInsertCall) Fields(s ...googleapi.Field) *ResourcePoliciesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcePoliciesInsertCall) Context(ctx context.Context) *ResourcePoliciesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcePoliciesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcepolicy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/resourcePolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ResourcePoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new resource policy. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.resourcePolicies.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/resourcePolicies", + // "request": { + // "$ref": "ResourcePolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.resourcePolicies.list": + +type ResourcePoliciesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: A list all the resource policies that have been configured for +// the specified project in specified region. (== suppress_warning +// http-rest-shadowed ==) +func (r *ResourcePoliciesService) List(project string, region string) *ResourcePoliciesListCall { + c := &ResourcePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *ResourcePoliciesListCall) Filter(filter string) *ResourcePoliciesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *ResourcePoliciesListCall) MaxResults(maxResults int64) *ResourcePoliciesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *ResourcePoliciesListCall) OrderBy(orderBy string) *ResourcePoliciesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *ResourcePoliciesListCall) PageToken(pageToken string) *ResourcePoliciesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcePoliciesListCall) Fields(s ...googleapi.Field) *ResourcePoliciesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ResourcePoliciesListCall) IfNoneMatch(entityTag string) *ResourcePoliciesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcePoliciesListCall) Context(ctx context.Context) *ResourcePoliciesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcePoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/resourcePolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.list" call. +// Exactly one of *ResourcePolicyList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ResourcePolicyList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ResourcePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResourcePolicyList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ResourcePolicyList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "A list all the resource policies that have been configured for the specified project in specified region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.resourcePolicies.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/resourcePolicies", + // "response": { + // "$ref": "ResourcePolicyList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ResourcePoliciesListCall) Pages(ctx context.Context, f func(*ResourcePolicyList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.resourcePolicies.setIamPolicy": + +type ResourcePoliciesSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) +func (r *ResourcePoliciesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *ResourcePoliciesSetIamPolicyCall { + c := &ResourcePoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcePoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ResourcePoliciesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcePoliciesSetIamPolicyCall) Context(ctx context.Context) *ResourcePoliciesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcePoliciesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ResourcePoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.resourcePolicies.setIamPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/resourcePolicies/{resource}/setIamPolicy", + // "request": { + // "$ref": "RegionSetPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.resourcePolicies.testIamPermissions": + +type ResourcePoliciesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. (== suppress_warning http-rest-shadowed ==) +func (r *ResourcePoliciesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ResourcePoliciesTestIamPermissionsCall { + c := &ResourcePoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcePoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ResourcePoliciesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcePoliciesTestIamPermissionsCall) Context(ctx context.Context) *ResourcePoliciesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcePoliciesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ResourcePoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.resourcePolicies.testIamPermissions", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/resourcePolicies/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.routers.aggregatedList": type RoutersAggregatedListCall struct { @@ -87286,7 +105638,8 @@ type RoutersAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of routers. +// AggregatedList: Retrieves an aggregated list of routers. (== +// suppress_warning http-rest-shadowed ==) func (r *RoutersService) AggregatedList(project string) *RoutersAggregatedListCall { c := &RoutersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87393,6 +105746,7 @@ func (c *RoutersAggregatedListCall) Header() http.Header { func (c *RoutersAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87454,7 +105808,7 @@ func (c *RoutersAggregatedListCall) Do(opts ...googleapi.CallOption) (*RouterAgg } return ret, nil // { - // "description": "Retrieves an aggregated list of routers.", + // "description": "Retrieves an aggregated list of routers. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.aggregatedList", // "parameterOrder": [ @@ -87538,7 +105892,8 @@ type RoutersDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified Router resource. +// Delete: Deletes the specified Router resource. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Delete(project string, region string, router string) *RoutersDeleteCall { c := &RoutersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87593,6 +105948,7 @@ func (c *RoutersDeleteCall) Header() http.Header { func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87653,7 +106009,7 @@ func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified Router resource.", + // "description": "Deletes the specified Router resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.routers.delete", // "parameterOrder": [ @@ -87715,7 +106071,8 @@ type RoutersGetCall struct { } // Get: Returns the specified Router resource. Gets a list of available -// routers by making a list() request. +// routers by making a list() request. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Get(project string, region string, router string) *RoutersGetCall { c := &RoutersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87761,6 +106118,7 @@ func (c *RoutersGetCall) Header() http.Header { func (c *RoutersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -87824,7 +106182,7 @@ func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) { } return ret, nil // { - // "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request.", + // "description": "Returns the specified Router resource. Gets a list of available routers by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.get", // "parameterOrder": [ @@ -87882,7 +106240,7 @@ type RoutersGetNatMappingInfoCall struct { } // GetNatMappingInfo: Retrieves runtime Nat mapping information of VM -// endpoints. +// endpoints. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) GetNatMappingInfo(project string, region string, router string) *RoutersGetNatMappingInfoCall { c := &RoutersGetNatMappingInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -87991,6 +106349,7 @@ func (c *RoutersGetNatMappingInfoCall) Header() http.Header { func (c *RoutersGetNatMappingInfoCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88054,7 +106413,7 @@ func (c *RoutersGetNatMappingInfoCall) Do(opts ...googleapi.CallOption) (*VmEndp } return ret, nil // { - // "description": "Retrieves runtime Nat mapping information of VM endpoints.", + // "description": "Retrieves runtime Nat mapping information of VM endpoints. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.getNatMappingInfo", // "parameterOrder": [ @@ -88156,7 +106515,7 @@ type RoutersGetRouterStatusCall struct { } // GetRouterStatus: Retrieves runtime information of the specified -// router. +// router. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) GetRouterStatus(project string, region string, router string) *RoutersGetRouterStatusCall { c := &RoutersGetRouterStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88202,6 +106561,7 @@ func (c *RoutersGetRouterStatusCall) Header() http.Header { func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88265,7 +106625,7 @@ func (c *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterSt } return ret, nil // { - // "description": "Retrieves runtime information of the specified router.", + // "description": "Retrieves runtime information of the specified router. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.getRouterStatus", // "parameterOrder": [ @@ -88322,7 +106682,8 @@ type RoutersInsertCall struct { } // Insert: Creates a Router resource in the specified project and region -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Insert(project string, region string, router *Router) *RoutersInsertCall { c := &RoutersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88377,6 +106738,7 @@ func (c *RoutersInsertCall) Header() http.Header { func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88441,7 +106803,7 @@ func (c *RoutersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates a Router resource in the specified project and region using the data included in the request.", + // "description": "Creates a Router resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routers.insert", // "parameterOrder": [ @@ -88497,7 +106859,7 @@ type RoutersListCall struct { } // List: Retrieves a list of Router resources available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) List(project string, region string) *RoutersListCall { c := &RoutersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88605,6 +106967,7 @@ func (c *RoutersListCall) Header() http.Header { func (c *RoutersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88667,7 +107030,7 @@ func (c *RoutersListCall) Do(opts ...googleapi.CallOption) (*RouterList, error) } return ret, nil // { - // "description": "Retrieves a list of Router resources available to the specified project.", + // "description": "Retrieves a list of Router resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routers.list", // "parameterOrder": [ @@ -88762,7 +107125,8 @@ type RoutersPatchCall struct { // Patch: Patches the specified Router resource with the data included // in the request. This method supports PATCH semantics and uses JSON -// merge patch format and processing rules. +// merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall { c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88818,6 +107182,7 @@ func (c *RoutersPatchCall) Header() http.Header { func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -88883,7 +107248,7 @@ func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + // "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.routers.patch", // "parameterOrder": [ @@ -88949,7 +107314,7 @@ type RoutersPreviewCall struct { // Preview: Preview fields auto-generated during router create and // update operations. Calling this method does NOT create or update the -// router. +// router. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) Preview(project string, region string, router string, router2 *Router) *RoutersPreviewCall { c := &RoutersPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -88986,6 +107351,7 @@ func (c *RoutersPreviewCall) Header() http.Header { func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89051,7 +107417,7 @@ func (c *RoutersPreviewCall) Do(opts ...googleapi.CallOption) (*RoutersPreviewRe } return ret, nil // { - // "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", + // "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routers.preview", // "parameterOrder": [ @@ -89112,7 +107478,10 @@ type RoutersUpdateCall struct { } // Update: Updates the specified Router resource with the data included -// in the request. +// in the request. This method conforms to PUT semantics, which requests +// that the state of the target resource be created or replaced with the +// state defined by the representation enclosed in the request message +// payload. (== suppress_warning http-rest-shadowed ==) func (r *RoutersService) Update(project string, region string, router string, router2 *Router) *RoutersUpdateCall { c := &RoutersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -89168,6 +107537,7 @@ func (c *RoutersUpdateCall) Header() http.Header { func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89233,7 +107603,7 @@ func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Updates the specified Router resource with the data included in the request.", + // "description": "Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.routers.update", // "parameterOrder": [ @@ -89295,7 +107665,8 @@ type RoutesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified Route resource. +// Delete: Deletes the specified Route resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/delete func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -89350,6 +107721,7 @@ func (c *RoutesDeleteCall) Header() http.Header { func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89409,7 +107781,7 @@ func (c *RoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified Route resource.", + // "description": "Deletes the specified Route resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.routes.delete", // "parameterOrder": [ @@ -89462,7 +107834,8 @@ type RoutesGetCall struct { } // Get: Returns the specified Route resource. Gets a list of available -// routes by making a list() request. +// routes by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/get func (r *RoutesService) Get(project string, route string) *RoutesGetCall { c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -89508,6 +107881,7 @@ func (c *RoutesGetCall) Header() http.Header { func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89570,7 +107944,7 @@ func (c *RoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) { } return ret, nil // { - // "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request.", + // "description": "Returns the specified Route resource. Gets a list of available routes by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routes.get", // "parameterOrder": [ @@ -89618,7 +107992,8 @@ type RoutesInsertCall struct { } // Insert: Creates a Route resource in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/insert func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { c := &RoutesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -89673,6 +108048,7 @@ func (c *RoutesInsertCall) Header() http.Header { func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89736,7 +108112,7 @@ func (c *RoutesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates a Route resource in the specified project using the data included in the request.", + // "description": "Creates a Route resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.routes.insert", // "parameterOrder": [ @@ -89783,7 +108159,7 @@ type RoutesListCall struct { } // List: Retrieves the list of Route resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/list func (r *RoutesService) List(project string) *RoutesListCall { c := &RoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -89891,6 +108267,7 @@ func (c *RoutesListCall) Header() http.Header { func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -89952,7 +108329,7 @@ func (c *RoutesListCall) Do(opts ...googleapi.CallOption) (*RouteList, error) { } return ret, nil // { - // "description": "Retrieves the list of Route resources available to the specified project.", + // "description": "Retrieves the list of Route resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.routes.list", // "parameterOrder": [ @@ -90036,7 +108413,8 @@ type SecurityPoliciesAddRuleCall struct { header_ http.Header } -// AddRule: Inserts a rule into a security policy. +// AddRule: Inserts a rule into a security policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SecurityPoliciesService) AddRule(project string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *SecurityPoliciesAddRuleCall { c := &SecurityPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90072,6 +108450,7 @@ func (c *SecurityPoliciesAddRuleCall) Header() http.Header { func (c *SecurityPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90136,7 +108515,7 @@ func (c *SecurityPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Inserts a rule into a security policy.", + // "description": "Inserts a rule into a security policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.addRule", // "parameterOrder": [ @@ -90185,7 +108564,8 @@ type SecurityPoliciesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified policy. +// Delete: Deletes the specified policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SecurityPoliciesService) Delete(project string, securityPolicy string) *SecurityPoliciesDeleteCall { c := &SecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90239,6 +108619,7 @@ func (c *SecurityPoliciesDeleteCall) Header() http.Header { func (c *SecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90298,7 +108679,7 @@ func (c *SecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified policy.", + // "description": "Deletes the specified policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.securityPolicies.delete", // "parameterOrder": [ @@ -90351,7 +108732,7 @@ type SecurityPoliciesGetCall struct { } // Get: List all of the ordered rules present in a single specified -// policy. +// policy. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) Get(project string, securityPolicy string) *SecurityPoliciesGetCall { c := &SecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90396,6 +108777,7 @@ func (c *SecurityPoliciesGetCall) Header() http.Header { func (c *SecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90458,7 +108840,7 @@ func (c *SecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPol } return ret, nil // { - // "description": "List all of the ordered rules present in a single specified policy.", + // "description": "List all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.securityPolicies.get", // "parameterOrder": [ @@ -90506,7 +108888,8 @@ type SecurityPoliciesGetRuleCall struct { header_ http.Header } -// GetRule: Gets a rule at the specified priority. +// GetRule: Gets a rule at the specified priority. (== suppress_warning +// http-rest-shadowed ==) func (r *SecurityPoliciesService) GetRule(project string, securityPolicy string) *SecurityPoliciesGetRuleCall { c := &SecurityPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90558,6 +108941,7 @@ func (c *SecurityPoliciesGetRuleCall) Header() http.Header { func (c *SecurityPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90620,7 +109004,7 @@ func (c *SecurityPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*Securit } return ret, nil // { - // "description": "Gets a rule at the specified priority.", + // "description": "Gets a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.securityPolicies.getRule", // "parameterOrder": [ @@ -90674,7 +109058,7 @@ type SecurityPoliciesInsertCall struct { } // Insert: Creates a new policy in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) Insert(project string, securitypolicy *SecurityPolicy) *SecurityPoliciesInsertCall { c := &SecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90728,6 +109112,7 @@ func (c *SecurityPoliciesInsertCall) Header() http.Header { func (c *SecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -90791,7 +109176,7 @@ func (c *SecurityPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a new policy in the specified project using the data included in the request.", + // "description": "Creates a new policy in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.insert", // "parameterOrder": [ @@ -90838,7 +109223,7 @@ type SecurityPoliciesListCall struct { } // List: List all the policies that have been configured for the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) List(project string) *SecurityPoliciesListCall { c := &SecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -90945,6 +109330,7 @@ func (c *SecurityPoliciesListCall) Header() http.Header { func (c *SecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91006,7 +109392,7 @@ func (c *SecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPo } return ret, nil // { - // "description": "List all the policies that have been configured for the specified project.", + // "description": "List all the policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.securityPolicies.list", // "parameterOrder": [ @@ -91091,7 +109477,7 @@ type SecurityPoliciesPatchCall struct { } // Patch: Patches the specified policy with the data included in the -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) Patch(project string, securityPolicy string, securitypolicy *SecurityPolicy) *SecurityPoliciesPatchCall { c := &SecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91146,6 +109532,7 @@ func (c *SecurityPoliciesPatchCall) Header() http.Header { func (c *SecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91210,7 +109597,7 @@ func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request.", + // "description": "Patches the specified policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.securityPolicies.patch", // "parameterOrder": [ @@ -91265,7 +109652,8 @@ type SecurityPoliciesPatchRuleCall struct { header_ http.Header } -// PatchRule: Patches a rule at the specified priority. +// PatchRule: Patches a rule at the specified priority. (== +// suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) PatchRule(project string, securityPolicy string, securitypolicyrule *SecurityPolicyRule) *SecurityPoliciesPatchRuleCall { c := &SecurityPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91308,6 +109696,7 @@ func (c *SecurityPoliciesPatchRuleCall) Header() http.Header { func (c *SecurityPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91372,7 +109761,7 @@ func (c *SecurityPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Patches a rule at the specified priority.", + // "description": "Patches a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.patchRule", // "parameterOrder": [ @@ -91427,7 +109816,8 @@ type SecurityPoliciesRemoveRuleCall struct { header_ http.Header } -// RemoveRule: Deletes a rule at the specified priority. +// RemoveRule: Deletes a rule at the specified priority. (== +// suppress_warning http-rest-shadowed ==) func (r *SecurityPoliciesService) RemoveRule(project string, securityPolicy string) *SecurityPoliciesRemoveRuleCall { c := &SecurityPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91469,6 +109859,7 @@ func (c *SecurityPoliciesRemoveRuleCall) Header() http.Header { func (c *SecurityPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91528,7 +109919,7 @@ func (c *SecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Deletes a rule at the specified priority.", + // "description": "Deletes a rule at the specified priority. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.securityPolicies.removeRule", // "parameterOrder": [ @@ -91586,7 +109977,8 @@ type SnapshotsDeleteCall struct { // deletion is needed for subsequent snapshots, the data will be moved // to the next corresponding snapshot. // -// For more information, see Deleting snapshots. +// For more information, see Deleting snapshots. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall { c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -91641,6 +110033,7 @@ func (c *SnapshotsDeleteCall) Header() http.Header { func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91700,7 +110093,7 @@ func (c *SnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro } return ret, nil // { - // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots.", + // "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snapshots. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.snapshots.delete", // "parameterOrder": [ @@ -91753,7 +110146,8 @@ type SnapshotsGetCall struct { } // Get: Returns the specified Snapshot resource. Gets a list of -// available snapshots by making a list() request. +// available snapshots by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/get func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall { c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -91799,6 +110193,7 @@ func (c *SnapshotsGetCall) Header() http.Header { func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -91861,7 +110256,7 @@ func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { } return ret, nil // { - // "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.", + // "description": "Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.snapshots.get", // "parameterOrder": [ @@ -91910,7 +110305,8 @@ type SnapshotsGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *SnapshotsService) GetIamPolicy(project string, resource string) *SnapshotsGetIamPolicyCall { c := &SnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -91955,6 +110351,7 @@ func (c *SnapshotsGetIamPolicyCall) Header() http.Header { func (c *SnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92017,7 +110414,7 @@ func (c *SnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.snapshots.getIamPolicy", // "parameterOrder": [ @@ -92065,7 +110462,7 @@ type SnapshotsListCall struct { } // List: Retrieves the list of Snapshot resources contained within the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/list func (r *SnapshotsService) List(project string) *SnapshotsListCall { c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -92173,6 +110570,7 @@ func (c *SnapshotsListCall) Header() http.Header { func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92234,7 +110632,7 @@ func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, err } return ret, nil // { - // "description": "Retrieves the list of Snapshot resources contained within the specified project.", + // "description": "Retrieves the list of Snapshot resources contained within the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.snapshots.list", // "parameterOrder": [ @@ -92319,7 +110717,8 @@ type SnapshotsSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SnapshotsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *SnapshotsSetIamPolicyCall { c := &SnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92355,6 +110754,7 @@ func (c *SnapshotsSetIamPolicyCall) Header() http.Header { func (c *SnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92419,7 +110819,7 @@ func (c *SnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.snapshots.setIamPolicy", // "parameterOrder": [ @@ -92470,7 +110870,8 @@ type SnapshotsSetLabelsCall struct { } // SetLabels: Sets the labels on a snapshot. To learn more about labels, -// read the Labeling Resources documentation. +// read the Labeling Resources documentation. (== suppress_warning +// http-rest-shadowed ==) func (r *SnapshotsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SnapshotsSetLabelsCall { c := &SnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92506,6 +110907,7 @@ func (c *SnapshotsSetLabelsCall) Header() http.Header { func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92570,7 +110972,7 @@ func (c *SnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } return ret, nil // { - // "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.", + // "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.snapshots.setLabels", // "parameterOrder": [ @@ -92621,7 +111023,7 @@ type SnapshotsTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SnapshotsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SnapshotsTestIamPermissionsCall { c := &SnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92657,6 +111059,7 @@ func (c *SnapshotsTestIamPermissionsCall) Header() http.Header { func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92721,7 +111124,7 @@ func (c *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.snapshots.testIamPermissions", // "parameterOrder": [ @@ -92760,6 +111163,260 @@ func (c *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } +// method id "compute.sslCertificates.aggregatedList": + +type SslCertificatesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of all SslCertificate resources, +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) +func (r *SslCertificatesService) AggregatedList(project string) *SslCertificatesAggregatedListCall { + c := &SslCertificatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *SslCertificatesAggregatedListCall) Filter(filter string) *SslCertificatesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *SslCertificatesAggregatedListCall) MaxResults(maxResults int64) *SslCertificatesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *SslCertificatesAggregatedListCall) OrderBy(orderBy string) *SslCertificatesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *SslCertificatesAggregatedListCall) PageToken(pageToken string) *SslCertificatesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SslCertificatesAggregatedListCall) Fields(s ...googleapi.Field) *SslCertificatesAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SslCertificatesAggregatedListCall) IfNoneMatch(entityTag string) *SslCertificatesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SslCertificatesAggregatedListCall) Context(ctx context.Context) *SslCertificatesAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SslCertificatesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SslCertificatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/sslCertificates") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.sslCertificates.aggregatedList" call. +// Exactly one of *SslCertificateAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *SslCertificateAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *SslCertificatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*SslCertificateAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SslCertificateAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of all SslCertificate resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.sslCertificates.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/sslCertificates", + // "response": { + // "$ref": "SslCertificateAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *SslCertificatesAggregatedListCall) Pages(ctx context.Context, f func(*SslCertificateAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.sslCertificates.delete": type SslCertificatesDeleteCall struct { @@ -92771,7 +111428,8 @@ type SslCertificatesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified SslCertificate resource. +// Delete: Deletes the specified SslCertificate resource. (== +// suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) Delete(project string, sslCertificate string) *SslCertificatesDeleteCall { c := &SslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92825,6 +111483,7 @@ func (c *SslCertificatesDeleteCall) Header() http.Header { func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -92884,7 +111543,7 @@ func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified SslCertificate resource.", + // "description": "Deletes the specified SslCertificate resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.sslCertificates.delete", // "parameterOrder": [ @@ -92937,7 +111596,8 @@ type SslCertificatesGetCall struct { } // Get: Returns the specified SslCertificate resource. Gets a list of -// available SSL certificates by making a list() request. +// available SSL certificates by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall { c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -92982,6 +111642,7 @@ func (c *SslCertificatesGetCall) Header() http.Header { func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93044,7 +111705,7 @@ func (c *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertifica } return ret, nil // { - // "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request.", + // "description": "Returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslCertificates.get", // "parameterOrder": [ @@ -93092,7 +111753,8 @@ type SslCertificatesInsertCall struct { } // Insert: Creates a SslCertificate resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCertificate) *SslCertificatesInsertCall { c := &SslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93146,6 +111808,7 @@ func (c *SslCertificatesInsertCall) Header() http.Header { func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93209,7 +111872,7 @@ func (c *SslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a SslCertificate resource in the specified project using the data included in the request.", + // "description": "Creates a SslCertificate resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.sslCertificates.insert", // "parameterOrder": [ @@ -93256,7 +111919,7 @@ type SslCertificatesListCall struct { } // List: Retrieves the list of SslCertificate resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *SslCertificatesService) List(project string) *SslCertificatesListCall { c := &SslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93363,6 +112026,7 @@ func (c *SslCertificatesListCall) Header() http.Header { func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93424,7 +112088,7 @@ func (c *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertific } return ret, nil // { - // "description": "Retrieves the list of SslCertificate resources available to the specified project.", + // "description": "Retrieves the list of SslCertificate resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslCertificates.list", // "parameterOrder": [ @@ -93509,7 +112173,7 @@ type SslPoliciesDeleteCall struct { // Delete: Deletes the specified SSL policy. The SSL policy resource can // be deleted only if it is not in use by any TargetHttpsProxy or -// TargetSslProxy resources. +// TargetSslProxy resources. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Delete(project string, sslPolicy string) *SslPoliciesDeleteCall { c := &SslPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93563,6 +112227,7 @@ func (c *SslPoliciesDeleteCall) Header() http.Header { func (c *SslPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93622,7 +112287,7 @@ func (c *SslPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.", + // "description": "Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.sslPolicies.delete", // "parameterOrder": [ @@ -93674,7 +112339,7 @@ type SslPoliciesGetCall struct { } // Get: Lists all of the ordered rules present in a single specified -// policy. +// policy. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Get(project string, sslPolicy string) *SslPoliciesGetCall { c := &SslPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93719,6 +112384,7 @@ func (c *SslPoliciesGetCall) Header() http.Header { func (c *SslPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93781,7 +112447,7 @@ func (c *SslPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SslPolicy, error } return ret, nil // { - // "description": "Lists all of the ordered rules present in a single specified policy.", + // "description": "Lists all of the ordered rules present in a single specified policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslPolicies.get", // "parameterOrder": [ @@ -93828,7 +112494,8 @@ type SslPoliciesInsertCall struct { } // Insert: Returns the specified SSL policy resource. Gets a list of -// available SSL policies by making a list() request. +// available SSL policies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Insert(project string, sslpolicy *SslPolicy) *SslPoliciesInsertCall { c := &SslPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -93882,6 +112549,7 @@ func (c *SslPoliciesInsertCall) Header() http.Header { func (c *SslPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -93945,7 +112613,7 @@ func (c *SslPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request.", + // "description": "Returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.sslPolicies.insert", // "parameterOrder": [ @@ -93992,7 +112660,7 @@ type SslPoliciesListCall struct { } // List: Lists all the SSL policies that have been configured for the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) List(project string) *SslPoliciesListCall { c := &SslPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94099,6 +112767,7 @@ func (c *SslPoliciesListCall) Header() http.Header { func (c *SslPoliciesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94160,7 +112829,7 @@ func (c *SslPoliciesListCall) Do(opts ...googleapi.CallOption) (*SslPoliciesList } return ret, nil // { - // "description": "Lists all the SSL policies that have been configured for the specified project.", + // "description": "Lists all the SSL policies that have been configured for the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslPolicies.list", // "parameterOrder": [ @@ -94244,7 +112913,8 @@ type SslPoliciesListAvailableFeaturesCall struct { } // ListAvailableFeatures: Lists all features that can be specified in -// the SSL policy when using custom profile. +// the SSL policy when using custom profile. (== suppress_warning +// http-rest-shadowed ==) func (r *SslPoliciesService) ListAvailableFeatures(project string) *SslPoliciesListAvailableFeaturesCall { c := &SslPoliciesListAvailableFeaturesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94351,6 +113021,7 @@ func (c *SslPoliciesListAvailableFeaturesCall) Header() http.Header { func (c *SslPoliciesListAvailableFeaturesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94414,7 +113085,7 @@ func (c *SslPoliciesListAvailableFeaturesCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists all features that can be specified in the SSL policy when using custom profile.", + // "description": "Lists all features that can be specified in the SSL policy when using custom profile. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.sslPolicies.listAvailableFeatures", // "parameterOrder": [ @@ -94478,7 +113149,7 @@ type SslPoliciesPatchCall struct { } // Patch: Patches the specified SSL policy with the data included in the -// request. +// request. (== suppress_warning http-rest-shadowed ==) func (r *SslPoliciesService) Patch(project string, sslPolicy string, sslpolicy *SslPolicy) *SslPoliciesPatchCall { c := &SslPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94533,6 +113204,7 @@ func (c *SslPoliciesPatchCall) Header() http.Header { func (c *SslPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94597,7 +113269,7 @@ func (c *SslPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Patches the specified SSL policy with the data included in the request.", + // "description": "Patches the specified SSL policy with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.sslPolicies.patch", // "parameterOrder": [ @@ -94650,7 +113322,8 @@ type SubnetworksAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of subnetworks. +// AggregatedList: Retrieves an aggregated list of subnetworks. (== +// suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) AggregatedList(project string) *SubnetworksAggregatedListCall { c := &SubnetworksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94757,6 +113430,7 @@ func (c *SubnetworksAggregatedListCall) Header() http.Header { func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -94818,7 +113492,7 @@ func (c *SubnetworksAggregatedListCall) Do(opts ...googleapi.CallOption) (*Subne } return ret, nil // { - // "description": "Retrieves an aggregated list of subnetworks.", + // "description": "Retrieves an aggregated list of subnetworks. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.aggregatedList", // "parameterOrder": [ @@ -94902,7 +113576,8 @@ type SubnetworksDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified subnetwork. +// Delete: Deletes the specified subnetwork. (== suppress_warning +// http-rest-shadowed ==) func (r *SubnetworksService) Delete(project string, region string, subnetwork string) *SubnetworksDeleteCall { c := &SubnetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -94957,6 +113632,7 @@ func (c *SubnetworksDeleteCall) Header() http.Header { func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95017,7 +113693,7 @@ func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified subnetwork.", + // "description": "Deletes the specified subnetwork. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.subnetworks.delete", // "parameterOrder": [ @@ -95079,7 +113755,7 @@ type SubnetworksExpandIpCidrRangeCall struct { } // ExpandIpCidrRange: Expands the IP CIDR range of the subnetwork to a -// specified value. +// specified value. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) ExpandIpCidrRange(project string, region string, subnetwork string, subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest) *SubnetworksExpandIpCidrRangeCall { c := &SubnetworksExpandIpCidrRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95135,6 +113811,7 @@ func (c *SubnetworksExpandIpCidrRangeCall) Header() http.Header { func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95200,7 +113877,7 @@ func (c *SubnetworksExpandIpCidrRangeCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Expands the IP CIDR range of the subnetwork to a specified value.", + // "description": "Expands the IP CIDR range of the subnetwork to a specified value. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.expandIpCidrRange", // "parameterOrder": [ @@ -95265,7 +113942,8 @@ type SubnetworksGetCall struct { } // Get: Returns the specified subnetwork. Gets a list of available -// subnetworks list() request. +// subnetworks list() request. (== suppress_warning http-rest-shadowed +// ==) func (r *SubnetworksService) Get(project string, region string, subnetwork string) *SubnetworksGetCall { c := &SubnetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95311,6 +113989,7 @@ func (c *SubnetworksGetCall) Header() http.Header { func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95374,7 +114053,7 @@ func (c *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, erro } return ret, nil // { - // "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request.", + // "description": "Returns the specified subnetwork. Gets a list of available subnetworks list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.get", // "parameterOrder": [ @@ -95432,7 +114111,8 @@ type SubnetworksGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be -// empty if no such policy or resource exists. +// empty if no such policy or resource exists. (== suppress_warning +// http-rest-shadowed ==) func (r *SubnetworksService) GetIamPolicy(project string, region string, resource string) *SubnetworksGetIamPolicyCall { c := &SubnetworksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95478,6 +114158,7 @@ func (c *SubnetworksGetIamPolicyCall) Header() http.Header { func (c *SubnetworksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95541,7 +114222,7 @@ func (c *SubnetworksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.getIamPolicy", // "parameterOrder": [ @@ -95598,7 +114279,7 @@ type SubnetworksInsertCall struct { } // Insert: Creates a subnetwork in the specified project using the data -// included in the request. +// included in the request. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) Insert(project string, region string, subnetwork *Subnetwork) *SubnetworksInsertCall { c := &SubnetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95653,6 +114334,7 @@ func (c *SubnetworksInsertCall) Header() http.Header { func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95717,7 +114399,7 @@ func (c *SubnetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates a subnetwork in the specified project using the data included in the request.", + // "description": "Creates a subnetwork in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.insert", // "parameterOrder": [ @@ -95773,7 +114455,7 @@ type SubnetworksListCall struct { } // List: Retrieves a list of subnetworks available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) List(project string, region string) *SubnetworksListCall { c := &SubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -95881,6 +114563,7 @@ func (c *SubnetworksListCall) Header() http.Header { func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -95943,7 +114626,7 @@ func (c *SubnetworksListCall) Do(opts ...googleapi.CallOption) (*SubnetworkList, } return ret, nil // { - // "description": "Retrieves a list of subnetworks available to the specified project.", + // "description": "Retrieves a list of subnetworks available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.list", // "parameterOrder": [ @@ -96034,7 +114717,10 @@ type SubnetworksListUsableCall struct { header_ http.Header } -// ListUsable: Retrieves an aggregated list of usable subnetworks. +// ListUsable: Retrieves an aggregated list of all usable subnetworks in +// the project. The list contains all of the subnetworks in the project +// and the subnetworks that were shared by a Shared VPC host project. +// (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) ListUsable(project string) *SubnetworksListUsableCall { c := &SubnetworksListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96141,6 +114827,7 @@ func (c *SubnetworksListUsableCall) Header() http.Header { func (c *SubnetworksListUsableCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96202,7 +114889,7 @@ func (c *SubnetworksListUsableCall) Do(opts ...googleapi.CallOption) (*UsableSub } return ret, nil // { - // "description": "Retrieves an aggregated list of usable subnetworks.", + // "description": "Retrieves an aggregated list of all usable subnetworks in the project. The list contains all of the subnetworks in the project and the subnetworks that were shared by a Shared VPC host project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.subnetworks.listUsable", // "parameterOrder": [ @@ -96290,7 +114977,8 @@ type SubnetworksPatchCall struct { // Patch: Patches the specified subnetwork with the data included in the // request. Only certain fields can up updated with a patch request as // indicated in the field descriptions. You must specify the current -// fingeprint of the subnetwork resource being patched. +// fingeprint of the subnetwork resource being patched. (== +// suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) Patch(project string, region string, subnetwork string, subnetwork2 *Subnetwork) *SubnetworksPatchCall { c := &SubnetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96300,6 +114988,21 @@ func (r *SubnetworksService) Patch(project string, region string, subnetwork str return c } +// DrainTimeoutSeconds sets the optional parameter +// "drainTimeoutSeconds": The drain timeout specifies the upper bound in +// seconds on the amount of time allowed to drain connections from the +// current ACTIVE subnetwork to the current BACKUP subnetwork. The drain +// timeout is only applicable when the following conditions are true: - +// the subnetwork being patched has purpose = +// INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role +// = BACKUP - the patch request is setting the role to ACTIVE. Note that +// after this patch operation the roles of the ACTIVE and BACKUP +// subnetworks will be swapped. +func (c *SubnetworksPatchCall) DrainTimeoutSeconds(drainTimeoutSeconds int64) *SubnetworksPatchCall { + c.urlParams_.Set("drainTimeoutSeconds", fmt.Sprint(drainTimeoutSeconds)) + return c +} + // RequestId sets the optional parameter "requestId": An optional // request ID to identify requests. Specify a unique request ID so that // if you must retry your request, the server will know to ignore the @@ -96346,6 +115049,7 @@ func (c *SubnetworksPatchCall) Header() http.Header { func (c *SubnetworksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96411,7 +115115,7 @@ func (c *SubnetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched.", + // "description": "Patches the specified subnetwork with the data included in the request. Only certain fields can up updated with a patch request as indicated in the field descriptions. You must specify the current fingeprint of the subnetwork resource being patched. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.subnetworks.patch", // "parameterOrder": [ @@ -96420,6 +115124,12 @@ func (c *SubnetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err // "subnetwork" // ], // "parameters": { + // "drainTimeoutSeconds": { + // "description": "The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -96476,7 +115186,8 @@ type SubnetworksSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. +// resource. Replaces any existing policy. (== suppress_warning +// http-rest-shadowed ==) func (r *SubnetworksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *SubnetworksSetIamPolicyCall { c := &SubnetworksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96513,6 +115224,7 @@ func (c *SubnetworksSetIamPolicyCall) Header() http.Header { func (c *SubnetworksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96578,7 +115290,7 @@ func (c *SubnetworksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.setIamPolicy", // "parameterOrder": [ @@ -96639,7 +115351,7 @@ type SubnetworksSetPrivateIpGoogleAccessCall struct { // SetPrivateIpGoogleAccess: Set whether VMs in this subnet can access // Google services without assigning external IP addresses through -// Private Google Access. +// Private Google Access. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) SetPrivateIpGoogleAccess(project string, region string, subnetwork string, subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest) *SubnetworksSetPrivateIpGoogleAccessCall { c := &SubnetworksSetPrivateIpGoogleAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96695,6 +115407,7 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) Header() http.Header { func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96760,7 +115473,7 @@ func (c *SubnetworksSetPrivateIpGoogleAccessCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.", + // "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.setPrivateIpGoogleAccess", // "parameterOrder": [ @@ -96825,7 +115538,7 @@ type SubnetworksTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the -// specified resource. +// specified resource. (== suppress_warning http-rest-shadowed ==) func (r *SubnetworksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *SubnetworksTestIamPermissionsCall { c := &SubnetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -96862,6 +115575,7 @@ func (c *SubnetworksTestIamPermissionsCall) Header() http.Header { func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -96927,7 +115641,7 @@ func (c *SubnetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource.", + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.subnetworks.testIamPermissions", // "parameterOrder": [ @@ -96974,6 +115688,260 @@ func (c *SubnetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T } +// method id "compute.targetHttpProxies.aggregatedList": + +type TargetHttpProxiesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of all TargetHttpProxy resources, +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) +func (r *TargetHttpProxiesService) AggregatedList(project string) *TargetHttpProxiesAggregatedListCall { + c := &TargetHttpProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *TargetHttpProxiesAggregatedListCall) Filter(filter string) *TargetHttpProxiesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *TargetHttpProxiesAggregatedListCall) MaxResults(maxResults int64) *TargetHttpProxiesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *TargetHttpProxiesAggregatedListCall) OrderBy(orderBy string) *TargetHttpProxiesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *TargetHttpProxiesAggregatedListCall) PageToken(pageToken string) *TargetHttpProxiesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetHttpProxiesAggregatedListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *TargetHttpProxiesAggregatedListCall) IfNoneMatch(entityTag string) *TargetHttpProxiesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *TargetHttpProxiesAggregatedListCall) Context(ctx context.Context) *TargetHttpProxiesAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TargetHttpProxiesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TargetHttpProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetHttpProxies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.targetHttpProxies.aggregatedList" call. +// Exactly one of *TargetHttpProxyAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *TargetHttpProxyAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *TargetHttpProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TargetHttpProxyAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.targetHttpProxies.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/targetHttpProxies", + // "response": { + // "$ref": "TargetHttpProxyAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *TargetHttpProxiesAggregatedListCall) Pages(ctx context.Context, f func(*TargetHttpProxyAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetHttpProxies.delete": type TargetHttpProxiesDeleteCall struct { @@ -96985,7 +115953,8 @@ type TargetHttpProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetHttpProxy resource. +// Delete: Deletes the specified TargetHttpProxy resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/delete func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall { c := &TargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -97040,6 +116009,7 @@ func (c *TargetHttpProxiesDeleteCall) Header() http.Header { func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97099,7 +116069,7 @@ func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified TargetHttpProxy resource.", + // "description": "Deletes the specified TargetHttpProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetHttpProxies.delete", // "parameterOrder": [ @@ -97152,7 +116122,8 @@ type TargetHttpProxiesGetCall struct { } // Get: Returns the specified TargetHttpProxy resource. Gets a list of -// available target HTTP proxies by making a list() request. +// available target HTTP proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/get func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall { c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -97198,6 +116169,7 @@ func (c *TargetHttpProxiesGetCall) Header() http.Header { func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97260,7 +116232,7 @@ func (c *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttp } return ret, nil // { - // "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request.", + // "description": "Returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpProxies.get", // "parameterOrder": [ @@ -97308,7 +116280,8 @@ type TargetHttpProxiesInsertCall struct { } // Insert: Creates a TargetHttpProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/insert func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall { c := &TargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -97363,6 +116336,7 @@ func (c *TargetHttpProxiesInsertCall) Header() http.Header { func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97426,7 +116400,7 @@ func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpProxies.insert", // "parameterOrder": [ @@ -97473,7 +116447,7 @@ type TargetHttpProxiesListCall struct { } // List: Retrieves the list of TargetHttpProxy resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/list func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall { c := &TargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -97581,6 +116555,7 @@ func (c *TargetHttpProxiesListCall) Header() http.Header { func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97642,7 +116617,7 @@ func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHtt } return ret, nil // { - // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpProxies.list", // "parameterOrder": [ @@ -97726,7 +116701,8 @@ type TargetHttpProxiesSetUrlMapCall struct { header_ http.Header } -// SetUrlMap: Changes the URL map for TargetHttpProxy. +// SetUrlMap: Changes the URL map for TargetHttpProxy. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/setUrlMap func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall { c := &TargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -97782,6 +116758,7 @@ func (c *TargetHttpProxiesSetUrlMapCall) Header() http.Header { func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -97846,7 +116823,7 @@ func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Changes the URL map for TargetHttpProxy.", + // "description": "Changes the URL map for TargetHttpProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpProxies.setUrlMap", // "parameterOrder": [ @@ -97889,6 +116866,260 @@ func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Oper } +// method id "compute.targetHttpsProxies.aggregatedList": + +type TargetHttpsProxiesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of all TargetHttpsProxy resources, +// regional and global, available to the specified project. (== +// suppress_warning http-rest-shadowed ==) +func (r *TargetHttpsProxiesService) AggregatedList(project string) *TargetHttpsProxiesAggregatedListCall { + c := &TargetHttpsProxiesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *TargetHttpsProxiesAggregatedListCall) Filter(filter string) *TargetHttpsProxiesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *TargetHttpsProxiesAggregatedListCall) MaxResults(maxResults int64) *TargetHttpsProxiesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *TargetHttpsProxiesAggregatedListCall) OrderBy(orderBy string) *TargetHttpsProxiesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *TargetHttpsProxiesAggregatedListCall) PageToken(pageToken string) *TargetHttpsProxiesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetHttpsProxiesAggregatedListCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *TargetHttpsProxiesAggregatedListCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *TargetHttpsProxiesAggregatedListCall) Context(ctx context.Context) *TargetHttpsProxiesAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TargetHttpsProxiesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TargetHttpsProxiesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetHttpsProxies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.targetHttpsProxies.aggregatedList" call. +// Exactly one of *TargetHttpsProxyAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *TargetHttpsProxyAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *TargetHttpsProxiesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TargetHttpsProxyAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.targetHttpsProxies.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/targetHttpsProxies", + // "response": { + // "$ref": "TargetHttpsProxyAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *TargetHttpsProxiesAggregatedListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetHttpsProxies.delete": type TargetHttpsProxiesDeleteCall struct { @@ -97900,7 +117131,8 @@ type TargetHttpsProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetHttpsProxy resource. +// Delete: Deletes the specified TargetHttpsProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy string) *TargetHttpsProxiesDeleteCall { c := &TargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -97954,6 +117186,7 @@ func (c *TargetHttpsProxiesDeleteCall) Header() http.Header { func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98013,7 +117246,7 @@ func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Deletes the specified TargetHttpsProxy resource.", + // "description": "Deletes the specified TargetHttpsProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetHttpsProxies.delete", // "parameterOrder": [ @@ -98066,7 +117299,8 @@ type TargetHttpsProxiesGetCall struct { } // Get: Returns the specified TargetHttpsProxy resource. Gets a list of -// available target HTTPS proxies by making a list() request. +// available target HTTPS proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall { c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98111,6 +117345,7 @@ func (c *TargetHttpsProxiesGetCall) Header() http.Header { func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98173,7 +117408,7 @@ func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHtt } return ret, nil // { - // "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request.", + // "description": "Returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpsProxies.get", // "parameterOrder": [ @@ -98221,7 +117456,8 @@ type TargetHttpsProxiesInsertCall struct { } // Insert: Creates a TargetHttpsProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesInsertCall { c := &TargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98275,6 +117511,7 @@ func (c *TargetHttpsProxiesInsertCall) Header() http.Header { func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98338,7 +117575,7 @@ func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operat } return ret, nil // { - // "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.insert", // "parameterOrder": [ @@ -98385,7 +117622,7 @@ type TargetHttpsProxiesListCall struct { } // List: Retrieves the list of TargetHttpsProxy resources available to -// the specified project. +// the specified project. (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesListCall { c := &TargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98492,6 +117729,7 @@ func (c *TargetHttpsProxiesListCall) Header() http.Header { func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98553,7 +117791,7 @@ func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHt } return ret, nil // { - // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetHttpsProxies.list", // "parameterOrder": [ @@ -98638,6 +117876,7 @@ type TargetHttpsProxiesSetQuicOverrideCall struct { } // SetQuicOverride: Sets the QUIC override policy for TargetHttpsProxy. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetQuicOverride(project string, targetHttpsProxy string, targethttpsproxiessetquicoverriderequest *TargetHttpsProxiesSetQuicOverrideRequest) *TargetHttpsProxiesSetQuicOverrideCall { c := &TargetHttpsProxiesSetQuicOverrideCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98692,6 +117931,7 @@ func (c *TargetHttpsProxiesSetQuicOverrideCall) Header() http.Header { func (c *TargetHttpsProxiesSetQuicOverrideCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98756,7 +117996,7 @@ func (c *TargetHttpsProxiesSetQuicOverrideCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Sets the QUIC override policy for TargetHttpsProxy.", + // "description": "Sets the QUIC override policy for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setQuicOverride", // "parameterOrder": [ @@ -98811,6 +118051,7 @@ type TargetHttpsProxiesSetSslCertificatesCall struct { } // SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHttpsProxy string, targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest) *TargetHttpsProxiesSetSslCertificatesCall { c := &TargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -98865,6 +118106,7 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Header() http.Header { func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -98929,7 +118171,7 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Replaces SslCertificates for TargetHttpsProxy.", + // "description": "Replaces SslCertificates for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setSslCertificates", // "parameterOrder": [ @@ -98988,7 +118230,7 @@ type TargetHttpsProxiesSetSslPolicyCall struct { // policy specifies the server-side support for SSL features. This // affects connections between clients and the HTTPS proxy load // balancer. They do not affect the connection between the load balancer -// and the backends. +// and the backends. (== suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetSslPolicy(project string, targetHttpsProxy string, sslpolicyreference *SslPolicyReference) *TargetHttpsProxiesSetSslPolicyCall { c := &TargetHttpsProxiesSetSslPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99043,6 +118285,7 @@ func (c *TargetHttpsProxiesSetSslPolicyCall) Header() http.Header { func (c *TargetHttpsProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99107,7 +118350,7 @@ func (c *TargetHttpsProxiesSetSslPolicyCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends.", + // "description": "Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setSslPolicy", // "parameterOrder": [ @@ -99161,7 +118404,8 @@ type TargetHttpsProxiesSetUrlMapCall struct { header_ http.Header } -// SetUrlMap: Changes the URL map for TargetHttpsProxy. +// SetUrlMap: Changes the URL map for TargetHttpsProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy string, urlmapreference *UrlMapReference) *TargetHttpsProxiesSetUrlMapCall { c := &TargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -99216,6 +118460,7 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Header() http.Header { func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99280,7 +118525,7 @@ func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Changes the URL map for TargetHttpsProxy.", + // "description": "Changes the URL map for TargetHttpsProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetHttpsProxies.setUrlMap", // "parameterOrder": [ @@ -99334,7 +118579,8 @@ type TargetInstancesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of target instances. +// AggregatedList: Retrieves an aggregated list of target instances. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/aggregatedList func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall { c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -99442,6 +118688,7 @@ func (c *TargetInstancesAggregatedListCall) Header() http.Header { func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99503,7 +118750,7 @@ func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*T } return ret, nil // { - // "description": "Retrieves an aggregated list of target instances.", + // "description": "Retrieves an aggregated list of target instances. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetInstances.aggregatedList", // "parameterOrder": [ @@ -99587,7 +118834,8 @@ type TargetInstancesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetInstance resource. +// Delete: Deletes the specified TargetInstance resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/delete func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall { c := &TargetInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -99643,6 +118891,7 @@ func (c *TargetInstancesDeleteCall) Header() http.Header { func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99703,7 +118952,7 @@ func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Deletes the specified TargetInstance resource.", + // "description": "Deletes the specified TargetInstance resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetInstances.delete", // "parameterOrder": [ @@ -99765,7 +119014,8 @@ type TargetInstancesGetCall struct { } // Get: Returns the specified TargetInstance resource. Gets a list of -// available target instances by making a list() request. +// available target instances by making a list() request. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/get func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall { c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -99812,6 +119062,7 @@ func (c *TargetInstancesGetCall) Header() http.Header { func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -99875,7 +119126,7 @@ func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstan } return ret, nil // { - // "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.", + // "description": "Returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetInstances.get", // "parameterOrder": [ @@ -99932,7 +119183,8 @@ type TargetInstancesInsertCall struct { } // Insert: Creates a TargetInstance resource in the specified project -// and zone using the data included in the request. +// and zone using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/insert func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall { c := &TargetInstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -99988,6 +119240,7 @@ func (c *TargetInstancesInsertCall) Header() http.Header { func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100052,7 +119305,7 @@ func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", + // "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetInstances.insert", // "parameterOrder": [ @@ -100108,7 +119361,8 @@ type TargetInstancesListCall struct { } // List: Retrieves a list of TargetInstance resources available to the -// specified project and zone. +// specified project and zone. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/list func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall { c := &TargetInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -100217,6 +119471,7 @@ func (c *TargetInstancesListCall) Header() http.Header { func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100279,7 +119534,7 @@ func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInsta } return ret, nil // { - // "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", + // "description": "Retrieves a list of TargetInstance resources available to the specified project and zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetInstances.list", // "parameterOrder": [ @@ -100372,7 +119627,8 @@ type TargetPoolsAddHealthCheckCall struct { header_ http.Header } -// AddHealthCheck: Adds health check URLs to a target pool. +// AddHealthCheck: Adds health check URLs to a target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addHealthCheck func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall { c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -100429,6 +119685,7 @@ func (c *TargetPoolsAddHealthCheckCall) Header() http.Header { func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100494,7 +119751,7 @@ func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Adds health check URLs to a target pool.", + // "description": "Adds health check URLs to a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.addHealthCheck", // "parameterOrder": [ @@ -100558,7 +119815,8 @@ type TargetPoolsAddInstanceCall struct { header_ http.Header } -// AddInstance: Adds an instance to a target pool. +// AddInstance: Adds an instance to a target pool. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addInstance func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall { c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -100615,6 +119873,7 @@ func (c *TargetPoolsAddInstanceCall) Header() http.Header { func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100680,7 +119939,7 @@ func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Adds an instance to a target pool.", + // "description": "Adds an instance to a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.addInstance", // "parameterOrder": [ @@ -100742,7 +120001,8 @@ type TargetPoolsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of target pools. +// AggregatedList: Retrieves an aggregated list of target pools. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/aggregatedList func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall { c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -100850,6 +120110,7 @@ func (c *TargetPoolsAggregatedListCall) Header() http.Header { func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -100911,7 +120172,7 @@ func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Targe } return ret, nil // { - // "description": "Retrieves an aggregated list of target pools.", + // "description": "Retrieves an aggregated list of target pools. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetPools.aggregatedList", // "parameterOrder": [ @@ -100995,7 +120256,8 @@ type TargetPoolsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified target pool. +// Delete: Deletes the specified target pool. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/delete func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall { c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -101051,6 +120313,7 @@ func (c *TargetPoolsDeleteCall) Header() http.Header { func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101111,7 +120374,7 @@ func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Deletes the specified target pool.", + // "description": "Deletes the specified target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetPools.delete", // "parameterOrder": [ @@ -101173,7 +120436,8 @@ type TargetPoolsGetCall struct { } // Get: Returns the specified target pool. Gets a list of available -// target pools by making a list() request. +// target pools by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/get func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall { c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -101220,6 +120484,7 @@ func (c *TargetPoolsGetCall) Header() http.Header { func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101283,7 +120548,7 @@ func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, erro } return ret, nil // { - // "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request.", + // "description": "Returns the specified target pool. Gets a list of available target pools by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetPools.get", // "parameterOrder": [ @@ -101341,7 +120606,8 @@ type TargetPoolsGetHealthCall struct { } // GetHealth: Gets the most recent health check results for each IP for -// the instance that is referenced by the given target pool. +// the instance that is referenced by the given target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/getHealth func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall { c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -101379,6 +120645,7 @@ func (c *TargetPoolsGetHealthCall) Header() http.Header { func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101444,7 +120711,7 @@ func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPool } return ret, nil // { - // "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", + // "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.getHealth", // "parameterOrder": [ @@ -101504,7 +120771,8 @@ type TargetPoolsInsertCall struct { } // Insert: Creates a target pool in the specified project and region -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/insert func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall { c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -101560,6 +120828,7 @@ func (c *TargetPoolsInsertCall) Header() http.Header { func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101624,7 +120893,7 @@ func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Creates a target pool in the specified project and region using the data included in the request.", + // "description": "Creates a target pool in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.insert", // "parameterOrder": [ @@ -101680,7 +120949,7 @@ type TargetPoolsListCall struct { } // List: Retrieves a list of target pools available to the specified -// project and region. +// project and region. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/list func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall { c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -101789,6 +121058,7 @@ func (c *TargetPoolsListCall) Header() http.Header { func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -101851,7 +121121,7 @@ func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, } return ret, nil // { - // "description": "Retrieves a list of target pools available to the specified project and region.", + // "description": "Retrieves a list of target pools available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetPools.list", // "parameterOrder": [ @@ -101944,7 +121214,8 @@ type TargetPoolsRemoveHealthCheckCall struct { header_ http.Header } -// RemoveHealthCheck: Removes health check URL from a target pool. +// RemoveHealthCheck: Removes health check URL from a target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeHealthCheck func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall { c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -102001,6 +121272,7 @@ func (c *TargetPoolsRemoveHealthCheckCall) Header() http.Header { func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102066,7 +121338,7 @@ func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Removes health check URL from a target pool.", + // "description": "Removes health check URL from a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.removeHealthCheck", // "parameterOrder": [ @@ -102130,7 +121402,8 @@ type TargetPoolsRemoveInstanceCall struct { header_ http.Header } -// RemoveInstance: Removes instance URL from a target pool. +// RemoveInstance: Removes instance URL from a target pool. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeInstance func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall { c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -102187,6 +121460,7 @@ func (c *TargetPoolsRemoveInstanceCall) Header() http.Header { func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102252,7 +121526,7 @@ func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Removes instance URL from a target pool.", + // "description": "Removes instance URL from a target pool. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.removeInstance", // "parameterOrder": [ @@ -102316,7 +121590,8 @@ type TargetPoolsSetBackupCall struct { header_ http.Header } -// SetBackup: Changes a backup target pool's configurations. +// SetBackup: Changes a backup target pool's configurations. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/setBackup func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall { c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -102380,6 +121655,7 @@ func (c *TargetPoolsSetBackupCall) Header() http.Header { func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102445,7 +121721,7 @@ func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Changes a backup target pool's configurations.", + // "description": "Changes a backup target pool's configurations. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetPools.setBackup", // "parameterOrder": [ @@ -102513,7 +121789,8 @@ type TargetSslProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetSslProxy resource. +// Delete: Deletes the specified TargetSslProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) Delete(project string, targetSslProxy string) *TargetSslProxiesDeleteCall { c := &TargetSslProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102567,6 +121844,7 @@ func (c *TargetSslProxiesDeleteCall) Header() http.Header { func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102626,7 +121904,7 @@ func (c *TargetSslProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified TargetSslProxy resource.", + // "description": "Deletes the specified TargetSslProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetSslProxies.delete", // "parameterOrder": [ @@ -102679,7 +121957,8 @@ type TargetSslProxiesGetCall struct { } // Get: Returns the specified TargetSslProxy resource. Gets a list of -// available target SSL proxies by making a list() request. +// available target SSL proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) Get(project string, targetSslProxy string) *TargetSslProxiesGetCall { c := &TargetSslProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102724,6 +122003,7 @@ func (c *TargetSslProxiesGetCall) Header() http.Header { func (c *TargetSslProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102786,7 +122066,7 @@ func (c *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslPr } return ret, nil // { - // "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request.", + // "description": "Returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetSslProxies.get", // "parameterOrder": [ @@ -102834,7 +122114,8 @@ type TargetSslProxiesInsertCall struct { } // Insert: Creates a TargetSslProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetSslProxiesService) Insert(project string, targetsslproxy *TargetSslProxy) *TargetSslProxiesInsertCall { c := &TargetSslProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -102888,6 +122169,7 @@ func (c *TargetSslProxiesInsertCall) Header() http.Header { func (c *TargetSslProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -102951,7 +122233,7 @@ func (c *TargetSslProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.insert", // "parameterOrder": [ @@ -102998,7 +122280,7 @@ type TargetSslProxiesListCall struct { } // List: Retrieves the list of TargetSslProxy resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) List(project string) *TargetSslProxiesListCall { c := &TargetSslProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103105,6 +122387,7 @@ func (c *TargetSslProxiesListCall) Header() http.Header { func (c *TargetSslProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103166,7 +122449,7 @@ func (c *TargetSslProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetSslP } return ret, nil // { - // "description": "Retrieves the list of TargetSslProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetSslProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetSslProxies.list", // "parameterOrder": [ @@ -103250,7 +122533,8 @@ type TargetSslProxiesSetBackendServiceCall struct { header_ http.Header } -// SetBackendService: Changes the BackendService for TargetSslProxy. +// SetBackendService: Changes the BackendService for TargetSslProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetBackendService(project string, targetSslProxy string, targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest) *TargetSslProxiesSetBackendServiceCall { c := &TargetSslProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103305,6 +122589,7 @@ func (c *TargetSslProxiesSetBackendServiceCall) Header() http.Header { func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103369,7 +122654,7 @@ func (c *TargetSslProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the BackendService for TargetSslProxy.", + // "description": "Changes the BackendService for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setBackendService", // "parameterOrder": [ @@ -103424,7 +122709,8 @@ type TargetSslProxiesSetProxyHeaderCall struct { header_ http.Header } -// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy. +// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetProxyHeader(project string, targetSslProxy string, targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest) *TargetSslProxiesSetProxyHeaderCall { c := &TargetSslProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103479,6 +122765,7 @@ func (c *TargetSslProxiesSetProxyHeaderCall) Header() http.Header { func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103543,7 +122830,7 @@ func (c *TargetSslProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Changes the ProxyHeaderType for TargetSslProxy.", + // "description": "Changes the ProxyHeaderType for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setProxyHeader", // "parameterOrder": [ @@ -103598,7 +122885,8 @@ type TargetSslProxiesSetSslCertificatesCall struct { header_ http.Header } -// SetSslCertificates: Changes SslCertificates for TargetSslProxy. +// SetSslCertificates: Changes SslCertificates for TargetSslProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetSslCertificates(project string, targetSslProxy string, targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest) *TargetSslProxiesSetSslCertificatesCall { c := &TargetSslProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103653,6 +122941,7 @@ func (c *TargetSslProxiesSetSslCertificatesCall) Header() http.Header { func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103717,7 +123006,7 @@ func (c *TargetSslProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Changes SslCertificates for TargetSslProxy.", + // "description": "Changes SslCertificates for TargetSslProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setSslCertificates", // "parameterOrder": [ @@ -103776,6 +123065,7 @@ type TargetSslProxiesSetSslPolicyCall struct { // specifies the server-side support for SSL features. This affects // connections between clients and the SSL proxy load balancer. They do // not affect the connection between the load balancer and the backends. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetSslProxiesService) SetSslPolicy(project string, targetSslProxy string, sslpolicyreference *SslPolicyReference) *TargetSslProxiesSetSslPolicyCall { c := &TargetSslProxiesSetSslPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -103830,6 +123120,7 @@ func (c *TargetSslProxiesSetSslPolicyCall) Header() http.Header { func (c *TargetSslProxiesSetSslPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -103894,7 +123185,7 @@ func (c *TargetSslProxiesSetSslPolicyCall) Do(opts ...googleapi.CallOption) (*Op } return ret, nil // { - // "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends.", + // "description": "Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetSslProxies.setSslPolicy", // "parameterOrder": [ @@ -103947,7 +123238,8 @@ type TargetTcpProxiesDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified TargetTcpProxy resource. +// Delete: Deletes the specified TargetTcpProxy resource. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) Delete(project string, targetTcpProxy string) *TargetTcpProxiesDeleteCall { c := &TargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -104001,6 +123293,7 @@ func (c *TargetTcpProxiesDeleteCall) Header() http.Header { func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104060,7 +123353,7 @@ func (c *TargetTcpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Deletes the specified TargetTcpProxy resource.", + // "description": "Deletes the specified TargetTcpProxy resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetTcpProxies.delete", // "parameterOrder": [ @@ -104113,7 +123406,8 @@ type TargetTcpProxiesGetCall struct { } // Get: Returns the specified TargetTcpProxy resource. Gets a list of -// available target TCP proxies by making a list() request. +// available target TCP proxies by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) Get(project string, targetTcpProxy string) *TargetTcpProxiesGetCall { c := &TargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -104158,6 +123452,7 @@ func (c *TargetTcpProxiesGetCall) Header() http.Header { func (c *TargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104220,7 +123515,7 @@ func (c *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpPr } return ret, nil // { - // "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.", + // "description": "Returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetTcpProxies.get", // "parameterOrder": [ @@ -104268,7 +123563,8 @@ type TargetTcpProxiesInsertCall struct { } // Insert: Creates a TargetTcpProxy resource in the specified project -// using the data included in the request. +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetTcpProxiesService) Insert(project string, targettcpproxy *TargetTcpProxy) *TargetTcpProxiesInsertCall { c := &TargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -104322,6 +123618,7 @@ func (c *TargetTcpProxiesInsertCall) Header() http.Header { func (c *TargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104385,7 +123682,7 @@ func (c *TargetTcpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.", + // "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetTcpProxies.insert", // "parameterOrder": [ @@ -104432,7 +123729,7 @@ type TargetTcpProxiesListCall struct { } // List: Retrieves the list of TargetTcpProxy resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) List(project string) *TargetTcpProxiesListCall { c := &TargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -104539,6 +123836,7 @@ func (c *TargetTcpProxiesListCall) Header() http.Header { func (c *TargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104600,7 +123898,7 @@ func (c *TargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpP } return ret, nil // { - // "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.", + // "description": "Retrieves the list of TargetTcpProxy resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetTcpProxies.list", // "parameterOrder": [ @@ -104684,7 +123982,8 @@ type TargetTcpProxiesSetBackendServiceCall struct { header_ http.Header } -// SetBackendService: Changes the BackendService for TargetTcpProxy. +// SetBackendService: Changes the BackendService for TargetTcpProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) SetBackendService(project string, targetTcpProxy string, targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest) *TargetTcpProxiesSetBackendServiceCall { c := &TargetTcpProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -104739,6 +124038,7 @@ func (c *TargetTcpProxiesSetBackendServiceCall) Header() http.Header { func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104803,7 +124103,7 @@ func (c *TargetTcpProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Changes the BackendService for TargetTcpProxy.", + // "description": "Changes the BackendService for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetTcpProxies.setBackendService", // "parameterOrder": [ @@ -104858,7 +124158,8 @@ type TargetTcpProxiesSetProxyHeaderCall struct { header_ http.Header } -// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy. +// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetTcpProxiesService) SetProxyHeader(project string, targetTcpProxy string, targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest) *TargetTcpProxiesSetProxyHeaderCall { c := &TargetTcpProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -104913,6 +124214,7 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) Header() http.Header { func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -104977,7 +124279,7 @@ func (c *TargetTcpProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Changes the ProxyHeaderType for TargetTcpProxy.", + // "description": "Changes the ProxyHeaderType for TargetTcpProxy. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetTcpProxies.setProxyHeader", // "parameterOrder": [ @@ -105032,6 +124334,7 @@ type TargetVpnGatewaysAggregatedListCall struct { } // AggregatedList: Retrieves an aggregated list of target VPN gateways. +// (== suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall { c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -105138,6 +124441,7 @@ func (c *TargetVpnGatewaysAggregatedListCall) Header() http.Header { func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105199,7 +124503,7 @@ func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Retrieves an aggregated list of target VPN gateways.", + // "description": "Retrieves an aggregated list of target VPN gateways. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.aggregatedList", // "parameterOrder": [ @@ -105283,7 +124587,8 @@ type TargetVpnGatewaysDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified target VPN gateway. +// Delete: Deletes the specified target VPN gateway. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall { c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -105338,6 +124643,7 @@ func (c *TargetVpnGatewaysDeleteCall) Header() http.Header { func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105398,7 +124704,7 @@ func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Deletes the specified target VPN gateway.", + // "description": "Deletes the specified target VPN gateway. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.targetVpnGateways.delete", // "parameterOrder": [ @@ -105460,7 +124766,8 @@ type TargetVpnGatewaysGetCall struct { } // Get: Returns the specified target VPN gateway. Gets a list of -// available target VPN gateways by making a list() request. +// available target VPN gateways by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall { c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -105506,6 +124813,7 @@ func (c *TargetVpnGatewaysGetCall) Header() http.Header { func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105569,7 +124877,7 @@ func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnG } return ret, nil // { - // "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.", + // "description": "Returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.get", // "parameterOrder": [ @@ -105626,7 +124934,8 @@ type TargetVpnGatewaysInsertCall struct { } // Insert: Creates a target VPN gateway in the specified project and -// region using the data included in the request. +// region using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall { c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -105681,6 +124990,7 @@ func (c *TargetVpnGatewaysInsertCall) Header() http.Header { func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105745,7 +125055,7 @@ func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operati } return ret, nil // { - // "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", + // "description": "Creates a target VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.targetVpnGateways.insert", // "parameterOrder": [ @@ -105801,7 +125111,8 @@ type TargetVpnGatewaysListCall struct { } // List: Retrieves a list of target VPN gateways available to the -// specified project and region. +// specified project and region. (== suppress_warning http-rest-shadowed +// ==) func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall { c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -105909,6 +125220,7 @@ func (c *TargetVpnGatewaysListCall) Header() http.Header { func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -105971,7 +125283,7 @@ func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpn } return ret, nil // { - // "description": "Retrieves a list of target VPN gateways available to the specified project and region.", + // "description": "Retrieves a list of target VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.list", // "parameterOrder": [ @@ -106051,6 +125363,260 @@ func (c *TargetVpnGatewaysListCall) Pages(ctx context.Context, f func(*TargetVpn } } +// method id "compute.urlMaps.aggregatedList": + +type UrlMapsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves the list of all UrlMap resources, regional +// and global, available to the specified project. (== suppress_warning +// http-rest-shadowed ==) +func (r *UrlMapsService) AggregatedList(project string) *UrlMapsAggregatedListCall { + c := &UrlMapsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *UrlMapsAggregatedListCall) Filter(filter string) *UrlMapsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *UrlMapsAggregatedListCall) MaxResults(maxResults int64) *UrlMapsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *UrlMapsAggregatedListCall) OrderBy(orderBy string) *UrlMapsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *UrlMapsAggregatedListCall) PageToken(pageToken string) *UrlMapsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UrlMapsAggregatedListCall) Fields(s ...googleapi.Field) *UrlMapsAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *UrlMapsAggregatedListCall) IfNoneMatch(entityTag string) *UrlMapsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *UrlMapsAggregatedListCall) Context(ctx context.Context) *UrlMapsAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UrlMapsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *UrlMapsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/urlMaps") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.urlMaps.aggregatedList" call. +// Exactly one of *UrlMapsAggregatedList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *UrlMapsAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *UrlMapsAggregatedListCall) Do(opts ...googleapi.CallOption) (*UrlMapsAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &UrlMapsAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of all UrlMap resources, regional and global, available to the specified project. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.urlMaps.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/urlMaps", + // "response": { + // "$ref": "UrlMapsAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *UrlMapsAggregatedListCall) Pages(ctx context.Context, f func(*UrlMapsAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.urlMaps.delete": type UrlMapsDeleteCall struct { @@ -106062,7 +125628,8 @@ type UrlMapsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified UrlMap resource. +// Delete: Deletes the specified UrlMap resource. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/delete func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall { c := &UrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -106117,6 +125684,7 @@ func (c *UrlMapsDeleteCall) Header() http.Header { func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106176,7 +125744,7 @@ func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Deletes the specified UrlMap resource.", + // "description": "Deletes the specified UrlMap resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.urlMaps.delete", // "parameterOrder": [ @@ -106229,7 +125797,8 @@ type UrlMapsGetCall struct { } // Get: Returns the specified UrlMap resource. Gets a list of available -// URL maps by making a list() request. +// URL maps by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/get func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -106275,6 +125844,7 @@ func (c *UrlMapsGetCall) Header() http.Header { func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106337,7 +125907,7 @@ func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) { } return ret, nil // { - // "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.", + // "description": "Returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.urlMaps.get", // "parameterOrder": [ @@ -106385,7 +125955,8 @@ type UrlMapsInsertCall struct { } // Insert: Creates a UrlMap resource in the specified project using the -// data included in the request. +// data included in the request. (== suppress_warning http-rest-shadowed +// ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/insert func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall { c := &UrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -106440,6 +126011,7 @@ func (c *UrlMapsInsertCall) Header() http.Header { func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106503,7 +126075,7 @@ func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + // "description": "Creates a UrlMap resource in the specified project using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.urlMaps.insert", // "parameterOrder": [ @@ -106551,7 +126123,8 @@ type UrlMapsInvalidateCacheCall struct { } // InvalidateCache: Initiates a cache invalidation operation, -// invalidating the specified path, scoped to the specified UrlMap. +// invalidating the specified path, scoped to the specified UrlMap. (== +// suppress_warning http-rest-shadowed ==) func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *UrlMapsInvalidateCacheCall { c := &UrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -106606,6 +126179,7 @@ func (c *UrlMapsInvalidateCacheCall) Header() http.Header { func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106670,7 +126244,7 @@ func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.", + // "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.urlMaps.invalidateCache", // "parameterOrder": [ @@ -106725,7 +126299,7 @@ type UrlMapsListCall struct { } // List: Retrieves the list of UrlMap resources available to the -// specified project. +// specified project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/list func (r *UrlMapsService) List(project string) *UrlMapsListCall { c := &UrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -106833,6 +126407,7 @@ func (c *UrlMapsListCall) Header() http.Header { func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -106894,7 +126469,7 @@ func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error) } return ret, nil // { - // "description": "Retrieves the list of UrlMap resources available to the specified project.", + // "description": "Retrieves the list of UrlMap resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.urlMaps.list", // "parameterOrder": [ @@ -106980,7 +126555,8 @@ type UrlMapsPatchCall struct { // Patch: Patches the specified UrlMap resource with the data included // in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. +// JSON merge patch format and processing rules. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall { c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -107036,6 +126612,7 @@ func (c *UrlMapsPatchCall) Header() http.Header { func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107100,7 +126677,7 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PATCH", // "id": "compute.urlMaps.patch", // "parameterOrder": [ @@ -107156,7 +126733,7 @@ type UrlMapsUpdateCall struct { } // Update: Updates the specified UrlMap resource with the data included -// in the request. +// in the request. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/update func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall { c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -107212,6 +126789,7 @@ func (c *UrlMapsUpdateCall) Header() http.Header { func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107276,7 +126854,7 @@ func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Updates the specified UrlMap resource with the data included in the request.", + // "description": "Updates the specified UrlMap resource with the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "PUT", // "id": "compute.urlMaps.update", // "parameterOrder": [ @@ -107333,7 +126911,7 @@ type UrlMapsValidateCall struct { // Validate: Runs static validation for the UrlMap. In particular, the // tests of the provided UrlMap will be run. Calling this method does -// NOT create the UrlMap. +// NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/validate func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall { c := &UrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -107370,6 +126948,7 @@ func (c *UrlMapsValidateCall) Header() http.Header { func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107434,7 +127013,7 @@ func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidate } return ret, nil // { - // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + // "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.urlMaps.validate", // "parameterOrder": [ @@ -107472,6 +127051,1566 @@ func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidate } +// method id "compute.vpnGateways.aggregatedList": + +type VpnGatewaysAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of VPN gateways. (== +// suppress_warning http-rest-shadowed ==) +func (r *VpnGatewaysService) AggregatedList(project string) *VpnGatewaysAggregatedListCall { + c := &VpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *VpnGatewaysAggregatedListCall) Filter(filter string) *VpnGatewaysAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *VpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *VpnGatewaysAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *VpnGatewaysAggregatedListCall) OrderBy(orderBy string) *VpnGatewaysAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *VpnGatewaysAggregatedListCall) PageToken(pageToken string) *VpnGatewaysAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *VpnGatewaysAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *VpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *VpnGatewaysAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysAggregatedListCall) Context(ctx context.Context) *VpnGatewaysAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/vpnGateways") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.aggregatedList" call. +// Exactly one of *VpnGatewayAggregatedList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *VpnGatewayAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *VpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnGatewayAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &VpnGatewayAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of VPN gateways. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.vpnGateways.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/vpnGateways", + // "response": { + // "$ref": "VpnGatewayAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *VpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*VpnGatewayAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.vpnGateways.delete": + +type VpnGatewaysDeleteCall struct { + s *Service + project string + region string + vpnGateway string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified VPN gateway. (== suppress_warning +// http-rest-shadowed ==) +func (r *VpnGatewaysService) Delete(project string, region string, vpnGateway string) *VpnGatewaysDeleteCall { + c := &VpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.vpnGateway = vpnGateway + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *VpnGatewaysDeleteCall) RequestId(requestId string) *VpnGatewaysDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *VpnGatewaysDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysDeleteCall) Context(ctx context.Context) *VpnGatewaysDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways/{vpnGateway}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "vpnGateway": c.vpnGateway, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *VpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "DELETE", + // "id": "compute.vpnGateways.delete", + // "parameterOrder": [ + // "project", + // "region", + // "vpnGateway" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "vpnGateway": { + // "description": "Name of the VPN gateway to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.vpnGateways.get": + +type VpnGatewaysGetCall struct { + s *Service + project string + region string + vpnGateway string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified VPN gateway. Gets a list of available VPN +// gateways by making a list() request. (== suppress_warning +// http-rest-shadowed ==) +func (r *VpnGatewaysService) Get(project string, region string, vpnGateway string) *VpnGatewaysGetCall { + c := &VpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.vpnGateway = vpnGateway + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysGetCall) Fields(s ...googleapi.Field) *VpnGatewaysGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *VpnGatewaysGetCall) IfNoneMatch(entityTag string) *VpnGatewaysGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysGetCall) Context(ctx context.Context) *VpnGatewaysGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways/{vpnGateway}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "vpnGateway": c.vpnGateway, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.get" call. +// Exactly one of *VpnGateway or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *VpnGateway.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *VpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*VpnGateway, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &VpnGateway{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.vpnGateways.get", + // "parameterOrder": [ + // "project", + // "region", + // "vpnGateway" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "vpnGateway": { + // "description": "Name of the VPN gateway to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}", + // "response": { + // "$ref": "VpnGateway" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.vpnGateways.getStatus": + +type VpnGatewaysGetStatusCall struct { + s *Service + project string + region string + vpnGateway string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetStatus: Returns the status for the specified VPN gateway. (== +// suppress_warning http-rest-shadowed ==) +func (r *VpnGatewaysService) GetStatus(project string, region string, vpnGateway string) *VpnGatewaysGetStatusCall { + c := &VpnGatewaysGetStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.vpnGateway = vpnGateway + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysGetStatusCall) Fields(s ...googleapi.Field) *VpnGatewaysGetStatusCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *VpnGatewaysGetStatusCall) IfNoneMatch(entityTag string) *VpnGatewaysGetStatusCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysGetStatusCall) Context(ctx context.Context) *VpnGatewaysGetStatusCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysGetStatusCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysGetStatusCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "vpnGateway": c.vpnGateway, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.getStatus" call. +// Exactly one of *VpnGatewaysGetStatusResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *VpnGatewaysGetStatusResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *VpnGatewaysGetStatusCall) Do(opts ...googleapi.CallOption) (*VpnGatewaysGetStatusResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &VpnGatewaysGetStatusResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the status for the specified VPN gateway. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.vpnGateways.getStatus", + // "parameterOrder": [ + // "project", + // "region", + // "vpnGateway" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "vpnGateway": { + // "description": "Name of the VPN gateway to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways/{vpnGateway}/getStatus", + // "response": { + // "$ref": "VpnGatewaysGetStatusResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.vpnGateways.insert": + +type VpnGatewaysInsertCall struct { + s *Service + project string + region string + vpngateway *VpnGateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a VPN gateway in the specified project and region +// using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) +func (r *VpnGatewaysService) Insert(project string, region string, vpngateway *VpnGateway) *VpnGatewaysInsertCall { + c := &VpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.vpngateway = vpngateway + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *VpnGatewaysInsertCall) RequestId(requestId string) *VpnGatewaysInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysInsertCall) Fields(s ...googleapi.Field) *VpnGatewaysInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysInsertCall) Context(ctx context.Context) *VpnGatewaysInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpngateway) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *VpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a VPN gateway in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.vpnGateways.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways", + // "request": { + // "$ref": "VpnGateway" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.vpnGateways.list": + +type VpnGatewaysListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of VPN gateways available to the specified +// project and region. (== suppress_warning http-rest-shadowed ==) +func (r *VpnGatewaysService) List(project string, region string) *VpnGatewaysListCall { + c := &VpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. The expression must specify +// the field name, a comparison operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be either =, !=, >, or <. +// +// For example, if you are filtering Compute Engine instances, you can +// exclude instances named example-instance by specifying name != +// example-instance. +// +// You can also filter nested fields. For example, you could specify +// scheduling.automaticRestart = false to include instances only if they +// are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart = true) +// (cpuPlatform = "Intel Skylake"). By default, each expression is an +// AND expression. However, you can include AND and OR expressions +// explicitly. For example, (cpuPlatform = "Intel Skylake") OR +// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = +// true). +func (c *VpnGatewaysListCall) Filter(filter string) *VpnGatewaysListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *VpnGatewaysListCall) MaxResults(maxResults int64) *VpnGatewaysListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *VpnGatewaysListCall) OrderBy(orderBy string) *VpnGatewaysListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *VpnGatewaysListCall) PageToken(pageToken string) *VpnGatewaysListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysListCall) Fields(s ...googleapi.Field) *VpnGatewaysListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *VpnGatewaysListCall) IfNoneMatch(entityTag string) *VpnGatewaysListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysListCall) Context(ctx context.Context) *VpnGatewaysListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.list" call. +// Exactly one of *VpnGatewayList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *VpnGatewayList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *VpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*VpnGatewayList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &VpnGatewayList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of VPN gateways available to the specified project and region. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "GET", + // "id": "compute.vpnGateways.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways", + // "response": { + // "$ref": "VpnGatewayList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *VpnGatewaysListCall) Pages(ctx context.Context, f func(*VpnGatewayList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.vpnGateways.setLabels": + +type VpnGatewaysSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLabels: Sets the labels on a VpnGateway. To learn more about +// labels, read the Labeling Resources documentation. (== +// suppress_warning http-rest-shadowed ==) +func (r *VpnGatewaysService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *VpnGatewaysSetLabelsCall { + c := &VpnGatewaysSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *VpnGatewaysSetLabelsCall) RequestId(requestId string) *VpnGatewaysSetLabelsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysSetLabelsCall) Fields(s ...googleapi.Field) *VpnGatewaysSetLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysSetLabelsCall) Context(ctx context.Context) *VpnGatewaysSetLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways/{resource}/setLabels") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.setLabels" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *VpnGatewaysSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.vpnGateways.setLabels", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways/{resource}/setLabels", + // "request": { + // "$ref": "RegionSetLabelsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.vpnGateways.testIamPermissions": + +type VpnGatewaysTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. (== suppress_warning http-rest-shadowed ==) +func (r *VpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnGatewaysTestIamPermissionsCall { + c := &VpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *VpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *VpnGatewaysTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *VpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *VpnGatewaysTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *VpnGatewaysTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *VpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.vpnGateways.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *VpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. (== suppress_warning http-rest-shadowed ==)", + // "httpMethod": "POST", + // "id": "compute.vpnGateways.testIamPermissions", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.vpnTunnels.aggregatedList": type VpnTunnelsAggregatedListCall struct { @@ -107483,7 +128622,8 @@ type VpnTunnelsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of VPN tunnels. +// AggregatedList: Retrieves an aggregated list of VPN tunnels. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall { c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107590,6 +128730,7 @@ func (c *VpnTunnelsAggregatedListCall) Header() http.Header { func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107651,7 +128792,7 @@ func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTun } return ret, nil // { - // "description": "Retrieves an aggregated list of VPN tunnels.", + // "description": "Retrieves an aggregated list of VPN tunnels. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnTunnels.aggregatedList", // "parameterOrder": [ @@ -107735,7 +128876,8 @@ type VpnTunnelsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified VpnTunnel resource. +// Delete: Deletes the specified VpnTunnel resource. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel string) *VpnTunnelsDeleteCall { c := &VpnTunnelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107790,6 +128932,7 @@ func (c *VpnTunnelsDeleteCall) Header() http.Header { func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -107850,7 +128993,7 @@ func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Deletes the specified VpnTunnel resource.", + // "description": "Deletes the specified VpnTunnel resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.vpnTunnels.delete", // "parameterOrder": [ @@ -107912,7 +129055,8 @@ type VpnTunnelsGetCall struct { } // Get: Returns the specified VpnTunnel resource. Gets a list of -// available VPN tunnels by making a list() request. +// available VPN tunnels by making a list() request. (== +// suppress_warning http-rest-shadowed ==) func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall { c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -107958,6 +129102,7 @@ func (c *VpnTunnelsGetCall) Header() http.Header { func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108021,7 +129166,7 @@ func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error) } return ret, nil // { - // "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.", + // "description": "Returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnTunnels.get", // "parameterOrder": [ @@ -108078,7 +129223,8 @@ type VpnTunnelsInsertCall struct { } // Insert: Creates a VpnTunnel resource in the specified project and -// region using the data included in the request. +// region using the data included in the request. (== suppress_warning +// http-rest-shadowed ==) func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *VpnTunnel) *VpnTunnelsInsertCall { c := &VpnTunnelsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -108133,6 +129279,7 @@ func (c *VpnTunnelsInsertCall) Header() http.Header { func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108197,7 +129344,7 @@ func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", + // "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "POST", // "id": "compute.vpnTunnels.insert", // "parameterOrder": [ @@ -108253,7 +129400,8 @@ type VpnTunnelsListCall struct { } // List: Retrieves a list of VpnTunnel resources contained in the -// specified project and region. +// specified project and region. (== suppress_warning http-rest-shadowed +// ==) func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall { c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -108361,6 +129509,7 @@ func (c *VpnTunnelsListCall) Header() http.Header { func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108423,7 +129572,7 @@ func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, e } return ret, nil // { - // "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", + // "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.vpnTunnels.list", // "parameterOrder": [ @@ -108515,7 +129664,8 @@ type ZoneOperationsDeleteCall struct { header_ http.Header } -// Delete: Deletes the specified zone-specific Operations resource. +// Delete: Deletes the specified zone-specific Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/delete func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall { c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -108552,6 +129702,7 @@ func (c *ZoneOperationsDeleteCall) Header() http.Header { func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108587,7 +129738,7 @@ func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deletes the specified zone-specific Operations resource.", + // "description": "Deletes the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "DELETE", // "id": "compute.zoneOperations.delete", // "parameterOrder": [ @@ -108640,7 +129791,8 @@ type ZoneOperationsGetCall struct { header_ http.Header } -// Get: Retrieves the specified zone-specific Operations resource. +// Get: Retrieves the specified zone-specific Operations resource. (== +// suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/get func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall { c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -108687,6 +129839,7 @@ func (c *ZoneOperationsGetCall) Header() http.Header { func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108750,7 +129903,7 @@ func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Retrieves the specified zone-specific Operations resource.", + // "description": "Retrieves the specified zone-specific Operations resource. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zoneOperations.get", // "parameterOrder": [ @@ -108807,7 +129960,7 @@ type ZoneOperationsListCall struct { } // List: Retrieves a list of Operation resources contained within the -// specified zone. +// specified zone. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/list func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -108916,6 +130069,7 @@ func (c *ZoneOperationsListCall) Header() http.Header { func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -108978,7 +130132,7 @@ func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationLis } return ret, nil // { - // "description": "Retrieves a list of Operation resources contained within the specified zone.", + // "description": "Retrieves a list of Operation resources contained within the specified zone. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zoneOperations.list", // "parameterOrder": [ @@ -109071,7 +130225,8 @@ type ZonesGetCall struct { } // Get: Returns the specified Zone resource. Gets a list of available -// zones by making a list() request. +// zones by making a list() request. (== suppress_warning +// http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zones/get func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -109117,6 +130272,7 @@ func (c *ZonesGetCall) Header() http.Header { func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109179,7 +130335,7 @@ func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) { } return ret, nil // { - // "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request.", + // "description": "Returns the specified Zone resource. Gets a list of available zones by making a list() request. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zones.get", // "parameterOrder": [ @@ -109227,7 +130383,7 @@ type ZonesListCall struct { } // List: Retrieves the list of Zone resources available to the specified -// project. +// project. (== suppress_warning http-rest-shadowed ==) // For details, see https://cloud.google.com/compute/docs/reference/latest/zones/list func (r *ZonesService) List(project string) *ZonesListCall { c := &ZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -109335,6 +130491,7 @@ func (c *ZonesListCall) Header() http.Header { func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -109396,7 +130553,7 @@ func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) { } return ret, nil // { - // "description": "Retrieves the list of Zone resources available to the specified project.", + // "description": "Retrieves the list of Zone resources available to the specified project. (== suppress_warning http-rest-shadowed ==)", // "httpMethod": "GET", // "id": "compute.zones.list", // "parameterOrder": [ diff --git a/vendor/google.golang.org/api/container/v1/container-api.json b/vendor/google.golang.org/api/container/v1/container-api.json index 7cb9634b783..4c1b8b3845d 100644 --- a/vendor/google.golang.org/api/container/v1/container-api.json +++ b/vendor/google.golang.org/api/container/v1/container-api.json @@ -174,12 +174,12 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" } @@ -262,7 +262,7 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, @@ -274,12 +274,12 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" } @@ -302,7 +302,7 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, @@ -314,12 +314,12 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" } @@ -371,12 +371,12 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", "location": "query", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.", "location": "query", "type": "string" } @@ -767,7 +767,7 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, @@ -779,17 +779,17 @@ "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" } @@ -812,7 +812,7 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, @@ -824,17 +824,17 @@ "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" } @@ -857,7 +857,7 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", "location": "query", "type": "string" }, @@ -869,12 +869,12 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", "location": "query", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", "location": "query", "type": "string" } @@ -1104,17 +1104,17 @@ "type": "string" }, "operationId": { - "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "query", "type": "string" } @@ -1144,12 +1144,12 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", "location": "query", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.", "location": "query", "type": "string" } @@ -1184,13 +1184,13 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1220,19 +1220,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1261,19 +1261,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1301,13 +1301,13 @@ ], "parameters": { "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" @@ -1336,7 +1336,7 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1347,13 +1347,13 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1379,7 +1379,7 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1390,13 +1390,13 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1422,19 +1422,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1467,13 +1467,13 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" @@ -1499,19 +1499,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1540,19 +1540,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1581,19 +1581,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1622,19 +1622,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1663,19 +1663,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1704,19 +1704,19 @@ ], "parameters": { "clusterId": { - "description": "The name of the cluster to update.", + "description": "Required. The name of the cluster to update.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "description": "Required. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "description": "Required. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "location": "path", "required": true, "type": "string" @@ -1745,19 +1745,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1786,19 +1786,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1827,19 +1827,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1868,19 +1868,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1914,25 +1914,25 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -1961,19 +1961,19 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" @@ -2003,7 +2003,7 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -2014,19 +2014,19 @@ "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -2053,7 +2053,7 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -2064,19 +2064,19 @@ "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -2102,7 +2102,7 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" @@ -2113,13 +2113,13 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" @@ -2146,25 +2146,25 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to rollback.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to rollback.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to rollback.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to rollback.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -2194,25 +2194,25 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -2242,25 +2242,25 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -2290,25 +2290,25 @@ ], "parameters": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -2343,19 +2343,19 @@ ], "parameters": { "operationId": { - "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -2389,19 +2389,19 @@ "type": "string" }, "operationId": { - "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "location": "path", "required": true, "type": "string" @@ -2431,13 +2431,13 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.", "location": "path", "required": true, "type": "string" @@ -2458,7 +2458,7 @@ } } }, - "revision": "20190514", + "revision": "20191115", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2471,7 +2471,7 @@ "type": "string" }, "acceleratorType": { - "description": "The accelerator type resource name. List of supported accelerators\n[here](/compute/docs/gpus/#Introduction)", + "description": "The accelerator type resource name. List of supported accelerators\n[here](/compute/docs/gpus)", "type": "string" } }, @@ -2481,6 +2481,10 @@ "description": "Configuration for the addons that can be automatically spun up in the\ncluster, enabling additional functionality.", "id": "AddonsConfig", "properties": { + "cloudRunConfig": { + "$ref": "CloudRunConfig", + "description": "Configuration for the Cloud Run addon, which allows the user to use a\nmanaged Knative service." + }, "horizontalPodAutoscaling": { "$ref": "HorizontalPodAutoscaling", "description": "Configuration for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods." @@ -2491,7 +2495,7 @@ }, "kubernetesDashboard": { "$ref": "KubernetesDashboard", - "description": "Configuration for the Kubernetes Dashboard." + "description": "Configuration for the Kubernetes Dashboard.\nThis addon is deprecated, and will be disabled in 1.15. It is recommended\nto use the Cloud Console to manage and monitor your Kubernetes clusters,\nworkloads and applications. For more information, see:\nhttps://cloud.google.com/kubernetes-engine/docs/concepts/dashboards" }, "networkPolicyConfig": { "$ref": "NetworkPolicyConfig", @@ -2500,6 +2504,21 @@ }, "type": "object" }, + "AuthenticatorGroupsConfig": { + "description": "Configuration for returning group information from authenticators.", + "id": "AuthenticatorGroupsConfig", + "properties": { + "enabled": { + "description": "Whether this cluster should return group membership lookups\nduring authentication using a group of security groups.", + "type": "boolean" + }, + "securityGroup": { + "description": "The name of the security group-of-groups to be used. Only relevant\nif enabled = true.", + "type": "string" + } + }, + "type": "object" + }, "AutoUpgradeOptions": { "description": "AutoUpgradeOptions defines the set of options for the user to control how\nthe Auto Upgrades will proceed.", "id": "AutoUpgradeOptions", @@ -2515,6 +2534,46 @@ }, "type": "object" }, + "AutoprovisioningNodePoolDefaults": { + "description": "AutoprovisioningNodePoolDefaults contains defaults for a node pool created\nby NAP.", + "id": "AutoprovisioningNodePoolDefaults", + "properties": { + "oauthScopes": { + "description": "Scopes that are used by NAP when creating node pools. If oauth_scopes are\nspecified, service_account should be empty.", + "items": { + "type": "string" + }, + "type": "array" + }, + "serviceAccount": { + "description": "The Google Cloud Platform Service Account to be used by the node VMs. If\nservice_account is specified, scopes should be empty.", + "type": "string" + } + }, + "type": "object" + }, + "BigQueryDestination": { + "description": "Parameters for using BigQuery as the destination of resource usage export.", + "id": "BigQueryDestination", + "properties": { + "datasetId": { + "description": "The ID of a BigQuery Dataset.", + "type": "string" + } + }, + "type": "object" + }, + "BinaryAuthorization": { + "description": "Configuration for Binary Authorization.", + "id": "BinaryAuthorization", + "properties": { + "enabled": { + "description": "Enable Binary Authorization for this cluster. If enabled, all container\nimages will be validated by Binary Authorization.", + "type": "boolean" + } + }, + "type": "object" + }, "CancelOperationRequest": { "description": "CancelOperationRequest cancels a single operation.", "id": "CancelOperationRequest", @@ -2524,15 +2583,15 @@ "type": "string" }, "operationId": { - "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -2564,6 +2623,17 @@ }, "type": "object" }, + "CloudRunConfig": { + "description": "Configuration options for the Cloud Run feature.", + "id": "CloudRunConfig", + "properties": { + "disabled": { + "description": "Whether Cloud Run addon is enabled for this cluster.", + "type": "boolean" + } + }, + "type": "object" + }, "Cluster": { "description": "A Google Kubernetes Engine cluster.", "id": "Cluster", @@ -2572,6 +2642,18 @@ "$ref": "AddonsConfig", "description": "Configurations for the various addons available to run in the cluster." }, + "authenticatorGroupsConfig": { + "$ref": "AuthenticatorGroupsConfig", + "description": "Configuration controlling RBAC group membership information." + }, + "autoscaling": { + "$ref": "ClusterAutoscaling", + "description": "Cluster-level autoscaling configuration." + }, + "binaryAuthorization": { + "$ref": "BinaryAuthorization", + "description": "Configuration for Binary Authorization." + }, "clusterIpv4Cidr": { "description": "The IP address range of the container pods in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`). Leave blank to have\none automatically chosen or specify a `/14` block in `10.0.0.0/8`.", "type": "string" @@ -2600,6 +2682,10 @@ "description": "[Output only] Deprecated, use\n[NodePools.version](/kubernetes-engine/docs/reference/rest/v1/projects.zones.clusters.nodePools)\ninstead. The current version of the node software components. If they are\ncurrently at multiple versions because they're in the process of being\nupgraded, this reflects the minimum version of all nodes.", "type": "string" }, + "databaseEncryption": { + "$ref": "DatabaseEncryption", + "description": "Configuration of etcd encryption." + }, "defaultMaxPodsConstraint": { "$ref": "MaxPodsConstraint", "description": "The default constraint on the maximum number of pods that can be run\nsimultaneously on a node in the node pool of this cluster. Only honored\nif cluster created with IP Alias support." @@ -2664,7 +2750,7 @@ "type": "array" }, "loggingService": { - "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* `logging.googleapis.com` - the Google Cloud Logging service.\n* `none` - no logs will be exported from the cluster.\n* if left as an empty string,`logging.googleapis.com` will be used.", + "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* \"logging.googleapis.com/kubernetes\" - the Google Cloud Logging\nservice with Kubernetes-native resource model\n* `logging.googleapis.com` - the Google Cloud Logging service.\n* `none` - no logs will be exported from the cluster.\n* if left as an empty string,`logging.googleapis.com` will be used.", "type": "string" }, "maintenancePolicy": { @@ -2684,7 +2770,7 @@ "type": "string" }, "name": { - "description": "The name of this cluster. The name must be unique within this project\nand zone, and can be up to 40 characters with the following restrictions:\n\n* Lowercase letters, numbers, and hyphens only.\n* Must start with a letter.\n* Must end with a number or a letter.", + "description": "The name of this cluster. The name must be unique within this project\nand location (e.g. zone or region), and can be up to 40 characters with\nthe following restrictions:\n\n* Lowercase letters, numbers, and hyphens only.\n* Must start with a letter.\n* Must end with a number or a letter.", "type": "string" }, "network": { @@ -2726,6 +2812,10 @@ "description": "The resource labels for the cluster to use to annotate any related\nGoogle Compute Engine resources.", "type": "object" }, + "resourceUsageExportConfig": { + "$ref": "ResourceUsageExportConfig", + "description": "Configuration for exporting resource usages. Resource usage export is\ndisabled when this config is unspecified." + }, "selfLink": { "description": "[Output only] Server-defined URL for the resource.", "type": "string" @@ -2768,6 +2858,10 @@ "description": "[Output only] The IP address range of the Cloud TPUs in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `1.2.3.4/29`).", "type": "string" }, + "verticalPodAutoscaling": { + "$ref": "VerticalPodAutoscaling", + "description": "Cluster-level Vertical Pod Autoscaling configuration." + }, "zone": { "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use location instead.", "type": "string" @@ -2775,6 +2869,35 @@ }, "type": "object" }, + "ClusterAutoscaling": { + "description": "ClusterAutoscaling contains global, per-cluster information\nrequired by Cluster Autoscaler to automatically adjust\nthe size of the cluster and create/delete\nnode pools based on the current needs.", + "id": "ClusterAutoscaling", + "properties": { + "autoprovisioningLocations": { + "description": "The list of Google Compute Engine [zones](/compute/docs/zones#available)\nin which the NodePool's nodes can be created by NAP.", + "items": { + "type": "string" + }, + "type": "array" + }, + "autoprovisioningNodePoolDefaults": { + "$ref": "AutoprovisioningNodePoolDefaults", + "description": "AutoprovisioningNodePoolDefaults contains defaults for a node pool\ncreated by NAP." + }, + "enableNodeAutoprovisioning": { + "description": "Enables automatic node pool creation and deletion.", + "type": "boolean" + }, + "resourceLimits": { + "description": "Contains global constraints regarding minimum and maximum\namount of resources in the cluster.", + "items": { + "$ref": "ResourceLimit" + }, + "type": "array" + } + }, + "type": "object" + }, "ClusterUpdate": { "description": "ClusterUpdate describes an update to the cluster. Exactly one update can\nbe applied to a cluster with each request, so at most one field can be\nprovided.", "id": "ClusterUpdate", @@ -2783,10 +2906,26 @@ "$ref": "AddonsConfig", "description": "Configurations for the various addons available to run in the cluster." }, + "desiredBinaryAuthorization": { + "$ref": "BinaryAuthorization", + "description": "The desired configuration options for the Binary Authorization feature." + }, + "desiredClusterAutoscaling": { + "$ref": "ClusterAutoscaling", + "description": "Cluster-level autoscaling configuration." + }, + "desiredDatabaseEncryption": { + "$ref": "DatabaseEncryption", + "description": "Configuration of etcd encryption." + }, "desiredImageType": { "description": "The desired image type for the node pool.\nNOTE: Set the \"desired_node_pool\" field as well.", "type": "string" }, + "desiredIntraNodeVisibilityConfig": { + "$ref": "IntraNodeVisibilityConfig", + "description": "The desired config of Intra-node visibility." + }, "desiredLocations": { "description": "The desired list of Google Compute Engine\n[zones](/compute/docs/zones#available) in which the cluster's nodes\nshould be located. Changing the locations a cluster is in will result\nin nodes being either created or removed from the cluster, depending on\nwhether locations are being added or removed.\n\nThis list must always include the cluster's primary zone.", "items": { @@ -2794,6 +2933,10 @@ }, "type": "array" }, + "desiredLoggingService": { + "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* \"logging.googleapis.com/kubernetes\" - the Google Cloud Logging\nservice with Kubernetes-native resource model\n* \"logging.googleapis.com\" - the Google Cloud Logging service\n* \"none\" - no logs will be exported from the cluster", + "type": "string" + }, "desiredMasterAuthorizedNetworksConfig": { "$ref": "MasterAuthorizedNetworksConfig", "description": "The desired configuration options for master authorized networks feature." @@ -2803,7 +2946,7 @@ "type": "string" }, "desiredMonitoringService": { - "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster", + "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com/kubernetes\" - the Google Cloud Monitoring\nservice with Kubernetes-native resource model\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster", "type": "string" }, "desiredNodePoolAutoscaling": { @@ -2817,6 +2960,14 @@ "desiredNodeVersion": { "description": "The Kubernetes version to change the nodes to (typically an\nupgrade).\n\nUsers may specify either explicit versions offered by\nKubernetes Engine or version aliases, which have the following behavior:\n\n- \"latest\": picks the highest valid Kubernetes version\n- \"1.X\": picks the highest valid patch+gke.N patch in the 1.X version\n- \"1.X.Y\": picks the highest valid gke.N patch in the 1.X.Y version\n- \"1.X.Y-gke.N\": picks an explicit Kubernetes version\n- \"-\": picks the Kubernetes master version", "type": "string" + }, + "desiredResourceUsageExportConfig": { + "$ref": "ResourceUsageExportConfig", + "description": "The desired configuration for exporting resource usage." + }, + "desiredVerticalPodAutoscaling": { + "$ref": "VerticalPodAutoscaling", + "description": "Cluster-level Vertical Pod Autoscaling configuration." } }, "type": "object" @@ -2826,7 +2977,7 @@ "id": "CompleteIPRotationRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "name": { @@ -2834,34 +2985,45 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, "type": "object" }, + "ConsumptionMeteringConfig": { + "description": "Parameters for controlling consumption metering.", + "id": "ConsumptionMeteringConfig", + "properties": { + "enabled": { + "description": "Whether to enable consumption metering for this cluster. If enabled, a\nsecond BigQuery table will be created to hold resource consumption\nrecords.", + "type": "boolean" + } + }, + "type": "object" + }, "CreateClusterRequest": { "description": "CreateClusterRequest creates a cluster.", "id": "CreateClusterRequest", "properties": { "cluster": { "$ref": "Cluster", - "description": "A [cluster\nresource](/container-engine/reference/rest/v1/projects.zones.clusters)" + "description": "Required. A [cluster\nresource](/container-engine/reference/rest/v1/projects.zones.clusters)" }, "parent": { "description": "The parent (project and location) where the cluster will be created.\nSpecified in the format 'projects/*/locations/*'.", "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", "type": "string" } }, @@ -2872,23 +3034,23 @@ "id": "CreateNodePoolRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", "type": "string" }, "nodePool": { "$ref": "NodePool", - "description": "The node pool to create." + "description": "Required. The node pool to create." }, "parent": { "description": "The parent (project, location, cluster id) where the node pool will be\ncreated. Specified in the format\n'projects/*/locations/*/clusters/*'.", "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", "type": "string" } }, @@ -2909,6 +3071,31 @@ }, "type": "object" }, + "DatabaseEncryption": { + "description": "Configuration of etcd encryption.", + "id": "DatabaseEncryption", + "properties": { + "keyName": { + "description": "Name of CloudKMS key to use for the encryption of secrets in etcd.\nEx. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key", + "type": "string" + }, + "state": { + "description": "Denotes the state of etcd encryption.", + "enum": [ + "UNKNOWN", + "ENCRYPTED", + "DECRYPTED" + ], + "enumDescriptions": [ + "Should never be set", + "Secrets in etcd are encrypted.", + "Secrets in etcd are stored in plain text (at etcd level) - this is\nunrelated to GCE level full disk encryption." + ], + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "id": "Empty", @@ -2919,6 +3106,10 @@ "description": "GetJSONWebKeysResponse is a valid JSON Web Key Set as specififed in rfc 7517", "id": "GetJSONWebKeysResponse", "properties": { + "cacheHeader": { + "$ref": "HttpCacheControlResponseHeader", + "description": "OnePlatform automatically extracts this field and uses it to set the HTTP\nCache-Control header." + }, "keys": { "description": "The public component of the keys used by the cluster to sign token\nrequests.", "items": { @@ -2933,6 +3124,10 @@ "description": "GetOpenIDConfigResponse is an OIDC discovery document for the cluster.\nSee the OpenID Connect Discovery 1.0 specification for details.", "id": "GetOpenIDConfigResponse", "properties": { + "cacheHeader": { + "$ref": "HttpCacheControlResponseHeader", + "description": "OnePlatform automatically extracts this field and uses it to set the HTTP\nCache-Control header." + }, "claims_supported": { "description": "Supported claims.", "items": { @@ -2990,6 +3185,26 @@ }, "type": "object" }, + "HttpCacheControlResponseHeader": { + "description": "RFC-2616: cache control support", + "id": "HttpCacheControlResponseHeader", + "properties": { + "age": { + "description": "14.6 response cache age, in seconds since the response is generated", + "format": "int64", + "type": "string" + }, + "directive": { + "description": "14.9 request and response directives", + "type": "string" + }, + "expires": { + "description": "14.21 response cache expires, in RFC 1123 date format", + "type": "string" + } + }, + "type": "object" + }, "HttpLoadBalancing": { "description": "Configuration options for the HTTP (L7) load balancing controller addon,\nwhich makes it easy to set up HTTP load balancers for services in a cluster.", "id": "HttpLoadBalancing", @@ -3056,6 +3271,17 @@ }, "type": "object" }, + "IntraNodeVisibilityConfig": { + "description": "IntraNodeVisibilityConfig contains the desired config of the intra-node\nvisibility on this cluster.", + "id": "IntraNodeVisibilityConfig", + "properties": { + "enabled": { + "description": "Enables intra node visibility for this cluster.", + "type": "boolean" + } + }, + "type": "object" + }, "Jwk": { "description": "Jwk is a JSON Web Key as specified in RFC 7517", "id": "Jwk", @@ -3199,6 +3425,10 @@ "description": "MaintenancePolicy defines the maintenance policy to be used for the cluster.", "id": "MaintenancePolicy", "properties": { + "resourceVersion": { + "description": "A hash identifying the version of this policy, so that updates to fields of\nthe policy won't accidentally undo intermediate changes (and so that users\nof the API unaware of some fields won't accidentally remove other fields).\nMake a \u003ccode\u003eget()\u003c/code\u003e request to the cluster to get the current\nresource version and include it with requests to set the policy.", + "type": "string" + }, "window": { "$ref": "MaintenanceWindow", "description": "Specifies the maintenance window in which maintenance may be performed." @@ -3213,6 +3443,17 @@ "dailyMaintenanceWindow": { "$ref": "DailyMaintenanceWindow", "description": "DailyMaintenanceWindow specifies a daily maintenance operation window." + }, + "maintenanceExclusions": { + "additionalProperties": { + "$ref": "TimeWindow" + }, + "description": "Exceptions to maintenance window. Non-emergency maintenance should not\noccur in these windows.", + "type": "object" + }, + "recurringWindow": { + "$ref": "RecurringTimeWindow", + "description": "RecurringWindow specifies some number of recurring time periods for\nmaintenance to occur. The time windows may be overlapping. If no\nmaintenance windows are set, maintenance can occur at any time." } }, "type": "object" @@ -3282,6 +3523,10 @@ "description": "NetworkConfig reports the relative names of network \u0026 subnetwork.", "id": "NetworkConfig", "properties": { + "enableIntraNodeVisibility": { + "description": "Whether Intra-node visibility is enabled for this cluster.\nThis makes same node pod to pod traffic visible for VPC network.", + "type": "boolean" + }, "network": { "description": "Output only. The relative name of the Google Compute Engine\nnetwork(/compute/docs/networks-and-firewalls#networks) to which\nthe cluster is connected.\nExample: projects/my-project/global/networks/my-network", "type": "string" @@ -3359,7 +3604,7 @@ "type": "object" }, "localSsdCount": { - "description": "The number of local SSD disks to be attached to the node.\n\nThe limit for this value is dependant upon the maximum number of\ndisks available on a machine per zone. See:\nhttps://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits\nfor more information.", + "description": "The number of local SSD disks to be attached to the node.\n\nThe limit for this value is dependent upon the maximum number of\ndisks available on a machine per zone. See:\nhttps://cloud.google.com/compute/docs/disks/local-ssd\nfor more information.", "format": "int32", "type": "integer" }, @@ -3371,7 +3616,7 @@ "additionalProperties": { "type": "string" }, - "description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"containerd-configure-sh\"\n \"enable-os-login\"\n \"gci-update-strategy\"\n \"gci-ensure-gke-docker\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.", + "description": "The metadata key/value pairs assigned to instances in the cluster.\n\nKeys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes\nin length. These are reflected as part of a URL in the metadata server.\nAdditionally, to avoid ambiguity, keys must not conflict with any other\nmetadata keys for the project or be one of the reserved keys:\n \"cluster-location\"\n \"cluster-name\"\n \"cluster-uid\"\n \"configure-sh\"\n \"containerd-configure-sh\"\n \"enable-os-login\"\n \"gci-update-strategy\"\n \"gci-ensure-gke-docker\"\n \"instance-template\"\n \"kube-env\"\n \"startup-script\"\n \"user-data\"\n \"disable-address-manager\"\n \"windows-startup-script-ps1\"\n \"common-psm1\"\n \"k8s-node-setup-psm1\"\n \"install-ssh-psm1\"\n \"user-profile-psm1\"\n \"serial-port-logging-enable\"\n\nValues are free-form strings, and only have meaning as interpreted by\nthe image running in the instance. The only restriction placed on them is\nthat each value's size must be less than or equal to 32 KB.\n\nThe total size of all keys and values must be less than 512 KB.", "type": "object" }, "minCpuPlatform": { @@ -3393,6 +3638,10 @@ "description": "The Google Cloud Platform Service Account to be used by the node VMs. If\nno Service Account is specified, the \"default\" service account is used.", "type": "string" }, + "shieldedInstanceConfig": { + "$ref": "ShieldedInstanceConfig", + "description": "Shielded Instance options." + }, "tags": { "description": "The list of instance tags applied to all nodes. Tags are used to identify\nvalid sources or targets for network firewalls and are specified by\nthe client during cluster or node pool creation. Each tag within the list\nmust comply with RFC1035.", "items": { @@ -3518,6 +3767,10 @@ "description": "NodePoolAutoscaling contains information required by cluster autoscaler to\nadjust the size of the node pool to the current cluster usage.", "id": "NodePoolAutoscaling", "properties": { + "autoprovisioned": { + "description": "Can this node pool be deleted automatically.", + "type": "boolean" + }, "enabled": { "description": "Is autoscaling enabled for this node pool.", "type": "boolean" @@ -3710,12 +3963,67 @@ }, "type": "object" }, + "RecurringTimeWindow": { + "description": "Represents an arbitrary window of time that recurs.", + "id": "RecurringTimeWindow", + "properties": { + "recurrence": { + "description": "An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how\nthis window reccurs. They go on for the span of time between the start and\nend time.\n\nFor example, to have something repeat every weekday, you'd use:\n \u003ccode\u003eFREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR\u003c/code\u003e\nTo repeat some window daily (equivalent to the DailyMaintenanceWindow):\n \u003ccode\u003eFREQ=DAILY\u003c/code\u003e\nFor the first weekend of every month:\n \u003ccode\u003eFREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU\u003c/code\u003e\nThis specifies how frequently the window starts. Eg, if you wanted to have\na 9-5 UTC-4 window every weekday, you'd use something like:\n\u003ccode\u003e\n start time = 2019-01-01T09:00:00-0400\n end time = 2019-01-01T17:00:00-0400\n recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR\n\u003c/code\u003e\nWindows can span multiple days. Eg, to make the window encompass every\nweekend from midnight Saturday till the last minute of Sunday UTC:\n\u003ccode\u003e\n start time = 2019-01-05T00:00:00Z\n end time = 2019-01-07T23:59:00Z\n recurrence = FREQ=WEEKLY;BYDAY=SA\n\u003c/code\u003e\nNote the start and end time's specific dates are largely arbitrary except\nto specify duration of the window and when it first starts.\nThe FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported.", + "type": "string" + }, + "window": { + "$ref": "TimeWindow", + "description": "The window of the first recurrence." + } + }, + "type": "object" + }, + "ResourceLimit": { + "description": "Contains information about amount of some resource in the cluster.\nFor memory, value should be in GB.", + "id": "ResourceLimit", + "properties": { + "maximum": { + "description": "Maximum amount of the resource in the cluster.", + "format": "int64", + "type": "string" + }, + "minimum": { + "description": "Minimum amount of the resource in the cluster.", + "format": "int64", + "type": "string" + }, + "resourceType": { + "description": "Resource name \"cpu\", \"memory\" or gpu-specific string.", + "type": "string" + } + }, + "type": "object" + }, + "ResourceUsageExportConfig": { + "description": "Configuration for exporting cluster resource usages.", + "id": "ResourceUsageExportConfig", + "properties": { + "bigqueryDestination": { + "$ref": "BigQueryDestination", + "description": "Configuration to use BigQuery as usage export destination." + }, + "consumptionMeteringConfig": { + "$ref": "ConsumptionMeteringConfig", + "description": "Configuration to enable resource consumption metering." + }, + "enableNetworkEgressMetering": { + "description": "Whether to enable network egress metering for this cluster. If enabled, a\ndaemonset will be created in the cluster to meter network egress traffic.", + "type": "boolean" + } + }, + "type": "object" + }, "RollbackNodePoolUpgradeRequest": { "description": "RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed\nNodePool upgrade. This will be an no-op if the last upgrade successfully\ncompleted.", "id": "RollbackNodePoolUpgradeRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster to rollback.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to rollback.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "name": { @@ -3723,15 +4031,15 @@ "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to rollback.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to rollback.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -3779,10 +4087,10 @@ "properties": { "addonsConfig": { "$ref": "AddonsConfig", - "description": "The desired configurations for the various addons available to run in the\ncluster." + "description": "Required. The desired configurations for the various addons available to run in the\ncluster." }, "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "name": { @@ -3790,11 +4098,11 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -3805,11 +4113,11 @@ "id": "SetLabelsRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nKubernetes Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a \u003ccode\u003eget()\u003c/code\u003e request to the\nresource to get the latest fingerprint.", + "description": "Required. The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nKubernetes Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a \u003ccode\u003eget()\u003c/code\u003e request to the\nresource to get the latest fingerprint.", "type": "string" }, "name": { @@ -3817,18 +4125,18 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "resourceLabels": { "additionalProperties": { "type": "string" }, - "description": "The labels to set for that cluster.", + "description": "Required. The labels to set for that cluster.", "type": "object" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -3839,11 +4147,11 @@ "id": "SetLegacyAbacRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "enabled": { - "description": "Whether ABAC authorization will be enabled in the cluster.", + "description": "Required. Whether ABAC authorization will be enabled in the cluster.", "type": "boolean" }, "name": { @@ -3851,11 +4159,11 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -3866,11 +4174,11 @@ "id": "SetLocationsRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "locations": { - "description": "The desired list of Google Compute Engine\n[zones](/compute/docs/zones#available) in which the cluster's nodes\nshould be located. Changing the locations a cluster is in will result\nin nodes being either created or removed from the cluster, depending on\nwhether locations are being added or removed.\n\nThis list must always include the cluster's primary zone.", + "description": "Required. The desired list of Google Compute Engine\n[zones](/compute/docs/zones#available) in which the cluster's nodes\nshould be located. Changing the locations a cluster is in will result\nin nodes being either created or removed from the cluster, depending on\nwhether locations are being added or removed.\n\nThis list must always include the cluster's primary zone.", "items": { "type": "string" }, @@ -3881,11 +4189,11 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -3896,11 +4204,11 @@ "id": "SetLoggingServiceRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "loggingService": { - "description": "The logging service the cluster should use to write metrics.\nCurrently available options:\n\n* \"logging.googleapis.com\" - the Google Cloud Logging service\n* \"none\" - no metrics will be exported from the cluster", + "description": "Required. The logging service the cluster should use to write metrics.\nCurrently available options:\n\n* \"logging.googleapis.com\" - the Google Cloud Logging service\n* \"none\" - no metrics will be exported from the cluster", "type": "string" }, "name": { @@ -3908,11 +4216,11 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -3923,23 +4231,23 @@ "id": "SetMaintenancePolicyRequest", "properties": { "clusterId": { - "description": "The name of the cluster to update.", + "description": "Required. The name of the cluster to update.", "type": "string" }, "maintenancePolicy": { "$ref": "MaintenancePolicy", - "description": "The maintenance policy to be set for the cluster. An empty field\nclears the existing maintenance policy." + "description": "Required. The maintenance policy to be set for the cluster. An empty field\nclears the existing maintenance policy." }, "name": { "description": "The name (project, location, cluster id) of the cluster to set maintenance\npolicy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", "type": "string" }, "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "description": "Required. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", "type": "string" }, "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "description": "Required. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "type": "string" } }, @@ -3950,7 +4258,7 @@ "id": "SetMasterAuthRequest", "properties": { "action": { - "description": "The exact form of action to be taken on the master auth.", + "description": "Required. The exact form of action to be taken on the master auth.", "enum": [ "UNKNOWN", "SET_PASSWORD", @@ -3966,7 +4274,7 @@ "type": "string" }, "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "name": { @@ -3974,15 +4282,15 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "update": { "$ref": "MasterAuth", - "description": "A description of the update." + "description": "Required. A description of the update." }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -3993,11 +4301,11 @@ "id": "SetMonitoringServiceRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "monitoringService": { - "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster", + "description": "Required. The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com/kubernetes\" - the Google Cloud Monitoring\nservice with Kubernetes-native resource model\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster", "type": "string" }, "name": { @@ -4005,11 +4313,11 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -4020,7 +4328,7 @@ "id": "SetNetworkPolicyRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "name": { @@ -4029,14 +4337,14 @@ }, "networkPolicy": { "$ref": "NetworkPolicy", - "description": "Configuration options for the NetworkPolicy feature." + "description": "Required. Configuration options for the NetworkPolicy feature." }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -4048,10 +4356,10 @@ "properties": { "autoscaling": { "$ref": "NodePoolAutoscaling", - "description": "Autoscaling configuration for the node pool." + "description": "Required. Autoscaling configuration for the node pool." }, "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "name": { @@ -4059,15 +4367,15 @@ "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -4078,27 +4386,27 @@ "id": "SetNodePoolManagementRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "management": { "$ref": "NodeManagement", - "description": "NodeManagement configuration for the node pool." + "description": "Required. NodeManagement configuration for the node pool." }, "name": { "description": "The name (project, location, cluster, node pool id) of the node pool to set\nmanagement properties. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -4109,7 +4417,7 @@ "id": "SetNodePoolSizeRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "name": { @@ -4117,31 +4425,46 @@ "type": "string" }, "nodeCount": { - "description": "The desired node count for the pool.", + "description": "Required. The desired node count for the pool.", "format": "int32", "type": "integer" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, "type": "object" }, + "ShieldedInstanceConfig": { + "description": "A set of Shielded Instance options.", + "id": "ShieldedInstanceConfig", + "properties": { + "enableIntegrityMonitoring": { + "description": "Defines whether the instance has integrity monitoring enabled.\n\nEnables monitoring and attestation of the boot integrity of the instance.\nThe attestation is performed against the integrity policy baseline. This\nbaseline is initially derived from the implicitly trusted boot image when\nthe instance is created.", + "type": "boolean" + }, + "enableSecureBoot": { + "description": "Defines whether the instance has Secure Boot enabled.\n\nSecure Boot helps ensure that the system only runs authentic software by\nverifying the digital signature of all boot components, and halting the\nboot process if signature verification fails.", + "type": "boolean" + } + }, + "type": "object" + }, "StartIPRotationRequest": { "description": "StartIPRotationRequest creates a new IP for the cluster and then performs\na node upgrade on each node pool to point to the new IP.", "id": "StartIPRotationRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "name": { @@ -4149,7 +4472,7 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "rotateCredentials": { @@ -4157,7 +4480,7 @@ "type": "boolean" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -4174,14 +4497,16 @@ "GCE_STOCKOUT", "GKE_SERVICE_ACCOUNT_DELETED", "GCE_QUOTA_EXCEEDED", - "SET_BY_OPERATOR" + "SET_BY_OPERATOR", + "CLOUD_KMS_KEY_ERROR" ], "enumDescriptions": [ "UNKNOWN indicates a generic condition.", "GCE_STOCKOUT indicates a Google Compute Engine stockout.", "GKE_SERVICE_ACCOUNT_DELETED indicates that the user deleted their robot\nservice account.", "Google Compute Engine quota was exceeded.", - "Cluster state was manually changed by an SRE due to a system logic error.\nMore codes TBA" + "Cluster state was manually changed by an SRE due to a system logic error.", + "Unable to perform an encrypt operation against the CloudKMS key used for\netcd level encryption.\nMore codes TBA" ], "type": "string" }, @@ -4192,12 +4517,29 @@ }, "type": "object" }, + "TimeWindow": { + "description": "Represents an arbitrary window of time.", + "id": "TimeWindow", + "properties": { + "endTime": { + "description": "The time that the window ends. The end time should take place after the\nstart time.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "The time that the window first starts.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "UpdateClusterRequest": { "description": "UpdateClusterRequest updates the settings of a cluster.", "id": "UpdateClusterRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "name": { @@ -4205,15 +4547,15 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "update": { "$ref": "ClusterUpdate", - "description": "A description of the update." + "description": "Required. A description of the update." }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -4224,11 +4566,11 @@ "id": "UpdateMasterRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "masterVersion": { - "description": "The Kubernetes version to change the master to.\n\nUsers may specify either explicit versions offered by Kubernetes Engine or\nversion aliases, which have the following behavior:\n\n- \"latest\": picks the highest valid Kubernetes version\n- \"1.X\": picks the highest valid patch+gke.N patch in the 1.X version\n- \"1.X.Y\": picks the highest valid gke.N patch in the 1.X.Y version\n- \"1.X.Y-gke.N\": picks an explicit Kubernetes version\n- \"-\": picks the default Kubernetes version", + "description": "Required. The Kubernetes version to change the master to.\n\nUsers may specify either explicit versions offered by Kubernetes Engine or\nversion aliases, which have the following behavior:\n\n- \"latest\": picks the highest valid Kubernetes version\n- \"1.X\": picks the highest valid patch+gke.N patch in the 1.X version\n- \"1.X.Y\": picks the highest valid gke.N patch in the 1.X.Y version\n- \"1.X.Y-gke.N\": picks an explicit Kubernetes version\n- \"-\": picks the default Kubernetes version", "type": "string" }, "name": { @@ -4236,11 +4578,11 @@ "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -4251,11 +4593,11 @@ "id": "UpdateNodePoolRequest", "properties": { "clusterId": { - "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "imageType": { - "description": "The desired image type for the node pool.", + "description": "Required. The desired image type for the node pool.", "type": "string" }, "name": { @@ -4263,19 +4605,19 @@ "type": "string" }, "nodePoolId": { - "description": "Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "nodeVersion": { - "description": "The Kubernetes version to change the nodes to (typically an\nupgrade).\n\nUsers may specify either explicit versions offered by Kubernetes Engine or\nversion aliases, which have the following behavior:\n\n- \"latest\": picks the highest valid Kubernetes version\n- \"1.X\": picks the highest valid patch+gke.N patch in the 1.X version\n- \"1.X.Y\": picks the highest valid gke.N patch in the 1.X.Y version\n- \"1.X.Y-gke.N\": picks an explicit Kubernetes version\n- \"-\": picks the Kubernetes master version", + "description": "Required. The Kubernetes version to change the nodes to (typically an\nupgrade).\n\nUsers may specify either explicit versions offered by Kubernetes Engine or\nversion aliases, which have the following behavior:\n\n- \"latest\": picks the highest valid Kubernetes version\n- \"1.X\": picks the highest valid patch+gke.N patch in the 1.X version\n- \"1.X.Y\": picks the highest valid gke.N patch in the 1.X.Y version\n- \"1.X.Y-gke.N\": picks an explicit Kubernetes version\n- \"-\": picks the Kubernetes master version", "type": "string" }, "projectId": { - "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", "type": "string" }, "zone": { - "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", "type": "string" } }, @@ -4343,6 +4685,17 @@ } }, "type": "object" + }, + "VerticalPodAutoscaling": { + "description": "VerticalPodAutoscaling contains global, per-cluster information\nrequired by Vertical Pod Autoscaler to automatically adjust\nthe resources of pods controlled by it.", + "id": "VerticalPodAutoscaling", + "properties": { + "enabled": { + "description": "Enables vertical pod autoscaling.", + "type": "boolean" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/vendor/google.golang.org/api/container/v1/container-gen.go b/vendor/google.golang.org/api/container/v1/container-gen.go index c6d02b0fd8c..55d6dacb57a 100644 --- a/vendor/google.golang.org/api/container/v1/container-gen.go +++ b/vendor/google.golang.org/api/container/v1/container-gen.go @@ -49,8 +49,8 @@ import ( "strconv" "strings" - gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + gensupport "google.golang.org/api/internal/gensupport" option "google.golang.org/api/option" htransport "google.golang.org/api/transport/http" ) @@ -280,7 +280,7 @@ type AcceleratorConfig struct { // AcceleratorType: The accelerator type resource name. List of // supported accelerators - // [here](/compute/docs/gpus/#Introduction) + // [here](/compute/docs/gpus) AcceleratorType string `json:"acceleratorType,omitempty"` // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to @@ -311,6 +311,11 @@ func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { // spun up in the // cluster, enabling additional functionality. type AddonsConfig struct { + // CloudRunConfig: Configuration for the Cloud Run addon, which allows + // the user to use a + // managed Knative service. + CloudRunConfig *CloudRunConfig `json:"cloudRunConfig,omitempty"` + // HorizontalPodAutoscaling: Configuration for the horizontal pod // autoscaling feature, which // increases or decreases the number of replica pods a replication @@ -325,6 +330,14 @@ type AddonsConfig struct { HttpLoadBalancing *HttpLoadBalancing `json:"httpLoadBalancing,omitempty"` // KubernetesDashboard: Configuration for the Kubernetes Dashboard. + // This addon is deprecated, and will be disabled in 1.15. It is + // recommended + // to use the Cloud Console to manage and monitor your Kubernetes + // clusters, + // workloads and applications. For more information, + // see: + // https://cloud.google.com/kubernetes-engine/docs/concepts/dashboar + // ds KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"` // NetworkPolicyConfig: Configuration for NetworkPolicy. This only @@ -334,19 +347,18 @@ type AddonsConfig struct { // is enabled for the nodes. NetworkPolicyConfig *NetworkPolicyConfig `json:"networkPolicyConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "HorizontalPodAutoscaling") to unconditionally include in API - // requests. By default, fields with empty values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "CloudRunConfig") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HorizontalPodAutoscaling") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "CloudRunConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. @@ -359,6 +371,42 @@ func (s *AddonsConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AuthenticatorGroupsConfig: Configuration for returning group +// information from authenticators. +type AuthenticatorGroupsConfig struct { + // Enabled: Whether this cluster should return group membership + // lookups + // during authentication using a group of security groups. + Enabled bool `json:"enabled,omitempty"` + + // SecurityGroup: The name of the security group-of-groups to be used. + // Only relevant + // if enabled = true. + SecurityGroup string `json:"securityGroup,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AuthenticatorGroupsConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuthenticatorGroupsConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AutoUpgradeOptions: AutoUpgradeOptions defines the set of options for // the user to control how // the Auto Upgrades will proceed. @@ -400,6 +448,102 @@ func (s *AutoUpgradeOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AutoprovisioningNodePoolDefaults: AutoprovisioningNodePoolDefaults +// contains defaults for a node pool created +// by NAP. +type AutoprovisioningNodePoolDefaults struct { + // OauthScopes: Scopes that are used by NAP when creating node pools. If + // oauth_scopes are + // specified, service_account should be empty. + OauthScopes []string `json:"oauthScopes,omitempty"` + + // ServiceAccount: The Google Cloud Platform Service Account to be used + // by the node VMs. If + // service_account is specified, scopes should be empty. + ServiceAccount string `json:"serviceAccount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OauthScopes") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "OauthScopes") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AutoprovisioningNodePoolDefaults) MarshalJSON() ([]byte, error) { + type NoMethod AutoprovisioningNodePoolDefaults + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BigQueryDestination: Parameters for using BigQuery as the destination +// of resource usage export. +type BigQueryDestination struct { + // DatasetId: The ID of a BigQuery Dataset. + DatasetId string `json:"datasetId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BigQueryDestination) MarshalJSON() ([]byte, error) { + type NoMethod BigQueryDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BinaryAuthorization: Configuration for Binary Authorization. +type BinaryAuthorization struct { + // Enabled: Enable Binary Authorization for this cluster. If enabled, + // all container + // images will be validated by Binary Authorization. + Enabled bool `json:"enabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BinaryAuthorization) MarshalJSON() ([]byte, error) { + type NoMethod BinaryAuthorization + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CancelOperationRequest: CancelOperationRequest cancels a single // operation. type CancelOperationRequest struct { @@ -408,19 +552,20 @@ type CancelOperationRequest struct { // Specified in the format 'projects/*/locations/*/operations/*'. Name string `json:"name,omitempty"` - // OperationId: Deprecated. The server-assigned `name` of the + // OperationId: Required. Deprecated. The server-assigned `name` of the // operation. // This field has been deprecated and replaced by the name field. OperationId string `json:"operationId,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the operation // resides. @@ -513,12 +658,50 @@ func (s *ClientCertificateConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CloudRunConfig: Configuration options for the Cloud Run feature. +type CloudRunConfig struct { + // Disabled: Whether Cloud Run addon is enabled for this cluster. + Disabled bool `json:"disabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Disabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloudRunConfig) MarshalJSON() ([]byte, error) { + type NoMethod CloudRunConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Cluster: A Google Kubernetes Engine cluster. type Cluster struct { // AddonsConfig: Configurations for the various addons available to run // in the cluster. AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` + // AuthenticatorGroupsConfig: Configuration controlling RBAC group + // membership information. + AuthenticatorGroupsConfig *AuthenticatorGroupsConfig `json:"authenticatorGroupsConfig,omitempty"` + + // Autoscaling: Cluster-level autoscaling configuration. + Autoscaling *ClusterAutoscaling `json:"autoscaling,omitempty"` + + // BinaryAuthorization: Configuration for Binary Authorization. + BinaryAuthorization *BinaryAuthorization `json:"binaryAuthorization,omitempty"` + // ClusterIpv4Cidr: The IP address range of the container pods in this // cluster, // in @@ -556,6 +739,9 @@ type Cluster struct { // upgraded, this reflects the minimum version of all nodes. CurrentNodeVersion string `json:"currentNodeVersion,omitempty"` + // DatabaseEncryption: Configuration of etcd encryption. + DatabaseEncryption *DatabaseEncryption `json:"databaseEncryption,omitempty"` + // DefaultMaxPodsConstraint: The default constraint on the maximum // number of pods that can be run // simultaneously on a node in the node pool of this cluster. Only @@ -669,6 +855,9 @@ type Cluster struct { // logs. // Currently available options: // + // * "logging.googleapis.com/kubernetes" - the Google Cloud + // Logging + // service with Kubernetes-native resource model // * `logging.googleapis.com` - the Google Cloud Logging service. // * `none` - no logs will be exported from the cluster. // * if left as an empty string,`logging.googleapis.com` will be used. @@ -704,8 +893,9 @@ type Cluster struct { // Name: The name of this cluster. The name must be unique within this // project - // and zone, and can be up to 40 characters with the following - // restrictions: + // and location (e.g. zone or region), and can be up to 40 characters + // with + // the following restrictions: // // * Lowercase letters, numbers, and hyphens only. // * Must start with a letter. @@ -767,6 +957,11 @@ type Cluster struct { // Google Compute Engine resources. ResourceLabels map[string]string `json:"resourceLabels,omitempty"` + // ResourceUsageExportConfig: Configuration for exporting resource + // usages. Resource usage export is + // disabled when this config is unspecified. + ResourceUsageExportConfig *ResourceUsageExportConfig `json:"resourceUsageExportConfig,omitempty"` + // SelfLink: [Output only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -824,6 +1019,10 @@ type Cluster struct { // notation (e.g. `1.2.3.4/29`). TpuIpv4CidrBlock string `json:"tpuIpv4CidrBlock,omitempty"` + // VerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling + // configuration. + VerticalPodAutoscaling *VerticalPodAutoscaling `json:"verticalPodAutoscaling,omitempty"` + // Zone: [Output only] The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the @@ -859,6 +1058,56 @@ func (s *Cluster) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ClusterAutoscaling: ClusterAutoscaling contains global, per-cluster +// information +// required by Cluster Autoscaler to automatically adjust +// the size of the cluster and create/delete +// node pools based on the current needs. +type ClusterAutoscaling struct { + // AutoprovisioningLocations: The list of Google Compute Engine + // [zones](/compute/docs/zones#available) + // in which the NodePool's nodes can be created by NAP. + AutoprovisioningLocations []string `json:"autoprovisioningLocations,omitempty"` + + // AutoprovisioningNodePoolDefaults: AutoprovisioningNodePoolDefaults + // contains defaults for a node pool + // created by NAP. + AutoprovisioningNodePoolDefaults *AutoprovisioningNodePoolDefaults `json:"autoprovisioningNodePoolDefaults,omitempty"` + + // EnableNodeAutoprovisioning: Enables automatic node pool creation and + // deletion. + EnableNodeAutoprovisioning bool `json:"enableNodeAutoprovisioning,omitempty"` + + // ResourceLimits: Contains global constraints regarding minimum and + // maximum + // amount of resources in the cluster. + ResourceLimits []*ResourceLimit `json:"resourceLimits,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AutoprovisioningLocations") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AutoprovisioningLocations") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClusterAutoscaling) MarshalJSON() ([]byte, error) { + type NoMethod ClusterAutoscaling + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ClusterUpdate: ClusterUpdate describes an update to the cluster. // Exactly one update can // be applied to a cluster with each request, so at most one field can @@ -869,10 +1118,24 @@ type ClusterUpdate struct { // to run in the cluster. DesiredAddonsConfig *AddonsConfig `json:"desiredAddonsConfig,omitempty"` + // DesiredBinaryAuthorization: The desired configuration options for the + // Binary Authorization feature. + DesiredBinaryAuthorization *BinaryAuthorization `json:"desiredBinaryAuthorization,omitempty"` + + // DesiredClusterAutoscaling: Cluster-level autoscaling configuration. + DesiredClusterAutoscaling *ClusterAutoscaling `json:"desiredClusterAutoscaling,omitempty"` + + // DesiredDatabaseEncryption: Configuration of etcd encryption. + DesiredDatabaseEncryption *DatabaseEncryption `json:"desiredDatabaseEncryption,omitempty"` + // DesiredImageType: The desired image type for the node pool. // NOTE: Set the "desired_node_pool" field as well. DesiredImageType string `json:"desiredImageType,omitempty"` + // DesiredIntraNodeVisibilityConfig: The desired config of Intra-node + // visibility. + DesiredIntraNodeVisibilityConfig *IntraNodeVisibilityConfig `json:"desiredIntraNodeVisibilityConfig,omitempty"` + // DesiredLocations: The desired list of Google Compute // Engine // [zones](/compute/docs/zones#available) in which the cluster's @@ -886,6 +1149,17 @@ type ClusterUpdate struct { // This list must always include the cluster's primary zone. DesiredLocations []string `json:"desiredLocations,omitempty"` + // DesiredLoggingService: The logging service the cluster should use to + // write logs. + // Currently available options: + // + // * "logging.googleapis.com/kubernetes" - the Google Cloud + // Logging + // service with Kubernetes-native resource model + // * "logging.googleapis.com" - the Google Cloud Logging service + // * "none" - no logs will be exported from the cluster + DesiredLoggingService string `json:"desiredLoggingService,omitempty"` + // DesiredMasterAuthorizedNetworksConfig: The desired configuration // options for master authorized networks feature. DesiredMasterAuthorizedNetworksConfig *MasterAuthorizedNetworksConfig `json:"desiredMasterAuthorizedNetworksConfig,omitempty"` @@ -909,6 +1183,9 @@ type ClusterUpdate struct { // use to write metrics. // Currently available options: // + // * "monitoring.googleapis.com/kubernetes" - the Google Cloud + // Monitoring + // service with Kubernetes-native resource model // * "monitoring.googleapis.com" - the Google Cloud Monitoring service // * "none" - no metrics will be exported from the cluster DesiredMonitoringService string `json:"desiredMonitoringService,omitempty"` @@ -945,6 +1222,14 @@ type ClusterUpdate struct { // - "-": picks the Kubernetes master version DesiredNodeVersion string `json:"desiredNodeVersion,omitempty"` + // DesiredResourceUsageExportConfig: The desired configuration for + // exporting resource usage. + DesiredResourceUsageExportConfig *ResourceUsageExportConfig `json:"desiredResourceUsageExportConfig,omitempty"` + + // DesiredVerticalPodAutoscaling: Cluster-level Vertical Pod Autoscaling + // configuration. + DesiredVerticalPodAutoscaling *VerticalPodAutoscaling `json:"desiredVerticalPodAutoscaling,omitempty"` + // ForceSendFields is a list of field names (e.g. "DesiredAddonsConfig") // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -972,7 +1257,7 @@ func (s *ClusterUpdate) MarshalJSON() ([]byte, error) { // CompleteIPRotationRequest: CompleteIPRotationRequest moves the // cluster master back into single-IP mode. type CompleteIPRotationRequest struct { - // ClusterId: Deprecated. The name of the cluster. + // ClusterId: Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` @@ -982,14 +1267,15 @@ type CompleteIPRotationRequest struct { // 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://developers.google.com/console/help/new/#projec // tnumber). // This field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -1020,9 +1306,42 @@ func (s *CompleteIPRotationRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ConsumptionMeteringConfig: Parameters for controlling consumption +// metering. +type ConsumptionMeteringConfig struct { + // Enabled: Whether to enable consumption metering for this cluster. If + // enabled, a + // second BigQuery table will be created to hold resource + // consumption + // records. + Enabled bool `json:"enabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ConsumptionMeteringConfig) MarshalJSON() ([]byte, error) { + type NoMethod ConsumptionMeteringConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateClusterRequest: CreateClusterRequest creates a cluster. type CreateClusterRequest struct { - // Cluster: A + // Cluster: Required. A // [cluster // resource](/container-engine/reference/rest/v1/projects.zones. // clusters) @@ -1033,14 +1352,15 @@ type CreateClusterRequest struct { // Specified in the format 'projects/*/locations/*'. Parent string `json:"parent,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the parent field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -1074,11 +1394,11 @@ func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) { // CreateNodePoolRequest: CreateNodePoolRequest creates a node pool for // a cluster. type CreateNodePoolRequest struct { - // ClusterId: Deprecated. The name of the cluster. + // ClusterId: Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the parent field. ClusterId string `json:"clusterId,omitempty"` - // NodePool: The node pool to create. + // NodePool: Required. The node pool to create. NodePool *NodePool `json:"nodePool,omitempty"` // Parent: The parent (project, location, cluster id) where the node @@ -1087,14 +1407,15 @@ type CreateNodePoolRequest struct { // 'projects/*/locations/*/clusters/*'. Parent string `json:"parent,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://developers.google.com/console/help/new/#projec // tnumber). // This field has been deprecated and replaced by the parent field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -1166,6 +1487,48 @@ func (s *DailyMaintenanceWindow) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DatabaseEncryption: Configuration of etcd encryption. +type DatabaseEncryption struct { + // KeyName: Name of CloudKMS key to use for the encryption of secrets in + // etcd. + // Ex. + // projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-ke + // y + KeyName string `json:"keyName,omitempty"` + + // State: Denotes the state of etcd encryption. + // + // Possible values: + // "UNKNOWN" - Should never be set + // "ENCRYPTED" - Secrets in etcd are encrypted. + // "DECRYPTED" - Secrets in etcd are stored in plain text (at etcd + // level) - this is + // unrelated to GCE level full disk encryption. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KeyName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KeyName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DatabaseEncryption) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseEncryption + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated // empty messages in your APIs. A typical example is to use it as the @@ -1187,6 +1550,11 @@ type Empty struct { // GetJSONWebKeysResponse: GetJSONWebKeysResponse is a valid JSON Web // Key Set as specififed in rfc 7517 type GetJSONWebKeysResponse struct { + // CacheHeader: OnePlatform automatically extracts this field and uses + // it to set the HTTP + // Cache-Control header. + CacheHeader *HttpCacheControlResponseHeader `json:"cacheHeader,omitempty"` + // Keys: The public component of the keys used by the cluster to sign // token // requests. @@ -1196,7 +1564,7 @@ type GetJSONWebKeysResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Keys") to + // ForceSendFields is a list of field names (e.g. "CacheHeader") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -1204,10 +1572,10 @@ type GetJSONWebKeysResponse struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Keys") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CacheHeader") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -1223,6 +1591,11 @@ func (s *GetJSONWebKeysResponse) MarshalJSON() ([]byte, error) { // document for the cluster. // See the OpenID Connect Discovery 1.0 specification for details. type GetOpenIDConfigResponse struct { + // CacheHeader: OnePlatform automatically extracts this field and uses + // it to set the HTTP + // Cache-Control header. + CacheHeader *HttpCacheControlResponseHeader `json:"cacheHeader,omitempty"` + // ClaimsSupported: Supported claims. ClaimsSupported []string `json:"claims_supported,omitempty"` @@ -1249,7 +1622,7 @@ type GetOpenIDConfigResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClaimsSupported") to + // ForceSendFields is a list of field names (e.g. "CacheHeader") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -1257,13 +1630,12 @@ type GetOpenIDConfigResponse struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClaimsSupported") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CacheHeader") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -1309,6 +1681,41 @@ func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HttpCacheControlResponseHeader: RFC-2616: cache control support +type HttpCacheControlResponseHeader struct { + // Age: 14.6 response cache age, in seconds since the response is + // generated + Age int64 `json:"age,omitempty,string"` + + // Directive: 14.9 request and response directives + Directive string `json:"directive,omitempty"` + + // Expires: 14.21 response cache expires, in RFC 1123 date format + Expires string `json:"expires,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Age") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Age") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpCacheControlResponseHeader) MarshalJSON() ([]byte, error) { + type NoMethod HttpCacheControlResponseHeader + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HttpLoadBalancing: Configuration options for the HTTP (L7) load // balancing controller addon, // which makes it easy to set up HTTP load balancers for services in a @@ -1512,6 +1919,36 @@ func (s *IPAllocationPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// IntraNodeVisibilityConfig: IntraNodeVisibilityConfig contains the +// desired config of the intra-node +// visibility on this cluster. +type IntraNodeVisibilityConfig struct { + // Enabled: Enables intra node visibility for this cluster. + Enabled bool `json:"enabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IntraNodeVisibilityConfig) MarshalJSON() ([]byte, error) { + type NoMethod IntraNodeVisibilityConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Jwk: Jwk is a JSON Web Key as specified in RFC 7517 type Jwk struct { // Alg: Algorithm. @@ -1789,11 +2226,22 @@ func (s *ListUsableSubnetworksResponse) MarshalJSON() ([]byte, error) { // MaintenancePolicy: MaintenancePolicy defines the maintenance policy // to be used for the cluster. type MaintenancePolicy struct { + // ResourceVersion: A hash identifying the version of this policy, so + // that updates to fields of + // the policy won't accidentally undo intermediate changes (and so that + // users + // of the API unaware of some fields won't accidentally remove other + // fields). + // Make a get() request to the cluster to get the + // current + // resource version and include it with requests to set the policy. + ResourceVersion string `json:"resourceVersion,omitempty"` + // Window: Specifies the maintenance window in which maintenance may be // performed. Window *MaintenanceWindow `json:"window,omitempty"` - // ForceSendFields is a list of field names (e.g. "Window") to + // ForceSendFields is a list of field names (e.g. "ResourceVersion") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -1801,12 +2249,13 @@ type MaintenancePolicy struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Window") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ResourceVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -1823,6 +2272,18 @@ type MaintenanceWindow struct { // maintenance operation window. DailyMaintenanceWindow *DailyMaintenanceWindow `json:"dailyMaintenanceWindow,omitempty"` + // MaintenanceExclusions: Exceptions to maintenance window. + // Non-emergency maintenance should not + // occur in these windows. + MaintenanceExclusions map[string]TimeWindow `json:"maintenanceExclusions,omitempty"` + + // RecurringWindow: RecurringWindow specifies some number of recurring + // time periods for + // maintenance to occur. The time windows may be overlapping. If + // no + // maintenance windows are set, maintenance can occur at any time. + RecurringWindow *RecurringTimeWindow `json:"recurringWindow,omitempty"` + // ForceSendFields is a list of field names (e.g. // "DailyMaintenanceWindow") to unconditionally include in API requests. // By default, fields with empty values are omitted from API requests. @@ -1987,6 +2448,11 @@ func (s *MaxPodsConstraint) MarshalJSON() ([]byte, error) { // NetworkConfig: NetworkConfig reports the relative names of network & // subnetwork. type NetworkConfig struct { + // EnableIntraNodeVisibility: Whether Intra-node visibility is enabled + // for this cluster. + // This makes same node pod to pod traffic visible for VPC network. + EnableIntraNodeVisibility bool `json:"enableIntraNodeVisibility,omitempty"` + // Network: Output only. The relative name of the Google Compute // Engine // network(/compute/docs/networks-and-firewalls#networks) to which @@ -2002,20 +2468,22 @@ type NetworkConfig struct { // projects/my-project/regions/us-central1/subnetworks/my-subnet Subnetwork string `json:"subnetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "Network") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "EnableIntraNodeVisibility") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Network") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "EnableIntraNodeVisibility") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -2140,12 +2608,11 @@ type NodeConfig struct { // LocalSsdCount: The number of local SSD disks to be attached to the // node. // - // The limit for this value is dependant upon the maximum number + // The limit for this value is dependent upon the maximum number // of // disks available on a machine per zone. // See: - // https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_l - // imits + // https://cloud.google.com/compute/docs/disks/local-ssd // for more information. LocalSsdCount int64 `json:"localSsdCount,omitempty"` @@ -2180,6 +2647,13 @@ type NodeConfig struct { // "kube-env" // "startup-script" // "user-data" + // "disable-address-manager" + // "windows-startup-script-ps1" + // "common-psm1" + // "k8s-node-setup-psm1" + // "install-ssh-psm1" + // "user-profile-psm1" + // "serial-port-logging-enable" // // Values are free-form strings, and only have meaning as interpreted // by @@ -2241,6 +2715,9 @@ type NodeConfig struct { // used. ServiceAccount string `json:"serviceAccount,omitempty"` + // ShieldedInstanceConfig: Shielded Instance options. + ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + // Tags: The list of instance tags applied to all nodes. Tags are used // to identify // valid sources or targets for network firewalls and are specified @@ -2450,6 +2927,9 @@ func (s *NodePool) MarshalJSON() ([]byte, error) { // required by cluster autoscaler to // adjust the size of the node pool to the current cluster usage. type NodePoolAutoscaling struct { + // Autoprovisioned: Can this node pool be deleted automatically. + Autoprovisioned bool `json:"autoprovisioned,omitempty"` + // Enabled: Is autoscaling enabled for this node pool. Enabled bool `json:"enabled,omitempty"` @@ -2463,7 +2943,7 @@ type NodePoolAutoscaling struct { // max_node_count. MinNodeCount int64 `json:"minNodeCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enabled") to + // ForceSendFields is a list of field names (e.g. "Autoprovisioned") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -2471,12 +2951,13 @@ type NodePoolAutoscaling struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enabled") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Autoprovisioned") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -2702,13 +3183,156 @@ func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RecurringTimeWindow: Represents an arbitrary window of time that +// recurs. +type RecurringTimeWindow struct { + // Recurrence: An RRULE + // (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how + // this window reccurs. They go on for the span of time between the + // start and + // end time. + // + // For example, to have something repeat every weekday, you'd use: + // FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR + // To repeat some window daily (equivalent to the + // DailyMaintenanceWindow): + // FREQ=DAILY + // For the first weekend of every month: + // FREQ=MONTHLY;BYSETPOS=1;BYDAY=SA,SU + // This specifies how frequently the window starts. Eg, if you wanted to + // have + // a 9-5 UTC-4 window every weekday, you'd use something like: + // + // start time = 2019-01-01T09:00:00-0400 + // end time = 2019-01-01T17:00:00-0400 + // recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR + // + // Windows can span multiple days. Eg, to make the window encompass + // every + // weekend from midnight Saturday till the last minute of Sunday + // UTC: + // + // start time = 2019-01-05T00:00:00Z + // end time = 2019-01-07T23:59:00Z + // recurrence = FREQ=WEEKLY;BYDAY=SA + // + // Note the start and end time's specific dates are largely arbitrary + // except + // to specify duration of the window and when it first starts. + // The FREQ values of HOURLY, MINUTELY, and SECONDLY are not supported. + Recurrence string `json:"recurrence,omitempty"` + + // Window: The window of the first recurrence. + Window *TimeWindow `json:"window,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Recurrence") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Recurrence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RecurringTimeWindow) MarshalJSON() ([]byte, error) { + type NoMethod RecurringTimeWindow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourceLimit: Contains information about amount of some resource in +// the cluster. +// For memory, value should be in GB. +type ResourceLimit struct { + // Maximum: Maximum amount of the resource in the cluster. + Maximum int64 `json:"maximum,omitempty,string"` + + // Minimum: Minimum amount of the resource in the cluster. + Minimum int64 `json:"minimum,omitempty,string"` + + // ResourceType: Resource name "cpu", "memory" or gpu-specific string. + ResourceType string `json:"resourceType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Maximum") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Maximum") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResourceLimit) MarshalJSON() ([]byte, error) { + type NoMethod ResourceLimit + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourceUsageExportConfig: Configuration for exporting cluster +// resource usages. +type ResourceUsageExportConfig struct { + // BigqueryDestination: Configuration to use BigQuery as usage export + // destination. + BigqueryDestination *BigQueryDestination `json:"bigqueryDestination,omitempty"` + + // ConsumptionMeteringConfig: Configuration to enable resource + // consumption metering. + ConsumptionMeteringConfig *ConsumptionMeteringConfig `json:"consumptionMeteringConfig,omitempty"` + + // EnableNetworkEgressMetering: Whether to enable network egress + // metering for this cluster. If enabled, a + // daemonset will be created in the cluster to meter network egress + // traffic. + EnableNetworkEgressMetering bool `json:"enableNetworkEgressMetering,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigqueryDestination") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BigqueryDestination") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ResourceUsageExportConfig) MarshalJSON() ([]byte, error) { + type NoMethod ResourceUsageExportConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RollbackNodePoolUpgradeRequest: RollbackNodePoolUpgradeRequest // rollbacks the previously Aborted or Failed // NodePool upgrade. This will be an no-op if the last upgrade // successfully // completed. type RollbackNodePoolUpgradeRequest struct { - // ClusterId: Deprecated. The name of the cluster to rollback. + // ClusterId: Required. Deprecated. The name of the cluster to + // rollback. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` @@ -2719,18 +3343,20 @@ type RollbackNodePoolUpgradeRequest struct { // 'projects/*/locations/*/clusters/*/nodePools/*'. Name string `json:"name,omitempty"` - // NodePoolId: Deprecated. The name of the node pool to rollback. + // NodePoolId: Required. Deprecated. The name of the node pool to + // rollback. // This field has been deprecated and replaced by the name field. NodePoolId string `json:"nodePoolId,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -2811,12 +3437,13 @@ func (s *ServerConfig) MarshalJSON() ([]byte, error) { // SetAddonsConfigRequest: SetAddonsConfigRequest sets the addons // associated with the cluster. type SetAddonsConfigRequest struct { - // AddonsConfig: The desired configurations for the various addons - // available to run in the + // AddonsConfig: Required. The desired configurations for the various + // addons available to run in the // cluster. AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` - // ClusterId: Deprecated. The name of the cluster to upgrade. + // ClusterId: Required. Deprecated. The name of the cluster to + // upgrade. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` @@ -2825,14 +3452,15 @@ type SetAddonsConfigRequest struct { // Specified in the format 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -2869,12 +3497,12 @@ func (s *SetAddonsConfigRequest) MarshalJSON() ([]byte, error) { // Engine // resources used by that cluster type SetLabelsRequest struct { - // ClusterId: Deprecated. The name of the cluster. + // ClusterId: Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` - // LabelFingerprint: The fingerprint of the previous set of labels for - // this resource, + // LabelFingerprint: Required. The fingerprint of the previous set of + // labels for this resource, // used to detect conflicts. The fingerprint is initially generated // by // Kubernetes Engine and changes after every request to modify or @@ -2891,17 +3519,18 @@ type SetLabelsRequest struct { // Specified in the format 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://developers.google.com/console/help/new/#projec // tnumber). // This field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // ResourceLabels: The labels to set for that cluster. + // ResourceLabels: Required. The labels to set for that cluster. ResourceLabels map[string]string `json:"resourceLabels,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -2936,11 +3565,13 @@ func (s *SetLabelsRequest) MarshalJSON() ([]byte, error) { // ABAC authorization mechanism for // a cluster. type SetLegacyAbacRequest struct { - // ClusterId: Deprecated. The name of the cluster to update. + // ClusterId: Required. Deprecated. The name of the cluster to + // update. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` - // Enabled: Whether ABAC authorization will be enabled in the cluster. + // Enabled: Required. Whether ABAC authorization will be enabled in the + // cluster. Enabled bool `json:"enabled,omitempty"` // Name: The name (project, location, cluster id) of the cluster to set @@ -2948,14 +3579,15 @@ type SetLegacyAbacRequest struct { // Specified in the format 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -2989,11 +3621,12 @@ func (s *SetLegacyAbacRequest) MarshalJSON() ([]byte, error) { // SetLocationsRequest: SetLocationsRequest sets the locations of the // cluster. type SetLocationsRequest struct { - // ClusterId: Deprecated. The name of the cluster to upgrade. + // ClusterId: Required. Deprecated. The name of the cluster to + // upgrade. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` - // Locations: The desired list of Google Compute + // Locations: Required. The desired list of Google Compute // Engine // [zones](/compute/docs/zones#available) in which the cluster's // nodes @@ -3011,14 +3644,15 @@ type SetLocationsRequest struct { // Specified in the format 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3052,12 +3686,13 @@ func (s *SetLocationsRequest) MarshalJSON() ([]byte, error) { // SetLoggingServiceRequest: SetLoggingServiceRequest sets the logging // service of a cluster. type SetLoggingServiceRequest struct { - // ClusterId: Deprecated. The name of the cluster to upgrade. + // ClusterId: Required. Deprecated. The name of the cluster to + // upgrade. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` - // LoggingService: The logging service the cluster should use to write - // metrics. + // LoggingService: Required. The logging service the cluster should use + // to write metrics. // Currently available options: // // * "logging.googleapis.com" - the Google Cloud Logging service @@ -3069,14 +3704,15 @@ type SetLoggingServiceRequest struct { // Specified in the format 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3110,11 +3746,11 @@ func (s *SetLoggingServiceRequest) MarshalJSON() ([]byte, error) { // SetMaintenancePolicyRequest: SetMaintenancePolicyRequest sets the // maintenance policy for a cluster. type SetMaintenancePolicyRequest struct { - // ClusterId: The name of the cluster to update. + // ClusterId: Required. The name of the cluster to update. ClusterId string `json:"clusterId,omitempty"` - // MaintenancePolicy: The maintenance policy to be set for the cluster. - // An empty field + // MaintenancePolicy: Required. The maintenance policy to be set for the + // cluster. An empty field // clears the existing maintenance policy. MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"` @@ -3124,12 +3760,12 @@ type SetMaintenancePolicyRequest struct { // Specified in the format 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: The Google Developers Console [project ID or + // ProjectId: Required. The Google Developers Console [project ID or // project // number](https://support.google.com/cloud/answer/6158840). ProjectId string `json:"projectId,omitempty"` - // Zone: The name of the Google Compute + // Zone: Required. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the cluster // resides. @@ -3161,7 +3797,8 @@ func (s *SetMaintenancePolicyRequest) MarshalJSON() ([]byte, error) { // SetMasterAuthRequest: SetMasterAuthRequest updates the admin password // of a cluster. type SetMasterAuthRequest struct { - // Action: The exact form of action to be taken on the master auth. + // Action: Required. The exact form of action to be taken on the master + // auth. // // Possible values: // "UNKNOWN" - Operation is unknown and will error out. @@ -3176,7 +3813,8 @@ type SetMasterAuthRequest struct { // one. Action string `json:"action,omitempty"` - // ClusterId: Deprecated. The name of the cluster to upgrade. + // ClusterId: Required. Deprecated. The name of the cluster to + // upgrade. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` @@ -3185,17 +3823,18 @@ type SetMasterAuthRequest struct { // Specified in the format 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Update: A description of the update. + // Update: Required. A description of the update. Update *MasterAuth `json:"update,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3229,14 +3868,18 @@ func (s *SetMasterAuthRequest) MarshalJSON() ([]byte, error) { // SetMonitoringServiceRequest: SetMonitoringServiceRequest sets the // monitoring service of a cluster. type SetMonitoringServiceRequest struct { - // ClusterId: Deprecated. The name of the cluster to upgrade. + // ClusterId: Required. Deprecated. The name of the cluster to + // upgrade. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` - // MonitoringService: The monitoring service the cluster should use to - // write metrics. + // MonitoringService: Required. The monitoring service the cluster + // should use to write metrics. // Currently available options: // + // * "monitoring.googleapis.com/kubernetes" - the Google Cloud + // Monitoring + // service with Kubernetes-native resource model // * "monitoring.googleapis.com" - the Google Cloud Monitoring service // * "none" - no metrics will be exported from the cluster MonitoringService string `json:"monitoringService,omitempty"` @@ -3246,14 +3889,15 @@ type SetMonitoringServiceRequest struct { // Specified in the format 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3287,7 +3931,7 @@ func (s *SetMonitoringServiceRequest) MarshalJSON() ([]byte, error) { // SetNetworkPolicyRequest: SetNetworkPolicyRequest enables/disables // network policy for a cluster. type SetNetworkPolicyRequest struct { - // ClusterId: Deprecated. The name of the cluster. + // ClusterId: Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` @@ -3296,17 +3940,19 @@ type SetNetworkPolicyRequest struct { // policy. Specified in the format 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // NetworkPolicy: Configuration options for the NetworkPolicy feature. + // NetworkPolicy: Required. Configuration options for the NetworkPolicy + // feature. NetworkPolicy *NetworkPolicy `json:"networkPolicy,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://developers.google.com/console/help/new/#projec // tnumber). // This field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3340,10 +3986,11 @@ func (s *SetNetworkPolicyRequest) MarshalJSON() ([]byte, error) { // SetNodePoolAutoscalingRequest: SetNodePoolAutoscalingRequest sets the // autoscaler settings of a node pool. type SetNodePoolAutoscalingRequest struct { - // Autoscaling: Autoscaling configuration for the node pool. + // Autoscaling: Required. Autoscaling configuration for the node pool. Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` - // ClusterId: Deprecated. The name of the cluster to upgrade. + // ClusterId: Required. Deprecated. The name of the cluster to + // upgrade. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` @@ -3354,18 +4001,20 @@ type SetNodePoolAutoscalingRequest struct { // 'projects/*/locations/*/clusters/*/nodePools/*'. Name string `json:"name,omitempty"` - // NodePoolId: Deprecated. The name of the node pool to upgrade. + // NodePoolId: Required. Deprecated. The name of the node pool to + // upgrade. // This field has been deprecated and replaced by the name field. NodePoolId string `json:"nodePoolId,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3400,11 +4049,12 @@ func (s *SetNodePoolAutoscalingRequest) MarshalJSON() ([]byte, error) { // node management properties of a node // pool. type SetNodePoolManagementRequest struct { - // ClusterId: Deprecated. The name of the cluster to update. + // ClusterId: Required. Deprecated. The name of the cluster to + // update. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` - // Management: NodeManagement configuration for the node pool. + // Management: Required. NodeManagement configuration for the node pool. Management *NodeManagement `json:"management,omitempty"` // Name: The name (project, location, cluster, node pool id) of the node @@ -3414,18 +4064,20 @@ type SetNodePoolManagementRequest struct { // 'projects/*/locations/*/clusters/*/nodePools/*'. Name string `json:"name,omitempty"` - // NodePoolId: Deprecated. The name of the node pool to update. + // NodePoolId: Required. Deprecated. The name of the node pool to + // update. // This field has been deprecated and replaced by the name field. NodePoolId string `json:"nodePoolId,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3460,7 +4112,8 @@ func (s *SetNodePoolManagementRequest) MarshalJSON() ([]byte, error) { // node // pool. type SetNodePoolSizeRequest struct { - // ClusterId: Deprecated. The name of the cluster to update. + // ClusterId: Required. Deprecated. The name of the cluster to + // update. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` @@ -3471,21 +4124,23 @@ type SetNodePoolSizeRequest struct { // 'projects/*/locations/*/clusters/*/nodePools/*'. Name string `json:"name,omitempty"` - // NodeCount: The desired node count for the pool. + // NodeCount: Required. The desired node count for the pool. NodeCount int64 `json:"nodeCount,omitempty"` - // NodePoolId: Deprecated. The name of the node pool to update. + // NodePoolId: Required. Deprecated. The name of the node pool to + // update. // This field has been deprecated and replaced by the name field. NodePoolId string `json:"nodePoolId,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3516,11 +4171,60 @@ func (s *SetNodePoolSizeRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ShieldedInstanceConfig: A set of Shielded Instance options. +type ShieldedInstanceConfig struct { + // EnableIntegrityMonitoring: Defines whether the instance has integrity + // monitoring enabled. + // + // Enables monitoring and attestation of the boot integrity of the + // instance. + // The attestation is performed against the integrity policy baseline. + // This + // baseline is initially derived from the implicitly trusted boot image + // when + // the instance is created. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + + // EnableSecureBoot: Defines whether the instance has Secure Boot + // enabled. + // + // Secure Boot helps ensure that the system only runs authentic software + // by + // verifying the digital signature of all boot components, and halting + // the + // boot process if signature verification fails. + EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StartIPRotationRequest: StartIPRotationRequest creates a new IP for // the cluster and then performs // a node upgrade on each node pool to point to the new IP. type StartIPRotationRequest struct { - // ClusterId: Deprecated. The name of the cluster. + // ClusterId: Required. Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` @@ -3530,7 +4234,8 @@ type StartIPRotationRequest struct { // 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://developers.google.com/console/help/new/#projec // tnumber). @@ -3540,7 +4245,7 @@ type StartIPRotationRequest struct { // RotateCredentials: Whether to rotate credentials during IP rotation. RotateCredentials bool `json:"rotateCredentials,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3587,6 +4292,9 @@ type StatusCondition struct { // "GCE_QUOTA_EXCEEDED" - Google Compute Engine quota was exceeded. // "SET_BY_OPERATOR" - Cluster state was manually changed by an SRE // due to a system logic error. + // "CLOUD_KMS_KEY_ERROR" - Unable to perform an encrypt operation + // against the CloudKMS key used for + // etcd level encryption. // More codes TBA Code string `json:"code,omitempty"` @@ -3616,10 +4324,44 @@ func (s *StatusCondition) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TimeWindow: Represents an arbitrary window of time. +type TimeWindow struct { + // EndTime: The time that the window ends. The end time should take + // place after the + // start time. + EndTime string `json:"endTime,omitempty"` + + // StartTime: The time that the window first starts. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TimeWindow) MarshalJSON() ([]byte, error) { + type NoMethod TimeWindow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UpdateClusterRequest: UpdateClusterRequest updates the settings of a // cluster. type UpdateClusterRequest struct { - // ClusterId: Deprecated. The name of the cluster to upgrade. + // ClusterId: Required. Deprecated. The name of the cluster to + // upgrade. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` @@ -3628,17 +4370,18 @@ type UpdateClusterRequest struct { // Specified in the format 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Update: A description of the update. + // Update: Required. A description of the update. Update *ClusterUpdate `json:"update,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3672,11 +4415,13 @@ func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) { // UpdateMasterRequest: UpdateMasterRequest updates the master of the // cluster. type UpdateMasterRequest struct { - // ClusterId: Deprecated. The name of the cluster to upgrade. + // ClusterId: Required. Deprecated. The name of the cluster to + // upgrade. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` - // MasterVersion: The Kubernetes version to change the master to. + // MasterVersion: Required. The Kubernetes version to change the master + // to. // // Users may specify either explicit versions offered by Kubernetes // Engine or @@ -3695,14 +4440,15 @@ type UpdateMasterRequest struct { // Specified in the format 'projects/*/locations/*/clusters/*'. Name string `json:"name,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3736,11 +4482,12 @@ func (s *UpdateMasterRequest) MarshalJSON() ([]byte, error) { // UpdateNodePoolRequest: UpdateNodePoolRequests update a node pool's // image and/or version. type UpdateNodePoolRequest struct { - // ClusterId: Deprecated. The name of the cluster to upgrade. + // ClusterId: Required. Deprecated. The name of the cluster to + // upgrade. // This field has been deprecated and replaced by the name field. ClusterId string `json:"clusterId,omitempty"` - // ImageType: The desired image type for the node pool. + // ImageType: Required. The desired image type for the node pool. ImageType string `json:"imageType,omitempty"` // Name: The name (project, location, cluster, node pool) of the node @@ -3750,12 +4497,13 @@ type UpdateNodePoolRequest struct { // 'projects/*/locations/*/clusters/*/nodePools/*'. Name string `json:"name,omitempty"` - // NodePoolId: Deprecated. The name of the node pool to upgrade. + // NodePoolId: Required. Deprecated. The name of the node pool to + // upgrade. // This field has been deprecated and replaced by the name field. NodePoolId string `json:"nodePoolId,omitempty"` - // NodeVersion: The Kubernetes version to change the nodes to (typically - // an + // NodeVersion: Required. The Kubernetes version to change the nodes to + // (typically an // upgrade). // // Users may specify either explicit versions offered by Kubernetes @@ -3770,14 +4518,15 @@ type UpdateNodePoolRequest struct { // - "-": picks the Kubernetes master version NodeVersion string `json:"nodeVersion,omitempty"` - // ProjectId: Deprecated. The Google Developers Console [project ID or + // ProjectId: Required. Deprecated. The Google Developers Console + // [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This // field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` - // Zone: Deprecated. The name of the Google Compute + // Zone: Required. Deprecated. The name of the Google Compute // Engine // [zone](/compute/docs/zones#available) in which the // cluster @@ -3916,6 +4665,37 @@ func (s *UsableSubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VerticalPodAutoscaling: VerticalPodAutoscaling contains global, +// per-cluster information +// required by Vertical Pod Autoscaler to automatically adjust +// the resources of pods controlled by it. +type VerticalPodAutoscaling struct { + // Enabled: Enables vertical pod autoscaling. + Enabled bool `json:"enabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VerticalPodAutoscaling) MarshalJSON() ([]byte, error) { + type NoMethod VerticalPodAutoscaling + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "container.projects.aggregated.usableSubnetworks.list": type ProjectsAggregatedUsableSubnetworksListCall struct { @@ -4004,6 +4784,7 @@ func (c *ProjectsAggregatedUsableSubnetworksListCall) Header() http.Header { func (c *ProjectsAggregatedUsableSubnetworksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4148,8 +4929,8 @@ func (r *ProjectsLocationsService) GetServerConfig(name string) *ProjectsLocatio return c } -// ProjectId sets the optional parameter "projectId": Deprecated. The -// Google Developers Console [project ID or +// ProjectId sets the optional parameter "projectId": Required. +// Deprecated. The Google Developers Console [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This @@ -4159,8 +4940,9 @@ func (c *ProjectsLocationsGetServerConfigCall) ProjectId(projectId string) *Proj return c } -// Zone sets the optional parameter "zone": Deprecated. The name of the -// Google Compute Engine +// Zone sets the optional parameter "zone": Required. Deprecated. The +// name of the Google Compute +// Engine // [zone](/compute/docs/zones#available) to return operations for. // This field has been deprecated and replaced by the name field. func (c *ProjectsLocationsGetServerConfigCall) Zone(zone string) *ProjectsLocationsGetServerConfigCall { @@ -4205,6 +4987,7 @@ func (c *ProjectsLocationsGetServerConfigCall) Header() http.Header { func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4282,12 +5065,12 @@ func (c *ProjectsLocationsGetServerConfigCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // } @@ -4349,6 +5132,7 @@ func (c *ProjectsLocationsClustersCompleteIpRotationCall) Header() http.Header { func (c *ProjectsLocationsClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4504,6 +5288,7 @@ func (c *ProjectsLocationsClustersCreateCall) Header() http.Header { func (c *ProjectsLocationsClustersCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4625,16 +5410,16 @@ func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocation return c } -// ClusterId sets the optional parameter "clusterId": Deprecated. The -// name of the cluster to delete. +// ClusterId sets the optional parameter "clusterId": Required. +// Deprecated. The name of the cluster to delete. // This field has been deprecated and replaced by the name field. func (c *ProjectsLocationsClustersDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersDeleteCall { c.urlParams_.Set("clusterId", clusterId) return c } -// ProjectId sets the optional parameter "projectId": Deprecated. The -// Google Developers Console [project ID or +// ProjectId sets the optional parameter "projectId": Required. +// Deprecated. The Google Developers Console [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This @@ -4644,8 +5429,9 @@ func (c *ProjectsLocationsClustersDeleteCall) ProjectId(projectId string) *Proje return c } -// Zone sets the optional parameter "zone": Deprecated. The name of the -// Google Compute Engine +// Zone sets the optional parameter "zone": Required. Deprecated. The +// name of the Google Compute +// Engine // [zone](/compute/docs/zones#available) in which the // cluster // resides. @@ -4682,6 +5468,7 @@ func (c *ProjectsLocationsClustersDeleteCall) Header() http.Header { func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4749,7 +5536,7 @@ func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, @@ -4761,12 +5548,12 @@ func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // } @@ -4800,16 +5587,16 @@ func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsCl return c } -// ClusterId sets the optional parameter "clusterId": Deprecated. The -// name of the cluster to retrieve. +// ClusterId sets the optional parameter "clusterId": Required. +// Deprecated. The name of the cluster to retrieve. // This field has been deprecated and replaced by the name field. func (c *ProjectsLocationsClustersGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersGetCall { c.urlParams_.Set("clusterId", clusterId) return c } -// ProjectId sets the optional parameter "projectId": Deprecated. The -// Google Developers Console [project ID or +// ProjectId sets the optional parameter "projectId": Required. +// Deprecated. The Google Developers Console [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This @@ -4819,8 +5606,9 @@ func (c *ProjectsLocationsClustersGetCall) ProjectId(projectId string) *Projects return c } -// Zone sets the optional parameter "zone": Deprecated. The name of the -// Google Compute Engine +// Zone sets the optional parameter "zone": Required. Deprecated. The +// name of the Google Compute +// Engine // [zone](/compute/docs/zones#available) in which the // cluster // resides. @@ -4867,6 +5655,7 @@ func (c *ProjectsLocationsClustersGetCall) Header() http.Header { func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -4937,7 +5726,7 @@ func (c *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cl // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, @@ -4949,12 +5738,12 @@ func (c *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cl // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // } @@ -5030,6 +5819,7 @@ func (c *ProjectsLocationsClustersGetJwksCall) Header() http.Header { func (c *ProjectsLocationsClustersGetJwksCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5135,8 +5925,8 @@ func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocation return c } -// ProjectId sets the optional parameter "projectId": Deprecated. The -// Google Developers Console [project ID or +// ProjectId sets the optional parameter "projectId": Required. +// Deprecated. The Google Developers Console [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This @@ -5146,8 +5936,9 @@ func (c *ProjectsLocationsClustersListCall) ProjectId(projectId string) *Project return c } -// Zone sets the optional parameter "zone": Deprecated. The name of the -// Google Compute Engine +// Zone sets the optional parameter "zone": Required. Deprecated. The +// name of the Google Compute +// Engine // [zone](/compute/docs/zones#available) in which the cluster // resides, or "-" for all zones. // This field has been deprecated and replaced by the parent field. @@ -5193,6 +5984,7 @@ func (c *ProjectsLocationsClustersListCall) Header() http.Header { func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5270,12 +6062,12 @@ func (c *ProjectsLocationsClustersListCall) Do(opts ...googleapi.CallOption) (*L // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", // "location": "query", // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.", // "location": "query", // "type": "string" // } @@ -5337,6 +6129,7 @@ func (c *ProjectsLocationsClustersSetAddonsCall) Header() http.Header { func (c *ProjectsLocationsClustersSetAddonsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5477,6 +6270,7 @@ func (c *ProjectsLocationsClustersSetLegacyAbacCall) Header() http.Header { func (c *ProjectsLocationsClustersSetLegacyAbacCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5616,6 +6410,7 @@ func (c *ProjectsLocationsClustersSetLocationsCall) Header() http.Header { func (c *ProjectsLocationsClustersSetLocationsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5755,6 +6550,7 @@ func (c *ProjectsLocationsClustersSetLoggingCall) Header() http.Header { func (c *ProjectsLocationsClustersSetLoggingCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -5894,6 +6690,7 @@ func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Header() http.Header func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6037,6 +6834,7 @@ func (c *ProjectsLocationsClustersSetMasterAuthCall) Header() http.Header { func (c *ProjectsLocationsClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6176,6 +6974,7 @@ func (c *ProjectsLocationsClustersSetMonitoringCall) Header() http.Header { func (c *ProjectsLocationsClustersSetMonitoringCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6315,6 +7114,7 @@ func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Header() http.Header { func (c *ProjectsLocationsClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6454,6 +7254,7 @@ func (c *ProjectsLocationsClustersSetResourceLabelsCall) Header() http.Header { func (c *ProjectsLocationsClustersSetResourceLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6593,6 +7394,7 @@ func (c *ProjectsLocationsClustersStartIpRotationCall) Header() http.Header { func (c *ProjectsLocationsClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6732,6 +7534,7 @@ func (c *ProjectsLocationsClustersUpdateCall) Header() http.Header { func (c *ProjectsLocationsClustersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -6871,6 +7674,7 @@ func (c *ProjectsLocationsClustersUpdateMasterCall) Header() http.Header { func (c *ProjectsLocationsClustersUpdateMasterCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7010,6 +7814,7 @@ func (c *ProjectsLocationsClustersNodePoolsCreateCall) Header() http.Header { func (c *ProjectsLocationsClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7120,24 +7925,24 @@ func (r *ProjectsLocationsClustersNodePoolsService) Delete(name string) *Project return c } -// ClusterId sets the optional parameter "clusterId": Deprecated. The -// name of the cluster. +// ClusterId sets the optional parameter "clusterId": Required. +// Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsDeleteCall { c.urlParams_.Set("clusterId", clusterId) return c } -// NodePoolId sets the optional parameter "nodePoolId": Deprecated. The -// name of the node pool to delete. +// NodePoolId sets the optional parameter "nodePoolId": Required. +// Deprecated. The name of the node pool to delete. // This field has been deprecated and replaced by the name field. func (c *ProjectsLocationsClustersNodePoolsDeleteCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsDeleteCall { c.urlParams_.Set("nodePoolId", nodePoolId) return c } -// ProjectId sets the optional parameter "projectId": Deprecated. The -// Google Developers Console [project ID or +// ProjectId sets the optional parameter "projectId": Required. +// Deprecated. The Google Developers Console [project ID or // project // number](https://developers.google.com/console/help/new/#projec // tnumber). @@ -7147,8 +7952,9 @@ func (c *ProjectsLocationsClustersNodePoolsDeleteCall) ProjectId(projectId strin return c } -// Zone sets the optional parameter "zone": Deprecated. The name of the -// Google Compute Engine +// Zone sets the optional parameter "zone": Required. Deprecated. The +// name of the Google Compute +// Engine // [zone](/compute/docs/zones#available) in which the // cluster // resides. @@ -7185,6 +7991,7 @@ func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Header() http.Header { func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7252,7 +8059,7 @@ func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Do(opts ...googleapi.Call // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, @@ -7264,17 +8071,17 @@ func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Do(opts ...googleapi.Call // "type": "string" // }, // "nodePoolId": { - // "description": "Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // } @@ -7308,24 +8115,24 @@ func (r *ProjectsLocationsClustersNodePoolsService) Get(name string) *ProjectsLo return c } -// ClusterId sets the optional parameter "clusterId": Deprecated. The -// name of the cluster. +// ClusterId sets the optional parameter "clusterId": Required. +// Deprecated. The name of the cluster. // This field has been deprecated and replaced by the name field. func (c *ProjectsLocationsClustersNodePoolsGetCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsGetCall { c.urlParams_.Set("clusterId", clusterId) return c } -// NodePoolId sets the optional parameter "nodePoolId": Deprecated. The -// name of the node pool. +// NodePoolId sets the optional parameter "nodePoolId": Required. +// Deprecated. The name of the node pool. // This field has been deprecated and replaced by the name field. func (c *ProjectsLocationsClustersNodePoolsGetCall) NodePoolId(nodePoolId string) *ProjectsLocationsClustersNodePoolsGetCall { c.urlParams_.Set("nodePoolId", nodePoolId) return c } -// ProjectId sets the optional parameter "projectId": Deprecated. The -// Google Developers Console [project ID or +// ProjectId sets the optional parameter "projectId": Required. +// Deprecated. The Google Developers Console [project ID or // project // number](https://developers.google.com/console/help/new/#projec // tnumber). @@ -7335,8 +8142,9 @@ func (c *ProjectsLocationsClustersNodePoolsGetCall) ProjectId(projectId string) return c } -// Zone sets the optional parameter "zone": Deprecated. The name of the -// Google Compute Engine +// Zone sets the optional parameter "zone": Required. Deprecated. The +// name of the Google Compute +// Engine // [zone](/compute/docs/zones#available) in which the // cluster // resides. @@ -7383,6 +8191,7 @@ func (c *ProjectsLocationsClustersNodePoolsGetCall) Header() http.Header { func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7453,7 +8262,7 @@ func (c *ProjectsLocationsClustersNodePoolsGetCall) Do(opts ...googleapi.CallOpt // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, @@ -7465,17 +8274,17 @@ func (c *ProjectsLocationsClustersNodePoolsGetCall) Do(opts ...googleapi.CallOpt // "type": "string" // }, // "nodePoolId": { - // "description": "Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // } @@ -7509,16 +8318,16 @@ func (r *ProjectsLocationsClustersNodePoolsService) List(parent string) *Project return c } -// ClusterId sets the optional parameter "clusterId": Deprecated. The -// name of the cluster. +// ClusterId sets the optional parameter "clusterId": Required. +// Deprecated. The name of the cluster. // This field has been deprecated and replaced by the parent field. func (c *ProjectsLocationsClustersNodePoolsListCall) ClusterId(clusterId string) *ProjectsLocationsClustersNodePoolsListCall { c.urlParams_.Set("clusterId", clusterId) return c } -// ProjectId sets the optional parameter "projectId": Deprecated. The -// Google Developers Console [project ID or +// ProjectId sets the optional parameter "projectId": Required. +// Deprecated. The Google Developers Console [project ID or // project // number](https://developers.google.com/console/help/new/#projec // tnumber). @@ -7528,8 +8337,9 @@ func (c *ProjectsLocationsClustersNodePoolsListCall) ProjectId(projectId string) return c } -// Zone sets the optional parameter "zone": Deprecated. The name of the -// Google Compute Engine +// Zone sets the optional parameter "zone": Required. Deprecated. The +// name of the Google Compute +// Engine // [zone](/compute/docs/zones#available) in which the // cluster // resides. @@ -7576,6 +8386,7 @@ func (c *ProjectsLocationsClustersNodePoolsListCall) Header() http.Header { func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7646,7 +8457,7 @@ func (c *ProjectsLocationsClustersNodePoolsListCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", // "location": "query", // "type": "string" // }, @@ -7658,12 +8469,12 @@ func (c *ProjectsLocationsClustersNodePoolsListCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", // "location": "query", // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", // "location": "query", // "type": "string" // } @@ -7727,6 +8538,7 @@ func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Header() http.Header { func (c *ProjectsLocationsClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -7867,6 +8679,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Header() http.Hea func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8006,6 +8819,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Header() http.Head func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8145,6 +8959,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Header() http.Header { func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8285,6 +9100,7 @@ func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Header() http.Header { func (c *ProjectsLocationsClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8443,6 +9259,7 @@ func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Header() func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8574,6 +9391,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8685,16 +9503,16 @@ func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocations return c } -// OperationId sets the optional parameter "operationId": Deprecated. -// The server-assigned `name` of the operation. +// OperationId sets the optional parameter "operationId": Required. +// Deprecated. The server-assigned `name` of the operation. // This field has been deprecated and replaced by the name field. func (c *ProjectsLocationsOperationsGetCall) OperationId(operationId string) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("operationId", operationId) return c } -// ProjectId sets the optional parameter "projectId": Deprecated. The -// Google Developers Console [project ID or +// ProjectId sets the optional parameter "projectId": Required. +// Deprecated. The Google Developers Console [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This @@ -8704,8 +9522,9 @@ func (c *ProjectsLocationsOperationsGetCall) ProjectId(projectId string) *Projec return c } -// Zone sets the optional parameter "zone": Deprecated. The name of the -// Google Compute Engine +// Zone sets the optional parameter "zone": Required. Deprecated. The +// name of the Google Compute +// Engine // [zone](/compute/docs/zones#available) in which the // cluster // resides. @@ -8752,6 +9571,7 @@ func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -8829,17 +9649,17 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* // "type": "string" // }, // "operationId": { - // "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "query", // "type": "string" // } @@ -8874,8 +9694,8 @@ func (r *ProjectsLocationsOperationsService) List(parent string) *ProjectsLocati return c } -// ProjectId sets the optional parameter "projectId": Deprecated. The -// Google Developers Console [project ID or +// ProjectId sets the optional parameter "projectId": Required. +// Deprecated. The Google Developers Console [project ID or // project // number](https://support.google.com/cloud/answer/6158840). // This @@ -8885,8 +9705,9 @@ func (c *ProjectsLocationsOperationsListCall) ProjectId(projectId string) *Proje return c } -// Zone sets the optional parameter "zone": Deprecated. The name of the -// Google Compute Engine +// Zone sets the optional parameter "zone": Required. Deprecated. The +// name of the Google Compute +// Engine // [zone](/compute/docs/zones#available) to return operations for, or // `-` for // all zones. This field has been deprecated and replaced by the parent @@ -8933,6 +9754,7 @@ func (c *ProjectsLocationsOperationsListCall) Header() http.Header { func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9010,12 +9832,12 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", // "location": "query", // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.", // "location": "query", // "type": "string" // } @@ -9097,6 +9919,7 @@ func (c *ProjectsZonesGetServerconfigCall) Header() http.Header { func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9174,13 +9997,13 @@ func (c *ProjectsZonesGetServerconfigCall) Do(opts ...googleapi.CallOption) (*Se // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -9247,6 +10070,7 @@ func (c *ProjectsZonesClustersAddonsCall) Header() http.Header { func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9323,19 +10147,19 @@ func (c *ProjectsZonesClustersAddonsCall) Do(opts ...googleapi.CallOption) (*Ope // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -9405,6 +10229,7 @@ func (c *ProjectsZonesClustersCompleteIpRotationCall) Header() http.Header { func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9481,19 +10306,19 @@ func (c *ProjectsZonesClustersCompleteIpRotationCall) Do(opts ...googleapi.CallO // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -9577,6 +10402,7 @@ func (c *ProjectsZonesClustersCreateCall) Header() http.Header { func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9651,13 +10477,13 @@ func (c *ProjectsZonesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Ope // ], // "parameters": { // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" @@ -9744,6 +10570,7 @@ func (c *ProjectsZonesClustersDeleteCall) Header() http.Header { func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9815,7 +10642,7 @@ func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to delete.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -9826,13 +10653,13 @@ func (c *ProjectsZonesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -9916,6 +10743,7 @@ func (c *ProjectsZonesClustersGetCall) Header() http.Header { func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -9990,7 +10818,7 @@ func (c *ProjectsZonesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluste // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to retrieve.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -10001,13 +10829,13 @@ func (c *ProjectsZonesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluste // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -10075,6 +10903,7 @@ func (c *ProjectsZonesClustersLegacyAbacCall) Header() http.Header { func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10151,19 +10980,19 @@ func (c *ProjectsZonesClustersLegacyAbacCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -10251,6 +11080,7 @@ func (c *ProjectsZonesClustersListCall) Header() http.Header { func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10328,13 +11158,13 @@ func (c *ProjectsZonesClustersListCall) Do(opts ...googleapi.CallOption) (*ListC // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" @@ -10401,6 +11231,7 @@ func (c *ProjectsZonesClustersLocationsCall) Header() http.Header { func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10477,19 +11308,19 @@ func (c *ProjectsZonesClustersLocationsCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -10559,6 +11390,7 @@ func (c *ProjectsZonesClustersLoggingCall) Header() http.Header { func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10635,19 +11467,19 @@ func (c *ProjectsZonesClustersLoggingCall) Do(opts ...googleapi.CallOption) (*Op // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -10717,6 +11549,7 @@ func (c *ProjectsZonesClustersMasterCall) Header() http.Header { func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10793,19 +11626,19 @@ func (c *ProjectsZonesClustersMasterCall) Do(opts ...googleapi.CallOption) (*Ope // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -10875,6 +11708,7 @@ func (c *ProjectsZonesClustersMonitoringCall) Header() http.Header { func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -10951,19 +11785,19 @@ func (c *ProjectsZonesClustersMonitoringCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -11033,6 +11867,7 @@ func (c *ProjectsZonesClustersResourceLabelsCall) Header() http.Header { func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11109,19 +11944,19 @@ func (c *ProjectsZonesClustersResourceLabelsCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -11191,6 +12026,7 @@ func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Header() http.Header { func (c *ProjectsZonesClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11267,19 +12103,19 @@ func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "clusterId": { - // "description": "The name of the cluster to update.", + // "description": "Required. The name of the cluster to update.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + // "description": "Required. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + // "description": "Required. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", // "location": "path", // "required": true, // "type": "string" @@ -11353,6 +12189,7 @@ func (c *ProjectsZonesClustersSetMasterAuthCall) Header() http.Header { func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11429,19 +12266,19 @@ func (c *ProjectsZonesClustersSetMasterAuthCall) Do(opts ...googleapi.CallOption // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -11511,6 +12348,7 @@ func (c *ProjectsZonesClustersSetNetworkPolicyCall) Header() http.Header { func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11587,19 +12425,19 @@ func (c *ProjectsZonesClustersSetNetworkPolicyCall) Do(opts ...googleapi.CallOpt // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -11669,6 +12507,7 @@ func (c *ProjectsZonesClustersStartIpRotationCall) Header() http.Header { func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11745,19 +12584,19 @@ func (c *ProjectsZonesClustersStartIpRotationCall) Do(opts ...googleapi.CallOpti // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -11827,6 +12666,7 @@ func (c *ProjectsZonesClustersUpdateCall) Header() http.Header { func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -11903,19 +12743,19 @@ func (c *ProjectsZonesClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Ope // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -11988,6 +12828,7 @@ func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Header() http.Header { func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12066,25 +12907,25 @@ func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "nodePoolId": { - // "description": "Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -12154,6 +12995,7 @@ func (c *ProjectsZonesClustersNodePoolsCreateCall) Header() http.Header { func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12230,19 +13072,19 @@ func (c *ProjectsZonesClustersNodePoolsCreateCall) Do(opts ...googleapi.CallOpti // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" @@ -12322,6 +13164,7 @@ func (c *ProjectsZonesClustersNodePoolsDeleteCall) Header() http.Header { func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12395,7 +13238,7 @@ func (c *ProjectsZonesClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOpti // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -12406,19 +13249,19 @@ func (c *ProjectsZonesClustersNodePoolsDeleteCall) Do(opts ...googleapi.CallOpti // "type": "string" // }, // "nodePoolId": { - // "description": "Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the node pool to delete.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -12506,6 +13349,7 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) Header() http.Header { func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12582,7 +13426,7 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -12593,19 +13437,19 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "nodePoolId": { - // "description": "Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the node pool.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -12689,6 +13533,7 @@ func (c *ProjectsZonesClustersNodePoolsListCall) Header() http.Header { func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12763,7 +13608,7 @@ func (c *ProjectsZonesClustersNodePoolsListCall) Do(opts ...googleapi.CallOption // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The name of the cluster.\nThis field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" @@ -12774,13 +13619,13 @@ func (c *ProjectsZonesClustersNodePoolsListCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" @@ -12851,6 +13696,7 @@ func (c *ProjectsZonesClustersNodePoolsRollbackCall) Header() http.Header { func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -12929,25 +13775,25 @@ func (c *ProjectsZonesClustersNodePoolsRollbackCall) Do(opts ...googleapi.CallOp // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to rollback.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to rollback.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "nodePoolId": { - // "description": "Deprecated. The name of the node pool to rollback.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the node pool to rollback.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -13019,6 +13865,7 @@ func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Header() http.Header { func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13097,25 +13944,25 @@ func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Do(opts ...googleapi.C // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "nodePoolId": { - // "description": "Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -13187,6 +14034,7 @@ func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Header() http.Header { func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13265,25 +14113,25 @@ func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Do(opts ...googleapi.CallOpt // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to update.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "nodePoolId": { - // "description": "Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the node pool to update.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -13356,6 +14204,7 @@ func (c *ProjectsZonesClustersNodePoolsUpdateCall) Header() http.Header { func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13434,25 +14283,25 @@ func (c *ProjectsZonesClustersNodePoolsUpdateCall) Do(opts ...googleapi.CallOpti // ], // "parameters": { // "clusterId": { - // "description": "Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the cluster to upgrade.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "nodePoolId": { - // "description": "Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the node pool to upgrade.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -13522,6 +14371,7 @@ func (c *ProjectsZonesOperationsCancelCall) Header() http.Header { func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13598,19 +14448,19 @@ func (c *ProjectsZonesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*E // ], // "parameters": { // "operationId": { - // "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -13697,6 +14547,7 @@ func (c *ProjectsZonesOperationsGetCall) Header() http.Header { func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13776,19 +14627,19 @@ func (c *ProjectsZonesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Oper // "type": "string" // }, // "operationId": { - // "description": "Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The server-assigned `name` of the operation.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field has been deprecated and replaced by the name field.", // "location": "path", // "required": true, // "type": "string" @@ -13872,6 +14723,7 @@ func (c *ProjectsZonesOperationsListCall) Header() http.Header { func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -13949,13 +14801,13 @@ func (c *ProjectsZonesOperationsListCall) Do(opts ...googleapi.CallOption) (*Lis // "type": "string" // }, // "projectId": { - // "description": "Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.", + // "description": "Required. Deprecated. The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) to return operations for, or `-` for\nall zones. This field has been deprecated and replaced by the parent field.", // "location": "path", // "required": true, // "type": "string" diff --git a/vendor/google.golang.org/api/gensupport/backoff.go b/vendor/google.golang.org/api/gensupport/backoff.go deleted file mode 100644 index 94b7789eea7..00000000000 --- a/vendor/google.golang.org/api/gensupport/backoff.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "math/rand" - "time" -) - -// BackoffStrategy defines the set of functions that a backoff-er must -// implement. -type BackoffStrategy interface { - // Pause returns the duration of the next pause and true if the operation should be - // retried, or false if no further retries should be attempted. - Pause() (time.Duration, bool) - - // Reset restores the strategy to its initial state. - Reset() -} - -// ExponentialBackoff performs exponential backoff as per https://en.wikipedia.org/wiki/Exponential_backoff. -// The initial pause time is given by Base. -// Once the total pause time exceeds Max, Pause will indicate no further retries. -type ExponentialBackoff struct { - Base time.Duration - Max time.Duration - total time.Duration - n uint -} - -// Pause returns the amount of time the caller should wait. -func (eb *ExponentialBackoff) Pause() (time.Duration, bool) { - if eb.total > eb.Max { - return 0, false - } - - // The next pause is selected from randomly from [0, 2^n * Base). - d := time.Duration(rand.Int63n((1 << eb.n) * int64(eb.Base))) - eb.total += d - eb.n++ - return d, true -} - -// Reset resets the backoff strategy such that the next Pause call will begin -// counting from the start. It is not safe to call concurrently with Pause. -func (eb *ExponentialBackoff) Reset() { - eb.n = 0 - eb.total = 0 -} diff --git a/vendor/google.golang.org/api/gensupport/header.go b/vendor/google.golang.org/api/gensupport/header.go deleted file mode 100644 index cb5e67c77a2..00000000000 --- a/vendor/google.golang.org/api/gensupport/header.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "fmt" - "runtime" - "strings" -) - -// GoogleClientHeader returns the value to use for the x-goog-api-client -// header, which is used internally by Google. -func GoogleClientHeader(generatorVersion, clientElement string) string { - elts := []string{"gl-go/" + strings.Replace(runtime.Version(), " ", "_", -1)} - if clientElement != "" { - elts = append(elts, clientElement) - } - elts = append(elts, fmt.Sprintf("gdcl/%s", generatorVersion)) - return strings.Join(elts, " ") -} diff --git a/vendor/google.golang.org/api/gensupport/retry.go b/vendor/google.golang.org/api/gensupport/retry.go deleted file mode 100644 index fdde3f42c69..00000000000 --- a/vendor/google.golang.org/api/gensupport/retry.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2017 Google LLC -// -// 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 gensupport - -import ( - "context" - "io" - "net" - "net/http" - "time" -) - -// Retry invokes the given function, retrying it multiple times if the connection failed or -// the HTTP status response indicates the request should be attempted again. ctx may be nil. -func Retry(ctx context.Context, f func() (*http.Response, error), backoff BackoffStrategy) (*http.Response, error) { - for { - resp, err := f() - - var status int - if resp != nil { - status = resp.StatusCode - } - - // Return if we shouldn't retry. - pause, retry := backoff.Pause() - if !shouldRetry(status, err) || !retry { - return resp, err - } - - // Ensure the response body is closed, if any. - if resp != nil && resp.Body != nil { - resp.Body.Close() - } - - // Pause, but still listen to ctx.Done if context is not nil. - var done <-chan struct{} - if ctx != nil { - done = ctx.Done() - } - select { - case <-done: - return nil, ctx.Err() - case <-time.After(pause): - } - } -} - -// DefaultBackoffStrategy returns a default strategy to use for retrying failed upload requests. -func DefaultBackoffStrategy() BackoffStrategy { - return &ExponentialBackoff{ - Base: 250 * time.Millisecond, - Max: 16 * time.Second, - } -} - -// shouldRetry returns true if the HTTP response / error indicates that the -// request should be attempted again. -func shouldRetry(status int, err error) bool { - if 500 <= status && status <= 599 { - return true - } - if status == statusTooManyRequests { - return true - } - if err == io.ErrUnexpectedEOF { - return true - } - if err, ok := err.(net.Error); ok { - return err.Temporary() - } - return false -} diff --git a/vendor/google.golang.org/api/googleapi/googleapi.go b/vendor/google.golang.org/api/googleapi/googleapi.go index ab53767624a..4431716d3b9 100644 --- a/vendor/google.golang.org/api/googleapi/googleapi.go +++ b/vendor/google.golang.org/api/googleapi/googleapi.go @@ -1,4 +1,4 @@ -// Copyright 2011 Google Inc. All rights reserved. +// Copyright 2011 Google LLC. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -16,7 +16,7 @@ import ( "net/url" "strings" - "google.golang.org/api/googleapi/internal/uritemplates" + "google.golang.org/api/internal/third_party/uritemplates" ) // ContentTyper is an interface for Readers which know (or would like @@ -256,14 +256,22 @@ func ProcessMediaOptions(opts []MediaOption) *MediaOptions { // "http://www.golang.org/topics/myproject/mytopic". It strips all parent // references (e.g. ../..) as well as anything after the host // (e.g. /bar/gaz gets stripped out of foo.com/bar/gaz). +// +// ResolveRelative panics if either basestr or relstr is not able to be parsed. func ResolveRelative(basestr, relstr string) string { - u, _ := url.Parse(basestr) + u, err := url.Parse(basestr) + if err != nil { + panic(fmt.Sprintf("failed to parse %q", basestr)) + } afterColonPath := "" if i := strings.IndexRune(relstr, ':'); i > 0 { afterColonPath = relstr[i+1:] relstr = relstr[:i] } - rel, _ := url.Parse(relstr) + rel, err := url.Parse(relstr) + if err != nil { + panic(fmt.Sprintf("failed to parse %q", relstr)) + } u = u.ResolveReference(rel) us := u.String() if afterColonPath != "" { @@ -331,7 +339,7 @@ func ConvertVariant(v map[string]interface{}, dst interface{}) bool { } // A Field names a field to be retrieved with a partial response. -// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// https://cloud.google.com/storage/docs/json_api/v1/how-tos/performance // // Partial responses can dramatically reduce the amount of data that must be sent to your application. // In order to request partial responses, you can specify the full list of fields @@ -348,9 +356,6 @@ func ConvertVariant(v map[string]interface{}, dst interface{}) bool { // // svc.Events.List().Fields("nextPageToken", "items(id,updated)").Do() // -// More information about field formatting can be found here: -// https://developers.google.com/+/api/#fields-syntax -// // Another way to find field names is through the Google API explorer: // https://developers.google.com/apis-explorer/#p/ type Field string diff --git a/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88cb65c..00000000000 --- a/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/google.golang.org/api/googleapi/transport/apikey.go b/vendor/google.golang.org/api/googleapi/transport/apikey.go index eca1ea25077..61720ec2ea1 100644 --- a/vendor/google.golang.org/api/googleapi/transport/apikey.go +++ b/vendor/google.golang.org/api/googleapi/transport/apikey.go @@ -1,9 +1,13 @@ -// Copyright 2012 Google Inc. All rights reserved. +// Copyright 2012 Google LLC. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package transport contains HTTP transports used to make // authenticated API requests. +// +// This package is DEPRECATED. Users should instead use, +// +// service, err := NewService(..., option.WithAPIKey(...)) package transport import ( @@ -13,6 +17,8 @@ import ( // APIKey is an HTTP Transport which wraps an underlying transport and // appends an API Key "key" parameter to the URL of outgoing requests. +// +// Deprecated: please use NewService(..., option.WithAPIKey(...)) instead. type APIKey struct { // Key is the API Key to set on requests. Key string diff --git a/vendor/google.golang.org/api/googleapi/types.go b/vendor/google.golang.org/api/googleapi/types.go index a280e3021a1..fabf74d50d0 100644 --- a/vendor/google.golang.org/api/googleapi/types.go +++ b/vendor/google.golang.org/api/googleapi/types.go @@ -1,4 +1,4 @@ -// Copyright 2013 Google Inc. All rights reserved. +// Copyright 2013 Google LLC. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. diff --git a/vendor/google.golang.org/api/internal/creds.go b/vendor/google.golang.org/api/internal/creds.go index 69b8659fddb..a6f9a2dea12 100644 --- a/vendor/google.golang.org/api/internal/creds.go +++ b/vendor/google.golang.org/api/internal/creds.go @@ -1,16 +1,6 @@ -// Copyright 2017 Google LLC -// -// 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. +// Copyright 2017 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. package internal diff --git a/vendor/google.golang.org/api/gensupport/buffer.go b/vendor/google.golang.org/api/internal/gensupport/buffer.go similarity index 100% rename from vendor/google.golang.org/api/gensupport/buffer.go rename to vendor/google.golang.org/api/internal/gensupport/buffer.go diff --git a/vendor/google.golang.org/api/gensupport/doc.go b/vendor/google.golang.org/api/internal/gensupport/doc.go similarity index 100% rename from vendor/google.golang.org/api/gensupport/doc.go rename to vendor/google.golang.org/api/internal/gensupport/doc.go diff --git a/vendor/google.golang.org/api/gensupport/json.go b/vendor/google.golang.org/api/internal/gensupport/json.go similarity index 100% rename from vendor/google.golang.org/api/gensupport/json.go rename to vendor/google.golang.org/api/internal/gensupport/json.go diff --git a/vendor/google.golang.org/api/gensupport/jsonfloat.go b/vendor/google.golang.org/api/internal/gensupport/jsonfloat.go similarity index 65% rename from vendor/google.golang.org/api/gensupport/jsonfloat.go rename to vendor/google.golang.org/api/internal/gensupport/jsonfloat.go index 8377850811f..13c2f930207 100644 --- a/vendor/google.golang.org/api/gensupport/jsonfloat.go +++ b/vendor/google.golang.org/api/internal/gensupport/jsonfloat.go @@ -1,16 +1,6 @@ -// Copyright 2016 Google LLC -// -// 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. +// Copyright 2016 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. package gensupport diff --git a/vendor/google.golang.org/api/gensupport/media.go b/vendor/google.golang.org/api/internal/gensupport/media.go similarity index 98% rename from vendor/google.golang.org/api/gensupport/media.go rename to vendor/google.golang.org/api/internal/gensupport/media.go index 0ef96b3f102..0288cc30427 100644 --- a/vendor/google.golang.org/api/gensupport/media.go +++ b/vendor/google.golang.org/api/internal/gensupport/media.go @@ -290,6 +290,9 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB fb := readerFunc(body) fm := readerFunc(media) combined, ctype := CombineBodyMedia(body, "application/json", media, mi.mType) + toCleanup := []io.Closer{ + combined, + } if fb != nil && fm != nil { getBody = func() (io.ReadCloser, error) { rb := ioutil.NopCloser(fb()) @@ -299,10 +302,16 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB mimeBoundary = params["boundary"] } r, _ := combineBodyMedia(rb, "application/json", rm, mi.mType, mimeBoundary) + toCleanup = append(toCleanup, r) return r, nil } } - cleanup = func() { combined.Close() } + cleanup = func() { + for _, closer := range toCleanup { + _ = closer.Close() + } + + } reqHeaders.Set("Content-Type", ctype) body = combined } diff --git a/vendor/google.golang.org/api/gensupport/params.go b/vendor/google.golang.org/api/internal/gensupport/params.go similarity index 100% rename from vendor/google.golang.org/api/gensupport/params.go rename to vendor/google.golang.org/api/internal/gensupport/params.go diff --git a/vendor/google.golang.org/api/gensupport/resumable.go b/vendor/google.golang.org/api/internal/gensupport/resumable.go similarity index 74% rename from vendor/google.golang.org/api/gensupport/resumable.go rename to vendor/google.golang.org/api/internal/gensupport/resumable.go index 2552a6acaca..e67ccd9a614 100644 --- a/vendor/google.golang.org/api/gensupport/resumable.go +++ b/vendor/google.golang.org/api/internal/gensupport/resumable.go @@ -12,6 +12,22 @@ import ( "net/http" "sync" "time" + + gax "github.com/googleapis/gax-go/v2" +) + +// Backoff is an interface around gax.Backoff's Pause method, allowing tests to provide their +// own implementation. +type Backoff interface { + Pause() time.Duration +} + +// These are declared as global variables so that tests can overwrite them. +var ( + retryDeadline = 32 * time.Second + backoff = func() Backoff { + return &gax.Backoff{Initial: 100 * time.Millisecond} + } ) const ( @@ -39,9 +55,6 @@ type ResumableUpload struct { // Callback is an optional function that will be periodically called with the cumulative number of bytes uploaded. Callback func(int64) - - // If not specified, a default exponential backoff strategy will be used. - Backoff BackoffStrategy } // Progress returns the number of bytes uploaded at this point. @@ -138,15 +151,6 @@ func (rx *ResumableUpload) transferChunk(ctx context.Context) (*http.Response, e return res, nil } -func contextDone(ctx context.Context) bool { - select { - case <-ctx.Done(): - return true - default: - return false - } -} - // Upload starts the process of a resumable upload with a cancellable context. // It retries using the provided back off strategy until cancelled or the // strategy indicates to stop retrying. @@ -156,61 +160,82 @@ func contextDone(ctx context.Context) bool { // rx is private to the auto-generated API code. // Exactly one of resp or err will be nil. If resp is non-nil, the caller must call resp.Body.Close. func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err error) { - var pause time.Duration - backoff := rx.Backoff - if backoff == nil { - backoff = DefaultBackoffStrategy() + var shouldRetry = func(status int, err error) bool { + if 500 <= status && status <= 599 { + return true + } + if status == statusTooManyRequests { + return true + } + if err == io.ErrUnexpectedEOF { + return true + } + if err, ok := err.(interface{ Temporary() bool }); ok { + return err.Temporary() + } + return false } - for { - // Ensure that we return in the case of cancelled context, even if pause is 0. - if contextDone(ctx) { - return nil, ctx.Err() - } - select { - case <-ctx.Done(): - return nil, ctx.Err() - case <-time.After(pause): - } - - resp, err = rx.transferChunk(ctx) - - var status int - if resp != nil { - status = resp.StatusCode - } - - // Check if we should retry the request. - if shouldRetry(status, err) { - var retry bool - pause, retry = backoff.Pause() - if retry { - if resp != nil && resp.Body != nil { - resp.Body.Close() - } - continue - } - } - - // If the chunk was uploaded successfully, but there's still - // more to go, upload the next chunk without any delay. - if statusResumeIncomplete(resp) { - pause = 0 - backoff.Reset() - resp.Body.Close() - continue - } - - // It's possible for err and resp to both be non-nil here, but we expose a simpler - // contract to our callers: exactly one of resp and err will be non-nil. This means - // that any response body must be closed here before returning a non-nil error. + // There are a couple of cases where it's possible for err and resp to both + // be non-nil. However, we expose a simpler contract to our callers: exactly + // one of resp and err will be non-nil. This means that any response body + // must be closed here before returning a non-nil error. + var prepareReturn = func(resp *http.Response, err error) (*http.Response, error) { if err != nil { if resp != nil && resp.Body != nil { resp.Body.Close() } return nil, err } - return resp, nil } + + // Send all chunks. + for { + var pause time.Duration + + // Each chunk gets its own initialized-at-zero retry. + bo := backoff() + quitAfter := time.After(retryDeadline) + + // Retry loop for a single chunk. + for { + select { + case <-ctx.Done(): + if err == nil { + err = ctx.Err() + } + return prepareReturn(resp, err) + case <-time.After(pause): + case <-quitAfter: + return prepareReturn(resp, err) + } + + resp, err = rx.transferChunk(ctx) + + var status int + if resp != nil { + status = resp.StatusCode + } + + // Check if we should retry the request. + if !shouldRetry(status, err) { + break + } + + pause = bo.Pause() + if resp != nil && resp.Body != nil { + resp.Body.Close() + } + } + + // If the chunk was uploaded successfully, but there's still + // more to go, upload the next chunk without any delay. + if statusResumeIncomplete(resp) { + resp.Body.Close() + continue + } + + return prepareReturn(resp, err) + } } diff --git a/vendor/google.golang.org/api/gensupport/send.go b/vendor/google.golang.org/api/internal/gensupport/send.go similarity index 100% rename from vendor/google.golang.org/api/gensupport/send.go rename to vendor/google.golang.org/api/internal/gensupport/send.go diff --git a/vendor/google.golang.org/api/internal/pool.go b/vendor/google.golang.org/api/internal/pool.go index a4426dcb700..0680dd99015 100644 --- a/vendor/google.golang.org/api/internal/pool.go +++ b/vendor/google.golang.org/api/internal/pool.go @@ -1,16 +1,6 @@ -// Copyright 2016 Google LLC -// -// 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. +// Copyright 2016 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. package internal diff --git a/vendor/google.golang.org/api/internal/settings.go b/vendor/google.golang.org/api/internal/settings.go index 062301c65fd..544d715c87d 100644 --- a/vendor/google.golang.org/api/internal/settings.go +++ b/vendor/google.golang.org/api/internal/settings.go @@ -1,16 +1,6 @@ -// Copyright 2017 Google LLC -// -// 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. +// Copyright 2017 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. // Package internal supports the options and transport packages. package internal @@ -27,19 +17,20 @@ import ( // DialSettings holds information needed to establish a connection with a // Google API service. type DialSettings struct { - Endpoint string - Scopes []string - TokenSource oauth2.TokenSource - Credentials *google.Credentials - CredentialsFile string // if set, Token Source is ignored. - CredentialsJSON []byte - UserAgent string - APIKey string - Audiences []string - HTTPClient *http.Client - GRPCDialOpts []grpc.DialOption - GRPCConn *grpc.ClientConn - NoAuth bool + Endpoint string + Scopes []string + TokenSource oauth2.TokenSource + Credentials *google.Credentials + CredentialsFile string // if set, Token Source is ignored. + CredentialsJSON []byte + UserAgent string + APIKey string + Audiences []string + HTTPClient *http.Client + GRPCDialOpts []grpc.DialOption + GRPCConn *grpc.ClientConn + NoAuth bool + TelemetryDisabled bool // Google API system parameters. For more information please read: // https://cloud.google.com/apis/docs/system-parameters diff --git a/vendor/google.golang.org/api/internal/third_party/uritemplates/LICENSE b/vendor/google.golang.org/api/internal/third_party/uritemplates/LICENSE new file mode 100644 index 00000000000..7109c6ef932 --- /dev/null +++ b/vendor/google.golang.org/api/internal/third_party/uritemplates/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 Joshua Tacoma. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/google.golang.org/api/internal/third_party/uritemplates/METADATA b/vendor/google.golang.org/api/internal/third_party/uritemplates/METADATA new file mode 100644 index 00000000000..c7f86fcd5fd --- /dev/null +++ b/vendor/google.golang.org/api/internal/third_party/uritemplates/METADATA @@ -0,0 +1,14 @@ +name: "uritemplates" +description: + "Package uritemplates is a level 4 implementation of RFC 6570 (URI " + "Template, http://tools.ietf.org/html/rfc6570)." + +third_party { + url { + type: GIT + value: "https://github.com/jtacoma/uritemplates" + } + version: "0.1" + last_upgrade_date { year: 2014 month: 8 day: 18 } + license_type: NOTICE +} diff --git a/vendor/google.golang.org/api/googleapi/internal/uritemplates/uritemplates.go b/vendor/google.golang.org/api/internal/third_party/uritemplates/uritemplates.go similarity index 98% rename from vendor/google.golang.org/api/googleapi/internal/uritemplates/uritemplates.go rename to vendor/google.golang.org/api/internal/third_party/uritemplates/uritemplates.go index 63bf0538301..8c27d19d752 100644 --- a/vendor/google.golang.org/api/googleapi/internal/uritemplates/uritemplates.go +++ b/vendor/google.golang.org/api/internal/third_party/uritemplates/uritemplates.go @@ -191,7 +191,7 @@ func parseTerm(term string) (result templateTerm, err error) { err = errors.New("not a valid name: " + result.name) } if result.explode && result.truncate > 0 { - err = errors.New("both explode and prefix modifers on same term") + err = errors.New("both explode and prefix modifiers on same term") } return result, err } diff --git a/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go b/vendor/google.golang.org/api/internal/third_party/uritemplates/utils.go similarity index 100% rename from vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go rename to vendor/google.golang.org/api/internal/third_party/uritemplates/utils.go diff --git a/vendor/google.golang.org/api/option/credentials_go19.go b/vendor/google.golang.org/api/option/credentials_go19.go index 0636a829454..d06f918b0e6 100644 --- a/vendor/google.golang.org/api/option/credentials_go19.go +++ b/vendor/google.golang.org/api/option/credentials_go19.go @@ -1,16 +1,6 @@ -// Copyright 2018 Google LLC -// -// 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. +// Copyright 2018 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. // +build go1.9 diff --git a/vendor/google.golang.org/api/option/credentials_notgo19.go b/vendor/google.golang.org/api/option/credentials_notgo19.go index 74d3a4b5b91..0ce107a624a 100644 --- a/vendor/google.golang.org/api/option/credentials_notgo19.go +++ b/vendor/google.golang.org/api/option/credentials_notgo19.go @@ -1,16 +1,6 @@ -// Copyright 2018 Google LLC -// -// 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. +// Copyright 2018 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. // +build !go1.9 diff --git a/vendor/google.golang.org/api/option/option.go b/vendor/google.golang.org/api/option/option.go index 0a1c2dba9e3..0d9ae4e7a20 100644 --- a/vendor/google.golang.org/api/option/option.go +++ b/vendor/google.golang.org/api/option/option.go @@ -1,16 +1,6 @@ -// Copyright 2017 Google LLC -// -// 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. +// Copyright 2017 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. // Package option contains options for Google API clients. package option @@ -124,7 +114,7 @@ func (w withHTTPClient) Apply(o *internal.DialSettings) { } // WithGRPCConn returns a ClientOption that specifies the gRPC client -// connection to use as the basis of communications. This option many only be +// connection to use as the basis of communications. This option may only be // used with services that support gRPC as their communication transport. When // used, the WithGRPCConn option takes precedent over all other supplied // options. @@ -233,3 +223,16 @@ type withRequestReason string func (w withRequestReason) Apply(o *internal.DialSettings) { o.RequestReason = string(w) } + +// WithTelemetryDisabled returns a ClientOption that disables default telemetry (OpenCensus) +// settings on gRPC and HTTP clients. +// An example reason would be to bind custom telemetry that overrides the defaults. +func WithTelemetryDisabled() ClientOption { + return withTelemetryDisabledOption{} +} + +type withTelemetryDisabledOption struct{} + +func (w withTelemetryDisabledOption) Apply(o *internal.DialSettings) { + o.TelemetryDisabled = true +} diff --git a/vendor/google.golang.org/api/tpu/v1/tpu-api.json b/vendor/google.golang.org/api/tpu/v1/tpu-api.json index acd7f0256e0..b828abf0073 100644 --- a/vendor/google.golang.org/api/tpu/v1/tpu-api.json +++ b/vendor/google.golang.org/api/tpu/v1/tpu-api.json @@ -658,7 +658,7 @@ } } }, - "revision": "20190509", + "revision": "20190821", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorType": { @@ -696,6 +696,13 @@ "nextPageToken": { "description": "The next page token or empty if none.", "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -775,6 +782,13 @@ "$ref": "TensorFlowVersion" }, "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -842,7 +856,7 @@ "type": "string" }, "createTime": { - "description": "Output only.\nThe time when the node was created.", + "description": "Output only. The time when the node was created.", "format": "google-datetime", "type": "string" }, @@ -871,11 +885,11 @@ "type": "string" }, "healthDescription": { - "description": "Output only.\nIf this field is populated, it contains a description of why the TPU Node\nis unhealthy.", + "description": "Output only. If this field is populated, it contains a description of why the TPU Node\nis unhealthy.", "type": "string" }, "ipAddress": { - "description": "Output only.\nDEPRECATED! Use network_endpoints instead.\nThe network address for the TPU Node as visible to Compute Engine\ninstances.", + "description": "Output only. DEPRECATED! Use network_endpoints instead.\nThe network address for the TPU Node as visible to Compute Engine\ninstances.", "type": "string" }, "labels": { @@ -886,7 +900,7 @@ "type": "object" }, "name": { - "description": "Output only.\nThe immutable name of the TPU", + "description": "Output only. The immutable name of the TPU", "type": "string" }, "network": { @@ -901,18 +915,18 @@ "type": "array" }, "port": { - "description": "Output only.\nDEPRECATED! Use network_endpoints instead.\nThe network port for the TPU Node as visible to Compute Engine instances.", + "description": "Output only. DEPRECATED! Use network_endpoints instead.\nThe network port for the TPU Node as visible to Compute Engine instances.", "type": "string" }, "schedulingConfig": { "$ref": "SchedulingConfig" }, "serviceAccount": { - "description": "Output only.\nThe service account used to run the tensor flow services within the node.\nTo share resources, including Google Cloud Storage data, with the\nTensorflow job running in the Node, this account must have permissions to\nthat data.", + "description": "Output only. The service account used to run the tensor flow services within the node.\nTo share resources, including Google Cloud Storage data, with the\nTensorflow job running in the Node, this account must have permissions to\nthat data.", "type": "string" }, "state": { - "description": "Output only.\nThe current state for the TPU Node.", + "description": "Output only. The current state for the TPU Node.", "enum": [ "STATE_UNSPECIFIED", "CREATING", @@ -1059,7 +1073,7 @@ "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", "properties": { "code": { diff --git a/vendor/google.golang.org/api/tpu/v1/tpu-gen.go b/vendor/google.golang.org/api/tpu/v1/tpu-gen.go index 7e88f6e98d9..0cafd54ce1a 100644 --- a/vendor/google.golang.org/api/tpu/v1/tpu-gen.go +++ b/vendor/google.golang.org/api/tpu/v1/tpu-gen.go @@ -49,8 +49,8 @@ import ( "strconv" "strings" - gensupport "google.golang.org/api/gensupport" googleapi "google.golang.org/api/googleapi" + gensupport "google.golang.org/api/internal/gensupport" option "google.golang.org/api/option" htransport "google.golang.org/api/transport/http" ) @@ -261,6 +261,9 @@ type ListAcceleratorTypesResponse struct { // NextPageToken: The next page token or empty if none. NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -409,6 +412,9 @@ type ListTensorFlowVersionsResponse struct { // TensorflowVersions: The listed nodes. TensorflowVersions []*TensorFlowVersion `json:"tensorflowVersions,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -546,8 +552,7 @@ type Node struct { // Required. CidrBlock string `json:"cidrBlock,omitempty"` - // CreateTime: Output only. - // The time when the node was created. + // CreateTime: Output only. The time when the node was created. CreateTime string `json:"createTime,omitempty"` // Description: The user-supplied description of the TPU. Maximum of 512 @@ -568,14 +573,13 @@ type Node struct { // will resume running once rescheduled. Health string `json:"health,omitempty"` - // HealthDescription: Output only. - // If this field is populated, it contains a description of why the TPU - // Node + // HealthDescription: Output only. If this field is populated, it + // contains a description of why the TPU Node // is unhealthy. HealthDescription string `json:"healthDescription,omitempty"` - // IpAddress: Output only. - // DEPRECATED! Use network_endpoints instead. + // IpAddress: Output only. DEPRECATED! Use network_endpoints + // instead. // The network address for the TPU Node as visible to Compute // Engine // instances. @@ -584,8 +588,7 @@ type Node struct { // Labels: Resource labels to represent user-provided metadata. Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. - // The immutable name of the TPU + // Name: Output only. The immutable name of the TPU Name string `json:"name,omitempty"` // Network: The name of a network they wish to peer the TPU node to. It @@ -602,17 +605,15 @@ type Node struct { // to the 0th entry in this map first. NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"` - // Port: Output only. - // DEPRECATED! Use network_endpoints instead. + // Port: Output only. DEPRECATED! Use network_endpoints instead. // The network port for the TPU Node as visible to Compute Engine // instances. Port string `json:"port,omitempty"` SchedulingConfig *SchedulingConfig `json:"schedulingConfig,omitempty"` - // ServiceAccount: Output only. - // The service account used to run the tensor flow services within the - // node. + // ServiceAccount: Output only. The service account used to run the + // tensor flow services within the node. // To share resources, including Google Cloud Storage data, with // the // Tensorflow job running in the Node, this account must have @@ -620,8 +621,7 @@ type Node struct { // that data. ServiceAccount string `json:"serviceAccount,omitempty"` - // State: Output only. - // The current state for the TPU Node. + // State: Output only. The current state for the TPU Node. // // Possible values: // "STATE_UNSPECIFIED" - TPU node state is not known/set. @@ -876,81 +876,14 @@ type StartNodeRequest struct { // suitable for // different programming environments, including REST APIs and RPC APIs. // It is -// used by [gRPC](https://github.com/grpc). The error model is designed -// to be: +// used by [gRPC](https://github.com/grpc). Each `Status` message +// contains +// three pieces of data: error code, error message, and error +// details. // -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, -// error -// message, and error details. The error code should be an enum value -// of -// google.rpc.Code, but it may accept additional error codes if needed. -// The -// error message should be a developer-facing English message that -// helps -// developers *understand* and *resolve* the error. If a localized -// user-facing -// error message is needed, put the localized message in the error -// details or -// localize it in the client. The optional error details may contain -// arbitrary -// information about the error. There is a predefined set of error -// detail types -// in the package `google.rpc` that can be used for common error -// conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error -// model, but it -// is not necessarily the actual wire format. When the `Status` message -// is -// exposed in different client libraries and different wire protocols, -// it can be -// mapped differently. For example, it will likely be mapped to some -// exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety -// of -// environments, either with or without APIs, to provide a -// consistent developer experience across different -// environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the -// client, -// it may embed the `Status` in the normal response to indicate the -// partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step -// may -// have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch -// response, the -// `Status` message should be used directly inside batch response, -// one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous -// operation -// results in its response, the status of those operations should -// be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message -// `Status` could -// be used directly after any stripping needed for security/privacy -// reasons. +// You can find out more about this error model and how to work with it +// in the +// [API Design Guide](https://cloud.google.com/apis/design/errors). type Status struct { // Code: The status code, which should be an enum value of // google.rpc.Code. @@ -1086,6 +1019,7 @@ func (c *ProjectsLocationsGetCall) Header() http.Header { func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -1251,6 +1185,7 @@ func (c *ProjectsLocationsListCall) Header() http.Header { func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -1431,6 +1366,7 @@ func (c *ProjectsLocationsAcceleratorTypesGetCall) Header() http.Header { func (c *ProjectsLocationsAcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -1600,6 +1536,7 @@ func (c *ProjectsLocationsAcceleratorTypesListCall) Header() http.Header { func (c *ProjectsLocationsAcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -1783,6 +1720,7 @@ func (c *ProjectsLocationsNodesCreateCall) Header() http.Header { func (c *ProjectsLocationsNodesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -1925,6 +1863,7 @@ func (c *ProjectsLocationsNodesDeleteCall) Header() http.Header { func (c *ProjectsLocationsNodesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2065,6 +2004,7 @@ func (c *ProjectsLocationsNodesGetCall) Header() http.Header { func (c *ProjectsLocationsNodesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2222,6 +2162,7 @@ func (c *ProjectsLocationsNodesListCall) Header() http.Header { func (c *ProjectsLocationsNodesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2388,6 +2329,7 @@ func (c *ProjectsLocationsNodesReimageCall) Header() http.Header { func (c *ProjectsLocationsNodesReimageCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2527,6 +2469,7 @@ func (c *ProjectsLocationsNodesStartCall) Header() http.Header { func (c *ProjectsLocationsNodesStartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2666,6 +2609,7 @@ func (c *ProjectsLocationsNodesStopCall) Header() http.Header { func (c *ProjectsLocationsNodesStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2820,6 +2764,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -2955,6 +2900,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3099,6 +3045,7 @@ func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3279,6 +3226,7 @@ func (c *ProjectsLocationsOperationsListCall) Header() http.Header { func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3459,6 +3407,7 @@ func (c *ProjectsLocationsTensorflowVersionsGetCall) Header() http.Header { func (c *ProjectsLocationsTensorflowVersionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } @@ -3628,6 +3577,7 @@ func (c *ProjectsLocationsTensorflowVersionsListCall) Header() http.Header { func (c *ProjectsLocationsTensorflowVersionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20191216") for k, v := range c.header_ { reqHeaders[k] = v } diff --git a/vendor/google.golang.org/api/transport/http/dial.go b/vendor/google.golang.org/api/transport/http/dial.go index c0d8bf20b02..1ef67cefb73 100644 --- a/vendor/google.golang.org/api/transport/http/dial.go +++ b/vendor/google.golang.org/api/transport/http/dial.go @@ -1,16 +1,6 @@ -// Copyright 2015 Google LLC -// -// 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. +// Copyright 2015 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. // Package http supports network connections to HTTP servers. // This package is not intended for use by end developers. Use the @@ -70,7 +60,7 @@ func newTransport(ctx context.Context, base http.RoundTripper, settings *interna quotaProject: settings.QuotaProject, requestReason: settings.RequestReason, } - trans = addOCTransport(trans) + trans = addOCTransport(trans, settings) switch { case settings.NoAuth: // Do nothing. @@ -119,16 +109,15 @@ func (t parameterTransport) RoundTrip(req *http.Request) (*http.Response, error) if rt == nil { return nil, errors.New("transport: no Transport specified") } - if t.userAgent == "" { - return rt.RoundTrip(req) - } newReq := *req newReq.Header = make(http.Header) for k, vv := range req.Header { newReq.Header[k] = vv } - // TODO(cbro): append to existing User-Agent header? - newReq.Header.Set("User-Agent", t.userAgent) + if t.userAgent != "" { + // TODO(cbro): append to existing User-Agent header? + newReq.Header.Set("User-Agent", t.userAgent) + } // Attach system parameters into the header if t.quotaProject != "" { @@ -153,7 +142,10 @@ func defaultBaseTransport(ctx context.Context) http.RoundTripper { return http.DefaultTransport } -func addOCTransport(trans http.RoundTripper) http.RoundTripper { +func addOCTransport(trans http.RoundTripper, settings *internal.DialSettings) http.RoundTripper { + if settings.TelemetryDisabled { + return trans + } return &ochttp.Transport{ Base: trans, Propagation: &propagation.HTTPFormat{}, diff --git a/vendor/google.golang.org/api/transport/http/dial_appengine.go b/vendor/google.golang.org/api/transport/http/dial_appengine.go index 04c81413c51..baee9f27afc 100644 --- a/vendor/google.golang.org/api/transport/http/dial_appengine.go +++ b/vendor/google.golang.org/api/transport/http/dial_appengine.go @@ -1,16 +1,6 @@ -// Copyright 2016 Google LLC -// -// 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. +// Copyright 2016 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. // +build appengine diff --git a/vendor/google.golang.org/api/transport/http/internal/propagation/http.go b/vendor/google.golang.org/api/transport/http/internal/propagation/http.go index 24b4f0d2915..fb951bb1624 100644 --- a/vendor/google.golang.org/api/transport/http/internal/propagation/http.go +++ b/vendor/google.golang.org/api/transport/http/internal/propagation/http.go @@ -1,16 +1,6 @@ -// Copyright 2018 Google LLC -// -// 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. +// Copyright 2018 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. // +build go1.8 diff --git a/vendor/google.golang.org/appengine/go.mod b/vendor/google.golang.org/appengine/go.mod index 45159279854..635c34f5a11 100644 --- a/vendor/google.golang.org/appengine/go.mod +++ b/vendor/google.golang.org/appengine/go.mod @@ -1,10 +1,9 @@ module google.golang.org/appengine +go 1.11 + require ( github.com/golang/protobuf v1.3.1 - golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5 // indirect golang.org/x/net v0.0.0-20190603091049-60506f45cf65 - golang.org/x/sys v0.0.0-20190606165138-5da285871e9c // indirect golang.org/x/text v0.3.2 - golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b // indirect ) diff --git a/vendor/google.golang.org/appengine/go.sum b/vendor/google.golang.org/appengine/go.sum index cb3232556bf..ce22f6856c9 100644 --- a/vendor/google.golang.org/appengine/go.sum +++ b/vendor/google.golang.org/appengine/go.sum @@ -1,22 +1,11 @@ -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225 h1:kNX+jCowfMYzvlSvJu5pQWEmyWFrBXJ3PBy10xKMXK8= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65 h1:+rhAzEzT3f4JtomfC371qB+0Ola2caSKcY69NUBZrRQ= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= diff --git a/vendor/google.golang.org/appengine/internal/net.go b/vendor/google.golang.org/appengine/internal/net.go index 3b94cf0c6a8..fe429720e1f 100644 --- a/vendor/google.golang.org/appengine/internal/net.go +++ b/vendor/google.golang.org/appengine/internal/net.go @@ -32,7 +32,7 @@ func limitDial(network, addr string) (net.Conn, error) { // Dial with a timeout in case the API host is MIA. // The connection should normally be very fast. - conn, err := net.DialTimeout(network, addr, 500*time.Millisecond) + conn, err := net.DialTimeout(network, addr, 10*time.Second) if err != nil { limitRelease() return nil, err diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go index 0b9907f89b2..01db4cfd04b 100644 --- a/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go @@ -24,65 +24,17 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // The `Status` type defines a logical error model that is suitable for // different programming environments, including REST APIs and RPC APIs. It is -// used by [gRPC](https://github.com/grpc). The error model is designed to be: +// used by [gRPC](https://github.com/grpc). Each `Status` message contains +// three pieces of data: error code, error message, and error details. // -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error -// message, and error details. The error code should be an enum value of -// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes -// if needed. The error message should be a developer-facing English message -// that helps developers *understand* and *resolve* the error. If a localized -// user-facing error message is needed, put the localized message in the error -// details or localize it in the client. The optional error details may contain -// arbitrary information about the error. There is a predefined set of error -// detail types in the package `google.rpc` that can be used for common error -// conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error model, but it -// is not necessarily the actual wire format. When the `Status` message is -// exposed in different client libraries and different wire protocols, it can be -// mapped differently. For example, it will likely be mapped to some exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety of -// environments, either with or without APIs, to provide a -// consistent developer experience across different environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the client, -// it may embed the `Status` in the normal response to indicate the partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step may -// have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch response, the -// `Status` message should be used directly inside batch response, one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous operation -// results in its response, the status of those operations should be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message `Status` could -// be used directly after any stripping needed for security/privacy reasons. +// You can find out more about this error model and how to work with it in the +// [API Design Guide](https://cloud.google.com/apis/design/errors). type Status struct { - // The status code, which should be an enum value of - // [google.rpc.Code][google.rpc.Code]. + // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // A developer-facing error message, which should be in English. Any // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized - // by the client. + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // A list of messages that carry the error details. There is a common set of // message types for APIs to use. @@ -145,7 +97,7 @@ func init() { func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_24d244abaf643bfe) } var fileDescriptor_24d244abaf643bfe = []byte{ - // 209 bytes of a gzipped FileDescriptorProto + // 212 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x48, 0xe8, 0x15, 0x15, 0x24, 0x4b, 0x49, 0x42, 0x15, 0x81, @@ -154,10 +106,10 @@ var fileDescriptor_24d244abaf643bfe = []byte{ 0xc0, 0x6c, 0x21, 0x09, 0x2e, 0xf6, 0xdc, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x18, 0x57, 0x48, 0x8f, 0x8b, 0x3d, 0x25, 0xb5, 0x24, 0x31, 0x33, 0xa7, 0x58, 0x82, 0x59, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x44, 0x0f, 0x6a, 0x21, 0xcc, 0x12, 0x3d, 0xc7, - 0xbc, 0xca, 0x20, 0x98, 0x22, 0xa7, 0x38, 0x2e, 0xbe, 0xe4, 0xfc, 0x5c, 0x3d, 0x84, 0xa3, 0x9c, + 0xbc, 0xca, 0x20, 0x98, 0x22, 0xa7, 0x44, 0x2e, 0xbe, 0xe4, 0xfc, 0x5c, 0x3d, 0x84, 0xa3, 0x9c, 0xb8, 0x21, 0xf6, 0x06, 0x80, 0x94, 0x07, 0x30, 0x46, 0x99, 0x43, 0xa5, 0xd2, 0xf3, 0x73, 0x12, 0xf3, 0xd2, 0xf5, 0xf2, 0x8b, 0xd2, 0xf5, 0xd3, 0x53, 0xf3, 0xc0, 0x86, 0xe9, 0x43, 0xa4, 0x12, - 0x0b, 0x32, 0x8b, 0x91, 0xfc, 0x69, 0x0d, 0xa1, 0x16, 0x31, 0x31, 0x07, 0x05, 0x38, 0x27, 0xb1, - 0x81, 0x55, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x53, 0xf0, 0x7c, 0x10, 0x01, 0x00, - 0x00, + 0x0b, 0x32, 0x8b, 0x91, 0xfc, 0x69, 0x0d, 0xa1, 0x7e, 0x30, 0x32, 0x2e, 0x62, 0x62, 0x0e, 0x0a, + 0x70, 0x4e, 0x62, 0x03, 0x2b, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x28, 0x45, 0xb1, + 0x13, 0x01, 0x00, 0x00, } diff --git a/vendor/google.golang.org/genproto/protobuf/field_mask/field_mask.pb.go b/vendor/google.golang.org/genproto/protobuf/field_mask/field_mask.pb.go index a0889f0c7a6..e6a070b8fbf 100644 --- a/vendor/google.golang.org/genproto/protobuf/field_mask/field_mask.pb.go +++ b/vendor/google.golang.org/genproto/protobuf/field_mask/field_mask.pb.go @@ -219,7 +219,7 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // // The implementation of any API method which has a FieldMask type field in the // request should verify the included field paths, and return an -// `INVALID_ARGUMENT` error if any path is duplicated or unmappable. +// `INVALID_ARGUMENT` error if any path is unmappable. type FieldMask struct { // The set of field mask paths. Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` diff --git a/vendor/google.golang.org/grpc/.travis.yml b/vendor/google.golang.org/grpc/.travis.yml index 819c1e2a922..a11e8cbca66 100644 --- a/vendor/google.golang.org/grpc/.travis.yml +++ b/vendor/google.golang.org/grpc/.travis.yml @@ -35,7 +35,7 @@ install: script: - set -e - - if [[ -n "${TESTEXTRAS}" ]]; then examples/examples_test.sh; interop/interop_test.sh; exit 0; fi + - if [[ -n "${TESTEXTRAS}" ]]; then examples/examples_test.sh; interop/interop_test.sh; make testsubmodule; exit 0; fi - if [[ -n "${VET}" ]]; then ./vet.sh; fi - if [[ -n "${GAE}" ]]; then make testappengine; exit 0; fi - if [[ -n "${RACE}" ]]; then make testrace; exit 0; fi diff --git a/vendor/google.golang.org/grpc/Makefile b/vendor/google.golang.org/grpc/Makefile index db982aabde6..410f7d56d4c 100644 --- a/vendor/google.golang.org/grpc/Makefile +++ b/vendor/google.golang.org/grpc/Makefile @@ -19,6 +19,9 @@ proto: test: testdeps go test -cpu 1,4 -timeout 7m google.golang.org/grpc/... +testsubmodule: testdeps + cd security/advancedtls && go test -cpu 1,4 -timeout 7m google.golang.org/grpc/security/advancedtls/... + testappengine: testappenginedeps goapp test -cpu 1,4 -timeout 7m google.golang.org/grpc/... diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go index 531a174a839..9258858ed75 100644 --- a/vendor/google.golang.org/grpc/balancer/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/balancer.go @@ -203,11 +203,6 @@ type ConfigParser interface { ParseConfig(LoadBalancingConfigJSON json.RawMessage) (serviceconfig.LoadBalancingConfig, error) } -// PickOptions is a type alias of PickInfo for legacy reasons. -// -// Deprecated: use PickInfo instead. -type PickOptions = PickInfo - // PickInfo contains additional information for the Pick operation. type PickInfo struct { // FullMethodName is the method name that NewClientStream() is called diff --git a/vendor/google.golang.org/grpc/balancer/base/balancer.go b/vendor/google.golang.org/grpc/balancer/base/balancer.go index d952f09f345..d7d72918ad6 100644 --- a/vendor/google.golang.org/grpc/balancer/base/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/base/balancer.go @@ -21,6 +21,7 @@ package base import ( "context" "errors" + "fmt" "google.golang.org/grpc/balancer" "google.golang.org/grpc/connectivity" @@ -76,6 +77,9 @@ type baseBalancer struct { picker balancer.Picker v2Picker balancer.V2Picker config Config + + resolverErr error // the last error reported by the resolver; cleared on successful resolution + connErr error // the last connection error; cleared upon leaving TransientFailure } func (b *baseBalancer) HandleResolvedAddrs(addrs []resolver.Address, err error) { @@ -83,13 +87,23 @@ func (b *baseBalancer) HandleResolvedAddrs(addrs []resolver.Address, err error) } func (b *baseBalancer) ResolverError(err error) { - switch b.state { - case connectivity.TransientFailure, connectivity.Idle, connectivity.Connecting: - if b.picker != nil { - b.picker = NewErrPicker(err) - } else { - b.v2Picker = NewErrPickerV2(err) - } + b.resolverErr = err + if len(b.subConns) == 0 { + b.state = connectivity.TransientFailure + } + if b.state != connectivity.TransientFailure { + // The picker will not change since the balancer does not currently + // report an error. + return + } + b.regeneratePicker() + if b.picker != nil { + b.cc.UpdateBalancerState(b.state, b.picker) + } else { + b.cc.UpdateState(balancer.State{ + ConnectivityState: b.state, + Picker: b.v2Picker, + }) } } @@ -99,6 +113,12 @@ func (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) error { if grpclog.V(2) { grpclog.Infoln("base.baseBalancer: got new ClientConn state: ", s) } + if len(s.ResolverState.Addresses) == 0 { + b.ResolverError(errors.New("produced zero addresses")) + return balancer.ErrBadResolverState + } + // Successful resolution; clear resolver error and ensure we return nil. + b.resolverErr = nil // addrsSet is the set converted from addrs, it's used for quick lookup of an address. addrsSet := make(map[resolver.Address]struct{}) for _, a := range s.ResolverState.Addresses { @@ -127,24 +147,30 @@ func (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) error { return nil } +// mergeErrors builds an error from the last connection error and the last +// resolver error. Must only be called if b.state is TransientFailure. +func (b *baseBalancer) mergeErrors() error { + // connErr must always be non-nil unless there are no SubConns, in which + // case resolverErr must be non-nil. + if b.connErr == nil { + return fmt.Errorf("last resolver error: %v", b.resolverErr) + } + if b.resolverErr == nil { + return fmt.Errorf("last connection error: %v", b.connErr) + } + return fmt.Errorf("last connection error: %v; last resolver error: %v", b.connErr, b.resolverErr) +} + // regeneratePicker takes a snapshot of the balancer, and generates a picker // from it. The picker is -// - errPicker with ErrTransientFailure if the balancer is in TransientFailure, +// - errPicker if the balancer is in TransientFailure, // - built by the pickerBuilder with all READY SubConns otherwise. -func (b *baseBalancer) regeneratePicker(err error) { +func (b *baseBalancer) regeneratePicker() { if b.state == connectivity.TransientFailure { if b.pickerBuilder != nil { b.picker = NewErrPicker(balancer.ErrTransientFailure) } else { - if err != nil { - b.v2Picker = NewErrPickerV2(balancer.TransientFailureError(err)) - } else { - // This means the last subchannel transition was not to - // TransientFailure (otherwise err must be set), but the - // aggregate state of the balancer is TransientFailure, meaning - // there are no other addresses. - b.v2Picker = NewErrPickerV2(balancer.TransientFailureError(errors.New("resolver returned no addresses"))) - } + b.v2Picker = NewErrPickerV2(balancer.TransientFailureError(b.mergeErrors())) } return } @@ -200,6 +226,9 @@ func (b *baseBalancer) UpdateSubConnState(sc balancer.SubConn, state balancer.Su oldAggrState := b.state b.state = b.csEvltr.RecordTransition(oldS, s) + // Set or clear the last connection error accordingly. + b.connErr = state.ConnectionError + // Regenerate picker when one of the following happens: // - this sc became ready from not-ready // - this sc became not-ready from ready @@ -207,7 +236,7 @@ func (b *baseBalancer) UpdateSubConnState(sc balancer.SubConn, state balancer.Su // - the aggregated state of balancer became non-TransientFailure from TransientFailure if (s == connectivity.Ready) != (oldS == connectivity.Ready) || (b.state == connectivity.TransientFailure) != (oldAggrState == connectivity.TransientFailure) { - b.regeneratePicker(state.ConnectionError) + b.regeneratePicker() } if b.picker != nil { diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go index 14ce9c76aa3..f58740b2507 100644 --- a/vendor/google.golang.org/grpc/clientconn.go +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -239,25 +239,26 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * if cc.dopts.bs == nil { cc.dopts.bs = backoff.DefaultExponential } - if cc.dopts.resolverBuilder == nil { - // Only try to parse target when resolver builder is not already set. - cc.parsedTarget = parseTarget(cc.target) - grpclog.Infof("parsed scheme: %q", cc.parsedTarget.Scheme) - cc.dopts.resolverBuilder = resolver.Get(cc.parsedTarget.Scheme) - if cc.dopts.resolverBuilder == nil { - // If resolver builder is still nil, the parsed target's scheme is - // not registered. Fallback to default resolver and set Endpoint to - // the original target. - grpclog.Infof("scheme %q not registered, fallback to default scheme", cc.parsedTarget.Scheme) - cc.parsedTarget = resolver.Target{ - Scheme: resolver.GetDefaultScheme(), - Endpoint: target, - } - cc.dopts.resolverBuilder = resolver.Get(cc.parsedTarget.Scheme) + + // Determine the resolver to use. + cc.parsedTarget = parseTarget(cc.target) + grpclog.Infof("parsed scheme: %q", cc.parsedTarget.Scheme) + resolverBuilder := cc.getResolver(cc.parsedTarget.Scheme) + if resolverBuilder == nil { + // If resolver builder is still nil, the parsed target's scheme is + // not registered. Fallback to default resolver and set Endpoint to + // the original target. + grpclog.Infof("scheme %q not registered, fallback to default scheme", cc.parsedTarget.Scheme) + cc.parsedTarget = resolver.Target{ + Scheme: resolver.GetDefaultScheme(), + Endpoint: target, + } + resolverBuilder = cc.getResolver(cc.parsedTarget.Scheme) + if resolverBuilder == nil { + return nil, fmt.Errorf("could not get resolver for default scheme: %q", cc.parsedTarget.Scheme) } - } else { - cc.parsedTarget = resolver.Target{Endpoint: target} } + creds := cc.dopts.copts.TransportCredentials if creds != nil && creds.Info().ServerName != "" { cc.authority = creds.Info().ServerName @@ -297,14 +298,14 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * } // Build the resolver. - rWrapper, err := newCCResolverWrapper(cc) + rWrapper, err := newCCResolverWrapper(cc, resolverBuilder) if err != nil { return nil, fmt.Errorf("failed to build resolver: %v", err) } - cc.mu.Lock() cc.resolverWrapper = rWrapper cc.mu.Unlock() + // A blocking dial blocks until the clientConn is ready. if cc.dopts.block { for { @@ -443,6 +444,20 @@ func (csm *connectivityStateManager) getNotifyChan() <-chan struct{} { return csm.notifyChan } +// ClientConnInterface defines the functions clients need to perform unary and +// streaming RPCs. It is implemented by *ClientConn, and is only intended to +// be referenced by generated code. +type ClientConnInterface interface { + // Invoke performs a unary RPC and returns after the response is received + // into reply. + Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...CallOption) error + // NewStream begins a streaming RPC. + NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) +} + +// Assert *ClientConn implements ClientConnInterface. +var _ ClientConnInterface = (*ClientConn)(nil) + // ClientConn represents a virtual connection to a conceptual endpoint, to // perform RPCs. // @@ -1542,3 +1557,12 @@ func (c *channelzChannel) ChannelzMetric() *channelz.ChannelInternalMetric { // Deprecated: This error is never returned by grpc and should not be // referenced by users. var ErrClientConnTimeout = errors.New("grpc: timed out when dialing") + +func (cc *ClientConn) getResolver(scheme string) resolver.Builder { + for _, rb := range cc.dopts.resolvers { + if cc.parsedTarget.Scheme == rb.Scheme() { + return rb + } + } + return resolver.Get(cc.parsedTarget.Scheme) +} diff --git a/vendor/google.golang.org/grpc/credentials/credentials.go b/vendor/google.golang.org/grpc/credentials/credentials.go index 667cf6b3360..845ce5d2161 100644 --- a/vendor/google.golang.org/grpc/credentials/credentials.go +++ b/vendor/google.golang.org/grpc/credentials/credentials.go @@ -25,6 +25,7 @@ package credentials // import "google.golang.org/grpc/credentials" import ( "context" "errors" + "fmt" "net" "github.com/golang/protobuf/proto" @@ -50,6 +51,48 @@ type PerRPCCredentials interface { RequireTransportSecurity() bool } +// SecurityLevel defines the protection level on an established connection. +// +// This API is experimental. +type SecurityLevel int + +const ( + // NoSecurity indicates a connection is insecure. + // The zero SecurityLevel value is invalid for backward compatibility. + NoSecurity SecurityLevel = iota + 1 + // IntegrityOnly indicates a connection only provides integrity protection. + IntegrityOnly + // PrivacyAndIntegrity indicates a connection provides both privacy and integrity protection. + PrivacyAndIntegrity +) + +// String returns SecurityLevel in a string format. +func (s SecurityLevel) String() string { + switch s { + case NoSecurity: + return "NoSecurity" + case IntegrityOnly: + return "IntegrityOnly" + case PrivacyAndIntegrity: + return "PrivacyAndIntegrity" + } + return fmt.Sprintf("invalid SecurityLevel: %v", int(s)) +} + +// CommonAuthInfo contains authenticated information common to AuthInfo implementations. +// It should be embedded in a struct implementing AuthInfo to provide additional information +// about the credentials. +// +// This API is experimental. +type CommonAuthInfo struct { + SecurityLevel SecurityLevel +} + +// GetCommonAuthInfo returns the pointer to CommonAuthInfo struct. +func (c *CommonAuthInfo) GetCommonAuthInfo() *CommonAuthInfo { + return c +} + // ProtocolInfo provides information regarding the gRPC wire protocol version, // security protocol, security protocol version in use, server name, etc. type ProtocolInfo struct { @@ -64,6 +107,8 @@ type ProtocolInfo struct { } // AuthInfo defines the common interface for the auth information the users are interested in. +// A struct that implements AuthInfo should embed CommonAuthInfo by including additional +// information about the credentials in it. type AuthInfo interface { AuthType() string } @@ -78,7 +123,8 @@ type TransportCredentials interface { // ClientHandshake does the authentication handshake specified by the corresponding // authentication protocol on rawConn for clients. It returns the authenticated // connection and the corresponding auth information about the connection. - // Implementations must use the provided context to implement timely cancellation. + // The auth information should embed CommonAuthInfo to return additional information about + // the credentials. Implementations must use the provided context to implement timely cancellation. // gRPC will try to reconnect if the error returned is a temporary error // (io.EOF, context.DeadlineExceeded or err.Temporary() == true). // If the returned error is a wrapper error, implementations should make sure that @@ -88,7 +134,8 @@ type TransportCredentials interface { ClientHandshake(context.Context, string, net.Conn) (net.Conn, AuthInfo, error) // ServerHandshake does the authentication handshake for servers. It returns // the authenticated connection and the corresponding auth information about - // the connection. + // the connection. The auth information should embed CommonAuthInfo to return additional information + // about the credentials. // // If the returned net.Conn is closed, it MUST close the net.Conn provided. ServerHandshake(net.Conn) (net.Conn, AuthInfo, error) @@ -127,6 +174,8 @@ type Bundle interface { type RequestInfo struct { // The method passed to Invoke or NewStream for this RPC. (For proto methods, this has the format "/some.Service/Method") Method string + // AuthInfo contains the information from a security handshake (TransportCredentials.ClientHandshake, TransportCredentials.ServerHandshake) + AuthInfo AuthInfo } // requestInfoKey is a struct to be used as the key when attaching a RequestInfo to a context object. @@ -140,6 +189,32 @@ func RequestInfoFromContext(ctx context.Context) (ri RequestInfo, ok bool) { return } +// CheckSecurityLevel checks if a connection's security level is greater than or equal to the specified one. +// It returns success if 1) the condition is satisified or 2) AuthInfo struct does not implement GetCommonAuthInfo() method +// or 3) CommonAuthInfo.SecurityLevel has an invalid zero value. For 2) and 3), it is for the purpose of backward-compatibility. +// +// This API is experimental. +func CheckSecurityLevel(ctx context.Context, level SecurityLevel) error { + type internalInfo interface { + GetCommonAuthInfo() *CommonAuthInfo + } + ri, _ := RequestInfoFromContext(ctx) + if ri.AuthInfo == nil { + return errors.New("unable to obtain SecurityLevel from context") + } + if ci, ok := ri.AuthInfo.(internalInfo); ok { + // CommonAuthInfo.SecurityLevel has an invalid value. + if ci.GetCommonAuthInfo().SecurityLevel == 0 { + return nil + } + if ci.GetCommonAuthInfo().SecurityLevel < level { + return fmt.Errorf("requires SecurityLevel %v; connection has %v", level, ci.GetCommonAuthInfo().SecurityLevel) + } + } + // The condition is satisfied or AuthInfo struct does not implement GetCommonAuthInfo() method. + return nil +} + func init() { internal.NewRequestInfoContext = func(ctx context.Context, ri RequestInfo) context.Context { return context.WithValue(ctx, requestInfoKey{}, ri) diff --git a/vendor/google.golang.org/grpc/credentials/tls.go b/vendor/google.golang.org/grpc/credentials/tls.go index 7c33613685a..28b4f6232de 100644 --- a/vendor/google.golang.org/grpc/credentials/tls.go +++ b/vendor/google.golang.org/grpc/credentials/tls.go @@ -33,6 +33,7 @@ import ( // It implements the AuthInfo interface. type TLSInfo struct { State tls.ConnectionState + CommonAuthInfo } // AuthType returns the type of TLSInfo as a string. @@ -81,24 +82,28 @@ func (c *tlsCreds) ClientHandshake(ctx context.Context, authority string, rawCon errChannel := make(chan error, 1) go func() { errChannel <- conn.Handshake() + close(errChannel) }() select { case err := <-errChannel: if err != nil { + conn.Close() return nil, nil, err } case <-ctx.Done(): + conn.Close() return nil, nil, ctx.Err() } - return internal.WrapSyscallConn(rawConn, conn), TLSInfo{conn.ConnectionState()}, nil + return internal.WrapSyscallConn(rawConn, conn), TLSInfo{conn.ConnectionState(), CommonAuthInfo{PrivacyAndIntegrity}}, nil } func (c *tlsCreds) ServerHandshake(rawConn net.Conn) (net.Conn, AuthInfo, error) { conn := tls.Server(rawConn, c.config) if err := conn.Handshake(); err != nil { + conn.Close() return nil, nil, err } - return internal.WrapSyscallConn(rawConn, conn), TLSInfo{conn.ConnectionState()}, nil + return internal.WrapSyscallConn(rawConn, conn), TLSInfo{conn.ConnectionState(), CommonAuthInfo{PrivacyAndIntegrity}}, nil } func (c *tlsCreds) Clone() TransportCredentials { diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go index 9af3eef7ab3..63f5ae21df1 100644 --- a/vendor/google.golang.org/grpc/dialoptions.go +++ b/vendor/google.golang.org/grpc/dialoptions.go @@ -58,9 +58,7 @@ type dialOptions struct { callOptions []CallOption // This is used by v1 balancer dial option WithBalancer to support v1 // balancer, and also by WithBalancerName dial option. - balancerBuilder balancer.Builder - // This is to support grpclb. - resolverBuilder resolver.Builder + balancerBuilder balancer.Builder channelzParentID int64 disableServiceConfig bool disableRetry bool @@ -73,6 +71,7 @@ type dialOptions struct { // resolver.ResolveNow(). The user will have no need to configure this, but // we need to be able to configure this in tests. resolveNowBackoff func(int) time.Duration + resolvers []resolver.Builder } // DialOption configures how we set up the connection. @@ -231,13 +230,6 @@ func WithBalancerName(balancerName string) DialOption { }) } -// withResolverBuilder is only for grpclb. -func withResolverBuilder(b resolver.Builder) DialOption { - return newFuncDialOption(func(o *dialOptions) { - o.resolverBuilder = b - }) -} - // WithServiceConfig returns a DialOption which has a channel to read the // service configuration. // @@ -365,7 +357,6 @@ func WithContextDialer(f func(context.Context, string) (net.Conn, error)) DialOp } func init() { - internal.WithResolverBuilder = withResolverBuilder internal.WithHealthCheckFunc = withHealthCheckFunc } @@ -589,3 +580,15 @@ func withResolveNowBackoff(f func(int) time.Duration) DialOption { o.resolveNowBackoff = f }) } + +// WithResolvers allows a list of resolver implementations to be registered +// locally with the ClientConn without needing to be globally registered via +// resolver.Register. They will be matched against the scheme used for the +// current Dial only, and will take precedence over the global registry. +// +// This API is EXPERIMENTAL. +func WithResolvers(rs ...resolver.Builder) DialOption { + return newFuncDialOption(func(o *dialOptions) { + o.resolvers = append(o.resolvers, rs...) + }) +} diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index 3ee8740f1f9..ae6c8972fd7 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -25,11 +25,14 @@ import ( ) const ( - prefix = "GRPC_GO_" - retryStr = prefix + "RETRY" + prefix = "GRPC_GO_" + retryStr = prefix + "RETRY" + txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS" ) var ( // Retry is set if retry is explicitly enabled via "GRPC_GO_RETRY=on". Retry = strings.EqualFold(os.Getenv(retryStr), "on") + // TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false"). + TXTErrIgnore = !strings.EqualFold(os.Getenv(retryStr), "false") ) diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go index eae18e18ccd..0912f0bf4c3 100644 --- a/vendor/google.golang.org/grpc/internal/internal.go +++ b/vendor/google.golang.org/grpc/internal/internal.go @@ -28,8 +28,6 @@ import ( ) var ( - // WithResolverBuilder is set by dialoptions.go - WithResolverBuilder interface{} // func (resolver.Builder) grpc.DialOption // WithHealthCheckFunc is set by dialoptions.go WithHealthCheckFunc interface{} // func (HealthChecker) DialOption // HealthCheckFunc is used to provide client-side LB channel health checking diff --git a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go index 7705ca22eb2..c368db62ea1 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go +++ b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go @@ -33,6 +33,7 @@ import ( "time" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/internal/envconfig" "google.golang.org/grpc/internal/grpcrand" "google.golang.org/grpc/resolver" "google.golang.org/grpc/serviceconfig" @@ -204,8 +205,12 @@ func (d *dnsResolver) watcher() { case <-d.rn: } - state := d.lookup() - d.cc.UpdateState(*state) + state, err := d.lookup() + if err != nil { + d.cc.ReportError(err) + } else { + d.cc.UpdateState(*state) + } // Sleep to prevent excessive re-resolutions. Incoming resolution requests // will be queued in d.rn. @@ -219,33 +224,37 @@ func (d *dnsResolver) watcher() { } } -func (d *dnsResolver) lookupSRV() []resolver.Address { +func (d *dnsResolver) lookupSRV() ([]resolver.Address, error) { if !EnableSRVLookups { - return nil + return nil, nil } var newAddrs []resolver.Address _, srvs, err := d.resolver.LookupSRV(d.ctx, "grpclb", "tcp", d.host) if err != nil { - grpclog.Infof("grpc: failed dns SRV record lookup due to %v.\n", err) - return nil + err = handleDNSError(err, "SRV") // may become nil + return nil, err } for _, s := range srvs { lbAddrs, err := d.resolver.LookupHost(d.ctx, s.Target) if err != nil { - grpclog.Infof("grpc: failed load balancer address dns lookup due to %v.\n", err) - continue - } - for _, a := range lbAddrs { - a, ok := formatIP(a) - if !ok { - grpclog.Errorf("grpc: failed IP parsing due to %v.\n", err) + err = handleDNSError(err, "A") // may become nil + if err == nil { + // If there are other SRV records, look them up and ignore this + // one that does not exist. continue } - addr := a + ":" + strconv.Itoa(int(s.Port)) + return nil, err + } + for _, a := range lbAddrs { + ip, ok := formatIP(a) + if !ok { + return nil, fmt.Errorf("dns: error parsing A record IP address %v", a) + } + addr := ip + ":" + strconv.Itoa(int(s.Port)) newAddrs = append(newAddrs, resolver.Address{Addr: addr, Type: resolver.GRPCLB, ServerName: s.Target}) } } - return newAddrs + return newAddrs, nil } var filterError = func(err error) error { @@ -258,13 +267,22 @@ var filterError = func(err error) error { return err } +func handleDNSError(err error, lookupType string) error { + err = filterError(err) + if err != nil { + err = fmt.Errorf("dns: %v record lookup error: %v", lookupType, err) + grpclog.Infoln(err) + } + return err +} + func (d *dnsResolver) lookupTXT() *serviceconfig.ParseResult { ss, err := d.resolver.LookupTXT(d.ctx, txtPrefix+d.host) if err != nil { - err = filterError(err) - if err != nil { - err = fmt.Errorf("error from DNS TXT record lookup: %v", err) - grpclog.Infoln("grpc:", err) + if envconfig.TXTErrIgnore { + return nil + } + if err = handleDNSError(err, "TXT"); err != nil { return &serviceconfig.ParseResult{Err: err} } return nil @@ -276,7 +294,7 @@ func (d *dnsResolver) lookupTXT() *serviceconfig.ParseResult { // TXT record must have "grpc_config=" attribute in order to be used as service config. if !strings.HasPrefix(res, txtAttribute) { - grpclog.Warningf("grpc: DNS TXT record %v missing %v attribute", res, txtAttribute) + grpclog.Warningf("dns: TXT record %v missing %v attribute", res, txtAttribute) // This is not an error; it is the equivalent of not having a service config. return nil } @@ -284,34 +302,37 @@ func (d *dnsResolver) lookupTXT() *serviceconfig.ParseResult { return d.cc.ParseServiceConfig(sc) } -func (d *dnsResolver) lookupHost() []resolver.Address { +func (d *dnsResolver) lookupHost() ([]resolver.Address, error) { var newAddrs []resolver.Address addrs, err := d.resolver.LookupHost(d.ctx, d.host) if err != nil { - grpclog.Warningf("grpc: failed dns A record lookup due to %v.\n", err) - return nil + err = handleDNSError(err, "A") + return nil, err } for _, a := range addrs { - a, ok := formatIP(a) + ip, ok := formatIP(a) if !ok { - grpclog.Errorf("grpc: failed IP parsing due to %v.\n", err) - continue + return nil, fmt.Errorf("dns: error parsing A record IP address %v", a) } - addr := a + ":" + d.port + addr := ip + ":" + d.port newAddrs = append(newAddrs, resolver.Address{Addr: addr}) } - return newAddrs + return newAddrs, nil } -func (d *dnsResolver) lookup() *resolver.State { - srv := d.lookupSRV() +func (d *dnsResolver) lookup() (*resolver.State, error) { + srv, srvErr := d.lookupSRV() + addrs, hostErr := d.lookupHost() + if hostErr != nil && (srvErr != nil || len(srv) == 0) { + return nil, hostErr + } state := &resolver.State{ - Addresses: append(d.lookupHost(), srv...), + Addresses: append(addrs, srv...), } if !d.disableServiceConfig { state.ServiceConfig = d.lookupTXT() } - return state + return state, nil } // formatIP returns ok = false if addr is not a valid textual representation of an IP address. @@ -397,12 +418,12 @@ func canaryingSC(js string) string { var rcs []rawChoice err := json.Unmarshal([]byte(js), &rcs) if err != nil { - grpclog.Warningf("grpc: failed to parse service config json string due to %v.\n", err) + grpclog.Warningf("dns: error parsing service config json: %v", err) return "" } cliHostname, err := os.Hostname() if err != nil { - grpclog.Warningf("grpc: failed to get client hostname due to %v.\n", err) + grpclog.Warningf("dns: error getting client hostname: %v", err) return "" } var sc string diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go index fbf01d5fe75..c3c32dafe9e 100644 --- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go @@ -338,7 +338,7 @@ func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream), trace Addr: ht.RemoteAddr(), } if req.TLS != nil { - pr.AuthInfo = credentials.TLSInfo{State: *req.TLS} + pr.AuthInfo = credentials.TLSInfo{State: *req.TLS, CommonAuthInfo: credentials.CommonAuthInfo{credentials.PrivacyAndIntegrity}} } ctx = metadata.NewIncomingContext(ctx, ht.headerMD) s.ctx = peer.NewContext(ctx, pr) diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index e18935653c1..2d6feeb1be9 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -403,7 +403,8 @@ func (t *http2Client) getPeer() *peer.Peer { func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) ([]hpack.HeaderField, error) { aud := t.createAudience(callHdr) ri := credentials.RequestInfo{ - Method: callHdr.Method, + Method: callHdr.Method, + AuthInfo: t.authInfo, } ctxWithRequestInfo := internal.NewRequestInfoContext.(func(context.Context, credentials.RequestInfo) context.Context)(ctx, ri) authData, err := t.getTrAuthData(ctxWithRequestInfo, aud) diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go index 03567d7be74..fe14b2fb982 100644 --- a/vendor/google.golang.org/grpc/resolver/resolver.go +++ b/vendor/google.golang.org/grpc/resolver/resolver.go @@ -124,11 +124,6 @@ type Address struct { Metadata interface{} } -// BuildOption is a type alias of BuildOptions for legacy reasons. -// -// Deprecated: use BuildOptions instead. -type BuildOption = BuildOptions - // BuildOptions includes additional information for the builder to create // the resolver. type BuildOptions struct { @@ -235,11 +230,6 @@ type Builder interface { Scheme() string } -// ResolveNowOption is a type alias of ResolveNowOptions for legacy reasons. -// -// Deprecated: use ResolveNowOptions instead. -type ResolveNowOption = ResolveNowOptions - // ResolveNowOptions includes additional information for ResolveNow. type ResolveNowOptions struct{} diff --git a/vendor/google.golang.org/grpc/resolver_conn_wrapper.go b/vendor/google.golang.org/grpc/resolver_conn_wrapper.go index 89ba9fa3e09..3eaf724cd6d 100644 --- a/vendor/google.golang.org/grpc/resolver_conn_wrapper.go +++ b/vendor/google.golang.org/grpc/resolver_conn_wrapper.go @@ -34,7 +34,7 @@ import ( ) // ccResolverWrapper is a wrapper on top of cc for resolvers. -// It implements resolver.ClientConnection interface. +// It implements resolver.ClientConn interface. type ccResolverWrapper struct { cc *ClientConn resolverMu sync.Mutex @@ -74,15 +74,9 @@ func parseTarget(target string) (ret resolver.Target) { return ret } -// newCCResolverWrapper uses the resolver.Builder stored in the ClientConn to -// build a Resolver and returns a ccResolverWrapper object which wraps the -// newly built resolver. -func newCCResolverWrapper(cc *ClientConn) (*ccResolverWrapper, error) { - rb := cc.dopts.resolverBuilder - if rb == nil { - return nil, fmt.Errorf("could not get resolver for scheme: %q", cc.parsedTarget.Scheme) - } - +// newCCResolverWrapper uses the resolver.Builder to build a Resolver and +// returns a ccResolverWrapper object which wraps the newly built resolver. +func newCCResolverWrapper(cc *ClientConn, rb resolver.Builder) (*ccResolverWrapper, error) { ccr := &ccResolverWrapper{ cc: cc, done: grpcsync.NewEvent(), diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index edaba795750..d3a4adc5ee6 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -871,7 +871,7 @@ type channelzData struct { // The SupportPackageIsVersion variables are referenced from generated protocol // buffer files to ensure compatibility with the gRPC version used. The latest -// support package version is 5. +// support package version is 6. // // Older versions are kept for compatibility. They may be removed if // compatibility cannot be maintained. @@ -881,6 +881,7 @@ const ( SupportPackageIsVersion3 = true SupportPackageIsVersion4 = true SupportPackageIsVersion5 = true + SupportPackageIsVersion6 = true ) const grpcUA = "grpc-go/" + Version diff --git a/vendor/google.golang.org/grpc/service_config.go b/vendor/google.golang.org/grpc/service_config.go index 4f8836d48f6..5a80a575a5e 100644 --- a/vendor/google.golang.org/grpc/service_config.go +++ b/vendor/google.golang.org/grpc/service_config.go @@ -136,9 +136,9 @@ type retryPolicy struct { maxAttempts int // Exponential backoff parameters. The initial retry attempt will occur at - // random(0, initialBackoffMS). In general, the nth attempt will occur at + // random(0, initialBackoff). In general, the nth attempt will occur at // random(0, - // min(initialBackoffMS*backoffMultiplier**(n-1), maxBackoffMS)). + // min(initialBackoff*backoffMultiplier**(n-1), maxBackoff)). // // These fields are required and must be greater than zero. initialBackoff time.Duration diff --git a/vendor/google.golang.org/grpc/trace.go b/vendor/google.golang.org/grpc/trace.go index 0a57b999481..07a2d26b3e7 100644 --- a/vendor/google.golang.org/grpc/trace.go +++ b/vendor/google.golang.org/grpc/trace.go @@ -41,9 +41,6 @@ func methodFamily(m string) string { if i := strings.Index(m, "/"); i >= 0 { m = m[:i] // remove everything from second slash } - if i := strings.LastIndex(m, "."); i >= 0 { - m = m[i+1:] // cut down to last dotted component - } return m } diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index 1d3b043ec4b..1a831b159ab 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.26.0" +const Version = "1.27.1" diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh index 798921acc85..0e737072781 100644 --- a/vendor/google.golang.org/grpc/vet.sh +++ b/vendor/google.golang.org/grpc/vet.sh @@ -81,7 +81,7 @@ fi # - Do not import math/rand for real library code. Use internal/grpcrand for # thread safety. -git grep -l '"math/rand"' -- "*.go" 2>&1 | (! grep -v '^examples\|^stress\|grpcrand\|wrr_test') +git grep -l '"math/rand"' -- "*.go" 2>&1 | (! grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test') # - Ensure all ptypes proto packages are renamed when importing. (! git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go") diff --git a/vendor/gopkg.in/yaml.v3/.travis.yml b/vendor/gopkg.in/yaml.v3/.travis.yml new file mode 100644 index 00000000000..a130fe883ce --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/.travis.yml @@ -0,0 +1,17 @@ +language: go + +go: + - "1.4.x" + - "1.5.x" + - "1.6.x" + - "1.7.x" + - "1.8.x" + - "1.9.x" + - "1.10.x" + - "1.11.x" + - "1.12.x" + - "1.13.x" + - "1.14.x" + - "tip" + +go_import_path: gopkg.in/yaml.v3 diff --git a/vendor/gopkg.in/yaml.v3/LICENSE b/vendor/gopkg.in/yaml.v3/LICENSE new file mode 100644 index 00000000000..2683e4bb1f2 --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/LICENSE @@ -0,0 +1,50 @@ + +This project is covered by two different licenses: MIT and Apache. + +#### MIT License #### + +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original MIT license, with the additional +copyright staring in 2011 when the project was ported over: + + apic.go emitterc.go parserc.go readerc.go scannerc.go + writerc.go yamlh.go yamlprivateh.go + +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +### Apache License ### + +All the remaining project files are covered by the Apache license: + +Copyright (c) 2011-2019 Canonical Ltd + +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. diff --git a/vendor/gopkg.in/yaml.v3/NOTICE b/vendor/gopkg.in/yaml.v3/NOTICE new file mode 100644 index 00000000000..866d74a7ad7 --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/NOTICE @@ -0,0 +1,13 @@ +Copyright 2011-2016 Canonical Ltd. + +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. diff --git a/vendor/gopkg.in/yaml.v3/README.md b/vendor/gopkg.in/yaml.v3/README.md new file mode 100644 index 00000000000..08eb1babddf --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/README.md @@ -0,0 +1,150 @@ +# YAML support for the Go language + +Introduction +------------ + +The yaml package enables Go programs to comfortably encode and decode YAML +values. It was developed within [Canonical](https://www.canonical.com) as +part of the [juju](https://juju.ubuntu.com) project, and is based on a +pure Go port of the well-known [libyaml](http://pyyaml.org/wiki/LibYAML) +C library to parse and generate YAML data quickly and reliably. + +Compatibility +------------- + +The yaml package supports most of YAML 1.2, but preserves some behavior +from 1.1 for backwards compatibility. + +Specifically, as of v3 of the yaml package: + + - YAML 1.1 bools (_yes/no, on/off_) are supported as long as they are being + decoded into a typed bool value. Otherwise they behave as a string. Booleans + in YAML 1.2 are _true/false_ only. + - Octals encode and decode as _0777_ per YAML 1.1, rather than _0o777_ + as specified in YAML 1.2, because most parsers still use the old format. + Octals in the _0o777_ format are supported though, so new files work. + - Does not support base-60 floats. These are gone from YAML 1.2, and were + actually never supported by this package as it's clearly a poor choice. + +and offers backwards +compatibility with YAML 1.1 in some cases. +1.2, including support for +anchors, tags, map merging, etc. Multi-document unmarshalling is not yet +implemented, and base-60 floats from YAML 1.1 are purposefully not +supported since they're a poor design and are gone in YAML 1.2. + +Installation and usage +---------------------- + +The import path for the package is *gopkg.in/yaml.v3*. + +To install it, run: + + go get gopkg.in/yaml.v3 + +API documentation +----------------- + +If opened in a browser, the import path itself leads to the API documentation: + + - [https://gopkg.in/yaml.v3](https://gopkg.in/yaml.v3) + +API stability +------------- + +The package API for yaml v3 will remain stable as described in [gopkg.in](https://gopkg.in). + + +License +------- + +The yaml package is licensed under the MIT and Apache License 2.0 licenses. +Please see the LICENSE file for details. + + +Example +------- + +```Go +package main + +import ( + "fmt" + "log" + + "gopkg.in/yaml.v3" +) + +var data = ` +a: Easy! +b: + c: 2 + d: [3, 4] +` + +// Note: struct fields must be public in order for unmarshal to +// correctly populate the data. +type T struct { + A string + B struct { + RenamedC int `yaml:"c"` + D []int `yaml:",flow"` + } +} + +func main() { + t := T{} + + err := yaml.Unmarshal([]byte(data), &t) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- t:\n%v\n\n", t) + + d, err := yaml.Marshal(&t) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- t dump:\n%s\n\n", string(d)) + + m := make(map[interface{}]interface{}) + + err = yaml.Unmarshal([]byte(data), &m) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- m:\n%v\n\n", m) + + d, err = yaml.Marshal(&m) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- m dump:\n%s\n\n", string(d)) +} +``` + +This example will generate the following output: + +``` +--- t: +{Easy! {2 [3 4]}} + +--- t dump: +a: Easy! +b: + c: 2 + d: [3, 4] + + +--- m: +map[a:Easy! b:map[c:2 d:[3 4]]] + +--- m dump: +a: Easy! +b: + c: 2 + d: + - 3 + - 4 +``` + diff --git a/vendor/gopkg.in/yaml.v3/apic.go b/vendor/gopkg.in/yaml.v3/apic.go new file mode 100644 index 00000000000..ae7d049f182 --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/apic.go @@ -0,0 +1,747 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "io" +) + +func yaml_insert_token(parser *yaml_parser_t, pos int, token *yaml_token_t) { + //fmt.Println("yaml_insert_token", "pos:", pos, "typ:", token.typ, "head:", parser.tokens_head, "len:", len(parser.tokens)) + + // Check if we can move the queue at the beginning of the buffer. + if parser.tokens_head > 0 && len(parser.tokens) == cap(parser.tokens) { + if parser.tokens_head != len(parser.tokens) { + copy(parser.tokens, parser.tokens[parser.tokens_head:]) + } + parser.tokens = parser.tokens[:len(parser.tokens)-parser.tokens_head] + parser.tokens_head = 0 + } + parser.tokens = append(parser.tokens, *token) + if pos < 0 { + return + } + copy(parser.tokens[parser.tokens_head+pos+1:], parser.tokens[parser.tokens_head+pos:]) + parser.tokens[parser.tokens_head+pos] = *token +} + +// Create a new parser object. +func yaml_parser_initialize(parser *yaml_parser_t) bool { + *parser = yaml_parser_t{ + raw_buffer: make([]byte, 0, input_raw_buffer_size), + buffer: make([]byte, 0, input_buffer_size), + } + return true +} + +// Destroy a parser object. +func yaml_parser_delete(parser *yaml_parser_t) { + *parser = yaml_parser_t{} +} + +// String read handler. +func yaml_string_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { + if parser.input_pos == len(parser.input) { + return 0, io.EOF + } + n = copy(buffer, parser.input[parser.input_pos:]) + parser.input_pos += n + return n, nil +} + +// Reader read handler. +func yaml_reader_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { + return parser.input_reader.Read(buffer) +} + +// Set a string input. +func yaml_parser_set_input_string(parser *yaml_parser_t, input []byte) { + if parser.read_handler != nil { + panic("must set the input source only once") + } + parser.read_handler = yaml_string_read_handler + parser.input = input + parser.input_pos = 0 +} + +// Set a file input. +func yaml_parser_set_input_reader(parser *yaml_parser_t, r io.Reader) { + if parser.read_handler != nil { + panic("must set the input source only once") + } + parser.read_handler = yaml_reader_read_handler + parser.input_reader = r +} + +// Set the source encoding. +func yaml_parser_set_encoding(parser *yaml_parser_t, encoding yaml_encoding_t) { + if parser.encoding != yaml_ANY_ENCODING { + panic("must set the encoding only once") + } + parser.encoding = encoding +} + +// Create a new emitter object. +func yaml_emitter_initialize(emitter *yaml_emitter_t) { + *emitter = yaml_emitter_t{ + buffer: make([]byte, output_buffer_size), + raw_buffer: make([]byte, 0, output_raw_buffer_size), + states: make([]yaml_emitter_state_t, 0, initial_stack_size), + events: make([]yaml_event_t, 0, initial_queue_size), + best_width: -1, + } +} + +// Destroy an emitter object. +func yaml_emitter_delete(emitter *yaml_emitter_t) { + *emitter = yaml_emitter_t{} +} + +// String write handler. +func yaml_string_write_handler(emitter *yaml_emitter_t, buffer []byte) error { + *emitter.output_buffer = append(*emitter.output_buffer, buffer...) + return nil +} + +// yaml_writer_write_handler uses emitter.output_writer to write the +// emitted text. +func yaml_writer_write_handler(emitter *yaml_emitter_t, buffer []byte) error { + _, err := emitter.output_writer.Write(buffer) + return err +} + +// Set a string output. +func yaml_emitter_set_output_string(emitter *yaml_emitter_t, output_buffer *[]byte) { + if emitter.write_handler != nil { + panic("must set the output target only once") + } + emitter.write_handler = yaml_string_write_handler + emitter.output_buffer = output_buffer +} + +// Set a file output. +func yaml_emitter_set_output_writer(emitter *yaml_emitter_t, w io.Writer) { + if emitter.write_handler != nil { + panic("must set the output target only once") + } + emitter.write_handler = yaml_writer_write_handler + emitter.output_writer = w +} + +// Set the output encoding. +func yaml_emitter_set_encoding(emitter *yaml_emitter_t, encoding yaml_encoding_t) { + if emitter.encoding != yaml_ANY_ENCODING { + panic("must set the output encoding only once") + } + emitter.encoding = encoding +} + +// Set the canonical output style. +func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { + emitter.canonical = canonical +} + +// Set the indentation increment. +func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { + if indent < 2 || indent > 9 { + indent = 2 + } + emitter.best_indent = indent +} + +// Set the preferred line width. +func yaml_emitter_set_width(emitter *yaml_emitter_t, width int) { + if width < 0 { + width = -1 + } + emitter.best_width = width +} + +// Set if unescaped non-ASCII characters are allowed. +func yaml_emitter_set_unicode(emitter *yaml_emitter_t, unicode bool) { + emitter.unicode = unicode +} + +// Set the preferred line break character. +func yaml_emitter_set_break(emitter *yaml_emitter_t, line_break yaml_break_t) { + emitter.line_break = line_break +} + +///* +// * Destroy a token object. +// */ +// +//YAML_DECLARE(void) +//yaml_token_delete(yaml_token_t *token) +//{ +// assert(token); // Non-NULL token object expected. +// +// switch (token.type) +// { +// case YAML_TAG_DIRECTIVE_TOKEN: +// yaml_free(token.data.tag_directive.handle); +// yaml_free(token.data.tag_directive.prefix); +// break; +// +// case YAML_ALIAS_TOKEN: +// yaml_free(token.data.alias.value); +// break; +// +// case YAML_ANCHOR_TOKEN: +// yaml_free(token.data.anchor.value); +// break; +// +// case YAML_TAG_TOKEN: +// yaml_free(token.data.tag.handle); +// yaml_free(token.data.tag.suffix); +// break; +// +// case YAML_SCALAR_TOKEN: +// yaml_free(token.data.scalar.value); +// break; +// +// default: +// break; +// } +// +// memset(token, 0, sizeof(yaml_token_t)); +//} +// +///* +// * Check if a string is a valid UTF-8 sequence. +// * +// * Check 'reader.c' for more details on UTF-8 encoding. +// */ +// +//static int +//yaml_check_utf8(yaml_char_t *start, size_t length) +//{ +// yaml_char_t *end = start+length; +// yaml_char_t *pointer = start; +// +// while (pointer < end) { +// unsigned char octet; +// unsigned int width; +// unsigned int value; +// size_t k; +// +// octet = pointer[0]; +// width = (octet & 0x80) == 0x00 ? 1 : +// (octet & 0xE0) == 0xC0 ? 2 : +// (octet & 0xF0) == 0xE0 ? 3 : +// (octet & 0xF8) == 0xF0 ? 4 : 0; +// value = (octet & 0x80) == 0x00 ? octet & 0x7F : +// (octet & 0xE0) == 0xC0 ? octet & 0x1F : +// (octet & 0xF0) == 0xE0 ? octet & 0x0F : +// (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0; +// if (!width) return 0; +// if (pointer+width > end) return 0; +// for (k = 1; k < width; k ++) { +// octet = pointer[k]; +// if ((octet & 0xC0) != 0x80) return 0; +// value = (value << 6) + (octet & 0x3F); +// } +// if (!((width == 1) || +// (width == 2 && value >= 0x80) || +// (width == 3 && value >= 0x800) || +// (width == 4 && value >= 0x10000))) return 0; +// +// pointer += width; +// } +// +// return 1; +//} +// + +// Create STREAM-START. +func yaml_stream_start_event_initialize(event *yaml_event_t, encoding yaml_encoding_t) { + *event = yaml_event_t{ + typ: yaml_STREAM_START_EVENT, + encoding: encoding, + } +} + +// Create STREAM-END. +func yaml_stream_end_event_initialize(event *yaml_event_t) { + *event = yaml_event_t{ + typ: yaml_STREAM_END_EVENT, + } +} + +// Create DOCUMENT-START. +func yaml_document_start_event_initialize( + event *yaml_event_t, + version_directive *yaml_version_directive_t, + tag_directives []yaml_tag_directive_t, + implicit bool, +) { + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + version_directive: version_directive, + tag_directives: tag_directives, + implicit: implicit, + } +} + +// Create DOCUMENT-END. +func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) { + *event = yaml_event_t{ + typ: yaml_DOCUMENT_END_EVENT, + implicit: implicit, + } +} + +// Create ALIAS. +func yaml_alias_event_initialize(event *yaml_event_t, anchor []byte) bool { + *event = yaml_event_t{ + typ: yaml_ALIAS_EVENT, + anchor: anchor, + } + return true +} + +// Create SCALAR. +func yaml_scalar_event_initialize(event *yaml_event_t, anchor, tag, value []byte, plain_implicit, quoted_implicit bool, style yaml_scalar_style_t) bool { + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + anchor: anchor, + tag: tag, + value: value, + implicit: plain_implicit, + quoted_implicit: quoted_implicit, + style: yaml_style_t(style), + } + return true +} + +// Create SEQUENCE-START. +func yaml_sequence_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_sequence_style_t) bool { + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(style), + } + return true +} + +// Create SEQUENCE-END. +func yaml_sequence_end_event_initialize(event *yaml_event_t) bool { + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + } + return true +} + +// Create MAPPING-START. +func yaml_mapping_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_mapping_style_t) { + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(style), + } +} + +// Create MAPPING-END. +func yaml_mapping_end_event_initialize(event *yaml_event_t) { + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + } +} + +// Destroy an event object. +func yaml_event_delete(event *yaml_event_t) { + *event = yaml_event_t{} +} + +///* +// * Create a document object. +// */ +// +//YAML_DECLARE(int) +//yaml_document_initialize(document *yaml_document_t, +// version_directive *yaml_version_directive_t, +// tag_directives_start *yaml_tag_directive_t, +// tag_directives_end *yaml_tag_directive_t, +// start_implicit int, end_implicit int) +//{ +// struct { +// error yaml_error_type_t +// } context +// struct { +// start *yaml_node_t +// end *yaml_node_t +// top *yaml_node_t +// } nodes = { NULL, NULL, NULL } +// version_directive_copy *yaml_version_directive_t = NULL +// struct { +// start *yaml_tag_directive_t +// end *yaml_tag_directive_t +// top *yaml_tag_directive_t +// } tag_directives_copy = { NULL, NULL, NULL } +// value yaml_tag_directive_t = { NULL, NULL } +// mark yaml_mark_t = { 0, 0, 0 } +// +// assert(document) // Non-NULL document object is expected. +// assert((tag_directives_start && tag_directives_end) || +// (tag_directives_start == tag_directives_end)) +// // Valid tag directives are expected. +// +// if (!STACK_INIT(&context, nodes, INITIAL_STACK_SIZE)) goto error +// +// if (version_directive) { +// version_directive_copy = yaml_malloc(sizeof(yaml_version_directive_t)) +// if (!version_directive_copy) goto error +// version_directive_copy.major = version_directive.major +// version_directive_copy.minor = version_directive.minor +// } +// +// if (tag_directives_start != tag_directives_end) { +// tag_directive *yaml_tag_directive_t +// if (!STACK_INIT(&context, tag_directives_copy, INITIAL_STACK_SIZE)) +// goto error +// for (tag_directive = tag_directives_start +// tag_directive != tag_directives_end; tag_directive ++) { +// assert(tag_directive.handle) +// assert(tag_directive.prefix) +// if (!yaml_check_utf8(tag_directive.handle, +// strlen((char *)tag_directive.handle))) +// goto error +// if (!yaml_check_utf8(tag_directive.prefix, +// strlen((char *)tag_directive.prefix))) +// goto error +// value.handle = yaml_strdup(tag_directive.handle) +// value.prefix = yaml_strdup(tag_directive.prefix) +// if (!value.handle || !value.prefix) goto error +// if (!PUSH(&context, tag_directives_copy, value)) +// goto error +// value.handle = NULL +// value.prefix = NULL +// } +// } +// +// DOCUMENT_INIT(*document, nodes.start, nodes.end, version_directive_copy, +// tag_directives_copy.start, tag_directives_copy.top, +// start_implicit, end_implicit, mark, mark) +// +// return 1 +// +//error: +// STACK_DEL(&context, nodes) +// yaml_free(version_directive_copy) +// while (!STACK_EMPTY(&context, tag_directives_copy)) { +// value yaml_tag_directive_t = POP(&context, tag_directives_copy) +// yaml_free(value.handle) +// yaml_free(value.prefix) +// } +// STACK_DEL(&context, tag_directives_copy) +// yaml_free(value.handle) +// yaml_free(value.prefix) +// +// return 0 +//} +// +///* +// * Destroy a document object. +// */ +// +//YAML_DECLARE(void) +//yaml_document_delete(document *yaml_document_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// tag_directive *yaml_tag_directive_t +// +// context.error = YAML_NO_ERROR // Eliminate a compiler warning. +// +// assert(document) // Non-NULL document object is expected. +// +// while (!STACK_EMPTY(&context, document.nodes)) { +// node yaml_node_t = POP(&context, document.nodes) +// yaml_free(node.tag) +// switch (node.type) { +// case YAML_SCALAR_NODE: +// yaml_free(node.data.scalar.value) +// break +// case YAML_SEQUENCE_NODE: +// STACK_DEL(&context, node.data.sequence.items) +// break +// case YAML_MAPPING_NODE: +// STACK_DEL(&context, node.data.mapping.pairs) +// break +// default: +// assert(0) // Should not happen. +// } +// } +// STACK_DEL(&context, document.nodes) +// +// yaml_free(document.version_directive) +// for (tag_directive = document.tag_directives.start +// tag_directive != document.tag_directives.end +// tag_directive++) { +// yaml_free(tag_directive.handle) +// yaml_free(tag_directive.prefix) +// } +// yaml_free(document.tag_directives.start) +// +// memset(document, 0, sizeof(yaml_document_t)) +//} +// +///** +// * Get a document node. +// */ +// +//YAML_DECLARE(yaml_node_t *) +//yaml_document_get_node(document *yaml_document_t, index int) +//{ +// assert(document) // Non-NULL document object is expected. +// +// if (index > 0 && document.nodes.start + index <= document.nodes.top) { +// return document.nodes.start + index - 1 +// } +// return NULL +//} +// +///** +// * Get the root object. +// */ +// +//YAML_DECLARE(yaml_node_t *) +//yaml_document_get_root_node(document *yaml_document_t) +//{ +// assert(document) // Non-NULL document object is expected. +// +// if (document.nodes.top != document.nodes.start) { +// return document.nodes.start +// } +// return NULL +//} +// +///* +// * Add a scalar node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_scalar(document *yaml_document_t, +// tag *yaml_char_t, value *yaml_char_t, length int, +// style yaml_scalar_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// value_copy *yaml_char_t = NULL +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// assert(value) // Non-NULL value is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (length < 0) { +// length = strlen((char *)value) +// } +// +// if (!yaml_check_utf8(value, length)) goto error +// value_copy = yaml_malloc(length+1) +// if (!value_copy) goto error +// memcpy(value_copy, value, length) +// value_copy[length] = '\0' +// +// SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// yaml_free(tag_copy) +// yaml_free(value_copy) +// +// return 0 +//} +// +///* +// * Add a sequence node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_sequence(document *yaml_document_t, +// tag *yaml_char_t, style yaml_sequence_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// struct { +// start *yaml_node_item_t +// end *yaml_node_item_t +// top *yaml_node_item_t +// } items = { NULL, NULL, NULL } +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (!STACK_INIT(&context, items, INITIAL_STACK_SIZE)) goto error +// +// SEQUENCE_NODE_INIT(node, tag_copy, items.start, items.end, +// style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// STACK_DEL(&context, items) +// yaml_free(tag_copy) +// +// return 0 +//} +// +///* +// * Add a mapping node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_mapping(document *yaml_document_t, +// tag *yaml_char_t, style yaml_mapping_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// struct { +// start *yaml_node_pair_t +// end *yaml_node_pair_t +// top *yaml_node_pair_t +// } pairs = { NULL, NULL, NULL } +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (!STACK_INIT(&context, pairs, INITIAL_STACK_SIZE)) goto error +// +// MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end, +// style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// STACK_DEL(&context, pairs) +// yaml_free(tag_copy) +// +// return 0 +//} +// +///* +// * Append an item to a sequence node. +// */ +// +//YAML_DECLARE(int) +//yaml_document_append_sequence_item(document *yaml_document_t, +// sequence int, item int) +//{ +// struct { +// error yaml_error_type_t +// } context +// +// assert(document) // Non-NULL document is required. +// assert(sequence > 0 +// && document.nodes.start + sequence <= document.nodes.top) +// // Valid sequence id is required. +// assert(document.nodes.start[sequence-1].type == YAML_SEQUENCE_NODE) +// // A sequence node is required. +// assert(item > 0 && document.nodes.start + item <= document.nodes.top) +// // Valid item id is required. +// +// if (!PUSH(&context, +// document.nodes.start[sequence-1].data.sequence.items, item)) +// return 0 +// +// return 1 +//} +// +///* +// * Append a pair of a key and a value to a mapping node. +// */ +// +//YAML_DECLARE(int) +//yaml_document_append_mapping_pair(document *yaml_document_t, +// mapping int, key int, value int) +//{ +// struct { +// error yaml_error_type_t +// } context +// +// pair yaml_node_pair_t +// +// assert(document) // Non-NULL document is required. +// assert(mapping > 0 +// && document.nodes.start + mapping <= document.nodes.top) +// // Valid mapping id is required. +// assert(document.nodes.start[mapping-1].type == YAML_MAPPING_NODE) +// // A mapping node is required. +// assert(key > 0 && document.nodes.start + key <= document.nodes.top) +// // Valid key id is required. +// assert(value > 0 && document.nodes.start + value <= document.nodes.top) +// // Valid value id is required. +// +// pair.key = key +// pair.value = value +// +// if (!PUSH(&context, +// document.nodes.start[mapping-1].data.mapping.pairs, pair)) +// return 0 +// +// return 1 +//} +// +// diff --git a/vendor/gopkg.in/yaml.v3/decode.go b/vendor/gopkg.in/yaml.v3/decode.go new file mode 100644 index 00000000000..21c0dacfdff --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/decode.go @@ -0,0 +1,948 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// +// 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 yaml + +import ( + "encoding" + "encoding/base64" + "fmt" + "io" + "math" + "reflect" + "strconv" + "time" +) + +// ---------------------------------------------------------------------------- +// Parser, produces a node tree out of a libyaml event stream. + +type parser struct { + parser yaml_parser_t + event yaml_event_t + doc *Node + anchors map[string]*Node + doneInit bool + textless bool +} + +func newParser(b []byte) *parser { + p := parser{} + if !yaml_parser_initialize(&p.parser) { + panic("failed to initialize YAML emitter") + } + if len(b) == 0 { + b = []byte{'\n'} + } + yaml_parser_set_input_string(&p.parser, b) + return &p +} + +func newParserFromReader(r io.Reader) *parser { + p := parser{} + if !yaml_parser_initialize(&p.parser) { + panic("failed to initialize YAML emitter") + } + yaml_parser_set_input_reader(&p.parser, r) + return &p +} + +func (p *parser) init() { + if p.doneInit { + return + } + p.anchors = make(map[string]*Node) + p.expect(yaml_STREAM_START_EVENT) + p.doneInit = true +} + +func (p *parser) destroy() { + if p.event.typ != yaml_NO_EVENT { + yaml_event_delete(&p.event) + } + yaml_parser_delete(&p.parser) +} + +// expect consumes an event from the event stream and +// checks that it's of the expected type. +func (p *parser) expect(e yaml_event_type_t) { + if p.event.typ == yaml_NO_EVENT { + if !yaml_parser_parse(&p.parser, &p.event) { + p.fail() + } + } + if p.event.typ == yaml_STREAM_END_EVENT { + failf("attempted to go past the end of stream; corrupted value?") + } + if p.event.typ != e { + p.parser.problem = fmt.Sprintf("expected %s event but got %s", e, p.event.typ) + p.fail() + } + yaml_event_delete(&p.event) + p.event.typ = yaml_NO_EVENT +} + +// peek peeks at the next event in the event stream, +// puts the results into p.event and returns the event type. +func (p *parser) peek() yaml_event_type_t { + if p.event.typ != yaml_NO_EVENT { + return p.event.typ + } + if !yaml_parser_parse(&p.parser, &p.event) { + p.fail() + } + return p.event.typ +} + +func (p *parser) fail() { + var where string + var line int + if p.parser.context_mark.line != 0 { + line = p.parser.context_mark.line + // Scanner errors don't iterate line before returning error + if p.parser.error == yaml_SCANNER_ERROR { + line++ + } + } else if p.parser.problem_mark.line != 0 { + line = p.parser.problem_mark.line + // Scanner errors don't iterate line before returning error + if p.parser.error == yaml_SCANNER_ERROR { + line++ + } + } + if line != 0 { + where = "line " + strconv.Itoa(line) + ": " + } + var msg string + if len(p.parser.problem) > 0 { + msg = p.parser.problem + } else { + msg = "unknown problem parsing YAML content" + } + failf("%s%s", where, msg) +} + +func (p *parser) anchor(n *Node, anchor []byte) { + if anchor != nil { + n.Anchor = string(anchor) + p.anchors[n.Anchor] = n + } +} + +func (p *parser) parse() *Node { + p.init() + switch p.peek() { + case yaml_SCALAR_EVENT: + return p.scalar() + case yaml_ALIAS_EVENT: + return p.alias() + case yaml_MAPPING_START_EVENT: + return p.mapping() + case yaml_SEQUENCE_START_EVENT: + return p.sequence() + case yaml_DOCUMENT_START_EVENT: + return p.document() + case yaml_STREAM_END_EVENT: + // Happens when attempting to decode an empty buffer. + return nil + case yaml_TAIL_COMMENT_EVENT: + panic("internal error: unexpected tail comment event (please report)") + default: + panic("internal error: attempted to parse unknown event (please report): " + p.event.typ.String()) + } +} + +func (p *parser) node(kind Kind, defaultTag, tag, value string) *Node { + var style Style + if tag != "" && tag != "!" { + tag = shortTag(tag) + style = TaggedStyle + } else if defaultTag != "" { + tag = defaultTag + } else if kind == ScalarNode { + tag, _ = resolve("", value) + } + n := &Node{ + Kind: kind, + Tag: tag, + Value: value, + Style: style, + } + if !p.textless { + n.Line = p.event.start_mark.line + 1 + n.Column = p.event.start_mark.column + 1 + n.HeadComment = string(p.event.head_comment) + n.LineComment = string(p.event.line_comment) + n.FootComment = string(p.event.foot_comment) + } + return n +} + +func (p *parser) parseChild(parent *Node) *Node { + child := p.parse() + parent.Content = append(parent.Content, child) + return child +} + +func (p *parser) document() *Node { + n := p.node(DocumentNode, "", "", "") + p.doc = n + p.expect(yaml_DOCUMENT_START_EVENT) + p.parseChild(n) + if p.peek() == yaml_DOCUMENT_END_EVENT { + n.FootComment = string(p.event.foot_comment) + } + p.expect(yaml_DOCUMENT_END_EVENT) + return n +} + +func (p *parser) alias() *Node { + n := p.node(AliasNode, "", "", string(p.event.anchor)) + n.Alias = p.anchors[n.Value] + if n.Alias == nil { + failf("unknown anchor '%s' referenced", n.Value) + } + p.expect(yaml_ALIAS_EVENT) + return n +} + +func (p *parser) scalar() *Node { + var parsedStyle = p.event.scalar_style() + var nodeStyle Style + switch { + case parsedStyle&yaml_DOUBLE_QUOTED_SCALAR_STYLE != 0: + nodeStyle = DoubleQuotedStyle + case parsedStyle&yaml_SINGLE_QUOTED_SCALAR_STYLE != 0: + nodeStyle = SingleQuotedStyle + case parsedStyle&yaml_LITERAL_SCALAR_STYLE != 0: + nodeStyle = LiteralStyle + case parsedStyle&yaml_FOLDED_SCALAR_STYLE != 0: + nodeStyle = FoldedStyle + } + var nodeValue = string(p.event.value) + var nodeTag = string(p.event.tag) + var defaultTag string + if nodeStyle == 0 { + if nodeValue == "<<" { + defaultTag = mergeTag + } + } else { + defaultTag = strTag + } + n := p.node(ScalarNode, defaultTag, nodeTag, nodeValue) + n.Style |= nodeStyle + p.anchor(n, p.event.anchor) + p.expect(yaml_SCALAR_EVENT) + return n +} + +func (p *parser) sequence() *Node { + n := p.node(SequenceNode, seqTag, string(p.event.tag), "") + if p.event.sequence_style()&yaml_FLOW_SEQUENCE_STYLE != 0 { + n.Style |= FlowStyle + } + p.anchor(n, p.event.anchor) + p.expect(yaml_SEQUENCE_START_EVENT) + for p.peek() != yaml_SEQUENCE_END_EVENT { + p.parseChild(n) + } + n.LineComment = string(p.event.line_comment) + n.FootComment = string(p.event.foot_comment) + p.expect(yaml_SEQUENCE_END_EVENT) + return n +} + +func (p *parser) mapping() *Node { + n := p.node(MappingNode, mapTag, string(p.event.tag), "") + block := true + if p.event.mapping_style()&yaml_FLOW_MAPPING_STYLE != 0 { + block = false + n.Style |= FlowStyle + } + p.anchor(n, p.event.anchor) + p.expect(yaml_MAPPING_START_EVENT) + for p.peek() != yaml_MAPPING_END_EVENT { + k := p.parseChild(n) + if block && k.FootComment != "" { + // Must be a foot comment for the prior value when being dedented. + if len(n.Content) > 2 { + n.Content[len(n.Content)-3].FootComment = k.FootComment + k.FootComment = "" + } + } + v := p.parseChild(n) + if k.FootComment == "" && v.FootComment != "" { + k.FootComment = v.FootComment + v.FootComment = "" + } + if p.peek() == yaml_TAIL_COMMENT_EVENT { + if k.FootComment == "" { + k.FootComment = string(p.event.foot_comment) + } + p.expect(yaml_TAIL_COMMENT_EVENT) + } + } + n.LineComment = string(p.event.line_comment) + n.FootComment = string(p.event.foot_comment) + if n.Style&FlowStyle == 0 && n.FootComment != "" && len(n.Content) > 1 { + n.Content[len(n.Content)-2].FootComment = n.FootComment + n.FootComment = "" + } + p.expect(yaml_MAPPING_END_EVENT) + return n +} + +// ---------------------------------------------------------------------------- +// Decoder, unmarshals a node into a provided value. + +type decoder struct { + doc *Node + aliases map[*Node]bool + terrors []string + + stringMapType reflect.Type + generalMapType reflect.Type + + knownFields bool + uniqueKeys bool + decodeCount int + aliasCount int + aliasDepth int +} + +var ( + nodeType = reflect.TypeOf(Node{}) + durationType = reflect.TypeOf(time.Duration(0)) + stringMapType = reflect.TypeOf(map[string]interface{}{}) + generalMapType = reflect.TypeOf(map[interface{}]interface{}{}) + ifaceType = generalMapType.Elem() + timeType = reflect.TypeOf(time.Time{}) + ptrTimeType = reflect.TypeOf(&time.Time{}) +) + +func newDecoder() *decoder { + d := &decoder{ + stringMapType: stringMapType, + generalMapType: generalMapType, + uniqueKeys: true, + } + d.aliases = make(map[*Node]bool) + return d +} + +func (d *decoder) terror(n *Node, tag string, out reflect.Value) { + if n.Tag != "" { + tag = n.Tag + } + value := n.Value + if tag != seqTag && tag != mapTag { + if len(value) > 10 { + value = " `" + value[:7] + "...`" + } else { + value = " `" + value + "`" + } + } + d.terrors = append(d.terrors, fmt.Sprintf("line %d: cannot unmarshal %s%s into %s", n.Line, shortTag(tag), value, out.Type())) +} + +func (d *decoder) callUnmarshaler(n *Node, u Unmarshaler) (good bool) { + err := u.UnmarshalYAML(n) + if e, ok := err.(*TypeError); ok { + d.terrors = append(d.terrors, e.Errors...) + return false + } + if err != nil { + fail(err) + } + return true +} + +func (d *decoder) callObsoleteUnmarshaler(n *Node, u obsoleteUnmarshaler) (good bool) { + terrlen := len(d.terrors) + err := u.UnmarshalYAML(func(v interface{}) (err error) { + defer handleErr(&err) + d.unmarshal(n, reflect.ValueOf(v)) + if len(d.terrors) > terrlen { + issues := d.terrors[terrlen:] + d.terrors = d.terrors[:terrlen] + return &TypeError{issues} + } + return nil + }) + if e, ok := err.(*TypeError); ok { + d.terrors = append(d.terrors, e.Errors...) + return false + } + if err != nil { + fail(err) + } + return true +} + +// d.prepare initializes and dereferences pointers and calls UnmarshalYAML +// if a value is found to implement it. +// It returns the initialized and dereferenced out value, whether +// unmarshalling was already done by UnmarshalYAML, and if so whether +// its types unmarshalled appropriately. +// +// If n holds a null value, prepare returns before doing anything. +func (d *decoder) prepare(n *Node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) { + if n.ShortTag() == nullTag || n.Kind == 0 && n.IsZero() { + return out, false, false + } + again := true + for again { + again = false + if out.Kind() == reflect.Ptr { + if out.IsNil() { + out.Set(reflect.New(out.Type().Elem())) + } + out = out.Elem() + again = true + } + if out.CanAddr() { + outi := out.Addr().Interface() + if u, ok := outi.(Unmarshaler); ok { + good = d.callUnmarshaler(n, u) + return out, true, good + } + if u, ok := outi.(obsoleteUnmarshaler); ok { + good = d.callObsoleteUnmarshaler(n, u) + return out, true, good + } + } + } + return out, false, false +} + +func (d *decoder) fieldByIndex(n *Node, v reflect.Value, index []int) (field reflect.Value) { + if n.ShortTag() == nullTag { + return reflect.Value{} + } + for _, num := range index { + for { + if v.Kind() == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + v = v.Elem() + continue + } + break + } + v = v.Field(num) + } + return v +} + +const ( + // 400,000 decode operations is ~500kb of dense object declarations, or + // ~5kb of dense object declarations with 10000% alias expansion + alias_ratio_range_low = 400000 + + // 4,000,000 decode operations is ~5MB of dense object declarations, or + // ~4.5MB of dense object declarations with 10% alias expansion + alias_ratio_range_high = 4000000 + + // alias_ratio_range is the range over which we scale allowed alias ratios + alias_ratio_range = float64(alias_ratio_range_high - alias_ratio_range_low) +) + +func allowedAliasRatio(decodeCount int) float64 { + switch { + case decodeCount <= alias_ratio_range_low: + // allow 99% to come from alias expansion for small-to-medium documents + return 0.99 + case decodeCount >= alias_ratio_range_high: + // allow 10% to come from alias expansion for very large documents + return 0.10 + default: + // scale smoothly from 99% down to 10% over the range. + // this maps to 396,000 - 400,000 allowed alias-driven decodes over the range. + // 400,000 decode operations is ~100MB of allocations in worst-case scenarios (single-item maps). + return 0.99 - 0.89*(float64(decodeCount-alias_ratio_range_low)/alias_ratio_range) + } +} + +func (d *decoder) unmarshal(n *Node, out reflect.Value) (good bool) { + d.decodeCount++ + if d.aliasDepth > 0 { + d.aliasCount++ + } + if d.aliasCount > 100 && d.decodeCount > 1000 && float64(d.aliasCount)/float64(d.decodeCount) > allowedAliasRatio(d.decodeCount) { + failf("document contains excessive aliasing") + } + if out.Type() == nodeType { + out.Set(reflect.ValueOf(n).Elem()) + return true + } + switch n.Kind { + case DocumentNode: + return d.document(n, out) + case AliasNode: + return d.alias(n, out) + } + out, unmarshaled, good := d.prepare(n, out) + if unmarshaled { + return good + } + switch n.Kind { + case ScalarNode: + good = d.scalar(n, out) + case MappingNode: + good = d.mapping(n, out) + case SequenceNode: + good = d.sequence(n, out) + case 0: + if n.IsZero() { + return d.null(out) + } + fallthrough + default: + failf("cannot decode node with unknown kind %d", n.Kind) + } + return good +} + +func (d *decoder) document(n *Node, out reflect.Value) (good bool) { + if len(n.Content) == 1 { + d.doc = n + d.unmarshal(n.Content[0], out) + return true + } + return false +} + +func (d *decoder) alias(n *Node, out reflect.Value) (good bool) { + if d.aliases[n] { + // TODO this could actually be allowed in some circumstances. + failf("anchor '%s' value contains itself", n.Value) + } + d.aliases[n] = true + d.aliasDepth++ + good = d.unmarshal(n.Alias, out) + d.aliasDepth-- + delete(d.aliases, n) + return good +} + +var zeroValue reflect.Value + +func resetMap(out reflect.Value) { + for _, k := range out.MapKeys() { + out.SetMapIndex(k, zeroValue) + } +} + +func (d *decoder) null(out reflect.Value) bool { + if out.CanAddr() { + switch out.Kind() { + case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice: + out.Set(reflect.Zero(out.Type())) + return true + } + } + return false +} + +func (d *decoder) scalar(n *Node, out reflect.Value) bool { + var tag string + var resolved interface{} + if n.indicatedString() { + tag = strTag + resolved = n.Value + } else { + tag, resolved = resolve(n.Tag, n.Value) + if tag == binaryTag { + data, err := base64.StdEncoding.DecodeString(resolved.(string)) + if err != nil { + failf("!!binary value contains invalid base64 data") + } + resolved = string(data) + } + } + if resolved == nil { + return d.null(out) + } + if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { + // We've resolved to exactly the type we want, so use that. + out.Set(resolvedv) + return true + } + // Perhaps we can use the value as a TextUnmarshaler to + // set its value. + if out.CanAddr() { + u, ok := out.Addr().Interface().(encoding.TextUnmarshaler) + if ok { + var text []byte + if tag == binaryTag { + text = []byte(resolved.(string)) + } else { + // We let any value be unmarshaled into TextUnmarshaler. + // That might be more lax than we'd like, but the + // TextUnmarshaler itself should bowl out any dubious values. + text = []byte(n.Value) + } + err := u.UnmarshalText(text) + if err != nil { + fail(err) + } + return true + } + } + switch out.Kind() { + case reflect.String: + if tag == binaryTag { + out.SetString(resolved.(string)) + return true + } + out.SetString(n.Value) + return true + case reflect.Interface: + out.Set(reflect.ValueOf(resolved)) + return true + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + // This used to work in v2, but it's very unfriendly. + isDuration := out.Type() == durationType + + switch resolved := resolved.(type) { + case int: + if !isDuration && !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + return true + } + case int64: + if !isDuration && !out.OverflowInt(resolved) { + out.SetInt(resolved) + return true + } + case uint64: + if !isDuration && resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + return true + } + case float64: + if !isDuration && resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + return true + } + case string: + if out.Type() == durationType { + d, err := time.ParseDuration(resolved) + if err == nil { + out.SetInt(int64(d)) + return true + } + } + } + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + switch resolved := resolved.(type) { + case int: + if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + case int64: + if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + case uint64: + if !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + case float64: + if resolved <= math.MaxUint64 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + } + case reflect.Bool: + switch resolved := resolved.(type) { + case bool: + out.SetBool(resolved) + return true + case string: + // This offers some compatibility with the 1.1 spec (https://yaml.org/type/bool.html). + // It only works if explicitly attempting to unmarshal into a typed bool value. + switch resolved { + case "y", "Y", "yes", "Yes", "YES", "on", "On", "ON": + out.SetBool(true) + return true + case "n", "N", "no", "No", "NO", "off", "Off", "OFF": + out.SetBool(false) + return true + } + } + case reflect.Float32, reflect.Float64: + switch resolved := resolved.(type) { + case int: + out.SetFloat(float64(resolved)) + return true + case int64: + out.SetFloat(float64(resolved)) + return true + case uint64: + out.SetFloat(float64(resolved)) + return true + case float64: + out.SetFloat(resolved) + return true + } + case reflect.Struct: + if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { + out.Set(resolvedv) + return true + } + case reflect.Ptr: + panic("yaml internal error: please report the issue") + } + d.terror(n, tag, out) + return false +} + +func settableValueOf(i interface{}) reflect.Value { + v := reflect.ValueOf(i) + sv := reflect.New(v.Type()).Elem() + sv.Set(v) + return sv +} + +func (d *decoder) sequence(n *Node, out reflect.Value) (good bool) { + l := len(n.Content) + + var iface reflect.Value + switch out.Kind() { + case reflect.Slice: + out.Set(reflect.MakeSlice(out.Type(), l, l)) + case reflect.Array: + if l != out.Len() { + failf("invalid array: want %d elements but got %d", out.Len(), l) + } + case reflect.Interface: + // No type hints. Will have to use a generic sequence. + iface = out + out = settableValueOf(make([]interface{}, l)) + default: + d.terror(n, seqTag, out) + return false + } + et := out.Type().Elem() + + j := 0 + for i := 0; i < l; i++ { + e := reflect.New(et).Elem() + if ok := d.unmarshal(n.Content[i], e); ok { + out.Index(j).Set(e) + j++ + } + } + if out.Kind() != reflect.Array { + out.Set(out.Slice(0, j)) + } + if iface.IsValid() { + iface.Set(out) + } + return true +} + +func (d *decoder) mapping(n *Node, out reflect.Value) (good bool) { + l := len(n.Content) + if d.uniqueKeys { + nerrs := len(d.terrors) + for i := 0; i < l; i += 2 { + ni := n.Content[i] + for j := i + 2; j < l; j += 2 { + nj := n.Content[j] + if ni.Kind == nj.Kind && ni.Value == nj.Value { + d.terrors = append(d.terrors, fmt.Sprintf("line %d: mapping key %#v already defined at line %d", nj.Line, nj.Value, ni.Line)) + } + } + } + if len(d.terrors) > nerrs { + return false + } + } + switch out.Kind() { + case reflect.Struct: + return d.mappingStruct(n, out) + case reflect.Map: + // okay + case reflect.Interface: + iface := out + if isStringMap(n) { + out = reflect.MakeMap(d.stringMapType) + } else { + out = reflect.MakeMap(d.generalMapType) + } + iface.Set(out) + default: + d.terror(n, mapTag, out) + return false + } + + outt := out.Type() + kt := outt.Key() + et := outt.Elem() + + stringMapType := d.stringMapType + generalMapType := d.generalMapType + if outt.Elem() == ifaceType { + if outt.Key().Kind() == reflect.String { + d.stringMapType = outt + } else if outt.Key() == ifaceType { + d.generalMapType = outt + } + } + + if out.IsNil() { + out.Set(reflect.MakeMap(outt)) + } + for i := 0; i < l; i += 2 { + if isMerge(n.Content[i]) { + d.merge(n.Content[i+1], out) + continue + } + k := reflect.New(kt).Elem() + if d.unmarshal(n.Content[i], k) { + kkind := k.Kind() + if kkind == reflect.Interface { + kkind = k.Elem().Kind() + } + if kkind == reflect.Map || kkind == reflect.Slice { + failf("invalid map key: %#v", k.Interface()) + } + e := reflect.New(et).Elem() + if d.unmarshal(n.Content[i+1], e) { + out.SetMapIndex(k, e) + } + } + } + d.stringMapType = stringMapType + d.generalMapType = generalMapType + return true +} + +func isStringMap(n *Node) bool { + if n.Kind != MappingNode { + return false + } + l := len(n.Content) + for i := 0; i < l; i += 2 { + if n.Content[i].ShortTag() != strTag { + return false + } + } + return true +} + +func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { + sinfo, err := getStructInfo(out.Type()) + if err != nil { + panic(err) + } + + var inlineMap reflect.Value + var elemType reflect.Type + if sinfo.InlineMap != -1 { + inlineMap = out.Field(sinfo.InlineMap) + inlineMap.Set(reflect.New(inlineMap.Type()).Elem()) + elemType = inlineMap.Type().Elem() + } + + for _, index := range sinfo.InlineUnmarshalers { + field := d.fieldByIndex(n, out, index) + d.prepare(n, field) + } + + var doneFields []bool + if d.uniqueKeys { + doneFields = make([]bool, len(sinfo.FieldsList)) + } + name := settableValueOf("") + l := len(n.Content) + for i := 0; i < l; i += 2 { + ni := n.Content[i] + if isMerge(ni) { + d.merge(n.Content[i+1], out) + continue + } + if !d.unmarshal(ni, name) { + continue + } + if info, ok := sinfo.FieldsMap[name.String()]; ok { + if d.uniqueKeys { + if doneFields[info.Id] { + d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s already set in type %s", ni.Line, name.String(), out.Type())) + continue + } + doneFields[info.Id] = true + } + var field reflect.Value + if info.Inline == nil { + field = out.Field(info.Num) + } else { + field = d.fieldByIndex(n, out, info.Inline) + } + d.unmarshal(n.Content[i+1], field) + } else if sinfo.InlineMap != -1 { + if inlineMap.IsNil() { + inlineMap.Set(reflect.MakeMap(inlineMap.Type())) + } + value := reflect.New(elemType).Elem() + d.unmarshal(n.Content[i+1], value) + inlineMap.SetMapIndex(name, value) + } else if d.knownFields { + d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in type %s", ni.Line, name.String(), out.Type())) + } + } + return true +} + +func failWantMap() { + failf("map merge requires map or sequence of maps as the value") +} + +func (d *decoder) merge(n *Node, out reflect.Value) { + switch n.Kind { + case MappingNode: + d.unmarshal(n, out) + case AliasNode: + if n.Alias != nil && n.Alias.Kind != MappingNode { + failWantMap() + } + d.unmarshal(n, out) + case SequenceNode: + // Step backwards as earlier nodes take precedence. + for i := len(n.Content) - 1; i >= 0; i-- { + ni := n.Content[i] + if ni.Kind == AliasNode { + if ni.Alias != nil && ni.Alias.Kind != MappingNode { + failWantMap() + } + } else if ni.Kind != MappingNode { + failWantMap() + } + d.unmarshal(ni, out) + } + default: + failWantMap() + } +} + +func isMerge(n *Node) bool { + return n.Kind == ScalarNode && n.Value == "<<" && (n.Tag == "" || n.Tag == "!" || shortTag(n.Tag) == mergeTag) +} diff --git a/vendor/gopkg.in/yaml.v3/emitterc.go b/vendor/gopkg.in/yaml.v3/emitterc.go new file mode 100644 index 00000000000..c29217ef54b --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/emitterc.go @@ -0,0 +1,2022 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "bytes" + "fmt" +) + +// Flush the buffer if needed. +func flush(emitter *yaml_emitter_t) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) { + return yaml_emitter_flush(emitter) + } + return true +} + +// Put a character to the output buffer. +func put(emitter *yaml_emitter_t, value byte) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + emitter.buffer[emitter.buffer_pos] = value + emitter.buffer_pos++ + emitter.column++ + return true +} + +// Put a line break to the output buffer. +func put_break(emitter *yaml_emitter_t) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + switch emitter.line_break { + case yaml_CR_BREAK: + emitter.buffer[emitter.buffer_pos] = '\r' + emitter.buffer_pos += 1 + case yaml_LN_BREAK: + emitter.buffer[emitter.buffer_pos] = '\n' + emitter.buffer_pos += 1 + case yaml_CRLN_BREAK: + emitter.buffer[emitter.buffer_pos+0] = '\r' + emitter.buffer[emitter.buffer_pos+1] = '\n' + emitter.buffer_pos += 2 + default: + panic("unknown line break setting") + } + if emitter.column == 0 { + emitter.space_above = true + } + emitter.column = 0 + emitter.line++ + // [Go] Do this here and below and drop from everywhere else (see commented lines). + emitter.indention = true + return true +} + +// Copy a character from a string into buffer. +func write(emitter *yaml_emitter_t, s []byte, i *int) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + p := emitter.buffer_pos + w := width(s[*i]) + switch w { + case 4: + emitter.buffer[p+3] = s[*i+3] + fallthrough + case 3: + emitter.buffer[p+2] = s[*i+2] + fallthrough + case 2: + emitter.buffer[p+1] = s[*i+1] + fallthrough + case 1: + emitter.buffer[p+0] = s[*i+0] + default: + panic("unknown character width") + } + emitter.column++ + emitter.buffer_pos += w + *i += w + return true +} + +// Write a whole string into buffer. +func write_all(emitter *yaml_emitter_t, s []byte) bool { + for i := 0; i < len(s); { + if !write(emitter, s, &i) { + return false + } + } + return true +} + +// Copy a line break character from a string into buffer. +func write_break(emitter *yaml_emitter_t, s []byte, i *int) bool { + if s[*i] == '\n' { + if !put_break(emitter) { + return false + } + *i++ + } else { + if !write(emitter, s, i) { + return false + } + if emitter.column == 0 { + emitter.space_above = true + } + emitter.column = 0 + emitter.line++ + // [Go] Do this here and above and drop from everywhere else (see commented lines). + emitter.indention = true + } + return true +} + +// Set an emitter error and return false. +func yaml_emitter_set_emitter_error(emitter *yaml_emitter_t, problem string) bool { + emitter.error = yaml_EMITTER_ERROR + emitter.problem = problem + return false +} + +// Emit an event. +func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { + emitter.events = append(emitter.events, *event) + for !yaml_emitter_need_more_events(emitter) { + event := &emitter.events[emitter.events_head] + if !yaml_emitter_analyze_event(emitter, event) { + return false + } + if !yaml_emitter_state_machine(emitter, event) { + return false + } + yaml_event_delete(event) + emitter.events_head++ + } + return true +} + +// Check if we need to accumulate more events before emitting. +// +// We accumulate extra +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START +// +func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { + if emitter.events_head == len(emitter.events) { + return true + } + var accumulate int + switch emitter.events[emitter.events_head].typ { + case yaml_DOCUMENT_START_EVENT: + accumulate = 1 + break + case yaml_SEQUENCE_START_EVENT: + accumulate = 2 + break + case yaml_MAPPING_START_EVENT: + accumulate = 3 + break + default: + return false + } + if len(emitter.events)-emitter.events_head > accumulate { + return false + } + var level int + for i := emitter.events_head; i < len(emitter.events); i++ { + switch emitter.events[i].typ { + case yaml_STREAM_START_EVENT, yaml_DOCUMENT_START_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT: + level++ + case yaml_STREAM_END_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_END_EVENT, yaml_MAPPING_END_EVENT: + level-- + } + if level == 0 { + return false + } + } + return true +} + +// Append a directive to the directives stack. +func yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *yaml_tag_directive_t, allow_duplicates bool) bool { + for i := 0; i < len(emitter.tag_directives); i++ { + if bytes.Equal(value.handle, emitter.tag_directives[i].handle) { + if allow_duplicates { + return true + } + return yaml_emitter_set_emitter_error(emitter, "duplicate %TAG directive") + } + } + + // [Go] Do we actually need to copy this given garbage collection + // and the lack of deallocating destructors? + tag_copy := yaml_tag_directive_t{ + handle: make([]byte, len(value.handle)), + prefix: make([]byte, len(value.prefix)), + } + copy(tag_copy.handle, value.handle) + copy(tag_copy.prefix, value.prefix) + emitter.tag_directives = append(emitter.tag_directives, tag_copy) + return true +} + +// Increase the indentation level. +func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool { + emitter.indents = append(emitter.indents, emitter.indent) + if emitter.indent < 0 { + if flow { + emitter.indent = emitter.best_indent + } else { + emitter.indent = 0 + } + } else if !indentless { + // [Go] This was changed so that indentations are more regular. + if emitter.states[len(emitter.states)-1] == yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE { + // The first indent inside a sequence will just skip the "- " indicator. + emitter.indent += 2 + } else { + // Everything else aligns to the chosen indentation. + emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) + } + } + return true +} + +// State dispatcher. +func yaml_emitter_state_machine(emitter *yaml_emitter_t, event *yaml_event_t) bool { + switch emitter.state { + default: + case yaml_EMIT_STREAM_START_STATE: + return yaml_emitter_emit_stream_start(emitter, event) + + case yaml_EMIT_FIRST_DOCUMENT_START_STATE: + return yaml_emitter_emit_document_start(emitter, event, true) + + case yaml_EMIT_DOCUMENT_START_STATE: + return yaml_emitter_emit_document_start(emitter, event, false) + + case yaml_EMIT_DOCUMENT_CONTENT_STATE: + return yaml_emitter_emit_document_content(emitter, event) + + case yaml_EMIT_DOCUMENT_END_STATE: + return yaml_emitter_emit_document_end(emitter, event) + + case yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE: + return yaml_emitter_emit_flow_sequence_item(emitter, event, true, false) + + case yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE: + return yaml_emitter_emit_flow_sequence_item(emitter, event, false, true) + + case yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE: + return yaml_emitter_emit_flow_sequence_item(emitter, event, false, false) + + case yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE: + return yaml_emitter_emit_flow_mapping_key(emitter, event, true, false) + + case yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE: + return yaml_emitter_emit_flow_mapping_key(emitter, event, false, true) + + case yaml_EMIT_FLOW_MAPPING_KEY_STATE: + return yaml_emitter_emit_flow_mapping_key(emitter, event, false, false) + + case yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE: + return yaml_emitter_emit_flow_mapping_value(emitter, event, true) + + case yaml_EMIT_FLOW_MAPPING_VALUE_STATE: + return yaml_emitter_emit_flow_mapping_value(emitter, event, false) + + case yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE: + return yaml_emitter_emit_block_sequence_item(emitter, event, true) + + case yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE: + return yaml_emitter_emit_block_sequence_item(emitter, event, false) + + case yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE: + return yaml_emitter_emit_block_mapping_key(emitter, event, true) + + case yaml_EMIT_BLOCK_MAPPING_KEY_STATE: + return yaml_emitter_emit_block_mapping_key(emitter, event, false) + + case yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE: + return yaml_emitter_emit_block_mapping_value(emitter, event, true) + + case yaml_EMIT_BLOCK_MAPPING_VALUE_STATE: + return yaml_emitter_emit_block_mapping_value(emitter, event, false) + + case yaml_EMIT_END_STATE: + return yaml_emitter_set_emitter_error(emitter, "expected nothing after STREAM-END") + } + panic("invalid emitter state") +} + +// Expect STREAM-START. +func yaml_emitter_emit_stream_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if event.typ != yaml_STREAM_START_EVENT { + return yaml_emitter_set_emitter_error(emitter, "expected STREAM-START") + } + if emitter.encoding == yaml_ANY_ENCODING { + emitter.encoding = event.encoding + if emitter.encoding == yaml_ANY_ENCODING { + emitter.encoding = yaml_UTF8_ENCODING + } + } + if emitter.best_indent < 2 || emitter.best_indent > 9 { + emitter.best_indent = 2 + } + if emitter.best_width >= 0 && emitter.best_width <= emitter.best_indent*2 { + emitter.best_width = 80 + } + if emitter.best_width < 0 { + emitter.best_width = 1<<31 - 1 + } + if emitter.line_break == yaml_ANY_BREAK { + emitter.line_break = yaml_LN_BREAK + } + + emitter.indent = -1 + emitter.line = 0 + emitter.column = 0 + emitter.whitespace = true + emitter.indention = true + emitter.space_above = true + emitter.foot_indent = -1 + + if emitter.encoding != yaml_UTF8_ENCODING { + if !yaml_emitter_write_bom(emitter) { + return false + } + } + emitter.state = yaml_EMIT_FIRST_DOCUMENT_START_STATE + return true +} + +// Expect DOCUMENT-START or STREAM-END. +func yaml_emitter_emit_document_start(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + + if event.typ == yaml_DOCUMENT_START_EVENT { + + if event.version_directive != nil { + if !yaml_emitter_analyze_version_directive(emitter, event.version_directive) { + return false + } + } + + for i := 0; i < len(event.tag_directives); i++ { + tag_directive := &event.tag_directives[i] + if !yaml_emitter_analyze_tag_directive(emitter, tag_directive) { + return false + } + if !yaml_emitter_append_tag_directive(emitter, tag_directive, false) { + return false + } + } + + for i := 0; i < len(default_tag_directives); i++ { + tag_directive := &default_tag_directives[i] + if !yaml_emitter_append_tag_directive(emitter, tag_directive, true) { + return false + } + } + + implicit := event.implicit + if !first || emitter.canonical { + implicit = false + } + + if emitter.open_ended && (event.version_directive != nil || len(event.tag_directives) > 0) { + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if event.version_directive != nil { + implicit = false + if !yaml_emitter_write_indicator(emitter, []byte("%YAML"), true, false, false) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte("1.1"), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if len(event.tag_directives) > 0 { + implicit = false + for i := 0; i < len(event.tag_directives); i++ { + tag_directive := &event.tag_directives[i] + if !yaml_emitter_write_indicator(emitter, []byte("%TAG"), true, false, false) { + return false + } + if !yaml_emitter_write_tag_handle(emitter, tag_directive.handle) { + return false + } + if !yaml_emitter_write_tag_content(emitter, tag_directive.prefix, true) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + } + + if yaml_emitter_check_empty_document(emitter) { + implicit = false + } + if !implicit { + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte("---"), true, false, false) { + return false + } + if emitter.canonical || true { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + } + + if len(emitter.head_comment) > 0 { + if !yaml_emitter_process_head_comment(emitter) { + return false + } + if !put_break(emitter) { + return false + } + } + + emitter.state = yaml_EMIT_DOCUMENT_CONTENT_STATE + return true + } + + if event.typ == yaml_STREAM_END_EVENT { + if emitter.open_ended { + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_flush(emitter) { + return false + } + emitter.state = yaml_EMIT_END_STATE + return true + } + + return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-START or STREAM-END") +} + +// Expect the root node. +func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_event_t) bool { + emitter.states = append(emitter.states, yaml_EMIT_DOCUMENT_END_STATE) + + if !yaml_emitter_process_head_comment(emitter) { + return false + } + if !yaml_emitter_emit_node(emitter, event, true, false, false, false) { + return false + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + return true +} + +// Expect DOCUMENT-END. +func yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if event.typ != yaml_DOCUMENT_END_EVENT { + return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-END") + } + // [Go] Force document foot separation. + emitter.foot_indent = 0 + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + emitter.foot_indent = -1 + if !yaml_emitter_write_indent(emitter) { + return false + } + if !event.implicit { + // [Go] Allocate the slice elsewhere. + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_flush(emitter) { + return false + } + emitter.state = yaml_EMIT_DOCUMENT_START_STATE + emitter.tag_directives = emitter.tag_directives[:0] + return true +} + +// Expect a flow item node. +func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first, trail bool) bool { + if first { + if !yaml_emitter_write_indicator(emitter, []byte{'['}, true, true, false) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + emitter.flow_level++ + } + + if event.typ == yaml_SEQUENCE_END_EVENT { + if emitter.canonical && !first && !trail { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + emitter.flow_level-- + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + if emitter.column == 0 || emitter.canonical && !first { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) { + return false + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + + return true + } + + if !first && !trail { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + + if !yaml_emitter_process_head_comment(emitter) { + return false + } + if emitter.column == 0 { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE) + } else { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE) + } + if !yaml_emitter_emit_node(emitter, event, false, true, false, false) { + return false + } + if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + return true +} + +// Expect a flow key node. +func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first, trail bool) bool { + if first { + if !yaml_emitter_write_indicator(emitter, []byte{'{'}, true, true, false) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + emitter.flow_level++ + } + + if event.typ == yaml_MAPPING_END_EVENT { + if (emitter.canonical || len(emitter.head_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0) && !first && !trail { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + if !yaml_emitter_process_head_comment(emitter) { + return false + } + emitter.flow_level-- + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + if emitter.canonical && !first { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) { + return false + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + + if !first && !trail { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + + if !yaml_emitter_process_head_comment(emitter) { + return false + } + + if emitter.column == 0 { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if !emitter.canonical && yaml_emitter_check_simple_key(emitter) { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, true) + } + if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, false) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a flow value node. +func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { + if simple { + if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { + return false + } + } else { + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, false) { + return false + } + } + if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE) + } else { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_KEY_STATE) + } + if !yaml_emitter_emit_node(emitter, event, false, false, true, false) { + return false + } + if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + return true +} + +// Expect a block item node. +func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + if !yaml_emitter_increase_indent(emitter, false, false) { + return false + } + } + if event.typ == yaml_SEQUENCE_END_EVENT { + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + if !yaml_emitter_process_head_comment(emitter) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{'-'}, true, false, true) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE) + if !yaml_emitter_emit_node(emitter, event, false, true, false, false) { + return false + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + return true +} + +// Expect a block key node. +func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + if !yaml_emitter_increase_indent(emitter, false, false) { + return false + } + } + if !yaml_emitter_process_head_comment(emitter) { + return false + } + if event.typ == yaml_MAPPING_END_EVENT { + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if len(emitter.line_comment) > 0 { + // [Go] A line comment was provided for the key. That's unusual as the + // scanner associates line comments with the value. Either way, + // save the line comment and render it appropriately later. + emitter.key_line_comment = emitter.line_comment + emitter.line_comment = nil + } + if yaml_emitter_check_simple_key(emitter) { + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, true) + } + if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, true) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a block value node. +func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { + if simple { + if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { + return false + } + } else { + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, true) { + return false + } + } + if len(emitter.key_line_comment) > 0 { + // [Go] A line comment was previously provided for the key. Handle it before + // the value so the inline comments are placed correctly. + if yaml_emitter_silent_nil_event(emitter, event) && len(emitter.line_comment) == 0 { + // Nothing other than the line comment will be written on the line. + emitter.line_comment = emitter.key_line_comment + emitter.key_line_comment = nil + } else { + // An actual value is coming, so emit the comment line. + emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment + if !yaml_emitter_process_line_comment(emitter) { + return false + } + emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment + // Indent in unless it's a block that will reindent anyway. + if event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE || (event.typ != yaml_MAPPING_START_EVENT && event.typ != yaml_SEQUENCE_START_EVENT) { + emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) + if !yaml_emitter_write_indent(emitter) { + return false + } + } + } + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) + if !yaml_emitter_emit_node(emitter, event, false, false, true, false) { + return false + } + if !yaml_emitter_process_line_comment(emitter) { + return false + } + if !yaml_emitter_process_foot_comment(emitter) { + return false + } + return true +} + +func yaml_emitter_silent_nil_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { + return event.typ == yaml_SCALAR_EVENT && event.implicit && !emitter.canonical && len(emitter.scalar_data.value) == 0 +} + +// Expect a node. +func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, + root bool, sequence bool, mapping bool, simple_key bool) bool { + + emitter.root_context = root + emitter.sequence_context = sequence + emitter.mapping_context = mapping + emitter.simple_key_context = simple_key + + switch event.typ { + case yaml_ALIAS_EVENT: + return yaml_emitter_emit_alias(emitter, event) + case yaml_SCALAR_EVENT: + return yaml_emitter_emit_scalar(emitter, event) + case yaml_SEQUENCE_START_EVENT: + return yaml_emitter_emit_sequence_start(emitter, event) + case yaml_MAPPING_START_EVENT: + return yaml_emitter_emit_mapping_start(emitter, event) + default: + return yaml_emitter_set_emitter_error(emitter, + fmt.Sprintf("expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS, but got %v", event.typ)) + } +} + +// Expect ALIAS. +func yaml_emitter_emit_alias(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true +} + +// Expect SCALAR. +func yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_select_scalar_style(emitter, event) { + return false + } + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + if !yaml_emitter_process_scalar(emitter) { + return false + } + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true +} + +// Expect SEQUENCE-START. +func yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if emitter.flow_level > 0 || emitter.canonical || event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE || + yaml_emitter_check_empty_sequence(emitter) { + emitter.state = yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE + } else { + emitter.state = yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE + } + return true +} + +// Expect MAPPING-START. +func yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if emitter.flow_level > 0 || emitter.canonical || event.mapping_style() == yaml_FLOW_MAPPING_STYLE || + yaml_emitter_check_empty_mapping(emitter) { + emitter.state = yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE + } else { + emitter.state = yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE + } + return true +} + +// Check if the document content is an empty scalar. +func yaml_emitter_check_empty_document(emitter *yaml_emitter_t) bool { + return false // [Go] Huh? +} + +// Check if the next events represent an empty sequence. +func yaml_emitter_check_empty_sequence(emitter *yaml_emitter_t) bool { + if len(emitter.events)-emitter.events_head < 2 { + return false + } + return emitter.events[emitter.events_head].typ == yaml_SEQUENCE_START_EVENT && + emitter.events[emitter.events_head+1].typ == yaml_SEQUENCE_END_EVENT +} + +// Check if the next events represent an empty mapping. +func yaml_emitter_check_empty_mapping(emitter *yaml_emitter_t) bool { + if len(emitter.events)-emitter.events_head < 2 { + return false + } + return emitter.events[emitter.events_head].typ == yaml_MAPPING_START_EVENT && + emitter.events[emitter.events_head+1].typ == yaml_MAPPING_END_EVENT +} + +// Check if the next node can be expressed as a simple key. +func yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool { + length := 0 + switch emitter.events[emitter.events_head].typ { + case yaml_ALIAS_EVENT: + length += len(emitter.anchor_data.anchor) + case yaml_SCALAR_EVENT: + if emitter.scalar_data.multiline { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + + len(emitter.scalar_data.value) + case yaml_SEQUENCE_START_EVENT: + if !yaml_emitter_check_empty_sequence(emitter) { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + case yaml_MAPPING_START_EVENT: + if !yaml_emitter_check_empty_mapping(emitter) { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + default: + return false + } + return length <= 128 +} + +// Determine an acceptable scalar style. +func yaml_emitter_select_scalar_style(emitter *yaml_emitter_t, event *yaml_event_t) bool { + + no_tag := len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 + if no_tag && !event.implicit && !event.quoted_implicit { + return yaml_emitter_set_emitter_error(emitter, "neither tag nor implicit flags are specified") + } + + style := event.scalar_style() + if style == yaml_ANY_SCALAR_STYLE { + style = yaml_PLAIN_SCALAR_STYLE + } + if emitter.canonical { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + if emitter.simple_key_context && emitter.scalar_data.multiline { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + + if style == yaml_PLAIN_SCALAR_STYLE { + if emitter.flow_level > 0 && !emitter.scalar_data.flow_plain_allowed || + emitter.flow_level == 0 && !emitter.scalar_data.block_plain_allowed { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + if len(emitter.scalar_data.value) == 0 && (emitter.flow_level > 0 || emitter.simple_key_context) { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + if no_tag && !event.implicit { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + } + if style == yaml_SINGLE_QUOTED_SCALAR_STYLE { + if !emitter.scalar_data.single_quoted_allowed { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + } + if style == yaml_LITERAL_SCALAR_STYLE || style == yaml_FOLDED_SCALAR_STYLE { + if !emitter.scalar_data.block_allowed || emitter.flow_level > 0 || emitter.simple_key_context { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + } + + if no_tag && !event.quoted_implicit && style != yaml_PLAIN_SCALAR_STYLE { + emitter.tag_data.handle = []byte{'!'} + } + emitter.scalar_data.style = style + return true +} + +// Write an anchor. +func yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool { + if emitter.anchor_data.anchor == nil { + return true + } + c := []byte{'&'} + if emitter.anchor_data.alias { + c[0] = '*' + } + if !yaml_emitter_write_indicator(emitter, c, true, false, false) { + return false + } + return yaml_emitter_write_anchor(emitter, emitter.anchor_data.anchor) +} + +// Write a tag. +func yaml_emitter_process_tag(emitter *yaml_emitter_t) bool { + if len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 { + return true + } + if len(emitter.tag_data.handle) > 0 { + if !yaml_emitter_write_tag_handle(emitter, emitter.tag_data.handle) { + return false + } + if len(emitter.tag_data.suffix) > 0 { + if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { + return false + } + } + } else { + // [Go] Allocate these slices elsewhere. + if !yaml_emitter_write_indicator(emitter, []byte("!<"), true, false, false) { + return false + } + if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{'>'}, false, false, false) { + return false + } + } + return true +} + +// Write a scalar. +func yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool { + switch emitter.scalar_data.style { + case yaml_PLAIN_SCALAR_STYLE: + return yaml_emitter_write_plain_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_SINGLE_QUOTED_SCALAR_STYLE: + return yaml_emitter_write_single_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_DOUBLE_QUOTED_SCALAR_STYLE: + return yaml_emitter_write_double_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_LITERAL_SCALAR_STYLE: + return yaml_emitter_write_literal_scalar(emitter, emitter.scalar_data.value) + + case yaml_FOLDED_SCALAR_STYLE: + return yaml_emitter_write_folded_scalar(emitter, emitter.scalar_data.value) + } + panic("unknown scalar style") +} + +// Write a head comment. +func yaml_emitter_process_head_comment(emitter *yaml_emitter_t) bool { + if len(emitter.tail_comment) > 0 { + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_comment(emitter, emitter.tail_comment) { + return false + } + emitter.tail_comment = emitter.tail_comment[:0] + emitter.foot_indent = emitter.indent + if emitter.foot_indent < 0 { + emitter.foot_indent = 0 + } + } + + if len(emitter.head_comment) == 0 { + return true + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_comment(emitter, emitter.head_comment) { + return false + } + emitter.head_comment = emitter.head_comment[:0] + return true +} + +// Write an line comment. +func yaml_emitter_process_line_comment(emitter *yaml_emitter_t) bool { + if len(emitter.line_comment) == 0 { + return true + } + if !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + if !yaml_emitter_write_comment(emitter, emitter.line_comment) { + return false + } + emitter.line_comment = emitter.line_comment[:0] + return true +} + +// Write a foot comment. +func yaml_emitter_process_foot_comment(emitter *yaml_emitter_t) bool { + if len(emitter.foot_comment) == 0 { + return true + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_comment(emitter, emitter.foot_comment) { + return false + } + emitter.foot_comment = emitter.foot_comment[:0] + emitter.foot_indent = emitter.indent + if emitter.foot_indent < 0 { + emitter.foot_indent = 0 + } + return true +} + +// Check if a %YAML directive is valid. +func yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t) bool { + if version_directive.major != 1 || version_directive.minor != 1 { + return yaml_emitter_set_emitter_error(emitter, "incompatible %YAML directive") + } + return true +} + +// Check if a %TAG directive is valid. +func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool { + handle := tag_directive.handle + prefix := tag_directive.prefix + if len(handle) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag handle must not be empty") + } + if handle[0] != '!' { + return yaml_emitter_set_emitter_error(emitter, "tag handle must start with '!'") + } + if handle[len(handle)-1] != '!' { + return yaml_emitter_set_emitter_error(emitter, "tag handle must end with '!'") + } + for i := 1; i < len(handle)-1; i += width(handle[i]) { + if !is_alpha(handle, i) { + return yaml_emitter_set_emitter_error(emitter, "tag handle must contain alphanumerical characters only") + } + } + if len(prefix) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag prefix must not be empty") + } + return true +} + +// Check if an anchor is valid. +func yaml_emitter_analyze_anchor(emitter *yaml_emitter_t, anchor []byte, alias bool) bool { + if len(anchor) == 0 { + problem := "anchor value must not be empty" + if alias { + problem = "alias value must not be empty" + } + return yaml_emitter_set_emitter_error(emitter, problem) + } + for i := 0; i < len(anchor); i += width(anchor[i]) { + if !is_alpha(anchor, i) { + problem := "anchor value must contain alphanumerical characters only" + if alias { + problem = "alias value must contain alphanumerical characters only" + } + return yaml_emitter_set_emitter_error(emitter, problem) + } + } + emitter.anchor_data.anchor = anchor + emitter.anchor_data.alias = alias + return true +} + +// Check if a tag is valid. +func yaml_emitter_analyze_tag(emitter *yaml_emitter_t, tag []byte) bool { + if len(tag) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag value must not be empty") + } + for i := 0; i < len(emitter.tag_directives); i++ { + tag_directive := &emitter.tag_directives[i] + if bytes.HasPrefix(tag, tag_directive.prefix) { + emitter.tag_data.handle = tag_directive.handle + emitter.tag_data.suffix = tag[len(tag_directive.prefix):] + return true + } + } + emitter.tag_data.suffix = tag + return true +} + +// Check if a scalar is valid. +func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { + var ( + block_indicators = false + flow_indicators = false + line_breaks = false + special_characters = false + tab_characters = false + + leading_space = false + leading_break = false + trailing_space = false + trailing_break = false + break_space = false + space_break = false + + preceded_by_whitespace = false + followed_by_whitespace = false + previous_space = false + previous_break = false + ) + + emitter.scalar_data.value = value + + if len(value) == 0 { + emitter.scalar_data.multiline = false + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = true + emitter.scalar_data.single_quoted_allowed = true + emitter.scalar_data.block_allowed = false + return true + } + + if len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) { + block_indicators = true + flow_indicators = true + } + + preceded_by_whitespace = true + for i, w := 0, 0; i < len(value); i += w { + w = width(value[i]) + followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w) + + if i == 0 { + switch value[i] { + case '#', ',', '[', ']', '{', '}', '&', '*', '!', '|', '>', '\'', '"', '%', '@', '`': + flow_indicators = true + block_indicators = true + case '?', ':': + flow_indicators = true + if followed_by_whitespace { + block_indicators = true + } + case '-': + if followed_by_whitespace { + flow_indicators = true + block_indicators = true + } + } + } else { + switch value[i] { + case ',', '?', '[', ']', '{', '}': + flow_indicators = true + case ':': + flow_indicators = true + if followed_by_whitespace { + block_indicators = true + } + case '#': + if preceded_by_whitespace { + flow_indicators = true + block_indicators = true + } + } + } + + if value[i] == '\t' { + tab_characters = true + } else if !is_printable(value, i) || !is_ascii(value, i) && !emitter.unicode { + special_characters = true + } + if is_space(value, i) { + if i == 0 { + leading_space = true + } + if i+width(value[i]) == len(value) { + trailing_space = true + } + if previous_break { + break_space = true + } + previous_space = true + previous_break = false + } else if is_break(value, i) { + line_breaks = true + if i == 0 { + leading_break = true + } + if i+width(value[i]) == len(value) { + trailing_break = true + } + if previous_space { + space_break = true + } + previous_space = false + previous_break = true + } else { + previous_space = false + previous_break = false + } + + // [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition. + preceded_by_whitespace = is_blankz(value, i) + } + + emitter.scalar_data.multiline = line_breaks + emitter.scalar_data.flow_plain_allowed = true + emitter.scalar_data.block_plain_allowed = true + emitter.scalar_data.single_quoted_allowed = true + emitter.scalar_data.block_allowed = true + + if leading_space || leading_break || trailing_space || trailing_break { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + } + if trailing_space { + emitter.scalar_data.block_allowed = false + } + if break_space { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + emitter.scalar_data.single_quoted_allowed = false + } + if space_break || tab_characters || special_characters { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + emitter.scalar_data.single_quoted_allowed = false + } + if space_break || special_characters { + emitter.scalar_data.block_allowed = false + } + if line_breaks { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + } + if flow_indicators { + emitter.scalar_data.flow_plain_allowed = false + } + if block_indicators { + emitter.scalar_data.block_plain_allowed = false + } + return true +} + +// Check if the event data is valid. +func yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { + + emitter.anchor_data.anchor = nil + emitter.tag_data.handle = nil + emitter.tag_data.suffix = nil + emitter.scalar_data.value = nil + + if len(event.head_comment) > 0 { + emitter.head_comment = event.head_comment + } + if len(event.line_comment) > 0 { + emitter.line_comment = event.line_comment + } + if len(event.foot_comment) > 0 { + emitter.foot_comment = event.foot_comment + } + if len(event.tail_comment) > 0 { + emitter.tail_comment = event.tail_comment + } + + switch event.typ { + case yaml_ALIAS_EVENT: + if !yaml_emitter_analyze_anchor(emitter, event.anchor, true) { + return false + } + + case yaml_SCALAR_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || (!event.implicit && !event.quoted_implicit)) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + if !yaml_emitter_analyze_scalar(emitter, event.value) { + return false + } + + case yaml_SEQUENCE_START_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + + case yaml_MAPPING_START_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + } + return true +} + +// Write the BOM character. +func yaml_emitter_write_bom(emitter *yaml_emitter_t) bool { + if !flush(emitter) { + return false + } + pos := emitter.buffer_pos + emitter.buffer[pos+0] = '\xEF' + emitter.buffer[pos+1] = '\xBB' + emitter.buffer[pos+2] = '\xBF' + emitter.buffer_pos += 3 + return true +} + +func yaml_emitter_write_indent(emitter *yaml_emitter_t) bool { + indent := emitter.indent + if indent < 0 { + indent = 0 + } + if !emitter.indention || emitter.column > indent || (emitter.column == indent && !emitter.whitespace) { + if !put_break(emitter) { + return false + } + } + if emitter.foot_indent == indent { + if !put_break(emitter) { + return false + } + } + for emitter.column < indent { + if !put(emitter, ' ') { + return false + } + } + emitter.whitespace = true + //emitter.indention = true + emitter.space_above = false + emitter.foot_indent = -1 + return true +} + +func yaml_emitter_write_indicator(emitter *yaml_emitter_t, indicator []byte, need_whitespace, is_whitespace, is_indention bool) bool { + if need_whitespace && !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + if !write_all(emitter, indicator) { + return false + } + emitter.whitespace = is_whitespace + emitter.indention = (emitter.indention && is_indention) + emitter.open_ended = false + return true +} + +func yaml_emitter_write_anchor(emitter *yaml_emitter_t, value []byte) bool { + if !write_all(emitter, value) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_tag_handle(emitter *yaml_emitter_t, value []byte) bool { + if !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + if !write_all(emitter, value) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_tag_content(emitter *yaml_emitter_t, value []byte, need_whitespace bool) bool { + if need_whitespace && !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + for i := 0; i < len(value); { + var must_write bool + switch value[i] { + case ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '_', '.', '~', '*', '\'', '(', ')', '[', ']': + must_write = true + default: + must_write = is_alpha(value, i) + } + if must_write { + if !write(emitter, value, &i) { + return false + } + } else { + w := width(value[i]) + for k := 0; k < w; k++ { + octet := value[i] + i++ + if !put(emitter, '%') { + return false + } + + c := octet >> 4 + if c < 10 { + c += '0' + } else { + c += 'A' - 10 + } + if !put(emitter, c) { + return false + } + + c = octet & 0x0f + if c < 10 { + c += '0' + } else { + c += 'A' - 10 + } + if !put(emitter, c) { + return false + } + } + } + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_plain_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + if len(value) > 0 && !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + + spaces := false + breaks := false + for i := 0; i < len(value); { + if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && !is_space(value, i+1) { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + spaces = true + } else if is_break(value, i) { + if !breaks && value[i] == '\n' { + if !put_break(emitter) { + return false + } + } + if !write_break(emitter, value, &i) { + return false + } + //emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + spaces = false + breaks = false + } + } + + if len(value) > 0 { + emitter.whitespace = false + } + emitter.indention = false + if emitter.root_context { + emitter.open_ended = true + } + + return true +} + +func yaml_emitter_write_single_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + + if !yaml_emitter_write_indicator(emitter, []byte{'\''}, true, false, false) { + return false + } + + spaces := false + breaks := false + for i := 0; i < len(value); { + if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 && !is_space(value, i+1) { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + spaces = true + } else if is_break(value, i) { + if !breaks && value[i] == '\n' { + if !put_break(emitter) { + return false + } + } + if !write_break(emitter, value, &i) { + return false + } + //emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if value[i] == '\'' { + if !put(emitter, '\'') { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + spaces = false + breaks = false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'\''}, false, false, false) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_double_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + spaces := false + if !yaml_emitter_write_indicator(emitter, []byte{'"'}, true, false, false) { + return false + } + + for i := 0; i < len(value); { + if !is_printable(value, i) || (!emitter.unicode && !is_ascii(value, i)) || + is_bom(value, i) || is_break(value, i) || + value[i] == '"' || value[i] == '\\' { + + octet := value[i] + + var w int + var v rune + switch { + case octet&0x80 == 0x00: + w, v = 1, rune(octet&0x7F) + case octet&0xE0 == 0xC0: + w, v = 2, rune(octet&0x1F) + case octet&0xF0 == 0xE0: + w, v = 3, rune(octet&0x0F) + case octet&0xF8 == 0xF0: + w, v = 4, rune(octet&0x07) + } + for k := 1; k < w; k++ { + octet = value[i+k] + v = (v << 6) + (rune(octet) & 0x3F) + } + i += w + + if !put(emitter, '\\') { + return false + } + + var ok bool + switch v { + case 0x00: + ok = put(emitter, '0') + case 0x07: + ok = put(emitter, 'a') + case 0x08: + ok = put(emitter, 'b') + case 0x09: + ok = put(emitter, 't') + case 0x0A: + ok = put(emitter, 'n') + case 0x0b: + ok = put(emitter, 'v') + case 0x0c: + ok = put(emitter, 'f') + case 0x0d: + ok = put(emitter, 'r') + case 0x1b: + ok = put(emitter, 'e') + case 0x22: + ok = put(emitter, '"') + case 0x5c: + ok = put(emitter, '\\') + case 0x85: + ok = put(emitter, 'N') + case 0xA0: + ok = put(emitter, '_') + case 0x2028: + ok = put(emitter, 'L') + case 0x2029: + ok = put(emitter, 'P') + default: + if v <= 0xFF { + ok = put(emitter, 'x') + w = 2 + } else if v <= 0xFFFF { + ok = put(emitter, 'u') + w = 4 + } else { + ok = put(emitter, 'U') + w = 8 + } + for k := (w - 1) * 4; ok && k >= 0; k -= 4 { + digit := byte((v >> uint(k)) & 0x0F) + if digit < 10 { + ok = put(emitter, digit+'0') + } else { + ok = put(emitter, digit+'A'-10) + } + } + } + if !ok { + return false + } + spaces = false + } else if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 { + if !yaml_emitter_write_indent(emitter) { + return false + } + if is_space(value, i+1) { + if !put(emitter, '\\') { + return false + } + } + i += width(value[i]) + } else if !write(emitter, value, &i) { + return false + } + spaces = true + } else { + if !write(emitter, value, &i) { + return false + } + spaces = false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'"'}, false, false, false) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_block_scalar_hints(emitter *yaml_emitter_t, value []byte) bool { + if is_space(value, 0) || is_break(value, 0) { + indent_hint := []byte{'0' + byte(emitter.best_indent)} + if !yaml_emitter_write_indicator(emitter, indent_hint, false, false, false) { + return false + } + } + + emitter.open_ended = false + + var chomp_hint [1]byte + if len(value) == 0 { + chomp_hint[0] = '-' + } else { + i := len(value) - 1 + for value[i]&0xC0 == 0x80 { + i-- + } + if !is_break(value, i) { + chomp_hint[0] = '-' + } else if i == 0 { + chomp_hint[0] = '+' + emitter.open_ended = true + } else { + i-- + for value[i]&0xC0 == 0x80 { + i-- + } + if is_break(value, i) { + chomp_hint[0] = '+' + emitter.open_ended = true + } + } + } + if chomp_hint[0] != 0 { + if !yaml_emitter_write_indicator(emitter, chomp_hint[:], false, false, false) { + return false + } + } + return true +} + +func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bool { + if !yaml_emitter_write_indicator(emitter, []byte{'|'}, true, false, false) { + return false + } + if !yaml_emitter_write_block_scalar_hints(emitter, value) { + return false + } + if !put_break(emitter) { + return false + } + //emitter.indention = true + emitter.whitespace = true + breaks := true + for i := 0; i < len(value); { + if is_break(value, i) { + if !write_break(emitter, value, &i) { + return false + } + //emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + breaks = false + } + } + + return true +} + +func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) bool { + if !yaml_emitter_write_indicator(emitter, []byte{'>'}, true, false, false) { + return false + } + if !yaml_emitter_write_block_scalar_hints(emitter, value) { + return false + } + + if !put_break(emitter) { + return false + } + //emitter.indention = true + emitter.whitespace = true + + breaks := true + leading_spaces := true + for i := 0; i < len(value); { + if is_break(value, i) { + if !breaks && !leading_spaces && value[i] == '\n' { + k := 0 + for is_break(value, k) { + k += width(value[k]) + } + if !is_blankz(value, k) { + if !put_break(emitter) { + return false + } + } + } + if !write_break(emitter, value, &i) { + return false + } + //emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + leading_spaces = is_blank(value, i) + } + if !breaks && is_space(value, i) && !is_space(value, i+1) && emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + emitter.indention = false + breaks = false + } + } + return true +} + +func yaml_emitter_write_comment(emitter *yaml_emitter_t, comment []byte) bool { + breaks := false + pound := false + for i := 0; i < len(comment); { + if is_break(comment, i) { + if !write_break(emitter, comment, &i) { + return false + } + //emitter.indention = true + breaks = true + pound = false + } else { + if breaks && !yaml_emitter_write_indent(emitter) { + return false + } + if !pound { + if comment[i] != '#' && (!put(emitter, '#') || !put(emitter, ' ')) { + return false + } + pound = true + } + if !write(emitter, comment, &i) { + return false + } + emitter.indention = false + breaks = false + } + } + if !breaks && !put_break(emitter) { + return false + } + + emitter.whitespace = true + //emitter.indention = true + return true +} diff --git a/vendor/gopkg.in/yaml.v3/encode.go b/vendor/gopkg.in/yaml.v3/encode.go new file mode 100644 index 00000000000..45e8d1e1b9f --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/encode.go @@ -0,0 +1,572 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// +// 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 yaml + +import ( + "encoding" + "fmt" + "io" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "time" + "unicode/utf8" +) + +type encoder struct { + emitter yaml_emitter_t + event yaml_event_t + out []byte + flow bool + indent int + doneInit bool +} + +func newEncoder() *encoder { + e := &encoder{} + yaml_emitter_initialize(&e.emitter) + yaml_emitter_set_output_string(&e.emitter, &e.out) + yaml_emitter_set_unicode(&e.emitter, true) + return e +} + +func newEncoderWithWriter(w io.Writer) *encoder { + e := &encoder{} + yaml_emitter_initialize(&e.emitter) + yaml_emitter_set_output_writer(&e.emitter, w) + yaml_emitter_set_unicode(&e.emitter, true) + return e +} + +func (e *encoder) init() { + if e.doneInit { + return + } + if e.indent == 0 { + e.indent = 4 + } + e.emitter.best_indent = e.indent + yaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING) + e.emit() + e.doneInit = true +} + +func (e *encoder) finish() { + e.emitter.open_ended = false + yaml_stream_end_event_initialize(&e.event) + e.emit() +} + +func (e *encoder) destroy() { + yaml_emitter_delete(&e.emitter) +} + +func (e *encoder) emit() { + // This will internally delete the e.event value. + e.must(yaml_emitter_emit(&e.emitter, &e.event)) +} + +func (e *encoder) must(ok bool) { + if !ok { + msg := e.emitter.problem + if msg == "" { + msg = "unknown problem generating YAML content" + } + failf("%s", msg) + } +} + +func (e *encoder) marshalDoc(tag string, in reflect.Value) { + e.init() + var node *Node + if in.IsValid() { + node, _ = in.Interface().(*Node) + } + if node != nil && node.Kind == DocumentNode { + e.nodev(in) + } else { + yaml_document_start_event_initialize(&e.event, nil, nil, true) + e.emit() + e.marshal(tag, in) + yaml_document_end_event_initialize(&e.event, true) + e.emit() + } +} + +func (e *encoder) marshal(tag string, in reflect.Value) { + tag = shortTag(tag) + if !in.IsValid() || in.Kind() == reflect.Ptr && in.IsNil() { + e.nilv() + return + } + iface := in.Interface() + switch value := iface.(type) { + case *Node: + e.nodev(in) + return + case Node: + e.nodev(in.Addr()) + return + case time.Time: + e.timev(tag, in) + return + case *time.Time: + e.timev(tag, in.Elem()) + return + case time.Duration: + e.stringv(tag, reflect.ValueOf(value.String())) + return + case Marshaler: + v, err := value.MarshalYAML() + if err != nil { + fail(err) + } + if v == nil { + e.nilv() + return + } + e.marshal(tag, reflect.ValueOf(v)) + return + case encoding.TextMarshaler: + text, err := value.MarshalText() + if err != nil { + fail(err) + } + in = reflect.ValueOf(string(text)) + case nil: + e.nilv() + return + } + switch in.Kind() { + case reflect.Interface: + e.marshal(tag, in.Elem()) + case reflect.Map: + e.mapv(tag, in) + case reflect.Ptr: + e.marshal(tag, in.Elem()) + case reflect.Struct: + e.structv(tag, in) + case reflect.Slice, reflect.Array: + e.slicev(tag, in) + case reflect.String: + e.stringv(tag, in) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + e.intv(tag, in) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + e.uintv(tag, in) + case reflect.Float32, reflect.Float64: + e.floatv(tag, in) + case reflect.Bool: + e.boolv(tag, in) + default: + panic("cannot marshal type: " + in.Type().String()) + } +} + +func (e *encoder) mapv(tag string, in reflect.Value) { + e.mappingv(tag, func() { + keys := keyList(in.MapKeys()) + sort.Sort(keys) + for _, k := range keys { + e.marshal("", k) + e.marshal("", in.MapIndex(k)) + } + }) +} + +func (e *encoder) fieldByIndex(v reflect.Value, index []int) (field reflect.Value) { + for _, num := range index { + for { + if v.Kind() == reflect.Ptr { + if v.IsNil() { + return reflect.Value{} + } + v = v.Elem() + continue + } + break + } + v = v.Field(num) + } + return v +} + +func (e *encoder) structv(tag string, in reflect.Value) { + sinfo, err := getStructInfo(in.Type()) + if err != nil { + panic(err) + } + e.mappingv(tag, func() { + for _, info := range sinfo.FieldsList { + var value reflect.Value + if info.Inline == nil { + value = in.Field(info.Num) + } else { + value = e.fieldByIndex(in, info.Inline) + if !value.IsValid() { + continue + } + } + if info.OmitEmpty && isZero(value) { + continue + } + e.marshal("", reflect.ValueOf(info.Key)) + e.flow = info.Flow + e.marshal("", value) + } + if sinfo.InlineMap >= 0 { + m := in.Field(sinfo.InlineMap) + if m.Len() > 0 { + e.flow = false + keys := keyList(m.MapKeys()) + sort.Sort(keys) + for _, k := range keys { + if _, found := sinfo.FieldsMap[k.String()]; found { + panic(fmt.Sprintf("cannot have key %q in inlined map: conflicts with struct field", k.String())) + } + e.marshal("", k) + e.flow = false + e.marshal("", m.MapIndex(k)) + } + } + } + }) +} + +func (e *encoder) mappingv(tag string, f func()) { + implicit := tag == "" + style := yaml_BLOCK_MAPPING_STYLE + if e.flow { + e.flow = false + style = yaml_FLOW_MAPPING_STYLE + } + yaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style) + e.emit() + f() + yaml_mapping_end_event_initialize(&e.event) + e.emit() +} + +func (e *encoder) slicev(tag string, in reflect.Value) { + implicit := tag == "" + style := yaml_BLOCK_SEQUENCE_STYLE + if e.flow { + e.flow = false + style = yaml_FLOW_SEQUENCE_STYLE + } + e.must(yaml_sequence_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) + e.emit() + n := in.Len() + for i := 0; i < n; i++ { + e.marshal("", in.Index(i)) + } + e.must(yaml_sequence_end_event_initialize(&e.event)) + e.emit() +} + +// isBase60 returns whether s is in base 60 notation as defined in YAML 1.1. +// +// The base 60 float notation in YAML 1.1 is a terrible idea and is unsupported +// in YAML 1.2 and by this package, but these should be marshalled quoted for +// the time being for compatibility with other parsers. +func isBase60Float(s string) (result bool) { + // Fast path. + if s == "" { + return false + } + c := s[0] + if !(c == '+' || c == '-' || c >= '0' && c <= '9') || strings.IndexByte(s, ':') < 0 { + return false + } + // Do the full match. + return base60float.MatchString(s) +} + +// From http://yaml.org/type/float.html, except the regular expression there +// is bogus. In practice parsers do not enforce the "\.[0-9_]*" suffix. +var base60float = regexp.MustCompile(`^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+(?:\.[0-9_]*)?$`) + +// isOldBool returns whether s is bool notation as defined in YAML 1.1. +// +// We continue to force strings that YAML 1.1 would interpret as booleans to be +// rendered as quotes strings so that the marshalled output valid for YAML 1.1 +// parsing. +func isOldBool(s string) (result bool) { + switch s { + case "y", "Y", "yes", "Yes", "YES", "on", "On", "ON", + "n", "N", "no", "No", "NO", "off", "Off", "OFF": + return true + default: + return false + } +} + +func (e *encoder) stringv(tag string, in reflect.Value) { + var style yaml_scalar_style_t + s := in.String() + canUsePlain := true + switch { + case !utf8.ValidString(s): + if tag == binaryTag { + failf("explicitly tagged !!binary data must be base64-encoded") + } + if tag != "" { + failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) + } + // It can't be encoded directly as YAML so use a binary tag + // and encode it as base64. + tag = binaryTag + s = encodeBase64(s) + case tag == "": + // Check to see if it would resolve to a specific + // tag when encoded unquoted. If it doesn't, + // there's no need to quote it. + rtag, _ := resolve("", s) + canUsePlain = rtag == strTag && !(isBase60Float(s) || isOldBool(s)) + } + // Note: it's possible for user code to emit invalid YAML + // if they explicitly specify a tag and a string containing + // text that's incompatible with that tag. + switch { + case strings.Contains(s, "\n"): + if e.flow { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } else { + style = yaml_LITERAL_SCALAR_STYLE + } + case canUsePlain: + style = yaml_PLAIN_SCALAR_STYLE + default: + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + e.emitScalar(s, "", tag, style, nil, nil, nil, nil) +} + +func (e *encoder) boolv(tag string, in reflect.Value) { + var s string + if in.Bool() { + s = "true" + } else { + s = "false" + } + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) intv(tag string, in reflect.Value) { + s := strconv.FormatInt(in.Int(), 10) + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) uintv(tag string, in reflect.Value) { + s := strconv.FormatUint(in.Uint(), 10) + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) timev(tag string, in reflect.Value) { + t := in.Interface().(time.Time) + s := t.Format(time.RFC3339Nano) + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) floatv(tag string, in reflect.Value) { + // Issue #352: When formatting, use the precision of the underlying value + precision := 64 + if in.Kind() == reflect.Float32 { + precision = 32 + } + + s := strconv.FormatFloat(in.Float(), 'g', -1, precision) + switch s { + case "+Inf": + s = ".inf" + case "-Inf": + s = "-.inf" + case "NaN": + s = ".nan" + } + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) nilv() { + e.emitScalar("null", "", "", yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) +} + +func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t, head, line, foot, tail []byte) { + // TODO Kill this function. Replace all initialize calls by their underlining Go literals. + implicit := tag == "" + if !implicit { + tag = longTag(tag) + } + e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style)) + e.event.head_comment = head + e.event.line_comment = line + e.event.foot_comment = foot + e.event.tail_comment = tail + e.emit() +} + +func (e *encoder) nodev(in reflect.Value) { + e.node(in.Interface().(*Node), "") +} + +func (e *encoder) node(node *Node, tail string) { + // Zero nodes behave as nil. + if node.Kind == 0 && node.IsZero() { + e.nilv() + return + } + + // If the tag was not explicitly requested, and dropping it won't change the + // implicit tag of the value, don't include it in the presentation. + var tag = node.Tag + var stag = shortTag(tag) + var forceQuoting bool + if tag != "" && node.Style&TaggedStyle == 0 { + if node.Kind == ScalarNode { + if stag == strTag && node.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0 { + tag = "" + } else { + rtag, _ := resolve("", node.Value) + if rtag == stag { + tag = "" + } else if stag == strTag { + tag = "" + forceQuoting = true + } + } + } else { + var rtag string + switch node.Kind { + case MappingNode: + rtag = mapTag + case SequenceNode: + rtag = seqTag + } + if rtag == stag { + tag = "" + } + } + } + + switch node.Kind { + case DocumentNode: + yaml_document_start_event_initialize(&e.event, nil, nil, true) + e.event.head_comment = []byte(node.HeadComment) + e.emit() + for _, node := range node.Content { + e.node(node, "") + } + yaml_document_end_event_initialize(&e.event, true) + e.event.foot_comment = []byte(node.FootComment) + e.emit() + + case SequenceNode: + style := yaml_BLOCK_SEQUENCE_STYLE + if node.Style&FlowStyle != 0 { + style = yaml_FLOW_SEQUENCE_STYLE + } + e.must(yaml_sequence_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style)) + e.event.head_comment = []byte(node.HeadComment) + e.emit() + for _, node := range node.Content { + e.node(node, "") + } + e.must(yaml_sequence_end_event_initialize(&e.event)) + e.event.line_comment = []byte(node.LineComment) + e.event.foot_comment = []byte(node.FootComment) + e.emit() + + case MappingNode: + style := yaml_BLOCK_MAPPING_STYLE + if node.Style&FlowStyle != 0 { + style = yaml_FLOW_MAPPING_STYLE + } + yaml_mapping_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style) + e.event.tail_comment = []byte(tail) + e.event.head_comment = []byte(node.HeadComment) + e.emit() + + // The tail logic below moves the foot comment of prior keys to the following key, + // since the value for each key may be a nested structure and the foot needs to be + // processed only the entirety of the value is streamed. The last tail is processed + // with the mapping end event. + var tail string + for i := 0; i+1 < len(node.Content); i += 2 { + k := node.Content[i] + foot := k.FootComment + if foot != "" { + kopy := *k + kopy.FootComment = "" + k = &kopy + } + e.node(k, tail) + tail = foot + + v := node.Content[i+1] + e.node(v, "") + } + + yaml_mapping_end_event_initialize(&e.event) + e.event.tail_comment = []byte(tail) + e.event.line_comment = []byte(node.LineComment) + e.event.foot_comment = []byte(node.FootComment) + e.emit() + + case AliasNode: + yaml_alias_event_initialize(&e.event, []byte(node.Value)) + e.event.head_comment = []byte(node.HeadComment) + e.event.line_comment = []byte(node.LineComment) + e.event.foot_comment = []byte(node.FootComment) + e.emit() + + case ScalarNode: + value := node.Value + if !utf8.ValidString(value) { + if stag == binaryTag { + failf("explicitly tagged !!binary data must be base64-encoded") + } + if stag != "" { + failf("cannot marshal invalid UTF-8 data as %s", stag) + } + // It can't be encoded directly as YAML so use a binary tag + // and encode it as base64. + tag = binaryTag + value = encodeBase64(value) + } + + style := yaml_PLAIN_SCALAR_STYLE + switch { + case node.Style&DoubleQuotedStyle != 0: + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + case node.Style&SingleQuotedStyle != 0: + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + case node.Style&LiteralStyle != 0: + style = yaml_LITERAL_SCALAR_STYLE + case node.Style&FoldedStyle != 0: + style = yaml_FOLDED_SCALAR_STYLE + case strings.Contains(value, "\n"): + style = yaml_LITERAL_SCALAR_STYLE + case forceQuoting: + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + + e.emitScalar(value, node.Anchor, tag, style, []byte(node.HeadComment), []byte(node.LineComment), []byte(node.FootComment), []byte(tail)) + default: + failf("cannot encode node with unknown kind %d", node.Kind) + } +} diff --git a/vendor/gopkg.in/yaml.v3/go.mod b/vendor/gopkg.in/yaml.v3/go.mod new file mode 100644 index 00000000000..f407ea3213e --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/go.mod @@ -0,0 +1,5 @@ +module "gopkg.in/yaml.v3" + +require ( + "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405 +) diff --git a/vendor/gopkg.in/yaml.v3/parserc.go b/vendor/gopkg.in/yaml.v3/parserc.go new file mode 100644 index 00000000000..ac66fccc059 --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/parserc.go @@ -0,0 +1,1249 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "bytes" +) + +// The parser implements the following grammar: +// +// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END +// implicit_document ::= block_node DOCUMENT-END* +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// block_node_or_indentless_sequence ::= +// ALIAS +// | properties (block_content | indentless_block_sequence)? +// | block_content +// | indentless_block_sequence +// block_node ::= ALIAS +// | properties block_content? +// | block_content +// flow_node ::= ALIAS +// | properties flow_content? +// | flow_content +// properties ::= TAG ANCHOR? | ANCHOR TAG? +// block_content ::= block_collection | flow_collection | SCALAR +// flow_content ::= flow_collection | SCALAR +// block_collection ::= block_sequence | block_mapping +// flow_collection ::= flow_sequence | flow_mapping +// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END +// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ +// block_mapping ::= BLOCK-MAPPING_START +// ((KEY block_node_or_indentless_sequence?)? +// (VALUE block_node_or_indentless_sequence?)?)* +// BLOCK-END +// flow_sequence ::= FLOW-SEQUENCE-START +// (flow_sequence_entry FLOW-ENTRY)* +// flow_sequence_entry? +// FLOW-SEQUENCE-END +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// flow_mapping ::= FLOW-MAPPING-START +// (flow_mapping_entry FLOW-ENTRY)* +// flow_mapping_entry? +// FLOW-MAPPING-END +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? + +// Peek the next token in the token queue. +func peek_token(parser *yaml_parser_t) *yaml_token_t { + if parser.token_available || yaml_parser_fetch_more_tokens(parser) { + token := &parser.tokens[parser.tokens_head] + yaml_parser_unfold_comments(parser, token) + return token + } + return nil +} + +// yaml_parser_unfold_comments walks through the comments queue and joins all +// comments behind the position of the provided token into the respective +// top-level comment slices in the parser. +func yaml_parser_unfold_comments(parser *yaml_parser_t, token *yaml_token_t) { + for parser.comments_head < len(parser.comments) && token.start_mark.index >= parser.comments[parser.comments_head].token_mark.index { + comment := &parser.comments[parser.comments_head] + if len(comment.head) > 0 { + if token.typ == yaml_BLOCK_END_TOKEN { + // No heads on ends, so keep comment.head for a follow up token. + break + } + if len(parser.head_comment) > 0 { + parser.head_comment = append(parser.head_comment, '\n') + } + parser.head_comment = append(parser.head_comment, comment.head...) + } + if len(comment.foot) > 0 { + if len(parser.foot_comment) > 0 { + parser.foot_comment = append(parser.foot_comment, '\n') + } + parser.foot_comment = append(parser.foot_comment, comment.foot...) + } + if len(comment.line) > 0 { + if len(parser.line_comment) > 0 { + parser.line_comment = append(parser.line_comment, '\n') + } + parser.line_comment = append(parser.line_comment, comment.line...) + } + *comment = yaml_comment_t{} + parser.comments_head++ + } +} + +// Remove the next token from the queue (must be called after peek_token). +func skip_token(parser *yaml_parser_t) { + parser.token_available = false + parser.tokens_parsed++ + parser.stream_end_produced = parser.tokens[parser.tokens_head].typ == yaml_STREAM_END_TOKEN + parser.tokens_head++ +} + +// Get the next event. +func yaml_parser_parse(parser *yaml_parser_t, event *yaml_event_t) bool { + // Erase the event object. + *event = yaml_event_t{} + + // No events after the end of the stream or error. + if parser.stream_end_produced || parser.error != yaml_NO_ERROR || parser.state == yaml_PARSE_END_STATE { + return true + } + + // Generate the next event. + return yaml_parser_state_machine(parser, event) +} + +// Set parser error. +func yaml_parser_set_parser_error(parser *yaml_parser_t, problem string, problem_mark yaml_mark_t) bool { + parser.error = yaml_PARSER_ERROR + parser.problem = problem + parser.problem_mark = problem_mark + return false +} + +func yaml_parser_set_parser_error_context(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string, problem_mark yaml_mark_t) bool { + parser.error = yaml_PARSER_ERROR + parser.context = context + parser.context_mark = context_mark + parser.problem = problem + parser.problem_mark = problem_mark + return false +} + +// State dispatcher. +func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool { + //trace("yaml_parser_state_machine", "state:", parser.state.String()) + + switch parser.state { + case yaml_PARSE_STREAM_START_STATE: + return yaml_parser_parse_stream_start(parser, event) + + case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: + return yaml_parser_parse_document_start(parser, event, true) + + case yaml_PARSE_DOCUMENT_START_STATE: + return yaml_parser_parse_document_start(parser, event, false) + + case yaml_PARSE_DOCUMENT_CONTENT_STATE: + return yaml_parser_parse_document_content(parser, event) + + case yaml_PARSE_DOCUMENT_END_STATE: + return yaml_parser_parse_document_end(parser, event) + + case yaml_PARSE_BLOCK_NODE_STATE: + return yaml_parser_parse_node(parser, event, true, false) + + case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: + return yaml_parser_parse_node(parser, event, true, true) + + case yaml_PARSE_FLOW_NODE_STATE: + return yaml_parser_parse_node(parser, event, false, false) + + case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: + return yaml_parser_parse_block_sequence_entry(parser, event, true) + + case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_block_sequence_entry(parser, event, false) + + case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_indentless_sequence_entry(parser, event) + + case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: + return yaml_parser_parse_block_mapping_key(parser, event, true) + + case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: + return yaml_parser_parse_block_mapping_key(parser, event, false) + + case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: + return yaml_parser_parse_block_mapping_value(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: + return yaml_parser_parse_flow_sequence_entry(parser, event, true) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_flow_sequence_entry(parser, event, false) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_key(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_value(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_end(parser, event) + + case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: + return yaml_parser_parse_flow_mapping_key(parser, event, true) + + case yaml_PARSE_FLOW_MAPPING_KEY_STATE: + return yaml_parser_parse_flow_mapping_key(parser, event, false) + + case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: + return yaml_parser_parse_flow_mapping_value(parser, event, false) + + case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: + return yaml_parser_parse_flow_mapping_value(parser, event, true) + + default: + panic("invalid parser state") + } +} + +// Parse the production: +// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END +// ************ +func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_STREAM_START_TOKEN { + return yaml_parser_set_parser_error(parser, "did not find expected ", token.start_mark) + } + parser.state = yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE + *event = yaml_event_t{ + typ: yaml_STREAM_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + encoding: token.encoding, + } + skip_token(parser) + return true +} + +// Parse the productions: +// implicit_document ::= block_node DOCUMENT-END* +// * +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// ************************* +func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { + + token := peek_token(parser) + if token == nil { + return false + } + + // Parse extra document end indicators. + if !implicit { + for token.typ == yaml_DOCUMENT_END_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } + + if implicit && token.typ != yaml_VERSION_DIRECTIVE_TOKEN && + token.typ != yaml_TAG_DIRECTIVE_TOKEN && + token.typ != yaml_DOCUMENT_START_TOKEN && + token.typ != yaml_STREAM_END_TOKEN { + // Parse an implicit document. + if !yaml_parser_process_directives(parser, nil, nil) { + return false + } + parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) + parser.state = yaml_PARSE_BLOCK_NODE_STATE + + var head_comment []byte + if len(parser.head_comment) > 0 { + // [Go] Scan the header comment backwards, and if an empty line is found, break + // the header so the part before the last empty line goes into the + // document header, while the bottom of it goes into a follow up event. + for i := len(parser.head_comment) - 1; i > 0; i-- { + if parser.head_comment[i] == '\n' { + if i == len(parser.head_comment)-1 { + head_comment = parser.head_comment[:i] + parser.head_comment = parser.head_comment[i+1:] + break + } else if parser.head_comment[i-1] == '\n' { + head_comment = parser.head_comment[:i-1] + parser.head_comment = parser.head_comment[i+1:] + break + } + } + } + } + + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + + head_comment: head_comment, + } + + } else if token.typ != yaml_STREAM_END_TOKEN { + // Parse an explicit document. + var version_directive *yaml_version_directive_t + var tag_directives []yaml_tag_directive_t + start_mark := token.start_mark + if !yaml_parser_process_directives(parser, &version_directive, &tag_directives) { + return false + } + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_DOCUMENT_START_TOKEN { + yaml_parser_set_parser_error(parser, + "did not find expected ", token.start_mark) + return false + } + parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) + parser.state = yaml_PARSE_DOCUMENT_CONTENT_STATE + end_mark := token.end_mark + + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + version_directive: version_directive, + tag_directives: tag_directives, + implicit: false, + } + skip_token(parser) + + } else { + // Parse the stream end. + parser.state = yaml_PARSE_END_STATE + *event = yaml_event_t{ + typ: yaml_STREAM_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + skip_token(parser) + } + + return true +} + +// Parse the productions: +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// *********** +// +func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_VERSION_DIRECTIVE_TOKEN || + token.typ == yaml_TAG_DIRECTIVE_TOKEN || + token.typ == yaml_DOCUMENT_START_TOKEN || + token.typ == yaml_DOCUMENT_END_TOKEN || + token.typ == yaml_STREAM_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + return yaml_parser_process_empty_scalar(parser, event, + token.start_mark) + } + return yaml_parser_parse_node(parser, event, true, false) +} + +// Parse the productions: +// implicit_document ::= block_node DOCUMENT-END* +// ************* +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// +func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + + start_mark := token.start_mark + end_mark := token.start_mark + + implicit := true + if token.typ == yaml_DOCUMENT_END_TOKEN { + end_mark = token.end_mark + skip_token(parser) + implicit = false + } + + parser.tag_directives = parser.tag_directives[:0] + + parser.state = yaml_PARSE_DOCUMENT_START_STATE + *event = yaml_event_t{ + typ: yaml_DOCUMENT_END_EVENT, + start_mark: start_mark, + end_mark: end_mark, + implicit: implicit, + } + yaml_parser_set_event_comments(parser, event) + if len(event.head_comment) > 0 && len(event.foot_comment) == 0 { + event.foot_comment = event.head_comment + event.head_comment = nil + } + return true +} + +func yaml_parser_set_event_comments(parser *yaml_parser_t, event *yaml_event_t) { + event.head_comment = parser.head_comment + event.line_comment = parser.line_comment + event.foot_comment = parser.foot_comment + parser.head_comment = nil + parser.line_comment = nil + parser.foot_comment = nil + parser.tail_comment = nil + parser.stem_comment = nil +} + +// Parse the productions: +// block_node_or_indentless_sequence ::= +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// block_node ::= ALIAS +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// flow_node ::= ALIAS +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// properties ::= TAG ANCHOR? | ANCHOR TAG? +// ************************* +// block_content ::= block_collection | flow_collection | SCALAR +// ****** +// flow_content ::= flow_collection | SCALAR +// ****** +func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { + //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_ALIAS_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + *event = yaml_event_t{ + typ: yaml_ALIAS_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + anchor: token.value, + } + yaml_parser_set_event_comments(parser, event) + skip_token(parser) + return true + } + + start_mark := token.start_mark + end_mark := token.start_mark + + var tag_token bool + var tag_handle, tag_suffix, anchor []byte + var tag_mark yaml_mark_t + if token.typ == yaml_ANCHOR_TOKEN { + anchor = token.value + start_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_TAG_TOKEN { + tag_token = true + tag_handle = token.value + tag_suffix = token.suffix + tag_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } else if token.typ == yaml_TAG_TOKEN { + tag_token = true + tag_handle = token.value + tag_suffix = token.suffix + start_mark = token.start_mark + tag_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_ANCHOR_TOKEN { + anchor = token.value + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } + + var tag []byte + if tag_token { + if len(tag_handle) == 0 { + tag = tag_suffix + tag_suffix = nil + } else { + for i := range parser.tag_directives { + if bytes.Equal(parser.tag_directives[i].handle, tag_handle) { + tag = append([]byte(nil), parser.tag_directives[i].prefix...) + tag = append(tag, tag_suffix...) + break + } + } + if len(tag) == 0 { + yaml_parser_set_parser_error_context(parser, + "while parsing a node", start_mark, + "found undefined tag handle", tag_mark) + return false + } + } + } + + implicit := len(tag) == 0 + if indentless_sequence && token.typ == yaml_BLOCK_ENTRY_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), + } + return true + } + if token.typ == yaml_SCALAR_TOKEN { + var plain_implicit, quoted_implicit bool + end_mark = token.end_mark + if (len(tag) == 0 && token.style == yaml_PLAIN_SCALAR_STYLE) || (len(tag) == 1 && tag[0] == '!') { + plain_implicit = true + } else if len(tag) == 0 { + quoted_implicit = true + } + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + value: token.value, + implicit: plain_implicit, + quoted_implicit: quoted_implicit, + style: yaml_style_t(token.style), + } + yaml_parser_set_event_comments(parser, event) + skip_token(parser) + return true + } + if token.typ == yaml_FLOW_SEQUENCE_START_TOKEN { + // [Go] Some of the events below can be merged as they differ only on style. + end_mark = token.end_mark + parser.state = yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_FLOW_SEQUENCE_STYLE), + } + yaml_parser_set_event_comments(parser, event) + return true + } + if token.typ == yaml_FLOW_MAPPING_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), + } + yaml_parser_set_event_comments(parser, event) + return true + } + if block && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), + } + if parser.stem_comment != nil { + event.head_comment = parser.stem_comment + parser.stem_comment = nil + } + return true + } + if block && token.typ == yaml_BLOCK_MAPPING_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_MAPPING_STYLE), + } + if parser.stem_comment != nil { + event.head_comment = parser.stem_comment + parser.stem_comment = nil + } + return true + } + if len(anchor) > 0 || len(tag) > 0 { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + quoted_implicit: false, + style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), + } + return true + } + + context := "while parsing a flow node" + if block { + context = "while parsing a block node" + } + yaml_parser_set_parser_error_context(parser, context, start_mark, + "did not find expected node content", token.start_mark) + return false +} + +// Parse the productions: +// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END +// ******************** *********** * ********* +// +func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_BLOCK_ENTRY_TOKEN { + mark := token.end_mark + prior_head_len := len(parser.head_comment) + skip_token(parser) + yaml_parser_split_stem_comment(parser, prior_head_len) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, true, false) + } else { + parser.state = yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + } + if token.typ == yaml_BLOCK_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + + skip_token(parser) + return true + } + + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a block collection", context_mark, + "did not find expected '-' indicator", token.start_mark) +} + +// Parse the productions: +// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ +// *********** * +func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_BLOCK_ENTRY_TOKEN { + mark := token.end_mark + prior_head_len := len(parser.head_comment) + skip_token(parser) + yaml_parser_split_stem_comment(parser, prior_head_len) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_BLOCK_ENTRY_TOKEN && + token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, true, false) + } + parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.start_mark, // [Go] Shouldn't this be token.end_mark? + } + return true +} + +// Split stem comment from head comment. +// +// When a sequence or map is found under a sequence entry, the former head comment +// is assigned to the underlying sequence or map as a whole, not the individual +// sequence or map entry as would be expected otherwise. To handle this case the +// previous head comment is moved aside as the stem comment. +func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { + if stem_len == 0 { + return + } + + token := peek_token(parser) + if token.typ != yaml_BLOCK_SEQUENCE_START_TOKEN && token.typ != yaml_BLOCK_MAPPING_START_TOKEN { + return + } + + parser.stem_comment = parser.head_comment[:stem_len] + if len(parser.head_comment) == stem_len { + parser.head_comment = nil + } else { + // Copy suffix to prevent very strange bugs if someone ever appends + // further bytes to the prefix in the stem_comment slice above. + parser.head_comment = append([]byte(nil), parser.head_comment[stem_len+1:]...) + } +} + +// Parse the productions: +// block_mapping ::= BLOCK-MAPPING_START +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* +// +// BLOCK-END +// ********* +// +func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + // [Go] A tail comment was left from the prior mapping value processed. Emit an event + // as it needs to be processed with that value and not the following key. + if len(parser.tail_comment) > 0 { + *event = yaml_event_t{ + typ: yaml_TAIL_COMMENT_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + foot_comment: parser.tail_comment, + } + parser.tail_comment = nil + return true + } + + if token.typ == yaml_KEY_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, true, true) + } else { + parser.state = yaml_PARSE_BLOCK_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + } else if token.typ == yaml_BLOCK_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + yaml_parser_set_event_comments(parser, event) + skip_token(parser) + return true + } + + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a block mapping", context_mark, + "did not find expected key", token.start_mark) +} + +// Parse the productions: +// block_mapping ::= BLOCK-MAPPING_START +// +// ((KEY block_node_or_indentless_sequence?)? +// +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END +// +// +func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_VALUE_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_KEY_STATE) + return yaml_parser_parse_node(parser, event, true, true) + } + parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Parse the productions: +// flow_sequence ::= FLOW-SEQUENCE-START +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * +// +func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + if !first { + if token.typ == yaml_FLOW_ENTRY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } else { + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a flow sequence", context_mark, + "did not find expected ',' or ']'", token.start_mark) + } + } + + if token.typ == yaml_KEY_TOKEN { + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + implicit: true, + style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), + } + skip_token(parser) + return true + } else if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + yaml_parser_set_event_comments(parser, event) + + skip_token(parser) + return true +} + +// +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// *** * +// +func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_FLOW_ENTRY_TOKEN && + token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + mark := token.end_mark + skip_token(parser) + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) +} + +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// ***** * +// +func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_VALUE_TOKEN { + skip_token(parser) + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * +// +func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.start_mark, // [Go] Shouldn't this be end_mark? + } + return true +} + +// Parse the productions: +// flow_mapping ::= FLOW-MAPPING-START +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * *** * +// +func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ != yaml_FLOW_MAPPING_END_TOKEN { + if !first { + if token.typ == yaml_FLOW_ENTRY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } else { + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a flow mapping", context_mark, + "did not find expected ',' or '}'", token.start_mark) + } + } + + if token.typ == yaml_KEY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_FLOW_ENTRY_TOKEN && + token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } else { + parser.state = yaml_PARSE_FLOW_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) + } + } else if token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + yaml_parser_set_event_comments(parser, event) + skip_token(parser) + return true +} + +// Parse the productions: +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * ***** * +// +func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { + token := peek_token(parser) + if token == nil { + return false + } + if empty { + parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) + } + if token.typ == yaml_VALUE_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_KEY_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Generate an empty scalar event. +func yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml_event_t, mark yaml_mark_t) bool { + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: mark, + end_mark: mark, + value: nil, // Empty + implicit: true, + style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), + } + return true +} + +var default_tag_directives = []yaml_tag_directive_t{ + {[]byte("!"), []byte("!")}, + {[]byte("!!"), []byte("tag:yaml.org,2002:")}, +} + +// Parse directives. +func yaml_parser_process_directives(parser *yaml_parser_t, + version_directive_ref **yaml_version_directive_t, + tag_directives_ref *[]yaml_tag_directive_t) bool { + + var version_directive *yaml_version_directive_t + var tag_directives []yaml_tag_directive_t + + token := peek_token(parser) + if token == nil { + return false + } + + for token.typ == yaml_VERSION_DIRECTIVE_TOKEN || token.typ == yaml_TAG_DIRECTIVE_TOKEN { + if token.typ == yaml_VERSION_DIRECTIVE_TOKEN { + if version_directive != nil { + yaml_parser_set_parser_error(parser, + "found duplicate %YAML directive", token.start_mark) + return false + } + if token.major != 1 || token.minor != 1 { + yaml_parser_set_parser_error(parser, + "found incompatible YAML document", token.start_mark) + return false + } + version_directive = &yaml_version_directive_t{ + major: token.major, + minor: token.minor, + } + } else if token.typ == yaml_TAG_DIRECTIVE_TOKEN { + value := yaml_tag_directive_t{ + handle: token.value, + prefix: token.prefix, + } + if !yaml_parser_append_tag_directive(parser, value, false, token.start_mark) { + return false + } + tag_directives = append(tag_directives, value) + } + + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + + for i := range default_tag_directives { + if !yaml_parser_append_tag_directive(parser, default_tag_directives[i], true, token.start_mark) { + return false + } + } + + if version_directive_ref != nil { + *version_directive_ref = version_directive + } + if tag_directives_ref != nil { + *tag_directives_ref = tag_directives + } + return true +} + +// Append a tag directive to the directives stack. +func yaml_parser_append_tag_directive(parser *yaml_parser_t, value yaml_tag_directive_t, allow_duplicates bool, mark yaml_mark_t) bool { + for i := range parser.tag_directives { + if bytes.Equal(value.handle, parser.tag_directives[i].handle) { + if allow_duplicates { + return true + } + return yaml_parser_set_parser_error(parser, "found duplicate %TAG directive", mark) + } + } + + // [Go] I suspect the copy is unnecessary. This was likely done + // because there was no way to track ownership of the data. + value_copy := yaml_tag_directive_t{ + handle: make([]byte, len(value.handle)), + prefix: make([]byte, len(value.prefix)), + } + copy(value_copy.handle, value.handle) + copy(value_copy.prefix, value.prefix) + parser.tag_directives = append(parser.tag_directives, value_copy) + return true +} diff --git a/vendor/gopkg.in/yaml.v3/readerc.go b/vendor/gopkg.in/yaml.v3/readerc.go new file mode 100644 index 00000000000..b7de0a89c46 --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/readerc.go @@ -0,0 +1,434 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "io" +) + +// Set the reader error and return 0. +func yaml_parser_set_reader_error(parser *yaml_parser_t, problem string, offset int, value int) bool { + parser.error = yaml_READER_ERROR + parser.problem = problem + parser.problem_offset = offset + parser.problem_value = value + return false +} + +// Byte order marks. +const ( + bom_UTF8 = "\xef\xbb\xbf" + bom_UTF16LE = "\xff\xfe" + bom_UTF16BE = "\xfe\xff" +) + +// Determine the input stream encoding by checking the BOM symbol. If no BOM is +// found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure. +func yaml_parser_determine_encoding(parser *yaml_parser_t) bool { + // Ensure that we had enough bytes in the raw buffer. + for !parser.eof && len(parser.raw_buffer)-parser.raw_buffer_pos < 3 { + if !yaml_parser_update_raw_buffer(parser) { + return false + } + } + + // Determine the encoding. + buf := parser.raw_buffer + pos := parser.raw_buffer_pos + avail := len(buf) - pos + if avail >= 2 && buf[pos] == bom_UTF16LE[0] && buf[pos+1] == bom_UTF16LE[1] { + parser.encoding = yaml_UTF16LE_ENCODING + parser.raw_buffer_pos += 2 + parser.offset += 2 + } else if avail >= 2 && buf[pos] == bom_UTF16BE[0] && buf[pos+1] == bom_UTF16BE[1] { + parser.encoding = yaml_UTF16BE_ENCODING + parser.raw_buffer_pos += 2 + parser.offset += 2 + } else if avail >= 3 && buf[pos] == bom_UTF8[0] && buf[pos+1] == bom_UTF8[1] && buf[pos+2] == bom_UTF8[2] { + parser.encoding = yaml_UTF8_ENCODING + parser.raw_buffer_pos += 3 + parser.offset += 3 + } else { + parser.encoding = yaml_UTF8_ENCODING + } + return true +} + +// Update the raw buffer. +func yaml_parser_update_raw_buffer(parser *yaml_parser_t) bool { + size_read := 0 + + // Return if the raw buffer is full. + if parser.raw_buffer_pos == 0 && len(parser.raw_buffer) == cap(parser.raw_buffer) { + return true + } + + // Return on EOF. + if parser.eof { + return true + } + + // Move the remaining bytes in the raw buffer to the beginning. + if parser.raw_buffer_pos > 0 && parser.raw_buffer_pos < len(parser.raw_buffer) { + copy(parser.raw_buffer, parser.raw_buffer[parser.raw_buffer_pos:]) + } + parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)-parser.raw_buffer_pos] + parser.raw_buffer_pos = 0 + + // Call the read handler to fill the buffer. + size_read, err := parser.read_handler(parser, parser.raw_buffer[len(parser.raw_buffer):cap(parser.raw_buffer)]) + parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)+size_read] + if err == io.EOF { + parser.eof = true + } else if err != nil { + return yaml_parser_set_reader_error(parser, "input error: "+err.Error(), parser.offset, -1) + } + return true +} + +// Ensure that the buffer contains at least `length` characters. +// Return true on success, false on failure. +// +// The length is supposed to be significantly less that the buffer size. +func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { + if parser.read_handler == nil { + panic("read handler must be set") + } + + // [Go] This function was changed to guarantee the requested length size at EOF. + // The fact we need to do this is pretty awful, but the description above implies + // for that to be the case, and there are tests + + // If the EOF flag is set and the raw buffer is empty, do nothing. + if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { + // [Go] ACTUALLY! Read the documentation of this function above. + // This is just broken. To return true, we need to have the + // given length in the buffer. Not doing that means every single + // check that calls this function to make sure the buffer has a + // given length is Go) panicking; or C) accessing invalid memory. + //return true + } + + // Return if the buffer contains enough characters. + if parser.unread >= length { + return true + } + + // Determine the input encoding if it is not known yet. + if parser.encoding == yaml_ANY_ENCODING { + if !yaml_parser_determine_encoding(parser) { + return false + } + } + + // Move the unread characters to the beginning of the buffer. + buffer_len := len(parser.buffer) + if parser.buffer_pos > 0 && parser.buffer_pos < buffer_len { + copy(parser.buffer, parser.buffer[parser.buffer_pos:]) + buffer_len -= parser.buffer_pos + parser.buffer_pos = 0 + } else if parser.buffer_pos == buffer_len { + buffer_len = 0 + parser.buffer_pos = 0 + } + + // Open the whole buffer for writing, and cut it before returning. + parser.buffer = parser.buffer[:cap(parser.buffer)] + + // Fill the buffer until it has enough characters. + first := true + for parser.unread < length { + + // Fill the raw buffer if necessary. + if !first || parser.raw_buffer_pos == len(parser.raw_buffer) { + if !yaml_parser_update_raw_buffer(parser) { + parser.buffer = parser.buffer[:buffer_len] + return false + } + } + first = false + + // Decode the raw buffer. + inner: + for parser.raw_buffer_pos != len(parser.raw_buffer) { + var value rune + var width int + + raw_unread := len(parser.raw_buffer) - parser.raw_buffer_pos + + // Decode the next character. + switch parser.encoding { + case yaml_UTF8_ENCODING: + // Decode a UTF-8 character. Check RFC 3629 + // (http://www.ietf.org/rfc/rfc3629.txt) for more details. + // + // The following table (taken from the RFC) is used for + // decoding. + // + // Char. number range | UTF-8 octet sequence + // (hexadecimal) | (binary) + // --------------------+------------------------------------ + // 0000 0000-0000 007F | 0xxxxxxx + // 0000 0080-0000 07FF | 110xxxxx 10xxxxxx + // 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx + // 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + // + // Additionally, the characters in the range 0xD800-0xDFFF + // are prohibited as they are reserved for use with UTF-16 + // surrogate pairs. + + // Determine the length of the UTF-8 sequence. + octet := parser.raw_buffer[parser.raw_buffer_pos] + switch { + case octet&0x80 == 0x00: + width = 1 + case octet&0xE0 == 0xC0: + width = 2 + case octet&0xF0 == 0xE0: + width = 3 + case octet&0xF8 == 0xF0: + width = 4 + default: + // The leading octet is invalid. + return yaml_parser_set_reader_error(parser, + "invalid leading UTF-8 octet", + parser.offset, int(octet)) + } + + // Check if the raw buffer contains an incomplete character. + if width > raw_unread { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-8 octet sequence", + parser.offset, -1) + } + break inner + } + + // Decode the leading octet. + switch { + case octet&0x80 == 0x00: + value = rune(octet & 0x7F) + case octet&0xE0 == 0xC0: + value = rune(octet & 0x1F) + case octet&0xF0 == 0xE0: + value = rune(octet & 0x0F) + case octet&0xF8 == 0xF0: + value = rune(octet & 0x07) + default: + value = 0 + } + + // Check and decode the trailing octets. + for k := 1; k < width; k++ { + octet = parser.raw_buffer[parser.raw_buffer_pos+k] + + // Check if the octet is valid. + if (octet & 0xC0) != 0x80 { + return yaml_parser_set_reader_error(parser, + "invalid trailing UTF-8 octet", + parser.offset+k, int(octet)) + } + + // Decode the octet. + value = (value << 6) + rune(octet&0x3F) + } + + // Check the length of the sequence against the value. + switch { + case width == 1: + case width == 2 && value >= 0x80: + case width == 3 && value >= 0x800: + case width == 4 && value >= 0x10000: + default: + return yaml_parser_set_reader_error(parser, + "invalid length of a UTF-8 sequence", + parser.offset, -1) + } + + // Check the range of the value. + if value >= 0xD800 && value <= 0xDFFF || value > 0x10FFFF { + return yaml_parser_set_reader_error(parser, + "invalid Unicode character", + parser.offset, int(value)) + } + + case yaml_UTF16LE_ENCODING, yaml_UTF16BE_ENCODING: + var low, high int + if parser.encoding == yaml_UTF16LE_ENCODING { + low, high = 0, 1 + } else { + low, high = 1, 0 + } + + // The UTF-16 encoding is not as simple as one might + // naively think. Check RFC 2781 + // (http://www.ietf.org/rfc/rfc2781.txt). + // + // Normally, two subsequent bytes describe a Unicode + // character. However a special technique (called a + // surrogate pair) is used for specifying character + // values larger than 0xFFFF. + // + // A surrogate pair consists of two pseudo-characters: + // high surrogate area (0xD800-0xDBFF) + // low surrogate area (0xDC00-0xDFFF) + // + // The following formulas are used for decoding + // and encoding characters using surrogate pairs: + // + // U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF) + // U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF) + // W1 = 110110yyyyyyyyyy + // W2 = 110111xxxxxxxxxx + // + // where U is the character value, W1 is the high surrogate + // area, W2 is the low surrogate area. + + // Check for incomplete UTF-16 character. + if raw_unread < 2 { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-16 character", + parser.offset, -1) + } + break inner + } + + // Get the character. + value = rune(parser.raw_buffer[parser.raw_buffer_pos+low]) + + (rune(parser.raw_buffer[parser.raw_buffer_pos+high]) << 8) + + // Check for unexpected low surrogate area. + if value&0xFC00 == 0xDC00 { + return yaml_parser_set_reader_error(parser, + "unexpected low surrogate area", + parser.offset, int(value)) + } + + // Check for a high surrogate area. + if value&0xFC00 == 0xD800 { + width = 4 + + // Check for incomplete surrogate pair. + if raw_unread < 4 { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-16 surrogate pair", + parser.offset, -1) + } + break inner + } + + // Get the next character. + value2 := rune(parser.raw_buffer[parser.raw_buffer_pos+low+2]) + + (rune(parser.raw_buffer[parser.raw_buffer_pos+high+2]) << 8) + + // Check for a low surrogate area. + if value2&0xFC00 != 0xDC00 { + return yaml_parser_set_reader_error(parser, + "expected low surrogate area", + parser.offset+2, int(value2)) + } + + // Generate the value of the surrogate pair. + value = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF) + } else { + width = 2 + } + + default: + panic("impossible") + } + + // Check if the character is in the allowed range: + // #x9 | #xA | #xD | [#x20-#x7E] (8 bit) + // | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] (16 bit) + // | [#x10000-#x10FFFF] (32 bit) + switch { + case value == 0x09: + case value == 0x0A: + case value == 0x0D: + case value >= 0x20 && value <= 0x7E: + case value == 0x85: + case value >= 0xA0 && value <= 0xD7FF: + case value >= 0xE000 && value <= 0xFFFD: + case value >= 0x10000 && value <= 0x10FFFF: + default: + return yaml_parser_set_reader_error(parser, + "control characters are not allowed", + parser.offset, int(value)) + } + + // Move the raw pointers. + parser.raw_buffer_pos += width + parser.offset += width + + // Finally put the character into the buffer. + if value <= 0x7F { + // 0000 0000-0000 007F . 0xxxxxxx + parser.buffer[buffer_len+0] = byte(value) + buffer_len += 1 + } else if value <= 0x7FF { + // 0000 0080-0000 07FF . 110xxxxx 10xxxxxx + parser.buffer[buffer_len+0] = byte(0xC0 + (value >> 6)) + parser.buffer[buffer_len+1] = byte(0x80 + (value & 0x3F)) + buffer_len += 2 + } else if value <= 0xFFFF { + // 0000 0800-0000 FFFF . 1110xxxx 10xxxxxx 10xxxxxx + parser.buffer[buffer_len+0] = byte(0xE0 + (value >> 12)) + parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 6) & 0x3F)) + parser.buffer[buffer_len+2] = byte(0x80 + (value & 0x3F)) + buffer_len += 3 + } else { + // 0001 0000-0010 FFFF . 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + parser.buffer[buffer_len+0] = byte(0xF0 + (value >> 18)) + parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 12) & 0x3F)) + parser.buffer[buffer_len+2] = byte(0x80 + ((value >> 6) & 0x3F)) + parser.buffer[buffer_len+3] = byte(0x80 + (value & 0x3F)) + buffer_len += 4 + } + + parser.unread++ + } + + // On EOF, put NUL into the buffer and return. + if parser.eof { + parser.buffer[buffer_len] = 0 + buffer_len++ + parser.unread++ + break + } + } + // [Go] Read the documentation of this function above. To return true, + // we need to have the given length in the buffer. Not doing that means + // every single check that calls this function to make sure the buffer + // has a given length is Go) panicking; or C) accessing invalid memory. + // This happens here due to the EOF above breaking early. + for buffer_len < length { + parser.buffer[buffer_len] = 0 + buffer_len++ + } + parser.buffer = parser.buffer[:buffer_len] + return true +} diff --git a/vendor/gopkg.in/yaml.v3/resolve.go b/vendor/gopkg.in/yaml.v3/resolve.go new file mode 100644 index 00000000000..64ae888057a --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/resolve.go @@ -0,0 +1,326 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// +// 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 yaml + +import ( + "encoding/base64" + "math" + "regexp" + "strconv" + "strings" + "time" +) + +type resolveMapItem struct { + value interface{} + tag string +} + +var resolveTable = make([]byte, 256) +var resolveMap = make(map[string]resolveMapItem) + +func init() { + t := resolveTable + t[int('+')] = 'S' // Sign + t[int('-')] = 'S' + for _, c := range "0123456789" { + t[int(c)] = 'D' // Digit + } + for _, c := range "yYnNtTfFoO~" { + t[int(c)] = 'M' // In map + } + t[int('.')] = '.' // Float (potentially in map) + + var resolveMapList = []struct { + v interface{} + tag string + l []string + }{ + {true, boolTag, []string{"true", "True", "TRUE"}}, + {false, boolTag, []string{"false", "False", "FALSE"}}, + {nil, nullTag, []string{"", "~", "null", "Null", "NULL"}}, + {math.NaN(), floatTag, []string{".nan", ".NaN", ".NAN"}}, + {math.Inf(+1), floatTag, []string{".inf", ".Inf", ".INF"}}, + {math.Inf(+1), floatTag, []string{"+.inf", "+.Inf", "+.INF"}}, + {math.Inf(-1), floatTag, []string{"-.inf", "-.Inf", "-.INF"}}, + {"<<", mergeTag, []string{"<<"}}, + } + + m := resolveMap + for _, item := range resolveMapList { + for _, s := range item.l { + m[s] = resolveMapItem{item.v, item.tag} + } + } +} + +const ( + nullTag = "!!null" + boolTag = "!!bool" + strTag = "!!str" + intTag = "!!int" + floatTag = "!!float" + timestampTag = "!!timestamp" + seqTag = "!!seq" + mapTag = "!!map" + binaryTag = "!!binary" + mergeTag = "!!merge" +) + +var longTags = make(map[string]string) +var shortTags = make(map[string]string) + +func init() { + for _, stag := range []string{nullTag, boolTag, strTag, intTag, floatTag, timestampTag, seqTag, mapTag, binaryTag, mergeTag} { + ltag := longTag(stag) + longTags[stag] = ltag + shortTags[ltag] = stag + } +} + +const longTagPrefix = "tag:yaml.org,2002:" + +func shortTag(tag string) string { + if strings.HasPrefix(tag, longTagPrefix) { + if stag, ok := shortTags[tag]; ok { + return stag + } + return "!!" + tag[len(longTagPrefix):] + } + return tag +} + +func longTag(tag string) string { + if strings.HasPrefix(tag, "!!") { + if ltag, ok := longTags[tag]; ok { + return ltag + } + return longTagPrefix + tag[2:] + } + return tag +} + +func resolvableTag(tag string) bool { + switch tag { + case "", strTag, boolTag, intTag, floatTag, nullTag, timestampTag: + return true + } + return false +} + +var yamlStyleFloat = regexp.MustCompile(`^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$`) + +func resolve(tag string, in string) (rtag string, out interface{}) { + tag = shortTag(tag) + if !resolvableTag(tag) { + return tag, in + } + + defer func() { + switch tag { + case "", rtag, strTag, binaryTag: + return + case floatTag: + if rtag == intTag { + switch v := out.(type) { + case int64: + rtag = floatTag + out = float64(v) + return + case int: + rtag = floatTag + out = float64(v) + return + } + } + } + failf("cannot decode %s `%s` as a %s", shortTag(rtag), in, shortTag(tag)) + }() + + // Any data is accepted as a !!str or !!binary. + // Otherwise, the prefix is enough of a hint about what it might be. + hint := byte('N') + if in != "" { + hint = resolveTable[in[0]] + } + if hint != 0 && tag != strTag && tag != binaryTag { + // Handle things we can lookup in a map. + if item, ok := resolveMap[in]; ok { + return item.tag, item.value + } + + // Base 60 floats are a bad idea, were dropped in YAML 1.2, and + // are purposefully unsupported here. They're still quoted on + // the way out for compatibility with other parser, though. + + switch hint { + case 'M': + // We've already checked the map above. + + case '.': + // Not in the map, so maybe a normal float. + floatv, err := strconv.ParseFloat(in, 64) + if err == nil { + return floatTag, floatv + } + + case 'D', 'S': + // Int, float, or timestamp. + // Only try values as a timestamp if the value is unquoted or there's an explicit + // !!timestamp tag. + if tag == "" || tag == timestampTag { + t, ok := parseTimestamp(in) + if ok { + return timestampTag, t + } + } + + plain := strings.Replace(in, "_", "", -1) + intv, err := strconv.ParseInt(plain, 0, 64) + if err == nil { + if intv == int64(int(intv)) { + return intTag, int(intv) + } else { + return intTag, intv + } + } + uintv, err := strconv.ParseUint(plain, 0, 64) + if err == nil { + return intTag, uintv + } + if yamlStyleFloat.MatchString(plain) { + floatv, err := strconv.ParseFloat(plain, 64) + if err == nil { + return floatTag, floatv + } + } + if strings.HasPrefix(plain, "0b") { + intv, err := strconv.ParseInt(plain[2:], 2, 64) + if err == nil { + if intv == int64(int(intv)) { + return intTag, int(intv) + } else { + return intTag, intv + } + } + uintv, err := strconv.ParseUint(plain[2:], 2, 64) + if err == nil { + return intTag, uintv + } + } else if strings.HasPrefix(plain, "-0b") { + intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) + if err == nil { + if true || intv == int64(int(intv)) { + return intTag, int(intv) + } else { + return intTag, intv + } + } + } + // Octals as introduced in version 1.2 of the spec. + // Octals from the 1.1 spec, spelled as 0777, are still + // decoded by default in v3 as well for compatibility. + // May be dropped in v4 depending on how usage evolves. + if strings.HasPrefix(plain, "0o") { + intv, err := strconv.ParseInt(plain[2:], 8, 64) + if err == nil { + if intv == int64(int(intv)) { + return intTag, int(intv) + } else { + return intTag, intv + } + } + uintv, err := strconv.ParseUint(plain[2:], 8, 64) + if err == nil { + return intTag, uintv + } + } else if strings.HasPrefix(plain, "-0o") { + intv, err := strconv.ParseInt("-"+plain[3:], 8, 64) + if err == nil { + if true || intv == int64(int(intv)) { + return intTag, int(intv) + } else { + return intTag, intv + } + } + } + default: + panic("internal error: missing handler for resolver table: " + string(rune(hint)) + " (with " + in + ")") + } + } + return strTag, in +} + +// encodeBase64 encodes s as base64 that is broken up into multiple lines +// as appropriate for the resulting length. +func encodeBase64(s string) string { + const lineLen = 70 + encLen := base64.StdEncoding.EncodedLen(len(s)) + lines := encLen/lineLen + 1 + buf := make([]byte, encLen*2+lines) + in := buf[0:encLen] + out := buf[encLen:] + base64.StdEncoding.Encode(in, []byte(s)) + k := 0 + for i := 0; i < len(in); i += lineLen { + j := i + lineLen + if j > len(in) { + j = len(in) + } + k += copy(out[k:], in[i:j]) + if lines > 1 { + out[k] = '\n' + k++ + } + } + return string(out[:k]) +} + +// This is a subset of the formats allowed by the regular expression +// defined at http://yaml.org/type/timestamp.html. +var allowedTimestampFormats = []string{ + "2006-1-2T15:4:5.999999999Z07:00", // RCF3339Nano with short date fields. + "2006-1-2t15:4:5.999999999Z07:00", // RFC3339Nano with short date fields and lower-case "t". + "2006-1-2 15:4:5.999999999", // space separated with no time zone + "2006-1-2", // date only + // Notable exception: time.Parse cannot handle: "2001-12-14 21:59:43.10 -5" + // from the set of examples. +} + +// parseTimestamp parses s as a timestamp string and +// returns the timestamp and reports whether it succeeded. +// Timestamp formats are defined at http://yaml.org/type/timestamp.html +func parseTimestamp(s string) (time.Time, bool) { + // TODO write code to check all the formats supported by + // http://yaml.org/type/timestamp.html instead of using time.Parse. + + // Quick check: all date formats start with YYYY-. + i := 0 + for ; i < len(s); i++ { + if c := s[i]; c < '0' || c > '9' { + break + } + } + if i != 4 || i == len(s) || s[i] != '-' { + return time.Time{}, false + } + for _, format := range allowedTimestampFormats { + if t, err := time.Parse(format, s); err == nil { + return t, true + } + } + return time.Time{}, false +} diff --git a/vendor/gopkg.in/yaml.v3/scannerc.go b/vendor/gopkg.in/yaml.v3/scannerc.go new file mode 100644 index 00000000000..d9a539c39ae --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/scannerc.go @@ -0,0 +1,3028 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "bytes" + "fmt" +) + +// Introduction +// ************ +// +// The following notes assume that you are familiar with the YAML specification +// (http://yaml.org/spec/1.2/spec.html). We mostly follow it, although in +// some cases we are less restrictive that it requires. +// +// The process of transforming a YAML stream into a sequence of events is +// divided on two steps: Scanning and Parsing. +// +// The Scanner transforms the input stream into a sequence of tokens, while the +// parser transform the sequence of tokens produced by the Scanner into a +// sequence of parsing events. +// +// The Scanner is rather clever and complicated. The Parser, on the contrary, +// is a straightforward implementation of a recursive-descendant parser (or, +// LL(1) parser, as it is usually called). +// +// Actually there are two issues of Scanning that might be called "clever", the +// rest is quite straightforward. The issues are "block collection start" and +// "simple keys". Both issues are explained below in details. +// +// Here the Scanning step is explained and implemented. We start with the list +// of all the tokens produced by the Scanner together with short descriptions. +// +// Now, tokens: +// +// STREAM-START(encoding) # The stream start. +// STREAM-END # The stream end. +// VERSION-DIRECTIVE(major,minor) # The '%YAML' directive. +// TAG-DIRECTIVE(handle,prefix) # The '%TAG' directive. +// DOCUMENT-START # '---' +// DOCUMENT-END # '...' +// BLOCK-SEQUENCE-START # Indentation increase denoting a block +// BLOCK-MAPPING-START # sequence or a block mapping. +// BLOCK-END # Indentation decrease. +// FLOW-SEQUENCE-START # '[' +// FLOW-SEQUENCE-END # ']' +// BLOCK-SEQUENCE-START # '{' +// BLOCK-SEQUENCE-END # '}' +// BLOCK-ENTRY # '-' +// FLOW-ENTRY # ',' +// KEY # '?' or nothing (simple keys). +// VALUE # ':' +// ALIAS(anchor) # '*anchor' +// ANCHOR(anchor) # '&anchor' +// TAG(handle,suffix) # '!handle!suffix' +// SCALAR(value,style) # A scalar. +// +// The following two tokens are "virtual" tokens denoting the beginning and the +// end of the stream: +// +// STREAM-START(encoding) +// STREAM-END +// +// We pass the information about the input stream encoding with the +// STREAM-START token. +// +// The next two tokens are responsible for tags: +// +// VERSION-DIRECTIVE(major,minor) +// TAG-DIRECTIVE(handle,prefix) +// +// Example: +// +// %YAML 1.1 +// %TAG ! !foo +// %TAG !yaml! tag:yaml.org,2002: +// --- +// +// The correspoding sequence of tokens: +// +// STREAM-START(utf-8) +// VERSION-DIRECTIVE(1,1) +// TAG-DIRECTIVE("!","!foo") +// TAG-DIRECTIVE("!yaml","tag:yaml.org,2002:") +// DOCUMENT-START +// STREAM-END +// +// Note that the VERSION-DIRECTIVE and TAG-DIRECTIVE tokens occupy a whole +// line. +// +// The document start and end indicators are represented by: +// +// DOCUMENT-START +// DOCUMENT-END +// +// Note that if a YAML stream contains an implicit document (without '---' +// and '...' indicators), no DOCUMENT-START and DOCUMENT-END tokens will be +// produced. +// +// In the following examples, we present whole documents together with the +// produced tokens. +// +// 1. An implicit document: +// +// 'a scalar' +// +// Tokens: +// +// STREAM-START(utf-8) +// SCALAR("a scalar",single-quoted) +// STREAM-END +// +// 2. An explicit document: +// +// --- +// 'a scalar' +// ... +// +// Tokens: +// +// STREAM-START(utf-8) +// DOCUMENT-START +// SCALAR("a scalar",single-quoted) +// DOCUMENT-END +// STREAM-END +// +// 3. Several documents in a stream: +// +// 'a scalar' +// --- +// 'another scalar' +// --- +// 'yet another scalar' +// +// Tokens: +// +// STREAM-START(utf-8) +// SCALAR("a scalar",single-quoted) +// DOCUMENT-START +// SCALAR("another scalar",single-quoted) +// DOCUMENT-START +// SCALAR("yet another scalar",single-quoted) +// STREAM-END +// +// We have already introduced the SCALAR token above. The following tokens are +// used to describe aliases, anchors, tag, and scalars: +// +// ALIAS(anchor) +// ANCHOR(anchor) +// TAG(handle,suffix) +// SCALAR(value,style) +// +// The following series of examples illustrate the usage of these tokens: +// +// 1. A recursive sequence: +// +// &A [ *A ] +// +// Tokens: +// +// STREAM-START(utf-8) +// ANCHOR("A") +// FLOW-SEQUENCE-START +// ALIAS("A") +// FLOW-SEQUENCE-END +// STREAM-END +// +// 2. A tagged scalar: +// +// !!float "3.14" # A good approximation. +// +// Tokens: +// +// STREAM-START(utf-8) +// TAG("!!","float") +// SCALAR("3.14",double-quoted) +// STREAM-END +// +// 3. Various scalar styles: +// +// --- # Implicit empty plain scalars do not produce tokens. +// --- a plain scalar +// --- 'a single-quoted scalar' +// --- "a double-quoted scalar" +// --- |- +// a literal scalar +// --- >- +// a folded +// scalar +// +// Tokens: +// +// STREAM-START(utf-8) +// DOCUMENT-START +// DOCUMENT-START +// SCALAR("a plain scalar",plain) +// DOCUMENT-START +// SCALAR("a single-quoted scalar",single-quoted) +// DOCUMENT-START +// SCALAR("a double-quoted scalar",double-quoted) +// DOCUMENT-START +// SCALAR("a literal scalar",literal) +// DOCUMENT-START +// SCALAR("a folded scalar",folded) +// STREAM-END +// +// Now it's time to review collection-related tokens. We will start with +// flow collections: +// +// FLOW-SEQUENCE-START +// FLOW-SEQUENCE-END +// FLOW-MAPPING-START +// FLOW-MAPPING-END +// FLOW-ENTRY +// KEY +// VALUE +// +// The tokens FLOW-SEQUENCE-START, FLOW-SEQUENCE-END, FLOW-MAPPING-START, and +// FLOW-MAPPING-END represent the indicators '[', ']', '{', and '}' +// correspondingly. FLOW-ENTRY represent the ',' indicator. Finally the +// indicators '?' and ':', which are used for denoting mapping keys and values, +// are represented by the KEY and VALUE tokens. +// +// The following examples show flow collections: +// +// 1. A flow sequence: +// +// [item 1, item 2, item 3] +// +// Tokens: +// +// STREAM-START(utf-8) +// FLOW-SEQUENCE-START +// SCALAR("item 1",plain) +// FLOW-ENTRY +// SCALAR("item 2",plain) +// FLOW-ENTRY +// SCALAR("item 3",plain) +// FLOW-SEQUENCE-END +// STREAM-END +// +// 2. A flow mapping: +// +// { +// a simple key: a value, # Note that the KEY token is produced. +// ? a complex key: another value, +// } +// +// Tokens: +// +// STREAM-START(utf-8) +// FLOW-MAPPING-START +// KEY +// SCALAR("a simple key",plain) +// VALUE +// SCALAR("a value",plain) +// FLOW-ENTRY +// KEY +// SCALAR("a complex key",plain) +// VALUE +// SCALAR("another value",plain) +// FLOW-ENTRY +// FLOW-MAPPING-END +// STREAM-END +// +// A simple key is a key which is not denoted by the '?' indicator. Note that +// the Scanner still produce the KEY token whenever it encounters a simple key. +// +// For scanning block collections, the following tokens are used (note that we +// repeat KEY and VALUE here): +// +// BLOCK-SEQUENCE-START +// BLOCK-MAPPING-START +// BLOCK-END +// BLOCK-ENTRY +// KEY +// VALUE +// +// The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation +// increase that precedes a block collection (cf. the INDENT token in Python). +// The token BLOCK-END denote indentation decrease that ends a block collection +// (cf. the DEDENT token in Python). However YAML has some syntax pecularities +// that makes detections of these tokens more complex. +// +// The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators +// '-', '?', and ':' correspondingly. +// +// The following examples show how the tokens BLOCK-SEQUENCE-START, +// BLOCK-MAPPING-START, and BLOCK-END are emitted by the Scanner: +// +// 1. Block sequences: +// +// - item 1 +// - item 2 +// - +// - item 3.1 +// - item 3.2 +// - +// key 1: value 1 +// key 2: value 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-ENTRY +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 3.1",plain) +// BLOCK-ENTRY +// SCALAR("item 3.2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// 2. Block mappings: +// +// a simple key: a value # The KEY token is produced here. +// ? a complex key +// : another value +// a mapping: +// key 1: value 1 +// key 2: value 2 +// a sequence: +// - item 1 +// - item 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("a simple key",plain) +// VALUE +// SCALAR("a value",plain) +// KEY +// SCALAR("a complex key",plain) +// VALUE +// SCALAR("another value",plain) +// KEY +// SCALAR("a mapping",plain) +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// KEY +// SCALAR("a sequence",plain) +// VALUE +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// YAML does not always require to start a new block collection from a new +// line. If the current line contains only '-', '?', and ':' indicators, a new +// block collection may start at the current line. The following examples +// illustrate this case: +// +// 1. Collections in a sequence: +// +// - - item 1 +// - item 2 +// - key 1: value 1 +// key 2: value 2 +// - ? complex key +// : complex value +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("complex key") +// VALUE +// SCALAR("complex value") +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// 2. Collections in a mapping: +// +// ? a sequence +// : - item 1 +// - item 2 +// ? a mapping +// : key 1: value 1 +// key 2: value 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("a sequence",plain) +// VALUE +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// KEY +// SCALAR("a mapping",plain) +// VALUE +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// YAML also permits non-indented sequences if they are included into a block +// mapping. In this case, the token BLOCK-SEQUENCE-START is not produced: +// +// key: +// - item 1 # BLOCK-SEQUENCE-START is NOT produced here. +// - item 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("key",plain) +// VALUE +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// + +// Ensure that the buffer contains the required number of characters. +// Return true on success, false on failure (reader error or memory error). +func cache(parser *yaml_parser_t, length int) bool { + // [Go] This was inlined: !cache(A, B) -> unread < B && !update(A, B) + return parser.unread >= length || yaml_parser_update_buffer(parser, length) +} + +// Advance the buffer pointer. +func skip(parser *yaml_parser_t) { + if !is_blank(parser.buffer, parser.buffer_pos) { + parser.newlines = 0 + } + parser.mark.index++ + parser.mark.column++ + parser.unread-- + parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) +} + +func skip_line(parser *yaml_parser_t) { + if is_crlf(parser.buffer, parser.buffer_pos) { + parser.mark.index += 2 + parser.mark.column = 0 + parser.mark.line++ + parser.unread -= 2 + parser.buffer_pos += 2 + parser.newlines++ + } else if is_break(parser.buffer, parser.buffer_pos) { + parser.mark.index++ + parser.mark.column = 0 + parser.mark.line++ + parser.unread-- + parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) + parser.newlines++ + } +} + +// Copy a character to a string buffer and advance pointers. +func read(parser *yaml_parser_t, s []byte) []byte { + if !is_blank(parser.buffer, parser.buffer_pos) { + parser.newlines = 0 + } + w := width(parser.buffer[parser.buffer_pos]) + if w == 0 { + panic("invalid character sequence") + } + if len(s) == 0 { + s = make([]byte, 0, 32) + } + if w == 1 && len(s)+w <= cap(s) { + s = s[:len(s)+1] + s[len(s)-1] = parser.buffer[parser.buffer_pos] + parser.buffer_pos++ + } else { + s = append(s, parser.buffer[parser.buffer_pos:parser.buffer_pos+w]...) + parser.buffer_pos += w + } + parser.mark.index++ + parser.mark.column++ + parser.unread-- + return s +} + +// Copy a line break character to a string buffer and advance pointers. +func read_line(parser *yaml_parser_t, s []byte) []byte { + buf := parser.buffer + pos := parser.buffer_pos + switch { + case buf[pos] == '\r' && buf[pos+1] == '\n': + // CR LF . LF + s = append(s, '\n') + parser.buffer_pos += 2 + parser.mark.index++ + parser.unread-- + case buf[pos] == '\r' || buf[pos] == '\n': + // CR|LF . LF + s = append(s, '\n') + parser.buffer_pos += 1 + case buf[pos] == '\xC2' && buf[pos+1] == '\x85': + // NEL . LF + s = append(s, '\n') + parser.buffer_pos += 2 + case buf[pos] == '\xE2' && buf[pos+1] == '\x80' && (buf[pos+2] == '\xA8' || buf[pos+2] == '\xA9'): + // LS|PS . LS|PS + s = append(s, buf[parser.buffer_pos:pos+3]...) + parser.buffer_pos += 3 + default: + return s + } + parser.mark.index++ + parser.mark.column = 0 + parser.mark.line++ + parser.unread-- + parser.newlines++ + return s +} + +// Get the next token. +func yaml_parser_scan(parser *yaml_parser_t, token *yaml_token_t) bool { + // Erase the token object. + *token = yaml_token_t{} // [Go] Is this necessary? + + // No tokens after STREAM-END or error. + if parser.stream_end_produced || parser.error != yaml_NO_ERROR { + return true + } + + // Ensure that the tokens queue contains enough tokens. + if !parser.token_available { + if !yaml_parser_fetch_more_tokens(parser) { + return false + } + } + + // Fetch the next token from the queue. + *token = parser.tokens[parser.tokens_head] + parser.tokens_head++ + parser.tokens_parsed++ + parser.token_available = false + + if token.typ == yaml_STREAM_END_TOKEN { + parser.stream_end_produced = true + } + return true +} + +// Set the scanner error and return false. +func yaml_parser_set_scanner_error(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string) bool { + parser.error = yaml_SCANNER_ERROR + parser.context = context + parser.context_mark = context_mark + parser.problem = problem + parser.problem_mark = parser.mark + return false +} + +func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, context_mark yaml_mark_t, problem string) bool { + context := "while parsing a tag" + if directive { + context = "while parsing a %TAG directive" + } + return yaml_parser_set_scanner_error(parser, context, context_mark, problem) +} + +func trace(args ...interface{}) func() { + pargs := append([]interface{}{"+++"}, args...) + fmt.Println(pargs...) + pargs = append([]interface{}{"---"}, args...) + return func() { fmt.Println(pargs...) } +} + +// Ensure that the tokens queue contains at least one token which can be +// returned to the Parser. +func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool { + // While we need more tokens to fetch, do it. + for { + // [Go] The comment parsing logic requires a lookahead of two tokens + // so that foot comments may be parsed in time of associating them + // with the tokens that are parsed before them, and also for line + // comments to be transformed into head comments in some edge cases. + if parser.tokens_head < len(parser.tokens)-2 { + // If a potential simple key is at the head position, we need to fetch + // the next token to disambiguate it. + head_tok_idx, ok := parser.simple_keys_by_tok[parser.tokens_parsed] + if !ok { + break + } else if valid, ok := yaml_simple_key_is_valid(parser, &parser.simple_keys[head_tok_idx]); !ok { + return false + } else if !valid { + break + } + } + // Fetch the next token. + if !yaml_parser_fetch_next_token(parser) { + return false + } + } + + parser.token_available = true + return true +} + +// The dispatcher for token fetchers. +func yaml_parser_fetch_next_token(parser *yaml_parser_t) (ok bool) { + // Ensure that the buffer is initialized. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // Check if we just started scanning. Fetch STREAM-START then. + if !parser.stream_start_produced { + return yaml_parser_fetch_stream_start(parser) + } + + scan_mark := parser.mark + + // Eat whitespaces and comments until we reach the next token. + if !yaml_parser_scan_to_next_token(parser) { + return false + } + + // [Go] While unrolling indents, transform the head comments of prior + // indentation levels observed after scan_start into foot comments at + // the respective indexes. + + // Check the indentation level against the current column. + if !yaml_parser_unroll_indent(parser, parser.mark.column, scan_mark) { + return false + } + + // Ensure that the buffer contains at least 4 characters. 4 is the length + // of the longest indicators ('--- ' and '... '). + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + + // Is it the end of the stream? + if is_z(parser.buffer, parser.buffer_pos) { + return yaml_parser_fetch_stream_end(parser) + } + + // Is it a directive? + if parser.mark.column == 0 && parser.buffer[parser.buffer_pos] == '%' { + return yaml_parser_fetch_directive(parser) + } + + buf := parser.buffer + pos := parser.buffer_pos + + // Is it the document start indicator? + if parser.mark.column == 0 && buf[pos] == '-' && buf[pos+1] == '-' && buf[pos+2] == '-' && is_blankz(buf, pos+3) { + return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_START_TOKEN) + } + + // Is it the document end indicator? + if parser.mark.column == 0 && buf[pos] == '.' && buf[pos+1] == '.' && buf[pos+2] == '.' && is_blankz(buf, pos+3) { + return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_END_TOKEN) + } + + comment_mark := parser.mark + if len(parser.tokens) > 0 && (parser.flow_level == 0 && buf[pos] == ':' || parser.flow_level > 0 && buf[pos] == ',') { + // Associate any following comments with the prior token. + comment_mark = parser.tokens[len(parser.tokens)-1].start_mark + } + defer func() { + if !ok { + return + } + if len(parser.tokens) > 0 && parser.tokens[len(parser.tokens)-1].typ == yaml_BLOCK_ENTRY_TOKEN { + // Sequence indicators alone have no line comments. It becomes + // a head comment for whatever follows. + return + } + if !yaml_parser_scan_line_comment(parser, comment_mark) { + ok = false + return + } + }() + + // Is it the flow sequence start indicator? + if buf[pos] == '[' { + return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_SEQUENCE_START_TOKEN) + } + + // Is it the flow mapping start indicator? + if parser.buffer[parser.buffer_pos] == '{' { + return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_MAPPING_START_TOKEN) + } + + // Is it the flow sequence end indicator? + if parser.buffer[parser.buffer_pos] == ']' { + return yaml_parser_fetch_flow_collection_end(parser, + yaml_FLOW_SEQUENCE_END_TOKEN) + } + + // Is it the flow mapping end indicator? + if parser.buffer[parser.buffer_pos] == '}' { + return yaml_parser_fetch_flow_collection_end(parser, + yaml_FLOW_MAPPING_END_TOKEN) + } + + // Is it the flow entry indicator? + if parser.buffer[parser.buffer_pos] == ',' { + return yaml_parser_fetch_flow_entry(parser) + } + + // Is it the block entry indicator? + if parser.buffer[parser.buffer_pos] == '-' && is_blankz(parser.buffer, parser.buffer_pos+1) { + return yaml_parser_fetch_block_entry(parser) + } + + // Is it the key indicator? + if parser.buffer[parser.buffer_pos] == '?' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_key(parser) + } + + // Is it the value indicator? + if parser.buffer[parser.buffer_pos] == ':' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_value(parser) + } + + // Is it an alias? + if parser.buffer[parser.buffer_pos] == '*' { + return yaml_parser_fetch_anchor(parser, yaml_ALIAS_TOKEN) + } + + // Is it an anchor? + if parser.buffer[parser.buffer_pos] == '&' { + return yaml_parser_fetch_anchor(parser, yaml_ANCHOR_TOKEN) + } + + // Is it a tag? + if parser.buffer[parser.buffer_pos] == '!' { + return yaml_parser_fetch_tag(parser) + } + + // Is it a literal scalar? + if parser.buffer[parser.buffer_pos] == '|' && parser.flow_level == 0 { + return yaml_parser_fetch_block_scalar(parser, true) + } + + // Is it a folded scalar? + if parser.buffer[parser.buffer_pos] == '>' && parser.flow_level == 0 { + return yaml_parser_fetch_block_scalar(parser, false) + } + + // Is it a single-quoted scalar? + if parser.buffer[parser.buffer_pos] == '\'' { + return yaml_parser_fetch_flow_scalar(parser, true) + } + + // Is it a double-quoted scalar? + if parser.buffer[parser.buffer_pos] == '"' { + return yaml_parser_fetch_flow_scalar(parser, false) + } + + // Is it a plain scalar? + // + // A plain scalar may start with any non-blank characters except + // + // '-', '?', ':', ',', '[', ']', '{', '}', + // '#', '&', '*', '!', '|', '>', '\'', '\"', + // '%', '@', '`'. + // + // In the block context (and, for the '-' indicator, in the flow context + // too), it may also start with the characters + // + // '-', '?', ':' + // + // if it is followed by a non-space character. + // + // The last rule is more restrictive than the specification requires. + // [Go] TODO Make this logic more reasonable. + //switch parser.buffer[parser.buffer_pos] { + //case '-', '?', ':', ',', '?', '-', ',', ':', ']', '[', '}', '{', '&', '#', '!', '*', '>', '|', '"', '\'', '@', '%', '-', '`': + //} + if !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '-' || + parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':' || + parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '[' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || + parser.buffer[parser.buffer_pos] == '}' || parser.buffer[parser.buffer_pos] == '#' || + parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '*' || + parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '|' || + parser.buffer[parser.buffer_pos] == '>' || parser.buffer[parser.buffer_pos] == '\'' || + parser.buffer[parser.buffer_pos] == '"' || parser.buffer[parser.buffer_pos] == '%' || + parser.buffer[parser.buffer_pos] == '@' || parser.buffer[parser.buffer_pos] == '`') || + (parser.buffer[parser.buffer_pos] == '-' && !is_blank(parser.buffer, parser.buffer_pos+1)) || + (parser.flow_level == 0 && + (parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':') && + !is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_plain_scalar(parser) + } + + // If we don't determine the token type so far, it is an error. + return yaml_parser_set_scanner_error(parser, + "while scanning for the next token", parser.mark, + "found character that cannot start any token") +} + +func yaml_simple_key_is_valid(parser *yaml_parser_t, simple_key *yaml_simple_key_t) (valid, ok bool) { + if !simple_key.possible { + return false, true + } + + // The 1.2 specification says: + // + // "If the ? indicator is omitted, parsing needs to see past the + // implicit key to recognize it as such. To limit the amount of + // lookahead required, the “:” indicator must appear at most 1024 + // Unicode characters beyond the start of the key. In addition, the key + // is restricted to a single line." + // + if simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index { + // Check if the potential simple key to be removed is required. + if simple_key.required { + return false, yaml_parser_set_scanner_error(parser, + "while scanning a simple key", simple_key.mark, + "could not find expected ':'") + } + simple_key.possible = false + return false, true + } + return true, true +} + +// Check if a simple key may start at the current position and add it if +// needed. +func yaml_parser_save_simple_key(parser *yaml_parser_t) bool { + // A simple key is required at the current position if the scanner is in + // the block context and the current column coincides with the indentation + // level. + + required := parser.flow_level == 0 && parser.indent == parser.mark.column + + // + // If the current position may start a simple key, save it. + // + if parser.simple_key_allowed { + simple_key := yaml_simple_key_t{ + possible: true, + required: required, + token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), + mark: parser.mark, + } + + if !yaml_parser_remove_simple_key(parser) { + return false + } + parser.simple_keys[len(parser.simple_keys)-1] = simple_key + parser.simple_keys_by_tok[simple_key.token_number] = len(parser.simple_keys) - 1 + } + return true +} + +// Remove a potential simple key at the current flow level. +func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool { + i := len(parser.simple_keys) - 1 + if parser.simple_keys[i].possible { + // If the key is required, it is an error. + if parser.simple_keys[i].required { + return yaml_parser_set_scanner_error(parser, + "while scanning a simple key", parser.simple_keys[i].mark, + "could not find expected ':'") + } + // Remove the key from the stack. + parser.simple_keys[i].possible = false + delete(parser.simple_keys_by_tok, parser.simple_keys[i].token_number) + } + return true +} + +// max_flow_level limits the flow_level +const max_flow_level = 10000 + +// Increase the flow level and resize the simple key list if needed. +func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool { + // Reset the simple key on the next level. + parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{ + possible: false, + required: false, + token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), + mark: parser.mark, + }) + + // Increase the flow level. + parser.flow_level++ + if parser.flow_level > max_flow_level { + return yaml_parser_set_scanner_error(parser, + "while increasing flow level", parser.simple_keys[len(parser.simple_keys)-1].mark, + fmt.Sprintf("exceeded max depth of %d", max_flow_level)) + } + return true +} + +// Decrease the flow level. +func yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool { + if parser.flow_level > 0 { + parser.flow_level-- + last := len(parser.simple_keys) - 1 + delete(parser.simple_keys_by_tok, parser.simple_keys[last].token_number) + parser.simple_keys = parser.simple_keys[:last] + } + return true +} + +// max_indents limits the indents stack size +const max_indents = 10000 + +// Push the current indentation level to the stack and set the new level +// the current column is greater than the indentation level. In this case, +// append or insert the specified token into the token queue. +func yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, typ yaml_token_type_t, mark yaml_mark_t) bool { + // In the flow context, do nothing. + if parser.flow_level > 0 { + return true + } + + if parser.indent < column { + // Push the current indentation level to the stack and set the new + // indentation level. + parser.indents = append(parser.indents, parser.indent) + parser.indent = column + if len(parser.indents) > max_indents { + return yaml_parser_set_scanner_error(parser, + "while increasing indent level", parser.simple_keys[len(parser.simple_keys)-1].mark, + fmt.Sprintf("exceeded max depth of %d", max_indents)) + } + + // Create a token and insert it into the queue. + token := yaml_token_t{ + typ: typ, + start_mark: mark, + end_mark: mark, + } + if number > -1 { + number -= parser.tokens_parsed + } + yaml_insert_token(parser, number, &token) + } + return true +} + +// Pop indentation levels from the indents stack until the current level +// becomes less or equal to the column. For each indentation level, append +// the BLOCK-END token. +func yaml_parser_unroll_indent(parser *yaml_parser_t, column int, scan_mark yaml_mark_t) bool { + // In the flow context, do nothing. + if parser.flow_level > 0 { + return true + } + + block_mark := scan_mark + block_mark.index-- + + // Loop through the indentation levels in the stack. + for parser.indent > column { + + // [Go] Reposition the end token before potential following + // foot comments of parent blocks. For that, search + // backwards for recent comments that were at the same + // indent as the block that is ending now. + stop_index := block_mark.index + for i := len(parser.comments) - 1; i >= 0; i-- { + comment := &parser.comments[i] + + if comment.end_mark.index < stop_index { + // Don't go back beyond the start of the comment/whitespace scan, unless column < 0. + // If requested indent column is < 0, then the document is over and everything else + // is a foot anyway. + break + } + if comment.start_mark.column == parser.indent+1 { + // This is a good match. But maybe there's a former comment + // at that same indent level, so keep searching. + block_mark = comment.start_mark + } + + // While the end of the former comment matches with + // the start of the following one, we know there's + // nothing in between and scanning is still safe. + stop_index = comment.scan_mark.index + } + + // Create a token and append it to the queue. + token := yaml_token_t{ + typ: yaml_BLOCK_END_TOKEN, + start_mark: block_mark, + end_mark: block_mark, + } + yaml_insert_token(parser, -1, &token) + + // Pop the indentation level. + parser.indent = parser.indents[len(parser.indents)-1] + parser.indents = parser.indents[:len(parser.indents)-1] + } + return true +} + +// Initialize the scanner and produce the STREAM-START token. +func yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool { + + // Set the initial indentation. + parser.indent = -1 + + // Initialize the simple key stack. + parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) + + parser.simple_keys_by_tok = make(map[int]int) + + // A simple key is allowed at the beginning of the stream. + parser.simple_key_allowed = true + + // We have started. + parser.stream_start_produced = true + + // Create the STREAM-START token and append it to the queue. + token := yaml_token_t{ + typ: yaml_STREAM_START_TOKEN, + start_mark: parser.mark, + end_mark: parser.mark, + encoding: parser.encoding, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the STREAM-END token and shut down the scanner. +func yaml_parser_fetch_stream_end(parser *yaml_parser_t) bool { + + // Force new line. + if parser.mark.column != 0 { + parser.mark.column = 0 + parser.mark.line++ + } + + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1, parser.mark) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Create the STREAM-END token and append it to the queue. + token := yaml_token_t{ + typ: yaml_STREAM_END_TOKEN, + start_mark: parser.mark, + end_mark: parser.mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce a VERSION-DIRECTIVE or TAG-DIRECTIVE token. +func yaml_parser_fetch_directive(parser *yaml_parser_t) bool { + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1, parser.mark) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Create the YAML-DIRECTIVE or TAG-DIRECTIVE token. + token := yaml_token_t{} + if !yaml_parser_scan_directive(parser, &token) { + return false + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the DOCUMENT-START or DOCUMENT-END token. +func yaml_parser_fetch_document_indicator(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1, parser.mark) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Consume the token. + start_mark := parser.mark + + skip(parser) + skip(parser) + skip(parser) + + end_mark := parser.mark + + // Create the DOCUMENT-START or DOCUMENT-END token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token. +func yaml_parser_fetch_flow_collection_start(parser *yaml_parser_t, typ yaml_token_type_t) bool { + + // The indicators '[' and '{' may start a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // Increase the flow level. + if !yaml_parser_increase_flow_level(parser) { + return false + } + + // A simple key may follow the indicators '[' and '{'. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token. +func yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // Reset any potential simple key on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Decrease the flow level. + if !yaml_parser_decrease_flow_level(parser) { + return false + } + + // No simple keys after the indicators ']' and '}'. + parser.simple_key_allowed = false + + // Consume the token. + + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-ENTRY token. +func yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool { + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after ','. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-ENTRY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_FLOW_ENTRY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the BLOCK-ENTRY token. +func yaml_parser_fetch_block_entry(parser *yaml_parser_t) bool { + // Check if the scanner is in the block context. + if parser.flow_level == 0 { + // Check if we are allowed to start a new entry. + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "block sequence entries are not allowed in this context") + } + // Add the BLOCK-SEQUENCE-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_SEQUENCE_START_TOKEN, parser.mark) { + return false + } + } else { + // It is an error for the '-' indicator to occur in the flow context, + // but we let the Parser detect and report about it because the Parser + // is able to point to the context. + } + + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after '-'. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the BLOCK-ENTRY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_BLOCK_ENTRY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the KEY token. +func yaml_parser_fetch_key(parser *yaml_parser_t) bool { + + // In the block context, additional checks are required. + if parser.flow_level == 0 { + // Check if we are allowed to start a new key (not nessesary simple). + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "mapping keys are not allowed in this context") + } + // Add the BLOCK-MAPPING-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { + return false + } + } + + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after '?' in the block context. + parser.simple_key_allowed = parser.flow_level == 0 + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the KEY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_KEY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the VALUE token. +func yaml_parser_fetch_value(parser *yaml_parser_t) bool { + + simple_key := &parser.simple_keys[len(parser.simple_keys)-1] + + // Have we found a simple key? + if valid, ok := yaml_simple_key_is_valid(parser, simple_key); !ok { + return false + + } else if valid { + + // Create the KEY token and insert it into the queue. + token := yaml_token_t{ + typ: yaml_KEY_TOKEN, + start_mark: simple_key.mark, + end_mark: simple_key.mark, + } + yaml_insert_token(parser, simple_key.token_number-parser.tokens_parsed, &token) + + // In the block context, we may need to add the BLOCK-MAPPING-START token. + if !yaml_parser_roll_indent(parser, simple_key.mark.column, + simple_key.token_number, + yaml_BLOCK_MAPPING_START_TOKEN, simple_key.mark) { + return false + } + + // Remove the simple key. + simple_key.possible = false + delete(parser.simple_keys_by_tok, simple_key.token_number) + + // A simple key cannot follow another simple key. + parser.simple_key_allowed = false + + } else { + // The ':' indicator follows a complex key. + + // In the block context, extra checks are required. + if parser.flow_level == 0 { + + // Check if we are allowed to start a complex value. + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "mapping values are not allowed in this context") + } + + // Add the BLOCK-MAPPING-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { + return false + } + } + + // Simple keys after ':' are allowed in the block context. + parser.simple_key_allowed = parser.flow_level == 0 + } + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the VALUE token and append it to the queue. + token := yaml_token_t{ + typ: yaml_VALUE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the ALIAS or ANCHOR token. +func yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // An anchor or an alias could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow an anchor or an alias. + parser.simple_key_allowed = false + + // Create the ALIAS or ANCHOR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_anchor(parser, &token, typ) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the TAG token. +func yaml_parser_fetch_tag(parser *yaml_parser_t) bool { + // A tag could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a tag. + parser.simple_key_allowed = false + + // Create the TAG token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_tag(parser, &token) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens. +func yaml_parser_fetch_block_scalar(parser *yaml_parser_t, literal bool) bool { + // Remove any potential simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // A simple key may follow a block scalar. + parser.simple_key_allowed = true + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_block_scalar(parser, &token, literal) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens. +func yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) bool { + // A plain scalar could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a flow scalar. + parser.simple_key_allowed = false + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_flow_scalar(parser, &token, single) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,plain) token. +func yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool { + // A plain scalar could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a flow scalar. + parser.simple_key_allowed = false + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_plain_scalar(parser, &token) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Eat whitespaces and comments until the next token is found. +func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { + + scan_mark := parser.mark + + // Until the next token is not found. + for { + // Allow the BOM mark to start a line. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.mark.column == 0 && is_bom(parser.buffer, parser.buffer_pos) { + skip(parser) + } + + // Eat whitespaces. + // Tabs are allowed: + // - in the flow context + // - in the block context, but not at the beginning of the line or + // after '-', '?', or ':' (complex value). + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for parser.buffer[parser.buffer_pos] == ' ' || ((parser.flow_level > 0 || !parser.simple_key_allowed) && parser.buffer[parser.buffer_pos] == '\t') { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if we just had a line comment under a sequence entry that + // looks more like a header to the following content. Similar to this: + // + // - # The comment + // - Some data + // + // If so, transform the line comment to a head comment and reposition. + if len(parser.comments) > 0 && len(parser.tokens) > 1 { + tokenA := parser.tokens[len(parser.tokens)-2] + tokenB := parser.tokens[len(parser.tokens)-1] + comment := &parser.comments[len(parser.comments)-1] + if tokenA.typ == yaml_BLOCK_SEQUENCE_START_TOKEN && tokenB.typ == yaml_BLOCK_ENTRY_TOKEN && len(comment.line) > 0 && !is_break(parser.buffer, parser.buffer_pos) { + // If it was in the prior line, reposition so it becomes a + // header of the follow up token. Otherwise, keep it in place + // so it becomes a header of the former. + comment.head = comment.line + comment.line = nil + if comment.start_mark.line == parser.mark.line-1 { + comment.token_mark = parser.mark + } + } + } + + // Eat a comment until a line break. + if parser.buffer[parser.buffer_pos] == '#' { + if !yaml_parser_scan_comments(parser, scan_mark) { + return false + } + } + + // If it is a line break, eat it. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + + // In the block context, a new line may start a simple key. + if parser.flow_level == 0 { + parser.simple_key_allowed = true + } + } else { + break // We have found a token. + } + } + + return true +} + +// Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { + // Eat '%'. + start_mark := parser.mark + skip(parser) + + // Scan the directive name. + var name []byte + if !yaml_parser_scan_directive_name(parser, start_mark, &name) { + return false + } + + // Is it a YAML directive? + if bytes.Equal(name, []byte("YAML")) { + // Scan the VERSION directive value. + var major, minor int8 + if !yaml_parser_scan_version_directive_value(parser, start_mark, &major, &minor) { + return false + } + end_mark := parser.mark + + // Create a VERSION-DIRECTIVE token. + *token = yaml_token_t{ + typ: yaml_VERSION_DIRECTIVE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + major: major, + minor: minor, + } + + // Is it a TAG directive? + } else if bytes.Equal(name, []byte("TAG")) { + // Scan the TAG directive value. + var handle, prefix []byte + if !yaml_parser_scan_tag_directive_value(parser, start_mark, &handle, &prefix) { + return false + } + end_mark := parser.mark + + // Create a TAG-DIRECTIVE token. + *token = yaml_token_t{ + typ: yaml_TAG_DIRECTIVE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: handle, + prefix: prefix, + } + + // Unknown directive. + } else { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "found unknown directive name") + return false + } + + // Eat the rest of the line including any comments. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + if parser.buffer[parser.buffer_pos] == '#' { + // [Go] Discard this inline comment for the time being. + //if !yaml_parser_scan_line_comment(parser, start_mark) { + // return false + //} + for !is_breakz(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + } + + // Check if we are at the end of the line. + if !is_breakz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "did not find expected comment or line break") + return false + } + + // Eat a line break. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } + + return true +} + +// Scan the directive name. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ +// +func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { + // Consume the directive name. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + var s []byte + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the name is empty. + if len(s) == 0 { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "could not find expected directive name") + return false + } + + // Check for an blank character after the name. + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "found unexpected non-alphabetical character") + return false + } + *name = s + return true +} + +// Scan the value of VERSION-DIRECTIVE. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^^^^^^ +func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { + // Eat whitespaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Consume the major version number. + if !yaml_parser_scan_version_directive_number(parser, start_mark, major) { + return false + } + + // Eat '.'. + if parser.buffer[parser.buffer_pos] != '.' { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "did not find expected digit or '.' character") + } + + skip(parser) + + // Consume the minor version number. + if !yaml_parser_scan_version_directive_number(parser, start_mark, minor) { + return false + } + return true +} + +const max_number_length = 2 + +// Scan the version number of VERSION-DIRECTIVE. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ +func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { + + // Repeat while the next character is digit. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + var value, length int8 + for is_digit(parser.buffer, parser.buffer_pos) { + // Check if the number is too long. + length++ + if length > max_number_length { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "found extremely long version number") + } + value = value*10 + int8(as_digit(parser.buffer, parser.buffer_pos)) + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the number was present. + if length == 0 { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "did not find expected version number") + } + *number = value + return true +} + +// Scan the value of a TAG-DIRECTIVE token. +// +// Scope: +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { + var handle_value, prefix_value []byte + + // Eat whitespaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Scan a handle. + if !yaml_parser_scan_tag_handle(parser, true, start_mark, &handle_value) { + return false + } + + // Expect a whitespace. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blank(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", + start_mark, "did not find expected whitespace") + return false + } + + // Eat whitespaces. + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Scan a prefix. + if !yaml_parser_scan_tag_uri(parser, true, nil, start_mark, &prefix_value) { + return false + } + + // Expect a whitespace or line break. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", + start_mark, "did not find expected whitespace or line break") + return false + } + + *handle = handle_value + *prefix = prefix_value + return true +} + +func yaml_parser_scan_anchor(parser *yaml_parser_t, token *yaml_token_t, typ yaml_token_type_t) bool { + var s []byte + + // Eat the indicator character. + start_mark := parser.mark + skip(parser) + + // Consume the value. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + end_mark := parser.mark + + /* + * Check if length of the anchor is greater than 0 and it is followed by + * a whitespace character or one of the indicators: + * + * '?', ':', ',', ']', '}', '%', '@', '`'. + */ + + if len(s) == 0 || + !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '?' || + parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == ',' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '}' || + parser.buffer[parser.buffer_pos] == '%' || parser.buffer[parser.buffer_pos] == '@' || + parser.buffer[parser.buffer_pos] == '`') { + context := "while scanning an alias" + if typ == yaml_ANCHOR_TOKEN { + context = "while scanning an anchor" + } + yaml_parser_set_scanner_error(parser, context, start_mark, + "did not find expected alphabetic or numeric character") + return false + } + + // Create a token. + *token = yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + value: s, + } + + return true +} + +/* + * Scan a TAG token. + */ + +func yaml_parser_scan_tag(parser *yaml_parser_t, token *yaml_token_t) bool { + var handle, suffix []byte + + start_mark := parser.mark + + // Check if the tag is in the canonical form. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + if parser.buffer[parser.buffer_pos+1] == '<' { + // Keep the handle as '' + + // Eat '!<' + skip(parser) + skip(parser) + + // Consume the tag value. + if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { + return false + } + + // Check for '>' and eat it. + if parser.buffer[parser.buffer_pos] != '>' { + yaml_parser_set_scanner_error(parser, "while scanning a tag", + start_mark, "did not find the expected '>'") + return false + } + + skip(parser) + } else { + // The tag has either the '!suffix' or the '!handle!suffix' form. + + // First, try to scan a handle. + if !yaml_parser_scan_tag_handle(parser, false, start_mark, &handle) { + return false + } + + // Check if it is, indeed, handle. + if handle[0] == '!' && len(handle) > 1 && handle[len(handle)-1] == '!' { + // Scan the suffix now. + if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { + return false + } + } else { + // It wasn't a handle after all. Scan the rest of the tag. + if !yaml_parser_scan_tag_uri(parser, false, handle, start_mark, &suffix) { + return false + } + + // Set the handle to '!'. + handle = []byte{'!'} + + // A special case: the '!' tag. Set the handle to '' and the + // suffix to '!'. + if len(suffix) == 0 { + handle, suffix = suffix, handle + } + } + } + + // Check the character which ends the tag. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a tag", + start_mark, "did not find expected whitespace or line break") + return false + } + + end_mark := parser.mark + + // Create a token. + *token = yaml_token_t{ + typ: yaml_TAG_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: handle, + suffix: suffix, + } + return true +} + +// Scan a tag handle. +func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, handle *[]byte) bool { + // Check the initial '!' character. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.buffer[parser.buffer_pos] != '!' { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected '!'") + return false + } + + var s []byte + + // Copy the '!' character. + s = read(parser, s) + + // Copy all subsequent alphabetical and numerical characters. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the trailing character is '!' and copy it. + if parser.buffer[parser.buffer_pos] == '!' { + s = read(parser, s) + } else { + // It's either the '!' tag or not really a tag handle. If it's a %TAG + // directive, it's an error. If it's a tag token, it must be a part of URI. + if directive && string(s) != "!" { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected '!'") + return false + } + } + + *handle = s + return true +} + +// Scan a tag. +func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool { + //size_t length = head ? strlen((char *)head) : 0 + var s []byte + hasTag := len(head) > 0 + + // Copy the head if needed. + // + // Note that we don't copy the leading '!' character. + if len(head) > 1 { + s = append(s, head[1:]...) + } + + // Scan the tag. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // The set of characters that may appear in URI is as follows: + // + // '0'-'9', 'A'-'Z', 'a'-'z', '_', '-', ';', '/', '?', ':', '@', '&', + // '=', '+', '$', ',', '.', '!', '~', '*', '\'', '(', ')', '[', ']', + // '%'. + // [Go] TODO Convert this into more reasonable logic. + for is_alpha(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == ';' || + parser.buffer[parser.buffer_pos] == '/' || parser.buffer[parser.buffer_pos] == '?' || + parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == '@' || + parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '=' || + parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '$' || + parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '.' || + parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '~' || + parser.buffer[parser.buffer_pos] == '*' || parser.buffer[parser.buffer_pos] == '\'' || + parser.buffer[parser.buffer_pos] == '(' || parser.buffer[parser.buffer_pos] == ')' || + parser.buffer[parser.buffer_pos] == '[' || parser.buffer[parser.buffer_pos] == ']' || + parser.buffer[parser.buffer_pos] == '%' { + // Check if it is a URI-escape sequence. + if parser.buffer[parser.buffer_pos] == '%' { + if !yaml_parser_scan_uri_escapes(parser, directive, start_mark, &s) { + return false + } + } else { + s = read(parser, s) + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + hasTag = true + } + + if !hasTag { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected tag URI") + return false + } + *uri = s + return true +} + +// Decode an URI-escape sequence corresponding to a single UTF-8 character. +func yaml_parser_scan_uri_escapes(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, s *[]byte) bool { + + // Decode the required number of characters. + w := 1024 + for w > 0 { + // Check for a URI-escaped octet. + if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { + return false + } + + if !(parser.buffer[parser.buffer_pos] == '%' && + is_hex(parser.buffer, parser.buffer_pos+1) && + is_hex(parser.buffer, parser.buffer_pos+2)) { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find URI escaped octet") + } + + // Get the octet. + octet := byte((as_hex(parser.buffer, parser.buffer_pos+1) << 4) + as_hex(parser.buffer, parser.buffer_pos+2)) + + // If it is the leading octet, determine the length of the UTF-8 sequence. + if w == 1024 { + w = width(octet) + if w == 0 { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "found an incorrect leading UTF-8 octet") + } + } else { + // Check if the trailing octet is correct. + if octet&0xC0 != 0x80 { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "found an incorrect trailing UTF-8 octet") + } + } + + // Copy the octet and move the pointers. + *s = append(*s, octet) + skip(parser) + skip(parser) + skip(parser) + w-- + } + return true +} + +// Scan a block scalar. +func yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_token_t, literal bool) bool { + // Eat the indicator '|' or '>'. + start_mark := parser.mark + skip(parser) + + // Scan the additional block scalar indicators. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // Check for a chomping indicator. + var chomping, increment int + if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { + // Set the chomping method and eat the indicator. + if parser.buffer[parser.buffer_pos] == '+' { + chomping = +1 + } else { + chomping = -1 + } + skip(parser) + + // Check for an indentation indicator. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if is_digit(parser.buffer, parser.buffer_pos) { + // Check that the indentation is greater than 0. + if parser.buffer[parser.buffer_pos] == '0' { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found an indentation indicator equal to 0") + return false + } + + // Get the indentation level and eat the indicator. + increment = as_digit(parser.buffer, parser.buffer_pos) + skip(parser) + } + + } else if is_digit(parser.buffer, parser.buffer_pos) { + // Do the same as above, but in the opposite order. + + if parser.buffer[parser.buffer_pos] == '0' { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found an indentation indicator equal to 0") + return false + } + increment = as_digit(parser.buffer, parser.buffer_pos) + skip(parser) + + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { + if parser.buffer[parser.buffer_pos] == '+' { + chomping = +1 + } else { + chomping = -1 + } + skip(parser) + } + } + + // Eat whitespaces and comments to the end of the line. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + if parser.buffer[parser.buffer_pos] == '#' { + // TODO Test this and then re-enable it. + //if !yaml_parser_scan_line_comment(parser, start_mark) { + // return false + //} + for !is_breakz(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + } + + // Check if we are at the end of the line. + if !is_breakz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "did not find expected comment or line break") + return false + } + + // Eat a line break. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } + + end_mark := parser.mark + + // Set the indentation level if it was specified. + var indent int + if increment > 0 { + if parser.indent >= 0 { + indent = parser.indent + increment + } else { + indent = increment + } + } + + // Scan the leading line breaks and determine the indentation level if needed. + var s, leading_break, trailing_breaks []byte + if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { + return false + } + + // Scan the block scalar content. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + var leading_blank, trailing_blank bool + for parser.mark.column == indent && !is_z(parser.buffer, parser.buffer_pos) { + // We are at the beginning of a non-empty line. + + // Is it a trailing whitespace? + trailing_blank = is_blank(parser.buffer, parser.buffer_pos) + + // Check if we need to fold the leading line break. + if !literal && !leading_blank && !trailing_blank && len(leading_break) > 0 && leading_break[0] == '\n' { + // Do we need to join the lines by space? + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } + } else { + s = append(s, leading_break...) + } + leading_break = leading_break[:0] + + // Append the remaining line breaks. + s = append(s, trailing_breaks...) + trailing_breaks = trailing_breaks[:0] + + // Is it a leading whitespace? + leading_blank = is_blank(parser.buffer, parser.buffer_pos) + + // Consume the current line. + for !is_breakz(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Consume the line break. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + leading_break = read_line(parser, leading_break) + + // Eat the following indentation spaces and line breaks. + if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { + return false + } + } + + // Chomp the tail. + if chomping != -1 { + s = append(s, leading_break...) + } + if chomping == 1 { + s = append(s, trailing_breaks...) + } + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_LITERAL_SCALAR_STYLE, + } + if !literal { + token.style = yaml_FOLDED_SCALAR_STYLE + } + return true +} + +// Scan indentation spaces and line breaks for a block scalar. Determine the +// indentation level if needed. +func yaml_parser_scan_block_scalar_breaks(parser *yaml_parser_t, indent *int, breaks *[]byte, start_mark yaml_mark_t, end_mark *yaml_mark_t) bool { + *end_mark = parser.mark + + // Eat the indentation spaces and line breaks. + max_indent := 0 + for { + // Eat the indentation spaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for (*indent == 0 || parser.mark.column < *indent) && is_space(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + if parser.mark.column > max_indent { + max_indent = parser.mark.column + } + + // Check for a tab character messing the indentation. + if (*indent == 0 || parser.mark.column < *indent) && is_tab(parser.buffer, parser.buffer_pos) { + return yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found a tab character where an indentation space is expected") + } + + // Have we found a non-empty line? + if !is_break(parser.buffer, parser.buffer_pos) { + break + } + + // Consume the line break. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + // [Go] Should really be returning breaks instead. + *breaks = read_line(parser, *breaks) + *end_mark = parser.mark + } + + // Determine the indentation level if needed. + if *indent == 0 { + *indent = max_indent + if *indent < parser.indent+1 { + *indent = parser.indent + 1 + } + if *indent < 1 { + *indent = 1 + } + } + return true +} + +// Scan a quoted scalar. +func yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_token_t, single bool) bool { + // Eat the left quote. + start_mark := parser.mark + skip(parser) + + // Consume the content of the quoted scalar. + var s, leading_break, trailing_breaks, whitespaces []byte + for { + // Check that there are no document indicators at the beginning of the line. + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + + if parser.mark.column == 0 && + ((parser.buffer[parser.buffer_pos+0] == '-' && + parser.buffer[parser.buffer_pos+1] == '-' && + parser.buffer[parser.buffer_pos+2] == '-') || + (parser.buffer[parser.buffer_pos+0] == '.' && + parser.buffer[parser.buffer_pos+1] == '.' && + parser.buffer[parser.buffer_pos+2] == '.')) && + is_blankz(parser.buffer, parser.buffer_pos+3) { + yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", + start_mark, "found unexpected document indicator") + return false + } + + // Check for EOF. + if is_z(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", + start_mark, "found unexpected end of stream") + return false + } + + // Consume non-blank characters. + leading_blanks := false + for !is_blankz(parser.buffer, parser.buffer_pos) { + if single && parser.buffer[parser.buffer_pos] == '\'' && parser.buffer[parser.buffer_pos+1] == '\'' { + // Is is an escaped single quote. + s = append(s, '\'') + skip(parser) + skip(parser) + + } else if single && parser.buffer[parser.buffer_pos] == '\'' { + // It is a right single quote. + break + } else if !single && parser.buffer[parser.buffer_pos] == '"' { + // It is a right double quote. + break + + } else if !single && parser.buffer[parser.buffer_pos] == '\\' && is_break(parser.buffer, parser.buffer_pos+1) { + // It is an escaped line break. + if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { + return false + } + skip(parser) + skip_line(parser) + leading_blanks = true + break + + } else if !single && parser.buffer[parser.buffer_pos] == '\\' { + // It is an escape sequence. + code_length := 0 + + // Check the escape character. + switch parser.buffer[parser.buffer_pos+1] { + case '0': + s = append(s, 0) + case 'a': + s = append(s, '\x07') + case 'b': + s = append(s, '\x08') + case 't', '\t': + s = append(s, '\x09') + case 'n': + s = append(s, '\x0A') + case 'v': + s = append(s, '\x0B') + case 'f': + s = append(s, '\x0C') + case 'r': + s = append(s, '\x0D') + case 'e': + s = append(s, '\x1B') + case ' ': + s = append(s, '\x20') + case '"': + s = append(s, '"') + case '\'': + s = append(s, '\'') + case '\\': + s = append(s, '\\') + case 'N': // NEL (#x85) + s = append(s, '\xC2') + s = append(s, '\x85') + case '_': // #xA0 + s = append(s, '\xC2') + s = append(s, '\xA0') + case 'L': // LS (#x2028) + s = append(s, '\xE2') + s = append(s, '\x80') + s = append(s, '\xA8') + case 'P': // PS (#x2029) + s = append(s, '\xE2') + s = append(s, '\x80') + s = append(s, '\xA9') + case 'x': + code_length = 2 + case 'u': + code_length = 4 + case 'U': + code_length = 8 + default: + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "found unknown escape character") + return false + } + + skip(parser) + skip(parser) + + // Consume an arbitrary escape code. + if code_length > 0 { + var value int + + // Scan the character value. + if parser.unread < code_length && !yaml_parser_update_buffer(parser, code_length) { + return false + } + for k := 0; k < code_length; k++ { + if !is_hex(parser.buffer, parser.buffer_pos+k) { + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "did not find expected hexdecimal number") + return false + } + value = (value << 4) + as_hex(parser.buffer, parser.buffer_pos+k) + } + + // Check the value and write the character. + if (value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF { + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "found invalid Unicode character escape code") + return false + } + if value <= 0x7F { + s = append(s, byte(value)) + } else if value <= 0x7FF { + s = append(s, byte(0xC0+(value>>6))) + s = append(s, byte(0x80+(value&0x3F))) + } else if value <= 0xFFFF { + s = append(s, byte(0xE0+(value>>12))) + s = append(s, byte(0x80+((value>>6)&0x3F))) + s = append(s, byte(0x80+(value&0x3F))) + } else { + s = append(s, byte(0xF0+(value>>18))) + s = append(s, byte(0x80+((value>>12)&0x3F))) + s = append(s, byte(0x80+((value>>6)&0x3F))) + s = append(s, byte(0x80+(value&0x3F))) + } + + // Advance the pointer. + for k := 0; k < code_length; k++ { + skip(parser) + } + } + } else { + // It is a non-escaped non-blank character. + s = read(parser, s) + } + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + } + + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // Check if we are at the end of the scalar. + if single { + if parser.buffer[parser.buffer_pos] == '\'' { + break + } + } else { + if parser.buffer[parser.buffer_pos] == '"' { + break + } + } + + // Consume blank characters. + for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { + if is_blank(parser.buffer, parser.buffer_pos) { + // Consume a space or a tab character. + if !leading_blanks { + whitespaces = read(parser, whitespaces) + } else { + skip(parser) + } + } else { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + // Check if it is a first line break. + if !leading_blanks { + whitespaces = whitespaces[:0] + leading_break = read_line(parser, leading_break) + leading_blanks = true + } else { + trailing_breaks = read_line(parser, trailing_breaks) + } + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Join the whitespaces or fold line breaks. + if leading_blanks { + // Do we need to fold line breaks? + if len(leading_break) > 0 && leading_break[0] == '\n' { + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } else { + s = append(s, trailing_breaks...) + } + } else { + s = append(s, leading_break...) + s = append(s, trailing_breaks...) + } + trailing_breaks = trailing_breaks[:0] + leading_break = leading_break[:0] + } else { + s = append(s, whitespaces...) + whitespaces = whitespaces[:0] + } + } + + // Eat the right quote. + skip(parser) + end_mark := parser.mark + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_SINGLE_QUOTED_SCALAR_STYLE, + } + if !single { + token.style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + return true +} + +// Scan a plain scalar. +func yaml_parser_scan_plain_scalar(parser *yaml_parser_t, token *yaml_token_t) bool { + + var s, leading_break, trailing_breaks, whitespaces []byte + var leading_blanks bool + var indent = parser.indent + 1 + + start_mark := parser.mark + end_mark := parser.mark + + // Consume the content of the plain scalar. + for { + // Check for a document indicator. + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + if parser.mark.column == 0 && + ((parser.buffer[parser.buffer_pos+0] == '-' && + parser.buffer[parser.buffer_pos+1] == '-' && + parser.buffer[parser.buffer_pos+2] == '-') || + (parser.buffer[parser.buffer_pos+0] == '.' && + parser.buffer[parser.buffer_pos+1] == '.' && + parser.buffer[parser.buffer_pos+2] == '.')) && + is_blankz(parser.buffer, parser.buffer_pos+3) { + break + } + + // Check for a comment. + if parser.buffer[parser.buffer_pos] == '#' { + break + } + + // Consume non-blank characters. + for !is_blankz(parser.buffer, parser.buffer_pos) { + + // Check for indicators that may end a plain scalar. + if (parser.buffer[parser.buffer_pos] == ':' && is_blankz(parser.buffer, parser.buffer_pos+1)) || + (parser.flow_level > 0 && + (parser.buffer[parser.buffer_pos] == ',' || + parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == '[' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || + parser.buffer[parser.buffer_pos] == '}')) { + break + } + + // Check if we need to join whitespaces and breaks. + if leading_blanks || len(whitespaces) > 0 { + if leading_blanks { + // Do we need to fold line breaks? + if leading_break[0] == '\n' { + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } else { + s = append(s, trailing_breaks...) + } + } else { + s = append(s, leading_break...) + s = append(s, trailing_breaks...) + } + trailing_breaks = trailing_breaks[:0] + leading_break = leading_break[:0] + leading_blanks = false + } else { + s = append(s, whitespaces...) + whitespaces = whitespaces[:0] + } + } + + // Copy the character. + s = read(parser, s) + + end_mark = parser.mark + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + } + + // Is it the end? + if !(is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos)) { + break + } + + // Consume blank characters. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { + if is_blank(parser.buffer, parser.buffer_pos) { + + // Check for tab characters that abuse indentation. + if leading_blanks && parser.mark.column < indent && is_tab(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", + start_mark, "found a tab character that violates indentation") + return false + } + + // Consume a space or a tab character. + if !leading_blanks { + whitespaces = read(parser, whitespaces) + } else { + skip(parser) + } + } else { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + // Check if it is a first line break. + if !leading_blanks { + whitespaces = whitespaces[:0] + leading_break = read_line(parser, leading_break) + leading_blanks = true + } else { + trailing_breaks = read_line(parser, trailing_breaks) + } + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check indentation level. + if parser.flow_level == 0 && parser.mark.column < indent { + break + } + } + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_PLAIN_SCALAR_STYLE, + } + + // Note that we change the 'simple_key_allowed' flag. + if leading_blanks { + parser.simple_key_allowed = true + } + return true +} + +func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t) bool { + if parser.newlines > 0 { + return true + } + + var start_mark yaml_mark_t + var text []byte + + for peek := 0; peek < 512; peek++ { + if parser.unread < peek+1 && !yaml_parser_update_buffer(parser, peek+1) { + break + } + if is_blank(parser.buffer, parser.buffer_pos+peek) { + continue + } + if parser.buffer[parser.buffer_pos+peek] == '#' { + seen := parser.mark.index+peek + for { + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if is_breakz(parser.buffer, parser.buffer_pos) { + if parser.mark.index >= seen { + break + } + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } else if parser.mark.index >= seen { + if len(text) == 0 { + start_mark = parser.mark + } + text = read(parser, text) + } else { + skip(parser) + } + } + } + break + } + if len(text) > 0 { + parser.comments = append(parser.comments, yaml_comment_t{ + token_mark: token_mark, + start_mark: start_mark, + line: text, + }) + } + return true +} + +func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) bool { + token := parser.tokens[len(parser.tokens)-1] + + if token.typ == yaml_FLOW_ENTRY_TOKEN && len(parser.tokens) > 1 { + token = parser.tokens[len(parser.tokens)-2] + } + + var token_mark = token.start_mark + var start_mark yaml_mark_t + + var recent_empty = false + var first_empty = parser.newlines <= 1 + + var line = parser.mark.line + var column = parser.mark.column + + var text []byte + + // The foot line is the place where a comment must start to + // still be considered as a foot of the prior content. + // If there's some content in the currently parsed line, then + // the foot is the line below it. + var foot_line = -1 + if scan_mark.line > 0 { + foot_line = parser.mark.line-parser.newlines+1 + if parser.newlines == 0 && parser.mark.column > 1 { + foot_line++ + } + } + + var peek = 0 + for ; peek < 512; peek++ { + if parser.unread < peek+1 && !yaml_parser_update_buffer(parser, peek+1) { + break + } + column++ + if is_blank(parser.buffer, parser.buffer_pos+peek) { + continue + } + c := parser.buffer[parser.buffer_pos+peek] + if is_breakz(parser.buffer, parser.buffer_pos+peek) || parser.flow_level > 0 && (c == ']' || c == '}') { + // Got line break or terminator. + if !recent_empty { + if first_empty && (start_mark.line == foot_line || start_mark.column-1 < parser.indent) { + // This is the first empty line and there were no empty lines before, + // so this initial part of the comment is a foot of the prior token + // instead of being a head for the following one. Split it up. + if len(text) > 0 { + if start_mark.column-1 < parser.indent { + // If dedented it's unrelated to the prior token. + token_mark = start_mark + } + parser.comments = append(parser.comments, yaml_comment_t{ + scan_mark: scan_mark, + token_mark: token_mark, + start_mark: start_mark, + end_mark: yaml_mark_t{parser.mark.index + peek, line, column}, + foot: text, + }) + scan_mark = yaml_mark_t{parser.mark.index + peek, line, column} + token_mark = scan_mark + text = nil + } + } else { + if len(text) > 0 && parser.buffer[parser.buffer_pos+peek] != 0 { + text = append(text, '\n') + } + } + } + if !is_break(parser.buffer, parser.buffer_pos+peek) { + break + } + first_empty = false + recent_empty = true + column = 0 + line++ + continue + } + + if len(text) > 0 && column < parser.indent+1 && column != start_mark.column { + // The comment at the different indentation is a foot of the + // preceding data rather than a head of the upcoming one. + parser.comments = append(parser.comments, yaml_comment_t{ + scan_mark: scan_mark, + token_mark: token_mark, + start_mark: start_mark, + end_mark: yaml_mark_t{parser.mark.index + peek, line, column}, + foot: text, + }) + scan_mark = yaml_mark_t{parser.mark.index + peek, line, column} + token_mark = scan_mark + text = nil + } + + if parser.buffer[parser.buffer_pos+peek] != '#' { + break + } + + if len(text) == 0 { + start_mark = yaml_mark_t{parser.mark.index + peek, line, column} + } else { + text = append(text, '\n') + } + + recent_empty = false + + // Consume until after the consumed comment line. + seen := parser.mark.index+peek + for { + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if is_breakz(parser.buffer, parser.buffer_pos) { + if parser.mark.index >= seen { + break + } + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } else if parser.mark.index >= seen { + text = read(parser, text) + } else { + skip(parser) + } + } + + peek = 0 + column = 0 + line = parser.mark.line + } + + if len(text) > 0 { + parser.comments = append(parser.comments, yaml_comment_t{ + scan_mark: scan_mark, + token_mark: start_mark, + start_mark: start_mark, + end_mark: yaml_mark_t{parser.mark.index + peek - 1, line, column}, + head: text, + }) + } + return true +} diff --git a/vendor/gopkg.in/yaml.v3/sorter.go b/vendor/gopkg.in/yaml.v3/sorter.go new file mode 100644 index 00000000000..9210ece7e97 --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/sorter.go @@ -0,0 +1,134 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// +// 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 yaml + +import ( + "reflect" + "unicode" +) + +type keyList []reflect.Value + +func (l keyList) Len() int { return len(l) } +func (l keyList) Swap(i, j int) { l[i], l[j] = l[j], l[i] } +func (l keyList) Less(i, j int) bool { + a := l[i] + b := l[j] + ak := a.Kind() + bk := b.Kind() + for (ak == reflect.Interface || ak == reflect.Ptr) && !a.IsNil() { + a = a.Elem() + ak = a.Kind() + } + for (bk == reflect.Interface || bk == reflect.Ptr) && !b.IsNil() { + b = b.Elem() + bk = b.Kind() + } + af, aok := keyFloat(a) + bf, bok := keyFloat(b) + if aok && bok { + if af != bf { + return af < bf + } + if ak != bk { + return ak < bk + } + return numLess(a, b) + } + if ak != reflect.String || bk != reflect.String { + return ak < bk + } + ar, br := []rune(a.String()), []rune(b.String()) + digits := false + for i := 0; i < len(ar) && i < len(br); i++ { + if ar[i] == br[i] { + digits = unicode.IsDigit(ar[i]) + continue + } + al := unicode.IsLetter(ar[i]) + bl := unicode.IsLetter(br[i]) + if al && bl { + return ar[i] < br[i] + } + if al || bl { + if digits { + return al + } else { + return bl + } + } + var ai, bi int + var an, bn int64 + if ar[i] == '0' || br[i] == '0' { + for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { + if ar[j] != '0' { + an = 1 + bn = 1 + break + } + } + } + for ai = i; ai < len(ar) && unicode.IsDigit(ar[ai]); ai++ { + an = an*10 + int64(ar[ai]-'0') + } + for bi = i; bi < len(br) && unicode.IsDigit(br[bi]); bi++ { + bn = bn*10 + int64(br[bi]-'0') + } + if an != bn { + return an < bn + } + if ai != bi { + return ai < bi + } + return ar[i] < br[i] + } + return len(ar) < len(br) +} + +// keyFloat returns a float value for v if it is a number/bool +// and whether it is a number/bool or not. +func keyFloat(v reflect.Value) (f float64, ok bool) { + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return float64(v.Int()), true + case reflect.Float32, reflect.Float64: + return v.Float(), true + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return float64(v.Uint()), true + case reflect.Bool: + if v.Bool() { + return 1, true + } + return 0, true + } + return 0, false +} + +// numLess returns whether a < b. +// a and b must necessarily have the same kind. +func numLess(a, b reflect.Value) bool { + switch a.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return a.Int() < b.Int() + case reflect.Float32, reflect.Float64: + return a.Float() < b.Float() + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return a.Uint() < b.Uint() + case reflect.Bool: + return !a.Bool() && b.Bool() + } + panic("not a number") +} diff --git a/vendor/gopkg.in/yaml.v3/writerc.go b/vendor/gopkg.in/yaml.v3/writerc.go new file mode 100644 index 00000000000..b8a116bf9a2 --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/writerc.go @@ -0,0 +1,48 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +// Set the writer error and return false. +func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { + emitter.error = yaml_WRITER_ERROR + emitter.problem = problem + return false +} + +// Flush the output buffer. +func yaml_emitter_flush(emitter *yaml_emitter_t) bool { + if emitter.write_handler == nil { + panic("write handler not set") + } + + // Check if the buffer is empty. + if emitter.buffer_pos == 0 { + return true + } + + if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { + return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) + } + emitter.buffer_pos = 0 + return true +} diff --git a/vendor/gopkg.in/yaml.v3/yaml.go b/vendor/gopkg.in/yaml.v3/yaml.go new file mode 100644 index 00000000000..56e8a849031 --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/yaml.go @@ -0,0 +1,693 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// +// 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 yaml implements YAML support for the Go language. +// +// Source code and other details for the project are available at GitHub: +// +// https://github.com/go-yaml/yaml +// +package yaml + +import ( + "errors" + "fmt" + "io" + "reflect" + "strings" + "sync" + "unicode/utf8" +) + +// The Unmarshaler interface may be implemented by types to customize their +// behavior when being unmarshaled from a YAML document. +type Unmarshaler interface { + UnmarshalYAML(value *Node) error +} + +type obsoleteUnmarshaler interface { + UnmarshalYAML(unmarshal func(interface{}) error) error +} + +// The Marshaler interface may be implemented by types to customize their +// behavior when being marshaled into a YAML document. The returned value +// is marshaled in place of the original value implementing Marshaler. +// +// If an error is returned by MarshalYAML, the marshaling procedure stops +// and returns with the provided error. +type Marshaler interface { + MarshalYAML() (interface{}, error) +} + +// Unmarshal decodes the first document found within the in byte slice +// and assigns decoded values into the out value. +// +// Maps and pointers (to a struct, string, int, etc) are accepted as out +// values. If an internal pointer within a struct is not initialized, +// the yaml package will initialize it if necessary for unmarshalling +// the provided data. The out parameter must not be nil. +// +// The type of the decoded values should be compatible with the respective +// values in out. If one or more values cannot be decoded due to a type +// mismatches, decoding continues partially until the end of the YAML +// content, and a *yaml.TypeError is returned with details for all +// missed values. +// +// Struct fields are only unmarshalled if they are exported (have an +// upper case first letter), and are unmarshalled using the field name +// lowercased as the default key. Custom keys may be defined via the +// "yaml" name in the field tag: the content preceding the first comma +// is used as the key, and the following comma-separated options are +// used to tweak the marshalling process (see Marshal). +// Conflicting names result in a runtime error. +// +// For example: +// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// +// See the documentation of Marshal for the format of tags and a list of +// supported tag options. +// +func Unmarshal(in []byte, out interface{}) (err error) { + return unmarshal(in, out, false) +} + +// A Decoder reads and decodes YAML values from an input stream. +type Decoder struct { + parser *parser + knownFields bool +} + +// NewDecoder returns a new decoder that reads from r. +// +// The decoder introduces its own buffering and may read +// data from r beyond the YAML values requested. +func NewDecoder(r io.Reader) *Decoder { + return &Decoder{ + parser: newParserFromReader(r), + } +} + +// KnownFields ensures that the keys in decoded mappings to +// exist as fields in the struct being decoded into. +func (dec *Decoder) KnownFields(enable bool) { + dec.knownFields = enable +} + +// Decode reads the next YAML-encoded value from its input +// and stores it in the value pointed to by v. +// +// See the documentation for Unmarshal for details about the +// conversion of YAML into a Go value. +func (dec *Decoder) Decode(v interface{}) (err error) { + d := newDecoder() + d.knownFields = dec.knownFields + defer handleErr(&err) + node := dec.parser.parse() + if node == nil { + return io.EOF + } + out := reflect.ValueOf(v) + if out.Kind() == reflect.Ptr && !out.IsNil() { + out = out.Elem() + } + d.unmarshal(node, out) + if len(d.terrors) > 0 { + return &TypeError{d.terrors} + } + return nil +} + +// Decode decodes the node and stores its data into the value pointed to by v. +// +// See the documentation for Unmarshal for details about the +// conversion of YAML into a Go value. +func (n *Node) Decode(v interface{}) (err error) { + d := newDecoder() + defer handleErr(&err) + out := reflect.ValueOf(v) + if out.Kind() == reflect.Ptr && !out.IsNil() { + out = out.Elem() + } + d.unmarshal(n, out) + if len(d.terrors) > 0 { + return &TypeError{d.terrors} + } + return nil +} + +func unmarshal(in []byte, out interface{}, strict bool) (err error) { + defer handleErr(&err) + d := newDecoder() + p := newParser(in) + defer p.destroy() + node := p.parse() + if node != nil { + v := reflect.ValueOf(out) + if v.Kind() == reflect.Ptr && !v.IsNil() { + v = v.Elem() + } + d.unmarshal(node, v) + } + if len(d.terrors) > 0 { + return &TypeError{d.terrors} + } + return nil +} + +// Marshal serializes the value provided into a YAML document. The structure +// of the generated document will reflect the structure of the value itself. +// Maps and pointers (to struct, string, int, etc) are accepted as the in value. +// +// Struct fields are only marshalled if they are exported (have an upper case +// first letter), and are marshalled using the field name lowercased as the +// default key. Custom keys may be defined via the "yaml" name in the field +// tag: the content preceding the first comma is used as the key, and the +// following comma-separated options are used to tweak the marshalling process. +// Conflicting names result in a runtime error. +// +// The field tag format accepted is: +// +// `(...) yaml:"[][,[,]]" (...)` +// +// The following flags are currently supported: +// +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. +// +// flow Marshal using a flow style (useful for structs, +// sequences and maps). +// +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. +// +// In addition, if the key is "-", the field is ignored. +// +// For example: +// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" +// +func Marshal(in interface{}) (out []byte, err error) { + defer handleErr(&err) + e := newEncoder() + defer e.destroy() + e.marshalDoc("", reflect.ValueOf(in)) + e.finish() + out = e.out + return +} + +// An Encoder writes YAML values to an output stream. +type Encoder struct { + encoder *encoder +} + +// NewEncoder returns a new encoder that writes to w. +// The Encoder should be closed after use to flush all data +// to w. +func NewEncoder(w io.Writer) *Encoder { + return &Encoder{ + encoder: newEncoderWithWriter(w), + } +} + +// Encode writes the YAML encoding of v to the stream. +// If multiple items are encoded to the stream, the +// second and subsequent document will be preceded +// with a "---" document separator, but the first will not. +// +// See the documentation for Marshal for details about the conversion of Go +// values to YAML. +func (e *Encoder) Encode(v interface{}) (err error) { + defer handleErr(&err) + e.encoder.marshalDoc("", reflect.ValueOf(v)) + return nil +} + +// Encode encodes value v and stores its representation in n. +// +// See the documentation for Marshal for details about the +// conversion of Go values into YAML. +func (n *Node) Encode(v interface{}) (err error) { + defer handleErr(&err) + e := newEncoder() + defer e.destroy() + e.marshalDoc("", reflect.ValueOf(v)) + e.finish() + p := newParser(e.out) + p.textless = true + defer p.destroy() + doc := p.parse() + *n = *doc.Content[0] + return nil +} + +// SetIndent changes the used indentation used when encoding. +func (e *Encoder) SetIndent(spaces int) { + if spaces < 0 { + panic("yaml: cannot indent to a negative number of spaces") + } + e.encoder.indent = spaces +} + +// Close closes the encoder by writing any remaining data. +// It does not write a stream terminating string "...". +func (e *Encoder) Close() (err error) { + defer handleErr(&err) + e.encoder.finish() + return nil +} + +func handleErr(err *error) { + if v := recover(); v != nil { + if e, ok := v.(yamlError); ok { + *err = e.err + } else { + panic(v) + } + } +} + +type yamlError struct { + err error +} + +func fail(err error) { + panic(yamlError{err}) +} + +func failf(format string, args ...interface{}) { + panic(yamlError{fmt.Errorf("yaml: "+format, args...)}) +} + +// A TypeError is returned by Unmarshal when one or more fields in +// the YAML document cannot be properly decoded into the requested +// types. When this error is returned, the value is still +// unmarshaled partially. +type TypeError struct { + Errors []string +} + +func (e *TypeError) Error() string { + return fmt.Sprintf("yaml: unmarshal errors:\n %s", strings.Join(e.Errors, "\n ")) +} + +type Kind uint32 + +const ( + DocumentNode Kind = 1 << iota + SequenceNode + MappingNode + ScalarNode + AliasNode +) + +type Style uint32 + +const ( + TaggedStyle Style = 1 << iota + DoubleQuotedStyle + SingleQuotedStyle + LiteralStyle + FoldedStyle + FlowStyle +) + +// Node represents an element in the YAML document hierarchy. While documents +// are typically encoded and decoded into higher level types, such as structs +// and maps, Node is an intermediate representation that allows detailed +// control over the content being decoded or encoded. +// +// It's worth noting that although Node offers access into details such as +// line numbers, colums, and comments, the content when re-encoded will not +// have its original textual representation preserved. An effort is made to +// render the data plesantly, and to preserve comments near the data they +// describe, though. +// +// Values that make use of the Node type interact with the yaml package in the +// same way any other type would do, by encoding and decoding yaml data +// directly or indirectly into them. +// +// For example: +// +// var person struct { +// Name string +// Address yaml.Node +// } +// err := yaml.Unmarshal(data, &person) +// +// Or by itself: +// +// var person Node +// err := yaml.Unmarshal(data, &person) +// +type Node struct { + // Kind defines whether the node is a document, a mapping, a sequence, + // a scalar value, or an alias to another node. The specific data type of + // scalar nodes may be obtained via the ShortTag and LongTag methods. + Kind Kind + + // Style allows customizing the apperance of the node in the tree. + Style Style + + // Tag holds the YAML tag defining the data type for the value. + // When decoding, this field will always be set to the resolved tag, + // even when it wasn't explicitly provided in the YAML content. + // When encoding, if this field is unset the value type will be + // implied from the node properties, and if it is set, it will only + // be serialized into the representation if TaggedStyle is used or + // the implicit tag diverges from the provided one. + Tag string + + // Value holds the unescaped and unquoted represenation of the value. + Value string + + // Anchor holds the anchor name for this node, which allows aliases to point to it. + Anchor string + + // Alias holds the node that this alias points to. Only valid when Kind is AliasNode. + Alias *Node + + // Content holds contained nodes for documents, mappings, and sequences. + Content []*Node + + // HeadComment holds any comments in the lines preceding the node and + // not separated by an empty line. + HeadComment string + + // LineComment holds any comments at the end of the line where the node is in. + LineComment string + + // FootComment holds any comments following the node and before empty lines. + FootComment string + + // Line and Column hold the node position in the decoded YAML text. + // These fields are not respected when encoding the node. + Line int + Column int +} + +// IsZero returns whether the node has all of its fields unset. +func (n *Node) IsZero() bool { + return n.Kind == 0 && n.Style == 0 && n.Tag == "" && n.Value == "" && n.Anchor == "" && n.Alias == nil && n.Content == nil && + n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 +} + + +// LongTag returns the long form of the tag that indicates the data type for +// the node. If the Tag field isn't explicitly defined, one will be computed +// based on the node properties. +func (n *Node) LongTag() string { + return longTag(n.ShortTag()) +} + +// ShortTag returns the short form of the YAML tag that indicates data type for +// the node. If the Tag field isn't explicitly defined, one will be computed +// based on the node properties. +func (n *Node) ShortTag() string { + if n.indicatedString() { + return strTag + } + if n.Tag == "" || n.Tag == "!" { + switch n.Kind { + case MappingNode: + return mapTag + case SequenceNode: + return seqTag + case AliasNode: + if n.Alias != nil { + return n.Alias.ShortTag() + } + case ScalarNode: + tag, _ := resolve("", n.Value) + return tag + } + return "" + } + return shortTag(n.Tag) +} + +func (n *Node) indicatedString() bool { + return n.Kind == ScalarNode && + (shortTag(n.Tag) == strTag || + (n.Tag == "" || n.Tag == "!") && n.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0) +} + +// SetString is a convenience function that sets the node to a string value +// and defines its style in a pleasant way depending on its content. +func (n *Node) SetString(s string) { + n.Kind = ScalarNode + if utf8.ValidString(s) { + n.Value = s + n.Tag = strTag + } else { + n.Value = encodeBase64(s) + n.Tag = binaryTag + } + if strings.Contains(n.Value, "\n") { + n.Style = LiteralStyle + } +} + +// -------------------------------------------------------------------------- +// Maintain a mapping of keys to structure field indexes + +// The code in this section was copied from mgo/bson. + +// structInfo holds details for the serialization of fields of +// a given struct. +type structInfo struct { + FieldsMap map[string]fieldInfo + FieldsList []fieldInfo + + // InlineMap is the number of the field in the struct that + // contains an ,inline map, or -1 if there's none. + InlineMap int + + // InlineUnmarshalers holds indexes to inlined fields that + // contain unmarshaler values. + InlineUnmarshalers [][]int +} + +type fieldInfo struct { + Key string + Num int + OmitEmpty bool + Flow bool + // Id holds the unique field identifier, so we can cheaply + // check for field duplicates without maintaining an extra map. + Id int + + // Inline holds the field index if the field is part of an inlined struct. + Inline []int +} + +var structMap = make(map[reflect.Type]*structInfo) +var fieldMapMutex sync.RWMutex +var unmarshalerType reflect.Type + +func init() { + var v Unmarshaler + unmarshalerType = reflect.ValueOf(&v).Elem().Type() +} + +func getStructInfo(st reflect.Type) (*structInfo, error) { + fieldMapMutex.RLock() + sinfo, found := structMap[st] + fieldMapMutex.RUnlock() + if found { + return sinfo, nil + } + + n := st.NumField() + fieldsMap := make(map[string]fieldInfo) + fieldsList := make([]fieldInfo, 0, n) + inlineMap := -1 + inlineUnmarshalers := [][]int(nil) + for i := 0; i != n; i++ { + field := st.Field(i) + if field.PkgPath != "" && !field.Anonymous { + continue // Private field + } + + info := fieldInfo{Num: i} + + tag := field.Tag.Get("yaml") + if tag == "" && strings.Index(string(field.Tag), ":") < 0 { + tag = string(field.Tag) + } + if tag == "-" { + continue + } + + inline := false + fields := strings.Split(tag, ",") + if len(fields) > 1 { + for _, flag := range fields[1:] { + switch flag { + case "omitempty": + info.OmitEmpty = true + case "flow": + info.Flow = true + case "inline": + inline = true + default: + return nil, errors.New(fmt.Sprintf("unsupported flag %q in tag %q of type %s", flag, tag, st)) + } + } + tag = fields[0] + } + + if inline { + switch field.Type.Kind() { + case reflect.Map: + if inlineMap >= 0 { + return nil, errors.New("multiple ,inline maps in struct " + st.String()) + } + if field.Type.Key() != reflect.TypeOf("") { + return nil, errors.New("option ,inline needs a map with string keys in struct " + st.String()) + } + inlineMap = info.Num + case reflect.Struct, reflect.Ptr: + ftype := field.Type + for ftype.Kind() == reflect.Ptr { + ftype = ftype.Elem() + } + if ftype.Kind() != reflect.Struct { + return nil, errors.New("option ,inline may only be used on a struct or map field") + } + if reflect.PtrTo(ftype).Implements(unmarshalerType) { + inlineUnmarshalers = append(inlineUnmarshalers, []int{i}) + } else { + sinfo, err := getStructInfo(ftype) + if err != nil { + return nil, err + } + for _, index := range sinfo.InlineUnmarshalers { + inlineUnmarshalers = append(inlineUnmarshalers, append([]int{i}, index...)) + } + for _, finfo := range sinfo.FieldsList { + if _, found := fieldsMap[finfo.Key]; found { + msg := "duplicated key '" + finfo.Key + "' in struct " + st.String() + return nil, errors.New(msg) + } + if finfo.Inline == nil { + finfo.Inline = []int{i, finfo.Num} + } else { + finfo.Inline = append([]int{i}, finfo.Inline...) + } + finfo.Id = len(fieldsList) + fieldsMap[finfo.Key] = finfo + fieldsList = append(fieldsList, finfo) + } + } + default: + return nil, errors.New("option ,inline may only be used on a struct or map field") + } + continue + } + + if tag != "" { + info.Key = tag + } else { + info.Key = strings.ToLower(field.Name) + } + + if _, found = fieldsMap[info.Key]; found { + msg := "duplicated key '" + info.Key + "' in struct " + st.String() + return nil, errors.New(msg) + } + + info.Id = len(fieldsList) + fieldsList = append(fieldsList, info) + fieldsMap[info.Key] = info + } + + sinfo = &structInfo{ + FieldsMap: fieldsMap, + FieldsList: fieldsList, + InlineMap: inlineMap, + InlineUnmarshalers: inlineUnmarshalers, + } + + fieldMapMutex.Lock() + structMap[st] = sinfo + fieldMapMutex.Unlock() + return sinfo, nil +} + +// IsZeroer is used to check whether an object is zero to +// determine whether it should be omitted when marshaling +// with the omitempty flag. One notable implementation +// is time.Time. +type IsZeroer interface { + IsZero() bool +} + +func isZero(v reflect.Value) bool { + kind := v.Kind() + if z, ok := v.Interface().(IsZeroer); ok { + if (kind == reflect.Ptr || kind == reflect.Interface) && v.IsNil() { + return true + } + return z.IsZero() + } + switch kind { + case reflect.String: + return len(v.String()) == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + case reflect.Slice: + return v.Len() == 0 + case reflect.Map: + return v.Len() == 0 + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Struct: + vt := v.Type() + for i := v.NumField() - 1; i >= 0; i-- { + if vt.Field(i).PkgPath != "" { + continue // Private field + } + if !isZero(v.Field(i)) { + return false + } + } + return true + } + return false +} diff --git a/vendor/gopkg.in/yaml.v3/yamlh.go b/vendor/gopkg.in/yaml.v3/yamlh.go new file mode 100644 index 00000000000..7c6d0077061 --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/yamlh.go @@ -0,0 +1,807 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +import ( + "fmt" + "io" +) + +// The version directive data. +type yaml_version_directive_t struct { + major int8 // The major version number. + minor int8 // The minor version number. +} + +// The tag directive data. +type yaml_tag_directive_t struct { + handle []byte // The tag handle. + prefix []byte // The tag prefix. +} + +type yaml_encoding_t int + +// The stream encoding. +const ( + // Let the parser choose the encoding. + yaml_ANY_ENCODING yaml_encoding_t = iota + + yaml_UTF8_ENCODING // The default UTF-8 encoding. + yaml_UTF16LE_ENCODING // The UTF-16-LE encoding with BOM. + yaml_UTF16BE_ENCODING // The UTF-16-BE encoding with BOM. +) + +type yaml_break_t int + +// Line break types. +const ( + // Let the parser choose the break type. + yaml_ANY_BREAK yaml_break_t = iota + + yaml_CR_BREAK // Use CR for line breaks (Mac style). + yaml_LN_BREAK // Use LN for line breaks (Unix style). + yaml_CRLN_BREAK // Use CR LN for line breaks (DOS style). +) + +type yaml_error_type_t int + +// Many bad things could happen with the parser and emitter. +const ( + // No error is produced. + yaml_NO_ERROR yaml_error_type_t = iota + + yaml_MEMORY_ERROR // Cannot allocate or reallocate a block of memory. + yaml_READER_ERROR // Cannot read or decode the input stream. + yaml_SCANNER_ERROR // Cannot scan the input stream. + yaml_PARSER_ERROR // Cannot parse the input stream. + yaml_COMPOSER_ERROR // Cannot compose a YAML document. + yaml_WRITER_ERROR // Cannot write to the output stream. + yaml_EMITTER_ERROR // Cannot emit a YAML stream. +) + +// The pointer position. +type yaml_mark_t struct { + index int // The position index. + line int // The position line. + column int // The position column. +} + +// Node Styles + +type yaml_style_t int8 + +type yaml_scalar_style_t yaml_style_t + +// Scalar styles. +const ( + // Let the emitter choose the style. + yaml_ANY_SCALAR_STYLE yaml_scalar_style_t = 0 + + yaml_PLAIN_SCALAR_STYLE yaml_scalar_style_t = 1 << iota // The plain scalar style. + yaml_SINGLE_QUOTED_SCALAR_STYLE // The single-quoted scalar style. + yaml_DOUBLE_QUOTED_SCALAR_STYLE // The double-quoted scalar style. + yaml_LITERAL_SCALAR_STYLE // The literal scalar style. + yaml_FOLDED_SCALAR_STYLE // The folded scalar style. +) + +type yaml_sequence_style_t yaml_style_t + +// Sequence styles. +const ( + // Let the emitter choose the style. + yaml_ANY_SEQUENCE_STYLE yaml_sequence_style_t = iota + + yaml_BLOCK_SEQUENCE_STYLE // The block sequence style. + yaml_FLOW_SEQUENCE_STYLE // The flow sequence style. +) + +type yaml_mapping_style_t yaml_style_t + +// Mapping styles. +const ( + // Let the emitter choose the style. + yaml_ANY_MAPPING_STYLE yaml_mapping_style_t = iota + + yaml_BLOCK_MAPPING_STYLE // The block mapping style. + yaml_FLOW_MAPPING_STYLE // The flow mapping style. +) + +// Tokens + +type yaml_token_type_t int + +// Token types. +const ( + // An empty token. + yaml_NO_TOKEN yaml_token_type_t = iota + + yaml_STREAM_START_TOKEN // A STREAM-START token. + yaml_STREAM_END_TOKEN // A STREAM-END token. + + yaml_VERSION_DIRECTIVE_TOKEN // A VERSION-DIRECTIVE token. + yaml_TAG_DIRECTIVE_TOKEN // A TAG-DIRECTIVE token. + yaml_DOCUMENT_START_TOKEN // A DOCUMENT-START token. + yaml_DOCUMENT_END_TOKEN // A DOCUMENT-END token. + + yaml_BLOCK_SEQUENCE_START_TOKEN // A BLOCK-SEQUENCE-START token. + yaml_BLOCK_MAPPING_START_TOKEN // A BLOCK-SEQUENCE-END token. + yaml_BLOCK_END_TOKEN // A BLOCK-END token. + + yaml_FLOW_SEQUENCE_START_TOKEN // A FLOW-SEQUENCE-START token. + yaml_FLOW_SEQUENCE_END_TOKEN // A FLOW-SEQUENCE-END token. + yaml_FLOW_MAPPING_START_TOKEN // A FLOW-MAPPING-START token. + yaml_FLOW_MAPPING_END_TOKEN // A FLOW-MAPPING-END token. + + yaml_BLOCK_ENTRY_TOKEN // A BLOCK-ENTRY token. + yaml_FLOW_ENTRY_TOKEN // A FLOW-ENTRY token. + yaml_KEY_TOKEN // A KEY token. + yaml_VALUE_TOKEN // A VALUE token. + + yaml_ALIAS_TOKEN // An ALIAS token. + yaml_ANCHOR_TOKEN // An ANCHOR token. + yaml_TAG_TOKEN // A TAG token. + yaml_SCALAR_TOKEN // A SCALAR token. +) + +func (tt yaml_token_type_t) String() string { + switch tt { + case yaml_NO_TOKEN: + return "yaml_NO_TOKEN" + case yaml_STREAM_START_TOKEN: + return "yaml_STREAM_START_TOKEN" + case yaml_STREAM_END_TOKEN: + return "yaml_STREAM_END_TOKEN" + case yaml_VERSION_DIRECTIVE_TOKEN: + return "yaml_VERSION_DIRECTIVE_TOKEN" + case yaml_TAG_DIRECTIVE_TOKEN: + return "yaml_TAG_DIRECTIVE_TOKEN" + case yaml_DOCUMENT_START_TOKEN: + return "yaml_DOCUMENT_START_TOKEN" + case yaml_DOCUMENT_END_TOKEN: + return "yaml_DOCUMENT_END_TOKEN" + case yaml_BLOCK_SEQUENCE_START_TOKEN: + return "yaml_BLOCK_SEQUENCE_START_TOKEN" + case yaml_BLOCK_MAPPING_START_TOKEN: + return "yaml_BLOCK_MAPPING_START_TOKEN" + case yaml_BLOCK_END_TOKEN: + return "yaml_BLOCK_END_TOKEN" + case yaml_FLOW_SEQUENCE_START_TOKEN: + return "yaml_FLOW_SEQUENCE_START_TOKEN" + case yaml_FLOW_SEQUENCE_END_TOKEN: + return "yaml_FLOW_SEQUENCE_END_TOKEN" + case yaml_FLOW_MAPPING_START_TOKEN: + return "yaml_FLOW_MAPPING_START_TOKEN" + case yaml_FLOW_MAPPING_END_TOKEN: + return "yaml_FLOW_MAPPING_END_TOKEN" + case yaml_BLOCK_ENTRY_TOKEN: + return "yaml_BLOCK_ENTRY_TOKEN" + case yaml_FLOW_ENTRY_TOKEN: + return "yaml_FLOW_ENTRY_TOKEN" + case yaml_KEY_TOKEN: + return "yaml_KEY_TOKEN" + case yaml_VALUE_TOKEN: + return "yaml_VALUE_TOKEN" + case yaml_ALIAS_TOKEN: + return "yaml_ALIAS_TOKEN" + case yaml_ANCHOR_TOKEN: + return "yaml_ANCHOR_TOKEN" + case yaml_TAG_TOKEN: + return "yaml_TAG_TOKEN" + case yaml_SCALAR_TOKEN: + return "yaml_SCALAR_TOKEN" + } + return "" +} + +// The token structure. +type yaml_token_t struct { + // The token type. + typ yaml_token_type_t + + // The start/end of the token. + start_mark, end_mark yaml_mark_t + + // The stream encoding (for yaml_STREAM_START_TOKEN). + encoding yaml_encoding_t + + // The alias/anchor/scalar value or tag/tag directive handle + // (for yaml_ALIAS_TOKEN, yaml_ANCHOR_TOKEN, yaml_SCALAR_TOKEN, yaml_TAG_TOKEN, yaml_TAG_DIRECTIVE_TOKEN). + value []byte + + // The tag suffix (for yaml_TAG_TOKEN). + suffix []byte + + // The tag directive prefix (for yaml_TAG_DIRECTIVE_TOKEN). + prefix []byte + + // The scalar style (for yaml_SCALAR_TOKEN). + style yaml_scalar_style_t + + // The version directive major/minor (for yaml_VERSION_DIRECTIVE_TOKEN). + major, minor int8 +} + +// Events + +type yaml_event_type_t int8 + +// Event types. +const ( + // An empty event. + yaml_NO_EVENT yaml_event_type_t = iota + + yaml_STREAM_START_EVENT // A STREAM-START event. + yaml_STREAM_END_EVENT // A STREAM-END event. + yaml_DOCUMENT_START_EVENT // A DOCUMENT-START event. + yaml_DOCUMENT_END_EVENT // A DOCUMENT-END event. + yaml_ALIAS_EVENT // An ALIAS event. + yaml_SCALAR_EVENT // A SCALAR event. + yaml_SEQUENCE_START_EVENT // A SEQUENCE-START event. + yaml_SEQUENCE_END_EVENT // A SEQUENCE-END event. + yaml_MAPPING_START_EVENT // A MAPPING-START event. + yaml_MAPPING_END_EVENT // A MAPPING-END event. + yaml_TAIL_COMMENT_EVENT +) + +var eventStrings = []string{ + yaml_NO_EVENT: "none", + yaml_STREAM_START_EVENT: "stream start", + yaml_STREAM_END_EVENT: "stream end", + yaml_DOCUMENT_START_EVENT: "document start", + yaml_DOCUMENT_END_EVENT: "document end", + yaml_ALIAS_EVENT: "alias", + yaml_SCALAR_EVENT: "scalar", + yaml_SEQUENCE_START_EVENT: "sequence start", + yaml_SEQUENCE_END_EVENT: "sequence end", + yaml_MAPPING_START_EVENT: "mapping start", + yaml_MAPPING_END_EVENT: "mapping end", + yaml_TAIL_COMMENT_EVENT: "tail comment", +} + +func (e yaml_event_type_t) String() string { + if e < 0 || int(e) >= len(eventStrings) { + return fmt.Sprintf("unknown event %d", e) + } + return eventStrings[e] +} + +// The event structure. +type yaml_event_t struct { + + // The event type. + typ yaml_event_type_t + + // The start and end of the event. + start_mark, end_mark yaml_mark_t + + // The document encoding (for yaml_STREAM_START_EVENT). + encoding yaml_encoding_t + + // The version directive (for yaml_DOCUMENT_START_EVENT). + version_directive *yaml_version_directive_t + + // The list of tag directives (for yaml_DOCUMENT_START_EVENT). + tag_directives []yaml_tag_directive_t + + // The comments + head_comment []byte + line_comment []byte + foot_comment []byte + tail_comment []byte + + // The anchor (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_ALIAS_EVENT). + anchor []byte + + // The tag (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). + tag []byte + + // The scalar value (for yaml_SCALAR_EVENT). + value []byte + + // Is the document start/end indicator implicit, or the tag optional? + // (for yaml_DOCUMENT_START_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_SCALAR_EVENT). + implicit bool + + // Is the tag optional for any non-plain style? (for yaml_SCALAR_EVENT). + quoted_implicit bool + + // The style (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). + style yaml_style_t +} + +func (e *yaml_event_t) scalar_style() yaml_scalar_style_t { return yaml_scalar_style_t(e.style) } +func (e *yaml_event_t) sequence_style() yaml_sequence_style_t { return yaml_sequence_style_t(e.style) } +func (e *yaml_event_t) mapping_style() yaml_mapping_style_t { return yaml_mapping_style_t(e.style) } + +// Nodes + +const ( + yaml_NULL_TAG = "tag:yaml.org,2002:null" // The tag !!null with the only possible value: null. + yaml_BOOL_TAG = "tag:yaml.org,2002:bool" // The tag !!bool with the values: true and false. + yaml_STR_TAG = "tag:yaml.org,2002:str" // The tag !!str for string values. + yaml_INT_TAG = "tag:yaml.org,2002:int" // The tag !!int for integer values. + yaml_FLOAT_TAG = "tag:yaml.org,2002:float" // The tag !!float for float values. + yaml_TIMESTAMP_TAG = "tag:yaml.org,2002:timestamp" // The tag !!timestamp for date and time values. + + yaml_SEQ_TAG = "tag:yaml.org,2002:seq" // The tag !!seq is used to denote sequences. + yaml_MAP_TAG = "tag:yaml.org,2002:map" // The tag !!map is used to denote mapping. + + // Not in original libyaml. + yaml_BINARY_TAG = "tag:yaml.org,2002:binary" + yaml_MERGE_TAG = "tag:yaml.org,2002:merge" + + yaml_DEFAULT_SCALAR_TAG = yaml_STR_TAG // The default scalar tag is !!str. + yaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG // The default sequence tag is !!seq. + yaml_DEFAULT_MAPPING_TAG = yaml_MAP_TAG // The default mapping tag is !!map. +) + +type yaml_node_type_t int + +// Node types. +const ( + // An empty node. + yaml_NO_NODE yaml_node_type_t = iota + + yaml_SCALAR_NODE // A scalar node. + yaml_SEQUENCE_NODE // A sequence node. + yaml_MAPPING_NODE // A mapping node. +) + +// An element of a sequence node. +type yaml_node_item_t int + +// An element of a mapping node. +type yaml_node_pair_t struct { + key int // The key of the element. + value int // The value of the element. +} + +// The node structure. +type yaml_node_t struct { + typ yaml_node_type_t // The node type. + tag []byte // The node tag. + + // The node data. + + // The scalar parameters (for yaml_SCALAR_NODE). + scalar struct { + value []byte // The scalar value. + length int // The length of the scalar value. + style yaml_scalar_style_t // The scalar style. + } + + // The sequence parameters (for YAML_SEQUENCE_NODE). + sequence struct { + items_data []yaml_node_item_t // The stack of sequence items. + style yaml_sequence_style_t // The sequence style. + } + + // The mapping parameters (for yaml_MAPPING_NODE). + mapping struct { + pairs_data []yaml_node_pair_t // The stack of mapping pairs (key, value). + pairs_start *yaml_node_pair_t // The beginning of the stack. + pairs_end *yaml_node_pair_t // The end of the stack. + pairs_top *yaml_node_pair_t // The top of the stack. + style yaml_mapping_style_t // The mapping style. + } + + start_mark yaml_mark_t // The beginning of the node. + end_mark yaml_mark_t // The end of the node. + +} + +// The document structure. +type yaml_document_t struct { + + // The document nodes. + nodes []yaml_node_t + + // The version directive. + version_directive *yaml_version_directive_t + + // The list of tag directives. + tag_directives_data []yaml_tag_directive_t + tag_directives_start int // The beginning of the tag directives list. + tag_directives_end int // The end of the tag directives list. + + start_implicit int // Is the document start indicator implicit? + end_implicit int // Is the document end indicator implicit? + + // The start/end of the document. + start_mark, end_mark yaml_mark_t +} + +// The prototype of a read handler. +// +// The read handler is called when the parser needs to read more bytes from the +// source. The handler should write not more than size bytes to the buffer. +// The number of written bytes should be set to the size_read variable. +// +// [in,out] data A pointer to an application data specified by +// yaml_parser_set_input(). +// [out] buffer The buffer to write the data from the source. +// [in] size The size of the buffer. +// [out] size_read The actual number of bytes read from the source. +// +// On success, the handler should return 1. If the handler failed, +// the returned value should be 0. On EOF, the handler should set the +// size_read to 0 and return 1. +type yaml_read_handler_t func(parser *yaml_parser_t, buffer []byte) (n int, err error) + +// This structure holds information about a potential simple key. +type yaml_simple_key_t struct { + possible bool // Is a simple key possible? + required bool // Is a simple key required? + token_number int // The number of the token. + mark yaml_mark_t // The position mark. +} + +// The states of the parser. +type yaml_parser_state_t int + +const ( + yaml_PARSE_STREAM_START_STATE yaml_parser_state_t = iota + + yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE // Expect the beginning of an implicit document. + yaml_PARSE_DOCUMENT_START_STATE // Expect DOCUMENT-START. + yaml_PARSE_DOCUMENT_CONTENT_STATE // Expect the content of a document. + yaml_PARSE_DOCUMENT_END_STATE // Expect DOCUMENT-END. + yaml_PARSE_BLOCK_NODE_STATE // Expect a block node. + yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE // Expect a block node or indentless sequence. + yaml_PARSE_FLOW_NODE_STATE // Expect a flow node. + yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a block sequence. + yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE // Expect an entry of a block sequence. + yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE // Expect an entry of an indentless sequence. + yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. + yaml_PARSE_BLOCK_MAPPING_KEY_STATE // Expect a block mapping key. + yaml_PARSE_BLOCK_MAPPING_VALUE_STATE // Expect a block mapping value. + yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a flow sequence. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE // Expect an entry of a flow sequence. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE // Expect a key of an ordered mapping. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE // Expect a value of an ordered mapping. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE // Expect the and of an ordered mapping entry. + yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. + yaml_PARSE_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. + yaml_PARSE_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. + yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE // Expect an empty value of a flow mapping. + yaml_PARSE_END_STATE // Expect nothing. +) + +func (ps yaml_parser_state_t) String() string { + switch ps { + case yaml_PARSE_STREAM_START_STATE: + return "yaml_PARSE_STREAM_START_STATE" + case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: + return "yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE" + case yaml_PARSE_DOCUMENT_START_STATE: + return "yaml_PARSE_DOCUMENT_START_STATE" + case yaml_PARSE_DOCUMENT_CONTENT_STATE: + return "yaml_PARSE_DOCUMENT_CONTENT_STATE" + case yaml_PARSE_DOCUMENT_END_STATE: + return "yaml_PARSE_DOCUMENT_END_STATE" + case yaml_PARSE_BLOCK_NODE_STATE: + return "yaml_PARSE_BLOCK_NODE_STATE" + case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: + return "yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE" + case yaml_PARSE_FLOW_NODE_STATE: + return "yaml_PARSE_FLOW_NODE_STATE" + case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: + return "yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE" + case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: + return "yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE" + case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: + return "yaml_PARSE_BLOCK_MAPPING_KEY_STATE" + case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: + return "yaml_PARSE_BLOCK_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE" + case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: + return "yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE" + case yaml_PARSE_FLOW_MAPPING_KEY_STATE: + return "yaml_PARSE_FLOW_MAPPING_KEY_STATE" + case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: + return "yaml_PARSE_FLOW_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: + return "yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE" + case yaml_PARSE_END_STATE: + return "yaml_PARSE_END_STATE" + } + return "" +} + +// This structure holds aliases data. +type yaml_alias_data_t struct { + anchor []byte // The anchor. + index int // The node id. + mark yaml_mark_t // The anchor mark. +} + +// The parser structure. +// +// All members are internal. Manage the structure using the +// yaml_parser_ family of functions. +type yaml_parser_t struct { + + // Error handling + + error yaml_error_type_t // Error type. + + problem string // Error description. + + // The byte about which the problem occurred. + problem_offset int + problem_value int + problem_mark yaml_mark_t + + // The error context. + context string + context_mark yaml_mark_t + + // Reader stuff + + read_handler yaml_read_handler_t // Read handler. + + input_reader io.Reader // File input data. + input []byte // String input data. + input_pos int + + eof bool // EOF flag + + buffer []byte // The working buffer. + buffer_pos int // The current position of the buffer. + + unread int // The number of unread characters in the buffer. + + newlines int // The number of line breaks since last non-break/non-blank character + + raw_buffer []byte // The raw buffer. + raw_buffer_pos int // The current position of the buffer. + + encoding yaml_encoding_t // The input encoding. + + offset int // The offset of the current position (in bytes). + mark yaml_mark_t // The mark of the current position. + + // Comments + + head_comment []byte // The current head comments + line_comment []byte // The current line comments + foot_comment []byte // The current foot comments + tail_comment []byte // Foot comment that happens at the end of a block. + stem_comment []byte // Comment in item preceding a nested structure (list inside list item, etc) + + comments []yaml_comment_t // The folded comments for all parsed tokens + comments_head int + + // Scanner stuff + + stream_start_produced bool // Have we started to scan the input stream? + stream_end_produced bool // Have we reached the end of the input stream? + + flow_level int // The number of unclosed '[' and '{' indicators. + + tokens []yaml_token_t // The tokens queue. + tokens_head int // The head of the tokens queue. + tokens_parsed int // The number of tokens fetched from the queue. + token_available bool // Does the tokens queue contain a token ready for dequeueing. + + indent int // The current indentation level. + indents []int // The indentation levels stack. + + simple_key_allowed bool // May a simple key occur at the current position? + simple_keys []yaml_simple_key_t // The stack of simple keys. + simple_keys_by_tok map[int]int // possible simple_key indexes indexed by token_number + + // Parser stuff + + state yaml_parser_state_t // The current parser state. + states []yaml_parser_state_t // The parser states stack. + marks []yaml_mark_t // The stack of marks. + tag_directives []yaml_tag_directive_t // The list of TAG directives. + + // Dumper stuff + + aliases []yaml_alias_data_t // The alias data. + + document *yaml_document_t // The currently parsed document. +} + +type yaml_comment_t struct { + + scan_mark yaml_mark_t // Position where scanning for comments started + token_mark yaml_mark_t // Position after which tokens will be associated with this comment + start_mark yaml_mark_t // Position of '#' comment mark + end_mark yaml_mark_t // Position where comment terminated + + head []byte + line []byte + foot []byte +} + +// Emitter Definitions + +// The prototype of a write handler. +// +// The write handler is called when the emitter needs to flush the accumulated +// characters to the output. The handler should write @a size bytes of the +// @a buffer to the output. +// +// @param[in,out] data A pointer to an application data specified by +// yaml_emitter_set_output(). +// @param[in] buffer The buffer with bytes to be written. +// @param[in] size The size of the buffer. +// +// @returns On success, the handler should return @c 1. If the handler failed, +// the returned value should be @c 0. +// +type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error + +type yaml_emitter_state_t int + +// The emitter states. +const ( + // Expect STREAM-START. + yaml_EMIT_STREAM_START_STATE yaml_emitter_state_t = iota + + yaml_EMIT_FIRST_DOCUMENT_START_STATE // Expect the first DOCUMENT-START or STREAM-END. + yaml_EMIT_DOCUMENT_START_STATE // Expect DOCUMENT-START or STREAM-END. + yaml_EMIT_DOCUMENT_CONTENT_STATE // Expect the content of a document. + yaml_EMIT_DOCUMENT_END_STATE // Expect DOCUMENT-END. + yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a flow sequence. + yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE // Expect the next item of a flow sequence, with the comma already written out + yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE // Expect an item of a flow sequence. + yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE // Expect the next key of a flow mapping, with the comma already written out + yaml_EMIT_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. + yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a block sequence. + yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE // Expect an item of a block sequence. + yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_KEY_STATE // Expect the key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_VALUE_STATE // Expect a value of a block mapping. + yaml_EMIT_END_STATE // Expect nothing. +) + +// The emitter structure. +// +// All members are internal. Manage the structure using the @c yaml_emitter_ +// family of functions. +type yaml_emitter_t struct { + + // Error handling + + error yaml_error_type_t // Error type. + problem string // Error description. + + // Writer stuff + + write_handler yaml_write_handler_t // Write handler. + + output_buffer *[]byte // String output data. + output_writer io.Writer // File output data. + + buffer []byte // The working buffer. + buffer_pos int // The current position of the buffer. + + raw_buffer []byte // The raw buffer. + raw_buffer_pos int // The current position of the buffer. + + encoding yaml_encoding_t // The stream encoding. + + // Emitter stuff + + canonical bool // If the output is in the canonical style? + best_indent int // The number of indentation spaces. + best_width int // The preferred width of the output lines. + unicode bool // Allow unescaped non-ASCII characters? + line_break yaml_break_t // The preferred line break. + + state yaml_emitter_state_t // The current emitter state. + states []yaml_emitter_state_t // The stack of states. + + events []yaml_event_t // The event queue. + events_head int // The head of the event queue. + + indents []int // The stack of indentation levels. + + tag_directives []yaml_tag_directive_t // The list of tag directives. + + indent int // The current indentation level. + + flow_level int // The current flow level. + + root_context bool // Is it the document root context? + sequence_context bool // Is it a sequence context? + mapping_context bool // Is it a mapping context? + simple_key_context bool // Is it a simple mapping key context? + + line int // The current line. + column int // The current column. + whitespace bool // If the last character was a whitespace? + indention bool // If the last character was an indentation character (' ', '-', '?', ':')? + open_ended bool // If an explicit document end is required? + + space_above bool // Is there's an empty line above? + foot_indent int // The indent used to write the foot comment above, or -1 if none. + + // Anchor analysis. + anchor_data struct { + anchor []byte // The anchor value. + alias bool // Is it an alias? + } + + // Tag analysis. + tag_data struct { + handle []byte // The tag handle. + suffix []byte // The tag suffix. + } + + // Scalar analysis. + scalar_data struct { + value []byte // The scalar value. + multiline bool // Does the scalar contain line breaks? + flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? + block_plain_allowed bool // Can the scalar be expressed in the block plain style? + single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? + block_allowed bool // Can the scalar be expressed in the literal or folded styles? + style yaml_scalar_style_t // The output style. + } + + // Comments + head_comment []byte + line_comment []byte + foot_comment []byte + tail_comment []byte + + key_line_comment []byte + + // Dumper stuff + + opened bool // If the stream was already opened? + closed bool // If the stream was already closed? + + // The information associated with the document nodes. + anchors *struct { + references int // The number of references. + anchor int // The anchor id. + serialized bool // If the node has been emitted? + } + + last_anchor_id int // The last assigned anchor id. + + document *yaml_document_t // The currently emitted document. +} diff --git a/vendor/gopkg.in/yaml.v3/yamlprivateh.go b/vendor/gopkg.in/yaml.v3/yamlprivateh.go new file mode 100644 index 00000000000..e88f9c54aec --- /dev/null +++ b/vendor/gopkg.in/yaml.v3/yamlprivateh.go @@ -0,0 +1,198 @@ +// +// Copyright (c) 2011-2019 Canonical Ltd +// Copyright (c) 2006-2010 Kirill Simonov +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +package yaml + +const ( + // The size of the input raw buffer. + input_raw_buffer_size = 512 + + // The size of the input buffer. + // It should be possible to decode the whole raw buffer. + input_buffer_size = input_raw_buffer_size * 3 + + // The size of the output buffer. + output_buffer_size = 128 + + // The size of the output raw buffer. + // It should be possible to encode the whole output buffer. + output_raw_buffer_size = (output_buffer_size*2 + 2) + + // The size of other stacks and queues. + initial_stack_size = 16 + initial_queue_size = 16 + initial_string_size = 16 +) + +// Check if the character at the specified position is an alphabetical +// character, a digit, '_', or '-'. +func is_alpha(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-' +} + +// Check if the character at the specified position is a digit. +func is_digit(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' +} + +// Get the value of a digit. +func as_digit(b []byte, i int) int { + return int(b[i]) - '0' +} + +// Check if the character at the specified position is a hex-digit. +func is_hex(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f' +} + +// Get the value of a hex-digit. +func as_hex(b []byte, i int) int { + bi := b[i] + if bi >= 'A' && bi <= 'F' { + return int(bi) - 'A' + 10 + } + if bi >= 'a' && bi <= 'f' { + return int(bi) - 'a' + 10 + } + return int(bi) - '0' +} + +// Check if the character is ASCII. +func is_ascii(b []byte, i int) bool { + return b[i] <= 0x7F +} + +// Check if the character at the start of the buffer can be printed unescaped. +func is_printable(b []byte, i int) bool { + return ((b[i] == 0x0A) || // . == #x0A + (b[i] >= 0x20 && b[i] <= 0x7E) || // #x20 <= . <= #x7E + (b[i] == 0xC2 && b[i+1] >= 0xA0) || // #0xA0 <= . <= #xD7FF + (b[i] > 0xC2 && b[i] < 0xED) || + (b[i] == 0xED && b[i+1] < 0xA0) || + (b[i] == 0xEE) || + (b[i] == 0xEF && // #xE000 <= . <= #xFFFD + !(b[i+1] == 0xBB && b[i+2] == 0xBF) && // && . != #xFEFF + !(b[i+1] == 0xBF && (b[i+2] == 0xBE || b[i+2] == 0xBF)))) +} + +// Check if the character at the specified position is NUL. +func is_z(b []byte, i int) bool { + return b[i] == 0x00 +} + +// Check if the beginning of the buffer is a BOM. +func is_bom(b []byte, i int) bool { + return b[0] == 0xEF && b[1] == 0xBB && b[2] == 0xBF +} + +// Check if the character at the specified position is space. +func is_space(b []byte, i int) bool { + return b[i] == ' ' +} + +// Check if the character at the specified position is tab. +func is_tab(b []byte, i int) bool { + return b[i] == '\t' +} + +// Check if the character at the specified position is blank (space or tab). +func is_blank(b []byte, i int) bool { + //return is_space(b, i) || is_tab(b, i) + return b[i] == ' ' || b[i] == '\t' +} + +// Check if the character at the specified position is a line break. +func is_break(b []byte, i int) bool { + return (b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029) +} + +func is_crlf(b []byte, i int) bool { + return b[i] == '\r' && b[i+1] == '\n' +} + +// Check if the character is a line break or NUL. +func is_breakz(b []byte, i int) bool { + //return is_break(b, i) || is_z(b, i) + return ( + // is_break: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + // is_z: + b[i] == 0) +} + +// Check if the character is a line break, space, or NUL. +func is_spacez(b []byte, i int) bool { + //return is_space(b, i) || is_breakz(b, i) + return ( + // is_space: + b[i] == ' ' || + // is_breakz: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + b[i] == 0) +} + +// Check if the character is a line break, space, tab, or NUL. +func is_blankz(b []byte, i int) bool { + //return is_blank(b, i) || is_breakz(b, i) + return ( + // is_blank: + b[i] == ' ' || b[i] == '\t' || + // is_breakz: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + b[i] == 0) +} + +// Determine the width of the character. +func width(b byte) int { + // Don't replace these by a switch without first + // confirming that it is being inlined. + if b&0x80 == 0x00 { + return 1 + } + if b&0xE0 == 0xC0 { + return 2 + } + if b&0xF0 == 0xE0 { + return 3 + } + if b&0xF8 == 0xF0 { + return 4 + } + return 0 + +} diff --git a/vendor/k8s.io/api/admission/v1/generated.pb.go b/vendor/k8s.io/api/admission/v1/generated.pb.go index ed5b5dfe12c..04eb206750d 100644 --- a/vendor/k8s.io/api/admission/v1/generated.pb.go +++ b/vendor/k8s.io/api/admission/v1/generated.pb.go @@ -143,64 +143,65 @@ func init() { } var fileDescriptor_4b73421fd5edef9f = []byte{ - // 898 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xf6, 0xc6, 0x89, 0xed, 0x1d, 0x87, 0xda, 0x9d, 0x82, 0x58, 0xf9, 0xb0, 0x36, 0x39, 0x20, - 0x17, 0xb5, 0xb3, 0x24, 0x82, 0x2a, 0xaa, 0x38, 0x34, 0x4b, 0x2a, 0x14, 0x90, 0x9a, 0x68, 0xda, - 0xa0, 0x8a, 0x03, 0xd2, 0xd8, 0x3b, 0xb5, 0x17, 0xdb, 0x33, 0xcb, 0xce, 0xac, 0x83, 0x6f, 0x9c, - 0x38, 0xf3, 0x0f, 0xf8, 0x1d, 0xfc, 0x83, 0x1c, 0x7b, 0xec, 0xc9, 0x22, 0xe6, 0x5f, 0x44, 0x42, - 0x42, 0x33, 0x3b, 0xfb, 0xd1, 0x7c, 0x88, 0xd0, 0xf4, 0xe4, 0x79, 0x3f, 0x9e, 0xe7, 0x7d, 0xfd, - 0xbc, 0x3b, 0xef, 0x80, 0x27, 0x93, 0x5d, 0x81, 0x42, 0xee, 0x4d, 0x92, 0x01, 0x8d, 0x19, 0x95, - 0x54, 0x78, 0x73, 0xca, 0x02, 0x1e, 0x7b, 0x26, 0x40, 0xa2, 0xd0, 0x23, 0xc1, 0x2c, 0x14, 0x22, - 0xe4, 0xcc, 0x9b, 0x6f, 0x7b, 0x23, 0xca, 0x68, 0x4c, 0x24, 0x0d, 0x50, 0x14, 0x73, 0xc9, 0xe1, - 0xc7, 0x69, 0x22, 0x22, 0x51, 0x88, 0xf2, 0x44, 0x34, 0xdf, 0xee, 0x3c, 0x1c, 0x85, 0x72, 0x9c, - 0x0c, 0xd0, 0x90, 0xcf, 0xbc, 0x11, 0x1f, 0x71, 0x4f, 0xe7, 0x0f, 0x92, 0x57, 0xda, 0xd2, 0x86, - 0x3e, 0xa5, 0x3c, 0x9d, 0x07, 0xe5, 0x82, 0x89, 0x1c, 0x53, 0x26, 0xc3, 0x21, 0x91, 0x57, 0x57, - 0xed, 0x7c, 0x51, 0x64, 0xcf, 0xc8, 0x70, 0x1c, 0x32, 0x1a, 0x2f, 0xbc, 0x68, 0x32, 0x52, 0x0e, - 0xe1, 0xcd, 0xa8, 0x24, 0x57, 0xa1, 0xbc, 0xeb, 0x50, 0x71, 0xc2, 0x64, 0x38, 0xa3, 0x97, 0x00, - 0x8f, 0xfe, 0x0b, 0x20, 0x86, 0x63, 0x3a, 0x23, 0x17, 0x71, 0x5b, 0x7f, 0xd8, 0xa0, 0xbd, 0x97, - 0x89, 0x81, 0xe9, 0xcf, 0x09, 0x15, 0x12, 0xfa, 0xa0, 0x9a, 0x84, 0x81, 0x63, 0xf5, 0xac, 0xbe, - 0xed, 0x7f, 0x7e, 0xba, 0xec, 0x56, 0x56, 0xcb, 0x6e, 0xf5, 0xf8, 0x60, 0xff, 0x7c, 0xd9, 0xfd, - 0xe4, 0xba, 0x42, 0x72, 0x11, 0x51, 0x81, 0x8e, 0x0f, 0xf6, 0xb1, 0x02, 0xc3, 0x97, 0x60, 0x7d, - 0x12, 0xb2, 0xc0, 0x59, 0xeb, 0x59, 0xfd, 0xe6, 0xce, 0x23, 0x54, 0x88, 0x9f, 0xc3, 0x50, 0x34, - 0x19, 0x29, 0x87, 0x40, 0x4a, 0x06, 0x34, 0xdf, 0x46, 0xdf, 0xc4, 0x3c, 0x89, 0xbe, 0xa7, 0xb1, - 0x6a, 0xe6, 0xbb, 0x90, 0x05, 0xfe, 0xa6, 0x29, 0xbe, 0xae, 0x2c, 0xac, 0x19, 0xe1, 0x18, 0x34, - 0x62, 0x2a, 0x78, 0x12, 0x0f, 0xa9, 0x53, 0xd5, 0xec, 0x8f, 0xff, 0x3f, 0x3b, 0x36, 0x0c, 0x7e, - 0xdb, 0x54, 0x68, 0x64, 0x1e, 0x9c, 0xb3, 0xc3, 0x2f, 0x41, 0x53, 0x24, 0x83, 0x2c, 0xe0, 0xac, - 0x6b, 0x3d, 0xee, 0x19, 0x40, 0xf3, 0x79, 0x11, 0xc2, 0xe5, 0x3c, 0x18, 0x82, 0x66, 0x9c, 0x2a, - 0xa9, 0xba, 0x76, 0x3e, 0xb8, 0x95, 0x02, 0x2d, 0x55, 0x0a, 0x17, 0x74, 0xb8, 0xcc, 0x0d, 0x17, - 0xa0, 0x65, 0xcc, 0xbc, 0xcb, 0x3b, 0xb7, 0x96, 0xe4, 0xde, 0x6a, 0xd9, 0x6d, 0xe1, 0xb7, 0x69, - 0xf1, 0xc5, 0x3a, 0xf0, 0x5b, 0x00, 0x8d, 0xab, 0x24, 0x84, 0xd3, 0xd2, 0x1a, 0x75, 0x8c, 0x46, - 0x10, 0x5f, 0xca, 0xc0, 0x57, 0xa0, 0x60, 0x0f, 0xac, 0x33, 0x32, 0xa3, 0xce, 0x86, 0x46, 0xe7, - 0x43, 0x7f, 0x46, 0x66, 0x14, 0xeb, 0x08, 0xf4, 0x80, 0xad, 0x7e, 0x45, 0x44, 0x86, 0xd4, 0xa9, - 0xe9, 0xb4, 0xbb, 0x26, 0xcd, 0x7e, 0x96, 0x05, 0x70, 0x91, 0x03, 0xbf, 0x02, 0x36, 0x8f, 0xd4, - 0xa7, 0x1e, 0x72, 0xe6, 0xd4, 0x35, 0xc0, 0xcd, 0x00, 0x87, 0x59, 0xe0, 0xbc, 0x6c, 0xe0, 0x02, - 0x00, 0x5f, 0x80, 0x46, 0x22, 0x68, 0x7c, 0xc0, 0x5e, 0x71, 0xa7, 0xa1, 0x05, 0xfd, 0x14, 0x95, - 0xd7, 0xc7, 0x5b, 0xd7, 0x5e, 0x09, 0x79, 0x6c, 0xb2, 0x8b, 0xef, 0x29, 0xf3, 0xe0, 0x9c, 0x09, - 0x1e, 0x83, 0x1a, 0x1f, 0xfc, 0x44, 0x87, 0xd2, 0xb1, 0x35, 0xe7, 0xc3, 0x6b, 0x87, 0x64, 0x6e, - 0x2d, 0xc2, 0xe4, 0xe4, 0xe9, 0x2f, 0x92, 0x32, 0x35, 0x1f, 0xff, 0x8e, 0xa1, 0xae, 0x1d, 0x6a, - 0x12, 0x6c, 0xc8, 0xe0, 0x8f, 0xc0, 0xe6, 0xd3, 0x20, 0x75, 0x3a, 0xe0, 0x5d, 0x98, 0x73, 0x29, - 0x0f, 0x33, 0x1e, 0x5c, 0x50, 0xc2, 0x2d, 0x50, 0x0b, 0xe2, 0x05, 0x4e, 0x98, 0xd3, 0xec, 0x59, - 0xfd, 0x86, 0x0f, 0x54, 0x0f, 0xfb, 0xda, 0x83, 0x4d, 0x04, 0xbe, 0x04, 0x75, 0x1e, 0x29, 0x31, - 0x84, 0xb3, 0xf9, 0x2e, 0x1d, 0xb4, 0x4c, 0x07, 0xf5, 0xc3, 0x94, 0x05, 0x67, 0x74, 0x5b, 0xff, - 0x54, 0xc1, 0xdd, 0xd2, 0x86, 0x12, 0x11, 0x67, 0x82, 0xbe, 0x97, 0x15, 0x75, 0x1f, 0xd4, 0xc9, - 0x74, 0xca, 0x4f, 0x68, 0xba, 0xa5, 0x1a, 0x45, 0x13, 0x7b, 0xa9, 0x1b, 0x67, 0x71, 0x78, 0x04, - 0x6a, 0x42, 0x12, 0x99, 0x08, 0xb3, 0x71, 0x1e, 0xdc, 0xec, 0x7a, 0x3d, 0xd7, 0x98, 0x54, 0x30, - 0x4c, 0x45, 0x32, 0x95, 0xd8, 0xf0, 0xc0, 0x2e, 0xd8, 0x88, 0x88, 0x1c, 0x8e, 0xf5, 0x56, 0xd9, - 0xf4, 0xed, 0xd5, 0xb2, 0xbb, 0x71, 0xa4, 0x1c, 0x38, 0xf5, 0xc3, 0x5d, 0x60, 0xeb, 0xc3, 0x8b, - 0x45, 0x94, 0x5d, 0x8c, 0x8e, 0x1a, 0xd1, 0x51, 0xe6, 0x3c, 0x2f, 0x1b, 0xb8, 0x48, 0x86, 0xbf, - 0x59, 0xa0, 0x4d, 0x92, 0x20, 0x94, 0x7b, 0x8c, 0x71, 0x49, 0xd2, 0xa9, 0xd4, 0x7a, 0xd5, 0x7e, - 0x73, 0xe7, 0x09, 0xba, 0xe6, 0x11, 0x44, 0x97, 0x24, 0x46, 0x7b, 0x17, 0x28, 0x9e, 0x32, 0x19, - 0x2f, 0x7c, 0xc7, 0x68, 0xd4, 0xbe, 0x18, 0xc6, 0x97, 0x6a, 0x76, 0xbe, 0x06, 0x1f, 0x5d, 0x49, - 0x02, 0xdb, 0xa0, 0x3a, 0xa1, 0x8b, 0x74, 0x7a, 0x58, 0x1d, 0xe1, 0x87, 0x60, 0x63, 0x4e, 0xa6, - 0x09, 0xd5, 0x93, 0xb0, 0x71, 0x6a, 0x3c, 0x5e, 0xdb, 0xb5, 0xb6, 0xfe, 0xb4, 0x40, 0xab, 0xd4, - 0xdc, 0x3c, 0xa4, 0x27, 0xf0, 0x08, 0xd4, 0xcd, 0x16, 0xd1, 0x1c, 0xcd, 0x9d, 0xfb, 0x37, 0xf9, - 0x5f, 0x1a, 0xe0, 0x37, 0xd5, 0x80, 0xb3, 0xed, 0x96, 0xd1, 0xa8, 0x0b, 0x1f, 0x9b, 0x3f, 0x6e, - 0x9e, 0xac, 0xcf, 0x6e, 0x2e, 0x95, 0xbf, 0x69, 0x1e, 0x10, 0x6d, 0xe1, 0x9c, 0xc9, 0xef, 0x9f, - 0x9e, 0xb9, 0x95, 0xd7, 0x67, 0x6e, 0xe5, 0xcd, 0x99, 0x5b, 0xf9, 0x75, 0xe5, 0x5a, 0xa7, 0x2b, - 0xd7, 0x7a, 0xbd, 0x72, 0xad, 0x37, 0x2b, 0xd7, 0xfa, 0x6b, 0xe5, 0x5a, 0xbf, 0xff, 0xed, 0x56, - 0x7e, 0x58, 0x9b, 0x6f, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x37, 0xc7, 0x3f, 0x71, 0xdf, 0x08, - 0x00, 0x00, + // 919 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xd6, 0x8e, 0xed, 0x1d, 0x87, 0xda, 0x9d, 0x82, 0x58, 0xf9, 0xb0, 0x36, 0x39, 0x20, + 0x17, 0xb5, 0xbb, 0x24, 0x82, 0x2a, 0xaa, 0x38, 0x34, 0x4b, 0x2a, 0x14, 0x90, 0x9a, 0x68, 0xda, + 0x40, 0xc5, 0x01, 0x69, 0xec, 0x9d, 0xda, 0x83, 0xed, 0x99, 0x65, 0x67, 0xd6, 0xc1, 0x37, 0x4e, + 0x9c, 0xf9, 0x06, 0x1c, 0xf9, 0x0c, 0x7c, 0x83, 0x1c, 0x7b, 0xec, 0xc9, 0x22, 0xe6, 0x5b, 0xe4, + 0x84, 0x66, 0x76, 0xf6, 0x4f, 0xf3, 0x47, 0x84, 0x96, 0x93, 0xf7, 0xfd, 0xf9, 0xfd, 0xde, 0xf3, + 0xef, 0xed, 0x7b, 0x0b, 0x1e, 0x4f, 0x77, 0x85, 0x47, 0xb9, 0x3f, 0x4d, 0x86, 0x24, 0x66, 0x44, + 0x12, 0xe1, 0x2f, 0x08, 0x0b, 0x79, 0xec, 0x9b, 0x00, 0x8e, 0xa8, 0x8f, 0xc3, 0x39, 0x15, 0x82, + 0x72, 0xe6, 0x2f, 0xb6, 0xfd, 0x31, 0x61, 0x24, 0xc6, 0x92, 0x84, 0x5e, 0x14, 0x73, 0xc9, 0xe1, + 0x87, 0x69, 0xa2, 0x87, 0x23, 0xea, 0xe5, 0x89, 0xde, 0x62, 0xbb, 0xfb, 0x60, 0x4c, 0xe5, 0x24, + 0x19, 0x7a, 0x23, 0x3e, 0xf7, 0xc7, 0x7c, 0xcc, 0x7d, 0x9d, 0x3f, 0x4c, 0x5e, 0x6a, 0x4b, 0x1b, + 0xfa, 0x29, 0xe5, 0xe9, 0xde, 0x2f, 0x17, 0x4c, 0xe4, 0x84, 0x30, 0x49, 0x47, 0x58, 0x5e, 0x5d, + 0xb5, 0xfb, 0x59, 0x91, 0x3d, 0xc7, 0xa3, 0x09, 0x65, 0x24, 0x5e, 0xfa, 0xd1, 0x74, 0xac, 0x1c, + 0xc2, 0x9f, 0x13, 0x89, 0xaf, 0x42, 0xf9, 0xd7, 0xa1, 0xe2, 0x84, 0x49, 0x3a, 0x27, 0x97, 0x00, + 0x0f, 0xff, 0x0d, 0x20, 0x46, 0x13, 0x32, 0xc7, 0x17, 0x71, 0x5b, 0xbf, 0xdb, 0xa0, 0xb3, 0x97, + 0x89, 0x81, 0xc8, 0x4f, 0x09, 0x11, 0x12, 0x06, 0xa0, 0x9a, 0xd0, 0xd0, 0xb1, 0xfa, 0xd6, 0xc0, + 0x0e, 0x3e, 0x3d, 0x5d, 0xf5, 0x2a, 0xeb, 0x55, 0xaf, 0x7a, 0x7c, 0xb0, 0x7f, 0xbe, 0xea, 0x7d, + 0x74, 0x5d, 0x21, 0xb9, 0x8c, 0x88, 0xf0, 0x8e, 0x0f, 0xf6, 0x91, 0x02, 0xc3, 0x17, 0xa0, 0x36, + 0xa5, 0x2c, 0x74, 0x6e, 0xf5, 0xad, 0x41, 0x6b, 0xe7, 0xa1, 0x57, 0x88, 0x9f, 0xc3, 0xbc, 0x68, + 0x3a, 0x56, 0x0e, 0xe1, 0x29, 0x19, 0xbc, 0xc5, 0xb6, 0xf7, 0x55, 0xcc, 0x93, 0xe8, 0x5b, 0x12, + 0xab, 0x66, 0xbe, 0xa1, 0x2c, 0x0c, 0x36, 0x4d, 0xf1, 0x9a, 0xb2, 0x90, 0x66, 0x84, 0x13, 0xd0, + 0x8c, 0x89, 0xe0, 0x49, 0x3c, 0x22, 0x4e, 0x55, 0xb3, 0x3f, 0xfa, 0xef, 0xec, 0xc8, 0x30, 0x04, + 0x1d, 0x53, 0xa1, 0x99, 0x79, 0x50, 0xce, 0x0e, 0x3f, 0x07, 0x2d, 0x91, 0x0c, 0xb3, 0x80, 0x53, + 0xd3, 0x7a, 0xdc, 0x35, 0x80, 0xd6, 0xb3, 0x22, 0x84, 0xca, 0x79, 0x90, 0x82, 0x56, 0x9c, 0x2a, + 0xa9, 0xba, 0x76, 0xde, 0x7b, 0x27, 0x05, 0xda, 0xaa, 0x14, 0x2a, 0xe8, 0x50, 0x99, 0x1b, 0x2e, + 0x41, 0xdb, 0x98, 0x79, 0x97, 0xb7, 0xdf, 0x59, 0x92, 0xbb, 0xeb, 0x55, 0xaf, 0x8d, 0xde, 0xa4, + 0x45, 0x17, 0xeb, 0xc0, 0xaf, 0x01, 0x34, 0xae, 0x92, 0x10, 0x4e, 0x5b, 0x6b, 0xd4, 0x35, 0x1a, + 0x41, 0x74, 0x29, 0x03, 0x5d, 0x81, 0x82, 0x7d, 0x50, 0x63, 0x78, 0x4e, 0x9c, 0x0d, 0x8d, 0xce, + 0x87, 0xfe, 0x14, 0xcf, 0x09, 0xd2, 0x11, 0xe8, 0x03, 0x5b, 0xfd, 0x8a, 0x08, 0x8f, 0x88, 0x53, + 0xd7, 0x69, 0x77, 0x4c, 0x9a, 0xfd, 0x34, 0x0b, 0xa0, 0x22, 0x07, 0x7e, 0x01, 0x6c, 0x1e, 0xa9, + 0x57, 0x9d, 0x72, 0xe6, 0x34, 0x34, 0xc0, 0xcd, 0x00, 0x87, 0x59, 0xe0, 0xbc, 0x6c, 0xa0, 0x02, + 0x00, 0x9f, 0x83, 0x66, 0x22, 0x48, 0x7c, 0xc0, 0x5e, 0x72, 0xa7, 0xa9, 0x05, 0xfd, 0xd8, 0x2b, + 0x9f, 0x8f, 0x37, 0xd6, 0x5e, 0x09, 0x79, 0x6c, 0xb2, 0x8b, 0xf7, 0x29, 0xf3, 0xa0, 0x9c, 0x09, + 0x1e, 0x83, 0x3a, 0x1f, 0xfe, 0x48, 0x46, 0xd2, 0xb1, 0x35, 0xe7, 0x83, 0x6b, 0x87, 0x64, 0xb6, + 0xd6, 0x43, 0xf8, 0xe4, 0xc9, 0xcf, 0x92, 0x30, 0x35, 0x9f, 0xe0, 0xb6, 0xa1, 0xae, 0x1f, 0x6a, + 0x12, 0x64, 0xc8, 0xe0, 0x0f, 0xc0, 0xe6, 0xb3, 0x30, 0x75, 0x3a, 0xe0, 0x6d, 0x98, 0x73, 0x29, + 0x0f, 0x33, 0x1e, 0x54, 0x50, 0xc2, 0x2d, 0x50, 0x0f, 0xe3, 0x25, 0x4a, 0x98, 0xd3, 0xea, 0x5b, + 0x83, 0x66, 0x00, 0x54, 0x0f, 0xfb, 0xda, 0x83, 0x4c, 0x04, 0xbe, 0x00, 0x0d, 0x1e, 0x29, 0x31, + 0x84, 0xb3, 0xf9, 0x36, 0x1d, 0xb4, 0x4d, 0x07, 0x8d, 0xc3, 0x94, 0x05, 0x65, 0x74, 0x5b, 0x7f, + 0xd4, 0xc0, 0x9d, 0xd2, 0x85, 0x12, 0x11, 0x67, 0x82, 0xfc, 0x2f, 0x27, 0xea, 0x1e, 0x68, 0xe0, + 0xd9, 0x8c, 0x9f, 0x90, 0xf4, 0x4a, 0x35, 0x8b, 0x26, 0xf6, 0x52, 0x37, 0xca, 0xe2, 0xf0, 0x08, + 0xd4, 0x85, 0xc4, 0x32, 0x11, 0xe6, 0xe2, 0xdc, 0xbf, 0xd9, 0x7a, 0x3d, 0xd3, 0x98, 0x54, 0x30, + 0x44, 0x44, 0x32, 0x93, 0xc8, 0xf0, 0xc0, 0x1e, 0xd8, 0x88, 0xb0, 0x1c, 0x4d, 0xf4, 0x55, 0xd9, + 0x0c, 0xec, 0xf5, 0xaa, 0xb7, 0x71, 0xa4, 0x1c, 0x28, 0xf5, 0xc3, 0x5d, 0x60, 0xeb, 0x87, 0xe7, + 0xcb, 0x28, 0x5b, 0x8c, 0xae, 0x1a, 0xd1, 0x51, 0xe6, 0x3c, 0x2f, 0x1b, 0xa8, 0x48, 0x86, 0xbf, + 0x5a, 0xa0, 0x83, 0x93, 0x90, 0xca, 0x3d, 0xc6, 0xb8, 0xc4, 0xe9, 0x54, 0xea, 0xfd, 0xea, 0xa0, + 0xb5, 0xf3, 0xd8, 0xbb, 0xe6, 0x23, 0xe8, 0x5d, 0x92, 0xd8, 0xdb, 0xbb, 0x40, 0xf1, 0x84, 0xc9, + 0x78, 0x19, 0x38, 0x46, 0xa3, 0xce, 0xc5, 0x30, 0xba, 0x54, 0x13, 0x0e, 0x40, 0xf3, 0x04, 0xc7, + 0x8c, 0xb2, 0xb1, 0x70, 0x1a, 0xfd, 0xaa, 0x5a, 0x6d, 0xb5, 0x19, 0xdf, 0x19, 0x1f, 0xca, 0xa3, + 0xdd, 0x2f, 0xc1, 0x07, 0x57, 0x96, 0x83, 0x1d, 0x50, 0x9d, 0x92, 0x65, 0x3a, 0x67, 0xa4, 0x1e, + 0xe1, 0xfb, 0x60, 0x63, 0x81, 0x67, 0x09, 0xd1, 0x33, 0xb3, 0x51, 0x6a, 0x3c, 0xba, 0xb5, 0x6b, + 0x6d, 0xfd, 0x69, 0x81, 0x76, 0xe9, 0x6f, 0x2c, 0x28, 0x39, 0x81, 0x47, 0xa0, 0x61, 0xee, 0x8d, + 0xe6, 0x68, 0xed, 0xdc, 0xbb, 0x89, 0x02, 0x1a, 0x10, 0xb4, 0xd4, 0xab, 0x90, 0xdd, 0xc1, 0x8c, + 0x46, 0x9d, 0x86, 0xd8, 0x48, 0x64, 0x3e, 0x6e, 0x9f, 0xdc, 0x5c, 0xd4, 0x54, 0x80, 0xcc, 0x42, + 0x39, 0x53, 0x30, 0x38, 0x3d, 0x73, 0x2b, 0xaf, 0xce, 0xdc, 0xca, 0xeb, 0x33, 0xb7, 0xf2, 0xcb, + 0xda, 0xb5, 0x4e, 0xd7, 0xae, 0xf5, 0x6a, 0xed, 0x5a, 0xaf, 0xd7, 0xae, 0xf5, 0xd7, 0xda, 0xb5, + 0x7e, 0xfb, 0xdb, 0xad, 0x7c, 0x7f, 0x6b, 0xb1, 0xfd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, + 0xcb, 0x64, 0xf1, 0x09, 0x09, 0x00, 0x00, } func (m *AdmissionRequest) Marshal() (dAtA []byte, err error) { @@ -370,6 +371,15 @@ func (m *AdmissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Warnings) > 0 { + for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Warnings[iNdEx]) + copy(dAtA[i:], m.Warnings[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Warnings[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } if len(m.AuditAnnotations) > 0 { keysForAuditAnnotations := make([]string, 0, len(m.AuditAnnotations)) for k := range m.AuditAnnotations { @@ -567,6 +577,12 @@ func (m *AdmissionResponse) Size() (n int) { n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } } + if len(m.Warnings) > 0 { + for _, s := range m.Warnings { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -638,6 +654,7 @@ func (this *AdmissionResponse) String() string { `Patch:` + valueToStringGenerated(this.Patch) + `,`, `PatchType:` + valueToStringGenerated(this.PatchType) + `,`, `AuditAnnotations:` + mapStringForAuditAnnotations + `,`, + `Warnings:` + fmt.Sprintf("%v", this.Warnings) + `,`, `}`, }, "") return s @@ -1508,6 +1525,38 @@ func (m *AdmissionResponse) Unmarshal(dAtA []byte) error { } m.AuditAnnotations[mapkey] = mapvalue iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warnings = append(m.Warnings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/api/admission/v1/generated.proto b/vendor/k8s.io/api/admission/v1/generated.proto index 8d960a17d32..079ab09f21f 100644 --- a/vendor/k8s.io/api/admission/v1/generated.proto +++ b/vendor/k8s.io/api/admission/v1/generated.proto @@ -145,6 +145,13 @@ message AdmissionResponse { // the admission webhook to add additional context to the audit log for this request. // +optional map auditAnnotations = 6; + + // warnings is a list of warning messages to return to the requesting API client. + // Warning messages describe a problem the client making the API request should correct or be aware of. + // Limit warnings to 120 characters if possible. + // Warnings over 256 characters and large numbers of warnings may be truncated. + // +optional + repeated string warnings = 7; } // AdmissionReview describes an admission review request/response. diff --git a/vendor/k8s.io/api/admission/v1/types.go b/vendor/k8s.io/api/admission/v1/types.go index a40cb0d52e2..556fd1ad54d 100644 --- a/vendor/k8s.io/api/admission/v1/types.go +++ b/vendor/k8s.io/api/admission/v1/types.go @@ -140,6 +140,13 @@ type AdmissionResponse struct { // the admission webhook to add additional context to the audit log for this request. // +optional AuditAnnotations map[string]string `json:"auditAnnotations,omitempty" protobuf:"bytes,6,opt,name=auditAnnotations"` + + // warnings is a list of warning messages to return to the requesting API client. + // Warning messages describe a problem the client making the API request should correct or be aware of. + // Limit warnings to 120 characters if possible. + // Warnings over 256 characters and large numbers of warnings may be truncated. + // +optional + Warnings []string `json:"warnings,omitempty" protobuf:"bytes,7,rep,name=warnings"` } // PatchType is the type of patch being used to represent the mutated object diff --git a/vendor/k8s.io/api/admission/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admission/v1/types_swagger_doc_generated.go index 62351b16177..f81594c9123 100644 --- a/vendor/k8s.io/api/admission/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/admission/v1/types_swagger_doc_generated.go @@ -58,6 +58,7 @@ var map_AdmissionResponse = map[string]string{ "patch": "The patch body. Currently we only support \"JSONPatch\" which implements RFC 6902.", "patchType": "The type of Patch. Currently we only allow \"JSONPatch\".", "auditAnnotations": "AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by the admission webhook to add additional context to the audit log for this request.", + "warnings": "warnings is a list of warning messages to return to the requesting API client. Warning messages describe a problem the client making the API request should correct or be aware of. Limit warnings to 120 characters if possible. Warnings over 256 characters and large numbers of warnings may be truncated.", } func (AdmissionResponse) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/admission/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/admission/v1/zz_generated.deepcopy.go index 42954ca4272..f7369471a8c 100644 --- a/vendor/k8s.io/api/admission/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/admission/v1/zz_generated.deepcopy.go @@ -87,6 +87,11 @@ func (in *AdmissionResponse) DeepCopyInto(out *AdmissionResponse) { (*out)[key] = val } } + if in.Warnings != nil { + in, out := &in.Warnings, &out.Warnings + *out = make([]string, len(*in)) + copy(*out, *in) + } return } diff --git a/vendor/k8s.io/api/admission/v1beta1/BUILD b/vendor/k8s.io/api/admission/v1beta1/BUILD index 4ce7a0eca6d..571142a8192 100644 --- a/vendor/k8s.io/api/admission/v1beta1/BUILD +++ b/vendor/k8s.io/api/admission/v1beta1/BUILD @@ -9,6 +9,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/admission/v1beta1", importpath = "k8s.io/api/admission/v1beta1", diff --git a/vendor/k8s.io/api/admission/v1beta1/doc.go b/vendor/k8s.io/api/admission/v1beta1/doc.go index 92f7c19d26d..a5669022a03 100644 --- a/vendor/k8s.io/api/admission/v1beta1/doc.go +++ b/vendor/k8s.io/api/admission/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=false +// +k8s:prerelease-lifecycle-gen=true // +groupName=admission.k8s.io diff --git a/vendor/k8s.io/api/admission/v1beta1/generated.pb.go b/vendor/k8s.io/api/admission/v1beta1/generated.pb.go index d694203fc6e..ae82ff5996e 100644 --- a/vendor/k8s.io/api/admission/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/admission/v1beta1/generated.pb.go @@ -143,64 +143,65 @@ func init() { } var fileDescriptor_b87c2352de86eab9 = []byte{ - // 902 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xd6, 0x8e, 0xed, 0x1d, 0x87, 0xda, 0x9d, 0x82, 0xb4, 0xb2, 0xd0, 0xda, 0xe4, 0x80, - 0x82, 0xd4, 0xcc, 0x92, 0x08, 0xaa, 0xa8, 0xe2, 0x92, 0x25, 0x11, 0x0a, 0x48, 0x4d, 0x34, 0xad, - 0x51, 0xe1, 0x80, 0x34, 0xf6, 0x4e, 0xed, 0xc5, 0xf6, 0xcc, 0xb2, 0x33, 0xeb, 0xe0, 0x1b, 0xe2, - 0xca, 0x85, 0x6f, 0xc0, 0x87, 0xe1, 0x92, 0x63, 0x8f, 0x3d, 0x59, 0xc4, 0x7c, 0x8b, 0x9c, 0xd0, - 0xcc, 0xce, 0x7a, 0xb7, 0x76, 0x02, 0xfd, 0xc3, 0xc9, 0xf3, 0xfe, 0xfc, 0x7e, 0xef, 0xf9, 0xf7, - 0x76, 0xde, 0x80, 0x93, 0xf1, 0xa1, 0x40, 0x21, 0xf7, 0xc6, 0x49, 0x9f, 0xc6, 0x8c, 0x4a, 0x2a, - 0xbc, 0x19, 0x65, 0x01, 0x8f, 0x3d, 0x13, 0x20, 0x51, 0xe8, 0x91, 0x60, 0x1a, 0x0a, 0x11, 0x72, - 0xe6, 0xcd, 0xf6, 0xfb, 0x54, 0x92, 0x7d, 0x6f, 0x48, 0x19, 0x8d, 0x89, 0xa4, 0x01, 0x8a, 0x62, - 0x2e, 0x39, 0xfc, 0x30, 0xcd, 0x46, 0x24, 0x0a, 0xd1, 0x2a, 0x1b, 0x99, 0xec, 0xf6, 0xde, 0x30, - 0x94, 0xa3, 0xa4, 0x8f, 0x06, 0x7c, 0xea, 0x0d, 0xf9, 0x90, 0x7b, 0x1a, 0xd4, 0x4f, 0x9e, 0x6b, - 0x4b, 0x1b, 0xfa, 0x94, 0x92, 0xb5, 0x1f, 0x14, 0x4b, 0x27, 0x72, 0x44, 0x99, 0x0c, 0x07, 0x44, - 0xa6, 0xf5, 0xd7, 0x4b, 0xb7, 0x3f, 0xcb, 0xb3, 0xa7, 0x64, 0x30, 0x0a, 0x19, 0x8d, 0xe7, 0x5e, - 0x34, 0x1e, 0x2a, 0x87, 0xf0, 0xa6, 0x54, 0x92, 0x9b, 0x50, 0xde, 0x6d, 0xa8, 0x38, 0x61, 0x32, - 0x9c, 0xd2, 0x0d, 0xc0, 0xc3, 0xff, 0x02, 0x88, 0xc1, 0x88, 0x4e, 0xc9, 0x3a, 0x6e, 0xe7, 0x0f, - 0x1b, 0xb4, 0x8e, 0x32, 0x45, 0x30, 0xfd, 0x29, 0xa1, 0x42, 0x42, 0x1f, 0x94, 0x93, 0x30, 0x70, - 0xac, 0xae, 0xb5, 0x6b, 0xfb, 0x9f, 0x5e, 0x2e, 0x3a, 0xa5, 0xe5, 0xa2, 0x53, 0xee, 0x9d, 0x1e, - 0x5f, 0x2f, 0x3a, 0x1f, 0xdd, 0x56, 0x48, 0xce, 0x23, 0x2a, 0x50, 0xef, 0xf4, 0x18, 0x2b, 0x30, - 0x7c, 0x06, 0x2a, 0xe3, 0x90, 0x05, 0xce, 0x9d, 0xae, 0xb5, 0xdb, 0x38, 0x78, 0x88, 0xf2, 0x09, - 0xac, 0x60, 0x28, 0x1a, 0x0f, 0x95, 0x43, 0x20, 0x25, 0x03, 0x9a, 0xed, 0xa3, 0xaf, 0x62, 0x9e, - 0x44, 0xdf, 0xd2, 0x58, 0x35, 0xf3, 0x4d, 0xc8, 0x02, 0x7f, 0xdb, 0x14, 0xaf, 0x28, 0x0b, 0x6b, - 0x46, 0x38, 0x02, 0xf5, 0x98, 0x0a, 0x9e, 0xc4, 0x03, 0xea, 0x94, 0x35, 0xfb, 0xa3, 0x37, 0x67, - 0xc7, 0x86, 0xc1, 0x6f, 0x99, 0x0a, 0xf5, 0xcc, 0x83, 0x57, 0xec, 0xf0, 0x73, 0xd0, 0x10, 0x49, - 0x3f, 0x0b, 0x38, 0x15, 0xad, 0xc7, 0x7d, 0x03, 0x68, 0x3c, 0xc9, 0x43, 0xb8, 0x98, 0x07, 0x43, - 0xd0, 0x88, 0x53, 0x25, 0x55, 0xd7, 0xce, 0x7b, 0xef, 0xa4, 0x40, 0x53, 0x95, 0xc2, 0x39, 0x1d, - 0x2e, 0x72, 0xc3, 0x39, 0x68, 0x1a, 0x73, 0xd5, 0xe5, 0xdd, 0x77, 0x96, 0xe4, 0xfe, 0x72, 0xd1, - 0x69, 0xe2, 0x57, 0x69, 0xf1, 0x7a, 0x1d, 0xf8, 0x35, 0x80, 0xc6, 0x55, 0x10, 0xc2, 0x69, 0x6a, - 0x8d, 0xda, 0x46, 0x23, 0x88, 0x37, 0x32, 0xf0, 0x0d, 0x28, 0xd8, 0x05, 0x15, 0x46, 0xa6, 0xd4, - 0xd9, 0xd2, 0xe8, 0xd5, 0xd0, 0x1f, 0x93, 0x29, 0xc5, 0x3a, 0x02, 0x3d, 0x60, 0xab, 0x5f, 0x11, - 0x91, 0x01, 0x75, 0xaa, 0x3a, 0xed, 0x9e, 0x49, 0xb3, 0x1f, 0x67, 0x01, 0x9c, 0xe7, 0xc0, 0x2f, - 0x80, 0xcd, 0x23, 0xf5, 0xa9, 0x87, 0x9c, 0x39, 0x35, 0x0d, 0x70, 0x33, 0xc0, 0x59, 0x16, 0xb8, - 0x2e, 0x1a, 0x38, 0x07, 0xc0, 0xa7, 0xa0, 0x9e, 0x08, 0x1a, 0x9f, 0xb2, 0xe7, 0xdc, 0xa9, 0x6b, - 0x41, 0x3f, 0x46, 0xc5, 0x1d, 0xf2, 0xca, 0xb5, 0x57, 0x42, 0xf6, 0x4c, 0x76, 0xfe, 0x3d, 0x65, - 0x1e, 0xbc, 0x62, 0x82, 0x3d, 0x50, 0xe5, 0xfd, 0x1f, 0xe9, 0x40, 0x3a, 0xb6, 0xe6, 0xdc, 0xbb, - 0x75, 0x48, 0xe6, 0xd6, 0x22, 0x4c, 0x2e, 0x4e, 0x7e, 0x96, 0x94, 0xa9, 0xf9, 0xf8, 0x77, 0x0d, - 0x75, 0xf5, 0x4c, 0x93, 0x60, 0x43, 0x06, 0x7f, 0x00, 0x36, 0x9f, 0x04, 0xa9, 0xd3, 0x01, 0x6f, - 0xc3, 0xbc, 0x92, 0xf2, 0x2c, 0xe3, 0xc1, 0x39, 0x25, 0xdc, 0x01, 0xd5, 0x20, 0x9e, 0xe3, 0x84, - 0x39, 0x8d, 0xae, 0xb5, 0x5b, 0xf7, 0x81, 0xea, 0xe1, 0x58, 0x7b, 0xb0, 0x89, 0xc0, 0x67, 0xa0, - 0xc6, 0x23, 0x25, 0x86, 0x70, 0xb6, 0xdf, 0xa6, 0x83, 0xa6, 0xe9, 0xa0, 0x76, 0x96, 0xb2, 0xe0, - 0x8c, 0x6e, 0xe7, 0xd7, 0x0a, 0xb8, 0x57, 0xd8, 0x50, 0x22, 0xe2, 0x4c, 0xd0, 0xff, 0x65, 0x45, - 0x7d, 0x02, 0x6a, 0x64, 0x32, 0xe1, 0x17, 0x34, 0xdd, 0x52, 0xf5, 0xbc, 0x89, 0xa3, 0xd4, 0x8d, - 0xb3, 0x38, 0x3c, 0x07, 0x55, 0x21, 0x89, 0x4c, 0x84, 0xd9, 0x38, 0x0f, 0x5e, 0xef, 0x7a, 0x3d, - 0xd1, 0x98, 0x54, 0x30, 0x4c, 0x45, 0x32, 0x91, 0xd8, 0xf0, 0xc0, 0x0e, 0xd8, 0x8a, 0x88, 0x1c, - 0x8c, 0xf4, 0x56, 0xd9, 0xf6, 0xed, 0xe5, 0xa2, 0xb3, 0x75, 0xae, 0x1c, 0x38, 0xf5, 0xc3, 0x43, - 0x60, 0xeb, 0xc3, 0xd3, 0x79, 0x94, 0x5d, 0x8c, 0xb6, 0x1a, 0xd1, 0x79, 0xe6, 0xbc, 0x2e, 0x1a, - 0x38, 0x4f, 0x86, 0xbf, 0x59, 0xa0, 0x45, 0x92, 0x20, 0x94, 0x47, 0x8c, 0x71, 0x49, 0xd2, 0xa9, - 0x54, 0xbb, 0xe5, 0xdd, 0xc6, 0xc1, 0x09, 0xfa, 0xb7, 0x97, 0x10, 0x6d, 0xe8, 0x8c, 0x8e, 0xd6, - 0x78, 0x4e, 0x98, 0x8c, 0xe7, 0xbe, 0x63, 0x84, 0x6a, 0xad, 0x87, 0xf1, 0x46, 0xe1, 0xf6, 0x97, - 0xe0, 0x83, 0x1b, 0x49, 0x60, 0x0b, 0x94, 0xc7, 0x74, 0x9e, 0x8e, 0x10, 0xab, 0x23, 0x7c, 0x1f, - 0x6c, 0xcd, 0xc8, 0x24, 0xa1, 0x7a, 0x1c, 0x36, 0x4e, 0x8d, 0x47, 0x77, 0x0e, 0xad, 0x9d, 0x3f, - 0x2d, 0xd0, 0x2c, 0x34, 0x37, 0x0b, 0xe9, 0x05, 0xec, 0x81, 0x9a, 0x59, 0x25, 0x9a, 0xa3, 0x71, - 0x80, 0x5e, 0xfb, 0xcf, 0x69, 0x94, 0xdf, 0x50, 0xa3, 0xce, 0xf6, 0x5c, 0xc6, 0x05, 0xbf, 0xd3, - 0xcf, 0x8b, 0xfe, 0xf7, 0xe6, 0xf1, 0xf2, 0xde, 0x50, 0x34, 0x7f, 0xdb, 0xbc, 0x27, 0xda, 0xc2, - 0x2b, 0x3a, 0x7f, 0xef, 0xf2, 0xca, 0x2d, 0xbd, 0xb8, 0x72, 0x4b, 0x2f, 0xaf, 0xdc, 0xd2, 0x2f, - 0x4b, 0xd7, 0xba, 0x5c, 0xba, 0xd6, 0x8b, 0xa5, 0x6b, 0xbd, 0x5c, 0xba, 0xd6, 0x5f, 0x4b, 0xd7, - 0xfa, 0xfd, 0x6f, 0xb7, 0xf4, 0x7d, 0xcd, 0x10, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xd1, - 0x27, 0x74, 0xfd, 0x08, 0x00, 0x00, + // 925 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6e, 0x23, 0x45, + 0x17, 0x76, 0x8f, 0x1d, 0xdb, 0x5d, 0xce, 0x3f, 0xf6, 0xd4, 0xfc, 0x48, 0x2d, 0x0b, 0xb5, 0x4d, + 0x16, 0xc8, 0x48, 0x93, 0x6a, 0x12, 0xc1, 0x28, 0x1a, 0xb1, 0x49, 0x93, 0x08, 0x05, 0xa4, 0x49, + 0x54, 0x33, 0x86, 0x81, 0x05, 0x52, 0xd9, 0xae, 0xb1, 0x1b, 0xdb, 0x55, 0x4d, 0x57, 0xb5, 0x83, + 0x77, 0xec, 0xd9, 0xf0, 0x06, 0xbc, 0x00, 0x6f, 0xc1, 0x26, 0xcb, 0x59, 0xce, 0xca, 0x22, 0xe6, + 0x2d, 0xb2, 0x42, 0x55, 0x5d, 0x7d, 0x19, 0x27, 0x81, 0xb9, 0xb0, 0x72, 0x9f, 0xcb, 0xf7, 0x9d, + 0xe3, 0xef, 0xf4, 0x39, 0x0d, 0x8e, 0xa7, 0x07, 0x02, 0x05, 0xdc, 0x9b, 0xc6, 0x03, 0x1a, 0x31, + 0x2a, 0xa9, 0xf0, 0x16, 0x94, 0x8d, 0x78, 0xe4, 0x99, 0x00, 0x09, 0x03, 0x8f, 0x8c, 0xe6, 0x81, + 0x10, 0x01, 0x67, 0xde, 0x62, 0x6f, 0x40, 0x25, 0xd9, 0xf3, 0xc6, 0x94, 0xd1, 0x88, 0x48, 0x3a, + 0x42, 0x61, 0xc4, 0x25, 0x87, 0xef, 0x27, 0xd9, 0x88, 0x84, 0x01, 0xca, 0xb2, 0x91, 0xc9, 0x6e, + 0xef, 0x8e, 0x03, 0x39, 0x89, 0x07, 0x68, 0xc8, 0xe7, 0xde, 0x98, 0x8f, 0xb9, 0xa7, 0x41, 0x83, + 0xf8, 0xb9, 0xb6, 0xb4, 0xa1, 0x9f, 0x12, 0xb2, 0xf6, 0x83, 0x62, 0xe9, 0x58, 0x4e, 0x28, 0x93, + 0xc1, 0x90, 0xc8, 0xa4, 0xfe, 0x66, 0xe9, 0xf6, 0x27, 0x79, 0xf6, 0x9c, 0x0c, 0x27, 0x01, 0xa3, + 0xd1, 0xd2, 0x0b, 0xa7, 0x63, 0xe5, 0x10, 0xde, 0x9c, 0x4a, 0x72, 0x13, 0xca, 0xbb, 0x0d, 0x15, + 0xc5, 0x4c, 0x06, 0x73, 0x7a, 0x0d, 0xf0, 0xf0, 0xdf, 0x00, 0x62, 0x38, 0xa1, 0x73, 0xb2, 0x89, + 0xdb, 0xf9, 0xcd, 0x06, 0xad, 0xc3, 0x54, 0x11, 0x4c, 0x7f, 0x8c, 0xa9, 0x90, 0xd0, 0x07, 0xe5, + 0x38, 0x18, 0x39, 0x56, 0xd7, 0xea, 0xd9, 0xfe, 0xc7, 0x17, 0xab, 0x4e, 0x69, 0xbd, 0xea, 0x94, + 0xfb, 0x27, 0x47, 0x57, 0xab, 0xce, 0x07, 0xb7, 0x15, 0x92, 0xcb, 0x90, 0x0a, 0xd4, 0x3f, 0x39, + 0xc2, 0x0a, 0x0c, 0x9f, 0x81, 0xca, 0x34, 0x60, 0x23, 0xe7, 0x4e, 0xd7, 0xea, 0x35, 0xf6, 0x1f, + 0xa2, 0x7c, 0x02, 0x19, 0x0c, 0x85, 0xd3, 0xb1, 0x72, 0x08, 0xa4, 0x64, 0x40, 0x8b, 0x3d, 0xf4, + 0x45, 0xc4, 0xe3, 0xf0, 0x6b, 0x1a, 0xa9, 0x66, 0xbe, 0x0a, 0xd8, 0xc8, 0xdf, 0x36, 0xc5, 0x2b, + 0xca, 0xc2, 0x9a, 0x11, 0x4e, 0x40, 0x3d, 0xa2, 0x82, 0xc7, 0xd1, 0x90, 0x3a, 0x65, 0xcd, 0xfe, + 0xe8, 0xcd, 0xd9, 0xb1, 0x61, 0xf0, 0x5b, 0xa6, 0x42, 0x3d, 0xf5, 0xe0, 0x8c, 0x1d, 0x7e, 0x0a, + 0x1a, 0x22, 0x1e, 0xa4, 0x01, 0xa7, 0xa2, 0xf5, 0xb8, 0x6f, 0x00, 0x8d, 0x27, 0x79, 0x08, 0x17, + 0xf3, 0x60, 0x00, 0x1a, 0x51, 0xa2, 0xa4, 0xea, 0xda, 0xf9, 0xdf, 0x3b, 0x29, 0xd0, 0x54, 0xa5, + 0x70, 0x4e, 0x87, 0x8b, 0xdc, 0x70, 0x09, 0x9a, 0xc6, 0xcc, 0xba, 0xbc, 0xfb, 0xce, 0x92, 0xdc, + 0x5f, 0xaf, 0x3a, 0x4d, 0xfc, 0x2a, 0x2d, 0xde, 0xac, 0x03, 0xbf, 0x04, 0xd0, 0xb8, 0x0a, 0x42, + 0x38, 0x4d, 0xad, 0x51, 0xdb, 0x68, 0x04, 0xf1, 0xb5, 0x0c, 0x7c, 0x03, 0x0a, 0x76, 0x41, 0x85, + 0x91, 0x39, 0x75, 0xb6, 0x34, 0x3a, 0x1b, 0xfa, 0x63, 0x32, 0xa7, 0x58, 0x47, 0xa0, 0x07, 0x6c, + 0xf5, 0x2b, 0x42, 0x32, 0xa4, 0x4e, 0x55, 0xa7, 0xdd, 0x33, 0x69, 0xf6, 0xe3, 0x34, 0x80, 0xf3, + 0x1c, 0xf8, 0x19, 0xb0, 0x79, 0xa8, 0x5e, 0xf5, 0x80, 0x33, 0xa7, 0xa6, 0x01, 0x6e, 0x0a, 0x38, + 0x4d, 0x03, 0x57, 0x45, 0x03, 0xe7, 0x00, 0xf8, 0x14, 0xd4, 0x63, 0x41, 0xa3, 0x13, 0xf6, 0x9c, + 0x3b, 0x75, 0x2d, 0xe8, 0x87, 0xa8, 0x78, 0x43, 0x5e, 0x59, 0x7b, 0x25, 0x64, 0xdf, 0x64, 0xe7, + 0xef, 0x53, 0xea, 0xc1, 0x19, 0x13, 0xec, 0x83, 0x2a, 0x1f, 0xfc, 0x40, 0x87, 0xd2, 0xb1, 0x35, + 0xe7, 0xee, 0xad, 0x43, 0x32, 0x5b, 0x8b, 0x30, 0x39, 0x3f, 0xfe, 0x49, 0x52, 0xa6, 0xe6, 0xe3, + 0xdf, 0x35, 0xd4, 0xd5, 0x53, 0x4d, 0x82, 0x0d, 0x19, 0xfc, 0x1e, 0xd8, 0x7c, 0x36, 0x4a, 0x9c, + 0x0e, 0x78, 0x1b, 0xe6, 0x4c, 0xca, 0xd3, 0x94, 0x07, 0xe7, 0x94, 0x70, 0x07, 0x54, 0x47, 0xd1, + 0x12, 0xc7, 0xcc, 0x69, 0x74, 0xad, 0x5e, 0xdd, 0x07, 0xaa, 0x87, 0x23, 0xed, 0xc1, 0x26, 0x02, + 0x9f, 0x81, 0x1a, 0x0f, 0x95, 0x18, 0xc2, 0xd9, 0x7e, 0x9b, 0x0e, 0x9a, 0xa6, 0x83, 0xda, 0x69, + 0xc2, 0x82, 0x53, 0xba, 0x9d, 0xdf, 0x2b, 0xe0, 0x5e, 0xe1, 0x42, 0x89, 0x90, 0x33, 0x41, 0xff, + 0x93, 0x13, 0xf5, 0x11, 0xa8, 0x91, 0xd9, 0x8c, 0x9f, 0xd3, 0xe4, 0x4a, 0xd5, 0xf3, 0x26, 0x0e, + 0x13, 0x37, 0x4e, 0xe3, 0xf0, 0x0c, 0x54, 0x85, 0x24, 0x32, 0x16, 0xe6, 0xe2, 0x3c, 0x78, 0xbd, + 0xf5, 0x7a, 0xa2, 0x31, 0x89, 0x60, 0x98, 0x8a, 0x78, 0x26, 0xb1, 0xe1, 0x81, 0x1d, 0xb0, 0x15, + 0x12, 0x39, 0x9c, 0xe8, 0xab, 0xb2, 0xed, 0xdb, 0xeb, 0x55, 0x67, 0xeb, 0x4c, 0x39, 0x70, 0xe2, + 0x87, 0x07, 0xc0, 0xd6, 0x0f, 0x4f, 0x97, 0x61, 0xba, 0x18, 0x6d, 0x35, 0xa2, 0xb3, 0xd4, 0x79, + 0x55, 0x34, 0x70, 0x9e, 0x0c, 0x7f, 0xb1, 0x40, 0x8b, 0xc4, 0xa3, 0x40, 0x1e, 0x32, 0xc6, 0x25, + 0x49, 0xa6, 0x52, 0xed, 0x96, 0x7b, 0x8d, 0xfd, 0x63, 0xf4, 0x4f, 0x5f, 0x42, 0x74, 0x4d, 0x67, + 0x74, 0xb8, 0xc1, 0x73, 0xcc, 0x64, 0xb4, 0xf4, 0x1d, 0x23, 0x54, 0x6b, 0x33, 0x8c, 0xaf, 0x15, + 0x86, 0x3d, 0x50, 0x3f, 0x27, 0x11, 0x0b, 0xd8, 0x58, 0x38, 0xb5, 0x6e, 0x59, 0xed, 0xb7, 0x5a, + 0x8f, 0x6f, 0x8c, 0x0f, 0x67, 0xd1, 0xf6, 0xe7, 0xe0, 0xbd, 0x1b, 0xcb, 0xc1, 0x16, 0x28, 0x4f, + 0xe9, 0x32, 0x19, 0x36, 0x56, 0x8f, 0xf0, 0xff, 0x60, 0x6b, 0x41, 0x66, 0x31, 0xd5, 0x83, 0xb3, + 0x71, 0x62, 0x3c, 0xba, 0x73, 0x60, 0xed, 0xfc, 0x61, 0x81, 0x66, 0xe1, 0x6f, 0x2c, 0x02, 0x7a, + 0x0e, 0xfb, 0xa0, 0x66, 0x8e, 0x8e, 0xe6, 0x68, 0xec, 0xa3, 0xd7, 0x96, 0x41, 0xa3, 0xfc, 0x86, + 0x7a, 0x29, 0xd2, 0x8b, 0x98, 0x72, 0xc1, 0x6f, 0xf5, 0x87, 0x48, 0xeb, 0x64, 0x3e, 0x73, 0xde, + 0x1b, 0xca, 0x9b, 0x48, 0x91, 0x5a, 0x38, 0xa3, 0xf3, 0x77, 0x2f, 0x2e, 0xdd, 0xd2, 0x8b, 0x4b, + 0xb7, 0xf4, 0xf2, 0xd2, 0x2d, 0xfd, 0xbc, 0x76, 0xad, 0x8b, 0xb5, 0x6b, 0xbd, 0x58, 0xbb, 0xd6, + 0xcb, 0xb5, 0x6b, 0xfd, 0xb9, 0x76, 0xad, 0x5f, 0xff, 0x72, 0x4b, 0xdf, 0xd5, 0x0c, 0xf1, 0xdf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x23, 0xa1, 0xd9, 0x27, 0x09, 0x00, 0x00, } func (m *AdmissionRequest) Marshal() (dAtA []byte, err error) { @@ -370,6 +371,15 @@ func (m *AdmissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Warnings) > 0 { + for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Warnings[iNdEx]) + copy(dAtA[i:], m.Warnings[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Warnings[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } if len(m.AuditAnnotations) > 0 { keysForAuditAnnotations := make([]string, 0, len(m.AuditAnnotations)) for k := range m.AuditAnnotations { @@ -567,6 +577,12 @@ func (m *AdmissionResponse) Size() (n int) { n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } } + if len(m.Warnings) > 0 { + for _, s := range m.Warnings { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -638,6 +654,7 @@ func (this *AdmissionResponse) String() string { `Patch:` + valueToStringGenerated(this.Patch) + `,`, `PatchType:` + valueToStringGenerated(this.PatchType) + `,`, `AuditAnnotations:` + mapStringForAuditAnnotations + `,`, + `Warnings:` + fmt.Sprintf("%v", this.Warnings) + `,`, `}`, }, "") return s @@ -1508,6 +1525,38 @@ func (m *AdmissionResponse) Unmarshal(dAtA []byte) error { } m.AuditAnnotations[mapkey] = mapvalue iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warnings = append(m.Warnings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/api/admission/v1beta1/generated.proto b/vendor/k8s.io/api/admission/v1beta1/generated.proto index 6999b80c27a..2683850378c 100644 --- a/vendor/k8s.io/api/admission/v1beta1/generated.proto +++ b/vendor/k8s.io/api/admission/v1beta1/generated.proto @@ -145,6 +145,13 @@ message AdmissionResponse { // the admission webhook to add additional context to the audit log for this request. // +optional map auditAnnotations = 6; + + // warnings is a list of warning messages to return to the requesting API client. + // Warning messages describe a problem the client making the API request should correct or be aware of. + // Limit warnings to 120 characters if possible. + // Warnings over 256 characters and large numbers of warnings may be truncated. + // +optional + repeated string warnings = 7; } // AdmissionReview describes an admission review request/response. diff --git a/vendor/k8s.io/api/admission/v1beta1/types.go b/vendor/k8s.io/api/admission/v1beta1/types.go index 2cb9ea55a38..00c619d9986 100644 --- a/vendor/k8s.io/api/admission/v1beta1/types.go +++ b/vendor/k8s.io/api/admission/v1beta1/types.go @@ -24,6 +24,11 @@ import ( ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.9 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// This API is never server served. It is used for outbound requests from apiservers. This will ensure it never gets served accidentally +// and having the generator against this group will protect future APIs which may be served. +// +k8s:prerelease-lifecycle-gen:replacement=admission.k8s.io,v1,AdmissionReview // AdmissionReview describes an admission review request/response. type AdmissionReview struct { @@ -140,6 +145,13 @@ type AdmissionResponse struct { // the admission webhook to add additional context to the audit log for this request. // +optional AuditAnnotations map[string]string `json:"auditAnnotations,omitempty" protobuf:"bytes,6,opt,name=auditAnnotations"` + + // warnings is a list of warning messages to return to the requesting API client. + // Warning messages describe a problem the client making the API request should correct or be aware of. + // Limit warnings to 120 characters if possible. + // Warnings over 256 characters and large numbers of warnings may be truncated. + // +optional + Warnings []string `json:"warnings,omitempty" protobuf:"bytes,7,rep,name=warnings"` } // PatchType is the type of patch being used to represent the mutated object diff --git a/vendor/k8s.io/api/admission/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admission/v1beta1/types_swagger_doc_generated.go index 2ef98db8729..13067ad80d5 100644 --- a/vendor/k8s.io/api/admission/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/admission/v1beta1/types_swagger_doc_generated.go @@ -58,6 +58,7 @@ var map_AdmissionResponse = map[string]string{ "patch": "The patch body. Currently we only support \"JSONPatch\" which implements RFC 6902.", "patchType": "The type of Patch. Currently we only allow \"JSONPatch\".", "auditAnnotations": "AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by the admission webhook to add additional context to the audit log for this request.", + "warnings": "warnings is a list of warning messages to return to the requesting API client. Warning messages describe a problem the client making the API request should correct or be aware of. Limit warnings to 120 characters if possible. Warnings over 256 characters and large numbers of warnings may be truncated.", } func (AdmissionResponse) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/admission/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/admission/v1beta1/zz_generated.deepcopy.go index e4704c86dd3..4f3dd45beaa 100644 --- a/vendor/k8s.io/api/admission/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/admission/v1beta1/zz_generated.deepcopy.go @@ -87,6 +87,11 @@ func (in *AdmissionResponse) DeepCopyInto(out *AdmissionResponse) { (*out)[key] = val } } + if in.Warnings != nil { + in, out := &in.Warnings, &out.Warnings + *out = make([]string, len(*in)) + copy(*out, *in) + } return } diff --git a/vendor/k8s.io/api/admission/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/admission/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..8fc1cde0a6b --- /dev/null +++ b/vendor/k8s.io/api/admission/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,49 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *AdmissionReview) APILifecycleIntroduced() (major, minor int) { + return 1, 9 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *AdmissionReview) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *AdmissionReview) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "admission.k8s.io", Version: "v1", Kind: "AdmissionReview"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *AdmissionReview) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/api/admissionregistration/v1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1/generated.proto index f102f3a7ec5..7f9772e7de6 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/generated.proto +++ b/vendor/k8s.io/api/admissionregistration/v1/generated.proto @@ -245,8 +245,8 @@ message Rule { // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make // sure that all the tuple expansions are valid. message RuleWithOperations { - // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * - // for all operations. + // Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * + // for all of those operations and any future admission operations that are added. // If '*' is present, the length of the slice must be one. // Required. repeated string operations = 1; diff --git a/vendor/k8s.io/api/admissionregistration/v1/types.go b/vendor/k8s.io/api/admissionregistration/v1/types.go index 114a4c68a93..74b87828747 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/types.go +++ b/vendor/k8s.io/api/admissionregistration/v1/types.go @@ -462,8 +462,8 @@ const ( // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make // sure that all the tuple expansions are valid. type RuleWithOperations struct { - // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * - // for all operations. + // Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * + // for all of those operations and any future admission operations that are added. // If '*' is present, the length of the slice must be one. // Required. Operations []OperationType `json:"operations,omitempty" protobuf:"bytes,1,rep,name=operations,casttype=OperationType"` diff --git a/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go index 2fde0ce37de..5ec59304c5b 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go @@ -80,7 +80,7 @@ func (Rule) SwaggerDoc() map[string]string { var map_RuleWithOperations = map[string]string{ "": "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.", - "operations": "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.", + "operations": "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", } func (RuleWithOperations) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/BUILD b/vendor/k8s.io/api/admissionregistration/v1beta1/BUILD index 862c814fb7a..1a119846a55 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/BUILD +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/BUILD @@ -14,6 +14,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/admissionregistration/v1beta1", importpath = "k8s.io/api/admissionregistration/v1beta1", diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go b/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go index 0a40726faee..0095cb257a4 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=admissionregistration.k8s.io // Package v1beta1 is the v1beta1 version of the API. diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto index 086cbcc7986..70ffa921962 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto @@ -249,8 +249,8 @@ message Rule { // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make // sure that all the tuple expansions are valid. message RuleWithOperations { - // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * - // for all operations. + // Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * + // for all of those operations and any future admission operations that are added. // If '*' is present, the length of the slice must be one. // Required. repeated string operations = 1; diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/types.go b/vendor/k8s.io/api/admissionregistration/v1beta1/types.go index 37a993e3e5a..2297b7e130f 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/types.go +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/types.go @@ -113,6 +113,10 @@ const ( // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.9 +// +k8s:prerelease-lifecycle-gen:deprecated=1.16 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=admissionregistration.k8s.io,v1,ValidatingWebhookConfiguration // ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. // Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead. @@ -129,6 +133,10 @@ type ValidatingWebhookConfiguration struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.9 +// +k8s:prerelease-lifecycle-gen:deprecated=1.16 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=admissionregistration.k8s.io,v1,ValidatingWebhookConfigurationList // ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. type ValidatingWebhookConfigurationList struct { @@ -144,6 +152,10 @@ type ValidatingWebhookConfigurationList struct { // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.9 +// +k8s:prerelease-lifecycle-gen:deprecated=1.16 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=admissionregistration.k8s.io,v1,MutatingWebhookConfiguration // MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. // Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead. @@ -160,6 +172,10 @@ type MutatingWebhookConfiguration struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.9 +// +k8s:prerelease-lifecycle-gen:deprecated=1.16 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=admissionregistration.k8s.io,v1,MutatingWebhookConfigurationList // MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. type MutatingWebhookConfigurationList struct { @@ -470,8 +486,8 @@ const ( // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make // sure that all the tuple expansions are valid. type RuleWithOperations struct { - // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * - // for all operations. + // Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * + // for all of those operations and any future admission operations that are added. // If '*' is present, the length of the slice must be one. // Required. Operations []OperationType `json:"operations,omitempty" protobuf:"bytes,1,rep,name=operations,casttype=OperationType"` diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go index d9fb5af8fcb..f682172bba7 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go @@ -80,7 +80,7 @@ func (Rule) SwaggerDoc() map[string]string { var map_RuleWithOperations = map[string]string{ "": "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.", - "operations": "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.", + "operations": "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", } func (RuleWithOperations) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..bfd93a05ad3 --- /dev/null +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,121 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *MutatingWebhookConfiguration) APILifecycleIntroduced() (major, minor int) { + return 1, 9 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *MutatingWebhookConfiguration) APILifecycleDeprecated() (major, minor int) { + return 1, 16 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *MutatingWebhookConfiguration) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "MutatingWebhookConfiguration"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *MutatingWebhookConfiguration) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *MutatingWebhookConfigurationList) APILifecycleIntroduced() (major, minor int) { + return 1, 9 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *MutatingWebhookConfigurationList) APILifecycleDeprecated() (major, minor int) { + return 1, 16 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *MutatingWebhookConfigurationList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "MutatingWebhookConfigurationList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *MutatingWebhookConfigurationList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ValidatingWebhookConfiguration) APILifecycleIntroduced() (major, minor int) { + return 1, 9 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ValidatingWebhookConfiguration) APILifecycleDeprecated() (major, minor int) { + return 1, 16 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ValidatingWebhookConfiguration) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingWebhookConfiguration"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ValidatingWebhookConfiguration) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ValidatingWebhookConfigurationList) APILifecycleIntroduced() (major, minor int) { + return 1, 9 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ValidatingWebhookConfigurationList) APILifecycleDeprecated() (major, minor int) { + return 1, 16 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ValidatingWebhookConfigurationList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingWebhookConfigurationList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ValidatingWebhookConfigurationList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/api/apps/v1beta1/BUILD b/vendor/k8s.io/api/apps/v1beta1/BUILD index edde9701290..c25a81b1d61 100644 --- a/vendor/k8s.io/api/apps/v1beta1/BUILD +++ b/vendor/k8s.io/api/apps/v1beta1/BUILD @@ -14,6 +14,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta1", importpath = "k8s.io/api/apps/v1beta1", diff --git a/vendor/k8s.io/api/apps/v1beta1/doc.go b/vendor/k8s.io/api/apps/v1beta1/doc.go index 9072bab692f..38a358551a8 100644 --- a/vendor/k8s.io/api/apps/v1beta1/doc.go +++ b/vendor/k8s.io/api/apps/v1beta1/doc.go @@ -17,5 +17,6 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true package v1beta1 // import "k8s.io/api/apps/v1beta1" diff --git a/vendor/k8s.io/api/apps/v1beta1/types.go b/vendor/k8s.io/api/apps/v1beta1/types.go index b77fcf7af21..1f4a292f516 100644 --- a/vendor/k8s.io/api/apps/v1beta1/types.go +++ b/vendor/k8s.io/api/apps/v1beta1/types.go @@ -56,6 +56,10 @@ type ScaleStatus struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=autoscaling,v1,Scale // Scale represents a scaling request for a resource. type Scale struct { @@ -75,6 +79,10 @@ type Scale struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.5 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,StatefulSet // DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for // more information. @@ -274,6 +282,10 @@ type StatefulSetCondition struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.5 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,StatefulSetList // StatefulSetList is a collection of StatefulSets. type StatefulSetList struct { @@ -285,6 +297,10 @@ type StatefulSetList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,Deployment // DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for // more information. @@ -355,6 +371,10 @@ type DeploymentSpec struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,DeploymentRollback // DEPRECATED. // DeploymentRollback stores the information required to rollback a deployment. @@ -512,6 +532,10 @@ type DeploymentCondition struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,DeploymentList // DeploymentList is a list of Deployments. type DeploymentList struct { @@ -526,6 +550,10 @@ type DeploymentList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.7 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,ControllerRevision // DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the // release notes for more information. @@ -553,6 +581,10 @@ type ControllerRevision struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.7 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,ControllerRevisionList // ControllerRevisionList is a resource containing a list of ControllerRevision objects. type ControllerRevisionList struct { diff --git a/vendor/k8s.io/api/apps/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/apps/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..80a5e2f2bd5 --- /dev/null +++ b/vendor/k8s.io/api/apps/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,217 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ControllerRevision) APILifecycleIntroduced() (major, minor int) { + return 1, 7 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ControllerRevision) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ControllerRevision) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ControllerRevision"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ControllerRevision) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ControllerRevisionList) APILifecycleIntroduced() (major, minor int) { + return 1, 7 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ControllerRevisionList) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ControllerRevisionList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ControllerRevisionList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ControllerRevisionList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Deployment) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Deployment) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Deployment) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Deployment) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DeploymentList) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DeploymentList) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *DeploymentList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DeploymentList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DeploymentList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DeploymentRollback) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DeploymentRollback) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *DeploymentRollback) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DeploymentRollback"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DeploymentRollback) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Scale) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Scale) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Scale) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "autoscaling", Version: "v1", Kind: "Scale"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Scale) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *StatefulSet) APILifecycleIntroduced() (major, minor int) { + return 1, 5 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *StatefulSet) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *StatefulSet) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSet"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *StatefulSet) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *StatefulSetList) APILifecycleIntroduced() (major, minor int) { + return 1, 5 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *StatefulSetList) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *StatefulSetList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSetList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *StatefulSetList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} diff --git a/vendor/k8s.io/api/apps/v1beta2/BUILD b/vendor/k8s.io/api/apps/v1beta2/BUILD index 39f66bfd2c2..b8da8a396b2 100644 --- a/vendor/k8s.io/api/apps/v1beta2/BUILD +++ b/vendor/k8s.io/api/apps/v1beta2/BUILD @@ -14,6 +14,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/apps/v1beta2", importpath = "k8s.io/api/apps/v1beta2", diff --git a/vendor/k8s.io/api/apps/v1beta2/doc.go b/vendor/k8s.io/api/apps/v1beta2/doc.go index 9f499869fdf..ac91fddfd50 100644 --- a/vendor/k8s.io/api/apps/v1beta2/doc.go +++ b/vendor/k8s.io/api/apps/v1beta2/doc.go @@ -17,5 +17,6 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true package v1beta2 // import "k8s.io/api/apps/v1beta2" diff --git a/vendor/k8s.io/api/apps/v1beta2/types.go b/vendor/k8s.io/api/apps/v1beta2/types.go index d358455f0eb..3d294697c13 100644 --- a/vendor/k8s.io/api/apps/v1beta2/types.go +++ b/vendor/k8s.io/api/apps/v1beta2/types.go @@ -58,6 +58,10 @@ type ScaleStatus struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=autoscaling,v1,Scale // Scale represents a scaling request for a resource. type Scale struct { @@ -79,6 +83,10 @@ type Scale struct { // +genclient:method=GetScale,verb=get,subresource=scale,result=Scale // +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,StatefulSet // DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for // more information. @@ -282,6 +290,10 @@ type StatefulSetCondition struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,StatefulSetList // StatefulSetList is a collection of StatefulSets. type StatefulSetList struct { @@ -293,6 +305,10 @@ type StatefulSetList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,Deployment // DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for // more information. @@ -492,6 +508,10 @@ type DeploymentCondition struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,DeploymentList // DeploymentList is a list of Deployments. type DeploymentList struct { @@ -659,6 +679,10 @@ type DaemonSetCondition struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,DaemonSet // DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for // more information. @@ -692,6 +716,10 @@ const ( ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,DaemonSetList // DaemonSetList is a collection of daemon sets. type DaemonSetList struct { @@ -707,6 +735,10 @@ type DaemonSetList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,ReplicaSet // DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for // more information. @@ -735,6 +767,10 @@ type ReplicaSet struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,ReplicaSetList // ReplicaSetList is a collection of ReplicaSets. type ReplicaSetList struct { @@ -835,6 +871,10 @@ type ReplicaSetCondition struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,ControllerRevision // DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the // release notes for more information. @@ -862,6 +902,10 @@ type ControllerRevision struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,ControllerRevisionList // ControllerRevisionList is a resource containing a list of ControllerRevision objects. type ControllerRevisionList struct { diff --git a/vendor/k8s.io/api/apps/v1beta2/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/apps/v1beta2/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..3a63b8f1287 --- /dev/null +++ b/vendor/k8s.io/api/apps/v1beta2/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,289 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta2 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ControllerRevision) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ControllerRevision) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ControllerRevision) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ControllerRevision"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ControllerRevision) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ControllerRevisionList) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ControllerRevisionList) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ControllerRevisionList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ControllerRevisionList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ControllerRevisionList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DaemonSet) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DaemonSet) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *DaemonSet) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSet"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DaemonSet) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DaemonSetList) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DaemonSetList) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *DaemonSetList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSetList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DaemonSetList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Deployment) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Deployment) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Deployment) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Deployment) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DeploymentList) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DeploymentList) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *DeploymentList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DeploymentList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DeploymentList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ReplicaSet) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ReplicaSet) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ReplicaSet) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSet"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ReplicaSet) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ReplicaSetList) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ReplicaSetList) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ReplicaSetList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSetList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ReplicaSetList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Scale) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Scale) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Scale) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "autoscaling", Version: "v1", Kind: "Scale"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Scale) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *StatefulSet) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *StatefulSet) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *StatefulSet) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSet"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *StatefulSet) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *StatefulSetList) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *StatefulSetList) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *StatefulSetList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSetList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *StatefulSetList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/generated.pb.go b/vendor/k8s.io/api/auditregistration/v1alpha1/generated.pb.go deleted file mode 100644 index f8eec3df2b5..00000000000 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/generated.pb.go +++ /dev/null @@ -1,2030 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/auditregistration/v1alpha1/generated.proto - -package v1alpha1 - -import ( - fmt "fmt" - - io "io" - - proto "github.com/gogo/protobuf/proto" - - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *AuditSink) Reset() { *m = AuditSink{} } -func (*AuditSink) ProtoMessage() {} -func (*AuditSink) Descriptor() ([]byte, []int) { - return fileDescriptor_642d3597c6afa8ba, []int{0} -} -func (m *AuditSink) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuditSink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AuditSink) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuditSink.Merge(m, src) -} -func (m *AuditSink) XXX_Size() int { - return m.Size() -} -func (m *AuditSink) XXX_DiscardUnknown() { - xxx_messageInfo_AuditSink.DiscardUnknown(m) -} - -var xxx_messageInfo_AuditSink proto.InternalMessageInfo - -func (m *AuditSinkList) Reset() { *m = AuditSinkList{} } -func (*AuditSinkList) ProtoMessage() {} -func (*AuditSinkList) Descriptor() ([]byte, []int) { - return fileDescriptor_642d3597c6afa8ba, []int{1} -} -func (m *AuditSinkList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuditSinkList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AuditSinkList) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuditSinkList.Merge(m, src) -} -func (m *AuditSinkList) XXX_Size() int { - return m.Size() -} -func (m *AuditSinkList) XXX_DiscardUnknown() { - xxx_messageInfo_AuditSinkList.DiscardUnknown(m) -} - -var xxx_messageInfo_AuditSinkList proto.InternalMessageInfo - -func (m *AuditSinkSpec) Reset() { *m = AuditSinkSpec{} } -func (*AuditSinkSpec) ProtoMessage() {} -func (*AuditSinkSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_642d3597c6afa8ba, []int{2} -} -func (m *AuditSinkSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuditSinkSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *AuditSinkSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuditSinkSpec.Merge(m, src) -} -func (m *AuditSinkSpec) XXX_Size() int { - return m.Size() -} -func (m *AuditSinkSpec) XXX_DiscardUnknown() { - xxx_messageInfo_AuditSinkSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_AuditSinkSpec proto.InternalMessageInfo - -func (m *Policy) Reset() { *m = Policy{} } -func (*Policy) ProtoMessage() {} -func (*Policy) Descriptor() ([]byte, []int) { - return fileDescriptor_642d3597c6afa8ba, []int{3} -} -func (m *Policy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Policy) XXX_Merge(src proto.Message) { - xxx_messageInfo_Policy.Merge(m, src) -} -func (m *Policy) XXX_Size() int { - return m.Size() -} -func (m *Policy) XXX_DiscardUnknown() { - xxx_messageInfo_Policy.DiscardUnknown(m) -} - -var xxx_messageInfo_Policy proto.InternalMessageInfo - -func (m *ServiceReference) Reset() { *m = ServiceReference{} } -func (*ServiceReference) ProtoMessage() {} -func (*ServiceReference) Descriptor() ([]byte, []int) { - return fileDescriptor_642d3597c6afa8ba, []int{4} -} -func (m *ServiceReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ServiceReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceReference.Merge(m, src) -} -func (m *ServiceReference) XXX_Size() int { - return m.Size() -} -func (m *ServiceReference) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceReference.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceReference proto.InternalMessageInfo - -func (m *Webhook) Reset() { *m = Webhook{} } -func (*Webhook) ProtoMessage() {} -func (*Webhook) Descriptor() ([]byte, []int) { - return fileDescriptor_642d3597c6afa8ba, []int{5} -} -func (m *Webhook) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Webhook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Webhook) XXX_Merge(src proto.Message) { - xxx_messageInfo_Webhook.Merge(m, src) -} -func (m *Webhook) XXX_Size() int { - return m.Size() -} -func (m *Webhook) XXX_DiscardUnknown() { - xxx_messageInfo_Webhook.DiscardUnknown(m) -} - -var xxx_messageInfo_Webhook proto.InternalMessageInfo - -func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } -func (*WebhookClientConfig) ProtoMessage() {} -func (*WebhookClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_642d3597c6afa8ba, []int{6} -} -func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WebhookClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WebhookClientConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_WebhookClientConfig.Merge(m, src) -} -func (m *WebhookClientConfig) XXX_Size() int { - return m.Size() -} -func (m *WebhookClientConfig) XXX_DiscardUnknown() { - xxx_messageInfo_WebhookClientConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo - -func (m *WebhookThrottleConfig) Reset() { *m = WebhookThrottleConfig{} } -func (*WebhookThrottleConfig) ProtoMessage() {} -func (*WebhookThrottleConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_642d3597c6afa8ba, []int{7} -} -func (m *WebhookThrottleConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WebhookThrottleConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WebhookThrottleConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_WebhookThrottleConfig.Merge(m, src) -} -func (m *WebhookThrottleConfig) XXX_Size() int { - return m.Size() -} -func (m *WebhookThrottleConfig) XXX_DiscardUnknown() { - xxx_messageInfo_WebhookThrottleConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_WebhookThrottleConfig proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AuditSink)(nil), "k8s.io.api.auditregistration.v1alpha1.AuditSink") - proto.RegisterType((*AuditSinkList)(nil), "k8s.io.api.auditregistration.v1alpha1.AuditSinkList") - proto.RegisterType((*AuditSinkSpec)(nil), "k8s.io.api.auditregistration.v1alpha1.AuditSinkSpec") - proto.RegisterType((*Policy)(nil), "k8s.io.api.auditregistration.v1alpha1.Policy") - proto.RegisterType((*ServiceReference)(nil), "k8s.io.api.auditregistration.v1alpha1.ServiceReference") - proto.RegisterType((*Webhook)(nil), "k8s.io.api.auditregistration.v1alpha1.Webhook") - proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.api.auditregistration.v1alpha1.WebhookClientConfig") - proto.RegisterType((*WebhookThrottleConfig)(nil), "k8s.io.api.auditregistration.v1alpha1.WebhookThrottleConfig") -} - -func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/auditregistration/v1alpha1/generated.proto", fileDescriptor_642d3597c6afa8ba) -} - -var fileDescriptor_642d3597c6afa8ba = []byte{ - // 765 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x41, 0x6f, 0x13, 0x47, - 0x14, 0xf6, 0xc6, 0x76, 0x6c, 0x4f, 0x9c, 0x36, 0x9d, 0xb4, 0x95, 0x1b, 0x55, 0x6b, 0x6b, 0xa5, - 0x4a, 0x91, 0xda, 0xcc, 0x36, 0x55, 0xd4, 0x56, 0x88, 0x4b, 0x36, 0x27, 0xa4, 0x10, 0xc2, 0x98, - 0x80, 0x40, 0x08, 0x31, 0x5e, 0x3f, 0xef, 0x0e, 0xb6, 0x77, 0x97, 0xdd, 0x59, 0xa3, 0xdc, 0xf8, - 0x09, 0xfc, 0x05, 0xfe, 0x06, 0x37, 0x24, 0x90, 0x72, 0xcc, 0x31, 0xa7, 0x88, 0x98, 0x03, 0xff, - 0x81, 0x13, 0x9a, 0xd9, 0x59, 0xdb, 0xc4, 0x41, 0x38, 0xb7, 0x79, 0xdf, 0x7b, 0xdf, 0xf7, 0xbe, - 0xf7, 0xde, 0xa0, 0x83, 0xfe, 0xff, 0x09, 0xe1, 0xa1, 0xdd, 0x4f, 0x3b, 0x10, 0x07, 0x20, 0x20, - 0xb1, 0x47, 0x10, 0x74, 0xc3, 0xd8, 0xd6, 0x09, 0x16, 0x71, 0x9b, 0xa5, 0x5d, 0x2e, 0x62, 0xf0, - 0x78, 0x22, 0x62, 0x26, 0x78, 0x18, 0xd8, 0xa3, 0x6d, 0x36, 0x88, 0x7c, 0xb6, 0x6d, 0x7b, 0x10, - 0x40, 0xcc, 0x04, 0x74, 0x49, 0x14, 0x87, 0x22, 0xc4, 0x7f, 0x64, 0x34, 0xc2, 0x22, 0x4e, 0xe6, - 0x68, 0x24, 0xa7, 0x6d, 0x6c, 0x79, 0x5c, 0xf8, 0x69, 0x87, 0xb8, 0xe1, 0xd0, 0xf6, 0x42, 0x2f, - 0xb4, 0x15, 0xbb, 0x93, 0xf6, 0x54, 0xa4, 0x02, 0xf5, 0xca, 0x54, 0x37, 0x76, 0xa6, 0x66, 0x86, - 0xcc, 0xf5, 0x79, 0x00, 0xf1, 0xb1, 0x1d, 0xf5, 0x3d, 0x09, 0x24, 0xf6, 0x10, 0x04, 0xb3, 0x47, - 0x73, 0x5e, 0x36, 0xec, 0x6f, 0xb1, 0xe2, 0x34, 0x10, 0x7c, 0x08, 0x73, 0x84, 0x7f, 0xbf, 0x47, - 0x48, 0x5c, 0x1f, 0x86, 0xec, 0x32, 0xcf, 0x7a, 0x6f, 0xa0, 0xda, 0xae, 0x1c, 0xb6, 0xcd, 0x83, - 0x3e, 0x7e, 0x8a, 0xaa, 0xd2, 0x51, 0x97, 0x09, 0xd6, 0x30, 0x5a, 0xc6, 0xe6, 0xca, 0x3f, 0x7f, - 0x93, 0xe9, 0x56, 0x26, 0xc2, 0x24, 0xea, 0x7b, 0x12, 0x48, 0x88, 0xac, 0x26, 0xa3, 0x6d, 0x72, - 0xa7, 0xf3, 0x0c, 0x5c, 0x71, 0x1b, 0x04, 0x73, 0xf0, 0xc9, 0x79, 0xb3, 0x30, 0x3e, 0x6f, 0xa2, - 0x29, 0x46, 0x27, 0xaa, 0xf8, 0x3e, 0x2a, 0x25, 0x11, 0xb8, 0x8d, 0x25, 0xa5, 0xbe, 0x43, 0x16, - 0xda, 0x39, 0x99, 0x38, 0x6c, 0x47, 0xe0, 0x3a, 0x75, 0xdd, 0xa1, 0x24, 0x23, 0xaa, 0xf4, 0xac, - 0x77, 0x06, 0x5a, 0x9d, 0x54, 0xed, 0xf3, 0x44, 0xe0, 0xc7, 0x73, 0xb3, 0x90, 0xc5, 0x66, 0x91, - 0x6c, 0x35, 0xc9, 0x9a, 0xee, 0x53, 0xcd, 0x91, 0x99, 0x39, 0x8e, 0x50, 0x99, 0x0b, 0x18, 0x26, - 0x8d, 0xa5, 0x56, 0xf1, 0xd2, 0x9a, 0x16, 0x1a, 0xc4, 0x59, 0xd5, 0xe2, 0xe5, 0x5b, 0x52, 0x86, - 0x66, 0x6a, 0xd6, 0xdb, 0xd9, 0x31, 0xe4, 0x78, 0xf8, 0x08, 0x2d, 0x47, 0xe1, 0x80, 0xbb, 0xc7, - 0x7a, 0x88, 0xad, 0x05, 0x3b, 0x1d, 0x2a, 0x92, 0xf3, 0x83, 0x6e, 0xb3, 0x9c, 0xc5, 0x54, 0x8b, - 0xe1, 0x87, 0xa8, 0xf2, 0x02, 0x3a, 0x7e, 0x18, 0xf6, 0xf5, 0x29, 0xc8, 0x82, 0xba, 0x0f, 0x32, - 0x96, 0xf3, 0xa3, 0x16, 0xae, 0x68, 0x80, 0xe6, 0x7a, 0x96, 0x8b, 0x74, 0x33, 0xfc, 0x17, 0x2a, - 0x0f, 0x60, 0x04, 0x03, 0x65, 0xbd, 0xe6, 0xfc, 0x9a, 0x8f, 0xbc, 0x2f, 0xc1, 0xcf, 0xf9, 0x83, - 0x66, 0x45, 0xf8, 0x4f, 0xb4, 0x9c, 0x08, 0xe6, 0x41, 0xb6, 0xd3, 0x9a, 0xb3, 0x2e, 0x6d, 0xb7, - 0x15, 0x22, 0x6b, 0xd5, 0x8b, 0xea, 0x12, 0xeb, 0xb5, 0x81, 0xd6, 0xda, 0x10, 0x8f, 0xb8, 0x0b, - 0x14, 0x7a, 0x10, 0x43, 0xe0, 0x02, 0xb6, 0x51, 0x2d, 0x60, 0x43, 0x48, 0x22, 0xe6, 0x82, 0xee, - 0xf9, 0x93, 0xee, 0x59, 0x3b, 0xc8, 0x13, 0x74, 0x5a, 0x83, 0x5b, 0xa8, 0x24, 0x03, 0xb5, 0x82, - 0xda, 0xf4, 0x5f, 0xc9, 0x5a, 0xaa, 0x32, 0xf8, 0x77, 0x54, 0x8a, 0x98, 0xf0, 0x1b, 0x45, 0x55, - 0x51, 0x95, 0xd9, 0x43, 0x26, 0x7c, 0xaa, 0x50, 0x95, 0x0d, 0x63, 0xd1, 0x28, 0xb5, 0x8c, 0xcd, - 0xb2, 0xce, 0x86, 0xb1, 0xa0, 0x0a, 0xb5, 0x3e, 0x19, 0x28, 0xdf, 0x0e, 0xee, 0xa1, 0xaa, 0xf0, - 0xe3, 0x50, 0x88, 0x01, 0xe8, 0x43, 0xde, 0xbc, 0xde, 0xc2, 0xef, 0x69, 0xf6, 0x5e, 0x18, 0xf4, - 0xb8, 0xe7, 0xd4, 0xe5, 0xbf, 0xcc, 0x31, 0x3a, 0xd1, 0xc6, 0x02, 0xd5, 0xdd, 0x01, 0x87, 0x40, - 0x64, 0x75, 0xfa, 0xb8, 0x37, 0xae, 0xd7, 0x6b, 0x6f, 0x46, 0xc1, 0xf9, 0x59, 0x6f, 0xa5, 0x3e, - 0x8b, 0xd2, 0xaf, 0xba, 0x58, 0x6f, 0x0c, 0xb4, 0x7e, 0x05, 0x17, 0xff, 0x86, 0x8a, 0x69, 0x9c, - 0x9f, 0xbf, 0x32, 0x3e, 0x6f, 0x16, 0x8f, 0xe8, 0x3e, 0x95, 0x18, 0x7e, 0x82, 0x2a, 0x49, 0x76, - 0x3f, 0xed, 0xf1, 0xbf, 0x05, 0x3d, 0x5e, 0xbe, 0xba, 0xb3, 0x22, 0x7f, 0x61, 0x8e, 0xe6, 0xa2, - 0x78, 0x13, 0x55, 0x5d, 0xe6, 0xa4, 0x41, 0x77, 0x00, 0xea, 0x78, 0xf5, 0x6c, 0x65, 0x7b, 0xbb, - 0x19, 0x46, 0x27, 0x59, 0xab, 0x8d, 0x7e, 0xb9, 0x72, 0xc7, 0xd2, 0xfd, 0xf3, 0x28, 0x51, 0xee, - 0x8b, 0x99, 0xfb, 0xbb, 0x87, 0x6d, 0x2a, 0x31, 0xdc, 0x44, 0xe5, 0x4e, 0x1a, 0x27, 0x42, 0x79, - 0x2f, 0x3a, 0x35, 0xf9, 0xab, 0x1d, 0x09, 0xd0, 0x0c, 0x77, 0xc8, 0xc9, 0x85, 0x59, 0x38, 0xbd, - 0x30, 0x0b, 0x67, 0x17, 0x66, 0xe1, 0xe5, 0xd8, 0x34, 0x4e, 0xc6, 0xa6, 0x71, 0x3a, 0x36, 0x8d, - 0xb3, 0xb1, 0x69, 0x7c, 0x18, 0x9b, 0xc6, 0xab, 0x8f, 0x66, 0xe1, 0x51, 0x35, 0x9f, 0xea, 0x4b, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x6c, 0xff, 0x86, 0xcd, 0x06, 0x00, 0x00, -} - -func (m *AuditSink) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuditSink) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuditSink) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *AuditSinkList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuditSinkList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuditSinkList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *AuditSinkSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuditSinkSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuditSinkSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Webhook.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Policy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Policy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Policy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Policy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Stages) > 0 { - for iNdEx := len(m.Stages) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Stages[iNdEx]) - copy(dAtA[i:], m.Stages[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Stages[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Level) - copy(dAtA[i:], m.Level) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Level))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ServiceReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Port != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Port)) - i-- - dAtA[i] = 0x20 - } - if m.Path != nil { - i -= len(*m.Path) - copy(dAtA[i:], *m.Path) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Path))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Webhook) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Webhook) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Webhook) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ClientConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.Throttle != nil { - { - size, err := m.Throttle.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WebhookClientConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WebhookClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CABundle != nil { - i -= len(m.CABundle) - copy(dAtA[i:], m.CABundle) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) - i-- - dAtA[i] = 0x1a - } - if m.Service != nil { - { - size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.URL != nil { - i -= len(*m.URL) - copy(dAtA[i:], *m.URL) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.URL))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WebhookThrottleConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WebhookThrottleConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WebhookThrottleConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Burst != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Burst)) - i-- - dAtA[i] = 0x10 - } - if m.QPS != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.QPS)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AuditSink) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *AuditSinkList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *AuditSinkSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Policy.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Webhook.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *Policy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Level) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Stages) > 0 { - for _, s := range m.Stages { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ServiceReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if m.Path != nil { - l = len(*m.Path) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Port != nil { - n += 1 + sovGenerated(uint64(*m.Port)) - } - return n -} - -func (m *Webhook) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Throttle != nil { - l = m.Throttle.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = m.ClientConfig.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *WebhookClientConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.URL != nil { - l = len(*m.URL) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Service != nil { - l = m.Service.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.CABundle != nil { - l = len(m.CABundle) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *WebhookThrottleConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.QPS != nil { - n += 1 + sovGenerated(uint64(*m.QPS)) - } - if m.Burst != nil { - n += 1 + sovGenerated(uint64(*m.Burst)) - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *AuditSink) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AuditSink{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "AuditSinkSpec", "AuditSinkSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *AuditSinkList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]AuditSink{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "AuditSink", "AuditSink", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&AuditSinkList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *AuditSinkSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AuditSinkSpec{`, - `Policy:` + strings.Replace(strings.Replace(this.Policy.String(), "Policy", "Policy", 1), `&`, ``, 1) + `,`, - `Webhook:` + strings.Replace(strings.Replace(this.Webhook.String(), "Webhook", "Webhook", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *Policy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Policy{`, - `Level:` + fmt.Sprintf("%v", this.Level) + `,`, - `Stages:` + fmt.Sprintf("%v", this.Stages) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceReference{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Path:` + valueToStringGenerated(this.Path) + `,`, - `Port:` + valueToStringGenerated(this.Port) + `,`, - `}`, - }, "") - return s -} -func (this *Webhook) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Webhook{`, - `Throttle:` + strings.Replace(this.Throttle.String(), "WebhookThrottleConfig", "WebhookThrottleConfig", 1) + `,`, - `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *WebhookClientConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&WebhookClientConfig{`, - `URL:` + valueToStringGenerated(this.URL) + `,`, - `Service:` + strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1) + `,`, - `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, - `}`, - }, "") - return s -} -func (this *WebhookThrottleConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&WebhookThrottleConfig{`, - `QPS:` + valueToStringGenerated(this.QPS) + `,`, - `Burst:` + valueToStringGenerated(this.Burst) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *AuditSink) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuditSink: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuditSink: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuditSinkList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuditSinkList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuditSinkList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, AuditSink{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuditSinkSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuditSinkSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuditSinkSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Policy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Webhook", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Webhook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Policy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Policy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Policy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Level = Level(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stages", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Stages = append(m.Stages, Stage(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Path = &s - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Port = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Webhook) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Webhook: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Webhook: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Throttle", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Throttle == nil { - m.Throttle = &WebhookThrottleConfig{} - } - if err := m.Throttle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ClientConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WebhookClientConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WebhookClientConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WebhookClientConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.URL = &s - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Service == nil { - m.Service = &ServiceReference{} - } - if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CABundle = append(m.CABundle[:0], dAtA[iNdEx:postIndex]...) - if m.CABundle == nil { - m.CABundle = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WebhookThrottleConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WebhookThrottleConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WebhookThrottleConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field QPS", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QPS = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Burst", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Burst = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/generated.proto b/vendor/k8s.io/api/auditregistration/v1alpha1/generated.proto deleted file mode 100644 index 674debee4f2..00000000000 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/generated.proto +++ /dev/null @@ -1,162 +0,0 @@ -/* -Copyright 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. -*/ - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = 'proto2'; - -package k8s.io.api.auditregistration.v1alpha1; - -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "v1alpha1"; - -// AuditSink represents a cluster level audit sink -message AuditSink { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec defines the audit configuration spec - optional AuditSinkSpec spec = 2; -} - -// AuditSinkList is a list of AuditSink items. -message AuditSinkList { - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of audit configurations. - repeated AuditSink items = 2; -} - -// AuditSinkSpec holds the spec for the audit sink -message AuditSinkSpec { - // Policy defines the policy for selecting which events should be sent to the webhook - // required - optional Policy policy = 1; - - // Webhook to send events - // required - optional Webhook webhook = 2; -} - -// Policy defines the configuration of how audit events are logged -message Policy { - // The Level that all requests are recorded at. - // available options: None, Metadata, Request, RequestResponse - // required - optional string level = 1; - - // Stages is a list of stages for which events are created. - // +optional - repeated string stages = 2; -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -message ServiceReference { - // `namespace` is the namespace of the service. - // Required - optional string namespace = 1; - - // `name` is the name of the service. - // Required - optional string name = 2; - - // `path` is an optional URL path which will be sent in any request to - // this service. - // +optional - optional string path = 3; - - // If specified, the port on the service that hosting webhook. - // Default to 443 for backward compatibility. - // `port` should be a valid port number (1-65535, inclusive). - // +optional - optional int32 port = 4; -} - -// Webhook holds the configuration of the webhook -message Webhook { - // Throttle holds the options for throttling the webhook - // +optional - optional WebhookThrottleConfig throttle = 1; - - // ClientConfig holds the connection parameters for the webhook - // required - optional WebhookClientConfig clientConfig = 2; -} - -// WebhookClientConfig contains the information to make a connection with the webhook -message WebhookClientConfig { - // `url` gives the location of the webhook, in standard URL form - // (`scheme://host:port/path`). Exactly one of `url` or `service` - // must be specified. - // - // The `host` should not refer to a service running in the cluster; use - // the `service` field instead. The host might be resolved via external - // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve - // in-cluster DNS as that would be a layering violation). `host` may - // also be an IP address. - // - // Please note that using `localhost` or `127.0.0.1` as a `host` is - // risky unless you take great care to run this webhook on all hosts - // which run an apiserver which might need to make calls to this - // webhook. Such installs are likely to be non-portable, i.e., not easy - // to turn up in a new cluster. - // - // The scheme must be "https"; the URL must begin with "https://". - // - // A path is optional, and if present may be any string permissible in - // a URL. You may use the path to pass an arbitrary string to the - // webhook, for example, a cluster identifier. - // - // Attempting to use a user or basic auth e.g. "user:password@" is not - // allowed. Fragments ("#...") and query parameters ("?...") are not - // allowed, either. - // - // +optional - optional string url = 1; - - // `service` is a reference to the service for this webhook. Either - // `service` or `url` must be specified. - // - // If the webhook is running within the cluster, then you should use `service`. - // - // +optional - optional ServiceReference service = 2; - - // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. - // If unspecified, system trust roots on the apiserver are used. - // +optional - optional bytes caBundle = 3; -} - -// WebhookThrottleConfig holds the configuration for throttling events -message WebhookThrottleConfig { - // ThrottleQPS maximum number of batches per second - // default 10 QPS - // +optional - optional int64 qps = 1; - - // ThrottleBurst is the maximum number of events sent at the same moment - // default 15 QPS - // +optional - optional int64 burst = 2; -} - diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/types.go b/vendor/k8s.io/api/auditregistration/v1alpha1/types.go deleted file mode 100644 index a0fb48c301b..00000000000 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/types.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Copyright 2018 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. -*/ - -// +k8s:openapi-gen=true - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// Level defines the amount of information logged during auditing -type Level string - -// Valid audit levels -const ( - // LevelNone disables auditing - LevelNone Level = "None" - // LevelMetadata provides the basic level of auditing. - LevelMetadata Level = "Metadata" - // LevelRequest provides Metadata level of auditing, and additionally - // logs the request object (does not apply for non-resource requests). - LevelRequest Level = "Request" - // LevelRequestResponse provides Request level of auditing, and additionally - // logs the response object (does not apply for non-resource requests and watches). - LevelRequestResponse Level = "RequestResponse" -) - -// Stage defines the stages in request handling during which audit events may be generated. -type Stage string - -// Valid audit stages. -const ( - // The stage for events generated after the audit handler receives the request, but before it - // is delegated down the handler chain. - StageRequestReceived = "RequestReceived" - // The stage for events generated after the response headers are sent, but before the response body - // is sent. This stage is only generated for long-running requests (e.g. watch). - StageResponseStarted = "ResponseStarted" - // The stage for events generated after the response body has been completed, and no more bytes - // will be sent. - StageResponseComplete = "ResponseComplete" - // The stage for events generated when a panic occurred. - StagePanic = "Panic" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AuditSink represents a cluster level audit sink -type AuditSink struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the audit configuration spec - Spec AuditSinkSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` -} - -// AuditSinkSpec holds the spec for the audit sink -type AuditSinkSpec struct { - // Policy defines the policy for selecting which events should be sent to the webhook - // required - Policy Policy `json:"policy" protobuf:"bytes,1,opt,name=policy"` - - // Webhook to send events - // required - Webhook Webhook `json:"webhook" protobuf:"bytes,2,opt,name=webhook"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AuditSinkList is a list of AuditSink items. -type AuditSinkList struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of audit configurations. - Items []AuditSink `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// Policy defines the configuration of how audit events are logged -type Policy struct { - // The Level that all requests are recorded at. - // available options: None, Metadata, Request, RequestResponse - // required - Level Level `json:"level" protobuf:"bytes,1,opt,name=level"` - - // Stages is a list of stages for which events are created. - // +optional - Stages []Stage `json:"stages" protobuf:"bytes,2,opt,name=stages"` -} - -// Webhook holds the configuration of the webhook -type Webhook struct { - // Throttle holds the options for throttling the webhook - // +optional - Throttle *WebhookThrottleConfig `json:"throttle,omitempty" protobuf:"bytes,1,opt,name=throttle"` - - // ClientConfig holds the connection parameters for the webhook - // required - ClientConfig WebhookClientConfig `json:"clientConfig" protobuf:"bytes,2,opt,name=clientConfig"` -} - -// WebhookThrottleConfig holds the configuration for throttling events -type WebhookThrottleConfig struct { - // ThrottleQPS maximum number of batches per second - // default 10 QPS - // +optional - QPS *int64 `json:"qps,omitempty" protobuf:"bytes,1,opt,name=qps"` - - // ThrottleBurst is the maximum number of events sent at the same moment - // default 15 QPS - // +optional - Burst *int64 `json:"burst,omitempty" protobuf:"bytes,2,opt,name=burst"` -} - -// WebhookClientConfig contains the information to make a connection with the webhook -type WebhookClientConfig struct { - // `url` gives the location of the webhook, in standard URL form - // (`scheme://host:port/path`). Exactly one of `url` or `service` - // must be specified. - // - // The `host` should not refer to a service running in the cluster; use - // the `service` field instead. The host might be resolved via external - // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve - // in-cluster DNS as that would be a layering violation). `host` may - // also be an IP address. - // - // Please note that using `localhost` or `127.0.0.1` as a `host` is - // risky unless you take great care to run this webhook on all hosts - // which run an apiserver which might need to make calls to this - // webhook. Such installs are likely to be non-portable, i.e., not easy - // to turn up in a new cluster. - // - // The scheme must be "https"; the URL must begin with "https://". - // - // A path is optional, and if present may be any string permissible in - // a URL. You may use the path to pass an arbitrary string to the - // webhook, for example, a cluster identifier. - // - // Attempting to use a user or basic auth e.g. "user:password@" is not - // allowed. Fragments ("#...") and query parameters ("?...") are not - // allowed, either. - // - // +optional - URL *string `json:"url,omitempty" protobuf:"bytes,1,opt,name=url"` - - // `service` is a reference to the service for this webhook. Either - // `service` or `url` must be specified. - // - // If the webhook is running within the cluster, then you should use `service`. - // - // +optional - Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,2,opt,name=service"` - - // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. - // If unspecified, system trust roots on the apiserver are used. - // +optional - CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,3,opt,name=caBundle"` -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -type ServiceReference struct { - // `namespace` is the namespace of the service. - // Required - Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` - - // `name` is the name of the service. - // Required - Name string `json:"name" protobuf:"bytes,2,opt,name=name"` - - // `path` is an optional URL path which will be sent in any request to - // this service. - // +optional - Path *string `json:"path,omitempty" protobuf:"bytes,3,opt,name=path"` - - // If specified, the port on the service that hosting webhook. - // Default to 443 for backward compatibility. - // `port` should be a valid port number (1-65535, inclusive). - // +optional - Port *int32 `json:"port,omitempty" protobuf:"varint,4,opt,name=port"` -} diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/auditregistration/v1alpha1/types_swagger_doc_generated.go deleted file mode 100644 index 1a86f4da5a7..00000000000 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/types_swagger_doc_generated.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Copyright 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 v1alpha1 - -// This file contains a collection of methods that can be used from go-restful to -// generate Swagger API documentation for its models. Please read this PR for more -// information on the implementation: https://github.com/emicklei/go-restful/pull/215 -// -// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if -// they are on one line! For multiple line or blocks that you want to ignore use ---. -// Any context after a --- is ignored. -// -// Those methods can be generated by using hack/update-generated-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. -var map_AuditSink = map[string]string{ - "": "AuditSink represents a cluster level audit sink", - "spec": "Spec defines the audit configuration spec", -} - -func (AuditSink) SwaggerDoc() map[string]string { - return map_AuditSink -} - -var map_AuditSinkList = map[string]string{ - "": "AuditSinkList is a list of AuditSink items.", - "items": "List of audit configurations.", -} - -func (AuditSinkList) SwaggerDoc() map[string]string { - return map_AuditSinkList -} - -var map_AuditSinkSpec = map[string]string{ - "": "AuditSinkSpec holds the spec for the audit sink", - "policy": "Policy defines the policy for selecting which events should be sent to the webhook required", - "webhook": "Webhook to send events required", -} - -func (AuditSinkSpec) SwaggerDoc() map[string]string { - return map_AuditSinkSpec -} - -var map_Policy = map[string]string{ - "": "Policy defines the configuration of how audit events are logged", - "level": "The Level that all requests are recorded at. available options: None, Metadata, Request, RequestResponse required", - "stages": "Stages is a list of stages for which events are created.", -} - -func (Policy) SwaggerDoc() map[string]string { - return map_Policy -} - -var map_ServiceReference = map[string]string{ - "": "ServiceReference holds a reference to Service.legacy.k8s.io", - "namespace": "`namespace` is the namespace of the service. Required", - "name": "`name` is the name of the service. Required", - "path": "`path` is an optional URL path which will be sent in any request to this service.", - "port": "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", -} - -func (ServiceReference) SwaggerDoc() map[string]string { - return map_ServiceReference -} - -var map_Webhook = map[string]string{ - "": "Webhook holds the configuration of the webhook", - "throttle": "Throttle holds the options for throttling the webhook", - "clientConfig": "ClientConfig holds the connection parameters for the webhook required", -} - -func (Webhook) SwaggerDoc() map[string]string { - return map_Webhook -} - -var map_WebhookClientConfig = map[string]string{ - "": "WebhookClientConfig contains the information to make a connection with the webhook", - "url": "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", - "service": "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", - "caBundle": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", -} - -func (WebhookClientConfig) SwaggerDoc() map[string]string { - return map_WebhookClientConfig -} - -var map_WebhookThrottleConfig = map[string]string{ - "": "WebhookThrottleConfig holds the configuration for throttling events", - "qps": "ThrottleQPS maximum number of batches per second default 10 QPS", - "burst": "ThrottleBurst is the maximum number of events sent at the same moment default 15 QPS", -} - -func (WebhookThrottleConfig) SwaggerDoc() map[string]string { - return map_WebhookThrottleConfig -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/auditregistration/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 621a19e8312..00000000000 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,229 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuditSink) DeepCopyInto(out *AuditSink) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditSink. -func (in *AuditSink) DeepCopy() *AuditSink { - if in == nil { - return nil - } - out := new(AuditSink) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AuditSink) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuditSinkList) DeepCopyInto(out *AuditSinkList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AuditSink, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditSinkList. -func (in *AuditSinkList) DeepCopy() *AuditSinkList { - if in == nil { - return nil - } - out := new(AuditSinkList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AuditSinkList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuditSinkSpec) DeepCopyInto(out *AuditSinkSpec) { - *out = *in - in.Policy.DeepCopyInto(&out.Policy) - in.Webhook.DeepCopyInto(&out.Webhook) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditSinkSpec. -func (in *AuditSinkSpec) DeepCopy() *AuditSinkSpec { - if in == nil { - return nil - } - out := new(AuditSinkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Policy) DeepCopyInto(out *Policy) { - *out = *in - if in.Stages != nil { - in, out := &in.Stages, &out.Stages - *out = make([]Stage, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy. -func (in *Policy) DeepCopy() *Policy { - if in == nil { - return nil - } - out := new(Policy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { - *out = *in - if in.Path != nil { - in, out := &in.Path, &out.Path - *out = new(string) - **out = **in - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. -func (in *ServiceReference) DeepCopy() *ServiceReference { - if in == nil { - return nil - } - out := new(ServiceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Webhook) DeepCopyInto(out *Webhook) { - *out = *in - if in.Throttle != nil { - in, out := &in.Throttle, &out.Throttle - *out = new(WebhookThrottleConfig) - (*in).DeepCopyInto(*out) - } - in.ClientConfig.DeepCopyInto(&out.ClientConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webhook. -func (in *Webhook) DeepCopy() *Webhook { - if in == nil { - return nil - } - out := new(Webhook) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { - *out = *in - if in.URL != nil { - in, out := &in.URL, &out.URL - *out = new(string) - **out = **in - } - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - (*in).DeepCopyInto(*out) - } - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. -func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { - if in == nil { - return nil - } - out := new(WebhookClientConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebhookThrottleConfig) DeepCopyInto(out *WebhookThrottleConfig) { - *out = *in - if in.QPS != nil { - in, out := &in.QPS, &out.QPS - *out = new(int64) - **out = **in - } - if in.Burst != nil { - in, out := &in.Burst, &out.Burst - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookThrottleConfig. -func (in *WebhookThrottleConfig) DeepCopy() *WebhookThrottleConfig { - if in == nil { - return nil - } - out := new(WebhookThrottleConfig) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/api/authentication/v1beta1/BUILD b/vendor/k8s.io/api/authentication/v1beta1/BUILD index 2cd552a6053..4d6b17fdd1c 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/BUILD +++ b/vendor/k8s.io/api/authentication/v1beta1/BUILD @@ -14,6 +14,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/authentication/v1beta1", importpath = "k8s.io/api/authentication/v1beta1", diff --git a/vendor/k8s.io/api/authentication/v1beta1/doc.go b/vendor/k8s.io/api/authentication/v1beta1/doc.go index 185a2240f68..2a2b176e43a 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/doc.go +++ b/vendor/k8s.io/api/authentication/v1beta1/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +groupName=authentication.k8s.io // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true package v1beta1 // import "k8s.io/api/authentication/v1beta1" diff --git a/vendor/k8s.io/api/authentication/v1beta1/types.go b/vendor/k8s.io/api/authentication/v1beta1/types.go index 0083fb0e3df..121b3461811 100644 --- a/vendor/k8s.io/api/authentication/v1beta1/types.go +++ b/vendor/k8s.io/api/authentication/v1beta1/types.go @@ -26,6 +26,9 @@ import ( // +genclient:nonNamespaced // +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.4 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=authentication.k8s.io,v1,TokenReview // TokenReview attempts to authenticate a token to a known user. // Note: TokenReview requests may be cached by the webhook token authenticator diff --git a/vendor/k8s.io/api/authentication/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/authentication/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..9b5744db787 --- /dev/null +++ b/vendor/k8s.io/api/authentication/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,49 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *TokenReview) APILifecycleIntroduced() (major, minor int) { + return 1, 4 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *TokenReview) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *TokenReview) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1", Kind: "TokenReview"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *TokenReview) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/api/authorization/v1beta1/BUILD b/vendor/k8s.io/api/authorization/v1beta1/BUILD index 15cba0e57a9..b2852907187 100644 --- a/vendor/k8s.io/api/authorization/v1beta1/BUILD +++ b/vendor/k8s.io/api/authorization/v1beta1/BUILD @@ -14,6 +14,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1beta1", importpath = "k8s.io/api/authorization/v1beta1", diff --git a/vendor/k8s.io/api/authorization/v1beta1/doc.go b/vendor/k8s.io/api/authorization/v1beta1/doc.go index 7046f11109f..c996e35ccc5 100644 --- a/vendor/k8s.io/api/authorization/v1beta1/doc.go +++ b/vendor/k8s.io/api/authorization/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=authorization.k8s.io diff --git a/vendor/k8s.io/api/authorization/v1beta1/types.go b/vendor/k8s.io/api/authorization/v1beta1/types.go index cf117d268ce..c62b5ea2137 100644 --- a/vendor/k8s.io/api/authorization/v1beta1/types.go +++ b/vendor/k8s.io/api/authorization/v1beta1/types.go @@ -26,6 +26,9 @@ import ( // +genclient:nonNamespaced // +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.2 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=authorization.k8s.io,v1,SubjectAccessReview // SubjectAccessReview checks whether or not a user or group can perform an action. type SubjectAccessReview struct { @@ -45,6 +48,9 @@ type SubjectAccessReview struct { // +genclient:nonNamespaced // +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.2 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=authorization.k8s.io,v1,SelfSubjectAccessReview // SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a // spec.namespace means "in all namespaces". Self is a special case, because users should always be able @@ -65,6 +71,9 @@ type SelfSubjectAccessReview struct { // +genclient // +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.2 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=authorization.k8s.io,v1,LocalSubjectAccessReview // LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. // Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions @@ -191,6 +200,9 @@ type SubjectAccessReviewStatus struct { // +genclient:nonNamespaced // +genclient:onlyVerbs=create // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=authorization.k8s.io,v1,SelfSubjectRulesReview // SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. // The returned list of actions may be incomplete depending on the server's authorization mode, diff --git a/vendor/k8s.io/api/authorization/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/authorization/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..fcb75dd914b --- /dev/null +++ b/vendor/k8s.io/api/authorization/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,121 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *LocalSubjectAccessReview) APILifecycleIntroduced() (major, minor int) { + return 1, 2 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *LocalSubjectAccessReview) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *LocalSubjectAccessReview) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "LocalSubjectAccessReview"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *LocalSubjectAccessReview) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *SelfSubjectAccessReview) APILifecycleIntroduced() (major, minor int) { + return 1, 2 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *SelfSubjectAccessReview) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *SelfSubjectAccessReview) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SelfSubjectAccessReview"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *SelfSubjectAccessReview) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *SelfSubjectRulesReview) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *SelfSubjectRulesReview) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *SelfSubjectRulesReview) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SelfSubjectRulesReview"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *SelfSubjectRulesReview) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *SubjectAccessReview) APILifecycleIntroduced() (major, minor int) { + return 1, 2 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *SubjectAccessReview) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *SubjectAccessReview) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SubjectAccessReview"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *SubjectAccessReview) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/BUILD b/vendor/k8s.io/api/autoscaling/v2beta1/BUILD index 25fa9703358..e22406aa791 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/BUILD +++ b/vendor/k8s.io/api/autoscaling/v2beta1/BUILD @@ -14,6 +14,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta1", importpath = "k8s.io/api/autoscaling/v2beta1", diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/doc.go b/vendor/k8s.io/api/autoscaling/v2beta1/doc.go index 2cc9f11eaf6..25ca507bba3 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/doc.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/doc.go @@ -17,5 +17,6 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true package v2beta1 // import "k8s.io/api/autoscaling/v2beta1" diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/types.go b/vendor/k8s.io/api/autoscaling/v2beta1/types.go index 53a53a3a9c7..d76e879678a 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/types.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/types.go @@ -373,6 +373,9 @@ type ExternalMetricStatus struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=autoscaling,v2beta2,HorizontalPodAutoscaler // HorizontalPodAutoscaler is the configuration for a horizontal pod // autoscaler, which automatically manages the replica count of any resource @@ -395,6 +398,9 @@ type HorizontalPodAutoscaler struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=autoscaling,v2beta2,HorizontalPodAutoscalerList // HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. type HorizontalPodAutoscalerList struct { diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..f6baef69975 --- /dev/null +++ b/vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,73 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v2beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *HorizontalPodAutoscaler) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *HorizontalPodAutoscaler) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *HorizontalPodAutoscaler) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta2", Kind: "HorizontalPodAutoscaler"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *HorizontalPodAutoscaler) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *HorizontalPodAutoscalerList) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *HorizontalPodAutoscalerList) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *HorizontalPodAutoscalerList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta2", Kind: "HorizontalPodAutoscalerList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *HorizontalPodAutoscalerList) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/BUILD b/vendor/k8s.io/api/autoscaling/v2beta2/BUILD index bb211b2605a..796071d2f13 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/BUILD +++ b/vendor/k8s.io/api/autoscaling/v2beta2/BUILD @@ -9,6 +9,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta2", importpath = "k8s.io/api/autoscaling/v2beta2", diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/doc.go b/vendor/k8s.io/api/autoscaling/v2beta2/doc.go index 6d275f6d959..76fb0aff87b 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/doc.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/doc.go @@ -17,5 +17,6 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true package v2beta2 // import "k8s.io/api/autoscaling/v2beta2" diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/types.go b/vendor/k8s.io/api/autoscaling/v2beta2/types.go index 614caeb6c52..6e5b8f68c11 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/types.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/types.go @@ -26,6 +26,8 @@ import ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.12 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // HorizontalPodAutoscaler is the configuration for a horizontal pod // autoscaler, which automatically manages the replica count of any resource @@ -467,6 +469,8 @@ type MetricValueStatus struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.12 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. type HorizontalPodAutoscalerList struct { diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..83926e3a0f9 --- /dev/null +++ b/vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,57 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v2beta2 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *HorizontalPodAutoscaler) APILifecycleIntroduced() (major, minor int) { + return 1, 12 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *HorizontalPodAutoscaler) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *HorizontalPodAutoscaler) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *HorizontalPodAutoscalerList) APILifecycleIntroduced() (major, minor int) { + return 1, 12 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *HorizontalPodAutoscalerList) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *HorizontalPodAutoscalerList) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} diff --git a/vendor/k8s.io/api/batch/v1beta1/BUILD b/vendor/k8s.io/api/batch/v1beta1/BUILD index be576c20a84..26b35da76b3 100644 --- a/vendor/k8s.io/api/batch/v1beta1/BUILD +++ b/vendor/k8s.io/api/batch/v1beta1/BUILD @@ -14,6 +14,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/batch/v1beta1", importpath = "k8s.io/api/batch/v1beta1", diff --git a/vendor/k8s.io/api/batch/v1beta1/doc.go b/vendor/k8s.io/api/batch/v1beta1/doc.go index 258ff028c12..cb2572f5dac 100644 --- a/vendor/k8s.io/api/batch/v1beta1/doc.go +++ b/vendor/k8s.io/api/batch/v1beta1/doc.go @@ -17,5 +17,6 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true package v1beta1 // import "k8s.io/api/batch/v1beta1" diff --git a/vendor/k8s.io/api/batch/v1beta1/types.go b/vendor/k8s.io/api/batch/v1beta1/types.go index 2978747a488..6f49cc2a3f5 100644 --- a/vendor/k8s.io/api/batch/v1beta1/types.go +++ b/vendor/k8s.io/api/batch/v1beta1/types.go @@ -18,11 +18,13 @@ package v1beta1 import ( batchv1 "k8s.io/api/batch/v1" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // JobTemplate describes a template for creating copies of a predefined pod. type JobTemplate struct { @@ -53,6 +55,8 @@ type JobTemplateSpec struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // CronJob represents the configuration of a single cron job. type CronJob struct { @@ -74,6 +78,8 @@ type CronJob struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // CronJobList is a collection of cron jobs. type CronJobList struct { diff --git a/vendor/k8s.io/api/batch/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/batch/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..63bae5f1eaf --- /dev/null +++ b/vendor/k8s.io/api/batch/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,75 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CronJob) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *CronJob) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *CronJob) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CronJobList) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *CronJobList) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *CronJobList) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *JobTemplate) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *JobTemplate) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *JobTemplate) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} diff --git a/vendor/k8s.io/kube-scheduler/config/v1alpha1/BUILD b/vendor/k8s.io/api/certificates/v1/BUILD similarity index 66% rename from vendor/k8s.io/kube-scheduler/config/v1alpha1/BUILD rename to vendor/k8s.io/api/certificates/v1/BUILD index d9ca51ea527..65d9af70cbf 100644 --- a/vendor/k8s.io/kube-scheduler/config/v1alpha1/BUILD +++ b/vendor/k8s.io/api/certificates/v1/BUILD @@ -4,18 +4,22 @@ go_library( name = "go_default_library", srcs = [ "doc.go", + "generated.pb.go", "register.go", "types.go", + "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/kube-scheduler/config/v1alpha1", - importpath = "k8s.io/kube-scheduler/config/v1alpha1", + importmap = "k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1", + importpath = "k8s.io/api/certificates/v1", visibility = ["//visibility:public"], deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/component-base/config/v1alpha1:go_default_library", + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", ], ) diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/doc.go b/vendor/k8s.io/api/certificates/v1/doc.go similarity index 80% rename from vendor/k8s.io/api/auditregistration/v1alpha1/doc.go rename to vendor/k8s.io/api/certificates/v1/doc.go index ae8f7671493..fe3ea3af87f 100644 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/doc.go +++ b/vendor/k8s.io/api/certificates/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2020 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. @@ -18,6 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +k8s:openapi-gen=true -// +groupName=auditregistration.k8s.io +// +groupName=certificates.k8s.io -package v1alpha1 // import "k8s.io/api/auditregistration/v1alpha1" +package v1 // import "k8s.io/api/certificates/v1" diff --git a/vendor/k8s.io/api/certificates/v1/generated.pb.go b/vendor/k8s.io/api/certificates/v1/generated.pb.go new file mode 100644 index 00000000000..d2cf41a25a8 --- /dev/null +++ b/vendor/k8s.io/api/certificates/v1/generated.pb.go @@ -0,0 +1,2042 @@ +/* +Copyright 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. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1/generated.proto + +package v1 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + + k8s_io_api_core_v1 "k8s.io/api/core/v1" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } +func (*CertificateSigningRequest) ProtoMessage() {} +func (*CertificateSigningRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_17e045d0de66f3c7, []int{0} +} +func (m *CertificateSigningRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificateSigningRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CertificateSigningRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificateSigningRequest.Merge(m, src) +} +func (m *CertificateSigningRequest) XXX_Size() int { + return m.Size() +} +func (m *CertificateSigningRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CertificateSigningRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificateSigningRequest proto.InternalMessageInfo + +func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} } +func (*CertificateSigningRequestCondition) ProtoMessage() {} +func (*CertificateSigningRequestCondition) Descriptor() ([]byte, []int) { + return fileDescriptor_17e045d0de66f3c7, []int{1} +} +func (m *CertificateSigningRequestCondition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificateSigningRequestCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CertificateSigningRequestCondition) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificateSigningRequestCondition.Merge(m, src) +} +func (m *CertificateSigningRequestCondition) XXX_Size() int { + return m.Size() +} +func (m *CertificateSigningRequestCondition) XXX_DiscardUnknown() { + xxx_messageInfo_CertificateSigningRequestCondition.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificateSigningRequestCondition proto.InternalMessageInfo + +func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} } +func (*CertificateSigningRequestList) ProtoMessage() {} +func (*CertificateSigningRequestList) Descriptor() ([]byte, []int) { + return fileDescriptor_17e045d0de66f3c7, []int{2} +} +func (m *CertificateSigningRequestList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificateSigningRequestList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CertificateSigningRequestList) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificateSigningRequestList.Merge(m, src) +} +func (m *CertificateSigningRequestList) XXX_Size() int { + return m.Size() +} +func (m *CertificateSigningRequestList) XXX_DiscardUnknown() { + xxx_messageInfo_CertificateSigningRequestList.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificateSigningRequestList proto.InternalMessageInfo + +func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} } +func (*CertificateSigningRequestSpec) ProtoMessage() {} +func (*CertificateSigningRequestSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_17e045d0de66f3c7, []int{3} +} +func (m *CertificateSigningRequestSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificateSigningRequestSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CertificateSigningRequestSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificateSigningRequestSpec.Merge(m, src) +} +func (m *CertificateSigningRequestSpec) XXX_Size() int { + return m.Size() +} +func (m *CertificateSigningRequestSpec) XXX_DiscardUnknown() { + xxx_messageInfo_CertificateSigningRequestSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificateSigningRequestSpec proto.InternalMessageInfo + +func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} } +func (*CertificateSigningRequestStatus) ProtoMessage() {} +func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_17e045d0de66f3c7, []int{4} +} +func (m *CertificateSigningRequestStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CertificateSigningRequestStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CertificateSigningRequestStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_CertificateSigningRequestStatus.Merge(m, src) +} +func (m *CertificateSigningRequestStatus) XXX_Size() int { + return m.Size() +} +func (m *CertificateSigningRequestStatus) XXX_DiscardUnknown() { + xxx_messageInfo_CertificateSigningRequestStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_CertificateSigningRequestStatus proto.InternalMessageInfo + +func (m *ExtraValue) Reset() { *m = ExtraValue{} } +func (*ExtraValue) ProtoMessage() {} +func (*ExtraValue) Descriptor() ([]byte, []int) { + return fileDescriptor_17e045d0de66f3c7, []int{5} +} +func (m *ExtraValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExtraValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ExtraValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtraValue.Merge(m, src) +} +func (m *ExtraValue) XXX_Size() int { + return m.Size() +} +func (m *ExtraValue) XXX_DiscardUnknown() { + xxx_messageInfo_ExtraValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtraValue proto.InternalMessageInfo + +func init() { + proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequest") + proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequestCondition") + proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequestList") + proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequestSpec") + proto.RegisterMapType((map[string]ExtraValue)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequestSpec.ExtraEntry") + proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.api.certificates.v1.CertificateSigningRequestStatus") + proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.certificates.v1.ExtraValue") +} + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1/generated.proto", fileDescriptor_17e045d0de66f3c7) +} + +var fileDescriptor_17e045d0de66f3c7 = []byte{ + // 873 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0xfa, 0x57, 0xec, 0x71, 0x49, 0xab, 0x11, 0xaa, 0x16, 0x4b, 0xdd, 0x8d, 0x56, 0x50, + 0x05, 0x04, 0xbb, 0x38, 0x2a, 0x10, 0x0a, 0xe2, 0xb0, 0x69, 0x85, 0x2a, 0x52, 0x90, 0x26, 0x09, + 0x87, 0xc2, 0xa1, 0x93, 0xf5, 0xeb, 0x66, 0xea, 0xee, 0x0f, 0x66, 0x66, 0x2d, 0x7c, 0xeb, 0x9f, + 0xc0, 0x91, 0x23, 0xff, 0x09, 0xd7, 0x1c, 0x7b, 0x2c, 0x12, 0xb2, 0x88, 0x7b, 0xe1, 0x6f, 0xc8, + 0x09, 0xcd, 0xec, 0x78, 0xed, 0xfc, 0x70, 0x5b, 0x72, 0xdb, 0xf9, 0xde, 0xf7, 0xbe, 0xef, 0xbd, + 0xb7, 0x6f, 0x06, 0xed, 0x8c, 0xb6, 0x85, 0xcf, 0xb2, 0x60, 0x54, 0x1c, 0x02, 0x4f, 0x41, 0x82, + 0x08, 0xc6, 0x90, 0x0e, 0x33, 0x1e, 0x98, 0x00, 0xcd, 0x59, 0x10, 0x01, 0x97, 0xec, 0x09, 0x8b, + 0xa8, 0x0e, 0x0f, 0x82, 0x18, 0x52, 0xe0, 0x54, 0xc2, 0xd0, 0xcf, 0x79, 0x26, 0x33, 0xdc, 0x2f, + 0xb9, 0x3e, 0xcd, 0x99, 0xbf, 0xcc, 0xf5, 0xc7, 0x83, 0xfe, 0x27, 0x31, 0x93, 0x47, 0xc5, 0xa1, + 0x1f, 0x65, 0x49, 0x10, 0x67, 0x71, 0x16, 0xe8, 0x94, 0xc3, 0xe2, 0x89, 0x3e, 0xe9, 0x83, 0xfe, + 0x2a, 0xa5, 0xfa, 0xde, 0xb2, 0x6d, 0xc6, 0xe1, 0x12, 0xbb, 0xfe, 0x9d, 0x05, 0x27, 0xa1, 0xd1, + 0x11, 0x4b, 0x81, 0x4f, 0x82, 0x7c, 0x14, 0x2b, 0x40, 0x04, 0x09, 0x48, 0x7a, 0x59, 0x56, 0xb0, + 0x2a, 0x8b, 0x17, 0xa9, 0x64, 0x09, 0x5c, 0x48, 0xf8, 0xfc, 0x4d, 0x09, 0x22, 0x3a, 0x82, 0x84, + 0x9e, 0xcf, 0xf3, 0xfe, 0xac, 0xa3, 0xf7, 0x76, 0x16, 0x53, 0xd8, 0x63, 0x71, 0xca, 0xd2, 0x98, + 0xc0, 0x2f, 0x05, 0x08, 0x89, 0x1f, 0xa3, 0x8e, 0xaa, 0x70, 0x48, 0x25, 0xb5, 0xad, 0x0d, 0x6b, + 0xb3, 0xb7, 0xf5, 0xa9, 0xbf, 0x18, 0x5f, 0x65, 0xe4, 0xe7, 0xa3, 0x58, 0x01, 0xc2, 0x57, 0x6c, + 0x7f, 0x3c, 0xf0, 0x7f, 0x38, 0x7c, 0x0a, 0x91, 0x7c, 0x08, 0x92, 0x86, 0xf8, 0x78, 0xea, 0xd6, + 0x66, 0x53, 0x17, 0x2d, 0x30, 0x52, 0xa9, 0xe2, 0x9f, 0x50, 0x53, 0xe4, 0x10, 0xd9, 0x75, 0xad, + 0xfe, 0xa5, 0xbf, 0xfa, 0xe7, 0xf8, 0x2b, 0xcb, 0xdc, 0xcb, 0x21, 0x0a, 0xaf, 0x19, 0x9b, 0xa6, + 0x3a, 0x11, 0x2d, 0x8a, 0x23, 0xd4, 0x16, 0x92, 0xca, 0x42, 0xd8, 0x0d, 0x2d, 0xff, 0xd5, 0xd5, + 0xe4, 0xb5, 0x44, 0xb8, 0x6e, 0x0c, 0xda, 0xe5, 0x99, 0x18, 0x69, 0xef, 0x55, 0x03, 0x79, 0x2b, + 0x73, 0x77, 0xb2, 0x74, 0xc8, 0x24, 0xcb, 0x52, 0xbc, 0x8d, 0x9a, 0x72, 0x92, 0x83, 0x1e, 0x63, + 0x37, 0x7c, 0x7f, 0x5e, 0xed, 0xfe, 0x24, 0x87, 0xd3, 0xa9, 0xfb, 0xee, 0x79, 0xbe, 0xc2, 0x89, + 0xce, 0xc0, 0xbb, 0x55, 0x17, 0x6d, 0x9d, 0x7b, 0xe7, 0x6c, 0x21, 0xa7, 0x53, 0xf7, 0x92, 0x3d, + 0xf4, 0x2b, 0xa5, 0xb3, 0xe5, 0xe2, 0xdb, 0xa8, 0xcd, 0x81, 0x8a, 0x2c, 0xd5, 0x23, 0xef, 0x2e, + 0xda, 0x22, 0x1a, 0x25, 0x26, 0x8a, 0x3f, 0x44, 0x6b, 0x09, 0x08, 0x41, 0x63, 0xd0, 0xc3, 0xeb, + 0x86, 0xd7, 0x0d, 0x71, 0xed, 0x61, 0x09, 0x93, 0x79, 0x1c, 0x3f, 0x45, 0xeb, 0xcf, 0xa8, 0x90, + 0x07, 0xf9, 0x90, 0x4a, 0xd8, 0x67, 0x09, 0xd8, 0x4d, 0x3d, 0xee, 0x8f, 0xde, 0x6e, 0x57, 0x54, + 0x46, 0x78, 0xd3, 0xa8, 0xaf, 0xef, 0x9e, 0x51, 0x22, 0xe7, 0x94, 0xf1, 0x18, 0x61, 0x85, 0xec, + 0x73, 0x9a, 0x8a, 0x72, 0x50, 0xca, 0xaf, 0xf5, 0xbf, 0xfd, 0xfa, 0xc6, 0x0f, 0xef, 0x5e, 0x50, + 0x23, 0x97, 0x38, 0x78, 0x7f, 0x59, 0xe8, 0xd6, 0xca, 0xbf, 0xbc, 0xcb, 0x84, 0xc4, 0x3f, 0x5f, + 0xb8, 0x2b, 0xfe, 0xdb, 0xd5, 0xa3, 0xb2, 0xf5, 0x4d, 0xb9, 0x61, 0x6a, 0xea, 0xcc, 0x91, 0xa5, + 0x7b, 0xf2, 0x08, 0xb5, 0x98, 0x84, 0x44, 0xd8, 0xf5, 0x8d, 0xc6, 0x66, 0x6f, 0xeb, 0xb3, 0x2b, + 0x6d, 0x72, 0xf8, 0x8e, 0x71, 0x68, 0x3d, 0x50, 0x5a, 0xa4, 0x94, 0xf4, 0xfe, 0x6d, 0xbc, 0xa6, + 0x37, 0x75, 0x9d, 0xf0, 0x07, 0x68, 0x8d, 0x97, 0x47, 0xdd, 0xda, 0xb5, 0xb0, 0xa7, 0x16, 0xc1, + 0x30, 0xc8, 0x3c, 0x86, 0xb7, 0x10, 0x12, 0x2c, 0x4e, 0x81, 0x7f, 0x4f, 0x13, 0xb0, 0xd7, 0xf4, + 0xda, 0x54, 0xd7, 0x7f, 0xaf, 0x8a, 0x90, 0x25, 0x16, 0xf6, 0x51, 0xbb, 0x50, 0x5b, 0x24, 0xec, + 0xd6, 0x46, 0x63, 0xb3, 0x1b, 0xde, 0x54, 0xbb, 0x78, 0xa0, 0x91, 0xd3, 0xa9, 0xdb, 0xf9, 0x0e, + 0x26, 0xfa, 0x40, 0x0c, 0x0b, 0x7f, 0x8c, 0x3a, 0x85, 0x00, 0x9e, 0x2a, 0x87, 0x72, 0x83, 0xab, + 0xb1, 0x1d, 0x18, 0x9c, 0x54, 0x0c, 0x7c, 0x0b, 0x35, 0x0a, 0x36, 0x34, 0x1b, 0xdc, 0x33, 0xc4, + 0xc6, 0xc1, 0x83, 0x7b, 0x44, 0xe1, 0xd8, 0x43, 0xed, 0x98, 0x67, 0x45, 0x2e, 0xec, 0xa6, 0x36, + 0x47, 0xca, 0xfc, 0x5b, 0x8d, 0x10, 0x13, 0xc1, 0x0c, 0xb5, 0xe0, 0x57, 0xc9, 0xa9, 0xdd, 0xd6, + 0x93, 0xbf, 0x77, 0xe5, 0x27, 0xca, 0xbf, 0xaf, 0x64, 0xee, 0xa7, 0x92, 0x4f, 0x16, 0x3f, 0x42, + 0x63, 0xa4, 0x74, 0xe8, 0x3f, 0x46, 0x68, 0xc1, 0xc1, 0x37, 0x50, 0x63, 0x04, 0x93, 0xf2, 0xc1, + 0x20, 0xea, 0x13, 0x7f, 0x8d, 0x5a, 0x63, 0xfa, 0xac, 0x00, 0xf3, 0x5a, 0xde, 0x7e, 0x5d, 0x29, + 0x5a, 0xe8, 0x47, 0xc5, 0x26, 0x65, 0xd2, 0xdd, 0xfa, 0xb6, 0xe5, 0x1d, 0x5b, 0xc8, 0x7d, 0xc3, + 0x43, 0x87, 0x39, 0x42, 0xd1, 0xfc, 0xf1, 0x10, 0xb6, 0xa5, 0xbb, 0xfe, 0xe6, 0x4a, 0x5d, 0x57, + 0x6f, 0xd0, 0x62, 0x0b, 0x2a, 0x48, 0x90, 0x25, 0x17, 0x3c, 0x40, 0xbd, 0x25, 0x55, 0xdd, 0xdf, + 0xb5, 0xf0, 0xfa, 0x6c, 0xea, 0xf6, 0x96, 0xc4, 0xc9, 0x32, 0xc7, 0xfb, 0xc2, 0x0c, 0x4b, 0xf7, + 0x88, 0xdd, 0xf9, 0xfd, 0xb0, 0xf4, 0x8f, 0xec, 0x9e, 0x5f, 0xf2, 0xbb, 0x9d, 0xdf, 0xff, 0x70, + 0x6b, 0xcf, 0xff, 0xde, 0xa8, 0x85, 0x9b, 0xc7, 0x27, 0x4e, 0xed, 0xc5, 0x89, 0x53, 0x7b, 0x79, + 0xe2, 0xd4, 0x9e, 0xcf, 0x1c, 0xeb, 0x78, 0xe6, 0x58, 0x2f, 0x66, 0x8e, 0xf5, 0x72, 0xe6, 0x58, + 0xff, 0xcc, 0x1c, 0xeb, 0xb7, 0x57, 0x4e, 0xed, 0x51, 0x7d, 0x3c, 0xf8, 0x2f, 0x00, 0x00, 0xff, + 0xff, 0x9d, 0x8f, 0x4c, 0xfa, 0x70, 0x08, 0x00, 0x00, +} + +func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CertificateSigningRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificateSigningRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *CertificateSigningRequestCondition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CertificateSigningRequestCondition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificateSigningRequestCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0x32 + { + size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size, err := m.LastUpdateTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x1a + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x12 + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *CertificateSigningRequestList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CertificateSigningRequestList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificateSigningRequestList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *CertificateSigningRequestSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CertificateSigningRequestSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificateSigningRequestSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.SignerName) + copy(dAtA[i:], m.SignerName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SignerName))) + i-- + dAtA[i] = 0x3a + if len(m.Extra) > 0 { + keysForExtra := make([]string, 0, len(m.Extra)) + for k := range m.Extra { + keysForExtra = append(keysForExtra, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + for iNdEx := len(keysForExtra) - 1; iNdEx >= 0; iNdEx-- { + v := m.Extra[string(keysForExtra[iNdEx])] + baseI := i + { + size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(keysForExtra[iNdEx]) + copy(dAtA[i:], keysForExtra[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForExtra[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Usages) > 0 { + for iNdEx := len(m.Usages) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Usages[iNdEx]) + copy(dAtA[i:], m.Usages[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Usages[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Groups) > 0 { + for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Groups[iNdEx]) + copy(dAtA[i:], m.Groups[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Groups[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + i -= len(m.UID) + copy(dAtA[i:], m.UID) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i-- + dAtA[i] = 0x1a + i -= len(m.Username) + copy(dAtA[i:], m.Username) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username))) + i-- + dAtA[i] = 0x12 + if m.Request != nil { + i -= len(m.Request) + copy(dAtA[i:], m.Request) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Request))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CertificateSigningRequestStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CertificateSigningRequestStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CertificateSigningRequestStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Certificate != nil { + i -= len(m.Certificate) + copy(dAtA[i:], m.Certificate) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Certificate))) + i-- + dAtA[i] = 0x12 + } + if len(m.Conditions) > 0 { + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m ExtraValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m ExtraValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m) > 0 { + for iNdEx := len(m) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m[iNdEx]) + copy(dAtA[i:], m[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CertificateSigningRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *CertificateSigningRequestCondition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastUpdateTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastTransitionTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Status) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *CertificateSigningRequestList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *CertificateSigningRequestSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Request != nil { + l = len(m.Request) + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.Username) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Groups) > 0 { + for _, s := range m.Groups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Usages) > 0 { + for _, s := range m.Usages { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Extra) > 0 { + for k, v := range m.Extra { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + l = len(m.SignerName) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *CertificateSigningRequestStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.Certificate != nil { + l = len(m.Certificate) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m ExtraValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m) > 0 { + for _, s := range m { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *CertificateSigningRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CertificateSigningRequest{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CertificateSigningRequestSpec", "CertificateSigningRequestSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CertificateSigningRequestStatus", "CertificateSigningRequestStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *CertificateSigningRequestCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CertificateSigningRequestCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `LastUpdateTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastUpdateTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `}`, + }, "") + return s +} +func (this *CertificateSigningRequestList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]CertificateSigningRequest{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "CertificateSigningRequest", "CertificateSigningRequest", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&CertificateSigningRequestList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *CertificateSigningRequestSpec) String() string { + if this == nil { + return "nil" + } + keysForExtra := make([]string, 0, len(this.Extra)) + for k := range this.Extra { + keysForExtra = append(keysForExtra, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) + mapStringForExtra := "map[string]ExtraValue{" + for _, k := range keysForExtra { + mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) + } + mapStringForExtra += "}" + s := strings.Join([]string{`&CertificateSigningRequestSpec{`, + `Request:` + valueToStringGenerated(this.Request) + `,`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, + `Usages:` + fmt.Sprintf("%v", this.Usages) + `,`, + `Extra:` + mapStringForExtra + `,`, + `SignerName:` + fmt.Sprintf("%v", this.SignerName) + `,`, + `}`, + }, "") + return s +} +func (this *CertificateSigningRequestStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForConditions := "[]CertificateSigningRequestCondition{" + for _, f := range this.Conditions { + repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "CertificateSigningRequestCondition", "CertificateSigningRequestCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForConditions += "}" + s := strings.Join([]string{`&CertificateSigningRequestStatus{`, + `Conditions:` + repeatedStringForConditions + `,`, + `Certificate:` + valueToStringGenerated(this.Certificate) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *CertificateSigningRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CertificateSigningRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateSigningRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CertificateSigningRequestCondition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CertificateSigningRequestCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateSigningRequestCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = RequestConditionType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CertificateSigningRequestList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CertificateSigningRequestList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateSigningRequestList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, CertificateSigningRequest{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CertificateSigningRequestSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CertificateSigningRequestSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateSigningRequestSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Request = append(m.Request[:0], dAtA[iNdEx:postIndex]...) + if m.Request == nil { + m.Request = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Usages", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Usages = append(m.Usages, KeyUsage(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Extra == nil { + m.Extra = make(map[string]ExtraValue) + } + var mapkey string + mapvalue := &ExtraValue{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &ExtraValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Extra[mapkey] = *mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignerName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CertificateSigningRequestStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CertificateSigningRequestStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateSigningRequestStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, CertificateSigningRequestCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Certificate", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Certificate = append(m.Certificate[:0], dAtA[iNdEx:postIndex]...) + if m.Certificate == nil { + m.Certificate = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExtraValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + *m = append(*m, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/k8s.io/api/certificates/v1/generated.proto b/vendor/k8s.io/api/certificates/v1/generated.proto new file mode 100644 index 00000000000..8427424a8ca --- /dev/null +++ b/vendor/k8s.io/api/certificates/v1/generated.proto @@ -0,0 +1,226 @@ +/* +Copyright 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. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.api.certificates.v1; + +import "k8s.io/api/core/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1"; + +// CertificateSigningRequest objects provide a mechanism to obtain x509 certificates +// by submitting a certificate signing request, and having it asynchronously approved and issued. +// +// Kubelets use this API to obtain: +// 1. client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client-kubelet" signerName). +// 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the "kubernetes.io/kubelet-serving" signerName). +// +// This API can be used to request client certificates to authenticate to kube-apiserver +// (with the "kubernetes.io/kube-apiserver-client" signerName), +// or to obtain certificates from custom non-Kubernetes signers. +message CertificateSigningRequest { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // spec contains the certificate request, and is immutable after creation. + // Only the request, signerName, and usages fields can be set on creation. + // Other fields are derived by Kubernetes and cannot be modified by users. + optional CertificateSigningRequestSpec spec = 2; + + // status contains information about whether the request is approved or denied, + // and the certificate issued by the signer, or the failure condition indicating signer failure. + // +optional + optional CertificateSigningRequestStatus status = 3; +} + +// CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object +message CertificateSigningRequestCondition { + // type of the condition. Known conditions are "Approved", "Denied", and "Failed". + // + // An "Approved" condition is added via the /approval subresource, + // indicating the request was approved and should be issued by the signer. + // + // A "Denied" condition is added via the /approval subresource, + // indicating the request was denied and should not be issued by the signer. + // + // A "Failed" condition is added via the /status subresource, + // indicating the signer failed to issue the certificate. + // + // Approved and Denied conditions are mutually exclusive. + // Approved, Denied, and Failed conditions cannot be removed once added. + // + // Only one condition of a given type is allowed. + optional string type = 1; + + // status of the condition, one of True, False, Unknown. + // Approved, Denied, and Failed conditions may not be "False" or "Unknown". + optional string status = 6; + + // reason indicates a brief reason for the request state + // +optional + optional string reason = 2; + + // message contains a human readable message with details about the request state + // +optional + optional string message = 3; + + // lastUpdateTime is the time of the last update to this condition + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 4; + + // lastTransitionTime is the time the condition last transitioned from one status to another. + // If unset, when a new condition type is added or an existing condition's status is changed, + // the server defaults this to the current time. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 5; +} + +// CertificateSigningRequestList is a collection of CertificateSigningRequest objects +message CertificateSigningRequestList { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // items is a collection of CertificateSigningRequest objects + repeated CertificateSigningRequest items = 2; +} + +// CertificateSigningRequestSpec contains the certificate request. +message CertificateSigningRequestSpec { + // request contains an x509 certificate signing request encoded in a "CERTIFICATE REQUEST" PEM block. + // When serialized as JSON or YAML, the data is additionally base64-encoded. + // +listType=atomic + optional bytes request = 1; + + // signerName indicates the requested signer, and is a qualified name. + // + // List/watch requests for CertificateSigningRequests can filter on this field using a "spec.signerName=NAME" fieldSelector. + // + // Well-known Kubernetes signers are: + // 1. "kubernetes.io/kube-apiserver-client": issues client certificates that can be used to authenticate to kube-apiserver. + // Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the "csrsigning" controller in kube-controller-manager. + // 2. "kubernetes.io/kube-apiserver-client-kubelet": issues client certificates that kubelets use to authenticate to kube-apiserver. + // Requests for this signer can be auto-approved by the "csrapproving" controller in kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager. + // 3. "kubernetes.io/kubelet-serving" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely. + // Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager. + // + // More details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers + // + // Custom signerNames can also be specified. The signer defines: + // 1. Trust distribution: how trust (CA bundles) are distributed. + // 2. Permitted subjects: and behavior when a disallowed subject is requested. + // 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested. + // 4. Required, permitted, or forbidden key usages / extended key usages. + // 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin. + // 6. Whether or not requests for CA certificates are allowed. + optional string signerName = 7; + + // usages specifies a set of key usages requested in the issued certificate. + // + // Requests for TLS client certificates typically request: "digital signature", "key encipherment", "client auth". + // + // Requests for TLS serving certificates typically request: "key encipherment", "digital signature", "server auth". + // + // Valid values are: + // "signing", "digital signature", "content commitment", + // "key encipherment", "key agreement", "data encipherment", + // "cert sign", "crl sign", "encipher only", "decipher only", "any", + // "server auth", "client auth", + // "code signing", "email protection", "s/mime", + // "ipsec end system", "ipsec tunnel", "ipsec user", + // "timestamping", "ocsp signing", "microsoft sgc", "netscape sgc" + // +listType=atomic + repeated string usages = 5; + + // username contains the name of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + // +optional + optional string username = 2; + + // uid contains the uid of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + // +optional + optional string uid = 3; + + // groups contains group membership of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + // +listType=atomic + // +optional + repeated string groups = 4; + + // extra contains extra attributes of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + // +optional + map extra = 6; +} + +// CertificateSigningRequestStatus contains conditions used to indicate +// approved/denied/failed status of the request, and the issued certificate. +message CertificateSigningRequestStatus { + // conditions applied to the request. Known conditions are "Approved", "Denied", and "Failed". + // +listType=map + // +listMapKey=type + // +optional + repeated CertificateSigningRequestCondition conditions = 1; + + // certificate is populated with an issued certificate by the signer after an Approved condition is present. + // This field is set via the /status subresource. Once populated, this field is immutable. + // + // If the certificate signing request is denied, a condition of type "Denied" is added and this field remains empty. + // If the signer cannot issue the certificate, a condition of type "Failed" is added and this field remains empty. + // + // Validation requirements: + // 1. certificate must contain one or more PEM blocks. + // 2. All PEM blocks must have the "CERTIFICATE" label, contain no headers, and the encoded data + // must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280. + // 3. Non-PEM content may appear before or after the "CERTIFICATE" PEM blocks and is unvalidated, + // to allow for explanatory text as described in section 5.2 of RFC7468. + // + // If more than one PEM block is present, and the definition of the requested spec.signerName + // does not indicate otherwise, the first block is the issued certificate, + // and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes. + // + // The certificate is encoded in PEM format. + // + // When serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of: + // + // base64( + // -----BEGIN CERTIFICATE----- + // ... + // -----END CERTIFICATE----- + // ) + // + // +listType=atomic + // +optional + optional bytes certificate = 2; +} + +// ExtraValue masks the value so protobuf can generate +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +message ExtraValue { + // items, if empty, will result in an empty slice + + repeated string items = 1; +} + diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/register.go b/vendor/k8s.io/api/certificates/v1/register.go similarity index 68% rename from vendor/k8s.io/kubernetes/pkg/apis/auditregistration/register.go rename to vendor/k8s.io/api/certificates/v1/register.go index ebaa3810948..2dac94ada05 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/register.go +++ b/vendor/k8s.io/api/certificates/v1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2020 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. @@ -14,18 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -package auditregistration +package v1 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package -const GroupName = "auditregistration.k8s.io" +const GroupName = "certificates.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // Kind takes an unqualified kind and returns a Group qualified GroupKind func Kind(kind string) schema.GroupKind { @@ -38,16 +39,23 @@ func Resource(resource string) schema.GroupResource { } var ( - // SchemeBuilder for audit registration + // SchemeBuilder is the scheme builder with scheme init functions to run for this API package SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // AddToScheme audit registration - AddToScheme = SchemeBuilder.AddToScheme + + localSchemeBuilder = &SchemeBuilder + + // AddToScheme is a global function that registers this API group & version to a scheme + AddToScheme = localSchemeBuilder.AddToScheme ) +// Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &AuditSink{}, - &AuditSinkList{}, + &CertificateSigningRequest{}, + &CertificateSigningRequestList{}, ) + + // Add the watch version that applies + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/api/certificates/v1/types.go b/vendor/k8s.io/api/certificates/v1/types.go new file mode 100644 index 00000000000..8d3b2305ecf --- /dev/null +++ b/vendor/k8s.io/api/certificates/v1/types.go @@ -0,0 +1,284 @@ +/* +Copyright 2020 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 v1 + +import ( + "fmt" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +genclient:method=UpdateApproval,verb=update,subresource=approval,input=k8s.io/api/certificates/v1.CertificateSigningRequest,result=k8s.io/api/certificates/v1.CertificateSigningRequest +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CertificateSigningRequest objects provide a mechanism to obtain x509 certificates +// by submitting a certificate signing request, and having it asynchronously approved and issued. +// +// Kubelets use this API to obtain: +// 1. client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client-kubelet" signerName). +// 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the "kubernetes.io/kubelet-serving" signerName). +// +// This API can be used to request client certificates to authenticate to kube-apiserver +// (with the "kubernetes.io/kube-apiserver-client" signerName), +// or to obtain certificates from custom non-Kubernetes signers. +type CertificateSigningRequest struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // spec contains the certificate request, and is immutable after creation. + // Only the request, signerName, and usages fields can be set on creation. + // Other fields are derived by Kubernetes and cannot be modified by users. + Spec CertificateSigningRequestSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + + // status contains information about whether the request is approved or denied, + // and the certificate issued by the signer, or the failure condition indicating signer failure. + // +optional + Status CertificateSigningRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// CertificateSigningRequestSpec contains the certificate request. +type CertificateSigningRequestSpec struct { + // request contains an x509 certificate signing request encoded in a "CERTIFICATE REQUEST" PEM block. + // When serialized as JSON or YAML, the data is additionally base64-encoded. + // +listType=atomic + Request []byte `json:"request" protobuf:"bytes,1,opt,name=request"` + + // signerName indicates the requested signer, and is a qualified name. + // + // List/watch requests for CertificateSigningRequests can filter on this field using a "spec.signerName=NAME" fieldSelector. + // + // Well-known Kubernetes signers are: + // 1. "kubernetes.io/kube-apiserver-client": issues client certificates that can be used to authenticate to kube-apiserver. + // Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the "csrsigning" controller in kube-controller-manager. + // 2. "kubernetes.io/kube-apiserver-client-kubelet": issues client certificates that kubelets use to authenticate to kube-apiserver. + // Requests for this signer can be auto-approved by the "csrapproving" controller in kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager. + // 3. "kubernetes.io/kubelet-serving" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely. + // Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager. + // + // More details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers + // + // Custom signerNames can also be specified. The signer defines: + // 1. Trust distribution: how trust (CA bundles) are distributed. + // 2. Permitted subjects: and behavior when a disallowed subject is requested. + // 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested. + // 4. Required, permitted, or forbidden key usages / extended key usages. + // 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin. + // 6. Whether or not requests for CA certificates are allowed. + SignerName string `json:"signerName" protobuf:"bytes,7,opt,name=signerName"` + + // usages specifies a set of key usages requested in the issued certificate. + // + // Requests for TLS client certificates typically request: "digital signature", "key encipherment", "client auth". + // + // Requests for TLS serving certificates typically request: "key encipherment", "digital signature", "server auth". + // + // Valid values are: + // "signing", "digital signature", "content commitment", + // "key encipherment", "key agreement", "data encipherment", + // "cert sign", "crl sign", "encipher only", "decipher only", "any", + // "server auth", "client auth", + // "code signing", "email protection", "s/mime", + // "ipsec end system", "ipsec tunnel", "ipsec user", + // "timestamping", "ocsp signing", "microsoft sgc", "netscape sgc" + // +listType=atomic + Usages []KeyUsage `json:"usages,omitempty" protobuf:"bytes,5,opt,name=usages"` + + // username contains the name of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + // +optional + Username string `json:"username,omitempty" protobuf:"bytes,2,opt,name=username"` + // uid contains the uid of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + // +optional + UID string `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"` + // groups contains group membership of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + // +listType=atomic + // +optional + Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"` + // extra contains extra attributes of the user that created the CertificateSigningRequest. + // Populated by the API server on creation and immutable. + // +optional + Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,6,rep,name=extra"` +} + +// Built in signerName values that are honored by kube-controller-manager. +const ( + // "kubernetes.io/kube-apiserver-client" signer issues client certificates that can be used to authenticate to kube-apiserver. + // Never auto-approved by kube-controller-manager. + // Can be issued by the "csrsigning" controller in kube-controller-manager. + KubeAPIServerClientSignerName = "kubernetes.io/kube-apiserver-client" + + // "kubernetes.io/kube-apiserver-client-kubelet" issues client certificates that kubelets use to authenticate to kube-apiserver. + // Can be auto-approved by the "csrapproving" controller in kube-controller-manager. + // Can be issued by the "csrsigning" controller in kube-controller-manager. + KubeAPIServerClientKubeletSignerName = "kubernetes.io/kube-apiserver-client-kubelet" + + // "kubernetes.io/kubelet-serving" issues serving certificates that kubelets use to serve TLS endpoints, + // which kube-apiserver can connect to securely. + // Never auto-approved by kube-controller-manager. + // Can be issued by the "csrsigning" controller in kube-controller-manager. + KubeletServingSignerName = "kubernetes.io/kubelet-serving" +) + +// ExtraValue masks the value so protobuf can generate +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +type ExtraValue []string + +func (t ExtraValue) String() string { + return fmt.Sprintf("%v", []string(t)) +} + +// CertificateSigningRequestStatus contains conditions used to indicate +// approved/denied/failed status of the request, and the issued certificate. +type CertificateSigningRequestStatus struct { + // conditions applied to the request. Known conditions are "Approved", "Denied", and "Failed". + // +listType=map + // +listMapKey=type + // +optional + Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"` + + // certificate is populated with an issued certificate by the signer after an Approved condition is present. + // This field is set via the /status subresource. Once populated, this field is immutable. + // + // If the certificate signing request is denied, a condition of type "Denied" is added and this field remains empty. + // If the signer cannot issue the certificate, a condition of type "Failed" is added and this field remains empty. + // + // Validation requirements: + // 1. certificate must contain one or more PEM blocks. + // 2. All PEM blocks must have the "CERTIFICATE" label, contain no headers, and the encoded data + // must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280. + // 3. Non-PEM content may appear before or after the "CERTIFICATE" PEM blocks and is unvalidated, + // to allow for explanatory text as described in section 5.2 of RFC7468. + // + // If more than one PEM block is present, and the definition of the requested spec.signerName + // does not indicate otherwise, the first block is the issued certificate, + // and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes. + // + // The certificate is encoded in PEM format. + // + // When serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of: + // + // base64( + // -----BEGIN CERTIFICATE----- + // ... + // -----END CERTIFICATE----- + // ) + // + // +listType=atomic + // +optional + Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"` +} + +// RequestConditionType is the type of a CertificateSigningRequestCondition +type RequestConditionType string + +// Well-known condition types for certificate requests. +const ( + // Approved indicates the request was approved and should be issued by the signer. + CertificateApproved RequestConditionType = "Approved" + // Denied indicates the request was denied and should not be issued by the signer. + CertificateDenied RequestConditionType = "Denied" + // Failed indicates the signer failed to issue the certificate. + CertificateFailed RequestConditionType = "Failed" +) + +// CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object +type CertificateSigningRequestCondition struct { + // type of the condition. Known conditions are "Approved", "Denied", and "Failed". + // + // An "Approved" condition is added via the /approval subresource, + // indicating the request was approved and should be issued by the signer. + // + // A "Denied" condition is added via the /approval subresource, + // indicating the request was denied and should not be issued by the signer. + // + // A "Failed" condition is added via the /status subresource, + // indicating the signer failed to issue the certificate. + // + // Approved and Denied conditions are mutually exclusive. + // Approved, Denied, and Failed conditions cannot be removed once added. + // + // Only one condition of a given type is allowed. + Type RequestConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RequestConditionType"` + // status of the condition, one of True, False, Unknown. + // Approved, Denied, and Failed conditions may not be "False" or "Unknown". + Status v1.ConditionStatus `json:"status" protobuf:"bytes,6,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` + // reason indicates a brief reason for the request state + // +optional + Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` + // message contains a human readable message with details about the request state + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` + // lastUpdateTime is the time of the last update to this condition + // +optional + LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdateTime"` + // lastTransitionTime is the time the condition last transitioned from one status to another. + // If unset, when a new condition type is added or an existing condition's status is changed, + // the server defaults this to the current time. + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,5,opt,name=lastTransitionTime"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CertificateSigningRequestList is a collection of CertificateSigningRequest objects +type CertificateSigningRequestList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // items is a collection of CertificateSigningRequest objects + Items []CertificateSigningRequest `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// KeyUsage specifies valid usage contexts for keys. +// See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 +// https://tools.ietf.org/html/rfc5280#section-4.2.1.12 +type KeyUsage string + +// Valid key usages +const ( + UsageSigning KeyUsage = "signing" + UsageDigitalSignature KeyUsage = "digital signature" + UsageContentCommitment KeyUsage = "content commitment" + UsageKeyEncipherment KeyUsage = "key encipherment" + UsageKeyAgreement KeyUsage = "key agreement" + UsageDataEncipherment KeyUsage = "data encipherment" + UsageCertSign KeyUsage = "cert sign" + UsageCRLSign KeyUsage = "crl sign" + UsageEncipherOnly KeyUsage = "encipher only" + UsageDecipherOnly KeyUsage = "decipher only" + UsageAny KeyUsage = "any" + UsageServerAuth KeyUsage = "server auth" + UsageClientAuth KeyUsage = "client auth" + UsageCodeSigning KeyUsage = "code signing" + UsageEmailProtection KeyUsage = "email protection" + UsageSMIME KeyUsage = "s/mime" + UsageIPsecEndSystem KeyUsage = "ipsec end system" + UsageIPsecTunnel KeyUsage = "ipsec tunnel" + UsageIPsecUser KeyUsage = "ipsec user" + UsageTimestamping KeyUsage = "timestamping" + UsageOCSPSigning KeyUsage = "ocsp signing" + UsageMicrosoftSGC KeyUsage = "microsoft sgc" + UsageNetscapeSGC KeyUsage = "netscape sgc" +) diff --git a/vendor/k8s.io/api/certificates/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/certificates/v1/types_swagger_doc_generated.go new file mode 100644 index 00000000000..9a078fa0c45 --- /dev/null +++ b/vendor/k8s.io/api/certificates/v1/types_swagger_doc_generated.go @@ -0,0 +1,88 @@ +/* +Copyright 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 v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_CertificateSigningRequest = map[string]string{ + "": "CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued.\n\nKubelets use this API to obtain:\n 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName).\n 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName).\n\nThis API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers.", + "spec": "spec contains the certificate request, and is immutable after creation. Only the request, signerName, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.", + "status": "status contains information about whether the request is approved or denied, and the certificate issued by the signer, or the failure condition indicating signer failure.", +} + +func (CertificateSigningRequest) SwaggerDoc() map[string]string { + return map_CertificateSigningRequest +} + +var map_CertificateSigningRequestCondition = map[string]string{ + "": "CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object", + "type": "type of the condition. Known conditions are \"Approved\", \"Denied\", and \"Failed\".\n\nAn \"Approved\" condition is added via the /approval subresource, indicating the request was approved and should be issued by the signer.\n\nA \"Denied\" condition is added via the /approval subresource, indicating the request was denied and should not be issued by the signer.\n\nA \"Failed\" condition is added via the /status subresource, indicating the signer failed to issue the certificate.\n\nApproved and Denied conditions are mutually exclusive. Approved, Denied, and Failed conditions cannot be removed once added.\n\nOnly one condition of a given type is allowed.", + "status": "status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\".", + "reason": "reason indicates a brief reason for the request state", + "message": "message contains a human readable message with details about the request state", + "lastUpdateTime": "lastUpdateTime is the time of the last update to this condition", + "lastTransitionTime": "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", +} + +func (CertificateSigningRequestCondition) SwaggerDoc() map[string]string { + return map_CertificateSigningRequestCondition +} + +var map_CertificateSigningRequestList = map[string]string{ + "": "CertificateSigningRequestList is a collection of CertificateSigningRequest objects", + "items": "items is a collection of CertificateSigningRequest objects", +} + +func (CertificateSigningRequestList) SwaggerDoc() map[string]string { + return map_CertificateSigningRequestList +} + +var map_CertificateSigningRequestSpec = map[string]string{ + "": "CertificateSigningRequestSpec contains the certificate request.", + "request": "request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.", + "signerName": "signerName indicates the requested signer, and is a qualified name.\n\nList/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector.\n\nWell-known Kubernetes signers are:\n 1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver.\n Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver.\n Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.\n Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n\nMore details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers\n\nCustom signerNames can also be specified. The signer defines:\n 1. Trust distribution: how trust (CA bundles) are distributed.\n 2. Permitted subjects: and behavior when a disallowed subject is requested.\n 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.\n 4. Required, permitted, or forbidden key usages / extended key usages.\n 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.\n 6. Whether or not requests for CA certificates are allowed.", + "usages": "usages specifies a set of key usages requested in the issued certificate.\n\nRequests for TLS client certificates typically request: \"digital signature\", \"key encipherment\", \"client auth\".\n\nRequests for TLS serving certificates typically request: \"key encipherment\", \"digital signature\", \"server auth\".\n\nValid values are:\n \"signing\", \"digital signature\", \"content commitment\",\n \"key encipherment\", \"key agreement\", \"data encipherment\",\n \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\",\n \"server auth\", \"client auth\",\n \"code signing\", \"email protection\", \"s/mime\",\n \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\",\n \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\"", + "username": "username contains the name of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + "uid": "uid contains the uid of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + "groups": "groups contains group membership of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + "extra": "extra contains extra attributes of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", +} + +func (CertificateSigningRequestSpec) SwaggerDoc() map[string]string { + return map_CertificateSigningRequestSpec +} + +var map_CertificateSigningRequestStatus = map[string]string{ + "": "CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.", + "conditions": "conditions applied to the request. Known conditions are \"Approved\", \"Denied\", and \"Failed\".", + "certificate": "certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificate must contain one or more PEM blocks.\n 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded data\n must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.\n 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated,\n to allow for explanatory text as described in section 5.2 of RFC7468.\n\nIf more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.\n\nThe certificate is encoded in PEM format.\n\nWhen serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:\n\n base64(", +} + +func (CertificateSigningRequestStatus) SwaggerDoc() map[string]string { + return map_CertificateSigningRequestStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/api/certificates/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/certificates/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000000..cc6a60be781 --- /dev/null +++ b/vendor/k8s.io/api/certificates/v1/zz_generated.deepcopy.go @@ -0,0 +1,198 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CertificateSigningRequest) DeepCopyInto(out *CertificateSigningRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSigningRequest. +func (in *CertificateSigningRequest) DeepCopy() *CertificateSigningRequest { + if in == nil { + return nil + } + out := new(CertificateSigningRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CertificateSigningRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CertificateSigningRequestCondition) DeepCopyInto(out *CertificateSigningRequestCondition) { + *out = *in + in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSigningRequestCondition. +func (in *CertificateSigningRequestCondition) DeepCopy() *CertificateSigningRequestCondition { + if in == nil { + return nil + } + out := new(CertificateSigningRequestCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CertificateSigningRequestList) DeepCopyInto(out *CertificateSigningRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CertificateSigningRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSigningRequestList. +func (in *CertificateSigningRequestList) DeepCopy() *CertificateSigningRequestList { + if in == nil { + return nil + } + out := new(CertificateSigningRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CertificateSigningRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CertificateSigningRequestSpec) DeepCopyInto(out *CertificateSigningRequestSpec) { + *out = *in + if in.Request != nil { + in, out := &in.Request, &out.Request + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Usages != nil { + in, out := &in.Usages, &out.Usages + *out = make([]KeyUsage, len(*in)) + copy(*out, *in) + } + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Extra != nil { + in, out := &in.Extra, &out.Extra + *out = make(map[string]ExtraValue, len(*in)) + for key, val := range *in { + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSigningRequestSpec. +func (in *CertificateSigningRequestSpec) DeepCopy() *CertificateSigningRequestSpec { + if in == nil { + return nil + } + out := new(CertificateSigningRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CertificateSigningRequestStatus) DeepCopyInto(out *CertificateSigningRequestStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]CertificateSigningRequestCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Certificate != nil { + in, out := &in.Certificate, &out.Certificate + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSigningRequestStatus. +func (in *CertificateSigningRequestStatus) DeepCopy() *CertificateSigningRequestStatus { + if in == nil { + return nil + } + out := new(CertificateSigningRequestStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ExtraValue) DeepCopyInto(out *ExtraValue) { + { + in := &in + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue. +func (in ExtraValue) DeepCopy() ExtraValue { + if in == nil { + return nil + } + out := new(ExtraValue) + in.DeepCopyInto(out) + return *out +} diff --git a/vendor/k8s.io/api/certificates/v1beta1/BUILD b/vendor/k8s.io/api/certificates/v1beta1/BUILD index 2d4532cffcd..f731ec6b4b3 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/BUILD +++ b/vendor/k8s.io/api/certificates/v1beta1/BUILD @@ -14,10 +14,12 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/certificates/v1beta1", importpath = "k8s.io/api/certificates/v1beta1", deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", diff --git a/vendor/k8s.io/api/certificates/v1beta1/doc.go b/vendor/k8s.io/api/certificates/v1beta1/doc.go index 9055248b9dc..1165518c670 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/doc.go +++ b/vendor/k8s.io/api/certificates/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=certificates.k8s.io diff --git a/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go b/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go index 24fa4bf8103..1729931b82d 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go @@ -27,6 +27,8 @@ import ( proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + math "math" math_bits "math/bits" reflect "reflect" @@ -227,59 +229,62 @@ func init() { } var fileDescriptor_09d156762b8218ef = []byte{ - // 824 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xf6, 0xfa, 0xdb, 0xe3, 0x90, 0x56, 0x23, 0x54, 0x2d, 0x91, 0xba, 0x1b, 0xad, 0x00, 0x85, - 0x8f, 0xce, 0x92, 0x0a, 0x41, 0x94, 0x03, 0x82, 0x0d, 0x15, 0x44, 0xb4, 0x20, 0x4d, 0x1a, 0x0e, - 0x08, 0x89, 0x8e, 0xd7, 0x6f, 0x37, 0x53, 0x77, 0x3f, 0xd8, 0x99, 0x35, 0xf8, 0xd6, 0x9f, 0xc0, - 0x91, 0x0b, 0x12, 0x3f, 0x27, 0x1c, 0x90, 0x7a, 0xec, 0x01, 0x59, 0xc4, 0xdc, 0xf9, 0x01, 0x3d, - 0xa1, 0x99, 0x1d, 0x7b, 0x8d, 0x23, 0xd7, 0x55, 0x73, 0xdb, 0xf7, 0x79, 0xdf, 0xe7, 0x79, 0x3f, - 0x67, 0xd1, 0x97, 0xa3, 0x03, 0x41, 0x78, 0xea, 0x8f, 0x8a, 0x01, 0xe4, 0x09, 0x48, 0x10, 0xfe, - 0x18, 0x92, 0x61, 0x9a, 0xfb, 0xc6, 0xc1, 0x32, 0xee, 0x87, 0x90, 0x4b, 0xfe, 0x90, 0x87, 0x4c, - 0xbb, 0xf7, 0x07, 0x20, 0xd9, 0xbe, 0x1f, 0x41, 0x02, 0x39, 0x93, 0x30, 0x24, 0x59, 0x9e, 0xca, - 0x14, 0xbb, 0x25, 0x81, 0xb0, 0x8c, 0x93, 0x65, 0x02, 0x31, 0x84, 0x9d, 0x5b, 0x11, 0x97, 0x67, - 0xc5, 0x80, 0x84, 0x69, 0xec, 0x47, 0x69, 0x94, 0xfa, 0x9a, 0x37, 0x28, 0x1e, 0x6a, 0x4b, 0x1b, - 0xfa, 0xab, 0xd4, 0xdb, 0xf9, 0xb0, 0x2a, 0x20, 0x66, 0xe1, 0x19, 0x4f, 0x20, 0x9f, 0xf8, 0xd9, - 0x28, 0x52, 0x80, 0xf0, 0x63, 0x90, 0xcc, 0x1f, 0x5f, 0xaa, 0x62, 0xc7, 0x5f, 0xc7, 0xca, 0x8b, - 0x44, 0xf2, 0x18, 0x2e, 0x11, 0x3e, 0xda, 0x44, 0x10, 0xe1, 0x19, 0xc4, 0x6c, 0x95, 0xe7, 0xfd, - 0x51, 0x47, 0x6f, 0x1c, 0x55, 0x6d, 0x9e, 0xf0, 0x28, 0xe1, 0x49, 0x44, 0xe1, 0xc7, 0x02, 0x84, - 0xc4, 0x0f, 0x50, 0x57, 0x55, 0x38, 0x64, 0x92, 0xd9, 0xd6, 0xae, 0xb5, 0xd7, 0xbf, 0xfd, 0x01, - 0xa9, 0xe6, 0xb3, 0x48, 0x44, 0xb2, 0x51, 0xa4, 0x00, 0x41, 0x54, 0x34, 0x19, 0xef, 0x93, 0x6f, - 0x06, 0x8f, 0x20, 0x94, 0xf7, 0x40, 0xb2, 0x00, 0x9f, 0x4f, 0xdd, 0xda, 0x6c, 0xea, 0xa2, 0x0a, - 0xa3, 0x0b, 0x55, 0xfc, 0x00, 0x35, 0x45, 0x06, 0xa1, 0x5d, 0xd7, 0xea, 0x9f, 0x90, 0x0d, 0xd3, - 0x27, 0x6b, 0x6b, 0x3d, 0xc9, 0x20, 0x0c, 0xb6, 0x4c, 0xae, 0xa6, 0xb2, 0xa8, 0x56, 0xc6, 0x67, - 0xa8, 0x2d, 0x24, 0x93, 0x85, 0xb0, 0x1b, 0x3a, 0xc7, 0xa7, 0x57, 0xc8, 0xa1, 0x75, 0x82, 0x6d, - 0x93, 0xa5, 0x5d, 0xda, 0xd4, 0xe8, 0x7b, 0xbf, 0xd5, 0x91, 0xb7, 0x96, 0x7b, 0x94, 0x26, 0x43, - 0x2e, 0x79, 0x9a, 0xe0, 0x03, 0xd4, 0x94, 0x93, 0x0c, 0xf4, 0x40, 0x7b, 0xc1, 0x9b, 0xf3, 0x92, - 0xef, 0x4f, 0x32, 0x78, 0x3e, 0x75, 0x5f, 0x5f, 0x8d, 0x57, 0x38, 0xd5, 0x0c, 0xfc, 0x36, 0x6a, - 0xe7, 0xc0, 0x44, 0x9a, 0xe8, 0x71, 0xf5, 0xaa, 0x42, 0xa8, 0x46, 0xa9, 0xf1, 0xe2, 0x77, 0x50, - 0x27, 0x06, 0x21, 0x58, 0x04, 0xba, 0xe7, 0x5e, 0x70, 0xcd, 0x04, 0x76, 0xee, 0x95, 0x30, 0x9d, - 0xfb, 0xf1, 0x23, 0xb4, 0xfd, 0x98, 0x09, 0x79, 0x9a, 0x0d, 0x99, 0x84, 0xfb, 0x3c, 0x06, 0xbb, - 0xa9, 0xa7, 0xf4, 0xee, 0xcb, 0xed, 0x59, 0x31, 0x82, 0x1b, 0x46, 0x7d, 0xfb, 0xee, 0xff, 0x94, - 0xe8, 0x8a, 0xb2, 0x37, 0xb5, 0xd0, 0xcd, 0xb5, 0xf3, 0xb9, 0xcb, 0x85, 0xc4, 0xdf, 0x5f, 0xba, - 0x37, 0xf2, 0x72, 0x75, 0x28, 0xb6, 0xbe, 0xb6, 0xeb, 0xa6, 0x96, 0xee, 0x1c, 0x59, 0xba, 0xb5, - 0x1f, 0x50, 0x8b, 0x4b, 0x88, 0x85, 0x5d, 0xdf, 0x6d, 0xec, 0xf5, 0x6f, 0x1f, 0xbe, 0xfa, 0x21, - 0x04, 0xaf, 0x99, 0x34, 0xad, 0x63, 0x25, 0x48, 0x4b, 0x5d, 0xef, 0xdf, 0xc6, 0x0b, 0x1a, 0x54, - 0x27, 0x89, 0xdf, 0x42, 0x9d, 0xbc, 0x34, 0x75, 0x7f, 0x5b, 0x41, 0x5f, 0x6d, 0xc5, 0x44, 0xd0, - 0xb9, 0x0f, 0x13, 0x84, 0x04, 0x8f, 0x12, 0xc8, 0xbf, 0x66, 0x31, 0xd8, 0x9d, 0x72, 0xd9, 0xea, - 0x0d, 0x9d, 0x2c, 0x50, 0xba, 0x14, 0x81, 0x09, 0x6a, 0x17, 0x6a, 0x9d, 0xc2, 0x6e, 0xed, 0x36, - 0xf6, 0x7a, 0xc1, 0x0d, 0x75, 0x14, 0xa7, 0x1a, 0x79, 0x3e, 0x75, 0xbb, 0x5f, 0xc1, 0x44, 0x1b, - 0xd4, 0x44, 0xe1, 0xf7, 0x51, 0xb7, 0x10, 0x90, 0x27, 0x4a, 0xbd, 0x3c, 0xa5, 0xc5, 0xdc, 0x4e, - 0x0d, 0x4e, 0x17, 0x11, 0xf8, 0x26, 0x6a, 0x14, 0x7c, 0x68, 0x4e, 0xa9, 0x6f, 0x02, 0x1b, 0xa7, - 0xc7, 0x9f, 0x53, 0x85, 0x63, 0x0f, 0xb5, 0xa3, 0x3c, 0x2d, 0x32, 0x61, 0x37, 0x75, 0x72, 0xa4, - 0x92, 0x7f, 0xa1, 0x11, 0x6a, 0x3c, 0x38, 0x41, 0x2d, 0xf8, 0x59, 0xe6, 0xcc, 0x6e, 0xeb, 0xd1, - 0x1f, 0x5f, 0xed, 0x9d, 0x93, 0x3b, 0x4a, 0xeb, 0x4e, 0x22, 0xf3, 0x49, 0xb5, 0x09, 0x8d, 0xd1, - 0x32, 0xcd, 0x0e, 0x20, 0x54, 0xc5, 0xe0, 0xeb, 0xa8, 0x31, 0x82, 0x49, 0xf9, 0xe0, 0xa8, 0xfa, - 0xc4, 0x9f, 0xa1, 0xd6, 0x98, 0x3d, 0x2e, 0xc0, 0xfc, 0x77, 0xde, 0xdb, 0x58, 0x8f, 0x56, 0xfb, - 0x56, 0x51, 0x68, 0xc9, 0x3c, 0xac, 0x1f, 0x58, 0xde, 0x9f, 0x16, 0x72, 0x37, 0xfc, 0x2d, 0xf0, - 0x4f, 0x08, 0x85, 0xf3, 0xb7, 0x2c, 0x6c, 0x4b, 0xf7, 0x7f, 0xf4, 0xea, 0xfd, 0x2f, 0xfe, 0x0b, - 0xd5, 0x8f, 0x75, 0x01, 0x09, 0xba, 0x94, 0x0a, 0xef, 0xa3, 0xfe, 0x92, 0xb4, 0xee, 0x74, 0x2b, - 0xb8, 0x36, 0x9b, 0xba, 0xfd, 0x25, 0x71, 0xba, 0x1c, 0xe3, 0x7d, 0x6c, 0xc6, 0xa6, 0x1b, 0xc5, - 0xee, 0xfc, 0xbd, 0x58, 0x7a, 0xaf, 0xbd, 0xd5, 0x7b, 0x3f, 0xec, 0xfe, 0xfa, 0xbb, 0x5b, 0x7b, - 0xf2, 0xd7, 0x6e, 0x2d, 0xb8, 0x75, 0x7e, 0xe1, 0xd4, 0x9e, 0x5e, 0x38, 0xb5, 0x67, 0x17, 0x4e, - 0xed, 0xc9, 0xcc, 0xb1, 0xce, 0x67, 0x8e, 0xf5, 0x74, 0xe6, 0x58, 0xcf, 0x66, 0x8e, 0xf5, 0xf7, - 0xcc, 0xb1, 0x7e, 0xf9, 0xc7, 0xa9, 0x7d, 0xd7, 0x31, 0xdd, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, - 0x69, 0x8d, 0xc8, 0xd3, 0xaf, 0x07, 0x00, 0x00, + // 878 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4b, 0x6f, 0x1c, 0x45, + 0x10, 0xde, 0xf1, 0xbe, 0x7b, 0x8d, 0x13, 0xb5, 0x50, 0x34, 0xac, 0x94, 0x19, 0x6b, 0x04, 0xc8, + 0x3c, 0xd2, 0x83, 0xa3, 0x08, 0x2c, 0x1f, 0x10, 0x8c, 0x89, 0xc0, 0xc2, 0x01, 0xa9, 0x6d, 0x73, + 0x40, 0x48, 0xa4, 0x77, 0xb6, 0x32, 0xee, 0x6c, 0xe6, 0xc1, 0x74, 0xcf, 0xc2, 0xde, 0xf2, 0x13, + 0x38, 0x72, 0xe4, 0xe7, 0x98, 0x03, 0x52, 0x8e, 0x39, 0xa0, 0x15, 0xde, 0xdc, 0xf9, 0x01, 0x3e, + 0xa1, 0xee, 0xe9, 0x9d, 0x5d, 0xbf, 0x70, 0x48, 0x6e, 0xdb, 0x5f, 0xd7, 0xf7, 0x7d, 0x55, 0x35, + 0xd5, 0xb5, 0xe8, 0xab, 0xd1, 0x96, 0x20, 0x3c, 0xf5, 0x47, 0xc5, 0x00, 0xf2, 0x04, 0x24, 0x08, + 0x7f, 0x0c, 0xc9, 0x30, 0xcd, 0x7d, 0x73, 0xc1, 0x32, 0xee, 0x87, 0x90, 0x4b, 0xfe, 0x88, 0x87, + 0x4c, 0x5f, 0x6f, 0x0e, 0x40, 0xb2, 0x4d, 0x3f, 0x82, 0x04, 0x72, 0x26, 0x61, 0x48, 0xb2, 0x3c, + 0x95, 0x29, 0x76, 0x4b, 0x02, 0x61, 0x19, 0x27, 0xcb, 0x04, 0x62, 0x08, 0xfd, 0x3b, 0x11, 0x97, + 0x47, 0xc5, 0x80, 0x84, 0x69, 0xec, 0x47, 0x69, 0x94, 0xfa, 0x9a, 0x37, 0x28, 0x1e, 0xe9, 0x93, + 0x3e, 0xe8, 0x5f, 0xa5, 0x5e, 0xdf, 0x5b, 0x4e, 0x20, 0xcd, 0xc1, 0x1f, 0x5f, 0xf0, 0xec, 0xdf, + 0x5b, 0xc4, 0xc4, 0x2c, 0x3c, 0xe2, 0x09, 0xe4, 0x13, 0x3f, 0x1b, 0x45, 0x0a, 0x10, 0x7e, 0x0c, + 0x92, 0x5d, 0xc6, 0xf2, 0xaf, 0x62, 0xe5, 0x45, 0x22, 0x79, 0x0c, 0x17, 0x08, 0x1f, 0x5f, 0x47, + 0x10, 0xe1, 0x11, 0xc4, 0xec, 0x3c, 0xcf, 0xfb, 0x63, 0x05, 0xbd, 0xb5, 0xb3, 0x68, 0xc5, 0x3e, + 0x8f, 0x12, 0x9e, 0x44, 0x14, 0x7e, 0x2a, 0x40, 0x48, 0xfc, 0x10, 0x75, 0x54, 0x86, 0x43, 0x26, + 0x99, 0x6d, 0xad, 0x5b, 0x1b, 0xbd, 0xbb, 0x1f, 0x91, 0x45, 0x0f, 0x2b, 0x23, 0x92, 0x8d, 0x22, + 0x05, 0x08, 0xa2, 0xa2, 0xc9, 0x78, 0x93, 0x7c, 0x3b, 0x78, 0x0c, 0xa1, 0x7c, 0x00, 0x92, 0x05, + 0xf8, 0x78, 0xea, 0xd6, 0x66, 0x53, 0x17, 0x2d, 0x30, 0x5a, 0xa9, 0xe2, 0x87, 0xa8, 0x21, 0x32, + 0x08, 0xed, 0x15, 0xad, 0xfe, 0x29, 0xb9, 0xe6, 0x0b, 0x91, 0x2b, 0x73, 0xdd, 0xcf, 0x20, 0x0c, + 0x56, 0x8d, 0x57, 0x43, 0x9d, 0xa8, 0x56, 0xc6, 0x47, 0xa8, 0x25, 0x24, 0x93, 0x85, 0xb0, 0xeb, + 0xda, 0xe3, 0xb3, 0xd7, 0xf0, 0xd0, 0x3a, 0xc1, 0x9a, 0x71, 0x69, 0x95, 0x67, 0x6a, 0xf4, 0xbd, + 0x17, 0x75, 0xe4, 0x5d, 0xc9, 0xdd, 0x49, 0x93, 0x21, 0x97, 0x3c, 0x4d, 0xf0, 0x16, 0x6a, 0xc8, + 0x49, 0x06, 0xba, 0xa1, 0xdd, 0xe0, 0xed, 0x79, 0xca, 0x07, 0x93, 0x0c, 0x4e, 0xa7, 0xee, 0x9b, + 0xe7, 0xe3, 0x15, 0x4e, 0x35, 0x03, 0xef, 0x55, 0xa5, 0xb4, 0x34, 0xf7, 0xde, 0xd9, 0x44, 0x4e, + 0xa7, 0xee, 0x25, 0x13, 0x49, 0x2a, 0xa5, 0xb3, 0xe9, 0xe2, 0x77, 0x51, 0x2b, 0x07, 0x26, 0xd2, + 0x44, 0x37, 0xbf, 0xbb, 0x28, 0x8b, 0x6a, 0x94, 0x9a, 0x5b, 0xfc, 0x1e, 0x6a, 0xc7, 0x20, 0x04, + 0x8b, 0x40, 0x77, 0xb0, 0x1b, 0xdc, 0x30, 0x81, 0xed, 0x07, 0x25, 0x4c, 0xe7, 0xf7, 0xf8, 0x31, + 0x5a, 0x7b, 0xc2, 0x84, 0x3c, 0xcc, 0x86, 0x4c, 0xc2, 0x01, 0x8f, 0xc1, 0x6e, 0xe8, 0x9e, 0xbf, + 0xff, 0x72, 0x53, 0xa3, 0x18, 0xc1, 0x2d, 0xa3, 0xbe, 0xb6, 0x77, 0x46, 0x89, 0x9e, 0x53, 0xc6, + 0x63, 0x84, 0x15, 0x72, 0x90, 0xb3, 0x44, 0x94, 0x8d, 0x52, 0x7e, 0xcd, 0xff, 0xed, 0xd7, 0x37, + 0x7e, 0x78, 0xef, 0x82, 0x1a, 0xbd, 0xc4, 0xc1, 0x9b, 0x5a, 0xe8, 0xf6, 0x95, 0x5f, 0x79, 0x8f, + 0x0b, 0x89, 0x7f, 0xb8, 0xf0, 0x6a, 0xc8, 0xcb, 0xe5, 0xa3, 0xd8, 0xfa, 0xcd, 0xdc, 0x34, 0x39, + 0x75, 0xe6, 0xc8, 0xd2, 0x8b, 0xf9, 0x11, 0x35, 0xb9, 0x84, 0x58, 0xd8, 0x2b, 0xeb, 0xf5, 0x8d, + 0xde, 0xdd, 0xed, 0x57, 0x1f, 0xe7, 0xe0, 0x0d, 0x63, 0xd3, 0xdc, 0x55, 0x82, 0xb4, 0xd4, 0xf5, + 0xfe, 0xa9, 0xff, 0x47, 0x81, 0xea, 0x61, 0xe1, 0x77, 0x50, 0x3b, 0x2f, 0x8f, 0xba, 0xbe, 0xd5, + 0xa0, 0xa7, 0xa6, 0xc1, 0x44, 0xd0, 0xf9, 0x1d, 0x26, 0x08, 0x09, 0x1e, 0x25, 0x90, 0x7f, 0xc3, + 0x62, 0xb0, 0xdb, 0xe5, 0x90, 0xa9, 0x4d, 0xb0, 0x5f, 0xa1, 0x74, 0x29, 0x02, 0x13, 0xd4, 0x2a, + 0xd4, 0x18, 0x09, 0xbb, 0xb9, 0x5e, 0xdf, 0xe8, 0x06, 0xb7, 0xd4, 0x30, 0x1e, 0x6a, 0xe4, 0x74, + 0xea, 0x76, 0xbe, 0x86, 0x89, 0x3e, 0x50, 0x13, 0x85, 0x3f, 0x44, 0x9d, 0x42, 0x40, 0x9e, 0x28, + 0xf5, 0x72, 0x84, 0xab, 0xbe, 0x1d, 0x1a, 0x9c, 0x56, 0x11, 0xf8, 0x36, 0xaa, 0x17, 0x7c, 0x68, + 0x46, 0xb8, 0x67, 0x02, 0xeb, 0x87, 0xbb, 0x5f, 0x50, 0x85, 0x63, 0x0f, 0xb5, 0xa2, 0x3c, 0x2d, + 0x32, 0x61, 0x37, 0xb4, 0x39, 0x52, 0xe6, 0x5f, 0x6a, 0x84, 0x9a, 0x1b, 0x9c, 0xa0, 0x26, 0xfc, + 0x22, 0x73, 0x66, 0xb7, 0x74, 0xeb, 0x77, 0x5f, 0x6f, 0x5b, 0x91, 0xfb, 0x4a, 0xeb, 0x7e, 0x22, + 0xf3, 0xc9, 0xe2, 0x4b, 0x68, 0x8c, 0x96, 0x36, 0x7d, 0x40, 0x68, 0x11, 0x83, 0x6f, 0xa2, 0xfa, + 0x08, 0x26, 0xe5, 0xda, 0xa0, 0xea, 0x27, 0xfe, 0x1c, 0x35, 0xc7, 0xec, 0x49, 0x01, 0x66, 0x7b, + 0x7e, 0x70, 0x6d, 0x3e, 0x5a, 0xed, 0x3b, 0x45, 0xa1, 0x25, 0x73, 0x7b, 0x65, 0xcb, 0xf2, 0xfe, + 0xb4, 0x90, 0x7b, 0xcd, 0xce, 0xc3, 0x3f, 0x23, 0x14, 0xce, 0xf7, 0x88, 0xb0, 0x2d, 0x5d, 0xff, + 0xce, 0xab, 0xd7, 0x5f, 0xed, 0xa4, 0xc5, 0xdf, 0x43, 0x05, 0x09, 0xba, 0x64, 0x85, 0x37, 0x51, + 0x6f, 0x49, 0x5a, 0x57, 0xba, 0x1a, 0xdc, 0x98, 0x4d, 0xdd, 0xde, 0x92, 0x38, 0x5d, 0x8e, 0xf1, + 0x3e, 0x31, 0x6d, 0xd3, 0x85, 0x62, 0x77, 0xfe, 0x5e, 0x2c, 0xfd, 0x5d, 0xbb, 0xe7, 0xe7, 0x7d, + 0xbb, 0xf3, 0xdb, 0xef, 0x6e, 0xed, 0xe9, 0x5f, 0xeb, 0xb5, 0xe0, 0xce, 0xf1, 0x89, 0x53, 0x7b, + 0x76, 0xe2, 0xd4, 0x9e, 0x9f, 0x38, 0xb5, 0xa7, 0x33, 0xc7, 0x3a, 0x9e, 0x39, 0xd6, 0xb3, 0x99, + 0x63, 0x3d, 0x9f, 0x39, 0xd6, 0xdf, 0x33, 0xc7, 0xfa, 0xf5, 0x85, 0x53, 0xfb, 0xbe, 0x6d, 0xaa, + 0xfb, 0x37, 0x00, 0x00, 0xff, 0xff, 0x21, 0x97, 0x54, 0xe9, 0x99, 0x08, 0x00, 0x00, } func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { @@ -355,6 +360,21 @@ func (m *CertificateSigningRequestCondition) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0x32 + { + size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a { size, err := m.LastUpdateTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -640,6 +660,10 @@ func (m *CertificateSigningRequestCondition) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = m.LastUpdateTime.Size() n += 1 + l + sovGenerated(uint64(l)) + l = m.LastTransitionTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Status) + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -763,6 +787,8 @@ func (this *CertificateSigningRequestCondition) String() string { `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, `LastUpdateTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastUpdateTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, `}`, }, "") return s @@ -1143,6 +1169,71 @@ func (m *CertificateSigningRequestCondition) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/api/certificates/v1beta1/generated.proto b/vendor/k8s.io/api/certificates/v1beta1/generated.proto index 78d2dbc78fb..2fb4dc4ec71 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/generated.proto +++ b/vendor/k8s.io/api/certificates/v1beta1/generated.proto @@ -21,6 +21,7 @@ syntax = 'proto2'; package k8s.io.api.certificates.v1beta1; +import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; @@ -43,9 +44,16 @@ message CertificateSigningRequest { } message CertificateSigningRequestCondition { - // request approval state, currently Approved or Denied. + // type of the condition. Known conditions include "Approved", "Denied", and "Failed". optional string type = 1; + // Status of the condition, one of True, False, Unknown. + // Approved, Denied, and Failed conditions may not be "False" or "Unknown". + // Defaults to "True". + // If unset, should be treated as "True". + // +optional + optional string status = 6; + // brief reason for the request state // +optional optional string reason = 2; @@ -57,6 +65,12 @@ message CertificateSigningRequestCondition { // timestamp for the last update to this condition // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 4; + + // lastTransitionTime is the time the condition last transitioned from one status to another. + // If unset, when a new condition type is added or an existing condition's status is changed, + // the server defaults this to the current time. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 5; } message CertificateSigningRequestList { @@ -71,6 +85,7 @@ message CertificateSigningRequestList { // Kubernetes and cannot be modified by users. message CertificateSigningRequestSpec { // Base64-encoded PKCS#10 CSR data + // +listType=atomic optional bytes request = 1; // Requested signer for the request. It is a qualified name in the form: @@ -90,6 +105,31 @@ message CertificateSigningRequestSpec { // valid for. // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 + // Valid values are: + // "signing", + // "digital signature", + // "content commitment", + // "key encipherment", + // "key agreement", + // "data encipherment", + // "cert sign", + // "crl sign", + // "encipher only", + // "decipher only", + // "any", + // "server auth", + // "client auth", + // "code signing", + // "email protection", + // "s/mime", + // "ipsec end system", + // "ipsec tunnel", + // "ipsec user", + // "timestamping", + // "ocsp signing", + // "microsoft sgc", + // "netscape sgc" + // +listType=atomic repeated string usages = 5; // Information about the requesting user. @@ -104,6 +144,7 @@ message CertificateSigningRequestSpec { // Group information about the requesting user. // See user.Info interface for details. + // +listType=atomic // +optional repeated string groups = 4; @@ -115,10 +156,13 @@ message CertificateSigningRequestSpec { message CertificateSigningRequestStatus { // Conditions applied to the request, such as approval or denial. + // +listType=map + // +listMapKey=type // +optional repeated CertificateSigningRequestCondition conditions = 1; // If request was approved, the controller will place the issued certificate here. + // +listType=atomic // +optional optional bytes certificate = 2; } diff --git a/vendor/k8s.io/api/certificates/v1beta1/types.go b/vendor/k8s.io/api/certificates/v1beta1/types.go index 5a46e63420f..9e61c67ff4d 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/types.go +++ b/vendor/k8s.io/api/certificates/v1beta1/types.go @@ -19,12 +19,16 @@ package v1beta1 import ( "fmt" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.12 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=certificates.k8s.io,v1,CertificateSigningRequest // Describes a certificate signing request type CertificateSigningRequest struct { @@ -46,6 +50,7 @@ type CertificateSigningRequest struct { // Kubernetes and cannot be modified by users. type CertificateSigningRequestSpec struct { // Base64-encoded PKCS#10 CSR data + // +listType=atomic Request []byte `json:"request" protobuf:"bytes,1,opt,name=request"` // Requested signer for the request. It is a qualified name in the form: @@ -65,6 +70,31 @@ type CertificateSigningRequestSpec struct { // valid for. // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 + // Valid values are: + // "signing", + // "digital signature", + // "content commitment", + // "key encipherment", + // "key agreement", + // "data encipherment", + // "cert sign", + // "crl sign", + // "encipher only", + // "decipher only", + // "any", + // "server auth", + // "client auth", + // "code signing", + // "email protection", + // "s/mime", + // "ipsec end system", + // "ipsec tunnel", + // "ipsec user", + // "timestamping", + // "ocsp signing", + // "microsoft sgc", + // "netscape sgc" + // +listType=atomic Usages []KeyUsage `json:"usages,omitempty" protobuf:"bytes,5,opt,name=usages"` // Information about the requesting user. @@ -77,6 +107,7 @@ type CertificateSigningRequestSpec struct { UID string `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"` // Group information about the requesting user. // See user.Info interface for details. + // +listType=atomic // +optional Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"` // Extra information about the requesting user. @@ -118,10 +149,13 @@ func (t ExtraValue) String() string { type CertificateSigningRequestStatus struct { // Conditions applied to the request, such as approval or denial. + // +listType=map + // +listMapKey=type // +optional Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"` // If request was approved, the controller will place the issued certificate here. + // +listType=atomic // +optional Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"` } @@ -132,11 +166,18 @@ type RequestConditionType string const ( CertificateApproved RequestConditionType = "Approved" CertificateDenied RequestConditionType = "Denied" + CertificateFailed RequestConditionType = "Failed" ) type CertificateSigningRequestCondition struct { - // request approval state, currently Approved or Denied. + // type of the condition. Known conditions include "Approved", "Denied", and "Failed". Type RequestConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RequestConditionType"` + // Status of the condition, one of True, False, Unknown. + // Approved, Denied, and Failed conditions may not be "False" or "Unknown". + // Defaults to "True". + // If unset, should be treated as "True". + // +optional + Status v1.ConditionStatus `json:"status" protobuf:"bytes,6,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` // brief reason for the request state // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` @@ -146,9 +187,17 @@ type CertificateSigningRequestCondition struct { // timestamp for the last update to this condition // +optional LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdateTime"` + // lastTransitionTime is the time the condition last transitioned from one status to another. + // If unset, when a new condition type is added or an existing condition's status is changed, + // the server defaults this to the current time. + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,5,opt,name=lastTransitionTime"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.12 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=certificates.k8s.io,v1,CertificateSigningRequestList type CertificateSigningRequestList struct { metav1.TypeMeta `json:",inline"` diff --git a/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go index a2edb45a815..396fee0bf61 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go @@ -38,10 +38,12 @@ func (CertificateSigningRequest) SwaggerDoc() map[string]string { } var map_CertificateSigningRequestCondition = map[string]string{ - "type": "request approval state, currently Approved or Denied.", - "reason": "brief reason for the request state", - "message": "human readable message with details about the request state", - "lastUpdateTime": "timestamp for the last update to this condition", + "type": "type of the condition. Known conditions include \"Approved\", \"Denied\", and \"Failed\".", + "status": "Status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\". Defaults to \"True\". If unset, should be treated as \"True\".", + "reason": "brief reason for the request state", + "message": "human readable message with details about the request state", + "lastUpdateTime": "timestamp for the last update to this condition", + "lastTransitionTime": "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", } func (CertificateSigningRequestCondition) SwaggerDoc() map[string]string { @@ -52,7 +54,7 @@ var map_CertificateSigningRequestSpec = map[string]string{ "": "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", "request": "Base64-encoded PKCS#10 CSR data", "signerName": "Requested signer for the request. It is a qualified name in the form: `scope-hostname.io/name`. If empty, it will be defaulted:\n 1. If it's a kubelet client certificate, it is assigned\n \"kubernetes.io/kube-apiserver-client-kubelet\".\n 2. If it's a kubelet serving certificate, it is assigned\n \"kubernetes.io/kubelet-serving\".\n 3. Otherwise, it is assigned \"kubernetes.io/legacy-unknown\".\nDistribution of trust for signers happens out of band. You can select on this field using `spec.signerName`.", - "usages": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", + "usages": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12\nValid values are:\n \"signing\",\n \"digital signature\",\n \"content commitment\",\n \"key encipherment\",\n \"key agreement\",\n \"data encipherment\",\n \"cert sign\",\n \"crl sign\",\n \"encipher only\",\n \"decipher only\",\n \"any\",\n \"server auth\",\n \"client auth\",\n \"code signing\",\n \"email protection\",\n \"s/mime\",\n \"ipsec end system\",\n \"ipsec tunnel\",\n \"ipsec user\",\n \"timestamping\",\n \"ocsp signing\",\n \"microsoft sgc\",\n \"netscape sgc\"", "username": "Information about the requesting user. See user.Info interface for details.", "uid": "UID information about the requesting user. See user.Info interface for details.", "groups": "Group information about the requesting user. See user.Info interface for details.", diff --git a/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go index 11d0f77dd91..0463f5bb0c4 100644 --- a/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go @@ -56,6 +56,7 @@ func (in *CertificateSigningRequest) DeepCopyObject() runtime.Object { func (in *CertificateSigningRequestCondition) DeepCopyInto(out *CertificateSigningRequestCondition) { *out = *in in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) return } diff --git a/vendor/k8s.io/api/certificates/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/certificates/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..6ccebfe6fbe --- /dev/null +++ b/vendor/k8s.io/api/certificates/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,73 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CertificateSigningRequest) APILifecycleIntroduced() (major, minor int) { + return 1, 12 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *CertificateSigningRequest) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *CertificateSigningRequest) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "certificates.k8s.io", Version: "v1", Kind: "CertificateSigningRequest"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *CertificateSigningRequest) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CertificateSigningRequestList) APILifecycleIntroduced() (major, minor int) { + return 1, 12 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *CertificateSigningRequestList) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *CertificateSigningRequestList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "certificates.k8s.io", Version: "v1", Kind: "CertificateSigningRequestList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *CertificateSigningRequestList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/api/coordination/v1beta1/BUILD b/vendor/k8s.io/api/coordination/v1beta1/BUILD index 94ea9ca42ec..7f54c817922 100644 --- a/vendor/k8s.io/api/coordination/v1beta1/BUILD +++ b/vendor/k8s.io/api/coordination/v1beta1/BUILD @@ -15,6 +15,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1beta1", importpath = "k8s.io/api/coordination/v1beta1", diff --git a/vendor/k8s.io/api/coordination/v1beta1/doc.go b/vendor/k8s.io/api/coordination/v1beta1/doc.go index 304732d59b9..e733411aa96 100644 --- a/vendor/k8s.io/api/coordination/v1beta1/doc.go +++ b/vendor/k8s.io/api/coordination/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=coordination.k8s.io diff --git a/vendor/k8s.io/api/coordination/v1beta1/types.go b/vendor/k8s.io/api/coordination/v1beta1/types.go index da88f675c0a..8f300fca854 100644 --- a/vendor/k8s.io/api/coordination/v1beta1/types.go +++ b/vendor/k8s.io/api/coordination/v1beta1/types.go @@ -22,6 +22,9 @@ import ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.12 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=coordination.k8s.io,v1,Lease // Lease defines a lease concept. type Lease struct { @@ -60,6 +63,9 @@ type LeaseSpec struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.12 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=coordination.k8s.io,v1,LeaseList // LeaseList is a list of Lease objects. type LeaseList struct { diff --git a/vendor/k8s.io/api/coordination/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/coordination/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..9d18b9225a0 --- /dev/null +++ b/vendor/k8s.io/api/coordination/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,73 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Lease) APILifecycleIntroduced() (major, minor int) { + return 1, 12 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Lease) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Lease) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1", Kind: "Lease"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Lease) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *LeaseList) APILifecycleIntroduced() (major, minor int) { + return 1, 12 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *LeaseList) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *LeaseList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1", Kind: "LeaseList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *LeaseList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/api/core/v1/BUILD b/vendor/k8s.io/api/core/v1/BUILD index 51b5b284813..3fd4f39d55f 100644 --- a/vendor/k8s.io/api/core/v1/BUILD +++ b/vendor/k8s.io/api/core/v1/BUILD @@ -21,6 +21,7 @@ go_library( "annotation_key_constants.go", "doc.go", "generated.pb.go", + "lifecycle.go", "objectreference.go", "register.go", "resource.go", diff --git a/vendor/k8s.io/api/core/v1/annotation_key_constants.go b/vendor/k8s.io/api/core/v1/annotation_key_constants.go index edc9b4d6008..d3ebf862836 100644 --- a/vendor/k8s.io/api/core/v1/annotation_key_constants.go +++ b/vendor/k8s.io/api/core/v1/annotation_key_constants.go @@ -39,17 +39,42 @@ const ( // SeccompPodAnnotationKey represents the key of a seccomp profile applied // to all containers of a pod. + // Deprecated: set a pod security context `seccompProfile` field. SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod" // SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied // to one container of a pod. + // Deprecated: set a container security context `seccompProfile` field. SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/" // SeccompProfileRuntimeDefault represents the default seccomp profile used by container runtime. + // Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead. SeccompProfileRuntimeDefault string = "runtime/default" + // SeccompProfileNameUnconfined is the unconfined seccomp profile. + SeccompProfileNameUnconfined string = "unconfined" + + // SeccompLocalhostProfileNamePrefix is the prefix for specifying profiles loaded from the node's disk. + SeccompLocalhostProfileNamePrefix = "localhost/" + + // AppArmorBetaContainerAnnotationKeyPrefix is the prefix to an annotation key specifying a container's apparmor profile. + AppArmorBetaContainerAnnotationKeyPrefix = "container.apparmor.security.beta.kubernetes.io/" + // AppArmorBetaDefaultProfileAnnotatoinKey is the annotation key specifying the default AppArmor profile. + AppArmorBetaDefaultProfileAnnotationKey = "apparmor.security.beta.kubernetes.io/defaultProfileName" + // AppArmorBetaAllowedProfileAnnotationKey is the annotation key specifying the allowed AppArmor profiles. + AppArmorBetaAllowedProfilesAnnotationKey = "apparmor.security.beta.kubernetes.io/allowedProfileNames" + + // AppArmorBetaProfileRuntimeDefault is the profile specifying the runtime default. + AppArmorBetaProfileRuntimeDefault = "runtime/default" + + // AppArmorBetaProfileNamePrefix is the prefix for specifying profiles loaded on the node. + AppArmorBetaProfileNamePrefix = "localhost/" + + // AppArmorBetaProfileNameUnconfined is the Unconfined AppArmor profile + AppArmorBetaProfileNameUnconfined = "unconfined" + // DeprecatedSeccompProfileDockerDefault represents the default seccomp profile used by docker. - // This is now deprecated and should be replaced by SeccompProfileRuntimeDefault. + // Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead. DeprecatedSeccompProfileDockerDefault string = "docker/default" // PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized) diff --git a/vendor/k8s.io/api/core/v1/generated.pb.go b/vendor/k8s.io/api/core/v1/generated.pb.go index 8e58752068c..9b29b21e574 100644 --- a/vendor/k8s.io/api/core/v1/generated.pb.go +++ b/vendor/k8s.io/api/core/v1/generated.pb.go @@ -1449,10 +1449,38 @@ func (m *EphemeralContainers) XXX_DiscardUnknown() { var xxx_messageInfo_EphemeralContainers proto.InternalMessageInfo +func (m *EphemeralVolumeSource) Reset() { *m = EphemeralVolumeSource{} } +func (*EphemeralVolumeSource) ProtoMessage() {} +func (*EphemeralVolumeSource) Descriptor() ([]byte, []int) { + return fileDescriptor_83c10c24ec417dc9, []int{50} +} +func (m *EphemeralVolumeSource) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EphemeralVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EphemeralVolumeSource) XXX_Merge(src proto.Message) { + xxx_messageInfo_EphemeralVolumeSource.Merge(m, src) +} +func (m *EphemeralVolumeSource) XXX_Size() int { + return m.Size() +} +func (m *EphemeralVolumeSource) XXX_DiscardUnknown() { + xxx_messageInfo_EphemeralVolumeSource.DiscardUnknown(m) +} + +var xxx_messageInfo_EphemeralVolumeSource proto.InternalMessageInfo + func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{50} + return fileDescriptor_83c10c24ec417dc9, []int{51} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1480,7 +1508,7 @@ var xxx_messageInfo_Event proto.InternalMessageInfo func (m *EventList) Reset() { *m = EventList{} } func (*EventList) ProtoMessage() {} func (*EventList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{51} + return fileDescriptor_83c10c24ec417dc9, []int{52} } func (m *EventList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1508,7 +1536,7 @@ var xxx_messageInfo_EventList proto.InternalMessageInfo func (m *EventSeries) Reset() { *m = EventSeries{} } func (*EventSeries) ProtoMessage() {} func (*EventSeries) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{52} + return fileDescriptor_83c10c24ec417dc9, []int{53} } func (m *EventSeries) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1536,7 +1564,7 @@ var xxx_messageInfo_EventSeries proto.InternalMessageInfo func (m *EventSource) Reset() { *m = EventSource{} } func (*EventSource) ProtoMessage() {} func (*EventSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{53} + return fileDescriptor_83c10c24ec417dc9, []int{54} } func (m *EventSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1564,7 +1592,7 @@ var xxx_messageInfo_EventSource proto.InternalMessageInfo func (m *ExecAction) Reset() { *m = ExecAction{} } func (*ExecAction) ProtoMessage() {} func (*ExecAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{54} + return fileDescriptor_83c10c24ec417dc9, []int{55} } func (m *ExecAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1592,7 +1620,7 @@ var xxx_messageInfo_ExecAction proto.InternalMessageInfo func (m *FCVolumeSource) Reset() { *m = FCVolumeSource{} } func (*FCVolumeSource) ProtoMessage() {} func (*FCVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{55} + return fileDescriptor_83c10c24ec417dc9, []int{56} } func (m *FCVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1620,7 +1648,7 @@ var xxx_messageInfo_FCVolumeSource proto.InternalMessageInfo func (m *FlexPersistentVolumeSource) Reset() { *m = FlexPersistentVolumeSource{} } func (*FlexPersistentVolumeSource) ProtoMessage() {} func (*FlexPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{56} + return fileDescriptor_83c10c24ec417dc9, []int{57} } func (m *FlexPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1648,7 +1676,7 @@ var xxx_messageInfo_FlexPersistentVolumeSource proto.InternalMessageInfo func (m *FlexVolumeSource) Reset() { *m = FlexVolumeSource{} } func (*FlexVolumeSource) ProtoMessage() {} func (*FlexVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{57} + return fileDescriptor_83c10c24ec417dc9, []int{58} } func (m *FlexVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1676,7 +1704,7 @@ var xxx_messageInfo_FlexVolumeSource proto.InternalMessageInfo func (m *FlockerVolumeSource) Reset() { *m = FlockerVolumeSource{} } func (*FlockerVolumeSource) ProtoMessage() {} func (*FlockerVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{58} + return fileDescriptor_83c10c24ec417dc9, []int{59} } func (m *FlockerVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1704,7 +1732,7 @@ var xxx_messageInfo_FlockerVolumeSource proto.InternalMessageInfo func (m *GCEPersistentDiskVolumeSource) Reset() { *m = GCEPersistentDiskVolumeSource{} } func (*GCEPersistentDiskVolumeSource) ProtoMessage() {} func (*GCEPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{59} + return fileDescriptor_83c10c24ec417dc9, []int{60} } func (m *GCEPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1732,7 +1760,7 @@ var xxx_messageInfo_GCEPersistentDiskVolumeSource proto.InternalMessageInfo func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSource{} } func (*GitRepoVolumeSource) ProtoMessage() {} func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{60} + return fileDescriptor_83c10c24ec417dc9, []int{61} } func (m *GitRepoVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1760,7 +1788,7 @@ var xxx_messageInfo_GitRepoVolumeSource proto.InternalMessageInfo func (m *GlusterfsPersistentVolumeSource) Reset() { *m = GlusterfsPersistentVolumeSource{} } func (*GlusterfsPersistentVolumeSource) ProtoMessage() {} func (*GlusterfsPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{61} + return fileDescriptor_83c10c24ec417dc9, []int{62} } func (m *GlusterfsPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1788,7 +1816,7 @@ var xxx_messageInfo_GlusterfsPersistentVolumeSource proto.InternalMessageInfo func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} } func (*GlusterfsVolumeSource) ProtoMessage() {} func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{62} + return fileDescriptor_83c10c24ec417dc9, []int{63} } func (m *GlusterfsVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1816,7 +1844,7 @@ var xxx_messageInfo_GlusterfsVolumeSource proto.InternalMessageInfo func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} } func (*HTTPGetAction) ProtoMessage() {} func (*HTTPGetAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{63} + return fileDescriptor_83c10c24ec417dc9, []int{64} } func (m *HTTPGetAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1844,7 +1872,7 @@ var xxx_messageInfo_HTTPGetAction proto.InternalMessageInfo func (m *HTTPHeader) Reset() { *m = HTTPHeader{} } func (*HTTPHeader) ProtoMessage() {} func (*HTTPHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{64} + return fileDescriptor_83c10c24ec417dc9, []int{65} } func (m *HTTPHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1872,7 +1900,7 @@ var xxx_messageInfo_HTTPHeader proto.InternalMessageInfo func (m *Handler) Reset() { *m = Handler{} } func (*Handler) ProtoMessage() {} func (*Handler) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{65} + return fileDescriptor_83c10c24ec417dc9, []int{66} } func (m *Handler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1900,7 +1928,7 @@ var xxx_messageInfo_Handler proto.InternalMessageInfo func (m *HostAlias) Reset() { *m = HostAlias{} } func (*HostAlias) ProtoMessage() {} func (*HostAlias) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{66} + return fileDescriptor_83c10c24ec417dc9, []int{67} } func (m *HostAlias) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1928,7 +1956,7 @@ var xxx_messageInfo_HostAlias proto.InternalMessageInfo func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} } func (*HostPathVolumeSource) ProtoMessage() {} func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{67} + return fileDescriptor_83c10c24ec417dc9, []int{68} } func (m *HostPathVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1956,7 +1984,7 @@ var xxx_messageInfo_HostPathVolumeSource proto.InternalMessageInfo func (m *ISCSIPersistentVolumeSource) Reset() { *m = ISCSIPersistentVolumeSource{} } func (*ISCSIPersistentVolumeSource) ProtoMessage() {} func (*ISCSIPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{68} + return fileDescriptor_83c10c24ec417dc9, []int{69} } func (m *ISCSIPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1984,7 +2012,7 @@ var xxx_messageInfo_ISCSIPersistentVolumeSource proto.InternalMessageInfo func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} } func (*ISCSIVolumeSource) ProtoMessage() {} func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{69} + return fileDescriptor_83c10c24ec417dc9, []int{70} } func (m *ISCSIVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2012,7 +2040,7 @@ var xxx_messageInfo_ISCSIVolumeSource proto.InternalMessageInfo func (m *KeyToPath) Reset() { *m = KeyToPath{} } func (*KeyToPath) ProtoMessage() {} func (*KeyToPath) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{70} + return fileDescriptor_83c10c24ec417dc9, []int{71} } func (m *KeyToPath) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2040,7 +2068,7 @@ var xxx_messageInfo_KeyToPath proto.InternalMessageInfo func (m *Lifecycle) Reset() { *m = Lifecycle{} } func (*Lifecycle) ProtoMessage() {} func (*Lifecycle) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{71} + return fileDescriptor_83c10c24ec417dc9, []int{72} } func (m *Lifecycle) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2068,7 +2096,7 @@ var xxx_messageInfo_Lifecycle proto.InternalMessageInfo func (m *LimitRange) Reset() { *m = LimitRange{} } func (*LimitRange) ProtoMessage() {} func (*LimitRange) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{72} + return fileDescriptor_83c10c24ec417dc9, []int{73} } func (m *LimitRange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2096,7 +2124,7 @@ var xxx_messageInfo_LimitRange proto.InternalMessageInfo func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} } func (*LimitRangeItem) ProtoMessage() {} func (*LimitRangeItem) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{73} + return fileDescriptor_83c10c24ec417dc9, []int{74} } func (m *LimitRangeItem) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2124,7 +2152,7 @@ var xxx_messageInfo_LimitRangeItem proto.InternalMessageInfo func (m *LimitRangeList) Reset() { *m = LimitRangeList{} } func (*LimitRangeList) ProtoMessage() {} func (*LimitRangeList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{74} + return fileDescriptor_83c10c24ec417dc9, []int{75} } func (m *LimitRangeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2152,7 +2180,7 @@ var xxx_messageInfo_LimitRangeList proto.InternalMessageInfo func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} } func (*LimitRangeSpec) ProtoMessage() {} func (*LimitRangeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{75} + return fileDescriptor_83c10c24ec417dc9, []int{76} } func (m *LimitRangeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2180,7 +2208,7 @@ var xxx_messageInfo_LimitRangeSpec proto.InternalMessageInfo func (m *List) Reset() { *m = List{} } func (*List) ProtoMessage() {} func (*List) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{76} + return fileDescriptor_83c10c24ec417dc9, []int{77} } func (m *List) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2208,7 +2236,7 @@ var xxx_messageInfo_List proto.InternalMessageInfo func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} } func (*LoadBalancerIngress) ProtoMessage() {} func (*LoadBalancerIngress) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{77} + return fileDescriptor_83c10c24ec417dc9, []int{78} } func (m *LoadBalancerIngress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2236,7 +2264,7 @@ var xxx_messageInfo_LoadBalancerIngress proto.InternalMessageInfo func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} } func (*LoadBalancerStatus) ProtoMessage() {} func (*LoadBalancerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{78} + return fileDescriptor_83c10c24ec417dc9, []int{79} } func (m *LoadBalancerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2264,7 +2292,7 @@ var xxx_messageInfo_LoadBalancerStatus proto.InternalMessageInfo func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} } func (*LocalObjectReference) ProtoMessage() {} func (*LocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{79} + return fileDescriptor_83c10c24ec417dc9, []int{80} } func (m *LocalObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2292,7 +2320,7 @@ var xxx_messageInfo_LocalObjectReference proto.InternalMessageInfo func (m *LocalVolumeSource) Reset() { *m = LocalVolumeSource{} } func (*LocalVolumeSource) ProtoMessage() {} func (*LocalVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{80} + return fileDescriptor_83c10c24ec417dc9, []int{81} } func (m *LocalVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2320,7 +2348,7 @@ var xxx_messageInfo_LocalVolumeSource proto.InternalMessageInfo func (m *NFSVolumeSource) Reset() { *m = NFSVolumeSource{} } func (*NFSVolumeSource) ProtoMessage() {} func (*NFSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{81} + return fileDescriptor_83c10c24ec417dc9, []int{82} } func (m *NFSVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2348,7 +2376,7 @@ var xxx_messageInfo_NFSVolumeSource proto.InternalMessageInfo func (m *Namespace) Reset() { *m = Namespace{} } func (*Namespace) ProtoMessage() {} func (*Namespace) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{82} + return fileDescriptor_83c10c24ec417dc9, []int{83} } func (m *Namespace) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2376,7 +2404,7 @@ var xxx_messageInfo_Namespace proto.InternalMessageInfo func (m *NamespaceCondition) Reset() { *m = NamespaceCondition{} } func (*NamespaceCondition) ProtoMessage() {} func (*NamespaceCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{83} + return fileDescriptor_83c10c24ec417dc9, []int{84} } func (m *NamespaceCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2404,7 +2432,7 @@ var xxx_messageInfo_NamespaceCondition proto.InternalMessageInfo func (m *NamespaceList) Reset() { *m = NamespaceList{} } func (*NamespaceList) ProtoMessage() {} func (*NamespaceList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{84} + return fileDescriptor_83c10c24ec417dc9, []int{85} } func (m *NamespaceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2432,7 +2460,7 @@ var xxx_messageInfo_NamespaceList proto.InternalMessageInfo func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} } func (*NamespaceSpec) ProtoMessage() {} func (*NamespaceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{85} + return fileDescriptor_83c10c24ec417dc9, []int{86} } func (m *NamespaceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2460,7 +2488,7 @@ var xxx_messageInfo_NamespaceSpec proto.InternalMessageInfo func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} } func (*NamespaceStatus) ProtoMessage() {} func (*NamespaceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{86} + return fileDescriptor_83c10c24ec417dc9, []int{87} } func (m *NamespaceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2488,7 +2516,7 @@ var xxx_messageInfo_NamespaceStatus proto.InternalMessageInfo func (m *Node) Reset() { *m = Node{} } func (*Node) ProtoMessage() {} func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{87} + return fileDescriptor_83c10c24ec417dc9, []int{88} } func (m *Node) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2516,7 +2544,7 @@ var xxx_messageInfo_Node proto.InternalMessageInfo func (m *NodeAddress) Reset() { *m = NodeAddress{} } func (*NodeAddress) ProtoMessage() {} func (*NodeAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{88} + return fileDescriptor_83c10c24ec417dc9, []int{89} } func (m *NodeAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2544,7 +2572,7 @@ var xxx_messageInfo_NodeAddress proto.InternalMessageInfo func (m *NodeAffinity) Reset() { *m = NodeAffinity{} } func (*NodeAffinity) ProtoMessage() {} func (*NodeAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{89} + return fileDescriptor_83c10c24ec417dc9, []int{90} } func (m *NodeAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2572,7 +2600,7 @@ var xxx_messageInfo_NodeAffinity proto.InternalMessageInfo func (m *NodeCondition) Reset() { *m = NodeCondition{} } func (*NodeCondition) ProtoMessage() {} func (*NodeCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{90} + return fileDescriptor_83c10c24ec417dc9, []int{91} } func (m *NodeCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2600,7 +2628,7 @@ var xxx_messageInfo_NodeCondition proto.InternalMessageInfo func (m *NodeConfigSource) Reset() { *m = NodeConfigSource{} } func (*NodeConfigSource) ProtoMessage() {} func (*NodeConfigSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{91} + return fileDescriptor_83c10c24ec417dc9, []int{92} } func (m *NodeConfigSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2628,7 +2656,7 @@ var xxx_messageInfo_NodeConfigSource proto.InternalMessageInfo func (m *NodeConfigStatus) Reset() { *m = NodeConfigStatus{} } func (*NodeConfigStatus) ProtoMessage() {} func (*NodeConfigStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{92} + return fileDescriptor_83c10c24ec417dc9, []int{93} } func (m *NodeConfigStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2656,7 +2684,7 @@ var xxx_messageInfo_NodeConfigStatus proto.InternalMessageInfo func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} } func (*NodeDaemonEndpoints) ProtoMessage() {} func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{93} + return fileDescriptor_83c10c24ec417dc9, []int{94} } func (m *NodeDaemonEndpoints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2684,7 +2712,7 @@ var xxx_messageInfo_NodeDaemonEndpoints proto.InternalMessageInfo func (m *NodeList) Reset() { *m = NodeList{} } func (*NodeList) ProtoMessage() {} func (*NodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{94} + return fileDescriptor_83c10c24ec417dc9, []int{95} } func (m *NodeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2712,7 +2740,7 @@ var xxx_messageInfo_NodeList proto.InternalMessageInfo func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} } func (*NodeProxyOptions) ProtoMessage() {} func (*NodeProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{95} + return fileDescriptor_83c10c24ec417dc9, []int{96} } func (m *NodeProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2740,7 +2768,7 @@ var xxx_messageInfo_NodeProxyOptions proto.InternalMessageInfo func (m *NodeResources) Reset() { *m = NodeResources{} } func (*NodeResources) ProtoMessage() {} func (*NodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{96} + return fileDescriptor_83c10c24ec417dc9, []int{97} } func (m *NodeResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2768,7 +2796,7 @@ var xxx_messageInfo_NodeResources proto.InternalMessageInfo func (m *NodeSelector) Reset() { *m = NodeSelector{} } func (*NodeSelector) ProtoMessage() {} func (*NodeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{97} + return fileDescriptor_83c10c24ec417dc9, []int{98} } func (m *NodeSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2796,7 +2824,7 @@ var xxx_messageInfo_NodeSelector proto.InternalMessageInfo func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} } func (*NodeSelectorRequirement) ProtoMessage() {} func (*NodeSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{98} + return fileDescriptor_83c10c24ec417dc9, []int{99} } func (m *NodeSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2824,7 +2852,7 @@ var xxx_messageInfo_NodeSelectorRequirement proto.InternalMessageInfo func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} } func (*NodeSelectorTerm) ProtoMessage() {} func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{99} + return fileDescriptor_83c10c24ec417dc9, []int{100} } func (m *NodeSelectorTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2852,7 +2880,7 @@ var xxx_messageInfo_NodeSelectorTerm proto.InternalMessageInfo func (m *NodeSpec) Reset() { *m = NodeSpec{} } func (*NodeSpec) ProtoMessage() {} func (*NodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{100} + return fileDescriptor_83c10c24ec417dc9, []int{101} } func (m *NodeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2880,7 +2908,7 @@ var xxx_messageInfo_NodeSpec proto.InternalMessageInfo func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{101} + return fileDescriptor_83c10c24ec417dc9, []int{102} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2908,7 +2936,7 @@ var xxx_messageInfo_NodeStatus proto.InternalMessageInfo func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} } func (*NodeSystemInfo) ProtoMessage() {} func (*NodeSystemInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{102} + return fileDescriptor_83c10c24ec417dc9, []int{103} } func (m *NodeSystemInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2936,7 +2964,7 @@ var xxx_messageInfo_NodeSystemInfo proto.InternalMessageInfo func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} } func (*ObjectFieldSelector) ProtoMessage() {} func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{103} + return fileDescriptor_83c10c24ec417dc9, []int{104} } func (m *ObjectFieldSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2964,7 +2992,7 @@ var xxx_messageInfo_ObjectFieldSelector proto.InternalMessageInfo func (m *ObjectReference) Reset() { *m = ObjectReference{} } func (*ObjectReference) ProtoMessage() {} func (*ObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{104} + return fileDescriptor_83c10c24ec417dc9, []int{105} } func (m *ObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2992,7 +3020,7 @@ var xxx_messageInfo_ObjectReference proto.InternalMessageInfo func (m *PersistentVolume) Reset() { *m = PersistentVolume{} } func (*PersistentVolume) ProtoMessage() {} func (*PersistentVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{105} + return fileDescriptor_83c10c24ec417dc9, []int{106} } func (m *PersistentVolume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3020,7 +3048,7 @@ var xxx_messageInfo_PersistentVolume proto.InternalMessageInfo func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } func (*PersistentVolumeClaim) ProtoMessage() {} func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{106} + return fileDescriptor_83c10c24ec417dc9, []int{107} } func (m *PersistentVolumeClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3048,7 +3076,7 @@ var xxx_messageInfo_PersistentVolumeClaim proto.InternalMessageInfo func (m *PersistentVolumeClaimCondition) Reset() { *m = PersistentVolumeClaimCondition{} } func (*PersistentVolumeClaimCondition) ProtoMessage() {} func (*PersistentVolumeClaimCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{107} + return fileDescriptor_83c10c24ec417dc9, []int{108} } func (m *PersistentVolumeClaimCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3076,7 +3104,7 @@ var xxx_messageInfo_PersistentVolumeClaimCondition proto.InternalMessageInfo func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} } func (*PersistentVolumeClaimList) ProtoMessage() {} func (*PersistentVolumeClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{108} + return fileDescriptor_83c10c24ec417dc9, []int{109} } func (m *PersistentVolumeClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3104,7 +3132,7 @@ var xxx_messageInfo_PersistentVolumeClaimList proto.InternalMessageInfo func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} } func (*PersistentVolumeClaimSpec) ProtoMessage() {} func (*PersistentVolumeClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{109} + return fileDescriptor_83c10c24ec417dc9, []int{110} } func (m *PersistentVolumeClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3132,7 +3160,7 @@ var xxx_messageInfo_PersistentVolumeClaimSpec proto.InternalMessageInfo func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} } func (*PersistentVolumeClaimStatus) ProtoMessage() {} func (*PersistentVolumeClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{110} + return fileDescriptor_83c10c24ec417dc9, []int{111} } func (m *PersistentVolumeClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3157,10 +3185,38 @@ func (m *PersistentVolumeClaimStatus) XXX_DiscardUnknown() { var xxx_messageInfo_PersistentVolumeClaimStatus proto.InternalMessageInfo +func (m *PersistentVolumeClaimTemplate) Reset() { *m = PersistentVolumeClaimTemplate{} } +func (*PersistentVolumeClaimTemplate) ProtoMessage() {} +func (*PersistentVolumeClaimTemplate) Descriptor() ([]byte, []int) { + return fileDescriptor_83c10c24ec417dc9, []int{112} +} +func (m *PersistentVolumeClaimTemplate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PersistentVolumeClaimTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *PersistentVolumeClaimTemplate) XXX_Merge(src proto.Message) { + xxx_messageInfo_PersistentVolumeClaimTemplate.Merge(m, src) +} +func (m *PersistentVolumeClaimTemplate) XXX_Size() int { + return m.Size() +} +func (m *PersistentVolumeClaimTemplate) XXX_DiscardUnknown() { + xxx_messageInfo_PersistentVolumeClaimTemplate.DiscardUnknown(m) +} + +var xxx_messageInfo_PersistentVolumeClaimTemplate proto.InternalMessageInfo + func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} } func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {} func (*PersistentVolumeClaimVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{111} + return fileDescriptor_83c10c24ec417dc9, []int{113} } func (m *PersistentVolumeClaimVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3188,7 +3244,7 @@ var xxx_messageInfo_PersistentVolumeClaimVolumeSource proto.InternalMessageInfo func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} } func (*PersistentVolumeList) ProtoMessage() {} func (*PersistentVolumeList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{112} + return fileDescriptor_83c10c24ec417dc9, []int{114} } func (m *PersistentVolumeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3216,7 +3272,7 @@ var xxx_messageInfo_PersistentVolumeList proto.InternalMessageInfo func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} } func (*PersistentVolumeSource) ProtoMessage() {} func (*PersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{113} + return fileDescriptor_83c10c24ec417dc9, []int{115} } func (m *PersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3244,7 +3300,7 @@ var xxx_messageInfo_PersistentVolumeSource proto.InternalMessageInfo func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} } func (*PersistentVolumeSpec) ProtoMessage() {} func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{114} + return fileDescriptor_83c10c24ec417dc9, []int{116} } func (m *PersistentVolumeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3272,7 +3328,7 @@ var xxx_messageInfo_PersistentVolumeSpec proto.InternalMessageInfo func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} } func (*PersistentVolumeStatus) ProtoMessage() {} func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{115} + return fileDescriptor_83c10c24ec417dc9, []int{117} } func (m *PersistentVolumeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3300,7 +3356,7 @@ var xxx_messageInfo_PersistentVolumeStatus proto.InternalMessageInfo func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} } func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {} func (*PhotonPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{116} + return fileDescriptor_83c10c24ec417dc9, []int{118} } func (m *PhotonPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3328,7 +3384,7 @@ var xxx_messageInfo_PhotonPersistentDiskVolumeSource proto.InternalMessageInfo func (m *Pod) Reset() { *m = Pod{} } func (*Pod) ProtoMessage() {} func (*Pod) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{117} + return fileDescriptor_83c10c24ec417dc9, []int{119} } func (m *Pod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3356,7 +3412,7 @@ var xxx_messageInfo_Pod proto.InternalMessageInfo func (m *PodAffinity) Reset() { *m = PodAffinity{} } func (*PodAffinity) ProtoMessage() {} func (*PodAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{118} + return fileDescriptor_83c10c24ec417dc9, []int{120} } func (m *PodAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3384,7 +3440,7 @@ var xxx_messageInfo_PodAffinity proto.InternalMessageInfo func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} } func (*PodAffinityTerm) ProtoMessage() {} func (*PodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{119} + return fileDescriptor_83c10c24ec417dc9, []int{121} } func (m *PodAffinityTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3412,7 +3468,7 @@ var xxx_messageInfo_PodAffinityTerm proto.InternalMessageInfo func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} } func (*PodAntiAffinity) ProtoMessage() {} func (*PodAntiAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{120} + return fileDescriptor_83c10c24ec417dc9, []int{122} } func (m *PodAntiAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3440,7 +3496,7 @@ var xxx_messageInfo_PodAntiAffinity proto.InternalMessageInfo func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} } func (*PodAttachOptions) ProtoMessage() {} func (*PodAttachOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{121} + return fileDescriptor_83c10c24ec417dc9, []int{123} } func (m *PodAttachOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3468,7 +3524,7 @@ var xxx_messageInfo_PodAttachOptions proto.InternalMessageInfo func (m *PodCondition) Reset() { *m = PodCondition{} } func (*PodCondition) ProtoMessage() {} func (*PodCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{122} + return fileDescriptor_83c10c24ec417dc9, []int{124} } func (m *PodCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3496,7 +3552,7 @@ var xxx_messageInfo_PodCondition proto.InternalMessageInfo func (m *PodDNSConfig) Reset() { *m = PodDNSConfig{} } func (*PodDNSConfig) ProtoMessage() {} func (*PodDNSConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{123} + return fileDescriptor_83c10c24ec417dc9, []int{125} } func (m *PodDNSConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3524,7 +3580,7 @@ var xxx_messageInfo_PodDNSConfig proto.InternalMessageInfo func (m *PodDNSConfigOption) Reset() { *m = PodDNSConfigOption{} } func (*PodDNSConfigOption) ProtoMessage() {} func (*PodDNSConfigOption) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{124} + return fileDescriptor_83c10c24ec417dc9, []int{126} } func (m *PodDNSConfigOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3552,7 +3608,7 @@ var xxx_messageInfo_PodDNSConfigOption proto.InternalMessageInfo func (m *PodExecOptions) Reset() { *m = PodExecOptions{} } func (*PodExecOptions) ProtoMessage() {} func (*PodExecOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{125} + return fileDescriptor_83c10c24ec417dc9, []int{127} } func (m *PodExecOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3580,7 +3636,7 @@ var xxx_messageInfo_PodExecOptions proto.InternalMessageInfo func (m *PodIP) Reset() { *m = PodIP{} } func (*PodIP) ProtoMessage() {} func (*PodIP) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{126} + return fileDescriptor_83c10c24ec417dc9, []int{128} } func (m *PodIP) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3608,7 +3664,7 @@ var xxx_messageInfo_PodIP proto.InternalMessageInfo func (m *PodList) Reset() { *m = PodList{} } func (*PodList) ProtoMessage() {} func (*PodList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{127} + return fileDescriptor_83c10c24ec417dc9, []int{129} } func (m *PodList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3636,7 +3692,7 @@ var xxx_messageInfo_PodList proto.InternalMessageInfo func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } func (*PodLogOptions) ProtoMessage() {} func (*PodLogOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{128} + return fileDescriptor_83c10c24ec417dc9, []int{130} } func (m *PodLogOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3664,7 +3720,7 @@ var xxx_messageInfo_PodLogOptions proto.InternalMessageInfo func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } func (*PodPortForwardOptions) ProtoMessage() {} func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{129} + return fileDescriptor_83c10c24ec417dc9, []int{131} } func (m *PodPortForwardOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3692,7 +3748,7 @@ var xxx_messageInfo_PodPortForwardOptions proto.InternalMessageInfo func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} func (*PodProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{130} + return fileDescriptor_83c10c24ec417dc9, []int{132} } func (m *PodProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3720,7 +3776,7 @@ var xxx_messageInfo_PodProxyOptions proto.InternalMessageInfo func (m *PodReadinessGate) Reset() { *m = PodReadinessGate{} } func (*PodReadinessGate) ProtoMessage() {} func (*PodReadinessGate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{131} + return fileDescriptor_83c10c24ec417dc9, []int{133} } func (m *PodReadinessGate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3748,7 +3804,7 @@ var xxx_messageInfo_PodReadinessGate proto.InternalMessageInfo func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } func (*PodSecurityContext) ProtoMessage() {} func (*PodSecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{132} + return fileDescriptor_83c10c24ec417dc9, []int{134} } func (m *PodSecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3776,7 +3832,7 @@ var xxx_messageInfo_PodSecurityContext proto.InternalMessageInfo func (m *PodSignature) Reset() { *m = PodSignature{} } func (*PodSignature) ProtoMessage() {} func (*PodSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{133} + return fileDescriptor_83c10c24ec417dc9, []int{135} } func (m *PodSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3804,7 +3860,7 @@ var xxx_messageInfo_PodSignature proto.InternalMessageInfo func (m *PodSpec) Reset() { *m = PodSpec{} } func (*PodSpec) ProtoMessage() {} func (*PodSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{134} + return fileDescriptor_83c10c24ec417dc9, []int{136} } func (m *PodSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3832,7 +3888,7 @@ var xxx_messageInfo_PodSpec proto.InternalMessageInfo func (m *PodStatus) Reset() { *m = PodStatus{} } func (*PodStatus) ProtoMessage() {} func (*PodStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{135} + return fileDescriptor_83c10c24ec417dc9, []int{137} } func (m *PodStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3860,7 +3916,7 @@ var xxx_messageInfo_PodStatus proto.InternalMessageInfo func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } func (*PodStatusResult) ProtoMessage() {} func (*PodStatusResult) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{136} + return fileDescriptor_83c10c24ec417dc9, []int{138} } func (m *PodStatusResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3888,7 +3944,7 @@ var xxx_messageInfo_PodStatusResult proto.InternalMessageInfo func (m *PodTemplate) Reset() { *m = PodTemplate{} } func (*PodTemplate) ProtoMessage() {} func (*PodTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{137} + return fileDescriptor_83c10c24ec417dc9, []int{139} } func (m *PodTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3916,7 +3972,7 @@ var xxx_messageInfo_PodTemplate proto.InternalMessageInfo func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } func (*PodTemplateList) ProtoMessage() {} func (*PodTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{138} + return fileDescriptor_83c10c24ec417dc9, []int{140} } func (m *PodTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3944,7 +4000,7 @@ var xxx_messageInfo_PodTemplateList proto.InternalMessageInfo func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } func (*PodTemplateSpec) ProtoMessage() {} func (*PodTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{139} + return fileDescriptor_83c10c24ec417dc9, []int{141} } func (m *PodTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3972,7 +4028,7 @@ var xxx_messageInfo_PodTemplateSpec proto.InternalMessageInfo func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} } func (*PortworxVolumeSource) ProtoMessage() {} func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{140} + return fileDescriptor_83c10c24ec417dc9, []int{142} } func (m *PortworxVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4000,7 +4056,7 @@ var xxx_messageInfo_PortworxVolumeSource proto.InternalMessageInfo func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} func (*Preconditions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{141} + return fileDescriptor_83c10c24ec417dc9, []int{143} } func (m *Preconditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4028,7 +4084,7 @@ var xxx_messageInfo_Preconditions proto.InternalMessageInfo func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } func (*PreferAvoidPodsEntry) ProtoMessage() {} func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{142} + return fileDescriptor_83c10c24ec417dc9, []int{144} } func (m *PreferAvoidPodsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4056,7 +4112,7 @@ var xxx_messageInfo_PreferAvoidPodsEntry proto.InternalMessageInfo func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } func (*PreferredSchedulingTerm) ProtoMessage() {} func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{143} + return fileDescriptor_83c10c24ec417dc9, []int{145} } func (m *PreferredSchedulingTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4084,7 +4140,7 @@ var xxx_messageInfo_PreferredSchedulingTerm proto.InternalMessageInfo func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} func (*Probe) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{144} + return fileDescriptor_83c10c24ec417dc9, []int{146} } func (m *Probe) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4112,7 +4168,7 @@ var xxx_messageInfo_Probe proto.InternalMessageInfo func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } func (*ProjectedVolumeSource) ProtoMessage() {} func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{145} + return fileDescriptor_83c10c24ec417dc9, []int{147} } func (m *ProjectedVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4140,7 +4196,7 @@ var xxx_messageInfo_ProjectedVolumeSource proto.InternalMessageInfo func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{146} + return fileDescriptor_83c10c24ec417dc9, []int{148} } func (m *QuobyteVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4168,7 +4224,7 @@ var xxx_messageInfo_QuobyteVolumeSource proto.InternalMessageInfo func (m *RBDPersistentVolumeSource) Reset() { *m = RBDPersistentVolumeSource{} } func (*RBDPersistentVolumeSource) ProtoMessage() {} func (*RBDPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{147} + return fileDescriptor_83c10c24ec417dc9, []int{149} } func (m *RBDPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4196,7 +4252,7 @@ var xxx_messageInfo_RBDPersistentVolumeSource proto.InternalMessageInfo func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } func (*RBDVolumeSource) ProtoMessage() {} func (*RBDVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{148} + return fileDescriptor_83c10c24ec417dc9, []int{150} } func (m *RBDVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4224,7 +4280,7 @@ var xxx_messageInfo_RBDVolumeSource proto.InternalMessageInfo func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} func (*RangeAllocation) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{149} + return fileDescriptor_83c10c24ec417dc9, []int{151} } func (m *RangeAllocation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4252,7 +4308,7 @@ var xxx_messageInfo_RangeAllocation proto.InternalMessageInfo func (m *ReplicationController) Reset() { *m = ReplicationController{} } func (*ReplicationController) ProtoMessage() {} func (*ReplicationController) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{150} + return fileDescriptor_83c10c24ec417dc9, []int{152} } func (m *ReplicationController) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4280,7 +4336,7 @@ var xxx_messageInfo_ReplicationController proto.InternalMessageInfo func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } func (*ReplicationControllerCondition) ProtoMessage() {} func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{151} + return fileDescriptor_83c10c24ec417dc9, []int{153} } func (m *ReplicationControllerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4308,7 +4364,7 @@ var xxx_messageInfo_ReplicationControllerCondition proto.InternalMessageInfo func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } func (*ReplicationControllerList) ProtoMessage() {} func (*ReplicationControllerList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{152} + return fileDescriptor_83c10c24ec417dc9, []int{154} } func (m *ReplicationControllerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4336,7 +4392,7 @@ var xxx_messageInfo_ReplicationControllerList proto.InternalMessageInfo func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } func (*ReplicationControllerSpec) ProtoMessage() {} func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{153} + return fileDescriptor_83c10c24ec417dc9, []int{155} } func (m *ReplicationControllerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4364,7 +4420,7 @@ var xxx_messageInfo_ReplicationControllerSpec proto.InternalMessageInfo func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } func (*ReplicationControllerStatus) ProtoMessage() {} func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{154} + return fileDescriptor_83c10c24ec417dc9, []int{156} } func (m *ReplicationControllerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4392,7 +4448,7 @@ var xxx_messageInfo_ReplicationControllerStatus proto.InternalMessageInfo func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } func (*ResourceFieldSelector) ProtoMessage() {} func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{155} + return fileDescriptor_83c10c24ec417dc9, []int{157} } func (m *ResourceFieldSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4420,7 +4476,7 @@ var xxx_messageInfo_ResourceFieldSelector proto.InternalMessageInfo func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} func (*ResourceQuota) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{156} + return fileDescriptor_83c10c24ec417dc9, []int{158} } func (m *ResourceQuota) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4448,7 +4504,7 @@ var xxx_messageInfo_ResourceQuota proto.InternalMessageInfo func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } func (*ResourceQuotaList) ProtoMessage() {} func (*ResourceQuotaList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{157} + return fileDescriptor_83c10c24ec417dc9, []int{159} } func (m *ResourceQuotaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4476,7 +4532,7 @@ var xxx_messageInfo_ResourceQuotaList proto.InternalMessageInfo func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } func (*ResourceQuotaSpec) ProtoMessage() {} func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{158} + return fileDescriptor_83c10c24ec417dc9, []int{160} } func (m *ResourceQuotaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4504,7 +4560,7 @@ var xxx_messageInfo_ResourceQuotaSpec proto.InternalMessageInfo func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } func (*ResourceQuotaStatus) ProtoMessage() {} func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{159} + return fileDescriptor_83c10c24ec417dc9, []int{161} } func (m *ResourceQuotaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4532,7 +4588,7 @@ var xxx_messageInfo_ResourceQuotaStatus proto.InternalMessageInfo func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } func (*ResourceRequirements) ProtoMessage() {} func (*ResourceRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{160} + return fileDescriptor_83c10c24ec417dc9, []int{162} } func (m *ResourceRequirements) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4560,7 +4616,7 @@ var xxx_messageInfo_ResourceRequirements proto.InternalMessageInfo func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } func (*SELinuxOptions) ProtoMessage() {} func (*SELinuxOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{161} + return fileDescriptor_83c10c24ec417dc9, []int{163} } func (m *SELinuxOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4588,7 +4644,7 @@ var xxx_messageInfo_SELinuxOptions proto.InternalMessageInfo func (m *ScaleIOPersistentVolumeSource) Reset() { *m = ScaleIOPersistentVolumeSource{} } func (*ScaleIOPersistentVolumeSource) ProtoMessage() {} func (*ScaleIOPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{162} + return fileDescriptor_83c10c24ec417dc9, []int{164} } func (m *ScaleIOPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4616,7 +4672,7 @@ var xxx_messageInfo_ScaleIOPersistentVolumeSource proto.InternalMessageInfo func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} } func (*ScaleIOVolumeSource) ProtoMessage() {} func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{163} + return fileDescriptor_83c10c24ec417dc9, []int{165} } func (m *ScaleIOVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4644,7 +4700,7 @@ var xxx_messageInfo_ScaleIOVolumeSource proto.InternalMessageInfo func (m *ScopeSelector) Reset() { *m = ScopeSelector{} } func (*ScopeSelector) ProtoMessage() {} func (*ScopeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{164} + return fileDescriptor_83c10c24ec417dc9, []int{166} } func (m *ScopeSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4672,7 +4728,7 @@ var xxx_messageInfo_ScopeSelector proto.InternalMessageInfo func (m *ScopedResourceSelectorRequirement) Reset() { *m = ScopedResourceSelectorRequirement{} } func (*ScopedResourceSelectorRequirement) ProtoMessage() {} func (*ScopedResourceSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{165} + return fileDescriptor_83c10c24ec417dc9, []int{167} } func (m *ScopedResourceSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4697,10 +4753,38 @@ func (m *ScopedResourceSelectorRequirement) XXX_DiscardUnknown() { var xxx_messageInfo_ScopedResourceSelectorRequirement proto.InternalMessageInfo +func (m *SeccompProfile) Reset() { *m = SeccompProfile{} } +func (*SeccompProfile) ProtoMessage() {} +func (*SeccompProfile) Descriptor() ([]byte, []int) { + return fileDescriptor_83c10c24ec417dc9, []int{168} +} +func (m *SeccompProfile) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SeccompProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *SeccompProfile) XXX_Merge(src proto.Message) { + xxx_messageInfo_SeccompProfile.Merge(m, src) +} +func (m *SeccompProfile) XXX_Size() int { + return m.Size() +} +func (m *SeccompProfile) XXX_DiscardUnknown() { + xxx_messageInfo_SeccompProfile.DiscardUnknown(m) +} + +var xxx_messageInfo_SeccompProfile proto.InternalMessageInfo + func (m *Secret) Reset() { *m = Secret{} } func (*Secret) ProtoMessage() {} func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{166} + return fileDescriptor_83c10c24ec417dc9, []int{169} } func (m *Secret) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4728,7 +4812,7 @@ var xxx_messageInfo_Secret proto.InternalMessageInfo func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } func (*SecretEnvSource) ProtoMessage() {} func (*SecretEnvSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{167} + return fileDescriptor_83c10c24ec417dc9, []int{170} } func (m *SecretEnvSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4756,7 +4840,7 @@ var xxx_messageInfo_SecretEnvSource proto.InternalMessageInfo func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } func (*SecretKeySelector) ProtoMessage() {} func (*SecretKeySelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{168} + return fileDescriptor_83c10c24ec417dc9, []int{171} } func (m *SecretKeySelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4784,7 +4868,7 @@ var xxx_messageInfo_SecretKeySelector proto.InternalMessageInfo func (m *SecretList) Reset() { *m = SecretList{} } func (*SecretList) ProtoMessage() {} func (*SecretList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{169} + return fileDescriptor_83c10c24ec417dc9, []int{172} } func (m *SecretList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4812,7 +4896,7 @@ var xxx_messageInfo_SecretList proto.InternalMessageInfo func (m *SecretProjection) Reset() { *m = SecretProjection{} } func (*SecretProjection) ProtoMessage() {} func (*SecretProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{170} + return fileDescriptor_83c10c24ec417dc9, []int{173} } func (m *SecretProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4840,7 +4924,7 @@ var xxx_messageInfo_SecretProjection proto.InternalMessageInfo func (m *SecretReference) Reset() { *m = SecretReference{} } func (*SecretReference) ProtoMessage() {} func (*SecretReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{171} + return fileDescriptor_83c10c24ec417dc9, []int{174} } func (m *SecretReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4868,7 +4952,7 @@ var xxx_messageInfo_SecretReference proto.InternalMessageInfo func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } func (*SecretVolumeSource) ProtoMessage() {} func (*SecretVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{172} + return fileDescriptor_83c10c24ec417dc9, []int{175} } func (m *SecretVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4896,7 +4980,7 @@ var xxx_messageInfo_SecretVolumeSource proto.InternalMessageInfo func (m *SecurityContext) Reset() { *m = SecurityContext{} } func (*SecurityContext) ProtoMessage() {} func (*SecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{173} + return fileDescriptor_83c10c24ec417dc9, []int{176} } func (m *SecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4924,7 +5008,7 @@ var xxx_messageInfo_SecurityContext proto.InternalMessageInfo func (m *SerializedReference) Reset() { *m = SerializedReference{} } func (*SerializedReference) ProtoMessage() {} func (*SerializedReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{174} + return fileDescriptor_83c10c24ec417dc9, []int{177} } func (m *SerializedReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4952,7 +5036,7 @@ var xxx_messageInfo_SerializedReference proto.InternalMessageInfo func (m *Service) Reset() { *m = Service{} } func (*Service) ProtoMessage() {} func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{175} + return fileDescriptor_83c10c24ec417dc9, []int{178} } func (m *Service) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4980,7 +5064,7 @@ var xxx_messageInfo_Service proto.InternalMessageInfo func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } func (*ServiceAccount) ProtoMessage() {} func (*ServiceAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{176} + return fileDescriptor_83c10c24ec417dc9, []int{179} } func (m *ServiceAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5008,7 +5092,7 @@ var xxx_messageInfo_ServiceAccount proto.InternalMessageInfo func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } func (*ServiceAccountList) ProtoMessage() {} func (*ServiceAccountList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{177} + return fileDescriptor_83c10c24ec417dc9, []int{180} } func (m *ServiceAccountList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5036,7 +5120,7 @@ var xxx_messageInfo_ServiceAccountList proto.InternalMessageInfo func (m *ServiceAccountTokenProjection) Reset() { *m = ServiceAccountTokenProjection{} } func (*ServiceAccountTokenProjection) ProtoMessage() {} func (*ServiceAccountTokenProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{178} + return fileDescriptor_83c10c24ec417dc9, []int{181} } func (m *ServiceAccountTokenProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5064,7 +5148,7 @@ var xxx_messageInfo_ServiceAccountTokenProjection proto.InternalMessageInfo func (m *ServiceList) Reset() { *m = ServiceList{} } func (*ServiceList) ProtoMessage() {} func (*ServiceList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{179} + return fileDescriptor_83c10c24ec417dc9, []int{182} } func (m *ServiceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5092,7 +5176,7 @@ var xxx_messageInfo_ServiceList proto.InternalMessageInfo func (m *ServicePort) Reset() { *m = ServicePort{} } func (*ServicePort) ProtoMessage() {} func (*ServicePort) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{180} + return fileDescriptor_83c10c24ec417dc9, []int{183} } func (m *ServicePort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5120,7 +5204,7 @@ var xxx_messageInfo_ServicePort proto.InternalMessageInfo func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } func (*ServiceProxyOptions) ProtoMessage() {} func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{181} + return fileDescriptor_83c10c24ec417dc9, []int{184} } func (m *ServiceProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5148,7 +5232,7 @@ var xxx_messageInfo_ServiceProxyOptions proto.InternalMessageInfo func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } func (*ServiceSpec) ProtoMessage() {} func (*ServiceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{182} + return fileDescriptor_83c10c24ec417dc9, []int{185} } func (m *ServiceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5176,7 +5260,7 @@ var xxx_messageInfo_ServiceSpec proto.InternalMessageInfo func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} func (*ServiceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{183} + return fileDescriptor_83c10c24ec417dc9, []int{186} } func (m *ServiceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5204,7 +5288,7 @@ var xxx_messageInfo_ServiceStatus proto.InternalMessageInfo func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } func (*SessionAffinityConfig) ProtoMessage() {} func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{184} + return fileDescriptor_83c10c24ec417dc9, []int{187} } func (m *SessionAffinityConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5232,7 +5316,7 @@ var xxx_messageInfo_SessionAffinityConfig proto.InternalMessageInfo func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} } func (*StorageOSPersistentVolumeSource) ProtoMessage() {} func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{185} + return fileDescriptor_83c10c24ec417dc9, []int{188} } func (m *StorageOSPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5260,7 +5344,7 @@ var xxx_messageInfo_StorageOSPersistentVolumeSource proto.InternalMessageInfo func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } func (*StorageOSVolumeSource) ProtoMessage() {} func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{186} + return fileDescriptor_83c10c24ec417dc9, []int{189} } func (m *StorageOSVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5288,7 +5372,7 @@ var xxx_messageInfo_StorageOSVolumeSource proto.InternalMessageInfo func (m *Sysctl) Reset() { *m = Sysctl{} } func (*Sysctl) ProtoMessage() {} func (*Sysctl) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{187} + return fileDescriptor_83c10c24ec417dc9, []int{190} } func (m *Sysctl) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5316,7 +5400,7 @@ var xxx_messageInfo_Sysctl proto.InternalMessageInfo func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } func (*TCPSocketAction) ProtoMessage() {} func (*TCPSocketAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{188} + return fileDescriptor_83c10c24ec417dc9, []int{191} } func (m *TCPSocketAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5344,7 +5428,7 @@ var xxx_messageInfo_TCPSocketAction proto.InternalMessageInfo func (m *Taint) Reset() { *m = Taint{} } func (*Taint) ProtoMessage() {} func (*Taint) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{189} + return fileDescriptor_83c10c24ec417dc9, []int{192} } func (m *Taint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5372,7 +5456,7 @@ var xxx_messageInfo_Taint proto.InternalMessageInfo func (m *Toleration) Reset() { *m = Toleration{} } func (*Toleration) ProtoMessage() {} func (*Toleration) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{190} + return fileDescriptor_83c10c24ec417dc9, []int{193} } func (m *Toleration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5400,7 +5484,7 @@ var xxx_messageInfo_Toleration proto.InternalMessageInfo func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelectorLabelRequirement{} } func (*TopologySelectorLabelRequirement) ProtoMessage() {} func (*TopologySelectorLabelRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{191} + return fileDescriptor_83c10c24ec417dc9, []int{194} } func (m *TopologySelectorLabelRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5428,7 +5512,7 @@ var xxx_messageInfo_TopologySelectorLabelRequirement proto.InternalMessageInfo func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} } func (*TopologySelectorTerm) ProtoMessage() {} func (*TopologySelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{192} + return fileDescriptor_83c10c24ec417dc9, []int{195} } func (m *TopologySelectorTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5456,7 +5540,7 @@ var xxx_messageInfo_TopologySelectorTerm proto.InternalMessageInfo func (m *TopologySpreadConstraint) Reset() { *m = TopologySpreadConstraint{} } func (*TopologySpreadConstraint) ProtoMessage() {} func (*TopologySpreadConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{193} + return fileDescriptor_83c10c24ec417dc9, []int{196} } func (m *TopologySpreadConstraint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5484,7 +5568,7 @@ var xxx_messageInfo_TopologySpreadConstraint proto.InternalMessageInfo func (m *TypedLocalObjectReference) Reset() { *m = TypedLocalObjectReference{} } func (*TypedLocalObjectReference) ProtoMessage() {} func (*TypedLocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{194} + return fileDescriptor_83c10c24ec417dc9, []int{197} } func (m *TypedLocalObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5512,7 +5596,7 @@ var xxx_messageInfo_TypedLocalObjectReference proto.InternalMessageInfo func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{195} + return fileDescriptor_83c10c24ec417dc9, []int{198} } func (m *Volume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5540,7 +5624,7 @@ var xxx_messageInfo_Volume proto.InternalMessageInfo func (m *VolumeDevice) Reset() { *m = VolumeDevice{} } func (*VolumeDevice) ProtoMessage() {} func (*VolumeDevice) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{196} + return fileDescriptor_83c10c24ec417dc9, []int{199} } func (m *VolumeDevice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5568,7 +5652,7 @@ var xxx_messageInfo_VolumeDevice proto.InternalMessageInfo func (m *VolumeMount) Reset() { *m = VolumeMount{} } func (*VolumeMount) ProtoMessage() {} func (*VolumeMount) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{197} + return fileDescriptor_83c10c24ec417dc9, []int{200} } func (m *VolumeMount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5596,7 +5680,7 @@ var xxx_messageInfo_VolumeMount proto.InternalMessageInfo func (m *VolumeNodeAffinity) Reset() { *m = VolumeNodeAffinity{} } func (*VolumeNodeAffinity) ProtoMessage() {} func (*VolumeNodeAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{198} + return fileDescriptor_83c10c24ec417dc9, []int{201} } func (m *VolumeNodeAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5624,7 +5708,7 @@ var xxx_messageInfo_VolumeNodeAffinity proto.InternalMessageInfo func (m *VolumeProjection) Reset() { *m = VolumeProjection{} } func (*VolumeProjection) ProtoMessage() {} func (*VolumeProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{199} + return fileDescriptor_83c10c24ec417dc9, []int{202} } func (m *VolumeProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5652,7 +5736,7 @@ var xxx_messageInfo_VolumeProjection proto.InternalMessageInfo func (m *VolumeSource) Reset() { *m = VolumeSource{} } func (*VolumeSource) ProtoMessage() {} func (*VolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{200} + return fileDescriptor_83c10c24ec417dc9, []int{203} } func (m *VolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5680,7 +5764,7 @@ var xxx_messageInfo_VolumeSource proto.InternalMessageInfo func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{201} + return fileDescriptor_83c10c24ec417dc9, []int{204} } func (m *VsphereVirtualDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5708,7 +5792,7 @@ var xxx_messageInfo_VsphereVirtualDiskVolumeSource proto.InternalMessageInfo func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } func (*WeightedPodAffinityTerm) ProtoMessage() {} func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{202} + return fileDescriptor_83c10c24ec417dc9, []int{205} } func (m *WeightedPodAffinityTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5736,7 +5820,7 @@ var xxx_messageInfo_WeightedPodAffinityTerm proto.InternalMessageInfo func (m *WindowsSecurityContextOptions) Reset() { *m = WindowsSecurityContextOptions{} } func (*WindowsSecurityContextOptions) ProtoMessage() {} func (*WindowsSecurityContextOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{203} + return fileDescriptor_83c10c24ec417dc9, []int{206} } func (m *WindowsSecurityContextOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5816,6 +5900,7 @@ func init() { proto.RegisterType((*EphemeralContainer)(nil), "k8s.io.api.core.v1.EphemeralContainer") proto.RegisterType((*EphemeralContainerCommon)(nil), "k8s.io.api.core.v1.EphemeralContainerCommon") proto.RegisterType((*EphemeralContainers)(nil), "k8s.io.api.core.v1.EphemeralContainers") + proto.RegisterType((*EphemeralVolumeSource)(nil), "k8s.io.api.core.v1.EphemeralVolumeSource") proto.RegisterType((*Event)(nil), "k8s.io.api.core.v1.Event") proto.RegisterType((*EventList)(nil), "k8s.io.api.core.v1.EventList") proto.RegisterType((*EventSeries)(nil), "k8s.io.api.core.v1.EventSeries") @@ -5888,6 +5973,7 @@ func init() { proto.RegisterType((*PersistentVolumeClaimSpec)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimSpec") proto.RegisterType((*PersistentVolumeClaimStatus)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimStatus") proto.RegisterMapType((ResourceList)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimStatus.CapacityEntry") + proto.RegisterType((*PersistentVolumeClaimTemplate)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimTemplate") proto.RegisterType((*PersistentVolumeClaimVolumeSource)(nil), "k8s.io.api.core.v1.PersistentVolumeClaimVolumeSource") proto.RegisterType((*PersistentVolumeList)(nil), "k8s.io.api.core.v1.PersistentVolumeList") proto.RegisterType((*PersistentVolumeSource)(nil), "k8s.io.api.core.v1.PersistentVolumeSource") @@ -5952,6 +6038,7 @@ func init() { proto.RegisterType((*ScaleIOVolumeSource)(nil), "k8s.io.api.core.v1.ScaleIOVolumeSource") proto.RegisterType((*ScopeSelector)(nil), "k8s.io.api.core.v1.ScopeSelector") proto.RegisterType((*ScopedResourceSelectorRequirement)(nil), "k8s.io.api.core.v1.ScopedResourceSelectorRequirement") + proto.RegisterType((*SeccompProfile)(nil), "k8s.io.api.core.v1.SeccompProfile") proto.RegisterType((*Secret)(nil), "k8s.io.api.core.v1.Secret") proto.RegisterMapType((map[string][]byte)(nil), "k8s.io.api.core.v1.Secret.DataEntry") proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.core.v1.Secret.StringDataEntry") @@ -6000,865 +6087,876 @@ func init() { } var fileDescriptor_83c10c24ec417dc9 = []byte{ - // 13727 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x7b, 0x70, 0x24, 0x49, - 0x5a, 0x18, 0x7e, 0xd5, 0xad, 0x47, 0xf7, 0xa7, 0x77, 0xce, 0x63, 0x35, 0xda, 0x99, 0xd1, 0x6c, - 0xed, 0xdd, 0xec, 0xec, 0xed, 0xae, 0xe6, 0xf6, 0x75, 0xbb, 0xdc, 0xde, 0x2d, 0x48, 0x6a, 0x69, - 0xa6, 0x77, 0x46, 0x9a, 0xde, 0x6c, 0xcd, 0xcc, 0xdd, 0xb1, 0x77, 0xbf, 0x2b, 0x75, 0xa5, 0xa4, - 0x3a, 0x75, 0x57, 0xf5, 0x56, 0x55, 0x6b, 0x46, 0xfb, 0x83, 0x30, 0x3e, 0x9e, 0x67, 0xc0, 0x71, - 0x76, 0x10, 0x7e, 0x00, 0x41, 0x38, 0x30, 0x0e, 0xc0, 0xd8, 0x0e, 0x63, 0x30, 0x60, 0x0e, 0x1b, - 0x0c, 0xb6, 0x03, 0xfb, 0x0f, 0x8c, 0x09, 0xdb, 0x47, 0x04, 0x61, 0x19, 0x06, 0x87, 0x89, 0xfb, - 0xc3, 0x40, 0x18, 0xfc, 0x87, 0x65, 0xc2, 0x38, 0xf2, 0x59, 0x99, 0xd5, 0x55, 0xdd, 0xad, 0x59, - 0x8d, 0x6e, 0xb9, 0xd8, 0xff, 0xba, 0xf3, 0xfb, 0xf2, 0xcb, 0xac, 0x7c, 0x7c, 0xf9, 0xe5, 0x97, - 0xdf, 0x03, 0x5e, 0xdb, 0x7d, 0x35, 0x5a, 0xf0, 0x82, 0xab, 0xbb, 0x9d, 0x4d, 0x12, 0xfa, 0x24, - 0x26, 0xd1, 0xd5, 0x3d, 0xe2, 0xbb, 0x41, 0x78, 0x55, 0x00, 0x9c, 0xb6, 0x77, 0xb5, 0x11, 0x84, - 0xe4, 0xea, 0xde, 0xf3, 0x57, 0xb7, 0x89, 0x4f, 0x42, 0x27, 0x26, 0xee, 0x42, 0x3b, 0x0c, 0xe2, - 0x00, 0x21, 0x8e, 0xb3, 0xe0, 0xb4, 0xbd, 0x05, 0x8a, 0xb3, 0xb0, 0xf7, 0xfc, 0xdc, 0x73, 0xdb, - 0x5e, 0xbc, 0xd3, 0xd9, 0x5c, 0x68, 0x04, 0xad, 0xab, 0xdb, 0xc1, 0x76, 0x70, 0x95, 0xa1, 0x6e, - 0x76, 0xb6, 0xd8, 0x3f, 0xf6, 0x87, 0xfd, 0xe2, 0x24, 0xe6, 0x5e, 0x4a, 0x9a, 0x69, 0x39, 0x8d, - 0x1d, 0xcf, 0x27, 0xe1, 0xfe, 0xd5, 0xf6, 0xee, 0x36, 0x6b, 0x37, 0x24, 0x51, 0xd0, 0x09, 0x1b, - 0x24, 0xdd, 0x70, 0xcf, 0x5a, 0xd1, 0xd5, 0x16, 0x89, 0x9d, 0x8c, 0xee, 0xce, 0x5d, 0xcd, 0xab, - 0x15, 0x76, 0xfc, 0xd8, 0x6b, 0x75, 0x37, 0xf3, 0xd1, 0x7e, 0x15, 0xa2, 0xc6, 0x0e, 0x69, 0x39, - 0x5d, 0xf5, 0x5e, 0xcc, 0xab, 0xd7, 0x89, 0xbd, 0xe6, 0x55, 0xcf, 0x8f, 0xa3, 0x38, 0x4c, 0x57, - 0xb2, 0xbf, 0x62, 0xc1, 0xa5, 0xc5, 0xbb, 0xf5, 0x95, 0xa6, 0x13, 0xc5, 0x5e, 0x63, 0xa9, 0x19, - 0x34, 0x76, 0xeb, 0x71, 0x10, 0x92, 0x3b, 0x41, 0xb3, 0xd3, 0x22, 0x75, 0x36, 0x10, 0xe8, 0x59, - 0x28, 0xed, 0xb1, 0xff, 0xd5, 0xca, 0xac, 0x75, 0xc9, 0xba, 0x52, 0x5e, 0x9a, 0xfe, 0xf5, 0x83, - 0xf9, 0x0f, 0x3c, 0x38, 0x98, 0x2f, 0xdd, 0x11, 0xe5, 0x58, 0x61, 0xa0, 0xcb, 0x30, 0xb2, 0x15, - 0x6d, 0xec, 0xb7, 0xc9, 0x6c, 0x81, 0xe1, 0x4e, 0x0a, 0xdc, 0x91, 0xd5, 0x3a, 0x2d, 0xc5, 0x02, - 0x8a, 0xae, 0x42, 0xb9, 0xed, 0x84, 0xb1, 0x17, 0x7b, 0x81, 0x3f, 0x5b, 0xbc, 0x64, 0x5d, 0x19, - 0x5e, 0x9a, 0x11, 0xa8, 0xe5, 0x9a, 0x04, 0xe0, 0x04, 0x87, 0x76, 0x23, 0x24, 0x8e, 0x7b, 0xcb, - 0x6f, 0xee, 0xcf, 0x0e, 0x5d, 0xb2, 0xae, 0x94, 0x92, 0x6e, 0x60, 0x51, 0x8e, 0x15, 0x86, 0xfd, - 0x83, 0x05, 0x28, 0x2d, 0x6e, 0x6d, 0x79, 0xbe, 0x17, 0xef, 0xa3, 0x3b, 0x30, 0xee, 0x07, 0x2e, - 0x91, 0xff, 0xd9, 0x57, 0x8c, 0xbd, 0x70, 0x69, 0xa1, 0x7b, 0x29, 0x2d, 0xac, 0x6b, 0x78, 0x4b, - 0xd3, 0x0f, 0x0e, 0xe6, 0xc7, 0xf5, 0x12, 0x6c, 0xd0, 0x41, 0x18, 0xc6, 0xda, 0x81, 0xab, 0xc8, - 0x16, 0x18, 0xd9, 0xf9, 0x2c, 0xb2, 0xb5, 0x04, 0x6d, 0x69, 0xea, 0xc1, 0xc1, 0xfc, 0x98, 0x56, - 0x80, 0x75, 0x22, 0x68, 0x13, 0xa6, 0xe8, 0x5f, 0x3f, 0xf6, 0x14, 0xdd, 0x22, 0xa3, 0xfb, 0x64, - 0x1e, 0x5d, 0x0d, 0x75, 0xe9, 0xd4, 0x83, 0x83, 0xf9, 0xa9, 0x54, 0x21, 0x4e, 0x13, 0xb4, 0xdf, - 0x81, 0xc9, 0xc5, 0x38, 0x76, 0x1a, 0x3b, 0xc4, 0xe5, 0x33, 0x88, 0x5e, 0x82, 0x21, 0xdf, 0x69, - 0x11, 0x31, 0xbf, 0x97, 0xc4, 0xc0, 0x0e, 0xad, 0x3b, 0x2d, 0x72, 0x78, 0x30, 0x3f, 0x7d, 0xdb, - 0xf7, 0xde, 0xee, 0x88, 0x55, 0x41, 0xcb, 0x30, 0xc3, 0x46, 0x2f, 0x00, 0xb8, 0x64, 0xcf, 0x6b, - 0x90, 0x9a, 0x13, 0xef, 0x88, 0xf9, 0x46, 0xa2, 0x2e, 0x54, 0x14, 0x04, 0x6b, 0x58, 0xf6, 0x7d, - 0x28, 0x2f, 0xee, 0x05, 0x9e, 0x5b, 0x0b, 0xdc, 0x08, 0xed, 0xc2, 0x54, 0x3b, 0x24, 0x5b, 0x24, - 0x54, 0x45, 0xb3, 0xd6, 0xa5, 0xe2, 0x95, 0xb1, 0x17, 0xae, 0x64, 0x7e, 0xac, 0x89, 0xba, 0xe2, - 0xc7, 0xe1, 0xfe, 0xd2, 0x63, 0xa2, 0xbd, 0xa9, 0x14, 0x14, 0xa7, 0x29, 0xdb, 0xff, 0xaa, 0x00, - 0x67, 0x16, 0xdf, 0xe9, 0x84, 0xa4, 0xe2, 0x45, 0xbb, 0xe9, 0x15, 0xee, 0x7a, 0xd1, 0xee, 0x7a, - 0x32, 0x02, 0x6a, 0x69, 0x55, 0x44, 0x39, 0x56, 0x18, 0xe8, 0x39, 0x18, 0xa5, 0xbf, 0x6f, 0xe3, - 0xaa, 0xf8, 0xe4, 0x53, 0x02, 0x79, 0xac, 0xe2, 0xc4, 0x4e, 0x85, 0x83, 0xb0, 0xc4, 0x41, 0x6b, - 0x30, 0xd6, 0x60, 0x1b, 0x72, 0x7b, 0x2d, 0x70, 0x09, 0x9b, 0xcc, 0xf2, 0xd2, 0x33, 0x14, 0x7d, - 0x39, 0x29, 0x3e, 0x3c, 0x98, 0x9f, 0xe5, 0x7d, 0x13, 0x24, 0x34, 0x18, 0xd6, 0xeb, 0x23, 0x5b, - 0xed, 0xaf, 0x21, 0x46, 0x09, 0x32, 0xf6, 0xd6, 0x15, 0x6d, 0xab, 0x0c, 0xb3, 0xad, 0x32, 0x9e, - 0xbd, 0x4d, 0xd0, 0xf3, 0x30, 0xb4, 0xeb, 0xf9, 0xee, 0xec, 0x08, 0xa3, 0x75, 0x81, 0xce, 0xf9, - 0x0d, 0xcf, 0x77, 0x0f, 0x0f, 0xe6, 0x67, 0x8c, 0xee, 0xd0, 0x42, 0xcc, 0x50, 0xed, 0x3f, 0xb1, - 0x60, 0x9e, 0xc1, 0x56, 0xbd, 0x26, 0xa9, 0x91, 0x30, 0xf2, 0xa2, 0x98, 0xf8, 0xb1, 0x31, 0xa0, - 0x2f, 0x00, 0x44, 0xa4, 0x11, 0x92, 0x58, 0x1b, 0x52, 0xb5, 0x30, 0xea, 0x0a, 0x82, 0x35, 0x2c, - 0xca, 0x10, 0xa2, 0x1d, 0x27, 0x64, 0xeb, 0x4b, 0x0c, 0xac, 0x62, 0x08, 0x75, 0x09, 0xc0, 0x09, - 0x8e, 0xc1, 0x10, 0x8a, 0xfd, 0x18, 0x02, 0xfa, 0x04, 0x4c, 0x25, 0x8d, 0x45, 0x6d, 0xa7, 0x21, - 0x07, 0x90, 0x6d, 0x99, 0xba, 0x09, 0xc2, 0x69, 0x5c, 0xfb, 0xef, 0x5b, 0x62, 0xf1, 0xd0, 0xaf, - 0x7e, 0x8f, 0x7f, 0xab, 0xfd, 0x0b, 0x16, 0x8c, 0x2e, 0x79, 0xbe, 0xeb, 0xf9, 0xdb, 0xe8, 0x73, - 0x50, 0xa2, 0x67, 0x93, 0xeb, 0xc4, 0x8e, 0xe0, 0x7b, 0x1f, 0xd1, 0xf6, 0x96, 0x3a, 0x2a, 0x16, - 0xda, 0xbb, 0xdb, 0xb4, 0x20, 0x5a, 0xa0, 0xd8, 0x74, 0xb7, 0xdd, 0xda, 0xfc, 0x3c, 0x69, 0xc4, - 0x6b, 0x24, 0x76, 0x92, 0xcf, 0x49, 0xca, 0xb0, 0xa2, 0x8a, 0x6e, 0xc0, 0x48, 0xec, 0x84, 0xdb, - 0x24, 0x16, 0x0c, 0x30, 0x93, 0x51, 0xf1, 0x9a, 0x98, 0xee, 0x48, 0xe2, 0x37, 0x48, 0x72, 0x2c, - 0x6c, 0xb0, 0xaa, 0x58, 0x90, 0xb0, 0xbf, 0x7f, 0x14, 0xce, 0x2d, 0xd7, 0xab, 0x39, 0xeb, 0xea, - 0x32, 0x8c, 0xb8, 0xa1, 0xb7, 0x47, 0x42, 0x31, 0xce, 0x8a, 0x4a, 0x85, 0x95, 0x62, 0x01, 0x45, - 0xaf, 0xc2, 0x38, 0x3f, 0x90, 0xae, 0x3b, 0xbe, 0xdb, 0x94, 0x43, 0x7c, 0x5a, 0x60, 0x8f, 0xdf, - 0xd1, 0x60, 0xd8, 0xc0, 0x3c, 0xe2, 0xa2, 0xba, 0x9c, 0xda, 0x8c, 0x79, 0x87, 0xdd, 0x17, 0x2d, - 0x98, 0xe6, 0xcd, 0x2c, 0xc6, 0x71, 0xe8, 0x6d, 0x76, 0x62, 0x12, 0xcd, 0x0e, 0x33, 0x4e, 0xb7, - 0x9c, 0x35, 0x5a, 0xb9, 0x23, 0xb0, 0x70, 0x27, 0x45, 0x85, 0x33, 0xc1, 0x59, 0xd1, 0xee, 0x74, - 0x1a, 0x8c, 0xbb, 0x9a, 0x45, 0xdf, 0x6e, 0xc1, 0x5c, 0x23, 0xf0, 0xe3, 0x30, 0x68, 0x36, 0x49, - 0x58, 0xeb, 0x6c, 0x36, 0xbd, 0x68, 0x87, 0xaf, 0x53, 0x4c, 0xb6, 0x18, 0x27, 0xc8, 0x99, 0x43, - 0x85, 0x24, 0xe6, 0xf0, 0xe2, 0x83, 0x83, 0xf9, 0xb9, 0xe5, 0x5c, 0x52, 0xb8, 0x47, 0x33, 0x68, - 0x17, 0x10, 0x3d, 0x4a, 0xeb, 0xb1, 0xb3, 0x4d, 0x92, 0xc6, 0x47, 0x07, 0x6f, 0xfc, 0xec, 0x83, - 0x83, 0x79, 0xb4, 0xde, 0x45, 0x02, 0x67, 0x90, 0x45, 0x6f, 0xc3, 0x69, 0x5a, 0xda, 0xf5, 0xad, - 0xa5, 0xc1, 0x9b, 0x9b, 0x7d, 0x70, 0x30, 0x7f, 0x7a, 0x3d, 0x83, 0x08, 0xce, 0x24, 0x8d, 0xbe, - 0xcd, 0x82, 0x73, 0xc9, 0xe7, 0xaf, 0xdc, 0x6f, 0x3b, 0xbe, 0x9b, 0x34, 0x5c, 0x1e, 0xbc, 0x61, - 0xca, 0x93, 0xcf, 0x2d, 0xe7, 0x51, 0xc2, 0xf9, 0x8d, 0xcc, 0x2d, 0xc3, 0x99, 0xcc, 0xd5, 0x82, - 0xa6, 0xa1, 0xb8, 0x4b, 0xb8, 0x14, 0x54, 0xc6, 0xf4, 0x27, 0x3a, 0x0d, 0xc3, 0x7b, 0x4e, 0xb3, - 0x23, 0x36, 0x0a, 0xe6, 0x7f, 0x3e, 0x56, 0x78, 0xd5, 0xb2, 0xff, 0x75, 0x11, 0xa6, 0x96, 0xeb, - 0xd5, 0x87, 0xda, 0x85, 0xfa, 0x31, 0x54, 0xe8, 0x79, 0x0c, 0x25, 0x87, 0x5a, 0x31, 0xf7, 0x50, - 0xfb, 0x4b, 0x19, 0x5b, 0x68, 0x88, 0x6d, 0xa1, 0x6f, 0xc8, 0xd9, 0x42, 0xc7, 0xbc, 0x71, 0xf6, - 0x72, 0x56, 0xd1, 0x30, 0x9b, 0xcc, 0x4c, 0x89, 0xe5, 0x66, 0xd0, 0x70, 0x9a, 0x69, 0xd6, 0x77, - 0xc4, 0xa5, 0x74, 0x3c, 0xf3, 0xd8, 0x80, 0xf1, 0x65, 0xa7, 0xed, 0x6c, 0x7a, 0x4d, 0x2f, 0xf6, - 0x48, 0x84, 0x9e, 0x82, 0xa2, 0xe3, 0xba, 0x4c, 0xda, 0x2a, 0x2f, 0x9d, 0x79, 0x70, 0x30, 0x5f, - 0x5c, 0x74, 0xe9, 0xb1, 0x0f, 0x0a, 0x6b, 0x1f, 0x53, 0x0c, 0xf4, 0x61, 0x18, 0x72, 0xc3, 0xa0, - 0x3d, 0x5b, 0x60, 0x98, 0x74, 0xd7, 0x0d, 0x55, 0xc2, 0xa0, 0x9d, 0x42, 0x65, 0x38, 0xf6, 0xaf, - 0x14, 0xe0, 0xfc, 0x32, 0x69, 0xef, 0xac, 0xd6, 0x73, 0xf8, 0xf7, 0x15, 0x28, 0xb5, 0x02, 0xdf, - 0x8b, 0x83, 0x30, 0x12, 0x4d, 0xb3, 0x15, 0xb1, 0x26, 0xca, 0xb0, 0x82, 0xa2, 0x4b, 0x30, 0xd4, - 0x4e, 0x84, 0xca, 0x71, 0x29, 0x90, 0x32, 0x71, 0x92, 0x41, 0x28, 0x46, 0x27, 0x22, 0xa1, 0x58, - 0x31, 0x0a, 0xe3, 0x76, 0x44, 0x42, 0xcc, 0x20, 0xc9, 0xc9, 0x4c, 0xcf, 0x6c, 0xc1, 0xa1, 0x53, - 0x27, 0x33, 0x85, 0x60, 0x0d, 0x0b, 0xd5, 0xa0, 0x1c, 0xa5, 0x66, 0x76, 0xa0, 0x6d, 0x3a, 0xc1, - 0x8e, 0x6e, 0x35, 0x93, 0x09, 0x11, 0xe3, 0x44, 0x19, 0xe9, 0x7b, 0x74, 0x7f, 0xb9, 0x00, 0x88, - 0x0f, 0xe1, 0x5f, 0xb0, 0x81, 0xbb, 0xdd, 0x3d, 0x70, 0x83, 0x6f, 0x89, 0xe3, 0x1a, 0xbd, 0x3f, - 0xb5, 0xe0, 0xfc, 0xb2, 0xe7, 0xbb, 0x24, 0xcc, 0x59, 0x80, 0x8f, 0xe6, 0x2e, 0x7b, 0x34, 0xa1, - 0xc1, 0x58, 0x62, 0x43, 0xc7, 0xb0, 0xc4, 0xec, 0x3f, 0xb2, 0x00, 0xf1, 0xcf, 0x7e, 0xcf, 0x7d, - 0xec, 0xed, 0xee, 0x8f, 0x3d, 0x86, 0x65, 0x61, 0xdf, 0x84, 0xc9, 0xe5, 0xa6, 0x47, 0xfc, 0xb8, - 0x5a, 0x5b, 0x0e, 0xfc, 0x2d, 0x6f, 0x1b, 0x7d, 0x0c, 0x26, 0x63, 0xaf, 0x45, 0x82, 0x4e, 0x5c, - 0x27, 0x8d, 0xc0, 0x67, 0x37, 0x49, 0xeb, 0xca, 0xf0, 0x12, 0x7a, 0x70, 0x30, 0x3f, 0xb9, 0x61, - 0x40, 0x70, 0x0a, 0xd3, 0xfe, 0x1d, 0x3a, 0x7e, 0x41, 0xab, 0x1d, 0xf8, 0xc4, 0x8f, 0x97, 0x03, - 0xdf, 0xe5, 0x1a, 0x87, 0x8f, 0xc1, 0x50, 0x4c, 0xc7, 0x83, 0x8f, 0xdd, 0x65, 0xb9, 0x51, 0xe8, - 0x28, 0x1c, 0x1e, 0xcc, 0x9f, 0xed, 0xae, 0xc1, 0xc6, 0x89, 0xd5, 0x41, 0xdf, 0x00, 0x23, 0x51, - 0xec, 0xc4, 0x9d, 0x48, 0x8c, 0xe6, 0x13, 0x72, 0x34, 0xeb, 0xac, 0xf4, 0xf0, 0x60, 0x7e, 0x4a, - 0x55, 0xe3, 0x45, 0x58, 0x54, 0x40, 0x4f, 0xc3, 0x68, 0x8b, 0x44, 0x91, 0xb3, 0x2d, 0x4f, 0xc3, - 0x29, 0x51, 0x77, 0x74, 0x8d, 0x17, 0x63, 0x09, 0x47, 0x4f, 0xc2, 0x30, 0x09, 0xc3, 0x20, 0x14, - 0x7b, 0x74, 0x42, 0x20, 0x0e, 0xaf, 0xd0, 0x42, 0xcc, 0x61, 0xf6, 0xbf, 0xb7, 0x60, 0x4a, 0xf5, - 0x95, 0xb7, 0x75, 0x02, 0xb7, 0x82, 0x4f, 0x03, 0x34, 0xe4, 0x07, 0x46, 0xec, 0xf4, 0x18, 0x7b, - 0xe1, 0x72, 0xe6, 0x41, 0xdd, 0x35, 0x8c, 0x09, 0x65, 0x55, 0x14, 0x61, 0x8d, 0x9a, 0xfd, 0xcf, - 0x2d, 0x38, 0x95, 0xfa, 0xa2, 0x9b, 0x5e, 0x14, 0xa3, 0xb7, 0xba, 0xbe, 0x6a, 0x61, 0xb0, 0xaf, - 0xa2, 0xb5, 0xd9, 0x37, 0xa9, 0xa5, 0x2c, 0x4b, 0xb4, 0x2f, 0xba, 0x0e, 0xc3, 0x5e, 0x4c, 0x5a, - 0xf2, 0x63, 0x9e, 0xec, 0xf9, 0x31, 0xbc, 0x57, 0xc9, 0x8c, 0x54, 0x69, 0x4d, 0xcc, 0x09, 0xd8, - 0xbf, 0x52, 0x84, 0x32, 0x5f, 0xb6, 0x6b, 0x4e, 0xfb, 0x04, 0xe6, 0xe2, 0x19, 0x28, 0x7b, 0xad, - 0x56, 0x27, 0x76, 0x36, 0x05, 0x3b, 0x2f, 0xf1, 0xad, 0x55, 0x95, 0x85, 0x38, 0x81, 0xa3, 0x2a, - 0x0c, 0xb1, 0xae, 0xf0, 0xaf, 0x7c, 0x2a, 0xfb, 0x2b, 0x45, 0xdf, 0x17, 0x2a, 0x4e, 0xec, 0x70, - 0x49, 0x4a, 0x9d, 0x23, 0xb4, 0x08, 0x33, 0x12, 0xc8, 0x01, 0xd8, 0xf4, 0x7c, 0x27, 0xdc, 0xa7, - 0x65, 0xb3, 0x45, 0x46, 0xf0, 0xb9, 0xde, 0x04, 0x97, 0x14, 0x3e, 0x27, 0xab, 0x3e, 0x2c, 0x01, - 0x60, 0x8d, 0xe8, 0xdc, 0x2b, 0x50, 0x56, 0xc8, 0x47, 0x11, 0x88, 0xe6, 0x3e, 0x01, 0x53, 0xa9, - 0xb6, 0xfa, 0x55, 0x1f, 0xd7, 0xe5, 0xa9, 0x5f, 0x64, 0x2c, 0x43, 0xf4, 0x7a, 0xc5, 0xdf, 0x13, - 0x2c, 0xf7, 0x1d, 0x38, 0xdd, 0xcc, 0xe0, 0x64, 0x62, 0x5e, 0x07, 0xe7, 0x7c, 0xe7, 0xc5, 0x67, - 0x9f, 0xce, 0x82, 0xe2, 0xcc, 0x36, 0xa8, 0x8c, 0x10, 0xb4, 0xe9, 0x06, 0x71, 0x9a, 0xba, 0xb8, - 0x7d, 0x4b, 0x94, 0x61, 0x05, 0xa5, 0xfc, 0xee, 0xb4, 0xea, 0xfc, 0x0d, 0xb2, 0x5f, 0x27, 0x4d, - 0xd2, 0x88, 0x83, 0xf0, 0x6b, 0xda, 0xfd, 0x0b, 0x7c, 0xf4, 0x39, 0xbb, 0x1c, 0x13, 0x04, 0x8a, - 0x37, 0xc8, 0x3e, 0x9f, 0x0a, 0xfd, 0xeb, 0x8a, 0x3d, 0xbf, 0xee, 0xa7, 0x2d, 0x98, 0x50, 0x5f, - 0x77, 0x02, 0x7c, 0x61, 0xc9, 0xe4, 0x0b, 0x17, 0x7a, 0x2e, 0xf0, 0x1c, 0x8e, 0xf0, 0xe5, 0x02, - 0x9c, 0x53, 0x38, 0xf4, 0x6e, 0xc0, 0xff, 0x88, 0x55, 0x75, 0x15, 0xca, 0xbe, 0xd2, 0x5a, 0x59, - 0xa6, 0xba, 0x28, 0xd1, 0x59, 0x25, 0x38, 0x54, 0xc4, 0xf3, 0x13, 0xd5, 0xd2, 0xb8, 0xae, 0xce, - 0x15, 0xaa, 0xdb, 0x25, 0x28, 0x76, 0x3c, 0x57, 0x1c, 0x30, 0x1f, 0x91, 0xa3, 0x7d, 0xbb, 0x5a, - 0x39, 0x3c, 0x98, 0x7f, 0x22, 0xef, 0x29, 0x81, 0x9e, 0x6c, 0xd1, 0xc2, 0xed, 0x6a, 0x05, 0xd3, - 0xca, 0x68, 0x11, 0xa6, 0xe4, 0x6b, 0xc9, 0x1d, 0x2a, 0x6e, 0x05, 0xbe, 0x38, 0x87, 0x94, 0x4e, - 0x16, 0x9b, 0x60, 0x9c, 0xc6, 0x47, 0x15, 0x98, 0xde, 0xed, 0x6c, 0x92, 0x26, 0x89, 0xf9, 0x07, - 0xdf, 0x20, 0x5c, 0x63, 0x59, 0x4e, 0x6e, 0x66, 0x37, 0x52, 0x70, 0xdc, 0x55, 0xc3, 0xfe, 0x73, - 0x76, 0x1e, 0x88, 0xd1, 0xab, 0x85, 0x01, 0x5d, 0x58, 0x94, 0xfa, 0xd7, 0x72, 0x39, 0x0f, 0xb2, - 0x2a, 0x6e, 0x90, 0xfd, 0x8d, 0x80, 0x4a, 0xe6, 0xd9, 0xab, 0xc2, 0x58, 0xf3, 0x43, 0x3d, 0xd7, - 0xfc, 0xcf, 0x16, 0xe0, 0x8c, 0x1a, 0x01, 0x43, 0x08, 0xfc, 0x8b, 0x3e, 0x06, 0xcf, 0xc3, 0x98, - 0x4b, 0xb6, 0x9c, 0x4e, 0x33, 0x56, 0xea, 0xf3, 0x61, 0xfe, 0x84, 0x52, 0x49, 0x8a, 0xb1, 0x8e, - 0x73, 0x84, 0x61, 0xfb, 0x5f, 0x63, 0xec, 0x20, 0x8e, 0x1d, 0xba, 0xc6, 0xd5, 0xae, 0xb1, 0x72, - 0x77, 0xcd, 0x93, 0x30, 0xec, 0xb5, 0xa8, 0x60, 0x56, 0x30, 0xe5, 0xad, 0x2a, 0x2d, 0xc4, 0x1c, - 0x86, 0x3e, 0x04, 0xa3, 0x8d, 0xa0, 0xd5, 0x72, 0x7c, 0x97, 0x1d, 0x79, 0xe5, 0xa5, 0x31, 0x2a, - 0xbb, 0x2d, 0xf3, 0x22, 0x2c, 0x61, 0xe8, 0x3c, 0x0c, 0x39, 0xe1, 0x36, 0xd7, 0x61, 0x94, 0x97, - 0x4a, 0xb4, 0xa5, 0xc5, 0x70, 0x3b, 0xc2, 0xac, 0x94, 0x5e, 0xc1, 0xee, 0x05, 0xe1, 0xae, 0xe7, - 0x6f, 0x57, 0xbc, 0x50, 0x6c, 0x09, 0x75, 0x16, 0xde, 0x55, 0x10, 0xac, 0x61, 0xa1, 0x55, 0x18, - 0x6e, 0x07, 0x61, 0x1c, 0xcd, 0x8e, 0xb0, 0xe1, 0x7e, 0x22, 0x87, 0x11, 0xf1, 0xaf, 0xad, 0x05, - 0x61, 0x9c, 0x7c, 0x00, 0xfd, 0x17, 0x61, 0x5e, 0x1d, 0xdd, 0x84, 0x51, 0xe2, 0xef, 0xad, 0x86, - 0x41, 0x6b, 0xf6, 0x54, 0x3e, 0xa5, 0x15, 0x8e, 0xc2, 0x97, 0x59, 0x22, 0xa3, 0x8a, 0x62, 0x2c, - 0x49, 0xa0, 0x6f, 0x80, 0x22, 0xf1, 0xf7, 0x66, 0x47, 0x19, 0xa5, 0xb9, 0x1c, 0x4a, 0x77, 0x9c, - 0x30, 0xe1, 0xf9, 0x2b, 0xfe, 0x1e, 0xa6, 0x75, 0xd0, 0xa7, 0xa0, 0x2c, 0x19, 0x46, 0x24, 0x94, - 0x75, 0x99, 0x0b, 0x56, 0xb2, 0x19, 0x4c, 0xde, 0xee, 0x78, 0x21, 0x69, 0x11, 0x3f, 0x8e, 0x12, - 0x0e, 0x29, 0xa1, 0x11, 0x4e, 0xa8, 0xa1, 0x4f, 0x49, 0x0d, 0xf1, 0x5a, 0xd0, 0xf1, 0xe3, 0x68, - 0xb6, 0xcc, 0xba, 0x97, 0xf9, 0x76, 0x77, 0x27, 0xc1, 0x4b, 0xab, 0x90, 0x79, 0x65, 0x6c, 0x90, - 0x42, 0x9f, 0x81, 0x09, 0xfe, 0x9f, 0xbf, 0x80, 0x45, 0xb3, 0x67, 0x18, 0xed, 0x4b, 0xf9, 0xb4, - 0x39, 0xe2, 0xd2, 0x19, 0x41, 0x7c, 0x42, 0x2f, 0x8d, 0xb0, 0x49, 0x0d, 0x61, 0x98, 0x68, 0x7a, - 0x7b, 0xc4, 0x27, 0x51, 0x54, 0x0b, 0x83, 0x4d, 0x32, 0x0b, 0x6c, 0x60, 0xce, 0x65, 0xbf, 0x98, - 0x05, 0x9b, 0x64, 0x69, 0x86, 0xd2, 0xbc, 0xa9, 0xd7, 0xc1, 0x26, 0x09, 0x74, 0x1b, 0x26, 0xe9, - 0x8d, 0xcd, 0x4b, 0x88, 0x8e, 0xf5, 0x23, 0xca, 0xee, 0x55, 0xd8, 0xa8, 0x84, 0x53, 0x44, 0xd0, - 0x2d, 0x18, 0x8f, 0x62, 0x27, 0x8c, 0x3b, 0x6d, 0x4e, 0xf4, 0x6c, 0x3f, 0xa2, 0xec, 0xc1, 0xb5, - 0xae, 0x55, 0xc1, 0x06, 0x01, 0xf4, 0x06, 0x94, 0x9b, 0xde, 0x16, 0x69, 0xec, 0x37, 0x9a, 0x64, - 0x76, 0x9c, 0x51, 0xcb, 0x64, 0x2a, 0x37, 0x25, 0x12, 0x97, 0x73, 0xd5, 0x5f, 0x9c, 0x54, 0x47, - 0x77, 0xe0, 0x6c, 0x4c, 0xc2, 0x96, 0xe7, 0x3b, 0x94, 0x19, 0x88, 0xab, 0x15, 0x7b, 0xc8, 0x9c, - 0x60, 0xbb, 0xed, 0xa2, 0x98, 0x8d, 0xb3, 0x1b, 0x99, 0x58, 0x38, 0xa7, 0x36, 0xba, 0x0f, 0xb3, - 0x19, 0x90, 0xa0, 0xe9, 0x35, 0xf6, 0x67, 0x4f, 0x33, 0xca, 0x1f, 0x17, 0x94, 0x67, 0x37, 0x72, - 0xf0, 0x0e, 0x7b, 0xc0, 0x70, 0x2e, 0x75, 0x74, 0x0b, 0xa6, 0x18, 0x07, 0xaa, 0x75, 0x9a, 0x4d, - 0xd1, 0xe0, 0x24, 0x6b, 0xf0, 0x43, 0xf2, 0x3c, 0xae, 0x9a, 0xe0, 0xc3, 0x83, 0x79, 0x48, 0xfe, - 0xe1, 0x74, 0x6d, 0xb4, 0xc9, 0xde, 0xcc, 0x3a, 0xa1, 0x17, 0xef, 0x53, 0xbe, 0x41, 0xee, 0xc7, - 0xb3, 0x53, 0x3d, 0xf5, 0x15, 0x3a, 0xaa, 0x7a, 0x58, 0xd3, 0x0b, 0x71, 0x9a, 0x20, 0x65, 0xa9, - 0x51, 0xec, 0x7a, 0xfe, 0xec, 0x34, 0xbf, 0x97, 0x48, 0x8e, 0x54, 0xa7, 0x85, 0x98, 0xc3, 0xd8, - 0x7b, 0x19, 0xfd, 0x71, 0x8b, 0x9e, 0x5c, 0x33, 0x0c, 0x31, 0x79, 0x2f, 0x93, 0x00, 0x9c, 0xe0, - 0x50, 0x61, 0x32, 0x8e, 0xf7, 0x67, 0x11, 0x43, 0x55, 0x8c, 0x65, 0x63, 0xe3, 0x53, 0x98, 0x96, - 0xdb, 0x9b, 0x30, 0xa9, 0x18, 0x21, 0x1b, 0x13, 0x34, 0x0f, 0xc3, 0x4c, 0x7c, 0x12, 0xda, 0xb5, - 0x32, 0xed, 0x02, 0x13, 0xad, 0x30, 0x2f, 0x67, 0x5d, 0xf0, 0xde, 0x21, 0x4b, 0xfb, 0x31, 0xe1, - 0x77, 0xfa, 0xa2, 0xd6, 0x05, 0x09, 0xc0, 0x09, 0x8e, 0xfd, 0x7f, 0xb9, 0x18, 0x9a, 0x70, 0xdb, - 0x01, 0xce, 0x97, 0x67, 0xa1, 0xb4, 0x13, 0x44, 0x31, 0xc5, 0x66, 0x6d, 0x0c, 0x27, 0x82, 0xe7, - 0x75, 0x51, 0x8e, 0x15, 0x06, 0x7a, 0x0d, 0x26, 0x1a, 0x7a, 0x03, 0xe2, 0x70, 0x54, 0x6c, 0xc4, - 0x68, 0x1d, 0x9b, 0xb8, 0xe8, 0x55, 0x28, 0x31, 0x1b, 0x90, 0x46, 0xd0, 0x14, 0x52, 0x9b, 0x3c, - 0xe1, 0x4b, 0x35, 0x51, 0x7e, 0xa8, 0xfd, 0xc6, 0x0a, 0x1b, 0x5d, 0x86, 0x11, 0xda, 0x85, 0x6a, - 0x4d, 0x1c, 0x4b, 0x4a, 0x51, 0x74, 0x9d, 0x95, 0x62, 0x01, 0xb5, 0xff, 0x7a, 0x41, 0x1b, 0x65, - 0x7a, 0x1f, 0x26, 0xa8, 0x06, 0xa3, 0xf7, 0x1c, 0x2f, 0xf6, 0xfc, 0x6d, 0x21, 0x7f, 0x3c, 0xdd, - 0xf3, 0x8c, 0x62, 0x95, 0xee, 0xf2, 0x0a, 0xfc, 0x14, 0x15, 0x7f, 0xb0, 0x24, 0x43, 0x29, 0x86, - 0x1d, 0xdf, 0xa7, 0x14, 0x0b, 0x83, 0x52, 0xc4, 0xbc, 0x02, 0xa7, 0x28, 0xfe, 0x60, 0x49, 0x06, - 0xbd, 0x05, 0x20, 0x77, 0x18, 0x71, 0x85, 0xed, 0xc5, 0xb3, 0xfd, 0x89, 0x6e, 0xa8, 0x3a, 0x4b, - 0x93, 0xf4, 0x8c, 0x4e, 0xfe, 0x63, 0x8d, 0x9e, 0x1d, 0x33, 0x39, 0xad, 0xbb, 0x33, 0xe8, 0x9b, - 0xe9, 0x12, 0x77, 0xc2, 0x98, 0xb8, 0x8b, 0xb1, 0x18, 0x9c, 0x0f, 0x0f, 0x76, 0x49, 0xd9, 0xf0, - 0x5a, 0x44, 0xdf, 0x0e, 0x82, 0x08, 0x4e, 0xe8, 0xd9, 0x3f, 0x5f, 0x84, 0xd9, 0xbc, 0xee, 0xd2, - 0x45, 0x47, 0xee, 0x7b, 0xf1, 0x32, 0x15, 0xaf, 0x2c, 0x73, 0xd1, 0xad, 0x88, 0x72, 0xac, 0x30, - 0xe8, 0xec, 0x47, 0xde, 0xb6, 0xbc, 0x63, 0x0e, 0x27, 0xb3, 0x5f, 0x67, 0xa5, 0x58, 0x40, 0x29, - 0x5e, 0x48, 0x9c, 0x48, 0x18, 0xf7, 0x68, 0xab, 0x04, 0xb3, 0x52, 0x2c, 0xa0, 0xba, 0xb6, 0x6b, - 0xa8, 0x8f, 0xb6, 0xcb, 0x18, 0xa2, 0xe1, 0xe3, 0x1d, 0x22, 0xf4, 0x59, 0x80, 0x2d, 0xcf, 0xf7, - 0xa2, 0x1d, 0x46, 0x7d, 0xe4, 0xc8, 0xd4, 0x95, 0x70, 0xb6, 0xaa, 0xa8, 0x60, 0x8d, 0x22, 0x7a, - 0x19, 0xc6, 0xd4, 0x06, 0xac, 0x56, 0xd8, 0x4b, 0xa7, 0x66, 0x39, 0x92, 0x70, 0xa3, 0x0a, 0xd6, - 0xf1, 0xec, 0xcf, 0xa7, 0xd7, 0x8b, 0xd8, 0x01, 0xda, 0xf8, 0x5a, 0x83, 0x8e, 0x6f, 0xa1, 0xf7, - 0xf8, 0xda, 0x5f, 0x2d, 0xc2, 0x94, 0xd1, 0x58, 0x27, 0x1a, 0x80, 0x67, 0x5d, 0xa3, 0x0c, 0xdc, - 0x89, 0x89, 0xd8, 0x7f, 0x76, 0xff, 0xad, 0xa2, 0x33, 0x79, 0xba, 0x03, 0x78, 0x7d, 0xf4, 0x59, - 0x28, 0x37, 0x9d, 0x88, 0x69, 0xce, 0x88, 0xd8, 0x77, 0x83, 0x10, 0x4b, 0x2e, 0x26, 0x4e, 0x14, - 0x6b, 0xa7, 0x26, 0xa7, 0x9d, 0x90, 0xa4, 0x27, 0x0d, 0x95, 0x4f, 0xa4, 0xf5, 0x98, 0xea, 0x04, - 0x15, 0x62, 0xf6, 0x31, 0x87, 0xa1, 0x57, 0x61, 0x3c, 0x24, 0x6c, 0x55, 0x2c, 0x53, 0x69, 0x8e, - 0x2d, 0xb3, 0xe1, 0x44, 0xec, 0xc3, 0x1a, 0x0c, 0x1b, 0x98, 0xc9, 0xdd, 0x60, 0xa4, 0xc7, 0xdd, - 0xe0, 0x69, 0x18, 0x65, 0x3f, 0xd4, 0x0a, 0x50, 0xb3, 0x51, 0xe5, 0xc5, 0x58, 0xc2, 0xd3, 0x0b, - 0xa6, 0x34, 0xd8, 0x82, 0xa1, 0xb7, 0x0f, 0xb1, 0xa8, 0xd9, 0x2b, 0x73, 0x89, 0x73, 0x39, 0xb1, - 0xe4, 0xb1, 0x84, 0xd9, 0x1f, 0x86, 0xc9, 0x8a, 0x43, 0x5a, 0x81, 0xbf, 0xe2, 0xbb, 0xed, 0xc0, - 0xf3, 0x63, 0x34, 0x0b, 0x43, 0xec, 0x10, 0xe1, 0x2c, 0x60, 0x88, 0x36, 0x84, 0x87, 0xe8, 0x85, - 0xc0, 0xde, 0x86, 0x33, 0x95, 0xe0, 0x9e, 0x7f, 0xcf, 0x09, 0xdd, 0xc5, 0x5a, 0x55, 0xbb, 0x5f, - 0xaf, 0xcb, 0xfb, 0x1d, 0x37, 0xda, 0xca, 0x64, 0xbd, 0x5a, 0x4d, 0x2e, 0xd6, 0xae, 0x7a, 0x4d, - 0x92, 0xa3, 0x05, 0xf9, 0x9b, 0x05, 0xa3, 0xa5, 0x04, 0x5f, 0xbd, 0x6a, 0x59, 0xb9, 0xaf, 0x5a, - 0x6f, 0x42, 0x69, 0xcb, 0x23, 0x4d, 0x17, 0x93, 0x2d, 0xb1, 0x12, 0x9f, 0xca, 0xb7, 0x43, 0x59, - 0xa5, 0x98, 0x52, 0xeb, 0xc5, 0x6f, 0x87, 0xab, 0xa2, 0x32, 0x56, 0x64, 0xd0, 0x2e, 0x4c, 0xcb, - 0x0b, 0x83, 0x84, 0x8a, 0x75, 0xf9, 0x74, 0xaf, 0x5b, 0x88, 0x49, 0xfc, 0xf4, 0x83, 0x83, 0xf9, - 0x69, 0x9c, 0x22, 0x83, 0xbb, 0x08, 0xd3, 0xeb, 0x60, 0x8b, 0x72, 0xe0, 0x21, 0x36, 0xfc, 0xec, - 0x3a, 0xc8, 0x6e, 0xb6, 0xac, 0xd4, 0xfe, 0x61, 0x0b, 0x1e, 0xeb, 0x1a, 0x19, 0x71, 0xc3, 0x3f, - 0xe6, 0x59, 0x48, 0xdf, 0xb8, 0x0b, 0xfd, 0x6f, 0xdc, 0xf6, 0x3f, 0xb0, 0xe0, 0xf4, 0x4a, 0xab, - 0x1d, 0xef, 0x57, 0x3c, 0xf3, 0x09, 0xea, 0x15, 0x18, 0x69, 0x11, 0xd7, 0xeb, 0xb4, 0xc4, 0xcc, - 0xcd, 0x4b, 0x2e, 0xb5, 0xc6, 0x4a, 0x0f, 0x0f, 0xe6, 0x27, 0xea, 0x71, 0x10, 0x3a, 0xdb, 0x84, - 0x17, 0x60, 0x81, 0xce, 0x78, 0xbd, 0xf7, 0x0e, 0xb9, 0xe9, 0xb5, 0x3c, 0x69, 0x57, 0xd4, 0x53, - 0x67, 0xb7, 0x20, 0x07, 0x74, 0xe1, 0xcd, 0x8e, 0xe3, 0xc7, 0x5e, 0xbc, 0x2f, 0x5e, 0x8f, 0x24, - 0x11, 0x9c, 0xd0, 0xb3, 0xbf, 0x62, 0xc1, 0x94, 0x5c, 0xf7, 0x8b, 0xae, 0x1b, 0x92, 0x28, 0x42, - 0x73, 0x50, 0xf0, 0xda, 0xa2, 0x97, 0x20, 0x7a, 0x59, 0xa8, 0xd6, 0x70, 0xc1, 0x6b, 0x4b, 0xb1, - 0x8c, 0x31, 0xc2, 0xa2, 0xf9, 0x90, 0x76, 0x5d, 0x94, 0x63, 0x85, 0x81, 0xae, 0x40, 0xc9, 0x0f, - 0x5c, 0x6e, 0xdb, 0xc5, 0x8f, 0x34, 0xb6, 0xc0, 0xd6, 0x45, 0x19, 0x56, 0x50, 0x54, 0x83, 0x32, - 0x37, 0x7b, 0x4a, 0x16, 0xed, 0x40, 0xc6, 0x53, 0xec, 0xcb, 0x36, 0x64, 0x4d, 0x9c, 0x10, 0xb1, - 0x7f, 0xd9, 0x82, 0x71, 0xf9, 0x65, 0x03, 0xca, 0x9c, 0x74, 0x6b, 0x25, 0xf2, 0x66, 0xb2, 0xb5, - 0xa8, 0xcc, 0xc8, 0x20, 0x86, 0xa8, 0x58, 0x3c, 0x92, 0xa8, 0xf8, 0x3c, 0x8c, 0x39, 0xed, 0x76, - 0xcd, 0x94, 0x33, 0xd9, 0x52, 0x5a, 0x4c, 0x8a, 0xb1, 0x8e, 0x63, 0xff, 0x50, 0x01, 0x26, 0xe5, - 0x17, 0xd4, 0x3b, 0x9b, 0x11, 0x89, 0xd1, 0x06, 0x94, 0x1d, 0x3e, 0x4b, 0x44, 0x2e, 0xf2, 0x27, - 0xb3, 0xf5, 0x08, 0xc6, 0x94, 0x26, 0x07, 0xfe, 0xa2, 0xac, 0x8d, 0x13, 0x42, 0xa8, 0x09, 0x33, - 0x7e, 0x10, 0x33, 0xe6, 0xaf, 0xe0, 0xbd, 0x9e, 0x76, 0xd2, 0xd4, 0xcf, 0x09, 0xea, 0x33, 0xeb, - 0x69, 0x2a, 0xb8, 0x9b, 0x30, 0x5a, 0x91, 0xba, 0x99, 0x62, 0xbe, 0x32, 0x40, 0x9f, 0xb8, 0x6c, - 0xd5, 0x8c, 0xfd, 0x4b, 0x16, 0x94, 0x25, 0xda, 0x49, 0xbc, 0xe2, 0xad, 0xc1, 0x68, 0xc4, 0x26, - 0x41, 0x0e, 0x8d, 0xdd, 0xab, 0xe3, 0x7c, 0xbe, 0x92, 0x33, 0x8d, 0xff, 0x8f, 0xb0, 0xa4, 0xc1, - 0x54, 0xf3, 0xaa, 0xfb, 0xef, 0x11, 0xd5, 0xbc, 0xea, 0x4f, 0xce, 0xa1, 0xf4, 0x07, 0xac, 0xcf, - 0x9a, 0xae, 0x8b, 0x8a, 0x5e, 0xed, 0x90, 0x6c, 0x79, 0xf7, 0xd3, 0xa2, 0x57, 0x8d, 0x95, 0x62, - 0x01, 0x45, 0x6f, 0xc1, 0x78, 0x43, 0xea, 0x64, 0x93, 0x1d, 0x7e, 0xb9, 0xe7, 0xfb, 0x80, 0x7a, - 0x4a, 0xe2, 0xba, 0x90, 0x65, 0xad, 0x3e, 0x36, 0xa8, 0x99, 0x66, 0x04, 0xc5, 0x7e, 0x66, 0x04, - 0x09, 0xdd, 0xfc, 0x47, 0xf5, 0x1f, 0xb1, 0x60, 0x84, 0xeb, 0xe2, 0x06, 0x53, 0x85, 0x6a, 0x2f, - 0x6b, 0xc9, 0xd8, 0xdd, 0xa1, 0x85, 0xe2, 0xa5, 0x0c, 0xad, 0x41, 0x99, 0xfd, 0x60, 0xba, 0xc4, - 0x62, 0xbe, 0xd5, 0x3d, 0x6f, 0x55, 0xef, 0xe0, 0x1d, 0x59, 0x0d, 0x27, 0x14, 0xec, 0x1f, 0x28, - 0x52, 0xee, 0x96, 0xa0, 0x1a, 0x87, 0xbe, 0xf5, 0xe8, 0x0e, 0xfd, 0xc2, 0xa3, 0x3a, 0xf4, 0xb7, - 0x61, 0xaa, 0xa1, 0xbd, 0xc3, 0x25, 0x33, 0x79, 0xa5, 0xe7, 0x22, 0xd1, 0x9e, 0xec, 0xb8, 0x96, - 0x65, 0xd9, 0x24, 0x82, 0xd3, 0x54, 0xd1, 0x37, 0xc3, 0x38, 0x9f, 0x67, 0xd1, 0x0a, 0xb7, 0xc4, - 0xf8, 0x50, 0xfe, 0x7a, 0xd1, 0x9b, 0xe0, 0x5a, 0x39, 0xad, 0x3a, 0x36, 0x88, 0xd9, 0x7f, 0x6c, - 0x01, 0x5a, 0x69, 0xef, 0x90, 0x16, 0x09, 0x9d, 0x66, 0xa2, 0x4e, 0xff, 0x2b, 0x16, 0xcc, 0x92, - 0xae, 0xe2, 0xe5, 0xa0, 0xd5, 0x12, 0x97, 0x96, 0x9c, 0x7b, 0xf5, 0x4a, 0x4e, 0x1d, 0xe5, 0x96, - 0x30, 0x9b, 0x87, 0x81, 0x73, 0xdb, 0x43, 0x6b, 0x70, 0x8a, 0x9f, 0x92, 0x0a, 0xa0, 0xd9, 0x5e, - 0x3f, 0x2e, 0x08, 0x9f, 0xda, 0xe8, 0x46, 0xc1, 0x59, 0xf5, 0xec, 0xef, 0x18, 0x87, 0xdc, 0x5e, - 0xbc, 0xff, 0x8e, 0xf0, 0xfe, 0x3b, 0xc2, 0xfb, 0xef, 0x08, 0xef, 0xbf, 0x23, 0xbc, 0xff, 0x8e, - 0xf0, 0x75, 0xff, 0x8e, 0xf0, 0x87, 0x16, 0x9c, 0xea, 0x3e, 0x06, 0x4e, 0x42, 0x30, 0xef, 0xc0, - 0xa9, 0xee, 0xb3, 0xae, 0xa7, 0x9d, 0x5d, 0x77, 0x3f, 0x93, 0x73, 0x2f, 0xe3, 0x1b, 0x70, 0x16, - 0x7d, 0xfb, 0xe7, 0x4b, 0x30, 0xbc, 0xb2, 0x47, 0xfc, 0xf8, 0x04, 0x3e, 0xb1, 0x01, 0x93, 0x9e, - 0xbf, 0x17, 0x34, 0xf7, 0x88, 0xcb, 0xe1, 0x47, 0xb9, 0x22, 0x9f, 0x15, 0xa4, 0x27, 0xab, 0x06, - 0x09, 0x9c, 0x22, 0xf9, 0x28, 0xd4, 0xd4, 0xd7, 0x60, 0x84, 0x9f, 0x0e, 0x42, 0x47, 0x9d, 0x79, - 0x18, 0xb0, 0x41, 0x14, 0x67, 0x5e, 0xa2, 0x42, 0xe7, 0xa7, 0x8f, 0xa8, 0x8e, 0x3e, 0x0f, 0x93, - 0x5b, 0x5e, 0x18, 0xc5, 0x1b, 0x5e, 0x8b, 0x44, 0xb1, 0xd3, 0x6a, 0x3f, 0x84, 0x5a, 0x5a, 0x8d, - 0xc3, 0xaa, 0x41, 0x09, 0xa7, 0x28, 0xa3, 0x6d, 0x98, 0x68, 0x3a, 0x7a, 0x53, 0xa3, 0x47, 0x6e, - 0x4a, 0x1d, 0x3b, 0x37, 0x75, 0x42, 0xd8, 0xa4, 0x4b, 0xf7, 0x69, 0x83, 0x69, 0x56, 0x4b, 0x4c, - 0xdf, 0xa0, 0xf6, 0x29, 0x57, 0xa9, 0x72, 0x18, 0x95, 0xa0, 0x98, 0xe5, 0x6d, 0xd9, 0x94, 0xa0, - 0x34, 0xfb, 0xda, 0xcf, 0x41, 0x99, 0xd0, 0x21, 0xa4, 0x84, 0xc5, 0xc9, 0x75, 0x75, 0xb0, 0xbe, - 0xae, 0x79, 0x8d, 0x30, 0x30, 0x1f, 0x04, 0x56, 0x24, 0x25, 0x9c, 0x10, 0x45, 0xcb, 0x30, 0x12, - 0x91, 0xd0, 0x23, 0x91, 0x38, 0xc3, 0x7a, 0x4c, 0x23, 0x43, 0xe3, 0x4e, 0x2b, 0xfc, 0x37, 0x16, - 0x55, 0xe9, 0xf2, 0x72, 0x98, 0xae, 0x94, 0x9d, 0x32, 0xda, 0xf2, 0x5a, 0x64, 0xa5, 0x58, 0x40, - 0xd1, 0x1b, 0x30, 0x1a, 0x92, 0x26, 0x7b, 0x71, 0x9a, 0x18, 0x7c, 0x91, 0xf3, 0x07, 0x2c, 0x5e, - 0x0f, 0x4b, 0x02, 0xe8, 0x06, 0xa0, 0x90, 0x50, 0x09, 0xcc, 0xf3, 0xb7, 0x95, 0x3d, 0xaa, 0xe0, - 0xe0, 0x6a, 0xc7, 0xe3, 0x04, 0x43, 0xfa, 0x0f, 0xe1, 0x8c, 0x6a, 0xe8, 0x1a, 0xcc, 0xa8, 0xd2, - 0xaa, 0x1f, 0xc5, 0x0e, 0xe5, 0x9c, 0x53, 0x8c, 0x96, 0x52, 0x80, 0xe0, 0x34, 0x02, 0xee, 0xae, - 0x63, 0xff, 0xa4, 0x05, 0x7c, 0x9c, 0x4f, 0xe0, 0xda, 0xff, 0xba, 0x79, 0xed, 0x3f, 0x97, 0x3b, - 0x73, 0x39, 0x57, 0xfe, 0x07, 0x16, 0x8c, 0x69, 0x33, 0x9b, 0xac, 0x59, 0xab, 0xc7, 0x9a, 0xed, - 0xc0, 0x34, 0x5d, 0xe9, 0xb7, 0x36, 0x23, 0x12, 0xee, 0x11, 0x97, 0x2d, 0xcc, 0xc2, 0xc3, 0x2d, - 0x4c, 0x65, 0xfb, 0x76, 0x33, 0x45, 0x10, 0x77, 0x35, 0x81, 0x5e, 0x91, 0xcf, 0x2f, 0x45, 0xc3, - 0xce, 0x9c, 0x3f, 0xad, 0x1c, 0x1e, 0xcc, 0x4f, 0x6b, 0x1f, 0xa2, 0x3f, 0xb7, 0xd8, 0x9f, 0x93, - 0xdf, 0xa8, 0x6c, 0x0c, 0x1b, 0x6a, 0xb1, 0xa4, 0x6c, 0x0c, 0xd5, 0x72, 0xc0, 0x09, 0x0e, 0xdd, - 0xa3, 0x3b, 0x41, 0x14, 0xa7, 0x6d, 0x0c, 0xaf, 0x07, 0x51, 0x8c, 0x19, 0xc4, 0x7e, 0x11, 0x60, - 0xe5, 0x3e, 0x69, 0xf0, 0xa5, 0xae, 0x5f, 0x67, 0xac, 0xfc, 0xeb, 0x8c, 0xfd, 0x5b, 0x16, 0x4c, - 0xae, 0x2e, 0x1b, 0x4a, 0xe4, 0x05, 0x00, 0x7e, 0x07, 0xbb, 0x7b, 0x77, 0x5d, 0x3e, 0xd0, 0xf3, - 0x37, 0x56, 0x55, 0x8a, 0x35, 0x0c, 0x74, 0x0e, 0x8a, 0xcd, 0x8e, 0x2f, 0x14, 0x9a, 0xa3, 0xf4, - 0xc0, 0xbe, 0xd9, 0xf1, 0x31, 0x2d, 0xd3, 0x9c, 0x1c, 0x8a, 0x03, 0x3b, 0x39, 0xf4, 0x0d, 0x36, - 0x80, 0xe6, 0x61, 0xf8, 0xde, 0x3d, 0xcf, 0xe5, 0x2e, 0x9d, 0xc2, 0x78, 0xe0, 0xee, 0xdd, 0x6a, - 0x25, 0xc2, 0xbc, 0xdc, 0xfe, 0x52, 0x11, 0xe6, 0x56, 0x9b, 0xe4, 0xfe, 0xbb, 0x74, 0x6b, 0x1d, - 0xd4, 0x45, 0xe3, 0x68, 0xaa, 0xa1, 0xa3, 0xba, 0xe1, 0xf4, 0x1f, 0x8f, 0x2d, 0x18, 0xe5, 0x26, - 0x76, 0xd2, 0xc9, 0xf5, 0xb5, 0xac, 0xd6, 0xf3, 0x07, 0x64, 0x81, 0x9b, 0xea, 0x09, 0x1f, 0x3d, - 0x75, 0xd2, 0x8a, 0x52, 0x2c, 0x89, 0xcf, 0x7d, 0x0c, 0xc6, 0x75, 0xcc, 0x23, 0x39, 0xc4, 0xfd, - 0xe5, 0x22, 0x4c, 0xd3, 0x1e, 0x3c, 0xd2, 0x89, 0xb8, 0xdd, 0x3d, 0x11, 0xc7, 0xed, 0x14, 0xd5, - 0x7f, 0x36, 0xde, 0x4a, 0xcf, 0xc6, 0xf3, 0x79, 0xb3, 0x71, 0xd2, 0x73, 0xf0, 0xed, 0x16, 0x9c, - 0x5a, 0x6d, 0x06, 0x8d, 0xdd, 0x94, 0xe3, 0xd2, 0xcb, 0x30, 0x46, 0xf9, 0x78, 0x64, 0xf8, 0xd4, - 0x1b, 0x51, 0x16, 0x04, 0x08, 0xeb, 0x78, 0x5a, 0xb5, 0xdb, 0xb7, 0xab, 0x95, 0xac, 0xe0, 0x0c, - 0x02, 0x84, 0x75, 0x3c, 0xfb, 0x37, 0x2c, 0xb8, 0x70, 0x6d, 0x79, 0x25, 0x59, 0x8a, 0x5d, 0xf1, - 0x21, 0x2e, 0xc3, 0x48, 0xdb, 0xd5, 0xba, 0x92, 0x28, 0x7c, 0x2b, 0xac, 0x17, 0x02, 0xfa, 0x5e, - 0x89, 0x7d, 0xf2, 0x13, 0x16, 0x9c, 0xba, 0xe6, 0xc5, 0xf4, 0x58, 0x4e, 0x47, 0x2a, 0xa0, 0xe7, - 0x72, 0xe4, 0xc5, 0x41, 0xb8, 0x9f, 0x8e, 0x54, 0x80, 0x15, 0x04, 0x6b, 0x58, 0xbc, 0xe5, 0x3d, - 0x8f, 0x19, 0x77, 0x17, 0xcc, 0xa7, 0x2f, 0x2c, 0xca, 0xb1, 0xc2, 0xa0, 0x1f, 0xe6, 0x7a, 0x21, - 0xd3, 0x1a, 0xee, 0x0b, 0x0e, 0xab, 0x3e, 0xac, 0x22, 0x01, 0x38, 0xc1, 0xa1, 0x17, 0xa8, 0xf9, - 0x6b, 0xcd, 0x4e, 0x14, 0x93, 0x70, 0x2b, 0xca, 0xe1, 0x8e, 0x2f, 0x42, 0x99, 0x48, 0x1d, 0xbd, - 0xe8, 0xb5, 0x12, 0x35, 0x95, 0xf2, 0x9e, 0x07, 0x4c, 0x50, 0x78, 0x03, 0xb8, 0x41, 0x1e, 0xcd, - 0x8f, 0x6d, 0x15, 0x10, 0xd1, 0xdb, 0xd2, 0x23, 0x48, 0x30, 0x57, 0xf4, 0x95, 0x2e, 0x28, 0xce, - 0xa8, 0x61, 0xff, 0xb0, 0x05, 0x67, 0xd4, 0x07, 0xbf, 0xe7, 0x3e, 0xd3, 0xfe, 0x99, 0x02, 0x4c, - 0x5c, 0xdf, 0xd8, 0xa8, 0x5d, 0x23, 0xb1, 0x38, 0xb6, 0xfb, 0xbf, 0xbc, 0x63, 0xed, 0x01, 0xb1, - 0xd7, 0x2d, 0xb0, 0x13, 0x7b, 0xcd, 0x05, 0x1e, 0x88, 0x68, 0xa1, 0xea, 0xc7, 0xb7, 0xc2, 0x7a, - 0x1c, 0x7a, 0xfe, 0x76, 0xe6, 0x93, 0xa3, 0x14, 0x2e, 0x8a, 0x79, 0xc2, 0x05, 0x7a, 0x11, 0x46, - 0x58, 0x24, 0x24, 0x39, 0x09, 0x8f, 0xab, 0x4b, 0x14, 0x2b, 0x3d, 0x3c, 0x98, 0x2f, 0xdf, 0xc6, - 0x55, 0xfe, 0x07, 0x0b, 0x54, 0x74, 0x1b, 0xc6, 0x76, 0xe2, 0xb8, 0x7d, 0x9d, 0x38, 0x2e, 0xbd, - 0x2d, 0x73, 0x76, 0x78, 0x31, 0x8b, 0x1d, 0xd2, 0x41, 0xe0, 0x68, 0x09, 0x07, 0x49, 0xca, 0x22, - 0xac, 0xd3, 0xb1, 0xeb, 0x00, 0x09, 0xec, 0x98, 0xde, 0x4e, 0xec, 0xdf, 0xb7, 0x60, 0x94, 0x07, - 0xa5, 0x08, 0xd1, 0xc7, 0x61, 0x88, 0xdc, 0x27, 0x0d, 0x21, 0x2a, 0x67, 0x76, 0x38, 0x91, 0xb4, - 0xb8, 0x0e, 0x98, 0xfe, 0xc7, 0xac, 0x16, 0xba, 0x0e, 0xa3, 0xb4, 0xb7, 0xd7, 0x54, 0x84, 0x8e, - 0x27, 0xf2, 0xbe, 0x58, 0x4d, 0x3b, 0x17, 0xce, 0x44, 0x11, 0x96, 0xd5, 0xd9, 0x83, 0x75, 0xa3, - 0x5d, 0xa7, 0x1c, 0x3b, 0xee, 0x25, 0x58, 0x6c, 0x2c, 0xd7, 0x38, 0x92, 0xa0, 0xc6, 0x1f, 0xac, - 0x65, 0x21, 0x4e, 0x88, 0xd8, 0x1b, 0x50, 0xa6, 0x93, 0xba, 0xd8, 0xf4, 0x9c, 0xde, 0x6f, 0xf0, - 0xcf, 0x40, 0x59, 0xbe, 0xb0, 0x47, 0xc2, 0x19, 0x9d, 0x51, 0x95, 0x0f, 0xf0, 0x11, 0x4e, 0xe0, - 0xf6, 0x16, 0x9c, 0x66, 0xf6, 0x92, 0x4e, 0xbc, 0x63, 0xec, 0xb1, 0xfe, 0x8b, 0xf9, 0x59, 0x71, - 0xf3, 0xe4, 0x33, 0x33, 0xab, 0xf9, 0x7b, 0x8e, 0x4b, 0x8a, 0xc9, 0x2d, 0xd4, 0xfe, 0xea, 0x10, - 0x3c, 0x5e, 0xad, 0xe7, 0xc7, 0x2b, 0x79, 0x15, 0xc6, 0xb9, 0x5c, 0x4a, 0x97, 0xb6, 0xd3, 0x14, - 0xed, 0x2a, 0xe5, 0xef, 0x86, 0x06, 0xc3, 0x06, 0x26, 0xba, 0x00, 0x45, 0xef, 0x6d, 0x3f, 0xed, - 0x0d, 0x55, 0x7d, 0x73, 0x1d, 0xd3, 0x72, 0x0a, 0xa6, 0x22, 0x2e, 0x3f, 0x3b, 0x14, 0x58, 0x89, - 0xb9, 0xaf, 0xc3, 0xa4, 0x17, 0x35, 0x22, 0xaf, 0xea, 0x53, 0x3e, 0xa3, 0x71, 0x2a, 0xa5, 0x15, - 0xa1, 0x9d, 0x56, 0x50, 0x9c, 0xc2, 0xd6, 0x0e, 0xb2, 0xe1, 0x81, 0xc5, 0xe4, 0xbe, 0xde, 0xd9, - 0xf4, 0x06, 0xd0, 0x66, 0x5f, 0x17, 0x31, 0x2d, 0xbe, 0xb8, 0x01, 0xf0, 0x0f, 0x8e, 0xb0, 0x84, - 0xd1, 0x2b, 0x67, 0x63, 0xc7, 0x69, 0x2f, 0x76, 0xe2, 0x9d, 0x8a, 0x17, 0x35, 0x82, 0x3d, 0x12, - 0xee, 0x33, 0x6d, 0x41, 0x29, 0xb9, 0x72, 0x2a, 0xc0, 0xf2, 0xf5, 0xc5, 0x1a, 0xc5, 0xc4, 0xdd, - 0x75, 0xd0, 0x22, 0x4c, 0xc9, 0xc2, 0x3a, 0x89, 0xd8, 0x11, 0x36, 0xc6, 0xc8, 0x28, 0xff, 0x24, - 0x51, 0xac, 0x88, 0xa4, 0xf1, 0x4d, 0x49, 0x1a, 0x8e, 0x43, 0x92, 0x7e, 0x05, 0x26, 0x3c, 0xdf, - 0x8b, 0x3d, 0x27, 0x0e, 0xf8, 0x13, 0x14, 0x57, 0x0c, 0x30, 0xdd, 0x7a, 0x55, 0x07, 0x60, 0x13, - 0xcf, 0xfe, 0x6f, 0x43, 0x30, 0xc3, 0xa6, 0xed, 0xfd, 0x15, 0xf6, 0xf5, 0xb4, 0xc2, 0x6e, 0x77, - 0xaf, 0xb0, 0xe3, 0xb8, 0x22, 0x3c, 0xf4, 0x32, 0xfb, 0x3c, 0x94, 0x95, 0x4b, 0x96, 0xf4, 0xc9, - 0xb4, 0x72, 0x7c, 0x32, 0xfb, 0x4b, 0x1f, 0xd2, 0xaa, 0xad, 0x98, 0x69, 0xd5, 0xf6, 0xb7, 0x2d, - 0x48, 0xde, 0x54, 0xd0, 0x75, 0x28, 0xb7, 0x03, 0x66, 0xac, 0x19, 0x4a, 0x0b, 0xe8, 0xc7, 0x33, - 0x0f, 0x2a, 0x7e, 0x28, 0xf2, 0x8f, 0xaf, 0xc9, 0x1a, 0x38, 0xa9, 0x8c, 0x96, 0x60, 0xb4, 0x1d, - 0x92, 0x7a, 0xcc, 0xc2, 0x96, 0xf4, 0xa5, 0xc3, 0xd7, 0x08, 0xc7, 0xc7, 0xb2, 0xa2, 0xfd, 0xb3, - 0x16, 0x00, 0x37, 0x1c, 0x73, 0xfc, 0x6d, 0x72, 0x02, 0xea, 0xee, 0x0a, 0x0c, 0x45, 0x6d, 0xd2, - 0xe8, 0x65, 0x46, 0x9b, 0xf4, 0xa7, 0xde, 0x26, 0x8d, 0x64, 0xc0, 0xe9, 0x3f, 0xcc, 0x6a, 0xdb, - 0xdf, 0x09, 0x30, 0x99, 0xa0, 0x55, 0x63, 0xd2, 0x42, 0xcf, 0x19, 0x61, 0x0c, 0xce, 0xa5, 0xc2, - 0x18, 0x94, 0x19, 0xb6, 0xa6, 0x59, 0xfd, 0x3c, 0x14, 0x5b, 0xce, 0x7d, 0xa1, 0x3a, 0x7b, 0xa6, - 0x77, 0x37, 0x28, 0xfd, 0x85, 0x35, 0xe7, 0x3e, 0xbf, 0x24, 0x3e, 0x23, 0x17, 0xc8, 0x9a, 0x73, - 0xff, 0x90, 0x1b, 0xcb, 0x32, 0x26, 0x75, 0xd3, 0x8b, 0xe2, 0x2f, 0xfc, 0xd7, 0xe4, 0x3f, 0x5b, - 0x76, 0xb4, 0x11, 0xd6, 0x96, 0xe7, 0x0b, 0x9b, 0xa8, 0x81, 0xda, 0xf2, 0xfc, 0x74, 0x5b, 0x9e, - 0x3f, 0x40, 0x5b, 0x9e, 0x8f, 0xde, 0x81, 0x51, 0x61, 0xb2, 0x28, 0xc2, 0x06, 0x5d, 0x1d, 0xa0, - 0x3d, 0x61, 0xf1, 0xc8, 0xdb, 0xbc, 0x2a, 0x2f, 0xc1, 0xa2, 0xb4, 0x6f, 0xbb, 0xb2, 0x41, 0xf4, - 0x37, 0x2c, 0x98, 0x14, 0xbf, 0x31, 0x79, 0xbb, 0x43, 0xa2, 0x58, 0xc8, 0x9e, 0x1f, 0x1d, 0xbc, - 0x0f, 0xa2, 0x22, 0xef, 0xca, 0x47, 0x25, 0x9b, 0x35, 0x81, 0x7d, 0x7b, 0x94, 0xea, 0x05, 0xfa, - 0x47, 0x16, 0x9c, 0x6e, 0x39, 0xf7, 0x79, 0x8b, 0xbc, 0x0c, 0x3b, 0xb1, 0x17, 0x88, 0xa7, 0xff, - 0x8f, 0x0f, 0x36, 0xfd, 0x5d, 0xd5, 0x79, 0x27, 0xe5, 0xfb, 0xe4, 0xe9, 0x2c, 0x94, 0xbe, 0x5d, - 0xcd, 0xec, 0xd7, 0xdc, 0x16, 0x94, 0xe4, 0x7a, 0xcb, 0x50, 0x35, 0x54, 0x74, 0xc1, 0xfa, 0xc8, - 0x16, 0xa3, 0x7a, 0x78, 0x00, 0xda, 0x8e, 0x58, 0x6b, 0x8f, 0xb4, 0x9d, 0xcf, 0xc3, 0xb8, 0xbe, - 0xc6, 0x1e, 0x69, 0x5b, 0x6f, 0xc3, 0xa9, 0x8c, 0xb5, 0xf4, 0x48, 0x9b, 0xbc, 0x07, 0xe7, 0x72, - 0xd7, 0xc7, 0xa3, 0x6c, 0xd8, 0xfe, 0x19, 0x4b, 0xe7, 0x83, 0x27, 0xf0, 0xe6, 0xb0, 0x6c, 0xbe, - 0x39, 0x5c, 0xec, 0xbd, 0x73, 0x72, 0x1e, 0x1e, 0xde, 0xd2, 0x3b, 0x4d, 0xb9, 0x3a, 0x7a, 0x03, - 0x46, 0x9a, 0xb4, 0x44, 0x1a, 0xbe, 0xda, 0xfd, 0x77, 0x64, 0x22, 0x4b, 0xb1, 0xf2, 0x08, 0x0b, - 0x0a, 0xf6, 0x2f, 0x58, 0x30, 0x74, 0x02, 0x23, 0x81, 0xcd, 0x91, 0x78, 0x2e, 0x97, 0xb4, 0x88, - 0x68, 0xbc, 0x80, 0x9d, 0x7b, 0x2b, 0xf7, 0x63, 0xe2, 0x47, 0xec, 0xaa, 0x98, 0x39, 0x30, 0xff, - 0x1f, 0x9c, 0xba, 0x19, 0x38, 0xee, 0x92, 0xd3, 0x74, 0xfc, 0x06, 0x09, 0xab, 0xfe, 0xf6, 0x91, - 0x8c, 0xb6, 0x0b, 0xfd, 0x8c, 0xb6, 0xed, 0x1d, 0x40, 0x7a, 0x03, 0xc2, 0xfb, 0x05, 0xc3, 0xa8, - 0xc7, 0x9b, 0x12, 0xc3, 0xff, 0x54, 0xb6, 0x68, 0xd6, 0xd5, 0x33, 0xcd, 0xaf, 0x83, 0x17, 0x60, - 0x49, 0xc8, 0x7e, 0x15, 0x32, 0x5d, 0xe8, 0xfb, 0xab, 0x0d, 0xec, 0x4f, 0xc1, 0x0c, 0xab, 0x79, - 0xc4, 0x2b, 0xad, 0x9d, 0xd2, 0x4a, 0x66, 0x04, 0xd7, 0xb3, 0xbf, 0x68, 0xc1, 0xd4, 0x7a, 0x2a, - 0xe6, 0xd8, 0x65, 0xf6, 0x00, 0x9a, 0xa1, 0x0c, 0xaf, 0xb3, 0x52, 0x2c, 0xa0, 0xc7, 0xae, 0x83, - 0xfa, 0x73, 0x0b, 0x92, 0xa8, 0x16, 0x27, 0x20, 0x78, 0x2d, 0x1b, 0x82, 0x57, 0xa6, 0x6e, 0x44, - 0x75, 0x27, 0x4f, 0xee, 0x42, 0x37, 0x54, 0xbc, 0xa7, 0x1e, 0x6a, 0x91, 0x84, 0x0c, 0x8f, 0x0e, - 0x34, 0x69, 0x06, 0x85, 0x92, 0x11, 0xa0, 0xec, 0xff, 0x5c, 0x00, 0xa4, 0x70, 0x07, 0x8e, 0x47, - 0xd5, 0x5d, 0xe3, 0x78, 0xe2, 0x51, 0xed, 0x01, 0x62, 0x4f, 0xf8, 0xa1, 0xe3, 0x47, 0x9c, 0xac, - 0x27, 0xb4, 0x6e, 0x47, 0xb3, 0x0f, 0x98, 0x13, 0x4d, 0xa2, 0x9b, 0x5d, 0xd4, 0x70, 0x46, 0x0b, - 0x9a, 0x69, 0xc6, 0xf0, 0xa0, 0xa6, 0x19, 0x23, 0x7d, 0x3c, 0xdc, 0x7e, 0xda, 0x82, 0x09, 0x35, - 0x4c, 0xef, 0x11, 0xfb, 0x73, 0xd5, 0x9f, 0x1c, 0xd6, 0x57, 0xd3, 0xba, 0xcc, 0x8e, 0x84, 0x6f, - 0x64, 0x9e, 0x8a, 0x4e, 0xd3, 0x7b, 0x87, 0xa8, 0x68, 0x80, 0xf3, 0xc2, 0xf3, 0x50, 0x94, 0x1e, - 0x1e, 0xcc, 0x4f, 0xa8, 0x7f, 0x3c, 0xfa, 0x70, 0x52, 0xc5, 0xfe, 0x31, 0xba, 0xd9, 0xcd, 0xa5, - 0x88, 0x5e, 0x86, 0xe1, 0xf6, 0x8e, 0x13, 0x91, 0x94, 0x9f, 0xce, 0x70, 0x8d, 0x16, 0x1e, 0x1e, - 0xcc, 0x4f, 0xaa, 0x0a, 0xac, 0x04, 0x73, 0xec, 0xc1, 0xa3, 0x7c, 0x75, 0x2f, 0xce, 0xbe, 0x51, - 0xbe, 0xfe, 0xd8, 0x82, 0xa1, 0xf5, 0xc0, 0x3d, 0x09, 0x16, 0xf0, 0xba, 0xc1, 0x02, 0xce, 0xe7, - 0x05, 0x86, 0xcf, 0xdd, 0xfd, 0xab, 0xa9, 0xdd, 0x7f, 0x31, 0x97, 0x42, 0xef, 0x8d, 0xdf, 0x82, - 0x31, 0x16, 0x6e, 0x5e, 0xf8, 0x24, 0xbd, 0x68, 0x6c, 0xf8, 0xf9, 0xd4, 0x86, 0x9f, 0xd2, 0x50, - 0xb5, 0x9d, 0xfe, 0x34, 0x8c, 0x0a, 0x27, 0x97, 0xb4, 0xc3, 0xa7, 0xc0, 0xc5, 0x12, 0x6e, 0xff, - 0x48, 0x11, 0x8c, 0xf0, 0xf6, 0xe8, 0x97, 0x2c, 0x58, 0x08, 0xb9, 0xf1, 0xab, 0x5b, 0xe9, 0x84, - 0x9e, 0xbf, 0x5d, 0x6f, 0xec, 0x10, 0xb7, 0xd3, 0xf4, 0xfc, 0xed, 0xea, 0xb6, 0x1f, 0xa8, 0xe2, - 0x95, 0xfb, 0xa4, 0xd1, 0x61, 0xcf, 0x57, 0x7d, 0x62, 0xe9, 0x2b, 0x23, 0xf2, 0x17, 0x1e, 0x1c, - 0xcc, 0x2f, 0xe0, 0x23, 0xd1, 0xc6, 0x47, 0xec, 0x0b, 0xfa, 0x0d, 0x0b, 0xae, 0xf2, 0xa8, 0xef, - 0x83, 0xf7, 0xbf, 0xc7, 0x3d, 0xb7, 0x26, 0x49, 0x25, 0x44, 0x36, 0x48, 0xd8, 0x5a, 0x7a, 0x45, - 0x0c, 0xe8, 0xd5, 0xda, 0xd1, 0xda, 0xc2, 0x47, 0xed, 0x9c, 0xfd, 0x2f, 0x8b, 0x30, 0x21, 0xa2, - 0x41, 0x89, 0x33, 0xe0, 0x65, 0x63, 0x49, 0x3c, 0x91, 0x5a, 0x12, 0x33, 0x06, 0xf2, 0xf1, 0xb0, - 0xff, 0x08, 0x66, 0x28, 0x73, 0xbe, 0x4e, 0x9c, 0x30, 0xde, 0x24, 0x0e, 0xb7, 0xb8, 0x2a, 0x1e, - 0x99, 0xfb, 0x2b, 0xc5, 0xda, 0xcd, 0x34, 0x31, 0xdc, 0x4d, 0xff, 0xeb, 0xe9, 0xcc, 0xf1, 0x61, - 0xba, 0x2b, 0xa0, 0xd7, 0xa7, 0xa1, 0xac, 0x3c, 0x34, 0x04, 0xd3, 0xe9, 0x1d, 0x17, 0x2f, 0x4d, - 0x81, 0x2b, 0xbf, 0x12, 0xef, 0xa0, 0x84, 0x9c, 0xfd, 0x8f, 0x0b, 0x46, 0x83, 0x7c, 0x12, 0xd7, - 0xa1, 0xe4, 0x44, 0x91, 0xb7, 0xed, 0x13, 0x57, 0xec, 0xd8, 0x0f, 0xe6, 0xed, 0x58, 0xa3, 0x19, - 0xe6, 0x25, 0xb3, 0x28, 0x6a, 0x62, 0x45, 0x03, 0x5d, 0xe7, 0x76, 0x6d, 0x7b, 0xf2, 0xa6, 0x36, - 0x18, 0x35, 0x90, 0x96, 0x6f, 0x7b, 0x04, 0x8b, 0xfa, 0xe8, 0x33, 0xdc, 0xf0, 0xf0, 0x86, 0x1f, - 0xdc, 0xf3, 0xaf, 0x05, 0x81, 0x8c, 0xb8, 0x30, 0x18, 0xc1, 0x19, 0x69, 0x6e, 0xa8, 0xaa, 0x63, - 0x93, 0xda, 0x60, 0x11, 0x32, 0xbf, 0x05, 0x4e, 0x51, 0xd2, 0xa6, 0x43, 0x74, 0x84, 0x08, 0x4c, - 0x89, 0x50, 0x63, 0xb2, 0x4c, 0x8c, 0x5d, 0xe6, 0x25, 0xcc, 0xac, 0x9d, 0x68, 0x80, 0x6f, 0x98, - 0x24, 0x70, 0x9a, 0xa6, 0xfd, 0xe3, 0x16, 0x30, 0xe7, 0xd0, 0x13, 0x90, 0x47, 0x3e, 0x61, 0xca, - 0x23, 0xb3, 0x79, 0x83, 0x9c, 0x23, 0x8a, 0xbc, 0xc4, 0x57, 0x56, 0x2d, 0x0c, 0xee, 0xef, 0x0b, - 0xa3, 0x8f, 0xfe, 0xf7, 0x0f, 0xfb, 0xff, 0x58, 0x9c, 0x89, 0x29, 0xff, 0x09, 0xf4, 0xad, 0x50, - 0x6a, 0x38, 0x6d, 0xa7, 0xc1, 0x73, 0xb1, 0xe4, 0xea, 0xe2, 0x8c, 0x4a, 0x0b, 0xcb, 0xa2, 0x06, - 0xd7, 0x2d, 0xc9, 0x90, 0x75, 0x25, 0x59, 0xdc, 0x57, 0x9f, 0xa4, 0x9a, 0x9c, 0xdb, 0x85, 0x09, - 0x83, 0xd8, 0x23, 0x55, 0x44, 0x7c, 0x2b, 0x3f, 0x62, 0x55, 0x88, 0xc5, 0x16, 0xcc, 0xf8, 0xda, - 0x7f, 0x7a, 0xa0, 0xc8, 0xcb, 0xe5, 0x07, 0xfb, 0x1d, 0xa2, 0xec, 0xf4, 0xd1, 0xfc, 0x4e, 0x53, - 0x64, 0x70, 0x37, 0x65, 0xfb, 0x47, 0x2d, 0x78, 0x4c, 0x47, 0xd4, 0x5c, 0x5b, 0xfa, 0x69, 0xf7, - 0x2b, 0x50, 0x0a, 0xda, 0x24, 0x74, 0xe2, 0x20, 0x14, 0xa7, 0xc6, 0x15, 0x39, 0xe8, 0xb7, 0x44, - 0xf9, 0xa1, 0x88, 0x64, 0x2e, 0xa9, 0xcb, 0x72, 0xac, 0x6a, 0xd2, 0xdb, 0x27, 0x1b, 0x8c, 0x48, - 0x38, 0x31, 0x31, 0x1e, 0xc0, 0x1e, 0xba, 0x23, 0x2c, 0x20, 0xf6, 0x57, 0x2d, 0xbe, 0xb0, 0xf4, - 0xae, 0xa3, 0xb7, 0x61, 0xba, 0xe5, 0xc4, 0x8d, 0x9d, 0x95, 0xfb, 0xed, 0x90, 0xbf, 0x95, 0xc8, - 0x71, 0x7a, 0xa6, 0xdf, 0x38, 0x69, 0x1f, 0x99, 0xd8, 0x52, 0xae, 0xa5, 0x88, 0xe1, 0x2e, 0xf2, - 0x68, 0x13, 0xc6, 0x58, 0x19, 0xf3, 0xcf, 0x8b, 0x7a, 0x89, 0x06, 0x79, 0xad, 0x29, 0x5b, 0x81, - 0xb5, 0x84, 0x0e, 0xd6, 0x89, 0xda, 0x3f, 0x55, 0xe4, 0xbb, 0x9d, 0x89, 0xf2, 0x4f, 0xc3, 0x68, - 0x3b, 0x70, 0x97, 0xab, 0x15, 0x2c, 0x66, 0x41, 0x1d, 0x23, 0x35, 0x5e, 0x8c, 0x25, 0x1c, 0x5d, - 0x81, 0x92, 0xf8, 0x29, 0xdf, 0xb6, 0x18, 0x6f, 0x16, 0x78, 0x11, 0x56, 0x50, 0xf4, 0x02, 0x40, - 0x3b, 0x0c, 0xf6, 0x3c, 0x97, 0xc5, 0x8d, 0x28, 0x9a, 0x66, 0x3e, 0x35, 0x05, 0xc1, 0x1a, 0x16, - 0x7a, 0x0d, 0x26, 0x3a, 0x7e, 0xc4, 0xc5, 0x11, 0x2d, 0x4a, 0xac, 0x32, 0x40, 0xb9, 0xad, 0x03, - 0xb1, 0x89, 0x8b, 0x16, 0x61, 0x24, 0x76, 0x98, 0xd9, 0xca, 0x70, 0xbe, 0xbd, 0xed, 0x06, 0xc5, - 0xd0, 0xd3, 0x7e, 0xd0, 0x0a, 0x58, 0x54, 0x44, 0x9f, 0x96, 0xae, 0xb2, 0x9c, 0xb1, 0x0b, 0x43, - 0xf7, 0xc1, 0x0e, 0x01, 0xcd, 0x51, 0x56, 0x18, 0xd0, 0x1b, 0xb4, 0xd0, 0xc7, 0x00, 0xc8, 0xfd, - 0x98, 0x84, 0xbe, 0xd3, 0x54, 0x56, 0x61, 0x4a, 0x2e, 0xa8, 0x04, 0xeb, 0x41, 0x7c, 0x3b, 0x22, - 0x2b, 0x0a, 0x03, 0x6b, 0xd8, 0xf6, 0x6f, 0x94, 0x01, 0x12, 0xb9, 0x1d, 0xbd, 0xd3, 0xc5, 0xb8, - 0x9e, 0xed, 0x2d, 0xe9, 0x1f, 0x1f, 0xd7, 0x42, 0xdf, 0x65, 0xc1, 0x98, 0xd3, 0x6c, 0x06, 0x0d, - 0x87, 0xc7, 0xf1, 0x2d, 0xf4, 0x66, 0x9c, 0xa2, 0xfd, 0xc5, 0xa4, 0x06, 0xef, 0xc2, 0x8b, 0x72, - 0x85, 0x6a, 0x90, 0xbe, 0xbd, 0xd0, 0x1b, 0x46, 0x1f, 0x91, 0x57, 0xc5, 0xa2, 0x31, 0x94, 0xea, - 0xaa, 0x58, 0x66, 0x67, 0x84, 0x7e, 0x4b, 0xbc, 0x6d, 0xdc, 0x12, 0x87, 0xf2, 0x7d, 0x01, 0x0d, - 0xf1, 0xb5, 0xdf, 0x05, 0x11, 0xd5, 0xf4, 0xb8, 0x00, 0xc3, 0xf9, 0x8e, 0x77, 0xda, 0x3d, 0xa9, - 0x4f, 0x4c, 0x80, 0xcf, 0xc3, 0x94, 0x6b, 0x0a, 0x01, 0x62, 0x25, 0x3e, 0x95, 0x47, 0x37, 0x25, - 0x33, 0x24, 0xc7, 0x7e, 0x0a, 0x80, 0xd3, 0x84, 0x51, 0x8d, 0x87, 0x89, 0xa8, 0xfa, 0x5b, 0x81, - 0x70, 0xb6, 0xb0, 0x73, 0xe7, 0x72, 0x3f, 0x8a, 0x49, 0x8b, 0x62, 0x26, 0xa7, 0xfb, 0xba, 0xa8, - 0x8b, 0x15, 0x15, 0xf4, 0x06, 0x8c, 0x30, 0xcf, 0xab, 0x68, 0xb6, 0x94, 0xaf, 0x2b, 0x36, 0xe3, - 0x9e, 0x25, 0x1b, 0x92, 0xfd, 0x8d, 0xb0, 0xa0, 0x80, 0xae, 0x4b, 0xbf, 0xc6, 0xa8, 0xea, 0xdf, - 0x8e, 0x08, 0xf3, 0x6b, 0x2c, 0x2f, 0x7d, 0x30, 0x71, 0x59, 0xe4, 0xe5, 0x99, 0xc9, 0xc1, 0x8c, - 0x9a, 0x54, 0x8a, 0x12, 0xff, 0x65, 0xce, 0xb1, 0x59, 0xc8, 0xef, 0x9e, 0x99, 0x97, 0x2c, 0x19, - 0xce, 0x3b, 0x26, 0x09, 0x9c, 0xa6, 0x49, 0x25, 0x52, 0xbe, 0xeb, 0x85, 0xbb, 0x46, 0x3f, 0xde, - 0xc1, 0x2f, 0xe2, 0xec, 0x34, 0xe2, 0x25, 0x58, 0xd4, 0x3f, 0x51, 0xf1, 0x60, 0xce, 0x87, 0xe9, - 0xf4, 0x16, 0x7d, 0xa4, 0xe2, 0xc8, 0xef, 0x0f, 0xc1, 0xa4, 0xb9, 0xa4, 0xd0, 0x55, 0x28, 0x0b, - 0x22, 0x2a, 0x4f, 0x80, 0xda, 0x25, 0x6b, 0x12, 0x80, 0x13, 0x1c, 0x96, 0x1e, 0x82, 0x55, 0xd7, - 0xcc, 0x6c, 0x93, 0xf4, 0x10, 0x0a, 0x82, 0x35, 0x2c, 0x7a, 0xb1, 0xda, 0x0c, 0x82, 0x58, 0x1d, - 0x48, 0x6a, 0xdd, 0x2d, 0xb1, 0x52, 0x2c, 0xa0, 0xf4, 0x20, 0xda, 0x25, 0xa1, 0x4f, 0x9a, 0x66, - 0x44, 0x61, 0x75, 0x10, 0xdd, 0xd0, 0x81, 0xd8, 0xc4, 0xa5, 0xc7, 0x69, 0x10, 0xb1, 0x85, 0x2c, - 0xae, 0x6f, 0x89, 0xd9, 0x72, 0x9d, 0xbb, 0x56, 0x4b, 0x38, 0xfa, 0x14, 0x3c, 0xa6, 0xa2, 0x26, - 0x61, 0xfe, 0x0e, 0x21, 0x5b, 0x1c, 0x31, 0xb4, 0x2d, 0x8f, 0x2d, 0x67, 0xa3, 0xe1, 0xbc, 0xfa, - 0xe8, 0x75, 0x98, 0x14, 0x22, 0xbe, 0xa4, 0x38, 0x6a, 0x9a, 0xc6, 0xdc, 0x30, 0xa0, 0x38, 0x85, - 0x2d, 0x63, 0x22, 0x33, 0x29, 0x5b, 0x52, 0x28, 0x75, 0xc7, 0x44, 0xd6, 0xe1, 0xb8, 0xab, 0x06, - 0x5a, 0x84, 0x29, 0x2e, 0x83, 0x79, 0xfe, 0x36, 0x9f, 0x13, 0xe1, 0x4d, 0xa5, 0xb6, 0xd4, 0x2d, - 0x13, 0x8c, 0xd3, 0xf8, 0xe8, 0x55, 0x18, 0x77, 0xc2, 0xc6, 0x8e, 0x17, 0x93, 0x46, 0xdc, 0x09, - 0xb9, 0x9b, 0x95, 0x66, 0x5b, 0xb4, 0xa8, 0xc1, 0xb0, 0x81, 0x69, 0xbf, 0x03, 0xa7, 0x32, 0x62, - 0x2e, 0xd0, 0x85, 0xe3, 0xb4, 0x3d, 0xf9, 0x4d, 0x29, 0x03, 0xe4, 0xc5, 0x5a, 0x55, 0x7e, 0x8d, - 0x86, 0x45, 0x57, 0x27, 0x8b, 0xcd, 0xa0, 0xa5, 0x18, 0x54, 0xab, 0x73, 0x55, 0x02, 0x70, 0x82, - 0x63, 0xff, 0xcf, 0x02, 0x4c, 0x65, 0xbc, 0xad, 0xb0, 0x34, 0x77, 0xa9, 0x4b, 0x4a, 0x92, 0xd5, - 0xce, 0x0c, 0xb1, 0x5d, 0x38, 0x42, 0x88, 0xed, 0x62, 0xbf, 0x10, 0xdb, 0x43, 0xef, 0x26, 0xc4, - 0xb6, 0x39, 0x62, 0xc3, 0x03, 0x8d, 0x58, 0x46, 0x58, 0xee, 0x91, 0x23, 0x86, 0xe5, 0x36, 0x06, - 0x7d, 0x74, 0x80, 0x41, 0xff, 0x81, 0x02, 0x4c, 0xa7, 0x6d, 0x20, 0x4f, 0x40, 0x6f, 0xfb, 0x86, - 0xa1, 0xb7, 0xcd, 0x4e, 0x1a, 0x99, 0xb6, 0xcc, 0xcc, 0xd3, 0xe1, 0xe2, 0x94, 0x0e, 0xf7, 0xc3, - 0x03, 0x51, 0xeb, 0xad, 0xcf, 0xfd, 0xbb, 0x05, 0x38, 0x93, 0xae, 0xb2, 0xdc, 0x74, 0xbc, 0xd6, - 0x09, 0x8c, 0xcd, 0x2d, 0x63, 0x6c, 0x9e, 0x1b, 0xe4, 0x6b, 0x58, 0xd7, 0x72, 0x07, 0xe8, 0x6e, - 0x6a, 0x80, 0xae, 0x0e, 0x4e, 0xb2, 0xf7, 0x28, 0x7d, 0xa5, 0x08, 0x17, 0x33, 0xeb, 0x25, 0x6a, - 0xcf, 0x55, 0x43, 0xed, 0xf9, 0x42, 0x4a, 0xed, 0x69, 0xf7, 0xae, 0x7d, 0x3c, 0x7a, 0x50, 0xe1, - 0x21, 0xcb, 0x02, 0x08, 0x3c, 0xa4, 0x0e, 0xd4, 0xf0, 0x90, 0x55, 0x84, 0xb0, 0x49, 0xf7, 0xeb, - 0x49, 0xf7, 0xf9, 0x6f, 0x2d, 0x38, 0x97, 0x39, 0x37, 0x27, 0xa0, 0xeb, 0x5a, 0x37, 0x75, 0x5d, - 0x4f, 0x0f, 0xbc, 0x5a, 0x73, 0x94, 0x5f, 0xbf, 0x36, 0x94, 0xf3, 0x2d, 0xec, 0x26, 0x7f, 0x0b, - 0xc6, 0x9c, 0x46, 0x83, 0x44, 0xd1, 0x5a, 0xe0, 0xaa, 0x28, 0xc2, 0xcf, 0xb1, 0x7b, 0x56, 0x52, - 0x7c, 0x78, 0x30, 0x3f, 0x97, 0x26, 0x91, 0x80, 0xb1, 0x4e, 0x01, 0x7d, 0x06, 0x4a, 0x91, 0x38, - 0x37, 0xc5, 0xdc, 0xbf, 0x38, 0xe0, 0xe0, 0x38, 0x9b, 0xa4, 0x69, 0x86, 0x39, 0x52, 0x9a, 0x0a, - 0x45, 0xd2, 0x0c, 0x89, 0x52, 0x38, 0xd6, 0x90, 0x28, 0x2f, 0x00, 0xec, 0xa9, 0xcb, 0x40, 0x5a, - 0xff, 0xa0, 0x5d, 0x13, 0x34, 0x2c, 0xf4, 0x4d, 0x30, 0x1d, 0xf1, 0x38, 0x80, 0xcb, 0x4d, 0x27, - 0x62, 0x6e, 0x2e, 0x62, 0x15, 0xb2, 0x50, 0x4a, 0xf5, 0x14, 0x0c, 0x77, 0x61, 0xa3, 0x55, 0xd9, - 0x2a, 0x0b, 0x5a, 0xc8, 0x17, 0xe6, 0xe5, 0xa4, 0x45, 0x91, 0x64, 0xf7, 0x74, 0x7a, 0xf8, 0xd9, - 0xc0, 0x6b, 0x35, 0xd1, 0x67, 0x00, 0xe8, 0xf2, 0x11, 0x7a, 0x88, 0xd1, 0x7c, 0xe6, 0x49, 0xb9, - 0x8a, 0x9b, 0x69, 0x95, 0xcb, 0x7c, 0x53, 0x2b, 0x8a, 0x08, 0xd6, 0x08, 0xda, 0x3f, 0x30, 0x04, - 0x8f, 0xf7, 0xe0, 0x91, 0x68, 0xd1, 0x7c, 0x87, 0x7d, 0x26, 0x7d, 0xb9, 0x9e, 0xcb, 0xac, 0x6c, - 0xdc, 0xb6, 0x53, 0x4b, 0xb1, 0xf0, 0xae, 0x97, 0xe2, 0xf7, 0x5a, 0x9a, 0xda, 0x83, 0xdb, 0x6a, - 0x7e, 0xe2, 0x88, 0xbc, 0xff, 0x18, 0xf5, 0x20, 0x5b, 0x19, 0xca, 0x84, 0x17, 0x06, 0xee, 0xce, - 0xc0, 0xda, 0x85, 0x93, 0xd5, 0x12, 0x7f, 0xc1, 0x82, 0x27, 0x32, 0xfb, 0x6b, 0x58, 0xe4, 0x5c, - 0x85, 0x72, 0x83, 0x16, 0x6a, 0xae, 0x88, 0x89, 0x8f, 0xb6, 0x04, 0xe0, 0x04, 0xc7, 0x30, 0xbc, - 0x29, 0xf4, 0x35, 0xbc, 0xf9, 0x65, 0x0b, 0xba, 0xf6, 0xc7, 0x09, 0x30, 0xea, 0xaa, 0xc9, 0xa8, - 0x3f, 0x38, 0xc8, 0x5c, 0xe6, 0xf0, 0xe8, 0x3f, 0x9a, 0x82, 0xb3, 0x39, 0xae, 0x38, 0x7b, 0x30, - 0xb3, 0xdd, 0x20, 0xa6, 0x93, 0xa7, 0xf8, 0x98, 0x4c, 0x7f, 0xd8, 0x9e, 0x1e, 0xa1, 0x2c, 0x63, - 0xe6, 0x4c, 0x17, 0x0a, 0xee, 0x6e, 0x02, 0x7d, 0xc1, 0x82, 0xd3, 0xce, 0xbd, 0xa8, 0x2b, 0xc5, - 0xbe, 0x58, 0x33, 0x2f, 0x65, 0x2a, 0x41, 0xfa, 0xa4, 0xe4, 0xe7, 0x29, 0x44, 0xb3, 0xb0, 0x70, - 0x66, 0x5b, 0x08, 0x8b, 0xb8, 0xf2, 0x54, 0x9c, 0xef, 0xe1, 0x86, 0x9c, 0xe5, 0x33, 0xc5, 0x4f, - 0x10, 0x09, 0xc1, 0x8a, 0x0e, 0xfa, 0x1c, 0x94, 0xb7, 0xa5, 0x23, 0x63, 0xc6, 0x09, 0x95, 0x0c, - 0x64, 0x6f, 0xf7, 0x4e, 0xfe, 0x92, 0xa9, 0x90, 0x70, 0x42, 0x14, 0xbd, 0x0e, 0x45, 0x7f, 0x2b, - 0xea, 0x95, 0x85, 0x33, 0x65, 0xb2, 0xc6, 0x9d, 0xfd, 0xd7, 0x57, 0xeb, 0x98, 0x56, 0x44, 0xd7, - 0xa1, 0x18, 0x6e, 0xba, 0x42, 0x83, 0x97, 0xc9, 0xc3, 0xf1, 0x52, 0x25, 0xa7, 0x57, 0x8c, 0x12, - 0x5e, 0xaa, 0x60, 0x4a, 0x02, 0xd5, 0x60, 0x98, 0xf9, 0xaf, 0x88, 0xf3, 0x20, 0x53, 0xf2, 0xed, - 0xe1, 0x07, 0xc6, 0x23, 0x02, 0x30, 0x04, 0xcc, 0x09, 0xa1, 0x0d, 0x18, 0x69, 0xb0, 0x8c, 0x8d, - 0x22, 0x1e, 0xd9, 0x47, 0x32, 0x75, 0x75, 0x3d, 0x52, 0x59, 0x0a, 0xd5, 0x15, 0xc3, 0xc0, 0x82, - 0x16, 0xa3, 0x4a, 0xda, 0x3b, 0x5b, 0x91, 0xc8, 0x30, 0x9c, 0x4d, 0xb5, 0x47, 0x86, 0x56, 0x41, - 0x95, 0x61, 0x60, 0x41, 0x0b, 0x7d, 0x0c, 0x0a, 0x5b, 0x0d, 0xe1, 0x9b, 0x92, 0xa9, 0xb4, 0x33, - 0xe3, 0x35, 0x2c, 0x8d, 0x3c, 0x38, 0x98, 0x2f, 0xac, 0x2e, 0xe3, 0xc2, 0x56, 0x03, 0xad, 0xc3, - 0xe8, 0x16, 0xf7, 0xf0, 0x16, 0x7a, 0xb9, 0xa7, 0xb2, 0x9d, 0xcf, 0xbb, 0x9c, 0xc0, 0xb9, 0x5b, - 0x86, 0x00, 0x60, 0x49, 0x84, 0x85, 0x69, 0x57, 0x9e, 0xea, 0x22, 0x74, 0xd7, 0xc2, 0xd1, 0xa2, - 0x0b, 0xf0, 0xf3, 0x39, 0xf1, 0x77, 0xc7, 0x1a, 0x45, 0xba, 0xaa, 0x1d, 0x99, 0xe6, 0x5d, 0x84, - 0x62, 0xc9, 0x5c, 0xd5, 0x7d, 0x32, 0xe0, 0xf3, 0x55, 0xad, 0x90, 0x70, 0x42, 0x14, 0xed, 0xc2, - 0xc4, 0x5e, 0xd4, 0xde, 0x21, 0x72, 0x4b, 0xb3, 0xc8, 0x2c, 0x39, 0x47, 0xd8, 0x1d, 0x81, 0xe8, - 0x85, 0x71, 0xc7, 0x69, 0x76, 0x71, 0x21, 0xf6, 0xfc, 0x7d, 0x47, 0x27, 0x86, 0x4d, 0xda, 0x74, - 0xf8, 0xdf, 0xee, 0x04, 0x9b, 0xfb, 0x31, 0x11, 0x11, 0xb7, 0x32, 0x87, 0xff, 0x4d, 0x8e, 0xd2, - 0x3d, 0xfc, 0x02, 0x80, 0x25, 0x11, 0x74, 0x47, 0x0c, 0x0f, 0xe3, 0x9e, 0xd3, 0xf9, 0x61, 0x31, - 0x17, 0x25, 0x52, 0xce, 0xa0, 0x30, 0x6e, 0x99, 0x90, 0x62, 0x5c, 0xb2, 0xbd, 0x13, 0xc4, 0x81, - 0x9f, 0xe2, 0xd0, 0x33, 0xf9, 0x5c, 0xb2, 0x96, 0x81, 0xdf, 0xcd, 0x25, 0xb3, 0xb0, 0x70, 0x66, - 0x5b, 0xc8, 0x85, 0xc9, 0x76, 0x10, 0xc6, 0xf7, 0x82, 0x50, 0xae, 0x2f, 0xd4, 0x43, 0xaf, 0x60, - 0x60, 0x8a, 0x16, 0x59, 0x30, 0x3b, 0x13, 0x82, 0x53, 0x34, 0xd1, 0x27, 0x61, 0x34, 0x6a, 0x38, - 0x4d, 0x52, 0xbd, 0x35, 0x7b, 0x2a, 0xff, 0xf8, 0xa9, 0x73, 0x94, 0x9c, 0xd5, 0xc5, 0x63, 0xba, - 0x73, 0x14, 0x2c, 0xc9, 0xa1, 0x55, 0x18, 0x66, 0x69, 0xb8, 0x58, 0x78, 0xb8, 0x9c, 0xe8, 0x9e, - 0x5d, 0x06, 0xc4, 0x9c, 0x37, 0xb1, 0x62, 0xcc, 0xab, 0xd3, 0x3d, 0x20, 0xc4, 0xeb, 0x20, 0x9a, - 0x3d, 0x93, 0xbf, 0x07, 0x84, 0x54, 0x7e, 0xab, 0xde, 0x6b, 0x0f, 0x28, 0x24, 0x9c, 0x10, 0xa5, - 0x9c, 0x99, 0x72, 0xd3, 0xb3, 0x3d, 0x2c, 0x5f, 0x72, 0x79, 0x29, 0xe3, 0xcc, 0x94, 0x93, 0x52, - 0x12, 0xf6, 0xef, 0x8e, 0x76, 0xcb, 0x2c, 0xec, 0x42, 0xf6, 0x1d, 0x56, 0xd7, 0x5b, 0xdd, 0x47, - 0x07, 0xd5, 0x0f, 0x1d, 0xa3, 0xb4, 0xfa, 0x05, 0x0b, 0xce, 0xb6, 0x33, 0x3f, 0x44, 0x08, 0x00, - 0x83, 0xa9, 0x99, 0xf8, 0xa7, 0xab, 0x50, 0x82, 0xd9, 0x70, 0x9c, 0xd3, 0x52, 0xfa, 0x46, 0x50, - 0x7c, 0xd7, 0x37, 0x82, 0x35, 0x28, 0x31, 0x21, 0xb3, 0x4f, 0x06, 0xe3, 0xf4, 0xc5, 0x88, 0x89, - 0x12, 0xcb, 0xa2, 0x22, 0x56, 0x24, 0xd0, 0xf7, 0x59, 0x70, 0x21, 0xdd, 0x75, 0x4c, 0x18, 0x58, - 0xc4, 0x1f, 0xe4, 0x77, 0xc1, 0x55, 0xf1, 0xfd, 0x17, 0x6a, 0xbd, 0x90, 0x0f, 0xfb, 0x21, 0xe0, - 0xde, 0x8d, 0xa1, 0x4a, 0xc6, 0x65, 0x74, 0xc4, 0x54, 0xc0, 0x0f, 0x70, 0x21, 0x7d, 0x09, 0xc6, - 0x5b, 0x41, 0xc7, 0x8f, 0x85, 0xa1, 0x8c, 0x78, 0xb4, 0x67, 0x8f, 0xd5, 0x6b, 0x5a, 0x39, 0x36, - 0xb0, 0x52, 0xd7, 0xd8, 0xd2, 0x43, 0x5f, 0x63, 0xdf, 0x82, 0x71, 0x5f, 0xb3, 0xec, 0x14, 0xf2, - 0xc0, 0xe5, 0xfc, 0xd8, 0xa1, 0xba, 0x1d, 0x28, 0xef, 0xa5, 0x5e, 0x82, 0x0d, 0x6a, 0x27, 0x7b, - 0x37, 0xfa, 0x49, 0x2b, 0x43, 0xa8, 0xe7, 0xb7, 0xe5, 0x8f, 0x9b, 0xb7, 0xe5, 0xcb, 0xe9, 0xdb, - 0x72, 0x97, 0xf2, 0xd5, 0xb8, 0x28, 0x0f, 0x9e, 0x1a, 0x65, 0xd0, 0x30, 0x81, 0x76, 0x13, 0x2e, - 0xf5, 0x3b, 0x96, 0x98, 0xc5, 0x94, 0xab, 0x9e, 0xda, 0x12, 0x8b, 0x29, 0xb7, 0x5a, 0xc1, 0x0c, - 0x32, 0x68, 0x1c, 0x19, 0xfb, 0x7f, 0x58, 0x50, 0xac, 0x05, 0xee, 0x09, 0x28, 0x93, 0x3f, 0x61, - 0x28, 0x93, 0x1f, 0xcf, 0x3e, 0x10, 0xdd, 0x5c, 0xd5, 0xf1, 0x4a, 0x4a, 0x75, 0x7c, 0x21, 0x8f, - 0x40, 0x6f, 0x45, 0xf1, 0x8f, 0x15, 0x61, 0xac, 0x16, 0xb8, 0xca, 0x5c, 0xf9, 0xd7, 0x1e, 0xc6, - 0x5c, 0x39, 0x37, 0xc0, 0xbf, 0x46, 0x99, 0x19, 0x5a, 0x49, 0x1f, 0xcb, 0xbf, 0x60, 0x56, 0xcb, - 0x77, 0x89, 0xb7, 0xbd, 0x13, 0x13, 0x37, 0xfd, 0x39, 0x27, 0x67, 0xb5, 0xfc, 0xdf, 0x2d, 0x98, - 0x4a, 0xb5, 0x8e, 0x9a, 0x30, 0xd1, 0xd4, 0x15, 0x93, 0x62, 0x9d, 0x3e, 0x94, 0x4e, 0x53, 0x58, - 0x7d, 0x6a, 0x45, 0xd8, 0x24, 0x8e, 0x16, 0x00, 0xd4, 0x4b, 0x9d, 0xd4, 0x80, 0x31, 0xa9, 0x5f, - 0x3d, 0xe5, 0x45, 0x58, 0xc3, 0x40, 0x2f, 0xc3, 0x58, 0x1c, 0xb4, 0x83, 0x66, 0xb0, 0xbd, 0x7f, - 0x83, 0xc8, 0xc8, 0x45, 0xca, 0x96, 0x6b, 0x23, 0x01, 0x61, 0x1d, 0xcf, 0xfe, 0x89, 0x22, 0xff, - 0x50, 0x3f, 0xf6, 0xde, 0x5f, 0x93, 0xef, 0xed, 0x35, 0xf9, 0x15, 0x0b, 0xa6, 0x69, 0xeb, 0xcc, - 0x5c, 0x44, 0x1e, 0xb6, 0x2a, 0x66, 0xb0, 0xd5, 0x23, 0x66, 0xf0, 0x65, 0xca, 0xbb, 0xdc, 0xa0, - 0x13, 0x0b, 0x0d, 0x9a, 0xc6, 0x9c, 0x68, 0x29, 0x16, 0x50, 0x81, 0x47, 0xc2, 0x50, 0xb8, 0xb8, - 0xe9, 0x78, 0x24, 0x0c, 0xb1, 0x80, 0xca, 0x90, 0xc2, 0x43, 0xd9, 0x21, 0x85, 0x79, 0x1c, 0x46, - 0x61, 0x58, 0x20, 0xc4, 0x1e, 0x2d, 0x0e, 0xa3, 0xb4, 0x38, 0x48, 0x70, 0xec, 0x9f, 0x29, 0xc2, - 0x78, 0x2d, 0x70, 0x93, 0xb7, 0xb2, 0x97, 0x8c, 0xb7, 0xb2, 0x4b, 0xa9, 0xb7, 0xb2, 0x69, 0x1d, - 0xf7, 0xfd, 0x97, 0xb1, 0xaf, 0xd5, 0xcb, 0xd8, 0xbf, 0xb0, 0xd8, 0xac, 0x55, 0xd6, 0xeb, 0xdc, - 0xfa, 0x08, 0x3d, 0x0f, 0x63, 0x8c, 0x21, 0x31, 0x9f, 0x4a, 0xf9, 0x80, 0xc4, 0x52, 0xe5, 0xac, - 0x27, 0xc5, 0x58, 0xc7, 0x41, 0x57, 0xa0, 0x14, 0x11, 0x27, 0x6c, 0xec, 0x28, 0x1e, 0x27, 0x5e, - 0x7b, 0x78, 0x19, 0x56, 0x50, 0xf4, 0x66, 0x12, 0x02, 0xb0, 0x98, 0xef, 0xa3, 0xa5, 0xf7, 0x87, - 0x6f, 0x91, 0xfc, 0xb8, 0x7f, 0xf6, 0x5d, 0x40, 0xdd, 0xf8, 0x03, 0xc4, 0xbe, 0x9a, 0x37, 0x63, - 0x5f, 0x95, 0xbb, 0xe2, 0x5e, 0xfd, 0x99, 0x05, 0x93, 0xb5, 0xc0, 0xa5, 0x5b, 0xf7, 0xeb, 0x69, - 0x9f, 0xea, 0xf1, 0x4f, 0x47, 0x7a, 0xc4, 0x3f, 0x7d, 0x12, 0x86, 0x6b, 0x81, 0x5b, 0xad, 0xf5, - 0xf2, 0x6d, 0xb6, 0xff, 0x9e, 0x05, 0xa3, 0xb5, 0xc0, 0x3d, 0x01, 0xe5, 0xfc, 0xc7, 0x4d, 0xe5, - 0xfc, 0x63, 0x39, 0xeb, 0x26, 0x47, 0x1f, 0xff, 0x77, 0x86, 0x60, 0x82, 0xf6, 0x33, 0xd8, 0x96, - 0x53, 0x69, 0x0c, 0x9b, 0x35, 0xc0, 0xb0, 0x51, 0x59, 0x38, 0x68, 0x36, 0x83, 0x7b, 0xe9, 0x69, - 0x5d, 0x65, 0xa5, 0x58, 0x40, 0xd1, 0xb3, 0x50, 0x6a, 0x87, 0x64, 0xcf, 0x0b, 0x84, 0x90, 0xa9, - 0x3d, 0x75, 0xd4, 0x44, 0x39, 0x56, 0x18, 0xf4, 0x72, 0x16, 0x79, 0x7e, 0x83, 0xd4, 0x49, 0x23, - 0xf0, 0x5d, 0xae, 0xbf, 0x2e, 0x8a, 0xb4, 0x01, 0x5a, 0x39, 0x36, 0xb0, 0xd0, 0x5d, 0x28, 0xb3, - 0xff, 0x8c, 0xed, 0x1c, 0x3d, 0x01, 0xa5, 0x48, 0x48, 0x26, 0x08, 0xe0, 0x84, 0x16, 0x7a, 0x01, - 0x20, 0x96, 0x11, 0xb2, 0x23, 0x11, 0xe7, 0x48, 0x09, 0xe4, 0x2a, 0x76, 0x76, 0x84, 0x35, 0x2c, - 0xf4, 0x0c, 0x94, 0x63, 0xc7, 0x6b, 0xde, 0xf4, 0x7c, 0x12, 0x31, 0xbd, 0x74, 0x51, 0xe6, 0x05, - 0x13, 0x85, 0x38, 0x81, 0x53, 0x81, 0x88, 0x05, 0x01, 0xe0, 0xe9, 0x6b, 0x4b, 0x0c, 0x9b, 0x09, - 0x44, 0x37, 0x55, 0x29, 0xd6, 0x30, 0xd0, 0x0e, 0x9c, 0xf7, 0x7c, 0x16, 0x62, 0x9f, 0xd4, 0x77, - 0xbd, 0xf6, 0xc6, 0xcd, 0xfa, 0x1d, 0x12, 0x7a, 0x5b, 0xfb, 0x4b, 0x4e, 0x63, 0x97, 0xf8, 0x32, - 0xb5, 0xe0, 0x07, 0x45, 0x17, 0xcf, 0x57, 0x7b, 0xe0, 0xe2, 0x9e, 0x94, 0xec, 0x57, 0xe1, 0x4c, - 0x2d, 0x70, 0x6b, 0x41, 0x18, 0xaf, 0x06, 0xe1, 0x3d, 0x27, 0x74, 0xe5, 0x4a, 0x99, 0x97, 0x59, - 0x48, 0x28, 0x2b, 0x1c, 0xe6, 0x8c, 0xc2, 0xc8, 0x85, 0xf5, 0x22, 0x13, 0xbe, 0x8e, 0xe8, 0x8c, - 0xd2, 0x60, 0x62, 0x80, 0xca, 0x37, 0x71, 0xcd, 0x89, 0x09, 0xba, 0xc5, 0xf2, 0xe8, 0x26, 0x27, - 0xa2, 0xa8, 0xfe, 0xb4, 0x96, 0x47, 0x37, 0x01, 0x66, 0x1e, 0xa1, 0x66, 0x7d, 0xfb, 0xaf, 0x0d, - 0x33, 0xe6, 0x98, 0xca, 0x59, 0x80, 0x3e, 0x0b, 0x93, 0x11, 0xb9, 0xe9, 0xf9, 0x9d, 0xfb, 0x52, - 0x27, 0xd0, 0xc3, 0x9d, 0xa8, 0xbe, 0xa2, 0x63, 0x72, 0xcd, 0xa2, 0x59, 0x86, 0x53, 0xd4, 0x50, - 0x0b, 0x26, 0xef, 0x79, 0xbe, 0x1b, 0xdc, 0x8b, 0x24, 0xfd, 0x52, 0xbe, 0x82, 0xf1, 0x2e, 0xc7, - 0x4c, 0xf5, 0xd1, 0x68, 0xee, 0xae, 0x41, 0x0c, 0xa7, 0x88, 0xd3, 0x05, 0x18, 0x76, 0xfc, 0xc5, - 0xe8, 0x76, 0x44, 0x42, 0x91, 0x11, 0x99, 0x2d, 0x40, 0x2c, 0x0b, 0x71, 0x02, 0xa7, 0x0b, 0x90, - 0xfd, 0xb9, 0x16, 0x06, 0x1d, 0x1e, 0xc7, 0x5e, 0x2c, 0x40, 0xac, 0x4a, 0xb1, 0x86, 0x41, 0x37, - 0x28, 0xfb, 0xb7, 0x1e, 0xf8, 0x38, 0x08, 0x62, 0xb9, 0xa5, 0x59, 0x0e, 0x4e, 0xad, 0x1c, 0x1b, - 0x58, 0x68, 0x15, 0x50, 0xd4, 0x69, 0xb7, 0x9b, 0xcc, 0x4e, 0xc1, 0x69, 0x32, 0x52, 0xfc, 0x8d, - 0xb8, 0xc8, 0xa3, 0x74, 0xd6, 0xbb, 0xa0, 0x38, 0xa3, 0x06, 0xe5, 0xd5, 0x5b, 0xa2, 0xab, 0xc3, - 0xac, 0xab, 0xfc, 0x31, 0xa2, 0xce, 0xfb, 0x29, 0x61, 0x68, 0x05, 0x46, 0xa3, 0xfd, 0xa8, 0x11, - 0x8b, 0x70, 0x63, 0x39, 0x69, 0x69, 0xea, 0x0c, 0x45, 0xcb, 0x8a, 0xc6, 0xab, 0x60, 0x59, 0x17, - 0x35, 0xe0, 0x94, 0xa0, 0xb8, 0xbc, 0xe3, 0xf8, 0x2a, 0xc9, 0x07, 0x37, 0xd7, 0x7c, 0xfe, 0xc1, - 0xc1, 0xfc, 0x29, 0xd1, 0xb2, 0x0e, 0x3e, 0x3c, 0x98, 0x3f, 0x5b, 0x0b, 0xdc, 0x0c, 0x08, 0xce, - 0xa2, 0x66, 0x7f, 0x2b, 0x93, 0x37, 0x58, 0x92, 0xde, 0xb8, 0x13, 0x12, 0xd4, 0x82, 0x89, 0x36, - 0x5b, 0xc6, 0x22, 0xfa, 0xbb, 0x58, 0x8b, 0x2f, 0x0d, 0xa8, 0x38, 0xb8, 0x47, 0xd9, 0xb4, 0x52, - 0xec, 0xb1, 0x1b, 0x59, 0x4d, 0x27, 0x87, 0x4d, 0xea, 0xf6, 0x57, 0xce, 0xb2, 0x13, 0xab, 0xce, - 0xb5, 0x01, 0xa3, 0xc2, 0x7a, 0x5b, 0x5c, 0x7d, 0xe6, 0xf2, 0xd5, 0x52, 0xc9, 0xb0, 0x09, 0x0b, - 0x70, 0x2c, 0xeb, 0xa2, 0xcf, 0xc0, 0x24, 0xbd, 0x49, 0x68, 0xd9, 0x2f, 0x4e, 0xe7, 0x7b, 0xd9, - 0x27, 0x49, 0x2f, 0xb4, 0xcc, 0x10, 0x7a, 0x65, 0x9c, 0x22, 0x86, 0xde, 0x64, 0x76, 0x06, 0x66, - 0x62, 0x8d, 0x3e, 0xa4, 0x75, 0x93, 0x02, 0x49, 0x56, 0x23, 0x92, 0x97, 0xb4, 0xc3, 0x7e, 0xb4, - 0x49, 0x3b, 0xd0, 0x4d, 0x98, 0x10, 0x99, 0x6a, 0xc5, 0xca, 0x2a, 0x1a, 0xda, 0xb2, 0x09, 0xac, - 0x03, 0x0f, 0xd3, 0x05, 0xd8, 0xac, 0x8c, 0xb6, 0xe1, 0x82, 0x96, 0x39, 0xe6, 0x5a, 0xe8, 0xb0, - 0x27, 0x6f, 0x8f, 0xb1, 0x3b, 0xed, 0x2c, 0x7d, 0xe2, 0xc1, 0xc1, 0xfc, 0x85, 0x8d, 0x5e, 0x88, - 0xb8, 0x37, 0x1d, 0x74, 0x0b, 0xce, 0x70, 0x1f, 0xd1, 0x0a, 0x71, 0xdc, 0xa6, 0xe7, 0xab, 0xc3, - 0x9a, 0x6f, 0xc9, 0x73, 0x0f, 0x0e, 0xe6, 0xcf, 0x2c, 0x66, 0x21, 0xe0, 0xec, 0x7a, 0xe8, 0xe3, - 0x50, 0x76, 0xfd, 0x48, 0x8c, 0xc1, 0x88, 0x91, 0x9c, 0xa7, 0x5c, 0x59, 0xaf, 0xab, 0xef, 0x4f, - 0xfe, 0xe0, 0xa4, 0x02, 0xda, 0xe6, 0x1a, 0x55, 0xa5, 0xc0, 0x18, 0xed, 0x8a, 0x6e, 0x93, 0x56, - 0x85, 0x19, 0x5e, 0x62, 0xfc, 0x29, 0x41, 0x19, 0x4f, 0x1b, 0x0e, 0x64, 0x06, 0x61, 0xf4, 0x06, - 0x20, 0x2a, 0xe1, 0x7b, 0x0d, 0xb2, 0xd8, 0x60, 0xa9, 0x05, 0x98, 0x02, 0xba, 0x64, 0xfa, 0x2d, - 0xd5, 0xbb, 0x30, 0x70, 0x46, 0x2d, 0x74, 0x9d, 0x1e, 0x39, 0x7a, 0xa9, 0xe0, 0x2a, 0x2a, 0x95, - 0x5a, 0x85, 0xb4, 0x43, 0xd2, 0x70, 0x62, 0xe2, 0x9a, 0x14, 0x71, 0xaa, 0x1e, 0x72, 0xe1, 0xbc, - 0xd3, 0x89, 0x03, 0xa6, 0xac, 0x36, 0x51, 0x37, 0x82, 0x5d, 0xe2, 0xb3, 0x77, 0xa2, 0xd2, 0xd2, - 0x25, 0x2a, 0x0d, 0x2c, 0xf6, 0xc0, 0xc3, 0x3d, 0xa9, 0x50, 0x29, 0x4e, 0xe5, 0x4e, 0x05, 0x33, - 0x68, 0x4f, 0x46, 0xfe, 0xd4, 0x97, 0x61, 0x6c, 0x27, 0x88, 0xe2, 0x75, 0x12, 0xdf, 0x0b, 0xc2, - 0x5d, 0x11, 0x7a, 0x31, 0x09, 0xd7, 0x9b, 0x80, 0xb0, 0x8e, 0x47, 0xaf, 0x69, 0xcc, 0x8a, 0xa1, - 0x5a, 0x61, 0x0f, 0xc8, 0xa5, 0x84, 0xc7, 0x5c, 0xe7, 0xc5, 0x58, 0xc2, 0x25, 0x6a, 0xb5, 0xb6, - 0xcc, 0x1e, 0x83, 0x53, 0xa8, 0xd5, 0xda, 0x32, 0x96, 0x70, 0xba, 0x5c, 0xa3, 0x1d, 0x27, 0x24, - 0xb5, 0x30, 0x68, 0x90, 0x48, 0x0b, 0x12, 0xfd, 0x38, 0x0f, 0x2c, 0x49, 0x97, 0x6b, 0x3d, 0x0b, - 0x01, 0x67, 0xd7, 0x43, 0xa4, 0x3b, 0x6b, 0xd2, 0x64, 0xbe, 0x16, 0xbf, 0x5b, 0xde, 0x18, 0x30, - 0x71, 0x92, 0x0f, 0xd3, 0x2a, 0x5f, 0x13, 0x0f, 0x25, 0x19, 0xcd, 0x4e, 0xb1, 0xb5, 0x3d, 0x78, - 0x1c, 0x4a, 0xf5, 0x2e, 0x52, 0x4d, 0x51, 0xc2, 0x5d, 0xb4, 0x8d, 0xb8, 0x4c, 0xd3, 0x7d, 0x93, - 0xe9, 0x5e, 0x85, 0x72, 0xd4, 0xd9, 0x74, 0x83, 0x96, 0xe3, 0xf9, 0xec, 0x31, 0x58, 0xbb, 0x2f, - 0xd4, 0x25, 0x00, 0x27, 0x38, 0x68, 0x15, 0x4a, 0x8e, 0x7c, 0xf4, 0x40, 0xf9, 0xe1, 0x3c, 0xd4, - 0x53, 0x07, 0xf7, 0x70, 0x97, 0xcf, 0x1c, 0xaa, 0x2e, 0x7a, 0x0d, 0x26, 0x84, 0x8f, 0xa3, 0x48, - 0x15, 0x78, 0xca, 0x74, 0x44, 0xa9, 0xeb, 0x40, 0x6c, 0xe2, 0xa2, 0xdb, 0x30, 0x16, 0x07, 0x4d, - 0xe6, 0x4d, 0x41, 0xc5, 0xb0, 0xb3, 0xf9, 0x21, 0xc1, 0x36, 0x14, 0x9a, 0xae, 0x6f, 0x54, 0x55, - 0xb1, 0x4e, 0x07, 0x6d, 0xf0, 0xf5, 0xce, 0x82, 0x25, 0x93, 0x68, 0xf6, 0xb1, 0xfc, 0x33, 0x49, - 0xc5, 0x54, 0x36, 0xb7, 0x83, 0xa8, 0x89, 0x75, 0x32, 0xe8, 0x1a, 0xcc, 0xb4, 0x43, 0x2f, 0x60, - 0x6b, 0x42, 0xbd, 0x77, 0xcd, 0x9a, 0x29, 0x5e, 0x6a, 0x69, 0x04, 0xdc, 0x5d, 0x87, 0xb9, 0xa8, - 0x8a, 0xc2, 0xd9, 0x73, 0x3c, 0x9b, 0x30, 0xbf, 0x7e, 0xf1, 0x32, 0xac, 0xa0, 0x68, 0x8d, 0x71, - 0x62, 0xae, 0x39, 0x98, 0x9d, 0xcb, 0x8f, 0x20, 0xa2, 0x6b, 0x18, 0xb8, 0x70, 0xa9, 0xfe, 0xe2, - 0x84, 0x02, 0x72, 0xb5, 0xb4, 0x73, 0x54, 0xa2, 0x8f, 0x66, 0xcf, 0xf7, 0x30, 0x25, 0x4b, 0x89, - 0xff, 0x89, 0x40, 0x60, 0x14, 0x47, 0x38, 0x45, 0x13, 0x7d, 0x13, 0x4c, 0x8b, 0x88, 0x65, 0xc9, - 0x30, 0x5d, 0x48, 0x6c, 0x54, 0x71, 0x0a, 0x86, 0xbb, 0xb0, 0x79, 0x10, 0x79, 0x67, 0xb3, 0x49, - 0x04, 0xeb, 0xbb, 0xe9, 0xf9, 0xbb, 0xd1, 0xec, 0x45, 0xc6, 0x1f, 0x44, 0x10, 0xf9, 0x34, 0x14, - 0x67, 0xd4, 0x40, 0x1b, 0x30, 0xdd, 0x0e, 0x09, 0x69, 0x31, 0x41, 0x5c, 0x9c, 0x67, 0xf3, 0xdc, - 0x43, 0x9b, 0xf6, 0xa4, 0x96, 0x82, 0x1d, 0x66, 0x94, 0xe1, 0x2e, 0x0a, 0xe8, 0x1e, 0x94, 0x82, - 0x3d, 0x12, 0xee, 0x10, 0xc7, 0x9d, 0xbd, 0xd4, 0xc3, 0x66, 0x5a, 0x1c, 0x6e, 0xb7, 0x04, 0x6e, - 0xea, 0x8d, 0x5c, 0x16, 0xf7, 0x7f, 0x23, 0x97, 0x8d, 0xa1, 0xef, 0xb7, 0xe0, 0x9c, 0x54, 0xab, - 0xd7, 0xdb, 0x74, 0xd4, 0x97, 0x03, 0x3f, 0x8a, 0x43, 0xee, 0x53, 0xfc, 0x44, 0xbe, 0x9f, 0xed, - 0x46, 0x4e, 0x25, 0xa5, 0xbc, 0x3c, 0x97, 0x87, 0x11, 0xe1, 0xfc, 0x16, 0xe7, 0xbe, 0x11, 0x66, - 0xba, 0x4e, 0xee, 0xa3, 0xe4, 0xb5, 0x98, 0xdb, 0x85, 0x09, 0x63, 0x74, 0x1e, 0xe9, 0xf3, 0xe8, - 0xbf, 0x19, 0x85, 0xb2, 0x7a, 0x3a, 0x43, 0x57, 0xcd, 0x17, 0xd1, 0x73, 0xe9, 0x17, 0xd1, 0x12, - 0xbd, 0x32, 0xeb, 0x8f, 0xa0, 0x1b, 0x19, 0x11, 0x9c, 0xf2, 0xf6, 0xe2, 0xe0, 0xae, 0xb9, 0x9a, - 0x26, 0xb4, 0x38, 0xf0, 0xd3, 0xea, 0x50, 0x4f, 0xe5, 0xea, 0x35, 0x98, 0xf1, 0x03, 0x26, 0x2e, - 0x12, 0x57, 0xca, 0x02, 0xec, 0xc8, 0x2f, 0xeb, 0x21, 0x11, 0x52, 0x08, 0xb8, 0xbb, 0x0e, 0x6d, - 0x90, 0x9f, 0xd9, 0x69, 0x6d, 0x2e, 0x3f, 0xd2, 0xb1, 0x80, 0xa2, 0x27, 0x61, 0xb8, 0x1d, 0xb8, - 0xd5, 0x9a, 0x10, 0x15, 0xb5, 0x1c, 0xa7, 0x6e, 0xb5, 0x86, 0x39, 0x0c, 0x2d, 0xc2, 0x08, 0xfb, - 0x11, 0xcd, 0x8e, 0xe7, 0xfb, 0xbe, 0xb3, 0x1a, 0x5a, 0xd6, 0x10, 0x56, 0x01, 0x8b, 0x8a, 0x4c, - 0xab, 0x44, 0xe5, 0x6b, 0xa6, 0x55, 0x1a, 0x7d, 0x48, 0xad, 0x92, 0x24, 0x80, 0x13, 0x5a, 0xe8, - 0x3e, 0x9c, 0x31, 0xee, 0x34, 0x7c, 0x89, 0x90, 0x48, 0xf8, 0xdf, 0x3e, 0xd9, 0xf3, 0x32, 0x23, - 0x9e, 0x62, 0x2f, 0x88, 0x4e, 0x9f, 0xa9, 0x66, 0x51, 0xc2, 0xd9, 0x0d, 0xa0, 0x26, 0xcc, 0x34, - 0xba, 0x5a, 0x2d, 0x0d, 0xde, 0xaa, 0x9a, 0xd0, 0xee, 0x16, 0xbb, 0x09, 0xa3, 0xd7, 0xa0, 0xf4, - 0x76, 0x10, 0x31, 0x36, 0x2b, 0xc4, 0x5b, 0xe9, 0xbc, 0x59, 0x7a, 0xf3, 0x56, 0x9d, 0x95, 0x1f, - 0x1e, 0xcc, 0x8f, 0xd5, 0x02, 0x57, 0xfe, 0xc5, 0xaa, 0x02, 0xfa, 0x6e, 0x0b, 0xe6, 0xba, 0x2f, - 0x4d, 0xaa, 0xd3, 0x13, 0x83, 0x77, 0xda, 0x16, 0x8d, 0xce, 0xad, 0xe4, 0x92, 0xc3, 0x3d, 0x9a, - 0xb2, 0x7f, 0x91, 0x3f, 0x9b, 0x8a, 0xc7, 0x15, 0x12, 0x75, 0x9a, 0x27, 0x91, 0x65, 0x71, 0xc5, - 0x78, 0xf7, 0x79, 0xe8, 0xa7, 0xf9, 0x5f, 0xb5, 0xd8, 0xd3, 0xfc, 0x06, 0x69, 0xb5, 0x9b, 0x4e, - 0x7c, 0x12, 0xbe, 0x7f, 0x6f, 0x42, 0x29, 0x16, 0xad, 0xf5, 0x4a, 0x0c, 0xa9, 0x75, 0x8a, 0x99, - 0x27, 0x28, 0x61, 0x53, 0x96, 0x62, 0x45, 0xc6, 0xfe, 0xa7, 0x7c, 0x06, 0x24, 0xe4, 0x04, 0xd4, - 0xeb, 0x15, 0x53, 0xbd, 0x3e, 0xdf, 0xe7, 0x0b, 0x72, 0xd4, 0xec, 0xff, 0xc4, 0xec, 0x37, 0x53, - 0xb2, 0xbc, 0xd7, 0x6d, 0x42, 0xec, 0x1f, 0xb4, 0xe0, 0x74, 0x96, 0x11, 0x25, 0xbd, 0x20, 0x70, - 0x15, 0x8f, 0xb2, 0x91, 0x51, 0x23, 0x78, 0x47, 0x94, 0x63, 0x85, 0x31, 0x70, 0xce, 0xa5, 0xa3, - 0xc5, 0x20, 0xbd, 0x05, 0x13, 0xb5, 0x90, 0x68, 0x07, 0xda, 0xeb, 0xdc, 0x99, 0x97, 0xf7, 0xe7, - 0xd9, 0x23, 0x3b, 0xf2, 0xda, 0x3f, 0x55, 0x80, 0xd3, 0xfc, 0x91, 0x7b, 0x71, 0x2f, 0xf0, 0xdc, - 0x5a, 0xe0, 0x8a, 0x7c, 0x59, 0x9f, 0x86, 0xf1, 0xb6, 0xa6, 0x97, 0xeb, 0x15, 0x4f, 0x4f, 0xd7, - 0xdf, 0x25, 0x9a, 0x04, 0xbd, 0x14, 0x1b, 0xb4, 0x90, 0x0b, 0xe3, 0x64, 0xcf, 0x6b, 0xa8, 0x97, - 0xd2, 0xc2, 0x91, 0x0f, 0x17, 0xd5, 0xca, 0x8a, 0x46, 0x07, 0x1b, 0x54, 0x1f, 0x41, 0x0a, 0x55, - 0xfb, 0x87, 0x2c, 0x78, 0x2c, 0x27, 0xfa, 0x1e, 0x6d, 0xee, 0x1e, 0x33, 0x27, 0x10, 0xd9, 0x18, - 0x55, 0x73, 0xdc, 0xc8, 0x00, 0x0b, 0x28, 0xfa, 0x24, 0x00, 0x37, 0x12, 0xa0, 0x37, 0xd4, 0x7e, - 0x61, 0xca, 0x8c, 0x08, 0x4b, 0x5a, 0xb0, 0x1c, 0x59, 0x1f, 0x6b, 0xb4, 0xec, 0x1f, 0x2f, 0xc2, - 0x30, 0xcf, 0x23, 0xbd, 0x0a, 0xa3, 0x3b, 0x3c, 0x8b, 0xc0, 0x20, 0x09, 0x0b, 0x12, 0xdd, 0x01, - 0x2f, 0xc0, 0xb2, 0x32, 0x5a, 0x83, 0x53, 0x3c, 0x0b, 0x43, 0xb3, 0x42, 0x9a, 0xce, 0xbe, 0x54, - 0x74, 0xf1, 0x0c, 0x86, 0x4a, 0xe1, 0x57, 0xed, 0x46, 0xc1, 0x59, 0xf5, 0xd0, 0xeb, 0x30, 0x49, - 0x2f, 0x1e, 0x41, 0x27, 0x96, 0x94, 0x78, 0xfe, 0x05, 0x75, 0xd3, 0xd9, 0x30, 0xa0, 0x38, 0x85, - 0x4d, 0xef, 0xbe, 0xed, 0x2e, 0x95, 0xde, 0x70, 0x72, 0xf7, 0x35, 0xd5, 0x78, 0x26, 0x2e, 0xb3, - 0x9e, 0xec, 0x30, 0x5b, 0xd1, 0x8d, 0x9d, 0x90, 0x44, 0x3b, 0x41, 0xd3, 0x65, 0x82, 0xd6, 0xb0, - 0x66, 0x3d, 0x99, 0x82, 0xe3, 0xae, 0x1a, 0x94, 0xca, 0x96, 0xe3, 0x35, 0x3b, 0x21, 0x49, 0xa8, - 0x8c, 0x98, 0x54, 0x56, 0x53, 0x70, 0xdc, 0x55, 0x83, 0xae, 0xa3, 0x33, 0xb5, 0x30, 0xa0, 0xcc, - 0x4b, 0x86, 0x14, 0x51, 0x26, 0xb1, 0xa3, 0xd2, 0xfb, 0xb1, 0x47, 0xf0, 0x2d, 0x61, 0x34, 0xc8, - 0x29, 0x18, 0xef, 0xe1, 0x75, 0xe1, 0xf7, 0x28, 0xa9, 0xa0, 0xe7, 0x61, 0x4c, 0xc4, 0xd6, 0x67, - 0x96, 0x9b, 0x7c, 0xea, 0xd8, 0xfb, 0x7d, 0x25, 0x29, 0xc6, 0x3a, 0x8e, 0xfd, 0x3d, 0x05, 0x38, - 0x95, 0x61, 0x7a, 0xcf, 0x59, 0xd5, 0xb6, 0x17, 0xc5, 0x2a, 0x4b, 0x9b, 0xc6, 0xaa, 0x78, 0x39, - 0x56, 0x18, 0x74, 0x3f, 0x70, 0x66, 0x98, 0x66, 0x80, 0xc2, 0xb4, 0x55, 0x40, 0x8f, 0x98, 0xef, - 0xec, 0x12, 0x0c, 0x75, 0x22, 0x22, 0xc3, 0xe6, 0x29, 0xfe, 0xcd, 0x9e, 0x75, 0x18, 0x84, 0x8a, - 0xc7, 0xdb, 0xea, 0x85, 0x44, 0x13, 0x8f, 0xf9, 0x1b, 0x09, 0x87, 0xd1, 0xce, 0xc5, 0xc4, 0x77, - 0xfc, 0x58, 0x08, 0xd1, 0x49, 0xfc, 0x27, 0x56, 0x8a, 0x05, 0xd4, 0xfe, 0x52, 0x11, 0xce, 0xe5, - 0x3a, 0xe3, 0xd0, 0xae, 0xb7, 0x02, 0xdf, 0x8b, 0x03, 0x65, 0x18, 0xc1, 0x63, 0x3e, 0x91, 0xf6, - 0xce, 0x9a, 0x28, 0xc7, 0x0a, 0x03, 0x5d, 0x86, 0x61, 0xa6, 0x74, 0xea, 0xca, 0x57, 0xb7, 0x54, - 0xe1, 0x41, 0x40, 0x38, 0x78, 0xe0, 0x5c, 0xa0, 0x4f, 0xc2, 0x50, 0x3b, 0x08, 0x9a, 0x69, 0xa6, - 0x45, 0xbb, 0x1b, 0x04, 0x4d, 0xcc, 0x80, 0xe8, 0x43, 0x62, 0xbc, 0x52, 0x96, 0x00, 0xd8, 0x71, - 0x83, 0x48, 0x1b, 0xb4, 0xa7, 0x61, 0x74, 0x97, 0xec, 0x87, 0x9e, 0xbf, 0x9d, 0xb6, 0x10, 0xb9, - 0xc1, 0x8b, 0xb1, 0x84, 0x9b, 0xa9, 0x87, 0x46, 0x8f, 0x3b, 0x89, 0x67, 0xa9, 0xef, 0x11, 0xf8, - 0xbd, 0x45, 0x98, 0xc2, 0x4b, 0x95, 0xf7, 0x27, 0xe2, 0x76, 0xf7, 0x44, 0x1c, 0x77, 0x12, 0xcf, - 0xfe, 0xb3, 0xf1, 0x73, 0x16, 0x4c, 0xb1, 0x08, 0xff, 0x22, 0x5a, 0x90, 0x17, 0xf8, 0x27, 0x20, - 0xe2, 0x3d, 0x09, 0xc3, 0x21, 0x6d, 0x34, 0x9d, 0xa8, 0x8e, 0xf5, 0x04, 0x73, 0x18, 0x3a, 0x0f, - 0x43, 0xac, 0x0b, 0x74, 0xf2, 0xc6, 0x79, 0x8e, 0x9f, 0x8a, 0x13, 0x3b, 0x98, 0x95, 0xb2, 0x10, - 0x18, 0x98, 0xb4, 0x9b, 0x1e, 0xef, 0x74, 0xf2, 0x24, 0xf8, 0xde, 0x08, 0x81, 0x91, 0xd9, 0xb5, - 0x77, 0x17, 0x02, 0x23, 0x9b, 0x64, 0xef, 0xeb, 0xd3, 0x1f, 0x16, 0xe0, 0x62, 0x66, 0xbd, 0x81, - 0x43, 0x60, 0xf4, 0xae, 0xfd, 0x28, 0x23, 0xc1, 0x17, 0x4f, 0xd0, 0xfe, 0x6e, 0x68, 0x50, 0x09, - 0x73, 0x78, 0x80, 0xc8, 0x14, 0x99, 0x43, 0xf6, 0x1e, 0x89, 0x4c, 0x91, 0xd9, 0xb7, 0x9c, 0xeb, - 0xdf, 0x9f, 0x17, 0x72, 0xbe, 0x85, 0x5d, 0x04, 0xaf, 0x50, 0x3e, 0xc3, 0x80, 0x91, 0x90, 0x98, - 0xc7, 0x39, 0x8f, 0xe1, 0x65, 0x58, 0x41, 0xd1, 0x22, 0x4c, 0xb5, 0x3c, 0x9f, 0x32, 0x9f, 0x7d, - 0x53, 0xf0, 0x53, 0x81, 0x83, 0xd6, 0x4c, 0x30, 0x4e, 0xe3, 0x23, 0x4f, 0x8b, 0x5a, 0x51, 0xc8, - 0x4f, 0xfd, 0x9c, 0xdb, 0xdb, 0x05, 0xf3, 0xb9, 0x54, 0x8d, 0x62, 0x46, 0x04, 0x8b, 0x35, 0xed, - 0xfe, 0x5f, 0x1c, 0xfc, 0xfe, 0x3f, 0x9e, 0x7d, 0xf7, 0x9f, 0x7b, 0x0d, 0x26, 0x1e, 0x5a, 0xe1, - 0x6b, 0x7f, 0xa5, 0x08, 0x8f, 0xf7, 0xd8, 0xf6, 0x9c, 0xd7, 0x1b, 0x73, 0xa0, 0xf1, 0xfa, 0xae, - 0x79, 0xa8, 0xc1, 0xe9, 0xad, 0x4e, 0xb3, 0xb9, 0xcf, 0x4c, 0xdc, 0x89, 0x2b, 0x31, 0x84, 0x4c, - 0x79, 0x5e, 0x66, 0x55, 0x5a, 0xcd, 0xc0, 0xc1, 0x99, 0x35, 0xa9, 0x40, 0x4f, 0x4f, 0x92, 0x7d, - 0x45, 0x2a, 0x25, 0xd0, 0x63, 0x1d, 0x88, 0x4d, 0x5c, 0x74, 0x0d, 0x66, 0x9c, 0x3d, 0xc7, 0xe3, - 0xa1, 0x3f, 0x25, 0x01, 0x2e, 0xd1, 0x2b, 0x3d, 0xdd, 0x62, 0x1a, 0x01, 0x77, 0xd7, 0x41, 0x6f, - 0x00, 0x0a, 0x44, 0xea, 0xfa, 0x6b, 0xc4, 0x17, 0xaf, 0x5a, 0x6c, 0xee, 0x8a, 0x09, 0x4b, 0xb8, - 0xd5, 0x85, 0x81, 0x33, 0x6a, 0xa5, 0xa2, 0x40, 0x8c, 0xe4, 0x47, 0x81, 0xe8, 0xcd, 0x17, 0xfb, - 0x26, 0x21, 0xf8, 0x2f, 0x16, 0x3d, 0xbe, 0xb8, 0x90, 0x6f, 0x06, 0x33, 0x7b, 0x8d, 0x59, 0x8d, - 0x71, 0x1d, 0x9e, 0x16, 0x90, 0xe1, 0x8c, 0x66, 0x35, 0x96, 0x00, 0xb1, 0x89, 0xcb, 0x17, 0x44, - 0x94, 0xf8, 0x01, 0x1a, 0x22, 0xbe, 0x88, 0xb8, 0xa2, 0x30, 0xd0, 0xa7, 0x60, 0xd4, 0xf5, 0xf6, - 0xbc, 0x28, 0x08, 0xc5, 0x4a, 0x3f, 0xe2, 0x73, 0x41, 0xc2, 0x07, 0x2b, 0x9c, 0x0c, 0x96, 0xf4, - 0xec, 0xef, 0x2d, 0xc0, 0x84, 0x6c, 0xf1, 0xcd, 0x4e, 0x10, 0x3b, 0x27, 0x70, 0x2c, 0x5f, 0x33, - 0x8e, 0xe5, 0x0f, 0xf5, 0x0a, 0x3b, 0xc3, 0xba, 0x94, 0x7b, 0x1c, 0xdf, 0x4a, 0x1d, 0xc7, 0x4f, - 0xf5, 0x27, 0xd5, 0xfb, 0x18, 0xfe, 0x67, 0x16, 0xcc, 0x18, 0xf8, 0x27, 0x70, 0x1a, 0xac, 0x9a, - 0xa7, 0xc1, 0x13, 0x7d, 0xbf, 0x21, 0xe7, 0x14, 0xf8, 0xce, 0x62, 0xaa, 0xef, 0x8c, 0xfb, 0xbf, - 0x0d, 0x43, 0x3b, 0x4e, 0xe8, 0xf6, 0x0a, 0xb3, 0xdd, 0x55, 0x69, 0xe1, 0xba, 0x13, 0x8a, 0x67, - 0xbd, 0x67, 0x55, 0xe6, 0x65, 0x27, 0xec, 0xff, 0xa4, 0xc7, 0x9a, 0x42, 0xaf, 0xc2, 0x48, 0xd4, - 0x08, 0xda, 0xca, 0x28, 0xfd, 0x12, 0xcf, 0xca, 0x4c, 0x4b, 0x0e, 0x0f, 0xe6, 0x91, 0xd9, 0x1c, - 0x2d, 0xc6, 0x02, 0x1f, 0x7d, 0x1a, 0x26, 0xd8, 0x2f, 0x65, 0x63, 0x53, 0xcc, 0x4f, 0xc9, 0x53, - 0xd7, 0x11, 0xb9, 0x01, 0x9a, 0x51, 0x84, 0x4d, 0x52, 0x73, 0xdb, 0x50, 0x56, 0x9f, 0xf5, 0x48, - 0xdf, 0xe3, 0xfe, 0x43, 0x11, 0x4e, 0x65, 0xac, 0x39, 0x14, 0x19, 0x33, 0xf1, 0xfc, 0x80, 0x4b, - 0xf5, 0x5d, 0xce, 0x45, 0xc4, 0x6e, 0x43, 0xae, 0x58, 0x5b, 0x03, 0x37, 0x7a, 0x3b, 0x22, 0xe9, - 0x46, 0x69, 0x51, 0xff, 0x46, 0x69, 0x63, 0x27, 0x36, 0xd4, 0xb4, 0x21, 0xd5, 0xd3, 0x47, 0x3a, - 0xa7, 0x7f, 0x52, 0x84, 0xd3, 0x59, 0x91, 0xb0, 0xd0, 0xb7, 0xa4, 0xd2, 0xb3, 0xbd, 0x34, 0x68, - 0x0c, 0x2d, 0x9e, 0xb3, 0x8d, 0xeb, 0x80, 0x97, 0x16, 0xcc, 0x84, 0x6d, 0x7d, 0x87, 0x59, 0xb4, - 0xc9, 0x7c, 0xdc, 0x43, 0x9e, 0x56, 0x4f, 0xb2, 0x8f, 0x8f, 0x0e, 0xdc, 0x01, 0x91, 0x8f, 0x2f, - 0x4a, 0xbd, 0xdf, 0xcb, 0xe2, 0xfe, 0xef, 0xf7, 0xb2, 0xe5, 0x39, 0x0f, 0xc6, 0xb4, 0xaf, 0x79, - 0xa4, 0x33, 0xbe, 0x4b, 0x4f, 0x2b, 0xad, 0xdf, 0x8f, 0x74, 0xd6, 0x7f, 0xc8, 0x82, 0x94, 0xc9, - 0xb5, 0x52, 0x8b, 0x59, 0xb9, 0x6a, 0xb1, 0x4b, 0x30, 0x14, 0x06, 0x4d, 0x92, 0xce, 0x86, 0x86, - 0x83, 0x26, 0xc1, 0x0c, 0x42, 0x31, 0xe2, 0x44, 0xd9, 0x31, 0xae, 0x5f, 0xe4, 0xc4, 0x15, 0xed, - 0x49, 0x18, 0x6e, 0x92, 0x3d, 0xd2, 0x4c, 0x27, 0xad, 0xb8, 0x49, 0x0b, 0x31, 0x87, 0xd9, 0x3f, - 0x37, 0x04, 0x17, 0x7a, 0x46, 0x89, 0xa0, 0xd7, 0xa1, 0x6d, 0x27, 0x26, 0xf7, 0x9c, 0xfd, 0x74, - 0x74, 0xf9, 0x6b, 0xbc, 0x18, 0x4b, 0x38, 0x73, 0x8a, 0xe1, 0x41, 0x62, 0x53, 0x4a, 0x44, 0x11, - 0x1b, 0x56, 0x40, 0x4d, 0xa5, 0x54, 0xf1, 0x38, 0x94, 0x52, 0x2f, 0x00, 0x44, 0x51, 0x93, 0x1b, - 0xbe, 0xb8, 0xc2, 0xdb, 0x26, 0x09, 0x26, 0x5c, 0xbf, 0x29, 0x20, 0x58, 0xc3, 0x42, 0x15, 0x98, - 0x6e, 0x87, 0x41, 0xcc, 0x75, 0xb2, 0x15, 0x6e, 0x1b, 0x36, 0x6c, 0x3a, 0xe8, 0xd7, 0x52, 0x70, - 0xdc, 0x55, 0x03, 0xbd, 0x0c, 0x63, 0xc2, 0x69, 0xbf, 0x16, 0x04, 0x4d, 0xa1, 0x06, 0x52, 0xe6, - 0x52, 0xf5, 0x04, 0x84, 0x75, 0x3c, 0xad, 0x1a, 0x53, 0xf4, 0x8e, 0x66, 0x56, 0xe3, 0xca, 0x5e, - 0x0d, 0x2f, 0x15, 0x15, 0xaf, 0x34, 0x50, 0x54, 0xbc, 0x44, 0x31, 0x56, 0x1e, 0xf8, 0x6d, 0x0b, - 0xfa, 0xaa, 0x92, 0x7e, 0x7a, 0x08, 0x4e, 0x89, 0x85, 0xf3, 0xa8, 0x97, 0xcb, 0xed, 0xee, 0xe5, - 0x72, 0x1c, 0xaa, 0xb3, 0xf7, 0xd7, 0xcc, 0x49, 0xaf, 0x99, 0xef, 0xb3, 0xc0, 0x14, 0xaf, 0xd0, - 0xff, 0x9f, 0x9b, 0x9e, 0xe3, 0xe5, 0x5c, 0x71, 0xcd, 0x95, 0x07, 0xc8, 0xbb, 0x4c, 0xd4, 0x61, - 0xff, 0x27, 0x0b, 0x9e, 0xe8, 0x4b, 0x11, 0xad, 0x40, 0x99, 0xc9, 0x80, 0xda, 0xed, 0xec, 0x29, - 0x65, 0x3b, 0x2a, 0x01, 0x39, 0x22, 0x69, 0x52, 0x13, 0xad, 0x74, 0xe5, 0x41, 0x79, 0x3a, 0x23, - 0x0f, 0xca, 0x19, 0x63, 0x78, 0x1e, 0x32, 0x11, 0xca, 0x1f, 0x14, 0x61, 0x84, 0xaf, 0xf8, 0x13, - 0xb8, 0x86, 0x3d, 0x03, 0x65, 0xaf, 0xd5, 0xea, 0xf0, 0x6c, 0x12, 0xc3, 0xdc, 0xb3, 0x92, 0x0e, - 0x4d, 0x55, 0x16, 0xe2, 0x04, 0x8e, 0x56, 0x85, 0x92, 0xb7, 0x47, 0x8c, 0x3e, 0xde, 0xf1, 0x85, - 0x8a, 0x13, 0x3b, 0x5c, 0xa6, 0x50, 0x47, 0x5b, 0xa2, 0x0e, 0x46, 0x9f, 0x05, 0x88, 0xe2, 0xd0, - 0xf3, 0xb7, 0x69, 0x99, 0x88, 0xde, 0xf8, 0xe1, 0x1e, 0xd4, 0xea, 0x0a, 0x99, 0xd3, 0x4c, 0xb6, - 0xb9, 0x02, 0x60, 0x8d, 0x22, 0x5a, 0x30, 0x0e, 0xd7, 0xb9, 0x94, 0x96, 0x14, 0x38, 0xd5, 0xe4, - 0xa8, 0x9d, 0x7b, 0x05, 0xca, 0x8a, 0x78, 0x3f, 0x95, 0xcf, 0xb8, 0x2e, 0x89, 0x7c, 0x02, 0xa6, - 0x52, 0x7d, 0x3b, 0x92, 0xc6, 0xe8, 0xe7, 0x2d, 0x98, 0xe2, 0x9d, 0x59, 0xf1, 0xf7, 0x04, 0x03, - 0x7e, 0x07, 0x4e, 0x37, 0x33, 0x18, 0xa1, 0x98, 0xfe, 0xc1, 0x19, 0xa7, 0xd2, 0x10, 0x65, 0x41, - 0x71, 0x66, 0x1b, 0xe8, 0x0a, 0x5d, 0xe4, 0x94, 0xd1, 0x39, 0x4d, 0xe1, 0x68, 0x39, 0xce, 0x17, - 0x38, 0x2f, 0xc3, 0x0a, 0x6a, 0xff, 0xb6, 0x05, 0x33, 0xbc, 0xe7, 0x37, 0xc8, 0xbe, 0x62, 0x07, - 0x5f, 0xcb, 0xbe, 0x8b, 0x3c, 0x46, 0x85, 0x9c, 0x3c, 0x46, 0xfa, 0xa7, 0x15, 0x7b, 0x7e, 0xda, - 0x4f, 0x59, 0x20, 0x56, 0xc8, 0x09, 0xdc, 0xfb, 0xbf, 0xd1, 0xbc, 0xf7, 0xcf, 0xe5, 0x6f, 0x82, - 0x9c, 0x0b, 0xff, 0x9f, 0x59, 0x30, 0xcd, 0x11, 0x92, 0x07, 0xea, 0xaf, 0xe9, 0x3c, 0x0c, 0x92, - 0xed, 0xf4, 0x06, 0xd9, 0xdf, 0x08, 0x6a, 0x4e, 0xbc, 0x93, 0xfd, 0x51, 0xc6, 0x64, 0x0d, 0xf5, - 0x9c, 0x2c, 0x57, 0x6e, 0xa0, 0x23, 0xa4, 0x50, 0x3e, 0x72, 0x98, 0x7f, 0xfb, 0xab, 0x16, 0x20, - 0xde, 0x8c, 0x21, 0x2b, 0x51, 0x09, 0x84, 0x95, 0x6a, 0x67, 0x4b, 0xc2, 0x9a, 0x14, 0x04, 0x6b, - 0x58, 0xc7, 0x32, 0x3c, 0x29, 0x2b, 0x83, 0x62, 0x7f, 0x2b, 0x83, 0x23, 0x8c, 0xe8, 0x1f, 0x0c, - 0x43, 0xda, 0x5d, 0x04, 0xdd, 0x81, 0xf1, 0x86, 0xd3, 0x76, 0x36, 0xbd, 0xa6, 0x17, 0x7b, 0x24, - 0xea, 0x65, 0x9e, 0xb4, 0xac, 0xe1, 0x89, 0x77, 0x61, 0xad, 0x04, 0x1b, 0x74, 0xd0, 0x02, 0x40, - 0x3b, 0xf4, 0xf6, 0xbc, 0x26, 0xd9, 0x66, 0xea, 0x09, 0xe6, 0xda, 0xcd, 0x6d, 0x6e, 0x64, 0x29, - 0xd6, 0x30, 0x32, 0x7c, 0x67, 0x8b, 0x8f, 0xd8, 0x77, 0x16, 0x4e, 0xcc, 0x77, 0x76, 0xe8, 0x48, - 0xbe, 0xb3, 0xa5, 0x23, 0xfb, 0xce, 0x0e, 0x0f, 0xe4, 0x3b, 0x8b, 0xe1, 0xac, 0x14, 0xf7, 0xe8, - 0xff, 0x55, 0xaf, 0x49, 0x84, 0x8c, 0xcf, 0xfd, 0xd1, 0xe7, 0x1e, 0x1c, 0xcc, 0x9f, 0xc5, 0x99, - 0x18, 0x38, 0xa7, 0x26, 0xfa, 0x24, 0xcc, 0x3a, 0xcd, 0x66, 0x70, 0x4f, 0x4d, 0xea, 0x4a, 0xd4, - 0x70, 0x9a, 0x5c, 0xef, 0x3f, 0xca, 0xa8, 0x9e, 0x7f, 0x70, 0x30, 0x3f, 0xbb, 0x98, 0x83, 0x83, - 0x73, 0x6b, 0xa3, 0x8f, 0x43, 0xb9, 0x1d, 0x06, 0x8d, 0x35, 0xcd, 0xa7, 0xed, 0x22, 0x1d, 0xc0, - 0x9a, 0x2c, 0x3c, 0x3c, 0x98, 0x9f, 0x50, 0x7f, 0xd8, 0x81, 0x9f, 0x54, 0xb0, 0x77, 0xe1, 0x54, - 0x9d, 0x84, 0x1e, 0x4b, 0x88, 0xec, 0x26, 0xfc, 0x63, 0x03, 0xca, 0x61, 0x8a, 0x63, 0x0e, 0x14, - 0xd7, 0x4e, 0x8b, 0x87, 0x2e, 0x39, 0x64, 0x42, 0xc8, 0xfe, 0xdf, 0x16, 0x8c, 0x0a, 0xf7, 0x8d, - 0x13, 0x90, 0xea, 0x16, 0x0d, 0xe5, 0xfa, 0x7c, 0xf6, 0xa9, 0xc2, 0x3a, 0x93, 0xab, 0x56, 0xaf, - 0xa6, 0xd4, 0xea, 0x4f, 0xf4, 0x22, 0xd2, 0x5b, 0xa1, 0xfe, 0xb7, 0x8a, 0x30, 0x69, 0xfa, 0xf9, - 0x9d, 0xc0, 0x10, 0xac, 0xc3, 0x68, 0x24, 0x1c, 0xd9, 0x0a, 0xf9, 0xe6, 0xdb, 0xe9, 0x49, 0x4c, - 0x4c, 0xbb, 0x84, 0xeb, 0x9a, 0x24, 0x92, 0xe9, 0x21, 0x57, 0x7c, 0x84, 0x1e, 0x72, 0xfd, 0x5c, - 0x2d, 0x87, 0x8e, 0xc3, 0xd5, 0xd2, 0xfe, 0x32, 0x3b, 0xd9, 0xf4, 0xf2, 0x13, 0x10, 0x7a, 0xae, - 0x99, 0x67, 0xa0, 0xdd, 0x63, 0x65, 0x89, 0x4e, 0xe5, 0x08, 0x3f, 0x3f, 0x6b, 0xc1, 0x85, 0x8c, - 0xaf, 0xd2, 0x24, 0xa1, 0x67, 0xa1, 0xe4, 0x74, 0x5c, 0x4f, 0xed, 0x65, 0xed, 0x89, 0x6d, 0x51, - 0x94, 0x63, 0x85, 0x81, 0x96, 0x61, 0x86, 0xdc, 0x6f, 0x7b, 0xfc, 0x75, 0x51, 0xb7, 0xbf, 0x2c, - 0xf2, 0x58, 0xdf, 0x2b, 0x69, 0x20, 0xee, 0xc6, 0x57, 0xe1, 0x27, 0x8a, 0xb9, 0xe1, 0x27, 0xfe, - 0xa1, 0x05, 0x63, 0xca, 0x95, 0xeb, 0x91, 0x8f, 0xf6, 0x37, 0x99, 0xa3, 0xfd, 0x78, 0x8f, 0xd1, - 0xce, 0x19, 0xe6, 0xdf, 0x2a, 0xa8, 0xfe, 0xd6, 0x82, 0x30, 0x1e, 0x40, 0xc2, 0x7a, 0x15, 0x4a, - 0xed, 0x30, 0x88, 0x83, 0x46, 0xd0, 0x14, 0x02, 0xd6, 0xf9, 0x24, 0x0e, 0x0b, 0x2f, 0x3f, 0xd4, - 0x7e, 0x63, 0x85, 0x4d, 0x65, 0x1b, 0xa7, 0xdd, 0x96, 0x00, 0x69, 0x96, 0xc5, 0xa2, 0x94, 0x26, - 0xc5, 0x58, 0xc7, 0x61, 0x03, 0x1e, 0x84, 0xb1, 0x90, 0x83, 0x92, 0x01, 0x0f, 0xc2, 0x18, 0x33, - 0x08, 0x72, 0x01, 0x62, 0x27, 0xdc, 0x26, 0x31, 0x2d, 0x13, 0xa1, 0xa2, 0xf2, 0xf9, 0x4d, 0x27, - 0xf6, 0x9a, 0x0b, 0x9e, 0x1f, 0x47, 0x71, 0xb8, 0x50, 0xf5, 0xe3, 0x5b, 0x21, 0xbf, 0xe2, 0x69, - 0xb1, 0x58, 0x14, 0x2d, 0xac, 0xd1, 0x95, 0x6e, 0xcb, 0xac, 0x8d, 0x61, 0xf3, 0x7d, 0x7f, 0x5d, - 0x94, 0x63, 0x85, 0x61, 0xbf, 0xc2, 0x4e, 0x1f, 0x36, 0xa6, 0x47, 0x0b, 0x5e, 0xf2, 0x8b, 0x65, - 0x35, 0x1b, 0xec, 0x71, 0xaf, 0xa2, 0x87, 0x48, 0xe9, 0xcd, 0xec, 0x69, 0xc3, 0xba, 0x0b, 0x53, - 0x12, 0x47, 0x05, 0x7d, 0x73, 0x97, 0xcd, 0xc6, 0x73, 0x7d, 0x4e, 0x8d, 0x23, 0x58, 0x69, 0xb0, - 0x94, 0x05, 0x2c, 0xa0, 0x7b, 0xb5, 0x26, 0xf6, 0x85, 0x96, 0xb2, 0x40, 0x00, 0x70, 0x82, 0x83, - 0xae, 0x8a, 0x0b, 0x3c, 0x57, 0x7d, 0x3f, 0x9e, 0xba, 0xc0, 0xcb, 0xcf, 0xd7, 0x94, 0xe5, 0xcf, - 0xc3, 0x98, 0x4a, 0xd8, 0x59, 0xe3, 0x79, 0x20, 0xc5, 0xb2, 0x59, 0x49, 0x8a, 0xb1, 0x8e, 0x83, - 0x36, 0x60, 0x2a, 0xe2, 0xaa, 0x24, 0x15, 0x1f, 0x95, 0xab, 0xe4, 0x3e, 0x2c, 0x0d, 0x5d, 0xea, - 0x26, 0xf8, 0x90, 0x15, 0x71, 0x6e, 0x23, 0x5d, 0x85, 0xd3, 0x24, 0xd0, 0xeb, 0x30, 0xd9, 0x0c, - 0x1c, 0x77, 0xc9, 0x69, 0x3a, 0x7e, 0x83, 0x7d, 0x6f, 0xc9, 0xcc, 0xfb, 0x76, 0xd3, 0x80, 0xe2, - 0x14, 0x36, 0x15, 0x96, 0xf4, 0x12, 0x11, 0xd3, 0xd7, 0xf1, 0xb7, 0x49, 0x24, 0xd2, 0x2f, 0x32, - 0x61, 0xe9, 0x66, 0x0e, 0x0e, 0xce, 0xad, 0x8d, 0x5e, 0x85, 0x71, 0xf9, 0xf9, 0x9a, 0x67, 0x7d, - 0x62, 0xdb, 0xaf, 0xc1, 0xb0, 0x81, 0x89, 0xee, 0xc1, 0x19, 0xf9, 0x7f, 0x23, 0x74, 0xb6, 0xb6, - 0xbc, 0x86, 0x70, 0x37, 0xe5, 0x8e, 0x77, 0x8b, 0xd2, 0x3b, 0x6c, 0x25, 0x0b, 0xe9, 0xf0, 0x60, - 0xfe, 0x92, 0x18, 0xb5, 0x4c, 0x38, 0x9b, 0xc4, 0x6c, 0xfa, 0x68, 0x0d, 0x4e, 0xed, 0x10, 0xa7, - 0x19, 0xef, 0x2c, 0xef, 0x90, 0xc6, 0xae, 0xdc, 0x44, 0xcc, 0x5f, 0x5f, 0xb3, 0x88, 0xbf, 0xde, - 0x8d, 0x82, 0xb3, 0xea, 0xa1, 0xb7, 0x60, 0xb6, 0xdd, 0xd9, 0x6c, 0x7a, 0xd1, 0xce, 0x7a, 0x10, - 0x33, 0x6b, 0x17, 0x95, 0xff, 0x53, 0x38, 0xf6, 0xab, 0x88, 0x08, 0xb5, 0x1c, 0x3c, 0x9c, 0x4b, - 0x01, 0xbd, 0x03, 0x67, 0x52, 0x8b, 0x41, 0xb8, 0x36, 0x4f, 0xe6, 0x47, 0x48, 0xaf, 0x67, 0x55, - 0x10, 0x51, 0x02, 0xb2, 0x40, 0x38, 0xbb, 0x09, 0xf4, 0x12, 0x94, 0xbc, 0xf6, 0xaa, 0xd3, 0xf2, - 0x9a, 0xfb, 0x2c, 0xc4, 0x7b, 0x99, 0x85, 0x3d, 0x2f, 0x55, 0x6b, 0xbc, 0xec, 0x50, 0xfb, 0x8d, - 0x15, 0x26, 0xbd, 0x22, 0x68, 0x81, 0x2c, 0xa3, 0xd9, 0xe9, 0xc4, 0x98, 0x57, 0x8b, 0x76, 0x19, - 0x61, 0x03, 0xeb, 0xdd, 0xd9, 0x48, 0xbd, 0x4d, 0x2b, 0x6b, 0x32, 0x23, 0xfa, 0x1c, 0x8c, 0xeb, - 0x2b, 0x56, 0x9c, 0x7f, 0x97, 0xb3, 0x45, 0x2a, 0x6d, 0x65, 0x73, 0x89, 0x53, 0xad, 0x5e, 0x1d, - 0x86, 0x0d, 0x8a, 0x36, 0x81, 0xec, 0xb1, 0x44, 0x37, 0xa1, 0xd4, 0x68, 0x7a, 0xc4, 0x8f, 0xab, - 0xb5, 0x5e, 0x31, 0x98, 0x96, 0x05, 0x8e, 0x98, 0x1c, 0x11, 0xbe, 0x9a, 0x97, 0x61, 0x45, 0xc1, - 0xfe, 0x95, 0x02, 0xcc, 0xf7, 0x89, 0x85, 0x9e, 0x52, 0xe5, 0x5b, 0x03, 0xa9, 0xf2, 0x17, 0x65, - 0xe6, 0xd4, 0xf5, 0x94, 0xca, 0x22, 0x95, 0x15, 0x35, 0x51, 0x5c, 0xa4, 0xf1, 0x07, 0x36, 0xad, - 0xd6, 0x5f, 0x03, 0x86, 0xfa, 0x3a, 0x07, 0x18, 0xaf, 0x80, 0xc3, 0x83, 0xdf, 0x93, 0x72, 0x5f, - 0x74, 0xec, 0x2f, 0x17, 0xe0, 0x8c, 0x1a, 0xc2, 0xaf, 0xdf, 0x81, 0xbb, 0xdd, 0x3d, 0x70, 0xc7, - 0xf0, 0x1e, 0x66, 0xdf, 0x82, 0x11, 0x1e, 0x54, 0x6a, 0x00, 0xf9, 0xec, 0x49, 0x33, 0xfe, 0xa2, - 0x12, 0x09, 0x8c, 0x18, 0x8c, 0xdf, 0x6d, 0xc1, 0xd4, 0xc6, 0x72, 0xad, 0x1e, 0x34, 0x76, 0x49, - 0xbc, 0xc8, 0xe5, 0x69, 0x2c, 0x64, 0x2d, 0xeb, 0x21, 0x65, 0xa8, 0x2c, 0xe9, 0xec, 0x12, 0x0c, - 0xed, 0x04, 0x51, 0x9c, 0x7e, 0x2c, 0xbf, 0x1e, 0x44, 0x31, 0x66, 0x10, 0xfb, 0x77, 0x2c, 0x18, - 0x66, 0xb9, 0xc2, 0xfb, 0x65, 0xab, 0x1f, 0xe4, 0xbb, 0xd0, 0xcb, 0x30, 0x42, 0xb6, 0xb6, 0x48, - 0x23, 0x16, 0xb3, 0x2a, 0xbd, 0x9b, 0x47, 0x56, 0x58, 0x29, 0x15, 0x30, 0x58, 0x63, 0xfc, 0x2f, - 0x16, 0xc8, 0xe8, 0x2e, 0x94, 0x63, 0xaf, 0x45, 0x16, 0x5d, 0x57, 0x3c, 0x37, 0x3e, 0x84, 0x87, - 0xf6, 0x86, 0x24, 0x80, 0x13, 0x5a, 0xf6, 0x97, 0x0a, 0x00, 0x49, 0xb4, 0x8f, 0x7e, 0x9f, 0xb8, - 0xd4, 0xf5, 0x10, 0x75, 0x39, 0xe3, 0x21, 0x0a, 0x25, 0x04, 0x33, 0x5e, 0xa1, 0xd4, 0x30, 0x15, - 0x07, 0x1a, 0xa6, 0xa1, 0xa3, 0x0c, 0xd3, 0x32, 0xcc, 0x24, 0xd1, 0x4a, 0xcc, 0x60, 0x4d, 0xec, - 0x0e, 0xb5, 0x91, 0x06, 0xe2, 0x6e, 0x7c, 0x9b, 0xc0, 0x25, 0x15, 0xb4, 0x41, 0x9c, 0x35, 0xcc, - 0x9a, 0x55, 0x7f, 0xd8, 0xeb, 0x33, 0x4e, 0xc9, 0x4b, 0x5b, 0x21, 0xf7, 0xa5, 0xed, 0x47, 0x2d, - 0x38, 0x9d, 0x6e, 0x87, 0xb9, 0x17, 0x7e, 0xd1, 0x82, 0x33, 0xec, 0xbd, 0x91, 0xb5, 0xda, 0xfd, - 0xba, 0xf9, 0x52, 0xcf, 0x40, 0x14, 0x39, 0x3d, 0x4e, 0xdc, 0xe8, 0xd7, 0xb2, 0x48, 0xe3, 0xec, - 0x16, 0xed, 0xff, 0x58, 0x80, 0xd9, 0xbc, 0x08, 0x16, 0xcc, 0xd8, 0xdd, 0xb9, 0x5f, 0xdf, 0x25, - 0xf7, 0x84, 0x49, 0x71, 0x62, 0xec, 0xce, 0x8b, 0xb1, 0x84, 0xa7, 0xc3, 0x5b, 0x17, 0x06, 0x0b, - 0x6f, 0x8d, 0x76, 0x60, 0xe6, 0xde, 0x0e, 0xf1, 0x6f, 0xfb, 0x91, 0x13, 0x7b, 0xd1, 0x96, 0xc7, - 0x1e, 0x0a, 0xf9, 0xba, 0xf9, 0x98, 0x34, 0xfc, 0xbd, 0x9b, 0x46, 0x38, 0x3c, 0x98, 0xbf, 0x60, - 0x14, 0x24, 0x5d, 0xe6, 0x8c, 0x04, 0x77, 0x13, 0xed, 0x8e, 0x0e, 0x3e, 0xf4, 0x08, 0xa3, 0x83, - 0xdb, 0x5f, 0xb4, 0xe0, 0x5c, 0x6e, 0xf6, 0x3e, 0x74, 0x05, 0x4a, 0x4e, 0xdb, 0xe3, 0xba, 0x56, - 0xc1, 0x46, 0x99, 0xce, 0xa0, 0x56, 0xe5, 0x9a, 0x56, 0x05, 0x55, 0x59, 0x85, 0x0b, 0xb9, 0x59, - 0x85, 0xfb, 0x26, 0x09, 0xb6, 0xbf, 0xcb, 0x02, 0xe1, 0xa8, 0x37, 0x00, 0xef, 0xfe, 0xb4, 0x4c, - 0xca, 0x6e, 0x64, 0x10, 0xb9, 0x94, 0xef, 0xb9, 0x28, 0xf2, 0x86, 0x28, 0x59, 0xc9, 0xc8, 0x16, - 0x62, 0xd0, 0xb2, 0x5d, 0x10, 0xd0, 0x0a, 0x61, 0x9a, 0xca, 0xfe, 0xbd, 0x79, 0x01, 0xc0, 0x65, - 0xb8, 0x5a, 0x6a, 0x66, 0x75, 0x32, 0x57, 0x14, 0x04, 0x6b, 0x58, 0xf6, 0xbf, 0x2b, 0xc0, 0x98, - 0xcc, 0x58, 0xd1, 0xf1, 0x07, 0xd1, 0x27, 0x1c, 0x29, 0x85, 0x1d, 0xcb, 0x65, 0x4e, 0x09, 0xd7, - 0x12, 0x35, 0x4c, 0x92, 0xcb, 0x5c, 0x02, 0x70, 0x82, 0x43, 0x77, 0x51, 0xd4, 0xd9, 0x64, 0xe8, - 0x29, 0xb7, 0xb2, 0x3a, 0x2f, 0xc6, 0x12, 0x8e, 0x3e, 0x09, 0xd3, 0xbc, 0x5e, 0x18, 0xb4, 0x9d, - 0x6d, 0xae, 0xc4, 0x1e, 0x56, 0xfe, 0xe0, 0xd3, 0x6b, 0x29, 0xd8, 0xe1, 0xc1, 0xfc, 0xe9, 0x74, - 0x19, 0x7b, 0x9d, 0xe9, 0xa2, 0xc2, 0xcc, 0x43, 0x78, 0x23, 0x74, 0xf7, 0x77, 0x59, 0x95, 0x24, - 0x20, 0xac, 0xe3, 0xd9, 0x9f, 0x03, 0xd4, 0x9d, 0xbb, 0x03, 0xbd, 0xc1, 0x6d, 0x02, 0xbd, 0x90, - 0xb8, 0xbd, 0x5e, 0x6b, 0x74, 0xaf, 0x67, 0xe9, 0x11, 0xc2, 0x6b, 0x61, 0x55, 0xdf, 0xfe, 0xab, - 0x45, 0x98, 0x4e, 0xfb, 0xc0, 0xa2, 0xeb, 0x30, 0xc2, 0x45, 0x0f, 0x41, 0xbe, 0x87, 0x31, 0x80, - 0xe6, 0x39, 0xcb, 0x98, 0xb0, 0x90, 0x5e, 0x44, 0x7d, 0xf4, 0x16, 0x8c, 0xb9, 0xc1, 0x3d, 0xff, - 0x9e, 0x13, 0xba, 0x8b, 0xb5, 0xaa, 0x58, 0xce, 0x99, 0xb7, 0xa5, 0x4a, 0x82, 0xa6, 0x7b, 0xe3, - 0xb2, 0x87, 0xaf, 0x04, 0x84, 0x75, 0x72, 0x68, 0x83, 0x85, 0x1a, 0xde, 0xf2, 0xb6, 0xd7, 0x9c, - 0x76, 0x2f, 0x03, 0xf1, 0x65, 0x89, 0xa4, 0x51, 0x9e, 0x10, 0xf1, 0x88, 0x39, 0x00, 0x27, 0x84, - 0xd0, 0xb7, 0xc0, 0xa9, 0x28, 0x47, 0x27, 0x9b, 0x97, 0xca, 0xa9, 0x97, 0x9a, 0x72, 0xe9, 0x31, - 0x7a, 0x8f, 0xcd, 0xd2, 0xde, 0x66, 0x35, 0x63, 0xff, 0xea, 0x29, 0x30, 0x36, 0xb1, 0x91, 0xd9, - 0xcf, 0x3a, 0xa6, 0xcc, 0x7e, 0x18, 0x4a, 0xa4, 0xd5, 0x8e, 0xf7, 0x2b, 0x5e, 0xd8, 0x2b, 0x35, - 0xec, 0x8a, 0xc0, 0xe9, 0xa6, 0x29, 0x21, 0x58, 0xd1, 0xc9, 0x4e, 0xbf, 0x58, 0xfc, 0x1a, 0xa6, - 0x5f, 0x1c, 0x3a, 0xc1, 0xf4, 0x8b, 0xeb, 0x30, 0xba, 0xed, 0xc5, 0x98, 0xb4, 0x03, 0x21, 0xf4, - 0x67, 0xae, 0xc3, 0x6b, 0x1c, 0xa5, 0x3b, 0xd1, 0x97, 0x00, 0x60, 0x49, 0x04, 0xbd, 0xa1, 0x76, - 0xe0, 0x48, 0xfe, 0x9d, 0xb9, 0xfb, 0xd5, 0x3a, 0x73, 0x0f, 0x8a, 0x24, 0x8b, 0xa3, 0x0f, 0x9b, - 0x64, 0x71, 0x55, 0xa6, 0x46, 0x2c, 0xe5, 0x7b, 0x73, 0xb0, 0xcc, 0x87, 0x7d, 0x12, 0x22, 0xde, - 0xd1, 0xd3, 0x49, 0x96, 0xf3, 0x39, 0x81, 0xca, 0x14, 0x39, 0x60, 0x12, 0xc9, 0xef, 0xb2, 0xe0, - 0x4c, 0x3b, 0x2b, 0xb3, 0xaa, 0x78, 0xe0, 0x7d, 0x79, 0xe0, 0xd4, 0xb1, 0x46, 0x83, 0x4c, 0x51, - 0x93, 0x89, 0x86, 0xb3, 0x9b, 0xa3, 0x03, 0x1d, 0x6e, 0xba, 0x22, 0x0b, 0xe2, 0x93, 0x39, 0xd9, - 0x28, 0x7b, 0xe4, 0xa0, 0xdc, 0xc8, 0xc8, 0x7c, 0xf8, 0xc1, 0xbc, 0xcc, 0x87, 0x03, 0xe7, 0x3b, - 0x7c, 0x43, 0xe5, 0xa1, 0x9c, 0xc8, 0x5f, 0x4a, 0x3c, 0xcb, 0x64, 0xdf, 0xec, 0x93, 0x6f, 0xa8, - 0xec, 0x93, 0x3d, 0xe2, 0x54, 0xf2, 0xdc, 0x92, 0x7d, 0x73, 0x4e, 0x6a, 0x79, 0x23, 0xa7, 0x8e, - 0x27, 0x6f, 0xa4, 0x71, 0xd4, 0xf0, 0xd4, 0x85, 0xcf, 0xf4, 0x39, 0x6a, 0x0c, 0xba, 0xbd, 0x0f, - 0x1b, 0x9e, 0x23, 0x73, 0xe6, 0xa1, 0x72, 0x64, 0xde, 0xd1, 0x73, 0x4e, 0xa2, 0x3e, 0x49, 0x15, - 0x29, 0xd2, 0x80, 0x99, 0x26, 0xef, 0xe8, 0x07, 0xe0, 0xa9, 0x7c, 0xba, 0xea, 0x9c, 0xeb, 0xa6, - 0x9b, 0x79, 0x04, 0x76, 0x65, 0xb0, 0x3c, 0x7d, 0x32, 0x19, 0x2c, 0xcf, 0x1c, 0x7b, 0x06, 0xcb, - 0xb3, 0x27, 0x90, 0xc1, 0xf2, 0xb1, 0x13, 0xcc, 0x60, 0x79, 0x87, 0x59, 0x45, 0xf0, 0x70, 0x27, - 0x22, 0xae, 0x66, 0x76, 0x0c, 0xc7, 0xac, 0x98, 0x28, 0xfc, 0xe3, 0x14, 0x08, 0x27, 0xa4, 0x32, - 0x32, 0x63, 0xce, 0x3e, 0x82, 0xcc, 0x98, 0xeb, 0x49, 0x66, 0xcc, 0x73, 0xf9, 0x53, 0x9d, 0x61, - 0xba, 0x9e, 0x93, 0x0f, 0xf3, 0x8e, 0x9e, 0xc7, 0xf2, 0xf1, 0x1e, 0xaa, 0xf8, 0x2c, 0xc5, 0x63, - 0x8f, 0xec, 0x95, 0xaf, 0xf3, 0xec, 0x95, 0xe7, 0xf3, 0x39, 0x79, 0xfa, 0xb8, 0x33, 0x73, 0x56, - 0x7e, 0x4f, 0x01, 0x2e, 0xf6, 0xde, 0x17, 0x89, 0xd6, 0xb3, 0x96, 0xbc, 0x08, 0xa6, 0xb4, 0x9e, - 0xfc, 0x6e, 0x95, 0x60, 0x0d, 0x1c, 0x09, 0xeb, 0x1a, 0xcc, 0x28, 0xdb, 0xf4, 0xa6, 0xd7, 0xd8, - 0xd7, 0xd2, 0xf4, 0x2b, 0x7f, 0xde, 0x7a, 0x1a, 0x01, 0x77, 0xd7, 0x41, 0x8b, 0x30, 0x65, 0x14, - 0x56, 0x2b, 0xe2, 0x0e, 0xa5, 0xd4, 0xac, 0x75, 0x13, 0x8c, 0xd3, 0xf8, 0xf6, 0x4f, 0x5a, 0xf0, - 0x58, 0x4e, 0x72, 0xa8, 0x81, 0x03, 0x3d, 0x6d, 0xc1, 0x54, 0xdb, 0xac, 0xda, 0x27, 0x1e, 0x9c, - 0x91, 0x82, 0x4a, 0xf5, 0x35, 0x05, 0xc0, 0x69, 0xa2, 0xf6, 0x9f, 0x5a, 0x70, 0xa1, 0xa7, 0xe5, - 0x17, 0xc2, 0x70, 0x76, 0xbb, 0x15, 0x39, 0xcb, 0x21, 0x71, 0x89, 0x1f, 0x7b, 0x4e, 0xb3, 0xde, - 0x26, 0x0d, 0x4d, 0x6f, 0xcd, 0x4c, 0xa8, 0xae, 0xad, 0xd5, 0x17, 0xbb, 0x31, 0x70, 0x4e, 0x4d, - 0xb4, 0x0a, 0xa8, 0x1b, 0x22, 0x66, 0x98, 0xc5, 0x8c, 0xed, 0xa6, 0x87, 0x33, 0x6a, 0xa0, 0x57, - 0x60, 0x42, 0x59, 0x94, 0x69, 0x33, 0xce, 0x18, 0x30, 0xd6, 0x01, 0xd8, 0xc4, 0x5b, 0xba, 0xf2, - 0xeb, 0xbf, 0x77, 0xf1, 0x03, 0xbf, 0xf9, 0x7b, 0x17, 0x3f, 0xf0, 0xdb, 0xbf, 0x77, 0xf1, 0x03, - 0xdf, 0xf6, 0xe0, 0xa2, 0xf5, 0xeb, 0x0f, 0x2e, 0x5a, 0xbf, 0xf9, 0xe0, 0xa2, 0xf5, 0xdb, 0x0f, - 0x2e, 0x5a, 0xbf, 0xfb, 0xe0, 0xa2, 0xf5, 0xa5, 0xdf, 0xbf, 0xf8, 0x81, 0x4f, 0x17, 0xf6, 0x9e, - 0xff, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5c, 0x2b, 0xc8, 0x61, 0xd8, 0xfd, 0x00, 0x00, + // 13889 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x6b, 0x70, 0x24, 0xd7, + 0x75, 0x18, 0xac, 0x9e, 0xc1, 0x63, 0xe6, 0xe0, 0x7d, 0xb1, 0xbb, 0xc4, 0x82, 0xbb, 0x8b, 0x65, + 0xaf, 0xb4, 0x5c, 0x8a, 0x24, 0x56, 0x7c, 0x89, 0x34, 0x49, 0xd1, 0x02, 0x30, 0xc0, 0xee, 0x70, + 0x17, 0xd8, 0xe1, 0x1d, 0xec, 0xae, 0x44, 0x53, 0xfa, 0xd4, 0x98, 0xb9, 0x00, 0x9a, 0x98, 0xe9, + 0x1e, 0x76, 0xf7, 0x60, 0x17, 0xfc, 0xe4, 0xfa, 0xfc, 0xc9, 0x4f, 0xf9, 0x91, 0x52, 0xa5, 0x5c, + 0x79, 0xd8, 0x2e, 0x57, 0xca, 0x71, 0xca, 0x56, 0x9c, 0xa4, 0xe2, 0xd8, 0xb1, 0x1d, 0xcb, 0x89, + 0x9d, 0x38, 0x0f, 0x27, 0x3f, 0x1c, 0xc7, 0x95, 0x44, 0xae, 0x72, 0x05, 0xb1, 0xd7, 0xa9, 0xb8, + 0xf4, 0x23, 0xb6, 0x13, 0x3b, 0x3f, 0x82, 0xb8, 0xe2, 0xd4, 0x7d, 0xf6, 0xbd, 0x3d, 0xdd, 0x33, + 0x83, 0x25, 0x00, 0x51, 0x2a, 0xfe, 0x9b, 0xb9, 0xe7, 0xdc, 0x73, 0x6f, 0xdf, 0xe7, 0xb9, 0xe7, + 0x09, 0xaf, 0xec, 0xbc, 0x14, 0xce, 0xbb, 0xfe, 0xd5, 0x9d, 0xf6, 0x06, 0x09, 0x3c, 0x12, 0x91, + 0xf0, 0xea, 0x2e, 0xf1, 0xea, 0x7e, 0x70, 0x55, 0x00, 0x9c, 0x96, 0x7b, 0xb5, 0xe6, 0x07, 0xe4, + 0xea, 0xee, 0x33, 0x57, 0xb7, 0x88, 0x47, 0x02, 0x27, 0x22, 0xf5, 0xf9, 0x56, 0xe0, 0x47, 0x3e, + 0x42, 0x1c, 0x67, 0xde, 0x69, 0xb9, 0xf3, 0x14, 0x67, 0x7e, 0xf7, 0x99, 0xd9, 0xa7, 0xb7, 0xdc, + 0x68, 0xbb, 0xbd, 0x31, 0x5f, 0xf3, 0x9b, 0x57, 0xb7, 0xfc, 0x2d, 0xff, 0x2a, 0x43, 0xdd, 0x68, + 0x6f, 0xb2, 0x7f, 0xec, 0x0f, 0xfb, 0xc5, 0x49, 0xcc, 0x3e, 0x1f, 0x37, 0xd3, 0x74, 0x6a, 0xdb, + 0xae, 0x47, 0x82, 0xbd, 0xab, 0xad, 0x9d, 0x2d, 0xd6, 0x6e, 0x40, 0x42, 0xbf, 0x1d, 0xd4, 0x48, + 0xb2, 0xe1, 0xae, 0xb5, 0xc2, 0xab, 0x4d, 0x12, 0x39, 0x29, 0xdd, 0x9d, 0xbd, 0x9a, 0x55, 0x2b, + 0x68, 0x7b, 0x91, 0xdb, 0xec, 0x6c, 0xe6, 0xe3, 0xbd, 0x2a, 0x84, 0xb5, 0x6d, 0xd2, 0x74, 0x3a, + 0xea, 0x3d, 0x97, 0x55, 0xaf, 0x1d, 0xb9, 0x8d, 0xab, 0xae, 0x17, 0x85, 0x51, 0x90, 0xac, 0x64, + 0x7f, 0xd5, 0x82, 0x8b, 0x0b, 0x77, 0xab, 0xcb, 0x0d, 0x27, 0x8c, 0xdc, 0xda, 0x62, 0xc3, 0xaf, + 0xed, 0x54, 0x23, 0x3f, 0x20, 0x77, 0xfc, 0x46, 0xbb, 0x49, 0xaa, 0x6c, 0x20, 0xd0, 0x53, 0x50, + 0xd8, 0x65, 0xff, 0xcb, 0xa5, 0x19, 0xeb, 0xa2, 0x75, 0xa5, 0xb8, 0x38, 0xf9, 0x1b, 0xfb, 0x73, + 0x1f, 0x7a, 0xb0, 0x3f, 0x57, 0xb8, 0x23, 0xca, 0xb1, 0xc2, 0x40, 0x97, 0x61, 0x68, 0x33, 0x5c, + 0xdf, 0x6b, 0x91, 0x99, 0x1c, 0xc3, 0x1d, 0x17, 0xb8, 0x43, 0x2b, 0x55, 0x5a, 0x8a, 0x05, 0x14, + 0x5d, 0x85, 0x62, 0xcb, 0x09, 0x22, 0x37, 0x72, 0x7d, 0x6f, 0x26, 0x7f, 0xd1, 0xba, 0x32, 0xb8, + 0x38, 0x25, 0x50, 0x8b, 0x15, 0x09, 0xc0, 0x31, 0x0e, 0xed, 0x46, 0x40, 0x9c, 0xfa, 0x2d, 0xaf, + 0xb1, 0x37, 0x33, 0x70, 0xd1, 0xba, 0x52, 0x88, 0xbb, 0x81, 0x45, 0x39, 0x56, 0x18, 0xf6, 0x8f, + 0xe4, 0xa0, 0xb0, 0xb0, 0xb9, 0xe9, 0x7a, 0x6e, 0xb4, 0x87, 0xee, 0xc0, 0xa8, 0xe7, 0xd7, 0x89, + 0xfc, 0xcf, 0xbe, 0x62, 0xe4, 0xd9, 0x8b, 0xf3, 0x9d, 0x4b, 0x69, 0x7e, 0x4d, 0xc3, 0x5b, 0x9c, + 0x7c, 0xb0, 0x3f, 0x37, 0xaa, 0x97, 0x60, 0x83, 0x0e, 0xc2, 0x30, 0xd2, 0xf2, 0xeb, 0x8a, 0x6c, + 0x8e, 0x91, 0x9d, 0x4b, 0x23, 0x5b, 0x89, 0xd1, 0x16, 0x27, 0x1e, 0xec, 0xcf, 0x8d, 0x68, 0x05, + 0x58, 0x27, 0x82, 0x36, 0x60, 0x82, 0xfe, 0xf5, 0x22, 0x57, 0xd1, 0xcd, 0x33, 0xba, 0x97, 0xb2, + 0xe8, 0x6a, 0xa8, 0x8b, 0xd3, 0x0f, 0xf6, 0xe7, 0x26, 0x12, 0x85, 0x38, 0x49, 0xd0, 0x7e, 0x17, + 0xc6, 0x17, 0xa2, 0xc8, 0xa9, 0x6d, 0x93, 0x3a, 0x9f, 0x41, 0xf4, 0x3c, 0x0c, 0x78, 0x4e, 0x93, + 0x88, 0xf9, 0xbd, 0x28, 0x06, 0x76, 0x60, 0xcd, 0x69, 0x92, 0x83, 0xfd, 0xb9, 0xc9, 0xdb, 0x9e, + 0xfb, 0x4e, 0x5b, 0xac, 0x0a, 0x5a, 0x86, 0x19, 0x36, 0x7a, 0x16, 0xa0, 0x4e, 0x76, 0xdd, 0x1a, + 0xa9, 0x38, 0xd1, 0xb6, 0x98, 0x6f, 0x24, 0xea, 0x42, 0x49, 0x41, 0xb0, 0x86, 0x65, 0xdf, 0x87, + 0xe2, 0xc2, 0xae, 0xef, 0xd6, 0x2b, 0x7e, 0x3d, 0x44, 0x3b, 0x30, 0xd1, 0x0a, 0xc8, 0x26, 0x09, + 0x54, 0xd1, 0x8c, 0x75, 0x31, 0x7f, 0x65, 0xe4, 0xd9, 0x2b, 0xa9, 0x1f, 0x6b, 0xa2, 0x2e, 0x7b, + 0x51, 0xb0, 0xb7, 0xf8, 0x88, 0x68, 0x6f, 0x22, 0x01, 0xc5, 0x49, 0xca, 0xf6, 0x3f, 0xcf, 0xc1, + 0xe9, 0x85, 0x77, 0xdb, 0x01, 0x29, 0xb9, 0xe1, 0x4e, 0x72, 0x85, 0xd7, 0xdd, 0x70, 0x67, 0x2d, + 0x1e, 0x01, 0xb5, 0xb4, 0x4a, 0xa2, 0x1c, 0x2b, 0x0c, 0xf4, 0x34, 0x0c, 0xd3, 0xdf, 0xb7, 0x71, + 0x59, 0x7c, 0xf2, 0xb4, 0x40, 0x1e, 0x29, 0x39, 0x91, 0x53, 0xe2, 0x20, 0x2c, 0x71, 0xd0, 0x2a, + 0x8c, 0xd4, 0xd8, 0x86, 0xdc, 0x5a, 0xf5, 0xeb, 0x84, 0x4d, 0x66, 0x71, 0xf1, 0x49, 0x8a, 0xbe, + 0x14, 0x17, 0x1f, 0xec, 0xcf, 0xcd, 0xf0, 0xbe, 0x09, 0x12, 0x1a, 0x0c, 0xeb, 0xf5, 0x91, 0xad, + 0xf6, 0xd7, 0x00, 0xa3, 0x04, 0x29, 0x7b, 0xeb, 0x8a, 0xb6, 0x55, 0x06, 0xd9, 0x56, 0x19, 0x4d, + 0xdf, 0x26, 0xe8, 0x19, 0x18, 0xd8, 0x71, 0xbd, 0xfa, 0xcc, 0x10, 0xa3, 0x75, 0x9e, 0xce, 0xf9, + 0x0d, 0xd7, 0xab, 0x1f, 0xec, 0xcf, 0x4d, 0x19, 0xdd, 0xa1, 0x85, 0x98, 0xa1, 0xda, 0x7f, 0x6a, + 0xc1, 0x1c, 0x83, 0xad, 0xb8, 0x0d, 0x52, 0x21, 0x41, 0xe8, 0x86, 0x11, 0xf1, 0x22, 0x63, 0x40, + 0x9f, 0x05, 0x08, 0x49, 0x2d, 0x20, 0x91, 0x36, 0xa4, 0x6a, 0x61, 0x54, 0x15, 0x04, 0x6b, 0x58, + 0xf4, 0x40, 0x08, 0xb7, 0x9d, 0x80, 0xad, 0x2f, 0x31, 0xb0, 0xea, 0x40, 0xa8, 0x4a, 0x00, 0x8e, + 0x71, 0x8c, 0x03, 0x21, 0xdf, 0xeb, 0x40, 0x40, 0x9f, 0x80, 0x89, 0xb8, 0xb1, 0xb0, 0xe5, 0xd4, + 0xe4, 0x00, 0xb2, 0x2d, 0x53, 0x35, 0x41, 0x38, 0x89, 0x6b, 0xff, 0x6d, 0x4b, 0x2c, 0x1e, 0xfa, + 0xd5, 0xef, 0xf3, 0x6f, 0xb5, 0x7f, 0xc9, 0x82, 0xe1, 0x45, 0xd7, 0xab, 0xbb, 0xde, 0x16, 0xfa, + 0x1c, 0x14, 0xe8, 0xdd, 0x54, 0x77, 0x22, 0x47, 0x9c, 0x7b, 0x1f, 0xd3, 0xf6, 0x96, 0xba, 0x2a, + 0xe6, 0x5b, 0x3b, 0x5b, 0xb4, 0x20, 0x9c, 0xa7, 0xd8, 0x74, 0xb7, 0xdd, 0xda, 0x78, 0x9b, 0xd4, + 0xa2, 0x55, 0x12, 0x39, 0xf1, 0xe7, 0xc4, 0x65, 0x58, 0x51, 0x45, 0x37, 0x60, 0x28, 0x72, 0x82, + 0x2d, 0x12, 0x89, 0x03, 0x30, 0xf5, 0xa0, 0xe2, 0x35, 0x31, 0xdd, 0x91, 0xc4, 0xab, 0x91, 0xf8, + 0x5a, 0x58, 0x67, 0x55, 0xb1, 0x20, 0x61, 0xff, 0xd0, 0x30, 0x9c, 0x5d, 0xaa, 0x96, 0x33, 0xd6, + 0xd5, 0x65, 0x18, 0xaa, 0x07, 0xee, 0x2e, 0x09, 0xc4, 0x38, 0x2b, 0x2a, 0x25, 0x56, 0x8a, 0x05, + 0x14, 0xbd, 0x04, 0xa3, 0xfc, 0x42, 0xba, 0xee, 0x78, 0xf5, 0x86, 0x1c, 0xe2, 0x53, 0x02, 0x7b, + 0xf4, 0x8e, 0x06, 0xc3, 0x06, 0xe6, 0x21, 0x17, 0xd5, 0xe5, 0xc4, 0x66, 0xcc, 0xba, 0xec, 0xbe, + 0x68, 0xc1, 0x24, 0x6f, 0x66, 0x21, 0x8a, 0x02, 0x77, 0xa3, 0x1d, 0x91, 0x70, 0x66, 0x90, 0x9d, + 0x74, 0x4b, 0x69, 0xa3, 0x95, 0x39, 0x02, 0xf3, 0x77, 0x12, 0x54, 0xf8, 0x21, 0x38, 0x23, 0xda, + 0x9d, 0x4c, 0x82, 0x71, 0x47, 0xb3, 0xe8, 0x3b, 0x2d, 0x98, 0xad, 0xf9, 0x5e, 0x14, 0xf8, 0x8d, + 0x06, 0x09, 0x2a, 0xed, 0x8d, 0x86, 0x1b, 0x6e, 0xf3, 0x75, 0x8a, 0xc9, 0x26, 0x3b, 0x09, 0x32, + 0xe6, 0x50, 0x21, 0x89, 0x39, 0xbc, 0xf0, 0x60, 0x7f, 0x6e, 0x76, 0x29, 0x93, 0x14, 0xee, 0xd2, + 0x0c, 0xda, 0x01, 0x44, 0xaf, 0xd2, 0x6a, 0xe4, 0x6c, 0x91, 0xb8, 0xf1, 0xe1, 0xfe, 0x1b, 0x3f, + 0xf3, 0x60, 0x7f, 0x0e, 0xad, 0x75, 0x90, 0xc0, 0x29, 0x64, 0xd1, 0x3b, 0x70, 0x8a, 0x96, 0x76, + 0x7c, 0x6b, 0xa1, 0xff, 0xe6, 0x66, 0x1e, 0xec, 0xcf, 0x9d, 0x5a, 0x4b, 0x21, 0x82, 0x53, 0x49, + 0xa3, 0xef, 0xb0, 0xe0, 0x6c, 0xfc, 0xf9, 0xcb, 0xf7, 0x5b, 0x8e, 0x57, 0x8f, 0x1b, 0x2e, 0xf6, + 0xdf, 0x30, 0x3d, 0x93, 0xcf, 0x2e, 0x65, 0x51, 0xc2, 0xd9, 0x8d, 0xcc, 0x2e, 0xc1, 0xe9, 0xd4, + 0xd5, 0x82, 0x26, 0x21, 0xbf, 0x43, 0x38, 0x17, 0x54, 0xc4, 0xf4, 0x27, 0x3a, 0x05, 0x83, 0xbb, + 0x4e, 0xa3, 0x2d, 0x36, 0x0a, 0xe6, 0x7f, 0x5e, 0xce, 0xbd, 0x64, 0xd9, 0xff, 0x22, 0x0f, 0x13, + 0x4b, 0xd5, 0xf2, 0x43, 0xed, 0x42, 0xfd, 0x1a, 0xca, 0x75, 0xbd, 0x86, 0xe2, 0x4b, 0x2d, 0x9f, + 0x79, 0xa9, 0xfd, 0x7f, 0x29, 0x5b, 0x68, 0x80, 0x6d, 0xa1, 0x6f, 0xc9, 0xd8, 0x42, 0x47, 0xbc, + 0x71, 0x76, 0x33, 0x56, 0xd1, 0x20, 0x9b, 0xcc, 0x54, 0x8e, 0xe5, 0xa6, 0x5f, 0x73, 0x1a, 0xc9, + 0xa3, 0xef, 0x90, 0x4b, 0xe9, 0x68, 0xe6, 0xb1, 0x06, 0xa3, 0x4b, 0x4e, 0xcb, 0xd9, 0x70, 0x1b, + 0x6e, 0xe4, 0x92, 0x10, 0x3d, 0x0e, 0x79, 0xa7, 0x5e, 0x67, 0xdc, 0x56, 0x71, 0xf1, 0xf4, 0x83, + 0xfd, 0xb9, 0xfc, 0x42, 0x9d, 0x5e, 0xfb, 0xa0, 0xb0, 0xf6, 0x30, 0xc5, 0x40, 0x1f, 0x85, 0x81, + 0x7a, 0xe0, 0xb7, 0x66, 0x72, 0x0c, 0x93, 0xee, 0xba, 0x81, 0x52, 0xe0, 0xb7, 0x12, 0xa8, 0x0c, + 0xc7, 0xfe, 0xb5, 0x1c, 0x9c, 0x5b, 0x22, 0xad, 0xed, 0x95, 0x6a, 0xc6, 0xf9, 0x7d, 0x05, 0x0a, + 0x4d, 0xdf, 0x73, 0x23, 0x3f, 0x08, 0x45, 0xd3, 0x6c, 0x45, 0xac, 0x8a, 0x32, 0xac, 0xa0, 0xe8, + 0x22, 0x0c, 0xb4, 0x62, 0xa6, 0x72, 0x54, 0x32, 0xa4, 0x8c, 0x9d, 0x64, 0x10, 0x8a, 0xd1, 0x0e, + 0x49, 0x20, 0x56, 0x8c, 0xc2, 0xb8, 0x1d, 0x92, 0x00, 0x33, 0x48, 0x7c, 0x33, 0xd3, 0x3b, 0x5b, + 0x9c, 0xd0, 0x89, 0x9b, 0x99, 0x42, 0xb0, 0x86, 0x85, 0x2a, 0x50, 0x0c, 0x13, 0x33, 0xdb, 0xd7, + 0x36, 0x1d, 0x63, 0x57, 0xb7, 0x9a, 0xc9, 0x98, 0x88, 0x71, 0xa3, 0x0c, 0xf5, 0xbc, 0xba, 0xbf, + 0x92, 0x03, 0xc4, 0x87, 0xf0, 0x1b, 0x6c, 0xe0, 0x6e, 0x77, 0x0e, 0x5c, 0xff, 0x5b, 0xe2, 0xa8, + 0x46, 0xef, 0xcf, 0x2c, 0x38, 0xb7, 0xe4, 0x7a, 0x75, 0x12, 0x64, 0x2c, 0xc0, 0xe3, 0x79, 0xcb, + 0x1e, 0x8e, 0x69, 0x30, 0x96, 0xd8, 0xc0, 0x11, 0x2c, 0x31, 0xfb, 0x8f, 0x2d, 0x40, 0xfc, 0xb3, + 0xdf, 0x77, 0x1f, 0x7b, 0xbb, 0xf3, 0x63, 0x8f, 0x60, 0x59, 0xd8, 0x37, 0x61, 0x7c, 0xa9, 0xe1, + 0x12, 0x2f, 0x2a, 0x57, 0x96, 0x7c, 0x6f, 0xd3, 0xdd, 0x42, 0x2f, 0xc3, 0x78, 0xe4, 0x36, 0x89, + 0xdf, 0x8e, 0xaa, 0xa4, 0xe6, 0x7b, 0xec, 0x25, 0x69, 0x5d, 0x19, 0x5c, 0x44, 0x0f, 0xf6, 0xe7, + 0xc6, 0xd7, 0x0d, 0x08, 0x4e, 0x60, 0xda, 0xbf, 0x4b, 0xc7, 0xcf, 0x6f, 0xb6, 0x7c, 0x8f, 0x78, + 0xd1, 0x92, 0xef, 0xd5, 0xb9, 0xc4, 0xe1, 0x65, 0x18, 0x88, 0xe8, 0x78, 0xf0, 0xb1, 0xbb, 0x2c, + 0x37, 0x0a, 0x1d, 0x85, 0x83, 0xfd, 0xb9, 0x33, 0x9d, 0x35, 0xd8, 0x38, 0xb1, 0x3a, 0xe8, 0x5b, + 0x60, 0x28, 0x8c, 0x9c, 0xa8, 0x1d, 0x8a, 0xd1, 0x7c, 0x4c, 0x8e, 0x66, 0x95, 0x95, 0x1e, 0xec, + 0xcf, 0x4d, 0xa8, 0x6a, 0xbc, 0x08, 0x8b, 0x0a, 0xe8, 0x09, 0x18, 0x6e, 0x92, 0x30, 0x74, 0xb6, + 0xe4, 0x6d, 0x38, 0x21, 0xea, 0x0e, 0xaf, 0xf2, 0x62, 0x2c, 0xe1, 0xe8, 0x12, 0x0c, 0x92, 0x20, + 0xf0, 0x03, 0xb1, 0x47, 0xc7, 0x04, 0xe2, 0xe0, 0x32, 0x2d, 0xc4, 0x1c, 0x66, 0xff, 0x5b, 0x0b, + 0x26, 0x54, 0x5f, 0x79, 0x5b, 0x27, 0xf0, 0x2a, 0x78, 0x13, 0xa0, 0x26, 0x3f, 0x30, 0x64, 0xb7, + 0xc7, 0xc8, 0xb3, 0x97, 0x53, 0x2f, 0xea, 0x8e, 0x61, 0x8c, 0x29, 0xab, 0xa2, 0x10, 0x6b, 0xd4, + 0xec, 0x7f, 0x6c, 0xc1, 0x74, 0xe2, 0x8b, 0x6e, 0xba, 0x61, 0x84, 0xde, 0xea, 0xf8, 0xaa, 0xf9, + 0xfe, 0xbe, 0x8a, 0xd6, 0x66, 0xdf, 0xa4, 0x96, 0xb2, 0x2c, 0xd1, 0xbe, 0xe8, 0x3a, 0x0c, 0xba, + 0x11, 0x69, 0xca, 0x8f, 0xb9, 0xd4, 0xf5, 0x63, 0x78, 0xaf, 0xe2, 0x19, 0x29, 0xd3, 0x9a, 0x98, + 0x13, 0xb0, 0x7f, 0x2d, 0x0f, 0x45, 0xbe, 0x6c, 0x57, 0x9d, 0xd6, 0x09, 0xcc, 0xc5, 0x93, 0x50, + 0x74, 0x9b, 0xcd, 0x76, 0xe4, 0x6c, 0x88, 0xe3, 0xbc, 0xc0, 0xb7, 0x56, 0x59, 0x16, 0xe2, 0x18, + 0x8e, 0xca, 0x30, 0xc0, 0xba, 0xc2, 0xbf, 0xf2, 0xf1, 0xf4, 0xaf, 0x14, 0x7d, 0x9f, 0x2f, 0x39, + 0x91, 0xc3, 0x39, 0x29, 0x75, 0x8f, 0xd0, 0x22, 0xcc, 0x48, 0x20, 0x07, 0x60, 0xc3, 0xf5, 0x9c, + 0x60, 0x8f, 0x96, 0xcd, 0xe4, 0x19, 0xc1, 0xa7, 0xbb, 0x13, 0x5c, 0x54, 0xf8, 0x9c, 0xac, 0xfa, + 0xb0, 0x18, 0x80, 0x35, 0xa2, 0xb3, 0x2f, 0x42, 0x51, 0x21, 0x1f, 0x86, 0x21, 0x9a, 0xfd, 0x04, + 0x4c, 0x24, 0xda, 0xea, 0x55, 0x7d, 0x54, 0xe7, 0xa7, 0x7e, 0x99, 0x1d, 0x19, 0xa2, 0xd7, 0xcb, + 0xde, 0xae, 0x38, 0x72, 0xdf, 0x85, 0x53, 0x8d, 0x94, 0x93, 0x4c, 0xcc, 0x6b, 0xff, 0x27, 0xdf, + 0x39, 0xf1, 0xd9, 0xa7, 0xd2, 0xa0, 0x38, 0xb5, 0x0d, 0xca, 0x23, 0xf8, 0x2d, 0xba, 0x41, 0x9c, + 0x86, 0xce, 0x6e, 0xdf, 0x12, 0x65, 0x58, 0x41, 0xe9, 0x79, 0x77, 0x4a, 0x75, 0xfe, 0x06, 0xd9, + 0xab, 0x92, 0x06, 0xa9, 0x45, 0x7e, 0xf0, 0x75, 0xed, 0xfe, 0x79, 0x3e, 0xfa, 0xfc, 0xb8, 0x1c, + 0x11, 0x04, 0xf2, 0x37, 0xc8, 0x1e, 0x9f, 0x0a, 0xfd, 0xeb, 0xf2, 0x5d, 0xbf, 0xee, 0x67, 0x2d, + 0x18, 0x53, 0x5f, 0x77, 0x02, 0xe7, 0xc2, 0xa2, 0x79, 0x2e, 0x9c, 0xef, 0xba, 0xc0, 0x33, 0x4e, + 0x84, 0xaf, 0xe4, 0xe0, 0xac, 0xc2, 0xa1, 0x6f, 0x03, 0xfe, 0x47, 0xac, 0xaa, 0xab, 0x50, 0xf4, + 0x94, 0xd4, 0xca, 0x32, 0xc5, 0x45, 0xb1, 0xcc, 0x2a, 0xc6, 0xa1, 0x2c, 0x9e, 0x17, 0x8b, 0x96, + 0x46, 0x75, 0x71, 0xae, 0x10, 0xdd, 0x2e, 0x42, 0xbe, 0xed, 0xd6, 0xc5, 0x05, 0xf3, 0x31, 0x39, + 0xda, 0xb7, 0xcb, 0xa5, 0x83, 0xfd, 0xb9, 0xc7, 0xb2, 0x54, 0x09, 0xf4, 0x66, 0x0b, 0xe7, 0x6f, + 0x97, 0x4b, 0x98, 0x56, 0x46, 0x0b, 0x30, 0x21, 0xb5, 0x25, 0x77, 0x28, 0xbb, 0xe5, 0x7b, 0xe2, + 0x1e, 0x52, 0x32, 0x59, 0x6c, 0x82, 0x71, 0x12, 0x1f, 0x95, 0x60, 0x72, 0xa7, 0xbd, 0x41, 0x1a, + 0x24, 0xe2, 0x1f, 0x7c, 0x83, 0x70, 0x89, 0x65, 0x31, 0x7e, 0x99, 0xdd, 0x48, 0xc0, 0x71, 0x47, + 0x0d, 0xfb, 0x2f, 0xd8, 0x7d, 0x20, 0x46, 0xaf, 0x12, 0xf8, 0x74, 0x61, 0x51, 0xea, 0x5f, 0xcf, + 0xe5, 0xdc, 0xcf, 0xaa, 0xb8, 0x41, 0xf6, 0xd6, 0x7d, 0xca, 0x99, 0xa7, 0xaf, 0x0a, 0x63, 0xcd, + 0x0f, 0x74, 0x5d, 0xf3, 0x3f, 0x9f, 0x83, 0xd3, 0x6a, 0x04, 0x0c, 0x26, 0xf0, 0x1b, 0x7d, 0x0c, + 0x9e, 0x81, 0x91, 0x3a, 0xd9, 0x74, 0xda, 0x8d, 0x48, 0x89, 0xcf, 0x07, 0xb9, 0x0a, 0xa5, 0x14, + 0x17, 0x63, 0x1d, 0xe7, 0x10, 0xc3, 0xf6, 0x3f, 0x47, 0xd8, 0x45, 0x1c, 0x39, 0x74, 0x8d, 0xab, + 0x5d, 0x63, 0x65, 0xee, 0x9a, 0x4b, 0x30, 0xe8, 0x36, 0x29, 0x63, 0x96, 0x33, 0xf9, 0xad, 0x32, + 0x2d, 0xc4, 0x1c, 0x86, 0x3e, 0x02, 0xc3, 0x35, 0xbf, 0xd9, 0x74, 0xbc, 0x3a, 0xbb, 0xf2, 0x8a, + 0x8b, 0x23, 0x94, 0x77, 0x5b, 0xe2, 0x45, 0x58, 0xc2, 0xd0, 0x39, 0x18, 0x70, 0x82, 0x2d, 0x2e, + 0xc3, 0x28, 0x2e, 0x16, 0x68, 0x4b, 0x0b, 0xc1, 0x56, 0x88, 0x59, 0x29, 0x7d, 0x82, 0xdd, 0xf3, + 0x83, 0x1d, 0xd7, 0xdb, 0x2a, 0xb9, 0x81, 0xd8, 0x12, 0xea, 0x2e, 0xbc, 0xab, 0x20, 0x58, 0xc3, + 0x42, 0x2b, 0x30, 0xd8, 0xf2, 0x83, 0x28, 0x9c, 0x19, 0x62, 0xc3, 0xfd, 0x58, 0xc6, 0x41, 0xc4, + 0xbf, 0xb6, 0xe2, 0x07, 0x51, 0xfc, 0x01, 0xf4, 0x5f, 0x88, 0x79, 0x75, 0x74, 0x13, 0x86, 0x89, + 0xb7, 0xbb, 0x12, 0xf8, 0xcd, 0x99, 0xe9, 0x6c, 0x4a, 0xcb, 0x1c, 0x85, 0x2f, 0xb3, 0x98, 0x47, + 0x15, 0xc5, 0x58, 0x92, 0x40, 0xdf, 0x02, 0x79, 0xe2, 0xed, 0xce, 0x0c, 0x33, 0x4a, 0xb3, 0x19, + 0x94, 0xee, 0x38, 0x41, 0x7c, 0xe6, 0x2f, 0x7b, 0xbb, 0x98, 0xd6, 0x41, 0x9f, 0x86, 0xa2, 0x3c, + 0x30, 0x42, 0x21, 0xac, 0x4b, 0x5d, 0xb0, 0xf2, 0x98, 0xc1, 0xe4, 0x9d, 0xb6, 0x1b, 0x90, 0x26, + 0xf1, 0xa2, 0x30, 0x3e, 0x21, 0x25, 0x34, 0xc4, 0x31, 0x35, 0xf4, 0x69, 0x29, 0x21, 0x5e, 0xf5, + 0xdb, 0x5e, 0x14, 0xce, 0x14, 0x59, 0xf7, 0x52, 0x75, 0x77, 0x77, 0x62, 0xbc, 0xa4, 0x08, 0x99, + 0x57, 0xc6, 0x06, 0x29, 0xf4, 0x19, 0x18, 0xe3, 0xff, 0xb9, 0x06, 0x2c, 0x9c, 0x39, 0xcd, 0x68, + 0x5f, 0xcc, 0xa6, 0xcd, 0x11, 0x17, 0x4f, 0x0b, 0xe2, 0x63, 0x7a, 0x69, 0x88, 0x4d, 0x6a, 0x08, + 0xc3, 0x58, 0xc3, 0xdd, 0x25, 0x1e, 0x09, 0xc3, 0x4a, 0xe0, 0x6f, 0x90, 0x19, 0x60, 0x03, 0x73, + 0x36, 0x5d, 0x63, 0xe6, 0x6f, 0x90, 0xc5, 0x29, 0x4a, 0xf3, 0xa6, 0x5e, 0x07, 0x9b, 0x24, 0xd0, + 0x6d, 0x18, 0xa7, 0x2f, 0x36, 0x37, 0x26, 0x3a, 0xd2, 0x8b, 0x28, 0x7b, 0x57, 0x61, 0xa3, 0x12, + 0x4e, 0x10, 0x41, 0xb7, 0x60, 0x34, 0x8c, 0x9c, 0x20, 0x6a, 0xb7, 0x38, 0xd1, 0x33, 0xbd, 0x88, + 0x32, 0x85, 0x6b, 0x55, 0xab, 0x82, 0x0d, 0x02, 0xe8, 0x75, 0x28, 0x36, 0xdc, 0x4d, 0x52, 0xdb, + 0xab, 0x35, 0xc8, 0xcc, 0x28, 0xa3, 0x96, 0x7a, 0xa8, 0xdc, 0x94, 0x48, 0x9c, 0xcf, 0x55, 0x7f, + 0x71, 0x5c, 0x1d, 0xdd, 0x81, 0x33, 0x11, 0x09, 0x9a, 0xae, 0xe7, 0xd0, 0xc3, 0x40, 0x3c, 0xad, + 0x98, 0x22, 0x73, 0x8c, 0xed, 0xb6, 0x0b, 0x62, 0x36, 0xce, 0xac, 0xa7, 0x62, 0xe1, 0x8c, 0xda, + 0xe8, 0x3e, 0xcc, 0xa4, 0x40, 0xfc, 0x86, 0x5b, 0xdb, 0x9b, 0x39, 0xc5, 0x28, 0xbf, 0x2a, 0x28, + 0xcf, 0xac, 0x67, 0xe0, 0x1d, 0x74, 0x81, 0xe1, 0x4c, 0xea, 0xe8, 0x16, 0x4c, 0xb0, 0x13, 0xa8, + 0xd2, 0x6e, 0x34, 0x44, 0x83, 0xe3, 0xac, 0xc1, 0x8f, 0xc8, 0xfb, 0xb8, 0x6c, 0x82, 0x0f, 0xf6, + 0xe7, 0x20, 0xfe, 0x87, 0x93, 0xb5, 0xd1, 0x06, 0xd3, 0x99, 0xb5, 0x03, 0x37, 0xda, 0xa3, 0xe7, + 0x06, 0xb9, 0x1f, 0xcd, 0x4c, 0x74, 0x95, 0x57, 0xe8, 0xa8, 0x4a, 0xb1, 0xa6, 0x17, 0xe2, 0x24, + 0x41, 0x7a, 0xa4, 0x86, 0x51, 0xdd, 0xf5, 0x66, 0x26, 0xf9, 0xbb, 0x44, 0x9e, 0x48, 0x55, 0x5a, + 0x88, 0x39, 0x8c, 0xe9, 0xcb, 0xe8, 0x8f, 0x5b, 0xf4, 0xe6, 0x9a, 0x62, 0x88, 0xb1, 0xbe, 0x4c, + 0x02, 0x70, 0x8c, 0x43, 0x99, 0xc9, 0x28, 0xda, 0x9b, 0x41, 0x0c, 0x55, 0x1d, 0x2c, 0xeb, 0xeb, + 0x9f, 0xc6, 0xb4, 0xdc, 0xde, 0x80, 0x71, 0x75, 0x10, 0xb2, 0x31, 0x41, 0x73, 0x30, 0xc8, 0xd8, + 0x27, 0x21, 0x5d, 0x2b, 0xd2, 0x2e, 0x30, 0xd6, 0x0a, 0xf3, 0x72, 0xd6, 0x05, 0xf7, 0x5d, 0xb2, + 0xb8, 0x17, 0x11, 0xfe, 0xa6, 0xcf, 0x6b, 0x5d, 0x90, 0x00, 0x1c, 0xe3, 0xd8, 0xff, 0x87, 0xb3, + 0xa1, 0xf1, 0x69, 0xdb, 0xc7, 0xfd, 0xf2, 0x14, 0x14, 0xb6, 0xfd, 0x30, 0xa2, 0xd8, 0xac, 0x8d, + 0xc1, 0x98, 0xf1, 0xbc, 0x2e, 0xca, 0xb1, 0xc2, 0x40, 0xaf, 0xc0, 0x58, 0x4d, 0x6f, 0x40, 0x5c, + 0x8e, 0xea, 0x18, 0x31, 0x5a, 0xc7, 0x26, 0x2e, 0x7a, 0x09, 0x0a, 0xcc, 0x06, 0xa4, 0xe6, 0x37, + 0x04, 0xd7, 0x26, 0x6f, 0xf8, 0x42, 0x45, 0x94, 0x1f, 0x68, 0xbf, 0xb1, 0xc2, 0x46, 0x97, 0x61, + 0x88, 0x76, 0xa1, 0x5c, 0x11, 0xd7, 0x92, 0x12, 0x14, 0x5d, 0x67, 0xa5, 0x58, 0x40, 0xed, 0xbf, + 0x9c, 0xd3, 0x46, 0x99, 0xbe, 0x87, 0x09, 0xaa, 0xc0, 0xf0, 0x3d, 0xc7, 0x8d, 0x5c, 0x6f, 0x4b, + 0xf0, 0x1f, 0x4f, 0x74, 0xbd, 0xa3, 0x58, 0xa5, 0xbb, 0xbc, 0x02, 0xbf, 0x45, 0xc5, 0x1f, 0x2c, + 0xc9, 0x50, 0x8a, 0x41, 0xdb, 0xf3, 0x28, 0xc5, 0x5c, 0xbf, 0x14, 0x31, 0xaf, 0xc0, 0x29, 0x8a, + 0x3f, 0x58, 0x92, 0x41, 0x6f, 0x01, 0xc8, 0x1d, 0x46, 0xea, 0xc2, 0xf6, 0xe2, 0xa9, 0xde, 0x44, + 0xd7, 0x55, 0x9d, 0xc5, 0x71, 0x7a, 0x47, 0xc7, 0xff, 0xb1, 0x46, 0xcf, 0x8e, 0x18, 0x9f, 0xd6, + 0xd9, 0x19, 0xf4, 0x6d, 0x74, 0x89, 0x3b, 0x41, 0x44, 0xea, 0x0b, 0x91, 0x18, 0x9c, 0x8f, 0xf6, + 0xf7, 0x48, 0x59, 0x77, 0x9b, 0x44, 0xdf, 0x0e, 0x82, 0x08, 0x8e, 0xe9, 0xd9, 0xbf, 0x98, 0x87, + 0x99, 0xac, 0xee, 0xd2, 0x45, 0x47, 0xee, 0xbb, 0xd1, 0x12, 0x65, 0xaf, 0x2c, 0x73, 0xd1, 0x2d, + 0x8b, 0x72, 0xac, 0x30, 0xe8, 0xec, 0x87, 0xee, 0x96, 0x7c, 0x63, 0x0e, 0xc6, 0xb3, 0x5f, 0x65, + 0xa5, 0x58, 0x40, 0x29, 0x5e, 0x40, 0x9c, 0x50, 0x18, 0xf7, 0x68, 0xab, 0x04, 0xb3, 0x52, 0x2c, + 0xa0, 0xba, 0xb4, 0x6b, 0xa0, 0x87, 0xb4, 0xcb, 0x18, 0xa2, 0xc1, 0xa3, 0x1d, 0x22, 0xf4, 0x59, + 0x80, 0x4d, 0xd7, 0x73, 0xc3, 0x6d, 0x46, 0x7d, 0xe8, 0xd0, 0xd4, 0x15, 0x73, 0xb6, 0xa2, 0xa8, + 0x60, 0x8d, 0x22, 0x7a, 0x01, 0x46, 0xd4, 0x06, 0x2c, 0x97, 0x98, 0xa6, 0x53, 0xb3, 0x1c, 0x89, + 0x4f, 0xa3, 0x12, 0xd6, 0xf1, 0xec, 0xb7, 0x93, 0xeb, 0x45, 0xec, 0x00, 0x6d, 0x7c, 0xad, 0x7e, + 0xc7, 0x37, 0xd7, 0x7d, 0x7c, 0xed, 0xaf, 0xe5, 0x61, 0xc2, 0x68, 0xac, 0x1d, 0xf6, 0x71, 0x66, + 0x5d, 0xa3, 0x07, 0xb8, 0x13, 0x11, 0xb1, 0xff, 0xec, 0xde, 0x5b, 0x45, 0x3f, 0xe4, 0xe9, 0x0e, + 0xe0, 0xf5, 0xd1, 0x67, 0xa1, 0xd8, 0x70, 0x42, 0x26, 0x39, 0x23, 0x62, 0xdf, 0xf5, 0x43, 0x2c, + 0x7e, 0x98, 0x38, 0x61, 0xa4, 0xdd, 0x9a, 0x9c, 0x76, 0x4c, 0x92, 0xde, 0x34, 0x94, 0x3f, 0x91, + 0xd6, 0x63, 0xaa, 0x13, 0x94, 0x89, 0xd9, 0xc3, 0x1c, 0x86, 0x5e, 0x82, 0xd1, 0x80, 0xb0, 0x55, + 0xb1, 0x44, 0xb9, 0x39, 0xb6, 0xcc, 0x06, 0x63, 0xb6, 0x0f, 0x6b, 0x30, 0x6c, 0x60, 0xc6, 0x6f, + 0x83, 0xa1, 0x2e, 0x6f, 0x83, 0x27, 0x60, 0x98, 0xfd, 0x50, 0x2b, 0x40, 0xcd, 0x46, 0x99, 0x17, + 0x63, 0x09, 0x4f, 0x2e, 0x98, 0x42, 0x7f, 0x0b, 0x86, 0xbe, 0x3e, 0xc4, 0xa2, 0x66, 0x5a, 0xe6, + 0x02, 0x3f, 0xe5, 0xc4, 0x92, 0xc7, 0x12, 0x66, 0x7f, 0x14, 0xc6, 0x4b, 0x0e, 0x69, 0xfa, 0xde, + 0xb2, 0x57, 0x6f, 0xf9, 0xae, 0x17, 0xa1, 0x19, 0x18, 0x60, 0x97, 0x08, 0x3f, 0x02, 0x06, 0x68, + 0x43, 0x78, 0x80, 0x3e, 0x08, 0xec, 0x2d, 0x38, 0x5d, 0xf2, 0xef, 0x79, 0xf7, 0x9c, 0xa0, 0xbe, + 0x50, 0x29, 0x6b, 0xef, 0xeb, 0x35, 0xf9, 0xbe, 0xe3, 0x46, 0x5b, 0xa9, 0x47, 0xaf, 0x56, 0x93, + 0xb3, 0xb5, 0x2b, 0x6e, 0x83, 0x64, 0x48, 0x41, 0xfe, 0x6a, 0xce, 0x68, 0x29, 0xc6, 0x57, 0x5a, + 0x2d, 0x2b, 0x53, 0xab, 0xf5, 0x06, 0x14, 0x36, 0x5d, 0xd2, 0xa8, 0x63, 0xb2, 0x29, 0x56, 0xe2, + 0xe3, 0xd9, 0x76, 0x28, 0x2b, 0x14, 0x53, 0x4a, 0xbd, 0xf8, 0xeb, 0x70, 0x45, 0x54, 0xc6, 0x8a, + 0x0c, 0xda, 0x81, 0x49, 0xf9, 0x60, 0x90, 0x50, 0xb1, 0x2e, 0x9f, 0xe8, 0xf6, 0x0a, 0x31, 0x89, + 0x9f, 0x7a, 0xb0, 0x3f, 0x37, 0x89, 0x13, 0x64, 0x70, 0x07, 0x61, 0xfa, 0x1c, 0x6c, 0xd2, 0x13, + 0x78, 0x80, 0x0d, 0x3f, 0x7b, 0x0e, 0xb2, 0x97, 0x2d, 0x2b, 0xb5, 0x7f, 0xcc, 0x82, 0x47, 0x3a, + 0x46, 0x46, 0xbc, 0xf0, 0x8f, 0x78, 0x16, 0x92, 0x2f, 0xee, 0x5c, 0xef, 0x17, 0xb7, 0xfd, 0x77, + 0x2c, 0x38, 0xb5, 0xdc, 0x6c, 0x45, 0x7b, 0x25, 0xd7, 0x54, 0x41, 0xbd, 0x08, 0x43, 0x4d, 0x52, + 0x77, 0xdb, 0x4d, 0x31, 0x73, 0x73, 0xf2, 0x94, 0x5a, 0x65, 0xa5, 0x07, 0xfb, 0x73, 0x63, 0xd5, + 0xc8, 0x0f, 0x9c, 0x2d, 0xc2, 0x0b, 0xb0, 0x40, 0x67, 0x67, 0xbd, 0xfb, 0x2e, 0xb9, 0xe9, 0x36, + 0x5d, 0x69, 0x57, 0xd4, 0x55, 0x66, 0x37, 0x2f, 0x07, 0x74, 0xfe, 0x8d, 0xb6, 0xe3, 0x45, 0x6e, + 0xb4, 0x27, 0xb4, 0x47, 0x92, 0x08, 0x8e, 0xe9, 0xd9, 0x5f, 0xb5, 0x60, 0x42, 0xae, 0xfb, 0x85, + 0x7a, 0x3d, 0x20, 0x61, 0x88, 0x66, 0x21, 0xe7, 0xb6, 0x44, 0x2f, 0x41, 0xf4, 0x32, 0x57, 0xae, + 0xe0, 0x9c, 0xdb, 0x92, 0x6c, 0x19, 0x3b, 0x08, 0xf3, 0xa6, 0x22, 0xed, 0xba, 0x28, 0xc7, 0x0a, + 0x03, 0x5d, 0x81, 0x82, 0xe7, 0xd7, 0xb9, 0x6d, 0x17, 0xbf, 0xd2, 0xd8, 0x02, 0x5b, 0x13, 0x65, + 0x58, 0x41, 0x51, 0x05, 0x8a, 0xdc, 0xec, 0x29, 0x5e, 0xb4, 0x7d, 0x19, 0x4f, 0xb1, 0x2f, 0x5b, + 0x97, 0x35, 0x71, 0x4c, 0xc4, 0xfe, 0x55, 0x0b, 0x46, 0xe5, 0x97, 0xf5, 0xc9, 0x73, 0xd2, 0xad, + 0x15, 0xf3, 0x9b, 0xf1, 0xd6, 0xa2, 0x3c, 0x23, 0x83, 0x18, 0xac, 0x62, 0xfe, 0x50, 0xac, 0xe2, + 0x33, 0x30, 0xe2, 0xb4, 0x5a, 0x15, 0x93, 0xcf, 0x64, 0x4b, 0x69, 0x21, 0x2e, 0xc6, 0x3a, 0x8e, + 0xfd, 0xa3, 0x39, 0x18, 0x97, 0x5f, 0x50, 0x6d, 0x6f, 0x84, 0x24, 0x42, 0xeb, 0x50, 0x74, 0xf8, + 0x2c, 0x11, 0xb9, 0xc8, 0x2f, 0xa5, 0xcb, 0x11, 0x8c, 0x29, 0x8d, 0x2f, 0xfc, 0x05, 0x59, 0x1b, + 0xc7, 0x84, 0x50, 0x03, 0xa6, 0x3c, 0x3f, 0x62, 0x87, 0xbf, 0x82, 0x77, 0x53, 0xed, 0x24, 0xa9, + 0x9f, 0x15, 0xd4, 0xa7, 0xd6, 0x92, 0x54, 0x70, 0x27, 0x61, 0xb4, 0x2c, 0x65, 0x33, 0xf9, 0x6c, + 0x61, 0x80, 0x3e, 0x71, 0xe9, 0xa2, 0x19, 0xfb, 0x57, 0x2c, 0x28, 0x4a, 0xb4, 0x93, 0xd0, 0xe2, + 0xad, 0xc2, 0x70, 0xc8, 0x26, 0x41, 0x0e, 0x8d, 0xdd, 0xad, 0xe3, 0x7c, 0xbe, 0xe2, 0x3b, 0x8d, + 0xff, 0x0f, 0xb1, 0xa4, 0xc1, 0x44, 0xf3, 0xaa, 0xfb, 0xef, 0x13, 0xd1, 0xbc, 0xea, 0x4f, 0xc6, + 0xa5, 0xf4, 0x87, 0xac, 0xcf, 0x9a, 0xac, 0x8b, 0xb2, 0x5e, 0xad, 0x80, 0x6c, 0xba, 0xf7, 0x93, + 0xac, 0x57, 0x85, 0x95, 0x62, 0x01, 0x45, 0x6f, 0xc1, 0x68, 0x4d, 0xca, 0x64, 0xe3, 0x1d, 0x7e, + 0xb9, 0xab, 0x7e, 0x40, 0xa9, 0x92, 0xb8, 0x2c, 0x64, 0x49, 0xab, 0x8f, 0x0d, 0x6a, 0xa6, 0x19, + 0x41, 0xbe, 0x97, 0x19, 0x41, 0x4c, 0x37, 0x5b, 0xa9, 0xfe, 0xe3, 0x16, 0x0c, 0x71, 0x59, 0x5c, + 0x7f, 0xa2, 0x50, 0x4d, 0xb3, 0x16, 0x8f, 0xdd, 0x1d, 0x5a, 0x28, 0x34, 0x65, 0x68, 0x15, 0x8a, + 0xec, 0x07, 0x93, 0x25, 0xe6, 0xb3, 0xad, 0xee, 0x79, 0xab, 0x7a, 0x07, 0xef, 0xc8, 0x6a, 0x38, + 0xa6, 0x60, 0xff, 0x70, 0x9e, 0x9e, 0x6e, 0x31, 0xaa, 0x71, 0xe9, 0x5b, 0xc7, 0x77, 0xe9, 0xe7, + 0x8e, 0xeb, 0xd2, 0xdf, 0x82, 0x89, 0x9a, 0xa6, 0x87, 0x8b, 0x67, 0xf2, 0x4a, 0xd7, 0x45, 0xa2, + 0xa9, 0xec, 0xb8, 0x94, 0x65, 0xc9, 0x24, 0x82, 0x93, 0x54, 0xd1, 0xb7, 0xc1, 0x28, 0x9f, 0x67, + 0xd1, 0x0a, 0xb7, 0xc4, 0xf8, 0x48, 0xf6, 0x7a, 0xd1, 0x9b, 0xe0, 0x52, 0x39, 0xad, 0x3a, 0x36, + 0x88, 0xd9, 0x7f, 0x62, 0x01, 0x5a, 0x6e, 0x6d, 0x93, 0x26, 0x09, 0x9c, 0x46, 0x2c, 0x4e, 0xff, + 0x7e, 0x0b, 0x66, 0x48, 0x47, 0xf1, 0x92, 0xdf, 0x6c, 0x8a, 0x47, 0x4b, 0xc6, 0xbb, 0x7a, 0x39, + 0xa3, 0x8e, 0x72, 0x4b, 0x98, 0xc9, 0xc2, 0xc0, 0x99, 0xed, 0xa1, 0x55, 0x98, 0xe6, 0xb7, 0xa4, + 0x02, 0x68, 0xb6, 0xd7, 0x8f, 0x0a, 0xc2, 0xd3, 0xeb, 0x9d, 0x28, 0x38, 0xad, 0x9e, 0xfd, 0x5d, + 0xa3, 0x90, 0xd9, 0x8b, 0x0f, 0xf4, 0x08, 0x1f, 0xe8, 0x11, 0x3e, 0xd0, 0x23, 0x7c, 0xa0, 0x47, + 0xf8, 0x40, 0x8f, 0xf0, 0x4d, 0xaf, 0x47, 0xf8, 0x23, 0x0b, 0xa6, 0x3b, 0xaf, 0x81, 0x93, 0x60, + 0xcc, 0xdb, 0x30, 0xdd, 0x79, 0xd7, 0x75, 0xb5, 0xb3, 0xeb, 0xec, 0x67, 0x7c, 0xef, 0xa5, 0x7c, + 0x03, 0x4e, 0xa3, 0x6f, 0xff, 0xba, 0x05, 0xa7, 0x15, 0xb2, 0xf1, 0xd2, 0xff, 0x3c, 0x4c, 0xf3, + 0xf3, 0x65, 0xa9, 0xe1, 0xb8, 0xcd, 0x75, 0xd2, 0x6c, 0x35, 0x9c, 0x48, 0x9a, 0x19, 0x3c, 0x93, + 0xba, 0x55, 0x13, 0x26, 0xba, 0x46, 0xc5, 0xc5, 0x47, 0x68, 0xbf, 0x52, 0x00, 0x38, 0xad, 0x19, + 0xc3, 0x28, 0x35, 0xd7, 0xd3, 0x4c, 0xf8, 0x17, 0x0b, 0x30, 0xb8, 0xbc, 0x4b, 0xbc, 0xe8, 0x04, + 0x26, 0xaa, 0x06, 0xe3, 0xae, 0xb7, 0xeb, 0x37, 0x76, 0x49, 0x9d, 0xc3, 0x0f, 0xf3, 0xd0, 0x3f, + 0x23, 0x48, 0x8f, 0x97, 0x0d, 0x12, 0x38, 0x41, 0xf2, 0x38, 0x84, 0xed, 0xd7, 0x60, 0x88, 0xdf, + 0x71, 0x42, 0xd2, 0x9e, 0x7a, 0xa5, 0xb1, 0x41, 0x14, 0x37, 0x77, 0xac, 0x08, 0xe0, 0x77, 0xa8, + 0xa8, 0x8e, 0xde, 0x86, 0xf1, 0x4d, 0x37, 0x08, 0xa3, 0x75, 0xb7, 0x49, 0xc2, 0xc8, 0x69, 0xb6, + 0x1e, 0x42, 0xb8, 0xae, 0xc6, 0x61, 0xc5, 0xa0, 0x84, 0x13, 0x94, 0xd1, 0x16, 0x8c, 0x35, 0x1c, + 0xbd, 0xa9, 0xe1, 0x43, 0x37, 0xa5, 0x2e, 0xcf, 0x9b, 0x3a, 0x21, 0x6c, 0xd2, 0xa5, 0xa7, 0x4d, + 0x8d, 0xc9, 0x87, 0x0b, 0x4c, 0x6a, 0xa2, 0x4e, 0x1b, 0x2e, 0x18, 0xe6, 0x30, 0xca, 0x07, 0x32, + 0xfb, 0xe1, 0xa2, 0xc9, 0x07, 0x6a, 0x56, 0xc2, 0x9f, 0x83, 0x22, 0xa1, 0x43, 0x48, 0x09, 0x8b, + 0xfb, 0xf7, 0x6a, 0x7f, 0x7d, 0x5d, 0x75, 0x6b, 0x81, 0x6f, 0xaa, 0x35, 0x96, 0x25, 0x25, 0x1c, + 0x13, 0x45, 0x4b, 0x30, 0x14, 0x92, 0xc0, 0x25, 0xa1, 0xb8, 0x89, 0xbb, 0x4c, 0x23, 0x43, 0xe3, + 0xae, 0x37, 0xfc, 0x37, 0x16, 0x55, 0xe9, 0xf2, 0x72, 0x98, 0xc4, 0x97, 0xdd, 0x95, 0xda, 0xf2, + 0x5a, 0x60, 0xa5, 0x58, 0x40, 0xd1, 0xeb, 0x30, 0x1c, 0x90, 0x06, 0xd3, 0x9b, 0x8d, 0xf5, 0xbf, + 0xc8, 0xb9, 0x1a, 0x8e, 0xd7, 0xc3, 0x92, 0x00, 0xba, 0x01, 0x28, 0x20, 0x94, 0x8f, 0x74, 0xbd, + 0x2d, 0x65, 0x55, 0x2b, 0xee, 0x21, 0x75, 0x6e, 0xe1, 0x18, 0x43, 0x7a, 0x41, 0xe1, 0x94, 0x6a, + 0xe8, 0x1a, 0x4c, 0xa9, 0xd2, 0xb2, 0x17, 0x46, 0x0e, 0x3d, 0xff, 0x27, 0x18, 0x2d, 0x25, 0xc6, + 0xc1, 0x49, 0x04, 0xdc, 0x59, 0xc7, 0xfe, 0xb2, 0x05, 0x7c, 0x9c, 0x4f, 0x40, 0x78, 0xf1, 0x9a, + 0x29, 0xbc, 0x38, 0x9b, 0x39, 0x73, 0x19, 0x82, 0x8b, 0x2f, 0x5b, 0x30, 0xa2, 0xcd, 0x6c, 0xbc, + 0x66, 0xad, 0x2e, 0x6b, 0xb6, 0x0d, 0x93, 0x74, 0xa5, 0xdf, 0xda, 0x08, 0x49, 0xb0, 0x4b, 0xea, + 0x6c, 0x61, 0xe6, 0x1e, 0x6e, 0x61, 0x2a, 0x0b, 0xbe, 0x9b, 0x09, 0x82, 0xb8, 0xa3, 0x09, 0xfb, + 0x73, 0xb2, 0xab, 0xca, 0xe0, 0xb1, 0xa6, 0xe6, 0x3c, 0x61, 0xf0, 0xa8, 0x66, 0x15, 0xc7, 0x38, + 0x74, 0xab, 0x6d, 0xfb, 0x61, 0x94, 0x34, 0x78, 0xbc, 0xee, 0x87, 0x11, 0x66, 0x10, 0xfb, 0x39, + 0x80, 0xe5, 0xfb, 0xa4, 0xc6, 0x57, 0xac, 0xfe, 0xb6, 0xb2, 0xb2, 0xdf, 0x56, 0xf6, 0x6f, 0x5b, + 0x30, 0xbe, 0xb2, 0x64, 0xdc, 0x73, 0xf3, 0x00, 0xfc, 0x41, 0x78, 0xf7, 0xee, 0x9a, 0xb4, 0x16, + 0xe0, 0x0a, 0x5f, 0x55, 0x8a, 0x35, 0x0c, 0x74, 0x16, 0xf2, 0x8d, 0xb6, 0x27, 0xa4, 0xab, 0xc3, + 0x94, 0x7b, 0xb8, 0xd9, 0xf6, 0x30, 0x2d, 0xd3, 0x3c, 0x2e, 0xf2, 0x7d, 0x7b, 0x5c, 0xf4, 0x8c, + 0x7c, 0x80, 0xe6, 0x60, 0xf0, 0xde, 0x3d, 0xb7, 0xce, 0xfd, 0x4b, 0x85, 0x25, 0xc3, 0xdd, 0xbb, + 0xe5, 0x52, 0x88, 0x79, 0xb9, 0xfd, 0xa5, 0x3c, 0xcc, 0xae, 0x34, 0xc8, 0xfd, 0xf7, 0xe8, 0x63, + 0xdb, 0xaf, 0xbf, 0xc8, 0xe1, 0xe4, 0x54, 0x87, 0xf5, 0x09, 0xea, 0x3d, 0x1e, 0x9b, 0x30, 0xcc, + 0xed, 0xfd, 0xa4, 0xc7, 0xed, 0x2b, 0x69, 0xad, 0x67, 0x0f, 0xc8, 0x3c, 0xb7, 0x1b, 0x14, 0x0e, + 0x83, 0xea, 0xc2, 0x14, 0xa5, 0x58, 0x12, 0x9f, 0x7d, 0x19, 0x46, 0x75, 0xcc, 0x43, 0x79, 0xe7, + 0xfd, 0xff, 0x79, 0x98, 0xa4, 0x3d, 0x38, 0xd6, 0x89, 0xb8, 0xdd, 0x39, 0x11, 0x47, 0xed, 0xa1, + 0xd5, 0x7b, 0x36, 0xde, 0x4a, 0xce, 0xc6, 0x33, 0x59, 0xb3, 0x71, 0xd2, 0x73, 0xf0, 0x9d, 0x16, + 0x4c, 0xaf, 0x34, 0xfc, 0xda, 0x4e, 0xc2, 0x8b, 0xea, 0x05, 0x18, 0xa1, 0xc7, 0x71, 0x68, 0x38, + 0xf8, 0x1b, 0x21, 0x1f, 0x04, 0x08, 0xeb, 0x78, 0x5a, 0xb5, 0xdb, 0xb7, 0xcb, 0xa5, 0xb4, 0x48, + 0x11, 0x02, 0x84, 0x75, 0x3c, 0xfb, 0x37, 0x2d, 0x38, 0x7f, 0x6d, 0x69, 0x39, 0x5e, 0x8a, 0x1d, + 0xc1, 0x2a, 0x2e, 0xc3, 0x50, 0xab, 0xae, 0x75, 0x25, 0x96, 0x3e, 0x97, 0x58, 0x2f, 0x04, 0xf4, + 0xfd, 0x12, 0x88, 0xe5, 0xa7, 0x2d, 0x98, 0xbe, 0xe6, 0x46, 0xf4, 0x76, 0x4d, 0x86, 0x4d, 0xa0, + 0xd7, 0x6b, 0xe8, 0x46, 0x7e, 0xb0, 0x97, 0x0c, 0x9b, 0x80, 0x15, 0x04, 0x6b, 0x58, 0xbc, 0xe5, + 0x5d, 0x97, 0x59, 0x9a, 0xe7, 0x4c, 0x3d, 0x1c, 0x16, 0xe5, 0x58, 0x61, 0xd0, 0x0f, 0xab, 0xbb, + 0x01, 0x13, 0x61, 0xee, 0x89, 0x13, 0x56, 0x7d, 0x58, 0x49, 0x02, 0x70, 0x8c, 0x43, 0x5f, 0x73, + 0x73, 0xd7, 0x1a, 0xed, 0x30, 0x22, 0xc1, 0x66, 0x98, 0x71, 0x3a, 0x3e, 0x07, 0x45, 0x22, 0x15, + 0x06, 0xa2, 0xd7, 0x8a, 0x63, 0x54, 0x9a, 0x04, 0x1e, 0xbd, 0x41, 0xe1, 0xf5, 0xe1, 0x93, 0x79, + 0x38, 0xa7, 0xba, 0x15, 0x40, 0x44, 0x6f, 0x4b, 0x0f, 0x67, 0xc1, 0xfc, 0xe2, 0x97, 0x3b, 0xa0, + 0x38, 0xa5, 0x86, 0xfd, 0x63, 0x16, 0x9c, 0x56, 0x1f, 0xfc, 0xbe, 0xfb, 0x4c, 0xfb, 0xe7, 0x72, + 0x30, 0x76, 0x7d, 0x7d, 0xbd, 0x72, 0x8d, 0x44, 0xe2, 0xda, 0xee, 0x6d, 0x06, 0x80, 0x35, 0x6d, + 0x66, 0xb7, 0xc7, 0x5c, 0x3b, 0x72, 0x1b, 0xf3, 0x3c, 0x2a, 0xd2, 0x7c, 0xd9, 0x8b, 0x6e, 0x05, + 0xd5, 0x28, 0x70, 0xbd, 0xad, 0x54, 0xfd, 0xa7, 0x64, 0x2e, 0xf2, 0x59, 0xcc, 0x05, 0x7a, 0x0e, + 0x86, 0x58, 0x58, 0x26, 0x39, 0x09, 0x8f, 0xaa, 0xb7, 0x10, 0x2b, 0x3d, 0xd8, 0x9f, 0x2b, 0xde, + 0xc6, 0x65, 0xfe, 0x07, 0x0b, 0x54, 0x74, 0x1b, 0x46, 0xb6, 0xa3, 0xa8, 0x75, 0x9d, 0x38, 0x75, + 0xfa, 0x74, 0xe7, 0xc7, 0xe1, 0x85, 0xb4, 0xe3, 0x90, 0x0e, 0x02, 0x47, 0x8b, 0x4f, 0x90, 0xb8, + 0x2c, 0xc4, 0x3a, 0x1d, 0xbb, 0x0a, 0x10, 0xc3, 0x8e, 0x48, 0x91, 0x63, 0xff, 0x81, 0x05, 0xc3, + 0x3c, 0x42, 0x46, 0x80, 0x5e, 0x85, 0x01, 0x72, 0x9f, 0xd4, 0x04, 0xc7, 0x9b, 0xda, 0xe1, 0x98, + 0xd3, 0xe2, 0x02, 0x69, 0xfa, 0x1f, 0xb3, 0x5a, 0xe8, 0x3a, 0x0c, 0xd3, 0xde, 0x5e, 0x53, 0xe1, + 0x42, 0x1e, 0xcb, 0xfa, 0x62, 0x35, 0xed, 0x9c, 0x39, 0x13, 0x45, 0x58, 0x56, 0x67, 0xda, 0xf3, + 0x5a, 0xab, 0x4a, 0x4f, 0xec, 0xa8, 0x1b, 0x63, 0xb1, 0xbe, 0x54, 0xe1, 0x48, 0x82, 0x1a, 0xd7, + 0x9e, 0xcb, 0x42, 0x1c, 0x13, 0xb1, 0xd7, 0xa1, 0x48, 0x27, 0x75, 0xa1, 0xe1, 0x3a, 0xdd, 0x0d, + 0x02, 0x9e, 0x84, 0xa2, 0x54, 0xf7, 0x87, 0xc2, 0x33, 0x9e, 0x51, 0x95, 0xd6, 0x00, 0x21, 0x8e, + 0xe1, 0xf6, 0x26, 0x9c, 0x62, 0xc6, 0x9b, 0x4e, 0xb4, 0x6d, 0xec, 0xb1, 0xde, 0x8b, 0xf9, 0x29, + 0xf1, 0x80, 0xe4, 0x33, 0x33, 0xa3, 0x39, 0x9f, 0x8e, 0x4a, 0x8a, 0xf1, 0x63, 0xd2, 0xfe, 0xda, + 0x00, 0x3c, 0x5a, 0xae, 0x66, 0x07, 0x4f, 0x79, 0x09, 0x46, 0x39, 0x5f, 0x4a, 0x97, 0xb6, 0xd3, + 0x10, 0xed, 0x2a, 0x49, 0xf4, 0xba, 0x06, 0xc3, 0x06, 0x26, 0x3a, 0x0f, 0x79, 0xf7, 0x1d, 0x2f, + 0xe9, 0x9a, 0x55, 0x7e, 0x63, 0x0d, 0xd3, 0x72, 0x0a, 0xa6, 0x2c, 0x2e, 0xbf, 0x3b, 0x14, 0x58, + 0xb1, 0xb9, 0xaf, 0xc1, 0xb8, 0x1b, 0xd6, 0x42, 0xb7, 0xec, 0xd1, 0x73, 0x46, 0x3b, 0xa9, 0x94, + 0x70, 0x83, 0x76, 0x5a, 0x41, 0x71, 0x02, 0x5b, 0xbb, 0xc8, 0x06, 0xfb, 0x66, 0x93, 0x7b, 0xba, + 0x8a, 0xd3, 0x17, 0x40, 0x8b, 0x7d, 0x5d, 0xc8, 0x54, 0x0a, 0xe2, 0x05, 0xc0, 0x3f, 0x38, 0xc4, + 0x12, 0x46, 0x5f, 0x8e, 0xb5, 0x6d, 0xa7, 0xb5, 0xd0, 0x8e, 0xb6, 0x4b, 0x6e, 0x58, 0xf3, 0x77, + 0x49, 0xb0, 0xc7, 0x1e, 0xfd, 0x85, 0xf8, 0xe5, 0xa8, 0x00, 0x4b, 0xd7, 0x17, 0x2a, 0x14, 0x13, + 0x77, 0xd6, 0x41, 0x0b, 0x30, 0x21, 0x0b, 0xab, 0x24, 0x64, 0x57, 0xd8, 0x08, 0x23, 0xa3, 0x9c, + 0xa5, 0x44, 0xb1, 0x22, 0x92, 0xc4, 0x37, 0x39, 0x69, 0x38, 0x0a, 0x4e, 0xfa, 0x45, 0x18, 0x73, + 0x3d, 0x37, 0x72, 0x9d, 0xc8, 0xe7, 0xfa, 0x30, 0xfe, 0xbe, 0x67, 0x82, 0xfe, 0xb2, 0x0e, 0xc0, + 0x26, 0x9e, 0xfd, 0x5f, 0x06, 0x60, 0x8a, 0x4d, 0xdb, 0x07, 0x2b, 0xec, 0x9b, 0x69, 0x85, 0xdd, + 0xee, 0x5c, 0x61, 0x47, 0xf1, 0x44, 0x78, 0xe8, 0x65, 0xf6, 0x36, 0x14, 0x95, 0x7f, 0x98, 0x74, + 0x10, 0xb5, 0x32, 0x1c, 0x44, 0x7b, 0x73, 0x1f, 0xd2, 0xc4, 0x2e, 0x9f, 0x6a, 0x62, 0xf7, 0xd7, + 0x2d, 0x88, 0x15, 0x3c, 0xe8, 0x3a, 0x14, 0x5b, 0x3e, 0xb3, 0x1c, 0x0d, 0xa4, 0x39, 0xf6, 0xa3, + 0xa9, 0x17, 0x15, 0xbf, 0x14, 0xf9, 0xc7, 0x57, 0x64, 0x0d, 0x1c, 0x57, 0x46, 0x8b, 0x30, 0xdc, + 0x0a, 0x48, 0x35, 0x62, 0x31, 0x54, 0x7a, 0xd2, 0xe1, 0x6b, 0x84, 0xe3, 0x63, 0x59, 0xd1, 0xfe, + 0x79, 0x0b, 0x80, 0x5b, 0xb1, 0x39, 0xde, 0x16, 0x39, 0x01, 0xa9, 0x75, 0x09, 0x06, 0xc2, 0x16, + 0xa9, 0x75, 0xb3, 0xe9, 0x8d, 0xfb, 0x53, 0x6d, 0x91, 0x5a, 0x3c, 0xe0, 0xf4, 0x1f, 0x66, 0xb5, + 0xed, 0xef, 0x06, 0x18, 0x8f, 0xd1, 0xca, 0x11, 0x69, 0xa2, 0xa7, 0x8d, 0x98, 0x0a, 0x67, 0x13, + 0x31, 0x15, 0x8a, 0x0c, 0x5b, 0x13, 0x90, 0xbe, 0x0d, 0xf9, 0xa6, 0x73, 0x5f, 0x48, 0xc0, 0x9e, + 0xec, 0xde, 0x0d, 0x4a, 0x7f, 0x7e, 0xd5, 0xb9, 0xcf, 0x1f, 0x89, 0x4f, 0xca, 0x05, 0xb2, 0xea, + 0xdc, 0x3f, 0xe0, 0x96, 0xbb, 0xec, 0x90, 0xba, 0xe9, 0x86, 0xd1, 0x17, 0xfe, 0x73, 0xfc, 0x9f, + 0x2d, 0x3b, 0xda, 0x08, 0x6b, 0xcb, 0xf5, 0x84, 0x81, 0x56, 0x5f, 0x6d, 0xb9, 0x5e, 0xb2, 0x2d, + 0xd7, 0xeb, 0xa3, 0x2d, 0xd7, 0x43, 0xef, 0xc2, 0xb0, 0xb0, 0x9f, 0x14, 0x31, 0x8c, 0xae, 0xf6, + 0xd1, 0x9e, 0x30, 0xbf, 0xe4, 0x6d, 0x5e, 0x95, 0x8f, 0x60, 0x51, 0xda, 0xb3, 0x5d, 0xd9, 0x20, + 0xfa, 0x2b, 0x16, 0x8c, 0x8b, 0xdf, 0x98, 0xbc, 0xd3, 0x26, 0x61, 0x24, 0x78, 0xcf, 0x8f, 0xf7, + 0xdf, 0x07, 0x51, 0x91, 0x77, 0xe5, 0xe3, 0xf2, 0x98, 0x35, 0x81, 0x3d, 0x7b, 0x94, 0xe8, 0x05, + 0xfa, 0x7b, 0x16, 0x9c, 0x6a, 0x3a, 0xf7, 0x79, 0x8b, 0xbc, 0x0c, 0x3b, 0x91, 0xeb, 0x0b, 0x3b, + 0x84, 0x57, 0xfb, 0x9b, 0xfe, 0x8e, 0xea, 0xbc, 0x93, 0x52, 0x59, 0x7a, 0x2a, 0x0d, 0xa5, 0x67, + 0x57, 0x53, 0xfb, 0x35, 0xbb, 0x09, 0x05, 0xb9, 0xde, 0x52, 0x44, 0x0d, 0x25, 0x9d, 0xb1, 0x3e, + 0xb4, 0xf9, 0xaa, 0x1e, 0xab, 0x80, 0xb6, 0x23, 0xd6, 0xda, 0xb1, 0xb6, 0xf3, 0x36, 0x8c, 0xea, + 0x6b, 0xec, 0x58, 0xdb, 0x7a, 0x07, 0xa6, 0x53, 0xd6, 0xd2, 0xb1, 0x36, 0x79, 0x0f, 0xce, 0x66, + 0xae, 0x8f, 0xe3, 0x6c, 0xd8, 0xfe, 0x39, 0x4b, 0x3f, 0x07, 0x4f, 0x40, 0x75, 0xb0, 0x64, 0xaa, + 0x0e, 0x2e, 0x74, 0xdf, 0x39, 0x19, 0xfa, 0x83, 0xb7, 0xf4, 0x4e, 0xd3, 0x53, 0x1d, 0xbd, 0x0e, + 0x43, 0x0d, 0x5a, 0x22, 0xad, 0x70, 0xed, 0xde, 0x3b, 0x32, 0xe6, 0xa5, 0x58, 0x79, 0x88, 0x05, + 0x05, 0xfb, 0x97, 0x2c, 0x18, 0x38, 0x81, 0x91, 0xc0, 0xe6, 0x48, 0x3c, 0x9d, 0x49, 0x5a, 0x84, + 0x57, 0x9e, 0xc7, 0xce, 0xbd, 0xe5, 0xfb, 0x11, 0xf1, 0x42, 0xf6, 0x54, 0x4c, 0x1d, 0x98, 0xff, + 0x07, 0xa6, 0x6f, 0xfa, 0x4e, 0x7d, 0xd1, 0x69, 0x38, 0x5e, 0x8d, 0x04, 0x65, 0x6f, 0xeb, 0x50, + 0x16, 0xe4, 0xb9, 0x5e, 0x16, 0xe4, 0xf6, 0x36, 0x20, 0xbd, 0x01, 0xe1, 0x8a, 0x83, 0x61, 0xd8, + 0xe5, 0x4d, 0x89, 0xe1, 0x7f, 0x3c, 0x9d, 0x35, 0xeb, 0xe8, 0x99, 0xe6, 0x64, 0xc2, 0x0b, 0xb0, + 0x24, 0x64, 0xbf, 0x04, 0xa9, 0xfe, 0xfc, 0xbd, 0xc5, 0x06, 0xf6, 0xa7, 0x61, 0x8a, 0xd5, 0x3c, + 0xe4, 0x93, 0xd6, 0x4e, 0x48, 0x25, 0x53, 0x22, 0xfd, 0xd9, 0x5f, 0xb4, 0x60, 0x62, 0x2d, 0x11, + 0x00, 0xed, 0x32, 0xd3, 0x63, 0xa6, 0x08, 0xc3, 0xab, 0xac, 0x14, 0x0b, 0xe8, 0x91, 0xcb, 0xa0, + 0xfe, 0xc2, 0x82, 0x38, 0xc4, 0xc6, 0x09, 0x30, 0x5e, 0x4b, 0x06, 0xe3, 0x95, 0x2a, 0x1b, 0x51, + 0xdd, 0xc9, 0xe2, 0xbb, 0xd0, 0x0d, 0x15, 0x7c, 0xaa, 0x8b, 0x58, 0x24, 0x26, 0xc3, 0x43, 0x15, + 0x8d, 0x9b, 0x11, 0xaa, 0x64, 0x38, 0x2a, 0xfb, 0x3f, 0xe6, 0x00, 0x29, 0xdc, 0xbe, 0x83, 0x63, + 0x75, 0xd6, 0x38, 0x9a, 0xe0, 0x58, 0xbb, 0x80, 0x98, 0x26, 0x3e, 0x70, 0xbc, 0x90, 0x93, 0x75, + 0x85, 0xd4, 0xed, 0x70, 0x6a, 0xfe, 0x59, 0xd1, 0x24, 0xba, 0xd9, 0x41, 0x0d, 0xa7, 0xb4, 0xa0, + 0x59, 0x58, 0x0c, 0xf6, 0x6b, 0x61, 0x31, 0xd4, 0xc3, 0xdd, 0xee, 0x67, 0x2d, 0x18, 0x53, 0xc3, + 0xf4, 0x3e, 0x31, 0x86, 0x57, 0xfd, 0xc9, 0x38, 0xfa, 0x2a, 0x5a, 0x97, 0xd9, 0x95, 0xf0, 0xad, + 0xcc, 0x6d, 0xd2, 0x69, 0xb8, 0xef, 0x12, 0x15, 0x9a, 0x70, 0x4e, 0xb8, 0x41, 0x8a, 0xd2, 0x83, + 0xfd, 0xb9, 0x31, 0xf5, 0x8f, 0x87, 0x42, 0x8e, 0xab, 0xd8, 0x3f, 0x49, 0x37, 0xbb, 0xb9, 0x14, + 0xd1, 0x0b, 0x30, 0xd8, 0xda, 0x76, 0x42, 0x92, 0x70, 0x1a, 0x1a, 0xac, 0xd0, 0xc2, 0x83, 0xfd, + 0xb9, 0x71, 0x55, 0x81, 0x95, 0x60, 0x8e, 0xdd, 0x7f, 0xc8, 0xb1, 0xce, 0xc5, 0xd9, 0x33, 0xe4, + 0xd8, 0x9f, 0x58, 0x30, 0xb0, 0xe6, 0xd7, 0x4f, 0xe2, 0x08, 0x78, 0xcd, 0x38, 0x02, 0xce, 0x65, + 0x45, 0xa9, 0xcf, 0xdc, 0xfd, 0x2b, 0x89, 0xdd, 0x7f, 0x21, 0x93, 0x42, 0xf7, 0x8d, 0xdf, 0x84, + 0x11, 0x16, 0xfb, 0x5e, 0x38, 0x48, 0x3d, 0x67, 0x6c, 0xf8, 0xb9, 0xc4, 0x86, 0x9f, 0xd0, 0x50, + 0xb5, 0x9d, 0xfe, 0x04, 0x0c, 0x0b, 0x8f, 0x9b, 0xa4, 0xf7, 0xa9, 0xc0, 0xc5, 0x12, 0x6e, 0xff, + 0x78, 0x1e, 0x8c, 0x58, 0xfb, 0xe8, 0x57, 0x2c, 0x98, 0x0f, 0xb8, 0x25, 0x6e, 0xbd, 0xd4, 0x0e, + 0x5c, 0x6f, 0xab, 0x5a, 0xdb, 0x26, 0xf5, 0x76, 0xc3, 0xf5, 0xb6, 0xca, 0x5b, 0x9e, 0xaf, 0x8a, + 0x97, 0xef, 0x93, 0x5a, 0x9b, 0xa9, 0xaf, 0x7a, 0x04, 0xf6, 0x57, 0x16, 0xed, 0xcf, 0x3e, 0xd8, + 0x9f, 0x9b, 0xc7, 0x87, 0xa2, 0x8d, 0x0f, 0xd9, 0x17, 0xf4, 0x9b, 0x16, 0x5c, 0xe5, 0x21, 0xe8, + 0xfb, 0xef, 0x7f, 0x97, 0x77, 0x6e, 0x45, 0x92, 0x8a, 0x89, 0xac, 0x93, 0xa0, 0xb9, 0xf8, 0xa2, + 0x18, 0xd0, 0xab, 0x95, 0xc3, 0xb5, 0x85, 0x0f, 0xdb, 0x39, 0xfb, 0x9f, 0xe6, 0x61, 0x4c, 0x84, + 0xa6, 0x12, 0x77, 0xc0, 0x0b, 0xc6, 0x92, 0x78, 0x2c, 0xb1, 0x24, 0xa6, 0x0c, 0xe4, 0xa3, 0x39, + 0xfe, 0x43, 0x98, 0xa2, 0x87, 0xf3, 0x75, 0xe2, 0x04, 0xd1, 0x06, 0x71, 0xb8, 0xe1, 0x54, 0xfe, + 0xd0, 0xa7, 0xbf, 0x12, 0xac, 0xdd, 0x4c, 0x12, 0xc3, 0x9d, 0xf4, 0xbf, 0x99, 0xee, 0x1c, 0x0f, + 0x26, 0x3b, 0xa2, 0x8b, 0xbd, 0x09, 0x45, 0xe5, 0x2e, 0x22, 0x0e, 0x9d, 0xee, 0x41, 0xfa, 0x92, + 0x14, 0xb8, 0xf0, 0x2b, 0x76, 0x55, 0x8a, 0xc9, 0xd9, 0x7f, 0x3f, 0x67, 0x34, 0xc8, 0x27, 0x71, + 0x0d, 0x0a, 0x4e, 0x18, 0xba, 0x5b, 0x1e, 0xa9, 0x8b, 0x1d, 0xfb, 0xe1, 0xac, 0x1d, 0x6b, 0x34, + 0xc3, 0x5c, 0x76, 0x16, 0x44, 0x4d, 0xac, 0x68, 0xa0, 0xeb, 0xdc, 0x3c, 0x6d, 0x57, 0xbe, 0xd4, + 0xfa, 0xa3, 0x06, 0xd2, 0x80, 0x6d, 0x97, 0x60, 0x51, 0x1f, 0x7d, 0x86, 0xdb, 0x0f, 0xde, 0xf0, + 0xfc, 0x7b, 0xde, 0x35, 0xdf, 0x97, 0xe1, 0x1f, 0xfa, 0x23, 0x38, 0x25, 0xad, 0x06, 0x55, 0x75, + 0x6c, 0x52, 0xeb, 0x2f, 0x5c, 0xe7, 0xe7, 0x61, 0x9a, 0x92, 0x36, 0xbd, 0xb3, 0x43, 0x44, 0x60, + 0x42, 0xc4, 0x3d, 0x93, 0x65, 0x62, 0xec, 0x52, 0x1f, 0x61, 0x66, 0xed, 0x58, 0x02, 0x7c, 0xc3, + 0x24, 0x81, 0x93, 0x34, 0xed, 0x9f, 0xb2, 0x80, 0x79, 0xaa, 0x9e, 0x00, 0x3f, 0xf2, 0x09, 0x93, + 0x1f, 0x99, 0xc9, 0x1a, 0xe4, 0x0c, 0x56, 0xe4, 0x79, 0xbe, 0xb2, 0x2a, 0x81, 0x7f, 0x7f, 0x4f, + 0x18, 0x7d, 0xf4, 0x7e, 0x7f, 0xd8, 0xff, 0xdb, 0xe2, 0x87, 0x98, 0x72, 0xe6, 0x40, 0xdf, 0x0e, + 0x85, 0x9a, 0xd3, 0x72, 0x6a, 0x3c, 0x31, 0x4c, 0xa6, 0x2c, 0xce, 0xa8, 0x34, 0xbf, 0x24, 0x6a, + 0x70, 0xd9, 0x92, 0x8c, 0x9f, 0x57, 0x90, 0xc5, 0x3d, 0xe5, 0x49, 0xaa, 0xc9, 0xd9, 0x1d, 0x18, + 0x33, 0x88, 0x1d, 0xab, 0x20, 0xe2, 0xdb, 0xf9, 0x15, 0xab, 0xe2, 0x3d, 0x36, 0x61, 0xca, 0xd3, + 0xfe, 0xd3, 0x0b, 0x45, 0x3e, 0x2e, 0x3f, 0xdc, 0xeb, 0x12, 0x65, 0xb7, 0x8f, 0xe6, 0x04, 0x9b, + 0x20, 0x83, 0x3b, 0x29, 0xdb, 0x3f, 0x61, 0xc1, 0x23, 0x3a, 0xa2, 0xe6, 0x67, 0xd3, 0x4b, 0xba, + 0x5f, 0x82, 0x82, 0xdf, 0x22, 0x81, 0x13, 0xf9, 0x81, 0xb8, 0x35, 0xae, 0xc8, 0x41, 0xbf, 0x25, + 0xca, 0x0f, 0x44, 0x58, 0x75, 0x49, 0x5d, 0x96, 0x63, 0x55, 0x93, 0xbe, 0x3e, 0xd9, 0x60, 0x84, + 0xc2, 0xa3, 0x8a, 0x9d, 0x01, 0x4c, 0xd1, 0x1d, 0x62, 0x01, 0xb1, 0xbf, 0x66, 0xf1, 0x85, 0xa5, + 0x77, 0x1d, 0xbd, 0x03, 0x93, 0x4d, 0x27, 0xaa, 0x6d, 0x2f, 0xdf, 0x6f, 0x05, 0x5c, 0x57, 0x22, + 0xc7, 0xe9, 0xc9, 0x5e, 0xe3, 0xa4, 0x7d, 0x64, 0x6c, 0x12, 0xb9, 0x9a, 0x20, 0x86, 0x3b, 0xc8, + 0xa3, 0x0d, 0x18, 0x61, 0x65, 0xcc, 0x59, 0x30, 0xec, 0xc6, 0x1a, 0x64, 0xb5, 0xa6, 0x6c, 0x05, + 0x56, 0x63, 0x3a, 0x58, 0x27, 0x6a, 0xff, 0x4c, 0x9e, 0xef, 0x76, 0xc6, 0xca, 0x3f, 0x01, 0xc3, + 0x2d, 0xbf, 0xbe, 0x54, 0x2e, 0x61, 0x31, 0x0b, 0xea, 0x1a, 0xa9, 0xf0, 0x62, 0x2c, 0xe1, 0xe8, + 0x0a, 0x14, 0xc4, 0x4f, 0xa9, 0xdb, 0x62, 0x67, 0xb3, 0xc0, 0x0b, 0xb1, 0x82, 0xa2, 0x67, 0x01, + 0x5a, 0x81, 0xbf, 0xeb, 0xd6, 0x59, 0x10, 0x8b, 0xbc, 0x69, 0xe6, 0x53, 0x51, 0x10, 0xac, 0x61, + 0xa1, 0x57, 0x60, 0xac, 0xed, 0x85, 0x9c, 0x1d, 0xd1, 0x42, 0xd6, 0x2a, 0x03, 0x94, 0xdb, 0x3a, + 0x10, 0x9b, 0xb8, 0x68, 0x01, 0x86, 0x22, 0x87, 0x99, 0xad, 0x0c, 0x66, 0x9b, 0xcd, 0xae, 0x53, + 0x0c, 0x3d, 0x07, 0x09, 0xad, 0x80, 0x45, 0x45, 0xf4, 0xa6, 0xf4, 0xdb, 0xe5, 0x07, 0xbb, 0xb0, + 0x57, 0xef, 0xef, 0x12, 0xd0, 0xbc, 0x76, 0x85, 0x1d, 0xbc, 0x41, 0x0b, 0xbd, 0x0c, 0x40, 0xee, + 0x47, 0x24, 0xf0, 0x9c, 0x86, 0xb2, 0x0a, 0x53, 0x7c, 0x41, 0xc9, 0x5f, 0xf3, 0xa3, 0xdb, 0x21, + 0x59, 0x56, 0x18, 0x58, 0xc3, 0xb6, 0x7f, 0xb3, 0x08, 0x10, 0xf3, 0xed, 0xe8, 0xdd, 0x8e, 0x83, + 0xeb, 0xa9, 0xee, 0x9c, 0xfe, 0xd1, 0x9d, 0x5a, 0xe8, 0x7b, 0x2c, 0x18, 0x71, 0x1a, 0x0d, 0xbf, + 0xe6, 0xf0, 0xa0, 0xc2, 0xb9, 0xee, 0x07, 0xa7, 0x68, 0x7f, 0x21, 0xae, 0xc1, 0xbb, 0xf0, 0x9c, + 0x5c, 0xa1, 0x1a, 0xa4, 0x67, 0x2f, 0xf4, 0x86, 0xd1, 0xc7, 0xe4, 0x53, 0x31, 0x6f, 0x0c, 0xa5, + 0x7a, 0x2a, 0x16, 0xd9, 0x1d, 0xa1, 0xbf, 0x12, 0x6f, 0x1b, 0xaf, 0xc4, 0x81, 0x6c, 0xc7, 0x44, + 0x83, 0x7d, 0xed, 0xf5, 0x40, 0x44, 0x15, 0x3d, 0x48, 0xc1, 0x60, 0xb6, 0x17, 0xa0, 0xf6, 0x4e, + 0xea, 0x11, 0xa0, 0xe0, 0x6d, 0x98, 0xa8, 0x9b, 0x4c, 0x80, 0x58, 0x89, 0x8f, 0x67, 0xd1, 0x4d, + 0xf0, 0x0c, 0xf1, 0xb5, 0x9f, 0x00, 0xe0, 0x24, 0x61, 0x54, 0xe1, 0x31, 0x2b, 0xca, 0xde, 0xa6, + 0x2f, 0x7c, 0x26, 0xec, 0xcc, 0xb9, 0xdc, 0x0b, 0x23, 0xd2, 0xa4, 0x98, 0xf1, 0xed, 0xbe, 0x26, + 0xea, 0x62, 0x45, 0x05, 0xbd, 0x0e, 0x43, 0xcc, 0x0d, 0x2c, 0x9c, 0x29, 0x64, 0xcb, 0x8a, 0xcd, + 0x20, 0x6c, 0xf1, 0x86, 0x64, 0x7f, 0x43, 0x2c, 0x28, 0xa0, 0xeb, 0xd2, 0xc9, 0x32, 0x2c, 0x7b, + 0xb7, 0x43, 0xc2, 0x9c, 0x2c, 0x8b, 0x8b, 0x1f, 0x8e, 0xfd, 0x27, 0x79, 0x79, 0x6a, 0xa6, 0x32, + 0xa3, 0x26, 0xe5, 0xa2, 0xc4, 0x7f, 0x99, 0x00, 0x6d, 0x06, 0xb2, 0xbb, 0x67, 0x26, 0x49, 0x8b, + 0x87, 0xf3, 0x8e, 0x49, 0x02, 0x27, 0x69, 0x52, 0x8e, 0x94, 0xef, 0x7a, 0xe1, 0x75, 0xd1, 0xeb, + 0xec, 0xe0, 0x0f, 0x71, 0x76, 0x1b, 0xf1, 0x12, 0x2c, 0xea, 0x9f, 0x28, 0x7b, 0x30, 0xeb, 0xc1, + 0x64, 0x72, 0x8b, 0x1e, 0x2b, 0x3b, 0xf2, 0x07, 0x03, 0x30, 0x6e, 0x2e, 0x29, 0x74, 0x15, 0x8a, + 0x82, 0x88, 0x4a, 0x5a, 0xa0, 0x76, 0xc9, 0xaa, 0x04, 0xe0, 0x18, 0x87, 0xe5, 0xaa, 0x60, 0xd5, + 0x35, 0x33, 0xdb, 0x38, 0x57, 0x85, 0x82, 0x60, 0x0d, 0x8b, 0x3e, 0xac, 0x36, 0x7c, 0x3f, 0x52, + 0x17, 0x92, 0x5a, 0x77, 0x8b, 0xac, 0x14, 0x0b, 0x28, 0xbd, 0x88, 0x76, 0x48, 0xe0, 0x91, 0x86, + 0x19, 0xde, 0x58, 0x5d, 0x44, 0x37, 0x74, 0x20, 0x36, 0x71, 0xe9, 0x75, 0xea, 0x87, 0x6c, 0x21, + 0x8b, 0xe7, 0x5b, 0x6c, 0xb6, 0x5c, 0xe5, 0x7e, 0xde, 0x12, 0x8e, 0x3e, 0x0d, 0x8f, 0xa8, 0x10, + 0x4e, 0x98, 0xeb, 0x21, 0x64, 0x8b, 0x43, 0x86, 0xb4, 0xe5, 0x91, 0xa5, 0x74, 0x34, 0x9c, 0x55, + 0x1f, 0xbd, 0x06, 0xe3, 0x82, 0xc5, 0x97, 0x14, 0x87, 0x4d, 0xd3, 0x98, 0x1b, 0x06, 0x14, 0x27, + 0xb0, 0x65, 0x80, 0x66, 0xc6, 0x65, 0x4b, 0x0a, 0x85, 0xce, 0x00, 0xcd, 0x3a, 0x1c, 0x77, 0xd4, + 0x40, 0x0b, 0x30, 0xc1, 0x79, 0x30, 0xd7, 0xdb, 0xe2, 0x73, 0x22, 0x9c, 0xa2, 0xd4, 0x96, 0xba, + 0x65, 0x82, 0x71, 0x12, 0x1f, 0xbd, 0x04, 0xa3, 0x4e, 0x50, 0xdb, 0x76, 0x23, 0x52, 0x8b, 0xda, + 0x01, 0xf7, 0x96, 0xd2, 0x6c, 0x8b, 0x16, 0x34, 0x18, 0x36, 0x30, 0xed, 0x77, 0x61, 0x3a, 0x25, + 0x00, 0x04, 0x5d, 0x38, 0x4e, 0xcb, 0x95, 0xdf, 0x94, 0x30, 0x40, 0x5e, 0xa8, 0x94, 0xe5, 0xd7, + 0x68, 0x58, 0x74, 0x75, 0xb2, 0x40, 0x11, 0x5a, 0xbe, 0x43, 0xb5, 0x3a, 0x57, 0x24, 0x00, 0xc7, + 0x38, 0xf6, 0xff, 0xc8, 0xc1, 0x44, 0x8a, 0x6e, 0x85, 0xe5, 0xdc, 0x4b, 0x3c, 0x52, 0xe2, 0x14, + 0x7b, 0x66, 0xbc, 0xef, 0xdc, 0x21, 0xe2, 0x7d, 0xe7, 0x7b, 0xc5, 0xfb, 0x1e, 0x78, 0x2f, 0xf1, + 0xbe, 0xcd, 0x11, 0x1b, 0xec, 0x6b, 0xc4, 0x52, 0x62, 0x84, 0x0f, 0x1d, 0x32, 0x46, 0xb8, 0x31, + 0xe8, 0xc3, 0x7d, 0x0c, 0xfa, 0x0f, 0xe7, 0x60, 0x32, 0x69, 0x03, 0x79, 0x02, 0x72, 0xdb, 0xd7, + 0x0d, 0xb9, 0xed, 0x95, 0x7e, 0x5c, 0x5e, 0x33, 0x65, 0xb8, 0x38, 0x21, 0xc3, 0xfd, 0x68, 0x5f, + 0xd4, 0xba, 0xcb, 0x73, 0xff, 0x66, 0x0e, 0x4e, 0xa7, 0xfa, 0xdc, 0x9e, 0xc0, 0xd8, 0xdc, 0x32, + 0xc6, 0xe6, 0xe9, 0xbe, 0xdd, 0x81, 0x33, 0x07, 0xe8, 0x6e, 0x62, 0x80, 0xae, 0xf6, 0x4f, 0xb2, + 0xfb, 0x28, 0x7d, 0x35, 0x0f, 0x17, 0x52, 0xeb, 0xc5, 0x62, 0xcf, 0x15, 0x43, 0xec, 0xf9, 0x6c, + 0x42, 0xec, 0x69, 0x77, 0xaf, 0x7d, 0x34, 0x72, 0x50, 0xe1, 0xe8, 0xca, 0xa2, 0x19, 0x3c, 0xa4, + 0x0c, 0xd4, 0x70, 0x74, 0x55, 0x84, 0xb0, 0x49, 0xf7, 0x9b, 0x49, 0xf6, 0xf9, 0xaf, 0x2d, 0x38, + 0x9b, 0x3a, 0x37, 0x27, 0x20, 0xeb, 0x5a, 0x33, 0x65, 0x5d, 0x4f, 0xf4, 0xbd, 0x5a, 0x33, 0x84, + 0x5f, 0xbf, 0x3e, 0x90, 0xf1, 0x2d, 0xec, 0x25, 0x7f, 0x0b, 0x46, 0x9c, 0x5a, 0x8d, 0x84, 0xe1, + 0xaa, 0x5f, 0x57, 0x21, 0x8d, 0x9f, 0x66, 0xef, 0xac, 0xb8, 0xf8, 0x60, 0x7f, 0x6e, 0x36, 0x49, + 0x22, 0x06, 0x63, 0x9d, 0x02, 0xfa, 0x0c, 0x14, 0x42, 0x71, 0x6f, 0x8a, 0xb9, 0x7f, 0xae, 0xcf, + 0xc1, 0x71, 0x36, 0x48, 0xc3, 0x8c, 0xb9, 0xa4, 0x24, 0x15, 0x8a, 0xa4, 0x19, 0x9f, 0x25, 0x77, + 0xa4, 0xf1, 0x59, 0x9e, 0x05, 0xd8, 0x55, 0x8f, 0x81, 0xa4, 0xfc, 0x41, 0x7b, 0x26, 0x68, 0x58, + 0xe8, 0x93, 0x30, 0x19, 0xf2, 0xa0, 0x84, 0x4b, 0x0d, 0x27, 0x64, 0x6e, 0x2e, 0x62, 0x15, 0xb2, + 0xb8, 0x4e, 0xd5, 0x04, 0x0c, 0x77, 0x60, 0xa3, 0x15, 0xd9, 0x2a, 0x8b, 0xa0, 0xc8, 0x17, 0xe6, + 0xe5, 0xb8, 0x45, 0x91, 0xf1, 0xf7, 0x54, 0x72, 0xf8, 0xd9, 0xc0, 0x6b, 0x35, 0xd1, 0x67, 0x00, + 0xe8, 0xf2, 0x11, 0x72, 0x88, 0xe1, 0xec, 0xc3, 0x93, 0x9e, 0x2a, 0xf5, 0x54, 0xab, 0x5c, 0xe6, + 0x9b, 0x5a, 0x52, 0x44, 0xb0, 0x46, 0xd0, 0xfe, 0xe1, 0x01, 0x78, 0xb4, 0xcb, 0x19, 0x89, 0x16, + 0x4c, 0x3d, 0xec, 0x93, 0xc9, 0xc7, 0xf5, 0x6c, 0x6a, 0x65, 0xe3, 0xb5, 0x9d, 0x58, 0x8a, 0xb9, + 0xf7, 0xbc, 0x14, 0x7f, 0xc0, 0xd2, 0xc4, 0x1e, 0xdc, 0x56, 0xf3, 0x13, 0x87, 0x3c, 0xfb, 0x8f, + 0x50, 0x0e, 0xb2, 0x99, 0x22, 0x4c, 0x78, 0xb6, 0xef, 0xee, 0xf4, 0x2d, 0x5d, 0x38, 0x59, 0x29, + 0xf1, 0x6f, 0x5b, 0x70, 0xbe, 0x6b, 0x70, 0x8e, 0x6f, 0x40, 0x86, 0xc1, 0xfe, 0x82, 0x05, 0x8f, + 0xa5, 0xd6, 0x30, 0xcc, 0x8c, 0xae, 0x42, 0xb1, 0x46, 0x0b, 0x35, 0xff, 0xca, 0xd8, 0xf1, 0x5c, + 0x02, 0x70, 0x8c, 0x73, 0xc8, 0xc0, 0x23, 0xbf, 0x6a, 0x41, 0xc7, 0xa6, 0x3f, 0x81, 0xdb, 0xa7, + 0x6c, 0xde, 0x3e, 0x1f, 0xee, 0x67, 0x34, 0x33, 0x2e, 0x9e, 0x3f, 0x9e, 0x80, 0x33, 0x19, 0xfe, + 0x45, 0xbb, 0x30, 0xb5, 0x55, 0x23, 0xa6, 0xe7, 0x6a, 0xb7, 0xf8, 0x2f, 0x5d, 0xdd, 0x5c, 0x59, + 0x4e, 0xd2, 0xa9, 0x0e, 0x14, 0xdc, 0xd9, 0x04, 0xfa, 0x82, 0x05, 0xa7, 0x9c, 0x7b, 0xe1, 0x32, + 0xe5, 0x22, 0xdc, 0xda, 0x62, 0xc3, 0xaf, 0xed, 0xd0, 0x23, 0x5a, 0x6e, 0x84, 0xe7, 0x53, 0x25, + 0x3b, 0x77, 0xab, 0x1d, 0xf8, 0x46, 0xf3, 0x2c, 0x49, 0x6b, 0x1a, 0x16, 0x4e, 0x6d, 0x0b, 0x61, + 0x11, 0xb9, 0x9f, 0xbe, 0x51, 0xba, 0xf8, 0x56, 0xa7, 0x39, 0x82, 0xf1, 0x6b, 0x51, 0x42, 0xb0, + 0xa2, 0x83, 0x3e, 0x07, 0xc5, 0x2d, 0xe9, 0x9d, 0x99, 0x72, 0xed, 0xc6, 0x03, 0xd9, 0xdd, 0x67, + 0x95, 0xab, 0x67, 0x15, 0x12, 0x8e, 0x89, 0xa2, 0xd7, 0x20, 0xef, 0x6d, 0x86, 0xdd, 0xf2, 0x9c, + 0x26, 0xec, 0xf0, 0x78, 0x04, 0x83, 0xb5, 0x95, 0x2a, 0xa6, 0x15, 0xd1, 0x75, 0xc8, 0x07, 0x1b, + 0x75, 0x21, 0x96, 0x4c, 0xdd, 0xa4, 0x78, 0xb1, 0x94, 0xd1, 0x2b, 0x46, 0x09, 0x2f, 0x96, 0x30, + 0x25, 0x81, 0x2a, 0x30, 0xc8, 0x9c, 0x72, 0xc4, 0x25, 0x97, 0xca, 0xce, 0x77, 0x71, 0x6e, 0xe3, + 0x61, 0x0e, 0x18, 0x02, 0xe6, 0x84, 0xd0, 0x3a, 0x0c, 0xd5, 0x58, 0x4e, 0x4c, 0x11, 0xf1, 0xed, + 0x63, 0xa9, 0x02, 0xc8, 0x2e, 0xc9, 0x42, 0x85, 0x3c, 0x8e, 0x61, 0x60, 0x41, 0x8b, 0x51, 0x25, + 0xad, 0xed, 0xcd, 0x50, 0xe4, 0x70, 0x4e, 0xa7, 0xda, 0x25, 0x07, 0xae, 0xa0, 0xca, 0x30, 0xb0, + 0xa0, 0x85, 0x5e, 0x86, 0xdc, 0x66, 0x4d, 0x38, 0xdc, 0xa4, 0x4a, 0x22, 0xcd, 0x20, 0x14, 0x8b, + 0x43, 0x0f, 0xf6, 0xe7, 0x72, 0x2b, 0x4b, 0x38, 0xb7, 0x59, 0x43, 0x6b, 0x30, 0xbc, 0xc9, 0xdd, + 0xd6, 0x85, 0xb0, 0xf1, 0xf1, 0x74, 0x8f, 0xfa, 0x0e, 0xcf, 0x76, 0xee, 0x6b, 0x22, 0x00, 0x58, + 0x12, 0x61, 0x81, 0xf0, 0x95, 0xfb, 0xbd, 0x08, 0x8e, 0x36, 0x7f, 0xb8, 0x90, 0x09, 0x9c, 0xe9, + 0x88, 0x9d, 0xf8, 0xb1, 0x46, 0x91, 0xae, 0x6a, 0x47, 0x26, 0xd2, 0x17, 0x61, 0x62, 0x52, 0x57, + 0xb5, 0xca, 0xb6, 0xdf, 0x6d, 0x55, 0x2b, 0x24, 0x1c, 0x13, 0x45, 0x3b, 0x30, 0xb6, 0x1b, 0xb6, + 0xb6, 0x89, 0xdc, 0xd2, 0x2c, 0x6a, 0x4c, 0xc6, 0xbd, 0x7c, 0x47, 0x20, 0xba, 0x41, 0xd4, 0x76, + 0x1a, 0x1d, 0xa7, 0x10, 0xd3, 0xe9, 0xdf, 0xd1, 0x89, 0x61, 0x93, 0x36, 0x1d, 0xfe, 0x77, 0xda, + 0xfe, 0xc6, 0x5e, 0x44, 0x44, 0x4c, 0xb3, 0xd4, 0xe1, 0x7f, 0x83, 0xa3, 0x74, 0x0e, 0xbf, 0x00, + 0x60, 0x49, 0x04, 0xdd, 0x11, 0xc3, 0xc3, 0x4e, 0xcf, 0xc9, 0xec, 0xc0, 0xa3, 0x0b, 0x12, 0x29, + 0x63, 0x50, 0xd8, 0x69, 0x19, 0x93, 0x62, 0xa7, 0x64, 0x6b, 0xdb, 0x8f, 0x7c, 0x2f, 0x71, 0x42, + 0x4f, 0x65, 0x9f, 0x92, 0x95, 0x14, 0xfc, 0xce, 0x53, 0x32, 0x0d, 0x0b, 0xa7, 0xb6, 0x85, 0xea, + 0x30, 0xde, 0xf2, 0x83, 0xe8, 0x9e, 0x1f, 0xc8, 0xf5, 0x85, 0xba, 0x08, 0x4b, 0x0c, 0x4c, 0xd1, + 0x22, 0x0b, 0x17, 0x68, 0x42, 0x70, 0x82, 0x26, 0xfa, 0x14, 0x0c, 0x87, 0x35, 0xa7, 0x41, 0xca, + 0xb7, 0x66, 0xa6, 0xb3, 0xaf, 0x9f, 0x2a, 0x47, 0xc9, 0x58, 0x5d, 0x3c, 0x6a, 0x3e, 0x47, 0xc1, + 0x92, 0x1c, 0x5a, 0x81, 0x41, 0x96, 0xe8, 0x8c, 0x05, 0xe0, 0xcb, 0x88, 0x9f, 0xda, 0x61, 0x15, + 0xcd, 0xcf, 0x26, 0x56, 0x8c, 0x79, 0x75, 0xba, 0x07, 0xc4, 0x9b, 0xc1, 0x0f, 0x67, 0x4e, 0x67, + 0xef, 0x01, 0xf1, 0xd4, 0xb8, 0x55, 0xed, 0xb6, 0x07, 0x14, 0x12, 0x8e, 0x89, 0xd2, 0x93, 0x99, + 0x9e, 0xa6, 0x67, 0xba, 0x98, 0xf3, 0x64, 0x9e, 0xa5, 0xec, 0x64, 0xa6, 0x27, 0x29, 0x25, 0x61, + 0xff, 0xde, 0x70, 0x27, 0xcf, 0xc2, 0x5e, 0x99, 0xdf, 0x65, 0x75, 0x28, 0x20, 0x3f, 0xde, 0xaf, + 0xd0, 0xeb, 0x08, 0x59, 0xf0, 0x2f, 0x58, 0x70, 0xa6, 0x95, 0xfa, 0x21, 0x82, 0x01, 0xe8, 0x4f, + 0x76, 0xc6, 0x3f, 0x5d, 0x05, 0x6b, 0x4c, 0x87, 0xe3, 0x8c, 0x96, 0x92, 0xcf, 0x9c, 0xfc, 0x7b, + 0x7e, 0xe6, 0xac, 0x42, 0x81, 0x31, 0x99, 0x3d, 0x72, 0x44, 0x27, 0x5f, 0x7b, 0x8c, 0x95, 0x58, + 0x12, 0x15, 0xb1, 0x22, 0x81, 0x7e, 0xd0, 0x82, 0xf3, 0xc9, 0xae, 0x63, 0xc2, 0xc0, 0x22, 0xc2, + 0x23, 0x7f, 0xe0, 0xae, 0x88, 0xef, 0xef, 0xe0, 0xff, 0x0d, 0xe4, 0x83, 0x5e, 0x08, 0xb8, 0x7b, + 0x63, 0xa8, 0x94, 0xf2, 0xc2, 0x1e, 0x32, 0xb5, 0x0a, 0x7d, 0xbc, 0xb2, 0x9f, 0x87, 0xd1, 0xa6, + 0xdf, 0xf6, 0x22, 0x61, 0xfd, 0x23, 0x2c, 0x11, 0x98, 0x06, 0x7e, 0x55, 0x2b, 0xc7, 0x06, 0x56, + 0xe2, 0x6d, 0x5e, 0x78, 0xe8, 0xb7, 0xf9, 0x5b, 0x30, 0xea, 0x69, 0xe6, 0xaa, 0x82, 0x1f, 0xb8, + 0x9c, 0x1d, 0x9d, 0x55, 0x37, 0x6e, 0xe5, 0xbd, 0xd4, 0x4b, 0xb0, 0x41, 0xed, 0x64, 0x1f, 0x7c, + 0x5f, 0xb6, 0x52, 0x98, 0x7a, 0x2e, 0x02, 0x78, 0xd5, 0x14, 0x01, 0x5c, 0x4e, 0x8a, 0x00, 0x3a, + 0x24, 0xca, 0xc6, 0xeb, 0xbf, 0xff, 0xe4, 0x33, 0xfd, 0x86, 0x30, 0xb4, 0x1b, 0x70, 0xb1, 0xd7, + 0xb5, 0xc4, 0xcc, 0xc0, 0xea, 0x4a, 0x7f, 0x18, 0x9b, 0x81, 0xd5, 0xcb, 0x25, 0xcc, 0x20, 0xfd, + 0x06, 0xc7, 0xb1, 0xff, 0x9b, 0x05, 0xf9, 0x8a, 0x5f, 0x3f, 0x81, 0x07, 0xef, 0x27, 0x8c, 0x07, + 0xef, 0xa3, 0xe9, 0x17, 0x62, 0x3d, 0x53, 0x1e, 0xbe, 0x9c, 0x90, 0x87, 0x9f, 0xcf, 0x22, 0xd0, + 0x5d, 0xfa, 0xfd, 0x93, 0x79, 0x18, 0xa9, 0xf8, 0x75, 0x65, 0x83, 0xfd, 0xeb, 0x0f, 0x63, 0x83, + 0x9d, 0x99, 0x42, 0x41, 0xa3, 0xcc, 0xac, 0xc7, 0xa4, 0xe3, 0xe8, 0x37, 0x98, 0x29, 0xf6, 0x5d, + 0xe2, 0x6e, 0x6d, 0x47, 0xa4, 0x9e, 0xfc, 0x9c, 0x93, 0x33, 0xc5, 0xfe, 0xaf, 0x16, 0x4c, 0x24, + 0x5a, 0x47, 0x0d, 0x18, 0x6b, 0xe8, 0xd2, 0x56, 0xb1, 0x4e, 0x1f, 0x4a, 0x50, 0x2b, 0x4c, 0x59, + 0xb5, 0x22, 0x6c, 0x12, 0x47, 0xf3, 0x00, 0x4a, 0xfd, 0x28, 0xc5, 0x7a, 0x8c, 0xeb, 0x57, 0xfa, + 0xc9, 0x10, 0x6b, 0x18, 0xe8, 0x05, 0x18, 0x89, 0xfc, 0x96, 0xdf, 0xf0, 0xb7, 0xf6, 0x6e, 0x10, + 0x19, 0x8e, 0x49, 0x19, 0xa8, 0xad, 0xc7, 0x20, 0xac, 0xe3, 0xd9, 0x3f, 0x9d, 0xe7, 0x1f, 0xea, + 0x45, 0xee, 0x07, 0x6b, 0xf2, 0xfd, 0xbd, 0x26, 0xbf, 0x6a, 0xc1, 0x24, 0x6d, 0x9d, 0xd9, 0xc0, + 0xc8, 0xcb, 0x56, 0x45, 0x65, 0xb6, 0xba, 0x44, 0x65, 0xbe, 0x4c, 0xcf, 0xae, 0xba, 0xdf, 0x8e, + 0x84, 0x04, 0x4d, 0x3b, 0x9c, 0x68, 0x29, 0x16, 0x50, 0x81, 0x47, 0x82, 0x40, 0xf8, 0xed, 0xe9, + 0x78, 0x24, 0x08, 0xb0, 0x80, 0xca, 0xa0, 0xcd, 0x03, 0xe9, 0x41, 0x9b, 0x79, 0x70, 0x49, 0x61, + 0x2d, 0x21, 0xd8, 0x1e, 0x2d, 0xb8, 0xa4, 0x34, 0xa3, 0x88, 0x71, 0xec, 0x9f, 0xcb, 0xc3, 0x68, + 0xc5, 0xaf, 0xc7, 0x0a, 0xc0, 0xe7, 0x0d, 0x05, 0xe0, 0xc5, 0x84, 0x02, 0x70, 0x52, 0xc7, 0xfd, + 0x40, 0xdd, 0xf7, 0xf5, 0x52, 0xf7, 0xfd, 0x13, 0x8b, 0xcd, 0x5a, 0x69, 0xad, 0xca, 0x4d, 0xaa, + 0xd0, 0x33, 0x30, 0xc2, 0x0e, 0x24, 0xe6, 0x28, 0x2a, 0xb5, 0x62, 0x2c, 0x19, 0xd1, 0x5a, 0x5c, + 0x8c, 0x75, 0x1c, 0x74, 0x05, 0x0a, 0x21, 0x71, 0x82, 0xda, 0xb6, 0x3a, 0xe3, 0x84, 0x0a, 0x8b, + 0x97, 0x61, 0x05, 0x45, 0x6f, 0xc4, 0x71, 0x0d, 0xf3, 0xd9, 0x8e, 0x67, 0x7a, 0x7f, 0xf8, 0x16, + 0xc9, 0x0e, 0x66, 0x68, 0xdf, 0x05, 0xd4, 0x89, 0xdf, 0x47, 0x40, 0xaf, 0x39, 0x33, 0xa0, 0x57, + 0xb1, 0x23, 0x98, 0xd7, 0x9f, 0x5b, 0x30, 0x5e, 0xf1, 0xeb, 0x74, 0xeb, 0x7e, 0x33, 0xed, 0x53, + 0x3d, 0xa8, 0xeb, 0x50, 0x97, 0xa0, 0xae, 0x97, 0x60, 0xb0, 0xe2, 0xd7, 0xcb, 0x95, 0x6e, 0x0e, + 0xdb, 0xf6, 0xdf, 0xb2, 0x60, 0xb8, 0xe2, 0xd7, 0x4f, 0x40, 0x38, 0xff, 0xaa, 0x29, 0x9c, 0x7f, + 0x24, 0x63, 0xdd, 0x64, 0xc8, 0xe3, 0xff, 0xc6, 0x00, 0x8c, 0xd1, 0x7e, 0xfa, 0x5b, 0x72, 0x2a, + 0x8d, 0x61, 0xb3, 0xfa, 0x18, 0x36, 0xca, 0x0b, 0xfb, 0x8d, 0x86, 0x7f, 0x2f, 0x39, 0xad, 0x2b, + 0xac, 0x14, 0x0b, 0x28, 0x7a, 0x0a, 0x0a, 0xad, 0x80, 0xec, 0xba, 0xbe, 0x60, 0x32, 0x35, 0x55, + 0x47, 0x45, 0x94, 0x63, 0x85, 0x41, 0x1f, 0x67, 0xa1, 0xeb, 0xd5, 0x48, 0x95, 0xd4, 0x7c, 0xaf, + 0xce, 0xe5, 0xd7, 0x79, 0x91, 0x98, 0x41, 0x2b, 0xc7, 0x06, 0x16, 0xba, 0x0b, 0x45, 0xf6, 0x9f, + 0x1d, 0x3b, 0x87, 0x4f, 0xf1, 0x29, 0x52, 0xbe, 0x09, 0x02, 0x38, 0xa6, 0x85, 0x9e, 0x05, 0x88, + 0x64, 0xf4, 0xee, 0x50, 0x04, 0x6f, 0x52, 0x0c, 0xb9, 0x8a, 0xeb, 0x1d, 0x62, 0x0d, 0x0b, 0x3d, + 0x09, 0xc5, 0xc8, 0x71, 0x1b, 0x37, 0x5d, 0x8f, 0x84, 0x4c, 0x2e, 0x9d, 0x97, 0x99, 0xd7, 0x44, + 0x21, 0x8e, 0xe1, 0x94, 0x21, 0x62, 0x91, 0x0d, 0x78, 0x82, 0xe0, 0x02, 0xc3, 0x66, 0x0c, 0xd1, + 0x4d, 0x55, 0x8a, 0x35, 0x0c, 0xb4, 0x0d, 0xe7, 0x5c, 0x8f, 0x25, 0x31, 0x20, 0xd5, 0x1d, 0xb7, + 0xb5, 0x7e, 0xb3, 0x7a, 0x87, 0x04, 0xee, 0xe6, 0xde, 0xa2, 0x53, 0xdb, 0x21, 0x9e, 0x4c, 0xde, + 0xf8, 0x61, 0xd1, 0xc5, 0x73, 0xe5, 0x2e, 0xb8, 0xb8, 0x2b, 0x25, 0xfb, 0x25, 0x38, 0x5d, 0xf1, + 0xeb, 0x15, 0x3f, 0x88, 0x56, 0xfc, 0xe0, 0x9e, 0x13, 0xd4, 0xe5, 0x4a, 0x99, 0x93, 0x79, 0x5e, + 0xe8, 0x51, 0x38, 0xc8, 0x0f, 0x0a, 0x23, 0xdb, 0xd8, 0x73, 0x8c, 0xf9, 0x3a, 0xa4, 0x87, 0x4d, + 0x8d, 0xb1, 0x01, 0x2a, 0xa3, 0xc7, 0x35, 0x27, 0x22, 0xe8, 0x16, 0xcb, 0x54, 0x1c, 0xdf, 0x88, + 0xa2, 0xfa, 0x13, 0x5a, 0xa6, 0xe2, 0x18, 0x98, 0x7a, 0x85, 0x9a, 0xf5, 0xed, 0xff, 0x3e, 0xc8, + 0x0e, 0xc7, 0x44, 0x56, 0x08, 0xf4, 0x59, 0x18, 0x0f, 0xc9, 0x4d, 0xd7, 0x6b, 0xdf, 0x97, 0x32, + 0x81, 0x2e, 0x3e, 0x52, 0xd5, 0x65, 0x1d, 0x93, 0x4b, 0x16, 0xcd, 0x32, 0x9c, 0xa0, 0x86, 0x9a, + 0x30, 0x7e, 0xcf, 0xf5, 0xea, 0xfe, 0xbd, 0x50, 0xd2, 0x2f, 0x64, 0x0b, 0x18, 0xef, 0x72, 0xcc, + 0x44, 0x1f, 0x8d, 0xe6, 0xee, 0x1a, 0xc4, 0x70, 0x82, 0x38, 0x5d, 0x80, 0x41, 0xdb, 0x5b, 0x08, + 0x6f, 0x87, 0x24, 0x10, 0x39, 0xa7, 0xd9, 0x02, 0xc4, 0xb2, 0x10, 0xc7, 0x70, 0xba, 0x00, 0xd9, + 0x9f, 0x6b, 0x81, 0xdf, 0xe6, 0x31, 0xf6, 0xc5, 0x02, 0xc4, 0xaa, 0x14, 0x6b, 0x18, 0x74, 0x83, + 0xb2, 0x7f, 0x6b, 0xbe, 0x87, 0x7d, 0x3f, 0x92, 0x5b, 0x9a, 0x65, 0x39, 0xd5, 0xca, 0xb1, 0x81, + 0x85, 0x56, 0x00, 0x85, 0xed, 0x56, 0xab, 0xc1, 0x8c, 0x2f, 0x9c, 0x06, 0x23, 0xc5, 0x15, 0xdf, + 0x79, 0x1e, 0x7a, 0xb4, 0xda, 0x01, 0xc5, 0x29, 0x35, 0xe8, 0x59, 0xbd, 0x29, 0xba, 0x3a, 0xc8, + 0xba, 0xca, 0x95, 0x11, 0x55, 0xde, 0x4f, 0x09, 0x43, 0xcb, 0x30, 0x1c, 0xee, 0x85, 0xb5, 0x48, + 0xc4, 0x50, 0xcb, 0x48, 0xfc, 0x53, 0x65, 0x28, 0x5a, 0xde, 0x39, 0x5e, 0x05, 0xcb, 0xba, 0xa8, + 0x06, 0xd3, 0x82, 0xe2, 0xd2, 0xb6, 0xe3, 0xa9, 0x34, 0x2a, 0xdc, 0x06, 0xf5, 0x99, 0x07, 0xfb, + 0x73, 0xd3, 0xa2, 0x65, 0x1d, 0x7c, 0xb0, 0x3f, 0x77, 0xa6, 0xe2, 0xd7, 0x53, 0x20, 0x38, 0x8d, + 0x1a, 0x5f, 0x7c, 0xb5, 0x9a, 0xdf, 0x6c, 0x55, 0x02, 0x7f, 0xd3, 0x6d, 0x90, 0x6e, 0x0a, 0x9d, + 0xaa, 0x81, 0x29, 0x16, 0x9f, 0x51, 0x86, 0x13, 0xd4, 0xec, 0x6f, 0x67, 0xfc, 0x0c, 0x4b, 0xb3, + 0x1c, 0xb5, 0x03, 0x82, 0x9a, 0x30, 0xd6, 0x62, 0xdb, 0x44, 0x44, 0xbe, 0x17, 0x6b, 0xfd, 0xf9, + 0x3e, 0x05, 0x13, 0xf7, 0xe8, 0x35, 0xa0, 0x04, 0x87, 0xec, 0xc5, 0x57, 0xd1, 0xc9, 0x61, 0x93, + 0xba, 0xfd, 0x63, 0x8f, 0xb0, 0x1b, 0xb1, 0xca, 0xa5, 0x0d, 0xc3, 0xc2, 0xe4, 0x5d, 0x3c, 0xad, + 0x66, 0xb3, 0xc5, 0x5e, 0xf1, 0xb4, 0x08, 0xb3, 0x79, 0x2c, 0xeb, 0xa2, 0xcf, 0xc0, 0x38, 0x7d, + 0xa9, 0x68, 0xf9, 0x4b, 0x4e, 0x65, 0x87, 0x26, 0x88, 0xd3, 0x96, 0x68, 0x59, 0x31, 0xf4, 0xca, + 0x38, 0x41, 0x0c, 0xbd, 0xc1, 0x8c, 0x33, 0xcc, 0xd4, 0x28, 0x3d, 0x48, 0xeb, 0x76, 0x18, 0x92, + 0xac, 0x46, 0x24, 0x2b, 0xed, 0x8a, 0x7d, 0xbc, 0x69, 0x57, 0xd0, 0x4d, 0x18, 0x13, 0xb9, 0x86, + 0xc5, 0xca, 0xcd, 0x1b, 0xd2, 0xb8, 0x31, 0xac, 0x03, 0x0f, 0x92, 0x05, 0xd8, 0xac, 0x8c, 0xb6, + 0xe0, 0xbc, 0x96, 0xfb, 0xe7, 0x5a, 0xe0, 0x30, 0x95, 0xba, 0xcb, 0x8e, 0x53, 0xed, 0xae, 0x7e, + 0xec, 0xc1, 0xfe, 0xdc, 0xf9, 0xf5, 0x6e, 0x88, 0xb8, 0x3b, 0x1d, 0x74, 0x0b, 0x4e, 0x73, 0xc7, + 0xda, 0x12, 0x71, 0xea, 0x0d, 0xd7, 0x53, 0xcc, 0x00, 0xdf, 0xf2, 0x67, 0x1f, 0xec, 0xcf, 0x9d, + 0x5e, 0x48, 0x43, 0xc0, 0xe9, 0xf5, 0xd0, 0xab, 0x50, 0xac, 0x7b, 0xa1, 0x18, 0x83, 0x21, 0x23, + 0xbd, 0x52, 0xb1, 0xb4, 0x56, 0x55, 0xdf, 0x1f, 0xff, 0xc1, 0x71, 0x05, 0xb4, 0xc5, 0x25, 0xb6, + 0x4a, 0x40, 0x32, 0xdc, 0x11, 0x12, 0x28, 0x29, 0x6a, 0x33, 0x5c, 0xeb, 0xb8, 0xaa, 0x42, 0x59, + 0x9c, 0x1b, 0x5e, 0x77, 0x06, 0x61, 0xf4, 0x3a, 0x20, 0xfa, 0x82, 0x70, 0x6b, 0x64, 0xa1, 0xc6, + 0xd2, 0x2a, 0x30, 0x01, 0x77, 0xc1, 0x74, 0xf6, 0xaa, 0x76, 0x60, 0xe0, 0x94, 0x5a, 0xe8, 0x3a, + 0x3d, 0x55, 0xf4, 0x52, 0x71, 0x6a, 0xa9, 0x64, 0x78, 0x25, 0xd2, 0x0a, 0x48, 0xcd, 0x89, 0x48, + 0xdd, 0xa4, 0x88, 0x13, 0xf5, 0x50, 0x1d, 0xce, 0x39, 0xed, 0xc8, 0x67, 0xc2, 0x70, 0x13, 0x75, + 0xdd, 0xdf, 0x21, 0x1e, 0xd3, 0x43, 0x15, 0x16, 0x2f, 0x52, 0x6e, 0x63, 0xa1, 0x0b, 0x1e, 0xee, + 0x4a, 0x85, 0x72, 0x89, 0x2a, 0xfb, 0x2d, 0x98, 0x91, 0x8e, 0x52, 0x32, 0xe0, 0xbe, 0x00, 0x23, + 0xdb, 0x7e, 0x18, 0xad, 0x91, 0xe8, 0x9e, 0x1f, 0xec, 0x88, 0x78, 0x95, 0x71, 0x8c, 0xe3, 0x18, + 0x84, 0x75, 0x3c, 0xfa, 0x0c, 0x64, 0x56, 0x12, 0xe5, 0x12, 0x53, 0x50, 0x17, 0xe2, 0x33, 0xe6, + 0x3a, 0x2f, 0xc6, 0x12, 0x2e, 0x51, 0xcb, 0x95, 0x25, 0xa6, 0x6c, 0x4e, 0xa0, 0x96, 0x2b, 0x4b, + 0x58, 0xc2, 0xe9, 0x72, 0x0d, 0xb7, 0x9d, 0x80, 0x54, 0x02, 0xbf, 0x46, 0x42, 0x2d, 0xb2, 0xf6, + 0xa3, 0x3c, 0x1a, 0x27, 0x5d, 0xae, 0xd5, 0x34, 0x04, 0x9c, 0x5e, 0x0f, 0x91, 0xce, 0xbc, 0x57, + 0xe3, 0xd9, 0x5a, 0x82, 0x4e, 0x7e, 0xa6, 0xcf, 0xd4, 0x57, 0x1e, 0x4c, 0xaa, 0x8c, 0x5b, 0x3c, + 0xfe, 0x66, 0x38, 0x33, 0xc1, 0xd6, 0x76, 0xff, 0xc1, 0x3b, 0x95, 0xde, 0xa5, 0x9c, 0xa0, 0x84, + 0x3b, 0x68, 0x1b, 0xc1, 0xac, 0x26, 0x7b, 0xa6, 0x43, 0xbe, 0x0a, 0xc5, 0xb0, 0xbd, 0x51, 0xf7, + 0x9b, 0x8e, 0xeb, 0x31, 0x65, 0xb3, 0xf6, 0x1e, 0xa9, 0x4a, 0x00, 0x8e, 0x71, 0xd0, 0x0a, 0x14, + 0x1c, 0xa9, 0x54, 0x41, 0xd9, 0x31, 0x50, 0x94, 0x2a, 0x85, 0x87, 0x05, 0x90, 0x6a, 0x14, 0x55, + 0x17, 0xbd, 0x02, 0x63, 0xc2, 0x31, 0x54, 0x24, 0x7b, 0x9c, 0x36, 0xbd, 0x77, 0xaa, 0x3a, 0x10, + 0x9b, 0xb8, 0xe8, 0x36, 0x8c, 0x44, 0x7e, 0x83, 0xb9, 0xa0, 0x50, 0x36, 0xef, 0x4c, 0x76, 0x1c, + 0xb5, 0x75, 0x85, 0xa6, 0xcb, 0x33, 0x55, 0x55, 0xac, 0xd3, 0x41, 0xeb, 0x7c, 0xbd, 0xb3, 0x08, + 0xd3, 0x24, 0x9c, 0x79, 0x24, 0xfb, 0x4e, 0x52, 0x81, 0xa8, 0xcd, 0xed, 0x20, 0x6a, 0x62, 0x9d, + 0x0c, 0xba, 0x06, 0x53, 0xad, 0xc0, 0xf5, 0xd9, 0x9a, 0x50, 0xfa, 0xb4, 0x19, 0x33, 0xbd, 0x4d, + 0x25, 0x89, 0x80, 0x3b, 0xeb, 0x30, 0xbf, 0x5e, 0x51, 0x38, 0x73, 0x96, 0xe7, 0x83, 0xe6, 0xcf, + 0x3b, 0x5e, 0x86, 0x15, 0x14, 0xad, 0xb2, 0x93, 0x98, 0x4b, 0x26, 0x66, 0x66, 0xb3, 0xc3, 0xae, + 0xe8, 0x12, 0x0c, 0xce, 0xbc, 0xaa, 0xbf, 0x38, 0xa6, 0x80, 0xea, 0x5a, 0xe2, 0x40, 0xfa, 0x62, + 0x08, 0x67, 0xce, 0x75, 0x31, 0x55, 0x4b, 0x3c, 0x2f, 0x62, 0x86, 0xc0, 0x28, 0x0e, 0x71, 0x82, + 0x26, 0xfa, 0x24, 0x4c, 0x8a, 0x30, 0x6f, 0xf1, 0x30, 0x9d, 0x8f, 0x0d, 0x7b, 0x71, 0x02, 0x86, + 0x3b, 0xb0, 0x79, 0xe4, 0x7d, 0x67, 0xa3, 0x41, 0xc4, 0xd1, 0x77, 0xd3, 0xf5, 0x76, 0xc2, 0x99, + 0x0b, 0xec, 0x7c, 0x10, 0x91, 0xf7, 0x93, 0x50, 0x9c, 0x52, 0x03, 0xad, 0xc3, 0x64, 0x2b, 0x20, + 0xa4, 0xc9, 0x18, 0x7d, 0x71, 0x9f, 0xcd, 0x71, 0xb7, 0x76, 0xda, 0x93, 0x4a, 0x02, 0x76, 0x90, + 0x52, 0x86, 0x3b, 0x28, 0xa0, 0x7b, 0x50, 0xf0, 0x77, 0x49, 0xb0, 0x4d, 0x9c, 0xfa, 0xcc, 0xc5, + 0x2e, 0x86, 0xe6, 0xe2, 0x72, 0xbb, 0x25, 0x70, 0x13, 0x3a, 0x78, 0x59, 0xdc, 0x5b, 0x07, 0x2f, + 0x1b, 0x43, 0x3f, 0x64, 0xc1, 0x59, 0x29, 0xb6, 0xaf, 0xb6, 0xe8, 0xa8, 0x2f, 0xf9, 0x5e, 0x18, + 0x05, 0xdc, 0x11, 0xfb, 0xb1, 0x6c, 0xe7, 0xe4, 0xf5, 0x8c, 0x4a, 0x4a, 0x38, 0x7a, 0x36, 0x0b, + 0x23, 0xc4, 0xd9, 0x2d, 0xa2, 0x25, 0x98, 0x0a, 0x49, 0x24, 0x0f, 0xa3, 0x85, 0x70, 0xe5, 0x8d, + 0xd2, 0xda, 0xcc, 0x25, 0xee, 0x45, 0x4e, 0x37, 0x43, 0x35, 0x09, 0xc4, 0x9d, 0xf8, 0xb3, 0xdf, + 0x0a, 0x53, 0x1d, 0xd7, 0xff, 0x61, 0x32, 0x8a, 0xcc, 0xee, 0xc0, 0x98, 0x31, 0xc4, 0xc7, 0xaa, + 0xc3, 0xfd, 0x97, 0xc3, 0x50, 0x54, 0xfa, 0x3d, 0x74, 0xd5, 0x54, 0xdb, 0x9e, 0x4d, 0xaa, 0x6d, + 0x0b, 0xf4, 0x5d, 0xaf, 0x6b, 0x6a, 0xd7, 0x53, 0x62, 0x67, 0x65, 0x6d, 0xe8, 0xfe, 0x9d, 0xa2, + 0x35, 0x71, 0x6d, 0xbe, 0x6f, 0xfd, 0xef, 0x40, 0x57, 0x09, 0xf0, 0x35, 0x98, 0xf2, 0x7c, 0xc6, + 0x73, 0x92, 0xba, 0x64, 0x28, 0x18, 0xdf, 0x50, 0xd4, 0x83, 0x51, 0x24, 0x10, 0x70, 0x67, 0x1d, + 0xda, 0x20, 0xbf, 0xf8, 0x93, 0x22, 0x67, 0xce, 0x17, 0x60, 0x01, 0x45, 0x97, 0x60, 0xb0, 0xe5, + 0xd7, 0xcb, 0x15, 0xc1, 0x6f, 0x6a, 0xa9, 0x6e, 0xeb, 0xe5, 0x0a, 0xe6, 0x30, 0xb4, 0x00, 0x43, + 0xec, 0x47, 0x38, 0x33, 0x9a, 0x1d, 0x75, 0x80, 0xd5, 0xd0, 0xf2, 0xb5, 0xb0, 0x0a, 0x58, 0x54, + 0x64, 0xa2, 0x2f, 0xca, 0xa4, 0x33, 0xd1, 0xd7, 0xf0, 0x43, 0x8a, 0xbe, 0x24, 0x01, 0x1c, 0xd3, + 0x42, 0xf7, 0xe1, 0xb4, 0xf1, 0x30, 0xe2, 0x4b, 0x84, 0x84, 0xc2, 0xf3, 0xf9, 0x52, 0xd7, 0x17, + 0x91, 0xd0, 0x17, 0x9f, 0x17, 0x9d, 0x3e, 0x5d, 0x4e, 0xa3, 0x84, 0xd3, 0x1b, 0x40, 0x0d, 0x98, + 0xaa, 0x75, 0xb4, 0x5a, 0xe8, 0xbf, 0x55, 0x35, 0xa1, 0x9d, 0x2d, 0x76, 0x12, 0x46, 0xaf, 0x40, + 0xe1, 0x1d, 0x3f, 0x64, 0x67, 0xb5, 0xe0, 0x91, 0xa5, 0xdb, 0x6c, 0xe1, 0x8d, 0x5b, 0x55, 0x56, + 0x7e, 0xb0, 0x3f, 0x37, 0x52, 0xf1, 0xeb, 0xf2, 0x2f, 0x56, 0x15, 0xd0, 0xf7, 0x5a, 0x30, 0xdb, + 0xf9, 0xf2, 0x52, 0x9d, 0x1e, 0xeb, 0xbf, 0xd3, 0xb6, 0x68, 0x74, 0x76, 0x39, 0x93, 0x1c, 0xee, + 0xd2, 0x94, 0xfd, 0xcb, 0x5c, 0xb7, 0x2b, 0x34, 0x40, 0x24, 0x6c, 0x37, 0x4e, 0x22, 0x4d, 0xe5, + 0xb2, 0xa1, 0x9c, 0x7a, 0x68, 0xfb, 0x81, 0x7f, 0x66, 0x31, 0xfb, 0x81, 0x13, 0x74, 0x14, 0x78, + 0x03, 0x0a, 0x91, 0x4c, 0x36, 0xda, 0x25, 0xb3, 0xa6, 0xd6, 0x29, 0x66, 0x43, 0xa1, 0x38, 0x56, + 0x95, 0x57, 0x54, 0x91, 0xb1, 0xff, 0x21, 0x9f, 0x01, 0x09, 0x39, 0x01, 0x1d, 0x40, 0xc9, 0xd4, + 0x01, 0xcc, 0xf5, 0xf8, 0x82, 0x0c, 0x5d, 0xc0, 0x3f, 0x30, 0xfb, 0xcd, 0x24, 0x35, 0xef, 0x77, + 0xc3, 0x15, 0xfb, 0x47, 0x2c, 0x38, 0x95, 0x66, 0xe9, 0x49, 0x5f, 0x19, 0x5c, 0x4e, 0xa4, 0x0c, + 0x79, 0xd4, 0x08, 0xde, 0x11, 0xe5, 0x58, 0x61, 0xf4, 0x9d, 0xed, 0xea, 0x70, 0xd1, 0x5f, 0x6f, + 0xc1, 0x58, 0x25, 0x20, 0xda, 0x85, 0xf6, 0x1a, 0x77, 0xa3, 0xe6, 0xfd, 0x79, 0xea, 0xd0, 0x2e, + 0xd4, 0xf6, 0xcf, 0xe4, 0xe0, 0x14, 0xd7, 0xc4, 0x2f, 0xec, 0xfa, 0x6e, 0xbd, 0xe2, 0xd7, 0x45, + 0xa6, 0xb2, 0x37, 0x61, 0xb4, 0xa5, 0x09, 0xf7, 0xba, 0x45, 0x32, 0xd4, 0x85, 0x80, 0xb1, 0x38, + 0x42, 0x2f, 0xc5, 0x06, 0x2d, 0x54, 0x87, 0x51, 0xb2, 0xeb, 0xd6, 0x94, 0x3a, 0x37, 0x77, 0xe8, + 0xcb, 0x45, 0xb5, 0xb2, 0xac, 0xd1, 0xc1, 0x06, 0xd5, 0x63, 0xc8, 0x41, 0x6b, 0xff, 0xa8, 0x05, + 0x8f, 0x64, 0xc4, 0x3d, 0xa4, 0xcd, 0xdd, 0x63, 0x36, 0x0f, 0x22, 0x9d, 0xa5, 0x6a, 0x8e, 0x5b, + 0x42, 0x60, 0x01, 0x45, 0x9f, 0x02, 0xe0, 0x96, 0x0c, 0xf4, 0x99, 0xdb, 0x2b, 0x40, 0x9c, 0x11, + 0xdb, 0x4a, 0x0b, 0x53, 0x24, 0xeb, 0x63, 0x8d, 0x96, 0xfd, 0x53, 0x79, 0x18, 0xe4, 0xe9, 0xc4, + 0x57, 0x60, 0x78, 0x9b, 0xe7, 0x6f, 0xe8, 0x27, 0x55, 0x44, 0x2c, 0x80, 0xe0, 0x05, 0x58, 0x56, + 0x46, 0xab, 0x30, 0xcd, 0xf3, 0x5f, 0x34, 0x4a, 0xa4, 0xe1, 0xec, 0x49, 0x69, 0x19, 0xcf, 0x1d, + 0xa9, 0xa4, 0x86, 0xe5, 0x4e, 0x14, 0x9c, 0x56, 0x0f, 0xbd, 0x06, 0xe3, 0xf4, 0xf5, 0xe2, 0xb7, + 0x23, 0x49, 0x89, 0x67, 0xbe, 0x50, 0xcf, 0xa5, 0x75, 0x03, 0x8a, 0x13, 0xd8, 0xf4, 0x01, 0xdd, + 0xea, 0x90, 0x0b, 0x0e, 0xc6, 0x0f, 0x68, 0x53, 0x16, 0x68, 0xe2, 0x32, 0x13, 0xcf, 0x36, 0x33, + 0x68, 0x5d, 0xdf, 0x0e, 0x48, 0xb8, 0xed, 0x37, 0xea, 0x8c, 0xd1, 0x1a, 0xd4, 0x4c, 0x3c, 0x13, + 0x70, 0xdc, 0x51, 0x83, 0x52, 0xd9, 0x74, 0xdc, 0x46, 0x3b, 0x20, 0x31, 0x95, 0x21, 0x93, 0xca, + 0x4a, 0x02, 0x8e, 0x3b, 0x6a, 0xd0, 0x75, 0x74, 0xba, 0x12, 0xf8, 0xf4, 0xf0, 0x92, 0xc1, 0x5c, + 0x94, 0xdd, 0xee, 0xb0, 0xf4, 0x3b, 0xed, 0x12, 0xf6, 0x4c, 0x58, 0x36, 0x72, 0x0a, 0x86, 0xd2, + 0xbe, 0x2a, 0x3c, 0x4e, 0x25, 0x15, 0xf4, 0x0c, 0x8c, 0x88, 0xac, 0x06, 0xcc, 0xbc, 0x94, 0x4f, + 0x1d, 0x33, 0x32, 0x28, 0xc5, 0xc5, 0x58, 0xc7, 0xb1, 0xbf, 0x2f, 0x07, 0xd3, 0x29, 0xfe, 0x01, + 0xfc, 0xa8, 0xda, 0x72, 0xc3, 0x48, 0xe5, 0xc7, 0xd3, 0x8e, 0x2a, 0x5e, 0x8e, 0x15, 0x06, 0xdd, + 0x0f, 0xfc, 0x30, 0x4c, 0x1e, 0x80, 0xc2, 0xfe, 0x56, 0x40, 0x0f, 0x99, 0x69, 0xee, 0x22, 0x0c, + 0xb4, 0x43, 0x22, 0x03, 0x16, 0xaa, 0xf3, 0x9b, 0xe9, 0x9e, 0x18, 0x84, 0xb2, 0xc7, 0x5b, 0x4a, + 0x8d, 0xa3, 0xb1, 0xc7, 0x5c, 0x91, 0xc3, 0x61, 0xb4, 0x73, 0x11, 0xf1, 0x1c, 0x2f, 0x12, 0x4c, + 0x74, 0x1c, 0x79, 0x8b, 0x95, 0x62, 0x01, 0xb5, 0xbf, 0x94, 0x87, 0xb3, 0x99, 0x1e, 0x43, 0xb4, + 0xeb, 0x4d, 0xdf, 0x73, 0x23, 0x5f, 0x59, 0x6f, 0xf0, 0x68, 0x5b, 0xa4, 0xb5, 0xbd, 0x2a, 0xca, + 0xb1, 0xc2, 0x40, 0x97, 0x61, 0x90, 0x49, 0xae, 0x3a, 0x32, 0x05, 0x2e, 0x96, 0x78, 0xf8, 0x15, + 0x0e, 0xee, 0x3b, 0x0b, 0xeb, 0x25, 0x18, 0x68, 0xf9, 0x7e, 0x23, 0x79, 0x68, 0xd1, 0xee, 0xfa, + 0x7e, 0x03, 0x33, 0x20, 0xfa, 0x88, 0x18, 0xaf, 0x84, 0xb9, 0x02, 0x76, 0xea, 0x7e, 0xa8, 0x0d, + 0xda, 0x13, 0x30, 0xbc, 0x43, 0xf6, 0x02, 0xd7, 0xdb, 0x4a, 0x9a, 0xb1, 0xdc, 0xe0, 0xc5, 0x58, + 0xc2, 0xcd, 0xa4, 0x4f, 0xc3, 0x47, 0x9d, 0x3e, 0xb5, 0xd0, 0xf3, 0x0a, 0xfc, 0x81, 0x3c, 0x4c, + 0xe0, 0xc5, 0xd2, 0x07, 0x13, 0x71, 0xbb, 0x73, 0x22, 0x8e, 0x3a, 0x7d, 0x6a, 0xef, 0xd9, 0xf8, + 0x05, 0x0b, 0x26, 0x58, 0x6e, 0x05, 0x11, 0xa7, 0xc9, 0xf5, 0xbd, 0x13, 0x60, 0xf1, 0x2e, 0xc1, + 0x60, 0x40, 0x1b, 0x4d, 0xa6, 0x08, 0x64, 0x3d, 0xc1, 0x1c, 0x86, 0xce, 0xc1, 0x00, 0xeb, 0x02, + 0x9d, 0xbc, 0x51, 0x9e, 0x5d, 0xa9, 0xe4, 0x44, 0x0e, 0x66, 0xa5, 0x2c, 0xf8, 0x08, 0x26, 0xad, + 0x86, 0xcb, 0x3b, 0x1d, 0xeb, 0x15, 0xdf, 0x1f, 0xbe, 0xc4, 0xa9, 0x5d, 0x7b, 0x6f, 0xc1, 0x47, + 0xd2, 0x49, 0x76, 0x7f, 0x3e, 0xfd, 0x51, 0x0e, 0x2e, 0xa4, 0xd6, 0xeb, 0x3b, 0xf8, 0x48, 0xf7, + 0xda, 0xc7, 0x19, 0x83, 0x3f, 0x7f, 0x82, 0x46, 0x82, 0x03, 0xfd, 0x72, 0x98, 0x83, 0x7d, 0xc4, + 0x04, 0x49, 0x1d, 0xb2, 0xf7, 0x49, 0x4c, 0x90, 0xd4, 0xbe, 0x65, 0x3c, 0xff, 0xfe, 0x22, 0x97, + 0xf1, 0x2d, 0xec, 0x21, 0x78, 0x85, 0x9e, 0x33, 0x0c, 0x18, 0x0a, 0x8e, 0x79, 0x94, 0x9f, 0x31, + 0xbc, 0x0c, 0x2b, 0x28, 0x5a, 0x80, 0x89, 0xa6, 0xeb, 0xd1, 0xc3, 0x67, 0xcf, 0x64, 0xfc, 0x54, + 0xc8, 0xa6, 0x55, 0x13, 0x8c, 0x93, 0xf8, 0xc8, 0xd5, 0xe2, 0x85, 0xe4, 0xb2, 0x93, 0x6e, 0x67, + 0xf6, 0x76, 0xde, 0xd4, 0xb9, 0xaa, 0x51, 0x4c, 0x89, 0x1d, 0xb2, 0xaa, 0xbd, 0xff, 0xf3, 0xfd, + 0xbf, 0xff, 0x47, 0xd3, 0xdf, 0xfe, 0xb3, 0xaf, 0xc0, 0xd8, 0x43, 0x0b, 0x7c, 0xed, 0xaf, 0xe6, + 0xe1, 0xd1, 0x2e, 0xdb, 0x9e, 0x9f, 0xf5, 0xc6, 0x1c, 0x68, 0x67, 0x7d, 0xc7, 0x3c, 0x54, 0xe0, + 0xd4, 0x66, 0xbb, 0xd1, 0xd8, 0x63, 0x76, 0xf8, 0xa4, 0x2e, 0x31, 0x04, 0x4f, 0x79, 0x4e, 0xe6, + 0xb3, 0x5a, 0x49, 0xc1, 0xc1, 0xa9, 0x35, 0x29, 0x43, 0x4f, 0x6f, 0x92, 0x3d, 0x45, 0x2a, 0xc1, + 0xd0, 0x63, 0x1d, 0x88, 0x4d, 0x5c, 0x74, 0x0d, 0xa6, 0x9c, 0x5d, 0xc7, 0xe5, 0x41, 0x57, 0x25, + 0x01, 0xce, 0xd1, 0x2b, 0x39, 0xdd, 0x42, 0x12, 0x01, 0x77, 0xd6, 0x41, 0xaf, 0x03, 0xf2, 0x45, + 0xee, 0xff, 0x6b, 0xc4, 0x13, 0xaa, 0x31, 0x36, 0x77, 0xf9, 0xf8, 0x48, 0xb8, 0xd5, 0x81, 0x81, + 0x53, 0x6a, 0x25, 0xe2, 0x6f, 0x0c, 0x65, 0xc7, 0xdf, 0xe8, 0x7e, 0x2e, 0xf6, 0x4c, 0xff, 0xf0, + 0x9f, 0x2c, 0x7a, 0x7d, 0x71, 0x26, 0xdf, 0x0c, 0x23, 0xf7, 0x0a, 0x33, 0x6d, 0xe3, 0x32, 0x3c, + 0x2d, 0x6a, 0xc4, 0x69, 0xcd, 0xb4, 0x2d, 0x06, 0x62, 0x13, 0x97, 0x2f, 0x88, 0x30, 0x76, 0x56, + 0x34, 0x58, 0x7c, 0x11, 0xeb, 0x46, 0x61, 0xa0, 0x4f, 0xc3, 0x70, 0xdd, 0xdd, 0x75, 0x43, 0x3f, + 0x10, 0x2b, 0xfd, 0x90, 0xea, 0x82, 0xf8, 0x1c, 0x2c, 0x71, 0x32, 0x58, 0xd2, 0xb3, 0x7f, 0x20, + 0x07, 0x63, 0xb2, 0xc5, 0x37, 0xda, 0x7e, 0xe4, 0x9c, 0xc0, 0xb5, 0x7c, 0xcd, 0xb8, 0x96, 0x3f, + 0xd2, 0x2d, 0xe0, 0x0f, 0xeb, 0x52, 0xe6, 0x75, 0x7c, 0x2b, 0x71, 0x1d, 0x3f, 0xde, 0x9b, 0x54, + 0xf7, 0x6b, 0xf8, 0x1f, 0x59, 0x30, 0x65, 0xe0, 0x9f, 0xc0, 0x6d, 0xb0, 0x62, 0xde, 0x06, 0x8f, + 0xf5, 0xfc, 0x86, 0x8c, 0x5b, 0xe0, 0xbb, 0xf3, 0x89, 0xbe, 0xb3, 0xd3, 0xff, 0x1d, 0x18, 0xd8, + 0x76, 0x82, 0x7a, 0xb7, 0x00, 0xe7, 0x1d, 0x95, 0xe6, 0xaf, 0x3b, 0x81, 0xd0, 0x0d, 0x3e, 0xa5, + 0x72, 0x5e, 0x3b, 0x41, 0x6f, 0xbd, 0x20, 0x6b, 0x0a, 0xbd, 0x04, 0x43, 0x61, 0xcd, 0x6f, 0x29, + 0xcb, 0xf9, 0x8b, 0x3c, 0x1f, 0x36, 0x2d, 0x39, 0xd8, 0x9f, 0x43, 0x66, 0x73, 0xb4, 0x18, 0x0b, + 0x7c, 0xf4, 0x26, 0x8c, 0xb1, 0x5f, 0xca, 0x50, 0x27, 0x9f, 0x9d, 0x0c, 0xa9, 0xaa, 0x23, 0x72, + 0x2b, 0x36, 0xa3, 0x08, 0x9b, 0xa4, 0x66, 0xb7, 0xa0, 0xa8, 0x3e, 0xeb, 0x58, 0xf5, 0x71, 0xff, + 0x2e, 0x0f, 0xd3, 0x29, 0x6b, 0x0e, 0x85, 0xc6, 0x4c, 0x3c, 0xd3, 0xe7, 0x52, 0x7d, 0x8f, 0x73, + 0x11, 0xb2, 0xd7, 0x50, 0x5d, 0xac, 0xad, 0xbe, 0x1b, 0xbd, 0x1d, 0x92, 0x64, 0xa3, 0xb4, 0xa8, + 0x77, 0xa3, 0xb4, 0xb1, 0x13, 0x1b, 0x6a, 0xda, 0x90, 0xea, 0xe9, 0xb1, 0xce, 0xe9, 0x9f, 0xe6, + 0xe1, 0x54, 0x5a, 0x0c, 0x32, 0xf4, 0xf9, 0x44, 0x62, 0xbc, 0xe7, 0xfb, 0x8d, 0x5e, 0xc6, 0xb3, + 0xe5, 0x71, 0x19, 0xf0, 0xe2, 0xbc, 0x99, 0x2a, 0xaf, 0xe7, 0x30, 0x8b, 0x36, 0x99, 0x23, 0x7e, + 0xc0, 0x13, 0x1a, 0xca, 0xe3, 0xe3, 0xe3, 0x7d, 0x77, 0x40, 0x64, 0x42, 0x0c, 0x13, 0x46, 0x00, + 0xb2, 0xb8, 0xb7, 0x11, 0x80, 0x6c, 0x79, 0xd6, 0x85, 0x11, 0xed, 0x6b, 0x8e, 0x75, 0xc6, 0x77, + 0xe8, 0x6d, 0xa5, 0xf5, 0xfb, 0x58, 0x67, 0xfd, 0x47, 0x2d, 0x48, 0xd8, 0x85, 0x2b, 0xb1, 0x98, + 0x95, 0x29, 0x16, 0xbb, 0x08, 0x03, 0x81, 0xdf, 0x20, 0xc9, 0x3c, 0x74, 0xd8, 0x6f, 0x10, 0xcc, + 0x20, 0x14, 0x23, 0x8a, 0x85, 0x1d, 0xa3, 0xfa, 0x43, 0x4e, 0x3c, 0xd1, 0x2e, 0xc1, 0x60, 0x83, + 0xec, 0x92, 0x46, 0x32, 0x5d, 0xc8, 0x4d, 0x5a, 0x88, 0x39, 0xcc, 0xfe, 0x85, 0x01, 0x38, 0xdf, + 0x35, 0x94, 0x05, 0x7d, 0x0e, 0x6d, 0x39, 0x11, 0xb9, 0xe7, 0xec, 0x25, 0xe3, 0xfa, 0x5f, 0xe3, + 0xc5, 0x58, 0xc2, 0x99, 0xe7, 0x0e, 0x0f, 0xcf, 0x9b, 0x10, 0x22, 0x8a, 0xa8, 0xbc, 0x02, 0x6a, + 0x0a, 0xa5, 0xf2, 0x47, 0x21, 0x94, 0x7a, 0x16, 0x20, 0x0c, 0x1b, 0xdc, 0x7a, 0xa6, 0x2e, 0x5c, + 0x82, 0xe2, 0x30, 0xce, 0xd5, 0x9b, 0x02, 0x82, 0x35, 0x2c, 0x54, 0x82, 0xc9, 0x56, 0xe0, 0x47, + 0x5c, 0x26, 0x5b, 0xe2, 0x06, 0x66, 0x83, 0x66, 0x14, 0x81, 0x4a, 0x02, 0x8e, 0x3b, 0x6a, 0xa0, + 0x17, 0x60, 0x44, 0x44, 0x16, 0xa8, 0xf8, 0x7e, 0x43, 0x88, 0x81, 0x94, 0xcd, 0x55, 0x35, 0x06, + 0x61, 0x1d, 0x4f, 0xab, 0xc6, 0x04, 0xbd, 0xc3, 0xa9, 0xd5, 0xb8, 0xb0, 0x57, 0xc3, 0x4b, 0xc4, + 0x23, 0x2c, 0xf4, 0x15, 0x8f, 0x30, 0x16, 0x8c, 0x15, 0xfb, 0xd6, 0x6d, 0x41, 0x4f, 0x51, 0xd2, + 0xcf, 0x0e, 0xc0, 0xb4, 0x58, 0x38, 0xc7, 0xbd, 0x5c, 0x6e, 0x77, 0x2e, 0x97, 0xa3, 0x10, 0x9d, + 0x7d, 0xb0, 0x66, 0x4e, 0x7a, 0xcd, 0xfc, 0xa0, 0x05, 0x26, 0x7b, 0x85, 0xfe, 0xdf, 0xcc, 0xc4, + 0x28, 0x2f, 0x64, 0xb2, 0x6b, 0x75, 0x79, 0x81, 0xbc, 0xc7, 0x14, 0x29, 0xf6, 0x7f, 0xb0, 0xe0, + 0xb1, 0x9e, 0x14, 0xd1, 0x32, 0x14, 0x19, 0x0f, 0xa8, 0xbd, 0xce, 0x1e, 0x57, 0x06, 0xa8, 0x12, + 0x90, 0xc1, 0x92, 0xc6, 0x35, 0xd1, 0x72, 0x47, 0x06, 0x9a, 0x27, 0x52, 0x32, 0xd0, 0x9c, 0x36, + 0x86, 0xe7, 0x21, 0x53, 0xd0, 0x7c, 0x3f, 0xbd, 0x71, 0x0c, 0xe7, 0x0f, 0xf4, 0x71, 0x43, 0xec, + 0x67, 0x27, 0xc4, 0x7e, 0xc8, 0xc4, 0xd6, 0xee, 0x90, 0x4f, 0xc2, 0x24, 0x0b, 0x39, 0xc4, 0xcc, + 0xa1, 0x85, 0x5b, 0x4a, 0x2e, 0x36, 0x79, 0xbc, 0x99, 0x80, 0xe1, 0x0e, 0x6c, 0xfb, 0x0f, 0xf3, + 0x30, 0xc4, 0xb7, 0xdf, 0x09, 0xbc, 0x09, 0x9f, 0x84, 0xa2, 0xdb, 0x6c, 0xb6, 0x79, 0x52, 0x91, + 0x41, 0xee, 0x8b, 0x4a, 0xe7, 0xa9, 0x2c, 0x0b, 0x71, 0x0c, 0x47, 0x2b, 0x42, 0xe2, 0xdc, 0x25, + 0xaa, 0x21, 0xef, 0xf8, 0x7c, 0xc9, 0x89, 0x1c, 0xce, 0xe0, 0xa8, 0x7b, 0x36, 0x96, 0x4d, 0xa3, + 0xcf, 0x02, 0x84, 0x51, 0xe0, 0x7a, 0x5b, 0xb4, 0x4c, 0x04, 0xf1, 0xfc, 0x68, 0x17, 0x6a, 0x55, + 0x85, 0xcc, 0x69, 0xc6, 0x67, 0x8e, 0x02, 0x60, 0x8d, 0x22, 0x9a, 0x37, 0x6e, 0xfa, 0xd9, 0xc4, + 0xdc, 0x01, 0xa7, 0x1a, 0xcf, 0xd9, 0xec, 0x8b, 0x50, 0x54, 0xc4, 0x7b, 0xc9, 0x9f, 0x46, 0x75, + 0xb6, 0xe8, 0x13, 0x30, 0x91, 0xe8, 0xdb, 0xa1, 0xc4, 0x57, 0xbf, 0x68, 0xc1, 0x04, 0xef, 0xcc, + 0xb2, 0xb7, 0x2b, 0x6e, 0x83, 0x77, 0xe1, 0x54, 0x23, 0xe5, 0x54, 0x16, 0xd3, 0xdf, 0xff, 0x29, + 0xae, 0xc4, 0x55, 0x69, 0x50, 0x9c, 0xda, 0x06, 0xba, 0x42, 0x77, 0x1c, 0x3d, 0x75, 0x9d, 0x86, + 0x70, 0x4d, 0x1d, 0xe5, 0xbb, 0x8d, 0x97, 0x61, 0x05, 0xb5, 0x7f, 0xc7, 0x82, 0x29, 0xde, 0xf3, + 0x1b, 0x64, 0x4f, 0x9d, 0x4d, 0x5f, 0xcf, 0xbe, 0x8b, 0x74, 0x56, 0xb9, 0x8c, 0x74, 0x56, 0xfa, + 0xa7, 0xe5, 0xbb, 0x7e, 0xda, 0xcf, 0x58, 0x20, 0x56, 0xc8, 0x09, 0x08, 0x21, 0xbe, 0xd5, 0x14, + 0x42, 0xcc, 0x66, 0x6f, 0x82, 0x0c, 0xe9, 0xc3, 0x9f, 0x5b, 0x30, 0xc9, 0x11, 0x62, 0x6d, 0xf9, + 0xd7, 0x75, 0x1e, 0xfa, 0x49, 0x7a, 0x7b, 0x83, 0xec, 0xad, 0xfb, 0x15, 0x27, 0xda, 0x4e, 0xff, + 0x28, 0x63, 0xb2, 0x06, 0xba, 0x4e, 0x56, 0x5d, 0x6e, 0xa0, 0x43, 0x64, 0xd2, 0x3e, 0x74, 0xb6, + 0x07, 0xfb, 0x6b, 0x16, 0x20, 0xde, 0x8c, 0xc1, 0xb8, 0x51, 0x76, 0x88, 0x95, 0x6a, 0x17, 0x5d, + 0x7c, 0x34, 0x29, 0x08, 0xd6, 0xb0, 0x8e, 0x64, 0x78, 0x12, 0x26, 0x0f, 0xf9, 0xde, 0x26, 0x0f, + 0x87, 0x18, 0xd1, 0x7f, 0x35, 0x04, 0x49, 0x07, 0x18, 0x74, 0x07, 0x46, 0x6b, 0x4e, 0xcb, 0xd9, + 0x70, 0x1b, 0x6e, 0xe4, 0x92, 0xb0, 0x9b, 0xad, 0xd4, 0x92, 0x86, 0x27, 0x94, 0xd4, 0x5a, 0x09, + 0x36, 0xe8, 0xa0, 0x79, 0x80, 0x56, 0xe0, 0xee, 0xba, 0x0d, 0xb2, 0xc5, 0x64, 0x25, 0xcc, 0x19, + 0x9e, 0x1b, 0x00, 0xc9, 0x52, 0xac, 0x61, 0xa4, 0x78, 0x1b, 0xe7, 0x8f, 0xd9, 0xdb, 0x18, 0x4e, + 0xcc, 0xdb, 0x78, 0xe0, 0x50, 0xde, 0xc6, 0x85, 0x43, 0x7b, 0x1b, 0x0f, 0xf6, 0xe5, 0x6d, 0x8c, + 0xe1, 0x8c, 0xe4, 0x3d, 0xe9, 0xff, 0x15, 0xb7, 0x41, 0xc4, 0x83, 0x83, 0x7b, 0xf0, 0xcf, 0x3e, + 0xd8, 0x9f, 0x3b, 0x83, 0x53, 0x31, 0x70, 0x46, 0x4d, 0xf4, 0x29, 0x98, 0x71, 0x1a, 0x0d, 0xff, + 0x9e, 0x9a, 0xd4, 0xe5, 0xb0, 0xe6, 0x34, 0xb8, 0x12, 0x62, 0x98, 0x51, 0x3d, 0xf7, 0x60, 0x7f, + 0x6e, 0x66, 0x21, 0x03, 0x07, 0x67, 0xd6, 0x46, 0xaf, 0x42, 0xb1, 0x15, 0xf8, 0xb5, 0x55, 0xcd, + 0x4b, 0xef, 0x02, 0x1d, 0xc0, 0x8a, 0x2c, 0x3c, 0xd8, 0x9f, 0x1b, 0x53, 0x7f, 0xd8, 0x85, 0x1f, + 0x57, 0x48, 0x71, 0x1f, 0x1e, 0x39, 0x52, 0xf7, 0xe1, 0x1d, 0x98, 0xae, 0x92, 0xc0, 0x65, 0x79, + 0xb7, 0xeb, 0xf1, 0xf9, 0xb4, 0x0e, 0xc5, 0x20, 0x71, 0x22, 0xf7, 0x15, 0x69, 0x50, 0x0b, 0xbb, + 0x2f, 0x4f, 0xe0, 0x98, 0x90, 0xfd, 0xbf, 0x2c, 0x18, 0x16, 0x0e, 0x2f, 0x27, 0xc0, 0x35, 0x2e, + 0x18, 0x9a, 0x84, 0xb9, 0xf4, 0x01, 0x63, 0x9d, 0xc9, 0xd4, 0x21, 0x94, 0x13, 0x3a, 0x84, 0xc7, + 0xba, 0x11, 0xe9, 0xae, 0x3d, 0xf8, 0x6b, 0x79, 0xca, 0xbd, 0x1b, 0xae, 0x97, 0xc7, 0x3f, 0x04, + 0x6b, 0x30, 0x1c, 0x0a, 0xd7, 0xbf, 0x5c, 0xb6, 0xad, 0x7a, 0x72, 0x12, 0x63, 0x3b, 0x36, 0xe1, + 0xec, 0x27, 0x89, 0xa4, 0xfa, 0x14, 0xe6, 0x8f, 0xd1, 0xa7, 0xb0, 0x97, 0x73, 0xea, 0xc0, 0x51, + 0x38, 0xa7, 0xda, 0x5f, 0x61, 0x37, 0xa7, 0x5e, 0x7e, 0x02, 0x4c, 0xd5, 0x35, 0xf3, 0x8e, 0xb5, + 0xbb, 0xac, 0x2c, 0xd1, 0xa9, 0x0c, 0xe6, 0xea, 0xe7, 0x2d, 0x38, 0x9f, 0xf2, 0x55, 0x1a, 0xa7, + 0xf5, 0x14, 0x14, 0x9c, 0x76, 0xdd, 0x55, 0x7b, 0x59, 0xd3, 0x27, 0x2e, 0x88, 0x72, 0xac, 0x30, + 0xd0, 0x12, 0x4c, 0x91, 0xfb, 0x2d, 0x97, 0xab, 0x52, 0x75, 0x63, 0xd3, 0x3c, 0xf7, 0x92, 0x5a, + 0x4e, 0x02, 0x71, 0x27, 0xbe, 0x0a, 0x08, 0x92, 0xcf, 0x0c, 0x08, 0xf2, 0x77, 0x2d, 0x18, 0x51, + 0xce, 0x6f, 0xc7, 0x3e, 0xda, 0x9f, 0x34, 0x47, 0xfb, 0xd1, 0x2e, 0xa3, 0x9d, 0x31, 0xcc, 0xbf, + 0x9d, 0x53, 0xfd, 0xad, 0xf8, 0x41, 0xd4, 0x07, 0x07, 0xf7, 0x12, 0x14, 0x5a, 0x81, 0x1f, 0xf9, + 0x35, 0xbf, 0x21, 0x18, 0xb8, 0x73, 0x71, 0x64, 0x1c, 0x5e, 0x7e, 0xa0, 0xfd, 0xc6, 0x0a, 0x9b, + 0xf2, 0x4e, 0x4e, 0xab, 0x25, 0x01, 0xd2, 0x06, 0x8d, 0xc5, 0x8d, 0x8d, 0x8b, 0xb1, 0x8e, 0xc3, + 0x06, 0xdc, 0x0f, 0x22, 0xc1, 0x67, 0xc5, 0x03, 0xee, 0x07, 0x11, 0x66, 0x10, 0x54, 0x07, 0x88, + 0x9c, 0x60, 0x8b, 0x44, 0xb4, 0x4c, 0x04, 0xef, 0xca, 0x3e, 0x6f, 0xda, 0x91, 0xdb, 0x98, 0x77, + 0xbd, 0x28, 0x8c, 0x82, 0xf9, 0xb2, 0x17, 0xdd, 0x0a, 0xf8, 0x13, 0x52, 0x8b, 0x8e, 0xa3, 0x68, + 0x61, 0x8d, 0xae, 0x74, 0xf4, 0x66, 0x6d, 0x0c, 0x9a, 0xc6, 0x0c, 0x6b, 0xa2, 0x1c, 0x2b, 0x0c, + 0xfb, 0x45, 0x76, 0xfb, 0xb0, 0x31, 0x3d, 0x5c, 0x38, 0x99, 0x5f, 0x2e, 0xaa, 0xd9, 0x60, 0x9a, + 0xcc, 0x92, 0x1e, 0xb4, 0xa6, 0xfb, 0x61, 0x4f, 0x1b, 0xd6, 0xfd, 0xb5, 0xe2, 0xc8, 0x36, 0xe8, + 0xdb, 0x3a, 0x0c, 0x54, 0x9e, 0xee, 0x71, 0x6b, 0x1c, 0xc2, 0x24, 0x85, 0x25, 0x91, 0x60, 0x21, + 0xf6, 0xcb, 0x15, 0xb1, 0x2f, 0xb4, 0x24, 0x12, 0x02, 0x80, 0x63, 0x1c, 0x74, 0x55, 0x08, 0x08, + 0xb8, 0x9c, 0xff, 0xd1, 0x84, 0x80, 0x40, 0x7e, 0xbe, 0x26, 0xd5, 0x79, 0x06, 0x46, 0x54, 0x5e, + 0xd8, 0x0a, 0x4f, 0x37, 0x2a, 0x96, 0xcd, 0x72, 0x5c, 0x8c, 0x75, 0x1c, 0xb4, 0x0e, 0x13, 0x21, + 0x97, 0x9b, 0xa9, 0x88, 0xb5, 0x5c, 0xfe, 0xf8, 0x51, 0x69, 0xd5, 0x53, 0x35, 0xc1, 0x07, 0xac, + 0x88, 0x9f, 0x36, 0xd2, 0xb9, 0x3a, 0x49, 0x02, 0xbd, 0x06, 0xe3, 0x0d, 0xdf, 0xa9, 0x2f, 0x3a, + 0x0d, 0xc7, 0xab, 0xb1, 0xef, 0x2d, 0x98, 0xe9, 0x05, 0x6f, 0x1a, 0x50, 0x9c, 0xc0, 0xa6, 0xcc, + 0x98, 0x5e, 0x22, 0xa2, 0x2c, 0x3b, 0xde, 0x16, 0x09, 0x45, 0x96, 0x4f, 0xc6, 0x8c, 0xdd, 0xcc, + 0xc0, 0xc1, 0x99, 0xb5, 0xd1, 0x4b, 0x30, 0x2a, 0x3f, 0x5f, 0x8b, 0x45, 0x10, 0x3b, 0x32, 0x68, + 0x30, 0x6c, 0x60, 0xa2, 0x7b, 0x70, 0x5a, 0xfe, 0x5f, 0x0f, 0x9c, 0xcd, 0x4d, 0xb7, 0x26, 0x1c, + 0x74, 0xb9, 0x97, 0xe1, 0x82, 0x74, 0x85, 0x5b, 0x4e, 0x43, 0x3a, 0xd8, 0x9f, 0xbb, 0x28, 0x46, + 0x2d, 0x15, 0xce, 0x26, 0x31, 0x9d, 0x3e, 0x5a, 0x85, 0xe9, 0x6d, 0xe2, 0x34, 0xa2, 0xed, 0xa5, + 0x6d, 0x52, 0xdb, 0x91, 0x9b, 0x88, 0x45, 0x38, 0xd0, 0xcc, 0xff, 0xaf, 0x77, 0xa2, 0xe0, 0xb4, + 0x7a, 0xe8, 0x2d, 0x98, 0x69, 0xb5, 0x37, 0x1a, 0x6e, 0xb8, 0xbd, 0xe6, 0x47, 0xcc, 0xb4, 0x47, + 0xa5, 0x99, 0x15, 0xa1, 0x10, 0x54, 0x0c, 0x89, 0x4a, 0x06, 0x1e, 0xce, 0xa4, 0x80, 0xde, 0x85, + 0xd3, 0x89, 0xc5, 0x20, 0x9c, 0xc1, 0xc7, 0xb3, 0x63, 0xd6, 0x57, 0xd3, 0x2a, 0x88, 0xb8, 0x0a, + 0x69, 0x20, 0x9c, 0xde, 0x04, 0x7a, 0x1e, 0x0a, 0x6e, 0x6b, 0xc5, 0x69, 0xba, 0x8d, 0x3d, 0x16, + 0x74, 0xbf, 0xc8, 0x02, 0xd1, 0x17, 0xca, 0x15, 0x5e, 0x76, 0xa0, 0xfd, 0xc6, 0x0a, 0x93, 0x3e, + 0x41, 0xb4, 0xd0, 0xa2, 0xe1, 0xcc, 0x64, 0x6c, 0xb9, 0xac, 0xc5, 0x1f, 0x0d, 0xb1, 0x81, 0xf5, + 0xde, 0x0c, 0xc2, 0xde, 0xa1, 0x95, 0x35, 0x9e, 0x11, 0x7d, 0x0e, 0x46, 0xf5, 0x15, 0x2b, 0xee, + 0xbf, 0xcb, 0xe9, 0x2c, 0x95, 0xb6, 0xb2, 0x39, 0xc7, 0xa9, 0x56, 0xaf, 0x0e, 0xc3, 0x06, 0x45, + 0x9b, 0x40, 0xfa, 0x58, 0xa2, 0x9b, 0x50, 0xa8, 0x35, 0x5c, 0xe2, 0x45, 0xe5, 0x4a, 0xb7, 0xa8, + 0x58, 0x4b, 0x02, 0x47, 0x4c, 0x8e, 0x08, 0x28, 0xce, 0xcb, 0xb0, 0xa2, 0x60, 0xff, 0x5a, 0x0e, + 0xe6, 0x7a, 0x44, 0xa7, 0x4f, 0xe8, 0x2d, 0xac, 0xbe, 0xf4, 0x16, 0x0b, 0x32, 0x41, 0xef, 0x5a, + 0x42, 0x24, 0x92, 0x48, 0xbe, 0x1b, 0x0b, 0x46, 0x92, 0xf8, 0x7d, 0xdb, 0x91, 0xeb, 0xaa, 0x8f, + 0x81, 0x9e, 0x9e, 0x10, 0x86, 0xca, 0x73, 0xb0, 0xff, 0x77, 0x52, 0xa6, 0xfa, 0xca, 0xfe, 0x4a, + 0x0e, 0x4e, 0xab, 0x21, 0xfc, 0xe6, 0x1d, 0xb8, 0xdb, 0x9d, 0x03, 0x77, 0x04, 0xca, 0x3f, 0xfb, + 0x16, 0x0c, 0xf1, 0x30, 0x5f, 0x7d, 0xf0, 0x67, 0x97, 0xcc, 0x88, 0x98, 0x8a, 0x25, 0x30, 0xa2, + 0x62, 0x7e, 0xaf, 0x05, 0x13, 0xeb, 0x4b, 0x95, 0xaa, 0x5f, 0xdb, 0x21, 0xd1, 0x02, 0xe7, 0xa7, + 0xb1, 0xe0, 0xb5, 0xac, 0x87, 0xe4, 0xa1, 0xd2, 0xb8, 0xb3, 0x8b, 0x30, 0xb0, 0xed, 0x87, 0x51, + 0xd2, 0x32, 0xe0, 0xba, 0x1f, 0x46, 0x98, 0x41, 0xec, 0xdf, 0xb5, 0x60, 0x90, 0xa5, 0xa4, 0x97, + 0x52, 0x64, 0x2b, 0x43, 0x8a, 0xdc, 0xcf, 0x77, 0xa1, 0x17, 0x60, 0x88, 0x6c, 0x6e, 0x92, 0x5a, + 0x24, 0x66, 0x55, 0xba, 0x72, 0x0f, 0x2d, 0xb3, 0x52, 0xca, 0x60, 0xb0, 0xc6, 0xf8, 0x5f, 0x2c, + 0x90, 0xd1, 0x5d, 0x28, 0x46, 0x6e, 0x93, 0x2c, 0xd4, 0xeb, 0x42, 0xb7, 0xfa, 0x10, 0xee, 0xe8, + 0xeb, 0x92, 0x00, 0x8e, 0x69, 0xd9, 0x5f, 0xca, 0x01, 0xc4, 0xf1, 0x51, 0x7a, 0x7d, 0xe2, 0x62, + 0x87, 0xd6, 0xed, 0x72, 0x8a, 0xd6, 0x0d, 0xc5, 0x04, 0x53, 0x54, 0x6e, 0x6a, 0x98, 0xf2, 0x7d, + 0x0d, 0xd3, 0xc0, 0x61, 0x86, 0x69, 0x09, 0xa6, 0xe2, 0xf8, 0x2e, 0x66, 0x78, 0x2b, 0xf6, 0x86, + 0x5a, 0x4f, 0x02, 0x71, 0x27, 0xbe, 0x4d, 0xe0, 0xa2, 0x0a, 0x73, 0x21, 0xee, 0x1a, 0x66, 0xba, + 0xab, 0x6b, 0x31, 0x7b, 0x8c, 0x53, 0xac, 0x56, 0xcc, 0x65, 0xaa, 0x15, 0x7f, 0xc2, 0x82, 0x53, + 0xc9, 0x76, 0x98, 0x2f, 0xe5, 0x17, 0x2d, 0x38, 0xcd, 0x94, 0xab, 0xac, 0xd5, 0x4e, 0x55, 0xee, + 0xf3, 0x5d, 0x43, 0x77, 0x64, 0xf4, 0x38, 0x8e, 0x19, 0xb0, 0x9a, 0x46, 0x1a, 0xa7, 0xb7, 0x68, + 0xff, 0xfb, 0x1c, 0xcc, 0x64, 0xc5, 0xfc, 0x60, 0x96, 0xfd, 0xce, 0xfd, 0xea, 0x0e, 0xb9, 0x27, + 0xec, 0xa7, 0x63, 0xcb, 0x7e, 0x5e, 0x8c, 0x25, 0x3c, 0x19, 0x70, 0x3c, 0xd7, 0x5f, 0xc0, 0x71, + 0xb4, 0x0d, 0x53, 0xf7, 0xb6, 0x89, 0x77, 0xdb, 0x0b, 0x9d, 0xc8, 0x0d, 0x37, 0x5d, 0xa6, 0x88, + 0xe4, 0xeb, 0xe6, 0x65, 0x69, 0xe5, 0x7c, 0x37, 0x89, 0x70, 0xb0, 0x3f, 0x77, 0xde, 0x28, 0x88, + 0xbb, 0xcc, 0x0f, 0x12, 0xdc, 0x49, 0xb4, 0x33, 0x5e, 0xfb, 0xc0, 0x31, 0xc6, 0x6b, 0xb7, 0xbf, + 0x68, 0xc1, 0xd9, 0xcc, 0x24, 0x91, 0xe8, 0x0a, 0x14, 0x9c, 0x96, 0xcb, 0x65, 0xb9, 0xe2, 0x18, + 0x65, 0x32, 0x83, 0x4a, 0x99, 0x4b, 0x72, 0x15, 0x54, 0x25, 0xaf, 0xce, 0x65, 0x26, 0xaf, 0xee, + 0x99, 0x8b, 0xda, 0xfe, 0x1e, 0x0b, 0x84, 0x57, 0x62, 0x1f, 0x67, 0xf7, 0x9b, 0x32, 0xf7, 0xbf, + 0x91, 0xd3, 0xe5, 0x62, 0xb6, 0x9b, 0xa6, 0xc8, 0xe4, 0xa2, 0x78, 0x25, 0x23, 0x7f, 0x8b, 0x41, + 0xcb, 0xae, 0x83, 0x80, 0x96, 0x08, 0x93, 0x54, 0xf6, 0xee, 0xcd, 0xb3, 0x00, 0x75, 0x86, 0xab, + 0x65, 0x00, 0x57, 0x37, 0x73, 0x49, 0x41, 0xb0, 0x86, 0x65, 0xff, 0x9b, 0x1c, 0x8c, 0xc8, 0x1c, + 0x22, 0x6d, 0xaf, 0x1f, 0x79, 0xc2, 0xa1, 0x92, 0x0a, 0xb2, 0x94, 0xf9, 0x94, 0x70, 0x25, 0x16, + 0xc3, 0xc4, 0x29, 0xf3, 0x25, 0x00, 0xc7, 0x38, 0x74, 0x17, 0x85, 0xed, 0x0d, 0x86, 0x9e, 0xf0, + 0xa1, 0xab, 0xf2, 0x62, 0x2c, 0xe1, 0xe8, 0x53, 0x30, 0xc9, 0xeb, 0x05, 0x7e, 0xcb, 0xd9, 0xe2, + 0x42, 0xf2, 0x41, 0xe5, 0xfc, 0x3e, 0xb9, 0x9a, 0x80, 0x1d, 0xec, 0xcf, 0x9d, 0x4a, 0x96, 0x31, + 0xed, 0x4f, 0x07, 0x15, 0x66, 0x0b, 0xc3, 0x1b, 0xa1, 0xbb, 0xbf, 0xc3, 0x84, 0x26, 0x06, 0x61, + 0x1d, 0xcf, 0xfe, 0x1c, 0xa0, 0xce, 0x6c, 0x2a, 0xe8, 0x75, 0x6e, 0x00, 0xe9, 0x06, 0xa4, 0xde, + 0x4d, 0x1b, 0xa4, 0xbb, 0x78, 0x4b, 0xf7, 0x17, 0x5e, 0x0b, 0xab, 0xfa, 0xf6, 0x5f, 0xca, 0xc3, + 0x64, 0xd2, 0xe1, 0x17, 0x5d, 0x87, 0x21, 0xce, 0x7a, 0x08, 0xf2, 0x5d, 0x8c, 0x0d, 0x34, 0x37, + 0x61, 0x76, 0x08, 0x0b, 0xee, 0x45, 0xd4, 0x47, 0x6f, 0xc1, 0x48, 0xdd, 0xbf, 0xe7, 0xdd, 0x73, + 0x82, 0xfa, 0x42, 0xa5, 0x2c, 0x96, 0x73, 0xea, 0x6b, 0xa9, 0x14, 0xa3, 0xe9, 0xae, 0xc7, 0x4c, + 0xb1, 0x16, 0x83, 0xb0, 0x4e, 0x0e, 0xad, 0xb3, 0xe0, 0xcf, 0x9b, 0xee, 0xd6, 0xaa, 0xd3, 0xea, + 0x66, 0x0d, 0xbf, 0x24, 0x91, 0x34, 0xca, 0x63, 0x22, 0x42, 0x34, 0x07, 0xe0, 0x98, 0x10, 0xfa, + 0x3c, 0x4c, 0x87, 0x19, 0x32, 0xd9, 0xac, 0xe4, 0x5a, 0xdd, 0xc4, 0x94, 0x8b, 0x8f, 0xd0, 0x77, + 0x6c, 0x9a, 0xf4, 0x36, 0xad, 0x19, 0xfb, 0x47, 0x4e, 0x81, 0xb1, 0x89, 0x8d, 0x5c, 0x8b, 0xd6, + 0x11, 0xe5, 0x5a, 0xc4, 0x50, 0x20, 0xcd, 0x56, 0xb4, 0x57, 0x72, 0x83, 0x6e, 0x19, 0x88, 0x97, + 0x05, 0x4e, 0x27, 0x4d, 0x09, 0xc1, 0x8a, 0x4e, 0x7a, 0x42, 0xcc, 0xfc, 0xd7, 0x31, 0x21, 0xe6, + 0xc0, 0x09, 0x26, 0xc4, 0x5c, 0x83, 0xe1, 0x2d, 0x37, 0xc2, 0xa4, 0xe5, 0x0b, 0xa6, 0x3f, 0x75, + 0x1d, 0x5e, 0xe3, 0x28, 0x9d, 0xa9, 0xd7, 0x04, 0x00, 0x4b, 0x22, 0xe8, 0x75, 0xb5, 0x03, 0x87, + 0xb2, 0xdf, 0xcc, 0x9d, 0x5a, 0xf1, 0xd4, 0x3d, 0x28, 0xd2, 0x5e, 0x0e, 0x3f, 0x6c, 0xda, 0xcb, + 0x15, 0x99, 0xac, 0xb2, 0x90, 0xed, 0xba, 0xc2, 0x72, 0x51, 0xf6, 0x48, 0x51, 0x79, 0x47, 0x4f, + 0xf0, 0x59, 0xcc, 0x3e, 0x09, 0x54, 0xee, 0xce, 0x3e, 0xd3, 0x7a, 0x7e, 0x8f, 0x05, 0xa7, 0x5b, + 0x69, 0xb9, 0x6e, 0x85, 0x02, 0xf9, 0x85, 0xbe, 0xd3, 0xe9, 0x1a, 0x0d, 0x32, 0x41, 0x4d, 0x2a, + 0x1a, 0x4e, 0x6f, 0x8e, 0x0e, 0x74, 0xb0, 0x51, 0x17, 0x8a, 0xcc, 0x4b, 0x19, 0xf9, 0x41, 0xbb, + 0x64, 0x05, 0x5d, 0x4f, 0xc9, 0x45, 0xf9, 0xe1, 0xac, 0x5c, 0x94, 0x7d, 0x67, 0xa0, 0x7c, 0x5d, + 0x65, 0x06, 0x1d, 0xcb, 0x5e, 0x4a, 0x3c, 0xef, 0x67, 0xcf, 0x7c, 0xa0, 0xaf, 0xab, 0x7c, 0xa0, + 0x5d, 0x22, 0x7b, 0xf2, 0x6c, 0x9f, 0x3d, 0xb3, 0x80, 0x6a, 0x99, 0x3c, 0x27, 0x8e, 0x26, 0x93, + 0xa7, 0x71, 0xd5, 0xf0, 0x64, 0x92, 0x4f, 0xf6, 0xb8, 0x6a, 0x0c, 0xba, 0xdd, 0x2f, 0x1b, 0x9e, + 0xb5, 0x74, 0xea, 0xa1, 0xb2, 0x96, 0xde, 0xd1, 0xb3, 0x80, 0xa2, 0x1e, 0x69, 0x2e, 0x29, 0x52, + 0x9f, 0xb9, 0x3f, 0xef, 0xe8, 0x17, 0xe0, 0x74, 0x36, 0x5d, 0x75, 0xcf, 0x75, 0xd2, 0x4d, 0xbd, + 0x02, 0x3b, 0x72, 0x8a, 0x9e, 0x3a, 0x99, 0x9c, 0xa2, 0xa7, 0x8f, 0x3c, 0xa7, 0xe8, 0x99, 0x13, + 0xc8, 0x29, 0xfa, 0xc8, 0x09, 0xe6, 0x14, 0xbd, 0xc3, 0xac, 0x2e, 0x78, 0x6c, 0x17, 0x11, 0x89, + 0x34, 0x3d, 0xea, 0x65, 0x5a, 0x00, 0x18, 0xfe, 0x71, 0x0a, 0x84, 0x63, 0x52, 0x29, 0xb9, 0x4a, + 0x67, 0x8e, 0x21, 0x57, 0xe9, 0x5a, 0x9c, 0xab, 0xf4, 0x6c, 0xf6, 0x54, 0xa7, 0xd8, 0xe9, 0x67, + 0x64, 0x28, 0xbd, 0xa3, 0x67, 0x16, 0x7d, 0xb4, 0x8b, 0x28, 0x3e, 0x4d, 0xf0, 0xd8, 0x25, 0x9f, + 0xe8, 0x6b, 0x3c, 0x9f, 0xe8, 0xb9, 0xec, 0x93, 0x3c, 0x79, 0xdd, 0x19, 0x59, 0x44, 0x69, 0xbf, + 0x54, 0xcc, 0x3b, 0x16, 0x73, 0x35, 0xa3, 0x5f, 0x2a, 0x68, 0x5e, 0x67, 0xbf, 0x14, 0x08, 0xc7, + 0xa4, 0xec, 0xef, 0xcb, 0xc1, 0x85, 0xee, 0xfb, 0x2d, 0x96, 0xa6, 0x56, 0x62, 0x4d, 0x63, 0x42, + 0x9a, 0xca, 0xdf, 0x6c, 0x31, 0x56, 0xdf, 0xe1, 0xc4, 0xae, 0xc1, 0x94, 0x32, 0xf0, 0x6f, 0xb8, + 0xb5, 0xbd, 0xb5, 0xf8, 0xe5, 0xab, 0x9c, 0xa2, 0xab, 0x49, 0x04, 0xdc, 0x59, 0x07, 0x2d, 0xc0, + 0x84, 0x51, 0x58, 0x2e, 0x89, 0xb7, 0x99, 0x12, 0xdf, 0x56, 0x4d, 0x30, 0x4e, 0xe2, 0xdb, 0x5f, + 0xb6, 0xe0, 0x91, 0x8c, 0x34, 0x60, 0x7d, 0x47, 0xcb, 0xda, 0x84, 0x89, 0x96, 0x59, 0xb5, 0x47, + 0x50, 0x3d, 0x23, 0xd9, 0x98, 0xea, 0x6b, 0x02, 0x80, 0x93, 0x44, 0xed, 0x3f, 0xb3, 0xe0, 0x7c, + 0x57, 0x8b, 0x35, 0x84, 0xe1, 0xcc, 0x56, 0x33, 0x74, 0x96, 0x02, 0x52, 0x27, 0x5e, 0xe4, 0x3a, + 0x8d, 0x6a, 0x8b, 0xd4, 0x34, 0x79, 0x38, 0x33, 0xfd, 0xba, 0xb6, 0x5a, 0x5d, 0xe8, 0xc4, 0xc0, + 0x19, 0x35, 0xd1, 0x0a, 0xa0, 0x4e, 0x88, 0x98, 0x61, 0x16, 0xbd, 0xb7, 0x93, 0x1e, 0x4e, 0xa9, + 0x81, 0x5e, 0x84, 0x31, 0x65, 0x09, 0xa7, 0xcd, 0x38, 0x3b, 0xd8, 0xb1, 0x0e, 0xc0, 0x26, 0xde, + 0xe2, 0x95, 0xdf, 0xf8, 0xfd, 0x0b, 0x1f, 0xfa, 0xad, 0xdf, 0xbf, 0xf0, 0xa1, 0xdf, 0xf9, 0xfd, + 0x0b, 0x1f, 0xfa, 0x8e, 0x07, 0x17, 0xac, 0xdf, 0x78, 0x70, 0xc1, 0xfa, 0xad, 0x07, 0x17, 0xac, + 0xdf, 0x79, 0x70, 0xc1, 0xfa, 0xbd, 0x07, 0x17, 0xac, 0x2f, 0xfd, 0xc1, 0x85, 0x0f, 0xbd, 0x99, + 0xdb, 0x7d, 0xe6, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x9f, 0xac, 0x23, 0x24, 0x01, 0x01, + 0x00, } func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) { @@ -9832,6 +9930,49 @@ func (m *EphemeralContainers) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EphemeralVolumeSource) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EphemeralVolumeSource) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EphemeralVolumeSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i-- + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + if m.VolumeClaimTemplate != nil { + { + size, err := m.VolumeClaimTemplate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Event) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -10039,11 +10180,6 @@ func (m *EventSeries) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - i -= len(m.State) - copy(dAtA[i:], m.State) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.State))) - i-- - dAtA[i] = 0x1a { size, err := m.LastObservedTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -13193,6 +13329,49 @@ func (m *PersistentVolumeClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } +func (m *PersistentVolumeClaimTemplate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PersistentVolumeClaimTemplate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PersistentVolumeClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *PersistentVolumeClaimVolumeSource) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -14523,6 +14702,18 @@ func (m *PodSecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SeccompProfile != nil { + { + size, err := m.SeccompProfile.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } if m.FSGroupChangePolicy != nil { i -= len(*m.FSGroupChangePolicy) copy(dAtA[i:], *m.FSGroupChangePolicy) @@ -14658,6 +14849,18 @@ func (m *PodSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SetHostnameAsFQDN != nil { + i-- + if *m.SetHostnameAsFQDN { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x98 + } if len(m.EphemeralContainers) > 0 { for iNdEx := len(m.EphemeralContainers) - 1; iNdEx >= 0; iNdEx-- { { @@ -16807,6 +17010,41 @@ func (m *ScopedResourceSelectorRequirement) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } +func (m *SeccompProfile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SeccompProfile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SeccompProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LocalhostProfile != nil { + i -= len(*m.LocalhostProfile) + copy(dAtA[i:], *m.LocalhostProfile) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.LocalhostProfile))) + i-- + dAtA[i] = 0x12 + } + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *Secret) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -17210,6 +17448,18 @@ func (m *SecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SeccompProfile != nil { + { + size, err := m.SeccompProfile.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } if m.WindowsOptions != nil { { size, err := m.WindowsOptions.MarshalToSizedBuffer(dAtA[:i]) @@ -18599,6 +18849,20 @@ func (m *VolumeSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Ephemeral != nil { + { + size, err := m.Ephemeral.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xea + } if m.CSI != nil { { size, err := m.CSI.MarshalToSizedBuffer(dAtA[:i]) @@ -20192,6 +20456,20 @@ func (m *EphemeralContainers) Size() (n int) { return n } +func (m *EphemeralVolumeSource) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.VolumeClaimTemplate != nil { + l = m.VolumeClaimTemplate.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 2 + return n +} + func (m *Event) Size() (n int) { if m == nil { return 0 @@ -20260,8 +20538,6 @@ func (m *EventSeries) Size() (n int) { n += 1 + sovGenerated(uint64(m.Count)) l = m.LastObservedTime.Size() n += 1 + l + sovGenerated(uint64(l)) - l = len(m.State) - n += 1 + l + sovGenerated(uint64(l)) return n } @@ -21423,6 +21699,19 @@ func (m *PersistentVolumeClaimStatus) Size() (n int) { return n } +func (m *PersistentVolumeClaimTemplate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *PersistentVolumeClaimVolumeSource) Size() (n int) { if m == nil { return 0 @@ -21935,6 +22224,10 @@ func (m *PodSecurityContext) Size() (n int) { l = len(*m.FSGroupChangePolicy) n += 1 + l + sovGenerated(uint64(l)) } + if m.SeccompProfile != nil { + l = m.SeccompProfile.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -22087,6 +22380,9 @@ func (m *PodSpec) Size() (n int) { n += 2 + l + sovGenerated(uint64(l)) } } + if m.SetHostnameAsFQDN != nil { + n += 3 + } return n } @@ -22724,6 +23020,21 @@ func (m *ScopedResourceSelectorRequirement) Size() (n int) { return n } +func (m *SeccompProfile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + if m.LocalhostProfile != nil { + l = len(*m.LocalhostProfile) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *Secret) Size() (n int) { if m == nil { return 0 @@ -22903,6 +23214,10 @@ func (m *SecurityContext) Size() (n int) { l = m.WindowsOptions.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.SeccompProfile != nil { + l = m.SeccompProfile.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -23503,6 +23818,10 @@ func (m *VolumeSource) Size() (n int) { l = m.CSI.Size() n += 2 + l + sovGenerated(uint64(l)) } + if m.Ephemeral != nil { + l = m.Ephemeral.Size() + n += 2 + l + sovGenerated(uint64(l)) + } return n } @@ -24377,6 +24696,17 @@ func (this *EphemeralContainers) String() string { }, "") return s } +func (this *EphemeralVolumeSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&EphemeralVolumeSource{`, + `VolumeClaimTemplate:` + strings.Replace(this.VolumeClaimTemplate.String(), "PersistentVolumeClaimTemplate", "PersistentVolumeClaimTemplate", 1) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `}`, + }, "") + return s +} func (this *Event) String() string { if this == nil { return "nil" @@ -24424,7 +24754,6 @@ func (this *EventSeries) String() string { s := strings.Join([]string{`&EventSeries{`, `Count:` + fmt.Sprintf("%v", this.Count) + `,`, `LastObservedTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastObservedTime), "MicroTime", "v1.MicroTime", 1), `&`, ``, 1) + `,`, - `State:` + fmt.Sprintf("%v", this.State) + `,`, `}`, }, "") return s @@ -25357,6 +25686,17 @@ func (this *PersistentVolumeClaimStatus) String() string { }, "") return s } +func (this *PersistentVolumeClaimTemplate) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PersistentVolumeClaimTemplate{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeClaimSpec", "PersistentVolumeClaimSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} func (this *PersistentVolumeClaimVolumeSource) String() string { if this == nil { return "nil" @@ -25697,6 +26037,7 @@ func (this *PodSecurityContext) String() string { `Sysctls:` + repeatedStringForSysctls + `,`, `WindowsOptions:` + strings.Replace(this.WindowsOptions.String(), "WindowsSecurityContextOptions", "WindowsSecurityContextOptions", 1) + `,`, `FSGroupChangePolicy:` + valueToStringGenerated(this.FSGroupChangePolicy) + `,`, + `SeccompProfile:` + strings.Replace(this.SeccompProfile.String(), "SeccompProfile", "SeccompProfile", 1) + `,`, `}`, }, "") return s @@ -25815,6 +26156,7 @@ func (this *PodSpec) String() string { `Overhead:` + mapStringForOverhead + `,`, `TopologySpreadConstraints:` + repeatedStringForTopologySpreadConstraints + `,`, `EphemeralContainers:` + repeatedStringForEphemeralContainers + `,`, + `SetHostnameAsFQDN:` + valueToStringGenerated(this.SetHostnameAsFQDN) + `,`, `}`, }, "") return s @@ -26340,6 +26682,17 @@ func (this *ScopedResourceSelectorRequirement) String() string { }, "") return s } +func (this *SeccompProfile) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SeccompProfile{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `LocalhostProfile:` + valueToStringGenerated(this.LocalhostProfile) + `,`, + `}`, + }, "") + return s +} func (this *Secret) String() string { if this == nil { return "nil" @@ -26474,6 +26827,7 @@ func (this *SecurityContext) String() string { `RunAsGroup:` + valueToStringGenerated(this.RunAsGroup) + `,`, `ProcMount:` + valueToStringGenerated(this.ProcMount) + `,`, `WindowsOptions:` + strings.Replace(this.WindowsOptions.String(), "WindowsSecurityContextOptions", "WindowsSecurityContextOptions", 1) + `,`, + `SeccompProfile:` + strings.Replace(this.SeccompProfile.String(), "SeccompProfile", "SeccompProfile", 1) + `,`, `}`, }, "") return s @@ -26872,6 +27226,7 @@ func (this *VolumeSource) String() string { `Projected:` + strings.Replace(this.Projected.String(), "ProjectedVolumeSource", "ProjectedVolumeSource", 1) + `,`, `StorageOS:` + strings.Replace(this.StorageOS.String(), "StorageOSVolumeSource", "StorageOSVolumeSource", 1) + `,`, `CSI:` + strings.Replace(this.CSI.String(), "CSIVolumeSource", "CSIVolumeSource", 1) + `,`, + `Ephemeral:` + strings.Replace(this.Ephemeral.String(), "EphemeralVolumeSource", "EphemeralVolumeSource", 1) + `,`, `}`, }, "") return s @@ -36298,6 +36653,115 @@ func (m *EphemeralContainers) Unmarshal(dAtA []byte) error { } return nil } +func (m *EphemeralVolumeSource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EphemeralVolumeSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EphemeralVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VolumeClaimTemplate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VolumeClaimTemplate == nil { + m.VolumeClaimTemplate = &PersistentVolumeClaimTemplate{} + } + if err := m.VolumeClaimTemplate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Event) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -37033,38 +37497,6 @@ func (m *EventSeries) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.State = EventSeriesState(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -47573,6 +48005,125 @@ func (m *PersistentVolumeClaimStatus) Unmarshal(dAtA []byte) error { } return nil } +func (m *PersistentVolumeClaimTemplate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PersistentVolumeClaimTemplate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PersistentVolumeClaimTemplate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *PersistentVolumeClaimVolumeSource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -51872,6 +52423,42 @@ func (m *PodSecurityContext) Unmarshal(dAtA []byte) error { s := PodFSGroupChangePolicy(dAtA[iNdEx:postIndex]) m.FSGroupChangePolicy = &s iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SeccompProfile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SeccompProfile == nil { + m.SeccompProfile = &SeccompProfile{} + } + if err := m.SeccompProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -53221,6 +53808,27 @@ func (m *PodSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 35: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SetHostnameAsFQDN", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.SetHostnameAsFQDN = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -59331,6 +59939,124 @@ func (m *ScopedResourceSelectorRequirement) Unmarshal(dAtA []byte) error { } return nil } +func (m *SeccompProfile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SeccompProfile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SeccompProfile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = SeccompProfileType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalhostProfile", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.LocalhostProfile = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Secret) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -60803,6 +61529,42 @@ func (m *SecurityContext) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SeccompProfile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SeccompProfile == nil { + m.SeccompProfile = &SeccompProfile{} + } + if err := m.SeccompProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -66057,6 +66819,42 @@ func (m *VolumeSource) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 29: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ephemeral", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ephemeral == nil { + m.Ephemeral = &EphemeralVolumeSource{} + } + if err := m.Ephemeral.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/api/core/v1/generated.proto b/vendor/k8s.io/api/core/v1/generated.proto index d1cd8ebb4e9..916e2601e69 100644 --- a/vendor/k8s.io/api/core/v1/generated.proto +++ b/vendor/k8s.io/api/core/v1/generated.proto @@ -424,6 +424,7 @@ message ComponentCondition { } // ComponentStatus (and ComponentStatusList) holds the cluster validation info. +// Deprecated: This API is deprecated in v1.19+ message ComponentStatus { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata @@ -438,6 +439,7 @@ message ComponentStatus { } // Status of all the conditions for the component as a list of ComponentStatus objects. +// Deprecated: This API is deprecated in v1.19+ message ComponentStatusList { // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds @@ -459,7 +461,7 @@ message ConfigMap { // be updated (only object metadata can be modified). // If not set to true, the field can be modified at any time. // Defaulted to nil. - // This is an alpha field enabled by ImmutableEphemeralVolumes feature gate. + // This is a beta field enabled by ImmutableEphemeralVolumes feature gate. // +optional optional bool immutable = 4; @@ -588,8 +590,10 @@ message ConfigMapVolumeSource { // +optional repeated KeyToPath items = 2; - // Optional: mode bits to use on created files by default. Must be a - // value between 0 and 0777. Defaults to 0644. + // Optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // Defaults to 0644. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. @@ -957,8 +961,10 @@ message DownwardAPIVolumeFile { // +optional optional ResourceFieldSelector resourceFieldRef = 3; - // Optional: mode bits to use on this file, must be a value between 0 - // and 0777. If not specified, the volume defaultMode will be used. + // Optional: mode bits used to set permissions on this file, must be an octal value + // between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // If not specified, the volume defaultMode will be used. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. // +optional @@ -973,7 +979,10 @@ message DownwardAPIVolumeSource { repeated DownwardAPIVolumeFile items = 1; // Optional: mode bits to use on created files by default. Must be a - // value between 0 and 0777. Defaults to 0644. + // Optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // Defaults to 0644. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. @@ -1048,7 +1057,8 @@ message EndpointPort { // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. - // Field can be enabled with ServiceAppProtocol feature gate. + // This is a beta field that is guarded by the ServiceAppProtocol feature + // gate and enabled by default. // +optional optional string appProtocol = 4; } @@ -1158,7 +1168,7 @@ message EnvVar { // EnvVarSource represents a source for the value of an EnvVar. message EnvVarSource { - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, + // Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. // +optional optional ObjectFieldSelector fieldRef = 1; @@ -1363,6 +1373,37 @@ message EphemeralContainers { repeated EphemeralContainer ephemeralContainers = 2; } +// Represents an ephemeral volume that is handled by a normal storage driver. +message EphemeralVolumeSource { + // Will be used to create a stand-alone PVC to provision the volume. + // The pod in which this EphemeralVolumeSource is embedded will be the + // owner of the PVC, i.e. the PVC will be deleted together with the + // pod. The name of the PVC will be `-` where + // `` is the name from the `PodSpec.Volumes` array + // entry. Pod validation will reject the pod if the concatenated name + // is not valid for a PVC (for example, too long). + // + // An existing PVC with that name that is not owned by the pod + // will *not* be used for the pod to avoid using an unrelated + // volume by mistake. Starting the pod is then blocked until + // the unrelated PVC is removed. If such a pre-created PVC is + // meant to be used by the pod, the PVC has to updated with an + // owner reference to the pod once the pod exists. Normally + // this should not be necessary, but it may be useful when + // manually reconstructing a broken cluster. + // + // This field is read-only and no changes will be made by Kubernetes + // to the PVC after it has been created. + // + // Required, must not be nil. + optional PersistentVolumeClaimTemplate volumeClaimTemplate = 1; + + // Specifies a read-only configuration for the volume. + // Defaults to false (read/write). + // +optional + optional bool readOnly = 2; +} + // Event is a report of an event somewhere in the cluster. message Event { // Standard object's metadata. @@ -1447,10 +1488,6 @@ message EventSeries { // Time of the last occurrence observed optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2; - - // State of this Series: Ongoing or Finished - // Deprecated. Planned removal for 1.18 - optional string state = 3; } // EventSource contains information for an event. @@ -1880,8 +1917,10 @@ message KeyToPath { // May not start with the string '..'. optional string path = 2; - // Optional: mode bits to use on this file, must be a value between 0 - // and 0777. If not specified, the volume defaultMode will be used. + // Optional: mode bits used to set permissions on this file. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // If not specified, the volume defaultMode will be used. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. // +optional @@ -2277,7 +2316,7 @@ message NodeProxyOptions { } // NodeResources is an object for conveying resource information about a node. -// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details. +// see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details. message NodeResources { // Capacity represents the available resources of a node map capacity = 1; @@ -2431,7 +2470,7 @@ message NodeSystemInfo { // SystemUUID reported by the node. For unique machine identification // MachineID is preferred. This field is specific to Red Hat hosts - // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html + // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid optional string systemUUID = 2; // Boot ID reported by the node. @@ -2676,6 +2715,23 @@ message PersistentVolumeClaimStatus { repeated PersistentVolumeClaimCondition conditions = 4; } +// PersistentVolumeClaimTemplate is used to produce +// PersistentVolumeClaim objects as part of an EphemeralVolumeSource. +message PersistentVolumeClaimTemplate { + // May contain labels and annotations that will be copied into the PVC + // when creating it. No other fields are allowed and will be rejected during + // validation. + // + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // The specification for the PersistentVolumeClaim. The entire content is + // copied unchanged into the PVC that gets created from this + // template. The same fields as in a PersistentVolumeClaim + // are also valid here. + optional PersistentVolumeClaimSpec spec = 2; +} + // PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. // This volume finds the bound PV and mounts that volume for the pod. A // PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another @@ -3287,6 +3343,10 @@ message PodSecurityContext { // Valid values are "OnRootMismatch" and "Always". If not specified defaults to "Always". // +optional optional string fsGroupChangePolicy = 9; + + // The seccomp options to use by the containers in this pod. + // +optional + optional SeccompProfile seccompProfile = 10; } // Describes the class of pods that should avoid this node. @@ -3520,7 +3580,7 @@ message PodSpec { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. - // This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional optional string preemptionPolicy = 31; @@ -3537,7 +3597,6 @@ message PodSpec { // TopologySpreadConstraints describes how a group of pods ought to spread across topology // domains. Scheduler will schedule pods in a way which abides by the constraints. - // This field is only honored by clusters that enable the EvenPodsSpread feature. // All topologySpreadConstraints are ANDed. // +optional // +patchMergeKey=topologyKey @@ -3546,6 +3605,14 @@ message PodSpec { // +listMapKey=topologyKey // +listMapKey=whenUnsatisfiable repeated TopologySpreadConstraint topologySpreadConstraints = 33; + + // If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + // In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). + // In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. + // If a pod does not have FQDN, this has no effect. + // Default to false. + // +optional + optional bool setHostnameAsFQDN = 35; } // PodStatus represents information about the status of a pod. Status may trail the actual @@ -3788,8 +3855,9 @@ message ProjectedVolumeSource { // list of volume projections repeated VolumeProjection sources = 1; - // Mode bits to use on created files by default. Must be a value between - // 0 and 0777. + // Mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. @@ -4287,6 +4355,27 @@ message ScopedResourceSelectorRequirement { repeated string values = 3; } +// SeccompProfile defines a pod/container's seccomp profile settings. +// Only one profile source may be set. +// +union +message SeccompProfile { + // type indicates which kind of seccomp profile will be applied. + // Valid options are: + // + // Localhost - a profile defined in a file on the node should be used. + // RuntimeDefault - the container runtime default profile should be used. + // Unconfined - no profile should be applied. + // +unionDiscriminator + optional string type = 1; + + // localhostProfile indicates a profile defined in a file on the node should be used. + // The profile must be preconfigured on the node to work. + // Must be a descending path, relative to the kubelet's configured seccomp profile location. + // Must only be set if type is "Localhost". + // +optional + optional string localhostProfile = 2; +} + // Secret holds secret data of a certain type. The total bytes of the values in // the Data field must be less than MaxSecretSize bytes. message Secret { @@ -4299,7 +4388,7 @@ message Secret { // be updated (only object metadata can be modified). // If not set to true, the field can be modified at any time. // Defaulted to nil. - // This is an alpha field enabled by ImmutableEphemeralVolumes feature gate. + // This is a beta field enabled by ImmutableEphemeralVolumes feature gate. // +optional optional bool immutable = 5; @@ -4419,8 +4508,10 @@ message SecretVolumeSource { // +optional repeated KeyToPath items = 2; - // Optional: mode bits to use on created files by default. Must be a - // value between 0 and 0777. Defaults to 0644. + // Optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values + // for mode bits. Defaults to 0644. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. @@ -4503,6 +4594,12 @@ message SecurityContext { // This requires the ProcMountType feature flag to be enabled. // +optional optional string procMount = 9; + + // The seccomp options to use by this container. If seccomp options are + // provided at both the pod & container level, the container options + // override the pod options. + // +optional + optional SeccompProfile seccompProfile = 11; } // SerializedReference is a reference to serialized object. @@ -4634,7 +4731,8 @@ message ServicePort { // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. - // Field can be enabled with ServiceAppProtocol feature gate. + // This is a beta field that is guarded by the ServiceAppProtocol feature + // gate and enabled by default. // +optional optional string appProtocol = 6; @@ -4776,12 +4874,14 @@ message ServiceSpec { // +optional optional int32 healthCheckNodePort = 12; - // publishNotReadyAddresses, when set to true, indicates that DNS implementations - // must publish the notReadyAddresses of subsets for the Endpoints associated with - // the Service. The default value is false. - // The primary use case for setting this field is to use a StatefulSet's Headless Service - // to propagate SRV records for its Pods without respect to their readiness for purpose - // of peer discovery. + // publishNotReadyAddresses indicates that any agent which deals with endpoints for this + // Service should disregard any indications of ready/not-ready. + // The primary use case for setting this field is for a StatefulSet's Headless Service to + // propagate SRV DNS records for its Pods for the purpose of peer discovery. + // The Kubernetes controllers that generate Endpoints and EndpointSlice resources for + // Services interpret this to mean that all endpoints are considered "ready" even if the + // Pods themselves are not. Agents which consume only Kubernetes generated endpoints + // through the Endpoints or EndpointSlice resources can safely assume this behavior. // +optional optional bool publishNotReadyAddresses = 13; @@ -4789,13 +4889,21 @@ message ServiceSpec { // +optional optional SessionAffinityConfig sessionAffinityConfig = 14; - // ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. - // IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is - // available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. - // Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which - // allocate external load-balancers should use the same IP family. Endpoints for this Service will be of - // this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the - // cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment. + // ipFamily specifies whether this Service has a preference for a particular IP family (e.g. + // IPv4 vs. IPv6) when the IPv6DualStack feature gate is enabled. In a dual-stack cluster, + // you can specify ipFamily when creating a ClusterIP Service to determine whether the + // controller will allocate an IPv4 or IPv6 IP for it, and you can specify ipFamily when + // creating a headless Service to determine whether it will have IPv4 or IPv6 Endpoints. In + // either case, if you do not specify an ipFamily explicitly, it will default to the + // cluster's primary IP family. + // This field is part of an alpha feature, and you should not make any assumptions about its + // semantics other than those described above. In particular, you should not assume that it + // can (or cannot) be changed after creation time; that it can only have the values "IPv4" + // and "IPv6"; or that its current value on a given Service correctly reflects the current + // state of that Service. (For ClusterIP Services, look at clusterIP to see if the Service + // is IPv4 or IPv6. For headless Services, look at the endpoints, which may be dual-stack in + // the future. For ExternalName Services, ipFamily has no meaning, but it may be set to an + // irrelevant value anyway.) // +optional optional string ipFamily = 15; @@ -4994,8 +5102,8 @@ message TopologySelectorTerm { // TopologySpreadConstraint specifies how to spread matching pods among the given topology. message TopologySpreadConstraint { // MaxSkew describes the degree to which pods may be unevenly distributed. - // It's the maximum permitted difference between the number of matching pods in - // any two topology domains of a given topology type. + // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference + // between the number of matching pods in the target topology and the global minimum. // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same // labelSelector spread as 1/1/0: // +-------+-------+-------+ @@ -5007,6 +5115,8 @@ message TopologySpreadConstraint { // scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) // violate MaxSkew(1). // - if MaxSkew is 2, incoming pod can be scheduled onto any zone. + // When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence + // to topologies that satisfy it. // It's a required field. Default value is 1 and 0 is not allowed. optional int32 maxSkew = 1; @@ -5019,10 +5129,13 @@ message TopologySpreadConstraint { // WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy // the spread constraint. - // - DoNotSchedule (default) tells the scheduler not to schedule it - // - ScheduleAnyway tells the scheduler to still schedule it - // It's considered as "Unsatisfiable" if and only if placing incoming pod on any - // topology violates "MaxSkew". + // - DoNotSchedule (default) tells the scheduler not to schedule it. + // - ScheduleAnyway tells the scheduler to schedule the pod in any location, + // but giving higher precedence to topologies that would help reduce the + // skew. + // A constraint is considered "Unsatisfiable" for an incoming pod + // if and only if every possible node assigment for that pod would violate + // "MaxSkew" on some topology. // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same // labelSelector spread as 3/1/1: // +-------+-------+-------+ @@ -5275,9 +5388,37 @@ message VolumeSource { // +optional optional StorageOSVolumeSource storageos = 27; - // CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + // CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). // +optional optional CSIVolumeSource csi = 28; + + // Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). + // The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + // and deleted when the pod is removed. + // + // Use this if: + // a) the volume is only needed while the pod runs, + // b) features of normal volumes like restoring from snapshot or capacity + // tracking are needed, + // c) the storage driver is specified through a storage class, and + // d) the storage driver supports dynamic volume provisioning through + // a PersistentVolumeClaim (see EphemeralVolumeSource for more + // information on the connection between this volume type + // and PersistentVolumeClaim). + // + // Use PersistentVolumeClaim or one of the vendor-specific + // APIs for volumes that persist for longer than the lifecycle + // of an individual pod. + // + // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + // be used that way - see the documentation of the driver for + // more information. + // + // A pod can use both types of ephemeral volumes and + // persistent volumes at the same time. + // + // +optional + optional EphemeralVolumeSource ephemeral = 29; } // Represents a vSphere volume resource. diff --git a/vendor/k8s.io/api/core/v1/lifecycle.go b/vendor/k8s.io/api/core/v1/lifecycle.go new file mode 100644 index 00000000000..21ca90e815d --- /dev/null +++ b/vendor/k8s.io/api/core/v1/lifecycle.go @@ -0,0 +1,37 @@ +/* +Copyright 2020 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 v1 + +// APILifecycleIntroduced returns the release in which the API struct was introduced as int versions of major and minor for comparison. +func (in *ComponentStatus) APILifecycleIntroduced() (major, minor int) { + return 1, 0 +} + +// APILifecycleDeprecated returns the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +func (in *ComponentStatus) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleIntroduced returns the release in which the API struct was introduced as int versions of major and minor for comparison. +func (in *ComponentStatusList) APILifecycleIntroduced() (major, minor int) { + return 1, 0 +} + +// APILifecycleDeprecated returns the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +func (in *ComponentStatusList) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} diff --git a/vendor/k8s.io/api/core/v1/types.go b/vendor/k8s.io/api/core/v1/types.go index b61a86aba16..f3ec52e71c6 100644 --- a/vendor/k8s.io/api/core/v1/types.go +++ b/vendor/k8s.io/api/core/v1/types.go @@ -153,9 +153,36 @@ type VolumeSource struct { // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. // +optional StorageOS *StorageOSVolumeSource `json:"storageos,omitempty" protobuf:"bytes,27,opt,name=storageos"` - // CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + // CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). // +optional CSI *CSIVolumeSource `json:"csi,omitempty" protobuf:"bytes,28,opt,name=csi"` + // Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). + // The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + // and deleted when the pod is removed. + // + // Use this if: + // a) the volume is only needed while the pod runs, + // b) features of normal volumes like restoring from snapshot or capacity + // tracking are needed, + // c) the storage driver is specified through a storage class, and + // d) the storage driver supports dynamic volume provisioning through + // a PersistentVolumeClaim (see EphemeralVolumeSource for more + // information on the connection between this volume type + // and PersistentVolumeClaim). + // + // Use PersistentVolumeClaim or one of the vendor-specific + // APIs for volumes that persist for longer than the lifecycle + // of an individual pod. + // + // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + // be used that way - see the documentation of the driver for + // more information. + // + // A pod can use both types of ephemeral volumes and + // persistent volumes at the same time. + // + // +optional + Ephemeral *EphemeralVolumeSource `json:"ephemeral,omitempty" protobuf:"bytes,29,opt,name=ephemeral"` } // PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. @@ -1092,8 +1119,10 @@ type SecretVolumeSource struct { // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` - // Optional: mode bits to use on created files by default. Must be a - // value between 0 and 0777. Defaults to 0644. + // Optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values + // for mode bits. Defaults to 0644. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. @@ -1518,8 +1547,10 @@ type ConfigMapVolumeSource struct { // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` - // Optional: mode bits to use on created files by default. Must be a - // value between 0 and 0777. Defaults to 0644. + // Optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // Defaults to 0644. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. @@ -1585,8 +1616,9 @@ type ServiceAccountTokenProjection struct { type ProjectedVolumeSource struct { // list of volume projections Sources []VolumeProjection `json:"sources" protobuf:"bytes,1,rep,name=sources"` - // Mode bits to use on created files by default. Must be a value between - // 0 and 0777. + // Mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. @@ -1626,8 +1658,10 @@ type KeyToPath struct { // May not contain the path element '..'. // May not start with the string '..'. Path string `json:"path" protobuf:"bytes,2,opt,name=path"` - // Optional: mode bits to use on this file, must be a value between 0 - // and 0777. If not specified, the volume defaultMode will be used. + // Optional: mode bits used to set permissions on this file. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // If not specified, the volume defaultMode will be used. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. // +optional @@ -1739,6 +1773,54 @@ type CSIVolumeSource struct { NodePublishSecretRef *LocalObjectReference `json:"nodePublishSecretRef,omitempty" protobuf:"bytes,5,opt,name=nodePublishSecretRef"` } +// Represents an ephemeral volume that is handled by a normal storage driver. +type EphemeralVolumeSource struct { + // Will be used to create a stand-alone PVC to provision the volume. + // The pod in which this EphemeralVolumeSource is embedded will be the + // owner of the PVC, i.e. the PVC will be deleted together with the + // pod. The name of the PVC will be `-` where + // `` is the name from the `PodSpec.Volumes` array + // entry. Pod validation will reject the pod if the concatenated name + // is not valid for a PVC (for example, too long). + // + // An existing PVC with that name that is not owned by the pod + // will *not* be used for the pod to avoid using an unrelated + // volume by mistake. Starting the pod is then blocked until + // the unrelated PVC is removed. If such a pre-created PVC is + // meant to be used by the pod, the PVC has to updated with an + // owner reference to the pod once the pod exists. Normally + // this should not be necessary, but it may be useful when + // manually reconstructing a broken cluster. + // + // This field is read-only and no changes will be made by Kubernetes + // to the PVC after it has been created. + // + // Required, must not be nil. + VolumeClaimTemplate *PersistentVolumeClaimTemplate `json:"volumeClaimTemplate,omitempty" protobuf:"bytes,1,opt,name=volumeClaimTemplate"` + + // Specifies a read-only configuration for the volume. + // Defaults to false (read/write). + // +optional + ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` +} + +// PersistentVolumeClaimTemplate is used to produce +// PersistentVolumeClaim objects as part of an EphemeralVolumeSource. +type PersistentVolumeClaimTemplate struct { + // May contain labels and annotations that will be copied into the PVC + // when creating it. No other fields are allowed and will be rejected during + // validation. + // + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // The specification for the PersistentVolumeClaim. The entire content is + // copied unchanged into the PVC that gets created from this + // template. The same fields as in a PersistentVolumeClaim + // are also valid here. + Spec PersistentVolumeClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"` +} + // ContainerPort represents a network port in a single container. type ContainerPort struct { // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each @@ -1850,7 +1932,7 @@ type EnvVar struct { // EnvVarSource represents a source for the value of an EnvVar. type EnvVarSource struct { - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, + // Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. // +optional FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,1,opt,name=fieldRef"` @@ -3025,7 +3107,7 @@ type PodSpec struct { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. - // This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional PreemptionPolicy *PreemptionPolicy `json:"preemptionPolicy,omitempty" protobuf:"bytes,31,opt,name=preemptionPolicy"` // Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. @@ -3040,7 +3122,6 @@ type PodSpec struct { Overhead ResourceList `json:"overhead,omitempty" protobuf:"bytes,32,opt,name=overhead"` // TopologySpreadConstraints describes how a group of pods ought to spread across topology // domains. Scheduler will schedule pods in a way which abides by the constraints. - // This field is only honored by clusters that enable the EvenPodsSpread feature. // All topologySpreadConstraints are ANDed. // +optional // +patchMergeKey=topologyKey @@ -3049,6 +3130,13 @@ type PodSpec struct { // +listMapKey=topologyKey // +listMapKey=whenUnsatisfiable TopologySpreadConstraints []TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty" patchStrategy:"merge" patchMergeKey:"topologyKey" protobuf:"bytes,33,opt,name=topologySpreadConstraints"` + // If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + // In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). + // In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. + // If a pod does not have FQDN, this has no effect. + // Default to false. + // +optional + SetHostnameAsFQDN *bool `json:"setHostnameAsFQDN,omitempty" protobuf:"varint,35,opt,name=setHostnameAsFQDN"` } type UnsatisfiableConstraintAction string @@ -3065,8 +3153,8 @@ const ( // TopologySpreadConstraint specifies how to spread matching pods among the given topology. type TopologySpreadConstraint struct { // MaxSkew describes the degree to which pods may be unevenly distributed. - // It's the maximum permitted difference between the number of matching pods in - // any two topology domains of a given topology type. + // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference + // between the number of matching pods in the target topology and the global minimum. // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same // labelSelector spread as 1/1/0: // +-------+-------+-------+ @@ -3078,6 +3166,8 @@ type TopologySpreadConstraint struct { // scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) // violate MaxSkew(1). // - if MaxSkew is 2, incoming pod can be scheduled onto any zone. + // When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence + // to topologies that satisfy it. // It's a required field. Default value is 1 and 0 is not allowed. MaxSkew int32 `json:"maxSkew" protobuf:"varint,1,opt,name=maxSkew"` // TopologyKey is the key of node labels. Nodes that have a label with this key @@ -3088,10 +3178,13 @@ type TopologySpreadConstraint struct { TopologyKey string `json:"topologyKey" protobuf:"bytes,2,opt,name=topologyKey"` // WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy // the spread constraint. - // - DoNotSchedule (default) tells the scheduler not to schedule it - // - ScheduleAnyway tells the scheduler to still schedule it - // It's considered as "Unsatisfiable" if and only if placing incoming pod on any - // topology violates "MaxSkew". + // - DoNotSchedule (default) tells the scheduler not to schedule it. + // - ScheduleAnyway tells the scheduler to schedule the pod in any location, + // but giving higher precedence to topologies that would help reduce the + // skew. + // A constraint is considered "Unsatisfiable" for an incoming pod + // if and only if every possible node assigment for that pod would violate + // "MaxSkew" on some topology. // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same // labelSelector spread as 3/1/1: // +-------+-------+-------+ @@ -3208,8 +3301,45 @@ type PodSecurityContext struct { // Valid values are "OnRootMismatch" and "Always". If not specified defaults to "Always". // +optional FSGroupChangePolicy *PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty" protobuf:"bytes,9,opt,name=fsGroupChangePolicy"` + // The seccomp options to use by the containers in this pod. + // +optional + SeccompProfile *SeccompProfile `json:"seccompProfile,omitempty" protobuf:"bytes,10,opt,name=seccompProfile"` } +// SeccompProfile defines a pod/container's seccomp profile settings. +// Only one profile source may be set. +// +union +type SeccompProfile struct { + // type indicates which kind of seccomp profile will be applied. + // Valid options are: + // + // Localhost - a profile defined in a file on the node should be used. + // RuntimeDefault - the container runtime default profile should be used. + // Unconfined - no profile should be applied. + // +unionDiscriminator + Type SeccompProfileType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=SeccompProfileType"` + // localhostProfile indicates a profile defined in a file on the node should be used. + // The profile must be preconfigured on the node to work. + // Must be a descending path, relative to the kubelet's configured seccomp profile location. + // Must only be set if type is "Localhost". + // +optional + LocalhostProfile *string `json:"localhostProfile,omitempty" protobuf:"bytes,2,opt,name=localhostProfile"` +} + +// SeccompProfileType defines the supported seccomp profile types. +type SeccompProfileType string + +const ( + // SeccompProfileTypeUnconfined indicates no seccomp profile is applied (A.K.A. unconfined). + SeccompProfileTypeUnconfined SeccompProfileType = "Unconfined" + // SeccompProfileTypeRuntimeDefault represents the default container runtime seccomp profile. + SeccompProfileTypeRuntimeDefault SeccompProfileType = "RuntimeDefault" + // SeccompProfileTypeLocalhost indicates a profile defined in a file on the node should be used. + // The file's location is based off the kubelet's deprecated flag --seccomp-profile-root. + // Once the flag support is removed the location will be /seccomp. + SeccompProfileTypeLocalhost SeccompProfileType = "Localhost" +) + // PodQOSClass defines the supported qos classes of Pods. type PodQOSClass string @@ -3960,12 +4090,14 @@ type ServiceSpec struct { // +optional HealthCheckNodePort int32 `json:"healthCheckNodePort,omitempty" protobuf:"bytes,12,opt,name=healthCheckNodePort"` - // publishNotReadyAddresses, when set to true, indicates that DNS implementations - // must publish the notReadyAddresses of subsets for the Endpoints associated with - // the Service. The default value is false. - // The primary use case for setting this field is to use a StatefulSet's Headless Service - // to propagate SRV records for its Pods without respect to their readiness for purpose - // of peer discovery. + // publishNotReadyAddresses indicates that any agent which deals with endpoints for this + // Service should disregard any indications of ready/not-ready. + // The primary use case for setting this field is for a StatefulSet's Headless Service to + // propagate SRV DNS records for its Pods for the purpose of peer discovery. + // The Kubernetes controllers that generate Endpoints and EndpointSlice resources for + // Services interpret this to mean that all endpoints are considered "ready" even if the + // Pods themselves are not. Agents which consume only Kubernetes generated endpoints + // through the Endpoints or EndpointSlice resources can safely assume this behavior. // +optional PublishNotReadyAddresses bool `json:"publishNotReadyAddresses,omitempty" protobuf:"varint,13,opt,name=publishNotReadyAddresses"` @@ -3973,13 +4105,21 @@ type ServiceSpec struct { // +optional SessionAffinityConfig *SessionAffinityConfig `json:"sessionAffinityConfig,omitempty" protobuf:"bytes,14,opt,name=sessionAffinityConfig"` - // ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. - // IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is - // available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. - // Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which - // allocate external load-balancers should use the same IP family. Endpoints for this Service will be of - // this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the - // cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment. + // ipFamily specifies whether this Service has a preference for a particular IP family (e.g. + // IPv4 vs. IPv6) when the IPv6DualStack feature gate is enabled. In a dual-stack cluster, + // you can specify ipFamily when creating a ClusterIP Service to determine whether the + // controller will allocate an IPv4 or IPv6 IP for it, and you can specify ipFamily when + // creating a headless Service to determine whether it will have IPv4 or IPv6 Endpoints. In + // either case, if you do not specify an ipFamily explicitly, it will default to the + // cluster's primary IP family. + // This field is part of an alpha feature, and you should not make any assumptions about its + // semantics other than those described above. In particular, you should not assume that it + // can (or cannot) be changed after creation time; that it can only have the values "IPv4" + // and "IPv6"; or that its current value on a given Service correctly reflects the current + // state of that Service. (For ClusterIP Services, look at clusterIP to see if the Service + // is IPv4 or IPv6. For headless Services, look at the endpoints, which may be dual-stack in + // the future. For ExternalName Services, ipFamily has no meaning, but it may be set to an + // irrelevant value anyway.) // +optional IPFamily *IPFamily `json:"ipFamily,omitempty" protobuf:"bytes,15,opt,name=ipFamily,Configcasttype=IPFamily"` @@ -4020,7 +4160,8 @@ type ServicePort struct { // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. - // Field can be enabled with ServiceAppProtocol feature gate. + // This is a beta field that is guarded by the ServiceAppProtocol feature + // gate and enabled by default. // +optional AppProtocol *string `json:"appProtocol,omitempty" protobuf:"bytes,6,opt,name=appProtocol"` @@ -4246,7 +4387,8 @@ type EndpointPort struct { // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. - // Field can be enabled with ServiceAppProtocol feature gate. + // This is a beta field that is guarded by the ServiceAppProtocol feature + // gate and enabled by default. // +optional AppProtocol *string `json:"appProtocol,omitempty" protobuf:"bytes,4,opt,name=appProtocol"` } @@ -4368,7 +4510,7 @@ type NodeSystemInfo struct { MachineID string `json:"machineID" protobuf:"bytes,1,opt,name=machineID"` // SystemUUID reported by the node. For unique machine identification // MachineID is preferred. This field is specific to Red Hat hosts - // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html + // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid SystemUUID string `json:"systemUUID" protobuf:"bytes,2,opt,name=systemUUID"` // Boot ID reported by the node. BootID string `json:"bootID" protobuf:"bytes,3,opt,name=bootID"` @@ -5206,19 +5348,10 @@ type EventSeries struct { Count int32 `json:"count,omitempty" protobuf:"varint,1,name=count"` // Time of the last occurrence observed LastObservedTime metav1.MicroTime `json:"lastObservedTime,omitempty" protobuf:"bytes,2,name=lastObservedTime"` - // State of this Series: Ongoing or Finished - // Deprecated. Planned removal for 1.18 - State EventSeriesState `json:"state,omitempty" protobuf:"bytes,3,name=state"` + + // +k8s:deprecated=state,protobuf=3 } -type EventSeriesState string - -const ( - EventSeriesStateOngoing EventSeriesState = "Ongoing" - EventSeriesStateFinished EventSeriesState = "Finished" - EventSeriesStateUnknown EventSeriesState = "Unknown" -) - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // EventList is a list of events. @@ -5486,7 +5619,7 @@ type Secret struct { // be updated (only object metadata can be modified). // If not set to true, the field can be modified at any time. // Defaulted to nil. - // This is an alpha field enabled by ImmutableEphemeralVolumes feature gate. + // This is a beta field enabled by ImmutableEphemeralVolumes feature gate. // +optional Immutable *bool `json:"immutable,omitempty" protobuf:"varint,5,opt,name=immutable"` @@ -5627,7 +5760,7 @@ type ConfigMap struct { // be updated (only object metadata can be modified). // If not set to true, the field can be modified at any time. // Defaulted to nil. - // This is an alpha field enabled by ImmutableEphemeralVolumes feature gate. + // This is a beta field enabled by ImmutableEphemeralVolumes feature gate. // +optional Immutable *bool `json:"immutable,omitempty" protobuf:"varint,4,opt,name=immutable"` @@ -5695,6 +5828,7 @@ type ComponentCondition struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ComponentStatus (and ComponentStatusList) holds the cluster validation info. +// Deprecated: This API is deprecated in v1.19+ type ComponentStatus struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -5712,6 +5846,7 @@ type ComponentStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Status of all the conditions for the component as a list of ComponentStatus objects. +// Deprecated: This API is deprecated in v1.19+ type ComponentStatusList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. @@ -5730,7 +5865,10 @@ type DownwardAPIVolumeSource struct { // +optional Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"` // Optional: mode bits to use on created files by default. Must be a - // value between 0 and 0777. Defaults to 0644. + // Optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // Defaults to 0644. // Directories within the path are not affected by this setting. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. @@ -5753,8 +5891,10 @@ type DownwardAPIVolumeFile struct { // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. // +optional ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,3,opt,name=resourceFieldRef"` - // Optional: mode bits to use on this file, must be a value between 0 - // and 0777. If not specified, the volume defaultMode will be used. + // Optional: mode bits used to set permissions on this file, must be an octal value + // between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // If not specified, the volume defaultMode will be used. // This might be in conflict with other options that affect the file // mode, like fsGroup, and the result can be other mode bits set. // +optional @@ -5832,6 +5972,11 @@ type SecurityContext struct { // This requires the ProcMountType feature flag to be enabled. // +optional ProcMount *ProcMountType `json:"procMount,omitempty" protobuf:"bytes,9,opt,name=procMount"` + // The seccomp options to use by this container. If seccomp options are + // provided at both the pod & container level, the container options + // override the pod options. + // +optional + SeccompProfile *SeccompProfile `json:"seccompProfile,omitempty" protobuf:"bytes,11,opt,name=seccompProfile"` } type ProcMountType string @@ -5920,7 +6065,7 @@ type Sysctl struct { } // NodeResources is an object for conveying resource information about a node. -// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details. +// see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details. type NodeResources struct { // Capacity represents the available resources of a node Capacity ResourceList `protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` diff --git a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index 331451fe25f..61832b8159a 100644 --- a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -230,7 +230,7 @@ func (ComponentCondition) SwaggerDoc() map[string]string { } var map_ComponentStatus = map[string]string{ - "": "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", + "": "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "conditions": "List of component conditions observed", } @@ -240,7 +240,7 @@ func (ComponentStatus) SwaggerDoc() map[string]string { } var map_ComponentStatusList = map[string]string{ - "": "Status of all the conditions for the component as a list of ComponentStatus objects.", + "": "Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of ComponentStatus objects.", } @@ -252,7 +252,7 @@ func (ComponentStatusList) SwaggerDoc() map[string]string { var map_ConfigMap = map[string]string{ "": "ConfigMap holds configuration data for pods to consume.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "immutable": "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is an alpha field enabled by ImmutableEphemeralVolumes feature gate.", + "immutable": "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate.", "data": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.", "binaryData": "BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.", } @@ -316,7 +316,7 @@ func (ConfigMapProjection) SwaggerDoc() map[string]string { var map_ConfigMapVolumeSource = map[string]string{ "": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "defaultMode": "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", "optional": "Specify whether the ConfigMap or its keys must be defined", } @@ -462,7 +462,7 @@ var map_DownwardAPIVolumeFile = map[string]string{ "path": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", "fieldRef": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", "resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", - "mode": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "mode": "Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", } func (DownwardAPIVolumeFile) SwaggerDoc() map[string]string { @@ -472,7 +472,7 @@ func (DownwardAPIVolumeFile) SwaggerDoc() map[string]string { var map_DownwardAPIVolumeSource = map[string]string{ "": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", "items": "Items is a list of downward API volume file", - "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "defaultMode": "Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", } func (DownwardAPIVolumeSource) SwaggerDoc() map[string]string { @@ -506,7 +506,7 @@ var map_EndpointPort = map[string]string{ "name": "The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.", "port": "The port number of the endpoint.", "protocol": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", - "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. Field can be enabled with ServiceAppProtocol feature gate.", + "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default.", } func (EndpointPort) SwaggerDoc() map[string]string { @@ -568,7 +568,7 @@ func (EnvVar) SwaggerDoc() map[string]string { var map_EnvVarSource = map[string]string{ "": "EnvVarSource represents a source for the value of an EnvVar.", - "fieldRef": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", + "fieldRef": "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", "resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.", "configMapKeyRef": "Selects a key of a ConfigMap.", "secretKeyRef": "Selects a key of a secret in the pod's namespace", @@ -626,6 +626,16 @@ func (EphemeralContainers) SwaggerDoc() map[string]string { return map_EphemeralContainers } +var map_EphemeralVolumeSource = map[string]string{ + "": "Represents an ephemeral volume that is handled by a normal storage driver.", + "volumeClaimTemplate": "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.", + "readOnly": "Specifies a read-only configuration for the volume. Defaults to false (read/write).", +} + +func (EphemeralVolumeSource) SwaggerDoc() map[string]string { + return map_EphemeralVolumeSource +} + var map_Event = map[string]string{ "": "Event is a report of an event somewhere in the cluster.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", @@ -663,7 +673,6 @@ var map_EventSeries = map[string]string{ "": "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.", "count": "Number of occurrences in this series up to the last heartbeat time", "lastObservedTime": "Time of the last occurrence observed", - "state": "State of this Series: Ongoing or Finished Deprecated. Planned removal for 1.18", } func (EventSeries) SwaggerDoc() map[string]string { @@ -880,7 +889,7 @@ var map_KeyToPath = map[string]string{ "": "Maps a string key to a path within a volume.", "key": "The key to project.", "path": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", - "mode": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "mode": "Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", } func (KeyToPath) SwaggerDoc() map[string]string { @@ -1134,7 +1143,7 @@ func (NodeProxyOptions) SwaggerDoc() map[string]string { } var map_NodeResources = map[string]string{ - "": "NodeResources is an object for conveying resource information about a node. see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.", + "": "NodeResources is an object for conveying resource information about a node. see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details.", "Capacity": "Capacity represents the available resources of a node", } @@ -1209,7 +1218,7 @@ func (NodeStatus) SwaggerDoc() map[string]string { var map_NodeSystemInfo = map[string]string{ "": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", "machineID": "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", - "systemUUID": "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html", + "systemUUID": "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid", "bootID": "Boot ID reported by the node.", "kernelVersion": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", "osImage": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", @@ -1320,6 +1329,16 @@ func (PersistentVolumeClaimStatus) SwaggerDoc() map[string]string { return map_PersistentVolumeClaimStatus } +var map_PersistentVolumeClaimTemplate = map[string]string{ + "": "PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.", + "metadata": "May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.", + "spec": "The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.", +} + +func (PersistentVolumeClaimTemplate) SwaggerDoc() map[string]string { + return map_PersistentVolumeClaimTemplate +} + var map_PersistentVolumeClaimVolumeSource = map[string]string{ "": "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).", "claimName": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", @@ -1584,6 +1603,7 @@ var map_PodSecurityContext = map[string]string{ "fsGroup": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw ", "sysctls": "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.", "fsGroupChangePolicy": "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified defaults to \"Always\".", + "seccompProfile": "The seccomp options to use by the containers in this pod.", } func (PodSecurityContext) SwaggerDoc() map[string]string { @@ -1632,9 +1652,10 @@ var map_PodSpec = map[string]string{ "readinessGates": "If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md", "runtimeClassName": "RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is a beta feature as of Kubernetes v1.14.", "enableServiceLinks": "EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.", - "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", + "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.", - "topologySpreadConstraints": "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. This field is only honored by clusters that enable the EvenPodsSpread feature. All topologySpreadConstraints are ANDed.", + "topologySpreadConstraints": "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.", + "setHostnameAsFQDN": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", } func (PodSpec) SwaggerDoc() map[string]string { @@ -1760,7 +1781,7 @@ func (Probe) SwaggerDoc() map[string]string { var map_ProjectedVolumeSource = map[string]string{ "": "Represents a projected volume source", "sources": "list of volume projections", - "defaultMode": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "defaultMode": "Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", } func (ProjectedVolumeSource) SwaggerDoc() map[string]string { @@ -2015,10 +2036,20 @@ func (ScopedResourceSelectorRequirement) SwaggerDoc() map[string]string { return map_ScopedResourceSelectorRequirement } +var map_SeccompProfile = map[string]string{ + "": "SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.", + "type": "type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.", + "localhostProfile": "localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\".", +} + +func (SeccompProfile) SwaggerDoc() map[string]string { + return map_SeccompProfile +} + var map_Secret = map[string]string{ "": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "immutable": "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is an alpha field enabled by ImmutableEphemeralVolumes feature gate.", + "immutable": "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. This is a beta field enabled by ImmutableEphemeralVolumes feature gate.", "data": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", "stringData": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", "type": "Used to facilitate programmatic handling of secret data.", @@ -2081,7 +2112,7 @@ var map_SecretVolumeSource = map[string]string{ "": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", "secretName": "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", "items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "defaultMode": "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", "optional": "Specify whether the Secret or its keys must be defined", } @@ -2101,6 +2132,7 @@ var map_SecurityContext = map[string]string{ "readOnlyRootFilesystem": "Whether this container has a read-only root filesystem. Default is false.", "allowPrivilegeEscalation": "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN", "procMount": "procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled.", + "seccompProfile": "The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.", } func (SecurityContext) SwaggerDoc() map[string]string { @@ -2174,7 +2206,7 @@ var map_ServicePort = map[string]string{ "": "ServicePort contains information on service's port.", "name": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.", "protocol": "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.", - "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. Field can be enabled with ServiceAppProtocol feature gate.", + "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default.", "port": "The port that will be exposed by this service.", "targetPort": "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", "nodePort": "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", @@ -2206,9 +2238,9 @@ var map_ServiceSpec = map[string]string{ "externalName": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.", "externalTrafficPolicy": "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.", "healthCheckNodePort": "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.", - "publishNotReadyAddresses": "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery.", + "publishNotReadyAddresses": "publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. The primary use case for setting this field is for a StatefulSet's Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered \"ready\" even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior.", "sessionAffinityConfig": "sessionAffinityConfig contains the configurations of session affinity.", - "ipFamily": "ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which allocate external load-balancers should use the same IP family. Endpoints for this Service will be of this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment.", + "ipFamily": "ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. IPv6) when the IPv6DualStack feature gate is enabled. In a dual-stack cluster, you can specify ipFamily when creating a ClusterIP Service to determine whether the controller will allocate an IPv4 or IPv6 IP for it, and you can specify ipFamily when creating a headless Service to determine whether it will have IPv4 or IPv6 Endpoints. In either case, if you do not specify an ipFamily explicitly, it will default to the cluster's primary IP family. This field is part of an alpha feature, and you should not make any assumptions about its semantics other than those described above. In particular, you should not assume that it can (or cannot) be changed after creation time; that it can only have the values \"IPv4\" and \"IPv6\"; or that its current value on a given Service correctly reflects the current state of that Service. (For ClusterIP Services, look at clusterIP to see if the Service is IPv4 or IPv6. For headless Services, look at the endpoints, which may be dual-stack in the future. For ExternalName Services, ipFamily has no meaning, but it may be set to an irrelevant value anyway.)", "topologyKeys": "topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value \"*\" may be used to mean \"any topology\". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied.", } @@ -2326,9 +2358,9 @@ func (TopologySelectorTerm) SwaggerDoc() map[string]string { var map_TopologySpreadConstraint = map[string]string{ "": "TopologySpreadConstraint specifies how to spread matching pods among the given topology.", - "maxSkew": "MaxSkew describes the degree to which pods may be unevenly distributed. It's the maximum permitted difference between the number of matching pods in any two topology domains of a given topology type. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: ", + "maxSkew": "MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: ", "topologyKey": "TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a \"bucket\", and try to put balanced number of pods into each bucket. It's a required field.", - "whenUnsatisfiable": "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it - ScheduleAnyway tells the scheduler to still schedule it It's considered as \"Unsatisfiable\" if and only if placing incoming pod on any topology violates \"MaxSkew\". For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: ", + "whenUnsatisfiable": "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assigment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: ", "labelSelector": "LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.", } @@ -2430,7 +2462,8 @@ var map_VolumeSource = map[string]string{ "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", "storageos": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", - "csi": "CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature).", + "csi": "CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", + "ephemeral": "Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", } func (VolumeSource) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go index 23d964447e5..445c7c04a9d 100644 --- a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go @@ -1433,6 +1433,27 @@ func (in *EphemeralContainers) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EphemeralVolumeSource) DeepCopyInto(out *EphemeralVolumeSource) { + *out = *in + if in.VolumeClaimTemplate != nil { + in, out := &in.VolumeClaimTemplate, &out.VolumeClaimTemplate + *out = new(PersistentVolumeClaimTemplate) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralVolumeSource. +func (in *EphemeralVolumeSource) DeepCopy() *EphemeralVolumeSource { + if in == nil { + return nil + } + out := new(EphemeralVolumeSource) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Event) DeepCopyInto(out *Event) { *out = *in @@ -2985,6 +3006,24 @@ func (in *PersistentVolumeClaimStatus) DeepCopy() *PersistentVolumeClaimStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PersistentVolumeClaimTemplate) DeepCopyInto(out *PersistentVolumeClaimTemplate) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimTemplate. +func (in *PersistentVolumeClaimTemplate) DeepCopy() *PersistentVolumeClaimTemplate { + if in == nil { + return nil + } + out := new(PersistentVolumeClaimTemplate) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PersistentVolumeClaimVolumeSource) DeepCopyInto(out *PersistentVolumeClaimVolumeSource) { *out = *in @@ -3694,6 +3733,11 @@ func (in *PodSecurityContext) DeepCopyInto(out *PodSecurityContext) { *out = new(PodFSGroupChangePolicy) **out = **in } + if in.SeccompProfile != nil { + in, out := &in.SeccompProfile, &out.SeccompProfile + *out = new(SeccompProfile) + (*in).DeepCopyInto(*out) + } return } @@ -3859,6 +3903,11 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.SetHostnameAsFQDN != nil { + in, out := &in.SetHostnameAsFQDN, &out.SetHostnameAsFQDN + *out = new(bool) + **out = **in + } return } @@ -4675,6 +4724,27 @@ func (in *ScopedResourceSelectorRequirement) DeepCopy() *ScopedResourceSelectorR return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeccompProfile) DeepCopyInto(out *SeccompProfile) { + *out = *in + if in.LocalhostProfile != nil { + in, out := &in.LocalhostProfile, &out.LocalhostProfile + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeccompProfile. +func (in *SeccompProfile) DeepCopy() *SeccompProfile { + if in == nil { + return nil + } + out := new(SeccompProfile) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Secret) DeepCopyInto(out *Secret) { *out = *in @@ -4936,6 +5006,11 @@ func (in *SecurityContext) DeepCopyInto(out *SecurityContext) { *out = new(ProcMountType) **out = **in } + if in.SeccompProfile != nil { + in, out := &in.SeccompProfile, &out.SeccompProfile + *out = new(SeccompProfile) + (*in).DeepCopyInto(*out) + } return } @@ -5727,6 +5802,11 @@ func (in *VolumeSource) DeepCopyInto(out *VolumeSource) { *out = new(CSIVolumeSource) (*in).DeepCopyInto(*out) } + if in.Ephemeral != nil { + in, out := &in.Ephemeral, &out.Ephemeral + *out = new(EphemeralVolumeSource) + (*in).DeepCopyInto(*out) + } return } diff --git a/vendor/k8s.io/api/discovery/v1alpha1/generated.proto b/vendor/k8s.io/api/discovery/v1alpha1/generated.proto index 62074e7a7b4..2cbbdcdb01c 100644 --- a/vendor/k8s.io/api/discovery/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/discovery/v1alpha1/generated.proto @@ -151,7 +151,6 @@ message EndpointSliceList { optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of endpoint slices - // +listType=set repeated EndpointSlice items = 2; } diff --git a/vendor/k8s.io/api/discovery/v1alpha1/types.go b/vendor/k8s.io/api/discovery/v1alpha1/types.go index fff30b5c7a0..cf50b501cf4 100644 --- a/vendor/k8s.io/api/discovery/v1alpha1/types.go +++ b/vendor/k8s.io/api/discovery/v1alpha1/types.go @@ -157,6 +157,5 @@ type EndpointSliceList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of endpoint slices - // +listType=set Items []EndpointSlice `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/k8s.io/api/discovery/v1beta1/BUILD b/vendor/k8s.io/api/discovery/v1beta1/BUILD index b6a9064a62b..741e88938dd 100644 --- a/vendor/k8s.io/api/discovery/v1beta1/BUILD +++ b/vendor/k8s.io/api/discovery/v1beta1/BUILD @@ -10,6 +10,7 @@ go_library( "types_swagger_doc_generated.go", "well_known_labels.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1beta1", importpath = "k8s.io/api/discovery/v1beta1", diff --git a/vendor/k8s.io/api/discovery/v1beta1/doc.go b/vendor/k8s.io/api/discovery/v1beta1/doc.go index 9b54d1b94ce..7d7084802dc 100644 --- a/vendor/k8s.io/api/discovery/v1beta1/doc.go +++ b/vendor/k8s.io/api/discovery/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=discovery.k8s.io package v1beta1 // import "k8s.io/api/discovery/v1beta1" diff --git a/vendor/k8s.io/api/discovery/v1beta1/generated.proto b/vendor/k8s.io/api/discovery/v1beta1/generated.proto index 581ddf7b6f9..adf10c0e484 100644 --- a/vendor/k8s.io/api/discovery/v1beta1/generated.proto +++ b/vendor/k8s.io/api/discovery/v1beta1/generated.proto @@ -152,7 +152,6 @@ message EndpointSliceList { optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of endpoint slices - // +listType=set repeated EndpointSlice items = 2; } diff --git a/vendor/k8s.io/api/discovery/v1beta1/types.go b/vendor/k8s.io/api/discovery/v1beta1/types.go index 20fcde94ef6..5cafea74790 100644 --- a/vendor/k8s.io/api/discovery/v1beta1/types.go +++ b/vendor/k8s.io/api/discovery/v1beta1/types.go @@ -23,6 +23,8 @@ import ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.16 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // EndpointSlice represents a subset of the endpoints that implement a service. // For a given service there may be multiple EndpointSlice objects, selected by @@ -150,6 +152,8 @@ type EndpointPort struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.16 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // EndpointSliceList represents a list of endpoint slices type EndpointSliceList struct { @@ -158,6 +162,5 @@ type EndpointSliceList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of endpoint slices - // +listType=set Items []EndpointSlice `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/k8s.io/api/discovery/v1beta1/well_known_labels.go b/vendor/k8s.io/api/discovery/v1beta1/well_known_labels.go index b0caa3c6e71..6ca64360ff9 100644 --- a/vendor/k8s.io/api/discovery/v1beta1/well_known_labels.go +++ b/vendor/k8s.io/api/discovery/v1beta1/well_known_labels.go @@ -25,4 +25,8 @@ const ( // same cluster. It is highly recommended to configure this label for all // EndpointSlices. LabelManagedBy = "endpointslice.kubernetes.io/managed-by" + // LabelSkipMirror can be set to true on an Endpoints resource to indicate + // that the EndpointSliceMirroring controller should not mirror this + // resource with EndpointSlices. + LabelSkipMirror = "endpointslice.kubernetes.io/skip-mirror" ) diff --git a/vendor/k8s.io/api/discovery/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/discovery/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..09e94d0e8bb --- /dev/null +++ b/vendor/k8s.io/api/discovery/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,57 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *EndpointSlice) APILifecycleIntroduced() (major, minor int) { + return 1, 16 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *EndpointSlice) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *EndpointSlice) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *EndpointSliceList) APILifecycleIntroduced() (major, minor int) { + return 1, 16 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *EndpointSliceList) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *EndpointSliceList) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/BUILD b/vendor/k8s.io/api/events/v1/BUILD similarity index 84% rename from vendor/k8s.io/api/auditregistration/v1alpha1/BUILD rename to vendor/k8s.io/api/events/v1/BUILD index 5f1523e0f00..15ecf48bbd8 100644 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/BUILD +++ b/vendor/k8s.io/api/events/v1/BUILD @@ -10,10 +10,11 @@ go_library( "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/api/auditregistration/v1alpha1", - importpath = "k8s.io/api/auditregistration/v1alpha1", + importmap = "k8s.io/kubernetes/vendor/k8s.io/api/events/v1", + importpath = "k8s.io/api/events/v1", visibility = ["//visibility:public"], deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", diff --git a/vendor/k8s.io/kube-scheduler/config/v1alpha1/doc.go b/vendor/k8s.io/api/events/v1/doc.go similarity index 79% rename from vendor/k8s.io/kube-scheduler/config/v1alpha1/doc.go rename to vendor/k8s.io/api/events/v1/doc.go index 73c9b6734e8..6e320e06340 100644 --- a/vendor/k8s.io/kube-scheduler/config/v1alpha1/doc.go +++ b/vendor/k8s.io/api/events/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2020 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. @@ -15,7 +15,9 @@ limitations under the License. */ // +k8s:deepcopy-gen=package +// +k8s:protobuf-gen=package // +k8s:openapi-gen=true -// +groupName=kubescheduler.config.k8s.io -package v1alpha1 // import "k8s.io/kube-scheduler/config/v1alpha1" +// +groupName=events.k8s.io + +package v1 // import "k8s.io/api/events/v1" diff --git a/vendor/k8s.io/api/events/v1/generated.pb.go b/vendor/k8s.io/api/events/v1/generated.pb.go new file mode 100644 index 00000000000..717137cffe5 --- /dev/null +++ b/vendor/k8s.io/api/events/v1/generated.pb.go @@ -0,0 +1,1406 @@ +/* +Copyright 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. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/kubernetes/vendor/k8s.io/api/events/v1/generated.proto + +package v1 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + v11 "k8s.io/api/core/v1" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *Event) Reset() { *m = Event{} } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { + return fileDescriptor_ee2600587b650fac, []int{0} +} +func (m *Event) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) +} +func (m *Event) XXX_Size() int { + return m.Size() +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Event proto.InternalMessageInfo + +func (m *EventList) Reset() { *m = EventList{} } +func (*EventList) ProtoMessage() {} +func (*EventList) Descriptor() ([]byte, []int) { + return fileDescriptor_ee2600587b650fac, []int{1} +} +func (m *EventList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventList) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventList.Merge(m, src) +} +func (m *EventList) XXX_Size() int { + return m.Size() +} +func (m *EventList) XXX_DiscardUnknown() { + xxx_messageInfo_EventList.DiscardUnknown(m) +} + +var xxx_messageInfo_EventList proto.InternalMessageInfo + +func (m *EventSeries) Reset() { *m = EventSeries{} } +func (*EventSeries) ProtoMessage() {} +func (*EventSeries) Descriptor() ([]byte, []int) { + return fileDescriptor_ee2600587b650fac, []int{2} +} +func (m *EventSeries) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventSeries) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSeries.Merge(m, src) +} +func (m *EventSeries) XXX_Size() int { + return m.Size() +} +func (m *EventSeries) XXX_DiscardUnknown() { + xxx_messageInfo_EventSeries.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSeries proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Event)(nil), "k8s.io.api.events.v1.Event") + proto.RegisterType((*EventList)(nil), "k8s.io.api.events.v1.EventList") + proto.RegisterType((*EventSeries)(nil), "k8s.io.api.events.v1.EventSeries") +} + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/events/v1/generated.proto", fileDescriptor_ee2600587b650fac) +} + +var fileDescriptor_ee2600587b650fac = []byte{ + // 772 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0x8f, 0xbb, 0x4d, 0xda, 0x4c, 0x76, 0xb7, 0xe9, 0x2c, 0x52, 0x87, 0xae, 0xe4, 0x84, 0xac, + 0x84, 0x22, 0x24, 0x6c, 0xb2, 0x42, 0x88, 0x0b, 0x12, 0xeb, 0xa6, 0xa0, 0xa2, 0x96, 0x4a, 0xd3, + 0x9e, 0x10, 0x87, 0x4e, 0x9c, 0x57, 0xd7, 0x24, 0x9e, 0xb1, 0x66, 0x26, 0x91, 0x7a, 0xe3, 0x82, + 0xc4, 0x91, 0x2f, 0xc0, 0x07, 0x40, 0x7c, 0x91, 0x1e, 0x7b, 0xec, 0x29, 0xa2, 0xe6, 0x8b, 0x20, + 0x8f, 0x9d, 0x38, 0xcd, 0x1f, 0x08, 0xda, 0x9b, 0xe7, 0xbd, 0xdf, 0x9f, 0xf7, 0x66, 0x9e, 0x1f, + 0xfa, 0x6a, 0xf0, 0xa5, 0x72, 0x42, 0xe1, 0x0e, 0x46, 0x3d, 0x90, 0x1c, 0x34, 0x28, 0x77, 0x0c, + 0xbc, 0x2f, 0xa4, 0x9b, 0x27, 0x58, 0x1c, 0xba, 0x30, 0x06, 0xae, 0x95, 0x3b, 0xee, 0xb8, 0x01, + 0x70, 0x90, 0x4c, 0x43, 0xdf, 0x89, 0xa5, 0xd0, 0x02, 0x7f, 0x90, 0xa1, 0x1c, 0x16, 0x87, 0x4e, + 0x86, 0x72, 0xc6, 0x9d, 0xc3, 0x4f, 0x83, 0x50, 0xdf, 0x8c, 0x7a, 0x8e, 0x2f, 0x22, 0x37, 0x10, + 0x81, 0x70, 0x0d, 0xb8, 0x37, 0xba, 0x36, 0x27, 0x73, 0x30, 0x5f, 0x99, 0xc8, 0x61, 0x6b, 0xce, + 0xca, 0x17, 0x12, 0x56, 0x18, 0x1d, 0x7e, 0x5e, 0x60, 0x22, 0xe6, 0xdf, 0x84, 0x1c, 0xe4, 0xad, + 0x1b, 0x0f, 0x82, 0x34, 0xa0, 0xdc, 0x08, 0x34, 0x5b, 0xc5, 0x72, 0xd7, 0xb1, 0xe4, 0x88, 0xeb, + 0x30, 0x82, 0x25, 0xc2, 0x17, 0xff, 0x45, 0x50, 0xfe, 0x0d, 0x44, 0x6c, 0x91, 0xd7, 0xfa, 0xbd, + 0x8a, 0xca, 0xc7, 0x69, 0xff, 0xf8, 0x0a, 0xed, 0xa6, 0xd5, 0xf4, 0x99, 0x66, 0xc4, 0x6a, 0x5a, + 0xed, 0xda, 0xdb, 0xcf, 0x9c, 0xe2, 0x92, 0x66, 0xa2, 0x4e, 0x3c, 0x08, 0xd2, 0x80, 0x72, 0x52, + 0xb4, 0x33, 0xee, 0x38, 0xe7, 0xbd, 0x9f, 0xc0, 0xd7, 0x67, 0xa0, 0x99, 0x87, 0xef, 0x26, 0x8d, + 0x52, 0x32, 0x69, 0xa0, 0x22, 0x46, 0x67, 0xaa, 0xf8, 0x0a, 0x55, 0xcd, 0x55, 0x5f, 0x86, 0x11, + 0x90, 0x2d, 0x63, 0xe1, 0x6e, 0x66, 0x71, 0x16, 0xfa, 0x52, 0xa4, 0x34, 0x6f, 0x3f, 0x77, 0xa8, + 0x1e, 0x4f, 0x95, 0x68, 0x21, 0x8a, 0x8f, 0x51, 0x45, 0x81, 0x0c, 0x41, 0x91, 0x67, 0x46, 0xfe, + 0x23, 0x67, 0xd5, 0x33, 0x3b, 0x86, 0x7b, 0x61, 0x80, 0x1e, 0x4a, 0x26, 0x8d, 0x4a, 0xf6, 0x4d, + 0x73, 0x32, 0x3e, 0x43, 0xaf, 0x24, 0xc4, 0x42, 0xea, 0x90, 0x07, 0x47, 0x82, 0x6b, 0x29, 0x86, + 0x43, 0x90, 0x64, 0xbb, 0x69, 0xb5, 0xab, 0xde, 0xeb, 0xbc, 0x82, 0x57, 0x74, 0x19, 0x42, 0x57, + 0xf1, 0xf0, 0xb7, 0x68, 0x7f, 0x16, 0x3e, 0xe1, 0x4a, 0x33, 0xee, 0x03, 0x29, 0x1b, 0xb1, 0x0f, + 0x73, 0xb1, 0x7d, 0xba, 0x08, 0xa0, 0xcb, 0x1c, 0xfc, 0x31, 0xaa, 0x30, 0x5f, 0x87, 0x82, 0x93, + 0x8a, 0x61, 0xbf, 0xcc, 0xd9, 0x95, 0x77, 0x26, 0x4a, 0xf3, 0x6c, 0x8a, 0x93, 0xc0, 0x94, 0xe0, + 0x64, 0xe7, 0x29, 0x8e, 0x9a, 0x28, 0xcd, 0xb3, 0xf8, 0x12, 0x55, 0x25, 0x04, 0x4c, 0xf6, 0x43, + 0x1e, 0x90, 0x5d, 0x73, 0x63, 0x6f, 0xe6, 0x6f, 0x2c, 0x9d, 0xe9, 0xe2, 0x85, 0x29, 0x5c, 0x83, + 0x04, 0xee, 0xcf, 0x3d, 0x02, 0x9d, 0xb2, 0x69, 0x21, 0x84, 0xbf, 0x43, 0x3b, 0x12, 0x86, 0xe9, + 0x8c, 0x91, 0xea, 0xe6, 0x9a, 0xb5, 0x64, 0xd2, 0xd8, 0xa1, 0x19, 0x8f, 0x4e, 0x05, 0x70, 0x13, + 0x6d, 0x73, 0xa1, 0x81, 0x20, 0xd3, 0xc7, 0xf3, 0xdc, 0x77, 0xfb, 0x7b, 0xa1, 0x81, 0x9a, 0x4c, + 0x8a, 0xd0, 0xb7, 0x31, 0x90, 0xda, 0x53, 0xc4, 0xe5, 0x6d, 0x0c, 0xd4, 0x64, 0x30, 0xa0, 0x7a, + 0x1f, 0x62, 0x09, 0x7e, 0xaa, 0x78, 0x21, 0x46, 0xd2, 0x07, 0xf2, 0xdc, 0x14, 0xd6, 0x58, 0x55, + 0x58, 0x36, 0x1c, 0x06, 0xe6, 0x91, 0x5c, 0xae, 0xde, 0x5d, 0x10, 0xa0, 0x4b, 0x92, 0xf8, 0x57, + 0x0b, 0x91, 0x22, 0xf8, 0x4d, 0x28, 0x95, 0x99, 0x49, 0xa5, 0x59, 0x14, 0x93, 0x17, 0xc6, 0xef, + 0x93, 0xcd, 0xa6, 0xdd, 0x0c, 0x7a, 0x33, 0xb7, 0x26, 0xdd, 0x35, 0x9a, 0x74, 0xad, 0x1b, 0xfe, + 0xc5, 0x42, 0x07, 0x45, 0xf2, 0x94, 0xcd, 0x57, 0xf2, 0xf2, 0x7f, 0x57, 0xd2, 0xc8, 0x2b, 0x39, + 0xe8, 0xae, 0x96, 0xa4, 0xeb, 0xbc, 0xf0, 0x3b, 0xb4, 0x57, 0xa4, 0x8e, 0xc4, 0x88, 0x6b, 0xb2, + 0xd7, 0xb4, 0xda, 0x65, 0xef, 0x20, 0x97, 0xdc, 0xeb, 0x3e, 0x4d, 0xd3, 0x45, 0x7c, 0xeb, 0x4f, + 0x0b, 0x65, 0xbf, 0xfa, 0x69, 0xa8, 0x34, 0xfe, 0x71, 0x69, 0x47, 0x39, 0x9b, 0x35, 0x92, 0xb2, + 0xcd, 0x86, 0xaa, 0xe7, 0xce, 0xbb, 0xd3, 0xc8, 0xdc, 0x7e, 0xfa, 0x1a, 0x95, 0x43, 0x0d, 0x91, + 0x22, 0x5b, 0xcd, 0x67, 0xed, 0xda, 0xdb, 0xd7, 0xff, 0xb2, 0x3c, 0xbc, 0x17, 0xb9, 0x4e, 0xf9, + 0x24, 0x65, 0xd0, 0x8c, 0xd8, 0xfa, 0xc3, 0x42, 0xb5, 0xb9, 0xe5, 0x82, 0xdf, 0xa0, 0xb2, 0x6f, + 0xda, 0xb6, 0x4c, 0xdb, 0x33, 0x52, 0xd6, 0x6c, 0x96, 0xc3, 0x23, 0x54, 0x1f, 0x32, 0xa5, 0xcf, + 0x7b, 0x0a, 0xe4, 0x18, 0xfa, 0xef, 0xb3, 0x1d, 0x67, 0xf3, 0x7a, 0xba, 0x20, 0x48, 0x97, 0x2c, + 0xbc, 0xf6, 0xdd, 0xa3, 0x5d, 0xba, 0x7f, 0xb4, 0x4b, 0x0f, 0x8f, 0x76, 0xe9, 0xe7, 0xc4, 0xb6, + 0xee, 0x12, 0xdb, 0xba, 0x4f, 0x6c, 0xeb, 0x21, 0xb1, 0xad, 0xbf, 0x12, 0xdb, 0xfa, 0xed, 0x6f, + 0xbb, 0xf4, 0xc3, 0xd6, 0xb8, 0xf3, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0xcb, 0x1e, 0x6e, + 0x6b, 0x07, 0x00, 0x00, +} + +func (m *Event) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i = encodeVarintGenerated(dAtA, i, uint64(m.DeprecatedCount)) + i-- + dAtA[i] = 0x78 + { + size, err := m.DeprecatedLastTimestamp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + { + size, err := m.DeprecatedFirstTimestamp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + { + size, err := m.DeprecatedSource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x5a + i -= len(m.Note) + copy(dAtA[i:], m.Note) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Note))) + i-- + dAtA[i] = 0x52 + if m.Related != nil { + { + size, err := m.Related.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + { + size, err := m.Regarding.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x3a + i -= len(m.Action) + copy(dAtA[i:], m.Action) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Action))) + i-- + dAtA[i] = 0x32 + i -= len(m.ReportingInstance) + copy(dAtA[i:], m.ReportingInstance) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ReportingInstance))) + i-- + dAtA[i] = 0x2a + i -= len(m.ReportingController) + copy(dAtA[i:], m.ReportingController) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ReportingController))) + i-- + dAtA[i] = 0x22 + if m.Series != nil { + { + size, err := m.Series.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + { + size, err := m.EventTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventSeries) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSeries) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSeries) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.LastObservedTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i = encodeVarintGenerated(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Event) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.EventTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Series != nil { + l = m.Series.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.ReportingController) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ReportingInstance) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Action) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Regarding.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Related != nil { + l = m.Related.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.Note) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = m.DeprecatedSource.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.DeprecatedFirstTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.DeprecatedLastTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.DeprecatedCount)) + return n +} + +func (m *EventList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *EventSeries) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Count)) + l = m.LastObservedTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Event) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Event{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `EventTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EventTime), "MicroTime", "v1.MicroTime", 1), `&`, ``, 1) + `,`, + `Series:` + strings.Replace(this.Series.String(), "EventSeries", "EventSeries", 1) + `,`, + `ReportingController:` + fmt.Sprintf("%v", this.ReportingController) + `,`, + `ReportingInstance:` + fmt.Sprintf("%v", this.ReportingInstance) + `,`, + `Action:` + fmt.Sprintf("%v", this.Action) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Regarding:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Regarding), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, + `Related:` + strings.Replace(fmt.Sprintf("%v", this.Related), "ObjectReference", "v11.ObjectReference", 1) + `,`, + `Note:` + fmt.Sprintf("%v", this.Note) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `DeprecatedSource:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.DeprecatedSource), "EventSource", "v11.EventSource", 1), `&`, ``, 1) + `,`, + `DeprecatedFirstTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.DeprecatedFirstTimestamp), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `DeprecatedLastTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.DeprecatedLastTimestamp), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `DeprecatedCount:` + fmt.Sprintf("%v", this.DeprecatedCount) + `,`, + `}`, + }, "") + return s +} +func (this *EventList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]Event{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Event", "Event", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&EventList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *EventSeries) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&EventSeries{`, + `Count:` + fmt.Sprintf("%v", this.Count) + `,`, + `LastObservedTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastObservedTime), "MicroTime", "v1.MicroTime", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Event) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EventTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.EventTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Series == nil { + m.Series = &EventSeries{} + } + if err := m.Series.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReportingController", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReportingController = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReportingInstance", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReportingInstance = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Action = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Regarding", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Regarding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Related", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Related == nil { + m.Related = &v11.ObjectReference{} + } + if err := m.Related.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Note", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Note = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedSource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeprecatedSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedFirstTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeprecatedFirstTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedLastTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeprecatedLastTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedCount", wireType) + } + m.DeprecatedCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DeprecatedCount |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Event{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSeries) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSeries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSeries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastObservedTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastObservedTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/k8s.io/api/events/v1/generated.proto b/vendor/k8s.io/api/events/v1/generated.proto new file mode 100644 index 00000000000..18e3d0182e0 --- /dev/null +++ b/vendor/k8s.io/api/events/v1/generated.proto @@ -0,0 +1,125 @@ +/* +Copyright 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. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.api.events.v1; + +import "k8s.io/api/core/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1"; + +// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. +message Event { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // eventTime is the time when this Event was first observed. It is required. + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 2; + + // series is data about the Event series this event represents or nil if it's a singleton Event. + // +optional + optional EventSeries series = 3; + + // reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. + // This field cannot be empty for new Events. + // +optional + optional string reportingController = 4; + + // reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. + // This field cannot be empty for new Events and it can have at most 128 characters. + // +optional + optional string reportingInstance = 5; + + // action is what action was taken/failed regarding to the regarding object. It is machine-readable. + // This field can have at most 128 characters. + // +optional + optional string action = 6; + + // reason is why the action was taken. It is human-readable. + // This field can have at most 128 characters. + // +optional + optional string reason = 7; + + // regarding contains the object this Event is about. In most cases it's an Object reporting controller + // implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because + // it acts on some changes in a ReplicaSet object. + // +optional + optional k8s.io.api.core.v1.ObjectReference regarding = 8; + + // related is the optional secondary object for more complex actions. E.g. when regarding object triggers + // a creation or deletion of related object. + // +optional + optional k8s.io.api.core.v1.ObjectReference related = 9; + + // note is a human-readable description of the status of this operation. + // Maximal length of the note is 1kB, but libraries should be prepared to + // handle values up to 64kB. + // +optional + optional string note = 10; + + // type is the type of this event (Normal, Warning), new types could be added in the future. + // It is machine-readable. + // +optional + optional string type = 11; + + // deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. + // +optional + optional k8s.io.api.core.v1.EventSource deprecatedSource = 12; + + // deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deprecatedFirstTimestamp = 13; + + // deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deprecatedLastTimestamp = 14; + + // deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type. + // +optional + optional int32 deprecatedCount = 15; +} + +// EventList is a list of Event objects. +message EventList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // items is a list of schema objects. + repeated Event items = 2; +} + +// EventSeries contain information on series of events, i.e. thing that was/is happening +// continuously for some time. How often to update the EventSeries is up to the event reporters. +// The default event reporter in "k8s.io/client-go/tools/events/event_broadcaster.go" shows +// how this struct is updated on heartbeats and can guide customized reporter implementations. +message EventSeries { + // count is the number of occurrences in this series up to the last heartbeat time. + optional int32 count = 1; + + // lastObservedTime is the time when last Event from the series was seen before last heartbeat. + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2; +} + diff --git a/vendor/k8s.io/api/auditregistration/v1alpha1/register.go b/vendor/k8s.io/api/events/v1/register.go similarity index 73% rename from vendor/k8s.io/api/auditregistration/v1alpha1/register.go rename to vendor/k8s.io/api/events/v1/register.go index d6271608f00..ca90e6cbeed 100644 --- a/vendor/k8s.io/api/auditregistration/v1alpha1/register.go +++ b/vendor/k8s.io/api/events/v1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2020 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. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -23,10 +23,10 @@ import ( ) // GroupName is the group name use in this package -const GroupName = "auditregistration.k8s.io" +const GroupName = "events.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { @@ -34,23 +34,20 @@ func Resource(resource string) schema.GroupResource { } var ( - SchemeBuilder runtime.SchemeBuilder + // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. + // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) localSchemeBuilder = &SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme ) -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - +// Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &AuditSink{}, - &AuditSinkList{}, + &Event{}, + &EventList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/api/events/v1/types.go b/vendor/k8s.io/api/events/v1/types.go new file mode 100644 index 00000000000..07ede554224 --- /dev/null +++ b/vendor/k8s.io/api/events/v1/types.go @@ -0,0 +1,119 @@ +/* +Copyright 2020 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 v1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. +type Event struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // eventTime is the time when this Event was first observed. It is required. + EventTime metav1.MicroTime `json:"eventTime" protobuf:"bytes,2,opt,name=eventTime"` + + // series is data about the Event series this event represents or nil if it's a singleton Event. + // +optional + Series *EventSeries `json:"series,omitempty" protobuf:"bytes,3,opt,name=series"` + + // reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. + // This field cannot be empty for new Events. + // +optional + ReportingController string `json:"reportingController,omitempty" protobuf:"bytes,4,opt,name=reportingController"` + + // reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. + // This field cannot be empty for new Events and it can have at most 128 characters. + // +optional + ReportingInstance string `json:"reportingInstance,omitempty" protobuf:"bytes,5,opt,name=reportingInstance"` + + // action is what action was taken/failed regarding to the regarding object. It is machine-readable. + // This field can have at most 128 characters. + // +optional + Action string `json:"action,omitempty" protobuf:"bytes,6,name=action"` + + // reason is why the action was taken. It is human-readable. + // This field can have at most 128 characters. + // +optional + Reason string `json:"reason,omitempty" protobuf:"bytes,7,name=reason"` + + // regarding contains the object this Event is about. In most cases it's an Object reporting controller + // implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because + // it acts on some changes in a ReplicaSet object. + // +optional + Regarding corev1.ObjectReference `json:"regarding,omitempty" protobuf:"bytes,8,opt,name=regarding"` + + // related is the optional secondary object for more complex actions. E.g. when regarding object triggers + // a creation or deletion of related object. + // +optional + Related *corev1.ObjectReference `json:"related,omitempty" protobuf:"bytes,9,opt,name=related"` + + // note is a human-readable description of the status of this operation. + // Maximal length of the note is 1kB, but libraries should be prepared to + // handle values up to 64kB. + // +optional + Note string `json:"note,omitempty" protobuf:"bytes,10,opt,name=note"` + + // type is the type of this event (Normal, Warning), new types could be added in the future. + // It is machine-readable. + // +optional + Type string `json:"type,omitempty" protobuf:"bytes,11,opt,name=type"` + + // deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. + // +optional + DeprecatedSource corev1.EventSource `json:"deprecatedSource,omitempty" protobuf:"bytes,12,opt,name=deprecatedSource"` + // deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + // +optional + DeprecatedFirstTimestamp metav1.Time `json:"deprecatedFirstTimestamp,omitempty" protobuf:"bytes,13,opt,name=deprecatedFirstTimestamp"` + // deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + // +optional + DeprecatedLastTimestamp metav1.Time `json:"deprecatedLastTimestamp,omitempty" protobuf:"bytes,14,opt,name=deprecatedLastTimestamp"` + // deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type. + // +optional + DeprecatedCount int32 `json:"deprecatedCount,omitempty" protobuf:"varint,15,opt,name=deprecatedCount"` +} + +// EventSeries contain information on series of events, i.e. thing that was/is happening +// continuously for some time. How often to update the EventSeries is up to the event reporters. +// The default event reporter in "k8s.io/client-go/tools/events/event_broadcaster.go" shows +// how this struct is updated on heartbeats and can guide customized reporter implementations. +type EventSeries struct { + // count is the number of occurrences in this series up to the last heartbeat time. + Count int32 `json:"count" protobuf:"varint,1,opt,name=count"` + // lastObservedTime is the time when last Event from the series was seen before last heartbeat. + LastObservedTime metav1.MicroTime `json:"lastObservedTime" protobuf:"bytes,2,opt,name=lastObservedTime"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// EventList is a list of Event objects. +type EventList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // items is a list of schema objects. + Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/api/events/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/events/v1/types_swagger_doc_generated.go new file mode 100644 index 00000000000..e0467436ed0 --- /dev/null +++ b/vendor/k8s.io/api/events/v1/types_swagger_doc_generated.go @@ -0,0 +1,72 @@ +/* +Copyright 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 v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_Event = map[string]string{ + "": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.", + "eventTime": "eventTime is the time when this Event was first observed. It is required.", + "series": "series is data about the Event series this event represents or nil if it's a singleton Event.", + "reportingController": "reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.", + "reportingInstance": "reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.", + "action": "action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field can have at most 128 characters.", + "reason": "reason is why the action was taken. It is human-readable. This field can have at most 128 characters.", + "regarding": "regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", + "related": "related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", + "note": "note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", + "type": "type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable.", + "deprecatedSource": "deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.", + "deprecatedFirstTimestamp": "deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + "deprecatedLastTimestamp": "deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + "deprecatedCount": "deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.", +} + +func (Event) SwaggerDoc() map[string]string { + return map_Event +} + +var map_EventList = map[string]string{ + "": "EventList is a list of Event objects.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "items is a list of schema objects.", +} + +func (EventList) SwaggerDoc() map[string]string { + return map_EventList +} + +var map_EventSeries = map[string]string{ + "": "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in \"k8s.io/client-go/tools/events/event_broadcaster.go\" shows how this struct is updated on heartbeats and can guide customized reporter implementations.", + "count": "count is the number of occurrences in this series up to the last heartbeat time.", + "lastObservedTime": "lastObservedTime is the time when last Event from the series was seen before last heartbeat.", +} + +func (EventSeries) SwaggerDoc() map[string]string { + return map_EventSeries +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/api/events/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/events/v1/zz_generated.deepcopy.go new file mode 100644 index 00000000000..19a3c5f7761 --- /dev/null +++ b/vendor/k8s.io/api/events/v1/zz_generated.deepcopy.go @@ -0,0 +1,117 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Event) DeepCopyInto(out *Event) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.EventTime.DeepCopyInto(&out.EventTime) + if in.Series != nil { + in, out := &in.Series, &out.Series + *out = new(EventSeries) + (*in).DeepCopyInto(*out) + } + out.Regarding = in.Regarding + if in.Related != nil { + in, out := &in.Related, &out.Related + *out = new(corev1.ObjectReference) + **out = **in + } + out.DeprecatedSource = in.DeprecatedSource + in.DeprecatedFirstTimestamp.DeepCopyInto(&out.DeprecatedFirstTimestamp) + in.DeprecatedLastTimestamp.DeepCopyInto(&out.DeprecatedLastTimestamp) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event. +func (in *Event) DeepCopy() *Event { + if in == nil { + return nil + } + out := new(Event) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Event) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventList) DeepCopyInto(out *EventList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Event, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList. +func (in *EventList) DeepCopy() *EventList { + if in == nil { + return nil + } + out := new(EventList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EventList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventSeries) DeepCopyInto(out *EventSeries) { + *out = *in + in.LastObservedTime.DeepCopyInto(&out.LastObservedTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSeries. +func (in *EventSeries) DeepCopy() *EventSeries { + if in == nil { + return nil + } + out := new(EventSeries) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/api/events/v1beta1/BUILD b/vendor/k8s.io/api/events/v1beta1/BUILD index dd6e9170b44..7e5bbf2449d 100644 --- a/vendor/k8s.io/api/events/v1beta1/BUILD +++ b/vendor/k8s.io/api/events/v1beta1/BUILD @@ -9,6 +9,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/events/v1beta1", importpath = "k8s.io/api/events/v1beta1", diff --git a/vendor/k8s.io/api/events/v1beta1/doc.go b/vendor/k8s.io/api/events/v1beta1/doc.go index 9bec7b3cc11..46048a65b4a 100644 --- a/vendor/k8s.io/api/events/v1beta1/doc.go +++ b/vendor/k8s.io/api/events/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=events.k8s.io diff --git a/vendor/k8s.io/api/events/v1beta1/generated.pb.go b/vendor/k8s.io/api/events/v1beta1/generated.pb.go index 923dee5e0e7..3709ef633a7 100644 --- a/vendor/k8s.io/api/events/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/events/v1beta1/generated.pb.go @@ -139,58 +139,56 @@ func init() { } var fileDescriptor_4f97f691c32a5ac8 = []byte{ - // 801 bytes of a gzipped FileDescriptorProto + // 774 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x16, 0x13, 0x4b, 0xb2, 0x56, 0x49, 0x2c, 0x6f, 0x0e, 0xde, 0xb8, 0x00, 0xa5, 0x2a, 0x40, - 0x20, 0x14, 0x08, 0x59, 0x07, 0x45, 0xdb, 0x6b, 0x18, 0xb9, 0x45, 0x02, 0xbb, 0x01, 0xd6, 0x3e, + 0x10, 0x16, 0x13, 0x4b, 0xb2, 0x56, 0x49, 0x2c, 0x6f, 0x0e, 0xde, 0xb8, 0x00, 0x25, 0x28, 0x40, + 0x20, 0x14, 0x08, 0x59, 0x07, 0x45, 0xd1, 0x6b, 0x18, 0xb9, 0x45, 0x02, 0xbb, 0x01, 0x36, 0x3e, 0x15, 0x3d, 0x64, 0x45, 0x4d, 0x68, 0x56, 0xe2, 0x2e, 0xb1, 0xbb, 0x12, 0xe0, 0x5b, 0x2f, 0x05, - 0x7a, 0xec, 0x33, 0xf4, 0x09, 0xfa, 0x18, 0x3e, 0xe6, 0x98, 0x93, 0x50, 0xb3, 0x6f, 0xd1, 0x53, - 0xc1, 0xe5, 0x4a, 0x94, 0xf5, 0x83, 0xa8, 0xe8, 0x4d, 0x9c, 0xf9, 0x7e, 0x66, 0x66, 0x47, 0x83, - 0x82, 0xd1, 0xb7, 0xca, 0x8b, 0x85, 0x3f, 0x9a, 0x0c, 0x40, 0x72, 0xd0, 0xa0, 0xfc, 0x29, 0xf0, - 0xa1, 0x90, 0xbe, 0x4d, 0xb0, 0x34, 0xf6, 0x61, 0x0a, 0x5c, 0x2b, 0x7f, 0x7a, 0x32, 0x00, 0xcd, - 0x4e, 0xfc, 0x08, 0x38, 0x48, 0xa6, 0x61, 0xe8, 0xa5, 0x52, 0x68, 0x81, 0x9f, 0x14, 0x50, 0x8f, - 0xa5, 0xb1, 0x57, 0x40, 0x3d, 0x0b, 0x3d, 0x7e, 0x1e, 0xc5, 0xfa, 0x6a, 0x32, 0xf0, 0x42, 0x91, - 0xf8, 0x91, 0x88, 0x84, 0x6f, 0x18, 0x83, 0xc9, 0x7b, 0xf3, 0x65, 0x3e, 0xcc, 0xaf, 0x42, 0xe9, - 0xb8, 0xbb, 0x64, 0x1a, 0x0a, 0x09, 0xfe, 0x74, 0xcd, 0xed, 0xf8, 0xab, 0x12, 0x93, 0xb0, 0xf0, - 0x2a, 0xe6, 0x20, 0xaf, 0xfd, 0x74, 0x14, 0xe5, 0x01, 0xe5, 0x27, 0xa0, 0xd9, 0x26, 0x96, 0xbf, - 0x8d, 0x25, 0x27, 0x5c, 0xc7, 0x09, 0xac, 0x11, 0xbe, 0xfe, 0x14, 0x41, 0x85, 0x57, 0x90, 0xb0, - 0x55, 0x5e, 0xf7, 0x8f, 0x06, 0xaa, 0x9e, 0xe6, 0x43, 0xc0, 0xef, 0xd0, 0x7e, 0x5e, 0xcd, 0x90, - 0x69, 0x46, 0x9c, 0x8e, 0xd3, 0x6b, 0xbe, 0xf8, 0xd2, 0x2b, 0x27, 0xb5, 0x10, 0xf5, 0xd2, 0x51, - 0x94, 0x07, 0x94, 0x97, 0xa3, 0xbd, 0xe9, 0x89, 0xf7, 0x76, 0xf0, 0x33, 0x84, 0xfa, 0x1c, 0x34, - 0x0b, 0xf0, 0xcd, 0xac, 0x5d, 0xc9, 0x66, 0x6d, 0x54, 0xc6, 0xe8, 0x42, 0x15, 0xbf, 0x43, 0x0d, - 0x33, 0xef, 0xcb, 0x38, 0x01, 0x72, 0xcf, 0x58, 0xf8, 0xbb, 0x59, 0x9c, 0xc7, 0xa1, 0x14, 0x39, - 0x2d, 0x38, 0xb4, 0x0e, 0x8d, 0xd3, 0xb9, 0x12, 0x2d, 0x45, 0xf1, 0x1b, 0x54, 0x53, 0x20, 0x63, - 0x50, 0xe4, 0xbe, 0x91, 0x7f, 0xe6, 0x6d, 0x7d, 0x6b, 0xcf, 0x08, 0x5c, 0x18, 0x74, 0x80, 0xb2, - 0x59, 0xbb, 0x56, 0xfc, 0xa6, 0x56, 0x01, 0x9f, 0xa3, 0xc7, 0x12, 0x52, 0x21, 0x75, 0xcc, 0xa3, - 0x57, 0x82, 0x6b, 0x29, 0xc6, 0x63, 0x90, 0x64, 0xaf, 0xe3, 0xf4, 0x1a, 0xc1, 0x67, 0xb6, 0x8c, - 0xc7, 0x74, 0x1d, 0x42, 0x37, 0xf1, 0xf0, 0xf7, 0xe8, 0x70, 0x11, 0x7e, 0xcd, 0x95, 0x66, 0x3c, - 0x04, 0x52, 0x35, 0x62, 0x4f, 0xac, 0xd8, 0x21, 0x5d, 0x05, 0xd0, 0x75, 0x0e, 0x7e, 0x86, 0x6a, - 0x2c, 0xd4, 0xb1, 0xe0, 0xa4, 0x66, 0xd8, 0x8f, 0x2c, 0xbb, 0xf6, 0xd2, 0x44, 0xa9, 0xcd, 0xe6, - 0x38, 0x09, 0x4c, 0x09, 0x4e, 0xea, 0x77, 0x71, 0xd4, 0x44, 0xa9, 0xcd, 0xe2, 0x4b, 0xd4, 0x90, - 0x10, 0x31, 0x39, 0x8c, 0x79, 0x44, 0xf6, 0xcd, 0xd8, 0x9e, 0x2e, 0x8f, 0x2d, 0x5f, 0xec, 0xf2, - 0x99, 0x29, 0xbc, 0x07, 0x09, 0x3c, 0x5c, 0x7a, 0x09, 0x3a, 0x67, 0xd3, 0x52, 0x08, 0xbf, 0x41, - 0x75, 0x09, 0xe3, 0x7c, 0xd1, 0x48, 0x63, 0x77, 0xcd, 0x66, 0x36, 0x6b, 0xd7, 0x69, 0xc1, 0xa3, - 0x73, 0x01, 0xdc, 0x41, 0x7b, 0x5c, 0x68, 0x20, 0xc8, 0xf4, 0xf1, 0xc0, 0xfa, 0xee, 0xfd, 0x20, - 0x34, 0x50, 0x93, 0xc9, 0x11, 0xfa, 0x3a, 0x05, 0xd2, 0xbc, 0x8b, 0xb8, 0xbc, 0x4e, 0x81, 0x9a, - 0x0c, 0x06, 0xd4, 0x1a, 0x42, 0x2a, 0x21, 0xcc, 0x15, 0x2f, 0xc4, 0x44, 0x86, 0x40, 0x1e, 0x98, - 0xc2, 0xda, 0x9b, 0x0a, 0x2b, 0x96, 0xc3, 0xc0, 0x02, 0x62, 0xe5, 0x5a, 0xfd, 0x15, 0x01, 0xba, - 0x26, 0x89, 0x7f, 0x73, 0x10, 0x29, 0x83, 0xdf, 0xc5, 0x52, 0x99, 0xc5, 0x54, 0x9a, 0x25, 0x29, - 0x79, 0x68, 0xfc, 0xbe, 0xd8, 0x6d, 0xe5, 0xcd, 0xb6, 0x77, 0xac, 0x35, 0xe9, 0x6f, 0xd1, 0xa4, - 0x5b, 0xdd, 0xf0, 0xaf, 0x0e, 0x3a, 0x2a, 0x93, 0x67, 0x6c, 0xb9, 0x92, 0x47, 0xff, 0xb9, 0x92, - 0xb6, 0xad, 0xe4, 0xa8, 0xbf, 0x59, 0x92, 0x6e, 0xf3, 0xc2, 0x2f, 0xd1, 0x41, 0x99, 0x7a, 0x25, - 0x26, 0x5c, 0x93, 0x83, 0x8e, 0xd3, 0xab, 0x06, 0x47, 0x56, 0xf2, 0xa0, 0x7f, 0x37, 0x4d, 0x57, - 0xf1, 0xdd, 0x3f, 0x1d, 0x54, 0xfc, 0xdf, 0xcf, 0x62, 0xa5, 0xf1, 0x4f, 0x6b, 0x87, 0xca, 0xdb, - 0xad, 0x91, 0x9c, 0x6d, 0xce, 0x54, 0xcb, 0x3a, 0xef, 0xcf, 0x23, 0x4b, 0x47, 0xea, 0x14, 0x55, - 0x63, 0x0d, 0x89, 0x22, 0xf7, 0x3a, 0xf7, 0x7b, 0xcd, 0x17, 0x9d, 0x4f, 0x5d, 0x90, 0xe0, 0xa1, - 0x15, 0xab, 0xbe, 0xce, 0x69, 0xb4, 0x60, 0x77, 0x33, 0x07, 0x35, 0x97, 0x2e, 0x0c, 0x7e, 0x8a, - 0xaa, 0xa1, 0xe9, 0xdd, 0x31, 0xbd, 0x2f, 0x48, 0x45, 0xc7, 0x45, 0x0e, 0x4f, 0x50, 0x6b, 0xcc, - 0x94, 0x7e, 0x3b, 0x50, 0x20, 0xa7, 0x30, 0xfc, 0x3f, 0x77, 0x72, 0xb1, 0xb4, 0x67, 0x2b, 0x82, - 0x74, 0xcd, 0x02, 0x7f, 0x83, 0xaa, 0x4a, 0x33, 0x0d, 0xe6, 0x68, 0x36, 0x82, 0xcf, 0xe7, 0xb5, - 0x5d, 0xe4, 0xc1, 0x7f, 0x66, 0xed, 0xd6, 0x52, 0x23, 0x26, 0x46, 0x0b, 0x7c, 0xf0, 0xfc, 0xe6, - 0xd6, 0xad, 0x7c, 0xb8, 0x75, 0x2b, 0x1f, 0x6f, 0xdd, 0xca, 0x2f, 0x99, 0xeb, 0xdc, 0x64, 0xae, - 0xf3, 0x21, 0x73, 0x9d, 0x8f, 0x99, 0xeb, 0xfc, 0x95, 0xb9, 0xce, 0xef, 0x7f, 0xbb, 0x95, 0x1f, - 0xeb, 0x76, 0x5e, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x25, 0x9b, 0x14, 0x4d, 0xbd, 0x07, 0x00, - 0x00, + 0x7a, 0xec, 0x33, 0xf4, 0xd6, 0x5b, 0x1f, 0xc3, 0xc7, 0x1c, 0x7d, 0x12, 0x6a, 0xf6, 0x45, 0x0a, + 0x2e, 0x57, 0xa2, 0xac, 0x1f, 0x58, 0x45, 0x6f, 0xe2, 0xcc, 0xf7, 0x33, 0x33, 0x3b, 0x1a, 0x14, + 0x8c, 0xbe, 0x55, 0x5e, 0x2c, 0xfc, 0xd1, 0x64, 0x00, 0x92, 0x83, 0x06, 0xe5, 0x4f, 0x81, 0x0f, + 0x85, 0xf4, 0x6d, 0x82, 0xa5, 0xb1, 0x0f, 0x53, 0xe0, 0x5a, 0xf9, 0xd3, 0x93, 0x01, 0x68, 0x76, + 0xe2, 0x47, 0xc0, 0x41, 0x32, 0x0d, 0x43, 0x2f, 0x95, 0x42, 0x0b, 0xfc, 0xac, 0x80, 0x7a, 0x2c, + 0x8d, 0xbd, 0x02, 0xea, 0x59, 0xe8, 0xf1, 0xcb, 0x28, 0xd6, 0x97, 0x93, 0x81, 0x17, 0x8a, 0xc4, + 0x8f, 0x44, 0x24, 0x7c, 0xc3, 0x18, 0x4c, 0x3e, 0x99, 0x2f, 0xf3, 0x61, 0x7e, 0x15, 0x4a, 0xc7, + 0xdd, 0x25, 0xd3, 0x50, 0x48, 0xf0, 0xa7, 0x6b, 0x6e, 0xc7, 0x5f, 0x97, 0x98, 0x84, 0x85, 0x97, + 0x31, 0x07, 0x79, 0xe5, 0xa7, 0xa3, 0x28, 0x0f, 0x28, 0x3f, 0x01, 0xcd, 0x36, 0xb1, 0xfc, 0x6d, + 0x2c, 0x39, 0xe1, 0x3a, 0x4e, 0x60, 0x8d, 0xf0, 0xcd, 0x7d, 0x04, 0x15, 0x5e, 0x42, 0xc2, 0x56, + 0x79, 0xdd, 0x3f, 0x1a, 0xa8, 0x7a, 0x9a, 0x0f, 0x01, 0x7f, 0x44, 0xfb, 0x79, 0x35, 0x43, 0xa6, + 0x19, 0x71, 0x3a, 0x4e, 0xaf, 0xf9, 0xea, 0x2b, 0xaf, 0x9c, 0xd4, 0x42, 0xd4, 0x4b, 0x47, 0x51, + 0x1e, 0x50, 0x5e, 0x8e, 0xf6, 0xa6, 0x27, 0xde, 0xfb, 0xc1, 0xcf, 0x10, 0xea, 0x73, 0xd0, 0x2c, + 0xc0, 0xd7, 0xb3, 0x76, 0x25, 0x9b, 0xb5, 0x51, 0x19, 0xa3, 0x0b, 0x55, 0xfc, 0x11, 0x35, 0xcc, + 0xbc, 0x2f, 0xe2, 0x04, 0xc8, 0x03, 0x63, 0xe1, 0xef, 0x66, 0x71, 0x1e, 0x87, 0x52, 0xe4, 0xb4, + 0xe0, 0xd0, 0x3a, 0x34, 0x4e, 0xe7, 0x4a, 0xb4, 0x14, 0xc5, 0xef, 0x50, 0x4d, 0x81, 0x8c, 0x41, + 0x91, 0x87, 0x46, 0xfe, 0x85, 0xb7, 0xf5, 0xad, 0x3d, 0x23, 0xf0, 0xc1, 0xa0, 0x03, 0x94, 0xcd, + 0xda, 0xb5, 0xe2, 0x37, 0xb5, 0x0a, 0xf8, 0x1c, 0x3d, 0x95, 0x90, 0x0a, 0xa9, 0x63, 0x1e, 0xbd, + 0x11, 0x5c, 0x4b, 0x31, 0x1e, 0x83, 0x24, 0x7b, 0x1d, 0xa7, 0xd7, 0x08, 0xbe, 0xb0, 0x65, 0x3c, + 0xa5, 0xeb, 0x10, 0xba, 0x89, 0x87, 0xbf, 0x47, 0x87, 0x8b, 0xf0, 0x5b, 0xae, 0x34, 0xe3, 0x21, + 0x90, 0xaa, 0x11, 0x7b, 0x66, 0xc5, 0x0e, 0xe9, 0x2a, 0x80, 0xae, 0x73, 0xf0, 0x0b, 0x54, 0x63, + 0xa1, 0x8e, 0x05, 0x27, 0x35, 0xc3, 0x7e, 0x62, 0xd9, 0xb5, 0xd7, 0x26, 0x4a, 0x6d, 0x36, 0xc7, + 0x49, 0x60, 0x4a, 0x70, 0x52, 0xbf, 0x8b, 0xa3, 0x26, 0x4a, 0x6d, 0x16, 0x5f, 0xa0, 0x86, 0x84, + 0x88, 0xc9, 0x61, 0xcc, 0x23, 0xb2, 0x6f, 0xc6, 0xf6, 0x7c, 0x79, 0x6c, 0xf9, 0x62, 0x97, 0xcf, + 0x4c, 0xe1, 0x13, 0x48, 0xe0, 0xe1, 0xd2, 0x4b, 0xd0, 0x39, 0x9b, 0x96, 0x42, 0xf8, 0x1d, 0xaa, + 0x4b, 0x18, 0xe7, 0x8b, 0x46, 0x1a, 0xbb, 0x6b, 0x36, 0xb3, 0x59, 0xbb, 0x4e, 0x0b, 0x1e, 0x9d, + 0x0b, 0xe0, 0x0e, 0xda, 0xe3, 0x42, 0x03, 0x41, 0xa6, 0x8f, 0x47, 0xd6, 0x77, 0xef, 0x07, 0xa1, + 0x81, 0x9a, 0x4c, 0x8e, 0xd0, 0x57, 0x29, 0x90, 0xe6, 0x5d, 0xc4, 0xc5, 0x55, 0x0a, 0xd4, 0x64, + 0x30, 0xa0, 0xd6, 0x10, 0x52, 0x09, 0x61, 0xae, 0xf8, 0x41, 0x4c, 0x64, 0x08, 0xe4, 0x91, 0x29, + 0xac, 0xbd, 0xa9, 0xb0, 0x62, 0x39, 0x0c, 0x2c, 0x20, 0x56, 0xae, 0xd5, 0x5f, 0x11, 0xa0, 0x6b, + 0x92, 0xf8, 0x37, 0x07, 0x91, 0x32, 0xf8, 0x5d, 0x2c, 0x95, 0x59, 0x4c, 0xa5, 0x59, 0x92, 0x92, + 0xc7, 0xc6, 0xef, 0xcb, 0xdd, 0x56, 0xde, 0x6c, 0x7b, 0xc7, 0x5a, 0x93, 0xfe, 0x16, 0x4d, 0xba, + 0xd5, 0x0d, 0xff, 0xea, 0xa0, 0xa3, 0x32, 0x79, 0xc6, 0x96, 0x2b, 0x79, 0xf2, 0x9f, 0x2b, 0x69, + 0xdb, 0x4a, 0x8e, 0xfa, 0x9b, 0x25, 0xe9, 0x36, 0x2f, 0xfc, 0x1a, 0x1d, 0x94, 0xa9, 0x37, 0x62, + 0xc2, 0x35, 0x39, 0xe8, 0x38, 0xbd, 0x6a, 0x70, 0x64, 0x25, 0x0f, 0xfa, 0x77, 0xd3, 0x74, 0x15, + 0xdf, 0xfd, 0xcb, 0x41, 0xc5, 0xff, 0xfd, 0x2c, 0x56, 0x1a, 0xff, 0xb4, 0x76, 0xa8, 0xbc, 0xdd, + 0x1a, 0xc9, 0xd9, 0xe6, 0x4c, 0xb5, 0xac, 0xf3, 0xfe, 0x3c, 0xb2, 0x74, 0xa4, 0x4e, 0x51, 0x35, + 0xd6, 0x90, 0x28, 0xf2, 0xa0, 0xf3, 0xb0, 0xd7, 0x7c, 0xd5, 0xb9, 0xef, 0x82, 0x04, 0x8f, 0xad, + 0x58, 0xf5, 0x6d, 0x4e, 0xa3, 0x05, 0xbb, 0xfb, 0xa7, 0x83, 0x9a, 0x4b, 0x17, 0x06, 0x3f, 0x47, + 0xd5, 0xd0, 0xf4, 0xee, 0x98, 0xde, 0x17, 0xa4, 0xa2, 0xe3, 0x22, 0x87, 0x27, 0xa8, 0x35, 0x66, + 0x4a, 0xbf, 0x1f, 0x28, 0x90, 0x53, 0x18, 0xfe, 0x9f, 0x3b, 0xb9, 0x58, 0xda, 0xb3, 0x15, 0x41, + 0xba, 0x66, 0x11, 0xbc, 0xbc, 0xbe, 0x75, 0x2b, 0x9f, 0x6f, 0xdd, 0xca, 0xcd, 0xad, 0x5b, 0xf9, + 0x25, 0x73, 0x9d, 0xeb, 0xcc, 0x75, 0x3e, 0x67, 0xae, 0x73, 0x93, 0xb9, 0xce, 0xdf, 0x99, 0xeb, + 0xfc, 0xfe, 0x8f, 0x5b, 0xf9, 0xb1, 0x6e, 0xdb, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xc9, + 0x09, 0x14, 0x84, 0x07, 0x00, 0x00, } func (m *Event) Marshal() (dAtA []byte, err error) { @@ -400,11 +398,6 @@ func (m *EventSeries) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - i -= len(m.State) - copy(dAtA[i:], m.State) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.State))) - i-- - dAtA[i] = 0x1a { size, err := m.LastObservedTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -500,8 +493,6 @@ func (m *EventSeries) Size() (n int) { n += 1 + sovGenerated(uint64(m.Count)) l = m.LastObservedTime.Size() n += 1 + l + sovGenerated(uint64(l)) - l = len(m.State) - n += 1 + l + sovGenerated(uint64(l)) return n } @@ -558,7 +549,6 @@ func (this *EventSeries) String() string { s := strings.Join([]string{`&EventSeries{`, `Count:` + fmt.Sprintf("%v", this.Count) + `,`, `LastObservedTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastObservedTime), "MicroTime", "v1.MicroTime", 1), `&`, ``, 1) + `,`, - `State:` + fmt.Sprintf("%v", this.State) + `,`, `}`, }, "") return s @@ -1306,38 +1296,6 @@ func (m *EventSeries) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.State = EventSeriesState(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/api/events/v1beta1/generated.proto b/vendor/k8s.io/api/events/v1beta1/generated.proto index 58f5aa422f6..79bde87c430 100644 --- a/vendor/k8s.io/api/events/v1beta1/generated.proto +++ b/vendor/k8s.io/api/events/v1beta1/generated.proto @@ -34,63 +34,68 @@ message Event { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // Required. Time when this Event was first observed. + // eventTime is the time when this Event was first observed. It is required. optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 2; - // Data about the Event series this event represents or nil if it's a singleton Event. + // series is data about the Event series this event represents or nil if it's a singleton Event. // +optional optional EventSeries series = 3; - // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. + // reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. + // This field cannot be empty for new Events. // +optional optional string reportingController = 4; - // ID of the controller instance, e.g. `kubelet-xyzf`. + // reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. + // This field cannot be empty for new Events and it can have at most 128 characters. // +optional optional string reportingInstance = 5; - // What action was taken/failed regarding to the regarding object. + // action is what action was taken/failed regarding to the regarding object. It is machine-readable. + // This field can have at most 128 characters. // +optional optional string action = 6; - // Why the action was taken. + // reason is why the action was taken. It is human-readable. + // This field can have at most 128 characters. + // +optional optional string reason = 7; - // The object this Event is about. In most cases it's an Object reporting controller implements. - // E.g. ReplicaSetController implements ReplicaSets and this event is emitted because + // regarding contains the object this Event is about. In most cases it's an Object reporting controller + // implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because // it acts on some changes in a ReplicaSet object. // +optional optional k8s.io.api.core.v1.ObjectReference regarding = 8; - // Optional secondary object for more complex actions. E.g. when regarding object triggers + // related is the optional secondary object for more complex actions. E.g. when regarding object triggers // a creation or deletion of related object. // +optional optional k8s.io.api.core.v1.ObjectReference related = 9; - // Optional. A human-readable description of the status of this operation. + // note is a human-readable description of the status of this operation. // Maximal length of the note is 1kB, but libraries should be prepared to // handle values up to 64kB. // +optional optional string note = 10; - // Type of this event (Normal, Warning), new types could be added in the - // future. + // type is the type of this event (Normal, Warning), new types could be added in the future. + // It is machine-readable. // +optional optional string type = 11; - // Deprecated field assuring backward compatibility with core.v1 Event type + // deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. // +optional optional k8s.io.api.core.v1.EventSource deprecatedSource = 12; - // Deprecated field assuring backward compatibility with core.v1 Event type + // deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deprecatedFirstTimestamp = 13; - // Deprecated field assuring backward compatibility with core.v1 Event type + // deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deprecatedLastTimestamp = 14; - // Deprecated field assuring backward compatibility with core.v1 Event type + // deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type. // +optional optional int32 deprecatedCount = 15; } @@ -102,21 +107,17 @@ message EventList { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - // Items is a list of schema objects. + // items is a list of schema objects. repeated Event items = 2; } // EventSeries contain information on series of events, i.e. thing that was/is happening // continuously for some time. message EventSeries { - // Number of occurrences in this series up to the last heartbeat time + // count is the number of occurrences in this series up to the last heartbeat time. optional int32 count = 1; - // Time when last Event from the series was seen before last heartbeat. + // lastObservedTime is the time when last Event from the series was seen before last heartbeat. optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime lastObservedTime = 2; - - // Information whether this series is ongoing or finished. - // Deprecated. Planned removal for 1.18 - optional string state = 3; } diff --git a/vendor/k8s.io/api/events/v1beta1/types.go b/vendor/k8s.io/api/events/v1beta1/types.go index 0571fbb2e82..e2ed214b063 100644 --- a/vendor/k8s.io/api/events/v1beta1/types.go +++ b/vendor/k8s.io/api/events/v1beta1/types.go @@ -23,6 +23,8 @@ import ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. type Event struct { @@ -30,60 +32,65 @@ type Event struct { // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Required. Time when this Event was first observed. + // eventTime is the time when this Event was first observed. It is required. EventTime metav1.MicroTime `json:"eventTime" protobuf:"bytes,2,opt,name=eventTime"` - // Data about the Event series this event represents or nil if it's a singleton Event. + // series is data about the Event series this event represents or nil if it's a singleton Event. // +optional Series *EventSeries `json:"series,omitempty" protobuf:"bytes,3,opt,name=series"` - // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. + // reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. + // This field cannot be empty for new Events. // +optional ReportingController string `json:"reportingController,omitempty" protobuf:"bytes,4,opt,name=reportingController"` - // ID of the controller instance, e.g. `kubelet-xyzf`. + // reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. + // This field cannot be empty for new Events and it can have at most 128 characters. // +optional ReportingInstance string `json:"reportingInstance,omitempty" protobuf:"bytes,5,opt,name=reportingInstance"` - // What action was taken/failed regarding to the regarding object. + // action is what action was taken/failed regarding to the regarding object. It is machine-readable. + // This field can have at most 128 characters. // +optional Action string `json:"action,omitempty" protobuf:"bytes,6,name=action"` - // Why the action was taken. + // reason is why the action was taken. It is human-readable. + // This field can have at most 128 characters. + // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,7,name=reason"` - // The object this Event is about. In most cases it's an Object reporting controller implements. - // E.g. ReplicaSetController implements ReplicaSets and this event is emitted because + // regarding contains the object this Event is about. In most cases it's an Object reporting controller + // implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because // it acts on some changes in a ReplicaSet object. // +optional Regarding corev1.ObjectReference `json:"regarding,omitempty" protobuf:"bytes,8,opt,name=regarding"` - // Optional secondary object for more complex actions. E.g. when regarding object triggers + // related is the optional secondary object for more complex actions. E.g. when regarding object triggers // a creation or deletion of related object. // +optional Related *corev1.ObjectReference `json:"related,omitempty" protobuf:"bytes,9,opt,name=related"` - // Optional. A human-readable description of the status of this operation. + // note is a human-readable description of the status of this operation. // Maximal length of the note is 1kB, but libraries should be prepared to // handle values up to 64kB. // +optional Note string `json:"note,omitempty" protobuf:"bytes,10,opt,name=note"` - // Type of this event (Normal, Warning), new types could be added in the - // future. + // type is the type of this event (Normal, Warning), new types could be added in the future. + // It is machine-readable. // +optional Type string `json:"type,omitempty" protobuf:"bytes,11,opt,name=type"` - // Deprecated field assuring backward compatibility with core.v1 Event type + // deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. // +optional DeprecatedSource corev1.EventSource `json:"deprecatedSource,omitempty" protobuf:"bytes,12,opt,name=deprecatedSource"` - // Deprecated field assuring backward compatibility with core.v1 Event type + // deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. // +optional DeprecatedFirstTimestamp metav1.Time `json:"deprecatedFirstTimestamp,omitempty" protobuf:"bytes,13,opt,name=deprecatedFirstTimestamp"` - // Deprecated field assuring backward compatibility with core.v1 Event type + // deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. // +optional DeprecatedLastTimestamp metav1.Time `json:"deprecatedLastTimestamp,omitempty" protobuf:"bytes,14,opt,name=deprecatedLastTimestamp"` - // Deprecated field assuring backward compatibility with core.v1 Event type + // deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type. // +optional DeprecatedCount int32 `json:"deprecatedCount,omitempty" protobuf:"varint,15,opt,name=deprecatedCount"` } @@ -91,24 +98,17 @@ type Event struct { // EventSeries contain information on series of events, i.e. thing that was/is happening // continuously for some time. type EventSeries struct { - // Number of occurrences in this series up to the last heartbeat time + // count is the number of occurrences in this series up to the last heartbeat time. Count int32 `json:"count" protobuf:"varint,1,opt,name=count"` - // Time when last Event from the series was seen before last heartbeat. + // lastObservedTime is the time when last Event from the series was seen before last heartbeat. LastObservedTime metav1.MicroTime `json:"lastObservedTime" protobuf:"bytes,2,opt,name=lastObservedTime"` - // Information whether this series is ongoing or finished. - // Deprecated. Planned removal for 1.18 - State EventSeriesState `json:"state" protobuf:"bytes,3,opt,name=state"` + + // +k8s:deprecated=state,protobuf=3 } -type EventSeriesState string - -const ( - EventSeriesStateOngoing EventSeriesState = "Ongoing" - EventSeriesStateFinished EventSeriesState = "Finished" - EventSeriesStateUnknown EventSeriesState = "Unknown" -) - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // EventList is a list of Event objects. type EventList struct { @@ -118,6 +118,6 @@ type EventList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Items is a list of schema objects. + // items is a list of schema objects. Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go index 639daca6dae..8c987f89963 100644 --- a/vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go @@ -29,20 +29,20 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Event = map[string]string{ "": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.", - "eventTime": "Required. Time when this Event was first observed.", - "series": "Data about the Event series this event represents or nil if it's a singleton Event.", - "reportingController": "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", - "reportingInstance": "ID of the controller instance, e.g. `kubelet-xyzf`.", - "action": "What action was taken/failed regarding to the regarding object.", - "reason": "Why the action was taken.", - "regarding": "The object this Event is about. In most cases it's an Object reporting controller implements. E.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", - "related": "Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", - "note": "Optional. A human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", - "type": "Type of this event (Normal, Warning), new types could be added in the future.", - "deprecatedSource": "Deprecated field assuring backward compatibility with core.v1 Event type", - "deprecatedFirstTimestamp": "Deprecated field assuring backward compatibility with core.v1 Event type", - "deprecatedLastTimestamp": "Deprecated field assuring backward compatibility with core.v1 Event type", - "deprecatedCount": "Deprecated field assuring backward compatibility with core.v1 Event type", + "eventTime": "eventTime is the time when this Event was first observed. It is required.", + "series": "series is data about the Event series this event represents or nil if it's a singleton Event.", + "reportingController": "reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.", + "reportingInstance": "reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.", + "action": "action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field can have at most 128 characters.", + "reason": "reason is why the action was taken. It is human-readable. This field can have at most 128 characters.", + "regarding": "regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", + "related": "related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", + "note": "note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", + "type": "type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable.", + "deprecatedSource": "deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.", + "deprecatedFirstTimestamp": "deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + "deprecatedLastTimestamp": "deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + "deprecatedCount": "deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.", } func (Event) SwaggerDoc() map[string]string { @@ -52,7 +52,7 @@ func (Event) SwaggerDoc() map[string]string { var map_EventList = map[string]string{ "": "EventList is a list of Event objects.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items is a list of schema objects.", + "items": "items is a list of schema objects.", } func (EventList) SwaggerDoc() map[string]string { @@ -61,9 +61,8 @@ func (EventList) SwaggerDoc() map[string]string { var map_EventSeries = map[string]string{ "": "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.", - "count": "Number of occurrences in this series up to the last heartbeat time", - "lastObservedTime": "Time when last Event from the series was seen before last heartbeat.", - "state": "Information whether this series is ongoing or finished. Deprecated. Planned removal for 1.18", + "count": "count is the number of occurrences in this series up to the last heartbeat time.", + "lastObservedTime": "lastObservedTime is the time when last Event from the series was seen before last heartbeat.", } func (EventSeries) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/events/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/events/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..2ab7b412b96 --- /dev/null +++ b/vendor/k8s.io/api/events/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,57 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Event) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Event) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Event) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *EventList) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *EventList) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *EventList) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} diff --git a/vendor/k8s.io/api/extensions/v1beta1/BUILD b/vendor/k8s.io/api/extensions/v1beta1/BUILD index ce7106a2dfc..59e2564b2b0 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/BUILD +++ b/vendor/k8s.io/api/extensions/v1beta1/BUILD @@ -14,6 +14,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/extensions/v1beta1", importpath = "k8s.io/api/extensions/v1beta1", diff --git a/vendor/k8s.io/api/extensions/v1beta1/doc.go b/vendor/k8s.io/api/extensions/v1beta1/doc.go index fa799f30261..c9af49d55c7 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/doc.go +++ b/vendor/k8s.io/api/extensions/v1beta1/doc.go @@ -17,5 +17,6 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true package v1beta1 // import "k8s.io/api/extensions/v1beta1" diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.proto b/vendor/k8s.io/api/extensions/v1beta1/generated.proto index ef8367e0b20..a81cce680cc 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/generated.proto +++ b/vendor/k8s.io/api/extensions/v1beta1/generated.proto @@ -316,7 +316,7 @@ message DeploymentSpec { // The number of old ReplicaSets to retain to allow rollback. // This is a pointer to distinguish between explicit zero and not specified. // This is set to the max value of int32 (i.e. 2147483647) by default, which - // means "retaining all old RelicaSets". + // means "retaining all old ReplicaSets". // +optional optional int32 revisionHistoryLimit = 6; @@ -848,7 +848,7 @@ message PodSecurityPolicySpec { // +optional repeated string allowedCapabilities = 4; - // volumes is a white list of allowed volume plugins. Empty indicates that + // volumes is an allowlist of volume plugins. Empty indicates that // no volumes may be used. To allow all volumes you may use '*'. // +optional repeated string volumes = 5; @@ -905,18 +905,18 @@ message PodSecurityPolicySpec { // +optional optional bool allowPrivilegeEscalation = 16; - // allowedHostPaths is a white list of allowed host paths. Empty indicates + // allowedHostPaths is an allowlist of host paths. Empty indicates // that all host paths may be used. // +optional repeated AllowedHostPath allowedHostPaths = 17; - // allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all + // allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes // is allowed in the "volumes" field. // +optional repeated AllowedFlexVolume allowedFlexVolumes = 18; - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. + // AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. // An empty value indicates that any CSI driver can be used for inline ephemeral volumes. // +optional repeated AllowedCSIDriver allowedCSIDrivers = 23; @@ -924,7 +924,7 @@ message PodSecurityPolicySpec { // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. // Each entry is either a plain sysctl name or ends in "*" in which case it is considered // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. - // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. + // Kubelet has to allowlist all unsafe sysctls explicitly to avoid rejection. // // Examples: // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. @@ -942,7 +942,7 @@ message PodSecurityPolicySpec { // +optional repeated string forbiddenSysctls = 20; - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. + // AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. // Empty or nil indicates that only the DefaultProcMountType may be used. // This requires the ProcMountType feature flag to be enabled. // +optional @@ -1154,7 +1154,7 @@ message RunAsUserStrategyOptions { // RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses // for a pod. message RuntimeClassStrategyOptions { - // allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. + // allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. // A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the // list. An empty list requires the RuntimeClassName field to be unset. repeated string allowedRuntimeClassNames = 1; diff --git a/vendor/k8s.io/api/extensions/v1beta1/types.go b/vendor/k8s.io/api/extensions/v1beta1/types.go index 8934c06137a..a1ef1a10bad 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/types.go +++ b/vendor/k8s.io/api/extensions/v1beta1/types.go @@ -50,6 +50,9 @@ type ScaleStatus struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.1 +// +k8s:prerelease-lifecycle-gen:deprecated=1.2 +// +k8s:prerelease-lifecycle-gen:removed=1.18 // represents a scaling request for a resource. type Scale struct { @@ -71,6 +74,10 @@ type Scale struct { // +genclient:method=GetScale,verb=get,subresource=scale,result=Scale // +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.1 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,Deployment // DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for // more information. @@ -119,7 +126,7 @@ type DeploymentSpec struct { // The number of old ReplicaSets to retain to allow rollback. // This is a pointer to distinguish between explicit zero and not specified. // This is set to the max value of int32 (i.e. 2147483647) by default, which - // means "retaining all old RelicaSets". + // means "retaining all old ReplicaSets". // +optional RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"` @@ -144,6 +151,9 @@ type DeploymentSpec struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.2 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 // DEPRECATED. // DeploymentRollback stores the information required to rollback a deployment. @@ -301,6 +311,10 @@ type DeploymentCondition struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.1 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,DeploymentList // DeploymentList is a list of Deployments. type DeploymentList struct { @@ -475,6 +489,10 @@ type DaemonSetCondition struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.1 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,DaemonSet // DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for // more information. @@ -514,6 +532,10 @@ const ( ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.1 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,DaemonSetList // DaemonSetList is a collection of daemon sets. type DaemonSetList struct { @@ -529,6 +551,10 @@ type DaemonSetList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.1 +// +k8s:prerelease-lifecycle-gen:deprecated=1.14 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=networking.k8s.io,v1,Ingress // Ingress is a collection of rules that allow inbound connections to reach the // endpoints defined by a backend. An Ingress can be configured to give services @@ -554,6 +580,10 @@ type Ingress struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.1 +// +k8s:prerelease-lifecycle-gen:deprecated=1.14 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=networking.k8s.io,v1,IngressList // IngressList is a collection of Ingress. type IngressList struct { @@ -776,6 +806,10 @@ type IngressBackend struct { // +genclient:method=GetScale,verb=get,subresource=scale,result=Scale // +genclient:method=UpdateScale,verb=update,subresource=scale,input=Scale,result=Scale // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.2 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,ReplicaSet // DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for // more information. @@ -804,6 +838,10 @@ type ReplicaSet struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.2 +// +k8s:prerelease-lifecycle-gen:deprecated=1.8 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=apps,v1,ReplicaSetList // ReplicaSetList is a collection of ReplicaSets. type ReplicaSetList struct { @@ -906,6 +944,10 @@ type ReplicaSetCondition struct { // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.2 +// +k8s:prerelease-lifecycle-gen:deprecated=1.11 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=policy,v1beta1,PodSecurityPolicy // PodSecurityPolicy governs the ability to make requests that affect the Security Context // that will be applied to a pod and container. @@ -943,7 +985,7 @@ type PodSecurityPolicySpec struct { // You must not list a capability in both allowedCapabilities and requiredDropCapabilities. // +optional AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty" protobuf:"bytes,4,rep,name=allowedCapabilities,casttype=k8s.io/api/core/v1.Capability"` - // volumes is a white list of allowed volume plugins. Empty indicates that + // volumes is an allowlist of volume plugins. Empty indicates that // no volumes may be used. To allow all volumes you may use '*'. // +optional Volumes []FSType `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes,casttype=FSType"` @@ -987,23 +1029,23 @@ type PodSecurityPolicySpec struct { // privilege escalation. If unspecified, defaults to true. // +optional AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty" protobuf:"varint,16,opt,name=allowPrivilegeEscalation"` - // allowedHostPaths is a white list of allowed host paths. Empty indicates + // allowedHostPaths is an allowlist of host paths. Empty indicates // that all host paths may be used. // +optional AllowedHostPaths []AllowedHostPath `json:"allowedHostPaths,omitempty" protobuf:"bytes,17,rep,name=allowedHostPaths"` - // allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all + // allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes // is allowed in the "volumes" field. // +optional AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes,omitempty" protobuf:"bytes,18,rep,name=allowedFlexVolumes"` - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. + // AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. // An empty value indicates that any CSI driver can be used for inline ephemeral volumes. // +optional AllowedCSIDrivers []AllowedCSIDriver `json:"allowedCSIDrivers,omitempty" protobuf:"bytes,23,rep,name=allowedCSIDrivers"` // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. // Each entry is either a plain sysctl name or ends in "*" in which case it is considered // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. - // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. + // Kubelet has to allowlist all unsafe sysctls explicitly to avoid rejection. // // Examples: // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. @@ -1019,7 +1061,7 @@ type PodSecurityPolicySpec struct { // e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. // +optional ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty" protobuf:"bytes,20,rep,name=forbiddenSysctls"` - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. + // AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. // Empty or nil indicates that only the DefaultProcMountType may be used. // This requires the ProcMountType feature flag to be enabled. // +optional @@ -1247,7 +1289,7 @@ const ( // RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses // for a pod. type RuntimeClassStrategyOptions struct { - // allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. + // allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. // A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the // list. An empty list requires the RuntimeClassName field to be unset. AllowedRuntimeClassNames []string `json:"allowedRuntimeClassNames" protobuf:"bytes,1,rep,name=allowedRuntimeClassNames"` @@ -1264,6 +1306,10 @@ type RuntimeClassStrategyOptions struct { const AllowAllRuntimeClassNames = "*" // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.2 +// +k8s:prerelease-lifecycle-gen:deprecated=1.11 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=policy,v1beta1,PodSecurityPolicyList // PodSecurityPolicyList is a list of PodSecurityPolicy objects. // Deprecated: use PodSecurityPolicyList from policy API Group instead. @@ -1280,6 +1326,10 @@ type PodSecurityPolicyList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.3 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=networking.k8s.io,v1,NetworkPolicy // DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. // NetworkPolicy describes what network traffic is allowed for a set of Pods @@ -1450,6 +1500,10 @@ type NetworkPolicyPeer struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.3 +// +k8s:prerelease-lifecycle-gen:deprecated=1.9 +// +k8s:prerelease-lifecycle-gen:removed=1.18 +// +k8s:prerelease-lifecycle-gen:replacement=networking.k8s.io,v1,NetworkPolicyList // DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. // Network Policy List is a list of NetworkPolicy objects. diff --git a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go index 9ccad924850..0ef3c00593e 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go @@ -183,7 +183,7 @@ var map_DeploymentSpec = map[string]string{ "template": "Template describes the pods that will be created.", "strategy": "The deployment strategy to use to replace existing pods with new ones.", "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. This is set to the max value of int32 (i.e. 2147483647) by default, which means \"retaining all old RelicaSets\".", + "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. This is set to the max value of int32 (i.e. 2147483647) by default, which means \"retaining all old ReplicaSets\".", "paused": "Indicates that the deployment is paused and will not be processed by the deployment controller.", "rollbackTo": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.", "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. This is set to the max value of int32 (i.e. 2147483647) by default, which means \"no deadline\".", @@ -458,7 +458,7 @@ var map_PodSecurityPolicySpec = map[string]string{ "defaultAddCapabilities": "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.", "requiredDropCapabilities": "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", "allowedCapabilities": "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.", - "volumes": "volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", + "volumes": "volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", "hostNetwork": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", "hostPorts": "hostPorts determines which host port ranges are allowed to be exposed.", "hostPID": "hostPID determines if the policy allows the use of HostPID in the pod spec.", @@ -471,12 +471,12 @@ var map_PodSecurityPolicySpec = map[string]string{ "readOnlyRootFilesystem": "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", "defaultAllowPrivilegeEscalation": "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", "allowPrivilegeEscalation": "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", - "allowedHostPaths": "allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.", - "allowedFlexVolumes": "allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", - "allowedCSIDrivers": "AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes.", - "allowedUnsafeSysctls": "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", + "allowedHostPaths": "allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.", + "allowedFlexVolumes": "allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", + "allowedCSIDrivers": "AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes.", + "allowedUnsafeSysctls": "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", "forbiddenSysctls": "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", - "allowedProcMountTypes": "AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", + "allowedProcMountTypes": "AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", "runtimeClass": "runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.", } @@ -594,7 +594,7 @@ func (RunAsUserStrategyOptions) SwaggerDoc() map[string]string { var map_RuntimeClassStrategyOptions = map[string]string{ "": "RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.", - "allowedRuntimeClassNames": "allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", + "allowedRuntimeClassNames": "allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", "defaultRuntimeClassName": "defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.", } diff --git a/vendor/k8s.io/api/extensions/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/extensions/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..8630905bf20 --- /dev/null +++ b/vendor/k8s.io/api/extensions/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,349 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DaemonSet) APILifecycleIntroduced() (major, minor int) { + return 1, 1 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DaemonSet) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *DaemonSet) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSet"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DaemonSet) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DaemonSetList) APILifecycleIntroduced() (major, minor int) { + return 1, 1 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DaemonSetList) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *DaemonSetList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSetList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DaemonSetList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Deployment) APILifecycleIntroduced() (major, minor int) { + return 1, 1 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Deployment) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Deployment) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Deployment) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DeploymentList) APILifecycleIntroduced() (major, minor int) { + return 1, 1 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DeploymentList) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *DeploymentList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DeploymentList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DeploymentList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DeploymentRollback) APILifecycleIntroduced() (major, minor int) { + return 1, 2 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DeploymentRollback) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DeploymentRollback) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Ingress) APILifecycleIntroduced() (major, minor int) { + return 1, 1 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Ingress) APILifecycleDeprecated() (major, minor int) { + return 1, 14 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Ingress) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "Ingress"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Ingress) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *IngressList) APILifecycleIntroduced() (major, minor int) { + return 1, 1 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *IngressList) APILifecycleDeprecated() (major, minor int) { + return 1, 14 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *IngressList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "IngressList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *IngressList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *NetworkPolicy) APILifecycleIntroduced() (major, minor int) { + return 1, 3 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *NetworkPolicy) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *NetworkPolicy) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "NetworkPolicy"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *NetworkPolicy) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *NetworkPolicyList) APILifecycleIntroduced() (major, minor int) { + return 1, 3 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *NetworkPolicyList) APILifecycleDeprecated() (major, minor int) { + return 1, 9 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *NetworkPolicyList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "NetworkPolicyList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *NetworkPolicyList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *PodSecurityPolicy) APILifecycleIntroduced() (major, minor int) { + return 1, 2 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *PodSecurityPolicy) APILifecycleDeprecated() (major, minor int) { + return 1, 11 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *PodSecurityPolicy) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "policy", Version: "v1beta1", Kind: "PodSecurityPolicy"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *PodSecurityPolicy) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *PodSecurityPolicyList) APILifecycleIntroduced() (major, minor int) { + return 1, 2 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *PodSecurityPolicyList) APILifecycleDeprecated() (major, minor int) { + return 1, 11 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *PodSecurityPolicyList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "policy", Version: "v1beta1", Kind: "PodSecurityPolicyList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *PodSecurityPolicyList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ReplicaSet) APILifecycleIntroduced() (major, minor int) { + return 1, 2 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ReplicaSet) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ReplicaSet) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSet"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ReplicaSet) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ReplicaSetList) APILifecycleIntroduced() (major, minor int) { + return 1, 2 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ReplicaSetList) APILifecycleDeprecated() (major, minor int) { + return 1, 8 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ReplicaSetList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSetList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ReplicaSetList) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Scale) APILifecycleIntroduced() (major, minor int) { + return 1, 1 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Scale) APILifecycleDeprecated() (major, minor int) { + return 1, 2 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Scale) APILifecycleRemoved() (major, minor int) { + return 1, 18 +} diff --git a/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto b/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto index b8054528f52..0801dd6c12c 100644 --- a/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto @@ -40,17 +40,17 @@ message FlowDistinguisherMethod { // similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". message FlowSchema { // `metadata` is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // `spec` is the specification of the desired behavior of a FlowSchema. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional FlowSchemaSpec spec = 2; // `status` is the current status of a FlowSchema. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional FlowSchemaStatus status = 3; } @@ -79,12 +79,11 @@ message FlowSchemaCondition { // FlowSchemaList is a list of FlowSchema objects. message FlowSchemaList { // `metadata` is the standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // `items` is a list of FlowSchemas. - // +listType=atomic repeated FlowSchema items = 2; } @@ -231,17 +230,17 @@ message PolicyRulesWithSubjects { // PriorityLevelConfiguration represents the configuration of a priority level. message PriorityLevelConfiguration { // `metadata` is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // `spec` is the specification of the desired behavior of a "request-priority". - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional PriorityLevelConfigurationSpec spec = 2; // `status` is the current status of a "request-priority". - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional PriorityLevelConfigurationStatus status = 3; } @@ -270,12 +269,11 @@ message PriorityLevelConfigurationCondition { // PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. message PriorityLevelConfigurationList { // `metadata` is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // `items` is a list of request-priorities. - // +listType=atomic repeated PriorityLevelConfiguration items = 2; } diff --git a/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go b/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go index 16bcf819eab..a67c6dd0275 100644 --- a/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go +++ b/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go @@ -60,15 +60,15 @@ const ( type FlowSchema struct { metav1.TypeMeta `json:",inline"` // `metadata` is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // `spec` is the specification of the desired behavior of a FlowSchema. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec FlowSchemaSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // `status` is the current status of a FlowSchema. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status FlowSchemaStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -79,12 +79,11 @@ type FlowSchema struct { type FlowSchemaList struct { metav1.TypeMeta `json:",inline"` // `metadata` is the standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // `items` is a list of FlowSchemas. - // +listType=atomic Items []FlowSchema `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -327,15 +326,15 @@ type FlowSchemaConditionType string type PriorityLevelConfiguration struct { metav1.TypeMeta `json:",inline"` // `metadata` is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // `spec` is the specification of the desired behavior of a "request-priority". - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec PriorityLevelConfigurationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // `status` is the current status of a "request-priority". - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status PriorityLevelConfigurationStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -346,11 +345,10 @@ type PriorityLevelConfiguration struct { type PriorityLevelConfigurationList struct { metav1.TypeMeta `json:",inline"` // `metadata` is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // `items` is a list of request-priorities. - // +listType=atomic Items []PriorityLevelConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/k8s.io/api/flowcontrol/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/flowcontrol/v1alpha1/types_swagger_doc_generated.go index ffbee2e3a9c..211d55e5e8b 100644 --- a/vendor/k8s.io/api/flowcontrol/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/flowcontrol/v1alpha1/types_swagger_doc_generated.go @@ -38,9 +38,9 @@ func (FlowDistinguisherMethod) SwaggerDoc() map[string]string { var map_FlowSchema = map[string]string{ "": "FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\".", - "metadata": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (FlowSchema) SwaggerDoc() map[string]string { @@ -62,7 +62,7 @@ func (FlowSchemaCondition) SwaggerDoc() map[string]string { var map_FlowSchemaList = map[string]string{ "": "FlowSchemaList is a list of FlowSchema objects.", - "metadata": "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "`items` is a list of FlowSchemas.", } @@ -143,9 +143,9 @@ func (PolicyRulesWithSubjects) SwaggerDoc() map[string]string { var map_PriorityLevelConfiguration = map[string]string{ "": "PriorityLevelConfiguration represents the configuration of a priority level.", - "metadata": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (PriorityLevelConfiguration) SwaggerDoc() map[string]string { @@ -167,7 +167,7 @@ func (PriorityLevelConfigurationCondition) SwaggerDoc() map[string]string { var map_PriorityLevelConfigurationList = map[string]string{ "": "PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.", - "metadata": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "`items` is a list of request-priorities.", } diff --git a/vendor/k8s.io/api/networking/v1/generated.pb.go b/vendor/k8s.io/api/networking/v1/generated.pb.go index 1ff2339ba4c..4e03b54381d 100644 --- a/vendor/k8s.io/api/networking/v1/generated.pb.go +++ b/vendor/k8s.io/api/networking/v1/generated.pb.go @@ -25,8 +25,8 @@ import ( io "io" proto "github.com/gogo/protobuf/proto" - k8s_io_api_core_v1 "k8s.io/api/core/v1" + v11 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" @@ -48,10 +48,66 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} } +func (*HTTPIngressPath) ProtoMessage() {} +func (*HTTPIngressPath) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{0} +} +func (m *HTTPIngressPath) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HTTPIngressPath) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *HTTPIngressPath) XXX_Merge(src proto.Message) { + xxx_messageInfo_HTTPIngressPath.Merge(m, src) +} +func (m *HTTPIngressPath) XXX_Size() int { + return m.Size() +} +func (m *HTTPIngressPath) XXX_DiscardUnknown() { + xxx_messageInfo_HTTPIngressPath.DiscardUnknown(m) +} + +var xxx_messageInfo_HTTPIngressPath proto.InternalMessageInfo + +func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} } +func (*HTTPIngressRuleValue) ProtoMessage() {} +func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{1} +} +func (m *HTTPIngressRuleValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HTTPIngressRuleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *HTTPIngressRuleValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_HTTPIngressRuleValue.Merge(m, src) +} +func (m *HTTPIngressRuleValue) XXX_Size() int { + return m.Size() +} +func (m *HTTPIngressRuleValue) XXX_DiscardUnknown() { + xxx_messageInfo_HTTPIngressRuleValue.DiscardUnknown(m) +} + +var xxx_messageInfo_HTTPIngressRuleValue proto.InternalMessageInfo + func (m *IPBlock) Reset() { *m = IPBlock{} } func (*IPBlock) ProtoMessage() {} func (*IPBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{0} + return fileDescriptor_1c72867a70a7cc90, []int{2} } func (m *IPBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,10 +132,346 @@ func (m *IPBlock) XXX_DiscardUnknown() { var xxx_messageInfo_IPBlock proto.InternalMessageInfo +func (m *Ingress) Reset() { *m = Ingress{} } +func (*Ingress) ProtoMessage() {} +func (*Ingress) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{3} +} +func (m *Ingress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Ingress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Ingress) XXX_Merge(src proto.Message) { + xxx_messageInfo_Ingress.Merge(m, src) +} +func (m *Ingress) XXX_Size() int { + return m.Size() +} +func (m *Ingress) XXX_DiscardUnknown() { + xxx_messageInfo_Ingress.DiscardUnknown(m) +} + +var xxx_messageInfo_Ingress proto.InternalMessageInfo + +func (m *IngressBackend) Reset() { *m = IngressBackend{} } +func (*IngressBackend) ProtoMessage() {} +func (*IngressBackend) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{4} +} +func (m *IngressBackend) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressBackend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressBackend) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressBackend.Merge(m, src) +} +func (m *IngressBackend) XXX_Size() int { + return m.Size() +} +func (m *IngressBackend) XXX_DiscardUnknown() { + xxx_messageInfo_IngressBackend.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressBackend proto.InternalMessageInfo + +func (m *IngressClass) Reset() { *m = IngressClass{} } +func (*IngressClass) ProtoMessage() {} +func (*IngressClass) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{5} +} +func (m *IngressClass) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressClass) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressClass.Merge(m, src) +} +func (m *IngressClass) XXX_Size() int { + return m.Size() +} +func (m *IngressClass) XXX_DiscardUnknown() { + xxx_messageInfo_IngressClass.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressClass proto.InternalMessageInfo + +func (m *IngressClassList) Reset() { *m = IngressClassList{} } +func (*IngressClassList) ProtoMessage() {} +func (*IngressClassList) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{6} +} +func (m *IngressClassList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressClassList) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressClassList.Merge(m, src) +} +func (m *IngressClassList) XXX_Size() int { + return m.Size() +} +func (m *IngressClassList) XXX_DiscardUnknown() { + xxx_messageInfo_IngressClassList.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressClassList proto.InternalMessageInfo + +func (m *IngressClassSpec) Reset() { *m = IngressClassSpec{} } +func (*IngressClassSpec) ProtoMessage() {} +func (*IngressClassSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{7} +} +func (m *IngressClassSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressClassSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressClassSpec.Merge(m, src) +} +func (m *IngressClassSpec) XXX_Size() int { + return m.Size() +} +func (m *IngressClassSpec) XXX_DiscardUnknown() { + xxx_messageInfo_IngressClassSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressClassSpec proto.InternalMessageInfo + +func (m *IngressList) Reset() { *m = IngressList{} } +func (*IngressList) ProtoMessage() {} +func (*IngressList) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{8} +} +func (m *IngressList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressList) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressList.Merge(m, src) +} +func (m *IngressList) XXX_Size() int { + return m.Size() +} +func (m *IngressList) XXX_DiscardUnknown() { + xxx_messageInfo_IngressList.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressList proto.InternalMessageInfo + +func (m *IngressRule) Reset() { *m = IngressRule{} } +func (*IngressRule) ProtoMessage() {} +func (*IngressRule) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{9} +} +func (m *IngressRule) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressRule) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressRule.Merge(m, src) +} +func (m *IngressRule) XXX_Size() int { + return m.Size() +} +func (m *IngressRule) XXX_DiscardUnknown() { + xxx_messageInfo_IngressRule.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressRule proto.InternalMessageInfo + +func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} } +func (*IngressRuleValue) ProtoMessage() {} +func (*IngressRuleValue) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{10} +} +func (m *IngressRuleValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressRuleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressRuleValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressRuleValue.Merge(m, src) +} +func (m *IngressRuleValue) XXX_Size() int { + return m.Size() +} +func (m *IngressRuleValue) XXX_DiscardUnknown() { + xxx_messageInfo_IngressRuleValue.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressRuleValue proto.InternalMessageInfo + +func (m *IngressServiceBackend) Reset() { *m = IngressServiceBackend{} } +func (*IngressServiceBackend) ProtoMessage() {} +func (*IngressServiceBackend) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{11} +} +func (m *IngressServiceBackend) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressServiceBackend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressServiceBackend) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressServiceBackend.Merge(m, src) +} +func (m *IngressServiceBackend) XXX_Size() int { + return m.Size() +} +func (m *IngressServiceBackend) XXX_DiscardUnknown() { + xxx_messageInfo_IngressServiceBackend.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressServiceBackend proto.InternalMessageInfo + +func (m *IngressSpec) Reset() { *m = IngressSpec{} } +func (*IngressSpec) ProtoMessage() {} +func (*IngressSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{12} +} +func (m *IngressSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressSpec.Merge(m, src) +} +func (m *IngressSpec) XXX_Size() int { + return m.Size() +} +func (m *IngressSpec) XXX_DiscardUnknown() { + xxx_messageInfo_IngressSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressSpec proto.InternalMessageInfo + +func (m *IngressStatus) Reset() { *m = IngressStatus{} } +func (*IngressStatus) ProtoMessage() {} +func (*IngressStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{13} +} +func (m *IngressStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressStatus.Merge(m, src) +} +func (m *IngressStatus) XXX_Size() int { + return m.Size() +} +func (m *IngressStatus) XXX_DiscardUnknown() { + xxx_messageInfo_IngressStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressStatus proto.InternalMessageInfo + +func (m *IngressTLS) Reset() { *m = IngressTLS{} } +func (*IngressTLS) ProtoMessage() {} +func (*IngressTLS) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{14} +} +func (m *IngressTLS) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IngressTLS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *IngressTLS) XXX_Merge(src proto.Message) { + xxx_messageInfo_IngressTLS.Merge(m, src) +} +func (m *IngressTLS) XXX_Size() int { + return m.Size() +} +func (m *IngressTLS) XXX_DiscardUnknown() { + xxx_messageInfo_IngressTLS.DiscardUnknown(m) +} + +var xxx_messageInfo_IngressTLS proto.InternalMessageInfo + func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} } func (*NetworkPolicy) ProtoMessage() {} func (*NetworkPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{1} + return fileDescriptor_1c72867a70a7cc90, []int{15} } func (m *NetworkPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +499,7 @@ var xxx_messageInfo_NetworkPolicy proto.InternalMessageInfo func (m *NetworkPolicyEgressRule) Reset() { *m = NetworkPolicyEgressRule{} } func (*NetworkPolicyEgressRule) ProtoMessage() {} func (*NetworkPolicyEgressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{2} + return fileDescriptor_1c72867a70a7cc90, []int{16} } func (m *NetworkPolicyEgressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +527,7 @@ var xxx_messageInfo_NetworkPolicyEgressRule proto.InternalMessageInfo func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} } func (*NetworkPolicyIngressRule) ProtoMessage() {} func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{3} + return fileDescriptor_1c72867a70a7cc90, []int{17} } func (m *NetworkPolicyIngressRule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +555,7 @@ var xxx_messageInfo_NetworkPolicyIngressRule proto.InternalMessageInfo func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} } func (*NetworkPolicyList) ProtoMessage() {} func (*NetworkPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{4} + return fileDescriptor_1c72867a70a7cc90, []int{18} } func (m *NetworkPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +583,7 @@ var xxx_messageInfo_NetworkPolicyList proto.InternalMessageInfo func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} } func (*NetworkPolicyPeer) ProtoMessage() {} func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{5} + return fileDescriptor_1c72867a70a7cc90, []int{19} } func (m *NetworkPolicyPeer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +611,7 @@ var xxx_messageInfo_NetworkPolicyPeer proto.InternalMessageInfo func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} } func (*NetworkPolicyPort) ProtoMessage() {} func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{6} + return fileDescriptor_1c72867a70a7cc90, []int{20} } func (m *NetworkPolicyPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +639,7 @@ var xxx_messageInfo_NetworkPolicyPort proto.InternalMessageInfo func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} } func (*NetworkPolicySpec) ProtoMessage() {} func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{7} + return fileDescriptor_1c72867a70a7cc90, []int{21} } func (m *NetworkPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,8 +664,50 @@ func (m *NetworkPolicySpec) XXX_DiscardUnknown() { var xxx_messageInfo_NetworkPolicySpec proto.InternalMessageInfo +func (m *ServiceBackendPort) Reset() { *m = ServiceBackendPort{} } +func (*ServiceBackendPort) ProtoMessage() {} +func (*ServiceBackendPort) Descriptor() ([]byte, []int) { + return fileDescriptor_1c72867a70a7cc90, []int{22} +} +func (m *ServiceBackendPort) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceBackendPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ServiceBackendPort) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceBackendPort.Merge(m, src) +} +func (m *ServiceBackendPort) XXX_Size() int { + return m.Size() +} +func (m *ServiceBackendPort) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceBackendPort.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceBackendPort proto.InternalMessageInfo + func init() { + proto.RegisterType((*HTTPIngressPath)(nil), "k8s.io.api.networking.v1.HTTPIngressPath") + proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.api.networking.v1.HTTPIngressRuleValue") proto.RegisterType((*IPBlock)(nil), "k8s.io.api.networking.v1.IPBlock") + proto.RegisterType((*Ingress)(nil), "k8s.io.api.networking.v1.Ingress") + proto.RegisterType((*IngressBackend)(nil), "k8s.io.api.networking.v1.IngressBackend") + proto.RegisterType((*IngressClass)(nil), "k8s.io.api.networking.v1.IngressClass") + proto.RegisterType((*IngressClassList)(nil), "k8s.io.api.networking.v1.IngressClassList") + proto.RegisterType((*IngressClassSpec)(nil), "k8s.io.api.networking.v1.IngressClassSpec") + proto.RegisterType((*IngressList)(nil), "k8s.io.api.networking.v1.IngressList") + proto.RegisterType((*IngressRule)(nil), "k8s.io.api.networking.v1.IngressRule") + proto.RegisterType((*IngressRuleValue)(nil), "k8s.io.api.networking.v1.IngressRuleValue") + proto.RegisterType((*IngressServiceBackend)(nil), "k8s.io.api.networking.v1.IngressServiceBackend") + proto.RegisterType((*IngressSpec)(nil), "k8s.io.api.networking.v1.IngressSpec") + proto.RegisterType((*IngressStatus)(nil), "k8s.io.api.networking.v1.IngressStatus") + proto.RegisterType((*IngressTLS)(nil), "k8s.io.api.networking.v1.IngressTLS") proto.RegisterType((*NetworkPolicy)(nil), "k8s.io.api.networking.v1.NetworkPolicy") proto.RegisterType((*NetworkPolicyEgressRule)(nil), "k8s.io.api.networking.v1.NetworkPolicyEgressRule") proto.RegisterType((*NetworkPolicyIngressRule)(nil), "k8s.io.api.networking.v1.NetworkPolicyIngressRule") @@ -281,6 +715,7 @@ func init() { proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.api.networking.v1.NetworkPolicyPeer") proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.api.networking.v1.NetworkPolicyPort") proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.api.networking.v1.NetworkPolicySpec") + proto.RegisterType((*ServiceBackendPort)(nil), "k8s.io.api.networking.v1.ServiceBackendPort") } func init() { @@ -288,58 +723,180 @@ func init() { } var fileDescriptor_1c72867a70a7cc90 = []byte{ - // 804 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x8f, 0xdb, 0x44, - 0x14, 0x8e, 0x9d, 0x6c, 0x92, 0x4e, 0x28, 0x65, 0x07, 0x21, 0xac, 0x45, 0xd8, 0xc1, 0x17, 0x56, - 0xaa, 0x18, 0x93, 0x16, 0x21, 0x6e, 0x08, 0x43, 0x29, 0x91, 0xba, 0xbb, 0xd1, 0x6c, 0x2f, 0x20, - 0x90, 0x70, 0x9c, 0x59, 0xef, 0x34, 0xb1, 0xc7, 0x1a, 0x4f, 0x42, 0xf7, 0xc6, 0x9f, 0xc0, 0x1f, - 0xc2, 0x91, 0x1b, 0x87, 0x72, 0xdc, 0x63, 0x8f, 0x3d, 0x59, 0xac, 0xf9, 0x2f, 0xf6, 0x84, 0x66, - 0x3c, 0x89, 0xf3, 0xa3, 0x11, 0xd9, 0x15, 0xbd, 0x65, 0xde, 0xbc, 0xef, 0x7b, 0xf3, 0xde, 0xfb, - 0xf2, 0x19, 0x7c, 0x35, 0xfe, 0x22, 0x43, 0x94, 0x79, 0xe3, 0xe9, 0x90, 0xf0, 0x84, 0x08, 0x92, - 0x79, 0x33, 0x92, 0x8c, 0x18, 0xf7, 0xf4, 0x45, 0x90, 0x52, 0x2f, 0x21, 0xe2, 0x17, 0xc6, 0xc7, - 0x34, 0x89, 0xbc, 0x59, 0xcf, 0x8b, 0x48, 0x42, 0x78, 0x20, 0xc8, 0x08, 0xa5, 0x9c, 0x09, 0x06, - 0xad, 0x32, 0x13, 0x05, 0x29, 0x45, 0x55, 0x26, 0x9a, 0xf5, 0x0e, 0x3e, 0x89, 0xa8, 0x38, 0x9f, - 0x0e, 0x51, 0xc8, 0x62, 0x2f, 0x62, 0x11, 0xf3, 0x14, 0x60, 0x38, 0x3d, 0x53, 0x27, 0x75, 0x50, - 0xbf, 0x4a, 0xa2, 0x03, 0x77, 0xa9, 0x64, 0xc8, 0x38, 0x79, 0x4d, 0xb1, 0x83, 0xcf, 0xaa, 0x9c, - 0x38, 0x08, 0xcf, 0x69, 0x42, 0xf8, 0x85, 0x97, 0x8e, 0x23, 0x19, 0xc8, 0xbc, 0x98, 0x88, 0xe0, - 0x75, 0x28, 0x6f, 0x1b, 0x8a, 0x4f, 0x13, 0x41, 0x63, 0xb2, 0x01, 0xf8, 0xfc, 0xbf, 0x00, 0x59, - 0x78, 0x4e, 0xe2, 0x60, 0x03, 0xf7, 0x70, 0x1b, 0x6e, 0x2a, 0xe8, 0xc4, 0xa3, 0x89, 0xc8, 0x04, - 0x5f, 0x07, 0xb9, 0x27, 0xa0, 0xd5, 0x1f, 0xf8, 0x13, 0x16, 0x8e, 0x61, 0x17, 0x34, 0x42, 0x3a, - 0xe2, 0x96, 0xd1, 0x35, 0x0e, 0xef, 0xf8, 0x6f, 0x5d, 0xe6, 0x4e, 0xad, 0xc8, 0x9d, 0xc6, 0xd7, - 0xfd, 0x6f, 0x30, 0x56, 0x37, 0xd0, 0x05, 0x4d, 0xf2, 0x3c, 0x24, 0xa9, 0xb0, 0xcc, 0x6e, 0xfd, - 0xf0, 0x8e, 0x0f, 0x8a, 0xdc, 0x69, 0x3e, 0x52, 0x11, 0xac, 0x6f, 0xdc, 0xbf, 0x0c, 0x70, 0xf7, - 0xb8, 0xdc, 0xc4, 0x80, 0x4d, 0x68, 0x78, 0x01, 0x7f, 0x06, 0x6d, 0x39, 0x9b, 0x51, 0x20, 0x02, - 0xc5, 0xdd, 0x79, 0xf0, 0x29, 0xaa, 0xd6, 0xb6, 0x78, 0x2a, 0x4a, 0xc7, 0x91, 0x0c, 0x64, 0x48, - 0x66, 0xa3, 0x59, 0x0f, 0x9d, 0x0c, 0x9f, 0x91, 0x50, 0x1c, 0x11, 0x11, 0xf8, 0x50, 0xbf, 0x06, - 0x54, 0x31, 0xbc, 0x60, 0x85, 0x47, 0xa0, 0x91, 0xa5, 0x24, 0xb4, 0x4c, 0xc5, 0x7e, 0x1f, 0x6d, - 0x13, 0x05, 0x5a, 0x79, 0xd8, 0x69, 0x4a, 0xc2, 0xaa, 0x4d, 0x79, 0xc2, 0x8a, 0xc6, 0xfd, 0xc3, - 0x00, 0xef, 0xaf, 0x64, 0x3e, 0x8a, 0x38, 0xc9, 0x32, 0x3c, 0x9d, 0x10, 0x38, 0x00, 0x7b, 0x29, - 0xe3, 0x22, 0xb3, 0x8c, 0x6e, 0xfd, 0x06, 0xb5, 0x06, 0x8c, 0x0b, 0xff, 0xae, 0xae, 0xb5, 0x27, - 0x4f, 0x19, 0x2e, 0x89, 0xe0, 0x63, 0x60, 0x0a, 0xa6, 0x06, 0x7a, 0x03, 0x3a, 0x42, 0xb8, 0x0f, - 0x34, 0x9d, 0xf9, 0x94, 0x61, 0x53, 0x30, 0xf7, 0x4f, 0x03, 0x58, 0x2b, 0x59, 0xfd, 0xe4, 0x4d, - 0xbe, 0xfb, 0x08, 0x34, 0xce, 0x38, 0x8b, 0x6f, 0xf3, 0xf2, 0xc5, 0xd0, 0xbf, 0xe5, 0x2c, 0xc6, - 0x8a, 0xc6, 0x7d, 0x61, 0x80, 0xfd, 0x95, 0xcc, 0x27, 0x34, 0x13, 0xf0, 0xc7, 0x0d, 0xed, 0xa0, - 0xdd, 0xb4, 0x23, 0xd1, 0x4a, 0x39, 0xef, 0xe8, 0x5a, 0xed, 0x79, 0x64, 0x49, 0x37, 0x4f, 0xc0, - 0x1e, 0x15, 0x24, 0xce, 0x74, 0x0f, 0x1f, 0xef, 0xd8, 0x43, 0x35, 0x90, 0xbe, 0x44, 0xe3, 0x92, - 0xc4, 0x7d, 0x61, 0xae, 0x75, 0x20, 0x7b, 0x85, 0x67, 0xa0, 0x93, 0xb2, 0xd1, 0x29, 0x99, 0x90, - 0x50, 0x30, 0xae, 0x9b, 0x78, 0xb8, 0x63, 0x13, 0xc1, 0x90, 0x4c, 0xe6, 0x50, 0xff, 0x5e, 0x91, - 0x3b, 0x9d, 0x41, 0xc5, 0x85, 0x97, 0x89, 0xe1, 0x73, 0xb0, 0x9f, 0x04, 0x31, 0xc9, 0xd2, 0x20, - 0x24, 0x8b, 0x6a, 0xe6, 0xed, 0xab, 0xbd, 0x57, 0xe4, 0xce, 0xfe, 0xf1, 0x3a, 0x23, 0xde, 0x2c, - 0x02, 0xbf, 0x03, 0x2d, 0x9a, 0x2a, 0x0b, 0xb1, 0xea, 0xaa, 0xde, 0x47, 0xdb, 0xe7, 0xa8, 0xbd, - 0xc6, 0xef, 0x14, 0xb9, 0x33, 0x37, 0x1e, 0x3c, 0x87, 0xbb, 0xbf, 0xaf, 0x6b, 0x40, 0x0a, 0x0e, - 0x3e, 0x06, 0x6d, 0xe5, 0x55, 0x21, 0x9b, 0x68, 0x6f, 0xba, 0x2f, 0xf7, 0x39, 0xd0, 0xb1, 0xeb, - 0xdc, 0xf9, 0x60, 0xd3, 0xbc, 0xd1, 0xfc, 0x1a, 0x2f, 0xc0, 0xf0, 0x18, 0x34, 0xa4, 0x74, 0xf5, - 0x54, 0xb6, 0x9b, 0x90, 0xf4, 0x4b, 0x54, 0xfa, 0x25, 0xea, 0x27, 0xe2, 0x84, 0x9f, 0x0a, 0x4e, - 0x93, 0xc8, 0x6f, 0x4b, 0xc9, 0xca, 0x27, 0x61, 0xc5, 0xe3, 0x5e, 0xaf, 0x2f, 0x5c, 0x7a, 0x08, - 0x7c, 0xf6, 0xbf, 0x2d, 0xfc, 0x5d, 0x2d, 0xb3, 0xed, 0x4b, 0xff, 0x09, 0xb4, 0x68, 0xf9, 0x27, - 0xd7, 0x12, 0x7e, 0xb0, 0xa3, 0x84, 0x97, 0xac, 0xc1, 0xbf, 0xa7, 0xcb, 0xb4, 0xe6, 0xc1, 0x39, - 0x27, 0xfc, 0x1e, 0x34, 0x49, 0xc9, 0x5e, 0x57, 0xec, 0xbd, 0x1d, 0xd9, 0x2b, 0xbf, 0xf4, 0xdf, - 0xd6, 0xe4, 0x4d, 0x1d, 0xd3, 0x84, 0xf0, 0x4b, 0x39, 0x25, 0x99, 0xfb, 0xf4, 0x22, 0x25, 0x99, - 0xd5, 0x50, 0xdf, 0x93, 0x0f, 0xcb, 0x66, 0x17, 0xe1, 0xeb, 0xdc, 0x01, 0xd5, 0x11, 0x2f, 0x23, - 0xfc, 0xc3, 0xcb, 0x2b, 0xbb, 0xf6, 0xf2, 0xca, 0xae, 0xbd, 0xba, 0xb2, 0x6b, 0xbf, 0x16, 0xb6, - 0x71, 0x59, 0xd8, 0xc6, 0xcb, 0xc2, 0x36, 0x5e, 0x15, 0xb6, 0xf1, 0x77, 0x61, 0x1b, 0xbf, 0xfd, - 0x63, 0xd7, 0x7e, 0x30, 0x67, 0xbd, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x7b, 0xc9, 0x59, - 0x67, 0x08, 0x00, 0x00, + // 1441 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x1b, 0xcf, 0x3a, 0x71, 0xec, 0x8c, 0xd3, 0x34, 0x9d, 0xb7, 0xd5, 0x6b, 0xf5, 0xd5, 0x6b, 0xe7, + 0x5d, 0xbd, 0xb4, 0x81, 0xd2, 0x35, 0x71, 0x2b, 0xc4, 0x0d, 0xd8, 0xf4, 0x2b, 0xe0, 0x26, 0xd6, + 0xd8, 0x2a, 0x02, 0x51, 0xd4, 0xf1, 0x7a, 0x62, 0x6f, 0xbd, 0xde, 0x59, 0x66, 0xc7, 0xa1, 0xbd, + 0x71, 0xe1, 0xc0, 0x8d, 0x7f, 0x81, 0x03, 0x37, 0x6e, 0x70, 0x43, 0x50, 0xb8, 0xa0, 0x1e, 0x7b, + 0xec, 0xc9, 0xa2, 0xe6, 0xbf, 0xc8, 0x09, 0xcd, 0xec, 0xec, 0xa7, 0x63, 0x6c, 0xaa, 0x2a, 0x27, + 0x7b, 0x9f, 0x8f, 0xdf, 0xf3, 0x39, 0xcf, 0x33, 0x03, 0xde, 0x1f, 0xbc, 0xe3, 0x1b, 0x36, 0xad, + 0x0d, 0x46, 0x1d, 0xc2, 0x5c, 0xc2, 0x89, 0x5f, 0x3b, 0x22, 0x6e, 0x97, 0xb2, 0x9a, 0x62, 0x60, + 0xcf, 0xae, 0xb9, 0x84, 0x7f, 0x41, 0xd9, 0xc0, 0x76, 0x7b, 0xb5, 0xa3, 0x9d, 0x5a, 0x8f, 0xb8, + 0x84, 0x61, 0x4e, 0xba, 0x86, 0xc7, 0x28, 0xa7, 0xb0, 0x1c, 0x48, 0x1a, 0xd8, 0xb3, 0x8d, 0x58, + 0xd2, 0x38, 0xda, 0xb9, 0x78, 0xb5, 0x67, 0xf3, 0xfe, 0xa8, 0x63, 0x58, 0x74, 0x58, 0xeb, 0xd1, + 0x1e, 0xad, 0x49, 0x85, 0xce, 0xe8, 0x50, 0x7e, 0xc9, 0x0f, 0xf9, 0x2f, 0x00, 0xba, 0xa8, 0x27, + 0x4c, 0x5a, 0x94, 0x91, 0x13, 0x8c, 0x5d, 0xbc, 0x1e, 0xcb, 0x0c, 0xb1, 0xd5, 0xb7, 0x5d, 0xc2, + 0x1e, 0xd7, 0xbc, 0x41, 0x4f, 0x10, 0xfc, 0xda, 0x90, 0x70, 0x7c, 0x92, 0x56, 0x6d, 0x96, 0x16, + 0x1b, 0xb9, 0xdc, 0x1e, 0x92, 0x29, 0x85, 0xb7, 0xe7, 0x29, 0xf8, 0x56, 0x9f, 0x0c, 0xf1, 0x94, + 0xde, 0xb5, 0x59, 0x7a, 0x23, 0x6e, 0x3b, 0x35, 0xdb, 0xe5, 0x3e, 0x67, 0x59, 0x25, 0xfd, 0x17, + 0x0d, 0x9c, 0xbd, 0xd3, 0x6e, 0x37, 0xf7, 0xdc, 0x1e, 0x23, 0xbe, 0xdf, 0xc4, 0xbc, 0x0f, 0xb7, + 0xc0, 0x8a, 0x87, 0x79, 0xbf, 0xac, 0x6d, 0x69, 0xdb, 0x6b, 0xe6, 0xfa, 0xd3, 0x71, 0x75, 0x69, + 0x32, 0xae, 0xae, 0x08, 0x1e, 0x92, 0x1c, 0x78, 0x1d, 0x14, 0xc5, 0x6f, 0xfb, 0xb1, 0x47, 0xca, + 0xcb, 0x52, 0xaa, 0x3c, 0x19, 0x57, 0x8b, 0x4d, 0x45, 0x3b, 0x4e, 0xfc, 0x47, 0x91, 0x24, 0x6c, + 0x81, 0x42, 0x07, 0x5b, 0x03, 0xe2, 0x76, 0xcb, 0xb9, 0x2d, 0x6d, 0xbb, 0x54, 0xdf, 0x36, 0x66, + 0x95, 0xcf, 0x50, 0xfe, 0x98, 0x81, 0xbc, 0x79, 0x56, 0x39, 0x51, 0x50, 0x04, 0x14, 0x22, 0xe9, + 0x87, 0xe0, 0x7c, 0xc2, 0x7f, 0x34, 0x72, 0xc8, 0x3d, 0xec, 0x8c, 0x08, 0xdc, 0x07, 0x79, 0x61, + 0xd8, 0x2f, 0x6b, 0x5b, 0xcb, 0xdb, 0xa5, 0xfa, 0xeb, 0xb3, 0x4d, 0x65, 0xc2, 0x37, 0xcf, 0x28, + 0x5b, 0x79, 0xf1, 0xe5, 0xa3, 0x00, 0x46, 0x3f, 0x00, 0x85, 0xbd, 0xa6, 0xe9, 0x50, 0x6b, 0x20, + 0xf2, 0x63, 0xd9, 0x5d, 0x96, 0xcd, 0xcf, 0xee, 0xde, 0x0d, 0x84, 0x24, 0x07, 0xea, 0x60, 0x95, + 0x3c, 0xb2, 0x88, 0xc7, 0xcb, 0xb9, 0xad, 0xe5, 0xed, 0x35, 0x13, 0x4c, 0xc6, 0xd5, 0xd5, 0x9b, + 0x92, 0x82, 0x14, 0x47, 0xff, 0x2a, 0x07, 0x0a, 0xca, 0x2c, 0x7c, 0x00, 0x8a, 0xa2, 0x7d, 0xba, + 0x98, 0x63, 0x89, 0x5a, 0xaa, 0xbf, 0x95, 0xf0, 0x37, 0xaa, 0xa6, 0xe1, 0x0d, 0x7a, 0x82, 0xe0, + 0x1b, 0x42, 0x5a, 0xf8, 0x7e, 0xd0, 0x79, 0x48, 0x2c, 0x7e, 0x97, 0x70, 0x6c, 0x42, 0xe5, 0x07, + 0x88, 0x69, 0x28, 0x42, 0x85, 0xb7, 0xc1, 0x8a, 0xef, 0x11, 0x4b, 0x25, 0xfe, 0xb5, 0xb9, 0x89, + 0x6f, 0x79, 0xc4, 0x8a, 0x43, 0x13, 0x5f, 0x48, 0x02, 0xc0, 0x03, 0xb0, 0xea, 0x73, 0xcc, 0x47, + 0xbe, 0x2c, 0x7c, 0xa9, 0x7e, 0x79, 0x3e, 0x94, 0x14, 0x37, 0x37, 0x14, 0xd8, 0x6a, 0xf0, 0x8d, + 0x14, 0x8c, 0xfe, 0x9b, 0x06, 0x36, 0xd2, 0xd5, 0x86, 0xf7, 0x40, 0xc1, 0x27, 0xec, 0xc8, 0xb6, + 0x48, 0x79, 0x45, 0x1a, 0xa9, 0xcd, 0x37, 0x12, 0xc8, 0x87, 0xfd, 0x52, 0x12, 0xbd, 0xa2, 0x68, + 0x28, 0x04, 0x83, 0x1f, 0x81, 0x22, 0x23, 0x3e, 0x1d, 0x31, 0x8b, 0x28, 0xef, 0xaf, 0x26, 0x81, + 0xc5, 0xb9, 0x17, 0x90, 0xa2, 0x59, 0xbb, 0x0d, 0x6a, 0x61, 0x27, 0x48, 0x25, 0x22, 0x87, 0x84, + 0x11, 0xd7, 0x22, 0xe6, 0xba, 0xe8, 0x72, 0xa4, 0x20, 0x50, 0x04, 0x26, 0x4e, 0xd1, 0xba, 0x72, + 0x64, 0xd7, 0xc1, 0xa7, 0x52, 0xd0, 0x46, 0xaa, 0xa0, 0x6f, 0xcc, 0x4d, 0x90, 0xf4, 0x6b, 0x56, + 0x55, 0xf5, 0x9f, 0x35, 0xb0, 0x99, 0x14, 0x6c, 0xd8, 0x3e, 0x87, 0x9f, 0x4e, 0x05, 0x61, 0x2c, + 0x16, 0x84, 0xd0, 0x96, 0x21, 0x6c, 0x2a, 0x53, 0xc5, 0x90, 0x92, 0x08, 0xe0, 0x43, 0x90, 0xb7, + 0x39, 0x19, 0xfa, 0xf2, 0x88, 0x94, 0xea, 0x97, 0x16, 0x8b, 0x20, 0x3e, 0x9d, 0x7b, 0x42, 0x19, + 0x05, 0x18, 0xfa, 0x77, 0x19, 0xff, 0x45, 0x68, 0xb0, 0x0e, 0x80, 0x45, 0x5d, 0xce, 0xa8, 0xe3, + 0x90, 0xf0, 0xb4, 0x46, 0x49, 0xdd, 0x8d, 0x38, 0x28, 0x21, 0x05, 0xef, 0x03, 0xe0, 0x61, 0x86, + 0x87, 0x84, 0x13, 0xe6, 0xab, 0xe4, 0xfe, 0xc3, 0x26, 0xd9, 0x10, 0xf0, 0xcd, 0x08, 0x04, 0x25, + 0x00, 0xf5, 0x1f, 0x34, 0x50, 0x52, 0x7e, 0x9e, 0x42, 0x8a, 0x6f, 0xa5, 0x53, 0xfc, 0xbf, 0xf9, + 0xe3, 0xf6, 0xe4, 0xec, 0x7e, 0x1b, 0x7b, 0x2d, 0x06, 0xac, 0x18, 0x80, 0x7d, 0xea, 0xf3, 0xec, + 0x00, 0xbc, 0x43, 0x7d, 0x8e, 0x24, 0x07, 0x7a, 0x60, 0xd3, 0xce, 0x4c, 0xe4, 0x85, 0x3b, 0x35, + 0xd2, 0x30, 0xcb, 0x0a, 0x79, 0x33, 0xcb, 0x41, 0x53, 0xe8, 0xfa, 0x03, 0x30, 0x25, 0x25, 0xce, + 0x48, 0x9f, 0x73, 0xef, 0x84, 0xcc, 0xce, 0x5e, 0x01, 0xb1, 0xf5, 0xa2, 0x8c, 0xa9, 0xdd, 0x6e, + 0x22, 0x89, 0xa2, 0x7f, 0xad, 0x81, 0x0b, 0x27, 0x4e, 0x1b, 0x91, 0x0f, 0x17, 0x0f, 0x49, 0x36, + 0x1f, 0xfb, 0x78, 0x48, 0x90, 0xe4, 0xc0, 0x7d, 0xb0, 0xe2, 0x51, 0xc6, 0x55, 0x0e, 0xde, 0x9c, + 0xed, 0x49, 0x1a, 0xb9, 0x49, 0x19, 0x4f, 0x2c, 0x60, 0xca, 0x38, 0x92, 0x38, 0xfa, 0xef, 0xb9, + 0xa8, 0x22, 0xb2, 0xd5, 0xdf, 0x8b, 0xf2, 0x2d, 0xdb, 0x5f, 0x58, 0x96, 0xa3, 0x73, 0xcd, 0x3c, + 0x9f, 0xc8, 0x5f, 0xc4, 0x43, 0x53, 0xd2, 0xb0, 0x0b, 0x36, 0xba, 0xe4, 0x10, 0x8f, 0x1c, 0xae, + 0x6c, 0xab, 0xac, 0x2d, 0xbe, 0xa3, 0xe1, 0x64, 0x5c, 0xdd, 0xb8, 0x91, 0xc2, 0x40, 0x19, 0x4c, + 0xb8, 0x0b, 0x96, 0xb9, 0x13, 0xf6, 0xe3, 0xff, 0xe7, 0x42, 0xb7, 0x1b, 0x2d, 0xb3, 0xa4, 0xc2, + 0x5f, 0x6e, 0x37, 0x5a, 0x48, 0x68, 0xc3, 0x0f, 0x40, 0x9e, 0x8d, 0x1c, 0x22, 0x36, 0xd0, 0xf2, + 0x42, 0xcb, 0x4c, 0xd4, 0x34, 0x6e, 0x6d, 0xf1, 0xe5, 0xa3, 0x00, 0x42, 0xff, 0x1c, 0x9c, 0x49, + 0xad, 0x29, 0xf8, 0x00, 0xac, 0x3b, 0x14, 0x77, 0x4d, 0xec, 0x60, 0xd7, 0x52, 0x63, 0x23, 0x33, + 0x9d, 0xc2, 0x11, 0xd0, 0x48, 0xc8, 0xa9, 0x25, 0x77, 0x5e, 0x19, 0x59, 0x4f, 0xf2, 0x50, 0x0a, + 0x51, 0xc7, 0x00, 0xc4, 0xe1, 0xc1, 0x2a, 0xc8, 0x8b, 0x13, 0x13, 0xdc, 0x53, 0xd6, 0xcc, 0x35, + 0xe1, 0xa1, 0x38, 0x48, 0x3e, 0x0a, 0xe8, 0x62, 0x8a, 0xf9, 0xc4, 0x62, 0x84, 0xcb, 0xa2, 0xe6, + 0xd2, 0x53, 0xac, 0x15, 0x71, 0x50, 0x42, 0x4a, 0xff, 0x55, 0x03, 0x67, 0xf6, 0x83, 0x4c, 0x34, + 0xa9, 0x63, 0x5b, 0x8f, 0x4f, 0x61, 0x21, 0xdd, 0x4d, 0x2d, 0xa4, 0x2b, 0xb3, 0x8b, 0x92, 0x72, + 0x6c, 0xe6, 0x46, 0xfa, 0x51, 0x03, 0xff, 0x4e, 0x49, 0xde, 0x8c, 0xe7, 0x4f, 0x13, 0xe4, 0xc5, + 0x29, 0x08, 0xef, 0x76, 0x8b, 0xda, 0x92, 0xa7, 0x29, 0xbe, 0xdd, 0x09, 0x04, 0x14, 0x00, 0xc1, + 0xdb, 0x20, 0xc7, 0xa9, 0x6a, 0xcb, 0x85, 0xe1, 0x08, 0x61, 0x26, 0x50, 0x70, 0xb9, 0x36, 0x45, + 0x39, 0x4e, 0xf5, 0x9f, 0x34, 0x50, 0x4e, 0x49, 0x25, 0xe7, 0xe6, 0xab, 0xf7, 0xfb, 0x2e, 0x58, + 0x39, 0x64, 0x74, 0xf8, 0x32, 0x9e, 0x47, 0x49, 0xbf, 0xc5, 0xe8, 0x10, 0x49, 0x18, 0xfd, 0x89, + 0x06, 0xce, 0xa5, 0x24, 0x4f, 0x61, 0x49, 0x35, 0xd2, 0x4b, 0xea, 0xf2, 0x82, 0x31, 0xcc, 0x58, + 0x55, 0x4f, 0x72, 0x99, 0x08, 0x44, 0xac, 0xf0, 0x10, 0x94, 0x3c, 0xda, 0x6d, 0x11, 0x87, 0x58, + 0x9c, 0x86, 0x67, 0xfa, 0xda, 0x82, 0x41, 0xe0, 0x0e, 0x71, 0x42, 0x55, 0xf3, 0xec, 0x64, 0x5c, + 0x2d, 0x35, 0x63, 0x2c, 0x94, 0x04, 0x86, 0x8f, 0xc0, 0x39, 0x31, 0xee, 0x7d, 0x0f, 0x5b, 0x24, + 0xb2, 0x96, 0x7b, 0x79, 0x6b, 0x17, 0x26, 0xe3, 0xea, 0xb9, 0xfd, 0x2c, 0x22, 0x9a, 0x36, 0x02, + 0xef, 0x80, 0x82, 0xed, 0xc9, 0xe7, 0x89, 0xba, 0xd9, 0xfe, 0xdd, 0xb2, 0x0f, 0xde, 0x31, 0xc1, + 0x25, 0x59, 0x7d, 0xa0, 0x50, 0x5d, 0xff, 0x3e, 0xdb, 0x03, 0xa2, 0xe1, 0xe0, 0x6d, 0x50, 0x94, + 0x0f, 0x46, 0x8b, 0x3a, 0x6a, 0xcd, 0x5d, 0x91, 0x2f, 0x3e, 0x45, 0x3b, 0x1e, 0x57, 0xff, 0x33, + 0xfd, 0x82, 0x36, 0x42, 0x36, 0x8a, 0x94, 0x33, 0x9b, 0x70, 0xf6, 0x10, 0x12, 0x8f, 0x56, 0x23, + 0x78, 0xb4, 0x1a, 0x7b, 0x2e, 0x3f, 0x60, 0x2d, 0xce, 0x6c, 0xb7, 0x17, 0x6c, 0xe5, 0xc4, 0x26, + 0x3c, 0xce, 0x16, 0x5c, 0xee, 0xc3, 0x87, 0xaf, 0xac, 0xe0, 0xff, 0x52, 0x6d, 0x36, 0xbb, 0xe8, + 0xf7, 0x41, 0x41, 0x6d, 0x53, 0xd5, 0xc2, 0xf5, 0x05, 0x5b, 0x38, 0xb9, 0x9d, 0xa2, 0x07, 0x6e, + 0x48, 0x0c, 0x31, 0xe1, 0xc7, 0x60, 0x95, 0x04, 0xe8, 0xc1, 0xba, 0xdb, 0x59, 0x10, 0x3d, 0x9e, + 0x97, 0xf1, 0xd3, 0x4b, 0xd1, 0x14, 0x20, 0x7c, 0x57, 0x64, 0x49, 0xc8, 0x8a, 0xcb, 0xac, 0x5f, + 0x5e, 0x91, 0x1b, 0xe8, 0xbf, 0x41, 0xb0, 0x11, 0xf9, 0x58, 0xdc, 0x66, 0xa3, 0x4f, 0x94, 0xd4, + 0xd0, 0x3f, 0x03, 0x70, 0xfa, 0xc2, 0xb2, 0xc0, 0x75, 0xe8, 0x12, 0x58, 0x75, 0x47, 0xc3, 0x0e, + 0x09, 0x0e, 0x47, 0x3e, 0x76, 0x70, 0x5f, 0x52, 0x91, 0xe2, 0x9a, 0xdb, 0x4f, 0x5f, 0x54, 0x96, + 0x9e, 0xbd, 0xa8, 0x2c, 0x3d, 0x7f, 0x51, 0x59, 0xfa, 0x72, 0x52, 0xd1, 0x9e, 0x4e, 0x2a, 0xda, + 0xb3, 0x49, 0x45, 0x7b, 0x3e, 0xa9, 0x68, 0x7f, 0x4c, 0x2a, 0xda, 0x37, 0x7f, 0x56, 0x96, 0x3e, + 0xc9, 0x1d, 0xed, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x87, 0xf6, 0x28, 0x4c, 0x12, 0x00, + 0x00, +} + +func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HTTPIngressPath) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HTTPIngressPath) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PathType != nil { + i -= len(*m.PathType) + copy(dAtA[i:], *m.PathType) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PathType))) + i-- + dAtA[i] = 0x1a + } + { + size, err := m.Backend.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.Path) + copy(dAtA[i:], m.Path) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *HTTPIngressRuleValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HTTPIngressRuleValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HTTPIngressRuleValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Paths) > 0 { + for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Paths[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } func (m *IPBlock) Marshal() (dAtA []byte, err error) { @@ -379,6 +936,534 @@ func (m *IPBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Ingress) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Ingress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Ingress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IngressBackend) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressBackend) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressBackend) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Service != nil { + { + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.Resource != nil { + { + size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} + +func (m *IngressClass) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressClass) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IngressClassList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressClassList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IngressClassSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressClassSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressClassSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Parameters != nil { + { + size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IngressList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IngressRule) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressRule) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.IngressRuleValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.Host) + copy(dAtA[i:], m.Host) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IngressRuleValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressRuleValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressRuleValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HTTP != nil { + { + size, err := m.HTTP.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *IngressServiceBackend) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressServiceBackend) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressServiceBackend) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Port.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IngressSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IngressClassName != nil { + i -= len(*m.IngressClassName) + copy(dAtA[i:], *m.IngressClassName) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.IngressClassName))) + i-- + dAtA[i] = 0x22 + } + if len(m.Rules) > 0 { + for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.TLS) > 0 { + for iNdEx := len(m.TLS) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TLS[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.DefaultBackend != nil { + { + size, err := m.DefaultBackend.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *IngressStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.LoadBalancer.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *IngressTLS) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IngressTLS) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IngressTLS) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.SecretName) + copy(dAtA[i:], m.SecretName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretName))) + i-- + dAtA[i] = 0x12 + if len(m.Hosts) > 0 { + for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Hosts[iNdEx]) + copy(dAtA[i:], m.Hosts[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Hosts[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *NetworkPolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -742,6 +1827,37 @@ func (m *NetworkPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ServiceBackendPort) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceBackendPort) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceBackendPort) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i = encodeVarintGenerated(dAtA, i, uint64(m.Number)) + i-- + dAtA[i] = 0x10 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { offset -= sovGenerated(v) base := offset @@ -753,6 +1869,38 @@ func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *HTTPIngressPath) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Path) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Backend.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.PathType != nil { + l = len(*m.PathType) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *HTTPIngressRuleValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Paths) > 0 { + for _, e := range m.Paths { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func (m *IPBlock) Size() (n int) { if m == nil { return 0 @@ -770,6 +1918,196 @@ func (m *IPBlock) Size() (n int) { return n } +func (m *Ingress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *IngressBackend) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Resource != nil { + l = m.Resource.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Service != nil { + l = m.Service.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *IngressClass) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *IngressClassList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *IngressClassSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Controller) + n += 1 + l + sovGenerated(uint64(l)) + if m.Parameters != nil { + l = m.Parameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *IngressList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *IngressRule) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Host) + n += 1 + l + sovGenerated(uint64(l)) + l = m.IngressRuleValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *IngressRuleValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HTTP != nil { + l = m.HTTP.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *IngressServiceBackend) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Port.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *IngressSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DefaultBackend != nil { + l = m.DefaultBackend.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.TLS) > 0 { + for _, e := range m.TLS { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.IngressClassName != nil { + l = len(*m.IngressClassName) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *IngressStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.LoadBalancer.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *IngressTLS) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Hosts) > 0 { + for _, s := range m.Hosts { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.SecretName) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *NetworkPolicy) Size() (n int) { if m == nil { return 0 @@ -909,12 +2247,51 @@ func (m *NetworkPolicySpec) Size() (n int) { return n } +func (m *ServiceBackendPort) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Number)) + return n +} + func sovGenerated(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (this *HTTPIngressPath) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HTTPIngressPath{`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `Backend:` + strings.Replace(strings.Replace(this.Backend.String(), "IngressBackend", "IngressBackend", 1), `&`, ``, 1) + `,`, + `PathType:` + valueToStringGenerated(this.PathType) + `,`, + `}`, + }, "") + return s +} +func (this *HTTPIngressRuleValue) String() string { + if this == nil { + return "nil" + } + repeatedStringForPaths := "[]HTTPIngressPath{" + for _, f := range this.Paths { + repeatedStringForPaths += strings.Replace(strings.Replace(f.String(), "HTTPIngressPath", "HTTPIngressPath", 1), `&`, ``, 1) + "," + } + repeatedStringForPaths += "}" + s := strings.Join([]string{`&HTTPIngressRuleValue{`, + `Paths:` + repeatedStringForPaths + `,`, + `}`, + }, "") + return s +} func (this *IPBlock) String() string { if this == nil { return "nil" @@ -926,6 +2303,159 @@ func (this *IPBlock) String() string { }, "") return s } +func (this *Ingress) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Ingress{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IngressSpec", "IngressSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "IngressStatus", "IngressStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *IngressBackend) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IngressBackend{`, + `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "TypedLocalObjectReference", "v11.TypedLocalObjectReference", 1) + `,`, + `Service:` + strings.Replace(this.Service.String(), "IngressServiceBackend", "IngressServiceBackend", 1) + `,`, + `}`, + }, "") + return s +} +func (this *IngressClass) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IngressClass{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IngressClassSpec", "IngressClassSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *IngressClassList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]IngressClass{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "IngressClass", "IngressClass", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&IngressClassList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *IngressClassSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IngressClassSpec{`, + `Controller:` + fmt.Sprintf("%v", this.Controller) + `,`, + `Parameters:` + strings.Replace(fmt.Sprintf("%v", this.Parameters), "TypedLocalObjectReference", "v11.TypedLocalObjectReference", 1) + `,`, + `}`, + }, "") + return s +} +func (this *IngressList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]Ingress{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Ingress", "Ingress", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&IngressList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *IngressRule) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IngressRule{`, + `Host:` + fmt.Sprintf("%v", this.Host) + `,`, + `IngressRuleValue:` + strings.Replace(strings.Replace(this.IngressRuleValue.String(), "IngressRuleValue", "IngressRuleValue", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *IngressRuleValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IngressRuleValue{`, + `HTTP:` + strings.Replace(this.HTTP.String(), "HTTPIngressRuleValue", "HTTPIngressRuleValue", 1) + `,`, + `}`, + }, "") + return s +} +func (this *IngressServiceBackend) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IngressServiceBackend{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Port:` + strings.Replace(strings.Replace(this.Port.String(), "ServiceBackendPort", "ServiceBackendPort", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *IngressSpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForTLS := "[]IngressTLS{" + for _, f := range this.TLS { + repeatedStringForTLS += strings.Replace(strings.Replace(f.String(), "IngressTLS", "IngressTLS", 1), `&`, ``, 1) + "," + } + repeatedStringForTLS += "}" + repeatedStringForRules := "[]IngressRule{" + for _, f := range this.Rules { + repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "IngressRule", "IngressRule", 1), `&`, ``, 1) + "," + } + repeatedStringForRules += "}" + s := strings.Join([]string{`&IngressSpec{`, + `DefaultBackend:` + strings.Replace(this.DefaultBackend.String(), "IngressBackend", "IngressBackend", 1) + `,`, + `TLS:` + repeatedStringForTLS + `,`, + `Rules:` + repeatedStringForRules + `,`, + `IngressClassName:` + valueToStringGenerated(this.IngressClassName) + `,`, + `}`, + }, "") + return s +} +func (this *IngressStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IngressStatus{`, + `LoadBalancer:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LoadBalancer), "LoadBalancerStatus", "v11.LoadBalancerStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *IngressTLS) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IngressTLS{`, + `Hosts:` + fmt.Sprintf("%v", this.Hosts) + `,`, + `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`, + `}`, + }, "") + return s +} func (this *NetworkPolicy) String() string { if this == nil { return "nil" @@ -1041,6 +2571,17 @@ func (this *NetworkPolicySpec) String() string { }, "") return s } +func (this *ServiceBackendPort) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceBackendPort{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `}`, + }, "") + return s +} func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -1049,6 +2590,244 @@ func valueToStringGenerated(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } +func (m *HTTPIngressPath) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HTTPIngressPath: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPIngressPath: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Backend", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Backend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PathType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := PathType(dAtA[iNdEx:postIndex]) + m.PathType = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HTTPIngressRuleValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HTTPIngressRuleValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPIngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Paths = append(m.Paths, HTTPIngressPath{}) + if err := m.Paths[len(m.Paths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *IPBlock) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1166,6 +2945,1481 @@ func (m *IPBlock) Unmarshal(dAtA []byte) error { } return nil } +func (m *Ingress) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Ingress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ingress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressBackend) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressBackend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressBackend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resource == nil { + m.Resource = &v11.TypedLocalObjectReference{} + } + if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Service == nil { + m.Service = &IngressServiceBackend{} + } + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressClass) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressClassList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressClassList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressClassList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, IngressClass{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressClassSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressClassSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressClassSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Parameters == nil { + m.Parameters = &v11.TypedLocalObjectReference{} + } + if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Ingress{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressRule) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Host = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IngressRuleValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.IngressRuleValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressRuleValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressRuleValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HTTP == nil { + m.HTTP = &HTTPIngressRuleValue{} + } + if err := m.HTTP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressServiceBackend) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressServiceBackend: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressServiceBackend: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultBackend", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DefaultBackend == nil { + m.DefaultBackend = &IngressBackend{} + } + if err := m.DefaultBackend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TLS", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TLS = append(m.TLS, IngressTLS{}) + if err := m.TLS[len(m.TLS)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, IngressRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IngressClassName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.IngressClassName = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IngressTLS) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IngressTLS: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IngressTLS: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SecretName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2116,6 +5370,110 @@ func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error { } return nil } +func (m *ServiceBackendPort) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceBackendPort: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceBackendPort: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/vendor/k8s.io/api/networking/v1/generated.proto b/vendor/k8s.io/api/networking/v1/generated.proto index f2aa96900c5..a98ef94c860 100644 --- a/vendor/k8s.io/api/networking/v1/generated.proto +++ b/vendor/k8s.io/api/networking/v1/generated.proto @@ -30,6 +30,48 @@ import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; +// HTTPIngressPath associates a path with a backend. Incoming urls matching the +// path are forwarded to the backend. +message HTTPIngressPath { + // Path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/'. When unspecified, + // all paths from incoming requests are matched. + // +optional + optional string path = 1; + + // PathType determines the interpretation of the Path matching. PathType can + // be one of the following values: + // * Exact: Matches the URL path exactly. + // * Prefix: Matches based on a URL path prefix split by '/'. Matching is + // done on a path element by element basis. A path element refers is the + // list of labels in the path split by the '/' separator. A request is a + // match for path p if every p is an element-wise prefix of p of the + // request path. Note that if the last element of the path is a substring + // of the last element in request path, it is not a match (e.g. /foo/bar + // matches /foo/bar/baz, but does not match /foo/barbaz). + // * ImplementationSpecific: Interpretation of the Path matching is up to + // the IngressClass. Implementations can treat this as a separate PathType + // or treat it identically to Prefix or Exact path types. + // Implementations are required to support all path types. + optional string pathType = 3; + + // Backend defines the referenced service endpoint to which the traffic + // will be forwarded to. + optional IngressBackend backend = 2; +} + +// HTTPIngressRuleValue is a list of http selectors pointing to backends. +// In the example: http:///? -> backend where +// where parts of the url correspond to RFC 3986, this resource will be used +// to match against everything after the last '/' and before the first '?' +// or '#'. +message HTTPIngressRuleValue { + // A collection of paths that map requests to backends. + // +listType=atomic + repeated HTTPIngressPath paths = 1; +} + // IPBlock describes a particular CIDR (Ex. "192.168.1.1/24","2001:db9::/64") that is allowed // to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs // that should not be included within this rule. @@ -45,6 +87,219 @@ message IPBlock { repeated string except = 2; } +// Ingress is a collection of rules that allow inbound connections to reach the +// endpoints defined by a backend. An Ingress can be configured to give services +// externally-reachable urls, load balance traffic, terminate SSL, offer name +// based virtual hosting etc. +message Ingress { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec is the desired state of the Ingress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + optional IngressSpec spec = 2; + + // Status is the current state of the Ingress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + optional IngressStatus status = 3; +} + +// IngressBackend describes all endpoints for a given service and port. +message IngressBackend { + // Service references a Service as a Backend. + // This is a mutually exclusive setting with "Resource". + // +optional + optional IngressServiceBackend service = 4; + + // Resource is an ObjectRef to another Kubernetes resource in the namespace + // of the Ingress object. If resource is specified, a service.Name and + // service.Port must not be specified. + // This is a mutually exclusive setting with "Service". + // +optional + optional k8s.io.api.core.v1.TypedLocalObjectReference resource = 3; +} + +// IngressClass represents the class of the Ingress, referenced by the Ingress +// Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be +// used to indicate that an IngressClass should be considered default. When a +// single IngressClass resource has this annotation set to true, new Ingress +// resources without a class specified will be assigned this default class. +message IngressClass { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec is the desired state of the IngressClass. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + optional IngressClassSpec spec = 2; +} + +// IngressClassList is a collection of IngressClasses. +message IngressClassList { + // Standard list metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of IngressClasses. + repeated IngressClass items = 2; +} + +// IngressClassSpec provides information about the class of an Ingress. +message IngressClassSpec { + // Controller refers to the name of the controller that should handle this + // class. This allows for different "flavors" that are controlled by the + // same controller. For example, you may have different Parameters for the + // same implementing controller. This should be specified as a + // domain-prefixed path no more than 250 characters in length, e.g. + // "acme.io/ingress-controller". This field is immutable. + optional string controller = 1; + + // Parameters is a link to a custom resource containing additional + // configuration for the controller. This is optional if the controller does + // not require extra parameters. + // +optional + optional k8s.io.api.core.v1.TypedLocalObjectReference parameters = 2; +} + +// IngressList is a collection of Ingress. +message IngressList { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of Ingress. + repeated Ingress items = 2; +} + +// IngressRule represents the rules mapping the paths under a specified host to +// the related backend services. Incoming requests are first evaluated for a host +// match, then routed to the backend associated with the matching IngressRuleValue. +message IngressRule { + // Host is the fully qualified domain name of a network host, as defined by RFC 3986. + // Note the following deviations from the "host" part of the + // URI as defined in RFC 3986: + // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + // the IP in the Spec of the parent Ingress. + // 2. The `:` delimiter is not respected because ports are not allowed. + // Currently the port of an Ingress is implicitly :80 for http and + // :443 for https. + // Both these may change in the future. + // Incoming requests are matched against the host before the + // IngressRuleValue. If the host is unspecified, the Ingress routes all + // traffic based on the specified IngressRuleValue. + // + // Host can be "precise" which is a domain name without the terminating dot of + // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name + // prefixed with a single wildcard label (e.g. "*.foo.com"). + // The wildcard character '*' must appear by itself as the first DNS label and + // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). + // Requests will be matched against the Host field in the following way: + // 1. If Host is precise, the request matches this rule if the http host header is equal to Host. + // 2. If Host is a wildcard, then the request matches this rule if the http host header + // is to equal to the suffix (removing the first label) of the wildcard rule. + // +optional + optional string host = 1; + + // IngressRuleValue represents a rule to route requests for this IngressRule. + // If unspecified, the rule defaults to a http catch-all. Whether that sends + // just traffic matching the host to the default backend or all traffic to the + // default backend, is left to the controller fulfilling the Ingress. Http is + // currently the only supported IngressRuleValue. + // +optional + optional IngressRuleValue ingressRuleValue = 2; +} + +// IngressRuleValue represents a rule to apply against incoming requests. If the +// rule is satisfied, the request is routed to the specified backend. Currently +// mixing different types of rules in a single Ingress is disallowed, so exactly +// one of the following must be set. +message IngressRuleValue { + // +optional + optional HTTPIngressRuleValue http = 1; +} + +// IngressServiceBackend references a Kubernetes Service as a Backend. +message IngressServiceBackend { + // Name is the referenced service. The service must exist in + // the same namespace as the Ingress object. + optional string name = 1; + + // Port of the referenced service. A port name or port number + // is required for a IngressServiceBackend. + optional ServiceBackendPort port = 2; +} + +// IngressSpec describes the Ingress the user wishes to exist. +message IngressSpec { + // IngressClassName is the name of the IngressClass cluster resource. The + // associated IngressClass defines which controller will implement the + // resource. This replaces the deprecated `kubernetes.io/ingress.class` + // annotation. For backwards compatibility, when that annotation is set, it + // must be given precedence over this field. The controller may emit a + // warning if the field and annotation have different values. + // Implementations of this API should ignore Ingresses without a class + // specified. An IngressClass resource may be marked as default, which can + // be used to set a default value for this field. For more information, + // refer to the IngressClass documentation. + // +optional + optional string ingressClassName = 4; + + // DefaultBackend is the backend that should handle requests that don't + // match any rule. If Rules are not specified, DefaultBackend must be specified. + // If DefaultBackend is not set, the handling of requests that do not match any + // of the rules will be up to the Ingress controller. + // +optional + optional IngressBackend defaultBackend = 1; + + // TLS configuration. Currently the Ingress only supports a single TLS + // port, 443. If multiple members of this list specify different hosts, they + // will be multiplexed on the same port according to the hostname specified + // through the SNI TLS extension, if the ingress controller fulfilling the + // ingress supports SNI. + // +listType=atomic + // +optional + repeated IngressTLS tls = 2; + + // A list of host rules used to configure the Ingress. If unspecified, or + // no rule matches, all traffic is sent to the default backend. + // +listType=atomic + // +optional + repeated IngressRule rules = 3; +} + +// IngressStatus describe the current state of the Ingress. +message IngressStatus { + // LoadBalancer contains the current status of the load-balancer. + // +optional + optional k8s.io.api.core.v1.LoadBalancerStatus loadBalancer = 1; +} + +// IngressTLS describes the transport layer security associated with an Ingress. +message IngressTLS { + // Hosts are a list of hosts included in the TLS certificate. The values in + // this list must match the name/s used in the tlsSecret. Defaults to the + // wildcard host setting for the loadbalancer controller fulfilling this + // Ingress, if left unspecified. + // +listType=atomic + // +optional + repeated string hosts = 1; + + // SecretName is the name of the secret used to terminate TLS traffic on + // port 443. Field is left optional to allow TLS routing based on SNI + // hostname alone. If the SNI host in a listener conflicts with the "Host" + // header field used by an IngressRule, the SNI host is used for termination + // and value of the Host header is used for routing. + // +optional + optional string secretName = 2; +} + // NetworkPolicy describes what network traffic is allowed for a set of Pods message NetworkPolicy { // Standard object's metadata. @@ -109,7 +364,7 @@ message NetworkPolicyList { repeated NetworkPolicy items = 2; } -// NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of +// NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of // fields are allowed message NetworkPolicyPeer { // This is a label selector which selects Pods. This field follows standard label @@ -193,3 +448,16 @@ message NetworkPolicySpec { repeated string policyTypes = 4; } +// ServiceBackendPort is the service port being referenced. +message ServiceBackendPort { + // Name is the name of the port on the Service. + // This is a mutually exclusive setting with "Number". + // +optional + optional string name = 1; + + // Number is the numerical port number (e.g. 80) on the Service. + // This is a mutually exclusive setting with "Name". + // +optional + optional int32 number = 2; +} + diff --git a/vendor/k8s.io/api/networking/v1/register.go b/vendor/k8s.io/api/networking/v1/register.go index f47f22e9e88..a200d54370c 100644 --- a/vendor/k8s.io/api/networking/v1/register.go +++ b/vendor/k8s.io/api/networking/v1/register.go @@ -44,6 +44,10 @@ var ( // Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, + &Ingress{}, + &IngressList{}, + &IngressClass{}, + &IngressClassList{}, &NetworkPolicy{}, &NetworkPolicyList{}, ) diff --git a/vendor/k8s.io/api/networking/v1/types.go b/vendor/k8s.io/api/networking/v1/types.go index 73580a50cfb..df2569089c7 100644 --- a/vendor/k8s.io/api/networking/v1/types.go +++ b/vendor/k8s.io/api/networking/v1/types.go @@ -161,7 +161,7 @@ type IPBlock struct { Except []string `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"` } -// NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of +// NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of // fields are allowed type NetworkPolicyPeer struct { // This is a label selector which selects Pods. This field follows standard label @@ -201,3 +201,314 @@ type NetworkPolicyList struct { // Items is a list of schema objects. Items []NetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` } + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Ingress is a collection of rules that allow inbound connections to reach the +// endpoints defined by a backend. An Ingress can be configured to give services +// externally-reachable urls, load balance traffic, terminate SSL, offer name +// based virtual hosting etc. +type Ingress struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec is the desired state of the Ingress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + Spec IngressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + // Status is the current state of the Ingress. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + Status IngressStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IngressList is a collection of Ingress. +type IngressList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of Ingress. + Items []Ingress `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// IngressSpec describes the Ingress the user wishes to exist. +type IngressSpec struct { + // IngressClassName is the name of the IngressClass cluster resource. The + // associated IngressClass defines which controller will implement the + // resource. This replaces the deprecated `kubernetes.io/ingress.class` + // annotation. For backwards compatibility, when that annotation is set, it + // must be given precedence over this field. The controller may emit a + // warning if the field and annotation have different values. + // Implementations of this API should ignore Ingresses without a class + // specified. An IngressClass resource may be marked as default, which can + // be used to set a default value for this field. For more information, + // refer to the IngressClass documentation. + // +optional + IngressClassName *string `json:"ingressClassName,omitempty" protobuf:"bytes,4,opt,name=ingressClassName"` + + // DefaultBackend is the backend that should handle requests that don't + // match any rule. If Rules are not specified, DefaultBackend must be specified. + // If DefaultBackend is not set, the handling of requests that do not match any + // of the rules will be up to the Ingress controller. + // +optional + DefaultBackend *IngressBackend `json:"defaultBackend,omitempty" protobuf:"bytes,1,opt,name=defaultBackend"` + + // TLS configuration. Currently the Ingress only supports a single TLS + // port, 443. If multiple members of this list specify different hosts, they + // will be multiplexed on the same port according to the hostname specified + // through the SNI TLS extension, if the ingress controller fulfilling the + // ingress supports SNI. + // +listType=atomic + // +optional + TLS []IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"` + + // A list of host rules used to configure the Ingress. If unspecified, or + // no rule matches, all traffic is sent to the default backend. + // +listType=atomic + // +optional + Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` +} + +// IngressTLS describes the transport layer security associated with an Ingress. +type IngressTLS struct { + // Hosts are a list of hosts included in the TLS certificate. The values in + // this list must match the name/s used in the tlsSecret. Defaults to the + // wildcard host setting for the loadbalancer controller fulfilling this + // Ingress, if left unspecified. + // +listType=atomic + // +optional + Hosts []string `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"` + // SecretName is the name of the secret used to terminate TLS traffic on + // port 443. Field is left optional to allow TLS routing based on SNI + // hostname alone. If the SNI host in a listener conflicts with the "Host" + // header field used by an IngressRule, the SNI host is used for termination + // and value of the Host header is used for routing. + // +optional + SecretName string `json:"secretName,omitempty" protobuf:"bytes,2,opt,name=secretName"` +} + +// IngressStatus describe the current state of the Ingress. +type IngressStatus struct { + // LoadBalancer contains the current status of the load-balancer. + // +optional + LoadBalancer v1.LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"` +} + +// IngressRule represents the rules mapping the paths under a specified host to +// the related backend services. Incoming requests are first evaluated for a host +// match, then routed to the backend associated with the matching IngressRuleValue. +type IngressRule struct { + // Host is the fully qualified domain name of a network host, as defined by RFC 3986. + // Note the following deviations from the "host" part of the + // URI as defined in RFC 3986: + // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + // the IP in the Spec of the parent Ingress. + // 2. The `:` delimiter is not respected because ports are not allowed. + // Currently the port of an Ingress is implicitly :80 for http and + // :443 for https. + // Both these may change in the future. + // Incoming requests are matched against the host before the + // IngressRuleValue. If the host is unspecified, the Ingress routes all + // traffic based on the specified IngressRuleValue. + // + // Host can be "precise" which is a domain name without the terminating dot of + // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name + // prefixed with a single wildcard label (e.g. "*.foo.com"). + // The wildcard character '*' must appear by itself as the first DNS label and + // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). + // Requests will be matched against the Host field in the following way: + // 1. If Host is precise, the request matches this rule if the http host header is equal to Host. + // 2. If Host is a wildcard, then the request matches this rule if the http host header + // is to equal to the suffix (removing the first label) of the wildcard rule. + // +optional + Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"` + // IngressRuleValue represents a rule to route requests for this IngressRule. + // If unspecified, the rule defaults to a http catch-all. Whether that sends + // just traffic matching the host to the default backend or all traffic to the + // default backend, is left to the controller fulfilling the Ingress. Http is + // currently the only supported IngressRuleValue. + // +optional + IngressRuleValue `json:",inline,omitempty" protobuf:"bytes,2,opt,name=ingressRuleValue"` +} + +// IngressRuleValue represents a rule to apply against incoming requests. If the +// rule is satisfied, the request is routed to the specified backend. Currently +// mixing different types of rules in a single Ingress is disallowed, so exactly +// one of the following must be set. +type IngressRuleValue struct { + // +optional + HTTP *HTTPIngressRuleValue `json:"http,omitempty" protobuf:"bytes,1,opt,name=http"` +} + +// HTTPIngressRuleValue is a list of http selectors pointing to backends. +// In the example: http:///? -> backend where +// where parts of the url correspond to RFC 3986, this resource will be used +// to match against everything after the last '/' and before the first '?' +// or '#'. +type HTTPIngressRuleValue struct { + // A collection of paths that map requests to backends. + // +listType=atomic + Paths []HTTPIngressPath `json:"paths" protobuf:"bytes,1,rep,name=paths"` +} + +// PathType represents the type of path referred to by a HTTPIngressPath. +type PathType string + +const ( + // PathTypeExact matches the URL path exactly and with case sensitivity. + PathTypeExact = PathType("Exact") + + // PathTypePrefix matches based on a URL path prefix split by '/'. Matching + // is case sensitive and done on a path element by element basis. A path + // element refers to the list of labels in the path split by the '/' + // separator. A request is a match for path p if every p is an element-wise + // prefix of p of the request path. Note that if the last element of the + // path is a substring of the last element in request path, it is not a + // match (e.g. /foo/bar matches /foo/bar/baz, but does not match + // /foo/barbaz). If multiple matching paths exist in an Ingress spec, the + // longest matching path is given priority. + // Examples: + // - /foo/bar does not match requests to /foo/barbaz + // - /foo/bar matches request to /foo/bar and /foo/bar/baz + // - /foo and /foo/ both match requests to /foo and /foo/. If both paths are + // present in an Ingress spec, the longest matching path (/foo/) is given + // priority. + PathTypePrefix = PathType("Prefix") + + // PathTypeImplementationSpecific matching is up to the IngressClass. + // Implementations can treat this as a separate PathType or treat it + // identically to Prefix or Exact path types. + PathTypeImplementationSpecific = PathType("ImplementationSpecific") +) + +// HTTPIngressPath associates a path with a backend. Incoming urls matching the +// path are forwarded to the backend. +type HTTPIngressPath struct { + // Path is matched against the path of an incoming request. Currently it can + // contain characters disallowed from the conventional "path" part of a URL + // as defined by RFC 3986. Paths must begin with a '/'. When unspecified, + // all paths from incoming requests are matched. + // +optional + Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` + + // PathType determines the interpretation of the Path matching. PathType can + // be one of the following values: + // * Exact: Matches the URL path exactly. + // * Prefix: Matches based on a URL path prefix split by '/'. Matching is + // done on a path element by element basis. A path element refers is the + // list of labels in the path split by the '/' separator. A request is a + // match for path p if every p is an element-wise prefix of p of the + // request path. Note that if the last element of the path is a substring + // of the last element in request path, it is not a match (e.g. /foo/bar + // matches /foo/bar/baz, but does not match /foo/barbaz). + // * ImplementationSpecific: Interpretation of the Path matching is up to + // the IngressClass. Implementations can treat this as a separate PathType + // or treat it identically to Prefix or Exact path types. + // Implementations are required to support all path types. + PathType *PathType `json:"pathType,omitempty" protobuf:"bytes,3,opt,name=pathType"` + + // Backend defines the referenced service endpoint to which the traffic + // will be forwarded to. + Backend IngressBackend `json:"backend" protobuf:"bytes,2,opt,name=backend"` +} + +// IngressBackend describes all endpoints for a given service and port. +type IngressBackend struct { + // Service references a Service as a Backend. + // This is a mutually exclusive setting with "Resource". + // +optional + Service *IngressServiceBackend `json:"service,omitempty" protobuf:"bytes,4,opt,name=service"` + + // Resource is an ObjectRef to another Kubernetes resource in the namespace + // of the Ingress object. If resource is specified, a service.Name and + // service.Port must not be specified. + // This is a mutually exclusive setting with "Service". + // +optional + Resource *v1.TypedLocalObjectReference `json:"resource,omitempty" protobuf:"bytes,3,opt,name=resource"` +} + +// IngressServiceBackend references a Kubernetes Service as a Backend. +type IngressServiceBackend struct { + // Name is the referenced service. The service must exist in + // the same namespace as the Ingress object. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + + // Port of the referenced service. A port name or port number + // is required for a IngressServiceBackend. + Port ServiceBackendPort `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"` +} + +// ServiceBackendPort is the service port being referenced. +type ServiceBackendPort struct { + // Name is the name of the port on the Service. + // This is a mutually exclusive setting with "Number". + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` + + // Number is the numerical port number (e.g. 80) on the Service. + // This is a mutually exclusive setting with "Name". + // +optional + Number int32 `json:"number,omitempty" protobuf:"bytes,2,opt,name=number"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IngressClass represents the class of the Ingress, referenced by the Ingress +// Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be +// used to indicate that an IngressClass should be considered default. When a +// single IngressClass resource has this annotation set to true, new Ingress +// resources without a class specified will be assigned this default class. +type IngressClass struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec is the desired state of the IngressClass. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + Spec IngressClassSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// IngressClassSpec provides information about the class of an Ingress. +type IngressClassSpec struct { + // Controller refers to the name of the controller that should handle this + // class. This allows for different "flavors" that are controlled by the + // same controller. For example, you may have different Parameters for the + // same implementing controller. This should be specified as a + // domain-prefixed path no more than 250 characters in length, e.g. + // "acme.io/ingress-controller". This field is immutable. + Controller string `json:"controller,omitempty" protobuf:"bytes,1,opt,name=controller"` + + // Parameters is a link to a custom resource containing additional + // configuration for the controller. This is optional if the controller does + // not require extra parameters. + // +optional + Parameters *v1.TypedLocalObjectReference `json:"parameters,omitempty" protobuf:"bytes,2,opt,name=parameters"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IngressClassList is a collection of IngressClasses. +type IngressClassList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of IngressClasses. + Items []IngressClass `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go index b404e5b1169..41b9b3fb6bd 100644 --- a/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go @@ -27,6 +27,26 @@ package v1 // Those methods can be generated by using hack/update-generated-swagger-docs.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_HTTPIngressPath = map[string]string{ + "": "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", + "path": "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. When unspecified, all paths from incoming requests are matched.", + "pathType": "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types.", + "backend": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", +} + +func (HTTPIngressPath) SwaggerDoc() map[string]string { + return map_HTTPIngressPath +} + +var map_HTTPIngressRuleValue = map[string]string{ + "": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", + "paths": "A collection of paths that map requests to backends.", +} + +func (HTTPIngressRuleValue) SwaggerDoc() map[string]string { + return map_HTTPIngressRuleValue +} + var map_IPBlock = map[string]string{ "": "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", "cidr": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"", @@ -37,6 +57,125 @@ func (IPBlock) SwaggerDoc() map[string]string { return map_IPBlock } +var map_Ingress = map[string]string{ + "": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", +} + +func (Ingress) SwaggerDoc() map[string]string { + return map_Ingress +} + +var map_IngressBackend = map[string]string{ + "": "IngressBackend describes all endpoints for a given service and port.", + "service": "Service references a Service as a Backend. This is a mutually exclusive setting with \"Resource\".", + "resource": "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\".", +} + +func (IngressBackend) SwaggerDoc() map[string]string { + return map_IngressBackend +} + +var map_IngressClass = map[string]string{ + "": "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", +} + +func (IngressClass) SwaggerDoc() map[string]string { + return map_IngressClass +} + +var map_IngressClassList = map[string]string{ + "": "IngressClassList is a collection of IngressClasses.", + "metadata": "Standard list metadata.", + "items": "Items is the list of IngressClasses.", +} + +func (IngressClassList) SwaggerDoc() map[string]string { + return map_IngressClassList +} + +var map_IngressClassSpec = map[string]string{ + "": "IngressClassSpec provides information about the class of an Ingress.", + "controller": "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", + "parameters": "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", +} + +func (IngressClassSpec) SwaggerDoc() map[string]string { + return map_IngressClassSpec +} + +var map_IngressList = map[string]string{ + "": "IngressList is a collection of Ingress.", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "Items is the list of Ingress.", +} + +func (IngressList) SwaggerDoc() map[string]string { + return map_IngressList +} + +var map_IngressRule = map[string]string{ + "": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + "host": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", +} + +func (IngressRule) SwaggerDoc() map[string]string { + return map_IngressRule +} + +var map_IngressRuleValue = map[string]string{ + "": "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.", +} + +func (IngressRuleValue) SwaggerDoc() map[string]string { + return map_IngressRuleValue +} + +var map_IngressServiceBackend = map[string]string{ + "": "IngressServiceBackend references a Kubernetes Service as a Backend.", + "name": "Name is the referenced service. The service must exist in the same namespace as the Ingress object.", + "port": "Port of the referenced service. A port name or port number is required for a IngressServiceBackend.", +} + +func (IngressServiceBackend) SwaggerDoc() map[string]string { + return map_IngressServiceBackend +} + +var map_IngressSpec = map[string]string{ + "": "IngressSpec describes the Ingress the user wishes to exist.", + "ingressClassName": "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", + "defaultBackend": "DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.", + "tls": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + "rules": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", +} + +func (IngressSpec) SwaggerDoc() map[string]string { + return map_IngressSpec +} + +var map_IngressStatus = map[string]string{ + "": "IngressStatus describe the current state of the Ingress.", + "loadBalancer": "LoadBalancer contains the current status of the load-balancer.", +} + +func (IngressStatus) SwaggerDoc() map[string]string { + return map_IngressStatus +} + +var map_IngressTLS = map[string]string{ + "": "IngressTLS describes the transport layer security associated with an Ingress.", + "hosts": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + "secretName": "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", +} + +func (IngressTLS) SwaggerDoc() map[string]string { + return map_IngressTLS +} + var map_NetworkPolicy = map[string]string{ "": "NetworkPolicy describes what network traffic is allowed for a set of Pods", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", @@ -78,7 +217,7 @@ func (NetworkPolicyList) SwaggerDoc() map[string]string { } var map_NetworkPolicyPeer = map[string]string{ - "": "NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed", + "": "NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed", "podSelector": "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.", "namespaceSelector": "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.", "ipBlock": "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", @@ -110,4 +249,14 @@ func (NetworkPolicySpec) SwaggerDoc() map[string]string { return map_NetworkPolicySpec } +var map_ServiceBackendPort = map[string]string{ + "": "ServiceBackendPort is the service port being referenced.", + "name": "Name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".", + "number": "Number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with \"Name\".", +} + +func (ServiceBackendPort) SwaggerDoc() map[string]string { + return map_ServiceBackendPort +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go index 1833e9782cd..b17e7892771 100644 --- a/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go @@ -27,6 +27,51 @@ import ( intstr "k8s.io/apimachinery/pkg/util/intstr" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HTTPIngressPath) DeepCopyInto(out *HTTPIngressPath) { + *out = *in + if in.PathType != nil { + in, out := &in.PathType, &out.PathType + *out = new(PathType) + **out = **in + } + in.Backend.DeepCopyInto(&out.Backend) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPIngressPath. +func (in *HTTPIngressPath) DeepCopy() *HTTPIngressPath { + if in == nil { + return nil + } + out := new(HTTPIngressPath) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HTTPIngressRuleValue) DeepCopyInto(out *HTTPIngressRuleValue) { + *out = *in + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]HTTPIngressPath, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPIngressRuleValue. +func (in *HTTPIngressRuleValue) DeepCopy() *HTTPIngressRuleValue { + if in == nil { + return nil + } + out := new(HTTPIngressRuleValue) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IPBlock) DeepCopyInto(out *IPBlock) { *out = *in @@ -48,6 +93,307 @@ func (in *IPBlock) DeepCopy() *IPBlock { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Ingress) DeepCopyInto(out *Ingress) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ingress. +func (in *Ingress) DeepCopy() *Ingress { + if in == nil { + return nil + } + out := new(Ingress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Ingress) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressBackend) DeepCopyInto(out *IngressBackend) { + *out = *in + if in.Service != nil { + in, out := &in.Service, &out.Service + *out = new(IngressServiceBackend) + **out = **in + } + if in.Resource != nil { + in, out := &in.Resource, &out.Resource + *out = new(corev1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressBackend. +func (in *IngressBackend) DeepCopy() *IngressBackend { + if in == nil { + return nil + } + out := new(IngressBackend) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressClass) DeepCopyInto(out *IngressClass) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressClass. +func (in *IngressClass) DeepCopy() *IngressClass { + if in == nil { + return nil + } + out := new(IngressClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressClass) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressClassList) DeepCopyInto(out *IngressClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]IngressClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressClassList. +func (in *IngressClassList) DeepCopy() *IngressClassList { + if in == nil { + return nil + } + out := new(IngressClassList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressClassList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressClassSpec) DeepCopyInto(out *IngressClassSpec) { + *out = *in + if in.Parameters != nil { + in, out := &in.Parameters, &out.Parameters + *out = new(corev1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressClassSpec. +func (in *IngressClassSpec) DeepCopy() *IngressClassSpec { + if in == nil { + return nil + } + out := new(IngressClassSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressList) DeepCopyInto(out *IngressList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Ingress, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressList. +func (in *IngressList) DeepCopy() *IngressList { + if in == nil { + return nil + } + out := new(IngressList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressRule) DeepCopyInto(out *IngressRule) { + *out = *in + in.IngressRuleValue.DeepCopyInto(&out.IngressRuleValue) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRule. +func (in *IngressRule) DeepCopy() *IngressRule { + if in == nil { + return nil + } + out := new(IngressRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressRuleValue) DeepCopyInto(out *IngressRuleValue) { + *out = *in + if in.HTTP != nil { + in, out := &in.HTTP, &out.HTTP + *out = new(HTTPIngressRuleValue) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRuleValue. +func (in *IngressRuleValue) DeepCopy() *IngressRuleValue { + if in == nil { + return nil + } + out := new(IngressRuleValue) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressServiceBackend) DeepCopyInto(out *IngressServiceBackend) { + *out = *in + out.Port = in.Port + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressServiceBackend. +func (in *IngressServiceBackend) DeepCopy() *IngressServiceBackend { + if in == nil { + return nil + } + out := new(IngressServiceBackend) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressSpec) DeepCopyInto(out *IngressSpec) { + *out = *in + if in.IngressClassName != nil { + in, out := &in.IngressClassName, &out.IngressClassName + *out = new(string) + **out = **in + } + if in.DefaultBackend != nil { + in, out := &in.DefaultBackend, &out.DefaultBackend + *out = new(IngressBackend) + (*in).DeepCopyInto(*out) + } + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = make([]IngressTLS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]IngressRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressSpec. +func (in *IngressSpec) DeepCopy() *IngressSpec { + if in == nil { + return nil + } + out := new(IngressSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressStatus) DeepCopyInto(out *IngressStatus) { + *out = *in + in.LoadBalancer.DeepCopyInto(&out.LoadBalancer) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressStatus. +func (in *IngressStatus) DeepCopy() *IngressStatus { + if in == nil { + return nil + } + out := new(IngressStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressTLS) DeepCopyInto(out *IngressTLS) { + *out = *in + if in.Hosts != nil { + in, out := &in.Hosts, &out.Hosts + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressTLS. +func (in *IngressTLS) DeepCopy() *IngressTLS { + if in == nil { + return nil + } + out := new(IngressTLS) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NetworkPolicy) DeepCopyInto(out *NetworkPolicy) { *out = *in @@ -260,3 +606,19 @@ func (in *NetworkPolicySpec) DeepCopy() *NetworkPolicySpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceBackendPort) DeepCopyInto(out *ServiceBackendPort) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceBackendPort. +func (in *ServiceBackendPort) DeepCopy() *ServiceBackendPort { + if in == nil { + return nil + } + out := new(ServiceBackendPort) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/api/networking/v1beta1/BUILD b/vendor/k8s.io/api/networking/v1beta1/BUILD index b2bf5091fb3..5f3cfa19301 100644 --- a/vendor/k8s.io/api/networking/v1beta1/BUILD +++ b/vendor/k8s.io/api/networking/v1beta1/BUILD @@ -15,6 +15,7 @@ go_library( "types_swagger_doc_generated.go", "well_known_annotations.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/networking/v1beta1", importpath = "k8s.io/api/networking/v1beta1", diff --git a/vendor/k8s.io/api/networking/v1beta1/doc.go b/vendor/k8s.io/api/networking/v1beta1/doc.go index 12d3d4ff06c..fa6d01cea0c 100644 --- a/vendor/k8s.io/api/networking/v1beta1/doc.go +++ b/vendor/k8s.io/api/networking/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=networking.k8s.io package v1beta1 // import "k8s.io/api/networking/v1beta1" diff --git a/vendor/k8s.io/api/networking/v1beta1/generated.proto b/vendor/k8s.io/api/networking/v1beta1/generated.proto index 68bede81fbb..a97c318db0e 100644 --- a/vendor/k8s.io/api/networking/v1beta1/generated.proto +++ b/vendor/k8s.io/api/networking/v1beta1/generated.proto @@ -134,7 +134,6 @@ message IngressClassList { optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // Items is the list of IngressClasses. - // +listType=set repeated IngressClass items = 2; } diff --git a/vendor/k8s.io/api/networking/v1beta1/types.go b/vendor/k8s.io/api/networking/v1beta1/types.go index 46f530bfae7..ef9bd4d67d6 100644 --- a/vendor/k8s.io/api/networking/v1beta1/types.go +++ b/vendor/k8s.io/api/networking/v1beta1/types.go @@ -17,13 +17,16 @@ limitations under the License. package v1beta1 import ( - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" ) // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.14 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=networking.k8s.io,v1,Ingress // Ingress is a collection of rules that allow inbound connections to reach the // endpoints defined by a backend. An Ingress can be configured to give services @@ -48,6 +51,9 @@ type Ingress struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.14 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=networking.k8s.io,v1,IngressList // IngressList is a collection of Ingress. type IngressList struct { @@ -269,6 +275,9 @@ type IngressBackend struct { // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.18 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=networking.k8s.io,v1,IngressClassList // IngressClass represents the class of the Ingress, referenced by the Ingress // Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be @@ -306,6 +315,9 @@ type IngressClassSpec struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.18 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=networking.k8s.io,v1,IngressClassList // IngressClassList is a collection of IngressClasses. type IngressClassList struct { @@ -315,6 +327,5 @@ type IngressClassList struct { metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of IngressClasses. - // +listType=set Items []IngressClass `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/k8s.io/api/networking/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/networking/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..5e69fd5d9f4 --- /dev/null +++ b/vendor/k8s.io/api/networking/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,121 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Ingress) APILifecycleIntroduced() (major, minor int) { + return 1, 14 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Ingress) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Ingress) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "Ingress"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Ingress) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *IngressClass) APILifecycleIntroduced() (major, minor int) { + return 1, 18 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *IngressClass) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *IngressClass) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "IngressClassList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *IngressClass) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *IngressClassList) APILifecycleIntroduced() (major, minor int) { + return 1, 18 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *IngressClassList) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *IngressClassList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "IngressClassList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *IngressClassList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *IngressList) APILifecycleIntroduced() (major, minor int) { + return 1, 14 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *IngressList) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *IngressList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "IngressList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *IngressList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/api/node/v1beta1/BUILD b/vendor/k8s.io/api/node/v1beta1/BUILD index cfe913d48e3..def962d16ec 100644 --- a/vendor/k8s.io/api/node/v1beta1/BUILD +++ b/vendor/k8s.io/api/node/v1beta1/BUILD @@ -9,6 +9,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/node/v1beta1", importpath = "k8s.io/api/node/v1beta1", diff --git a/vendor/k8s.io/api/node/v1beta1/doc.go b/vendor/k8s.io/api/node/v1beta1/doc.go index e87583cea93..c76ba89c48f 100644 --- a/vendor/k8s.io/api/node/v1beta1/doc.go +++ b/vendor/k8s.io/api/node/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=node.k8s.io diff --git a/vendor/k8s.io/api/node/v1beta1/types.go b/vendor/k8s.io/api/node/v1beta1/types.go index 793a48f62b6..1d2b96312e4 100644 --- a/vendor/k8s.io/api/node/v1beta1/types.go +++ b/vendor/k8s.io/api/node/v1beta1/types.go @@ -24,6 +24,8 @@ import ( // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.13 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // RuntimeClass defines a class of container runtime supported in the cluster. // The RuntimeClass is used to determine which container runtime is used to run @@ -92,6 +94,8 @@ type Scheduling struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.13 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // RuntimeClassList is a list of RuntimeClass objects. type RuntimeClassList struct { diff --git a/vendor/k8s.io/api/node/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/node/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..2fda72ef5e5 --- /dev/null +++ b/vendor/k8s.io/api/node/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,57 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *RuntimeClass) APILifecycleIntroduced() (major, minor int) { + return 1, 13 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *RuntimeClass) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *RuntimeClass) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *RuntimeClassList) APILifecycleIntroduced() (major, minor int) { + return 1, 13 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *RuntimeClassList) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *RuntimeClassList) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} diff --git a/vendor/k8s.io/api/policy/v1beta1/BUILD b/vendor/k8s.io/api/policy/v1beta1/BUILD index 15947b15e63..95c1333f67f 100644 --- a/vendor/k8s.io/api/policy/v1beta1/BUILD +++ b/vendor/k8s.io/api/policy/v1beta1/BUILD @@ -14,6 +14,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/policy/v1beta1", importpath = "k8s.io/api/policy/v1beta1", diff --git a/vendor/k8s.io/api/policy/v1beta1/doc.go b/vendor/k8s.io/api/policy/v1beta1/doc.go index 05d8332f807..9e9c7d13abc 100644 --- a/vendor/k8s.io/api/policy/v1beta1/doc.go +++ b/vendor/k8s.io/api/policy/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // Package policy is for any kind of policy object. Suitable examples, even if // they aren't all here, are PodDisruptionBudget, PodSecurityPolicy, diff --git a/vendor/k8s.io/api/policy/v1beta1/generated.proto b/vendor/k8s.io/api/policy/v1beta1/generated.proto index d044837403b..30db726f9c9 100644 --- a/vendor/k8s.io/api/policy/v1beta1/generated.proto +++ b/vendor/k8s.io/api/policy/v1beta1/generated.proto @@ -230,7 +230,7 @@ message PodSecurityPolicySpec { // +optional repeated string allowedCapabilities = 4; - // volumes is a white list of allowed volume plugins. Empty indicates that + // volumes is an allowlist of volume plugins. Empty indicates that // no volumes may be used. To allow all volumes you may use '*'. // +optional repeated string volumes = 5; @@ -287,27 +287,27 @@ message PodSecurityPolicySpec { // +optional optional bool allowPrivilegeEscalation = 16; - // allowedHostPaths is a white list of allowed host paths. Empty indicates + // allowedHostPaths is an allowlist of host paths. Empty indicates // that all host paths may be used. // +optional repeated AllowedHostPath allowedHostPaths = 17; - // allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all + // allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes // is allowed in the "volumes" field. // +optional repeated AllowedFlexVolume allowedFlexVolumes = 18; - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. + // AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. // An empty value indicates that any CSI driver can be used for inline ephemeral volumes. - // This is an alpha field, and is only honored if the API server enables the CSIInlineVolume feature gate. + // This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate. // +optional repeated AllowedCSIDriver allowedCSIDrivers = 23; // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. // Each entry is either a plain sysctl name or ends in "*" in which case it is considered // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. - // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. + // Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection. // // Examples: // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. @@ -325,7 +325,7 @@ message PodSecurityPolicySpec { // +optional repeated string forbiddenSysctls = 20; - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. + // AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. // Empty or nil indicates that only the DefaultProcMountType may be used. // This requires the ProcMountType feature flag to be enabled. // +optional @@ -363,7 +363,7 @@ message RunAsUserStrategyOptions { // RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses // for a pod. message RuntimeClassStrategyOptions { - // allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. + // allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. // A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the // list. An empty list requires the RuntimeClassName field to be unset. repeated string allowedRuntimeClassNames = 1; diff --git a/vendor/k8s.io/api/policy/v1beta1/types.go b/vendor/k8s.io/api/policy/v1beta1/types.go index e6a59763add..711afc80c73 100644 --- a/vendor/k8s.io/api/policy/v1beta1/types.go +++ b/vendor/k8s.io/api/policy/v1beta1/types.go @@ -81,6 +81,8 @@ type PodDisruptionBudgetStatus struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.5 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods type PodDisruptionBudget struct { @@ -97,6 +99,8 @@ type PodDisruptionBudget struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.5 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // PodDisruptionBudgetList is a collection of PodDisruptionBudgets. type PodDisruptionBudgetList struct { @@ -109,6 +113,8 @@ type PodDisruptionBudgetList struct { // +genclient // +genclient:noVerbs // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.5 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // Eviction evicts a pod from its node subject to certain policies and safety constraints. // This is a subresource of Pod. A request to cause such an eviction is @@ -128,6 +134,8 @@ type Eviction struct { // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.10 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // PodSecurityPolicy governs the ability to make requests that affect the Security Context // that will be applied to a pod and container. @@ -163,7 +171,7 @@ type PodSecurityPolicySpec struct { // You must not list a capability in both allowedCapabilities and requiredDropCapabilities. // +optional AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty" protobuf:"bytes,4,rep,name=allowedCapabilities,casttype=k8s.io/api/core/v1.Capability"` - // volumes is a white list of allowed volume plugins. Empty indicates that + // volumes is an allowlist of volume plugins. Empty indicates that // no volumes may be used. To allow all volumes you may use '*'. // +optional Volumes []FSType `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes,casttype=FSType"` @@ -207,24 +215,24 @@ type PodSecurityPolicySpec struct { // privilege escalation. If unspecified, defaults to true. // +optional AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty" protobuf:"varint,16,opt,name=allowPrivilegeEscalation"` - // allowedHostPaths is a white list of allowed host paths. Empty indicates + // allowedHostPaths is an allowlist of host paths. Empty indicates // that all host paths may be used. // +optional AllowedHostPaths []AllowedHostPath `json:"allowedHostPaths,omitempty" protobuf:"bytes,17,rep,name=allowedHostPaths"` - // allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all + // allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes // is allowed in the "volumes" field. // +optional AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes,omitempty" protobuf:"bytes,18,rep,name=allowedFlexVolumes"` - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. + // AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. // An empty value indicates that any CSI driver can be used for inline ephemeral volumes. - // This is an alpha field, and is only honored if the API server enables the CSIInlineVolume feature gate. + // This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate. // +optional AllowedCSIDrivers []AllowedCSIDriver `json:"allowedCSIDrivers,omitempty" protobuf:"bytes,23,rep,name=allowedCSIDrivers"` // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. // Each entry is either a plain sysctl name or ends in "*" in which case it is considered // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. - // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. + // Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection. // // Examples: // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. @@ -240,7 +248,7 @@ type PodSecurityPolicySpec struct { // e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. // +optional ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty" protobuf:"bytes,20,rep,name=forbiddenSysctls"` - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. + // AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. // Empty or nil indicates that only the DefaultProcMountType may be used. // This requires the ProcMountType feature flag to be enabled. // +optional @@ -305,6 +313,7 @@ const ( PortworxVolume FSType = "portworxVolume" ScaleIO FSType = "scaleIO" CSI FSType = "csi" + Ephemeral FSType = "ephemeral" All FSType = "*" ) @@ -458,7 +467,7 @@ const ( // RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses // for a pod. type RuntimeClassStrategyOptions struct { - // allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. + // allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. // A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the // list. An empty list requires the RuntimeClassName field to be unset. AllowedRuntimeClassNames []string `json:"allowedRuntimeClassNames" protobuf:"bytes,1,rep,name=allowedRuntimeClassNames"` @@ -475,6 +484,8 @@ type RuntimeClassStrategyOptions struct { const AllowAllRuntimeClassNames = "*" // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.10 +// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // PodSecurityPolicyList is a list of PodSecurityPolicy objects. type PodSecurityPolicyList struct { diff --git a/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go index 70f667c6727..05a503667f0 100644 --- a/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go @@ -164,7 +164,7 @@ var map_PodSecurityPolicySpec = map[string]string{ "defaultAddCapabilities": "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.", "requiredDropCapabilities": "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", "allowedCapabilities": "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.", - "volumes": "volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", + "volumes": "volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", "hostNetwork": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", "hostPorts": "hostPorts determines which host port ranges are allowed to be exposed.", "hostPID": "hostPID determines if the policy allows the use of HostPID in the pod spec.", @@ -177,12 +177,12 @@ var map_PodSecurityPolicySpec = map[string]string{ "readOnlyRootFilesystem": "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", "defaultAllowPrivilegeEscalation": "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", "allowPrivilegeEscalation": "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", - "allowedHostPaths": "allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.", - "allowedFlexVolumes": "allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", - "allowedCSIDrivers": "AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is an alpha field, and is only honored if the API server enables the CSIInlineVolume feature gate.", - "allowedUnsafeSysctls": "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", + "allowedHostPaths": "allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.", + "allowedFlexVolumes": "allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", + "allowedCSIDrivers": "AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate.", + "allowedUnsafeSysctls": "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", "forbiddenSysctls": "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", - "allowedProcMountTypes": "AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", + "allowedProcMountTypes": "AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", "runtimeClass": "runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.", } @@ -212,7 +212,7 @@ func (RunAsUserStrategyOptions) SwaggerDoc() map[string]string { var map_RuntimeClassStrategyOptions = map[string]string{ "": "RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.", - "allowedRuntimeClassNames": "allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", + "allowedRuntimeClassNames": "allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", "defaultRuntimeClassName": "defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.", } diff --git a/vendor/k8s.io/api/policy/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/policy/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..fca0a2a2ff1 --- /dev/null +++ b/vendor/k8s.io/api/policy/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,111 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Eviction) APILifecycleIntroduced() (major, minor int) { + return 1, 5 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Eviction) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Eviction) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *PodDisruptionBudget) APILifecycleIntroduced() (major, minor int) { + return 1, 5 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *PodDisruptionBudget) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *PodDisruptionBudget) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *PodDisruptionBudgetList) APILifecycleIntroduced() (major, minor int) { + return 1, 5 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *PodDisruptionBudgetList) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *PodDisruptionBudgetList) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *PodSecurityPolicy) APILifecycleIntroduced() (major, minor int) { + return 1, 10 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *PodSecurityPolicy) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *PodSecurityPolicy) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *PodSecurityPolicyList) APILifecycleIntroduced() (major, minor int) { + return 1, 10 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *PodSecurityPolicyList) APILifecycleDeprecated() (major, minor int) { + return 1, 22 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *PodSecurityPolicyList) APILifecycleRemoved() (major, minor int) { + return 1, 25 +} diff --git a/vendor/k8s.io/api/rbac/v1alpha1/generated.proto b/vendor/k8s.io/api/rbac/v1alpha1/generated.proto index 895ab623658..60354e6a6f1 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/rbac/v1alpha1/generated.proto @@ -37,7 +37,7 @@ message AggregationRule { } // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22. message ClusterRole { // Standard object's metadata. // +optional @@ -56,7 +56,7 @@ message ClusterRole { // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, // and adds who information via Subject. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22. message ClusterRoleBinding { // Standard object's metadata. // +optional @@ -72,7 +72,7 @@ message ClusterRoleBinding { } // ClusterRoleBindingList is a collection of ClusterRoleBindings. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22. message ClusterRoleBindingList { // Standard object's metadata. // +optional @@ -83,7 +83,7 @@ message ClusterRoleBindingList { } // ClusterRoleList is a collection of ClusterRoles. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22. message ClusterRoleList { // Standard object's metadata. // +optional @@ -120,7 +120,7 @@ message PolicyRule { } // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22. message Role { // Standard object's metadata. // +optional @@ -134,7 +134,7 @@ message Role { // RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. // It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given // namespace only have effect in that namespace. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22. message RoleBinding { // Standard object's metadata. // +optional @@ -150,7 +150,7 @@ message RoleBinding { } // RoleBindingList is a collection of RoleBindings -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22. message RoleBindingList { // Standard object's metadata. // +optional @@ -161,7 +161,7 @@ message RoleBindingList { } // RoleList is a collection of Roles. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22. message RoleList { // Standard object's metadata. // +optional diff --git a/vendor/k8s.io/api/rbac/v1alpha1/types.go b/vendor/k8s.io/api/rbac/v1alpha1/types.go index ba91ab32abd..538ae4c9b0a 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/types.go +++ b/vendor/k8s.io/api/rbac/v1alpha1/types.go @@ -102,7 +102,7 @@ type RoleRef struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22. type Role struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -120,7 +120,7 @@ type Role struct { // RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. // It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given // namespace only have effect in that namespace. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22. type RoleBinding struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -139,7 +139,7 @@ type RoleBinding struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // RoleBindingList is a collection of RoleBindings -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22. type RoleBindingList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -153,7 +153,7 @@ type RoleBindingList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // RoleList is a collection of Roles. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22. type RoleList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -169,7 +169,7 @@ type RoleList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22. type ClusterRole struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -201,7 +201,7 @@ type AggregationRule struct { // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, // and adds who information via Subject. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22. type ClusterRoleBinding struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -220,7 +220,7 @@ type ClusterRoleBinding struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ClusterRoleBindingList is a collection of ClusterRoleBindings. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22. type ClusterRoleBindingList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -234,7 +234,7 @@ type ClusterRoleBindingList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ClusterRoleList is a collection of ClusterRoles. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22. type ClusterRoleList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. diff --git a/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go index eab08c5d76d..acb84478253 100644 --- a/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go @@ -37,7 +37,7 @@ func (AggregationRule) SwaggerDoc() map[string]string { } var map_ClusterRole = map[string]string{ - "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20.", + "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "rules": "Rules holds all the PolicyRules for this ClusterRole", "aggregationRule": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", @@ -48,7 +48,7 @@ func (ClusterRole) SwaggerDoc() map[string]string { } var map_ClusterRoleBinding = map[string]string{ - "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.20.", + "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "subjects": "Subjects holds references to the objects the role applies to.", "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", @@ -59,7 +59,7 @@ func (ClusterRoleBinding) SwaggerDoc() map[string]string { } var map_ClusterRoleBindingList = map[string]string{ - "": "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.20.", + "": "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "items": "Items is a list of ClusterRoleBindings", } @@ -69,7 +69,7 @@ func (ClusterRoleBindingList) SwaggerDoc() map[string]string { } var map_ClusterRoleList = map[string]string{ - "": "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20.", + "": "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "items": "Items is a list of ClusterRoles", } @@ -92,7 +92,7 @@ func (PolicyRule) SwaggerDoc() map[string]string { } var map_Role = map[string]string{ - "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.20.", + "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "rules": "Rules holds all the PolicyRules for this Role", } @@ -102,7 +102,7 @@ func (Role) SwaggerDoc() map[string]string { } var map_RoleBinding = map[string]string{ - "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20.", + "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "subjects": "Subjects holds references to the objects the role applies to.", "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", @@ -113,7 +113,7 @@ func (RoleBinding) SwaggerDoc() map[string]string { } var map_RoleBindingList = map[string]string{ - "": "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20.", + "": "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "items": "Items is a list of RoleBindings", } @@ -123,7 +123,7 @@ func (RoleBindingList) SwaggerDoc() map[string]string { } var map_RoleList = map[string]string{ - "": "RoleList is a collection of Roles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20.", + "": "RoleList is a collection of Roles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "items": "Items is a list of Roles", } diff --git a/vendor/k8s.io/api/rbac/v1beta1/BUILD b/vendor/k8s.io/api/rbac/v1beta1/BUILD index 48e27564bba..3dff5ea38ea 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/BUILD +++ b/vendor/k8s.io/api/rbac/v1beta1/BUILD @@ -14,6 +14,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/rbac/v1beta1", importpath = "k8s.io/api/rbac/v1beta1", diff --git a/vendor/k8s.io/api/rbac/v1beta1/doc.go b/vendor/k8s.io/api/rbac/v1beta1/doc.go index fe7aae975a1..156f273e692 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/doc.go +++ b/vendor/k8s.io/api/rbac/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=rbac.authorization.k8s.io diff --git a/vendor/k8s.io/api/rbac/v1beta1/generated.proto b/vendor/k8s.io/api/rbac/v1beta1/generated.proto index 87e0dbdfdd3..44cd6c24aa0 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/generated.proto +++ b/vendor/k8s.io/api/rbac/v1beta1/generated.proto @@ -37,7 +37,7 @@ message AggregationRule { } // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22. message ClusterRole { // Standard object's metadata. // +optional @@ -56,7 +56,7 @@ message ClusterRole { // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, // and adds who information via Subject. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22. message ClusterRoleBinding { // Standard object's metadata. // +optional @@ -72,7 +72,7 @@ message ClusterRoleBinding { } // ClusterRoleBindingList is a collection of ClusterRoleBindings. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.22. message ClusterRoleBindingList { // Standard object's metadata. // +optional @@ -83,7 +83,7 @@ message ClusterRoleBindingList { } // ClusterRoleList is a collection of ClusterRoles. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22. message ClusterRoleList { // Standard object's metadata. // +optional @@ -121,7 +121,7 @@ message PolicyRule { } // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22. message Role { // Standard object's metadata. // +optional @@ -135,7 +135,7 @@ message Role { // RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. // It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given // namespace only have effect in that namespace. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22. message RoleBinding { // Standard object's metadata. // +optional @@ -151,7 +151,7 @@ message RoleBinding { } // RoleBindingList is a collection of RoleBindings -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22. message RoleBindingList { // Standard object's metadata. // +optional @@ -162,7 +162,7 @@ message RoleBindingList { } // RoleList is a collection of Roles -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22. message RoleList { // Standard object's metadata. // +optional diff --git a/vendor/k8s.io/api/rbac/v1beta1/types.go b/vendor/k8s.io/api/rbac/v1beta1/types.go index 74c70936a43..f1678881195 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/types.go +++ b/vendor/k8s.io/api/rbac/v1beta1/types.go @@ -100,9 +100,13 @@ type RoleRef struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.17 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=rbac.authorization.k8s.io,v1,Role // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22. type Role struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -116,11 +120,15 @@ type Role struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.17 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=rbac.authorization.k8s.io,v1,RoleBinding // RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. // It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given // namespace only have effect in that namespace. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22. type RoleBinding struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -137,9 +145,13 @@ type RoleBinding struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.17 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=rbac.authorization.k8s.io,v1,RoleBindingList // RoleBindingList is a collection of RoleBindings -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22. type RoleBindingList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -151,9 +163,13 @@ type RoleBindingList struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.17 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=rbac.authorization.k8s.io,v1,RoleList // RoleList is a collection of Roles -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22. type RoleList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -167,9 +183,13 @@ type RoleList struct { // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.17 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=rbac.authorization.k8s.io,v1,ClusterRole // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22. type ClusterRole struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -197,10 +217,14 @@ type AggregationRule struct { // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.17 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=rbac.authorization.k8s.io,v1,ClusterRoleBinding // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, // and adds who information via Subject. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22. type ClusterRoleBinding struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -217,9 +241,13 @@ type ClusterRoleBinding struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.17 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=rbac.authorization.k8s.io,v1,ClusterRoleBindingList // ClusterRoleBindingList is a collection of ClusterRoleBindings. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.22. type ClusterRoleBindingList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -231,9 +259,13 @@ type ClusterRoleBindingList struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.6 +// +k8s:prerelease-lifecycle-gen:deprecated=1.17 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=rbac.authorization.k8s.io,v1,ClusterRoleList // ClusterRoleList is a collection of ClusterRoles. -// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20. +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22. type ClusterRoleList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. diff --git a/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go index 8e9d7ace795..0512301f5af 100644 --- a/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go @@ -37,7 +37,7 @@ func (AggregationRule) SwaggerDoc() map[string]string { } var map_ClusterRole = map[string]string{ - "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20.", + "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "rules": "Rules holds all the PolicyRules for this ClusterRole", "aggregationRule": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", @@ -48,7 +48,7 @@ func (ClusterRole) SwaggerDoc() map[string]string { } var map_ClusterRoleBinding = map[string]string{ - "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.20.", + "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "subjects": "Subjects holds references to the objects the role applies to.", "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", @@ -59,7 +59,7 @@ func (ClusterRoleBinding) SwaggerDoc() map[string]string { } var map_ClusterRoleBindingList = map[string]string{ - "": "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.20.", + "": "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "items": "Items is a list of ClusterRoleBindings", } @@ -69,7 +69,7 @@ func (ClusterRoleBindingList) SwaggerDoc() map[string]string { } var map_ClusterRoleList = map[string]string{ - "": "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20.", + "": "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "items": "Items is a list of ClusterRoles", } @@ -92,7 +92,7 @@ func (PolicyRule) SwaggerDoc() map[string]string { } var map_Role = map[string]string{ - "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.20.", + "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "rules": "Rules holds all the PolicyRules for this Role", } @@ -102,7 +102,7 @@ func (Role) SwaggerDoc() map[string]string { } var map_RoleBinding = map[string]string{ - "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20.", + "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "subjects": "Subjects holds references to the objects the role applies to.", "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", @@ -113,7 +113,7 @@ func (RoleBinding) SwaggerDoc() map[string]string { } var map_RoleBindingList = map[string]string{ - "": "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20.", + "": "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "items": "Items is a list of RoleBindings", } @@ -123,7 +123,7 @@ func (RoleBindingList) SwaggerDoc() map[string]string { } var map_RoleList = map[string]string{ - "": "RoleList is a collection of Roles Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20.", + "": "RoleList is a collection of Roles Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.", "metadata": "Standard object's metadata.", "items": "Items is a list of Roles", } diff --git a/vendor/k8s.io/api/rbac/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/rbac/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..a4d99b35ac3 --- /dev/null +++ b/vendor/k8s.io/api/rbac/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,217 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ClusterRole) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ClusterRole) APILifecycleDeprecated() (major, minor int) { + return 1, 17 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ClusterRole) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRole"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ClusterRole) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ClusterRoleBinding) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ClusterRoleBinding) APILifecycleDeprecated() (major, minor int) { + return 1, 17 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ClusterRoleBinding) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBinding"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ClusterRoleBinding) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ClusterRoleBindingList) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ClusterRoleBindingList) APILifecycleDeprecated() (major, minor int) { + return 1, 17 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ClusterRoleBindingList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBindingList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ClusterRoleBindingList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ClusterRoleList) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ClusterRoleList) APILifecycleDeprecated() (major, minor int) { + return 1, 17 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ClusterRoleList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ClusterRoleList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Role) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Role) APILifecycleDeprecated() (major, minor int) { + return 1, 17 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Role) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "Role"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Role) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *RoleBinding) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *RoleBinding) APILifecycleDeprecated() (major, minor int) { + return 1, 17 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *RoleBinding) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBinding"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *RoleBinding) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *RoleBindingList) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *RoleBindingList) APILifecycleDeprecated() (major, minor int) { + return 1, 17 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *RoleBindingList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBindingList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *RoleBindingList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *RoleList) APILifecycleIntroduced() (major, minor int) { + return 1, 6 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *RoleList) APILifecycleDeprecated() (major, minor int) { + return 1, 17 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *RoleList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *RoleList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/api/scheduling/v1/generated.proto b/vendor/k8s.io/api/scheduling/v1/generated.proto index 82f6e0a21a5..e7489f53923 100644 --- a/vendor/k8s.io/api/scheduling/v1/generated.proto +++ b/vendor/k8s.io/api/scheduling/v1/generated.proto @@ -57,7 +57,7 @@ message PriorityClass { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. - // This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional optional string preemptionPolicy = 5; } diff --git a/vendor/k8s.io/api/scheduling/v1/types.go b/vendor/k8s.io/api/scheduling/v1/types.go index 087ee10d833..b4ff34767cc 100644 --- a/vendor/k8s.io/api/scheduling/v1/types.go +++ b/vendor/k8s.io/api/scheduling/v1/types.go @@ -54,7 +54,7 @@ type PriorityClass struct { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. - // This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional PreemptionPolicy *apiv1.PreemptionPolicy `json:"preemptionPolicy,omitempty" protobuf:"bytes,5,opt,name=preemptionPolicy"` } diff --git a/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go index 4cfb9d3e353..7524adf9a84 100644 --- a/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go @@ -33,7 +33,7 @@ var map_PriorityClass = map[string]string{ "value": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", + "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", } func (PriorityClass) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto b/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto index 682fb873636..8c4a2c4609f 100644 --- a/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto @@ -58,7 +58,7 @@ message PriorityClass { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. - // This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional optional string preemptionPolicy = 5; } diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/types.go b/vendor/k8s.io/api/scheduling/v1alpha1/types.go index 86a2c5130e9..4d8462c7c5c 100644 --- a/vendor/k8s.io/api/scheduling/v1alpha1/types.go +++ b/vendor/k8s.io/api/scheduling/v1alpha1/types.go @@ -55,7 +55,7 @@ type PriorityClass struct { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. - // This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional PreemptionPolicy *apiv1.PreemptionPolicy `json:"preemptionPolicy,omitempty" protobuf:"bytes,5,opt,name=preemptionPolicy"` } diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go index 63a9a353cbe..940c39a083b 100644 --- a/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go @@ -33,7 +33,7 @@ var map_PriorityClass = map[string]string{ "value": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", + "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", } func (PriorityClass) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/scheduling/v1beta1/BUILD b/vendor/k8s.io/api/scheduling/v1beta1/BUILD index d1bb4e8aef0..6d30a2ecbbf 100644 --- a/vendor/k8s.io/api/scheduling/v1beta1/BUILD +++ b/vendor/k8s.io/api/scheduling/v1beta1/BUILD @@ -14,6 +14,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1beta1", importpath = "k8s.io/api/scheduling/v1beta1", diff --git a/vendor/k8s.io/api/scheduling/v1beta1/doc.go b/vendor/k8s.io/api/scheduling/v1beta1/doc.go index e661968980b..152d241fbd1 100644 --- a/vendor/k8s.io/api/scheduling/v1beta1/doc.go +++ b/vendor/k8s.io/api/scheduling/v1beta1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=scheduling.k8s.io diff --git a/vendor/k8s.io/api/scheduling/v1beta1/generated.proto b/vendor/k8s.io/api/scheduling/v1beta1/generated.proto index 2582891bb30..eae3c01f373 100644 --- a/vendor/k8s.io/api/scheduling/v1beta1/generated.proto +++ b/vendor/k8s.io/api/scheduling/v1beta1/generated.proto @@ -58,7 +58,7 @@ message PriorityClass { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. - // This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional optional string preemptionPolicy = 5; } diff --git a/vendor/k8s.io/api/scheduling/v1beta1/types.go b/vendor/k8s.io/api/scheduling/v1beta1/types.go index f806ecd4c2d..d68b4b31879 100644 --- a/vendor/k8s.io/api/scheduling/v1beta1/types.go +++ b/vendor/k8s.io/api/scheduling/v1beta1/types.go @@ -24,6 +24,10 @@ import ( // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.11 +// +k8s:prerelease-lifecycle-gen:deprecated=1.14 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=scheduling.k8s.io,v1,PriorityClass // DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. // PriorityClass defines mapping from a priority class name to the priority @@ -55,12 +59,16 @@ type PriorityClass struct { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. - // This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional PreemptionPolicy *apiv1.PreemptionPolicy `json:"preemptionPolicy,omitempty" protobuf:"bytes,5,opt,name=preemptionPolicy"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.11 +// +k8s:prerelease-lifecycle-gen:deprecated=1.14 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=scheduling.k8s.io,v1,PriorityClassList // PriorityClassList is a collection of priority classes. type PriorityClassList struct { diff --git a/vendor/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go index ffded9df0f8..d576c840136 100644 --- a/vendor/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go @@ -33,7 +33,7 @@ var map_PriorityClass = map[string]string{ "value": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature.", + "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", } func (PriorityClass) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/scheduling/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/scheduling/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..45969d15c0b --- /dev/null +++ b/vendor/k8s.io/api/scheduling/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,73 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *PriorityClass) APILifecycleIntroduced() (major, minor int) { + return 1, 11 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *PriorityClass) APILifecycleDeprecated() (major, minor int) { + return 1, 14 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *PriorityClass) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "scheduling.k8s.io", Version: "v1", Kind: "PriorityClass"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *PriorityClass) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *PriorityClassList) APILifecycleIntroduced() (major, minor int) { + return 1, 11 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *PriorityClassList) APILifecycleDeprecated() (major, minor int) { + return 1, 14 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *PriorityClassList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "scheduling.k8s.io", Version: "v1", Kind: "PriorityClassList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *PriorityClassList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/api/storage/v1/generated.pb.go b/vendor/k8s.io/api/storage/v1/generated.pb.go index 9e57369106d..2c7088c3898 100644 --- a/vendor/k8s.io/api/storage/v1/generated.pb.go +++ b/vendor/k8s.io/api/storage/v1/generated.pb.go @@ -520,91 +520,95 @@ func init() { } var fileDescriptor_3b530c1983504d8d = []byte{ - // 1336 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xc6, 0xf9, 0x3b, 0x4e, 0x5a, 0x67, 0x1a, 0xc0, 0xe4, 0xe0, 0x8d, 0x96, 0x0a, 0x42, - 0xa1, 0xeb, 0xa6, 0x94, 0xaa, 0xaa, 0x04, 0x52, 0x36, 0x31, 0x22, 0x22, 0x4e, 0xa2, 0x49, 0xa9, - 0x10, 0x02, 0xc4, 0x64, 0xf7, 0xd5, 0xd9, 0xc6, 0xbb, 0xb3, 0xdd, 0x1d, 0x1b, 0x7c, 0xe3, 0xc4, - 0x0d, 0x09, 0xae, 0x7c, 0x0a, 0x90, 0xe0, 0xc2, 0x91, 0x53, 0xb9, 0x55, 0x9c, 0x7a, 0xb2, 0xe8, - 0x72, 0x05, 0x3e, 0x40, 0x4e, 0x68, 0x66, 0xc7, 0xde, 0xb5, 0xbd, 0x4e, 0xd3, 0x8b, 0x6f, 0x9e, - 0xf7, 0xde, 0xef, 0xf7, 0xde, 0x9b, 0xf7, 0x67, 0xd6, 0xe8, 0xfd, 0xd3, 0x3b, 0x91, 0xe9, 0xb2, - 0xea, 0x69, 0xeb, 0x18, 0x42, 0x1f, 0x38, 0x44, 0xd5, 0x36, 0xf8, 0x0e, 0x0b, 0xab, 0x4a, 0x41, - 0x03, 0xb7, 0x1a, 0x71, 0x16, 0xd2, 0x06, 0x54, 0xdb, 0x9b, 0xd5, 0x06, 0xf8, 0x10, 0x52, 0x0e, - 0x8e, 0x19, 0x84, 0x8c, 0x33, 0xfc, 0x52, 0x62, 0x66, 0xd2, 0xc0, 0x35, 0x95, 0x99, 0xd9, 0xde, - 0x5c, 0xbb, 0xde, 0x70, 0xf9, 0x49, 0xeb, 0xd8, 0xb4, 0x99, 0x57, 0x6d, 0xb0, 0x06, 0xab, 0x4a, - 0xeb, 0xe3, 0xd6, 0x03, 0x79, 0x92, 0x07, 0xf9, 0x2b, 0x61, 0x59, 0x33, 0x32, 0xce, 0x6c, 0x16, - 0xe6, 0x79, 0x5a, 0xbb, 0x95, 0xda, 0x78, 0xd4, 0x3e, 0x71, 0x7d, 0x08, 0x3b, 0xd5, 0xe0, 0xb4, - 0x21, 0x04, 0x51, 0xd5, 0x03, 0x4e, 0xf3, 0x50, 0xd5, 0x71, 0xa8, 0xb0, 0xe5, 0x73, 0xd7, 0x83, - 0x11, 0xc0, 0xed, 0xe7, 0x01, 0x22, 0xfb, 0x04, 0x3c, 0x3a, 0x8c, 0x33, 0x7e, 0xd5, 0xd0, 0xe2, - 0xf6, 0xd1, 0xee, 0x4e, 0xe8, 0xb6, 0x21, 0xc4, 0x5f, 0xa2, 0x05, 0x11, 0x91, 0x43, 0x39, 0x2d, - 0x6b, 0xeb, 0xda, 0x46, 0xf1, 0xe6, 0x0d, 0x33, 0xbd, 0xa9, 0x3e, 0xb1, 0x19, 0x9c, 0x36, 0x84, - 0x20, 0x32, 0x85, 0xb5, 0xd9, 0xde, 0x34, 0x0f, 0x8e, 0x1f, 0x82, 0xcd, 0xeb, 0xc0, 0xa9, 0x85, - 0x1f, 0x77, 0xf5, 0xa9, 0xb8, 0xab, 0xa3, 0x54, 0x46, 0xfa, 0xac, 0xf8, 0x03, 0x34, 0x13, 0x05, - 0x60, 0x97, 0xa7, 0x25, 0xfb, 0x55, 0x33, 0xb7, 0x0e, 0x66, 0x3f, 0xa2, 0xa3, 0x00, 0x6c, 0x6b, - 0x49, 0x31, 0xce, 0x88, 0x13, 0x91, 0x78, 0xe3, 0x17, 0x0d, 0x2d, 0xf7, 0xad, 0xf6, 0xdc, 0x88, - 0xe3, 0xcf, 0x46, 0x62, 0x37, 0x2f, 0x16, 0xbb, 0x40, 0xcb, 0xc8, 0x4b, 0xca, 0xcf, 0x42, 0x4f, - 0x92, 0x89, 0xbb, 0x86, 0x66, 0x5d, 0x0e, 0x5e, 0x54, 0x9e, 0x5e, 0x2f, 0x6c, 0x14, 0x6f, 0xae, - 0x3f, 0x2f, 0x70, 0x6b, 0x59, 0x91, 0xcd, 0xee, 0x0a, 0x18, 0x49, 0xd0, 0xc6, 0x3f, 0xd9, 0xb0, - 0x45, 0x3a, 0xf8, 0x2e, 0xba, 0x44, 0x39, 0xa7, 0xf6, 0x09, 0x81, 0x47, 0x2d, 0x37, 0x04, 0x47, - 0x06, 0xbf, 0x60, 0xe1, 0xb8, 0xab, 0x5f, 0xda, 0x1a, 0xd0, 0x90, 0x21, 0x4b, 0x81, 0x0d, 0x98, - 0xb3, 0xeb, 0x3f, 0x60, 0x07, 0x7e, 0x9d, 0xb5, 0x7c, 0x2e, 0xaf, 0x55, 0x61, 0x0f, 0x07, 0x34, - 0x64, 0xc8, 0x12, 0xdb, 0x68, 0xb5, 0xcd, 0x9a, 0x2d, 0x0f, 0xf6, 0xdc, 0x07, 0x60, 0x77, 0xec, - 0x26, 0xd4, 0x99, 0x03, 0x51, 0xb9, 0xb0, 0x5e, 0xd8, 0x58, 0xb4, 0xaa, 0x71, 0x57, 0x5f, 0xbd, - 0x9f, 0xa3, 0x3f, 0xeb, 0xea, 0x57, 0x72, 0xe4, 0x24, 0x97, 0xcc, 0xf8, 0x59, 0x43, 0xf3, 0xdb, - 0x47, 0xbb, 0xfb, 0xcc, 0x81, 0x09, 0xf4, 0xd6, 0xce, 0x40, 0x6f, 0x19, 0xe3, 0x4b, 0x24, 0xe2, - 0x19, 0xdb, 0x59, 0xff, 0x25, 0x25, 0x12, 0x36, 0x6a, 0x2a, 0xd6, 0xd1, 0x8c, 0x4f, 0x3d, 0x90, - 0x51, 0x2f, 0xa6, 0x98, 0x7d, 0xea, 0x01, 0x91, 0x1a, 0xfc, 0x3a, 0x9a, 0xf3, 0x99, 0x03, 0xbb, - 0x3b, 0xd2, 0xf7, 0xa2, 0x75, 0x49, 0xd9, 0xcc, 0xed, 0x4b, 0x29, 0x51, 0x5a, 0x7c, 0x0b, 0x2d, - 0x71, 0x16, 0xb0, 0x26, 0x6b, 0x74, 0x3e, 0x82, 0x4e, 0xef, 0xb2, 0x4b, 0x71, 0x57, 0x5f, 0xba, - 0x97, 0x91, 0x93, 0x01, 0x2b, 0xfc, 0x39, 0x2a, 0xd2, 0x66, 0x93, 0xd9, 0x94, 0xd3, 0xe3, 0x26, - 0x94, 0x67, 0x64, 0x7a, 0xd7, 0xc6, 0xa4, 0x97, 0x14, 0x47, 0xf8, 0x25, 0x10, 0xb1, 0x56, 0x68, - 0x43, 0x64, 0x5d, 0x8e, 0xbb, 0x7a, 0x71, 0x2b, 0xa5, 0x20, 0x59, 0x3e, 0xe3, 0x27, 0x0d, 0x15, - 0x55, 0xc2, 0x13, 0x18, 0xa4, 0xed, 0xc1, 0x41, 0xaa, 0x9c, 0x5f, 0xa5, 0x31, 0x63, 0xf4, 0x45, - 0x3f, 0x62, 0x39, 0x43, 0x07, 0x68, 0xde, 0x91, 0xa5, 0x8a, 0xca, 0x9a, 0x64, 0xbd, 0x7a, 0x3e, - 0xab, 0x1a, 0xd1, 0xcb, 0x8a, 0x7b, 0x3e, 0x39, 0x47, 0xa4, 0xc7, 0x62, 0x7c, 0x37, 0x87, 0x96, - 0x8e, 0x12, 0xd8, 0x76, 0x93, 0x46, 0xd1, 0x04, 0x9a, 0xf7, 0x5d, 0x54, 0x0c, 0x42, 0xd6, 0x76, - 0x23, 0x97, 0xf9, 0x10, 0xaa, 0x3e, 0xba, 0xa2, 0x20, 0xc5, 0xc3, 0x54, 0x45, 0xb2, 0x76, 0xb8, - 0x81, 0x50, 0x40, 0x43, 0xea, 0x01, 0x17, 0xd9, 0x17, 0x64, 0xf6, 0xef, 0x8c, 0xc9, 0x3e, 0x9b, - 0x91, 0x79, 0xd8, 0x47, 0xd5, 0x7c, 0x1e, 0x76, 0xd2, 0xe8, 0x52, 0x05, 0xc9, 0x50, 0xe3, 0x53, - 0xb4, 0x1c, 0x82, 0xdd, 0xa4, 0xae, 0x77, 0xc8, 0x9a, 0xae, 0xdd, 0x91, 0x6d, 0xb8, 0x68, 0xd5, - 0xe2, 0xae, 0xbe, 0x4c, 0xb2, 0x8a, 0xb3, 0xae, 0x7e, 0x63, 0xf4, 0x5d, 0x34, 0x0f, 0x21, 0x8c, - 0xdc, 0x88, 0x83, 0xcf, 0x93, 0x0e, 0x1d, 0xc0, 0x90, 0x41, 0x6e, 0x31, 0x27, 0x9e, 0xd8, 0x52, - 0x07, 0x01, 0x77, 0x99, 0x1f, 0x95, 0x67, 0xd3, 0x39, 0xa9, 0x67, 0xe4, 0x64, 0xc0, 0x0a, 0xef, - 0xa1, 0x55, 0xd1, 0xd7, 0x5f, 0x25, 0x0e, 0x6a, 0x5f, 0x07, 0xd4, 0x17, 0xb7, 0x54, 0x9e, 0x93, - 0x4b, 0xb1, 0x2c, 0x56, 0xda, 0x56, 0x8e, 0x9e, 0xe4, 0xa2, 0xf0, 0x27, 0x68, 0x25, 0xd9, 0x69, - 0x96, 0xeb, 0x3b, 0xae, 0xdf, 0x10, 0x1b, 0xad, 0x3c, 0x2f, 0x93, 0xbe, 0x16, 0x77, 0xf5, 0x95, - 0xfb, 0xc3, 0xca, 0xb3, 0x3c, 0x21, 0x19, 0x25, 0xc1, 0x8f, 0xd0, 0x8a, 0xf4, 0x08, 0x8e, 0x1a, - 0x7a, 0x17, 0xa2, 0xf2, 0x82, 0x2c, 0xdd, 0x46, 0xb6, 0x74, 0xe2, 0xea, 0x44, 0xdd, 0x7a, 0xab, - 0xe1, 0x08, 0x9a, 0x60, 0x73, 0x16, 0xde, 0x83, 0xd0, 0xb3, 0x5e, 0x55, 0xf5, 0x5a, 0xd9, 0x1a, - 0xa6, 0x22, 0xa3, 0xec, 0x6b, 0xef, 0xa1, 0xcb, 0x43, 0x05, 0xc7, 0x25, 0x54, 0x38, 0x85, 0x4e, - 0xb2, 0xd4, 0x88, 0xf8, 0x89, 0x57, 0xd1, 0x6c, 0x9b, 0x36, 0x5b, 0x90, 0x34, 0x1f, 0x49, 0x0e, - 0x77, 0xa7, 0xef, 0x68, 0xc6, 0x6f, 0x1a, 0x2a, 0x65, 0xbb, 0x67, 0x02, 0x7b, 0xe2, 0xc3, 0xc1, - 0x3d, 0xf1, 0xda, 0x05, 0x7a, 0x7a, 0xcc, 0xb2, 0xf8, 0x71, 0x1a, 0x95, 0x92, 0xba, 0x24, 0xcf, - 0xa9, 0x07, 0x3e, 0x9f, 0xc0, 0x40, 0xd7, 0x07, 0x5e, 0xa3, 0xb7, 0xce, 0x5d, 0xd7, 0x69, 0x60, - 0xe3, 0x9e, 0x25, 0xfc, 0x31, 0x9a, 0x8b, 0x38, 0xe5, 0x2d, 0x31, 0xe4, 0x82, 0xf0, 0xfa, 0x45, - 0x09, 0x25, 0x28, 0x7d, 0x91, 0x92, 0x33, 0x51, 0x64, 0xc6, 0xef, 0x1a, 0x5a, 0x1d, 0x86, 0x4c, - 0xa0, 0xba, 0x7b, 0x83, 0xd5, 0x7d, 0xe3, 0x82, 0xc9, 0x8c, 0xa9, 0xf0, 0x9f, 0x1a, 0x7a, 0x79, - 0x24, 0x6f, 0xf9, 0xf6, 0x89, 0x9d, 0x10, 0x0c, 0x6d, 0x9e, 0xfd, 0xf4, 0x2d, 0x97, 0x3b, 0xe1, - 0x30, 0x47, 0x4f, 0x72, 0x51, 0xf8, 0x21, 0x2a, 0xb9, 0x7e, 0xd3, 0xf5, 0x21, 0x91, 0x1d, 0xa5, - 0xf5, 0xcd, 0x1d, 0xdc, 0x61, 0x66, 0x59, 0xdc, 0xd5, 0xb8, 0xab, 0x97, 0x76, 0x87, 0x58, 0xc8, - 0x08, 0xaf, 0xf1, 0x47, 0x4e, 0x65, 0xe4, 0x6b, 0xf7, 0x36, 0x5a, 0x48, 0xbe, 0x03, 0x21, 0x54, - 0x69, 0xf4, 0x6f, 0x7a, 0x4b, 0xc9, 0x49, 0xdf, 0x42, 0xf6, 0x8d, 0xbc, 0x0a, 0x15, 0xe8, 0x85, - 0xfb, 0x46, 0x82, 0x32, 0x7d, 0x23, 0xcf, 0x44, 0x91, 0x89, 0x20, 0xc4, 0x37, 0x8d, 0xbc, 0xcb, - 0xc2, 0x60, 0x10, 0xfb, 0x4a, 0x4e, 0xfa, 0x16, 0xc6, 0xbf, 0x85, 0x9c, 0x02, 0xc9, 0x06, 0xcc, - 0x64, 0xd3, 0xfb, 0xf2, 0x1d, 0xce, 0xc6, 0xe9, 0x67, 0xe3, 0xe0, 0x1f, 0x34, 0x84, 0x69, 0x9f, - 0xa2, 0xde, 0x6b, 0xd0, 0xa4, 0x8b, 0x6a, 0x2f, 0x34, 0x12, 0xe6, 0xd6, 0x08, 0x4f, 0xf2, 0x12, - 0xae, 0x29, 0xff, 0x78, 0xd4, 0x80, 0xe4, 0x38, 0xc7, 0x0e, 0x2a, 0x26, 0xd2, 0x5a, 0x18, 0xb2, - 0x50, 0x8d, 0xa7, 0x71, 0x6e, 0x2c, 0xd2, 0xd2, 0xaa, 0xc8, 0xcf, 0xb2, 0x14, 0x7a, 0xd6, 0xd5, - 0x8b, 0x19, 0x3d, 0xc9, 0xd2, 0x0a, 0x2f, 0x0e, 0xa4, 0x5e, 0x66, 0x5e, 0xcc, 0xcb, 0x0e, 0x8c, - 0xf7, 0x92, 0xa1, 0x5d, 0xab, 0xa1, 0x57, 0xc6, 0x5c, 0xcb, 0x0b, 0xbd, 0x17, 0xdf, 0x6a, 0x28, - 0xeb, 0x03, 0xef, 0xa1, 0x19, 0xf1, 0x27, 0x54, 0x2d, 0x92, 0x6b, 0x17, 0x5b, 0x24, 0xf7, 0x5c, - 0x0f, 0xd2, 0x55, 0x28, 0x4e, 0x44, 0xb2, 0xe0, 0x37, 0xd1, 0xbc, 0x07, 0x51, 0x44, 0x1b, 0xca, - 0x73, 0xfa, 0x21, 0x57, 0x4f, 0xc4, 0xa4, 0xa7, 0x37, 0x6e, 0xa3, 0x2b, 0x39, 0x1f, 0xc4, 0x58, - 0x47, 0xb3, 0xb6, 0xfc, 0xbf, 0x24, 0x02, 0x9a, 0xb5, 0x16, 0xc5, 0x46, 0xd9, 0x96, 0x7f, 0x93, - 0x12, 0xb9, 0xb5, 0xf1, 0xf8, 0x59, 0x65, 0xea, 0xc9, 0xb3, 0xca, 0xd4, 0xd3, 0x67, 0x95, 0xa9, - 0x6f, 0xe2, 0x8a, 0xf6, 0x38, 0xae, 0x68, 0x4f, 0xe2, 0x8a, 0xf6, 0x34, 0xae, 0x68, 0x7f, 0xc5, - 0x15, 0xed, 0xfb, 0xbf, 0x2b, 0x53, 0x9f, 0x4e, 0xb7, 0x37, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, - 0x9b, 0x74, 0xdf, 0x56, 0x8a, 0x10, 0x00, 0x00, + // 1395 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xc6, 0x76, 0x7e, 0x8c, 0x93, 0xc6, 0x99, 0xe4, 0xfb, 0xfd, 0xfa, 0x9b, 0x83, 0x37, + 0x5a, 0x2a, 0x08, 0x85, 0xae, 0x9b, 0x52, 0xaa, 0xaa, 0x52, 0x91, 0xe2, 0xc4, 0xa5, 0x11, 0x71, + 0x12, 0x8d, 0x4b, 0x85, 0x10, 0x20, 0x26, 0xbb, 0x13, 0x67, 0x1b, 0xef, 0xce, 0x76, 0x77, 0x6c, + 0xf0, 0x8d, 0x13, 0x37, 0x24, 0xb8, 0xf2, 0x57, 0x80, 0x04, 0x17, 0x8e, 0x9c, 0xca, 0xad, 0xe2, + 0xd4, 0xd3, 0x8a, 0x2e, 0x67, 0xb8, 0x71, 0xc9, 0x09, 0xcd, 0xec, 0xd8, 0xfb, 0xc3, 0xeb, 0x34, + 0xbd, 0xe4, 0xe6, 0x79, 0xef, 0x7d, 0x3e, 0xef, 0xbd, 0x79, 0x3f, 0x66, 0x0d, 0xde, 0x3b, 0xbd, + 0xe3, 0xeb, 0x16, 0xad, 0x9f, 0xf6, 0x8e, 0x88, 0xe7, 0x10, 0x46, 0xfc, 0x7a, 0x9f, 0x38, 0x26, + 0xf5, 0xea, 0x52, 0x81, 0x5d, 0xab, 0xee, 0x33, 0xea, 0xe1, 0x0e, 0xa9, 0xf7, 0x37, 0xeb, 0x1d, + 0xe2, 0x10, 0x0f, 0x33, 0x62, 0xea, 0xae, 0x47, 0x19, 0x85, 0xff, 0x89, 0xcc, 0x74, 0xec, 0x5a, + 0xba, 0x34, 0xd3, 0xfb, 0x9b, 0x6b, 0xd7, 0x3b, 0x16, 0x3b, 0xe9, 0x1d, 0xe9, 0x06, 0xb5, 0xeb, + 0x1d, 0xda, 0xa1, 0x75, 0x61, 0x7d, 0xd4, 0x3b, 0x16, 0x27, 0x71, 0x10, 0xbf, 0x22, 0x96, 0x35, + 0x2d, 0xe1, 0xcc, 0xa0, 0x5e, 0x9e, 0xa7, 0xb5, 0x5b, 0xb1, 0x8d, 0x8d, 0x8d, 0x13, 0xcb, 0x21, + 0xde, 0xa0, 0xee, 0x9e, 0x76, 0xb8, 0xc0, 0xaf, 0xdb, 0x84, 0xe1, 0x3c, 0x54, 0x7d, 0x12, 0xca, + 0xeb, 0x39, 0xcc, 0xb2, 0xc9, 0x18, 0xe0, 0xf6, 0xcb, 0x00, 0xbe, 0x71, 0x42, 0x6c, 0x9c, 0xc5, + 0x69, 0x3f, 0x2b, 0x60, 0x7e, 0xbb, 0xbd, 0xbb, 0xe3, 0x59, 0x7d, 0xe2, 0xc1, 0xcf, 0xc1, 0x1c, + 0x8f, 0xc8, 0xc4, 0x0c, 0x57, 0x95, 0x75, 0x65, 0xa3, 0x7c, 0xf3, 0x86, 0x1e, 0xdf, 0xd4, 0x88, + 0x58, 0x77, 0x4f, 0x3b, 0x5c, 0xe0, 0xeb, 0xdc, 0x5a, 0xef, 0x6f, 0xea, 0x07, 0x47, 0x8f, 0x89, + 0xc1, 0x5a, 0x84, 0xe1, 0x06, 0x7c, 0x1a, 0xa8, 0x53, 0x61, 0xa0, 0x82, 0x58, 0x86, 0x46, 0xac, + 0xf0, 0x3e, 0x28, 0xfa, 0x2e, 0x31, 0xaa, 0xd3, 0x82, 0xfd, 0xaa, 0x9e, 0x5b, 0x07, 0x7d, 0x14, + 0x51, 0xdb, 0x25, 0x46, 0x63, 0x41, 0x32, 0x16, 0xf9, 0x09, 0x09, 0xbc, 0xf6, 0x93, 0x02, 0x16, + 0x47, 0x56, 0x7b, 0x96, 0xcf, 0xe0, 0x27, 0x63, 0xb1, 0xeb, 0x17, 0x8b, 0x9d, 0xa3, 0x45, 0xe4, + 0x15, 0xe9, 0x67, 0x6e, 0x28, 0x49, 0xc4, 0xdd, 0x04, 0x25, 0x8b, 0x11, 0xdb, 0xaf, 0x4e, 0xaf, + 0x17, 0x36, 0xca, 0x37, 0xd7, 0x5f, 0x16, 0x78, 0x63, 0x51, 0x92, 0x95, 0x76, 0x39, 0x0c, 0x45, + 0x68, 0xed, 0x9f, 0xe9, 0x44, 0xd8, 0x3c, 0x1d, 0x78, 0x17, 0x5c, 0xc1, 0x8c, 0x61, 0xe3, 0x04, + 0x91, 0x27, 0x3d, 0xcb, 0x23, 0xa6, 0x08, 0x7e, 0xae, 0x01, 0xc3, 0x40, 0xbd, 0xb2, 0x95, 0xd2, + 0xa0, 0x8c, 0x25, 0xc7, 0xba, 0xd4, 0xdc, 0x75, 0x8e, 0xe9, 0x81, 0xd3, 0xa2, 0x3d, 0x87, 0x89, + 0x6b, 0x95, 0xd8, 0xc3, 0x94, 0x06, 0x65, 0x2c, 0xa1, 0x01, 0x56, 0xfb, 0xb4, 0xdb, 0xb3, 0xc9, + 0x9e, 0x75, 0x4c, 0x8c, 0x81, 0xd1, 0x25, 0x2d, 0x6a, 0x12, 0xbf, 0x5a, 0x58, 0x2f, 0x6c, 0xcc, + 0x37, 0xea, 0x61, 0xa0, 0xae, 0x3e, 0xca, 0xd1, 0x9f, 0x05, 0xea, 0x4a, 0x8e, 0x1c, 0xe5, 0x92, + 0xc1, 0x7b, 0x60, 0x49, 0x5e, 0xce, 0x36, 0x76, 0xb1, 0x61, 0xb1, 0x41, 0xb5, 0x28, 0x22, 0x5c, + 0x09, 0x03, 0x75, 0xa9, 0x9d, 0x56, 0xa1, 0xac, 0x2d, 0x7c, 0x00, 0x16, 0x8f, 0xfd, 0xf7, 0x3d, + 0xda, 0x73, 0x0f, 0x69, 0xd7, 0x32, 0x06, 0xd5, 0xd2, 0xba, 0xb2, 0x31, 0xdf, 0xd0, 0xc2, 0x40, + 0x5d, 0xbc, 0xdf, 0x4e, 0x28, 0xce, 0xb2, 0x02, 0x94, 0x06, 0x6a, 0x3f, 0x2a, 0x60, 0x76, 0xbb, + 0xbd, 0xbb, 0x4f, 0x4d, 0x72, 0x09, 0x4d, 0xbe, 0x93, 0x6a, 0x72, 0x6d, 0x72, 0xaf, 0xf0, 0x78, + 0x26, 0xb6, 0xf8, 0xdf, 0x51, 0x8b, 0x73, 0x1b, 0x39, 0x9e, 0xeb, 0xa0, 0xe8, 0x60, 0x9b, 0x88, + 0xa8, 0xe7, 0x63, 0xcc, 0x3e, 0xb6, 0x09, 0x12, 0x1a, 0xf8, 0x3a, 0x98, 0x71, 0xa8, 0x49, 0x76, + 0x77, 0x84, 0xef, 0xf9, 0xc6, 0x15, 0x69, 0x33, 0xb3, 0x2f, 0xa4, 0x48, 0x6a, 0xe1, 0x2d, 0xb0, + 0xc0, 0xa8, 0x4b, 0xbb, 0xb4, 0x33, 0xf8, 0x80, 0x0c, 0x86, 0x55, 0xaf, 0x84, 0x81, 0xba, 0xf0, + 0x30, 0x21, 0x47, 0x29, 0x2b, 0xf8, 0x29, 0x28, 0xe3, 0x6e, 0x97, 0x1a, 0x98, 0xe1, 0xa3, 0x2e, + 0x11, 0xa5, 0x2c, 0xdf, 0xbc, 0x36, 0x21, 0xbd, 0xa8, 0x4b, 0xb8, 0x5f, 0x44, 0x7c, 0xda, 0xf3, + 0x0c, 0xe2, 0x37, 0x96, 0xc2, 0x40, 0x2d, 0x6f, 0xc5, 0x14, 0x28, 0xc9, 0xa7, 0xfd, 0xa0, 0x80, + 0xb2, 0x4c, 0xf8, 0x12, 0x26, 0x7a, 0x3b, 0x3d, 0xd1, 0xb5, 0xf3, 0xab, 0x34, 0x61, 0x9e, 0x3f, + 0x1b, 0x45, 0x2c, 0x86, 0xf9, 0x00, 0xcc, 0x9a, 0xa2, 0x54, 0x7e, 0x55, 0x11, 0xac, 0x57, 0xcf, + 0x67, 0x95, 0xbb, 0x62, 0x49, 0x72, 0xcf, 0x46, 0x67, 0x1f, 0x0d, 0x59, 0xb4, 0x6f, 0x66, 0xc0, + 0xc2, 0x70, 0x4c, 0xba, 0xd8, 0xf7, 0x2f, 0xa1, 0x79, 0xdf, 0x05, 0x65, 0xd7, 0xa3, 0x7d, 0xcb, + 0xb7, 0xa8, 0x43, 0x3c, 0xd9, 0x47, 0x2b, 0x12, 0x52, 0x3e, 0x8c, 0x55, 0x28, 0x69, 0x07, 0x3b, + 0x00, 0xb8, 0xd8, 0xc3, 0x36, 0x61, 0x3c, 0xfb, 0x82, 0xc8, 0xfe, 0x9d, 0x09, 0xd9, 0x27, 0x33, + 0xd2, 0x0f, 0x47, 0xa8, 0xa6, 0xc3, 0xbc, 0x41, 0x1c, 0x5d, 0xac, 0x40, 0x09, 0x6a, 0x78, 0x0a, + 0x16, 0x3d, 0x62, 0x74, 0xb1, 0x65, 0xcb, 0xa5, 0x50, 0x14, 0x11, 0x36, 0xf9, 0x52, 0x40, 0x49, + 0xc5, 0x59, 0xa0, 0xde, 0x18, 0x7f, 0xa0, 0xf5, 0x43, 0xe2, 0xf9, 0x96, 0xcf, 0x88, 0xc3, 0xa2, + 0x0e, 0x4d, 0x61, 0x50, 0x9a, 0x9b, 0xcf, 0x89, 0xcd, 0xd7, 0xe5, 0x81, 0xcb, 0x2c, 0xea, 0xf8, + 0xd5, 0x52, 0x3c, 0x27, 0xad, 0x84, 0x1c, 0xa5, 0xac, 0xe0, 0x1e, 0x58, 0xe5, 0x7d, 0xfd, 0x45, + 0xe4, 0xa0, 0xf9, 0xa5, 0x8b, 0x1d, 0x7e, 0x4b, 0xd5, 0x19, 0xb1, 0xfb, 0xaa, 0x7c, 0xb7, 0x6e, + 0xe5, 0xe8, 0x51, 0x2e, 0x0a, 0x7e, 0x04, 0x96, 0xa3, 0xe5, 0xda, 0xb0, 0x1c, 0xd3, 0x72, 0x3a, + 0x7c, 0xb5, 0x56, 0x67, 0x45, 0xd2, 0xd7, 0xc2, 0x40, 0x5d, 0x7e, 0x94, 0x55, 0x9e, 0xe5, 0x09, + 0xd1, 0x38, 0x09, 0x7c, 0x02, 0x96, 0x85, 0x47, 0x62, 0xca, 0xa1, 0xb7, 0x88, 0x5f, 0x9d, 0x13, + 0xa5, 0xdb, 0x48, 0x96, 0x8e, 0x5f, 0x1d, 0xaf, 0xdb, 0x70, 0x35, 0xb4, 0x49, 0x97, 0x18, 0x8c, + 0x7a, 0x0f, 0x89, 0x67, 0x37, 0xfe, 0x2f, 0xeb, 0xb5, 0xbc, 0x95, 0xa5, 0x42, 0xe3, 0xec, 0x6b, + 0xf7, 0xc0, 0x52, 0xa6, 0xe0, 0xb0, 0x02, 0x0a, 0xa7, 0x64, 0x10, 0x2d, 0x35, 0xc4, 0x7f, 0xc2, + 0x55, 0x50, 0xea, 0xe3, 0x6e, 0x8f, 0x44, 0xcd, 0x87, 0xa2, 0xc3, 0xdd, 0xe9, 0x3b, 0x8a, 0xf6, + 0x8b, 0x02, 0x2a, 0xc9, 0xee, 0xb9, 0x84, 0x3d, 0xf1, 0x20, 0xbd, 0x27, 0x5e, 0xbb, 0x40, 0x4f, + 0x4f, 0x58, 0x16, 0xdf, 0x4f, 0x83, 0x4a, 0x54, 0x97, 0xe8, 0x5d, 0xb7, 0x89, 0xc3, 0x2e, 0x61, + 0xa0, 0x5b, 0xa9, 0xd7, 0xe8, 0xad, 0x73, 0xd7, 0x75, 0x1c, 0xd8, 0xa4, 0x67, 0x09, 0x7e, 0x08, + 0x66, 0x7c, 0x86, 0x59, 0x8f, 0x0f, 0x39, 0x27, 0xbc, 0x7e, 0x51, 0x42, 0x01, 0x8a, 0x5f, 0xa4, + 0xe8, 0x8c, 0x24, 0x99, 0xf6, 0xab, 0x02, 0x56, 0xb3, 0x90, 0x4b, 0xa8, 0xee, 0x5e, 0xba, 0xba, + 0x6f, 0x5c, 0x30, 0x99, 0x09, 0x15, 0xfe, 0x5d, 0x01, 0xff, 0x1d, 0xcb, 0x5b, 0xbc, 0x7d, 0x7c, + 0x27, 0xb8, 0x99, 0xcd, 0xb3, 0x1f, 0xbf, 0xe5, 0x62, 0x27, 0x1c, 0xe6, 0xe8, 0x51, 0x2e, 0x0a, + 0x3e, 0x06, 0x15, 0xcb, 0xe9, 0x5a, 0x0e, 0x89, 0x64, 0xed, 0xb8, 0xbe, 0xb9, 0x83, 0x9b, 0x65, + 0x16, 0xc5, 0x5d, 0x0d, 0x03, 0xb5, 0xb2, 0x9b, 0x61, 0x41, 0x63, 0xbc, 0xda, 0x6f, 0x39, 0x95, + 0x11, 0xaf, 0xdd, 0xdb, 0x60, 0x2e, 0xfa, 0x20, 0x25, 0x9e, 0x4c, 0x63, 0x74, 0xd3, 0x5b, 0x52, + 0x8e, 0x46, 0x16, 0xa2, 0x6f, 0xc4, 0x55, 0xc8, 0x40, 0x2f, 0xdc, 0x37, 0x02, 0x94, 0xe8, 0x1b, + 0x71, 0x46, 0x92, 0x8c, 0x07, 0xc1, 0xbf, 0x69, 0xc4, 0x5d, 0x16, 0xd2, 0x41, 0xec, 0x4b, 0x39, + 0x1a, 0x59, 0x68, 0x7f, 0x15, 0x72, 0x0a, 0x24, 0x1a, 0x30, 0x91, 0xcd, 0xf0, 0x13, 0x3c, 0x9b, + 0x8d, 0x39, 0xca, 0xc6, 0x84, 0xdf, 0x29, 0x00, 0xe2, 0x11, 0x45, 0x6b, 0xd8, 0xa0, 0x51, 0x17, + 0x35, 0x5f, 0x69, 0x24, 0xf4, 0xad, 0x31, 0x9e, 0xe8, 0x25, 0x5c, 0x93, 0xfe, 0xe1, 0xb8, 0x01, + 0xca, 0x71, 0x0e, 0x4d, 0x50, 0x8e, 0xa4, 0x4d, 0xcf, 0xa3, 0x9e, 0x1c, 0x4f, 0xed, 0xdc, 0x58, + 0x84, 0x65, 0xa3, 0x26, 0x3e, 0xcb, 0x62, 0xe8, 0x59, 0xa0, 0x96, 0x13, 0x7a, 0x94, 0xa4, 0xe5, + 0x5e, 0x4c, 0x12, 0x7b, 0x29, 0xbe, 0x9a, 0x97, 0x1d, 0x32, 0xd9, 0x4b, 0x82, 0x76, 0xad, 0x09, + 0xfe, 0x37, 0xe1, 0x5a, 0x5e, 0xe9, 0xbd, 0xf8, 0x5a, 0x01, 0x49, 0x1f, 0x70, 0x0f, 0x14, 0xf9, + 0xbf, 0x61, 0xb9, 0x48, 0xae, 0x5d, 0x6c, 0x91, 0x3c, 0xb4, 0x6c, 0x12, 0xaf, 0x42, 0x7e, 0x42, + 0x82, 0x05, 0xbe, 0x09, 0x66, 0x6d, 0xe2, 0xfb, 0xb8, 0x23, 0x3d, 0xc7, 0x1f, 0x72, 0xad, 0x48, + 0x8c, 0x86, 0x7a, 0xed, 0x36, 0x58, 0xc9, 0xf9, 0x20, 0x86, 0x2a, 0x28, 0x19, 0xe2, 0x8f, 0x1b, + 0x0f, 0xa8, 0xd4, 0x98, 0xe7, 0x1b, 0x65, 0x5b, 0xfc, 0x5f, 0x8b, 0xe4, 0x8d, 0x8d, 0xa7, 0x2f, + 0x6a, 0x53, 0xcf, 0x5e, 0xd4, 0xa6, 0x9e, 0xbf, 0xa8, 0x4d, 0x7d, 0x15, 0xd6, 0x94, 0xa7, 0x61, + 0x4d, 0x79, 0x16, 0xd6, 0x94, 0xe7, 0x61, 0x4d, 0xf9, 0x23, 0xac, 0x29, 0xdf, 0xfe, 0x59, 0x9b, + 0xfa, 0x78, 0xba, 0xbf, 0xf9, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x83, 0x24, 0x44, 0x13, + 0x11, 0x00, 0x00, } func (m *CSIDriver) Marshal() (dAtA []byte, err error) { @@ -717,6 +721,23 @@ func (m *CSIDriverSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.FSGroupPolicy != nil { + i -= len(*m.FSGroupPolicy) + copy(dAtA[i:], *m.FSGroupPolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FSGroupPolicy))) + i-- + dAtA[i] = 0x2a + } + if m.StorageCapacity != nil { + i-- + if *m.StorageCapacity { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } if len(m.VolumeLifecycleModes) > 0 { for iNdEx := len(m.VolumeLifecycleModes) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.VolumeLifecycleModes[iNdEx]) @@ -1475,6 +1496,13 @@ func (m *CSIDriverSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if m.StorageCapacity != nil { + n += 2 + } + if m.FSGroupPolicy != nil { + l = len(*m.FSGroupPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -1763,6 +1791,8 @@ func (this *CSIDriverSpec) String() string { `AttachRequired:` + valueToStringGenerated(this.AttachRequired) + `,`, `PodInfoOnMount:` + valueToStringGenerated(this.PodInfoOnMount) + `,`, `VolumeLifecycleModes:` + fmt.Sprintf("%v", this.VolumeLifecycleModes) + `,`, + `StorageCapacity:` + valueToStringGenerated(this.StorageCapacity) + `,`, + `FSGroupPolicy:` + valueToStringGenerated(this.FSGroupPolicy) + `,`, `}`, }, "") return s @@ -2315,6 +2345,60 @@ func (m *CSIDriverSpec) Unmarshal(dAtA []byte) error { } m.VolumeLifecycleModes = append(m.VolumeLifecycleModes, VolumeLifecycleMode(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageCapacity", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.StorageCapacity = &b + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FSGroupPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := FSGroupPolicy(dAtA[iNdEx:postIndex]) + m.FSGroupPolicy = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/api/storage/v1/generated.proto b/vendor/k8s.io/api/storage/v1/generated.proto index cb3c42c7fe1..a3526ca4e43 100644 --- a/vendor/k8s.io/api/storage/v1/generated.proto +++ b/vendor/k8s.io/api/storage/v1/generated.proto @@ -118,6 +118,34 @@ message CSIDriverSpec { // +optional // +listType=set repeated string volumeLifecycleModes = 3; + + // If set to true, storageCapacity indicates that the CSI + // volume driver wants pod scheduling to consider the storage + // capacity that the driver deployment will report by creating + // CSIStorageCapacity objects with capacity information. + // + // The check can be enabled immediately when deploying a driver. + // In that case, provisioning new volumes with late binding + // will pause until the driver deployment has published + // some suitable CSIStorageCapacity object. + // + // Alternatively, the driver can be deployed with the field + // unset or false and it can be flipped later when storage + // capacity information has been published. + // + // This is an alpha field and only available when the CSIStorageCapacity + // feature is enabled. The default is false. + // + // +optional + optional bool storageCapacity = 4; + + // Defines if the underlying volume supports changing ownership and + // permission of the volume before being mounted. + // Refer to the specific FSGroupPolicy values for additional details. + // This field is alpha-level, and is only honored by servers + // that enable the CSIVolumeFSGroupPolicy feature gate. + // +optional + optional string fsGroupPolicy = 5; } // CSINode holds information about all CSI drivers installed on a node. diff --git a/vendor/k8s.io/api/storage/v1/types.go b/vendor/k8s.io/api/storage/v1/types.go index 556427bb20e..27e06debb1a 100644 --- a/vendor/k8s.io/api/storage/v1/types.go +++ b/vendor/k8s.io/api/storage/v1/types.go @@ -316,8 +316,67 @@ type CSIDriverSpec struct { // +optional // +listType=set VolumeLifecycleModes []VolumeLifecycleMode `json:"volumeLifecycleModes,omitempty" protobuf:"bytes,3,opt,name=volumeLifecycleModes"` + + // If set to true, storageCapacity indicates that the CSI + // volume driver wants pod scheduling to consider the storage + // capacity that the driver deployment will report by creating + // CSIStorageCapacity objects with capacity information. + // + // The check can be enabled immediately when deploying a driver. + // In that case, provisioning new volumes with late binding + // will pause until the driver deployment has published + // some suitable CSIStorageCapacity object. + // + // Alternatively, the driver can be deployed with the field + // unset or false and it can be flipped later when storage + // capacity information has been published. + // + // This is an alpha field and only available when the CSIStorageCapacity + // feature is enabled. The default is false. + // + // +optional + StorageCapacity *bool `json:"storageCapacity,omitempty" protobuf:"bytes,4,opt,name=storageCapacity"` + + // Defines if the underlying volume supports changing ownership and + // permission of the volume before being mounted. + // Refer to the specific FSGroupPolicy values for additional details. + // This field is alpha-level, and is only honored by servers + // that enable the CSIVolumeFSGroupPolicy feature gate. + // +optional + FSGroupPolicy *FSGroupPolicy `json:"fsGroupPolicy,omitempty" protobuf:"bytes,5,opt,name=fsGroupPolicy"` } +// FSGroupPolicy specifies if a CSI Driver supports modifying +// volume ownership and permissions of the volume to be mounted. +// More modes may be added in the future. +type FSGroupPolicy string + +const ( + // ReadWriteOnceWithFSTypeFSGroupPolicy indicates that each volume will be examined + // to determine if the volume ownership and permissions + // should be modified. If a fstype is defined and the volume's access mode + // contains ReadWriteOnce, then the defined fsGroup will be applied. + // This mode should be defined if it's expected that the + // fsGroup may need to be modified depending on the pod's SecurityPolicy. + // This is the default behavior if no other FSGroupPolicy is defined. + ReadWriteOnceWithFSTypeFSGroupPolicy FSGroupPolicy = "ReadWriteOnceWithFSType" + + // FileFSGroupPolicy indicates that CSI driver supports volume ownership + // and permission change via fsGroup, and Kubernetes may use fsGroup + // to change permissions and ownership of the volume to match user requested fsGroup in + // the pod's SecurityPolicy regardless of fstype or access mode. + // This mode should be defined if the fsGroup is expected to always change on mount + FileFSGroupPolicy FSGroupPolicy = "File" + + // NoneFSGroupPolicy indicates that volumes will be mounted without performing + // any ownership or permission modifications, as the CSIDriver does not support + // these operations. + // This mode should be selected if the CSIDriver does not support fsGroup modifications, + // for example when Kubernetes cannot change ownership and permissions on a volume due + // to root-squash settings on a NFS volume. + NoneFSGroupPolicy FSGroupPolicy = "None" +) + // VolumeLifecycleMode is an enumeration of possible usage modes for a volume // provided by a CSI driver. More modes may be added in the future. type VolumeLifecycleMode string diff --git a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go index 0e524a28cd9..606cda4dbc8 100644 --- a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go @@ -52,6 +52,8 @@ var map_CSIDriverSpec = map[string]string{ "attachRequired": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.", "podInfoOnMount": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" iff the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.", "volumeLifecycleModes": "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.", + "storageCapacity": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false.", + "fsGroupPolicy": "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.", } func (CSIDriverSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go index efaa40aa790..5eb0225a06b 100644 --- a/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go @@ -103,6 +103,16 @@ func (in *CSIDriverSpec) DeepCopyInto(out *CSIDriverSpec) { *out = make([]VolumeLifecycleMode, len(*in)) copy(*out, *in) } + if in.StorageCapacity != nil { + in, out := &in.StorageCapacity, &out.StorageCapacity + *out = new(bool) + **out = **in + } + if in.FSGroupPolicy != nil { + in, out := &in.FSGroupPolicy, &out.FSGroupPolicy + *out = new(FSGroupPolicy) + **out = **in + } return } diff --git a/vendor/k8s.io/api/storage/v1alpha1/BUILD b/vendor/k8s.io/api/storage/v1alpha1/BUILD index aa03c3f23af..c8c9cda81bb 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/BUILD +++ b/vendor/k8s.io/api/storage/v1alpha1/BUILD @@ -15,6 +15,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", diff --git a/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go b/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go index 1f9db7ae08a..1b7767fdccc 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go @@ -27,6 +27,8 @@ import ( proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v11 "k8s.io/api/core/v1" + resource "k8s.io/apimachinery/pkg/api/resource" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" @@ -45,10 +47,66 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } +func (*CSIStorageCapacity) ProtoMessage() {} +func (*CSIStorageCapacity) Descriptor() ([]byte, []int) { + return fileDescriptor_10f856db1e670dc4, []int{0} +} +func (m *CSIStorageCapacity) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CSIStorageCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CSIStorageCapacity) XXX_Merge(src proto.Message) { + xxx_messageInfo_CSIStorageCapacity.Merge(m, src) +} +func (m *CSIStorageCapacity) XXX_Size() int { + return m.Size() +} +func (m *CSIStorageCapacity) XXX_DiscardUnknown() { + xxx_messageInfo_CSIStorageCapacity.DiscardUnknown(m) +} + +var xxx_messageInfo_CSIStorageCapacity proto.InternalMessageInfo + +func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } +func (*CSIStorageCapacityList) ProtoMessage() {} +func (*CSIStorageCapacityList) Descriptor() ([]byte, []int) { + return fileDescriptor_10f856db1e670dc4, []int{1} +} +func (m *CSIStorageCapacityList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CSIStorageCapacityList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CSIStorageCapacityList) XXX_Merge(src proto.Message) { + xxx_messageInfo_CSIStorageCapacityList.Merge(m, src) +} +func (m *CSIStorageCapacityList) XXX_Size() int { + return m.Size() +} +func (m *CSIStorageCapacityList) XXX_DiscardUnknown() { + xxx_messageInfo_CSIStorageCapacityList.DiscardUnknown(m) +} + +var xxx_messageInfo_CSIStorageCapacityList proto.InternalMessageInfo + func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } func (*VolumeAttachment) ProtoMessage() {} func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{0} + return fileDescriptor_10f856db1e670dc4, []int{2} } func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +134,7 @@ var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } func (*VolumeAttachmentList) ProtoMessage() {} func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{1} + return fileDescriptor_10f856db1e670dc4, []int{3} } func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -104,7 +162,7 @@ var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } func (*VolumeAttachmentSource) ProtoMessage() {} func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{2} + return fileDescriptor_10f856db1e670dc4, []int{4} } func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +190,7 @@ var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } func (*VolumeAttachmentSpec) ProtoMessage() {} func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{3} + return fileDescriptor_10f856db1e670dc4, []int{5} } func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -160,7 +218,7 @@ var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } func (*VolumeAttachmentStatus) ProtoMessage() {} func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{4} + return fileDescriptor_10f856db1e670dc4, []int{6} } func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -188,7 +246,7 @@ var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo func (m *VolumeError) Reset() { *m = VolumeError{} } func (*VolumeError) ProtoMessage() {} func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_10f856db1e670dc4, []int{5} + return fileDescriptor_10f856db1e670dc4, []int{7} } func (m *VolumeError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,6 +272,8 @@ func (m *VolumeError) XXX_DiscardUnknown() { var xxx_messageInfo_VolumeError proto.InternalMessageInfo func init() { + proto.RegisterType((*CSIStorageCapacity)(nil), "k8s.io.api.storage.v1alpha1.CSIStorageCapacity") + proto.RegisterType((*CSIStorageCapacityList)(nil), "k8s.io.api.storage.v1alpha1.CSIStorageCapacityList") proto.RegisterType((*VolumeAttachment)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachment") proto.RegisterType((*VolumeAttachmentList)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachmentList") proto.RegisterType((*VolumeAttachmentSource)(nil), "k8s.io.api.storage.v1alpha1.VolumeAttachmentSource") @@ -228,54 +288,172 @@ func init() { } var fileDescriptor_10f856db1e670dc4 = []byte{ - // 745 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xc7, 0xe3, 0x24, 0x6d, 0xd3, 0x0d, 0x1f, 0xd1, 0x2a, 0x82, 0x28, 0x48, 0x4e, 0x95, 0x53, - 0x40, 0x74, 0x4d, 0x0a, 0x42, 0x15, 0xb7, 0x58, 0xed, 0xa1, 0xa2, 0x2d, 0x68, 0x8b, 0x38, 0x00, - 0x07, 0x36, 0xf6, 0xe2, 0xb8, 0x89, 0x3f, 0xe4, 0x5d, 0x47, 0xea, 0x8d, 0x13, 0x67, 0x6e, 0xbc, - 0x01, 0xcf, 0x92, 0x1b, 0x15, 0xa7, 0x9e, 0x22, 0x6a, 0xde, 0x82, 0x0b, 0x68, 0xd7, 0x9b, 0xc4, - 0x24, 0x29, 0xb4, 0xbd, 0x79, 0x66, 0x67, 0x7e, 0x33, 0xf3, 0xdf, 0xf1, 0x82, 0x9d, 0xfe, 0x36, - 0x43, 0x6e, 0x60, 0xf4, 0xe3, 0x2e, 0x8d, 0x7c, 0xca, 0x29, 0x33, 0x86, 0xd4, 0xb7, 0x83, 0xc8, - 0x50, 0x07, 0x24, 0x74, 0x0d, 0xc6, 0x83, 0x88, 0x38, 0xd4, 0x18, 0xb6, 0xc9, 0x20, 0xec, 0x91, - 0xb6, 0xe1, 0x50, 0x9f, 0x46, 0x84, 0x53, 0x1b, 0x85, 0x51, 0xc0, 0x03, 0x78, 0x2f, 0x0d, 0x46, - 0x24, 0x74, 0x91, 0x0a, 0x46, 0x93, 0xe0, 0xfa, 0xa6, 0xe3, 0xf2, 0x5e, 0xdc, 0x45, 0x56, 0xe0, - 0x19, 0x4e, 0xe0, 0x04, 0x86, 0xcc, 0xe9, 0xc6, 0x1f, 0xa4, 0x25, 0x0d, 0xf9, 0x95, 0xb2, 0xea, - 0xcd, 0x4c, 0x61, 0x2b, 0x88, 0x44, 0xd5, 0xf9, 0x7a, 0xf5, 0x27, 0xb3, 0x18, 0x8f, 0x58, 0x3d, - 0xd7, 0xa7, 0xd1, 0x89, 0x11, 0xf6, 0x1d, 0xe1, 0x60, 0x86, 0x47, 0x39, 0x59, 0x96, 0x65, 0x5c, - 0x94, 0x15, 0xc5, 0x3e, 0x77, 0x3d, 0xba, 0x90, 0xf0, 0xf4, 0x7f, 0x09, 0xcc, 0xea, 0x51, 0x8f, - 0xcc, 0xe7, 0x35, 0xbf, 0xe6, 0x41, 0xe5, 0x75, 0x30, 0x88, 0x3d, 0xda, 0xe1, 0x9c, 0x58, 0x3d, - 0x8f, 0xfa, 0x1c, 0xbe, 0x07, 0x25, 0xd1, 0x98, 0x4d, 0x38, 0xa9, 0x69, 0x1b, 0x5a, 0xab, 0xbc, - 0xf5, 0x08, 0xcd, 0x64, 0x9b, 0xf2, 0x51, 0xd8, 0x77, 0x84, 0x83, 0x21, 0x11, 0x8d, 0x86, 0x6d, - 0xf4, 0xa2, 0x7b, 0x4c, 0x2d, 0x7e, 0x40, 0x39, 0x31, 0xe1, 0x68, 0xdc, 0xc8, 0x25, 0xe3, 0x06, - 0x98, 0xf9, 0xf0, 0x94, 0x0a, 0x8f, 0x40, 0x91, 0x85, 0xd4, 0xaa, 0xe5, 0x25, 0xbd, 0x8d, 0xfe, - 0x71, 0x29, 0x68, 0xbe, 0xbd, 0xa3, 0x90, 0x5a, 0xe6, 0x0d, 0x85, 0x2f, 0x0a, 0x0b, 0x4b, 0x18, - 0x7c, 0x0b, 0x56, 0x19, 0x27, 0x3c, 0x66, 0xb5, 0x82, 0xc4, 0x3e, 0xbe, 0x1a, 0x56, 0xa6, 0x9a, - 0xb7, 0x14, 0x78, 0x35, 0xb5, 0xb1, 0x42, 0x36, 0x47, 0x1a, 0xa8, 0xce, 0xa7, 0xec, 0xbb, 0x8c, - 0xc3, 0x77, 0x0b, 0x62, 0xa1, 0xcb, 0x89, 0x25, 0xb2, 0xa5, 0x54, 0x15, 0x55, 0xb2, 0x34, 0xf1, - 0x64, 0x84, 0xc2, 0x60, 0xc5, 0xe5, 0xd4, 0x63, 0xb5, 0xfc, 0x46, 0xa1, 0x55, 0xde, 0xda, 0xbc, - 0xd2, 0x48, 0xe6, 0x4d, 0x45, 0x5e, 0xd9, 0x13, 0x0c, 0x9c, 0xa2, 0x9a, 0xdf, 0x35, 0x70, 0x67, - 0x61, 0xfa, 0x20, 0x8e, 0x2c, 0x0a, 0xf7, 0x41, 0x35, 0xa4, 0x11, 0x73, 0x19, 0xa7, 0x3e, 0x4f, - 0x63, 0x0e, 0x89, 0x47, 0xe5, 0x60, 0xeb, 0x66, 0x2d, 0x19, 0x37, 0xaa, 0x2f, 0x97, 0x9c, 0xe3, - 0xa5, 0x59, 0xf0, 0x18, 0x54, 0x5c, 0x7f, 0xe0, 0xfa, 0x34, 0xf5, 0x1d, 0xcd, 0x6e, 0xbc, 0x95, - 0x9d, 0x43, 0xfc, 0x3a, 0x42, 0x90, 0x79, 0xb2, 0xbc, 0xe8, 0x6a, 0x32, 0x6e, 0x54, 0xf6, 0xe6, - 0x28, 0x78, 0x81, 0xdb, 0xfc, 0xb6, 0xe4, 0x7e, 0xc4, 0x01, 0x7c, 0x08, 0x4a, 0x44, 0x7a, 0x68, - 0xa4, 0xc6, 0x98, 0xea, 0xdd, 0x51, 0x7e, 0x3c, 0x8d, 0x90, 0x3b, 0x24, 0xa5, 0x50, 0x8d, 0x5e, - 0x71, 0x87, 0x64, 0x6a, 0x66, 0x87, 0xa4, 0x8d, 0x15, 0x52, 0xb4, 0xe2, 0x07, 0x76, 0xaa, 0x68, - 0xe1, 0xef, 0x56, 0x0e, 0x95, 0x1f, 0x4f, 0x23, 0x9a, 0xbf, 0x0b, 0x4b, 0xae, 0x49, 0x2e, 0x63, - 0x66, 0x26, 0x5b, 0xce, 0x54, 0x5a, 0x98, 0xc9, 0x9e, 0xce, 0x64, 0xc3, 0x2f, 0x1a, 0x80, 0x64, - 0x8a, 0x38, 0x98, 0x2c, 0x6b, 0xba, 0x51, 0xcf, 0xaf, 0xf1, 0x93, 0xa0, 0xce, 0x02, 0x6d, 0xd7, - 0xe7, 0xd1, 0x89, 0x59, 0x57, 0x5d, 0xc0, 0xc5, 0x00, 0xbc, 0xa4, 0x05, 0x78, 0x0c, 0xca, 0xa9, - 0x77, 0x37, 0x8a, 0x82, 0x48, 0xfd, 0xb6, 0xad, 0x4b, 0x74, 0x24, 0xe3, 0x4d, 0x3d, 0x19, 0x37, - 0xca, 0x9d, 0x19, 0xe0, 0xd7, 0xb8, 0x51, 0xce, 0x9c, 0xe3, 0x2c, 0x5c, 0xd4, 0xb2, 0xe9, 0xac, - 0x56, 0xf1, 0x3a, 0xb5, 0x76, 0xe8, 0xc5, 0xb5, 0x32, 0xf0, 0xfa, 0x2e, 0xb8, 0x7b, 0x81, 0x44, - 0xb0, 0x02, 0x0a, 0x7d, 0x7a, 0x92, 0x6e, 0x22, 0x16, 0x9f, 0xb0, 0x0a, 0x56, 0x86, 0x64, 0x10, - 0xa7, 0x1b, 0xb7, 0x8e, 0x53, 0xe3, 0x59, 0x7e, 0x5b, 0x6b, 0x7e, 0xd2, 0x40, 0xb6, 0x06, 0xdc, - 0x07, 0x45, 0xf1, 0x96, 0xab, 0x67, 0xe6, 0xc1, 0xe5, 0x9e, 0x99, 0x57, 0xae, 0x47, 0x67, 0xcf, - 0xa5, 0xb0, 0xb0, 0xa4, 0xc0, 0xfb, 0x60, 0xcd, 0xa3, 0x8c, 0x11, 0x47, 0x55, 0x36, 0x6f, 0xab, - 0xa0, 0xb5, 0x83, 0xd4, 0x8d, 0x27, 0xe7, 0x26, 0x1a, 0x9d, 0xeb, 0xb9, 0xd3, 0x73, 0x3d, 0x77, - 0x76, 0xae, 0xe7, 0x3e, 0x26, 0xba, 0x36, 0x4a, 0x74, 0xed, 0x34, 0xd1, 0xb5, 0xb3, 0x44, 0xd7, - 0x7e, 0x24, 0xba, 0xf6, 0xf9, 0xa7, 0x9e, 0x7b, 0x53, 0x9a, 0x08, 0xf7, 0x27, 0x00, 0x00, 0xff, - 0xff, 0xe8, 0x45, 0xe3, 0xba, 0xab, 0x07, 0x00, 0x00, + // 895 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0x8f, 0x9b, 0x74, 0x37, 0x3b, 0x29, 0x10, 0x8d, 0xa2, 0x25, 0x0a, 0x92, 0x53, 0xe5, 0x14, + 0x10, 0x3b, 0xa6, 0x0b, 0x42, 0x2b, 0x6e, 0x75, 0xdb, 0x43, 0x45, 0x5b, 0x60, 0x52, 0x21, 0x04, + 0x1c, 0x98, 0x38, 0x0f, 0xc7, 0x4d, 0xfc, 0x47, 0x33, 0xe3, 0x4a, 0xb9, 0xc1, 0x85, 0x33, 0x37, + 0xbe, 0x01, 0x9f, 0xa5, 0x07, 0x24, 0x56, 0x9c, 0xf6, 0x14, 0x51, 0xf3, 0x2d, 0xb8, 0x80, 0x3c, + 0x9e, 0x38, 0x6e, 0x9c, 0x74, 0xb3, 0x7b, 0xd8, 0x9b, 0xe7, 0xcd, 0x7b, 0xbf, 0xdf, 0xfb, 0xf3, + 0x9b, 0x27, 0xa3, 0xe3, 0xc9, 0x33, 0x41, 0xbc, 0xd0, 0x9a, 0xc4, 0x43, 0xe0, 0x01, 0x48, 0x10, + 0xd6, 0x35, 0x04, 0xa3, 0x90, 0x5b, 0xfa, 0x82, 0x45, 0x9e, 0x25, 0x64, 0xc8, 0x99, 0x0b, 0xd6, + 0xf5, 0x01, 0x9b, 0x46, 0x63, 0x76, 0x60, 0xb9, 0x10, 0x00, 0x67, 0x12, 0x46, 0x24, 0xe2, 0xa1, + 0x0c, 0xf1, 0x7b, 0x99, 0x33, 0x61, 0x91, 0x47, 0xb4, 0x33, 0x59, 0x38, 0x77, 0x9e, 0xb8, 0x9e, + 0x1c, 0xc7, 0x43, 0xe2, 0x84, 0xbe, 0xe5, 0x86, 0x6e, 0x68, 0xa9, 0x98, 0x61, 0xfc, 0xa3, 0x3a, + 0xa9, 0x83, 0xfa, 0xca, 0xb0, 0x3a, 0xbd, 0x02, 0xb1, 0x13, 0xf2, 0x94, 0x75, 0x95, 0xaf, 0xf3, + 0xc9, 0xd2, 0xc7, 0x67, 0xce, 0xd8, 0x0b, 0x80, 0xcf, 0xac, 0x68, 0xe2, 0xaa, 0x20, 0x0e, 0x22, + 0x8c, 0xb9, 0x03, 0xaf, 0x14, 0x25, 0x2c, 0x1f, 0x24, 0x5b, 0xc7, 0x65, 0x6d, 0x8a, 0xe2, 0x71, + 0x20, 0x3d, 0xbf, 0x4c, 0xf3, 0xe9, 0xcb, 0x02, 0x84, 0x33, 0x06, 0x9f, 0xad, 0xc6, 0xf5, 0x7e, + 0xae, 0x22, 0x7c, 0x34, 0x38, 0x1d, 0x64, 0xfd, 0x3b, 0x62, 0x11, 0x73, 0x3c, 0x39, 0xc3, 0x3f, + 0xa0, 0x7a, 0x9a, 0xda, 0x88, 0x49, 0xd6, 0x36, 0xf6, 0x8d, 0x7e, 0xe3, 0xe9, 0x47, 0x64, 0xd9, + 0xee, 0x9c, 0x81, 0x44, 0x13, 0x37, 0x35, 0x08, 0x92, 0x7a, 0x93, 0xeb, 0x03, 0xf2, 0xc5, 0xf0, + 0x0a, 0x1c, 0x79, 0x0e, 0x92, 0xd9, 0xf8, 0x66, 0xde, 0xad, 0x24, 0xf3, 0x2e, 0x5a, 0xda, 0x68, + 0x8e, 0x8a, 0x3d, 0xb4, 0x17, 0x84, 0x23, 0xb8, 0x0c, 0xa3, 0x70, 0x1a, 0xba, 0xb3, 0xf6, 0x8e, + 0x62, 0xf9, 0x78, 0x3b, 0x96, 0x33, 0x36, 0x84, 0xe9, 0x00, 0xa6, 0xe0, 0xc8, 0x90, 0xdb, 0xcd, + 0x64, 0xde, 0xdd, 0xbb, 0x28, 0x80, 0xd1, 0x3b, 0xd0, 0xf8, 0x18, 0x35, 0xb5, 0x3e, 0x8e, 0xa6, + 0x4c, 0x88, 0x0b, 0xe6, 0x43, 0xbb, 0xba, 0x6f, 0xf4, 0x1f, 0xd9, 0x6d, 0x9d, 0x62, 0x73, 0xb0, + 0x72, 0x4f, 0x4b, 0x11, 0xf8, 0x1b, 0x54, 0x77, 0x74, 0x7b, 0xda, 0x35, 0x95, 0x2c, 0xb9, 0x2f, + 0x59, 0xb2, 0x50, 0x04, 0xf9, 0x2a, 0x66, 0x81, 0xf4, 0xe4, 0xcc, 0xde, 0x4b, 0xe6, 0xdd, 0xfa, + 0xa2, 0xc5, 0x34, 0x47, 0xeb, 0xfd, 0x61, 0xa0, 0xc7, 0xe5, 0x19, 0x9c, 0x79, 0x42, 0xe2, 0xef, + 0x4b, 0x73, 0x20, 0x5b, 0x76, 0xc8, 0x13, 0xd9, 0x14, 0x9a, 0xba, 0xc4, 0xfa, 0xc2, 0x52, 0x98, + 0xc1, 0x25, 0xda, 0xf5, 0x24, 0xf8, 0xa2, 0xbd, 0xb3, 0x5f, 0xed, 0x37, 0x9e, 0x5a, 0xe4, 0x9e, + 0x17, 0x45, 0xca, 0x19, 0xda, 0x6f, 0x69, 0xec, 0xdd, 0xd3, 0x14, 0x85, 0x66, 0x60, 0xbd, 0xdf, + 0x77, 0x50, 0xf3, 0xeb, 0x70, 0x1a, 0xfb, 0x70, 0x28, 0x25, 0x73, 0xc6, 0x3e, 0x04, 0xf2, 0x0d, + 0x08, 0x6a, 0x80, 0x6a, 0x22, 0x02, 0x47, 0x0b, 0xe9, 0xe0, 0xde, 0x5a, 0x56, 0xd3, 0x1b, 0x44, + 0xe0, 0xd8, 0x7b, 0x1a, 0xbe, 0x96, 0x9e, 0xa8, 0x02, 0xc3, 0xdf, 0xa1, 0x07, 0x42, 0x32, 0x19, + 0x0b, 0x25, 0x98, 0xbb, 0xfa, 0xdc, 0x02, 0x56, 0x85, 0xda, 0x6f, 0x6b, 0xe0, 0x07, 0xd9, 0x99, + 0x6a, 0xc8, 0xde, 0x8d, 0x81, 0x5a, 0xab, 0x21, 0x6f, 0x60, 0xea, 0xf4, 0xee, 0xd4, 0x9f, 0xbc, + 0x52, 0x49, 0x1b, 0x66, 0xfe, 0x97, 0x81, 0x1e, 0x97, 0xaa, 0x57, 0xf2, 0xc7, 0x67, 0xa8, 0x15, + 0x01, 0x17, 0x9e, 0x90, 0x10, 0xc8, 0xcc, 0x47, 0xbd, 0x40, 0x23, 0x7b, 0x81, 0xc9, 0xbc, 0xdb, + 0xfa, 0x72, 0xcd, 0x3d, 0x5d, 0x1b, 0x85, 0xaf, 0x50, 0xd3, 0x0b, 0xa6, 0x5e, 0x00, 0x99, 0x6d, + 0xb0, 0x9c, 0x78, 0xbf, 0x58, 0x47, 0xba, 0xc3, 0xd3, 0x86, 0xac, 0x22, 0xab, 0x41, 0xb7, 0xd2, + 0x17, 0x7f, 0xba, 0x82, 0x42, 0x4b, 0xb8, 0xbd, 0x3f, 0xd7, 0xcc, 0x27, 0xbd, 0xc0, 0x1f, 0xa2, + 0x3a, 0x53, 0x16, 0xe0, 0xba, 0x8c, 0xbc, 0xdf, 0x87, 0xda, 0x4e, 0x73, 0x0f, 0xa5, 0x21, 0xd5, + 0x8a, 0x35, 0x3b, 0x6e, 0x0b, 0x0d, 0xa9, 0xd0, 0x82, 0x86, 0xd4, 0x99, 0x6a, 0xc8, 0x34, 0x95, + 0x74, 0xd7, 0x15, 0x76, 0x5a, 0x9e, 0xca, 0x85, 0xb6, 0xd3, 0xdc, 0xa3, 0xf7, 0x5f, 0x75, 0xcd, + 0x98, 0x94, 0x18, 0x0b, 0x35, 0x8d, 0x54, 0x4d, 0xf5, 0x52, 0x4d, 0xa3, 0xbc, 0xa6, 0x11, 0xfe, + 0xcd, 0x40, 0x98, 0xe5, 0x10, 0xe7, 0x0b, 0xb1, 0x66, 0x8a, 0xfa, 0xfc, 0x35, 0x1e, 0x09, 0x39, + 0x2c, 0xa1, 0x9d, 0x04, 0x92, 0xcf, 0xec, 0x8e, 0xce, 0x02, 0x97, 0x1d, 0xe8, 0x9a, 0x14, 0xf0, + 0x15, 0x6a, 0x64, 0xd6, 0x13, 0xce, 0x43, 0xae, 0x9f, 0x6d, 0x7f, 0x8b, 0x8c, 0x94, 0xbf, 0x6d, + 0x26, 0xf3, 0x6e, 0xe3, 0x70, 0x09, 0xf0, 0xef, 0xbc, 0xdb, 0x28, 0xdc, 0xd3, 0x22, 0x78, 0xca, + 0x35, 0x82, 0x25, 0x57, 0xed, 0x75, 0xb8, 0x8e, 0x61, 0x33, 0x57, 0x01, 0xbc, 0x73, 0x82, 0xde, + 0xdd, 0xd0, 0x22, 0xdc, 0x44, 0xd5, 0x09, 0xcc, 0x32, 0x25, 0xd2, 0xf4, 0x13, 0xb7, 0xd0, 0xee, + 0x35, 0x9b, 0xc6, 0x99, 0xe2, 0x1e, 0xd1, 0xec, 0xf0, 0xd9, 0xce, 0x33, 0xa3, 0xf7, 0x8b, 0x81, + 0x8a, 0x1c, 0xf8, 0x0c, 0xd5, 0xd2, 0xdf, 0x03, 0xbd, 0x66, 0x3e, 0xd8, 0x6e, 0xcd, 0x5c, 0x7a, + 0x3e, 0x2c, 0xd7, 0x65, 0x7a, 0xa2, 0x0a, 0x05, 0xbf, 0x8f, 0x1e, 0xfa, 0x20, 0x04, 0x73, 0x35, + 0xb3, 0xfd, 0x8e, 0x76, 0x7a, 0x78, 0x9e, 0x99, 0xe9, 0xe2, 0xde, 0x26, 0x37, 0xb7, 0x66, 0xe5, + 0xf9, 0xad, 0x59, 0x79, 0x71, 0x6b, 0x56, 0x7e, 0x4a, 0x4c, 0xe3, 0x26, 0x31, 0x8d, 0xe7, 0x89, + 0x69, 0xbc, 0x48, 0x4c, 0xe3, 0xef, 0xc4, 0x34, 0x7e, 0xfd, 0xc7, 0xac, 0x7c, 0x5b, 0x5f, 0x34, + 0xee, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xb9, 0x9d, 0xb3, 0x34, 0x0a, 0x00, 0x00, +} + +func (m *CSIStorageCapacity) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CSIStorageCapacity) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CSIStorageCapacity) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Capacity != nil { + { + size, err := m.Capacity.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + i -= len(m.StorageClassName) + copy(dAtA[i:], m.StorageClassName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.StorageClassName))) + i-- + dAtA[i] = 0x1a + if m.NodeTopology != nil { + { + size, err := m.NodeTopology.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *CSIStorageCapacityList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CSIStorageCapacityList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CSIStorageCapacityList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *VolumeAttachment) Marshal() (dAtA []byte, err error) { @@ -591,6 +769,44 @@ func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *CSIStorageCapacity) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.NodeTopology != nil { + l = m.NodeTopology.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.StorageClassName) + n += 1 + l + sovGenerated(uint64(l)) + if m.Capacity != nil { + l = m.Capacity.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *CSIStorageCapacityList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func (m *VolumeAttachment) Size() (n int) { if m == nil { return 0 @@ -700,6 +916,35 @@ func sovGenerated(x uint64) (n int) { func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (this *CSIStorageCapacity) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CSIStorageCapacity{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `NodeTopology:` + strings.Replace(fmt.Sprintf("%v", this.NodeTopology), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `StorageClassName:` + fmt.Sprintf("%v", this.StorageClassName) + `,`, + `Capacity:` + strings.Replace(fmt.Sprintf("%v", this.Capacity), "Quantity", "resource.Quantity", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CSIStorageCapacityList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]CSIStorageCapacity{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "CSIStorageCapacity", "CSIStorageCapacity", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&CSIStorageCapacityList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} func (this *VolumeAttachment) String() string { if this == nil { return "nil" @@ -793,6 +1038,316 @@ func valueToStringGenerated(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } +func (m *CSIStorageCapacity) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CSIStorageCapacity: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CSIStorageCapacity: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeTopology", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NodeTopology == nil { + m.NodeTopology = &v1.LabelSelector{} + } + if err := m.NodeTopology.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageClassName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageClassName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Capacity == nil { + m.Capacity = &resource.Quantity{} + } + if err := m.Capacity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CSIStorageCapacityList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CSIStorageCapacityList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CSIStorageCapacityList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, CSIStorageCapacity{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *VolumeAttachment) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/vendor/k8s.io/api/storage/v1alpha1/generated.proto b/vendor/k8s.io/api/storage/v1alpha1/generated.proto index 76019639240..40a76405181 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/storage/v1alpha1/generated.proto @@ -22,6 +22,7 @@ syntax = 'proto2'; package k8s.io.api.storage.v1alpha1; import "k8s.io/api/core/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; @@ -29,6 +30,80 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1alpha1"; +// CSIStorageCapacity stores the result of one CSI GetCapacity call. +// For a given StorageClass, this describes the available capacity in a +// particular topology segment. This can be used when considering where to +// instantiate new PersistentVolumes. +// +// For example this can express things like: +// - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" +// - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for +// a certain combination: +// - no object exists with suitable topology and storage class name +// - such an object exists, but the capacity is unset +// - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// This is an alpha feature and only available when the CSIStorageCapacity feature is enabled. +message CSIStorageCapacity { + // Standard object's metadata. The name has no particular meaning. It must be + // be a DNS subdomain (dots allowed, 253 characters). To ensure that + // there are no conflicts with other CSI drivers on the cluster, the recommendation + // is to use csisc-, a generated name, or a reverse-domain name which ends + // with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // NodeTopology defines which nodes have access to the storage + // for which capacity was reported. If not set, the storage is + // not accessible from any node in the cluster. If empty, the + // storage is accessible from all nodes. This field is + // immutable. + // + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector nodeTopology = 2; + + // The name of the StorageClass that the reported capacity applies to. + // It must meet the same requirements as the name of a StorageClass + // object (non-empty, DNS subdomain). If that object no longer exists, + // the CSIStorageCapacity object is obsolete and should be removed by its + // creator. + // This field is immutable. + optional string storageClassName = 3; + + // Capacity is the value reported by the CSI driver in its GetCapacityResponse + // for a GetCapacityRequest with topology and parameters that match the + // previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: + // The available capacity, in bytes, of the storage that can be used + // to provision volumes. If not set, that information is currently + // unavailable and treated like zero capacity. + // + // +optional + optional k8s.io.apimachinery.pkg.api.resource.Quantity capacity = 4; +} + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +message CSIStorageCapacityList { + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of CSIStorageCapacity objects. + // +listType=map + // +listMapKey=name + repeated CSIStorageCapacity items = 2; +} + // VolumeAttachment captures the intent to attach or detach the specified volume // to/from the specified node. // diff --git a/vendor/k8s.io/api/storage/v1alpha1/register.go b/vendor/k8s.io/api/storage/v1alpha1/register.go index 7b81ee49c2b..779c858028c 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/register.go +++ b/vendor/k8s.io/api/storage/v1alpha1/register.go @@ -43,6 +43,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &VolumeAttachment{}, &VolumeAttachmentList{}, + &CSIStorageCapacity{}, + &CSIStorageCapacityList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/vendor/k8s.io/api/storage/v1alpha1/types.go b/vendor/k8s.io/api/storage/v1alpha1/types.go index 39408857c26..5e65bcebcf9 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/types.go +++ b/vendor/k8s.io/api/storage/v1alpha1/types.go @@ -18,6 +18,7 @@ package v1alpha1 import ( "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -134,3 +135,84 @@ type VolumeError struct { // +optional Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` } + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. +// For a given StorageClass, this describes the available capacity in a +// particular topology segment. This can be used when considering where to +// instantiate new PersistentVolumes. +// +// For example this can express things like: +// - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" +// - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for +// a certain combination: +// - no object exists with suitable topology and storage class name +// - such an object exists, but the capacity is unset +// - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// This is an alpha feature and only available when the CSIStorageCapacity feature is enabled. +type CSIStorageCapacity struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. The name has no particular meaning. It must be + // be a DNS subdomain (dots allowed, 253 characters). To ensure that + // there are no conflicts with other CSI drivers on the cluster, the recommendation + // is to use csisc-, a generated name, or a reverse-domain name which ends + // with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // NodeTopology defines which nodes have access to the storage + // for which capacity was reported. If not set, the storage is + // not accessible from any node in the cluster. If empty, the + // storage is accessible from all nodes. This field is + // immutable. + // + // +optional + NodeTopology *metav1.LabelSelector `json:"nodeTopology,omitempty" protobuf:"bytes,2,opt,name=nodeTopology"` + + // The name of the StorageClass that the reported capacity applies to. + // It must meet the same requirements as the name of a StorageClass + // object (non-empty, DNS subdomain). If that object no longer exists, + // the CSIStorageCapacity object is obsolete and should be removed by its + // creator. + // This field is immutable. + StorageClassName string `json:"storageClassName" protobuf:"bytes,3,name=storageClassName"` + + // Capacity is the value reported by the CSI driver in its GetCapacityResponse + // for a GetCapacityRequest with topology and parameters that match the + // previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: + // The available capacity, in bytes, of the storage that can be used + // to provision volumes. If not set, that information is currently + // unavailable and treated like zero capacity. + // + // +optional + Capacity *resource.Quantity `json:"capacity,omitempty" protobuf:"bytes,4,opt,name=capacity"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type CSIStorageCapacityList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is the list of CSIStorageCapacity objects. + // +listType=map + // +listMapKey=name + Items []CSIStorageCapacity `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go index 2e821616649..51778d183d6 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go @@ -27,6 +27,28 @@ package v1alpha1 // Those methods can be generated by using hack/update-generated-swagger-docs.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_CSIStorageCapacity = map[string]string{ + "": "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThis is an alpha feature and only available when the CSIStorageCapacity feature is enabled.", + "metadata": "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "nodeTopology": "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", + "storageClassName": "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.", + "capacity": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.", +} + +func (CSIStorageCapacity) SwaggerDoc() map[string]string { + return map_CSIStorageCapacity +} + +var map_CSIStorageCapacityList = map[string]string{ + "": "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "Items is the list of CSIStorageCapacity objects.", +} + +func (CSIStorageCapacityList) SwaggerDoc() map[string]string { + return map_CSIStorageCapacityList +} + var map_VolumeAttachment = map[string]string{ "": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", diff --git a/vendor/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go index 3debf9df108..7f3b357ba8e 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go @@ -21,10 +21,80 @@ limitations under the License. package v1alpha1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CSIStorageCapacity) DeepCopyInto(out *CSIStorageCapacity) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.NodeTopology != nil { + in, out := &in.NodeTopology, &out.NodeTopology + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + x := (*in).DeepCopy() + *out = &x + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIStorageCapacity. +func (in *CSIStorageCapacity) DeepCopy() *CSIStorageCapacity { + if in == nil { + return nil + } + out := new(CSIStorageCapacity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CSIStorageCapacity) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CSIStorageCapacityList) DeepCopyInto(out *CSIStorageCapacityList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CSIStorageCapacity, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIStorageCapacityList. +func (in *CSIStorageCapacityList) DeepCopy() *CSIStorageCapacityList { + if in == nil { + return nil + } + out := new(CSIStorageCapacityList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CSIStorageCapacityList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VolumeAttachment) DeepCopyInto(out *VolumeAttachment) { *out = *in @@ -96,7 +166,7 @@ func (in *VolumeAttachmentSource) DeepCopyInto(out *VolumeAttachmentSource) { } if in.InlineVolumeSpec != nil { in, out := &in.InlineVolumeSpec, &out.InlineVolumeSpec - *out = new(v1.PersistentVolumeSpec) + *out = new(corev1.PersistentVolumeSpec) (*in).DeepCopyInto(*out) } return diff --git a/vendor/k8s.io/api/storage/v1beta1/BUILD b/vendor/k8s.io/api/storage/v1beta1/BUILD index f0669b64e73..674247c00ee 100644 --- a/vendor/k8s.io/api/storage/v1beta1/BUILD +++ b/vendor/k8s.io/api/storage/v1beta1/BUILD @@ -9,6 +9,7 @@ go_library( "types.go", "types_swagger_doc_generated.go", "zz_generated.deepcopy.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/api/storage/v1beta1", importpath = "k8s.io/api/storage/v1beta1", diff --git a/vendor/k8s.io/api/storage/v1beta1/doc.go b/vendor/k8s.io/api/storage/v1beta1/doc.go index e3e3626e247..75142a62fb0 100644 --- a/vendor/k8s.io/api/storage/v1beta1/doc.go +++ b/vendor/k8s.io/api/storage/v1beta1/doc.go @@ -18,5 +18,6 @@ limitations under the License. // +k8s:protobuf-gen=package // +groupName=storage.k8s.io // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true package v1beta1 // import "k8s.io/api/storage/v1beta1" diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.pb.go b/vendor/k8s.io/api/storage/v1beta1/generated.pb.go index af4ce59f24a..cec77515e1e 100644 --- a/vendor/k8s.io/api/storage/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/storage/v1beta1/generated.pb.go @@ -520,91 +520,95 @@ func init() { } var fileDescriptor_7d2980599fd0de80 = []byte{ - // 1344 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xbd, 0x6f, 0xdb, 0x46, - 0x1b, 0x37, 0x2d, 0x7f, 0x9e, 0xec, 0x44, 0xbe, 0x18, 0xef, 0xab, 0x57, 0x83, 0x64, 0xe8, 0x45, - 0x1b, 0x27, 0x48, 0xc8, 0x24, 0x48, 0x83, 0x20, 0x40, 0x07, 0xd3, 0x31, 0x50, 0x25, 0x96, 0xe3, - 0x9e, 0x8d, 0xa0, 0x08, 0x3a, 0xf4, 0x44, 0x3e, 0x91, 0x19, 0x93, 0x3c, 0x86, 0x3c, 0xa9, 0xd5, - 0xd6, 0xa9, 0x73, 0xd1, 0xa1, 0x7f, 0x41, 0xff, 0x85, 0x16, 0x68, 0x97, 0x8e, 0xcd, 0x54, 0x04, - 0x9d, 0x32, 0x09, 0x0d, 0xbb, 0x76, 0xeb, 0x66, 0x74, 0x28, 0xee, 0x78, 0x12, 0x29, 0x89, 0x8a, - 0xed, 0x0e, 0xde, 0x78, 0xcf, 0xc7, 0xef, 0xf9, 0x7e, 0xee, 0x88, 0xb6, 0x8f, 0xef, 0x47, 0xba, - 0xc3, 0x8c, 0xe3, 0x4e, 0x0b, 0x42, 0x1f, 0x38, 0x44, 0x46, 0x17, 0x7c, 0x9b, 0x85, 0x86, 0x62, - 0xd0, 0xc0, 0x31, 0x22, 0xce, 0x42, 0xda, 0x06, 0xa3, 0x7b, 0xbb, 0x05, 0x9c, 0xde, 0x36, 0xda, - 0xe0, 0x43, 0x48, 0x39, 0xd8, 0x7a, 0x10, 0x32, 0xce, 0x70, 0x25, 0x91, 0xd5, 0x69, 0xe0, 0xe8, - 0x4a, 0x56, 0x57, 0xb2, 0x95, 0x9b, 0x6d, 0x87, 0x1f, 0x75, 0x5a, 0xba, 0xc5, 0x3c, 0xa3, 0xcd, - 0xda, 0xcc, 0x90, 0x2a, 0xad, 0xce, 0x73, 0x79, 0x92, 0x07, 0xf9, 0x95, 0x40, 0x55, 0xea, 0x19, - 0xb3, 0x16, 0x0b, 0x85, 0xcd, 0x71, 0x73, 0x95, 0xbb, 0xa9, 0x8c, 0x47, 0xad, 0x23, 0xc7, 0x87, - 0xb0, 0x67, 0x04, 0xc7, 0x6d, 0x41, 0x88, 0x0c, 0x0f, 0x38, 0xcd, 0xd3, 0x32, 0xa6, 0x69, 0x85, - 0x1d, 0x9f, 0x3b, 0x1e, 0x4c, 0x28, 0xdc, 0x3b, 0x4d, 0x21, 0xb2, 0x8e, 0xc0, 0xa3, 0xe3, 0x7a, - 0xf5, 0x9f, 0x34, 0xb4, 0xbc, 0x7d, 0xd0, 0x78, 0x18, 0x3a, 0x5d, 0x08, 0xf1, 0x67, 0x68, 0x49, - 0x78, 0x64, 0x53, 0x4e, 0xcb, 0xda, 0x86, 0xb6, 0x59, 0xbc, 0x73, 0x4b, 0x4f, 0xd3, 0x35, 0x04, - 0xd6, 0x83, 0xe3, 0xb6, 0x20, 0x44, 0xba, 0x90, 0xd6, 0xbb, 0xb7, 0xf5, 0x27, 0xad, 0x17, 0x60, - 0xf1, 0x26, 0x70, 0x6a, 0xe2, 0x57, 0xfd, 0xda, 0x4c, 0xdc, 0xaf, 0xa1, 0x94, 0x46, 0x86, 0xa8, - 0xf8, 0x31, 0x9a, 0x8b, 0x02, 0xb0, 0xca, 0xb3, 0x12, 0xfd, 0x9a, 0x3e, 0xbd, 0x18, 0xfa, 0xd0, - 0xad, 0x83, 0x00, 0x2c, 0x73, 0x45, 0xc1, 0xce, 0x89, 0x13, 0x91, 0x20, 0xf5, 0x1f, 0x35, 0xb4, - 0x3a, 0x94, 0xda, 0x75, 0x22, 0x8e, 0x3f, 0x9d, 0x08, 0x40, 0x3f, 0x5b, 0x00, 0x42, 0x5b, 0xba, - 0x5f, 0x52, 0x76, 0x96, 0x06, 0x94, 0x8c, 0xf3, 0x8f, 0xd0, 0xbc, 0xc3, 0xc1, 0x8b, 0xca, 0xb3, - 0x1b, 0x85, 0xcd, 0xe2, 0x9d, 0xf7, 0xce, 0xe4, 0xbd, 0xb9, 0xaa, 0x10, 0xe7, 0x1b, 0x42, 0x97, - 0x24, 0x10, 0xf5, 0x3f, 0xb3, 0xbe, 0x8b, 0x98, 0xf0, 0x03, 0x74, 0x89, 0x72, 0x4e, 0xad, 0x23, - 0x02, 0x2f, 0x3b, 0x4e, 0x08, 0xb6, 0x8c, 0x60, 0xc9, 0xc4, 0x71, 0xbf, 0x76, 0x69, 0x6b, 0x84, - 0x43, 0xc6, 0x24, 0x85, 0x6e, 0xc0, 0xec, 0x86, 0xff, 0x9c, 0x3d, 0xf1, 0x9b, 0xac, 0xe3, 0x73, - 0x99, 0x60, 0xa5, 0xbb, 0x3f, 0xc2, 0x21, 0x63, 0x92, 0xd8, 0x42, 0xeb, 0x5d, 0xe6, 0x76, 0x3c, - 0xd8, 0x75, 0x9e, 0x83, 0xd5, 0xb3, 0x5c, 0x68, 0x32, 0x1b, 0xa2, 0x72, 0x61, 0xa3, 0xb0, 0xb9, - 0x6c, 0x1a, 0x71, 0xbf, 0xb6, 0xfe, 0x34, 0x87, 0x7f, 0xd2, 0xaf, 0x5d, 0xc9, 0xa1, 0x93, 0x5c, - 0xb0, 0xfa, 0x0f, 0x1a, 0x5a, 0xdc, 0x3e, 0x68, 0xec, 0x31, 0x1b, 0x2e, 0xa0, 0xcb, 0x1a, 0x23, - 0x5d, 0x76, 0xf5, 0x94, 0x3a, 0x09, 0xa7, 0xa6, 0xf6, 0xd8, 0x5f, 0x49, 0x9d, 0x84, 0x8c, 0x1a, - 0x92, 0x0d, 0x34, 0xe7, 0x53, 0x0f, 0xa4, 0xeb, 0xcb, 0xa9, 0xce, 0x1e, 0xf5, 0x80, 0x48, 0x0e, - 0x7e, 0x1f, 0x2d, 0xf8, 0xcc, 0x86, 0xc6, 0x43, 0xe9, 0xc0, 0xb2, 0x79, 0x49, 0xc9, 0x2c, 0xec, - 0x49, 0x2a, 0x51, 0x5c, 0x7c, 0x17, 0xad, 0x70, 0x16, 0x30, 0x97, 0xb5, 0x7b, 0x8f, 0xa1, 0x37, - 0xc8, 0x78, 0x29, 0xee, 0xd7, 0x56, 0x0e, 0x33, 0x74, 0x32, 0x22, 0x85, 0x5b, 0xa8, 0x48, 0x5d, - 0x97, 0x59, 0x94, 0xd3, 0x96, 0x0b, 0xe5, 0x39, 0x19, 0xa3, 0xf1, 0xae, 0x18, 0x93, 0x32, 0x09, - 0xe3, 0x04, 0x22, 0xd6, 0x09, 0x2d, 0x88, 0xcc, 0xcb, 0x71, 0xbf, 0x56, 0xdc, 0x4a, 0x71, 0x48, - 0x16, 0xb4, 0xfe, 0xbd, 0x86, 0x8a, 0x2a, 0xea, 0x0b, 0x98, 0xab, 0x8f, 0x46, 0xe7, 0xea, 0xff, - 0x67, 0xa8, 0xd7, 0x94, 0xa9, 0xb2, 0x86, 0x6e, 0xcb, 0x91, 0x3a, 0x44, 0x8b, 0xb6, 0x2c, 0x5a, - 0x54, 0xd6, 0x24, 0xf4, 0xb5, 0x33, 0x40, 0xab, 0xb1, 0xbd, 0xac, 0x0c, 0x2c, 0x26, 0xe7, 0x88, - 0x0c, 0xa0, 0xea, 0xdf, 0x2c, 0xa0, 0x95, 0x83, 0x44, 0x77, 0xdb, 0xa5, 0x51, 0x74, 0x01, 0x0d, - 0xfd, 0x01, 0x2a, 0x06, 0x21, 0xeb, 0x3a, 0x91, 0xc3, 0x7c, 0x08, 0x55, 0x5b, 0x5d, 0x51, 0x2a, - 0xc5, 0xfd, 0x94, 0x45, 0xb2, 0x72, 0xd8, 0x45, 0x28, 0xa0, 0x21, 0xf5, 0x80, 0x8b, 0x14, 0x14, - 0x64, 0x0a, 0xee, 0xbf, 0x2b, 0x05, 0xd9, 0xb0, 0xf4, 0xfd, 0xa1, 0xea, 0x8e, 0xcf, 0xc3, 0x5e, - 0xea, 0x62, 0xca, 0x20, 0x19, 0x7c, 0x7c, 0x8c, 0x56, 0x43, 0xb0, 0x5c, 0xea, 0x78, 0xfb, 0xcc, - 0x75, 0xac, 0x9e, 0x6c, 0xcd, 0x65, 0x73, 0x27, 0xee, 0xd7, 0x56, 0x49, 0x96, 0x71, 0xd2, 0xaf, - 0xdd, 0x9a, 0xbc, 0x3a, 0xf5, 0x7d, 0x08, 0x23, 0x27, 0xe2, 0xe0, 0xf3, 0xa4, 0x61, 0x47, 0x74, - 0xc8, 0x28, 0xb6, 0x98, 0x1d, 0x4f, 0xac, 0xaf, 0x27, 0x01, 0x77, 0x98, 0x1f, 0x95, 0xe7, 0xd3, - 0xd9, 0x69, 0x66, 0xe8, 0x64, 0x44, 0x0a, 0xef, 0xa2, 0x75, 0xd1, 0xe6, 0x9f, 0x27, 0x06, 0x76, - 0xbe, 0x08, 0xa8, 0x2f, 0x52, 0x55, 0x5e, 0x90, 0xdb, 0xb2, 0x2c, 0x76, 0xdd, 0x56, 0x0e, 0x9f, - 0xe4, 0x6a, 0xe1, 0x4f, 0xd0, 0x5a, 0xb2, 0xec, 0x4c, 0xc7, 0xb7, 0x1d, 0xbf, 0x2d, 0x56, 0x5d, - 0x79, 0x51, 0x06, 0x7d, 0x3d, 0xee, 0xd7, 0xd6, 0x9e, 0x8e, 0x33, 0x4f, 0xf2, 0x88, 0x64, 0x12, - 0x04, 0xbf, 0x44, 0x6b, 0xd2, 0x22, 0xd8, 0x6a, 0x11, 0x38, 0x10, 0x95, 0x97, 0x64, 0xfd, 0x36, - 0xb3, 0xf5, 0x13, 0xa9, 0x13, 0x8d, 0x34, 0x58, 0x17, 0x07, 0xe0, 0x82, 0xc5, 0x59, 0x78, 0x08, - 0xa1, 0x67, 0xfe, 0x4f, 0xd5, 0x6b, 0x6d, 0x6b, 0x1c, 0x8a, 0x4c, 0xa2, 0x57, 0x3e, 0x44, 0x97, - 0xc7, 0x0a, 0x8e, 0x4b, 0xa8, 0x70, 0x0c, 0xbd, 0x64, 0xd1, 0x11, 0xf1, 0x89, 0xd7, 0xd1, 0x7c, - 0x97, 0xba, 0x1d, 0x48, 0x3a, 0x90, 0x24, 0x87, 0x07, 0xb3, 0xf7, 0xb5, 0xfa, 0xcf, 0x1a, 0x2a, - 0x65, 0xbb, 0xe7, 0x02, 0xd6, 0x46, 0x73, 0x74, 0x6d, 0x6c, 0x9e, 0xb5, 0xb1, 0xa7, 0xec, 0x8e, - 0xef, 0x66, 0x51, 0x29, 0x29, 0x4e, 0x72, 0xd9, 0x7a, 0xe0, 0xf3, 0x0b, 0x18, 0x6d, 0x32, 0x72, - 0x57, 0xdd, 0x3a, 0x7d, 0x8f, 0xa7, 0xde, 0x4d, 0xbb, 0xb4, 0xf0, 0x33, 0xb4, 0x10, 0x71, 0xca, - 0x3b, 0x62, 0xe6, 0x05, 0xea, 0x9d, 0x73, 0xa1, 0x4a, 0xcd, 0xf4, 0xd2, 0x4a, 0xce, 0x44, 0x21, - 0xd6, 0x7f, 0xd1, 0xd0, 0xfa, 0xb8, 0xca, 0x05, 0x14, 0xfb, 0xe3, 0xd1, 0x62, 0xdf, 0x38, 0x4f, - 0x44, 0x53, 0x0a, 0xfe, 0x9b, 0x86, 0xfe, 0x33, 0x11, 0xbc, 0xbc, 0x1e, 0xc5, 0x9e, 0x08, 0xc6, - 0xb6, 0xd1, 0x5e, 0x7a, 0xe7, 0xcb, 0x3d, 0xb1, 0x9f, 0xc3, 0x27, 0xb9, 0x5a, 0xf8, 0x05, 0x2a, - 0x39, 0xbe, 0xeb, 0xf8, 0x90, 0xd0, 0x0e, 0xd2, 0x72, 0xe7, 0x0e, 0xf3, 0x38, 0xb2, 0x2c, 0xf3, - 0x7a, 0xdc, 0xaf, 0x95, 0x1a, 0x63, 0x28, 0x64, 0x02, 0xb7, 0xfe, 0x6b, 0x4e, 0x79, 0xe4, 0x5d, - 0x78, 0x03, 0x2d, 0x25, 0x8f, 0x46, 0x08, 0x55, 0x18, 0xc3, 0x74, 0x6f, 0x29, 0x3a, 0x19, 0x4a, - 0xc8, 0x0e, 0x92, 0xa9, 0x50, 0x8e, 0x9e, 0xaf, 0x83, 0xa4, 0x66, 0xa6, 0x83, 0xe4, 0x99, 0x28, - 0x44, 0xe1, 0x89, 0x78, 0x00, 0xc9, 0x84, 0x16, 0x46, 0x3d, 0xd9, 0x53, 0x74, 0x32, 0x94, 0xa8, - 0xff, 0x5d, 0xc8, 0xa9, 0x92, 0x6c, 0xc5, 0x4c, 0x48, 0x83, 0xb7, 0xf2, 0x78, 0x48, 0xf6, 0x30, - 0x24, 0x1b, 0x7f, 0xab, 0x21, 0x4c, 0x87, 0x10, 0xcd, 0x41, 0xab, 0x26, 0xfd, 0xf4, 0xe8, 0xfc, - 0x13, 0xa2, 0x6f, 0x4d, 0x80, 0x25, 0xf7, 0x64, 0x45, 0x39, 0x81, 0x27, 0x05, 0x48, 0x8e, 0x07, - 0xd8, 0x41, 0xc5, 0x84, 0xba, 0x13, 0x86, 0x2c, 0x54, 0x23, 0x7b, 0xf5, 0x74, 0x87, 0xa4, 0xb8, - 0x59, 0x95, 0x0f, 0xb9, 0x54, 0xff, 0xa4, 0x5f, 0x2b, 0x66, 0xf8, 0x24, 0x8b, 0x2d, 0x4c, 0xd9, - 0x90, 0x9a, 0x9a, 0xfb, 0x17, 0xa6, 0x1e, 0xc2, 0x74, 0x53, 0x19, 0xec, 0xca, 0x0e, 0xfa, 0xef, - 0x94, 0x04, 0x9d, 0xeb, 0x5e, 0xf9, 0x4a, 0x43, 0x59, 0x1b, 0x78, 0x17, 0xcd, 0x89, 0xff, 0x59, - 0xb5, 0x61, 0xae, 0x9f, 0x6d, 0xc3, 0x1c, 0x3a, 0x1e, 0xa4, 0x8b, 0x52, 0x9c, 0x88, 0x44, 0xc1, - 0xd7, 0xd0, 0xa2, 0x07, 0x51, 0x44, 0xdb, 0xca, 0x72, 0xfa, 0xea, 0x6b, 0x26, 0x64, 0x32, 0xe0, - 0xd7, 0xef, 0xa1, 0x2b, 0x39, 0xef, 0x68, 0x5c, 0x43, 0xf3, 0x96, 0xfc, 0xe1, 0x12, 0x0e, 0xcd, - 0x9b, 0xcb, 0x62, 0xcb, 0x6c, 0xcb, 0xff, 0xac, 0x84, 0x6e, 0xde, 0x7c, 0xf5, 0xb6, 0x3a, 0xf3, - 0xfa, 0x6d, 0x75, 0xe6, 0xcd, 0xdb, 0xea, 0xcc, 0x97, 0x71, 0x55, 0x7b, 0x15, 0x57, 0xb5, 0xd7, - 0x71, 0x55, 0x7b, 0x13, 0x57, 0xb5, 0xdf, 0xe3, 0xaa, 0xf6, 0xf5, 0x1f, 0xd5, 0x99, 0x67, 0x8b, - 0x2a, 0xdf, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x72, 0xff, 0xde, 0x2e, 0xe4, 0x10, 0x00, 0x00, + // 1400 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x3d, 0x6f, 0xdb, 0x46, + 0x1f, 0x37, 0x2d, 0xc9, 0x2f, 0x27, 0x3b, 0x96, 0xcf, 0xc6, 0xf3, 0xe8, 0xd1, 0x20, 0x1a, 0x7a, + 0xd0, 0xc6, 0x09, 0x12, 0x2a, 0x31, 0xd2, 0x20, 0x08, 0x90, 0xc1, 0x72, 0xdc, 0x46, 0x89, 0xe5, + 0xb8, 0x27, 0x23, 0x28, 0x82, 0x0e, 0x3d, 0x91, 0x67, 0x99, 0xb1, 0xc8, 0x63, 0xc8, 0x93, 0x5a, + 0x6d, 0x9d, 0x3a, 0x17, 0x1d, 0xfa, 0x09, 0xfa, 0x15, 0x5a, 0xa0, 0x5d, 0x3a, 0x36, 0x53, 0x11, + 0x74, 0xca, 0x44, 0x34, 0xec, 0x47, 0x28, 0xba, 0x18, 0x1d, 0x8a, 0x3b, 0x9e, 0xc4, 0x17, 0x51, + 0xb1, 0xdd, 0xc1, 0x1b, 0xef, 0xff, 0xf2, 0xfb, 0xbf, 0xff, 0xef, 0x08, 0x76, 0x4e, 0xee, 0x79, + 0x9a, 0x49, 0xeb, 0x27, 0xfd, 0x0e, 0x71, 0x6d, 0xc2, 0x88, 0x57, 0x1f, 0x10, 0xdb, 0xa0, 0x6e, + 0x5d, 0x32, 0xb0, 0x63, 0xd6, 0x3d, 0x46, 0x5d, 0xdc, 0x25, 0xf5, 0xc1, 0xed, 0x0e, 0x61, 0xf8, + 0x76, 0xbd, 0x4b, 0x6c, 0xe2, 0x62, 0x46, 0x0c, 0xcd, 0x71, 0x29, 0xa3, 0xb0, 0x12, 0xca, 0x6a, + 0xd8, 0x31, 0x35, 0x29, 0xab, 0x49, 0xd9, 0xca, 0xcd, 0xae, 0xc9, 0x8e, 0xfb, 0x1d, 0x4d, 0xa7, + 0x56, 0xbd, 0x4b, 0xbb, 0xb4, 0x2e, 0x54, 0x3a, 0xfd, 0x23, 0x71, 0x12, 0x07, 0xf1, 0x15, 0x42, + 0x55, 0x6a, 0x31, 0xb3, 0x3a, 0x75, 0xb9, 0xcd, 0xb4, 0xb9, 0xca, 0x9d, 0x48, 0xc6, 0xc2, 0xfa, + 0xb1, 0x69, 0x13, 0x77, 0x58, 0x77, 0x4e, 0xba, 0x9c, 0xe0, 0xd5, 0x2d, 0xc2, 0x70, 0x96, 0x56, + 0x7d, 0x9a, 0x96, 0xdb, 0xb7, 0x99, 0x69, 0x91, 0x09, 0x85, 0xbb, 0x67, 0x29, 0x78, 0xfa, 0x31, + 0xb1, 0x70, 0x5a, 0xaf, 0xf6, 0x93, 0x02, 0x16, 0x77, 0xda, 0xcd, 0x87, 0xae, 0x39, 0x20, 0x2e, + 0xfc, 0x0c, 0x2c, 0x70, 0x8f, 0x0c, 0xcc, 0x70, 0x59, 0xd9, 0x50, 0x36, 0x8b, 0x5b, 0xb7, 0xb4, + 0x28, 0x5d, 0x63, 0x60, 0xcd, 0x39, 0xe9, 0x72, 0x82, 0xa7, 0x71, 0x69, 0x6d, 0x70, 0x5b, 0x7b, + 0xda, 0x79, 0x41, 0x74, 0xd6, 0x22, 0x0c, 0x37, 0xe0, 0x2b, 0x5f, 0x9d, 0x09, 0x7c, 0x15, 0x44, + 0x34, 0x34, 0x46, 0x85, 0x4f, 0x40, 0xde, 0x73, 0x88, 0x5e, 0x9e, 0x15, 0xe8, 0xd7, 0xb4, 0xe9, + 0xc5, 0xd0, 0xc6, 0x6e, 0xb5, 0x1d, 0xa2, 0x37, 0x96, 0x24, 0x6c, 0x9e, 0x9f, 0x90, 0x00, 0xa9, + 0xfd, 0xa8, 0x80, 0xe5, 0xb1, 0xd4, 0x9e, 0xe9, 0x31, 0xf8, 0xe9, 0x44, 0x00, 0xda, 0xf9, 0x02, + 0xe0, 0xda, 0xc2, 0xfd, 0x92, 0xb4, 0xb3, 0x30, 0xa2, 0xc4, 0x9c, 0x7f, 0x0c, 0x0a, 0x26, 0x23, + 0x96, 0x57, 0x9e, 0xdd, 0xc8, 0x6d, 0x16, 0xb7, 0xde, 0x3b, 0x97, 0xf7, 0x8d, 0x65, 0x89, 0x58, + 0x68, 0x72, 0x5d, 0x14, 0x42, 0xd4, 0xfe, 0x9a, 0x8d, 0xf9, 0xce, 0x63, 0x82, 0xf7, 0xc1, 0x15, + 0xcc, 0x18, 0xd6, 0x8f, 0x11, 0x79, 0xd9, 0x37, 0x5d, 0x62, 0x88, 0x08, 0x16, 0x1a, 0x30, 0xf0, + 0xd5, 0x2b, 0xdb, 0x09, 0x0e, 0x4a, 0x49, 0x72, 0x5d, 0x87, 0x1a, 0x4d, 0xfb, 0x88, 0x3e, 0xb5, + 0x5b, 0xb4, 0x6f, 0x33, 0x91, 0x60, 0xa9, 0x7b, 0x90, 0xe0, 0xa0, 0x94, 0x24, 0xd4, 0xc1, 0xfa, + 0x80, 0xf6, 0xfa, 0x16, 0xd9, 0x33, 0x8f, 0x88, 0x3e, 0xd4, 0x7b, 0xa4, 0x45, 0x0d, 0xe2, 0x95, + 0x73, 0x1b, 0xb9, 0xcd, 0xc5, 0x46, 0x3d, 0xf0, 0xd5, 0xf5, 0x67, 0x19, 0xfc, 0x53, 0x5f, 0x5d, + 0xcb, 0xa0, 0xa3, 0x4c, 0x30, 0xf8, 0x00, 0xac, 0xc8, 0x0c, 0xed, 0x60, 0x07, 0xeb, 0x26, 0x1b, + 0x96, 0xf3, 0xc2, 0xc3, 0xb5, 0xc0, 0x57, 0x57, 0xda, 0x49, 0x16, 0x4a, 0xcb, 0xc2, 0x47, 0x60, + 0xf9, 0xc8, 0xfb, 0xc8, 0xa5, 0x7d, 0xe7, 0x80, 0xf6, 0x4c, 0x7d, 0x58, 0x2e, 0x6c, 0x28, 0x9b, + 0x8b, 0x8d, 0x5a, 0xe0, 0xab, 0xcb, 0x1f, 0xb6, 0x63, 0x8c, 0xd3, 0x34, 0x01, 0x25, 0x15, 0x6b, + 0x3f, 0x28, 0x60, 0x7e, 0xa7, 0xdd, 0xdc, 0xa7, 0x06, 0xb9, 0x84, 0x76, 0x6f, 0x26, 0xda, 0xfd, + 0xea, 0x19, 0x0d, 0xc3, 0x9d, 0x9a, 0xda, 0xec, 0x7f, 0x86, 0xcd, 0xce, 0x65, 0xe4, 0xb4, 0x6e, + 0x80, 0xbc, 0x8d, 0x2d, 0x22, 0x5c, 0x5f, 0x8c, 0x74, 0xf6, 0xb1, 0x45, 0x90, 0xe0, 0xc0, 0xf7, + 0xc1, 0x9c, 0x4d, 0x0d, 0xd2, 0x7c, 0x28, 0x1c, 0x58, 0x6c, 0x5c, 0x91, 0x32, 0x73, 0xfb, 0x82, + 0x8a, 0x24, 0x17, 0xde, 0x01, 0x4b, 0x8c, 0x3a, 0xb4, 0x47, 0xbb, 0xc3, 0x27, 0x64, 0x38, 0x2a, + 0x7d, 0x29, 0xf0, 0xd5, 0xa5, 0xc3, 0x18, 0x1d, 0x25, 0xa4, 0x60, 0x07, 0x14, 0x71, 0xaf, 0x47, + 0x75, 0xcc, 0x70, 0xa7, 0x47, 0x44, 0x3d, 0x8b, 0x5b, 0xf5, 0x77, 0xc5, 0x18, 0xf6, 0x0b, 0x37, + 0x8e, 0x88, 0x47, 0xfb, 0xae, 0x4e, 0xbc, 0xc6, 0x4a, 0xe0, 0xab, 0xc5, 0xed, 0x08, 0x07, 0xc5, + 0x41, 0x6b, 0xdf, 0x2b, 0xa0, 0x28, 0xa3, 0xbe, 0x84, 0x01, 0x7f, 0x94, 0x1c, 0xf0, 0xff, 0x9f, + 0xa3, 0x5e, 0x53, 0xc6, 0x5b, 0x1f, 0xbb, 0x2d, 0x66, 0xfb, 0x10, 0xcc, 0x1b, 0xa2, 0x68, 0x5e, + 0x59, 0x11, 0xd0, 0xd7, 0xce, 0x01, 0x2d, 0xf7, 0xc7, 0x8a, 0x34, 0x30, 0x1f, 0x9e, 0x3d, 0x34, + 0x82, 0xaa, 0x7d, 0x33, 0x07, 0x96, 0x46, 0xa3, 0xd3, 0xc3, 0x9e, 0x77, 0x09, 0x0d, 0xfd, 0x01, + 0x28, 0x3a, 0x2e, 0x1d, 0x98, 0x9e, 0x49, 0x6d, 0xe2, 0xca, 0xb6, 0x5a, 0x93, 0x2a, 0xc5, 0x83, + 0x88, 0x85, 0xe2, 0x72, 0xb0, 0x07, 0x80, 0x83, 0x5d, 0x6c, 0x11, 0xc6, 0x53, 0x90, 0x13, 0x29, + 0xb8, 0xf7, 0xae, 0x14, 0xc4, 0xc3, 0xd2, 0x0e, 0xc6, 0xaa, 0xbb, 0x36, 0x73, 0x87, 0x91, 0x8b, + 0x11, 0x03, 0xc5, 0xf0, 0xe1, 0x09, 0x58, 0x76, 0x89, 0xde, 0xc3, 0xa6, 0x25, 0xb7, 0x45, 0x5e, + 0xb8, 0xb9, 0xcb, 0xb7, 0x05, 0x8a, 0x33, 0x4e, 0x7d, 0xf5, 0xd6, 0xe4, 0x1d, 0xae, 0x1d, 0x10, + 0xd7, 0x33, 0x3d, 0x46, 0x6c, 0x16, 0x36, 0x6c, 0x42, 0x07, 0x25, 0xb1, 0xf9, 0xec, 0x58, 0x7c, + 0x8f, 0x3e, 0x75, 0x98, 0x49, 0x6d, 0xaf, 0x5c, 0x88, 0x66, 0xa7, 0x15, 0xa3, 0xa3, 0x84, 0x14, + 0xdc, 0x03, 0xeb, 0xbc, 0xcd, 0x3f, 0x0f, 0x0d, 0xec, 0x7e, 0xe1, 0x60, 0x9b, 0xa7, 0xaa, 0x3c, + 0x27, 0x96, 0x62, 0x99, 0x2f, 0xdd, 0xed, 0x0c, 0x3e, 0xca, 0xd4, 0x82, 0x9f, 0x80, 0xd5, 0x70, + 0xeb, 0x36, 0x4c, 0xdb, 0x30, 0xed, 0x2e, 0xdf, 0xb9, 0xe5, 0x79, 0x11, 0xf4, 0xf5, 0xc0, 0x57, + 0x57, 0x9f, 0xa5, 0x99, 0xa7, 0x59, 0x44, 0x34, 0x09, 0x02, 0x5f, 0x82, 0x55, 0x61, 0x91, 0x18, + 0x72, 0x11, 0x98, 0xc4, 0x2b, 0x2f, 0x88, 0xfa, 0x6d, 0xc6, 0xeb, 0xc7, 0x53, 0xc7, 0x1b, 0x69, + 0xb4, 0x2e, 0xda, 0xa4, 0x47, 0x74, 0x46, 0xdd, 0x43, 0xe2, 0x5a, 0x8d, 0xff, 0xc9, 0x7a, 0xad, + 0x6e, 0xa7, 0xa1, 0xd0, 0x24, 0x7a, 0xe5, 0x01, 0x58, 0x49, 0x15, 0x1c, 0x96, 0x40, 0xee, 0x84, + 0x0c, 0xc3, 0x45, 0x87, 0xf8, 0x27, 0x5c, 0x07, 0x85, 0x01, 0xee, 0xf5, 0x49, 0xd8, 0x81, 0x28, + 0x3c, 0xdc, 0x9f, 0xbd, 0xa7, 0xd4, 0x7e, 0x56, 0x40, 0x29, 0xde, 0x3d, 0x97, 0xb0, 0x36, 0x5a, + 0xc9, 0xb5, 0xb1, 0x79, 0xde, 0xc6, 0x9e, 0xb2, 0x3b, 0xbe, 0x9b, 0x05, 0xa5, 0xb0, 0x38, 0xe1, + 0xad, 0x6f, 0x11, 0x9b, 0x5d, 0xc2, 0x68, 0xa3, 0xc4, 0x5d, 0x75, 0xeb, 0xec, 0x3d, 0x1e, 0x79, + 0x37, 0xed, 0xd2, 0x82, 0xcf, 0xc1, 0x9c, 0xc7, 0x30, 0xeb, 0xf3, 0x99, 0xe7, 0xa8, 0x5b, 0x17, + 0x42, 0x15, 0x9a, 0xd1, 0xa5, 0x15, 0x9e, 0x91, 0x44, 0xac, 0xfd, 0xa2, 0x80, 0xf5, 0xb4, 0xca, + 0x25, 0x14, 0xfb, 0xe3, 0x64, 0xb1, 0x6f, 0x5c, 0x24, 0xa2, 0x29, 0x05, 0xff, 0x4d, 0x01, 0xff, + 0x99, 0x08, 0x5e, 0x5c, 0x8f, 0x7c, 0x4f, 0x38, 0xa9, 0x6d, 0xb4, 0x1f, 0xdd, 0xf9, 0x62, 0x4f, + 0x1c, 0x64, 0xf0, 0x51, 0xa6, 0x16, 0x7c, 0x01, 0x4a, 0xa6, 0xdd, 0x33, 0x6d, 0x12, 0xd2, 0xda, + 0x51, 0xb9, 0x33, 0x87, 0x39, 0x8d, 0x2c, 0xca, 0xbc, 0x1e, 0xf8, 0x6a, 0xa9, 0x99, 0x42, 0x41, + 0x13, 0xb8, 0xb5, 0x5f, 0x33, 0xca, 0x23, 0xee, 0xc2, 0x1b, 0x60, 0x21, 0x7c, 0xbd, 0x12, 0x57, + 0x86, 0x31, 0x4e, 0xf7, 0xb6, 0xa4, 0xa3, 0xb1, 0x84, 0xe8, 0x20, 0x91, 0x0a, 0xe9, 0xe8, 0xc5, + 0x3a, 0x48, 0x68, 0xc6, 0x3a, 0x48, 0x9c, 0x91, 0x44, 0xe4, 0x9e, 0xf0, 0x07, 0x90, 0x48, 0x68, + 0x2e, 0xe9, 0xc9, 0xbe, 0xa4, 0xa3, 0xb1, 0x44, 0xed, 0xef, 0x5c, 0x46, 0x95, 0x44, 0x2b, 0xc6, + 0x42, 0x1a, 0x3d, 0xda, 0xd3, 0x21, 0x19, 0xe3, 0x90, 0x0c, 0xf8, 0xad, 0x02, 0x20, 0x1e, 0x43, + 0xb4, 0x46, 0xad, 0x1a, 0xf6, 0xd3, 0xe3, 0x8b, 0x4f, 0x88, 0xb6, 0x3d, 0x01, 0x16, 0xde, 0x93, + 0x15, 0xe9, 0x04, 0x9c, 0x14, 0x40, 0x19, 0x1e, 0x40, 0x13, 0x14, 0x43, 0xea, 0xae, 0xeb, 0x52, + 0x57, 0x8e, 0xec, 0xd5, 0xb3, 0x1d, 0x12, 0xe2, 0x8d, 0xaa, 0x78, 0xc8, 0x45, 0xfa, 0xa7, 0xbe, + 0x5a, 0x8c, 0xf1, 0x51, 0x1c, 0x9b, 0x9b, 0x32, 0x48, 0x64, 0x2a, 0xff, 0x2f, 0x4c, 0x3d, 0x24, + 0xd3, 0x4d, 0xc5, 0xb0, 0x2b, 0xbb, 0xe0, 0xbf, 0x53, 0x12, 0x74, 0xa1, 0x7b, 0xe5, 0x2b, 0x05, + 0xc4, 0x6d, 0xc0, 0x3d, 0x90, 0xe7, 0x3f, 0xd6, 0x72, 0xc3, 0x5c, 0x3f, 0xdf, 0x86, 0x39, 0x34, + 0x2d, 0x12, 0x2d, 0x4a, 0x7e, 0x42, 0x02, 0x05, 0x5e, 0x03, 0xf3, 0x16, 0xf1, 0x3c, 0xdc, 0x95, + 0x96, 0xa3, 0x57, 0x5f, 0x2b, 0x24, 0xa3, 0x11, 0xbf, 0x76, 0x17, 0xac, 0x65, 0xbc, 0xa3, 0xa1, + 0x0a, 0x0a, 0xba, 0xf8, 0xf3, 0xe3, 0x0e, 0x15, 0x1a, 0x8b, 0x7c, 0xcb, 0xec, 0x88, 0x1f, 0xbe, + 0x90, 0xde, 0xb8, 0xf9, 0xea, 0x6d, 0x75, 0xe6, 0xf5, 0xdb, 0xea, 0xcc, 0x9b, 0xb7, 0xd5, 0x99, + 0x2f, 0x83, 0xaa, 0xf2, 0x2a, 0xa8, 0x2a, 0xaf, 0x83, 0xaa, 0xf2, 0x26, 0xa8, 0x2a, 0xbf, 0x07, + 0x55, 0xe5, 0xeb, 0x3f, 0xaa, 0x33, 0xcf, 0xe7, 0x65, 0xbe, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, + 0x4b, 0x3f, 0x49, 0x6e, 0x6d, 0x11, 0x00, 0x00, } func (m *CSIDriver) Marshal() (dAtA []byte, err error) { @@ -717,6 +721,23 @@ func (m *CSIDriverSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.FSGroupPolicy != nil { + i -= len(*m.FSGroupPolicy) + copy(dAtA[i:], *m.FSGroupPolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FSGroupPolicy))) + i-- + dAtA[i] = 0x2a + } + if m.StorageCapacity != nil { + i-- + if *m.StorageCapacity { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } if len(m.VolumeLifecycleModes) > 0 { for iNdEx := len(m.VolumeLifecycleModes) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.VolumeLifecycleModes[iNdEx]) @@ -1475,6 +1496,13 @@ func (m *CSIDriverSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if m.StorageCapacity != nil { + n += 2 + } + if m.FSGroupPolicy != nil { + l = len(*m.FSGroupPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -1763,6 +1791,8 @@ func (this *CSIDriverSpec) String() string { `AttachRequired:` + valueToStringGenerated(this.AttachRequired) + `,`, `PodInfoOnMount:` + valueToStringGenerated(this.PodInfoOnMount) + `,`, `VolumeLifecycleModes:` + fmt.Sprintf("%v", this.VolumeLifecycleModes) + `,`, + `StorageCapacity:` + valueToStringGenerated(this.StorageCapacity) + `,`, + `FSGroupPolicy:` + valueToStringGenerated(this.FSGroupPolicy) + `,`, `}`, }, "") return s @@ -2315,6 +2345,60 @@ func (m *CSIDriverSpec) Unmarshal(dAtA []byte) error { } m.VolumeLifecycleModes = append(m.VolumeLifecycleModes, VolumeLifecycleMode(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageCapacity", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.StorageCapacity = &b + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FSGroupPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := FSGroupPolicy(dAtA[iNdEx:postIndex]) + m.FSGroupPolicy = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.proto b/vendor/k8s.io/api/storage/v1beta1/generated.proto index 373a154b112..e61876ed566 100644 --- a/vendor/k8s.io/api/storage/v1beta1/generated.proto +++ b/vendor/k8s.io/api/storage/v1beta1/generated.proto @@ -119,6 +119,34 @@ message CSIDriverSpec { // more modes may be added in the future. // +optional repeated string volumeLifecycleModes = 3; + + // If set to true, storageCapacity indicates that the CSI + // volume driver wants pod scheduling to consider the storage + // capacity that the driver deployment will report by creating + // CSIStorageCapacity objects with capacity information. + // + // The check can be enabled immediately when deploying a driver. + // In that case, provisioning new volumes with late binding + // will pause until the driver deployment has published + // some suitable CSIStorageCapacity object. + // + // Alternatively, the driver can be deployed with the field + // unset or false and it can be flipped later when storage + // capacity information has been published. + // + // This is an alpha field and only available when the CSIStorageCapacity + // feature is enabled. The default is false. + // + // +optional + optional bool storageCapacity = 4; + + // Defines if the underlying volume supports changing ownership and + // permission of the volume before being mounted. + // Refer to the specific FSGroupPolicy values for additional details. + // This field is alpha-level, and is only honored by servers + // that enable the CSIVolumeFSGroupPolicy feature gate. + // +optional + optional string fsGroupPolicy = 5; } // DEPRECATED - This group version of CSINode is deprecated by storage/v1/CSINode. diff --git a/vendor/k8s.io/api/storage/v1beta1/types.go b/vendor/k8s.io/api/storage/v1beta1/types.go index a8faeb9d130..7946663a3f7 100644 --- a/vendor/k8s.io/api/storage/v1beta1/types.go +++ b/vendor/k8s.io/api/storage/v1beta1/types.go @@ -24,6 +24,9 @@ import ( // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.4 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,StorageClass // StorageClass describes the parameters for a class of storage for // which PersistentVolumes can be dynamically provisioned. @@ -75,6 +78,9 @@ type StorageClass struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.4 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,StorageClassList // StorageClassList is a collection of storage classes. type StorageClassList struct { @@ -106,6 +112,9 @@ const ( // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.10 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,VolumeAttachment // VolumeAttachment captures the intent to attach or detach the specified volume // to/from the specified node. @@ -131,6 +140,9 @@ type VolumeAttachment struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.10 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,VolumeAttachmentList // VolumeAttachmentList is a collection of VolumeAttachment objects. type VolumeAttachmentList struct { @@ -220,6 +232,9 @@ type VolumeError struct { // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.14 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,CSIDriver // CSIDriver captures information about a Container Storage Interface (CSI) // volume driver deployed on the cluster. @@ -247,6 +262,9 @@ type CSIDriver struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.14 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,CSIDriverList // CSIDriverList is a collection of CSIDriver objects. type CSIDriverList struct { @@ -317,8 +335,62 @@ type CSIDriverSpec struct { // more modes may be added in the future. // +optional VolumeLifecycleModes []VolumeLifecycleMode `json:"volumeLifecycleModes,omitempty" protobuf:"bytes,3,opt,name=volumeLifecycleModes"` + + // If set to true, storageCapacity indicates that the CSI + // volume driver wants pod scheduling to consider the storage + // capacity that the driver deployment will report by creating + // CSIStorageCapacity objects with capacity information. + // + // + // The check can be enabled immediately when deploying a driver. + // In that case, provisioning new volumes with late binding + // will pause until the driver deployment has published + // some suitable CSIStorageCapacity object. + // + // Alternatively, the driver can be deployed with the field + // unset or false and it can be flipped later when storage + // capacity information has been published. + // + // This is an alpha field and only available when the CSIStorageCapacity + // feature is enabled. The default is false. + // + // +optional + StorageCapacity *bool `json:"storageCapacity,omitempty" protobuf:"bytes,4,opt,name=storageCapacity"` + + // Defines if the underlying volume supports changing ownership and + // permission of the volume before being mounted. + // Refer to the specific FSGroupPolicy values for additional details. + // This field is alpha-level, and is only honored by servers + // that enable the CSIVolumeFSGroupPolicy feature gate. + // +optional + FSGroupPolicy *FSGroupPolicy `json:"fsGroupPolicy,omitempty" protobuf:"bytes,5,opt,name=fsGroupPolicy"` } +// FSGroupPolicy specifies if a CSI Driver supports modifying +// volume ownership and permissions of the volume to be mounted. +// More modes may be added in the future. +type FSGroupPolicy string + +const ( + // ReadWriteOnceWithFSTypeFSGroupPolicy indicates that each volume will be examined + // to determine if the volume ownership and permissions + // should be modified. If a fstype is defined and the volume's access mode + // contains ReadWriteOnce, then the defined fsGroup will be applied. + // This is the default behavior if no other FSGroupPolicy is defined. + ReadWriteOnceWithFSTypeFSGroupPolicy FSGroupPolicy = "ReadWriteOnceWithFSType" + + // FileFSGroupPolicy indicates that CSI driver supports volume ownership + // and permission change via fsGroup, and Kubernetes may use fsGroup + // to change permissions and ownership of the volume to match user requested fsGroup in + // the pod's SecurityPolicy regardless of fstype or access mode. + FileFSGroupPolicy FSGroupPolicy = "File" + + // None indicates that volumes will be mounted without performing + // any ownership or permission modifications, as the CSIDriver does not support + // these operations. + NoneFSGroupPolicy FSGroupPolicy = "None" +) + // VolumeLifecycleMode is an enumeration of possible usage modes for a volume // provided by a CSI driver. More modes may be added in the future. type VolumeLifecycleMode string @@ -347,6 +419,10 @@ const ( // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.14 +// +k8s:prerelease-lifecycle-gen:deprecated=1.17 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,CSINode // DEPRECATED - This group version of CSINode is deprecated by storage/v1/CSINode. // See the release notes for more information. @@ -425,6 +501,10 @@ type VolumeNodeResources struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.14 +// +k8s:prerelease-lifecycle-gen:deprecated=1.17 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,CSINode // CSINodeList is a collection of CSINode objects. type CSINodeList struct { diff --git a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go index 53fa666ba0a..60cc4c6a45e 100644 --- a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go @@ -52,6 +52,8 @@ var map_CSIDriverSpec = map[string]string{ "attachRequired": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.", "podInfoOnMount": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" iff the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.", "volumeLifecycleModes": "VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.", + "storageCapacity": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis is an alpha field and only available when the CSIStorageCapacity feature is enabled. The default is false.", + "fsGroupPolicy": "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.", } func (CSIDriverSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go index 52433fcdf2c..a1538c13195 100644 --- a/vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go @@ -103,6 +103,16 @@ func (in *CSIDriverSpec) DeepCopyInto(out *CSIDriverSpec) { *out = make([]VolumeLifecycleMode, len(*in)) copy(*out, *in) } + if in.StorageCapacity != nil { + in, out := &in.StorageCapacity, &out.StorageCapacity + *out = new(bool) + **out = **in + } + if in.FSGroupPolicy != nil { + in, out := &in.FSGroupPolicy, &out.FSGroupPolicy + *out = new(FSGroupPolicy) + **out = **in + } return } diff --git a/vendor/k8s.io/api/storage/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/storage/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..8bb3de20751 --- /dev/null +++ b/vendor/k8s.io/api/storage/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,217 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CSIDriver) APILifecycleIntroduced() (major, minor int) { + return 1, 14 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *CSIDriver) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *CSIDriver) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSIDriver"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *CSIDriver) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CSIDriverList) APILifecycleIntroduced() (major, minor int) { + return 1, 14 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *CSIDriverList) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *CSIDriverList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSIDriverList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *CSIDriverList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CSINode) APILifecycleIntroduced() (major, minor int) { + return 1, 14 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *CSINode) APILifecycleDeprecated() (major, minor int) { + return 1, 17 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *CSINode) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSINode"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *CSINode) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CSINodeList) APILifecycleIntroduced() (major, minor int) { + return 1, 14 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *CSINodeList) APILifecycleDeprecated() (major, minor int) { + return 1, 17 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *CSINodeList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSINode"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *CSINodeList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *StorageClass) APILifecycleIntroduced() (major, minor int) { + return 1, 4 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *StorageClass) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *StorageClass) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "StorageClass"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *StorageClass) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *StorageClassList) APILifecycleIntroduced() (major, minor int) { + return 1, 4 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *StorageClassList) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *StorageClassList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "StorageClassList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *StorageClassList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *VolumeAttachment) APILifecycleIntroduced() (major, minor int) { + return 1, 10 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *VolumeAttachment) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *VolumeAttachment) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "VolumeAttachment"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *VolumeAttachment) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *VolumeAttachmentList) APILifecycleIntroduced() (major, minor int) { + return 1, 10 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *VolumeAttachmentList) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *VolumeAttachmentList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "VolumeAttachmentList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *VolumeAttachmentList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go index 8f502e8b15a..ee77a4229de 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go @@ -177,6 +177,15 @@ type CustomResourceDefinitionVersion struct { // Storage flags the version as storage version. There must be exactly one flagged // as storage version. Storage bool + // deprecated indicates this version of the custom resource API is deprecated. + // When set to true, API requests to this version receive a warning header in the server response. + // Defaults to false. + Deprecated bool + // deprecationWarning overrides the default warning returned to API clients. + // May only be set when `deprecated` is true. + // The default warning indicates this version is deprecated and recommends use + // of the newest served version of equal or greater stability, if one exists. + DeprecationWarning *string // Schema describes the schema for CustomResource used in validation, pruning, and defaulting. // Top-level and per-version schemas are mutually exclusive. // Per-version schemas must not all be set to identical values (top-level validation schema should be used instead) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go index 9d268f28410..d6f0c35fe26 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go @@ -785,191 +785,194 @@ func init() { } var fileDescriptor_f5a35c9667703937 = []byte{ - // 2943 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xdb, 0x6f, 0x24, 0x47, - 0xd5, 0xdf, 0x1e, 0xdf, 0xc6, 0x65, 0x7b, 0x6d, 0xd7, 0xae, 0xfd, 0xf5, 0x3a, 0xbb, 0x1e, 0xef, - 0xe4, 0xcb, 0x7e, 0x4e, 0xb2, 0x19, 0x67, 0xf7, 0x4b, 0x48, 0x88, 0x10, 0xc8, 0x63, 0x3b, 0xc1, - 0x59, 0x7b, 0x6d, 0xd5, 0xec, 0x6e, 0x9c, 0x04, 0x29, 0x29, 0x77, 0x97, 0xc7, 0x1d, 0xf7, 0x6d, - 0xbb, 0xba, 0xc7, 0xb6, 0x04, 0x52, 0x04, 0x8a, 0x80, 0x48, 0x10, 0x1e, 0x10, 0x3c, 0x21, 0x84, - 0x50, 0x1e, 0xe0, 0x01, 0xde, 0xe0, 0x5f, 0xc8, 0x0b, 0x52, 0x1e, 0x10, 0x44, 0x42, 0x1a, 0x91, - 0xe1, 0x4f, 0x00, 0x84, 0xf0, 0x03, 0x42, 0x75, 0xe9, 0xea, 0x9a, 0x9e, 0x99, 0xec, 0x6a, 0x3d, - 0x4e, 0xde, 0xec, 0x73, 0xfb, 0x9d, 0x3a, 0x75, 0xea, 0xd4, 0x39, 0xd5, 0x03, 0xf0, 0xc1, 0x8b, - 0xb4, 0xe2, 0x04, 0x4b, 0x07, 0xc9, 0x2e, 0x89, 0x7c, 0x12, 0x13, 0xba, 0xd4, 0x20, 0xbe, 0x1d, - 0x44, 0x4b, 0x92, 0x81, 0x43, 0x87, 0x1c, 0xc5, 0xc4, 0xa7, 0x4e, 0xe0, 0xd3, 0x67, 0x70, 0xe8, - 0x50, 0x12, 0x35, 0x48, 0xb4, 0x14, 0x1e, 0xd4, 0x19, 0x8f, 0xb6, 0x0b, 0x2c, 0x35, 0x6e, 0x2c, - 0xd5, 0x89, 0x4f, 0x22, 0x1c, 0x13, 0xbb, 0x12, 0x46, 0x41, 0x1c, 0xc0, 0x17, 0x85, 0xa5, 0x4a, - 0x9b, 0xe0, 0x5b, 0xca, 0x52, 0x25, 0x3c, 0xa8, 0x33, 0x1e, 0x6d, 0x17, 0xa8, 0x34, 0x6e, 0xcc, - 0x3d, 0x53, 0x77, 0xe2, 0xfd, 0x64, 0xb7, 0x62, 0x05, 0xde, 0x52, 0x3d, 0xa8, 0x07, 0x4b, 0xdc, - 0xe0, 0x6e, 0xb2, 0xc7, 0xff, 0xe3, 0xff, 0xf0, 0xbf, 0x04, 0xd0, 0xdc, 0x73, 0x99, 0xcb, 0x1e, - 0xb6, 0xf6, 0x1d, 0x9f, 0x44, 0xc7, 0x99, 0x9f, 0x1e, 0x89, 0x71, 0x17, 0xf7, 0xe6, 0x96, 0x7a, - 0x69, 0x45, 0x89, 0x1f, 0x3b, 0x1e, 0xe9, 0x50, 0xf8, 0xd2, 0x83, 0x14, 0xa8, 0xb5, 0x4f, 0x3c, - 0x9c, 0xd7, 0x2b, 0x9f, 0x18, 0x60, 0x7a, 0x25, 0xf0, 0x1b, 0x24, 0x62, 0x0b, 0x44, 0xe4, 0x7e, - 0x42, 0x68, 0x0c, 0xab, 0x60, 0x20, 0x71, 0x6c, 0xd3, 0x58, 0x30, 0x16, 0x47, 0xab, 0xcf, 0x7e, - 0xd4, 0x2c, 0x9d, 0x6b, 0x35, 0x4b, 0x03, 0x77, 0xd7, 0x57, 0x4f, 0x9a, 0xa5, 0xab, 0xbd, 0x90, - 0xe2, 0xe3, 0x90, 0xd0, 0xca, 0xdd, 0xf5, 0x55, 0xc4, 0x94, 0xe1, 0x2b, 0x60, 0xda, 0x26, 0xd4, - 0x89, 0x88, 0xbd, 0xbc, 0xbd, 0x7e, 0x4f, 0xd8, 0x37, 0x0b, 0xdc, 0xe2, 0x25, 0x69, 0x71, 0x7a, - 0x35, 0x2f, 0x80, 0x3a, 0x75, 0xe0, 0x0e, 0x18, 0x09, 0x76, 0xdf, 0x21, 0x56, 0x4c, 0xcd, 0x81, - 0x85, 0x81, 0xc5, 0xb1, 0x9b, 0xcf, 0x54, 0xb2, 0xcd, 0x53, 0x2e, 0xf0, 0x1d, 0x93, 0x8b, 0xad, - 0x20, 0x7c, 0xb8, 0x96, 0x6e, 0x5a, 0x75, 0x52, 0xa2, 0x8d, 0x6c, 0x09, 0x2b, 0x28, 0x35, 0x57, - 0xfe, 0x65, 0x01, 0x40, 0x7d, 0xf1, 0x34, 0x0c, 0x7c, 0x4a, 0xfa, 0xb2, 0x7a, 0x0a, 0xa6, 0x2c, - 0x6e, 0x39, 0x26, 0xb6, 0xc4, 0x35, 0x0b, 0x8f, 0xe2, 0xbd, 0x29, 0xf1, 0xa7, 0x56, 0x72, 0xe6, - 0x50, 0x07, 0x00, 0xbc, 0x03, 0x86, 0x23, 0x42, 0x13, 0x37, 0x36, 0x07, 0x16, 0x8c, 0xc5, 0xb1, - 0x9b, 0xd7, 0x7b, 0x42, 0xf1, 0xd4, 0x66, 0xc9, 0x57, 0x69, 0xdc, 0xa8, 0xd4, 0x62, 0x1c, 0x27, - 0xb4, 0x7a, 0x5e, 0x22, 0x0d, 0x23, 0x6e, 0x03, 0x49, 0x5b, 0xe5, 0xff, 0x18, 0x60, 0x4a, 0x8f, - 0x52, 0xc3, 0x21, 0x87, 0x30, 0x02, 0x23, 0x91, 0x48, 0x16, 0x1e, 0xa7, 0xb1, 0x9b, 0xb7, 0x2a, - 0x8f, 0x7a, 0xa2, 0x2a, 0x1d, 0xf9, 0x57, 0x1d, 0x63, 0xdb, 0x25, 0xff, 0x41, 0x29, 0x10, 0x6c, - 0x80, 0x62, 0x24, 0xf7, 0x88, 0x27, 0xd2, 0xd8, 0xcd, 0x8d, 0xfe, 0x80, 0x0a, 0x9b, 0xd5, 0xf1, - 0x56, 0xb3, 0x54, 0x4c, 0xff, 0x43, 0x0a, 0xab, 0xfc, 0xf3, 0x02, 0x98, 0x5f, 0x49, 0x68, 0x1c, - 0x78, 0x88, 0xd0, 0x20, 0x89, 0x2c, 0xb2, 0x12, 0xb8, 0x89, 0xe7, 0xaf, 0x92, 0x3d, 0xc7, 0x77, - 0x62, 0x96, 0xa3, 0x0b, 0x60, 0xd0, 0xc7, 0x1e, 0x91, 0x39, 0x33, 0x2e, 0x23, 0x39, 0x78, 0x1b, - 0x7b, 0x04, 0x71, 0x0e, 0x93, 0x60, 0x29, 0x22, 0x4f, 0x80, 0x92, 0xb8, 0x73, 0x1c, 0x12, 0xc4, - 0x39, 0xf0, 0x1a, 0x18, 0xde, 0x0b, 0x22, 0x0f, 0x8b, 0xdd, 0x1b, 0xcd, 0xf6, 0xe3, 0x65, 0x4e, - 0x45, 0x92, 0x0b, 0x9f, 0x07, 0x63, 0x36, 0xa1, 0x56, 0xe4, 0x84, 0x0c, 0xda, 0x1c, 0xe4, 0xc2, - 0x17, 0xa4, 0xf0, 0xd8, 0x6a, 0xc6, 0x42, 0xba, 0x1c, 0xbc, 0x0e, 0x8a, 0x61, 0xe4, 0x04, 0x91, - 0x13, 0x1f, 0x9b, 0x43, 0x0b, 0xc6, 0xe2, 0x50, 0x75, 0x4a, 0xea, 0x14, 0xb7, 0x25, 0x1d, 0x29, - 0x09, 0x26, 0xfd, 0x0e, 0x0d, 0xfc, 0x6d, 0x1c, 0xef, 0x9b, 0xc3, 0x1c, 0x41, 0x49, 0xbf, 0x5a, - 0xdb, 0xba, 0xcd, 0xe8, 0x48, 0x49, 0x94, 0xff, 0x64, 0x00, 0x33, 0x1f, 0xa1, 0x34, 0xbc, 0xf0, - 0x65, 0x50, 0xa4, 0x31, 0xab, 0x39, 0xf5, 0x63, 0x19, 0x9f, 0xa7, 0x52, 0x53, 0x35, 0x49, 0x3f, - 0x69, 0x96, 0x66, 0x33, 0x8d, 0x94, 0xca, 0x63, 0xa3, 0x74, 0x59, 0xca, 0x1d, 0x92, 0xdd, 0xfd, - 0x20, 0x38, 0x90, 0xbb, 0x7f, 0x8a, 0x94, 0x7b, 0x4d, 0x18, 0xca, 0x30, 0x45, 0xca, 0x49, 0x32, - 0x4a, 0x81, 0xca, 0xff, 0x2e, 0xe4, 0x17, 0xa6, 0x6d, 0xfa, 0xdb, 0xa0, 0xc8, 0x8e, 0x90, 0x8d, - 0x63, 0x2c, 0x0f, 0xc1, 0xb3, 0x0f, 0x77, 0xe0, 0xc4, 0x79, 0xdd, 0x24, 0x31, 0xae, 0x42, 0x19, - 0x0a, 0x90, 0xd1, 0x90, 0xb2, 0x0a, 0x8f, 0xc0, 0x20, 0x0d, 0x89, 0x25, 0xd7, 0x7b, 0xef, 0x14, - 0xd9, 0xde, 0x63, 0x0d, 0xb5, 0x90, 0x58, 0x59, 0x32, 0xb2, 0xff, 0x10, 0x47, 0x84, 0xef, 0x1a, - 0x60, 0x98, 0xf2, 0xba, 0x20, 0x6b, 0xc9, 0xce, 0x19, 0x80, 0xe7, 0xea, 0x8e, 0xf8, 0x1f, 0x49, - 0xdc, 0xf2, 0x3f, 0x0a, 0xe0, 0x6a, 0x2f, 0xd5, 0x95, 0xc0, 0xb7, 0xc5, 0x26, 0xac, 0xcb, 0x73, - 0x25, 0x32, 0xeb, 0x79, 0xfd, 0x5c, 0x9d, 0x34, 0x4b, 0x4f, 0x3c, 0xd0, 0x80, 0x76, 0x00, 0xbf, - 0xac, 0x96, 0x2c, 0x0e, 0xe9, 0xd5, 0x76, 0xc7, 0x4e, 0x9a, 0xa5, 0x49, 0xa5, 0xd6, 0xee, 0x2b, - 0x6c, 0x00, 0xe8, 0x62, 0x1a, 0xdf, 0x89, 0xb0, 0x4f, 0x85, 0x59, 0xc7, 0x23, 0x32, 0x72, 0x4f, - 0x3d, 0x5c, 0x52, 0x30, 0x8d, 0xea, 0x9c, 0x84, 0x84, 0x1b, 0x1d, 0xd6, 0x50, 0x17, 0x04, 0x56, - 0x33, 0x22, 0x82, 0xa9, 0x2a, 0x03, 0x5a, 0x0d, 0x67, 0x54, 0x24, 0xb9, 0xf0, 0x49, 0x30, 0xe2, - 0x11, 0x4a, 0x71, 0x9d, 0xf0, 0xb3, 0x3f, 0x9a, 0x5d, 0x8a, 0x9b, 0x82, 0x8c, 0x52, 0x7e, 0xf9, - 0x9f, 0x06, 0xb8, 0xdc, 0x2b, 0x6a, 0x1b, 0x0e, 0x8d, 0xe1, 0x37, 0x3a, 0xd2, 0xbe, 0xf2, 0x70, - 0x2b, 0x64, 0xda, 0x3c, 0xe9, 0x55, 0x29, 0x49, 0x29, 0x5a, 0xca, 0x1f, 0x82, 0x21, 0x27, 0x26, - 0x5e, 0x7a, 0x5b, 0xa2, 0xfe, 0xa7, 0x5d, 0x75, 0x42, 0xc2, 0x0f, 0xad, 0x33, 0x20, 0x24, 0xf0, - 0xca, 0x1f, 0x16, 0xc0, 0x95, 0x5e, 0x2a, 0xac, 0x8e, 0x53, 0x16, 0xec, 0xd0, 0x4d, 0x22, 0xec, - 0xca, 0x64, 0x53, 0xc1, 0xde, 0xe6, 0x54, 0x24, 0xb9, 0xac, 0x76, 0x52, 0xc7, 0xaf, 0x27, 0x2e, - 0x8e, 0x64, 0x26, 0xa9, 0x05, 0xd7, 0x24, 0x1d, 0x29, 0x09, 0x58, 0x01, 0x80, 0xee, 0x07, 0x51, - 0xcc, 0x31, 0x78, 0x87, 0x33, 0x5a, 0x3d, 0xcf, 0x2a, 0x42, 0x4d, 0x51, 0x91, 0x26, 0xc1, 0x2e, - 0x92, 0x03, 0xc7, 0xb7, 0xe5, 0x86, 0xab, 0xb3, 0x7b, 0xcb, 0xf1, 0x6d, 0xc4, 0x39, 0x0c, 0xdf, - 0x75, 0x68, 0xcc, 0x28, 0x72, 0xb7, 0xdb, 0x02, 0xce, 0x25, 0x95, 0x04, 0xc3, 0xb7, 0x58, 0x81, - 0x0d, 0x22, 0x87, 0x50, 0x73, 0x38, 0xc3, 0x5f, 0x51, 0x54, 0xa4, 0x49, 0x94, 0xff, 0x32, 0xd8, - 0x3b, 0x3f, 0x58, 0x01, 0x81, 0x8f, 0x83, 0xa1, 0x7a, 0x14, 0x24, 0xa1, 0x8c, 0x92, 0x8a, 0xf6, - 0x2b, 0x8c, 0x88, 0x04, 0x0f, 0x7e, 0x13, 0x0c, 0xf9, 0x72, 0xc1, 0x2c, 0x83, 0x5e, 0xeb, 0xff, - 0x36, 0xf3, 0x68, 0x65, 0xe8, 0x22, 0x90, 0x02, 0x14, 0x3e, 0x07, 0x86, 0xa8, 0x15, 0x84, 0x44, - 0x06, 0x71, 0x3e, 0x15, 0xaa, 0x31, 0xe2, 0x49, 0xb3, 0x34, 0x91, 0x9a, 0xe3, 0x04, 0x24, 0x84, - 0xe1, 0x77, 0x0d, 0x50, 0x94, 0xd7, 0x05, 0x35, 0x47, 0x78, 0x7a, 0xbe, 0xde, 0x7f, 0xbf, 0x65, - 0xdb, 0x9b, 0xed, 0x99, 0x24, 0x50, 0xa4, 0xc0, 0xe1, 0xb7, 0x0d, 0x00, 0x2c, 0x75, 0x77, 0x99, - 0xa3, 0x3c, 0x86, 0x7d, 0x3b, 0x2a, 0xda, 0xad, 0x28, 0x12, 0x21, 0x6b, 0x95, 0x34, 0x54, 0x58, - 0x03, 0x33, 0x61, 0x44, 0xb8, 0xed, 0xbb, 0xfe, 0x81, 0x1f, 0x1c, 0xfa, 0x2f, 0x3b, 0xc4, 0xb5, - 0xa9, 0x09, 0x16, 0x8c, 0xc5, 0x62, 0xf5, 0x8a, 0xf4, 0x7f, 0x66, 0xbb, 0x9b, 0x10, 0xea, 0xae, - 0x5b, 0x7e, 0x6f, 0x20, 0xdf, 0x6b, 0xe5, 0xef, 0x0b, 0xf8, 0x81, 0x58, 0xbc, 0xa8, 0xc3, 0xd4, - 0x34, 0xf8, 0x46, 0xbc, 0xd9, 0xff, 0x8d, 0x50, 0xb5, 0x3e, 0xbb, 0xa4, 0x15, 0x89, 0x22, 0xcd, - 0x05, 0xf8, 0x63, 0x03, 0x4c, 0x60, 0xcb, 0x22, 0x61, 0x4c, 0x6c, 0x71, 0x8c, 0x0b, 0x67, 0x9b, - 0xd5, 0x33, 0xd2, 0xa1, 0x89, 0x65, 0x1d, 0x15, 0xb5, 0x3b, 0x01, 0x5f, 0x02, 0xe7, 0x69, 0x1c, - 0x44, 0xc4, 0x4e, 0x33, 0x48, 0x56, 0x17, 0xd8, 0x6a, 0x96, 0xce, 0xd7, 0xda, 0x38, 0x28, 0x27, - 0x59, 0xfe, 0xe3, 0x20, 0x28, 0x3d, 0x20, 0x43, 0x1f, 0xa2, 0xe9, 0xbd, 0x06, 0x86, 0xf9, 0x4a, - 0x6d, 0x1e, 0x90, 0xa2, 0x76, 0xd5, 0x73, 0x2a, 0x92, 0x5c, 0x76, 0x3d, 0x31, 0x7c, 0x76, 0x3d, - 0x0d, 0x70, 0x41, 0x75, 0x3d, 0xd5, 0x04, 0x19, 0xa5, 0x7c, 0xd8, 0x00, 0xc3, 0x62, 0x94, 0xe5, - 0x67, 0xb7, 0x8f, 0x59, 0x7f, 0x0f, 0xbb, 0x8e, 0x8d, 0xf9, 0x7e, 0x03, 0xee, 0x22, 0x47, 0x41, - 0x12, 0x0d, 0xbe, 0x6f, 0x80, 0x71, 0x9a, 0xec, 0x46, 0x52, 0x9a, 0xf2, 0xca, 0x3a, 0x76, 0xf3, - 0x4e, 0xbf, 0xe0, 0x6b, 0x9a, 0xed, 0xea, 0x54, 0xab, 0x59, 0x1a, 0xd7, 0x29, 0xa8, 0x0d, 0x1b, - 0xfe, 0xce, 0x00, 0x26, 0xb6, 0x45, 0xfa, 0x61, 0x77, 0x3b, 0x72, 0xfc, 0x98, 0x44, 0x62, 0x28, - 0x11, 0x25, 0xbc, 0x8f, 0xfd, 0x5a, 0x7e, 0xd6, 0xa9, 0x2e, 0xc8, 0xbd, 0x31, 0x97, 0x7b, 0x78, - 0x80, 0x7a, 0xfa, 0x56, 0xfe, 0x97, 0x91, 0x3f, 0xde, 0xda, 0x2a, 0x6b, 0x16, 0x76, 0x09, 0x5c, - 0x05, 0x53, 0xac, 0x03, 0x45, 0x24, 0x74, 0x1d, 0x0b, 0x53, 0x3e, 0x81, 0x88, 0x0c, 0x53, 0xa3, - 0x70, 0x2d, 0xc7, 0x47, 0x1d, 0x1a, 0xf0, 0x55, 0x00, 0x45, 0x6b, 0xd6, 0x66, 0x47, 0xdc, 0xc6, - 0xaa, 0xc9, 0xaa, 0x75, 0x48, 0xa0, 0x2e, 0x5a, 0x70, 0x05, 0x4c, 0xbb, 0x78, 0x97, 0xb8, 0x35, - 0xe2, 0x12, 0x2b, 0x0e, 0x22, 0x6e, 0x4a, 0xcc, 0x68, 0x33, 0xad, 0x66, 0x69, 0x7a, 0x23, 0xcf, - 0x44, 0x9d, 0xf2, 0xe5, 0xab, 0xf9, 0xf3, 0xa4, 0x2f, 0x5c, 0x34, 0xbc, 0x3f, 0x29, 0x80, 0xb9, - 0xde, 0x49, 0x01, 0xbf, 0xa5, 0xda, 0x53, 0xd1, 0x75, 0xbd, 0x7e, 0x06, 0xa9, 0x27, 0x5b, 0x72, - 0xd0, 0xd9, 0x8e, 0xc3, 0x63, 0x76, 0x67, 0x62, 0x37, 0x1d, 0xbd, 0x77, 0xce, 0x02, 0x9d, 0xd9, - 0xaf, 0x8e, 0x8a, 0x9b, 0x18, 0xbb, 0xfc, 0xe2, 0xc5, 0x2e, 0x29, 0x7f, 0xd8, 0x31, 0x5e, 0x66, - 0x87, 0x15, 0x7e, 0xcf, 0x00, 0x93, 0x41, 0x48, 0xfc, 0xe5, 0xed, 0xf5, 0x7b, 0xff, 0x2f, 0x0e, - 0xad, 0x0c, 0xd0, 0xfa, 0xa3, 0xbb, 0xc8, 0x66, 0x5c, 0x61, 0x6b, 0x3b, 0x0a, 0x42, 0x5a, 0xbd, - 0xd0, 0x6a, 0x96, 0x26, 0xb7, 0xda, 0x51, 0x50, 0x1e, 0xb6, 0xec, 0x81, 0x99, 0xb5, 0xa3, 0x98, - 0x44, 0x3e, 0x76, 0x57, 0x03, 0x2b, 0xf1, 0x88, 0x1f, 0x0b, 0x1f, 0x73, 0x23, 0xbb, 0xf1, 0x90, - 0x23, 0xfb, 0x15, 0x30, 0x90, 0x44, 0xae, 0xcc, 0xda, 0x31, 0xf5, 0x10, 0x85, 0x36, 0x10, 0xa3, - 0x97, 0xaf, 0x82, 0x41, 0xe6, 0x27, 0xbc, 0x04, 0x06, 0x22, 0x7c, 0xc8, 0xad, 0x8e, 0x57, 0x47, - 0x98, 0x08, 0xc2, 0x87, 0x88, 0xd1, 0xca, 0x7f, 0x2e, 0x81, 0xc9, 0xdc, 0x5a, 0xe0, 0x1c, 0x28, - 0xa8, 0xd7, 0x2d, 0x20, 0x8d, 0x16, 0xd6, 0x57, 0x51, 0xc1, 0xb1, 0xe1, 0x0b, 0xaa, 0xba, 0x0a, - 0xd0, 0x92, 0x2a, 0xd8, 0x9c, 0xca, 0x5a, 0xa3, 0xcc, 0x1c, 0x73, 0x24, 0x2d, 0x8f, 0xcc, 0x07, - 0xb2, 0x27, 0x4f, 0x85, 0xf0, 0x81, 0xec, 0x21, 0x46, 0x7b, 0xd4, 0xf7, 0x8a, 0xf4, 0xc1, 0x64, - 0xe8, 0x21, 0x1e, 0x4c, 0x86, 0x3f, 0xf3, 0xc1, 0xe4, 0x71, 0x30, 0x14, 0x3b, 0xb1, 0x4b, 0xcc, - 0x91, 0xf6, 0x86, 0xf4, 0x0e, 0x23, 0x22, 0xc1, 0x83, 0x04, 0x8c, 0xd8, 0x64, 0x0f, 0x27, 0x6e, - 0x6c, 0x16, 0x79, 0xf6, 0x7c, 0xf5, 0x74, 0xd9, 0x23, 0x1e, 0x14, 0x56, 0x85, 0x49, 0x94, 0xda, - 0x86, 0x4f, 0x80, 0x11, 0x0f, 0x1f, 0x39, 0x5e, 0xe2, 0xf1, 0xae, 0xcd, 0x10, 0x62, 0x9b, 0x82, - 0x84, 0x52, 0x1e, 0x2b, 0x82, 0xe4, 0xc8, 0x72, 0x13, 0xea, 0x34, 0x88, 0x64, 0xca, 0xb6, 0x4a, - 0x15, 0xc1, 0xb5, 0x1c, 0x1f, 0x75, 0x68, 0x70, 0x30, 0xc7, 0xe7, 0xca, 0x63, 0x1a, 0x98, 0x20, - 0xa1, 0x94, 0xd7, 0x0e, 0x26, 0xe5, 0xc7, 0x7b, 0x81, 0x49, 0xe5, 0x0e, 0x0d, 0xf8, 0x34, 0x18, - 0xf5, 0xf0, 0xd1, 0x06, 0xf1, 0xeb, 0xf1, 0xbe, 0x39, 0xb1, 0x60, 0x2c, 0x0e, 0x54, 0x27, 0x5a, - 0xcd, 0xd2, 0xe8, 0x66, 0x4a, 0x44, 0x19, 0x9f, 0x0b, 0x3b, 0xbe, 0x14, 0x3e, 0xaf, 0x09, 0xa7, - 0x44, 0x94, 0xf1, 0x59, 0x77, 0x10, 0xe2, 0x98, 0x9d, 0x2b, 0x73, 0xb2, 0x7d, 0x78, 0xdd, 0x16, - 0x64, 0x94, 0xf2, 0xe1, 0x22, 0x28, 0x7a, 0xf8, 0x88, 0xcf, 0x75, 0xe6, 0x14, 0x37, 0xcb, 0x1f, - 0xf5, 0x36, 0x25, 0x0d, 0x29, 0x2e, 0x97, 0x74, 0x7c, 0x21, 0x39, 0xad, 0x49, 0x4a, 0x1a, 0x52, - 0x5c, 0x96, 0xbf, 0x89, 0xef, 0xdc, 0x4f, 0x88, 0x10, 0x86, 0x3c, 0x32, 0x2a, 0x7f, 0xef, 0x66, - 0x2c, 0xa4, 0xcb, 0xb1, 0xb9, 0xca, 0x4b, 0xdc, 0xd8, 0x09, 0x5d, 0xb2, 0xb5, 0x67, 0x5e, 0xe0, - 0xf1, 0xe7, 0xed, 0xf4, 0xa6, 0xa2, 0x22, 0x4d, 0x02, 0xbe, 0x0d, 0x06, 0x89, 0x9f, 0x78, 0xe6, - 0x45, 0x7e, 0x7d, 0x9f, 0x36, 0xfb, 0xd4, 0x79, 0x59, 0xf3, 0x13, 0x0f, 0x71, 0xcb, 0xf0, 0x05, - 0x30, 0xe1, 0xe1, 0x23, 0x56, 0x04, 0x48, 0x14, 0xb3, 0x61, 0x6f, 0x86, 0xaf, 0x7b, 0x9a, 0x35, - 0x92, 0x9b, 0x3a, 0x03, 0xb5, 0xcb, 0x71, 0x45, 0xc7, 0xd7, 0x14, 0x67, 0x35, 0x45, 0x9d, 0x81, - 0xda, 0xe5, 0x58, 0x90, 0x23, 0x72, 0x3f, 0x71, 0x22, 0x62, 0x9b, 0xff, 0xc3, 0x7b, 0x4f, 0xf9, - 0xc6, 0x2a, 0x68, 0x48, 0x71, 0xe1, 0xfd, 0x74, 0xec, 0x37, 0xf9, 0xe1, 0xdb, 0xee, 0x5b, 0xe9, - 0xde, 0x8a, 0x96, 0xa3, 0x08, 0x1f, 0x8b, 0x5b, 0x45, 0x1f, 0xf8, 0xa1, 0x0f, 0x86, 0xb0, 0xeb, - 0x6e, 0xed, 0x99, 0x97, 0x78, 0xc4, 0xfb, 0x78, 0x5b, 0xa8, 0x0a, 0xb3, 0xcc, 0xec, 0x23, 0x01, - 0xc3, 0xf0, 0x02, 0x9f, 0xe5, 0xc2, 0xdc, 0x99, 0xe1, 0x6d, 0x31, 0xfb, 0x48, 0xc0, 0xf0, 0xf5, - 0xf9, 0xc7, 0x5b, 0x7b, 0xe6, 0x63, 0x67, 0xb7, 0x3e, 0x66, 0x1f, 0x09, 0x18, 0x68, 0x83, 0x01, - 0x3f, 0x88, 0xcd, 0xcb, 0xfd, 0xbe, 0x7b, 0xf9, 0x6d, 0x72, 0x3b, 0x88, 0x11, 0x33, 0x0f, 0x7f, - 0x60, 0x00, 0x10, 0x66, 0x99, 0x78, 0xe5, 0xb4, 0x63, 0x78, 0x0e, 0xad, 0x92, 0x65, 0xef, 0x9a, - 0x1f, 0x47, 0xc7, 0xd9, 0xec, 0xa7, 0x65, 0xb9, 0xe6, 0x00, 0xfc, 0x99, 0x01, 0x2e, 0xea, 0xed, - 0xae, 0xf2, 0x6c, 0x9e, 0xc7, 0x61, 0xab, 0x8f, 0x89, 0x5c, 0x0d, 0x02, 0xb7, 0x6a, 0xb6, 0x9a, - 0xa5, 0x8b, 0xcb, 0x5d, 0x00, 0x51, 0x57, 0x37, 0xe0, 0xaf, 0x0c, 0x30, 0x2d, 0xab, 0xa3, 0xe6, - 0x5c, 0x89, 0x87, 0xed, 0xed, 0x3e, 0x86, 0x2d, 0x0f, 0x21, 0xa2, 0xa7, 0xbe, 0xf4, 0x75, 0xf0, - 0x51, 0xa7, 0x57, 0xf0, 0xb7, 0x06, 0x18, 0xb7, 0x49, 0x48, 0x7c, 0x9b, 0xf8, 0x16, 0x73, 0x73, - 0xe1, 0xb4, 0xb3, 0x7d, 0xde, 0xcd, 0x55, 0xcd, 0xba, 0xf0, 0xb0, 0x22, 0x3d, 0x1c, 0xd7, 0x59, - 0x27, 0xcd, 0xd2, 0x6c, 0xa6, 0xaa, 0x73, 0x50, 0x9b, 0x83, 0xf0, 0x87, 0x06, 0x98, 0xcc, 0xc2, - 0x2e, 0x2e, 0x88, 0xab, 0x67, 0xb3, 0xf1, 0xbc, 0x05, 0x5d, 0x6e, 0xc7, 0x42, 0x79, 0x70, 0xf8, - 0x6b, 0x83, 0x75, 0x5b, 0xe9, 0xac, 0x46, 0xcd, 0x32, 0x8f, 0xe0, 0x1b, 0xfd, 0x8c, 0xa0, 0x32, - 0x2e, 0x02, 0x78, 0x3d, 0xeb, 0xe4, 0x14, 0xe7, 0xa4, 0x59, 0x9a, 0xd1, 0xe3, 0xa7, 0x18, 0x48, - 0x77, 0x0e, 0xbe, 0x67, 0x80, 0x71, 0x92, 0x35, 0xcc, 0xd4, 0x7c, 0xfc, 0xb4, 0xa1, 0xeb, 0xda, - 0x7e, 0x8b, 0x71, 0x5a, 0x63, 0x51, 0xd4, 0x06, 0xcb, 0x7a, 0x3f, 0x72, 0x84, 0xbd, 0xd0, 0x25, - 0xe6, 0xff, 0xf6, 0xaf, 0xf7, 0x5b, 0x13, 0x26, 0x51, 0x6a, 0x1b, 0x5e, 0x07, 0x45, 0x3f, 0x71, - 0x5d, 0xbc, 0xeb, 0x12, 0xf3, 0x09, 0xde, 0x45, 0xa8, 0x37, 0xbe, 0xdb, 0x92, 0x8e, 0x94, 0x04, - 0xdc, 0x03, 0x0b, 0x47, 0xb7, 0xd4, 0x0f, 0x20, 0xba, 0x3e, 0xa2, 0x99, 0xd7, 0xb8, 0x95, 0xb9, - 0x56, 0xb3, 0x34, 0xbb, 0xd3, 0xfd, 0x99, 0xed, 0x81, 0x36, 0xe0, 0x9b, 0xe0, 0x31, 0x4d, 0x66, - 0xcd, 0xdb, 0x25, 0xb6, 0x4d, 0xec, 0x74, 0xd0, 0x32, 0xff, 0x8f, 0x43, 0xa8, 0x73, 0xbc, 0x93, - 0x17, 0x40, 0x9f, 0xa5, 0x0d, 0x37, 0xc0, 0xac, 0xc6, 0x5e, 0xf7, 0xe3, 0xad, 0xa8, 0x16, 0x47, - 0x8e, 0x5f, 0x37, 0x17, 0xb9, 0xdd, 0x8b, 0xe9, 0xe9, 0xdb, 0xd1, 0x78, 0xa8, 0x87, 0x0e, 0xfc, - 0x7a, 0x9b, 0x35, 0xfe, 0xf1, 0x00, 0x87, 0xb7, 0xc8, 0x31, 0x35, 0x9f, 0xe4, 0xcd, 0x05, 0xdf, - 0xe7, 0x1d, 0x8d, 0x8e, 0x7a, 0xc8, 0xc3, 0xaf, 0x81, 0x0b, 0x39, 0x0e, 0x9b, 0x2b, 0xcc, 0xa7, - 0xc4, 0x80, 0xc0, 0x3a, 0xd1, 0x9d, 0x94, 0x88, 0xba, 0x49, 0xc2, 0xaf, 0x00, 0xa8, 0x91, 0x37, - 0x71, 0xc8, 0xf5, 0x9f, 0x16, 0xb3, 0x0a, 0xdb, 0xd1, 0x1d, 0x49, 0x43, 0x5d, 0xe4, 0xe6, 0xd8, - 0xcc, 0x9a, 0x2b, 0x95, 0x70, 0x0a, 0x0c, 0x1c, 0x10, 0xf9, 0x85, 0x14, 0xb1, 0x3f, 0xe1, 0x5b, - 0x60, 0xa8, 0x81, 0xdd, 0x24, 0x9d, 0xb8, 0xfb, 0x77, 0xa5, 0x22, 0x61, 0xf7, 0xa5, 0xc2, 0x8b, - 0xc6, 0xdc, 0x07, 0x06, 0x98, 0xed, 0x5e, 0xbc, 0xbf, 0x28, 0x8f, 0x7e, 0x6a, 0x80, 0xe9, 0x8e, - 0x3a, 0xdd, 0xc5, 0x19, 0xb7, 0xdd, 0x99, 0x7b, 0x7d, 0x2c, 0xb8, 0x22, 0xdf, 0x78, 0xe3, 0xa8, - 0x7b, 0xf6, 0x7d, 0x03, 0x4c, 0xe5, 0xeb, 0xdf, 0x17, 0x14, 0xa5, 0xf2, 0xfb, 0x05, 0x30, 0xdb, - 0xbd, 0xd5, 0x85, 0x9e, 0x1a, 0xe2, 0xfb, 0xfe, 0x0e, 0xd2, 0xed, 0x65, 0xf4, 0x5d, 0x03, 0x8c, - 0xbd, 0xa3, 0xe4, 0xd2, 0x0f, 0x77, 0xfd, 0x7c, 0x7c, 0x49, 0x6f, 0x98, 0x8c, 0x41, 0x91, 0x0e, - 0x59, 0xfe, 0x8d, 0x01, 0x66, 0xba, 0xde, 0x9a, 0xf0, 0x1a, 0x18, 0xc6, 0xae, 0x1b, 0x1c, 0x8a, - 0x47, 0x33, 0xed, 0x05, 0x7a, 0x99, 0x53, 0x91, 0xe4, 0x6a, 0x31, 0x2b, 0x7c, 0x0e, 0x31, 0x2b, - 0xff, 0xde, 0x00, 0x97, 0x3f, 0x2b, 0xeb, 0x3e, 0xef, 0x3d, 0x5c, 0x04, 0x45, 0xd9, 0xd3, 0x1e, - 0xf3, 0xfd, 0x93, 0x45, 0x4c, 0x56, 0x04, 0xfe, 0xc3, 0x10, 0xf1, 0x57, 0xf9, 0x17, 0x06, 0x98, - 0xaa, 0x91, 0xa8, 0xe1, 0x58, 0x04, 0x91, 0x3d, 0x12, 0x11, 0xdf, 0x22, 0x70, 0x09, 0x8c, 0xf2, - 0x0f, 0x6b, 0x21, 0xb6, 0xd2, 0xcf, 0x01, 0xd3, 0x32, 0xd0, 0xa3, 0xb7, 0x53, 0x06, 0xca, 0x64, - 0xd4, 0xa7, 0x83, 0x42, 0xcf, 0x4f, 0x07, 0x97, 0xc1, 0x60, 0x98, 0xbd, 0xb3, 0x16, 0x19, 0x97, - 0x3f, 0xad, 0x72, 0x2a, 0xe7, 0x06, 0x51, 0xcc, 0x1f, 0x93, 0x86, 0x24, 0x37, 0x88, 0x62, 0xc4, - 0xa9, 0xe5, 0x3f, 0x18, 0xe0, 0x42, 0xfa, 0x0b, 0x0f, 0xd7, 0x21, 0x7e, 0xbc, 0x12, 0xf8, 0x7b, - 0x4e, 0x1d, 0x5e, 0x12, 0xef, 0x69, 0xda, 0x23, 0x55, 0xfa, 0x96, 0x06, 0xef, 0x83, 0x11, 0x2a, - 0x56, 0x25, 0x03, 0xfe, 0xea, 0xa3, 0x07, 0x3c, 0x1f, 0x1e, 0xd1, 0x0e, 0xa4, 0xd4, 0x14, 0x87, - 0xc5, 0xdc, 0xc2, 0xd5, 0xc4, 0xb7, 0xe5, 0x9b, 0xea, 0xb8, 0x88, 0xf9, 0xca, 0xb2, 0xa0, 0x21, - 0xc5, 0x2d, 0xff, 0xdd, 0x00, 0xd3, 0x1d, 0xbf, 0x58, 0x81, 0xdf, 0x31, 0xc0, 0xb8, 0xa5, 0x2d, - 0x4f, 0x66, 0xee, 0xe6, 0xe9, 0x7f, 0x15, 0xa3, 0x19, 0x15, 0x77, 0xaa, 0x4e, 0x41, 0x6d, 0xa0, - 0x70, 0x07, 0x98, 0x56, 0xee, 0xc7, 0x61, 0xb9, 0xcf, 0x4d, 0x97, 0x5b, 0xcd, 0x92, 0xb9, 0xd2, - 0x43, 0x06, 0xf5, 0xd4, 0xae, 0x2e, 0x7e, 0xf4, 0xe9, 0xfc, 0xb9, 0x8f, 0x3f, 0x9d, 0x3f, 0xf7, - 0xc9, 0xa7, 0xf3, 0xe7, 0xde, 0x6d, 0xcd, 0x1b, 0x1f, 0xb5, 0xe6, 0x8d, 0x8f, 0x5b, 0xf3, 0xc6, - 0x27, 0xad, 0x79, 0xe3, 0xaf, 0xad, 0x79, 0xe3, 0x47, 0x7f, 0x9b, 0x3f, 0xf7, 0x46, 0xa1, 0x71, - 0xe3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x09, 0x4a, 0x32, 0x30, 0x2a, 0x00, 0x00, + // 2989 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xdf, 0x6f, 0x5c, 0x47, + 0xf5, 0xcf, 0x5d, 0x7b, 0xed, 0xf5, 0xd8, 0x8e, 0xed, 0x49, 0xec, 0xef, 0x8d, 0x9b, 0x78, 0x9d, + 0xed, 0xb7, 0xc1, 0x6d, 0xd3, 0x75, 0x63, 0x5a, 0x5a, 0x2a, 0x04, 0xf2, 0xda, 0x4e, 0x71, 0x63, + 0xc7, 0xd6, 0x6c, 0x92, 0xba, 0x2d, 0x52, 0x3b, 0xde, 0x3b, 0x5e, 0xdf, 0xfa, 0xfe, 0xca, 0x9d, + 0x7b, 0xd7, 0xb6, 0x04, 0x52, 0x05, 0xaa, 0x80, 0x4a, 0x50, 0x1e, 0x10, 0x3c, 0x21, 0x84, 0x50, + 0x1f, 0xe0, 0x01, 0xde, 0xe0, 0x5f, 0xe8, 0x0b, 0x52, 0x9f, 0xa0, 0x12, 0xd2, 0x8a, 0x2e, 0x7f, + 0x02, 0x20, 0x84, 0x1f, 0x10, 0x9a, 0x1f, 0x77, 0xee, 0xec, 0xdd, 0xdd, 0x24, 0x8a, 0xd7, 0xed, + 0x9b, 0xf7, 0xfc, 0xfa, 0x9c, 0x39, 0x73, 0xe6, 0xcc, 0x99, 0x73, 0x0d, 0xf0, 0xc1, 0xcb, 0xb4, + 0x6c, 0xfb, 0x8b, 0x07, 0xf1, 0x2e, 0x09, 0x3d, 0x12, 0x11, 0xba, 0xd8, 0x20, 0x9e, 0xe5, 0x87, + 0x8b, 0x92, 0x81, 0x03, 0x9b, 0x1c, 0x45, 0xc4, 0xa3, 0xb6, 0xef, 0xd1, 0xe7, 0x70, 0x60, 0x53, + 0x12, 0x36, 0x48, 0xb8, 0x18, 0x1c, 0xd4, 0x19, 0x8f, 0xb6, 0x0b, 0x2c, 0x36, 0x6e, 0x2c, 0xd6, + 0x89, 0x47, 0x42, 0x1c, 0x11, 0xab, 0x1c, 0x84, 0x7e, 0xe4, 0xc3, 0x97, 0x85, 0xa5, 0x72, 0x9b, + 0xe0, 0xdb, 0xca, 0x52, 0x39, 0x38, 0xa8, 0x33, 0x1e, 0x6d, 0x17, 0x28, 0x37, 0x6e, 0xcc, 0x3e, + 0x57, 0xb7, 0xa3, 0xfd, 0x78, 0xb7, 0x5c, 0xf3, 0xdd, 0xc5, 0xba, 0x5f, 0xf7, 0x17, 0xb9, 0xc1, + 0xdd, 0x78, 0x8f, 0xff, 0xe2, 0x3f, 0xf8, 0x5f, 0x02, 0x68, 0xf6, 0x85, 0xd4, 0x65, 0x17, 0xd7, + 0xf6, 0x6d, 0x8f, 0x84, 0xc7, 0xa9, 0x9f, 0x2e, 0x89, 0x70, 0x17, 0xf7, 0x66, 0x17, 0x7b, 0x69, + 0x85, 0xb1, 0x17, 0xd9, 0x2e, 0xe9, 0x50, 0xf8, 0xca, 0xc3, 0x14, 0x68, 0x6d, 0x9f, 0xb8, 0x38, + 0xab, 0x57, 0x3a, 0x31, 0xc0, 0xd4, 0x8a, 0xef, 0x35, 0x48, 0xc8, 0x16, 0x88, 0xc8, 0xfd, 0x98, + 0xd0, 0x08, 0x56, 0xc0, 0x40, 0x6c, 0x5b, 0xa6, 0x31, 0x6f, 0x2c, 0x8c, 0x54, 0x9e, 0xff, 0xb8, + 0x59, 0x3c, 0xd7, 0x6a, 0x16, 0x07, 0xee, 0xae, 0xaf, 0x9e, 0x34, 0x8b, 0x57, 0x7b, 0x21, 0x45, + 0xc7, 0x01, 0xa1, 0xe5, 0xbb, 0xeb, 0xab, 0x88, 0x29, 0xc3, 0x57, 0xc1, 0x94, 0x45, 0xa8, 0x1d, + 0x12, 0x6b, 0x79, 0x7b, 0xfd, 0x9e, 0xb0, 0x6f, 0xe6, 0xb8, 0xc5, 0x4b, 0xd2, 0xe2, 0xd4, 0x6a, + 0x56, 0x00, 0x75, 0xea, 0xc0, 0x1d, 0x30, 0xec, 0xef, 0xbe, 0x4b, 0x6a, 0x11, 0x35, 0x07, 0xe6, + 0x07, 0x16, 0x46, 0x97, 0x9e, 0x2b, 0xa7, 0x9b, 0xa7, 0x5c, 0xe0, 0x3b, 0x26, 0x17, 0x5b, 0x46, + 0xf8, 0x70, 0x2d, 0xd9, 0xb4, 0xca, 0x84, 0x44, 0x1b, 0xde, 0x12, 0x56, 0x50, 0x62, 0xae, 0xf4, + 0xeb, 0x1c, 0x80, 0xfa, 0xe2, 0x69, 0xe0, 0x7b, 0x94, 0xf4, 0x65, 0xf5, 0x14, 0x4c, 0xd6, 0xb8, + 0xe5, 0x88, 0x58, 0x12, 0xd7, 0xcc, 0x3d, 0x8e, 0xf7, 0xa6, 0xc4, 0x9f, 0x5c, 0xc9, 0x98, 0x43, + 0x1d, 0x00, 0xf0, 0x0e, 0x18, 0x0a, 0x09, 0x8d, 0x9d, 0xc8, 0x1c, 0x98, 0x37, 0x16, 0x46, 0x97, + 0xae, 0xf7, 0x84, 0xe2, 0xa9, 0xcd, 0x92, 0xaf, 0xdc, 0xb8, 0x51, 0xae, 0x46, 0x38, 0x8a, 0x69, + 0xe5, 0xbc, 0x44, 0x1a, 0x42, 0xdc, 0x06, 0x92, 0xb6, 0x4a, 0xff, 0x35, 0xc0, 0xa4, 0x1e, 0xa5, + 0x86, 0x4d, 0x0e, 0x61, 0x08, 0x86, 0x43, 0x91, 0x2c, 0x3c, 0x4e, 0xa3, 0x4b, 0xb7, 0xca, 0x8f, + 0x7b, 0xa2, 0xca, 0x1d, 0xf9, 0x57, 0x19, 0x65, 0xdb, 0x25, 0x7f, 0xa0, 0x04, 0x08, 0x36, 0x40, + 0x21, 0x94, 0x7b, 0xc4, 0x13, 0x69, 0x74, 0x69, 0xa3, 0x3f, 0xa0, 0xc2, 0x66, 0x65, 0xac, 0xd5, + 0x2c, 0x16, 0x92, 0x5f, 0x48, 0x61, 0x95, 0x7e, 0x99, 0x03, 0x73, 0x2b, 0x31, 0x8d, 0x7c, 0x17, + 0x11, 0xea, 0xc7, 0x61, 0x8d, 0xac, 0xf8, 0x4e, 0xec, 0x7a, 0xab, 0x64, 0xcf, 0xf6, 0xec, 0x88, + 0xe5, 0xe8, 0x3c, 0x18, 0xf4, 0xb0, 0x4b, 0x64, 0xce, 0x8c, 0xc9, 0x48, 0x0e, 0xde, 0xc6, 0x2e, + 0x41, 0x9c, 0xc3, 0x24, 0x58, 0x8a, 0xc8, 0x13, 0xa0, 0x24, 0xee, 0x1c, 0x07, 0x04, 0x71, 0x0e, + 0xbc, 0x06, 0x86, 0xf6, 0xfc, 0xd0, 0xc5, 0x62, 0xf7, 0x46, 0xd2, 0xfd, 0xb8, 0xc9, 0xa9, 0x48, + 0x72, 0xe1, 0x8b, 0x60, 0xd4, 0x22, 0xb4, 0x16, 0xda, 0x01, 0x83, 0x36, 0x07, 0xb9, 0xf0, 0x05, + 0x29, 0x3c, 0xba, 0x9a, 0xb2, 0x90, 0x2e, 0x07, 0xaf, 0x83, 0x42, 0x10, 0xda, 0x7e, 0x68, 0x47, + 0xc7, 0x66, 0x7e, 0xde, 0x58, 0xc8, 0x57, 0x26, 0xa5, 0x4e, 0x61, 0x5b, 0xd2, 0x91, 0x92, 0x60, + 0xd2, 0xef, 0x52, 0xdf, 0xdb, 0xc6, 0xd1, 0xbe, 0x39, 0xc4, 0x11, 0x94, 0xf4, 0x6b, 0xd5, 0xad, + 0xdb, 0x8c, 0x8e, 0x94, 0x44, 0xe9, 0xcf, 0x06, 0x30, 0xb3, 0x11, 0x4a, 0xc2, 0x0b, 0x6f, 0x82, + 0x02, 0x8d, 0x58, 0xcd, 0xa9, 0x1f, 0xcb, 0xf8, 0x3c, 0x93, 0x98, 0xaa, 0x4a, 0xfa, 0x49, 0xb3, + 0x38, 0x93, 0x6a, 0x24, 0x54, 0x1e, 0x1b, 0xa5, 0xcb, 0x52, 0xee, 0x90, 0xec, 0xee, 0xfb, 0xfe, + 0x81, 0xdc, 0xfd, 0x53, 0xa4, 0xdc, 0xeb, 0xc2, 0x50, 0x8a, 0x29, 0x52, 0x4e, 0x92, 0x51, 0x02, + 0x54, 0xfa, 0x4f, 0x2e, 0xbb, 0x30, 0x6d, 0xd3, 0xdf, 0x01, 0x05, 0x76, 0x84, 0x2c, 0x1c, 0x61, + 0x79, 0x08, 0x9e, 0x7f, 0xb4, 0x03, 0x27, 0xce, 0xeb, 0x26, 0x89, 0x70, 0x05, 0xca, 0x50, 0x80, + 0x94, 0x86, 0x94, 0x55, 0x78, 0x04, 0x06, 0x69, 0x40, 0x6a, 0x72, 0xbd, 0xf7, 0x4e, 0x91, 0xed, + 0x3d, 0xd6, 0x50, 0x0d, 0x48, 0x2d, 0x4d, 0x46, 0xf6, 0x0b, 0x71, 0x44, 0xf8, 0x9e, 0x01, 0x86, + 0x28, 0xaf, 0x0b, 0xb2, 0x96, 0xec, 0x9c, 0x01, 0x78, 0xa6, 0xee, 0x88, 0xdf, 0x48, 0xe2, 0x96, + 0xfe, 0x99, 0x03, 0x57, 0x7b, 0xa9, 0xae, 0xf8, 0x9e, 0x25, 0x36, 0x61, 0x5d, 0x9e, 0x2b, 0x91, + 0x59, 0x2f, 0xea, 0xe7, 0xea, 0xa4, 0x59, 0x7c, 0xea, 0xa1, 0x06, 0xb4, 0x03, 0xf8, 0x55, 0xb5, + 0x64, 0x71, 0x48, 0xaf, 0xb6, 0x3b, 0x76, 0xd2, 0x2c, 0x4e, 0x28, 0xb5, 0x76, 0x5f, 0x61, 0x03, + 0x40, 0x07, 0xd3, 0xe8, 0x4e, 0x88, 0x3d, 0x2a, 0xcc, 0xda, 0x2e, 0x91, 0x91, 0x7b, 0xe6, 0xd1, + 0x92, 0x82, 0x69, 0x54, 0x66, 0x25, 0x24, 0xdc, 0xe8, 0xb0, 0x86, 0xba, 0x20, 0xb0, 0x9a, 0x11, + 0x12, 0x4c, 0x55, 0x19, 0xd0, 0x6a, 0x38, 0xa3, 0x22, 0xc9, 0x85, 0x4f, 0x83, 0x61, 0x97, 0x50, + 0x8a, 0xeb, 0x84, 0x9f, 0xfd, 0x91, 0xf4, 0x52, 0xdc, 0x14, 0x64, 0x94, 0xf0, 0x4b, 0xff, 0x32, + 0xc0, 0xe5, 0x5e, 0x51, 0xdb, 0xb0, 0x69, 0x04, 0xbf, 0xd5, 0x91, 0xf6, 0xe5, 0x47, 0x5b, 0x21, + 0xd3, 0xe6, 0x49, 0xaf, 0x4a, 0x49, 0x42, 0xd1, 0x52, 0xfe, 0x10, 0xe4, 0xed, 0x88, 0xb8, 0xc9, + 0x6d, 0x89, 0xfa, 0x9f, 0x76, 0x95, 0x71, 0x09, 0x9f, 0x5f, 0x67, 0x40, 0x48, 0xe0, 0x95, 0x3e, + 0xca, 0x81, 0x2b, 0xbd, 0x54, 0x58, 0x1d, 0xa7, 0x2c, 0xd8, 0x81, 0x13, 0x87, 0xd8, 0x91, 0xc9, + 0xa6, 0x82, 0xbd, 0xcd, 0xa9, 0x48, 0x72, 0x59, 0xed, 0xa4, 0xb6, 0x57, 0x8f, 0x1d, 0x1c, 0xca, + 0x4c, 0x52, 0x0b, 0xae, 0x4a, 0x3a, 0x52, 0x12, 0xb0, 0x0c, 0x00, 0xdd, 0xf7, 0xc3, 0x88, 0x63, + 0xf0, 0x0e, 0x67, 0xa4, 0x72, 0x9e, 0x55, 0x84, 0xaa, 0xa2, 0x22, 0x4d, 0x82, 0x5d, 0x24, 0x07, + 0xb6, 0x67, 0xc9, 0x0d, 0x57, 0x67, 0xf7, 0x96, 0xed, 0x59, 0x88, 0x73, 0x18, 0xbe, 0x63, 0xd3, + 0x88, 0x51, 0xe4, 0x6e, 0xb7, 0x05, 0x9c, 0x4b, 0x2a, 0x09, 0x86, 0x5f, 0x63, 0x05, 0xd6, 0x0f, + 0x6d, 0x42, 0xcd, 0xa1, 0x14, 0x7f, 0x45, 0x51, 0x91, 0x26, 0x51, 0xfa, 0xeb, 0x60, 0xef, 0xfc, + 0x60, 0x05, 0x04, 0x3e, 0x09, 0xf2, 0xf5, 0xd0, 0x8f, 0x03, 0x19, 0x25, 0x15, 0xed, 0x57, 0x19, + 0x11, 0x09, 0x1e, 0xfc, 0x36, 0xc8, 0x7b, 0x72, 0xc1, 0x2c, 0x83, 0x5e, 0xef, 0xff, 0x36, 0xf3, + 0x68, 0xa5, 0xe8, 0x22, 0x90, 0x02, 0x14, 0xbe, 0x00, 0xf2, 0xb4, 0xe6, 0x07, 0x44, 0x06, 0x71, + 0x2e, 0x11, 0xaa, 0x32, 0xe2, 0x49, 0xb3, 0x38, 0x9e, 0x98, 0xe3, 0x04, 0x24, 0x84, 0xe1, 0xf7, + 0x0d, 0x50, 0x90, 0xd7, 0x05, 0x35, 0x87, 0x79, 0x7a, 0xbe, 0xd1, 0x7f, 0xbf, 0x65, 0xdb, 0x9b, + 0xee, 0x99, 0x24, 0x50, 0xa4, 0xc0, 0xe1, 0x77, 0x0d, 0x00, 0x6a, 0xea, 0xee, 0x32, 0x47, 0x78, + 0x0c, 0xfb, 0x76, 0x54, 0xb4, 0x5b, 0x51, 0x24, 0x42, 0xda, 0x2a, 0x69, 0xa8, 0xb0, 0x0a, 0xa6, + 0x83, 0x90, 0x70, 0xdb, 0x77, 0xbd, 0x03, 0xcf, 0x3f, 0xf4, 0x6e, 0xda, 0xc4, 0xb1, 0xa8, 0x09, + 0xe6, 0x8d, 0x85, 0x42, 0xe5, 0x8a, 0xf4, 0x7f, 0x7a, 0xbb, 0x9b, 0x10, 0xea, 0xae, 0x5b, 0x7a, + 0x7f, 0x20, 0xdb, 0x6b, 0x65, 0xef, 0x0b, 0xf8, 0xa1, 0x58, 0xbc, 0xa8, 0xc3, 0xd4, 0x34, 0xf8, + 0x46, 0xbc, 0xd5, 0xff, 0x8d, 0x50, 0xb5, 0x3e, 0xbd, 0xa4, 0x15, 0x89, 0x22, 0xcd, 0x05, 0xf8, + 0x53, 0x03, 0x8c, 0xe3, 0x5a, 0x8d, 0x04, 0x11, 0xb1, 0xc4, 0x31, 0xce, 0x9d, 0x6d, 0x56, 0x4f, + 0x4b, 0x87, 0xc6, 0x97, 0x75, 0x54, 0xd4, 0xee, 0x04, 0x7c, 0x05, 0x9c, 0xa7, 0x91, 0x1f, 0x12, + 0x2b, 0xc9, 0x20, 0x59, 0x5d, 0x60, 0xab, 0x59, 0x3c, 0x5f, 0x6d, 0xe3, 0xa0, 0x8c, 0x64, 0xe9, + 0x93, 0x3c, 0x28, 0x3e, 0x24, 0x43, 0x1f, 0xa1, 0xe9, 0xbd, 0x06, 0x86, 0xf8, 0x4a, 0x2d, 0x1e, + 0x90, 0x82, 0x76, 0xd5, 0x73, 0x2a, 0x92, 0x5c, 0x76, 0x3d, 0x31, 0x7c, 0x76, 0x3d, 0x0d, 0x70, + 0x41, 0x75, 0x3d, 0x55, 0x05, 0x19, 0x25, 0x7c, 0xb8, 0x04, 0x80, 0x45, 0x82, 0x90, 0xb0, 0x8a, + 0x64, 0x99, 0xc3, 0x5c, 0x5a, 0xed, 0xcf, 0xaa, 0xe2, 0x20, 0x4d, 0x0a, 0xde, 0x04, 0x30, 0xf9, + 0x65, 0xfb, 0xde, 0xeb, 0x38, 0xf4, 0x6c, 0xaf, 0x6e, 0x16, 0xb8, 0xdb, 0x33, 0xec, 0xb6, 0x5d, + 0xed, 0xe0, 0xa2, 0x2e, 0x1a, 0xb0, 0x01, 0x86, 0xc4, 0x33, 0x9a, 0xd7, 0x8d, 0x3e, 0x9e, 0xb8, + 0x7b, 0xd8, 0xb1, 0x2d, 0x0e, 0x55, 0x01, 0x3c, 0x3c, 0x1c, 0x05, 0x49, 0x34, 0xf8, 0x81, 0x01, + 0xc6, 0x68, 0xbc, 0x1b, 0x4a, 0x69, 0xca, 0xab, 0xfa, 0xe8, 0xd2, 0x9d, 0x7e, 0xc1, 0x57, 0x35, + 0xdb, 0x95, 0xc9, 0x56, 0xb3, 0x38, 0xa6, 0x53, 0x50, 0x1b, 0x36, 0xfc, 0x83, 0x01, 0x4c, 0x6c, + 0x89, 0xd4, 0xc7, 0xce, 0x76, 0x68, 0x7b, 0x11, 0x09, 0xc5, 0x83, 0x48, 0x5c, 0x1f, 0x7d, 0xec, + 0x15, 0xb3, 0xef, 0xac, 0xca, 0xbc, 0xdc, 0x69, 0x73, 0xb9, 0x87, 0x07, 0xa8, 0xa7, 0x6f, 0xa5, + 0x7f, 0x1b, 0xd9, 0xd2, 0xa2, 0xad, 0xb2, 0x5a, 0xc3, 0x0e, 0x81, 0xab, 0x60, 0x92, 0x75, 0xbf, + 0x88, 0x04, 0x8e, 0x5d, 0xc3, 0x94, 0xbf, 0x7e, 0x44, 0x76, 0xab, 0x67, 0x78, 0x35, 0xc3, 0x47, + 0x1d, 0x1a, 0xf0, 0x35, 0x00, 0x45, 0x5b, 0xd8, 0x66, 0x47, 0x74, 0x02, 0xaa, 0xc1, 0xab, 0x76, + 0x48, 0xa0, 0x2e, 0x5a, 0x70, 0x05, 0x4c, 0x39, 0x78, 0x97, 0x38, 0x55, 0xe2, 0x90, 0x5a, 0xe4, + 0x87, 0xdc, 0x94, 0x78, 0x1f, 0x4e, 0xb7, 0x9a, 0xc5, 0xa9, 0x8d, 0x2c, 0x13, 0x75, 0xca, 0x97, + 0xae, 0x66, 0xcf, 0xb2, 0xbe, 0x70, 0xd1, 0x6c, 0xff, 0x2c, 0x07, 0x66, 0x7b, 0x27, 0x05, 0xfc, + 0x8e, 0x6a, 0x8d, 0x45, 0xc7, 0xf7, 0xc6, 0x19, 0xa4, 0x9e, 0x7c, 0x0e, 0x80, 0xce, 0xa7, 0x00, + 0x3c, 0x66, 0xf7, 0x35, 0x76, 0x92, 0x67, 0xff, 0xce, 0x59, 0xa0, 0x33, 0xfb, 0x95, 0x11, 0xd1, + 0x05, 0x60, 0x87, 0x5f, 0xfa, 0xd8, 0x21, 0xa5, 0x8f, 0x3a, 0x9e, 0xb6, 0xe9, 0x61, 0x85, 0x3f, + 0x30, 0xc0, 0x84, 0x1f, 0x10, 0x6f, 0x79, 0x7b, 0xfd, 0xde, 0x97, 0xc5, 0xa1, 0x95, 0x01, 0x5a, + 0x7f, 0x7c, 0x17, 0xd9, 0xfb, 0x5a, 0xd8, 0xda, 0x0e, 0xfd, 0x80, 0x56, 0x2e, 0xb4, 0x9a, 0xc5, + 0x89, 0xad, 0x76, 0x14, 0x94, 0x85, 0x2d, 0xb9, 0x60, 0x7a, 0xed, 0x28, 0x22, 0xa1, 0x87, 0x9d, + 0x55, 0xbf, 0x16, 0xbb, 0xc4, 0x8b, 0x84, 0x8f, 0x99, 0x71, 0x81, 0xf1, 0x88, 0xe3, 0x82, 0x2b, + 0x60, 0x20, 0x0e, 0x1d, 0x99, 0xb5, 0xa3, 0x6a, 0x08, 0x86, 0x36, 0x10, 0xa3, 0x97, 0xae, 0x82, + 0x41, 0xe6, 0x27, 0xbc, 0x04, 0x06, 0x42, 0x7c, 0xc8, 0xad, 0x8e, 0x55, 0x86, 0x99, 0x08, 0xc2, + 0x87, 0x88, 0xd1, 0x4a, 0x7f, 0x29, 0x82, 0x89, 0xcc, 0x5a, 0xe0, 0x2c, 0xc8, 0xa9, 0xc9, 0x1a, + 0x90, 0x46, 0x73, 0xeb, 0xab, 0x28, 0x67, 0x5b, 0xf0, 0x25, 0x55, 0x5d, 0x05, 0x68, 0x51, 0x5d, + 0x16, 0x9c, 0xca, 0xda, 0xb2, 0xd4, 0x1c, 0x73, 0x24, 0x29, 0x8f, 0xcc, 0x07, 0xb2, 0x27, 0x4f, + 0x85, 0xf0, 0x81, 0xec, 0x21, 0x46, 0x7b, 0xdc, 0x59, 0x49, 0x32, 0xac, 0xc9, 0x3f, 0xc2, 0xb0, + 0x66, 0xe8, 0x81, 0xc3, 0x9a, 0x27, 0x41, 0x3e, 0xb2, 0x23, 0x87, 0xf0, 0x9b, 0x4a, 0x6b, 0x86, + 0xef, 0x30, 0x22, 0x12, 0x3c, 0x48, 0xc0, 0xb0, 0x45, 0xf6, 0x70, 0xec, 0x44, 0xfc, 0x52, 0x1a, + 0x5d, 0xfa, 0xfa, 0xe9, 0xb2, 0x47, 0x0c, 0x33, 0x56, 0x85, 0x49, 0x94, 0xd8, 0x86, 0x4f, 0x81, + 0x61, 0x17, 0x1f, 0xd9, 0x6e, 0xec, 0xf2, 0x8e, 0xd1, 0x10, 0x62, 0x9b, 0x82, 0x84, 0x12, 0x1e, + 0x2b, 0x82, 0xe4, 0xa8, 0xe6, 0xc4, 0xd4, 0x6e, 0x10, 0xc9, 0x94, 0x2d, 0x9d, 0x2a, 0x82, 0x6b, + 0x19, 0x3e, 0xea, 0xd0, 0xe0, 0x60, 0xb6, 0xc7, 0x95, 0x47, 0x35, 0x30, 0x41, 0x42, 0x09, 0xaf, + 0x1d, 0x4c, 0xca, 0x8f, 0xf5, 0x02, 0x93, 0xca, 0x1d, 0x1a, 0xf0, 0x59, 0x30, 0xe2, 0xe2, 0xa3, + 0x0d, 0xe2, 0xd5, 0xa3, 0x7d, 0x73, 0x7c, 0xde, 0x58, 0x18, 0xa8, 0x8c, 0xb7, 0x9a, 0xc5, 0x91, + 0xcd, 0x84, 0x88, 0x52, 0x3e, 0x17, 0xb6, 0x3d, 0x29, 0x7c, 0x5e, 0x13, 0x4e, 0x88, 0x28, 0xe5, + 0xb3, 0xce, 0x24, 0xc0, 0x11, 0x3b, 0x57, 0xe6, 0x44, 0xfb, 0xc3, 0x79, 0x5b, 0x90, 0x51, 0xc2, + 0x87, 0x0b, 0xa0, 0xe0, 0xe2, 0x23, 0xfe, 0xa6, 0x34, 0x27, 0xb9, 0x59, 0x3e, 0x50, 0xdc, 0x94, + 0x34, 0xa4, 0xb8, 0x5c, 0xd2, 0xf6, 0x84, 0xe4, 0x94, 0x26, 0x29, 0x69, 0x48, 0x71, 0x59, 0xfe, + 0xc6, 0x9e, 0x7d, 0x3f, 0x26, 0x42, 0x18, 0xf2, 0xc8, 0xa8, 0xfc, 0xbd, 0x9b, 0xb2, 0x90, 0x2e, + 0xc7, 0xde, 0x74, 0x6e, 0xec, 0x44, 0x76, 0xe0, 0x90, 0xad, 0x3d, 0xf3, 0x02, 0x8f, 0x3f, 0x6f, + 0xe5, 0x37, 0x15, 0x15, 0x69, 0x12, 0xf0, 0x1d, 0x30, 0x48, 0xbc, 0xd8, 0x35, 0x2f, 0xf2, 0xeb, + 0xfb, 0xb4, 0xd9, 0xa7, 0xce, 0xcb, 0x9a, 0x17, 0xbb, 0x88, 0x5b, 0x86, 0x2f, 0x81, 0x71, 0x17, + 0x1f, 0xb1, 0x22, 0x40, 0xc2, 0x88, 0x3d, 0x34, 0xa7, 0xf9, 0xba, 0xa7, 0x58, 0x13, 0xbb, 0xa9, + 0x33, 0x50, 0xbb, 0x1c, 0x57, 0xb4, 0x3d, 0x4d, 0x71, 0x46, 0x53, 0xd4, 0x19, 0xa8, 0x5d, 0x8e, + 0x05, 0x39, 0x24, 0xf7, 0x63, 0x3b, 0x24, 0x96, 0xf9, 0x7f, 0xbc, 0xef, 0x95, 0xf3, 0x5d, 0x41, + 0x43, 0x8a, 0x0b, 0xef, 0x27, 0x23, 0x07, 0x93, 0x1f, 0xbe, 0xed, 0xbe, 0x95, 0xee, 0xad, 0x70, + 0x39, 0x0c, 0xf1, 0xb1, 0xb8, 0x55, 0xf4, 0x61, 0x03, 0xf4, 0x40, 0x1e, 0x3b, 0xce, 0xd6, 0x9e, + 0x79, 0x89, 0x47, 0xbc, 0x8f, 0xb7, 0x85, 0xaa, 0x30, 0xcb, 0xcc, 0x3e, 0x12, 0x30, 0x0c, 0xcf, + 0xf7, 0x58, 0x2e, 0xcc, 0x9e, 0x19, 0xde, 0x16, 0xb3, 0x8f, 0x04, 0x0c, 0x5f, 0x9f, 0x77, 0xbc, + 0xb5, 0x67, 0x3e, 0x71, 0x76, 0xeb, 0x63, 0xf6, 0x91, 0x80, 0x81, 0x16, 0x18, 0xf0, 0xfc, 0xc8, + 0xbc, 0xdc, 0xef, 0xbb, 0x97, 0xdf, 0x26, 0xb7, 0xfd, 0x08, 0x31, 0xf3, 0xf0, 0x47, 0x06, 0x00, + 0x41, 0x9a, 0x89, 0x57, 0x4e, 0x3b, 0x02, 0xc8, 0xa0, 0x95, 0xd3, 0xec, 0x5d, 0xf3, 0xa2, 0xf0, + 0x38, 0x7d, 0xd7, 0x68, 0x59, 0xae, 0x39, 0x00, 0x7f, 0x61, 0x80, 0x8b, 0x7a, 0xbb, 0xab, 0x3c, + 0x9b, 0xe3, 0x71, 0xd8, 0xea, 0x63, 0x22, 0x57, 0x7c, 0xdf, 0xa9, 0x98, 0xad, 0x66, 0xf1, 0xe2, + 0x72, 0x17, 0x40, 0xd4, 0xd5, 0x0d, 0xf8, 0x1b, 0x03, 0x4c, 0xc9, 0xea, 0xa8, 0x39, 0x57, 0xe4, + 0x61, 0x7b, 0xa7, 0x8f, 0x61, 0xcb, 0x42, 0x88, 0xe8, 0xa9, 0xaf, 0x8c, 0x1d, 0x7c, 0xd4, 0xe9, + 0x15, 0xfc, 0xbd, 0x01, 0xc6, 0x2c, 0x12, 0x10, 0xcf, 0x22, 0x5e, 0x8d, 0xb9, 0x39, 0x7f, 0xda, + 0xb9, 0x42, 0xd6, 0xcd, 0x55, 0xcd, 0xba, 0xf0, 0xb0, 0x2c, 0x3d, 0x1c, 0xd3, 0x59, 0x27, 0xcd, + 0xe2, 0x4c, 0xaa, 0xaa, 0x73, 0x50, 0x9b, 0x83, 0xf0, 0xc7, 0x06, 0x98, 0x48, 0xc3, 0x2e, 0x2e, + 0x88, 0xab, 0x67, 0xb3, 0xf1, 0xbc, 0x05, 0x5d, 0x6e, 0xc7, 0x42, 0x59, 0x70, 0xf8, 0x5b, 0x83, + 0x75, 0x5b, 0xc9, 0x5b, 0x8d, 0x9a, 0x25, 0x1e, 0xc1, 0x37, 0xfb, 0x19, 0x41, 0x65, 0x5c, 0x04, + 0xf0, 0x7a, 0xda, 0xc9, 0x29, 0xce, 0x49, 0xb3, 0x38, 0xad, 0xc7, 0x4f, 0x31, 0x90, 0xee, 0x1c, + 0x7c, 0xdf, 0x00, 0x63, 0x24, 0x6d, 0x98, 0xa9, 0xf9, 0xe4, 0x69, 0x43, 0xd7, 0xb5, 0xfd, 0x16, + 0xcf, 0x69, 0x8d, 0x45, 0x51, 0x1b, 0x2c, 0xeb, 0xfd, 0xc8, 0x11, 0x76, 0x03, 0x87, 0x98, 0xff, + 0xdf, 0xbf, 0xde, 0x6f, 0x4d, 0x98, 0x44, 0x89, 0x6d, 0x78, 0x1d, 0x14, 0xbc, 0xd8, 0x71, 0xf0, + 0xae, 0x43, 0xcc, 0xa7, 0x78, 0x17, 0xa1, 0xe6, 0x8b, 0xb7, 0x25, 0x1d, 0x29, 0x09, 0xb8, 0x07, + 0xe6, 0x8f, 0x6e, 0xa9, 0x7f, 0xbe, 0xe8, 0x3a, 0xc0, 0x33, 0xaf, 0x71, 0x2b, 0xb3, 0xad, 0x66, + 0x71, 0x66, 0xa7, 0xfb, 0x88, 0xef, 0xa1, 0x36, 0xe0, 0x5b, 0xe0, 0x09, 0x4d, 0x66, 0xcd, 0xdd, + 0x25, 0x96, 0x45, 0xac, 0xe4, 0xa1, 0x65, 0x7e, 0x89, 0x43, 0xa8, 0x73, 0xbc, 0x93, 0x15, 0x40, + 0x0f, 0xd2, 0x86, 0x1b, 0x60, 0x46, 0x63, 0xaf, 0x7b, 0xd1, 0x56, 0x58, 0x8d, 0x42, 0xdb, 0xab, + 0x9b, 0x0b, 0xdc, 0xee, 0xc5, 0xe4, 0xf4, 0xed, 0x68, 0x3c, 0xd4, 0x43, 0x07, 0x7e, 0xb3, 0xcd, + 0x1a, 0xff, 0x70, 0x81, 0x83, 0x5b, 0xe4, 0x98, 0x9a, 0x4f, 0xf3, 0xe6, 0x82, 0xef, 0xf3, 0x8e, + 0x46, 0x47, 0x3d, 0xe4, 0xe1, 0x37, 0xc0, 0x85, 0x0c, 0x87, 0xbd, 0x2b, 0xcc, 0x67, 0xc4, 0x03, + 0x81, 0x75, 0xa2, 0x3b, 0x09, 0x11, 0x75, 0x93, 0x84, 0x5f, 0x03, 0x50, 0x23, 0x6f, 0xe2, 0x80, + 0xeb, 0x3f, 0x2b, 0xde, 0x2a, 0x6c, 0x47, 0x77, 0x24, 0x0d, 0x75, 0x91, 0x9b, 0x65, 0x6f, 0xd6, + 0x4c, 0xa9, 0x84, 0x93, 0x60, 0xe0, 0x80, 0xc8, 0xaf, 0xb3, 0x88, 0xfd, 0x09, 0xdf, 0x06, 0xf9, + 0x06, 0x76, 0xe2, 0xe4, 0xc5, 0xdd, 0xbf, 0x2b, 0x15, 0x09, 0xbb, 0xaf, 0xe4, 0x5e, 0x36, 0x66, + 0x3f, 0x34, 0xc0, 0x4c, 0xf7, 0xe2, 0xfd, 0x45, 0x79, 0xf4, 0x73, 0x03, 0x4c, 0x75, 0xd4, 0xe9, + 0x2e, 0xce, 0x38, 0xed, 0xce, 0xdc, 0xeb, 0x63, 0xc1, 0x15, 0xf9, 0xc6, 0x1b, 0x47, 0xdd, 0xb3, + 0x1f, 0x1a, 0x60, 0x32, 0x5b, 0xff, 0xbe, 0xa0, 0x28, 0x95, 0x3e, 0xc8, 0x81, 0x99, 0xee, 0xad, + 0x2e, 0x74, 0xd5, 0x23, 0xbe, 0xef, 0x73, 0x90, 0x6e, 0x93, 0xd1, 0xf7, 0x0c, 0x30, 0xfa, 0xae, + 0x92, 0x4b, 0x3e, 0x1a, 0xf6, 0x73, 0xf8, 0x92, 0xdc, 0x30, 0x29, 0x83, 0x22, 0x1d, 0xb2, 0xf4, + 0x3b, 0x03, 0x4c, 0x77, 0xbd, 0x35, 0xe1, 0x35, 0x30, 0x84, 0x1d, 0xc7, 0x3f, 0x14, 0x43, 0x33, + 0x6d, 0xfa, 0xbd, 0xcc, 0xa9, 0x48, 0x72, 0xb5, 0x98, 0xe5, 0x3e, 0x87, 0x98, 0x95, 0xfe, 0x68, + 0x80, 0xcb, 0x0f, 0xca, 0xba, 0xcf, 0x7b, 0x0f, 0x17, 0x40, 0x41, 0xf6, 0xb4, 0xc7, 0x7c, 0xff, + 0x64, 0x11, 0x93, 0x15, 0x81, 0xff, 0x53, 0x8a, 0xf8, 0xab, 0xf4, 0x2b, 0x03, 0x4c, 0x56, 0x49, + 0xd8, 0xb0, 0x6b, 0x04, 0x91, 0x3d, 0x12, 0x12, 0xaf, 0x46, 0xe0, 0x22, 0x18, 0xe1, 0x1f, 0xf5, + 0x02, 0x5c, 0x4b, 0x3e, 0x45, 0x4c, 0xc9, 0x40, 0x8f, 0xdc, 0x4e, 0x18, 0x28, 0x95, 0x51, 0x9f, + 0x2d, 0x72, 0x3d, 0x3f, 0x5b, 0x5c, 0x06, 0x83, 0x41, 0x3a, 0x67, 0x2d, 0x30, 0x2e, 0x1f, 0xad, + 0x72, 0x2a, 0xe7, 0xfa, 0x61, 0xc4, 0x87, 0x49, 0x79, 0xc9, 0xf5, 0xc3, 0x08, 0x71, 0x6a, 0xe9, + 0x4f, 0x06, 0xb8, 0x90, 0xfc, 0x77, 0x89, 0x63, 0x13, 0x2f, 0x5a, 0xf1, 0xbd, 0x3d, 0xbb, 0x0e, + 0x2f, 0x89, 0x79, 0x9a, 0x36, 0xa4, 0x4a, 0x66, 0x69, 0xf0, 0x3e, 0x18, 0xa6, 0x62, 0x55, 0x32, + 0xe0, 0xaf, 0x3d, 0x7e, 0xc0, 0xb3, 0xe1, 0x11, 0xed, 0x40, 0x42, 0x4d, 0x70, 0x58, 0xcc, 0x6b, + 0xb8, 0x12, 0x7b, 0x96, 0x9c, 0xa9, 0x8e, 0x89, 0x98, 0xaf, 0x2c, 0x0b, 0x1a, 0x52, 0xdc, 0xd2, + 0x3f, 0x0c, 0x30, 0xd5, 0xf1, 0xdf, 0x32, 0xf0, 0x7b, 0x06, 0x18, 0xab, 0x69, 0xcb, 0x93, 0x99, + 0xbb, 0x79, 0xfa, 0xff, 0xc8, 0xd1, 0x8c, 0x8a, 0x3b, 0x55, 0xa7, 0xa0, 0x36, 0x50, 0xb8, 0x03, + 0xcc, 0x5a, 0xe6, 0x1f, 0xd3, 0x32, 0x9f, 0xba, 0x2e, 0xb7, 0x9a, 0x45, 0x73, 0xa5, 0x87, 0x0c, + 0xea, 0xa9, 0x5d, 0x59, 0xf8, 0xf8, 0xb3, 0xb9, 0x73, 0x9f, 0x7c, 0x36, 0x77, 0xee, 0xd3, 0xcf, + 0xe6, 0xce, 0xbd, 0xd7, 0x9a, 0x33, 0x3e, 0x6e, 0xcd, 0x19, 0x9f, 0xb4, 0xe6, 0x8c, 0x4f, 0x5b, + 0x73, 0xc6, 0xdf, 0x5a, 0x73, 0xc6, 0x4f, 0xfe, 0x3e, 0x77, 0xee, 0xcd, 0x5c, 0xe3, 0xc6, 0xff, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x59, 0xc7, 0x8d, 0x55, 0xac, 0x2a, 0x00, 0x00, } func (m *ConversionRequest) Marshal() (dAtA []byte, err error) { @@ -1576,6 +1579,21 @@ func (m *CustomResourceDefinitionVersion) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l + if m.DeprecationWarning != nil { + i -= len(*m.DeprecationWarning) + copy(dAtA[i:], *m.DeprecationWarning) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.DeprecationWarning))) + i-- + dAtA[i] = 0x42 + } + i-- + if m.Deprecated { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 if len(m.AdditionalPrinterColumns) > 0 { for iNdEx := len(m.AdditionalPrinterColumns) - 1; iNdEx >= 0; iNdEx-- { { @@ -2889,6 +2907,11 @@ func (m *CustomResourceDefinitionVersion) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + n += 2 + if m.DeprecationWarning != nil { + l = len(*m.DeprecationWarning) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -3444,6 +3467,8 @@ func (this *CustomResourceDefinitionVersion) String() string { `Schema:` + strings.Replace(this.Schema.String(), "CustomResourceValidation", "CustomResourceValidation", 1) + `,`, `Subresources:` + strings.Replace(this.Subresources.String(), "CustomResourceSubresources", "CustomResourceSubresources", 1) + `,`, `AdditionalPrinterColumns:` + repeatedStringForAdditionalPrinterColumns + `,`, + `Deprecated:` + fmt.Sprintf("%v", this.Deprecated) + `,`, + `DeprecationWarning:` + valueToStringGenerated(this.DeprecationWarning) + `,`, `}`, }, "") return s @@ -5816,6 +5841,59 @@ func (m *CustomResourceDefinitionVersion) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Deprecated", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Deprecated = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecationWarning", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.DeprecationWarning = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto index ad7f405b380..5a083cb4b4d 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto @@ -264,6 +264,19 @@ message CustomResourceDefinitionVersion { // There must be exactly one version with storage=true. optional bool storage = 3; + // deprecated indicates this version of the custom resource API is deprecated. + // When set to true, API requests to this version receive a warning header in the server response. + // Defaults to false. + // +optional + optional bool deprecated = 7; + + // deprecationWarning overrides the default warning returned to API clients. + // May only be set when `deprecated` is true. + // The default warning indicates this version is deprecated and recommends use + // of the newest served version of equal or greater stability, if one exists. + // +optional + optional string deprecationWarning = 8; + // schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource. // +optional optional CustomResourceValidation schema = 4; diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go index 542af7297c5..02922c593e6 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go @@ -174,6 +174,17 @@ type CustomResourceDefinitionVersion struct { // storage indicates this version should be used when persisting custom resources to storage. // There must be exactly one version with storage=true. Storage bool `json:"storage" protobuf:"varint,3,opt,name=storage"` + // deprecated indicates this version of the custom resource API is deprecated. + // When set to true, API requests to this version receive a warning header in the server response. + // Defaults to false. + // +optional + Deprecated bool `json:"deprecated,omitempty" protobuf:"varint,7,opt,name=deprecated"` + // deprecationWarning overrides the default warning returned to API clients. + // May only be set when `deprecated` is true. + // The default warning indicates this version is deprecated and recommends use + // of the newest served version of equal or greater stability, if one exists. + // +optional + DeprecationWarning *string `json:"deprecationWarning,omitempty" protobuf:"bytes,8,opt,name=deprecationWarning"` // schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource. // +optional Schema *CustomResourceValidation `json:"schema,omitempty" protobuf:"bytes,4,opt,name=schema"` diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go index 11fb2b1e6dd..b22872dc082 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go @@ -524,6 +524,8 @@ func autoConvert_v1_CustomResourceDefinitionVersion_To_apiextensions_CustomResou out.Name = in.Name out.Served = in.Served out.Storage = in.Storage + out.Deprecated = in.Deprecated + out.DeprecationWarning = (*string)(unsafe.Pointer(in.DeprecationWarning)) if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(apiextensions.CustomResourceValidation) @@ -547,6 +549,8 @@ func autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1_CustomResou out.Name = in.Name out.Served = in.Served out.Storage = in.Storage + out.Deprecated = in.Deprecated + out.DeprecationWarning = (*string)(unsafe.Pointer(in.DeprecationWarning)) if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(CustomResourceValidation) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go index 5fa85458569..7d72bebab23 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go @@ -308,6 +308,11 @@ func (in *CustomResourceDefinitionStatus) DeepCopy() *CustomResourceDefinitionSt // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefinitionVersion) { *out = *in + if in.DeprecationWarning != nil { + in, out := &in.DeprecationWarning, &out.DeprecationWarning + *out = new(string) + **out = **in + } if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(CustomResourceValidation) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/BUILD b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/BUILD index bdf5f86cb2a..6cfa49ae06f 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/BUILD +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/BUILD @@ -21,6 +21,7 @@ go_library( "zz_generated.conversion.go", "zz_generated.deepcopy.go", "zz_generated.defaults.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1", importpath = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1", diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go index 3f631dd4e6d..7a92cb8b0c6 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go @@ -19,6 +19,7 @@ limitations under the License. // +k8s:conversion-gen=k8s.io/apiextensions-apiserver/pkg/apis/apiextensions // +k8s:defaulter-gen=TypeMeta // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=apiextensions.k8s.io // Package v1beta1 is the v1beta1 version of the API. diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go index c5a76f5e395..0382b044585 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go @@ -756,193 +756,196 @@ func init() { } var fileDescriptor_98a4cc6918394e53 = []byte{ - // 2976 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcf, 0x73, 0x23, 0x47, - 0xf5, 0xdf, 0x91, 0x2c, 0x5b, 0x6e, 0xdb, 0x6b, 0xbb, 0x77, 0xed, 0xcc, 0x3a, 0x1b, 0xcb, 0xab, - 0x7c, 0xb3, 0x5f, 0x27, 0xd9, 0x95, 0x93, 0x25, 0x21, 0x21, 0x05, 0x45, 0x59, 0xb6, 0x13, 0x9c, - 0xac, 0x2d, 0xd3, 0xda, 0x4d, 0x0c, 0xf9, 0xd9, 0xd6, 0xb4, 0xe4, 0x59, 0xcf, 0xaf, 0x9d, 0x9e, - 0x91, 0xed, 0x0a, 0x50, 0xfc, 0xa8, 0x14, 0x14, 0x05, 0x84, 0x22, 0xb9, 0x50, 0x05, 0x87, 0x40, - 0x71, 0xe1, 0x00, 0x07, 0x28, 0x2e, 0xf0, 0x07, 0xe4, 0x98, 0xe2, 0x94, 0x03, 0xa5, 0x22, 0xca, - 0x95, 0x23, 0x55, 0x54, 0xf9, 0x44, 0xf5, 0x8f, 0xe9, 0x19, 0x8d, 0xa4, 0x5d, 0x57, 0x56, 0xca, - 0x72, 0xb3, 0xde, 0xaf, 0xcf, 0xeb, 0xd7, 0xaf, 0x5f, 0xbf, 0x7e, 0x63, 0x50, 0x3f, 0x78, 0x96, - 0x96, 0x4c, 0x77, 0xe5, 0x20, 0xdc, 0x23, 0xbe, 0x43, 0x02, 0x42, 0x57, 0x9a, 0xc4, 0x31, 0x5c, - 0x7f, 0x45, 0x32, 0xb0, 0x67, 0x92, 0xa3, 0x80, 0x38, 0xd4, 0x74, 0x1d, 0x7a, 0x15, 0x7b, 0x26, - 0x25, 0x7e, 0x93, 0xf8, 0x2b, 0xde, 0x41, 0x83, 0xf1, 0x68, 0xa7, 0xc0, 0x4a, 0xf3, 0xc9, 0x3d, - 0x12, 0xe0, 0x27, 0x57, 0x1a, 0xc4, 0x21, 0x3e, 0x0e, 0x88, 0x51, 0xf2, 0x7c, 0x37, 0x70, 0xe1, - 0x57, 0x84, 0xb9, 0x52, 0x87, 0xf4, 0x9b, 0xca, 0x5c, 0xc9, 0x3b, 0x68, 0x30, 0x1e, 0xed, 0x14, - 0x28, 0x49, 0x73, 0x0b, 0x57, 0x1b, 0x66, 0xb0, 0x1f, 0xee, 0x95, 0x6a, 0xae, 0xbd, 0xd2, 0x70, - 0x1b, 0xee, 0x0a, 0xb7, 0xba, 0x17, 0xd6, 0xf9, 0x2f, 0xfe, 0x83, 0xff, 0x25, 0xd0, 0x16, 0x9e, - 0x8a, 0x9d, 0xb7, 0x71, 0x6d, 0xdf, 0x74, 0x88, 0x7f, 0x1c, 0x7b, 0x6c, 0x93, 0x00, 0xaf, 0x34, - 0xbb, 0x7c, 0x5c, 0x58, 0xe9, 0xa7, 0xe5, 0x87, 0x4e, 0x60, 0xda, 0xa4, 0x4b, 0xe1, 0x8b, 0x77, - 0x53, 0xa0, 0xb5, 0x7d, 0x62, 0xe3, 0xb4, 0x5e, 0xf1, 0x44, 0x03, 0xb3, 0x6b, 0xae, 0xd3, 0x24, - 0x3e, 0x5b, 0x25, 0x22, 0xb7, 0x43, 0x42, 0x03, 0x58, 0x06, 0xd9, 0xd0, 0x34, 0x74, 0x6d, 0x49, - 0x5b, 0x1e, 0x2f, 0x3f, 0xf1, 0x61, 0xab, 0x70, 0xa6, 0xdd, 0x2a, 0x64, 0x6f, 0x6e, 0xae, 0x9f, - 0xb4, 0x0a, 0x97, 0xfa, 0x21, 0x05, 0xc7, 0x1e, 0xa1, 0xa5, 0x9b, 0x9b, 0xeb, 0x88, 0x29, 0xc3, - 0x17, 0xc0, 0xac, 0x41, 0xa8, 0xe9, 0x13, 0x63, 0x75, 0x67, 0xf3, 0x65, 0x61, 0x5f, 0xcf, 0x70, - 0x8b, 0x17, 0xa4, 0xc5, 0xd9, 0xf5, 0xb4, 0x00, 0xea, 0xd6, 0x81, 0xbb, 0x60, 0xcc, 0xdd, 0xbb, - 0x45, 0x6a, 0x01, 0xd5, 0xb3, 0x4b, 0xd9, 0xe5, 0x89, 0x6b, 0x57, 0x4b, 0xf1, 0x0e, 0x2a, 0x17, - 0xf8, 0xb6, 0xc9, 0xc5, 0x96, 0x10, 0x3e, 0xdc, 0x88, 0x76, 0xae, 0x3c, 0x2d, 0xd1, 0xc6, 0x2a, - 0xc2, 0x0a, 0x8a, 0xcc, 0x15, 0x7f, 0x9b, 0x01, 0x30, 0xb9, 0x78, 0xea, 0xb9, 0x0e, 0x25, 0x03, - 0x59, 0x3d, 0x05, 0x33, 0x35, 0x6e, 0x39, 0x20, 0x86, 0xc4, 0xd5, 0x33, 0x9f, 0xc5, 0x7b, 0x5d, - 0xe2, 0xcf, 0xac, 0xa5, 0xcc, 0xa1, 0x2e, 0x00, 0x78, 0x03, 0x8c, 0xfa, 0x84, 0x86, 0x56, 0xa0, - 0x67, 0x97, 0xb4, 0xe5, 0x89, 0x6b, 0x57, 0xfa, 0x42, 0xf1, 0xfc, 0x66, 0xc9, 0x57, 0x6a, 0x3e, - 0x59, 0xaa, 0x06, 0x38, 0x08, 0x69, 0xf9, 0xac, 0x44, 0x1a, 0x45, 0xdc, 0x06, 0x92, 0xb6, 0x8a, - 0x3f, 0xca, 0x80, 0x99, 0x64, 0x94, 0x9a, 0x26, 0x39, 0x84, 0x87, 0x60, 0xcc, 0x17, 0xc9, 0xc2, - 0xe3, 0x34, 0x71, 0x6d, 0xa7, 0x74, 0x4f, 0xc7, 0xaa, 0xd4, 0x95, 0x84, 0xe5, 0x09, 0xb6, 0x67, - 0xf2, 0x07, 0x8a, 0xd0, 0xe0, 0xdb, 0x20, 0xef, 0xcb, 0x8d, 0xe2, 0xd9, 0x34, 0x71, 0xed, 0xeb, - 0x03, 0x44, 0x16, 0x86, 0xcb, 0x93, 0xed, 0x56, 0x21, 0x1f, 0xfd, 0x42, 0x0a, 0xb0, 0xf8, 0x5e, - 0x06, 0x2c, 0xae, 0x85, 0x34, 0x70, 0x6d, 0x44, 0xa8, 0x1b, 0xfa, 0x35, 0xb2, 0xe6, 0x5a, 0xa1, - 0xed, 0xac, 0x93, 0xba, 0xe9, 0x98, 0x01, 0xcb, 0xd6, 0x25, 0x30, 0xe2, 0x60, 0x9b, 0xc8, 0xec, - 0x99, 0x94, 0x31, 0x1d, 0xd9, 0xc6, 0x36, 0x41, 0x9c, 0xc3, 0x24, 0x58, 0xb2, 0xc8, 0xb3, 0xa0, - 0x24, 0x6e, 0x1c, 0x7b, 0x04, 0x71, 0x0e, 0xbc, 0x0c, 0x46, 0xeb, 0xae, 0x6f, 0x63, 0xb1, 0x8f, - 0xe3, 0xf1, 0xce, 0x3c, 0xcf, 0xa9, 0x48, 0x72, 0xe1, 0xd3, 0x60, 0xc2, 0x20, 0xb4, 0xe6, 0x9b, - 0x1e, 0x83, 0xd6, 0x47, 0xb8, 0xf0, 0x39, 0x29, 0x3c, 0xb1, 0x1e, 0xb3, 0x50, 0x52, 0x0e, 0x5e, - 0x01, 0x79, 0xcf, 0x37, 0x5d, 0xdf, 0x0c, 0x8e, 0xf5, 0xdc, 0x92, 0xb6, 0x9c, 0x2b, 0xcf, 0x48, - 0x9d, 0xfc, 0x8e, 0xa4, 0x23, 0x25, 0x01, 0x97, 0x40, 0xfe, 0xc5, 0x6a, 0x65, 0x7b, 0x07, 0x07, - 0xfb, 0xfa, 0x28, 0x47, 0x18, 0x61, 0xd2, 0x28, 0x7f, 0x4b, 0x52, 0x8b, 0xff, 0xc8, 0x00, 0x3d, - 0x1d, 0x95, 0x28, 0xa4, 0xf0, 0x79, 0x90, 0xa7, 0x01, 0xab, 0x38, 0x8d, 0x63, 0x19, 0x93, 0xc7, - 0x22, 0xb0, 0xaa, 0xa4, 0x9f, 0xb4, 0x0a, 0xf3, 0xb1, 0x46, 0x44, 0xe5, 0xf1, 0x50, 0xba, 0xf0, - 0xd7, 0x1a, 0x38, 0x77, 0x48, 0xf6, 0xf6, 0x5d, 0xf7, 0x60, 0xcd, 0x32, 0x89, 0x13, 0xac, 0xb9, - 0x4e, 0xdd, 0x6c, 0xc8, 0x1c, 0x40, 0xf7, 0x98, 0x03, 0xaf, 0x74, 0x5b, 0x2e, 0x3f, 0xd0, 0x6e, - 0x15, 0xce, 0xf5, 0x60, 0xa0, 0x5e, 0x7e, 0xc0, 0x5d, 0xa0, 0xd7, 0x52, 0x87, 0x44, 0x16, 0x30, - 0x51, 0xb6, 0xc6, 0xcb, 0x17, 0xdb, 0xad, 0x82, 0xbe, 0xd6, 0x47, 0x06, 0xf5, 0xd5, 0x2e, 0xfe, - 0x20, 0x9b, 0x0e, 0x6f, 0x22, 0xdd, 0xde, 0x02, 0x79, 0x76, 0x8c, 0x0d, 0x1c, 0x60, 0x79, 0x10, - 0x9f, 0x38, 0xdd, 0xa1, 0x17, 0x35, 0x63, 0x8b, 0x04, 0xb8, 0x0c, 0xe5, 0x86, 0x80, 0x98, 0x86, - 0x94, 0x55, 0xf8, 0x6d, 0x30, 0x42, 0x3d, 0x52, 0x93, 0x81, 0x7e, 0xf5, 0x5e, 0x0f, 0x5b, 0x9f, - 0x85, 0x54, 0x3d, 0x52, 0x8b, 0xcf, 0x02, 0xfb, 0x85, 0x38, 0x2c, 0x7c, 0x47, 0x03, 0xa3, 0x94, - 0x17, 0x28, 0x59, 0xd4, 0x5e, 0x1f, 0x96, 0x07, 0xa9, 0x2a, 0x28, 0x7e, 0x23, 0x09, 0x5e, 0xfc, - 0x77, 0x06, 0x5c, 0xea, 0xa7, 0xba, 0xe6, 0x3a, 0x86, 0xd8, 0x8e, 0x4d, 0x79, 0xb6, 0x45, 0xa6, - 0x3f, 0x9d, 0x3c, 0xdb, 0x27, 0xad, 0xc2, 0x23, 0x77, 0x35, 0x90, 0x28, 0x02, 0x5f, 0x52, 0xeb, - 0x16, 0x85, 0xe2, 0x52, 0xa7, 0x63, 0x27, 0xad, 0xc2, 0xb4, 0x52, 0xeb, 0xf4, 0x15, 0x36, 0x01, - 0xb4, 0x30, 0x0d, 0x6e, 0xf8, 0xd8, 0xa1, 0xc2, 0xac, 0x69, 0x13, 0x19, 0xbe, 0xc7, 0x4e, 0x97, - 0x1e, 0x4c, 0xa3, 0xbc, 0x20, 0x21, 0xe1, 0xf5, 0x2e, 0x6b, 0xa8, 0x07, 0x02, 0xab, 0x5b, 0x3e, - 0xc1, 0x54, 0x95, 0xa2, 0xc4, 0x8d, 0xc2, 0xa8, 0x48, 0x72, 0xe1, 0xa3, 0x60, 0xcc, 0x26, 0x94, - 0xe2, 0x06, 0xe1, 0xf5, 0x67, 0x3c, 0xbe, 0xa2, 0xb7, 0x04, 0x19, 0x45, 0x7c, 0xd6, 0x9f, 0x5c, - 0xec, 0x17, 0xb5, 0xeb, 0x26, 0x0d, 0xe0, 0x6b, 0x5d, 0x07, 0xa0, 0x74, 0xba, 0x15, 0x32, 0x6d, - 0x9e, 0xfe, 0xaa, 0xf8, 0x45, 0x94, 0x44, 0xf2, 0x7f, 0x0b, 0xe4, 0xcc, 0x80, 0xd8, 0xd1, 0xdd, - 0xfd, 0xca, 0x90, 0x72, 0xaf, 0x3c, 0x25, 0x7d, 0xc8, 0x6d, 0x32, 0x34, 0x24, 0x40, 0x8b, 0xbf, - 0xcb, 0x80, 0x87, 0xfa, 0xa9, 0xb0, 0x0b, 0x85, 0xb2, 0x88, 0x7b, 0x56, 0xe8, 0x63, 0x4b, 0x66, - 0x9c, 0x8a, 0xf8, 0x0e, 0xa7, 0x22, 0xc9, 0x65, 0x25, 0x9f, 0x9a, 0x4e, 0x23, 0xb4, 0xb0, 0x2f, - 0xd3, 0x49, 0xad, 0xba, 0x2a, 0xe9, 0x48, 0x49, 0xc0, 0x12, 0x00, 0x74, 0xdf, 0xf5, 0x03, 0x8e, - 0x21, 0xab, 0xd7, 0x59, 0x56, 0x20, 0xaa, 0x8a, 0x8a, 0x12, 0x12, 0xec, 0x46, 0x3b, 0x30, 0x1d, - 0x43, 0xee, 0xba, 0x3a, 0xc5, 0x2f, 0x99, 0x8e, 0x81, 0x38, 0x87, 0xe1, 0x5b, 0x26, 0x0d, 0x18, - 0x45, 0x6e, 0x79, 0x47, 0xd4, 0xb9, 0xa4, 0x92, 0x60, 0xf8, 0x35, 0x56, 0xf5, 0x5d, 0xdf, 0x24, - 0x54, 0x1f, 0x8d, 0xf1, 0xd7, 0x14, 0x15, 0x25, 0x24, 0x8a, 0xff, 0xca, 0xf7, 0x4f, 0x12, 0x56, - 0x4a, 0xe0, 0xc3, 0x20, 0xd7, 0xf0, 0xdd, 0xd0, 0x93, 0x51, 0x52, 0xd1, 0x7e, 0x81, 0x11, 0x91, - 0xe0, 0xb1, 0xac, 0x6c, 0x76, 0xb4, 0xa9, 0x2a, 0x2b, 0xa3, 0xe6, 0x34, 0xe2, 0xc3, 0xef, 0x69, - 0x20, 0xe7, 0xc8, 0xe0, 0xb0, 0x94, 0x7b, 0x6d, 0x48, 0x79, 0xc1, 0xc3, 0x1b, 0xbb, 0x2b, 0x22, - 0x2f, 0x90, 0xe1, 0x53, 0x20, 0x47, 0x6b, 0xae, 0x47, 0x64, 0xd4, 0x17, 0x23, 0xa1, 0x2a, 0x23, - 0x9e, 0xb4, 0x0a, 0x53, 0x91, 0x39, 0x4e, 0x40, 0x42, 0x18, 0xfe, 0x50, 0x03, 0xa0, 0x89, 0x2d, - 0xd3, 0xc0, 0xbc, 0x65, 0xc8, 0x71, 0xf7, 0x07, 0x9b, 0xd6, 0x2f, 0x2b, 0xf3, 0x62, 0xd3, 0xe2, - 0xdf, 0x28, 0x01, 0x0d, 0xdf, 0xd5, 0xc0, 0x24, 0x0d, 0xf7, 0x7c, 0xa9, 0x45, 0x79, 0x73, 0x31, - 0x71, 0xed, 0x1b, 0x03, 0xf5, 0xa5, 0x9a, 0x00, 0x28, 0xcf, 0xb4, 0x5b, 0x85, 0xc9, 0x24, 0x05, - 0x75, 0x38, 0x00, 0x7f, 0xa2, 0x81, 0x7c, 0x33, 0xba, 0xb3, 0xc7, 0xf8, 0x81, 0x7f, 0x63, 0x48, - 0x1b, 0x2b, 0x33, 0x2a, 0x3e, 0x05, 0xaa, 0x0f, 0x50, 0x1e, 0xc0, 0xbf, 0x6a, 0x40, 0xc7, 0x86, - 0x28, 0xf0, 0xd8, 0xda, 0xf1, 0x4d, 0x27, 0x20, 0xbe, 0xe8, 0x37, 0xa9, 0x9e, 0xe7, 0xee, 0x0d, - 0xf6, 0x2e, 0x4c, 0xf7, 0xb2, 0xe5, 0x25, 0xe9, 0x9d, 0xbe, 0xda, 0xc7, 0x0d, 0xd4, 0xd7, 0x41, - 0x9e, 0x68, 0x71, 0x4b, 0xa3, 0x8f, 0x0f, 0x21, 0xd1, 0xe2, 0x5e, 0x4a, 0x56, 0x87, 0xb8, 0x83, - 0x4a, 0x40, 0xc3, 0x0a, 0x98, 0xf3, 0x7c, 0xc2, 0x01, 0x6e, 0x3a, 0x07, 0x8e, 0x7b, 0xe8, 0x3c, - 0x6f, 0x12, 0xcb, 0xa0, 0x3a, 0x58, 0xd2, 0x96, 0xf3, 0xe5, 0x0b, 0xed, 0x56, 0x61, 0x6e, 0xa7, - 0x97, 0x00, 0xea, 0xad, 0x57, 0x7c, 0x37, 0x9b, 0x7e, 0x05, 0xa4, 0xbb, 0x08, 0xf8, 0xbe, 0x58, - 0xbd, 0x88, 0x0d, 0xd5, 0x35, 0xbe, 0x5b, 0x6f, 0x0d, 0x29, 0x99, 0x54, 0x1b, 0x10, 0x77, 0x72, - 0x8a, 0x44, 0x51, 0xc2, 0x0f, 0xf8, 0x4b, 0x0d, 0x4c, 0xe1, 0x5a, 0x8d, 0x78, 0x01, 0x31, 0x44, - 0x71, 0xcf, 0x7c, 0x0e, 0xf5, 0x6b, 0x4e, 0x7a, 0x35, 0xb5, 0x9a, 0x84, 0x46, 0x9d, 0x9e, 0xc0, - 0xe7, 0xc0, 0x59, 0x1a, 0xb8, 0x3e, 0x31, 0x52, 0x6d, 0x33, 0x6c, 0xb7, 0x0a, 0x67, 0xab, 0x1d, - 0x1c, 0x94, 0x92, 0x2c, 0x7e, 0x3a, 0x02, 0x0a, 0x77, 0x39, 0x6a, 0xa7, 0x78, 0x98, 0x5d, 0x06, - 0xa3, 0x7c, 0xb9, 0x06, 0x8f, 0x4a, 0x3e, 0xd1, 0x0a, 0x72, 0x2a, 0x92, 0x5c, 0x76, 0x51, 0x30, - 0x7c, 0xd6, 0xbe, 0x64, 0xb9, 0xa0, 0xba, 0x28, 0xaa, 0x82, 0x8c, 0x22, 0x3e, 0x7c, 0x1b, 0x8c, - 0x8a, 0xc1, 0x0b, 0xaf, 0xd2, 0x43, 0xac, 0xb4, 0x80, 0xfb, 0xc9, 0xa1, 0x90, 0x84, 0xec, 0xae, - 0xb0, 0xb9, 0xfb, 0x5d, 0x61, 0xef, 0x58, 0xd2, 0x46, 0xff, 0xc7, 0x4b, 0x5a, 0xf1, 0x3f, 0x5a, - 0xfa, 0xdc, 0x27, 0x96, 0x5a, 0xad, 0x61, 0x8b, 0xc0, 0x75, 0x30, 0xc3, 0x5e, 0x2d, 0x88, 0x78, - 0x96, 0x59, 0xc3, 0x94, 0x3f, 0x9a, 0x45, 0xc2, 0xa9, 0x39, 0x4e, 0x35, 0xc5, 0x47, 0x5d, 0x1a, - 0xf0, 0x45, 0x00, 0x45, 0x27, 0xdf, 0x61, 0x47, 0x34, 0x25, 0xaa, 0x27, 0xaf, 0x76, 0x49, 0xa0, - 0x1e, 0x5a, 0x70, 0x0d, 0xcc, 0x5a, 0x78, 0x8f, 0x58, 0x55, 0x62, 0x91, 0x5a, 0xe0, 0xfa, 0xdc, - 0x94, 0x18, 0x2b, 0xcc, 0xb5, 0x5b, 0x85, 0xd9, 0xeb, 0x69, 0x26, 0xea, 0x96, 0x2f, 0x5e, 0x4a, - 0x1f, 0xaf, 0xe4, 0xc2, 0xc5, 0xfb, 0xe8, 0x83, 0x0c, 0x58, 0xe8, 0x9f, 0x19, 0xf0, 0xfb, 0xf1, - 0x33, 0x4e, 0x74, 0xe9, 0x6f, 0x0c, 0x2b, 0x0b, 0xe5, 0x3b, 0x0e, 0x74, 0xbf, 0xe1, 0xe0, 0x77, - 0x58, 0xcb, 0x84, 0xad, 0x68, 0x70, 0xf4, 0xfa, 0xd0, 0x5c, 0x60, 0x20, 0xe5, 0x71, 0xd1, 0x8d, - 0x61, 0x8b, 0x37, 0x5f, 0xd8, 0x22, 0xc5, 0xdf, 0x6b, 0xe9, 0x97, 0x7c, 0x7c, 0x82, 0xe1, 0x4f, - 0x35, 0x30, 0xed, 0x7a, 0xc4, 0x59, 0xdd, 0xd9, 0x7c, 0xf9, 0x0b, 0xe2, 0x24, 0xcb, 0x50, 0x6d, - 0xdf, 0xa3, 0x9f, 0x2f, 0x56, 0x2b, 0xdb, 0xc2, 0xe0, 0x8e, 0xef, 0x7a, 0xb4, 0x7c, 0xae, 0xdd, - 0x2a, 0x4c, 0x57, 0x3a, 0xa1, 0x50, 0x1a, 0xbb, 0x68, 0x83, 0xb9, 0x8d, 0xa3, 0x80, 0xf8, 0x0e, - 0xb6, 0xd6, 0xdd, 0x5a, 0x68, 0x13, 0x27, 0x10, 0x8e, 0xa6, 0xa6, 0x4e, 0xda, 0x29, 0xa7, 0x4e, - 0x0f, 0x81, 0x6c, 0xe8, 0x5b, 0x32, 0x8b, 0x27, 0xd4, 0x54, 0x15, 0x5d, 0x47, 0x8c, 0x5e, 0xbc, - 0x04, 0x46, 0x98, 0x9f, 0xf0, 0x02, 0xc8, 0xfa, 0xf8, 0x90, 0x5b, 0x9d, 0x2c, 0x8f, 0x31, 0x11, - 0x84, 0x0f, 0x11, 0xa3, 0x15, 0xff, 0xb2, 0x04, 0xa6, 0x53, 0x6b, 0x81, 0x0b, 0x20, 0xa3, 0x46, - 0xb5, 0x40, 0x1a, 0xcd, 0x6c, 0xae, 0xa3, 0x8c, 0x69, 0xc0, 0x67, 0x54, 0xf1, 0x15, 0xa0, 0x05, - 0x55, 0xcf, 0x39, 0x95, 0xf5, 0xc8, 0xb1, 0x39, 0xe6, 0x48, 0x54, 0x38, 0x99, 0x0f, 0xa4, 0x2e, - 0x4f, 0x89, 0xf0, 0x81, 0xd4, 0x11, 0xa3, 0x7d, 0xd6, 0x91, 0x5b, 0x34, 0xf3, 0xcb, 0x9d, 0x62, - 0xe6, 0x37, 0x7a, 0xc7, 0x99, 0xdf, 0xc3, 0x20, 0x17, 0x98, 0x81, 0x45, 0xf4, 0xb1, 0xce, 0xa7, - 0xcc, 0x0d, 0x46, 0x44, 0x82, 0x07, 0x6f, 0x81, 0x31, 0x83, 0xd4, 0x71, 0x68, 0x05, 0x7a, 0x9e, - 0xa7, 0xd0, 0xda, 0x00, 0x52, 0x48, 0x0c, 0x64, 0xd7, 0x85, 0x5d, 0x14, 0x01, 0xc0, 0x47, 0xc0, - 0x98, 0x8d, 0x8f, 0x4c, 0x3b, 0xb4, 0x79, 0x93, 0xa7, 0x09, 0xb1, 0x2d, 0x41, 0x42, 0x11, 0x8f, - 0x55, 0x46, 0x72, 0x54, 0xb3, 0x42, 0x6a, 0x36, 0x89, 0x64, 0xca, 0x06, 0x4c, 0x55, 0xc6, 0x8d, - 0x14, 0x1f, 0x75, 0x69, 0x70, 0x30, 0xd3, 0xe1, 0xca, 0x13, 0x09, 0x30, 0x41, 0x42, 0x11, 0xaf, - 0x13, 0x4c, 0xca, 0x4f, 0xf6, 0x03, 0x93, 0xca, 0x5d, 0x1a, 0xf0, 0x71, 0x30, 0x6e, 0xe3, 0xa3, - 0xeb, 0xc4, 0x69, 0x04, 0xfb, 0xfa, 0xd4, 0x92, 0xb6, 0x9c, 0x2d, 0x4f, 0xb5, 0x5b, 0x85, 0xf1, - 0xad, 0x88, 0x88, 0x62, 0x3e, 0x17, 0x36, 0x1d, 0x29, 0x7c, 0x36, 0x21, 0x1c, 0x11, 0x51, 0xcc, - 0x67, 0x1d, 0x84, 0x87, 0x03, 0x76, 0xb8, 0xf4, 0xe9, 0xce, 0xa7, 0xe6, 0x8e, 0x20, 0xa3, 0x88, - 0x0f, 0x97, 0x41, 0xde, 0xc6, 0x47, 0x7c, 0x2c, 0xa0, 0xcf, 0x70, 0xb3, 0x7c, 0x38, 0xbd, 0x25, - 0x69, 0x48, 0x71, 0xb9, 0xa4, 0xe9, 0x08, 0xc9, 0xd9, 0x84, 0xa4, 0xa4, 0x21, 0xc5, 0x65, 0x49, - 0x1c, 0x3a, 0xe6, 0xed, 0x90, 0x08, 0x61, 0xc8, 0x23, 0xa3, 0x92, 0xf8, 0x66, 0xcc, 0x42, 0x49, - 0x39, 0xf6, 0x2c, 0xb7, 0x43, 0x2b, 0x30, 0x3d, 0x8b, 0x54, 0xea, 0xfa, 0x39, 0x1e, 0x7f, 0xde, - 0x78, 0x6f, 0x29, 0x2a, 0x4a, 0x48, 0x40, 0x02, 0x46, 0x88, 0x13, 0xda, 0xfa, 0x79, 0x7e, 0xb1, - 0x0f, 0x24, 0x05, 0xd5, 0xc9, 0xd9, 0x70, 0x42, 0x1b, 0x71, 0xf3, 0xf0, 0x19, 0x30, 0x65, 0xe3, - 0x23, 0x56, 0x0e, 0x88, 0x1f, 0x98, 0x84, 0xea, 0x73, 0x7c, 0xf1, 0xb3, 0xac, 0xe3, 0xdc, 0x4a, - 0x32, 0x50, 0xa7, 0x1c, 0x57, 0x34, 0x9d, 0x84, 0xe2, 0x7c, 0x42, 0x31, 0xc9, 0x40, 0x9d, 0x72, - 0x2c, 0xd2, 0x3e, 0xb9, 0x1d, 0x9a, 0x3e, 0x31, 0xf4, 0x07, 0x78, 0x93, 0x2a, 0x3f, 0x18, 0x08, - 0x1a, 0x52, 0x5c, 0xd8, 0x8c, 0xe6, 0x47, 0x3a, 0x3f, 0x86, 0x37, 0x07, 0x5b, 0xc9, 0x2b, 0xfe, - 0xaa, 0xef, 0xe3, 0x63, 0x71, 0xd3, 0x24, 0x27, 0x47, 0x90, 0x82, 0x1c, 0xb6, 0xac, 0x4a, 0x5d, - 0xbf, 0xc0, 0x63, 0x3f, 0xe8, 0x1b, 0x44, 0x55, 0x9d, 0x55, 0x06, 0x82, 0x04, 0x16, 0x03, 0x75, - 0x1d, 0x96, 0x1a, 0x0b, 0xc3, 0x05, 0xad, 0x30, 0x10, 0x24, 0xb0, 0xf8, 0x4a, 0x9d, 0xe3, 0x4a, - 0x5d, 0x7f, 0x70, 0xc8, 0x2b, 0x65, 0x20, 0x48, 0x60, 0x41, 0x13, 0x64, 0x1d, 0x37, 0xd0, 0x2f, - 0x0e, 0xe5, 0x7a, 0xe6, 0x17, 0xce, 0xb6, 0x1b, 0x20, 0x86, 0x01, 0x7f, 0xa1, 0x01, 0xe0, 0xc5, - 0x29, 0xfa, 0xd0, 0x40, 0xc6, 0x12, 0x29, 0xc8, 0x52, 0x9c, 0xdb, 0x1b, 0x4e, 0xe0, 0x1f, 0xc7, - 0xef, 0xc8, 0xc4, 0x19, 0x48, 0x78, 0x01, 0x7f, 0xa3, 0x81, 0xf3, 0xc9, 0x36, 0x59, 0xb9, 0xb7, - 0xc8, 0x23, 0x72, 0x63, 0xd0, 0x69, 0x5e, 0x76, 0x5d, 0xab, 0xac, 0xb7, 0x5b, 0x85, 0xf3, 0xab, - 0x3d, 0x50, 0x51, 0x4f, 0x5f, 0xe0, 0x1f, 0x34, 0x30, 0x2b, 0xab, 0x68, 0xc2, 0xc3, 0x02, 0x0f, - 0x20, 0x19, 0x74, 0x00, 0xd3, 0x38, 0x22, 0x8e, 0xea, 0x43, 0x77, 0x17, 0x1f, 0x75, 0xbb, 0x06, - 0xff, 0xac, 0x81, 0x49, 0x83, 0x78, 0xc4, 0x31, 0x88, 0x53, 0x63, 0xbe, 0x2e, 0x0d, 0x64, 0x6c, - 0x90, 0xf6, 0x75, 0x3d, 0x01, 0x21, 0xdc, 0x2c, 0x49, 0x37, 0x27, 0x93, 0xac, 0x93, 0x56, 0x61, - 0x3e, 0x56, 0x4d, 0x72, 0x50, 0x87, 0x97, 0xf0, 0x3d, 0x0d, 0x4c, 0xc7, 0x1b, 0x20, 0xae, 0x94, - 0x4b, 0x43, 0xcc, 0x03, 0xde, 0xbe, 0xae, 0x76, 0x02, 0xa2, 0xb4, 0x07, 0xf0, 0x8f, 0x1a, 0xeb, - 0xd4, 0xa2, 0x77, 0x1f, 0xd5, 0x8b, 0x3c, 0x96, 0x6f, 0x0e, 0x3c, 0x96, 0x0a, 0x41, 0x84, 0xf2, - 0x4a, 0xdc, 0x0a, 0x2a, 0xce, 0x49, 0xab, 0x30, 0x97, 0x8c, 0xa4, 0x62, 0xa0, 0xa4, 0x87, 0xf0, - 0xc7, 0x1a, 0x98, 0x24, 0x71, 0xc7, 0x4d, 0xf5, 0x87, 0x07, 0x12, 0xc4, 0x9e, 0x4d, 0xbc, 0x78, - 0xa9, 0x27, 0x58, 0x14, 0x75, 0x60, 0xb3, 0x0e, 0x92, 0x1c, 0x61, 0xdb, 0xb3, 0x88, 0xfe, 0x7f, - 0x03, 0xee, 0x20, 0x37, 0x84, 0x5d, 0x14, 0x01, 0xc0, 0x2b, 0x20, 0xef, 0x84, 0x96, 0x85, 0xf7, - 0x2c, 0xa2, 0x3f, 0xc2, 0x7b, 0x11, 0x35, 0x16, 0xdd, 0x96, 0x74, 0xa4, 0x24, 0x60, 0x1d, 0x2c, - 0x1d, 0xbd, 0xa4, 0xfe, 0x45, 0xa8, 0xe7, 0xe0, 0x4e, 0xbf, 0xcc, 0xad, 0x2c, 0xb4, 0x5b, 0x85, - 0xf9, 0xdd, 0xde, 0xa3, 0xbd, 0xbb, 0xda, 0x80, 0xaf, 0x82, 0x07, 0x13, 0x32, 0x1b, 0xf6, 0x1e, - 0x31, 0x0c, 0x62, 0x44, 0x0f, 0x37, 0xfd, 0xff, 0xc5, 0xf0, 0x30, 0x3a, 0xe0, 0xbb, 0x69, 0x01, - 0x74, 0x27, 0x6d, 0x78, 0x1d, 0xcc, 0x27, 0xd8, 0x9b, 0x4e, 0x50, 0xf1, 0xab, 0x81, 0x6f, 0x3a, - 0x0d, 0x7d, 0x99, 0xdb, 0x3d, 0x1f, 0x9d, 0xc8, 0xdd, 0x04, 0x0f, 0xf5, 0xd1, 0x81, 0x5f, 0xeb, - 0xb0, 0xc6, 0x3f, 0x63, 0x61, 0xef, 0x25, 0x72, 0x4c, 0xf5, 0x47, 0x79, 0x77, 0xc2, 0x37, 0x7b, - 0x37, 0x41, 0x47, 0x7d, 0xe4, 0xe1, 0x57, 0xc1, 0xb9, 0x14, 0x87, 0x3d, 0x51, 0xf4, 0xc7, 0xc4, - 0x5b, 0x83, 0xf5, 0xb3, 0xbb, 0x11, 0x11, 0xf5, 0x92, 0x84, 0x5f, 0x06, 0x30, 0x41, 0xde, 0xc2, - 0x1e, 0xd7, 0x7f, 0x5c, 0x3c, 0x7b, 0xd8, 0x8e, 0xee, 0x4a, 0x1a, 0xea, 0x21, 0xb7, 0xc0, 0xde, - 0xc0, 0xa9, 0x1a, 0x0a, 0x67, 0x40, 0xf6, 0x80, 0xc8, 0xff, 0x1d, 0x40, 0xec, 0x4f, 0x68, 0x80, - 0x5c, 0x13, 0x5b, 0x61, 0xf4, 0x8c, 0x1f, 0xf0, 0xfd, 0x8b, 0x84, 0xf1, 0xe7, 0x32, 0xcf, 0x6a, - 0x0b, 0xef, 0x6b, 0x60, 0xbe, 0x77, 0x69, 0xbf, 0xaf, 0x6e, 0xfd, 0x4a, 0x03, 0xb3, 0x5d, 0x55, - 0xbc, 0x87, 0x47, 0xb7, 0x3b, 0x3d, 0x7a, 0x75, 0xd0, 0xe5, 0x58, 0xa4, 0x1f, 0xef, 0x41, 0x93, - 0xee, 0xfd, 0x4c, 0x03, 0x33, 0xe9, 0xc2, 0x78, 0x3f, 0xe3, 0x55, 0x7c, 0x3f, 0x03, 0xe6, 0x7b, - 0xb7, 0xce, 0xd0, 0x57, 0x33, 0x82, 0xe1, 0xcc, 0x5a, 0x7a, 0xcd, 0x65, 0xdf, 0xd1, 0xc0, 0xc4, - 0x2d, 0x25, 0x17, 0x7d, 0x5b, 0x1e, 0xf8, 0x94, 0x27, 0xba, 0x89, 0x62, 0x06, 0x45, 0x49, 0xdc, - 0xe2, 0x9f, 0x34, 0x30, 0xd7, 0xf3, 0x8a, 0x85, 0x97, 0xc1, 0x28, 0xb6, 0x2c, 0xf7, 0x50, 0x0c, - 0xeb, 0x12, 0x93, 0xf0, 0x55, 0x4e, 0x45, 0x92, 0x9b, 0x88, 0x5e, 0xe6, 0xf3, 0x8a, 0x5e, 0xf1, - 0x6f, 0x1a, 0xb8, 0x78, 0xa7, 0x4c, 0xbc, 0x2f, 0x5b, 0xba, 0x0c, 0xf2, 0xb2, 0x3d, 0x3e, 0xe6, - 0xdb, 0x29, 0x8b, 0x9d, 0x2c, 0x1a, 0xfc, 0xdf, 0xa9, 0xc4, 0x5f, 0xc5, 0x0f, 0x34, 0x30, 0x53, - 0x25, 0x7e, 0xd3, 0xac, 0x11, 0x44, 0xea, 0xc4, 0x27, 0x4e, 0x8d, 0xc0, 0x15, 0x30, 0xce, 0x3f, - 0xea, 0x7a, 0xb8, 0x16, 0x7d, 0xa0, 0x98, 0x95, 0x21, 0x1f, 0xdf, 0x8e, 0x18, 0x28, 0x96, 0x51, - 0x1f, 0x33, 0x32, 0x7d, 0x3f, 0x66, 0x5c, 0x04, 0x23, 0x5e, 0x3c, 0xea, 0xcd, 0x33, 0x2e, 0x9f, - 0xee, 0x72, 0x2a, 0xe7, 0xba, 0x7e, 0xc0, 0xe7, 0x57, 0x39, 0xc9, 0x75, 0xfd, 0x00, 0x71, 0x6a, - 0xf1, 0xef, 0x1a, 0xe8, 0xf5, 0x8f, 0x4f, 0xf0, 0x82, 0x18, 0xe1, 0x25, 0xe6, 0x62, 0xd1, 0xf8, - 0x0e, 0x36, 0xc1, 0x18, 0x15, 0xab, 0x92, 0x51, 0xaf, 0xdc, 0x63, 0xd4, 0xd3, 0x31, 0x12, 0xbd, - 0x43, 0x44, 0x8d, 0xc0, 0x58, 0xe0, 0x6b, 0xb8, 0x1c, 0x3a, 0x86, 0x9c, 0xea, 0x4e, 0x8a, 0xc0, - 0xaf, 0xad, 0x0a, 0x1a, 0x52, 0xdc, 0xf2, 0xd5, 0x0f, 0x3f, 0x59, 0x3c, 0xf3, 0xd1, 0x27, 0x8b, - 0x67, 0x3e, 0xfe, 0x64, 0xf1, 0xcc, 0x77, 0xdb, 0x8b, 0xda, 0x87, 0xed, 0x45, 0xed, 0xa3, 0xf6, - 0xa2, 0xf6, 0x71, 0x7b, 0x51, 0xfb, 0x67, 0x7b, 0x51, 0xfb, 0xf9, 0xa7, 0x8b, 0x67, 0xbe, 0x39, - 0x26, 0xf1, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x47, 0x22, 0xb1, 0x79, 0x8e, 0x2c, 0x00, 0x00, + // 3024 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x73, 0x23, 0x47, + 0xd9, 0xdf, 0x91, 0x2c, 0x5b, 0x6e, 0xdb, 0x6b, 0xbb, 0x77, 0xed, 0xcc, 0x3a, 0x1b, 0xcb, 0xab, + 0xbc, 0xd9, 0xd7, 0x49, 0x76, 0xe5, 0xc4, 0x24, 0x24, 0xa4, 0xa0, 0x28, 0xcb, 0xf6, 0x06, 0x27, + 0xeb, 0x0f, 0x5a, 0xbb, 0x89, 0x21, 0x9f, 0x6d, 0x4d, 0x4b, 0x9e, 0xf5, 0x7c, 0xed, 0xf4, 0x8c, + 0x6c, 0x57, 0x80, 0xe2, 0xa3, 0x52, 0x50, 0x14, 0x10, 0x8a, 0xe4, 0x42, 0x15, 0x1c, 0x02, 0xc5, + 0x85, 0x03, 0x1c, 0xa0, 0xb8, 0xc0, 0x1f, 0x90, 0x63, 0x8a, 0x53, 0x0e, 0x94, 0x60, 0xc5, 0x95, + 0x23, 0x55, 0x54, 0xf9, 0x44, 0xf5, 0xc7, 0xf4, 0x8c, 0x46, 0xd2, 0xae, 0x2b, 0x2b, 0x65, 0xb9, + 0x59, 0xcf, 0xd7, 0xef, 0xe9, 0xa7, 0x9f, 0x7e, 0xfa, 0xe9, 0x67, 0x0c, 0x6a, 0x07, 0xcf, 0xd3, + 0x92, 0xe9, 0x2e, 0x1d, 0x84, 0x7b, 0xc4, 0x77, 0x48, 0x40, 0xe8, 0x52, 0x83, 0x38, 0x86, 0xeb, + 0x2f, 0x49, 0x06, 0xf6, 0x4c, 0x72, 0x14, 0x10, 0x87, 0x9a, 0xae, 0x43, 0xaf, 0x62, 0xcf, 0xa4, + 0xc4, 0x6f, 0x10, 0x7f, 0xc9, 0x3b, 0xa8, 0x33, 0x1e, 0x6d, 0x17, 0x58, 0x6a, 0x3c, 0xbd, 0x47, + 0x02, 0xfc, 0xf4, 0x52, 0x9d, 0x38, 0xc4, 0xc7, 0x01, 0x31, 0x4a, 0x9e, 0xef, 0x06, 0x2e, 0xfc, + 0x92, 0x30, 0x57, 0x6a, 0x93, 0x7e, 0x4b, 0x99, 0x2b, 0x79, 0x07, 0x75, 0xc6, 0xa3, 0xed, 0x02, + 0x25, 0x69, 0x6e, 0xee, 0x6a, 0xdd, 0x0c, 0xf6, 0xc3, 0xbd, 0x52, 0xd5, 0xb5, 0x97, 0xea, 0x6e, + 0xdd, 0x5d, 0xe2, 0x56, 0xf7, 0xc2, 0x1a, 0xff, 0xc5, 0x7f, 0xf0, 0xbf, 0x04, 0xda, 0xdc, 0x33, + 0xb1, 0xf3, 0x36, 0xae, 0xee, 0x9b, 0x0e, 0xf1, 0x8f, 0x63, 0x8f, 0x6d, 0x12, 0xe0, 0xa5, 0x46, + 0x87, 0x8f, 0x73, 0x4b, 0xbd, 0xb4, 0xfc, 0xd0, 0x09, 0x4c, 0x9b, 0x74, 0x28, 0x7c, 0xfe, 0x5e, + 0x0a, 0xb4, 0xba, 0x4f, 0x6c, 0x9c, 0xd6, 0x2b, 0x9e, 0x68, 0x60, 0x7a, 0xd5, 0x75, 0x1a, 0xc4, + 0x67, 0xab, 0x44, 0xe4, 0x76, 0x48, 0x68, 0x00, 0xcb, 0x20, 0x1b, 0x9a, 0x86, 0xae, 0x2d, 0x68, + 0x8b, 0xa3, 0xe5, 0xa7, 0x3e, 0x6a, 0x16, 0xce, 0xb4, 0x9a, 0x85, 0xec, 0xcd, 0x8d, 0xb5, 0x93, + 0x66, 0xe1, 0x52, 0x2f, 0xa4, 0xe0, 0xd8, 0x23, 0xb4, 0x74, 0x73, 0x63, 0x0d, 0x31, 0x65, 0xf8, + 0x22, 0x98, 0x36, 0x08, 0x35, 0x7d, 0x62, 0xac, 0xec, 0x6c, 0xbc, 0x22, 0xec, 0xeb, 0x19, 0x6e, + 0xf1, 0x82, 0xb4, 0x38, 0xbd, 0x96, 0x16, 0x40, 0x9d, 0x3a, 0x70, 0x17, 0x8c, 0xb8, 0x7b, 0xb7, + 0x48, 0x35, 0xa0, 0x7a, 0x76, 0x21, 0xbb, 0x38, 0xb6, 0x7c, 0xb5, 0x14, 0xef, 0xa0, 0x72, 0x81, + 0x6f, 0x9b, 0x5c, 0x6c, 0x09, 0xe1, 0xc3, 0xf5, 0x68, 0xe7, 0xca, 0x93, 0x12, 0x6d, 0x64, 0x5b, + 0x58, 0x41, 0x91, 0xb9, 0xe2, 0xaf, 0x33, 0x00, 0x26, 0x17, 0x4f, 0x3d, 0xd7, 0xa1, 0xa4, 0x2f, + 0xab, 0xa7, 0x60, 0xaa, 0xca, 0x2d, 0x07, 0xc4, 0x90, 0xb8, 0x7a, 0xe6, 0xd3, 0x78, 0xaf, 0x4b, + 0xfc, 0xa9, 0xd5, 0x94, 0x39, 0xd4, 0x01, 0x00, 0x6f, 0x80, 0x61, 0x9f, 0xd0, 0xd0, 0x0a, 0xf4, + 0xec, 0x82, 0xb6, 0x38, 0xb6, 0x7c, 0xa5, 0x27, 0x14, 0xcf, 0x6f, 0x96, 0x7c, 0xa5, 0xc6, 0xd3, + 0xa5, 0x4a, 0x80, 0x83, 0x90, 0x96, 0xcf, 0x4a, 0xa4, 0x61, 0xc4, 0x6d, 0x20, 0x69, 0xab, 0xf8, + 0x83, 0x0c, 0x98, 0x4a, 0x46, 0xa9, 0x61, 0x92, 0x43, 0x78, 0x08, 0x46, 0x7c, 0x91, 0x2c, 0x3c, + 0x4e, 0x63, 0xcb, 0x3b, 0xa5, 0xfb, 0x3a, 0x56, 0xa5, 0x8e, 0x24, 0x2c, 0x8f, 0xb1, 0x3d, 0x93, + 0x3f, 0x50, 0x84, 0x06, 0xdf, 0x01, 0x79, 0x5f, 0x6e, 0x14, 0xcf, 0xa6, 0xb1, 0xe5, 0xaf, 0xf6, + 0x11, 0x59, 0x18, 0x2e, 0x8f, 0xb7, 0x9a, 0x85, 0x7c, 0xf4, 0x0b, 0x29, 0xc0, 0xe2, 0xfb, 0x19, + 0x30, 0xbf, 0x1a, 0xd2, 0xc0, 0xb5, 0x11, 0xa1, 0x6e, 0xe8, 0x57, 0xc9, 0xaa, 0x6b, 0x85, 0xb6, + 0xb3, 0x46, 0x6a, 0xa6, 0x63, 0x06, 0x2c, 0x5b, 0x17, 0xc0, 0x90, 0x83, 0x6d, 0x22, 0xb3, 0x67, + 0x5c, 0xc6, 0x74, 0x68, 0x0b, 0xdb, 0x04, 0x71, 0x0e, 0x93, 0x60, 0xc9, 0x22, 0xcf, 0x82, 0x92, + 0xb8, 0x71, 0xec, 0x11, 0xc4, 0x39, 0xf0, 0x32, 0x18, 0xae, 0xb9, 0xbe, 0x8d, 0xc5, 0x3e, 0x8e, + 0xc6, 0x3b, 0x73, 0x8d, 0x53, 0x91, 0xe4, 0xc2, 0x67, 0xc1, 0x98, 0x41, 0x68, 0xd5, 0x37, 0x3d, + 0x06, 0xad, 0x0f, 0x71, 0xe1, 0x73, 0x52, 0x78, 0x6c, 0x2d, 0x66, 0xa1, 0xa4, 0x1c, 0xbc, 0x02, + 0xf2, 0x9e, 0x6f, 0xba, 0xbe, 0x19, 0x1c, 0xeb, 0xb9, 0x05, 0x6d, 0x31, 0x57, 0x9e, 0x92, 0x3a, + 0xf9, 0x1d, 0x49, 0x47, 0x4a, 0x02, 0x2e, 0x80, 0xfc, 0x4b, 0x95, 0xed, 0xad, 0x1d, 0x1c, 0xec, + 0xeb, 0xc3, 0x1c, 0x61, 0x88, 0x49, 0xa3, 0xfc, 0x2d, 0x49, 0x2d, 0xfe, 0x2d, 0x03, 0xf4, 0x74, + 0x54, 0xa2, 0x90, 0xc2, 0x6b, 0x20, 0x4f, 0x03, 0x56, 0x71, 0xea, 0xc7, 0x32, 0x26, 0x4f, 0x44, + 0x60, 0x15, 0x49, 0x3f, 0x69, 0x16, 0x66, 0x63, 0x8d, 0x88, 0xca, 0xe3, 0xa1, 0x74, 0xe1, 0x2f, + 0x35, 0x70, 0xee, 0x90, 0xec, 0xed, 0xbb, 0xee, 0xc1, 0xaa, 0x65, 0x12, 0x27, 0x58, 0x75, 0x9d, + 0x9a, 0x59, 0x97, 0x39, 0x80, 0xee, 0x33, 0x07, 0x5e, 0xed, 0xb4, 0x5c, 0x7e, 0xa8, 0xd5, 0x2c, + 0x9c, 0xeb, 0xc2, 0x40, 0xdd, 0xfc, 0x80, 0xbb, 0x40, 0xaf, 0xa6, 0x0e, 0x89, 0x2c, 0x60, 0xa2, + 0x6c, 0x8d, 0x96, 0x2f, 0xb6, 0x9a, 0x05, 0x7d, 0xb5, 0x87, 0x0c, 0xea, 0xa9, 0x5d, 0xfc, 0x5e, + 0x36, 0x1d, 0xde, 0x44, 0xba, 0xbd, 0x0d, 0xf2, 0xec, 0x18, 0x1b, 0x38, 0xc0, 0xf2, 0x20, 0x3e, + 0x75, 0xba, 0x43, 0x2f, 0x6a, 0xc6, 0x26, 0x09, 0x70, 0x19, 0xca, 0x0d, 0x01, 0x31, 0x0d, 0x29, + 0xab, 0xf0, 0x9b, 0x60, 0x88, 0x7a, 0xa4, 0x2a, 0x03, 0xfd, 0xda, 0xfd, 0x1e, 0xb6, 0x1e, 0x0b, + 0xa9, 0x78, 0xa4, 0x1a, 0x9f, 0x05, 0xf6, 0x0b, 0x71, 0x58, 0xf8, 0xae, 0x06, 0x86, 0x29, 0x2f, + 0x50, 0xb2, 0xa8, 0xbd, 0x31, 0x28, 0x0f, 0x52, 0x55, 0x50, 0xfc, 0x46, 0x12, 0xbc, 0xf8, 0xef, + 0x0c, 0xb8, 0xd4, 0x4b, 0x75, 0xd5, 0x75, 0x0c, 0xb1, 0x1d, 0x1b, 0xf2, 0x6c, 0x8b, 0x4c, 0x7f, + 0x36, 0x79, 0xb6, 0x4f, 0x9a, 0x85, 0xc7, 0xee, 0x69, 0x20, 0x51, 0x04, 0xbe, 0xa0, 0xd6, 0x2d, + 0x0a, 0xc5, 0xa5, 0x76, 0xc7, 0x4e, 0x9a, 0x85, 0x49, 0xa5, 0xd6, 0xee, 0x2b, 0x6c, 0x00, 0x68, + 0x61, 0x1a, 0xdc, 0xf0, 0xb1, 0x43, 0x85, 0x59, 0xd3, 0x26, 0x32, 0x7c, 0x4f, 0x9c, 0x2e, 0x3d, + 0x98, 0x46, 0x79, 0x4e, 0x42, 0xc2, 0xeb, 0x1d, 0xd6, 0x50, 0x17, 0x04, 0x56, 0xb7, 0x7c, 0x82, + 0xa9, 0x2a, 0x45, 0x89, 0x1b, 0x85, 0x51, 0x91, 0xe4, 0xc2, 0xc7, 0xc1, 0x88, 0x4d, 0x28, 0xc5, + 0x75, 0xc2, 0xeb, 0xcf, 0x68, 0x7c, 0x45, 0x6f, 0x0a, 0x32, 0x8a, 0xf8, 0xac, 0x3f, 0xb9, 0xd8, + 0x2b, 0x6a, 0xd7, 0x4d, 0x1a, 0xc0, 0xd7, 0x3b, 0x0e, 0x40, 0xe9, 0x74, 0x2b, 0x64, 0xda, 0x3c, + 0xfd, 0x55, 0xf1, 0x8b, 0x28, 0x89, 0xe4, 0xff, 0x06, 0xc8, 0x99, 0x01, 0xb1, 0xa3, 0xbb, 0xfb, + 0xd5, 0x01, 0xe5, 0x5e, 0x79, 0x42, 0xfa, 0x90, 0xdb, 0x60, 0x68, 0x48, 0x80, 0x16, 0x7f, 0x93, + 0x01, 0x8f, 0xf4, 0x52, 0x61, 0x17, 0x0a, 0x65, 0x11, 0xf7, 0xac, 0xd0, 0xc7, 0x96, 0xcc, 0x38, + 0x15, 0xf1, 0x1d, 0x4e, 0x45, 0x92, 0xcb, 0x4a, 0x3e, 0x35, 0x9d, 0x7a, 0x68, 0x61, 0x5f, 0xa6, + 0x93, 0x5a, 0x75, 0x45, 0xd2, 0x91, 0x92, 0x80, 0x25, 0x00, 0xe8, 0xbe, 0xeb, 0x07, 0x1c, 0x43, + 0x56, 0xaf, 0xb3, 0xac, 0x40, 0x54, 0x14, 0x15, 0x25, 0x24, 0xd8, 0x8d, 0x76, 0x60, 0x3a, 0x86, + 0xdc, 0x75, 0x75, 0x8a, 0x5f, 0x36, 0x1d, 0x03, 0x71, 0x0e, 0xc3, 0xb7, 0x4c, 0x1a, 0x30, 0x8a, + 0xdc, 0xf2, 0xb6, 0xa8, 0x73, 0x49, 0x25, 0xc1, 0xf0, 0xab, 0xac, 0xea, 0xbb, 0xbe, 0x49, 0xa8, + 0x3e, 0x1c, 0xe3, 0xaf, 0x2a, 0x2a, 0x4a, 0x48, 0x14, 0xff, 0x95, 0xef, 0x9d, 0x24, 0xac, 0x94, + 0xc0, 0x47, 0x41, 0xae, 0xee, 0xbb, 0xa1, 0x27, 0xa3, 0xa4, 0xa2, 0xfd, 0x22, 0x23, 0x22, 0xc1, + 0x63, 0x59, 0xd9, 0x68, 0x6b, 0x53, 0x55, 0x56, 0x46, 0xcd, 0x69, 0xc4, 0x87, 0xdf, 0xd1, 0x40, + 0xce, 0x91, 0xc1, 0x61, 0x29, 0xf7, 0xfa, 0x80, 0xf2, 0x82, 0x87, 0x37, 0x76, 0x57, 0x44, 0x5e, + 0x20, 0xc3, 0x67, 0x40, 0x8e, 0x56, 0x5d, 0x8f, 0xc8, 0xa8, 0xcf, 0x47, 0x42, 0x15, 0x46, 0x3c, + 0x69, 0x16, 0x26, 0x22, 0x73, 0x9c, 0x80, 0x84, 0x30, 0xfc, 0xbe, 0x06, 0x40, 0x03, 0x5b, 0xa6, + 0x81, 0x79, 0xcb, 0x90, 0xe3, 0xee, 0xf7, 0x37, 0xad, 0x5f, 0x51, 0xe6, 0xc5, 0xa6, 0xc5, 0xbf, + 0x51, 0x02, 0x1a, 0xbe, 0xa7, 0x81, 0x71, 0x1a, 0xee, 0xf9, 0x52, 0x8b, 0xf2, 0xe6, 0x62, 0x6c, + 0xf9, 0x6b, 0x7d, 0xf5, 0xa5, 0x92, 0x00, 0x28, 0x4f, 0xb5, 0x9a, 0x85, 0xf1, 0x24, 0x05, 0xb5, + 0x39, 0x00, 0x7f, 0xa4, 0x81, 0x7c, 0x23, 0xba, 0xb3, 0x47, 0xf8, 0x81, 0x7f, 0x73, 0x40, 0x1b, + 0x2b, 0x33, 0x2a, 0x3e, 0x05, 0xaa, 0x0f, 0x50, 0x1e, 0xc0, 0x3f, 0x6b, 0x40, 0xc7, 0x86, 0x28, + 0xf0, 0xd8, 0xda, 0xf1, 0x4d, 0x27, 0x20, 0xbe, 0xe8, 0x37, 0xa9, 0x9e, 0xe7, 0xee, 0xf5, 0xf7, + 0x2e, 0x4c, 0xf7, 0xb2, 0xe5, 0x05, 0xe9, 0x9d, 0xbe, 0xd2, 0xc3, 0x0d, 0xd4, 0xd3, 0x41, 0x9e, + 0x68, 0x71, 0x4b, 0xa3, 0x8f, 0x0e, 0x20, 0xd1, 0xe2, 0x5e, 0x4a, 0x56, 0x87, 0xb8, 0x83, 0x4a, + 0x40, 0xc3, 0x6d, 0x30, 0xe3, 0xf9, 0x84, 0x03, 0xdc, 0x74, 0x0e, 0x1c, 0xf7, 0xd0, 0xb9, 0x66, + 0x12, 0xcb, 0xa0, 0x3a, 0x58, 0xd0, 0x16, 0xf3, 0xe5, 0x0b, 0xad, 0x66, 0x61, 0x66, 0xa7, 0x9b, + 0x00, 0xea, 0xae, 0x57, 0x7c, 0x2f, 0x9b, 0x7e, 0x05, 0xa4, 0xbb, 0x08, 0xf8, 0x81, 0x58, 0xbd, + 0x88, 0x0d, 0xd5, 0x35, 0xbe, 0x5b, 0x6f, 0x0f, 0x28, 0x99, 0x54, 0x1b, 0x10, 0x77, 0x72, 0x8a, + 0x44, 0x51, 0xc2, 0x0f, 0xf8, 0x73, 0x0d, 0x4c, 0xe0, 0x6a, 0x95, 0x78, 0x01, 0x31, 0x44, 0x71, + 0xcf, 0x7c, 0x06, 0xf5, 0x6b, 0x46, 0x7a, 0x35, 0xb1, 0x92, 0x84, 0x46, 0xed, 0x9e, 0xc0, 0x17, + 0xc0, 0x59, 0x1a, 0xb8, 0x3e, 0x31, 0x52, 0x6d, 0x33, 0x6c, 0x35, 0x0b, 0x67, 0x2b, 0x6d, 0x1c, + 0x94, 0x92, 0x2c, 0xfe, 0x3d, 0x07, 0x0a, 0xf7, 0x38, 0x6a, 0xa7, 0x78, 0x98, 0x5d, 0x06, 0xc3, + 0x7c, 0xb9, 0x06, 0x8f, 0x4a, 0x3e, 0xd1, 0x0a, 0x72, 0x2a, 0x92, 0x5c, 0x76, 0x51, 0x30, 0x7c, + 0xd6, 0xbe, 0x64, 0xb9, 0xa0, 0xba, 0x28, 0x2a, 0x82, 0x8c, 0x22, 0x3e, 0x5c, 0x06, 0xc0, 0x20, + 0x9e, 0x4f, 0xd8, 0x65, 0x65, 0xe8, 0x23, 0x5c, 0x5a, 0x6d, 0xd2, 0x9a, 0xe2, 0xa0, 0x84, 0x14, + 0xbc, 0x06, 0x60, 0xf4, 0xcb, 0x74, 0x9d, 0x57, 0xb1, 0xef, 0x98, 0x4e, 0x5d, 0xcf, 0x73, 0xb7, + 0x67, 0x59, 0x37, 0xb6, 0xd6, 0xc1, 0x45, 0x5d, 0x34, 0xe0, 0x3b, 0x60, 0x58, 0x0c, 0x7d, 0xf8, + 0x0d, 0x31, 0xc0, 0x2a, 0x0f, 0x78, 0x8c, 0x38, 0x14, 0x92, 0x90, 0x9d, 0xd5, 0x3d, 0xf7, 0xa0, + 0xab, 0xfb, 0x5d, 0xcb, 0xe9, 0xf0, 0xff, 0x78, 0x39, 0x2d, 0xfe, 0x47, 0x4b, 0xd7, 0x9c, 0xc4, + 0x52, 0x2b, 0x55, 0x6c, 0x11, 0xb8, 0x06, 0xa6, 0xd8, 0x8b, 0x09, 0x11, 0xcf, 0x32, 0xab, 0x98, + 0xf2, 0x07, 0xbb, 0x48, 0x76, 0x35, 0x43, 0xaa, 0xa4, 0xf8, 0xa8, 0x43, 0x03, 0xbe, 0x04, 0xa0, + 0x78, 0x45, 0xb4, 0xd9, 0x11, 0x0d, 0x91, 0x7a, 0x0f, 0x54, 0x3a, 0x24, 0x50, 0x17, 0x2d, 0xb8, + 0x0a, 0xa6, 0x2d, 0xbc, 0x47, 0xac, 0x0a, 0xb1, 0x48, 0x35, 0x70, 0x7d, 0x6e, 0x4a, 0x8c, 0x34, + 0x66, 0x5a, 0xcd, 0xc2, 0xf4, 0xf5, 0x34, 0x13, 0x75, 0xca, 0x17, 0x2f, 0xa5, 0x8f, 0x76, 0x72, + 0xe1, 0xe2, 0x6d, 0xf6, 0x61, 0x06, 0xcc, 0xf5, 0xce, 0x0c, 0xf8, 0xdd, 0xf8, 0x09, 0x29, 0x5e, + 0x08, 0x6f, 0x0e, 0x2a, 0x0b, 0xe5, 0x1b, 0x12, 0x74, 0xbe, 0x1f, 0xe1, 0xb7, 0x58, 0xbb, 0x86, + 0xad, 0x68, 0x68, 0xf5, 0xc6, 0xc0, 0x5c, 0x60, 0x20, 0xe5, 0x51, 0xd1, 0x09, 0x62, 0x8b, 0x37, + 0x7e, 0xd8, 0x22, 0xc5, 0xdf, 0x6a, 0xe9, 0x29, 0x42, 0x7c, 0x82, 0xe1, 0x8f, 0x35, 0x30, 0xe9, + 0x7a, 0xc4, 0x59, 0xd9, 0xd9, 0x78, 0xe5, 0x73, 0xe2, 0x24, 0xcb, 0x50, 0x6d, 0xdd, 0xa7, 0x9f, + 0x2f, 0x55, 0xb6, 0xb7, 0x84, 0xc1, 0x1d, 0xdf, 0xf5, 0x68, 0xf9, 0x5c, 0xab, 0x59, 0x98, 0xdc, + 0x6e, 0x87, 0x42, 0x69, 0xec, 0xa2, 0x0d, 0x66, 0xd6, 0x8f, 0x02, 0xe2, 0x3b, 0xd8, 0x5a, 0x73, + 0xab, 0xa1, 0x4d, 0x9c, 0x40, 0x38, 0x9a, 0x9a, 0x78, 0x69, 0xa7, 0x9c, 0x78, 0x3d, 0x02, 0xb2, + 0xa1, 0x6f, 0xc9, 0x2c, 0x1e, 0x53, 0x13, 0x5d, 0x74, 0x1d, 0x31, 0x7a, 0xf1, 0x12, 0x18, 0x62, + 0x7e, 0xc2, 0x0b, 0x20, 0xeb, 0xe3, 0x43, 0x6e, 0x75, 0xbc, 0x3c, 0xc2, 0x44, 0x10, 0x3e, 0x44, + 0x8c, 0x56, 0xfc, 0xd3, 0x02, 0x98, 0x4c, 0xad, 0x05, 0xce, 0x81, 0x8c, 0x1a, 0x13, 0x03, 0x69, + 0x34, 0xb3, 0xb1, 0x86, 0x32, 0xa6, 0x01, 0x9f, 0x53, 0xc5, 0x57, 0x80, 0x16, 0xd4, 0x5d, 0xc2, + 0xa9, 0xac, 0x3f, 0x8f, 0xcd, 0x31, 0x47, 0xa2, 0xc2, 0xc9, 0x7c, 0x20, 0x35, 0x79, 0x4a, 0x84, + 0x0f, 0xa4, 0x86, 0x18, 0xed, 0xd3, 0x8e, 0xfb, 0xa2, 0x79, 0x63, 0xee, 0x14, 0xf3, 0xc6, 0xe1, + 0xbb, 0xce, 0x1b, 0x1f, 0x05, 0xb9, 0xc0, 0x0c, 0x2c, 0xc2, 0x2f, 0xb2, 0xc4, 0x33, 0xea, 0x06, + 0x23, 0x22, 0xc1, 0x83, 0xb7, 0xc0, 0x88, 0x41, 0x6a, 0x38, 0xb4, 0x02, 0x7e, 0x67, 0x8d, 0x2d, + 0xaf, 0xf6, 0x21, 0x85, 0xc4, 0x30, 0x78, 0x4d, 0xd8, 0x45, 0x11, 0x00, 0x7c, 0x0c, 0x8c, 0xd8, + 0xf8, 0xc8, 0xb4, 0x43, 0x9b, 0x37, 0x98, 0x9a, 0x10, 0xdb, 0x14, 0x24, 0x14, 0xf1, 0x58, 0x65, + 0x24, 0x47, 0x55, 0x2b, 0xa4, 0x66, 0x83, 0x48, 0xa6, 0x6c, 0xfe, 0x54, 0x65, 0x5c, 0x4f, 0xf1, + 0x51, 0x87, 0x06, 0x07, 0x33, 0x1d, 0xae, 0x3c, 0x96, 0x00, 0x13, 0x24, 0x14, 0xf1, 0xda, 0xc1, + 0xa4, 0xfc, 0x78, 0x2f, 0x30, 0xa9, 0xdc, 0xa1, 0x01, 0x9f, 0x04, 0xa3, 0x36, 0x3e, 0xba, 0x4e, + 0x9c, 0x7a, 0xb0, 0xaf, 0x4f, 0x2c, 0x68, 0x8b, 0xd9, 0xf2, 0x44, 0xab, 0x59, 0x18, 0xdd, 0x8c, + 0x88, 0x28, 0xe6, 0x73, 0x61, 0xd3, 0x91, 0xc2, 0x67, 0x13, 0xc2, 0x11, 0x11, 0xc5, 0x7c, 0xd6, + 0xbd, 0x78, 0x38, 0x60, 0x87, 0x4b, 0x9f, 0x6c, 0x7f, 0xe6, 0xee, 0x08, 0x32, 0x8a, 0xf8, 0x70, + 0x11, 0xe4, 0x6d, 0x7c, 0xc4, 0x47, 0x12, 0xfa, 0x14, 0x37, 0xcb, 0x07, 0xe3, 0x9b, 0x92, 0x86, + 0x14, 0x97, 0x4b, 0x9a, 0x8e, 0x90, 0x9c, 0x4e, 0x48, 0x4a, 0x1a, 0x52, 0x5c, 0x96, 0xc4, 0xa1, + 0x63, 0xde, 0x0e, 0x89, 0x10, 0x86, 0x3c, 0x32, 0x2a, 0x89, 0x6f, 0xc6, 0x2c, 0x94, 0x94, 0x83, + 0x25, 0x00, 0xec, 0xd0, 0x0a, 0x4c, 0xcf, 0x22, 0xdb, 0x35, 0xfd, 0x1c, 0x8f, 0x3f, 0x6f, 0xfa, + 0x37, 0x15, 0x15, 0x25, 0x24, 0x20, 0x01, 0x43, 0xc4, 0x09, 0x6d, 0xfd, 0x3c, 0xbf, 0xd8, 0xfb, + 0x92, 0x82, 0xea, 0xe4, 0xac, 0x3b, 0xa1, 0x8d, 0xb8, 0x79, 0xf8, 0x1c, 0x98, 0xb0, 0xf1, 0x11, + 0x2b, 0x07, 0xc4, 0x0f, 0x4c, 0x42, 0xf5, 0x19, 0xbe, 0xf8, 0x69, 0xd6, 0xed, 0x6e, 0x26, 0x19, + 0xa8, 0x5d, 0x8e, 0x2b, 0x9a, 0x4e, 0x42, 0x71, 0x36, 0xa1, 0x98, 0x64, 0xa0, 0x76, 0x39, 0x16, + 0x69, 0x9f, 0xdc, 0x0e, 0x4d, 0x9f, 0x18, 0xfa, 0x43, 0xbc, 0x41, 0x96, 0x1f, 0x2b, 0x04, 0x0d, + 0x29, 0x2e, 0x6c, 0x44, 0xb3, 0x2b, 0x9d, 0x1f, 0xc3, 0x9b, 0xfd, 0xad, 0xe4, 0xdb, 0xfe, 0x8a, + 0xef, 0xe3, 0x63, 0x71, 0xd3, 0x24, 0xa7, 0x56, 0x90, 0x82, 0x1c, 0xb6, 0xac, 0xed, 0x9a, 0x7e, + 0x81, 0xc7, 0xbe, 0xdf, 0x37, 0x88, 0xaa, 0x3a, 0x2b, 0x0c, 0x04, 0x09, 0x2c, 0x06, 0xea, 0x3a, + 0x2c, 0x35, 0xe6, 0x06, 0x0b, 0xba, 0xcd, 0x40, 0x90, 0xc0, 0xe2, 0x2b, 0x75, 0x8e, 0xb7, 0x6b, + 0xfa, 0xc3, 0x03, 0x5e, 0x29, 0x03, 0x41, 0x02, 0x0b, 0x9a, 0x20, 0xeb, 0xb8, 0x81, 0x7e, 0x71, + 0x20, 0xd7, 0x33, 0xbf, 0x70, 0xb6, 0xdc, 0x00, 0x31, 0x0c, 0xf8, 0x33, 0x0d, 0x00, 0x2f, 0x4e, + 0xd1, 0x47, 0xfa, 0x32, 0x12, 0x49, 0x41, 0x96, 0xe2, 0xdc, 0x5e, 0x77, 0x02, 0xff, 0x38, 0x7e, + 0x1e, 0x25, 0xce, 0x40, 0xc2, 0x0b, 0xf8, 0x2b, 0x0d, 0x9c, 0x4f, 0xb6, 0xc9, 0xca, 0xbd, 0x79, + 0x1e, 0x91, 0x1b, 0xfd, 0x4e, 0xf3, 0xb2, 0xeb, 0x5a, 0x65, 0xbd, 0xd5, 0x2c, 0x9c, 0x5f, 0xe9, + 0x82, 0x8a, 0xba, 0xfa, 0x02, 0x7f, 0xa7, 0x81, 0x69, 0x59, 0x45, 0x13, 0x1e, 0x16, 0x78, 0x00, + 0x49, 0xbf, 0x03, 0x98, 0xc6, 0x11, 0x71, 0x54, 0x1f, 0xd9, 0x3b, 0xf8, 0xa8, 0xd3, 0x35, 0xf8, + 0x47, 0x0d, 0x8c, 0x1b, 0xc4, 0x23, 0x8e, 0x41, 0x9c, 0x2a, 0xf3, 0x75, 0xa1, 0x2f, 0x23, 0x8b, + 0xb4, 0xaf, 0x6b, 0x09, 0x08, 0xe1, 0x66, 0x49, 0xba, 0x39, 0x9e, 0x64, 0x9d, 0x34, 0x0b, 0xb3, + 0xb1, 0x6a, 0x92, 0x83, 0xda, 0xbc, 0x84, 0xef, 0x6b, 0x60, 0x32, 0xde, 0x00, 0x71, 0xa5, 0x5c, + 0x1a, 0x60, 0x1e, 0xf0, 0xf6, 0x75, 0xa5, 0x1d, 0x10, 0xa5, 0x3d, 0x80, 0xbf, 0xd7, 0x58, 0xa7, + 0x16, 0xbd, 0xfb, 0xa8, 0x5e, 0xe4, 0xb1, 0x7c, 0xab, 0xef, 0xb1, 0x54, 0x08, 0x22, 0x94, 0x57, + 0xe2, 0x56, 0x50, 0x71, 0x4e, 0x9a, 0x85, 0x99, 0x64, 0x24, 0x15, 0x03, 0x25, 0x3d, 0x84, 0x3f, + 0xd4, 0xc0, 0x38, 0x89, 0x3b, 0x6e, 0xaa, 0x3f, 0xda, 0x97, 0x20, 0x76, 0x6d, 0xe2, 0xc5, 0x4b, + 0x3d, 0xc1, 0xa2, 0xa8, 0x0d, 0x9b, 0x75, 0x90, 0xe4, 0x08, 0xdb, 0x9e, 0x45, 0xf4, 0xff, 0xeb, + 0x73, 0x07, 0xb9, 0x2e, 0xec, 0xa2, 0x08, 0x00, 0x5e, 0x01, 0x79, 0x27, 0xb4, 0x2c, 0xbc, 0x67, + 0x11, 0xfd, 0x31, 0xde, 0x8b, 0xa8, 0x91, 0xec, 0x96, 0xa4, 0x23, 0x25, 0x01, 0x6b, 0x60, 0xe1, + 0xe8, 0x65, 0xf5, 0xef, 0x49, 0x5d, 0x87, 0x86, 0xfa, 0x65, 0x6e, 0x65, 0xae, 0xd5, 0x2c, 0xcc, + 0xee, 0x76, 0x1f, 0x2b, 0xde, 0xd3, 0x06, 0x7c, 0x0d, 0x3c, 0x9c, 0x90, 0x59, 0xb7, 0xf7, 0x88, + 0x61, 0x10, 0x23, 0x7a, 0xb8, 0xe9, 0xff, 0x2f, 0x06, 0x97, 0xd1, 0x01, 0xdf, 0x4d, 0x0b, 0xa0, + 0xbb, 0x69, 0xc3, 0xeb, 0x60, 0x36, 0xc1, 0xde, 0x70, 0x82, 0x6d, 0xbf, 0x12, 0xf8, 0xa6, 0x53, + 0xd7, 0x17, 0xb9, 0xdd, 0xf3, 0xd1, 0x89, 0xdc, 0x4d, 0xf0, 0x50, 0x0f, 0x1d, 0xf8, 0x95, 0x36, + 0x6b, 0xfc, 0x13, 0x1a, 0xf6, 0x5e, 0x26, 0xc7, 0x54, 0x7f, 0x9c, 0x77, 0x27, 0x7c, 0xb3, 0x77, + 0x13, 0x74, 0xd4, 0x43, 0x1e, 0x7e, 0x19, 0x9c, 0x4b, 0x71, 0xd8, 0x13, 0x45, 0x7f, 0x42, 0xbc, + 0x35, 0x58, 0x3f, 0xbb, 0x1b, 0x11, 0x51, 0x37, 0x49, 0xf8, 0x45, 0x00, 0x13, 0xe4, 0x4d, 0xec, + 0x71, 0xfd, 0x27, 0xc5, 0xb3, 0x87, 0xed, 0xe8, 0xae, 0xa4, 0xa1, 0x2e, 0x72, 0x73, 0xec, 0x0d, + 0x9c, 0xaa, 0xa1, 0x70, 0x0a, 0x64, 0x0f, 0x88, 0xfc, 0xbf, 0x05, 0xc4, 0xfe, 0x84, 0x06, 0xc8, + 0x35, 0xb0, 0x15, 0x46, 0xcf, 0xf8, 0x3e, 0xdf, 0xbf, 0x48, 0x18, 0x7f, 0x21, 0xf3, 0xbc, 0x36, + 0xf7, 0x81, 0x06, 0x66, 0xbb, 0x97, 0xf6, 0x07, 0xea, 0xd6, 0x2f, 0x34, 0x30, 0xdd, 0x51, 0xc5, + 0xbb, 0x78, 0x74, 0xbb, 0xdd, 0xa3, 0xd7, 0xfa, 0x5d, 0x8e, 0x45, 0xfa, 0xf1, 0x1e, 0x34, 0xe9, + 0xde, 0x4f, 0x34, 0x30, 0x95, 0x2e, 0x8c, 0x0f, 0x32, 0x5e, 0xc5, 0x0f, 0x32, 0x60, 0xb6, 0x7b, + 0xeb, 0x0c, 0x7d, 0x35, 0x23, 0x18, 0xcc, 0xac, 0xa5, 0xdb, 0x5c, 0xf6, 0x5d, 0x0d, 0x8c, 0xdd, + 0x52, 0x72, 0xd1, 0x77, 0xed, 0xbe, 0x4f, 0x79, 0xa2, 0x9b, 0x28, 0x66, 0x50, 0x94, 0xc4, 0x2d, + 0xfe, 0x41, 0x03, 0x33, 0x5d, 0xaf, 0x58, 0x78, 0x19, 0x0c, 0x63, 0xcb, 0x72, 0x0f, 0xc5, 0xb0, + 0x2e, 0x31, 0x85, 0x5f, 0xe1, 0x54, 0x24, 0xb9, 0x89, 0xe8, 0x65, 0x3e, 0xab, 0xe8, 0x15, 0xff, + 0xa2, 0x81, 0x8b, 0x77, 0xcb, 0xc4, 0x07, 0xb2, 0xa5, 0x8b, 0x20, 0x2f, 0xdb, 0xe3, 0x63, 0xbe, + 0x9d, 0xb2, 0xd8, 0xc9, 0xa2, 0xc1, 0xff, 0x95, 0x4b, 0xfc, 0x55, 0xfc, 0x50, 0x03, 0x53, 0x15, + 0xe2, 0x37, 0xcc, 0x2a, 0x41, 0xa4, 0x46, 0x7c, 0xe2, 0x54, 0x09, 0x5c, 0x02, 0xa3, 0xfc, 0x83, + 0xb2, 0x87, 0xab, 0xd1, 0xc7, 0x91, 0x69, 0x19, 0xf2, 0xd1, 0xad, 0x88, 0x81, 0x62, 0x19, 0xf5, + 0x21, 0x25, 0xd3, 0xf3, 0x43, 0xca, 0x45, 0x30, 0xe4, 0xc5, 0xa3, 0xde, 0x3c, 0xe3, 0xf2, 0xe9, + 0x2e, 0xa7, 0x72, 0xae, 0xeb, 0x07, 0x7c, 0x7e, 0x95, 0x93, 0x5c, 0xd7, 0x0f, 0x10, 0xa7, 0x16, + 0xff, 0xaa, 0x81, 0x6e, 0xff, 0x74, 0x05, 0x2f, 0x88, 0x11, 0x5e, 0x62, 0x2e, 0x16, 0x8d, 0xef, + 0x60, 0x03, 0x8c, 0x50, 0xb1, 0x2a, 0x19, 0xf5, 0xed, 0xfb, 0x8c, 0x7a, 0x3a, 0x46, 0xa2, 0x77, + 0x88, 0xa8, 0x11, 0x18, 0x0b, 0x7c, 0x15, 0x97, 0x43, 0xc7, 0x90, 0x53, 0xdd, 0x71, 0x11, 0xf8, + 0xd5, 0x15, 0x41, 0x43, 0x8a, 0x5b, 0xbe, 0xfa, 0xd1, 0x9d, 0xf9, 0x33, 0x1f, 0xdf, 0x99, 0x3f, + 0xf3, 0xc9, 0x9d, 0xf9, 0x33, 0xdf, 0x6e, 0xcd, 0x6b, 0x1f, 0xb5, 0xe6, 0xb5, 0x8f, 0x5b, 0xf3, + 0xda, 0x27, 0xad, 0x79, 0xed, 0x1f, 0xad, 0x79, 0xed, 0xa7, 0xff, 0x9c, 0x3f, 0xf3, 0xf5, 0x11, + 0x89, 0xff, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc6, 0xe5, 0x77, 0xcb, 0x0a, 0x2d, 0x00, 0x00, } func (m *ConversionRequest) Marshal() (dAtA []byte, err error) { @@ -1603,6 +1606,21 @@ func (m *CustomResourceDefinitionVersion) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l + if m.DeprecationWarning != nil { + i -= len(*m.DeprecationWarning) + copy(dAtA[i:], *m.DeprecationWarning) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.DeprecationWarning))) + i-- + dAtA[i] = 0x42 + } + i-- + if m.Deprecated { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 if len(m.AdditionalPrinterColumns) > 0 { for iNdEx := len(m.AdditionalPrinterColumns) - 1; iNdEx >= 0; iNdEx-- { { @@ -2896,6 +2914,11 @@ func (m *CustomResourceDefinitionVersion) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + n += 2 + if m.DeprecationWarning != nil { + l = len(*m.DeprecationWarning) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -3442,6 +3465,8 @@ func (this *CustomResourceDefinitionVersion) String() string { `Schema:` + strings.Replace(this.Schema.String(), "CustomResourceValidation", "CustomResourceValidation", 1) + `,`, `Subresources:` + strings.Replace(this.Subresources.String(), "CustomResourceSubresources", "CustomResourceSubresources", 1) + `,`, `AdditionalPrinterColumns:` + repeatedStringForAdditionalPrinterColumns + `,`, + `Deprecated:` + fmt.Sprintf("%v", this.Deprecated) + `,`, + `DeprecationWarning:` + valueToStringGenerated(this.DeprecationWarning) + `,`, `}`, }, "") return s @@ -5974,6 +5999,59 @@ func (m *CustomResourceDefinitionVersion) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Deprecated", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Deprecated = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeprecationWarning", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.DeprecationWarning = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto index 1a89f292991..8a1f7b957c0 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto @@ -130,7 +130,7 @@ message CustomResourceConversion { // CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format // <.spec.name>.<.spec.group>. -// Deprecated in v1.16, planned for removal in v1.19. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead. +// Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead. message CustomResourceDefinition { optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -310,6 +310,19 @@ message CustomResourceDefinitionVersion { // There must be exactly one version with storage=true. optional bool storage = 3; + // deprecated indicates this version of the custom resource API is deprecated. + // When set to true, API requests to this version receive a warning header in the server response. + // Defaults to false. + // +optional + optional bool deprecated = 7; + + // deprecationWarning overrides the default warning returned to API clients. + // May only be set when `deprecated` is true. + // The default warning indicates this version is deprecated and recommends use + // of the newest served version of equal or greater stability, if one exists. + // +optional + optional string deprecationWarning = 8; + // schema describes the schema used for validation and pruning of this version of the custom resource. // Top-level and per-version schemas are mutually exclusive. // Per-version schemas must not all be set to identical values (top-level validation schema should be used instead). diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go index 9d3d995f49d..806c68aa6c1 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go @@ -200,6 +200,17 @@ type CustomResourceDefinitionVersion struct { // storage indicates this version should be used when persisting custom resources to storage. // There must be exactly one version with storage=true. Storage bool `json:"storage" protobuf:"varint,3,opt,name=storage"` + // deprecated indicates this version of the custom resource API is deprecated. + // When set to true, API requests to this version receive a warning header in the server response. + // Defaults to false. + // +optional + Deprecated bool `json:"deprecated,omitempty" protobuf:"varint,7,opt,name=deprecated"` + // deprecationWarning overrides the default warning returned to API clients. + // May only be set when `deprecated` is true. + // The default warning indicates this version is deprecated and recommends use + // of the newest served version of equal or greater stability, if one exists. + // +optional + DeprecationWarning *string `json:"deprecationWarning,omitempty" protobuf:"bytes,8,opt,name=deprecationWarning"` // schema describes the schema used for validation and pruning of this version of the custom resource. // Top-level and per-version schemas are mutually exclusive. // Per-version schemas must not all be set to identical values (top-level validation schema should be used instead). @@ -374,10 +385,14 @@ const CustomResourceCleanupFinalizer = "customresourcecleanup.apiextensions.k8s. // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.7 +// +k8s:prerelease-lifecycle-gen:deprecated=1.16 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=apiextensions.k8s.io,v1,CustomResourceDefinition // CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format // <.spec.name>.<.spec.group>. -// Deprecated in v1.16, planned for removal in v1.19. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead. +// Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead. type CustomResourceDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -390,6 +405,10 @@ type CustomResourceDefinition struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.7 +// +k8s:prerelease-lifecycle-gen:deprecated=1.16 +// +k8s:prerelease-lifecycle-gen:removed=1.22 +// +k8s:prerelease-lifecycle-gen:replacement=apiextensions.k8s.io,v1,CustomResourceDefinitionList // CustomResourceDefinitionList is a list of CustomResourceDefinition objects. type CustomResourceDefinitionList struct { @@ -454,6 +473,11 @@ type CustomResourceSubresourceScale struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.13 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// This API is never served. It is used for outbound requests from apiservers. This will ensure it never gets served accidentally +// and having the generator against this group will protect future APIs which may be served. +// +k8s:prerelease-lifecycle-gen:replacement=apiextensions.k8s.io,v1,ConversionReview // ConversionReview describes a conversion request/response. type ConversionReview struct { diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go index 95d430c52e1..322b4d28cf1 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go @@ -577,6 +577,8 @@ func autoConvert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_Custom out.Name = in.Name out.Served = in.Served out.Storage = in.Storage + out.Deprecated = in.Deprecated + out.DeprecationWarning = (*string)(unsafe.Pointer(in.DeprecationWarning)) if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(apiextensions.CustomResourceValidation) @@ -600,6 +602,8 @@ func autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_Custom out.Name = in.Name out.Served = in.Served out.Storage = in.Storage + out.Deprecated = in.Deprecated + out.DeprecationWarning = (*string)(unsafe.Pointer(in.DeprecationWarning)) if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(CustomResourceValidation) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go index 82bbb2be4c3..b39a5900f89 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go @@ -333,6 +333,11 @@ func (in *CustomResourceDefinitionStatus) DeepCopy() *CustomResourceDefinitionSt // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefinitionVersion) { *out = *in + if in.DeprecationWarning != nil { + in, out := &in.DeprecationWarning, &out.DeprecationWarning + *out = new(string) + **out = **in + } if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(CustomResourceValidation) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..7b73b9cf244 --- /dev/null +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,97 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ConversionReview) APILifecycleIntroduced() (major, minor int) { + return 1, 13 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ConversionReview) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ConversionReview) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "ConversionReview"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ConversionReview) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CustomResourceDefinition) APILifecycleIntroduced() (major, minor int) { + return 1, 7 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *CustomResourceDefinition) APILifecycleDeprecated() (major, minor int) { + return 1, 16 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *CustomResourceDefinition) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "CustomResourceDefinition"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *CustomResourceDefinition) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *CustomResourceDefinitionList) APILifecycleIntroduced() (major, minor int) { + return 1, 7 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *CustomResourceDefinitionList) APILifecycleDeprecated() (major, minor int) { + return 1, 16 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *CustomResourceDefinitionList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "CustomResourceDefinitionList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *CustomResourceDefinitionList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go index 82e4e9d15dd..e25dd1e7a72 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go @@ -20,6 +20,8 @@ import ( "fmt" "reflect" "strings" + "unicode" + "unicode/utf8" "k8s.io/apiextensions-apiserver/pkg/apihelpers" structuraldefaulting "k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting" @@ -55,8 +57,10 @@ func ValidateCustomResourceDefinition(obj *apiextensions.CustomResourceDefinitio return ret } + allowDefaults, rejectDefaultsReason := allowDefaults(requestGV, nil) opts := validationOptions{ - allowDefaults: allowDefaults(requestGV, nil), + allowDefaults: allowDefaults, + disallowDefaultsReason: rejectDefaultsReason, requireRecognizedConversionReviewVersion: true, requireImmutableNames: false, requireOpenAPISchema: requireOpenAPISchema(requestGV, nil), @@ -80,6 +84,8 @@ func ValidateCustomResourceDefinition(obj *apiextensions.CustomResourceDefinitio type validationOptions struct { // allowDefaults permits the validation schema to contain default attributes allowDefaults bool + // disallowDefaultsReason gives a reason as to why allowDefaults is false (for better user feedback) + disallowDefaultsReason string // requireRecognizedConversionReviewVersion requires accepted webhook conversion versions to contain a recognized version requireRecognizedConversionReviewVersion bool // requireImmutableNames disables changing spec.names @@ -102,8 +108,10 @@ type validationOptions struct { // ValidateCustomResourceDefinitionUpdate statically validates func ValidateCustomResourceDefinitionUpdate(obj, oldObj *apiextensions.CustomResourceDefinition, requestGV schema.GroupVersion) field.ErrorList { + allowDefaults, rejectDefaultsReason := allowDefaults(requestGV, &oldObj.Spec) opts := validationOptions{ - allowDefaults: allowDefaults(requestGV, &oldObj.Spec), + allowDefaults: allowDefaults, + disallowDefaultsReason: rejectDefaultsReason, requireRecognizedConversionReviewVersion: oldObj.Spec.Conversion == nil || hasValidConversionReviewVersionOrEmpty(oldObj.Spec.Conversion.ConversionReviewVersions), requireImmutableNames: apiextensions.IsCRDConditionTrue(oldObj, apiextensions.Established), requireOpenAPISchema: requireOpenAPISchema(requestGV, &oldObj.Spec), @@ -160,6 +168,9 @@ func ValidateUpdateCustomResourceDefinitionStatus(obj, oldObj *apiextensions.Cus // validateCustomResourceDefinitionVersion statically validates. func validateCustomResourceDefinitionVersion(version *apiextensions.CustomResourceDefinitionVersion, fldPath *field.Path, statusEnabled bool, opts validationOptions) field.ErrorList { allErrs := field.ErrorList{} + for _, err := range validateDeprecationWarning(version.Deprecated, version.DeprecationWarning) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("deprecationWarning"), version.DeprecationWarning, err)) + } allErrs = append(allErrs, validateCustomResourceDefinitionValidation(version.Schema, statusEnabled, opts, fldPath.Child("schema"))...) allErrs = append(allErrs, ValidateCustomResourceDefinitionSubresources(version.Subresources, fldPath.Child("subresources"))...) for i := range version.AdditionalPrinterColumns { @@ -168,6 +179,36 @@ func validateCustomResourceDefinitionVersion(version *apiextensions.CustomResour return allErrs } +func validateDeprecationWarning(deprecated bool, deprecationWarning *string) []string { + if !deprecated && deprecationWarning != nil { + return []string{"can only be set for deprecated versions"} + } + if deprecationWarning == nil { + return nil + } + var errors []string + if len(*deprecationWarning) > 256 { + errors = append(errors, "must be <= 256 characters long") + } + if len(*deprecationWarning) == 0 { + errors = append(errors, "must not be an empty string") + } + for i, r := range *deprecationWarning { + if !unicode.IsPrint(r) { + errors = append(errors, fmt.Sprintf("must only contain printable UTF-8 characters; non-printable character found at index %d", i)) + break + } + if unicode.IsControl(r) { + errors = append(errors, fmt.Sprintf("must only contain printable UTF-8 characters; control character found at index %d", i)) + break + } + } + if !utf8.ValidString(*deprecationWarning) { + errors = append(errors, "must only contain printable UTF-8 characters") + } + return errors +} + func validateCustomResourceDefinitionSpec(spec *apiextensions.CustomResourceDefinitionSpec, opts validationOptions, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} @@ -661,6 +702,7 @@ func validateCustomResourceDefinitionValidation(customResourceValidation *apiext openAPIV3Schema := &specStandardValidatorV3{ allowDefaults: opts.allowDefaults, + disallowDefaultsReason: opts.disallowDefaultsReason, requireValidPropertyType: opts.requireValidPropertyType, } @@ -1110,16 +1152,17 @@ func allVersionsSpecifyOpenAPISchema(spec *apiextensions.CustomResourceDefinitio return true } -// allowDefaults returns true if the defaulting feature is enabled and the request group version allows adding defaults -func allowDefaults(requestGV schema.GroupVersion, oldCRDSpec *apiextensions.CustomResourceDefinitionSpec) bool { +// allowDefaults returns true if the defaulting feature is enabled and the request group version allows adding defaults, +// or false and a reason for the user if defaults are not allowed. +func allowDefaults(requestGV schema.GroupVersion, oldCRDSpec *apiextensions.CustomResourceDefinitionSpec) (bool, string) { if oldCRDSpec != nil && specHasDefaults(oldCRDSpec) { // don't tighten validation on existing persisted data - return true + return true, "" } if requestGV == apiextensionsv1beta1.SchemeGroupVersion { - return false + return false, "(cannot set default values in apiextensions.k8s.io/v1beta1 CRDs, must use apiextensions.k8s.io/v1)" } - return true + return true, "" } func specHasDefaults(spec *apiextensions.CustomResourceDefinitionSpec) bool { diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go index 682e6fd4cd8..ba9e31e9966 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go @@ -251,6 +251,11 @@ func (in *CustomResourceDefinitionStatus) DeepCopy() *CustomResourceDefinitionSt // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefinitionVersion) { *out = *in + if in.DeprecationWarning != nil { + in, out := &in.DeprecationWarning, &out.DeprecationWarning + *out = new(string) + **out = **in + } if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(CustomResourceValidation) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/BUILD b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/BUILD index 6dbc209028e..8dc93e25911 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/BUILD +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/BUILD @@ -83,6 +83,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/openapi:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/warning:go_default_library", "//staging/src/k8s.io/client-go/scale:go_default_library", "//staging/src/k8s.io/client-go/scale/scheme/autoscalingv1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", @@ -90,7 +91,7 @@ go_library( "//vendor/github.com/go-openapi/spec:go_default_library", "//vendor/github.com/go-openapi/strfmt:go_default_library", "//vendor/github.com/go-openapi/validate:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", ], ) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go index 390b5a4471b..65adf66194b 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go @@ -26,8 +26,6 @@ import ( v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - _ "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - _ "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions" externalinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions" "k8s.io/apiextensions-apiserver/pkg/controller/apiapproval" "k8s.io/apiextensions-apiserver/pkg/controller/establish" @@ -142,16 +140,22 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) if apiResourceConfig.VersionEnabled(v1beta1.SchemeGroupVersion) { storage := map[string]rest.Storage{} // customresourcedefinitions - customResourceDefintionStorage := customresourcedefinition.NewREST(Scheme, c.GenericConfig.RESTOptionsGetter) - storage["customresourcedefinitions"] = customResourceDefintionStorage - storage["customresourcedefinitions/status"] = customresourcedefinition.NewStatusREST(Scheme, customResourceDefintionStorage) + customResourceDefinitionStorage, err := customresourcedefinition.NewREST(Scheme, c.GenericConfig.RESTOptionsGetter) + if err != nil { + return nil, err + } + storage["customresourcedefinitions"] = customResourceDefinitionStorage + storage["customresourcedefinitions/status"] = customresourcedefinition.NewStatusREST(Scheme, customResourceDefinitionStorage) apiGroupInfo.VersionedResourcesStorageMap[v1beta1.SchemeGroupVersion.Version] = storage } if apiResourceConfig.VersionEnabled(v1.SchemeGroupVersion) { storage := map[string]rest.Storage{} // customresourcedefinitions - customResourceDefintionStorage := customresourcedefinition.NewREST(Scheme, c.GenericConfig.RESTOptionsGetter) + customResourceDefintionStorage, err := customresourcedefinition.NewREST(Scheme, c.GenericConfig.RESTOptionsGetter) + if err != nil { + return nil, err + } storage["customresourcedefinitions"] = customResourceDefintionStorage storage["customresourcedefinitions/status"] = customresourcedefinition.NewStatusREST(Scheme, customResourceDefintionStorage) @@ -207,7 +211,7 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) s.GenericAPIServer.Handler.NonGoRestfulMux.Handle("/apis", crdHandler) s.GenericAPIServer.Handler.NonGoRestfulMux.HandlePrefix("/apis/", crdHandler) - crdController := NewDiscoveryController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), versionDiscoveryHandler, groupDiscoveryHandler) + discoveryController := NewDiscoveryController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), versionDiscoveryHandler, groupDiscoveryHandler) namingController := status.NewNamingConditionController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), crdClient.ApiextensionsV1()) nonStructuralSchemaController := nonstructuralschema.NewConditionController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), crdClient.ApiextensionsV1()) apiApprovalController := apiapproval.NewKubernetesAPIApprovalPolicyConformantConditionController(s.Informers.Apiextensions().V1().CustomResourceDefinitions(), crdClient.ApiextensionsV1()) @@ -231,12 +235,19 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) go openapiController.Run(s.GenericAPIServer.StaticOpenAPISpec, s.GenericAPIServer.OpenAPIVersionedService, context.StopCh) } - go crdController.Run(context.StopCh) go namingController.Run(context.StopCh) go establishingController.Run(context.StopCh) go nonStructuralSchemaController.Run(5, context.StopCh) go apiApprovalController.Run(5, context.StopCh) go finalizingController.Run(5, context.StopCh) + + discoverySyncedCh := make(chan struct{}) + go discoveryController.Run(context.StopCh, discoverySyncedCh) + select { + case <-context.StopCh: + case <-discoverySyncedCh: + } + return nil }) // we don't want to report healthy until we can handle all CRDs that have already been registered. Waiting for the informer diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go index f897abd9ac5..090274c6330 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go @@ -21,7 +21,7 @@ import ( "sort" "time" - "k8s.io/klog" + "k8s.io/klog/v2" autoscaling "k8s.io/api/autoscaling/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -201,7 +201,7 @@ func sortGroupDiscoveryByKubeAwareVersion(gd []metav1.GroupVersionForDiscovery) }) } -func (c *DiscoveryController) Run(stopCh <-chan struct{}) { +func (c *DiscoveryController) Run(stopCh <-chan struct{}, synchedCh chan<- struct{}) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() defer klog.Infof("Shutting down DiscoveryController") @@ -213,6 +213,31 @@ func (c *DiscoveryController) Run(stopCh <-chan struct{}) { return } + // initially sync all group versions to make sure we serve complete discovery + if err := wait.PollImmediateUntil(time.Second, func() (bool, error) { + crds, err := c.crdLister.List(labels.Everything()) + if err != nil { + utilruntime.HandleError(fmt.Errorf("failed to initially list CRDs: %v", err)) + return false, nil + } + for _, crd := range crds { + for _, v := range crd.Spec.Versions { + gv := schema.GroupVersion{crd.Spec.Group, v.Name} + if err := c.sync(gv); err != nil { + utilruntime.HandleError(fmt.Errorf("failed to initially sync CRD version %v: %v", gv, err)) + return false, nil + } + } + } + return true, nil + }, stopCh); err == wait.ErrWaitTimeout { + utilruntime.HandleError(fmt.Errorf("timed out waiting for discovery endpoint to initialize")) + return + } else if err != nil { + panic(fmt.Errorf("unexpected error: %v", err)) + } + close(synchedCh) + // only start one worker thread since its a slow moving API go wait.Until(c.runWorker, time.Second, stopCh) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index fcaa954c942..36cc1982163 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -20,6 +20,7 @@ import ( "fmt" "net/http" "path" + "sort" "strings" "sync" "sync/atomic" @@ -63,6 +64,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" utilwaitgroup "k8s.io/apimachinery/pkg/util/waitgroup" + "k8s.io/apimachinery/pkg/version" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/endpoints/handlers" @@ -78,10 +80,11 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" utilopenapi "k8s.io/apiserver/pkg/util/openapi" "k8s.io/apiserver/pkg/util/webhook" + "k8s.io/apiserver/pkg/warning" "k8s.io/client-go/scale" "k8s.io/client-go/scale/scheme/autoscalingv1" "k8s.io/client-go/tools/cache" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/util/proto" ) @@ -139,6 +142,12 @@ type crdInfo struct { spec *apiextensionsv1.CustomResourceDefinitionSpec acceptedNames *apiextensionsv1.CustomResourceDefinitionNames + // Deprecated per version + deprecated map[string]bool + + // Warnings per version + warnings map[string][]string + // Storage per version storages map[string]customresource.CustomResourceStorage @@ -323,6 +332,11 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { return } + deprecated := crdInfo.deprecated[requestInfo.APIVersion] + for _, w := range crdInfo.warnings[requestInfo.APIVersion] { + warning.AddWarning(req.Context(), "", w) + } + verb := strings.ToUpper(requestInfo.Verb) resource := requestInfo.Resource subresource := requestInfo.Subresource @@ -360,7 +374,7 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { } if handlerFunc != nil { - handlerFunc = metrics.InstrumentHandlerFunc(verb, requestInfo.APIGroup, requestInfo.APIVersion, resource, subresource, scope, metrics.APIServerComponent, handlerFunc) + handlerFunc = metrics.InstrumentHandlerFunc(verb, requestInfo.APIGroup, requestInfo.APIVersion, resource, subresource, scope, metrics.APIServerComponent, deprecated, "", handlerFunc) handler := genericfilters.WithWaitGroup(handlerFunc, longRunningFilter, crdInfo.waitGroup) handler.ServeHTTP(w, req) return @@ -610,6 +624,8 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd storages := map[string]customresource.CustomResourceStorage{} statusScopes := map[string]*handlers.RequestScope{} scaleScopes := map[string]*handlers.RequestScope{} + deprecated := map[string]bool{} + warnings := map[string][]string{} equivalentResourceRegistry := runtime.NewEquivalentResourceRegistry() @@ -868,6 +884,17 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd SelfLinkPathSuffix: "/status", } statusScopes[v.Name] = &statusScope + + if v.Deprecated { + deprecated[v.Name] = true + if utilfeature.DefaultFeatureGate.Enabled(features.WarningHeaders) { + if v.DeprecationWarning != nil { + warnings[v.Name] = append(warnings[v.Name], *v.DeprecationWarning) + } else { + warnings[v.Name] = append(warnings[v.Name], defaultDeprecationWarning(v.Name, crd.Spec)) + } + } + } } ret := &crdInfo{ @@ -877,6 +904,8 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd requestScopes: requestScopes, scaleRequestScopes: scaleScopes, statusRequestScopes: statusScopes, + deprecated: deprecated, + warnings: warnings, storageVersion: storageVersion, waitGroup: &utilwaitgroup.SafeWaitGroup{}, } @@ -891,6 +920,25 @@ func (r *crdHandler) getOrCreateServingInfoFor(uid types.UID, name string) (*crd return ret, nil } +func defaultDeprecationWarning(deprecatedVersion string, crd apiextensionsv1.CustomResourceDefinitionSpec) string { + msg := fmt.Sprintf("%s/%s %s is deprecated", crd.Group, deprecatedVersion, crd.Names.Kind) + + var servedNonDeprecatedVersions []string + for _, v := range crd.Versions { + if v.Served && !v.Deprecated && version.CompareKubeAwareVersionStrings(deprecatedVersion, v.Name) < 0 { + servedNonDeprecatedVersions = append(servedNonDeprecatedVersions, v.Name) + } + } + if len(servedNonDeprecatedVersions) == 0 { + return msg + } + sort.Slice(servedNonDeprecatedVersions, func(i, j int) bool { + return version.CompareKubeAwareVersionStrings(servedNonDeprecatedVersions[i], servedNonDeprecatedVersions[j]) > 0 + }) + msg += fmt.Sprintf("; use %s/%s %s", crd.Group, servedNonDeprecatedVersions[0], crd.Names.Kind) + return msg +} + type unstructuredNegotiatedSerializer struct { typer runtime.ObjectTyper creator runtime.ObjectCreater @@ -1018,7 +1066,7 @@ func (t CRDRESTOptionsGetter) GetRESTOptions(resource schema.GroupResource) (gen CountMetricPollPeriod: t.CountMetricPollPeriod, } if t.EnableWatchCache { - ret.Decorator = genericregistry.StorageWithCacher(t.DefaultWatchCacheSize) + ret.Decorator = genericregistry.StorageWithCacher() } return ret, nil } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/customresourcedefinition.go index 683ce9498be..d83c58bc629 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/customresourcedefinition.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/customresourcedefinition.go @@ -26,10 +26,13 @@ import ( ) // CustomResourceDefinitionLister helps list CustomResourceDefinitions. +// All objects returned here must be treated as read-only. type CustomResourceDefinitionLister interface { // List lists all CustomResourceDefinitions in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.CustomResourceDefinition, err error) // Get retrieves the CustomResourceDefinition from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.CustomResourceDefinition, error) CustomResourceDefinitionListerExpansion } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go index 87633217b08..c57fd40d8fe 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go @@ -26,10 +26,13 @@ import ( ) // CustomResourceDefinitionLister helps list CustomResourceDefinitions. +// All objects returned here must be treated as read-only. type CustomResourceDefinitionLister interface { // List lists all CustomResourceDefinitions in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CustomResourceDefinition, err error) // Get retrieves the CustomResourceDefinition from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.CustomResourceDefinition, error) CustomResourceDefinitionListerExpansion } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/cmd/server/options/options.go b/vendor/k8s.io/apiextensions-apiserver/pkg/cmd/server/options/options.go index 786dc60ab53..895a8ebfe6e 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/cmd/server/options/options.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/cmd/server/options/options.go @@ -24,7 +24,7 @@ import ( "github.com/spf13/pflag" - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" "k8s.io/apiextensions-apiserver/pkg/apiserver" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -54,7 +54,6 @@ func NewCustomResourceDefinitionsServerOptions(out, errOut io.Writer) *CustomRes RecommendedOptions: genericoptions.NewRecommendedOptions( defaultEtcdPathPrefix, apiserver.Codecs.LegacyCodec(v1beta1.SchemeGroupVersion, v1.SchemeGroupVersion), - genericoptions.NewProcessInfo("apiextensions-apiserver", "kube-system"), ), APIEnablement: genericoptions.NewAPIEnablementOptions(), diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/BUILD b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/BUILD index 9cf3259c219..66189d0490a 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/BUILD +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/BUILD @@ -18,7 +18,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/apiapproval_controller.go b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/apiapproval_controller.go index c0becc5697f..7bc0b2db0af 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/apiapproval_controller.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/apiapproval/apiapproval_controller.go @@ -33,7 +33,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" ) // KubernetesAPIApprovalPolicyConformantConditionController is maintaining the KubernetesAPIApprovalPolicyConformant condition. diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/establish/BUILD b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/establish/BUILD index 6b1f1a3343a..423d7725bce 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/establish/BUILD +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/establish/BUILD @@ -18,7 +18,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go index 659bc3286d7..5899a5625a4 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" apiextensionshelpers "k8s.io/apiextensions-apiserver/pkg/apihelpers" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/BUILD b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/BUILD index 3eff24761bb..acb77b3c4a1 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/BUILD +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/BUILD @@ -29,7 +29,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/crd_finalizer.go b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/crd_finalizer.go index 0fa93967b49..4ccd33cd336 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/crd_finalizer.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/crd_finalizer.go @@ -22,7 +22,7 @@ import ( "reflect" "time" - "k8s.io/klog" + "k8s.io/klog/v2" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/BUILD b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/BUILD index ca76db38507..147a964f2c8 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/BUILD +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/BUILD @@ -21,7 +21,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/nonstructuralschema_controller.go b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/nonstructuralschema_controller.go index 06531ad755c..9d4d9acb534 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/nonstructuralschema_controller.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/nonstructuralschema/nonstructuralschema_controller.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" apiextensionshelpers "k8s.io/apiextensions-apiserver/pkg/apihelpers" apiextensionsinternal "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/BUILD b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/BUILD index 539cd295801..c74e0752bca 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/BUILD +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/handler:go_default_library", ], ) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go index 06dfc7f1add..d0a36f597e3 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go @@ -50,6 +50,7 @@ import ( const ( // Reference and Go types for built-in metadata objectMetaSchemaRef = "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + listMetaSchemaRef = "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" listMetaType = "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta" typeMetaType = "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta" @@ -57,7 +58,8 @@ const ( ) var ( - swaggerPartialObjectMetadataDescriptions = metav1beta1.PartialObjectMetadata{}.SwaggerDoc() + swaggerPartialObjectMetadataDescriptions = metav1beta1.PartialObjectMetadata{}.SwaggerDoc() + swaggerPartialObjectMetadataListDescriptions = metav1beta1.PartialObjectMetadataList{}.SwaggerDoc() nameToken = "{name}" namespaceToken = "{namespace}" @@ -457,7 +459,8 @@ func (b *builder) buildListSchema() *spec.Schema { s := new(spec.Schema).WithDescription(fmt.Sprintf("%s is a list of %s", b.listKind, b.kind)). WithRequired("items"). SetProperty("items", *spec.ArrayProperty(spec.RefSchema(name)).WithDescription(doc)). - SetProperty("metadata", getDefinition(listMetaType)) + SetProperty("metadata", *spec.RefSchema(listMetaSchemaRef).WithDescription(swaggerPartialObjectMetadataListDescriptions["metadata"])) + addTypeMetaProperties(s) s.AddExtension(endpoints.ROUTE_META_GVK, []map[string]string{ { diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go index 06bd37a318f..eae81724108 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/controller.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/handler" apiextensionshelpers "k8s.io/apiextensions-apiserver/pkg/apihelpers" diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/v2/BUILD b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/v2/BUILD index 71274252b2d..a078e5a337d 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/v2/BUILD +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/v2/BUILD @@ -20,8 +20,8 @@ go_test( "//vendor/github.com/go-openapi/spec:go_default_library", "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", "//vendor/github.com/googleapis/gnostic/compiler:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", "//vendor/gopkg.in/yaml.v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", ], diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/status/BUILD b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/status/BUILD index 4de81d6ee00..702ae9aab83 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/status/BUILD +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/status/BUILD @@ -40,7 +40,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go index d621f847488..170304ead0a 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go @@ -23,7 +23,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go b/vendor/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go index f23b148e9c3..c049006d656 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/generated/openapi/zz_generated.openapi.go @@ -54,6 +54,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), @@ -1208,6 +1209,63 @@ func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.Op } } +func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Condition contains details for one aspect of the current state of this API Resource.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type of condition in CamelCase or in foo.example.com/CamelCase.", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status of the condition, one of True, False, Unknown.", + Type: []string{"string"}, + Format: "", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "message is a human readable message indicating details about the transition. This may be an empty string.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status", "lastTransitionTime", "reason", "message"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + func schema_pkg_apis_meta_v1_CreateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -1414,7 +1472,7 @@ func schema_pkg_apis_meta_v1_GetOptions(ref common.ReferenceCallback) common.Ope }, "resourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", Type: []string{"string"}, Format: "", }, @@ -1855,7 +1913,14 @@ func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.Op }, "resourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceVersionMatch": { + SchemaProps: spec.SchemaProps{ + Description: "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", Type: []string{"string"}, Format: "", }, @@ -1977,7 +2042,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, "namespace": { SchemaProps: spec.SchemaProps{ - Description: "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + Description: "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", Type: []string{"string"}, Format: "", }, diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go index 9cf040b9de7..551176ec60f 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go @@ -79,9 +79,7 @@ func (a customResourceStrategy) PrepareForCreate(ctx context.Context, obj runtim customResource := customResourceObject.UnstructuredContent() // create cannot set status - if _, ok := customResource["status"]; ok { - delete(customResource, "status") - } + delete(customResource, "status") } accessor, _ := meta.Accessor(obj) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/BUILD b/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/BUILD index 0eb833b5fd8..01cdba16bc9 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/BUILD +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/BUILD @@ -37,6 +37,7 @@ go_test( embed = [":go_default_library"], deps = [ "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go b/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go index 0368678e120..06a3fac6c9a 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go @@ -38,7 +38,7 @@ type REST struct { } // NewREST returns a RESTStorage object that will work against API services. -func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) *REST { +func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) (*REST, error) { strategy := NewStrategy(scheme) store := &genericregistry.Store{ @@ -50,12 +50,15 @@ func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) *REST CreateStrategy: strategy, UpdateStrategy: strategy, DeleteStrategy: strategy, + + // TODO: define table converter that exposes more than name/creation timestamp + TableConvertor: rest.NewDefaultTableConvertor(apiextensions.Resource("customresourcedefinitions")), } options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: GetAttrs} if err := store.CompleteWithOptions(options); err != nil { - panic(err) // TODO: Propagate error up + return nil, err } - return &REST{store} + return &REST{store}, nil } // Implement ShortNamesProvider diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS index 435297a8d51..d18a17885b6 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS +++ b/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS @@ -17,9 +17,7 @@ reviewers: - saad-ali - janetkuo - tallclair -- eparis - dims - hongchaodeng - krousey - cjcullen -- david-mcmahon diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go index e53c3e61fd1..d3927d81738 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go +++ b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go @@ -18,6 +18,7 @@ package errors import ( "encoding/json" + "errors" "fmt" "net/http" "reflect" @@ -29,14 +30,6 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ) -const ( - // StatusTooManyRequests means the server experienced too many requests within a - // given window and that the client must wait to perform the action again. - // DEPRECATED: please use http.StatusTooManyRequests, this will be removed in - // the future version. - StatusTooManyRequests = http.StatusTooManyRequests -) - // StatusError is an error intended for consumption by a REST API server; it can also be // reconstructed by clients from a REST response. Public to allow easy type switches. type StatusError struct { @@ -483,127 +476,141 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource schema.Gr } // IsNotFound returns true if the specified error was created by NewNotFound. +// It supports wrapped errors. func IsNotFound(err error) bool { return ReasonForError(err) == metav1.StatusReasonNotFound } // IsAlreadyExists determines if the err is an error which indicates that a specified resource already exists. +// It supports wrapped errors. func IsAlreadyExists(err error) bool { return ReasonForError(err) == metav1.StatusReasonAlreadyExists } // IsConflict determines if the err is an error which indicates the provided update conflicts. +// It supports wrapped errors. func IsConflict(err error) bool { return ReasonForError(err) == metav1.StatusReasonConflict } // IsInvalid determines if the err is an error which indicates the provided resource is not valid. +// It supports wrapped errors. func IsInvalid(err error) bool { return ReasonForError(err) == metav1.StatusReasonInvalid } // IsGone is true if the error indicates the requested resource is no longer available. +// It supports wrapped errors. func IsGone(err error) bool { return ReasonForError(err) == metav1.StatusReasonGone } // IsResourceExpired is true if the error indicates the resource has expired and the current action is // no longer possible. +// It supports wrapped errors. func IsResourceExpired(err error) bool { return ReasonForError(err) == metav1.StatusReasonExpired } // IsNotAcceptable determines if err is an error which indicates that the request failed due to an invalid Accept header +// It supports wrapped errors. func IsNotAcceptable(err error) bool { return ReasonForError(err) == metav1.StatusReasonNotAcceptable } // IsUnsupportedMediaType determines if err is an error which indicates that the request failed due to an invalid Content-Type header +// It supports wrapped errors. func IsUnsupportedMediaType(err error) bool { return ReasonForError(err) == metav1.StatusReasonUnsupportedMediaType } // IsMethodNotSupported determines if the err is an error which indicates the provided action could not // be performed because it is not supported by the server. +// It supports wrapped errors. func IsMethodNotSupported(err error) bool { return ReasonForError(err) == metav1.StatusReasonMethodNotAllowed } // IsServiceUnavailable is true if the error indicates the underlying service is no longer available. +// It supports wrapped errors. func IsServiceUnavailable(err error) bool { return ReasonForError(err) == metav1.StatusReasonServiceUnavailable } // IsBadRequest determines if err is an error which indicates that the request is invalid. +// It supports wrapped errors. func IsBadRequest(err error) bool { return ReasonForError(err) == metav1.StatusReasonBadRequest } // IsUnauthorized determines if err is an error which indicates that the request is unauthorized and // requires authentication by the user. +// It supports wrapped errors. func IsUnauthorized(err error) bool { return ReasonForError(err) == metav1.StatusReasonUnauthorized } // IsForbidden determines if err is an error which indicates that the request is forbidden and cannot // be completed as requested. +// It supports wrapped errors. func IsForbidden(err error) bool { return ReasonForError(err) == metav1.StatusReasonForbidden } // IsTimeout determines if err is an error which indicates that request times out due to long // processing. +// It supports wrapped errors. func IsTimeout(err error) bool { return ReasonForError(err) == metav1.StatusReasonTimeout } // IsServerTimeout determines if err is an error which indicates that the request needs to be retried // by the client. +// It supports wrapped errors. func IsServerTimeout(err error) bool { return ReasonForError(err) == metav1.StatusReasonServerTimeout } // IsInternalError determines if err is an error which indicates an internal server error. +// It supports wrapped errors. func IsInternalError(err error) bool { return ReasonForError(err) == metav1.StatusReasonInternalError } // IsTooManyRequests determines if err is an error which indicates that there are too many requests // that the server cannot handle. +// It supports wrapped errors. func IsTooManyRequests(err error) bool { if ReasonForError(err) == metav1.StatusReasonTooManyRequests { return true } - switch t := err.(type) { - case APIStatus: - return t.Status().Code == http.StatusTooManyRequests + if status := APIStatus(nil); errors.As(err, &status) { + return status.Status().Code == http.StatusTooManyRequests } return false } // IsRequestEntityTooLargeError determines if err is an error which indicates // the request entity is too large. +// It supports wrapped errors. func IsRequestEntityTooLargeError(err error) bool { if ReasonForError(err) == metav1.StatusReasonRequestEntityTooLarge { return true } - switch t := err.(type) { - case APIStatus: - return t.Status().Code == http.StatusRequestEntityTooLarge + if status := APIStatus(nil); errors.As(err, &status) { + return status.Status().Code == http.StatusRequestEntityTooLarge } return false } // IsUnexpectedServerError returns true if the server response was not in the expected API format, // and may be the result of another HTTP actor. +// It supports wrapped errors. func IsUnexpectedServerError(err error) bool { - switch t := err.(type) { - case APIStatus: - if d := t.Status().Details; d != nil { - for _, cause := range d.Causes { - if cause.Type == metav1.CauseTypeUnexpectedServerResponse { - return true - } + if status := APIStatus(nil); errors.As(err, &status) && status.Status().Details != nil { + for _, cause := range status.Status().Details.Causes { + if cause.Type == metav1.CauseTypeUnexpectedServerResponse { + return true } } } @@ -611,38 +618,37 @@ func IsUnexpectedServerError(err error) bool { } // IsUnexpectedObjectError determines if err is due to an unexpected object from the master. +// It supports wrapped errors. func IsUnexpectedObjectError(err error) bool { - _, ok := err.(*UnexpectedObjectError) - return err != nil && ok + uoe := &UnexpectedObjectError{} + return err != nil && errors.As(err, &uoe) } // SuggestsClientDelay returns true if this error suggests a client delay as well as the // suggested seconds to wait, or false if the error does not imply a wait. It does not // address whether the error *should* be retried, since some errors (like a 3xx) may // request delay without retry. +// It supports wrapped errors. func SuggestsClientDelay(err error) (int, bool) { - switch t := err.(type) { - case APIStatus: - if t.Status().Details != nil { - switch t.Status().Reason { - // this StatusReason explicitly requests the caller to delay the action - case metav1.StatusReasonServerTimeout: - return int(t.Status().Details.RetryAfterSeconds), true - } - // If the client requests that we retry after a certain number of seconds - if t.Status().Details.RetryAfterSeconds > 0 { - return int(t.Status().Details.RetryAfterSeconds), true - } + if t := APIStatus(nil); errors.As(err, &t) && t.Status().Details != nil { + switch t.Status().Reason { + // this StatusReason explicitly requests the caller to delay the action + case metav1.StatusReasonServerTimeout: + return int(t.Status().Details.RetryAfterSeconds), true + } + // If the client requests that we retry after a certain number of seconds + if t.Status().Details.RetryAfterSeconds > 0 { + return int(t.Status().Details.RetryAfterSeconds), true } } return 0, false } // ReasonForError returns the HTTP status for a particular error. +// It supports wrapped errors. func ReasonForError(err error) metav1.StatusReason { - switch t := err.(type) { - case APIStatus: - return t.Status().Reason + if status := APIStatus(nil); errors.As(err, &status) { + return status.Status().Reason } return metav1.StatusReasonUnknown } diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/BUILD b/vendor/k8s.io/apimachinery/pkg/api/meta/BUILD index a424f4839d5..9d8aa0c2454 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/BUILD @@ -9,6 +9,7 @@ load( go_test( name = "go_default_test", srcs = [ + "conditions_test.go", "meta_test.go", "multirestmapper_test.go", "priority_test.go", @@ -27,6 +28,7 @@ go_test( go_library( name = "go_default_library", srcs = [ + "conditions.go", "doc.go", "errors.go", "firsthit_restmapper.go", @@ -48,7 +50,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS index 96bccff1b23..68b8d353ca9 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS @@ -14,10 +14,8 @@ reviewers: - gmarek - janetkuo - ncdc -- eparis - dims - krousey - resouer -- david-mcmahon - mfojtik - jianhuiz diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/conditions.go b/vendor/k8s.io/apimachinery/pkg/api/meta/conditions.go new file mode 100644 index 00000000000..934790dcb16 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/conditions.go @@ -0,0 +1,101 @@ +/* +Copyright 2020 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 meta + +import ( + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// SetStatusCondition sets the corresponding condition in conditions to newCondition. +// conditions must be non-nil. +// 1. if the condition of the specified type already exists (all fields of the existing condition are updated to +// newCondition, LastTransitionTime is set to now if the new status differs from the old status) +// 2. if a condition of the specified type does not exist (LastTransitionTime is set to now() if unset, and newCondition is appended) +func SetStatusCondition(conditions *[]metav1.Condition, newCondition metav1.Condition) { + if conditions == nil { + return + } + existingCondition := FindStatusCondition(*conditions, newCondition.Type) + if existingCondition == nil { + if newCondition.LastTransitionTime.IsZero() { + newCondition.LastTransitionTime = metav1.NewTime(time.Now()) + } + *conditions = append(*conditions, newCondition) + return + } + + if existingCondition.Status != newCondition.Status { + existingCondition.Status = newCondition.Status + if !newCondition.LastTransitionTime.IsZero() { + existingCondition.LastTransitionTime = newCondition.LastTransitionTime + } else { + existingCondition.LastTransitionTime = metav1.NewTime(time.Now()) + } + } + + existingCondition.Reason = newCondition.Reason + existingCondition.Message = newCondition.Message +} + +// RemoveStatusCondition removes the corresponding conditionType from conditions. +// conditions must be non-nil. +func RemoveStatusCondition(conditions *[]metav1.Condition, conditionType string) { + if conditions == nil { + return + } + newConditions := make([]metav1.Condition, 0, len(*conditions)-1) + for _, condition := range *conditions { + if condition.Type != conditionType { + newConditions = append(newConditions, condition) + } + } + + *conditions = newConditions +} + +// FindStatusCondition finds the conditionType in conditions. +func FindStatusCondition(conditions []metav1.Condition, conditionType string) *metav1.Condition { + for i := range conditions { + if conditions[i].Type == conditionType { + return &conditions[i] + } + } + + return nil +} + +// IsStatusConditionTrue returns true when the conditionType is present and set to `metav1.ConditionTrue` +func IsStatusConditionTrue(conditions []metav1.Condition, conditionType string) bool { + return IsStatusConditionPresentAndEqual(conditions, conditionType, metav1.ConditionTrue) +} + +// IsStatusConditionFalse returns true when the conditionType is present and set to `metav1.ConditionFalse` +func IsStatusConditionFalse(conditions []metav1.Condition, conditionType string) bool { + return IsStatusConditionPresentAndEqual(conditions, conditionType, metav1.ConditionFalse) +} + +// IsStatusConditionPresentAndEqual returns true when conditionType is present and equal to status. +func IsStatusConditionPresentAndEqual(conditions []metav1.Condition, conditionType string, status metav1.ConditionStatus) bool { + for _, condition := range conditions { + if condition.Type == conditionType { + return condition.Status == status + } + } + return false +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go index fa4b767314c..9ca34c9fa9c 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // errNotList is returned when an object implements the Object style interfaces but not the List style diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS index dc7740190ae..7ac0fe11a1f 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS @@ -9,8 +9,5 @@ reviewers: - mikedanese - saad-ali - janetkuo -- tallclair -- eparis - xiang90 - mbohlool -- david-mcmahon diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/generic.go b/vendor/k8s.io/apimachinery/pkg/api/validation/generic.go index 348cdc0873b..947c96f4348 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/validation/generic.go +++ b/vendor/k8s.io/apimachinery/pkg/api/validation/generic.go @@ -23,6 +23,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ) +// IsNegativeErrorMsg is a error message for value must be greater than or equal to 0. const IsNegativeErrorMsg string = `must be greater than or equal to 0` // ValidateNameFunc validates that the provided name is valid for a given resource type. @@ -75,7 +76,7 @@ func maskTrailingDash(name string) string { return name } -// Validates that given value is not negative. +// ValidateNonnegativeField validates that given value is not negative. func ValidateNonnegativeField(value int64, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if value < 0 { diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go index 90f566b14f5..889ec69aab8 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go +++ b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go @@ -30,6 +30,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ) +// FieldImmutableErrorMsg is a error message for field is immutable. const FieldImmutableErrorMsg string = `field is immutable` const totalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB @@ -80,6 +81,7 @@ func validateOwnerReference(ownerReference metav1.OwnerReference, fldPath *field return allErrs } +// ValidateOwnerReferences validates that a set of owner references are correctly defined. func ValidateOwnerReferences(ownerReferences []metav1.OwnerReference, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} controllerName := "" @@ -97,7 +99,7 @@ func ValidateOwnerReferences(ownerReferences []metav1.OwnerReference, fldPath *f return allErrs } -// Validate finalizer names +// ValidateFinalizerName validates finalizer names. func ValidateFinalizerName(stringValue string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} for _, msg := range validation.IsQualifiedName(stringValue) { @@ -107,6 +109,7 @@ func ValidateFinalizerName(stringValue string, fldPath *field.Path) field.ErrorL return allErrs } +// ValidateNoNewFinalizers validates the new finalizers has no new finalizers compare to old finalizers. func ValidateNoNewFinalizers(newFinalizers []string, oldFinalizers []string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} extra := sets.NewString(newFinalizers...).Difference(sets.NewString(oldFinalizers...)) @@ -116,6 +119,7 @@ func ValidateNoNewFinalizers(newFinalizers []string, oldFinalizers []string, fld return allErrs } +// ValidateImmutableField validates the new value and the old value are deeply equal. func ValidateImmutableField(newVal, oldVal interface{}, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if !apiequality.Semantic.DeepEqual(oldVal, newVal) { @@ -137,7 +141,7 @@ func ValidateObjectMeta(objMeta *metav1.ObjectMeta, requiresNamespace bool, name return ValidateObjectMetaAccessor(metadata, requiresNamespace, nameFn, fldPath) } -// ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already +// ValidateObjectMetaAccessor validates an object's metadata on creation. It expects that name generation has already // been performed. // It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before. func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { @@ -208,7 +212,7 @@ func ValidateFinalizers(finalizers []string, fldPath *field.Path) field.ErrorLis return allErrs } -// ValidateObjectMetaUpdate validates an object's metadata when updated +// ValidateObjectMetaUpdate validates an object's metadata when updated. func ValidateObjectMetaUpdate(newMeta, oldMeta *metav1.ObjectMeta, fldPath *field.Path) field.ErrorList { newMetadata, err := meta.Accessor(newMeta) if err != nil { @@ -225,6 +229,7 @@ func ValidateObjectMetaUpdate(newMeta, oldMeta *metav1.ObjectMeta, fldPath *fiel return ValidateObjectMetaAccessorUpdate(newMetadata, oldMetadata, fldPath) } +// ValidateObjectMetaAccessorUpdate validates an object's metadata when updated. func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/path/name.go b/vendor/k8s.io/apimachinery/pkg/api/validation/path/name.go index a50cd089dfb..ffb9f56d800 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/validation/path/name.go +++ b/vendor/k8s.io/apimachinery/pkg/api/validation/path/name.go @@ -62,7 +62,7 @@ func IsValidPathSegmentPrefix(name string) []string { func ValidatePathSegmentName(name string, prefix bool) []string { if prefix { return IsValidPathSegmentPrefix(name) - } else { - return IsValidPathSegmentName(name) } + + return IsValidPathSegmentName(name) } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/BUILD b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/BUILD index 0fa9122633e..ffd176b28a7 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/BUILD @@ -36,6 +36,7 @@ filegroup( srcs = [ ":package-srcs", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme:all-srcs", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/validation:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go index ceb6452781d..ae39b74eb24 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go @@ -76,6 +76,9 @@ func addToGroupVersion(scheme *runtime.Scheme) error { &metav1.UpdateOptions{}) metav1.AddToGroupVersion(scheme, metav1.SchemeGroupVersion) + if err := metav1beta1.RegisterConversions(scheme); err != nil { + return err + } return nil } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go index 8d254416883..a49b5f2befc 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go @@ -44,13 +44,17 @@ type ListOptions struct { // If the feature gate WatchBookmarks is not enabled in apiserver, // this field is ignored. AllowWatchBookmarks bool - // When specified with a watch call, shows changes that occur after that particular version of a resource. - // Defaults to changes from the beginning of history. - // When specified for list: - // - if unset, then the result is returned from remote storage based on quorum-read flag; - // - if it's 0, then we simply return what we currently have in cache, no guarantee; - // - if set to non zero, then the result is at least as fresh as given rv. + // resourceVersion sets a constraint on what resource versions a request may be served from. + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for + // details. ResourceVersion string + // resourceVersionMatch determines how resourceVersion is applied to list calls. + // It is highly recommended that resourceVersionMatch be set for list calls where + // resourceVersion is set. + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for + // details. + ResourceVersionMatch metav1.ResourceVersionMatch + // Timeout for the list/watch call. TimeoutSeconds *int64 // Limit specifies the maximum number of results to return from the server. The server may diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/validation/BUILD b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/validation/BUILD similarity index 54% rename from vendor/k8s.io/kubernetes/pkg/apis/auditregistration/validation/BUILD rename to vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/validation/BUILD index 504e8299b7f..f18b5418e91 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/validation/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/validation/BUILD @@ -3,14 +3,13 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", srcs = ["validation.go"], - importpath = "k8s.io/kubernetes/pkg/apis/auditregistration/validation", + importmap = "k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/validation", + importpath = "k8s.io/apimachinery/pkg/apis/meta/internalversion/validation", visibility = ["//visibility:public"], deps = [ - "//pkg/apis/auditregistration:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/validation:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", ], ) @@ -19,11 +18,8 @@ go_test( srcs = ["validation_test.go"], embed = [":go_default_library"], deps = [ - "//pkg/apis/auditregistration:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/k8s.io/utils/pointer:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/validation/validation.go new file mode 100644 index 00000000000..8403d1a8616 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/validation/validation.go @@ -0,0 +1,46 @@ +/* +Copyright 2020 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 validation + +import ( + "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/validation/field" +) + +// ValidateListOptions returns all validation errors found while validating the ListOptions. +func ValidateListOptions(options *internalversion.ListOptions) field.ErrorList { + allErrs := field.ErrorList{} + if match := options.ResourceVersionMatch; len(match) > 0 { + if options.Watch { + allErrs = append(allErrs, field.Forbidden(field.NewPath("resourceVersionMatch"), "resourceVersionMatch is forbidden for watch")) + } + if len(options.ResourceVersion) == 0 { + allErrs = append(allErrs, field.Forbidden(field.NewPath("resourceVersionMatch"), "resourceVersionMatch is forbidden unless resourceVersion is provided")) + } + if len(options.Continue) > 0 { + allErrs = append(allErrs, field.Forbidden(field.NewPath("resourceVersionMatch"), "resourceVersionMatch is forbidden when continue is provided")) + } + if match != metav1.ResourceVersionMatchExact && match != metav1.ResourceVersionMatchNotOlderThan { + allErrs = append(allErrs, field.NotSupported(field.NewPath("resourceVersionMatch"), match, []string{string(metav1.ResourceVersionMatchExact), string(metav1.ResourceVersionMatchNotOlderThan), ""})) + } + if match == metav1.ResourceVersionMatchExact && options.ResourceVersion == "0" { + allErrs = append(allErrs, field.Forbidden(field.NewPath("resourceVersionMatch"), "resourceVersionMatch \"exact\" is forbidden for resourceVersion \"0\"")) + } + } + return allErrs +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go index 35adbca1282..a9b28f24426 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go @@ -110,6 +110,7 @@ func autoConvert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions, out.Watch = in.Watch out.AllowWatchBookmarks = in.AllowWatchBookmarks out.ResourceVersion = in.ResourceVersion + out.ResourceVersionMatch = v1.ResourceVersionMatch(in.ResourceVersionMatch) out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds)) out.Limit = in.Limit out.Continue = in.Continue @@ -131,6 +132,7 @@ func autoConvert_v1_ListOptions_To_internalversion_ListOptions(in *v1.ListOption out.Watch = in.Watch out.AllowWatchBookmarks = in.AllowWatchBookmarks out.ResourceVersion = in.ResourceVersion + out.ResourceVersionMatch = v1.ResourceVersionMatch(in.ResourceVersionMatch) out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds)) out.Limit = in.Limit out.Continue = in.Continue diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS index 77cfb0c1aa3..15b4c875a30 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS @@ -25,7 +25,6 @@ reviewers: - krousey - mml - mbohlool -- david-mcmahon - therc - mqliang - kevin-wangzefeng diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go index b937398cd34..8eaebb80e92 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go @@ -345,3 +345,11 @@ func Convert_url_Values_To_v1_DeleteOptions(in *url.Values, out *DeleteOptions, } return nil } + +// Convert_Slice_string_To_v1_ResourceVersionMatch allows converting a URL query parameter to ResourceVersionMatch +func Convert_Slice_string_To_v1_ResourceVersionMatch(in *[]string, out *ResourceVersionMatch, s conversion.Scope) error { + if len(*in) > 0 { + *out = ResourceVersionMatch((*in)[0]) + } + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 3288c564918..e74a51099d2 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -189,10 +189,38 @@ func (m *APIVersions) XXX_DiscardUnknown() { var xxx_messageInfo_APIVersions proto.InternalMessageInfo +func (m *Condition) Reset() { *m = Condition{} } +func (*Condition) ProtoMessage() {} +func (*Condition) Descriptor() ([]byte, []int) { + return fileDescriptor_cf52fa777ced5367, []int{5} +} +func (m *Condition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Condition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Condition) XXX_Merge(src proto.Message) { + xxx_messageInfo_Condition.Merge(m, src) +} +func (m *Condition) XXX_Size() int { + return m.Size() +} +func (m *Condition) XXX_DiscardUnknown() { + xxx_messageInfo_Condition.DiscardUnknown(m) +} + +var xxx_messageInfo_Condition proto.InternalMessageInfo + func (m *CreateOptions) Reset() { *m = CreateOptions{} } func (*CreateOptions) ProtoMessage() {} func (*CreateOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{5} + return fileDescriptor_cf52fa777ced5367, []int{6} } func (m *CreateOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +248,7 @@ var xxx_messageInfo_CreateOptions proto.InternalMessageInfo func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } func (*DeleteOptions) ProtoMessage() {} func (*DeleteOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{6} + return fileDescriptor_cf52fa777ced5367, []int{7} } func (m *DeleteOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +276,7 @@ var xxx_messageInfo_DeleteOptions proto.InternalMessageInfo func (m *Duration) Reset() { *m = Duration{} } func (*Duration) ProtoMessage() {} func (*Duration) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{7} + return fileDescriptor_cf52fa777ced5367, []int{8} } func (m *Duration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +304,7 @@ var xxx_messageInfo_Duration proto.InternalMessageInfo func (m *ExportOptions) Reset() { *m = ExportOptions{} } func (*ExportOptions) ProtoMessage() {} func (*ExportOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{8} + return fileDescriptor_cf52fa777ced5367, []int{9} } func (m *ExportOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -304,7 +332,7 @@ var xxx_messageInfo_ExportOptions proto.InternalMessageInfo func (m *FieldsV1) Reset() { *m = FieldsV1{} } func (*FieldsV1) ProtoMessage() {} func (*FieldsV1) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{9} + return fileDescriptor_cf52fa777ced5367, []int{10} } func (m *FieldsV1) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -332,7 +360,7 @@ var xxx_messageInfo_FieldsV1 proto.InternalMessageInfo func (m *GetOptions) Reset() { *m = GetOptions{} } func (*GetOptions) ProtoMessage() {} func (*GetOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{10} + return fileDescriptor_cf52fa777ced5367, []int{11} } func (m *GetOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +388,7 @@ var xxx_messageInfo_GetOptions proto.InternalMessageInfo func (m *GroupKind) Reset() { *m = GroupKind{} } func (*GroupKind) ProtoMessage() {} func (*GroupKind) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{11} + return fileDescriptor_cf52fa777ced5367, []int{12} } func (m *GroupKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -388,7 +416,7 @@ var xxx_messageInfo_GroupKind proto.InternalMessageInfo func (m *GroupResource) Reset() { *m = GroupResource{} } func (*GroupResource) ProtoMessage() {} func (*GroupResource) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{12} + return fileDescriptor_cf52fa777ced5367, []int{13} } func (m *GroupResource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +444,7 @@ var xxx_messageInfo_GroupResource proto.InternalMessageInfo func (m *GroupVersion) Reset() { *m = GroupVersion{} } func (*GroupVersion) ProtoMessage() {} func (*GroupVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{13} + return fileDescriptor_cf52fa777ced5367, []int{14} } func (m *GroupVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,7 +472,7 @@ var xxx_messageInfo_GroupVersion proto.InternalMessageInfo func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} } func (*GroupVersionForDiscovery) ProtoMessage() {} func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{14} + return fileDescriptor_cf52fa777ced5367, []int{15} } func (m *GroupVersionForDiscovery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -472,7 +500,7 @@ var xxx_messageInfo_GroupVersionForDiscovery proto.InternalMessageInfo func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } func (*GroupVersionKind) ProtoMessage() {} func (*GroupVersionKind) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{15} + return fileDescriptor_cf52fa777ced5367, []int{16} } func (m *GroupVersionKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +528,7 @@ var xxx_messageInfo_GroupVersionKind proto.InternalMessageInfo func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } func (*GroupVersionResource) ProtoMessage() {} func (*GroupVersionResource) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{16} + return fileDescriptor_cf52fa777ced5367, []int{17} } func (m *GroupVersionResource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +556,7 @@ var xxx_messageInfo_GroupVersionResource proto.InternalMessageInfo func (m *LabelSelector) Reset() { *m = LabelSelector{} } func (*LabelSelector) ProtoMessage() {} func (*LabelSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{17} + return fileDescriptor_cf52fa777ced5367, []int{18} } func (m *LabelSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +584,7 @@ var xxx_messageInfo_LabelSelector proto.InternalMessageInfo func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } func (*LabelSelectorRequirement) ProtoMessage() {} func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{18} + return fileDescriptor_cf52fa777ced5367, []int{19} } func (m *LabelSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -584,7 +612,7 @@ var xxx_messageInfo_LabelSelectorRequirement proto.InternalMessageInfo func (m *List) Reset() { *m = List{} } func (*List) ProtoMessage() {} func (*List) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{19} + return fileDescriptor_cf52fa777ced5367, []int{20} } func (m *List) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -612,7 +640,7 @@ var xxx_messageInfo_List proto.InternalMessageInfo func (m *ListMeta) Reset() { *m = ListMeta{} } func (*ListMeta) ProtoMessage() {} func (*ListMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{20} + return fileDescriptor_cf52fa777ced5367, []int{21} } func (m *ListMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -640,7 +668,7 @@ var xxx_messageInfo_ListMeta proto.InternalMessageInfo func (m *ListOptions) Reset() { *m = ListOptions{} } func (*ListOptions) ProtoMessage() {} func (*ListOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{21} + return fileDescriptor_cf52fa777ced5367, []int{22} } func (m *ListOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +696,7 @@ var xxx_messageInfo_ListOptions proto.InternalMessageInfo func (m *ManagedFieldsEntry) Reset() { *m = ManagedFieldsEntry{} } func (*ManagedFieldsEntry) ProtoMessage() {} func (*ManagedFieldsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{22} + return fileDescriptor_cf52fa777ced5367, []int{23} } func (m *ManagedFieldsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +724,7 @@ var xxx_messageInfo_ManagedFieldsEntry proto.InternalMessageInfo func (m *MicroTime) Reset() { *m = MicroTime{} } func (*MicroTime) ProtoMessage() {} func (*MicroTime) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{23} + return fileDescriptor_cf52fa777ced5367, []int{24} } func (m *MicroTime) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MicroTime.Unmarshal(m, b) @@ -719,7 +747,7 @@ var xxx_messageInfo_MicroTime proto.InternalMessageInfo func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } func (*ObjectMeta) ProtoMessage() {} func (*ObjectMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{24} + return fileDescriptor_cf52fa777ced5367, []int{25} } func (m *ObjectMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -747,7 +775,7 @@ var xxx_messageInfo_ObjectMeta proto.InternalMessageInfo func (m *OwnerReference) Reset() { *m = OwnerReference{} } func (*OwnerReference) ProtoMessage() {} func (*OwnerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{25} + return fileDescriptor_cf52fa777ced5367, []int{26} } func (m *OwnerReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -775,7 +803,7 @@ var xxx_messageInfo_OwnerReference proto.InternalMessageInfo func (m *PartialObjectMetadata) Reset() { *m = PartialObjectMetadata{} } func (*PartialObjectMetadata) ProtoMessage() {} func (*PartialObjectMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{26} + return fileDescriptor_cf52fa777ced5367, []int{27} } func (m *PartialObjectMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -803,7 +831,7 @@ var xxx_messageInfo_PartialObjectMetadata proto.InternalMessageInfo func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } func (*PartialObjectMetadataList) ProtoMessage() {} func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{27} + return fileDescriptor_cf52fa777ced5367, []int{28} } func (m *PartialObjectMetadataList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -831,7 +859,7 @@ var xxx_messageInfo_PartialObjectMetadataList proto.InternalMessageInfo func (m *Patch) Reset() { *m = Patch{} } func (*Patch) ProtoMessage() {} func (*Patch) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{28} + return fileDescriptor_cf52fa777ced5367, []int{29} } func (m *Patch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -859,7 +887,7 @@ var xxx_messageInfo_Patch proto.InternalMessageInfo func (m *PatchOptions) Reset() { *m = PatchOptions{} } func (*PatchOptions) ProtoMessage() {} func (*PatchOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{29} + return fileDescriptor_cf52fa777ced5367, []int{30} } func (m *PatchOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -887,7 +915,7 @@ var xxx_messageInfo_PatchOptions proto.InternalMessageInfo func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} func (*Preconditions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{30} + return fileDescriptor_cf52fa777ced5367, []int{31} } func (m *Preconditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -915,7 +943,7 @@ var xxx_messageInfo_Preconditions proto.InternalMessageInfo func (m *RootPaths) Reset() { *m = RootPaths{} } func (*RootPaths) ProtoMessage() {} func (*RootPaths) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{31} + return fileDescriptor_cf52fa777ced5367, []int{32} } func (m *RootPaths) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -943,7 +971,7 @@ var xxx_messageInfo_RootPaths proto.InternalMessageInfo func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } func (*ServerAddressByClientCIDR) ProtoMessage() {} func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{32} + return fileDescriptor_cf52fa777ced5367, []int{33} } func (m *ServerAddressByClientCIDR) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -971,7 +999,7 @@ var xxx_messageInfo_ServerAddressByClientCIDR proto.InternalMessageInfo func (m *Status) Reset() { *m = Status{} } func (*Status) ProtoMessage() {} func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{33} + return fileDescriptor_cf52fa777ced5367, []int{34} } func (m *Status) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -999,7 +1027,7 @@ var xxx_messageInfo_Status proto.InternalMessageInfo func (m *StatusCause) Reset() { *m = StatusCause{} } func (*StatusCause) ProtoMessage() {} func (*StatusCause) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{34} + return fileDescriptor_cf52fa777ced5367, []int{35} } func (m *StatusCause) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1027,7 +1055,7 @@ var xxx_messageInfo_StatusCause proto.InternalMessageInfo func (m *StatusDetails) Reset() { *m = StatusDetails{} } func (*StatusDetails) ProtoMessage() {} func (*StatusDetails) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{35} + return fileDescriptor_cf52fa777ced5367, []int{36} } func (m *StatusDetails) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1055,7 +1083,7 @@ var xxx_messageInfo_StatusDetails proto.InternalMessageInfo func (m *TableOptions) Reset() { *m = TableOptions{} } func (*TableOptions) ProtoMessage() {} func (*TableOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{36} + return fileDescriptor_cf52fa777ced5367, []int{37} } func (m *TableOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1083,7 +1111,7 @@ var xxx_messageInfo_TableOptions proto.InternalMessageInfo func (m *Time) Reset() { *m = Time{} } func (*Time) ProtoMessage() {} func (*Time) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{37} + return fileDescriptor_cf52fa777ced5367, []int{38} } func (m *Time) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Time.Unmarshal(m, b) @@ -1106,7 +1134,7 @@ var xxx_messageInfo_Time proto.InternalMessageInfo func (m *Timestamp) Reset() { *m = Timestamp{} } func (*Timestamp) ProtoMessage() {} func (*Timestamp) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{38} + return fileDescriptor_cf52fa777ced5367, []int{39} } func (m *Timestamp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1134,7 +1162,7 @@ var xxx_messageInfo_Timestamp proto.InternalMessageInfo func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (*TypeMeta) ProtoMessage() {} func (*TypeMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{39} + return fileDescriptor_cf52fa777ced5367, []int{40} } func (m *TypeMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1162,7 +1190,7 @@ var xxx_messageInfo_TypeMeta proto.InternalMessageInfo func (m *UpdateOptions) Reset() { *m = UpdateOptions{} } func (*UpdateOptions) ProtoMessage() {} func (*UpdateOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{40} + return fileDescriptor_cf52fa777ced5367, []int{41} } func (m *UpdateOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1190,7 +1218,7 @@ var xxx_messageInfo_UpdateOptions proto.InternalMessageInfo func (m *Verbs) Reset() { *m = Verbs{} } func (*Verbs) ProtoMessage() {} func (*Verbs) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{41} + return fileDescriptor_cf52fa777ced5367, []int{42} } func (m *Verbs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1218,7 +1246,7 @@ var xxx_messageInfo_Verbs proto.InternalMessageInfo func (m *WatchEvent) Reset() { *m = WatchEvent{} } func (*WatchEvent) ProtoMessage() {} func (*WatchEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{42} + return fileDescriptor_cf52fa777ced5367, []int{43} } func (m *WatchEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1249,6 +1277,7 @@ func init() { proto.RegisterType((*APIResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResource") proto.RegisterType((*APIResourceList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResourceList") proto.RegisterType((*APIVersions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIVersions") + proto.RegisterType((*Condition)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Condition") proto.RegisterType((*CreateOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.CreateOptions") proto.RegisterType((*DeleteOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions") proto.RegisterType((*Duration)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Duration") @@ -1297,177 +1326,184 @@ func init() { } var fileDescriptor_cf52fa777ced5367 = []byte{ - // 2713 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x19, 0xcd, 0x6f, 0x1b, 0x59, - 0x3d, 0x63, 0xc7, 0x8e, 0xfd, 0x73, 0x9c, 0x8f, 0x97, 0x16, 0xdc, 0x00, 0x71, 0x76, 0x16, 0xad, - 0x52, 0xe8, 0x3a, 0x9b, 0x02, 0xab, 0xd2, 0x65, 0x0b, 0x71, 0x9c, 0x74, 0xc3, 0x36, 0x4d, 0xf4, - 0xd2, 0x16, 0x28, 0x15, 0xea, 0x64, 0xe6, 0xc5, 0x19, 0x32, 0x9e, 0xf1, 0xbe, 0x19, 0x27, 0x35, - 0x1c, 0xd8, 0x03, 0x08, 0x90, 0x60, 0xd5, 0x23, 0xe2, 0x80, 0xb6, 0x82, 0xbf, 0x80, 0x13, 0x7f, - 0x00, 0x12, 0xbd, 0x20, 0xad, 0xc4, 0x65, 0x25, 0x90, 0xb5, 0x0d, 0x07, 0x8e, 0x88, 0x6b, 0x4e, - 0xe8, 0x7d, 0xcd, 0x87, 0x1d, 0x37, 0x63, 0xba, 0xac, 0xf6, 0xe6, 0xf9, 0x7d, 0xff, 0xde, 0xfb, - 0xbd, 0xdf, 0x97, 0x61, 0xeb, 0xf0, 0x9a, 0x5f, 0xb3, 0xbd, 0xe5, 0xc3, 0xce, 0x1e, 0xa1, 0x2e, - 0x09, 0x88, 0xbf, 0x7c, 0x44, 0x5c, 0xcb, 0xa3, 0xcb, 0x12, 0x61, 0xb4, 0xed, 0x96, 0x61, 0x1e, - 0xd8, 0x2e, 0xa1, 0xdd, 0xe5, 0xf6, 0x61, 0x93, 0x01, 0xfc, 0xe5, 0x16, 0x09, 0x8c, 0xe5, 0xa3, - 0x95, 0xe5, 0x26, 0x71, 0x09, 0x35, 0x02, 0x62, 0xd5, 0xda, 0xd4, 0x0b, 0x3c, 0xf4, 0x45, 0xc1, - 0x55, 0x8b, 0x73, 0xd5, 0xda, 0x87, 0x4d, 0x06, 0xf0, 0x6b, 0x8c, 0xab, 0x76, 0xb4, 0x32, 0xff, - 0x6a, 0xd3, 0x0e, 0x0e, 0x3a, 0x7b, 0x35, 0xd3, 0x6b, 0x2d, 0x37, 0xbd, 0xa6, 0xb7, 0xcc, 0x99, - 0xf7, 0x3a, 0xfb, 0xfc, 0x8b, 0x7f, 0xf0, 0x5f, 0x42, 0xe8, 0xfc, 0x50, 0x53, 0x68, 0xc7, 0x0d, - 0xec, 0x16, 0xe9, 0xb7, 0x62, 0xfe, 0xf5, 0xf3, 0x18, 0x7c, 0xf3, 0x80, 0xb4, 0x8c, 0x7e, 0x3e, - 0xfd, 0x2f, 0x59, 0x28, 0xac, 0xee, 0x6c, 0xde, 0xa4, 0x5e, 0xa7, 0x8d, 0x16, 0x61, 0xdc, 0x35, - 0x5a, 0xa4, 0xa2, 0x2d, 0x6a, 0x4b, 0xc5, 0xfa, 0xe4, 0xd3, 0x5e, 0x75, 0xec, 0xa4, 0x57, 0x1d, - 0xbf, 0x6d, 0xb4, 0x08, 0xe6, 0x18, 0xe4, 0x40, 0xe1, 0x88, 0x50, 0xdf, 0xf6, 0x5c, 0xbf, 0x92, - 0x59, 0xcc, 0x2e, 0x95, 0xae, 0xde, 0xa8, 0xa5, 0xf1, 0xbf, 0xc6, 0x15, 0xdc, 0x13, 0xac, 0x1b, - 0x1e, 0x6d, 0xd8, 0xbe, 0xe9, 0x1d, 0x11, 0xda, 0xad, 0xcf, 0x48, 0x2d, 0x05, 0x89, 0xf4, 0x71, - 0xa8, 0x01, 0xfd, 0x54, 0x83, 0x99, 0x36, 0x25, 0xfb, 0x84, 0x52, 0x62, 0x49, 0x7c, 0x25, 0xbb, - 0xa8, 0x7d, 0x0c, 0x6a, 0x2b, 0x52, 0xed, 0xcc, 0x4e, 0x9f, 0x7c, 0x3c, 0xa0, 0x11, 0xfd, 0x5e, - 0x83, 0x79, 0x9f, 0xd0, 0x23, 0x42, 0x57, 0x2d, 0x8b, 0x12, 0xdf, 0xaf, 0x77, 0xd7, 0x1c, 0x9b, - 0xb8, 0xc1, 0xda, 0x66, 0x03, 0xfb, 0x95, 0x71, 0x7e, 0x0e, 0xdf, 0x4c, 0x67, 0xd0, 0xee, 0x30, - 0x39, 0x75, 0x5d, 0x5a, 0x34, 0x3f, 0x94, 0xc4, 0xc7, 0xcf, 0x31, 0x43, 0xdf, 0x87, 0x49, 0x75, - 0x91, 0xb7, 0x6c, 0x3f, 0x40, 0xf7, 0x20, 0xdf, 0x64, 0x1f, 0x7e, 0x45, 0xe3, 0x06, 0xd6, 0xd2, - 0x19, 0xa8, 0x64, 0xd4, 0xa7, 0xa4, 0x3d, 0x79, 0xfe, 0xe9, 0x63, 0x29, 0x4d, 0xff, 0xe5, 0x38, - 0x94, 0x56, 0x77, 0x36, 0x31, 0xf1, 0xbd, 0x0e, 0x35, 0x49, 0x8a, 0xa0, 0xb9, 0x06, 0x93, 0xbe, - 0xed, 0x36, 0x3b, 0x8e, 0x41, 0x19, 0xb4, 0x92, 0xe7, 0x94, 0x17, 0x24, 0xe5, 0xe4, 0x6e, 0x0c, - 0x87, 0x13, 0x94, 0xe8, 0x2a, 0x00, 0x93, 0xe0, 0xb7, 0x0d, 0x93, 0x58, 0x95, 0xcc, 0xa2, 0xb6, - 0x54, 0xa8, 0x23, 0xc9, 0x07, 0xb7, 0x43, 0x0c, 0x8e, 0x51, 0xa1, 0x97, 0x21, 0xc7, 0x2d, 0xad, - 0x14, 0xb8, 0x9a, 0xb2, 0x24, 0xcf, 0x71, 0x37, 0xb0, 0xc0, 0xa1, 0xcb, 0x30, 0x21, 0xa3, 0xac, - 0x52, 0xe4, 0x64, 0xd3, 0x92, 0x6c, 0x42, 0x85, 0x81, 0xc2, 0x33, 0xff, 0x0e, 0x6d, 0xd7, 0xe2, - 0x71, 0x17, 0xf3, 0xef, 0x6d, 0xdb, 0xb5, 0x30, 0xc7, 0xa0, 0x5b, 0x90, 0x3b, 0x22, 0x74, 0x8f, - 0x45, 0x02, 0x0b, 0xcd, 0x2f, 0xa7, 0x3b, 0xe8, 0x7b, 0x8c, 0xa5, 0x5e, 0x64, 0xa6, 0xf1, 0x9f, - 0x58, 0x08, 0x41, 0x35, 0x00, 0xff, 0xc0, 0xa3, 0x01, 0x77, 0xaf, 0x92, 0x5b, 0xcc, 0x2e, 0x15, - 0xeb, 0x53, 0xcc, 0xdf, 0xdd, 0x10, 0x8a, 0x63, 0x14, 0x8c, 0xde, 0x34, 0x02, 0xd2, 0xf4, 0xa8, - 0x4d, 0xfc, 0xca, 0x44, 0x44, 0xbf, 0x16, 0x42, 0x71, 0x8c, 0x02, 0x7d, 0x1b, 0x90, 0x1f, 0x78, - 0xd4, 0x68, 0x12, 0xe9, 0xea, 0x5b, 0x86, 0x7f, 0x50, 0x01, 0xee, 0xdd, 0xbc, 0xf4, 0x0e, 0xed, - 0x0e, 0x50, 0xe0, 0x33, 0xb8, 0xf4, 0x3f, 0x6a, 0x30, 0x1d, 0x8b, 0x05, 0x1e, 0x77, 0xd7, 0x60, - 0xb2, 0x19, 0x7b, 0x75, 0x32, 0x2e, 0xc2, 0xdb, 0x8e, 0xbf, 0x48, 0x9c, 0xa0, 0x44, 0x04, 0x8a, - 0x54, 0x4a, 0x52, 0xd9, 0x65, 0x25, 0x75, 0xd0, 0x2a, 0x1b, 0x22, 0x4d, 0x31, 0xa0, 0x8f, 0x23, - 0xc9, 0xfa, 0xbf, 0x34, 0x1e, 0xc0, 0x2a, 0xdf, 0xa0, 0xa5, 0x58, 0x4e, 0xd3, 0xf8, 0xf1, 0x4d, - 0x0e, 0xc9, 0x47, 0xe7, 0x24, 0x82, 0xcc, 0xa7, 0x22, 0x11, 0x5c, 0x2f, 0xfc, 0xe6, 0xfd, 0xea, - 0xd8, 0xbb, 0xff, 0x58, 0x1c, 0xd3, 0x5b, 0x50, 0x5e, 0xa3, 0xc4, 0x08, 0xc8, 0x76, 0x3b, 0xe0, - 0x0e, 0xe8, 0x90, 0xb7, 0x68, 0x17, 0x77, 0x5c, 0xe9, 0x28, 0xb0, 0xf7, 0xdd, 0xe0, 0x10, 0x2c, - 0x31, 0xec, 0xfe, 0xf6, 0x6d, 0xe2, 0x58, 0x5b, 0x86, 0x6b, 0x34, 0x09, 0x95, 0x71, 0x1f, 0x9e, - 0xea, 0x46, 0x0c, 0x87, 0x13, 0x94, 0xfa, 0xcf, 0xb3, 0x50, 0x6e, 0x10, 0x87, 0x44, 0xfa, 0x36, - 0x00, 0x35, 0xa9, 0x61, 0x92, 0x1d, 0x42, 0x6d, 0xcf, 0xda, 0x25, 0xa6, 0xe7, 0x5a, 0x3e, 0x8f, - 0x88, 0x6c, 0xfd, 0x33, 0x2c, 0xce, 0x6e, 0x0e, 0x60, 0xf1, 0x19, 0x1c, 0xc8, 0x81, 0x72, 0x9b, - 0xf2, 0xdf, 0x76, 0x20, 0x6b, 0x0f, 0x7b, 0x69, 0x5f, 0x49, 0x77, 0xd4, 0x3b, 0x71, 0xd6, 0xfa, - 0xec, 0x49, 0xaf, 0x5a, 0x4e, 0x80, 0x70, 0x52, 0x38, 0xfa, 0x16, 0xcc, 0x78, 0xb4, 0x7d, 0x60, - 0xb8, 0x0d, 0xd2, 0x26, 0xae, 0x45, 0xdc, 0xc0, 0xe7, 0xa7, 0x50, 0xa8, 0x5f, 0x60, 0x15, 0x63, - 0xbb, 0x0f, 0x87, 0x07, 0xa8, 0xd1, 0x7d, 0x98, 0x6d, 0x53, 0xaf, 0x6d, 0x34, 0x0d, 0x26, 0x71, - 0xc7, 0x73, 0x6c, 0xb3, 0xcb, 0xb3, 0x43, 0xb1, 0x7e, 0xe5, 0xa4, 0x57, 0x9d, 0xdd, 0xe9, 0x47, - 0x9e, 0xf6, 0xaa, 0x73, 0xfc, 0xe8, 0x18, 0x24, 0x42, 0xe2, 0x41, 0x31, 0xb1, 0x3b, 0xcc, 0x0d, - 0xbb, 0x43, 0x7d, 0x13, 0x0a, 0x8d, 0x0e, 0xe5, 0x5c, 0xe8, 0x4d, 0x28, 0x58, 0xf2, 0xb7, 0x3c, - 0xf9, 0x97, 0x54, 0xc9, 0x55, 0x34, 0xa7, 0xbd, 0x6a, 0x99, 0x35, 0x09, 0x35, 0x05, 0xc0, 0x21, - 0x8b, 0xfe, 0x00, 0xca, 0xeb, 0x8f, 0xda, 0x1e, 0x0d, 0xd4, 0x9d, 0xbe, 0x02, 0x79, 0xc2, 0x01, - 0x5c, 0x5a, 0x21, 0xaa, 0x13, 0x82, 0x0c, 0x4b, 0x2c, 0xcb, 0xc3, 0xe4, 0x91, 0x61, 0x06, 0x32, - 0x6d, 0x87, 0x79, 0x78, 0x9d, 0x01, 0xb1, 0xc0, 0xe9, 0x9f, 0x87, 0x02, 0x0f, 0x28, 0xff, 0xde, - 0x0a, 0x9a, 0x81, 0x2c, 0x36, 0x8e, 0xb9, 0xd4, 0x49, 0x9c, 0xa5, 0xc6, 0xb1, 0xbe, 0x0d, 0x70, - 0x93, 0x84, 0x8a, 0x57, 0x61, 0x5a, 0x3d, 0xe2, 0x64, 0x6e, 0xf9, 0xac, 0x14, 0x3d, 0x8d, 0x93, - 0x68, 0xdc, 0x4f, 0xaf, 0x3f, 0x80, 0x22, 0xcf, 0x3f, 0x2c, 0x79, 0x47, 0x85, 0x42, 0x7b, 0x4e, - 0xa1, 0x50, 0xd9, 0x3f, 0x33, 0x2c, 0xfb, 0xc7, 0x9e, 0x9b, 0x03, 0x65, 0xc1, 0xab, 0x4a, 0x63, - 0x2a, 0x0d, 0x57, 0xa0, 0xa0, 0xcc, 0x94, 0x5a, 0xc2, 0x96, 0x48, 0x09, 0xc2, 0x21, 0x45, 0x4c, - 0xdb, 0x01, 0x24, 0x72, 0x69, 0x3a, 0x65, 0xb1, 0xba, 0x97, 0x79, 0x7e, 0xdd, 0x8b, 0x69, 0xfa, - 0x09, 0x54, 0x86, 0xf5, 0x51, 0x2f, 0x90, 0xed, 0xd3, 0x9b, 0xa2, 0xbf, 0xa7, 0xc1, 0x4c, 0x5c, - 0x52, 0xfa, 0xeb, 0x4b, 0xaf, 0xe4, 0xfc, 0x3a, 0x1f, 0x3b, 0x91, 0xdf, 0x69, 0x70, 0x21, 0xe1, - 0xda, 0x48, 0x37, 0x3e, 0x82, 0x51, 0xf1, 0xe0, 0xc8, 0x8e, 0x10, 0x1c, 0x7f, 0xcb, 0x40, 0xf9, - 0x96, 0xb1, 0x47, 0x9c, 0x5d, 0xe2, 0x10, 0x33, 0xf0, 0x28, 0xfa, 0x31, 0x94, 0x5a, 0x46, 0x60, - 0x1e, 0x70, 0xa8, 0xea, 0x09, 0x1b, 0xe9, 0x12, 0x68, 0x42, 0x52, 0x6d, 0x2b, 0x12, 0xb3, 0xee, - 0x06, 0xb4, 0x5b, 0x9f, 0x93, 0x26, 0x95, 0x62, 0x18, 0x1c, 0xd7, 0xc6, 0x1b, 0x79, 0xfe, 0xbd, - 0xfe, 0xa8, 0xcd, 0x0a, 0xd6, 0xe8, 0xf3, 0x43, 0xc2, 0x04, 0x4c, 0xde, 0xe9, 0xd8, 0x94, 0xb4, - 0x88, 0x1b, 0x44, 0x8d, 0xfc, 0x56, 0x9f, 0x7c, 0x3c, 0xa0, 0x71, 0xfe, 0x06, 0xcc, 0xf4, 0x1b, - 0xcf, 0xb2, 0xce, 0x21, 0xe9, 0x8a, 0xfb, 0xc2, 0xec, 0x27, 0xba, 0x00, 0xb9, 0x23, 0xc3, 0xe9, - 0xc8, 0xd7, 0x88, 0xc5, 0xc7, 0xf5, 0xcc, 0x35, 0x4d, 0xff, 0x83, 0x06, 0x95, 0x61, 0x86, 0xa0, - 0x2f, 0xc4, 0x04, 0xd5, 0x4b, 0xd2, 0xaa, 0xec, 0xdb, 0xa4, 0x2b, 0xa4, 0xae, 0x43, 0xc1, 0x6b, - 0xb3, 0xd1, 0xcb, 0xa3, 0xf2, 0xd6, 0x2f, 0xab, 0x9b, 0xdc, 0x96, 0xf0, 0xd3, 0x5e, 0xf5, 0x62, - 0x42, 0xbc, 0x42, 0xe0, 0x90, 0x95, 0x65, 0x7f, 0x6e, 0x0f, 0xab, 0x48, 0x61, 0xf6, 0xbf, 0xc7, - 0x21, 0x58, 0x62, 0xf4, 0x3f, 0x69, 0x30, 0xce, 0x5b, 0xb1, 0x07, 0x50, 0x60, 0xe7, 0x67, 0x19, - 0x81, 0xc1, 0xed, 0x4a, 0x3d, 0x04, 0x30, 0xee, 0x2d, 0x12, 0x18, 0x51, 0xb4, 0x29, 0x08, 0x0e, - 0x25, 0x22, 0x0c, 0x39, 0x3b, 0x20, 0x2d, 0x75, 0x91, 0xaf, 0x0e, 0x15, 0x2d, 0x47, 0xd0, 0x1a, - 0x36, 0x8e, 0xd7, 0x1f, 0x05, 0xc4, 0x65, 0x97, 0x11, 0x3d, 0x8d, 0x4d, 0x26, 0x03, 0x0b, 0x51, - 0xfa, 0x7f, 0x34, 0x08, 0x55, 0xb1, 0xe0, 0xf7, 0x89, 0xb3, 0x7f, 0xcb, 0x76, 0x0f, 0xe5, 0xb1, - 0x86, 0xe6, 0xec, 0x4a, 0x38, 0x0e, 0x29, 0xce, 0x2a, 0x0f, 0x99, 0xd1, 0xca, 0x03, 0x53, 0x68, - 0x7a, 0x6e, 0x60, 0xbb, 0x9d, 0x81, 0xd7, 0xb6, 0x26, 0xe1, 0x38, 0xa4, 0x60, 0xcd, 0x0d, 0x25, - 0x2d, 0xc3, 0x76, 0x6d, 0xb7, 0xc9, 0x9c, 0x58, 0xf3, 0x3a, 0x6e, 0xc0, 0xab, 0xbc, 0x6c, 0x6e, - 0xf0, 0x00, 0x16, 0x9f, 0xc1, 0xa1, 0xff, 0x35, 0x0b, 0x25, 0xe6, 0xb3, 0xaa, 0x73, 0x6f, 0x40, - 0xd9, 0x89, 0x47, 0x81, 0xf4, 0xfd, 0xa2, 0x34, 0x25, 0xf9, 0xae, 0x71, 0x92, 0x96, 0x31, 0xf3, - 0x9e, 0x2c, 0x64, 0xce, 0x24, 0x99, 0x37, 0xe2, 0x48, 0x9c, 0xa4, 0x65, 0xd9, 0xeb, 0x98, 0xbd, - 0x0f, 0xd9, 0xed, 0x84, 0x57, 0xf4, 0x1d, 0x06, 0xc4, 0x02, 0x87, 0xb6, 0x60, 0xce, 0x70, 0x1c, - 0xef, 0x98, 0x03, 0xeb, 0x9e, 0x77, 0xd8, 0x32, 0xe8, 0xa1, 0xcf, 0xc7, 0xa8, 0x42, 0xfd, 0x73, - 0x92, 0x65, 0x6e, 0x75, 0x90, 0x04, 0x9f, 0xc5, 0x77, 0xd6, 0xb5, 0x8d, 0x8f, 0x78, 0x6d, 0xd7, - 0x61, 0x8a, 0xc5, 0x97, 0xd7, 0x09, 0x54, 0x87, 0x99, 0xe3, 0x97, 0x80, 0x4e, 0x7a, 0xd5, 0xa9, - 0x3b, 0x09, 0x0c, 0xee, 0xa3, 0x64, 0x2e, 0x3b, 0x76, 0xcb, 0x0e, 0x2a, 0x13, 0x9c, 0x25, 0x74, - 0xf9, 0x16, 0x03, 0x62, 0x81, 0x4b, 0xc4, 0x45, 0xe1, 0xbc, 0xb8, 0xd0, 0x7f, 0x9b, 0x05, 0x24, - 0x5a, 0x62, 0x4b, 0xf4, 0x36, 0x22, 0xd1, 0x5c, 0x86, 0x89, 0x96, 0x6c, 0xa9, 0xb5, 0x64, 0xd6, - 0x57, 0xdd, 0xb4, 0xc2, 0xa3, 0x2d, 0x28, 0x8a, 0x07, 0x1f, 0x05, 0xf1, 0xb2, 0x24, 0x2e, 0x6e, - 0x2b, 0xc4, 0x69, 0xaf, 0x3a, 0x9f, 0x50, 0x13, 0x62, 0xee, 0x74, 0xdb, 0x04, 0x47, 0x12, 0xd8, - 0x14, 0x6d, 0xb4, 0xed, 0xf8, 0xfe, 0xa4, 0x18, 0x4d, 0xd1, 0xd1, 0x24, 0x84, 0x63, 0x54, 0xe8, - 0x2d, 0x18, 0x67, 0x27, 0x25, 0x47, 0xda, 0x2f, 0xa5, 0x4b, 0x1b, 0xec, 0xac, 0xeb, 0x05, 0x56, - 0x35, 0xd9, 0x2f, 0xcc, 0x25, 0x30, 0xed, 0x3c, 0xca, 0x7c, 0x66, 0x96, 0x9c, 0xfd, 0x43, 0xed, - 0x1b, 0x21, 0x06, 0xc7, 0xa8, 0xd0, 0x77, 0xa1, 0xb0, 0x2f, 0xdb, 0x42, 0x7e, 0x31, 0xa9, 0x13, - 0x97, 0x6a, 0x26, 0xc5, 0x08, 0xa7, 0xbe, 0x70, 0x28, 0x4d, 0x7f, 0x07, 0x8a, 0x5b, 0xb6, 0x49, - 0x3d, 0x66, 0x20, 0xbb, 0x12, 0x3f, 0x31, 0x93, 0x84, 0x57, 0xa2, 0xc2, 0x45, 0xe1, 0x59, 0x9c, - 0xb8, 0x86, 0xeb, 0x89, 0xc9, 0x23, 0x17, 0xc5, 0xc9, 0x6d, 0x06, 0xc4, 0x02, 0x77, 0xfd, 0x02, - 0xab, 0xbf, 0xbf, 0x78, 0x52, 0x1d, 0x7b, 0xfc, 0xa4, 0x3a, 0xf6, 0xfe, 0x13, 0x59, 0x8b, 0x4f, - 0x01, 0x60, 0x7b, 0xef, 0x87, 0xc4, 0x14, 0x59, 0x2d, 0xd5, 0xbe, 0x44, 0xad, 0xe9, 0xf8, 0xbe, - 0x24, 0xd3, 0xd7, 0x53, 0xc5, 0x70, 0x38, 0x41, 0x89, 0x96, 0xa1, 0x18, 0x6e, 0x42, 0xe4, 0x45, - 0xcf, 0xaa, 0xc0, 0x09, 0xd7, 0x25, 0x38, 0xa2, 0x49, 0xa4, 0xd8, 0xf1, 0x73, 0x53, 0x6c, 0x1d, - 0xb2, 0x1d, 0xdb, 0xe2, 0xaf, 0xab, 0x58, 0x7f, 0x4d, 0x95, 0xb8, 0xbb, 0x9b, 0x8d, 0xd3, 0x5e, - 0xf5, 0xa5, 0x61, 0x0b, 0xc8, 0xa0, 0xdb, 0x26, 0x7e, 0xed, 0xee, 0x66, 0x03, 0x33, 0xe6, 0xb3, - 0xde, 0x7b, 0x7e, 0xc4, 0xf7, 0x7e, 0x15, 0x40, 0x7a, 0xcd, 0xb8, 0xc5, 0xc3, 0x0d, 0x23, 0xea, - 0x66, 0x88, 0xc1, 0x31, 0x2a, 0xe4, 0xc3, 0xac, 0xc9, 0x46, 0x61, 0xf6, 0x3c, 0xec, 0x16, 0xf1, - 0x03, 0xa3, 0x25, 0x36, 0x44, 0xa3, 0x05, 0xf7, 0x25, 0xa9, 0x66, 0x76, 0xad, 0x5f, 0x18, 0x1e, - 0x94, 0x8f, 0x3c, 0x98, 0xb5, 0xe4, 0x50, 0x17, 0x29, 0x2d, 0x8e, 0xac, 0xf4, 0x22, 0x53, 0xd8, - 0xe8, 0x17, 0x84, 0x07, 0x65, 0xa3, 0x1f, 0xc0, 0xbc, 0x02, 0x0e, 0x4e, 0xd6, 0x7c, 0xc7, 0x93, - 0xad, 0x2f, 0x9c, 0xf4, 0xaa, 0xf3, 0x8d, 0xa1, 0x54, 0xf8, 0x39, 0x12, 0x90, 0x05, 0x79, 0x47, - 0xf4, 0x8f, 0x25, 0x5e, 0xf3, 0xbf, 0x91, 0xce, 0x8b, 0x28, 0xfa, 0x6b, 0xf1, 0xbe, 0x31, 0x9c, - 0x1c, 0x65, 0xcb, 0x28, 0x65, 0xa3, 0x47, 0x50, 0x32, 0x5c, 0xd7, 0x0b, 0x0c, 0x31, 0xeb, 0x4f, - 0x72, 0x55, 0xab, 0x23, 0xab, 0x5a, 0x8d, 0x64, 0xf4, 0xf5, 0xa9, 0x31, 0x0c, 0x8e, 0xab, 0x42, - 0xc7, 0x30, 0xed, 0x1d, 0xbb, 0x84, 0x62, 0xb2, 0x4f, 0x28, 0x71, 0x4d, 0xe2, 0x57, 0xca, 0x5c, - 0xfb, 0x57, 0x53, 0x6a, 0x4f, 0x30, 0x47, 0x21, 0x9d, 0x84, 0xfb, 0xb8, 0x5f, 0x0b, 0xaa, 0xb1, - 0x24, 0xe9, 0x1a, 0x8e, 0xfd, 0x23, 0x42, 0xfd, 0xca, 0x54, 0xb4, 0xc4, 0xdb, 0x08, 0xa1, 0x38, - 0x46, 0x81, 0xbe, 0x06, 0x25, 0xd3, 0xe9, 0xf8, 0x01, 0x11, 0x1b, 0xd5, 0x69, 0xfe, 0x82, 0x42, - 0xff, 0xd6, 0x22, 0x14, 0x8e, 0xd3, 0xa1, 0x0e, 0x94, 0x5b, 0xf1, 0x92, 0x51, 0x99, 0xe5, 0xde, - 0x5d, 0x4b, 0xe7, 0xdd, 0x60, 0x51, 0x8b, 0xfa, 0x8a, 0x04, 0x0e, 0x27, 0xb5, 0xcc, 0x7f, 0x1d, - 0x4a, 0xff, 0x63, 0xcb, 0xcd, 0x5a, 0xf6, 0xfe, 0x7b, 0x1c, 0xa9, 0x65, 0xff, 0x73, 0x06, 0xa6, - 0x92, 0xa7, 0xdf, 0x57, 0x0e, 0x73, 0xa9, 0xca, 0xa1, 0x1a, 0x0e, 0xb5, 0xa1, 0x4b, 0x60, 0x95, - 0xd6, 0xb3, 0x43, 0xd3, 0xba, 0xcc, 0x9e, 0xe3, 0x2f, 0x92, 0x3d, 0x6b, 0x00, 0xac, 0xcf, 0xa0, - 0x9e, 0xe3, 0x10, 0xca, 0x13, 0x67, 0x41, 0x2e, 0x7b, 0x43, 0x28, 0x8e, 0x51, 0xb0, 0x1e, 0x75, - 0xcf, 0xf1, 0xcc, 0x43, 0x7e, 0x04, 0xea, 0xd1, 0xf3, 0x94, 0x59, 0x10, 0x3d, 0x6a, 0x7d, 0x00, - 0x8b, 0xcf, 0xe0, 0xd0, 0xbb, 0x70, 0x71, 0xc7, 0xa0, 0x81, 0x6d, 0x38, 0xd1, 0x03, 0xe3, 0x43, - 0xc0, 0xc3, 0x81, 0x11, 0xe3, 0xb5, 0x51, 0x1f, 0x6a, 0x74, 0xf8, 0x11, 0x2c, 0x1a, 0x33, 0xf4, - 0xbf, 0x6b, 0x70, 0xe9, 0x4c, 0xdd, 0x9f, 0xc0, 0x88, 0xf3, 0x30, 0x39, 0xe2, 0xbc, 0x91, 0x72, - 0xdf, 0x78, 0x96, 0xb5, 0x43, 0x06, 0x9e, 0x09, 0xc8, 0xed, 0xb0, 0x86, 0x58, 0xff, 0xb5, 0x06, - 0x93, 0xfc, 0xd7, 0x28, 0xbb, 0xda, 0x2a, 0xe4, 0xf6, 0x3d, 0xb5, 0x38, 0x2a, 0x88, 0x3f, 0x13, - 0x36, 0x18, 0x00, 0x0b, 0xf8, 0x0b, 0x2c, 0x73, 0xdf, 0xd3, 0x20, 0xb9, 0x25, 0x45, 0x37, 0x44, - 0xfc, 0x6a, 0xe1, 0x1a, 0x73, 0xc4, 0xd8, 0x7d, 0x73, 0xd8, 0x80, 0x36, 0x97, 0x6a, 0x77, 0x77, - 0x05, 0x8a, 0xd8, 0xf3, 0x82, 0x1d, 0x23, 0x38, 0xf0, 0x99, 0xe3, 0x6d, 0xf6, 0x43, 0x9e, 0x0d, - 0x77, 0x9c, 0x63, 0xb0, 0x80, 0xeb, 0xbf, 0xd2, 0xe0, 0xd2, 0xd0, 0xfd, 0x39, 0x4b, 0x01, 0x66, - 0xf8, 0x25, 0x3d, 0x0a, 0xa3, 0x30, 0xa2, 0xc3, 0x31, 0x2a, 0x36, 0x59, 0x25, 0x96, 0xee, 0xfd, - 0x93, 0x55, 0x42, 0x1b, 0x4e, 0xd2, 0xea, 0xff, 0xce, 0x40, 0x7e, 0x37, 0x30, 0x82, 0x8e, 0xff, - 0x7f, 0x8e, 0xd8, 0x57, 0x20, 0xef, 0x73, 0x3d, 0xd2, 0xbc, 0xb0, 0xc6, 0x0a, 0xed, 0x58, 0x62, - 0xf9, 0x34, 0x42, 0x7c, 0xdf, 0x68, 0xaa, 0x8c, 0x15, 0x4d, 0x23, 0x02, 0x8c, 0x15, 0x1e, 0xbd, - 0x0e, 0x79, 0x4a, 0x0c, 0x3f, 0x1c, 0xcc, 0x16, 0x94, 0x48, 0xcc, 0xa1, 0xa7, 0xbd, 0xea, 0xa4, - 0x14, 0xce, 0xbf, 0xb1, 0xa4, 0x46, 0xf7, 0x61, 0xc2, 0x22, 0x81, 0x61, 0x3b, 0x62, 0x1e, 0x4b, - 0xbd, 0xae, 0x17, 0xc2, 0x1a, 0x82, 0xb5, 0x5e, 0x62, 0x36, 0xc9, 0x0f, 0xac, 0x04, 0xb2, 0x6c, - 0x6b, 0x7a, 0x96, 0x18, 0x27, 0x72, 0x51, 0xb6, 0x5d, 0xf3, 0x2c, 0x82, 0x39, 0x46, 0x7f, 0xac, - 0x41, 0x49, 0x48, 0x5a, 0x33, 0x3a, 0x3e, 0x41, 0x2b, 0xa1, 0x17, 0xe2, 0xba, 0x55, 0x27, 0x37, - 0xce, 0x06, 0x8e, 0xd3, 0x5e, 0xb5, 0xc8, 0xc9, 0xf8, 0x24, 0xa2, 0x1c, 0x88, 0x9d, 0x51, 0xe6, - 0x9c, 0x33, 0x7a, 0x19, 0x72, 0xfc, 0xf5, 0xc8, 0xc3, 0x0c, 0xdf, 0x3a, 0x7f, 0x60, 0x58, 0xe0, - 0xf4, 0x8f, 0x32, 0x50, 0x4e, 0x38, 0x97, 0x62, 0x16, 0x08, 0x17, 0x8a, 0x99, 0x14, 0x4b, 0xea, - 0xe1, 0x7f, 0x51, 0xca, 0xda, 0x93, 0x7f, 0x91, 0xda, 0xf3, 0x3d, 0xc8, 0x9b, 0xec, 0x8c, 0xd4, - 0x3f, 0xde, 0x2b, 0xa3, 0x5c, 0x27, 0x3f, 0xdd, 0x28, 0x1a, 0xf9, 0xa7, 0x8f, 0xa5, 0x40, 0x74, - 0x13, 0x66, 0x29, 0x09, 0x68, 0x77, 0x75, 0x3f, 0x20, 0x34, 0x3e, 0xc4, 0xe7, 0xa2, 0x8e, 0x1b, - 0xf7, 0x13, 0xe0, 0x41, 0x1e, 0x7d, 0x0f, 0x26, 0xef, 0x18, 0x7b, 0x4e, 0xf8, 0x07, 0x14, 0x86, - 0xb2, 0xed, 0x9a, 0x4e, 0xc7, 0x22, 0x22, 0x1b, 0xab, 0xec, 0xa5, 0x1e, 0xed, 0x66, 0x1c, 0x79, - 0xda, 0xab, 0xce, 0x25, 0x00, 0xe2, 0x1f, 0x17, 0x9c, 0x14, 0xa1, 0x3b, 0x30, 0xfe, 0x09, 0x4e, - 0x8f, 0xdf, 0x87, 0x62, 0xd4, 0xdf, 0x7f, 0xcc, 0x2a, 0xf5, 0x87, 0x50, 0x60, 0x11, 0xaf, 0xe6, - 0xd2, 0x73, 0x5a, 0x9c, 0x64, 0xe3, 0x94, 0x49, 0xd3, 0x38, 0xe9, 0x2d, 0x28, 0xdf, 0x6d, 0x5b, - 0x2f, 0xf8, 0x17, 0x64, 0x26, 0x75, 0xd5, 0xba, 0x0a, 0xe2, 0xcf, 0x74, 0x56, 0x20, 0x44, 0xe5, - 0x8e, 0x15, 0x88, 0x78, 0xe1, 0x8d, 0xed, 0xca, 0x7f, 0xa6, 0x01, 0xf0, 0xa5, 0xd4, 0xfa, 0x11, - 0x71, 0x03, 0x76, 0x0e, 0x2c, 0xf0, 0xfb, 0xcf, 0x81, 0x67, 0x06, 0x8e, 0x41, 0x77, 0x21, 0xef, - 0x89, 0x68, 0x12, 0x7f, 0x43, 0x8e, 0xb8, 0xf9, 0x0c, 0x1f, 0x81, 0x88, 0x27, 0x2c, 0x85, 0xd5, - 0x97, 0x9e, 0x3e, 0x5b, 0x18, 0xfb, 0xe0, 0xd9, 0xc2, 0xd8, 0x87, 0xcf, 0x16, 0xc6, 0xde, 0x3d, - 0x59, 0xd0, 0x9e, 0x9e, 0x2c, 0x68, 0x1f, 0x9c, 0x2c, 0x68, 0x1f, 0x9e, 0x2c, 0x68, 0x1f, 0x9d, - 0x2c, 0x68, 0x8f, 0xff, 0xb9, 0x30, 0x76, 0x3f, 0x73, 0xb4, 0xf2, 0xdf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x61, 0xb7, 0xc5, 0x7c, 0xc2, 0x24, 0x00, 0x00, + // 2832 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x1a, 0xcd, 0x6f, 0x23, 0x57, + 0x3d, 0x63, 0xc7, 0x89, 0xfd, 0x73, 0x9c, 0x8f, 0xb7, 0x59, 0xf0, 0x06, 0x11, 0xa7, 0x53, 0xb4, + 0xda, 0x42, 0xeb, 0x34, 0x4b, 0xa9, 0xb6, 0x5b, 0x5a, 0x88, 0xe3, 0x64, 0x1b, 0x9a, 0x34, 0xd1, + 0xcb, 0xee, 0x02, 0xa5, 0x42, 0x9d, 0x78, 0x5e, 0x9c, 0x21, 0xe3, 0x19, 0xf7, 0xbd, 0x71, 0xb2, + 0x86, 0x03, 0x3d, 0x80, 0x00, 0x09, 0xaa, 0x1e, 0x11, 0x07, 0xd4, 0x0a, 0xfe, 0x02, 0x2e, 0xf0, + 0x07, 0x20, 0xd1, 0x63, 0x25, 0x2e, 0x95, 0x40, 0x56, 0x37, 0x1c, 0x38, 0x22, 0xae, 0xb9, 0x80, + 0xde, 0xc7, 0xcc, 0xbc, 0xf1, 0xc7, 0x66, 0xdc, 0x2d, 0x15, 0x37, 0xcf, 0xef, 0xfb, 0xbd, 0xf7, + 0x7b, 0xbf, 0xaf, 0x67, 0xd8, 0x3d, 0xb9, 0xc5, 0xaa, 0x8e, 0xbf, 0x7a, 0xd2, 0x39, 0x24, 0xd4, + 0x23, 0x01, 0x61, 0xab, 0xa7, 0xc4, 0xb3, 0x7d, 0xba, 0xaa, 0x10, 0x56, 0xdb, 0x69, 0x59, 0x8d, + 0x63, 0xc7, 0x23, 0xb4, 0xbb, 0xda, 0x3e, 0x69, 0x72, 0x00, 0x5b, 0x6d, 0x91, 0xc0, 0x5a, 0x3d, + 0x5d, 0x5b, 0x6d, 0x12, 0x8f, 0x50, 0x2b, 0x20, 0x76, 0xb5, 0x4d, 0xfd, 0xc0, 0x47, 0x5f, 0x92, + 0x5c, 0x55, 0x9d, 0xab, 0xda, 0x3e, 0x69, 0x72, 0x00, 0xab, 0x72, 0xae, 0xea, 0xe9, 0xda, 0xd2, + 0x33, 0x4d, 0x27, 0x38, 0xee, 0x1c, 0x56, 0x1b, 0x7e, 0x6b, 0xb5, 0xe9, 0x37, 0xfd, 0x55, 0xc1, + 0x7c, 0xd8, 0x39, 0x12, 0x5f, 0xe2, 0x43, 0xfc, 0x92, 0x42, 0x97, 0x46, 0x9a, 0x42, 0x3b, 0x5e, + 0xe0, 0xb4, 0x48, 0xbf, 0x15, 0x4b, 0xcf, 0x5f, 0xc6, 0xc0, 0x1a, 0xc7, 0xa4, 0x65, 0xf5, 0xf3, + 0x99, 0x7f, 0xc9, 0x42, 0x7e, 0x7d, 0x7f, 0xfb, 0x0e, 0xf5, 0x3b, 0x6d, 0xb4, 0x02, 0x93, 0x9e, + 0xd5, 0x22, 0x65, 0x63, 0xc5, 0xb8, 0x51, 0xa8, 0xcd, 0x7c, 0xd0, 0xab, 0x4c, 0x9c, 0xf7, 0x2a, + 0x93, 0xaf, 0x59, 0x2d, 0x82, 0x05, 0x06, 0xb9, 0x90, 0x3f, 0x25, 0x94, 0x39, 0xbe, 0xc7, 0xca, + 0x99, 0x95, 0xec, 0x8d, 0xe2, 0xcd, 0x97, 0xab, 0x69, 0xd6, 0x5f, 0x15, 0x0a, 0xee, 0x4b, 0xd6, + 0x2d, 0x9f, 0xd6, 0x1d, 0xd6, 0xf0, 0x4f, 0x09, 0xed, 0xd6, 0xe6, 0x95, 0x96, 0xbc, 0x42, 0x32, + 0x1c, 0x69, 0x40, 0x3f, 0x31, 0x60, 0xbe, 0x4d, 0xc9, 0x11, 0xa1, 0x94, 0xd8, 0x0a, 0x5f, 0xce, + 0xae, 0x18, 0x9f, 0x82, 0xda, 0xb2, 0x52, 0x3b, 0xbf, 0xdf, 0x27, 0x1f, 0x0f, 0x68, 0x44, 0xbf, + 0x33, 0x60, 0x89, 0x11, 0x7a, 0x4a, 0xe8, 0xba, 0x6d, 0x53, 0xc2, 0x58, 0xad, 0xbb, 0xe1, 0x3a, + 0xc4, 0x0b, 0x36, 0xb6, 0xeb, 0x98, 0x95, 0x27, 0xc5, 0x3e, 0x7c, 0x23, 0x9d, 0x41, 0x07, 0xa3, + 0xe4, 0xd4, 0x4c, 0x65, 0xd1, 0xd2, 0x48, 0x12, 0x86, 0x1f, 0x61, 0x86, 0x79, 0x04, 0x33, 0xe1, + 0x41, 0xee, 0x38, 0x2c, 0x40, 0xf7, 0x61, 0xaa, 0xc9, 0x3f, 0x58, 0xd9, 0x10, 0x06, 0x56, 0xd3, + 0x19, 0x18, 0xca, 0xa8, 0xcd, 0x2a, 0x7b, 0xa6, 0xc4, 0x27, 0xc3, 0x4a, 0x9a, 0xf9, 0x8b, 0x49, + 0x28, 0xae, 0xef, 0x6f, 0x63, 0xc2, 0xfc, 0x0e, 0x6d, 0x90, 0x14, 0x4e, 0x73, 0x0b, 0x66, 0x98, + 0xe3, 0x35, 0x3b, 0xae, 0x45, 0x39, 0xb4, 0x3c, 0x25, 0x28, 0x17, 0x15, 0xe5, 0xcc, 0x81, 0x86, + 0xc3, 0x09, 0x4a, 0x74, 0x13, 0x80, 0x4b, 0x60, 0x6d, 0xab, 0x41, 0xec, 0x72, 0x66, 0xc5, 0xb8, + 0x91, 0xaf, 0x21, 0xc5, 0x07, 0xaf, 0x45, 0x18, 0xac, 0x51, 0xa1, 0x27, 0x21, 0x27, 0x2c, 0x2d, + 0xe7, 0x85, 0x9a, 0x92, 0x22, 0xcf, 0x89, 0x65, 0x60, 0x89, 0x43, 0x4f, 0xc1, 0xb4, 0xf2, 0xb2, + 0x72, 0x41, 0x90, 0xcd, 0x29, 0xb2, 0xe9, 0xd0, 0x0d, 0x42, 0x3c, 0x5f, 0xdf, 0x89, 0xe3, 0xd9, + 0xc2, 0xef, 0xb4, 0xf5, 0xbd, 0xea, 0x78, 0x36, 0x16, 0x18, 0xb4, 0x03, 0xb9, 0x53, 0x42, 0x0f, + 0xb9, 0x27, 0x70, 0xd7, 0xfc, 0x4a, 0xba, 0x8d, 0xbe, 0xcf, 0x59, 0x6a, 0x05, 0x6e, 0x9a, 0xf8, + 0x89, 0xa5, 0x10, 0x54, 0x05, 0x60, 0xc7, 0x3e, 0x0d, 0xc4, 0xf2, 0xca, 0xb9, 0x95, 0xec, 0x8d, + 0x42, 0x6d, 0x96, 0xaf, 0xf7, 0x20, 0x82, 0x62, 0x8d, 0x82, 0xd3, 0x37, 0xac, 0x80, 0x34, 0x7d, + 0xea, 0x10, 0x56, 0x9e, 0x8e, 0xe9, 0x37, 0x22, 0x28, 0xd6, 0x28, 0xd0, 0xb7, 0x00, 0xb1, 0xc0, + 0xa7, 0x56, 0x93, 0xa8, 0xa5, 0xbe, 0x62, 0xb1, 0xe3, 0x32, 0x88, 0xd5, 0x2d, 0xa9, 0xd5, 0xa1, + 0x83, 0x01, 0x0a, 0x3c, 0x84, 0xcb, 0xfc, 0x83, 0x01, 0x73, 0x9a, 0x2f, 0x08, 0xbf, 0xbb, 0x05, + 0x33, 0x4d, 0xed, 0xd6, 0x29, 0xbf, 0x88, 0x4e, 0x5b, 0xbf, 0x91, 0x38, 0x41, 0x89, 0x08, 0x14, + 0xa8, 0x92, 0x14, 0x46, 0x97, 0xb5, 0xd4, 0x4e, 0x1b, 0xda, 0x10, 0x6b, 0xd2, 0x80, 0x0c, 0xc7, + 0x92, 0xcd, 0x7f, 0x1a, 0xc2, 0x81, 0xc3, 0x78, 0x83, 0x6e, 0x68, 0x31, 0xcd, 0x10, 0xdb, 0x37, + 0x33, 0x22, 0x1e, 0x5d, 0x12, 0x08, 0x32, 0xff, 0x17, 0x81, 0xe0, 0x76, 0xfe, 0xd7, 0xef, 0x55, + 0x26, 0xde, 0xfe, 0xfb, 0xca, 0x84, 0xf9, 0x9f, 0x0c, 0x14, 0x36, 0x7c, 0xcf, 0x76, 0x02, 0xe5, + 0xc8, 0x41, 0xb7, 0x3d, 0x70, 0x51, 0xef, 0x76, 0xdb, 0x04, 0x0b, 0x0c, 0x7a, 0x01, 0xa6, 0x58, + 0x60, 0x05, 0x1d, 0x26, 0xae, 0x5a, 0xa1, 0xf6, 0x44, 0x18, 0x02, 0x0e, 0x04, 0xf4, 0xa2, 0x57, + 0x99, 0x8b, 0xc4, 0x49, 0x10, 0x56, 0x0c, 0xdc, 0xab, 0xfc, 0x43, 0x61, 0x94, 0x7d, 0x47, 0xa6, + 0x98, 0x30, 0x56, 0x67, 0x63, 0xaf, 0xda, 0x1b, 0xa0, 0xc0, 0x43, 0xb8, 0xd0, 0x29, 0x20, 0xd7, + 0x62, 0xc1, 0x5d, 0x6a, 0x79, 0x4c, 0xe8, 0xba, 0xeb, 0xb4, 0x88, 0xba, 0x5c, 0x5f, 0x4e, 0xb7, + 0xbb, 0x9c, 0x23, 0xd6, 0xbb, 0x33, 0x20, 0x0d, 0x0f, 0xd1, 0x80, 0xae, 0xc3, 0x14, 0x25, 0x16, + 0xf3, 0xbd, 0x72, 0x4e, 0x2c, 0x3f, 0x8a, 0x80, 0x58, 0x40, 0xb1, 0xc2, 0xf2, 0xe0, 0xd1, 0x22, + 0x8c, 0x59, 0xcd, 0x30, 0x94, 0x45, 0xc1, 0x63, 0x57, 0x82, 0x71, 0x88, 0x37, 0x5b, 0x50, 0xda, + 0xa0, 0xc4, 0x0a, 0xc8, 0x5e, 0x3b, 0x10, 0x2e, 0x64, 0xc2, 0x94, 0x4d, 0xbb, 0xb8, 0xe3, 0x29, + 0x57, 0x03, 0x2e, 0xbf, 0x2e, 0x20, 0x58, 0x61, 0xf8, 0x0d, 0x3a, 0x72, 0x88, 0x6b, 0xef, 0x5a, + 0x9e, 0xd5, 0x24, 0x54, 0x45, 0x9e, 0xc8, 0xaf, 0xb7, 0x34, 0x1c, 0x4e, 0x50, 0x9a, 0x3f, 0xcb, + 0x42, 0xa9, 0x4e, 0x5c, 0x12, 0xeb, 0xdb, 0x02, 0xd4, 0xa4, 0x56, 0x83, 0xec, 0x13, 0xea, 0xf8, + 0xf6, 0x01, 0x69, 0xf8, 0x9e, 0xcd, 0x84, 0x0b, 0x64, 0x6b, 0x9f, 0xe3, 0x7b, 0x73, 0x67, 0x00, + 0x8b, 0x87, 0x70, 0x20, 0x17, 0x4a, 0x6d, 0x2a, 0x7e, 0x8b, 0xfd, 0x92, 0x1e, 0x52, 0xbc, 0xf9, + 0xd5, 0x74, 0xc7, 0xb1, 0xaf, 0xb3, 0xd6, 0x16, 0xce, 0x7b, 0x95, 0x52, 0x02, 0x84, 0x93, 0xc2, + 0xd1, 0x37, 0x61, 0xde, 0xa7, 0xed, 0x63, 0xcb, 0xab, 0x93, 0x36, 0xf1, 0x6c, 0xe2, 0x05, 0x4c, + 0xec, 0x42, 0xbe, 0xb6, 0xc8, 0x73, 0xf6, 0x5e, 0x1f, 0x0e, 0x0f, 0x50, 0xa3, 0xd7, 0x61, 0xa1, + 0x4d, 0xfd, 0xb6, 0xd5, 0x14, 0x2e, 0xb5, 0xef, 0xbb, 0x4e, 0xa3, 0x2b, 0x5c, 0xa8, 0x50, 0x7b, + 0xfa, 0xbc, 0x57, 0x59, 0xd8, 0xef, 0x47, 0x5e, 0xf4, 0x2a, 0x57, 0xc4, 0xd6, 0x71, 0x48, 0x8c, + 0xc4, 0x83, 0x62, 0xb4, 0x33, 0xcc, 0x8d, 0x3a, 0x43, 0x73, 0x1b, 0xf2, 0xf5, 0x8e, 0xf2, 0xe7, + 0x97, 0x20, 0x6f, 0xab, 0xdf, 0x6a, 0xe7, 0xc3, 0x8b, 0x15, 0xd1, 0x5c, 0xf4, 0x2a, 0x25, 0x5e, + 0xa6, 0x55, 0x43, 0x00, 0x8e, 0x58, 0xcc, 0x37, 0xa0, 0xb4, 0xf9, 0xa0, 0xed, 0xd3, 0x20, 0x3c, + 0xd3, 0xeb, 0x30, 0x45, 0x04, 0x40, 0x48, 0xcb, 0xc7, 0x7e, 0x2a, 0xc9, 0xb0, 0xc2, 0xf2, 0x4c, + 0x48, 0x1e, 0x58, 0x8d, 0x40, 0x25, 0xce, 0x28, 0x13, 0x6e, 0x72, 0x20, 0x96, 0x38, 0xf3, 0x3a, + 0xe4, 0x85, 0x43, 0xb1, 0xfb, 0x6b, 0x68, 0x1e, 0xb2, 0xd8, 0x3a, 0x13, 0x52, 0x67, 0x70, 0x96, + 0x5a, 0x67, 0x5a, 0x2c, 0xd9, 0x03, 0xb8, 0x43, 0x22, 0x13, 0xd6, 0x61, 0x2e, 0x0c, 0xa8, 0xc9, + 0x38, 0xff, 0x79, 0xa5, 0x64, 0x0e, 0x27, 0xd1, 0xb8, 0x9f, 0xde, 0x7c, 0x03, 0x0a, 0x22, 0x17, + 0xf0, 0x44, 0x1a, 0x27, 0x6d, 0xe3, 0x11, 0x49, 0x3b, 0xcc, 0xc4, 0x99, 0x51, 0x99, 0x58, 0x33, + 0xd7, 0x85, 0x92, 0xe4, 0x0d, 0xcb, 0x94, 0x54, 0x1a, 0x9e, 0x86, 0x7c, 0x68, 0xa6, 0xd2, 0x12, + 0x95, 0xa7, 0xa1, 0x20, 0x1c, 0x51, 0x68, 0xda, 0x8e, 0x21, 0x91, 0xd7, 0xd2, 0x29, 0xd3, 0x6a, + 0x90, 0xcc, 0xa3, 0x6b, 0x10, 0x4d, 0xd3, 0x8f, 0xa1, 0x3c, 0xaa, 0xa6, 0x7d, 0x8c, 0xcc, 0x9b, + 0xde, 0x14, 0xf3, 0x1d, 0x03, 0xe6, 0x75, 0x49, 0xe9, 0x8f, 0x2f, 0xbd, 0x92, 0xcb, 0x6b, 0x2e, + 0x6d, 0x47, 0x7e, 0x6b, 0xc0, 0x62, 0x62, 0x69, 0x63, 0x9d, 0xf8, 0x18, 0x46, 0xe9, 0xce, 0x91, + 0x1d, 0xc3, 0x39, 0xfe, 0x9a, 0x81, 0xd2, 0x8e, 0x75, 0x48, 0xdc, 0x03, 0xe2, 0x92, 0x46, 0xe0, + 0x53, 0xf4, 0x23, 0x28, 0xb6, 0xac, 0xa0, 0x71, 0x2c, 0xa0, 0x61, 0x7d, 0x5e, 0x4f, 0x17, 0x4a, + 0x13, 0x92, 0xaa, 0xbb, 0xb1, 0x98, 0x4d, 0x2f, 0xa0, 0xdd, 0xda, 0x15, 0x65, 0x52, 0x51, 0xc3, + 0x60, 0x5d, 0x9b, 0x68, 0xaa, 0xc4, 0xf7, 0xe6, 0x83, 0x36, 0x2f, 0x1e, 0xc6, 0xef, 0xe5, 0x12, + 0x26, 0x60, 0xf2, 0x56, 0xc7, 0xa1, 0xa4, 0x45, 0xbc, 0x20, 0x6e, 0xaa, 0x76, 0xfb, 0xe4, 0xe3, + 0x01, 0x8d, 0x4b, 0x2f, 0xc3, 0x7c, 0xbf, 0xf1, 0x3c, 0xfe, 0x9c, 0x90, 0xae, 0x3c, 0x2f, 0xcc, + 0x7f, 0xa2, 0x45, 0xc8, 0x9d, 0x5a, 0x6e, 0x47, 0xdd, 0x46, 0x2c, 0x3f, 0x6e, 0x67, 0x6e, 0x19, + 0xe6, 0xef, 0x0d, 0x28, 0x8f, 0x32, 0x04, 0x7d, 0x51, 0x13, 0x54, 0x2b, 0x2a, 0xab, 0xb2, 0xaf, + 0x92, 0xae, 0x94, 0xba, 0x09, 0x79, 0xbf, 0xcd, 0xab, 0x0d, 0x9f, 0xaa, 0x53, 0x7f, 0x2a, 0x3c, + 0xc9, 0x3d, 0x05, 0xbf, 0xe8, 0x55, 0xae, 0x26, 0xc4, 0x87, 0x08, 0x1c, 0xb1, 0xf2, 0x3c, 0x20, + 0xec, 0xe1, 0xb9, 0x29, 0xca, 0x03, 0xf7, 0x05, 0x04, 0x2b, 0x8c, 0xf9, 0x27, 0x03, 0x26, 0x45, + 0x59, 0xfc, 0x06, 0xe4, 0xf9, 0xfe, 0xd9, 0x56, 0x60, 0x09, 0xbb, 0x52, 0x37, 0x64, 0x9c, 0x7b, + 0x97, 0x04, 0x56, 0xec, 0x6d, 0x21, 0x04, 0x47, 0x12, 0x11, 0x86, 0x9c, 0x13, 0x90, 0x56, 0x78, + 0x90, 0xcf, 0x8c, 0x14, 0xad, 0xc6, 0x01, 0x55, 0x6c, 0x9d, 0x6d, 0x3e, 0x08, 0x88, 0xc7, 0x0f, + 0x23, 0xbe, 0x1a, 0xdb, 0x5c, 0x06, 0x96, 0xa2, 0xcc, 0x7f, 0x1b, 0x10, 0xa9, 0xe2, 0xce, 0xcf, + 0x88, 0x7b, 0xb4, 0xe3, 0x78, 0x27, 0x6a, 0x5b, 0x23, 0x73, 0x0e, 0x14, 0x1c, 0x47, 0x14, 0xc3, + 0xd2, 0x43, 0x66, 0xbc, 0xf4, 0xc0, 0x15, 0x36, 0x7c, 0x2f, 0x70, 0xbc, 0xce, 0xc0, 0x6d, 0xdb, + 0x50, 0x70, 0x1c, 0x51, 0xf0, 0x32, 0x87, 0x92, 0x96, 0xe5, 0x78, 0x8e, 0xd7, 0xe4, 0x8b, 0xd8, + 0xf0, 0x3b, 0x5e, 0x20, 0xf2, 0xbd, 0x2a, 0x73, 0xf0, 0x00, 0x16, 0x0f, 0xe1, 0x30, 0xff, 0x38, + 0x09, 0x45, 0xbe, 0xe6, 0x30, 0xcf, 0xbd, 0x08, 0x25, 0x57, 0xf7, 0x02, 0xb5, 0xf6, 0xab, 0xca, + 0x94, 0xe4, 0xbd, 0xc6, 0x49, 0x5a, 0xce, 0x2c, 0xaa, 0xb3, 0x88, 0x39, 0x93, 0x64, 0xde, 0xd2, + 0x91, 0x38, 0x49, 0xcb, 0xa3, 0xd7, 0x19, 0xbf, 0x1f, 0xaa, 0xee, 0x89, 0x8e, 0xe8, 0xdb, 0x1c, + 0x88, 0x25, 0x0e, 0xed, 0xc2, 0x15, 0xcb, 0x75, 0xfd, 0x33, 0x01, 0xac, 0xf9, 0xfe, 0x49, 0xcb, + 0xa2, 0x27, 0x4c, 0xb4, 0xb4, 0xf9, 0xda, 0x17, 0x14, 0xcb, 0x95, 0xf5, 0x41, 0x12, 0x3c, 0x8c, + 0x6f, 0xd8, 0xb1, 0x4d, 0x8e, 0x79, 0x6c, 0xc7, 0xb0, 0xd8, 0x07, 0x12, 0xb7, 0x5c, 0xf5, 0x97, + 0xcf, 0x29, 0x39, 0x8b, 0x78, 0x08, 0xcd, 0xc5, 0x08, 0x38, 0x1e, 0x2a, 0x11, 0xdd, 0x86, 0x59, + 0xee, 0xc9, 0x7e, 0x27, 0x08, 0xab, 0xda, 0x9c, 0x38, 0x6e, 0x74, 0xde, 0xab, 0xcc, 0xde, 0x4d, + 0x60, 0x70, 0x1f, 0x25, 0xdf, 0x5c, 0xd7, 0x69, 0x39, 0x41, 0x79, 0x5a, 0xb0, 0x44, 0x9b, 0xbb, + 0xc3, 0x81, 0x58, 0xe2, 0x12, 0x1e, 0x98, 0xbf, 0xcc, 0x03, 0xcd, 0xdf, 0x64, 0x01, 0xc9, 0x32, + 0xdc, 0x96, 0xf5, 0x94, 0x0c, 0x69, 0xbc, 0x57, 0x50, 0x65, 0xbc, 0xd1, 0xd7, 0x2b, 0xa8, 0x0a, + 0x3e, 0xc4, 0xa3, 0x5d, 0x28, 0xc8, 0xd0, 0x12, 0x5f, 0x97, 0x55, 0x45, 0x5c, 0xd8, 0x0b, 0x11, + 0x17, 0xbd, 0xca, 0x52, 0x42, 0x4d, 0x84, 0x11, 0x7d, 0x5c, 0x2c, 0x01, 0xdd, 0x04, 0xb0, 0xda, + 0x8e, 0x3e, 0x35, 0x2b, 0xc4, 0xb3, 0x93, 0xb8, 0xff, 0xc5, 0x1a, 0x15, 0x7a, 0x05, 0x26, 0x83, + 0x4f, 0xd6, 0x6b, 0xe5, 0x45, 0x2b, 0xc9, 0x3b, 0x2b, 0x21, 0x81, 0x6b, 0x17, 0xfe, 0xcc, 0xb8, + 0x59, 0xaa, 0x4d, 0x8a, 0xb4, 0x6f, 0x45, 0x18, 0xac, 0x51, 0xa1, 0xef, 0x40, 0xfe, 0x48, 0x95, + 0xa2, 0xe2, 0x60, 0x52, 0x87, 0xc8, 0xb0, 0x80, 0x95, 0x8d, 0x7b, 0xf8, 0x85, 0x23, 0x69, 0xe6, + 0x5b, 0x50, 0xd8, 0x75, 0x1a, 0xd4, 0x17, 0x6d, 0xde, 0x53, 0x30, 0xcd, 0x12, 0x7d, 0x50, 0x74, + 0x24, 0xa1, 0xbb, 0x84, 0x78, 0xee, 0x27, 0x9e, 0xe5, 0xf9, 0xb2, 0xdb, 0xc9, 0xc5, 0x7e, 0xf2, + 0x1a, 0x07, 0x62, 0x89, 0xbb, 0xbd, 0xc8, 0x33, 0xfd, 0xcf, 0xdf, 0xaf, 0x4c, 0xbc, 0xfb, 0x7e, + 0x65, 0xe2, 0xbd, 0xf7, 0x55, 0xd6, 0xbf, 0x00, 0x80, 0xbd, 0xc3, 0x1f, 0x90, 0x86, 0x8c, 0x9f, + 0xa9, 0xa6, 0x64, 0xe1, 0x70, 0x56, 0x4c, 0xc9, 0x32, 0x7d, 0xd5, 0x9b, 0x86, 0xc3, 0x09, 0x4a, + 0xb4, 0x0a, 0x85, 0x68, 0xfe, 0xa5, 0x0e, 0x7a, 0x21, 0x74, 0x9c, 0x68, 0x48, 0x86, 0x63, 0x9a, + 0x44, 0x30, 0x9f, 0xbc, 0x34, 0x98, 0xd7, 0x20, 0xdb, 0x71, 0x6c, 0xd5, 0x13, 0x3f, 0x1b, 0x26, + 0xd3, 0x7b, 0xdb, 0xf5, 0x8b, 0x5e, 0xe5, 0x89, 0x51, 0x63, 0xe7, 0xa0, 0xdb, 0x26, 0xac, 0x7a, + 0x6f, 0xbb, 0x8e, 0x39, 0xf3, 0xb0, 0xc8, 0x32, 0x35, 0x66, 0x64, 0xb9, 0x09, 0xd0, 0x8c, 0x27, + 0x0b, 0xf2, 0xe2, 0x46, 0x1e, 0xa5, 0x4d, 0x14, 0x34, 0x2a, 0xc4, 0x60, 0xa1, 0xc1, 0xdb, 0x6f, + 0xd5, 0xe1, 0xb3, 0xc0, 0x6a, 0xc9, 0xb9, 0xe0, 0x78, 0xce, 0x7d, 0x4d, 0xa9, 0x59, 0xd8, 0xe8, + 0x17, 0x86, 0x07, 0xe5, 0x23, 0x1f, 0x16, 0x6c, 0xd5, 0x48, 0xc6, 0x4a, 0x0b, 0x63, 0x2b, 0xbd, + 0xca, 0x15, 0xd6, 0xfb, 0x05, 0xe1, 0x41, 0xd9, 0xe8, 0xfb, 0xb0, 0x14, 0x02, 0x07, 0xbb, 0x79, + 0x11, 0x79, 0xb3, 0xb5, 0xe5, 0xf3, 0x5e, 0x65, 0xa9, 0x3e, 0x92, 0x0a, 0x3f, 0x42, 0x02, 0xb2, + 0x61, 0xca, 0x95, 0x95, 0x6a, 0x51, 0x54, 0x17, 0x5f, 0x4f, 0xb7, 0x8a, 0xd8, 0xfb, 0xab, 0x7a, + 0x85, 0x1a, 0x75, 0xab, 0xaa, 0x38, 0x55, 0xb2, 0xd1, 0x03, 0x28, 0x5a, 0x9e, 0xe7, 0x07, 0x96, + 0x9c, 0x2f, 0xcc, 0x08, 0x55, 0xeb, 0x63, 0xab, 0x5a, 0x8f, 0x65, 0xf4, 0x55, 0xc4, 0x1a, 0x06, + 0xeb, 0xaa, 0xd0, 0x19, 0xcc, 0xf9, 0x67, 0x1e, 0xa1, 0x98, 0x1c, 0x11, 0x4a, 0xbc, 0x06, 0x61, + 0xe5, 0x92, 0xd0, 0xfe, 0x5c, 0x4a, 0xed, 0x09, 0xe6, 0xd8, 0xa5, 0x93, 0x70, 0x86, 0xfb, 0xb5, + 0xa0, 0x2a, 0x0f, 0x92, 0x9e, 0xe5, 0x3a, 0x3f, 0x24, 0x94, 0x95, 0x67, 0xe3, 0xd1, 0xed, 0x56, + 0x04, 0xc5, 0x1a, 0x05, 0xfa, 0x1a, 0x14, 0x1b, 0x6e, 0x87, 0x05, 0x44, 0xce, 0xd1, 0xe7, 0xc4, + 0x0d, 0x8a, 0xd6, 0xb7, 0x11, 0xa3, 0xb0, 0x4e, 0x87, 0x3a, 0x50, 0x6a, 0xe9, 0x29, 0xa3, 0xbc, + 0x20, 0x56, 0x77, 0x2b, 0xdd, 0xea, 0x06, 0x93, 0x5a, 0x5c, 0xc1, 0x24, 0x70, 0x38, 0xa9, 0x65, + 0xe9, 0x05, 0x28, 0x7e, 0xc2, 0xe2, 0x9e, 0x37, 0x07, 0xfd, 0xe7, 0x38, 0x56, 0x73, 0xf0, 0xe7, + 0x0c, 0xcc, 0x26, 0x77, 0xbf, 0x2f, 0x1d, 0xe6, 0x52, 0xa5, 0xc3, 0xb0, 0x0d, 0x35, 0x46, 0x8e, + 0xfe, 0xc3, 0xb0, 0x9e, 0x1d, 0x19, 0xd6, 0x55, 0xf4, 0x9c, 0x7c, 0x9c, 0xe8, 0x59, 0x05, 0xe0, + 0x75, 0x06, 0xf5, 0x5d, 0x97, 0x50, 0x11, 0x38, 0xf3, 0x6a, 0xc4, 0x1f, 0x41, 0xb1, 0x46, 0xc1, + 0xab, 0xe1, 0x43, 0xd7, 0x6f, 0x9c, 0x88, 0x2d, 0x08, 0x2f, 0xbd, 0x08, 0x99, 0x79, 0x59, 0x0d, + 0xd7, 0x06, 0xb0, 0x78, 0x08, 0x87, 0xd9, 0x85, 0xab, 0xfb, 0x16, 0x0d, 0x1c, 0xcb, 0x8d, 0x2f, + 0x98, 0x68, 0x37, 0xde, 0x1c, 0x68, 0x66, 0x9e, 0x1d, 0xf7, 0xa2, 0xc6, 0x9b, 0x1f, 0xc3, 0xe2, + 0x86, 0xc6, 0xfc, 0x9b, 0x01, 0xd7, 0x86, 0xea, 0xfe, 0x0c, 0x9a, 0xa9, 0x37, 0x93, 0xcd, 0xd4, + 0x8b, 0x29, 0x67, 0x9c, 0xc3, 0xac, 0x1d, 0xd1, 0x5a, 0x4d, 0x43, 0x6e, 0x9f, 0x17, 0xb1, 0xe6, + 0xaf, 0x0c, 0x98, 0x11, 0xbf, 0xc6, 0x99, 0x0f, 0x57, 0x20, 0x77, 0xe4, 0x87, 0x23, 0xaa, 0xbc, + 0x7c, 0x42, 0xda, 0xe2, 0x00, 0x2c, 0xe1, 0x8f, 0x31, 0x40, 0x7e, 0xc7, 0x80, 0xe4, 0x64, 0x16, + 0xbd, 0x2c, 0xfd, 0xd7, 0x88, 0x46, 0xa7, 0x63, 0xfa, 0xee, 0x4b, 0xa3, 0x5a, 0xc1, 0x2b, 0xa9, + 0xa6, 0x84, 0x4f, 0x43, 0x01, 0xfb, 0x7e, 0xb0, 0x6f, 0x05, 0xc7, 0x8c, 0x2f, 0xbc, 0xcd, 0x7f, + 0xa8, 0xbd, 0x11, 0x0b, 0x17, 0x18, 0x2c, 0xe1, 0xe6, 0x2f, 0x0d, 0xb8, 0x36, 0xf2, 0xd5, 0x84, + 0x87, 0x80, 0x46, 0xf4, 0xa5, 0x56, 0x14, 0x79, 0x61, 0x4c, 0x87, 0x35, 0x2a, 0xde, 0xc3, 0x25, + 0x9e, 0x5a, 0xfa, 0x7b, 0xb8, 0x84, 0x36, 0x9c, 0xa4, 0x35, 0xff, 0x95, 0x01, 0xf5, 0x74, 0xf2, + 0x3f, 0xf6, 0xd8, 0xeb, 0x7d, 0x0f, 0x37, 0xb3, 0xc9, 0x87, 0x9b, 0xe8, 0x95, 0x46, 0x7b, 0xb9, + 0xc8, 0x3e, 0xfa, 0xe5, 0x02, 0x3d, 0x1f, 0x3d, 0x86, 0xc8, 0xd0, 0xb5, 0x9c, 0x7c, 0x0c, 0xb9, + 0xe8, 0x55, 0x66, 0x94, 0xf0, 0xe4, 0xe3, 0xc8, 0xeb, 0x30, 0x6d, 0x93, 0xc0, 0x72, 0x5c, 0xd9, + 0x8f, 0xa5, 0x7e, 0x22, 0x90, 0xc2, 0xea, 0x92, 0xb5, 0x56, 0xe4, 0x36, 0xa9, 0x0f, 0x1c, 0x0a, + 0xe4, 0xd1, 0xb6, 0xe1, 0xdb, 0xb2, 0x9d, 0xc8, 0xc5, 0xd1, 0x76, 0xc3, 0xb7, 0x09, 0x16, 0x18, + 0xf3, 0x5d, 0x03, 0x8a, 0x52, 0xd2, 0x86, 0xd5, 0x61, 0x04, 0xad, 0x45, 0xab, 0x90, 0xc7, 0x7d, + 0x4d, 0x7f, 0xf5, 0xba, 0xe8, 0x55, 0x0a, 0x82, 0x4c, 0x74, 0x22, 0x43, 0x5e, 0x77, 0x32, 0x97, + 0xec, 0xd1, 0x93, 0x90, 0x13, 0xb7, 0x47, 0x6d, 0x66, 0x74, 0xd7, 0xc5, 0x05, 0xc3, 0x12, 0x67, + 0x7e, 0x9c, 0x81, 0x52, 0x62, 0x71, 0x29, 0x7a, 0x81, 0x68, 0x74, 0x99, 0x49, 0x31, 0x0e, 0x1f, + 0xfd, 0x30, 0xad, 0x72, 0xcf, 0xd4, 0xe3, 0xe4, 0x9e, 0xef, 0xc2, 0x54, 0x83, 0xef, 0x51, 0xf8, + 0x3f, 0x87, 0xb5, 0x71, 0x8e, 0x53, 0xec, 0x6e, 0xec, 0x8d, 0xe2, 0x93, 0x61, 0x25, 0x10, 0xdd, + 0x81, 0x05, 0x4a, 0x02, 0xda, 0x5d, 0x3f, 0x0a, 0x08, 0xd5, 0x9b, 0xf8, 0x5c, 0x5c, 0x71, 0xe3, + 0x7e, 0x02, 0x3c, 0xc8, 0x63, 0x1e, 0xc2, 0xcc, 0x5d, 0xeb, 0xd0, 0x8d, 0x1e, 0xbd, 0x30, 0x94, + 0x1c, 0xaf, 0xe1, 0x76, 0x6c, 0x22, 0xa3, 0x71, 0x18, 0xbd, 0xc2, 0x4b, 0xbb, 0xad, 0x23, 0x2f, + 0x7a, 0x95, 0x2b, 0x09, 0x80, 0x7c, 0xe5, 0xc1, 0x49, 0x11, 0xa6, 0x0b, 0x93, 0x9f, 0x61, 0xf7, + 0xf8, 0x3d, 0x28, 0xc4, 0xf5, 0xfd, 0xa7, 0xac, 0xd2, 0x7c, 0x13, 0xf2, 0xdc, 0xe3, 0xc3, 0xbe, + 0xf4, 0x92, 0x12, 0x27, 0x59, 0x38, 0x65, 0xd2, 0x14, 0x4e, 0x66, 0x0b, 0x4a, 0xf7, 0xda, 0xf6, + 0x63, 0x3e, 0x7b, 0x66, 0x52, 0x67, 0xad, 0x9b, 0x20, 0xff, 0x42, 0xc1, 0x13, 0x84, 0xcc, 0xdc, + 0x5a, 0x82, 0xd0, 0x13, 0xaf, 0x36, 0x95, 0xff, 0xa9, 0x01, 0x20, 0xc6, 0x5f, 0x9b, 0xa7, 0xc4, + 0x0b, 0x52, 0x3c, 0x8e, 0xdf, 0x83, 0x29, 0x5f, 0x7a, 0x93, 0x7c, 0xfa, 0x1c, 0x73, 0xc6, 0x1a, + 0x5d, 0x02, 0xe9, 0x4f, 0x58, 0x09, 0xab, 0xdd, 0xf8, 0xe0, 0xe1, 0xf2, 0xc4, 0x87, 0x0f, 0x97, + 0x27, 0x3e, 0x7a, 0xb8, 0x3c, 0xf1, 0xf6, 0xf9, 0xb2, 0xf1, 0xc1, 0xf9, 0xb2, 0xf1, 0xe1, 0xf9, + 0xb2, 0xf1, 0xd1, 0xf9, 0xb2, 0xf1, 0xf1, 0xf9, 0xb2, 0xf1, 0xee, 0x3f, 0x96, 0x27, 0x5e, 0xcf, + 0x9c, 0xae, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0x82, 0x62, 0x88, 0xff, 0xb8, 0x26, 0x00, 0x00, } func (m *APIGroup) Marshal() (dAtA []byte, err error) { @@ -1752,6 +1788,62 @@ func (m *APIVersions) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Condition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Condition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Condition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x32 + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x2a + { + size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) + i-- + dAtA[i] = 0x18 + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0x12 + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *CreateOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2399,6 +2491,11 @@ func (m *ListOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + i -= len(m.ResourceVersionMatch) + copy(dAtA[i:], m.ResourceVersionMatch) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersionMatch))) + i-- + dAtA[i] = 0x52 i-- if m.AllowWatchBookmarks { dAtA[i] = 1 @@ -3488,6 +3585,26 @@ func (m *APIVersions) Size() (n int) { return n } +func (m *Condition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Status) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.ObservedGeneration)) + l = m.LastTransitionTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *CreateOptions) Size() (n int) { if m == nil { return 0 @@ -3758,6 +3875,8 @@ func (m *ListOptions) Size() (n int) { l = len(m.Continue) n += 1 + l + sovGenerated(uint64(l)) n += 2 + l = len(m.ResourceVersionMatch) + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -4198,6 +4317,21 @@ func (this *APIResourceList) String() string { }, "") return s } +func (this *Condition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Condition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "Time", 1), `&`, ``, 1) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `}`, + }, "") + return s +} func (this *CreateOptions) String() string { if this == nil { return "nil" @@ -4244,16 +4378,6 @@ func (this *ExportOptions) String() string { }, "") return s } -func (this *FieldsV1) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FieldsV1{`, - `Raw:` + valueToStringGenerated(this.Raw) + `,`, - `}`, - }, "") - return s -} func (this *GetOptions) String() string { if this == nil { return "nil" @@ -4355,6 +4479,7 @@ func (this *ListOptions) String() string { `Limit:` + fmt.Sprintf("%v", this.Limit) + `,`, `Continue:` + fmt.Sprintf("%v", this.Continue) + `,`, `AllowWatchBookmarks:` + fmt.Sprintf("%v", this.AllowWatchBookmarks) + `,`, + `ResourceVersionMatch:` + fmt.Sprintf("%v", this.ResourceVersionMatch) + `,`, `}`, }, "") return s @@ -4369,7 +4494,7 @@ func (this *ManagedFieldsEntry) String() string { `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, `Time:` + strings.Replace(fmt.Sprintf("%v", this.Time), "Time", "Time", 1) + `,`, `FieldsType:` + fmt.Sprintf("%v", this.FieldsType) + `,`, - `FieldsV1:` + strings.Replace(this.FieldsV1.String(), "FieldsV1", "FieldsV1", 1) + `,`, + `FieldsV1:` + strings.Replace(fmt.Sprintf("%v", this.FieldsV1), "FieldsV1", "FieldsV1", 1) + `,`, `}`, }, "") return s @@ -5508,6 +5633,239 @@ func (m *APIVersions) Unmarshal(dAtA []byte) error { } return nil } +func (m *Condition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Condition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Condition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) + } + m.ObservedGeneration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ObservedGeneration |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *CreateOptions) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7811,6 +8169,38 @@ func (m *ListOptions) Unmarshal(dAtA []byte) error { } } m.AllowWatchBookmarks = bool(v != 0) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersionMatch", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersionMatch = ResourceVersionMatch(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index ba1194dcc56..b72d43ff00c 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -134,6 +134,73 @@ message APIVersions { repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 2; } +// Condition contains details for one aspect of the current state of this API Resource. +// --- +// This struct is intended for direct use as an array at the field path .status.conditions. For example, +// type FooStatus struct{ +// // Represents the observations of a foo's current state. +// // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" +// // +patchMergeKey=type +// // +patchStrategy=merge +// // +listType=map +// // +listMapKey=type +// Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +// +// // other fields +// } +message Condition { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + optional string type = 1; + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + optional string status = 2; + + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + optional int64 observedGeneration = 3; + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + optional Time lastTransitionTime = 4; + + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + optional string reason = 5; + + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + optional string message = 6; +} + // CreateOptions may be provided when creating an API object. message CreateOptions { // When present, indicates that modifications should not be @@ -224,6 +291,7 @@ message ExportOptions { // If a key maps to an empty Fields value, the field that key represents is part of the set. // // The exact format is defined in sigs.k8s.io/structured-merge-diff +// +protobuf.options.(gogoproto.goproto_stringer)=false message FieldsV1 { // Raw is the underlying serialization of this object. optional bytes Raw = 1; @@ -231,10 +299,12 @@ message FieldsV1 { // GetOptions is the standard query options to the standard REST get call. message GetOptions { - // When specified: - // - if unset, then the result is returned from remote storage based on quorum-read flag; - // - if it's 0, then we simply return what we currently have in cache, no guarantee; - // - if set to non zero, then the result is at least as fresh as given rv. + // resourceVersion sets a constraint on what resource versions a request may be served from. + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for + // details. + // + // Defaults to unset + // +optional optional string resourceVersion = 1; } @@ -420,15 +490,24 @@ message ListOptions { // +optional optional bool allowWatchBookmarks = 9; - // When specified with a watch call, shows changes that occur after that particular version of a resource. - // Defaults to changes from the beginning of history. - // When specified for list: - // - if unset, then the result is returned from remote storage based on quorum-read flag; - // - if it's 0, then we simply return what we currently have in cache, no guarantee; - // - if set to non zero, then the result is at least as fresh as given rv. + // resourceVersion sets a constraint on what resource versions a request may be served from. + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for + // details. + // + // Defaults to unset // +optional optional string resourceVersion = 4; + // resourceVersionMatch determines how resourceVersion is applied to list calls. + // It is highly recommended that resourceVersionMatch be set for list calls where + // resourceVersion is set + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for + // details. + // + // Defaults to unset + // +optional + optional string resourceVersionMatch = 10; + // Timeout for the list/watch call. // This limits the duration of the call, regardless of any activity or inactivity. // +optional @@ -546,7 +625,7 @@ message ObjectMeta { // +optional optional string generateName = 2; - // Namespace defines the space within each name must be unique. An empty namespace is + // Namespace defines the space within which each name must be unique. An empty namespace is // equivalent to the "default" namespace, but "default" is the canonical representation. // Not all objects are required to be scoped to a namespace - the value of this field for // those objects will be empty. diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go index 912cf2036b0..2002f91b0cd 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go @@ -156,7 +156,9 @@ func (meta *ObjectMeta) GetDeletionTimestamp() *Time { return meta.DeletionTimes func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *Time) { meta.DeletionTimestamp = deletionTimestamp } -func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { return meta.DeletionGracePeriodSeconds } +func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { + return meta.DeletionGracePeriodSeconds +} func (meta *ObjectMeta) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds *int64) { meta.DeletionGracePeriodSeconds = deletionGracePeriodSeconds } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index e7aaead8c32..bb57f2cc436 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -135,7 +135,7 @@ type ObjectMeta struct { // +optional GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"` - // Namespace defines the space within each name must be unique. An empty namespace is + // Namespace defines the space within which each name must be unique. An empty namespace is // equivalent to the "default" namespace, but "default" is the canonical representation. // Not all objects are required to be scoped to a namespace - the value of this field for // those objects will be empty. @@ -355,14 +355,23 @@ type ListOptions struct { // +optional AllowWatchBookmarks bool `json:"allowWatchBookmarks,omitempty" protobuf:"varint,9,opt,name=allowWatchBookmarks"` - // When specified with a watch call, shows changes that occur after that particular version of a resource. - // Defaults to changes from the beginning of history. - // When specified for list: - // - if unset, then the result is returned from remote storage based on quorum-read flag; - // - if it's 0, then we simply return what we currently have in cache, no guarantee; - // - if set to non zero, then the result is at least as fresh as given rv. + // resourceVersion sets a constraint on what resource versions a request may be served from. + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for + // details. + // + // Defaults to unset // +optional ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"` + + // resourceVersionMatch determines how resourceVersion is applied to list calls. + // It is highly recommended that resourceVersionMatch be set for list calls where + // resourceVersion is set + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for + // details. + // + // Defaults to unset + // +optional + ResourceVersionMatch ResourceVersionMatch `json:"resourceVersionMatch,omitempty" protobuf:"bytes,10,opt,name=resourceVersionMatch,casttype=ResourceVersionMatch"` // Timeout for the list/watch call. // This limits the duration of the call, regardless of any activity or inactivity. // +optional @@ -402,6 +411,25 @@ type ListOptions struct { Continue string `json:"continue,omitempty" protobuf:"bytes,8,opt,name=continue"` } +// resourceVersionMatch specifies how the resourceVersion parameter is applied. resourceVersionMatch +// may only be set if resourceVersion is also set. +// +// "NotOlderThan" matches data at least as new as the provided resourceVersion. +// "Exact" matches data at the exact resourceVersion provided. +// +// See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for +// details. +type ResourceVersionMatch string + +const ( + // ResourceVersionMatchNotOlderThan matches data at least as new as the provided + // resourceVersion. + ResourceVersionMatchNotOlderThan ResourceVersionMatch = "NotOlderThan" + // ResourceVersionMatchExact matches data at the exact resourceVersion + // provided. + ResourceVersionMatchExact ResourceVersionMatch = "Exact" +) + // +k8s:conversion-gen:explicit-from=net/url.Values // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -423,10 +451,12 @@ type ExportOptions struct { // GetOptions is the standard query options to the standard REST get call. type GetOptions struct { TypeMeta `json:",inline"` - // When specified: - // - if unset, then the result is returned from remote storage based on quorum-read flag; - // - if it's 0, then we simply return what we currently have in cache, no guarantee; - // - if set to non zero, then the result is at least as fresh as given rv. + // resourceVersion sets a constraint on what resource versions a request may be served from. + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for + // details. + // + // Defaults to unset + // +optional ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,1,opt,name=resourceVersion"` // +k8s:deprecated=includeUninitialized,protobuf=2 } @@ -1148,11 +1178,16 @@ const ( // If a key maps to an empty Fields value, the field that key represents is part of the set. // // The exact format is defined in sigs.k8s.io/structured-merge-diff +// +protobuf.options.(gogoproto.goproto_stringer)=false type FieldsV1 struct { // Raw is the underlying serialization of this object. Raw []byte `json:"-" protobuf:"bytes,1,opt,name=Raw"` } +func (f FieldsV1) String() string { + return string(f.Raw) +} + // TODO: Table does not generate to protobuf because of the interface{} - fix protobuf // generation to support a meta type that can accept any valid JSON. This can be introduced // in a v1 because clients a) receive an error if they try to access proto today, and b) @@ -1314,3 +1349,65 @@ type PartialObjectMetadataList struct { // items contains each of the included items. Items []PartialObjectMetadata `json:"items" protobuf:"bytes,2,rep,name=items"` } + +// Condition contains details for one aspect of the current state of this API Resource. +// --- +// This struct is intended for direct use as an array at the field path .status.conditions. For example, +// type FooStatus struct{ +// // Represents the observations of a foo's current state. +// // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" +// // +patchMergeKey=type +// // +patchStrategy=merge +// // +listType=map +// // +listMapKey=type +// Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` +// +// // other fields +// } +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type" protobuf:"bytes,1,opt,name=type"` + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"` + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime Time `json:"lastTransitionTime" protobuf:"bytes,4,opt,name=lastTransitionTime"` + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason" protobuf:"bytes,5,opt,name=reason"` + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message" protobuf:"bytes,6,opt,name=message"` +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go index b62e591ee87..ace0abfb98e 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -86,6 +86,20 @@ func (APIVersions) SwaggerDoc() map[string]string { return map_APIVersions } +var map_Condition = map[string]string{ + "": "Condition contains details for one aspect of the current state of this API Resource.", + "type": "type of condition in CamelCase or in foo.example.com/CamelCase.", + "status": "status of the condition, one of True, False, Unknown.", + "observedGeneration": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "reason": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + "message": "message is a human readable message indicating details about the transition. This may be an empty string.", +} + +func (Condition) SwaggerDoc() map[string]string { + return map_Condition +} + var map_CreateOptions = map[string]string{ "": "CreateOptions may be provided when creating an API object.", "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -129,7 +143,7 @@ func (FieldsV1) SwaggerDoc() map[string]string { var map_GetOptions = map[string]string{ "": "GetOptions is the standard query options to the standard REST get call.", - "resourceVersion": "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "resourceVersion": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", } func (GetOptions) SwaggerDoc() map[string]string { @@ -190,15 +204,16 @@ func (ListMeta) SwaggerDoc() map[string]string { } var map_ListOptions = map[string]string{ - "": "ListOptions is the query options to a standard REST list call.", - "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "allowWatchBookmarks": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", - "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "timeoutSeconds": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "limit": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "continue": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "": "ListOptions is the query options to a standard REST list call.", + "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "allowWatchBookmarks": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.", + "resourceVersion": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "resourceVersionMatch": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "timeoutSeconds": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "limit": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "continue": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", } func (ListOptions) SwaggerDoc() map[string]string { @@ -223,7 +238,7 @@ var map_ObjectMeta = map[string]string{ "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", - "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + "namespace": "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/BUILD b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/BUILD index 47046794675..60bbb33c035 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/BUILD @@ -10,6 +10,7 @@ go_test( name = "go_default_test", srcs = [ "helpers_test.go", + "unstructured_conversion_test.go", "unstructured_list_test.go", "unstructured_test.go", ], @@ -19,9 +20,13 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/testapigroup:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/testing:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/test:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", @@ -45,7 +50,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/json:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go index 4244b8a6df1..54a231e4933 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/json" - "k8s.io/klog" + "k8s.io/klog/v2" ) // NestedFieldCopy returns a deep copy of the value of a nested field. diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go index fcd491f4c07..715adf2f973 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go @@ -18,6 +18,7 @@ package validation import ( "fmt" + "regexp" "unicode" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -184,3 +185,78 @@ func ValidateManagedFields(fieldsList []metav1.ManagedFieldsEntry, fldPath *fiel } return allErrs } + +func ValidateConditions(conditions []metav1.Condition, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + + conditionTypeToFirstIndex := map[string]int{} + for i, condition := range conditions { + if _, ok := conditionTypeToFirstIndex[condition.Type]; ok { + allErrs = append(allErrs, field.Duplicate(fldPath.Index(i).Child("type"), condition.Type)) + } else { + conditionTypeToFirstIndex[condition.Type] = i + } + + allErrs = append(allErrs, ValidateCondition(condition, fldPath.Index(i))...) + } + + return allErrs +} + +// validConditionStatuses is used internally to check validity and provide a good message +var validConditionStatuses = sets.NewString(string(metav1.ConditionTrue), string(metav1.ConditionFalse), string(metav1.ConditionUnknown)) + +const ( + maxReasonLen = 1 * 1024 + maxMessageLen = 32 * 1024 +) + +func ValidateCondition(condition metav1.Condition, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + + // type is set and is a valid format + allErrs = append(allErrs, ValidateLabelName(condition.Type, fldPath.Child("type"))...) + + // status is set and is an accepted value + if !validConditionStatuses.Has(string(condition.Status)) { + allErrs = append(allErrs, field.NotSupported(fldPath.Child("status"), condition.Status, validConditionStatuses.List())) + } + + if condition.ObservedGeneration < 0 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("observedGeneration"), condition.ObservedGeneration, "must be greater than or equal to zero")) + } + + if condition.LastTransitionTime.IsZero() { + allErrs = append(allErrs, field.Required(fldPath.Child("lastTransitionTime"), "must be set")) + } + + if len(condition.Reason) == 0 { + allErrs = append(allErrs, field.Required(fldPath.Child("reason"), "must be set")) + } else { + for _, currErr := range isValidConditionReason(condition.Reason) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("reason"), condition.Reason, currErr)) + } + if len(condition.Reason) > maxReasonLen { + allErrs = append(allErrs, field.TooLong(fldPath.Child("reason"), condition.Reason, maxReasonLen)) + } + } + + if len(condition.Message) > maxMessageLen { + allErrs = append(allErrs, field.TooLong(fldPath.Child("message"), condition.Message, maxMessageLen)) + } + + return allErrs +} + +const conditionReasonFmt string = "[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?" +const conditionReasonErrMsg string = "a condition reason must start with alphabetic character, optionally followed by a string of alphanumeric characters or '_,:', and must end with an alphanumeric character or '_'" + +var conditionReasonRegexp = regexp.MustCompile("^" + conditionReasonFmt + "$") + +// isValidConditionReason tests for a string that conforms to rules for condition reasons. This checks the format, but not the length. +func isValidConditionReason(value string) []string { + if !conditionReasonRegexp.MatchString(value) { + return []string{validation.RegexError(conditionReasonErrMsg, conditionReasonFmt, "my_name", "MY_NAME", "MyName", "ReasonA,ReasonB", "ReasonA:ReasonB")} + } + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go index 2ade69dd9eb..06afd9b5be3 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go @@ -145,6 +145,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*[]string)(nil), (*ResourceVersionMatch)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_Slice_string_To_v1_ResourceVersionMatch(a.(*[]string), b.(*ResourceVersionMatch), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*[]string)(nil), (*Time)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_Slice_string_To_v1_Time(a.(*[]string), b.(*Time), scope) }); err != nil { @@ -415,6 +420,13 @@ func autoConvert_url_Values_To_v1_ListOptions(in *url.Values, out *ListOptions, } else { out.ResourceVersion = "" } + if values, ok := map[string][]string(*in)["resourceVersionMatch"]; ok && len(values) > 0 { + if err := Convert_Slice_string_To_v1_ResourceVersionMatch(&values, &out.ResourceVersionMatch, s); err != nil { + return err + } + } else { + out.ResourceVersionMatch = "" + } if values, ok := map[string][]string(*in)["timeoutSeconds"]; ok && len(values) > 0 { if err := runtime.Convert_Slice_string_To_Pointer_int64(&values, &out.TimeoutSeconds, s); err != nil { return err diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go index b82fdf202f2..1aa73bd24fd 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go @@ -191,6 +191,23 @@ func (in *APIVersions) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CreateOptions) DeepCopyInto(out *CreateOptions) { *out = *in diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/conversion.go index f3e5e4c98d9..5cac6fba5aa 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/conversion.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/conversion.go @@ -16,12 +16,31 @@ limitations under the License. package v1beta1 -import "k8s.io/apimachinery/pkg/conversion" +import ( + "unsafe" + + "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" +) // Convert_Slice_string_To_v1beta1_IncludeObjectPolicy allows converting a URL query parameter value -func Convert_Slice_string_To_v1beta1_IncludeObjectPolicy(input *[]string, out *IncludeObjectPolicy, s conversion.Scope) error { - if len(*input) > 0 { - *out = IncludeObjectPolicy((*input)[0]) +func Convert_Slice_string_To_v1beta1_IncludeObjectPolicy(in *[]string, out *IncludeObjectPolicy, s conversion.Scope) error { + if len(*in) > 0 { + *out = IncludeObjectPolicy((*in)[0]) } return nil } + +// Convert_v1beta1_PartialObjectMetadataList_To_v1_PartialObjectMetadataList allows converting PartialObjectMetadataList between versions +func Convert_v1beta1_PartialObjectMetadataList_To_v1_PartialObjectMetadataList(in *PartialObjectMetadataList, out *v1.PartialObjectMetadataList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1.PartialObjectMetadata)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_PartialObjectMetadataList_To_v1beta1_PartialObjectMetadataList allows converting PartialObjectMetadataList between versions +func Convert_v1_PartialObjectMetadataList_To_v1beta1_PartialObjectMetadataList(in *v1.PartialObjectMetadataList, out *PartialObjectMetadataList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1.PartialObjectMetadata)(unsafe.Pointer(&in.Items)) + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go index 8d11399fbe0..a4a412e3356 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/register.go @@ -17,6 +17,8 @@ limitations under the License. package v1beta1 import ( + "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -43,3 +45,18 @@ func AddMetaToScheme(scheme *runtime.Scheme) error { return nil } + +// RegisterConversions adds conversion functions to the given scheme. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*PartialObjectMetadataList)(nil), (*v1.PartialObjectMetadataList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PartialObjectMetadataList_To_v1_PartialObjectMetadataList(a.(*PartialObjectMetadataList), b.(*v1.PartialObjectMetadataList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.PartialObjectMetadataList)(nil), (*PartialObjectMetadataList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_PartialObjectMetadataList_To_v1beta1_PartialObjectMetadataList(a.(*v1.PartialObjectMetadataList), b.(*PartialObjectMetadataList), scope) + }); err != nil { + return err + } + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/BUILD b/vendor/k8s.io/apimachinery/pkg/conversion/BUILD index 6b5f68b39c0..3b6c8296bb7 100644 --- a/vendor/k8s.io/apimachinery/pkg/conversion/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/conversion/BUILD @@ -13,11 +13,7 @@ go_test( "helper_test.go", ], embed = [":go_default_library"], - deps = [ - "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - ], + deps = ["//vendor/github.com/spf13/pflag:go_default_library"], ) go_library( @@ -45,7 +41,6 @@ filegroup( srcs = [ ":package-srcs", "//staging/src/k8s.io/apimachinery/pkg/conversion/queryparams:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/conversion/unstructured:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/converter.go b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go index 2d7c8bd1e29..838d5b0aac8 100644 --- a/vendor/k8s.io/apimachinery/pkg/conversion/converter.go +++ b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go @@ -442,20 +442,20 @@ func (c *Converter) doConversion(src, dest interface{}, flags FieldMatchingFlags if fn, ok := c.generatedConversionFuncs.untyped[pair]; ok { return fn(src, dest, scope) } - // TODO: consider everything past this point deprecated - we want to support only point to point top level - // conversions dv, err := EnforcePtr(dest) if err != nil { return err } - if !dv.CanAddr() && !dv.CanSet() { - return fmt.Errorf("can't write to dest") - } sv, err := EnforcePtr(src) if err != nil { return err } + return fmt.Errorf("converting (%s) to (%s): unknown conversion", sv.Type(), dv.Type()) + + // TODO: Everything past this point is deprecated. + // Remove in 1.20 once we're sure it didn't break anything. + // Leave something on the stack, so that calls to struct tag getters never fail. scope.srcStack.push(scopeStackElem{}) scope.destStack.push(scopeStackElem{}) diff --git a/vendor/k8s.io/apimachinery/pkg/fields/selector.go b/vendor/k8s.io/apimachinery/pkg/fields/selector.go index e3e4453b64f..a9e204976af 100644 --- a/vendor/k8s.io/apimachinery/pkg/fields/selector.go +++ b/vendor/k8s.io/apimachinery/pkg/fields/selector.go @@ -57,13 +57,15 @@ type Selector interface { type nothingSelector struct{} -func (n nothingSelector) Matches(_ Fields) bool { return false } -func (n nothingSelector) Empty() bool { return false } -func (n nothingSelector) String() string { return "" } -func (n nothingSelector) Requirements() Requirements { return nil } -func (n nothingSelector) DeepCopySelector() Selector { return n } -func (n nothingSelector) RequiresExactMatch(field string) (value string, found bool) { return "", false } -func (n nothingSelector) Transform(fn TransformFunc) (Selector, error) { return n, nil } +func (n nothingSelector) Matches(_ Fields) bool { return false } +func (n nothingSelector) Empty() bool { return false } +func (n nothingSelector) String() string { return "" } +func (n nothingSelector) Requirements() Requirements { return nil } +func (n nothingSelector) DeepCopySelector() Selector { return n } +func (n nothingSelector) RequiresExactMatch(field string) (value string, found bool) { + return "", false +} +func (n nothingSelector) Transform(fn TransformFunc) (Selector, error) { return n, nil } // Nothing returns a selector that matches no fields func Nothing() Selector { diff --git a/vendor/k8s.io/apimachinery/pkg/labels/BUILD b/vendor/k8s.io/apimachinery/pkg/labels/BUILD index eeffddf89e5..45fea8c199e 100644 --- a/vendor/k8s.io/apimachinery/pkg/labels/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/labels/BUILD @@ -33,7 +33,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/selection:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/labels/labels.go b/vendor/k8s.io/apimachinery/pkg/labels/labels.go index abf3ace6f1c..d9eeb4f9196 100644 --- a/vendor/k8s.io/apimachinery/pkg/labels/labels.go +++ b/vendor/k8s.io/apimachinery/pkg/labels/labels.go @@ -57,14 +57,22 @@ func (ls Set) Get(label string) string { return ls[label] } -// AsSelector converts labels into a selectors. +// AsSelector converts labels into a selectors. It does not +// perform any validation, which means the server will reject +// the request if the Set contains invalid values. func (ls Set) AsSelector() Selector { return SelectorFromSet(ls) } +// AsValidatedSelector converts labels into a selectors. +// The Set is validated client-side, which allows to catch errors early. +func (ls Set) AsValidatedSelector() (Selector, error) { + return ValidatedSelectorFromSet(ls) +} + // AsSelectorPreValidated converts labels into a selector, but -// assumes that labels are already validated and thus don't -// preform any validation. +// assumes that labels are already validated and thus doesn't +// perform any validation. // According to our measurements this is significantly faster // in codepaths that matter at high scale. func (ls Set) AsSelectorPreValidated() Selector { diff --git a/vendor/k8s.io/apimachinery/pkg/labels/selector.go b/vendor/k8s.io/apimachinery/pkg/labels/selector.go index 2f8e1e2b0c4..bf62f98a429 100644 --- a/vendor/k8s.io/apimachinery/pkg/labels/selector.go +++ b/vendor/k8s.io/apimachinery/pkg/labels/selector.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/selection" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Requirements is AND of all requirements. @@ -68,13 +68,15 @@ func Everything() Selector { type nothingSelector struct{} -func (n nothingSelector) Matches(_ Labels) bool { return false } -func (n nothingSelector) Empty() bool { return false } -func (n nothingSelector) String() string { return "" } -func (n nothingSelector) Add(_ ...Requirement) Selector { return n } -func (n nothingSelector) Requirements() (Requirements, bool) { return nil, false } -func (n nothingSelector) DeepCopySelector() Selector { return n } -func (n nothingSelector) RequiresExactMatch(label string) (value string, found bool) { return "", false } +func (n nothingSelector) Matches(_ Labels) bool { return false } +func (n nothingSelector) Empty() bool { return false } +func (n nothingSelector) String() string { return "" } +func (n nothingSelector) Add(_ ...Requirement) Selector { return n } +func (n nothingSelector) Requirements() (Requirements, bool) { return nil, false } +func (n nothingSelector) DeepCopySelector() Selector { return n } +func (n nothingSelector) RequiresExactMatch(label string) (value string, found bool) { + return "", false +} // Nothing returns a selector that matches no labels func Nothing() Selector { @@ -221,7 +223,7 @@ func (r *Requirement) Matches(ls Labels) bool { return false } - // There should be only one strValue in r.strValues, and can be converted to a integer. + // There should be only one strValue in r.strValues, and can be converted to an integer. if len(r.strValues) != 1 { klog.V(10).Infof("Invalid values count %+v of requirement %#v, for 'Gt', 'Lt' operators, exactly one value is required", len(r.strValues), r) return false @@ -869,23 +871,30 @@ func validateLabelValue(k, v string) error { // SelectorFromSet returns a Selector which will match exactly the given Set. A // nil and empty Sets are considered equivalent to Everything(). +// It does not perform any validation, which means the server will reject +// the request if the Set contains invalid values. func SelectorFromSet(ls Set) Selector { + return SelectorFromValidatedSet(ls) +} + +// ValidatedSelectorFromSet returns a Selector which will match exactly the given Set. A +// nil and empty Sets are considered equivalent to Everything(). +// The Set is validated client-side, which allows to catch errors early. +func ValidatedSelectorFromSet(ls Set) (Selector, error) { if ls == nil || len(ls) == 0 { - return internalSelector{} + return internalSelector{}, nil } requirements := make([]Requirement, 0, len(ls)) for label, value := range ls { r, err := NewRequirement(label, selection.Equals, []string{value}) - if err == nil { - requirements = append(requirements, *r) - } else { - //TODO: double check errors when input comes from serialization? - return internalSelector{} + if err != nil { + return nil, err } + requirements = append(requirements, *r) } // sort to have deterministic string representation sort.Sort(ByKey(requirements)) - return internalSelector(requirements) + return internalSelector(requirements), nil } // SelectorFromValidatedSet returns a Selector which will match exactly the given Set. diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/BUILD b/vendor/k8s.io/apimachinery/pkg/runtime/BUILD index 7fe64d2a2a0..4791481e47a 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/runtime/BUILD @@ -10,7 +10,6 @@ go_test( name = "go_default_test", srcs = [ "codec_test.go", - "conversion_test.go", "converter_test.go", "embedded_test.go", "extension_test.go", @@ -71,8 +70,8 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/klog:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/value:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/value:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/codec.go b/vendor/k8s.io/apimachinery/pkg/runtime/codec.go index 0bccf9dd95b..a92863139ed 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/codec.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/codec.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/conversion/queryparams" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/klog" + "k8s.io/klog/v2" ) // codec binds an encoder and decoder. diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go b/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go index 510444a4dec..00022806171 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go @@ -21,6 +21,7 @@ import ( "reflect" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/json" ) // CheckCodec makes sure that the codec can encode objects like internalType, @@ -32,7 +33,14 @@ func CheckCodec(c Codec, internalType Object, externalTypes ...schema.GroupVersi return fmt.Errorf("Internal type not encodable: %v", err) } for _, et := range externalTypes { - exBytes := []byte(fmt.Sprintf(`{"kind":"%v","apiVersion":"%v"}`, et.Kind, et.GroupVersion().String())) + typeMeta := TypeMeta{ + Kind: et.Kind, + APIVersion: et.GroupVersion().String(), + } + exBytes, err := json.Marshal(&typeMeta) + if err != nil { + return err + } obj, err := Decode(c, exBytes) if err != nil { return fmt.Errorf("external type %s not interpretable: %v", et, err) diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/converter.go b/vendor/k8s.io/apimachinery/pkg/runtime/converter.go index 918d0831d9a..871e4c8c46e 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/converter.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/converter.go @@ -31,9 +31,9 @@ import ( "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/util/json" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/value" - "k8s.io/klog" + "k8s.io/klog/v2" ) // UnstructuredConverter is an interface for converting between interface{} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go index 636103312f0..994a3e3fa81 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go @@ -176,15 +176,6 @@ func (gv GroupVersion) Empty() bool { // String puts "group" and "version" into a single "group/version" string. For the legacy v1 // it returns "v1". func (gv GroupVersion) String() string { - // special case the internal apiVersion for the legacy kube types - if gv.Empty() { - return "" - } - - // special case of "v1" for backward compatibility - if len(gv.Group) == 0 && gv.Version == "v1" { - return gv.Version - } if len(gv.Group) > 0 { return gv.Group + "/" + gv.Version } @@ -252,10 +243,10 @@ func (gv GroupVersion) WithResource(resource string) GroupVersionResource { type GroupVersions []GroupVersion // Identifier implements runtime.GroupVersioner interface. -func (gv GroupVersions) Identifier() string { - groupVersions := make([]string, 0, len(gv)) - for i := range gv { - groupVersions = append(groupVersions, gv[i].String()) +func (gvs GroupVersions) Identifier() string { + groupVersions := make([]string, 0, len(gvs)) + for i := range gvs { + groupVersions = append(groupVersions, gvs[i].String()) } return fmt.Sprintf("[%s]", strings.Join(groupVersions, ",")) } diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go index 4b739ec38fe..3b254961d7a 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go @@ -211,6 +211,19 @@ func (s *Scheme) AddKnownTypeWithName(gvk schema.GroupVersionKind, obj Object) { } } s.typeToGVK[t] = append(s.typeToGVK[t], gvk) + + // if the type implements DeepCopyInto(), register a self-conversion + if m := reflect.ValueOf(obj).MethodByName("DeepCopyInto"); m.IsValid() && m.Type().NumIn() == 1 && m.Type().NumOut() == 0 && m.Type().In(0) == reflect.TypeOf(obj) { + if err := s.AddGeneratedConversionFunc(obj, obj, func(a, b interface{}, scope conversion.Scope) error { + // copy a to b + reflect.ValueOf(a).MethodByName("DeepCopyInto").Call([]reflect.Value{reflect.ValueOf(b)}) + // clear TypeMeta to match legacy reflective conversion + b.(Object).GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{}) + return nil + }); err != nil { + panic(err) + } + } } // KnownTypes returns the types known for the given version. diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/BUILD b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/BUILD index e9554e336c9..1e4c4b8ec29 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/BUILD @@ -19,7 +19,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/testing:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/testing:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", @@ -61,7 +61,6 @@ filegroup( "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf:all-srcs", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/recognizer:all-srcs", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/testing:all-srcs", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/versioning:all-srcs", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/yaml:all-srcs", ], diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/BUILD b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/BUILD index 12bba92d10c..c0b7d8ed207 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/BUILD @@ -39,7 +39,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/yaml:go_default_library", "//vendor/github.com/json-iterator/go:go_default_library", "//vendor/github.com/modern-go/reflect2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go index 9d17f09e54c..e081d7ff193 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go @@ -31,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer/recognizer" "k8s.io/apimachinery/pkg/util/framer" utilyaml "k8s.io/apimachinery/pkg/util/yaml" - "k8s.io/klog" + "k8s.io/klog/v2" ) // NewSerializer creates a JSON serializer that handles encoding versioned objects into the proper JSON form. If typer diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/BUILD b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/BUILD index 9c206b42be4..c3b8c33de98 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/BUILD @@ -32,7 +32,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go index ced184c91e5..718c5dfb7df 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/klog" + "k8s.io/klog/v2" ) // NewDefaultingCodecForScheme is a convenience method for callers that are using a scheme. diff --git a/vendor/k8s.io/apimachinery/pkg/util/duration/duration.go b/vendor/k8s.io/apimachinery/pkg/util/duration/duration.go index 961ec5ed8b2..1bc1e3c81ff 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/duration/duration.go +++ b/vendor/k8s.io/apimachinery/pkg/util/duration/duration.go @@ -83,7 +83,11 @@ func HumanDuration(d time.Duration) string { } else if hours < 24*365*2 { return fmt.Sprintf("%dd", hours/24) } else if hours < 24*365*8 { - return fmt.Sprintf("%dy%dd", hours/24/365, (hours/24)%365) + dy := int(hours/24) % 365 + if dy == 0 { + return fmt.Sprintf("%dy", hours/24/365) + } + return fmt.Sprintf("%dy%dd", hours/24/365, dy) } return fmt.Sprintf("%dy", int(hours/24/365)) } diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go index 9d5fdeeced5..00ce5f785c8 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go @@ -114,6 +114,18 @@ func negotiateProtocol(clientProtocols, serverProtocols []string) string { return "" } +func commaSeparatedHeaderValues(header []string) []string { + var parsedClientProtocols []string + for i := range header { + for _, clientProtocol := range strings.Split(header[i], ",") { + if proto := strings.Trim(clientProtocol, " "); len(proto) > 0 { + parsedClientProtocols = append(parsedClientProtocols, proto) + } + } + } + return parsedClientProtocols +} + // Handshake performs a subprotocol negotiation. If the client did request a // subprotocol, Handshake will select the first common value found in // serverProtocols. If a match is found, Handshake adds a response header @@ -121,7 +133,7 @@ func negotiateProtocol(clientProtocols, serverProtocols []string) string { // returned, along with a response header containing the list of protocols the // server can accept. func Handshake(req *http.Request, w http.ResponseWriter, serverProtocols []string) (string, error) { - clientProtocols := req.Header[http.CanonicalHeaderKey(HeaderProtocolVersion)] + clientProtocols := commaSeparatedHeaderValues(req.Header[http.CanonicalHeaderKey(HeaderProtocolVersion)]) if len(clientProtocols) == 0 { return "", fmt.Errorf("unable to upgrade: %s is required", HeaderProtocolVersion) } diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD index 2c7d03c9560..4b12052def1 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD @@ -39,7 +39,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/third_party/forked/golang/netutil:go_default_library", "//vendor/github.com/docker/spdystream:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go index 9d222faa898..7a68812500f 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go @@ -24,7 +24,7 @@ import ( "github.com/docker/spdystream" "k8s.io/apimachinery/pkg/util/httpstream" - "k8s.io/klog" + "k8s.io/klog/v2" ) // connection maintains state about a spdystream.Connection and its associated diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go index 2699597e7a5..6309fbc26bb 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go +++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go @@ -76,19 +76,20 @@ var _ utilnet.TLSClientConfigHolder = &SpdyRoundTripper{} var _ httpstream.UpgradeRoundTripper = &SpdyRoundTripper{} var _ utilnet.Dialer = &SpdyRoundTripper{} -// NewRoundTripper creates a new SpdyRoundTripper that will use -// the specified tlsConfig. -func NewRoundTripper(tlsConfig *tls.Config, followRedirects, requireSameHostRedirects bool) httpstream.UpgradeRoundTripper { - return NewSpdyRoundTripper(tlsConfig, followRedirects, requireSameHostRedirects) +// NewRoundTripper creates a new SpdyRoundTripper that will use the specified +// tlsConfig. +func NewRoundTripper(tlsConfig *tls.Config, followRedirects, requireSameHostRedirects bool) *SpdyRoundTripper { + return NewRoundTripperWithProxy(tlsConfig, followRedirects, requireSameHostRedirects, utilnet.NewProxierWithNoProxyCIDR(http.ProxyFromEnvironment)) } -// NewSpdyRoundTripper creates a new SpdyRoundTripper that will use -// the specified tlsConfig. This function is mostly meant for unit tests. -func NewSpdyRoundTripper(tlsConfig *tls.Config, followRedirects, requireSameHostRedirects bool) *SpdyRoundTripper { +// NewRoundTripperWithProxy creates a new SpdyRoundTripper that will use the +// specified tlsConfig and proxy func. +func NewRoundTripperWithProxy(tlsConfig *tls.Config, followRedirects, requireSameHostRedirects bool, proxier func(*http.Request) (*url.URL, error)) *SpdyRoundTripper { return &SpdyRoundTripper{ tlsConfig: tlsConfig, followRedirects: followRedirects, requireSameHostRedirects: requireSameHostRedirects, + proxier: proxier, } } @@ -116,11 +117,7 @@ func (s *SpdyRoundTripper) Dial(req *http.Request) (net.Conn, error) { // dial dials the host specified by req, using TLS if appropriate, optionally // using a proxy server if one is configured via environment variables. func (s *SpdyRoundTripper) dial(req *http.Request) (net.Conn, error) { - proxier := s.proxier - if proxier == nil { - proxier = utilnet.NewProxierWithNoProxyCIDR(http.ProxyFromEnvironment) - } - proxyURL, err := proxier(req) + proxyURL, err := s.proxier(req) if err != nil { return nil, err } diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/BUILD b/vendor/k8s.io/apimachinery/pkg/util/intstr/BUILD index 50bb5fa4c70..c6b3ac721c4 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/intstr/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/BUILD @@ -24,7 +24,7 @@ go_library( deps = [ "//vendor/github.com/gogo/protobuf/proto:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go index cb974dcf7c9..6576def82e7 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go @@ -26,7 +26,7 @@ import ( "strings" "github.com/google/gofuzz" - "k8s.io/klog" + "k8s.io/klog/v2" ) // IntOrString is a type that can hold an int32 or a string. When used in diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/BUILD b/vendor/k8s.io/apimachinery/pkg/util/net/BUILD index 6f4542e72c1..a6d63ea11d4 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/net/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/util/net/BUILD @@ -38,7 +38,7 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/golang.org/x/net/http2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/http.go b/vendor/k8s.io/apimachinery/pkg/util/net/http.go index 7b64e68157e..945886c4380 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/net/http.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/http.go @@ -21,18 +21,23 @@ import ( "bytes" "context" "crypto/tls" + "errors" "fmt" "io" + "mime" "net" "net/http" "net/url" "os" "path" + "regexp" "strconv" "strings" + "unicode" + "unicode/utf8" "golang.org/x/net/http2" - "k8s.io/klog" + "k8s.io/klog/v2" ) // JoinPreservingTrailingSlash does a path.Join of the specified elements, @@ -57,8 +62,11 @@ func JoinPreservingTrailingSlash(elem ...string) string { // IsTimeout returns true if the given error is a network timeout error func IsTimeout(err error) bool { - neterr, ok := err.(net.Error) - return ok && neterr != nil && neterr.Timeout() + var neterr net.Error + if errors.As(err, &neterr) { + return neterr != nil && neterr.Timeout() + } + return false } // IsProbableEOF returns true if the given error resembles a connection termination @@ -71,13 +79,16 @@ func IsProbableEOF(err error) bool { if err == nil { return false } - if uerr, ok := err.(*url.Error); ok { + var uerr *url.Error + if errors.As(err, &uerr) { err = uerr.Err } msg := err.Error() switch { case err == io.EOF: return true + case err == io.ErrUnexpectedEOF: + return true case msg == "http: can't write HTTP request on broken connection": return true case strings.Contains(msg, "http2: server sent GOAWAY and closed the connection"): @@ -482,3 +493,232 @@ func CloneHeader(in http.Header) http.Header { } return out } + +// WarningHeader contains a single RFC2616 14.46 warnings header +type WarningHeader struct { + // Codeindicates the type of warning. 299 is a miscellaneous persistent warning + Code int + // Agent contains the name or pseudonym of the server adding the Warning header. + // A single "-" is recommended when agent is unknown. + Agent string + // Warning text + Text string +} + +// ParseWarningHeaders extract RFC2616 14.46 warnings headers from the specified set of header values. +// Multiple comma-separated warnings per header are supported. +// If errors are encountered on a header, the remainder of that header are skipped and subsequent headers are parsed. +// Returns successfully parsed warnings and any errors encountered. +func ParseWarningHeaders(headers []string) ([]WarningHeader, []error) { + var ( + results []WarningHeader + errs []error + ) + for _, header := range headers { + for len(header) > 0 { + result, remainder, err := ParseWarningHeader(header) + if err != nil { + errs = append(errs, err) + break + } + results = append(results, result) + header = remainder + } + } + return results, errs +} + +var ( + codeMatcher = regexp.MustCompile(`^[0-9]{3}$`) + wordDecoder = &mime.WordDecoder{} +) + +// ParseWarningHeader extracts one RFC2616 14.46 warning from the specified header, +// returning an error if the header does not contain a correctly formatted warning. +// Any remaining content in the header is returned. +func ParseWarningHeader(header string) (result WarningHeader, remainder string, err error) { + // https://tools.ietf.org/html/rfc2616#section-14.46 + // updated by + // https://tools.ietf.org/html/rfc7234#section-5.5 + // https://tools.ietf.org/html/rfc7234#appendix-A + // Some requirements regarding production and processing of the Warning + // header fields have been relaxed, as it is not widely implemented. + // Furthermore, the Warning header field no longer uses RFC 2047 + // encoding, nor does it allow multiple languages, as these aspects were + // not implemented. + // + // Format is one of: + // warn-code warn-agent "warn-text" + // warn-code warn-agent "warn-text" "warn-date" + // + // warn-code is a three digit number + // warn-agent is unquoted and contains no spaces + // warn-text is quoted with backslash escaping (RFC2047-encoded according to RFC2616, not encoded according to RFC7234) + // warn-date is optional, quoted, and in HTTP-date format (no embedded or escaped quotes) + // + // additional warnings can optionally be included in the same header by comma-separating them: + // warn-code warn-agent "warn-text" "warn-date"[, warn-code warn-agent "warn-text" "warn-date", ...] + + // tolerate leading whitespace + header = strings.TrimSpace(header) + + parts := strings.SplitN(header, " ", 3) + if len(parts) != 3 { + return WarningHeader{}, "", errors.New("invalid warning header: fewer than 3 segments") + } + code, agent, textDateRemainder := parts[0], parts[1], parts[2] + + // verify code format + if !codeMatcher.Match([]byte(code)) { + return WarningHeader{}, "", errors.New("invalid warning header: code segment is not 3 digits between 100-299") + } + codeInt, _ := strconv.ParseInt(code, 10, 64) + + // verify agent presence + if len(agent) == 0 { + return WarningHeader{}, "", errors.New("invalid warning header: empty agent segment") + } + if !utf8.ValidString(agent) || hasAnyRunes(agent, unicode.IsControl) { + return WarningHeader{}, "", errors.New("invalid warning header: invalid agent") + } + + // verify textDateRemainder presence + if len(textDateRemainder) == 0 { + return WarningHeader{}, "", errors.New("invalid warning header: empty text segment") + } + + // extract text + text, dateAndRemainder, err := parseQuotedString(textDateRemainder) + if err != nil { + return WarningHeader{}, "", fmt.Errorf("invalid warning header: %v", err) + } + // tolerate RFC2047-encoded text from warnings produced according to RFC2616 + if decodedText, err := wordDecoder.DecodeHeader(text); err == nil { + text = decodedText + } + if !utf8.ValidString(text) || hasAnyRunes(text, unicode.IsControl) { + return WarningHeader{}, "", errors.New("invalid warning header: invalid text") + } + result = WarningHeader{Code: int(codeInt), Agent: agent, Text: text} + + if len(dateAndRemainder) > 0 { + if dateAndRemainder[0] == '"' { + // consume date + foundEndQuote := false + for i := 1; i < len(dateAndRemainder); i++ { + if dateAndRemainder[i] == '"' { + foundEndQuote = true + remainder = strings.TrimSpace(dateAndRemainder[i+1:]) + break + } + } + if !foundEndQuote { + return WarningHeader{}, "", errors.New("invalid warning header: unterminated date segment") + } + } else { + remainder = dateAndRemainder + } + } + if len(remainder) > 0 { + if remainder[0] == ',' { + // consume comma if present + remainder = strings.TrimSpace(remainder[1:]) + } else { + return WarningHeader{}, "", errors.New("invalid warning header: unexpected token after warn-date") + } + } + + return result, remainder, nil +} + +func parseQuotedString(quotedString string) (string, string, error) { + if len(quotedString) == 0 { + return "", "", errors.New("invalid quoted string: 0-length") + } + + if quotedString[0] != '"' { + return "", "", errors.New("invalid quoted string: missing initial quote") + } + + quotedString = quotedString[1:] + var remainder string + escaping := false + closedQuote := false + result := &bytes.Buffer{} +loop: + for i := 0; i < len(quotedString); i++ { + b := quotedString[i] + switch b { + case '"': + if escaping { + result.WriteByte(b) + escaping = false + } else { + closedQuote = true + remainder = strings.TrimSpace(quotedString[i+1:]) + break loop + } + case '\\': + if escaping { + result.WriteByte(b) + escaping = false + } else { + escaping = true + } + default: + result.WriteByte(b) + escaping = false + } + } + + if !closedQuote { + return "", "", errors.New("invalid quoted string: missing closing quote") + } + return result.String(), remainder, nil +} + +func NewWarningHeader(code int, agent, text string) (string, error) { + if code < 0 || code > 999 { + return "", errors.New("code must be between 0 and 999") + } + if len(agent) == 0 { + agent = "-" + } else if !utf8.ValidString(agent) || strings.ContainsAny(agent, `\"`) || hasAnyRunes(agent, unicode.IsSpace, unicode.IsControl) { + return "", errors.New("agent must be valid UTF-8 and must not contain spaces, quotes, backslashes, or control characters") + } + if !utf8.ValidString(text) || hasAnyRunes(text, unicode.IsControl) { + return "", errors.New("text must be valid UTF-8 and must not contain control characters") + } + return fmt.Sprintf("%03d %s %s", code, agent, makeQuotedString(text)), nil +} + +func hasAnyRunes(s string, runeCheckers ...func(rune) bool) bool { + for _, r := range s { + for _, checker := range runeCheckers { + if checker(r) { + return true + } + } + } + return false +} + +func makeQuotedString(s string) string { + result := &bytes.Buffer{} + // opening quote + result.WriteRune('"') + for _, c := range s { + switch c { + case '"', '\\': + // escape " and \ + result.WriteRune('\\') + result.WriteRune(c) + default: + // write everything else as-is + result.WriteRune(c) + } + } + // closing quote + result.WriteRune('"') + return result.String() +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/interface.go b/vendor/k8s.io/apimachinery/pkg/util/net/interface.go index 478781e8d7d..95b9ce9e39a 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/net/interface.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/interface.go @@ -26,7 +26,7 @@ import ( "strings" - "k8s.io/klog" + "k8s.io/klog/v2" ) type AddressFamily uint diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/util.go b/vendor/k8s.io/apimachinery/pkg/util/net/util.go index 2e7cb949946..5950087e022 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/net/util.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/util.go @@ -17,9 +17,8 @@ limitations under the License. package net import ( + "errors" "net" - "net/url" - "os" "reflect" "syscall" ) @@ -40,34 +39,18 @@ func IPNetEqual(ipnet1, ipnet2 *net.IPNet) bool { // Returns if the given err is "connection reset by peer" error. func IsConnectionReset(err error) bool { - if urlErr, ok := err.(*url.Error); ok { - err = urlErr.Err - } - if opErr, ok := err.(*net.OpError); ok { - err = opErr.Err - } - if osErr, ok := err.(*os.SyscallError); ok { - err = osErr.Err - } - if errno, ok := err.(syscall.Errno); ok && errno == syscall.ECONNRESET { - return true + var errno syscall.Errno + if errors.As(err, &errno) { + return errno == syscall.ECONNRESET } return false } // Returns if the given err is "connection refused" error func IsConnectionRefused(err error) bool { - if urlErr, ok := err.(*url.Error); ok { - err = urlErr.Err - } - if opErr, ok := err.(*net.OpError); ok { - err = opErr.Err - } - if osErr, ok := err.(*os.SyscallError); ok { - err = osErr.Err - } - if errno, ok := err.(syscall.Errno); ok && errno == syscall.ECONNREFUSED { - return true + var errno syscall.Errno + if errors.As(err, &errno) { + return errno == syscall.ECONNREFUSED } return false } diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/BUILD b/vendor/k8s.io/apimachinery/pkg/util/proxy/BUILD index 6e9d6bababf..fc08cc28eae 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/proxy/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/BUILD @@ -44,7 +44,7 @@ go_library( "//vendor/github.com/mxk/go-flowrate/flowrate:go_default_library", "//vendor/golang.org/x/net/html:go_default_library", "//vendor/golang.org/x/net/html/atom:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go b/vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go index e85cf1876f0..7b0704f596f 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go +++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go @@ -24,7 +24,7 @@ import ( "net/http" "net/url" - "k8s.io/klog" + "k8s.io/klog/v2" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/third_party/forked/golang/netutil" diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go b/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go index aecafb35259..cf8023da783 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go +++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go @@ -30,7 +30,7 @@ import ( "golang.org/x/net/html" "golang.org/x/net/html/atom" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/sets" @@ -101,15 +101,7 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { resp, err := rt.RoundTrip(req) if err != nil { - message := fmt.Sprintf("Error trying to reach service: '%v'", err.Error()) - resp = &http.Response{ - Header: http.Header{}, - StatusCode: http.StatusServiceUnavailable, - Body: ioutil.NopCloser(strings.NewReader(message)), - } - resp.Header.Set("Content-Type", "text/plain; charset=utf-8") - resp.Header.Set("X-Content-Type-Options", "nosniff") - return resp, nil + return nil, fmt.Errorf("error trying to reach service: %w", err) } if redirect := resp.Header.Get("Location"); redirect != "" { diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go b/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go index 39c79be81bd..43f528d9cd6 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go +++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go @@ -37,7 +37,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "github.com/mxk/go-flowrate/flowrate" - "k8s.io/klog" + "k8s.io/klog/v2" ) // UpgradeRequestRoundTripper provides an additional method to decorate a request @@ -232,6 +232,12 @@ func (h *UpgradeAwareHandler) ServeHTTP(w http.ResponseWriter, req *http.Request proxy.Transport = h.Transport proxy.FlushInterval = h.FlushInterval proxy.ErrorLog = log.New(noSuppressPanicError{}, "", log.LstdFlags) + if h.Responder != nil { + // if an optional error interceptor/responder was provided wire it + // the custom responder might be used for providing a unified error reporting + // or supporting retry mechanisms by not sending non-fatal errors to the clients + proxy.ErrorHandler = h.Responder.Error + } proxy.ServeHTTP(w, newReq) } diff --git a/vendor/k8s.io/apimachinery/pkg/util/runtime/BUILD b/vendor/k8s.io/apimachinery/pkg/util/runtime/BUILD index cf8f2141673..0c4d6b5037f 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/runtime/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/util/runtime/BUILD @@ -17,7 +17,7 @@ go_library( srcs = ["runtime.go"], importmap = "k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime", importpath = "k8s.io/apimachinery/pkg/util/runtime", - deps = ["//vendor/k8s.io/klog:go_default_library"], + deps = ["//vendor/k8s.io/klog/v2:go_default_library"], ) filegroup( diff --git a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go index 1428443f544..e8a9f609f48 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go +++ b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" ) var ( diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go index c55894e5023..600f3befd2e 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go +++ b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go @@ -1321,9 +1321,7 @@ func mergeMap(original, patch map[string]interface{}, schema LookupPatchMeta, me // Preserving the null value is useful when we want to send an explicit // delete to the API server. if patchV == nil { - if _, ok := original[k]; ok { - delete(original, k) - } + delete(original, k) if mergeOptions.IgnoreUnmatchedNulls { continue } diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go index 915231f2e75..4752b29a960 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go @@ -106,6 +106,11 @@ func IsFullyQualifiedDomainName(fldPath *field.Path, name string) field.ErrorLis if len(strings.Split(name, ".")) < 2 { return append(allErrors, field.Invalid(fldPath, name, "should be a domain with at least two segments separated by dots")) } + for _, label := range strings.Split(name, ".") { + if errs := IsDNS1123Label(label); len(errs) > 0 { + return append(allErrors, field.Invalid(fldPath, label, strings.Join(errs, ","))) + } + } return allErrors } diff --git a/vendor/k8s.io/apimachinery/pkg/util/yaml/BUILD b/vendor/k8s.io/apimachinery/pkg/util/yaml/BUILD index ad28913e082..a1787159279 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/yaml/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/util/yaml/BUILD @@ -18,7 +18,7 @@ go_library( importmap = "k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/yaml", importpath = "k8s.io/apimachinery/pkg/util/yaml", deps = [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go b/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go index a9a3853ac3d..492171faf4b 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go +++ b/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go @@ -26,7 +26,7 @@ import ( "strings" "unicode" - "k8s.io/klog" + "k8s.io/klog/v2" "sigs.k8s.io/yaml" ) @@ -92,6 +92,10 @@ type YAMLDecoder struct { // the caller in framing the chunk. func NewDocumentDecoder(r io.ReadCloser) io.ReadCloser { scanner := bufio.NewScanner(r) + // the size of initial allocation for buffer 4k + buf := make([]byte, 4*1024) + // the maximum size used to buffer a token 5M + scanner.Buffer(buf, 5*1024*1024) scanner.Split(splitYAMLDocument) return &YAMLDecoder{ r: r, diff --git a/vendor/k8s.io/apimachinery/pkg/watch/BUILD b/vendor/k8s.io/apimachinery/pkg/watch/BUILD index 5b9e1880993..e2406b0c1b2 100644 --- a/vendor/k8s.io/apimachinery/pkg/watch/BUILD +++ b/vendor/k8s.io/apimachinery/pkg/watch/BUILD @@ -23,7 +23,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go index 4269a836a87..8271e9b707e 100644 --- a/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go +++ b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go @@ -21,7 +21,7 @@ import ( "io" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/net" diff --git a/vendor/k8s.io/apimachinery/pkg/watch/watch.go b/vendor/k8s.io/apimachinery/pkg/watch/watch.go index 988aba3ed62..1f4911a3113 100644 --- a/vendor/k8s.io/apimachinery/pkg/watch/watch.go +++ b/vendor/k8s.io/apimachinery/pkg/watch/watch.go @@ -20,7 +20,7 @@ import ( "fmt" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/runtime" ) @@ -32,8 +32,8 @@ type Interface interface { Stop() // Returns a chan which will receive all the events. If an error occurs - // or Stop() is called, this channel will be closed, in which case the - // watch should be completely cleaned up. + // or Stop() is called, the implementation will close this channel and + // release any resources used by the watch. ResultChan() <-chan Event } @@ -46,7 +46,9 @@ const ( Deleted EventType = "DELETED" Bookmark EventType = "BOOKMARK" Error EventType = "ERROR" +) +var ( DefaultChanSize int32 = 100 ) diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go index 7ed1d1cffec..6be80349ab6 100644 --- a/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go +++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go @@ -16,7 +16,7 @@ import ( // that type. type Equalities map[reflect.Type]reflect.Value -// For convenience, panics on errrors +// For convenience, panics on errors func EqualitiesOrDie(funcs ...interface{}) Equalities { e := Equalities{} if err := e.AddFuncs(funcs...); err != nil { @@ -229,7 +229,7 @@ func (e Equalities) deepValueEqual(v1, v2 reflect.Value, visited map[visit]bool, // // An empty slice *is* equal to a nil slice for our purposes; same for maps. // -// Unexported field members cannot be compared and will cause an imformative panic; you must add an Equality +// Unexported field members cannot be compared and will cause an informative panic; you must add an Equality // function for these types. func (e Equalities) DeepEqual(a1, a2 interface{}) bool { if a1 == nil || a2 == nil { diff --git a/vendor/k8s.io/apiserver/pkg/admission/BUILD b/vendor/k8s.io/apiserver/pkg/admission/BUILD index 149f00a1afd..78ac161c6b5 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/BUILD +++ b/vendor/k8s.io/apiserver/pkg/admission/BUILD @@ -32,7 +32,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", "//staging/src/k8s.io/apiserver/pkg/audit:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/admission/config.go b/vendor/k8s.io/apiserver/pkg/admission/config.go index fb8226ca8de..43613321b94 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/config.go +++ b/vendor/k8s.io/apiserver/pkg/admission/config.go @@ -25,7 +25,7 @@ import ( "path" "path/filepath" - "k8s.io/klog" + "k8s.io/klog/v2" "sigs.k8s.io/yaml" "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/apiserver/pkg/admission/metrics/BUILD b/vendor/k8s.io/apiserver/pkg/admission/metrics/BUILD index 98e129cb9d5..22036f9b957 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/metrics/BUILD +++ b/vendor/k8s.io/apiserver/pkg/admission/metrics/BUILD @@ -26,7 +26,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", - "//vendor/github.com/prometheus/client_model/go:go_default_library", + "//staging/src/k8s.io/component-base/metrics/testutil:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/BUILD b/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/BUILD index 21217f11e05..c226d8a1bad 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/BUILD +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go index 779ab425d82..0fac569c4f1 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go @@ -22,7 +22,7 @@ import ( "io" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD index 123f0d9f5af..98ce8877106 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD @@ -30,8 +30,9 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/warning:go_default_library", "//vendor/github.com/evanphx/json-patch:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go index 1d337fb435a..1fbe9d718b7 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go @@ -26,7 +26,7 @@ import ( jsonpatch "github.com/evanphx/json-patch" apiequality "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/klog" + "k8s.io/klog/v2" admissionv1 "k8s.io/api/admission/v1" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" @@ -43,6 +43,7 @@ import ( webhookrequest "k8s.io/apiserver/pkg/admission/plugin/webhook/request" auditinternal "k8s.io/apiserver/pkg/apis/audit" webhookutil "k8s.io/apiserver/pkg/util/webhook" + "k8s.io/apiserver/pkg/warning" utiltrace "k8s.io/utils/trace" ) @@ -267,6 +268,9 @@ func (a *mutatingDispatcher) callAttrMutatingHook(ctx context.Context, h *admiss klog.Warningf("Failed to set admission audit annotation %s to %s for mutating webhook %s: %v", key, v, h.Name, err) } } + for _, w := range result.Warnings { + warning.AddWarning(ctx, "", w) + } if !result.Allowed { return false, &webhookutil.ErrWebhookRejection{Status: webhookerrors.ToStatusErr(h.Name, result.Result)} diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/BUILD b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/BUILD index ef76686dd89..bc5c379e101 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/BUILD +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/BUILD @@ -16,7 +16,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/matcher.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/matcher.go index da1b1e0394c..773e3e6ee6d 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/matcher.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/matcher.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/admission/plugin/webhook" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Matcher decides if a request selected by the ObjectSelector. diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/request/admissionreview.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/request/admissionreview.go index 5ea28d446b5..c60d0fb9e75 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/request/admissionreview.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/request/admissionreview.go @@ -36,6 +36,7 @@ type AdmissionResponse struct { Patch []byte PatchType admissionv1.PatchType Result *metav1.Status + Warnings []string } // VerifyAdmissionResponse checks the validity of the provided admission review object, and returns the @@ -93,6 +94,7 @@ func VerifyAdmissionResponse(uid types.UID, mutating bool, review runtime.Object Patch: patch, PatchType: patchType, Result: r.Response.Result, + Warnings: r.Response.Warnings, }, nil case *admissionv1beta1.AdmissionReview: @@ -118,6 +120,7 @@ func VerifyAdmissionResponse(uid types.UID, mutating bool, review runtime.Object Patch: patch, PatchType: patchType, Result: r.Response.Result, + Warnings: r.Response.Warnings, }, nil default: diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD index 8279e4c7098..b6a59f7a69e 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD @@ -23,7 +23,8 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/warning:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go index ab6b0392487..f065cdf5014 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go @@ -33,7 +33,8 @@ import ( "k8s.io/apiserver/pkg/admission/plugin/webhook/generic" webhookrequest "k8s.io/apiserver/pkg/admission/plugin/webhook/request" webhookutil "k8s.io/apiserver/pkg/util/webhook" - "k8s.io/klog" + "k8s.io/apiserver/pkg/warning" + "k8s.io/klog/v2" utiltrace "k8s.io/utils/trace" ) @@ -227,6 +228,9 @@ func (d *validatingDispatcher) callHook(ctx context.Context, h *v1.ValidatingWeb klog.Warningf("Failed to set admission audit annotation %s to %s for validating webhook %s: %v", key, v, h.Name, err) } } + for _, w := range result.Warnings { + warning.AddWarning(ctx, "", w) + } if result.Allowed { return nil } diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugins.go b/vendor/k8s.io/apiserver/pkg/admission/plugins.go index d37af509c66..e6da6f4a7fc 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugins.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugins.go @@ -26,7 +26,7 @@ import ( "strings" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Factory is a function that returns an Interface for admission decisions. diff --git a/vendor/k8s.io/apiserver/pkg/apis/config/validation/validation.go b/vendor/k8s.io/apiserver/pkg/apis/config/validation/validation.go index d911d05972c..966ff1f0d15 100644 --- a/vendor/k8s.io/apiserver/pkg/apis/config/validation/validation.go +++ b/vendor/k8s.io/apiserver/pkg/apis/config/validation/validation.go @@ -31,6 +31,7 @@ const ( keyLenErrFmt = "secret is not of the expected length, got %d, expected one of %v" unsupportedSchemeErrFmt = "unsupported scheme %q for KMS provider, only unix is supported" atLeastOneRequiredErrFmt = "at least one %s is required" + invalidURLErrFmt = "invalid endpoint for kms provider, error: parse %s: net/url: invalid control character in URL" mandatoryFieldErrFmt = "%s is a mandatory field for a %s" base64EncodingErr = "secrets must be base64 encoded" zeroOrNegativeErrFmt = "%s should be a positive value" diff --git a/vendor/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap/default.go b/vendor/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap/default.go index 200cc8a7e01..147128709cd 100644 --- a/vendor/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap/default.go +++ b/vendor/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap/default.go @@ -380,7 +380,7 @@ var ( "global-default", "global-default", 9900, flowcontrol.FlowDistinguisherMethodByUserType, flowcontrol.PolicyRulesWithSubjects{ - Subjects: groups(serviceaccount.AllServiceAccountsGroup), + Subjects: groups(user.AllUnauthenticated, user.AllAuthenticated), ResourceRules: []flowcontrol.ResourcePolicyRule{resourceRule( []string{flowcontrol.VerbAll}, []string{flowcontrol.APIGroupAll}, diff --git a/vendor/k8s.io/apiserver/pkg/audit/BUILD b/vendor/k8s.io/apiserver/pkg/audit/BUILD index 869175a4620..7f64aee1d92 100644 --- a/vendor/k8s.io/apiserver/pkg/audit/BUILD +++ b/vendor/k8s.io/apiserver/pkg/audit/BUILD @@ -9,6 +9,7 @@ load( go_library( name = "go_default_library", srcs = [ + "context.go", "format.go", "metrics.go", "request.go", @@ -35,10 +36,11 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/apis/audit/v1beta1:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/github.com/google/uuid:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -69,7 +71,6 @@ filegroup( ":package-srcs", "//staging/src/k8s.io/apiserver/pkg/audit/event:all-srcs", "//staging/src/k8s.io/apiserver/pkg/audit/policy:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/audit/util:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/apiserver/pkg/audit/context.go b/vendor/k8s.io/apiserver/pkg/audit/context.go new file mode 100644 index 00000000000..3d616bbd4cc --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/audit/context.go @@ -0,0 +1,84 @@ +/* +Copyright 2020 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 audit + +import ( + "context" + + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" +) + +// The key type is unexported to prevent collisions +type key int + +const ( + // auditAnnotationsKey is the context key for the audit annotations. + auditAnnotationsKey key = iota +) + +// annotations = *[]annotation instead of a map to preserve order of insertions +type annotation struct { + key, value string +} + +// WithAuditAnnotations returns a new context that can store audit annotations +// via the AddAuditAnnotation function. This function is meant to be called from +// an early request handler to allow all later layers to set audit annotations. +// This is required to support flows where handlers that come before WithAudit +// (such as WithAuthentication) wish to set audit annotations. +func WithAuditAnnotations(parent context.Context) context.Context { + // this should never really happen, but prevent double registration of this slice + if _, ok := parent.Value(auditAnnotationsKey).(*[]annotation); ok { + return parent + } + + var annotations []annotation // avoid allocations until we actually need it + return genericapirequest.WithValue(parent, auditAnnotationsKey, &annotations) +} + +// AddAuditAnnotation sets the audit annotation for the given key, value pair. +// It is safe to call at most parts of request flow that come after WithAuditAnnotations. +// The notable exception being that this function must not be called via a +// defer statement (i.e. after ServeHTTP) in a handler that runs before WithAudit +// as at that point the audit event has already been sent to the audit sink. +// Handlers that are unaware of their position in the overall request flow should +// prefer AddAuditAnnotation over LogAnnotation to avoid dropping annotations. +func AddAuditAnnotation(ctx context.Context, key, value string) { + // use the audit event directly if we have it + if ae := genericapirequest.AuditEventFrom(ctx); ae != nil { + LogAnnotation(ae, key, value) + return + } + + annotations, ok := ctx.Value(auditAnnotationsKey).(*[]annotation) + if !ok { + return // adding audit annotation is not supported at this call site + } + + *annotations = append(*annotations, annotation{key: key, value: value}) +} + +// This is private to prevent reads/write to the slice from outside of this package. +// The audit event should be directly read to get access to the annotations. +func auditAnnotationsFrom(ctx context.Context) []annotation { + annotations, ok := ctx.Value(auditAnnotationsKey).(*[]annotation) + if !ok { + return nil // adding audit annotation is not supported at this call site + } + + return *annotations +} diff --git a/vendor/k8s.io/apiserver/pkg/audit/event/BUILD b/vendor/k8s.io/apiserver/pkg/audit/event/BUILD deleted file mode 100644 index 2c1d7be48a1..00000000000 --- a/vendor/k8s.io/apiserver/pkg/audit/event/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["attributes.go"], - importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/audit/event", - importpath = "k8s.io/apiserver/pkg/audit/event", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/api/authentication/v1:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - srcs = ["attributes_test.go"], - embed = [":go_default_library"], - deps = [ - "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - ], -) diff --git a/vendor/k8s.io/apiserver/pkg/audit/event/attributes.go b/vendor/k8s.io/apiserver/pkg/audit/event/attributes.go deleted file mode 100644 index d832a7ea53d..00000000000 --- a/vendor/k8s.io/apiserver/pkg/audit/event/attributes.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Copyright 2018 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 event - -import ( - "fmt" - "net/url" - - authnv1 "k8s.io/api/authentication/v1" - "k8s.io/apiserver/pkg/apis/audit" - authuser "k8s.io/apiserver/pkg/authentication/user" - "k8s.io/apiserver/pkg/authorization/authorizer" -) - -var _ authorizer.Attributes = &attributes{} - -// attributes implements the authorizer attributes interface -// with event data. This is used for enforced audit backends -type attributes struct { - event *audit.Event - path string -} - -// NewAttributes returns a new attributes struct and parsed request uri -// if needed -func NewAttributes(event *audit.Event) (authorizer.Attributes, error) { - a := attributes{ - event: event, - } - if event.ObjectRef == nil { - u, err := url.ParseRequestURI(a.event.RequestURI) - if err != nil { - return nil, fmt.Errorf("could not parse url: %v", err) - } - a.path = u.Path - } - return &a, nil -} - -// GetUser returns the user. This is only used for checking audit policy, -// and the audit policy user check is based off the original user, -// not the impersonated user. -func (a *attributes) GetUser() authuser.Info { - return user(a.event.User) -} - -// GetVerb returns the verb -func (a *attributes) GetVerb() string { - return a.event.Verb -} - -// IsReadOnly determines if the verb is a read only action -func (a *attributes) IsReadOnly() bool { - return a.event.Verb == "get" || a.event.Verb == "list" || a.event.Verb == "watch" -} - -// GetNamespace returns the object namespace if present -func (a *attributes) GetNamespace() string { - if a.event.ObjectRef == nil { - return "" - } - return a.event.ObjectRef.Namespace -} - -// GetResource returns the object resource if present -func (a *attributes) GetResource() string { - if a.event.ObjectRef == nil { - return "" - } - return a.event.ObjectRef.Resource -} - -// GetSubresource returns the object subresource if present -func (a *attributes) GetSubresource() string { - if a.event.ObjectRef == nil { - return "" - } - return a.event.ObjectRef.Subresource -} - -// GetName returns the object name if present -func (a *attributes) GetName() string { - if a.event.ObjectRef == nil { - return "" - } - return a.event.ObjectRef.Name -} - -// GetAPIGroup returns the object api group if present -func (a *attributes) GetAPIGroup() string { - if a.event.ObjectRef == nil { - return "" - } - return a.event.ObjectRef.APIGroup -} - -// GetAPIVersion returns the object api version if present -func (a *attributes) GetAPIVersion() string { - if a.event.ObjectRef == nil { - return "" - } - return a.event.ObjectRef.APIVersion -} - -// IsResourceRequest determines if the request was acted on a resource -func (a *attributes) IsResourceRequest() bool { - return a.event.ObjectRef != nil -} - -// GetPath returns the path uri accessed -func (a *attributes) GetPath() string { - return a.path -} - -// user represents the event user -type user authnv1.UserInfo - -// GetName returns the user name -func (u user) GetName() string { return u.Username } - -// GetUID returns the user uid -func (u user) GetUID() string { return u.UID } - -// GetGroups returns the user groups -func (u user) GetGroups() []string { return u.Groups } - -// GetExtra returns the user extra data -func (u user) GetExtra() map[string][]string { - m := map[string][]string{} - for k, v := range u.Extra { - m[k] = []string(v) - } - return m -} diff --git a/vendor/k8s.io/apiserver/pkg/audit/metrics.go b/vendor/k8s.io/apiserver/pkg/audit/metrics.go index 88d4154e8ae..96166e65454 100644 --- a/vendor/k8s.io/apiserver/pkg/audit/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/audit/metrics.go @@ -22,7 +22,7 @@ import ( auditinternal "k8s.io/apiserver/pkg/apis/audit" "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/apiserver/pkg/audit/policy/BUILD b/vendor/k8s.io/apiserver/pkg/audit/policy/BUILD index eb5905be653..f845fddf995 100644 --- a/vendor/k8s.io/apiserver/pkg/audit/policy/BUILD +++ b/vendor/k8s.io/apiserver/pkg/audit/policy/BUILD @@ -10,14 +10,12 @@ go_test( name = "go_default_test", srcs = [ "checker_test.go", - "dynamic_test.go", "enforce_test.go", "reader_test.go", "util_test.go", ], embed = [":go_default_library"], deps = [ - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/apitesting/fuzzer:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", @@ -37,7 +35,6 @@ go_library( name = "go_default_library", srcs = [ "checker.go", - "dynamic.go", "enforce.go", "reader.go", "util.go", @@ -45,7 +42,6 @@ go_library( importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/audit/policy", importpath = "k8s.io/apiserver/pkg/audit/policy", deps = [ - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", @@ -55,7 +51,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/apis/audit/validation:go_default_library", "//staging/src/k8s.io/apiserver/pkg/audit:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/audit/policy/dynamic.go b/vendor/k8s.io/apiserver/pkg/audit/policy/dynamic.go deleted file mode 100644 index 4b5f29a1132..00000000000 --- a/vendor/k8s.io/apiserver/pkg/audit/policy/dynamic.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2018 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 policy - -import ( - "k8s.io/api/auditregistration/v1alpha1" - "k8s.io/apiserver/pkg/apis/audit" - "k8s.io/apiserver/pkg/authorization/authorizer" -) - -// ConvertDynamicPolicyToInternal constructs an internal policy type from a -// v1alpha1 dynamic type -func ConvertDynamicPolicyToInternal(p *v1alpha1.Policy) *audit.Policy { - stages := make([]audit.Stage, len(p.Stages)) - for i, stage := range p.Stages { - stages[i] = audit.Stage(stage) - } - return &audit.Policy{ - Rules: []audit.PolicyRule{ - { - Level: audit.Level(p.Level), - }, - }, - OmitStages: InvertStages(stages), - } -} - -// NewDynamicChecker returns a new dynamic policy checker -func NewDynamicChecker() Checker { - return &dynamicPolicyChecker{} -} - -type dynamicPolicyChecker struct{} - -// LevelAndStages returns returns a fixed level of the full event, this is so that the downstream policy -// can be applied per sink. -// TODO: this needs benchmarking before the API moves to beta to determine the effect this has on the apiserver -func (d *dynamicPolicyChecker) LevelAndStages(authorizer.Attributes) (audit.Level, []audit.Stage) { - return audit.LevelRequestResponse, []audit.Stage{} -} diff --git a/vendor/k8s.io/apiserver/pkg/audit/policy/reader.go b/vendor/k8s.io/apiserver/pkg/audit/policy/reader.go index 3d669fe699d..81b800fd691 100644 --- a/vendor/k8s.io/apiserver/pkg/audit/policy/reader.go +++ b/vendor/k8s.io/apiserver/pkg/audit/policy/reader.go @@ -28,7 +28,7 @@ import ( "k8s.io/apiserver/pkg/apis/audit/validation" "k8s.io/apiserver/pkg/audit" - "k8s.io/klog" + "k8s.io/klog/v2" ) var ( diff --git a/vendor/k8s.io/apiserver/pkg/audit/request.go b/vendor/k8s.io/apiserver/pkg/audit/request.go index f53dfadf15c..db4a5232ec2 100644 --- a/vendor/k8s.io/apiserver/pkg/audit/request.go +++ b/vendor/k8s.io/apiserver/pkg/audit/request.go @@ -24,7 +24,7 @@ import ( "time" "github.com/google/uuid" - "k8s.io/klog" + "k8s.io/klog/v2" authnv1 "k8s.io/api/authentication/v1" "k8s.io/apimachinery/pkg/api/meta" @@ -88,6 +88,10 @@ func NewEventFromRequest(req *http.Request, level auditinternal.Level, attribs a } } + for _, kv := range auditAnnotationsFrom(req.Context()) { + LogAnnotation(ev, kv.key, kv.value) + } + return ev, nil } diff --git a/vendor/k8s.io/apiserver/pkg/audit/util/BUILD b/vendor/k8s.io/apiserver/pkg/audit/util/BUILD deleted file mode 100644 index a871d3d9217..00000000000 --- a/vendor/k8s.io/apiserver/pkg/audit/util/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["conversion.go"], - importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/audit/util", - importpath = "k8s.io/apiserver/pkg/audit/util", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - srcs = ["conversion_test.go"], - embed = [":go_default_library"], - deps = [ - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/k8s.io/utils/pointer:go_default_library", - ], -) diff --git a/vendor/k8s.io/apiserver/pkg/audit/util/conversion.go b/vendor/k8s.io/apiserver/pkg/audit/util/conversion.go deleted file mode 100644 index 9e2930bd365..00000000000 --- a/vendor/k8s.io/apiserver/pkg/audit/util/conversion.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2018 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 util - -import ( - "k8s.io/api/auditregistration/v1alpha1" - "k8s.io/apiserver/pkg/util/webhook" -) - -// HookClientConfigForSink constructs a webhook.ClientConfig using a v1alpha1.AuditSink API object. -// webhook.ClientConfig is used to create a HookClient and the purpose of the config struct is to -// share that with other packages that need to create a HookClient. -func HookClientConfigForSink(a *v1alpha1.AuditSink) webhook.ClientConfig { - c := a.Spec.Webhook.ClientConfig - ret := webhook.ClientConfig{Name: a.Name, CABundle: c.CABundle} - if c.URL != nil { - ret.URL = *c.URL - } - if c.Service != nil { - ret.Service = &webhook.ClientConfigService{ - Name: c.Service.Name, - Namespace: c.Service.Namespace, - } - if c.Service.Port != nil { - ret.Service.Port = *c.Service.Port - } else { - ret.Service.Port = 443 - } - - if c.Service.Path != nil { - ret.Service.Path = *c.Service.Path - } - } - return ret -} diff --git a/vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go b/vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go index e3b1b622cba..8ff979b8074 100644 --- a/vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go +++ b/vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go @@ -35,13 +35,6 @@ type Request interface { AuthenticateRequest(req *http.Request) (*Response, bool, error) } -// Password checks a username and password against a backing authentication -// store and returns a Response or an error if the password could not be -// checked. -type Password interface { - AuthenticatePassword(ctx context.Context, user, password string) (*Response, bool, error) -} - // TokenFunc is a function that implements the Token interface. type TokenFunc func(ctx context.Context, token string) (*Response, bool, error) @@ -58,14 +51,6 @@ func (f RequestFunc) AuthenticateRequest(req *http.Request) (*Response, bool, er return f(req) } -// PasswordFunc is a function that implements the Password interface. -type PasswordFunc func(ctx context.Context, user, password string) (*Response, bool, error) - -// AuthenticatePassword implements authenticator.Password. -func (f PasswordFunc) AuthenticatePassword(ctx context.Context, user, password string) (*Response, bool, error) { - return f(ctx, user, password) -} - // Response is the struct returned by authenticator interfaces upon successful // authentication. It contains information about whether the authenticator // authenticated the request, information about the context of the diff --git a/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/BUILD b/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/BUILD index 9aa48d1caa4..c163c47347a 100644 --- a/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/BUILD +++ b/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/BUILD @@ -8,21 +8,48 @@ load( go_test( name = "go_default_test", - srcs = ["requestheader_test.go"], + srcs = [ + "requestheader_controller_test.go", + "requestheader_test.go", + ], embed = [":go_default_library"], - deps = ["//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library"], + deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + ], ) go_library( name = "go_default_library", - srcs = ["requestheader.go"], + srcs = [ + "requestheader.go", + "requestheader_controller.go", + ], importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest", importpath = "k8s.io/apiserver/pkg/authentication/request/headerrequest", deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/request/x509:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", + "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/cert:go_default_library", + "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go b/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go new file mode 100644 index 00000000000..561b6fba9ba --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go @@ -0,0 +1,337 @@ +/* +Copyright 2020 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 headerrequest + +import ( + "context" + "encoding/json" + "fmt" + "time" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + coreinformers "k8s.io/client-go/informers/core/v1" + "k8s.io/client-go/kubernetes" + corev1listers "k8s.io/client-go/listers/core/v1" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/util/workqueue" + "k8s.io/klog/v2" + "sync/atomic" +) + +const ( + authenticationRoleName = "extension-apiserver-authentication-reader" +) + +// RequestHeaderAuthRequestProvider a provider that knows how to dynamically fill parts of RequestHeaderConfig struct +type RequestHeaderAuthRequestProvider interface { + UsernameHeaders() []string + GroupHeaders() []string + ExtraHeaderPrefixes() []string + AllowedClientNames() []string +} + +var _ RequestHeaderAuthRequestProvider = &RequestHeaderAuthRequestController{} + +type requestHeaderBundle struct { + UsernameHeaders []string + GroupHeaders []string + ExtraHeaderPrefixes []string + AllowedClientNames []string +} + +// RequestHeaderAuthRequestController a controller that exposes a set of methods for dynamically filling parts of RequestHeaderConfig struct. +// The methods are sourced from the config map which is being monitored by this controller. +// The controller is primed from the server at the construction time for components that don't want to dynamically react to changes +// in the config map. +type RequestHeaderAuthRequestController struct { + name string + + configmapName string + configmapNamespace string + + client kubernetes.Interface + configmapLister corev1listers.ConfigMapNamespaceLister + configmapInformer cache.SharedIndexInformer + configmapInformerSynced cache.InformerSynced + + queue workqueue.RateLimitingInterface + + // exportedRequestHeaderBundle is a requestHeaderBundle that contains the last read, non-zero length content of the configmap + exportedRequestHeaderBundle atomic.Value + + usernameHeadersKey string + groupHeadersKey string + extraHeaderPrefixesKey string + allowedClientNamesKey string +} + +// NewRequestHeaderAuthRequestController creates a new controller that implements RequestHeaderAuthRequestController +func NewRequestHeaderAuthRequestController( + cmName string, + cmNamespace string, + client kubernetes.Interface, + usernameHeadersKey, groupHeadersKey, extraHeaderPrefixesKey, allowedClientNamesKey string) *RequestHeaderAuthRequestController { + c := &RequestHeaderAuthRequestController{ + name: "RequestHeaderAuthRequestController", + + client: client, + + configmapName: cmName, + configmapNamespace: cmNamespace, + + usernameHeadersKey: usernameHeadersKey, + groupHeadersKey: groupHeadersKey, + extraHeaderPrefixesKey: extraHeaderPrefixesKey, + allowedClientNamesKey: allowedClientNamesKey, + + queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "RequestHeaderAuthRequestController"), + } + + // we construct our own informer because we need such a small subset of the information available. Just one namespace. + c.configmapInformer = coreinformers.NewFilteredConfigMapInformer(client, c.configmapNamespace, 12*time.Hour, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, func(listOptions *metav1.ListOptions) { + listOptions.FieldSelector = fields.OneTermEqualSelector("metadata.name", c.configmapName).String() + }) + + c.configmapInformer.AddEventHandler(cache.FilteringResourceEventHandler{ + FilterFunc: func(obj interface{}) bool { + if cast, ok := obj.(*corev1.ConfigMap); ok { + return cast.Name == c.configmapName && cast.Namespace == c.configmapNamespace + } + if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok { + if cast, ok := tombstone.Obj.(*corev1.ConfigMap); ok { + return cast.Name == c.configmapName && cast.Namespace == c.configmapNamespace + } + } + return true // always return true just in case. The checks are fairly cheap + }, + Handler: cache.ResourceEventHandlerFuncs{ + // we have a filter, so any time we're called, we may as well queue. We only ever check one configmap + // so we don't have to be choosy about our key. + AddFunc: func(obj interface{}) { + c.queue.Add(c.keyFn()) + }, + UpdateFunc: func(oldObj, newObj interface{}) { + c.queue.Add(c.keyFn()) + }, + DeleteFunc: func(obj interface{}) { + c.queue.Add(c.keyFn()) + }, + }, + }) + + c.configmapLister = corev1listers.NewConfigMapLister(c.configmapInformer.GetIndexer()).ConfigMaps(c.configmapNamespace) + c.configmapInformerSynced = c.configmapInformer.HasSynced + + return c +} + +func (c *RequestHeaderAuthRequestController) UsernameHeaders() []string { + return c.loadRequestHeaderFor(c.usernameHeadersKey) +} + +func (c *RequestHeaderAuthRequestController) GroupHeaders() []string { + return c.loadRequestHeaderFor(c.groupHeadersKey) +} + +func (c *RequestHeaderAuthRequestController) ExtraHeaderPrefixes() []string { + return c.loadRequestHeaderFor(c.extraHeaderPrefixesKey) +} + +func (c *RequestHeaderAuthRequestController) AllowedClientNames() []string { + return c.loadRequestHeaderFor(c.allowedClientNamesKey) +} + +// Run starts RequestHeaderAuthRequestController controller and blocks until stopCh is closed. +func (c *RequestHeaderAuthRequestController) Run(workers int, stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + defer c.queue.ShutDown() + + klog.Infof("Starting %s", c.name) + defer klog.Infof("Shutting down %s", c.name) + + go c.configmapInformer.Run(stopCh) + + // wait for caches to fill before starting your work + if !cache.WaitForNamedCacheSync(c.name, stopCh, c.configmapInformerSynced) { + return + } + + // doesn't matter what workers say, only start one. + go wait.Until(c.runWorker, time.Second, stopCh) + + <-stopCh +} + +// // RunOnce runs a single sync loop +func (c *RequestHeaderAuthRequestController) RunOnce() error { + configMap, err := c.client.CoreV1().ConfigMaps(c.configmapNamespace).Get(context.TODO(), c.configmapName, metav1.GetOptions{}) + switch { + case errors.IsNotFound(err): + // ignore, authConfigMap is nil now + return nil + case errors.IsForbidden(err): + klog.Warningf("Unable to get configmap/%s in %s. Usually fixed by "+ + "'kubectl create rolebinding -n %s ROLEBINDING_NAME --role=%s --serviceaccount=YOUR_NS:YOUR_SA'", + c.configmapName, c.configmapNamespace, c.configmapNamespace, authenticationRoleName) + return err + case err != nil: + return err + } + return c.syncConfigMap(configMap) +} + +func (c *RequestHeaderAuthRequestController) runWorker() { + for c.processNextWorkItem() { + } +} + +func (c *RequestHeaderAuthRequestController) processNextWorkItem() bool { + dsKey, quit := c.queue.Get() + if quit { + return false + } + defer c.queue.Done(dsKey) + + err := c.sync() + if err == nil { + c.queue.Forget(dsKey) + return true + } + + utilruntime.HandleError(fmt.Errorf("%v failed with : %v", dsKey, err)) + c.queue.AddRateLimited(dsKey) + + return true +} + +// sync reads the config and propagates the changes to exportedRequestHeaderBundle +// which is exposed by the set of methods that are used to fill RequestHeaderConfig struct +func (c *RequestHeaderAuthRequestController) sync() error { + configMap, err := c.configmapLister.Get(c.configmapName) + if err != nil { + return err + } + return c.syncConfigMap(configMap) +} + +func (c *RequestHeaderAuthRequestController) syncConfigMap(configMap *corev1.ConfigMap) error { + hasChanged, newRequestHeaderBundle, err := c.hasRequestHeaderBundleChanged(configMap) + if err != nil { + return err + } + if hasChanged { + c.exportedRequestHeaderBundle.Store(newRequestHeaderBundle) + klog.V(2).Infof("Loaded a new request header values for %v", c.name) + } + return nil +} + +func (c *RequestHeaderAuthRequestController) hasRequestHeaderBundleChanged(cm *corev1.ConfigMap) (bool, *requestHeaderBundle, error) { + currentHeadersBundle, err := c.getRequestHeaderBundleFromConfigMap(cm) + if err != nil { + return false, nil, err + } + + rawHeaderBundle := c.exportedRequestHeaderBundle.Load() + if rawHeaderBundle == nil { + return true, currentHeadersBundle, nil + } + + // check to see if we have a change. If the values are the same, do nothing. + loadedHeadersBundle, ok := rawHeaderBundle.(*requestHeaderBundle) + if !ok { + return true, currentHeadersBundle, nil + } + + if !equality.Semantic.DeepEqual(loadedHeadersBundle, currentHeadersBundle) { + return true, currentHeadersBundle, nil + } + return false, nil, nil +} + +func (c *RequestHeaderAuthRequestController) getRequestHeaderBundleFromConfigMap(cm *corev1.ConfigMap) (*requestHeaderBundle, error) { + usernameHeaderCurrentValue, err := deserializeStrings(cm.Data[c.usernameHeadersKey]) + if err != nil { + return nil, err + } + + groupHeadersCurrentValue, err := deserializeStrings(cm.Data[c.groupHeadersKey]) + if err != nil { + return nil, err + } + + extraHeaderPrefixesCurrentValue, err := deserializeStrings(cm.Data[c.extraHeaderPrefixesKey]) + if err != nil { + return nil, err + + } + + allowedClientNamesCurrentValue, err := deserializeStrings(cm.Data[c.allowedClientNamesKey]) + if err != nil { + return nil, err + } + + return &requestHeaderBundle{ + UsernameHeaders: usernameHeaderCurrentValue, + GroupHeaders: groupHeadersCurrentValue, + ExtraHeaderPrefixes: extraHeaderPrefixesCurrentValue, + AllowedClientNames: allowedClientNamesCurrentValue, + }, nil +} + +func (c *RequestHeaderAuthRequestController) loadRequestHeaderFor(key string) []string { + rawHeaderBundle := c.exportedRequestHeaderBundle.Load() + if rawHeaderBundle == nil { + return nil // this can happen if we've been unable load data from the apiserver for some reason + } + headerBundle := rawHeaderBundle.(*requestHeaderBundle) + + switch key { + case c.usernameHeadersKey: + return headerBundle.UsernameHeaders + case c.groupHeadersKey: + return headerBundle.GroupHeaders + case c.extraHeaderPrefixesKey: + return headerBundle.ExtraHeaderPrefixes + case c.allowedClientNamesKey: + return headerBundle.AllowedClientNames + default: + return nil + } +} + +func (c *RequestHeaderAuthRequestController) keyFn() string { + // this format matches DeletionHandlingMetaNamespaceKeyFunc for our single key + return c.configmapNamespace + "/" + c.configmapName +} + +func deserializeStrings(in string) ([]string, error) { + if len(in) == 0 { + return nil, nil + } + var ret []string + if err := json.Unmarshal([]byte(in), &ret); err != nil { + return nil, err + } + return ret, nil +} diff --git a/vendor/k8s.io/apiserver/pkg/authentication/token/cache/BUILD b/vendor/k8s.io/apiserver/pkg/authentication/token/cache/BUILD index e646a57eb8b..10c715372ef 100644 --- a/vendor/k8s.io/apiserver/pkg/authentication/token/cache/BUILD +++ b/vendor/k8s.io/apiserver/pkg/authentication/token/cache/BUILD @@ -16,8 +16,11 @@ go_test( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/audit:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/github.com/google/uuid:go_default_library", ], @@ -37,11 +40,14 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/cache:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/audit:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/golang.org/x/sync/singleflight:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go b/vendor/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go index 8edd6b646cf..a10564f04d9 100644 --- a/vendor/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go +++ b/vendor/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go @@ -34,8 +34,11 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" utilclock "k8s.io/apimachinery/pkg/util/clock" + auditinternal "k8s.io/apiserver/pkg/apis/audit" + "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/authentication/authenticator" - "k8s.io/klog" + "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/klog/v2" ) var errAuthnCrash = apierrors.NewInternalError(errors.New("authentication failed unexpectedly")) @@ -47,6 +50,16 @@ type cacheRecord struct { resp *authenticator.Response ok bool err error + + // this cache assumes token authn has no side-effects or temporal dependence. + // neither of these are true for audit annotations set via AddAuditAnnotation. + // + // for audit annotations, the assumption is that for some period of time (cache TTL), + // all requests with the same API audiences and the same bearer token result in the + // same annotations. This may not be true if the authenticator sets an annotation + // based on the current time, but that may be okay since cache TTLs are generally + // small (seconds). + annotations map[string]string } type cachedTokenAuthenticator struct { @@ -109,6 +122,17 @@ func newWithClock(authenticator authenticator.Token, cacheErrs bool, successTTL, // AuthenticateToken implements authenticator.Token func (a *cachedTokenAuthenticator) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) { + record := a.doAuthenticateToken(ctx, token) + if !record.ok || record.err != nil { + return nil, false, record.err + } + for key, value := range record.annotations { + audit.AddAuditAnnotation(ctx, key, value) + } + return record.resp, true, nil +} + +func (a *cachedTokenAuthenticator) doAuthenticateToken(ctx context.Context, token string) *cacheRecord { doneAuthenticating := stats.authenticating() auds, audsOk := authenticator.AudiencesFrom(ctx) @@ -117,7 +141,7 @@ func (a *cachedTokenAuthenticator) AuthenticateToken(ctx context.Context, token if record, ok := a.cache.get(key); ok { // Record cache hit doneAuthenticating(true) - return record.resp, record.ok, record.err + return record } // Record cache miss @@ -125,18 +149,19 @@ func (a *cachedTokenAuthenticator) AuthenticateToken(ctx context.Context, token defer doneBlocking() defer doneAuthenticating(false) - type lookup struct { - resp *authenticator.Response - ok bool - } + c := a.group.DoChan(key, func() (val interface{}, _ error) { + // always use one place to read and write the output of AuthenticateToken + record := &cacheRecord{} - c := a.group.DoChan(key, func() (val interface{}, err error) { doneFetching := stats.fetching() // We're leaving the request handling stack so we need to handle crashes // ourselves. Log a stack trace and return a 500 if something panics. defer func() { if r := recover(); r != nil { - err = errAuthnCrash + // make sure to always return a record + record.err = errAuthnCrash + val = record + // Same as stdlib http server code. Manually allocate stack // trace buffer size to prevent excessively large logs const size = 64 << 10 @@ -144,12 +169,12 @@ func (a *cachedTokenAuthenticator) AuthenticateToken(ctx context.Context, token buf = buf[:runtime.Stack(buf, false)] klog.Errorf("%v\n%s", r, buf) } - doneFetching(err == nil) + doneFetching(record.err == nil) }() // Check again for a cached record. We may have raced with a fetch. if record, ok := a.cache.get(key); ok { - return lookup{record.resp, record.ok}, record.err + return record, nil } // Detach the context because the lookup may be shared by multiple callers, @@ -161,29 +186,35 @@ func (a *cachedTokenAuthenticator) AuthenticateToken(ctx context.Context, token ctx = authenticator.WithAudiences(ctx, auds) } - resp, ok, err := a.authenticator.AuthenticateToken(ctx, token) - if !a.cacheErrs && err != nil { - return nil, err + // since this is shared work between multiple requests, we have no way of knowing if any + // particular request supports audit annotations. thus we always attempt to record them. + ev := &auditinternal.Event{Level: auditinternal.LevelMetadata} + ctx = request.WithAuditEvent(ctx, ev) + + record.resp, record.ok, record.err = a.authenticator.AuthenticateToken(ctx, token) + record.annotations = ev.Annotations + + if !a.cacheErrs && record.err != nil { + return record, nil } switch { - case ok && a.successTTL > 0: - a.cache.set(key, &cacheRecord{resp: resp, ok: ok, err: err}, a.successTTL) - case !ok && a.failureTTL > 0: - a.cache.set(key, &cacheRecord{resp: resp, ok: ok, err: err}, a.failureTTL) + case record.ok && a.successTTL > 0: + a.cache.set(key, record, a.successTTL) + case !record.ok && a.failureTTL > 0: + a.cache.set(key, record, a.failureTTL) } - return lookup{resp, ok}, err + + return record, nil }) select { case result := <-c: - if result.Err != nil { - return nil, false, result.Err - } - lookup := result.Val.(lookup) - return lookup.resp, lookup.ok, nil + // we always set Val and never set Err + return result.Val.(*cacheRecord) case <-ctx.Done(): - return nil, false, ctx.Err() + // fake a record on context cancel + return &cacheRecord{err: ctx.Err()} } } diff --git a/vendor/k8s.io/apiserver/pkg/authentication/token/tokenfile/BUILD b/vendor/k8s.io/apiserver/pkg/authentication/token/tokenfile/BUILD index b43d1ff609c..2f2d8fae4be 100644 --- a/vendor/k8s.io/apiserver/pkg/authentication/token/tokenfile/BUILD +++ b/vendor/k8s.io/apiserver/pkg/authentication/token/tokenfile/BUILD @@ -21,7 +21,7 @@ go_library( deps = [ "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/authentication/token/tokenfile/tokenfile.go b/vendor/k8s.io/apiserver/pkg/authentication/token/tokenfile/tokenfile.go index 69568f17dd2..bd7fccbdca5 100644 --- a/vendor/k8s.io/apiserver/pkg/authentication/token/tokenfile/tokenfile.go +++ b/vendor/k8s.io/apiserver/pkg/authentication/token/tokenfile/tokenfile.go @@ -26,7 +26,7 @@ import ( "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/user" - "k8s.io/klog" + "k8s.io/klog/v2" ) type TokenAuthenticator struct { diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/BUILD b/vendor/k8s.io/apiserver/pkg/endpoints/BUILD index ceef2c63ee3..57e43d4daea 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/BUILD +++ b/vendor/k8s.io/apiserver/pkg/endpoints/BUILD @@ -81,14 +81,17 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/deprecation:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/discovery:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/metrics:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/warning:go_default_library", "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//staging/src/k8s.io/component-base/version:go_default_library", "//vendor/github.com/emicklei/go-restful:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", ], @@ -105,6 +108,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//staging/src/k8s.io/apiserver/pkg/endpoints/deprecation:all-srcs", "//staging/src/k8s.io/apiserver/pkg/endpoints/discovery:all-srcs", "//staging/src/k8s.io/apiserver/pkg/endpoints/filters:all-srcs", "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers:all-srcs", @@ -112,6 +116,7 @@ filegroup( "//staging/src/k8s.io/apiserver/pkg/endpoints/openapi:all-srcs", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:all-srcs", "//staging/src/k8s.io/apiserver/pkg/endpoints/testing:all-srcs", + "//staging/src/k8s.io/apiserver/pkg/endpoints/warning:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/deprecation/BUILD b/vendor/k8s.io/apiserver/pkg/endpoints/deprecation/BUILD new file mode 100644 index 00000000000..7c502505945 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/endpoints/deprecation/BUILD @@ -0,0 +1,40 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["deprecation.go"], + importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/deprecation", + importpath = "k8s.io/apiserver/pkg/endpoints/deprecation", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/version:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) + +go_test( + name = "go_default_test", + srcs = ["deprecation_test.go"], + embed = [":go_default_library"], + deps = [ + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/version:go_default_library", + ], +) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/deprecation/deprecation.go b/vendor/k8s.io/apiserver/pkg/endpoints/deprecation/deprecation.go new file mode 100644 index 00000000000..3d0123b23f7 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/endpoints/deprecation/deprecation.go @@ -0,0 +1,133 @@ +/* +Copyright 2020 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 deprecation + +import ( + "fmt" + "regexp" + "strconv" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" +) + +type apiLifecycleDeprecated interface { + APILifecycleDeprecated() (major, minor int) +} + +type apiLifecycleRemoved interface { + APILifecycleRemoved() (major, minor int) +} + +type apiLifecycleReplacement interface { + APILifecycleReplacement() schema.GroupVersionKind +} + +// extract all digits at the beginning of the string +var leadingDigits = regexp.MustCompile(`^(\d+)`) + +// MajorMinor parses a numeric major/minor version from the provided version info. +// The minor version drops all characters after the first non-digit character: +// version.Info{Major:"1", Minor:"2+"} -> 1,2 +// version.Info{Major:"1", Minor:"2.3-build4"} -> 1,2 +func MajorMinor(v version.Info) (int, int, error) { + major, err := strconv.Atoi(v.Major) + if err != nil { + return 0, 0, err + } + minor, err := strconv.Atoi(leadingDigits.FindString(v.Minor)) + if err != nil { + return 0, 0, err + } + return major, minor, nil +} + +// IsDeprecated returns true if obj implements APILifecycleDeprecated() and returns +// a major/minor version that is non-zero and is <= the specified current major/minor version. +func IsDeprecated(obj runtime.Object, currentMajor, currentMinor int) bool { + deprecated, isDeprecated := obj.(apiLifecycleDeprecated) + if !isDeprecated { + return false + } + + deprecatedMajor, deprecatedMinor := deprecated.APILifecycleDeprecated() + // no deprecation version expressed + if deprecatedMajor == 0 && deprecatedMinor == 0 { + return false + } + // no current version info available + if currentMajor == 0 && currentMinor == 0 { + return true + } + // compare deprecation version to current version + if deprecatedMajor > currentMajor { + return false + } + if deprecatedMajor == currentMajor && deprecatedMinor > currentMinor { + return false + } + return true +} + +// RemovedRelease returns the major/minor version in which the given object is unavailable (in the form ".") +// if the object implements APILifecycleRemoved() to indicate a non-zero removal version, and returns an empty string otherwise. +func RemovedRelease(obj runtime.Object) string { + if removed, hasRemovalInfo := obj.(apiLifecycleRemoved); hasRemovalInfo { + removedMajor, removedMinor := removed.APILifecycleRemoved() + if removedMajor != 0 || removedMinor != 0 { + return fmt.Sprintf("%d.%d", removedMajor, removedMinor) + } + } + return "" +} + +// WarningMessage returns a human-readable deprecation warning if the object implements APILifecycleDeprecated() +// to indicate a non-zero deprecated major/minor version and has a populated GetObjectKind().GroupVersionKind(). +func WarningMessage(obj runtime.Object) string { + deprecated, isDeprecated := obj.(apiLifecycleDeprecated) + if !isDeprecated { + return "" + } + + deprecatedMajor, deprecatedMinor := deprecated.APILifecycleDeprecated() + if deprecatedMajor == 0 && deprecatedMinor == 0 { + return "" + } + + gvk := obj.GetObjectKind().GroupVersionKind() + if gvk.Empty() { + return "" + } + deprecationWarning := fmt.Sprintf("%s %s is deprecated in v%d.%d+", gvk.GroupVersion().String(), gvk.Kind, deprecatedMajor, deprecatedMinor) + + if removed, hasRemovalInfo := obj.(apiLifecycleRemoved); hasRemovalInfo { + removedMajor, removedMinor := removed.APILifecycleRemoved() + if removedMajor != 0 || removedMinor != 0 { + deprecationWarning = deprecationWarning + fmt.Sprintf(", unavailable in v%d.%d+", removedMajor, removedMinor) + } + } + + if replaced, hasReplacement := obj.(apiLifecycleReplacement); hasReplacement { + replacement := replaced.APILifecycleReplacement() + if !replacement.Empty() { + deprecationWarning = deprecationWarning + fmt.Sprintf("; use %s %s", replacement.GroupVersion().String(), replacement.Kind) + } + } + + return deprecationWarning +} diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/discovery/BUILD b/vendor/k8s.io/apiserver/pkg/endpoints/discovery/BUILD index 09824784fa7..9ab8bf77514 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/discovery/BUILD +++ b/vendor/k8s.io/apiserver/pkg/endpoints/discovery/BUILD @@ -46,7 +46,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", "//vendor/github.com/emicklei/go-restful:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/discovery/util.go b/vendor/k8s.io/apiserver/pkg/endpoints/discovery/util.go index 2411a780d1c..7487ffc18a4 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/discovery/util.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/discovery/util.go @@ -23,7 +23,7 @@ import ( "io" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/klog" + "k8s.io/klog/v2" ) const APIGroupPrefix = "/apis" diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/filters/BUILD b/vendor/k8s.io/apiserver/pkg/endpoints/filters/BUILD index 5bf0cf3ec81..6810eec1168 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/filters/BUILD +++ b/vendor/k8s.io/apiserver/pkg/endpoints/filters/BUILD @@ -17,6 +17,7 @@ go_test( "impersonation_test.go", "metrics_test.go", "requestinfo_test.go", + "warning_test.go", ], embed = [":go_default_library"], deps = [ @@ -45,6 +46,7 @@ go_library( name = "go_default_library", srcs = [ "audit.go", + "audit_annotations.go", "authentication.go", "authn_audit.go", "authorization.go", @@ -53,6 +55,7 @@ go_library( "impersonation.go", "metrics.go", "requestinfo.go", + "warning.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/filters", importpath = "k8s.io/apiserver/pkg/endpoints/filters", @@ -63,6 +66,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", "//staging/src/k8s.io/apiserver/pkg/audit:go_default_library", @@ -74,9 +78,10 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/httplog:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/warning:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/filters/audit_annotations.go b/vendor/k8s.io/apiserver/pkg/endpoints/filters/audit_annotations.go new file mode 100644 index 00000000000..22b276991c6 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/endpoints/filters/audit_annotations.go @@ -0,0 +1,39 @@ +/* +Copyright 2020 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 filters + +import ( + "net/http" + + "k8s.io/apiserver/pkg/audit" + "k8s.io/apiserver/pkg/audit/policy" +) + +// WithAuditAnnotations decorates a http.Handler with a []{key, value} that is merged +// with the audit.Event.Annotations map. This allows layers that run before WithAudit +// (such as authentication) to assert annotations. +// If sink or audit policy is nil, no decoration takes place. +func WithAuditAnnotations(handler http.Handler, sink audit.Sink, policy policy.Checker) http.Handler { + // no need to wrap if auditing is disabled + if sink == nil || policy == nil { + return handler + } + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + req = req.WithContext(audit.WithAuditAnnotations(req.Context())) + handler.ServeHTTP(w, req) + }) +} diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/filters/authentication.go b/vendor/k8s.io/apiserver/pkg/endpoints/filters/authentication.go index 58430b7b3a5..e88e7ad28d6 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/filters/authentication.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/filters/authentication.go @@ -28,7 +28,7 @@ import ( "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/klog" + "k8s.io/klog/v2" ) // WithAuthentication creates an http handler that tries to authenticate the given request as a user, and then @@ -71,11 +71,8 @@ func WithAuthentication(handler http.Handler, auth authenticator.Request, failed }) } -func Unauthorized(s runtime.NegotiatedSerializer, supportsBasicAuth bool) http.Handler { +func Unauthorized(s runtime.NegotiatedSerializer) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - if supportsBasicAuth { - w.Header().Set("WWW-Authenticate", `Basic realm="kubernetes-master"`) - } ctx := req.Context() requestInfo, found := genericapirequest.RequestInfoFrom(ctx) if !found { diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/filters/authorization.go b/vendor/k8s.io/apiserver/pkg/endpoints/filters/authorization.go index 73bbe6b3fb7..8d115ff0910 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/filters/authorization.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/filters/authorization.go @@ -21,7 +21,7 @@ import ( "errors" "net/http" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/audit" diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go b/vendor/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go index a18b51ba00d..ab767695fee 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go @@ -23,7 +23,7 @@ import ( "net/url" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" authenticationv1 "k8s.io/api/authentication/v1" "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/filters/warning.go b/vendor/k8s.io/apiserver/pkg/endpoints/filters/warning.go new file mode 100644 index 00000000000..55e85f0b73b --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/endpoints/filters/warning.go @@ -0,0 +1,133 @@ +/* +Copyright 2020 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 filters + +import ( + "fmt" + "net/http" + "sync" + "unicode/utf8" + + "k8s.io/apimachinery/pkg/util/net" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apiserver/pkg/warning" +) + +// WithWarningRecorder attaches a deduplicating k8s.io/apiserver/pkg/warning#WarningRecorder to the request context. +func WithWarningRecorder(handler http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + recorder := &recorder{writer: w} + req = req.WithContext(warning.WithWarningRecorder(req.Context(), recorder)) + handler.ServeHTTP(w, req) + }) +} + +var ( + truncateAtTotalRunes = 4 * 1024 + truncateItemRunes = 256 +) + +type recordedWarning struct { + agent string + text string +} + +type recorder struct { + // lock guards calls to AddWarning from multiple threads + lock sync.Mutex + + // recorded tracks whether AddWarning was already called with a given text + recorded map[string]bool + + // ordered tracks warnings added so they can be replayed and truncated if needed + ordered []recordedWarning + + // written tracks how many runes of text have been added as warning headers + written int + + // truncating tracks if we have already exceeded truncateAtTotalRunes and are now truncating warning messages as we add them + truncating bool + + // writer is the response writer to add warning headers to + writer http.ResponseWriter +} + +func (r *recorder) AddWarning(agent, text string) { + if len(text) == 0 { + return + } + + r.lock.Lock() + defer r.lock.Unlock() + + // if we've already exceeded our limit and are already truncating, return early + if r.written >= truncateAtTotalRunes && r.truncating { + return + } + + // init if needed + if r.recorded == nil { + r.recorded = map[string]bool{} + } + + // dedupe if already warned + if r.recorded[text] { + return + } + r.recorded[text] = true + r.ordered = append(r.ordered, recordedWarning{agent: agent, text: text}) + + // truncate on a rune boundary, if needed + textRuneLength := utf8.RuneCountInString(text) + if r.truncating && textRuneLength > truncateItemRunes { + text = string([]rune(text)[:truncateItemRunes]) + textRuneLength = truncateItemRunes + } + + // compute the header + header, err := net.NewWarningHeader(299, agent, text) + if err != nil { + return + } + + // if this fits within our limit, or we're already truncating, write and return + if r.written+textRuneLength <= truncateAtTotalRunes || r.truncating { + r.written += textRuneLength + r.writer.Header().Add("Warning", header) + return + } + + // otherwise, enable truncation, reset, and replay the existing items as truncated warnings + r.truncating = true + r.written = 0 + r.writer.Header().Del("Warning") + utilruntime.HandleError(fmt.Errorf("exceeded max warning header size, truncating")) + for _, w := range r.ordered { + agent := w.agent + text := w.text + + textRuneLength := utf8.RuneCountInString(text) + if textRuneLength > truncateItemRunes { + text = string([]rune(text)[:truncateItemRunes]) + textRuneLength = truncateItemRunes + } + if header, err := net.NewWarningHeader(299, agent, text); err == nil { + r.written += textRuneLength + r.writer.Header().Add("Warning", header) + } + } +} diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/BUILD b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/BUILD index 3d54973b890..6d6ef4a97be 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/BUILD +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/BUILD @@ -69,6 +69,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", @@ -105,7 +106,7 @@ go_library( "//vendor/golang.org/x/net/websocket:go_default_library", "//vendor/google.golang.org/grpc/codes:go_default_library", "//vendor/google.golang.org/grpc/status:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", ], diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go index 1fa5550ba70..0e2650ae9ac 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metainternalversionscheme "k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme" + metainternalversionvalidation "k8s.io/apimachinery/pkg/apis/meta/internalversion/validation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/runtime" @@ -198,6 +199,12 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope *RequestSc return } + if errs := metainternalversionvalidation.ValidateListOptions(&listOptions); len(errs) > 0 { + err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "ListOptions"}, "", errs) + scope.err(err, w, req) + return + } + // transform fields // TODO: DecodeParametersInto should do this. if listOptions.FieldSelector != nil { diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/BUILD b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/BUILD index e67f98c588e..1a7b9961d4d 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/BUILD +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/BUILD @@ -6,6 +6,8 @@ go_library( "buildmanagerinfo.go", "capmanagers.go", "fieldmanager.go", + "lastappliedmanager.go", + "lastappliedupdater.go", "managedfieldsupdater.go", "skipnonapplied.go", "stripmeta.go", @@ -15,16 +17,18 @@ go_library( importpath = "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager", visibility = ["//visibility:public"], deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/merge:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/merge:go_default_library", ], ) @@ -50,6 +54,8 @@ go_test( srcs = [ "capmanagers_test.go", "fieldmanager_test.go", + "lastappliedmanager_test.go", + "lastappliedupdater_test.go", "skipnonapplied_test.go", ], data = [ @@ -69,12 +75,13 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/yaml:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto/testing:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/merge:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/typed:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/merge:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/typed:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/capmanagers.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/capmanagers.go index 8e926995329..ae91bf0b9e1 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/capmanagers.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/capmanagers.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" ) type capManagersManager struct { diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go index 69d8920aa61..2f6e5bd08c4 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go @@ -26,9 +26,10 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal" - "k8s.io/klog" + "k8s.io/klog/v2" openapiproto "k8s.io/kube-openapi/pkg/util/proto" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/merge" ) // DefaultMaxUpdateManagers defines the default maximum retained number of managedFields entries from updates @@ -78,31 +79,46 @@ func NewFieldManager(f Manager) *FieldManager { // NewDefaultFieldManager creates a new FieldManager that merges apply requests // and update managed fields for other types of requests. func NewDefaultFieldManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion) (*FieldManager, error) { - f, err := NewStructuredMergeManager(models, objectConverter, objectDefaulter, kind.GroupVersion(), hub) + typeConverter, err := internal.NewTypeConverter(models, false) + if err != nil { + return nil, err + } + + f, err := NewStructuredMergeManager(typeConverter, objectConverter, objectDefaulter, kind.GroupVersion(), hub) if err != nil { return nil, fmt.Errorf("failed to create field manager: %v", err) } - return newDefaultFieldManager(f, objectCreater, kind), nil + return newDefaultFieldManager(f, typeConverter, objectConverter, objectCreater, kind), nil } // NewDefaultCRDFieldManager creates a new FieldManager specifically for // CRDs. This allows for the possibility of fields which are not defined // in models, as well as having no models defined at all. func NewDefaultCRDFieldManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, preserveUnknownFields bool) (_ *FieldManager, err error) { - f, err := NewCRDStructuredMergeManager(models, objectConverter, objectDefaulter, kind.GroupVersion(), hub, preserveUnknownFields) + var typeConverter internal.TypeConverter = internal.DeducedTypeConverter{} + if models != nil { + typeConverter, err = internal.NewTypeConverter(models, preserveUnknownFields) + if err != nil { + return nil, err + } + } + f, err := NewCRDStructuredMergeManager(typeConverter, objectConverter, objectDefaulter, kind.GroupVersion(), hub, preserveUnknownFields) if err != nil { return nil, fmt.Errorf("failed to create field manager: %v", err) } - return newDefaultFieldManager(f, objectCreater, kind), nil + return newDefaultFieldManager(f, typeConverter, objectConverter, objectCreater, kind), nil } // newDefaultFieldManager is a helper function which wraps a Manager with certain default logic. -func newDefaultFieldManager(f Manager, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind) *FieldManager { +func newDefaultFieldManager(f Manager, typeConverter internal.TypeConverter, objectConverter runtime.ObjectConvertor, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind) *FieldManager { f = NewStripMetaManager(f) f = NewManagedFieldsUpdater(f) f = NewBuildManagerInfoManager(f, kind.GroupVersion()) f = NewCapManagersManager(f, DefaultMaxUpdateManagers) f = NewProbabilisticSkipNonAppliedManager(f, objectCreater, kind, DefaultTrackOnCreateProbability) + f = NewLastAppliedManager(f, typeConverter, objectConverter, kind.GroupVersion()) + f = NewLastAppliedUpdater(f) + return NewFieldManager(f) } @@ -200,7 +216,11 @@ func (f *FieldManager) Apply(liveObj, appliedObj runtime.Object, manager string, internal.RemoveObjectManagedFields(liveObj) - if object, managed, err = f.fieldManager.Apply(liveObj, appliedObj, managed, manager, force); err != nil { + object, managed, err = f.fieldManager.Apply(liveObj, appliedObj, managed, manager, force) + if err != nil { + if conflicts, ok := err.(merge.Conflicts); ok { + return nil, internal.NewConflictError(conflicts) + } return nil, err } diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/BUILD b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/BUILD index 313a92f2b7e..05b80967138 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/BUILD +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/BUILD @@ -24,10 +24,10 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/schemaconv:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/merge:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/typed:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/value:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/merge:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/typed:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/value:go_default_library", ], ) @@ -52,9 +52,9 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto/testing:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/merge:go_default_library", - "//vendor/sigs.k8s.io/structured-merge-diff/v3/typed:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/merge:go_default_library", + "//vendor/sigs.k8s.io/structured-merge-diff/v4/typed:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/conflict.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/conflict.go index 2bc0d0ad8a8..cfa19d8d9aa 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/conflict.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/conflict.go @@ -25,8 +25,8 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" - "sigs.k8s.io/structured-merge-diff/v3/merge" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/merge" ) // NewConflictError returns an error including details on the requests apply conflicts diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/fields.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/fields.go index 60117211a6a..08186191a71 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/fields.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/fields.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" ) // EmptyFields represents a set with no paths diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/gvkparser.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/gvkparser.go index f917fcd435a..5e2f82c7506 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/gvkparser.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/gvkparser.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kube-openapi/pkg/schemaconv" "k8s.io/kube-openapi/pkg/util/proto" - "sigs.k8s.io/structured-merge-diff/v3/typed" + "sigs.k8s.io/structured-merge-diff/v4/typed" ) // groupVersionKindExtensionKey is the key used to lookup the diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go index c5434b101e0..9a625e2acf7 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" ) // ManagedInterface groups a fieldpath.ManagedFields together with the timestamps associated with each operation. diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/pathelement.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/pathelement.go index 393420a70b0..1954d65d32e 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/pathelement.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/pathelement.go @@ -23,8 +23,8 @@ import ( "strconv" "strings" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/value" ) const ( diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/typeconverter.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/typeconverter.go index 7b87009a16f..6669665dde9 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/typeconverter.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/typeconverter.go @@ -23,8 +23,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kube-openapi/pkg/util/proto" - "sigs.k8s.io/structured-merge-diff/v3/typed" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/typed" + "sigs.k8s.io/structured-merge-diff/v4/value" ) // TypeConverter allows you to convert from runtime.Object to diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/versionconverter.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/versionconverter.go index 15628b0275e..fc59f2f0ef0 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/versionconverter.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/versionconverter.go @@ -19,9 +19,9 @@ package internal import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" - "sigs.k8s.io/structured-merge-diff/v3/merge" - "sigs.k8s.io/structured-merge-diff/v3/typed" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/merge" + "sigs.k8s.io/structured-merge-diff/v4/typed" ) // versionConverter is an implementation of diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/lastappliedmanager.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/lastappliedmanager.go new file mode 100644 index 00000000000..7c4079a6e6f --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/lastappliedmanager.go @@ -0,0 +1,173 @@ +/* +Copyright 2020 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 fieldmanager + +import ( + "encoding/json" + "fmt" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/merge" +) + +type lastAppliedManager struct { + fieldManager Manager + typeConverter internal.TypeConverter + objectConverter runtime.ObjectConvertor + groupVersion schema.GroupVersion +} + +var _ Manager = &lastAppliedManager{} + +// NewLastAppliedManager converts the client-side apply annotation to +// server-side apply managed fields +func NewLastAppliedManager(fieldManager Manager, typeConverter internal.TypeConverter, objectConverter runtime.ObjectConvertor, groupVersion schema.GroupVersion) Manager { + return &lastAppliedManager{ + fieldManager: fieldManager, + typeConverter: typeConverter, + objectConverter: objectConverter, + groupVersion: groupVersion, + } +} + +// Update implements Manager. +func (f *lastAppliedManager) Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error) { + return f.fieldManager.Update(liveObj, newObj, managed, manager) +} + +// Apply will consider the last-applied annotation +// for upgrading an object managed by client-side apply to server-side apply +// without conflicts. +func (f *lastAppliedManager) Apply(liveObj, newObj runtime.Object, managed Managed, manager string, force bool) (runtime.Object, Managed, error) { + newLiveObj, newManaged, newErr := f.fieldManager.Apply(liveObj, newObj, managed, manager, force) + // Upgrade the client-side apply annotation only from kubectl server-side-apply. + // To opt-out of this behavior, users may specify a different field manager. + if manager != "kubectl" { + return newLiveObj, newManaged, newErr + } + + // Check if we have conflicts + if newErr == nil { + return newLiveObj, newManaged, newErr + } + conflicts, ok := newErr.(merge.Conflicts) + if !ok { + return newLiveObj, newManaged, newErr + } + conflictSet := conflictsToSet(conflicts) + + // Check if conflicts are allowed due to client-side apply, + // and if so, then force apply + allowedConflictSet, err := f.allowedConflictsFromLastApplied(liveObj) + if err != nil { + return newLiveObj, newManaged, newErr + } + if !conflictSet.Difference(allowedConflictSet).Empty() { + newConflicts := conflictsDifference(conflicts, allowedConflictSet) + return newLiveObj, newManaged, newConflicts + } + + return f.fieldManager.Apply(liveObj, newObj, managed, manager, true) +} + +func (f *lastAppliedManager) allowedConflictsFromLastApplied(liveObj runtime.Object) (*fieldpath.Set, error) { + var accessor, err = meta.Accessor(liveObj) + if err != nil { + panic(fmt.Sprintf("couldn't get accessor: %v", err)) + } + + // If there is no client-side apply annotation, then there is nothing to do + var annotations = accessor.GetAnnotations() + if annotations == nil { + return nil, fmt.Errorf("no last applied annotation") + } + var lastApplied, ok = annotations[corev1.LastAppliedConfigAnnotation] + if !ok || lastApplied == "" { + return nil, fmt.Errorf("no last applied annotation") + } + + liveObjVersioned, err := f.objectConverter.ConvertToVersion(liveObj, f.groupVersion) + if err != nil { + return nil, fmt.Errorf("failed to convert live obj to versioned: %v", err) + } + + liveObjTyped, err := f.typeConverter.ObjectToTyped(liveObjVersioned) + if err != nil { + return nil, fmt.Errorf("failed to convert live obj to typed: %v", err) + } + + var lastAppliedObj = &unstructured.Unstructured{Object: map[string]interface{}{}} + err = json.Unmarshal([]byte(lastApplied), lastAppliedObj) + if err != nil { + return nil, fmt.Errorf("failed to decode last applied obj: %v in '%s'", err, lastApplied) + } + + if lastAppliedObj.GetAPIVersion() != f.groupVersion.String() { + return nil, fmt.Errorf("expected version of last applied to match live object '%s', but got '%s': %v", f.groupVersion.String(), lastAppliedObj.GetAPIVersion(), err) + } + + lastAppliedObjTyped, err := f.typeConverter.ObjectToTyped(lastAppliedObj) + if err != nil { + return nil, fmt.Errorf("failed to convert last applied to typed: %v", err) + } + + lastAppliedObjFieldSet, err := lastAppliedObjTyped.ToFieldSet() + if err != nil { + return nil, fmt.Errorf("failed to create fieldset for last applied object: %v", err) + } + + comparison, err := lastAppliedObjTyped.Compare(liveObjTyped) + if err != nil { + return nil, fmt.Errorf("failed to compare last applied object and live object: %v", err) + } + + // Remove fields in last applied that are different, added, or missing in + // the live object. + // Because last-applied fields don't match the live object fields, + // then we don't own these fields. + lastAppliedObjFieldSet = lastAppliedObjFieldSet. + Difference(comparison.Modified). + Difference(comparison.Added). + Difference(comparison.Removed) + + return lastAppliedObjFieldSet, nil +} + +// TODO: replace with merge.Conflicts.ToSet() +func conflictsToSet(conflicts merge.Conflicts) *fieldpath.Set { + conflictSet := fieldpath.NewSet() + for _, conflict := range []merge.Conflict(conflicts) { + conflictSet.Insert(conflict.Path) + } + return conflictSet +} + +func conflictsDifference(conflicts merge.Conflicts, s *fieldpath.Set) merge.Conflicts { + newConflicts := []merge.Conflict{} + for _, conflict := range []merge.Conflict(conflicts) { + if !s.Has(conflict.Path) { + newConflicts = append(newConflicts, conflict) + } + } + return newConflicts +} diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/lastappliedupdater.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/lastappliedupdater.go new file mode 100644 index 00000000000..91e2e969147 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/lastappliedupdater.go @@ -0,0 +1,117 @@ +/* +Copyright 2020 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 fieldmanager + +import ( + "fmt" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" +) + +type lastAppliedUpdater struct { + fieldManager Manager +} + +var _ Manager = &lastAppliedUpdater{} + +// NewLastAppliedUpdater sets the client-side apply annotation up to date with +// server-side apply managed fields +func NewLastAppliedUpdater(fieldManager Manager) Manager { + return &lastAppliedUpdater{ + fieldManager: fieldManager, + } +} + +// Update implements Manager. +func (f *lastAppliedUpdater) Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error) { + return f.fieldManager.Update(liveObj, newObj, managed, manager) +} + +// server-side apply managed fields +func (f *lastAppliedUpdater) Apply(liveObj, newObj runtime.Object, managed Managed, manager string, force bool) (runtime.Object, Managed, error) { + liveObj, managed, err := f.fieldManager.Apply(liveObj, newObj, managed, manager, force) + if err != nil { + return liveObj, managed, err + } + + // Sync the client-side apply annotation only from kubectl server-side apply. + // To opt-out of this behavior, users may specify a different field manager. + // + // If the client-side apply annotation doesn't exist, + // then continue because we have no annotation to update + if manager == "kubectl" && hasLastApplied(liveObj) { + lastAppliedValue, err := buildLastApplied(newObj) + if err != nil { + return nil, nil, fmt.Errorf("failed to build last-applied annotation: %v", err) + } + err = setLastApplied(liveObj, lastAppliedValue) + if err != nil { + return nil, nil, fmt.Errorf("failed to set last-applied annotation: %v", err) + } + } + return liveObj, managed, err +} + +func hasLastApplied(obj runtime.Object) bool { + var accessor, err = meta.Accessor(obj) + if err != nil { + panic(fmt.Sprintf("couldn't get accessor: %v", err)) + } + var annotations = accessor.GetAnnotations() + if annotations == nil { + return false + } + _, ok := annotations[corev1.LastAppliedConfigAnnotation] + return ok +} + +func setLastApplied(obj runtime.Object, value string) error { + accessor, err := meta.Accessor(obj) + if err != nil { + panic(fmt.Sprintf("couldn't get accessor: %v", err)) + } + var annotations = accessor.GetAnnotations() + if annotations == nil { + annotations = map[string]string{} + } + annotations[corev1.LastAppliedConfigAnnotation] = value + accessor.SetAnnotations(annotations) + return nil +} + +func buildLastApplied(obj runtime.Object) (string, error) { + obj = obj.DeepCopyObject() + + var accessor, err = meta.Accessor(obj) + if err != nil { + panic(fmt.Sprintf("couldn't get accessor: %v", err)) + } + + // Remove the annotation from the object before encoding the object + var annotations = accessor.GetAnnotations() + delete(annotations, corev1.LastAppliedConfigAnnotation) + accessor.SetAnnotations(annotations) + + lastApplied, err := runtime.Encode(unstructured.UnstructuredJSONScheme, obj) + if err != nil { + return "", fmt.Errorf("couldn't encode object into last applied annotation: %v", err) + } + return string(lastApplied), nil +} diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/managedfieldsupdater.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/managedfieldsupdater.go index a015e002ae0..b3ecd639333 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/managedfieldsupdater.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/managedfieldsupdater.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" ) type managedFieldsUpdater struct { diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/stripmeta.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/stripmeta.go index fc8ee9b5833..1460d9c8021 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/stripmeta.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/stripmeta.go @@ -20,7 +20,7 @@ import ( "fmt" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" ) type stripMetaManager struct { diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/structuredmerge.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/structuredmerge.go index 3ec16a8386e..a4761d3acd4 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/structuredmerge.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/structuredmerge.go @@ -24,9 +24,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal" - openapiproto "k8s.io/kube-openapi/pkg/util/proto" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" - "sigs.k8s.io/structured-merge-diff/v3/merge" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/merge" ) type structuredMergeManager struct { @@ -42,12 +41,7 @@ var _ Manager = &structuredMergeManager{} // NewStructuredMergeManager creates a new Manager that merges apply requests // and update managed fields for other types of requests. -func NewStructuredMergeManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion) (Manager, error) { - typeConverter, err := internal.NewTypeConverter(models, false) - if err != nil { - return nil, err - } - +func NewStructuredMergeManager(typeConverter internal.TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion) (Manager, error) { return &structuredMergeManager{ typeConverter: typeConverter, objectConverter: objectConverter, @@ -55,7 +49,7 @@ func NewStructuredMergeManager(models openapiproto.Models, objectConverter runti groupVersion: gv, hubVersion: hub, updater: merge.Updater{ - Converter: internal.NewVersionConverter(typeConverter, objectConverter, hub), + Converter: internal.NewVersionConverter(typeConverter, objectConverter, hub), // This is the converter provided to SMD from k8s }, }, nil } @@ -63,14 +57,7 @@ func NewStructuredMergeManager(models openapiproto.Models, objectConverter runti // NewCRDStructuredMergeManager creates a new Manager specifically for // CRDs. This allows for the possibility of fields which are not defined // in models, as well as having no models defined at all. -func NewCRDStructuredMergeManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, preserveUnknownFields bool) (_ Manager, err error) { - var typeConverter internal.TypeConverter = internal.DeducedTypeConverter{} - if models != nil { - typeConverter, err = internal.NewTypeConverter(models, preserveUnknownFields) - if err != nil { - return nil, err - } - } +func NewCRDStructuredMergeManager(typeConverter internal.TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, preserveUnknownFields bool) (_ Manager, err error) { return &structuredMergeManager{ typeConverter: typeConverter, objectConverter: objectConverter, @@ -149,9 +136,6 @@ func (f *structuredMergeManager) Apply(liveObj, patchObj runtime.Object, managed apiVersion := fieldpath.APIVersion(f.groupVersion.String()) newObjTyped, managedFields, err := f.updater.Apply(liveObjTyped, patchObjTyped, apiVersion, managed.Fields(), manager, force) if err != nil { - if conflicts, ok := err.(merge.Conflicts); ok { - return nil, nil, internal.NewConflictError(conflicts) - } return nil, nil, err } managed = internal.NewManaged(managedFields, managed.Times()) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/get.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/get.go index 3c51318e8ca..c3f6e4cbe13 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/get.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/get.go @@ -19,13 +19,15 @@ package handlers import ( "context" "fmt" + metainternalversionvalidation "k8s.io/apimachinery/pkg/apis/meta/internalversion/validation" + "k8s.io/apimachinery/pkg/runtime/schema" "math/rand" "net/http" "net/url" "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" @@ -198,6 +200,12 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope *RequestScope, forceWatc return } + if errs := metainternalversionvalidation.ValidateListOptions(&opts); len(errs) > 0 { + err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "ListOptions"}, "", errs) + scope.err(err, w, req) + return + } + // transform fields // TODO: DecodeParametersInto should do this. if opts.FieldSelector != nil { @@ -248,7 +256,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope *RequestScope, forceWatc if timeout == 0 && minRequestTimeout > 0 { timeout = time.Duration(float64(minRequestTimeout) * (rand.Float64() + 1.0)) } - klog.V(3).Infof("Starting watch for %s, rv=%s labels=%s fields=%s timeout=%s", req.URL.Path, opts.ResourceVersion, opts.LabelSelector, opts.FieldSelector, timeout) + klog.V(3).InfoS("Starting watch", "path", req.URL.Path, "resourceVersion", opts.ResourceVersion, "labels", opts.LabelSelector, "fields", opts.FieldSelector, "timeout", timeout) ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() watcher, err := rw.Watch(ctx, &opts) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go index c295d0aa659..a043bb3b251 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go @@ -421,6 +421,7 @@ type applyPatcher struct { creater runtime.ObjectCreater kind schema.GroupVersionKind fieldManager *fieldmanager.FieldManager + userAgent string } func (p *applyPatcher) applyPatchToCurrentObject(obj runtime.Object) (runtime.Object, error) { @@ -569,6 +570,7 @@ func (p *patcher) patchResource(ctx context.Context, scope *RequestScope) (runti options: p.options, creater: p.creater, kind: p.kind, + userAgent: p.userAgent, } p.forceAllowCreate = true default: diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go index 97471637e56..073a32109b7 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go @@ -46,7 +46,7 @@ import ( "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/rest" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" ) // RequestScope encapsulates common fields across all RESTful handler methods. diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/installer.go b/vendor/k8s.io/apiserver/pkg/endpoints/installer.go index 37579820a4a..b406c91b1cb 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/installer.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/installer.go @@ -32,15 +32,19 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/endpoints/deprecation" "k8s.io/apiserver/pkg/endpoints/discovery" "k8s.io/apiserver/pkg/endpoints/handlers" "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/metrics" + utilwarning "k8s.io/apiserver/pkg/endpoints/warning" "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/rest" utilfeature "k8s.io/apiserver/pkg/util/feature" + versioninfo "k8s.io/component-base/version" ) const ( @@ -381,7 +385,11 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag resourceKind = kind } - tableProvider, _ := storage.(rest.TableConvertor) + tableProvider, isTableProvider := storage.(rest.TableConvertor) + if isLister && !isTableProvider { + // All listers must implement TableProvider + return nil, fmt.Errorf("%q must implement TableConvertor", resource) + } var apiResource metav1.APIResource if utilfeature.DefaultFeatureGate.Enabled(features.StorageVersionHash) && @@ -617,6 +625,26 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag verbOverrider, needOverride := storage.(StorageMetricsOverride) + // accumulate endpoint-level warnings + var ( + enableWarningHeaders = utilfeature.DefaultFeatureGate.Enabled(features.WarningHeaders) + + warnings []string + deprecated bool + removedRelease string + ) + + { + versionedPtrWithGVK := versionedPtr.DeepCopyObject() + versionedPtrWithGVK.GetObjectKind().SetGroupVersionKind(fqKindToRegister) + currentMajor, currentMinor, _ := deprecation.MajorMinor(versioninfo.Get()) + deprecated = deprecation.IsDeprecated(versionedPtrWithGVK, currentMajor, currentMinor) + if deprecated { + removedRelease = deprecation.RemovedRelease(versionedPtrWithGVK) + warnings = append(warnings, deprecation.WarningMessage(versionedPtrWithGVK)) + } + } + switch action.Verb { case "GET": // Get a resource. var handler restful.RouteFunction @@ -628,9 +656,12 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag if needOverride { // need change the reported verb - handler = metrics.InstrumentRouteFunc(verbOverrider.OverrideMetricsVerb(action.Verb), group, version, resource, subresource, requestScope, metrics.APIServerComponent, handler) + handler = metrics.InstrumentRouteFunc(verbOverrider.OverrideMetricsVerb(action.Verb), group, version, resource, subresource, requestScope, metrics.APIServerComponent, deprecated, removedRelease, handler) } else { - handler = metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, handler) + handler = metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, deprecated, removedRelease, handler) + } + if enableWarningHeaders { + handler = utilwarning.AddWarningsHandler(handler, warnings) } doc := "read the specified " + kind @@ -661,7 +692,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag if isSubresource { doc = "list " + subresource + " of objects of kind " + kind } - handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, restfulListResource(lister, watcher, reqScope, false, a.minRequestTimeout)) + handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, deprecated, removedRelease, restfulListResource(lister, watcher, reqScope, false, a.minRequestTimeout)) + if enableWarningHeaders { + handler = utilwarning.AddWarningsHandler(handler, warnings) + } route := ws.GET(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). @@ -693,7 +727,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag if isSubresource { doc = "replace " + subresource + " of the specified " + kind } - handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, restfulUpdateResource(updater, reqScope, admit)) + handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, deprecated, removedRelease, restfulUpdateResource(updater, reqScope, admit)) + if enableWarningHeaders { + handler = utilwarning.AddWarningsHandler(handler, warnings) + } route := ws.PUT(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). @@ -723,7 +760,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag if utilfeature.DefaultFeatureGate.Enabled(features.ServerSideApply) { supportedTypes = append(supportedTypes, string(types.ApplyPatchType)) } - handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, restfulPatchResource(patcher, reqScope, admit, supportedTypes)) + handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, deprecated, removedRelease, restfulPatchResource(patcher, reqScope, admit, supportedTypes)) + if enableWarningHeaders { + handler = utilwarning.AddWarningsHandler(handler, warnings) + } route := ws.PATCH(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). @@ -745,7 +785,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } else { handler = restfulCreateResource(creater, reqScope, admit) } - handler = metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, handler) + handler = metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, deprecated, removedRelease, handler) + if enableWarningHeaders { + handler = utilwarning.AddWarningsHandler(handler, warnings) + } article := GetArticleForNoun(kind, " ") doc := "create" + article + kind if isSubresource { @@ -778,7 +821,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag if deleteReturnsDeletedObject { deleteReturnType = producedObject } - handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, restfulDeleteResource(gracefulDeleter, isGracefulDeleter, reqScope, admit)) + handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, deprecated, removedRelease, restfulDeleteResource(gracefulDeleter, isGracefulDeleter, reqScope, admit)) + if enableWarningHeaders { + handler = utilwarning.AddWarningsHandler(handler, warnings) + } route := ws.DELETE(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). @@ -801,7 +847,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag if isSubresource { doc = "delete collection of " + subresource + " of a " + kind } - handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, restfulDeleteCollection(collectionDeleter, isCollectionDeleter, reqScope, admit)) + handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, deprecated, removedRelease, restfulDeleteCollection(collectionDeleter, isCollectionDeleter, reqScope, admit)) + if enableWarningHeaders { + handler = utilwarning.AddWarningsHandler(handler, warnings) + } route := ws.DELETE(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). @@ -816,7 +865,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag return nil, err } } - if err := AddObjectParams(ws, route, versionedListOptions); err != nil { + if err := AddObjectParams(ws, route, versionedListOptions, "watch", "allowWatchBookmarks"); err != nil { return nil, err } addParams(route, action.Params) @@ -828,7 +877,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag doc = "watch changes to " + subresource + " of an object of kind " + kind } doc += ". deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter." - handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, restfulListResource(lister, watcher, reqScope, true, a.minRequestTimeout)) + handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, deprecated, removedRelease, restfulListResource(lister, watcher, reqScope, true, a.minRequestTimeout)) + if enableWarningHeaders { + handler = utilwarning.AddWarningsHandler(handler, warnings) + } route := ws.GET(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). @@ -848,7 +900,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag doc = "watch individual changes to a list of " + subresource + " of " + kind } doc += ". deprecated: use the 'watch' parameter with a list operation instead." - handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, restfulListResource(lister, watcher, reqScope, true, a.minRequestTimeout)) + handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, deprecated, removedRelease, restfulListResource(lister, watcher, reqScope, true, a.minRequestTimeout)) + if enableWarningHeaders { + handler = utilwarning.AddWarningsHandler(handler, warnings) + } route := ws.GET(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). @@ -871,7 +926,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag if isSubresource { doc = "connect " + method + " requests to " + subresource + " of " + kind } - handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, restfulConnectResource(connecter, reqScope, admit, path, isSubresource)) + handler := metrics.InstrumentRouteFunc(action.Verb, group, version, resource, subresource, requestScope, metrics.APIServerComponent, deprecated, removedRelease, restfulConnectResource(connecter, reqScope, admit, path, isSubresource)) + if enableWarningHeaders { + handler = utilwarning.AddWarningsHandler(handler, warnings) + } route := ws.Method(method).Path(action.Path). To(handler). Doc(doc). @@ -958,12 +1016,13 @@ func addParams(route *restful.RouteBuilder, params []*restful.Parameter) { // Go JSON behavior for omitting a field) become query parameters. The name of the query parameter is // the JSON field name. If a description struct tag is set on the field, that description is used on the // query parameter. In essence, it converts a standard JSON top level object into a query param schema. -func AddObjectParams(ws *restful.WebService, route *restful.RouteBuilder, obj interface{}) error { +func AddObjectParams(ws *restful.WebService, route *restful.RouteBuilder, obj interface{}, excludedNames ...string) error { sv, err := conversion.EnforcePtr(obj) if err != nil { return err } st := sv.Type() + excludedNameSet := sets.NewString(excludedNames...) switch st.Kind() { case reflect.Struct: for i := 0; i < st.NumField(); i++ { @@ -989,7 +1048,9 @@ func AddObjectParams(ws *restful.WebService, route *restful.RouteBuilder, obj in if len(jsonName) == 0 { continue } - + if excludedNameSet.Has(jsonName) { + continue + } var desc string if docable, ok := obj.(documentable); ok { desc = docable.SwaggerDoc()[jsonName] @@ -1017,6 +1078,10 @@ func typeToJSON(typeName string) string { return "string" case "v1.DeletionPropagation", "*v1.DeletionPropagation": return "string" + case "v1.ResourceVersionMatch", "*v1.ResourceVersionMatch": + return "string" + case "v1.IncludeObjectPolicy", "*v1.IncludeObjectPolicy": + return "string" // TODO: Fix these when go-restful supports a way to specify an array query param: // https://github.com/emicklei/go-restful/issues/225 @@ -1062,7 +1127,7 @@ func splitSubresource(path string) (string, string, error) { // GetArticleForNoun returns the article needed for the given noun. func GetArticleForNoun(noun string, padding string) string { - if noun[len(noun)-2:] != "ss" && noun[len(noun)-1:] == "s" { + if !strings.HasSuffix(noun, "ss") && strings.HasSuffix(noun, "s") { // Plurals don't have an article. // Don't catch words like class return fmt.Sprintf("%v", padding) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/metrics/BUILD b/vendor/k8s.io/apiserver/pkg/endpoints/metrics/BUILD index fee49f24acb..952f0a2bc3d 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/metrics/BUILD +++ b/vendor/k8s.io/apiserver/pkg/endpoints/metrics/BUILD @@ -15,6 +15,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/audit:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go b/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go index 6f1a836e347..8d042dc51cc 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go @@ -31,6 +31,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/types" utilsets "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/features" utilfeature "k8s.io/apiserver/pkg/util/feature" @@ -60,6 +61,15 @@ const ( * the metric stability policy. */ var ( + deprecatedRequestGauge = compbasemetrics.NewGaugeVec( + &compbasemetrics.GaugeOpts{ + Name: "apiserver_requested_deprecated_apis", + Help: "Gauge of deprecated APIs that have been requested, broken out by API group, version, resource, subresource, and removed_release.", + StabilityLevel: compbasemetrics.ALPHA, + }, + []string{"group", "version", "resource", "subresource", "removed_release"}, + ) + // TODO(a-robinson): Add unit tests for the handling of these metrics once // the upstream library supports it. requestCounter = compbasemetrics.NewCounterVec( @@ -112,7 +122,15 @@ var ( Help: "Number of requests dropped with 'Try again later' response", StabilityLevel: compbasemetrics.ALPHA, }, - []string{"requestKind"}, + []string{"request_kind"}, + ) + // TLSHandshakeErrors is a number of requests dropped with 'TLS handshake error from' error + TLSHandshakeErrors = compbasemetrics.NewCounter( + &compbasemetrics.CounterOpts{ + Name: "apiserver_tls_handshake_errors_total", + Help: "Number of requests dropped with 'TLS handshake error from' error", + StabilityLevel: compbasemetrics.ALPHA, + }, ) // RegisteredWatchers is a number of currently registered watchers splitted by resource. RegisteredWatchers = compbasemetrics.NewGaugeVec( @@ -148,7 +166,15 @@ var ( Help: "Maximal number of currently used inflight request limit of this apiserver per request kind in last second.", StabilityLevel: compbasemetrics.ALPHA, }, - []string{"requestKind"}, + []string{"request_kind"}, + ) + currentInqueueRequests = compbasemetrics.NewGaugeVec( + &compbasemetrics.GaugeOpts{ + Name: "apiserver_current_inqueue_requests", + Help: "Maximal number of queued requests in this apiserver per request kind in last second.", + StabilityLevel: compbasemetrics.ALPHA, + }, + []string{"request_kind"}, ) requestTerminationsTotal = compbasemetrics.NewCounterVec( @@ -162,15 +188,18 @@ var ( kubectlExeRegexp = regexp.MustCompile(`^.*((?i:kubectl\.exe))`) metrics = []resettableCollector{ + deprecatedRequestGauge, requestCounter, longRunningRequestGauge, requestLatencies, responseSizes, DroppedRequests, + TLSHandshakeErrors, RegisteredWatchers, WatchEvents, WatchEventsSizes, currentInflightRequests, + currentInqueueRequests, requestTerminationsTotal, } @@ -211,6 +240,21 @@ const ( ReadOnlyKind = "readOnly" // MutatingKind is a string identifying mutating request kind MutatingKind = "mutating" + + // WaitingPhase is the phase value for a request waiting in a queue + WaitingPhase = "waiting" + // ExecutingPhase is the phase value for an executing request + ExecutingPhase = "executing" +) + +const ( + // deprecatedAnnotationKey is a key for an audit annotation set to + // "true" on requests made to deprecated API versions + deprecatedAnnotationKey = "k8s.io/deprecated" + // removedReleaseAnnotationKey is a key for an audit annotation set to + // the target removal release, in "." format, + // on requests made to deprecated API versions with a target removal release + removedReleaseAnnotationKey = "k8s.io/removed-release" ) var registerMetrics sync.Once @@ -231,9 +275,19 @@ func Reset() { } } -func UpdateInflightRequestMetrics(nonmutating, mutating int) { - currentInflightRequests.WithLabelValues(ReadOnlyKind).Set(float64(nonmutating)) - currentInflightRequests.WithLabelValues(MutatingKind).Set(float64(mutating)) +// UpdateInflightRequestMetrics reports concurrency metrics classified by +// mutating vs Readonly. +func UpdateInflightRequestMetrics(phase string, nonmutating, mutating int) { + for _, kc := range []struct { + kind string + count int + }{{ReadOnlyKind, nonmutating}, {MutatingKind, mutating}} { + if phase == ExecutingPhase { + currentInflightRequests.WithLabelValues(kc.kind).Set(float64(kc.count)) + } else { + currentInqueueRequests.WithLabelValues(kc.kind).Set(float64(kc.count)) + } + } } // RecordRequestTermination records that the request was terminated early as part of a resource @@ -288,12 +342,19 @@ func RecordLongRunning(req *http.Request, requestInfo *request.RequestInfo, comp // MonitorRequest handles standard transformations for client and the reported verb and then invokes Monitor to record // a request. verb must be uppercase to be backwards compatible with existing monitoring tooling. -func MonitorRequest(req *http.Request, verb, group, version, resource, subresource, scope, component, contentType string, httpCode, respSize int, elapsed time.Duration) { +func MonitorRequest(req *http.Request, verb, group, version, resource, subresource, scope, component string, deprecated bool, removedRelease string, contentType string, httpCode, respSize int, elapsed time.Duration) { reportedVerb := cleanVerb(verb, req) dryRun := cleanDryRun(req.URL) elapsedSeconds := elapsed.Seconds() cleanContentType := cleanContentType(contentType) requestCounter.WithLabelValues(reportedVerb, dryRun, group, version, resource, subresource, scope, component, cleanContentType, codeToString(httpCode)).Inc() + if deprecated { + deprecatedRequestGauge.WithLabelValues(group, version, resource, subresource, removedRelease).Set(1) + audit.AddAuditAnnotation(req.Context(), deprecatedAnnotationKey, "true") + if len(removedRelease) > 0 { + audit.AddAuditAnnotation(req.Context(), removedReleaseAnnotationKey, removedRelease) + } + } requestLatencies.WithLabelValues(reportedVerb, dryRun, group, version, resource, subresource, scope, component).Observe(elapsedSeconds) // We are only interested in response sizes of read requests. if verb == "GET" || verb == "LIST" { @@ -303,7 +364,7 @@ func MonitorRequest(req *http.Request, verb, group, version, resource, subresour // InstrumentRouteFunc works like Prometheus' InstrumentHandlerFunc but wraps // the go-restful RouteFunction instead of a HandlerFunc plus some Kubernetes endpoint specific information. -func InstrumentRouteFunc(verb, group, version, resource, subresource, scope, component string, routeFunc restful.RouteFunction) restful.RouteFunction { +func InstrumentRouteFunc(verb, group, version, resource, subresource, scope, component string, deprecated bool, removedRelease string, routeFunc restful.RouteFunction) restful.RouteFunction { return restful.RouteFunction(func(request *restful.Request, response *restful.Response) { now := time.Now() @@ -322,12 +383,12 @@ func InstrumentRouteFunc(verb, group, version, resource, subresource, scope, com routeFunc(request, response) - MonitorRequest(request.Request, verb, group, version, resource, subresource, scope, component, delegate.Header().Get("Content-Type"), delegate.Status(), delegate.ContentLength(), time.Since(now)) + MonitorRequest(request.Request, verb, group, version, resource, subresource, scope, component, deprecated, removedRelease, delegate.Header().Get("Content-Type"), delegate.Status(), delegate.ContentLength(), time.Since(now)) }) } // InstrumentHandlerFunc works like Prometheus' InstrumentHandlerFunc but adds some Kubernetes endpoint specific information. -func InstrumentHandlerFunc(verb, group, version, resource, subresource, scope, component string, handler http.HandlerFunc) http.HandlerFunc { +func InstrumentHandlerFunc(verb, group, version, resource, subresource, scope, component string, deprecated bool, removedRelease string, handler http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { now := time.Now() @@ -344,7 +405,7 @@ func InstrumentHandlerFunc(verb, group, version, resource, subresource, scope, c handler(w, req) - MonitorRequest(req, verb, group, version, resource, subresource, scope, component, delegate.Header().Get("Content-Type"), delegate.Status(), delegate.ContentLength(), time.Since(now)) + MonitorRequest(req, verb, group, version, resource, subresource, scope, component, deprecated, removedRelease, delegate.Header().Get("Content-Type"), delegate.Status(), delegate.ContentLength(), time.Since(now)) } } diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/request/BUILD b/vendor/k8s.io/apiserver/pkg/endpoints/request/BUILD index 9f01735a389..6965fc19f6d 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/request/BUILD +++ b/vendor/k8s.io/apiserver/pkg/endpoints/request/BUILD @@ -37,7 +37,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go b/vendor/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go index 8eb1a8500c4..0890ae4ff1a 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go @@ -28,7 +28,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/klog" + "k8s.io/klog/v2" ) // LongRunningRequestCheck is a predicate which is true for long-running http requests. diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/install/BUILD b/vendor/k8s.io/apiserver/pkg/endpoints/warning/BUILD similarity index 50% rename from vendor/k8s.io/kubernetes/pkg/apis/auditregistration/install/BUILD rename to vendor/k8s.io/apiserver/pkg/endpoints/warning/BUILD index 09172ed23c9..748c41706a1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/install/BUILD +++ b/vendor/k8s.io/apiserver/pkg/endpoints/warning/BUILD @@ -2,15 +2,13 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["install.go"], - importpath = "k8s.io/kubernetes/pkg/apis/auditregistration/install", + srcs = ["warning.go"], + importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/warning", + importpath = "k8s.io/apiserver/pkg/endpoints/warning", visibility = ["//visibility:public"], deps = [ - "//pkg/api/legacyscheme:go_default_library", - "//pkg/apis/auditregistration:go_default_library", - "//pkg/apis/auditregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/warning:go_default_library", + "//vendor/github.com/emicklei/go-restful:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/warning/warning.go b/vendor/k8s.io/apiserver/pkg/endpoints/warning/warning.go new file mode 100644 index 00000000000..c0dde6e06dc --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/endpoints/warning/warning.go @@ -0,0 +1,39 @@ +/* +Copyright 2020 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 warning + +import ( + restful "github.com/emicklei/go-restful" + + "k8s.io/apiserver/pkg/warning" +) + +// AddWarningsHandler returns a handler that adds the provided warnings to all requests, +// then delegates to the provided handler. +func AddWarningsHandler(handler restful.RouteFunction, warnings []string) restful.RouteFunction { + if len(warnings) == 0 { + return handler + } + + return func(req *restful.Request, res *restful.Response) { + ctx := req.Request.Context() + for _, msg := range warnings { + warning.AddWarning(ctx, "", msg) + } + handler(req, res) + } +} diff --git a/vendor/k8s.io/apiserver/pkg/features/kube_features.go b/vendor/k8s.io/apiserver/pkg/features/kube_features.go index f0b5308e83a..a407c3492d9 100644 --- a/vendor/k8s.io/apiserver/pkg/features/kube_features.go +++ b/vendor/k8s.io/apiserver/pkg/features/kube_features.go @@ -59,13 +59,6 @@ const ( // audited. AdvancedAuditing featuregate.Feature = "AdvancedAuditing" - // owner: @pbarker - // alpha: v1.13 - // - // DynamicAuditing enables configuration of audit policy and webhook backends through an - // AuditSink API object. - DynamicAuditing featuregate.Feature = "DynamicAuditing" - // owner: @ilackams // alpha: v1.7 // @@ -83,6 +76,7 @@ const ( // owner: @apelisse // alpha: v1.12 // beta: v1.13 + // stable: v1.18 // // Allow requests to be processed but not stored, so that // validation, merging, mutation can be tested without @@ -111,18 +105,6 @@ const ( // document. StorageVersionHash featuregate.Feature = "StorageVersionHash" - // owner: @ksubrmnn - // alpha: v1.14 - // - // Allows kube-proxy to run in Overlay mode for Windows - WinOverlay featuregate.Feature = "WinOverlay" - - // owner: @ksubrmnn - // alpha: v1.14 - // - // Allows kube-proxy to create DSR loadbalancers for Windows - WinDSR featuregate.Feature = "WinDSR" - // owner: @wojtek-t // alpha: v1.15 // beta: v1.16 @@ -144,11 +126,18 @@ const ( // Deprecates and removes SelfLink from ObjectMeta and ListMeta. RemoveSelfLink featuregate.Feature = "RemoveSelfLink" - // owner: @shaloulcy + // owner: @shaloulcy, @wojtek-t // alpha: v1.18 + // beta: v1.19 // // Allows label and field based indexes in apiserver watch cache to accelerate list operations. SelectorIndex featuregate.Feature = "SelectorIndex" + + // owner: @liggitt + // beta: v1.19 + // + // Allows sending warning headers in API responses. + WarningHeaders featuregate.Feature = "WarningHeaders" ) func init() { @@ -162,17 +151,15 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS StreamingProxyRedirects: {Default: true, PreRelease: featuregate.Deprecated}, ValidateProxyRedirects: {Default: true, PreRelease: featuregate.Beta}, AdvancedAuditing: {Default: true, PreRelease: featuregate.GA}, - DynamicAuditing: {Default: false, PreRelease: featuregate.Alpha}, APIResponseCompression: {Default: true, PreRelease: featuregate.Beta}, APIListChunking: {Default: true, PreRelease: featuregate.Beta}, - DryRun: {Default: true, PreRelease: featuregate.Beta}, + DryRun: {Default: true, PreRelease: featuregate.GA}, RemainingItemCount: {Default: true, PreRelease: featuregate.Beta}, ServerSideApply: {Default: true, PreRelease: featuregate.Beta}, StorageVersionHash: {Default: true, PreRelease: featuregate.Beta}, - WinOverlay: {Default: false, PreRelease: featuregate.Alpha}, - WinDSR: {Default: false, PreRelease: featuregate.Alpha}, WatchBookmark: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, APIPriorityAndFairness: {Default: false, PreRelease: featuregate.Alpha}, RemoveSelfLink: {Default: false, PreRelease: featuregate.Alpha}, - SelectorIndex: {Default: false, PreRelease: featuregate.Alpha}, + SelectorIndex: {Default: true, PreRelease: featuregate.Beta}, + WarningHeaders: {Default: true, PreRelease: featuregate.Beta}, } diff --git a/vendor/k8s.io/apiserver/pkg/registry/generic/OWNERS b/vendor/k8s.io/apiserver/pkg/registry/generic/OWNERS index 59bdd352d7a..d0b6c002c86 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/generic/OWNERS +++ b/vendor/k8s.io/apiserver/pkg/registry/generic/OWNERS @@ -18,7 +18,6 @@ reviewers: - janetkuo - pwittrock - ncdc -- eparis - piosz - dims - hongchaodeng diff --git a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/BUILD b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/BUILD index db8b7d698df..d948a3c0726 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/BUILD +++ b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/BUILD @@ -66,6 +66,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/api/validation/path:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", @@ -87,7 +88,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/dryrun:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go index c32de6f8ff9..65a533102f9 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go +++ b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go @@ -35,7 +35,7 @@ func (s *DryRunnableStorage) Versioner() storage.Versioner { func (s *DryRunnableStorage) Create(ctx context.Context, key string, obj, out runtime.Object, ttl uint64, dryRun bool) error { if dryRun { - if err := s.Storage.Get(ctx, key, "", out, false); err == nil { + if err := s.Storage.Get(ctx, key, storage.GetOptions{}, out); err == nil { return storage.NewKeyExistsError(key, 0) } return s.copyInto(obj, out) @@ -45,7 +45,7 @@ func (s *DryRunnableStorage) Create(ctx context.Context, key string, obj, out ru func (s *DryRunnableStorage) Delete(ctx context.Context, key string, out runtime.Object, preconditions *storage.Preconditions, deleteValidation storage.ValidateObjectFunc, dryRun bool) error { if dryRun { - if err := s.Storage.Get(ctx, key, "", out, false); err != nil { + if err := s.Storage.Get(ctx, key, storage.GetOptions{}, out); err != nil { return err } if err := preconditions.Check(key, out); err != nil { @@ -56,31 +56,31 @@ func (s *DryRunnableStorage) Delete(ctx context.Context, key string, out runtime return s.Storage.Delete(ctx, key, out, preconditions, deleteValidation) } -func (s *DryRunnableStorage) Watch(ctx context.Context, key string, resourceVersion string, p storage.SelectionPredicate) (watch.Interface, error) { - return s.Storage.Watch(ctx, key, resourceVersion, p) +func (s *DryRunnableStorage) Watch(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { + return s.Storage.Watch(ctx, key, opts) } -func (s *DryRunnableStorage) WatchList(ctx context.Context, key string, resourceVersion string, p storage.SelectionPredicate) (watch.Interface, error) { - return s.Storage.WatchList(ctx, key, resourceVersion, p) +func (s *DryRunnableStorage) WatchList(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { + return s.Storage.WatchList(ctx, key, opts) } -func (s *DryRunnableStorage) Get(ctx context.Context, key string, resourceVersion string, objPtr runtime.Object, ignoreNotFound bool) error { - return s.Storage.Get(ctx, key, resourceVersion, objPtr, ignoreNotFound) +func (s *DryRunnableStorage) Get(ctx context.Context, key string, opts storage.GetOptions, objPtr runtime.Object) error { + return s.Storage.Get(ctx, key, opts, objPtr) } -func (s *DryRunnableStorage) GetToList(ctx context.Context, key string, resourceVersion string, p storage.SelectionPredicate, listObj runtime.Object) error { - return s.Storage.GetToList(ctx, key, resourceVersion, p, listObj) +func (s *DryRunnableStorage) GetToList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { + return s.Storage.GetToList(ctx, key, opts, listObj) } -func (s *DryRunnableStorage) List(ctx context.Context, key string, resourceVersion string, p storage.SelectionPredicate, listObj runtime.Object) error { - return s.Storage.List(ctx, key, resourceVersion, p, listObj) +func (s *DryRunnableStorage) List(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { + return s.Storage.List(ctx, key, opts, listObj) } func (s *DryRunnableStorage) GuaranteedUpdate( ctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool, preconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, dryRun bool, suggestion ...runtime.Object) error { if dryRun { - err := s.Storage.Get(ctx, key, "", ptrToType, ignoreNotFound) + err := s.Storage.Get(ctx, key, storage.GetOptions{IgnoreNotFound: ignoreNotFound}, ptrToType) if err != nil { return err } diff --git a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go index 9e5f84328e1..75d315bbf56 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go +++ b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go @@ -17,10 +17,12 @@ limitations under the License. package registry import ( + "fmt" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/storage" @@ -32,7 +34,7 @@ import ( ) // Creates a cacher based given storageConfig. -func StorageWithCacher(capacity int) generic.StorageDecorator { +func StorageWithCacher() generic.StorageDecorator { return func( storageConfig *storagebackend.Config, resourcePrefix string, @@ -47,18 +49,11 @@ func StorageWithCacher(capacity int) generic.StorageDecorator { if err != nil { return s, d, err } - if capacity <= 0 { - klog.V(5).Infof("Storage caching is disabled for %T", newFunc()) - return s, d, nil - } - if klog.V(5) { - klog.Infof("Storage caching is enabled for %T with capacity %v", newFunc(), capacity) + if klog.V(5).Enabled() { + klog.Infof("Storage caching is enabled for %s", objectTypeToString(newFunc())) } - // TODO: we would change this later to make storage always have cacher and hide low level KV layer inside. - // Currently it has two layers of same storage interface -- cacher and low level kv. cacherConfig := cacherstorage.Config{ - CacheCapacity: capacity, Storage: s, Versioner: etcd3.APIObjectVersioner{}, ResourcePrefix: resourcePrefix, @@ -88,6 +83,17 @@ func StorageWithCacher(capacity int) generic.StorageDecorator { } } +func objectTypeToString(obj runtime.Object) string { + // special-case unstructured objects that tell us their apiVersion/kind + if u, isUnstructured := obj.(*unstructured.Unstructured); isUnstructured { + if apiVersion, kind := u.GetAPIVersion(), u.GetKind(); len(apiVersion) > 0 && len(kind) > 0 { + return fmt.Sprintf("apiVersion=%s, kind=%s", apiVersion, kind) + } + } + // otherwise just return the type + return fmt.Sprintf("%T", obj) +} + // TODO : Remove all the code below when PR // https://github.com/kubernetes/kubernetes/pull/50690 // merges as that shuts down storage properly diff --git a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go index 3993bd2366c..c1464de6457 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go +++ b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go @@ -47,7 +47,7 @@ import ( "k8s.io/apiserver/pkg/util/dryrun" "k8s.io/client-go/tools/cache" - "k8s.io/klog" + "k8s.io/klog/v2" ) // ObjectFunc is a function to act on a given object. An error may be returned @@ -322,15 +322,16 @@ func (e *Store) ListPredicate(ctx context.Context, p storage.SelectionPredicate, p.Continue = options.Continue list := e.NewListFunc() qualifiedResource := e.qualifiedResourceFromContext(ctx) + storageOpts := storage.ListOptions{ResourceVersion: options.ResourceVersion, ResourceVersionMatch: options.ResourceVersionMatch, Predicate: p} if name, ok := p.MatchesSingle(); ok { if key, err := e.KeyFunc(ctx, name); err == nil { - err := e.Storage.GetToList(ctx, key, options.ResourceVersion, p, list) + err := e.Storage.GetToList(ctx, key, storageOpts, list) return list, storeerr.InterpretListError(err, qualifiedResource) } // if we cannot extract a key based on the current context, the optimization is skipped } - err := e.Storage.List(ctx, e.KeyRootFunc(ctx), options.ResourceVersion, p, list) + err := e.Storage.List(ctx, e.KeyRootFunc(ctx), storageOpts, list) return list, storeerr.InterpretListError(err, qualifiedResource) } @@ -367,7 +368,7 @@ func (e *Store) Create(ctx context.Context, obj runtime.Object, createValidation if !apierrors.IsAlreadyExists(err) { return nil, err } - if errGet := e.Storage.Get(ctx, key, "", out, false); errGet != nil { + if errGet := e.Storage.Get(ctx, key, storage.GetOptions{}, out); errGet != nil { return nil, err } accessor, errGetAcc := meta.Accessor(out) @@ -472,6 +473,16 @@ func (e *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObj // deleteObj is only used in case a deletion is carried out var deleteObj runtime.Object err = e.Storage.GuaranteedUpdate(ctx, key, out, true, storagePreconditions, func(existing runtime.Object, res storage.ResponseMeta) (runtime.Object, *uint64, error) { + existingResourceVersion, err := e.Storage.Versioner().ObjectResourceVersion(existing) + if err != nil { + return nil, nil, err + } + if existingResourceVersion == 0 { + if !e.UpdateStrategy.AllowCreateOnUpdate() && !forceAllowCreate { + return nil, nil, apierrors.NewNotFound(qualifiedResource, name) + } + } + // Given the existing object, get the new object obj, err := objInfo.UpdatedObject(ctx, existing) if err != nil { @@ -482,20 +493,13 @@ func (e *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObj // the user does not have a resource version, then we populate it with // the latest version. Else, we check that the version specified by // the user matches the version of latest storage object. - resourceVersion, err := e.Storage.Versioner().ObjectResourceVersion(obj) + newResourceVersion, err := e.Storage.Versioner().ObjectResourceVersion(obj) if err != nil { return nil, nil, err } - doUnconditionalUpdate := resourceVersion == 0 && e.UpdateStrategy.AllowUnconditionalUpdate() + doUnconditionalUpdate := newResourceVersion == 0 && e.UpdateStrategy.AllowUnconditionalUpdate() - version, err := e.Storage.Versioner().ObjectResourceVersion(existing) - if err != nil { - return nil, nil, err - } - if version == 0 { - if !e.UpdateStrategy.AllowCreateOnUpdate() && !forceAllowCreate { - return nil, nil, apierrors.NewNotFound(qualifiedResource, name) - } + if existingResourceVersion == 0 { creating = true creatingObj = obj if err := rest.BeforeCreate(e.CreateStrategy, ctx, obj); err != nil { @@ -528,15 +532,15 @@ func (e *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObj } else { // Check if the object's resource version matches the latest // resource version. - if resourceVersion == 0 { + if newResourceVersion == 0 { // TODO: The Invalid error should have a field for Resource. // After that field is added, we should fill the Resource and // leave the Kind field empty. See the discussion in #18526. qualifiedKind := schema.GroupKind{Group: qualifiedResource.Group, Kind: qualifiedResource.Resource} - fieldErrList := field.ErrorList{field.Invalid(field.NewPath("metadata").Child("resourceVersion"), resourceVersion, "must be specified for an update")} + fieldErrList := field.ErrorList{field.Invalid(field.NewPath("metadata").Child("resourceVersion"), newResourceVersion, "must be specified for an update")} return nil, nil, apierrors.NewInvalid(qualifiedKind, name, fieldErrList) } - if resourceVersion != version { + if newResourceVersion != existingResourceVersion { return nil, nil, apierrors.NewConflict(qualifiedResource, name, fmt.Errorf(OptimisticLockErrorMsg)) } } @@ -608,7 +612,7 @@ func (e *Store) Get(ctx context.Context, name string, options *metav1.GetOptions if err != nil { return nil, err } - if err := e.Storage.Get(ctx, key, options.ResourceVersion, obj, false); err != nil { + if err := e.Storage.Get(ctx, key, storage.GetOptions{ResourceVersion: options.ResourceVersion}, obj); err != nil { return nil, storeerr.InterpretGetError(err, e.qualifiedResourceFromContext(ctx), name) } if e.Decorator != nil { @@ -892,7 +896,7 @@ func (e *Store) Delete(ctx context.Context, name string, deleteValidation rest.V } obj := e.NewFunc() qualifiedResource := e.qualifiedResourceFromContext(ctx) - if err = e.Storage.Get(ctx, key, "", obj, false); err != nil { + if err = e.Storage.Get(ctx, key, storage.GetOptions{}, obj); err != nil { return nil, false, storeerr.InterpretDeleteError(err, qualifiedResource, name) } @@ -1006,12 +1010,19 @@ func (e *Store) DeleteCollection(ctx context.Context, deleteValidation rest.Vali if err != nil { return nil, err } + if len(items) == 0 { + // Nothing to delete, return now + return listObj, nil + } // Spawn a number of goroutines, so that we can issue requests to storage // in parallel to speed up deletion. - // TODO: Make this proportional to the number of items to delete, up to + // It is proportional to the number of items to delete, up to // DeleteCollectionWorkers (it doesn't make much sense to spawn 16 // workers to delete 10 items). workersNumber := e.DeleteCollectionWorkers + if workersNumber > len(items) { + workersNumber = len(items) + } if workersNumber < 1 { workersNumber = 1 } @@ -1119,9 +1130,10 @@ func (e *Store) Watch(ctx context.Context, options *metainternalversion.ListOpti // WatchPredicate starts a watch for the items that matches. func (e *Store) WatchPredicate(ctx context.Context, p storage.SelectionPredicate, resourceVersion string) (watch.Interface, error) { + storageOpts := storage.ListOptions{ResourceVersion: resourceVersion, Predicate: p} if name, ok := p.MatchesSingle(); ok { if key, err := e.KeyFunc(ctx, name); err == nil { - w, err := e.Storage.Watch(ctx, key, resourceVersion, p) + w, err := e.Storage.Watch(ctx, key, storageOpts) if err != nil { return nil, err } @@ -1134,7 +1146,7 @@ func (e *Store) WatchPredicate(ctx context.Context, p storage.SelectionPredicate // optimization is skipped } - w, err := e.Storage.WatchList(ctx, e.KeyRootFunc(ctx), resourceVersion, p) + w, err := e.Storage.WatchList(ctx, e.KeyRootFunc(ctx), storageOpts) if err != nil { return nil, err } @@ -1217,6 +1229,10 @@ func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error { return fmt.Errorf("store for %s must set both KeyRootFunc and KeyFunc or neither", e.DefaultQualifiedResource.String()) } + if e.TableConvertor == nil { + return fmt.Errorf("store for %s must set TableConvertor; rest.NewDefaultTableConvertor(e.DefaultQualifiedResource) can be used to output just name/creation time", e.DefaultQualifiedResource.String()) + } + var isNamespaced bool switch { case e.CreateStrategy != nil: @@ -1377,7 +1393,7 @@ func (e *Store) ConvertToTable(ctx context.Context, object runtime.Object, table if e.TableConvertor != nil { return e.TableConvertor.ConvertToTable(ctx, object, tableOptions) } - return rest.NewDefaultTableConvertor(e.qualifiedResourceFromContext(ctx)).ConvertToTable(ctx, object, tableOptions) + return rest.NewDefaultTableConvertor(e.DefaultQualifiedResource).ConvertToTable(ctx, object, tableOptions) } func (e *Store) StorageVersion() runtime.GroupVersioner { diff --git a/vendor/k8s.io/apiserver/pkg/registry/rest/OWNERS b/vendor/k8s.io/apiserver/pkg/registry/rest/OWNERS index 9ee8b8a53a3..fa526a8ba96 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/rest/OWNERS +++ b/vendor/k8s.io/apiserver/pkg/registry/rest/OWNERS @@ -14,13 +14,11 @@ reviewers: - gmarek - justinsb - ncdc -- eparis - dims - hongchaodeng - krousey - euank - ingvagabund -- david-mcmahon - jianhuiz - sdminonne - enj diff --git a/vendor/k8s.io/apiserver/pkg/registry/rest/table.go b/vendor/k8s.io/apiserver/pkg/registry/rest/table.go index 31a46c74333..d90ae70762b 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/rest/table.go +++ b/vendor/k8s.io/apiserver/pkg/registry/rest/table.go @@ -26,15 +26,17 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) type defaultTableConvertor struct { - qualifiedResource schema.GroupResource + defaultQualifiedResource schema.GroupResource } -// NewDefaultTableConvertor creates a default convertor for the provided resource. -func NewDefaultTableConvertor(resource schema.GroupResource) TableConvertor { - return defaultTableConvertor{qualifiedResource: resource} +// NewDefaultTableConvertor creates a default convertor; the provided resource is used for error messages +// if no resource info can be determined from the context passed to ConvertToTable. +func NewDefaultTableConvertor(defaultQualifiedResource schema.GroupResource) TableConvertor { + return defaultTableConvertor{defaultQualifiedResource: defaultQualifiedResource} } var swaggerMetadataDescriptions = metav1.ObjectMeta{}.SwaggerDoc() @@ -44,7 +46,11 @@ func (c defaultTableConvertor) ConvertToTable(ctx context.Context, object runtim fn := func(obj runtime.Object) error { m, err := meta.Accessor(obj) if err != nil { - return errNotAcceptable{resource: c.qualifiedResource} + resource := c.defaultQualifiedResource + if info, ok := genericapirequest.RequestInfoFrom(ctx); ok { + resource = schema.GroupResource{Group: info.APIGroup, Resource: info.Resource} + } + return errNotAcceptable{resource: resource} } table.Rows = append(table.Rows, metav1.TableRow{ Cells: []interface{}{m.GetName(), m.GetCreationTimestamp().Time.UTC().Format(time.RFC3339)}, diff --git a/vendor/k8s.io/apiserver/pkg/server/BUILD b/vendor/k8s.io/apiserver/pkg/server/BUILD index 45fc786505e..329989c755f 100644 --- a/vendor/k8s.io/apiserver/pkg/server/BUILD +++ b/vendor/k8s.io/apiserver/pkg/server/BUILD @@ -24,13 +24,20 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/json:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/waitgroup:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/version:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", "//staging/src/k8s.io/apiserver/pkg/apis/example:go_default_library", "//staging/src/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/audit:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/audit/policy:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/discovery:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/filters:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/openapi:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/filters:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/healthz:go_default_library", @@ -38,6 +45,7 @@ go_test( "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//vendor/github.com/go-openapi/spec:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", @@ -94,8 +102,10 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/endpoints/discovery:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/filters:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/metrics:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/openapi:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates:go_default_library", @@ -105,10 +115,12 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/server/mux:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/routes:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/storage:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/openapi:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", + "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/logs:go_default_library", "//vendor/github.com/coreos/go-systemd/daemon:go_default_library", "//vendor/github.com/emicklei/go-restful:go_default_library", @@ -116,7 +128,7 @@ go_library( "//vendor/github.com/go-openapi/spec:go_default_library", "//vendor/github.com/google/uuid:go_default_library", "//vendor/golang.org/x/net/http2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/builder:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/handler:go_default_library", diff --git a/vendor/k8s.io/apiserver/pkg/server/config.go b/vendor/k8s.io/apiserver/pkg/server/config.go index 0fb38996ff3..22164be10a0 100644 --- a/vendor/k8s.io/apiserver/pkg/server/config.go +++ b/vendor/k8s.io/apiserver/pkg/server/config.go @@ -53,6 +53,7 @@ import ( genericapifilters "k8s.io/apiserver/pkg/endpoints/filters" apiopenapi "k8s.io/apiserver/pkg/endpoints/openapi" apirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/features" genericregistry "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/server/dynamiccertificates" "k8s.io/apiserver/pkg/server/egressselector" @@ -60,12 +61,14 @@ import ( "k8s.io/apiserver/pkg/server/healthz" "k8s.io/apiserver/pkg/server/routes" serverstore "k8s.io/apiserver/pkg/server/storage" + "k8s.io/apiserver/pkg/util/feature" utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" "k8s.io/client-go/informers" restclient "k8s.io/client-go/rest" "k8s.io/component-base/logs" - "k8s.io/klog" + "k8s.io/klog/v2" openapicommon "k8s.io/kube-openapi/pkg/common" + utilsnet "k8s.io/utils/net" // install apis _ "k8s.io/apiserver/pkg/apis/apiserver/install" @@ -274,10 +277,6 @@ type AuthenticationInfo struct { APIAudiences authenticator.Audiences // Authenticator determines which subject is making the request Authenticator authenticator.Request - // SupportsBasicAuth indicates that's at least one Authenticator supports basic auth - // If this is true, a basic auth challenge is returned on authentication failure - // TODO(roberthbailey): Remove once the server no longer supports http basic auth. - SupportsBasicAuth bool } type AuthorizationInfo struct { @@ -617,11 +616,11 @@ func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*G if err != nil { return nil, err } - // TODO: Once we get rid of /healthz consider changing this to post-start-hook. - err = s.addReadyzChecks(healthz.NewInformerSyncHealthz(c.SharedInformerFactory)) - if err != nil { - return nil, err - } + } + // TODO: Once we get rid of /healthz consider changing this to post-start-hook. + err := s.addReadyzChecks(healthz.NewInformerSyncHealthz(c.SharedInformerFactory)) + if err != nil { + return nil, err } } @@ -629,6 +628,7 @@ func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*G if s.isPostStartHookRegistered(priorityAndFairnessConfigConsumerHookName) { } else if c.FlowControl != nil { err := s.AddPostStartHook(priorityAndFairnessConfigConsumerHookName, func(context PostStartHookContext) error { + go c.FlowControl.MaintainObservations(context.StopCh) go c.FlowControl.Run(context.StopCh) return nil }) @@ -679,7 +679,7 @@ func DefaultBuildHandlerChain(apiHandler http.Handler, c *Config) http.Handler { } handler = genericapifilters.WithImpersonation(handler, c.Authorization.Authorizer, c.Serializer) handler = genericapifilters.WithAudit(handler, c.AuditBackend, c.AuditPolicyChecker, c.LongRunningFunc) - failedHandler := genericapifilters.Unauthorized(c.Serializer, c.Authentication.SupportsBasicAuth) + failedHandler := genericapifilters.Unauthorized(c.Serializer) failedHandler = genericapifilters.WithFailedAuthenticationAudit(failedHandler, c.AuditBackend, c.AuditPolicyChecker) handler = genericapifilters.WithAuthentication(handler, c.Authentication.Authenticator, failedHandler, c.Authentication.APIAudiences) handler = genericfilters.WithCORS(handler, c.CorsAllowedOriginList, nil, nil, nil, "true") @@ -689,6 +689,8 @@ func DefaultBuildHandlerChain(apiHandler http.Handler, c *Config) http.Handler { if c.SecureServing != nil && !c.SecureServing.DisableHTTP2 && c.GoawayChance > 0 { handler = genericfilters.WithProbabilisticGoaway(handler, c.GoawayChance) } + handler = genericapifilters.WithAuditAnnotations(handler, c.AuditBackend, c.AuditPolicyChecker) + handler = genericapifilters.WithWarningRecorder(handler) handler = genericapifilters.WithCacheControl(handler) handler = genericfilters.WithPanicRecovery(handler) return handler @@ -719,6 +721,9 @@ func installAPI(s *GenericAPIServer, c *Config) { if c.EnableDiscovery { s.Handler.GoRestfulContainer.Add(s.DiscoveryGroupManager.WebService()) } + if feature.DefaultFeatureGate.Enabled(features.APIPriorityAndFairness) { + c.FlowControl.Install(s.Handler.NonGoRestfulMux) + } } func NewRequestInfoResolver(c *Config) *apirequest.RequestInfoFactory { @@ -744,7 +749,7 @@ func (s *SecureServingInfo) HostPort() (string, int, error) { if err != nil { return "", 0, fmt.Errorf("failed to get port from listener address %q: %v", addr, err) } - port, err := strconv.Atoi(portStr) + port, err := utilsnet.ParsePort(portStr, true) if err != nil { return "", 0, fmt.Errorf("invalid non-numeric port %q", portStr) } diff --git a/vendor/k8s.io/apiserver/pkg/server/deprecated_insecure_serving.go b/vendor/k8s.io/apiserver/pkg/server/deprecated_insecure_serving.go index 9419af9ed37..655543a2513 100644 --- a/vendor/k8s.io/apiserver/pkg/server/deprecated_insecure_serving.go +++ b/vendor/k8s.io/apiserver/pkg/server/deprecated_insecure_serving.go @@ -21,7 +21,7 @@ import ( "net/http" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/user" diff --git a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/BUILD b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/BUILD index c8ee012fce2..564e34598ca 100644 --- a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/BUILD +++ b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/BUILD @@ -33,7 +33,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/events:go_default_library", "//staging/src/k8s.io/client-go/util/cert:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go index 6000941b764..ec0fc5096a2 100644 --- a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go +++ b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go @@ -33,7 +33,7 @@ import ( corev1listers "k8s.io/client-go/listers/core/v1" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" ) // ConfigMapCAController provies a CAContentProvider that can dynamically react to configmap changes diff --git a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_cafile_content.go b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_cafile_content.go index 8a2a5e2b799..756289a802d 100644 --- a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_cafile_content.go +++ b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_cafile_content.go @@ -29,7 +29,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" ) // FileRefreshDuration is exposed so that integration tests can crank up the reload speed. diff --git a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_serving_content.go b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_serving_content.go index 5b63f708972..3b7f34738b2 100644 --- a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_serving_content.go +++ b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_serving_content.go @@ -26,7 +26,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" ) // DynamicCertKeyPairContent provides a CertKeyContentProvider that can dynamically react to new file content diff --git a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/named_certificates.go b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/named_certificates.go index 90a67f7b211..8f55edec4e6 100644 --- a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/named_certificates.go +++ b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/named_certificates.go @@ -25,7 +25,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/validation" - "k8s.io/klog" + "k8s.io/klog/v2" ) // BuildNamedCertificates returns a map of *tls.Certificate by name. It's diff --git a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/tlsconfig.go b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/tlsconfig.go index aef0710b5b9..f637f32331b 100644 --- a/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/tlsconfig.go +++ b/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/tlsconfig.go @@ -31,7 +31,7 @@ import ( "k8s.io/client-go/tools/events" "k8s.io/client-go/util/cert" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" ) const workItemKey = "key" diff --git a/vendor/k8s.io/apiserver/pkg/server/egressselector/BUILD b/vendor/k8s.io/apiserver/pkg/server/egressselector/BUILD index a83cb2c8ec3..bc730f43ff6 100644 --- a/vendor/k8s.io/apiserver/pkg/server/egressselector/BUILD +++ b/vendor/k8s.io/apiserver/pkg/server/egressselector/BUILD @@ -18,7 +18,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1beta1:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/egressselector/metrics:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/path:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", "//vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client:go_default_library", diff --git a/vendor/k8s.io/apiserver/pkg/server/egressselector/egress_selector.go b/vendor/k8s.io/apiserver/pkg/server/egressselector/egress_selector.go index b8bdec2804c..a41a85403c1 100644 --- a/vendor/k8s.io/apiserver/pkg/server/egressselector/egress_selector.go +++ b/vendor/k8s.io/apiserver/pkg/server/egressselector/egress_selector.go @@ -34,7 +34,7 @@ import ( utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apiserver/pkg/apis/apiserver" egressmetrics "k8s.io/apiserver/pkg/server/egressselector/metrics" - "k8s.io/klog" + "k8s.io/klog/v2" utiltrace "k8s.io/utils/trace" client "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client" ) @@ -199,7 +199,7 @@ func (u *udsGRPCConnector) connect() (proxier, error) { return c, err }) - tunnel, err := client.CreateGrpcTunnel(udsName, dialOption, grpc.WithInsecure()) + tunnel, err := client.CreateSingleUseGrpcTunnel(udsName, dialOption, grpc.WithInsecure()) if err != nil { return nil, err } diff --git a/vendor/k8s.io/apiserver/pkg/server/filters/BUILD b/vendor/k8s.io/apiserver/pkg/server/filters/BUILD index 69c80d3639c..a13e51bf319 100644 --- a/vendor/k8s.io/apiserver/pkg/server/filters/BUILD +++ b/vendor/k8s.io/apiserver/pkg/server/filters/BUILD @@ -62,8 +62,9 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/httplog:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/server/filters/cors.go b/vendor/k8s.io/apiserver/pkg/server/filters/cors.go index 96ff58dc7c8..67df760988d 100644 --- a/vendor/k8s.io/apiserver/pkg/server/filters/cors.go +++ b/vendor/k8s.io/apiserver/pkg/server/filters/cors.go @@ -21,7 +21,7 @@ import ( "regexp" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" ) // TODO: use restful.CrossOriginResourceSharing diff --git a/vendor/k8s.io/apiserver/pkg/server/filters/maxinflight.go b/vendor/k8s.io/apiserver/pkg/server/filters/maxinflight.go index 13ff3ebbcc3..946ab4e605d 100644 --- a/vendor/k8s.io/apiserver/pkg/server/filters/maxinflight.go +++ b/vendor/k8s.io/apiserver/pkg/server/filters/maxinflight.go @@ -27,8 +27,9 @@ import ( "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/endpoints/metrics" apirequest "k8s.io/apiserver/pkg/endpoints/request" + fcmetrics "k8s.io/apiserver/pkg/util/flowcontrol/metrics" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -50,13 +51,17 @@ func handleError(w http.ResponseWriter, r *http.Request, err error) { klog.Errorf(err.Error()) } -// requestWatermark is used to trak maximal usage of inflight requests. +// requestWatermark is used to track maximal numbers of requests in a particular phase of handling type requestWatermark struct { + phase string + readOnlyObserver, mutatingObserver fcmetrics.TimedObserver lock sync.Mutex readOnlyWatermark, mutatingWatermark int } func (w *requestWatermark) recordMutating(mutatingVal int) { + w.mutatingObserver.Set(float64(mutatingVal)) + w.lock.Lock() defer w.lock.Unlock() @@ -66,6 +71,8 @@ func (w *requestWatermark) recordMutating(mutatingVal int) { } func (w *requestWatermark) recordReadOnly(readOnlyVal int) { + w.readOnlyObserver.Set(float64(readOnlyVal)) + w.lock.Lock() defer w.lock.Unlock() @@ -74,9 +81,14 @@ func (w *requestWatermark) recordReadOnly(readOnlyVal int) { } } -var watermark = &requestWatermark{} +// watermark tracks requests being executed (not waiting in a queue) +var watermark = &requestWatermark{ + phase: metrics.ExecutingPhase, + readOnlyObserver: fcmetrics.ReadWriteConcurrencyObserverPairGenerator.Generate(1, 1, []string{metrics.ReadOnlyKind}).RequestsExecuting, + mutatingObserver: fcmetrics.ReadWriteConcurrencyObserverPairGenerator.Generate(1, 1, []string{metrics.MutatingKind}).RequestsExecuting, +} -func startRecordingUsage() { +func startRecordingUsage(watermark *requestWatermark) { go func() { wait.Forever(func() { watermark.lock.Lock() @@ -86,7 +98,7 @@ func startRecordingUsage() { watermark.mutatingWatermark = 0 watermark.lock.Unlock() - metrics.UpdateInflightRequestMetrics(readOnlyWatermark, mutatingWatermark) + metrics.UpdateInflightRequestMetrics(watermark.phase, readOnlyWatermark, mutatingWatermark) }, inflightUsageMetricUpdatePeriod) }() } @@ -100,7 +112,7 @@ func WithMaxInFlightLimit( mutatingLimit int, longRunningRequestCheck apirequest.LongRunningRequestCheck, ) http.Handler { - startOnce.Do(startRecordingUsage) + startOnce.Do(func() { startRecordingUsage(watermark) }) if nonMutatingLimit == 0 && mutatingLimit == 0 { return handler } @@ -108,9 +120,11 @@ func WithMaxInFlightLimit( var mutatingChan chan bool if nonMutatingLimit != 0 { nonMutatingChan = make(chan bool, nonMutatingLimit) + watermark.readOnlyObserver.SetX1(float64(nonMutatingLimit)) } if mutatingLimit != 0 { mutatingChan = make(chan bool, mutatingLimit) + watermark.mutatingObserver.SetX1(float64(mutatingLimit)) } return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -141,21 +155,22 @@ func WithMaxInFlightLimit( select { case c <- true: - var mutatingLen, readOnlyLen int + // We note the concurrency level both while the + // request is being served and after it is done being + // served, because both states contribute to the + // sampled stats on concurrency. if isMutatingRequest { - mutatingLen = len(mutatingChan) + watermark.recordMutating(len(c)) } else { - readOnlyLen = len(nonMutatingChan) + watermark.recordReadOnly(len(c)) } - defer func() { <-c if isMutatingRequest { - watermark.recordMutating(mutatingLen) + watermark.recordMutating(len(c)) } else { - watermark.recordReadOnly(readOnlyLen) + watermark.recordReadOnly(len(c)) } - }() handler.ServeHTTP(w, r) diff --git a/vendor/k8s.io/apiserver/pkg/server/filters/priority-and-fairness.go b/vendor/k8s.io/apiserver/pkg/server/filters/priority-and-fairness.go index 87bb76aa550..339b1e2c59b 100644 --- a/vendor/k8s.io/apiserver/pkg/server/filters/priority-and-fairness.go +++ b/vendor/k8s.io/apiserver/pkg/server/filters/priority-and-fairness.go @@ -24,9 +24,11 @@ import ( fcv1a1 "k8s.io/api/flowcontrol/v1alpha1" apitypes "k8s.io/apimachinery/pkg/types" + epmetrics "k8s.io/apiserver/pkg/endpoints/metrics" apirequest "k8s.io/apiserver/pkg/endpoints/request" utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" - "k8s.io/klog" + fcmetrics "k8s.io/apiserver/pkg/util/flowcontrol/metrics" + "k8s.io/klog/v2" ) type priorityAndFairnessKeyType int @@ -53,7 +55,15 @@ func GetClassification(ctx context.Context) *PriorityAndFairnessClassification { return ctx.Value(priorityAndFairnessKey).(*PriorityAndFairnessClassification) } -var atomicMutatingLen, atomicNonMutatingLen int32 +// waitingMark tracks requests waiting rather than being executed +var waitingMark = &requestWatermark{ + phase: epmetrics.WaitingPhase, + readOnlyObserver: fcmetrics.ReadWriteConcurrencyObserverPairGenerator.Generate(1, 1, []string{epmetrics.ReadOnlyKind}).RequestsWaiting, + mutatingObserver: fcmetrics.ReadWriteConcurrencyObserverPairGenerator.Generate(1, 1, []string{epmetrics.MutatingKind}).RequestsWaiting, +} + +var atomicMutatingExecuting, atomicReadOnlyExecuting int32 +var atomicMutatingWaiting, atomicReadOnlyWaiting int32 // WithPriorityAndFairness limits the number of in-flight // requests in a fine-grained way. @@ -66,7 +76,10 @@ func WithPriorityAndFairness( klog.Warningf("priority and fairness support not found, skipping") return handler } - startOnce.Do(startRecordingUsage) + startOnce.Do(func() { + startRecordingUsage(watermark) + startRecordingUsage(waitingMark) + }) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ctx := r.Context() requestInfo, ok := apirequest.RequestInfoFrom(ctx) @@ -98,22 +111,23 @@ func WithPriorityAndFairness( var served bool isMutatingRequest := !nonMutatingRequestVerbs.Has(requestInfo.Verb) - execute := func() { - var mutatingLen, readOnlyLen int + noteExecutingDelta := func(delta int32) { if isMutatingRequest { - mutatingLen = int(atomic.AddInt32(&atomicMutatingLen, 1)) + watermark.recordMutating(int(atomic.AddInt32(&atomicMutatingExecuting, delta))) } else { - readOnlyLen = int(atomic.AddInt32(&atomicNonMutatingLen, 1)) + watermark.recordReadOnly(int(atomic.AddInt32(&atomicReadOnlyExecuting, delta))) } - defer func() { - if isMutatingRequest { - atomic.AddInt32(&atomicMutatingLen, -11) - watermark.recordMutating(mutatingLen) - } else { - atomic.AddInt32(&atomicNonMutatingLen, -1) - watermark.recordReadOnly(readOnlyLen) - } - }() + } + noteWaitingDelta := func(delta int32) { + if isMutatingRequest { + waitingMark.recordMutating(int(atomic.AddInt32(&atomicMutatingWaiting, delta))) + } else { + waitingMark.recordReadOnly(int(atomic.AddInt32(&atomicReadOnlyWaiting, delta))) + } + } + execute := func() { + noteExecutingDelta(1) + defer noteExecutingDelta(-1) served = true innerCtx := context.WithValue(ctx, priorityAndFairnessKey, classification) innerReq := r.Clone(innerCtx) @@ -122,10 +136,16 @@ func WithPriorityAndFairness( handler.ServeHTTP(w, innerReq) } digest := utilflowcontrol.RequestDigest{requestInfo, user} - fcIfc.Handle(ctx, digest, note, execute) + fcIfc.Handle(ctx, digest, note, func(inQueue bool) { + if inQueue { + noteWaitingDelta(1) + } else { + noteWaitingDelta(-1) + } + }, execute) if !served { + epmetrics.RecordRequestTermination(r, requestInfo, epmetrics.APIServerComponent, http.StatusTooManyRequests) tooManyRequests(r, w) - return } }) diff --git a/vendor/k8s.io/apiserver/pkg/server/filters/wrap.go b/vendor/k8s.io/apiserver/pkg/server/filters/wrap.go index 96bebdbd600..26f843aab40 100644 --- a/vendor/k8s.io/apiserver/pkg/server/filters/wrap.go +++ b/vendor/k8s.io/apiserver/pkg/server/filters/wrap.go @@ -19,7 +19,7 @@ package filters import ( "net/http" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/server/httplog" diff --git a/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go b/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go index 9c623f6485d..e0bbc31671c 100644 --- a/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go +++ b/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go @@ -45,7 +45,7 @@ import ( "k8s.io/apiserver/pkg/server/routes" utilopenapi "k8s.io/apiserver/pkg/util/openapi" restclient "k8s.io/client-go/rest" - "k8s.io/klog" + "k8s.io/klog/v2" openapibuilder "k8s.io/kube-openapi/pkg/builder" openapicommon "k8s.io/kube-openapi/pkg/common" "k8s.io/kube-openapi/pkg/handler" @@ -330,7 +330,7 @@ func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error { }() // close socket after delayed stopCh - err := s.NonBlockingRun(delayedStopCh) + stoppedCh, err := s.NonBlockingRun(delayedStopCh) if err != nil { return err } @@ -345,6 +345,8 @@ func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error { // wait for the delayed stopCh before closing the handler chain (it rejects everything after Wait has been called). <-delayedStopCh + // wait for stoppedCh that is closed when the graceful termination (server.Shutdown) is finished. + <-stoppedCh // Wait for all requests to finish, which are bounded by the RequestTimeout variable. s.HandlerChainWaitGroup.Wait() @@ -354,7 +356,8 @@ func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error { // NonBlockingRun spawns the secure http server. An error is // returned if the secure port cannot be listened on. -func (s preparedGenericAPIServer) NonBlockingRun(stopCh <-chan struct{}) error { +// The returned channel is closed when the (asynchronous) termination is finished. +func (s preparedGenericAPIServer) NonBlockingRun(stopCh <-chan struct{}) (<-chan struct{}, error) { // Use an stop channel to allow graceful shutdown without dropping audit events // after http server shutdown. auditStopCh := make(chan struct{}) @@ -363,7 +366,7 @@ func (s preparedGenericAPIServer) NonBlockingRun(stopCh <-chan struct{}) error { // before http server start serving. Otherwise the Backend.ProcessEvents call might block. if s.AuditBackend != nil { if err := s.AuditBackend.Run(auditStopCh); err != nil { - return fmt.Errorf("failed to run the audit backend: %v", err) + return nil, fmt.Errorf("failed to run the audit backend: %v", err) } } @@ -376,7 +379,7 @@ func (s preparedGenericAPIServer) NonBlockingRun(stopCh <-chan struct{}) error { if err != nil { close(internalStopCh) close(auditStopCh) - return err + return nil, err } } @@ -399,7 +402,7 @@ func (s preparedGenericAPIServer) NonBlockingRun(stopCh <-chan struct{}) error { klog.Errorf("Unable to send systemd daemon successful start message: %v\n", err) } - return nil + return stoppedCh, nil } // installAPIResources is a private method for installing the REST storage backing each api groupversionresource diff --git a/vendor/k8s.io/apiserver/pkg/server/handler.go b/vendor/k8s.io/apiserver/pkg/server/handler.go index 0277bac7788..85d8af1ce3f 100644 --- a/vendor/k8s.io/apiserver/pkg/server/handler.go +++ b/vendor/k8s.io/apiserver/pkg/server/handler.go @@ -25,7 +25,7 @@ import ( "strings" "github.com/emicklei/go-restful" - "k8s.io/klog" + "k8s.io/klog/v2" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/apiserver/pkg/server/healthz/BUILD b/vendor/k8s.io/apiserver/pkg/server/healthz/BUILD index 3f65000a55c..2b2c2cfb92e 100644 --- a/vendor/k8s.io/apiserver/pkg/server/healthz/BUILD +++ b/vendor/k8s.io/apiserver/pkg/server/healthz/BUILD @@ -32,7 +32,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/metrics:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/httplog:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go b/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go index a7136be0a39..b2d0007f54c 100644 --- a/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go +++ b/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/endpoints/metrics" "k8s.io/apiserver/pkg/server/httplog" - "k8s.io/klog" + "k8s.io/klog/v2" ) // HealthChecker is a named healthz checker. @@ -169,6 +169,8 @@ func InstallPathHandler(mux mux, path string, checks ...HealthChecker) { /* subresource = */ path, /* scope = */ "", /* component = */ "", + /* deprecated */ false, + /* removedRelease */ "", handleRootHealthz(checks...))) for _, check := range checks { mux.Handle(fmt.Sprintf("%s/%v", path, check.Name()), adaptCheckToHandler(check.Check)) @@ -208,35 +210,38 @@ func getExcludedChecks(r *http.Request) sets.String { // handleRootHealthz returns an http.HandlerFunc that serves the provided checks. func handleRootHealthz(checks ...HealthChecker) http.HandlerFunc { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - failed := false excluded := getExcludedChecks(r) - var verboseOut bytes.Buffer + // failedVerboseLogOutput is for output to the log. It indicates detailed failed output information for the log. + var failedVerboseLogOutput bytes.Buffer + var failedChecks []string + var individualCheckOutput bytes.Buffer for _, check := range checks { // no-op the check if we've specified we want to exclude the check if excluded.Has(check.Name()) { excluded.Delete(check.Name()) - fmt.Fprintf(&verboseOut, "[+]%v excluded: ok\n", check.Name()) + fmt.Fprintf(&individualCheckOutput, "[+]%s excluded: ok\n", check.Name()) continue } if err := check.Check(r); err != nil { // don't include the error since this endpoint is public. If someone wants more detail // they should have explicit permission to the detailed checks. - klog.V(4).Infof("healthz check %v failed: %v", check.Name(), err) - fmt.Fprintf(&verboseOut, "[-]%v failed: reason withheld\n", check.Name()) - failed = true + fmt.Fprintf(&individualCheckOutput, "[-]%s failed: reason withheld\n", check.Name()) + // but we do want detailed information for our log + fmt.Fprintf(&failedVerboseLogOutput, "[-]%s failed: %v\n", check.Name(), err) + failedChecks = append(failedChecks, check.Name()) } else { - fmt.Fprintf(&verboseOut, "[+]%v ok\n", check.Name()) + fmt.Fprintf(&individualCheckOutput, "[+]%s ok\n", check.Name()) } } if excluded.Len() > 0 { - fmt.Fprintf(&verboseOut, "warn: some health checks cannot be excluded: no matches for %v\n", formatQuoted(excluded.List()...)) - klog.Warningf("cannot exclude some health checks, no health checks are installed matching %v", + fmt.Fprintf(&individualCheckOutput, "warn: some health checks cannot be excluded: no matches for %s\n", formatQuoted(excluded.List()...)) + klog.Warningf("cannot exclude some health checks, no health checks are installed matching %s", formatQuoted(excluded.List()...)) } // always be verbose on failure - if failed { - klog.V(2).Infof("%vhealthz check failed", verboseOut.String()) - http.Error(httplog.Unlogged(r, w), fmt.Sprintf("%vhealthz check failed", verboseOut.String()), http.StatusInternalServerError) + if len(failedChecks) > 0 { + klog.V(2).Infof("healthz check failed: %s\n%v", strings.Join(failedChecks, ","), failedVerboseLogOutput.String()) + http.Error(httplog.Unlogged(r, w), fmt.Sprintf("%shealthz check failed", individualCheckOutput.String()), http.StatusInternalServerError) return } @@ -247,7 +252,7 @@ func handleRootHealthz(checks ...HealthChecker) http.HandlerFunc { return } - verboseOut.WriteTo(w) + individualCheckOutput.WriteTo(w) fmt.Fprint(w, "healthz check passed\n") }) } diff --git a/vendor/k8s.io/apiserver/pkg/server/hooks.go b/vendor/k8s.io/apiserver/pkg/server/hooks.go index 04e7f830234..999ad36000c 100644 --- a/vendor/k8s.io/apiserver/pkg/server/hooks.go +++ b/vendor/k8s.io/apiserver/pkg/server/hooks.go @@ -26,7 +26,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/server/healthz" restclient "k8s.io/client-go/rest" - "k8s.io/klog" + "k8s.io/klog/v2" ) // PostStartHookFunc is a function that is called after the server has started. diff --git a/vendor/k8s.io/apiserver/pkg/server/httplog/BUILD b/vendor/k8s.io/apiserver/pkg/server/httplog/BUILD index 9626af306f2..12fe81f2b85 100644 --- a/vendor/k8s.io/apiserver/pkg/server/httplog/BUILD +++ b/vendor/k8s.io/apiserver/pkg/server/httplog/BUILD @@ -20,7 +20,7 @@ go_library( ], importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/server/httplog", importpath = "k8s.io/apiserver/pkg/server/httplog", - deps = ["//vendor/k8s.io/klog:go_default_library"], + deps = ["//vendor/k8s.io/klog/v2:go_default_library"], ) filegroup( diff --git a/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go b/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go index 2ad5cf20551..4cb5306672b 100644 --- a/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go +++ b/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go @@ -25,7 +25,7 @@ import ( "runtime" "time" - "k8s.io/klog" + "k8s.io/klog/v2" ) // StacktracePred returns true if a stacktrace should be logged for this status. @@ -85,7 +85,9 @@ func WithLogging(handler http.Handler, pred StacktracePred) http.Handler { rl := newLogged(req, w).StacktraceWhen(pred) req = req.WithContext(context.WithValue(ctx, respLoggerContextKey, rl)) - defer rl.Log() + if klog.V(3).Enabled() { + defer func() { klog.InfoS("HTTP", rl.LogArgs()...) }() + } handler.ServeHTTP(rl, req) }) } @@ -153,24 +155,34 @@ func (rl *respLogger) Addf(format string, data ...interface{}) { rl.addedInfo += "\n" + fmt.Sprintf(format, data...) } -// Log is intended to be called once at the end of your request handler, via defer -func (rl *respLogger) Log() { +func (rl *respLogger) LogArgs() []interface{} { latency := time.Since(rl.startTime) - if klog.V(3) { - if !rl.hijacked { - klog.InfoDepth(1, fmt.Sprintf("verb=%q URI=%q latency=%v resp=%v UserAgent=%q srcIP=%q: %v%v", - rl.req.Method, rl.req.RequestURI, - latency, rl.status, - rl.req.UserAgent(), rl.req.RemoteAddr, - rl.statusStack, rl.addedInfo, - )) - } else { - klog.InfoDepth(1, fmt.Sprintf("verb=%q URI=%q latency=%v UserAgent=%q srcIP=%q: hijacked", - rl.req.Method, rl.req.RequestURI, - latency, rl.req.UserAgent(), rl.req.RemoteAddr, - )) + if rl.hijacked { + return []interface{}{ + "verb", rl.req.Method, + "URI", rl.req.RequestURI, + "latency", latency, + "userAgent", rl.req.UserAgent(), + "srcIP", rl.req.RemoteAddr, + "hijacked", true, } } + args := []interface{}{ + "verb", rl.req.Method, + "URI", rl.req.RequestURI, + "latency", latency, + "userAgent", rl.req.UserAgent(), + "srcIP", rl.req.RemoteAddr, + "resp", rl.status, + } + if len(rl.statusStack) > 0 { + args = append(args, "statusStack", rl.statusStack) + } + + if len(rl.addedInfo) > 0 { + args = append(args, "addedInfo", rl.addedInfo) + } + return args } // Header implements http.ResponseWriter. @@ -194,7 +206,7 @@ func (rl *respLogger) Write(b []byte) (int, error) { func (rl *respLogger) Flush() { if flusher, ok := rl.w.(http.Flusher); ok { flusher.Flush() - } else if klog.V(2) { + } else if klog.V(2).Enabled() { klog.InfoDepth(1, fmt.Sprintf("Unable to convert %+v into http.Flusher", rl.w)) } } diff --git a/vendor/k8s.io/apiserver/pkg/server/mux/BUILD b/vendor/k8s.io/apiserver/pkg/server/mux/BUILD index dd150e0fc69..55dc1bf5070 100644 --- a/vendor/k8s.io/apiserver/pkg/server/mux/BUILD +++ b/vendor/k8s.io/apiserver/pkg/server/mux/BUILD @@ -24,7 +24,7 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/server/mux/pathrecorder.go b/vendor/k8s.io/apiserver/pkg/server/mux/pathrecorder.go index 74ed8f6776a..cb4941f0261 100644 --- a/vendor/k8s.io/apiserver/pkg/server/mux/pathrecorder.go +++ b/vendor/k8s.io/apiserver/pkg/server/mux/pathrecorder.go @@ -25,7 +25,7 @@ import ( "sync" "sync/atomic" - "k8s.io/klog" + "k8s.io/klog/v2" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" diff --git a/vendor/k8s.io/apiserver/pkg/server/options/BUILD b/vendor/k8s.io/apiserver/pkg/server/options/BUILD index 999526f78e1..84a507fe444 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/BUILD +++ b/vendor/k8s.io/apiserver/pkg/server/options/BUILD @@ -7,30 +7,30 @@ go_library( "api_enablement.go", "audit.go", "authentication.go", + "authentication_dynamic_request_header.go", "authorization.go", "coreapi.go", "deprecated_insecure_serving.go", "doc.go", "egress_selector.go", "etcd.go", - "events.go", "feature.go", "recommended.go", "server_run_options.go", "serving.go", + "serving_unix.go", + "serving_windows.go", "serving_with_loopback.go", - "webhook.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/server/options", importpath = "k8s.io/apiserver/pkg/server/options", visibility = ["//visibility:public"], deps = [ - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", @@ -69,16 +69,12 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", "//staging/src/k8s.io/apiserver/plugin/pkg/audit/buffered:go_default_library", - "//staging/src/k8s.io/apiserver/plugin/pkg/audit/dynamic:go_default_library", - "//staging/src/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced:go_default_library", "//staging/src/k8s.io/apiserver/plugin/pkg/audit/log:go_default_library", "//staging/src/k8s.io/apiserver/plugin/pkg/audit/truncate:go_default_library", "//staging/src/k8s.io/apiserver/plugin/pkg/audit/webhook:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd:go_default_library", "//staging/src/k8s.io/client-go/util/cert:go_default_library", @@ -88,10 +84,54 @@ go_library( "//vendor/github.com/google/uuid:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", "//vendor/gopkg.in/natefinch/lumberjack.v2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", "//vendor/k8s.io/utils/path:go_default_library", - ], + ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:android": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:darwin": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:dragonfly": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:freebsd": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:ios": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:js": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:linux": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:nacl": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:netbsd": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:openbsd": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:plan9": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "@io_bazel_rules_go//go/platform:solaris": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], + "//conditions:default": [], + }), ) go_test( @@ -104,6 +144,7 @@ go_test( "etcd_test.go", "server_run_options_test.go", "serving_test.go", + "serving_unix_test.go", ], data = glob(["testdata/**"]), embed = [":go_default_library"], @@ -119,17 +160,12 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/apis/audit/v1:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/authenticatorfactory:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/request/headerrequest:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/discovery:go_default_library", - "//staging/src/k8s.io/client-go/informers:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd/api/v1:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", - "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", diff --git a/vendor/k8s.io/apiserver/pkg/server/options/audit.go b/vendor/k8s.io/apiserver/pkg/server/options/audit.go index 8a3503cab36..06ff8a3efcc 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/audit.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/audit.go @@ -25,9 +25,8 @@ import ( "github.com/spf13/pflag" "gopkg.in/natefinch/lumberjack.v2" - "k8s.io/klog" + "k8s.io/klog/v2" - corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" auditinternal "k8s.io/apiserver/pkg/apis/audit" @@ -36,20 +35,12 @@ import ( auditv1beta1 "k8s.io/apiserver/pkg/apis/audit/v1beta1" "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/audit/policy" - "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/server" "k8s.io/apiserver/pkg/server/egressselector" - utilfeature "k8s.io/apiserver/pkg/util/feature" pluginbuffered "k8s.io/apiserver/plugin/pkg/audit/buffered" - plugindynamic "k8s.io/apiserver/plugin/pkg/audit/dynamic" - pluginenforced "k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced" pluginlog "k8s.io/apiserver/plugin/pkg/audit/log" plugintruncate "k8s.io/apiserver/plugin/pkg/audit/truncate" pluginwebhook "k8s.io/apiserver/plugin/pkg/audit/webhook" - "k8s.io/client-go/informers" - "k8s.io/client-go/kubernetes" - v1core "k8s.io/client-go/kubernetes/typed/core/v1" - restclient "k8s.io/client-go/rest" ) const ( @@ -80,7 +71,6 @@ type AuditOptions struct { // Plugin options LogOptions AuditLogOptions WebhookOptions AuditWebhookOptions - DynamicOptions AuditDynamicOptions } const ( @@ -180,10 +170,6 @@ func NewAuditOptions() *AuditOptions { TruncateOptions: NewAuditTruncateOptions(), GroupVersionString: "audit.k8s.io/v1", }, - DynamicOptions: AuditDynamicOptions{ - Enabled: false, - BatchConfig: plugindynamic.NewDefaultWebhookBatchConfig(), - }, } } @@ -206,7 +192,6 @@ func (o *AuditOptions) Validate() []error { var allErrors []error allErrors = append(allErrors, o.LogOptions.Validate()...) allErrors = append(allErrors, o.WebhookOptions.Validate()...) - allErrors = append(allErrors, o.DynamicOptions.Validate()...) return allErrors } @@ -286,15 +271,10 @@ func (o *AuditOptions) AddFlags(fs *pflag.FlagSet) { o.WebhookOptions.AddFlags(fs) o.WebhookOptions.BatchOptions.AddFlags(pluginwebhook.PluginName, fs) o.WebhookOptions.TruncateOptions.AddFlags(pluginwebhook.PluginName, fs) - o.DynamicOptions.AddFlags(fs) } func (o *AuditOptions) ApplyTo( c *server.Config, - kubeClientConfig *restclient.Config, - informers informers.SharedInformerFactory, - processInfo *ProcessInfo, - webhookOptions *WebhookOptions, ) error { if o == nil { return nil @@ -347,23 +327,7 @@ func (o *AuditOptions) ApplyTo( // 4. Apply dynamic options. var dynamicBackend audit.Backend - if o.DynamicOptions.enabled() { - // if dynamic is enabled the webhook and log backends need to be wrapped in an enforced backend with the static policy - if webhookBackend != nil { - webhookBackend = pluginenforced.NewBackend(webhookBackend, checker) - } - if logBackend != nil { - logBackend = pluginenforced.NewBackend(logBackend, checker) - } - // build dynamic backend - dynamicBackend, checker, err = o.DynamicOptions.newBackend(c.ExternalAddress, kubeClientConfig, informers, processInfo, webhookOptions) - if err != nil { - return err - } - // union dynamic and webhook backends so that truncate options can be applied to both - dynamicBackend = appendBackend(webhookBackend, dynamicBackend) - dynamicBackend = o.WebhookOptions.TruncateOptions.wrapBackend(dynamicBackend, groupVersion) - } else if webhookBackend != nil { + if webhookBackend != nil { // if only webhook is enabled wrap it in the truncate options dynamicBackend = o.WebhookOptions.TruncateOptions.wrapBackend(webhookBackend, groupVersion) } @@ -610,66 +574,6 @@ func (o *AuditWebhookOptions) newUntruncatedBackend(customDial utilnet.DialFunc) return webhook, nil } -func (o *AuditDynamicOptions) AddFlags(fs *pflag.FlagSet) { - fs.BoolVar(&o.Enabled, "audit-dynamic-configuration", o.Enabled, - "Enables dynamic audit configuration. This feature also requires the DynamicAuditing feature flag") -} - -func (o *AuditDynamicOptions) enabled() bool { - return o.Enabled && utilfeature.DefaultFeatureGate.Enabled(features.DynamicAuditing) -} - -func (o *AuditDynamicOptions) Validate() []error { - var allErrors []error - if o.Enabled && !utilfeature.DefaultFeatureGate.Enabled(features.DynamicAuditing) { - allErrors = append(allErrors, fmt.Errorf("--audit-dynamic-configuration set, but DynamicAuditing feature gate is not enabled")) - } - return allErrors -} - -func (o *AuditDynamicOptions) newBackend( - hostname string, - kubeClientConfig *restclient.Config, - informers informers.SharedInformerFactory, - processInfo *ProcessInfo, - webhookOptions *WebhookOptions, -) (audit.Backend, policy.Checker, error) { - if err := validateProcessInfo(processInfo); err != nil { - return nil, nil, err - } - clientset, err := kubernetes.NewForConfig(kubeClientConfig) - if err != nil { - return nil, nil, err - } - if webhookOptions == nil { - webhookOptions = NewWebhookOptions() - } - checker := policy.NewDynamicChecker() - informer := informers.Auditregistration().V1alpha1().AuditSinks() - eventSink := &v1core.EventSinkImpl{Interface: clientset.CoreV1().Events(processInfo.Namespace)} - - dc := &plugindynamic.Config{ - Informer: informer, - BufferedConfig: o.BatchConfig, - EventConfig: plugindynamic.EventConfig{ - Sink: eventSink, - Source: corev1.EventSource{ - Component: processInfo.Name, - Host: hostname, - }, - }, - WebhookConfig: plugindynamic.WebhookConfig{ - AuthInfoResolverWrapper: webhookOptions.AuthInfoResolverWrapper, - ServiceResolver: webhookOptions.ServiceResolver, - }, - } - backend, err := plugindynamic.NewBackend(dc) - if err != nil { - return nil, nil, fmt.Errorf("could not create dynamic audit backend: %v", err) - } - return backend, checker, nil -} - // defaultWebhookBatchConfig returns the default BatchConfig used by the Webhook backend. func defaultWebhookBatchConfig() pluginbuffered.BatchConfig { return pluginbuffered.BatchConfig{ diff --git a/vendor/k8s.io/apiserver/pkg/server/options/authentication.go b/vendor/k8s.io/apiserver/pkg/server/options/authentication.go index 9a395c94a73..1929e975058 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/authentication.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/authentication.go @@ -17,8 +17,6 @@ limitations under the License. package options import ( - "context" - "encoding/json" "fmt" "strings" "time" @@ -27,7 +25,6 @@ import ( "github.com/spf13/pflag" - "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/authentication/authenticatorfactory" "k8s.io/apiserver/pkg/authentication/request/headerrequest" @@ -35,7 +32,7 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" - "k8s.io/klog" + "k8s.io/klog/v2" openapicommon "k8s.io/kube-openapi/pkg/common" ) @@ -319,7 +316,6 @@ func (s *DelegatingAuthenticationOptions) ApplyTo(authenticationInfo *server.Aut if openAPIConfig != nil { openAPIConfig.SecurityDefinitions = securityDefinitions } - authenticationInfo.SupportsBasicAuth = false return nil } @@ -331,66 +327,28 @@ const ( // by --requestheader-username-headers. This is created in the cluster by the kube-apiserver. // "WARNING: generally do not depend on authorization being already done for incoming requests.") authenticationConfigMapName = "extension-apiserver-authentication" - authenticationRoleName = "extension-apiserver-authentication-reader" ) func (s *DelegatingAuthenticationOptions) createRequestHeaderConfig(client kubernetes.Interface) (*authenticatorfactory.RequestHeaderConfig, error) { - requestHeaderCAProvider, err := dynamiccertificates.NewDynamicCAFromConfigMapController("client-ca", authenticationConfigMapNamespace, authenticationConfigMapName, "requestheader-client-ca-file", client) + dynamicRequestHeaderProvider, err := newDynamicRequestHeaderController(client) if err != nil { return nil, fmt.Errorf("unable to create request header authentication config: %v", err) } - authConfigMap, err := client.CoreV1().ConfigMaps(authenticationConfigMapNamespace).Get(context.TODO(), authenticationConfigMapName, metav1.GetOptions{}) - switch { - case errors.IsNotFound(err): - // ignore, authConfigMap is nil now - return nil, nil - case errors.IsForbidden(err): - klog.Warningf("Unable to get configmap/%s in %s. Usually fixed by "+ - "'kubectl create rolebinding -n %s ROLEBINDING_NAME --role=%s --serviceaccount=YOUR_NS:YOUR_SA'", - authenticationConfigMapName, authenticationConfigMapNamespace, authenticationConfigMapNamespace, authenticationRoleName) - return nil, err - case err != nil: - return nil, err - } - - usernameHeaders, err := deserializeStrings(authConfigMap.Data["requestheader-username-headers"]) - if err != nil { - return nil, err - } - groupHeaders, err := deserializeStrings(authConfigMap.Data["requestheader-group-headers"]) - if err != nil { - return nil, err - } - extraHeaderPrefixes, err := deserializeStrings(authConfigMap.Data["requestheader-extra-headers-prefix"]) - if err != nil { - return nil, err - } - allowedNames, err := deserializeStrings(authConfigMap.Data["requestheader-allowed-names"]) - if err != nil { + // look up authentication configuration in the cluster and in case of an err defer to authentication-tolerate-lookup-failure flag + if err := dynamicRequestHeaderProvider.RunOnce(); err != nil { return nil, err } return &authenticatorfactory.RequestHeaderConfig{ - CAContentProvider: requestHeaderCAProvider, - UsernameHeaders: headerrequest.StaticStringSlice(usernameHeaders), - GroupHeaders: headerrequest.StaticStringSlice(groupHeaders), - ExtraHeaderPrefixes: headerrequest.StaticStringSlice(extraHeaderPrefixes), - AllowedClientNames: headerrequest.StaticStringSlice(allowedNames), + CAContentProvider: dynamicRequestHeaderProvider, + UsernameHeaders: headerrequest.StringSliceProvider(headerrequest.StringSliceProviderFunc(dynamicRequestHeaderProvider.UsernameHeaders)), + GroupHeaders: headerrequest.StringSliceProvider(headerrequest.StringSliceProviderFunc(dynamicRequestHeaderProvider.GroupHeaders)), + ExtraHeaderPrefixes: headerrequest.StringSliceProvider(headerrequest.StringSliceProviderFunc(dynamicRequestHeaderProvider.ExtraHeaderPrefixes)), + AllowedClientNames: headerrequest.StringSliceProvider(headerrequest.StringSliceProviderFunc(dynamicRequestHeaderProvider.AllowedClientNames)), }, nil } -func deserializeStrings(in string) ([]string, error) { - if len(in) == 0 { - return nil, nil - } - var ret []string - if err := json.Unmarshal([]byte(in), &ret); err != nil { - return nil, err - } - return ret, nil -} - // getClient returns a Kubernetes clientset. If s.RemoteKubeConfigFileOptional is true, nil will be returned // if no kubeconfig is specified by the user and the in-cluster config is not found. func (s *DelegatingAuthenticationOptions) getClient() (kubernetes.Interface, error) { diff --git a/vendor/k8s.io/apiserver/pkg/server/options/authentication_dynamic_request_header.go b/vendor/k8s.io/apiserver/pkg/server/options/authentication_dynamic_request_header.go new file mode 100644 index 00000000000..5c558b06d68 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/options/authentication_dynamic_request_header.go @@ -0,0 +1,79 @@ +/* +Copyright 2020 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 options + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apiserver/pkg/authentication/request/headerrequest" + "k8s.io/apiserver/pkg/server/dynamiccertificates" + "k8s.io/client-go/kubernetes" +) + +var _ dynamiccertificates.ControllerRunner = &DynamicRequestHeaderController{} +var _ dynamiccertificates.Notifier = &DynamicRequestHeaderController{} +var _ dynamiccertificates.CAContentProvider = &DynamicRequestHeaderController{} + +var _ headerrequest.RequestHeaderAuthRequestProvider = &DynamicRequestHeaderController{} + +// DynamicRequestHeaderController combines DynamicCAFromConfigMapController and RequestHeaderAuthRequestController +// into one controller for dynamically filling RequestHeaderConfig struct +type DynamicRequestHeaderController struct { + *dynamiccertificates.ConfigMapCAController + *headerrequest.RequestHeaderAuthRequestController +} + +// newDynamicRequestHeaderController creates a new controller that implements DynamicRequestHeaderController +func newDynamicRequestHeaderController(client kubernetes.Interface) (*DynamicRequestHeaderController, error) { + requestHeaderCAController, err := dynamiccertificates.NewDynamicCAFromConfigMapController( + "client-ca", + authenticationConfigMapNamespace, + authenticationConfigMapName, + "requestheader-client-ca-file", + client) + if err != nil { + return nil, fmt.Errorf("unable to create DynamicCAFromConfigMap controller: %v", err) + } + + requestHeaderAuthRequestController := headerrequest.NewRequestHeaderAuthRequestController( + authenticationConfigMapName, + authenticationConfigMapNamespace, + client, + "requestheader-username-headers", + "requestheader-group-headers", + "requestheader-extra-headers-prefix", + "requestheader-allowed-names", + ) + return &DynamicRequestHeaderController{ + ConfigMapCAController: requestHeaderCAController, + RequestHeaderAuthRequestController: requestHeaderAuthRequestController, + }, nil +} + +func (c *DynamicRequestHeaderController) RunOnce() error { + errs := []error{} + errs = append(errs, c.ConfigMapCAController.RunOnce()) + errs = append(errs, c.RequestHeaderAuthRequestController.RunOnce()) + return errors.NewAggregate(errs) +} + +func (c *DynamicRequestHeaderController) Run(workers int, stopCh <-chan struct{}) { + go c.ConfigMapCAController.Run(workers, stopCh) + go c.RequestHeaderAuthRequestController.Run(workers, stopCh) + <-stopCh +} diff --git a/vendor/k8s.io/apiserver/pkg/server/options/authorization.go b/vendor/k8s.io/apiserver/pkg/server/options/authorization.go index 7284c261f18..8b1718b4012 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/authorization.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/authorization.go @@ -21,7 +21,7 @@ import ( "time" "github.com/spf13/pflag" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/authorization/authorizerfactory" diff --git a/vendor/k8s.io/apiserver/pkg/server/options/deprecated_insecure_serving.go b/vendor/k8s.io/apiserver/pkg/server/options/deprecated_insecure_serving.go index f2c4fe71c1d..bd44895b76e 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/deprecated_insecure_serving.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/deprecated_insecure_serving.go @@ -43,7 +43,7 @@ type DeprecatedInsecureServingOptions struct { // ListenFunc can be overridden to create a custom listener, e.g. for mocking in tests. // It defaults to options.CreateListener. - ListenFunc func(network, addr string) (net.Listener, int, error) + ListenFunc func(network, addr string, config net.ListenConfig) (net.Listener, int, error) } // Validate ensures that the insecure port values within the range of the port. @@ -110,7 +110,7 @@ func (s *DeprecatedInsecureServingOptions) ApplyTo(c **server.DeprecatedInsecure listen = s.ListenFunc } addr := net.JoinHostPort(s.BindAddress.String(), fmt.Sprintf("%d", s.BindPort)) - s.Listener, s.BindPort, err = listen(s.BindNetwork, addr) + s.Listener, s.BindPort, err = listen(s.BindNetwork, addr, net.ListenConfig{}) if err != nil { return fmt.Errorf("failed to create listener: %v", err) } diff --git a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go b/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go index 6789605231b..372ab5eb8a6 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go @@ -161,15 +161,14 @@ func GetTransformerOverrides(filepath string) (map[schema.GroupResource]value.Tr } defer f.Close() - result, err := ParseEncryptionConfiguration(f) + result, err := parseEncryptionConfiguration(f) if err != nil { return nil, fmt.Errorf("error while parsing encryption provider configuration file %q: %v", filepath, err) } return result, nil } -// ParseEncryptionConfiguration parses configuration data and returns the transformer overrides -func ParseEncryptionConfiguration(f io.Reader) (map[schema.GroupResource]value.Transformer, error) { +func parseEncryptionConfiguration(f io.Reader) (map[schema.GroupResource]value.Transformer, error) { configFileContents, err := ioutil.ReadAll(f) if err != nil { return nil, fmt.Errorf("could not read contents: %v", err) @@ -184,7 +183,7 @@ func ParseEncryptionConfiguration(f io.Reader) (map[schema.GroupResource]value.T // For each entry in the configuration for _, resourceConfig := range config.Resources { - transformers, err := GetPrefixTransformers(&resourceConfig) + transformers, err := prefixTransformers(&resourceConfig) if err != nil { return nil, err } @@ -205,7 +204,6 @@ func ParseEncryptionConfiguration(f io.Reader) (map[schema.GroupResource]value.T } -// loadConfig decodes data as a EncryptionConfiguration object. func loadConfig(data []byte) (*apiserverconfig.EncryptionConfiguration, error) { scheme := runtime.NewScheme() codecs := serializer.NewCodecFactory(scheme) @@ -227,8 +225,7 @@ func loadConfig(data []byte) (*apiserverconfig.EncryptionConfiguration, error) { // The factory to create kms service. This is to make writing test easier. var envelopeServiceFactory = envelope.NewGRPCService -// GetPrefixTransformers constructs and returns the appropriate prefix transformers for the passed resource using its configuration. -func GetPrefixTransformers(config *apiserverconfig.ResourceConfiguration) ([]value.PrefixTransformer, error) { +func prefixTransformers(config *apiserverconfig.ResourceConfiguration) ([]value.PrefixTransformer, error) { var result []value.PrefixTransformer for _, provider := range config.Providers { var ( @@ -238,18 +235,18 @@ func GetPrefixTransformers(config *apiserverconfig.ResourceConfiguration) ([]val switch { case provider.AESGCM != nil: - transformer, err = GetAESPrefixTransformer(provider.AESGCM, aestransformer.NewGCMTransformer, aesGCMTransformerPrefixV1) + transformer, err = aesPrefixTransformer(provider.AESGCM, aestransformer.NewGCMTransformer, aesGCMTransformerPrefixV1) case provider.AESCBC != nil: - transformer, err = GetAESPrefixTransformer(provider.AESCBC, aestransformer.NewCBCTransformer, aesCBCTransformerPrefixV1) + transformer, err = aesPrefixTransformer(provider.AESCBC, aestransformer.NewCBCTransformer, aesCBCTransformerPrefixV1) case provider.Secretbox != nil: - transformer, err = GetSecretboxPrefixTransformer(provider.Secretbox) + transformer, err = secretboxPrefixTransformer(provider.Secretbox) case provider.KMS != nil: envelopeService, err := envelopeServiceFactory(provider.KMS.Endpoint, provider.KMS.Timeout.Duration) if err != nil { return nil, fmt.Errorf("could not configure KMS plugin %q, error: %v", provider.KMS.Name, err) } - transformer, err = getEnvelopePrefixTransformer(provider.KMS, envelopeService, kmsTransformerPrefixV1) + transformer, err = envelopePrefixTransformer(provider.KMS, envelopeService, kmsTransformerPrefixV1) case provider.Identity != nil: transformer = value.PrefixTransformer{ Transformer: identity.NewEncryptCheckTransformer(), @@ -267,12 +264,9 @@ func GetPrefixTransformers(config *apiserverconfig.ResourceConfiguration) ([]val return result, nil } -// BlockTransformerFunc takes an AES cipher block and returns a value transformer. -type BlockTransformerFunc func(cipher.Block) value.Transformer +type blockTransformerFunc func(cipher.Block) value.Transformer -// GetAESPrefixTransformer returns a prefix transformer from the provided configuration. -// Returns an AES transformer based on the provided prefix and block transformer. -func GetAESPrefixTransformer(config *apiserverconfig.AESConfiguration, fn BlockTransformerFunc, prefix string) (value.PrefixTransformer, error) { +func aesPrefixTransformer(config *apiserverconfig.AESConfiguration, fn blockTransformerFunc, prefix string) (value.PrefixTransformer, error) { var result value.PrefixTransformer if len(config.Keys) == 0 { @@ -319,8 +313,7 @@ func GetAESPrefixTransformer(config *apiserverconfig.AESConfiguration, fn BlockT return result, nil } -// GetSecretboxPrefixTransformer returns a prefix transformer from the provided configuration -func GetSecretboxPrefixTransformer(config *apiserverconfig.SecretboxConfiguration) (value.PrefixTransformer, error) { +func secretboxPrefixTransformer(config *apiserverconfig.SecretboxConfiguration) (value.PrefixTransformer, error) { var result value.PrefixTransformer if len(config.Keys) == 0 { @@ -370,9 +363,7 @@ func GetSecretboxPrefixTransformer(config *apiserverconfig.SecretboxConfiguratio return result, nil } -// getEnvelopePrefixTransformer returns a prefix transformer from the provided config. -// envelopeService is used as the root of trust. -func getEnvelopePrefixTransformer(config *apiserverconfig.KMSConfiguration, envelopeService envelope.Service, prefix string) (value.PrefixTransformer, error) { +func envelopePrefixTransformer(config *apiserverconfig.KMSConfiguration, envelopeService envelope.Service, prefix string) (value.PrefixTransformer, error) { envelopeTransformer, err := envelope.NewEnvelopeTransformer(envelopeService, int(*config.CacheSize), aestransformer.NewCBCTransformer) if err != nil { return value.PrefixTransformer{}, err diff --git a/vendor/k8s.io/apiserver/pkg/server/options/etcd.go b/vendor/k8s.io/apiserver/pkg/server/options/etcd.go index 4cf68fb8fd6..192edeb6b21 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/etcd.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/etcd.go @@ -35,6 +35,7 @@ import ( serverstorage "k8s.io/apiserver/pkg/server/storage" "k8s.io/apiserver/pkg/storage/storagebackend" storagefactory "k8s.io/apiserver/pkg/storage/storagebackend/factory" + "k8s.io/klog/v2" ) type EtcdOptions struct { @@ -176,6 +177,9 @@ func (s *EtcdOptions) AddFlags(fs *pflag.FlagSet) { fs.DurationVar(&s.StorageConfig.CountMetricPollPeriod, "etcd-count-metric-poll-period", s.StorageConfig.CountMetricPollPeriod, ""+ "Frequency of polling etcd for number of resources per type. 0 disables the metric collection.") + + fs.DurationVar(&s.StorageConfig.DBMetricPollInterval, "etcd-db-metric-poll-interval", s.StorageConfig.DBMetricPollInterval, + "The interval of requests to poll etcd and update metric. 0 disables the metric collection") } func (s *EtcdOptions) ApplyTo(c *server.Config) error { @@ -235,12 +239,15 @@ func (f *SimpleRestOptionsFactory) GetRESTOptions(resource schema.GroupResource) if err != nil { return generic.RESTOptions{}, err } - cacheSize, ok := sizes[resource] - if !ok { - cacheSize = f.Options.DefaultWatchCacheSize + size, ok := sizes[resource] + if ok && size > 0 { + klog.Warningf("Dropping watch-cache-size for %v - watchCache size is now dynamic", resource) + } + if ok && size <= 0 { + ret.Decorator = generic.UndecoratedStorage + } else { + ret.Decorator = genericregistry.StorageWithCacher() } - // depending on cache size this might return an undecorated storage - ret.Decorator = genericregistry.StorageWithCacher(cacheSize) } return ret, nil } @@ -269,12 +276,15 @@ func (f *StorageFactoryRestOptionsFactory) GetRESTOptions(resource schema.GroupR if err != nil { return generic.RESTOptions{}, err } - cacheSize, ok := sizes[resource] - if !ok { - cacheSize = f.Options.DefaultWatchCacheSize + size, ok := sizes[resource] + if ok && size > 0 { + klog.Warningf("Dropping watch-cache-size for %v - watchCache size is now dynamic", resource) + } + if ok && size <= 0 { + ret.Decorator = generic.UndecoratedStorage + } else { + ret.Decorator = genericregistry.StorageWithCacher() } - // depending on cache size this might return an undecorated storage - ret.Decorator = genericregistry.StorageWithCacher(cacheSize) } return ret, nil diff --git a/vendor/k8s.io/apiserver/pkg/server/options/events.go b/vendor/k8s.io/apiserver/pkg/server/options/events.go deleted file mode 100644 index 2dfc0111fcc..00000000000 --- a/vendor/k8s.io/apiserver/pkg/server/options/events.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2018 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 options - -import ( - "fmt" - "os" -) - -// ProcessInfo holds the apiserver process information used to send events -type ProcessInfo struct { - // Name of the api process to identify events - Name string - - // Namespace of the api process to send events - Namespace string -} - -// NewProcessInfo returns a new process info with the hostname concatenated to the name given -func NewProcessInfo(name, namespace string) *ProcessInfo { - // try to concat the hostname if available - host, _ := os.Hostname() - if host != "" { - name = fmt.Sprintf("%s-%s", name, host) - } - return &ProcessInfo{ - Name: name, - Namespace: namespace, - } -} - -// validateProcessInfo checks for a complete process info -func validateProcessInfo(p *ProcessInfo) error { - if p == nil { - return fmt.Errorf("ProcessInfo must be set") - } else if p.Name == "" { - return fmt.Errorf("ProcessInfo name must be set") - } else if p.Namespace == "" { - return fmt.Errorf("ProcessInfo namespace must be set") - } - return nil -} diff --git a/vendor/k8s.io/apiserver/pkg/server/options/recommended.go b/vendor/k8s.io/apiserver/pkg/server/options/recommended.go index 3d634a2e6ff..8ce82aa0b0d 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/recommended.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/recommended.go @@ -48,14 +48,11 @@ type RecommendedOptions struct { // admission plugin initializers to Admission.ApplyTo. ExtraAdmissionInitializers func(c *server.RecommendedConfig) ([]admission.PluginInitializer, error) Admission *AdmissionOptions - // ProcessInfo is used to identify events created by the server. - ProcessInfo *ProcessInfo - Webhook *WebhookOptions // API Server Egress Selector is used to control outbound traffic from the API Server EgressSelector *EgressSelectorOptions } -func NewRecommendedOptions(prefix string, codec runtime.Codec, processInfo *ProcessInfo) *RecommendedOptions { +func NewRecommendedOptions(prefix string, codec runtime.Codec) *RecommendedOptions { sso := NewSecureServingOptions() // We are composing recommended options for an aggregated api-server, @@ -78,8 +75,6 @@ func NewRecommendedOptions(prefix string, codec runtime.Codec, processInfo *Proc FeatureGate: feature.DefaultFeatureGate, ExtraAdmissionInitializers: func(c *server.RecommendedConfig) ([]admission.PluginInitializer, error) { return nil, nil }, Admission: NewAdmissionOptions(), - ProcessInfo: processInfo, - Webhook: NewWebhookOptions(), EgressSelector: NewEgressSelectorOptions(), } } @@ -111,7 +106,7 @@ func (o *RecommendedOptions) ApplyTo(config *server.RecommendedConfig) error { if err := o.Authorization.ApplyTo(&config.Config.Authorization); err != nil { return err } - if err := o.Audit.ApplyTo(&config.Config, config.ClientConfig, config.SharedInformerFactory, o.ProcessInfo, o.Webhook); err != nil { + if err := o.Audit.ApplyTo(&config.Config); err != nil { return err } if err := o.Features.ApplyTo(&config.Config); err != nil { diff --git a/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go b/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go index 346364b5c79..1ee7060428a 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go @@ -50,7 +50,6 @@ type ServerRunOptions struct { // We intentionally did not add a flag for this option. Users of the // apiserver library can wire it to a flag. MaxRequestBodyBytes int64 - TargetRAMMB int EnablePriorityAndFairness bool } @@ -69,7 +68,7 @@ func NewServerRunOptions() *ServerRunOptions { } } -// ApplyOptions applies the run options to the method receiver and returns self +// ApplyTo applies the run options to the method receiver and returns self func (s *ServerRunOptions) ApplyTo(c *server.Config) error { c.CorsAllowedOriginList = s.CorsAllowedOriginList c.ExternalAddress = s.ExternalHost @@ -108,9 +107,6 @@ func (s *ServerRunOptions) DefaultAdvertiseAddress(secure *SecureServingOptions) // Validate checks validation of ServerRunOptions func (s *ServerRunOptions) Validate() []error { errors := []error{} - if s.TargetRAMMB < 0 { - errors = append(errors, fmt.Errorf("--target-ram-mb can not be negative value")) - } if s.LivezGracePeriod < 0 { errors = append(errors, fmt.Errorf("--livez-grace-period can not be a negative value")) @@ -165,8 +161,10 @@ func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet) { "List of allowed origins for CORS, comma separated. An allowed origin can be a regular "+ "expression to support subdomain matching. If this list is empty CORS will not be enabled.") - fs.IntVar(&s.TargetRAMMB, "target-ram-mb", s.TargetRAMMB, - "Memory limit for apiserver in MB (used to configure sizes of caches, etc.)") + deprecatedTargetRAMMB := 0 + fs.IntVar(&deprecatedTargetRAMMB, "target-ram-mb", deprecatedTargetRAMMB, + "DEPRECATED: Memory limit for apiserver in MB (used to configure sizes of caches, etc.)") + fs.MarkDeprecated("target-ram-mb", "This flag will be removed in v1.23") fs.StringVar(&s.ExternalHost, "external-hostname", s.ExternalHost, "The hostname to use when generating externalized URLs for this master (e.g. Swagger API Docs or OpenID Discovery).") @@ -209,8 +207,8 @@ func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet) { "If true and the APIPriorityAndFairness feature gate is enabled, replace the max-in-flight handler with an enhanced one that queues and dispatches with priority and fairness") fs.DurationVar(&s.ShutdownDelayDuration, "shutdown-delay-duration", s.ShutdownDelayDuration, ""+ - "Time to delay the termination. During that time the server keeps serving requests normally and /healthz "+ - "returns success, but /readyz immediately returns failure. Graceful termination starts after this delay "+ + "Time to delay the termination. During that time the server keeps serving requests normally. The endpoints /healthz and /livez "+ + "will return success, but /readyz immediately returns failure. Graceful termination starts after this delay "+ "has elapsed. This can be used to allow load balancer to stop sending traffic to this server.") utilfeature.DefaultMutableFeatureGate.AddFlag(fs) diff --git a/vendor/k8s.io/apiserver/pkg/server/options/serving.go b/vendor/k8s.io/apiserver/pkg/server/options/serving.go index 3d5aeb82102..0ad3cfbbf2f 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/serving.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/serving.go @@ -17,6 +17,7 @@ limitations under the License. package options import ( + "context" "fmt" "net" "path" @@ -24,7 +25,7 @@ import ( "strings" "github.com/spf13/pflag" - "k8s.io/klog" + "k8s.io/klog/v2" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apiserver/pkg/server" @@ -67,6 +68,10 @@ type SecureServingOptions struct { // A value of zero means to use the default provided by golang's HTTP/2 support. HTTP2MaxStreamsPerConnection int + // PermitPortSharing controls if SO_REUSEPORT is used when binding the port, which allows + // more than one instance to bind on the same address and port. + PermitPortSharing bool + AdvertisePort int } @@ -170,11 +175,13 @@ func (s *SecureServingOptions) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.ServerCert.CertKey.KeyFile, "tls-private-key-file", s.ServerCert.CertKey.KeyFile, "File containing the default x509 private key matching --tls-cert-file.") - tlsCipherPossibleValues := cliflag.TLSCipherPossibleValues() + tlsCipherPreferredValues := cliflag.PreferredTLSCipherNames() + tlsCipherInsecureValues := cliflag.InsecureTLSCipherNames() fs.StringSliceVar(&s.CipherSuites, "tls-cipher-suites", s.CipherSuites, "Comma-separated list of cipher suites for the server. "+ - "If omitted, the default Go cipher suites will be use. "+ - "Possible values: "+strings.Join(tlsCipherPossibleValues, ",")) + "If omitted, the default Go cipher suites will be used. \n"+ + "Preferred values: "+strings.Join(tlsCipherPreferredValues, ", ")+". \n"+ + "Insecure values: "+strings.Join(tlsCipherInsecureValues, ", ")+".") tlsPossibleVersions := cliflag.TLSPossibleVersions() fs.StringVar(&s.MinTLSVersion, "tls-min-version", s.MinTLSVersion, @@ -196,6 +203,10 @@ func (s *SecureServingOptions) AddFlags(fs *pflag.FlagSet) { "The limit that the server gives to clients for "+ "the maximum number of streams in an HTTP/2 connection. "+ "Zero means to use golang's default.") + + fs.BoolVar(&s.PermitPortSharing, "permit-port-sharing", s.PermitPortSharing, + "If true, SO_REUSEPORT will be used when binding the port, which allows "+ + "more than one instance to bind on the same address and port. [default=false]") } // ApplyTo fills up serving information in the server configuration. @@ -210,7 +221,14 @@ func (s *SecureServingOptions) ApplyTo(config **server.SecureServingInfo) error if s.Listener == nil { var err error addr := net.JoinHostPort(s.BindAddress.String(), strconv.Itoa(s.BindPort)) - s.Listener, s.BindPort, err = CreateListener(s.BindNetwork, addr) + + c := net.ListenConfig{} + + if s.PermitPortSharing { + c.Control = permitPortReuse + } + + s.Listener, s.BindPort, err = CreateListener(s.BindNetwork, addr, c) if err != nil { return fmt.Errorf("failed to create listener: %v", err) } @@ -323,11 +341,12 @@ func (s *SecureServingOptions) MaybeDefaultWithSelfSignedCerts(publicAddress str return nil } -func CreateListener(network, addr string) (net.Listener, int, error) { +func CreateListener(network, addr string, config net.ListenConfig) (net.Listener, int, error) { if len(network) == 0 { network = "tcp" } - ln, err := net.Listen(network, addr) + + ln, err := config.Listen(context.TODO(), network, addr) if err != nil { return nil, 0, fmt.Errorf("failed to listen on %v: %v", addr, err) } diff --git a/vendor/k8s.io/apiserver/pkg/server/options/serving_unix.go b/vendor/k8s.io/apiserver/pkg/server/options/serving_unix.go new file mode 100644 index 00000000000..221a5474bd0 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/options/serving_unix.go @@ -0,0 +1,31 @@ +// +build !windows + +/* +Copyright 2020 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 options + +import ( + "syscall" + + "golang.org/x/sys/unix" +) + +func permitPortReuse(network, addr string, conn syscall.RawConn) error { + return conn.Control(func(fd uintptr) { + syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, unix.SO_REUSEPORT, 1) + }) +} diff --git a/vendor/k8s.io/apiserver/pkg/server/options/serving_windows.go b/vendor/k8s.io/apiserver/pkg/server/options/serving_windows.go new file mode 100644 index 00000000000..1941890234e --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/server/options/serving_windows.go @@ -0,0 +1,30 @@ +// +build windows + +/* +Copyright 2020 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 options + +import ( + "fmt" + "syscall" +) + +// Windows only supports SO_REUSEADDR, which may cause undefined behavior, as +// there is no protection against port hijacking. +func permitPortReuse(network, address string, c syscall.RawConn) error { + return fmt.Errorf("port reuse is not supported on Windows") +} diff --git a/vendor/k8s.io/apiserver/pkg/server/resourceconfig/BUILD b/vendor/k8s.io/apiserver/pkg/server/resourceconfig/BUILD index 6c9b97f0920..59c45ca49d3 100644 --- a/vendor/k8s.io/apiserver/pkg/server/resourceconfig/BUILD +++ b/vendor/k8s.io/apiserver/pkg/server/resourceconfig/BUILD @@ -14,7 +14,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/storage:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go b/vendor/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go index 85e5e1c46d9..bfcce54b8d5 100644 --- a/vendor/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go +++ b/vendor/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" serverstore "k8s.io/apiserver/pkg/server/storage" cliflag "k8s.io/component-base/cli/flag" - "k8s.io/klog" + "k8s.io/klog/v2" ) // GroupVersionRegistry provides access to registered group versions. diff --git a/vendor/k8s.io/apiserver/pkg/server/routes/BUILD b/vendor/k8s.io/apiserver/pkg/server/routes/BUILD index bb97b8f5313..e0da2dd941e 100644 --- a/vendor/k8s.io/apiserver/pkg/server/routes/BUILD +++ b/vendor/k8s.io/apiserver/pkg/server/routes/BUILD @@ -30,7 +30,7 @@ go_library( "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/github.com/emicklei/go-restful:go_default_library", "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/builder:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/handler:go_default_library", diff --git a/vendor/k8s.io/apiserver/pkg/server/routes/flags.go b/vendor/k8s.io/apiserver/pkg/server/routes/flags.go index be1077a8808..55835a6e85d 100644 --- a/vendor/k8s.io/apiserver/pkg/server/routes/flags.go +++ b/vendor/k8s.io/apiserver/pkg/server/routes/flags.go @@ -24,7 +24,7 @@ import ( "path" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apiserver/pkg/server/mux" ) diff --git a/vendor/k8s.io/apiserver/pkg/server/routes/metrics.go b/vendor/k8s.io/apiserver/pkg/server/routes/metrics.go index 187deaded35..1121e95c36a 100644 --- a/vendor/k8s.io/apiserver/pkg/server/routes/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/server/routes/metrics.go @@ -17,9 +17,6 @@ limitations under the License. package routes import ( - "io" - "net/http" - apimetrics "k8s.io/apiserver/pkg/endpoints/metrics" "k8s.io/apiserver/pkg/server/mux" etcd3metrics "k8s.io/apiserver/pkg/storage/etcd3/metrics" @@ -43,16 +40,7 @@ type MetricsWithReset struct{} // Install adds the MetricsWithReset handler func (m MetricsWithReset) Install(c *mux.PathRecorderMux) { register() - defaultMetricsHandler := legacyregistry.Handler().ServeHTTP - c.HandleFunc("/metrics", func(w http.ResponseWriter, req *http.Request) { - if req.Method == "DELETE" { - apimetrics.Reset() - etcd3metrics.Reset() - io.WriteString(w, "metrics reset\n") - return - } - defaultMetricsHandler(w, req) - }) + c.Handle("/metrics", legacyregistry.HandlerWithReset()) } // register apiserver and etcd metrics diff --git a/vendor/k8s.io/apiserver/pkg/server/routes/openapi.go b/vendor/k8s.io/apiserver/pkg/server/routes/openapi.go index 23bbee99f7e..d920dc2a2f7 100644 --- a/vendor/k8s.io/apiserver/pkg/server/routes/openapi.go +++ b/vendor/k8s.io/apiserver/pkg/server/routes/openapi.go @@ -19,7 +19,7 @@ package routes import ( restful "github.com/emicklei/go-restful" "github.com/go-openapi/spec" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apiserver/pkg/server/mux" "k8s.io/kube-openapi/pkg/builder" @@ -38,9 +38,16 @@ func (oa OpenAPI) Install(c *restful.Container, mux *mux.PathRecorderMux) (*hand if err != nil { klog.Fatalf("Failed to build open api spec for root: %v", err) } - openAPIVersionedService, err := handler.RegisterOpenAPIVersionedService(spec, "/openapi/v2", mux) + + openAPIVersionedService, err := handler.NewOpenAPIService(spec) + if err != nil { + klog.Fatalf("Failed to create OpenAPIService: %v", err) + } + + err = openAPIVersionedService.RegisterOpenAPIVersionedService("/openapi/v2", mux) if err != nil { klog.Fatalf("Failed to register versioned open api spec for root: %v", err) } + return openAPIVersionedService, spec } diff --git a/vendor/k8s.io/apiserver/pkg/server/secure_serving.go b/vendor/k8s.io/apiserver/pkg/server/secure_serving.go index 92149f124cc..38341eb03bd 100644 --- a/vendor/k8s.io/apiserver/pkg/server/secure_serving.go +++ b/vendor/k8s.io/apiserver/pkg/server/secure_serving.go @@ -20,14 +20,20 @@ import ( "context" "crypto/tls" "fmt" + "io" + "log" "net" "net/http" + "os" + "strings" "time" "golang.org/x/net/http2" - "k8s.io/klog" + "k8s.io/component-base/cli/flag" + "k8s.io/klog/v2" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apiserver/pkg/endpoints/metrics" "k8s.io/apiserver/pkg/server/dynamiccertificates" ) @@ -56,6 +62,14 @@ func (s *SecureServingInfo) tlsConfig(stopCh <-chan struct{}) (*tls.Config, erro } if len(s.CipherSuites) > 0 { tlsConfig.CipherSuites = s.CipherSuites + insecureCiphers := flag.InsecureTLSCiphers() + for i := 0; i < len(s.CipherSuites); i++ { + for cipherName, cipherID := range insecureCiphers { + if s.CipherSuites[i] == cipherID { + klog.Warningf("Use of insecure cipher '%s' detected.", cipherName) + } + } + } } if s.ClientCA != nil { @@ -175,6 +189,11 @@ func (s *SecureServingInfo) Serve(handler http.Handler, shutdownTimeout time.Dur } } + // use tlsHandshakeErrorWriter to handle messages of tls handshake error + tlsErrorWriter := &tlsHandshakeErrorWriter{os.Stderr} + tlsErrorLogger := log.New(tlsErrorWriter, "", 0) + secureServer.ErrorLog = tlsErrorLogger + klog.Infof("Serving securely on %s", secureServer.Addr) return RunServer(secureServer, s.Listener, shutdownTimeout, stopCh) } @@ -209,7 +228,7 @@ func RunServer( defer utilruntime.HandleCrash() var listener net.Listener - listener = tcpKeepAliveListener{ln.(*net.TCPListener)} + listener = tcpKeepAliveListener{ln} if server.TLSConfig != nil { listener = tls.NewListener(listener, server.TLSConfig) } @@ -235,15 +254,36 @@ func RunServer( // // Copied from Go 1.7.2 net/http/server.go type tcpKeepAliveListener struct { - *net.TCPListener + net.Listener } func (ln tcpKeepAliveListener) Accept() (net.Conn, error) { - tc, err := ln.AcceptTCP() + c, err := ln.Listener.Accept() if err != nil { return nil, err } - tc.SetKeepAlive(true) - tc.SetKeepAlivePeriod(defaultKeepAlivePeriod) - return tc, nil + if tc, ok := c.(*net.TCPConn); ok { + tc.SetKeepAlive(true) + tc.SetKeepAlivePeriod(defaultKeepAlivePeriod) + } + return c, nil +} + +// tlsHandshakeErrorWriter writes TLS handshake errors to klog with +// trace level - V(5), to avoid flooding of tls handshake errors. +type tlsHandshakeErrorWriter struct { + out io.Writer +} + +const tlsHandshakeErrorPrefix = "http: TLS handshake error" + +func (w *tlsHandshakeErrorWriter) Write(p []byte) (int, error) { + if strings.Contains(string(p), tlsHandshakeErrorPrefix) { + klog.V(5).Info(string(p)) + metrics.TLSHandshakeErrors.Inc() + return len(p), nil + } + + // for non tls handshake error, log it as usual + return w.out.Write(p) } diff --git a/vendor/k8s.io/apiserver/pkg/server/signal.go b/vendor/k8s.io/apiserver/pkg/server/signal.go index 0ea19d6606d..e5334ae4c15 100644 --- a/vendor/k8s.io/apiserver/pkg/server/signal.go +++ b/vendor/k8s.io/apiserver/pkg/server/signal.go @@ -17,6 +17,7 @@ limitations under the License. package server import ( + "context" "os" "os/signal" ) @@ -27,21 +28,30 @@ var shutdownHandler chan os.Signal // SetupSignalHandler registered for SIGTERM and SIGINT. A stop channel is returned // which is closed on one of these signals. If a second signal is caught, the program // is terminated with exit code 1. +// Only one of SetupSignalContext and SetupSignalHandler should be called, and only can +// be called once. func SetupSignalHandler() <-chan struct{} { + return SetupSignalContext().Done() +} + +// SetupSignalContext is same as SetupSignalHandler, but a context.Context is returned. +// Only one of SetupSignalContext and SetupSignalHandler should be called, and only can +// be called once. +func SetupSignalContext() context.Context { close(onlyOneSignalHandler) // panics when called twice shutdownHandler = make(chan os.Signal, 2) - stop := make(chan struct{}) + ctx, cancel := context.WithCancel(context.Background()) signal.Notify(shutdownHandler, shutdownSignals...) go func() { <-shutdownHandler - close(stop) + cancel() <-shutdownHandler os.Exit(1) // second signal. Exit directly. }() - return stop + return ctx } // RequestShutdown emulates a received event that is considered as shutdown signal (SIGTERM/SIGINT) diff --git a/vendor/k8s.io/apiserver/pkg/server/storage/BUILD b/vendor/k8s.io/apiserver/pkg/server/storage/BUILD index 612eefe7b08..d57fb227825 100644 --- a/vendor/k8s.io/apiserver/pkg/server/storage/BUILD +++ b/vendor/k8s.io/apiserver/pkg/server/storage/BUILD @@ -45,7 +45,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/server/storage/storage_factory.go b/vendor/k8s.io/apiserver/pkg/server/storage/storage_factory.go index f3a54043a72..689b513223e 100644 --- a/vendor/k8s.io/apiserver/pkg/server/storage/storage_factory.go +++ b/vendor/k8s.io/apiserver/pkg/server/storage/storage_factory.go @@ -22,7 +22,7 @@ import ( "io/ioutil" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/vendor/k8s.io/apiserver/pkg/storage/OWNERS b/vendor/k8s.io/apiserver/pkg/storage/OWNERS index 50d91abc89a..cc124de7170 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/OWNERS +++ b/vendor/k8s.io/apiserver/pkg/storage/OWNERS @@ -15,7 +15,6 @@ reviewers: - mikedanese - liggitt - ncdc -- tallclair - timothysc - hongchaodeng - krousey diff --git a/vendor/k8s.io/apiserver/pkg/storage/cacher/BUILD b/vendor/k8s.io/apiserver/pkg/storage/cacher/BUILD index 101aa352d76..16254390930 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/cacher/BUILD +++ b/vendor/k8s.io/apiserver/pkg/storage/cacher/BUILD @@ -5,6 +5,7 @@ go_library( srcs = [ "cacher.go", "caching_object.go", + "metrics.go", "time_budget.go", "util.go", "watch_cache.go", @@ -32,7 +33,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go b/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go index fbf644991ee..1b6432b8c36 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go +++ b/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go @@ -39,29 +39,11 @@ import ( "k8s.io/apiserver/pkg/storage" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/tools/cache" - "k8s.io/component-base/metrics" - "k8s.io/component-base/metrics/legacyregistry" - "k8s.io/klog" + "k8s.io/klog/v2" utiltrace "k8s.io/utils/trace" ) -/* - * By default, all the following metrics are defined as falling under - * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190404-kubernetes-control-plane-metrics-stability.md#stability-classes) - * - * Promoting the stability level of the metric is a responsibility of the component owner, since it - * involves explicitly acknowledging support for the metric across multiple releases, in accordance with - * the metric stability policy. - */ var ( - initCounter = metrics.NewCounterVec( - &metrics.CounterOpts{ - Name: "apiserver_init_events_total", - Help: "Counter of init events processed in watchcache broken by resource type", - StabilityLevel: metrics.ALPHA, - }, - []string{"resource"}, - ) emptyFunc = func() {} ) @@ -69,17 +51,15 @@ const ( // storageWatchListPageSize is the cacher's request chunk size of // initial and resync watch lists to storage. storageWatchListPageSize = int64(10000) + // defaultBookmarkFrequency defines how frequently watch bookmarks should be send + // in addition to sending a bookmark right before watch deadline. + // + // NOTE: Update `eventFreshDuration` when changing this value. + defaultBookmarkFrequency = time.Minute ) -func init() { - legacyregistry.MustRegister(initCounter) -} - // Config contains the configuration for a given Cache. type Config struct { - // Maximum size of the history cached in memory. - CacheCapacity int - // An underlying storage.Interface. Storage storage.Interface @@ -112,6 +92,8 @@ type Config struct { NewListFunc func() runtime.Object Codec runtime.Codec + + Clock clock.Clock } type watchersMap map[int]*cacheWatcher @@ -176,24 +158,26 @@ func (i *indexedWatchers) terminateAll(objectType reflect.Type, done func(*cache // second in a bucket, and pop up them once at the timeout. To be more specific, // if you set fire time at X, you can get the bookmark within (X-1,X+1) period. type watcherBookmarkTimeBuckets struct { - lock sync.Mutex - watchersBuckets map[int64][]*cacheWatcher - startBucketID int64 - clock clock.Clock + lock sync.Mutex + watchersBuckets map[int64][]*cacheWatcher + startBucketID int64 + clock clock.Clock + bookmarkFrequency time.Duration } -func newTimeBucketWatchers(clock clock.Clock) *watcherBookmarkTimeBuckets { +func newTimeBucketWatchers(clock clock.Clock, bookmarkFrequency time.Duration) *watcherBookmarkTimeBuckets { return &watcherBookmarkTimeBuckets{ - watchersBuckets: make(map[int64][]*cacheWatcher), - startBucketID: clock.Now().Unix(), - clock: clock, + watchersBuckets: make(map[int64][]*cacheWatcher), + startBucketID: clock.Now().Unix(), + clock: clock, + bookmarkFrequency: bookmarkFrequency, } } // adds a watcher to the bucket, if the deadline is before the start, it will be // added to the first one. func (t *watcherBookmarkTimeBuckets) addWatcher(w *cacheWatcher) bool { - nextTime, ok := w.nextBookmarkTime(t.clock.Now()) + nextTime, ok := w.nextBookmarkTime(t.clock.Now(), t.bookmarkFrequency) if !ok { return false } @@ -336,11 +320,14 @@ func NewCacherFromConfig(config Config) (*Cacher, error) { } } - clock := clock.RealClock{} + if config.Clock == nil { + config.Clock = clock.RealClock{} + } + objType := reflect.TypeOf(obj) cacher := &Cacher{ ready: newReady(), storage: config.Storage, - objectType: reflect.TypeOf(obj), + objectType: objType, versioner: config.Versioner, newFunc: config.NewFunc, indexedTrigger: indexedTrigger, @@ -358,9 +345,9 @@ func NewCacherFromConfig(config Config) (*Cacher, error) { // and there are no guarantees on the order that they will stop. // So we will be simply closing the channel, and synchronizing on the WaitGroup. stopCh: stopCh, - clock: clock, + clock: config.Clock, timer: time.NewTimer(time.Duration(0)), - bookmarkWatchers: newTimeBucketWatchers(clock), + bookmarkWatchers: newTimeBucketWatchers(config.Clock, defaultBookmarkFrequency), } // Ensure that timer is stopped. @@ -371,7 +358,7 @@ func NewCacherFromConfig(config Config) (*Cacher, error) { } watchCache := newWatchCache( - config.CacheCapacity, config.KeyFunc, cacher.processEvent, config.GetAttrsFunc, config.Versioner, config.Indexers) + config.KeyFunc, cacher.processEvent, config.GetAttrsFunc, config.Versioner, config.Indexers, config.Clock, objType) listerWatcher := NewCacherListerWatcher(config.Storage, config.ResourcePrefix, config.NewListFunc) reflectorName := "storage/cacher.go:" + config.ResourcePrefix @@ -412,6 +399,7 @@ func (c *Cacher) startCaching(stopChannel <-chan struct{}) { c.watchCache.SetOnReplace(func() { successfulList = true c.ready.set(true) + klog.V(1).Infof("cacher (%v): initialized", c.objectType.String()) }) defer func() { if successfulList { @@ -425,7 +413,7 @@ func (c *Cacher) startCaching(stopChannel <-chan struct{}) { // Also note that startCaching is called in a loop, so there's no need // to have another loop here. if err := c.reflector.ListAndWatch(stopChannel); err != nil { - klog.Errorf("unexpected ListAndWatch error: %v", err) + klog.Errorf("cacher (%v): unexpected ListAndWatch error: %v; reinitializing...", c.objectType.String(), err) } } @@ -445,8 +433,9 @@ func (c *Cacher) Delete(ctx context.Context, key string, out runtime.Object, pre } // Watch implements storage.Interface. -func (c *Cacher) Watch(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate) (watch.Interface, error) { - watchRV, err := c.versioner.ParseResourceVersion(resourceVersion) +func (c *Cacher) Watch(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { + pred := opts.Predicate + watchRV, err := c.versioner.ParseResourceVersion(opts.ResourceVersion) if err != nil { return nil, err } @@ -529,22 +518,22 @@ func (c *Cacher) Watch(ctx context.Context, key string, resourceVersion string, } // WatchList implements storage.Interface. -func (c *Cacher) WatchList(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate) (watch.Interface, error) { - return c.Watch(ctx, key, resourceVersion, pred) +func (c *Cacher) WatchList(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { + return c.Watch(ctx, key, opts) } // Get implements storage.Interface. -func (c *Cacher) Get(ctx context.Context, key string, resourceVersion string, objPtr runtime.Object, ignoreNotFound bool) error { - if resourceVersion == "" { +func (c *Cacher) Get(ctx context.Context, key string, opts storage.GetOptions, objPtr runtime.Object) error { + if opts.ResourceVersion == "" { // If resourceVersion is not specified, serve it from underlying // storage (for backward compatibility). - return c.storage.Get(ctx, key, resourceVersion, objPtr, ignoreNotFound) + return c.storage.Get(ctx, key, opts, objPtr) } // If resourceVersion is specified, serve it from cache. // It's guaranteed that the returned value is at least that // fresh as the given resourceVersion. - getRV, err := c.versioner.ParseResourceVersion(resourceVersion) + getRV, err := c.versioner.ParseResourceVersion(opts.ResourceVersion) if err != nil { return err } @@ -552,7 +541,7 @@ func (c *Cacher) Get(ctx context.Context, key string, resourceVersion string, ob if getRV == 0 && !c.ready.check() { // If Cacher is not yet initialized and we don't require any specific // minimal resource version, simply forward the request to storage. - return c.storage.Get(ctx, key, resourceVersion, objPtr, ignoreNotFound) + return c.storage.Get(ctx, key, opts, objPtr) } // Do not create a trace - it's not for free and there are tons @@ -577,7 +566,7 @@ func (c *Cacher) Get(ctx context.Context, key string, resourceVersion string, ob objVal.Set(reflect.ValueOf(elem.Object).Elem()) } else { objVal.Set(reflect.Zero(objVal.Type())) - if !ignoreNotFound { + if !opts.IgnoreNotFound { return storage.NewKeyNotFoundError(key, int64(readResourceVersion)) } } @@ -585,18 +574,20 @@ func (c *Cacher) Get(ctx context.Context, key string, resourceVersion string, ob } // GetToList implements storage.Interface. -func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate, listObj runtime.Object) error { +func (c *Cacher) GetToList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { + resourceVersion := opts.ResourceVersion + pred := opts.Predicate pagingEnabled := utilfeature.DefaultFeatureGate.Enabled(features.APIListChunking) hasContinuation := pagingEnabled && len(pred.Continue) > 0 hasLimit := pagingEnabled && pred.Limit > 0 && resourceVersion != "0" - if resourceVersion == "" || hasContinuation || hasLimit { + if resourceVersion == "" || hasContinuation || hasLimit || opts.ResourceVersionMatch == metav1.ResourceVersionMatchExact { // If resourceVersion is not specified, serve it from underlying // storage (for backward compatibility). If a continuation is // requested, serve it from the underlying storage as well. // Limits are only sent to storage when resourceVersion is non-zero // since the watch cache isn't able to perform continuations, and // limits are ignored when resource version is zero - return c.storage.GetToList(ctx, key, resourceVersion, pred, listObj) + return c.storage.GetToList(ctx, key, opts, listObj) } // If resourceVersion is specified, serve it from cache. @@ -610,7 +601,7 @@ func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion stri if listRV == 0 && !c.ready.check() { // If Cacher is not yet initialized and we don't require any specific // minimal resource version, simply forward the request to storage. - return c.storage.GetToList(ctx, key, resourceVersion, pred, listObj) + return c.storage.GetToList(ctx, key, opts, listObj) } trace := utiltrace.New("cacher list", utiltrace.Field{"type", c.objectType.String()}) @@ -657,18 +648,20 @@ func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion stri } // List implements storage.Interface. -func (c *Cacher) List(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate, listObj runtime.Object) error { +func (c *Cacher) List(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { + resourceVersion := opts.ResourceVersion + pred := opts.Predicate pagingEnabled := utilfeature.DefaultFeatureGate.Enabled(features.APIListChunking) hasContinuation := pagingEnabled && len(pred.Continue) > 0 hasLimit := pagingEnabled && pred.Limit > 0 && resourceVersion != "0" - if resourceVersion == "" || hasContinuation || hasLimit { + if resourceVersion == "" || hasContinuation || hasLimit || opts.ResourceVersionMatch == metav1.ResourceVersionMatchExact { // If resourceVersion is not specified, serve it from underlying // storage (for backward compatibility). If a continuation is // requested, serve it from the underlying storage as well. // Limits are only sent to storage when resourceVersion is non-zero // since the watch cache isn't able to perform continuations, and // limits are ignored when resource version is zero. - return c.storage.List(ctx, key, resourceVersion, pred, listObj) + return c.storage.List(ctx, key, opts, listObj) } // If resourceVersion is specified, serve it from cache. @@ -682,7 +675,7 @@ func (c *Cacher) List(ctx context.Context, key string, resourceVersion string, p if listRV == 0 && !c.ready.check() { // If Cacher is not yet initialized and we don't require any specific // minimal resource version, simply forward the request to storage. - return c.storage.List(ctx, key, resourceVersion, pred, listObj) + return c.storage.List(ctx, key, opts, listObj) } trace := utiltrace.New("cacher list", utiltrace.Field{"type", c.objectType.String()}) @@ -935,9 +928,8 @@ func (c *Cacher) startDispatchingBookmarkEvents() { continue } c.watchersBuffer = append(c.watchersBuffer, watcher) - // Given that we send bookmark event once at deadline-2s, never push again - // after the watcher pops up from the buckets. Once we decide to change the - // strategy to more sophisticated, we may need it here. + // Requeue the watcher for the next bookmark if needed. + c.bookmarkWatchers.addWatcher(watcher) } } } @@ -1098,7 +1090,7 @@ func (lw *cacherListerWatcher) List(options metav1.ListOptions) (runtime.Object, Continue: options.Continue, } - if err := lw.storage.List(context.TODO(), lw.resourcePrefix, "", pred, list); err != nil { + if err := lw.storage.List(context.TODO(), lw.resourcePrefix, storage.ListOptions{ResourceVersionMatch: options.ResourceVersionMatch, Predicate: pred}, list); err != nil { return nil, err } return list, nil @@ -1106,7 +1098,7 @@ func (lw *cacherListerWatcher) List(options metav1.ListOptions) (runtime.Object, // Implements cache.ListerWatcher interface. func (lw *cacherListerWatcher) Watch(options metav1.ListOptions) (watch.Interface, error) { - return lw.storage.WatchList(context.TODO(), lw.resourcePrefix, options.ResourceVersion, storage.Everything) + return lw.storage.WatchList(context.TODO(), lw.resourcePrefix, storage.ListOptions{ResourceVersion: options.ResourceVersion, Predicate: storage.Everything}) } // errWatcher implements watch.Interface to return a single error @@ -1240,13 +1232,28 @@ func (c *cacheWatcher) add(event *watchCacheEvent, timer *time.Timer) bool { } } -func (c *cacheWatcher) nextBookmarkTime(now time.Time) (time.Time, bool) { - // For now we return 2s before deadline (and maybe +infinity is now already passed this time) - // but it gives us extensibility for the future(false when deadline is not set). +func (c *cacheWatcher) nextBookmarkTime(now time.Time, bookmarkFrequency time.Duration) (time.Time, bool) { + // We try to send bookmarks: + // (a) roughly every minute + // (b) right before the watcher timeout - for now we simply set it 2s before + // the deadline + // The former gives us periodicity if the watch breaks due to unexpected + // conditions, the later ensures that on timeout the watcher is as close to + // now as possible - this covers 99% of cases. + heartbeatTime := now.Add(bookmarkFrequency) if c.deadline.IsZero() { - return c.deadline, false + // Timeout is set by our client libraries (e.g. reflector) as well as defaulted by + // apiserver if properly configured. So this shoudln't happen in practice. + return heartbeatTime, true } - return c.deadline.Add(-2 * time.Second), true + if pretimeoutTime := c.deadline.Add(-2 * time.Second); pretimeoutTime.Before(heartbeatTime) { + heartbeatTime = pretimeoutTime + } + + if heartbeatTime.Before(now) { + return time.Time{}, false + } + return heartbeatTime, true } func getEventObject(object runtime.Object) runtime.Object { diff --git a/vendor/k8s.io/apiserver/pkg/storage/cacher/caching_object.go b/vendor/k8s.io/apiserver/pkg/storage/cacher/caching_object.go index 9e7a46393db..752a28714c3 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/cacher/caching_object.go +++ b/vendor/k8s.io/apiserver/pkg/storage/cacher/caching_object.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) var _ runtime.CacheableObject = &cachingObject{} diff --git a/vendor/k8s.io/apiserver/pkg/storage/cacher/metrics.go b/vendor/k8s.io/apiserver/pkg/storage/cacher/metrics.go new file mode 100644 index 00000000000..19cd5da6af4 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/storage/cacher/metrics.go @@ -0,0 +1,74 @@ +/* +Copyright 2020 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 cacher + +import ( + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" +) + +/* + * By default, all the following metrics are defined as falling under + * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190404-kubernetes-control-plane-metrics-stability.md#stability-classes) + * + * Promoting the stability level of the metric is a responsibility of the component owner, since it + * involves explicitly acknowledging support for the metric across multiple releases, in accordance with + * the metric stability policy. + */ +var ( + initCounter = metrics.NewCounterVec( + &metrics.CounterOpts{ + Name: "apiserver_init_events_total", + Help: "Counter of init events processed in watchcache broken by resource type.", + StabilityLevel: metrics.ALPHA, + }, + []string{"resource"}, + ) + + watchCacheCapacityIncreaseTotal = metrics.NewCounterVec( + &metrics.CounterOpts{ + Name: "watch_cache_capacity_increase_total", + Help: "Total number of watch cache capacity increase events broken by resource type.", + StabilityLevel: metrics.ALPHA, + }, + []string{"resource"}, + ) + + watchCacheCapacityDecreaseTotal = metrics.NewCounterVec( + &metrics.CounterOpts{ + Name: "watch_cache_capacity_decrease_total", + Help: "Total number of watch cache capacity decrease events broken by resource type.", + StabilityLevel: metrics.ALPHA, + }, + []string{"resource"}, + ) +) + +func init() { + legacyregistry.MustRegister(initCounter) + legacyregistry.MustRegister(watchCacheCapacityIncreaseTotal) + legacyregistry.MustRegister(watchCacheCapacityDecreaseTotal) +} + +// recordsWatchCacheCapacityChange record watchCache capacity resize(increase or decrease) operations. +func recordsWatchCacheCapacityChange(objType string, old, new int) { + if old < new { + watchCacheCapacityIncreaseTotal.WithLabelValues(objType).Inc() + return + } + watchCacheCapacityDecreaseTotal.WithLabelValues(objType).Inc() +} diff --git a/vendor/k8s.io/apiserver/pkg/storage/cacher/util.go b/vendor/k8s.io/apiserver/pkg/storage/cacher/util.go index 63a23800f02..7943a93dcab 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/cacher/util.go +++ b/vendor/k8s.io/apiserver/pkg/storage/cacher/util.go @@ -44,3 +44,17 @@ func hasPathPrefix(s, pathPrefix string) bool { } return false } + +func max(a, b int) int { + if a > b { + return a + } + return b +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/vendor/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go b/vendor/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go index 1ad94a265c0..1e91733e143 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go +++ b/vendor/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go @@ -18,6 +18,7 @@ package cacher import ( "fmt" + "reflect" "sort" "sync" "time" @@ -30,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/watch" "k8s.io/apiserver/pkg/storage" "k8s.io/client-go/tools/cache" - "k8s.io/klog" + "k8s.io/klog/v2" utiltrace "k8s.io/utils/trace" ) @@ -44,6 +45,19 @@ const ( // resourceVersionTooHighRetrySeconds is the seconds before a operation should be retried by the client // after receiving a 'too high resource version' error. resourceVersionTooHighRetrySeconds = 1 + + // eventFreshDuration is time duration of events we want to keep. + // We set it to `defaultBookmarkFrequency` plus epsilon to maximize + // chances that last bookmark was sent within kept history, at the + // same time, minimizing the needed memory usage. + eventFreshDuration = 75 * time.Second + + // defaultLowerBoundCapacity is a default value for event cache capacity's lower bound. + // TODO: Figure out, to what value we can decreased it. + defaultLowerBoundCapacity = 100 + + // defaultUpperBoundCapacity should be able to keep eventFreshDuration of history. + defaultUpperBoundCapacity = 100 * 1024 ) // watchCacheEvent is a single "watch event" that is send to users of @@ -60,6 +74,7 @@ type watchCacheEvent struct { PrevObjFields fields.Set Key string ResourceVersion uint64 + RecordTime time.Time } // Computing a key of an object is generally non-trivial (it performs @@ -126,6 +141,12 @@ type watchCache struct { // Maximum size of history window. capacity int + // upper bound of capacity since event cache has a dynamic size. + upperBoundCapacity int + + // lower bound of capacity since event cache has a dynamic size. + lowerBoundCapacity int + // keyFunc is used to get a key in the underlying storage for a given object. keyFunc func(runtime.Object) (string, error) @@ -165,28 +186,35 @@ type watchCache struct { // An underlying storage.Versioner. versioner storage.Versioner + + // cacher's objectType. + objectType reflect.Type } func newWatchCache( - capacity int, keyFunc func(runtime.Object) (string, error), eventHandler func(*watchCacheEvent), getAttrsFunc func(runtime.Object) (labels.Set, fields.Set, error), versioner storage.Versioner, - indexers *cache.Indexers) *watchCache { + indexers *cache.Indexers, + clock clock.Clock, + objectType reflect.Type) *watchCache { wc := &watchCache{ - capacity: capacity, + capacity: defaultLowerBoundCapacity, keyFunc: keyFunc, getAttrsFunc: getAttrsFunc, - cache: make([]*watchCacheEvent, capacity), + cache: make([]*watchCacheEvent, defaultLowerBoundCapacity), + lowerBoundCapacity: defaultLowerBoundCapacity, + upperBoundCapacity: defaultUpperBoundCapacity, startIndex: 0, endIndex: 0, store: cache.NewIndexer(storeElementKey, storeElementIndexers(indexers)), resourceVersion: 0, listResourceVersion: 0, eventHandler: eventHandler, - clock: clock.RealClock{}, + clock: clock, versioner: versioner, + objectType: objectType, } wc.cond = sync.NewCond(wc.RLocker()) return wc @@ -260,6 +288,7 @@ func (w *watchCache) processEvent(event watch.Event, resourceVersion uint64, upd ObjFields: elem.Fields, Key: key, ResourceVersion: resourceVersion, + RecordTime: w.clock.Now(), } if err := func() error { @@ -301,7 +330,8 @@ func (w *watchCache) processEvent(event watch.Event, resourceVersion uint64, upd // Assumes that lock is already held for write. func (w *watchCache) updateCache(event *watchCacheEvent) { - if w.endIndex == w.startIndex+w.capacity { + w.resizeCacheLocked(event.RecordTime) + if w.isCacheFullLocked() { // Cache is full - remove the oldest element. w.startIndex++ } @@ -309,6 +339,48 @@ func (w *watchCache) updateCache(event *watchCacheEvent) { w.endIndex++ } +// resizeCacheLocked resizes the cache if necessary: +// - increases capacity by 2x if cache is full and all cached events occurred within last eventFreshDuration. +// - decreases capacity by 2x when recent quarter of events occurred outside of eventFreshDuration(protect watchCache from flapping). +func (w *watchCache) resizeCacheLocked(eventTime time.Time) { + if w.isCacheFullLocked() && eventTime.Sub(w.cache[w.startIndex%w.capacity].RecordTime) < eventFreshDuration { + capacity := min(w.capacity*2, w.upperBoundCapacity) + if capacity > w.capacity { + w.doCacheResizeLocked(capacity) + } + return + } + if w.isCacheFullLocked() && eventTime.Sub(w.cache[(w.endIndex-w.capacity/4)%w.capacity].RecordTime) > eventFreshDuration { + capacity := max(w.capacity/2, w.lowerBoundCapacity) + if capacity < w.capacity { + w.doCacheResizeLocked(capacity) + } + return + } +} + +// isCacheFullLocked used to judge whether watchCacheEvent is full. +// Assumes that lock is already held for write. +func (w *watchCache) isCacheFullLocked() bool { + return w.endIndex == w.startIndex+w.capacity +} + +// doCacheResizeLocked resize watchCache's event array with different capacity. +// Assumes that lock is already held for write. +func (w *watchCache) doCacheResizeLocked(capacity int) { + newCache := make([]*watchCacheEvent, capacity) + if capacity < w.capacity { + // adjust startIndex if cache capacity shrink. + w.startIndex = w.endIndex - capacity + } + for i := w.startIndex; i < w.endIndex; i++ { + newCache[i%capacity] = w.cache[i%w.capacity] + } + w.cache = newCache + recordsWatchCacheCapacityChange(w.objectType.String(), w.capacity, capacity) + w.capacity = capacity +} + // List returns list of pointers to objects. func (w *watchCache) List() []interface{} { return w.store.List() @@ -460,19 +532,16 @@ func (w *watchCache) GetAllEventsSinceThreadUnsafe(resourceVersion uint64) ([]*w size := w.endIndex - w.startIndex var oldest uint64 switch { - case size >= w.capacity: - // Once the watch event buffer is full, the oldest watch event we can deliver - // is the first one in the buffer. - oldest = w.cache[w.startIndex%w.capacity].ResourceVersion - case w.listResourceVersion > 0: - // If the watch event buffer isn't full, the oldest watch event we can deliver - // is one greater than the resource version of the last full list. + case w.listResourceVersion > 0 && w.startIndex == 0: + // If no event was removed from the buffer since last relist, the oldest watch + // event we can deliver is one greater than the resource version of the list. oldest = w.listResourceVersion + 1 case size > 0: - // If we've never completed a list, use the resourceVersion of the oldest event - // in the buffer. - // This should only happen in unit tests that populate the buffer without - // performing list/replace operations. + // If the previous condition is not satisfied: either some event was already + // removed from the buffer or we've never completed a list (the latter can + // only happen in unit tests that populate the buffer without performing + // list/replace operations), the oldest watch event we can deliver is the first + // one in the buffer. oldest = w.cache[w.startIndex%w.capacity].ResourceVersion default: return nil, fmt.Errorf("watch cache isn't correctly initialized") diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/BUILD b/vendor/k8s.io/apiserver/pkg/storage/etcd3/BUILD index a233ea072ce..982455986f3 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/BUILD +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/BUILD @@ -68,6 +68,7 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", @@ -82,7 +83,7 @@ go_library( "//vendor/go.etcd.io/etcd/clientv3:go_default_library", "//vendor/go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes:go_default_library", "//vendor/go.etcd.io/etcd/mvcc/mvccpb:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go b/vendor/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go index 321cab04d11..c42fc6e08ea 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go @@ -17,6 +17,7 @@ limitations under the License. package etcd3 import ( + "fmt" "strconv" "k8s.io/apimachinery/pkg/api/meta" @@ -45,14 +46,14 @@ func (a APIObjectVersioner) UpdateObject(obj runtime.Object, resourceVersion uin // UpdateList implements Versioner func (a APIObjectVersioner) UpdateList(obj runtime.Object, resourceVersion uint64, nextKey string, count *int64) error { + if resourceVersion == 0 { + return fmt.Errorf("illegal resource version from storage: %d", resourceVersion) + } listAccessor, err := meta.ListAccessor(obj) if err != nil || listAccessor == nil { return err } - versionString := "" - if resourceVersion != 0 { - versionString = strconv.FormatUint(resourceVersion, 10) - } + versionString := strconv.FormatUint(resourceVersion, 10) listAccessor.SetResourceVersion(versionString) listAccessor.SetContinue(nextKey) listAccessor.SetRemainingItemCount(count) diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/compact.go b/vendor/k8s.io/apiserver/pkg/storage/etcd3/compact.go index bbae59153bf..1f97a5a77b8 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/compact.go +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/compact.go @@ -23,7 +23,7 @@ import ( "time" "go.etcd.io/etcd/clientv3" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/logger.go b/vendor/k8s.io/apiserver/pkg/storage/etcd3/logger.go index f2cf0e1b26c..e8a73082c98 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/logger.go +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/logger.go @@ -20,7 +20,7 @@ import ( "fmt" "go.etcd.io/etcd/clientv3" - "k8s.io/klog" + "k8s.io/klog/v2" ) func init() { @@ -80,5 +80,5 @@ func (klogWrapper) Fatalf(format string, args ...interface{}) { } func (klogWrapper) V(l int) bool { - return bool(klog.V(klog.Level(l))) + return bool(klog.V(klog.Level(l)).Enabled()) } diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go b/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go index 8dd6462b071..a0de7e18cec 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go @@ -49,6 +49,14 @@ var ( }, []string{"resource"}, ) + dbTotalSize = compbasemetrics.NewGaugeVec( + &compbasemetrics.GaugeOpts{ + Name: "etcd_db_total_size_in_bytes", + Help: "Total size of the etcd database file physically allocated in bytes.", + StabilityLevel: compbasemetrics.ALPHA, + }, + []string{"endpoint"}, + ) ) var registerMetrics sync.Once @@ -59,6 +67,7 @@ func Register() { registerMetrics.Do(func() { legacyregistry.MustRegister(etcdRequestLatency) legacyregistry.MustRegister(objectCounts) + legacyregistry.MustRegister(dbTotalSize) }) } @@ -81,3 +90,8 @@ func Reset() { func sinceInSeconds(start time.Time) float64 { return time.Since(start).Seconds() } + +// UpdateEtcdDbSize sets the etcd_db_total_size_in_bytes metric. +func UpdateEtcdDbSize(ep string, size int64) { + dbTotalSize.WithLabelValues(ep).Set(float64(size)) +} diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go b/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go index ae475429846..4ba5c70c7a9 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -32,6 +32,8 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" @@ -41,7 +43,7 @@ import ( "k8s.io/apiserver/pkg/storage/etcd3/metrics" "k8s.io/apiserver/pkg/storage/value" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" utiltrace "k8s.io/utils/trace" ) @@ -62,10 +64,7 @@ func (d authenticatedDataString) AuthenticatedData() []byte { var _ value.Context = authenticatedDataString("") type store struct { - client *clientv3.Client - // getOpts contains additional options that should be passed - // to all Get() calls. - getOps []clientv3.OpOption + client *clientv3.Client codec runtime.Codec versioner storage.Versioner transformer value.Transformer @@ -112,20 +111,20 @@ func (s *store) Versioner() storage.Versioner { } // Get implements storage.Interface.Get. -func (s *store) Get(ctx context.Context, key string, resourceVersion string, out runtime.Object, ignoreNotFound bool) error { +func (s *store) Get(ctx context.Context, key string, opts storage.GetOptions, out runtime.Object) error { key = path.Join(s.pathPrefix, key) startTime := time.Now() - getResp, err := s.client.KV.Get(ctx, key, s.getOps...) + getResp, err := s.client.KV.Get(ctx, key) metrics.RecordEtcdRequestLatency("get", getTypeName(out), startTime) if err != nil { return err } - if err = s.ensureMinimumResourceVersion(resourceVersion, uint64(getResp.Header.Revision)); err != nil { + if err = s.validateMinimumResourceVersion(opts.ResourceVersion, uint64(getResp.Header.Revision)); err != nil { return err } if len(getResp.Kvs) == 0 { - if ignoreNotFound { + if opts.IgnoreNotFound { return runtime.SetZeroValue(out) } return storage.NewKeyNotFoundError(key, 0) @@ -251,7 +250,7 @@ func (s *store) GuaranteedUpdate( getCurrentState := func() (*objState, error) { startTime := time.Now() - getResp, err := s.client.KV.Get(ctx, key, s.getOps...) + getResp, err := s.client.KV.Get(ctx, key) metrics.RecordEtcdRequestLatency("get", getTypeName(out), startTime) if err != nil { return nil, err @@ -379,10 +378,14 @@ func (s *store) GuaranteedUpdate( } // GetToList implements storage.Interface.GetToList. -func (s *store) GetToList(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate, listObj runtime.Object) error { +func (s *store) GetToList(ctx context.Context, key string, listOpts storage.ListOptions, listObj runtime.Object) error { + resourceVersion := listOpts.ResourceVersion + match := listOpts.ResourceVersionMatch + pred := listOpts.Predicate trace := utiltrace.New("GetToList etcd3", utiltrace.Field{"key", key}, utiltrace.Field{"resourceVersion", resourceVersion}, + utiltrace.Field{"resourceVersionMatch", match}, utiltrace.Field{"limit", pred.Limit}, utiltrace.Field{"continue", pred.Continue}) defer trace.LogIfLong(500 * time.Millisecond) @@ -399,12 +402,21 @@ func (s *store) GetToList(ctx context.Context, key string, resourceVersion strin key = path.Join(s.pathPrefix, key) startTime := time.Now() - getResp, err := s.client.KV.Get(ctx, key, s.getOps...) + var opts []clientv3.OpOption + if len(resourceVersion) > 0 && match == metav1.ResourceVersionMatchExact { + rv, err := s.versioner.ParseResourceVersion(resourceVersion) + if err != nil { + return apierrors.NewBadRequest(fmt.Sprintf("invalid resource version: %v", err)) + } + opts = append(opts, clientv3.WithRev(int64(rv))) + } + + getResp, err := s.client.KV.Get(ctx, key, opts...) metrics.RecordEtcdRequestLatency("get", getTypeName(listPtr), startTime) if err != nil { return err } - if err = s.ensureMinimumResourceVersion(resourceVersion, uint64(getResp.Header.Revision)); err != nil { + if err = s.validateMinimumResourceVersion(resourceVersion, uint64(getResp.Header.Revision)); err != nil { return err } @@ -510,10 +522,14 @@ func encodeContinue(key, keyPrefix string, resourceVersion int64) (string, error } // List implements storage.Interface.List. -func (s *store) List(ctx context.Context, key, resourceVersion string, pred storage.SelectionPredicate, listObj runtime.Object) error { +func (s *store) List(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { + resourceVersion := opts.ResourceVersion + match := opts.ResourceVersionMatch + pred := opts.Predicate trace := utiltrace.New("List etcd3", utiltrace.Field{"key", key}, utiltrace.Field{"resourceVersion", resourceVersion}, + utiltrace.Field{"resourceVersionMatch", match}, utiltrace.Field{"limit", pred.Limit}, utiltrace.Field{"continue", pred.Continue}) defer trace.LogIfLong(500 * time.Millisecond) @@ -547,7 +563,16 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor newItemFunc := getNewItemFunc(listObj, v) - var returnedRV, continueRV int64 + var fromRV *uint64 + if len(resourceVersion) > 0 { + parsedRV, err := s.versioner.ParseResourceVersion(resourceVersion) + if err != nil { + return apierrors.NewBadRequest(fmt.Sprintf("invalid resource version: %v", err)) + } + fromRV = &parsedRV + } + + var returnedRV, continueRV, withRev int64 var continueKey string switch { case s.pagingEnabled && len(pred.Continue) > 0: @@ -568,27 +593,50 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor // continueRV==0 is invalid. // If continueRV < 0, the request is for the latest resource version. if continueRV > 0 { - options = append(options, clientv3.WithRev(continueRV)) + withRev = continueRV returnedRV = continueRV } case s.pagingEnabled && pred.Limit > 0: - if len(resourceVersion) > 0 { - fromRV, err := s.versioner.ParseResourceVersion(resourceVersion) - if err != nil { - return apierrors.NewBadRequest(fmt.Sprintf("invalid resource version: %v", err)) + if fromRV != nil { + switch match { + case metav1.ResourceVersionMatchNotOlderThan: + // The not older than constraint is checked after we get a response from etcd, + // and returnedRV is then set to the revision we get from the etcd response. + case metav1.ResourceVersionMatchExact: + returnedRV = int64(*fromRV) + withRev = returnedRV + case "": // legacy case + if *fromRV > 0 { + returnedRV = int64(*fromRV) + withRev = returnedRV + } + default: + return fmt.Errorf("unknown ResourceVersionMatch value: %v", match) } - if fromRV > 0 { - options = append(options, clientv3.WithRev(int64(fromRV))) - } - returnedRV = int64(fromRV) } rangeEnd := clientv3.GetPrefixRangeEnd(keyPrefix) options = append(options, clientv3.WithRange(rangeEnd)) - default: + if fromRV != nil { + switch match { + case metav1.ResourceVersionMatchNotOlderThan: + // The not older than constraint is checked after we get a response from etcd, + // and returnedRV is then set to the revision we get from the etcd response. + case metav1.ResourceVersionMatchExact: + returnedRV = int64(*fromRV) + withRev = returnedRV + case "": // legacy case + default: + return fmt.Errorf("unknown ResourceVersionMatch value: %v", match) + } + } + options = append(options, clientv3.WithPrefix()) } + if withRev != 0 { + options = append(options, clientv3.WithRev(withRev)) + } // loop until we have filled the requested limit from etcd or there are no more results var lastKey []byte @@ -601,7 +649,7 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor if err != nil { return interpretListError(err, len(pred.Continue) > 0, continueKey, keyPrefix) } - if err = s.ensureMinimumResourceVersion(resourceVersion, uint64(getResp.Header.Revision)); err != nil { + if err = s.validateMinimumResourceVersion(resourceVersion, uint64(getResp.Header.Revision)); err != nil { return err } hasMore = getResp.More @@ -654,6 +702,10 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor break } key = string(lastKey) + "\x00" + if withRev == 0 { + withRev = returnedRV + options = append(options, clientv3.WithRev(withRev)) + } } // instruct the client to begin querying from immediately after the last key we returned @@ -713,22 +765,22 @@ func growSlice(v reflect.Value, maxCapacity int, sizes ...int) { } // Watch implements storage.Interface.Watch. -func (s *store) Watch(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate) (watch.Interface, error) { - return s.watch(ctx, key, resourceVersion, pred, false) +func (s *store) Watch(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { + return s.watch(ctx, key, opts, false) } // WatchList implements storage.Interface.WatchList. -func (s *store) WatchList(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate) (watch.Interface, error) { - return s.watch(ctx, key, resourceVersion, pred, true) +func (s *store) WatchList(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { + return s.watch(ctx, key, opts, true) } -func (s *store) watch(ctx context.Context, key string, rv string, pred storage.SelectionPredicate, recursive bool) (watch.Interface, error) { - rev, err := s.versioner.ParseResourceVersion(rv) +func (s *store) watch(ctx context.Context, key string, opts storage.ListOptions, recursive bool) (watch.Interface, error) { + rev, err := s.versioner.ParseResourceVersion(opts.ResourceVersion) if err != nil { return nil, err } key = path.Join(s.pathPrefix, key) - return s.watcher.Watch(ctx, key, int64(rev), recursive, pred) + return s.watcher.Watch(ctx, key, int64(rev), recursive, opts.Predicate) } func (s *store) getState(getResp *clientv3.GetResponse, key string, v reflect.Value, ignoreNotFound bool) (*objState, error) { @@ -822,9 +874,9 @@ func (s *store) ttlOpts(ctx context.Context, ttl int64) ([]clientv3.OpOption, er return []clientv3.OpOption{clientv3.WithLease(id)}, nil } -// ensureMinimumResourceVersion returns a 'too large resource' version error when the provided minimumResourceVersion is +// validateMinimumResourceVersion returns a 'too large resource' version error when the provided minimumResourceVersion is // greater than the most recent actualRevision available from storage. -func (s *store) ensureMinimumResourceVersion(minimumResourceVersion string, actualRevision uint64) error { +func (s *store) validateMinimumResourceVersion(minimumResourceVersion string, actualRevision uint64) error { if minimumResourceVersion == "" { return nil } diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go b/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go index ca1583fb379..793495f3e08 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go @@ -32,7 +32,7 @@ import ( "k8s.io/apiserver/pkg/storage/value" "go.etcd.io/etcd/clientv3" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -126,7 +126,15 @@ func (w *watcher) createWatchChan(ctx context.Context, key string, rev int64, re // The filter doesn't filter out any object. wc.internalPred = storage.Everything } - wc.ctx, wc.cancel = context.WithCancel(ctx) + + // The etcd server waits until it cannot find a leader for 3 election + // timeouts to cancel existing streams. 3 is currently a hard coded + // constant. The election timeout defaults to 1000ms. If the cluster is + // healthy, when the leader is stopped, the leadership transfer should be + // smooth. (leader transfers its leadership before stopping). If leader is + // hard killed, other servers will take an election timeout to realize + // leader lost and start campaign. + wc.ctx, wc.cancel = context.WithCancel(clientv3.WithRequireLeader(ctx)) return wc } @@ -253,8 +261,7 @@ func (wc *watchChan) processEvent(wg *sync.WaitGroup) { continue } if len(wc.resultChan) == outgoingBufSize { - klog.V(3).Infof("Fast watcher, slow processing. Number of buffered events: %d."+ - "Probably caused by slow dispatching events to watchers", outgoingBufSize) + klog.V(3).InfoS("Fast watcher, slow processing. Probably caused by slow dispatching events to watchers", "outgoingEvents", outgoingBufSize) } // If user couldn't receive results fast enough, we also block incoming events from watcher. // Because storing events in local will cause more memory usage. @@ -360,9 +367,7 @@ func (wc *watchChan) sendError(err error) { func (wc *watchChan) sendEvent(e *event) { if len(wc.incomingEventChan) == incomingBufSize { - klog.V(3).Infof("Fast watcher, slow processing. Number of buffered events: %d."+ - "Probably caused by slow decoding, user not receiving fast, or other processing logic", - incomingBufSize) + klog.V(3).InfoS("Fast watcher, slow processing. Probably caused by slow decoding, user not receiving fast, or other processing logic", "incomingEvents", incomingBufSize) } select { case wc.incomingEventChan <- e: diff --git a/vendor/k8s.io/apiserver/pkg/storage/interfaces.go b/vendor/k8s.io/apiserver/pkg/storage/interfaces.go index 31d4b2a2859..fb30020803e 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/interfaces.go +++ b/vendor/k8s.io/apiserver/pkg/storage/interfaces.go @@ -21,6 +21,7 @@ import ( "fmt" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" @@ -175,7 +176,7 @@ type Interface interface { // (e.g. reconnecting without missing any updates). // If resource version is "0", this interface will get current object at given key // and send it in an "ADDED" event, before watch starts. - Watch(ctx context.Context, key string, resourceVersion string, p SelectionPredicate) (watch.Interface, error) + Watch(ctx context.Context, key string, opts ListOptions) (watch.Interface, error) // WatchList begins watching the specified key's items. Items are decoded into API // objects and any item selected by 'p' are sent down to returned watch.Interface. @@ -184,26 +185,26 @@ type Interface interface { // (e.g. reconnecting without missing any updates). // If resource version is "0", this interface will list current objects directory defined by key // and send them in "ADDED" events, before watch starts. - WatchList(ctx context.Context, key string, resourceVersion string, p SelectionPredicate) (watch.Interface, error) + WatchList(ctx context.Context, key string, opts ListOptions) (watch.Interface, error) // Get unmarshals json found at key into objPtr. On a not found error, will either - // return a zero object of the requested type, or an error, depending on ignoreNotFound. + // return a zero object of the requested type, or an error, depending on 'opts.ignoreNotFound'. // Treats empty responses and nil response nodes exactly like a not found error. // The returned contents may be delayed, but it is guaranteed that they will - // be have at least 'resourceVersion'. - Get(ctx context.Context, key string, resourceVersion string, objPtr runtime.Object, ignoreNotFound bool) error + // match 'opts.ResourceVersion' according 'opts.ResourceVersionMatch'. + Get(ctx context.Context, key string, opts GetOptions, objPtr runtime.Object) error // GetToList unmarshals json found at key and opaque it into *List api object // (an object that satisfies the runtime.IsList definition). // The returned contents may be delayed, but it is guaranteed that they will - // be have at least 'resourceVersion'. - GetToList(ctx context.Context, key string, resourceVersion string, p SelectionPredicate, listObj runtime.Object) error + // match 'opts.ResourceVersion' according 'opts.ResourceVersionMatch'. + GetToList(ctx context.Context, key string, opts ListOptions, listObj runtime.Object) error // List unmarshalls jsons found at directory defined by key and opaque them // into *List api object (an object that satisfies runtime.IsList definition). // The returned contents may be delayed, but it is guaranteed that they will - // be have at least 'resourceVersion'. - List(ctx context.Context, key string, resourceVersion string, p SelectionPredicate, listObj runtime.Object) error + // match 'opts.ResourceVersion' according 'opts.ResourceVersionMatch'. + List(ctx context.Context, key string, opts ListOptions, listObj runtime.Object) error // GuaranteedUpdate keeps calling 'tryUpdate()' to update key 'key' (of type 'ptrToType') // retrying the update until success if there is index conflict. @@ -243,3 +244,29 @@ type Interface interface { // Count returns number of different entries under the key (generally being path prefix). Count(key string) (int64, error) } + +// GetOptions provides the options that may be provided for storage get operations. +type GetOptions struct { + // IgnoreNotFound determines what is returned if the requested object is not found. If + // true, a zero object is returned. If false, an error is returned. + IgnoreNotFound bool + // ResourceVersion provides a resource version constraint to apply to the get operation + // as a "not older than" constraint: the result contains data at least as new as the provided + // ResourceVersion. The newest available data is preferred, but any data not older than this + // ResourceVersion may be served. + ResourceVersion string +} + +// ListOptions provides the options that may be provided for storage list operations. +type ListOptions struct { + // ResourceVersion provides a resource version constraint to apply to the list operation + // as a "not older than" constraint: the result contains data at least as new as the provided + // ResourceVersion. The newest available data is preferred, but any data not older than this + // ResourceVersion may be served. + ResourceVersion string + // ResourceVersionMatch provides the rule for how the resource version constraint applies. If set + // to the default value "" the legacy resource version semantic apply. + ResourceVersionMatch metav1.ResourceVersionMatch + // Predicate provides the selection rules for the list operation. + Predicate SelectionPredicate +} diff --git a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/config.go b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/config.go index cbf50b2112a..5dc0bbfb349 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/config.go +++ b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/config.go @@ -28,7 +28,8 @@ const ( StorageTypeUnset = "" StorageTypeETCD3 = "etcd3" - DefaultCompactInterval = 5 * time.Minute + DefaultCompactInterval = 5 * time.Minute + DefaultDBMetricPollInterval = 30 * time.Second ) // TransportConfig holds all connection related info, i.e. equal TransportConfig means equal servers we talk to. @@ -71,13 +72,16 @@ type Config struct { CompactionInterval time.Duration // CountMetricPollPeriod specifies how often should count metric be updated CountMetricPollPeriod time.Duration + // DBMetricPollInterval specifies how often should storage backend metric be updated. + DBMetricPollInterval time.Duration } func NewDefaultConfig(prefix string, codec runtime.Codec) *Config { return &Config{ - Paging: true, - Prefix: prefix, - Codec: codec, - CompactionInterval: DefaultCompactInterval, + Paging: true, + Prefix: prefix, + Codec: codec, + CompactionInterval: DefaultCompactInterval, + DBMetricPollInterval: DefaultDBMetricPollInterval, } } diff --git a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD index 594c1d396ee..b7cdcfe31b8 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD +++ b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD @@ -39,6 +39,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/server/egressselector:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/etcd3:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", @@ -46,6 +47,7 @@ go_library( "//vendor/go.etcd.io/etcd/clientv3:go_default_library", "//vendor/go.etcd.io/etcd/pkg/transport:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go index 81a24825b9e..26067633e58 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go +++ b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go @@ -36,20 +36,26 @@ import ( "k8s.io/apiserver/pkg/server/egressselector" "k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage/etcd3" + "k8s.io/apiserver/pkg/storage/etcd3/metrics" "k8s.io/apiserver/pkg/storage/storagebackend" "k8s.io/apiserver/pkg/storage/value" "k8s.io/component-base/metrics/legacyregistry" + "k8s.io/klog/v2" ) -// The short keepalive timeout and interval have been chosen to aggressively -// detect a failed etcd server without introducing much overhead. -const keepaliveTime = 30 * time.Second -const keepaliveTimeout = 10 * time.Second +const ( + // The short keepalive timeout and interval have been chosen to aggressively + // detect a failed etcd server without introducing much overhead. + keepaliveTime = 30 * time.Second + keepaliveTimeout = 10 * time.Second -// dialTimeout is the timeout for failing to establish a connection. -// It is set to 20 seconds as times shorter than that will cause TLS connections to fail -// on heavily loaded arm64 CPUs (issue #64649) -const dialTimeout = 20 * time.Second + // dialTimeout is the timeout for failing to establish a connection. + // It is set to 20 seconds as times shorter than that will cause TLS connections to fail + // on heavily loaded arm64 CPUs (issue #64649) + dialTimeout = 20 * time.Second + + dbMetricsMonitorJitter = 0.5 +) func init() { // grpcprom auto-registers (via an init function) their client metrics, since we are opting out of @@ -57,6 +63,7 @@ func init() { // we need to explicitly register these metrics to our global registry here. // For reference: https://github.com/kubernetes/kubernetes/pull/81387 legacyregistry.RawMustRegister(grpcprom.DefaultClientMetrics) + dbMetricsMonitors = make(map[string]struct{}) } func newETCD3HealthCheck(c storagebackend.Config) (func() error, error) { @@ -153,16 +160,20 @@ type runningCompactor struct { } var ( - lock sync.Mutex - compactors = map[string]*runningCompactor{} + // compactorsMu guards access to compactors map + compactorsMu sync.Mutex + compactors = map[string]*runningCompactor{} + // dbMetricsMonitorsMu guards access to dbMetricsMonitors map + dbMetricsMonitorsMu sync.Mutex + dbMetricsMonitors map[string]struct{} ) // startCompactorOnce start one compactor per transport. If the interval get smaller on repeated calls, the // compactor is replaced. A destroy func is returned. If all destroy funcs with the same transport are called, // the compactor is stopped. func startCompactorOnce(c storagebackend.TransportConfig, interval time.Duration) (func(), error) { - lock.Lock() - defer lock.Unlock() + compactorsMu.Lock() + defer compactorsMu.Unlock() key := fmt.Sprintf("%v", c) // gives: {[server1 server2] keyFile certFile caFile} if compactor, foundBefore := compactors[key]; !foundBefore || compactor.interval > interval { @@ -193,8 +204,8 @@ func startCompactorOnce(c storagebackend.TransportConfig, interval time.Duration compactors[key].refs++ return func() { - lock.Lock() - defer lock.Unlock() + compactorsMu.Lock() + defer compactorsMu.Unlock() compactor := compactors[key] compactor.refs-- @@ -218,6 +229,11 @@ func newETCD3Storage(c storagebackend.Config) (storage.Interface, DestroyFunc, e return nil, nil, err } + stopDBSizeMonitor, err := startDBSizeMonitorPerEndpoint(client, c.DBMetricPollInterval) + if err != nil { + return nil, nil, err + } + var once sync.Once destroyFunc := func() { // we know that storage destroy funcs are called multiple times (due to reuse in subresources). @@ -225,6 +241,7 @@ func newETCD3Storage(c storagebackend.Config) (storage.Interface, DestroyFunc, e // TODO: fix duplicated storage destroy calls higher level once.Do(func() { stopCompactor() + stopDBSizeMonitor() client.Close() }) } @@ -234,3 +251,36 @@ func newETCD3Storage(c storagebackend.Config) (storage.Interface, DestroyFunc, e } return etcd3.New(client, c.Codec, c.Prefix, transformer, c.Paging), destroyFunc, nil } + +// startDBSizeMonitorPerEndpoint starts a loop to monitor etcd database size and update the +// corresponding metric etcd_db_total_size_in_bytes for each etcd server endpoint. +func startDBSizeMonitorPerEndpoint(client *clientv3.Client, interval time.Duration) (func(), error) { + if interval == 0 { + return func() {}, nil + } + dbMetricsMonitorsMu.Lock() + defer dbMetricsMonitorsMu.Unlock() + + ctx, cancel := context.WithCancel(context.Background()) + for _, ep := range client.Endpoints() { + if _, found := dbMetricsMonitors[ep]; found { + continue + } + dbMetricsMonitors[ep] = struct{}{} + endpoint := ep + klog.V(4).Infof("Start monitoring storage db size metric for endpoint %s with polling interval %v", endpoint, interval) + go wait.JitterUntilWithContext(ctx, func(context.Context) { + epStatus, err := client.Maintenance.Status(ctx, endpoint) + if err != nil { + klog.V(4).Infof("Failed to get storage db size for ep %s: %v", endpoint, err) + metrics.UpdateEtcdDbSize(endpoint, -1) + } else { + metrics.UpdateEtcdDbSize(endpoint, epStatus.DbSize) + } + }, interval, dbMetricsMonitorJitter, true) + } + + return func() { + cancel() + }, nil +} diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD b/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD index 9a7de12b107..a2307920c08 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD +++ b/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/BUILD @@ -23,7 +23,7 @@ go_library( "//vendor/github.com/hashicorp/golang-lru:go_default_library", "//vendor/golang.org/x/crypto/cryptobyte:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -38,6 +38,10 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/storage/value:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/aes:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", @@ -54,10 +58,18 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing:go_default_library", diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service.go b/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service.go index d401821c8de..7aa5d232f8a 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service.go +++ b/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service.go @@ -26,7 +26,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "google.golang.org/grpc" diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/BUILD b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/BUILD index 2f6a55b5103..12a9c16e91c 100644 --- a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/BUILD +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/BUILD @@ -4,6 +4,7 @@ go_library( name = "go_default_library", srcs = [ "apf_controller.go", + "apf_controller_debug.go", "apf_filter.go", "formatting.go", "rule.go", @@ -16,14 +17,17 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/server/mux:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/apihelpers:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/counter:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing:go_default_library", @@ -36,7 +40,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//vendor/github.com/pkg/errors:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -52,6 +56,7 @@ filegroup( srcs = [ ":package-srcs", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/counter:all-srcs", + "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/debug:all-srcs", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing:all-srcs", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/format:all-srcs", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics:all-srcs", @@ -76,12 +81,14 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/debug:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/format:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go index 6e3280a0559..50eb3327216 100644 --- a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go @@ -45,7 +45,7 @@ import ( kubeinformers "k8s.io/client-go/informers" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" fctypesv1a1 "k8s.io/api/flowcontrol/v1alpha1" fcclientv1a1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" @@ -84,7 +84,8 @@ type RequestDigest struct { // this type and cfgMeal follow the convention that the suffix // "Locked" means that the caller must hold the configController lock. type configController struct { - queueSetFactory fq.QueueSetFactory + queueSetFactory fq.QueueSetFactory + obsPairGenerator metrics.TimedObserverPairGenerator // configQueue holds `(interface{})(0)` when the configuration // objects need to be reprocessed. @@ -144,6 +145,9 @@ type priorityLevelState struct { // number of goroutines between Controller::Match and calling the // returned StartFunction numPending int + + // Observers tracking number waiting, executing + obsPair metrics.TimedObserverPair } // NewTestableController is extra flexible to facilitate testing @@ -152,104 +156,123 @@ func newTestableController( flowcontrolClient fcclientv1a1.FlowcontrolV1alpha1Interface, serverConcurrencyLimit int, requestWaitLimit time.Duration, + obsPairGenerator metrics.TimedObserverPairGenerator, queueSetFactory fq.QueueSetFactory, ) *configController { - cfgCtl := &configController{ + cfgCtlr := &configController{ queueSetFactory: queueSetFactory, + obsPairGenerator: obsPairGenerator, serverConcurrencyLimit: serverConcurrencyLimit, requestWaitLimit: requestWaitLimit, flowcontrolClient: flowcontrolClient, priorityLevelStates: make(map[string]*priorityLevelState), } klog.V(2).Infof("NewTestableController with serverConcurrencyLimit=%d, requestWaitLimit=%s", serverConcurrencyLimit, requestWaitLimit) - cfgCtl.initializeConfigController(informerFactory) + cfgCtlr.initializeConfigController(informerFactory) // ensure the data structure reflects the mandatory config - cfgCtl.lockAndDigestConfigObjects(nil, nil) - return cfgCtl + cfgCtlr.lockAndDigestConfigObjects(nil, nil) + return cfgCtlr } // initializeConfigController sets up the controller that processes // config API objects. -func (cfgCtl *configController) initializeConfigController(informerFactory kubeinformers.SharedInformerFactory) { - cfgCtl.configQueue = workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(200*time.Millisecond, 8*time.Hour), "priority_and_fairness_config_queue") +func (cfgCtlr *configController) initializeConfigController(informerFactory kubeinformers.SharedInformerFactory) { + cfgCtlr.configQueue = workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(200*time.Millisecond, 8*time.Hour), "priority_and_fairness_config_queue") fci := informerFactory.Flowcontrol().V1alpha1() pli := fci.PriorityLevelConfigurations() fsi := fci.FlowSchemas() - cfgCtl.plLister = pli.Lister() - cfgCtl.plInformerSynced = pli.Informer().HasSynced - cfgCtl.fsLister = fsi.Lister() - cfgCtl.fsInformerSynced = fsi.Informer().HasSynced + cfgCtlr.plLister = pli.Lister() + cfgCtlr.plInformerSynced = pli.Informer().HasSynced + cfgCtlr.fsLister = fsi.Lister() + cfgCtlr.fsInformerSynced = fsi.Informer().HasSynced pli.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { pl := obj.(*fctypesv1a1.PriorityLevelConfiguration) klog.V(7).Infof("Triggered API priority and fairness config reloading due to creation of PLC %s", pl.Name) - cfgCtl.configQueue.Add(0) + cfgCtlr.configQueue.Add(0) }, UpdateFunc: func(oldObj, newObj interface{}) { newPL := newObj.(*fctypesv1a1.PriorityLevelConfiguration) oldPL := oldObj.(*fctypesv1a1.PriorityLevelConfiguration) if !apiequality.Semantic.DeepEqual(oldPL.Spec, newPL.Spec) { klog.V(7).Infof("Triggered API priority and fairness config reloading due to spec update of PLC %s", newPL.Name) - cfgCtl.configQueue.Add(0) + cfgCtlr.configQueue.Add(0) } }, DeleteFunc: func(obj interface{}) { name, _ := cache.DeletionHandlingMetaNamespaceKeyFunc(obj) klog.V(7).Infof("Triggered API priority and fairness config reloading due to deletion of PLC %s", name) - cfgCtl.configQueue.Add(0) + cfgCtlr.configQueue.Add(0) }}) fsi.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { fs := obj.(*fctypesv1a1.FlowSchema) klog.V(7).Infof("Triggered API priority and fairness config reloading due to creation of FS %s", fs.Name) - cfgCtl.configQueue.Add(0) + cfgCtlr.configQueue.Add(0) }, UpdateFunc: func(oldObj, newObj interface{}) { newFS := newObj.(*fctypesv1a1.FlowSchema) oldFS := oldObj.(*fctypesv1a1.FlowSchema) if !apiequality.Semantic.DeepEqual(oldFS.Spec, newFS.Spec) { klog.V(7).Infof("Triggered API priority and fairness config reloading due to spec update of FS %s", newFS.Name) - cfgCtl.configQueue.Add(0) + cfgCtlr.configQueue.Add(0) } }, DeleteFunc: func(obj interface{}) { name, _ := cache.DeletionHandlingMetaNamespaceKeyFunc(obj) klog.V(7).Infof("Triggered API priority and fairness config reloading due to deletion of FS %s", name) - cfgCtl.configQueue.Add(0) + cfgCtlr.configQueue.Add(0) }}) } -func (cfgCtl *configController) Run(stopCh <-chan struct{}) error { - defer cfgCtl.configQueue.ShutDown() +// MaintainObservations keeps the observers from +// metrics.PriorityLevelConcurrencyObserverPairGenerator from falling +// too far behind +func (cfgCtlr *configController) MaintainObservations(stopCh <-chan struct{}) { + wait.Until(cfgCtlr.updateObservations, 10*time.Second, stopCh) +} + +func (cfgCtlr *configController) updateObservations() { + cfgCtlr.lock.Lock() + defer cfgCtlr.lock.Unlock() + for _, plc := range cfgCtlr.priorityLevelStates { + if plc.queues != nil { + plc.queues.UpdateObservations() + } + } +} + +func (cfgCtlr *configController) Run(stopCh <-chan struct{}) error { + defer cfgCtlr.configQueue.ShutDown() klog.Info("Starting API Priority and Fairness config controller") - if ok := cache.WaitForCacheSync(stopCh, cfgCtl.plInformerSynced, cfgCtl.fsInformerSynced); !ok { + if ok := cache.WaitForCacheSync(stopCh, cfgCtlr.plInformerSynced, cfgCtlr.fsInformerSynced); !ok { return fmt.Errorf("Never achieved initial sync") } klog.Info("Running API Priority and Fairness config worker") - wait.Until(cfgCtl.runWorker, time.Second, stopCh) + wait.Until(cfgCtlr.runWorker, time.Second, stopCh) klog.Info("Shutting down API Priority and Fairness config worker") return nil } -func (cfgCtl *configController) runWorker() { - for cfgCtl.processNextWorkItem() { +func (cfgCtlr *configController) runWorker() { + for cfgCtlr.processNextWorkItem() { } } -func (cfgCtl *configController) processNextWorkItem() bool { - obj, shutdown := cfgCtl.configQueue.Get() +func (cfgCtlr *configController) processNextWorkItem() bool { + obj, shutdown := cfgCtlr.configQueue.Get() if shutdown { return false } func(obj interface{}) { - defer cfgCtl.configQueue.Done(obj) - if !cfgCtl.syncOne() { - cfgCtl.configQueue.AddRateLimited(obj) + defer cfgCtlr.configQueue.Done(obj) + if !cfgCtlr.syncOne() { + cfgCtlr.configQueue.AddRateLimited(obj) } else { - cfgCtl.configQueue.Forget(obj) + cfgCtlr.configQueue.Forget(obj) } }(obj) @@ -259,19 +282,19 @@ func (cfgCtl *configController) processNextWorkItem() bool { // syncOne attempts to sync all the API Priority and Fairness config // objects. It either succeeds and returns `true` or logs an error // and returns `false`. -func (cfgCtl *configController) syncOne() bool { +func (cfgCtlr *configController) syncOne() bool { all := labels.Everything() - newPLs, err := cfgCtl.plLister.List(all) + newPLs, err := cfgCtlr.plLister.List(all) if err != nil { klog.Errorf("Unable to list PriorityLevelConfiguration objects: %s", err.Error()) return false } - newFSs, err := cfgCtl.fsLister.List(all) + newFSs, err := cfgCtlr.fsLister.List(all) if err != nil { klog.Errorf("Unable to list FlowSchema objects: %s", err.Error()) return false } - err = cfgCtl.digestConfigObjects(newPLs, newFSs) + err = cfgCtlr.digestConfigObjects(newPLs, newFSs) if err == nil { return true } @@ -288,7 +311,7 @@ func (cfgCtl *configController) syncOne() bool { // FlowSchemas --- with the work dvided among the passes according to // those dependencies. type cfgMeal struct { - cfgCtl *configController + cfgCtlr *configController newPLStates map[string]*priorityLevelState @@ -315,9 +338,9 @@ type fsStatusUpdate struct { } // digestConfigObjects is given all the API objects that configure -// cfgCtl and writes its consequent new configState. -func (cfgCtl *configController) digestConfigObjects(newPLs []*fctypesv1a1.PriorityLevelConfiguration, newFSs []*fctypesv1a1.FlowSchema) error { - fsStatusUpdates := cfgCtl.lockAndDigestConfigObjects(newPLs, newFSs) +// cfgCtlr and writes its consequent new configState. +func (cfgCtlr *configController) digestConfigObjects(newPLs []*fctypesv1a1.PriorityLevelConfiguration, newFSs []*fctypesv1a1.FlowSchema) error { + fsStatusUpdates := cfgCtlr.lockAndDigestConfigObjects(newPLs, newFSs) var errs []error for _, fsu := range fsStatusUpdates { enc, err := json.Marshal(fsu.condition) @@ -326,7 +349,7 @@ func (cfgCtl *configController) digestConfigObjects(newPLs []*fctypesv1a1.Priori panic(fmt.Sprintf("Failed to json.Marshall(%#+v): %s", fsu.condition, err.Error())) } klog.V(4).Infof("Writing Condition %s to FlowSchema %s because its previous value was %s", string(enc), fsu.flowSchema.Name, fcfmt.Fmt(fsu.oldValue)) - _, err = cfgCtl.flowcontrolClient.FlowSchemas().Patch(context.TODO(), fsu.flowSchema.Name, apitypes.StrategicMergePatchType, []byte(fmt.Sprintf(`{"status": {"conditions": [ %s ] } }`, string(enc))), metav1.PatchOptions{FieldManager: "api-priority-and-fairness-config-consumer-v1"}, "status") + _, err = cfgCtlr.flowcontrolClient.FlowSchemas().Patch(context.TODO(), fsu.flowSchema.Name, apitypes.StrategicMergePatchType, []byte(fmt.Sprintf(`{"status": {"conditions": [ %s ] } }`, string(enc))), metav1.PatchOptions{FieldManager: "api-priority-and-fairness-config-consumer-v1"}, "status") if err != nil { errs = append(errs, errors.Wrap(err, fmt.Sprintf("failed to set a status.condition for FlowSchema %s", fsu.flowSchema.Name))) } @@ -337,11 +360,11 @@ func (cfgCtl *configController) digestConfigObjects(newPLs []*fctypesv1a1.Priori return apierrors.NewAggregate(errs) } -func (cfgCtl *configController) lockAndDigestConfigObjects(newPLs []*fctypesv1a1.PriorityLevelConfiguration, newFSs []*fctypesv1a1.FlowSchema) []fsStatusUpdate { - cfgCtl.lock.Lock() - defer cfgCtl.lock.Unlock() +func (cfgCtlr *configController) lockAndDigestConfigObjects(newPLs []*fctypesv1a1.PriorityLevelConfiguration, newFSs []*fctypesv1a1.FlowSchema) []fsStatusUpdate { + cfgCtlr.lock.Lock() + defer cfgCtlr.lock.Unlock() meal := cfgMeal{ - cfgCtl: cfgCtl, + cfgCtlr: cfgCtlr, newPLStates: make(map[string]*priorityLevelState), } @@ -351,16 +374,16 @@ func (cfgCtl *configController) lockAndDigestConfigObjects(newPLs []*fctypesv1a1 // Supply missing mandatory PriorityLevelConfiguration objects if !meal.haveExemptPL { - meal.imaginePL(fcboot.MandatoryPriorityLevelConfigurationExempt, cfgCtl.requestWaitLimit) + meal.imaginePL(fcboot.MandatoryPriorityLevelConfigurationExempt, cfgCtlr.requestWaitLimit) } if !meal.haveCatchAllPL { - meal.imaginePL(fcboot.MandatoryPriorityLevelConfigurationCatchAll, cfgCtl.requestWaitLimit) + meal.imaginePL(fcboot.MandatoryPriorityLevelConfigurationCatchAll, cfgCtlr.requestWaitLimit) } meal.finishQueueSetReconfigsLocked() // The new config has been constructed - cfgCtl.priorityLevelStates = meal.newPLStates + cfgCtlr.priorityLevelStates = meal.newPLStates klog.V(5).Infof("Switched to new API Priority and Fairness configuration") return meal.fsStatusUpdates } @@ -369,11 +392,11 @@ func (cfgCtl *configController) lockAndDigestConfigObjects(newPLs []*fctypesv1a1 // Pretend broken ones do not exist. func (meal *cfgMeal) digestNewPLsLocked(newPLs []*fctypesv1a1.PriorityLevelConfiguration) { for _, pl := range newPLs { - state := meal.cfgCtl.priorityLevelStates[pl.Name] + state := meal.cfgCtlr.priorityLevelStates[pl.Name] if state == nil { - state = &priorityLevelState{} + state = &priorityLevelState{obsPair: meal.cfgCtlr.obsPairGenerator.Generate(1, 1, []string{pl.Name})} } - qsCompleter, err := qscOfPL(meal.cfgCtl.queueSetFactory, state.queues, pl, meal.cfgCtl.requestWaitLimit) + qsCompleter, err := queueSetCompleterForPL(meal.cfgCtlr.queueSetFactory, state.queues, pl, meal.cfgCtlr.requestWaitLimit, state.obsPair) if err != nil { klog.Warningf("Ignoring PriorityLevelConfiguration object %s because its spec (%s) is broken: %s", pl.Name, fcfmt.Fmt(pl.Spec), err) continue @@ -439,8 +462,8 @@ func (meal *cfgMeal) digestFlowSchemasLocked(newFSs []*fctypesv1a1.FlowSchema) { fsSeq = append(fsSeq, fcboot.MandatoryFlowSchemaCatchAll) } - meal.cfgCtl.flowSchemas = fsSeq - if klog.V(5) { + meal.cfgCtlr.flowSchemas = fsSeq + if klog.V(5).Enabled() { for _, fs := range fsSeq { klog.Infof("Using FlowSchema %s", fcfmt.Fmt(fs)) } @@ -453,7 +476,7 @@ func (meal *cfgMeal) digestFlowSchemasLocked(newFSs []*fctypesv1a1.FlowSchema) { // queues, otherwise start the quiescing process if that has not // already been started. func (meal *cfgMeal) processOldPLsLocked() { - for plName, plState := range meal.cfgCtl.priorityLevelStates { + for plName, plState := range meal.cfgCtlr.priorityLevelStates { if meal.newPLStates[plName] != nil { // Still desired and already updated continue @@ -476,9 +499,9 @@ func (meal *cfgMeal) processOldPLsLocked() { } } var err error - plState.qsCompleter, err = qscOfPL(meal.cfgCtl.queueSetFactory, plState.queues, plState.pl, meal.cfgCtl.requestWaitLimit) + plState.qsCompleter, err = queueSetCompleterForPL(meal.cfgCtlr.queueSetFactory, plState.queues, plState.pl, meal.cfgCtlr.requestWaitLimit, plState.obsPair) if err != nil { - // This can not happen because qscOfPL already approved this config + // This can not happen because queueSetCompleterForPL already approved this config panic(fmt.Sprintf("%s from name=%q spec=%s", err, plName, fcfmt.Fmt(plState.pl.Spec))) } if plState.pl.Spec.Limited != nil { @@ -509,7 +532,7 @@ func (meal *cfgMeal) finishQueueSetReconfigsLocked() { // The use of math.Ceil here means that the results might sum // to a little more than serverConcurrencyLimit but the // difference will be negligible. - concurrencyLimit := int(math.Ceil(float64(meal.cfgCtl.serverConcurrencyLimit) * float64(plState.pl.Spec.Limited.AssuredConcurrencyShares) / meal.shareSum)) + concurrencyLimit := int(math.Ceil(float64(meal.cfgCtlr.serverConcurrencyLimit) * float64(plState.pl.Spec.Limited.AssuredConcurrencyShares) / meal.shareSum)) metrics.UpdateSharedConcurrencyLimit(plName, concurrencyLimit) if plState.queues == nil { @@ -521,10 +544,11 @@ func (meal *cfgMeal) finishQueueSetReconfigsLocked() { } } -// qscOfPL returns a pointer to an appropriate QueuingConfig or nil -// if no limiting is called for. Returns nil and an error if the given +// queueSetCompleterForPL returns an appropriate QueueSetCompleter for the +// given priority level configuration. Returns nil if that config +// does not call for limiting. Returns nil and an error if the given // object is malformed in a way that is a problem for this package. -func qscOfPL(qsf fq.QueueSetFactory, queues fq.QueueSet, pl *fctypesv1a1.PriorityLevelConfiguration, requestWaitLimit time.Duration) (fq.QueueSetCompleter, error) { +func queueSetCompleterForPL(qsf fq.QueueSetFactory, queues fq.QueueSet, pl *fctypesv1a1.PriorityLevelConfiguration, requestWaitLimit time.Duration, intPair metrics.TimedObserverPair) (fq.QueueSetCompleter, error) { if (pl.Spec.Type == fctypesv1a1.PriorityLevelEnablementExempt) != (pl.Spec.Limited == nil) { return nil, errors.New("broken union structure at the top") } @@ -553,7 +577,7 @@ func qscOfPL(qsf fq.QueueSetFactory, queues fq.QueueSet, pl *fctypesv1a1.Priorit if queues != nil { qsc, err = queues.BeginConfigChange(qcQS) } else { - qsc, err = qsf.BeginConstruction(qcQS) + qsc, err = qsf.BeginConstruction(qcQS, intPair) } if err != nil { err = errors.Wrap(err, fmt.Sprintf("priority level %q has QueuingConfiguration %#+v, which is invalid", pl.Name, qcAPI)) @@ -594,9 +618,11 @@ func (meal *cfgMeal) presyncFlowSchemaStatus(fs *fctypesv1a1.FlowSchema, isDangl } // imaginePL adds a priority level based on one of the mandatory ones +// that does not actually exist (right now) as a real API object. func (meal *cfgMeal) imaginePL(proto *fctypesv1a1.PriorityLevelConfiguration, requestWaitLimit time.Duration) { klog.V(3).Infof("No %s PriorityLevelConfiguration found, imagining one", proto.Name) - qsCompleter, err := qscOfPL(meal.cfgCtl.queueSetFactory, nil, proto, requestWaitLimit) + obsPair := meal.cfgCtlr.obsPairGenerator.Generate(1, 1, []string{proto.Name}) + qsCompleter, err := queueSetCompleterForPL(meal.cfgCtlr.queueSetFactory, nil, proto, requestWaitLimit, obsPair) if err != nil { // This can not happen because proto is one of the mandatory // objects and these are not erroneous @@ -605,6 +631,7 @@ func (meal *cfgMeal) imaginePL(proto *fctypesv1a1.PriorityLevelConfiguration, re meal.newPLStates[proto.Name] = &priorityLevelState{ pl: proto, qsCompleter: qsCompleter, + obsPair: obsPair, } if proto.Spec.Limited != nil { meal.shareSum += float64(proto.Spec.Limited.AssuredConcurrencyShares) @@ -624,14 +651,14 @@ func (immediateRequest) Finish(execute func()) bool { // The returned bool indicates whether the request is exempt from // limitation. The startWaitingTime is when the request started // waiting in its queue, or `Time{}` if this did not happen. -func (cfgCtl *configController) startRequest(ctx context.Context, rd RequestDigest) (fs *fctypesv1a1.FlowSchema, pl *fctypesv1a1.PriorityLevelConfiguration, isExempt bool, req fq.Request, startWaitingTime time.Time) { +func (cfgCtlr *configController) startRequest(ctx context.Context, rd RequestDigest, queueNoteFn fq.QueueNoteFn) (fs *fctypesv1a1.FlowSchema, pl *fctypesv1a1.PriorityLevelConfiguration, isExempt bool, req fq.Request, startWaitingTime time.Time) { klog.V(7).Infof("startRequest(%#+v)", rd) - cfgCtl.lock.Lock() - defer cfgCtl.lock.Unlock() - for _, fs := range cfgCtl.flowSchemas { + cfgCtlr.lock.Lock() + defer cfgCtlr.lock.Unlock() + for _, fs := range cfgCtlr.flowSchemas { if matchesFlowSchema(rd, fs) { plName := fs.Spec.PriorityLevelConfiguration.Name - plState := cfgCtl.priorityLevelStates[plName] + plState := cfgCtlr.priorityLevelStates[plName] if plState.pl.Spec.Type == fctypesv1a1.PriorityLevelEnablementExempt { klog.V(7).Infof("startRequest(%#+v) => fsName=%q, distMethod=%#+v, plName=%q, immediate", rd, fs.Name, fs.Spec.DistinguisherMethod, plName) return fs, plState.pl, true, immediateRequest{}, time.Time{} @@ -641,16 +668,17 @@ func (cfgCtl *configController) startRequest(ctx context.Context, rd RequestDige numQueues = plState.pl.Spec.Limited.LimitResponse.Queuing.Queues } + var flowDistinguisher string var hashValue uint64 if numQueues > 1 { - flowDistinguisher := computeFlowDistinguisher(rd, fs.Spec.DistinguisherMethod) + flowDistinguisher = computeFlowDistinguisher(rd, fs.Spec.DistinguisherMethod) hashValue = hashFlowID(fs.Name, flowDistinguisher) } startWaitingTime = time.Now() klog.V(7).Infof("startRequest(%#+v) => fsName=%q, distMethod=%#+v, plName=%q, numQueues=%d", rd, fs.Name, fs.Spec.DistinguisherMethod, plName, numQueues) - req, idle := plState.queues.StartRequest(ctx, hashValue, fs.Name, rd.RequestInfo, rd.User) + req, idle := plState.queues.StartRequest(ctx, hashValue, flowDistinguisher, fs.Name, rd.RequestInfo, rd.User, queueNoteFn) if idle { - cfgCtl.maybeReapLocked(plName, plState) + cfgCtlr.maybeReapLocked(plName, plState) } return fs, plState.pl, false, req, startWaitingTime } @@ -659,7 +687,7 @@ func (cfgCtl *configController) startRequest(ctx context.Context, rd RequestDige // FlowSchema that matches everything. If somehow control reaches // here, panic with some relevant information. var catchAll *fctypesv1a1.FlowSchema - for _, fs := range cfgCtl.flowSchemas { + for _, fs := range cfgCtlr.flowSchemas { if fs.Name == fctypesv1a1.FlowSchemaNameCatchAll { catchAll = fs } @@ -668,10 +696,10 @@ func (cfgCtl *configController) startRequest(ctx context.Context, rd RequestDige } // Call this after getting a clue that the given priority level is undesired and idle -func (cfgCtl *configController) maybeReap(plName string) { - cfgCtl.lock.Lock() - defer cfgCtl.lock.Unlock() - plState := cfgCtl.priorityLevelStates[plName] +func (cfgCtlr *configController) maybeReap(plName string) { + cfgCtlr.lock.Lock() + defer cfgCtlr.lock.Unlock() + plState := cfgCtlr.priorityLevelStates[plName] if plState == nil { klog.V(7).Infof("plName=%s, plState==nil", plName) return @@ -684,17 +712,17 @@ func (cfgCtl *configController) maybeReap(plName string) { } } klog.V(3).Infof("Triggered API priority and fairness config reloading because priority level %s is undesired and idle", plName) - cfgCtl.configQueue.Add(0) + cfgCtlr.configQueue.Add(0) } // Call this if both (1) plState.queues is non-nil and reported being -// idle, and (2) cfgCtl's lock has not been released since then. -func (cfgCtl *configController) maybeReapLocked(plName string, plState *priorityLevelState) { +// idle, and (2) cfgCtlr's lock has not been released since then. +func (cfgCtlr *configController) maybeReapLocked(plName string, plState *priorityLevelState) { if !(plState.quiescing && plState.numPending == 0) { return } klog.V(3).Infof("Triggered API priority and fairness config reloading because priority level %s is undesired and idle", plName) - cfgCtl.configQueue.Add(0) + cfgCtlr.configQueue.Add(0) } // computeFlowDistinguisher extracts the flow distinguisher according to the given method diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller_debug.go b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller_debug.go new file mode 100644 index 00000000000..b7c9164c2f7 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller_debug.go @@ -0,0 +1,290 @@ +/* +Copyright 2019 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 flowcontrol + +import ( + "fmt" + "io" + "net/http" + "strconv" + "strings" + "text/tabwriter" + "time" + + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apiserver/pkg/server/mux" +) + +const ( + queryIncludeRequestDetails = "includeRequestDetails" +) + +func (cfgCtlr *configController) Install(c *mux.PathRecorderMux) { + // TODO(yue9944882): handle "Accept" header properly + // debugging dumps a CSV content for three levels of granularity + // 1. row per priority-level + c.UnlistedHandleFunc("/debug/api_priority_and_fairness/dump_priority_levels", cfgCtlr.dumpPriorityLevels) + // 2. row per queue + c.UnlistedHandleFunc("/debug/api_priority_and_fairness/dump_queues", cfgCtlr.dumpQueues) + // 3. row per request + c.UnlistedHandleFunc("/debug/api_priority_and_fairness/dump_requests", cfgCtlr.dumpRequests) +} + +func (cfgCtlr *configController) dumpPriorityLevels(w http.ResponseWriter, r *http.Request) { + cfgCtlr.lock.Lock() + defer cfgCtlr.lock.Unlock() + tabWriter := tabwriter.NewWriter(w, 8, 0, 1, ' ', 0) + columnHeaders := []string{ + "PriorityLevelName", // 1 + "ActiveQueues", // 2 + "IsIdle", // 3 + "IsQuiescing", // 4 + "WaitingRequests", // 5 + "ExecutingRequests", // 6 + } + tabPrint(tabWriter, rowForHeaders(columnHeaders)) + endLine(tabWriter) + for _, plState := range cfgCtlr.priorityLevelStates { + if plState.queues == nil { + tabPrint(tabWriter, row( + plState.pl.Name, // 1 + "", // 2 + "", // 3 + "", // 4 + "", // 5 + "", // 6 + )) + endLine(tabWriter) + continue + } + queueSetDigest := plState.queues.Dump(false) + activeQueueNum := 0 + for _, q := range queueSetDigest.Queues { + if len(q.Requests) > 0 { + activeQueueNum++ + } + } + + tabPrint(tabWriter, rowForPriorityLevel( + plState.pl.Name, // 1 + activeQueueNum, // 2 + plState.queues.IsIdle(), // 3 + plState.quiescing, // 4 + queueSetDigest.Waiting, // 5 + queueSetDigest.Executing, // 6 + )) + endLine(tabWriter) + } + runtime.HandleError(tabWriter.Flush()) +} + +func (cfgCtlr *configController) dumpQueues(w http.ResponseWriter, r *http.Request) { + cfgCtlr.lock.Lock() + defer cfgCtlr.lock.Unlock() + tabWriter := tabwriter.NewWriter(w, 8, 0, 1, ' ', 0) + columnHeaders := []string{ + "PriorityLevelName", // 1 + "Index", // 2 + "PendingRequests", // 3 + "ExecutingRequests", // 4 + "VirtualStart", // 5 + } + tabPrint(tabWriter, rowForHeaders(columnHeaders)) + endLine(tabWriter) + for _, plState := range cfgCtlr.priorityLevelStates { + if plState.queues == nil { + tabPrint(tabWriter, row( + plState.pl.Name, // 1 + "", // 2 + "", // 3 + "", // 4 + "", // 5 + )) + endLine(tabWriter) + continue + } + queueSetDigest := plState.queues.Dump(false) + for i, q := range queueSetDigest.Queues { + tabPrint(tabWriter, rowForQueue( + plState.pl.Name, // 1 + i, // 2 + len(q.Requests), // 3 + q.ExecutingRequests, // 4 + q.VirtualStart, // 5 + )) + endLine(tabWriter) + } + } + runtime.HandleError(tabWriter.Flush()) +} + +func (cfgCtlr *configController) dumpRequests(w http.ResponseWriter, r *http.Request) { + cfgCtlr.lock.Lock() + defer cfgCtlr.lock.Unlock() + + includeRequestDetails := len(r.URL.Query().Get(queryIncludeRequestDetails)) > 0 + + tabWriter := tabwriter.NewWriter(w, 8, 0, 1, ' ', 0) + tabPrint(tabWriter, rowForHeaders([]string{ + "PriorityLevelName", // 1 + "FlowSchemaName", // 2 + "QueueIndex", // 3 + "RequestIndexInQueue", // 4 + "FlowDistingsher", // 5 + "ArriveTime", // 6 + })) + if includeRequestDetails { + continueLine(tabWriter) + tabPrint(tabWriter, rowForHeaders([]string{ + "UserName", // 7 + "Verb", // 8 + "APIPath", // 9 + "Namespace", // 10 + "Name", // 11 + "APIVersion", // 12 + "Resource", // 13 + "SubResource", // 14 + })) + } + endLine(tabWriter) + for _, plState := range cfgCtlr.priorityLevelStates { + if plState.queues == nil { + tabPrint(tabWriter, row( + plState.pl.Name, // 1 + "", // 2 + "", // 3 + "", // 4 + "", // 5 + "", // 6 + )) + if includeRequestDetails { + continueLine(tabWriter) + tabPrint(tabWriter, row( + "", // 7 + "", // 8 + "", // 9 + "", // 10 + "", // 11 + "", // 12 + "", // 13 + "", // 14 + )) + } + endLine(tabWriter) + continue + } + queueSetDigest := plState.queues.Dump(includeRequestDetails) + for iq, q := range queueSetDigest.Queues { + for ir, r := range q.Requests { + tabPrint(tabWriter, rowForRequest( + plState.pl.Name, // 1 + r.MatchedFlowSchema, // 2 + iq, // 3 + ir, // 4 + r.FlowDistinguisher, // 5 + r.ArriveTime, // 6 + )) + if includeRequestDetails { + continueLine(tabWriter) + tabPrint(tabWriter, rowForRequestDetails( + r.UserName, // 7 + r.RequestInfo.Verb, // 8 + r.RequestInfo.Path, // 9 + r.RequestInfo.Namespace, // 10 + r.RequestInfo.Name, // 11 + schema.GroupVersion{ + Group: r.RequestInfo.APIGroup, + Version: r.RequestInfo.APIVersion, + }.String(), // 12 + r.RequestInfo.Resource, // 13 + r.RequestInfo.Subresource, // 14 + )) + } + endLine(tabWriter) + } + } + } + runtime.HandleError(tabWriter.Flush()) +} + +func tabPrint(w io.Writer, row string) { + _, err := fmt.Fprint(w, row) + runtime.HandleError(err) +} + +func continueLine(w io.Writer) { + _, err := fmt.Fprint(w, ",\t") + runtime.HandleError(err) +} +func endLine(w io.Writer) { + _, err := fmt.Fprint(w, "\n") + runtime.HandleError(err) +} + +func rowForHeaders(headers []string) string { + return row(headers...) +} + +func rowForPriorityLevel(plName string, activeQueues int, isIdle, isQuiescing bool, waitingRequests, executingRequests int) string { + return row( + plName, + strconv.Itoa(activeQueues), + strconv.FormatBool(isIdle), + strconv.FormatBool(isQuiescing), + strconv.Itoa(waitingRequests), + strconv.Itoa(executingRequests), + ) +} + +func rowForQueue(plName string, index, waitingRequests, executingRequests int, virtualStart float64) string { + return row( + plName, + strconv.Itoa(index), + strconv.Itoa(waitingRequests), + strconv.Itoa(executingRequests), + fmt.Sprintf("%.4f", virtualStart), + ) +} + +func rowForRequest(plName, fsName string, queueIndex, requestIndex int, flowDistinguisher string, arriveTime time.Time) string { + return row( + plName, + fsName, + strconv.Itoa(queueIndex), + strconv.Itoa(requestIndex), + flowDistinguisher, + arriveTime.UTC().Format(time.RFC3339Nano), + ) +} + +func rowForRequestDetails(username, verb, path, namespace, name, apiVersion, resource, subResource string) string { + return row( + username, + verb, + path, + namespace, + name, + apiVersion, + resource, + subResource, + ) +} + +func row(columns ...string) string { + return strings.Join(columns, ",\t") +} diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_filter.go b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_filter.go index 812ecaf2d24..5b8c0391684 100644 --- a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_filter.go +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_filter.go @@ -22,12 +22,13 @@ import ( "time" "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apiserver/pkg/server/mux" "k8s.io/apiserver/pkg/util/flowcontrol/counter" fq "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing" fqs "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset" "k8s.io/apiserver/pkg/util/flowcontrol/metrics" kubeinformers "k8s.io/client-go/informers" - "k8s.io/klog" + "k8s.io/klog/v2" fctypesv1a1 "k8s.io/api/flowcontrol/v1alpha1" fcclientv1a1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" @@ -37,20 +38,30 @@ import ( type Interface interface { // Handle takes care of queuing and dispatching a request // characterized by the given digest. The given `noteFn` will be - // invoked with the results of request classification. If Handle - // decides that the request should be executed then `execute()` - // will be invoked once to execute the request; otherwise - // `execute()` will not be invoked. + // invoked with the results of request classification. If the + // request is queued then `queueNoteFn` will be called twice, + // first with `true` and then with `false`; otherwise + // `queueNoteFn` will not be called at all. If Handle decides + // that the request should be executed then `execute()` will be + // invoked once to execute the request; otherwise `execute()` will + // not be invoked. Handle(ctx context.Context, requestDigest RequestDigest, noteFn func(fs *fctypesv1a1.FlowSchema, pl *fctypesv1a1.PriorityLevelConfiguration), + queueNoteFn fq.QueueNoteFn, execFn func(), ) + // MaintainObservations is a helper for maintaining statistics. + MaintainObservations(stopCh <-chan struct{}) + // Run monitors config objects from the main apiservers and causes // any needed changes to local behavior. This method ceases // activity and returns after the given channel is closed. Run(stopCh <-chan struct{}) error + + // Install installs debugging endpoints to the web-server. + Install(c *mux.PathRecorderMux) } // This request filter implements https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/20190228-priority-and-fairness.md @@ -68,6 +79,7 @@ func New( flowcontrolClient, serverConcurrencyLimit, requestWaitLimit, + metrics.PriorityLevelConcurrencyObserverPairGenerator, fqs.NewQueueSetFactory(&clock.RealClock{}, grc), ) } @@ -78,15 +90,17 @@ func NewTestable( flowcontrolClient fcclientv1a1.FlowcontrolV1alpha1Interface, serverConcurrencyLimit int, requestWaitLimit time.Duration, + obsPairGenerator metrics.TimedObserverPairGenerator, queueSetFactory fq.QueueSetFactory, ) Interface { - return newTestableController(informerFactory, flowcontrolClient, serverConcurrencyLimit, requestWaitLimit, queueSetFactory) + return newTestableController(informerFactory, flowcontrolClient, serverConcurrencyLimit, requestWaitLimit, obsPairGenerator, queueSetFactory) } -func (cfgCtl *configController) Handle(ctx context.Context, requestDigest RequestDigest, +func (cfgCtlr *configController) Handle(ctx context.Context, requestDigest RequestDigest, noteFn func(fs *fctypesv1a1.FlowSchema, pl *fctypesv1a1.PriorityLevelConfiguration), + queueNoteFn fq.QueueNoteFn, execFn func()) { - fs, pl, isExempt, req, startWaitingTime := cfgCtl.startRequest(ctx, requestDigest) + fs, pl, isExempt, req, startWaitingTime := cfgCtlr.startRequest(ctx, requestDigest, queueNoteFn) queued := startWaitingTime != time.Time{} noteFn(fs, pl) if req == nil { @@ -113,6 +127,6 @@ func (cfgCtl *configController) Handle(ctx context.Context, requestDigest Reques } klog.V(7).Infof("Handle(%#+v) => fsName=%q, distMethod=%#+v, plName=%q, isExempt=%v, queued=%v, Finish() => idle=%v", requestDigest, fs.Name, fs.Spec.DistinguisherMethod, pl.Name, isExempt, queued, idle) if idle { - cfgCtl.maybeReap(pl.Name) + cfgCtlr.maybeReap(pl.Name) } } diff --git a/vendor/k8s.io/apiserver/pkg/util/term/BUILD b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/debug/BUILD similarity index 70% rename from vendor/k8s.io/apiserver/pkg/util/term/BUILD rename to vendor/k8s.io/apiserver/pkg/util/flowcontrol/debug/BUILD index 346cff3e31b..2d7ebcd405e 100644 --- a/vendor/k8s.io/apiserver/pkg/util/term/BUILD +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/debug/BUILD @@ -2,11 +2,11 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["term.go"], - importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/util/term", - importpath = "k8s.io/apiserver/pkg/util/term", + srcs = ["dump.go"], + importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/util/flowcontrol/debug", + importpath = "k8s.io/apiserver/pkg/util/flowcontrol/debug", visibility = ["//visibility:public"], - deps = ["//vendor/github.com/docker/docker/pkg/term:go_default_library"], + deps = ["//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library"], ) filegroup( diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/debug/dump.go b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/debug/dump.go new file mode 100644 index 00000000000..d668d9fe7b2 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/debug/dump.go @@ -0,0 +1,47 @@ +/* +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 debug + +import ( + "k8s.io/apiserver/pkg/endpoints/request" + "time" +) + +// QueueSetDump is an instant dump of queue-set. +type QueueSetDump struct { + Queues []QueueDump + Waiting int + Executing int +} + +// QueueDump is an instant dump of one queue in a queue-set. +type QueueDump struct { + Requests []RequestDump + VirtualStart float64 + ExecutingRequests int +} + +// RequestDump is an instant dump of one requests pending in the queue. +type RequestDump struct { + MatchedFlowSchema string + FlowDistinguisher string + ArriveTime time.Time + StartTime time.Time + // request details + UserName string + RequestInfo request.RequestInfo +} diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/BUILD b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/BUILD index fcd44292fda..c8403a7ade3 100644 --- a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/BUILD +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/BUILD @@ -1,11 +1,19 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", - srcs = ["interface.go"], + srcs = [ + "integrator.go", + "interface.go", + ], importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing", importpath = "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing", visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/debug:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics:go_default_library", + ], ) filegroup( @@ -26,3 +34,10 @@ filegroup( tags = ["automanaged"], visibility = ["//visibility:public"], ) + +go_test( + name = "go_default_test", + srcs = ["integrator_test.go"], + embed = [":go_default_library"], + deps = ["//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library"], +) diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/integrator.go b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/integrator.go new file mode 100644 index 00000000000..dcba6f2c2e5 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/integrator.go @@ -0,0 +1,180 @@ +/* +Copyright 2019 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 fairqueuing + +import ( + "math" + "sync" + "time" + + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apiserver/pkg/util/flowcontrol/metrics" +) + +// Integrator computes the moments of some variable X over time as +// read from a particular clock. The integrals start when the +// Integrator is created, and ends at the latest operation on the +// Integrator. As a `metrics.TimedObserver` this fixes X1=1 and +// ignores attempts to change X1. +type Integrator interface { + metrics.TimedObserver + + GetResults() IntegratorResults + + // Return the results of integrating to now, and reset integration to start now + Reset() IntegratorResults +} + +// IntegratorResults holds statistical abstracts of the integration +type IntegratorResults struct { + Duration float64 //seconds + Average float64 //time-weighted + Deviation float64 //standard deviation: sqrt(avg((value-avg)^2)) + Min, Max float64 +} + +// Equal tests for semantic equality. +// This considers all NaN values to be equal to each other. +func (x *IntegratorResults) Equal(y *IntegratorResults) bool { + return x == y || x != nil && y != nil && x.Duration == y.Duration && x.Min == y.Min && x.Max == y.Max && (x.Average == y.Average || math.IsNaN(x.Average) && math.IsNaN(y.Average)) && (x.Deviation == y.Deviation || math.IsNaN(x.Deviation) && math.IsNaN(y.Deviation)) +} + +type integrator struct { + clock clock.PassiveClock + sync.Mutex + lastTime time.Time + x float64 + moments Moments + min, max float64 +} + +// NewIntegrator makes one that uses the given clock +func NewIntegrator(clock clock.PassiveClock) Integrator { + return &integrator{ + clock: clock, + lastTime: clock.Now(), + } +} + +func (igr *integrator) SetX1(x1 float64) { +} + +func (igr *integrator) Set(x float64) { + igr.Lock() + igr.setLocked(x) + igr.Unlock() +} + +func (igr *integrator) setLocked(x float64) { + igr.updateLocked() + igr.x = x + if x < igr.min { + igr.min = x + } + if x > igr.max { + igr.max = x + } +} + +func (igr *integrator) Add(deltaX float64) { + igr.Lock() + igr.setLocked(igr.x + deltaX) + igr.Unlock() +} + +func (igr *integrator) updateLocked() { + now := igr.clock.Now() + dt := now.Sub(igr.lastTime).Seconds() + igr.lastTime = now + igr.moments = igr.moments.Add(ConstantMoments(dt, igr.x)) +} + +func (igr *integrator) GetResults() IntegratorResults { + igr.Lock() + defer igr.Unlock() + return igr.getResultsLocked() +} + +func (igr *integrator) Reset() IntegratorResults { + igr.Lock() + defer igr.Unlock() + results := igr.getResultsLocked() + igr.moments = Moments{} + igr.min = igr.x + igr.max = igr.x + return results +} + +func (igr *integrator) getResultsLocked() (results IntegratorResults) { + igr.updateLocked() + results.Min, results.Max = igr.min, igr.max + results.Duration = igr.moments.ElapsedSeconds + results.Average, results.Deviation = igr.moments.AvgAndStdDev() + return +} + +// Moments are the integrals of the 0, 1, and 2 powers of some +// variable X over some range of time. +type Moments struct { + ElapsedSeconds float64 // integral of dt + IntegralX float64 // integral of x dt + IntegralXX float64 // integral of x*x dt +} + +// ConstantMoments is for a constant X +func ConstantMoments(dt, x float64) Moments { + return Moments{ + ElapsedSeconds: dt, + IntegralX: x * dt, + IntegralXX: x * x * dt, + } +} + +// Add combines over two ranges of time +func (igr Moments) Add(ogr Moments) Moments { + return Moments{ + ElapsedSeconds: igr.ElapsedSeconds + ogr.ElapsedSeconds, + IntegralX: igr.IntegralX + ogr.IntegralX, + IntegralXX: igr.IntegralXX + ogr.IntegralXX, + } +} + +// Sub finds the difference between a range of time and a subrange +func (igr Moments) Sub(ogr Moments) Moments { + return Moments{ + ElapsedSeconds: igr.ElapsedSeconds - ogr.ElapsedSeconds, + IntegralX: igr.IntegralX - ogr.IntegralX, + IntegralXX: igr.IntegralXX - ogr.IntegralXX, + } +} + +// AvgAndStdDev returns the average and standard devation +func (igr Moments) AvgAndStdDev() (float64, float64) { + if igr.ElapsedSeconds <= 0 { + return math.NaN(), math.NaN() + } + avg := igr.IntegralX / igr.ElapsedSeconds + // standard deviation is sqrt( average( (x - xbar)^2 ) ) + // = sqrt( Integral( x^2 + xbar^2 -2*x*xbar dt ) / Duration ) + // = sqrt( ( Integral( x^2 dt ) + Duration * xbar^2 - 2*xbar*Integral(x dt) ) / Duration) + // = sqrt( Integral(x^2 dt)/Duration - xbar^2 ) + variance := igr.IntegralXX/igr.ElapsedSeconds - avg*avg + if variance >= 0 { + return avg, math.Sqrt(variance) + } + return avg, math.NaN() +} diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/interface.go b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/interface.go index c989ccc9fab..882a505c81f 100644 --- a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/interface.go +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/interface.go @@ -19,6 +19,9 @@ package fairqueuing import ( "context" "time" + + "k8s.io/apiserver/pkg/util/flowcontrol/debug" + "k8s.io/apiserver/pkg/util/flowcontrol/metrics" ) // QueueSetFactory is used to create QueueSet objects. Creation, like @@ -28,7 +31,7 @@ import ( // before committing to a concurrency allotment for the second. type QueueSetFactory interface { // BeginConstruction does the first phase of creating a QueueSet - BeginConstruction(QueuingConfig) (QueueSetCompleter, error) + BeginConstruction(QueuingConfig, metrics.TimedObserverPair) (QueueSetCompleter, error) } // QueueSetCompleter finishes the two-step process of creating or @@ -66,19 +69,33 @@ type QueueSet interface { IsIdle() bool // StartRequest begins the process of handling a request. If the - // request gets queued and the number of queues is greater than - // 1 then Wait uses the given hashValue as the source of entropy - // as it shuffle-shards the request into a queue. The descr1 and - // descr2 values play no role in the logic but appear in log - // messages. This method always returns quickly (without waiting - // for the request to be dequeued). If this method returns a nil - // Request value then caller should reject the request and the - // returned bool indicates whether the QueueSet was idle at the - // moment of the return. Otherwise idle==false and the client - // must call the Wait method of the Request exactly once. - StartRequest(ctx context.Context, hashValue uint64, fsName string, descr1, descr2 interface{}) (req Request, idle bool) + // request gets queued and the number of queues is greater than 1 + // then StartRequest uses the given hashValue as the source of + // entropy as it shuffle-shards the request into a queue. The + // descr1 and descr2 values play no role in the logic but appear + // in log messages. This method always returns quickly (without + // waiting for the request to be dequeued). If this method + // returns a nil Request value then caller should reject the + // request and the returned bool indicates whether the QueueSet + // was idle at the moment of the return. Otherwise idle==false + // and the client must call the Finish method of the Request + // exactly once. + StartRequest(ctx context.Context, hashValue uint64, flowDistinguisher, fsName string, descr1, descr2 interface{}, queueNoteFn QueueNoteFn) (req Request, idle bool) + + // UpdateObservations makes sure any time-based statistics have + // caught up with the current clock reading + UpdateObservations() + + // Dump saves and returns the instant internal state of the queue-set. + // Note that dumping process will stop the queue-set from proceeding + // any requests. + // For debugging only. + Dump(includeRequestDetails bool) debug.QueueSetDump } +// QueueNoteFn is called when a request enters and leaves a queue +type QueueNoteFn func(inQueue bool) + // Request represents the remainder of the handling of one request type Request interface { // Finish determines whether to execute or reject the request and @@ -116,10 +133,3 @@ type DispatchingConfig struct { // ConcurrencyLimit is the maximum number of requests of this QueueSet that may be executing at a time ConcurrencyLimit int } - -// EmptyHandler is used to notify the callee when all the queues -// of a QueueSet have been drained. -type EmptyHandler interface { - // HandleEmpty is called to deliver the notification - HandleEmpty() -} diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/BUILD b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/BUILD index 12291ce2b1d..fc4d0e44d39 100644 --- a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/BUILD +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/BUILD @@ -13,14 +13,16 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/counter:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/debug:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise/lockingpromise:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/shufflesharding:go_default_library", "//vendor/github.com/pkg/errors:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -29,12 +31,13 @@ go_test( srcs = ["queueset_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/counter:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/clock:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go index 8a7e72b5f85..b469a4ac575 100644 --- a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go @@ -28,11 +28,12 @@ import ( "k8s.io/apimachinery/pkg/util/clock" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/util/flowcontrol/counter" + "k8s.io/apiserver/pkg/util/flowcontrol/debug" fq "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing" "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise/lockingpromise" "k8s.io/apiserver/pkg/util/flowcontrol/metrics" "k8s.io/apiserver/pkg/util/shufflesharding" - "k8s.io/klog" + "k8s.io/klog/v2" ) const nsTimeFmt = "2006-01-02 15:04:05.000000000" @@ -48,6 +49,7 @@ type queueSetFactory struct { // the fields `factory` and `theSet` is non-nil. type queueSetCompleter struct { factory *queueSetFactory + obsPair metrics.TimedObserverPair theSet *queueSet qCfg fq.QueuingConfig dealer *shufflesharding.Dealer @@ -66,6 +68,7 @@ type queueSet struct { clock clock.PassiveClock counter counter.GoRoutineCounter estimatedServiceTime float64 + obsPair metrics.TimedObserverPair lock sync.Mutex @@ -115,13 +118,14 @@ func NewQueueSetFactory(c clock.PassiveClock, counter counter.GoRoutineCounter) } } -func (qsf *queueSetFactory) BeginConstruction(qCfg fq.QueuingConfig) (fq.QueueSetCompleter, error) { +func (qsf *queueSetFactory) BeginConstruction(qCfg fq.QueuingConfig, obsPair metrics.TimedObserverPair) (fq.QueueSetCompleter, error) { dealer, err := checkConfig(qCfg) if err != nil { return nil, err } return &queueSetCompleter{ factory: qsf, + obsPair: obsPair, qCfg: qCfg, dealer: dealer}, nil } @@ -147,6 +151,7 @@ func (qsc *queueSetCompleter) Complete(dCfg fq.DispatchingConfig) fq.QueueSet { clock: qsc.factory.clock, counter: qsc.factory.counter, estimatedServiceTime: 60, + obsPair: qsc.obsPair, qCfg: qsc.qCfg, virtualTime: 0, lastRealTime: qsc.factory.clock.Now(), @@ -202,6 +207,12 @@ func (qs *queueSet) setConfiguration(qCfg fq.QueuingConfig, dealer *shuffleshard qs.qCfg = qCfg qs.dCfg = dCfg qs.dealer = dealer + qll := qCfg.QueueLengthLimit + if qll < 1 { + qll = 1 + } + qs.obsPair.RequestsWaiting.SetX1(float64(qll)) + qs.obsPair.RequestsExecuting.SetX1(float64(dCfg.ConcurrencyLimit)) qs.dispatchAsMuchAsPossibleLocked() } @@ -221,7 +232,7 @@ const ( // executing at each point where there is a change in that quantity, // because the metrics --- and only the metrics --- track that // quantity per FlowSchema. -func (qs *queueSet) StartRequest(ctx context.Context, hashValue uint64, fsName string, descr1, descr2 interface{}) (fq.Request, bool) { +func (qs *queueSet) StartRequest(ctx context.Context, hashValue uint64, flowDistinguisher, fsName string, descr1, descr2 interface{}, queueNoteFn fq.QueueNoteFn) (fq.Request, bool) { qs.lockAndSyncTime() defer qs.lock.Unlock() var req *request @@ -235,7 +246,7 @@ func (qs *queueSet) StartRequest(ctx context.Context, hashValue uint64, fsName s metrics.AddReject(qs.qCfg.Name, fsName, "concurrency-limit") return nil, qs.isIdleLocked() } - req = qs.dispatchSansQueueLocked(ctx, fsName, descr1, descr2) + req = qs.dispatchSansQueueLocked(ctx, flowDistinguisher, fsName, descr1, descr2) return req, false } @@ -246,7 +257,7 @@ func (qs *queueSet) StartRequest(ctx context.Context, hashValue uint64, fsName s // 3) Reject current request if there is not enough concurrency shares and // we are at max queue length // 4) If not rejected, create a request and enqueue - req = qs.timeoutOldRequestsAndRejectOrEnqueueLocked(ctx, hashValue, fsName, descr1, descr2) + req = qs.timeoutOldRequestsAndRejectOrEnqueueLocked(ctx, hashValue, flowDistinguisher, fsName, descr1, descr2, queueNoteFn) // req == nil means that the request was rejected - no remaining // concurrency shares and at max queue length already if req == nil { @@ -294,6 +305,12 @@ func (qs *queueSet) StartRequest(ctx context.Context, hashValue uint64, fsName s return req, false } +func (req *request) NoteQueued(inQueue bool) { + if req.queueNoteFn != nil { + req.queueNoteFn(inQueue) + } +} + func (req *request) Finish(execFn func()) bool { exec, idle := req.wait() if !exec { @@ -398,7 +415,7 @@ func (qs *queueSet) getVirtualTimeRatioLocked() float64 { // returns the enqueud request on a successful enqueue // returns nil in the case that there is no available concurrency or // the queuelengthlimit has been reached -func (qs *queueSet) timeoutOldRequestsAndRejectOrEnqueueLocked(ctx context.Context, hashValue uint64, fsName string, descr1, descr2 interface{}) *request { +func (qs *queueSet) timeoutOldRequestsAndRejectOrEnqueueLocked(ctx context.Context, hashValue uint64, flowDistinguisher, fsName string, descr1, descr2 interface{}, queueNoteFn fq.QueueNoteFn) *request { // Start with the shuffle sharding, to pick a queue. queueIdx := qs.chooseQueueIndexLocked(hashValue, descr1, descr2) queue := qs.queues[queueIdx] @@ -410,14 +427,16 @@ func (qs *queueSet) timeoutOldRequestsAndRejectOrEnqueueLocked(ctx context.Conte // Create a request and enqueue req := &request{ - qs: qs, - fsName: fsName, - ctx: ctx, - decision: lockingpromise.NewWriteOnce(&qs.lock, qs.counter), - arrivalTime: qs.clock.Now(), - queue: queue, - descr1: descr1, - descr2: descr2, + qs: qs, + fsName: fsName, + flowDistinguisher: flowDistinguisher, + ctx: ctx, + decision: lockingpromise.NewWriteOnce(&qs.lock, qs.counter), + arrivalTime: qs.clock.Now(), + queue: queue, + descr1: descr1, + descr2: descr2, + queueNoteFn: queueNoteFn, } if ok := qs.rejectOrEnqueueLocked(req); !ok { return nil @@ -439,7 +458,7 @@ func (qs *queueSet) chooseQueueIndexLocked(hashValue uint64, descr1, descr2 inte bestQueueIdx, bestQueueLen = queueIdx, thisLen } }) - klog.V(6).Infof("QS(%s): For request %#+v %#+v chose queue %d, had %d waiting & %d executing", qs.qCfg.Name, descr1, descr2, bestQueueIdx, bestQueueLen, qs.queues[bestQueueIdx].requestsExecuting) + klog.V(6).Infof("QS(%s) at r=%s v=%.9fs: For request %#+v %#+v chose queue %d, had %d waiting & %d executing", qs.qCfg.Name, qs.clock.Now().Format(nsTimeFmt), qs.virtualTime, descr1, descr2, bestQueueIdx, bestQueueLen, qs.queues[bestQueueIdx].requestsExecuting) return bestQueueIdx } @@ -461,6 +480,7 @@ func (qs *queueSet) removeTimedOutRequestsFromQueueLocked(queue *queue, fsName s // get index for timed out requests timeoutIdx = i metrics.AddRequestsInQueues(qs.qCfg.Name, req.fsName, -1) + req.NoteQueued(false) } else { break } @@ -473,6 +493,7 @@ func (qs *queueSet) removeTimedOutRequestsFromQueueLocked(queue *queue, fsName s queue.requests = reqs[removeIdx:] // decrement the # of requestsEnqueued qs.totRequestsWaiting -= removeIdx + qs.obsPair.RequestsWaiting.Add(float64(-removeIdx)) } } @@ -496,16 +517,19 @@ func (qs *queueSet) rejectOrEnqueueLocked(request *request) bool { // enqueues a request into its queue. func (qs *queueSet) enqueueLocked(request *request) { queue := request.queue + now := qs.clock.Now() if len(queue.requests) == 0 && queue.requestsExecuting == 0 { // the queue’s virtual start time is set to the virtual time. queue.virtualStart = qs.virtualTime - if klog.V(6) { - klog.Infof("QS(%s) at r=%s v=%.9fs: initialized queue %d virtual start time due to request %#+v %#+v", qs.qCfg.Name, qs.clock.Now().Format(nsTimeFmt), queue.virtualStart, queue.index, request.descr1, request.descr2) + if klog.V(6).Enabled() { + klog.Infof("QS(%s) at r=%s v=%.9fs: initialized queue %d virtual start time due to request %#+v %#+v", qs.qCfg.Name, now.Format(nsTimeFmt), queue.virtualStart, queue.index, request.descr1, request.descr2) } } queue.Enqueue(request) qs.totRequestsWaiting++ metrics.AddRequestsInQueues(qs.qCfg.Name, request.fsName, 1) + request.NoteQueued(true) + qs.obsPair.RequestsWaiting.Add(1) } // dispatchAsMuchAsPossibleLocked runs a loop, as long as there @@ -523,22 +547,24 @@ func (qs *queueSet) dispatchAsMuchAsPossibleLocked() { } } -func (qs *queueSet) dispatchSansQueueLocked(ctx context.Context, fsName string, descr1, descr2 interface{}) *request { +func (qs *queueSet) dispatchSansQueueLocked(ctx context.Context, flowDistinguisher, fsName string, descr1, descr2 interface{}) *request { now := qs.clock.Now() req := &request{ - qs: qs, - fsName: fsName, - ctx: ctx, - startTime: now, - decision: lockingpromise.NewWriteOnce(&qs.lock, qs.counter), - arrivalTime: now, - descr1: descr1, - descr2: descr2, + qs: qs, + fsName: fsName, + flowDistinguisher: flowDistinguisher, + ctx: ctx, + startTime: now, + decision: lockingpromise.NewWriteOnce(&qs.lock, qs.counter), + arrivalTime: now, + descr1: descr1, + descr2: descr2, } req.decision.SetLocked(decisionExecute) qs.totRequestsExecuting++ metrics.AddRequestsExecuting(qs.qCfg.Name, fsName, 1) - if klog.V(5) { + qs.obsPair.RequestsExecuting.Add(1) + if klog.V(5).Enabled() { klog.Infof("QS(%s) at r=%s v=%.9fs: immediate dispatch of request %q %#+v %#+v, qs will have %d executing", qs.qCfg.Name, now.Format(nsTimeFmt), qs.virtualTime, fsName, descr1, descr2, qs.totRequestsExecuting) } return req @@ -567,8 +593,11 @@ func (qs *queueSet) dispatchLocked() bool { qs.totRequestsExecuting++ queue.requestsExecuting++ metrics.AddRequestsInQueues(qs.qCfg.Name, request.fsName, -1) + request.NoteQueued(false) metrics.AddRequestsExecuting(qs.qCfg.Name, request.fsName, 1) - if klog.V(6) { + qs.obsPair.RequestsWaiting.Add(-1) + qs.obsPair.RequestsExecuting.Add(1) + if klog.V(6).Enabled() { klog.Infof("QS(%s) at r=%s v=%.9fs: dispatching request %#+v %#+v from queue %d with virtual start time %.9fs, queue will have %d waiting & %d executing", qs.qCfg.Name, request.startTime.Format(nsTimeFmt), qs.virtualTime, request.descr1, request.descr2, queue.index, queue.virtualStart, len(queue.requests), queue.requestsExecuting) } // When a request is dequeued for service -> qs.virtualStart += G @@ -596,6 +625,8 @@ func (qs *queueSet) cancelWait(req *request) { queue.requests = append(queue.requests[:i], queue.requests[i+1:]...) qs.totRequestsWaiting-- metrics.AddRequestsInQueues(qs.qCfg.Name, req.fsName, -1) + req.NoteQueued(false) + qs.obsPair.RequestsWaiting.Add(-1) break } } @@ -647,17 +678,19 @@ func (qs *queueSet) finishRequestAndDispatchAsMuchAsPossible(req *request) bool // previously dispatched request has completed it's service. This // callback updates important state in the queueSet func (qs *queueSet) finishRequestLocked(r *request) { + now := qs.clock.Now() qs.totRequestsExecuting-- metrics.AddRequestsExecuting(qs.qCfg.Name, r.fsName, -1) + qs.obsPair.RequestsExecuting.Add(-1) if r.queue == nil { - if klog.V(6) { - klog.Infof("QS(%s) at r=%s v=%.9fs: request %#+v %#+v finished, qs will have %d executing", qs.qCfg.Name, qs.clock.Now().Format(nsTimeFmt), qs.virtualTime, r.descr1, r.descr2, qs.totRequestsExecuting) + if klog.V(6).Enabled() { + klog.Infof("QS(%s) at r=%s v=%.9fs: request %#+v %#+v finished, qs will have %d executing", qs.qCfg.Name, now.Format(nsTimeFmt), qs.virtualTime, r.descr1, r.descr2, qs.totRequestsExecuting) } return } - S := qs.clock.Since(r.startTime).Seconds() + S := now.Sub(r.startTime).Seconds() // When a request finishes being served, and the actual service time was S, // the queue’s virtual start time is decremented by G - S. @@ -666,8 +699,8 @@ func (qs *queueSet) finishRequestLocked(r *request) { // request has finished, remove from requests executing r.queue.requestsExecuting-- - if klog.V(6) { - klog.Infof("QS(%s) at r=%s v=%.9fs: request %#+v %#+v finished, adjusted queue %d virtual start time to %.9fs due to service time %.9fs, queue will have %d waiting & %d executing", qs.qCfg.Name, qs.clock.Now().Format(nsTimeFmt), qs.virtualTime, r.descr1, r.descr2, r.queue.index, r.queue.virtualStart, S, len(r.queue.requests), r.queue.requestsExecuting) + if klog.V(6).Enabled() { + klog.Infof("QS(%s) at r=%s v=%.9fs: request %#+v %#+v finished, adjusted queue %d virtual start time to %.9fs due to service time %.9fs, queue will have %d waiting & %d executing", qs.qCfg.Name, now.Format(nsTimeFmt), qs.virtualTime, r.descr1, r.descr2, r.queue.index, r.queue.virtualStart, S, len(r.queue.requests), r.queue.requestsExecuting) } // If there are more queues than desired and this one has no @@ -709,3 +742,22 @@ func (qs *queueSet) preCreateOrUnblockGoroutine() { func (qs *queueSet) goroutineDoneOrBlocked() { qs.counter.Add(-1) } + +func (qs *queueSet) UpdateObservations() { + qs.obsPair.RequestsWaiting.Add(0) + qs.obsPair.RequestsExecuting.Add(0) +} + +func (qs *queueSet) Dump(includeRequestDetails bool) debug.QueueSetDump { + qs.lock.Lock() + defer qs.lock.Unlock() + d := debug.QueueSetDump{ + Queues: make([]debug.QueueDump, len(qs.queues)), + Waiting: qs.totRequestsWaiting, + Executing: qs.totRequestsExecuting, + } + for i, q := range qs.queues { + d.Queues[i] = q.dump(includeRequestDetails) + } + return d +} diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/types.go b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/types.go index 1facc701d9e..a720230600e 100644 --- a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/types.go +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/types.go @@ -20,15 +20,21 @@ import ( "context" "time" + genericrequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/util/flowcontrol/debug" + fq "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing" "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise" ) // request is a temporary container for "requests" with additional // tracking fields required for the functionality FQScheduler type request struct { - qs *queueSet - fsName string - ctx context.Context + ctx context.Context + + qs *queueSet + + flowDistinguisher string + fsName string // The relevant queue. Is nil if this request did not go through // a queue. @@ -53,6 +59,8 @@ type request struct { // Indicates whether client has called Request::Wait() waitStarted bool + + queueNoteFn fq.QueueNoteFn } // queue is an array of requests with additional metadata required for @@ -94,3 +102,27 @@ func (q *queue) GetVirtualFinish(J int, G float64) float64 { jg := float64(J+1) * float64(G) return jg + q.virtualStart } + +func (q *queue) dump(includeDetails bool) debug.QueueDump { + digest := make([]debug.RequestDump, len(q.requests)) + for i, r := range q.requests { + // dump requests. + digest[i].MatchedFlowSchema = r.fsName + digest[i].FlowDistinguisher = r.flowDistinguisher + digest[i].ArriveTime = r.arrivalTime + digest[i].StartTime = r.startTime + if includeDetails { + userInfo, _ := genericrequest.UserFrom(r.ctx) + digest[i].UserName = userInfo.GetName() + requestInfo, ok := genericrequest.RequestInfoFrom(r.ctx) + if ok { + digest[i].RequestInfo = *requestInfo + } + } + } + return debug.QueueDump{ + VirtualStart: q.virtualStart, + Requests: digest, + ExecutingRequests: q.requestsExecuting, + } +} diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/BUILD b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/BUILD index 1074189822a..cf4d2f2427b 100644 --- a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/BUILD +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/BUILD @@ -2,14 +2,20 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["metrics.go"], + srcs = [ + "metrics.go", + "sample_and_watermark.go", + "timed_observer.go", + ], importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics", importpath = "k8s.io/apiserver/pkg/util/flowcontrol/metrics", visibility = ["//visibility:public"], deps = [ + "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//staging/src/k8s.io/component-base/metrics/testutil:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/metrics.go b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/metrics.go index b2b6dab845b..940dac48104 100644 --- a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/metrics.go @@ -21,6 +21,7 @@ import ( "sync" "time" + "k8s.io/apimachinery/pkg/util/clock" compbasemetrics "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" basemetricstestutil "k8s.io/component-base/metrics/testutil" @@ -32,8 +33,11 @@ const ( ) const ( + requestKind = "request_kind" priorityLevel = "priorityLevel" flowSchema = "flowSchema" + phase = "phase" + mark = "mark" ) var ( @@ -69,6 +73,14 @@ func GatherAndCompare(expected string, metricNames ...string) error { return basemetricstestutil.GatherAndCompare(legacyregistry.DefaultGatherer, strings.NewReader(expected), metricNames...) } +// Registerables is a slice of Registerable +type Registerables []compbasemetrics.Registerable + +// Append adds more +func (rs Registerables) Append(more ...compbasemetrics.Registerable) Registerables { + return append(rs, more...) +} + var ( apiserverRejectedRequestsTotal = compbasemetrics.NewCounterVec( &compbasemetrics.CounterOpts{ @@ -88,6 +100,47 @@ var ( }, []string{priorityLevel, flowSchema}, ) + + // PriorityLevelConcurrencyObserverPairGenerator creates pairs that observe concurrency for priority levels + PriorityLevelConcurrencyObserverPairGenerator = NewSampleAndWaterMarkHistogramsPairGenerator(clock.RealClock{}, time.Millisecond, + &compbasemetrics.HistogramOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "priority_level_request_count_samples", + Help: "Periodic observations of the number of requests", + Buckets: []float64{0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}, + StabilityLevel: compbasemetrics.ALPHA, + }, + &compbasemetrics.HistogramOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "priority_level_request_count_watermarks", + Help: "Watermarks of the number of requests", + Buckets: []float64{0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}, + StabilityLevel: compbasemetrics.ALPHA, + }, + []string{priorityLevel}) + + // ReadWriteConcurrencyObserverPairGenerator creates pairs that observe concurrency broken down by mutating vs readonly + ReadWriteConcurrencyObserverPairGenerator = NewSampleAndWaterMarkHistogramsPairGenerator(clock.RealClock{}, time.Millisecond, + &compbasemetrics.HistogramOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "read_vs_write_request_count_samples", + Help: "Periodic observations of the number of requests", + Buckets: []float64{0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}, + StabilityLevel: compbasemetrics.ALPHA, + }, + &compbasemetrics.HistogramOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "read_vs_write_request_count_watermarks", + Help: "Watermarks of the number of requests", + Buckets: []float64{0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}, + StabilityLevel: compbasemetrics.ALPHA, + }, + []string{requestKind}) + apiserverCurrentInqueueRequests = compbasemetrics.NewGaugeVec( &compbasemetrics.GaugeOpts{ Namespace: namespace, @@ -145,7 +198,7 @@ var ( }, []string{priorityLevel, flowSchema}, ) - metrics = []compbasemetrics.Registerable{ + metrics = Registerables{ apiserverRejectedRequestsTotal, apiserverDispatchedRequestsTotal, apiserverCurrentInqueueRequests, @@ -154,7 +207,9 @@ var ( apiserverCurrentExecutingRequests, apiserverRequestWaitingSeconds, apiserverRequestExecutionSeconds, - } + }. + Append(PriorityLevelConcurrencyObserverPairGenerator.metrics()...). + Append(ReadWriteConcurrencyObserverPairGenerator.metrics()...) ) // AddRequestsInQueues adds the given delta to the gauge of the # of requests in the queues of the specified flowSchema and priorityLevel diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/sample_and_watermark.go b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/sample_and_watermark.go new file mode 100644 index 00000000000..f5df0e6492e --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/sample_and_watermark.go @@ -0,0 +1,192 @@ +/* +Copyright 2019 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 metrics + +import ( + "sync" + "time" + + "k8s.io/apimachinery/pkg/util/clock" + compbasemetrics "k8s.io/component-base/metrics" + "k8s.io/klog/v2" +) + +const ( + labelNameMark = "mark" + labelValueLo = "low" + labelValueHi = "high" + labelNamePhase = "phase" + labelValueWaiting = "waiting" + labelValueExecuting = "executing" +) + +// SampleAndWaterMarkPairGenerator makes pairs of TimedObservers that +// track samples and watermarks. +type SampleAndWaterMarkPairGenerator struct { + urGenerator SampleAndWaterMarkObserverGenerator +} + +var _ TimedObserverPairGenerator = SampleAndWaterMarkPairGenerator{} + +// NewSampleAndWaterMarkHistogramsPairGenerator makes a new pair generator +func NewSampleAndWaterMarkHistogramsPairGenerator(clock clock.PassiveClock, samplePeriod time.Duration, sampleOpts, waterMarkOpts *compbasemetrics.HistogramOpts, labelNames []string) SampleAndWaterMarkPairGenerator { + return SampleAndWaterMarkPairGenerator{ + urGenerator: NewSampleAndWaterMarkHistogramsGenerator(clock, samplePeriod, sampleOpts, waterMarkOpts, append([]string{labelNamePhase}, labelNames...)), + } +} + +// Generate makes a new pair +func (spg SampleAndWaterMarkPairGenerator) Generate(waiting1, executing1 float64, labelValues []string) TimedObserverPair { + return TimedObserverPair{ + RequestsWaiting: spg.urGenerator.Generate(0, waiting1, append([]string{labelValueWaiting}, labelValues...)), + RequestsExecuting: spg.urGenerator.Generate(0, executing1, append([]string{labelValueExecuting}, labelValues...)), + } +} + +func (spg SampleAndWaterMarkPairGenerator) metrics() Registerables { + return spg.urGenerator.metrics() +} + +// SampleAndWaterMarkObserverGenerator creates TimedObservers that +// populate histograms of samples and low- and high-water-marks. The +// generator has a samplePeriod, and the histograms get an observation +// every samplePeriod. +type SampleAndWaterMarkObserverGenerator struct { + *sampleAndWaterMarkObserverGenerator +} + +type sampleAndWaterMarkObserverGenerator struct { + clock clock.PassiveClock + samplePeriod time.Duration + samples *compbasemetrics.HistogramVec + waterMarks *compbasemetrics.HistogramVec +} + +var _ TimedObserverGenerator = (*sampleAndWaterMarkObserverGenerator)(nil) + +// NewSampleAndWaterMarkHistogramsGenerator makes a new one +func NewSampleAndWaterMarkHistogramsGenerator(clock clock.PassiveClock, samplePeriod time.Duration, sampleOpts, waterMarkOpts *compbasemetrics.HistogramOpts, labelNames []string) SampleAndWaterMarkObserverGenerator { + return SampleAndWaterMarkObserverGenerator{ + &sampleAndWaterMarkObserverGenerator{ + clock: clock, + samplePeriod: samplePeriod, + samples: compbasemetrics.NewHistogramVec(sampleOpts, labelNames), + waterMarks: compbasemetrics.NewHistogramVec(waterMarkOpts, append([]string{labelNameMark}, labelNames...)), + }} +} + +func (swg *sampleAndWaterMarkObserverGenerator) quantize(when time.Time) int64 { + return when.UnixNano() / int64(swg.samplePeriod) +} + +// Generate makes a new TimedObserver +func (swg *sampleAndWaterMarkObserverGenerator) Generate(x, x1 float64, labelValues []string) TimedObserver { + relX := x / x1 + when := swg.clock.Now() + return &sampleAndWaterMarkHistograms{ + sampleAndWaterMarkObserverGenerator: swg, + labelValues: labelValues, + loLabelValues: append([]string{labelValueLo}, labelValues...), + hiLabelValues: append([]string{labelValueHi}, labelValues...), + x1: x1, + sampleAndWaterMarkAccumulator: sampleAndWaterMarkAccumulator{ + lastSet: when, + lastSetInt: swg.quantize(when), + x: x, + relX: relX, + loRelX: relX, + hiRelX: relX, + }} +} + +func (swg *sampleAndWaterMarkObserverGenerator) metrics() Registerables { + return Registerables{swg.samples, swg.waterMarks} +} + +type sampleAndWaterMarkHistograms struct { + *sampleAndWaterMarkObserverGenerator + labelValues []string + loLabelValues, hiLabelValues []string + + sync.Mutex + x1 float64 + sampleAndWaterMarkAccumulator +} + +type sampleAndWaterMarkAccumulator struct { + lastSet time.Time + lastSetInt int64 // lastSet / samplePeriod + x float64 + relX float64 // x / x1 + loRelX, hiRelX float64 +} + +var _ TimedObserver = (*sampleAndWaterMarkHistograms)(nil) + +func (saw *sampleAndWaterMarkHistograms) Add(deltaX float64) { + saw.innerSet(func() { + saw.x += deltaX + }) +} + +func (saw *sampleAndWaterMarkHistograms) Set(x float64) { + saw.innerSet(func() { + saw.x = x + }) +} + +func (saw *sampleAndWaterMarkHistograms) SetX1(x1 float64) { + saw.innerSet(func() { + saw.x1 = x1 + }) +} + +func (saw *sampleAndWaterMarkHistograms) innerSet(updateXOrX1 func()) { + saw.Lock() + when := saw.clock.Now() + whenInt := saw.quantize(when) + acc := saw.sampleAndWaterMarkAccumulator + wellOrdered := !when.Before(acc.lastSet) + if wellOrdered { + updateXOrX1() + saw.relX = saw.x / saw.x1 + if acc.lastSetInt < whenInt { + saw.loRelX, saw.hiRelX = acc.relX, acc.relX + saw.lastSetInt = whenInt + } + if saw.relX < saw.loRelX { + saw.loRelX = saw.relX + } else if saw.relX > saw.hiRelX { + saw.hiRelX = saw.relX + } + saw.lastSet = when + } + saw.Unlock() + if !wellOrdered { + lastSetS := acc.lastSet.Format(time.RFC3339Nano) + whenS := when.Format(time.RFC3339Nano) + klog.Fatalf("Time went backwards from %s to %s for labelValues=%#+v", lastSetS, whenS, saw.labelValues) + panic(append([]string{lastSetS, whenS}, saw.labelValues...)) + } + for acc.lastSetInt < whenInt { + saw.samples.WithLabelValues(saw.labelValues...).Observe(acc.relX) + saw.waterMarks.WithLabelValues(saw.loLabelValues...).Observe(acc.loRelX) + saw.waterMarks.WithLabelValues(saw.hiLabelValues...).Observe(acc.hiRelX) + acc.lastSetInt++ + acc.loRelX, acc.hiRelX = acc.relX, acc.relX + } +} diff --git a/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/timed_observer.go b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/timed_observer.go new file mode 100644 index 00000000000..25f41493c3e --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/timed_observer.go @@ -0,0 +1,52 @@ +/* +Copyright 2019 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 metrics + +// TimedObserver gets informed about the values assigned to a variable +// `X float64` over time, and reports on the ratio `X/X1`. +type TimedObserver interface { + // Add notes a change to the variable + Add(deltaX float64) + + // Set notes a setting of the variable + Set(x float64) + + // SetX1 changes the value to use for X1 + SetX1(x1 float64) +} + +// TimedObserverGenerator creates related observers that are +// differentiated by a series of label values +type TimedObserverGenerator interface { + Generate(x, x1 float64, labelValues []string) TimedObserver +} + +// TimedObserverPair is a corresponding pair of observers, one for the +// number of requests waiting in queue(s) and one for the number of +// requests being executed +type TimedObserverPair struct { + // RequestsWaiting is given observations of the number of currently queued requests + RequestsWaiting TimedObserver + + // RequestsExecuting is given observations of the number of requests currently executing + RequestsExecuting TimedObserver +} + +// TimedObserverPairGenerator generates pairs +type TimedObserverPairGenerator interface { + Generate(waiting1, executing1 float64, labelValues []string) TimedObserverPair +} diff --git a/vendor/k8s.io/apiserver/pkg/util/openapi/BUILD b/vendor/k8s.io/apiserver/pkg/util/openapi/BUILD index 872a693c4be..0184fcbeebb 100644 --- a/vendor/k8s.io/apiserver/pkg/util/openapi/BUILD +++ b/vendor/k8s.io/apiserver/pkg/util/openapi/BUILD @@ -8,8 +8,8 @@ go_library( visibility = ["//visibility:public"], deps = [ "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", "//vendor/github.com/googleapis/gnostic/compiler:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", "//vendor/gopkg.in/yaml.v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", ], diff --git a/vendor/k8s.io/apiserver/pkg/util/openapi/proto.go b/vendor/k8s.io/apiserver/pkg/util/openapi/proto.go index ba51ba5329b..0f95a5f7946 100644 --- a/vendor/k8s.io/apiserver/pkg/util/openapi/proto.go +++ b/vendor/k8s.io/apiserver/pkg/util/openapi/proto.go @@ -20,8 +20,8 @@ import ( "encoding/json" "github.com/go-openapi/spec" - openapi_v2 "github.com/googleapis/gnostic/OpenAPIv2" "github.com/googleapis/gnostic/compiler" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" yaml "gopkg.in/yaml.v2" "k8s.io/kube-openapi/pkg/util/proto" diff --git a/vendor/k8s.io/apiserver/pkg/util/webhook/webhook.go b/vendor/k8s.io/apiserver/pkg/util/webhook/webhook.go index f067466afaa..2128647e08f 100644 --- a/vendor/k8s.io/apiserver/pkg/util/webhook/webhook.go +++ b/vendor/k8s.io/apiserver/pkg/util/webhook/webhook.go @@ -26,7 +26,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/apimachinery/pkg/util/net" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/rest" @@ -51,7 +50,7 @@ type GenericWebhook struct { // Otherwise it returns false for an immediate fail. func DefaultShouldRetry(err error) bool { // these errors indicate a transient error that should be retried. - if net.IsConnectionReset(err) || apierrors.IsInternalError(err) || apierrors.IsTimeout(err) || apierrors.IsTooManyRequests(err) { + if utilnet.IsConnectionReset(err) || apierrors.IsInternalError(err) || apierrors.IsTimeout(err) || apierrors.IsTooManyRequests(err) { return true } // if the error sends the Retry-After header, we respect it as an explicit confirmation we should retry. diff --git a/vendor/k8s.io/apiserver/pkg/util/wsstream/BUILD b/vendor/k8s.io/apiserver/pkg/util/wsstream/BUILD index 5367ab2f5c6..c1ec1311896 100644 --- a/vendor/k8s.io/apiserver/pkg/util/wsstream/BUILD +++ b/vendor/k8s.io/apiserver/pkg/util/wsstream/BUILD @@ -28,7 +28,7 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//vendor/golang.org/x/net/websocket:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/util/wsstream/conn.go b/vendor/k8s.io/apiserver/pkg/util/wsstream/conn.go index 2d1a7902136..11474bfffde 100644 --- a/vendor/k8s.io/apiserver/pkg/util/wsstream/conn.go +++ b/vendor/k8s.io/apiserver/pkg/util/wsstream/conn.go @@ -26,7 +26,7 @@ import ( "time" "golang.org/x/net/websocket" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/runtime" ) diff --git a/vendor/k8s.io/apiserver/pkg/util/wsstream/stream.go b/vendor/k8s.io/apiserver/pkg/util/wsstream/stream.go index 4253c17cf57..ba7e6a519af 100644 --- a/vendor/k8s.io/apiserver/pkg/util/wsstream/stream.go +++ b/vendor/k8s.io/apiserver/pkg/util/wsstream/stream.go @@ -63,7 +63,7 @@ type Reader struct { protocols map[string]ReaderProtocolConfig selectedProtocol string - handleCrash func() // overridable for testing + handleCrash func(additionalHandlers ...func(interface{})) // overridable for testing } // NewReader creates a WebSocket pipe that will copy the contents of r to a provided @@ -78,7 +78,7 @@ func NewReader(r io.Reader, ping bool, protocols map[string]ReaderProtocolConfig err: make(chan error), ping: ping, protocols: protocols, - handleCrash: func() { runtime.HandleCrash() }, + handleCrash: runtime.HandleCrash, } } diff --git a/vendor/k8s.io/apiserver/pkg/warning/BUILD b/vendor/k8s.io/apiserver/pkg/warning/BUILD new file mode 100644 index 00000000000..2860666b972 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/warning/BUILD @@ -0,0 +1,23 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["context.go"], + importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/warning", + importpath = "k8s.io/apiserver/pkg/warning", + visibility = ["//visibility:public"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/apiserver/pkg/warning/context.go b/vendor/k8s.io/apiserver/pkg/warning/context.go new file mode 100644 index 00000000000..1b9dd54dfc0 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/warning/context.go @@ -0,0 +1,59 @@ +/* +Copyright 2020 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 warning + +import ( + "context" +) + +// The key type is unexported to prevent collisions +type key int + +const ( + // auditAnnotationsKey is the context key for the audit annotations. + warningRecorderKey key = iota +) + +// Recorder provides a method for recording warnings +type Recorder interface { + // AddWarning adds the specified warning to the response. + // agent must be valid UTF-8, and must not contain spaces, quotes, backslashes, or control characters. + // text must be valid UTF-8, and must not contain control characters. + AddWarning(agent, text string) +} + +// WithWarningRecorder returns a new context that wraps the provided context and contains the provided Recorder implementation. +// The returned context can be passed to AddWarning(). +func WithWarningRecorder(ctx context.Context, recorder Recorder) context.Context { + return context.WithValue(ctx, warningRecorderKey, recorder) +} +func warningRecorderFrom(ctx context.Context) (Recorder, bool) { + recorder, ok := ctx.Value(warningRecorderKey).(Recorder) + return recorder, ok +} + +// AddWarning records a warning for the specified agent and text to the Recorder added to the provided context using WithWarningRecorder(). +// If no Recorder exists in the provided context, this is a no-op. +// agent must be valid UTF-8, and must not contain spaces, quotes, backslashes, or control characters. +// text must be valid UTF-8, and must not contain control characters. +func AddWarning(ctx context.Context, agent string, text string) { + recorder, ok := warningRecorderFrom(ctx) + if !ok { + return + } + recorder.AddWarning(agent, text) +} diff --git a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/BUILD b/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/BUILD deleted file mode 100644 index b6aae22cac6..00000000000 --- a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/BUILD +++ /dev/null @@ -1,76 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "defaults.go", - "dynamic.go", - "factory.go", - ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic", - importpath = "k8s.io/apiserver/plugin/pkg/audit/dynamic", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/apis/audit/install:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/apis/audit/v1:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/audit:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/audit/policy:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/audit/util:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", - "//staging/src/k8s.io/apiserver/plugin/pkg/audit/buffered:go_default_library", - "//staging/src/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced:go_default_library", - "//staging/src/k8s.io/apiserver/plugin/pkg/audit/webhook:go_default_library", - "//staging/src/k8s.io/client-go/informers/auditregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "dynamic_test.go", - "factory_test.go", - ], - embed = [":go_default_library"], - deps = [ - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/apis/audit/v1:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/audit:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", - "//staging/src/k8s.io/client-go/informers:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/k8s.io/utils/pointer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/defaults.go b/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/defaults.go deleted file mode 100644 index f442954b500..00000000000 --- a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/defaults.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2018 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 dynamic - -import ( - "time" - - bufferedplugin "k8s.io/apiserver/plugin/pkg/audit/buffered" -) - -const ( - // Default configuration values for ModeBatch when applied to a dynamic plugin - defaultBatchBufferSize = 5000 // Buffer up to 5000 events before starting discarding. - defaultBatchMaxSize = 400 // Only send up to 400 events at a time. - defaultBatchMaxWait = 30 * time.Second // Send events at least twice a minute. - defaultBatchThrottleQPS = 10 // Limit the send rate by 10 QPS. - defaultBatchThrottleBurst = 15 // Allow up to 15 QPS burst. -) - -// NewDefaultWebhookBatchConfig returns new Batch Config objects populated by default values -// for dynamic webhooks -func NewDefaultWebhookBatchConfig() *bufferedplugin.BatchConfig { - return &bufferedplugin.BatchConfig{ - BufferSize: defaultBatchBufferSize, - MaxBatchSize: defaultBatchMaxSize, - MaxBatchWait: defaultBatchMaxWait, - ThrottleEnable: true, - ThrottleQPS: defaultBatchThrottleQPS, - ThrottleBurst: defaultBatchThrottleBurst, - AsyncDelegate: true, - } -} diff --git a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/dynamic.go b/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/dynamic.go deleted file mode 100644 index 1eac3ace0de..00000000000 --- a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/dynamic.go +++ /dev/null @@ -1,365 +0,0 @@ -/* -Copyright 2018 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 dynamic - -import ( - "fmt" - "reflect" - "strings" - "sync" - "sync/atomic" - - "k8s.io/klog" - - auditregv1alpha1 "k8s.io/api/auditregistration/v1alpha1" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - auditinternal "k8s.io/apiserver/pkg/apis/audit" - auditinstall "k8s.io/apiserver/pkg/apis/audit/install" - auditv1 "k8s.io/apiserver/pkg/apis/audit/v1" - "k8s.io/apiserver/pkg/audit" - webhook "k8s.io/apiserver/pkg/util/webhook" - bufferedplugin "k8s.io/apiserver/plugin/pkg/audit/buffered" - auditinformer "k8s.io/client-go/informers/auditregistration/v1alpha1" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/tools/record" -) - -// PluginName is the name reported in error metrics. -const PluginName = "dynamic" - -// Config holds the configuration for the dynamic backend -type Config struct { - // Informer for the audit sinks - Informer auditinformer.AuditSinkInformer - // EventConfig holds the configuration for event notifications about the AuditSink API objects - EventConfig EventConfig - // BufferedConfig is the runtime buffered configuration - BufferedConfig *bufferedplugin.BatchConfig - // WebhookConfig holds the configuration for outgoing webhooks - WebhookConfig WebhookConfig -} - -// WebhookConfig holds the configurations for outgoing webhooks -type WebhookConfig struct { - // AuthInfoResolverWrapper provides the webhook authentication for in-cluster endpoints - AuthInfoResolverWrapper webhook.AuthenticationInfoResolverWrapper - // ServiceResolver knows how to convert a webhook service reference into an actual location. - ServiceResolver webhook.ServiceResolver -} - -// EventConfig holds the configurations for sending event notifiations about AuditSink API objects -type EventConfig struct { - // Sink for emitting events - Sink record.EventSink - // Source holds the source information about the event emitter - Source corev1.EventSource -} - -// delegate represents a delegate backend that was created from an audit sink configuration -type delegate struct { - audit.Backend - configuration *auditregv1alpha1.AuditSink - stopChan chan struct{} -} - -// gracefulShutdown will gracefully shutdown the delegate -func (d *delegate) gracefulShutdown() { - close(d.stopChan) - d.Shutdown() -} - -// NewBackend returns a backend that dynamically updates its configuration -// based on a shared informer. -func NewBackend(c *Config) (audit.Backend, error) { - eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) - eventBroadcaster.StartRecordingToSink(c.EventConfig.Sink) - - scheme := runtime.NewScheme() - err := auditregv1alpha1.AddToScheme(scheme) - if err != nil { - return nil, err - } - recorder := eventBroadcaster.NewRecorder(scheme, c.EventConfig.Source) - - if c.BufferedConfig == nil { - c.BufferedConfig = NewDefaultWebhookBatchConfig() - } - cm, err := webhook.NewClientManager([]schema.GroupVersion{auditv1.SchemeGroupVersion}, func(s *runtime.Scheme) error { - auditinstall.Install(s) - return nil - }) - if err != nil { - return nil, err - } - - // TODO: need a way of injecting authentication before beta - authInfoResolver, err := webhook.NewDefaultAuthenticationInfoResolver("") - if err != nil { - return nil, err - } - cm.SetAuthenticationInfoResolver(authInfoResolver) - cm.SetServiceResolver(c.WebhookConfig.ServiceResolver) - cm.SetAuthenticationInfoResolverWrapper(c.WebhookConfig.AuthInfoResolverWrapper) - - manager := &backend{ - config: c, - delegates: atomic.Value{}, - delegateUpdateMutex: sync.Mutex{}, - stopped: false, - webhookClientManager: cm, - recorder: recorder, - } - manager.delegates.Store(syncedDelegates{}) - - c.Informer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - manager.addSink(obj.(*auditregv1alpha1.AuditSink)) - }, - UpdateFunc: func(oldObj, newObj interface{}) { - manager.updateSink(oldObj.(*auditregv1alpha1.AuditSink), newObj.(*auditregv1alpha1.AuditSink)) - }, - DeleteFunc: func(obj interface{}) { - sink, ok := obj.(*auditregv1alpha1.AuditSink) - if !ok { - tombstone, ok := obj.(cache.DeletedFinalStateUnknown) - if !ok { - klog.V(2).Infof("Couldn't get object from tombstone %#v", obj) - return - } - sink, ok = tombstone.Obj.(*auditregv1alpha1.AuditSink) - if !ok { - klog.V(2).Infof("Tombstone contained object that is not an AuditSink: %#v", obj) - return - } - } - manager.deleteSink(sink) - }, - }) - - return manager, nil -} - -type backend struct { - // delegateUpdateMutex holds an update lock on the delegates - delegateUpdateMutex sync.Mutex - stopped bool - config *Config - delegates atomic.Value - webhookClientManager webhook.ClientManager - recorder record.EventRecorder -} - -type syncedDelegates map[types.UID]*delegate - -// Names returns the names of the delegate configurations -func (s syncedDelegates) Names() []string { - names := []string{} - for _, delegate := range s { - names = append(names, delegate.configuration.Name) - } - return names -} - -// ProcessEvents proccesses the given events per current delegate map -func (b *backend) ProcessEvents(events ...*auditinternal.Event) bool { - for _, d := range b.GetDelegates() { - d.ProcessEvents(events...) - } - // Returning true regardless of results, since dynamic audit backends - // can never cause apiserver request to fail. - return true -} - -// Run starts a goroutine that propagates the shutdown signal, -// individual delegates are ran as they are created. -func (b *backend) Run(stopCh <-chan struct{}) error { - go func() { - <-stopCh - b.stopAllDelegates() - }() - return nil -} - -// stopAllDelegates closes the stopChan for every delegate to enable -// goroutines to terminate gracefully. This is a helper method to propagate -// the primary stopChan to the current delegate map. -func (b *backend) stopAllDelegates() { - b.delegateUpdateMutex.Lock() - defer b.delegateUpdateMutex.Unlock() - if b.stopped { - return - } - b.stopped = true - for _, d := range b.GetDelegates() { - close(d.stopChan) - } -} - -// Shutdown calls the shutdown method on all delegates. The stopChan should -// be closed before this is called. -func (b *backend) Shutdown() { - for _, d := range b.GetDelegates() { - d.Shutdown() - } -} - -// GetDelegates retrieves current delegates in a safe manner -func (b *backend) GetDelegates() syncedDelegates { - return b.delegates.Load().(syncedDelegates) -} - -// copyDelegates returns a copied delegate map -func (b *backend) copyDelegates() syncedDelegates { - c := make(syncedDelegates) - for u, s := range b.GetDelegates() { - c[u] = s - } - return c -} - -// setDelegates sets the current delegates in a safe manner -func (b *backend) setDelegates(delegates syncedDelegates) { - b.delegates.Store(delegates) -} - -// addSink is called by the shared informer when a sink is added -func (b *backend) addSink(sink *auditregv1alpha1.AuditSink) { - b.delegateUpdateMutex.Lock() - defer b.delegateUpdateMutex.Unlock() - if b.stopped { - msg := fmt.Sprintf("Could not add audit sink %q uid: %s. Update to all delegates is stopped.", sink.Name, sink.UID) - klog.Error(msg) - return - } - delegates := b.copyDelegates() - if _, ok := delegates[sink.UID]; ok { - klog.Errorf("Audit sink %q uid: %s already exists, could not readd", sink.Name, sink.UID) - return - } - d, err := b.createAndStartDelegate(sink) - if err != nil { - msg := fmt.Sprintf("Could not add audit sink %q: %v", sink.Name, err) - klog.Error(msg) - b.recorder.Event(sink, corev1.EventTypeWarning, "CreateFailed", msg) - return - } - delegates[sink.UID] = d - b.setDelegates(delegates) - klog.V(2).Infof("Added audit sink: %s", sink.Name) - klog.V(2).Infof("Current audit sinks: %v", delegates.Names()) -} - -// updateSink is called by the shared informer when a sink is updated. -// The new sink is only rebuilt on spec changes. The new sink must not have -// the same uid as the previous. The new sink will be started before the old -// one is shutdown so no events will be lost -func (b *backend) updateSink(oldSink, newSink *auditregv1alpha1.AuditSink) { - b.delegateUpdateMutex.Lock() - defer b.delegateUpdateMutex.Unlock() - if b.stopped { - msg := fmt.Sprintf("Could not update old audit sink %q to new audit sink %q. Update to all delegates is stopped.", oldSink.Name, newSink.Name) - klog.Error(msg) - return - } - delegates := b.copyDelegates() - oldDelegate, ok := delegates[oldSink.UID] - if !ok { - klog.Errorf("Could not update audit sink %q uid: %s, old sink does not exist", - oldSink.Name, oldSink.UID) - return - } - - // check if spec has changed - eq := reflect.DeepEqual(oldSink.Spec, newSink.Spec) - if eq { - delete(delegates, oldSink.UID) - delegates[newSink.UID] = oldDelegate - b.setDelegates(delegates) - } else { - d, err := b.createAndStartDelegate(newSink) - if err != nil { - msg := fmt.Sprintf("Could not update audit sink %q: %v", oldSink.Name, err) - klog.Error(msg) - b.recorder.Event(newSink, corev1.EventTypeWarning, "UpdateFailed", msg) - return - } - delete(delegates, oldSink.UID) - delegates[newSink.UID] = d - b.setDelegates(delegates) - - // graceful shutdown in goroutine as to not block - go oldDelegate.gracefulShutdown() - } - - klog.V(2).Infof("Updated audit sink: %s", newSink.Name) - klog.V(2).Infof("Current audit sinks: %v", delegates.Names()) -} - -// deleteSink is called by the shared informer when a sink is deleted -func (b *backend) deleteSink(sink *auditregv1alpha1.AuditSink) { - b.delegateUpdateMutex.Lock() - defer b.delegateUpdateMutex.Unlock() - if b.stopped { - msg := fmt.Sprintf("Could not delete audit sink %q uid: %s. Update to all delegates is stopped.", sink.Name, sink.UID) - klog.Warning(msg) - return - } - delegates := b.copyDelegates() - delegate, ok := delegates[sink.UID] - if !ok { - klog.Errorf("Could not delete audit sink %q uid: %s, does not exist", sink.Name, sink.UID) - return - } - delete(delegates, sink.UID) - b.setDelegates(delegates) - - // graceful shutdown in goroutine as to not block - go delegate.gracefulShutdown() - klog.V(2).Infof("Deleted audit sink: %s", sink.Name) - klog.V(2).Infof("Current audit sinks: %v", delegates.Names()) -} - -// createAndStartDelegate will build a delegate from an audit sink configuration and run it -func (b *backend) createAndStartDelegate(sink *auditregv1alpha1.AuditSink) (*delegate, error) { - f := factory{ - config: b.config, - webhookClientManager: b.webhookClientManager, - sink: sink, - } - delegate, err := f.BuildDelegate() - if err != nil { - return nil, err - } - err = delegate.Run(delegate.stopChan) - if err != nil { - return nil, err - } - return delegate, nil -} - -// String returns a string representation of the backend -func (b *backend) String() string { - var delegateStrings []string - for _, delegate := range b.GetDelegates() { - delegateStrings = append(delegateStrings, fmt.Sprintf("%s", delegate)) - } - return fmt.Sprintf("%s[%s]", PluginName, strings.Join(delegateStrings, ",")) -} diff --git a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced/BUILD b/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced/BUILD deleted file mode 100644 index 8a4c454dbe0..00000000000 --- a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["enforced.go"], - importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced", - importpath = "k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/audit:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/audit/event:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/audit/policy:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["enforced_test.go"], - embed = [":go_default_library"], - deps = [ - "//staging/src/k8s.io/api/authentication/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/audit/policy:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//staging/src/k8s.io/apiserver/plugin/pkg/audit/fake:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced/enforced.go b/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced/enforced.go deleted file mode 100644 index 8feb523bedf..00000000000 --- a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced/enforced.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2018 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 enforced - -import ( - "fmt" - - auditinternal "k8s.io/apiserver/pkg/apis/audit" - "k8s.io/apiserver/pkg/audit" - ev "k8s.io/apiserver/pkg/audit/event" - "k8s.io/apiserver/pkg/audit/policy" -) - -// PluginName is the name reported in error metrics. -const PluginName = "enforced" - -// Backend filters audit events according to the policy -// trimming them as necessary to match the level -type Backend struct { - policyChecker policy.Checker - delegateBackend audit.Backend -} - -// NewBackend returns an enforced audit backend that wraps delegate backend. -// Enforced backend automatically runs and shuts down the delegate backend. -func NewBackend(delegate audit.Backend, p policy.Checker) audit.Backend { - return &Backend{ - policyChecker: p, - delegateBackend: delegate, - } -} - -// Run the delegate backend -func (b Backend) Run(stopCh <-chan struct{}) error { - return b.delegateBackend.Run(stopCh) -} - -// Shutdown the delegate backend -func (b Backend) Shutdown() { - b.delegateBackend.Shutdown() -} - -// ProcessEvents enforces policy on a shallow copy of the given event -// dropping any sections that don't conform -func (b Backend) ProcessEvents(events ...*auditinternal.Event) bool { - for _, event := range events { - if event == nil { - continue - } - attr, err := ev.NewAttributes(event) - if err != nil { - audit.HandlePluginError(PluginName, err, event) - continue - } - level, stages := b.policyChecker.LevelAndStages(attr) - if level == auditinternal.LevelNone { - continue - } - // make shallow copy before modifying to satisfy interface definition - ev := *event - e, err := policy.EnforcePolicy(&ev, level, stages) - if err != nil { - audit.HandlePluginError(PluginName, err, event) - continue - } - if e == nil { - continue - } - b.delegateBackend.ProcessEvents(e) - } - // Returning true regardless of results, since dynamic audit backends - // can never cause apiserver request to fail. - return true -} - -// String returns a string representation of the backend -func (b Backend) String() string { - return fmt.Sprintf("%s<%s>", PluginName, b.delegateBackend) -} diff --git a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/factory.go b/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/factory.go deleted file mode 100644 index f9ce7abf790..00000000000 --- a/vendor/k8s.io/apiserver/plugin/pkg/audit/dynamic/factory.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2018 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 dynamic - -import ( - "fmt" - "time" - - auditregv1alpha1 "k8s.io/api/auditregistration/v1alpha1" - "k8s.io/apiserver/pkg/audit" - "k8s.io/apiserver/pkg/audit/policy" - auditutil "k8s.io/apiserver/pkg/audit/util" - "k8s.io/apiserver/pkg/util/webhook" - bufferedplugin "k8s.io/apiserver/plugin/pkg/audit/buffered" - enforcedplugin "k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced" - webhookplugin "k8s.io/apiserver/plugin/pkg/audit/webhook" -) - -// TODO: find a common place for all the default retry backoffs -const retryBackoff = 500 * time.Millisecond - -// factory builds a delegate from an AuditSink -type factory struct { - config *Config - webhookClientManager webhook.ClientManager - sink *auditregv1alpha1.AuditSink -} - -// BuildDelegate creates a delegate from the AuditSink object -func (f *factory) BuildDelegate() (*delegate, error) { - backend, err := f.buildWebhookBackend() - if err != nil { - return nil, err - } - backend = f.applyEnforcedOpts(backend) - backend = f.applyBufferedOpts(backend) - ch := make(chan struct{}) - return &delegate{ - Backend: backend, - configuration: f.sink, - stopChan: ch, - }, nil -} - -func (f *factory) buildWebhookBackend() (audit.Backend, error) { - hookClient := auditutil.HookClientConfigForSink(f.sink) - client, err := f.webhookClientManager.HookClient(hookClient) - if err != nil { - return nil, fmt.Errorf("could not create webhook client: %v", err) - } - backend := webhookplugin.NewDynamicBackend(client, retryBackoff) - return backend, nil -} - -func (f *factory) applyEnforcedOpts(delegate audit.Backend) audit.Backend { - pol := policy.ConvertDynamicPolicyToInternal(&f.sink.Spec.Policy) - checker := policy.NewChecker(pol) - eb := enforcedplugin.NewBackend(delegate, checker) - return eb -} - -func (f *factory) applyBufferedOpts(delegate audit.Backend) audit.Backend { - bc := f.config.BufferedConfig - tc := f.sink.Spec.Webhook.Throttle - if tc != nil { - bc.ThrottleEnable = true - if tc.Burst != nil { - bc.ThrottleBurst = int(*tc.Burst) - } - if tc.QPS != nil { - bc.ThrottleQPS = float32(*tc.QPS) - } - } else { - bc.ThrottleEnable = false - } - return bufferedplugin.NewBackend(delegate, *bc) -} diff --git a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile/BUILD b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile/BUILD deleted file mode 100644 index fc5981bd6b5..00000000000 --- a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["passwordfile_test.go"], - embed = [":go_default_library"], - deps = ["//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["passwordfile.go"], - importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile", - importpath = "k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile", - deps = [ - "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/klog:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile/passwordfile.go b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile/passwordfile.go deleted file mode 100644 index e17a5eb0de8..00000000000 --- a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile/passwordfile.go +++ /dev/null @@ -1,95 +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 passwordfile - -import ( - "context" - "crypto/subtle" - "encoding/csv" - "fmt" - "io" - "os" - "strings" - - "k8s.io/klog" - - "k8s.io/apiserver/pkg/authentication/authenticator" - "k8s.io/apiserver/pkg/authentication/user" -) - -// PasswordAuthenticator authenticates users by password -type PasswordAuthenticator struct { - users map[string]*userPasswordInfo -} - -type userPasswordInfo struct { - info *user.DefaultInfo - password string -} - -// NewCSV returns a PasswordAuthenticator, populated from a CSV file. -// The CSV file must contain records in the format "password,username,useruid" -func NewCSV(path string) (*PasswordAuthenticator, error) { - file, err := os.Open(path) - if err != nil { - return nil, err - } - defer file.Close() - - recordNum := 0 - users := make(map[string]*userPasswordInfo) - reader := csv.NewReader(file) - reader.FieldsPerRecord = -1 - for { - record, err := reader.Read() - if err == io.EOF { - break - } - if err != nil { - return nil, err - } - if len(record) < 3 { - return nil, fmt.Errorf("password file '%s' must have at least 3 columns (password, user name, user uid), found %d", path, len(record)) - } - obj := &userPasswordInfo{ - info: &user.DefaultInfo{Name: record[1], UID: record[2]}, - password: record[0], - } - if len(record) >= 4 { - obj.info.Groups = strings.Split(record[3], ",") - } - recordNum++ - if _, exist := users[obj.info.Name]; exist { - klog.Warningf("duplicate username '%s' has been found in password file '%s', record number '%d'", obj.info.Name, path, recordNum) - } - users[obj.info.Name] = obj - } - - return &PasswordAuthenticator{users}, nil -} - -// AuthenticatePassword returns user info if authentication is successful, nil otherwise -func (a *PasswordAuthenticator) AuthenticatePassword(ctx context.Context, username, password string) (*authenticator.Response, bool, error) { - user, ok := a.users[username] - if !ok { - return nil, false, nil - } - if subtle.ConstantTimeCompare([]byte(user.password), []byte(password)) == 0 { - return nil, false, nil - } - return &authenticator.Response{User: user.info}, true, nil -} diff --git a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth/BUILD b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth/BUILD deleted file mode 100644 index 4d6a346ba84..00000000000 --- a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["basicauth_test.go"], - embed = [":go_default_library"], - deps = [ - "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["basicauth.go"], - importmap = "k8s.io/kubernetes/vendor/k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth", - importpath = "k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth", - deps = ["//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth/basicauth.go b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth/basicauth.go deleted file mode 100644 index 7b8894a915c..00000000000 --- a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth/basicauth.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2014 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 basicauth - -import ( - "errors" - "net/http" - - "k8s.io/apiserver/pkg/authentication/authenticator" -) - -// Authenticator authenticates requests using basic auth -type Authenticator struct { - auth authenticator.Password -} - -// New returns a request authenticator that validates credentials using the provided password authenticator -func New(auth authenticator.Password) *Authenticator { - return &Authenticator{auth} -} - -var errInvalidAuth = errors.New("invalid username/password combination") - -// AuthenticateRequest authenticates the request using the "Authorization: Basic" header in the request -func (a *Authenticator) AuthenticateRequest(req *http.Request) (*authenticator.Response, bool, error) { - username, password, found := req.BasicAuth() - if !found { - return nil, false, nil - } - - resp, ok, err := a.auth.AuthenticatePassword(req.Context(), username, password) - - // If the password authenticator didn't error, provide a default error - if !ok && err == nil { - err = errInvalidAuth - } - - return resp, ok, err -} diff --git a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/BUILD b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/BUILD index e0cba0dd20e..44b5fc87c4c 100644 --- a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/BUILD +++ b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/BUILD @@ -16,7 +16,7 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//vendor/github.com/coreos/go-oidc:go_default_library", "//vendor/gopkg.in/square/go-jose.v2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -32,7 +32,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/client-go/util/cert:go_default_library", "//vendor/github.com/coreos/go-oidc:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/oidc.go b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/oidc.go index 8442e4256d1..2c4563aae21 100644 --- a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/oidc.go +++ b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc/oidc.go @@ -43,7 +43,7 @@ import ( "time" oidc "github.com/coreos/go-oidc" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/wait" diff --git a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/BUILD b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/BUILD index 2de5ec78738..76b89d97962 100644 --- a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/BUILD +++ b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/BUILD @@ -45,7 +45,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go index 8307dd6f32d..b04c6a21544 100644 --- a/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go +++ b/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go @@ -34,7 +34,7 @@ import ( "k8s.io/apiserver/pkg/util/webhook" "k8s.io/client-go/kubernetes/scheme" authenticationv1client "k8s.io/client-go/kubernetes/typed/authentication/v1" - "k8s.io/klog" + "k8s.io/klog/v2" ) const retryBackoff = 500 * time.Millisecond diff --git a/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/BUILD b/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/BUILD index 60276052359..4b31b4dd459 100644 --- a/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/BUILD +++ b/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/BUILD @@ -45,7 +45,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go b/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go index 3383700640d..d7f4f631ec9 100644 --- a/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go +++ b/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go @@ -23,7 +23,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" authorizationv1 "k8s.io/api/authorization/v1" authorizationv1beta1 "k8s.io/api/authorization/v1beta1" diff --git a/vendor/k8s.io/cli-runtime/pkg/genericclioptions/BUILD b/vendor/k8s.io/cli-runtime/pkg/genericclioptions/BUILD index 6bad9bedbf2..c1606ff9aac 100644 --- a/vendor/k8s.io/cli-runtime/pkg/genericclioptions/BUILD +++ b/vendor/k8s.io/cli-runtime/pkg/genericclioptions/BUILD @@ -5,6 +5,7 @@ go_library( srcs = [ "builder_flags.go", "builder_flags_fake.go", + "client_config.go", "config_flags.go", "config_flags_fake.go", "doc.go", diff --git a/vendor/k8s.io/cli-runtime/pkg/genericclioptions/client_config.go b/vendor/k8s.io/cli-runtime/pkg/genericclioptions/client_config.go new file mode 100644 index 00000000000..f25af27df2d --- /dev/null +++ b/vendor/k8s.io/cli-runtime/pkg/genericclioptions/client_config.go @@ -0,0 +1,71 @@ +/* +Copyright 2020 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 genericclioptions + +import ( + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" +) + +var ( + ErrEmptyConfig = clientcmd.NewEmptyConfigError(`Missing or incomplete configuration info. Please point to an existing, complete config file: + + + 1. Via the command-line flag --kubeconfig + 2. Via the KUBECONFIG environment variable + 3. In your home directory as ~/.kube/config + +To view or setup config directly use the 'config' command.`) +) + +var _ = clientcmd.ClientConfig(&clientConfig{}) + +type clientConfig struct { + defaultClientConfig clientcmd.ClientConfig +} + +func (c *clientConfig) RawConfig() (clientcmdapi.Config, error) { + config, err := c.defaultClientConfig.RawConfig() + // replace client-go's ErrEmptyConfig error with our custom, more verbose version + if clientcmd.IsEmptyConfig(err) { + return config, ErrEmptyConfig + } + return config, err +} + +func (c *clientConfig) ClientConfig() (*restclient.Config, error) { + config, err := c.defaultClientConfig.ClientConfig() + // replace client-go's ErrEmptyConfig error with our custom, more verbose version + if clientcmd.IsEmptyConfig(err) { + return config, ErrEmptyConfig + } + return config, err +} + +func (c *clientConfig) Namespace() (string, bool, error) { + namespace, ok, err := c.defaultClientConfig.Namespace() + // replace client-go's ErrEmptyConfig error with our custom, more verbose version + if clientcmd.IsEmptyConfig(err) { + return namespace, ok, ErrEmptyConfig + } + return namespace, ok, err +} + +func (c *clientConfig) ConfigAccess() clientcmd.ConfigAccess { + return c.defaultClientConfig.ConfigAccess() +} diff --git a/vendor/k8s.io/cli-runtime/pkg/genericclioptions/config_flags.go b/vendor/k8s.io/cli-runtime/pkg/genericclioptions/config_flags.go index 5ded3e98ba8..91d1a4b52c8 100644 --- a/vendor/k8s.io/cli-runtime/pkg/genericclioptions/config_flags.go +++ b/vendor/k8s.io/cli-runtime/pkg/genericclioptions/config_flags.go @@ -17,7 +17,6 @@ limitations under the License. package genericclioptions import ( - "errors" "os" "path/filepath" "regexp" @@ -53,19 +52,11 @@ const ( flagUsername = "username" flagPassword = "password" flagTimeout = "request-timeout" - flagHTTPCacheDir = "cache-dir" + flagCacheDir = "cache-dir" ) var ( - defaultCacheDir = filepath.Join(homedir.HomeDir(), ".kube", "http-cache") - - ErrEmptyConfig = errors.New(`Missing or incomplete configuration info. Please point to an existing, complete config file: - - 1. Via the command-line flag --kubeconfig - 2. Via the KUBECONFIG environment variable - 3. In your home directory as ~/.kube/config - -To view or setup config directly use the 'config' command.`) + defaultCacheDir = filepath.Join(homedir.HomeDir(), ".kube", "cache") ) // RESTClientGetter is an interface that the ConfigFlags describe to provide an easier way to mock for commands @@ -121,12 +112,7 @@ type ConfigFlags struct { // to a .kubeconfig file, loading rules, and config flag overrides. // Expects the AddFlags method to have been called. func (f *ConfigFlags) ToRESTConfig() (*rest.Config, error) { - config, err := f.ToRawKubeConfigLoader().ClientConfig() - // replace client-go's ErrEmptyConfig error with our custom, more verbose version - if clientcmd.IsEmptyConfig(err) { - return nil, ErrEmptyConfig - } - return config, err + return f.ToRawKubeConfigLoader().ClientConfig() } // ToRawKubeConfigLoader binds config flag values to config overrides @@ -206,16 +192,11 @@ func (f *ConfigFlags) toRawKubeConfigLoader() clientcmd.ClientConfig { overrides.Timeout = *f.Timeout } - var clientConfig clientcmd.ClientConfig - // we only have an interactive prompt when a password is allowed if f.Password == nil { - clientConfig = clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, overrides) - } else { - clientConfig = clientcmd.NewInteractiveDeferredLoadingClientConfig(loadingRules, overrides, os.Stdin) + return &clientConfig{clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, overrides)} } - - return clientConfig + return &clientConfig{clientcmd.NewInteractiveDeferredLoadingClientConfig(loadingRules, overrides, os.Stdin)} } // toRawKubePersistentConfigLoader binds config flag values to config overrides @@ -245,14 +226,16 @@ func (f *ConfigFlags) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, e // double it just so we don't end up here again for a while. This config is only used for discovery. config.Burst = 100 - // retrieve a user-provided value for the "cache-dir" - // defaulting to ~/.kube/http-cache if no user-value is given. - httpCacheDir := defaultCacheDir - if f.CacheDir != nil { - httpCacheDir = *f.CacheDir - } + cacheDir := defaultCacheDir + + // retrieve a user-provided value for the "cache-dir" + // override httpCacheDir and discoveryCacheDir if user-value is given. + if f.CacheDir != nil { + cacheDir = *f.CacheDir + } + httpCacheDir := filepath.Join(cacheDir, "http") + discoveryCacheDir := computeDiscoverCacheDir(filepath.Join(cacheDir, "discovery"), config.Host) - discoveryCacheDir := computeDiscoverCacheDir(filepath.Join(homedir.HomeDir(), ".kube", "cache", "discovery"), config.Host) return diskcached.NewCachedDiscoveryClientForConfig(config, discoveryCacheDir, httpCacheDir, time.Duration(10*time.Minute)) } @@ -274,7 +257,7 @@ func (f *ConfigFlags) AddFlags(flags *pflag.FlagSet) { flags.StringVar(f.KubeConfig, "kubeconfig", *f.KubeConfig, "Path to the kubeconfig file to use for CLI requests.") } if f.CacheDir != nil { - flags.StringVar(f.CacheDir, flagHTTPCacheDir, *f.CacheDir, "Default HTTP cache directory") + flags.StringVar(f.CacheDir, flagCacheDir, *f.CacheDir, "Default cache directory") } // add config options diff --git a/vendor/k8s.io/cli-runtime/pkg/genericclioptions/config_flags_fake.go b/vendor/k8s.io/cli-runtime/pkg/genericclioptions/config_flags_fake.go index 64e9a688330..ff986b027f4 100644 --- a/vendor/k8s.io/cli-runtime/pkg/genericclioptions/config_flags_fake.go +++ b/vendor/k8s.io/cli-runtime/pkg/genericclioptions/config_flags_fake.go @@ -96,7 +96,7 @@ type namespacedClientConfig struct { } func (c *namespacedClientConfig) Namespace() (string, bool, error) { - return c.namespace, false, nil + return c.namespace, len(c.namespace) > 0, nil } func (c *namespacedClientConfig) RawConfig() (clientcmdapi.Config, error) { diff --git a/vendor/k8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags.go b/vendor/k8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags.go index 0ebd6a6498b..b5d114de73c 100644 --- a/vendor/k8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags.go +++ b/vendor/k8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags.go @@ -31,8 +31,9 @@ import ( // this allows a user to specify a template format value // as --output=jsonpath= var jsonFormats = map[string]bool{ - "jsonpath": true, - "jsonpath-file": true, + "jsonpath": true, + "jsonpath-file": true, + "jsonpath-as-json": true, } // JSONPathPrintFlags provides default flags necessary for template printing. @@ -105,6 +106,11 @@ func (f *JSONPathPrintFlags) ToPrinter(templateFormat string) (printers.Resource } p.AllowMissingKeys(allowMissingKeys) + + if templateFormat == "jsonpath-as-json" { + p.EnableJSONOutput(true) + } + return p, nil } diff --git a/vendor/k8s.io/cli-runtime/pkg/resource/BUILD b/vendor/k8s.io/cli-runtime/pkg/resource/BUILD index 228dc62b910..9b79e978da2 100644 --- a/vendor/k8s.io/cli-runtime/pkg/resource/BUILD +++ b/vendor/k8s.io/cli-runtime/pkg/resource/BUILD @@ -45,7 +45,7 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/restmapper:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", "//vendor/golang.org/x/text/encoding/unicode:go_default_library", "//vendor/golang.org/x/text/transform:go_default_library", "//vendor/gopkg.in/yaml.v2:go_default_library", @@ -88,7 +88,7 @@ go_test( "//staging/src/k8s.io/client-go/restmapper:go_default_library", "//staging/src/k8s.io/client-go/util/testing:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto/testing:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", diff --git a/vendor/k8s.io/cli-runtime/pkg/resource/builder.go b/vendor/k8s.io/cli-runtime/pkg/resource/builder.go index 88314404f64..b23b9c0e079 100644 --- a/vendor/k8s.io/cli-runtime/pkg/resource/builder.go +++ b/vendor/k8s.io/cli-runtime/pkg/resource/builder.go @@ -100,8 +100,6 @@ type Builder struct { singleItemImplied bool - export bool - schema ContentValidator // fakeClientFn is used for testing @@ -461,12 +459,6 @@ func (b *Builder) FieldSelectorParam(s string) *Builder { return b } -// ExportParam accepts the export boolean for these resources -func (b *Builder) ExportParam(export bool) *Builder { - b.export = export - return b -} - // NamespaceParam accepts the namespace that these resources should be // considered under from - used by DefaultNamespace() and RequireNamespace() func (b *Builder) NamespaceParam(namespace string) *Builder { @@ -870,7 +862,7 @@ func (b *Builder) visitBySelector() *Result { if mapping.Scope.Name() != meta.RESTScopeNameNamespace { selectorNamespace = "" } - visitors = append(visitors, NewSelector(client, mapping, selectorNamespace, labelSelector, fieldSelector, b.export, b.limitChunks)) + visitors = append(visitors, NewSelector(client, mapping, selectorNamespace, labelSelector, fieldSelector, b.limitChunks)) } if b.continueOnError { result.visitor = EagerVisitorList(visitors) @@ -970,7 +962,6 @@ func (b *Builder) visitByResource() *Result { Mapping: mapping, Namespace: selectorNamespace, Name: tuple.Name, - Export: b.export, } items = append(items, info) } @@ -1035,7 +1026,6 @@ func (b *Builder) visitByName() *Result { Mapping: mapping, Namespace: selectorNamespace, Name: name, - Export: b.export, } visitors = append(visitors, info) } diff --git a/vendor/k8s.io/cli-runtime/pkg/resource/dry_run_verifier.go b/vendor/k8s.io/cli-runtime/pkg/resource/dry_run_verifier.go index aac123e5dc2..49ab6f861cf 100644 --- a/vendor/k8s.io/cli-runtime/pkg/resource/dry_run_verifier.go +++ b/vendor/k8s.io/cli-runtime/pkg/resource/dry_run_verifier.go @@ -20,7 +20,7 @@ import ( "errors" "fmt" - openapi_v2 "github.com/googleapis/gnostic/OpenAPIv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" yaml "gopkg.in/yaml.v2" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/discovery" diff --git a/vendor/k8s.io/cli-runtime/pkg/resource/helper.go b/vendor/k8s.io/cli-runtime/pkg/resource/helper.go index beebd805440..0132759d022 100644 --- a/vendor/k8s.io/cli-runtime/pkg/resource/helper.go +++ b/vendor/k8s.io/cli-runtime/pkg/resource/helper.go @@ -18,7 +18,6 @@ package resource import ( "context" - "strconv" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -46,6 +45,10 @@ type Helper struct { // and on resources that support dry-run. If the apiserver or the resource // does not support dry-run, then the change will be persisted to storage. ServerDryRun bool + + // FieldManager is the name associated with the actor or entity that is making + // changes. + FieldManager string } // NewHelper creates a Helper from a ResourceMapping @@ -64,27 +67,26 @@ func (m *Helper) DryRun(dryRun bool) *Helper { return m } -func (m *Helper) Get(namespace, name string, export bool) (runtime.Object, error) { +// WithFieldManager sets the field manager option to indicate the actor or entity +// that is making changes in a create or update operation. +func (m *Helper) WithFieldManager(fieldManager string) *Helper { + m.FieldManager = fieldManager + return m +} + +func (m *Helper) Get(namespace, name string) (runtime.Object, error) { req := m.RESTClient.Get(). NamespaceIfScoped(namespace, m.NamespaceScoped). Resource(m.Resource). Name(name) - if export { - // TODO: I should be part of GetOptions - req.Param("export", strconv.FormatBool(export)) - } return req.Do(context.TODO()).Get() } -func (m *Helper) List(namespace, apiVersion string, export bool, options *metav1.ListOptions) (runtime.Object, error) { +func (m *Helper) List(namespace, apiVersion string, options *metav1.ListOptions) (runtime.Object, error) { req := m.RESTClient.Get(). NamespaceIfScoped(namespace, m.NamespaceScoped). Resource(m.Resource). VersionedParams(options, metav1.ParameterCodec) - if export { - // TODO: I should be part of ListOptions - req.Param("export", strconv.FormatBool(export)) - } return req.Do(context.TODO()).Get() } @@ -141,6 +143,9 @@ func (m *Helper) CreateWithOptions(namespace string, modify bool, obj runtime.Ob if m.ServerDryRun { options.DryRun = []string{metav1.DryRunAll} } + if m.FieldManager != "" { + options.FieldManager = m.FieldManager + } if modify { // Attempt to version the object based on client logic. version, err := metadataAccessor.ResourceVersion(obj) @@ -174,6 +179,9 @@ func (m *Helper) Patch(namespace, name string, pt types.PatchType, data []byte, if m.ServerDryRun { options.DryRun = []string{metav1.DryRunAll} } + if m.FieldManager != "" { + options.FieldManager = m.FieldManager + } return m.RESTClient.Patch(pt). NamespaceIfScoped(namespace, m.NamespaceScoped). Resource(m.Resource). @@ -190,6 +198,9 @@ func (m *Helper) Replace(namespace, name string, overwrite bool, obj runtime.Obj if m.ServerDryRun { options.DryRun = []string{metav1.DryRunAll} } + if m.FieldManager != "" { + options.FieldManager = m.FieldManager + } // Attempt to version the object based on client logic. version, err := metadataAccessor.ResourceVersion(obj) diff --git a/vendor/k8s.io/cli-runtime/pkg/resource/selector.go b/vendor/k8s.io/cli-runtime/pkg/resource/selector.go index 0c0bdbec41c..d29dfc46c39 100644 --- a/vendor/k8s.io/cli-runtime/pkg/resource/selector.go +++ b/vendor/k8s.io/cli-runtime/pkg/resource/selector.go @@ -32,19 +32,17 @@ type Selector struct { Namespace string LabelSelector string FieldSelector string - Export bool LimitChunks int64 } // NewSelector creates a resource selector which hides details of getting items by their label selector. -func NewSelector(client RESTClient, mapping *meta.RESTMapping, namespace, labelSelector, fieldSelector string, export bool, limitChunks int64) *Selector { +func NewSelector(client RESTClient, mapping *meta.RESTMapping, namespace, labelSelector, fieldSelector string, limitChunks int64) *Selector { return &Selector{ Client: client, Mapping: mapping, Namespace: namespace, LabelSelector: labelSelector, FieldSelector: fieldSelector, - Export: export, LimitChunks: limitChunks, } } @@ -56,7 +54,6 @@ func (r *Selector) Visit(fn VisitorFunc) error { list, err := NewHelper(r.Client, r.Mapping).List( r.Namespace, r.ResourceMapping().GroupVersionKind.GroupVersion().String(), - r.Export, &metav1.ListOptions{ LabelSelector: r.LabelSelector, FieldSelector: r.FieldSelector, diff --git a/vendor/k8s.io/cli-runtime/pkg/resource/visitor.go b/vendor/k8s.io/cli-runtime/pkg/resource/visitor.go index 54fbd4c7728..fbd52e12f20 100644 --- a/vendor/k8s.io/cli-runtime/pkg/resource/visitor.go +++ b/vendor/k8s.io/cli-runtime/pkg/resource/visitor.go @@ -88,8 +88,6 @@ type Info struct { // but if set it should be equal to or newer than the resource version of the // object (however the server defines resource version). ResourceVersion string - // Optional, should this resource be exported, stripped of cluster-specific and instance specific fields - Export bool } // Visit implements Visitor @@ -99,7 +97,7 @@ func (i *Info) Visit(fn VisitorFunc) error { // Get retrieves the object from the Namespace and Name fields func (i *Info) Get() (err error) { - obj, err := NewHelper(i.Client, i.Mapping).Get(i.Namespace, i.Name, i.Export) + obj, err := NewHelper(i.Client, i.Mapping).Get(i.Namespace, i.Name) if err != nil { if errors.IsNotFound(err) && len(i.Namespace) > 0 && i.Namespace != metav1.NamespaceDefault && i.Namespace != metav1.NamespaceAll { err2 := i.Client.Get().AbsPath("api", "v1", "namespaces", i.Namespace).Do(context.TODO()).Error() diff --git a/vendor/k8s.io/client-go/discovery/BUILD b/vendor/k8s.io/client-go/discovery/BUILD index 3ad039dd358..bedfdec49d3 100644 --- a/vendor/k8s.io/client-go/discovery/BUILD +++ b/vendor/k8s.io/client-go/discovery/BUILD @@ -27,7 +27,7 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//vendor/github.com/golang/protobuf/proto:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", ], ) @@ -66,7 +66,7 @@ go_test( "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/rest/fake:go_default_library", "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/discovery/cached/disk/BUILD b/vendor/k8s.io/client-go/discovery/cached/disk/BUILD index 3b037bcdca5..247964e4740 100644 --- a/vendor/k8s.io/client-go/discovery/cached/disk/BUILD +++ b/vendor/k8s.io/client-go/discovery/cached/disk/BUILD @@ -16,11 +16,11 @@ go_library( "//staging/src/k8s.io/client-go/discovery:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", "//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", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -39,7 +39,7 @@ go_test( "//staging/src/k8s.io/client-go/discovery:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/rest/fake:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/discovery/cached/disk/cached_discovery.go b/vendor/k8s.io/client-go/discovery/cached/disk/cached_discovery.go index fd8b61d158d..6a35dcc604c 100644 --- a/vendor/k8s.io/client-go/discovery/cached/disk/cached_discovery.go +++ b/vendor/k8s.io/client-go/discovery/cached/disk/cached_discovery.go @@ -25,8 +25,8 @@ import ( "sync" "time" - openapi_v2 "github.com/googleapis/gnostic/OpenAPIv2" - "k8s.io/klog" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" + "k8s.io/klog/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -268,8 +268,6 @@ func (d *CachedDiscoveryClient) Invalidate() { // CachedDiscoveryClient cache data. If httpCacheDir is empty, the restconfig's transport will not // be updated with a roundtripper that understands cache responses. // If discoveryCacheDir is empty, cached server resource data will be looked up in the current directory. -// TODO(juanvallejo): the value of "--cache-dir" should be honored. Consolidate discoveryCacheDir with httpCacheDir -// so that server resources and http-cache data are stored in the same location, provided via config flags. func NewCachedDiscoveryClientForConfig(config *restclient.Config, discoveryCacheDir, httpCacheDir string, ttl time.Duration) (*CachedDiscoveryClient, error) { if len(httpCacheDir) > 0 { // update the given restconfig with a custom roundtripper that diff --git a/vendor/k8s.io/client-go/discovery/cached/disk/round_tripper.go b/vendor/k8s.io/client-go/discovery/cached/disk/round_tripper.go index 1dfb8297d90..bda2e5cf4ad 100644 --- a/vendor/k8s.io/client-go/discovery/cached/disk/round_tripper.go +++ b/vendor/k8s.io/client-go/discovery/cached/disk/round_tripper.go @@ -24,7 +24,7 @@ import ( "github.com/gregjones/httpcache" "github.com/gregjones/httpcache/diskcache" "github.com/peterbourgon/diskv" - "k8s.io/klog" + "k8s.io/klog/v2" ) type cacheRoundTripper struct { diff --git a/vendor/k8s.io/client-go/discovery/cached/memory/BUILD b/vendor/k8s.io/client-go/discovery/cached/memory/BUILD index ffeee040b0f..f7279375833 100644 --- a/vendor/k8s.io/client-go/discovery/cached/memory/BUILD +++ b/vendor/k8s.io/client-go/discovery/cached/memory/BUILD @@ -29,7 +29,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/version:go_default_library", "//staging/src/k8s.io/client-go/discovery:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/discovery/cached/memory/memcache.go b/vendor/k8s.io/client-go/discovery/cached/memory/memcache.go index 82a7cc470f3..9de389fa7e4 100644 --- a/vendor/k8s.io/client-go/discovery/cached/memory/memcache.go +++ b/vendor/k8s.io/client-go/discovery/cached/memory/memcache.go @@ -19,12 +19,10 @@ package memory import ( "errors" "fmt" - "net" - "net/url" "sync" "syscall" - "github.com/googleapis/gnostic/OpenAPIv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" errorsutil "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -64,19 +62,11 @@ var _ discovery.CachedDiscoveryInterface = &memCacheClient{} // "Connection reset" error which usually means that apiserver is temporarily // unavailable. func isTransientConnectionError(err error) bool { - urlError, ok := err.(*url.Error) - if !ok { - return false + var errno syscall.Errno + if errors.As(err, &errno) { + return errno == syscall.ECONNREFUSED || errno == syscall.ECONNRESET } - opError, ok := urlError.Err.(*net.OpError) - if !ok { - return false - } - errno, ok := opError.Err.(syscall.Errno) - if !ok { - return false - } - return errno == syscall.ECONNREFUSED || errno == syscall.ECONNRESET + return false } func isTransientError(err error) bool { diff --git a/vendor/k8s.io/client-go/discovery/discovery_client.go b/vendor/k8s.io/client-go/discovery/discovery_client.go index dc12f9a2968..6c8e87e2327 100644 --- a/vendor/k8s.io/client-go/discovery/discovery_client.go +++ b/vendor/k8s.io/client-go/discovery/discovery_client.go @@ -27,7 +27,7 @@ import ( "time" "github.com/golang/protobuf/proto" - openapi_v2 "github.com/googleapis/gnostic/OpenAPIv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/client-go/discovery/fake/BUILD b/vendor/k8s.io/client-go/discovery/fake/BUILD index 840aeb37dda..59e0666eb65 100644 --- a/vendor/k8s.io/client-go/discovery/fake/BUILD +++ b/vendor/k8s.io/client-go/discovery/fake/BUILD @@ -18,7 +18,7 @@ go_library( "//staging/src/k8s.io/client-go/pkg/version:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/discovery/fake/discovery.go b/vendor/k8s.io/client-go/discovery/fake/discovery.go index 335473dd199..f0cc2dbf4f3 100644 --- a/vendor/k8s.io/client-go/discovery/fake/discovery.go +++ b/vendor/k8s.io/client-go/discovery/fake/discovery.go @@ -19,7 +19,7 @@ package fake import ( "fmt" - "github.com/googleapis/gnostic/OpenAPIv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/vendor/k8s.io/client-go/informers/BUILD b/vendor/k8s.io/client-go/informers/BUILD index 2eb50fb94df..da8912c009e 100644 --- a/vendor/k8s.io/client-go/informers/BUILD +++ b/vendor/k8s.io/client-go/informers/BUILD @@ -15,19 +15,20 @@ go_library( "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta2:go_default_library", - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v2beta1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v2beta2:go_default_library", "//staging/src/k8s.io/api/batch/v1:go_default_library", "//staging/src/k8s.io/api/batch/v1beta1:go_default_library", "//staging/src/k8s.io/api/batch/v2alpha1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/api/coordination/v1:go_default_library", "//staging/src/k8s.io/api/coordination/v1beta1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library", "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", "//staging/src/k8s.io/api/events/v1beta1:go_default_library", "//staging/src/k8s.io/api/extensions/v1beta1:go_default_library", "//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library", @@ -51,7 +52,6 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/client-go/informers/admissionregistration:go_default_library", "//staging/src/k8s.io/client-go/informers/apps:go_default_library", - "//staging/src/k8s.io/client-go/informers/auditregistration:go_default_library", "//staging/src/k8s.io/client-go/informers/autoscaling:go_default_library", "//staging/src/k8s.io/client-go/informers/batch:go_default_library", "//staging/src/k8s.io/client-go/informers/certificates:go_default_library", @@ -87,7 +87,6 @@ filegroup( ":package-srcs", "//staging/src/k8s.io/client-go/informers/admissionregistration:all-srcs", "//staging/src/k8s.io/client-go/informers/apps:all-srcs", - "//staging/src/k8s.io/client-go/informers/auditregistration:all-srcs", "//staging/src/k8s.io/client-go/informers/autoscaling:all-srcs", "//staging/src/k8s.io/client-go/informers/batch:all-srcs", "//staging/src/k8s.io/client-go/informers/certificates:all-srcs", diff --git a/vendor/k8s.io/client-go/informers/auditregistration/BUILD b/vendor/k8s.io/client-go/informers/auditregistration/BUILD deleted file mode 100644 index 3a3afe0dac7..00000000000 --- a/vendor/k8s.io/client-go/informers/auditregistration/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/auditregistration", - importpath = "k8s.io/client-go/informers/auditregistration", - visibility = ["//visibility:public"], - deps = [ - "//staging/src/k8s.io/client-go/informers/auditregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/auditregistration/v1alpha1:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/auditsink.go b/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/auditsink.go deleted file mode 100644 index ef178c3aa82..00000000000 --- a/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/auditsink.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - time "time" - - auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1alpha1 "k8s.io/client-go/listers/auditregistration/v1alpha1" - cache "k8s.io/client-go/tools/cache" -) - -// AuditSinkInformer provides access to a shared informer and lister for -// AuditSinks. -type AuditSinkInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.AuditSinkLister -} - -type auditSinkInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAuditSinkInformer constructs a new informer for AuditSink type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewAuditSinkInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredAuditSinkInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAuditSinkInformer constructs a new informer for AuditSink type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredAuditSinkInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.AuditregistrationV1alpha1().AuditSinks().List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.AuditregistrationV1alpha1().AuditSinks().Watch(context.TODO(), options) - }, - }, - &auditregistrationv1alpha1.AuditSink{}, - resyncPeriod, - indexers, - ) -} - -func (f *auditSinkInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAuditSinkInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *auditSinkInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&auditregistrationv1alpha1.AuditSink{}, f.defaultInformer) -} - -func (f *auditSinkInformer) Lister() v1alpha1.AuditSinkLister { - return v1alpha1.NewAuditSinkLister(f.Informer().GetIndexer()) -} diff --git a/vendor/k8s.io/client-go/informers/certificates/BUILD b/vendor/k8s.io/client-go/informers/certificates/BUILD index 291f56a0f02..bb416d090a8 100644 --- a/vendor/k8s.io/client-go/informers/certificates/BUILD +++ b/vendor/k8s.io/client-go/informers/certificates/BUILD @@ -11,6 +11,7 @@ go_library( importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/certificates", importpath = "k8s.io/client-go/informers/certificates", deps = [ + "//staging/src/k8s.io/client-go/informers/certificates/v1:go_default_library", "//staging/src/k8s.io/client-go/informers/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library", ], @@ -27,6 +28,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//staging/src/k8s.io/client-go/informers/certificates/v1:all-srcs", "//staging/src/k8s.io/client-go/informers/certificates/v1beta1:all-srcs", ], tags = ["automanaged"], diff --git a/vendor/k8s.io/client-go/informers/certificates/interface.go b/vendor/k8s.io/client-go/informers/certificates/interface.go index cff455403e8..e38d01177cc 100644 --- a/vendor/k8s.io/client-go/informers/certificates/interface.go +++ b/vendor/k8s.io/client-go/informers/certificates/interface.go @@ -19,12 +19,15 @@ limitations under the License. package certificates import ( + v1 "k8s.io/client-go/informers/certificates/v1" v1beta1 "k8s.io/client-go/informers/certificates/v1beta1" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to each of this group's versions. type Interface interface { + // V1 provides access to shared informers for resources in V1. + V1() v1.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface } @@ -40,6 +43,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.factory, g.namespace, g.tweakListOptions) +} + // V1beta1 returns a new v1beta1.Interface. func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) diff --git a/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/BUILD b/vendor/k8s.io/client-go/informers/certificates/v1/BUILD similarity index 76% rename from vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/BUILD rename to vendor/k8s.io/client-go/informers/certificates/v1/BUILD index 846f0d680ec..222e41454e2 100644 --- a/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/BUILD +++ b/vendor/k8s.io/client-go/informers/certificates/v1/BUILD @@ -3,20 +3,20 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ - "auditsink.go", + "certificatesigningrequest.go", "interface.go", ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1", - importpath = "k8s.io/client-go/informers/auditregistration/v1alpha1", + importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/certificates/v1", + importpath = "k8s.io/client-go/informers/certificates/v1", visibility = ["//visibility:public"], deps = [ - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", "//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//staging/src/k8s.io/client-go/listers/auditregistration/v1alpha1:go_default_library", + "//staging/src/k8s.io/client-go/listers/certificates/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/informers/certificates/v1/certificatesigningrequest.go b/vendor/k8s.io/client-go/informers/certificates/v1/certificatesigningrequest.go new file mode 100644 index 00000000000..73d33a914ce --- /dev/null +++ b/vendor/k8s.io/client-go/informers/certificates/v1/certificatesigningrequest.go @@ -0,0 +1,89 @@ +/* +Copyright 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + time "time" + + certificatesv1 "k8s.io/api/certificates/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/certificates/v1" + cache "k8s.io/client-go/tools/cache" +) + +// CertificateSigningRequestInformer provides access to a shared informer and lister for +// CertificateSigningRequests. +type CertificateSigningRequestInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.CertificateSigningRequestLister +} + +type certificateSigningRequestInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewCertificateSigningRequestInformer constructs a new informer for CertificateSigningRequest type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewCertificateSigningRequestInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredCertificateSigningRequestInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredCertificateSigningRequestInformer constructs a new informer for CertificateSigningRequest type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredCertificateSigningRequestInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CertificatesV1().CertificateSigningRequests().List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CertificatesV1().CertificateSigningRequests().Watch(context.TODO(), options) + }, + }, + &certificatesv1.CertificateSigningRequest{}, + resyncPeriod, + indexers, + ) +} + +func (f *certificateSigningRequestInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredCertificateSigningRequestInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *certificateSigningRequestInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&certificatesv1.CertificateSigningRequest{}, f.defaultInformer) +} + +func (f *certificateSigningRequestInformer) Lister() v1.CertificateSigningRequestLister { + return v1.NewCertificateSigningRequestLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/auditregistration/interface.go b/vendor/k8s.io/client-go/informers/certificates/v1/interface.go similarity index 63% rename from vendor/k8s.io/client-go/informers/auditregistration/interface.go rename to vendor/k8s.io/client-go/informers/certificates/v1/interface.go index 0f1682c478d..91ccfb715df 100644 --- a/vendor/k8s.io/client-go/informers/auditregistration/interface.go +++ b/vendor/k8s.io/client-go/informers/certificates/v1/interface.go @@ -16,20 +16,19 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package auditregistration +package v1 import ( - v1alpha1 "k8s.io/client-go/informers/auditregistration/v1alpha1" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) -// Interface provides access to each of this group's versions. +// Interface provides access to all the informers in this group version. type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface + // CertificateSigningRequests returns a CertificateSigningRequestInformer. + CertificateSigningRequests() CertificateSigningRequestInformer } -type group struct { +type version struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc @@ -37,10 +36,10 @@ type group struct { // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +// CertificateSigningRequests returns a CertificateSigningRequestInformer. +func (v *version) CertificateSigningRequests() CertificateSigningRequestInformer { + return &certificateSigningRequestInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } diff --git a/vendor/k8s.io/client-go/informers/events/BUILD b/vendor/k8s.io/client-go/informers/events/BUILD index 54d4d1413ad..908ee177e79 100644 --- a/vendor/k8s.io/client-go/informers/events/BUILD +++ b/vendor/k8s.io/client-go/informers/events/BUILD @@ -7,6 +7,7 @@ go_library( importpath = "k8s.io/client-go/informers/events", visibility = ["//visibility:public"], deps = [ + "//staging/src/k8s.io/client-go/informers/events/v1:go_default_library", "//staging/src/k8s.io/client-go/informers/events/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library", ], @@ -23,6 +24,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//staging/src/k8s.io/client-go/informers/events/v1:all-srcs", "//staging/src/k8s.io/client-go/informers/events/v1beta1:all-srcs", ], tags = ["automanaged"], diff --git a/vendor/k8s.io/client-go/informers/events/interface.go b/vendor/k8s.io/client-go/informers/events/interface.go index af30a3913dc..b350dde5b6c 100644 --- a/vendor/k8s.io/client-go/informers/events/interface.go +++ b/vendor/k8s.io/client-go/informers/events/interface.go @@ -19,12 +19,15 @@ limitations under the License. package events import ( + v1 "k8s.io/client-go/informers/events/v1" v1beta1 "k8s.io/client-go/informers/events/v1beta1" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to each of this group's versions. type Interface interface { + // V1 provides access to shared informers for resources in V1. + V1() v1.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface } @@ -40,6 +43,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } +// V1 returns a new v1.Interface. +func (g *group) V1() v1.Interface { + return v1.New(g.factory, g.namespace, g.tweakListOptions) +} + // V1beta1 returns a new v1beta1.Interface. func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) diff --git a/vendor/k8s.io/client-go/informers/events/v1/BUILD b/vendor/k8s.io/client-go/informers/events/v1/BUILD new file mode 100644 index 00000000000..ec355a5c63b --- /dev/null +++ b/vendor/k8s.io/client-go/informers/events/v1/BUILD @@ -0,0 +1,36 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "event.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/informers/events/v1", + importpath = "k8s.io/client-go/informers/events/v1", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/api/events/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", + "//staging/src/k8s.io/client-go/informers/internalinterfaces:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/listers/events/v1:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/client-go/informers/events/v1/event.go b/vendor/k8s.io/client-go/informers/events/v1/event.go new file mode 100644 index 00000000000..f8d35ee15cc --- /dev/null +++ b/vendor/k8s.io/client-go/informers/events/v1/event.go @@ -0,0 +1,90 @@ +/* +Copyright 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + time "time" + + eventsv1 "k8s.io/api/events/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/events/v1" + cache "k8s.io/client-go/tools/cache" +) + +// EventInformer provides access to a shared informer and lister for +// Events. +type EventInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.EventLister +} + +type eventInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewEventInformer constructs a new informer for Event type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredEventInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredEventInformer constructs a new informer for Event type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.EventsV1().Events(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.EventsV1().Events(namespace).Watch(context.TODO(), options) + }, + }, + &eventsv1.Event{}, + resyncPeriod, + indexers, + ) +} + +func (f *eventInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredEventInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *eventInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&eventsv1.Event{}, f.defaultInformer) +} + +func (f *eventInformer) Lister() v1.EventLister { + return v1.NewEventLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/interface.go b/vendor/k8s.io/client-go/informers/events/v1/interface.go similarity index 81% rename from vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/interface.go rename to vendor/k8s.io/client-go/informers/events/v1/interface.go index 0a67ba821df..cd06e233593 100644 --- a/vendor/k8s.io/client-go/informers/auditregistration/v1alpha1/interface.go +++ b/vendor/k8s.io/client-go/informers/events/v1/interface.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -24,8 +24,8 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { - // AuditSinks returns a AuditSinkInformer. - AuditSinks() AuditSinkInformer + // Events returns a EventInformer. + Events() EventInformer } type version struct { @@ -39,7 +39,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// AuditSinks returns a AuditSinkInformer. -func (v *version) AuditSinks() AuditSinkInformer { - return &auditSinkInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +// Events returns a EventInformer. +func (v *version) Events() EventInformer { + return &eventInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } diff --git a/vendor/k8s.io/client-go/informers/factory.go b/vendor/k8s.io/client-go/informers/factory.go index dbbc8f5e9ad..5c17f81f936 100644 --- a/vendor/k8s.io/client-go/informers/factory.go +++ b/vendor/k8s.io/client-go/informers/factory.go @@ -28,7 +28,6 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" admissionregistration "k8s.io/client-go/informers/admissionregistration" apps "k8s.io/client-go/informers/apps" - auditregistration "k8s.io/client-go/informers/auditregistration" autoscaling "k8s.io/client-go/informers/autoscaling" batch "k8s.io/client-go/informers/batch" certificates "k8s.io/client-go/informers/certificates" @@ -192,7 +191,6 @@ type SharedInformerFactory interface { Admissionregistration() admissionregistration.Interface Apps() apps.Interface - Auditregistration() auditregistration.Interface Autoscaling() autoscaling.Interface Batch() batch.Interface Certificates() certificates.Interface @@ -219,10 +217,6 @@ func (f *sharedInformerFactory) Apps() apps.Interface { return apps.New(f, f.namespace, f.tweakListOptions) } -func (f *sharedInformerFactory) Auditregistration() auditregistration.Interface { - return auditregistration.New(f, f.namespace, f.tweakListOptions) -} - func (f *sharedInformerFactory) Autoscaling() autoscaling.Interface { return autoscaling.New(f, f.namespace, f.tweakListOptions) } diff --git a/vendor/k8s.io/client-go/informers/generic.go b/vendor/k8s.io/client-go/informers/generic.go index 5bc555da65a..f67c64ac8d4 100644 --- a/vendor/k8s.io/client-go/informers/generic.go +++ b/vendor/k8s.io/client-go/informers/generic.go @@ -26,19 +26,20 @@ import ( appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" v1beta2 "k8s.io/api/apps/v1beta2" - v1alpha1 "k8s.io/api/auditregistration/v1alpha1" autoscalingv1 "k8s.io/api/autoscaling/v1" v2beta1 "k8s.io/api/autoscaling/v2beta1" v2beta2 "k8s.io/api/autoscaling/v2beta2" batchv1 "k8s.io/api/batch/v1" batchv1beta1 "k8s.io/api/batch/v1beta1" v2alpha1 "k8s.io/api/batch/v2alpha1" + certificatesv1 "k8s.io/api/certificates/v1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" coordinationv1 "k8s.io/api/coordination/v1" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" - discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1" + v1alpha1 "k8s.io/api/discovery/v1alpha1" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" + eventsv1 "k8s.io/api/events/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -131,10 +132,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case v1beta2.SchemeGroupVersion.WithResource("statefulsets"): return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().StatefulSets().Informer()}, nil - // Group=auditregistration.k8s.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("auditsinks"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Auditregistration().V1alpha1().AuditSinks().Informer()}, nil - // Group=autoscaling, Version=v1 case autoscalingv1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V1().HorizontalPodAutoscalers().Informer()}, nil @@ -159,6 +156,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case v2alpha1.SchemeGroupVersion.WithResource("cronjobs"): return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil + // Group=certificates.k8s.io, Version=v1 + case certificatesv1.SchemeGroupVersion.WithResource("certificatesigningrequests"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1().CertificateSigningRequests().Informer()}, nil + // Group=certificates.k8s.io, Version=v1beta1 case certificatesv1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"): return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().CertificateSigningRequests().Informer()}, nil @@ -206,13 +207,17 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ServiceAccounts().Informer()}, nil // Group=discovery.k8s.io, Version=v1alpha1 - case discoveryv1alpha1.SchemeGroupVersion.WithResource("endpointslices"): + case v1alpha1.SchemeGroupVersion.WithResource("endpointslices"): return &genericInformer{resource: resource.GroupResource(), informer: f.Discovery().V1alpha1().EndpointSlices().Informer()}, nil // Group=discovery.k8s.io, Version=v1beta1 case discoveryv1beta1.SchemeGroupVersion.WithResource("endpointslices"): return &genericInformer{resource: resource.GroupResource(), informer: f.Discovery().V1beta1().EndpointSlices().Informer()}, nil + // Group=events.k8s.io, Version=v1 + case eventsv1.SchemeGroupVersion.WithResource("events"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Events().V1().Events().Informer()}, nil + // Group=events.k8s.io, Version=v1beta1 case eventsv1beta1.SchemeGroupVersion.WithResource("events"): return &genericInformer{resource: resource.GroupResource(), informer: f.Events().V1beta1().Events().Informer()}, nil @@ -238,6 +243,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1alpha1().PriorityLevelConfigurations().Informer()}, nil // Group=networking.k8s.io, Version=v1 + case networkingv1.SchemeGroupVersion.WithResource("ingresses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().Ingresses().Informer()}, nil + case networkingv1.SchemeGroupVersion.WithResource("ingressclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().IngressClasses().Informer()}, nil case networkingv1.SchemeGroupVersion.WithResource("networkpolicies"): return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().NetworkPolicies().Informer()}, nil @@ -318,6 +327,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().VolumeAttachments().Informer()}, nil // Group=storage.k8s.io, Version=v1alpha1 + case storagev1alpha1.SchemeGroupVersion.WithResource("csistoragecapacities"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().CSIStorageCapacities().Informer()}, nil case storagev1alpha1.SchemeGroupVersion.WithResource("volumeattachments"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().VolumeAttachments().Informer()}, nil diff --git a/vendor/k8s.io/client-go/informers/networking/v1/BUILD b/vendor/k8s.io/client-go/informers/networking/v1/BUILD index ee914bb573a..0ba3def572b 100644 --- a/vendor/k8s.io/client-go/informers/networking/v1/BUILD +++ b/vendor/k8s.io/client-go/informers/networking/v1/BUILD @@ -8,6 +8,8 @@ load( go_library( name = "go_default_library", srcs = [ + "ingress.go", + "ingressclass.go", "interface.go", "networkpolicy.go", ], diff --git a/vendor/k8s.io/client-go/informers/networking/v1/ingress.go b/vendor/k8s.io/client-go/informers/networking/v1/ingress.go new file mode 100644 index 00000000000..06c317ad313 --- /dev/null +++ b/vendor/k8s.io/client-go/informers/networking/v1/ingress.go @@ -0,0 +1,90 @@ +/* +Copyright 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + time "time" + + networkingv1 "k8s.io/api/networking/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/networking/v1" + cache "k8s.io/client-go/tools/cache" +) + +// IngressInformer provides access to a shared informer and lister for +// Ingresses. +type IngressInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.IngressLister +} + +type ingressInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewIngressInformer constructs a new informer for Ingress type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewIngressInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredIngressInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredIngressInformer constructs a new informer for Ingress type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredIngressInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.NetworkingV1().Ingresses(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.NetworkingV1().Ingresses(namespace).Watch(context.TODO(), options) + }, + }, + &networkingv1.Ingress{}, + resyncPeriod, + indexers, + ) +} + +func (f *ingressInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredIngressInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *ingressInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&networkingv1.Ingress{}, f.defaultInformer) +} + +func (f *ingressInformer) Lister() v1.IngressLister { + return v1.NewIngressLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/networking/v1/ingressclass.go b/vendor/k8s.io/client-go/informers/networking/v1/ingressclass.go new file mode 100644 index 00000000000..15514745bfc --- /dev/null +++ b/vendor/k8s.io/client-go/informers/networking/v1/ingressclass.go @@ -0,0 +1,89 @@ +/* +Copyright 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + time "time" + + networkingv1 "k8s.io/api/networking/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1 "k8s.io/client-go/listers/networking/v1" + cache "k8s.io/client-go/tools/cache" +) + +// IngressClassInformer provides access to a shared informer and lister for +// IngressClasses. +type IngressClassInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.IngressClassLister +} + +type ingressClassInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewIngressClassInformer constructs a new informer for IngressClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewIngressClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredIngressClassInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredIngressClassInformer constructs a new informer for IngressClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredIngressClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.NetworkingV1().IngressClasses().List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.NetworkingV1().IngressClasses().Watch(context.TODO(), options) + }, + }, + &networkingv1.IngressClass{}, + resyncPeriod, + indexers, + ) +} + +func (f *ingressClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredIngressClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *ingressClassInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&networkingv1.IngressClass{}, f.defaultInformer) +} + +func (f *ingressClassInformer) Lister() v1.IngressClassLister { + return v1.NewIngressClassLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/networking/v1/interface.go b/vendor/k8s.io/client-go/informers/networking/v1/interface.go index 84dc6476aa5..a48d92c4ef3 100644 --- a/vendor/k8s.io/client-go/informers/networking/v1/interface.go +++ b/vendor/k8s.io/client-go/informers/networking/v1/interface.go @@ -24,6 +24,10 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { + // Ingresses returns a IngressInformer. + Ingresses() IngressInformer + // IngressClasses returns a IngressClassInformer. + IngressClasses() IngressClassInformer // NetworkPolicies returns a NetworkPolicyInformer. NetworkPolicies() NetworkPolicyInformer } @@ -39,6 +43,16 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } +// Ingresses returns a IngressInformer. +func (v *version) Ingresses() IngressInformer { + return &ingressInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// IngressClasses returns a IngressClassInformer. +func (v *version) IngressClasses() IngressClassInformer { + return &ingressClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // NetworkPolicies returns a NetworkPolicyInformer. func (v *version) NetworkPolicies() NetworkPolicyInformer { return &networkPolicyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} diff --git a/vendor/k8s.io/client-go/informers/storage/v1alpha1/BUILD b/vendor/k8s.io/client-go/informers/storage/v1alpha1/BUILD index 3373147dbd0..ddefad6ba85 100644 --- a/vendor/k8s.io/client-go/informers/storage/v1alpha1/BUILD +++ b/vendor/k8s.io/client-go/informers/storage/v1alpha1/BUILD @@ -3,6 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ + "csistoragecapacity.go", "interface.go", "volumeattachment.go", ], diff --git a/vendor/k8s.io/client-go/informers/storage/v1alpha1/csistoragecapacity.go b/vendor/k8s.io/client-go/informers/storage/v1alpha1/csistoragecapacity.go new file mode 100644 index 00000000000..e59dfab2d11 --- /dev/null +++ b/vendor/k8s.io/client-go/informers/storage/v1alpha1/csistoragecapacity.go @@ -0,0 +1,90 @@ +/* +Copyright 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + storagev1alpha1 "k8s.io/api/storage/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1alpha1 "k8s.io/client-go/listers/storage/v1alpha1" + cache "k8s.io/client-go/tools/cache" +) + +// CSIStorageCapacityInformer provides access to a shared informer and lister for +// CSIStorageCapacities. +type CSIStorageCapacityInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.CSIStorageCapacityLister +} + +type cSIStorageCapacityInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewCSIStorageCapacityInformer constructs a new informer for CSIStorageCapacity type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewCSIStorageCapacityInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredCSIStorageCapacityInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredCSIStorageCapacityInformer constructs a new informer for CSIStorageCapacity type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredCSIStorageCapacityInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StorageV1alpha1().CSIStorageCapacities(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StorageV1alpha1().CSIStorageCapacities(namespace).Watch(context.TODO(), options) + }, + }, + &storagev1alpha1.CSIStorageCapacity{}, + resyncPeriod, + indexers, + ) +} + +func (f *cSIStorageCapacityInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredCSIStorageCapacityInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *cSIStorageCapacityInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&storagev1alpha1.CSIStorageCapacity{}, f.defaultInformer) +} + +func (f *cSIStorageCapacityInformer) Lister() v1alpha1.CSIStorageCapacityLister { + return v1alpha1.NewCSIStorageCapacityLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/storage/v1alpha1/interface.go b/vendor/k8s.io/client-go/informers/storage/v1alpha1/interface.go index d389b73fa67..033d3b10aa1 100644 --- a/vendor/k8s.io/client-go/informers/storage/v1alpha1/interface.go +++ b/vendor/k8s.io/client-go/informers/storage/v1alpha1/interface.go @@ -24,6 +24,8 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { + // CSIStorageCapacities returns a CSIStorageCapacityInformer. + CSIStorageCapacities() CSIStorageCapacityInformer // VolumeAttachments returns a VolumeAttachmentInformer. VolumeAttachments() VolumeAttachmentInformer } @@ -39,6 +41,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } +// CSIStorageCapacities returns a CSIStorageCapacityInformer. +func (v *version) CSIStorageCapacities() CSIStorageCapacityInformer { + return &cSIStorageCapacityInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // VolumeAttachments returns a VolumeAttachmentInformer. func (v *version) VolumeAttachments() VolumeAttachmentInformer { return &volumeAttachmentInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/vendor/k8s.io/client-go/kubernetes/BUILD b/vendor/k8s.io/client-go/kubernetes/BUILD index 6858c78d879..37d236edf9e 100644 --- a/vendor/k8s.io/client-go/kubernetes/BUILD +++ b/vendor/k8s.io/client-go/kubernetes/BUILD @@ -17,7 +17,6 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library", @@ -28,12 +27,14 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1:go_default_library", @@ -75,7 +76,6 @@ filegroup( "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1:all-srcs", @@ -86,12 +86,14 @@ filegroup( "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:all-srcs", + "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:all-srcs", + "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1:all-srcs", diff --git a/vendor/k8s.io/client-go/kubernetes/clientset.go b/vendor/k8s.io/client-go/kubernetes/clientset.go index d76e9ac9b61..064c24d12e4 100644 --- a/vendor/k8s.io/client-go/kubernetes/clientset.go +++ b/vendor/k8s.io/client-go/kubernetes/clientset.go @@ -27,7 +27,6 @@ import ( appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1" appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1" appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" - auditregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1" authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1" authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1" @@ -38,12 +37,14 @@ import ( batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1" batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1" + certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1" certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" discoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1" discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" + eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1" eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" @@ -73,7 +74,6 @@ type Interface interface { AppsV1() appsv1.AppsV1Interface AppsV1beta1() appsv1beta1.AppsV1beta1Interface AppsV1beta2() appsv1beta2.AppsV1beta2Interface - AuditregistrationV1alpha1() auditregistrationv1alpha1.AuditregistrationV1alpha1Interface AuthenticationV1() authenticationv1.AuthenticationV1Interface AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface AuthorizationV1() authorizationv1.AuthorizationV1Interface @@ -84,12 +84,14 @@ type Interface interface { BatchV1() batchv1.BatchV1Interface BatchV1beta1() batchv1beta1.BatchV1beta1Interface BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface + CertificatesV1() certificatesv1.CertificatesV1Interface CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface CoordinationV1() coordinationv1.CoordinationV1Interface CoreV1() corev1.CoreV1Interface DiscoveryV1alpha1() discoveryv1alpha1.DiscoveryV1alpha1Interface DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface + EventsV1() eventsv1.EventsV1Interface EventsV1beta1() eventsv1beta1.EventsV1beta1Interface ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface @@ -119,7 +121,6 @@ type Clientset struct { appsV1 *appsv1.AppsV1Client appsV1beta1 *appsv1beta1.AppsV1beta1Client appsV1beta2 *appsv1beta2.AppsV1beta2Client - auditregistrationV1alpha1 *auditregistrationv1alpha1.AuditregistrationV1alpha1Client authenticationV1 *authenticationv1.AuthenticationV1Client authenticationV1beta1 *authenticationv1beta1.AuthenticationV1beta1Client authorizationV1 *authorizationv1.AuthorizationV1Client @@ -130,12 +131,14 @@ type Clientset struct { batchV1 *batchv1.BatchV1Client batchV1beta1 *batchv1beta1.BatchV1beta1Client batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client + certificatesV1 *certificatesv1.CertificatesV1Client certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client coordinationV1 *coordinationv1.CoordinationV1Client coreV1 *corev1.CoreV1Client discoveryV1alpha1 *discoveryv1alpha1.DiscoveryV1alpha1Client discoveryV1beta1 *discoveryv1beta1.DiscoveryV1beta1Client + eventsV1 *eventsv1.EventsV1Client eventsV1beta1 *eventsv1beta1.EventsV1beta1Client extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client flowcontrolV1alpha1 *flowcontrolv1alpha1.FlowcontrolV1alpha1Client @@ -181,11 +184,6 @@ func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface { return c.appsV1beta2 } -// AuditregistrationV1alpha1 retrieves the AuditregistrationV1alpha1Client -func (c *Clientset) AuditregistrationV1alpha1() auditregistrationv1alpha1.AuditregistrationV1alpha1Interface { - return c.auditregistrationV1alpha1 -} - // AuthenticationV1 retrieves the AuthenticationV1Client func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface { return c.authenticationV1 @@ -236,6 +234,11 @@ func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface { return c.batchV2alpha1 } +// CertificatesV1 retrieves the CertificatesV1Client +func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface { + return c.certificatesV1 +} + // CertificatesV1beta1 retrieves the CertificatesV1beta1Client func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { return c.certificatesV1beta1 @@ -266,6 +269,11 @@ func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interfac return c.discoveryV1beta1 } +// EventsV1 retrieves the EventsV1Client +func (c *Clientset) EventsV1() eventsv1.EventsV1Interface { + return c.eventsV1 +} + // EventsV1beta1 retrieves the EventsV1beta1Client func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { return c.eventsV1beta1 @@ -397,10 +405,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.auditregistrationV1alpha1, err = auditregistrationv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.authenticationV1, err = authenticationv1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -441,6 +445,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.certificatesV1, err = certificatesv1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.certificatesV1beta1, err = certificatesv1beta1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -465,6 +473,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.eventsV1, err = eventsv1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.eventsV1beta1, err = eventsv1beta1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -554,7 +566,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { cs.appsV1 = appsv1.NewForConfigOrDie(c) cs.appsV1beta1 = appsv1beta1.NewForConfigOrDie(c) cs.appsV1beta2 = appsv1beta2.NewForConfigOrDie(c) - cs.auditregistrationV1alpha1 = auditregistrationv1alpha1.NewForConfigOrDie(c) cs.authenticationV1 = authenticationv1.NewForConfigOrDie(c) cs.authenticationV1beta1 = authenticationv1beta1.NewForConfigOrDie(c) cs.authorizationV1 = authorizationv1.NewForConfigOrDie(c) @@ -565,12 +576,14 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { cs.batchV1 = batchv1.NewForConfigOrDie(c) cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c) cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c) + cs.certificatesV1 = certificatesv1.NewForConfigOrDie(c) cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c) cs.coordinationV1beta1 = coordinationv1beta1.NewForConfigOrDie(c) cs.coordinationV1 = coordinationv1.NewForConfigOrDie(c) cs.coreV1 = corev1.NewForConfigOrDie(c) cs.discoveryV1alpha1 = discoveryv1alpha1.NewForConfigOrDie(c) cs.discoveryV1beta1 = discoveryv1beta1.NewForConfigOrDie(c) + cs.eventsV1 = eventsv1.NewForConfigOrDie(c) cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c) cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c) cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.NewForConfigOrDie(c) @@ -602,7 +615,6 @@ func New(c rest.Interface) *Clientset { cs.appsV1 = appsv1.New(c) cs.appsV1beta1 = appsv1beta1.New(c) cs.appsV1beta2 = appsv1beta2.New(c) - cs.auditregistrationV1alpha1 = auditregistrationv1alpha1.New(c) cs.authenticationV1 = authenticationv1.New(c) cs.authenticationV1beta1 = authenticationv1beta1.New(c) cs.authorizationV1 = authorizationv1.New(c) @@ -613,12 +625,14 @@ func New(c rest.Interface) *Clientset { cs.batchV1 = batchv1.New(c) cs.batchV1beta1 = batchv1beta1.New(c) cs.batchV2alpha1 = batchv2alpha1.New(c) + cs.certificatesV1 = certificatesv1.New(c) cs.certificatesV1beta1 = certificatesv1beta1.New(c) cs.coordinationV1beta1 = coordinationv1beta1.New(c) cs.coordinationV1 = coordinationv1.New(c) cs.coreV1 = corev1.New(c) cs.discoveryV1alpha1 = discoveryv1alpha1.New(c) cs.discoveryV1beta1 = discoveryv1beta1.New(c) + cs.eventsV1 = eventsv1.New(c) cs.eventsV1beta1 = eventsv1beta1.New(c) cs.extensionsV1beta1 = extensionsv1beta1.New(c) cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.New(c) diff --git a/vendor/k8s.io/client-go/kubernetes/fake/BUILD b/vendor/k8s.io/client-go/kubernetes/fake/BUILD index 4753a9e10fa..5246e56628a 100644 --- a/vendor/k8s.io/client-go/kubernetes/fake/BUILD +++ b/vendor/k8s.io/client-go/kubernetes/fake/BUILD @@ -16,7 +16,6 @@ go_library( "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta2:go_default_library", - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/authentication/v1:go_default_library", "//staging/src/k8s.io/api/authentication/v1beta1:go_default_library", "//staging/src/k8s.io/api/authorization/v1:go_default_library", @@ -27,12 +26,14 @@ go_library( "//staging/src/k8s.io/api/batch/v1:go_default_library", "//staging/src/k8s.io/api/batch/v1beta1:go_default_library", "//staging/src/k8s.io/api/batch/v2alpha1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/api/coordination/v1:go_default_library", "//staging/src/k8s.io/api/coordination/v1beta1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library", "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", "//staging/src/k8s.io/api/events/v1beta1:go_default_library", "//staging/src/k8s.io/api/extensions/v1beta1:go_default_library", "//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library", @@ -70,8 +71,6 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library", @@ -92,6 +91,8 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1:go_default_library", @@ -104,6 +105,8 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library", diff --git a/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go b/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go index ccb103cc3cd..70c4ac6e4d3 100644 --- a/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go +++ b/vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go @@ -34,8 +34,6 @@ import ( fakeappsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake" appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2" fakeappsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake" - auditregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1" - fakeauditregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake" authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1" fakeauthenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1/fake" authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" @@ -56,6 +54,8 @@ import ( fakebatchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake" batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1" fakebatchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake" + certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1" + fakecertificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1/fake" certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" fakecertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake" coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" @@ -68,6 +68,8 @@ import ( fakediscoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake" discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1" fakediscoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake" + eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1" + fakeeventsv1 "k8s.io/client-go/kubernetes/typed/events/v1/fake" eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" fakeeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake" extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" @@ -179,11 +181,6 @@ func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface { return &fakeappsv1beta2.FakeAppsV1beta2{Fake: &c.Fake} } -// AuditregistrationV1alpha1 retrieves the AuditregistrationV1alpha1Client -func (c *Clientset) AuditregistrationV1alpha1() auditregistrationv1alpha1.AuditregistrationV1alpha1Interface { - return &fakeauditregistrationv1alpha1.FakeAuditregistrationV1alpha1{Fake: &c.Fake} -} - // AuthenticationV1 retrieves the AuthenticationV1Client func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface { return &fakeauthenticationv1.FakeAuthenticationV1{Fake: &c.Fake} @@ -234,6 +231,11 @@ func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface { return &fakebatchv2alpha1.FakeBatchV2alpha1{Fake: &c.Fake} } +// CertificatesV1 retrieves the CertificatesV1Client +func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface { + return &fakecertificatesv1.FakeCertificatesV1{Fake: &c.Fake} +} + // CertificatesV1beta1 retrieves the CertificatesV1beta1Client func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface { return &fakecertificatesv1beta1.FakeCertificatesV1beta1{Fake: &c.Fake} @@ -264,6 +266,11 @@ func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interfac return &fakediscoveryv1beta1.FakeDiscoveryV1beta1{Fake: &c.Fake} } +// EventsV1 retrieves the EventsV1Client +func (c *Clientset) EventsV1() eventsv1.EventsV1Interface { + return &fakeeventsv1.FakeEventsV1{Fake: &c.Fake} +} + // EventsV1beta1 retrieves the EventsV1beta1Client func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { return &fakeeventsv1beta1.FakeEventsV1beta1{Fake: &c.Fake} diff --git a/vendor/k8s.io/client-go/kubernetes/fake/register.go b/vendor/k8s.io/client-go/kubernetes/fake/register.go index e88b99891d1..00e71589bc6 100644 --- a/vendor/k8s.io/client-go/kubernetes/fake/register.go +++ b/vendor/k8s.io/client-go/kubernetes/fake/register.go @@ -24,7 +24,6 @@ import ( appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" appsv1beta2 "k8s.io/api/apps/v1beta2" - auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1" authenticationv1 "k8s.io/api/authentication/v1" authenticationv1beta1 "k8s.io/api/authentication/v1beta1" authorizationv1 "k8s.io/api/authorization/v1" @@ -35,12 +34,14 @@ import ( batchv1 "k8s.io/api/batch/v1" batchv1beta1 "k8s.io/api/batch/v1beta1" batchv2alpha1 "k8s.io/api/batch/v2alpha1" + certificatesv1 "k8s.io/api/certificates/v1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" coordinationv1 "k8s.io/api/coordination/v1" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" + eventsv1 "k8s.io/api/events/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -68,14 +69,13 @@ import ( var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) + var localSchemeBuilder = runtime.SchemeBuilder{ admissionregistrationv1.AddToScheme, admissionregistrationv1beta1.AddToScheme, appsv1.AddToScheme, appsv1beta1.AddToScheme, appsv1beta2.AddToScheme, - auditregistrationv1alpha1.AddToScheme, authenticationv1.AddToScheme, authenticationv1beta1.AddToScheme, authorizationv1.AddToScheme, @@ -86,12 +86,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ batchv1.AddToScheme, batchv1beta1.AddToScheme, batchv2alpha1.AddToScheme, + certificatesv1.AddToScheme, certificatesv1beta1.AddToScheme, coordinationv1beta1.AddToScheme, coordinationv1.AddToScheme, corev1.AddToScheme, discoveryv1alpha1.AddToScheme, discoveryv1beta1.AddToScheme, + eventsv1.AddToScheme, eventsv1beta1.AddToScheme, extensionsv1beta1.AddToScheme, flowcontrolv1alpha1.AddToScheme, diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/BUILD b/vendor/k8s.io/client-go/kubernetes/scheme/BUILD index a78e6215750..c7cb5d65f84 100644 --- a/vendor/k8s.io/client-go/kubernetes/scheme/BUILD +++ b/vendor/k8s.io/client-go/kubernetes/scheme/BUILD @@ -15,7 +15,6 @@ go_library( "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta1:go_default_library", "//staging/src/k8s.io/api/apps/v1beta2:go_default_library", - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/authentication/v1:go_default_library", "//staging/src/k8s.io/api/authentication/v1beta1:go_default_library", "//staging/src/k8s.io/api/authorization/v1:go_default_library", @@ -26,12 +25,14 @@ go_library( "//staging/src/k8s.io/api/batch/v1:go_default_library", "//staging/src/k8s.io/api/batch/v1beta1:go_default_library", "//staging/src/k8s.io/api/batch/v2alpha1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/api/coordination/v1:go_default_library", "//staging/src/k8s.io/api/coordination/v1beta1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/discovery/v1alpha1:go_default_library", "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", "//staging/src/k8s.io/api/events/v1beta1:go_default_library", "//staging/src/k8s.io/api/extensions/v1beta1:go_default_library", "//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library", diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/register.go b/vendor/k8s.io/client-go/kubernetes/scheme/register.go index 4d8e8b7f780..2710bf2decd 100644 --- a/vendor/k8s.io/client-go/kubernetes/scheme/register.go +++ b/vendor/k8s.io/client-go/kubernetes/scheme/register.go @@ -24,7 +24,6 @@ import ( appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" appsv1beta2 "k8s.io/api/apps/v1beta2" - auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1" authenticationv1 "k8s.io/api/authentication/v1" authenticationv1beta1 "k8s.io/api/authentication/v1beta1" authorizationv1 "k8s.io/api/authorization/v1" @@ -35,12 +34,14 @@ import ( batchv1 "k8s.io/api/batch/v1" batchv1beta1 "k8s.io/api/batch/v1beta1" batchv2alpha1 "k8s.io/api/batch/v2alpha1" + certificatesv1 "k8s.io/api/certificates/v1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" coordinationv1 "k8s.io/api/coordination/v1" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" + eventsv1 "k8s.io/api/events/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -75,7 +76,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{ appsv1.AddToScheme, appsv1beta1.AddToScheme, appsv1beta2.AddToScheme, - auditregistrationv1alpha1.AddToScheme, authenticationv1.AddToScheme, authenticationv1beta1.AddToScheme, authorizationv1.AddToScheme, @@ -86,12 +86,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ batchv1.AddToScheme, batchv1beta1.AddToScheme, batchv2alpha1.AddToScheme, + certificatesv1.AddToScheme, certificatesv1beta1.AddToScheme, coordinationv1beta1.AddToScheme, coordinationv1.AddToScheme, corev1.AddToScheme, discoveryv1alpha1.AddToScheme, discoveryv1beta1.AddToScheme, + eventsv1.AddToScheme, eventsv1beta1.AddToScheme, extensionsv1beta1.AddToScheme, flowcontrolv1alpha1.AddToScheme, diff --git a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go b/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go deleted file mode 100644 index ea748c66225..00000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditsink.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "k8s.io/api/auditregistration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - scheme "k8s.io/client-go/kubernetes/scheme" - rest "k8s.io/client-go/rest" -) - -// AuditSinksGetter has a method to return a AuditSinkInterface. -// A group's client should implement this interface. -type AuditSinksGetter interface { - AuditSinks() AuditSinkInterface -} - -// AuditSinkInterface has methods to work with AuditSink resources. -type AuditSinkInterface interface { - Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (*v1alpha1.AuditSink, error) - Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (*v1alpha1.AuditSink, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AuditSink, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AuditSinkList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AuditSink, err error) - AuditSinkExpansion -} - -// auditSinks implements AuditSinkInterface -type auditSinks struct { - client rest.Interface -} - -// newAuditSinks returns a AuditSinks -func newAuditSinks(c *AuditregistrationV1alpha1Client) *auditSinks { - return &auditSinks{ - client: c.RESTClient(), - } -} - -// Get takes name of the auditSink, and returns the corresponding auditSink object, and an error if there is any. -func (c *auditSinks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) { - result = &v1alpha1.AuditSink{} - err = c.client.Get(). - Resource("auditsinks"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of AuditSinks that match those selectors. -func (c *auditSinks) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.AuditSinkList{} - err = c.client.Get(). - Resource("auditsinks"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested auditSinks. -func (c *auditSinks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("auditsinks"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a auditSink and creates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *auditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (result *v1alpha1.AuditSink, err error) { - result = &v1alpha1.AuditSink{} - err = c.client.Post(). - Resource("auditsinks"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(auditSink). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *auditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (result *v1alpha1.AuditSink, err error) { - result = &v1alpha1.AuditSink{} - err = c.client.Put(). - Resource("auditsinks"). - Name(auditSink.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(auditSink). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the auditSink and deletes it. Returns an error if one occurs. -func (c *auditSinks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("auditsinks"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *auditSinks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("auditsinks"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched auditSink. -func (c *auditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AuditSink, err error) { - result = &v1alpha1.AuditSink{} - err = c.client.Patch(pt). - Resource("auditsinks"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go b/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go deleted file mode 100644 index f97c6747143..00000000000 --- a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditsink.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "k8s.io/api/auditregistration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeAuditSinks implements AuditSinkInterface -type FakeAuditSinks struct { - Fake *FakeAuditregistrationV1alpha1 -} - -var auditsinksResource = schema.GroupVersionResource{Group: "auditregistration.k8s.io", Version: "v1alpha1", Resource: "auditsinks"} - -var auditsinksKind = schema.GroupVersionKind{Group: "auditregistration.k8s.io", Version: "v1alpha1", Kind: "AuditSink"} - -// Get takes name of the auditSink, and returns the corresponding auditSink object, and an error if there is any. -func (c *FakeAuditSinks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(auditsinksResource, name), &v1alpha1.AuditSink{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.AuditSink), err -} - -// List takes label and field selectors, and returns the list of AuditSinks that match those selectors. -func (c *FakeAuditSinks) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(auditsinksResource, auditsinksKind, opts), &v1alpha1.AuditSinkList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.AuditSinkList{ListMeta: obj.(*v1alpha1.AuditSinkList).ListMeta} - for _, item := range obj.(*v1alpha1.AuditSinkList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested auditSinks. -func (c *FakeAuditSinks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(auditsinksResource, opts)) -} - -// Create takes the representation of a auditSink and creates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *FakeAuditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (result *v1alpha1.AuditSink, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(auditsinksResource, auditSink), &v1alpha1.AuditSink{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.AuditSink), err -} - -// Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any. -func (c *FakeAuditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (result *v1alpha1.AuditSink, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(auditsinksResource, auditSink), &v1alpha1.AuditSink{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.AuditSink), err -} - -// Delete takes name of the auditSink and deletes it. Returns an error if one occurs. -func (c *FakeAuditSinks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(auditsinksResource, name), &v1alpha1.AuditSink{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeAuditSinks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(auditsinksResource, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.AuditSinkList{}) - return err -} - -// Patch applies the patch and returns the patched auditSink. -func (c *FakeAuditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AuditSink, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(auditsinksResource, name, pt, data, subresources...), &v1alpha1.AuditSink{}) - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.AuditSink), err -} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/BUILD b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/BUILD similarity index 72% rename from vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/BUILD rename to vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/BUILD index addd6cd1bfc..d96e2d3cf2b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/BUILD +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/BUILD @@ -3,16 +3,16 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ - "auditregistration_client.go", - "auditsink.go", + "certificates_client.go", + "certificatesigningrequest.go", "doc.go", "generated_expansion.go", ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1", - importpath = "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1", + importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1", + importpath = "k8s.io/client-go/kubernetes/typed/certificates/v1", visibility = ["//visibility:public"], deps = [ - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", @@ -32,7 +32,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake:all-srcs", + "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/fake:all-srcs", ], tags = ["automanaged"], visibility = ["//visibility:public"], diff --git a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditregistration_client.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/certificates_client.go similarity index 58% rename from vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditregistration_client.go rename to vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/certificates_client.go index ec63179eacb..25aea93c797 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/auditregistration_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/certificates_client.go @@ -16,30 +16,30 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( - v1alpha1 "k8s.io/api/auditregistration/v1alpha1" + v1 "k8s.io/api/certificates/v1" "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) -type AuditregistrationV1alpha1Interface interface { +type CertificatesV1Interface interface { RESTClient() rest.Interface - AuditSinksGetter + CertificateSigningRequestsGetter } -// AuditregistrationV1alpha1Client is used to interact with features provided by the auditregistration.k8s.io group. -type AuditregistrationV1alpha1Client struct { +// CertificatesV1Client is used to interact with features provided by the certificates.k8s.io group. +type CertificatesV1Client struct { restClient rest.Interface } -func (c *AuditregistrationV1alpha1Client) AuditSinks() AuditSinkInterface { - return newAuditSinks(c) +func (c *CertificatesV1Client) CertificateSigningRequests() CertificateSigningRequestInterface { + return newCertificateSigningRequests(c) } -// NewForConfig creates a new AuditregistrationV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*AuditregistrationV1alpha1Client, error) { +// NewForConfig creates a new CertificatesV1Client for the given config. +func NewForConfig(c *rest.Config) (*CertificatesV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -48,12 +48,12 @@ func NewForConfig(c *rest.Config) (*AuditregistrationV1alpha1Client, error) { if err != nil { return nil, err } - return &AuditregistrationV1alpha1Client{client}, nil + return &CertificatesV1Client{client}, nil } -// NewForConfigOrDie creates a new AuditregistrationV1alpha1Client for the given config and +// NewForConfigOrDie creates a new CertificatesV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *AuditregistrationV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *CertificatesV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -61,13 +61,13 @@ func NewForConfigOrDie(c *rest.Config) *AuditregistrationV1alpha1Client { return client } -// New creates a new AuditregistrationV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *AuditregistrationV1alpha1Client { - return &AuditregistrationV1alpha1Client{c} +// New creates a new CertificatesV1Client for the given RESTClient. +func New(c rest.Interface) *CertificatesV1Client { + return &CertificatesV1Client{c} } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := v1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() @@ -81,7 +81,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AuditregistrationV1alpha1Client) RESTClient() rest.Interface { +func (c *CertificatesV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go new file mode 100644 index 00000000000..28f74b2729c --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go @@ -0,0 +1,200 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "k8s.io/api/certificates/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface. +// A group's client should implement this interface. +type CertificateSigningRequestsGetter interface { + CertificateSigningRequests() CertificateSigningRequestInterface +} + +// CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources. +type CertificateSigningRequestInterface interface { + Create(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.CreateOptions) (*v1.CertificateSigningRequest, error) + Update(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (*v1.CertificateSigningRequest, error) + UpdateStatus(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (*v1.CertificateSigningRequest, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CertificateSigningRequest, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.CertificateSigningRequestList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CertificateSigningRequest, err error) + UpdateApproval(ctx context.Context, certificateSigningRequestName string, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (*v1.CertificateSigningRequest, error) + + CertificateSigningRequestExpansion +} + +// certificateSigningRequests implements CertificateSigningRequestInterface +type certificateSigningRequests struct { + client rest.Interface +} + +// newCertificateSigningRequests returns a CertificateSigningRequests +func newCertificateSigningRequests(c *CertificatesV1Client) *certificateSigningRequests { + return &certificateSigningRequests{ + client: c.RESTClient(), + } +} + +// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. +func (c *certificateSigningRequests) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CertificateSigningRequest, err error) { + result = &v1.CertificateSigningRequest{} + err = c.client.Get(). + Resource("certificatesigningrequests"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. +func (c *certificateSigningRequests) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CertificateSigningRequestList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.CertificateSigningRequestList{} + err = c.client.Get(). + Resource("certificatesigningrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested certificateSigningRequests. +func (c *certificateSigningRequests) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("certificatesigningrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *certificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.CreateOptions) (result *v1.CertificateSigningRequest, err error) { + result = &v1.CertificateSigningRequest{} + err = c.client.Post(). + Resource("certificatesigningrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(certificateSigningRequest). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *certificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (result *v1.CertificateSigningRequest, err error) { + result = &v1.CertificateSigningRequest{} + err = c.client.Put(). + Resource("certificatesigningrequests"). + Name(certificateSigningRequest.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(certificateSigningRequest). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *certificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (result *v1.CertificateSigningRequest, err error) { + result = &v1.CertificateSigningRequest{} + err = c.client.Put(). + Resource("certificatesigningrequests"). + Name(certificateSigningRequest.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(certificateSigningRequest). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. +func (c *certificateSigningRequests) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("certificatesigningrequests"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *certificateSigningRequests) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("certificatesigningrequests"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched certificateSigningRequest. +func (c *certificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CertificateSigningRequest, err error) { + result = &v1.CertificateSigningRequest{} + err = c.client.Patch(pt). + Resource("certificatesigningrequests"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// UpdateApproval takes the top resource name and the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *certificateSigningRequests) UpdateApproval(ctx context.Context, certificateSigningRequestName string, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (result *v1.CertificateSigningRequest, err error) { + result = &v1.CertificateSigningRequest{} + err = c.client.Put(). + Resource("certificatesigningrequests"). + Name(certificateSigningRequestName). + SubResource("approval"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(certificateSigningRequest). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/doc.go similarity index 97% rename from vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/doc.go rename to vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/doc.go index df51baa4d4c..3af5d054f10 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/doc.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. -package v1alpha1 +package v1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/BUILD b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/BUILD similarity index 73% rename from vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/BUILD rename to vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/BUILD index 76ac78a7db8..5ecc04c160a 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/BUILD +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/BUILD @@ -4,20 +4,20 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "fake_auditregistration_client.go", - "fake_auditsink.go", + "fake_certificates_client.go", + "fake_certificatesigningrequest.go", ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake", - importpath = "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake", + importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake", + importpath = "k8s.io/client-go/kubernetes/typed/certificates/v1/fake", visibility = ["//visibility:public"], deps = [ - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library", ], diff --git a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/doc.go similarity index 100% rename from vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/doc.go rename to vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/doc.go diff --git a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditregistration_client.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificates_client.go similarity index 74% rename from vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditregistration_client.go rename to vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificates_client.go index c22acabcf47..4779d6169b3 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake/fake_auditregistration_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificates_client.go @@ -19,22 +19,22 @@ limitations under the License. package fake import ( - v1alpha1 "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1" + v1 "k8s.io/client-go/kubernetes/typed/certificates/v1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeAuditregistrationV1alpha1 struct { +type FakeCertificatesV1 struct { *testing.Fake } -func (c *FakeAuditregistrationV1alpha1) AuditSinks() v1alpha1.AuditSinkInterface { - return &FakeAuditSinks{c} +func (c *FakeCertificatesV1) CertificateSigningRequests() v1.CertificateSigningRequestInterface { + return &FakeCertificateSigningRequests{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAuditregistrationV1alpha1) RESTClient() rest.Interface { +func (c *FakeCertificatesV1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificatesigningrequest.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificatesigningrequest.go new file mode 100644 index 00000000000..1e5d9c2eff1 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/fake/fake_certificatesigningrequest.go @@ -0,0 +1,143 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + certificatesv1 "k8s.io/api/certificates/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeCertificateSigningRequests implements CertificateSigningRequestInterface +type FakeCertificateSigningRequests struct { + Fake *FakeCertificatesV1 +} + +var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1", Resource: "certificatesigningrequests"} + +var certificatesigningrequestsKind = schema.GroupVersionKind{Group: "certificates.k8s.io", Version: "v1", Kind: "CertificateSigningRequest"} + +// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. +func (c *FakeCertificateSigningRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *certificatesv1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(certificatesigningrequestsResource, name), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. +func (c *FakeCertificateSigningRequests) List(ctx context.Context, opts v1.ListOptions) (result *certificatesv1.CertificateSigningRequestList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(certificatesigningrequestsResource, certificatesigningrequestsKind, opts), &certificatesv1.CertificateSigningRequestList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &certificatesv1.CertificateSigningRequestList{ListMeta: obj.(*certificatesv1.CertificateSigningRequestList).ListMeta} + for _, item := range obj.(*certificatesv1.CertificateSigningRequestList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested certificateSigningRequests. +func (c *FakeCertificateSigningRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(certificatesigningrequestsResource, opts)) +} + +// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *FakeCertificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.CreateOptions) (result *certificatesv1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *FakeCertificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.UpdateOptions) (result *certificatesv1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCertificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.UpdateOptions) (*certificatesv1.CertificateSigningRequest, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. +func (c *FakeCertificateSigningRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(certificatesigningrequestsResource, name), &certificatesv1.CertificateSigningRequest{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCertificateSigningRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOpts) + + _, err := c.Fake.Invokes(action, &certificatesv1.CertificateSigningRequestList{}) + return err +} + +// Patch applies the patch and returns the patched certificateSigningRequest. +func (c *FakeCertificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *certificatesv1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, pt, data, subresources...), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} + +// UpdateApproval takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *FakeCertificateSigningRequests) UpdateApproval(ctx context.Context, certificateSigningRequestName string, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.UpdateOptions) (result *certificatesv1.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "approval", certificateSigningRequest), &certificatesv1.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificatesv1.CertificateSigningRequest), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/generated_expansion.go new file mode 100644 index 00000000000..95fad021266 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1/generated_expansion.go @@ -0,0 +1,21 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type CertificateSigningRequestExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/BUILD b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/BUILD index c1fdac3d3ef..5d37b4b63b0 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/BUILD +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/BUILD @@ -3,6 +3,7 @@ package(default_visibility = ["//visibility:public"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", + "go_test", ) go_library( @@ -46,8 +47,10 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", + "//staging/src/k8s.io/client-go/rest/fake:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library", ], ) @@ -64,3 +67,13 @@ filegroup( srcs = [":package-srcs"], tags = ["automanaged"], ) + +go_test( + name = "go_default_test", + srcs = ["fake_pod_expansion_test.go"], + embed = [":go_default_library"], + deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/testing:go_default_library", + ], +) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go index a95fdb21d67..d9a718a56f3 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go @@ -18,11 +18,17 @@ package fake import ( "context" + "fmt" + "io/ioutil" + "net/http" + "strings" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" policy "k8s.io/api/policy/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes/scheme" restclient "k8s.io/client-go/rest" + fakerest "k8s.io/client-go/rest/fake" core "k8s.io/client-go/testing" ) @@ -57,7 +63,19 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Requ action.Value = opts _, _ = c.Fake.Invokes(action, &v1.Pod{}) - return &restclient.Request{} + fakeClient := &fakerest.RESTClient{ + Client: fakerest.CreateHTTPClient(func(request *http.Request) (*http.Response, error) { + resp := &http.Response{ + StatusCode: http.StatusOK, + Body: ioutil.NopCloser(strings.NewReader("fake logs")), + } + return resp, nil + }), + NegotiatedSerializer: scheme.Codecs.WithoutConversion(), + GroupVersion: podsKind.GroupVersion(), + VersionedAPIPath: fmt.Sprintf("/api/v1/namespaces/%s/pods/%s/log", c.ns, name), + } + return fakeClient.Request() } func (c *FakePods) Evict(ctx context.Context, eviction *policy.Eviction) error { @@ -71,3 +89,7 @@ func (c *FakePods) Evict(ctx context.Context, eviction *policy.Eviction) error { _, err := c.Fake.Invokes(action, eviction) return err } + +func (c *FakePods) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { + return c.Fake.InvokesProxy(core.NewProxyGetAction(podsResource, c.ns, scheme, name, port, path, params)) +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go index 8710a2c0542..759fe0ff4a2 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go @@ -22,6 +22,7 @@ import ( v1 "k8s.io/api/core/v1" policy "k8s.io/api/policy/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/net" "k8s.io/client-go/kubernetes/scheme" restclient "k8s.io/client-go/rest" ) @@ -31,6 +32,7 @@ type PodExpansion interface { Bind(ctx context.Context, binding *v1.Binding, opts metav1.CreateOptions) error Evict(ctx context.Context, eviction *policy.Eviction) error GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request + ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper } // Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored). @@ -46,3 +48,17 @@ func (c *pods) Evict(ctx context.Context, eviction *policy.Eviction) error { func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request { return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, scheme.ParameterCodec) } + +// ProxyGet returns a response of the pod by calling it through the proxy. +func (c *pods) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { + request := c.client.Get(). + Namespace(c.ns). + Resource("pods"). + SubResource("proxy"). + Name(net.JoinSchemeNamePort(scheme, name, port)). + Suffix(path) + for k, v := range params { + request = request.Param(k, v) + } + return request +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/BUILD b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/BUILD new file mode 100644 index 00000000000..23530df9fb3 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/BUILD @@ -0,0 +1,39 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "event.go", + "events_client.go", + "generated_expansion.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/events/v1", + importpath = "k8s.io/client-go/kubernetes/typed/events/v1", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/api/events/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//staging/src/k8s.io/client-go/rest:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1/fake:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/doc.go new file mode 100644 index 00000000000..3af5d054f10 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/event.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/event.go new file mode 100644 index 00000000000..3b3496317fc --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/event.go @@ -0,0 +1,178 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "k8s.io/api/events/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// EventsGetter has a method to return a EventInterface. +// A group's client should implement this interface. +type EventsGetter interface { + Events(namespace string) EventInterface +} + +// EventInterface has methods to work with Event resources. +type EventInterface interface { + Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (*v1.Event, error) + Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (*v1.Event, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Event, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.EventList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error) + EventExpansion +} + +// events implements EventInterface +type events struct { + client rest.Interface + ns string +} + +// newEvents returns a Events +func newEvents(c *EventsV1Client, namespace string) *events { + return &events{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the event, and returns the corresponding event object, and an error if there is any. +func (c *events) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Event, err error) { + result = &v1.Event{} + err = c.client.Get(). + Namespace(c.ns). + Resource("events"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Events that match those selectors. +func (c *events) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EventList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.EventList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("events"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested events. +func (c *events) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("events"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. +func (c *events) Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (result *v1.Event, err error) { + result = &v1.Event{} + err = c.client.Post(). + Namespace(c.ns). + Resource("events"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(event). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. +func (c *events) Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (result *v1.Event, err error) { + result = &v1.Event{} + err = c.client.Put(). + Namespace(c.ns). + Resource("events"). + Name(event.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(event). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the event and deletes it. Returns an error if one occurs. +func (c *events) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("events"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *events) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("events"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched event. +func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error) { + result = &v1.Event{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("events"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/events_client.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/events_client.go new file mode 100644 index 00000000000..9230ca5ca7c --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/events_client.go @@ -0,0 +1,89 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/events/v1" + "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +type EventsV1Interface interface { + RESTClient() rest.Interface + EventsGetter +} + +// EventsV1Client is used to interact with features provided by the events.k8s.io group. +type EventsV1Client struct { + restClient rest.Interface +} + +func (c *EventsV1Client) Events(namespace string) EventInterface { + return newEvents(c, namespace) +} + +// NewForConfig creates a new EventsV1Client for the given config. +func NewForConfig(c *rest.Config) (*EventsV1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &EventsV1Client{client}, nil +} + +// NewForConfigOrDie creates a new EventsV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *EventsV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new EventsV1Client for the given RESTClient. +func New(c rest.Interface) *EventsV1Client { + return &EventsV1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *EventsV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/BUILD b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/BUILD new file mode 100644 index 00000000000..26bfd8c2c49 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/BUILD @@ -0,0 +1,38 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "fake_event.go", + "fake_events_client.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake", + importpath = "k8s.io/client-go/kubernetes/typed/events/v1/fake", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/api/events/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1:go_default_library", + "//staging/src/k8s.io/client-go/rest:go_default_library", + "//staging/src/k8s.io/client-go/testing:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/doc.go new file mode 100644 index 00000000000..16f44399065 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_event.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_event.go new file mode 100644 index 00000000000..73c3b4e02e2 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_event.go @@ -0,0 +1,130 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + eventsv1 "k8s.io/api/events/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeEvents implements EventInterface +type FakeEvents struct { + Fake *FakeEventsV1 + ns string +} + +var eventsResource = schema.GroupVersionResource{Group: "events.k8s.io", Version: "v1", Resource: "events"} + +var eventsKind = schema.GroupVersionKind{Group: "events.k8s.io", Version: "v1", Kind: "Event"} + +// Get takes name of the event, and returns the corresponding event object, and an error if there is any. +func (c *FakeEvents) Get(ctx context.Context, name string, options v1.GetOptions) (result *eventsv1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(eventsResource, c.ns, name), &eventsv1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*eventsv1.Event), err +} + +// List takes label and field selectors, and returns the list of Events that match those selectors. +func (c *FakeEvents) List(ctx context.Context, opts v1.ListOptions) (result *eventsv1.EventList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &eventsv1.EventList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &eventsv1.EventList{ListMeta: obj.(*eventsv1.EventList).ListMeta} + for _, item := range obj.(*eventsv1.EventList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested events. +func (c *FakeEvents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts)) + +} + +// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. +func (c *FakeEvents) Create(ctx context.Context, event *eventsv1.Event, opts v1.CreateOptions) (result *eventsv1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &eventsv1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*eventsv1.Event), err +} + +// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. +func (c *FakeEvents) Update(ctx context.Context, event *eventsv1.Event, opts v1.UpdateOptions) (result *eventsv1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &eventsv1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*eventsv1.Event), err +} + +// Delete takes name of the event and deletes it. Returns an error if one occurs. +func (c *FakeEvents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &eventsv1.Event{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeEvents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &eventsv1.EventList{}) + return err +} + +// Patch applies the patch and returns the patched event. +func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *eventsv1.Event, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, pt, data, subresources...), &eventsv1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*eventsv1.Event), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_events_client.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_events_client.go new file mode 100644 index 00000000000..95ef2b307cc --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/fake/fake_events_client.go @@ -0,0 +1,40 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/client-go/kubernetes/typed/events/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeEventsV1 struct { + *testing.Fake +} + +func (c *FakeEventsV1) Events(namespace string) v1.EventInterface { + return &FakeEvents{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeEventsV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/generated_expansion.go similarity index 92% rename from vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/generated_expansion.go rename to vendor/k8s.io/client-go/kubernetes/typed/events/v1/generated_expansion.go index f0f51172641..2d5885584f5 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/events/v1/generated_expansion.go @@ -16,6 +16,6 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1 -type AuditSinkExpansion interface{} +type EventExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/BUILD b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/BUILD index b5dd69448b6..fc4f6f11c4b 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/BUILD +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/BUILD @@ -10,6 +10,8 @@ go_library( srcs = [ "doc.go", "generated_expansion.go", + "ingress.go", + "ingressclass.go", "networking_client.go", "networkpolicy.go", ], diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/BUILD b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/BUILD index 08f8ac9fd61..99781300aa7 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/BUILD +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/BUILD @@ -9,6 +9,8 @@ go_library( name = "go_default_library", srcs = [ "doc.go", + "fake_ingress.go", + "fake_ingressclass.go", "fake_networking_client.go", "fake_networkpolicy.go", ], diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingress.go new file mode 100644 index 00000000000..68d4d3358c1 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingress.go @@ -0,0 +1,142 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + networkingv1 "k8s.io/api/networking/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeIngresses implements IngressInterface +type FakeIngresses struct { + Fake *FakeNetworkingV1 + ns string +} + +var ingressesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1", Resource: "ingresses"} + +var ingressesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "Ingress"} + +// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. +func (c *FakeIngresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *networkingv1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(ingressesResource, c.ns, name), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} + +// List takes label and field selectors, and returns the list of Ingresses that match those selectors. +func (c *FakeIngresses) List(ctx context.Context, opts v1.ListOptions) (result *networkingv1.IngressList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(ingressesResource, ingressesKind, c.ns, opts), &networkingv1.IngressList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &networkingv1.IngressList{ListMeta: obj.(*networkingv1.IngressList).ListMeta} + for _, item := range obj.(*networkingv1.IngressList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ingresses. +func (c *FakeIngresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(ingressesResource, c.ns, opts)) + +} + +// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *FakeIngresses) Create(ctx context.Context, ingress *networkingv1.Ingress, opts v1.CreateOptions) (result *networkingv1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(ingressesResource, c.ns, ingress), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} + +// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *FakeIngresses) Update(ctx context.Context, ingress *networkingv1.Ingress, opts v1.UpdateOptions) (result *networkingv1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeIngresses) UpdateStatus(ctx context.Context, ingress *networkingv1.Ingress, opts v1.UpdateOptions) (*networkingv1.Ingress, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} + +// Delete takes name of the ingress and deletes it. Returns an error if one occurs. +func (c *FakeIngresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(ingressesResource, c.ns, name), &networkingv1.Ingress{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeIngresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &networkingv1.IngressList{}) + return err +} + +// Patch applies the patch and returns the patched ingress. +func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *networkingv1.Ingress, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, pt, data, subresources...), &networkingv1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*networkingv1.Ingress), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingressclass.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingressclass.go new file mode 100644 index 00000000000..9c051956296 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_ingressclass.go @@ -0,0 +1,122 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + networkingv1 "k8s.io/api/networking/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeIngressClasses implements IngressClassInterface +type FakeIngressClasses struct { + Fake *FakeNetworkingV1 +} + +var ingressclassesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1", Resource: "ingressclasses"} + +var ingressclassesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "IngressClass"} + +// Get takes name of the ingressClass, and returns the corresponding ingressClass object, and an error if there is any. +func (c *FakeIngressClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *networkingv1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(ingressclassesResource, name), &networkingv1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1.IngressClass), err +} + +// List takes label and field selectors, and returns the list of IngressClasses that match those selectors. +func (c *FakeIngressClasses) List(ctx context.Context, opts v1.ListOptions) (result *networkingv1.IngressClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(ingressclassesResource, ingressclassesKind, opts), &networkingv1.IngressClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &networkingv1.IngressClassList{ListMeta: obj.(*networkingv1.IngressClassList).ListMeta} + for _, item := range obj.(*networkingv1.IngressClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ingressClasses. +func (c *FakeIngressClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(ingressclassesResource, opts)) +} + +// Create takes the representation of a ingressClass and creates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *FakeIngressClasses) Create(ctx context.Context, ingressClass *networkingv1.IngressClass, opts v1.CreateOptions) (result *networkingv1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(ingressclassesResource, ingressClass), &networkingv1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1.IngressClass), err +} + +// Update takes the representation of a ingressClass and updates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *FakeIngressClasses) Update(ctx context.Context, ingressClass *networkingv1.IngressClass, opts v1.UpdateOptions) (result *networkingv1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(ingressclassesResource, ingressClass), &networkingv1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1.IngressClass), err +} + +// Delete takes name of the ingressClass and deletes it. Returns an error if one occurs. +func (c *FakeIngressClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(ingressclassesResource, name), &networkingv1.IngressClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeIngressClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(ingressclassesResource, listOpts) + + _, err := c.Fake.Invokes(action, &networkingv1.IngressClassList{}) + return err +} + +// Patch applies the patch and returns the patched ingressClass. +func (c *FakeIngressClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *networkingv1.IngressClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(ingressclassesResource, name, pt, data, subresources...), &networkingv1.IngressClass{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1.IngressClass), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go index 6b135c63690..ed1639e2ff7 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go @@ -28,6 +28,14 @@ type FakeNetworkingV1 struct { *testing.Fake } +func (c *FakeNetworkingV1) Ingresses(namespace string) v1.IngressInterface { + return &FakeIngresses{c, namespace} +} + +func (c *FakeNetworkingV1) IngressClasses() v1.IngressClassInterface { + return &FakeIngressClasses{c} +} + func (c *FakeNetworkingV1) NetworkPolicies(namespace string) v1.NetworkPolicyInterface { return &FakeNetworkPolicies{c, namespace} } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go index 7d77495fac8..52b70c514eb 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go @@ -18,4 +18,8 @@ limitations under the License. package v1 +type IngressExpansion interface{} + +type IngressClassExpansion interface{} + type NetworkPolicyExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go new file mode 100644 index 00000000000..40d028b2f5a --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go @@ -0,0 +1,195 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "k8s.io/api/networking/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// IngressesGetter has a method to return a IngressInterface. +// A group's client should implement this interface. +type IngressesGetter interface { + Ingresses(namespace string) IngressInterface +} + +// IngressInterface has methods to work with Ingress resources. +type IngressInterface interface { + Create(ctx context.Context, ingress *v1.Ingress, opts metav1.CreateOptions) (*v1.Ingress, error) + Update(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (*v1.Ingress, error) + UpdateStatus(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (*v1.Ingress, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Ingress, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.IngressList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Ingress, err error) + IngressExpansion +} + +// ingresses implements IngressInterface +type ingresses struct { + client rest.Interface + ns string +} + +// newIngresses returns a Ingresses +func newIngresses(c *NetworkingV1Client, namespace string) *ingresses { + return &ingresses{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. +func (c *ingresses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Ingress, err error) { + result = &v1.Ingress{} + err = c.client.Get(). + Namespace(c.ns). + Resource("ingresses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Ingresses that match those selectors. +func (c *ingresses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.IngressList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("ingresses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested ingresses. +func (c *ingresses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("ingresses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *ingresses) Create(ctx context.Context, ingress *v1.Ingress, opts metav1.CreateOptions) (result *v1.Ingress, err error) { + result = &v1.Ingress{} + err = c.client.Post(). + Namespace(c.ns). + Resource("ingresses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ingress). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. +func (c *ingresses) Update(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (result *v1.Ingress, err error) { + result = &v1.Ingress{} + err = c.client.Put(). + Namespace(c.ns). + Resource("ingresses"). + Name(ingress.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ingress). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *ingresses) UpdateStatus(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (result *v1.Ingress, err error) { + result = &v1.Ingress{} + err = c.client.Put(). + Namespace(c.ns). + Resource("ingresses"). + Name(ingress.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ingress). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the ingress and deletes it. Returns an error if one occurs. +func (c *ingresses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("ingresses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *ingresses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("ingresses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched ingress. +func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Ingress, err error) { + result = &v1.Ingress{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("ingresses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go new file mode 100644 index 00000000000..ea67fdab216 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go @@ -0,0 +1,168 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + v1 "k8s.io/api/networking/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// IngressClassesGetter has a method to return a IngressClassInterface. +// A group's client should implement this interface. +type IngressClassesGetter interface { + IngressClasses() IngressClassInterface +} + +// IngressClassInterface has methods to work with IngressClass resources. +type IngressClassInterface interface { + Create(ctx context.Context, ingressClass *v1.IngressClass, opts metav1.CreateOptions) (*v1.IngressClass, error) + Update(ctx context.Context, ingressClass *v1.IngressClass, opts metav1.UpdateOptions) (*v1.IngressClass, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.IngressClass, error) + List(ctx context.Context, opts metav1.ListOptions) (*v1.IngressClassList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IngressClass, err error) + IngressClassExpansion +} + +// ingressClasses implements IngressClassInterface +type ingressClasses struct { + client rest.Interface +} + +// newIngressClasses returns a IngressClasses +func newIngressClasses(c *NetworkingV1Client) *ingressClasses { + return &ingressClasses{ + client: c.RESTClient(), + } +} + +// Get takes name of the ingressClass, and returns the corresponding ingressClass object, and an error if there is any. +func (c *ingressClasses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IngressClass, err error) { + result = &v1.IngressClass{} + err = c.client.Get(). + Resource("ingressclasses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of IngressClasses that match those selectors. +func (c *ingressClasses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressClassList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1.IngressClassList{} + err = c.client.Get(). + Resource("ingressclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested ingressClasses. +func (c *ingressClasses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("ingressclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a ingressClass and creates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *ingressClasses) Create(ctx context.Context, ingressClass *v1.IngressClass, opts metav1.CreateOptions) (result *v1.IngressClass, err error) { + result = &v1.IngressClass{} + err = c.client.Post(). + Resource("ingressclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ingressClass). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a ingressClass and updates it. Returns the server's representation of the ingressClass, and an error, if there is any. +func (c *ingressClasses) Update(ctx context.Context, ingressClass *v1.IngressClass, opts metav1.UpdateOptions) (result *v1.IngressClass, err error) { + result = &v1.IngressClass{} + err = c.client.Put(). + Resource("ingressclasses"). + Name(ingressClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(ingressClass). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the ingressClass and deletes it. Returns an error if one occurs. +func (c *ingressClasses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("ingressclasses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *ingressClasses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("ingressclasses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched ingressClass. +func (c *ingressClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IngressClass, err error) { + result = &v1.IngressClass{} + err = c.client.Patch(pt). + Resource("ingressclasses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go index 5315d9b9224..c83b93575e6 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go @@ -26,6 +26,8 @@ import ( type NetworkingV1Interface interface { RESTClient() rest.Interface + IngressesGetter + IngressClassesGetter NetworkPoliciesGetter } @@ -34,6 +36,14 @@ type NetworkingV1Client struct { restClient rest.Interface } +func (c *NetworkingV1Client) Ingresses(namespace string) IngressInterface { + return newIngresses(c, namespace) +} + +func (c *NetworkingV1Client) IngressClasses() IngressClassInterface { + return newIngressClasses(c) +} + func (c *NetworkingV1Client) NetworkPolicies(namespace string) NetworkPolicyInterface { return newNetworkPolicies(c, namespace) } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/BUILD b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/BUILD index 15c0baea780..2aff465ad47 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/BUILD +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/BUILD @@ -3,6 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ + "csistoragecapacity.go", "doc.go", "generated_expansion.go", "storage_client.go", diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go new file mode 100644 index 00000000000..876348112ab --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go @@ -0,0 +1,178 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "k8s.io/api/storage/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// CSIStorageCapacitiesGetter has a method to return a CSIStorageCapacityInterface. +// A group's client should implement this interface. +type CSIStorageCapacitiesGetter interface { + CSIStorageCapacities(namespace string) CSIStorageCapacityInterface +} + +// CSIStorageCapacityInterface has methods to work with CSIStorageCapacity resources. +type CSIStorageCapacityInterface interface { + Create(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.CreateOptions) (*v1alpha1.CSIStorageCapacity, error) + Update(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.UpdateOptions) (*v1alpha1.CSIStorageCapacity, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.CSIStorageCapacity, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CSIStorageCapacityList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CSIStorageCapacity, err error) + CSIStorageCapacityExpansion +} + +// cSIStorageCapacities implements CSIStorageCapacityInterface +type cSIStorageCapacities struct { + client rest.Interface + ns string +} + +// newCSIStorageCapacities returns a CSIStorageCapacities +func newCSIStorageCapacities(c *StorageV1alpha1Client, namespace string) *cSIStorageCapacities { + return &cSIStorageCapacities{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the cSIStorageCapacity, and returns the corresponding cSIStorageCapacity object, and an error if there is any. +func (c *cSIStorageCapacities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CSIStorageCapacity, err error) { + result = &v1alpha1.CSIStorageCapacity{} + err = c.client.Get(). + Namespace(c.ns). + Resource("csistoragecapacities"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. +func (c *cSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CSIStorageCapacityList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.CSIStorageCapacityList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("csistoragecapacities"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested cSIStorageCapacities. +func (c *cSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("csistoragecapacities"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a cSIStorageCapacity and creates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *cSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.CreateOptions) (result *v1alpha1.CSIStorageCapacity, err error) { + result = &v1alpha1.CSIStorageCapacity{} + err = c.client.Post(). + Namespace(c.ns). + Resource("csistoragecapacities"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cSIStorageCapacity). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a cSIStorageCapacity and updates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *cSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.UpdateOptions) (result *v1alpha1.CSIStorageCapacity, err error) { + result = &v1alpha1.CSIStorageCapacity{} + err = c.client.Put(). + Namespace(c.ns). + Resource("csistoragecapacities"). + Name(cSIStorageCapacity.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cSIStorageCapacity). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs. +func (c *cSIStorageCapacities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("csistoragecapacities"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *cSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("csistoragecapacities"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched cSIStorageCapacity. +func (c *cSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CSIStorageCapacity, err error) { + result = &v1alpha1.CSIStorageCapacity{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("csistoragecapacities"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/BUILD b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/BUILD index d9b6dbe1df4..d32458e1b62 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/BUILD +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/BUILD @@ -4,6 +4,7 @@ go_library( name = "go_default_library", srcs = [ "doc.go", + "fake_csistoragecapacity.go", "fake_storage_client.go", "fake_volumeattachment.go", ], diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_csistoragecapacity.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_csistoragecapacity.go new file mode 100644 index 00000000000..5bca3e209cb --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_csistoragecapacity.go @@ -0,0 +1,130 @@ +/* +Copyright 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "k8s.io/api/storage/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeCSIStorageCapacities implements CSIStorageCapacityInterface +type FakeCSIStorageCapacities struct { + Fake *FakeStorageV1alpha1 + ns string +} + +var csistoragecapacitiesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1alpha1", Resource: "csistoragecapacities"} + +var csistoragecapacitiesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1alpha1", Kind: "CSIStorageCapacity"} + +// Get takes name of the cSIStorageCapacity, and returns the corresponding cSIStorageCapacity object, and an error if there is any. +func (c *FakeCSIStorageCapacities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(csistoragecapacitiesResource, c.ns, name), &v1alpha1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CSIStorageCapacity), err +} + +// List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. +func (c *FakeCSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CSIStorageCapacityList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(csistoragecapacitiesResource, csistoragecapacitiesKind, c.ns, opts), &v1alpha1.CSIStorageCapacityList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.CSIStorageCapacityList{ListMeta: obj.(*v1alpha1.CSIStorageCapacityList).ListMeta} + for _, item := range obj.(*v1alpha1.CSIStorageCapacityList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cSIStorageCapacities. +func (c *FakeCSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(csistoragecapacitiesResource, c.ns, opts)) + +} + +// Create takes the representation of a cSIStorageCapacity and creates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *FakeCSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.CreateOptions) (result *v1alpha1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &v1alpha1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CSIStorageCapacity), err +} + +// Update takes the representation of a cSIStorageCapacity and updates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. +func (c *FakeCSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.UpdateOptions) (result *v1alpha1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &v1alpha1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CSIStorageCapacity), err +} + +// Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs. +func (c *FakeCSIStorageCapacities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(csistoragecapacitiesResource, c.ns, name), &v1alpha1.CSIStorageCapacity{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(csistoragecapacitiesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.CSIStorageCapacityList{}) + return err +} + +// Patch applies the patch and returns the patched cSIStorageCapacity. +func (c *FakeCSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CSIStorageCapacity, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, name, pt, data, subresources...), &v1alpha1.CSIStorageCapacity{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CSIStorageCapacity), err +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go index 1a4d9f56fc8..c26190aa01a 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go @@ -28,6 +28,10 @@ type FakeStorageV1alpha1 struct { *testing.Fake } +func (c *FakeStorageV1alpha1) CSIStorageCapacities(namespace string) v1alpha1.CSIStorageCapacityInterface { + return &FakeCSIStorageCapacities{c, namespace} +} + func (c *FakeStorageV1alpha1) VolumeAttachments() v1alpha1.VolumeAttachmentInterface { return &FakeVolumeAttachments{c} } diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go index cdb7ab2f8db..0f51c85f9e7 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go @@ -18,4 +18,6 @@ limitations under the License. package v1alpha1 +type CSIStorageCapacityExpansion interface{} + type VolumeAttachmentExpansion interface{} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go index 32d50306049..9686923004e 100644 --- a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go +++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go @@ -26,6 +26,7 @@ import ( type StorageV1alpha1Interface interface { RESTClient() rest.Interface + CSIStorageCapacitiesGetter VolumeAttachmentsGetter } @@ -34,6 +35,10 @@ type StorageV1alpha1Client struct { restClient rest.Interface } +func (c *StorageV1alpha1Client) CSIStorageCapacities(namespace string) CSIStorageCapacityInterface { + return newCSIStorageCapacities(c, namespace) +} + func (c *StorageV1alpha1Client) VolumeAttachments() VolumeAttachmentInterface { return newVolumeAttachments(c) } diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1/mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1/mutatingwebhookconfiguration.go index e2b5da0982e..fe9e27985de 100644 --- a/vendor/k8s.io/client-go/listers/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/listers/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -26,10 +26,13 @@ import ( ) // MutatingWebhookConfigurationLister helps list MutatingWebhookConfigurations. +// All objects returned here must be treated as read-only. type MutatingWebhookConfigurationLister interface { // List lists all MutatingWebhookConfigurations in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.MutatingWebhookConfiguration, err error) // Get retrieves the MutatingWebhookConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.MutatingWebhookConfiguration, error) MutatingWebhookConfigurationListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingwebhookconfiguration.go index 33d55e08b4c..1579a0ebb76 100644 --- a/vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/listers/admissionregistration/v1/validatingwebhookconfiguration.go @@ -26,10 +26,13 @@ import ( ) // ValidatingWebhookConfigurationLister helps list ValidatingWebhookConfigurations. +// All objects returned here must be treated as read-only. type ValidatingWebhookConfigurationLister interface { // List lists all ValidatingWebhookConfigurations in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ValidatingWebhookConfiguration, err error) // Get retrieves the ValidatingWebhookConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.ValidatingWebhookConfiguration, error) ValidatingWebhookConfigurationListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index b38732c367e..93c6096ee9e 100644 --- a/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -26,10 +26,13 @@ import ( ) // MutatingWebhookConfigurationLister helps list MutatingWebhookConfigurations. +// All objects returned here must be treated as read-only. type MutatingWebhookConfigurationLister interface { // List lists all MutatingWebhookConfigurations in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.MutatingWebhookConfiguration, err error) // Get retrieves the MutatingWebhookConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.MutatingWebhookConfiguration, error) MutatingWebhookConfigurationListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go index b89c9bbe2af..7c17fccb2e2 100644 --- a/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/vendor/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -26,10 +26,13 @@ import ( ) // ValidatingWebhookConfigurationLister helps list ValidatingWebhookConfigurations. +// All objects returned here must be treated as read-only. type ValidatingWebhookConfigurationLister interface { // List lists all ValidatingWebhookConfigurations in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ValidatingWebhookConfiguration, err error) // Get retrieves the ValidatingWebhookConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.ValidatingWebhookConfiguration, error) ValidatingWebhookConfigurationListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1/controllerrevision.go b/vendor/k8s.io/client-go/listers/apps/v1/controllerrevision.go index 9029805a3e8..9e2f973746b 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1/controllerrevision.go +++ b/vendor/k8s.io/client-go/listers/apps/v1/controllerrevision.go @@ -26,8 +26,10 @@ import ( ) // ControllerRevisionLister helps list ControllerRevisions. +// All objects returned here must be treated as read-only. type ControllerRevisionLister interface { // List lists all ControllerRevisions in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ControllerRevision, err error) // ControllerRevisions returns an object that can list and get ControllerRevisions. ControllerRevisions(namespace string) ControllerRevisionNamespaceLister @@ -58,10 +60,13 @@ func (s *controllerRevisionLister) ControllerRevisions(namespace string) Control } // ControllerRevisionNamespaceLister helps list and get ControllerRevisions. +// All objects returned here must be treated as read-only. type ControllerRevisionNamespaceLister interface { // List lists all ControllerRevisions in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ControllerRevision, err error) // Get retrieves the ControllerRevision from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.ControllerRevision, error) ControllerRevisionNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1/daemonset.go b/vendor/k8s.io/client-go/listers/apps/v1/daemonset.go index b022ecc4af6..061959e3daf 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1/daemonset.go +++ b/vendor/k8s.io/client-go/listers/apps/v1/daemonset.go @@ -26,8 +26,10 @@ import ( ) // DaemonSetLister helps list DaemonSets. +// All objects returned here must be treated as read-only. type DaemonSetLister interface { // List lists all DaemonSets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.DaemonSet, err error) // DaemonSets returns an object that can list and get DaemonSets. DaemonSets(namespace string) DaemonSetNamespaceLister @@ -58,10 +60,13 @@ func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister } // DaemonSetNamespaceLister helps list and get DaemonSets. +// All objects returned here must be treated as read-only. type DaemonSetNamespaceLister interface { // List lists all DaemonSets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.DaemonSet, err error) // Get retrieves the DaemonSet from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.DaemonSet, error) DaemonSetNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1/deployment.go b/vendor/k8s.io/client-go/listers/apps/v1/deployment.go index d1be7156ed6..77040341729 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1/deployment.go +++ b/vendor/k8s.io/client-go/listers/apps/v1/deployment.go @@ -26,8 +26,10 @@ import ( ) // DeploymentLister helps list Deployments. +// All objects returned here must be treated as read-only. type DeploymentLister interface { // List lists all Deployments in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Deployment, err error) // Deployments returns an object that can list and get Deployments. Deployments(namespace string) DeploymentNamespaceLister @@ -58,10 +60,13 @@ func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceList } // DeploymentNamespaceLister helps list and get Deployments. +// All objects returned here must be treated as read-only. type DeploymentNamespaceLister interface { // List lists all Deployments in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Deployment, err error) // Get retrieves the Deployment from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Deployment, error) DeploymentNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1/replicaset.go b/vendor/k8s.io/client-go/listers/apps/v1/replicaset.go index d487ef6567f..3ca7757eb94 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1/replicaset.go +++ b/vendor/k8s.io/client-go/listers/apps/v1/replicaset.go @@ -26,8 +26,10 @@ import ( ) // ReplicaSetLister helps list ReplicaSets. +// All objects returned here must be treated as read-only. type ReplicaSetLister interface { // List lists all ReplicaSets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ReplicaSet, err error) // ReplicaSets returns an object that can list and get ReplicaSets. ReplicaSets(namespace string) ReplicaSetNamespaceLister @@ -58,10 +60,13 @@ func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceList } // ReplicaSetNamespaceLister helps list and get ReplicaSets. +// All objects returned here must be treated as read-only. type ReplicaSetNamespaceLister interface { // List lists all ReplicaSets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ReplicaSet, err error) // Get retrieves the ReplicaSet from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.ReplicaSet, error) ReplicaSetNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1/statefulset.go b/vendor/k8s.io/client-go/listers/apps/v1/statefulset.go index cc00318581b..f6899d5ff9b 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1/statefulset.go +++ b/vendor/k8s.io/client-go/listers/apps/v1/statefulset.go @@ -26,8 +26,10 @@ import ( ) // StatefulSetLister helps list StatefulSets. +// All objects returned here must be treated as read-only. type StatefulSetLister interface { // List lists all StatefulSets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.StatefulSet, err error) // StatefulSets returns an object that can list and get StatefulSets. StatefulSets(namespace string) StatefulSetNamespaceLister @@ -58,10 +60,13 @@ func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceL } // StatefulSetNamespaceLister helps list and get StatefulSets. +// All objects returned here must be treated as read-only. type StatefulSetNamespaceLister interface { // List lists all StatefulSets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.StatefulSet, err error) // Get retrieves the StatefulSet from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.StatefulSet, error) StatefulSetNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go b/vendor/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go index d84a865b3ad..fc73de723fe 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go +++ b/vendor/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go @@ -26,8 +26,10 @@ import ( ) // ControllerRevisionLister helps list ControllerRevisions. +// All objects returned here must be treated as read-only. type ControllerRevisionLister interface { // List lists all ControllerRevisions in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error) // ControllerRevisions returns an object that can list and get ControllerRevisions. ControllerRevisions(namespace string) ControllerRevisionNamespaceLister @@ -58,10 +60,13 @@ func (s *controllerRevisionLister) ControllerRevisions(namespace string) Control } // ControllerRevisionNamespaceLister helps list and get ControllerRevisions. +// All objects returned here must be treated as read-only. type ControllerRevisionNamespaceLister interface { // List lists all ControllerRevisions in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error) // Get retrieves the ControllerRevision from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.ControllerRevision, error) ControllerRevisionNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta1/deployment.go b/vendor/k8s.io/client-go/listers/apps/v1beta1/deployment.go index 048558f2a42..3fb70794cad 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1beta1/deployment.go +++ b/vendor/k8s.io/client-go/listers/apps/v1beta1/deployment.go @@ -26,8 +26,10 @@ import ( ) // DeploymentLister helps list Deployments. +// All objects returned here must be treated as read-only. type DeploymentLister interface { // List lists all Deployments in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) // Deployments returns an object that can list and get Deployments. Deployments(namespace string) DeploymentNamespaceLister @@ -58,10 +60,13 @@ func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceList } // DeploymentNamespaceLister helps list and get Deployments. +// All objects returned here must be treated as read-only. type DeploymentNamespaceLister interface { // List lists all Deployments in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) // Get retrieves the Deployment from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.Deployment, error) DeploymentNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset.go b/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset.go index 277beb3e42c..e3556bc398f 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset.go +++ b/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset.go @@ -26,8 +26,10 @@ import ( ) // StatefulSetLister helps list StatefulSets. +// All objects returned here must be treated as read-only. type StatefulSetLister interface { // List lists all StatefulSets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) // StatefulSets returns an object that can list and get StatefulSets. StatefulSets(namespace string) StatefulSetNamespaceLister @@ -58,10 +60,13 @@ func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceL } // StatefulSetNamespaceLister helps list and get StatefulSets. +// All objects returned here must be treated as read-only. type StatefulSetNamespaceLister interface { // List lists all StatefulSets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error) // Get retrieves the StatefulSet from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.StatefulSet, error) StatefulSetNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go index 904b59b2446..da2ce860054 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go +++ b/vendor/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go @@ -26,8 +26,10 @@ import ( ) // ControllerRevisionLister helps list ControllerRevisions. +// All objects returned here must be treated as read-only. type ControllerRevisionLister interface { // List lists all ControllerRevisions in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) // ControllerRevisions returns an object that can list and get ControllerRevisions. ControllerRevisions(namespace string) ControllerRevisionNamespaceLister @@ -58,10 +60,13 @@ func (s *controllerRevisionLister) ControllerRevisions(namespace string) Control } // ControllerRevisionNamespaceLister helps list and get ControllerRevisions. +// All objects returned here must be treated as read-only. type ControllerRevisionNamespaceLister interface { // List lists all ControllerRevisions in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error) // Get retrieves the ControllerRevision from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta2.ControllerRevision, error) ControllerRevisionNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset.go index 8a40d2c863b..4b7aedd7586 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset.go +++ b/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset.go @@ -26,8 +26,10 @@ import ( ) // DaemonSetLister helps list DaemonSets. +// All objects returned here must be treated as read-only. type DaemonSetLister interface { // List lists all DaemonSets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error) // DaemonSets returns an object that can list and get DaemonSets. DaemonSets(namespace string) DaemonSetNamespaceLister @@ -58,10 +60,13 @@ func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister } // DaemonSetNamespaceLister helps list and get DaemonSets. +// All objects returned here must be treated as read-only. type DaemonSetNamespaceLister interface { // List lists all DaemonSets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error) // Get retrieves the DaemonSet from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta2.DaemonSet, error) DaemonSetNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment.go index 32beaf25cd8..c2857bbc366 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment.go +++ b/vendor/k8s.io/client-go/listers/apps/v1beta2/deployment.go @@ -26,8 +26,10 @@ import ( ) // DeploymentLister helps list Deployments. +// All objects returned here must be treated as read-only. type DeploymentLister interface { // List lists all Deployments in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.Deployment, err error) // Deployments returns an object that can list and get Deployments. Deployments(namespace string) DeploymentNamespaceLister @@ -58,10 +60,13 @@ func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceList } // DeploymentNamespaceLister helps list and get Deployments. +// All objects returned here must be treated as read-only. type DeploymentNamespaceLister interface { // List lists all Deployments in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.Deployment, err error) // Get retrieves the Deployment from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta2.Deployment, error) DeploymentNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset.go index 18c2136a248..26b350ce8f8 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset.go +++ b/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset.go @@ -26,8 +26,10 @@ import ( ) // ReplicaSetLister helps list ReplicaSets. +// All objects returned here must be treated as read-only. type ReplicaSetLister interface { // List lists all ReplicaSets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error) // ReplicaSets returns an object that can list and get ReplicaSets. ReplicaSets(namespace string) ReplicaSetNamespaceLister @@ -58,10 +60,13 @@ func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceList } // ReplicaSetNamespaceLister helps list and get ReplicaSets. +// All objects returned here must be treated as read-only. type ReplicaSetNamespaceLister interface { // List lists all ReplicaSets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error) // Get retrieves the ReplicaSet from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta2.ReplicaSet, error) ReplicaSetNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset.go b/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset.go index 544bff458a0..fbbaf0133f7 100644 --- a/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset.go +++ b/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset.go @@ -26,8 +26,10 @@ import ( ) // StatefulSetLister helps list StatefulSets. +// All objects returned here must be treated as read-only. type StatefulSetLister interface { // List lists all StatefulSets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error) // StatefulSets returns an object that can list and get StatefulSets. StatefulSets(namespace string) StatefulSetNamespaceLister @@ -58,10 +60,13 @@ func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceL } // StatefulSetNamespaceLister helps list and get StatefulSets. +// All objects returned here must be treated as read-only. type StatefulSetNamespaceLister interface { // List lists all StatefulSets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error) // Get retrieves the StatefulSet from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta2.StatefulSet, error) StatefulSetNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/auditregistration/v1alpha1/auditsink.go b/vendor/k8s.io/client-go/listers/auditregistration/v1alpha1/auditsink.go deleted file mode 100644 index 3ae4528c8c3..00000000000 --- a/vendor/k8s.io/client-go/listers/auditregistration/v1alpha1/auditsink.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "k8s.io/api/auditregistration/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// AuditSinkLister helps list AuditSinks. -type AuditSinkLister interface { - // List lists all AuditSinks in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.AuditSink, err error) - // Get retrieves the AuditSink from the index for a given name. - Get(name string) (*v1alpha1.AuditSink, error) - AuditSinkListerExpansion -} - -// auditSinkLister implements the AuditSinkLister interface. -type auditSinkLister struct { - indexer cache.Indexer -} - -// NewAuditSinkLister returns a new AuditSinkLister. -func NewAuditSinkLister(indexer cache.Indexer) AuditSinkLister { - return &auditSinkLister{indexer: indexer} -} - -// List lists all AuditSinks in the indexer. -func (s *auditSinkLister) List(selector labels.Selector) (ret []*v1alpha1.AuditSink, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.AuditSink)) - }) - return ret, err -} - -// Get retrieves the AuditSink from the index for a given name. -func (s *auditSinkLister) Get(name string) (*v1alpha1.AuditSink, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("auditsink"), name) - } - return obj.(*v1alpha1.AuditSink), nil -} diff --git a/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go index 6d563ca98da..8447f059d45 100644 --- a/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go @@ -26,8 +26,10 @@ import ( ) // HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers. +// All objects returned here must be treated as read-only. type HorizontalPodAutoscalerLister interface { // List lists all HorizontalPodAutoscalers in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister @@ -58,10 +60,13 @@ func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace strin } // HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers. +// All objects returned here must be treated as read-only. type HorizontalPodAutoscalerNamespaceLister interface { // List lists all HorizontalPodAutoscalers in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error) // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.HorizontalPodAutoscaler, error) HorizontalPodAutoscalerNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go index 08d13803ba4..f1804e995b6 100644 --- a/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -26,8 +26,10 @@ import ( ) // HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers. +// All objects returned here must be treated as read-only. type HorizontalPodAutoscalerLister interface { // List lists all HorizontalPodAutoscalers in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister @@ -58,10 +60,13 @@ func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace strin } // HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers. +// All objects returned here must be treated as read-only. type HorizontalPodAutoscalerNamespaceLister interface { // List lists all HorizontalPodAutoscalers in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v2beta1.HorizontalPodAutoscaler, error) HorizontalPodAutoscalerNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go index 9caaed88f7f..b0dbaf9eb0a 100644 --- a/vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/vendor/k8s.io/client-go/listers/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -26,8 +26,10 @@ import ( ) // HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers. +// All objects returned here must be treated as read-only. type HorizontalPodAutoscalerLister interface { // List lists all HorizontalPodAutoscalers in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister @@ -58,10 +60,13 @@ func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace strin } // HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers. +// All objects returned here must be treated as read-only. type HorizontalPodAutoscalerNamespaceLister interface { // List lists all HorizontalPodAutoscalers in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error) // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v2beta2.HorizontalPodAutoscaler, error) HorizontalPodAutoscalerNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/batch/v1/job.go b/vendor/k8s.io/client-go/listers/batch/v1/job.go index 909b6f88f77..3aba6b95fa6 100644 --- a/vendor/k8s.io/client-go/listers/batch/v1/job.go +++ b/vendor/k8s.io/client-go/listers/batch/v1/job.go @@ -26,8 +26,10 @@ import ( ) // JobLister helps list Jobs. +// All objects returned here must be treated as read-only. type JobLister interface { // List lists all Jobs in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Job, err error) // Jobs returns an object that can list and get Jobs. Jobs(namespace string) JobNamespaceLister @@ -58,10 +60,13 @@ func (s *jobLister) Jobs(namespace string) JobNamespaceLister { } // JobNamespaceLister helps list and get Jobs. +// All objects returned here must be treated as read-only. type JobNamespaceLister interface { // List lists all Jobs in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Job, err error) // Get retrieves the Job from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Job, error) JobNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/batch/v1beta1/cronjob.go b/vendor/k8s.io/client-go/listers/batch/v1beta1/cronjob.go index 521378ebfd2..4842d5e5a15 100644 --- a/vendor/k8s.io/client-go/listers/batch/v1beta1/cronjob.go +++ b/vendor/k8s.io/client-go/listers/batch/v1beta1/cronjob.go @@ -26,8 +26,10 @@ import ( ) // CronJobLister helps list CronJobs. +// All objects returned here must be treated as read-only. type CronJobLister interface { // List lists all CronJobs in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CronJob, err error) // CronJobs returns an object that can list and get CronJobs. CronJobs(namespace string) CronJobNamespaceLister @@ -58,10 +60,13 @@ func (s *cronJobLister) CronJobs(namespace string) CronJobNamespaceLister { } // CronJobNamespaceLister helps list and get CronJobs. +// All objects returned here must be treated as read-only. type CronJobNamespaceLister interface { // List lists all CronJobs in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CronJob, err error) // Get retrieves the CronJob from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.CronJob, error) CronJobNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go b/vendor/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go index 2623f19595c..824aa331f49 100644 --- a/vendor/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go +++ b/vendor/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go @@ -26,8 +26,10 @@ import ( ) // CronJobLister helps list CronJobs. +// All objects returned here must be treated as read-only. type CronJobLister interface { // List lists all CronJobs in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error) // CronJobs returns an object that can list and get CronJobs. CronJobs(namespace string) CronJobNamespaceLister @@ -58,10 +60,13 @@ func (s *cronJobLister) CronJobs(namespace string) CronJobNamespaceLister { } // CronJobNamespaceLister helps list and get CronJobs. +// All objects returned here must be treated as read-only. type CronJobNamespaceLister interface { // List lists all CronJobs in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error) // Get retrieves the CronJob from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v2alpha1.CronJob, error) CronJobNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/auditregistration/v1alpha1/BUILD b/vendor/k8s.io/client-go/listers/certificates/v1/BUILD similarity index 78% rename from vendor/k8s.io/client-go/listers/auditregistration/v1alpha1/BUILD rename to vendor/k8s.io/client-go/listers/certificates/v1/BUILD index c23bd63a400..9b5ba62e30a 100644 --- a/vendor/k8s.io/client-go/listers/auditregistration/v1alpha1/BUILD +++ b/vendor/k8s.io/client-go/listers/certificates/v1/BUILD @@ -3,14 +3,14 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ - "auditsink.go", + "certificatesigningrequest.go", "expansion_generated.go", ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/listers/auditregistration/v1alpha1", - importpath = "k8s.io/client-go/listers/auditregistration/v1alpha1", + importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/listers/certificates/v1", + importpath = "k8s.io/client-go/listers/certificates/v1", visibility = ["//visibility:public"], deps = [ - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", diff --git a/vendor/k8s.io/client-go/listers/certificates/v1/certificatesigningrequest.go b/vendor/k8s.io/client-go/listers/certificates/v1/certificatesigningrequest.go new file mode 100644 index 00000000000..0d04e118dbc --- /dev/null +++ b/vendor/k8s.io/client-go/listers/certificates/v1/certificatesigningrequest.go @@ -0,0 +1,68 @@ +/* +Copyright 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/certificates/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// CertificateSigningRequestLister helps list CertificateSigningRequests. +// All objects returned here must be treated as read-only. +type CertificateSigningRequestLister interface { + // List lists all CertificateSigningRequests in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1.CertificateSigningRequest, err error) + // Get retrieves the CertificateSigningRequest from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1.CertificateSigningRequest, error) + CertificateSigningRequestListerExpansion +} + +// certificateSigningRequestLister implements the CertificateSigningRequestLister interface. +type certificateSigningRequestLister struct { + indexer cache.Indexer +} + +// NewCertificateSigningRequestLister returns a new CertificateSigningRequestLister. +func NewCertificateSigningRequestLister(indexer cache.Indexer) CertificateSigningRequestLister { + return &certificateSigningRequestLister{indexer: indexer} +} + +// List lists all CertificateSigningRequests in the indexer. +func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret []*v1.CertificateSigningRequest, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.CertificateSigningRequest)) + }) + return ret, err +} + +// Get retrieves the CertificateSigningRequest from the index for a given name. +func (s *certificateSigningRequestLister) Get(name string) (*v1.CertificateSigningRequest, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("certificatesigningrequest"), name) + } + return obj.(*v1.CertificateSigningRequest), nil +} diff --git a/vendor/k8s.io/client-go/listers/auditregistration/v1alpha1/expansion_generated.go b/vendor/k8s.io/client-go/listers/certificates/v1/expansion_generated.go similarity index 76% rename from vendor/k8s.io/client-go/listers/auditregistration/v1alpha1/expansion_generated.go rename to vendor/k8s.io/client-go/listers/certificates/v1/expansion_generated.go index 533dd0631f9..616a1f1a092 100644 --- a/vendor/k8s.io/client-go/listers/auditregistration/v1alpha1/expansion_generated.go +++ b/vendor/k8s.io/client-go/listers/certificates/v1/expansion_generated.go @@ -16,8 +16,8 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1 -// AuditSinkListerExpansion allows custom methods to be added to -// AuditSinkLister. -type AuditSinkListerExpansion interface{} +// CertificateSigningRequestListerExpansion allows custom methods to be added to +// CertificateSigningRequestLister. +type CertificateSigningRequestListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go b/vendor/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go index 47c28298420..471b5629b33 100644 --- a/vendor/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go +++ b/vendor/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go @@ -26,10 +26,13 @@ import ( ) // CertificateSigningRequestLister helps list CertificateSigningRequests. +// All objects returned here must be treated as read-only. type CertificateSigningRequestLister interface { // List lists all CertificateSigningRequests in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error) // Get retrieves the CertificateSigningRequest from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.CertificateSigningRequest, error) CertificateSigningRequestListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/coordination/v1/lease.go b/vendor/k8s.io/client-go/listers/coordination/v1/lease.go index cc379088cb6..de366d0e11a 100644 --- a/vendor/k8s.io/client-go/listers/coordination/v1/lease.go +++ b/vendor/k8s.io/client-go/listers/coordination/v1/lease.go @@ -26,8 +26,10 @@ import ( ) // LeaseLister helps list Leases. +// All objects returned here must be treated as read-only. type LeaseLister interface { // List lists all Leases in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Lease, err error) // Leases returns an object that can list and get Leases. Leases(namespace string) LeaseNamespaceLister @@ -58,10 +60,13 @@ func (s *leaseLister) Leases(namespace string) LeaseNamespaceLister { } // LeaseNamespaceLister helps list and get Leases. +// All objects returned here must be treated as read-only. type LeaseNamespaceLister interface { // List lists all Leases in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Lease, err error) // Get retrieves the Lease from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Lease, error) LeaseNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/coordination/v1beta1/lease.go b/vendor/k8s.io/client-go/listers/coordination/v1beta1/lease.go index 0027444dc64..8dfdc1e9bc0 100644 --- a/vendor/k8s.io/client-go/listers/coordination/v1beta1/lease.go +++ b/vendor/k8s.io/client-go/listers/coordination/v1beta1/lease.go @@ -26,8 +26,10 @@ import ( ) // LeaseLister helps list Leases. +// All objects returned here must be treated as read-only. type LeaseLister interface { // List lists all Leases in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Lease, err error) // Leases returns an object that can list and get Leases. Leases(namespace string) LeaseNamespaceLister @@ -58,10 +60,13 @@ func (s *leaseLister) Leases(namespace string) LeaseNamespaceLister { } // LeaseNamespaceLister helps list and get Leases. +// All objects returned here must be treated as read-only. type LeaseNamespaceLister interface { // List lists all Leases in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Lease, err error) // Get retrieves the Lease from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.Lease, error) LeaseNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/componentstatus.go b/vendor/k8s.io/client-go/listers/core/v1/componentstatus.go index 23d070810d1..5fcdac3c764 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/componentstatus.go +++ b/vendor/k8s.io/client-go/listers/core/v1/componentstatus.go @@ -26,10 +26,13 @@ import ( ) // ComponentStatusLister helps list ComponentStatuses. +// All objects returned here must be treated as read-only. type ComponentStatusLister interface { // List lists all ComponentStatuses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ComponentStatus, err error) // Get retrieves the ComponentStatus from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.ComponentStatus, error) ComponentStatusListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/configmap.go b/vendor/k8s.io/client-go/listers/core/v1/configmap.go index 55d7cd4d3ae..6a410e47c4a 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/configmap.go +++ b/vendor/k8s.io/client-go/listers/core/v1/configmap.go @@ -26,8 +26,10 @@ import ( ) // ConfigMapLister helps list ConfigMaps. +// All objects returned here must be treated as read-only. type ConfigMapLister interface { // List lists all ConfigMaps in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ConfigMap, err error) // ConfigMaps returns an object that can list and get ConfigMaps. ConfigMaps(namespace string) ConfigMapNamespaceLister @@ -58,10 +60,13 @@ func (s *configMapLister) ConfigMaps(namespace string) ConfigMapNamespaceLister } // ConfigMapNamespaceLister helps list and get ConfigMaps. +// All objects returned here must be treated as read-only. type ConfigMapNamespaceLister interface { // List lists all ConfigMaps in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ConfigMap, err error) // Get retrieves the ConfigMap from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.ConfigMap, error) ConfigMapNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/endpoints.go b/vendor/k8s.io/client-go/listers/core/v1/endpoints.go index ac2fdfc5776..4759ce808fe 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/endpoints.go +++ b/vendor/k8s.io/client-go/listers/core/v1/endpoints.go @@ -26,8 +26,10 @@ import ( ) // EndpointsLister helps list Endpoints. +// All objects returned here must be treated as read-only. type EndpointsLister interface { // List lists all Endpoints in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Endpoints, err error) // Endpoints returns an object that can list and get Endpoints. Endpoints(namespace string) EndpointsNamespaceLister @@ -58,10 +60,13 @@ func (s *endpointsLister) Endpoints(namespace string) EndpointsNamespaceLister { } // EndpointsNamespaceLister helps list and get Endpoints. +// All objects returned here must be treated as read-only. type EndpointsNamespaceLister interface { // List lists all Endpoints in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Endpoints, err error) // Get retrieves the Endpoints from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Endpoints, error) EndpointsNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/event.go b/vendor/k8s.io/client-go/listers/core/v1/event.go index a9d2db01a43..4416e20120b 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/event.go +++ b/vendor/k8s.io/client-go/listers/core/v1/event.go @@ -26,8 +26,10 @@ import ( ) // EventLister helps list Events. +// All objects returned here must be treated as read-only. type EventLister interface { // List lists all Events in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Event, err error) // Events returns an object that can list and get Events. Events(namespace string) EventNamespaceLister @@ -58,10 +60,13 @@ func (s *eventLister) Events(namespace string) EventNamespaceLister { } // EventNamespaceLister helps list and get Events. +// All objects returned here must be treated as read-only. type EventNamespaceLister interface { // List lists all Events in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Event, err error) // Get retrieves the Event from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Event, error) EventNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/limitrange.go b/vendor/k8s.io/client-go/listers/core/v1/limitrange.go index c773c433e76..d8fa569cd38 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/limitrange.go +++ b/vendor/k8s.io/client-go/listers/core/v1/limitrange.go @@ -26,8 +26,10 @@ import ( ) // LimitRangeLister helps list LimitRanges. +// All objects returned here must be treated as read-only. type LimitRangeLister interface { // List lists all LimitRanges in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.LimitRange, err error) // LimitRanges returns an object that can list and get LimitRanges. LimitRanges(namespace string) LimitRangeNamespaceLister @@ -58,10 +60,13 @@ func (s *limitRangeLister) LimitRanges(namespace string) LimitRangeNamespaceList } // LimitRangeNamespaceLister helps list and get LimitRanges. +// All objects returned here must be treated as read-only. type LimitRangeNamespaceLister interface { // List lists all LimitRanges in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.LimitRange, err error) // Get retrieves the LimitRange from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.LimitRange, error) LimitRangeNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/namespace.go b/vendor/k8s.io/client-go/listers/core/v1/namespace.go index 6a17d04571f..454aa1a0a23 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/namespace.go +++ b/vendor/k8s.io/client-go/listers/core/v1/namespace.go @@ -26,10 +26,13 @@ import ( ) // NamespaceLister helps list Namespaces. +// All objects returned here must be treated as read-only. type NamespaceLister interface { // List lists all Namespaces in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Namespace, err error) // Get retrieves the Namespace from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Namespace, error) NamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/node.go b/vendor/k8s.io/client-go/listers/core/v1/node.go index b568ebe4754..596049857f1 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/node.go +++ b/vendor/k8s.io/client-go/listers/core/v1/node.go @@ -26,10 +26,13 @@ import ( ) // NodeLister helps list Nodes. +// All objects returned here must be treated as read-only. type NodeLister interface { // List lists all Nodes in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Node, err error) // Get retrieves the Node from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Node, error) NodeListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/persistentvolume.go b/vendor/k8s.io/client-go/listers/core/v1/persistentvolume.go index 1d7c6ca76f3..e7dfd4ac9f6 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/persistentvolume.go +++ b/vendor/k8s.io/client-go/listers/core/v1/persistentvolume.go @@ -26,10 +26,13 @@ import ( ) // PersistentVolumeLister helps list PersistentVolumes. +// All objects returned here must be treated as read-only. type PersistentVolumeLister interface { // List lists all PersistentVolumes in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.PersistentVolume, err error) // Get retrieves the PersistentVolume from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.PersistentVolume, error) PersistentVolumeListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go index 501a38c436d..fc71bb5a1fd 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go +++ b/vendor/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go @@ -26,8 +26,10 @@ import ( ) // PersistentVolumeClaimLister helps list PersistentVolumeClaims. +// All objects returned here must be treated as read-only. type PersistentVolumeClaimLister interface { // List lists all PersistentVolumeClaims in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) // PersistentVolumeClaims returns an object that can list and get PersistentVolumeClaims. PersistentVolumeClaims(namespace string) PersistentVolumeClaimNamespaceLister @@ -58,10 +60,13 @@ func (s *persistentVolumeClaimLister) PersistentVolumeClaims(namespace string) P } // PersistentVolumeClaimNamespaceLister helps list and get PersistentVolumeClaims. +// All objects returned here must be treated as read-only. type PersistentVolumeClaimNamespaceLister interface { // List lists all PersistentVolumeClaims in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) // Get retrieves the PersistentVolumeClaim from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.PersistentVolumeClaim, error) PersistentVolumeClaimNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/pod.go b/vendor/k8s.io/client-go/listers/core/v1/pod.go index 442f8c55f85..ab8f0946c3d 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/pod.go +++ b/vendor/k8s.io/client-go/listers/core/v1/pod.go @@ -26,8 +26,10 @@ import ( ) // PodLister helps list Pods. +// All objects returned here must be treated as read-only. type PodLister interface { // List lists all Pods in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Pod, err error) // Pods returns an object that can list and get Pods. Pods(namespace string) PodNamespaceLister @@ -58,10 +60,13 @@ func (s *podLister) Pods(namespace string) PodNamespaceLister { } // PodNamespaceLister helps list and get Pods. +// All objects returned here must be treated as read-only. type PodNamespaceLister interface { // List lists all Pods in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Pod, err error) // Get retrieves the Pod from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Pod, error) PodNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/podtemplate.go b/vendor/k8s.io/client-go/listers/core/v1/podtemplate.go index 9a17f820c9c..6c310045b71 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/podtemplate.go +++ b/vendor/k8s.io/client-go/listers/core/v1/podtemplate.go @@ -26,8 +26,10 @@ import ( ) // PodTemplateLister helps list PodTemplates. +// All objects returned here must be treated as read-only. type PodTemplateLister interface { // List lists all PodTemplates in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.PodTemplate, err error) // PodTemplates returns an object that can list and get PodTemplates. PodTemplates(namespace string) PodTemplateNamespaceLister @@ -58,10 +60,13 @@ func (s *podTemplateLister) PodTemplates(namespace string) PodTemplateNamespaceL } // PodTemplateNamespaceLister helps list and get PodTemplates. +// All objects returned here must be treated as read-only. type PodTemplateNamespaceLister interface { // List lists all PodTemplates in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.PodTemplate, err error) // Get retrieves the PodTemplate from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.PodTemplate, error) PodTemplateNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller.go b/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller.go index 8b17aa2c4a0..e28e2ef768e 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller.go +++ b/vendor/k8s.io/client-go/listers/core/v1/replicationcontroller.go @@ -26,8 +26,10 @@ import ( ) // ReplicationControllerLister helps list ReplicationControllers. +// All objects returned here must be treated as read-only. type ReplicationControllerLister interface { // List lists all ReplicationControllers in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ReplicationController, err error) // ReplicationControllers returns an object that can list and get ReplicationControllers. ReplicationControllers(namespace string) ReplicationControllerNamespaceLister @@ -58,10 +60,13 @@ func (s *replicationControllerLister) ReplicationControllers(namespace string) R } // ReplicationControllerNamespaceLister helps list and get ReplicationControllers. +// All objects returned here must be treated as read-only. type ReplicationControllerNamespaceLister interface { // List lists all ReplicationControllers in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ReplicationController, err error) // Get retrieves the ReplicationController from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.ReplicationController, error) ReplicationControllerNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/resourcequota.go b/vendor/k8s.io/client-go/listers/core/v1/resourcequota.go index f5b7030cc46..9c00b49d4f5 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/resourcequota.go +++ b/vendor/k8s.io/client-go/listers/core/v1/resourcequota.go @@ -26,8 +26,10 @@ import ( ) // ResourceQuotaLister helps list ResourceQuotas. +// All objects returned here must be treated as read-only. type ResourceQuotaLister interface { // List lists all ResourceQuotas in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) // ResourceQuotas returns an object that can list and get ResourceQuotas. ResourceQuotas(namespace string) ResourceQuotaNamespaceLister @@ -58,10 +60,13 @@ func (s *resourceQuotaLister) ResourceQuotas(namespace string) ResourceQuotaName } // ResourceQuotaNamespaceLister helps list and get ResourceQuotas. +// All objects returned here must be treated as read-only. type ResourceQuotaNamespaceLister interface { // List lists all ResourceQuotas in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ResourceQuota, err error) // Get retrieves the ResourceQuota from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.ResourceQuota, error) ResourceQuotaNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/secret.go b/vendor/k8s.io/client-go/listers/core/v1/secret.go index e9ef2493447..d386d4d5cbd 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/secret.go +++ b/vendor/k8s.io/client-go/listers/core/v1/secret.go @@ -26,8 +26,10 @@ import ( ) // SecretLister helps list Secrets. +// All objects returned here must be treated as read-only. type SecretLister interface { // List lists all Secrets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Secret, err error) // Secrets returns an object that can list and get Secrets. Secrets(namespace string) SecretNamespaceLister @@ -58,10 +60,13 @@ func (s *secretLister) Secrets(namespace string) SecretNamespaceLister { } // SecretNamespaceLister helps list and get Secrets. +// All objects returned here must be treated as read-only. type SecretNamespaceLister interface { // List lists all Secrets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Secret, err error) // Get retrieves the Secret from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Secret, error) SecretNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/service.go b/vendor/k8s.io/client-go/listers/core/v1/service.go index 3b5941acb0f..51026d7b4b6 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/service.go +++ b/vendor/k8s.io/client-go/listers/core/v1/service.go @@ -26,8 +26,10 @@ import ( ) // ServiceLister helps list Services. +// All objects returned here must be treated as read-only. type ServiceLister interface { // List lists all Services in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Service, err error) // Services returns an object that can list and get Services. Services(namespace string) ServiceNamespaceLister @@ -58,10 +60,13 @@ func (s *serviceLister) Services(namespace string) ServiceNamespaceLister { } // ServiceNamespaceLister helps list and get Services. +// All objects returned here must be treated as read-only. type ServiceNamespaceLister interface { // List lists all Services in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Service, err error) // Get retrieves the Service from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Service, error) ServiceNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/core/v1/serviceaccount.go b/vendor/k8s.io/client-go/listers/core/v1/serviceaccount.go index 8b94cf594c7..aa9554d8bb5 100644 --- a/vendor/k8s.io/client-go/listers/core/v1/serviceaccount.go +++ b/vendor/k8s.io/client-go/listers/core/v1/serviceaccount.go @@ -26,8 +26,10 @@ import ( ) // ServiceAccountLister helps list ServiceAccounts. +// All objects returned here must be treated as read-only. type ServiceAccountLister interface { // List lists all ServiceAccounts in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) // ServiceAccounts returns an object that can list and get ServiceAccounts. ServiceAccounts(namespace string) ServiceAccountNamespaceLister @@ -58,10 +60,13 @@ func (s *serviceAccountLister) ServiceAccounts(namespace string) ServiceAccountN } // ServiceAccountNamespaceLister helps list and get ServiceAccounts. +// All objects returned here must be treated as read-only. type ServiceAccountNamespaceLister interface { // List lists all ServiceAccounts in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) // Get retrieves the ServiceAccount from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.ServiceAccount, error) ServiceAccountNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/discovery/v1alpha1/endpointslice.go b/vendor/k8s.io/client-go/listers/discovery/v1alpha1/endpointslice.go index 706beecfd14..f3c0822bb09 100644 --- a/vendor/k8s.io/client-go/listers/discovery/v1alpha1/endpointslice.go +++ b/vendor/k8s.io/client-go/listers/discovery/v1alpha1/endpointslice.go @@ -26,8 +26,10 @@ import ( ) // EndpointSliceLister helps list EndpointSlices. +// All objects returned here must be treated as read-only. type EndpointSliceLister interface { // List lists all EndpointSlices in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error) // EndpointSlices returns an object that can list and get EndpointSlices. EndpointSlices(namespace string) EndpointSliceNamespaceLister @@ -58,10 +60,13 @@ func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceName } // EndpointSliceNamespaceLister helps list and get EndpointSlices. +// All objects returned here must be treated as read-only. type EndpointSliceNamespaceLister interface { // List lists all EndpointSlices in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error) // Get retrieves the EndpointSlice from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.EndpointSlice, error) EndpointSliceNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go b/vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go index e7d1026ab72..e92872d5f45 100644 --- a/vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go +++ b/vendor/k8s.io/client-go/listers/discovery/v1beta1/endpointslice.go @@ -26,8 +26,10 @@ import ( ) // EndpointSliceLister helps list EndpointSlices. +// All objects returned here must be treated as read-only. type EndpointSliceLister interface { // List lists all EndpointSlices in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) // EndpointSlices returns an object that can list and get EndpointSlices. EndpointSlices(namespace string) EndpointSliceNamespaceLister @@ -58,10 +60,13 @@ func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceName } // EndpointSliceNamespaceLister helps list and get EndpointSlices. +// All objects returned here must be treated as read-only. type EndpointSliceNamespaceLister interface { // List lists all EndpointSlices in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) // Get retrieves the EndpointSlice from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.EndpointSlice, error) EndpointSliceNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/events/v1/BUILD b/vendor/k8s.io/client-go/listers/events/v1/BUILD new file mode 100644 index 00000000000..7c0cb40e299 --- /dev/null +++ b/vendor/k8s.io/client-go/listers/events/v1/BUILD @@ -0,0 +1,32 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "event.go", + "expansion_generated.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/listers/events/v1", + importpath = "k8s.io/client-go/listers/events/v1", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/api/events/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/client-go/listers/events/v1/event.go b/vendor/k8s.io/client-go/listers/events/v1/event.go new file mode 100644 index 00000000000..4abe841e265 --- /dev/null +++ b/vendor/k8s.io/client-go/listers/events/v1/event.go @@ -0,0 +1,99 @@ +/* +Copyright 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/events/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// EventLister helps list Events. +// All objects returned here must be treated as read-only. +type EventLister interface { + // List lists all Events in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1.Event, err error) + // Events returns an object that can list and get Events. + Events(namespace string) EventNamespaceLister + EventListerExpansion +} + +// eventLister implements the EventLister interface. +type eventLister struct { + indexer cache.Indexer +} + +// NewEventLister returns a new EventLister. +func NewEventLister(indexer cache.Indexer) EventLister { + return &eventLister{indexer: indexer} +} + +// List lists all Events in the indexer. +func (s *eventLister) List(selector labels.Selector) (ret []*v1.Event, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Event)) + }) + return ret, err +} + +// Events returns an object that can list and get Events. +func (s *eventLister) Events(namespace string) EventNamespaceLister { + return eventNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// EventNamespaceLister helps list and get Events. +// All objects returned here must be treated as read-only. +type EventNamespaceLister interface { + // List lists all Events in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1.Event, err error) + // Get retrieves the Event from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1.Event, error) + EventNamespaceListerExpansion +} + +// eventNamespaceLister implements the EventNamespaceLister +// interface. +type eventNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Events in the indexer for a given namespace. +func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1.Event, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Event)) + }) + return ret, err +} + +// Get retrieves the Event from the indexer for a given namespace and name. +func (s eventNamespaceLister) Get(name string) (*v1.Event, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("event"), name) + } + return obj.(*v1.Event), nil +} diff --git a/vendor/k8s.io/client-go/listers/events/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/events/v1/expansion_generated.go new file mode 100644 index 00000000000..348e784d745 --- /dev/null +++ b/vendor/k8s.io/client-go/listers/events/v1/expansion_generated.go @@ -0,0 +1,27 @@ +/* +Copyright 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +// EventListerExpansion allows custom methods to be added to +// EventLister. +type EventListerExpansion interface{} + +// EventNamespaceListerExpansion allows custom methods to be added to +// EventNamespaceLister. +type EventNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/events/v1beta1/event.go b/vendor/k8s.io/client-go/listers/events/v1beta1/event.go index 4a5bc399763..41a521be6f4 100644 --- a/vendor/k8s.io/client-go/listers/events/v1beta1/event.go +++ b/vendor/k8s.io/client-go/listers/events/v1beta1/event.go @@ -26,8 +26,10 @@ import ( ) // EventLister helps list Events. +// All objects returned here must be treated as read-only. type EventLister interface { // List lists all Events in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Event, err error) // Events returns an object that can list and get Events. Events(namespace string) EventNamespaceLister @@ -58,10 +60,13 @@ func (s *eventLister) Events(namespace string) EventNamespaceLister { } // EventNamespaceLister helps list and get Events. +// All objects returned here must be treated as read-only. type EventNamespaceLister interface { // List lists all Events in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Event, err error) // Get retrieves the Event from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.Event, error) EventNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go index a7bb6657aee..900475410b5 100644 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go +++ b/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go @@ -26,8 +26,10 @@ import ( ) // DaemonSetLister helps list DaemonSets. +// All objects returned here must be treated as read-only. type DaemonSetLister interface { // List lists all DaemonSets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) // DaemonSets returns an object that can list and get DaemonSets. DaemonSets(namespace string) DaemonSetNamespaceLister @@ -58,10 +60,13 @@ func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister } // DaemonSetNamespaceLister helps list and get DaemonSets. +// All objects returned here must be treated as read-only. type DaemonSetNamespaceLister interface { // List lists all DaemonSets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.DaemonSet, err error) // Get retrieves the DaemonSet from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.DaemonSet, error) DaemonSetNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment.go index 13e307189fa..42b5a07231b 100644 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment.go +++ b/vendor/k8s.io/client-go/listers/extensions/v1beta1/deployment.go @@ -26,8 +26,10 @@ import ( ) // DeploymentLister helps list Deployments. +// All objects returned here must be treated as read-only. type DeploymentLister interface { // List lists all Deployments in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) // Deployments returns an object that can list and get Deployments. Deployments(namespace string) DeploymentNamespaceLister @@ -58,10 +60,13 @@ func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceList } // DeploymentNamespaceLister helps list and get Deployments. +// All objects returned here must be treated as read-only. type DeploymentNamespaceLister interface { // List lists all Deployments in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Deployment, err error) // Get retrieves the Deployment from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.Deployment, error) DeploymentNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/ingress.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/ingress.go index 1bc33ede2a5..1cb7677bd80 100644 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/ingress.go +++ b/vendor/k8s.io/client-go/listers/extensions/v1beta1/ingress.go @@ -26,8 +26,10 @@ import ( ) // IngressLister helps list Ingresses. +// All objects returned here must be treated as read-only. type IngressLister interface { // List lists all Ingresses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) // Ingresses returns an object that can list and get Ingresses. Ingresses(namespace string) IngressNamespaceLister @@ -58,10 +60,13 @@ func (s *ingressLister) Ingresses(namespace string) IngressNamespaceLister { } // IngressNamespaceLister helps list and get Ingresses. +// All objects returned here must be treated as read-only. type IngressNamespaceLister interface { // List lists all Ingresses in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) // Get retrieves the Ingress from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.Ingress, error) IngressNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/networkpolicy.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/networkpolicy.go index 782f521add8..84419a8e966 100644 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/networkpolicy.go +++ b/vendor/k8s.io/client-go/listers/extensions/v1beta1/networkpolicy.go @@ -26,8 +26,10 @@ import ( ) // NetworkPolicyLister helps list NetworkPolicies. +// All objects returned here must be treated as read-only. type NetworkPolicyLister interface { // List lists all NetworkPolicies in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.NetworkPolicy, err error) // NetworkPolicies returns an object that can list and get NetworkPolicies. NetworkPolicies(namespace string) NetworkPolicyNamespaceLister @@ -58,10 +60,13 @@ func (s *networkPolicyLister) NetworkPolicies(namespace string) NetworkPolicyNam } // NetworkPolicyNamespaceLister helps list and get NetworkPolicies. +// All objects returned here must be treated as read-only. type NetworkPolicyNamespaceLister interface { // List lists all NetworkPolicies in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.NetworkPolicy, err error) // Get retrieves the NetworkPolicy from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.NetworkPolicy, error) NetworkPolicyNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go index 1298e87ba4c..5f6a8c03601 100644 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go +++ b/vendor/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go @@ -26,10 +26,13 @@ import ( ) // PodSecurityPolicyLister helps list PodSecurityPolicies. +// All objects returned here must be treated as read-only. type PodSecurityPolicyLister interface { // List lists all PodSecurityPolicies in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) // Get retrieves the PodSecurityPolicy from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.PodSecurityPolicy, error) PodSecurityPolicyListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go b/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go index d3e741a8693..a5ec3229bc3 100644 --- a/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go +++ b/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go @@ -26,8 +26,10 @@ import ( ) // ReplicaSetLister helps list ReplicaSets. +// All objects returned here must be treated as read-only. type ReplicaSetLister interface { // List lists all ReplicaSets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) // ReplicaSets returns an object that can list and get ReplicaSets. ReplicaSets(namespace string) ReplicaSetNamespaceLister @@ -58,10 +60,13 @@ func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceList } // ReplicaSetNamespaceLister helps list and get ReplicaSets. +// All objects returned here must be treated as read-only. type ReplicaSetNamespaceLister interface { // List lists all ReplicaSets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ReplicaSet, err error) // Get retrieves the ReplicaSet from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.ReplicaSet, error) ReplicaSetNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/flowcontrol/v1alpha1/flowschema.go b/vendor/k8s.io/client-go/listers/flowcontrol/v1alpha1/flowschema.go index b6791336f92..c8a595cd29c 100644 --- a/vendor/k8s.io/client-go/listers/flowcontrol/v1alpha1/flowschema.go +++ b/vendor/k8s.io/client-go/listers/flowcontrol/v1alpha1/flowschema.go @@ -26,10 +26,13 @@ import ( ) // FlowSchemaLister helps list FlowSchemas. +// All objects returned here must be treated as read-only. type FlowSchemaLister interface { // List lists all FlowSchemas in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.FlowSchema, err error) // Get retrieves the FlowSchema from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.FlowSchema, error) FlowSchemaListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/vendor/k8s.io/client-go/listers/flowcontrol/v1alpha1/prioritylevelconfiguration.go index cb02129addc..daa4ff31d93 100644 --- a/vendor/k8s.io/client-go/listers/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/vendor/k8s.io/client-go/listers/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -26,10 +26,13 @@ import ( ) // PriorityLevelConfigurationLister helps list PriorityLevelConfigurations. +// All objects returned here must be treated as read-only. type PriorityLevelConfigurationLister interface { // List lists all PriorityLevelConfigurations in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.PriorityLevelConfiguration, err error) // Get retrieves the PriorityLevelConfiguration from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.PriorityLevelConfiguration, error) PriorityLevelConfigurationListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/networking/v1/BUILD b/vendor/k8s.io/client-go/listers/networking/v1/BUILD index c3172f6fcd1..7c803c9ed15 100644 --- a/vendor/k8s.io/client-go/listers/networking/v1/BUILD +++ b/vendor/k8s.io/client-go/listers/networking/v1/BUILD @@ -9,6 +9,8 @@ go_library( name = "go_default_library", srcs = [ "expansion_generated.go", + "ingress.go", + "ingressclass.go", "networkpolicy.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/listers/networking/v1", diff --git a/vendor/k8s.io/client-go/listers/networking/v1/expansion_generated.go b/vendor/k8s.io/client-go/listers/networking/v1/expansion_generated.go index e03a52385da..a380c2418fc 100644 --- a/vendor/k8s.io/client-go/listers/networking/v1/expansion_generated.go +++ b/vendor/k8s.io/client-go/listers/networking/v1/expansion_generated.go @@ -18,6 +18,18 @@ limitations under the License. package v1 +// IngressListerExpansion allows custom methods to be added to +// IngressLister. +type IngressListerExpansion interface{} + +// IngressNamespaceListerExpansion allows custom methods to be added to +// IngressNamespaceLister. +type IngressNamespaceListerExpansion interface{} + +// IngressClassListerExpansion allows custom methods to be added to +// IngressClassLister. +type IngressClassListerExpansion interface{} + // NetworkPolicyListerExpansion allows custom methods to be added to // NetworkPolicyLister. type NetworkPolicyListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/networking/v1/ingress.go b/vendor/k8s.io/client-go/listers/networking/v1/ingress.go new file mode 100644 index 00000000000..0f49d4f572c --- /dev/null +++ b/vendor/k8s.io/client-go/listers/networking/v1/ingress.go @@ -0,0 +1,99 @@ +/* +Copyright 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/networking/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// IngressLister helps list Ingresses. +// All objects returned here must be treated as read-only. +type IngressLister interface { + // List lists all Ingresses in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1.Ingress, err error) + // Ingresses returns an object that can list and get Ingresses. + Ingresses(namespace string) IngressNamespaceLister + IngressListerExpansion +} + +// ingressLister implements the IngressLister interface. +type ingressLister struct { + indexer cache.Indexer +} + +// NewIngressLister returns a new IngressLister. +func NewIngressLister(indexer cache.Indexer) IngressLister { + return &ingressLister{indexer: indexer} +} + +// List lists all Ingresses in the indexer. +func (s *ingressLister) List(selector labels.Selector) (ret []*v1.Ingress, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Ingress)) + }) + return ret, err +} + +// Ingresses returns an object that can list and get Ingresses. +func (s *ingressLister) Ingresses(namespace string) IngressNamespaceLister { + return ingressNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// IngressNamespaceLister helps list and get Ingresses. +// All objects returned here must be treated as read-only. +type IngressNamespaceLister interface { + // List lists all Ingresses in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1.Ingress, err error) + // Get retrieves the Ingress from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1.Ingress, error) + IngressNamespaceListerExpansion +} + +// ingressNamespaceLister implements the IngressNamespaceLister +// interface. +type ingressNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Ingresses in the indexer for a given namespace. +func (s ingressNamespaceLister) List(selector labels.Selector) (ret []*v1.Ingress, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Ingress)) + }) + return ret, err +} + +// Get retrieves the Ingress from the indexer for a given namespace and name. +func (s ingressNamespaceLister) Get(name string) (*v1.Ingress, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("ingress"), name) + } + return obj.(*v1.Ingress), nil +} diff --git a/vendor/k8s.io/client-go/listers/networking/v1/ingressclass.go b/vendor/k8s.io/client-go/listers/networking/v1/ingressclass.go new file mode 100644 index 00000000000..1480cb13fdf --- /dev/null +++ b/vendor/k8s.io/client-go/listers/networking/v1/ingressclass.go @@ -0,0 +1,68 @@ +/* +Copyright 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "k8s.io/api/networking/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// IngressClassLister helps list IngressClasses. +// All objects returned here must be treated as read-only. +type IngressClassLister interface { + // List lists all IngressClasses in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1.IngressClass, err error) + // Get retrieves the IngressClass from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1.IngressClass, error) + IngressClassListerExpansion +} + +// ingressClassLister implements the IngressClassLister interface. +type ingressClassLister struct { + indexer cache.Indexer +} + +// NewIngressClassLister returns a new IngressClassLister. +func NewIngressClassLister(indexer cache.Indexer) IngressClassLister { + return &ingressClassLister{indexer: indexer} +} + +// List lists all IngressClasses in the indexer. +func (s *ingressClassLister) List(selector labels.Selector) (ret []*v1.IngressClass, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.IngressClass)) + }) + return ret, err +} + +// Get retrieves the IngressClass from the index for a given name. +func (s *ingressClassLister) Get(name string) (*v1.IngressClass, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("ingressclass"), name) + } + return obj.(*v1.IngressClass), nil +} diff --git a/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go b/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go index e5d99774737..34cabf0577a 100644 --- a/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go +++ b/vendor/k8s.io/client-go/listers/networking/v1/networkpolicy.go @@ -26,8 +26,10 @@ import ( ) // NetworkPolicyLister helps list NetworkPolicies. +// All objects returned here must be treated as read-only. type NetworkPolicyLister interface { // List lists all NetworkPolicies in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error) // NetworkPolicies returns an object that can list and get NetworkPolicies. NetworkPolicies(namespace string) NetworkPolicyNamespaceLister @@ -58,10 +60,13 @@ func (s *networkPolicyLister) NetworkPolicies(namespace string) NetworkPolicyNam } // NetworkPolicyNamespaceLister helps list and get NetworkPolicies. +// All objects returned here must be treated as read-only. type NetworkPolicyNamespaceLister interface { // List lists all NetworkPolicies in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error) // Get retrieves the NetworkPolicy from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.NetworkPolicy, error) NetworkPolicyNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go b/vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go index 6676742e34b..b8f4d355802 100644 --- a/vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go +++ b/vendor/k8s.io/client-go/listers/networking/v1beta1/ingress.go @@ -26,8 +26,10 @@ import ( ) // IngressLister helps list Ingresses. +// All objects returned here must be treated as read-only. type IngressLister interface { // List lists all Ingresses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) // Ingresses returns an object that can list and get Ingresses. Ingresses(namespace string) IngressNamespaceLister @@ -58,10 +60,13 @@ func (s *ingressLister) Ingresses(namespace string) IngressNamespaceLister { } // IngressNamespaceLister helps list and get Ingresses. +// All objects returned here must be treated as read-only. type IngressNamespaceLister interface { // List lists all Ingresses in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Ingress, err error) // Get retrieves the Ingress from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.Ingress, error) IngressNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go b/vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go index 1d39956acf1..ebcd6ba85b1 100644 --- a/vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go +++ b/vendor/k8s.io/client-go/listers/networking/v1beta1/ingressclass.go @@ -26,10 +26,13 @@ import ( ) // IngressClassLister helps list IngressClasses. +// All objects returned here must be treated as read-only. type IngressClassLister interface { // List lists all IngressClasses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.IngressClass, err error) // Get retrieves the IngressClass from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.IngressClass, error) IngressClassListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/node/v1alpha1/runtimeclass.go b/vendor/k8s.io/client-go/listers/node/v1alpha1/runtimeclass.go index af3f02b9828..31f3357990b 100644 --- a/vendor/k8s.io/client-go/listers/node/v1alpha1/runtimeclass.go +++ b/vendor/k8s.io/client-go/listers/node/v1alpha1/runtimeclass.go @@ -26,10 +26,13 @@ import ( ) // RuntimeClassLister helps list RuntimeClasses. +// All objects returned here must be treated as read-only. type RuntimeClassLister interface { // List lists all RuntimeClasses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.RuntimeClass, err error) // Get retrieves the RuntimeClass from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.RuntimeClass, error) RuntimeClassListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/node/v1beta1/runtimeclass.go b/vendor/k8s.io/client-go/listers/node/v1beta1/runtimeclass.go index be642b9990b..7dbd6ab268b 100644 --- a/vendor/k8s.io/client-go/listers/node/v1beta1/runtimeclass.go +++ b/vendor/k8s.io/client-go/listers/node/v1beta1/runtimeclass.go @@ -26,10 +26,13 @@ import ( ) // RuntimeClassLister helps list RuntimeClasses. +// All objects returned here must be treated as read-only. type RuntimeClassLister interface { // List lists all RuntimeClasses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.RuntimeClass, err error) // Get retrieves the RuntimeClass from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.RuntimeClass, error) RuntimeClassListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/policy/v1beta1/BUILD b/vendor/k8s.io/client-go/listers/policy/v1beta1/BUILD index 640f0435cf5..d3c5a12b072 100644 --- a/vendor/k8s.io/client-go/listers/policy/v1beta1/BUILD +++ b/vendor/k8s.io/client-go/listers/policy/v1beta1/BUILD @@ -23,7 +23,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go b/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go index 6e27f5fdc8f..e1d40d0b32f 100644 --- a/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go +++ b/vendor/k8s.io/client-go/listers/policy/v1beta1/eviction.go @@ -26,8 +26,10 @@ import ( ) // EvictionLister helps list Evictions. +// All objects returned here must be treated as read-only. type EvictionLister interface { // List lists all Evictions in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) // Evictions returns an object that can list and get Evictions. Evictions(namespace string) EvictionNamespaceLister @@ -58,10 +60,13 @@ func (s *evictionLister) Evictions(namespace string) EvictionNamespaceLister { } // EvictionNamespaceLister helps list and get Evictions. +// All objects returned here must be treated as read-only. type EvictionNamespaceLister interface { // List lists all Evictions in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Eviction, err error) // Get retrieves the Eviction from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.Eviction, error) EvictionNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go index b1f83ee1664..aa08f813eef 100644 --- a/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go +++ b/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go @@ -26,8 +26,10 @@ import ( ) // PodDisruptionBudgetLister helps list PodDisruptionBudgets. +// All objects returned here must be treated as read-only. type PodDisruptionBudgetLister interface { // List lists all PodDisruptionBudgets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) // PodDisruptionBudgets returns an object that can list and get PodDisruptionBudgets. PodDisruptionBudgets(namespace string) PodDisruptionBudgetNamespaceLister @@ -58,10 +60,13 @@ func (s *podDisruptionBudgetLister) PodDisruptionBudgets(namespace string) PodDi } // PodDisruptionBudgetNamespaceLister helps list and get PodDisruptionBudgets. +// All objects returned here must be treated as read-only. type PodDisruptionBudgetNamespaceLister interface { // List lists all PodDisruptionBudgets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.PodDisruptionBudget, err error) // Get retrieves the PodDisruptionBudget from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.PodDisruptionBudget, error) PodDisruptionBudgetNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go b/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go index d07d11a98df..e93c3647b52 100644 --- a/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go +++ b/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go @@ -23,7 +23,7 @@ import ( policy "k8s.io/api/policy/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/klog" + "k8s.io/klog/v2" ) // PodDisruptionBudgetListerExpansion allows custom methods to be added to diff --git a/vendor/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go index e943d3a0595..7e73161b25a 100644 --- a/vendor/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go +++ b/vendor/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go @@ -26,10 +26,13 @@ import ( ) // PodSecurityPolicyLister helps list PodSecurityPolicies. +// All objects returned here must be treated as read-only. type PodSecurityPolicyLister interface { // List lists all PodSecurityPolicies in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) // Get retrieves the PodSecurityPolicy from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.PodSecurityPolicy, error) PodSecurityPolicyListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1/clusterrole.go b/vendor/k8s.io/client-go/listers/rbac/v1/clusterrole.go index a612dbeab88..84dc003ca2e 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1/clusterrole.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1/clusterrole.go @@ -26,10 +26,13 @@ import ( ) // ClusterRoleLister helps list ClusterRoles. +// All objects returned here must be treated as read-only. type ClusterRoleLister interface { // List lists all ClusterRoles in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ClusterRole, err error) // Get retrieves the ClusterRole from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.ClusterRole, error) ClusterRoleListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go index 2c5958ff997..ff061d4b2b8 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go @@ -26,10 +26,13 @@ import ( ) // ClusterRoleBindingLister helps list ClusterRoleBindings. +// All objects returned here must be treated as read-only. type ClusterRoleBindingLister interface { // List lists all ClusterRoleBindings in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.ClusterRoleBinding, err error) // Get retrieves the ClusterRoleBinding from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.ClusterRoleBinding, error) ClusterRoleBindingListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1/role.go b/vendor/k8s.io/client-go/listers/rbac/v1/role.go index 9a9d9877389..503f013b520 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1/role.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1/role.go @@ -26,8 +26,10 @@ import ( ) // RoleLister helps list Roles. +// All objects returned here must be treated as read-only. type RoleLister interface { // List lists all Roles in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Role, err error) // Roles returns an object that can list and get Roles. Roles(namespace string) RoleNamespaceLister @@ -58,10 +60,13 @@ func (s *roleLister) Roles(namespace string) RoleNamespaceLister { } // RoleNamespaceLister helps list and get Roles. +// All objects returned here must be treated as read-only. type RoleNamespaceLister interface { // List lists all Roles in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.Role, err error) // Get retrieves the Role from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.Role, error) RoleNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1/rolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1/rolebinding.go index 85a69315a6c..ea50c641360 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1/rolebinding.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1/rolebinding.go @@ -26,8 +26,10 @@ import ( ) // RoleBindingLister helps list RoleBindings. +// All objects returned here must be treated as read-only. type RoleBindingLister interface { // List lists all RoleBindings in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.RoleBinding, err error) // RoleBindings returns an object that can list and get RoleBindings. RoleBindings(namespace string) RoleBindingNamespaceLister @@ -58,10 +60,13 @@ func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceL } // RoleBindingNamespaceLister helps list and get RoleBindings. +// All objects returned here must be treated as read-only. type RoleBindingNamespaceLister interface { // List lists all RoleBindings in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.RoleBinding, err error) // Get retrieves the RoleBinding from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.RoleBinding, error) RoleBindingNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go index f8c50f65bd7..181ea95a7d4 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go @@ -26,10 +26,13 @@ import ( ) // ClusterRoleLister helps list ClusterRoles. +// All objects returned here must be treated as read-only. type ClusterRoleLister interface { // List lists all ClusterRoles in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.ClusterRole, err error) // Get retrieves the ClusterRole from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.ClusterRole, error) ClusterRoleListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go index 5769ed0e627..29d283b6cf2 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go @@ -26,10 +26,13 @@ import ( ) // ClusterRoleBindingLister helps list ClusterRoleBindings. +// All objects returned here must be treated as read-only. type ClusterRoleBindingLister interface { // List lists all ClusterRoleBindings in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.ClusterRoleBinding, err error) // Get retrieves the ClusterRoleBinding from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.ClusterRoleBinding, error) ClusterRoleBindingListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/role.go b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/role.go index c337b589b9a..13a64137aed 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/role.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/role.go @@ -26,8 +26,10 @@ import ( ) // RoleLister helps list Roles. +// All objects returned here must be treated as read-only. type RoleLister interface { // List lists all Roles in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.Role, err error) // Roles returns an object that can list and get Roles. Roles(namespace string) RoleNamespaceLister @@ -58,10 +60,13 @@ func (s *roleLister) Roles(namespace string) RoleNamespaceLister { } // RoleNamespaceLister helps list and get Roles. +// All objects returned here must be treated as read-only. type RoleNamespaceLister interface { // List lists all Roles in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.Role, err error) // Get retrieves the Role from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.Role, error) RoleNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go index 4e517f4d6bf..0ad3d0eba06 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go @@ -26,8 +26,10 @@ import ( ) // RoleBindingLister helps list RoleBindings. +// All objects returned here must be treated as read-only. type RoleBindingLister interface { // List lists all RoleBindings in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) // RoleBindings returns an object that can list and get RoleBindings. RoleBindings(namespace string) RoleBindingNamespaceLister @@ -58,10 +60,13 @@ func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceL } // RoleBindingNamespaceLister helps list and get RoleBindings. +// All objects returned here must be treated as read-only. type RoleBindingNamespaceLister interface { // List lists all RoleBindings in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.RoleBinding, err error) // Get retrieves the RoleBinding from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.RoleBinding, error) RoleBindingNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go index 01356f4b288..bf6cd99cb14 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go @@ -26,10 +26,13 @@ import ( ) // ClusterRoleLister helps list ClusterRoles. +// All objects returned here must be treated as read-only. type ClusterRoleLister interface { // List lists all ClusterRoles in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ClusterRole, err error) // Get retrieves the ClusterRole from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.ClusterRole, error) ClusterRoleListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go index 6d3f14338eb..00bab2330bd 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go @@ -26,10 +26,13 @@ import ( ) // ClusterRoleBindingLister helps list ClusterRoleBindings. +// All objects returned here must be treated as read-only. type ClusterRoleBindingLister interface { // List lists all ClusterRoleBindings in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error) // Get retrieves the ClusterRoleBinding from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.ClusterRoleBinding, error) ClusterRoleBindingListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1beta1/role.go b/vendor/k8s.io/client-go/listers/rbac/v1beta1/role.go index c946c43a791..9cd9b9042df 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1beta1/role.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1beta1/role.go @@ -26,8 +26,10 @@ import ( ) // RoleLister helps list Roles. +// All objects returned here must be treated as read-only. type RoleLister interface { // List lists all Roles in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Role, err error) // Roles returns an object that can list and get Roles. Roles(namespace string) RoleNamespaceLister @@ -58,10 +60,13 @@ func (s *roleLister) Roles(namespace string) RoleNamespaceLister { } // RoleNamespaceLister helps list and get Roles. +// All objects returned here must be treated as read-only. type RoleNamespaceLister interface { // List lists all Roles in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.Role, err error) // Get retrieves the Role from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.Role, error) RoleNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go index 0eec45bdec6..7c7c91bf3f7 100644 --- a/vendor/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go +++ b/vendor/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go @@ -26,8 +26,10 @@ import ( ) // RoleBindingLister helps list RoleBindings. +// All objects returned here must be treated as read-only. type RoleBindingLister interface { // List lists all RoleBindings in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) // RoleBindings returns an object that can list and get RoleBindings. RoleBindings(namespace string) RoleBindingNamespaceLister @@ -58,10 +60,13 @@ func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceL } // RoleBindingNamespaceLister helps list and get RoleBindings. +// All objects returned here must be treated as read-only. type RoleBindingNamespaceLister interface { // List lists all RoleBindings in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) // Get retrieves the RoleBinding from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.RoleBinding, error) RoleBindingNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/scheduling/v1/priorityclass.go b/vendor/k8s.io/client-go/listers/scheduling/v1/priorityclass.go index 452fee591ed..4da84ccf8a3 100644 --- a/vendor/k8s.io/client-go/listers/scheduling/v1/priorityclass.go +++ b/vendor/k8s.io/client-go/listers/scheduling/v1/priorityclass.go @@ -26,10 +26,13 @@ import ( ) // PriorityClassLister helps list PriorityClasses. +// All objects returned here must be treated as read-only. type PriorityClassLister interface { // List lists all PriorityClasses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.PriorityClass, err error) // Get retrieves the PriorityClass from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.PriorityClass, error) PriorityClassListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go b/vendor/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go index a3059c94dc0..3d25dc80af3 100644 --- a/vendor/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go +++ b/vendor/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go @@ -26,10 +26,13 @@ import ( ) // PriorityClassLister helps list PriorityClasses. +// All objects returned here must be treated as read-only. type PriorityClassLister interface { // List lists all PriorityClasses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.PriorityClass, err error) // Get retrieves the PriorityClass from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.PriorityClass, error) PriorityClassListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go b/vendor/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go index 9d0606392ca..c848d035afc 100644 --- a/vendor/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go +++ b/vendor/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go @@ -26,10 +26,13 @@ import ( ) // PriorityClassLister helps list PriorityClasses. +// All objects returned here must be treated as read-only. type PriorityClassLister interface { // List lists all PriorityClasses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.PriorityClass, err error) // Get retrieves the PriorityClass from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.PriorityClass, error) PriorityClassListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go b/vendor/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go index c862e7d7d74..c21eb72e60d 100644 --- a/vendor/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go +++ b/vendor/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go @@ -26,8 +26,10 @@ import ( ) // PodPresetLister helps list PodPresets. +// All objects returned here must be treated as read-only. type PodPresetLister interface { // List lists all PodPresets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error) // PodPresets returns an object that can list and get PodPresets. PodPresets(namespace string) PodPresetNamespaceLister @@ -58,10 +60,13 @@ func (s *podPresetLister) PodPresets(namespace string) PodPresetNamespaceLister } // PodPresetNamespaceLister helps list and get PodPresets. +// All objects returned here must be treated as read-only. type PodPresetNamespaceLister interface { // List lists all PodPresets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.PodPreset, err error) // Get retrieves the PodPreset from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.PodPreset, error) PodPresetNamespaceListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/storage/v1/csidriver.go b/vendor/k8s.io/client-go/listers/storage/v1/csidriver.go index 68b2f8be1ab..4e8ab909007 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1/csidriver.go +++ b/vendor/k8s.io/client-go/listers/storage/v1/csidriver.go @@ -26,10 +26,13 @@ import ( ) // CSIDriverLister helps list CSIDrivers. +// All objects returned here must be treated as read-only. type CSIDriverLister interface { // List lists all CSIDrivers in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.CSIDriver, err error) // Get retrieves the CSIDriver from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.CSIDriver, error) CSIDriverListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/storage/v1/csinode.go b/vendor/k8s.io/client-go/listers/storage/v1/csinode.go index 577f7285c9e..93f869572ca 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1/csinode.go +++ b/vendor/k8s.io/client-go/listers/storage/v1/csinode.go @@ -26,10 +26,13 @@ import ( ) // CSINodeLister helps list CSINodes. +// All objects returned here must be treated as read-only. type CSINodeLister interface { // List lists all CSINodes in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.CSINode, err error) // Get retrieves the CSINode from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.CSINode, error) CSINodeListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/storage/v1/storageclass.go b/vendor/k8s.io/client-go/listers/storage/v1/storageclass.go index 13e8536b4c1..ffa3d19f50b 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1/storageclass.go +++ b/vendor/k8s.io/client-go/listers/storage/v1/storageclass.go @@ -26,10 +26,13 @@ import ( ) // StorageClassLister helps list StorageClasses. +// All objects returned here must be treated as read-only. type StorageClassLister interface { // List lists all StorageClasses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.StorageClass, err error) // Get retrieves the StorageClass from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.StorageClass, error) StorageClassListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/storage/v1/volumeattachment.go b/vendor/k8s.io/client-go/listers/storage/v1/volumeattachment.go index 14888812ec6..fbc735c9394 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1/volumeattachment.go +++ b/vendor/k8s.io/client-go/listers/storage/v1/volumeattachment.go @@ -26,10 +26,13 @@ import ( ) // VolumeAttachmentLister helps list VolumeAttachments. +// All objects returned here must be treated as read-only. type VolumeAttachmentLister interface { // List lists all VolumeAttachments in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.VolumeAttachment, err error) // Get retrieves the VolumeAttachment from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.VolumeAttachment, error) VolumeAttachmentListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/storage/v1alpha1/BUILD b/vendor/k8s.io/client-go/listers/storage/v1alpha1/BUILD index 300af788d2a..e7cbd3ce148 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1alpha1/BUILD +++ b/vendor/k8s.io/client-go/listers/storage/v1alpha1/BUILD @@ -3,6 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ + "csistoragecapacity.go", "expansion_generated.go", "volumeattachment.go", ], diff --git a/vendor/k8s.io/client-go/listers/storage/v1alpha1/csistoragecapacity.go b/vendor/k8s.io/client-go/listers/storage/v1alpha1/csistoragecapacity.go new file mode 100644 index 00000000000..0c1b5f26474 --- /dev/null +++ b/vendor/k8s.io/client-go/listers/storage/v1alpha1/csistoragecapacity.go @@ -0,0 +1,99 @@ +/* +Copyright 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "k8s.io/api/storage/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// CSIStorageCapacityLister helps list CSIStorageCapacities. +// All objects returned here must be treated as read-only. +type CSIStorageCapacityLister interface { + // List lists all CSIStorageCapacities in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.CSIStorageCapacity, err error) + // CSIStorageCapacities returns an object that can list and get CSIStorageCapacities. + CSIStorageCapacities(namespace string) CSIStorageCapacityNamespaceLister + CSIStorageCapacityListerExpansion +} + +// cSIStorageCapacityLister implements the CSIStorageCapacityLister interface. +type cSIStorageCapacityLister struct { + indexer cache.Indexer +} + +// NewCSIStorageCapacityLister returns a new CSIStorageCapacityLister. +func NewCSIStorageCapacityLister(indexer cache.Indexer) CSIStorageCapacityLister { + return &cSIStorageCapacityLister{indexer: indexer} +} + +// List lists all CSIStorageCapacities in the indexer. +func (s *cSIStorageCapacityLister) List(selector labels.Selector) (ret []*v1alpha1.CSIStorageCapacity, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CSIStorageCapacity)) + }) + return ret, err +} + +// CSIStorageCapacities returns an object that can list and get CSIStorageCapacities. +func (s *cSIStorageCapacityLister) CSIStorageCapacities(namespace string) CSIStorageCapacityNamespaceLister { + return cSIStorageCapacityNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// CSIStorageCapacityNamespaceLister helps list and get CSIStorageCapacities. +// All objects returned here must be treated as read-only. +type CSIStorageCapacityNamespaceLister interface { + // List lists all CSIStorageCapacities in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.CSIStorageCapacity, err error) + // Get retrieves the CSIStorageCapacity from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.CSIStorageCapacity, error) + CSIStorageCapacityNamespaceListerExpansion +} + +// cSIStorageCapacityNamespaceLister implements the CSIStorageCapacityNamespaceLister +// interface. +type cSIStorageCapacityNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all CSIStorageCapacities in the indexer for a given namespace. +func (s cSIStorageCapacityNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.CSIStorageCapacity, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CSIStorageCapacity)) + }) + return ret, err +} + +// Get retrieves the CSIStorageCapacity from the indexer for a given namespace and name. +func (s cSIStorageCapacityNamespaceLister) Get(name string) (*v1alpha1.CSIStorageCapacity, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("csistoragecapacity"), name) + } + return obj.(*v1alpha1.CSIStorageCapacity), nil +} diff --git a/vendor/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go b/vendor/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go index 7ca765622f0..edefe6d05ed 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go +++ b/vendor/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go @@ -18,6 +18,14 @@ limitations under the License. package v1alpha1 +// CSIStorageCapacityListerExpansion allows custom methods to be added to +// CSIStorageCapacityLister. +type CSIStorageCapacityListerExpansion interface{} + +// CSIStorageCapacityNamespaceListerExpansion allows custom methods to be added to +// CSIStorageCapacityNamespaceLister. +type CSIStorageCapacityNamespaceListerExpansion interface{} + // VolumeAttachmentListerExpansion allows custom methods to be added to // VolumeAttachmentLister. type VolumeAttachmentListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go b/vendor/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go index 7871f55e438..3d5e2b7b712 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go +++ b/vendor/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go @@ -26,10 +26,13 @@ import ( ) // VolumeAttachmentLister helps list VolumeAttachments. +// All objects returned here must be treated as read-only. type VolumeAttachmentLister interface { // List lists all VolumeAttachments in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.VolumeAttachment, err error) // Get retrieves the VolumeAttachment from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.VolumeAttachment, error) VolumeAttachmentListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/storage/v1beta1/csidriver.go b/vendor/k8s.io/client-go/listers/storage/v1beta1/csidriver.go index 8a401375067..c6787aa01ba 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1beta1/csidriver.go +++ b/vendor/k8s.io/client-go/listers/storage/v1beta1/csidriver.go @@ -26,10 +26,13 @@ import ( ) // CSIDriverLister helps list CSIDrivers. +// All objects returned here must be treated as read-only. type CSIDriverLister interface { // List lists all CSIDrivers in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CSIDriver, err error) // Get retrieves the CSIDriver from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.CSIDriver, error) CSIDriverListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/storage/v1beta1/csinode.go b/vendor/k8s.io/client-go/listers/storage/v1beta1/csinode.go index bb7a2b2b3b9..809efaa3696 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1beta1/csinode.go +++ b/vendor/k8s.io/client-go/listers/storage/v1beta1/csinode.go @@ -26,10 +26,13 @@ import ( ) // CSINodeLister helps list CSINodes. +// All objects returned here must be treated as read-only. type CSINodeLister interface { // List lists all CSINodes in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.CSINode, err error) // Get retrieves the CSINode from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.CSINode, error) CSINodeListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go b/vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go index 07bc97b324d..eb7b8315c69 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go +++ b/vendor/k8s.io/client-go/listers/storage/v1beta1/storageclass.go @@ -26,10 +26,13 @@ import ( ) // StorageClassLister helps list StorageClasses. +// All objects returned here must be treated as read-only. type StorageClassLister interface { // List lists all StorageClasses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.StorageClass, err error) // Get retrieves the StorageClass from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.StorageClass, error) StorageClassListerExpansion } diff --git a/vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go b/vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go index 7193441b0bf..bab2d317c79 100644 --- a/vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go +++ b/vendor/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go @@ -26,10 +26,13 @@ import ( ) // VolumeAttachmentLister helps list VolumeAttachments. +// All objects returned here must be treated as read-only. type VolumeAttachmentLister interface { // List lists all VolumeAttachments in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.VolumeAttachment, err error) // Get retrieves the VolumeAttachment from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.VolumeAttachment, error) VolumeAttachmentListerExpansion } diff --git a/vendor/k8s.io/client-go/metadata/BUILD b/vendor/k8s.io/client-go/metadata/BUILD index 1ec6687a5aa..84c87348c3e 100644 --- a/vendor/k8s.io/client-go/metadata/BUILD +++ b/vendor/k8s.io/client-go/metadata/BUILD @@ -18,7 +18,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/metadata/metadata.go b/vendor/k8s.io/client-go/metadata/metadata.go index 4750ffadea0..72b55799148 100644 --- a/vendor/k8s.io/client-go/metadata/metadata.go +++ b/vendor/k8s.io/client-go/metadata/metadata.go @@ -22,7 +22,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" metainternalversionscheme "k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/client-go/metadata/metadatainformer/BUILD b/vendor/k8s.io/client-go/metadata/metadatainformer/BUILD index 0d783026e6b..091f18fb88f 100644 --- a/vendor/k8s.io/client-go/metadata/metadatainformer/BUILD +++ b/vendor/k8s.io/client-go/metadata/metadatainformer/BUILD @@ -33,7 +33,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/client-go/metadata/fake:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/pkg/version/base.go b/vendor/k8s.io/client-go/pkg/version/base.go index 086fb2c49c5..12cd41fb93f 100644 --- a/vendor/k8s.io/client-go/pkg/version/base.go +++ b/vendor/k8s.io/client-go/pkg/version/base.go @@ -2,9 +2,9 @@ package version var ( gitMajor = "1" - gitMinor = "18" - gitVersion = "v1.18.8-k3s1" - gitCommit = "b86d0e4a07fd882c2f9718f4e82b06dfd4b55195" + gitMinor = "19" + gitVersion = "v1.19.0-k3s1" + gitCommit = "e2f7428419fe755d157af02325fc51cdfcf0799c" gitTreeState = "clean" - buildDate = "2020-08-13T18:53:34Z" + buildDate = "2020-08-27T22:54:40Z" ) diff --git a/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/BUILD b/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/BUILD index 82676fdebbf..352449a2f08 100644 --- a/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/BUILD +++ b/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/BUILD @@ -14,6 +14,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/client-go/pkg/apis/clientauthentication:go_default_library", "//staging/src/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1:go_default_library", @@ -24,7 +25,7 @@ go_library( "//staging/src/k8s.io/client-go/util/connrotation:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -39,6 +40,7 @@ go_test( deps = [ "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/client-go/pkg/apis/clientauthentication:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd/api:go_default_library", "//staging/src/k8s.io/client-go/transport:go_default_library", diff --git a/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go b/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go index 71ed045acd9..627bb2de94b 100644 --- a/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go +++ b/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go @@ -29,6 +29,7 @@ import ( "os" "os/exec" "reflect" + "strings" "sync" "time" @@ -38,6 +39,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/clock" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/pkg/apis/clientauthentication" "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" @@ -46,11 +48,17 @@ import ( "k8s.io/client-go/tools/metrics" "k8s.io/client-go/transport" "k8s.io/client-go/util/connrotation" - "k8s.io/klog" + "k8s.io/klog/v2" ) const execInfoEnv = "KUBERNETES_EXEC_INFO" const onRotateListWarningLength = 1000 +const installHintVerboseHelp = ` + +It looks like you are trying to use a client-go credential plugin that is not installed. + +To learn more about this feature, consult the documentation available at: + https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins` var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) @@ -108,6 +116,44 @@ func (c *cache) put(s string, a *Authenticator) *Authenticator { return a } +// sometimes rate limits how often a function f() is called. Specifically, Do() +// will run the provided function f() up to threshold times every interval +// duration. +type sometimes struct { + threshold int + interval time.Duration + + clock clock.Clock + mu sync.Mutex + + count int // times we have called f() in this window + window time.Time // beginning of current window of length interval +} + +func (s *sometimes) Do(f func()) { + s.mu.Lock() + defer s.mu.Unlock() + + now := s.clock.Now() + if s.window.IsZero() { + s.window = now + } + + // If we are no longer in our saved time window, then we get to reset our run + // count back to 0 and start increasing towards the threshold again. + if inWindow := now.Sub(s.window) < s.interval; !inWindow { + s.window = now + s.count = 0 + } + + // If we have not run the function more than threshold times in this current + // time window, we get to run it now! + if underThreshold := s.count < s.threshold; underThreshold { + s.count++ + f() + } +} + // GetAuthenticator returns an exec-based plugin for providing client credentials. func GetAuthenticator(config *api.ExecConfig) (*Authenticator, error) { return newAuthenticator(globalCache, config) @@ -129,6 +175,13 @@ func newAuthenticator(c *cache, config *api.ExecConfig) (*Authenticator, error) args: config.Args, group: gv, + installHint: config.InstallHint, + sometimes: &sometimes{ + threshold: 10, + interval: time.Hour, + clock: clock.RealClock{}, + }, + stdin: os.Stdin, stderr: os.Stderr, interactive: terminal.IsTerminal(int(os.Stdout.Fd())), @@ -152,6 +205,12 @@ type Authenticator struct { group schema.GroupVersion env []string + // Used to avoid log spew by rate limiting install hint printing. We didn't do + // this by interval based rate limiting alone since that way may have prevented + // the install hint from showing up for kubectl users. + sometimes *sometimes + installHint string + // Stubbable for testing stdin io.Reader stderr io.Writer @@ -178,6 +237,15 @@ type credentials struct { // UpdateTransportConfig updates the transport.Config to use credentials // returned by the plugin. func (a *Authenticator) UpdateTransportConfig(c *transport.Config) error { + // If a bearer token is present in the request - avoid the GetCert callback when + // setting up the transport, as that triggers the exec action if the server is + // also configured to allow client certificates for authentication. For requests + // like "kubectl get --token (token) pods" we should assume the intention is to + // use the provided token for authentication. + if c.HasTokenAuth() { + return nil + } + c.Wrap(func(rt http.RoundTripper) http.RoundTripper { return &roundTripper{a, rt} }) @@ -323,7 +391,7 @@ func (a *Authenticator) refreshCredsLocked(r *clientauthentication.Response) err } if err := cmd.Run(); err != nil { - return fmt.Errorf("exec: %v", err) + return a.wrapCmdRunErrorLocked(err) } _, gvk, err := codecs.UniversalDecoder(a.group).Decode(stdout.Bytes(), nil, cred) @@ -394,3 +462,35 @@ func (a *Authenticator) refreshCredsLocked(r *clientauthentication.Response) err expirationMetrics.set(a, expiry) return nil } + +// wrapCmdRunErrorLocked pulls out the code to construct a helpful error message +// for when the exec plugin's binary fails to Run(). +// +// It must be called while holding the Authenticator's mutex. +func (a *Authenticator) wrapCmdRunErrorLocked(err error) error { + switch err.(type) { + case *exec.Error: // Binary does not exist (see exec.Error). + builder := strings.Builder{} + fmt.Fprintf(&builder, "exec: executable %s not found", a.cmd) + + a.sometimes.Do(func() { + fmt.Fprint(&builder, installHintVerboseHelp) + if a.installHint != "" { + fmt.Fprintf(&builder, "\n\n%s", a.installHint) + } + }) + + return errors.New(builder.String()) + + case *exec.ExitError: // Binary execution failed (see exec.Cmd.Run()). + e := err.(*exec.ExitError) + return fmt.Errorf( + "exec: executable %s failed with exit code %d", + a.cmd, + e.ProcessState.ExitCode(), + ) + + default: + return fmt.Errorf("exec: %v", err) + } +} diff --git a/vendor/k8s.io/client-go/rest/BUILD b/vendor/k8s.io/client-go/rest/BUILD index b6ef3f55ed1..17d6b3e1656 100644 --- a/vendor/k8s.io/client-go/rest/BUILD +++ b/vendor/k8s.io/client-go/rest/BUILD @@ -38,9 +38,10 @@ go_test( "//staging/src/k8s.io/client-go/transport:go_default_library", "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/client-go/util/testing:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -54,6 +55,7 @@ go_library( "transport.go", "url_utils.go", "urlbackoff.go", + "warnings.go", "zz_generated.deepcopy.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/rest", @@ -78,7 +80,7 @@ go_library( "//staging/src/k8s.io/client-go/util/cert:go_default_library", "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//vendor/golang.org/x/net/http2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/rest/client.go b/vendor/k8s.io/client-go/rest/client.go index 53c6abd3815..f35955d45fa 100644 --- a/vendor/k8s.io/client-go/rest/client.go +++ b/vendor/k8s.io/client-go/rest/client.go @@ -94,6 +94,10 @@ type RESTClient struct { // overridden. rateLimiter flowcontrol.RateLimiter + // warningHandler is shared among all requests created by this client. + // If not set, defaultWarningHandler is used. + warningHandler WarningHandler + // Set specific behavior of the client. If not set http.DefaultClient will be used. Client *http.Client } diff --git a/vendor/k8s.io/client-go/rest/config.go b/vendor/k8s.io/client-go/rest/config.go index f58f518303b..6e50eef51e7 100644 --- a/vendor/k8s.io/client-go/rest/config.go +++ b/vendor/k8s.io/client-go/rest/config.go @@ -23,6 +23,7 @@ import ( "io/ioutil" "net" "net/http" + "net/url" "os" "path/filepath" gruntime "runtime" @@ -37,7 +38,7 @@ import ( "k8s.io/client-go/transport" certutil "k8s.io/client-go/util/cert" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -122,12 +123,23 @@ type Config struct { // Rate limiter for limiting connections to the master from this client. If present overwrites QPS/Burst RateLimiter flowcontrol.RateLimiter + // WarningHandler handles warnings in server responses. + // If not set, the default warning handler is used. + WarningHandler WarningHandler + // The maximum length of time to wait before giving up on a server request. A value of zero means no timeout. Timeout time.Duration // Dial specifies the dial function for creating unencrypted TCP connections. Dial func(ctx context.Context, network, address string) (net.Conn, error) + // Proxy is the the proxy func to be used for all requests made by this + // transport. If Proxy is nil, http.ProxyFromEnvironment is used. If Proxy + // returns a nil *URL, no proxy is used. + // + // socks5 proxying does not currently support spdy streaming endpoints. + Proxy func(*http.Request) (*url.URL, error) + // Version forces a specific version to be used (if registered) // Do we need this? // Version string @@ -331,7 +343,11 @@ func RESTClientFor(config *Config) (*RESTClient, error) { Negotiator: runtime.NewClientNegotiator(config.NegotiatedSerializer, gv), } - return NewRESTClient(baseURL, versionedAPIPath, clientContent, rateLimiter, httpClient) + restClient, err := NewRESTClient(baseURL, versionedAPIPath, clientContent, rateLimiter, httpClient) + if err == nil && config.WarningHandler != nil { + restClient.warningHandler = config.WarningHandler + } + return restClient, err } // UnversionedRESTClientFor is the same as RESTClientFor, except that it allows @@ -385,7 +401,11 @@ func UnversionedRESTClientFor(config *Config) (*RESTClient, error) { Negotiator: runtime.NewClientNegotiator(config.NegotiatedSerializer, gv), } - return NewRESTClient(baseURL, versionedAPIPath, clientContent, rateLimiter, httpClient) + restClient, err := NewRESTClient(baseURL, versionedAPIPath, clientContent, rateLimiter, httpClient) + if err == nil && config.WarningHandler != nil { + restClient.warningHandler = config.WarningHandler + } + return restClient, err } // SetKubernetesDefaults sets default values on the provided client config for accessing the @@ -554,12 +574,14 @@ func AnonymousClientConfig(config *Config) *Config { NextProtos: config.TLSClientConfig.NextProtos, }, RateLimiter: config.RateLimiter, + WarningHandler: config.WarningHandler, UserAgent: config.UserAgent, DisableCompression: config.DisableCompression, QPS: config.QPS, Burst: config.Burst, Timeout: config.Timeout, Dial: config.Dial, + Proxy: config.Proxy, } } @@ -599,7 +621,9 @@ func CopyConfig(config *Config) *Config { QPS: config.QPS, Burst: config.Burst, RateLimiter: config.RateLimiter, + WarningHandler: config.WarningHandler, Timeout: config.Timeout, Dial: config.Dial, + Proxy: config.Proxy, } } diff --git a/vendor/k8s.io/client-go/rest/fake/BUILD b/vendor/k8s.io/client-go/rest/fake/BUILD new file mode 100644 index 00000000000..56a820d5dd6 --- /dev/null +++ b/vendor/k8s.io/client-go/rest/fake/BUILD @@ -0,0 +1,33 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["fake.go"], + importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/rest/fake", + importpath = "k8s.io/client-go/rest/fake", + deps = [ + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/client-go/rest:go_default_library", + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/client-go/rest/fake/fake.go b/vendor/k8s.io/client-go/rest/fake/fake.go new file mode 100644 index 00000000000..293e096946a --- /dev/null +++ b/vendor/k8s.io/client-go/rest/fake/fake.go @@ -0,0 +1,118 @@ +/* +Copyright 2014 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. +*/ + +// This is made a separate package and should only be imported by tests, because +// it imports testapi +package fake + +import ( + "net/http" + "net/url" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" +) + +// CreateHTTPClient creates an http.Client that will invoke the provided roundTripper func +// when a request is made. +func CreateHTTPClient(roundTripper func(*http.Request) (*http.Response, error)) *http.Client { + return &http.Client{ + Transport: roundTripperFunc(roundTripper), + } +} + +type roundTripperFunc func(*http.Request) (*http.Response, error) + +func (f roundTripperFunc) RoundTrip(req *http.Request) (*http.Response, error) { + return f(req) +} + +// RESTClient provides a fake RESTClient interface. It is used to mock network +// interactions via a rest.Request, or to make them via the provided Client to +// a specific server. +type RESTClient struct { + NegotiatedSerializer runtime.NegotiatedSerializer + GroupVersion schema.GroupVersion + VersionedAPIPath string + + // Err is returned when any request would be made to the server. If Err is set, + // Req will not be recorded, Resp will not be returned, and Client will not be + // invoked. + Err error + // Req is set to the last request that was executed (had the methods Do/DoRaw) invoked. + Req *http.Request + // If Client is specified, the client will be invoked instead of returning Resp if + // Err is not set. + Client *http.Client + // Resp is returned to the caller after Req is recorded, unless Err or Client are set. + Resp *http.Response +} + +func (c *RESTClient) Get() *restclient.Request { + return c.Verb("GET") +} + +func (c *RESTClient) Put() *restclient.Request { + return c.Verb("PUT") +} + +func (c *RESTClient) Patch(pt types.PatchType) *restclient.Request { + return c.Verb("PATCH").SetHeader("Content-Type", string(pt)) +} + +func (c *RESTClient) Post() *restclient.Request { + return c.Verb("POST") +} + +func (c *RESTClient) Delete() *restclient.Request { + return c.Verb("DELETE") +} + +func (c *RESTClient) Verb(verb string) *restclient.Request { + return c.Request().Verb(verb) +} + +func (c *RESTClient) APIVersion() schema.GroupVersion { + return c.GroupVersion +} + +func (c *RESTClient) GetRateLimiter() flowcontrol.RateLimiter { + return nil +} + +func (c *RESTClient) Request() *restclient.Request { + config := restclient.ClientContentConfig{ + ContentType: runtime.ContentTypeJSON, + GroupVersion: c.GroupVersion, + Negotiator: runtime.NewClientNegotiator(c.NegotiatedSerializer, c.GroupVersion), + } + return restclient.NewRequestWithClient(&url.URL{Scheme: "https", Host: "localhost"}, c.VersionedAPIPath, config, CreateHTTPClient(c.do)) +} + +// do is invoked when a Request() created by this client is executed. +func (c *RESTClient) do(req *http.Request) (*http.Response, error) { + if c.Err != nil { + return nil, c.Err + } + c.Req = req + if c.Client != nil { + return c.Client.Do(req) + } + return c.Resp, nil +} diff --git a/vendor/k8s.io/client-go/rest/plugin.go b/vendor/k8s.io/client-go/rest/plugin.go index 0bc2d03f6f9..33d146cd9d1 100644 --- a/vendor/k8s.io/client-go/rest/plugin.go +++ b/vendor/k8s.io/client-go/rest/plugin.go @@ -21,7 +21,7 @@ import ( "net/http" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) diff --git a/vendor/k8s.io/client-go/rest/request.go b/vendor/k8s.io/client-go/rest/request.go index c5bc6a8981e..0ed7def73e7 100644 --- a/vendor/k8s.io/client-go/rest/request.go +++ b/vendor/k8s.io/client-go/rest/request.go @@ -45,7 +45,7 @@ import ( restclientwatch "k8s.io/client-go/rest/watch" "k8s.io/client-go/tools/metrics" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" ) var ( @@ -88,9 +88,12 @@ var noBackoff = &NoBackoff{} type Request struct { c *RESTClient + warningHandler WarningHandler + rateLimiter flowcontrol.RateLimiter backoff BackoffManager timeout time.Duration + maxRetries int // generic components accessible via method setters verb string @@ -134,11 +137,13 @@ func NewRequest(c *RESTClient) *Request { } r := &Request{ - c: c, - rateLimiter: c.rateLimiter, - backoff: backoff, - timeout: timeout, - pathPrefix: pathPrefix, + c: c, + rateLimiter: c.rateLimiter, + backoff: backoff, + timeout: timeout, + pathPrefix: pathPrefix, + maxRetries: 10, + warningHandler: c.warningHandler, } switch { @@ -216,6 +221,13 @@ func (r *Request) BackOff(manager BackoffManager) *Request { return r } +// WarningHandler sets the handler this client uses when warning headers are encountered. +// If set to nil, this client will use the default warning handler (see SetDefaultWarningHandler). +func (r *Request) WarningHandler(handler WarningHandler) *Request { + r.warningHandler = handler + return r +} + // Throttle receives a rate-limiter and sets or replaces an existing request limiter func (r *Request) Throttle(limiter flowcontrol.RateLimiter) *Request { r.rateLimiter = limiter @@ -391,6 +403,18 @@ func (r *Request) Timeout(d time.Duration) *Request { return r } +// MaxRetries makes the request use the given integer as a ceiling of retrying upon receiving +// "Retry-After" headers and 429 status-code in the response. The default is 10 unless this +// function is specifically called with a different value. +// A zero maxRetries prevent it from doing retires and return an error immediately. +func (r *Request) MaxRetries(maxRetries int) *Request { + if maxRetries < 0 { + maxRetries = 0 + } + r.maxRetries = maxRetries + return r +} + // Body makes the request use obj as the body. Optional. // If obj is a string, try to read a file of that name. // If obj is a []byte, send it directly. @@ -594,7 +618,7 @@ var globalThrottledLogger = &throttledLogger{ func (b *throttledLogger) attemptToLog() (klog.Level, bool) { for _, setting := range b.settings { - if bool(klog.V(setting.logLevel)) { + if bool(klog.V(setting.logLevel).Enabled()) { // Return early without write locking if possible. if func() bool { setting.lock.RLock() @@ -678,6 +702,8 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { return nil, err } + handleWarnings(resp.Header, r.warningHandler) + frameReader := framer.NewFrameReader(resp.Body) watchEventDecoder := streaming.NewDecoder(frameReader, streamingSerializer) @@ -750,6 +776,7 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { switch { case (resp.StatusCode >= 200) && (resp.StatusCode < 300): + handleWarnings(resp.Header, r.warningHandler) return resp.Body, nil default: @@ -831,7 +858,6 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp } // Right now we make about ten retry attempts if we get a Retry-After response. - maxRetries := 10 retries := 0 for { @@ -894,7 +920,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp }() retries++ - if seconds, wait := checkWait(resp); wait && retries < maxRetries { + if seconds, wait := checkWait(resp); wait && retries <= r.maxRetries { if seeker, ok := r.body.(io.Seeker); ok && r.body != nil { _, err := seeker.Seek(0, 0) if err != nil { @@ -1007,6 +1033,7 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu body: body, contentType: contentType, statusCode: resp.StatusCode, + warnings: handleWarnings(resp.Header, r.warningHandler), } } } @@ -1025,6 +1052,7 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu statusCode: resp.StatusCode, decoder: decoder, err: err, + warnings: handleWarnings(resp.Header, r.warningHandler), } } @@ -1033,6 +1061,7 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu contentType: contentType, statusCode: resp.StatusCode, decoder: decoder, + warnings: handleWarnings(resp.Header, r.warningHandler), } } @@ -1040,11 +1069,11 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu func truncateBody(body string) string { max := 0 switch { - case bool(klog.V(10)): + case bool(klog.V(10).Enabled()): return body - case bool(klog.V(9)): + case bool(klog.V(9).Enabled()): max = 10240 - case bool(klog.V(8)): + case bool(klog.V(8).Enabled()): max = 1024 } @@ -1059,7 +1088,7 @@ func truncateBody(body string) string { // allocating a new string for the body output unless necessary. Uses a simple heuristic to determine // whether the body is printable. func glogBody(prefix string, body []byte) { - if klog.V(8) { + if klog.V(8).Enabled() { if bytes.IndexFunc(body, func(r rune) bool { return r < 0x0a }) != -1 { @@ -1168,6 +1197,7 @@ func retryAfterSeconds(resp *http.Response) (int, bool) { // Result contains the result of calling Request.Do(). type Result struct { body []byte + warnings []net.WarningHeader contentType string err error statusCode int @@ -1281,6 +1311,11 @@ func (r Result) Error() error { return r.err } +// Warnings returns any warning headers received in the response +func (r Result) Warnings() []net.WarningHeader { + return r.warnings +} + // NameMayNotBe specifies strings that cannot be used as names specified as path segments (like the REST API or etcd store) var NameMayNotBe = []string{".", ".."} diff --git a/vendor/k8s.io/client-go/rest/transport.go b/vendor/k8s.io/client-go/rest/transport.go index 0800e4ec747..450edc6edde 100644 --- a/vendor/k8s.io/client-go/rest/transport.go +++ b/vendor/k8s.io/client-go/rest/transport.go @@ -85,7 +85,8 @@ func (c *Config) TransportConfig() (*transport.Config, error) { Groups: c.Impersonate.Groups, Extra: c.Impersonate.Extra, }, - Dial: c.Dial, + Dial: c.Dial, + Proxy: c.Proxy, } if c.ExecProvider != nil && c.AuthProvider != nil { diff --git a/vendor/k8s.io/client-go/rest/urlbackoff.go b/vendor/k8s.io/client-go/rest/urlbackoff.go index d00e42f8667..2f9962d7e54 100644 --- a/vendor/k8s.io/client-go/rest/urlbackoff.go +++ b/vendor/k8s.io/client-go/rest/urlbackoff.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Set of resp. Codes that we backoff for. diff --git a/vendor/k8s.io/client-go/rest/warnings.go b/vendor/k8s.io/client-go/rest/warnings.go new file mode 100644 index 00000000000..45c1c3b2cdb --- /dev/null +++ b/vendor/k8s.io/client-go/rest/warnings.go @@ -0,0 +1,144 @@ +/* +Copyright 2020 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 rest + +import ( + "fmt" + "io" + "net/http" + "sync" + + "k8s.io/klog/v2" + + "k8s.io/apimachinery/pkg/util/net" +) + +// WarningHandler is an interface for handling warning headers +type WarningHandler interface { + // HandleWarningHeader is called with the warn code, agent, and text when a warning header is countered. + HandleWarningHeader(code int, agent string, text string) +} + +var ( + defaultWarningHandler WarningHandler = WarningLogger{} + defaultWarningHandlerLock sync.RWMutex +) + +// SetDefaultWarningHandler sets the default handler client uses when warning headers are encountered. +// By default, warnings are printed to stderr. +func SetDefaultWarningHandler(l WarningHandler) { + defaultWarningHandlerLock.Lock() + defer defaultWarningHandlerLock.Unlock() + defaultWarningHandler = l +} +func getDefaultWarningHandler() WarningHandler { + defaultWarningHandlerLock.RLock() + defer defaultWarningHandlerLock.RUnlock() + l := defaultWarningHandler + return l +} + +// NoWarnings is an implementation of WarningHandler that suppresses warnings. +type NoWarnings struct{} + +func (NoWarnings) HandleWarningHeader(code int, agent string, message string) {} + +// WarningLogger is an implementation of WarningHandler that logs code 299 warnings +type WarningLogger struct{} + +func (WarningLogger) HandleWarningHeader(code int, agent string, message string) { + if code != 299 || len(message) == 0 { + return + } + klog.Warning(message) +} + +type warningWriter struct { + // out is the writer to output warnings to + out io.Writer + // opts contains options controlling warning output + opts WarningWriterOptions + // writtenLock guards written and writtenCount + writtenLock sync.Mutex + writtenCount int + written map[string]struct{} +} + +// WarningWriterOptions controls the behavior of a WarningHandler constructed using NewWarningWriter() +type WarningWriterOptions struct { + // Deduplicate indicates a given warning message should only be written once. + // Setting this to true in a long-running process handling many warnings can result in increased memory use. + Deduplicate bool + // Color indicates that warning output can include ANSI color codes + Color bool +} + +// NewWarningWriter returns an implementation of WarningHandler that outputs code 299 warnings to the specified writer. +func NewWarningWriter(out io.Writer, opts WarningWriterOptions) *warningWriter { + h := &warningWriter{out: out, opts: opts} + if opts.Deduplicate { + h.written = map[string]struct{}{} + } + return h +} + +const ( + yellowColor = "\u001b[33;1m" + resetColor = "\u001b[0m" +) + +// HandleWarningHeader prints warnings with code=299 to the configured writer. +func (w *warningWriter) HandleWarningHeader(code int, agent string, message string) { + if code != 299 || len(message) == 0 { + return + } + + w.writtenLock.Lock() + defer w.writtenLock.Unlock() + + if w.opts.Deduplicate { + if _, alreadyWritten := w.written[message]; alreadyWritten { + return + } + w.written[message] = struct{}{} + } + w.writtenCount++ + + if w.opts.Color { + fmt.Fprintf(w.out, "%sWarning:%s %s\n", yellowColor, resetColor, message) + } else { + fmt.Fprintf(w.out, "Warning: %s\n", message) + } +} + +func (w *warningWriter) WarningCount() int { + w.writtenLock.Lock() + defer w.writtenLock.Unlock() + return w.writtenCount +} + +func handleWarnings(headers http.Header, handler WarningHandler) []net.WarningHeader { + if handler == nil { + handler = getDefaultWarningHandler() + } + + warnings, _ := net.ParseWarningHeaders(headers["Warning"]) + for _, warning := range warnings { + handler.HandleWarningHeader(warning.Code, warning.Agent, warning.Text) + } + return warnings +} diff --git a/vendor/k8s.io/client-go/restmapper/BUILD b/vendor/k8s.io/client-go/restmapper/BUILD index 4d3169b655a..a2301eede96 100644 --- a/vendor/k8s.io/client-go/restmapper/BUILD +++ b/vendor/k8s.io/client-go/restmapper/BUILD @@ -15,7 +15,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -37,7 +37,7 @@ go_test( "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/rest/fake:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/restmapper/discovery.go b/vendor/k8s.io/client-go/restmapper/discovery.go index f8d7080d49e..19ae95e1b5b 100644 --- a/vendor/k8s.io/client-go/restmapper/discovery.go +++ b/vendor/k8s.io/client-go/restmapper/discovery.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/discovery" - "k8s.io/klog" + "k8s.io/klog/v2" ) // APIGroupResources is an API group with a mapping of versions to diff --git a/vendor/k8s.io/client-go/restmapper/shortcut.go b/vendor/k8s.io/client-go/restmapper/shortcut.go index 6f3c9d93069..6903ec8088d 100644 --- a/vendor/k8s.io/client-go/restmapper/shortcut.go +++ b/vendor/k8s.io/client-go/restmapper/shortcut.go @@ -19,7 +19,7 @@ package restmapper import ( "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/client-go/testing/fixture.go b/vendor/k8s.io/client-go/testing/fixture.go index 54f600ad3f7..d3b937247b2 100644 --- a/vendor/k8s.io/client-go/testing/fixture.go +++ b/vendor/k8s.io/client-go/testing/fixture.go @@ -19,6 +19,7 @@ package testing import ( "fmt" "reflect" + "sort" "sync" jsonpatch "github.com/evanphx/json-patch" @@ -197,7 +198,7 @@ type tracker struct { scheme ObjectScheme decoder runtime.Decoder lock sync.RWMutex - objects map[schema.GroupVersionResource][]runtime.Object + objects map[schema.GroupVersionResource]map[types.NamespacedName]runtime.Object // The value type of watchers is a map of which the key is either a namespace or // all/non namespace aka "" and its value is list of fake watchers. // Manipulations on resources will broadcast the notification events into the @@ -214,7 +215,7 @@ func NewObjectTracker(scheme ObjectScheme, decoder runtime.Decoder) ObjectTracke return &tracker{ scheme: scheme, decoder: decoder, - objects: make(map[schema.GroupVersionResource][]runtime.Object), + objects: make(map[schema.GroupVersionResource]map[types.NamespacedName]runtime.Object), watchers: make(map[schema.GroupVersionResource]map[string][]*watch.RaceFreeFakeWatcher), } } @@ -282,31 +283,15 @@ func (t *tracker) Get(gvr schema.GroupVersionResource, ns, name string) (runtime return nil, errNotFound } - var matchingObjs []runtime.Object - for _, obj := range objs { - acc, err := meta.Accessor(obj) - if err != nil { - return nil, err - } - if acc.GetNamespace() != ns { - continue - } - if acc.GetName() != name { - continue - } - matchingObjs = append(matchingObjs, obj) - } - if len(matchingObjs) == 0 { + matchingObj, ok := objs[types.NamespacedName{Namespace: ns, Name: name}] + if !ok { return nil, errNotFound } - if len(matchingObjs) > 1 { - return nil, fmt.Errorf("more than one object matched gvr %s, ns: %q name: %q", gvr, ns, name) - } // Only one object should match in the tracker if it works // correctly, as Add/Update methods enforce kind/namespace/name // uniqueness. - obj := matchingObjs[0].DeepCopyObject() + obj := matchingObj.DeepCopyObject() if status, ok := obj.(*metav1.Status); ok { if status.Status != metav1.StatusSuccess { return nil, &errors.StatusError{ErrStatus: *status} @@ -405,21 +390,21 @@ func (t *tracker) add(gvr schema.GroupVersionResource, obj runtime.Object, ns st return errors.NewBadRequest(msg) } - for i, existingObj := range t.objects[gvr] { - oldMeta, err := meta.Accessor(existingObj) - if err != nil { - return err - } - if oldMeta.GetNamespace() == newMeta.GetNamespace() && oldMeta.GetName() == newMeta.GetName() { - if replaceExisting { - for _, w := range t.getWatches(gvr, ns) { - w.Modify(obj) - } - t.objects[gvr][i] = obj - return nil + _, ok := t.objects[gvr] + if !ok { + t.objects[gvr] = make(map[types.NamespacedName]runtime.Object) + } + + namespacedName := types.NamespacedName{Namespace: newMeta.GetNamespace(), Name: newMeta.GetName()} + if _, ok = t.objects[gvr][namespacedName]; ok { + if replaceExisting { + for _, w := range t.getWatches(gvr, ns) { + w.Modify(obj) } - return errors.NewAlreadyExists(gr, newMeta.GetName()) + t.objects[gvr][namespacedName] = obj + return nil } + return errors.NewAlreadyExists(gr, newMeta.GetName()) } if replaceExisting { @@ -427,7 +412,7 @@ func (t *tracker) add(gvr schema.GroupVersionResource, obj runtime.Object, ns st return errors.NewNotFound(gr, newMeta.GetName()) } - t.objects[gvr] = append(t.objects[gvr], obj) + t.objects[gvr][namespacedName] = obj for _, w := range t.getWatches(gvr, ns) { w.Add(obj) @@ -457,35 +442,28 @@ func (t *tracker) Delete(gvr schema.GroupVersionResource, ns, name string) error t.lock.Lock() defer t.lock.Unlock() - found := false - - for i, existingObj := range t.objects[gvr] { - objMeta, err := meta.Accessor(existingObj) - if err != nil { - return err - } - if objMeta.GetNamespace() == ns && objMeta.GetName() == name { - obj := t.objects[gvr][i] - t.objects[gvr] = append(t.objects[gvr][:i], t.objects[gvr][i+1:]...) - for _, w := range t.getWatches(gvr, ns) { - w.Delete(obj) - } - found = true - break - } + objs, ok := t.objects[gvr] + if !ok { + return errors.NewNotFound(gvr.GroupResource(), name) } - if found { - return nil + namespacedName := types.NamespacedName{Namespace: ns, Name: name} + obj, ok := objs[namespacedName] + if !ok { + return errors.NewNotFound(gvr.GroupResource(), name) } - return errors.NewNotFound(gvr.GroupResource(), name) + delete(objs, namespacedName) + for _, w := range t.getWatches(gvr, ns) { + w.Delete(obj) + } + return nil } // filterByNamespace returns all objects in the collection that // match provided namespace. Empty namespace matches // non-namespaced objects. -func filterByNamespace(objs []runtime.Object, ns string) ([]runtime.Object, error) { +func filterByNamespace(objs map[types.NamespacedName]runtime.Object, ns string) ([]runtime.Object, error) { var res []runtime.Object for _, obj := range objs { @@ -499,6 +477,15 @@ func filterByNamespace(objs []runtime.Object, ns string) ([]runtime.Object, erro res = append(res, obj) } + // Sort res to get deterministic order. + sort.Slice(res, func(i, j int) bool { + acc1, _ := meta.Accessor(res[i]) + acc2, _ := meta.Accessor(res[j]) + if acc1.GetNamespace() != acc2.GetNamespace() { + return acc1.GetNamespace() < acc2.GetNamespace() + } + return acc1.GetName() < acc2.GetName() + }) return res, nil } diff --git a/vendor/k8s.io/client-go/tools/cache/BUILD b/vendor/k8s.io/client-go/tools/cache/BUILD index e4820b9d5c6..ec3fc196826 100644 --- a/vendor/k8s.io/client-go/tools/cache/BUILD +++ b/vendor/k8s.io/client-go/tools/cache/BUILD @@ -88,7 +88,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/pager:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/buffer:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", ], diff --git a/vendor/k8s.io/client-go/tools/cache/OWNERS b/vendor/k8s.io/client-go/tools/cache/OWNERS index bd61bc76660..7bbe635426a 100644 --- a/vendor/k8s.io/client-go/tools/cache/OWNERS +++ b/vendor/k8s.io/client-go/tools/cache/OWNERS @@ -26,7 +26,6 @@ reviewers: - pmorie - janetkuo - justinsb -- eparis - soltysh - jsafrane - dims @@ -38,7 +37,6 @@ reviewers: - ingvagabund - resouer - jessfraz -- david-mcmahon - mfojtik - mqliang - sdminonne diff --git a/vendor/k8s.io/client-go/tools/cache/controller.go b/vendor/k8s.io/client-go/tools/cache/controller.go index 5d582119392..916ca9cc118 100644 --- a/vendor/k8s.io/client-go/tools/cache/controller.go +++ b/vendor/k8s.io/client-go/tools/cache/controller.go @@ -69,6 +69,9 @@ type Config struct { // question to this interface as a parameter. This is probably moot // now that this functionality appears at a higher level. RetryOnError bool + + // Called whenever the ListAndWatch drops the connection with an error. + WatchErrorHandler WatchErrorHandler } // ShouldResyncFunc is a type of function that indicates if a reflector should perform a @@ -132,6 +135,9 @@ func (c *controller) Run(stopCh <-chan struct{}) { ) r.ShouldResync = c.config.ShouldResync r.clock = c.clock + if c.config.WatchErrorHandler != nil { + r.watchErrorHandler = c.config.WatchErrorHandler + } c.reflectorMutex.Lock() c.reflector = r @@ -183,9 +189,11 @@ func (c *controller) processLoop() { } } -// ResourceEventHandler can handle notifications for events that happen to a -// resource. The events are informational only, so you can't return an -// error. +// ResourceEventHandler can handle notifications for events that +// happen to a resource. The events are informational only, so you +// can't return an error. The handlers MUST NOT modify the objects +// received; this concerns not only the top level of structure but all +// the data structures reachable from it. // * OnAdd is called when an object is added. // * OnUpdate is called when an object is modified. Note that oldObj is the // last known state of the object-- it is possible that several changes @@ -205,7 +213,8 @@ type ResourceEventHandler interface { // ResourceEventHandlerFuncs is an adaptor to let you easily specify as many or // as few of the notification functions as you want while still implementing -// ResourceEventHandler. +// ResourceEventHandler. This adapter does not remove the prohibition against +// modifying the objects. type ResourceEventHandlerFuncs struct { AddFunc func(obj interface{}) UpdateFunc func(oldObj, newObj interface{}) @@ -237,6 +246,7 @@ func (r ResourceEventHandlerFuncs) OnDelete(obj interface{}) { // in, ensuring the appropriate nested handler method is invoked. An object // that starts passing the filter after an update is considered an add, and an // object that stops passing the filter after an update is considered a delete. +// Like the handlers, the filter MUST NOT modify the objects it is given. type FilteringResourceEventHandler struct { FilterFunc func(obj interface{}) bool Handler ResourceEventHandler diff --git a/vendor/k8s.io/client-go/tools/cache/delta_fifo.go b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go index 40b6022c096..2774f4f2112 100644 --- a/vendor/k8s.io/client-go/tools/cache/delta_fifo.go +++ b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/klog" + "k8s.io/klog/v2" ) // NewDeltaFIFO returns a Queue which can be used to process changes to items. @@ -41,7 +41,7 @@ import ( // affects error retrying. // NOTE: It is possible to misuse this and cause a race when using an // external known object source. -// Whether there is a potential race depends on how the comsumer +// Whether there is a potential race depends on how the consumer // modifies knownObjects. In Pop(), process function is called under // lock, so it is safe to update data structures in it that need to be // in sync with the queue (e.g. knownObjects). @@ -99,7 +99,7 @@ type DeltaFIFOOptions struct { EmitDeltaTypeReplaced bool } -// NewDeltaFIFOWithOptions returns a Store which can be used process changes to +// NewDeltaFIFOWithOptions returns a Queue which can be used to process changes to // items. See also the comment on DeltaFIFO. func NewDeltaFIFOWithOptions(opts DeltaFIFOOptions) *DeltaFIFO { if opts.KeyFunction == nil { @@ -144,7 +144,8 @@ func NewDeltaFIFOWithOptions(opts DeltaFIFOOptions) *DeltaFIFO { // // DeltaFIFO's Pop(), Get(), and GetByKey() methods return // interface{} to satisfy the Store/Queue interfaces, but they -// will always return an object of type Deltas. +// will always return an object of type Deltas. List() returns +// the newest objects currently in the FIFO. // // A DeltaFIFO's knownObjects KeyListerGetter provides the abilities // to list Store keys and to get objects by Store key. The objects in @@ -160,14 +161,16 @@ type DeltaFIFO struct { lock sync.RWMutex cond sync.Cond - // We depend on the property that items in the set are in - // the queue and vice versa, and that all Deltas in this - // map have at least one Delta. + // `items` maps keys to Deltas. + // `queue` maintains FIFO order of keys for consumption in Pop(). + // We maintain the property that keys in the `items` and `queue` are + // strictly 1:1 mapping, and that all Deltas in `items` should have + // at least one Delta. items map[string]Deltas queue []string // populated is true if the first batch of items inserted by Replace() has been populated - // or Delete/Add/Update was called first. + // or Delete/Add/Update/AddIfNotPresent was called first. populated bool // initialPopulationCount is the number of items inserted by the first call of Replace() initialPopulationCount int @@ -180,11 +183,9 @@ type DeltaFIFO struct { // Replace(), and Resync() knownObjects KeyListerGetter - // Indication the queue is closed. // Used to indicate a queue is closed so a control loop can exit when a queue is empty. // Currently, not used to gate any of CRED operations. - closed bool - closedLock sync.Mutex + closed bool // emitDeltaTypeReplaced is whether to emit the Replaced or Sync // DeltaType when Replace() is called (to preserve backwards compat). @@ -204,8 +205,8 @@ var ( // Close the queue. func (f *DeltaFIFO) Close() { - f.closedLock.Lock() - defer f.closedLock.Unlock() + f.lock.Lock() + defer f.lock.Unlock() f.closed = true f.cond.Broadcast() } @@ -226,7 +227,7 @@ func (f *DeltaFIFO) KeyOf(obj interface{}) (string, error) { } // HasSynced returns true if an Add/Update/Delete/AddIfNotPresent are called first, -// or an Update called first but the first batch of items inserted by Replace() has been popped +// or the first batch of items inserted by Replace() has been popped. func (f *DeltaFIFO) HasSynced() bool { f.lock.Lock() defer f.lock.Unlock() @@ -283,6 +284,7 @@ func (f *DeltaFIFO) Delete(obj interface{}) error { } } + // exist in items and/or KnownObjects return f.queueActionLocked(Deleted, obj) } @@ -333,6 +335,11 @@ func dedupDeltas(deltas Deltas) Deltas { a := &deltas[n-1] b := &deltas[n-2] if out := isDup(a, b); out != nil { + // `a` and `b` are duplicates. Only keep the one returned from isDup(). + // TODO: This extra array allocation and copy seems unnecessary if + // all we do to dedup is compare the new delta with the last element + // in `items`, which could be done by mutating `items` directly. + // Might be worth profiling and investigating if it is safe to optimize. d := append(Deltas{}, deltas[:n-2]...) return append(d, *out) } @@ -447,8 +454,8 @@ func (f *DeltaFIFO) GetByKey(key string) (item interface{}, exists bool, err err // IsClosed checks if the queue is closed func (f *DeltaFIFO) IsClosed() bool { - f.closedLock.Lock() - defer f.closedLock.Unlock() + f.lock.Lock() + defer f.lock.Unlock() return f.closed } @@ -457,10 +464,12 @@ func (f *DeltaFIFO) IsClosed() bool { // added/updated. The item is removed from the queue (and the store) before it // is returned, so if you don't successfully process it, you need to add it back // with AddIfNotPresent(). -// process function is called under lock, so it is safe update data structures +// process function is called under lock, so it is safe to update data structures // in it that need to be in sync with the queue (e.g. knownKeys). The PopProcessFunc // may return an instance of ErrRequeue with a nested error to indicate the current // item should be requeued (equivalent to calling AddIfNotPresent under the lock). +// process should avoid expensive I/O operation so that other queue operations, i.e. +// Add() and Get(), won't be blocked for too long. // // Pop returns a 'Deltas', which has a complete list of all the things // that happened to the object (deltas) while it was sitting in the queue. @@ -472,7 +481,7 @@ func (f *DeltaFIFO) Pop(process PopProcessFunc) (interface{}, error) { // When the queue is empty, invocation of Pop() is blocked until new item is enqueued. // When Close() is called, the f.closed is set and the condition is broadcasted. // Which causes this loop to continue and return from the Pop(). - if f.IsClosed() { + if f.closed { return nil, ErrFIFOClosed } @@ -521,6 +530,7 @@ func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error { action = Replaced } + // Add Sync/Replaced action for each new item. for _, item := range list { key, err := f.KeyOf(item) if err != nil { @@ -539,6 +549,9 @@ func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error { if keys.Has(k) { continue } + // Delete pre-existing items not in the new list. + // This could happen if watch deletion event was missed while + // disconnected from apiserver. var deletedObj interface{} if n := oldItem.Newest(); n != nil { deletedObj = n.Object @@ -650,7 +663,8 @@ type KeyLister interface { // A KeyGetter is anything that knows how to get the value stored under a given key. type KeyGetter interface { - GetByKey(key string) (interface{}, bool, error) + // GetByKey returns the value associated with the key, or sets exists=false. + GetByKey(key string) (value interface{}, exists bool, err error) } // DeltaType is the type of a change (addition, deletion, etc) @@ -713,10 +727,10 @@ func copyDeltas(d Deltas) Deltas { return d2 } -// DeletedFinalStateUnknown is placed into a DeltaFIFO in the case where -// an object was deleted but the watch deletion event was missed. In this -// case we don't know the final "resting" state of the object, so there's -// a chance the included `Obj` is stale. +// DeletedFinalStateUnknown is placed into a DeltaFIFO in the case where an object +// was deleted but the watch deletion event was missed while disconnected from +// apiserver. In this case we don't know the final "resting" state of the object, so +// there's a chance the included `Obj` is stale. type DeletedFinalStateUnknown struct { Key string Obj interface{} diff --git a/vendor/k8s.io/client-go/tools/cache/expiration_cache.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache.go index e687593f61e..dfa95619309 100644 --- a/vendor/k8s.io/client-go/tools/cache/expiration_cache.go +++ b/vendor/k8s.io/client-go/tools/cache/expiration_cache.go @@ -21,7 +21,7 @@ import ( "time" "k8s.io/apimachinery/pkg/util/clock" - "k8s.io/klog" + "k8s.io/klog/v2" ) // ExpirationCache implements the store interface diff --git a/vendor/k8s.io/client-go/tools/cache/fifo.go b/vendor/k8s.io/client-go/tools/cache/fifo.go index 67bb1cba858..edb2c8ed6c4 100644 --- a/vendor/k8s.io/client-go/tools/cache/fifo.go +++ b/vendor/k8s.io/client-go/tools/cache/fifo.go @@ -71,8 +71,8 @@ type Queue interface { // HasSynced returns true if the first batch of keys have all been // popped. The first batch of keys are those of the first Replace - // operation if that happened before any Add, Update, or Delete; - // otherwise the first batch is empty. + // operation if that happened before any Add, AddIfNotPresent, + // Update, or Delete; otherwise the first batch is empty. HasSynced() bool // Close the queue @@ -128,8 +128,7 @@ type FIFO struct { // Indication the queue is closed. // Used to indicate a queue is closed so a control loop can exit when a queue is empty. // Currently, not used to gate any of CRED operations. - closed bool - closedLock sync.Mutex + closed bool } var ( @@ -138,14 +137,14 @@ var ( // Close the queue. func (f *FIFO) Close() { - f.closedLock.Lock() - defer f.closedLock.Unlock() + f.lock.Lock() + defer f.lock.Unlock() f.closed = true f.cond.Broadcast() } // HasSynced returns true if an Add/Update/Delete/AddIfNotPresent are called first, -// or an Update called first but the first batch of items inserted by Replace() has been popped +// or the first batch of items inserted by Replace() has been popped. func (f *FIFO) HasSynced() bool { f.lock.Lock() defer f.lock.Unlock() @@ -262,8 +261,8 @@ func (f *FIFO) GetByKey(key string) (item interface{}, exists bool, err error) { // IsClosed checks if the queue is closed func (f *FIFO) IsClosed() bool { - f.closedLock.Lock() - defer f.closedLock.Unlock() + f.lock.Lock() + defer f.lock.Unlock() if f.closed { return true } @@ -284,7 +283,7 @@ func (f *FIFO) Pop(process PopProcessFunc) (interface{}, error) { // When the queue is empty, invocation of Pop() is blocked until new item is enqueued. // When Close() is called, the f.closed is set and the condition is broadcasted. // Which causes this loop to continue and return from the Pop(). - if f.IsClosed() { + if f.closed { return nil, ErrFIFOClosed } diff --git a/vendor/k8s.io/client-go/tools/cache/listers.go b/vendor/k8s.io/client-go/tools/cache/listers.go index d649cd735e2..7885d2f760b 100644 --- a/vendor/k8s.io/client-go/tools/cache/listers.go +++ b/vendor/k8s.io/client-go/tools/cache/listers.go @@ -17,7 +17,7 @@ limitations under the License. package cache import ( - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_cache.go b/vendor/k8s.io/client-go/tools/cache/mutation_cache.go index 5d3245a600c..c6f953d8e0e 100644 --- a/vendor/k8s.io/client-go/tools/cache/mutation_cache.go +++ b/vendor/k8s.io/client-go/tools/cache/mutation_cache.go @@ -22,7 +22,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_detector.go b/vendor/k8s.io/client-go/tools/cache/mutation_detector.go index bbec7d062c3..4611e80ff0a 100644 --- a/vendor/k8s.io/client-go/tools/cache/mutation_detector.go +++ b/vendor/k8s.io/client-go/tools/cache/mutation_detector.go @@ -24,7 +24,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" diff --git a/vendor/k8s.io/client-go/tools/cache/reflector.go b/vendor/k8s.io/client-go/tools/cache/reflector.go index 58f871f5190..a92b36f2c7b 100644 --- a/vendor/k8s.io/client-go/tools/cache/reflector.go +++ b/vendor/k8s.io/client-go/tools/cache/reflector.go @@ -39,7 +39,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/tools/pager" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/trace" ) @@ -95,6 +95,37 @@ type Reflector struct { // etcd, which is significantly less efficient and may lead to serious performance and // scalability problems. WatchListPageSize int64 + // Called whenever the ListAndWatch drops the connection with an error. + watchErrorHandler WatchErrorHandler +} + +// The WatchErrorHandler is called whenever ListAndWatch drops the +// connection with an error. After calling this handler, the informer +// will backoff and retry. +// +// The default implementation looks at the error type and tries to log +// the error message at an appropriate level. +// +// Implementations of this handler may display the error message in other +// ways. Implementations should return quickly - any expensive processing +// should be offloaded. +type WatchErrorHandler func(r *Reflector, err error) + +// DefaultWatchErrorHandler is the default implementation of WatchErrorHandler +func DefaultWatchErrorHandler(r *Reflector, err error) { + switch { + case isExpiredError(err): + // Don't set LastSyncResourceVersionUnavailable - LIST call with ResourceVersion=RV already + // has a semantic that it returns data at least as fresh as provided RV. + // So first try to LIST with setting RV to resource version of last observed object. + klog.V(4).Infof("%s: watch of %v closed with: %v", r.name, r.expectedTypeName, err) + case err == io.EOF: + // watch closed normally + case err == io.ErrUnexpectedEOF: + klog.V(1).Infof("%s: Watch for %v closed with unexpected EOF: %v", r.name, r.expectedTypeName, err) + default: + utilruntime.HandleError(fmt.Errorf("%s: Failed to watch %v: %v", r.name, r.expectedTypeName, err)) + } } var ( @@ -135,9 +166,10 @@ func NewNamedReflector(name string, lw ListerWatcher, expectedType interface{}, // We used to make the call every 1sec (1 QPS), the goal here is to achieve ~98% traffic reduction when // API server is not healthy. With these parameters, backoff will stop at [30,60) sec interval which is // 0.22 QPS. If we don't backoff for 2min, assume API server is healthy and we reset the backoff. - backoffManager: wait.NewExponentialBackoffManager(800*time.Millisecond, 30*time.Second, 2*time.Minute, 2.0, 1.0, realClock), - resyncPeriod: resyncPeriod, - clock: realClock, + backoffManager: wait.NewExponentialBackoffManager(800*time.Millisecond, 30*time.Second, 2*time.Minute, 2.0, 1.0, realClock), + resyncPeriod: resyncPeriod, + clock: realClock, + watchErrorHandler: WatchErrorHandler(DefaultWatchErrorHandler), } r.setExpectedType(expectedType) return r @@ -175,7 +207,7 @@ func (r *Reflector) Run(stopCh <-chan struct{}) { klog.V(2).Infof("Starting reflector %s (%s) from %s", r.expectedTypeName, r.resyncPeriod, r.name) wait.BackoffUntil(func() { if err := r.ListAndWatch(stopCh); err != nil { - utilruntime.HandleError(err) + r.watchErrorHandler(r, err) } }, r.backoffManager, true, stopCh) klog.V(2).Infof("Stopping reflector %s (%s) from %s", r.expectedTypeName, r.resyncPeriod, r.name) @@ -276,7 +308,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { case <-listCh: } if err != nil { - return fmt.Errorf("%s: Failed to list %v: %v", r.name, r.expectedTypeName, err) + return fmt.Errorf("failed to list %v: %v", r.expectedTypeName, err) } // We check if the list was paginated and if so set the paginatedResult based on that. @@ -297,17 +329,17 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { initTrace.Step("Objects listed") listMetaInterface, err := meta.ListAccessor(list) if err != nil { - return fmt.Errorf("%s: Unable to understand list result %#v: %v", r.name, list, err) + return fmt.Errorf("unable to understand list result %#v: %v", list, err) } resourceVersion = listMetaInterface.GetResourceVersion() initTrace.Step("Resource version extracted") items, err := meta.ExtractList(list) if err != nil { - return fmt.Errorf("%s: Unable to understand list result %#v (%v)", r.name, list, err) + return fmt.Errorf("unable to understand list result %#v (%v)", list, err) } initTrace.Step("Objects extracted") if err := r.syncWith(items, resourceVersion); err != nil { - return fmt.Errorf("%s: Unable to sync list result: %v", r.name, err) + return fmt.Errorf("unable to sync list result: %v", err) } initTrace.Step("SyncWith done") r.setLastSyncResourceVersion(resourceVersion) @@ -369,19 +401,6 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { start := r.clock.Now() w, err := r.listerWatcher.Watch(options) if err != nil { - switch { - case isExpiredError(err): - // Don't set LastSyncResourceVersionExpired - LIST call with ResourceVersion=RV already - // has a semantic that it returns data at least as fresh as provided RV. - // So first try to LIST with setting RV to resource version of last observed object. - klog.V(4).Infof("%s: watch of %v closed with: %v", r.name, r.expectedTypeName, err) - case err == io.EOF: - // watch closed normally - case err == io.ErrUnexpectedEOF: - klog.V(1).Infof("%s: Watch for %v closed with unexpected EOF: %v", r.name, r.expectedTypeName, err) - default: - utilruntime.HandleError(fmt.Errorf("%s: Failed to watch %v: %v", r.name, r.expectedTypeName, err)) - } // If this is "connection refused" error, it means that most likely apiserver is not responsive. // It doesn't make sense to re-list all objects because most likely we will be able to restart // watch where we ended. @@ -390,7 +409,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { time.Sleep(time.Second) continue } - return nil + return err } if err := r.watchHandler(start, w, &resourceVersion, resyncerrc, stopCh); err != nil { diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go index df8c67dce41..f4898976303 100644 --- a/vendor/k8s.io/client-go/tools/cache/shared_informer.go +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -28,35 +28,37 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/utils/buffer" - "k8s.io/klog" + "k8s.io/klog/v2" ) // SharedInformer provides eventually consistent linkage of its // clients to the authoritative state of a given collection of // objects. An object is identified by its API group, kind/resource, -// namespace, and name; the `ObjectMeta.UID` is not part of an -// object's ID as far as this contract is concerned. One +// namespace (if any), and name; the `ObjectMeta.UID` is not part of +// an object's ID as far as this contract is concerned. One // SharedInformer provides linkage to objects of a particular API // group and kind/resource. The linked object collection of a -// SharedInformer may be further restricted to one namespace and/or by -// label selector and/or field selector. +// SharedInformer may be further restricted to one namespace (if +// applicable) and/or by label selector and/or field selector. // // The authoritative state of an object is what apiservers provide // access to, and an object goes through a strict sequence of states. -// An object state is either "absent" or present with a -// ResourceVersion and other appropriate content. +// An object state is either (1) present with a ResourceVersion and +// other appropriate content or (2) "absent". // -// A SharedInformer maintains a local cache, exposed by GetStore() and -// by GetIndexer() in the case of an indexed informer, of the state of -// each relevant object. This cache is eventually consistent with the -// authoritative state. This means that, unless prevented by -// persistent communication problems, if ever a particular object ID X -// is authoritatively associated with a state S then for every -// SharedInformer I whose collection includes (X, S) eventually either -// (1) I's cache associates X with S or a later state of X, (2) I is -// stopped, or (3) the authoritative state service for X terminates. -// To be formally complete, we say that the absent state meets any -// restriction by label selector or field selector. +// A SharedInformer maintains a local cache --- exposed by GetStore(), +// by GetIndexer() in the case of an indexed informer, and possibly by +// machinery involved in creating and/or accessing the informer --- of +// the state of each relevant object. This cache is eventually +// consistent with the authoritative state. This means that, unless +// prevented by persistent communication problems, if ever a +// particular object ID X is authoritatively associated with a state S +// then for every SharedInformer I whose collection includes (X, S) +// eventually either (1) I's cache associates X with S or a later +// state of X, (2) I is stopped, or (3) the authoritative state +// service for X terminates. To be formally complete, we say that the +// absent state meets any restriction by label selector or field +// selector. // // For a given informer and relevant object ID X, the sequence of // states that appears in the informer's cache is a subsequence of the @@ -98,7 +100,7 @@ import ( // added before `Run()`, eventually either the SharedInformer is // stopped or the client is notified of the update. A client added // after `Run()` starts gets a startup batch of notifications of -// additions of the object existing in the cache at the time that +// additions of the objects existing in the cache at the time that // client was added; also, for every update to the SharedInformer's // local cache after that client was added, eventually either the // SharedInformer is stopped or that client is notified of that @@ -163,6 +165,21 @@ type SharedInformer interface { // store. The value returned is not synchronized with access to the underlying store and is not // thread-safe. LastSyncResourceVersion() string + + // The WatchErrorHandler is called whenever ListAndWatch drops the + // connection with an error. After calling this handler, the informer + // will backoff and retry. + // + // The default implementation looks at the error type and tries to log + // the error message at an appropriate level. + // + // There's only one handler, so if you call this multiple times, last one + // wins; calling after the informer has been started returns an error. + // + // The handler is intended for visibility, not to e.g. pause the consumers. + // The handler should return quickly - any expensive processing should be + // offloaded. + SetWatchErrorHandler(handler WatchErrorHandler) error } // SharedIndexInformer provides add and get Indexers ability based on SharedInformer. @@ -298,6 +315,9 @@ type sharedIndexInformer struct { // blockDeltas gives a way to stop all event distribution so that a late event handler // can safely join the shared informer. blockDeltas sync.Mutex + + // Called whenever the ListAndWatch drops the connection with an error. + watchErrorHandler WatchErrorHandler } // dummyController hides the fact that a SharedInformer is different from a dedicated one @@ -333,6 +353,18 @@ type deleteNotification struct { oldObj interface{} } +func (s *sharedIndexInformer) SetWatchErrorHandler(handler WatchErrorHandler) error { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.started { + return fmt.Errorf("informer has already started") + } + + s.watchErrorHandler = handler + return nil +} + func (s *sharedIndexInformer) Run(stopCh <-chan struct{}) { defer utilruntime.HandleCrash() @@ -349,7 +381,8 @@ func (s *sharedIndexInformer) Run(stopCh <-chan struct{}) { RetryOnError: false, ShouldResync: s.processor.shouldResync, - Process: s.HandleDeltas, + Process: s.HandleDeltas, + WatchErrorHandler: s.watchErrorHandler, } func() { diff --git a/vendor/k8s.io/client-go/tools/clientcmd/BUILD b/vendor/k8s.io/client-go/tools/clientcmd/BUILD index 3a763a0d5b9..0225ea68337 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/BUILD +++ b/vendor/k8s.io/client-go/tools/clientcmd/BUILD @@ -58,7 +58,7 @@ go_library( "//vendor/github.com/imdario/mergo:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go b/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go index 65a36936b57..d677d6519be 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go @@ -98,6 +98,9 @@ func ShortenConfig(config *Config) { if len(authInfo.ClientCertificateData) > 0 { authInfo.ClientCertificateData = redactedBytes } + if len(authInfo.Token) > 0 { + authInfo.Token = "REDACTED" + } config.AuthInfos[key] = authInfo } for key, cluster := range config.Clusters { diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/types.go b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go index 44317dd019a..829424dcf3f 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/types.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go @@ -82,6 +82,17 @@ type Cluster struct { // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority // +optional CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"` + // ProxyURL is the URL to the proxy to be used for all requests made by this + // client. URLs with "http", "https", and "socks5" schemes are supported. If + // this configuration is not provided or the empty string, the client + // attempts to construct a proxy configuration from http_proxy and + // https_proxy environment variables. If these environment variables are not + // set, the client does not attempt to proxy requests. + // + // socks5 proxying does not currently support spdy streaming endpoints (exec, + // attach, port forward). + // +optional + ProxyURL string `json:"proxy-url,omitempty"` // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields // +optional Extensions map[string]runtime.Object `json:"extensions,omitempty"` @@ -182,7 +193,7 @@ func (c AuthProviderConfig) String() string { // ExecConfig specifies a command to provide client credentials. The command is exec'd // and outputs structured stdout holding credentials. // -// See the client.authentiction.k8s.io API group for specifications of the exact input +// See the client.authentication.k8s.io API group for specifications of the exact input // and output format type ExecConfig struct { // Command to execute. @@ -199,6 +210,11 @@ type ExecConfig struct { // Preferred input version of the ExecInfo. The returned ExecCredentials MUST use // the same encoding version as the input. APIVersion string `json:"apiVersion,omitempty"` + + // This text is shown to the user when the executable doesn't seem to be + // present. For example, `brew install foo-cli` might be a good InstallHint for + // foo-cli on Mac OS systems. + InstallHint string `json:"installHint,omitempty"` } var _ fmt.Stringer = new(ExecConfig) diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go index 8ccacd3f879..0395f860f36 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go @@ -75,6 +75,17 @@ type Cluster struct { // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority // +optional CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"` + // ProxyURL is the URL to the proxy to be used for all requests made by this + // client. URLs with "http", "https", and "socks5" schemes are supported. If + // this configuration is not provided or the empty string, the client + // attempts to construct a proxy configuration from http_proxy and + // https_proxy environment variables. If these environment variables are not + // set, the client does not attempt to proxy requests. + // + // socks5 proxying does not currently support spdy streaming endpoints (exec, + // attach, port forward). + // +optional + ProxyURL string `json:"proxy-url,omitempty"` // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields // +optional Extensions []NamedExtension `json:"extensions,omitempty"` @@ -181,7 +192,7 @@ type AuthProviderConfig struct { // ExecConfig specifies a command to provide client credentials. The command is exec'd // and outputs structured stdout holding credentials. // -// See the client.authentiction.k8s.io API group for specifications of the exact input +// See the client.authentication.k8s.io API group for specifications of the exact input // and output format type ExecConfig struct { // Command to execute. @@ -198,6 +209,11 @@ type ExecConfig struct { // Preferred input version of the ExecInfo. The returned ExecCredentials MUST use // the same encoding version as the input. APIVersion string `json:"apiVersion,omitempty"` + + // This text is shown to the user when the executable doesn't seem to be + // present. For example, `brew install foo-cli` might be a good InstallHint for + // foo-cli on Mac OS systems. + InstallHint string `json:"installHint,omitempty"` } // ExecEnvVar is used for setting environment variables when executing an exec-based diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go index 8f3631e151b..bf9eaeca322 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go @@ -237,6 +237,7 @@ func autoConvert_v1_Cluster_To_api_Cluster(in *Cluster, out *api.Cluster, s conv out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify out.CertificateAuthority = in.CertificateAuthority out.CertificateAuthorityData = *(*[]byte)(unsafe.Pointer(&in.CertificateAuthorityData)) + out.ProxyURL = in.ProxyURL if err := Convert_Slice_v1_NamedExtension_To_Map_string_To_runtime_Object(&in.Extensions, &out.Extensions, s); err != nil { return err } @@ -255,6 +256,7 @@ func autoConvert_api_Cluster_To_v1_Cluster(in *api.Cluster, out *Cluster, s conv out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify out.CertificateAuthority = in.CertificateAuthority out.CertificateAuthorityData = *(*[]byte)(unsafe.Pointer(&in.CertificateAuthorityData)) + out.ProxyURL = in.ProxyURL if err := Convert_Map_string_To_runtime_Object_To_Slice_v1_NamedExtension(&in.Extensions, &out.Extensions, s); err != nil { return err } @@ -356,6 +358,7 @@ func autoConvert_v1_ExecConfig_To_api_ExecConfig(in *ExecConfig, out *api.ExecCo out.Args = *(*[]string)(unsafe.Pointer(&in.Args)) out.Env = *(*[]api.ExecEnvVar)(unsafe.Pointer(&in.Env)) out.APIVersion = in.APIVersion + out.InstallHint = in.InstallHint return nil } @@ -369,6 +372,7 @@ func autoConvert_api_ExecConfig_To_v1_ExecConfig(in *api.ExecConfig, out *ExecCo out.Args = *(*[]string)(unsafe.Pointer(&in.Args)) out.Env = *(*[]ExecEnvVar)(unsafe.Pointer(&in.Env)) out.APIVersion = in.APIVersion + out.InstallHint = in.InstallHint return nil } diff --git a/vendor/k8s.io/client-go/tools/clientcmd/client_config.go b/vendor/k8s.io/client-go/tools/clientcmd/client_config.go index a9806384aab..690afce0cd6 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/client_config.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/client_config.go @@ -20,16 +20,18 @@ import ( "fmt" "io" "io/ioutil" + "net/http" "net/url" "os" "strings" - - "github.com/imdario/mergo" - "k8s.io/klog" + "unicode" restclient "k8s.io/client-go/rest" clientauth "k8s.io/client-go/tools/auth" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/klog/v2" + + "github.com/imdario/mergo" ) var ( @@ -150,8 +152,15 @@ func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) { clientConfig := &restclient.Config{} clientConfig.Host = configClusterInfo.Server + if configClusterInfo.ProxyURL != "" { + u, err := parseProxyURL(configClusterInfo.ProxyURL) + if err != nil { + return nil, err + } + clientConfig.Proxy = http.ProxyURL(u) + } - if len(config.overrides.Timeout) > 0 { + if config.overrides != nil && len(config.overrides.Timeout) > 0 { timeout, err := ParseTimeout(config.overrides.Timeout) if err != nil { return nil, err @@ -261,6 +270,7 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI } if configAuthInfo.Exec != nil { mergedConfig.ExecProvider = configAuthInfo.Exec + mergedConfig.ExecProvider.InstallHint = cleanANSIEscapeCodes(mergedConfig.ExecProvider.InstallHint) } // if there still isn't enough information to authenticate the user, try prompting @@ -306,6 +316,41 @@ func canIdentifyUser(config restclient.Config) bool { config.ExecProvider != nil } +// cleanANSIEscapeCodes takes an arbitrary string and ensures that there are no +// ANSI escape sequences that could put the terminal in a weird state (e.g., +// "\e[1m" bolds text) +func cleanANSIEscapeCodes(s string) string { + // spaceControlCharacters includes tab, new line, vertical tab, new page, and + // carriage return. These are in the unicode.Cc category, but that category also + // contains ESC (U+001B) which we don't want. + spaceControlCharacters := unicode.RangeTable{ + R16: []unicode.Range16{ + {Lo: 0x0009, Hi: 0x000D, Stride: 1}, + }, + } + + // Why not make this deny-only (instead of allow-only)? Because unicode.C + // contains newline and tab characters that we want. + allowedRanges := []*unicode.RangeTable{ + unicode.L, + unicode.M, + unicode.N, + unicode.P, + unicode.S, + unicode.Z, + &spaceControlCharacters, + } + builder := strings.Builder{} + for _, roon := range s { + if unicode.IsOneOf(allowedRanges, roon) { + builder.WriteRune(roon) // returns nil error, per go doc + } else { + fmt.Fprintf(&builder, "%U", roon) + } + } + return builder.String() +} + // Namespace implements ClientConfig func (config *DirectClientConfig) Namespace() (string, bool, error) { if config.overrides != nil && config.overrides.Context.Namespace != "" { @@ -373,7 +418,7 @@ func (config *DirectClientConfig) ConfirmUsable() error { // getContextName returns the default, or user-set context name, and a boolean that indicates // whether the default context name has been overwritten by a user-set flag, or left as its default value func (config *DirectClientConfig) getContextName() (string, bool) { - if len(config.overrides.CurrentContext) != 0 { + if config.overrides != nil && len(config.overrides.CurrentContext) != 0 { return config.overrides.CurrentContext, true } if len(config.contextName) != 0 { @@ -387,7 +432,7 @@ func (config *DirectClientConfig) getContextName() (string, bool) { // and a boolean indicating whether the default authInfo name is overwritten by a user-set flag, or // left as its default value func (config *DirectClientConfig) getAuthInfoName() (string, bool) { - if len(config.overrides.Context.AuthInfo) != 0 { + if config.overrides != nil && len(config.overrides.Context.AuthInfo) != 0 { return config.overrides.Context.AuthInfo, true } context, _ := config.getContext() @@ -398,7 +443,7 @@ func (config *DirectClientConfig) getAuthInfoName() (string, bool) { // indicating whether the default clusterName has been overwritten by a user-set flag, or left as // its default value func (config *DirectClientConfig) getClusterName() (string, bool) { - if len(config.overrides.Context.Cluster) != 0 { + if config.overrides != nil && len(config.overrides.Context.Cluster) != 0 { return config.overrides.Context.Cluster, true } context, _ := config.getContext() @@ -416,7 +461,9 @@ func (config *DirectClientConfig) getContext() (clientcmdapi.Context, error) { } else if required { return clientcmdapi.Context{}, fmt.Errorf("context %q does not exist", contextName) } - mergo.MergeWithOverwrite(mergedContext, config.overrides.Context) + if config.overrides != nil { + mergo.MergeWithOverwrite(mergedContext, config.overrides.Context) + } return *mergedContext, nil } @@ -432,7 +479,9 @@ func (config *DirectClientConfig) getAuthInfo() (clientcmdapi.AuthInfo, error) { } else if required { return clientcmdapi.AuthInfo{}, fmt.Errorf("auth info %q does not exist", authInfoName) } - mergo.MergeWithOverwrite(mergedAuthInfo, config.overrides.AuthInfo) + if config.overrides != nil { + mergo.MergeWithOverwrite(mergedAuthInfo, config.overrides.AuthInfo) + } return *mergedAuthInfo, nil } @@ -443,30 +492,37 @@ func (config *DirectClientConfig) getCluster() (clientcmdapi.Cluster, error) { clusterInfoName, required := config.getClusterName() mergedClusterInfo := clientcmdapi.NewCluster() - mergo.MergeWithOverwrite(mergedClusterInfo, config.overrides.ClusterDefaults) + if config.overrides != nil { + mergo.MergeWithOverwrite(mergedClusterInfo, config.overrides.ClusterDefaults) + } if configClusterInfo, exists := clusterInfos[clusterInfoName]; exists { mergo.MergeWithOverwrite(mergedClusterInfo, configClusterInfo) } else if required { return clientcmdapi.Cluster{}, fmt.Errorf("cluster %q does not exist", clusterInfoName) } - mergo.MergeWithOverwrite(mergedClusterInfo, config.overrides.ClusterInfo) + if config.overrides != nil { + mergo.MergeWithOverwrite(mergedClusterInfo, config.overrides.ClusterInfo) + } + // * An override of --insecure-skip-tls-verify=true and no accompanying CA/CA data should clear already-set CA/CA data // otherwise, a kubeconfig containing a CA reference would return an error that "CA and insecure-skip-tls-verify couldn't both be set". // * An override of --certificate-authority should also override TLS skip settings and CA data, otherwise existing CA data will take precedence. - caLen := len(config.overrides.ClusterInfo.CertificateAuthority) - caDataLen := len(config.overrides.ClusterInfo.CertificateAuthorityData) - if config.overrides.ClusterInfo.InsecureSkipTLSVerify || caLen > 0 || caDataLen > 0 { - mergedClusterInfo.InsecureSkipTLSVerify = config.overrides.ClusterInfo.InsecureSkipTLSVerify - mergedClusterInfo.CertificateAuthority = config.overrides.ClusterInfo.CertificateAuthority - mergedClusterInfo.CertificateAuthorityData = config.overrides.ClusterInfo.CertificateAuthorityData - } + if config.overrides != nil { + caLen := len(config.overrides.ClusterInfo.CertificateAuthority) + caDataLen := len(config.overrides.ClusterInfo.CertificateAuthorityData) + if config.overrides.ClusterInfo.InsecureSkipTLSVerify || caLen > 0 || caDataLen > 0 { + mergedClusterInfo.InsecureSkipTLSVerify = config.overrides.ClusterInfo.InsecureSkipTLSVerify + mergedClusterInfo.CertificateAuthority = config.overrides.ClusterInfo.CertificateAuthority + mergedClusterInfo.CertificateAuthorityData = config.overrides.ClusterInfo.CertificateAuthorityData + } - // if the --tls-server-name has been set in overrides, use that value. - // if the --server has been set in overrides, then use the value of --tls-server-name specified on the CLI too. This gives the property - // that setting a --server will effectively clear the KUBECONFIG value of tls-server-name if it is specified on the command line which is - // usually correct. - if config.overrides.ClusterInfo.TLSServerName != "" || config.overrides.ClusterInfo.Server != "" { - mergedClusterInfo.TLSServerName = config.overrides.ClusterInfo.TLSServerName + // if the --tls-server-name has been set in overrides, use that value. + // if the --server has been set in overrides, then use the value of --tls-server-name specified on the CLI too. This gives the property + // that setting a --server will effectively clear the KUBECONFIG value of tls-server-name if it is specified on the command line which is + // usually correct. + if config.overrides.ClusterInfo.TLSServerName != "" || config.overrides.ClusterInfo.Server != "" { + mergedClusterInfo.TLSServerName = config.overrides.ClusterInfo.TLSServerName + } } return *mergedClusterInfo, nil diff --git a/vendor/k8s.io/client-go/tools/clientcmd/config.go b/vendor/k8s.io/client-go/tools/clientcmd/config.go index b8cc3968821..5f1660bf93b 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/config.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/config.go @@ -24,7 +24,7 @@ import ( "reflect" "sort" - "k8s.io/klog" + "k8s.io/klog/v2" restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" @@ -58,6 +58,15 @@ type PathOptions struct { LoadingRules *ClientConfigLoadingRules } +var ( + // UseModifyConfigLock ensures that access to kubeconfig file using ModifyConfig method + // is being guarded by a lock file. + // This variable is intentionaly made public so other consumers of this library + // can modify its default behavior, but be caution when disabling it since + // this will make your code not threadsafe. + UseModifyConfigLock = true +) + func (o *PathOptions) GetEnvVarFiles() []string { if len(o.EnvVar) == 0 { return []string{} @@ -156,15 +165,17 @@ func NewDefaultPathOptions() *PathOptions { // that means that this code will only write into a single file. If you want to relativizePaths, you must provide a fully qualified path in any // modified element. func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, relativizePaths bool) error { - possibleSources := configAccess.GetLoadingPrecedence() - // sort the possible kubeconfig files so we always "lock" in the same order - // to avoid deadlock (note: this can fail w/ symlinks, but... come on). - sort.Strings(possibleSources) - for _, filename := range possibleSources { - if err := lockFile(filename); err != nil { - return err + if UseModifyConfigLock { + possibleSources := configAccess.GetLoadingPrecedence() + // sort the possible kubeconfig files so we always "lock" in the same order + // to avoid deadlock (note: this can fail w/ symlinks, but... come on). + sort.Strings(possibleSources) + for _, filename := range possibleSources { + if err := lockFile(filename); err != nil { + return err + } + defer unlockFile(filename) } - defer unlockFile(filename) } startingConfig, err := configAccess.GetStartingConfig() diff --git a/vendor/k8s.io/client-go/tools/clientcmd/helpers.go b/vendor/k8s.io/client-go/tools/clientcmd/helpers.go index b609d1a766c..d7572232aae 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/helpers.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/helpers.go @@ -18,6 +18,7 @@ package clientcmd import ( "fmt" + "net/url" "strconv" "time" ) @@ -33,3 +34,17 @@ func ParseTimeout(duration string) (time.Duration, error) { } return 0, fmt.Errorf("Invalid timeout value. Timeout must be a single integer in seconds, or an integer followed by a corresponding time unit (e.g. 1s | 2m | 3h)") } + +func parseProxyURL(proxyURL string) (*url.URL, error) { + u, err := url.Parse(proxyURL) + if err != nil { + return nil, fmt.Errorf("could not parse: %v", proxyURL) + } + + switch u.Scheme { + case "http", "https", "socks5": + default: + return nil, fmt.Errorf("unsupported scheme %q, must be http, https, or socks5", u.Scheme) + } + return u, nil +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/loader.go b/vendor/k8s.io/client-go/tools/clientcmd/loader.go index 4e37e792839..b0672291a47 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/loader.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/loader.go @@ -28,7 +28,7 @@ import ( "strings" "github.com/imdario/mergo" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder.go b/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder.go index 9cc112a2805..10744156b83 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder.go @@ -20,7 +20,7 @@ import ( "io" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" @@ -60,27 +60,26 @@ func NewInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overri } func (config *DeferredLoadingClientConfig) createClientConfig() (ClientConfig, error) { - if config.clientConfig == nil { - config.loadingLock.Lock() - defer config.loadingLock.Unlock() + config.loadingLock.Lock() + defer config.loadingLock.Unlock() - if config.clientConfig == nil { - mergedConfig, err := config.loader.Load() - if err != nil { - return nil, err - } - - var mergedClientConfig ClientConfig - if config.fallbackReader != nil { - mergedClientConfig = NewInteractiveClientConfig(*mergedConfig, config.overrides.CurrentContext, config.overrides, config.fallbackReader, config.loader) - } else { - mergedClientConfig = NewNonInteractiveClientConfig(*mergedConfig, config.overrides.CurrentContext, config.overrides, config.loader) - } - - config.clientConfig = mergedClientConfig - } + if config.clientConfig != nil { + return config.clientConfig, nil + } + mergedConfig, err := config.loader.Load() + if err != nil { + return nil, err } + var currentContext string + if config.overrides != nil { + currentContext = config.overrides.CurrentContext + } + if config.fallbackReader != nil { + config.clientConfig = NewInteractiveClientConfig(*mergedConfig, currentContext, config.overrides, config.fallbackReader, config.loader) + } else { + config.clientConfig = NewNonInteractiveClientConfig(*mergedConfig, currentContext, config.overrides, config.loader) + } return config.clientConfig, nil } diff --git a/vendor/k8s.io/client-go/tools/clientcmd/validation.go b/vendor/k8s.io/client-go/tools/clientcmd/validation.go index afe6f80b39e..f77ef04fe54 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/validation.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/validation.go @@ -30,11 +30,24 @@ import ( var ( ErrNoContext = errors.New("no context chosen") - ErrEmptyConfig = errors.New("no configuration has been provided, try setting KUBERNETES_MASTER environment variable") + ErrEmptyConfig = NewEmptyConfigError("no configuration has been provided, try setting KUBERNETES_MASTER environment variable") // message is for consistency with old behavior ErrEmptyCluster = errors.New("cluster has no server defined") ) +// NewEmptyConfigError returns an error wrapping the given message which IsEmptyConfig() will recognize as an empty config error +func NewEmptyConfigError(message string) error { + return &errEmptyConfig{message} +} + +type errEmptyConfig struct { + message string +} + +func (e *errEmptyConfig) Error() string { + return e.message +} + type errContextNotFound struct { ContextName string } @@ -60,9 +73,14 @@ func IsContextNotFound(err error) bool { func IsEmptyConfig(err error) bool { switch t := err.(type) { case errConfigurationInvalid: - return len(t) == 1 && t[0] == ErrEmptyConfig + if len(t) != 1 { + return false + } + _, ok := t[0].(*errEmptyConfig) + return ok } - return err == ErrEmptyConfig + _, ok := err.(*errEmptyConfig) + return ok } // errConfigurationInvalid is a set of errors indicating the configuration is invalid. @@ -209,6 +227,11 @@ func validateClusterInfo(clusterName string, clusterInfo clientcmdapi.Cluster) [ validationErrors = append(validationErrors, fmt.Errorf("no server found for cluster %q", clusterName)) } } + if proxyURL := clusterInfo.ProxyURL; proxyURL != "" { + if _, err := parseProxyURL(proxyURL); err != nil { + validationErrors = append(validationErrors, fmt.Errorf("invalid 'proxy-url' %q for cluster %q: %v", proxyURL, clusterName, err)) + } + } // Make sure CA data and CA file aren't both specified if len(clusterInfo.CertificateAuthority) != 0 && len(clusterInfo.CertificateAuthorityData) != 0 { validationErrors = append(validationErrors, fmt.Errorf("certificate-authority-data and certificate-authority are both specified for %v. certificate-authority-data will override.", clusterName)) diff --git a/vendor/k8s.io/client-go/tools/events/BUILD b/vendor/k8s.io/client-go/tools/events/BUILD index d8a3e39c3f0..fa0f66031f5 100644 --- a/vendor/k8s.io/client-go/tools/events/BUILD +++ b/vendor/k8s.io/client-go/tools/events/BUILD @@ -14,21 +14,26 @@ go_library( visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/api/events/v1beta1:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/json:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", + "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/tools/record/util:go_default_library", "//staging/src/k8s.io/client-go/tools/reference:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -38,7 +43,7 @@ go_test( embed = [":go_default_library"], deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/api/events/v1beta1:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", diff --git a/vendor/k8s.io/client-go/tools/events/event_broadcaster.go b/vendor/k8s.io/client-go/tools/events/event_broadcaster.go index 9d5afd9b43e..3c6870a20d5 100644 --- a/vendor/k8s.io/client-go/tools/events/event_broadcaster.go +++ b/vendor/k8s.io/client-go/tools/events/event_broadcaster.go @@ -17,26 +17,32 @@ limitations under the License. package events import ( + "context" + "fmt" "os" "sync" "time" corev1 "k8s.io/api/core/v1" + eventsv1 "k8s.io/api/events/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/clock" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/watch" - restclient "k8s.io/client-go/rest" - - "k8s.io/api/events/v1beta1" "k8s.io/apimachinery/pkg/util/json" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/util/wait" - typedv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" + "k8s.io/apimachinery/pkg/watch" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" + typedv1core "k8s.io/client-go/kubernetes/typed/core/v1" + typedeventsv1 "k8s.io/client-go/kubernetes/typed/events/v1" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/record" "k8s.io/client-go/tools/record/util" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -60,40 +66,49 @@ type eventKey struct { type eventBroadcasterImpl struct { *watch.Broadcaster mu sync.Mutex - eventCache map[eventKey]*v1beta1.Event + eventCache map[eventKey]*eventsv1.Event sleepDuration time.Duration sink EventSink } -// EventSinkImpl wraps EventInterface to implement EventSink. +// EventSinkImpl wraps EventsV1Interface to implement EventSink. // TODO: this makes it easier for testing purpose and masks the logic of performing API calls. // Note that rollbacking to raw clientset should also be transparent. type EventSinkImpl struct { - Interface typedv1beta1.EventInterface + Interface typedeventsv1.EventsV1Interface } -// Create is the same as CreateWithEventNamespace of the EventExpansion -func (e *EventSinkImpl) Create(event *v1beta1.Event) (*v1beta1.Event, error) { - return e.Interface.CreateWithEventNamespace(event) +// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. +func (e *EventSinkImpl) Create(event *eventsv1.Event) (*eventsv1.Event, error) { + if event.Namespace == "" { + return nil, fmt.Errorf("can't create an event with empty namespace") + } + return e.Interface.Events(event.Namespace).Create(context.TODO(), event, metav1.CreateOptions{}) } -// Update is the same as UpdateithEventNamespace of the EventExpansion -func (e *EventSinkImpl) Update(event *v1beta1.Event) (*v1beta1.Event, error) { - return e.Interface.UpdateWithEventNamespace(event) +// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. +func (e *EventSinkImpl) Update(event *eventsv1.Event) (*eventsv1.Event, error) { + if event.Namespace == "" { + return nil, fmt.Errorf("can't update an event with empty namespace") + } + return e.Interface.Events(event.Namespace).Update(context.TODO(), event, metav1.UpdateOptions{}) } -// Patch is the same as PatchWithEventNamespace of the EventExpansion -func (e *EventSinkImpl) Patch(event *v1beta1.Event, data []byte) (*v1beta1.Event, error) { - return e.Interface.PatchWithEventNamespace(event, data) +// Patch applies the patch and returns the patched event, and an error, if there is any. +func (e *EventSinkImpl) Patch(event *eventsv1.Event, data []byte) (*eventsv1.Event, error) { + if event.Namespace == "" { + return nil, fmt.Errorf("can't patch an event with empty namespace") + } + return e.Interface.Events(event.Namespace).Patch(context.TODO(), event.Name, types.StrategicMergePatchType, data, metav1.PatchOptions{}) } // NewBroadcaster Creates a new event broadcaster. func NewBroadcaster(sink EventSink) EventBroadcaster { - return newBroadcaster(sink, defaultSleepDuration, map[eventKey]*v1beta1.Event{}) + return newBroadcaster(sink, defaultSleepDuration, map[eventKey]*eventsv1.Event{}) } // NewBroadcasterForTest Creates a new event broadcaster for test purposes. -func newBroadcaster(sink EventSink, sleepDuration time.Duration, eventCache map[eventKey]*v1beta1.Event) EventBroadcaster { +func newBroadcaster(sink EventSink, sleepDuration time.Duration, eventCache map[eventKey]*eventsv1.Event) EventBroadcaster { return &eventBroadcasterImpl{ Broadcaster: watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), eventCache: eventCache, @@ -150,11 +165,11 @@ func (e *eventBroadcasterImpl) NewRecorder(scheme *runtime.Scheme, reportingCont return &recorderImpl{scheme, reportingController, reportingInstance, e.Broadcaster, clock.RealClock{}} } -func (e *eventBroadcasterImpl) recordToSink(event *v1beta1.Event, clock clock.Clock) { +func (e *eventBroadcasterImpl) recordToSink(event *eventsv1.Event, clock clock.Clock) { // Make a copy before modification, because there could be multiple listeners. eventCopy := event.DeepCopy() go func() { - evToRecord := func() *v1beta1.Event { + evToRecord := func() *eventsv1.Event { e.mu.Lock() defer e.mu.Unlock() eventKey := getKey(eventCopy) @@ -165,7 +180,7 @@ func (e *eventBroadcasterImpl) recordToSink(event *v1beta1.Event, clock clock.Cl isomorphicEvent.Series.LastObservedTime = metav1.MicroTime{Time: clock.Now()} return nil } - isomorphicEvent.Series = &v1beta1.EventSeries{ + isomorphicEvent.Series = &eventsv1.EventSeries{ Count: 1, LastObservedTime: metav1.MicroTime{Time: clock.Now()}, } @@ -186,7 +201,7 @@ func (e *eventBroadcasterImpl) recordToSink(event *v1beta1.Event, clock clock.Cl }() } -func (e *eventBroadcasterImpl) attemptRecording(event *v1beta1.Event) *v1beta1.Event { +func (e *eventBroadcasterImpl) attemptRecording(event *eventsv1.Event) *eventsv1.Event { tries := 0 for { if recordedEvent, retry := recordEvent(e.sink, event); !retry { @@ -203,8 +218,8 @@ func (e *eventBroadcasterImpl) attemptRecording(event *v1beta1.Event) *v1beta1.E } } -func recordEvent(sink EventSink, event *v1beta1.Event) (*v1beta1.Event, bool) { - var newEvent *v1beta1.Event +func recordEvent(sink EventSink, event *eventsv1.Event) (*eventsv1.Event, bool) { + var newEvent *eventsv1.Event var err error isEventSeries := event.Series != nil if isEventSeries { @@ -248,7 +263,7 @@ func recordEvent(sink EventSink, event *v1beta1.Event) (*v1beta1.Event, bool) { return nil, true } -func createPatchBytesForSeries(event *v1beta1.Event) ([]byte, error) { +func createPatchBytesForSeries(event *eventsv1.Event) ([]byte, error) { oldEvent := event.DeepCopy() oldEvent.Series = nil oldData, err := json.Marshal(oldEvent) @@ -259,10 +274,10 @@ func createPatchBytesForSeries(event *v1beta1.Event) ([]byte, error) { if err != nil { return nil, err } - return strategicpatch.CreateTwoWayMergePatch(oldData, newData, v1beta1.Event{}) + return strategicpatch.CreateTwoWayMergePatch(oldData, newData, eventsv1.Event{}) } -func getKey(event *v1beta1.Event) eventKey { +func getKey(event *eventsv1.Event) eventKey { key := eventKey{ action: event.Action, reason: event.Reason, @@ -301,9 +316,9 @@ func (e *eventBroadcasterImpl) StartRecordingToSink(stopCh <-chan struct{}) { e.finishSeries() }, finishTime, stopCh) eventHandler := func(obj runtime.Object) { - event, ok := obj.(*v1beta1.Event) + event, ok := obj.(*eventsv1.Event) if !ok { - klog.Errorf("unexpected type, expected v1beta1.Event") + klog.Errorf("unexpected type, expected eventsv1.Event") return } e.recordToSink(event, clock.RealClock{}) @@ -314,3 +329,56 @@ func (e *eventBroadcasterImpl) StartRecordingToSink(stopCh <-chan struct{}) { stopWatcher() }() } + +type eventBroadcasterAdapterImpl struct { + coreClient typedv1core.EventsGetter + coreBroadcaster record.EventBroadcaster + eventsv1Client typedeventsv1.EventsV1Interface + eventsv1Broadcaster EventBroadcaster +} + +// NewEventBroadcasterAdapter creates a wrapper around new and legacy broadcasters to simplify +// migration of individual components to the new Event API. +func NewEventBroadcasterAdapter(client clientset.Interface) EventBroadcasterAdapter { + eventClient := &eventBroadcasterAdapterImpl{} + if _, err := client.Discovery().ServerResourcesForGroupVersion(eventsv1.SchemeGroupVersion.String()); err == nil { + eventClient.eventsv1Client = client.EventsV1() + eventClient.eventsv1Broadcaster = NewBroadcaster(&EventSinkImpl{Interface: eventClient.eventsv1Client}) + } + // Even though there can soon exist cases when coreBroadcaster won't really be needed, + // we create it unconditionally because its overhead is minor and will simplify using usage + // patterns of this library in all components. + eventClient.coreClient = client.CoreV1() + eventClient.coreBroadcaster = record.NewBroadcaster() + return eventClient +} + +// StartRecordingToSink starts sending events received from the specified eventBroadcaster to the given sink. +func (e *eventBroadcasterAdapterImpl) StartRecordingToSink(stopCh <-chan struct{}) { + if e.eventsv1Broadcaster != nil && e.eventsv1Client != nil { + e.eventsv1Broadcaster.StartRecordingToSink(stopCh) + } + if e.coreBroadcaster != nil && e.coreClient != nil { + e.coreBroadcaster.StartRecordingToSink(&typedv1core.EventSinkImpl{Interface: e.coreClient.Events("")}) + } +} + +func (e *eventBroadcasterAdapterImpl) NewRecorder(name string) EventRecorder { + if e.eventsv1Broadcaster != nil && e.eventsv1Client != nil { + return e.eventsv1Broadcaster.NewRecorder(scheme.Scheme, name) + } + return record.NewEventRecorderAdapter(e.DeprecatedNewLegacyRecorder(name)) +} + +func (e *eventBroadcasterAdapterImpl) DeprecatedNewLegacyRecorder(name string) record.EventRecorder { + return e.coreBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: name}) +} + +func (e *eventBroadcasterAdapterImpl) Shutdown() { + if e.coreBroadcaster != nil { + e.coreBroadcaster.Shutdown() + } + if e.eventsv1Broadcaster != nil { + e.eventsv1Broadcaster.Shutdown() + } +} diff --git a/vendor/k8s.io/client-go/tools/events/event_recorder.go b/vendor/k8s.io/client-go/tools/events/event_recorder.go index f6dc50842fb..2837cc1603c 100644 --- a/vendor/k8s.io/client-go/tools/events/event_recorder.go +++ b/vendor/k8s.io/client-go/tools/events/event_recorder.go @@ -21,16 +21,15 @@ import ( "time" v1 "k8s.io/api/core/v1" + eventsv1 "k8s.io/api/events/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/clock" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/reference" - - "k8s.io/api/events/v1beta1" "k8s.io/client-go/tools/record/util" - "k8s.io/klog" + "k8s.io/client-go/tools/reference" + "k8s.io/klog/v2" ) type recorderImpl struct { @@ -64,13 +63,13 @@ func (recorder *recorderImpl) Eventf(regarding runtime.Object, related runtime.O }() } -func (recorder *recorderImpl) makeEvent(refRegarding *v1.ObjectReference, refRelated *v1.ObjectReference, timestamp metav1.MicroTime, eventtype, reason, message string, reportingController string, reportingInstance string, action string) *v1beta1.Event { +func (recorder *recorderImpl) makeEvent(refRegarding *v1.ObjectReference, refRelated *v1.ObjectReference, timestamp metav1.MicroTime, eventtype, reason, message string, reportingController string, reportingInstance string, action string) *eventsv1.Event { t := metav1.Time{Time: recorder.clock.Now()} namespace := refRegarding.Namespace if namespace == "" { namespace = metav1.NamespaceDefault } - return &v1beta1.Event{ + return &eventsv1.Event{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%v.%x", refRegarding.Name, t.UnixNano()), Namespace: namespace, @@ -85,8 +84,5 @@ func (recorder *recorderImpl) makeEvent(refRegarding *v1.ObjectReference, refRel Related: refRelated, Note: message, Type: eventtype, - // TODO: remove this when we change conversion to convert eventSource - // to reportingController - DeprecatedSource: v1.EventSource{Component: reportingController}, } } diff --git a/vendor/k8s.io/client-go/tools/events/interfaces.go b/vendor/k8s.io/client-go/tools/events/interfaces.go index 4e39156bd2d..f1a523caa8e 100644 --- a/vendor/k8s.io/client-go/tools/events/interfaces.go +++ b/vendor/k8s.io/client-go/tools/events/interfaces.go @@ -17,8 +17,9 @@ limitations under the License. package events import ( - "k8s.io/api/events/v1beta1" + eventsv1 "k8s.io/api/events/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/tools/record" ) // EventRecorder knows how to record events on behalf of an EventSource. @@ -64,7 +65,26 @@ type EventBroadcaster interface { // It is assumed that EventSink will return the same sorts of errors as // client-go's REST client. type EventSink interface { - Create(event *v1beta1.Event) (*v1beta1.Event, error) - Update(event *v1beta1.Event) (*v1beta1.Event, error) - Patch(oldEvent *v1beta1.Event, data []byte) (*v1beta1.Event, error) + Create(event *eventsv1.Event) (*eventsv1.Event, error) + Update(event *eventsv1.Event) (*eventsv1.Event, error) + Patch(oldEvent *eventsv1.Event, data []byte) (*eventsv1.Event, error) +} + +// EventBroadcasterAdapter is a auxiliary interface to simplify migration to +// the new events API. It is a wrapper around new and legacy broadcasters +// that smartly chooses which one to use. +// +// Deprecated: This interface will be removed once migration is completed. +type EventBroadcasterAdapter interface { + // StartRecordingToSink starts sending events received from the specified eventBroadcaster. + StartRecordingToSink(stopCh <-chan struct{}) + + // NewRecorder creates a new Event Recorder with specified name. + NewRecorder(name string) EventRecorder + + // DeprecatedNewLegacyRecorder creates a legacy Event Recorder with specific name. + DeprecatedNewLegacyRecorder(name string) record.EventRecorder + + // Shutdown shuts down the broadcaster. + Shutdown() } diff --git a/vendor/k8s.io/client-go/tools/leaderelection/BUILD b/vendor/k8s.io/client-go/tools/leaderelection/BUILD index cb93174011c..feb49b900a3 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/BUILD +++ b/vendor/k8s.io/client-go/tools/leaderelection/BUILD @@ -17,7 +17,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/tools/leaderelection/OWNERS b/vendor/k8s.io/client-go/tools/leaderelection/OWNERS index 44d93f84fa3..9ece5e1ea4b 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/OWNERS +++ b/vendor/k8s.io/client-go/tools/leaderelection/OWNERS @@ -8,7 +8,6 @@ reviewers: - deads2k - mikedanese - gmarek -- eparis - timothysc - ingvagabund - resouer diff --git a/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go b/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go index 61989a2cfa4..4a532968128 100644 --- a/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go +++ b/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go @@ -65,7 +65,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" rl "k8s.io/client-go/tools/leaderelection/resourcelock" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -195,10 +195,11 @@ type LeaderElector struct { // Run starts the leader election loop func (le *LeaderElector) Run(ctx context.Context) { + defer runtime.HandleCrash() defer func() { - runtime.HandleCrash() le.config.Callbacks.OnStoppedLeading() }() + if !le.acquire(ctx) { return // ctx signalled done } diff --git a/vendor/k8s.io/client-go/tools/metrics/OWNERS b/vendor/k8s.io/client-go/tools/metrics/OWNERS index ad52d0c5cc0..77bcb5090ce 100644 --- a/vendor/k8s.io/client-go/tools/metrics/OWNERS +++ b/vendor/k8s.io/client-go/tools/metrics/OWNERS @@ -2,6 +2,5 @@ reviewers: - wojtek-t -- eparis - krousey - jayunit100 diff --git a/vendor/k8s.io/client-go/tools/record/BUILD b/vendor/k8s.io/client-go/tools/record/BUILD index 8d7a10aa4ae..66f00ea67b2 100644 --- a/vendor/k8s.io/client-go/tools/record/BUILD +++ b/vendor/k8s.io/client-go/tools/record/BUILD @@ -26,7 +26,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/reference:go_default_library", "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//vendor/github.com/golang/groupcache/lru:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/tools/record/OWNERS b/vendor/k8s.io/client-go/tools/record/OWNERS index 6ce73bb5cd3..792f356b0db 100644 --- a/vendor/k8s.io/client-go/tools/record/OWNERS +++ b/vendor/k8s.io/client-go/tools/record/OWNERS @@ -17,7 +17,6 @@ reviewers: - saad-ali - luxas - yifan-gu -- eparis - mwielgus - timothysc - jsafrane diff --git a/vendor/k8s.io/client-go/tools/record/event.go b/vendor/k8s.io/client-go/tools/record/event.go index 64d1fd2d789..fce4410c0dd 100644 --- a/vendor/k8s.io/client-go/tools/record/event.go +++ b/vendor/k8s.io/client-go/tools/record/event.go @@ -31,7 +31,7 @@ import ( restclient "k8s.io/client-go/rest" "k8s.io/client-go/tools/record/util" ref "k8s.io/client-go/tools/reference" - "k8s.io/klog" + "k8s.io/klog/v2" ) const maxTriesPerEvent = 12 @@ -121,6 +121,10 @@ type EventBroadcaster interface { // function. The return value can be ignored or used to stop recording, if desired. StartLogging(logf func(format string, args ...interface{})) watch.Interface + // StartStructuredLogging starts sending events received from this EventBroadcaster to the structured + // logging function. The return value can be ignored or used to stop recording, if desired. + StartStructuredLogging(verbosity klog.Level) watch.Interface + // NewRecorder returns an EventRecorder that can be used to send events to this EventBroadcaster // with the event source set to the given event source. NewRecorder(scheme *runtime.Scheme, source v1.EventSource) EventRecorder @@ -279,6 +283,15 @@ func (e *eventBroadcasterImpl) StartLogging(logf func(format string, args ...int }) } +// StartStructuredLogging starts sending events received from this EventBroadcaster to the structured logging function. +// The return value can be ignored or used to stop recording, if desired. +func (e *eventBroadcasterImpl) StartStructuredLogging(verbosity klog.Level) watch.Interface { + return e.StartEventWatcher( + func(e *v1.Event) { + klog.V(verbosity).InfoS("Event occurred", "object", klog.KRef(e.InvolvedObject.Namespace, e.InvolvedObject.Name), "kind", e.InvolvedObject.Kind, "apiVersion", e.InvolvedObject.APIVersion, "type", e.Type, "reason", e.Reason, "message", e.Message) + }) +} + // StartEventWatcher starts sending events received from this EventBroadcaster to the given event handler function. // The return value can be ignored or used to stop recording, if desired. func (e *eventBroadcasterImpl) StartEventWatcher(eventHandler func(*v1.Event)) watch.Interface { diff --git a/vendor/k8s.io/client-go/tools/record/events_cache.go b/vendor/k8s.io/client-go/tools/record/events_cache.go index 1b499efd39f..9374612f262 100644 --- a/vendor/k8s.io/client-go/tools/record/events_cache.go +++ b/vendor/k8s.io/client-go/tools/record/events_cache.go @@ -153,7 +153,8 @@ func (f *EventSourceObjectSpamFilter) Filter(event *v1.Event) bool { // localKey - key that makes this event in the local group type EventAggregatorKeyFunc func(event *v1.Event) (aggregateKey string, localKey string) -// EventAggregatorByReasonFunc aggregates events by exact match on event.Source, event.InvolvedObject, event.Type and event.Reason +// EventAggregatorByReasonFunc aggregates events by exact match on event.Source, event.InvolvedObject, event.Type, +// event.Reason, event.ReportingController and event.ReportingInstance func EventAggregatorByReasonFunc(event *v1.Event) (string, string) { return strings.Join([]string{ event.Source.Component, @@ -165,6 +166,8 @@ func EventAggregatorByReasonFunc(event *v1.Event) (string, string) { event.InvolvedObject.APIVersion, event.Type, event.Reason, + event.ReportingController, + event.ReportingInstance, }, ""), event.Message } diff --git a/vendor/k8s.io/client-go/tools/remotecommand/BUILD b/vendor/k8s.io/client-go/tools/remotecommand/BUILD index 043217a3ce3..b3eb433c01d 100644 --- a/vendor/k8s.io/client-go/tools/remotecommand/BUILD +++ b/vendor/k8s.io/client-go/tools/remotecommand/BUILD @@ -44,7 +44,7 @@ go_library( "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/transport/spdy:go_default_library", "//staging/src/k8s.io/client-go/util/exec:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go b/vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go index 892d8d105dc..cb39faf7f1a 100644 --- a/vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go +++ b/vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go @@ -22,7 +22,7 @@ import ( "net/http" "net/url" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/httpstream" "k8s.io/apimachinery/pkg/util/remotecommand" diff --git a/vendor/k8s.io/client-go/tools/remotecommand/v1.go b/vendor/k8s.io/client-go/tools/remotecommand/v1.go index 4120f1f5f3d..ff0fbd2d7b4 100644 --- a/vendor/k8s.io/client-go/tools/remotecommand/v1.go +++ b/vendor/k8s.io/client-go/tools/remotecommand/v1.go @@ -24,7 +24,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/httpstream" - "k8s.io/klog" + "k8s.io/klog/v2" ) // streamProtocolV1 implements the first version of the streaming exec & attach diff --git a/vendor/k8s.io/client-go/tools/watch/BUILD b/vendor/k8s.io/client-go/tools/watch/BUILD index f31c836986e..8a28eae2040 100644 --- a/vendor/k8s.io/client-go/tools/watch/BUILD +++ b/vendor/k8s.io/client-go/tools/watch/BUILD @@ -12,7 +12,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", @@ -20,7 +19,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -45,7 +44,7 @@ go_test( "//staging/src/k8s.io/client-go/testing:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/tools/watch/retrywatcher.go b/vendor/k8s.io/client-go/tools/watch/retrywatcher.go index edf28d164d0..62af45def2c 100644 --- a/vendor/k8s.io/client-go/tools/watch/retrywatcher.go +++ b/vendor/k8s.io/client-go/tools/watch/retrywatcher.go @@ -32,7 +32,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/tools/cache" - "k8s.io/klog" + "k8s.io/klog/v2" ) // resourceVersionGetter is an interface used to get resource version from events. @@ -101,7 +101,8 @@ func (rw *RetryWatcher) send(event watch.Event) bool { // If it is not done the second return value holds the time to wait before calling it again. func (rw *RetryWatcher) doReceive() (bool, time.Duration) { watcher, err := rw.watcherClient.Watch(metav1.ListOptions{ - ResourceVersion: rw.lastResourceVersion, + ResourceVersion: rw.lastResourceVersion, + AllowWatchBookmarks: true, }) // We are very unlikely to hit EOF here since we are just establishing the call, // but it may happen that the apiserver is just shutting down (e.g. being restarted) @@ -174,10 +175,12 @@ func (rw *RetryWatcher) doReceive() (bool, time.Duration) { return true, 0 } - // All is fine; send the event and update lastResourceVersion - ok = rw.send(event) - if !ok { - return true, 0 + // All is fine; send the non-bookmark events and update resource version. + if event.Type != watch.Bookmark { + ok = rw.send(event) + if !ok { + return true, 0 + } } rw.lastResourceVersion = resourceVersion diff --git a/vendor/k8s.io/client-go/tools/watch/until.go b/vendor/k8s.io/client-go/tools/watch/until.go index e12d82aca48..b644fe7c059 100644 --- a/vendor/k8s.io/client-go/tools/watch/until.go +++ b/vendor/k8s.io/client-go/tools/watch/until.go @@ -22,13 +22,11 @@ import ( "fmt" "time" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/tools/cache" - "k8s.io/klog" + "k8s.io/klog/v2" ) // PreconditionFunc returns true if the condition has been reached, false if it has not been reached yet, @@ -167,70 +165,3 @@ func ContextWithOptionalTimeout(parent context.Context, timeout time.Duration) ( return context.WithTimeout(parent, timeout) } - -// ListWatchUntil first lists objects, converts them into synthetic ADDED events -// and checks conditions for those synthetic events. If the conditions have not been reached so far -// it continues by calling Until which establishes a watch from resourceVersion of the list call -// to evaluate those conditions based on new events. -// ListWatchUntil provides the same guarantees as Until and replaces the old WATCH from RV "" (or "0") -// which was mixing list and watch calls internally and having severe design issues. (see #74022) -// There is no resourceVersion order guarantee for the initial list and those synthetic events. -func ListWatchUntil(ctx context.Context, lw cache.ListerWatcher, conditions ...ConditionFunc) (*watch.Event, error) { - if len(conditions) == 0 { - return nil, nil - } - - list, err := lw.List(metav1.ListOptions{}) - if err != nil { - return nil, err - } - initialItems, err := meta.ExtractList(list) - if err != nil { - return nil, err - } - - // use the initial items as simulated "adds" - var lastEvent *watch.Event - currIndex := 0 - passedConditions := 0 - for _, condition := range conditions { - // check the next condition against the previous event and short circuit waiting for the next watch - if lastEvent != nil { - done, err := condition(*lastEvent) - if err != nil { - return lastEvent, err - } - if done { - passedConditions = passedConditions + 1 - continue - } - } - - ConditionSucceeded: - for currIndex < len(initialItems) { - lastEvent = &watch.Event{Type: watch.Added, Object: initialItems[currIndex]} - currIndex++ - - done, err := condition(*lastEvent) - if err != nil { - return lastEvent, err - } - if done { - passedConditions = passedConditions + 1 - break ConditionSucceeded - } - } - } - if passedConditions == len(conditions) { - return lastEvent, nil - } - remainingConditions := conditions[passedConditions:] - - metaObj, err := meta.ListAccessor(list) - if err != nil { - return nil, err - } - currResourceVersion := metaObj.GetResourceVersion() - - return Until(ctx, currResourceVersion, lw, remainingConditions...) -} diff --git a/vendor/k8s.io/client-go/transport/BUILD b/vendor/k8s.io/client-go/transport/BUILD index 3ebf8930d2d..8eb232f2729 100644 --- a/vendor/k8s.io/client-go/transport/BUILD +++ b/vendor/k8s.io/client-go/transport/BUILD @@ -37,7 +37,7 @@ go_library( "//staging/src/k8s.io/client-go/util/connrotation:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//vendor/golang.org/x/oauth2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/transport/cache.go b/vendor/k8s.io/client-go/transport/cache.go index 36d6500f581..3ec4e19357d 100644 --- a/vendor/k8s.io/client-go/transport/cache.go +++ b/vendor/k8s.io/client-go/transport/cache.go @@ -52,6 +52,7 @@ type tlsCacheKey struct { nextProtos string dial string disableCompression bool + proxy string } func (t tlsCacheKey) String() string { @@ -59,7 +60,7 @@ func (t tlsCacheKey) String() string { if len(t.keyData) > 0 { keyText = "" } - return fmt.Sprintf("insecure:%v, caData:%#v, certData:%#v, keyData:%s, getCert: %s, serverName:%s, dial:%s disableCompression:%t", t.insecure, t.caData, t.certData, keyText, t.getCert, t.serverName, t.dial, t.disableCompression) + return fmt.Sprintf("insecure:%v, caData:%#v, certData:%#v, keyData:%s, getCert: %s, serverName:%s, dial:%s disableCompression:%t, proxy: %s", t.insecure, t.caData, t.certData, keyText, t.getCert, t.serverName, t.dial, t.disableCompression, t.proxy) } func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { @@ -83,7 +84,7 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { return nil, err } // The options didn't require a custom TLS config - if tlsConfig == nil && config.Dial == nil { + if tlsConfig == nil && config.Dial == nil && config.Proxy == nil { return http.DefaultTransport, nil } @@ -104,9 +105,14 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { go dynamicCertDialer.Run(wait.NeverStop) } + proxy := http.ProxyFromEnvironment + if config.Proxy != nil { + proxy = config.Proxy + } + // Cache a single transport for these options c.transports[key] = utilnet.SetTransportDefaults(&http.Transport{ - Proxy: http.ProxyFromEnvironment, + Proxy: proxy, TLSHandshakeTimeout: 10 * time.Second, TLSClientConfig: tlsConfig, MaxIdleConnsPerHost: idleConnsPerHost, @@ -130,6 +136,7 @@ func tlsConfigKey(c *Config) (tlsCacheKey, error) { nextProtos: strings.Join(c.TLS.NextProtos, ","), dial: fmt.Sprintf("%p", c.Dial), disableCompression: c.DisableCompression, + proxy: fmt.Sprintf("%p", c.Proxy), } if c.TLS.ReloadTLSFiles { diff --git a/vendor/k8s.io/client-go/transport/cert_rotation.go b/vendor/k8s.io/client-go/transport/cert_rotation.go index 918e77f9a78..dc22b6ec4cc 100644 --- a/vendor/k8s.io/client-go/transport/cert_rotation.go +++ b/vendor/k8s.io/client-go/transport/cert_rotation.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/connrotation" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" ) const workItemKey = "key" diff --git a/vendor/k8s.io/client-go/transport/config.go b/vendor/k8s.io/client-go/transport/config.go index c20a4a8fcb9..45db2486471 100644 --- a/vendor/k8s.io/client-go/transport/config.go +++ b/vendor/k8s.io/client-go/transport/config.go @@ -21,6 +21,7 @@ import ( "crypto/tls" "net" "net/http" + "net/url" ) // Config holds various options for establishing a transport. @@ -68,6 +69,13 @@ type Config struct { // Dial specifies the dial function for creating unencrypted TCP connections. Dial func(ctx context.Context, network, address string) (net.Conn, error) + + // Proxy is the the proxy func to be used for all requests made by this + // transport. If Proxy is nil, http.ProxyFromEnvironment is used. If Proxy + // returns a nil *URL, no proxy is used. + // + // socks5 proxying does not currently support spdy streaming endpoints. + Proxy func(*http.Request) (*url.URL, error) } // ImpersonationConfig has all the available impersonation options diff --git a/vendor/k8s.io/client-go/transport/round_trippers.go b/vendor/k8s.io/client-go/transport/round_trippers.go index a272753ae2d..a05208d924d 100644 --- a/vendor/k8s.io/client-go/transport/round_trippers.go +++ b/vendor/k8s.io/client-go/transport/round_trippers.go @@ -23,7 +23,7 @@ import ( "time" "golang.org/x/oauth2" - "k8s.io/klog" + "k8s.io/klog/v2" utilnet "k8s.io/apimachinery/pkg/util/net" ) @@ -67,13 +67,13 @@ func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTrip // DebugWrappers wraps a round tripper and logs based on the current log level. func DebugWrappers(rt http.RoundTripper) http.RoundTripper { switch { - case bool(klog.V(9)): + case bool(klog.V(9).Enabled()): rt = newDebuggingRoundTripper(rt, debugCurlCommand, debugURLTiming, debugResponseHeaders) - case bool(klog.V(8)): + case bool(klog.V(8).Enabled()): rt = newDebuggingRoundTripper(rt, debugJustURL, debugRequestHeaders, debugResponseStatus, debugResponseHeaders) - case bool(klog.V(7)): + case bool(klog.V(7).Enabled()): rt = newDebuggingRoundTripper(rt, debugJustURL, debugRequestHeaders, debugResponseStatus) - case bool(klog.V(6)): + case bool(klog.V(6).Enabled()): rt = newDebuggingRoundTripper(rt, debugURLTiming) } diff --git a/vendor/k8s.io/client-go/transport/spdy/spdy.go b/vendor/k8s.io/client-go/transport/spdy/spdy.go index 53cc7ee18c5..682f964f6f4 100644 --- a/vendor/k8s.io/client-go/transport/spdy/spdy.go +++ b/vendor/k8s.io/client-go/transport/spdy/spdy.go @@ -38,7 +38,11 @@ func RoundTripperFor(config *restclient.Config) (http.RoundTripper, Upgrader, er if err != nil { return nil, nil, err } - upgradeRoundTripper := spdy.NewRoundTripper(tlsConfig, true, false) + proxy := http.ProxyFromEnvironment + if config.Proxy != nil { + proxy = config.Proxy + } + upgradeRoundTripper := spdy.NewRoundTripperWithProxy(tlsConfig, true, false, proxy) wrapper, err := restclient.HTTPWrappersForConfig(config, upgradeRoundTripper) if err != nil { return nil, nil, err diff --git a/vendor/k8s.io/client-go/transport/token_source.go b/vendor/k8s.io/client-go/transport/token_source.go index f6e4633a164..308c5585936 100644 --- a/vendor/k8s.io/client-go/transport/token_source.go +++ b/vendor/k8s.io/client-go/transport/token_source.go @@ -26,7 +26,7 @@ import ( "golang.org/x/oauth2" - "k8s.io/klog" + "k8s.io/klog/v2" ) // TokenSourceWrapTransport returns a WrapTransport that injects bearer tokens diff --git a/vendor/k8s.io/client-go/transport/transport.go b/vendor/k8s.io/client-go/transport/transport.go index 143ebfa5c83..88d89494d72 100644 --- a/vendor/k8s.io/client-go/transport/transport.go +++ b/vendor/k8s.io/client-go/transport/transport.go @@ -27,7 +27,7 @@ import ( "time" utilnet "k8s.io/apimachinery/pkg/util/net" - "k8s.io/klog" + "k8s.io/klog/v2" ) // New returns an http.RoundTripper that will provide the authentication diff --git a/vendor/k8s.io/client-go/util/cert/cert.go b/vendor/k8s.io/client-go/util/cert/cert.go index 9fd097af5e3..3da14416368 100644 --- a/vendor/k8s.io/client-go/util/cert/cert.go +++ b/vendor/k8s.io/client-go/util/cert/cert.go @@ -28,7 +28,7 @@ import ( "io/ioutil" "math/big" "net" - "path" + "path/filepath" "strings" "time" @@ -96,8 +96,8 @@ func GenerateSelfSignedCertKeyWithFixtures(host string, alternateIPs []net.IP, a maxAge := time.Hour * 24 * 365 // one year self-signed certs baseName := fmt.Sprintf("%s_%s_%s", host, strings.Join(ipsToStrings(alternateIPs), "-"), strings.Join(alternateDNS, "-")) - certFixturePath := path.Join(fixtureDirectory, baseName+".crt") - keyFixturePath := path.Join(fixtureDirectory, baseName+".key") + certFixturePath := filepath.Join(fixtureDirectory, baseName+".crt") + keyFixturePath := filepath.Join(fixtureDirectory, baseName+".key") if len(fixtureDirectory) > 0 { cert, err := ioutil.ReadFile(certFixturePath) if err == nil { diff --git a/vendor/k8s.io/client-go/util/certificate/BUILD b/vendor/k8s.io/client-go/util/certificate/BUILD index 44cde57dbea..b1f6aa7349b 100644 --- a/vendor/k8s.io/client-go/util/certificate/BUILD +++ b/vendor/k8s.io/client-go/util/certificate/BUILD @@ -16,12 +16,17 @@ go_test( ], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/testing:go_default_library", ], ) @@ -34,16 +39,16 @@ go_library( importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/util/certificate", importpath = "k8s.io/client-go/util/certificate", deps = [ - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/util/cert:go_default_library", "//staging/src/k8s.io/client-go/util/certificate/csr:go_default_library", "//staging/src/k8s.io/client-go/util/keyutil:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/util/certificate/certificate_manager.go b/vendor/k8s.io/client-go/util/certificate/certificate_manager.go index 48eb7b3ccb0..4032a4c5335 100644 --- a/vendor/k8s.io/client-go/util/certificate/certificate_manager.go +++ b/vendor/k8s.io/client-go/util/certificate/certificate_manager.go @@ -29,14 +29,14 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" - certificates "k8s.io/api/certificates/v1beta1" + certificates "k8s.io/api/certificates/v1" "k8s.io/apimachinery/pkg/api/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" - certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/util/cert" "k8s.io/client-go/util/certificate/csr" "k8s.io/client-go/util/keyutil" @@ -68,11 +68,11 @@ type Manager interface { // Config is the set of configuration parameters available for a new Manager. type Config struct { - // ClientFn will be used to create a client for - // signing new certificate requests generated when a key rotation occurs. - // It must be set at initialization. The function will never be invoked - // in parallel. It is passed the current client certificate if one exists. - ClientFn CSRClientFunc + // ClientsetFn will be used to create a clientset for + // creating/fetching new certificate requests generated when a key rotation occurs. + // The function will never be invoked in parallel. + // It is passed the current client certificate if one exists. + ClientsetFn ClientsetFunc // Template is the CertificateRequest that will be used as a template for // generating certificate signing requests for all new keys generated as // part of rotation. It follows the same rules as the template parameter of @@ -162,9 +162,9 @@ type Counter interface { // NoCertKeyError indicates there is no cert/key currently available. type NoCertKeyError string -// CSRClientFunc returns a new client for requesting CSRs. It passes the -// current certificate if one is available and valid. -type CSRClientFunc func(current *tls.Certificate) (certificatesclient.CertificateSigningRequestInterface, error) +// ClientsetFunc returns a new clientset for discovering CSR API availability and requesting CSRs. +// It is passed the current certificate if one is available and valid. +type ClientsetFunc func(current *tls.Certificate) (clientset.Interface, error) func (e *NoCertKeyError) Error() string { return string(*e) } @@ -193,7 +193,7 @@ type manager struct { // the clientFn must only be accessed under the clientAccessLock clientAccessLock sync.Mutex - clientFn CSRClientFunc + clientsetFn ClientsetFunc stopCh chan struct{} stopped bool @@ -220,7 +220,7 @@ func NewManager(config *Config) (Manager, error) { m := manager{ stopCh: make(chan struct{}), - clientFn: config.ClientFn, + clientsetFn: config.ClientsetFn, getTemplate: getTemplate, dynamicTemplate: config.GetTemplate != nil, signerName: config.SignerName, @@ -274,7 +274,7 @@ func (m *manager) Start() { // Certificate rotation depends on access to the API server certificate // signing API, so don't start the certificate manager if we don't have a // client. - if m.clientFn == nil { + if m.clientsetFn == nil { klog.V(2).Infof("Certificate rotation is not enabled, no connection to the apiserver.") return } @@ -374,6 +374,9 @@ func getCurrentCertificateOrBootstrap( if err != nil { return nil, false, fmt.Errorf("unable to parse certificate data: %v", err) } + if len(certs) < 1 { + return nil, false, fmt.Errorf("no cert data found") + } bootstrapCert.Leaf = certs[0] if _, err := store.Update(bootstrapCertificatePEM, bootstrapKeyPEM); err != nil { @@ -385,11 +388,11 @@ func getCurrentCertificateOrBootstrap( return &bootstrapCert, true, nil } -func (m *manager) getClient() (certificatesclient.CertificateSigningRequestInterface, error) { +func (m *manager) getClientset() (clientset.Interface, error) { current := m.Current() m.clientAccessLock.Lock() defer m.clientAccessLock.Unlock() - return m.clientFn(current) + return m.clientsetFn(current) } // RotateCerts is exposed for testing only and is not a part of the public interface. @@ -418,7 +421,7 @@ func (m *manager) rotateCerts() (bool, error) { } // request the client each time - client, err := m.getClient() + clientSet, err := m.getClientset() if err != nil { utilruntime.HandleError(fmt.Errorf("Unable to load a client to request certificates: %v", err)) if m.certificateRenewFailure != nil { @@ -429,7 +432,7 @@ func (m *manager) rotateCerts() (bool, error) { // Call the Certificate Signing Request API to get a certificate for the // new private key. - req, err := csr.RequestCertificate(client, csrPEM, "", m.signerName, m.usages, privateKey) + reqName, reqUID, err := csr.RequestCertificate(clientSet, csrPEM, "", m.signerName, m.usages, privateKey) if err != nil { utilruntime.HandleError(fmt.Errorf("Failed while requesting a signed certificate from the master: %v", err)) if m.certificateRenewFailure != nil { @@ -446,7 +449,7 @@ func (m *manager) rotateCerts() (bool, error) { // Wait for the certificate to be signed. This interface and internal timout // is a remainder after the old design using raw watch wrapped with backoff. - crtPEM, err := csr.WaitForCertificate(ctx, client, req) + crtPEM, err := csr.WaitForCertificate(ctx, clientSet, reqName, reqUID) if err != nil { utilruntime.HandleError(fmt.Errorf("certificate request was not signed: %v", err)) if m.certificateRenewFailure != nil { diff --git a/vendor/k8s.io/client-go/util/certificate/certificate_store.go b/vendor/k8s.io/client-go/util/certificate/certificate_store.go index 7b73c0a6482..e7ed58ee8a3 100644 --- a/vendor/k8s.io/client-go/util/certificate/certificate_store.go +++ b/vendor/k8s.io/client-go/util/certificate/certificate_store.go @@ -26,7 +26,7 @@ import ( "time" certutil "k8s.io/client-go/util/cert" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/client-go/util/certificate/csr/BUILD b/vendor/k8s.io/client-go/util/certificate/csr/BUILD index 17fa901ace1..bcdcb9e5111 100644 --- a/vendor/k8s.io/client-go/util/certificate/csr/BUILD +++ b/vendor/k8s.io/client-go/util/certificate/csr/BUILD @@ -8,18 +8,20 @@ go_library( importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/util/certificate/csr", importpath = "k8s.io/client-go/util/certificate/csr", deps = [ + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/tools/watch:go_default_library", "//staging/src/k8s.io/client-go/util/cert:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -40,8 +42,5 @@ go_test( name = "go_default_test", srcs = ["csr_test.go"], embed = [":go_default_library"], - deps = [ - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/utils/pointer:go_default_library", - ], + deps = ["//staging/src/k8s.io/api/certificates/v1:go_default_library"], ) diff --git a/vendor/k8s.io/client-go/util/certificate/csr/csr.go b/vendor/k8s.io/client-go/util/certificate/csr/csr.go index dd41772498e..ec117663487 100644 --- a/vendor/k8s.io/client-go/util/certificate/csr/csr.go +++ b/vendor/k8s.io/client-go/util/certificate/csr/csr.go @@ -25,16 +25,19 @@ import ( "reflect" "time" - "k8s.io/klog" + "k8s.io/klog/v2" - certificates "k8s.io/api/certificates/v1beta1" + certificatesv1 "k8s.io/api/certificates/v1" + certificatesv1beta1 "k8s.io/api/certificates/v1beta1" "k8s.io/apimachinery/pkg/api/errors" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" - certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" watchtools "k8s.io/client-go/tools/watch" certutil "k8s.io/client-go/util/cert" @@ -42,88 +45,239 @@ import ( // RequestCertificate will either use an existing (if this process has run // before but not to completion) or create a certificate signing request using the -// PEM encoded CSR and send it to API server, then it will watch the object's -// status, once approved by API server, it will return the API server's issued -// certificate (pem-encoded). If there is any errors, or the watch timeouts, it -// will return an error. -func RequestCertificate(client certificatesclient.CertificateSigningRequestInterface, csrData []byte, name string, signerName string, usages []certificates.KeyUsage, privateKey interface{}) (req *certificates.CertificateSigningRequest, err error) { - csr := &certificates.CertificateSigningRequest{ +// PEM encoded CSR and send it to API server. +func RequestCertificate(client clientset.Interface, csrData []byte, name string, signerName string, usages []certificatesv1.KeyUsage, privateKey interface{}) (reqName string, reqUID types.UID, err error) { + csr := &certificatesv1.CertificateSigningRequest{ // Username, UID, Groups will be injected by API server. TypeMeta: metav1.TypeMeta{Kind: "CertificateSigningRequest"}, ObjectMeta: metav1.ObjectMeta{ Name: name, }, - Spec: certificates.CertificateSigningRequestSpec{ + Spec: certificatesv1.CertificateSigningRequestSpec{ Request: csrData, Usages: usages, - SignerName: &signerName, + SignerName: signerName, }, } if len(csr.Name) == 0 { csr.GenerateName = "csr-" } - req, err = client.Create(context.TODO(), csr, metav1.CreateOptions{}) + reqName, reqUID, err = create(client, csr) switch { case err == nil: + return reqName, reqUID, err + case errors.IsAlreadyExists(err) && len(name) > 0: klog.Infof("csr for this node already exists, reusing") - req, err = client.Get(context.TODO(), name, metav1.GetOptions{}) + req, err := get(client, name) if err != nil { - return nil, formatError("cannot retrieve certificate signing request: %v", err) + return "", "", formatError("cannot retrieve certificate signing request: %v", err) } if err := ensureCompatible(req, csr, privateKey); err != nil { - return nil, fmt.Errorf("retrieved csr is not compatible: %v", err) + return "", "", fmt.Errorf("retrieved csr is not compatible: %v", err) } klog.Infof("csr for this node is still valid") + return req.Name, req.UID, nil + default: - return nil, formatError("cannot create certificate signing request: %v", err) + return "", "", formatError("cannot create certificate signing request: %v", err) } - return req, nil +} + +func get(client clientset.Interface, name string) (*certificatesv1.CertificateSigningRequest, error) { + v1req, v1err := client.CertificatesV1().CertificateSigningRequests().Get(context.TODO(), name, metav1.GetOptions{}) + if v1err == nil || !apierrors.IsNotFound(v1err) { + return v1req, v1err + } + + v1beta1req, v1beta1err := client.CertificatesV1beta1().CertificateSigningRequests().Get(context.TODO(), name, metav1.GetOptions{}) + if v1beta1err != nil { + return nil, v1beta1err + } + + v1req = &certificatesv1.CertificateSigningRequest{ + ObjectMeta: v1beta1req.ObjectMeta, + Spec: certificatesv1.CertificateSigningRequestSpec{ + Request: v1beta1req.Spec.Request, + }, + } + if v1beta1req.Spec.SignerName != nil { + v1req.Spec.SignerName = *v1beta1req.Spec.SignerName + } + for _, usage := range v1beta1req.Spec.Usages { + v1req.Spec.Usages = append(v1req.Spec.Usages, certificatesv1.KeyUsage(usage)) + } + return v1req, nil +} + +func create(client clientset.Interface, csr *certificatesv1.CertificateSigningRequest) (reqName string, reqUID types.UID, err error) { + // only attempt a create via v1 if we specified signerName and usages and are not using the legacy unknown signerName + if len(csr.Spec.Usages) > 0 && len(csr.Spec.SignerName) > 0 && csr.Spec.SignerName != "kubernetes.io/legacy-unknown" { + v1req, v1err := client.CertificatesV1().CertificateSigningRequests().Create(context.TODO(), csr, metav1.CreateOptions{}) + switch { + case v1err != nil && apierrors.IsNotFound(v1err): + // v1 CSR API was not found, continue to try v1beta1 + + case v1err != nil: + // other creation error + return "", "", v1err + + default: + // success + return v1req.Name, v1req.UID, v1err + } + } + + // convert relevant bits to v1beta1 + v1beta1csr := &certificatesv1beta1.CertificateSigningRequest{ + ObjectMeta: csr.ObjectMeta, + Spec: certificatesv1beta1.CertificateSigningRequestSpec{ + SignerName: &csr.Spec.SignerName, + Request: csr.Spec.Request, + }, + } + for _, usage := range csr.Spec.Usages { + v1beta1csr.Spec.Usages = append(v1beta1csr.Spec.Usages, certificatesv1beta1.KeyUsage(usage)) + } + + // create v1beta1 + v1beta1req, v1beta1err := client.CertificatesV1beta1().CertificateSigningRequests().Create(context.TODO(), v1beta1csr, metav1.CreateOptions{}) + if v1beta1err != nil { + return "", "", v1beta1err + } + return v1beta1req.Name, v1beta1req.UID, nil } // WaitForCertificate waits for a certificate to be issued until timeout, or returns an error. -func WaitForCertificate(ctx context.Context, client certificatesclient.CertificateSigningRequestInterface, req *certificates.CertificateSigningRequest) (certData []byte, err error) { - fieldSelector := fields.OneTermEqualSelector("metadata.name", req.Name).String() - lw := &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - options.FieldSelector = fieldSelector - return client.List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - options.FieldSelector = fieldSelector - return client.Watch(context.TODO(), options) - }, +func WaitForCertificate(ctx context.Context, client clientset.Interface, reqName string, reqUID types.UID) (certData []byte, err error) { + fieldSelector := fields.OneTermEqualSelector("metadata.name", reqName).String() + + var lw *cache.ListWatch + var obj runtime.Object + for { + // see if the v1 API is available + if _, err := client.CertificatesV1().CertificateSigningRequests().List(ctx, metav1.ListOptions{FieldSelector: fieldSelector}); err == nil { + // watch v1 objects + obj = &certificatesv1.CertificateSigningRequest{} + lw = &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + options.FieldSelector = fieldSelector + return client.CertificatesV1().CertificateSigningRequests().List(ctx, options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + options.FieldSelector = fieldSelector + return client.CertificatesV1().CertificateSigningRequests().Watch(ctx, options) + }, + } + break + } else { + klog.V(2).Infof("error fetching v1 certificate signing request: %v", err) + } + + // return if we've timed out + if err := ctx.Err(); err != nil { + return nil, wait.ErrWaitTimeout + } + + // see if the v1beta1 API is available + if _, err := client.CertificatesV1beta1().CertificateSigningRequests().List(ctx, metav1.ListOptions{FieldSelector: fieldSelector}); err == nil { + // watch v1beta1 objects + obj = &certificatesv1beta1.CertificateSigningRequest{} + lw = &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + options.FieldSelector = fieldSelector + return client.CertificatesV1beta1().CertificateSigningRequests().List(ctx, options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + options.FieldSelector = fieldSelector + return client.CertificatesV1beta1().CertificateSigningRequests().Watch(ctx, options) + }, + } + break + } else { + klog.V(2).Infof("error fetching v1beta1 certificate signing request: %v", err) + } + + // return if we've timed out + if err := ctx.Err(); err != nil { + return nil, wait.ErrWaitTimeout + } + + // wait and try again + time.Sleep(time.Second) } - event, err := watchtools.UntilWithSync( + + var issuedCertificate []byte + _, err = watchtools.UntilWithSync( ctx, lw, - &certificates.CertificateSigningRequest{}, + obj, nil, func(event watch.Event) (bool, error) { switch event.Type { case watch.Modified, watch.Added: case watch.Deleted: - return false, fmt.Errorf("csr %q was deleted", req.Name) + return false, fmt.Errorf("csr %q was deleted", reqName) default: return false, nil } - csr := event.Object.(*certificates.CertificateSigningRequest) - if csr.UID != req.UID { - return false, fmt.Errorf("csr %q changed UIDs", csr.Name) - } - for _, c := range csr.Status.Conditions { - if c.Type == certificates.CertificateDenied { - return false, fmt.Errorf("certificate signing request is not approved, reason: %v, message: %v", c.Reason, c.Message) + + switch csr := event.Object.(type) { + case *certificatesv1.CertificateSigningRequest: + if csr.UID != reqUID { + return false, fmt.Errorf("csr %q changed UIDs", csr.Name) } - if c.Type == certificates.CertificateApproved { - if csr.Status.Certificate != nil { + approved := false + for _, c := range csr.Status.Conditions { + if c.Type == certificatesv1.CertificateDenied { + return false, fmt.Errorf("certificate signing request is denied, reason: %v, message: %v", c.Reason, c.Message) + } + if c.Type == certificatesv1.CertificateFailed { + return false, fmt.Errorf("certificate signing request failed, reason: %v, message: %v", c.Reason, c.Message) + } + if c.Type == certificatesv1.CertificateApproved { + approved = true + } + } + if approved { + if len(csr.Status.Certificate) > 0 { klog.V(2).Infof("certificate signing request %s is issued", csr.Name) + issuedCertificate = csr.Status.Certificate return true, nil } klog.V(2).Infof("certificate signing request %s is approved, waiting to be issued", csr.Name) } + + case *certificatesv1beta1.CertificateSigningRequest: + if csr.UID != reqUID { + return false, fmt.Errorf("csr %q changed UIDs", csr.Name) + } + approved := false + for _, c := range csr.Status.Conditions { + if c.Type == certificatesv1beta1.CertificateDenied { + return false, fmt.Errorf("certificate signing request is denied, reason: %v, message: %v", c.Reason, c.Message) + } + if c.Type == certificatesv1beta1.CertificateFailed { + return false, fmt.Errorf("certificate signing request failed, reason: %v, message: %v", c.Reason, c.Message) + } + if c.Type == certificatesv1beta1.CertificateApproved { + approved = true + } + } + if approved { + if len(csr.Status.Certificate) > 0 { + klog.V(2).Infof("certificate signing request %s is issued", csr.Name) + issuedCertificate = csr.Status.Certificate + return true, nil + } + klog.V(2).Infof("certificate signing request %s is approved, waiting to be issued", csr.Name) + } + + default: + return false, fmt.Errorf("unexpected type received: %T", event.Object) } + return false, nil }, ) @@ -134,24 +288,24 @@ func WaitForCertificate(ctx context.Context, client certificatesclient.Certifica return nil, formatError("cannot watch on the certificate signing request: %v", err) } - return event.Object.(*certificates.CertificateSigningRequest).Status.Certificate, nil + return issuedCertificate, nil } // ensureCompatible ensures that a CSR object is compatible with an original CSR -func ensureCompatible(new, orig *certificates.CertificateSigningRequest, privateKey interface{}) error { - newCSR, err := parseCSR(new) +func ensureCompatible(new, orig *certificatesv1.CertificateSigningRequest, privateKey interface{}) error { + newCSR, err := parseCSR(new.Spec.Request) if err != nil { return fmt.Errorf("unable to parse new csr: %v", err) } - origCSR, err := parseCSR(orig) + origCSR, err := parseCSR(orig.Spec.Request) if err != nil { return fmt.Errorf("unable to parse original csr: %v", err) } if !reflect.DeepEqual(newCSR.Subject, origCSR.Subject) { return fmt.Errorf("csr subjects differ: new: %#v, orig: %#v", newCSR.Subject, origCSR.Subject) } - if new.Spec.SignerName != nil && orig.Spec.SignerName != nil && *new.Spec.SignerName != *orig.Spec.SignerName { - return fmt.Errorf("csr signerNames differ: new %q, orig: %q", *new.Spec.SignerName, *orig.Spec.SignerName) + if len(new.Spec.SignerName) > 0 && len(orig.Spec.SignerName) > 0 && new.Spec.SignerName != orig.Spec.SignerName { + return fmt.Errorf("csr signerNames differ: new %q, orig: %q", new.Spec.SignerName, orig.Spec.SignerName) } signer, ok := privateKey.(crypto.Signer) if !ok { @@ -188,9 +342,9 @@ func formatError(format string, err error) error { } // parseCSR extracts the CSR from the API object and decodes it. -func parseCSR(obj *certificates.CertificateSigningRequest) (*x509.CertificateRequest, error) { +func parseCSR(pemData []byte) (*x509.CertificateRequest, error) { // extract PEM from request object - block, _ := pem.Decode(obj.Spec.Request) + block, _ := pem.Decode(pemData) if block == nil || block.Type != "CERTIFICATE REQUEST" { return nil, fmt.Errorf("PEM block type must be CERTIFICATE REQUEST") } diff --git a/vendor/k8s.io/client-go/util/jsonpath/jsonpath.go b/vendor/k8s.io/client-go/util/jsonpath/jsonpath.go index 78b6b678f7f..9740fe69d02 100644 --- a/vendor/k8s.io/client-go/util/jsonpath/jsonpath.go +++ b/vendor/k8s.io/client-go/util/jsonpath/jsonpath.go @@ -18,6 +18,7 @@ package jsonpath import ( "bytes" + "encoding/json" "fmt" "io" "reflect" @@ -29,13 +30,14 @@ import ( type JSONPath struct { name string parser *Parser - stack [][]reflect.Value // push and pop values in different scopes - cur []reflect.Value // current scope values beginRange int inRange int endRange int + lastEndNode *Node + allowMissingKeys bool + outputJSON bool } // New creates a new JSONPath with the given name. @@ -81,12 +83,12 @@ func (j *JSONPath) FindResults(data interface{}) ([][]reflect.Value, error) { return nil, fmt.Errorf("%s is an incomplete jsonpath template", j.name) } - j.cur = []reflect.Value{reflect.ValueOf(data)} + cur := []reflect.Value{reflect.ValueOf(data)} nodes := j.parser.Root.Nodes fullResult := [][]reflect.Value{} for i := 0; i < len(nodes); i++ { node := nodes[i] - results, err := j.walk(j.cur, node) + results, err := j.walk(cur, node) if err != nil { return nil, err } @@ -94,34 +96,80 @@ func (j *JSONPath) FindResults(data interface{}) ([][]reflect.Value, error) { // encounter an end node, break the current block if j.endRange > 0 && j.endRange <= j.inRange { j.endRange-- + j.lastEndNode = &nodes[i] break } // encounter a range node, start a range loop if j.beginRange > 0 { j.beginRange-- j.inRange++ - for k, value := range results { + for _, value := range results { j.parser.Root.Nodes = nodes[i+1:] - if k == len(results)-1 { - j.inRange-- - } nextResults, err := j.FindResults(value.Interface()) if err != nil { return nil, err } fullResult = append(fullResult, nextResults...) } - break + j.inRange-- + + // Fast forward to resume processing after the most recent end node that was encountered + for k := i + 1; k < len(nodes); k++ { + if &nodes[k] == j.lastEndNode { + i = k + break + } + } + continue } fullResult = append(fullResult, results) } return fullResult, nil } +// EnableJSONOutput changes the PrintResults behavior to return a JSON array of results +func (j *JSONPath) EnableJSONOutput(v bool) { + j.outputJSON = v +} + // PrintResults writes the results into writer func (j *JSONPath) PrintResults(wr io.Writer, results []reflect.Value) error { + if j.outputJSON { + // convert the []reflect.Value to something that json + // will be able to marshal + r := make([]interface{}, 0, len(results)) + for i := range results { + r = append(r, results[i].Interface()) + } + results = []reflect.Value{reflect.ValueOf(r)} + } for i, r := range results { - text, err := j.evalToText(r) + var text []byte + var err error + outputJSON := true + kind := r.Kind() + if kind == reflect.Interface { + kind = r.Elem().Kind() + } + switch kind { + case reflect.Map: + case reflect.Array: + case reflect.Slice: + case reflect.Struct: + default: + outputJSON = false + } + switch { + case outputJSON || j.outputJSON: + if j.outputJSON { + text, err = json.MarshalIndent(r.Interface(), "", " ") + text = append(text, '\n') + } else { + text, err = json.Marshal(r.Interface()) + } + default: + text, err = j.evalToText(r) + } if err != nil { return err } @@ -132,7 +180,9 @@ func (j *JSONPath) PrintResults(wr io.Writer, results []reflect.Value) error { return err } } + return nil + } // walk visits tree rooted at the given node in DFS order @@ -212,17 +262,11 @@ func (j *JSONPath) evalIdentifier(input []reflect.Value, node *IdentifierNode) ( results := []reflect.Value{} switch node.Name { case "range": - j.stack = append(j.stack, j.cur) j.beginRange++ results = input case "end": - if j.endRange < j.inRange { // inside a loop, break the current block + if j.inRange > 0 { j.endRange++ - break - } - // the loop is about to end, pop value and continue the following execution - if len(j.stack) > 0 { - j.cur, j.stack = j.stack[len(j.stack)-1], j.stack[:len(j.stack)-1] } else { return results, fmt.Errorf("not in range, nothing to end") } diff --git a/vendor/k8s.io/client-go/util/jsonpath/parser.go b/vendor/k8s.io/client-go/util/jsonpath/parser.go index e1aab6804f8..b84016a9f9c 100644 --- a/vendor/k8s.io/client-go/util/jsonpath/parser.go +++ b/vendor/k8s.io/client-go/util/jsonpath/parser.go @@ -214,8 +214,11 @@ func (p *Parser) parseIdentifier(cur *ListNode) error { return p.parseInsideAction(cur) } -// parseRecursive scans the recursive desent operator .. +// parseRecursive scans the recursive descent operator .. func (p *Parser) parseRecursive(cur *ListNode) error { + if lastIndex := len(cur.Nodes) - 1; lastIndex >= 0 && cur.Nodes[lastIndex].Type() == NodeRecursive { + return fmt.Errorf("invalid multiple recursive descent") + } p.pos += len("..") p.consumeText() cur.append(newRecursive()) diff --git a/vendor/k8s.io/client-go/util/workqueue/BUILD b/vendor/k8s.io/client-go/util/workqueue/BUILD index 264cead1da3..302d16a930c 100644 --- a/vendor/k8s.io/client-go/util/workqueue/BUILD +++ b/vendor/k8s.io/client-go/util/workqueue/BUILD @@ -13,6 +13,7 @@ go_test( "delaying_queue_test.go", "main_test.go", "metrics_test.go", + "parallelizer_test.go", "queue_test.go", "rate_limiting_queue_test.go", ], @@ -20,7 +21,7 @@ go_test( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/golang.org/x/time/rate:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", ], ) diff --git a/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters.go b/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters.go index 6dc8ec5f225..71bb6322e07 100644 --- a/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters.go +++ b/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters.go @@ -62,54 +62,6 @@ func (r *BucketRateLimiter) NumRequeues(item interface{}) int { func (r *BucketRateLimiter) Forget(item interface{}) { } -// ItemBucketRateLimiter implements a workqueue ratelimiter API using standard rate.Limiter. -// Each key is using a separate limiter. -type ItemBucketRateLimiter struct { - r rate.Limit - burst int - - limitersLock sync.Mutex - limiters map[interface{}]*rate.Limiter -} - -var _ RateLimiter = &ItemBucketRateLimiter{} - -// NewItemBucketRateLimiter creates new ItemBucketRateLimiter instance. -func NewItemBucketRateLimiter(r rate.Limit, burst int) *ItemBucketRateLimiter { - return &ItemBucketRateLimiter{ - r: r, - burst: burst, - limiters: make(map[interface{}]*rate.Limiter), - } -} - -// When returns a time.Duration which we need to wait before item is processed. -func (r *ItemBucketRateLimiter) When(item interface{}) time.Duration { - r.limitersLock.Lock() - defer r.limitersLock.Unlock() - - limiter, ok := r.limiters[item] - if !ok { - limiter = rate.NewLimiter(r.r, r.burst) - r.limiters[item] = limiter - } - - return limiter.Reserve().Delay() -} - -// NumRequeues returns always 0 (doesn't apply to ItemBucketRateLimiter). -func (r *ItemBucketRateLimiter) NumRequeues(item interface{}) int { - return 0 -} - -// Forget removes item from the internal state. -func (r *ItemBucketRateLimiter) Forget(item interface{}) { - r.limitersLock.Lock() - defer r.limitersLock.Unlock() - - delete(r.limiters, item) -} - // ItemExponentialFailureRateLimiter does a simple baseDelay*2^ limit // dealing with max failures and expiration are up to the caller type ItemExponentialFailureRateLimiter struct { diff --git a/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go b/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go index e1ab76ea218..31d9182dea6 100644 --- a/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go +++ b/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go @@ -38,6 +38,12 @@ func NewDelayingQueue() DelayingInterface { return NewDelayingQueueWithCustomClock(clock.RealClock{}, "") } +// NewDelayingQueueWithCustomQueue constructs a new workqueue with ability to +// inject custom queue Interface instead of the default one +func NewDelayingQueueWithCustomQueue(q Interface, name string) DelayingInterface { + return newDelayingQueue(clock.RealClock{}, q, name) +} + // NewNamedDelayingQueue constructs a new named workqueue with delayed queuing ability func NewNamedDelayingQueue(name string) DelayingInterface { return NewDelayingQueueWithCustomClock(clock.RealClock{}, name) @@ -46,8 +52,12 @@ func NewNamedDelayingQueue(name string) DelayingInterface { // NewDelayingQueueWithCustomClock constructs a new named workqueue // with ability to inject real or fake clock for testing purposes func NewDelayingQueueWithCustomClock(clock clock.Clock, name string) DelayingInterface { + return newDelayingQueue(clock, NewNamed(name), name) +} + +func newDelayingQueue(clock clock.Clock, q Interface, name string) *delayingType { ret := &delayingType{ - Interface: NewNamed(name), + Interface: q, clock: clock, heartbeat: clock.NewTicker(maxWait), stopCh: make(chan struct{}), @@ -56,7 +66,6 @@ func NewDelayingQueueWithCustomClock(clock clock.Clock, name string) DelayingInt } go ret.waitingLoop() - return ret } diff --git a/vendor/k8s.io/client-go/util/workqueue/parallelizer.go b/vendor/k8s.io/client-go/util/workqueue/parallelizer.go index 5928a0c5b7d..366bf20a312 100644 --- a/vendor/k8s.io/client-go/util/workqueue/parallelizer.go +++ b/vendor/k8s.io/client-go/util/workqueue/parallelizer.go @@ -25,39 +25,77 @@ import ( type DoWorkPieceFunc func(piece int) +type options struct { + chunkSize int +} + +type Options func(*options) + +// WithChunkSize allows to set chunks of work items to the workers, rather than +// processing one by one. +// It is recommended to use this option if the number of pieces significantly +// higher than the number of workers and the work done for each item is small. +func WithChunkSize(c int) func(*options) { + return func(o *options) { + o.chunkSize = c + } +} + // ParallelizeUntil is a framework that allows for parallelizing N // independent pieces of work until done or the context is canceled. -func ParallelizeUntil(ctx context.Context, workers, pieces int, doWorkPiece DoWorkPieceFunc) { - var stop <-chan struct{} - if ctx != nil { - stop = ctx.Done() +func ParallelizeUntil(ctx context.Context, workers, pieces int, doWorkPiece DoWorkPieceFunc, opts ...Options) { + if pieces == 0 { + return + } + o := options{} + for _, opt := range opts { + opt(&o) + } + chunkSize := o.chunkSize + if chunkSize < 1 { + chunkSize = 1 } - toProcess := make(chan int, pieces) - for i := 0; i < pieces; i++ { + chunks := ceilDiv(pieces, chunkSize) + toProcess := make(chan int, chunks) + for i := 0; i < chunks; i++ { toProcess <- i } close(toProcess) - if pieces < workers { - workers = pieces + var stop <-chan struct{} + if ctx != nil { + stop = ctx.Done() + } + if chunks < workers { + workers = chunks } - wg := sync.WaitGroup{} wg.Add(workers) for i := 0; i < workers; i++ { go func() { defer utilruntime.HandleCrash() defer wg.Done() - for piece := range toProcess { - select { - case <-stop: - return - default: - doWorkPiece(piece) + for chunk := range toProcess { + start := chunk * chunkSize + end := start + chunkSize + if end > pieces { + end = pieces + } + for p := start; p < end; p++ { + select { + case <-stop: + return + default: + doWorkPiece(p) + } } } }() } wg.Wait() } + +func ceilDiv(a, b int) int { + return (a + b - 1) / b +} diff --git a/vendor/k8s.io/cloud-provider/BUILD b/vendor/k8s.io/cloud-provider/BUILD index 2d80c53923b..4533bea8b95 100644 --- a/vendor/k8s.io/cloud-provider/BUILD +++ b/vendor/k8s.io/cloud-provider/BUILD @@ -11,6 +11,7 @@ go_library( "cloud.go", "doc.go", "plugins.go", + "ports.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/cloud-provider", importpath = "k8s.io/cloud-provider", @@ -20,7 +21,7 @@ go_library( "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -36,6 +37,10 @@ filegroup( srcs = [ ":package-srcs", "//staging/src/k8s.io/cloud-provider/api:all-srcs", + "//staging/src/k8s.io/cloud-provider/controllers/node:all-srcs", + "//staging/src/k8s.io/cloud-provider/controllers/nodelifecycle:all-srcs", + "//staging/src/k8s.io/cloud-provider/controllers/route:all-srcs", + "//staging/src/k8s.io/cloud-provider/controllers/service:all-srcs", "//staging/src/k8s.io/cloud-provider/fake:all-srcs", "//staging/src/k8s.io/cloud-provider/node:all-srcs", "//staging/src/k8s.io/cloud-provider/service/helpers:all-srcs", diff --git a/vendor/k8s.io/cloud-provider/OWNERS b/vendor/k8s.io/cloud-provider/OWNERS index b3ed1ca6640..b5c5205c9d8 100644 --- a/vendor/k8s.io/cloud-provider/OWNERS +++ b/vendor/k8s.io/cloud-provider/OWNERS @@ -20,10 +20,8 @@ reviewers: - quinton-hoole - dchen1107 - saad-ali -- zmerlynn - luxas - justinsb -- eparis - piosz - jsafrane - dims diff --git a/vendor/k8s.io/cloud-provider/api/BUILD b/vendor/k8s.io/cloud-provider/api/BUILD index 263a9a8ee0a..2371259bd42 100644 --- a/vendor/k8s.io/cloud-provider/api/BUILD +++ b/vendor/k8s.io/cloud-provider/api/BUILD @@ -2,7 +2,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["well_known_taints.go"], + srcs = [ + "well_known_annotations.go", + "well_known_taints.go", + ], importmap = "k8s.io/kubernetes/vendor/k8s.io/cloud-provider/api", importpath = "k8s.io/cloud-provider/api", visibility = ["//visibility:public"], diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/well_known_annotations.go b/vendor/k8s.io/cloud-provider/api/well_known_annotations.go similarity index 82% rename from vendor/k8s.io/kubernetes/pkg/kubelet/apis/well_known_annotations.go rename to vendor/k8s.io/cloud-provider/api/well_known_annotations.go index a87f1c073ad..fd03ea0a021 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/well_known_annotations.go +++ b/vendor/k8s.io/cloud-provider/api/well_known_annotations.go @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -package apis +package api const ( - // AnnotationProvidedIPAddr is a node IP annotation set by the "external" cloud provider. + // AnnotationAlphaProvidedIPAddr is a node IP annotation set by the "external" cloud provider. // When kubelet is started with the "external" cloud provider, then // it sets this annotation on the node to denote an ip address set from the // cmd line flag (--node-ip). This ip is verified with the cloudprovider as valid by // the cloud-controller-manager - AnnotationProvidedIPAddr = "alpha.kubernetes.io/provided-node-ip" + AnnotationAlphaProvidedIPAddr = "alpha.kubernetes.io/provided-node-ip" ) diff --git a/vendor/k8s.io/cloud-provider/cloud.go b/vendor/k8s.io/cloud-provider/cloud.go index b006c726cd6..98fb5c347c8 100644 --- a/vendor/k8s.io/cloud-provider/cloud.go +++ b/vendor/k8s.io/cloud-provider/cloud.go @@ -49,6 +49,12 @@ type Interface interface { LoadBalancer() (LoadBalancer, bool) // Instances returns an instances interface. Also returns true if the interface is supported, false otherwise. Instances() (Instances, bool) + // InstancesV2 is an implementation for instances and should only be implemented by external cloud providers. + // Implementing InstancesV2 is behaviorally identical to Instances but is optimized to significantly reduce + // API calls to the cloud provider when registering and syncing nodes. + // Also returns true if the interface is supported, false otherwise. + // WARNING: InstancesV2 is an experimental interface and is subject to change in v1.20. + InstancesV2() (InstancesV2, bool) // Zones returns a zones interface. Also returns true if the interface is supported, false otherwise. Zones() (Zones, bool) // Clusters returns a clusters interface. Also returns true if the interface is supported, false otherwise. @@ -157,9 +163,6 @@ type LoadBalancer interface { // Instances is an abstract, pluggable interface for sets of instances. type Instances interface { // NodeAddresses returns the addresses of the specified instance. - // TODO(roberthbailey): This currently is only used in such a way that it - // returns the address of the calling instance. We should do a rename to - // make this clearer. NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error) // NodeAddressesByProviderID returns the addresses of the specified instance. // The instance is specified using the providerID of the node. The @@ -189,6 +192,22 @@ type Instances interface { InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error) } +// InstancesV2 is an abstract, pluggable interface for cloud provider instances. +// Unlike the Instances interface, it is designed for external cloud providers and should only be used by them. +// WARNING: InstancesV2 is an experimental interface and is subject to change in v1.20. +type InstancesV2 interface { + // InstanceExists returns true if the instance for the given node exists according to the cloud provider. + // Use the node.name or node.spec.providerID field to find the node in the cloud provider. + InstanceExists(ctx context.Context, node *v1.Node) (bool, error) + // InstanceShutdown returns true if the instance is shutdown according to the cloud provider. + // Use the node.name or node.spec.providerID field to find the node in the cloud provider. + InstanceShutdown(ctx context.Context, node *v1.Node) (bool, error) + // InstanceMetadata returns the instance's metadata. The values returned in InstanceMetadata are + // translated into specific fields in the Node object on registration. + // Use the node.name or node.spec.providerID field to find the node in the cloud provider. + InstanceMetadata(ctx context.Context, node *v1.Node) (*InstanceMetadata, error) +} + // Route is a representation of an advanced routing rule. type Route struct { // Name is the name of the routing rule in the cloud-provider. @@ -253,3 +272,26 @@ type Zones interface { type PVLabeler interface { GetLabelsForVolume(ctx context.Context, pv *v1.PersistentVolume) (map[string]string, error) } + +// InstanceMetadata contains metadata about a specific instance. +// Values returned in InstanceMetadata are translated into specific fields in Node. +type InstanceMetadata struct { + // ProviderID is a unique ID used to idenfitify an instance on the cloud provider. + // The ProviderID set here will be set on the node's spec.providerID field. + // The provider ID format can be set by the cloud provider but providers should + // ensure the format does not change in any incompatible way. + // + // The provider ID format used by existing cloud provider has been: + // :// + // Existing providers setting this field should preserve the existing format + // currently being set in node.spec.providerID. + ProviderID string + // InstanceType is the instance's type. + // The InstanceType set here will be set using the following labels on the node object: + // * node.kubernetes.io/instance-type= + // * beta.kubernetes.io/instance-type= (DEPRECATED) + InstanceType string + // NodeAddress contains information for the instance's address. + // The node addresses returned here will be set on the node's status.addresses field. + NodeAddresses []v1.NodeAddress +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cloud/BUILD b/vendor/k8s.io/cloud-provider/controllers/node/BUILD similarity index 75% rename from vendor/k8s.io/kubernetes/pkg/controller/cloud/BUILD rename to vendor/k8s.io/cloud-provider/controllers/node/BUILD index a8b9b5a5705..62684aa1d96 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cloud/BUILD +++ b/vendor/k8s.io/cloud-provider/controllers/node/BUILD @@ -2,20 +2,14 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", - srcs = [ - "node_controller.go", - "node_lifecycle_controller.go", - ], - importpath = "k8s.io/kubernetes/pkg/controller/cloud", + srcs = ["node_controller.go"], + importmap = "k8s.io/kubernetes/vendor/k8s.io/cloud-provider/controllers/node", + importpath = "k8s.io/cloud-provider/controllers/node", visibility = ["//visibility:public"], deps = [ - "//pkg/controller:go_default_library", - "//pkg/kubelet/apis:go_default_library", - "//pkg/util/node:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", @@ -23,40 +17,34 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/retry:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/api:go_default_library", "//staging/src/k8s.io/cloud-provider/node/helpers:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) go_test( name = "go_default_test", - srcs = [ - "node_controller_test.go", - "node_lifecycle_controller_test.go", - ], + srcs = ["node_controller_test.go"], embed = [":go_default_library"], deps = [ - "//pkg/controller/testutil:go_default_library", - "//pkg/kubelet/apis:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", - "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/api:go_default_library", "//staging/src/k8s.io/cloud-provider/fake:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cloud/node_controller.go b/vendor/k8s.io/cloud-provider/controllers/node/node_controller.go similarity index 85% rename from vendor/k8s.io/kubernetes/pkg/controller/cloud/node_controller.go rename to vendor/k8s.io/cloud-provider/controllers/node/node_controller.go index dda5c762994..7aa0e8f5b70 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cloud/node_controller.go +++ b/vendor/k8s.io/cloud-provider/controllers/node/node_controller.go @@ -38,9 +38,7 @@ import ( cloudprovider "k8s.io/cloud-provider" cloudproviderapi "k8s.io/cloud-provider/api" cloudnodeutil "k8s.io/cloud-provider/node/helpers" - "k8s.io/klog" - kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" - nodeutil "k8s.io/kubernetes/pkg/util/node" + "k8s.io/klog/v2" ) // labelReconcileInfo lists Node labels to reconcile, and how to reconcile them. @@ -105,12 +103,14 @@ func NewCloudNodeController( eventBroadcaster := record.NewBroadcaster() recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "cloud-node-controller"}) - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) klog.Infof("Sending events to api server.") eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) - if _, ok := cloud.Instances(); !ok { + _, instancesSupported := cloud.Instances() + _, instancesV2Supported := cloud.InstancesV2() + if !instancesSupported && !instancesV2Supported { return nil, errors.New("cloud provider does not support instances") } @@ -148,12 +148,6 @@ func (cnc *CloudNodeController) Run(stopCh <-chan struct{}) { // UpdateNodeStatus updates the node status, such as node addresses func (cnc *CloudNodeController) UpdateNodeStatus(ctx context.Context) { - instances, ok := cnc.cloud.Instances() - if !ok { - utilruntime.HandleError(fmt.Errorf("failed to get instances from cloud provider")) - return - } - nodes, err := cnc.kubeClient.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{ResourceVersion: "0"}) if err != nil { klog.Errorf("Error monitoring node status: %v", err) @@ -161,7 +155,7 @@ func (cnc *CloudNodeController) UpdateNodeStatus(ctx context.Context) { } for i := range nodes.Items { - cnc.updateNodeAddress(ctx, &nodes.Items[i], instances) + cnc.updateNodeAddress(ctx, &nodes.Items[i]) } for _, node := range nodes.Items { @@ -223,29 +217,42 @@ func (cnc *CloudNodeController) reconcileNodeLabels(nodeName string) error { } // UpdateNodeAddress updates the nodeAddress of a single node -func (cnc *CloudNodeController) updateNodeAddress(ctx context.Context, node *v1.Node, instances cloudprovider.Instances) { +func (cnc *CloudNodeController) updateNodeAddress(ctx context.Context, node *v1.Node) { // Do not process nodes that are still tainted cloudTaint := getCloudTaint(node.Spec.Taints) if cloudTaint != nil { klog.V(5).Infof("This node %s is still tainted. Will not process.", node.Name) return } - // Node that isn't present according to the cloud provider shouldn't have its address updated - exists, err := ensureNodeExistsByProviderID(ctx, instances, node) + + instanceMetadataGetter := func(providerID string, node *v1.Node) (*cloudprovider.InstanceMetadata, error) { + if instancesV2, ok := cnc.cloud.InstancesV2(); instancesV2 != nil && ok { + return instancesV2.InstanceMetadata(ctx, node) + } + + // If InstancesV2 not implement, use Instances. + instances, ok := cnc.cloud.Instances() + if !ok { + return nil, fmt.Errorf("failed to get instances from cloud provider") + } + + nodeAddresses, err := getNodeAddressesByProviderIDOrName(ctx, instances, node.Spec.ProviderID, node.Name) + if err != nil { + klog.Errorf("Error getting node addresses for node %q: %v", node.Name, err) + return nil, err + } + return &cloudprovider.InstanceMetadata{ + NodeAddresses: nodeAddresses, + }, nil + } + + instanceMeta, err := instanceMetadataGetter(node.Spec.ProviderID, node) if err != nil { - // Continue to update node address when not sure the node is not exists - klog.Errorf("%v", err) - } else if !exists { - klog.V(4).Infof("The node %s is no longer present according to the cloud provider, do not process.", node.Name) - return - } - - nodeAddresses, err := getNodeAddressesByProviderIDOrName(ctx, instances, node.Spec.ProviderID, node.Name) - if err != nil { - klog.Errorf("Error getting node addresses for node %q: %v", node.Name, err) + utilruntime.HandleError(err) return } + nodeAddresses := instanceMeta.NodeAddresses if len(nodeAddresses) == 0 { klog.V(5).Infof("Skipping node address update for node %q since cloud provider did not return any", node.Name) return @@ -270,19 +277,16 @@ func (cnc *CloudNodeController) updateNodeAddress(ctx context.Context, node *v1. } // If nodeIP was suggested by user, ensure that // it can be found in the cloud as well (consistent with the behaviour in kubelet) - if nodeIP, ok := ensureNodeProvidedIPExists(node, nodeAddresses); ok { - if nodeIP == nil { - klog.Errorf("Specified Node IP not found in cloudprovider for node %q", node.Name) - return - } + if nodeIP, ok := ensureNodeProvidedIPExists(node, nodeAddresses); ok && nodeIP == nil { + klog.Errorf("Specified Node IP not found in cloudprovider for node %q", node.Name) + return } if !nodeAddressesChangeDetected(node.Status.Addresses, nodeAddresses) { return } newNode := node.DeepCopy() newNode.Status.Addresses = nodeAddresses - _, _, err = nodeutil.PatchNodeStatus(cnc.kubeClient.CoreV1(), types.NodeName(node.Name), node, newNode) - if err != nil { + if _, _, err := cloudnodeutil.PatchNodeStatus(cnc.kubeClient.CoreV1(), types.NodeName(node.Name), node, newNode); err != nil { klog.Errorf("Error patching node with cloud ip addresses = [%v]", err) } } @@ -324,12 +328,6 @@ func (cnc *CloudNodeController) AddCloudNode(ctx context.Context, obj interface{ func (cnc *CloudNodeController) initializeNode(ctx context.Context, node *v1.Node) { klog.Infof("Initializing node %s with cloud provider", node.Name) - instances, ok := cnc.cloud.Instances() - if !ok { - utilruntime.HandleError(fmt.Errorf("failed to get instances from cloud provider")) - return - } - err := clientretry.RetryOnConflict(UpdateNodeSpecBackoff, func() error { // TODO(wlan0): Move this logic to the route controller using the node taint instead of condition // Since there are node taints, do we still need this? @@ -365,7 +363,9 @@ func (cnc *CloudNodeController) initializeNode(ctx context.Context, node *v1.Nod return } - nodeModifiers, err := cnc.getNodeModifiersFromCloudProvider(ctx, curNode, instances) + // TODO: getNodeModifiersFromCloudProvider and updateNodeAddress both call cloud api to get instanceMetadata, + // get instanceMetadata and pass it to getNodeModifiersFromCloudProvider and updateNodeAddress which reduces api calls. + nodeModifiers, err := cnc.getNodeModifiersFromCloudProvider(ctx, curNode) if err != nil { utilruntime.HandleError(fmt.Errorf("failed to initialize node %s at cloudprovider: %v", node.Name, err)) return @@ -392,7 +392,7 @@ func (cnc *CloudNodeController) initializeNode(ctx context.Context, node *v1.Nod // After adding, call UpdateNodeAddress to set the CloudProvider provided IPAddresses // So that users do not see any significant delay in IP addresses being filled into the node - cnc.updateNodeAddress(ctx, curNode, instances) + cnc.updateNodeAddress(ctx, curNode) klog.Infof("Successfully initialized node %s with cloud provider", node.Name) return nil @@ -407,7 +407,7 @@ func (cnc *CloudNodeController) initializeNode(ctx context.Context, node *v1.Nod // a node object with provider-specific information. // All of the returned functions are idempotent, because they are used in a retry-if-conflict // loop, meaning they could get called multiple times. -func (cnc *CloudNodeController) getNodeModifiersFromCloudProvider(ctx context.Context, node *v1.Node, instances cloudprovider.Instances) ([]nodeModifier, error) { +func (cnc *CloudNodeController) getNodeModifiersFromCloudProvider(ctx context.Context, node *v1.Node) ([]nodeModifier, error) { var ( nodeModifiers []nodeModifier providerID string @@ -437,30 +437,50 @@ func (cnc *CloudNodeController) getNodeModifiersFromCloudProvider(ctx context.Co providerID = node.Spec.ProviderID } - nodeAddresses, err := getNodeAddressesByProviderIDOrName(ctx, instances, providerID, node.Name) + instanceMetadataGetter := func(providerID string, nodeName string, node *v1.Node) (*cloudprovider.InstanceMetadata, error) { + if instancesV2, ok := cnc.cloud.InstancesV2(); instancesV2 != nil && ok { + return instancesV2.InstanceMetadata(ctx, node) + } + + // If InstancesV2 not implement, use Instances. + instances, ok := cnc.cloud.Instances() + if !ok { + return nil, fmt.Errorf("failed to get instances from cloud provider") + } + nodeAddresses, err := getNodeAddressesByProviderIDOrName(ctx, instances, providerID, nodeName) + if err != nil { + return nil, err + } + instanceType, err := getInstanceTypeByProviderIDOrName(ctx, instances, providerID, nodeName) + if err != nil { + return nil, err + } + return &cloudprovider.InstanceMetadata{ + InstanceType: instanceType, + NodeAddresses: nodeAddresses, + }, nil + } + + instanceMeta, err := instanceMetadataGetter(providerID, node.Name, node) if err != nil { return nil, err } // If user provided an IP address, ensure that IP address is found // in the cloud provider before removing the taint on the node - if nodeIP, ok := ensureNodeProvidedIPExists(node, nodeAddresses); ok { - if nodeIP == nil { - return nil, errors.New("failed to find kubelet node IP from cloud provider") - } + if nodeIP, ok := ensureNodeProvidedIPExists(node, instanceMeta.NodeAddresses); ok && nodeIP == nil { + return nil, errors.New("failed to find kubelet node IP from cloud provider") } - if instanceType, err := getInstanceTypeByProviderIDOrName(ctx, instances, providerID, node.Name); err != nil { - return nil, err - } else if instanceType != "" { - klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelInstanceType, instanceType) - klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelInstanceTypeStable, instanceType) + if instanceMeta.InstanceType != "" { + klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelInstanceType, instanceMeta.InstanceType) + klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelInstanceTypeStable, instanceMeta.InstanceType) nodeModifiers = append(nodeModifiers, func(n *v1.Node) { if n.Labels == nil { n.Labels = map[string]string{} } - n.Labels[v1.LabelInstanceType] = instanceType - n.Labels[v1.LabelInstanceTypeStable] = instanceType + n.Labels[v1.LabelInstanceType] = instanceMeta.InstanceType + n.Labels[v1.LabelInstanceTypeStable] = instanceMeta.InstanceType }) } @@ -571,7 +591,7 @@ func nodeAddressesChangeDetected(addressSet1, addressSet2 []v1.NodeAddress) bool func ensureNodeProvidedIPExists(node *v1.Node, nodeAddresses []v1.NodeAddress) (*v1.NodeAddress, bool) { var nodeIP *v1.NodeAddress nodeIPExists := false - if providedIP, ok := node.ObjectMeta.Annotations[kubeletapis.AnnotationProvidedIPAddr]; ok { + if providedIP, ok := node.ObjectMeta.Annotations[cloudproviderapi.AnnotationAlphaProvidedIPAddr]; ok { nodeIPExists = true for i := range nodeAddresses { if nodeAddresses[i].Address == providedIP { diff --git a/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/BUILD b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/BUILD new file mode 100644 index 00000000000..129e33da836 --- /dev/null +++ b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/BUILD @@ -0,0 +1,60 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["node_lifecycle_controller.go"], + importmap = "k8s.io/kubernetes/vendor/k8s.io/cloud-provider/controllers/nodelifecycle", + importpath = "k8s.io/cloud-provider/controllers/nodelifecycle", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//staging/src/k8s.io/cloud-provider:go_default_library", + "//staging/src/k8s.io/cloud-provider/api:go_default_library", + "//staging/src/k8s.io/cloud-provider/node/helpers:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = ["node_lifecycle_controller_test.go"], + embed = [":go_default_library"], + deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/client-go/informers:go_default_library", + "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//staging/src/k8s.io/cloud-provider/fake:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cloud/OWNERS b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/controller/cloud/OWNERS rename to vendor/k8s.io/cloud-provider/controllers/nodelifecycle/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cloud/node_lifecycle_controller.go b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go similarity index 64% rename from vendor/k8s.io/kubernetes/pkg/controller/cloud/node_lifecycle_controller.go rename to vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go index 078b2bf17c2..332ee8bc4d8 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cloud/node_lifecycle_controller.go +++ b/vendor/k8s.io/cloud-provider/controllers/nodelifecycle/node_lifecycle_controller.go @@ -37,8 +37,7 @@ import ( cloudprovider "k8s.io/cloud-provider" cloudproviderapi "k8s.io/cloud-provider/api" cloudnodeutil "k8s.io/cloud-provider/node/helpers" - "k8s.io/klog" - "k8s.io/kubernetes/pkg/controller" + "k8s.io/klog/v2" ) const ( @@ -73,7 +72,7 @@ func NewCloudNodeLifecycleController( eventBroadcaster := record.NewBroadcaster() recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "cloud-node-lifecycle-controller"}) - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) klog.Info("Sending events to api server") eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) @@ -86,7 +85,9 @@ func NewCloudNodeLifecycleController( return nil, errors.New("no cloud provider provided") } - if _, ok := cloud.Instances(); !ok { + _, instancesSupported := cloud.Instances() + _, instancesV2Supported := cloud.InstancesV2() + if !instancesSupported && !instancesV2Supported { return nil, errors.New("cloud provider does not support instances") } @@ -119,12 +120,6 @@ func (c *CloudNodeLifecycleController) Run(stopCh <-chan struct{}) { // or shutdown. If deleted, it deletes the node resource. If shutdown it // applies a shutdown taint to the node func (c *CloudNodeLifecycleController) MonitorNodes() { - instances, ok := c.cloud.Instances() - if !ok { - utilruntime.HandleError(fmt.Errorf("failed to get instances from cloud provider")) - return - } - nodes, err := c.nodeLister.List(labels.Everything()) if err != nil { klog.Errorf("error listing nodes from cache: %s", err) @@ -140,65 +135,66 @@ func (c *CloudNodeLifecycleController) MonitorNodes() { if status == v1.ConditionTrue { // if taint exist remove taint - err = controller.RemoveTaintOffNode(c.kubeClient, node.Name, node, ShutdownTaint) + err = cloudnodeutil.RemoveTaintOffNode(c.kubeClient, node.Name, node, ShutdownTaint) if err != nil { klog.Errorf("error patching node taints: %v", err) } continue } - // we need to check this first to get taint working in similar in all cloudproviders - // current problem is that shutdown nodes are not working in similar way ie. all cloudproviders - // does not delete node from kubernetes cluster when instance it is shutdown see issue #46442 - shutdown, err := shutdownInCloudProvider(context.TODO(), c.cloud, node) - if err != nil { - klog.Errorf("error checking if node %s is shutdown: %v", node.Name, err) - } - - if shutdown && err == nil { - // if node is shutdown add shutdown taint - err = controller.AddOrUpdateTaintOnNode(c.kubeClient, node.Name, ShutdownTaint) - if err != nil { - klog.Errorf("failed to apply shutdown taint to node %s, it may have been deleted.", node.Name) - } - // Continue checking the remaining nodes since the current one is shutdown. - continue - } - // At this point the node has NotReady status, we need to check if the node has been removed // from the cloud provider. If node cannot be found in cloudprovider, then delete the node - exists, err := ensureNodeExistsByProviderID(context.TODO(), instances, node) + exists, err := ensureNodeExistsByProviderID(context.TODO(), c.cloud, node) if err != nil { klog.Errorf("error checking if node %s exists: %v", node.Name, err) continue } - if exists { - // Continue checking the remaining nodes since the current one is fine. - continue - } + if !exists { + // Current node does not exist, we should delete it, its taints do not matter anymore - klog.V(2).Infof("deleting node since it is no longer present in cloud provider: %s", node.Name) + klog.V(2).Infof("deleting node since it is no longer present in cloud provider: %s", node.Name) - ref := &v1.ObjectReference{ - Kind: "Node", - Name: node.Name, - UID: types.UID(node.UID), - Namespace: "", - } + ref := &v1.ObjectReference{ + Kind: "Node", + Name: node.Name, + UID: types.UID(node.UID), + Namespace: "", + } - c.recorder.Eventf(ref, v1.EventTypeNormal, - fmt.Sprintf("Deleting node %v because it does not exist in the cloud provider", node.Name), - "Node %s event: %s", node.Name, deleteNodeEvent) + c.recorder.Eventf(ref, v1.EventTypeNormal, + fmt.Sprintf("Deleting node %v because it does not exist in the cloud provider", node.Name), + "Node %s event: %s", node.Name, deleteNodeEvent) - if err := c.kubeClient.CoreV1().Nodes().Delete(context.TODO(), node.Name, metav1.DeleteOptions{}); err != nil { - klog.Errorf("unable to delete node %q: %v", node.Name, err) + if err := c.kubeClient.CoreV1().Nodes().Delete(context.TODO(), node.Name, metav1.DeleteOptions{}); err != nil { + klog.Errorf("unable to delete node %q: %v", node.Name, err) + } + } else { + // Node exists. We need to check this to get taint working in similar in all cloudproviders + // current problem is that shutdown nodes are not working in similar way ie. all cloudproviders + // does not delete node from kubernetes cluster when instance it is shutdown see issue #46442 + shutdown, err := shutdownInCloudProvider(context.TODO(), c.cloud, node) + if err != nil { + klog.Errorf("error checking if node %s is shutdown: %v", node.Name, err) + } + + if shutdown && err == nil { + // if node is shutdown add shutdown taint + err = cloudnodeutil.AddOrUpdateTaintOnNode(c.kubeClient, node.Name, ShutdownTaint) + if err != nil { + klog.Errorf("failed to apply shutdown taint to node %s, it may have been deleted.", node.Name) + } + } } } } // shutdownInCloudProvider returns true if the node is shutdown on the cloud provider func shutdownInCloudProvider(ctx context.Context, cloud cloudprovider.Interface, node *v1.Node) (bool, error) { + if instanceV2, ok := cloud.InstancesV2(); ok { + return instanceV2.InstanceShutdown(ctx, node) + } + instances, ok := cloud.Instances() if !ok { return false, errors.New("cloud provider does not support instances") @@ -211,3 +207,35 @@ func shutdownInCloudProvider(ctx context.Context, cloud cloudprovider.Interface, return shutdown, err } + +// ensureNodeExistsByProviderID checks if the instance exists by the provider id, +// If provider id in spec is empty it calls instanceId with node name to get provider id +func ensureNodeExistsByProviderID(ctx context.Context, cloud cloudprovider.Interface, node *v1.Node) (bool, error) { + if instanceV2, ok := cloud.InstancesV2(); ok { + return instanceV2.InstanceExists(ctx, node) + } + + instances, ok := cloud.Instances() + if !ok { + return false, errors.New("instances interface not supported in the cloud provider") + } + + providerID := node.Spec.ProviderID + if providerID == "" { + var err error + providerID, err = instances.InstanceID(ctx, types.NodeName(node.Name)) + if err != nil { + if err == cloudprovider.InstanceNotFound { + return false, nil + } + return false, err + } + + if providerID == "" { + klog.Warningf("Cannot find valid providerID for node name %q, assuming non existence", node.Name) + return false, nil + } + } + + return instances.InstanceExistsByProviderID(ctx, providerID) +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/route/BUILD b/vendor/k8s.io/cloud-provider/controllers/route/BUILD similarity index 92% rename from vendor/k8s.io/kubernetes/pkg/controller/route/BUILD rename to vendor/k8s.io/cloud-provider/controllers/route/BUILD index d4815b01fac..d66f5d2472f 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/route/BUILD +++ b/vendor/k8s.io/cloud-provider/controllers/route/BUILD @@ -6,7 +6,8 @@ go_library( "doc.go", "route_controller.go", ], - importpath = "k8s.io/kubernetes/pkg/controller/route", + importmap = "k8s.io/kubernetes/vendor/k8s.io/cloud-provider/controllers/route", + importpath = "k8s.io/cloud-provider/controllers/route", visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", @@ -26,7 +27,7 @@ go_library( "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/node/helpers:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/route/OWNERS b/vendor/k8s.io/cloud-provider/controllers/route/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/controller/route/OWNERS rename to vendor/k8s.io/cloud-provider/controllers/route/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/controller/route/doc.go b/vendor/k8s.io/cloud-provider/controllers/route/doc.go similarity index 91% rename from vendor/k8s.io/kubernetes/pkg/controller/route/doc.go rename to vendor/k8s.io/cloud-provider/controllers/route/doc.go index d6cdbe9c643..cdc16d81a7c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/route/doc.go +++ b/vendor/k8s.io/cloud-provider/controllers/route/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package route contains code for syncing cloud routing rules with // the list of registered nodes. -package route // import "k8s.io/kubernetes/pkg/controller/route" +package route // import "k8s.io/cloud-provider/controllers/route" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/route/route_controller.go b/vendor/k8s.io/cloud-provider/controllers/route/route_controller.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/controller/route/route_controller.go rename to vendor/k8s.io/cloud-provider/controllers/route/route_controller.go index 6cff1d944cc..6f934223144 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/route/route_controller.go +++ b/vendor/k8s.io/cloud-provider/controllers/route/route_controller.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -77,7 +77,7 @@ func New(routes cloudprovider.Routes, kubeClient clientset.Interface, nodeInform } eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "route_controller"}) rc := &RouteController{ diff --git a/vendor/k8s.io/kubernetes/pkg/controller/service/BUILD b/vendor/k8s.io/cloud-provider/controllers/service/BUILD similarity index 85% rename from vendor/k8s.io/kubernetes/pkg/controller/service/BUILD rename to vendor/k8s.io/cloud-provider/controllers/service/BUILD index b21021e7824..8fbb3835587 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/service/BUILD +++ b/vendor/k8s.io/cloud-provider/controllers/service/BUILD @@ -6,7 +6,8 @@ go_library( "controller.go", "doc.go", ], - importpath = "k8s.io/kubernetes/pkg/controller/service", + importmap = "k8s.io/kubernetes/vendor/k8s.io/cloud-provider/controllers/service", + importpath = "k8s.io/cloud-provider/controllers/service", visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", @@ -15,7 +16,6 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", @@ -26,8 +26,9 @@ go_library( "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/service/helpers:go_default_library", + "//staging/src/k8s.io/component-base/featuregate:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -36,7 +37,6 @@ go_test( srcs = ["controller_test.go"], embed = [":go_default_library"], deps = [ - "//pkg/controller:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -44,14 +44,15 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/cloud-provider/fake:go_default_library", "//staging/src/k8s.io/cloud-provider/service/helpers:go_default_library", - "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", ], ) @@ -64,10 +65,7 @@ filegroup( filegroup( name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/controller/service/config:all-srcs", - ], + srcs = [":package-srcs"], tags = ["automanaged"], visibility = ["//visibility:public"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/service/OWNERS b/vendor/k8s.io/cloud-provider/controllers/service/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/controller/service/OWNERS rename to vendor/k8s.io/cloud-provider/controllers/service/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/controller/service/controller.go b/vendor/k8s.io/cloud-provider/controllers/service/controller.go similarity index 92% rename from vendor/k8s.io/kubernetes/pkg/controller/service/controller.go rename to vendor/k8s.io/cloud-provider/controllers/service/controller.go index 2cfc08363b1..9722439c2c5 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/service/controller.go +++ b/vendor/k8s.io/cloud-provider/controllers/service/controller.go @@ -19,18 +19,16 @@ package service import ( "context" "fmt" + "reflect" "sync" "time" - "reflect" - v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" - utilfeature "k8s.io/apiserver/pkg/util/feature" coreinformers "k8s.io/client-go/informers/core/v1" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/scheme" @@ -41,8 +39,9 @@ import ( "k8s.io/client-go/util/workqueue" cloudprovider "k8s.io/cloud-provider" servicehelper "k8s.io/cloud-provider/service/helpers" + "k8s.io/component-base/featuregate" "k8s.io/component-base/metrics/prometheus/ratelimiter" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -70,11 +69,6 @@ const ( // in 1.16 when the ServiceNodeExclusion gate is on. labelNodeRoleExcludeBalancer = "node.kubernetes.io/exclude-from-external-load-balancers" - // labelAlphaNodeRoleExcludeBalancer specifies that the node should be - // exclude from load balancers created by a cloud provider. This label is deprecated and will - // be removed in 1.18. - labelAlphaNodeRoleExcludeBalancer = "alpha.service-controller.kubernetes.io/exclude-balancer" - // serviceNodeExclusionFeature is the feature gate name that // enables nodes to exclude themselves from service load balancers // originated from: https://github.com/kubernetes/kubernetes/blob/28e800245e/pkg/features/kube_features.go#L178 @@ -101,6 +95,7 @@ type serviceCache struct { type Controller struct { cloud cloudprovider.Interface knownHosts []*v1.Node + knownHostsLock sync.Mutex servicesToUpdate []*v1.Service kubeClient clientset.Interface clusterName string @@ -115,6 +110,9 @@ type Controller struct { nodeListerSynced cache.InformerSynced // services that need to be synced queue workqueue.RateLimitingInterface + // feature gates stored in local field for better testability + legacyNodeRoleFeatureEnabled bool + serviceNodeExclusionFeatureEnabled bool } // New returns a new service controller to keep cloud provider service resources @@ -125,9 +123,10 @@ func New( serviceInformer coreinformers.ServiceInformer, nodeInformer coreinformers.NodeInformer, clusterName string, + featureGate featuregate.FeatureGate, ) (*Controller, error) { broadcaster := record.NewBroadcaster() - broadcaster.StartLogging(klog.Infof) + broadcaster.StartStructuredLogging(0) broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) recorder := broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "service-controller"}) @@ -138,16 +137,18 @@ func New( } s := &Controller{ - cloud: cloud, - knownHosts: []*v1.Node{}, - kubeClient: kubeClient, - clusterName: clusterName, - cache: &serviceCache{serviceMap: make(map[string]*cachedService)}, - eventBroadcaster: broadcaster, - eventRecorder: recorder, - nodeLister: nodeInformer.Lister(), - nodeListerSynced: nodeInformer.Informer().HasSynced, - queue: workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(minRetryDelay, maxRetryDelay), "service"), + cloud: cloud, + knownHosts: []*v1.Node{}, + kubeClient: kubeClient, + clusterName: clusterName, + cache: &serviceCache{serviceMap: make(map[string]*cachedService)}, + eventBroadcaster: broadcaster, + eventRecorder: recorder, + nodeLister: nodeInformer.Lister(), + nodeListerSynced: nodeInformer.Informer().HasSynced, + queue: workqueue.NewNamedRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(minRetryDelay, maxRetryDelay), "service"), + legacyNodeRoleFeatureEnabled: featureGate.Enabled(legacyNodeRoleBehaviorFeature), + serviceNodeExclusionFeatureEnabled: featureGate.Enabled(serviceNodeExclusionFeature), } serviceInformer.Informer().AddEventHandlerWithResyncPeriod( @@ -175,9 +176,39 @@ func New( s.serviceLister = serviceInformer.Lister() s.serviceListerSynced = serviceInformer.Informer().HasSynced + nodeInformer.Informer().AddEventHandlerWithResyncPeriod( + cache.ResourceEventHandlerFuncs{ + AddFunc: func(cur interface{}) { + s.nodeSyncLoop() + }, + UpdateFunc: func(old, cur interface{}) { + oldNode, ok := old.(*v1.Node) + if !ok { + return + } + + curNode, ok := cur.(*v1.Node) + if !ok { + return + } + + if !shouldSyncNode(oldNode, curNode) { + return + } + + s.nodeSyncLoop() + }, + DeleteFunc: func(old interface{}) { + s.nodeSyncLoop() + }, + }, + time.Duration(0), + ) + if err := s.init(); err != nil { return nil, err } + return s, nil } @@ -373,7 +404,7 @@ func (s *Controller) syncLoadBalancerIfNeeded(service *v1.Service, key string) ( } func (s *Controller) ensureLoadBalancer(service *v1.Service) (*v1.LoadBalancerStatus, error) { - nodes, err := listWithPredicate(s.nodeLister, getNodeConditionPredicate()) + nodes, err := listWithPredicate(s.nodeLister, s.getNodeConditionPredicate()) if err != nil { return nil, err } @@ -602,26 +633,16 @@ func nodeSlicesEqualForLB(x, y []*v1.Node) bool { return nodeNames(x).Equal(nodeNames(y)) } -func getNodeConditionPredicate() NodeConditionPredicate { +func (s *Controller) getNodeConditionPredicate() NodeConditionPredicate { return func(node *v1.Node) bool { - // We add the master to the node list, but its unschedulable. So we use this to filter - // the master. - if node.Spec.Unschedulable { - return false - } - - if utilfeature.DefaultFeatureGate.Enabled(legacyNodeRoleBehaviorFeature) { + if s.legacyNodeRoleFeatureEnabled { // As of 1.6, we will taint the master, but not necessarily mark it unschedulable. // Recognize nodes labeled as master, and filter them also, as we were doing previously. if _, hasMasterRoleLabel := node.Labels[labelNodeRoleMaster]; hasMasterRoleLabel { return false } } - if utilfeature.DefaultFeatureGate.Enabled(serviceNodeExclusionFeature) { - // Will be removed in 1.18 - if _, hasExcludeBalancerLabel := node.Labels[labelAlphaNodeRoleExcludeBalancer]; hasExcludeBalancerLabel { - return false - } + if s.serviceNodeExclusionFeatureEnabled { if _, hasExcludeBalancerLabel := node.Labels[labelNodeRoleExcludeBalancer]; hasExcludeBalancerLabel { return false } @@ -643,10 +664,36 @@ func getNodeConditionPredicate() NodeConditionPredicate { } } +func shouldSyncNode(oldNode, newNode *v1.Node) bool { + if oldNode.Spec.Unschedulable != newNode.Spec.Unschedulable { + return true + } + + if !reflect.DeepEqual(oldNode.Labels, newNode.Labels) { + return true + } + + return nodeReadyConditionStatus(oldNode) != nodeReadyConditionStatus(newNode) +} + +func nodeReadyConditionStatus(node *v1.Node) v1.ConditionStatus { + for _, condition := range node.Status.Conditions { + if condition.Type != v1.NodeReady { + continue + } + + return condition.Status + } + + return "" +} + // nodeSyncLoop handles updating the hosts pointed to by all load // balancers whenever the set of nodes in the cluster changes. func (s *Controller) nodeSyncLoop() { - newHosts, err := listWithPredicate(s.nodeLister, getNodeConditionPredicate()) + s.knownHostsLock.Lock() + defer s.knownHostsLock.Unlock() + newHosts, err := listWithPredicate(s.nodeLister, s.getNodeConditionPredicate()) if err != nil { runtime.HandleError(fmt.Errorf("Failed to retrieve current set of nodes from node lister: %v", err)) return diff --git a/vendor/k8s.io/kubernetes/pkg/controller/service/doc.go b/vendor/k8s.io/cloud-provider/controllers/service/doc.go similarity index 90% rename from vendor/k8s.io/kubernetes/pkg/controller/service/doc.go rename to vendor/k8s.io/cloud-provider/controllers/service/doc.go index 1c4e0558d78..252a23e5026 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/service/doc.go +++ b/vendor/k8s.io/cloud-provider/controllers/service/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package service contains code for syncing cloud load balancers // with the service registry. -package service // import "k8s.io/kubernetes/pkg/controller/service" +package service // import "k8s.io/cloud-provider/controllers/service" diff --git a/vendor/k8s.io/cloud-provider/go.mod b/vendor/k8s.io/cloud-provider/go.mod index 4981317e20b..0624e65d53b 100644 --- a/vendor/k8s.io/cloud-provider/go.mod +++ b/vendor/k8s.io/cloud-provider/go.mod @@ -2,21 +2,23 @@ module k8s.io/cloud-provider -go 1.13 +go 1.15 require ( + github.com/google/go-cmp v0.4.0 + github.com/stretchr/testify v1.4.0 k8s.io/api v0.0.0 k8s.io/apimachinery v0.0.0 k8s.io/client-go v0.0.0 - k8s.io/klog v1.0.0 - k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 + k8s.io/component-base v0.0.0 + k8s.io/klog/v2 v2.2.0 + k8s.io/utils v0.0.0-20200729134348-d5654de09c73 ) replace ( - golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // pinned to release-branch.go1.13 - golang.org/x/tools => golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7 // pinned to release-branch.go1.13 k8s.io/api => ../api k8s.io/apimachinery => ../apimachinery k8s.io/client-go => ../client-go k8s.io/cloud-provider => ../cloud-provider + k8s.io/component-base => ../component-base ) diff --git a/vendor/k8s.io/cloud-provider/go.sum b/vendor/k8s.io/cloud-provider/go.sum index 3fd721449f4..9003a4c7d56 100644 --- a/vendor/k8s.io/cloud-provider/go.sum +++ b/vendor/k8s.io/cloud-provider/go.sum @@ -1,83 +1,153 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/blang/semver v3.5.0+incompatible h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs= +github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b h1:vCplRbYcTTeBVLjIU0KvipEeVBSxl6sakUBRmeLBTkw= -github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0 h1:rVsPeBmXbYv4If/cumu1AzZPwV58q433hvONV1UEZoI= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -85,6 +155,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -94,70 +165,204 @@ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGV github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -166,22 +371,28 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/vendor/k8s.io/cloud-provider/node/helpers/BUILD b/vendor/k8s.io/cloud-provider/node/helpers/BUILD index a1fc3a33de7..7bff59248f4 100644 --- a/vendor/k8s.io/cloud-provider/node/helpers/BUILD +++ b/vendor/k8s.io/cloud-provider/node/helpers/BUILD @@ -6,6 +6,7 @@ go_library( "address.go", "conditions.go", "labels.go", + "status.go", "taints.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/cloud-provider/node/helpers", @@ -20,8 +21,9 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/util/retry:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -41,7 +43,10 @@ filegroup( go_test( name = "go_default_test", - srcs = ["address_test.go"], + srcs = [ + "address_test.go", + "taints_test.go", + ], embed = [":go_default_library"], deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", diff --git a/vendor/k8s.io/cloud-provider/node/helpers/labels.go b/vendor/k8s.io/cloud-provider/node/helpers/labels.go index 94f53edab93..2a6e1bd9741 100644 --- a/vendor/k8s.io/cloud-provider/node/helpers/labels.go +++ b/vendor/k8s.io/cloud-provider/node/helpers/labels.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" clientset "k8s.io/client-go/kubernetes" clientretry "k8s.io/client-go/util/retry" - "k8s.io/klog" + "k8s.io/klog/v2" ) var updateLabelBackoff = wait.Backoff{ diff --git a/vendor/k8s.io/cloud-provider/node/helpers/status.go b/vendor/k8s.io/cloud-provider/node/helpers/status.go new file mode 100644 index 00000000000..6330bd78c41 --- /dev/null +++ b/vendor/k8s.io/cloud-provider/node/helpers/status.go @@ -0,0 +1,140 @@ +/* +Copyright 2019 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. +*/ + +/* + +NOTE: the contents of this file has been copied from k8s.io/kubernetes/pkg/util/node. The reason for duplicating this code is to remove +dependencies for cloud controller manager. +*/ + +package helpers + +import ( + "context" + "encoding/json" + "fmt" + + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/strategicpatch" + v1core "k8s.io/client-go/kubernetes/typed/core/v1" +) + +// PatchNodeStatus patches node status. +func PatchNodeStatus(c v1core.CoreV1Interface, nodeName types.NodeName, oldNode *v1.Node, newNode *v1.Node) (*v1.Node, []byte, error) { + patchBytes, err := preparePatchBytesforNodeStatus(nodeName, oldNode, newNode) + if err != nil { + return nil, nil, err + } + + updatedNode, err := c.Nodes().Patch(context.TODO(), string(nodeName), types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}, "status") + if err != nil { + return nil, nil, fmt.Errorf("failed to patch status %q for node %q: %v", patchBytes, nodeName, err) + } + return updatedNode, patchBytes, nil +} + +func preparePatchBytesforNodeStatus(nodeName types.NodeName, oldNode *v1.Node, newNode *v1.Node) ([]byte, error) { + oldData, err := json.Marshal(oldNode) + if err != nil { + return nil, fmt.Errorf("failed to Marshal oldData for node %q: %v", nodeName, err) + } + + // NodeStatus.Addresses is incorrectly annotated as patchStrategy=merge, which + // will cause strategicpatch.CreateTwoWayMergePatch to create an incorrect patch + // if it changed. + manuallyPatchAddresses := (len(oldNode.Status.Addresses) > 0) && !equality.Semantic.DeepEqual(oldNode.Status.Addresses, newNode.Status.Addresses) + + // Reset spec to make sure only patch for Status or ObjectMeta is generated. + // Note that we don't reset ObjectMeta here, because: + // 1. This aligns with Nodes().UpdateStatus(). + // 2. Some component does use this to update node annotations. + diffNode := newNode.DeepCopy() + diffNode.Spec = oldNode.Spec + if manuallyPatchAddresses { + diffNode.Status.Addresses = oldNode.Status.Addresses + } + newData, err := json.Marshal(diffNode) + if err != nil { + return nil, fmt.Errorf("failed to Marshal newData for node %q: %v", nodeName, err) + } + + patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, v1.Node{}) + if err != nil { + return nil, fmt.Errorf("failed to CreateTwoWayMergePatch for node %q: %v", nodeName, err) + } + if manuallyPatchAddresses { + patchBytes, err = fixupPatchForNodeStatusAddresses(patchBytes, newNode.Status.Addresses) + if err != nil { + return nil, fmt.Errorf("failed to fix up NodeAddresses in patch for node %q: %v", nodeName, err) + } + } + + return patchBytes, nil +} + +// fixupPatchForNodeStatusAddresses adds a replace-strategy patch for Status.Addresses to +// the existing patch +func fixupPatchForNodeStatusAddresses(patchBytes []byte, addresses []v1.NodeAddress) ([]byte, error) { + // Given patchBytes='{"status": {"conditions": [ ... ], "phase": ...}}' and + // addresses=[{"type": "InternalIP", "address": "10.0.0.1"}], we need to generate: + // + // { + // "status": { + // "conditions": [ ... ], + // "phase": ..., + // "addresses": [ + // { + // "type": "InternalIP", + // "address": "10.0.0.1" + // }, + // { + // "$patch": "replace" + // } + // ] + // } + // } + + var patchMap map[string]interface{} + if err := json.Unmarshal(patchBytes, &patchMap); err != nil { + return nil, err + } + + addrBytes, err := json.Marshal(addresses) + if err != nil { + return nil, err + } + var addrArray []interface{} + if err := json.Unmarshal(addrBytes, &addrArray); err != nil { + return nil, err + } + addrArray = append(addrArray, map[string]interface{}{"$patch": "replace"}) + + status := patchMap["status"] + if status == nil { + status = map[string]interface{}{} + patchMap["status"] = status + } + statusMap, ok := status.(map[string]interface{}) + if !ok { + return nil, fmt.Errorf("unexpected data in patch") + } + statusMap["addresses"] = addrArray + + return json.Marshal(patchMap) +} diff --git a/vendor/k8s.io/cloud-provider/node/helpers/taints.go b/vendor/k8s.io/cloud-provider/node/helpers/taints.go index fa8009dd491..ca6d27336a3 100644 --- a/vendor/k8s.io/cloud-provider/node/helpers/taints.go +++ b/vendor/k8s.io/cloud-provider/node/helpers/taints.go @@ -139,3 +139,102 @@ func addOrUpdateTaint(node *v1.Node, taint *v1.Taint) (*v1.Node, bool, error) { newNode.Spec.Taints = newTaints return newNode, true, nil } + +// RemoveTaintOffNode is for cleaning up taints temporarily added to node, +// won't fail if target taint doesn't exist or has been removed. +// If passed a node it'll check if there's anything to be done, if taint is not present it won't issue +// any API calls. +func RemoveTaintOffNode(c clientset.Interface, nodeName string, node *v1.Node, taints ...*v1.Taint) error { + if len(taints) == 0 { + return nil + } + // Short circuit for limiting amount of API calls. + if node != nil { + match := false + for _, taint := range taints { + if taintExists(node.Spec.Taints, taint) { + match = true + break + } + } + if !match { + return nil + } + } + + firstTry := true + return clientretry.RetryOnConflict(updateTaintBackoff, func() error { + var err error + var oldNode *v1.Node + // First we try getting node from the API server cache, as it's cheaper. If it fails + // we get it from etcd to be sure to have fresh data. + if firstTry { + oldNode, err = c.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{ResourceVersion: "0"}) + firstTry = false + } else { + oldNode, err = c.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) + } + if err != nil { + return err + } + + var newNode *v1.Node + oldNodeCopy := oldNode + updated := false + for _, taint := range taints { + curNewNode, ok, err := removeTaint(oldNodeCopy, taint) + if err != nil { + return fmt.Errorf("failed to remove taint of node") + } + updated = updated || ok + newNode = curNewNode + oldNodeCopy = curNewNode + } + if !updated { + return nil + } + return PatchNodeTaints(c, nodeName, oldNode, newNode) + }) +} + +// taintExists checks if the given taint exists in list of taints. Returns true if exists false otherwise. +func taintExists(taints []v1.Taint, taintToFind *v1.Taint) bool { + for _, taint := range taints { + if taint.MatchTaint(taintToFind) { + return true + } + } + return false +} + +// removeTaint tries to remove a taint from annotations list. Returns a new copy of updated Node and true if something was updated +// false otherwise. +func removeTaint(node *v1.Node, taint *v1.Taint) (*v1.Node, bool, error) { + newNode := node.DeepCopy() + nodeTaints := newNode.Spec.Taints + if len(nodeTaints) == 0 { + return newNode, false, nil + } + + if !taintExists(nodeTaints, taint) { + return newNode, false, nil + } + + newTaints, _ := deleteTaint(nodeTaints, taint) + newNode.Spec.Taints = newTaints + return newNode, true, nil +} + +// deleteTaint removes all the taints that have the same key and effect to given taintToDelete. +func deleteTaint(taints []v1.Taint, taintToDelete *v1.Taint) ([]v1.Taint, bool) { + newTaints := []v1.Taint{} + deleted := false + for i := range taints { + if taintToDelete.MatchTaint(&taints[i]) { + deleted = true + continue + } + newTaints = append(newTaints, taints[i]) + } + return newTaints, deleted +} diff --git a/vendor/k8s.io/cloud-provider/plugins.go b/vendor/k8s.io/cloud-provider/plugins.go index e8a41d87aac..e408e9cbc48 100644 --- a/vendor/k8s.io/cloud-provider/plugins.go +++ b/vendor/k8s.io/cloud-provider/plugins.go @@ -22,7 +22,7 @@ import ( "os" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Factory is a function that returns a cloudprovider.Interface. @@ -91,13 +91,28 @@ func IsExternal(name string) bool { return name == externalCloudProvider } +func DeprecationWarningForProvider(providerName string) { + for _, provider := range deprecatedCloudProviders { + if provider.name != providerName { + continue + } + + detail := provider.detail + if provider.external { + detail = fmt.Sprintf("Please use 'external' cloud provider for %s: %s", providerName, provider.detail) + } + + klog.Warningf("WARNING: %s built-in cloud provider is now deprecated. %s", providerName, detail) + break + } +} + // InitCloudProvider creates an instance of the named cloud provider. func InitCloudProvider(name string, configFilePath string) (Interface, error) { var cloud Interface var err error if name == "" { - klog.Info("No cloud provider specified.") return nil, nil } @@ -106,18 +121,6 @@ func InitCloudProvider(name string, configFilePath string) (Interface, error) { return nil, nil } - for _, provider := range deprecatedCloudProviders { - if provider.name == name { - detail := provider.detail - if provider.external { - detail = fmt.Sprintf("Please use 'external' cloud provider for %s: %s", name, provider.detail) - } - klog.Warningf("WARNING: %s built-in cloud provider is now deprecated. %s", name, detail) - - break - } - } - if configFilePath != "" { var config *os.File config, err = os.Open(configFilePath) diff --git a/vendor/k8s.io/cloud-provider/ports.go b/vendor/k8s.io/cloud-provider/ports.go new file mode 100644 index 00000000000..797de6d9287 --- /dev/null +++ b/vendor/k8s.io/cloud-provider/ports.go @@ -0,0 +1,23 @@ +/* +Copyright 2014 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 cloudprovider + +const ( + // CloudControllerManagerPort is the default port for the cloud controller manager server. + // This value may be overridden by a flag at startup. + CloudControllerManagerPort = 10258 +) diff --git a/vendor/k8s.io/cloud-provider/volume/helpers/BUILD b/vendor/k8s.io/cloud-provider/volume/helpers/BUILD index 03d159ae07b..515b7643c78 100644 --- a/vendor/k8s.io/cloud-provider/volume/helpers/BUILD +++ b/vendor/k8s.io/cloud-provider/volume/helpers/BUILD @@ -14,7 +14,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/cloud-provider/volume:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/cloud-provider/volume/helpers/rounding.go b/vendor/k8s.io/cloud-provider/volume/helpers/rounding.go index a4ccaa03480..7adf345007a 100644 --- a/vendor/k8s.io/cloud-provider/volume/helpers/rounding.go +++ b/vendor/k8s.io/cloud-provider/volume/helpers/rounding.go @@ -39,74 +39,88 @@ const ( KiB = 1024 ) -// RoundUpToGB rounds up given quantity to chunks of GB -func RoundUpToGB(size resource.Quantity) int64 { - requestBytes := size.Value() - return roundUpSize(requestBytes, GB) -} - // RoundUpToGiB rounds up given quantity upto chunks of GiB -func RoundUpToGiB(size resource.Quantity) int64 { - requestBytes := size.Value() - return roundUpSize(requestBytes, GiB) +func RoundUpToGiB(size resource.Quantity) (int64, error) { + requestBytes, ok := size.AsInt64() + if !ok { + return 0, fmt.Errorf("quantity %s is too great, overflows int64", size.String()) + } + return roundUpSize(requestBytes, GiB), nil } // RoundUpToMB rounds up given quantity to chunks of MB -func RoundUpToMB(size resource.Quantity) int64 { - requestBytes := size.Value() - return roundUpSize(requestBytes, MB) +func RoundUpToMB(size resource.Quantity) (int64, error) { + requestBytes, ok := size.AsInt64() + if !ok { + return 0, fmt.Errorf("quantity %s is too great, overflows int64", size.String()) + } + return roundUpSize(requestBytes, MB), nil } // RoundUpToMiB rounds up given quantity upto chunks of MiB -func RoundUpToMiB(size resource.Quantity) int64 { - requestBytes := size.Value() - return roundUpSize(requestBytes, MiB) +func RoundUpToMiB(size resource.Quantity) (int64, error) { + requestBytes, ok := size.AsInt64() + if !ok { + return 0, fmt.Errorf("quantity %s is too great, overflows int64", size.String()) + } + return roundUpSize(requestBytes, MiB), nil } // RoundUpToKB rounds up given quantity to chunks of KB -func RoundUpToKB(size resource.Quantity) int64 { - requestBytes := size.Value() - return roundUpSize(requestBytes, KB) +func RoundUpToKB(size resource.Quantity) (int64, error) { + requestBytes, ok := size.AsInt64() + if !ok { + return 0, fmt.Errorf("quantity %s is too great, overflows int64", size.String()) + } + return roundUpSize(requestBytes, KB), nil } // RoundUpToKiB rounds up given quantity upto chunks of KiB -func RoundUpToKiB(size resource.Quantity) int64 { - requestBytes := size.Value() - return roundUpSize(requestBytes, KiB) -} - -// RoundUpToGBInt rounds up given quantity to chunks of GB. It returns an -// int instead of an int64 and an error if there's overflow -func RoundUpToGBInt(size resource.Quantity) (int, error) { - requestBytes := size.Value() - return roundUpSizeInt(requestBytes, GB) +func RoundUpToKiB(size resource.Quantity) (int64, error) { + requestBytes, ok := size.AsInt64() + if !ok { + return 0, fmt.Errorf("quantity %s is too great, overflows int64", size.String()) + } + return roundUpSize(requestBytes, KiB), nil } // RoundUpToGiBInt rounds up given quantity upto chunks of GiB. It returns an // int instead of an int64 and an error if there's overflow func RoundUpToGiBInt(size resource.Quantity) (int, error) { - requestBytes := size.Value() + requestBytes, ok := size.AsInt64() + if !ok { + return 0, fmt.Errorf("quantity %s is too great, overflows int64", size.String()) + } return roundUpSizeInt(requestBytes, GiB) } // RoundUpToMBInt rounds up given quantity to chunks of MB. It returns an // int instead of an int64 and an error if there's overflow func RoundUpToMBInt(size resource.Quantity) (int, error) { - requestBytes := size.Value() + requestBytes, ok := size.AsInt64() + if !ok { + return 0, fmt.Errorf("quantity %s is too great, overflows int64", size.String()) + } return roundUpSizeInt(requestBytes, MB) } // RoundUpToMiBInt rounds up given quantity upto chunks of MiB. It returns an // int instead of an int64 and an error if there's overflow func RoundUpToMiBInt(size resource.Quantity) (int, error) { - requestBytes := size.Value() + requestBytes, ok := size.AsInt64() + if !ok { + return 0, fmt.Errorf("quantity %s is too great, overflows int64", size.String()) + } return roundUpSizeInt(requestBytes, MiB) } // RoundUpToKBInt rounds up given quantity to chunks of KB. It returns an // int instead of an int64 and an error if there's overflow func RoundUpToKBInt(size resource.Quantity) (int, error) { - requestBytes := size.Value() + requestBytes, ok := size.AsInt64() + if !ok { + return 0, fmt.Errorf("quantity %s is too great, overflows int64", size.String()) + } return roundUpSizeInt(requestBytes, KB) } @@ -117,6 +131,16 @@ func RoundUpToKiBInt(size resource.Quantity) (int, error) { return roundUpSizeInt(requestBytes, KiB) } +// RoundUpToGiBInt32 rounds up given quantity up to chunks of GiB. It returns an +// int32 instead of an int64 and an error if there's overflow +func RoundUpToGiBInt32(size resource.Quantity) (int32, error) { + requestBytes, ok := size.AsInt64() + if !ok { + return 0, fmt.Errorf("quantity %s is too great, overflows int64", size.String()) + } + return roundUpSizeInt32(requestBytes, GiB) +} + // roundUpSizeInt calculates how many allocation units are needed to accommodate // a volume of given size. It returns an int instead of an int64 and an error if // there's overflow @@ -129,6 +153,18 @@ func roundUpSizeInt(volumeSizeBytes int64, allocationUnitBytes int64) (int, erro return roundedUpInt, nil } +// roundUpSizeInt32 calculates how many allocation units are needed to accommodate +// a volume of given size. It returns an int32 instead of an int64 and an error if +// there's overflow +func roundUpSizeInt32(volumeSizeBytes int64, allocationUnitBytes int64) (int32, error) { + roundedUp := roundUpSize(volumeSizeBytes, allocationUnitBytes) + roundedUpInt32 := int32(roundedUp) + if int64(roundedUpInt32) != roundedUp { + return 0, fmt.Errorf("quantity %v is too great, overflows int32", roundedUp) + } + return roundedUpInt32, nil +} + // roundUpSize calculates how many allocation units are needed to accommodate // a volume of given size. E.g. when user wants 1500MiB volume, while AWS EBS // allocates volumes in gibibyte-sized chunks, diff --git a/vendor/k8s.io/cloud-provider/volume/helpers/zones.go b/vendor/k8s.io/cloud-provider/volume/helpers/zones.go index ec9c5d99158..a058067e0a6 100644 --- a/vendor/k8s.io/cloud-provider/volume/helpers/zones.go +++ b/vendor/k8s.io/cloud-provider/volume/helpers/zones.go @@ -26,7 +26,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" cloudvolume "k8s.io/cloud-provider/volume" - "k8s.io/klog" + "k8s.io/klog/v2" ) // LabelZonesToSet converts a PV label value from string containing a delimited list of zones to set diff --git a/vendor/k8s.io/cluster-bootstrap/util/secrets/BUILD b/vendor/k8s.io/cluster-bootstrap/util/secrets/BUILD index d077e5d8261..1db28910d57 100644 --- a/vendor/k8s.io/cluster-bootstrap/util/secrets/BUILD +++ b/vendor/k8s.io/cluster-bootstrap/util/secrets/BUILD @@ -11,7 +11,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/cluster-bootstrap/token/api:go_default_library", "//staging/src/k8s.io/cluster-bootstrap/token/util:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/cluster-bootstrap/util/secrets/secrets.go b/vendor/k8s.io/cluster-bootstrap/util/secrets/secrets.go index f62c85dad68..73894ee0d24 100644 --- a/vendor/k8s.io/cluster-bootstrap/util/secrets/secrets.go +++ b/vendor/k8s.io/cluster-bootstrap/util/secrets/secrets.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/cluster-bootstrap/token/api" legacyutil "k8s.io/cluster-bootstrap/token/util" - "k8s.io/klog" + "k8s.io/klog/v2" ) var ( diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/BUILD b/vendor/k8s.io/code-generator/cmd/client-gen/generators/BUILD index 36dcab0604a..adf7860179d 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/BUILD +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/BUILD @@ -28,7 +28,7 @@ go_library( "//vendor/k8s.io/gengo/generator:go_default_library", "//vendor/k8s.io/gengo/namer:go_default_library", "//vendor/k8s.io/gengo/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go index a678a357bbf..2c0bc9b5c46 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go @@ -33,7 +33,7 @@ import ( "k8s.io/gengo/namer" "k8s.io/gengo/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // NameSystems returns the name system used by the generators in this package. diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go index a698a28b681..a87d7571eb6 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go @@ -87,6 +87,7 @@ func (g *GenScheme) GenerateType(c *generator.Context, t *types.Type, w io.Write allInstallGroups := clientgentypes.ToGroupInstallPackages(g.Groups, g.GroupGoNames) m := map[string]interface{}{ + "publicScheme": !g.PrivateScheme, "allGroupVersions": allGroupVersions, "allInstallGroups": allInstallGroups, "customRegister": false, @@ -133,7 +134,7 @@ func (g *GenScheme) GenerateType(c *generator.Context, t *types.Type, w io.Write var globalsTemplate = ` var $.Scheme$ = $.runtimeNewScheme|raw$() var $.Codecs$ = $.serializerNewCodecFactory|raw$($.Scheme$) -var $.ParameterCodec$ = $.runtimeNewParameterCodec|raw$($.Scheme$)` +$if .publicScheme$var $.ParameterCodec$ = $.runtimeNewParameterCodec|raw$($.Scheme$)$end -$` var registryRegistration = ` diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/BUILD b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/BUILD index 91f0b66d823..4224753174c 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/BUILD +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/BUILD @@ -29,7 +29,7 @@ go_library( "//vendor/k8s.io/gengo/generator:go_default_library", "//vendor/k8s.io/gengo/namer:go_default_library", "//vendor/k8s.io/gengo/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go index 6e5793109ba..1ee9fa5d39d 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factory.go @@ -25,7 +25,7 @@ import ( "k8s.io/gengo/namer" "k8s.io/gengo/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // factoryGenerator produces a file of listers for a given GroupVersion and diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go index fc0668c5bed..70826ebaad5 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/factoryinterface.go @@ -23,7 +23,7 @@ import ( "k8s.io/gengo/namer" "k8s.io/gengo/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // factoryInterfaceGenerator produces a file of interfaces used to break a dependency cycle for diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go index bb73c0db012..a5a42953d22 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go @@ -73,9 +73,11 @@ type group struct { type groupSort []group -func (g groupSort) Len() int { return len(g) } -func (g groupSort) Less(i, j int) bool { return strings.ToLower(g[i].Name) < strings.ToLower(g[j].Name) } -func (g groupSort) Swap(i, j int) { g[i], g[j] = g[j], g[i] } +func (g groupSort) Len() int { return len(g) } +func (g groupSort) Less(i, j int) bool { + return strings.ToLower(g[i].Name) < strings.ToLower(g[j].Name) +} +func (g groupSort) Swap(i, j int) { g[i], g[j] = g[j], g[i] } type version struct { Name string diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go index d7b60eccceb..da00e6e61fe 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go @@ -28,7 +28,7 @@ import ( "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // informerGenerator produces a file of listers for a given GroupVersion and diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go index 04a953122fb..2eaa7cc9307 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go @@ -26,7 +26,7 @@ import ( "k8s.io/gengo/generator" "k8s.io/gengo/namer" "k8s.io/gengo/types" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/BUILD b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/BUILD index e301f6e43e5..4d98af14893 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/BUILD +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/BUILD @@ -20,7 +20,7 @@ go_library( "//vendor/k8s.io/gengo/generator:go_default_library", "//vendor/k8s.io/gengo/namer:go_default_library", "//vendor/k8s.io/gengo/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go index e10e9fb2f19..496145b14a6 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go @@ -30,7 +30,7 @@ import ( "k8s.io/code-generator/cmd/client-gen/generators/util" clientgentypes "k8s.io/code-generator/cmd/client-gen/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // NameSystems returns the name system used by the generators in this package. @@ -258,8 +258,10 @@ func (g *listerGenerator) GenerateType(c *generator.Context, t *types.Type, w io var typeListerInterface = ` // $.type|public$Lister helps list $.type|publicPlural$. +// All objects returned here must be treated as read-only. type $.type|public$Lister interface { // List lists all $.type|publicPlural$ in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*$.type|raw$, err error) // $.type|publicPlural$ returns an object that can list and get $.type|publicPlural$. $.type|publicPlural$(namespace string) $.type|public$NamespaceLister @@ -269,10 +271,13 @@ type $.type|public$Lister interface { var typeListerInterface_NonNamespaced = ` // $.type|public$Lister helps list $.type|publicPlural$. +// All objects returned here must be treated as read-only. type $.type|public$Lister interface { // List lists all $.type|publicPlural$ in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*$.type|raw$, err error) // Get retrieves the $.type|public$ from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*$.type|raw$, error) $.type|public$ListerExpansion } @@ -325,10 +330,13 @@ func (s *$.type|private$Lister) Get(name string) (*$.type|raw$, error) { var namespaceListerInterface = ` // $.type|public$NamespaceLister helps list and get $.type|publicPlural$. +// All objects returned here must be treated as read-only. type $.type|public$NamespaceLister interface { // List lists all $.type|publicPlural$ in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*$.type|raw$, err error) // Get retrieves the $.type|public$ from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*$.type|raw$, error) $.type|public$NamespaceListerExpansion } diff --git a/vendor/k8s.io/component-base/cli/flag/BUILD b/vendor/k8s.io/component-base/cli/flag/BUILD index 8a09eea7623..6efdc3379d9 100644 --- a/vendor/k8s.io/component-base/cli/flag/BUILD +++ b/vendor/k8s.io/component-base/cli/flag/BUILD @@ -24,6 +24,7 @@ go_library( name = "go_default_library", srcs = [ "ciphersuites_flag.go", + "ciphersuites_flag_114.go", "colon_separated_multimap_string_string.go", "configuration_map.go", "flags.go", @@ -42,7 +43,7 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/component-base/cli/flag/ciphersuites_flag.go b/vendor/k8s.io/component-base/cli/flag/ciphersuites_flag.go index 4fecd173296..a52faf91975 100644 --- a/vendor/k8s.io/component-base/cli/flag/ciphersuites_flag.go +++ b/vendor/k8s.io/component-base/cli/flag/ciphersuites_flag.go @@ -25,32 +25,61 @@ import ( // ciphers maps strings into tls package cipher constants in // https://golang.org/pkg/crypto/tls/#pkg-constants +// to be replaced by tls.CipherSuites() when the project migrates to go1.14. var ciphers = map[string]uint16{ - "TLS_RSA_WITH_RC4_128_SHA": tls.TLS_RSA_WITH_RC4_128_SHA, "TLS_RSA_WITH_3DES_EDE_CBC_SHA": tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, "TLS_RSA_WITH_AES_128_CBC_SHA": tls.TLS_RSA_WITH_AES_128_CBC_SHA, "TLS_RSA_WITH_AES_256_CBC_SHA": tls.TLS_RSA_WITH_AES_256_CBC_SHA, - "TLS_RSA_WITH_AES_128_CBC_SHA256": tls.TLS_RSA_WITH_AES_128_CBC_SHA256, "TLS_RSA_WITH_AES_128_GCM_SHA256": tls.TLS_RSA_WITH_AES_128_GCM_SHA256, "TLS_RSA_WITH_AES_256_GCM_SHA384": tls.TLS_RSA_WITH_AES_256_GCM_SHA384, - "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, - "TLS_ECDHE_RSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA, "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, - "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, + "TLS_AES_128_GCM_SHA256": tls.TLS_AES_128_GCM_SHA256, + "TLS_CHACHA20_POLY1305_SHA256": tls.TLS_CHACHA20_POLY1305_SHA256, + "TLS_AES_256_GCM_SHA384": tls.TLS_AES_256_GCM_SHA384, } -func TLSCipherPossibleValues() []string { +// to be replaced by tls.InsecureCipherSuites() when the project migrates to go1.14. +var insecureCiphers = map[string]uint16{ + "TLS_RSA_WITH_RC4_128_SHA": tls.TLS_RSA_WITH_RC4_128_SHA, + "TLS_RSA_WITH_AES_128_CBC_SHA256": tls.TLS_RSA_WITH_AES_128_CBC_SHA256, + "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, + "TLS_ECDHE_RSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA, + "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, + "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, +} + +// InsecureTLSCiphers returns the cipher suites implemented by crypto/tls which have +// security issues. +func InsecureTLSCiphers() map[string]uint16 { + cipherKeys := make(map[string]uint16, len(insecureCiphers)) + for k, v := range insecureCiphers { + cipherKeys[k] = v + } + return cipherKeys +} + +// InsecureTLSCipherNames returns a list of cipher suite names implemented by crypto/tls +// which have security issues. +func InsecureTLSCipherNames() []string { + cipherKeys := sets.NewString() + for key := range insecureCiphers { + cipherKeys.Insert(key) + } + return cipherKeys.List() +} + +// PreferredTLSCipherNames returns a list of cipher suite names implemented by crypto/tls. +func PreferredTLSCipherNames() []string { cipherKeys := sets.NewString() for key := range ciphers { cipherKeys.Insert(key) @@ -58,13 +87,37 @@ func TLSCipherPossibleValues() []string { return cipherKeys.List() } +func allCiphers() map[string]uint16 { + acceptedCiphers := make(map[string]uint16, len(ciphers)+len(insecureCiphers)) + for k, v := range ciphers { + acceptedCiphers[k] = v + } + for k, v := range insecureCiphers { + acceptedCiphers[k] = v + } + return acceptedCiphers +} + +// TLSCipherPossibleValues returns all acceptable cipher suite names. +// This is a combination of both InsecureTLSCipherNames() and PreferredTLSCipherNames(). +func TLSCipherPossibleValues() []string { + cipherKeys := sets.NewString() + acceptedCiphers := allCiphers() + for key := range acceptedCiphers { + cipherKeys.Insert(key) + } + return cipherKeys.List() +} + +// TLSCipherSuites returns a list of cipher suite IDs from the cipher suite names passed. func TLSCipherSuites(cipherNames []string) ([]uint16, error) { if len(cipherNames) == 0 { return nil, nil } ciphersIntSlice := make([]uint16, 0) + possibleCiphers := allCiphers() for _, cipher := range cipherNames { - intValue, ok := ciphers[cipher] + intValue, ok := possibleCiphers[cipher] if !ok { return nil, fmt.Errorf("Cipher suite %s not supported or doesn't exist", cipher) } @@ -80,6 +133,7 @@ var versions = map[string]uint16{ "VersionTLS13": tls.VersionTLS13, } +// TLSPossibleVersions returns all acceptable values for TLS Version. func TLSPossibleVersions() []string { versionsKeys := sets.NewString() for key := range versions { @@ -88,6 +142,7 @@ func TLSPossibleVersions() []string { return versionsKeys.List() } +// TLSVersion returns the TLS Version ID for the version name passed. func TLSVersion(versionName string) (uint16, error) { if len(versionName) == 0 { return DefaultTLSVersion(), nil @@ -98,6 +153,7 @@ func TLSVersion(versionName string) (uint16, error) { return 0, fmt.Errorf("unknown tls version %q", versionName) } +// DefaultTLSVersion defines the default TLS Version. func DefaultTLSVersion() uint16 { // Can't use SSLv3 because of POODLE and BEAST // Can't use TLSv1.0 because of POODLE and BEAST using CBC cipher diff --git a/vendor/k8s.io/component-base/cli/flag/ciphersuites_flag_114.go b/vendor/k8s.io/component-base/cli/flag/ciphersuites_flag_114.go new file mode 100644 index 00000000000..45b39eb0f0c --- /dev/null +++ b/vendor/k8s.io/component-base/cli/flag/ciphersuites_flag_114.go @@ -0,0 +1,29 @@ +// +build go1.14 + +/* +Copyright 2020 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 flag + +import ( + "crypto/tls" +) + +func init() { + // support official IANA names as well on go1.14 + ciphers["TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"] = tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 + ciphers["TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"] = tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 +} diff --git a/vendor/k8s.io/component-base/cli/flag/flags.go b/vendor/k8s.io/component-base/cli/flag/flags.go index d0fff8db2e4..70146f33591 100644 --- a/vendor/k8s.io/component-base/cli/flag/flags.go +++ b/vendor/k8s.io/component-base/cli/flag/flags.go @@ -21,7 +21,7 @@ import ( "strings" "github.com/spf13/pflag" - "k8s.io/klog" + "k8s.io/klog/v2" ) // WordSepNormalizeFunc changes all flags that contain "_" separators @@ -52,3 +52,10 @@ func InitFlags() { klog.V(2).Infof("FLAG: --%s=%q", flag.Name, flag.Value) }) } + +// PrintFlags logs the flags in the flagset +func PrintFlags(flags *pflag.FlagSet) { + flags.VisitAll(func(flag *pflag.Flag) { + klog.V(1).Infof("FLAG: --%s=%q", flag.Name, flag.Value) + }) +} diff --git a/vendor/k8s.io/component-base/cli/flag/namedcertkey_flag.go b/vendor/k8s.io/component-base/cli/flag/namedcertkey_flag.go index bc6867748ba..af0f437ae39 100644 --- a/vendor/k8s.io/component-base/cli/flag/namedcertkey_flag.go +++ b/vendor/k8s.io/component-base/cli/flag/namedcertkey_flag.go @@ -75,7 +75,7 @@ type NamedCertKeyArray struct { changed bool } -var _ flag.Value = &NamedCertKey{} +var _ flag.Value = &NamedCertKeyArray{} // NewNamedKeyCertArray creates a new NamedCertKeyArray with the internal value // pointing to p. diff --git a/vendor/k8s.io/component-base/cli/globalflag/BUILD b/vendor/k8s.io/component-base/cli/globalflag/BUILD index 22749e8e7d7..0f1f1919b13 100644 --- a/vendor/k8s.io/component-base/cli/globalflag/BUILD +++ b/vendor/k8s.io/component-base/cli/globalflag/BUILD @@ -9,7 +9,7 @@ go_library( deps = [ "//staging/src/k8s.io/component-base/logs:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/component-base/cli/globalflag/globalflags.go b/vendor/k8s.io/component-base/cli/globalflag/globalflags.go index 78e4b56f186..acdf8b688f2 100644 --- a/vendor/k8s.io/component-base/cli/globalflag/globalflags.go +++ b/vendor/k8s.io/component-base/cli/globalflag/globalflags.go @@ -24,11 +24,11 @@ import ( "github.com/spf13/pflag" "k8s.io/component-base/logs" - "k8s.io/klog" + "k8s.io/klog/v2" ) // AddGlobalFlags explicitly registers flags that libraries (klog, verflag, etc.) register -// against the global flagsets from "flag" and "k8s.io/klog". +// against the global flagsets from "flag" and "k8s.io/klog/v2". // We do this in order to prevent unwanted flags from leaking into the component's flagset. func AddGlobalFlags(fs *pflag.FlagSet, name string) { addKlogFlags(fs) diff --git a/vendor/k8s.io/component-base/config/BUILD b/vendor/k8s.io/component-base/config/BUILD index 25c1c281586..b92f4e0fd88 100644 --- a/vendor/k8s.io/component-base/config/BUILD +++ b/vendor/k8s.io/component-base/config/BUILD @@ -24,6 +24,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//staging/src/k8s.io/component-base/config/options:all-srcs", "//staging/src/k8s.io/component-base/config/testing:all-srcs", "//staging/src/k8s.io/component-base/config/v1alpha1:all-srcs", "//staging/src/k8s.io/component-base/config/validation:all-srcs", diff --git a/vendor/k8s.io/kubernetes/pkg/client/leaderelectionconfig/BUILD b/vendor/k8s.io/component-base/config/options/BUILD similarity index 58% rename from vendor/k8s.io/kubernetes/pkg/client/leaderelectionconfig/BUILD rename to vendor/k8s.io/component-base/config/options/BUILD index a5d29965c3b..fcffc62ced8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/leaderelectionconfig/BUILD +++ b/vendor/k8s.io/component-base/config/options/BUILD @@ -1,14 +1,11 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) +load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["config.go"], - importpath = "k8s.io/kubernetes/pkg/client/leaderelectionconfig", + srcs = ["leaderelectionconfig.go"], + importmap = "k8s.io/kubernetes/vendor/k8s.io/component-base/config/options", + importpath = "k8s.io/component-base/config/options", + visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/component-base/config:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", @@ -26,4 +23,5 @@ filegroup( name = "all-srcs", srcs = [":package-srcs"], tags = ["automanaged"], + visibility = ["//visibility:public"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/leaderelectionconfig/config.go b/vendor/k8s.io/component-base/config/options/leaderelectionconfig.go similarity index 87% rename from vendor/k8s.io/kubernetes/pkg/client/leaderelectionconfig/config.go rename to vendor/k8s.io/component-base/config/options/leaderelectionconfig.go index bbdc977cc54..6bf4ed23796 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/leaderelectionconfig/config.go +++ b/vendor/k8s.io/component-base/config/options/leaderelectionconfig.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package leaderelectionconfig +package options import ( "github.com/spf13/pflag" - componentbaseconfig "k8s.io/component-base/config" + "k8s.io/component-base/config" ) -// BindFlags binds the LeaderElectionConfiguration struct fields to a flagset -func BindFlags(l *componentbaseconfig.LeaderElectionConfiguration, fs *pflag.FlagSet) { +// BindLeaderElectionFlags binds the LeaderElectionConfiguration struct fields to a flagset +func BindLeaderElectionFlags(l *config.LeaderElectionConfiguration, fs *pflag.FlagSet) { fs.BoolVar(&l.LeaderElect, "leader-elect", l.LeaderElect, ""+ "Start a leader election client and gain leadership before "+ "executing the main loop. Enable this when running replicated "+ @@ -42,7 +42,8 @@ func BindFlags(l *componentbaseconfig.LeaderElectionConfiguration, fs *pflag.Fla "of a leadership. This is only applicable if leader election is enabled.") fs.StringVar(&l.ResourceLock, "leader-elect-resource-lock", l.ResourceLock, ""+ "The type of resource object that is used for locking during "+ - "leader election. Supported options are `endpoints` (default) and `configmaps`.") + "leader election. Supported options are 'endpoints', 'configmaps', "+ + "'leases', 'endpointsleases' and 'configmapsleases'.") fs.StringVar(&l.ResourceName, "leader-elect-resource-name", l.ResourceName, ""+ "The name of resource object that is used for locking during "+ "leader election.") diff --git a/vendor/k8s.io/component-base/config/types.go b/vendor/k8s.io/component-base/config/types.go index da11e03c2c6..489cd880b15 100644 --- a/vendor/k8s.io/component-base/config/types.go +++ b/vendor/k8s.io/component-base/config/types.go @@ -78,3 +78,11 @@ type DebuggingConfiguration struct { // enableProfiling is true. EnableContentionProfiling bool } + +// LoggingConfiguration contains logging options +type LoggingConfiguration struct { + // Format Flag specifies the structure of log messages. + // default value of format is `text` + // Refer [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information. + Format string +} diff --git a/vendor/k8s.io/component-base/config/v1alpha1/conversion.go b/vendor/k8s.io/component-base/config/v1alpha1/conversion.go index e2951e310d5..abf35c6d910 100644 --- a/vendor/k8s.io/component-base/config/v1alpha1/conversion.go +++ b/vendor/k8s.io/component-base/config/v1alpha1/conversion.go @@ -51,3 +51,11 @@ func Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfig func Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in *config.LeaderElectionConfiguration, out *LeaderElectionConfiguration, s conversion.Scope) error { return autoConvert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(in, out, s) } + +func Convert_v1alpha1_LoggingConfiguration_To_config_LoggingConfiguration(in *LoggingConfiguration, out *config.LoggingConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_LoggingConfiguration_To_config_LoggingConfiguration(in, out, s) +} + +func Convert_config_LoggingConfiguration_To_v1alpha1_LoggingConfiguration(in *config.LoggingConfiguration, out *LoggingConfiguration, s conversion.Scope) error { + return autoConvert_config_LoggingConfiguration_To_v1alpha1_LoggingConfiguration(in, out, s) +} diff --git a/vendor/k8s.io/component-base/config/v1alpha1/defaults.go b/vendor/k8s.io/component-base/config/v1alpha1/defaults.go index 05ad82d3eb0..bbf08e11805 100644 --- a/vendor/k8s.io/component-base/config/v1alpha1/defaults.go +++ b/vendor/k8s.io/component-base/config/v1alpha1/defaults.go @@ -95,3 +95,18 @@ func NewRecommendedDebuggingConfiguration() *DebuggingConfiguration { RecommendedDebuggingConfiguration(ret) return ret } + +// RecommendedLoggingConfiguration defaults logging configuration. +// This will set the recommended default +// values, but they may be subject to change between API versions. This function +// is intentionally not registered in the scheme as a "normal" `SetDefaults_Foo` +// function to allow consumers of this type to set whatever defaults for their +// embedded configs. Forcing consumers to use these defaults would be problematic +// as defaulting in the scheme is done as part of the conversion, and there would +// be no easy way to opt-out. Instead, if you want to use this defaulting method +// run it in your wrapper struct of this type in its `SetDefaults_` method. +func RecommendedLoggingConfiguration(obj *LoggingConfiguration) { + if obj.Format == "" { + obj.Format = "text" + } +} diff --git a/vendor/k8s.io/component-base/config/v1alpha1/types.go b/vendor/k8s.io/component-base/config/v1alpha1/types.go index c9d05525d43..1bbbc691c72 100644 --- a/vendor/k8s.io/component-base/config/v1alpha1/types.go +++ b/vendor/k8s.io/component-base/config/v1alpha1/types.go @@ -80,3 +80,11 @@ type ClientConnectionConfiguration struct { // burst allows extra queries to accumulate when a client is exceeding its rate. Burst int32 `json:"burst"` } + +// LoggingConfiguration contains logging options +type LoggingConfiguration struct { + // Format Flag specifies the structure of log messages. + // default value of format is `text` + // Refer [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information. + Format string `json:"format,omitempty"` +} diff --git a/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go index 4e4acf309ea..00f28738869 100644 --- a/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go @@ -49,6 +49,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*config.LoggingConfiguration)(nil), (*LoggingConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_LoggingConfiguration_To_v1alpha1_LoggingConfiguration(a.(*config.LoggingConfiguration), b.(*LoggingConfiguration), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*ClientConnectionConfiguration)(nil), (*config.ClientConnectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(a.(*ClientConnectionConfiguration), b.(*config.ClientConnectionConfiguration), scope) }); err != nil { @@ -64,6 +69,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*LoggingConfiguration)(nil), (*config.LoggingConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_LoggingConfiguration_To_config_LoggingConfiguration(a.(*LoggingConfiguration), b.(*config.LoggingConfiguration), scope) + }); err != nil { + return err + } return nil } @@ -130,3 +140,13 @@ func autoConvert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionCo out.ResourceNamespace = in.ResourceNamespace return nil } + +func autoConvert_v1alpha1_LoggingConfiguration_To_config_LoggingConfiguration(in *LoggingConfiguration, out *config.LoggingConfiguration, s conversion.Scope) error { + out.Format = in.Format + return nil +} + +func autoConvert_config_LoggingConfiguration_To_v1alpha1_LoggingConfiguration(in *config.LoggingConfiguration, out *LoggingConfiguration, s conversion.Scope) error { + out.Format = in.Format + return nil +} diff --git a/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.deepcopy.go index 629bf65f9d9..f5f2a0e91ee 100644 --- a/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.deepcopy.go @@ -85,3 +85,19 @@ func (in *LeaderElectionConfiguration) DeepCopy() *LeaderElectionConfiguration { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoggingConfiguration) DeepCopyInto(out *LoggingConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingConfiguration. +func (in *LoggingConfiguration) DeepCopy() *LoggingConfiguration { + if in == nil { + return nil + } + out := new(LoggingConfiguration) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/component-base/config/zz_generated.deepcopy.go b/vendor/k8s.io/component-base/config/zz_generated.deepcopy.go index 9812234f130..77260a06f00 100644 --- a/vendor/k8s.io/component-base/config/zz_generated.deepcopy.go +++ b/vendor/k8s.io/component-base/config/zz_generated.deepcopy.go @@ -70,3 +70,19 @@ func (in *LeaderElectionConfiguration) DeepCopy() *LeaderElectionConfiguration { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoggingConfiguration) DeepCopyInto(out *LoggingConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingConfiguration. +func (in *LoggingConfiguration) DeepCopy() *LoggingConfiguration { + if in == nil { + return nil + } + out := new(LoggingConfiguration) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/configz/BUILD b/vendor/k8s.io/component-base/configz/BUILD similarity index 81% rename from vendor/k8s.io/kubernetes/pkg/util/configz/BUILD rename to vendor/k8s.io/component-base/configz/BUILD index 0df832aa55d..9c41245c20d 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/configz/BUILD +++ b/vendor/k8s.io/component-base/configz/BUILD @@ -9,7 +9,8 @@ load( go_library( name = "go_default_library", srcs = ["configz.go"], - importpath = "k8s.io/kubernetes/pkg/util/configz", + importmap = "k8s.io/kubernetes/vendor/k8s.io/component-base/configz", + importpath = "k8s.io/component-base/configz", ) go_test( diff --git a/vendor/k8s.io/kubernetes/pkg/util/configz/configz.go b/vendor/k8s.io/component-base/configz/configz.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/configz/configz.go rename to vendor/k8s.io/component-base/configz/configz.go diff --git a/vendor/k8s.io/component-base/featuregate/BUILD b/vendor/k8s.io/component-base/featuregate/BUILD index 27c2d5644fb..c5513c01e61 100644 --- a/vendor/k8s.io/component-base/featuregate/BUILD +++ b/vendor/k8s.io/component-base/featuregate/BUILD @@ -9,7 +9,7 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/naming:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/component-base/featuregate/feature_gate.go b/vendor/k8s.io/component-base/featuregate/feature_gate.go index 50e17622539..c805ffb01b5 100644 --- a/vendor/k8s.io/component-base/featuregate/feature_gate.go +++ b/vendor/k8s.io/component-base/featuregate/feature_gate.go @@ -27,7 +27,7 @@ import ( "github.com/spf13/pflag" "k8s.io/apimachinery/pkg/util/naming" - "k8s.io/klog" + "k8s.io/klog/v2" ) type Feature string diff --git a/vendor/k8s.io/component-base/logs/BUILD b/vendor/k8s.io/component-base/logs/BUILD index 162763199e2..51d95f3523f 100644 --- a/vendor/k8s.io/component-base/logs/BUILD +++ b/vendor/k8s.io/component-base/logs/BUILD @@ -7,13 +7,19 @@ load( go_library( name = "go_default_library", - srcs = ["logs.go"], + srcs = [ + "logs.go", + "options.go", + "registry.go", + ], importmap = "k8s.io/kubernetes/vendor/k8s.io/component-base/logs", importpath = "k8s.io/component-base/logs", deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//staging/src/k8s.io/component-base/logs/json:go_default_library", + "//vendor/github.com/go-logr/logr:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -26,6 +32,10 @@ filegroup( filegroup( name = "all-srcs", - srcs = [":package-srcs"], + srcs = [ + ":package-srcs", + "//staging/src/k8s.io/component-base/logs/json:all-srcs", + "//staging/src/k8s.io/component-base/logs/logreduction:all-srcs", + ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/component-base/logs/OWNERS b/vendor/k8s.io/component-base/logs/OWNERS new file mode 100644 index 00000000000..58b1a4d7b4d --- /dev/null +++ b/vendor/k8s.io/component-base/logs/OWNERS @@ -0,0 +1,8 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: +- sig-instrumentation-approvers +reviewers: +- sig-instrumentation-reviewers +labels: +- sig/instrumentation diff --git a/vendor/k8s.io/component-base/logs/json/BUILD b/vendor/k8s.io/component-base/logs/json/BUILD new file mode 100644 index 00000000000..3fb7831c877 --- /dev/null +++ b/vendor/k8s.io/component-base/logs/json/BUILD @@ -0,0 +1,43 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["json.go"], + importmap = "k8s.io/kubernetes/vendor/k8s.io/component-base/logs/json", + importpath = "k8s.io/component-base/logs/json", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/go-logr/logr:go_default_library", + "//vendor/go.uber.org/zap:go_default_library", + "//vendor/go.uber.org/zap/zapcore:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "json_benchmark_test.go", + "json_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/go.uber.org/zap:go_default_library", + "//vendor/go.uber.org/zap/zapcore:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/component-base/logs/json/json.go b/vendor/k8s.io/component-base/logs/json/json.go new file mode 100644 index 00000000000..f9bb55656fa --- /dev/null +++ b/vendor/k8s.io/component-base/logs/json/json.go @@ -0,0 +1,177 @@ +/* +Copyright 2020 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 logs + +import ( + "os" + "time" + + "github.com/go-logr/logr" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" +) + +// Inspired from https://github.com/go-logr/zapr, some functions is copy from the repo. + +var ( + // JSONLogger is global json log format logr + JSONLogger logr.Logger + + // timeNow stubbed out for testing + timeNow = time.Now +) + +// zapLogger is a logr.Logger that uses Zap to record log. +type zapLogger struct { + // NB: this looks very similar to zap.SugaredLogger, but + // deals with our desire to have multiple verbosity levels. + l *zap.Logger + lvl int +} + +// implement logr.Logger +var _ logr.Logger = &zapLogger{} + +// Enabled should always return true +func (l *zapLogger) Enabled() bool { + return true +} + +// Info write message to error level log +func (l *zapLogger) Info(msg string, keysAndVals ...interface{}) { + entry := zapcore.Entry{ + Time: timeNow(), + Message: msg, + } + checkedEntry := l.l.Core().Check(entry, nil) + checkedEntry.Write(l.handleFields(keysAndVals)...) +} + +// dPanic write message to DPanicLevel level log +// we need implement this because unit test case need stub time.Now +// otherwise the ts field always changed +func (l *zapLogger) dPanic(msg string) { + entry := zapcore.Entry{ + Level: zapcore.DPanicLevel, + Time: timeNow(), + Message: msg, + } + checkedEntry := l.l.Core().Check(entry, nil) + checkedEntry.Write(zap.Int("v", l.lvl)) +} + +// handleFields converts a bunch of arbitrary key-value pairs into Zap fields. It takes +// additional pre-converted Zap fields, for use with automatically attached fields, like +// `error`. +func (l *zapLogger) handleFields(args []interface{}, additional ...zap.Field) []zap.Field { + // a slightly modified version of zap.SugaredLogger.sweetenFields + if len(args) == 0 { + // fast-return if we have no suggared fields. + return append(additional, zap.Int("v", l.lvl)) + } + + // unlike Zap, we can be pretty sure users aren't passing structured + // fields (since logr has no concept of that), so guess that we need a + // little less space. + fields := make([]zap.Field, 0, len(args)/2+len(additional)+1) + fields = append(fields, zap.Int("v", l.lvl)) + for i := 0; i < len(args)-1; i += 2 { + // check just in case for strongly-typed Zap fields, which is illegal (since + // it breaks implementation agnosticism), so we can give a better error message. + if _, ok := args[i].(zap.Field); ok { + l.dPanic("strongly-typed Zap Field passed to logr") + break + } + + // process a key-value pair, + // ensuring that the key is a string + key, val := args[i], args[i+1] + keyStr, isString := key.(string) + if !isString { + // if the key isn't a string, stop logging + l.dPanic("non-string key argument passed to logging, ignoring all later arguments") + break + } + + fields = append(fields, zap.Any(keyStr, val)) + } + + return append(fields, additional...) +} + +// Error write log message to error level +func (l *zapLogger) Error(err error, msg string, keysAndVals ...interface{}) { + entry := zapcore.Entry{ + Level: zapcore.ErrorLevel, + Time: timeNow(), + Message: msg, + } + checkedEntry := l.l.Core().Check(entry, nil) + checkedEntry.Write(l.handleFields(keysAndVals, handleError(err))...) +} + +// V return info logr.Logger with specified level +func (l *zapLogger) V(level int) logr.Logger { + return &zapLogger{ + lvl: l.lvl + level, + l: l.l, + } +} + +// WithValues return logr.Logger with some keys And Values +func (l *zapLogger) WithValues(keysAndValues ...interface{}) logr.Logger { + l.l = l.l.With(l.handleFields(keysAndValues)...) + return l +} + +// WithName return logger Named with specified name +func (l *zapLogger) WithName(name string) logr.Logger { + l.l = l.l.Named(name) + return l +} + +// encoderConfig config zap encodetime format +var encoderConfig = zapcore.EncoderConfig{ + MessageKey: "msg", + + TimeKey: "ts", + EncodeTime: zapcore.EpochMillisTimeEncoder, +} + +// NewJSONLogger creates a new json logr.Logger using the given Zap Logger to log. +func NewJSONLogger(w zapcore.WriteSyncer) logr.Logger { + l, _ := zap.NewProduction() + if w == nil { + w = os.Stdout + } + log := l.WithOptions(zap.AddCallerSkip(1), + zap.WrapCore( + func(zapcore.Core) zapcore.Core { + return zapcore.NewCore(zapcore.NewJSONEncoder(encoderConfig), zapcore.AddSync(w), zapcore.DebugLevel) + })) + return &zapLogger{ + l: log, + } +} + +func handleError(err error) zap.Field { + return zap.NamedError("err", err) +} + +func init() { + JSONLogger = NewJSONLogger(nil) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/logreduction/BUILD b/vendor/k8s.io/component-base/logs/logreduction/BUILD similarity index 80% rename from vendor/k8s.io/kubernetes/pkg/kubelet/util/logreduction/BUILD rename to vendor/k8s.io/component-base/logs/logreduction/BUILD index 6b369981d2a..d0fa90d14f1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/logreduction/BUILD +++ b/vendor/k8s.io/component-base/logs/logreduction/BUILD @@ -3,7 +3,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", srcs = ["logreduction.go"], - importpath = "k8s.io/kubernetes/pkg/kubelet/util/logreduction", + importmap = "k8s.io/kubernetes/vendor/k8s.io/component-base/logs/logreduction", + importpath = "k8s.io/component-base/logs/logreduction", visibility = ["//visibility:public"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/logreduction/logreduction.go b/vendor/k8s.io/component-base/logs/logreduction/logreduction.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/util/logreduction/logreduction.go rename to vendor/k8s.io/component-base/logs/logreduction/logreduction.go diff --git a/vendor/k8s.io/component-base/logs/logs.go b/vendor/k8s.io/component-base/logs/logs.go index 4c1adf86a6f..073e0312fb1 100644 --- a/vendor/k8s.io/component-base/logs/logs.go +++ b/vendor/k8s.io/component-base/logs/logs.go @@ -24,7 +24,7 @@ import ( "github.com/spf13/pflag" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" ) const logFlushFreqFlagName = "log-flush-frequency" diff --git a/vendor/k8s.io/component-base/logs/options.go b/vendor/k8s.io/component-base/logs/options.go new file mode 100644 index 00000000000..00e62e65c8c --- /dev/null +++ b/vendor/k8s.io/component-base/logs/options.go @@ -0,0 +1,126 @@ +/* +Copyright 2020 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 logs + +import ( + "flag" + "fmt" + "strings" + + "github.com/go-logr/logr" + "github.com/spf13/pflag" + + "k8s.io/klog/v2" +) + +const ( + logFormatFlagName = "logging-format" + defaultLogFormat = "text" +) + +// List of logs (k8s.io/klog + k8s.io/component-base/logs) flags supported by all logging formats +var supportedLogsFlags = map[string]struct{}{ + "v": {}, + // TODO: support vmodule after 1.19 Alpha +} + +// Options has klog format parameters +type Options struct { + LogFormat string +} + +// NewOptions return new klog options +func NewOptions() *Options { + return &Options{ + LogFormat: defaultLogFormat, + } +} + +// Validate verifies if any unsupported flag is set +// for non-default logging format +func (o *Options) Validate() []error { + errs := []error{} + if o.LogFormat != defaultLogFormat { + allFlags := unsupportedLoggingFlags() + for _, fname := range allFlags { + if flagIsSet(fname) { + errs = append(errs, fmt.Errorf("non-default logging format doesn't honor flag: %s", fname)) + } + } + } + if _, err := o.Get(); err != nil { + errs = append(errs, fmt.Errorf("unsupported log format: %s", o.LogFormat)) + } + return errs +} + +func flagIsSet(name string) bool { + f := flag.Lookup(name) + if f != nil { + return f.DefValue != f.Value.String() + } + pf := pflag.Lookup(name) + if pf != nil { + return pf.DefValue != pf.Value.String() + } + panic("failed to lookup unsupported log flag") +} + +// AddFlags add logging-format flag +func (o *Options) AddFlags(fs *pflag.FlagSet) { + unsupportedFlags := fmt.Sprintf("--%s", strings.Join(unsupportedLoggingFlags(), ", --")) + formats := fmt.Sprintf(`"%s"`, strings.Join(logRegistry.List(), `", "`)) + fs.StringVar(&o.LogFormat, logFormatFlagName, defaultLogFormat, fmt.Sprintf("Sets the log format. Permitted formats: %s.\nNon-default formats don't honor these flags: %s.\nNon-default choices are currently alpha and subject to change without warning.", formats, unsupportedFlags)) + + // No new log formats should be added after generation is of flag options + logRegistry.Freeze() +} + +// Apply set klog logger from LogFormat type +func (o *Options) Apply() { + // if log format not exists, use nil loggr + loggr, _ := o.Get() + klog.SetLogger(loggr) +} + +// Get logger with LogFormat field +func (o *Options) Get() (logr.Logger, error) { + return logRegistry.Get(o.LogFormat) +} + +func unsupportedLoggingFlags() []string { + allFlags := []string{} + + // k8s.io/klog flags + fs := &flag.FlagSet{} + klog.InitFlags(fs) + fs.VisitAll(func(flag *flag.Flag) { + if _, found := supportedLogsFlags[flag.Name]; !found { + allFlags = append(allFlags, flag.Name) + } + }) + + // k8s.io/component-base/logs flags + pfs := &pflag.FlagSet{} + AddFlags(pfs) + pfs.VisitAll(func(flag *pflag.Flag) { + if _, found := supportedLogsFlags[flag.Name]; !found { + allFlags = append(allFlags, flag.Name) + } + }) + return allFlags +} diff --git a/vendor/k8s.io/component-base/logs/registry.go b/vendor/k8s.io/component-base/logs/registry.go new file mode 100644 index 00000000000..515bba28011 --- /dev/null +++ b/vendor/k8s.io/component-base/logs/registry.go @@ -0,0 +1,104 @@ +/* +Copyright 2020 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 logs + +import ( + "fmt" + + "github.com/go-logr/logr" + json "k8s.io/component-base/logs/json" +) + +const ( + jsonLogFormat = "json" +) + +var logRegistry = NewLogFormatRegistry() + +// LogFormatRegistry store klog format registry +type LogFormatRegistry struct { + registry map[string]logr.Logger + frozen bool +} + +// NewLogFormatRegistry return new init LogFormatRegistry struct +func NewLogFormatRegistry() *LogFormatRegistry { + return &LogFormatRegistry{ + registry: make(map[string]logr.Logger), + frozen: false, + } +} + +// Register new log format registry to global logRegistry +func (lfr *LogFormatRegistry) Register(name string, logger logr.Logger) error { + if lfr.frozen { + return fmt.Errorf("log format is frozen, unable to register log format") + } + if _, ok := lfr.registry[name]; ok { + return fmt.Errorf("log format: %s already exists", name) + } + lfr.registry[name] = logger + return nil +} + +// Get specified log format logger +func (lfr *LogFormatRegistry) Get(name string) (logr.Logger, error) { + re, ok := lfr.registry[name] + if !ok { + return nil, fmt.Errorf("log format: %s does not exists", name) + } + return re, nil +} + +// Set specified log format logger +func (lfr *LogFormatRegistry) Set(name string, logger logr.Logger) error { + if lfr.frozen { + return fmt.Errorf("log format is frozen, unable to set log format") + } + + lfr.registry[name] = logger + return nil +} + +// Delete specified log format logger +func (lfr *LogFormatRegistry) Delete(name string) error { + if lfr.frozen { + return fmt.Errorf("log format is frozen, unable to delete log format") + } + + delete(lfr.registry, name) + return nil +} + +// List names of registered log formats +func (lfr *LogFormatRegistry) List() []string { + formats := make([]string, 0, len(lfr.registry)) + for f := range lfr.registry { + formats = append(formats, f) + } + return formats +} + +// Freeze freezes the log format registry +func (lfr *LogFormatRegistry) Freeze() { + lfr.frozen = true +} +func init() { + // Text format is default klog format + logRegistry.Register(defaultLogFormat, nil) + logRegistry.Register(jsonLogFormat, json.JSONLogger) +} diff --git a/vendor/k8s.io/component-base/metrics/BUILD b/vendor/k8s.io/component-base/metrics/BUILD index 84128772b56..b75763c4c1b 100644 --- a/vendor/k8s.io/component-base/metrics/BUILD +++ b/vendor/k8s.io/component-base/metrics/BUILD @@ -11,6 +11,7 @@ go_library( "http.go", "labels.go", "metric.go", + "options.go", "opts.go", "processstarttime.go", "registry.go", @@ -31,7 +32,8 @@ go_library( "//vendor/github.com/prometheus/client_golang/prometheus/promhttp:go_default_library", "//vendor/github.com/prometheus/client_model/go:go_default_library", "//vendor/github.com/prometheus/procfs:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -43,6 +45,7 @@ go_test( "desc_test.go", "gauge_test.go", "histogram_test.go", + "http_test.go", "opts_test.go", "registry_test.go", "summary_test.go", @@ -87,13 +90,12 @@ package_group( name = "prometheus_import_allow_list", packages = [ "//cluster/images/etcd-version-monitor", - "//pkg/master", "//pkg/scheduler/framework/v1alpha1", "//pkg/volume/util/operationexecutor", - "//staging/src/k8s.io/apiserver/pkg/admission/metrics", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics", "//staging/src/k8s.io/component-base/metrics/...", "//test/e2e_node", + "//test/integration/apiserver/flowcontrol", "//vendor/...", ], ) diff --git a/vendor/k8s.io/component-base/metrics/counter.go b/vendor/k8s.io/component-base/metrics/counter.go index 404ffcefc90..de694310953 100644 --- a/vendor/k8s.io/component-base/metrics/counter.go +++ b/vendor/k8s.io/component-base/metrics/counter.go @@ -45,6 +45,14 @@ func NewCounter(opts *CounterOpts) *Counter { return kc } +// Reset resets the underlying prometheus Counter to start counting from 0 again +func (c *Counter) Reset() { + if !c.IsCreated() { + return + } + c.setPrometheusCounter(prometheus.NewCounter(c.CounterOpts.toPromCounterOpts())) +} + // setPrometheusCounter sets the underlying CounterMetric object, i.e. the thing that does the measurement. func (c *Counter) setPrometheusCounter(counter prometheus.Counter) { c.CounterMetric = counter diff --git a/vendor/k8s.io/component-base/metrics/desc.go b/vendor/k8s.io/component-base/metrics/desc.go index 8c4b22c0fc3..e53e3ee1891 100644 --- a/vendor/k8s.io/component-base/metrics/desc.go +++ b/vendor/k8s.io/component-base/metrics/desc.go @@ -23,7 +23,7 @@ import ( "github.com/blang/semver" "github.com/prometheus/client_golang/prometheus" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Desc is a prometheus.Desc extension. diff --git a/vendor/k8s.io/component-base/metrics/http.go b/vendor/k8s.io/component-base/metrics/http.go index ecf722e9144..3394a8f7114 100644 --- a/vendor/k8s.io/component-base/metrics/http.go +++ b/vendor/k8s.io/component-base/metrics/http.go @@ -17,6 +17,7 @@ limitations under the License. package metrics import ( + "io" "net/http" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -61,3 +62,16 @@ func (ho *HandlerOpts) toPromhttpHandlerOpts() promhttp.HandlerOpts { func HandlerFor(reg Gatherer, opts HandlerOpts) http.Handler { return promhttp.HandlerFor(reg, opts.toPromhttpHandlerOpts()) } + +// HandlerWithReset return an http.Handler with Reset +func HandlerWithReset(reg KubeRegistry, opts HandlerOpts) http.Handler { + defaultHandler := promhttp.HandlerFor(reg, opts.toPromhttpHandlerOpts()) + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method == http.MethodDelete { + reg.Reset() + io.WriteString(w, "metrics reset\n") + return + } + defaultHandler.ServeHTTP(w, r) + }) +} diff --git a/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go b/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go index 27300c8970e..2605103c10f 100644 --- a/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go +++ b/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go @@ -29,6 +29,18 @@ var ( defaultRegistry = metrics.NewKubeRegistry() // DefaultGatherer exposes the global registry gatherer DefaultGatherer metrics.Gatherer = defaultRegistry + // Reset calls reset on the global registry + Reset = defaultRegistry.Reset + // MustRegister registers registerable metrics but uses the global registry. + MustRegister = defaultRegistry.MustRegister + // RawMustRegister registers prometheus collectors but uses the global registry, this + // bypasses the metric stability framework + // + // Deprecated + RawMustRegister = defaultRegistry.RawMustRegister + + // Register registers a collectable metric but uses the global registry + Register = defaultRegistry.Register ) func init() { @@ -46,23 +58,12 @@ func Handler() http.Handler { return promhttp.InstrumentMetricHandler(prometheus.DefaultRegisterer, promhttp.HandlerFor(defaultRegistry, promhttp.HandlerOpts{})) } -// Register registers a collectable metric but uses the global registry -func Register(c metrics.Registerable) error { - err := defaultRegistry.Register(c) - return err -} - -// MustRegister registers registerable metrics but uses the global registry. -func MustRegister(cs ...metrics.Registerable) { - defaultRegistry.MustRegister(cs...) -} - -// RawMustRegister registers prometheus collectors but uses the global registry, this -// bypasses the metric stability framework -// -// Deprecated -func RawMustRegister(cs ...prometheus.Collector) { - defaultRegistry.RawMustRegister(cs...) +// HandlerWithReset returns an HTTP handler for the DefaultGatherer but invokes +// registry reset if the http method is DELETE. +func HandlerWithReset() http.Handler { + return promhttp.InstrumentMetricHandler( + prometheus.DefaultRegisterer, + metrics.HandlerWithReset(defaultRegistry, metrics.HandlerOpts{})) } // CustomRegister registers a custom collector but uses the global registry. diff --git a/vendor/k8s.io/component-base/metrics/metric.go b/vendor/k8s.io/component-base/metrics/metric.go index b95ade2b4b2..1cf788f8c3f 100644 --- a/vendor/k8s.io/component-base/metrics/metric.go +++ b/vendor/k8s.io/component-base/metrics/metric.go @@ -23,7 +23,7 @@ import ( "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" - "k8s.io/klog" + "k8s.io/klog/v2" ) /* diff --git a/vendor/k8s.io/component-base/metrics/options.go b/vendor/k8s.io/component-base/metrics/options.go new file mode 100644 index 00000000000..c15dd9b4d20 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/options.go @@ -0,0 +1,79 @@ +/* +Copyright 2019 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 metrics + +import ( + "fmt" + + "github.com/blang/semver" + "github.com/spf13/pflag" + + "k8s.io/component-base/version" +) + +// Options has all parameters needed for exposing metrics from components +type Options struct { + ShowHiddenMetricsForVersion string +} + +// NewOptions returns default metrics options +func NewOptions() *Options { + return &Options{} +} + +// Validate validates metrics flags options. +func (o *Options) Validate() []error { + err := validateShowHiddenMetricsVersion(parseVersion(version.Get()), o.ShowHiddenMetricsForVersion) + if err != nil { + return []error{err} + } + + return nil +} + +// AddFlags adds flags for exposing component metrics. +func (o *Options) AddFlags(fs *pflag.FlagSet) { + if o != nil { + o = NewOptions() + } + fs.StringVar(&o.ShowHiddenMetricsForVersion, "show-hidden-metrics-for-version", o.ShowHiddenMetricsForVersion, + "The previous version for which you want to show hidden metrics. "+ + "Only the previous minor version is meaningful, other values will not be allowed. "+ + "The format is ., e.g.: '1.16'. "+ + "The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, "+ + "rather than being surprised when they are permanently removed in the release after that.") +} + +// Apply applies parameters into global configuration of metrics. +func (o *Options) Apply() { + if o != nil && len(o.ShowHiddenMetricsForVersion) > 0 { + SetShowHidden() + } +} + +func validateShowHiddenMetricsVersion(currentVersion semver.Version, targetVersionStr string) error { + if targetVersionStr == "" { + return nil + } + + validVersionStr := fmt.Sprintf("%d.%d", currentVersion.Major, currentVersion.Minor-1) + if targetVersionStr != validVersionStr { + return fmt.Errorf("--show-hidden-metrics-for-version must be omitted or have the value '%v'. Only the previous minor version is allowed", validVersionStr) + } + + return nil +} diff --git a/vendor/k8s.io/component-base/metrics/opts.go b/vendor/k8s.io/component-base/metrics/opts.go index 6b4a290d27d..906050c7f78 100644 --- a/vendor/k8s.io/component-base/metrics/opts.go +++ b/vendor/k8s.io/component-base/metrics/opts.go @@ -125,7 +125,7 @@ func (o *GaugeOpts) annotateStabilityLevel() { // convenience function to allow easy transformation to the prometheus // counterpart. This will do more once we have a proper label abstraction -func (o GaugeOpts) toPromGaugeOpts() prometheus.GaugeOpts { +func (o *GaugeOpts) toPromGaugeOpts() prometheus.GaugeOpts { return prometheus.GaugeOpts{ Namespace: o.Namespace, Subsystem: o.Subsystem, @@ -169,7 +169,7 @@ func (o *HistogramOpts) annotateStabilityLevel() { // convenience function to allow easy transformation to the prometheus // counterpart. This will do more once we have a proper label abstraction -func (o HistogramOpts) toPromHistogramOpts() prometheus.HistogramOpts { +func (o *HistogramOpts) toPromHistogramOpts() prometheus.HistogramOpts { return prometheus.HistogramOpts{ Namespace: o.Namespace, Subsystem: o.Subsystem, @@ -224,7 +224,7 @@ var ( // convenience function to allow easy transformation to the prometheus // counterpart. This will do more once we have a proper label abstraction -func (o SummaryOpts) toPromSummaryOpts() prometheus.SummaryOpts { +func (o *SummaryOpts) toPromSummaryOpts() prometheus.SummaryOpts { // we need to retain existing quantile behavior for backwards compatibility, // so let's do what prometheus used to do prior to v1. objectives := o.Objectives diff --git a/vendor/k8s.io/component-base/metrics/processstarttime.go b/vendor/k8s.io/component-base/metrics/processstarttime.go index 5fd9838d011..b20516ec9ca 100644 --- a/vendor/k8s.io/component-base/metrics/processstarttime.go +++ b/vendor/k8s.io/component-base/metrics/processstarttime.go @@ -22,7 +22,7 @@ import ( "github.com/prometheus/procfs" - "k8s.io/klog" + "k8s.io/klog/v2" ) var processStartTime = NewGaugeVec( diff --git a/vendor/k8s.io/component-base/metrics/prometheus/version/metrics.go b/vendor/k8s.io/component-base/metrics/prometheus/version/metrics.go index 408812bab2b..c74f31f958d 100644 --- a/vendor/k8s.io/component-base/metrics/prometheus/version/metrics.go +++ b/vendor/k8s.io/component-base/metrics/prometheus/version/metrics.go @@ -29,7 +29,7 @@ var ( Help: "A metric with a constant '1' value labeled by major, minor, git version, git commit, git tree state, build date, Go version, and compiler from which Kubernetes was built, and platform on which it is running.", StabilityLevel: metrics.ALPHA, }, - []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, + []string{"major", "minor", "git_version", "git_commit", "git_tree_state", "build_date", "go_version", "compiler", "platform"}, ) ) diff --git a/vendor/k8s.io/component-base/metrics/registry.go b/vendor/k8s.io/component-base/metrics/registry.go index 65dd3a60d32..06a5c6503cf 100644 --- a/vendor/k8s.io/component-base/metrics/registry.go +++ b/vendor/k8s.io/component-base/metrics/registry.go @@ -51,19 +51,6 @@ func shouldHide(currentVersion *semver.Version, deprecatedVersion *semver.Versio return false } -func validateShowHiddenMetricsVersion(currentVersion semver.Version, targetVersionStr string) error { - if targetVersionStr == "" { - return nil - } - - validVersionStr := fmt.Sprintf("%d.%d", currentVersion.Major, currentVersion.Minor-1) - if targetVersionStr != validVersionStr { - return fmt.Errorf("--show-hidden-metrics-for-version must be omitted or have the value '%v'. Only the previous minor version is allowed", validVersionStr) - } - - return nil -} - // ValidateShowHiddenMetricsVersion checks invalid version for which show hidden metrics. func ValidateShowHiddenMetricsVersion(v string) []error { err := validateShowHiddenMetricsVersion(parseVersion(version.Get()), v) @@ -110,17 +97,30 @@ type Registerable interface { FQName() string } +type resettable interface { + Reset() +} + // KubeRegistry is an interface which implements a subset of prometheus.Registerer and // prometheus.Gatherer interfaces type KubeRegistry interface { // Deprecated RawMustRegister(...prometheus.Collector) + // CustomRegister is our internal variant of Prometheus registry.Register CustomRegister(c StableCollector) error + // CustomMustRegister is our internal variant of Prometheus registry.MustRegister CustomMustRegister(cs ...StableCollector) + // Register conforms to Prometheus registry.Register Register(Registerable) error + // MustRegister conforms to Prometheus registry.MustRegister MustRegister(...Registerable) + // Unregister conforms to Prometheus registry.Unregister Unregister(collector Collector) bool + // Gather conforms to Prometheus gatherer.Gather Gather() ([]*dto.MetricFamily, error) + // Reset invokes the Reset() function on all items in the registry + // which are added as resettables. + Reset() } // kubeRegistry is a wrapper around a prometheus registry-type object. Upon initialization @@ -133,6 +133,8 @@ type kubeRegistry struct { stableCollectors []StableCollector // stores all stable collector hiddenCollectorsLock sync.RWMutex stableCollectorsLock sync.RWMutex + resetLock sync.RWMutex + resettables []resettable } // Register registers a new Collector to be included in metrics @@ -142,11 +144,11 @@ type kubeRegistry struct { // uniqueness criteria described in the documentation of metric.Desc. func (kr *kubeRegistry) Register(c Registerable) error { if c.Create(&kr.version) { + defer kr.addResettable(c) return kr.PromRegistry.Register(c) } kr.trackHiddenCollector(c) - return nil } @@ -158,6 +160,7 @@ func (kr *kubeRegistry) MustRegister(cs ...Registerable) { for _, c := range cs { if c.Create(&kr.version) { metrics = append(metrics, c) + kr.addResettable(c) } else { kr.trackHiddenCollector(c) } @@ -168,7 +171,7 @@ func (kr *kubeRegistry) MustRegister(cs ...Registerable) { // CustomRegister registers a new custom collector. func (kr *kubeRegistry) CustomRegister(c StableCollector) error { kr.trackStableCollectors(c) - + defer kr.addResettable(c) if c.Create(&kr.version, c) { return kr.PromRegistry.Register(c) } @@ -180,14 +183,13 @@ func (kr *kubeRegistry) CustomRegister(c StableCollector) error { // error. func (kr *kubeRegistry) CustomMustRegister(cs ...StableCollector) { kr.trackStableCollectors(cs...) - collectors := make([]prometheus.Collector, 0, len(cs)) for _, c := range cs { if c.Create(&kr.version, c) { + kr.addResettable(c) collectors = append(collectors, c) } } - kr.PromRegistry.MustRegister(collectors...) } @@ -198,6 +200,19 @@ func (kr *kubeRegistry) CustomMustRegister(cs ...StableCollector) { // Deprecated func (kr *kubeRegistry) RawMustRegister(cs ...prometheus.Collector) { kr.PromRegistry.MustRegister(cs...) + for _, c := range cs { + kr.addResettable(c) + } +} + +// addResettable will automatically add our metric to our reset +// list if it satisfies the interface +func (kr *kubeRegistry) addResettable(i interface{}) { + kr.resetLock.Lock() + defer kr.resetLock.Unlock() + if resettable, ok := i.(resettable); ok { + kr.resettables = append(kr.resettables, resettable) + } } // Unregister unregisters the Collector that equals the Collector passed @@ -279,6 +294,15 @@ func (kr *kubeRegistry) enableHiddenStableCollectors() { kr.CustomMustRegister(cs...) } +// Reset invokes Reset on all metrics that are resettable. +func (kr *kubeRegistry) Reset() { + kr.resetLock.RLock() + defer kr.resetLock.RUnlock() + for _, r := range kr.resettables { + r.Reset() + } +} + // BuildVersion is a helper function that can be easily mocked. var BuildVersion = version.Get @@ -287,6 +311,7 @@ func newKubeRegistry(v apimachineryversion.Info) *kubeRegistry { PromRegistry: prometheus.NewRegistry(), version: parseVersion(v), hiddenCollectors: make(map[string]Registerable), + resettables: make([]resettable, 0), } registriesLock.Lock() @@ -300,6 +325,5 @@ func newKubeRegistry(v apimachineryversion.Info) *kubeRegistry { // pre-registered. func NewKubeRegistry() KubeRegistry { r := newKubeRegistry(BuildVersion()) - return r } diff --git a/vendor/k8s.io/component-base/metrics/testutil/BUILD b/vendor/k8s.io/component-base/metrics/testutil/BUILD index ba04be0ae8d..9d7adc8cc48 100644 --- a/vendor/k8s.io/component-base/metrics/testutil/BUILD +++ b/vendor/k8s.io/component-base/metrics/testutil/BUILD @@ -4,6 +4,7 @@ go_library( name = "go_default_library", srcs = [ "metrics.go", + "promlint.go", "testutil.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/component-base/metrics/testutil", @@ -13,6 +14,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/version:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//vendor/github.com/prometheus/client_golang/prometheus/testutil:go_default_library", + "//vendor/github.com/prometheus/client_golang/prometheus/testutil/promlint:go_default_library", "//vendor/github.com/prometheus/client_model/go:go_default_library", "//vendor/github.com/prometheus/common/expfmt:go_default_library", "//vendor/github.com/prometheus/common/model:go_default_library", @@ -37,6 +39,7 @@ go_test( name = "go_default_test", srcs = [ "metrics_test.go", + "promlint_test.go", "testutil_test.go", ], embed = [":go_default_library"], diff --git a/vendor/k8s.io/component-base/metrics/testutil/metrics.go b/vendor/k8s.io/component-base/metrics/testutil/metrics.go index cf39cb7ab56..79b7e7db0a8 100644 --- a/vendor/k8s.io/component-base/metrics/testutil/metrics.go +++ b/vendor/k8s.io/component-base/metrics/testutil/metrics.go @@ -43,8 +43,8 @@ type Metrics map[string]model.Samples // Equal returns true if all metrics are the same as the arguments. func (m *Metrics) Equal(o Metrics) bool { - leftKeySet := []string{} - rightKeySet := []string{} + var leftKeySet []string + var rightKeySet []string for k := range *m { leftKeySet = append(leftKeySet, k) } @@ -92,6 +92,15 @@ func ParseMetrics(data string, output *Metrics) error { } } +// TextToMetricFamilies reads 'in' as the simple and flat text-based exchange +// format and creates MetricFamily proto messages. It returns the MetricFamily +// proto messages in a map where the metric names are the keys, along with any +// error encountered. +func TextToMetricFamilies(in io.Reader) (map[string]*dto.MetricFamily, error) { + var textParser expfmt.TextParser + return textParser.TextToMetricFamilies(in) +} + // ExtractMetricSamples parses the prometheus metric samples from the input string. func ExtractMetricSamples(metricsBlob string) ([]*model.Sample, error) { dec := expfmt.NewDecoder(strings.NewReader(metricsBlob), expfmt.FmtText) @@ -114,7 +123,7 @@ func ExtractMetricSamples(metricsBlob string) ([]*model.Sample, error) { } } -// PrintSample returns formated representation of metric Sample +// PrintSample returns formatted representation of metric Sample func PrintSample(sample *model.Sample) string { buf := make([]string, 0) // Id is a VERY special label. For 'normal' container it's useless, but it's necessary @@ -198,22 +207,22 @@ func GetHistogramFromGatherer(gatherer metrics.Gatherer, metricName string) (His return Histogram{}, err } for _, mFamily := range m { - if mFamily.Name != nil && *mFamily.Name == metricName { + if mFamily.GetName() == metricName { metricFamily = mFamily break } } if metricFamily == nil { - return Histogram{}, fmt.Errorf("Metric %q not found", metricName) + return Histogram{}, fmt.Errorf("metric %q not found", metricName) } if metricFamily.GetMetric() == nil { - return Histogram{}, fmt.Errorf("Metric %q is empty", metricName) + return Histogram{}, fmt.Errorf("metric %q is empty", metricName) } if len(metricFamily.GetMetric()) == 0 { - return Histogram{}, fmt.Errorf("Metric %q is empty", metricName) + return Histogram{}, fmt.Errorf("metric %q is empty", metricName) } return Histogram{ @@ -253,6 +262,10 @@ func bucketQuantile(q float64, buckets []bucket) float64 { return buckets[0].upperBound * (rank / buckets[0].count) } + if b == len(buckets)-1 && math.IsInf(buckets[b].upperBound, 1) { + return buckets[len(buckets)-2].upperBound + } + // linear approximation of b-th bucket brank := rank - buckets[b-1].count bSize := buckets[b].upperBound - buckets[b-1].upperBound @@ -264,24 +277,30 @@ func bucketQuantile(q float64, buckets []bucket) float64 { // Quantile computes q-th quantile of a cumulative histogram. // It's expected the histogram is valid (by calling Validate) func (hist *Histogram) Quantile(q float64) float64 { - buckets := []bucket{} + var buckets []bucket for _, bckt := range hist.Bucket { buckets = append(buckets, bucket{ - count: float64(*bckt.CumulativeCount), - upperBound: *bckt.UpperBound, + count: float64(bckt.GetCumulativeCount()), + upperBound: bckt.GetUpperBound(), }) } - // bucketQuantile expects the upper bound of the last bucket to be +inf - // buckets[len(buckets)-1].upperBound = math.Inf(+1) + if len(buckets) == 0 || buckets[len(buckets)-1].upperBound != math.Inf(+1) { + // The list of buckets in dto.Histogram doesn't include the final +Inf bucket, so we + // add it here for the reset of the samples. + buckets = append(buckets, bucket{ + count: float64(hist.GetSampleCount()), + upperBound: math.Inf(+1), + }) + } return bucketQuantile(q, buckets) } // Average computes histogram's average value func (hist *Histogram) Average() float64 { - return *hist.SampleSum / float64(*hist.SampleCount) + return hist.GetSampleSum() / float64(hist.GetSampleCount()) } // Clear clears all fields of the wrapped histogram @@ -301,11 +320,11 @@ func (hist *Histogram) Clear() { // Validate makes sure the wrapped histogram has all necessary fields set and with valid values. func (hist *Histogram) Validate() error { - if hist.SampleCount == nil || *hist.SampleCount == 0 { + if hist.SampleCount == nil || hist.GetSampleCount() == 0 { return fmt.Errorf("nil or empty histogram SampleCount") } - if hist.SampleSum == nil || *hist.SampleSum == 0 { + if hist.SampleSum == nil || hist.GetSampleSum() == 0 { return fmt.Errorf("nil or empty histogram SampleSum") } @@ -313,7 +332,7 @@ func (hist *Histogram) Validate() error { if bckt == nil { return fmt.Errorf("empty histogram bucket") } - if bckt.UpperBound == nil || *bckt.UpperBound < 0 { + if bckt.UpperBound == nil || bckt.GetUpperBound() < 0 { return fmt.Errorf("nil or negative histogram bucket UpperBound") } } @@ -325,7 +344,7 @@ func (hist *Histogram) Validate() error { func GetGaugeMetricValue(m metrics.GaugeMetric) (float64, error) { metricProto := &dto.Metric{} if err := m.Write(metricProto); err != nil { - return 0, fmt.Errorf("Error writing m: %v", err) + return 0, fmt.Errorf("error writing m: %v", err) } return metricProto.Gauge.GetValue(), nil } @@ -334,7 +353,7 @@ func GetGaugeMetricValue(m metrics.GaugeMetric) (float64, error) { func GetCounterMetricValue(m metrics.CounterMetric) (float64, error) { metricProto := &dto.Metric{} if err := m.(metrics.Metric).Write(metricProto); err != nil { - return 0, fmt.Errorf("Error writing m: %v", err) + return 0, fmt.Errorf("error writing m: %v", err) } return metricProto.Counter.GetValue(), nil } @@ -343,7 +362,29 @@ func GetCounterMetricValue(m metrics.CounterMetric) (float64, error) { func GetHistogramMetricValue(m metrics.ObserverMetric) (float64, error) { metricProto := &dto.Metric{} if err := m.(metrics.Metric).Write(metricProto); err != nil { - return 0, fmt.Errorf("Error writing m: %v", err) + return 0, fmt.Errorf("error writing m: %v", err) } return metricProto.Histogram.GetSampleSum(), nil } + +// LabelsMatch returns true if metric has all expected labels otherwise false +func LabelsMatch(metric *dto.Metric, labelFilter map[string]string) bool { + metricLabels := map[string]string{} + + for _, labelPair := range metric.Label { + metricLabels[labelPair.GetName()] = labelPair.GetValue() + } + + // length comparison then match key to values in the maps + if len(labelFilter) > len(metricLabels) { + return false + } + + for labelName, labelValue := range labelFilter { + if value, ok := metricLabels[labelName]; !ok || value != labelValue { + return false + } + } + + return true +} diff --git a/vendor/k8s.io/component-base/metrics/testutil/promlint.go b/vendor/k8s.io/component-base/metrics/testutil/promlint.go new file mode 100644 index 00000000000..4e270c4089a --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/testutil/promlint.go @@ -0,0 +1,161 @@ +/* +Copyright 2020 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 testutil + +import ( + "fmt" + "io" + "strings" + + "github.com/prometheus/client_golang/prometheus/testutil/promlint" +) + +// exceptionMetrics is an exception list of metrics which violates promlint rules. +// +// The original entries come from the existing metrics when we introduce promlint. +// We setup this list for allow and not fail on the current violations. +// Generally speaking, you need to fix the problem for a new metric rather than add it into the list. +var exceptionMetrics = []string{ + // k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/server/egressselector + "apiserver_egress_dialer_dial_failure_count", // counter metrics should have "_total" suffix + + // k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset + "apiserver_flowcontrol_current_inqueue_requests", // label names should be written in 'snake_case' not 'camelCase', + "apiserver_flowcontrol_current_executing_requests", // label names should be written in 'snake_case' not 'camelCase' + "apiserver_flowcontrol_rejected_requests_total", // label names should be written in 'snake_case' not 'camelCase' + + // k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/server/healthz + "apiserver_request_total", // label names should be written in 'snake_case' not 'camelCase' + + // k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/filters + "authenticated_user_requests", // counter metrics should have "_total" suffix + "authentication_attempts", // counter metrics should have "_total" suffix + + // kube-apiserver + "aggregator_openapi_v2_regeneration_count", + "apiserver_admission_step_admission_duration_seconds_summary", + "apiserver_current_inflight_requests", + "apiserver_longrunning_gauge", + "get_token_count", + "get_token_fail_count", + "ssh_tunnel_open_count", + "ssh_tunnel_open_fail_count", + + // kube-controller-manager + "attachdetach_controller_forced_detaches", + "authenticated_user_requests", + "authentication_attempts", + "get_token_count", + "get_token_fail_count", + "node_collector_evictions_number", + + // k8s.io/kubernetes/pkg/kubelet/server/stats + // The two metrics have been deprecated and will be removed in release v1.20+. + "container_cpu_usage_seconds_total", // non-counter metrics should not have "_total" suffix + "node_cpu_usage_seconds_total", // non-counter metrics should not have "_total" suffix +} + +// A Problem is an issue detected by a Linter. +type Problem promlint.Problem + +func (p *Problem) String() string { + return fmt.Sprintf("%s:%s", p.Metric, p.Text) +} + +// A Linter is a Prometheus metrics linter. It identifies issues with metric +// names, types, and metadata, and reports them to the caller. +type Linter struct { + promLinter *promlint.Linter +} + +// Lint performs a linting pass, returning a slice of Problems indicating any +// issues found in the metrics stream. The slice is sorted by metric name +// and issue description. +func (l *Linter) Lint() ([]Problem, error) { + promProblems, err := l.promLinter.Lint() + if err != nil { + return nil, err + } + + // Ignore problems those in exception list + problems := make([]Problem, 0, len(promProblems)) + for i := range promProblems { + if !l.shouldIgnore(promProblems[i].Metric) { + problems = append(problems, Problem(promProblems[i])) + } + } + + return problems, nil +} + +// shouldIgnore returns true if metric in the exception list, otherwise returns false. +func (l *Linter) shouldIgnore(metricName string) bool { + for i := range exceptionMetrics { + if metricName == exceptionMetrics[i] { + return true + } + } + + return false +} + +// NewPromLinter creates a new Linter that reads an input stream of Prometheus metrics. +// Only the text exposition format is supported. +func NewPromLinter(r io.Reader) *Linter { + return &Linter{ + promLinter: promlint.New(r), + } +} + +func mergeProblems(problems []Problem) string { + var problemsMsg []string + + for index := range problems { + problemsMsg = append(problemsMsg, problems[index].String()) + } + + return strings.Join(problemsMsg, ",") +} + +// shouldIgnore returns true if metric in the exception list, otherwise returns false. +func shouldIgnore(metricName string) bool { + for i := range exceptionMetrics { + if metricName == exceptionMetrics[i] { + return true + } + } + + return false +} + +// getLintError will ignore the metrics in exception list and converts lint problem to error. +func getLintError(problems []promlint.Problem) error { + var filteredProblems []Problem + for _, problem := range problems { + if shouldIgnore(problem.Metric) { + continue + } + + filteredProblems = append(filteredProblems, Problem(problem)) + } + + if len(filteredProblems) == 0 { + return nil + } + + return fmt.Errorf("lint error: %s", mergeProblems(filteredProblems)) +} diff --git a/vendor/k8s.io/component-base/metrics/testutil/testutil.go b/vendor/k8s.io/component-base/metrics/testutil/testutil.go index eefef4aa025..439045989ce 100644 --- a/vendor/k8s.io/component-base/metrics/testutil/testutil.go +++ b/vendor/k8s.io/component-base/metrics/testutil/testutil.go @@ -30,6 +30,14 @@ import ( // pedantic Registry. It then does the same as GatherAndCompare, gathering the // metrics from the pedantic Registry. func CollectAndCompare(c metrics.Collector, expected io.Reader, metricNames ...string) error { + lintProblems, err := testutil.CollectAndLint(c, metricNames...) + if err != nil { + return err + } + if err := getLintError(lintProblems); err != nil { + return err + } + return testutil.CollectAndCompare(c, expected, metricNames...) } @@ -38,6 +46,14 @@ func CollectAndCompare(c metrics.Collector, expected io.Reader, metricNames ...s // exposition format. If any metricNames are provided, only metrics with those // names are compared. func GatherAndCompare(g metrics.Gatherer, expected io.Reader, metricNames ...string) error { + lintProblems, err := testutil.GatherAndLint(g, metricNames...) + if err != nil { + return err + } + if err := getLintError(lintProblems); err != nil { + return err + } + return testutil.GatherAndCompare(g, expected, metricNames...) } diff --git a/vendor/k8s.io/component-base/metrics/version.go b/vendor/k8s.io/component-base/metrics/version.go index 63cc606e4c1..f963e205eb6 100644 --- a/vendor/k8s.io/component-base/metrics/version.go +++ b/vendor/k8s.io/component-base/metrics/version.go @@ -25,7 +25,7 @@ var ( Help: "A metric with a constant '1' value labeled by major, minor, git version, git commit, git tree state, build date, Go version, and compiler from which Kubernetes was built, and platform on which it is running.", StabilityLevel: ALPHA, }, - []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, + []string{"major", "minor", "git_version", "git_commit", "git_tree_state", "build_date", "go_version", "compiler", "platform"}, ) ) diff --git a/vendor/k8s.io/component-base/term/BUILD b/vendor/k8s.io/component-base/term/BUILD new file mode 100644 index 00000000000..f282ec81176 --- /dev/null +++ b/vendor/k8s.io/component-base/term/BUILD @@ -0,0 +1,24 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["term.go"], + importmap = "k8s.io/kubernetes/vendor/k8s.io/component-base/term", + importpath = "k8s.io/component-base/term", + visibility = ["//visibility:public"], + deps = ["//vendor/github.com/moby/term:go_default_library"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/apiserver/pkg/util/term/term.go b/vendor/k8s.io/component-base/term/term.go similarity index 96% rename from vendor/k8s.io/apiserver/pkg/util/term/term.go rename to vendor/k8s.io/component-base/term/term.go index 123985bbf63..7fee58fe1bc 100644 --- a/vendor/k8s.io/apiserver/pkg/util/term/term.go +++ b/vendor/k8s.io/component-base/term/term.go @@ -20,7 +20,7 @@ import ( "fmt" "io" - "github.com/docker/docker/pkg/term" + "github.com/moby/term" ) // TerminalSize returns the current width and height of the user's terminal. If it isn't a terminal, diff --git a/vendor/k8s.io/component-base/version/base.go b/vendor/k8s.io/component-base/version/base.go index 086fb2c49c5..12cd41fb93f 100644 --- a/vendor/k8s.io/component-base/version/base.go +++ b/vendor/k8s.io/component-base/version/base.go @@ -2,9 +2,9 @@ package version var ( gitMajor = "1" - gitMinor = "18" - gitVersion = "v1.18.8-k3s1" - gitCommit = "b86d0e4a07fd882c2f9718f4e82b06dfd4b55195" + gitMinor = "19" + gitVersion = "v1.19.0-k3s1" + gitCommit = "e2f7428419fe755d157af02325fc51cdfcf0799c" gitTreeState = "clean" - buildDate = "2020-08-13T18:53:34Z" + buildDate = "2020-08-27T22:54:40Z" ) diff --git a/vendor/k8s.io/component-base/version/verflag/verflag.go b/vendor/k8s.io/component-base/version/verflag/verflag.go index f27e101caa0..106e3450ff0 100644 --- a/vendor/k8s.io/component-base/version/verflag/verflag.go +++ b/vendor/k8s.io/component-base/version/verflag/verflag.go @@ -89,6 +89,7 @@ const versionFlagName = "version" var ( versionFlag = Version(versionFlagName, VersionFalse, "Print version information and quit") + programName = "Kubernetes" ) // AddFlags registers this package's flags on arbitrary FlagSets, such that they point to the @@ -104,7 +105,7 @@ func PrintAndExitIfRequested() { fmt.Printf("%#v\n", version.Get()) os.Exit(0) } else if *versionFlag == VersionTrue { - fmt.Printf("Kubernetes %s\n", version.Get()) + fmt.Printf("%s %s\n", programName, version.Get()) os.Exit(0) } } diff --git a/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go b/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go index ad071d70f75..99880d3e0a5 100644 --- a/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go +++ b/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go @@ -886,11 +886,11 @@ func (m *LinuxPodSandboxConfig) GetSysctls() map[string]string { // PodSandbox in its user interface for better user experience. For example, // the runtime can construct a unique PodSandboxName based on the metadata. type PodSandboxMetadata struct { - // Pod name of the sandbox. Same as the pod name in the PodSpec. + // Pod name of the sandbox. Same as the pod name in the Pod ObjectMeta. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Pod UID of the sandbox. Same as the pod UID in the PodSpec. + // Pod UID of the sandbox. Same as the pod UID in the Pod ObjectMeta. Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - // Pod namespace of the sandbox. Same as the pod namespace in the PodSpec. + // Pod namespace of the sandbox. Same as the pod namespace in the Pod ObjectMeta. Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` // Attempt number of creating the sandbox. Default: 0. Attempt uint32 `protobuf:"varint,4,opt,name=attempt,proto3" json:"attempt,omitempty"` @@ -2116,13 +2116,16 @@ func (m *ListPodSandboxResponse) GetItems() []*PodSandbox { return nil } -// ImageSpec is an internal representation of an image. Currently, it wraps the -// value of a Container's Image field (e.g. imageID or imageDigest), but in the -// future it will include more detailed information about the different image types. +// ImageSpec is an internal representation of an image. type ImageSpec struct { - Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + // Container's Image field (e.g. imageID or imageDigest). + Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` + // Unstructured key-value map holding arbitrary metadata. + // ImageSpec Annotations can be used to help the runtime target specific + // images in multi-arch images. + Annotations map[string]string `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ImageSpec) Reset() { *m = ImageSpec{} } @@ -2164,6 +2167,13 @@ func (m *ImageSpec) GetImage() string { return "" } +func (m *ImageSpec) GetAnnotations() map[string]string { + if m != nil { + return m.Annotations + } + return nil +} + type KeyValue struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` @@ -5010,9 +5020,11 @@ type Image struct { Uid *Int64Value `protobuf:"bytes,5,opt,name=uid,proto3" json:"uid,omitempty"` // User name that will run the command(s). This is used if UID is not set // and no user is specified when creating container. - Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"` + // ImageSpec for image which includes annotations + Spec *ImageSpec `protobuf:"bytes,7,opt,name=spec,proto3" json:"spec,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Image) Reset() { *m = Image{} } @@ -5089,6 +5101,13 @@ func (m *Image) GetUsername() string { return "" } +func (m *Image) GetSpec() *ImageSpec { + if m != nil { + return m.Spec + } + return nil +} + type ListImagesResponse struct { // List of images. Images []*Image `protobuf:"bytes,1,rep,name=images,proto3" json:"images,omitempty"` @@ -6840,6 +6859,7 @@ func init() { proto.RegisterMapType((map[string]string)(nil), "runtime.v1alpha2.PodSandbox.LabelsEntry") proto.RegisterType((*ListPodSandboxResponse)(nil), "runtime.v1alpha2.ListPodSandboxResponse") proto.RegisterType((*ImageSpec)(nil), "runtime.v1alpha2.ImageSpec") + proto.RegisterMapType((map[string]string)(nil), "runtime.v1alpha2.ImageSpec.AnnotationsEntry") proto.RegisterType((*KeyValue)(nil), "runtime.v1alpha2.KeyValue") proto.RegisterType((*LinuxContainerResources)(nil), "runtime.v1alpha2.LinuxContainerResources") proto.RegisterType((*HugepageLimit)(nil), "runtime.v1alpha2.HugepageLimit") @@ -6932,310 +6952,312 @@ func init() { func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 4845 bytes of a gzipped FileDescriptorProto + // 4879 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5c, 0xcd, 0x73, 0x1b, 0x47, - 0x76, 0x27, 0xbe, 0x48, 0xe0, 0x81, 0x00, 0xc1, 0x16, 0x25, 0x42, 0x90, 0x45, 0x89, 0x23, 0xeb, - 0xd3, 0x16, 0x65, 0xd1, 0x5e, 0x39, 0x92, 0x6c, 0x49, 0x10, 0x49, 0x49, 0xc8, 0x4a, 0x20, 0x32, - 0x20, 0xfd, 0xb1, 0x76, 0xd5, 0xec, 0x10, 0xd3, 0x04, 0x67, 0x05, 0xcc, 0x8c, 0x67, 0x06, 0x92, - 0xb8, 0xa9, 0x4a, 0x6d, 0xd5, 0x56, 0xf6, 0x90, 0x53, 0xce, 0x39, 0x6e, 0x0e, 0x39, 0xe4, 0x9c, - 0xca, 0x21, 0xa7, 0x4d, 0xe5, 0xb0, 0x97, 0x54, 0x72, 0xda, 0x24, 0x95, 0x4b, 0xec, 0x24, 0x97, - 0x54, 0x25, 0x95, 0x3f, 0x20, 0x87, 0x54, 0x7f, 0xcd, 0xf7, 0xe0, 0x43, 0xd6, 0xae, 0x77, 0x4f, - 0x44, 0xbf, 0x79, 0xef, 0xf5, 0x9b, 0xd7, 0xaf, 0x5f, 0xbf, 0xfe, 0x75, 0x0f, 0xa1, 0xa4, 0x5a, - 0xfa, 0x86, 0x65, 0x9b, 0xae, 0x89, 0x6a, 0xf6, 0xc8, 0x70, 0xf5, 0x21, 0xde, 0x78, 0x71, 0x53, - 0x1d, 0x58, 0x47, 0xea, 0x66, 0xe3, 0x7a, 0x5f, 0x77, 0x8f, 0x46, 0x07, 0x1b, 0x3d, 0x73, 0x78, - 0xa3, 0x6f, 0xf6, 0xcd, 0x1b, 0x94, 0xf1, 0x60, 0x74, 0x48, 0x5b, 0xb4, 0x41, 0x7f, 0x31, 0x05, - 0xd2, 0x35, 0xa8, 0x7e, 0x82, 0x6d, 0x47, 0x37, 0x0d, 0x19, 0x7f, 0x35, 0xc2, 0x8e, 0x8b, 0xea, - 0xb0, 0xf0, 0x82, 0x51, 0xea, 0x99, 0xf3, 0x99, 0x2b, 0x25, 0x59, 0x34, 0xa5, 0xbf, 0xc8, 0xc0, - 0x92, 0xc7, 0xec, 0x58, 0xa6, 0xe1, 0xe0, 0x74, 0x6e, 0xb4, 0x0e, 0x8b, 0xdc, 0x38, 0xc5, 0x50, - 0x87, 0xb8, 0x9e, 0xa5, 0x8f, 0xcb, 0x9c, 0xd6, 0x56, 0x87, 0x18, 0x5d, 0x86, 0x25, 0xc1, 0x22, - 0x94, 0xe4, 0x28, 0x57, 0x95, 0x93, 0x79, 0x6f, 0x68, 0x03, 0x4e, 0x08, 0x46, 0xd5, 0xd2, 0x3d, - 0xe6, 0x3c, 0x65, 0x5e, 0xe6, 0x8f, 0x9a, 0x96, 0xce, 0xf9, 0xa5, 0x2f, 0xa0, 0xb4, 0xdd, 0xee, - 0x6e, 0x99, 0xc6, 0xa1, 0xde, 0x27, 0x26, 0x3a, 0xd8, 0x26, 0x32, 0xf5, 0xcc, 0xf9, 0x1c, 0x31, - 0x91, 0x37, 0x51, 0x03, 0x8a, 0x0e, 0x56, 0xed, 0xde, 0x11, 0x76, 0xea, 0x59, 0xfa, 0xc8, 0x6b, - 0x13, 0x29, 0xd3, 0x72, 0x75, 0xd3, 0x70, 0xea, 0x39, 0x26, 0xc5, 0x9b, 0xd2, 0xcf, 0x33, 0x50, - 0xee, 0x98, 0xb6, 0xfb, 0x4c, 0xb5, 0x2c, 0xdd, 0xe8, 0xa3, 0x5b, 0x50, 0xa4, 0xbe, 0xec, 0x99, - 0x03, 0xea, 0x83, 0xea, 0x66, 0x63, 0x23, 0x3a, 0x2c, 0x1b, 0x1d, 0xce, 0x21, 0x7b, 0xbc, 0xe8, - 0x22, 0x54, 0x7b, 0xa6, 0xe1, 0xaa, 0xba, 0x81, 0x6d, 0xc5, 0x32, 0x6d, 0x97, 0xba, 0xa8, 0x20, - 0x57, 0x3c, 0x2a, 0xe9, 0x05, 0x9d, 0x81, 0xd2, 0x91, 0xe9, 0xb8, 0x8c, 0x23, 0x47, 0x39, 0x8a, - 0x84, 0x40, 0x1f, 0xae, 0xc2, 0x02, 0x7d, 0xa8, 0x5b, 0xdc, 0x19, 0xf3, 0xa4, 0xd9, 0xb2, 0xa4, - 0x5f, 0x65, 0xa0, 0xf0, 0xcc, 0x1c, 0x19, 0x6e, 0xa4, 0x1b, 0xd5, 0x3d, 0xe2, 0x03, 0x15, 0xe8, - 0x46, 0x75, 0x8f, 0xfc, 0x6e, 0x08, 0x07, 0x1b, 0x2b, 0xd6, 0x0d, 0x79, 0xd8, 0x80, 0xa2, 0x8d, - 0x55, 0xcd, 0x34, 0x06, 0xc7, 0xd4, 0x84, 0xa2, 0xec, 0xb5, 0xc9, 0x20, 0x3a, 0x78, 0xa0, 0x1b, - 0xa3, 0x57, 0x8a, 0x8d, 0x07, 0xea, 0x01, 0x1e, 0x50, 0x53, 0x8a, 0x72, 0x95, 0x93, 0x65, 0x46, - 0x45, 0xdb, 0x50, 0xb6, 0x6c, 0xd3, 0x52, 0xfb, 0x2a, 0xf1, 0x63, 0xbd, 0x40, 0x5d, 0x25, 0xc5, - 0x5d, 0x45, 0xcd, 0xee, 0xf8, 0x9c, 0x72, 0x50, 0x4c, 0xfa, 0x87, 0x0c, 0x2c, 0x91, 0xe0, 0x71, - 0x2c, 0xb5, 0x87, 0x77, 0xe9, 0x90, 0xa0, 0xdb, 0xb0, 0x60, 0x60, 0xf7, 0xa5, 0x69, 0x3f, 0xe7, - 0x03, 0x70, 0x2e, 0xae, 0xd5, 0x93, 0x79, 0x66, 0x6a, 0x58, 0x16, 0xfc, 0xe8, 0x26, 0xe4, 0x2c, - 0x5d, 0xa3, 0x2f, 0x3c, 0x85, 0x18, 0xe1, 0x25, 0x22, 0xba, 0xd5, 0xa3, 0x7e, 0x98, 0x46, 0x44, - 0xb7, 0x7a, 0xc4, 0xb9, 0xae, 0x6a, 0xf7, 0xb1, 0xab, 0xe8, 0x1a, 0x1f, 0xa8, 0x22, 0x23, 0xb4, - 0x34, 0x49, 0x02, 0x68, 0x19, 0xee, 0xad, 0x0f, 0x3e, 0x51, 0x07, 0x23, 0x8c, 0x56, 0xa0, 0xf0, - 0x82, 0xfc, 0xa0, 0x6f, 0x92, 0x93, 0x59, 0x43, 0xfa, 0x3a, 0x07, 0x67, 0x9e, 0x12, 0x67, 0x76, - 0x55, 0x43, 0x3b, 0x30, 0x5f, 0x75, 0x71, 0x6f, 0x64, 0xeb, 0xee, 0xf1, 0x96, 0x69, 0xb8, 0xf8, - 0x95, 0x8b, 0xda, 0xb0, 0x6c, 0x88, 0x6e, 0x15, 0x11, 0xb7, 0x44, 0x43, 0x79, 0x73, 0x7d, 0x8c, - 0x85, 0xcc, 0x7f, 0x72, 0xcd, 0x08, 0x13, 0x1c, 0xf4, 0xc4, 0x1f, 0x54, 0xa1, 0x2d, 0x4b, 0xb5, - 0x25, 0xbc, 0x6f, 0x77, 0x87, 0x5a, 0xc6, 0x75, 0x89, 0x51, 0x17, 0x9a, 0x3e, 0x02, 0x32, 0xe5, - 0x15, 0xd5, 0x51, 0x46, 0x0e, 0xb6, 0xa9, 0xd7, 0xca, 0x9b, 0x6f, 0xc5, 0xb5, 0xf8, 0x2e, 0x90, - 0x4b, 0xf6, 0xc8, 0x68, 0x3a, 0xfb, 0x0e, 0xb6, 0xd1, 0x3d, 0x9a, 0x44, 0x88, 0x74, 0xdf, 0x36, - 0x47, 0x56, 0xbd, 0x38, 0x85, 0x38, 0x50, 0xf1, 0xc7, 0x84, 0x9f, 0x66, 0x18, 0x1e, 0xa8, 0x8a, - 0x6d, 0x9a, 0xee, 0xa1, 0x23, 0x82, 0x53, 0x90, 0x65, 0x4a, 0x45, 0x37, 0xe0, 0x84, 0x33, 0xb2, - 0xac, 0x01, 0x1e, 0x62, 0xc3, 0x55, 0x07, 0xac, 0x3b, 0xa7, 0x5e, 0x38, 0x9f, 0xbb, 0x92, 0x93, - 0x51, 0xf0, 0x11, 0x55, 0xec, 0xa0, 0x35, 0x00, 0xcb, 0xd6, 0x5f, 0xe8, 0x03, 0xdc, 0xc7, 0x5a, - 0x7d, 0x9e, 0x2a, 0x0d, 0x50, 0xd0, 0x7b, 0xb0, 0xe2, 0xe0, 0x5e, 0xcf, 0x1c, 0x5a, 0x8a, 0x65, - 0x9b, 0x87, 0xfa, 0x00, 0xb3, 0xa9, 0xb5, 0x40, 0x47, 0x1f, 0xf1, 0x67, 0x1d, 0xf6, 0x88, 0x4c, - 0x32, 0xe9, 0xe7, 0x59, 0x38, 0x49, 0x3d, 0xd9, 0x31, 0x35, 0x3e, 0xcc, 0x3c, 0x83, 0x5d, 0x80, - 0x4a, 0x8f, 0x1a, 0xa4, 0x58, 0xaa, 0x8d, 0x0d, 0x97, 0xcf, 0xe0, 0x45, 0x46, 0xec, 0x50, 0x1a, - 0xfa, 0x0c, 0x6a, 0x0e, 0x8f, 0x0a, 0xa5, 0xc7, 0xc2, 0x82, 0x8f, 0xd9, 0xf5, 0xb8, 0xbb, 0xc6, - 0xc4, 0x92, 0xbc, 0xe4, 0xc4, 0x82, 0x6b, 0xc1, 0x39, 0x76, 0x7a, 0xee, 0x80, 0xa5, 0xc2, 0xf2, - 0xe6, 0x07, 0x29, 0x0a, 0xa3, 0x86, 0x6f, 0x74, 0x99, 0xd8, 0x8e, 0xe1, 0xda, 0xc7, 0xb2, 0x50, - 0xd2, 0xb8, 0x03, 0x8b, 0xc1, 0x07, 0xa8, 0x06, 0xb9, 0xe7, 0xf8, 0x98, 0xbf, 0x14, 0xf9, 0xe9, - 0x4f, 0x02, 0x96, 0x88, 0x58, 0xe3, 0x4e, 0xf6, 0xf7, 0x32, 0x92, 0x0d, 0xc8, 0xef, 0xe5, 0x19, - 0x76, 0x55, 0x4d, 0x75, 0x55, 0x84, 0x20, 0x4f, 0xd7, 0x18, 0xa6, 0x82, 0xfe, 0x26, 0x5a, 0x47, - 0x7c, 0x66, 0x97, 0x64, 0xf2, 0x13, 0xbd, 0x05, 0x25, 0x2f, 0xd0, 0xf9, 0x42, 0xe3, 0x13, 0x48, - 0xc2, 0x57, 0x5d, 0x17, 0x0f, 0x2d, 0x97, 0x86, 0x48, 0x45, 0x16, 0x4d, 0xe9, 0x7f, 0xf2, 0x50, - 0x8b, 0x8d, 0xc9, 0x03, 0x28, 0x0e, 0x79, 0xf7, 0x7c, 0xa2, 0xbd, 0x9d, 0x90, 0xf5, 0x63, 0xa6, - 0xca, 0x9e, 0x14, 0x49, 0xaa, 0x24, 0xc1, 0x06, 0x16, 0x47, 0xaf, 0x4d, 0x46, 0x7c, 0x60, 0xf6, - 0x15, 0x4d, 0xb7, 0x71, 0xcf, 0x35, 0xed, 0x63, 0x6e, 0xee, 0xe2, 0xc0, 0xec, 0x6f, 0x0b, 0x1a, - 0xba, 0x03, 0xa0, 0x19, 0x0e, 0x19, 0xec, 0x43, 0xbd, 0x4f, 0x8d, 0x2e, 0x6f, 0x9e, 0x89, 0x1b, - 0xe1, 0xad, 0x84, 0x72, 0x49, 0x33, 0x1c, 0x6e, 0xfe, 0x43, 0xa8, 0x90, 0x05, 0x45, 0x19, 0xb2, - 0x45, 0x8c, 0x45, 0x7a, 0x79, 0xf3, 0x6c, 0xd2, 0x3b, 0x78, 0x4b, 0x9d, 0xbc, 0x68, 0xf9, 0x0d, - 0x07, 0x3d, 0x82, 0x79, 0x9a, 0xd9, 0x9d, 0xfa, 0x3c, 0x15, 0xde, 0x18, 0xe7, 0x00, 0x1e, 0x11, - 0x4f, 0xa9, 0x00, 0x0b, 0x08, 0x2e, 0x8d, 0xf6, 0xa1, 0xac, 0x1a, 0x86, 0xe9, 0xaa, 0x2c, 0xd1, - 0x2c, 0x50, 0x65, 0xef, 0x4f, 0xa1, 0xac, 0xe9, 0x4b, 0x31, 0x8d, 0x41, 0x3d, 0xe8, 0x63, 0x28, - 0xd0, 0x4c, 0xc4, 0x93, 0xc6, 0xe5, 0x29, 0x83, 0x56, 0x66, 0x52, 0x8d, 0xdb, 0x50, 0x0e, 0x18, - 0x3b, 0x4b, 0x90, 0x36, 0xee, 0x41, 0x2d, 0x6a, 0xda, 0x4c, 0x41, 0xfe, 0x87, 0xb0, 0x22, 0x8f, - 0x0c, 0xdf, 0x30, 0x51, 0x9a, 0xdd, 0x81, 0x79, 0x3e, 0xd8, 0x2c, 0xe2, 0xa4, 0xc9, 0x3e, 0x92, - 0xb9, 0x44, 0xb0, 0xd6, 0x3a, 0x52, 0x0d, 0x6d, 0x80, 0x6d, 0xde, 0xaf, 0xa8, 0xb5, 0x9e, 0x30, - 0xaa, 0xf4, 0x31, 0x9c, 0x8c, 0x74, 0xce, 0x4b, 0xbd, 0xb7, 0xa1, 0x6a, 0x99, 0x9a, 0xe2, 0x30, - 0x32, 0x59, 0xc9, 0x78, 0x1a, 0xb2, 0x3c, 0xde, 0x96, 0x46, 0xc4, 0xbb, 0xae, 0x69, 0xc5, 0x8d, - 0x9f, 0x4e, 0xbc, 0x0e, 0xa7, 0xa2, 0xe2, 0xac, 0x7b, 0xe9, 0x3e, 0xac, 0xca, 0x78, 0x68, 0xbe, - 0xc0, 0xaf, 0xab, 0xba, 0x01, 0xf5, 0xb8, 0x02, 0xae, 0xfc, 0x73, 0x58, 0xf5, 0xa9, 0x5d, 0x57, - 0x75, 0x47, 0xce, 0x4c, 0xca, 0x79, 0x1d, 0x7c, 0x60, 0x3a, 0x6c, 0x38, 0x8b, 0xb2, 0x68, 0x4a, - 0xab, 0x50, 0xe8, 0x98, 0x5a, 0xab, 0x83, 0xaa, 0x90, 0xd5, 0x2d, 0x2e, 0x9c, 0xd5, 0x2d, 0x49, - 0x0f, 0xf6, 0xd9, 0x66, 0xf5, 0x08, 0xeb, 0x3a, 0xca, 0x8a, 0xee, 0x41, 0x55, 0xd5, 0x34, 0x9d, - 0x84, 0x93, 0x3a, 0x50, 0x74, 0x8b, 0x95, 0xab, 0xe5, 0xcd, 0xd5, 0xc4, 0x00, 0x68, 0x75, 0xe4, - 0x8a, 0xcf, 0xde, 0xb2, 0x1c, 0xe9, 0x09, 0x94, 0xbc, 0x35, 0x1f, 0xdd, 0xf5, 0x2b, 0xdb, 0xec, - 0xb4, 0x15, 0x82, 0x57, 0xfc, 0xee, 0xc5, 0xd6, 0x28, 0x6e, 0xf2, 0x5d, 0x00, 0x2f, 0x97, 0x8a, - 0xd2, 0xe3, 0xcc, 0x18, 0xc5, 0x72, 0x80, 0x5d, 0xfa, 0x69, 0x21, 0x98, 0x61, 0x03, 0x4e, 0xd0, - 0x3c, 0x27, 0x68, 0xa1, 0x8c, 0x9b, 0x7d, 0xad, 0x8c, 0xfb, 0x21, 0x14, 0x1c, 0x57, 0x75, 0x31, - 0xaf, 0xdd, 0xd6, 0xc7, 0x89, 0x13, 0x23, 0xb0, 0xcc, 0xf8, 0xd1, 0x59, 0x80, 0x9e, 0x8d, 0x55, - 0x17, 0x6b, 0x8a, 0xca, 0x96, 0x87, 0x9c, 0x5c, 0xe2, 0x94, 0xa6, 0x8b, 0xb6, 0xfc, 0xfa, 0xb3, - 0x40, 0x0d, 0xbb, 0x3a, 0x4e, 0x73, 0x68, 0xa8, 0xfd, 0x4a, 0xd4, 0x4b, 0x57, 0xf3, 0x53, 0xa6, - 0x2b, 0xae, 0x80, 0x49, 0x05, 0x92, 0xf1, 0xc2, 0xe4, 0x64, 0xcc, 0x44, 0xa7, 0x49, 0xc6, 0xc5, - 0xc9, 0xc9, 0x98, 0x2b, 0x1b, 0x9f, 0x8c, 0x13, 0xd2, 0x4f, 0x29, 0x29, 0xfd, 0x7c, 0x97, 0x69, - 0xf7, 0x5f, 0x32, 0x50, 0x8f, 0x67, 0x01, 0x9e, 0xfd, 0xee, 0xc0, 0xbc, 0x43, 0x29, 0xd3, 0xe4, - 0x5e, 0x2e, 0xcb, 0x25, 0xd0, 0x13, 0xc8, 0xeb, 0xc6, 0xa1, 0xc9, 0x27, 0xed, 0x07, 0x53, 0x48, - 0xf2, 0x5e, 0x37, 0x5a, 0xc6, 0xa1, 0xc9, 0xbc, 0x49, 0x35, 0x34, 0x3e, 0x84, 0x92, 0x47, 0x9a, - 0xe9, 0xdd, 0x76, 0x61, 0x25, 0x12, 0xdb, 0x6c, 0xbb, 0xe1, 0x4d, 0x89, 0xcc, 0x6c, 0x53, 0x42, - 0xfa, 0x49, 0x36, 0x38, 0x65, 0x1f, 0xe9, 0x03, 0x17, 0xdb, 0xb1, 0x29, 0xfb, 0x91, 0xd0, 0xce, - 0xe6, 0xeb, 0xa5, 0x89, 0xda, 0x59, 0x05, 0xcf, 0x67, 0xdd, 0x97, 0x50, 0xa5, 0x41, 0xa9, 0x38, - 0x78, 0x40, 0x4b, 0x1e, 0x5e, 0x7e, 0x7e, 0x6f, 0x9c, 0x1a, 0x66, 0x09, 0x0b, 0xed, 0x2e, 0x97, - 0x63, 0x1e, 0xac, 0x0c, 0x82, 0xb4, 0xc6, 0x03, 0x40, 0x71, 0xa6, 0x99, 0x7c, 0xda, 0x25, 0xb9, - 0x90, 0x6c, 0xc4, 0x13, 0xd6, 0xe9, 0x43, 0x6a, 0xc6, 0x34, 0xb1, 0xc2, 0x0c, 0x96, 0xb9, 0x84, - 0xf4, 0xdf, 0x39, 0x00, 0xff, 0xe1, 0xef, 0x50, 0x12, 0x7c, 0xe0, 0x25, 0x20, 0x56, 0x4a, 0x5e, - 0x19, 0xa7, 0x38, 0x31, 0xf5, 0xec, 0x86, 0x53, 0x0f, 0x2b, 0x2a, 0xaf, 0x8f, 0x55, 0x33, 0x73, - 0xd2, 0x59, 0xf8, 0x6d, 0x4b, 0x3a, 0x4f, 0xe1, 0x54, 0x34, 0x88, 0x78, 0xc6, 0xd9, 0x84, 0x82, - 0xee, 0xe2, 0x21, 0x43, 0xad, 0x12, 0x37, 0xbd, 0x01, 0x21, 0xc6, 0x2a, 0xad, 0x43, 0xa9, 0x35, - 0x54, 0xfb, 0xb8, 0x6b, 0xe1, 0x1e, 0xe9, 0x54, 0x27, 0x0d, 0x6e, 0x08, 0x6b, 0x48, 0x9b, 0x50, - 0xfc, 0x3e, 0x3e, 0x66, 0xb3, 0x7f, 0x4a, 0x43, 0xa5, 0x7f, 0xca, 0xc2, 0x2a, 0x5d, 0x7d, 0xb6, - 0x04, 0x66, 0x24, 0x63, 0xc7, 0x1c, 0xd9, 0x3d, 0xec, 0xd0, 0xb0, 0xb0, 0x46, 0x8a, 0x85, 0x6d, - 0xdd, 0xd4, 0x38, 0x6a, 0x51, 0xea, 0x59, 0xa3, 0x0e, 0x25, 0xa0, 0x33, 0x40, 0x1a, 0xca, 0x57, - 0x23, 0x93, 0x47, 0x6c, 0x4e, 0x2e, 0xf6, 0xac, 0xd1, 0x1f, 0x90, 0xb6, 0x90, 0x75, 0x8e, 0x54, - 0x1b, 0x3b, 0x34, 0x20, 0x99, 0x6c, 0x97, 0x12, 0xd0, 0x4d, 0x38, 0x39, 0xc4, 0x43, 0xd3, 0x3e, - 0x56, 0x06, 0xfa, 0x50, 0x77, 0x15, 0xdd, 0x50, 0x0e, 0x8e, 0x5d, 0xec, 0xf0, 0xe0, 0x43, 0xec, - 0xe1, 0x53, 0xf2, 0xac, 0x65, 0x3c, 0x24, 0x4f, 0x90, 0x04, 0x15, 0xd3, 0x1c, 0x2a, 0x4e, 0xcf, - 0xb4, 0xb1, 0xa2, 0x6a, 0x3f, 0xa2, 0x0b, 0x72, 0x4e, 0x2e, 0x9b, 0xe6, 0xb0, 0x4b, 0x68, 0x4d, - 0xed, 0x47, 0xe8, 0x1c, 0x94, 0x7b, 0xd6, 0xc8, 0xc1, 0xae, 0x42, 0xfe, 0xd0, 0xf5, 0xb6, 0x24, - 0x03, 0x23, 0x6d, 0x59, 0x23, 0x27, 0xc0, 0x30, 0x24, 0xfe, 0x5f, 0x08, 0x32, 0x3c, 0xc3, 0x43, - 0x0a, 0x8f, 0x1c, 0x8d, 0xfa, 0xd8, 0x52, 0xfb, 0x98, 0x99, 0x26, 0x16, 0xca, 0x04, 0x78, 0xe4, - 0x09, 0x67, 0xa4, 0x66, 0xca, 0xd5, 0xa3, 0x60, 0xd3, 0x91, 0x1e, 0x42, 0x25, 0xc4, 0x40, 0xfc, - 0x45, 0xd5, 0x3a, 0xfa, 0x8f, 0xc5, 0xc0, 0x15, 0x09, 0xa1, 0xab, 0xff, 0x98, 0x82, 0x43, 0xb4, - 0x3b, 0xea, 0xc8, 0xbc, 0xcc, 0x1a, 0x92, 0x0a, 0x95, 0x10, 0x06, 0x43, 0xb6, 0xc3, 0x14, 0x6c, - 0xe1, 0xdb, 0x61, 0xf2, 0x9b, 0xd0, 0x6c, 0x73, 0x20, 0xc6, 0x95, 0xfe, 0x26, 0x34, 0xf7, 0xd8, - 0x12, 0x7b, 0x61, 0xfa, 0x9b, 0x76, 0x81, 0x5f, 0x70, 0x10, 0xaf, 0x24, 0xb3, 0x86, 0xa4, 0x01, - 0x6c, 0xa9, 0x96, 0x7a, 0xa0, 0x0f, 0x74, 0xf7, 0x18, 0x5d, 0x85, 0x9a, 0xaa, 0x69, 0x4a, 0x4f, - 0x50, 0x74, 0x2c, 0xa0, 0xd5, 0x25, 0x55, 0xd3, 0xb6, 0x02, 0x64, 0xf4, 0x0e, 0x2c, 0x6b, 0xb6, - 0x69, 0x85, 0x79, 0x19, 0xd6, 0x5a, 0x23, 0x0f, 0x82, 0xcc, 0xd2, 0x7f, 0x14, 0xe0, 0x6c, 0x38, - 0xcc, 0xa2, 0x38, 0xd7, 0x03, 0x58, 0x8c, 0xf4, 0x9a, 0x82, 0x07, 0xf9, 0xd6, 0xca, 0x21, 0x89, - 0x08, 0x6e, 0x93, 0x8d, 0xe1, 0x36, 0x89, 0x48, 0x5a, 0xee, 0x8d, 0x22, 0x69, 0xf9, 0x37, 0x82, - 0xa4, 0x15, 0xbe, 0x1d, 0x92, 0xb6, 0x38, 0x23, 0x92, 0x76, 0x89, 0xe6, 0x52, 0xd1, 0x3b, 0x05, - 0x2d, 0xd8, 0xc4, 0xa9, 0x78, 0x7d, 0x18, 0x02, 0xd3, 0x8f, 0x20, 0x6e, 0x0b, 0xb3, 0x20, 0x6e, - 0xc5, 0x54, 0xc4, 0x8d, 0x44, 0x9d, 0x65, 0xa9, 0xf6, 0xd0, 0xb4, 0x05, 0xa4, 0xc6, 0x6b, 0xc8, - 0x25, 0x41, 0xe7, 0x70, 0x5a, 0x2a, 0xf8, 0x06, 0x69, 0xe0, 0x1b, 0x3a, 0x0f, 0x8b, 0x86, 0xa9, - 0x18, 0xf8, 0xa5, 0x42, 0x62, 0xc1, 0xa9, 0x97, 0x59, 0x60, 0x18, 0x66, 0x1b, 0xbf, 0xec, 0x10, - 0x0a, 0x5a, 0x87, 0xc5, 0xa1, 0xea, 0x3c, 0xc7, 0x1a, 0x55, 0xe5, 0xd4, 0x2b, 0x34, 0x88, 0xcb, - 0x8c, 0x46, 0x74, 0x38, 0xe8, 0x22, 0x78, 0x2f, 0xc9, 0x99, 0xaa, 0x94, 0xa9, 0x22, 0xa8, 0x94, - 0x4d, 0xfa, 0x9b, 0x0c, 0xac, 0x84, 0xc3, 0x9c, 0x83, 0x32, 0x8f, 0xa1, 0x64, 0x8b, 0xbc, 0xca, - 0x43, 0xfb, 0x6a, 0xca, 0x36, 0x20, 0x9e, 0x88, 0x65, 0x5f, 0x16, 0xfd, 0x20, 0x15, 0x0b, 0xbc, - 0x31, 0x49, 0xdf, 0x24, 0x34, 0x50, 0xb2, 0xe1, 0xdc, 0xa7, 0xba, 0xa1, 0x99, 0x2f, 0x9d, 0xd4, - 0x59, 0x9a, 0x10, 0x2b, 0x99, 0x94, 0x58, 0xe9, 0xd9, 0x58, 0xc3, 0x86, 0xab, 0xab, 0x03, 0xc5, - 0xb1, 0x70, 0x4f, 0x60, 0x12, 0x3e, 0x99, 0xac, 0x64, 0xd2, 0x2f, 0x32, 0x70, 0x2a, 0xda, 0x29, - 0xf7, 0x59, 0x2b, 0xee, 0xb3, 0x77, 0xe2, 0xef, 0x18, 0x15, 0x4e, 0xf4, 0xda, 0x97, 0xa9, 0x5e, - 0xbb, 0x39, 0x59, 0xe3, 0x44, 0xbf, 0xfd, 0x65, 0x06, 0x4e, 0xa7, 0x9a, 0x11, 0x59, 0x09, 0x33, - 0xd1, 0x95, 0x90, 0xaf, 0xa2, 0x3d, 0x73, 0x64, 0xb8, 0x81, 0x55, 0x74, 0x8b, 0x9e, 0xf0, 0xb0, - 0xe5, 0x4a, 0x19, 0xaa, 0xaf, 0xf4, 0xe1, 0x68, 0xc8, 0x97, 0x51, 0xa2, 0xee, 0x19, 0xa3, 0xbc, - 0xc6, 0x3a, 0x2a, 0x35, 0x61, 0xd9, 0xb3, 0x72, 0x2c, 0xcc, 0x1a, 0x80, 0x4d, 0xb3, 0x61, 0xd8, - 0xd4, 0x80, 0xf9, 0x6d, 0xfc, 0x42, 0xef, 0xe1, 0x37, 0x72, 0x04, 0x75, 0x1e, 0xca, 0x16, 0xb6, - 0x87, 0xba, 0xe3, 0x78, 0x19, 0xb9, 0x24, 0x07, 0x49, 0xd2, 0x7f, 0xce, 0xc3, 0x52, 0x34, 0x3a, - 0xee, 0xc7, 0x50, 0xda, 0x0b, 0x09, 0x6b, 0x45, 0xf4, 0x45, 0x03, 0xd5, 0xf2, 0x4d, 0x51, 0x43, - 0x65, 0xd3, 0x10, 0x0d, 0xaf, 0xde, 0xe2, 0x05, 0x16, 0xf1, 0x48, 0xcf, 0x1c, 0x0e, 0x55, 0x43, - 0x13, 0x27, 0x87, 0xbc, 0x49, 0xfc, 0xa7, 0xda, 0x7d, 0xe2, 0x76, 0x42, 0xa6, 0xbf, 0xc9, 0xe0, - 0x91, 0xed, 0xbf, 0x6e, 0x50, 0xb4, 0x97, 0x66, 0xf5, 0x92, 0x0c, 0x9c, 0xb4, 0xad, 0xdb, 0x68, - 0x03, 0xf2, 0xd8, 0x78, 0x21, 0xca, 0xe1, 0x84, 0xa3, 0x45, 0x51, 0xcd, 0xc9, 0x94, 0x0f, 0xdd, - 0x80, 0xf9, 0x21, 0x09, 0x0b, 0x01, 0x04, 0xac, 0xa6, 0x9c, 0xb0, 0xc9, 0x9c, 0x0d, 0x6d, 0xc2, - 0x82, 0x46, 0xc7, 0x49, 0x14, 0x31, 0xf5, 0x04, 0x0c, 0x99, 0x32, 0xc8, 0x82, 0x11, 0xed, 0x78, - 0xc5, 0x7e, 0x29, 0xad, 0x4a, 0x8f, 0x0c, 0x45, 0x62, 0xc5, 0xbf, 0x17, 0xae, 0xf8, 0x81, 0xea, - 0xda, 0x9c, 0xac, 0x6b, 0x7c, 0xd9, 0x7f, 0x1a, 0x8a, 0x03, 0xb3, 0xcf, 0xc2, 0xa8, 0xcc, 0x0e, - 0xa5, 0x07, 0x66, 0x9f, 0x46, 0xd1, 0x0a, 0xd9, 0xfc, 0x68, 0xba, 0x41, 0x97, 0xbf, 0xa2, 0xcc, - 0x1a, 0x64, 0xf2, 0xd1, 0x1f, 0x8a, 0x69, 0xf4, 0x70, 0xbd, 0x42, 0x1f, 0x95, 0x28, 0x65, 0xd7, - 0xe8, 0xd1, 0x2a, 0xd9, 0x75, 0x8f, 0xeb, 0x55, 0x4a, 0x27, 0x3f, 0xc9, 0xbe, 0x96, 0x61, 0x35, - 0x4b, 0x69, 0xfb, 0xda, 0xa4, 0xfc, 0x2e, 0xa0, 0x9a, 0x87, 0xb0, 0xf0, 0x92, 0x25, 0x82, 0x7a, - 0x8d, 0xca, 0x5f, 0x99, 0x9c, 0x5e, 0xb8, 0x06, 0x21, 0xf8, 0x5d, 0xee, 0x58, 0xfe, 0x2e, 0x03, - 0xa7, 0xb6, 0xe8, 0xb6, 0x2f, 0x90, 0xc7, 0x66, 0xc1, 0x4a, 0x6f, 0x7b, 0x30, 0x76, 0x2a, 0xfe, - 0x18, 0x7d, 0x6f, 0x81, 0x62, 0xb7, 0xa0, 0x2a, 0x94, 0x73, 0x15, 0xb9, 0xa9, 0x91, 0xf0, 0x8a, - 0x13, 0x6c, 0x4a, 0x1f, 0xc1, 0x6a, 0xec, 0x2d, 0xf8, 0xce, 0x6b, 0x1d, 0x16, 0xfd, 0x7c, 0xe5, - 0xbd, 0x44, 0xd9, 0xa3, 0xb5, 0x34, 0xe9, 0x0e, 0x9c, 0xec, 0xba, 0xaa, 0xed, 0xc6, 0x5c, 0x30, - 0x85, 0x2c, 0xc5, 0xb8, 0xc3, 0xb2, 0x1c, 0x86, 0xee, 0xc2, 0x4a, 0xd7, 0x35, 0xad, 0xd7, 0x50, - 0x4a, 0xb2, 0x0e, 0x79, 0x7f, 0x73, 0x24, 0xd6, 0x07, 0xd1, 0x94, 0x56, 0x19, 0x22, 0x1f, 0xef, - 0xed, 0x2e, 0x9c, 0x62, 0x80, 0xf8, 0xeb, 0xbc, 0xc4, 0x69, 0x01, 0xc7, 0xc7, 0xf5, 0x3e, 0x83, - 0x13, 0xfe, 0xb2, 0xe8, 0x43, 0x4d, 0xb7, 0xc2, 0x50, 0xd3, 0xf9, 0x31, 0xa3, 0x1e, 0x42, 0x9a, - 0xfe, 0x3c, 0x1b, 0xc8, 0xeb, 0x29, 0x40, 0xd3, 0xdd, 0x30, 0xd0, 0x74, 0x71, 0x92, 0xee, 0x10, - 0xce, 0x14, 0x8f, 0xda, 0x5c, 0x42, 0xd4, 0x7e, 0x11, 0x43, 0xa3, 0xf2, 0x69, 0x70, 0x5e, 0xc4, - 0xda, 0xdf, 0x08, 0x18, 0x25, 0x33, 0x30, 0xca, 0xeb, 0xda, 0x3b, 0xbf, 0xb8, 0x1d, 0x01, 0xa3, - 0xd6, 0x27, 0xda, 0xeb, 0x61, 0x51, 0x7f, 0x95, 0x87, 0x92, 0xf7, 0x2c, 0xe6, 0xf3, 0xb8, 0xdb, - 0xb2, 0x09, 0x6e, 0x0b, 0xae, 0xc0, 0xb9, 0x6f, 0xb5, 0x02, 0xe7, 0xa7, 0x5e, 0x81, 0xcf, 0x40, - 0x89, 0xfe, 0x50, 0x6c, 0x7c, 0xc8, 0x57, 0xd4, 0x22, 0x25, 0xc8, 0xf8, 0xd0, 0x0f, 0xc3, 0xf9, - 0x99, 0xc2, 0x30, 0x02, 0x7f, 0x2d, 0x44, 0xe1, 0xaf, 0xfb, 0xde, 0x8a, 0xc8, 0x16, 0xd1, 0xcb, - 0x63, 0xf4, 0x26, 0xae, 0x85, 0xed, 0xf0, 0x5a, 0xc8, 0xd6, 0xd5, 0x77, 0xc7, 0x69, 0x19, 0xbb, - 0x0a, 0x7e, 0x97, 0x2b, 0xc4, 0x3e, 0xc3, 0xb4, 0x82, 0xb1, 0xc8, 0x33, 0xeb, 0x5d, 0x00, 0x2f, - 0x89, 0x08, 0x60, 0xeb, 0xcc, 0x98, 0x77, 0x94, 0x03, 0xec, 0x44, 0x6d, 0x68, 0x68, 0xfc, 0x33, - 0xba, 0xe9, 0xf2, 0x63, 0xca, 0x01, 0xdd, 0xff, 0x15, 0x02, 0xf9, 0x25, 0xe5, 0xec, 0xe9, 0x7e, - 0x0c, 0x76, 0x9d, 0x31, 0x8a, 0x6f, 0x85, 0x51, 0xd7, 0xd7, 0x8c, 0xba, 0x18, 0xe8, 0x4a, 0x2b, - 0x17, 0xd5, 0xe6, 0x8f, 0x19, 0xd6, 0x55, 0xe2, 0x94, 0x26, 0xdd, 0x19, 0x1c, 0xea, 0x86, 0xee, - 0x1c, 0xb1, 0xe7, 0xf3, 0x6c, 0x67, 0x20, 0x48, 0x4d, 0x8a, 0x36, 0xe1, 0x57, 0xba, 0xab, 0xf4, - 0x4c, 0x0d, 0xd3, 0x98, 0x2e, 0xc8, 0x45, 0x42, 0xd8, 0x32, 0x35, 0xec, 0xcf, 0xbc, 0xe2, 0xeb, - 0xcd, 0xbc, 0x52, 0x64, 0xe6, 0x9d, 0x82, 0x79, 0x1b, 0xab, 0x8e, 0x69, 0xf0, 0x7d, 0x38, 0x6f, - 0x91, 0xa1, 0x19, 0x62, 0xc7, 0x21, 0x3d, 0xf1, 0x72, 0x8d, 0x37, 0x03, 0x65, 0xe6, 0xe2, 0xc4, - 0x32, 0x73, 0xcc, 0x99, 0x56, 0xa4, 0xcc, 0xac, 0x4c, 0x2c, 0x33, 0xa7, 0x3a, 0xd2, 0xf2, 0x0b, - 0xed, 0xea, 0x74, 0x85, 0x76, 0xb0, 0x2e, 0x5d, 0x0a, 0xd5, 0xa5, 0xdf, 0xe5, 0x64, 0xfd, 0x55, - 0x06, 0x56, 0x63, 0xd3, 0x8a, 0x4f, 0xd7, 0xdb, 0x91, 0x43, 0xaf, 0xf5, 0x89, 0x3e, 0xf3, 0xce, - 0xbc, 0x1e, 0x87, 0xce, 0xbc, 0xde, 0x9f, 0x2c, 0xf8, 0xc6, 0x8f, 0xbc, 0xfe, 0x38, 0x03, 0xe7, - 0xf6, 0x2d, 0x2d, 0x52, 0xe1, 0xf1, 0x6d, 0xff, 0xf4, 0x89, 0xe3, 0xbe, 0xa8, 0xf5, 0xb3, 0xb3, - 0x02, 0x32, 0x4c, 0x4e, 0x92, 0xe0, 0x7c, 0xba, 0x19, 0xbc, 0x64, 0xfa, 0x21, 0x2c, 0xed, 0xbc, - 0xc2, 0xbd, 0xee, 0xb1, 0xd1, 0x9b, 0xc1, 0xb4, 0x1a, 0xe4, 0x7a, 0x43, 0x8d, 0xc3, 0xa9, 0xe4, - 0x67, 0xb0, 0x0a, 0xcc, 0x85, 0xab, 0x40, 0x05, 0x6a, 0x7e, 0x0f, 0x7c, 0x78, 0x4f, 0x91, 0xe1, - 0xd5, 0x08, 0x33, 0x51, 0xbe, 0x28, 0xf3, 0x16, 0xa7, 0x63, 0x9b, 0x5d, 0x11, 0x61, 0x74, 0x6c, - 0xdb, 0xe1, 0x6c, 0x91, 0x0b, 0x67, 0x0b, 0xe9, 0xcf, 0x32, 0x50, 0x26, 0x3d, 0x7c, 0x2b, 0xfb, - 0xf9, 0x56, 0x2b, 0xe7, 0x6f, 0xb5, 0xbc, 0x1d, 0x5b, 0x3e, 0xb8, 0x63, 0xf3, 0x2d, 0x2f, 0x50, - 0x72, 0xdc, 0xf2, 0x79, 0x8f, 0x8e, 0x6d, 0x5b, 0x3a, 0x0f, 0x8b, 0xcc, 0x36, 0xfe, 0xe6, 0x35, - 0xc8, 0x8d, 0xec, 0x81, 0x88, 0xa3, 0x91, 0x3d, 0x90, 0xfe, 0x24, 0x03, 0x95, 0xa6, 0xeb, 0xaa, - 0xbd, 0xa3, 0x19, 0x5e, 0xc0, 0x33, 0x2e, 0x1b, 0x34, 0x2e, 0xfe, 0x12, 0xbe, 0xb9, 0xf9, 0x14, - 0x73, 0x0b, 0x21, 0x73, 0x25, 0xa8, 0x0a, 0x5b, 0x52, 0x0d, 0x6e, 0x03, 0xea, 0x98, 0xb6, 0xfb, - 0xc8, 0xb4, 0x5f, 0xaa, 0xb6, 0x36, 0xdb, 0x0e, 0x0c, 0x41, 0x9e, 0x5f, 0x38, 0xce, 0x5d, 0x29, - 0xc8, 0xf4, 0xb7, 0x74, 0x19, 0x4e, 0x84, 0xf4, 0xa5, 0x76, 0xfc, 0x00, 0xca, 0x34, 0xef, 0xf3, - 0x52, 0xfc, 0x66, 0xf0, 0x94, 0x69, 0xaa, 0x55, 0x42, 0xfa, 0x7d, 0x58, 0x26, 0xf5, 0x01, 0xa5, - 0x7b, 0x53, 0xf1, 0x7b, 0x91, 0x3a, 0xf5, 0x6c, 0x8a, 0xa2, 0x48, 0x8d, 0xfa, 0xd7, 0x19, 0x28, - 0x50, 0x7a, 0x6c, 0xcd, 0x3e, 0x03, 0x25, 0x1b, 0x5b, 0xa6, 0xe2, 0xaa, 0x7d, 0xef, 0x7a, 0x37, - 0x21, 0xec, 0xa9, 0x7d, 0x8a, 0xe6, 0xd2, 0x87, 0x9a, 0xde, 0xc7, 0x8e, 0x2b, 0xee, 0x78, 0x97, - 0x09, 0x6d, 0x9b, 0x91, 0x88, 0x93, 0xe8, 0x21, 0x4c, 0x9e, 0x9e, 0xb5, 0xd0, 0xdf, 0x68, 0x83, - 0x5d, 0x2a, 0x9c, 0x06, 0x7b, 0xa7, 0x57, 0x0e, 0x1b, 0x50, 0x8c, 0xc0, 0xe5, 0x5e, 0x5b, 0xda, - 0x01, 0x14, 0xf4, 0x02, 0xf7, 0xf7, 0x0d, 0x98, 0xa7, 0x4e, 0x12, 0xd5, 0xd1, 0x6a, 0x8a, 0x1b, - 0x64, 0xce, 0x26, 0xa9, 0x80, 0x98, 0x83, 0x43, 0x15, 0xd1, 0xec, 0xa3, 0x32, 0xa6, 0x42, 0xfa, - 0xdb, 0x0c, 0x9c, 0x08, 0xf5, 0xc1, 0x6d, 0xbd, 0x1e, 0xee, 0x24, 0xd5, 0x54, 0xde, 0xc1, 0x56, - 0x68, 0x49, 0xb8, 0x91, 0x66, 0xd2, 0xaf, 0x69, 0x39, 0xf8, 0xfb, 0x0c, 0x40, 0x73, 0xe4, 0x1e, - 0x71, 0x64, 0x30, 0x38, 0x32, 0x99, 0xf0, 0xc8, 0x90, 0x67, 0x96, 0xea, 0x38, 0x2f, 0x4d, 0x5b, - 0xec, 0x69, 0xbc, 0x36, 0xc5, 0xf0, 0x46, 0xee, 0x91, 0x38, 0x33, 0x23, 0xbf, 0xd1, 0x45, 0xa8, - 0xb2, 0x4f, 0x0a, 0x14, 0x55, 0xd3, 0x6c, 0xec, 0x38, 0xfc, 0xf0, 0xac, 0xc2, 0xa8, 0x4d, 0x46, - 0x24, 0x6c, 0x3a, 0x45, 0xb5, 0xdd, 0x63, 0xc5, 0x35, 0x9f, 0x63, 0x83, 0xef, 0x4d, 0x2a, 0x82, - 0xba, 0x47, 0x88, 0xec, 0x14, 0xa1, 0xaf, 0x3b, 0xae, 0x2d, 0xd8, 0xc4, 0x41, 0x0b, 0xa7, 0x52, - 0x36, 0x32, 0x28, 0xb5, 0xce, 0x68, 0x30, 0x60, 0x2e, 0x7e, 0xfd, 0x61, 0x7f, 0x8f, 0xbf, 0x50, - 0x36, 0x2d, 0xa6, 0x7d, 0xa7, 0xf1, 0xd7, 0x7d, 0x83, 0x20, 0xcc, 0x7b, 0xb0, 0x1c, 0x78, 0x07, - 0x1e, 0x56, 0xa1, 0x22, 0x32, 0x13, 0x2e, 0x22, 0xa5, 0xc7, 0x80, 0x18, 0xee, 0xf0, 0x2d, 0xdf, - 0x5b, 0x3a, 0x09, 0x27, 0x42, 0x8a, 0xf8, 0x4a, 0x7c, 0x0d, 0x2a, 0xfc, 0x82, 0x16, 0x0f, 0x94, - 0xd3, 0x50, 0x24, 0x19, 0xb5, 0xa7, 0x6b, 0xe2, 0x40, 0x75, 0xc1, 0x32, 0xb5, 0x2d, 0x5d, 0xb3, - 0xa5, 0x4f, 0xa1, 0x22, 0xb3, 0x7e, 0x38, 0xef, 0x23, 0xa8, 0xf2, 0xeb, 0x5c, 0x4a, 0xe8, 0xa2, - 0x66, 0xd2, 0x57, 0x02, 0xc1, 0x4e, 0xe4, 0x8a, 0x11, 0x6c, 0x4a, 0x1a, 0x34, 0x58, 0xc9, 0x10, - 0x52, 0x2f, 0x5e, 0xf6, 0x11, 0x88, 0xfb, 0x0b, 0x13, 0x7b, 0x09, 0xcb, 0x57, 0xec, 0x60, 0x53, - 0x3a, 0x0b, 0x67, 0x12, 0x7b, 0xe1, 0x9e, 0xb0, 0xa0, 0xe6, 0x3f, 0x60, 0xb7, 0x09, 0xbd, 0x13, - 0xe3, 0x4c, 0xe0, 0xc4, 0xf8, 0x94, 0x57, 0x24, 0x66, 0xc5, 0x22, 0x46, 0x2b, 0x40, 0xbf, 0xdc, - 0xcf, 0xa5, 0x95, 0xfb, 0xf9, 0x50, 0xb9, 0x2f, 0x75, 0x3d, 0x7f, 0xf2, 0x6d, 0xd8, 0x43, 0xba, - 0x5d, 0x64, 0x7d, 0x8b, 0x84, 0x28, 0x8d, 0x7b, 0x4b, 0xc6, 0x2a, 0x07, 0xa4, 0xa4, 0xab, 0x50, - 0x09, 0xa7, 0xc6, 0x40, 0x9e, 0xcb, 0xc4, 0xf2, 0x5c, 0x35, 0x92, 0xe2, 0x3e, 0x8c, 0x54, 0xc0, - 0xe9, 0x3e, 0x8e, 0xd4, 0xbf, 0xf7, 0x42, 0xc9, 0xee, 0x5a, 0xc2, 0x61, 0xef, 0xaf, 0x29, 0xcf, - 0xad, 0xf0, 0xf5, 0xe0, 0x91, 0x43, 0xe4, 0xf9, 0x4b, 0x4b, 0x17, 0xa0, 0xbc, 0x9f, 0xf6, 0x95, - 0x49, 0x5e, 0x5c, 0xf3, 0xb8, 0x05, 0x2b, 0x8f, 0xf4, 0x01, 0x76, 0x8e, 0x1d, 0x17, 0x0f, 0x5b, - 0x34, 0x29, 0x1d, 0xea, 0xd8, 0x46, 0x6b, 0x00, 0x74, 0x0b, 0x63, 0x99, 0xba, 0xf7, 0xf1, 0x41, - 0x80, 0x22, 0xfd, 0x57, 0x06, 0x96, 0x7c, 0xc1, 0x7d, 0xba, 0x75, 0x7b, 0x0b, 0x4a, 0xe4, 0x7d, - 0x1d, 0x57, 0x1d, 0x5a, 0xe2, 0x3c, 0xcb, 0x23, 0xa0, 0xbb, 0x50, 0x38, 0x74, 0x04, 0x64, 0x94, - 0x08, 0xa0, 0x27, 0x19, 0x22, 0xe7, 0x0f, 0x9d, 0x96, 0x86, 0x3e, 0x02, 0x18, 0x39, 0x58, 0xe3, - 0x67, 0x58, 0xb9, 0xb4, 0x6a, 0x61, 0x3f, 0x78, 0x10, 0x4e, 0x04, 0xd8, 0x0d, 0x91, 0x7b, 0x50, - 0xd6, 0x0d, 0x53, 0xc3, 0xf4, 0x70, 0x52, 0xe3, 0xa8, 0xd2, 0x04, 0x71, 0x60, 0x12, 0xfb, 0x0e, - 0xd6, 0x24, 0xcc, 0xd7, 0x42, 0xe1, 0x5f, 0x1e, 0x28, 0x6d, 0x58, 0x66, 0x49, 0xeb, 0xd0, 0x33, - 0x5c, 0x44, 0xec, 0xfa, 0xb8, 0xb7, 0xa3, 0xde, 0x92, 0x6b, 0x3a, 0x2f, 0x6d, 0x84, 0xa8, 0x74, - 0x07, 0x4e, 0x86, 0x76, 0x48, 0x33, 0x6c, 0x59, 0xa4, 0x4e, 0x04, 0x28, 0xf1, 0xc3, 0x99, 0xc3, - 0x10, 0x22, 0x9a, 0x27, 0xc1, 0x10, 0x0e, 0x83, 0x21, 0x1c, 0xe9, 0x0b, 0x38, 0x1d, 0x42, 0x74, - 0x42, 0x16, 0xdd, 0x8b, 0x54, 0x6e, 0x97, 0x26, 0x69, 0x8d, 0x94, 0x70, 0xff, 0x9b, 0x81, 0x95, - 0x24, 0x86, 0xd7, 0x44, 0x1c, 0x7f, 0x98, 0x72, 0x6d, 0xf0, 0xf6, 0x74, 0x66, 0xfd, 0x46, 0xd0, - 0xda, 0x3d, 0x68, 0x24, 0xf9, 0x33, 0x3e, 0x4a, 0xb9, 0x59, 0x46, 0xe9, 0x67, 0xb9, 0x00, 0xf2, - 0xde, 0x74, 0x5d, 0x5b, 0x3f, 0x18, 0x91, 0x90, 0x7f, 0xe3, 0x68, 0x56, 0xcb, 0xc3, 0x65, 0x98, - 0x6b, 0x6f, 0x8e, 0x11, 0xf7, 0xed, 0x48, 0xc4, 0x66, 0x3e, 0x0b, 0x63, 0x33, 0x0c, 0x53, 0xbf, - 0x35, 0x9d, 0xbe, 0xdf, 0x5a, 0x00, 0xf4, 0x67, 0x59, 0xa8, 0x86, 0x87, 0x08, 0xed, 0x00, 0xa8, - 0x9e, 0xe5, 0x7c, 0xa2, 0x5c, 0x9c, 0xea, 0x35, 0xe5, 0x80, 0x20, 0x7a, 0x17, 0x72, 0x3d, 0x6b, - 0xc4, 0x47, 0x2d, 0xe1, 0x30, 0x78, 0xcb, 0x1a, 0xb1, 0x8c, 0x42, 0xd8, 0xc8, 0x9e, 0x8a, 0x9d, - 0xed, 0xa7, 0x67, 0xc9, 0x67, 0xf4, 0x39, 0x93, 0xe1, 0xcc, 0xe8, 0x09, 0x54, 0x5f, 0xda, 0xba, - 0xab, 0x1e, 0x0c, 0xb0, 0x32, 0x50, 0x8f, 0xb1, 0xcd, 0xb3, 0xe4, 0x14, 0x89, 0xac, 0x22, 0x04, - 0x9f, 0x12, 0x39, 0xe9, 0x8f, 0xa0, 0x28, 0x2c, 0x9a, 0xb0, 0x22, 0xec, 0xc1, 0xea, 0x88, 0xb0, - 0x29, 0xf4, 0xe6, 0x9e, 0xa1, 0x1a, 0xa6, 0xe2, 0x60, 0xb2, 0x8c, 0x8b, 0xaf, 0x14, 0x26, 0xa4, - 0xe8, 0x15, 0x2a, 0xbd, 0x65, 0xda, 0xb8, 0xad, 0x1a, 0x66, 0x97, 0x89, 0x4a, 0x2f, 0xa0, 0x1c, - 0x78, 0xc1, 0x09, 0x26, 0xb4, 0x60, 0x59, 0x1c, 0xc5, 0x3b, 0xd8, 0xe5, 0xcb, 0xcb, 0x54, 0x9d, - 0x2f, 0x71, 0xb9, 0x2e, 0x76, 0xd9, 0xf5, 0x89, 0x7b, 0x70, 0x5a, 0xc6, 0xa6, 0x85, 0x0d, 0x6f, - 0x3c, 0x9f, 0x9a, 0xfd, 0x19, 0x32, 0xf8, 0x5b, 0xd0, 0x48, 0x92, 0x67, 0xf9, 0xe1, 0xda, 0x25, - 0x28, 0x8a, 0xef, 0x89, 0xd1, 0x02, 0xe4, 0xf6, 0xb6, 0x3a, 0xb5, 0x39, 0xf2, 0x63, 0x7f, 0xbb, - 0x53, 0xcb, 0xa0, 0x22, 0xe4, 0xbb, 0x5b, 0x7b, 0x9d, 0x5a, 0xf6, 0xda, 0x10, 0x6a, 0xd1, 0x8f, - 0x69, 0xd1, 0x2a, 0x9c, 0xe8, 0xc8, 0xbb, 0x9d, 0xe6, 0xe3, 0xe6, 0x5e, 0x6b, 0xb7, 0xad, 0x74, - 0xe4, 0xd6, 0x27, 0xcd, 0xbd, 0x9d, 0xda, 0x1c, 0x5a, 0x87, 0xb3, 0xc1, 0x07, 0x4f, 0x76, 0xbb, - 0x7b, 0xca, 0xde, 0xae, 0xb2, 0xb5, 0xdb, 0xde, 0x6b, 0xb6, 0xda, 0x3b, 0x72, 0x2d, 0x83, 0xce, - 0xc2, 0xe9, 0x20, 0xcb, 0xc3, 0xd6, 0x76, 0x4b, 0xde, 0xd9, 0x22, 0xbf, 0x9b, 0x4f, 0x6b, 0xd9, - 0x6b, 0x1f, 0x43, 0x25, 0xf4, 0xed, 0x2b, 0x31, 0xa9, 0xb3, 0xbb, 0x5d, 0x9b, 0x43, 0x15, 0x28, - 0x05, 0xf5, 0x14, 0x21, 0xdf, 0xde, 0xdd, 0xde, 0xa9, 0x65, 0x11, 0xc0, 0xfc, 0x5e, 0x53, 0x7e, - 0xbc, 0xb3, 0x57, 0xcb, 0x5d, 0xbb, 0x03, 0x4b, 0x91, 0x9b, 0xc7, 0x68, 0x19, 0x2a, 0xdd, 0x66, - 0x7b, 0xfb, 0xe1, 0xee, 0x67, 0x8a, 0xbc, 0xd3, 0xdc, 0xfe, 0xbc, 0x36, 0x87, 0x56, 0xa0, 0x26, - 0x48, 0xed, 0xdd, 0x3d, 0x46, 0xcd, 0x5c, 0x7b, 0x1e, 0x99, 0x6f, 0x18, 0x9d, 0x84, 0x65, 0xaf, - 0x4b, 0x65, 0x4b, 0xde, 0x69, 0xee, 0xed, 0x10, 0x4b, 0x42, 0x64, 0x79, 0xbf, 0xdd, 0x6e, 0xb5, - 0x1f, 0xd7, 0x32, 0x44, 0xab, 0x4f, 0xde, 0xf9, 0xac, 0x45, 0x98, 0xb3, 0x61, 0xe6, 0xfd, 0xf6, - 0xf7, 0xdb, 0xbb, 0x9f, 0xb6, 0x6b, 0xb9, 0xcd, 0x5f, 0x2c, 0x43, 0x55, 0x14, 0x7d, 0xd8, 0xa6, - 0x37, 0x5c, 0x3a, 0xb0, 0x20, 0xbe, 0x55, 0x4f, 0xc8, 0xd6, 0xe1, 0x2f, 0xec, 0x1b, 0xeb, 0x63, - 0x38, 0x78, 0xed, 0x3d, 0x87, 0x0e, 0x68, 0x2d, 0x1c, 0xb8, 0x09, 0x7e, 0x29, 0xb1, 0xf2, 0x8c, - 0x5d, 0x3e, 0x6f, 0x5c, 0x9e, 0xc8, 0xe7, 0xf5, 0x81, 0x49, 0xb9, 0x1b, 0xfc, 0xd8, 0x0a, 0x5d, - 0x4e, 0xaa, 0x53, 0x13, 0xbe, 0xe6, 0x6a, 0x5c, 0x99, 0xcc, 0xe8, 0x75, 0xf3, 0x1c, 0x6a, 0xd1, - 0x0f, 0xaf, 0x50, 0x02, 0x8c, 0x9a, 0xf2, 0x75, 0x57, 0xe3, 0xda, 0x34, 0xac, 0xc1, 0xce, 0x62, - 0x5f, 0x12, 0x5d, 0x9d, 0xe6, 0x8b, 0x8b, 0xd4, 0xce, 0xd2, 0x3e, 0xce, 0x60, 0x0e, 0x0c, 0x5f, - 0xde, 0x46, 0x89, 0x9f, 0xed, 0x24, 0x7c, 0x23, 0x90, 0xe4, 0xc0, 0xe4, 0x7b, 0xe0, 0xd2, 0x1c, - 0x3a, 0x82, 0xa5, 0xc8, 0x55, 0x05, 0x94, 0x20, 0x9e, 0x7c, 0x27, 0xa3, 0x71, 0x75, 0x0a, 0xce, - 0x70, 0x44, 0x04, 0xaf, 0x26, 0x24, 0x47, 0x44, 0xc2, 0xc5, 0x87, 0xe4, 0x88, 0x48, 0xbc, 0xe5, - 0x40, 0x83, 0x3b, 0x74, 0x25, 0x21, 0x29, 0xb8, 0x93, 0x2e, 0x42, 0x34, 0x2e, 0x4f, 0xe4, 0x0b, - 0x3a, 0x2d, 0x72, 0x41, 0x21, 0xc9, 0x69, 0xc9, 0x17, 0x20, 0x1a, 0x57, 0xa7, 0xe0, 0x8c, 0x46, - 0x81, 0x7f, 0xdc, 0x99, 0x16, 0x05, 0xb1, 0xc3, 0xf9, 0xb4, 0x28, 0x88, 0x9f, 0x9c, 0xf2, 0x28, - 0x88, 0x1c, 0x53, 0x5e, 0x99, 0xe2, 0x58, 0x25, 0x3d, 0x0a, 0x92, 0x0f, 0x60, 0xa4, 0x39, 0xf4, - 0xd3, 0x0c, 0xd4, 0xd3, 0x8e, 0x2c, 0x50, 0x42, 0xad, 0x37, 0xe1, 0x94, 0xa5, 0xb1, 0x39, 0x8b, - 0x88, 0x67, 0xc5, 0x57, 0x80, 0xe2, 0x6b, 0x20, 0x7a, 0x27, 0x69, 0x64, 0x52, 0x56, 0xda, 0xc6, - 0xbb, 0xd3, 0x31, 0x7b, 0x5d, 0x76, 0xa1, 0x28, 0x0e, 0x49, 0x50, 0x42, 0x96, 0x8e, 0x1c, 0xd1, - 0x34, 0xa4, 0x71, 0x2c, 0x9e, 0xd2, 0xc7, 0x90, 0x27, 0x54, 0x74, 0x36, 0x99, 0x5b, 0x28, 0x5b, - 0x4b, 0x7b, 0xec, 0x29, 0x7a, 0x06, 0xf3, 0xec, 0x54, 0x00, 0x25, 0xa0, 0x10, 0xa1, 0xb3, 0x8b, - 0xc6, 0xf9, 0x74, 0x06, 0x4f, 0xdd, 0x97, 0xec, 0xdf, 0x98, 0x70, 0xc0, 0x1f, 0xbd, 0x9d, 0xfc, - 0xe9, 0x77, 0xf8, 0x7c, 0xa1, 0x71, 0x71, 0x02, 0x57, 0x70, 0x52, 0x44, 0x2a, 0xe0, 0xcb, 0x13, - 0xb7, 0x31, 0xe9, 0x93, 0x22, 0x79, 0xa3, 0xc4, 0x82, 0x24, 0xbe, 0x91, 0x4a, 0x0a, 0x92, 0xd4, - 0xed, 0x6b, 0x52, 0x90, 0xa4, 0xef, 0xcd, 0xa4, 0x39, 0xe4, 0xc2, 0x89, 0x04, 0xd8, 0x0c, 0xbd, - 0x9b, 0x16, 0xe4, 0x49, 0x18, 0x5e, 0xe3, 0xfa, 0x94, 0xdc, 0xc1, 0xc1, 0xe7, 0x93, 0xfe, 0x5c, - 0x3a, 0x96, 0x94, 0x3a, 0xf8, 0xd1, 0x29, 0xbe, 0xf9, 0xaf, 0x39, 0x58, 0x64, 0x90, 0x28, 0xaf, - 0x60, 0x3e, 0x07, 0xf0, 0x4f, 0x23, 0xd0, 0x85, 0x64, 0x9f, 0x84, 0x4e, 0x6c, 0x1a, 0x6f, 0x8f, - 0x67, 0x0a, 0x06, 0x5a, 0x00, 0xd9, 0x4f, 0x0a, 0xb4, 0xf8, 0x01, 0x46, 0x52, 0xa0, 0x25, 0x1c, - 0x0f, 0x48, 0x73, 0xe8, 0x13, 0x28, 0x79, 0x10, 0x32, 0x4a, 0x82, 0xa0, 0x23, 0x18, 0x79, 0xe3, - 0xc2, 0x58, 0x9e, 0xa0, 0xd5, 0x01, 0x7c, 0x38, 0xc9, 0xea, 0x38, 0x0e, 0x9d, 0x64, 0x75, 0x12, - 0xc8, 0xec, 0xfb, 0x84, 0xa1, 0x48, 0xa9, 0x3e, 0x09, 0x81, 0x78, 0xa9, 0x3e, 0x09, 0x43, 0x51, - 0xd2, 0xdc, 0xc3, 0x4b, 0xbf, 0xfc, 0x7a, 0x2d, 0xf3, 0xcf, 0x5f, 0xaf, 0xcd, 0xfd, 0xe4, 0x9b, - 0xb5, 0xcc, 0x2f, 0xbf, 0x59, 0xcb, 0xfc, 0xe3, 0x37, 0x6b, 0x99, 0x7f, 0xfb, 0x66, 0x2d, 0xf3, - 0xa7, 0xff, 0xbe, 0x36, 0xf7, 0x83, 0xa2, 0x90, 0x3e, 0x98, 0xa7, 0xff, 0x8c, 0xe8, 0xfd, 0xff, - 0x0f, 0x00, 0x00, 0xff, 0xff, 0x02, 0xff, 0x47, 0x1a, 0x52, 0x4a, 0x00, 0x00, + 0x76, 0xe7, 0xe0, 0x83, 0x04, 0x1e, 0x08, 0x10, 0x6c, 0x51, 0x22, 0x04, 0x59, 0xb2, 0x34, 0xb6, + 0x3e, 0x6d, 0x53, 0x16, 0xed, 0x95, 0x23, 0xc9, 0x96, 0x0d, 0x91, 0x94, 0x84, 0xac, 0x04, 0x22, + 0x03, 0xd2, 0x1f, 0x6b, 0x57, 0xcd, 0x0e, 0x31, 0x4d, 0x70, 0x56, 0xc0, 0xcc, 0x78, 0x66, 0x20, + 0x89, 0x9b, 0xaa, 0xd4, 0x56, 0x6d, 0x65, 0x0f, 0x39, 0xe5, 0x9c, 0xe3, 0xe6, 0x90, 0x43, 0x4e, + 0x39, 0xe4, 0x94, 0xd3, 0xa6, 0x72, 0xd8, 0x4b, 0x2a, 0x39, 0x6d, 0x92, 0xca, 0x25, 0x76, 0x92, + 0xaa, 0x54, 0xaa, 0x92, 0xca, 0x1f, 0x90, 0x43, 0xaa, 0xbf, 0xe6, 0x7b, 0xf0, 0x21, 0x69, 0xd7, + 0x9b, 0x13, 0xd1, 0x6f, 0xde, 0x7b, 0xfd, 0xe6, 0xf5, 0xeb, 0xd7, 0xaf, 0x7f, 0xdd, 0x43, 0x28, + 0x6b, 0xb6, 0xb1, 0x61, 0x3b, 0x96, 0x67, 0xa1, 0xba, 0x33, 0x36, 0x3d, 0x63, 0x84, 0x37, 0x9e, + 0xde, 0xd0, 0x86, 0xf6, 0x91, 0xb6, 0xd9, 0x7c, 0x67, 0x60, 0x78, 0x47, 0xe3, 0x83, 0x8d, 0xbe, + 0x35, 0xba, 0x3e, 0xb0, 0x06, 0xd6, 0x75, 0xca, 0x78, 0x30, 0x3e, 0xa4, 0x2d, 0xda, 0xa0, 0xbf, + 0x98, 0x02, 0xf9, 0x1a, 0xd4, 0x3e, 0xc5, 0x8e, 0x6b, 0x58, 0xa6, 0x82, 0xbf, 0x1e, 0x63, 0xd7, + 0x43, 0x0d, 0x58, 0x7a, 0xca, 0x28, 0x0d, 0xe9, 0xbc, 0x74, 0xa5, 0xac, 0x88, 0xa6, 0xfc, 0x67, + 0x12, 0xac, 0xf8, 0xcc, 0xae, 0x6d, 0x99, 0x2e, 0xce, 0xe6, 0x46, 0x17, 0x60, 0x99, 0x1b, 0xa7, + 0x9a, 0xda, 0x08, 0x37, 0x72, 0xf4, 0x71, 0x85, 0xd3, 0x3a, 0xda, 0x08, 0xa3, 0xcb, 0xb0, 0x22, + 0x58, 0x84, 0x92, 0x3c, 0xe5, 0xaa, 0x71, 0x32, 0xef, 0x0d, 0x6d, 0xc0, 0x09, 0xc1, 0xa8, 0xd9, + 0x86, 0xcf, 0x5c, 0xa0, 0xcc, 0xab, 0xfc, 0x51, 0xcb, 0x36, 0x38, 0xbf, 0xfc, 0x25, 0x94, 0xb7, + 0x3b, 0xbd, 0x2d, 0xcb, 0x3c, 0x34, 0x06, 0xc4, 0x44, 0x17, 0x3b, 0x44, 0xa6, 0x21, 0x9d, 0xcf, + 0x13, 0x13, 0x79, 0x13, 0x35, 0xa1, 0xe4, 0x62, 0xcd, 0xe9, 0x1f, 0x61, 0xb7, 0x91, 0xa3, 0x8f, + 0xfc, 0x36, 0x91, 0xb2, 0x6c, 0xcf, 0xb0, 0x4c, 0xb7, 0x91, 0x67, 0x52, 0xbc, 0x29, 0xff, 0x5c, + 0x82, 0x4a, 0xd7, 0x72, 0xbc, 0xc7, 0x9a, 0x6d, 0x1b, 0xe6, 0x00, 0xdd, 0x84, 0x12, 0xf5, 0x65, + 0xdf, 0x1a, 0x52, 0x1f, 0xd4, 0x36, 0x9b, 0x1b, 0xf1, 0x61, 0xd9, 0xe8, 0x72, 0x0e, 0xc5, 0xe7, + 0x45, 0x17, 0xa1, 0xd6, 0xb7, 0x4c, 0x4f, 0x33, 0x4c, 0xec, 0xa8, 0xb6, 0xe5, 0x78, 0xd4, 0x45, + 0x45, 0xa5, 0xea, 0x53, 0x49, 0x2f, 0xe8, 0x0c, 0x94, 0x8f, 0x2c, 0xd7, 0x63, 0x1c, 0x79, 0xca, + 0x51, 0x22, 0x04, 0xfa, 0x70, 0x1d, 0x96, 0xe8, 0x43, 0xc3, 0xe6, 0xce, 0x58, 0x24, 0xcd, 0xb6, + 0x2d, 0xff, 0x4a, 0x82, 0xe2, 0x63, 0x6b, 0x6c, 0x7a, 0xb1, 0x6e, 0x34, 0xef, 0x88, 0x0f, 0x54, + 0xa8, 0x1b, 0xcd, 0x3b, 0x0a, 0xba, 0x21, 0x1c, 0x6c, 0xac, 0x58, 0x37, 0xe4, 0x61, 0x13, 0x4a, + 0x0e, 0xd6, 0x74, 0xcb, 0x1c, 0x1e, 0x53, 0x13, 0x4a, 0x8a, 0xdf, 0x26, 0x83, 0xe8, 0xe2, 0xa1, + 0x61, 0x8e, 0x9f, 0xab, 0x0e, 0x1e, 0x6a, 0x07, 0x78, 0x48, 0x4d, 0x29, 0x29, 0x35, 0x4e, 0x56, + 0x18, 0x15, 0x6d, 0x43, 0xc5, 0x76, 0x2c, 0x5b, 0x1b, 0x68, 0xc4, 0x8f, 0x8d, 0x22, 0x75, 0x95, + 0x9c, 0x74, 0x15, 0x35, 0xbb, 0x1b, 0x70, 0x2a, 0x61, 0x31, 0xf9, 0xef, 0x24, 0x58, 0x21, 0xc1, + 0xe3, 0xda, 0x5a, 0x1f, 0xef, 0xd2, 0x21, 0x41, 0xb7, 0x60, 0xc9, 0xc4, 0xde, 0x33, 0xcb, 0x79, + 0xc2, 0x07, 0xe0, 0xf5, 0xa4, 0x56, 0x5f, 0xe6, 0xb1, 0xa5, 0x63, 0x45, 0xf0, 0xa3, 0x1b, 0x90, + 0xb7, 0x0d, 0x9d, 0xbe, 0xf0, 0x0c, 0x62, 0x84, 0x97, 0x88, 0x18, 0x76, 0x9f, 0xfa, 0x61, 0x16, + 0x11, 0xc3, 0xee, 0x13, 0xe7, 0x7a, 0x9a, 0x33, 0xc0, 0x9e, 0x6a, 0xe8, 0x7c, 0xa0, 0x4a, 0x8c, + 0xd0, 0xd6, 0x65, 0x19, 0xa0, 0x6d, 0x7a, 0x37, 0xdf, 0xff, 0x54, 0x1b, 0x8e, 0x31, 0x5a, 0x83, + 0xe2, 0x53, 0xf2, 0x83, 0xbe, 0x49, 0x5e, 0x61, 0x0d, 0xf9, 0x9b, 0x3c, 0x9c, 0x79, 0x44, 0x9c, + 0xd9, 0xd3, 0x4c, 0xfd, 0xc0, 0x7a, 0xde, 0xc3, 0xfd, 0xb1, 0x63, 0x78, 0xc7, 0x5b, 0x96, 0xe9, + 0xe1, 0xe7, 0x1e, 0xea, 0xc0, 0xaa, 0x29, 0xba, 0x55, 0x45, 0xdc, 0x12, 0x0d, 0x95, 0xcd, 0x0b, + 0x13, 0x2c, 0x64, 0xfe, 0x53, 0xea, 0x66, 0x94, 0xe0, 0xa2, 0x87, 0xc1, 0xa0, 0x0a, 0x6d, 0x39, + 0xaa, 0x2d, 0xe5, 0x7d, 0x7b, 0x3b, 0xd4, 0x32, 0xae, 0x4b, 0x8c, 0xba, 0xd0, 0xf4, 0x21, 0x90, + 0x29, 0xaf, 0x6a, 0xae, 0x3a, 0x76, 0xb1, 0x43, 0xbd, 0x56, 0xd9, 0x7c, 0x2d, 0xa9, 0x25, 0x70, + 0x81, 0x52, 0x76, 0xc6, 0x66, 0xcb, 0xdd, 0x77, 0xb1, 0x83, 0xee, 0xd2, 0x24, 0x42, 0xa4, 0x07, + 0x8e, 0x35, 0xb6, 0x1b, 0xa5, 0x19, 0xc4, 0x81, 0x8a, 0x3f, 0x20, 0xfc, 0x34, 0xc3, 0xf0, 0x40, + 0x55, 0x1d, 0xcb, 0xf2, 0x0e, 0x5d, 0x11, 0x9c, 0x82, 0xac, 0x50, 0x2a, 0xba, 0x0e, 0x27, 0xdc, + 0xb1, 0x6d, 0x0f, 0xf1, 0x08, 0x9b, 0x9e, 0x36, 0x64, 0xdd, 0xb9, 0x8d, 0xe2, 0xf9, 0xfc, 0x95, + 0xbc, 0x82, 0xc2, 0x8f, 0xa8, 0x62, 0x17, 0x9d, 0x03, 0xb0, 0x1d, 0xe3, 0xa9, 0x31, 0xc4, 0x03, + 0xac, 0x37, 0x16, 0xa9, 0xd2, 0x10, 0x05, 0xbd, 0x0b, 0x6b, 0x2e, 0xee, 0xf7, 0xad, 0x91, 0xad, + 0xda, 0x8e, 0x75, 0x68, 0x0c, 0x31, 0x9b, 0x5a, 0x4b, 0x74, 0xf4, 0x11, 0x7f, 0xd6, 0x65, 0x8f, + 0xc8, 0x24, 0x93, 0x7f, 0x9e, 0x83, 0x93, 0xd4, 0x93, 0x5d, 0x4b, 0xe7, 0xc3, 0xcc, 0x33, 0xd8, + 0x1b, 0x50, 0xed, 0x53, 0x83, 0x54, 0x5b, 0x73, 0xb0, 0xe9, 0xf1, 0x19, 0xbc, 0xcc, 0x88, 0x5d, + 0x4a, 0x43, 0x9f, 0x43, 0xdd, 0xe5, 0x51, 0xa1, 0xf6, 0x59, 0x58, 0xf0, 0x31, 0x7b, 0x27, 0xe9, + 0xae, 0x09, 0xb1, 0xa4, 0xac, 0xb8, 0x89, 0xe0, 0x5a, 0x72, 0x8f, 0xdd, 0xbe, 0x37, 0x64, 0xa9, + 0xb0, 0xb2, 0xf9, 0x7e, 0x86, 0xc2, 0xb8, 0xe1, 0x1b, 0x3d, 0x26, 0xb6, 0x63, 0x7a, 0xce, 0xb1, + 0x22, 0x94, 0x34, 0x6f, 0xc3, 0x72, 0xf8, 0x01, 0xaa, 0x43, 0xfe, 0x09, 0x3e, 0xe6, 0x2f, 0x45, + 0x7e, 0x06, 0x93, 0x80, 0x25, 0x22, 0xd6, 0xb8, 0x9d, 0xfb, 0x1d, 0x49, 0x76, 0x00, 0x05, 0xbd, + 0x3c, 0xc6, 0x9e, 0xa6, 0x6b, 0x9e, 0x86, 0x10, 0x14, 0xe8, 0x1a, 0xc3, 0x54, 0xd0, 0xdf, 0x44, + 0xeb, 0x98, 0xcf, 0xec, 0xb2, 0x42, 0x7e, 0xa2, 0xd7, 0xa0, 0xec, 0x07, 0x3a, 0x5f, 0x68, 0x02, + 0x02, 0x49, 0xf8, 0x9a, 0xe7, 0xe1, 0x91, 0xed, 0xd1, 0x10, 0xa9, 0x2a, 0xa2, 0x29, 0xff, 0x77, + 0x01, 0xea, 0x89, 0x31, 0xf9, 0x04, 0x4a, 0x23, 0xde, 0x3d, 0x9f, 0x68, 0x6f, 0xa6, 0x64, 0xfd, + 0x84, 0xa9, 0x8a, 0x2f, 0x45, 0x92, 0x2a, 0x49, 0xb0, 0xa1, 0xc5, 0xd1, 0x6f, 0x93, 0x11, 0x1f, + 0x5a, 0x03, 0x55, 0x37, 0x1c, 0xdc, 0xf7, 0x2c, 0xe7, 0x98, 0x9b, 0xbb, 0x3c, 0xb4, 0x06, 0xdb, + 0x82, 0x86, 0x6e, 0x03, 0xe8, 0xa6, 0x4b, 0x06, 0xfb, 0xd0, 0x18, 0x50, 0xa3, 0x2b, 0x9b, 0x67, + 0x92, 0x46, 0xf8, 0x2b, 0xa1, 0x52, 0xd6, 0x4d, 0x97, 0x9b, 0x7f, 0x0f, 0xaa, 0x64, 0x41, 0x51, + 0x47, 0x6c, 0x11, 0x63, 0x91, 0x5e, 0xd9, 0x3c, 0x9b, 0xf6, 0x0e, 0xfe, 0x52, 0xa7, 0x2c, 0xdb, + 0x41, 0xc3, 0x45, 0xf7, 0x61, 0x91, 0x66, 0x76, 0xb7, 0xb1, 0x48, 0x85, 0x37, 0x26, 0x39, 0x80, + 0x47, 0xc4, 0x23, 0x2a, 0xc0, 0x02, 0x82, 0x4b, 0xa3, 0x7d, 0xa8, 0x68, 0xa6, 0x69, 0x79, 0x1a, + 0x4b, 0x34, 0x4b, 0x54, 0xd9, 0x7b, 0x33, 0x28, 0x6b, 0x05, 0x52, 0x4c, 0x63, 0x58, 0x0f, 0xfa, + 0x08, 0x8a, 0x34, 0x13, 0xf1, 0xa4, 0x71, 0x79, 0xc6, 0xa0, 0x55, 0x98, 0x54, 0xf3, 0x16, 0x54, + 0x42, 0xc6, 0xce, 0x13, 0xa4, 0xcd, 0xbb, 0x50, 0x8f, 0x9b, 0x36, 0x57, 0x90, 0xff, 0x3e, 0xac, + 0x29, 0x63, 0x33, 0x30, 0x4c, 0x94, 0x66, 0xb7, 0x61, 0x91, 0x0f, 0x36, 0x8b, 0x38, 0x79, 0xba, + 0x8f, 0x14, 0x2e, 0x11, 0xae, 0xb5, 0x8e, 0x34, 0x53, 0x1f, 0x62, 0x87, 0xf7, 0x2b, 0x6a, 0xad, + 0x87, 0x8c, 0x2a, 0x7f, 0x04, 0x27, 0x63, 0x9d, 0xf3, 0x52, 0xef, 0x4d, 0xa8, 0xd9, 0x96, 0xae, + 0xba, 0x8c, 0x4c, 0x56, 0x32, 0x9e, 0x86, 0x6c, 0x9f, 0xb7, 0xad, 0x13, 0xf1, 0x9e, 0x67, 0xd9, + 0x49, 0xe3, 0x67, 0x13, 0x6f, 0xc0, 0xa9, 0xb8, 0x38, 0xeb, 0x5e, 0xfe, 0x18, 0xd6, 0x15, 0x3c, + 0xb2, 0x9e, 0xe2, 0x17, 0x55, 0xdd, 0x84, 0x46, 0x52, 0x01, 0x57, 0xfe, 0x05, 0xac, 0x07, 0xd4, + 0x9e, 0xa7, 0x79, 0x63, 0x77, 0x2e, 0xe5, 0xbc, 0x0e, 0x3e, 0xb0, 0x5c, 0x36, 0x9c, 0x25, 0x45, + 0x34, 0xe5, 0x75, 0x28, 0x76, 0x2d, 0xbd, 0xdd, 0x45, 0x35, 0xc8, 0x19, 0x36, 0x17, 0xce, 0x19, + 0xb6, 0x6c, 0x84, 0xfb, 0xec, 0xb0, 0x7a, 0x84, 0x75, 0x1d, 0x67, 0x45, 0x77, 0xa1, 0xa6, 0xe9, + 0xba, 0x41, 0xc2, 0x49, 0x1b, 0xaa, 0x86, 0xcd, 0xca, 0xd5, 0xca, 0xe6, 0x7a, 0x6a, 0x00, 0xb4, + 0xbb, 0x4a, 0x35, 0x60, 0x6f, 0xdb, 0xae, 0xfc, 0x10, 0xca, 0xfe, 0x9a, 0x8f, 0xee, 0x04, 0x95, + 0x6d, 0x6e, 0xd6, 0x0a, 0xc1, 0x2f, 0x7e, 0xf7, 0x12, 0x6b, 0x14, 0x37, 0xf9, 0x0e, 0x80, 0x9f, + 0x4b, 0x45, 0xe9, 0x71, 0x66, 0x82, 0x62, 0x25, 0xc4, 0x2e, 0xff, 0xb4, 0x18, 0xce, 0xb0, 0x21, + 0x27, 0xe8, 0xbe, 0x13, 0xf4, 0x48, 0xc6, 0xcd, 0xbd, 0x50, 0xc6, 0xfd, 0x00, 0x8a, 0xae, 0xa7, + 0x79, 0x98, 0xd7, 0x6e, 0x17, 0x26, 0x89, 0x13, 0x23, 0xb0, 0xc2, 0xf8, 0xd1, 0x59, 0x80, 0xbe, + 0x83, 0x35, 0x0f, 0xeb, 0xaa, 0xc6, 0x96, 0x87, 0xbc, 0x52, 0xe6, 0x94, 0x96, 0x87, 0xb6, 0x82, + 0xfa, 0xb3, 0x48, 0x0d, 0xbb, 0x3a, 0x49, 0x73, 0x64, 0xa8, 0x83, 0x4a, 0xd4, 0x4f, 0x57, 0x8b, + 0x33, 0xa6, 0x2b, 0xae, 0x80, 0x49, 0x85, 0x92, 0xf1, 0xd2, 0xf4, 0x64, 0xcc, 0x44, 0x67, 0x49, + 0xc6, 0xa5, 0xe9, 0xc9, 0x98, 0x2b, 0x9b, 0x9c, 0x8c, 0x53, 0xd2, 0x4f, 0x39, 0x2d, 0xfd, 0x7c, + 0x97, 0x69, 0xf7, 0x9f, 0x24, 0x68, 0x24, 0xb3, 0x00, 0xcf, 0x7e, 0xb7, 0x61, 0xd1, 0xa5, 0x94, + 0x59, 0x72, 0x2f, 0x97, 0xe5, 0x12, 0xe8, 0x21, 0x14, 0x0c, 0xf3, 0xd0, 0xe2, 0x93, 0xf6, 0xfd, + 0x19, 0x24, 0x79, 0xaf, 0x1b, 0x6d, 0xf3, 0xd0, 0x62, 0xde, 0xa4, 0x1a, 0x9a, 0x1f, 0x40, 0xd9, + 0x27, 0xcd, 0xf5, 0x6e, 0xbb, 0xb0, 0x16, 0x8b, 0x6d, 0xb6, 0xdd, 0xf0, 0xa7, 0x84, 0x34, 0xdf, + 0x94, 0x90, 0x7f, 0x92, 0x0b, 0x4f, 0xd9, 0xfb, 0xc6, 0xd0, 0xc3, 0x4e, 0x62, 0xca, 0x7e, 0x28, + 0xb4, 0xb3, 0xf9, 0x7a, 0x69, 0xaa, 0x76, 0x56, 0xc1, 0xf3, 0x59, 0xf7, 0x15, 0xd4, 0x68, 0x50, + 0xaa, 0x2e, 0x1e, 0xd2, 0x92, 0x87, 0x97, 0x9f, 0xdf, 0x9b, 0xa4, 0x86, 0x59, 0xc2, 0x42, 0xbb, + 0xc7, 0xe5, 0x98, 0x07, 0xab, 0xc3, 0x30, 0xad, 0xf9, 0x09, 0xa0, 0x24, 0xd3, 0x5c, 0x3e, 0xed, + 0x91, 0x5c, 0x48, 0x36, 0xe2, 0x29, 0xeb, 0xf4, 0x21, 0x35, 0x63, 0x96, 0x58, 0x61, 0x06, 0x2b, + 0x5c, 0x42, 0xfe, 0xaf, 0x3c, 0x40, 0xf0, 0xf0, 0xff, 0x51, 0x12, 0xfc, 0xc4, 0x4f, 0x40, 0xac, + 0x94, 0xbc, 0x32, 0x49, 0x71, 0x6a, 0xea, 0xd9, 0x8d, 0xa6, 0x1e, 0x56, 0x54, 0xbe, 0x33, 0x51, + 0xcd, 0xdc, 0x49, 0x67, 0xe9, 0xb7, 0x2d, 0xe9, 0x3c, 0x82, 0x53, 0xf1, 0x20, 0xe2, 0x19, 0x67, + 0x13, 0x8a, 0x86, 0x87, 0x47, 0x0c, 0xb5, 0x4a, 0xdd, 0xf4, 0x86, 0x84, 0x18, 0xab, 0xfc, 0x17, + 0x12, 0x94, 0xdb, 0x23, 0x6d, 0x80, 0x7b, 0x36, 0xee, 0x93, 0x5e, 0x0d, 0xd2, 0xe0, 0x96, 0xb0, + 0x06, 0xea, 0x44, 0xdd, 0xcc, 0x92, 0xd2, 0xdb, 0x29, 0x5b, 0x6a, 0xa1, 0x67, 0xb2, 0x97, 0x5f, + 0xda, 0x03, 0x9b, 0x50, 0xfa, 0x3e, 0x3e, 0x66, 0xe9, 0x68, 0x46, 0x39, 0xf9, 0x1f, 0x72, 0xb0, + 0x4e, 0x97, 0xc3, 0x2d, 0x01, 0x62, 0x29, 0xd8, 0xb5, 0xc6, 0x4e, 0x1f, 0xbb, 0x34, 0x4e, 0xed, + 0xb1, 0x6a, 0x63, 0xc7, 0xb0, 0x74, 0x0e, 0xa3, 0x94, 0xfb, 0xf6, 0xb8, 0x4b, 0x09, 0xe8, 0x0c, + 0x90, 0x86, 0xfa, 0xf5, 0xd8, 0xe2, 0x53, 0x28, 0xaf, 0x94, 0xfa, 0xf6, 0xf8, 0xf7, 0x48, 0x5b, + 0xc8, 0xba, 0x47, 0x9a, 0x83, 0x5d, 0x3a, 0x43, 0x98, 0x6c, 0x8f, 0x12, 0xd0, 0x0d, 0x38, 0x39, + 0xc2, 0x23, 0xcb, 0x39, 0x56, 0x87, 0xc6, 0xc8, 0xf0, 0x54, 0xc3, 0x54, 0x0f, 0x8e, 0x3d, 0xec, + 0xf2, 0xd9, 0x80, 0xd8, 0xc3, 0x47, 0xe4, 0x59, 0xdb, 0xbc, 0x47, 0x9e, 0x20, 0x19, 0xaa, 0x96, + 0x35, 0x52, 0xdd, 0xbe, 0xe5, 0x60, 0x55, 0xd3, 0x7f, 0x44, 0x2b, 0x84, 0xbc, 0x52, 0xb1, 0xac, + 0x51, 0x8f, 0xd0, 0x5a, 0xfa, 0x8f, 0xd0, 0xeb, 0x50, 0xe9, 0xdb, 0x63, 0x17, 0x7b, 0x2a, 0xf9, + 0x43, 0x0b, 0x80, 0xb2, 0x02, 0x8c, 0xb4, 0x65, 0x8f, 0xdd, 0x10, 0xc3, 0x88, 0x04, 0xc4, 0x52, + 0x98, 0xe1, 0x31, 0x1e, 0x51, 0xbc, 0xe6, 0x68, 0x3c, 0xc0, 0xb6, 0x36, 0xc0, 0xcc, 0x34, 0xb1, + 0x72, 0xa7, 0xe0, 0x35, 0x0f, 0x39, 0x23, 0x35, 0x53, 0xa9, 0x1d, 0x85, 0x9b, 0xae, 0x7c, 0x0f, + 0xaa, 0x11, 0x06, 0xe2, 0x2f, 0xaa, 0xd6, 0x35, 0x7e, 0x2c, 0x02, 0xa9, 0x44, 0x08, 0x3d, 0xe3, + 0xc7, 0x14, 0xad, 0xa2, 0xdd, 0x51, 0x47, 0x16, 0x14, 0xd6, 0x90, 0x35, 0xa8, 0x46, 0x40, 0x21, + 0xb2, 0x3f, 0xa7, 0xe8, 0x0f, 0xdf, 0x9f, 0x93, 0xdf, 0x84, 0xe6, 0x58, 0x43, 0x31, 0xae, 0xf4, + 0x37, 0xa1, 0x79, 0xc7, 0xb6, 0xd8, 0x9c, 0xd3, 0xdf, 0xb4, 0x0b, 0xfc, 0x94, 0xa3, 0x8a, 0x65, + 0x85, 0x35, 0x64, 0x1d, 0x60, 0x4b, 0xb3, 0xb5, 0x03, 0x63, 0x68, 0x78, 0xc7, 0xe8, 0x2a, 0xd4, + 0x35, 0x5d, 0x57, 0xfb, 0x82, 0x62, 0x60, 0x81, 0xf5, 0xae, 0x68, 0xba, 0xbe, 0x15, 0x22, 0xa3, + 0xb7, 0x60, 0x55, 0x77, 0x2c, 0x3b, 0xca, 0xcb, 0xc0, 0xdf, 0x3a, 0x79, 0x10, 0x66, 0x96, 0xff, + 0xad, 0x08, 0x67, 0xa3, 0x61, 0x16, 0x07, 0xde, 0x3e, 0x81, 0xe5, 0x58, 0xaf, 0x19, 0x00, 0x55, + 0x60, 0xad, 0x12, 0x91, 0x88, 0x01, 0x49, 0xb9, 0x04, 0x90, 0x94, 0x0a, 0xed, 0xe5, 0x5f, 0x29, + 0xb4, 0x57, 0x78, 0x25, 0xd0, 0x5e, 0xf1, 0xe5, 0xa0, 0xbd, 0xe5, 0x39, 0xa1, 0xbd, 0x4b, 0x34, + 0xb9, 0x8b, 0xde, 0x29, 0x8a, 0xc2, 0x26, 0x4e, 0xd5, 0xef, 0xc3, 0x14, 0x87, 0x0c, 0x31, 0x08, + 0x70, 0x69, 0x1e, 0x08, 0xb0, 0x94, 0x09, 0x01, 0x92, 0xa8, 0xb3, 0x6d, 0xcd, 0x19, 0x59, 0x8e, + 0xc0, 0xf8, 0x78, 0x51, 0xbb, 0x22, 0xe8, 0x1c, 0xdf, 0xcb, 0x44, 0x03, 0x21, 0x0b, 0x0d, 0x44, + 0xe7, 0x61, 0xd9, 0xb4, 0x54, 0x13, 0x3f, 0x53, 0x49, 0x2c, 0xb8, 0x8d, 0x0a, 0x0b, 0x0c, 0xd3, + 0xea, 0xe0, 0x67, 0x5d, 0x42, 0x41, 0x17, 0x60, 0x79, 0xa4, 0xb9, 0x4f, 0xb0, 0x4e, 0x55, 0xb9, + 0x8d, 0x2a, 0x0d, 0xe2, 0x0a, 0xa3, 0x11, 0x1d, 0x2e, 0xba, 0x08, 0xfe, 0x4b, 0x72, 0xa6, 0x1a, + 0x65, 0xaa, 0x0a, 0x2a, 0x65, 0x93, 0xff, 0x4a, 0x82, 0xb5, 0x68, 0x98, 0x73, 0x94, 0xe8, 0x01, + 0x94, 0x1d, 0x91, 0x57, 0x79, 0x68, 0x5f, 0xcd, 0xd8, 0x97, 0x24, 0x13, 0xb1, 0x12, 0xc8, 0xa2, + 0x1f, 0x64, 0x82, 0x93, 0xd7, 0xa7, 0xe9, 0x9b, 0x06, 0x4f, 0xca, 0x0e, 0xbc, 0xfe, 0x99, 0x61, + 0xea, 0xd6, 0x33, 0x37, 0x73, 0x96, 0xa6, 0xc4, 0x8a, 0x94, 0x11, 0x2b, 0x7d, 0x07, 0xeb, 0xd8, + 0xf4, 0x0c, 0x6d, 0xa8, 0xba, 0x36, 0xee, 0x0b, 0x90, 0x24, 0x20, 0x93, 0x15, 0x51, 0xfe, 0x85, + 0x04, 0xa7, 0xe2, 0x9d, 0x72, 0x9f, 0xb5, 0x93, 0x3e, 0x7b, 0x2b, 0xf9, 0x8e, 0x71, 0xe1, 0x54, + 0xaf, 0x7d, 0x95, 0xe9, 0xb5, 0x1b, 0xd3, 0x35, 0x4e, 0xf5, 0xdb, 0x9f, 0x4b, 0x70, 0x3a, 0xd3, + 0x8c, 0xd8, 0x4a, 0x28, 0xc5, 0x57, 0x42, 0xbe, 0x8a, 0xf6, 0xad, 0xb1, 0xe9, 0x85, 0x56, 0xd1, + 0x2d, 0x7a, 0xe4, 0xc4, 0x96, 0x2b, 0x75, 0xa4, 0x3d, 0x37, 0x46, 0xe3, 0x11, 0x5f, 0x46, 0x89, + 0xba, 0xc7, 0x8c, 0xf2, 0x02, 0xeb, 0xa8, 0xdc, 0x82, 0x55, 0xdf, 0xca, 0x89, 0xb8, 0x6f, 0x08, + 0xc7, 0xcd, 0x45, 0x71, 0x5c, 0x13, 0x16, 0xb7, 0xf1, 0x53, 0xa3, 0x8f, 0x5f, 0xc9, 0x99, 0xd8, + 0x79, 0xa8, 0xd8, 0xd8, 0x19, 0x19, 0xae, 0xeb, 0x67, 0xe4, 0xb2, 0x12, 0x26, 0xc9, 0xff, 0xbe, + 0x08, 0x2b, 0xf1, 0xe8, 0xf8, 0x38, 0x01, 0x1b, 0xbf, 0x91, 0xb2, 0x56, 0xc4, 0x5f, 0x34, 0x54, + 0xbe, 0xdf, 0x10, 0x35, 0x5d, 0x2e, 0x0b, 0x62, 0xf1, 0xeb, 0x36, 0x51, 0xf0, 0x35, 0x60, 0xa9, + 0x6f, 0x8d, 0x46, 0x9a, 0xa9, 0x8b, 0xa3, 0x4c, 0xde, 0x24, 0xfe, 0xd3, 0x9c, 0x01, 0x71, 0x3b, + 0x21, 0xd3, 0xdf, 0x64, 0xf0, 0x9e, 0x59, 0xce, 0x13, 0xc3, 0xa4, 0xf0, 0x33, 0xcd, 0xea, 0x65, + 0x05, 0x38, 0x69, 0xdb, 0x70, 0xd0, 0x06, 0x14, 0xb0, 0xf9, 0x54, 0xd4, 0xe7, 0x29, 0x67, 0x9d, + 0xa2, 0x9a, 0x53, 0x28, 0x1f, 0xba, 0x0e, 0x8b, 0x23, 0x12, 0x16, 0x02, 0x99, 0x58, 0xcf, 0x38, + 0xf2, 0x53, 0x38, 0x1b, 0xda, 0x84, 0x25, 0x9d, 0x8e, 0x93, 0x28, 0x62, 0x1a, 0x29, 0xa0, 0x36, + 0x65, 0x50, 0x04, 0x23, 0xda, 0xf1, 0x77, 0x1f, 0xe5, 0xac, 0x6d, 0x43, 0x6c, 0x28, 0x52, 0xb7, + 0x20, 0x7b, 0xd1, 0xda, 0x18, 0xa8, 0xae, 0xcd, 0xe9, 0xba, 0x26, 0xef, 0x43, 0x4e, 0x43, 0x69, + 0x68, 0x0d, 0x58, 0x18, 0x55, 0xd8, 0x29, 0xf9, 0xd0, 0x1a, 0xd0, 0x28, 0x5a, 0x23, 0xbb, 0x31, + 0xdd, 0x30, 0xe9, 0xf2, 0x57, 0x52, 0x58, 0x83, 0x4c, 0x3e, 0xfa, 0x43, 0xb5, 0xcc, 0x3e, 0x6e, + 0x54, 0xe9, 0xa3, 0x32, 0xa5, 0xec, 0x9a, 0x7d, 0x5a, 0x25, 0x7b, 0xde, 0x71, 0xa3, 0x46, 0xe9, + 0xe4, 0x27, 0xd9, 0x68, 0x33, 0xf0, 0x68, 0x25, 0x6b, 0xa3, 0x9d, 0x96, 0xdf, 0x05, 0x76, 0x74, + 0x0f, 0x96, 0x9e, 0xb1, 0x44, 0xd0, 0xa8, 0x53, 0xf9, 0x2b, 0xd3, 0xd3, 0x0b, 0xd7, 0x20, 0x04, + 0xbf, 0xcb, 0x2d, 0xd4, 0xdf, 0x48, 0x70, 0x6a, 0x8b, 0xee, 0x43, 0x43, 0x79, 0x6c, 0x1e, 0xf0, + 0xf6, 0x96, 0x8f, 0xab, 0x67, 0x02, 0xa2, 0xf1, 0xf7, 0x16, 0xb0, 0x7a, 0x1b, 0x6a, 0x42, 0x39, + 0x57, 0x91, 0x9f, 0x19, 0x9a, 0xaf, 0xba, 0xe1, 0xa6, 0xfc, 0x21, 0xac, 0x27, 0xde, 0x82, 0x6f, + 0x05, 0x2f, 0xc0, 0x72, 0x90, 0xaf, 0xfc, 0x97, 0xa8, 0xf8, 0xb4, 0xb6, 0x2e, 0xdf, 0x86, 0x93, + 0x3d, 0x4f, 0x73, 0xbc, 0x84, 0x0b, 0x66, 0x90, 0xa5, 0xa0, 0x7b, 0x54, 0x96, 0xe3, 0xe2, 0x3d, + 0x58, 0xeb, 0x79, 0x96, 0xfd, 0x02, 0x4a, 0x49, 0xd6, 0x21, 0xef, 0x6f, 0x8d, 0xc5, 0xfa, 0x20, + 0x9a, 0xf2, 0x3a, 0x3b, 0x22, 0x48, 0xf6, 0x76, 0x07, 0x4e, 0x31, 0x84, 0xfe, 0x45, 0x5e, 0xe2, + 0xb4, 0x38, 0x1f, 0x48, 0xea, 0x7d, 0x0c, 0x27, 0x82, 0x65, 0x31, 0xc0, 0xbe, 0x6e, 0x46, 0xb1, + 0xaf, 0xf3, 0x13, 0x46, 0x3d, 0x02, 0x7d, 0xfd, 0x69, 0x2e, 0x94, 0xd7, 0x33, 0x90, 0xaf, 0x3b, + 0x51, 0xe4, 0xeb, 0xe2, 0x34, 0xdd, 0x11, 0xe0, 0x2b, 0x19, 0xb5, 0xf9, 0x94, 0xa8, 0xfd, 0x32, + 0x01, 0x8f, 0x15, 0xb2, 0xf0, 0xc5, 0x98, 0xb5, 0xbf, 0x11, 0x74, 0x4c, 0x61, 0xe8, 0x98, 0xdf, + 0xb5, 0x7f, 0xa0, 0x72, 0x2b, 0x86, 0x8e, 0x5d, 0x98, 0x6a, 0xaf, 0x0f, 0x8e, 0xfd, 0x65, 0x01, + 0xca, 0xfe, 0xb3, 0x84, 0xcf, 0x93, 0x6e, 0xcb, 0xa5, 0xb8, 0x2d, 0xbc, 0x02, 0xe7, 0x5f, 0x6a, + 0x05, 0x2e, 0xcc, 0xbc, 0x02, 0x9f, 0x81, 0x32, 0xfd, 0xa1, 0x3a, 0xf8, 0x90, 0xaf, 0xa8, 0x25, + 0x4a, 0x50, 0xf0, 0x61, 0x10, 0x86, 0x8b, 0x73, 0x85, 0x61, 0x0c, 0x8f, 0x5b, 0x8a, 0xe3, 0x71, + 0x1f, 0xfb, 0x2b, 0x22, 0x5b, 0x44, 0x2f, 0x4f, 0xd0, 0x9b, 0xba, 0x16, 0xc6, 0x70, 0xa2, 0x72, + 0x16, 0x4e, 0x14, 0x68, 0x99, 0x8c, 0x13, 0x7d, 0x87, 0x2b, 0xc4, 0x3e, 0x03, 0xd9, 0xc2, 0xb1, + 0xc8, 0x33, 0xeb, 0x1d, 0x00, 0x3f, 0x89, 0x08, 0xa4, 0xed, 0xcc, 0x84, 0x77, 0x54, 0x42, 0xec, + 0x44, 0x6d, 0x64, 0x68, 0x82, 0x43, 0xc3, 0xd9, 0xf2, 0x63, 0xc6, 0x89, 0xe1, 0xff, 0x16, 0x43, + 0xf9, 0x25, 0xe3, 0x30, 0xec, 0xe3, 0x04, 0x0e, 0x3c, 0x67, 0x14, 0xdf, 0x8c, 0xc2, 0xc0, 0x2f, + 0x18, 0x75, 0x09, 0x14, 0x98, 0x56, 0x2e, 0x9a, 0xc3, 0x1f, 0x33, 0xac, 0xab, 0xcc, 0x29, 0x2d, + 0xba, 0x33, 0x38, 0x34, 0x4c, 0xc3, 0x3d, 0x62, 0xcf, 0x17, 0xd9, 0xce, 0x40, 0x90, 0x5a, 0x14, + 0x6d, 0xc2, 0xcf, 0x0d, 0x4f, 0xed, 0x5b, 0x3a, 0xa6, 0x31, 0x5d, 0x54, 0x4a, 0x84, 0xb0, 0x65, + 0xe9, 0x38, 0x98, 0x79, 0xa5, 0x17, 0x9b, 0x79, 0xe5, 0xd8, 0xcc, 0x3b, 0x05, 0x8b, 0x0e, 0xd6, + 0x5c, 0xcb, 0xe4, 0xfb, 0x70, 0xde, 0x22, 0x43, 0x33, 0xc2, 0xae, 0x4b, 0x7a, 0xe2, 0xe5, 0x1a, + 0x6f, 0x86, 0xca, 0xcc, 0xe5, 0xa9, 0x65, 0xe6, 0x84, 0x43, 0xb6, 0x58, 0x99, 0x59, 0x9d, 0x5a, + 0x66, 0xce, 0x74, 0xc6, 0x16, 0x14, 0xda, 0xb5, 0xd9, 0x0a, 0xed, 0x70, 0x5d, 0xba, 0x12, 0xa9, + 0x4b, 0xbf, 0xcb, 0xc9, 0xfa, 0x2b, 0x09, 0xd6, 0x13, 0xd3, 0x8a, 0x4f, 0xd7, 0x5b, 0xb1, 0x53, + 0xb8, 0x0b, 0x53, 0x7d, 0xe6, 0x1f, 0xc2, 0x3d, 0x88, 0x1c, 0xc2, 0xbd, 0x37, 0x5d, 0xf0, 0x95, + 0x9f, 0xc1, 0xfd, 0xa1, 0x04, 0xaf, 0xef, 0xdb, 0x7a, 0xac, 0xc2, 0xe3, 0xdb, 0xfe, 0xd9, 0x13, + 0xc7, 0xc7, 0xa2, 0xd6, 0xcf, 0xcd, 0x0b, 0xc8, 0x30, 0x39, 0x59, 0x86, 0xf3, 0xd9, 0x66, 0xf0, + 0x92, 0xe9, 0x87, 0xb0, 0xb2, 0xf3, 0x1c, 0xf7, 0x7b, 0xc7, 0x66, 0x7f, 0x0e, 0xd3, 0xea, 0x90, + 0xef, 0x8f, 0x74, 0x0e, 0xa7, 0x92, 0x9f, 0xe1, 0x2a, 0x30, 0x1f, 0xad, 0x02, 0x55, 0xa8, 0x07, + 0x3d, 0xf0, 0xe1, 0x3d, 0x45, 0x86, 0x57, 0x27, 0xcc, 0x44, 0xf9, 0xb2, 0xc2, 0x5b, 0x9c, 0x8e, + 0x1d, 0x76, 0x67, 0x85, 0xd1, 0xb1, 0xe3, 0x44, 0xb3, 0x45, 0x3e, 0x9a, 0x2d, 0xe4, 0x3f, 0x91, + 0xa0, 0x42, 0x7a, 0x78, 0x29, 0xfb, 0xf9, 0x56, 0x2b, 0x1f, 0x6c, 0xb5, 0xfc, 0x1d, 0x5b, 0x21, + 0xbc, 0x63, 0x0b, 0x2c, 0x2f, 0x52, 0x72, 0xd2, 0xf2, 0x45, 0x9f, 0x8e, 0x1d, 0x47, 0x3e, 0x0f, + 0xcb, 0xcc, 0x36, 0xfe, 0xe6, 0x75, 0xc8, 0x8f, 0x9d, 0xa1, 0x88, 0xa3, 0xb1, 0x33, 0x94, 0xff, + 0x48, 0x82, 0x6a, 0xcb, 0xf3, 0xb4, 0xfe, 0xd1, 0x1c, 0x2f, 0xe0, 0x1b, 0x97, 0x0b, 0x1b, 0x97, + 0x7c, 0x89, 0xc0, 0xdc, 0x42, 0x86, 0xb9, 0xc5, 0x88, 0xb9, 0x32, 0xd4, 0x84, 0x2d, 0x99, 0x06, + 0x77, 0x00, 0x75, 0x2d, 0xc7, 0xbb, 0x6f, 0x39, 0xcf, 0x34, 0x47, 0x9f, 0x6f, 0x07, 0x86, 0xa0, + 0xc0, 0x6f, 0x40, 0xe7, 0xaf, 0x14, 0x15, 0xfa, 0x5b, 0xbe, 0x0c, 0x27, 0x22, 0xfa, 0x32, 0x3b, + 0xfe, 0x04, 0x2a, 0x34, 0xef, 0xf3, 0x52, 0xfc, 0x46, 0xf8, 0xd4, 0x6b, 0xa6, 0x55, 0x42, 0xfe, + 0x5d, 0x58, 0x25, 0xf5, 0x01, 0xa5, 0xfb, 0x53, 0xf1, 0x7b, 0xb1, 0x3a, 0xf5, 0x6c, 0x86, 0xa2, + 0x58, 0x8d, 0xfa, 0x1f, 0x12, 0x14, 0x29, 0x3d, 0xb1, 0x66, 0x9f, 0x81, 0xb2, 0x83, 0x6d, 0x4b, + 0xf5, 0xb4, 0x81, 0x7f, 0xdf, 0x9c, 0x10, 0xf6, 0xb4, 0x01, 0x45, 0x73, 0xe9, 0x43, 0xdd, 0x18, + 0x60, 0xd7, 0x13, 0x97, 0xce, 0x2b, 0x84, 0xb6, 0xcd, 0x48, 0xc4, 0x49, 0xf4, 0x10, 0xa6, 0x40, + 0xcf, 0x5a, 0xe8, 0x6f, 0xb4, 0xc1, 0x6e, 0x39, 0xce, 0x82, 0xbd, 0xd3, 0x3b, 0x90, 0x4d, 0x28, + 0xc5, 0xe0, 0x72, 0xbf, 0x8d, 0xae, 0x43, 0x81, 0x42, 0x9e, 0x4b, 0xd3, 0xfd, 0x46, 0x19, 0xe5, + 0x1d, 0x40, 0x61, 0xb7, 0xf1, 0x01, 0xba, 0x0e, 0x8b, 0xd4, 0xab, 0xa2, 0x9c, 0x5a, 0xcf, 0x50, + 0xa4, 0x70, 0x36, 0x59, 0x03, 0xc4, 0x34, 0x47, 0x4a, 0xa8, 0xf9, 0x87, 0x71, 0x42, 0x49, 0xf5, + 0xd7, 0x12, 0x9c, 0x88, 0xf4, 0xc1, 0x6d, 0x7d, 0x27, 0xda, 0x49, 0xa6, 0xa9, 0xbc, 0x83, 0xad, + 0xc8, 0x1a, 0x72, 0x3d, 0xcb, 0xa4, 0x5f, 0xd3, 0xfa, 0xf1, 0xb7, 0x12, 0x40, 0x6b, 0xec, 0x1d, + 0x71, 0x28, 0x31, 0x3c, 0x94, 0x52, 0x6c, 0x28, 0x9b, 0x50, 0xb2, 0x35, 0xd7, 0x7d, 0x66, 0x39, + 0x62, 0x13, 0xe4, 0xb7, 0x29, 0xe8, 0x37, 0xf6, 0x8e, 0xc4, 0x21, 0x1b, 0xf9, 0x8d, 0x2e, 0x42, + 0x8d, 0x7d, 0x14, 0xa1, 0x6a, 0xba, 0xee, 0x60, 0xd7, 0xe5, 0xa7, 0x6d, 0x55, 0x46, 0x6d, 0x31, + 0x22, 0x61, 0x33, 0x28, 0x0c, 0xee, 0x1d, 0xab, 0x9e, 0xf5, 0x04, 0x9b, 0x7c, 0x33, 0x53, 0x15, + 0xd4, 0x3d, 0x42, 0x64, 0xc7, 0x0e, 0x03, 0xc3, 0xf5, 0x1c, 0xc1, 0x26, 0x4e, 0x66, 0x38, 0x95, + 0xb2, 0x91, 0x41, 0xa9, 0x77, 0xc7, 0xc3, 0x21, 0x73, 0xf1, 0x8b, 0x0f, 0xfb, 0xbb, 0xfc, 0x85, + 0x72, 0x59, 0x93, 0x20, 0x70, 0x1a, 0x7f, 0xdd, 0x57, 0x88, 0xda, 0xbc, 0x0b, 0xab, 0xa1, 0x77, + 0xe0, 0x61, 0x15, 0xa9, 0x3a, 0xa5, 0x68, 0xd5, 0x29, 0x3f, 0x00, 0xc4, 0x80, 0x8a, 0x97, 0x7c, + 0x6f, 0xf9, 0x24, 0x9c, 0x88, 0x28, 0xe2, 0x4b, 0xf7, 0x35, 0xa8, 0xf2, 0x2b, 0x66, 0x3c, 0x50, + 0x4e, 0x43, 0x89, 0xa4, 0xe0, 0xbe, 0xa1, 0x8b, 0x13, 0xd8, 0x25, 0xdb, 0xd2, 0xb7, 0x0c, 0xdd, + 0x91, 0x3f, 0x83, 0xaa, 0xc2, 0xfa, 0xe1, 0xbc, 0xf7, 0xa1, 0xc6, 0x2f, 0xa4, 0xa9, 0x91, 0xab, + 0xa6, 0x69, 0xdf, 0x39, 0x84, 0x3b, 0x51, 0xaa, 0x66, 0xb8, 0x29, 0xeb, 0xd0, 0x64, 0x35, 0x46, + 0x44, 0xbd, 0x78, 0xd9, 0xfb, 0x20, 0x6e, 0x60, 0x4c, 0xed, 0x25, 0x2a, 0x5f, 0x75, 0xc2, 0x4d, + 0xf9, 0x2c, 0x9c, 0x49, 0xed, 0x85, 0x7b, 0xc2, 0x86, 0x7a, 0xf0, 0x80, 0xdd, 0x87, 0xf4, 0x8f, + 0x98, 0xa5, 0xd0, 0x11, 0xf3, 0x29, 0xbf, 0xaa, 0xcc, 0x89, 0x55, 0x8f, 0x96, 0x8c, 0xc1, 0xfe, + 0x20, 0x9f, 0xb5, 0x3f, 0x28, 0x44, 0xf6, 0x07, 0x72, 0xcf, 0xf7, 0x27, 0xdf, 0xb7, 0xdd, 0xa3, + 0xfb, 0x4b, 0xd6, 0xb7, 0x48, 0x88, 0xf2, 0xa4, 0xb7, 0x64, 0xac, 0x4a, 0x48, 0x4a, 0xbe, 0x0a, + 0xd5, 0x68, 0x6a, 0x0c, 0xe5, 0x39, 0x29, 0x91, 0xe7, 0x6a, 0xb1, 0x14, 0xf7, 0x41, 0xac, 0x64, + 0xce, 0xf6, 0x71, 0xac, 0x60, 0xbe, 0x1b, 0x49, 0x76, 0xd7, 0x52, 0x4e, 0x87, 0x7f, 0x4d, 0x79, + 0x6e, 0x8d, 0xaf, 0x07, 0xf7, 0x5d, 0x22, 0xcf, 0x5f, 0x5a, 0x7e, 0x03, 0x2a, 0xfb, 0x59, 0xdf, + 0xc9, 0x14, 0xc4, 0xbd, 0x90, 0x9b, 0xb0, 0x76, 0xdf, 0x18, 0x62, 0xf7, 0xd8, 0xf5, 0xf0, 0xa8, + 0x4d, 0x93, 0xd2, 0xa1, 0x81, 0x1d, 0x74, 0x0e, 0x80, 0xee, 0x79, 0x6c, 0xcb, 0xf0, 0x3f, 0x9f, + 0x08, 0x51, 0xe4, 0xff, 0x94, 0x60, 0x25, 0x10, 0xdc, 0xa7, 0x7b, 0xbd, 0xd7, 0xa0, 0x4c, 0xde, + 0xd7, 0xf5, 0xb4, 0x91, 0x2d, 0x0e, 0xc0, 0x7c, 0x02, 0xba, 0x03, 0xc5, 0x43, 0x57, 0x60, 0x4c, + 0xa9, 0x88, 0x7b, 0x9a, 0x21, 0x4a, 0xe1, 0xd0, 0x6d, 0xeb, 0xe8, 0x43, 0x80, 0xb1, 0x8b, 0x75, + 0x7e, 0xe8, 0x95, 0xcf, 0x2a, 0x2f, 0xf6, 0xc3, 0x27, 0xe7, 0x44, 0x80, 0x5d, 0x29, 0xb9, 0x0b, + 0x15, 0xc3, 0xb4, 0x74, 0x4c, 0x4f, 0x33, 0x75, 0x0e, 0x43, 0x4d, 0x11, 0x07, 0x26, 0xb1, 0xef, + 0x62, 0x5d, 0xc6, 0x7c, 0x2d, 0x14, 0xfe, 0xe5, 0x81, 0xd2, 0x81, 0x55, 0x96, 0xb4, 0x0e, 0x7d, + 0xc3, 0x45, 0xc4, 0x5e, 0x98, 0xf4, 0x76, 0xd4, 0x5b, 0x4a, 0xdd, 0xe0, 0xb5, 0x90, 0x10, 0x95, + 0x6f, 0xc3, 0xc9, 0xc8, 0x96, 0x6a, 0x8e, 0x3d, 0x8e, 0xdc, 0x8d, 0x21, 0x2b, 0x41, 0x38, 0x73, + 0xdc, 0x42, 0x44, 0xf3, 0x34, 0xdc, 0xc2, 0x65, 0xb8, 0x85, 0x2b, 0x7f, 0x09, 0xa7, 0x23, 0x10, + 0x50, 0xc4, 0xa2, 0xbb, 0xb1, 0x52, 0xef, 0xd2, 0x34, 0xad, 0xb1, 0x9a, 0xef, 0x7f, 0x24, 0x58, + 0x4b, 0x63, 0x78, 0x41, 0x88, 0xf2, 0x87, 0x19, 0x17, 0x1f, 0x6f, 0xcd, 0x66, 0xd6, 0x6f, 0x04, + 0xde, 0xdd, 0x83, 0x66, 0x9a, 0x3f, 0x93, 0xa3, 0x94, 0x9f, 0x67, 0x94, 0x7e, 0x96, 0x0f, 0x41, + 0xf5, 0x2d, 0xcf, 0x73, 0x8c, 0x83, 0x31, 0x09, 0xf9, 0x57, 0x0e, 0x7f, 0xb5, 0x7d, 0x20, 0x87, + 0xb9, 0xf6, 0xc6, 0x04, 0xf1, 0xc0, 0x8e, 0x54, 0x30, 0xe7, 0xf3, 0x28, 0x98, 0xc3, 0x40, 0xf8, + 0x9b, 0xb3, 0xe9, 0xfb, 0xad, 0x45, 0x4c, 0x7f, 0x96, 0x83, 0x5a, 0x74, 0x88, 0xd0, 0x0e, 0x80, + 0xe6, 0x5b, 0xce, 0x27, 0xca, 0xc5, 0x99, 0x5e, 0x53, 0x09, 0x09, 0xa2, 0xb7, 0x21, 0xdf, 0xb7, + 0xc7, 0x7c, 0xd4, 0x52, 0x4e, 0x8f, 0xb7, 0xec, 0x31, 0xcb, 0x28, 0x84, 0x8d, 0x6c, 0xc2, 0xd8, + 0x65, 0x80, 0xec, 0x2c, 0xf9, 0x98, 0x3e, 0x67, 0x32, 0x9c, 0x19, 0x3d, 0x84, 0xda, 0x33, 0xc7, + 0xf0, 0xb4, 0x83, 0x21, 0x56, 0x87, 0xda, 0x31, 0x76, 0x78, 0x96, 0x9c, 0x21, 0x91, 0x55, 0x85, + 0xe0, 0x23, 0x22, 0x27, 0xff, 0x01, 0x94, 0x84, 0x45, 0x53, 0x56, 0x84, 0x3d, 0x58, 0x1f, 0x13, + 0x36, 0x95, 0x5e, 0xf5, 0x33, 0x35, 0xd3, 0x52, 0x5d, 0x4c, 0x96, 0x71, 0xf1, 0x9d, 0xc5, 0x94, + 0x14, 0xbd, 0x46, 0xa5, 0xb7, 0x2c, 0x07, 0x77, 0x34, 0xd3, 0xea, 0x31, 0x51, 0xf9, 0x29, 0x54, + 0x42, 0x2f, 0x38, 0xc5, 0x84, 0x36, 0xac, 0x8a, 0xb3, 0x7b, 0x17, 0x7b, 0x7c, 0x79, 0x99, 0xa9, + 0xf3, 0x15, 0x2e, 0xd7, 0xc3, 0x1e, 0xbb, 0x6f, 0x71, 0x17, 0x4e, 0x2b, 0xd8, 0xb2, 0xb1, 0xe9, + 0x8f, 0xe7, 0x23, 0x6b, 0x30, 0x47, 0x06, 0x7f, 0x0d, 0x9a, 0x69, 0xf2, 0x2c, 0x3f, 0x5c, 0xbb, + 0x04, 0x25, 0xf1, 0x45, 0x34, 0x5a, 0x82, 0xfc, 0xde, 0x56, 0xb7, 0xbe, 0x40, 0x7e, 0xec, 0x6f, + 0x77, 0xeb, 0x12, 0x2a, 0x41, 0xa1, 0xb7, 0xb5, 0xd7, 0xad, 0xe7, 0xae, 0x8d, 0xa0, 0x1e, 0xff, + 0x1c, 0x18, 0xad, 0xc3, 0x89, 0xae, 0xb2, 0xdb, 0x6d, 0x3d, 0x68, 0xed, 0xb5, 0x77, 0x3b, 0x6a, + 0x57, 0x69, 0x7f, 0xda, 0xda, 0xdb, 0xa9, 0x2f, 0xa0, 0x0b, 0x70, 0x36, 0xfc, 0xe0, 0xe1, 0x6e, + 0x6f, 0x4f, 0xdd, 0xdb, 0x55, 0xb7, 0x76, 0x3b, 0x7b, 0xad, 0x76, 0x67, 0x47, 0xa9, 0x4b, 0xe8, + 0x2c, 0x9c, 0x0e, 0xb3, 0xdc, 0x6b, 0x6f, 0xb7, 0x95, 0x9d, 0x2d, 0xf2, 0xbb, 0xf5, 0xa8, 0x9e, + 0xbb, 0xf6, 0x11, 0x54, 0x23, 0x5f, 0xef, 0x12, 0x93, 0xba, 0xbb, 0xdb, 0xf5, 0x05, 0x54, 0x85, + 0x72, 0x58, 0x4f, 0x09, 0x0a, 0x9d, 0xdd, 0xed, 0x9d, 0x7a, 0x0e, 0x01, 0x2c, 0xee, 0xb5, 0x94, + 0x07, 0x3b, 0x7b, 0xf5, 0xfc, 0xb5, 0xdb, 0xb0, 0x12, 0xbb, 0x3b, 0x8d, 0x56, 0xa1, 0xda, 0x6b, + 0x75, 0xb6, 0xef, 0xed, 0x7e, 0xae, 0x2a, 0x3b, 0xad, 0xed, 0x2f, 0xea, 0x0b, 0x68, 0x0d, 0xea, + 0x82, 0xd4, 0xd9, 0xdd, 0x63, 0x54, 0xe9, 0xda, 0x93, 0xd8, 0x7c, 0xc3, 0xe8, 0x24, 0xac, 0xfa, + 0x5d, 0xaa, 0x5b, 0xca, 0x4e, 0x6b, 0x6f, 0x87, 0x58, 0x12, 0x21, 0x2b, 0xfb, 0x9d, 0x4e, 0xbb, + 0xf3, 0xa0, 0x2e, 0x11, 0xad, 0x01, 0x79, 0xe7, 0xf3, 0x36, 0x61, 0xce, 0x45, 0x99, 0xf7, 0x3b, + 0xdf, 0xef, 0xec, 0x7e, 0xd6, 0xa9, 0xe7, 0x37, 0x7f, 0xb1, 0x0a, 0x35, 0x51, 0xf4, 0x61, 0x87, + 0x5e, 0x89, 0xe9, 0xc2, 0x92, 0xf8, 0xda, 0x3e, 0x25, 0x5b, 0x47, 0xff, 0x47, 0x40, 0xf3, 0xc2, + 0x04, 0x0e, 0x5e, 0x7b, 0x2f, 0xa0, 0x03, 0x5a, 0x0b, 0x87, 0xee, 0xb2, 0x5f, 0x4a, 0xad, 0x3c, + 0x13, 0xd7, 0xe7, 0x9b, 0x97, 0xa7, 0xf2, 0xf9, 0x7d, 0x60, 0x52, 0xee, 0x86, 0x3f, 0x17, 0x43, + 0x97, 0xd3, 0xea, 0xd4, 0x94, 0xef, 0xd1, 0x9a, 0x57, 0xa6, 0x33, 0xfa, 0xdd, 0x3c, 0x81, 0x7a, + 0xfc, 0xd3, 0x31, 0x94, 0x82, 0xbb, 0x66, 0x7c, 0x9f, 0xd6, 0xbc, 0x36, 0x0b, 0x6b, 0xb8, 0xb3, + 0xc4, 0xb7, 0x50, 0x57, 0x67, 0xf9, 0x66, 0x24, 0xb3, 0xb3, 0xac, 0xcf, 0x4b, 0x98, 0x03, 0xa3, + 0xd7, 0xcf, 0x51, 0xea, 0x87, 0x47, 0x29, 0x5f, 0x39, 0xa4, 0x39, 0x30, 0xfd, 0x26, 0xbb, 0xbc, + 0x80, 0x8e, 0x60, 0x25, 0x76, 0xb7, 0x01, 0xa5, 0x88, 0xa7, 0x5f, 0xe2, 0x68, 0x5e, 0x9d, 0x81, + 0x33, 0x1a, 0x11, 0xe1, 0xbb, 0x0c, 0xe9, 0x11, 0x91, 0x72, 0x53, 0x22, 0x3d, 0x22, 0x52, 0xaf, + 0x45, 0xd0, 0xe0, 0x8e, 0xdc, 0x61, 0x48, 0x0b, 0xee, 0xb4, 0x9b, 0x13, 0xcd, 0xcb, 0x53, 0xf9, + 0xc2, 0x4e, 0x8b, 0xdd, 0x68, 0x48, 0x73, 0x5a, 0xfa, 0x8d, 0x89, 0xe6, 0xd5, 0x19, 0x38, 0xe3, + 0x51, 0x10, 0x9c, 0x8f, 0x66, 0x45, 0x41, 0xe2, 0x34, 0x3f, 0x2b, 0x0a, 0x92, 0x47, 0xad, 0x3c, + 0x0a, 0x62, 0xe7, 0x9a, 0x57, 0x66, 0x38, 0x87, 0xc9, 0x8e, 0x82, 0xf4, 0x13, 0x1b, 0x79, 0x01, + 0xfd, 0x54, 0x82, 0x46, 0xd6, 0x19, 0x07, 0x4a, 0xa9, 0xf5, 0xa6, 0x1c, 0xcb, 0x34, 0x37, 0xe7, + 0x11, 0xf1, 0xad, 0xf8, 0x1a, 0x50, 0x72, 0x0d, 0x44, 0x6f, 0xa5, 0x8d, 0x4c, 0xc6, 0x4a, 0xdb, + 0x7c, 0x7b, 0x36, 0x66, 0xbf, 0xcb, 0x1e, 0x94, 0xc4, 0xa9, 0x0a, 0x4a, 0xc9, 0xd2, 0xb1, 0x33, + 0x9d, 0xa6, 0x3c, 0x89, 0xc5, 0x57, 0xfa, 0x00, 0x0a, 0x84, 0x8a, 0xce, 0xa6, 0x73, 0x0b, 0x65, + 0xe7, 0xb2, 0x1e, 0xfb, 0x8a, 0x1e, 0xc3, 0x22, 0x3b, 0x46, 0x40, 0x29, 0x28, 0x44, 0xe4, 0xb0, + 0xa3, 0x79, 0x3e, 0x9b, 0xc1, 0x57, 0xf7, 0x15, 0xfb, 0x47, 0x2c, 0xfc, 0x84, 0x00, 0xbd, 0x99, + 0xfe, 0xf1, 0x7a, 0xf4, 0x40, 0xa2, 0x79, 0x71, 0x0a, 0x57, 0x78, 0x52, 0xc4, 0x2a, 0xe0, 0xcb, + 0x53, 0xb7, 0x31, 0xd9, 0x93, 0x22, 0x7d, 0xa3, 0xc4, 0x82, 0x24, 0xb9, 0x91, 0x4a, 0x0b, 0x92, + 0xcc, 0xed, 0x6b, 0x5a, 0x90, 0x64, 0xef, 0xcd, 0xe4, 0x05, 0xe4, 0xc1, 0x89, 0x14, 0xd8, 0x0c, + 0xbd, 0x9d, 0x15, 0xe4, 0x69, 0x18, 0x5e, 0xf3, 0x9d, 0x19, 0xb9, 0xc3, 0x83, 0xcf, 0x27, 0xfd, + 0xeb, 0xd9, 0x58, 0x52, 0xe6, 0xe0, 0xc7, 0xa7, 0xf8, 0xe6, 0x3f, 0xe7, 0x61, 0x99, 0x41, 0xa2, + 0xbc, 0x82, 0xf9, 0x02, 0x20, 0x38, 0x8d, 0x40, 0x6f, 0xa4, 0xfb, 0x24, 0x72, 0xc4, 0xd3, 0x7c, + 0x73, 0x32, 0x53, 0x38, 0xd0, 0x42, 0xc8, 0x7e, 0x5a, 0xa0, 0x25, 0x0f, 0x30, 0xd2, 0x02, 0x2d, + 0xe5, 0x78, 0x40, 0x5e, 0x40, 0x9f, 0x42, 0xd9, 0x87, 0x90, 0x51, 0x1a, 0x04, 0x1d, 0xc3, 0xc8, + 0x9b, 0x6f, 0x4c, 0xe4, 0x09, 0x5b, 0x1d, 0xc2, 0x87, 0xd3, 0xac, 0x4e, 0xe2, 0xd0, 0x69, 0x56, + 0xa7, 0x81, 0xcc, 0x81, 0x4f, 0x18, 0x8a, 0x94, 0xe9, 0x93, 0x08, 0x88, 0x97, 0xe9, 0x93, 0x28, + 0x14, 0x25, 0x2f, 0xdc, 0xbb, 0xf4, 0xcb, 0x6f, 0xce, 0x49, 0xff, 0xf8, 0xcd, 0xb9, 0x85, 0x9f, + 0x7c, 0x7b, 0x4e, 0xfa, 0xe5, 0xb7, 0xe7, 0xa4, 0xbf, 0xff, 0xf6, 0x9c, 0xf4, 0x2f, 0xdf, 0x9e, + 0x93, 0xfe, 0xf8, 0x5f, 0xcf, 0x2d, 0xfc, 0xa0, 0x24, 0xa4, 0x0f, 0x16, 0xe9, 0xbf, 0x53, 0x7a, + 0xef, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x64, 0x05, 0xc8, 0x1a, 0x14, 0x4b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -9880,6 +9902,25 @@ func (m *ImageSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Annotations) > 0 { + for k := range m.Annotations { + v := m.Annotations[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } if len(m.Image) > 0 { i -= len(m.Image) copy(dAtA[i:], m.Image) @@ -12083,6 +12124,18 @@ func (m *Image) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } if len(m.Username) > 0 { i -= len(m.Username) copy(dAtA[i:], m.Username) @@ -14081,6 +14134,14 @@ func (m *ImageSpec) Size() (n int) { if l > 0 { n += 1 + l + sovApi(uint64(l)) } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } return n } @@ -15043,6 +15104,10 @@ func (m *Image) Size() (n int) { if l > 0 { n += 1 + l + sovApi(uint64(l)) } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovApi(uint64(l)) + } return n } @@ -16028,8 +16093,19 @@ func (this *ImageSpec) String() string { if this == nil { return "nil" } + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" s := strings.Join([]string{`&ImageSpec{`, `Image:` + fmt.Sprintf("%v", this.Image) + `,`, + `Annotations:` + mapStringForAnnotations + `,`, `}`, }, "") return s @@ -16656,6 +16732,7 @@ func (this *Image) String() string { `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`, `Uid:` + strings.Replace(this.Uid.String(), "Int64Value", "Int64Value", 1) + `,`, `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Spec:` + strings.Replace(this.Spec.String(), "ImageSpec", "ImageSpec", 1) + `,`, `}`, }, "") return s @@ -22005,6 +22082,133 @@ func (m *ImageSpec) Unmarshal(dAtA []byte) error { } m.Image = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -29136,6 +29340,42 @@ func (m *Image) Unmarshal(dAtA []byte) error { } m.Username = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Spec == nil { + m.Spec = &ImageSpec{} + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto b/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto index f9430299471..0c7ff56411f 100644 --- a/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto +++ b/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto @@ -306,11 +306,11 @@ message LinuxPodSandboxConfig { // PodSandbox in its user interface for better user experience. For example, // the runtime can construct a unique PodSandboxName based on the metadata. message PodSandboxMetadata { - // Pod name of the sandbox. Same as the pod name in the PodSpec. + // Pod name of the sandbox. Same as the pod name in the Pod ObjectMeta. string name = 1; - // Pod UID of the sandbox. Same as the pod UID in the PodSpec. + // Pod UID of the sandbox. Same as the pod UID in the Pod ObjectMeta. string uid = 2; - // Pod namespace of the sandbox. Same as the pod namespace in the PodSpec. + // Pod namespace of the sandbox. Same as the pod namespace in the Pod ObjectMeta. string namespace = 3; // Attempt number of creating the sandbox. Default: 0. uint32 attempt = 4; @@ -523,11 +523,14 @@ message ListPodSandboxResponse { repeated PodSandbox items = 1; } -// ImageSpec is an internal representation of an image. Currently, it wraps the -// value of a Container's Image field (e.g. imageID or imageDigest), but in the -// future it will include more detailed information about the different image types. +// ImageSpec is an internal representation of an image. message ImageSpec { + // Container's Image field (e.g. imageID or imageDigest). string image = 1; + // Unstructured key-value map holding arbitrary metadata. + // ImageSpec Annotations can be used to help the runtime target specific + // images in multi-arch images. + map annotations = 2; } message KeyValue { @@ -782,8 +785,8 @@ message ContainerConfig { // Configuration specific to Linux containers. LinuxContainerConfig linux = 15; - // Configuration specific to Windows containers. - WindowsContainerConfig windows = 16; + // Configuration specific to Windows containers. + WindowsContainerConfig windows = 16; } message CreateContainerRequest { @@ -1065,6 +1068,8 @@ message Image { // User name that will run the command(s). This is used if UID is not set // and no user is specified when creating container. string username = 6; + // ImageSpec for image which includes annotations + ImageSpec spec = 7; } message ListImagesResponse { diff --git a/vendor/k8s.io/csi-translation-lib/go.mod b/vendor/k8s.io/csi-translation-lib/go.mod index 4018998d912..05c84888997 100644 --- a/vendor/k8s.io/csi-translation-lib/go.mod +++ b/vendor/k8s.io/csi-translation-lib/go.mod @@ -2,22 +2,21 @@ module k8s.io/csi-translation-lib -go 1.13 +go 1.15 require ( github.com/stretchr/testify v1.4.0 k8s.io/api v0.0.0 k8s.io/apimachinery v0.0.0 k8s.io/cloud-provider v0.0.0 - k8s.io/klog v1.0.0 + k8s.io/klog/v2 v2.2.0 ) replace ( - golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // pinned to release-branch.go1.13 - golang.org/x/tools => golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7 // pinned to release-branch.go1.13 k8s.io/api => ../api k8s.io/apimachinery => ../apimachinery k8s.io/client-go => ../client-go k8s.io/cloud-provider => ../cloud-provider + k8s.io/component-base => ../component-base k8s.io/csi-translation-lib => ../csi-translation-lib ) diff --git a/vendor/k8s.io/csi-translation-lib/go.sum b/vendor/k8s.io/csi-translation-lib/go.sum index 1c0151a170f..00d64e38a71 100644 --- a/vendor/k8s.io/csi-translation-lib/go.sum +++ b/vendor/k8s.io/csi-translation-lib/go.sum @@ -1,76 +1,142 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -78,6 +144,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -85,84 +152,218 @@ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/vendor/k8s.io/csi-translation-lib/plugins/BUILD b/vendor/k8s.io/csi-translation-lib/plugins/BUILD index 3baad53dd7c..667605de858 100644 --- a/vendor/k8s.io/csi-translation-lib/plugins/BUILD +++ b/vendor/k8s.io/csi-translation-lib/plugins/BUILD @@ -9,6 +9,7 @@ go_library( "gce_pd.go", "in_tree_volume.go", "openstack_cinder.go", + "vsphere_volume.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/csi-translation-lib/plugins", importpath = "k8s.io/csi-translation-lib/plugins", @@ -19,7 +20,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/cloud-provider/volume:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -45,6 +46,7 @@ go_test( "azure_file_test.go", "gce_pd_test.go", "in_tree_volume_test.go", + "vsphere_volume_test.go", ], embed = [":go_default_library"], deps = [ diff --git a/vendor/k8s.io/csi-translation-lib/plugins/azure_disk.go b/vendor/k8s.io/csi-translation-lib/plugins/azure_disk.go index 1ccef2b68a4..8184881de9d 100644 --- a/vendor/k8s.io/csi-translation-lib/plugins/azure_disk.go +++ b/vendor/k8s.io/csi-translation-lib/plugins/azure_disk.go @@ -29,6 +29,8 @@ import ( const ( // AzureDiskDriverName is the name of the CSI driver for Azure Disk AzureDiskDriverName = "disk.csi.azure.com" + // AzureDiskTopologyKey is the topology key of Azure Disk CSI driver + AzureDiskTopologyKey = "topology.disk.csi.azure.com/zone" // AzureDiskInTreePluginName is the name of the intree plugin for Azure Disk AzureDiskInTreePluginName = "kubernetes.io/azure-disk" @@ -57,6 +59,35 @@ func NewAzureDiskCSITranslator() InTreePlugin { // TranslateInTreeStorageClassParametersToCSI translates InTree Azure Disk storage class parameters to CSI storage class func (t *azureDiskCSITranslator) TranslateInTreeStorageClassToCSI(sc *storage.StorageClass) (*storage.StorageClass, error) { + var ( + generatedTopologies []v1.TopologySelectorTerm + params = map[string]string{} + ) + for k, v := range sc.Parameters { + switch strings.ToLower(k) { + case zoneKey: + generatedTopologies = generateToplogySelectors(AzureDiskTopologyKey, []string{v}) + case zonesKey: + generatedTopologies = generateToplogySelectors(AzureDiskTopologyKey, strings.Split(v, ",")) + default: + params[k] = v + } + } + + if len(generatedTopologies) > 0 && len(sc.AllowedTopologies) > 0 { + return nil, fmt.Errorf("cannot simultaneously set allowed topologies and zone/zones parameters") + } else if len(generatedTopologies) > 0 { + sc.AllowedTopologies = generatedTopologies + } else if len(sc.AllowedTopologies) > 0 { + newTopologies, err := translateAllowedTopologies(sc.AllowedTopologies, AzureDiskTopologyKey) + if err != nil { + return nil, fmt.Errorf("failed translating allowed topologies: %v", err) + } + sc.AllowedTopologies = newTopologies + } + + sc.Parameters = params + return sc, nil } diff --git a/vendor/k8s.io/csi-translation-lib/plugins/azure_file.go b/vendor/k8s.io/csi-translation-lib/plugins/azure_file.go index 76a3b86dbb4..ff1c2b0b517 100644 --- a/vendor/k8s.io/csi-translation-lib/plugins/azure_file.go +++ b/vendor/k8s.io/csi-translation-lib/plugins/azure_file.go @@ -24,7 +24,7 @@ import ( v1 "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -41,6 +41,8 @@ const ( secretNameTemplate = "azure-storage-account-%s-secret" defaultSecretNamespace = "default" + + resourceGroupAnnotation = "kubernetes.io/azure-file-resource-group" ) var _ InTreePlugin = &azureFileCSITranslator{} @@ -116,7 +118,11 @@ func (t *azureFileCSITranslator) TranslateInTreePVToCSI(pv *v1.PersistentVolume) klog.Warningf("getStorageAccountName(%s) returned with error: %v", azureSource.SecretName, err) accountName = azureSource.SecretName } - volumeID := fmt.Sprintf(volumeIDTemplate, "", accountName, azureSource.ShareName, "") + resourceGroup := "" + if v, ok := pv.ObjectMeta.Annotations[resourceGroupAnnotation]; ok { + resourceGroup = v + } + volumeID := fmt.Sprintf(volumeIDTemplate, resourceGroup, accountName, azureSource.ShareName, "") var ( // refer to https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/master/docs/driver-parameters.md @@ -155,6 +161,7 @@ func (t *azureFileCSITranslator) TranslateCSIPVToInTree(pv *v1.PersistentVolume) ReadOnly: csiSource.ReadOnly, } + resourceGroup := "" if csiSource.NodeStageSecretRef != nil && csiSource.NodeStageSecretRef.Name != "" { azureSource.SecretName = csiSource.NodeStageSecretRef.Name azureSource.SecretNamespace = &csiSource.NodeStageSecretRef.Namespace @@ -164,16 +171,20 @@ func (t *azureFileCSITranslator) TranslateCSIPVToInTree(pv *v1.PersistentVolume) } } } else { - _, storageAccount, fileShareName, _, err := getFileShareInfo(csiSource.VolumeHandle) + rg, storageAccount, fileShareName, _, err := getFileShareInfo(csiSource.VolumeHandle) if err != nil { return nil, err } azureSource.ShareName = fileShareName azureSource.SecretName = fmt.Sprintf(secretNameTemplate, storageAccount) + resourceGroup = rg } pv.Spec.CSI = nil pv.Spec.AzureFile = azureSource + if resourceGroup != "" { + pv.ObjectMeta.Annotations[resourceGroupAnnotation] = resourceGroup + } return pv, nil } diff --git a/vendor/k8s.io/csi-translation-lib/plugins/vsphere_volume.go b/vendor/k8s.io/csi-translation-lib/plugins/vsphere_volume.go new file mode 100644 index 00000000000..531aff0d983 --- /dev/null +++ b/vendor/k8s.io/csi-translation-lib/plugins/vsphere_volume.go @@ -0,0 +1,208 @@ +/* +Copyright 2020 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 plugins + +import ( + "fmt" + "strings" + + v1 "k8s.io/api/core/v1" + storage "k8s.io/api/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/klog/v2" +) + +const ( + // VSphereDriverName is the name of the CSI driver for vSphere Volume + VSphereDriverName = "csi.vsphere.vmware.com" + // VSphereInTreePluginName is the name of the in-tree plugin for vSphere Volume + VSphereInTreePluginName = "kubernetes.io/vsphere-volume" + + // paramStoragePolicyName used to supply SPBM Policy name for Volume provisioning + paramStoragePolicyName = "storagepolicyname" + + // This param is used to tell Driver to return volumePath and not VolumeID + // in-tree vSphere plugin does not understand volume id, it uses volumePath + paramcsiMigration = "csimigration" + + // This param is used to supply datastore name for Volume provisioning + paramDatastore = "datastore-migrationparam" + + // This param supplies disk foramt (thin, thick, zeoredthick) for Volume provisioning + paramDiskFormat = "diskformat-migrationparam" + + // vSAN Policy Parameters + paramHostFailuresToTolerate = "hostfailurestotolerate-migrationparam" + paramForceProvisioning = "forceprovisioning-migrationparam" + paramCacheReservation = "cachereservation-migrationparam" + paramDiskstripes = "diskstripes-migrationparam" + paramObjectspacereservation = "objectspacereservation-migrationparam" + paramIopslimit = "iopslimit-migrationparam" + + // AttributeInitialVolumeFilepath represents the path of volume where volume is created + AttributeInitialVolumeFilepath = "initialvolumefilepath" +) + +var _ InTreePlugin = &vSphereCSITranslator{} + +// vSphereCSITranslator handles translation of PV spec from In-tree vSphere Volume to vSphere CSI +type vSphereCSITranslator struct{} + +// NewvSphereCSITranslator returns a new instance of vSphereCSITranslator +func NewvSphereCSITranslator() InTreePlugin { + return &vSphereCSITranslator{} +} + +// TranslateInTreeStorageClassToCSI translates InTree vSphere storage class parameters to CSI storage class +func (t *vSphereCSITranslator) TranslateInTreeStorageClassToCSI(sc *storage.StorageClass) (*storage.StorageClass, error) { + if sc == nil { + return nil, fmt.Errorf("sc is nil") + } + var params = map[string]string{} + for k, v := range sc.Parameters { + switch strings.ToLower(k) { + case fsTypeKey: + params[csiFsTypeKey] = v + case paramStoragePolicyName: + params[paramStoragePolicyName] = v + case "datastore": + params[paramDatastore] = v + case "diskformat": + params[paramDiskFormat] = v + case "hostfailurestotolerate": + params[paramHostFailuresToTolerate] = v + case "forceprovisioning": + params[paramForceProvisioning] = v + case "cachereservation": + params[paramCacheReservation] = v + case "diskstripes": + params[paramDiskstripes] = v + case "objectspacereservation": + params[paramObjectspacereservation] = v + case "iopslimit": + params[paramIopslimit] = v + default: + klog.V(2).Infof("StorageClass parameter [name:%q, value:%q] is not supported", k, v) + } + } + + // This helps vSphere CSI driver to identify in-tree provisioner request vs CSI provisioner request + // When this is true, Driver returns initialvolumefilepath in the VolumeContext, which is + // used in TranslateCSIPVToInTree + params[paramcsiMigration] = "true" + // Note: sc.AllowedTopologies for Topology based volume provisioning will be supplied as it is. + sc.Parameters = params + return sc, nil +} + +// TranslateInTreeInlineVolumeToCSI takes a Volume with VsphereVolume set from in-tree +// and converts the VsphereVolume source to a CSIPersistentVolumeSource +func (t *vSphereCSITranslator) TranslateInTreeInlineVolumeToCSI(volume *v1.Volume) (*v1.PersistentVolume, error) { + if volume == nil || volume.VsphereVolume == nil { + return nil, fmt.Errorf("volume is nil or VsphereVolume not defined on volume") + } + pv := &v1.PersistentVolume{ + ObjectMeta: metav1.ObjectMeta{ + // Must be unique per disk as it is used as the unique part of the + // staging path + Name: fmt.Sprintf("%s-%s", VSphereDriverName, volume.VsphereVolume.VolumePath), + }, + Spec: v1.PersistentVolumeSpec{ + PersistentVolumeSource: v1.PersistentVolumeSource{ + CSI: &v1.CSIPersistentVolumeSource{ + Driver: VSphereDriverName, + VolumeHandle: volume.VsphereVolume.VolumePath, + FSType: volume.VsphereVolume.FSType, + VolumeAttributes: make(map[string]string), + }, + }, + AccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce}, + }, + } + if volume.VsphereVolume.StoragePolicyName != "" { + pv.Spec.CSI.VolumeAttributes[paramStoragePolicyName] = pv.Spec.VsphereVolume.StoragePolicyName + } + return pv, nil +} + +// TranslateInTreePVToCSI takes a PV with VsphereVolume set from in-tree +// and converts the VsphereVolume source to a CSIPersistentVolumeSource +func (t *vSphereCSITranslator) TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error) { + if pv == nil || pv.Spec.VsphereVolume == nil { + return nil, fmt.Errorf("pv is nil or VsphereVolume not defined on pv") + } + csiSource := &v1.CSIPersistentVolumeSource{ + Driver: VSphereDriverName, + VolumeHandle: pv.Spec.VsphereVolume.VolumePath, + FSType: pv.Spec.VsphereVolume.FSType, + VolumeAttributes: make(map[string]string), + } + if pv.Spec.VsphereVolume.StoragePolicyName != "" { + csiSource.VolumeAttributes[paramStoragePolicyName] = pv.Spec.VsphereVolume.StoragePolicyName + } + pv.Spec.VsphereVolume = nil + pv.Spec.CSI = csiSource + return pv, nil +} + +// TranslateCSIPVToInTree takes a PV with CSIPersistentVolumeSource set and +// translates the vSphere CSI source to a vSphereVolume source. +func (t *vSphereCSITranslator) TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.PersistentVolume, error) { + if pv == nil || pv.Spec.CSI == nil { + return nil, fmt.Errorf("pv is nil or CSI source not defined on pv") + } + csiSource := pv.Spec.CSI + vsphereVirtualDiskVolumeSource := &v1.VsphereVirtualDiskVolumeSource{ + FSType: csiSource.FSType, + } + volumeFilePath, ok := csiSource.VolumeAttributes[AttributeInitialVolumeFilepath] + if ok { + vsphereVirtualDiskVolumeSource.VolumePath = volumeFilePath + } + pv.Spec.CSI = nil + pv.Spec.VsphereVolume = vsphereVirtualDiskVolumeSource + return pv, nil +} + +// CanSupport tests whether the plugin supports a given persistent volume +// specification from the API. +func (t *vSphereCSITranslator) CanSupport(pv *v1.PersistentVolume) bool { + return pv != nil && pv.Spec.VsphereVolume != nil +} + +// CanSupportInline tests whether the plugin supports a given inline volume +// specification from the API. +func (t *vSphereCSITranslator) CanSupportInline(volume *v1.Volume) bool { + return volume != nil && volume.VsphereVolume != nil +} + +// GetInTreePluginName returns the name of the in-tree plugin driver +func (t *vSphereCSITranslator) GetInTreePluginName() string { + return VSphereInTreePluginName +} + +// GetCSIPluginName returns the name of the CSI plugin +func (t *vSphereCSITranslator) GetCSIPluginName() string { + return VSphereDriverName +} + +// RepairVolumeHandle is needed in VerifyVolumesAttached on the external attacher when we need to do strict volume +// handle matching to check VolumeAttachment attached status. +// vSphere volume does not need patch to help verify whether that volume is attached. +func (t *vSphereCSITranslator) RepairVolumeHandle(volumeHandle, nodeID string) (string, error) { + return volumeHandle, nil +} diff --git a/vendor/k8s.io/csi-translation-lib/translate.go b/vendor/k8s.io/csi-translation-lib/translate.go index 668bc872af6..21f5c49d59a 100644 --- a/vendor/k8s.io/csi-translation-lib/translate.go +++ b/vendor/k8s.io/csi-translation-lib/translate.go @@ -32,6 +32,7 @@ var ( plugins.CinderDriverName: plugins.NewOpenStackCinderCSITranslator(), plugins.AzureDiskDriverName: plugins.NewAzureDiskCSITranslator(), plugins.AzureFileDriverName: plugins.NewAzureFileCSITranslator(), + plugins.VSphereDriverName: plugins.NewvSphereCSITranslator(), } ) diff --git a/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go b/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go index 40f1306d5db..68b81d47ea4 100644 --- a/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go +++ b/vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go @@ -29,7 +29,7 @@ import ( "k8s.io/gengo/namer" "k8s.io/gengo/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // CustomArgs is used tby the go2idl framework to pass args specific to this diff --git a/vendor/k8s.io/gengo/generator/execute.go b/vendor/k8s.io/gengo/generator/execute.go index d1b12258c7e..e489fd3f0d5 100644 --- a/vendor/k8s.io/gengo/generator/execute.go +++ b/vendor/k8s.io/gengo/generator/execute.go @@ -29,7 +29,7 @@ import ( "k8s.io/gengo/namer" "k8s.io/gengo/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) func errs2strings(errors []error) []string { diff --git a/vendor/k8s.io/gengo/generator/import_tracker.go b/vendor/k8s.io/gengo/generator/import_tracker.go index 5d87de4ff00..60c899ac464 100644 --- a/vendor/k8s.io/gengo/generator/import_tracker.go +++ b/vendor/k8s.io/gengo/generator/import_tracker.go @@ -20,7 +20,7 @@ import ( "go/token" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/gengo/namer" "k8s.io/gengo/types" diff --git a/vendor/k8s.io/gengo/namer/plural_namer.go b/vendor/k8s.io/gengo/namer/plural_namer.go index a9a198a7027..0e3ebbf262a 100644 --- a/vendor/k8s.io/gengo/namer/plural_namer.go +++ b/vendor/k8s.io/gengo/namer/plural_namer.go @@ -22,7 +22,7 @@ import ( "k8s.io/gengo/types" ) -var consonants = "bcdfghjklmnpqrsttvwxyz" +var consonants = "bcdfghjklmnpqrstvwxyz" type pluralNamer struct { // key is the case-sensitive type name, value is the case-insensitive diff --git a/vendor/k8s.io/gengo/parser/parse.go b/vendor/k8s.io/gengo/parser/parse.go index 2bceaee478d..497f4615b42 100644 --- a/vendor/k8s.io/gengo/parser/parse.go +++ b/vendor/k8s.io/gengo/parser/parse.go @@ -28,11 +28,12 @@ import ( "os/exec" "path" "path/filepath" + "regexp" "sort" "strings" "k8s.io/gengo/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // This clarifies when a pkg path has been canonicalized. @@ -334,6 +335,12 @@ func (b *Builder) addDir(dir string, userRequested bool) error { return nil } +var regexErrPackageNotFound = regexp.MustCompile(`^unable to import ".*?": cannot find package ".*?" in any of:`) + +func isErrPackageNotFound(err error) bool { + return regexErrPackageNotFound.MatchString(err.Error()) +} + // importPackage is a function that will be called by the type check package when it // needs to import a go package. 'path' is the import path. func (b *Builder) importPackage(dir string, userRequested bool) (*tc.Package, error) { @@ -356,6 +363,11 @@ func (b *Builder) importPackage(dir string, userRequested bool) (*tc.Package, er // Add it. if err := b.addDir(dir, userRequested); err != nil { + if isErrPackageNotFound(err) { + klog.V(6).Info(err) + return nil, nil + } + return nil, err } @@ -577,7 +589,7 @@ func (b *Builder) importWithMode(dir string, mode build.ImportMode) (*build.Pack if err != nil { return nil, fmt.Errorf("unable to get current directory: %v", err) } - buildPkg, err := b.context.Import(dir, cwd, mode) + buildPkg, err := b.context.Import(filepath.ToSlash(dir), cwd, mode) if err != nil { return nil, err } @@ -750,7 +762,11 @@ func (b *Builder) walkType(u types.Universe, useName *types.Name, in tc.Type) *t if out.Methods == nil { out.Methods = map[string]*types.Type{} } - out.Methods[t.Method(i).Name()] = b.walkType(u, nil, t.Method(i).Type()) + method := t.Method(i) + name := tcNameToName(method.String()) + mt := b.walkType(u, &name, method.Type()) + mt.CommentLines = splitLines(b.priorCommentLines(method.Pos(), 1).Text()) + out.Methods[method.Name()] = mt } return out case *tc.Named: @@ -783,7 +799,8 @@ func (b *Builder) walkType(u types.Universe, useName *types.Name, in tc.Type) *t out.Methods = map[string]*types.Type{} } method := t.Method(i) - mt := b.walkType(u, nil, method.Type()) + name := tcNameToName(method.String()) + mt := b.walkType(u, &name, method.Type()) mt.CommentLines = splitLines(b.priorCommentLines(method.Pos(), 1).Text()) out.Methods[method.Name()] = mt } diff --git a/vendor/k8s.io/klog/v2/.gitignore b/vendor/k8s.io/klog/v2/.gitignore new file mode 100644 index 00000000000..0aa2002392c --- /dev/null +++ b/vendor/k8s.io/klog/v2/.gitignore @@ -0,0 +1,17 @@ +# OSX leaves these everywhere on SMB shares +._* + +# OSX trash +.DS_Store + +# Eclipse files +.classpath +.project +.settings/** + +# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA +.idea/ +*.iml + +# Vscode files +.vscode diff --git a/vendor/k8s.io/klog/v2/CONTRIBUTING.md b/vendor/k8s.io/klog/v2/CONTRIBUTING.md new file mode 100644 index 00000000000..2641b1f41b7 --- /dev/null +++ b/vendor/k8s.io/klog/v2/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing Guidelines + +Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://github.com/kubernetes/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: + +_As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._ + +## Getting Started + +We have full documentation on how to get started contributing here: + +- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests +- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing) +- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet) - Common resources for existing developers + +## Mentorship + +- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! + +## Contact Information + +- [Slack](https://kubernetes.slack.com/messages/sig-architecture) +- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-architecture) diff --git a/vendor/k8s.io/klog/v2/LICENSE b/vendor/k8s.io/klog/v2/LICENSE new file mode 100644 index 00000000000..37ec93a14fd --- /dev/null +++ b/vendor/k8s.io/klog/v2/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/k8s.io/klog/v2/OWNERS b/vendor/k8s.io/klog/v2/OWNERS new file mode 100644 index 00000000000..380e514f280 --- /dev/null +++ b/vendor/k8s.io/klog/v2/OWNERS @@ -0,0 +1,19 @@ +# See the OWNERS docs at https://go.k8s.io/owners +reviewers: + - jayunit100 + - hoegaarden + - andyxning + - neolit123 + - pohly + - yagonobre + - vincepri + - detiber +approvers: + - dims + - thockin + - justinsb + - tallclair + - piosz + - brancz + - DirectXMan12 + - lavalamp diff --git a/vendor/k8s.io/klog/v2/README.md b/vendor/k8s.io/klog/v2/README.md new file mode 100644 index 00000000000..2f9f6f0d82b --- /dev/null +++ b/vendor/k8s.io/klog/v2/README.md @@ -0,0 +1,99 @@ +klog +==== + +klog is a permanent fork of https://github.com/golang/glog. + +## Why was klog created? + +The decision to create klog was one that wasn't made lightly, but it was necessary due to some +drawbacks that are present in [glog](https://github.com/golang/glog). Ultimately, the fork was created due to glog not being under active development; this can be seen in the glog README: + +> The code in this repo [...] is not itself under development + +This makes us unable to solve many use cases without a fork. The factors that contributed to needing feature development are listed below: + + * `glog` [presents a lot "gotchas"](https://github.com/kubernetes/kubernetes/issues/61006) and introduces challenges in containerized environments, all of which aren't well documented. + * `glog` doesn't provide an easy way to test logs, which detracts from the stability of software using it + * A long term goal is to implement a logging interface that allows us to add context, change output format, etc. + +Historical context is available here: + + * https://github.com/kubernetes/kubernetes/issues/61006 + * https://github.com/kubernetes/kubernetes/issues/70264 + * https://groups.google.com/forum/#!msg/kubernetes-sig-architecture/wCWiWf3Juzs/hXRVBH90CgAJ + * https://groups.google.com/forum/#!msg/kubernetes-dev/7vnijOMhLS0/1oRiNtigBgAJ + +---- + +How to use klog +=============== +- Replace imports for `github.com/golang/glog` with `k8s.io/klog` +- Use `klog.InitFlags(nil)` explicitly for initializing global flags as we no longer use `init()` method to register the flags +- You can now use `log_file` instead of `log_dir` for logging to a single file (See `examples/log_file/usage_log_file.go`) +- If you want to redirect everything logged using klog somewhere else (say syslog!), you can use `klog.SetOutput()` method and supply a `io.Writer`. (See `examples/set_output/usage_set_output.go`) +- For more logging conventions (See [Logging Conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md)) + +**NOTE**: please use the newer go versions that support semantic import versioning in modules, ideally go 1.11.4 or greater. + +### Coexisting with glog +This package can be used side by side with glog. [This example](examples/coexist_glog/coexist_glog.go) shows how to initialize and synchronize flags from the global `flag.CommandLine` FlagSet. In addition, the example makes use of stderr as combined output by setting `alsologtostderr` (or `logtostderr`) to `true`. + +## Community, discussion, contribution, and support + +Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/). + +You can reach the maintainers of this project at: + +- [Slack](https://kubernetes.slack.com/messages/klog) +- [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-architecture) + +### Code of conduct + +Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). + +---- + +glog +==== + +Leveled execution logs for Go. + +This is an efficient pure Go implementation of leveled logs in the +manner of the open source C++ package + https://github.com/google/glog + +By binding methods to booleans it is possible to use the log package +without paying the expense of evaluating the arguments to the log. +Through the -vmodule flag, the package also provides fine-grained +control over logging at the file level. + +The comment from glog.go introduces the ideas: + + Package glog implements logging analogous to the Google-internal + C++ INFO/ERROR/V setup. It provides functions Info, Warning, + Error, Fatal, plus formatting variants such as Infof. It + also provides V-style logging controlled by the -v and + -vmodule=file=2 flags. + + Basic examples: + + glog.Info("Prepare to repel boarders") + + glog.Fatalf("Initialization failed: %s", err) + + See the documentation for the V function for an explanation + of these examples: + + if glog.V(2) { + glog.Info("Starting transaction...") + } + + glog.V(2).Infoln("Processed", nItems, "elements") + + +The repository contains an open source version of the log package +used inside Google. The master copy of the source lives inside +Google, not here. The code in this repo is for export only and is not itself +under development. Feature requests will be ignored. + +Send bug reports to golang-nuts@googlegroups.com. diff --git a/vendor/k8s.io/klog/v2/RELEASE.md b/vendor/k8s.io/klog/v2/RELEASE.md new file mode 100644 index 00000000000..b53eb960ce7 --- /dev/null +++ b/vendor/k8s.io/klog/v2/RELEASE.md @@ -0,0 +1,9 @@ +# Release Process + +The `klog` is released on an as-needed basis. The process is as follows: + +1. An issue is proposing a new release with a changelog since the last release +1. All [OWNERS](OWNERS) must LGTM this release +1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` +1. The release issue is closed +1. An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` diff --git a/vendor/k8s.io/klog/v2/SECURITY_CONTACTS b/vendor/k8s.io/klog/v2/SECURITY_CONTACTS new file mode 100644 index 00000000000..6128a586995 --- /dev/null +++ b/vendor/k8s.io/klog/v2/SECURITY_CONTACTS @@ -0,0 +1,20 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Committee to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +dims +thockin +justinsb +tallclair +piosz +brancz +DirectXMan12 +lavalamp diff --git a/vendor/k8s.io/klog/v2/code-of-conduct.md b/vendor/k8s.io/klog/v2/code-of-conduct.md new file mode 100644 index 00000000000..0d15c00cf32 --- /dev/null +++ b/vendor/k8s.io/klog/v2/code-of-conduct.md @@ -0,0 +1,3 @@ +# Kubernetes Community Code of Conduct + +Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) diff --git a/vendor/k8s.io/klog/v2/go.mod b/vendor/k8s.io/klog/v2/go.mod new file mode 100644 index 00000000000..e396e31c065 --- /dev/null +++ b/vendor/k8s.io/klog/v2/go.mod @@ -0,0 +1,5 @@ +module k8s.io/klog/v2 + +go 1.13 + +require github.com/go-logr/logr v0.2.0 diff --git a/vendor/k8s.io/klog/v2/go.sum b/vendor/k8s.io/klog/v2/go.sum new file mode 100644 index 00000000000..8dfa7854289 --- /dev/null +++ b/vendor/k8s.io/klog/v2/go.sum @@ -0,0 +1,2 @@ +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= diff --git a/vendor/k8s.io/klog/v2/klog.go b/vendor/k8s.io/klog/v2/klog.go new file mode 100644 index 00000000000..ae2b861382b --- /dev/null +++ b/vendor/k8s.io/klog/v2/klog.go @@ -0,0 +1,1525 @@ +// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// +// 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 klog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup. +// It provides functions Info, Warning, Error, Fatal, plus formatting variants such as +// Infof. It also provides V-style logging controlled by the -v and -vmodule=file=2 flags. +// +// Basic examples: +// +// klog.Info("Prepare to repel boarders") +// +// klog.Fatalf("Initialization failed: %s", err) +// +// See the documentation for the V function for an explanation of these examples: +// +// if klog.V(2) { +// klog.Info("Starting transaction...") +// } +// +// klog.V(2).Infoln("Processed", nItems, "elements") +// +// Log output is buffered and written periodically using Flush. Programs +// should call Flush before exiting to guarantee all log output is written. +// +// By default, all log statements write to standard error. +// This package provides several flags that modify this behavior. +// As a result, flag.Parse must be called before any logging is done. +// +// -logtostderr=true +// Logs are written to standard error instead of to files. +// -alsologtostderr=false +// Logs are written to standard error as well as to files. +// -stderrthreshold=ERROR +// Log events at or above this severity are logged to standard +// error as well as to files. +// -log_dir="" +// Log files will be written to this directory instead of the +// default temporary directory. +// +// Other flags provide aids to debugging. +// +// -log_backtrace_at="" +// When set to a file and line number holding a logging statement, +// such as +// -log_backtrace_at=gopherflakes.go:234 +// a stack trace will be written to the Info log whenever execution +// hits that statement. (Unlike with -vmodule, the ".go" must be +// present.) +// -v=0 +// Enable V-leveled logging at the specified level. +// -vmodule="" +// The syntax of the argument is a comma-separated list of pattern=N, +// where pattern is a literal file name (minus the ".go" suffix) or +// "glob" pattern and N is a V level. For instance, +// -vmodule=gopher*=3 +// sets the V level to 3 in all Go files whose names begin "gopher". +// +package klog + +import ( + "bufio" + "bytes" + "errors" + "flag" + "fmt" + "io" + stdLog "log" + "math" + "os" + "path/filepath" + "runtime" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" + + "github.com/go-logr/logr" +) + +// severity identifies the sort of log: info, warning etc. It also implements +// the flag.Value interface. The -stderrthreshold flag is of type severity and +// should be modified only through the flag.Value interface. The values match +// the corresponding constants in C++. +type severity int32 // sync/atomic int32 + +// These constants identify the log levels in order of increasing severity. +// A message written to a high-severity log file is also written to each +// lower-severity log file. +const ( + infoLog severity = iota + warningLog + errorLog + fatalLog + numSeverity = 4 +) + +const severityChar = "IWEF" + +var severityName = []string{ + infoLog: "INFO", + warningLog: "WARNING", + errorLog: "ERROR", + fatalLog: "FATAL", +} + +// get returns the value of the severity. +func (s *severity) get() severity { + return severity(atomic.LoadInt32((*int32)(s))) +} + +// set sets the value of the severity. +func (s *severity) set(val severity) { + atomic.StoreInt32((*int32)(s), int32(val)) +} + +// String is part of the flag.Value interface. +func (s *severity) String() string { + return strconv.FormatInt(int64(*s), 10) +} + +// Get is part of the flag.Getter interface. +func (s *severity) Get() interface{} { + return *s +} + +// Set is part of the flag.Value interface. +func (s *severity) Set(value string) error { + var threshold severity + // Is it a known name? + if v, ok := severityByName(value); ok { + threshold = v + } else { + v, err := strconv.ParseInt(value, 10, 32) + if err != nil { + return err + } + threshold = severity(v) + } + logging.stderrThreshold.set(threshold) + return nil +} + +func severityByName(s string) (severity, bool) { + s = strings.ToUpper(s) + for i, name := range severityName { + if name == s { + return severity(i), true + } + } + return 0, false +} + +// OutputStats tracks the number of output lines and bytes written. +type OutputStats struct { + lines int64 + bytes int64 +} + +// Lines returns the number of lines written. +func (s *OutputStats) Lines() int64 { + return atomic.LoadInt64(&s.lines) +} + +// Bytes returns the number of bytes written. +func (s *OutputStats) Bytes() int64 { + return atomic.LoadInt64(&s.bytes) +} + +// Stats tracks the number of lines of output and number of bytes +// per severity level. Values must be read with atomic.LoadInt64. +var Stats struct { + Info, Warning, Error OutputStats +} + +var severityStats = [numSeverity]*OutputStats{ + infoLog: &Stats.Info, + warningLog: &Stats.Warning, + errorLog: &Stats.Error, +} + +// Level is exported because it appears in the arguments to V and is +// the type of the v flag, which can be set programmatically. +// It's a distinct type because we want to discriminate it from logType. +// Variables of type level are only changed under logging.mu. +// The -v flag is read only with atomic ops, so the state of the logging +// module is consistent. + +// Level is treated as a sync/atomic int32. + +// Level specifies a level of verbosity for V logs. *Level implements +// flag.Value; the -v flag is of type Level and should be modified +// only through the flag.Value interface. +type Level int32 + +// get returns the value of the Level. +func (l *Level) get() Level { + return Level(atomic.LoadInt32((*int32)(l))) +} + +// set sets the value of the Level. +func (l *Level) set(val Level) { + atomic.StoreInt32((*int32)(l), int32(val)) +} + +// String is part of the flag.Value interface. +func (l *Level) String() string { + return strconv.FormatInt(int64(*l), 10) +} + +// Get is part of the flag.Getter interface. +func (l *Level) Get() interface{} { + return *l +} + +// Set is part of the flag.Value interface. +func (l *Level) Set(value string) error { + v, err := strconv.ParseInt(value, 10, 32) + if err != nil { + return err + } + logging.mu.Lock() + defer logging.mu.Unlock() + logging.setVState(Level(v), logging.vmodule.filter, false) + return nil +} + +// moduleSpec represents the setting of the -vmodule flag. +type moduleSpec struct { + filter []modulePat +} + +// modulePat contains a filter for the -vmodule flag. +// It holds a verbosity level and a file pattern to match. +type modulePat struct { + pattern string + literal bool // The pattern is a literal string + level Level +} + +// match reports whether the file matches the pattern. It uses a string +// comparison if the pattern contains no metacharacters. +func (m *modulePat) match(file string) bool { + if m.literal { + return file == m.pattern + } + match, _ := filepath.Match(m.pattern, file) + return match +} + +func (m *moduleSpec) String() string { + // Lock because the type is not atomic. TODO: clean this up. + logging.mu.Lock() + defer logging.mu.Unlock() + var b bytes.Buffer + for i, f := range m.filter { + if i > 0 { + b.WriteRune(',') + } + fmt.Fprintf(&b, "%s=%d", f.pattern, f.level) + } + return b.String() +} + +// Get is part of the (Go 1.2) flag.Getter interface. It always returns nil for this flag type since the +// struct is not exported. +func (m *moduleSpec) Get() interface{} { + return nil +} + +var errVmoduleSyntax = errors.New("syntax error: expect comma-separated list of filename=N") + +// Syntax: -vmodule=recordio=2,file=1,gfs*=3 +func (m *moduleSpec) Set(value string) error { + var filter []modulePat + for _, pat := range strings.Split(value, ",") { + if len(pat) == 0 { + // Empty strings such as from a trailing comma can be ignored. + continue + } + patLev := strings.Split(pat, "=") + if len(patLev) != 2 || len(patLev[0]) == 0 || len(patLev[1]) == 0 { + return errVmoduleSyntax + } + pattern := patLev[0] + v, err := strconv.ParseInt(patLev[1], 10, 32) + if err != nil { + return errors.New("syntax error: expect comma-separated list of filename=N") + } + if v < 0 { + return errors.New("negative value for vmodule level") + } + if v == 0 { + continue // Ignore. It's harmless but no point in paying the overhead. + } + // TODO: check syntax of filter? + filter = append(filter, modulePat{pattern, isLiteral(pattern), Level(v)}) + } + logging.mu.Lock() + defer logging.mu.Unlock() + logging.setVState(logging.verbosity, filter, true) + return nil +} + +// isLiteral reports whether the pattern is a literal string, that is, has no metacharacters +// that require filepath.Match to be called to match the pattern. +func isLiteral(pattern string) bool { + return !strings.ContainsAny(pattern, `\*?[]`) +} + +// traceLocation represents the setting of the -log_backtrace_at flag. +type traceLocation struct { + file string + line int +} + +// isSet reports whether the trace location has been specified. +// logging.mu is held. +func (t *traceLocation) isSet() bool { + return t.line > 0 +} + +// match reports whether the specified file and line matches the trace location. +// The argument file name is the full path, not the basename specified in the flag. +// logging.mu is held. +func (t *traceLocation) match(file string, line int) bool { + if t.line != line { + return false + } + if i := strings.LastIndex(file, "/"); i >= 0 { + file = file[i+1:] + } + return t.file == file +} + +func (t *traceLocation) String() string { + // Lock because the type is not atomic. TODO: clean this up. + logging.mu.Lock() + defer logging.mu.Unlock() + return fmt.Sprintf("%s:%d", t.file, t.line) +} + +// Get is part of the (Go 1.2) flag.Getter interface. It always returns nil for this flag type since the +// struct is not exported +func (t *traceLocation) Get() interface{} { + return nil +} + +var errTraceSyntax = errors.New("syntax error: expect file.go:234") + +// Syntax: -log_backtrace_at=gopherflakes.go:234 +// Note that unlike vmodule the file extension is included here. +func (t *traceLocation) Set(value string) error { + if value == "" { + // Unset. + logging.mu.Lock() + defer logging.mu.Unlock() + t.line = 0 + t.file = "" + return nil + } + fields := strings.Split(value, ":") + if len(fields) != 2 { + return errTraceSyntax + } + file, line := fields[0], fields[1] + if !strings.Contains(file, ".") { + return errTraceSyntax + } + v, err := strconv.Atoi(line) + if err != nil { + return errTraceSyntax + } + if v <= 0 { + return errors.New("negative or zero value for level") + } + logging.mu.Lock() + defer logging.mu.Unlock() + t.line = v + t.file = file + return nil +} + +// flushSyncWriter is the interface satisfied by logging destinations. +type flushSyncWriter interface { + Flush() error + Sync() error + io.Writer +} + +// init sets up the defaults and runs flushDaemon. +func init() { + logging.stderrThreshold = errorLog // Default stderrThreshold is ERROR. + logging.setVState(0, nil, false) + logging.logDir = "" + logging.logFile = "" + logging.logFileMaxSizeMB = 1800 + logging.toStderr = true + logging.alsoToStderr = false + logging.skipHeaders = false + logging.addDirHeader = false + logging.skipLogHeaders = false + go logging.flushDaemon() +} + +// InitFlags is for explicitly initializing the flags. +func InitFlags(flagset *flag.FlagSet) { + if flagset == nil { + flagset = flag.CommandLine + } + + flagset.StringVar(&logging.logDir, "log_dir", logging.logDir, "If non-empty, write log files in this directory") + flagset.StringVar(&logging.logFile, "log_file", logging.logFile, "If non-empty, use this log file") + flagset.Uint64Var(&logging.logFileMaxSizeMB, "log_file_max_size", logging.logFileMaxSizeMB, + "Defines the maximum size a log file can grow to. Unit is megabytes. "+ + "If the value is 0, the maximum file size is unlimited.") + flagset.BoolVar(&logging.toStderr, "logtostderr", logging.toStderr, "log to standard error instead of files") + flagset.BoolVar(&logging.alsoToStderr, "alsologtostderr", logging.alsoToStderr, "log to standard error as well as files") + flagset.Var(&logging.verbosity, "v", "number for the log level verbosity") + flagset.BoolVar(&logging.addDirHeader, "add_dir_header", logging.addDirHeader, "If true, adds the file directory to the header of the log messages") + flagset.BoolVar(&logging.skipHeaders, "skip_headers", logging.skipHeaders, "If true, avoid header prefixes in the log messages") + flagset.BoolVar(&logging.skipLogHeaders, "skip_log_headers", logging.skipLogHeaders, "If true, avoid headers when opening log files") + flagset.Var(&logging.stderrThreshold, "stderrthreshold", "logs at or above this threshold go to stderr") + flagset.Var(&logging.vmodule, "vmodule", "comma-separated list of pattern=N settings for file-filtered logging") + flagset.Var(&logging.traceLocation, "log_backtrace_at", "when logging hits line file:N, emit a stack trace") +} + +// Flush flushes all pending log I/O. +func Flush() { + logging.lockAndFlushAll() +} + +// loggingT collects all the global state of the logging setup. +type loggingT struct { + // Boolean flags. Not handled atomically because the flag.Value interface + // does not let us avoid the =true, and that shorthand is necessary for + // compatibility. TODO: does this matter enough to fix? Seems unlikely. + toStderr bool // The -logtostderr flag. + alsoToStderr bool // The -alsologtostderr flag. + + // Level flag. Handled atomically. + stderrThreshold severity // The -stderrthreshold flag. + + // freeList is a list of byte buffers, maintained under freeListMu. + freeList *buffer + // freeListMu maintains the free list. It is separate from the main mutex + // so buffers can be grabbed and printed to without holding the main lock, + // for better parallelization. + freeListMu sync.Mutex + + // mu protects the remaining elements of this structure and is + // used to synchronize logging. + mu sync.Mutex + // file holds writer for each of the log types. + file [numSeverity]flushSyncWriter + // pcs is used in V to avoid an allocation when computing the caller's PC. + pcs [1]uintptr + // vmap is a cache of the V Level for each V() call site, identified by PC. + // It is wiped whenever the vmodule flag changes state. + vmap map[uintptr]Level + // filterLength stores the length of the vmodule filter chain. If greater + // than zero, it means vmodule is enabled. It may be read safely + // using sync.LoadInt32, but is only modified under mu. + filterLength int32 + // traceLocation is the state of the -log_backtrace_at flag. + traceLocation traceLocation + // These flags are modified only under lock, although verbosity may be fetched + // safely using atomic.LoadInt32. + vmodule moduleSpec // The state of the -vmodule flag. + verbosity Level // V logging level, the value of the -v flag/ + + // If non-empty, overrides the choice of directory in which to write logs. + // See createLogDirs for the full list of possible destinations. + logDir string + + // If non-empty, specifies the path of the file to write logs. mutually exclusive + // with the log_dir option. + logFile string + + // When logFile is specified, this limiter makes sure the logFile won't exceeds a certain size. When exceeds, the + // logFile will be cleaned up. If this value is 0, no size limitation will be applied to logFile. + logFileMaxSizeMB uint64 + + // If true, do not add the prefix headers, useful when used with SetOutput + skipHeaders bool + + // If true, do not add the headers to log files + skipLogHeaders bool + + // If true, add the file directory to the header + addDirHeader bool + + // If set, all output will be redirected unconditionally to the provided logr.Logger + logr logr.Logger +} + +// buffer holds a byte Buffer for reuse. The zero value is ready for use. +type buffer struct { + bytes.Buffer + tmp [64]byte // temporary byte array for creating headers. + next *buffer +} + +var logging loggingT + +// setVState sets a consistent state for V logging. +// l.mu is held. +func (l *loggingT) setVState(verbosity Level, filter []modulePat, setFilter bool) { + // Turn verbosity off so V will not fire while we are in transition. + l.verbosity.set(0) + // Ditto for filter length. + atomic.StoreInt32(&l.filterLength, 0) + + // Set the new filters and wipe the pc->Level map if the filter has changed. + if setFilter { + l.vmodule.filter = filter + l.vmap = make(map[uintptr]Level) + } + + // Things are consistent now, so enable filtering and verbosity. + // They are enabled in order opposite to that in V. + atomic.StoreInt32(&l.filterLength, int32(len(filter))) + l.verbosity.set(verbosity) +} + +// getBuffer returns a new, ready-to-use buffer. +func (l *loggingT) getBuffer() *buffer { + l.freeListMu.Lock() + b := l.freeList + if b != nil { + l.freeList = b.next + } + l.freeListMu.Unlock() + if b == nil { + b = new(buffer) + } else { + b.next = nil + b.Reset() + } + return b +} + +// putBuffer returns a buffer to the free list. +func (l *loggingT) putBuffer(b *buffer) { + if b.Len() >= 256 { + // Let big buffers die a natural death. + return + } + l.freeListMu.Lock() + b.next = l.freeList + l.freeList = b + l.freeListMu.Unlock() +} + +var timeNow = time.Now // Stubbed out for testing. + +/* +header formats a log header as defined by the C++ implementation. +It returns a buffer containing the formatted header and the user's file and line number. +The depth specifies how many stack frames above lives the source line to be identified in the log message. + +Log lines have this form: + Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg... +where the fields are defined as follows: + L A single character, representing the log level (eg 'I' for INFO) + mm The month (zero padded; ie May is '05') + dd The day (zero padded) + hh:mm:ss.uuuuuu Time in hours, minutes and fractional seconds + threadid The space-padded thread ID as returned by GetTID() + file The file name + line The line number + msg The user-supplied message +*/ +func (l *loggingT) header(s severity, depth int) (*buffer, string, int) { + _, file, line, ok := runtime.Caller(3 + depth) + if !ok { + file = "???" + line = 1 + } else { + if slash := strings.LastIndex(file, "/"); slash >= 0 { + path := file + file = path[slash+1:] + if l.addDirHeader { + if dirsep := strings.LastIndex(path[:slash], "/"); dirsep >= 0 { + file = path[dirsep+1:] + } + } + } + } + return l.formatHeader(s, file, line), file, line +} + +// formatHeader formats a log header using the provided file name and line number. +func (l *loggingT) formatHeader(s severity, file string, line int) *buffer { + now := timeNow() + if line < 0 { + line = 0 // not a real line number, but acceptable to someDigits + } + if s > fatalLog { + s = infoLog // for safety. + } + buf := l.getBuffer() + if l.skipHeaders { + return buf + } + + // Avoid Fprintf, for speed. The format is so simple that we can do it quickly by hand. + // It's worth about 3X. Fprintf is hard. + _, month, day := now.Date() + hour, minute, second := now.Clock() + // Lmmdd hh:mm:ss.uuuuuu threadid file:line] + buf.tmp[0] = severityChar[s] + buf.twoDigits(1, int(month)) + buf.twoDigits(3, day) + buf.tmp[5] = ' ' + buf.twoDigits(6, hour) + buf.tmp[8] = ':' + buf.twoDigits(9, minute) + buf.tmp[11] = ':' + buf.twoDigits(12, second) + buf.tmp[14] = '.' + buf.nDigits(6, 15, now.Nanosecond()/1000, '0') + buf.tmp[21] = ' ' + buf.nDigits(7, 22, pid, ' ') // TODO: should be TID + buf.tmp[29] = ' ' + buf.Write(buf.tmp[:30]) + buf.WriteString(file) + buf.tmp[0] = ':' + n := buf.someDigits(1, line) + buf.tmp[n+1] = ']' + buf.tmp[n+2] = ' ' + buf.Write(buf.tmp[:n+3]) + return buf +} + +// Some custom tiny helper functions to print the log header efficiently. + +const digits = "0123456789" + +// twoDigits formats a zero-prefixed two-digit integer at buf.tmp[i]. +func (buf *buffer) twoDigits(i, d int) { + buf.tmp[i+1] = digits[d%10] + d /= 10 + buf.tmp[i] = digits[d%10] +} + +// nDigits formats an n-digit integer at buf.tmp[i], +// padding with pad on the left. +// It assumes d >= 0. +func (buf *buffer) nDigits(n, i, d int, pad byte) { + j := n - 1 + for ; j >= 0 && d > 0; j-- { + buf.tmp[i+j] = digits[d%10] + d /= 10 + } + for ; j >= 0; j-- { + buf.tmp[i+j] = pad + } +} + +// someDigits formats a zero-prefixed variable-width integer at buf.tmp[i]. +func (buf *buffer) someDigits(i, d int) int { + // Print into the top, then copy down. We know there's space for at least + // a 10-digit number. + j := len(buf.tmp) + for { + j-- + buf.tmp[j] = digits[d%10] + d /= 10 + if d == 0 { + break + } + } + return copy(buf.tmp[i:], buf.tmp[j:]) +} + +func (l *loggingT) println(s severity, logr logr.Logger, args ...interface{}) { + buf, file, line := l.header(s, 0) + // if logr is set, we clear the generated header as we rely on the backing + // logr implementation to print headers + if logr != nil { + l.putBuffer(buf) + buf = l.getBuffer() + } + fmt.Fprintln(buf, args...) + l.output(s, logr, buf, file, line, false) +} + +func (l *loggingT) print(s severity, logr logr.Logger, args ...interface{}) { + l.printDepth(s, logr, 1, args...) +} + +func (l *loggingT) printDepth(s severity, logr logr.Logger, depth int, args ...interface{}) { + buf, file, line := l.header(s, depth) + // if logr is set, we clear the generated header as we rely on the backing + // logr implementation to print headers + if logr != nil { + l.putBuffer(buf) + buf = l.getBuffer() + } + fmt.Fprint(buf, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, logr, buf, file, line, false) +} + +func (l *loggingT) printf(s severity, logr logr.Logger, format string, args ...interface{}) { + buf, file, line := l.header(s, 0) + // if logr is set, we clear the generated header as we rely on the backing + // logr implementation to print headers + if logr != nil { + l.putBuffer(buf) + buf = l.getBuffer() + } + fmt.Fprintf(buf, format, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, logr, buf, file, line, false) +} + +// printWithFileLine behaves like print but uses the provided file and line number. If +// alsoLogToStderr is true, the log message always appears on standard error; it +// will also appear in the log file unless --logtostderr is set. +func (l *loggingT) printWithFileLine(s severity, logr logr.Logger, file string, line int, alsoToStderr bool, args ...interface{}) { + buf := l.formatHeader(s, file, line) + // if logr is set, we clear the generated header as we rely on the backing + // logr implementation to print headers + if logr != nil { + l.putBuffer(buf) + buf = l.getBuffer() + } + fmt.Fprint(buf, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, logr, buf, file, line, alsoToStderr) +} + +// if loggr is specified, will call loggr.Error, otherwise output with logging module. +func (l *loggingT) errorS(err error, loggr logr.Logger, msg string, keysAndValues ...interface{}) { + if loggr != nil { + loggr.Error(err, msg, keysAndValues) + return + } + l.printS(err, msg, keysAndValues...) +} + +// if loggr is specified, will call loggr.Info, otherwise output with logging module. +func (l *loggingT) infoS(loggr logr.Logger, msg string, keysAndValues ...interface{}) { + if loggr != nil { + loggr.Info(msg, keysAndValues) + return + } + l.printS(nil, msg, keysAndValues...) +} + +// printS is called from infoS and errorS if loggr is not specified. +// if err arguments is specified, will output to errorLog severity +func (l *loggingT) printS(err error, msg string, keysAndValues ...interface{}) { + b := &bytes.Buffer{} + b.WriteString(fmt.Sprintf("%q", msg)) + if err != nil { + b.WriteByte(' ') + b.WriteString(fmt.Sprintf("err=%q", err.Error())) + } + kvListFormat(b, keysAndValues...) + var s severity + if err == nil { + s = infoLog + } else { + s = errorLog + } + l.printDepth(s, logging.logr, 2, b) +} + +const missingValue = "(MISSING)" + +func kvListFormat(b *bytes.Buffer, keysAndValues ...interface{}) { + for i := 0; i < len(keysAndValues); i += 2 { + var v interface{} + k := keysAndValues[i] + if i+1 < len(keysAndValues) { + v = keysAndValues[i+1] + } else { + v = missingValue + } + b.WriteByte(' ') + + switch v.(type) { + case string, error: + b.WriteString(fmt.Sprintf("%s=%q", k, v)) + default: + if _, ok := v.(fmt.Stringer); ok { + b.WriteString(fmt.Sprintf("%s=%q", k, v)) + } else { + b.WriteString(fmt.Sprintf("%s=%+v", k, v)) + } + } + } +} + +// redirectBuffer is used to set an alternate destination for the logs +type redirectBuffer struct { + w io.Writer +} + +func (rb *redirectBuffer) Sync() error { + return nil +} + +func (rb *redirectBuffer) Flush() error { + return nil +} + +func (rb *redirectBuffer) Write(bytes []byte) (n int, err error) { + return rb.w.Write(bytes) +} + +// SetLogger will set the backing logr implementation for klog. +// If set, all log lines will be suppressed from the regular Output, and +// redirected to the logr implementation. +// All log lines include the 'severity', 'file' and 'line' values attached as +// structured logging values. +// Use as: +// ... +// klog.SetLogger(zapr.NewLogger(zapLog)) +func SetLogger(logr logr.Logger) { + logging.logr = logr +} + +// SetOutput sets the output destination for all severities +func SetOutput(w io.Writer) { + logging.mu.Lock() + defer logging.mu.Unlock() + for s := fatalLog; s >= infoLog; s-- { + rb := &redirectBuffer{ + w: w, + } + logging.file[s] = rb + } +} + +// SetOutputBySeverity sets the output destination for specific severity +func SetOutputBySeverity(name string, w io.Writer) { + logging.mu.Lock() + defer logging.mu.Unlock() + sev, ok := severityByName(name) + if !ok { + panic(fmt.Sprintf("SetOutputBySeverity(%q): unrecognized severity name", name)) + } + rb := &redirectBuffer{ + w: w, + } + logging.file[sev] = rb +} + +// LogToStderr sets whether to log exclusively to stderr, bypassing outputs +func LogToStderr(stderr bool) { + logging.mu.Lock() + defer logging.mu.Unlock() + + logging.toStderr = stderr +} + +// output writes the data to the log files and releases the buffer. +func (l *loggingT) output(s severity, log logr.Logger, buf *buffer, file string, line int, alsoToStderr bool) { + l.mu.Lock() + if l.traceLocation.isSet() { + if l.traceLocation.match(file, line) { + buf.Write(stacks(false)) + } + } + data := buf.Bytes() + if log != nil { + // TODO: set 'severity' and caller information as structured log info + // keysAndValues := []interface{}{"severity", severityName[s], "file", file, "line", line} + if s == errorLog { + l.logr.Error(nil, string(data)) + } else { + log.Info(string(data)) + } + } else if l.toStderr { + os.Stderr.Write(data) + } else { + if alsoToStderr || l.alsoToStderr || s >= l.stderrThreshold.get() { + os.Stderr.Write(data) + } + + if logging.logFile != "" { + // Since we are using a single log file, all of the items in l.file array + // will point to the same file, so just use one of them to write data. + if l.file[infoLog] == nil { + if err := l.createFiles(infoLog); err != nil { + os.Stderr.Write(data) // Make sure the message appears somewhere. + l.exit(err) + } + } + l.file[infoLog].Write(data) + } else { + if l.file[s] == nil { + if err := l.createFiles(s); err != nil { + os.Stderr.Write(data) // Make sure the message appears somewhere. + l.exit(err) + } + } + + switch s { + case fatalLog: + l.file[fatalLog].Write(data) + fallthrough + case errorLog: + l.file[errorLog].Write(data) + fallthrough + case warningLog: + l.file[warningLog].Write(data) + fallthrough + case infoLog: + l.file[infoLog].Write(data) + } + } + } + if s == fatalLog { + // If we got here via Exit rather than Fatal, print no stacks. + if atomic.LoadUint32(&fatalNoStacks) > 0 { + l.mu.Unlock() + timeoutFlush(10 * time.Second) + os.Exit(1) + } + // Dump all goroutine stacks before exiting. + trace := stacks(true) + // Write the stack trace for all goroutines to the stderr. + if l.toStderr || l.alsoToStderr || s >= l.stderrThreshold.get() || alsoToStderr { + os.Stderr.Write(trace) + } + // Write the stack trace for all goroutines to the files. + logExitFunc = func(error) {} // If we get a write error, we'll still exit below. + for log := fatalLog; log >= infoLog; log-- { + if f := l.file[log]; f != nil { // Can be nil if -logtostderr is set. + f.Write(trace) + } + } + l.mu.Unlock() + timeoutFlush(10 * time.Second) + os.Exit(255) // C++ uses -1, which is silly because it's anded with 255 anyway. + } + l.putBuffer(buf) + l.mu.Unlock() + if stats := severityStats[s]; stats != nil { + atomic.AddInt64(&stats.lines, 1) + atomic.AddInt64(&stats.bytes, int64(len(data))) + } +} + +// timeoutFlush calls Flush and returns when it completes or after timeout +// elapses, whichever happens first. This is needed because the hooks invoked +// by Flush may deadlock when klog.Fatal is called from a hook that holds +// a lock. +func timeoutFlush(timeout time.Duration) { + done := make(chan bool, 1) + go func() { + Flush() // calls logging.lockAndFlushAll() + done <- true + }() + select { + case <-done: + case <-time.After(timeout): + fmt.Fprintln(os.Stderr, "klog: Flush took longer than", timeout) + } +} + +// stacks is a wrapper for runtime.Stack that attempts to recover the data for all goroutines. +func stacks(all bool) []byte { + // We don't know how big the traces are, so grow a few times if they don't fit. Start large, though. + n := 10000 + if all { + n = 100000 + } + var trace []byte + for i := 0; i < 5; i++ { + trace = make([]byte, n) + nbytes := runtime.Stack(trace, all) + if nbytes < len(trace) { + return trace[:nbytes] + } + n *= 2 + } + return trace +} + +// logExitFunc provides a simple mechanism to override the default behavior +// of exiting on error. Used in testing and to guarantee we reach a required exit +// for fatal logs. Instead, exit could be a function rather than a method but that +// would make its use clumsier. +var logExitFunc func(error) + +// exit is called if there is trouble creating or writing log files. +// It flushes the logs and exits the program; there's no point in hanging around. +// l.mu is held. +func (l *loggingT) exit(err error) { + fmt.Fprintf(os.Stderr, "log: exiting because of error: %s\n", err) + // If logExitFunc is set, we do that instead of exiting. + if logExitFunc != nil { + logExitFunc(err) + return + } + l.flushAll() + os.Exit(2) +} + +// syncBuffer joins a bufio.Writer to its underlying file, providing access to the +// file's Sync method and providing a wrapper for the Write method that provides log +// file rotation. There are conflicting methods, so the file cannot be embedded. +// l.mu is held for all its methods. +type syncBuffer struct { + logger *loggingT + *bufio.Writer + file *os.File + sev severity + nbytes uint64 // The number of bytes written to this file + maxbytes uint64 // The max number of bytes this syncBuffer.file can hold before cleaning up. +} + +func (sb *syncBuffer) Sync() error { + return sb.file.Sync() +} + +// CalculateMaxSize returns the real max size in bytes after considering the default max size and the flag options. +func CalculateMaxSize() uint64 { + if logging.logFile != "" { + if logging.logFileMaxSizeMB == 0 { + // If logFileMaxSizeMB is zero, we don't have limitations on the log size. + return math.MaxUint64 + } + // Flag logFileMaxSizeMB is in MB for user convenience. + return logging.logFileMaxSizeMB * 1024 * 1024 + } + // If "log_file" flag is not specified, the target file (sb.file) will be cleaned up when reaches a fixed size. + return MaxSize +} + +func (sb *syncBuffer) Write(p []byte) (n int, err error) { + if sb.nbytes+uint64(len(p)) >= sb.maxbytes { + if err := sb.rotateFile(time.Now(), false); err != nil { + sb.logger.exit(err) + } + } + n, err = sb.Writer.Write(p) + sb.nbytes += uint64(n) + if err != nil { + sb.logger.exit(err) + } + return +} + +// rotateFile closes the syncBuffer's file and starts a new one. +// The startup argument indicates whether this is the initial startup of klog. +// If startup is true, existing files are opened for appending instead of truncated. +func (sb *syncBuffer) rotateFile(now time.Time, startup bool) error { + if sb.file != nil { + sb.Flush() + sb.file.Close() + } + var err error + sb.file, _, err = create(severityName[sb.sev], now, startup) + sb.nbytes = 0 + if err != nil { + return err + } + + sb.Writer = bufio.NewWriterSize(sb.file, bufferSize) + + if sb.logger.skipLogHeaders { + return nil + } + + // Write header. + var buf bytes.Buffer + fmt.Fprintf(&buf, "Log file created at: %s\n", now.Format("2006/01/02 15:04:05")) + fmt.Fprintf(&buf, "Running on machine: %s\n", host) + fmt.Fprintf(&buf, "Binary: Built with %s %s for %s/%s\n", runtime.Compiler, runtime.Version(), runtime.GOOS, runtime.GOARCH) + fmt.Fprintf(&buf, "Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg\n") + n, err := sb.file.Write(buf.Bytes()) + sb.nbytes += uint64(n) + return err +} + +// bufferSize sizes the buffer associated with each log file. It's large +// so that log records can accumulate without the logging thread blocking +// on disk I/O. The flushDaemon will block instead. +const bufferSize = 256 * 1024 + +// createFiles creates all the log files for severity from sev down to infoLog. +// l.mu is held. +func (l *loggingT) createFiles(sev severity) error { + now := time.Now() + // Files are created in decreasing severity order, so as soon as we find one + // has already been created, we can stop. + for s := sev; s >= infoLog && l.file[s] == nil; s-- { + sb := &syncBuffer{ + logger: l, + sev: s, + maxbytes: CalculateMaxSize(), + } + if err := sb.rotateFile(now, true); err != nil { + return err + } + l.file[s] = sb + } + return nil +} + +const flushInterval = 5 * time.Second + +// flushDaemon periodically flushes the log file buffers. +func (l *loggingT) flushDaemon() { + for range time.NewTicker(flushInterval).C { + l.lockAndFlushAll() + } +} + +// lockAndFlushAll is like flushAll but locks l.mu first. +func (l *loggingT) lockAndFlushAll() { + l.mu.Lock() + l.flushAll() + l.mu.Unlock() +} + +// flushAll flushes all the logs and attempts to "sync" their data to disk. +// l.mu is held. +func (l *loggingT) flushAll() { + // Flush from fatal down, in case there's trouble flushing. + for s := fatalLog; s >= infoLog; s-- { + file := l.file[s] + if file != nil { + file.Flush() // ignore error + file.Sync() // ignore error + } + } +} + +// CopyStandardLogTo arranges for messages written to the Go "log" package's +// default logs to also appear in the Google logs for the named and lower +// severities. Subsequent changes to the standard log's default output location +// or format may break this behavior. +// +// Valid names are "INFO", "WARNING", "ERROR", and "FATAL". If the name is not +// recognized, CopyStandardLogTo panics. +func CopyStandardLogTo(name string) { + sev, ok := severityByName(name) + if !ok { + panic(fmt.Sprintf("log.CopyStandardLogTo(%q): unrecognized severity name", name)) + } + // Set a log format that captures the user's file and line: + // d.go:23: message + stdLog.SetFlags(stdLog.Lshortfile) + stdLog.SetOutput(logBridge(sev)) +} + +// logBridge provides the Write method that enables CopyStandardLogTo to connect +// Go's standard logs to the logs provided by this package. +type logBridge severity + +// Write parses the standard logging line and passes its components to the +// logger for severity(lb). +func (lb logBridge) Write(b []byte) (n int, err error) { + var ( + file = "???" + line = 1 + text string + ) + // Split "d.go:23: message" into "d.go", "23", and "message". + if parts := bytes.SplitN(b, []byte{':'}, 3); len(parts) != 3 || len(parts[0]) < 1 || len(parts[2]) < 1 { + text = fmt.Sprintf("bad log format: %s", b) + } else { + file = string(parts[0]) + text = string(parts[2][1:]) // skip leading space + line, err = strconv.Atoi(string(parts[1])) + if err != nil { + text = fmt.Sprintf("bad line number: %s", b) + line = 1 + } + } + // printWithFileLine with alsoToStderr=true, so standard log messages + // always appear on standard error. + logging.printWithFileLine(severity(lb), logging.logr, file, line, true, text) + return len(b), nil +} + +// setV computes and remembers the V level for a given PC +// when vmodule is enabled. +// File pattern matching takes the basename of the file, stripped +// of its .go suffix, and uses filepath.Match, which is a little more +// general than the *? matching used in C++. +// l.mu is held. +func (l *loggingT) setV(pc uintptr) Level { + fn := runtime.FuncForPC(pc) + file, _ := fn.FileLine(pc) + // The file is something like /a/b/c/d.go. We want just the d. + if strings.HasSuffix(file, ".go") { + file = file[:len(file)-3] + } + if slash := strings.LastIndex(file, "/"); slash >= 0 { + file = file[slash+1:] + } + for _, filter := range l.vmodule.filter { + if filter.match(file) { + l.vmap[pc] = filter.level + return filter.level + } + } + l.vmap[pc] = 0 + return 0 +} + +// Verbose is a boolean type that implements Infof (like Printf) etc. +// See the documentation of V for more information. +type Verbose struct { + enabled bool + logr logr.Logger +} + +func newVerbose(level Level, b bool) Verbose { + if logging.logr == nil { + return Verbose{b, nil} + } + return Verbose{b, logging.logr.V(int(level))} +} + +// V reports whether verbosity at the call site is at least the requested level. +// The returned value is a struct of type Verbose, which implements Info, Infoln +// and Infof. These methods will write to the Info log if called. +// Thus, one may write either +// if glog.V(2).Enabled() { klog.Info("log this") } +// or +// klog.V(2).Info("log this") +// The second form is shorter but the first is cheaper if logging is off because it does +// not evaluate its arguments. +// +// Whether an individual call to V generates a log record depends on the setting of +// the -v and -vmodule flags; both are off by default. The V call will log if its level +// is less than or equal to the value of the -v flag, or alternatively if its level is +// less than or equal to the value of the -vmodule pattern matching the source file +// containing the call. +func V(level Level) Verbose { + // This function tries hard to be cheap unless there's work to do. + // The fast path is two atomic loads and compares. + + // Here is a cheap but safe test to see if V logging is enabled globally. + if logging.verbosity.get() >= level { + return newVerbose(level, true) + } + + // It's off globally but it vmodule may still be set. + // Here is another cheap but safe test to see if vmodule is enabled. + if atomic.LoadInt32(&logging.filterLength) > 0 { + // Now we need a proper lock to use the logging structure. The pcs field + // is shared so we must lock before accessing it. This is fairly expensive, + // but if V logging is enabled we're slow anyway. + logging.mu.Lock() + defer logging.mu.Unlock() + if runtime.Callers(2, logging.pcs[:]) == 0 { + return newVerbose(level, false) + } + v, ok := logging.vmap[logging.pcs[0]] + if !ok { + v = logging.setV(logging.pcs[0]) + } + return newVerbose(level, v >= level) + } + return newVerbose(level, false) +} + +// Enabled will return true if this log level is enabled, guarded by the value +// of v. +// See the documentation of V for usage. +func (v Verbose) Enabled() bool { + return v.enabled +} + +// Info is equivalent to the global Info function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Info(args ...interface{}) { + if v.enabled { + logging.print(infoLog, v.logr, args...) + } +} + +// Infoln is equivalent to the global Infoln function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Infoln(args ...interface{}) { + if v.enabled { + logging.println(infoLog, v.logr, args...) + } +} + +// Infof is equivalent to the global Infof function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Infof(format string, args ...interface{}) { + if v.enabled { + logging.printf(infoLog, v.logr, format, args...) + } +} + +// InfoS is equivalent to the global InfoS function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) InfoS(msg string, keysAndValues ...interface{}) { + if v.enabled { + logging.infoS(v.logr, msg, keysAndValues...) + } +} + +// Error is equivalent to the global Error function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Error(err error, msg string, args ...interface{}) { + if v.enabled { + logging.errorS(err, v.logr, msg, args...) + } +} + +// Info logs to the INFO log. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Info(args ...interface{}) { + logging.print(infoLog, logging.logr, args...) +} + +// InfoDepth acts as Info but uses depth to determine which call frame to log. +// InfoDepth(0, "msg") is the same as Info("msg"). +func InfoDepth(depth int, args ...interface{}) { + logging.printDepth(infoLog, logging.logr, depth, args...) +} + +// Infoln logs to the INFO log. +// Arguments are handled in the manner of fmt.Println; a newline is always appended. +func Infoln(args ...interface{}) { + logging.println(infoLog, logging.logr, args...) +} + +// Infof logs to the INFO log. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Infof(format string, args ...interface{}) { + logging.printf(infoLog, logging.logr, format, args...) +} + +// InfoS structured logs to the INFO log. +// The msg argument used to add constant description to the log line. +// The key/value pairs would be join by "=" ; a newline is always appended. +// +// Basic examples: +// >> klog.InfoS("Pod status updated", "pod", "kubedns", "status", "ready") +// output: +// >> I1025 00:15:15.525108 1 controller_utils.go:116] "Pod status updated" pod="kubedns" status="ready" +func InfoS(msg string, keysAndValues ...interface{}) { + logging.infoS(logging.logr, msg, keysAndValues...) +} + +// Warning logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Warning(args ...interface{}) { + logging.print(warningLog, logging.logr, args...) +} + +// WarningDepth acts as Warning but uses depth to determine which call frame to log. +// WarningDepth(0, "msg") is the same as Warning("msg"). +func WarningDepth(depth int, args ...interface{}) { + logging.printDepth(warningLog, logging.logr, depth, args...) +} + +// Warningln logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Println; a newline is always appended. +func Warningln(args ...interface{}) { + logging.println(warningLog, logging.logr, args...) +} + +// Warningf logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Warningf(format string, args ...interface{}) { + logging.printf(warningLog, logging.logr, format, args...) +} + +// Error logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Error(args ...interface{}) { + logging.print(errorLog, logging.logr, args...) +} + +// ErrorDepth acts as Error but uses depth to determine which call frame to log. +// ErrorDepth(0, "msg") is the same as Error("msg"). +func ErrorDepth(depth int, args ...interface{}) { + logging.printDepth(errorLog, logging.logr, depth, args...) +} + +// Errorln logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Println; a newline is always appended. +func Errorln(args ...interface{}) { + logging.println(errorLog, logging.logr, args...) +} + +// Errorf logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Errorf(format string, args ...interface{}) { + logging.printf(errorLog, logging.logr, format, args...) +} + +// ErrorS structured logs to the ERROR, WARNING, and INFO logs. +// the err argument used as "err" field of log line. +// The msg argument used to add constant description to the log line. +// The key/value pairs would be join by "=" ; a newline is always appended. +// +// Basic examples: +// >> klog.ErrorS(err, "Failed to update pod status") +// output: +// >> E1025 00:15:15.525108 1 controller_utils.go:114] "Failed to update pod status" err="timeout" +func ErrorS(err error, msg string, keysAndValues ...interface{}) { + logging.errorS(err, logging.logr, msg, keysAndValues...) +} + +// Fatal logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Fatal(args ...interface{}) { + logging.print(fatalLog, logging.logr, args...) +} + +// FatalDepth acts as Fatal but uses depth to determine which call frame to log. +// FatalDepth(0, "msg") is the same as Fatal("msg"). +func FatalDepth(depth int, args ...interface{}) { + logging.printDepth(fatalLog, logging.logr, depth, args...) +} + +// Fatalln logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Println; a newline is always appended. +func Fatalln(args ...interface{}) { + logging.println(fatalLog, logging.logr, args...) +} + +// Fatalf logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Fatalf(format string, args ...interface{}) { + logging.printf(fatalLog, logging.logr, format, args...) +} + +// fatalNoStacks is non-zero if we are to exit without dumping goroutine stacks. +// It allows Exit and relatives to use the Fatal logs. +var fatalNoStacks uint32 + +// Exit logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Exit(args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.print(fatalLog, logging.logr, args...) +} + +// ExitDepth acts as Exit but uses depth to determine which call frame to log. +// ExitDepth(0, "msg") is the same as Exit("msg"). +func ExitDepth(depth int, args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.printDepth(fatalLog, logging.logr, depth, args...) +} + +// Exitln logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +func Exitln(args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.println(fatalLog, logging.logr, args...) +} + +// Exitf logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Exitf(format string, args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.printf(fatalLog, logging.logr, format, args...) +} + +// ObjectRef references a kubernetes object +type ObjectRef struct { + Name string `json:"name"` + Namespace string `json:"namespace,omitempty"` +} + +func (ref ObjectRef) String() string { + if ref.Namespace != "" { + return fmt.Sprintf("%s/%s", ref.Namespace, ref.Name) + } + return ref.Name +} + +// KMetadata is a subset of the kubernetes k8s.io/apimachinery/pkg/apis/meta/v1.Object interface +// this interface may expand in the future, but will always be a subset of the +// kubernetes k8s.io/apimachinery/pkg/apis/meta/v1.Object interface +type KMetadata interface { + GetName() string + GetNamespace() string +} + +// KObj returns ObjectRef from ObjectMeta +func KObj(obj KMetadata) ObjectRef { + return ObjectRef{ + Name: obj.GetName(), + Namespace: obj.GetNamespace(), + } +} + +// KRef returns ObjectRef from name and namespace +func KRef(namespace, name string) ObjectRef { + return ObjectRef{ + Name: name, + Namespace: namespace, + } +} diff --git a/vendor/k8s.io/klog/v2/klog_file.go b/vendor/k8s.io/klog/v2/klog_file.go new file mode 100644 index 00000000000..de830d9221c --- /dev/null +++ b/vendor/k8s.io/klog/v2/klog_file.go @@ -0,0 +1,164 @@ +// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// +// 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. + +// File I/O for logs. + +package klog + +import ( + "errors" + "fmt" + "os" + "os/user" + "path/filepath" + "runtime" + "strings" + "sync" + "time" +) + +// MaxSize is the maximum size of a log file in bytes. +var MaxSize uint64 = 1024 * 1024 * 1800 + +// logDirs lists the candidate directories for new log files. +var logDirs []string + +func createLogDirs() { + if logging.logDir != "" { + logDirs = append(logDirs, logging.logDir) + } + logDirs = append(logDirs, os.TempDir()) +} + +var ( + pid = os.Getpid() + program = filepath.Base(os.Args[0]) + host = "unknownhost" + userName = "unknownuser" + userNameOnce sync.Once +) + +func init() { + if h, err := os.Hostname(); err == nil { + host = shortHostname(h) + } +} + +func getUserName() string { + userNameOnce.Do(func() { + // On Windows, the Go 'user' package requires netapi32.dll. + // This affects Windows Nano Server: + // https://github.com/golang/go/issues/21867 + // Fallback to using environment variables. + if runtime.GOOS == "windows" { + u := os.Getenv("USERNAME") + if len(u) == 0 { + return + } + // Sanitize the USERNAME since it may contain filepath separators. + u = strings.Replace(u, `\`, "_", -1) + + // user.Current().Username normally produces something like 'USERDOMAIN\USERNAME' + d := os.Getenv("USERDOMAIN") + if len(d) != 0 { + userName = d + "_" + u + } else { + userName = u + } + } else { + current, err := user.Current() + if err == nil { + userName = current.Username + } + } + }) + + return userName +} + +// shortHostname returns its argument, truncating at the first period. +// For instance, given "www.google.com" it returns "www". +func shortHostname(hostname string) string { + if i := strings.Index(hostname, "."); i >= 0 { + return hostname[:i] + } + return hostname +} + +// logName returns a new log file name containing tag, with start time t, and +// the name for the symlink for tag. +func logName(tag string, t time.Time) (name, link string) { + name = fmt.Sprintf("%s.%s.%s.log.%s.%04d%02d%02d-%02d%02d%02d.%d", + program, + host, + getUserName(), + tag, + t.Year(), + t.Month(), + t.Day(), + t.Hour(), + t.Minute(), + t.Second(), + pid) + return name, program + "." + tag +} + +var onceLogDirs sync.Once + +// create creates a new log file and returns the file and its filename, which +// contains tag ("INFO", "FATAL", etc.) and t. If the file is created +// successfully, create also attempts to update the symlink for that tag, ignoring +// errors. +// The startup argument indicates whether this is the initial startup of klog. +// If startup is true, existing files are opened for appending instead of truncated. +func create(tag string, t time.Time, startup bool) (f *os.File, filename string, err error) { + if logging.logFile != "" { + f, err := openOrCreate(logging.logFile, startup) + if err == nil { + return f, logging.logFile, nil + } + return nil, "", fmt.Errorf("log: unable to create log: %v", err) + } + onceLogDirs.Do(createLogDirs) + if len(logDirs) == 0 { + return nil, "", errors.New("log: no log dirs") + } + name, link := logName(tag, t) + var lastErr error + for _, dir := range logDirs { + fname := filepath.Join(dir, name) + f, err := openOrCreate(fname, startup) + if err == nil { + symlink := filepath.Join(dir, link) + os.Remove(symlink) // ignore err + os.Symlink(name, symlink) // ignore err + return f, fname, nil + } + lastErr = err + } + return nil, "", fmt.Errorf("log: cannot create log: %v", lastErr) +} + +// The startup argument indicates whether this is the initial startup of klog. +// If startup is true, existing files are opened for appending instead of truncated. +func openOrCreate(name string, startup bool) (*os.File, error) { + if startup { + f, err := os.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) + return f, err + } + f, err := os.Create(name) + return f, err +} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/types.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/types.go index 1fd9780bba4..95b03a1dd1f 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/types.go +++ b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/types.go @@ -45,7 +45,7 @@ type ServiceReference struct { // Only https is supported, though you are able to disable certificate verification. type APIServiceSpec struct { // Service is a reference to the service for this API server. It must communicate - // on port 443 + // on port 443. // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. // The call will simply delegate to the normal handler chain to be fulfilled. // +optional @@ -60,6 +60,7 @@ type APIServiceSpec struct { InsecureSkipTLSVerify bool // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. // If unspecified, system trust roots on the apiserver are used. + // +listType=atomic // +optional CABundle []byte @@ -123,6 +124,8 @@ type APIServiceCondition struct { // APIServiceStatus contains derived information about an API server type APIServiceStatus struct { // Current service state of apiService. + // +listType=map + // +listMapKey=type Conditions []APIServiceCondition } diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto index 4cc3b3b168a..d922c615786 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto +++ b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto @@ -73,7 +73,7 @@ message APIServiceList { // Only https is supported, though you are able to disable certificate verification. message APIServiceSpec { // Service is a reference to the service for this API server. It must communicate - // on port 443 + // on port 443. // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. // The call will simply delegate to the normal handler chain to be fulfilled. // +optional @@ -91,6 +91,7 @@ message APIServiceSpec { // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. // If unspecified, system trust roots on the apiserver are used. + // +listType=atomic // +optional optional bytes caBundle = 5; @@ -121,6 +122,8 @@ message APIServiceStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated APIServiceCondition conditions = 1; } diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/types.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/types.go index 38607dfe7d5..9569b3920fe 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/types.go +++ b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/types.go @@ -45,7 +45,7 @@ type ServiceReference struct { // Only https is supported, though you are able to disable certificate verification. type APIServiceSpec struct { // Service is a reference to the service for this API server. It must communicate - // on port 443 + // on port 443. // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. // The call will simply delegate to the normal handler chain to be fulfilled. // +optional @@ -60,6 +60,7 @@ type APIServiceSpec struct { InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty" protobuf:"varint,4,opt,name=insecureSkipTLSVerify"` // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. // If unspecified, system trust roots on the apiserver are used. + // +listType=atomic // +optional CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,5,opt,name=caBundle"` @@ -132,6 +133,8 @@ type APIServiceStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []APIServiceCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` } diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/BUILD b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/BUILD index 9fe4cd5d6dc..64268ab5f9e 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/BUILD +++ b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/BUILD @@ -16,6 +16,7 @@ go_library( "zz_generated.conversion.go", "zz_generated.deepcopy.go", "zz_generated.defaults.go", + "zz_generated.prerelease-lifecycle.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1", importpath = "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1", diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/doc.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/doc.go index b8877cc2cd8..2d5a6e44e9b 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/doc.go +++ b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/doc.go @@ -20,6 +20,7 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=apiregistration.k8s.io // +k8s:defaulter-gen=TypeMeta +// +k8s:prerelease-lifecycle-gen=true // Package v1beta1 contains the API Registration API, which is responsible for // registering an API `Group`/`Version` with another kubernetes like API server. diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto index 4e78358e437..48439fa2dc4 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto +++ b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto @@ -73,7 +73,7 @@ message APIServiceList { // Only https is supported, though you are able to disable certificate verification. message APIServiceSpec { // Service is a reference to the service for this API server. It must communicate - // on port 443 + // on port 443. // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. // The call will simply delegate to the normal handler chain to be fulfilled. // +optional @@ -91,6 +91,7 @@ message APIServiceSpec { // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. // If unspecified, system trust roots on the apiserver are used. + // +listType=atomic // +optional optional bytes caBundle = 5; @@ -121,6 +122,8 @@ message APIServiceStatus { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type repeated APIServiceCondition conditions = 1; } diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/types.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/types.go index 33731c3b362..9fdf73b6ebc 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/types.go +++ b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/types.go @@ -19,6 +19,9 @@ package v1beta1 import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.7 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=apiregistration.k8s.io,v1,APIServiceList // APIServiceList is a list of APIService objects. type APIServiceList struct { @@ -45,7 +48,7 @@ type ServiceReference struct { // Only https is supported, though you are able to disable certificate verification. type APIServiceSpec struct { // Service is a reference to the service for this API server. It must communicate - // on port 443 + // on port 443. // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. // The call will simply delegate to the normal handler chain to be fulfilled. // +optional @@ -60,6 +63,7 @@ type APIServiceSpec struct { InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty" protobuf:"varint,4,opt,name=insecureSkipTLSVerify"` // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. // If unspecified, system trust roots on the apiserver are used. + // +listType=atomic // +optional CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,5,opt,name=caBundle"` @@ -132,12 +136,17 @@ type APIServiceStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge + // +listType=map + // +listMapKey=type Conditions []APIServiceCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` } // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.7 +// +k8s:prerelease-lifecycle-gen:deprecated=1.19 +// +k8s:prerelease-lifecycle-gen:replacement=apiregistration.k8s.io,v1,APIService // APIService represents a server for a particular GroupVersion. // Name must be "version.group". diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 00000000000..bdf90cfdced --- /dev/null +++ b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,73 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *APIService) APILifecycleIntroduced() (major, minor int) { + return 1, 7 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *APIService) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *APIService) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apiregistration.k8s.io", Version: "v1", Kind: "APIService"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *APIService) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *APIServiceList) APILifecycleIntroduced() (major, minor int) { + return 1, 7 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *APIServiceList) APILifecycleDeprecated() (major, minor int) { + return 1, 19 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *APIServiceList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "apiregistration.k8s.io", Version: "v1", Kind: "APIServiceList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *APIServiceList) APILifecycleRemoved() (major, minor int) { + return 1, 22 +} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apiserver/BUILD b/vendor/k8s.io/kube-aggregator/pkg/apiserver/BUILD index ea1dd7a5481..aed87fbe3ef 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/apiserver/BUILD +++ b/vendor/k8s.io/kube-aggregator/pkg/apiserver/BUILD @@ -22,6 +22,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/apiserver/scheme:go_default_library", @@ -62,6 +63,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/egressselector:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/storage:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", @@ -85,7 +87,7 @@ go_library( "//staging/src/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/controllers/status:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/rest:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", ], ) diff --git a/vendor/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go b/vendor/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go index 02c887c2a51..1b22b24e274 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go +++ b/vendor/k8s.io/kube-aggregator/pkg/apiserver/apiserver.go @@ -30,6 +30,7 @@ import ( "k8s.io/client-go/pkg/version" openapicommon "k8s.io/kube-openapi/pkg/common" + "k8s.io/apiserver/pkg/server/dynamiccertificates" v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" v1helper "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/helper" "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" @@ -64,8 +65,8 @@ const legacyAPIServiceName = "v1." type ExtraConfig struct { // ProxyClientCert/Key are the client cert used to identify this proxy. Backing APIServices use // this to confirm the proxy's identity - ProxyClientCert []byte - ProxyClientKey []byte + ProxyClientCertFile string + ProxyClientKeyFile string // If present, the Dial method will be used for dialing out to delegate // apiservers. @@ -108,11 +109,9 @@ type APIAggregator struct { delegateHandler http.Handler - // proxyClientCert/Key are the client cert used to identify this proxy. Backing APIServices use - // this to confirm the proxy's identity - proxyClientCert []byte - proxyClientKey []byte - proxyTransport *http.Transport + // proxyCurrentCertKeyContent holds he client cert used to identify this proxy. Backing APIServices use this to confirm the proxy's identity + proxyCurrentCertKeyContent certKeyFunc + proxyTransport *http.Transport // proxyHandlers are the proxy handlers that are currently registered, keyed by apiservice.name proxyHandlers map[string]*proxyHandler @@ -178,18 +177,17 @@ func (c completedConfig) NewWithDelegate(delegationTarget genericapiserver.Deleg ) s := &APIAggregator{ - GenericAPIServer: genericServer, - delegateHandler: delegationTarget.UnprotectedHandler(), - proxyClientCert: c.ExtraConfig.ProxyClientCert, - proxyClientKey: c.ExtraConfig.ProxyClientKey, - proxyTransport: c.ExtraConfig.ProxyTransport, - proxyHandlers: map[string]*proxyHandler{}, - handledGroups: sets.String{}, - lister: informerFactory.Apiregistration().V1().APIServices().Lister(), - APIRegistrationInformers: informerFactory, - serviceResolver: c.ExtraConfig.ServiceResolver, - openAPIConfig: openAPIConfig, - egressSelector: c.GenericConfig.EgressSelector, + GenericAPIServer: genericServer, + delegateHandler: delegationTarget.UnprotectedHandler(), + proxyTransport: c.ExtraConfig.ProxyTransport, + proxyHandlers: map[string]*proxyHandler{}, + handledGroups: sets.String{}, + lister: informerFactory.Apiregistration().V1().APIServices().Lister(), + APIRegistrationInformers: informerFactory, + serviceResolver: c.ExtraConfig.ServiceResolver, + openAPIConfig: openAPIConfig, + egressSelector: c.GenericConfig.EgressSelector, + proxyCurrentCertKeyContent: func() (bytes []byte, bytes2 []byte) { return nil, nil }, } apiGroupInfo := apiservicerest.NewRESTStorage(c.GenericConfig.MergedResourceConfig, c.GenericConfig.RESTOptionsGetter) @@ -214,14 +212,30 @@ func (c completedConfig) NewWithDelegate(delegationTarget genericapiserver.Deleg s.GenericAPIServer.Handler.NonGoRestfulMux.UnlistedHandle("/apis/", apisHandler) apiserviceRegistrationController := NewAPIServiceRegistrationController(informerFactory.Apiregistration().V1().APIServices(), s) + if len(c.ExtraConfig.ProxyClientCertFile) > 0 && len(c.ExtraConfig.ProxyClientKeyFile) > 0 { + aggregatorProxyCerts, err := dynamiccertificates.NewDynamicServingContentFromFiles("aggregator-proxy-cert", c.ExtraConfig.ProxyClientCertFile, c.ExtraConfig.ProxyClientKeyFile) + if err != nil { + return nil, err + } + if err := aggregatorProxyCerts.RunOnce(); err != nil { + return nil, err + } + aggregatorProxyCerts.AddListener(apiserviceRegistrationController) + s.proxyCurrentCertKeyContent = aggregatorProxyCerts.CurrentCertKeyContent + + s.GenericAPIServer.AddPostStartHookOrDie("aggregator-reload-proxy-client-cert", func(context genericapiserver.PostStartHookContext) error { + go aggregatorProxyCerts.Run(1, context.StopCh) + return nil + }) + } + availableController, err := statuscontrollers.NewAvailableConditionController( informerFactory.Apiregistration().V1().APIServices(), c.GenericConfig.SharedInformerFactory.Core().V1().Services(), c.GenericConfig.SharedInformerFactory.Core().V1().Endpoints(), apiregistrationClient.ApiregistrationV1(), c.ExtraConfig.ProxyTransport, - c.ExtraConfig.ProxyClientCert, - c.ExtraConfig.ProxyClientKey, + (func() ([]byte, []byte))(s.proxyCurrentCertKeyContent), s.serviceResolver, c.GenericConfig.EgressSelector, ) @@ -235,7 +249,13 @@ func (c completedConfig) NewWithDelegate(delegationTarget genericapiserver.Deleg return nil }) s.GenericAPIServer.AddPostStartHookOrDie("apiservice-registration-controller", func(context genericapiserver.PostStartHookContext) error { - go apiserviceRegistrationController.Run(context.StopCh) + handlerSyncedCh := make(chan struct{}) + go apiserviceRegistrationController.Run(context.StopCh, handlerSyncedCh) + select { + case <-context.StopCh: + case <-handlerSyncedCh: + } + return nil }) s.GenericAPIServer.AddPostStartHookOrDie("apiservice-status-available-controller", func(context genericapiserver.PostStartHookContext) error { @@ -303,12 +323,11 @@ func (s *APIAggregator) AddAPIService(apiService *v1.APIService) error { // register the proxy handler proxyHandler := &proxyHandler{ - localDelegate: s.delegateHandler, - proxyClientCert: s.proxyClientCert, - proxyClientKey: s.proxyClientKey, - proxyTransport: s.proxyTransport, - serviceResolver: s.serviceResolver, - egressSelector: s.egressSelector, + localDelegate: s.delegateHandler, + proxyCurrentCertKeyContent: s.proxyCurrentCertKeyContent, + proxyTransport: s.proxyTransport, + serviceResolver: s.serviceResolver, + egressSelector: s.egressSelector, } proxyHandler.updateAPIService(apiService) if s.openAPIAggregationController != nil { diff --git a/vendor/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go b/vendor/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go index 5167134b8b1..506748954cc 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go +++ b/vendor/k8s.io/kube-aggregator/pkg/apiserver/apiservice_controller.go @@ -20,15 +20,16 @@ import ( "fmt" "time" - "k8s.io/klog" - apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/server/dynamiccertificates" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" + "k8s.io/klog/v2" - "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" + v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" informers "k8s.io/kube-aggregator/pkg/client/informers/externalversions/apiregistration/v1" listers "k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1" "k8s.io/kube-aggregator/pkg/controllers" @@ -53,6 +54,8 @@ type APIServiceRegistrationController struct { queue workqueue.RateLimitingInterface } +var _ dynamiccertificates.Listener = &APIServiceRegistrationController{} + // NewAPIServiceRegistrationController returns a new APIServiceRegistrationController. func NewAPIServiceRegistrationController(apiServiceInformer informers.APIServiceInformer, apiHandlerManager APIHandlerManager) *APIServiceRegistrationController { c := &APIServiceRegistrationController{ @@ -87,7 +90,7 @@ func (c *APIServiceRegistrationController) sync(key string) error { } // Run starts APIServiceRegistrationController which will process all registration requests until stopCh is closed. -func (c *APIServiceRegistrationController) Run(stopCh <-chan struct{}) { +func (c *APIServiceRegistrationController) Run(stopCh <-chan struct{}, handlerSyncedCh chan<- struct{}) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() @@ -98,6 +101,28 @@ func (c *APIServiceRegistrationController) Run(stopCh <-chan struct{}) { return } + /// initially sync all APIServices to make sure the proxy handler is complete + if err := wait.PollImmediateUntil(time.Second, func() (bool, error) { + services, err := c.apiServiceLister.List(labels.Everything()) + if err != nil { + utilruntime.HandleError(fmt.Errorf("failed to initially list APIServices: %v", err)) + return false, nil + } + for _, s := range services { + if err := c.apiHandlerManager.AddAPIService(s); err != nil { + utilruntime.HandleError(fmt.Errorf("failed to initially sync APIService %s: %v", s.Name, err)) + return false, nil + } + } + return true, nil + }, stopCh); err == wait.ErrWaitTimeout { + utilruntime.HandleError(fmt.Errorf("timed out waiting for proxy handler to initialize")) + return + } else if err != nil { + panic(fmt.Errorf("unexpected error: %v", err)) + } + close(handlerSyncedCh) + // only start one worker thread since its a slow moving API and the aggregation server adding bits // aren't threadsafe go wait.Until(c.runWorker, time.Second, stopCh) @@ -130,7 +155,7 @@ func (c *APIServiceRegistrationController) processNextWorkItem() bool { return true } -func (c *APIServiceRegistrationController) enqueue(obj *v1.APIService) { +func (c *APIServiceRegistrationController) enqueueInternal(obj *v1.APIService) { key, err := cache.DeletionHandlingMetaNamespaceKeyFunc(obj) if err != nil { klog.Errorf("Couldn't get key for object %#v: %v", obj, err) @@ -143,13 +168,13 @@ func (c *APIServiceRegistrationController) enqueue(obj *v1.APIService) { func (c *APIServiceRegistrationController) addAPIService(obj interface{}) { castObj := obj.(*v1.APIService) klog.V(4).Infof("Adding %s", castObj.Name) - c.enqueue(castObj) + c.enqueueInternal(castObj) } func (c *APIServiceRegistrationController) updateAPIService(obj, _ interface{}) { castObj := obj.(*v1.APIService) klog.V(4).Infof("Updating %s", castObj.Name) - c.enqueue(castObj) + c.enqueueInternal(castObj) } func (c *APIServiceRegistrationController) deleteAPIService(obj interface{}) { @@ -167,5 +192,18 @@ func (c *APIServiceRegistrationController) deleteAPIService(obj interface{}) { } } klog.V(4).Infof("Deleting %q", castObj.Name) - c.enqueue(castObj) + c.enqueueInternal(castObj) +} + +// Enqueue queues all apiservices to be rehandled. +// This method is used by the controller to notify when the proxy cert content changes. +func (c *APIServiceRegistrationController) Enqueue() { + apiServices, err := c.apiServiceLister.List(labels.Everything()) + if err != nil { + utilruntime.HandleError(err) + return + } + for _, apiService := range apiServices { + c.addAPIService(apiService) + } } diff --git a/vendor/k8s.io/kube-aggregator/pkg/apiserver/handler_proxy.go b/vendor/k8s.io/kube-aggregator/pkg/apiserver/handler_proxy.go index 4d1f9a6dd1b..e09f0d1a238 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/apiserver/handler_proxy.go +++ b/vendor/k8s.io/kube-aggregator/pkg/apiserver/handler_proxy.go @@ -37,7 +37,7 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" restclient "k8s.io/client-go/rest" "k8s.io/client-go/transport" - "k8s.io/klog" + "k8s.io/klog/v2" apiregistrationv1api "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" apiregistrationv1apihelper "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/helper" ) @@ -48,17 +48,17 @@ const ( aggregatedDiscoveryTimeout = 5 * time.Second ) +type certKeyFunc func() ([]byte, []byte) + // proxyHandler provides a http.Handler which will proxy traffic to locations // specified by items implementing Redirector. type proxyHandler struct { // localDelegate is used to satisfy local APIServices localDelegate http.Handler - // proxyClientCert/Key are the client cert used to identify this proxy. Backing APIServices use - // this to confirm the proxy's identity - proxyClientCert []byte - proxyClientKey []byte - proxyTransport *http.Transport + // proxyCurrentCertKeyContent holds the client cert used to identify this proxy. Backing APIServices use this to confirm the proxy's identity + proxyCurrentCertKeyContent certKeyFunc + proxyTransport *http.Transport // Endpoints based routing to map from cluster IP to routable IP serviceResolver ServiceResolver @@ -237,7 +237,7 @@ func (r *responder) Object(statusCode int, obj runtime.Object) { } func (r *responder) Error(_ http.ResponseWriter, _ *http.Request, err error) { - http.Error(r.w, err.Error(), http.StatusInternalServerError) + http.Error(r.w, err.Error(), http.StatusServiceUnavailable) } // these methods provide locked access to fields @@ -248,14 +248,16 @@ func (r *proxyHandler) updateAPIService(apiService *apiregistrationv1api.APIServ return } + proxyClientCert, proxyClientKey := r.proxyCurrentCertKeyContent() + newInfo := proxyHandlingInfo{ name: apiService.Name, restConfig: &restclient.Config{ TLSClientConfig: restclient.TLSClientConfig{ Insecure: apiService.Spec.InsecureSkipTLSVerify, ServerName: apiService.Spec.Service.Name + "." + apiService.Spec.Service.Namespace + ".svc", - CertData: r.proxyClientCert, - KeyData: r.proxyClientKey, + CertData: proxyClientCert, + KeyData: proxyClientKey, CAData: apiService.Spec.CABundle, }, }, diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1/apiservice.go b/vendor/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1/apiservice.go index b2e4f763ce1..5af77c7f760 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1/apiservice.go +++ b/vendor/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1/apiservice.go @@ -26,10 +26,13 @@ import ( ) // APIServiceLister helps list APIServices. +// All objects returned here must be treated as read-only. type APIServiceLister interface { // List lists all APIServices in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1.APIService, err error) // Get retrieves the APIService from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1.APIService, error) APIServiceListerExpansion } diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1beta1/apiservice.go b/vendor/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1beta1/apiservice.go index 57f93038376..8628b80d03e 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1beta1/apiservice.go +++ b/vendor/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1beta1/apiservice.go @@ -26,10 +26,13 @@ import ( ) // APIServiceLister helps list APIServices. +// All objects returned here must be treated as read-only. type APIServiceLister interface { // List lists all APIServices in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.APIService, err error) // Get retrieves the APIService from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.APIService, error) APIServiceListerExpansion } diff --git a/vendor/k8s.io/kube-aggregator/pkg/controllers/BUILD b/vendor/k8s.io/kube-aggregator/pkg/controllers/BUILD index f5946513bd6..9d1ddcfabca 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/controllers/BUILD +++ b/vendor/k8s.io/kube-aggregator/pkg/controllers/BUILD @@ -13,7 +13,7 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kube-aggregator/pkg/controllers/autoregister/BUILD b/vendor/k8s.io/kube-aggregator/pkg/controllers/autoregister/BUILD index 8e98bc3b775..71e52834155 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/controllers/autoregister/BUILD +++ b/vendor/k8s.io/kube-aggregator/pkg/controllers/autoregister/BUILD @@ -39,7 +39,7 @@ go_library( "//staging/src/k8s.io/kube-aggregator/pkg/client/informers/externalversions/apiregistration/v1:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/controllers:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go b/vendor/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go index 48dcd209c64..5704656b645 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go +++ b/vendor/k8s.io/kube-aggregator/pkg/controllers/autoregister/autoregister_controller.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/kube-aggregator/pkg/controllers/cache.go b/vendor/k8s.io/kube-aggregator/pkg/controllers/cache.go index 5a53b90629f..5682d3482fd 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/controllers/cache.go +++ b/vendor/k8s.io/kube-aggregator/pkg/controllers/cache.go @@ -19,7 +19,7 @@ package controllers import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/cache" diff --git a/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/BUILD b/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/BUILD index 7328c2ed3b2..3f382183b8c 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/BUILD +++ b/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/BUILD @@ -12,7 +12,7 @@ go_library( "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/BUILD b/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/BUILD index 947a875316d..fd60a11fb73 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/BUILD +++ b/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/BUILD @@ -21,7 +21,7 @@ go_library( "//vendor/github.com/emicklei/go-restful:go_default_library", "//vendor/github.com/go-openapi/spec:go_default_library", "//vendor/github.com/json-iterator/go:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/aggregator:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/builder:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", diff --git a/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/aggregator.go b/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/aggregator.go index 11f9683ebd7..10f68665d92 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/aggregator.go +++ b/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/aggregator.go @@ -26,7 +26,7 @@ import ( restful "github.com/emicklei/go-restful" "github.com/go-openapi/spec" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apiserver/pkg/server" v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" diff --git a/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/controller.go b/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/controller.go index ce53d66b072..e61a2735862 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/controller.go +++ b/vendor/k8s.io/kube-aggregator/pkg/controllers/openapi/controller.go @@ -24,7 +24,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" "k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator" ) @@ -59,7 +59,9 @@ func NewAggregationController(downloader *aggregator.Downloader, openAPIAggregat c := &AggregationController{ openAPIAggregationManager: openAPIAggregationManager, queue: workqueue.NewNamedRateLimitingQueue( - workqueue.NewItemExponentialFailureRateLimiter(successfulUpdateDelay, failedUpdateMaxExpDelay), "APIServiceOpenAPIAggregationControllerQueue1"), + workqueue.NewItemExponentialFailureRateLimiter(successfulUpdateDelay, failedUpdateMaxExpDelay), + "open_api_aggregation_controller", + ), downloader: downloader, } diff --git a/vendor/k8s.io/kube-aggregator/pkg/controllers/status/BUILD b/vendor/k8s.io/kube-aggregator/pkg/controllers/status/BUILD index 2f63f65de44..443aee80b15 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/controllers/status/BUILD +++ b/vendor/k8s.io/kube-aggregator/pkg/controllers/status/BUILD @@ -35,7 +35,7 @@ go_library( "//staging/src/k8s.io/kube-aggregator/pkg/client/informers/externalversions/apiregistration/v1:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/controllers:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go b/vendor/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go index 12b056d70d8..7cf38ced4c2 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go +++ b/vendor/k8s.io/kube-aggregator/pkg/controllers/status/available_controller.go @@ -19,6 +19,7 @@ package apiserver import ( "context" "fmt" + "net" "net/http" "net/url" "reflect" @@ -42,7 +43,7 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/transport" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" apiregistrationv1apihelper "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/helper" apiregistrationclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1" @@ -51,6 +52,8 @@ import ( "k8s.io/kube-aggregator/pkg/controllers" ) +type certKeyFunc func() ([]byte, []byte) + // ServiceResolver knows how to convert a service reference into an actual location. type ServiceResolver interface { ResolveEndpoint(namespace, name string, port int32) (*url.URL, error) @@ -70,8 +73,10 @@ type AvailableConditionController struct { endpointsLister v1listers.EndpointsLister endpointsSynced cache.InformerSynced - discoveryClient *http.Client - serviceResolver ServiceResolver + // dialContext specifies the dial function for creating unencrypted TCP connections. + dialContext func(ctx context.Context, network, address string) (net.Conn, error) + proxyCurrentCertKeyContent certKeyFunc + serviceResolver ServiceResolver // To allow injection for testing. syncFn func(key string) error @@ -90,8 +95,7 @@ func NewAvailableConditionController( endpointsInformer v1informers.EndpointsInformer, apiServiceClient apiregistrationclient.APIServicesGetter, proxyTransport *http.Transport, - proxyClientCert []byte, - proxyClientKey []byte, + proxyCurrentCertKeyContent certKeyFunc, serviceResolver ServiceResolver, egressSelector *egressselector.EgressSelector, ) (*AvailableConditionController, error) { @@ -110,17 +114,7 @@ func NewAvailableConditionController( // the maximum disruption time to a minimum, but it does prevent hot loops. workqueue.NewItemExponentialFailureRateLimiter(5*time.Millisecond, 30*time.Second), "AvailableConditionController"), - } - - // if a particular transport was specified, use that otherwise build one - // construct an http client that will ignore TLS verification (if someone owns the network and messes with your status - // that's not so bad) and sets a very short timeout. This is a best effort GET that provides no additional information - restConfig := &rest.Config{ - TLSClientConfig: rest.TLSClientConfig{ - Insecure: true, - CertData: proxyClientCert, - KeyData: proxyClientKey, - }, + proxyCurrentCertKeyContent: proxyCurrentCertKeyContent, } if egressSelector != nil { @@ -130,19 +124,9 @@ func NewAvailableConditionController( if err != nil { return nil, err } - restConfig.Dial = egressDialer + c.dialContext = egressDialer } else if proxyTransport != nil && proxyTransport.DialContext != nil { - restConfig.Dial = proxyTransport.DialContext - } - - transport, err := rest.TransportFor(restConfig) - if err != nil { - return nil, err - } - c.discoveryClient = &http.Client{ - Transport: transport, - // the request should happen quickly. - Timeout: 5 * time.Second, + c.dialContext = proxyTransport.DialContext } // resync on this one because it is low cardinality and rechecking the actual discovery @@ -183,6 +167,34 @@ func (c *AvailableConditionController) sync(key string) error { return err } + // if a particular transport was specified, use that otherwise build one + // construct an http client that will ignore TLS verification (if someone owns the network and messes with your status + // that's not so bad) and sets a very short timeout. This is a best effort GET that provides no additional information + restConfig := &rest.Config{ + TLSClientConfig: rest.TLSClientConfig{ + Insecure: true, + }, + } + + if c.proxyCurrentCertKeyContent != nil { + proxyClientCert, proxyClientKey := c.proxyCurrentCertKeyContent() + + restConfig.TLSClientConfig.CertData = proxyClientCert + restConfig.TLSClientConfig.KeyData = proxyClientKey + } + if c.dialContext != nil { + restConfig.Dial = c.dialContext + } + restTransport, err := rest.TransportFor(restConfig) + if err != nil { + return err + } + discoveryClient := &http.Client{ + Transport: restTransport, + // the request should happen quickly. + Timeout: 5 * time.Second, + } + apiService := originalAPIService.DeepCopy() availableCondition := apiregistrationv1.APIServiceCondition{ @@ -285,9 +297,14 @@ func (c *AvailableConditionController) sync(key string) error { results <- err return } - discoveryURL.Path = "/apis/" + apiService.Spec.Group + "/" + apiService.Spec.Version + // render legacyAPIService health check path when it is delegated to a service + if apiService.Name == "v1." { + discoveryURL.Path = "/api/" + apiService.Spec.Version + } else { + discoveryURL.Path = "/apis/" + apiService.Spec.Group + "/" + apiService.Spec.Version + } - errCh := make(chan error) + errCh := make(chan error, 1) go func() { // be sure to check a URL that the aggregated API server is required to serve newReq, err := http.NewRequest("GET", discoveryURL.String(), nil) @@ -298,7 +315,7 @@ func (c *AvailableConditionController) sync(key string) error { // setting the system-masters identity ensures that we will always have access rights transport.SetAuthProxyHeaders(newReq, "system:kube-aggregator", []string{"system:masters"}, nil) - resp, err := c.discoveryClient.Do(newReq) + resp, err := discoveryClient.Do(newReq) if resp != nil { resp.Body.Close() // we should always been in the 200s or 300s diff --git a/vendor/k8s.io/kube-aggregator/pkg/controllers/status/metrics.go b/vendor/k8s.io/kube-aggregator/pkg/controllers/status/metrics.go index d6727af576f..3a601a9ad9d 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/controllers/status/metrics.go +++ b/vendor/k8s.io/kube-aggregator/pkg/controllers/status/metrics.go @@ -32,7 +32,7 @@ import ( var ( unavailableCounter = metrics.NewCounterVec( &metrics.CounterOpts{ - Name: "aggregator_unavailable_apiservice_count", + Name: "aggregator_unavailable_apiservice_total", Help: "Counter of APIServices which are marked as unavailable broken down by APIService name and reason.", StabilityLevel: metrics.ALPHA, }, diff --git a/vendor/k8s.io/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go b/vendor/k8s.io/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go index dd3562391a1..7fefca5ce49 100644 --- a/vendor/k8s.io/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go +++ b/vendor/k8s.io/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go @@ -48,6 +48,9 @@ func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) *REST CreateStrategy: strategy, UpdateStrategy: strategy, DeleteStrategy: strategy, + + // TODO: define table converter that exposes more than name/creation timestamp + TableConvertor: rest.NewDefaultTableConvertor(apiregistration.Resource("apiservices")), } options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: apiservice.GetAttrs} if err := store.CompleteWithOptions(options); err != nil { diff --git a/vendor/k8s.io/kube-controller-manager/config/v1alpha1/types.go b/vendor/k8s.io/kube-controller-manager/config/v1alpha1/types.go index f99980bec8e..a92805d8c0f 100644 --- a/vendor/k8s.io/kube-controller-manager/config/v1alpha1/types.go +++ b/vendor/k8s.io/kube-controller-manager/config/v1alpha1/types.go @@ -114,6 +114,9 @@ type KubeControllerManagerConfiguration struct { // EndpointSliceControllerConfiguration holds configuration for // EndpointSliceController related features. EndpointSliceController EndpointSliceControllerConfiguration + // EndpointSliceMirroringControllerConfiguration holds configuration for + // EndpointSliceMirroringController related features. + EndpointSliceMirroringController EndpointSliceMirroringControllerConfiguration // GarbageCollectorControllerConfiguration holds configuration for // GarbageCollectorController related features. GarbageCollectorController GarbageCollectorControllerConfiguration @@ -243,11 +246,31 @@ type CSRSigningControllerConfiguration struct { // clusterSigningCertFile is the filename containing a PEM-encoded // RSA or ECDSA private key used to issue cluster-scoped certificates ClusterSigningKeyFile string + + // kubeletServingSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kubelet-serving signer + KubeletServingSignerConfiguration CSRSigningConfiguration + // kubeletClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client-kubelet + KubeletClientSignerConfiguration CSRSigningConfiguration + // kubeAPIServerClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client + KubeAPIServerClientSignerConfiguration CSRSigningConfiguration + // legacyUnknownSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/legacy-unknown + LegacyUnknownSignerConfiguration CSRSigningConfiguration + // clusterSigningDuration is the length of duration signed certificates // will be given. ClusterSigningDuration metav1.Duration } +// CSRSigningConfiguration holds information about a particular CSR signer +type CSRSigningConfiguration struct { + // certFile is the filename containing a PEM-encoded + // X509 CA certificate used to issue certificates + CertFile string + // keyFile is the filename containing a PEM-encoded + // RSA or ECDSA private key used to issue certificates + KeyFile string +} + // DaemonSetControllerConfiguration contains elements describing DaemonSetController. type DaemonSetControllerConfiguration struct { // concurrentDaemonSetSyncs is the number of daemonset objects that are @@ -319,6 +342,27 @@ type EndpointSliceControllerConfiguration struct { EndpointUpdatesBatchPeriod metav1.Duration } +// EndpointSliceMirroringControllerConfiguration contains elements describing +// EndpointSliceMirroringController. +type EndpointSliceMirroringControllerConfiguration struct { + // mirroringConcurrentServiceEndpointSyncs is the number of service endpoint + // syncing operations that will be done concurrently. Larger number = faster + // endpoint slice updating, but more CPU (and network) load. + MirroringConcurrentServiceEndpointSyncs int32 + + // mirroringMaxEndpointsPerSubset is the maximum number of endpoints that + // will be mirrored to an EndpointSlice for an EndpointSubset. + MirroringMaxEndpointsPerSubset int32 + + // mirroringEndpointUpdatesBatchPeriod can be used to batch EndpointSlice + // updates. All updates triggered by EndpointSlice changes will be delayed + // by up to 'mirroringEndpointUpdatesBatchPeriod'. If other addresses in the + // same Endpoints resource change in that period, they will be batched to a + // single EndpointSlice update. Default 0 value means that each Endpoints + // update triggers an EndpointSlice update. + MirroringEndpointUpdatesBatchPeriod metav1.Duration +} + // GarbageCollectorControllerConfiguration contains elements describing GarbageCollectorController. type GarbageCollectorControllerConfiguration struct { // enables the generic garbage collector. MUST be synced with the diff --git a/vendor/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go index afbba171c9d..5e7fc064d95 100644 --- a/vendor/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go @@ -41,9 +41,29 @@ func (in *AttachDetachControllerConfiguration) DeepCopy() *AttachDetachControlle return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CSRSigningConfiguration) DeepCopyInto(out *CSRSigningConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSRSigningConfiguration. +func (in *CSRSigningConfiguration) DeepCopy() *CSRSigningConfiguration { + if in == nil { + return nil + } + out := new(CSRSigningConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CSRSigningControllerConfiguration) DeepCopyInto(out *CSRSigningControllerConfiguration) { *out = *in + out.KubeletServingSignerConfiguration = in.KubeletServingSignerConfiguration + out.KubeletClientSignerConfiguration = in.KubeletClientSignerConfiguration + out.KubeAPIServerClientSignerConfiguration = in.KubeAPIServerClientSignerConfiguration + out.LegacyUnknownSignerConfiguration = in.LegacyUnknownSignerConfiguration out.ClusterSigningDuration = in.ClusterSigningDuration return } @@ -157,6 +177,23 @@ func (in *EndpointSliceControllerConfiguration) DeepCopy() *EndpointSliceControl return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointSliceMirroringControllerConfiguration) DeepCopyInto(out *EndpointSliceMirroringControllerConfiguration) { + *out = *in + out.MirroringEndpointUpdatesBatchPeriod = in.MirroringEndpointUpdatesBatchPeriod + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSliceMirroringControllerConfiguration. +func (in *EndpointSliceMirroringControllerConfiguration) DeepCopy() *EndpointSliceMirroringControllerConfiguration { + if in == nil { + return nil + } + out := new(EndpointSliceMirroringControllerConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GarbageCollectorControllerConfiguration) DeepCopyInto(out *GarbageCollectorControllerConfiguration) { *out = *in @@ -307,6 +344,7 @@ func (in *KubeControllerManagerConfiguration) DeepCopyInto(out *KubeControllerMa out.DeprecatedController = in.DeprecatedController out.EndpointController = in.EndpointController out.EndpointSliceController = in.EndpointSliceController + out.EndpointSliceMirroringController = in.EndpointSliceMirroringController in.GarbageCollectorController.DeepCopyInto(&out.GarbageCollectorController) in.HPAController.DeepCopyInto(&out.HPAController) out.JobController = in.JobController diff --git a/vendor/k8s.io/kube-openapi/pkg/handler/handler.go b/vendor/k8s.io/kube-openapi/pkg/handler/handler.go index 853d0dbef0b..7cd1bbd0ff0 100644 --- a/vendor/k8s.io/kube-openapi/pkg/handler/handler.go +++ b/vendor/k8s.io/kube-openapi/pkg/handler/handler.go @@ -30,9 +30,9 @@ import ( "github.com/emicklei/go-restful" "github.com/go-openapi/spec" "github.com/golang/protobuf/proto" - "github.com/googleapis/gnostic/OpenAPIv2" "github.com/googleapis/gnostic/compiler" - "github.com/json-iterator/go" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" + jsoniter "github.com/json-iterator/go" "github.com/munnerz/goautoneg" "gopkg.in/yaml.v2" diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go index c51239c28a7..1e9c0373758 100644 --- a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go +++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go @@ -24,7 +24,7 @@ import ( "strings" "k8s.io/kube-openapi/pkg/util/proto" - "sigs.k8s.io/structured-merge-diff/v3/schema" + "sigs.k8s.io/structured-merge-diff/v4/schema" ) // ToSchema converts openapi definitions into a schema suitable for structured @@ -263,7 +263,7 @@ func makeUnion(extensions map[string]interface{}) (schema.Union, error) { return schema.Union{}, fmt.Errorf(`"fields-to-discriminateBy"/%v: value must be a string, got: %#v`, field, value) } union.Fields = append(union.Fields, schema.UnionField{ - FieldName: field, + FieldName: field, DiscriminatorValue: discriminated, }) diff --git a/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go b/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go index 5eb957affbc..6df0df389a2 100644 --- a/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go +++ b/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go @@ -21,7 +21,7 @@ import ( "sort" "strings" - "github.com/googleapis/gnostic/OpenAPIv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" "gopkg.in/yaml.v2" ) diff --git a/vendor/k8s.io/kube-proxy/config/v1alpha1/types.go b/vendor/k8s.io/kube-proxy/config/v1alpha1/types.go index 7b29591d966..53991571dc0 100644 --- a/vendor/k8s.io/kube-proxy/config/v1alpha1/types.go +++ b/vendor/k8s.io/kube-proxy/config/v1alpha1/types.go @@ -116,6 +116,8 @@ type KubeProxyConfiguration struct { // metricsBindAddress is the IP address and port for the metrics server to serve on, // defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces) MetricsBindAddress string `json:"metricsBindAddress"` + // bindAddressHardFail, if true, kube-proxy will treat failure to bind to a port as fatal and exit + BindAddressHardFail bool `json:"bindAddressHardFail"` // enableProfiling enables profiling via web interface on /debug/pprof handler. // Profiling handlers will be handled by metrics server. EnableProfiling bool `json:"enableProfiling"` diff --git a/vendor/k8s.io/kube-scheduler/config/v1/types.go b/vendor/k8s.io/kube-scheduler/config/v1/types.go index a7dbdbb97f7..353bab4a384 100644 --- a/vendor/k8s.io/kube-scheduler/config/v1/types.go +++ b/vendor/k8s.io/kube-scheduler/config/v1/types.go @@ -33,7 +33,7 @@ type Policy struct { // Holds the information to configure the priority functions Priorities []PriorityPolicy `json:"priorities"` // Holds the information to communicate with the extender(s) - Extenders []Extender `json:"extenders"` + Extenders []LegacyExtender `json:"extenders"` // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 1-100. @@ -185,9 +185,9 @@ type ExtenderTLSConfig struct { CAData []byte `json:"caData,omitempty"` } -// Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, +// LegacyExtender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, // it is assumed that the extender chose not to provide that extension. -type Extender struct { +type LegacyExtender struct { // URLPrefix at which the extender is available URLPrefix string `json:"urlPrefix"` // Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender. @@ -233,10 +233,10 @@ type Extender struct { // to preserve compatibility with incorrectly specified scheduler config fields: // * BindVerb, which originally did not specify a json tag, and required upper-case serialization in 1.7 // * TLSConfig, which uses a struct not intended for serialization, and does not include any json tags -type caseInsensitiveExtender *Extender +type caseInsensitiveExtender *LegacyExtender // UnmarshalJSON implements the json.Unmarshaller interface. // This preserves compatibility with incorrect case-insensitive configuration fields. -func (t *Extender) UnmarshalJSON(b []byte) error { +func (t *LegacyExtender) UnmarshalJSON(b []byte) error { return gojson.Unmarshal(b, caseInsensitiveExtender(t)) } diff --git a/vendor/k8s.io/kube-scheduler/config/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kube-scheduler/config/v1/zz_generated.deepcopy.go index 211db388ba2..652dd0c483c 100644 --- a/vendor/k8s.io/kube-scheduler/config/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kube-scheduler/config/v1/zz_generated.deepcopy.go @@ -24,32 +24,6 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Extender) DeepCopyInto(out *Extender) { - *out = *in - if in.TLSConfig != nil { - in, out := &in.TLSConfig, &out.TLSConfig - *out = new(ExtenderTLSConfig) - (*in).DeepCopyInto(*out) - } - if in.ManagedResources != nil { - in, out := &in.ManagedResources, &out.ManagedResources - *out = make([]ExtenderManagedResource, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Extender. -func (in *Extender) DeepCopy() *Extender { - if in == nil { - return nil - } - out := new(Extender) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExtenderManagedResource) DeepCopyInto(out *ExtenderManagedResource) { *out = *in @@ -134,6 +108,32 @@ func (in *LabelsPresence) DeepCopy() *LabelsPresence { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LegacyExtender) DeepCopyInto(out *LegacyExtender) { + *out = *in + if in.TLSConfig != nil { + in, out := &in.TLSConfig, &out.TLSConfig + *out = new(ExtenderTLSConfig) + (*in).DeepCopyInto(*out) + } + if in.ManagedResources != nil { + in, out := &in.ManagedResources, &out.ManagedResources + *out = make([]ExtenderManagedResource, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegacyExtender. +func (in *LegacyExtender) DeepCopy() *LegacyExtender { + if in == nil { + return nil + } + out := new(LegacyExtender) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Policy) DeepCopyInto(out *Policy) { *out = *in @@ -154,7 +154,7 @@ func (in *Policy) DeepCopyInto(out *Policy) { } if in.Extenders != nil { in, out := &in.Extenders, &out.Extenders - *out = make([]Extender, len(*in)) + *out = make([]LegacyExtender, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/vendor/k8s.io/kube-scheduler/config/v1alpha1/types.go b/vendor/k8s.io/kube-scheduler/config/v1alpha1/types.go deleted file mode 100644 index 9701792aa7a..00000000000 --- a/vendor/k8s.io/kube-scheduler/config/v1alpha1/types.go +++ /dev/null @@ -1,228 +0,0 @@ -/* -Copyright 2018 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 v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1" -) - -const ( - // SchedulerDefaultLockObjectNamespace defines default scheduler lock object namespace ("kube-system") - SchedulerDefaultLockObjectNamespace string = metav1.NamespaceSystem - - // SchedulerDefaultLockObjectName defines default scheduler lock object name ("kube-scheduler") - SchedulerDefaultLockObjectName = "kube-scheduler" - - // SchedulerDefaultProviderName defines the default provider names - SchedulerDefaultProviderName = "DefaultProvider" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// KubeSchedulerConfiguration configures a scheduler -type KubeSchedulerConfiguration struct { - metav1.TypeMeta `json:",inline"` - - // SchedulerName is name of the scheduler, used to select which pods - // will be processed by this scheduler, based on pod's "spec.SchedulerName". - SchedulerName *string `json:"schedulerName,omitempty"` - // AlgorithmSource specifies the scheduler algorithm source. - AlgorithmSource SchedulerAlgorithmSource `json:"algorithmSource"` - // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule - // corresponding to every RequiredDuringScheduling affinity rule. - // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100. - HardPodAffinitySymmetricWeight *int32 `json:"hardPodAffinitySymmetricWeight,omitempty"` - - // LeaderElection defines the configuration of leader election client. - LeaderElection KubeSchedulerLeaderElectionConfiguration `json:"leaderElection"` - - // ClientConnection specifies the kubeconfig file and client connection - // settings for the proxy server to use when communicating with the apiserver. - ClientConnection componentbaseconfigv1alpha1.ClientConnectionConfiguration `json:"clientConnection"` - // HealthzBindAddress is the IP address and port for the health check server to serve on, - // defaulting to 0.0.0.0:10251 - HealthzBindAddress *string `json:"healthzBindAddress,omitempty"` - // MetricsBindAddress is the IP address and port for the metrics server to - // serve on, defaulting to 0.0.0.0:10251. - MetricsBindAddress *string `json:"metricsBindAddress,omitempty"` - - // DebuggingConfiguration holds configuration for Debugging related features - // TODO: We might wanna make this a substruct like Debugging componentbaseconfigv1alpha1.DebuggingConfiguration - componentbaseconfigv1alpha1.DebuggingConfiguration `json:",inline"` - - // DisablePreemption disables the pod preemption feature. - DisablePreemption *bool `json:"disablePreemption,omitempty"` - - // PercentageOfNodeToScore is the percentage of all nodes that once found feasible - // for running a pod, the scheduler stops its search for more feasible nodes in - // the cluster. This helps improve scheduler's performance. Scheduler always tries to find - // at least "minFeasibleNodesToFind" feasible nodes no matter what the value of this flag is. - // Example: if the cluster size is 500 nodes and the value of this flag is 30, - // then scheduler stops finding further feasible nodes once it finds 150 feasible ones. - // When the value is 0, default percentage (5%--50% based on the size of the cluster) of the - // nodes will be scored. - PercentageOfNodesToScore *int32 `json:"percentageOfNodesToScore,omitempty"` - - // Duration to wait for a binding operation to complete before timing out - // Value must be non-negative integer. The value zero indicates no waiting. - // If this value is nil, the default value will be used. - BindTimeoutSeconds *int64 `json:"bindTimeoutSeconds"` - - // PodInitialBackoffSeconds is the initial backoff for unschedulable pods. - // If specified, it must be greater than 0. If this value is null, the default value (1s) - // will be used. - PodInitialBackoffSeconds *int64 `json:"podInitialBackoffSeconds"` - - // PodMaxBackoffSeconds is the max backoff for unschedulable pods. - // If specified, it must be greater than podInitialBackoffSeconds. If this value is null, - // the default value (10s) will be used. - PodMaxBackoffSeconds *int64 `json:"podMaxBackoffSeconds"` - - // Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the - // ones that should be enabled in addition to the default plugins. Disabled plugins are any of the - // default plugins that should be disabled. - // When no enabled or disabled plugin is specified for an extension point, default plugins for - // that extension point will be used if there is any. - Plugins *Plugins `json:"plugins,omitempty"` - - // PluginConfig is an optional set of custom plugin arguments for each plugin. - // Omitting config args for a plugin is equivalent to using the default config for that plugin. - // +listType=map - // +listMapKey=name - PluginConfig []PluginConfig `json:"pluginConfig,omitempty"` -} - -// SchedulerAlgorithmSource is the source of a scheduler algorithm. One source -// field must be specified, and source fields are mutually exclusive. -type SchedulerAlgorithmSource struct { - // Policy is a policy based algorithm source. - Policy *SchedulerPolicySource `json:"policy,omitempty"` - // Provider is the name of a scheduling algorithm provider to use. - Provider *string `json:"provider,omitempty"` -} - -// SchedulerPolicySource configures a means to obtain a scheduler Policy. One -// source field must be specified, and source fields are mutually exclusive. -type SchedulerPolicySource struct { - // File is a file policy source. - File *SchedulerPolicyFileSource `json:"file,omitempty"` - // ConfigMap is a config map policy source. - ConfigMap *SchedulerPolicyConfigMapSource `json:"configMap,omitempty"` -} - -// SchedulerPolicyFileSource is a policy serialized to disk and accessed via -// path. -type SchedulerPolicyFileSource struct { - // Path is the location of a serialized policy. - Path string `json:"path"` -} - -// SchedulerPolicyConfigMapSource is a policy serialized into a config map value -// under the SchedulerPolicyConfigMapKey key. -type SchedulerPolicyConfigMapSource struct { - // Namespace is the namespace of the policy config map. - Namespace string `json:"namespace"` - // Name is the name of hte policy config map. - Name string `json:"name"` -} - -// KubeSchedulerLeaderElectionConfiguration expands LeaderElectionConfiguration -// to include scheduler specific configuration. -type KubeSchedulerLeaderElectionConfiguration struct { - componentbaseconfigv1alpha1.LeaderElectionConfiguration `json:",inline"` - // LockObjectNamespace defines the namespace of the lock object - // DEPRECATED: will be removed in favor of resourceNamespace - LockObjectNamespace string `json:"lockObjectNamespace"` - // LockObjectName defines the lock object name - // DEPRECATED: will be removed in favor of resourceName - LockObjectName string `json:"lockObjectName"` -} - -// Plugins include multiple extension points. When specified, the list of plugins for -// a particular extension point are the only ones enabled. If an extension point is -// omitted from the config, then the default set of plugins is used for that extension point. -// Enabled plugins are called in the order specified here, after default plugins. If they need to -// be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order. -type Plugins struct { - // QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue. - QueueSort *PluginSet `json:"queueSort,omitempty"` - - // PreFilter is a list of plugins that should be invoked at "PreFilter" extension point of the scheduling framework. - PreFilter *PluginSet `json:"preFilter,omitempty"` - - // Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod. - Filter *PluginSet `json:"filter,omitempty"` - - // PostFilter is a list of plugins that are invoked after filtering out infeasible nodes. - PostFilter *PluginSet `json:"postFilter,omitempty"` - - // Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase. - Score *PluginSet `json:"score,omitempty"` - - // Reserve is a list of plugins invoked when reserving a node to run the pod. - Reserve *PluginSet `json:"reserve,omitempty"` - - // Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod. - Permit *PluginSet `json:"permit,omitempty"` - - // PreBind is a list of plugins that should be invoked before a pod is bound. - PreBind *PluginSet `json:"preBind,omitempty"` - - // Bind is a list of plugins that should be invoked at "Bind" extension point of the scheduling framework. - // The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success. - Bind *PluginSet `json:"bind,omitempty"` - - // PostBind is a list of plugins that should be invoked after a pod is successfully bound. - PostBind *PluginSet `json:"postBind,omitempty"` - - // Unreserve is a list of plugins invoked when a pod that was previously reserved is rejected in a later phase. - Unreserve *PluginSet `json:"unreserve,omitempty"` -} - -// PluginSet specifies enabled and disabled plugins for an extension point. -// If an array is empty, missing, or nil, default plugins at that extension point will be used. -type PluginSet struct { - // Enabled specifies plugins that should be enabled in addition to default plugins. - // These are called after default plugins and in the same order specified here. - // +listType=atomic - Enabled []Plugin `json:"enabled,omitempty"` - // Disabled specifies default plugins that should be disabled. - // When all default plugins need to be disabled, an array containing only one "*" should be provided. - // +listType=map - // +listMapKey=name - Disabled []Plugin `json:"disabled,omitempty"` -} - -// Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins. -type Plugin struct { - // Name defines the name of plugin - Name string `json:"name"` - // Weight defines the weight of plugin, only used for Score plugins. - Weight *int32 `json:"weight,omitempty"` -} - -// PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. -// A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. -// It is up to the plugin to process these Args. -type PluginConfig struct { - // Name defines the name of plugin being configured - Name string `json:"name"` - // Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure. - Args runtime.Unknown `json:"args,omitempty"` -} diff --git a/vendor/k8s.io/kube-scheduler/config/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kube-scheduler/config/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index f81f35e5802..00000000000 --- a/vendor/k8s.io/kube-scheduler/config/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,351 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeSchedulerConfiguration) DeepCopyInto(out *KubeSchedulerConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.SchedulerName != nil { - in, out := &in.SchedulerName, &out.SchedulerName - *out = new(string) - **out = **in - } - in.AlgorithmSource.DeepCopyInto(&out.AlgorithmSource) - if in.HardPodAffinitySymmetricWeight != nil { - in, out := &in.HardPodAffinitySymmetricWeight, &out.HardPodAffinitySymmetricWeight - *out = new(int32) - **out = **in - } - in.LeaderElection.DeepCopyInto(&out.LeaderElection) - out.ClientConnection = in.ClientConnection - if in.HealthzBindAddress != nil { - in, out := &in.HealthzBindAddress, &out.HealthzBindAddress - *out = new(string) - **out = **in - } - if in.MetricsBindAddress != nil { - in, out := &in.MetricsBindAddress, &out.MetricsBindAddress - *out = new(string) - **out = **in - } - in.DebuggingConfiguration.DeepCopyInto(&out.DebuggingConfiguration) - if in.DisablePreemption != nil { - in, out := &in.DisablePreemption, &out.DisablePreemption - *out = new(bool) - **out = **in - } - if in.PercentageOfNodesToScore != nil { - in, out := &in.PercentageOfNodesToScore, &out.PercentageOfNodesToScore - *out = new(int32) - **out = **in - } - if in.BindTimeoutSeconds != nil { - in, out := &in.BindTimeoutSeconds, &out.BindTimeoutSeconds - *out = new(int64) - **out = **in - } - if in.PodInitialBackoffSeconds != nil { - in, out := &in.PodInitialBackoffSeconds, &out.PodInitialBackoffSeconds - *out = new(int64) - **out = **in - } - if in.PodMaxBackoffSeconds != nil { - in, out := &in.PodMaxBackoffSeconds, &out.PodMaxBackoffSeconds - *out = new(int64) - **out = **in - } - if in.Plugins != nil { - in, out := &in.Plugins, &out.Plugins - *out = new(Plugins) - (*in).DeepCopyInto(*out) - } - if in.PluginConfig != nil { - in, out := &in.PluginConfig, &out.PluginConfig - *out = make([]PluginConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerConfiguration. -func (in *KubeSchedulerConfiguration) DeepCopy() *KubeSchedulerConfiguration { - if in == nil { - return nil - } - out := new(KubeSchedulerConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeSchedulerConfiguration) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeSchedulerLeaderElectionConfiguration) DeepCopyInto(out *KubeSchedulerLeaderElectionConfiguration) { - *out = *in - in.LeaderElectionConfiguration.DeepCopyInto(&out.LeaderElectionConfiguration) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerLeaderElectionConfiguration. -func (in *KubeSchedulerLeaderElectionConfiguration) DeepCopy() *KubeSchedulerLeaderElectionConfiguration { - if in == nil { - return nil - } - out := new(KubeSchedulerLeaderElectionConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Plugin) DeepCopyInto(out *Plugin) { - *out = *in - if in.Weight != nil { - in, out := &in.Weight, &out.Weight - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugin. -func (in *Plugin) DeepCopy() *Plugin { - if in == nil { - return nil - } - out := new(Plugin) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PluginConfig) DeepCopyInto(out *PluginConfig) { - *out = *in - in.Args.DeepCopyInto(&out.Args) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginConfig. -func (in *PluginConfig) DeepCopy() *PluginConfig { - if in == nil { - return nil - } - out := new(PluginConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PluginSet) DeepCopyInto(out *PluginSet) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]Plugin, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]Plugin, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginSet. -func (in *PluginSet) DeepCopy() *PluginSet { - if in == nil { - return nil - } - out := new(PluginSet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Plugins) DeepCopyInto(out *Plugins) { - *out = *in - if in.QueueSort != nil { - in, out := &in.QueueSort, &out.QueueSort - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.PreFilter != nil { - in, out := &in.PreFilter, &out.PreFilter - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Filter != nil { - in, out := &in.Filter, &out.Filter - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.PostFilter != nil { - in, out := &in.PostFilter, &out.PostFilter - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Score != nil { - in, out := &in.Score, &out.Score - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Reserve != nil { - in, out := &in.Reserve, &out.Reserve - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Permit != nil { - in, out := &in.Permit, &out.Permit - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.PreBind != nil { - in, out := &in.PreBind, &out.PreBind - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Bind != nil { - in, out := &in.Bind, &out.Bind - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.PostBind != nil { - in, out := &in.PostBind, &out.PostBind - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Unreserve != nil { - in, out := &in.Unreserve, &out.Unreserve - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugins. -func (in *Plugins) DeepCopy() *Plugins { - if in == nil { - return nil - } - out := new(Plugins) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SchedulerAlgorithmSource) DeepCopyInto(out *SchedulerAlgorithmSource) { - *out = *in - if in.Policy != nil { - in, out := &in.Policy, &out.Policy - *out = new(SchedulerPolicySource) - (*in).DeepCopyInto(*out) - } - if in.Provider != nil { - in, out := &in.Provider, &out.Provider - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerAlgorithmSource. -func (in *SchedulerAlgorithmSource) DeepCopy() *SchedulerAlgorithmSource { - if in == nil { - return nil - } - out := new(SchedulerAlgorithmSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SchedulerPolicyConfigMapSource) DeepCopyInto(out *SchedulerPolicyConfigMapSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerPolicyConfigMapSource. -func (in *SchedulerPolicyConfigMapSource) DeepCopy() *SchedulerPolicyConfigMapSource { - if in == nil { - return nil - } - out := new(SchedulerPolicyConfigMapSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SchedulerPolicyFileSource) DeepCopyInto(out *SchedulerPolicyFileSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerPolicyFileSource. -func (in *SchedulerPolicyFileSource) DeepCopy() *SchedulerPolicyFileSource { - if in == nil { - return nil - } - out := new(SchedulerPolicyFileSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SchedulerPolicySource) DeepCopyInto(out *SchedulerPolicySource) { - *out = *in - if in.File != nil { - in, out := &in.File, &out.File - *out = new(SchedulerPolicyFileSource) - **out = **in - } - if in.ConfigMap != nil { - in, out := &in.ConfigMap, &out.ConfigMap - *out = new(SchedulerPolicyConfigMapSource) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerPolicySource. -func (in *SchedulerPolicySource) DeepCopy() *SchedulerPolicySource { - if in == nil { - return nil - } - out := new(SchedulerPolicySource) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/kube-scheduler/config/v1alpha2/zz_generated.deepcopy.go b/vendor/k8s.io/kube-scheduler/config/v1alpha2/zz_generated.deepcopy.go deleted file mode 100644 index afd67b9d390..00000000000 --- a/vendor/k8s.io/kube-scheduler/config/v1alpha2/zz_generated.deepcopy.go +++ /dev/null @@ -1,292 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kube-scheduler/config/v1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeSchedulerConfiguration) DeepCopyInto(out *KubeSchedulerConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta - in.LeaderElection.DeepCopyInto(&out.LeaderElection) - out.ClientConnection = in.ClientConnection - if in.HealthzBindAddress != nil { - in, out := &in.HealthzBindAddress, &out.HealthzBindAddress - *out = new(string) - **out = **in - } - if in.MetricsBindAddress != nil { - in, out := &in.MetricsBindAddress, &out.MetricsBindAddress - *out = new(string) - **out = **in - } - in.DebuggingConfiguration.DeepCopyInto(&out.DebuggingConfiguration) - if in.DisablePreemption != nil { - in, out := &in.DisablePreemption, &out.DisablePreemption - *out = new(bool) - **out = **in - } - if in.PercentageOfNodesToScore != nil { - in, out := &in.PercentageOfNodesToScore, &out.PercentageOfNodesToScore - *out = new(int32) - **out = **in - } - if in.BindTimeoutSeconds != nil { - in, out := &in.BindTimeoutSeconds, &out.BindTimeoutSeconds - *out = new(int64) - **out = **in - } - if in.PodInitialBackoffSeconds != nil { - in, out := &in.PodInitialBackoffSeconds, &out.PodInitialBackoffSeconds - *out = new(int64) - **out = **in - } - if in.PodMaxBackoffSeconds != nil { - in, out := &in.PodMaxBackoffSeconds, &out.PodMaxBackoffSeconds - *out = new(int64) - **out = **in - } - if in.Profiles != nil { - in, out := &in.Profiles, &out.Profiles - *out = make([]KubeSchedulerProfile, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Extenders != nil { - in, out := &in.Extenders, &out.Extenders - *out = make([]v1.Extender, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerConfiguration. -func (in *KubeSchedulerConfiguration) DeepCopy() *KubeSchedulerConfiguration { - if in == nil { - return nil - } - out := new(KubeSchedulerConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeSchedulerConfiguration) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeSchedulerLeaderElectionConfiguration) DeepCopyInto(out *KubeSchedulerLeaderElectionConfiguration) { - *out = *in - in.LeaderElectionConfiguration.DeepCopyInto(&out.LeaderElectionConfiguration) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerLeaderElectionConfiguration. -func (in *KubeSchedulerLeaderElectionConfiguration) DeepCopy() *KubeSchedulerLeaderElectionConfiguration { - if in == nil { - return nil - } - out := new(KubeSchedulerLeaderElectionConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeSchedulerProfile) DeepCopyInto(out *KubeSchedulerProfile) { - *out = *in - if in.SchedulerName != nil { - in, out := &in.SchedulerName, &out.SchedulerName - *out = new(string) - **out = **in - } - if in.Plugins != nil { - in, out := &in.Plugins, &out.Plugins - *out = new(Plugins) - (*in).DeepCopyInto(*out) - } - if in.PluginConfig != nil { - in, out := &in.PluginConfig, &out.PluginConfig - *out = make([]PluginConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerProfile. -func (in *KubeSchedulerProfile) DeepCopy() *KubeSchedulerProfile { - if in == nil { - return nil - } - out := new(KubeSchedulerProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Plugin) DeepCopyInto(out *Plugin) { - *out = *in - if in.Weight != nil { - in, out := &in.Weight, &out.Weight - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugin. -func (in *Plugin) DeepCopy() *Plugin { - if in == nil { - return nil - } - out := new(Plugin) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PluginConfig) DeepCopyInto(out *PluginConfig) { - *out = *in - in.Args.DeepCopyInto(&out.Args) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginConfig. -func (in *PluginConfig) DeepCopy() *PluginConfig { - if in == nil { - return nil - } - out := new(PluginConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PluginSet) DeepCopyInto(out *PluginSet) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]Plugin, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]Plugin, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginSet. -func (in *PluginSet) DeepCopy() *PluginSet { - if in == nil { - return nil - } - out := new(PluginSet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Plugins) DeepCopyInto(out *Plugins) { - *out = *in - if in.QueueSort != nil { - in, out := &in.QueueSort, &out.QueueSort - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.PreFilter != nil { - in, out := &in.PreFilter, &out.PreFilter - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Filter != nil { - in, out := &in.Filter, &out.Filter - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.PreScore != nil { - in, out := &in.PreScore, &out.PreScore - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Score != nil { - in, out := &in.Score, &out.Score - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Reserve != nil { - in, out := &in.Reserve, &out.Reserve - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Permit != nil { - in, out := &in.Permit, &out.Permit - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.PreBind != nil { - in, out := &in.PreBind, &out.PreBind - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Bind != nil { - in, out := &in.Bind, &out.Bind - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.PostBind != nil { - in, out := &in.PostBind, &out.PostBind - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - if in.Unreserve != nil { - in, out := &in.Unreserve, &out.Unreserve - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugins. -func (in *Plugins) DeepCopy() *Plugins { - if in == nil { - return nil - } - out := new(Plugins) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/kube-scheduler/config/v1alpha2/BUILD b/vendor/k8s.io/kube-scheduler/config/v1beta1/BUILD similarity index 81% rename from vendor/k8s.io/kube-scheduler/config/v1alpha2/BUILD rename to vendor/k8s.io/kube-scheduler/config/v1beta1/BUILD index 40f30aec12a..67f9f8455fd 100644 --- a/vendor/k8s.io/kube-scheduler/config/v1alpha2/BUILD +++ b/vendor/k8s.io/kube-scheduler/config/v1beta1/BUILD @@ -6,17 +6,20 @@ go_library( "doc.go", "register.go", "types.go", + "types_pluginargs.go", "zz_generated.deepcopy.go", ], - importmap = "k8s.io/kubernetes/vendor/k8s.io/kube-scheduler/config/v1alpha2", - importpath = "k8s.io/kube-scheduler/config/v1alpha2", + importmap = "k8s.io/kubernetes/vendor/k8s.io/kube-scheduler/config/v1beta1", + importpath = "k8s.io/kube-scheduler/config/v1beta1", visibility = ["//visibility:public"], deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/component-base/config/v1alpha1:go_default_library", "//staging/src/k8s.io/kube-scheduler/config/v1:go_default_library", + "//vendor/sigs.k8s.io/yaml:go_default_library", ], ) diff --git a/vendor/k8s.io/kube-scheduler/config/v1alpha2/doc.go b/vendor/k8s.io/kube-scheduler/config/v1beta1/doc.go similarity index 90% rename from vendor/k8s.io/kube-scheduler/config/v1alpha2/doc.go rename to vendor/k8s.io/kube-scheduler/config/v1beta1/doc.go index 5e2589c275f..c3bac316d97 100644 --- a/vendor/k8s.io/kube-scheduler/config/v1alpha2/doc.go +++ b/vendor/k8s.io/kube-scheduler/config/v1beta1/doc.go @@ -18,4 +18,4 @@ limitations under the License. // +k8s:openapi-gen=true // +groupName=kubescheduler.config.k8s.io -package v1alpha2 // import "k8s.io/kube-scheduler/config/v1alpha2" +package v1beta1 // import "k8s.io/kube-scheduler/config/v1beta1" diff --git a/vendor/k8s.io/kube-scheduler/config/v1alpha2/register.go b/vendor/k8s.io/kube-scheduler/config/v1beta1/register.go similarity index 82% rename from vendor/k8s.io/kube-scheduler/config/v1alpha2/register.go rename to vendor/k8s.io/kube-scheduler/config/v1beta1/register.go index d5715c4e43b..98a8f7b22e9 100644 --- a/vendor/k8s.io/kube-scheduler/config/v1alpha2/register.go +++ b/vendor/k8s.io/kube-scheduler/config/v1beta1/register.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha2 +package v1beta1 import ( "k8s.io/apimachinery/pkg/runtime" @@ -25,7 +25,7 @@ import ( const GroupName = "kubescheduler.config.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} var ( // SchemeBuilder is the scheme builder with scheme init functions to run for this API package @@ -38,6 +38,15 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &KubeSchedulerConfiguration{}, + &InterPodAffinityArgs{}, + &NodeLabelArgs{}, + &NodeResourcesFitArgs{}, + &PodTopologySpreadArgs{}, + &RequestedToCapacityRatioArgs{}, + &ServiceAffinityArgs{}, + &NodeResourcesLeastAllocatedArgs{}, + &NodeResourcesMostAllocatedArgs{}, + &VolumeBindingArgs{}, ) return nil } diff --git a/vendor/k8s.io/kube-scheduler/config/v1alpha2/types.go b/vendor/k8s.io/kube-scheduler/config/v1beta1/types.go similarity index 60% rename from vendor/k8s.io/kube-scheduler/config/v1alpha2/types.go rename to vendor/k8s.io/kube-scheduler/config/v1beta1/types.go index 2474b716ad1..87965c73436 100644 --- a/vendor/k8s.io/kube-scheduler/config/v1alpha2/types.go +++ b/vendor/k8s.io/kube-scheduler/config/v1beta1/types.go @@ -14,13 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha2 +package v1beta1 import ( + "bytes" + "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1" v1 "k8s.io/kube-scheduler/config/v1" + "sigs.k8s.io/yaml" ) const ( @@ -41,7 +45,7 @@ type KubeSchedulerConfiguration struct { metav1.TypeMeta `json:",inline"` // LeaderElection defines the configuration of leader election client. - LeaderElection KubeSchedulerLeaderElectionConfiguration `json:"leaderElection"` + LeaderElection componentbaseconfigv1alpha1.LeaderElectionConfiguration `json:"leaderElection"` // ClientConnection specifies the kubeconfig file and client connection // settings for the proxy server to use when communicating with the apiserver. @@ -57,10 +61,7 @@ type KubeSchedulerConfiguration struct { // TODO: We might wanna make this a substruct like Debugging componentbaseconfigv1alpha1.DebuggingConfiguration componentbaseconfigv1alpha1.DebuggingConfiguration `json:",inline"` - // DisablePreemption disables the pod preemption feature. - DisablePreemption *bool `json:"disablePreemption,omitempty"` - - // PercentageOfNodeToScore is the percentage of all nodes that once found feasible + // PercentageOfNodesToScore is the percentage of all nodes that once found feasible // for running a pod, the scheduler stops its search for more feasible nodes in // the cluster. This helps improve scheduler's performance. Scheduler always tries to find // at least "minFeasibleNodesToFind" feasible nodes no matter what the value of this flag is. @@ -70,20 +71,15 @@ type KubeSchedulerConfiguration struct { // nodes will be scored. PercentageOfNodesToScore *int32 `json:"percentageOfNodesToScore,omitempty"` - // Duration to wait for a binding operation to complete before timing out - // Value must be non-negative integer. The value zero indicates no waiting. - // If this value is nil, the default value will be used. - BindTimeoutSeconds *int64 `json:"bindTimeoutSeconds"` - // PodInitialBackoffSeconds is the initial backoff for unschedulable pods. // If specified, it must be greater than 0. If this value is null, the default value (1s) // will be used. - PodInitialBackoffSeconds *int64 `json:"podInitialBackoffSeconds"` + PodInitialBackoffSeconds *int64 `json:"podInitialBackoffSeconds,omitempty"` // PodMaxBackoffSeconds is the max backoff for unschedulable pods. // If specified, it must be greater than podInitialBackoffSeconds. If this value is null, // the default value (10s) will be used. - PodMaxBackoffSeconds *int64 `json:"podMaxBackoffSeconds"` + PodMaxBackoffSeconds *int64 `json:"podMaxBackoffSeconds,omitempty"` // Profiles are scheduling profiles that kube-scheduler supports. Pods can // choose to be scheduled under a particular profile by setting its associated @@ -91,12 +87,40 @@ type KubeSchedulerConfiguration struct { // with the "default-scheduler" profile, if present here. // +listType=map // +listMapKey=schedulerName - Profiles []KubeSchedulerProfile `json:"profiles"` + Profiles []KubeSchedulerProfile `json:"profiles,omitempty"` // Extenders are the list of scheduler extenders, each holding the values of how to communicate // with the extender. These extenders are shared by all scheduler profiles. // +listType=set - Extenders []v1.Extender `json:"extenders"` + Extenders []Extender `json:"extenders,omitempty"` +} + +// DecodeNestedObjects decodes plugin args for known types. +func (c *KubeSchedulerConfiguration) DecodeNestedObjects(d runtime.Decoder) error { + for i := range c.Profiles { + prof := &c.Profiles[i] + for j := range prof.PluginConfig { + err := prof.PluginConfig[j].decodeNestedObjects(d) + if err != nil { + return fmt.Errorf("decoding .profiles[%d].pluginConfig[%d]: %w", i, j, err) + } + } + } + return nil +} + +// EncodeNestedObjects encodes plugin args. +func (c *KubeSchedulerConfiguration) EncodeNestedObjects(e runtime.Encoder) error { + for i := range c.Profiles { + prof := &c.Profiles[i] + for j := range prof.PluginConfig { + err := prof.PluginConfig[j].encodeNestedObjects(e) + if err != nil { + return fmt.Errorf("encoding .profiles[%d].pluginConfig[%d]: %w", i, j, err) + } + } + } + return nil } // KubeSchedulerProfile is a scheduling profile. @@ -124,12 +148,6 @@ type KubeSchedulerProfile struct { PluginConfig []PluginConfig `json:"pluginConfig,omitempty"` } -// KubeSchedulerLeaderElectionConfiguration expands LeaderElectionConfiguration -// to include scheduler specific configuration. -type KubeSchedulerLeaderElectionConfiguration struct { - componentbaseconfigv1alpha1.LeaderElectionConfiguration `json:",inline"` -} - // Plugins include multiple extension points. When specified, the list of plugins for // a particular extension point are the only ones enabled. If an extension point is // omitted from the config, then the default set of plugins is used for that extension point. @@ -145,13 +163,17 @@ type Plugins struct { // Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod. Filter *PluginSet `json:"filter,omitempty"` + // PostFilter is a list of plugins that are invoked after filtering phase, no matter whether filtering succeeds or not. + PostFilter *PluginSet `json:"postFilter,omitempty"` + // PreScore is a list of plugins that are invoked before scoring. PreScore *PluginSet `json:"preScore,omitempty"` // Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase. Score *PluginSet `json:"score,omitempty"` - // Reserve is a list of plugins invoked when reserving a node to run the pod. + // Reserve is a list of plugins invoked when reserving/unreserving resources + // after a node is assigned to run the pod. Reserve *PluginSet `json:"reserve,omitempty"` // Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod. @@ -166,9 +188,6 @@ type Plugins struct { // PostBind is a list of plugins that should be invoked after a pod is successfully bound. PostBind *PluginSet `json:"postBind,omitempty"` - - // Unreserve is a list of plugins invoked when a pod that was previously reserved is rejected in a later phase. - Unreserve *PluginSet `json:"unreserve,omitempty"` } // PluginSet specifies enabled and disabled plugins for an extension point. @@ -200,5 +219,88 @@ type PluginConfig struct { // Name defines the name of plugin being configured Name string `json:"name"` // Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure. - Args runtime.Unknown `json:"args,omitempty"` + Args runtime.RawExtension `json:"args,omitempty"` +} + +func (c *PluginConfig) decodeNestedObjects(d runtime.Decoder) error { + gvk := SchemeGroupVersion.WithKind(c.Name + "Args") + // dry-run to detect and skip out-of-tree plugin args. + if _, _, err := d.Decode(nil, &gvk, nil); runtime.IsNotRegisteredError(err) { + return nil + } + + obj, parsedGvk, err := d.Decode(c.Args.Raw, &gvk, nil) + if err != nil { + return fmt.Errorf("decoding args for plugin %s: %w", c.Name, err) + } + if parsedGvk.GroupKind() != gvk.GroupKind() { + return fmt.Errorf("args for plugin %s were not of type %s, got %s", c.Name, gvk.GroupKind(), parsedGvk.GroupKind()) + } + c.Args.Object = obj + return nil +} + +func (c *PluginConfig) encodeNestedObjects(e runtime.Encoder) error { + if c.Args.Object == nil { + return nil + } + var buf bytes.Buffer + err := e.Encode(c.Args.Object, &buf) + if err != nil { + return err + } + // The encoder might be a YAML encoder, but the parent encoder expects + // JSON output, so we convert YAML back to JSON. + // This is a no-op if produces JSON. + json, err := yaml.YAMLToJSON(buf.Bytes()) + if err != nil { + return err + } + c.Args.Raw = json + return nil +} + +// Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, +// it is assumed that the extender chose not to provide that extension. +type Extender struct { + // URLPrefix at which the extender is available + URLPrefix string `json:"urlPrefix"` + // Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender. + FilterVerb string `json:"filterVerb,omitempty"` + // Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender. + PreemptVerb string `json:"preemptVerb,omitempty"` + // Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender. + PrioritizeVerb string `json:"prioritizeVerb,omitempty"` + // The numeric multiplier for the node scores that the prioritize call generates. + // The weight should be a positive integer + Weight int64 `json:"weight,omitempty"` + // Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. + // If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender + // can implement this function. + BindVerb string `json:"bindVerb,omitempty"` + // EnableHTTPS specifies whether https should be used to communicate with the extender + EnableHTTPS bool `json:"enableHTTPS,omitempty"` + // TLSConfig specifies the transport layer security config + TLSConfig *v1.ExtenderTLSConfig `json:"tlsConfig,omitempty"` + // HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize + // timeout is ignored, k8s/other extenders priorities are used to select the node. + HTTPTimeout metav1.Duration `json:"httpTimeout,omitempty"` + // NodeCacheCapable specifies that the extender is capable of caching node information, + // so the scheduler should only send minimal information about the eligible nodes + // assuming that the extender already cached full details of all nodes in the cluster + NodeCacheCapable bool `json:"nodeCacheCapable,omitempty"` + // ManagedResources is a list of extended resources that are managed by + // this extender. + // - A pod will be sent to the extender on the Filter, Prioritize and Bind + // (if the extender is the binder) phases iff the pod requests at least + // one of the extended resources in this list. If empty or unspecified, + // all pods will be sent to this extender. + // - If IgnoredByScheduler is set to true for a resource, kube-scheduler + // will skip checking the resource in predicates. + // +optional + // +listType=atomic + ManagedResources []v1.ExtenderManagedResource `json:"managedResources,omitempty"` + // Ignorable specifies if the extender is ignorable, i.e. scheduling should not + // fail when the extender returns an error or is not reachable. + Ignorable bool `json:"ignorable,omitempty"` } diff --git a/vendor/k8s.io/kube-scheduler/config/v1beta1/types_pluginargs.go b/vendor/k8s.io/kube-scheduler/config/v1beta1/types_pluginargs.go new file mode 100644 index 00000000000..72088af2050 --- /dev/null +++ b/vendor/k8s.io/kube-scheduler/config/v1beta1/types_pluginargs.go @@ -0,0 +1,172 @@ +/* +Copyright 2020 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 v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin. +type InterPodAffinityArgs struct { + metav1.TypeMeta `json:",inline"` + + // HardPodAffinityWeight is the scoring weight for existing pods with a + // matching hard affinity to the incoming pod. + HardPodAffinityWeight *int32 `json:"hardPodAffinityWeight,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NodeLabelArgs holds arguments used to configure the NodeLabel plugin. +type NodeLabelArgs struct { + metav1.TypeMeta `json:",inline"` + + // PresentLabels should be present for the node to be considered a fit for hosting the pod + // +listType=atomic + PresentLabels []string `json:"presentLabels,omitempty"` + // AbsentLabels should be absent for the node to be considered a fit for hosting the pod + // +listType=atomic + AbsentLabels []string `json:"absentLabels,omitempty"` + // Nodes that have labels in the list will get a higher score. + // +listType=atomic + PresentLabelsPreference []string `json:"presentLabelsPreference,omitempty"` + // Nodes that don't have labels in the list will get a higher score. + // +listType=atomic + AbsentLabelsPreference []string `json:"absentLabelsPreference,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin. +type NodeResourcesFitArgs struct { + metav1.TypeMeta `json:",inline"` + + // IgnoredResources is the list of resources that NodeResources fit filter + // should ignore. + // +listType=atomic + IgnoredResources []string `json:"ignoredResources,omitempty"` + // IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore. + // e.g. if group is ["example.com"], it will ignore all resource names that begin + // with "example.com", such as "example.com/aaa" and "example.com/bbb". + // A resource group name can't contain '/'. + // +listType=atomic + IgnoredResourceGroups []string `json:"ignoredResourceGroups,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin. +type PodTopologySpreadArgs struct { + metav1.TypeMeta `json:",inline"` + + // DefaultConstraints defines topology spread constraints to be applied to + // pods that don't define any in `pod.spec.topologySpreadConstraints`. + // `topologySpreadConstraint.labelSelectors` must be empty, as they are + // deduced the pods' membership to Services, Replication Controllers, Replica + // Sets or Stateful Sets. + // Empty by default. + // +optional + // +listType=atomic + DefaultConstraints []corev1.TopologySpreadConstraint `json:"defaultConstraints"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// RequestedToCapacityRatioArgs holds arguments used to configure RequestedToCapacityRatio plugin. +type RequestedToCapacityRatioArgs struct { + metav1.TypeMeta `json:",inline"` + + // Points defining priority function shape + // +listType=atomic + Shape []UtilizationShapePoint `json:"shape"` + // Resources to be managed + // +listType=atomic + Resources []ResourceSpec `json:"resources,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NodeResourcesLeastAllocatedArgs holds arguments used to configure NodeResourcesLeastAllocated plugin. +type NodeResourcesLeastAllocatedArgs struct { + metav1.TypeMeta `json:",inline"` + + // Resources to be managed, if no resource is provided, default resource set with both + // the weight of "cpu" and "memory" set to "1" will be applied. + // Resource with "0" weight will not accountable for the final score. + // +listType=atomic + Resources []ResourceSpec `json:"resources,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NodeResourcesMostAllocatedArgs holds arguments used to configure NodeResourcesMostAllocated plugin. +type NodeResourcesMostAllocatedArgs struct { + metav1.TypeMeta `json:",inline"` + + // Resources to be managed, if no resource is provided, default resource set with both + // the weight of "cpu" and "memory" set to "1" will be applied. + // Resource with "0" weight will not accountable for the final score. + // +listType=atomic + Resources []ResourceSpec `json:"resources,omitempty"` +} + +// UtilizationShapePoint represents single point of priority function shape. +type UtilizationShapePoint struct { + // Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100. + Utilization int32 `json:"utilization"` + // Score assigned to given utilization (y axis). Valid values are 0 to 10. + Score int32 `json:"score"` +} + +// ResourceSpec represents single resource and weight for bin packing of priority RequestedToCapacityRatioArguments. +type ResourceSpec struct { + // Name of the resource to be managed by RequestedToCapacityRatio function. + Name string `json:"name"` + // Weight of the resource. + Weight int64 `json:"weight,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ServiceAffinityArgs holds arguments used to configure the ServiceAffinity plugin. +type ServiceAffinityArgs struct { + metav1.TypeMeta `json:",inline"` + + // AffinityLabels are homogeneous for pods that are scheduled to a node. + // (i.e. it returns true IFF this pod can be added to this node such that all other pods in + // the same service are running on nodes with the exact same values for Labels). + // +listType=atomic + AffinityLabels []string `json:"affinityLabels,omitempty"` + // AntiAffinityLabelsPreference are the labels to consider for service anti affinity scoring. + // +listType=atomic + AntiAffinityLabelsPreference []string `json:"antiAffinityLabelsPreference,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin. +type VolumeBindingArgs struct { + metav1.TypeMeta `json:",inline"` + + // BindTimeoutSeconds is the timeout in seconds in volume binding operation. + // Value must be non-negative integer. The value zero indicates no waiting. + // If this value is nil, the default value (600) will be used. + BindTimeoutSeconds *int64 `json:"bindTimeoutSeconds,omitempty"` +} diff --git a/vendor/k8s.io/kube-scheduler/config/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kube-scheduler/config/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 00000000000..4a5f5cd7bad --- /dev/null +++ b/vendor/k8s.io/kube-scheduler/config/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,627 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + v1 "k8s.io/kube-scheduler/config/v1" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Extender) DeepCopyInto(out *Extender) { + *out = *in + if in.TLSConfig != nil { + in, out := &in.TLSConfig, &out.TLSConfig + *out = new(v1.ExtenderTLSConfig) + (*in).DeepCopyInto(*out) + } + out.HTTPTimeout = in.HTTPTimeout + if in.ManagedResources != nil { + in, out := &in.ManagedResources, &out.ManagedResources + *out = make([]v1.ExtenderManagedResource, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Extender. +func (in *Extender) DeepCopy() *Extender { + if in == nil { + return nil + } + out := new(Extender) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InterPodAffinityArgs) DeepCopyInto(out *InterPodAffinityArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.HardPodAffinityWeight != nil { + in, out := &in.HardPodAffinityWeight, &out.HardPodAffinityWeight + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InterPodAffinityArgs. +func (in *InterPodAffinityArgs) DeepCopy() *InterPodAffinityArgs { + if in == nil { + return nil + } + out := new(InterPodAffinityArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *InterPodAffinityArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeSchedulerConfiguration) DeepCopyInto(out *KubeSchedulerConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + in.LeaderElection.DeepCopyInto(&out.LeaderElection) + out.ClientConnection = in.ClientConnection + if in.HealthzBindAddress != nil { + in, out := &in.HealthzBindAddress, &out.HealthzBindAddress + *out = new(string) + **out = **in + } + if in.MetricsBindAddress != nil { + in, out := &in.MetricsBindAddress, &out.MetricsBindAddress + *out = new(string) + **out = **in + } + in.DebuggingConfiguration.DeepCopyInto(&out.DebuggingConfiguration) + if in.PercentageOfNodesToScore != nil { + in, out := &in.PercentageOfNodesToScore, &out.PercentageOfNodesToScore + *out = new(int32) + **out = **in + } + if in.PodInitialBackoffSeconds != nil { + in, out := &in.PodInitialBackoffSeconds, &out.PodInitialBackoffSeconds + *out = new(int64) + **out = **in + } + if in.PodMaxBackoffSeconds != nil { + in, out := &in.PodMaxBackoffSeconds, &out.PodMaxBackoffSeconds + *out = new(int64) + **out = **in + } + if in.Profiles != nil { + in, out := &in.Profiles, &out.Profiles + *out = make([]KubeSchedulerProfile, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Extenders != nil { + in, out := &in.Extenders, &out.Extenders + *out = make([]Extender, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerConfiguration. +func (in *KubeSchedulerConfiguration) DeepCopy() *KubeSchedulerConfiguration { + if in == nil { + return nil + } + out := new(KubeSchedulerConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KubeSchedulerConfiguration) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubeSchedulerProfile) DeepCopyInto(out *KubeSchedulerProfile) { + *out = *in + if in.SchedulerName != nil { + in, out := &in.SchedulerName, &out.SchedulerName + *out = new(string) + **out = **in + } + if in.Plugins != nil { + in, out := &in.Plugins, &out.Plugins + *out = new(Plugins) + (*in).DeepCopyInto(*out) + } + if in.PluginConfig != nil { + in, out := &in.PluginConfig, &out.PluginConfig + *out = make([]PluginConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerProfile. +func (in *KubeSchedulerProfile) DeepCopy() *KubeSchedulerProfile { + if in == nil { + return nil + } + out := new(KubeSchedulerProfile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeLabelArgs) DeepCopyInto(out *NodeLabelArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.PresentLabels != nil { + in, out := &in.PresentLabels, &out.PresentLabels + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AbsentLabels != nil { + in, out := &in.AbsentLabels, &out.AbsentLabels + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PresentLabelsPreference != nil { + in, out := &in.PresentLabelsPreference, &out.PresentLabelsPreference + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AbsentLabelsPreference != nil { + in, out := &in.AbsentLabelsPreference, &out.AbsentLabelsPreference + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeLabelArgs. +func (in *NodeLabelArgs) DeepCopy() *NodeLabelArgs { + if in == nil { + return nil + } + out := new(NodeLabelArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeLabelArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourcesFitArgs) DeepCopyInto(out *NodeResourcesFitArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.IgnoredResources != nil { + in, out := &in.IgnoredResources, &out.IgnoredResources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.IgnoredResourceGroups != nil { + in, out := &in.IgnoredResourceGroups, &out.IgnoredResourceGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesFitArgs. +func (in *NodeResourcesFitArgs) DeepCopy() *NodeResourcesFitArgs { + if in == nil { + return nil + } + out := new(NodeResourcesFitArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeResourcesFitArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourcesLeastAllocatedArgs) DeepCopyInto(out *NodeResourcesLeastAllocatedArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]ResourceSpec, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesLeastAllocatedArgs. +func (in *NodeResourcesLeastAllocatedArgs) DeepCopy() *NodeResourcesLeastAllocatedArgs { + if in == nil { + return nil + } + out := new(NodeResourcesLeastAllocatedArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeResourcesLeastAllocatedArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourcesMostAllocatedArgs) DeepCopyInto(out *NodeResourcesMostAllocatedArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]ResourceSpec, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesMostAllocatedArgs. +func (in *NodeResourcesMostAllocatedArgs) DeepCopy() *NodeResourcesMostAllocatedArgs { + if in == nil { + return nil + } + out := new(NodeResourcesMostAllocatedArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeResourcesMostAllocatedArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Plugin) DeepCopyInto(out *Plugin) { + *out = *in + if in.Weight != nil { + in, out := &in.Weight, &out.Weight + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugin. +func (in *Plugin) DeepCopy() *Plugin { + if in == nil { + return nil + } + out := new(Plugin) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PluginConfig) DeepCopyInto(out *PluginConfig) { + *out = *in + in.Args.DeepCopyInto(&out.Args) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginConfig. +func (in *PluginConfig) DeepCopy() *PluginConfig { + if in == nil { + return nil + } + out := new(PluginConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PluginSet) DeepCopyInto(out *PluginSet) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = make([]Plugin, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Disabled != nil { + in, out := &in.Disabled, &out.Disabled + *out = make([]Plugin, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginSet. +func (in *PluginSet) DeepCopy() *PluginSet { + if in == nil { + return nil + } + out := new(PluginSet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Plugins) DeepCopyInto(out *Plugins) { + *out = *in + if in.QueueSort != nil { + in, out := &in.QueueSort, &out.QueueSort + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } + if in.PreFilter != nil { + in, out := &in.PreFilter, &out.PreFilter + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } + if in.PostFilter != nil { + in, out := &in.PostFilter, &out.PostFilter + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } + if in.PreScore != nil { + in, out := &in.PreScore, &out.PreScore + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } + if in.Score != nil { + in, out := &in.Score, &out.Score + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } + if in.Reserve != nil { + in, out := &in.Reserve, &out.Reserve + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } + if in.Permit != nil { + in, out := &in.Permit, &out.Permit + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } + if in.PreBind != nil { + in, out := &in.PreBind, &out.PreBind + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } + if in.Bind != nil { + in, out := &in.Bind, &out.Bind + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } + if in.PostBind != nil { + in, out := &in.PostBind, &out.PostBind + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plugins. +func (in *Plugins) DeepCopy() *Plugins { + if in == nil { + return nil + } + out := new(Plugins) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodTopologySpreadArgs) DeepCopyInto(out *PodTopologySpreadArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.DefaultConstraints != nil { + in, out := &in.DefaultConstraints, &out.DefaultConstraints + *out = make([]corev1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTopologySpreadArgs. +func (in *PodTopologySpreadArgs) DeepCopy() *PodTopologySpreadArgs { + if in == nil { + return nil + } + out := new(PodTopologySpreadArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PodTopologySpreadArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequestedToCapacityRatioArgs) DeepCopyInto(out *RequestedToCapacityRatioArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Shape != nil { + in, out := &in.Shape, &out.Shape + *out = make([]UtilizationShapePoint, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]ResourceSpec, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestedToCapacityRatioArgs. +func (in *RequestedToCapacityRatioArgs) DeepCopy() *RequestedToCapacityRatioArgs { + if in == nil { + return nil + } + out := new(RequestedToCapacityRatioArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RequestedToCapacityRatioArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec. +func (in *ResourceSpec) DeepCopy() *ResourceSpec { + if in == nil { + return nil + } + out := new(ResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceAffinityArgs) DeepCopyInto(out *ServiceAffinityArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.AffinityLabels != nil { + in, out := &in.AffinityLabels, &out.AffinityLabels + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AntiAffinityLabelsPreference != nil { + in, out := &in.AntiAffinityLabelsPreference, &out.AntiAffinityLabelsPreference + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAffinityArgs. +func (in *ServiceAffinityArgs) DeepCopy() *ServiceAffinityArgs { + if in == nil { + return nil + } + out := new(ServiceAffinityArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ServiceAffinityArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UtilizationShapePoint) DeepCopyInto(out *UtilizationShapePoint) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UtilizationShapePoint. +func (in *UtilizationShapePoint) DeepCopy() *UtilizationShapePoint { + if in == nil { + return nil + } + out := new(UtilizationShapePoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeBindingArgs) DeepCopyInto(out *VolumeBindingArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.BindTimeoutSeconds != nil { + in, out := &in.BindTimeoutSeconds, &out.BindTimeoutSeconds + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeBindingArgs. +func (in *VolumeBindingArgs) DeepCopy() *VolumeBindingArgs { + if in == nil { + return nil + } + out := new(VolumeBindingArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeBindingArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} diff --git a/vendor/k8s.io/kubectl/pkg/cmd/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/BUILD index dc15ca33874..f9f58902e1e 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/BUILD @@ -37,6 +37,7 @@ filegroup( "//staging/src/k8s.io/kubectl/pkg/cmd/clusterinfo:all-srcs", "//staging/src/k8s.io/kubectl/pkg/cmd/completion:all-srcs", "//staging/src/k8s.io/kubectl/pkg/cmd/config:all-srcs", + "//staging/src/k8s.io/kubectl/pkg/cmd/cp:all-srcs", "//staging/src/k8s.io/kubectl/pkg/cmd/create:all-srcs", "//staging/src/k8s.io/kubectl/pkg/cmd/debug:all-srcs", "//staging/src/k8s.io/kubectl/pkg/cmd/delete:all-srcs", diff --git a/vendor/k8s.io/kubectl/pkg/cmd/annotate/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/annotate/BUILD index 664f72a17de..bbeba51439f 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/annotate/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/annotate/BUILD @@ -9,6 +9,7 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructuredscheme:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/json:go_default_library", @@ -22,7 +23,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/evanphx/json-patch:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/annotate/annotate.go b/vendor/k8s.io/kubectl/pkg/cmd/annotate/annotate.go index ed4a0be2ba3..c0900c97a39 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/annotate/annotate.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/annotate/annotate.go @@ -23,10 +23,11 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructuredscheme" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/json" @@ -52,9 +53,11 @@ type AnnotateOptions struct { // Common user flags overwrite bool + list bool local bool dryRunStrategy cmdutil.DryRunStrategy dryRunVerifier *resource.DryRunVerifier + fieldManager string all bool resourceVersion string selector string @@ -142,6 +145,7 @@ func NewCmdAnnotate(parent string, f cmdutil.Factory, ioStreams genericclioption o.PrintFlags.AddFlags(cmd) cmd.Flags().BoolVar(&o.overwrite, "overwrite", o.overwrite, "If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.") + cmd.Flags().BoolVar(&o.list, "list", o.list, "If true, display the annotations for a given resource.") cmd.Flags().BoolVar(&o.local, "local", o.local, "If true, annotation will NOT contact api-server but run locally.") cmd.Flags().StringVarP(&o.selector, "selector", "l", o.selector, "Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).") cmd.Flags().StringVar(&o.fieldSelector, "field-selector", o.fieldSelector, "Selector (field query) to filter on, supports '=', '==', and '!='.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.") @@ -150,6 +154,7 @@ func NewCmdAnnotate(parent string, f cmdutil.Factory, ioStreams genericclioption usage := "identifying the resource to update the annotation" cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, usage) cmdutil.AddDryRunFlag(cmd) + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-annotate") return cmd } @@ -188,6 +193,10 @@ func (o *AnnotateOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args [ return printer.PrintObj(obj, out) } + if o.list && len(o.outputFormat) > 0 { + return fmt.Errorf("--list and --output may not be specified together") + } + o.namespace, o.enforceNamespace, err = f.ToRawKubeConfigLoader().Namespace() if err != nil { return err @@ -233,7 +242,7 @@ func (o AnnotateOptions) Validate() error { return fmt.Errorf("one or more files must be specified as -f rsrc.yaml or --filename=rsrc.json") } } - if len(o.newAnnotations) < 1 && len(o.removeAnnotations) < 1 { + if len(o.newAnnotations) < 1 && len(o.removeAnnotations) < 1 && !o.list { return fmt.Errorf("at least one annotation update is required") } return validateAnnotations(o.removeAnnotations, o.newAnnotations) @@ -280,7 +289,7 @@ func (o AnnotateOptions) RunAnnotate() error { var outputObj runtime.Object obj := info.Object - if o.dryRunStrategy == cmdutil.DryRunClient || o.local { + if o.dryRunStrategy == cmdutil.DryRunClient || o.local || o.list { if err := o.updateAnnotations(obj); err != nil { return err } @@ -329,7 +338,8 @@ func (o AnnotateOptions) RunAnnotate() error { } helper := resource. NewHelper(client, mapping). - DryRun(o.dryRunStrategy == cmdutil.DryRunServer) + DryRun(o.dryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager) if createdPatch { outputObj, err = helper.Patch(namespace, name, types.MergePatchType, patchBytes, nil) @@ -341,6 +351,28 @@ func (o AnnotateOptions) RunAnnotate() error { } } + if o.list { + accessor, err := meta.Accessor(outputObj) + if err != nil { + return err + } + + indent := "" + if !singleItemImpliedResource { + indent = " " + gvks, _, err := unstructuredscheme.NewUnstructuredObjectTyper().ObjectKinds(info.Object) + if err != nil { + return err + } + fmt.Fprintf(o.Out, "Listing annotations for %s.%s/%s:\n", gvks[0].Kind, gvks[0].Group, info.Name) + } + for k, v := range accessor.GetAnnotations() { + fmt.Fprintf(o.Out, "%s%s=%s\n", indent, k, v) + } + + return nil + } + return o.PrintObj(outputObj, o.Out) }) } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/apiresources/apiresources.go b/vendor/k8s.io/kubectl/pkg/cmd/apiresources/apiresources.go index 9898f56ef09..0c07cfcb99f 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/apiresources/apiresources.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/apiresources/apiresources.go @@ -105,7 +105,7 @@ func NewCmdAPIResources(f cmdutil.Factory, ioStreams genericclioptions.IOStreams cmd.Flags().StringVar(&o.APIGroup, "api-group", o.APIGroup, "Limit to resources in the specified API group.") cmd.Flags().BoolVar(&o.Namespaced, "namespaced", o.Namespaced, "If false, non-namespaced resources will be returned, otherwise returning namespaced resources by default.") cmd.Flags().StringSliceVar(&o.Verbs, "verbs", o.Verbs, "Limit to resources that support the specified verbs.") - cmd.Flags().StringVar(&o.SortBy, "sort-by", o.SortBy, "If non-empty, sort nodes list using specified field. The field can be either 'name' or 'kind'.") + cmd.Flags().StringVar(&o.SortBy, "sort-by", o.SortBy, "If non-empty, sort list of resources using specified field. The field can be either 'name' or 'kind'.") cmd.Flags().BoolVar(&o.Cached, "cached", o.Cached, "Use the cached list of resources if available.") return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/apply/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/apply/BUILD index 7b13a956dfc..63cc83e0402 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/apply/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/apply/BUILD @@ -43,7 +43,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/validation:go_default_library", "//vendor/github.com/jonboulle/clockwork:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", ], @@ -68,7 +68,6 @@ go_test( "//staging/src/k8s.io/client-go/dynamic/fake:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/rest/fake:go_default_library", - "//staging/src/k8s.io/client-go/testing:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/testing:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/util:go_default_library", "//staging/src/k8s.io/kubectl/pkg/scheme:go_default_library", diff --git a/vendor/k8s.io/kubectl/pkg/cmd/apply/apply.go b/vendor/k8s.io/kubectl/pkg/cmd/apply/apply.go index edae087f3f8..7531f581af1 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/apply/apply.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/apply/apply.go @@ -34,7 +34,7 @@ import ( "k8s.io/cli-runtime/pkg/printers" "k8s.io/cli-runtime/pkg/resource" "k8s.io/client-go/dynamic" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubectl/pkg/cmd/delete" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/scheme" @@ -191,11 +191,9 @@ func NewCmdApply(baseName string, f cmdutil.Factory, ioStreams genericclioptions cmd.Flags().BoolVar(&o.All, "all", o.All, "Select all resources in the namespace of the specified resource types.") cmd.Flags().StringArrayVar(&o.PruneWhitelist, "prune-whitelist", o.PruneWhitelist, "Overwrite the default whitelist with for --prune") cmd.Flags().BoolVar(&o.OpenAPIPatch, "openapi-patch", o.OpenAPIPatch, "If true, use openapi to calculate diff when the openapi presents and the resource can be found in the openapi spec. Otherwise, fall back to use baked-in types.") - cmd.Flags().Bool("server-dry-run", false, "If true, request will be sent to server with dry-run flag, which means the modifications won't be persisted.") - cmd.Flags().MarkDeprecated("server-dry-run", "--server-dry-run is deprecated and can be replaced with --dry-run=server.") - cmd.Flags().MarkHidden("server-dry-run") cmdutil.AddDryRunFlag(cmd) cmdutil.AddServerSideApplyFlags(cmd) + cmdutil.AddFieldManagerFlagVar(cmd, &o.FieldManager, FieldManagerClientSideApply) // apply subcommands cmd.AddCommand(NewCmdApplyViewLastApplied(f, ioStreams)) @@ -223,7 +221,7 @@ func (o *ApplyOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error { return err } o.DryRunVerifier = resource.NewDryRunVerifier(o.DynamicClient, discoveryClient) - o.FieldManager = cmdutil.GetFieldManagerFlag(cmd) + o.FieldManager = GetApplyFieldManagerFlag(cmd, o.ServerSideApply) if o.ForceConflicts && !o.ServerSideApply { return fmt.Errorf("--force-conflicts only works with --server-side") @@ -233,15 +231,6 @@ func (o *ApplyOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error { return fmt.Errorf("--dry-run=client doesn't work with --server-side (did you mean --dry-run=server instead?)") } - var deprecatedServerDryRunFlag = cmdutil.GetFlagBool(cmd, "server-dry-run") - if o.DryRunStrategy == cmdutil.DryRunClient && deprecatedServerDryRunFlag { - return fmt.Errorf("--dry-run=client and --server-dry-run can't be used together (did you mean --dry-run=server instead?)") - } - - if o.DryRunStrategy == cmdutil.DryRunNone && deprecatedServerDryRunFlag { - o.DryRunStrategy = cmdutil.DryRunServer - } - // allow for a success message operation to be specified at print time o.ToPrinter = func(operation string) (printers.ResourcePrinter, error) { o.PrintFlags.NamePrintFlags.Operation = operation @@ -261,6 +250,14 @@ func (o *ApplyOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error { return err } + if o.ServerSideApply && o.DeleteOptions.ForceDeletion { + return fmt.Errorf("--force cannot be used with --server-side") + } + + if o.DryRunStrategy == cmdutil.DryRunServer && o.DeleteOptions.ForceDeletion { + return fmt.Errorf("--dry-run=server cannot be used with --force") + } + o.OpenAPISchema, _ = f.OpenAPISchema() o.Validator, err = f.Validator(cmdutil.GetFlagBool(cmd, "validate")) if err != nil { @@ -406,6 +403,28 @@ func (o *ApplyOptions) applyOneObject(info *resource.Info) error { klog.V(4).Infof("error recording current command: %v", err) } + if len(info.Name) == 0 { + metadata, _ := meta.Accessor(info.Object) + generatedName := metadata.GetGenerateName() + if len(generatedName) > 0 { + return fmt.Errorf("from %s: cannot use generate name with apply", generatedName) + } + } + + helper := resource.NewHelper(info.Client, info.Mapping). + DryRun(o.DryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.FieldManager) + + if o.DryRunStrategy == cmdutil.DryRunServer { + // Ensure the APIServer supports server-side dry-run for the resource, + // otherwise fail early. + // For APIServers that don't support server-side dry-run will persist + // changes. + if err := o.DryRunVerifier.HasSupport(info.Mapping.GroupVersionKind); err != nil { + return err + } + } + if o.ServerSideApply { // Send the full object to be applied on the server side. data, err := runtime.Encode(unstructured.UnstructuredJSONScheme, info.Object) @@ -414,16 +433,7 @@ func (o *ApplyOptions) applyOneObject(info *resource.Info) error { } options := metav1.PatchOptions{ - Force: &o.ForceConflicts, - FieldManager: o.FieldManager, - } - - helper := resource.NewHelper(info.Client, info.Mapping) - if o.DryRunStrategy == cmdutil.DryRunServer { - if err := o.DryRunVerifier.HasSupport(info.Mapping.GroupVersionKind); err != nil { - return err - } - helper.DryRun(true) + Force: &o.ForceConflicts, } obj, err := helper.Patch( info.Namespace, @@ -495,13 +505,6 @@ See http://k8s.io/docs/reference/using-api/api-concepts/#conflicts`, err) if o.DryRunStrategy != cmdutil.DryRunClient { // Then create the resource and skip the three-way merge - helper := resource.NewHelper(info.Client, info.Mapping) - if o.DryRunStrategy == cmdutil.DryRunServer { - if err := o.DryRunVerifier.HasSupport(info.Mapping.GroupVersionKind); err != nil { - return cmdutil.AddSourceToErr("creating", info.Source, err) - } - helper.DryRun(true) - } obj, err := helper.Create(info.Namespace, true, info.Object) if err != nil { return cmdutil.AddSourceToErr("creating", info.Source, err) @@ -538,7 +541,7 @@ See http://k8s.io/docs/reference/using-api/api-concepts/#conflicts`, err) fmt.Fprintf(o.ErrOut, warningNoLastAppliedConfigAnnotation, o.cmdBaseName) } - patcher, err := newPatcher(o, info) + patcher, err := newPatcher(o, info, helper) if err != nil { return err } @@ -670,3 +673,34 @@ func (o *ApplyOptions) PrintAndPrunePostProcessor() func() error { return nil } } + +const ( + // FieldManagerClientSideApply is the default client-side apply field manager. + // + // The default field manager is not `kubectl-apply` to distinguish from + // server-side apply. + FieldManagerClientSideApply = "kubectl-client-side-apply" + // The default server-side apply field manager is `kubectl` + // instead of a field manager like `kubectl-server-side-apply` + // for backward compatibility to not conflict with old versions + // of kubectl server-side apply where `kubectl` has already been the field manager. + fieldManagerServerSideApply = "kubectl" +) + +// GetApplyFieldManagerFlag gets the field manager for kubectl apply +// if it is not set. +// +// The default field manager is not `kubectl-apply` to distinguish between +// client-side and server-side apply. +func GetApplyFieldManagerFlag(cmd *cobra.Command, serverSide bool) string { + // The field manager flag was set + if cmd.Flag("field-manager").Changed { + return cmdutil.GetFlagString(cmd, "field-manager") + } + + if serverSide { + return fieldManagerServerSideApply + } + + return FieldManagerClientSideApply +} diff --git a/vendor/k8s.io/kubectl/pkg/cmd/apply/apply_edit_last_applied.go b/vendor/k8s.io/kubectl/pkg/cmd/apply/apply_edit_last_applied.go index b46dfa2b2e6..37e54c1af0b 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/apply/apply_edit_last_applied.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/apply/apply_edit_last_applied.go @@ -83,6 +83,7 @@ func NewCmdApplyEditLastApplied(f cmdutil.Factory, ioStreams genericclioptions.I cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, usage) cmd.Flags().BoolVar(&o.WindowsLineEndings, "windows-line-endings", o.WindowsLineEndings, "Defaults to the line ending native to your platform.") + cmdutil.AddFieldManagerFlagVar(cmd, &o.FieldManager, FieldManagerClientSideApply) return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/apply/patcher.go b/vendor/k8s.io/kubectl/pkg/cmd/apply/patcher.go index 5c57aa5bce2..e7522273aaf 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/apply/patcher.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/apply/patcher.go @@ -33,7 +33,6 @@ import ( "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/cli-runtime/pkg/resource" - "k8s.io/client-go/dynamic" oapi "k8s.io/kube-openapi/pkg/util/proto" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/scheme" @@ -52,18 +51,16 @@ const ( // Patcher defines options to patch OpenAPI objects. type Patcher struct { - Mapping *meta.RESTMapping - Helper *resource.Helper - DynamicClient dynamic.Interface + Mapping *meta.RESTMapping + Helper *resource.Helper Overwrite bool BackOff clockwork.Clock - Force bool - Cascade bool - Timeout time.Duration - GracePeriod int - ServerDryRun bool + Force bool + Cascade bool + Timeout time.Duration + GracePeriod int // If set, forces the patch against a specific resourceVersion ResourceVersion *string @@ -74,7 +71,7 @@ type Patcher struct { OpenapiSchema openapi.Resources } -func newPatcher(o *ApplyOptions, info *resource.Info) (*Patcher, error) { +func newPatcher(o *ApplyOptions, info *resource.Info, helper *resource.Helper) (*Patcher, error) { var openapiSchema openapi.Resources if o.OpenAPIPatch { openapiSchema = o.OpenAPISchema @@ -82,22 +79,22 @@ func newPatcher(o *ApplyOptions, info *resource.Info) (*Patcher, error) { return &Patcher{ Mapping: info.Mapping, - Helper: resource.NewHelper(info.Client, info.Mapping), - DynamicClient: o.DynamicClient, + Helper: helper, Overwrite: o.Overwrite, BackOff: clockwork.NewRealClock(), Force: o.DeleteOptions.ForceDeletion, Cascade: o.DeleteOptions.Cascade, Timeout: o.DeleteOptions.Timeout, GracePeriod: o.DeleteOptions.GracePeriod, - ServerDryRun: o.DryRunStrategy == cmdutil.DryRunServer, OpenapiSchema: openapiSchema, Retries: maxPatchRetry, }, nil } func (p *Patcher) delete(namespace, name string) error { - return runDelete(namespace, name, p.Mapping, p.DynamicClient, p.Cascade, p.GracePeriod, p.ServerDryRun) + options := asDeleteOptions(p.Cascade, p.GracePeriod) + _, err := p.Helper.DeleteWithOptions(namespace, name, &options) + return err } func (p *Patcher) patchSimple(obj runtime.Object, modified []byte, source, namespace, name string, errOut io.Writer) ([]byte, runtime.Object, error) { @@ -178,7 +175,7 @@ func (p *Patcher) patchSimple(obj runtime.Object, modified []byte, source, names } } - patchedObj, err := p.Helper.DryRun(p.ServerDryRun).Patch(namespace, name, patchType, patch, nil) + patchedObj, err := p.Helper.Patch(namespace, name, patchType, patch, nil) return patch, patchedObj, err } @@ -194,7 +191,7 @@ func (p *Patcher) Patch(current runtime.Object, modified []byte, source, namespa if i > triesBeforeBackOff { p.BackOff.Sleep(backOffPeriod) } - current, getErr = p.Helper.Get(namespace, name, false) + current, getErr = p.Helper.Get(namespace, name) if getErr != nil { return nil, nil, getErr } @@ -212,7 +209,7 @@ func (p *Patcher) deleteAndCreate(original runtime.Object, modified []byte, name } // TODO: use wait if err := wait.PollImmediate(1*time.Second, p.Timeout, func() (bool, error) { - if _, err := p.Helper.Get(namespace, name, false); !errors.IsNotFound(err) { + if _, err := p.Helper.Get(namespace, name); !errors.IsNotFound(err) { return false, err } return true, nil @@ -223,11 +220,11 @@ func (p *Patcher) deleteAndCreate(original runtime.Object, modified []byte, name if err != nil { return modified, nil, err } - createdObject, err := p.Helper.DryRun(p.ServerDryRun).Create(namespace, true, versionedObject) + createdObject, err := p.Helper.Create(namespace, true, versionedObject) if err != nil { // restore the original object if we fail to create the new one // but still propagate and advertise error to user - recreated, recreateErr := p.Helper.DryRun(p.ServerDryRun).Create(namespace, true, original) + recreated, recreateErr := p.Helper.Create(namespace, true, original) if recreateErr != nil { err = fmt.Errorf("An error occurred force-replacing the existing object with the newly provided one:\n\n%v.\n\nAdditionally, an error occurred attempting to restore the original object:\n\n%v", err, recreateErr) } else { diff --git a/vendor/k8s.io/kubectl/pkg/cmd/apply/prune.go b/vendor/k8s.io/kubectl/pkg/cmd/apply/prune.go index 60b9d5ec64c..6856fcea6dc 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/apply/prune.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/apply/prune.go @@ -143,19 +143,24 @@ func (p *pruner) delete(namespace, name string, mapping *meta.RESTMapping) error } func runDelete(namespace, name string, mapping *meta.RESTMapping, c dynamic.Interface, cascade bool, gracePeriod int, serverDryRun bool) error { + options := asDeleteOptions(cascade, gracePeriod) + if serverDryRun { + options.DryRun = []string{metav1.DryRunAll} + } + return c.Resource(mapping.Resource).Namespace(namespace).Delete(context.TODO(), name, options) +} + +func asDeleteOptions(cascade bool, gracePeriod int) metav1.DeleteOptions { options := metav1.DeleteOptions{} if gracePeriod >= 0 { options = *metav1.NewDeleteOptions(int64(gracePeriod)) } - if serverDryRun { - options.DryRun = []string{metav1.DryRunAll} - } policy := metav1.DeletePropagationForeground if !cascade { policy = metav1.DeletePropagationOrphan } options.PropagationPolicy = &policy - return c.Resource(mapping.Resource).Namespace(namespace).Delete(context.TODO(), name, options) + return options } type pruneResource struct { diff --git a/vendor/k8s.io/kubectl/pkg/cmd/attach/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/attach/BUILD index feac0f93be3..a3bfffc9f82 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/attach/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/attach/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/i18n:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/attach/attach.go b/vendor/k8s.io/kubectl/pkg/cmd/attach/attach.go index dbbd03d89fc..e8489eb2043 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/attach/attach.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/attach/attach.go @@ -23,7 +23,7 @@ import ( "time" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" @@ -41,15 +41,15 @@ import ( var ( attachExample = templates.Examples(i18n.T(` - # Get output from running pod 123456-7890, using the first container by default - kubectl attach 123456-7890 + # Get output from running pod mypod, using the first container by default + kubectl attach mypod - # Get output from ruby-container from pod 123456-7890 - kubectl attach 123456-7890 -c ruby-container + # Get output from ruby-container from pod mypod + kubectl attach mypod -c ruby-container - # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890 + # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod mypod # and sends stdout/stderr from 'bash' back to the client - kubectl attach 123456-7890 -c ruby-container -i -t + kubectl attach mypod -c ruby-container -i -t # Get output from the first pod of a ReplicaSet named nginx kubectl attach rs/nginx diff --git a/vendor/k8s.io/kubectl/pkg/cmd/autoscale/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/autoscale/BUILD index 34286c3547e..7f5f12401b2 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/autoscale/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/autoscale/BUILD @@ -23,7 +23,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/i18n:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/autoscale/autoscale.go b/vendor/k8s.io/kubectl/pkg/cmd/autoscale/autoscale.go index 50d48c7387c..1a56d2a1da7 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/autoscale/autoscale.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/autoscale/autoscale.go @@ -21,7 +21,7 @@ import ( "fmt" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" autoscalingv1 "k8s.io/api/autoscaling/v1" "k8s.io/apimachinery/pkg/api/meta" @@ -78,7 +78,8 @@ type AutoscaleOptions struct { dryRunStrategy cmdutil.DryRunStrategy dryRunVerifier *resource.DryRunVerifier builder *resource.Builder - generatorFunc func(string, *meta.RESTMapping) (generate.StructuredGenerator, error) + generatorFunc func(name, refName string, mapping *meta.RESTMapping) (generate.StructuredGenerator, error) + fieldManager string HPAClient autoscalingv1client.HorizontalPodAutoscalersGetter scaleKindResolver scale.ScaleKindResolver @@ -131,6 +132,7 @@ func NewCmdAutoscale(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) * cmdutil.AddDryRunFlag(cmd) cmdutil.AddFilenameOptionFlags(cmd, o.FilenameOptions, "identifying the resource to autoscale.") cmdutil.AddApplyAnnotationFlags(cmd) + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-autoscale") return cmd } @@ -168,7 +170,10 @@ func (o *AutoscaleOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args o.HPAClient = kubeClient.AutoscalingV1() // get the generator - o.generatorFunc = func(name string, mapping *meta.RESTMapping) (generate.StructuredGenerator, error) { + o.generatorFunc = func(name, refName string, mapping *meta.RESTMapping) (generate.StructuredGenerator, error) { + if len(name) == 0 { + name = refName + } switch o.Generator { case generateversioned.HorizontalPodAutoscalerV1GeneratorName: return &generateversioned.HorizontalPodAutoscalerGeneratorV1{ @@ -176,7 +181,7 @@ func (o *AutoscaleOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args MinReplicas: o.Min, MaxReplicas: o.Max, CPUPercent: o.CPUPercent, - ScaleRefName: name, + ScaleRefName: refName, ScaleRefKind: mapping.GroupVersionKind.Kind, ScaleRefAPIVersion: mapping.GroupVersionKind.GroupVersion().String(), }, nil @@ -238,7 +243,7 @@ func (o *AutoscaleOptions) Run() error { return fmt.Errorf("cannot autoscale a %v: %v", mapping.GroupVersionKind.Kind, err) } - generator, err := o.generatorFunc(info.Name, mapping) + generator, err := o.generatorFunc(o.Name, info.Name, mapping) if err != nil { return err } @@ -272,6 +277,9 @@ func (o *AutoscaleOptions) Run() error { } createOptions := metav1.CreateOptions{} + if o.fieldManager != "" { + createOptions.FieldManager = o.fieldManager + } if o.dryRunStrategy == cmdutil.DryRunServer { if err := o.dryRunVerifier.HasSupport(hpa.GroupVersionKind()); err != nil { return err diff --git a/vendor/k8s.io/kubectl/pkg/cmd/certificates/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/certificates/BUILD index eb57f661a3d..51324d27a18 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/certificates/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/certificates/BUILD @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", @@ -7,14 +7,17 @@ go_library( importpath = "k8s.io/kubectl/pkg/cmd/certificates", visibility = ["//visibility:public"], deps = [ + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/printers:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/resource:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/util:go_default_library", "//staging/src/k8s.io/kubectl/pkg/scheme:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/i18n:go_default_library", @@ -36,3 +39,22 @@ filegroup( tags = ["automanaged"], visibility = ["//visibility:public"], ) + +go_test( + name = "go_default_test", + srcs = ["certificates_test.go"], + embed = [":go_default_library"], + deps = [ + "//staging/src/k8s.io/api/certificates/v1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library", + "//staging/src/k8s.io/cli-runtime/pkg/resource:go_default_library", + "//staging/src/k8s.io/client-go/rest/fake:go_default_library", + "//staging/src/k8s.io/kubectl/pkg/cmd/testing:go_default_library", + "//staging/src/k8s.io/kubectl/pkg/cmd/util:go_default_library", + "//staging/src/k8s.io/kubectl/pkg/scheme:go_default_library", + "//vendor/github.com/spf13/cobra:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/certificates/certificates.go b/vendor/k8s.io/kubectl/pkg/cmd/certificates/certificates.go index 399790c6ff5..570f142756f 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/certificates/certificates.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/certificates/certificates.go @@ -23,14 +23,18 @@ import ( "github.com/spf13/cobra" + certificatesv1 "k8s.io/api/certificates/v1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/cli-runtime/pkg/printers" "k8s.io/cli-runtime/pkg/resource" - certificatesv1beta1client "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + clientset "k8s.io/client-go/kubernetes" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/scheme" "k8s.io/kubectl/pkg/util/i18n" @@ -63,7 +67,7 @@ type CertificateOptions struct { csrNames []string outputStyle string - clientSet certificatesv1beta1client.CertificatesV1beta1Interface + clientSet clientset.Interface builder *resource.Builder genericclioptions.IOStreams @@ -92,11 +96,7 @@ func (o *CertificateOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, arg o.builder = f.NewBuilder() - clientConfig, err := f.ToRESTConfig() - if err != nil { - return err - } - o.clientSet, err = certificatesv1beta1client.NewForConfig(clientConfig) + o.clientSet, err = f.KubernetesClientSet() if err != nil { return err } @@ -146,24 +146,12 @@ func NewCmdCertificateApprove(f cmdutil.Factory, ioStreams genericclioptions.IOS } func (o *CertificateOptions) RunCertificateApprove(force bool) error { - return o.modifyCertificateCondition(o.builder, o.clientSet, force, func(csr *certificatesv1beta1.CertificateSigningRequest) (*certificatesv1beta1.CertificateSigningRequest, bool) { - var alreadyApproved bool - for _, c := range csr.Status.Conditions { - if c.Type == certificatesv1beta1.CertificateApproved { - alreadyApproved = true - } - } - if alreadyApproved { - return csr, true - } - csr.Status.Conditions = append(csr.Status.Conditions, certificatesv1beta1.CertificateSigningRequestCondition{ - Type: certificatesv1beta1.CertificateApproved, - Reason: "KubectlApprove", - Message: "This CSR was approved by kubectl certificate approve.", - LastUpdateTime: metav1.Now(), - }) - return csr, false - }) + return o.modifyCertificateCondition( + o.builder, + o.clientSet, + force, + addConditionIfNeeded(string(certificatesv1.CertificateDenied), string(certificatesv1.CertificateApproved), "KubectlApprove", "This CSR was approved by kubectl certificate approve."), + ) } func NewCmdCertificateDeny(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { @@ -196,33 +184,21 @@ func NewCmdCertificateDeny(f cmdutil.Factory, ioStreams genericclioptions.IOStre } func (o *CertificateOptions) RunCertificateDeny(force bool) error { - return o.modifyCertificateCondition(o.builder, o.clientSet, force, func(csr *certificatesv1beta1.CertificateSigningRequest) (*certificatesv1beta1.CertificateSigningRequest, bool) { - var alreadyDenied bool - for _, c := range csr.Status.Conditions { - if c.Type == certificatesv1beta1.CertificateDenied { - alreadyDenied = true - } - } - if alreadyDenied { - return csr, true - } - csr.Status.Conditions = append(csr.Status.Conditions, certificatesv1beta1.CertificateSigningRequestCondition{ - Type: certificatesv1beta1.CertificateDenied, - Reason: "KubectlDeny", - Message: "This CSR was denied by kubectl certificate deny.", - LastUpdateTime: metav1.Now(), - }) - return csr, false - }) + return o.modifyCertificateCondition( + o.builder, + o.clientSet, + force, + addConditionIfNeeded(string(certificatesv1.CertificateApproved), string(certificatesv1.CertificateDenied), "KubectlDeny", "This CSR was denied by kubectl certificate deny."), + ) } -func (o *CertificateOptions) modifyCertificateCondition(builder *resource.Builder, clientSet certificatesv1beta1client.CertificatesV1beta1Interface, force bool, modify func(csr *certificatesv1beta1.CertificateSigningRequest) (*certificatesv1beta1.CertificateSigningRequest, bool)) error { +func (o *CertificateOptions) modifyCertificateCondition(builder *resource.Builder, clientSet clientset.Interface, force bool, modify func(csr runtime.Object) (runtime.Object, bool, error)) error { var found int r := builder. - WithScheme(scheme.Scheme, scheme.Scheme.PrioritizedVersionsAllGroups()...). + Unstructured(). ContinueOnError(). FilenameParam(false, &o.FilenameOptions). - ResourceNames("certificatesigningrequests.v1beta1.certificates.k8s.io", o.csrNames...). + ResourceNames("certificatesigningrequests", o.csrNames...). RequireObject(true). Flatten(). Latest(). @@ -232,13 +208,41 @@ func (o *CertificateOptions) modifyCertificateCondition(builder *resource.Builde return err } for i := 0; ; i++ { - csr, ok := info.Object.(*certificatesv1beta1.CertificateSigningRequest) + obj, ok := info.Object.(*unstructured.Unstructured) if !ok { - return fmt.Errorf("can only handle certificates.k8s.io/v1beta1 certificate signing requests") + return fmt.Errorf("expected *unstructured.Unstructured, got %T", obj) + } + if want, got := certificatesv1.Kind("CertificateSigningRequest"), obj.GetObjectKind().GroupVersionKind().GroupKind(); want != got { + return fmt.Errorf("can only handle %s objects, got %s", want.String(), got.String()) + } + var csr runtime.Object + // get a typed object + // first try v1 + csr, err = clientSet.CertificatesV1().CertificateSigningRequests().Get(context.TODO(), obj.GetName(), metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + // fall back to v1beta1 + csr, err = clientSet.CertificatesV1beta1().CertificateSigningRequests().Get(context.TODO(), obj.GetName(), metav1.GetOptions{}) + } + if apierrors.IsNotFound(err) { + return fmt.Errorf("could not find v1 or v1beta1 version of %s: %v", obj.GetName(), err) + } + if err != nil { + return err + } + + modifiedCSR, hasCondition, err := modify(csr) + if err != nil { + return err } - csr, hasCondition := modify(csr) if !hasCondition || force { - _, err = clientSet.CertificateSigningRequests().UpdateApproval(context.TODO(), csr, metav1.UpdateOptions{}) + switch modifiedCSR := modifiedCSR.(type) { + case *certificatesv1.CertificateSigningRequest: + _, err = clientSet.CertificatesV1().CertificateSigningRequests().UpdateApproval(context.TODO(), modifiedCSR.Name, modifiedCSR, metav1.UpdateOptions{}) + case *certificatesv1beta1.CertificateSigningRequest: + _, err = clientSet.CertificatesV1beta1().CertificateSigningRequests().UpdateApproval(context.TODO(), modifiedCSR, metav1.UpdateOptions{}) + default: + return fmt.Errorf("can only handle certificates.k8s.io CertificateSigningRequest objects, got %T", modifiedCSR) + } if errors.IsConflict(err) && i < 10 { if err := info.Get(); err != nil { return err @@ -255,8 +259,61 @@ func (o *CertificateOptions) modifyCertificateCondition(builder *resource.Builde return o.PrintObj(info.Object, o.Out) }) - if found == 0 { + if found == 0 && err == nil { fmt.Fprintf(o.Out, "No resources found\n") } return err } + +func addConditionIfNeeded(mustNotHaveConditionType, conditionType, reason, message string) func(runtime.Object) (runtime.Object, bool, error) { + return func(csr runtime.Object) (runtime.Object, bool, error) { + switch csr := csr.(type) { + case *certificatesv1.CertificateSigningRequest: + var alreadyHasCondition bool + for _, c := range csr.Status.Conditions { + if string(c.Type) == mustNotHaveConditionType { + return nil, false, fmt.Errorf("certificate signing request %q is already %s", csr.Name, c.Type) + } + if string(c.Type) == conditionType { + alreadyHasCondition = true + } + } + if alreadyHasCondition { + return csr, true, nil + } + csr.Status.Conditions = append(csr.Status.Conditions, certificatesv1.CertificateSigningRequestCondition{ + Type: certificatesv1.RequestConditionType(conditionType), + Status: corev1.ConditionTrue, + Reason: reason, + Message: message, + LastUpdateTime: metav1.Now(), + }) + return csr, false, nil + + case *certificatesv1beta1.CertificateSigningRequest: + var alreadyHasCondition bool + for _, c := range csr.Status.Conditions { + if string(c.Type) == mustNotHaveConditionType { + return nil, false, fmt.Errorf("certificate signing request %q is already %s", csr.Name, c.Type) + } + if string(c.Type) == conditionType { + alreadyHasCondition = true + } + } + if alreadyHasCondition { + return csr, true, nil + } + csr.Status.Conditions = append(csr.Status.Conditions, certificatesv1beta1.CertificateSigningRequestCondition{ + Type: certificatesv1beta1.RequestConditionType(conditionType), + Status: corev1.ConditionTrue, + Reason: reason, + Message: message, + LastUpdateTime: metav1.Now(), + }) + return csr, false, nil + + default: + return csr, false, nil + } + } +} diff --git a/vendor/k8s.io/kubectl/pkg/cmd/clusterinfo/clusterinfo_dump.go b/vendor/k8s.io/kubectl/pkg/cmd/clusterinfo/clusterinfo_dump.go index 4254405e332..5a854635df7 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/clusterinfo/clusterinfo_dump.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/clusterinfo/clusterinfo_dump.go @@ -200,6 +200,8 @@ func (o *ClusterInfoDumpOptions) Run() error { metav1.NamespaceSystem, o.Namespace, } + } else { + namespaces = o.Namespaces } } for _, namespace := range namespaces { diff --git a/vendor/k8s.io/kubectl/pkg/cmd/completion/completion.go b/vendor/k8s.io/kubectl/pkg/cmd/completion/completion.go index 1acbdb8e730..6b357cd5110 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/completion/completion.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/completion/completion.go @@ -157,8 +157,6 @@ func runCompletionZsh(out io.Writer, boilerPlate string, kubectl *cobra.Command) zshInitialization := ` __kubectl_bash_source() { alias shopt=':' - alias _expand=_bash_expand - alias _complete=_bash_comp emulate -L sh setopt kshglob noshglob braceexpand @@ -225,49 +223,9 @@ __kubectl_get_comp_words_by_ref() { } __kubectl_filedir() { - local RET OLD_IFS w qw - - __kubectl_debug "_filedir $@ cur=$cur" - if [[ "$1" = \~* ]]; then - # somehow does not work. Maybe, zsh does not call this at all - eval echo "$1" - return 0 - fi - - OLD_IFS="$IFS" - IFS=$'\n' - if [ "$1" = "-d" ]; then - shift - RET=( $(compgen -d) ) - else - RET=( $(compgen -f) ) - fi - IFS="$OLD_IFS" - - IFS="," __kubectl_debug "RET=${RET[@]} len=${#RET[@]}" - - for w in ${RET[@]}; do - if [[ ! "${w}" = "${cur}"* ]]; then - continue - fi - if eval "[[ \"\${w}\" = *.$1 || -d \"\${w}\" ]]"; then - qw="$(__kubectl_quote "${w}")" - if [ -d "${w}" ]; then - COMPREPLY+=("${qw}/") - else - COMPREPLY+=("${qw}") - fi - fi - done -} - -__kubectl_quote() { - if [[ $1 == \'* || $1 == \"* ]]; then - # Leave out first character - printf %q "${1:1}" - else - printf %q "$1" - fi + # Don't need to do anything here. + # Otherwise we will get trailing space without "compopt -o nospace" + true } autoload -U +X bashcompinit && bashcompinit @@ -275,7 +233,7 @@ autoload -U +X bashcompinit && bashcompinit # use word boundary patterns for BSD or GNU sed LWORD='[[:<:]]' RWORD='[[:>:]]' -if sed --help 2>&1 | grep -q GNU; then +if sed --help 2>&1 | grep -q 'GNU\|BusyBox'; then LWORD='\<' RWORD='\>' fi @@ -307,7 +265,6 @@ BASH_COMPLETION_EOF } __kubectl_bash_source <(__kubectl_convert_bash_to_zsh) -_complete kubectl 2>/dev/null ` out.Write([]byte(zshTail)) return nil diff --git a/vendor/k8s.io/kubectl/pkg/cmd/config/create_authinfo.go b/vendor/k8s.io/kubectl/pkg/cmd/config/create_authinfo.go index 0ef90802100..93a94485ffe 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/config/create_authinfo.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/config/create_authinfo.go @@ -21,6 +21,7 @@ import ( "fmt" "io" "io/ioutil" + "os" "path/filepath" "strings" @@ -421,13 +422,13 @@ func (o createAuthInfoOptions) validate() error { return fmt.Errorf("you must specify a --%s or --%s to embed", clientcmd.FlagCertFile, clientcmd.FlagKeyFile) } if certPath != "" { - if _, err := ioutil.ReadFile(certPath); err != nil { - return fmt.Errorf("error reading %s data from %s: %v", clientcmd.FlagCertFile, certPath, err) + if _, err := os.Stat(certPath); err != nil { + return fmt.Errorf("could not stat %s file %s: %v", clientcmd.FlagCertFile, certPath, err) } } if keyPath != "" { - if _, err := ioutil.ReadFile(keyPath); err != nil { - return fmt.Errorf("error reading %s data from %s: %v", clientcmd.FlagKeyFile, keyPath, err) + if _, err := os.Stat(keyPath); err != nil { + return fmt.Errorf("could not stat %s file %s: %v", clientcmd.FlagKeyFile, keyPath, err) } } } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/config/create_cluster.go b/vendor/k8s.io/kubectl/pkg/cmd/config/create_cluster.go index 2b7f2c9185d..e49372104a0 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/config/create_cluster.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/config/create_cluster.go @@ -21,6 +21,7 @@ import ( "fmt" "io" "io/ioutil" + "os" "path/filepath" "github.com/spf13/cobra" @@ -53,7 +54,7 @@ var ( kubectl config set-cluster e2e --server=https://1.2.3.4 # Embed certificate authority data for the e2e cluster entry - kubectl config set-cluster e2e --certificate-authority=~/.kube/e2e/kubernetes.ca.crt + kubectl config set-cluster e2e --embed-certs --certificate-authority=~/.kube/e2e/kubernetes.ca.crt # Disable cert checking for the dev cluster entry kubectl config set-cluster e2e --insecure-skip-tls-verify=true @@ -181,8 +182,8 @@ func (o createClusterOptions) validate() error { if caPath == "" { return fmt.Errorf("you must specify a --%s to embed", clientcmd.FlagCAFile) } - if _, err := ioutil.ReadFile(caPath); err != nil { - return fmt.Errorf("could not read %s data from %s: %v", clientcmd.FlagCAFile, caPath, err) + if _, err := os.Stat(caPath); err != nil { + return fmt.Errorf("could not stat %s file %s: %v", clientcmd.FlagCAFile, caPath, err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cp/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/cp/BUILD similarity index 94% rename from vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cp/BUILD rename to vendor/k8s.io/kubectl/pkg/cmd/cp/BUILD index 0d2c7f1f9f5..0b3bfcb57aa 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cp/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/cp/BUILD @@ -3,7 +3,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", srcs = ["cp.go"], - importpath = "k8s.io/kubernetes/pkg/kubectl/cmd/cp", + importmap = "k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/cp", + importpath = "k8s.io/kubectl/pkg/cmd/cp", visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cp/cp.go b/vendor/k8s.io/kubectl/pkg/cmd/cp/cp.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cp/cp.go rename to vendor/k8s.io/kubectl/pkg/cmd/cp/cp.go index 303dcce010d..47737f4731e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cp/cp.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/cp/cp.go @@ -127,28 +127,33 @@ var ( ) func extractFileSpec(arg string) (fileSpec, error) { - if i := strings.Index(arg, ":"); i == -1 { + i := strings.Index(arg, ":") + + if i == -1 { return fileSpec{File: arg}, nil - } else if i > 0 { - file := arg[i+1:] - pod := arg[:i] - pieces := strings.Split(pod, "/") - if len(pieces) == 1 { - return fileSpec{ - PodName: pieces[0], - File: file, - }, nil - } - if len(pieces) == 2 { - return fileSpec{ - PodNamespace: pieces[0], - PodName: pieces[1], - File: file, - }, nil - } + } + // filespec starting with a semicolon is invalid + if i == 0 { + return fileSpec{}, errFileSpecDoesntMatchFormat } - return fileSpec{}, errFileSpecDoesntMatchFormat + pod, file := arg[:i], arg[i+1:] + pieces := strings.Split(pod, "/") + switch len(pieces) { + case 1: + return fileSpec{ + PodName: pieces[0], + File: file, + }, nil + case 2: + return fileSpec{ + PodNamespace: pieces[0], + PodName: pieces[1], + File: file, + }, nil + default: + return fileSpec{}, errFileSpecDoesntMatchFormat + } } // Complete completes all the required options diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/create/BUILD index 127d3e47b15..4ec52ba1e92 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/BUILD @@ -34,11 +34,13 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/printers:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/resource:go_default_library", "//staging/src/k8s.io/client-go/dynamic:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1:go_default_library", @@ -53,7 +55,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/i18n:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -80,12 +82,10 @@ go_test( data = ["//staging/src/k8s.io/kubectl/testdata"], embed = [":go_default_library"], deps = [ - "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/batch/v1:go_default_library", "//staging/src/k8s.io/api/batch/v1beta1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/rbac/v1:go_default_library", - "//staging/src/k8s.io/api/rbac/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", @@ -97,7 +97,6 @@ go_test( "//staging/src/k8s.io/client-go/rest/fake:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/testing:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/util:go_default_library", - "//staging/src/k8s.io/kubectl/pkg/generate/versioned:go_default_library", "//staging/src/k8s.io/kubectl/pkg/scheme:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", ], diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create.go index 71a0dc4016e..44c4ede4833 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create.go @@ -25,7 +25,7 @@ import ( "strings" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -54,6 +54,8 @@ type CreateOptions struct { DryRunStrategy cmdutil.DryRunStrategy DryRunVerifier *resource.DryRunVerifier + fieldManager string + FilenameOptions resource.FilenameOptions Selector string EditBeforeCreate bool @@ -130,6 +132,7 @@ func NewCmdCreate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cob cmdutil.AddDryRunFlag(cmd) cmd.Flags().StringVarP(&o.Selector, "selector", "l", o.Selector, "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)") cmd.Flags().StringVar(&o.Raw, "raw", o.Raw, "Raw URI to POST to the server. Uses the transport specified by the kubeconfig file.") + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-create") o.PrintFlags.AddFlags(cmd) @@ -233,7 +236,7 @@ func (o *CreateOptions) RunCreate(f cmdutil.Factory, cmd *cobra.Command) error { } if o.EditBeforeCreate { - return RunEditOnCreate(f, o.PrintFlags, o.RecordFlags, o.IOStreams, cmd, &o.FilenameOptions) + return RunEditOnCreate(f, o.PrintFlags, o.RecordFlags, o.IOStreams, cmd, &o.FilenameOptions, o.fieldManager) } schema, err := f.Validator(cmdutil.GetFlagBool(cmd, "validate")) if err != nil { @@ -281,6 +284,7 @@ func (o *CreateOptions) RunCreate(f cmdutil.Factory, cmd *cobra.Command) error { obj, err := resource. NewHelper(info.Client, info.Mapping). DryRun(o.DryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager). Create(info.Namespace, true, info.Object) if err != nil { return cmdutil.AddSourceToErr("creating", info.Source, err) @@ -302,7 +306,7 @@ func (o *CreateOptions) RunCreate(f cmdutil.Factory, cmd *cobra.Command) error { } // RunEditOnCreate performs edit on creation -func RunEditOnCreate(f cmdutil.Factory, printFlags *genericclioptions.PrintFlags, recordFlags *genericclioptions.RecordFlags, ioStreams genericclioptions.IOStreams, cmd *cobra.Command, options *resource.FilenameOptions) error { +func RunEditOnCreate(f cmdutil.Factory, printFlags *genericclioptions.PrintFlags, recordFlags *genericclioptions.RecordFlags, ioStreams genericclioptions.IOStreams, cmd *cobra.Command, options *resource.FilenameOptions, fieldManager string) error { editOptions := editor.NewEditOptions(editor.EditBeforeCreateMode, ioStreams) editOptions.FilenameOptions = *options editOptions.ValidateOptions = cmdutil.ValidateOptions{ @@ -311,6 +315,7 @@ func RunEditOnCreate(f cmdutil.Factory, printFlags *genericclioptions.PrintFlags editOptions.PrintFlags = printFlags editOptions.ApplyAnnotation = cmdutil.GetFlagBool(cmd, cmdutil.ApplyAnnotationsFlag) editOptions.RecordFlags = recordFlags + editOptions.FieldManager = "kubectl-create" err := editOptions.Complete(f, []string{}, cmd) if err != nil { @@ -343,6 +348,7 @@ type CreateSubcommandOptions struct { DryRunStrategy cmdutil.DryRunStrategy DryRunVerifier *resource.DryRunVerifier CreateAnnotation bool + FieldManager string Namespace string EnforceNamespace bool @@ -421,6 +427,9 @@ func (o *CreateSubcommandOptions) Run() error { if err != nil { return err } + if err := util.CreateOrUpdateAnnotation(o.CreateAnnotation, obj, scheme.DefaultJSONEncoder()); err != nil { + return err + } if o.DryRunStrategy != cmdutil.DryRunClient { // create subcommands have compiled knowledge of things they create, so type them directly gvks, _, err := scheme.Scheme.ObjectKinds(obj) @@ -433,12 +442,7 @@ func (o *CreateSubcommandOptions) Run() error { return err } - if err := util.CreateOrUpdateAnnotation(o.CreateAnnotation, obj, scheme.DefaultJSONEncoder()); err != nil { - return err - } - asUnstructured := &unstructured.Unstructured{} - if err := scheme.Scheme.Convert(obj, asUnstructured, nil); err != nil { return err } @@ -446,6 +450,9 @@ func (o *CreateSubcommandOptions) Run() error { o.Namespace = "" } createOptions := metav1.CreateOptions{} + if o.FieldManager != "" { + createOptions.FieldManager = o.FieldManager + } if o.DryRunStrategy == cmdutil.DryRunServer { if err := o.DryRunVerifier.HasSupport(mapping.GroupVersionKind); err != nil { return err diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_clusterrole.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_clusterrole.go index a884b27bc42..933ea2587ce 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_clusterrole.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_clusterrole.go @@ -28,6 +28,8 @@ import ( "k8s.io/cli-runtime/pkg/genericclioptions" cliflag "k8s.io/component-base/cli/flag" cmdutil "k8s.io/kubectl/pkg/cmd/util" + "k8s.io/kubectl/pkg/scheme" + "k8s.io/kubectl/pkg/util" "k8s.io/kubectl/pkg/util/i18n" "k8s.io/kubectl/pkg/util/templates" ) @@ -64,6 +66,7 @@ type CreateClusterRoleOptions struct { *CreateRoleOptions NonResourceURLs []string AggregationRule map[string]string + FieldManager string } // NewCmdCreateClusterRole initializes and returns new ClusterRoles command @@ -95,6 +98,7 @@ func NewCmdCreateClusterRole(f cmdutil.Factory, ioStreams genericclioptions.IOSt cmd.Flags().StringSlice("resource", []string{}, "Resource that the rule applies to") cmd.Flags().StringArrayVar(&c.ResourceNames, "resource-name", c.ResourceNames, "Resource in the white list that the rule applies to, repeat this flag for multiple items") cmd.Flags().Var(cliflag.NewMapStringString(&c.AggregationRule), "aggregation-rule", "An aggregation label selector for combining ClusterRoles.") + cmdutil.AddFieldManagerFlagVar(cmd, &c.FieldManager, "kubectl-create") return cmd } @@ -199,9 +203,16 @@ func (c *CreateClusterRoleOptions) RunCreateRole() error { } } + if err := util.CreateOrUpdateAnnotation(c.CreateAnnotation, clusterRole, scheme.DefaultJSONEncoder()); err != nil { + return err + } + // Create ClusterRole. if c.DryRunStrategy != cmdutil.DryRunClient { createOptions := metav1.CreateOptions{} + if c.FieldManager != "" { + createOptions.FieldManager = c.FieldManager + } if c.DryRunStrategy == cmdutil.DryRunServer { if err := c.DryRunVerifier.HasSupport(clusterRole.GroupVersionKind()); err != nil { return err diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_clusterrolebinding.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_clusterrolebinding.go index 544b091dcf0..35b99cb791d 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_clusterrolebinding.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_clusterrolebinding.go @@ -17,12 +17,21 @@ limitations under the License. package create import ( + "context" + "fmt" + "strings" + "github.com/spf13/cobra" + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/cli-runtime/pkg/genericclioptions" + "k8s.io/cli-runtime/pkg/resource" + rbacclientv1 "k8s.io/client-go/kubernetes/typed/rbac/v1" cmdutil "k8s.io/kubectl/pkg/cmd/util" - "k8s.io/kubectl/pkg/generate" - generateversioned "k8s.io/kubectl/pkg/generate/versioned" + "k8s.io/kubectl/pkg/scheme" + "k8s.io/kubectl/pkg/util" "k8s.io/kubectl/pkg/util/i18n" "k8s.io/kubectl/pkg/util/templates" ) @@ -36,16 +45,40 @@ var ( kubectl create clusterrolebinding cluster-admin --clusterrole=cluster-admin --user=user1 --user=user2 --group=group1`)) ) -// ClusterRoleBindingOpts is returned by NewCmdCreateClusterRoleBinding -type ClusterRoleBindingOpts struct { - CreateSubcommandOptions *CreateSubcommandOptions +// ClusterRoleBindingOptions is returned by NewCmdCreateClusterRoleBinding +type ClusterRoleBindingOptions struct { + PrintFlags *genericclioptions.PrintFlags + PrintObj func(obj runtime.Object) error + + Name string + ClusterRole string + Users []string + Groups []string + ServiceAccounts []string + FieldManager string + CreateAnnotation bool + + Client rbacclientv1.RbacV1Interface + DryRunStrategy cmdutil.DryRunStrategy + DryRunVerifier *resource.DryRunVerifier + + genericclioptions.IOStreams +} + +// NewClusterRoleBindingOptions creates a new *ClusterRoleBindingOptions with sane defaults +func NewClusterRoleBindingOptions(ioStreams genericclioptions.IOStreams) *ClusterRoleBindingOptions { + return &ClusterRoleBindingOptions{ + Users: []string{}, + Groups: []string{}, + ServiceAccounts: []string{}, + PrintFlags: genericclioptions.NewPrintFlags("created").WithTypeSetter(scheme.Scheme), + IOStreams: ioStreams, + } } // NewCmdCreateClusterRoleBinding returns an initialized command instance of ClusterRoleBinding func NewCmdCreateClusterRoleBinding(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { - o := &ClusterRoleBindingOpts{ - CreateSubcommandOptions: NewCreateSubcommandOptions(ioStreams), - } + o := NewClusterRoleBindingOptions(ioStreams) cmd := &cobra.Command{ Use: "clusterrolebinding NAME --clusterrole=NAME [--user=username] [--group=groupname] [--serviceaccount=namespace:serviceaccountname] [--dry-run=server|client|none]", @@ -59,44 +92,136 @@ func NewCmdCreateClusterRoleBinding(f cmdutil.Factory, ioStreams genericclioptio }, } - o.CreateSubcommandOptions.PrintFlags.AddFlags(cmd) + o.PrintFlags.AddFlags(cmd) cmdutil.AddApplyAnnotationFlags(cmd) cmdutil.AddValidateFlags(cmd) - cmdutil.AddGeneratorFlags(cmd, generateversioned.ClusterRoleBindingV1GeneratorName) - cmd.Flags().String("clusterrole", "", i18n.T("ClusterRole this ClusterRoleBinding should reference")) + cmdutil.AddDryRunFlag(cmd) + cmd.Flags().StringVar(&o.ClusterRole, "clusterrole", "", i18n.T("ClusterRole this ClusterRoleBinding should reference")) + cmd.MarkFlagRequired("clusterrole") cmd.MarkFlagCustom("clusterrole", "__kubectl_get_resource_clusterrole") - cmd.Flags().StringArray("user", []string{}, "Usernames to bind to the clusterrole") - cmd.Flags().StringArray("group", []string{}, "Groups to bind to the clusterrole") - cmd.Flags().StringArray("serviceaccount", []string{}, "Service accounts to bind to the clusterrole, in the format :") + cmd.Flags().StringArrayVar(&o.Users, "user", o.Users, "Usernames to bind to the clusterrole") + cmd.Flags().StringArrayVar(&o.Groups, "group", o.Groups, "Groups to bind to the clusterrole") + cmd.Flags().StringArrayVar(&o.ServiceAccounts, "serviceaccount", o.ServiceAccounts, "Service accounts to bind to the clusterrole, in the format :") + cmdutil.AddFieldManagerFlagVar(cmd, &o.FieldManager, "kubectl-create") return cmd } // Complete completes all the required options -func (o *ClusterRoleBindingOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error { - name, err := NameFromCommandArgs(cmd, args) +func (o *ClusterRoleBindingOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error { + var err error + o.Name, err = NameFromCommandArgs(cmd, args) if err != nil { return err } - var generator generate.StructuredGenerator - switch generatorName := cmdutil.GetFlagString(cmd, "generator"); generatorName { - case generateversioned.ClusterRoleBindingV1GeneratorName: - generator = &generateversioned.ClusterRoleBindingGeneratorV1{ - Name: name, - ClusterRole: cmdutil.GetFlagString(cmd, "clusterrole"), - Users: cmdutil.GetFlagStringArray(cmd, "user"), - Groups: cmdutil.GetFlagStringArray(cmd, "group"), - ServiceAccounts: cmdutil.GetFlagStringArray(cmd, "serviceaccount"), - } - default: - return errUnsupportedGenerator(cmd, generatorName) + cs, err := f.KubernetesClientSet() + if err != nil { + return err + } + o.Client = cs.RbacV1() + + o.CreateAnnotation = cmdutil.GetFlagBool(cmd, cmdutil.ApplyAnnotationsFlag) + + o.DryRunStrategy, err = cmdutil.GetDryRunStrategy(cmd) + if err != nil { + return err + } + dynamicClient, err := f.DynamicClient() + if err != nil { + return err + } + discoveryClient, err := f.ToDiscoveryClient() + if err != nil { + return err + } + o.DryRunVerifier = resource.NewDryRunVerifier(dynamicClient, discoveryClient) + cmdutil.PrintFlagsWithDryRunStrategy(o.PrintFlags, o.DryRunStrategy) + + printer, err := o.PrintFlags.ToPrinter() + if err != nil { + return err + } + o.PrintObj = func(obj runtime.Object) error { + return printer.PrintObj(obj, o.Out) } - return o.CreateSubcommandOptions.Complete(f, cmd, args, generator) + return nil } -// Run calls the CreateSubcommandOptions.Run in ClusterRoleBindingOpts instance -func (o *ClusterRoleBindingOpts) Run() error { - return o.CreateSubcommandOptions.Run() +// Run calls the CreateSubcommandOptions.Run in ClusterRoleBindingOptions instance +func (o *ClusterRoleBindingOptions) Run() error { + clusterRoleBinding, err := o.createClusterRoleBinding() + if err != nil { + return err + } + + if err := util.CreateOrUpdateAnnotation(o.CreateAnnotation, clusterRoleBinding, scheme.DefaultJSONEncoder()); err != nil { + return err + } + + if o.DryRunStrategy != cmdutil.DryRunClient { + createOptions := metav1.CreateOptions{} + if o.FieldManager != "" { + createOptions.FieldManager = o.FieldManager + } + if o.DryRunStrategy == cmdutil.DryRunServer { + if err := o.DryRunVerifier.HasSupport(clusterRoleBinding.GroupVersionKind()); err != nil { + return err + } + createOptions.DryRun = []string{metav1.DryRunAll} + } + var err error + clusterRoleBinding, err = o.Client.ClusterRoleBindings().Create(context.TODO(), clusterRoleBinding, createOptions) + if err != nil { + return fmt.Errorf("failed to create clusterrolebinding: %v", err) + } + } + + return o.PrintObj(clusterRoleBinding) +} + +func (o *ClusterRoleBindingOptions) createClusterRoleBinding() (*rbacv1.ClusterRoleBinding, error) { + clusterRoleBinding := &rbacv1.ClusterRoleBinding{ + TypeMeta: metav1.TypeMeta{APIVersion: rbacv1.SchemeGroupVersion.String(), Kind: "ClusterRoleBinding"}, + ObjectMeta: metav1.ObjectMeta{ + Name: o.Name, + }, + RoleRef: rbacv1.RoleRef{ + APIGroup: rbacv1.GroupName, + Kind: "ClusterRole", + Name: o.ClusterRole, + }, + } + + for _, user := range o.Users { + clusterRoleBinding.Subjects = append(clusterRoleBinding.Subjects, rbacv1.Subject{ + Kind: rbacv1.UserKind, + APIGroup: rbacv1.GroupName, + Name: user, + }) + } + + for _, group := range o.Groups { + clusterRoleBinding.Subjects = append(clusterRoleBinding.Subjects, rbacv1.Subject{ + Kind: rbacv1.GroupKind, + APIGroup: rbacv1.GroupName, + Name: group, + }) + } + + for _, sa := range o.ServiceAccounts { + tokens := strings.Split(sa, ":") + if len(tokens) != 2 || tokens[0] == "" || tokens[1] == "" { + return nil, fmt.Errorf("serviceaccount must be :") + } + clusterRoleBinding.Subjects = append(clusterRoleBinding.Subjects, rbacv1.Subject{ + Kind: rbacv1.ServiceAccountKind, + APIGroup: "", + Namespace: tokens[0], + Name: tokens[1], + }) + } + + return clusterRoleBinding, nil } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_configmap.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_configmap.go index ebb669f6462..b93c87db445 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_configmap.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_configmap.go @@ -90,6 +90,7 @@ func NewCmdCreateConfigMap(f cmdutil.Factory, ioStreams genericclioptions.IOStre cmd.Flags().StringArray("from-literal", []string{}, "Specify a key and literal value to insert in configmap (i.e. mykey=somevalue)") cmd.Flags().String("from-env-file", "", "Specify the path to a file to read lines of key=val pairs to create a configmap (i.e. a Docker .env file).") cmd.Flags().Bool("append-hash", false, "Append a hash of the configmap to its name.") + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_cronjob.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_cronjob.go index f349f0e1e29..57709febb26 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_cronjob.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_cronjob.go @@ -32,6 +32,7 @@ import ( batchv1beta1client "k8s.io/client-go/kubernetes/typed/batch/v1beta1" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/scheme" + "k8s.io/kubectl/pkg/util" "k8s.io/kubectl/pkg/util/templates" ) @@ -41,13 +42,10 @@ var ( cronjobExample = templates.Examples(` # Create a cronjob - kubectl create cronjob my-job --image=busybox + kubectl create cronjob my-job --image=busybox --schedule="*/1 * * * *" # Create a cronjob with command - kubectl create cronjob my-job --image=busybox -- date - - # Create a cronjob with schedule - kubectl create cronjob test-job --image=busybox --schedule="*/1 * * * *"`) + kubectl create cronjob my-job --image=busybox --schedule="*/1 * * * *" -- date`) ) type CreateCronJobOptions struct { @@ -61,12 +59,14 @@ type CreateCronJobOptions struct { Command []string Restart string - Namespace string - Client batchv1beta1client.BatchV1beta1Interface - DryRunStrategy cmdutil.DryRunStrategy - DryRunVerifier *resource.DryRunVerifier - Builder *resource.Builder - Cmd *cobra.Command + Namespace string + EnforceNamespace bool + Client batchv1beta1client.BatchV1beta1Interface + DryRunStrategy cmdutil.DryRunStrategy + DryRunVerifier *resource.DryRunVerifier + Builder *resource.Builder + FieldManager string + CreateAnnotation bool genericclioptions.IOStreams } @@ -82,14 +82,14 @@ func NewCreateCronJobOptions(ioStreams genericclioptions.IOStreams) *CreateCronJ func NewCmdCreateCronJob(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { o := NewCreateCronJobOptions(ioStreams) cmd := &cobra.Command{ - Use: "cronjob NAME --image=image --schedule='0/5 * * * ?' -- [COMMAND] [args...]", - Aliases: []string{"cj"}, - Short: cronjobLong, - Long: cronjobLong, - Example: cronjobExample, + Use: "cronjob NAME --image=image --schedule='0/5 * * * ?' -- [COMMAND] [args...]", + DisableFlagsInUseLine: false, + Aliases: []string{"cj"}, + Short: cronjobLong, + Long: cronjobLong, + Example: cronjobExample, Run: func(cmd *cobra.Command, args []string) { cmdutil.CheckErr(o.Complete(f, cmd, args)) - cmdutil.CheckErr(o.Validate()) cmdutil.CheckErr(o.Run()) }, } @@ -100,8 +100,11 @@ func NewCmdCreateCronJob(f cmdutil.Factory, ioStreams genericclioptions.IOStream cmdutil.AddValidateFlags(cmd) cmdutil.AddDryRunFlag(cmd) cmd.Flags().StringVar(&o.Image, "image", o.Image, "Image name to run.") + cmd.MarkFlagRequired("image") cmd.Flags().StringVar(&o.Schedule, "schedule", o.Schedule, "A schedule in the Cron format the job should be run with.") + cmd.MarkFlagRequired("schedule") cmd.Flags().StringVar(&o.Restart, "restart", o.Restart, "job's restart policy. supported values: OnFailure, Never") + cmdutil.AddFieldManagerFlagVar(cmd, &o.FieldManager, "kubectl-create") return cmd } @@ -128,12 +131,13 @@ func (o *CreateCronJobOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, a return err } - o.Namespace, _, err = f.ToRawKubeConfigLoader().Namespace() + o.Namespace, o.EnforceNamespace, err = f.ToRawKubeConfigLoader().Namespace() if err != nil { return err } o.Builder = f.NewBuilder() - o.Cmd = cmd + + o.CreateAnnotation = cmdutil.GetFlagBool(cmd, cmdutil.ApplyAnnotationsFlag) o.DryRunStrategy, err = cmdutil.GetDryRunStrategy(cmd) if err != nil { @@ -160,22 +164,18 @@ func (o *CreateCronJobOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, a return nil } -func (o *CreateCronJobOptions) Validate() error { - if len(o.Image) == 0 { - return fmt.Errorf("--image must be specified") - } - if len(o.Schedule) == 0 { - return fmt.Errorf("--schedule must be specified") - } - return nil -} - func (o *CreateCronJobOptions) Run() error { - var cronjob *batchv1beta1.CronJob - cronjob = o.createCronJob() + cronjob := o.createCronJob() + + if err := util.CreateOrUpdateAnnotation(o.CreateAnnotation, cronjob, scheme.DefaultJSONEncoder()); err != nil { + return err + } if o.DryRunStrategy != cmdutil.DryRunClient { createOptions := metav1.CreateOptions{} + if o.FieldManager != "" { + createOptions.FieldManager = o.FieldManager + } if o.DryRunStrategy == cmdutil.DryRunServer { if err := o.DryRunVerifier.HasSupport(cronjob.GroupVersionKind()); err != nil { return err @@ -193,7 +193,7 @@ func (o *CreateCronJobOptions) Run() error { } func (o *CreateCronJobOptions) createCronJob() *batchv1beta1.CronJob { - return &batchv1beta1.CronJob{ + cronjob := &batchv1beta1.CronJob{ TypeMeta: metav1.TypeMeta{APIVersion: batchv1beta1.SchemeGroupVersion.String(), Kind: "CronJob"}, ObjectMeta: metav1.ObjectMeta{ Name: o.Name, @@ -221,4 +221,8 @@ func (o *CreateCronJobOptions) createCronJob() *batchv1beta1.CronJob { }, }, } + if o.EnforceNamespace { + cronjob.Namespace = o.Namespace + } + return cronjob } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_deployment.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_deployment.go index 1718d75daa3..92afced48c0 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_deployment.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_deployment.go @@ -17,12 +17,23 @@ limitations under the License. package create import ( + "context" + "fmt" + "strings" + "github.com/spf13/cobra" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + utilrand "k8s.io/apimachinery/pkg/util/rand" "k8s.io/cli-runtime/pkg/genericclioptions" + "k8s.io/cli-runtime/pkg/resource" + appsv1client "k8s.io/client-go/kubernetes/typed/apps/v1" cmdutil "k8s.io/kubectl/pkg/cmd/util" - "k8s.io/kubectl/pkg/generate" - generateversioned "k8s.io/kubectl/pkg/generate/versioned" + "k8s.io/kubectl/pkg/scheme" + "k8s.io/kubectl/pkg/util" "k8s.io/kubectl/pkg/util/i18n" "k8s.io/kubectl/pkg/util/templates" ) @@ -32,124 +43,237 @@ var ( Create a deployment with the specified name.`)) deploymentExample = templates.Examples(i18n.T(` - # Create a new deployment named my-dep that runs the busybox image. - kubectl create deployment my-dep --image=busybox`)) + # Create a deployment named my-dep that runs the busybox image. + kubectl create deployment my-dep --image=busybox + + # Create a deployment with command + kubectl create deployment my-dep --image=busybox -- date + + # Create a deployment named my-dep that runs the nginx image with 3 replicas. + kubectl create deployment my-dep --image=nginx --replicas=3 + + # Create a deployment named my-dep that runs the busybox image and expose port 5701. + kubectl create deployment my-dep --image=busybox --port=5701`)) ) -// DeploymentOpts is returned by NewCmdCreateDeployment -type DeploymentOpts struct { - CreateSubcommandOptions *CreateSubcommandOptions +// CreateDeploymentOptions is returned by NewCmdCreateDeployment +type CreateDeploymentOptions struct { + PrintFlags *genericclioptions.PrintFlags + + PrintObj func(obj runtime.Object) error + + Name string + Images []string + Port int32 + Replicas int32 + Command []string + Namespace string + EnforceNamespace bool + FieldManager string + CreateAnnotation bool + + Client appsv1client.AppsV1Interface + DryRunStrategy cmdutil.DryRunStrategy + DryRunVerifier *resource.DryRunVerifier + + genericclioptions.IOStreams +} + +func NewCreateCreateDeploymentOptions(ioStreams genericclioptions.IOStreams) *CreateDeploymentOptions { + return &CreateDeploymentOptions{ + Port: -1, + Replicas: 1, + PrintFlags: genericclioptions.NewPrintFlags("created").WithTypeSetter(scheme.Scheme), + IOStreams: ioStreams, + } } // NewCmdCreateDeployment is a macro command to create a new deployment. // This command is better known to users as `kubectl create deployment`. -// Note that this command overlaps significantly with the `kubectl run` command. func NewCmdCreateDeployment(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { - options := &DeploymentOpts{ - CreateSubcommandOptions: NewCreateSubcommandOptions(ioStreams), - } - + o := NewCreateCreateDeploymentOptions(ioStreams) cmd := &cobra.Command{ - Use: "deployment NAME --image=image [--dry-run=server|client|none]", + Use: "deployment NAME --image=image -- [COMMAND] [args...]", DisableFlagsInUseLine: true, Aliases: []string{"deploy"}, - Short: i18n.T("Create a deployment with the specified name."), + Short: deploymentLong, Long: deploymentLong, Example: deploymentExample, Run: func(cmd *cobra.Command, args []string) { - cmdutil.CheckErr(options.Complete(f, cmd, args)) - cmdutil.CheckErr(options.Run()) + cmdutil.CheckErr(o.Complete(f, cmd, args)) + cmdutil.CheckErr(o.Validate()) + cmdutil.CheckErr(o.Run()) }, } - options.CreateSubcommandOptions.PrintFlags.AddFlags(cmd) + o.PrintFlags.AddFlags(cmd) cmdutil.AddApplyAnnotationFlags(cmd) cmdutil.AddValidateFlags(cmd) cmdutil.AddGeneratorFlags(cmd, "") - cmd.Flags().StringSlice("image", []string{}, "Image name to run.") + cmd.Flags().StringSliceVar(&o.Images, "image", o.Images, "Image names to run.") cmd.MarkFlagRequired("image") + cmd.Flags().Int32Var(&o.Port, "port", o.Port, "The port that this container exposes.") + cmd.Flags().Int32VarP(&o.Replicas, "replicas", "r", o.Replicas, "Number of replicas to create. Default is 1.") + cmdutil.AddFieldManagerFlagVar(cmd, &o.FieldManager, "kubectl-create") + return cmd } -// generatorFromName returns the appropriate StructuredGenerator based on the -// generatorName. If the generatorName is unrecognized, then return (nil, -// false). -func generatorFromName( - generatorName string, - imageNames []string, - deploymentName string, -) (generate.StructuredGenerator, bool) { - - switch generatorName { - case generateversioned.DeploymentBasicAppsV1GeneratorName: - generator := &generateversioned.DeploymentBasicAppsGeneratorV1{ - BaseDeploymentGenerator: generateversioned.BaseDeploymentGenerator{ - Name: deploymentName, - Images: imageNames, - }, - } - return generator, true - - case generateversioned.DeploymentBasicAppsV1Beta1GeneratorName: - generator := &generateversioned.DeploymentBasicAppsGeneratorV1Beta1{ - BaseDeploymentGenerator: generateversioned.BaseDeploymentGenerator{ - Name: deploymentName, - Images: imageNames, - }, - } - return generator, true - - case generateversioned.DeploymentBasicV1Beta1GeneratorName: - generator := &generateversioned.DeploymentBasicGeneratorV1{ - BaseDeploymentGenerator: generateversioned.BaseDeploymentGenerator{ - Name: deploymentName, - Images: imageNames, - }, - } - return generator, true - } - - return nil, false -} - // Complete completes all the options -func (o *DeploymentOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error { +func (o *CreateDeploymentOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error { name, err := NameFromCommandArgs(cmd, args) if err != nil { return err } + o.Name = name + if len(args) > 1 { + o.Command = args[1:] + } - clientset, err := f.KubernetesClientSet() + clientConfig, err := f.ToRESTConfig() + if err != nil { + return err + } + o.Client, err = appsv1client.NewForConfig(clientConfig) if err != nil { return err } - generatorName := cmdutil.GetFlagString(cmd, "generator") - - if len(generatorName) == 0 { - generatorName = generateversioned.DeploymentBasicAppsV1GeneratorName - generatorNameTemp, err := generateversioned.FallbackGeneratorNameIfNecessary(generatorName, clientset.Discovery(), o.CreateSubcommandOptions.ErrOut) - if err != nil { - return err - } - if generatorNameTemp != generatorName { - cmdutil.Warning(o.CreateSubcommandOptions.ErrOut, generatorName, generatorNameTemp) - } else { - generatorName = generatorNameTemp - } + o.Namespace, o.EnforceNamespace, err = f.ToRawKubeConfigLoader().Namespace() + if err != nil { + return err } - imageNames := cmdutil.GetFlagStringSlice(cmd, "image") - generator, ok := generatorFromName(generatorName, imageNames, name) - if !ok { - return errUnsupportedGenerator(cmd, generatorName) + o.CreateAnnotation = cmdutil.GetFlagBool(cmd, cmdutil.ApplyAnnotationsFlag) + + o.DryRunStrategy, err = cmdutil.GetDryRunStrategy(cmd) + if err != nil { + return err + } + dynamicClient, err := f.DynamicClient() + if err != nil { + return err + } + discoveryClient, err := f.ToDiscoveryClient() + if err != nil { + return err + } + o.DryRunVerifier = resource.NewDryRunVerifier(dynamicClient, discoveryClient) + cmdutil.PrintFlagsWithDryRunStrategy(o.PrintFlags, o.DryRunStrategy) + + printer, err := o.PrintFlags.ToPrinter() + if err != nil { + return err + } + o.PrintObj = func(obj runtime.Object) error { + return printer.PrintObj(obj, o.Out) } - return o.CreateSubcommandOptions.Complete(f, cmd, args, generator) + return nil +} + +func (o *CreateDeploymentOptions) Validate() error { + if len(o.Images) > 1 && len(o.Command) > 0 { + return fmt.Errorf("cannot specify multiple --image options and command") + } + return nil } // Run performs the execution of 'create deployment' sub command -func (o *DeploymentOpts) Run() error { - return o.CreateSubcommandOptions.Run() +func (o *CreateDeploymentOptions) Run() error { + deploy := o.createDeployment() + + if err := util.CreateOrUpdateAnnotation(o.CreateAnnotation, deploy, scheme.DefaultJSONEncoder()); err != nil { + return err + } + + if o.DryRunStrategy != cmdutil.DryRunClient { + createOptions := metav1.CreateOptions{} + if o.FieldManager != "" { + createOptions.FieldManager = o.FieldManager + } + if o.DryRunStrategy == cmdutil.DryRunServer { + if err := o.DryRunVerifier.HasSupport(deploy.GroupVersionKind()); err != nil { + return err + } + createOptions.DryRun = []string{metav1.DryRunAll} + } + var err error + deploy, err = o.Client.Deployments(o.Namespace).Create(context.TODO(), deploy, createOptions) + if err != nil { + return fmt.Errorf("failed to create deployment: %v", err) + } + } + + return o.PrintObj(deploy) +} + +func (o *CreateDeploymentOptions) createDeployment() *appsv1.Deployment { + labels := map[string]string{"app": o.Name} + selector := metav1.LabelSelector{MatchLabels: labels} + namespace := "" + if o.EnforceNamespace { + namespace = o.Namespace + } + + deploy := &appsv1.Deployment{ + TypeMeta: metav1.TypeMeta{APIVersion: appsv1.SchemeGroupVersion.String(), Kind: "Deployment"}, + ObjectMeta: metav1.ObjectMeta{ + Name: o.Name, + Labels: labels, + Namespace: namespace, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: &o.Replicas, + Selector: &selector, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + }, + Spec: o.buildPodSpec(), + }, + }, + } + + if o.Port >= 0 && len(deploy.Spec.Template.Spec.Containers) > 0 { + deploy.Spec.Template.Spec.Containers[0].Ports = []corev1.ContainerPort{{ContainerPort: o.Port}} + } + return deploy +} + +// buildPodSpec parses the image strings and assemble them into the Containers +// of a PodSpec. This is all you need to create the PodSpec for a deployment. +func (o *CreateDeploymentOptions) buildPodSpec() corev1.PodSpec { + podSpec := corev1.PodSpec{Containers: []corev1.Container{}} + for _, imageString := range o.Images { + // Retain just the image name + imageSplit := strings.Split(imageString, "/") + name := imageSplit[len(imageSplit)-1] + // Remove any tag or hash + if strings.Contains(name, ":") { + name = strings.Split(name, ":")[0] + } + if strings.Contains(name, "@") { + name = strings.Split(name, "@")[0] + } + name = sanitizeAndUniquify(name) + podSpec.Containers = append(podSpec.Containers, corev1.Container{ + Name: name, + Image: imageString, + Command: o.Command, + }) + } + return podSpec +} + +// sanitizeAndUniquify replaces characters like "." or "_" into "-" to follow DNS1123 rules. +// Then add random suffix to make it uniquified. +func sanitizeAndUniquify(name string) string { + if strings.ContainsAny(name, "_.") { + name = strings.Replace(name, "_", "-", -1) + name = strings.Replace(name, ".", "-", -1) + name = fmt.Sprintf("%s-%s", name, utilrand.String(5)) + } + return name } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_job.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_job.go index a295b6a0976..b6133434730 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_job.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_job.go @@ -22,7 +22,6 @@ import ( "github.com/spf13/cobra" - appsv1 "k8s.io/api/apps/v1" batchv1 "k8s.io/api/batch/v1" batchv1beta1 "k8s.io/api/batch/v1beta1" corev1 "k8s.io/api/core/v1" @@ -33,6 +32,7 @@ import ( batchv1client "k8s.io/client-go/kubernetes/typed/batch/v1" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/scheme" + "k8s.io/kubectl/pkg/util" "k8s.io/kubectl/pkg/util/i18n" "k8s.io/kubectl/pkg/util/templates" ) @@ -63,12 +63,14 @@ type CreateJobOptions struct { From string Command []string - Namespace string - Client batchv1client.BatchV1Interface - DryRunStrategy cmdutil.DryRunStrategy - DryRunVerifier *resource.DryRunVerifier - Builder *resource.Builder - Cmd *cobra.Command + Namespace string + EnforceNamespace bool + Client batchv1client.BatchV1Interface + DryRunStrategy cmdutil.DryRunStrategy + DryRunVerifier *resource.DryRunVerifier + Builder *resource.Builder + FieldManager string + CreateAnnotation bool genericclioptions.IOStreams } @@ -85,10 +87,11 @@ func NewCreateJobOptions(ioStreams genericclioptions.IOStreams) *CreateJobOption func NewCmdCreateJob(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { o := NewCreateJobOptions(ioStreams) cmd := &cobra.Command{ - Use: "job NAME --image=image [--from=cronjob/name] -- [COMMAND] [args...]", - Short: jobLong, - Long: jobLong, - Example: jobExample, + Use: "job NAME --image=image [--from=cronjob/name] -- [COMMAND] [args...]", + DisableFlagsInUseLine: true, + Short: jobLong, + Long: jobLong, + Example: jobExample, Run: func(cmd *cobra.Command, args []string) { cmdutil.CheckErr(o.Complete(f, cmd, args)) cmdutil.CheckErr(o.Validate()) @@ -103,7 +106,7 @@ func NewCmdCreateJob(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) * cmdutil.AddDryRunFlag(cmd) cmd.Flags().StringVar(&o.Image, "image", o.Image, "Image name to run.") cmd.Flags().StringVar(&o.From, "from", o.From, "The name of the resource to create a Job from (only cronjob is supported).") - + cmdutil.AddFieldManagerFlagVar(cmd, &o.FieldManager, "kubectl-create") return cmd } @@ -127,12 +130,13 @@ func (o *CreateJobOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args return err } - o.Namespace, _, err = f.ToRawKubeConfigLoader().Namespace() + o.CreateAnnotation = cmdutil.GetFlagBool(cmd, cmdutil.ApplyAnnotationsFlag) + + o.Namespace, o.EnforceNamespace, err = f.ToRawKubeConfigLoader().Namespace() if err != nil { return err } o.Builder = f.NewBuilder() - o.Cmd = cmd o.DryRunStrategy, err = cmdutil.GetDryRunStrategy(cmd) if err != nil { @@ -202,8 +206,16 @@ func (o *CreateJobOptions) Run() error { job = o.createJobFromCronJob(cronJob) } + + if err := util.CreateOrUpdateAnnotation(o.CreateAnnotation, job, scheme.DefaultJSONEncoder()); err != nil { + return err + } + if o.DryRunStrategy != cmdutil.DryRunClient { createOptions := metav1.CreateOptions{} + if o.FieldManager != "" { + createOptions.FieldManager = o.FieldManager + } if o.DryRunStrategy == cmdutil.DryRunServer { if err := o.DryRunVerifier.HasSupport(job.GroupVersionKind()); err != nil { return err @@ -221,7 +233,7 @@ func (o *CreateJobOptions) Run() error { } func (o *CreateJobOptions) createJob() *batchv1.Job { - return &batchv1.Job{ + job := &batchv1.Job{ // this is ok because we know exactly how we want to be serialized TypeMeta: metav1.TypeMeta{APIVersion: batchv1.SchemeGroupVersion.String(), Kind: "Job"}, ObjectMeta: metav1.ObjectMeta{ @@ -242,6 +254,10 @@ func (o *CreateJobOptions) createJob() *batchv1.Job { }, }, } + if o.EnforceNamespace { + job.Namespace = o.Namespace + } + return job } func (o *CreateJobOptions) createJobFromCronJob(cronJob *batchv1beta1.CronJob) *batchv1.Job { @@ -251,7 +267,7 @@ func (o *CreateJobOptions) createJobFromCronJob(cronJob *batchv1beta1.CronJob) * annotations[k] = v } - return &batchv1.Job{ + job := &batchv1.Job{ // this is ok because we know exactly how we want to be serialized TypeMeta: metav1.TypeMeta{APIVersion: batchv1.SchemeGroupVersion.String(), Kind: "Job"}, ObjectMeta: metav1.ObjectMeta{ @@ -259,9 +275,18 @@ func (o *CreateJobOptions) createJobFromCronJob(cronJob *batchv1beta1.CronJob) * Annotations: annotations, Labels: cronJob.Spec.JobTemplate.Labels, OwnerReferences: []metav1.OwnerReference{ - *metav1.NewControllerRef(cronJob, appsv1.SchemeGroupVersion.WithKind("CronJob")), + { + APIVersion: batchv1beta1.SchemeGroupVersion.String(), + Kind: cronJob.Kind, + Name: cronJob.GetName(), + UID: cronJob.GetUID(), + }, }, }, Spec: cronJob.Spec.JobTemplate.Spec, } + if o.EnforceNamespace { + job.Namespace = o.Namespace + } + return job } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_namespace.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_namespace.go index 7e89c6f9164..49a4b3c962f 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_namespace.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_namespace.go @@ -65,6 +65,7 @@ func NewCmdCreateNamespace(f cmdutil.Factory, ioStreams genericclioptions.IOStre cmdutil.AddApplyAnnotationFlags(cmd) cmdutil.AddValidateFlags(cmd) cmdutil.AddGeneratorFlags(cmd, generateversioned.NamespaceV1GeneratorName) + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_pdb.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_pdb.go index 033a78813d2..569895d11eb 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_pdb.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_pdb.go @@ -74,6 +74,7 @@ func NewCmdCreatePodDisruptionBudget(f cmdutil.Factory, ioStreams genericcliopti cmd.Flags().String("min-available", "", i18n.T("The minimum number or percentage of available pods this budget requires.")) cmd.Flags().String("max-unavailable", "", i18n.T("The maximum number or percentage of unavailable pods this budget requires.")) cmd.Flags().String("selector", "", i18n.T("A label selector to use for this budget. Only equality-based selector requirements are supported.")) + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_priorityclass.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_priorityclass.go index bbc5f8006f9..3d4aba1abb0 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_priorityclass.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_priorityclass.go @@ -76,7 +76,8 @@ func NewCmdCreatePriorityClass(f cmdutil.Factory, ioStreams genericclioptions.IO cmd.Flags().Int32("value", 0, i18n.T("the value of this priority class.")) cmd.Flags().Bool("global-default", false, i18n.T("global-default specifies whether this PriorityClass should be considered as the default priority.")) cmd.Flags().String("description", "", i18n.T("description is an arbitrary string that usually provides guidelines on when this priority class should be used.")) - cmd.Flags().String("preemption-policy", "", i18n.T("preemption-policy is the policy for preempting pods with lower priority.")) + cmd.Flags().String("preemption-policy", "PreemptLowerPriority", i18n.T("preemption-policy is the policy for preempting pods with lower priority.")) + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_quota.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_quota.go index 41741988166..c78546e953b 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_quota.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_quota.go @@ -70,6 +70,7 @@ func NewCmdCreateQuota(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) cmdutil.AddGeneratorFlags(cmd, generateversioned.ResourceQuotaV1GeneratorName) cmd.Flags().String("hard", "", i18n.T("A comma-delimited set of resource=quantity pairs that define a hard limit.")) cmd.Flags().String("scopes", "", i18n.T("A comma-delimited set of quota scopes that must all match each object tracked by the quota.")) + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_role.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_role.go index 7db2de24f19..62e624476ed 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_role.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_role.go @@ -34,6 +34,7 @@ import ( clientgorbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/scheme" + "k8s.io/kubectl/pkg/util" "k8s.io/kubectl/pkg/util/i18n" "k8s.io/kubectl/pkg/util/templates" ) @@ -127,13 +128,16 @@ type CreateRoleOptions struct { Resources []ResourceOptions ResourceNames []string - DryRunStrategy cmdutil.DryRunStrategy - DryRunVerifier *resource.DryRunVerifier - OutputFormat string - Namespace string - Client clientgorbacv1.RbacV1Interface - Mapper meta.RESTMapper - PrintObj func(obj runtime.Object) error + DryRunStrategy cmdutil.DryRunStrategy + DryRunVerifier *resource.DryRunVerifier + OutputFormat string + Namespace string + EnforceNamespace bool + Client clientgorbacv1.RbacV1Interface + Mapper meta.RESTMapper + PrintObj func(obj runtime.Object) error + FieldManager string + CreateAnnotation bool genericclioptions.IOStreams } @@ -172,7 +176,7 @@ func NewCmdCreateRole(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) cmd.Flags().StringSliceVar(&o.Verbs, "verb", o.Verbs, "Verb that applies to the resources contained in the rule") cmd.Flags().StringSlice("resource", []string{}, "Resource that the rule applies to") cmd.Flags().StringArrayVar(&o.ResourceNames, "resource-name", o.ResourceNames, "Resource in the white list that the rule applies to, repeat this flag for multiple items") - + cmdutil.AddFieldManagerFlagVar(cmd, &o.FieldManager, "kubectl-create") return cmd } @@ -252,6 +256,7 @@ func (o *CreateRoleOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args } o.DryRunVerifier = resource.NewDryRunVerifier(dynamicClient, discoveryClient) o.OutputFormat = cmdutil.GetFlagString(cmd, "output") + o.CreateAnnotation = cmdutil.GetFlagBool(cmd, cmdutil.ApplyAnnotationsFlag) cmdutil.PrintFlagsWithDryRunStrategy(o.PrintFlags, o.DryRunStrategy) printer, err := o.PrintFlags.ToPrinter() @@ -262,7 +267,7 @@ func (o *CreateRoleOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args return printer.PrintObj(obj, o.Out) } - o.Namespace, _, err = f.ToRawKubeConfigLoader().Namespace() + o.Namespace, o.EnforceNamespace, err = f.ToRawKubeConfigLoader().Namespace() if err != nil { return err } @@ -351,10 +356,20 @@ func (o *CreateRoleOptions) RunCreateRole() error { return err } role.Rules = rules + if o.EnforceNamespace { + role.Namespace = o.Namespace + } + + if err := util.CreateOrUpdateAnnotation(o.CreateAnnotation, role, scheme.DefaultJSONEncoder()); err != nil { + return err + } // Create role. if o.DryRunStrategy != cmdutil.DryRunClient { createOptions := metav1.CreateOptions{} + if o.FieldManager != "" { + createOptions.FieldManager = o.FieldManager + } if o.DryRunStrategy == cmdutil.DryRunServer { if err := o.DryRunVerifier.HasSupport(role.GroupVersionKind()); err != nil { return err diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_rolebinding.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_rolebinding.go index f37bcdf1764..aa680746c52 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_rolebinding.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_rolebinding.go @@ -69,6 +69,7 @@ func NewCmdCreateRoleBinding(f cmdutil.Factory, ioStreams genericclioptions.IOSt cmd.Flags().StringArray("user", []string{}, "Usernames to bind to the role") cmd.Flags().StringArray("group", []string{}, "Groups to bind to the role") cmd.Flags().StringArray("serviceaccount", []string{}, "Service accounts to bind to the role, in the format :") + cmdutil.AddFieldManagerFlagVar(cmd, &o.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_secret.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_secret.go index 932ec2114f1..1879b8e9c7a 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_secret.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_secret.go @@ -106,6 +106,7 @@ func NewCmdCreateSecretGeneric(f cmdutil.Factory, ioStreams genericclioptions.IO cmd.Flags().String("from-env-file", "", "Specify the path to a file to read lines of key=val pairs to create a secret (i.e. a Docker .env file).") cmd.Flags().String("type", "", i18n.T("The type of secret to create")) cmd.Flags().Bool("append-hash", false, "Append a hash of the secret to its name.") + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } @@ -189,13 +190,12 @@ func NewCmdCreateSecretDockerRegistry(f cmdutil.Factory, ioStreams genericcliopt cmdutil.AddValidateFlags(cmd) cmdutil.AddGeneratorFlags(cmd, generateversioned.SecretForDockerRegistryV1GeneratorName) cmd.Flags().String("docker-username", "", i18n.T("Username for Docker registry authentication")) - cmd.MarkFlagRequired("docker-username") cmd.Flags().String("docker-password", "", i18n.T("Password for Docker registry authentication")) - cmd.MarkFlagRequired("docker-password") cmd.Flags().String("docker-email", "", i18n.T("Email for Docker registry")) cmd.Flags().String("docker-server", "https://index.docker.io/v1/", i18n.T("Server location for Docker registry")) cmd.Flags().Bool("append-hash", false, "Append a hash of the secret to its name.") cmd.Flags().StringSlice("from-file", []string{}, "Key files can be specified using their file path, in which case a default name will be given to them, or optionally with a name and file path, in which case the given name will be used. Specifying a directory will iterate each named file in the directory that is a valid secret key.") + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } @@ -284,6 +284,7 @@ func NewCmdCreateSecretTLS(f cmdutil.Factory, ioStreams genericclioptions.IOStre cmd.Flags().String("cert", "", i18n.T("Path to PEM encoded public key certificate.")) cmd.Flags().String("key", "", i18n.T("Path to private key associated with given certificate.")) cmd.Flags().Bool("append-hash", false, "Append a hash of the secret to its name.") + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_service.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_service.go index 54bd2248607..9111d1003be 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_service.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_service.go @@ -19,7 +19,7 @@ package create import ( "github.com/spf13/cobra" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/cli-runtime/pkg/genericclioptions" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/generate" @@ -91,6 +91,7 @@ func NewCmdCreateServiceClusterIP(f cmdutil.Factory, ioStreams genericclioptions cmdutil.AddGeneratorFlags(cmd, generateversioned.ServiceClusterIPGeneratorV1Name) addPortFlags(cmd) cmd.Flags().String("clusterip", "", i18n.T("Assign your own ClusterIP or set to 'None' for a 'headless' service (no loadbalancing).")) + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } @@ -164,6 +165,7 @@ func NewCmdCreateServiceNodePort(f cmdutil.Factory, ioStreams genericclioptions. cmdutil.AddValidateFlags(cmd) cmdutil.AddGeneratorFlags(cmd, generateversioned.ServiceNodePortGeneratorV1Name) cmd.Flags().Int("node-port", 0, "Port used to expose the service on each node in a cluster.") + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") addPortFlags(cmd) return cmd } @@ -234,6 +236,7 @@ func NewCmdCreateServiceLoadBalancer(f cmdutil.Factory, ioStreams genericcliopti cmdutil.AddApplyAnnotationFlags(cmd) cmdutil.AddValidateFlags(cmd) cmdutil.AddGeneratorFlags(cmd, generateversioned.ServiceLoadBalancerGeneratorV1Name) + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") addPortFlags(cmd) return cmd } @@ -310,6 +313,7 @@ func NewCmdCreateServiceExternalName(f cmdutil.Factory, ioStreams genericcliopti addPortFlags(cmd) cmd.Flags().String("external-name", "", i18n.T("External name of service")) cmd.MarkFlagRequired("external-name") + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/create/create_serviceaccount.go b/vendor/k8s.io/kubectl/pkg/cmd/create/create_serviceaccount.go index 1963b24ef63..20cb73dc81e 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/create/create_serviceaccount.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/create/create_serviceaccount.go @@ -65,6 +65,7 @@ func NewCmdCreateServiceAccount(f cmdutil.Factory, ioStreams genericclioptions.I cmdutil.AddApplyAnnotationFlags(cmd) cmdutil.AddValidateFlags(cmd) cmdutil.AddGeneratorFlags(cmd, generateversioned.ServiceAccountV1GeneratorName) + cmdutil.AddFieldManagerFlagVar(cmd, &options.CreateSubcommandOptions.FieldManager, "kubectl-create") return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/debug/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/debug/BUILD index fda77d84f1f..977ebc8a96e 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/debug/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/debug/BUILD @@ -31,7 +31,8 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/docker/distribution/reference:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", ], ) @@ -55,7 +56,9 @@ go_test( embed = [":go_default_library"], deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library", "//vendor/github.com/google/go-cmp/cmp:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/debug/debug.go b/vendor/k8s.io/kubectl/pkg/cmd/debug/debug.go index 86ac6e07c44..0c9ec32ca55 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/debug/debug.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/debug/debug.go @@ -23,6 +23,7 @@ import ( "github.com/docker/distribution/reference" "github.com/spf13/cobra" + "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -37,7 +38,6 @@ import ( corev1client "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/cache" watchtools "k8s.io/client-go/tools/watch" - "k8s.io/klog" "k8s.io/kubectl/pkg/cmd/attach" "k8s.io/kubectl/pkg/cmd/exec" "k8s.io/kubectl/pkg/cmd/logs" @@ -47,38 +47,72 @@ import ( "k8s.io/kubectl/pkg/util/i18n" "k8s.io/kubectl/pkg/util/interrupt" "k8s.io/kubectl/pkg/util/templates" + "k8s.io/utils/pointer" ) var ( - debugLong = templates.LongDesc(i18n.T(`Tools for debugging Kubernetes resources`)) + debugLong = templates.LongDesc(i18n.T(` + Debug cluster resources using interactive debugging containers. + + 'debug' provides automation for common debugging tasks for cluster objects identified by + resource and name. Pods will be used by default if resource is not specified. + + The action taken by 'debug' varies depending on what resource is specified. Supported + actions include: + + * Workload: Create a copy of an existing pod with certain attributes changed, + for example changing the image tag to a new version. + * Workload: Add an ephemeral container to an already running pod, for example to add + debugging utilities without restarting the pod. + * Node: Create a new pod that runs in the node's host namespaces and can access + the node's filesystem. + + Alpha disclaimer: command line flags may change`)) debugExample = templates.Examples(i18n.T(` # Create an interactive debugging session in pod mypod and immediately attach to it. # (requires the EphemeralContainers feature to be enabled in the cluster) - kubectl alpha debug mypod -i --image=busybox + kubectl alpha debug mypod -it --image=busybox # Create a debug container named debugger using a custom automated debugging image. # (requires the EphemeralContainers feature to be enabled in the cluster) - kubectl alpha debug --image=myproj/debug-tools -c debugger mypod`)) + kubectl alpha debug --image=myproj/debug-tools -c debugger mypod + + # Create a debug container as a copy of the original Pod and attach to it + kubectl alpha debug mypod -it --image=busybox --copy-to=my-debugger + + # Create a copy of mypod named my-debugger with my-container's image changed to busybox + kubectl alpha debug mypod --image=busybox --container=my-container --copy-to=my-debugger -- sleep 1d + + # Create an interactive debugging session on a node and immediately attach to it. + # The container will run in the host namespaces and the host's filesystem will be mounted at /host + kubectl alpha debug node/mynode -it --image=busybox +`)) ) var nameSuffixFunc = utilrand.String // DebugOptions holds the options for an invocation of kubectl debug. type DebugOptions struct { - Args []string - ArgsOnly bool - Attach bool - Container string - Env []corev1.EnvVar - Image string - Interactive bool - Namespace string - PodNames []string - PullPolicy corev1.PullPolicy - Quiet bool - Target string - TTY bool + Args []string + ArgsOnly bool + Attach bool + Container string + CopyTo string + Replace bool + Env []corev1.EnvVar + Image string + Interactive bool + Namespace string + TargetNames []string + PullPolicy corev1.PullPolicy + Quiet bool + SameNode bool + ShareProcesses bool + Target string + TTY bool + + shareProcessedChanged bool builder *resource.Builder podClient corev1client.PodsGetter @@ -89,9 +123,10 @@ type DebugOptions struct { // NewDebugOptions returns a DebugOptions initialized with default values. func NewDebugOptions(streams genericclioptions.IOStreams) *DebugOptions { return &DebugOptions{ - Args: []string{}, - IOStreams: streams, - PodNames: []string{}, + Args: []string{}, + IOStreams: streams, + TargetNames: []string{}, + ShareProcesses: true, } } @@ -118,16 +153,20 @@ func NewCmdDebug(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra. func addDebugFlags(cmd *cobra.Command, opt *DebugOptions) { cmd.Flags().BoolVar(&opt.ArgsOnly, "arguments-only", opt.ArgsOnly, i18n.T("If specified, everything after -- will be passed to the new container as Args instead of Command.")) - cmd.Flags().BoolVar(&opt.Attach, "attach", opt.Attach, i18n.T("If true, wait for the Pod to start running, and then attach to the Pod as if 'kubectl attach ...' were called. Default false, unless '-i/--stdin' is set, in which case the default is true.")) - cmd.Flags().StringVar(&opt.Container, "container", opt.Container, i18n.T("Container name to use for debug container.")) + cmd.Flags().BoolVar(&opt.Attach, "attach", opt.Attach, i18n.T("If true, wait for the container to start running, and then attach as if 'kubectl attach ...' were called. Default false, unless '-i/--stdin' is set, in which case the default is true.")) + cmd.Flags().StringVarP(&opt.Container, "container", "c", opt.Container, i18n.T("Container name to use for debug container.")) + cmd.Flags().StringVar(&opt.CopyTo, "copy-to", opt.CopyTo, i18n.T("Create a copy of the target Pod with this name.")) + cmd.Flags().BoolVar(&opt.Replace, "replace", opt.Replace, i18n.T("When used with '--copy-to', delete the original Pod")) cmd.Flags().StringToString("env", nil, i18n.T("Environment variables to set in the container.")) cmd.Flags().StringVar(&opt.Image, "image", opt.Image, i18n.T("Container image to use for debug container.")) cmd.MarkFlagRequired("image") cmd.Flags().String("image-pull-policy", string(corev1.PullIfNotPresent), i18n.T("The image pull policy for the container.")) cmd.Flags().BoolVarP(&opt.Interactive, "stdin", "i", opt.Interactive, i18n.T("Keep stdin open on the container(s) in the pod, even if nothing is attached.")) - cmd.Flags().BoolVar(&opt.Quiet, "quiet", opt.Quiet, i18n.T("If true, suppress prompt messages.")) - cmd.Flags().StringVar(&opt.Target, "target", "", i18n.T("Target processes in this container name.")) - cmd.Flags().BoolVarP(&opt.TTY, "tty", "t", opt.TTY, i18n.T("Allocated a TTY for each container in the pod.")) + cmd.Flags().BoolVar(&opt.Quiet, "quiet", opt.Quiet, i18n.T("If true, suppress informational messages.")) + cmd.Flags().BoolVar(&opt.SameNode, "same-node", opt.SameNode, i18n.T("When used with '--copy-to', schedule the copy of target Pod on the same node.")) + cmd.Flags().BoolVar(&opt.ShareProcesses, "share-processes", opt.ShareProcesses, i18n.T("When used with '--copy-to', enable process namespace sharing in the copy.")) + cmd.Flags().StringVar(&opt.Target, "target", "", i18n.T("When debugging a pod, target processes in this container name.")) + cmd.Flags().BoolVarP(&opt.TTY, "tty", "t", opt.TTY, i18n.T("Allocate a TTY for the debugging container.")) } // Complete finishes run-time initialization of debug.DebugOptions. @@ -139,10 +178,10 @@ func (o *DebugOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []st // Arguments argsLen := cmd.ArgsLenAtDash() - o.PodNames = args + o.TargetNames = args // If there is a dash and there are args after the dash, extract the args. if argsLen >= 0 && len(args) > argsLen { - o.PodNames, o.Args = args[:argsLen], args[argsLen:] + o.TargetNames, o.Args = args[:argsLen], args[argsLen:] } // Attach @@ -173,6 +212,9 @@ func (o *DebugOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []st } o.podClient = clientset.CoreV1() + // Share processes + o.shareProcessedChanged = cmd.Flags().Changed("share-processes") + return nil } @@ -187,7 +229,7 @@ func (o *DebugOptions) Validate(cmd *cobra.Command) error { } // Name - if len(o.PodNames) == 0 { + if len(o.TargetNames) == 0 { return fmt.Errorf("NAME is required for debug") } @@ -199,6 +241,11 @@ func (o *DebugOptions) Validate(cmd *cobra.Command) error { return fmt.Errorf("invalid image pull policy: %s", o.PullPolicy) } + // Target + if len(o.Target) > 0 && len(o.CopyTo) > 0 { + return fmt.Errorf("--target is incompatible with --copy-to. Use --share-processes instead.") + } + // TTY if o.TTY && !o.Interactive { return fmt.Errorf("-i/--stdin is required for containers with -t/--tty=true") @@ -209,38 +256,37 @@ func (o *DebugOptions) Validate(cmd *cobra.Command) error { // Run executes a kubectl debug. func (o *DebugOptions) Run(f cmdutil.Factory, cmd *cobra.Command) error { + ctx := context.Background() + r := o.builder. WithScheme(scheme.Scheme, scheme.Scheme.PrioritizedVersionsAllGroups()...). - NamespaceParam(o.Namespace).DefaultNamespace().ResourceNames("pods", o.PodNames...). + NamespaceParam(o.Namespace).DefaultNamespace().ResourceNames("pods", o.TargetNames...). Do() if err := r.Err(); err != nil { return err } - ctx := context.Background() err := r.Visit(func(info *resource.Info, err error) error { if err != nil { // TODO(verb): configurable early return return err } - pods := o.podClient.Pods(info.Namespace) - ec, err := pods.GetEphemeralContainers(ctx, info.Name, metav1.GetOptions{}) - if err != nil { - // The pod has already been fetched at this point, so a NotFound error indicates the ephemeralcontainers subresource wasn't found. - if serr, ok := err.(*errors.StatusError); ok && serr.Status().Reason == metav1.StatusReasonNotFound { - return fmt.Errorf("ephemeral containers are disabled for this cluster (error from server: %q).", err) - } - return err + var ( + debugPod *corev1.Pod + containerName string + visitErr error + ) + switch obj := info.Object.(type) { + case *corev1.Node: + debugPod, containerName, visitErr = o.visitNode(ctx, obj) + case *corev1.Pod: + debugPod, containerName, visitErr = o.visitPod(ctx, obj) + default: + visitErr = fmt.Errorf("%q not supported by debug", info.Mapping.GroupVersionKind) } - klog.V(2).Infof("existing ephemeral containers: %v", ec.EphemeralContainers) - - debugContainer := o.generateDebugContainer(info.Object.(*corev1.Pod)) - klog.V(2).Infof("new ephemeral container: %#v", debugContainer) - ec.EphemeralContainers = append(ec.EphemeralContainers, *debugContainer) - _, err = pods.UpdateEphemeralContainers(ctx, info.Name, ec, metav1.UpdateOptions{}) - if err != nil { - return fmt.Errorf("error updating ephemeral containers: %v", err) + if visitErr != nil { + return visitErr } if o.Attach { @@ -251,6 +297,7 @@ func (o *DebugOptions) Run(f cmdutil.Factory, cmd *cobra.Command) error { TTY: o.TTY, Quiet: o.Quiet, }, + // TODO(verb): kubectl prints an incorrect "Session ended" message for debug containers. CommandName: cmd.Parent().CommandPath() + " attach", Attach: &attach.DefaultRemoteAttach{}, @@ -262,12 +309,7 @@ func (o *DebugOptions) Run(f cmdutil.Factory, cmd *cobra.Command) error { opts.Config = config opts.AttachFunc = attach.DefaultAttachFunc - attachablePod, err := polymorphichelpers.AttachablePodForObjectFn(f, info.Object, opts.GetPodTimeout) - if err != nil { - return err - } - err = handleAttachPod(ctx, f, o.podClient, attachablePod.Namespace, attachablePod.Name, debugContainer.Name, opts) - if err != nil { + if err := handleAttachPod(ctx, f, o.podClient, debugPod.Namespace, debugPod.Name, containerName, opts); err != nil { return err } } @@ -278,34 +320,73 @@ func (o *DebugOptions) Run(f cmdutil.Factory, cmd *cobra.Command) error { return err } -func containerNames(pod *corev1.Pod) map[string]bool { - names := map[string]bool{} - for _, c := range pod.Spec.Containers { - names[c.Name] = true +// visitNode handles debugging for node targets by creating a privileged pod running in the host namespaces. +// Returns an already created pod and container name for subsequent attach, if applicable. +func (o *DebugOptions) visitNode(ctx context.Context, node *corev1.Node) (*corev1.Pod, string, error) { + pods := o.podClient.Pods(o.Namespace) + newPod, err := pods.Create(ctx, o.generateNodeDebugPod(node.Name), metav1.CreateOptions{}) + if err != nil { + return nil, "", err } - for _, c := range pod.Spec.InitContainers { - names[c.Name] = true + + return newPod, newPod.Spec.Containers[0].Name, nil +} + +// visitPod handles debugging for pod targets by (depending on options): +// 1. Creating an ephemeral debug container in an existing pod, OR +// 2. Making a copy of pod with certain attributes changed +// visitPod returns a pod and debug container name for subsequent attach, if applicable. +func (o *DebugOptions) visitPod(ctx context.Context, pod *corev1.Pod) (*corev1.Pod, string, error) { + if len(o.CopyTo) > 0 { + return o.debugByCopy(ctx, pod) } - for _, c := range pod.Spec.EphemeralContainers { - names[c.Name] = true + return o.debugByEphemeralContainer(ctx, pod) +} + +// debugByEphemeralContainer runs an EphemeralContainer in the target Pod for use as a debug container +func (o *DebugOptions) debugByEphemeralContainer(ctx context.Context, pod *corev1.Pod) (*corev1.Pod, string, error) { + pods := o.podClient.Pods(pod.Namespace) + ec, err := pods.GetEphemeralContainers(ctx, pod.Name, metav1.GetOptions{}) + if err != nil { + // The pod has already been fetched at this point, so a NotFound error indicates the ephemeralcontainers subresource wasn't found. + if serr, ok := err.(*errors.StatusError); ok && serr.Status().Reason == metav1.StatusReasonNotFound { + return nil, "", fmt.Errorf("ephemeral containers are disabled for this cluster (error from server: %q).", err) + } + return nil, "", err } - return names + klog.V(2).Infof("existing ephemeral containers: %v", ec.EphemeralContainers) + + debugContainer := o.generateDebugContainer(pod) + klog.V(2).Infof("new ephemeral container: %#v", debugContainer) + ec.EphemeralContainers = append(ec.EphemeralContainers, *debugContainer) + _, err = pods.UpdateEphemeralContainers(ctx, pod.Name, ec, metav1.UpdateOptions{}) + if err != nil { + return nil, "", fmt.Errorf("error updating ephemeral containers: %v", err) + } + + return pod, debugContainer.Name, nil +} + +// debugByCopy runs a copy of the target Pod with a debug container added or an original container modified +func (o *DebugOptions) debugByCopy(ctx context.Context, pod *corev1.Pod) (*corev1.Pod, string, error) { + copied, dc := o.generatePodCopyWithDebugContainer(pod) + copied, err := o.podClient.Pods(copied.Namespace).Create(ctx, copied, metav1.CreateOptions{}) + if err != nil { + return nil, "", err + } + if o.Replace { + err := o.podClient.Pods(pod.Namespace).Delete(ctx, pod.Name, *metav1.NewDeleteOptions(0)) + if err != nil { + return nil, "", err + } + } + return copied, dc, nil } // generateDebugContainer returns an EphemeralContainer suitable for use as a debug container // in the given pod. func (o *DebugOptions) generateDebugContainer(pod *corev1.Pod) *corev1.EphemeralContainer { - name := o.Container - if len(name) == 0 { - cn, existing := "", containerNames(pod) - for len(cn) == 0 || existing[cn] { - cn = fmt.Sprintf("debugger-%s", nameSuffixFunc(5)) - } - if !o.Quiet { - fmt.Fprintf(o.ErrOut, "Defaulting debug container name to %s.\n", cn) - } - name = cn - } + name := o.computeDebugContainerName(pod) ec := &corev1.EphemeralContainer{ EphemeralContainerCommon: corev1.EphemeralContainerCommon{ @@ -329,27 +410,156 @@ func (o *DebugOptions) generateDebugContainer(pod *corev1.Pod) *corev1.Ephemeral return ec } -// waitForEphemeralContainer watches the given pod until the ephemeralContainer is running -func waitForEphemeralContainer(ctx context.Context, podClient corev1client.PodsGetter, ns, podName, ephemeralContainerName string) (*corev1.Pod, error) { +// generateNodeDebugPod generates a debugging pod that schedules on the specified node. +// The generated pod will run in the host PID, Network & IPC namespaces, and it will have the node's filesystem mounted at /host. +func (o *DebugOptions) generateNodeDebugPod(node string) *corev1.Pod { + cn := "debugger" + // Setting a user-specified container name doesn't make much difference when there's only one container, + // but the argument exists for pod debugging so it might be confusing if it didn't work here. + if len(o.Container) > 0 { + cn = o.Container + } + + // The name of the debugging pod is based on the target node, and it's not configurable to + // limit the number of command line flags. There may be a collision on the name, but this + // should be rare enough that it's not worth the API round trip to check. + pn := fmt.Sprintf("node-debugger-%s-%s", node, nameSuffixFunc(5)) + if !o.Quiet { + fmt.Fprintf(o.Out, "Creating debugging pod %s with container %s on node %s.\n", pn, cn, node) + } + + p := &corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: pn, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: cn, + Env: o.Env, + Image: o.Image, + ImagePullPolicy: o.PullPolicy, + Stdin: o.Interactive, + TerminationMessagePolicy: corev1.TerminationMessageReadFile, + TTY: o.TTY, + VolumeMounts: []corev1.VolumeMount{ + { + MountPath: "/host", + Name: "host-root", + }, + }, + }, + }, + HostIPC: true, + HostNetwork: true, + HostPID: true, + NodeName: node, + RestartPolicy: corev1.RestartPolicyNever, + Volumes: []corev1.Volume{ + { + Name: "host-root", + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{Path: "/"}, + }, + }, + }, + }, + } + + if o.ArgsOnly { + p.Spec.Containers[0].Args = o.Args + } else { + p.Spec.Containers[0].Command = o.Args + } + + return p +} + +// generatePodCopy takes a Pod and returns a copy and the debug container name of that copy +func (o *DebugOptions) generatePodCopyWithDebugContainer(pod *corev1.Pod) (*corev1.Pod, string) { + copied := &corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: o.CopyTo, + Namespace: pod.Namespace, + Annotations: pod.Annotations, + }, + Spec: *pod.Spec.DeepCopy(), + } + // change ShareProcessNamespace configuration only when commanded explicitly + if o.shareProcessedChanged { + copied.Spec.ShareProcessNamespace = pointer.BoolPtr(o.ShareProcesses) + } + if !o.SameNode { + copied.Spec.NodeName = "" + } + + containerByName := containerNameToRef(copied) + c, containerExists := containerByName[o.Container] + // Add a new container if the specified container does not exist + if !containerExists { + name := o.computeDebugContainerName(copied) + c = &corev1.Container{Name: name} + // envs are customizable when adding new container + c.Env = o.Env + } + c.Image = o.Image + c.ImagePullPolicy = o.PullPolicy + c.Stdin = o.Interactive + c.TerminationMessagePolicy = corev1.TerminationMessageReadFile + c.TTY = o.TTY + if o.ArgsOnly { + c.Args = o.Args + } else { + c.Command = o.Args + c.Args = nil + } + if !containerExists { + copied.Spec.Containers = append(copied.Spec.Containers, *c) + } + return copied, c.Name +} + +func (o *DebugOptions) computeDebugContainerName(pod *corev1.Pod) string { + if len(o.Container) > 0 { + return o.Container + } + name := o.Container + if len(name) == 0 { + cn, containerByName := "", containerNameToRef(pod) + for len(cn) == 0 || (containerByName[cn] != nil) { + cn = fmt.Sprintf("debugger-%s", nameSuffixFunc(5)) + } + if !o.Quiet { + fmt.Fprintf(o.Out, "Defaulting debug container name to %s.\n", cn) + } + name = cn + } + return name +} + +func containerNameToRef(pod *corev1.Pod) map[string]*corev1.Container { + names := map[string]*corev1.Container{} + for i := range pod.Spec.Containers { + ref := &pod.Spec.Containers[i] + names[ref.Name] = ref + } + for i := range pod.Spec.InitContainers { + ref := &pod.Spec.Containers[i] + names[ref.Name] = ref + } + for i := range pod.Spec.EphemeralContainers { + ref := &pod.Spec.Containers[i] + names[ref.Name] = ref + } + return names +} + +// waitForContainer watches the given pod until the container is running +func waitForContainer(ctx context.Context, podClient corev1client.PodsGetter, ns, podName, containerName string) (*corev1.Pod, error) { // TODO: expose the timeout ctx, cancel := watchtools.ContextWithOptionalTimeout(ctx, 0*time.Second) defer cancel() - preconditionFunc := func(store cache.Store) (bool, error) { - _, exists, err := store.Get(&metav1.ObjectMeta{Namespace: ns, Name: podName}) - if err != nil { - return true, err - } - if !exists { - // We need to make sure we see the object in the cache before we start waiting for events - // or we would be waiting for the timeout if such object didn't exist. - // (e.g. it was deleted before we started informers so they wouldn't even see the delete event) - return true, errors.NewNotFound(corev1.Resource("pods"), podName) - } - - return false, nil - } - fieldSelector := fields.OneTermEqualSelector("metadata.name", podName).String() lw := &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { @@ -365,7 +575,7 @@ func waitForEphemeralContainer(ctx context.Context, podClient corev1client.PodsG intr := interrupt.New(nil, cancel) var result *corev1.Pod err := intr.Run(func() error { - ev, err := watchtools.UntilWithSync(ctx, lw, &corev1.Pod{}, preconditionFunc, func(ev watch.Event) (bool, error) { + ev, err := watchtools.UntilWithSync(ctx, lw, &corev1.Pod{}, nil, func(ev watch.Event) (bool, error) { switch ev.Type { case watch.Deleted: return false, errors.NewNotFound(schema.GroupResource{Resource: "pods"}, "") @@ -376,17 +586,14 @@ func waitForEphemeralContainer(ctx context.Context, podClient corev1client.PodsG return false, fmt.Errorf("watch did not return a pod: %v", ev.Object) } - for _, s := range p.Status.EphemeralContainerStatuses { - if s.Name != ephemeralContainerName { - continue - } - - klog.V(2).Infof("debug container status is %v", s) - if s.State.Running != nil || s.State.Terminated != nil { - return true, nil - } + s := getContainerStatusByName(p, containerName) + if s == nil { + return false, nil + } + klog.V(2).Infof("debug container status is %v", s) + if s.State.Running != nil || s.State.Terminated != nil { + return true, nil } - return false, nil }) if ev != nil { @@ -398,8 +605,8 @@ func waitForEphemeralContainer(ctx context.Context, podClient corev1client.PodsG return result, err } -func handleAttachPod(ctx context.Context, f cmdutil.Factory, podClient corev1client.PodsGetter, ns, podName, ephemeralContainerName string, opts *attach.AttachOptions) error { - pod, err := waitForEphemeralContainer(ctx, podClient, ns, podName, ephemeralContainerName) +func handleAttachPod(ctx context.Context, f cmdutil.Factory, podClient corev1client.PodsGetter, ns, podName, containerName string, opts *attach.AttachOptions) error { + pod, err := waitForContainer(ctx, podClient, ns, podName, containerName) if err != nil { return err } @@ -407,16 +614,15 @@ func handleAttachPod(ctx context.Context, f cmdutil.Factory, podClient corev1cli opts.Namespace = ns opts.Pod = pod opts.PodName = podName - opts.ContainerName = ephemeralContainerName + opts.ContainerName = containerName if opts.AttachFunc == nil { opts.AttachFunc = attach.DefaultAttachFunc } - var status *corev1.ContainerStatus - for i := range pod.Status.EphemeralContainerStatuses { - if pod.Status.EphemeralContainerStatuses[i].Name == ephemeralContainerName { - status = &pod.Status.EphemeralContainerStatuses[i] - } + status := getContainerStatusByName(pod, containerName) + if status == nil { + // impossible path + return fmt.Errorf("Error get container status of %s: %+v", containerName, err) } if status.State.Terminated != nil { klog.V(1).Info("Ephemeral container terminated, falling back to logs") @@ -430,6 +636,18 @@ func handleAttachPod(ctx context.Context, f cmdutil.Factory, podClient corev1cli return nil } +func getContainerStatusByName(pod *corev1.Pod, containerName string) *corev1.ContainerStatus { + allContainerStatus := [][]corev1.ContainerStatus{pod.Status.InitContainerStatuses, pod.Status.ContainerStatuses, pod.Status.EphemeralContainerStatuses} + for _, statusSlice := range allContainerStatus { + for i := range statusSlice { + if statusSlice[i].Name == containerName { + return &statusSlice[i] + } + } + } + return nil +} + // logOpts logs output from opts to the pods log. func logOpts(restClientGetter genericclioptions.RESTClientGetter, pod *corev1.Pod, opts *attach.AttachOptions) error { ctrName, err := opts.GetContainerName(pod) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/delete/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/delete/BUILD index ed90898d7f4..cb4f1db313e 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/delete/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/delete/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/i18n:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/delete/delete.go b/vendor/k8s.io/kubectl/pkg/cmd/delete/delete.go index 7a3c3c6764c..088d85aa655 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/delete/delete.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/delete/delete.go @@ -23,7 +23,7 @@ import ( "time" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" diff --git a/vendor/k8s.io/kubectl/pkg/cmd/diff/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/diff/BUILD index 37792f9a508..280c5e996ff 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/diff/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/diff/BUILD @@ -26,7 +26,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/jonboulle/clockwork:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", ], diff --git a/vendor/k8s.io/kubectl/pkg/cmd/diff/diff.go b/vendor/k8s.io/kubectl/pkg/cmd/diff/diff.go index a90e2222c43..31c1e60bb7e 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/diff/diff.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/diff/diff.go @@ -35,7 +35,7 @@ import ( "k8s.io/cli-runtime/pkg/resource" "k8s.io/client-go/discovery" "k8s.io/client-go/dynamic" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubectl/pkg/cmd/apply" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/scheme" @@ -95,6 +95,7 @@ type DiffOptions struct { FieldManager string ForceConflicts bool + Selector string OpenAPISchema openapi.Resources DiscoveryClient discovery.DiscoveryInterface DynamicClient dynamic.Interface @@ -148,8 +149,10 @@ func NewCmdDiff(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.C } usage := "contains the configuration to diff" + cmd.Flags().StringVarP(&options.Selector, "selector", "l", options.Selector, "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)") cmdutil.AddFilenameOptionFlags(cmd, &options.FilenameOptions, usage) cmdutil.AddServerSideApplyFlags(cmd) + cmdutil.AddFieldManagerFlagVar(cmd, &options.FieldManager, apply.FieldManagerClientSideApply) return cmd } @@ -312,7 +315,9 @@ func (obj InfoObject) Live() runtime.Object { // Returns the "merged" object, as it would look like if applied or // created. func (obj InfoObject) Merged() (runtime.Object, error) { - helper := resource.NewHelper(obj.Info.Client, obj.Info.Mapping).DryRun(true) + helper := resource.NewHelper(obj.Info.Client, obj.Info.Mapping). + DryRun(true). + WithFieldManager(obj.FieldManager) if obj.ServerSideApply { data, err := runtime.Encode(unstructured.UnstructuredJSONScheme, obj.LocalObj) if err != nil { @@ -364,7 +369,6 @@ func (obj InfoObject) Merged() (runtime.Object, error) { Helper: helper, Overwrite: true, BackOff: clockwork.NewRealClock(), - ServerDryRun: true, OpenapiSchema: obj.OpenAPI, ResourceVersion: resourceVersion, } @@ -444,7 +448,7 @@ func (o *DiffOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error { } o.ServerSideApply = cmdutil.GetServerSideApplyFlag(cmd) - o.FieldManager = cmdutil.GetFieldManagerFlag(cmd) + o.FieldManager = apply.GetApplyFieldManagerFlag(cmd, o.ServerSideApply) o.ForceConflicts = cmdutil.GetForceConflictsFlag(cmd) if o.ForceConflicts && !o.ServerSideApply { return fmt.Errorf("--force-conflicts only works with --server-side") @@ -494,6 +498,7 @@ func (o *DiffOptions) Run() error { Unstructured(). NamespaceParam(o.CmdNamespace).DefaultNamespace(). FilenameParam(o.EnforceNamespace, &o.FilenameOptions). + LabelSelectorParam(o.Selector). Flatten(). Do() if err := r.Err(); err != nil { diff --git a/vendor/k8s.io/kubectl/pkg/cmd/edit/edit.go b/vendor/k8s.io/kubectl/pkg/cmd/edit/edit.go index 4a828dba5b8..d466fbc1efd 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/edit/edit.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/edit/edit.go @@ -17,8 +17,6 @@ limitations under the License. package edit import ( - "fmt" - "github.com/spf13/cobra" "k8s.io/cli-runtime/pkg/genericclioptions" @@ -77,14 +75,10 @@ func NewCmdEdit(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra DisableFlagsInUseLine: true, Short: i18n.T("Edit a resource on the server"), Long: editLong, - Example: fmt.Sprintf(editExample), + Example: editExample, Run: func(cmd *cobra.Command, args []string) { - if err := o.Complete(f, args, cmd); err != nil { - cmdutil.CheckErr(err) - } - if err := o.Run(); err != nil { - cmdutil.CheckErr(err) - } + cmdutil.CheckErr(o.Complete(f, args, cmd)) + cmdutil.CheckErr(o.Run()) }, } @@ -98,7 +92,7 @@ func NewCmdEdit(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra cmd.Flags().BoolVarP(&o.OutputPatch, "output-patch", "", o.OutputPatch, "Output the patch if the resource is edited.") cmd.Flags().BoolVar(&o.WindowsLineEndings, "windows-line-endings", o.WindowsLineEndings, "Defaults to the line ending native to your platform.") - + cmdutil.AddFieldManagerFlagVar(cmd, &o.FieldManager, "kubectl-edit") cmdutil.AddApplyAnnotationVarFlags(cmd, &o.ApplyAnnotation) return cmd } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/exec/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/exec/BUILD index d30e3efeaf7..64b1447a211 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/exec/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/exec/BUILD @@ -21,7 +21,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/interrupt:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/term:go_default_library", - "//vendor/github.com/docker/docker/pkg/term:go_default_library", + "//vendor/github.com/moby/term:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/exec/exec.go b/vendor/k8s.io/kubectl/pkg/cmd/exec/exec.go index 0dc3b2908e2..f55296c848e 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/exec/exec.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/exec/exec.go @@ -23,7 +23,7 @@ import ( "net/url" "time" - dockerterm "github.com/docker/docker/pkg/term" + dockerterm "github.com/moby/term" "github.com/spf13/cobra" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -174,10 +174,10 @@ func (p *ExecOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, argsIn []s if argsLenAtDash > -1 { p.Command = argsIn[argsLenAtDash:] } else if len(argsIn) > 1 { - fmt.Fprint(p.ErrOut, "kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl kubectl exec [POD] -- [COMMAND] instead.\n") + fmt.Fprint(p.ErrOut, "kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.\n") p.Command = argsIn[1:] } else if len(argsIn) > 0 && len(p.FilenameOptions.Filenames) != 0 { - fmt.Fprint(p.ErrOut, "kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl kubectl exec [POD] -- [COMMAND] instead.\n") + fmt.Fprint(p.ErrOut, "kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.\n") p.Command = argsIn[0:] p.ResourceName = "" } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/explain/explain.go b/vendor/k8s.io/kubectl/pkg/cmd/explain/explain.go index 97817fcd5f7..7d7b5202936 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/explain/explain.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/explain/explain.go @@ -123,19 +123,14 @@ func (o *ExplainOptions) Run(args []string) error { // TODO: After we figured out the new syntax to separate group and resource, allow // the users to use it in explain (kubectl explain ). // Refer to issue #16039 for why we do this. Refer to PR #15808 that used "/" syntax. - inModel, fieldsPath, err := explain.SplitAndParseResourceRequest(args[0], o.Mapper) + fullySpecifiedGVR, fieldsPath, err := explain.SplitAndParseResourceRequest(args[0], o.Mapper) if err != nil { return err } - // TODO: We should deduce the group for a resource by discovering the supported resources at server. - fullySpecifiedGVR, groupResource := schema.ParseResourceArg(inModel) - gvk := schema.GroupVersionKind{} - if fullySpecifiedGVR != nil { - gvk, _ = o.Mapper.KindFor(*fullySpecifiedGVR) - } + gvk, _ := o.Mapper.KindFor(fullySpecifiedGVR) if gvk.Empty() { - gvk, err = o.Mapper.KindFor(groupResource.WithVersion("")) + gvk, err = o.Mapper.KindFor(fullySpecifiedGVR.GroupResource().WithVersion("")) if err != nil { return err } @@ -151,7 +146,7 @@ func (o *ExplainOptions) Run(args []string) error { schema := o.Schema.LookupResource(gvk) if schema == nil { - return fmt.Errorf("Couldn't find resource for %q", gvk) + return fmt.Errorf("couldn't find resource for %q", gvk) } return explain.PrintModelDescription(fieldsPath, o.Out, schema, gvk, recursive) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/expose/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/expose/BUILD index d02875b038c..bc2dae58159 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/expose/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/expose/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/i18n:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/expose/expose.go b/vendor/k8s.io/kubectl/pkg/cmd/expose/expose.go index a5bb4787448..eae9cdcccd1 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/expose/expose.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/expose/expose.go @@ -21,7 +21,7 @@ import ( "strings" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -91,6 +91,8 @@ type ExposeServiceOptions struct { DryRunVerifier *resource.DryRunVerifier EnforceNamespace bool + fieldManager string + Generators func(string) map[string]generate.Generator CanBeExposed polymorphichelpers.CanBeExposedFunc MapBasedSelectorForObject func(runtime.Object) (string, error) @@ -157,6 +159,7 @@ func NewCmdExposeService(f cmdutil.Factory, streams genericclioptions.IOStreams) cmd.Flags().String("name", "", i18n.T("The name for the newly created object.")) cmd.Flags().String("session-affinity", "", i18n.T("If non-empty, set the session affinity for the service to this; legal values: 'None', 'ClientIP'")) cmd.Flags().String("cluster-ip", "", i18n.T("ClusterIP to be assigned to the service. Leave empty to auto-allocate, or set to 'None' to create a headless service.")) + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-expose") usage := "identifying the resource to expose a service" cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, usage) @@ -363,6 +366,7 @@ func (o *ExposeServiceOptions) RunExpose(cmd *cobra.Command, args []string) erro actualObject, err := resource. NewHelper(client, objMapping). DryRun(o.DryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager). Create(o.Namespace, false, asUnstructured) if err != nil { return err diff --git a/vendor/k8s.io/kubectl/pkg/cmd/get/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/get/BUILD index 96c9a2f2ffa..e3097054c97 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/get/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/get/BUILD @@ -57,7 +57,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/liggitt/tabwriter:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/integer:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", "//vendor/vbom.ml/util/sortorder:go_default_library", diff --git a/vendor/k8s.io/kubectl/pkg/cmd/get/get.go b/vendor/k8s.io/kubectl/pkg/cmd/get/get.go index ab157bd7674..6387d78506e 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/get/get.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/get/get.go @@ -80,7 +80,6 @@ type GetOptions struct { NoHeaders bool Sort bool IgnoreNotFound bool - Export bool genericclioptions.IOStreams } @@ -183,8 +182,6 @@ func NewCmdGet(parent string, f cmdutil.Factory, streams genericclioptions.IOStr cmd.Flags().BoolVarP(&o.AllNamespaces, "all-namespaces", "A", o.AllNamespaces, "If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.") addOpenAPIPrintColumnFlags(cmd, o) addServerPrintColumnFlags(cmd, o) - cmd.Flags().BoolVar(&o.Export, "export", o.Export, "If true, use 'export' for the resources. Exported resources are stripped of cluster-specific information.") - cmd.Flags().MarkDeprecated("export", "This flag is deprecated and will be removed in future.") cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, "identifying the resource to get from a server.") return cmd } @@ -301,7 +298,7 @@ func (o *GetOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []stri // Validate checks the set of flags provided by the user. func (o *GetOptions) Validate(cmd *cobra.Command) error { if len(o.Raw) > 0 { - if o.Watch || o.WatchOnly || len(o.LabelSelector) > 0 || o.Export { + if o.Watch || o.WatchOnly || len(o.LabelSelector) > 0 { return fmt.Errorf("--raw may not be specified with other flags that filter the server request or alter the output") } if len(cmdutil.GetFlagString(cmd, "output")) > 0 { @@ -473,7 +470,6 @@ func (o *GetOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e FilenameParam(o.ExplicitNamespace, &o.FilenameOptions). LabelSelectorParam(o.LabelSelector). FieldSelectorParam(o.FieldSelector). - ExportParam(o.Export). RequestChunksOf(chunkSize). ResourceTypeOrNameArgs(true, args...). ContinueOnError(). @@ -529,6 +525,7 @@ func (o *GetOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e separatorWriter := &separatorWriterWrapper{Delegate: trackingWriter} w := printers.GetNewTabWriter(separatorWriter) + allResourcesNamespaced := !o.AllNamespaces for ix := range objs { var mapping *meta.RESTMapping var info *resource.Info @@ -540,6 +537,7 @@ func (o *GetOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e mapping = info.Mapping } + allResourcesNamespaced = allResourcesNamespaced && info.Namespaced() printWithNamespace := o.AllNamespaces if mapping != nil && mapping.Scope.Name() == meta.RESTScopeNameRoot { @@ -583,7 +581,7 @@ func (o *GetOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e w.Flush() if trackingWriter.Written == 0 && !o.IgnoreNotFound && len(allErrs) == 0 { // if we wrote no output, and had no errors, and are not ignoring NotFound, be sure we output something - if !o.AllNamespaces { + if allResourcesNamespaced { fmt.Fprintln(o.ErrOut, fmt.Sprintf("No resources found in %s namespace.", o.Namespace)) } else { fmt.Fprintln(o.ErrOut, fmt.Sprintf("No resources found")) @@ -630,7 +628,6 @@ func (o *GetOptions) watch(f cmdutil.Factory, cmd *cobra.Command, args []string) FilenameParam(o.ExplicitNamespace, &o.FilenameOptions). LabelSelectorParam(o.LabelSelector). FieldSelectorParam(o.FieldSelector). - ExportParam(o.Export). RequestChunksOf(o.ChunkSize). ResourceTypeOrNameArgs(true, args...). SingleResourceType(). diff --git a/vendor/k8s.io/kubectl/pkg/cmd/get/sorter.go b/vendor/k8s.io/kubectl/pkg/cmd/get/sorter.go index d5a2baa64ce..51bbfee2a6d 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/get/sorter.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/get/sorter.go @@ -22,7 +22,7 @@ import ( "reflect" "sort" - "k8s.io/klog" + "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" diff --git a/vendor/k8s.io/kubectl/pkg/cmd/get/table_printer.go b/vendor/k8s.io/kubectl/pkg/cmd/get/table_printer.go index 5e9551b8c91..9207227370d 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/get/table_printer.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/get/table_printer.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/cli-runtime/pkg/printers" - "k8s.io/klog" + "k8s.io/klog/v2" ) // TablePrinter decodes table objects into typed objects before delegating to another printer. diff --git a/vendor/k8s.io/kubectl/pkg/cmd/label/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/label/BUILD index e0d93925985..ab823c76a57 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/label/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/label/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/evanphx/json-patch:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/label/label.go b/vendor/k8s.io/kubectl/pkg/cmd/label/label.go index 1e0b0eed644..4c6c77df8e6 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/label/label.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/label/label.go @@ -23,7 +23,7 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -62,6 +62,7 @@ type LabelOptions struct { selector string fieldSelector string outputFormat string + fieldManager string // results of arg parsing resources []string @@ -150,6 +151,7 @@ func NewCmdLabel(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobr usage := "identifying the resource to update the labels" cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, usage) cmdutil.AddDryRunFlag(cmd) + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-label") return cmd } @@ -334,7 +336,8 @@ func (o *LabelOptions) RunLabel() error { return err } helper := resource.NewHelper(client, mapping). - DryRun(o.dryRunStrategy == cmdutil.DryRunServer) + DryRun(o.dryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager) if createdPatch { outputObj, err = helper.Patch(namespace, name, types.MergePatchType, patchBytes, nil) @@ -359,7 +362,7 @@ func (o *LabelOptions) RunLabel() error { if err != nil { return err } - fmt.Fprintf(o.ErrOut, "Listing labels for %s.%s/%s:\n", gvks[0].Kind, gvks[0].Group, info.Name) + fmt.Fprintf(o.Out, "Listing labels for %s.%s/%s:\n", gvks[0].Kind, gvks[0].Group, info.Name) } for k, v := range accessor.GetLabels() { fmt.Fprintf(o.Out, "%s%s=%s\n", indent, k, v) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/patch/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/patch/BUILD index b4eb628d50f..7fc0d199423 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/patch/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/patch/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/evanphx/json-patch:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/patch/patch.go b/vendor/k8s.io/kubectl/pkg/cmd/patch/patch.go index b67f9a9fab0..d6cc267b7ff 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/patch/patch.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/patch/patch.go @@ -23,7 +23,7 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -66,6 +66,7 @@ type PatchOptions struct { args []string builder *resource.Builder unstructuredClientForMapping func(mapping *meta.RESTMapping) (resource.RESTClient, error) + fieldManager string genericclioptions.IOStreams } @@ -127,6 +128,7 @@ func NewCmdPatch(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobr cmdutil.AddDryRunFlag(cmd) cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, "identifying the resource to update") cmd.Flags().BoolVar(&o.Local, "local", o.Local, "If true, patch will operate on the content of the file, not the server-side resource.") + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-patch") return cmd } @@ -238,7 +240,8 @@ func (o *PatchOptions) RunPatch() error { helper := resource. NewHelper(client, mapping). - DryRun(o.dryRunStrategy == cmdutil.DryRunServer) + DryRun(o.dryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager) patchedObj, err := helper.Patch(namespace, name, patchType, patchBytes, nil) if err != nil { return err diff --git a/vendor/k8s.io/kubectl/pkg/cmd/portforward/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/portforward/BUILD index 93311f0a7c9..222b0f60997 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/portforward/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/portforward/BUILD @@ -9,6 +9,7 @@ go_library( deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", diff --git a/vendor/k8s.io/kubectl/pkg/cmd/portforward/portforward.go b/vendor/k8s.io/kubectl/pkg/cmd/portforward/portforward.go index 8fd25b87d86..8800a9e726c 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/portforward/portforward.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/portforward/portforward.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/client-go/kubernetes/scheme" corev1client "k8s.io/client-go/kubernetes/typed/core/v1" @@ -225,6 +226,71 @@ func convertPodNamedPortToNumber(ports []string, pod corev1.Pod) ([]string, erro return converted, nil } +func checkUDPPorts(udpOnlyPorts sets.Int, ports []string, obj metav1.Object) error { + for _, port := range ports { + _, remotePort := splitPort(port) + portNum, err := strconv.Atoi(remotePort) + if err != nil { + switch v := obj.(type) { + case *corev1.Service: + svcPort, err := util.LookupServicePortNumberByName(*v, remotePort) + if err != nil { + return err + } + portNum = int(svcPort) + + case *corev1.Pod: + ctPort, err := util.LookupContainerPortNumberByName(*v, remotePort) + if err != nil { + return err + } + portNum = int(ctPort) + + default: + return fmt.Errorf("unknown object: %v", obj) + } + } + if udpOnlyPorts.Has(portNum) { + return fmt.Errorf("UDP protocol is not supported for %s", remotePort) + } + } + return nil +} + +// checkUDPPortInService returns an error if remote port in Service is a UDP port +// TODO: remove this check after #47862 is solved +func checkUDPPortInService(ports []string, svc *corev1.Service) error { + udpOnlyPorts := sets.NewInt() + for _, port := range svc.Spec.Ports { + portNum := int(port.Port) + switch port.Protocol { + case corev1.ProtocolUDP: + udpOnlyPorts.Insert(portNum) + case corev1.ProtocolTCP: + udpOnlyPorts.Delete(portNum) + } + } + return checkUDPPorts(udpOnlyPorts, ports, svc) +} + +// checkUDPPortInPod returns an error if remote port in Pod is a UDP port +// TODO: remove this check after #47862 is solved +func checkUDPPortInPod(ports []string, pod *corev1.Pod) error { + udpOnlyPorts := sets.NewInt() + for _, ct := range pod.Spec.Containers { + for _, ctPort := range ct.Ports { + portNum := int(ctPort.ContainerPort) + switch ctPort.Protocol { + case corev1.ProtocolUDP: + udpOnlyPorts.Insert(portNum) + case corev1.ProtocolTCP: + udpOnlyPorts.Delete(portNum) + } + } + } + return checkUDPPorts(udpOnlyPorts, ports, pod) +} + // Complete completes all the required options for port-forward cmd. func (o *PortForwardOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error { var err error @@ -265,11 +331,19 @@ func (o *PortForwardOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, arg // handle service port mapping to target port if needed switch t := obj.(type) { case *corev1.Service: + err = checkUDPPortInService(args[1:], t) + if err != nil { + return err + } o.Ports, err = translateServicePortToTargetPort(args[1:], *t, *forwardablePod) if err != nil { return err } default: + err = checkUDPPortInPod(args[1:], forwardablePod) + if err != nil { + return err + } o.Ports, err = convertPodNamedPortToNumber(args[1:], *forwardablePod) if err != nil { return err diff --git a/vendor/k8s.io/kubectl/pkg/cmd/proxy/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/proxy/BUILD index fed08953b3d..b8e4b5c6435 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/proxy/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/proxy/BUILD @@ -14,7 +14,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/i18n:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/proxy/proxy.go b/vendor/k8s.io/kubectl/pkg/cmd/proxy/proxy.go index 98ed1405f3d..c6bbcfd41f9 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/proxy/proxy.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/proxy/proxy.go @@ -27,7 +27,7 @@ import ( "github.com/spf13/cobra" "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/client-go/rest" - "k8s.io/klog" + "k8s.io/klog/v2" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/proxy" "k8s.io/kubectl/pkg/util/i18n" diff --git a/vendor/k8s.io/kubectl/pkg/cmd/replace/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/replace/BUILD index 139e613314d..708f7d56b36 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/replace/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/replace/BUILD @@ -21,7 +21,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//staging/src/k8s.io/kubectl/pkg/validation:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/replace/replace.go b/vendor/k8s.io/kubectl/pkg/cmd/replace/replace.go index 7b514f82ad7..03b809c8d64 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/replace/replace.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/replace/replace.go @@ -27,7 +27,7 @@ import ( "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" @@ -93,6 +93,8 @@ type ReplaceOptions struct { Recorder genericclioptions.Recorder genericclioptions.IOStreams + + fieldManager string } func NewReplaceOptions(streams genericclioptions.IOStreams) *ReplaceOptions { @@ -129,6 +131,7 @@ func NewCmdReplace(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobr cmdutil.AddDryRunFlag(cmd) cmd.Flags().StringVar(&o.Raw, "raw", o.Raw, "Raw URI to PUT to the server. Uses the transport specified by the kubeconfig file.") + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-replace") return cmd } @@ -292,6 +295,7 @@ func (o *ReplaceOptions) Run(f cmdutil.Factory) error { obj, err := resource. NewHelper(info.Client, info.Mapping). DryRun(o.DryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager). Replace(info.Namespace, info.Name, true, info.Object) if err != nil { return cmdutil.AddSourceToErr("replacing", info.Source, err) @@ -382,7 +386,9 @@ func (o *ReplaceOptions) forceReplace() error { klog.V(4).Infof("error recording current command: %v", err) } - obj, err := resource.NewHelper(info.Client, info.Mapping).Create(info.Namespace, true, info.Object) + obj, err := resource.NewHelper(info.Client, info.Mapping). + WithFieldManager(o.fieldManager). + Create(info.Namespace, true, info.Object) if err != nil { return err } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/rollout/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/rollout/BUILD index 063845982f0..ea51f15c41d 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/rollout/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/rollout/BUILD @@ -21,7 +21,6 @@ go_library( "//build/visible_to:pkg_kubectl_cmd_rollout_CONSUMERS", ], deps = [ - "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", diff --git a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout.go b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout.go index 833c25eb7a0..a9a80a5be2e 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout.go @@ -19,6 +19,7 @@ package rollout import ( "github.com/lithammer/dedent" "github.com/spf13/cobra" + "k8s.io/cli-runtime/pkg/genericclioptions" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/util/i18n" diff --git a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_pause.go b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_pause.go index 645806abd15..49afa891af3 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_pause.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_pause.go @@ -48,6 +48,8 @@ type PauseOptions struct { resource.FilenameOptions genericclioptions.IOStreams + + fieldManager string } var ( @@ -92,6 +94,7 @@ func NewCmdRolloutPause(f cmdutil.Factory, streams genericclioptions.IOStreams) usage := "identifying the resource to get from a server." cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, usage) + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-rollout") return cmd } @@ -173,7 +176,9 @@ func (o *PauseOptions) RunPause() error { continue } - obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) + obj, err := resource.NewHelper(info.Client, info.Mapping). + WithFieldManager(o.fieldManager). + Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) if err != nil { allErrs = append(allErrs, fmt.Errorf("failed to patch: %v", err)) continue diff --git a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_restart.go b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_restart.go index 4ef7b54af2f..4492b56af30 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_restart.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_restart.go @@ -48,6 +48,8 @@ type RestartOptions struct { resource.FilenameOptions genericclioptions.IOStreams + + fieldManager string } var ( @@ -94,6 +96,7 @@ func NewCmdRolloutRestart(f cmdutil.Factory, streams genericclioptions.IOStreams usage := "identifying the resource to get from a server." cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, usage) + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-rollout") o.PrintFlags.AddFlags(cmd) return cmd } @@ -169,7 +172,9 @@ func (o RestartOptions) RunRestart() error { allErrs = append(allErrs, fmt.Errorf("failed to create patch for %v: empty patch", info.Name)) } - obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) + obj, err := resource.NewHelper(info.Client, info.Mapping). + WithFieldManager(o.fieldManager). + Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) if err != nil { allErrs = append(allErrs, fmt.Errorf("failed to patch: %v", err)) continue diff --git a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_resume.go b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_resume.go index b41593f9972..524983cef46 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_resume.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_resume.go @@ -49,6 +49,8 @@ type ResumeOptions struct { resource.FilenameOptions genericclioptions.IOStreams + + fieldManager string } var ( @@ -94,6 +96,7 @@ func NewCmdRolloutResume(f cmdutil.Factory, streams genericclioptions.IOStreams) usage := "identifying the resource to get from a server." cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, usage) + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-rollout") o.PrintFlags.AddFlags(cmd) return cmd } @@ -177,7 +180,9 @@ func (o ResumeOptions) RunResume() error { continue } - obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) + obj, err := resource.NewHelper(info.Client, info.Mapping). + WithFieldManager(o.fieldManager). + Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) if err != nil { allErrs = append(allErrs, fmt.Errorf("failed to patch: %v", err)) continue diff --git a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_status.go b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_status.go index 23f07253a81..6f29e146343 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_status.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_status.go @@ -23,7 +23,6 @@ import ( "github.com/spf13/cobra" - apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -200,25 +199,11 @@ func (o *RolloutStatusOptions) Run() error { }, } - preconditionFunc := func(store cache.Store) (bool, error) { - _, exists, err := store.Get(&metav1.ObjectMeta{Namespace: info.Namespace, Name: info.Name}) - if err != nil { - return true, err - } - if !exists { - // We need to make sure we see the object in the cache before we start waiting for events - // or we would be waiting for the timeout if such object didn't exist. - return true, apierrors.NewNotFound(mapping.Resource.GroupResource(), info.Name) - } - - return false, nil - } - // if the rollout isn't done yet, keep watching deployment status ctx, cancel := watchtools.ContextWithOptionalTimeout(context.Background(), o.Timeout) intr := interrupt.New(nil, cancel) return intr.Run(func() error { - _, err = watchtools.UntilWithSync(ctx, lw, &unstructured.Unstructured{}, preconditionFunc, func(e watch.Event) (bool, error) { + _, err = watchtools.UntilWithSync(ctx, lw, &unstructured.Unstructured{}, nil, func(e watch.Event) (bool, error) { switch t := e.Type; t { case watch.Added, watch.Modified: status, done, err := statusViewer.Status(e.Object.(runtime.Unstructured), o.Revision) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_undo.go b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_undo.go index 9eac94a2187..779d1b96682 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_undo.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/rollout/rollout_undo.go @@ -20,12 +20,12 @@ import ( "fmt" "github.com/spf13/cobra" - "k8s.io/kubectl/pkg/polymorphichelpers" "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/cli-runtime/pkg/printers" "k8s.io/cli-runtime/pkg/resource" cmdutil "k8s.io/kubectl/pkg/cmd/util" + "k8s.io/kubectl/pkg/polymorphichelpers" "k8s.io/kubectl/pkg/scheme" "k8s.io/kubectl/pkg/util/i18n" "k8s.io/kubectl/pkg/util/templates" @@ -102,7 +102,7 @@ func NewCmdRolloutUndo(f cmdutil.Factory, streams genericclioptions.IOStreams) * return cmd } -// Complete completes al the required options +// Complete completes all the required options func (o *UndoOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error { o.Resources = args var err error diff --git a/vendor/k8s.io/kubectl/pkg/cmd/run/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/run/BUILD index 0e6f5f5b4b9..85c222d0012 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/run/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/run/BUILD @@ -37,7 +37,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/docker/distribution/reference:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/run/run.go b/vendor/k8s.io/kubectl/pkg/cmd/run/run.go index 6a7309bda09..524f0093c4a 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/run/run.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/run/run.go @@ -23,7 +23,7 @@ import ( "github.com/docker/distribution/reference" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -120,9 +120,14 @@ type RunOptions struct { Interactive bool LeaveStdinOpen bool Port string + Privileged bool Quiet bool Schedule string TTY bool + fieldManager string + + Namespace string + EnforceNamespace bool genericclioptions.IOStreams } @@ -186,7 +191,7 @@ func addRunFlags(cmd *cobra.Command, opt *RunOptions) { cmd.Flags().BoolVarP(&opt.TTY, "tty", "t", opt.TTY, "Allocated a TTY for each container in the pod.") cmd.Flags().BoolVar(&opt.Attach, "attach", opt.Attach, "If true, wait for the Pod to start running, and then attach to the Pod as if 'kubectl attach ...' were called. Default false, unless '-i/--stdin' is set, in which case the default is true. With '--restart=Never' the exit code of the container process is returned.") cmd.Flags().BoolVar(&opt.LeaveStdinOpen, "leave-stdin-open", opt.LeaveStdinOpen, "If the pod is started in interactive mode or with stdin, leave stdin open after the first attach completes. By default, stdin will be closed after the first attach completes.") - cmd.Flags().String("restart", "Always", i18n.T("The restart policy for this Pod. Legal values [Always, OnFailure, Never]. If set to 'Always' a deployment is created, if set to 'OnFailure' a job is created, if set to 'Never', a regular pod is created. For the latter two --replicas must be 1. Default 'Always', for CronJobs `Never`.")) + cmd.Flags().String("restart", "Always", i18n.T("The restart policy for this Pod. Legal values [Always, OnFailure, Never].")) cmd.Flags().Bool("command", false, "If true and extra arguments are present, use them as the 'command' field in the container, rather than the 'args' field which is the default.") cmd.Flags().String("requests", "", i18n.T("The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.")) cmd.Flags().String("limits", "", i18n.T("The resource requirement limits for this container. For example, 'cpu=200m,memory=512Mi'. Note that server side components may assign limits depending on the server configuration, such as limit ranges.")) @@ -198,6 +203,8 @@ func addRunFlags(cmd *cobra.Command, opt *RunOptions) { cmd.Flags().BoolVar(&opt.Quiet, "quiet", opt.Quiet, "If true, suppress prompt messages.") cmd.Flags().StringVar(&opt.Schedule, "schedule", opt.Schedule, i18n.T("A schedule in the Cron format the job should be run with.")) cmd.Flags().MarkDeprecated("schedule", "has no effect and will be removed in the future.") + cmd.Flags().BoolVar(&opt.Privileged, "privileged", opt.Privileged, i18n.T("If true, run the container in privileged mode.")) + cmdutil.AddFieldManagerFlagVar(cmd, &opt.fieldManager, "kubectl-run") } func (o *RunOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error { @@ -273,15 +280,11 @@ func (o *RunOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e if o.TTY && !o.Interactive { return cmdutil.UsageErrorf(cmd, "-i/--stdin is required for containers with -t/--tty=true") } - replicas := cmdutil.GetFlagInt(cmd, "replicas") - if o.Interactive && replicas != 1 { - return cmdutil.UsageErrorf(cmd, "-i/--stdin requires that replicas is 1, found %d", replicas) - } if o.Expose && len(o.Port) == 0 { return cmdutil.UsageErrorf(cmd, "--port must be set when exposing a service") } - namespace, _, err := f.ToRawKubeConfigLoader().Namespace() + o.Namespace, o.EnforceNamespace, err = f.ToRawKubeConfigLoader().Namespace() if err != nil { return err } @@ -289,9 +292,6 @@ func (o *RunOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e if err != nil { return err } - if restartPolicy != corev1.RestartPolicyAlways && replicas != 1 { - return cmdutil.UsageErrorf(cmd, "--restart=%s requires that --replicas=1, found %d", restartPolicy, replicas) - } remove := cmdutil.GetFlagBool(cmd, "rm") if !o.Attach && remove { @@ -322,7 +322,7 @@ func (o *RunOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e params["env"] = cmdutil.GetFlagStringArray(cmd, "env") var createdObjects = []*RunObject{} - runObject, err := o.createGeneratedObject(f, cmd, generator, names, params, cmdutil.GetFlagString(cmd, "overrides"), namespace) + runObject, err := o.createGeneratedObject(f, cmd, generator, names, params, cmdutil.GetFlagString(cmd, "overrides")) if err != nil { return err } @@ -334,7 +334,7 @@ func (o *RunOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e if len(serviceGenerator) == 0 { return cmdutil.UsageErrorf(cmd, "No service generator specified") } - serviceRunObject, err := o.generateService(f, cmd, serviceGenerator, params, namespace) + serviceRunObject, err := o.generateService(f, cmd, serviceGenerator, params) if err != nil { allErrs = append(allErrs, err) } else { @@ -381,17 +381,21 @@ func (o *RunOptions) Run(f cmdutil.Factory, cmd *cobra.Command, args []string) e } var pod *corev1.Pod - leaveStdinOpen := o.LeaveStdinOpen - waitForExitCode := !leaveStdinOpen && restartPolicy == corev1.RestartPolicyNever + waitForExitCode := !o.LeaveStdinOpen && (restartPolicy == corev1.RestartPolicyNever || restartPolicy == corev1.RestartPolicyOnFailure) if waitForExitCode { - pod, err = waitForPod(clientset.CoreV1(), attachablePod.Namespace, attachablePod.Name, podCompleted) + // we need different exit condition depending on restart policy + // for Never it can either fail or succeed, for OnFailure only + // success matters + exitCondition := podCompleted + if restartPolicy == corev1.RestartPolicyOnFailure { + exitCondition = podSucceeded + } + pod, err = waitForPod(clientset.CoreV1(), attachablePod.Namespace, attachablePod.Name, opts.GetPodTimeout, exitCondition) if err != nil { return err } - } - - // after removal is done, return successfully if we are not interested in the exit code - if !waitForExitCode { + } else { + // after removal is done, return successfully if we are not interested in the exit code return nil } @@ -453,26 +457,10 @@ func (o *RunOptions) removeCreatedObjects(f cmdutil.Factory, createdObjects []*R } // waitForPod watches the given pod until the exitCondition is true -func waitForPod(podClient corev1client.PodsGetter, ns, name string, exitCondition watchtools.ConditionFunc) (*corev1.Pod, error) { - // TODO: expose the timeout - ctx, cancel := watchtools.ContextWithOptionalTimeout(context.Background(), 0*time.Second) +func waitForPod(podClient corev1client.PodsGetter, ns, name string, timeout time.Duration, exitCondition watchtools.ConditionFunc) (*corev1.Pod, error) { + ctx, cancel := watchtools.ContextWithOptionalTimeout(context.Background(), timeout) defer cancel() - preconditionFunc := func(store cache.Store) (bool, error) { - _, exists, err := store.Get(&metav1.ObjectMeta{Namespace: ns, Name: name}) - if err != nil { - return true, err - } - if !exists { - // We need to make sure we see the object in the cache before we start waiting for events - // or we would be waiting for the timeout if such object didn't exist. - // (e.g. it was deleted before we started informers so they wouldn't even see the delete event) - return true, errors.NewNotFound(corev1.Resource("pods"), name) - } - - return false, nil - } - fieldSelector := fields.OneTermEqualSelector("metadata.name", name).String() lw := &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { @@ -488,9 +476,7 @@ func waitForPod(podClient corev1client.PodsGetter, ns, name string, exitConditio intr := interrupt.New(nil, cancel) var result *corev1.Pod err := intr.Run(func() error { - ev, err := watchtools.UntilWithSync(ctx, lw, &corev1.Pod{}, preconditionFunc, func(ev watch.Event) (bool, error) { - return exitCondition(ev) - }) + ev, err := watchtools.UntilWithSync(ctx, lw, &corev1.Pod{}, nil, exitCondition) if ev != nil { result = ev.Object.(*corev1.Pod) } @@ -501,7 +487,7 @@ func waitForPod(podClient corev1client.PodsGetter, ns, name string, exitConditio } func handleAttachPod(f cmdutil.Factory, podClient corev1client.PodsGetter, ns, name string, opts *attach.AttachOptions) error { - pod, err := waitForPod(podClient, ns, name, podRunningAndReady) + pod, err := waitForPod(podClient, ns, name, opts.GetPodTimeout, podRunningAndReady) if err != nil && err != ErrPodCompleted { return err } @@ -575,7 +561,7 @@ func verifyImagePullPolicy(cmd *cobra.Command) error { return cmdutil.UsageErrorf(cmd, "invalid image pull policy: %s", pullPolicy) } -func (o *RunOptions) generateService(f cmdutil.Factory, cmd *cobra.Command, serviceGenerator string, paramsIn map[string]interface{}, namespace string) (*RunObject, error) { +func (o *RunOptions) generateService(f cmdutil.Factory, cmd *cobra.Command, serviceGenerator string, paramsIn map[string]interface{}) (*RunObject, error) { generators := generateversioned.GeneratorFn("expose") generator, found := generators[serviceGenerator] if !found { @@ -605,7 +591,7 @@ func (o *RunOptions) generateService(f cmdutil.Factory, cmd *cobra.Command, serv params["default-name"] = name } - runObject, err := o.createGeneratedObject(f, cmd, generator, names, params, cmdutil.GetFlagString(cmd, "service-overrides"), namespace) + runObject, err := o.createGeneratedObject(f, cmd, generator, names, params, cmdutil.GetFlagString(cmd, "service-overrides")) if err != nil { return nil, err } @@ -621,7 +607,7 @@ func (o *RunOptions) generateService(f cmdutil.Factory, cmd *cobra.Command, serv return runObject, nil } -func (o *RunOptions) createGeneratedObject(f cmdutil.Factory, cmd *cobra.Command, generator generate.Generator, names []generate.GeneratorParam, params map[string]interface{}, overrides, namespace string) (*RunObject, error) { +func (o *RunOptions) createGeneratedObject(f cmdutil.Factory, cmd *cobra.Command, generator generate.Generator, names []generate.GeneratorParam, params map[string]interface{}, overrides string) (*RunObject, error) { err := generate.ValidateParams(names, params) if err != nil { return nil, err @@ -676,10 +662,15 @@ func (o *RunOptions) createGeneratedObject(f cmdutil.Factory, cmd *cobra.Command actualObj, err = resource. NewHelper(client, mapping). DryRun(o.DryRunStrategy == cmdutil.DryRunServer). - Create(namespace, false, obj) + WithFieldManager(o.fieldManager). + Create(o.Namespace, false, obj) if err != nil { return nil, err } + } else { + if meta, err := meta.Accessor(actualObj); err == nil && o.EnforceNamespace { + meta.SetNamespace(o.Namespace) + } } return &RunObject{ @@ -709,6 +700,20 @@ func podCompleted(event watch.Event) (bool, error) { return false, nil } +// podSucceeded returns true if the pod has run to completion, false if the pod has not yet +// reached running state, or an error in any other case. +func podSucceeded(event watch.Event) (bool, error) { + switch event.Type { + case watch.Deleted: + return false, errors.NewNotFound(schema.GroupResource{Resource: "pods"}, "") + } + switch t := event.Object.(type) { + case *corev1.Pod: + return t.Status.Phase == corev1.PodSucceeded, nil + } + return false, nil +} + // podRunningAndReady returns true if the pod is running and ready, false if the pod has not // yet reached those states, returns ErrPodCompleted if the pod has run to completion, or // an error in any other case. diff --git a/vendor/k8s.io/kubectl/pkg/cmd/scale/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/scale/BUILD index 79ec124e988..70f772f9e55 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/scale/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/scale/BUILD @@ -18,7 +18,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/i18n:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/scale/scale.go b/vendor/k8s.io/kubectl/pkg/cmd/scale/scale.go index 8c9b0156094..545ced9e356 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/scale/scale.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/scale/scale.go @@ -21,7 +21,7 @@ import ( "time" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/types" @@ -62,10 +62,6 @@ var ( kubectl scale --replicas=3 statefulset/web`)) ) -const ( - timeout = 5 * time.Minute -) - type ScaleOptions struct { FilenameOptions resource.FilenameOptions RecordFlags *genericclioptions.RecordFlags @@ -89,6 +85,8 @@ type ScaleOptions struct { scaler scale.Scaler unstructuredClientForMapping func(mapping *meta.RESTMapping) (resource.RESTClient, error) parent string + dryRunStrategy cmdutil.DryRunStrategy + dryRunVerifier *resource.DryRunVerifier genericclioptions.IOStreams } @@ -134,6 +132,7 @@ func NewCmdScale(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobr cmd.MarkFlagRequired("replicas") cmd.Flags().DurationVar(&o.Timeout, "timeout", 0, "The length of time to wait before giving up on a scale operation, zero means don't wait. Any other values should contain a corresponding time unit (e.g. 1s, 2m, 3h).") cmdutil.AddFilenameOptionFlags(cmd, &o.FilenameOptions, "identifying the resource to set a new size") + cmdutil.AddDryRunFlag(cmd) return cmd } @@ -150,6 +149,20 @@ func (o *ScaleOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []st } o.PrintObj = printer.PrintObj + o.dryRunStrategy, err = cmdutil.GetDryRunStrategy(cmd) + if err != nil { + return err + } + dynamicClient, err := f.DynamicClient() + if err != nil { + return err + } + discoveryClient, err := f.ToDiscoveryClient() + if err != nil { + return err + } + o.dryRunVerifier = resource.NewDryRunVerifier(dynamicClient, discoveryClient) + o.namespace, o.enforceNamespace, err = f.ToRawKubeConfigLoader().Namespace() if err != nil { return err @@ -216,8 +229,8 @@ func (o *ScaleOptions) RunScale() error { retry := scale.NewRetryParams(1*time.Second, 5*time.Minute) var waitForReplicas *scale.RetryParams - if o.Timeout != 0 { - waitForReplicas = scale.NewRetryParams(1*time.Second, timeout) + if o.Timeout != 0 && o.dryRunStrategy == cmdutil.DryRunNone { + waitForReplicas = scale.NewRetryParams(1*time.Second, o.Timeout) } counter := 0 @@ -225,9 +238,13 @@ func (o *ScaleOptions) RunScale() error { if err != nil { return err } + counter++ mapping := info.ResourceMapping() - if err := o.scaler.Scale(info.Namespace, info.Name, uint(o.Replicas), precondition, retry, waitForReplicas, mapping.Resource); err != nil { + if o.dryRunStrategy == cmdutil.DryRunClient { + return o.PrintObj(info.Object, o.Out) + } + if err := o.scaler.Scale(info.Namespace, info.Name, uint(o.Replicas), precondition, retry, waitForReplicas, mapping.Resource, o.dryRunStrategy == cmdutil.DryRunServer); err != nil { return err } @@ -245,7 +262,6 @@ func (o *ScaleOptions) RunScale() error { } } - counter++ return o.PrintObj(info.Object, o.Out) }) if err != nil { diff --git a/vendor/k8s.io/kubectl/pkg/cmd/set/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/set/BUILD index 4b1c2cae38f..3ca01e83f46 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/set/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/set/BUILD @@ -42,7 +42,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/i18n:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/set/helper.go b/vendor/k8s.io/kubectl/pkg/cmd/set/helper.go index 72cc7756056..a60bcd63445 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/set/helper.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/set/helper.go @@ -54,6 +54,7 @@ func selectString(s, spec string) bool { pos := 0 match := true parts := strings.Split(spec, "*") +Loop: for i, part := range parts { if len(part) == 0 { continue @@ -69,7 +70,7 @@ func selectString(s, spec string) bool { // last part does not exactly match remaining part of string case i == (len(parts)-1) && len(s) != (len(part)+next): match = false - break + break Loop default: pos = next } diff --git a/vendor/k8s.io/kubectl/pkg/cmd/set/set_env.go b/vendor/k8s.io/kubectl/pkg/cmd/set/set_env.go index 4501ae59a89..009ee746869 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/set/set_env.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/set/set_env.go @@ -25,7 +25,7 @@ import ( "github.com/spf13/cobra" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -113,6 +113,7 @@ type EnvOptions struct { From string Prefix string Keys []string + fieldManager string PrintObj printers.ResourcePrinterFunc @@ -151,7 +152,7 @@ func NewCmdEnv(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Co DisableFlagsInUseLine: true, Short: "Update environment variables on a pod template", Long: envLong, - Example: fmt.Sprintf(envExample), + Example: envExample, Run: func(cmd *cobra.Command, args []string) { cmdutil.CheckErr(o.Complete(f, cmd, args)) cmdutil.CheckErr(o.Validate()) @@ -171,6 +172,7 @@ func NewCmdEnv(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Co cmd.Flags().BoolVar(&o.Local, "local", o.Local, "If true, set env will NOT contact api-server but run locally.") cmd.Flags().BoolVar(&o.All, "all", o.All, "If true, select all resources in the namespace of the specified resource types") cmd.Flags().BoolVar(&o.Overwrite, "overwrite", o.Overwrite, "If true, allow environment to be overwritten, otherwise reject updates that overwrite existing environment.") + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-set") o.PrintFlags.AddFlags(cmd) @@ -512,6 +514,7 @@ func (o *EnvOptions) RunEnv() error { actual, err := resource. NewHelper(info.Client, info.Mapping). DryRun(o.dryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager). Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) if err != nil { allErrs = append(allErrs, fmt.Errorf("failed to patch env update to pod template: %v", err)) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/set/set_image.go b/vendor/k8s.io/kubectl/pkg/cmd/set/set_image.go index cf97c29c36c..37bb84a61a6 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/set/set_image.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/set/set_image.go @@ -20,7 +20,7 @@ import ( "fmt" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" @@ -52,6 +52,7 @@ type SetImageOptions struct { Output string Local bool ResolveImage ImageResolver + fieldManager string PrintObj printers.ResourcePrinterFunc Recorder genericclioptions.Recorder @@ -125,6 +126,7 @@ func NewCmdImage(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra. cmd.Flags().StringVarP(&o.Selector, "selector", "l", o.Selector, "Selector (label query) to filter on, not including uninitialized ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)") cmd.Flags().BoolVar(&o.Local, "local", o.Local, "If true, set image will NOT contact api-server but run locally.") cmdutil.AddDryRunFlag(cmd) + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-set") return cmd } @@ -286,6 +288,7 @@ func (o *SetImageOptions) Run() error { actual, err := resource. NewHelper(info.Client, info.Mapping). DryRun(o.DryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager). Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) if err != nil { allErrs = append(allErrs, fmt.Errorf("failed to patch image update to pod template: %v", err)) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/set/set_resources.go b/vendor/k8s.io/kubectl/pkg/cmd/set/set_resources.go index 611e326f316..8d62d4f1a68 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/set/set_resources.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/set/set_resources.go @@ -20,7 +20,7 @@ import ( "fmt" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" @@ -73,6 +73,7 @@ type SetResourcesOptions struct { Output string All bool Local bool + fieldManager string DryRunStrategy cmdutil.DryRunStrategy @@ -136,6 +137,7 @@ func NewCmdResources(f cmdutil.Factory, streams genericclioptions.IOStreams) *co cmdutil.AddDryRunFlag(cmd) cmd.Flags().StringVar(&o.Limits, "limits", o.Limits, "The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.") cmd.Flags().StringVar(&o.Requests, "requests", o.Requests, "The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.") + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-set") return cmd } @@ -301,6 +303,7 @@ func (o *SetResourcesOptions) Run() error { actual, err := resource. NewHelper(info.Client, info.Mapping). DryRun(o.DryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager). Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) if err != nil { allErrs = append(allErrs, fmt.Errorf("failed to patch resources update to pod template %v", err)) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/set/set_selector.go b/vendor/k8s.io/kubectl/pkg/cmd/set/set_selector.go index 2abe2d7df75..34ae603b556 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/set/set_selector.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/set/set_selector.go @@ -20,7 +20,7 @@ import ( "fmt" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" @@ -46,6 +46,7 @@ type SetSelectorOptions struct { RecordFlags *genericclioptions.RecordFlags dryRunStrategy cmdutil.DryRunStrategy dryRunVerifier *resource.DryRunVerifier + fieldManager string // set by args resources []string @@ -113,6 +114,7 @@ func NewCmdSelector(f cmdutil.Factory, streams genericclioptions.IOStreams) *cob o.ResourceBuilderFlags.AddFlags(cmd.Flags()) o.PrintFlags.AddFlags(cmd) o.RecordFlags.AddFlags(cmd) + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-set") cmd.Flags().StringVarP(&o.resourceVersion, "resource-version", "", o.resourceVersion, "If non-empty, the selectors update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.") cmdutil.AddDryRunFlag(cmd) @@ -175,6 +177,9 @@ func (o *SetSelectorOptions) RunSelector() error { r := o.ResourceFinder.Do() return r.Visit(func(info *resource.Info, err error) error { + if err != nil { + return err + } patch := &Patch{Info: info} if len(o.resourceVersion) != 0 { @@ -224,6 +229,7 @@ func (o *SetSelectorOptions) RunSelector() error { actual, err := resource. NewHelper(info.Client, info.Mapping). DryRun(o.dryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager). Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) if err != nil { return err diff --git a/vendor/k8s.io/kubectl/pkg/cmd/set/set_serviceaccount.go b/vendor/k8s.io/kubectl/pkg/cmd/set/set_serviceaccount.go index bc7ac2b9f4e..10276f84da7 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/set/set_serviceaccount.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/set/set_serviceaccount.go @@ -22,7 +22,7 @@ import ( "github.com/spf13/cobra" v1 "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -71,6 +71,7 @@ type SetServiceAccountOptions struct { updatePodSpecForObject polymorphichelpers.UpdatePodSpecForObjectFunc infos []*resource.Info serviceAccountName string + fieldManager string PrintObj printers.ResourcePrinterFunc Recorder genericclioptions.Recorder @@ -115,6 +116,7 @@ func NewCmdServiceAccount(f cmdutil.Factory, streams genericclioptions.IOStreams cmd.Flags().BoolVar(&o.all, "all", o.all, "Select all resources, including uninitialized ones, in the namespace of the specified resource types") cmd.Flags().BoolVar(&o.local, "local", o.local, "If true, set serviceaccount will NOT contact api-server but run locally.") cmdutil.AddDryRunFlag(cmd) + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-set") return cmd } @@ -224,6 +226,7 @@ func (o *SetServiceAccountOptions) Run() error { actual, err := resource. NewHelper(info.Client, info.Mapping). DryRun(o.dryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager). Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) if err != nil { patchErrs = append(patchErrs, fmt.Errorf("failed to patch ServiceAccountName %v", err)) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/set/set_subject.go b/vendor/k8s.io/kubectl/pkg/cmd/set/set_subject.go index 488a9ea2984..043fd5e4010 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/set/set_subject.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/set/set_subject.go @@ -68,6 +68,7 @@ type SubjectOptions struct { DryRunStrategy cmdutil.DryRunStrategy DryRunVerifier *resource.DryRunVerifier Local bool + fieldManager string Users []string Groups []string @@ -115,6 +116,7 @@ func NewCmdSubject(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobr cmd.Flags().StringArrayVar(&o.Users, "user", o.Users, "Usernames to bind to the role") cmd.Flags().StringArrayVar(&o.Groups, "group", o.Groups, "Groups to bind to the role") cmd.Flags().StringArrayVar(&o.ServiceAccounts, "serviceaccount", o.ServiceAccounts, "Service accounts to bind to the role") + cmdutil.AddFieldManagerFlagVar(cmd, &o.fieldManager, "kubectl-set") return cmd } @@ -281,6 +283,7 @@ func (o *SubjectOptions) Run(fn updateSubjects) error { actual, err := resource. NewHelper(info.Client, info.Mapping). DryRun(o.DryRunStrategy == cmdutil.DryRunServer). + WithFieldManager(o.fieldManager). Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch, nil) if err != nil { allErrs = append(allErrs, fmt.Errorf("failed to patch subjects to rolebinding: %v", err)) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/taint/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/taint/BUILD index 8409bfd7848..6abfbcee171 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/taint/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/taint/BUILD @@ -23,11 +23,12 @@ go_library( "//staging/src/k8s.io/cli-runtime/pkg/printers:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/resource:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/util:go_default_library", + "//staging/src/k8s.io/kubectl/pkg/explain:go_default_library", "//staging/src/k8s.io/kubectl/pkg/scheme:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/i18n:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/taint/taint.go b/vendor/k8s.io/kubectl/pkg/cmd/taint/taint.go index 9be64c5de27..5e355bd225c 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/taint/taint.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/taint/taint.go @@ -22,7 +22,8 @@ import ( "strings" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" + "k8s.io/kubectl/pkg/explain" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" @@ -55,10 +56,13 @@ type TaintOptions struct { selector string overwrite bool all bool + fieldManager string ClientForMapping func(*meta.RESTMapping) (resource.RESTClient, error) genericclioptions.IOStreams + + Mapper meta.RESTMapper } var ( @@ -119,6 +123,7 @@ func NewCmdTaint(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra. cmd.Flags().StringVarP(&options.selector, "selector", "l", options.selector, "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)") cmd.Flags().BoolVar(&options.overwrite, "overwrite", options.overwrite, "If true, allow taints to be overwritten, otherwise reject taint updates that overwrite existing taints.") cmd.Flags().BoolVar(&options.all, "all", options.all, "Select all nodes in the cluster") + cmdutil.AddFieldManagerFlagVar(cmd, &options.fieldManager, "kubectl-taint") return cmd } @@ -129,6 +134,11 @@ func (o *TaintOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []st return err } + o.Mapper, err = f.ToRESTMapper() + if err != nil { + return err + } + o.DryRunStrategy, err = cmdutil.GetDryRunStrategy(cmd) if err != nil { return err @@ -219,15 +229,18 @@ func (o TaintOptions) validateFlags() error { // Validate checks to the TaintOptions to see if there is sufficient information run the command. func (o TaintOptions) Validate() error { resourceType := strings.ToLower(o.resources[0]) - validResources, isValidResource := []string{"node", "nodes"}, false - for _, validResource := range validResources { - if resourceType == validResource { - isValidResource = true - break - } + fullySpecifiedGVR, _, err := explain.SplitAndParseResourceRequest(resourceType, o.Mapper) + if err != nil { + return err } - if !isValidResource { - return fmt.Errorf("invalid resource type %s, only %q are supported", o.resources[0], validResources) + + gvk, err := o.Mapper.KindFor(fullySpecifiedGVR) + if err != nil { + return err + } + + if gvk.Kind != "Node" { + return fmt.Errorf("invalid resource type %s, only node types are supported", resourceType) } // check the format of taint args and checks removed taints aren't in the new taints list @@ -328,6 +341,7 @@ func (o TaintOptions) RunTaint() error { } helper := resource. NewHelper(client, mapping). + WithFieldManager(o.fieldManager). DryRun(o.DryRunStrategy == cmdutil.DryRunServer) var outputObj runtime.Object diff --git a/vendor/k8s.io/kubectl/pkg/cmd/top/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/top/BUILD index f7ecd89e911..2f37ab19644 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/top/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/top/BUILD @@ -26,7 +26,7 @@ go_library( "//staging/src/k8s.io/metrics/pkg/client/clientset/versioned:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -43,9 +43,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/version:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/rest/fake:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/testing:go_default_library", @@ -54,7 +52,6 @@ go_test( "//staging/src/k8s.io/metrics/pkg/apis/metrics/v1alpha1:go_default_library", "//staging/src/k8s.io/metrics/pkg/apis/metrics/v1beta1:go_default_library", "//staging/src/k8s.io/metrics/pkg/client/clientset/versioned/fake:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/top/top_node.go b/vendor/k8s.io/kubectl/pkg/cmd/top/top_node.go index 35d30bd7fd5..24dae38c2d5 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/top/top_node.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/top/top_node.go @@ -44,8 +44,6 @@ type TopNodeOptions struct { SortBy string NoHeaders bool NodeClient corev1client.CoreV1Interface - HeapsterOptions HeapsterTopOptions - Client *metricsutil.HeapsterMetricsClient Printer *metricsutil.TopCmdPrinter DiscoveryClient discovery.DiscoveryInterface MetricsClient metricsclientset.Interface @@ -53,31 +51,15 @@ type TopNodeOptions struct { genericclioptions.IOStreams } -type HeapsterTopOptions struct { - Namespace string - Service string - Scheme string - Port string -} - -func (o *HeapsterTopOptions) Bind(flags *pflag.FlagSet) { - if len(o.Namespace) == 0 { - o.Namespace = metricsutil.DefaultHeapsterNamespace - } - if len(o.Service) == 0 { - o.Service = metricsutil.DefaultHeapsterService - } - if len(o.Scheme) == 0 { - o.Scheme = metricsutil.DefaultHeapsterScheme - } - if len(o.Port) == 0 { - o.Port = metricsutil.DefaultHeapsterPort - } - - flags.StringVar(&o.Namespace, "heapster-namespace", o.Namespace, "Namespace Heapster service is located in") - flags.StringVar(&o.Service, "heapster-service", o.Service, "Name of Heapster service") - flags.StringVar(&o.Scheme, "heapster-scheme", o.Scheme, "Scheme (http or https) to connect to Heapster as") - flags.StringVar(&o.Port, "heapster-port", o.Port, "Port name in service to use") +func heapsterTopOptions(flags *pflag.FlagSet) { + flags.String("heapster-namespace", "kube-system", "Namespace Heapster service is located in") + flags.MarkDeprecated("heapster-namespace", "This flag is currently no-op and will be deleted.") + flags.String("heapster-service", "heapster", "Name of Heapster service") + flags.MarkDeprecated("heapster-service", "This flag is currently no-op and will be deleted.") + flags.String("heapster-scheme", "http", "Scheme (http or https) to connect to Heapster as") + flags.MarkDeprecated("heapster-scheme", "This flag is currently no-op and will be deleted.") + flags.String("heapster-port", "", "Port name in service to use") + flags.MarkDeprecated("heapster-port", "This flag is currently no-op and will be deleted.") } var ( @@ -117,8 +99,8 @@ func NewCmdTopNode(f cmdutil.Factory, o *TopNodeOptions, streams genericclioptio cmd.Flags().StringVarP(&o.Selector, "selector", "l", o.Selector, "Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)") cmd.Flags().StringVar(&o.SortBy, "sort-by", o.Selector, "If non-empty, sort nodes list using specified field. The field can be either 'cpu' or 'memory'.") cmd.Flags().BoolVar(&o.NoHeaders, "no-headers", o.NoHeaders, "If present, print output without headers") + heapsterTopOptions(cmd.Flags()) - o.HeapsterOptions.Bind(cmd.Flags()) return cmd } @@ -146,7 +128,6 @@ func (o *TopNodeOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args [] } o.NodeClient = clientset.CoreV1() - o.Client = metricsutil.NewHeapsterMetricsClient(clientset.CoreV1(), o.HeapsterOptions.Namespace, o.HeapsterOptions.Scheme, o.HeapsterOptions.Service, o.HeapsterOptions.Port) o.Printer = metricsutil.NewTopCmdPrinter(o.Out) return nil @@ -181,17 +162,13 @@ func (o TopNodeOptions) RunTopNode() error { metricsAPIAvailable := SupportedMetricsAPIVersionAvailable(apiGroups) - var metrics *metricsapi.NodeMetricsList - if metricsAPIAvailable { - metrics, err = getNodeMetricsFromMetricsAPI(o.MetricsClient, o.ResourceName, selector) - if err != nil { - return err - } - } else { - metrics, err = o.Client.GetNodeMetrics(o.ResourceName, selector.String()) - if err != nil { - return err - } + if !metricsAPIAvailable { + return errors.New("Metrics API not available") + } + + metrics, err := getNodeMetricsFromMetricsAPI(o.MetricsClient, o.ResourceName, selector) + if err != nil { + return err } if len(metrics.Items) == 0 { diff --git a/vendor/k8s.io/kubectl/pkg/cmd/top/top_pod.go b/vendor/k8s.io/kubectl/pkg/cmd/top/top_pod.go index e56e5fe97f7..0b7b91f3a08 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/top/top_pod.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/top/top_pod.go @@ -37,7 +37,7 @@ import ( "github.com/spf13/cobra" "k8s.io/cli-runtime/pkg/genericclioptions" - "k8s.io/klog" + "k8s.io/klog/v2" ) type TopPodOptions struct { @@ -49,8 +49,6 @@ type TopPodOptions struct { PrintContainers bool NoHeaders bool PodClient corev1client.PodsGetter - HeapsterOptions HeapsterTopOptions - Client *metricsutil.HeapsterMetricsClient Printer *metricsutil.TopCmdPrinter DiscoveryClient discovery.DiscoveryInterface MetricsClient metricsclientset.Interface @@ -108,7 +106,6 @@ func NewCmdTopPod(f cmdutil.Factory, o *TopPodOptions, streams genericclioptions cmd.Flags().BoolVar(&o.PrintContainers, "containers", o.PrintContainers, "If present, print usage of containers within a pod.") cmd.Flags().BoolVarP(&o.AllNamespaces, "all-namespaces", "A", o.AllNamespaces, "If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.") cmd.Flags().BoolVar(&o.NoHeaders, "no-headers", o.NoHeaders, "If present, print output without headers.") - o.HeapsterOptions.Bind(cmd.Flags()) return cmd } @@ -140,7 +137,6 @@ func (o *TopPodOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []s } o.PodClient = clientset.CoreV1() - o.Client = metricsutil.NewHeapsterMetricsClient(clientset.CoreV1(), o.HeapsterOptions.Namespace, o.HeapsterOptions.Scheme, o.HeapsterOptions.Service, o.HeapsterOptions.Port) o.Printer = metricsutil.NewTopCmdPrinter(o.Out) return nil @@ -175,17 +171,12 @@ func (o TopPodOptions) RunTopPod() error { metricsAPIAvailable := SupportedMetricsAPIVersionAvailable(apiGroups) - var metrics *metricsapi.PodMetricsList - if metricsAPIAvailable { - metrics, err = getMetricsFromMetricsAPI(o.MetricsClient, o.Namespace, o.ResourceName, o.AllNamespaces, selector) - if err != nil { - return err - } - } else { - metrics, err = o.Client.GetPodMetrics(o.Namespace, o.ResourceName, o.AllNamespaces, selector) - if err != nil { - return err - } + if !metricsAPIAvailable { + return errors.New("Metrics API not available") + } + metrics, err := getMetricsFromMetricsAPI(o.MetricsClient, o.Namespace, o.ResourceName, o.AllNamespaces, selector) + if err != nil { + return err } // TODO: Refactor this once Heapster becomes the API server. diff --git a/vendor/k8s.io/kubectl/pkg/cmd/util/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/util/BUILD index 549730270c5..626f6129448 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/util/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/util/BUILD @@ -39,7 +39,7 @@ go_library( "//vendor/github.com/evanphx/json-patch:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/util/editor/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/util/editor/BUILD index 2ed85451fd1..58625401390 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/util/editor/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/util/editor/BUILD @@ -13,6 +13,7 @@ go_library( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", @@ -30,7 +31,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/term:go_default_library", "//vendor/github.com/evanphx/json-patch:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -41,6 +42,16 @@ go_test( "editor_test.go", ], embed = [":go_default_library"], + deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library", + "//staging/src/k8s.io/cli-runtime/pkg/resource:go_default_library", + ], ) filegroup( diff --git a/vendor/k8s.io/kubectl/pkg/cmd/util/editor/editoptions.go b/vendor/k8s.io/kubectl/pkg/cmd/util/editor/editoptions.go index bc063aab644..b63f1d3212e 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/util/editor/editoptions.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/util/editor/editoptions.go @@ -28,13 +28,14 @@ import ( goruntime "runtime" "strings" - "github.com/evanphx/json-patch" + jsonpatch "github.com/evanphx/json-patch" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -72,12 +73,16 @@ type EditOptions struct { ApplyAnnotation bool ChangeCause string + managedFields map[types.UID][]metav1.ManagedFieldsEntry + genericclioptions.IOStreams Recorder genericclioptions.Recorder f cmdutil.Factory editPrinterOptions *editPrinterOptions updatedResultGetter func(data []byte) *resource.Result + + FieldManager string } // NewEditOptions returns an initialized EditOptions instance @@ -260,6 +265,10 @@ func (o *EditOptions) Run() error { } if !containsError { + if err := o.extractManagedFields(originalObj); err != nil { + return preservedFile(err, results.file, o.ErrOut) + } + if err := o.editPrinterOptions.PrintObj(originalObj, w); err != nil { return preservedFile(err, results.file, o.ErrOut) } @@ -277,6 +286,7 @@ func (o *EditOptions) Run() error { if err != nil { return preservedFile(err, results.file, o.ErrOut) } + // If we're retrying the loop because of an error, and no change was made in the file, short-circuit if containsError && bytes.Equal(cmdutil.StripComments(editedDiff), cmdutil.StripComments(edited)) { return preservedFile(fmt.Errorf("%s", "Edit cancelled, no valid changes were saved."), file, o.ErrOut) @@ -332,10 +342,19 @@ func (o *EditOptions) Run() error { results.header.reasons = append(results.header.reasons, editReason{head: fmt.Sprintf("The edited file had a syntax error: %v", err)}) continue } + // not a syntax error as it turns out... containsError = false updatedVisitor := resource.InfoListVisitor(updatedInfos) + // we need to add back managedFields to both updated and original object + if err := o.restoreManagedFields(updatedInfos); err != nil { + return preservedFile(err, file, o.ErrOut) + } + if err := o.restoreManagedFields(infos); err != nil { + return preservedFile(err, file, o.ErrOut) + } + // need to make sure the original namespace wasn't changed while editing if err := updatedVisitor.Visit(resource.RequireNamespace(o.CmdNamespace)); err != nil { return preservedFile(err, file, o.ErrOut) @@ -435,6 +454,49 @@ func (o *EditOptions) Run() error { } } +func (o *EditOptions) extractManagedFields(obj runtime.Object) error { + o.managedFields = make(map[types.UID][]metav1.ManagedFieldsEntry) + if meta.IsListType(obj) { + err := meta.EachListItem(obj, func(obj runtime.Object) error { + uid, mf, err := clearManagedFields(obj) + if err != nil { + return err + } + o.managedFields[uid] = mf + return nil + }) + return err + } + uid, mf, err := clearManagedFields(obj) + if err != nil { + return err + } + o.managedFields[uid] = mf + return nil +} + +func clearManagedFields(obj runtime.Object) (types.UID, []metav1.ManagedFieldsEntry, error) { + metaObjs, err := meta.Accessor(obj) + if err != nil { + return "", nil, err + } + mf := metaObjs.GetManagedFields() + metaObjs.SetManagedFields(nil) + return metaObjs.GetUID(), mf, nil +} + +func (o *EditOptions) restoreManagedFields(infos []*resource.Info) error { + for _, info := range infos { + metaObjs, err := meta.Accessor(info.Object) + if err != nil { + return err + } + mf := o.managedFields[metaObjs.GetUID()] + metaObjs.SetManagedFields(mf) + } + return nil +} + func (o *EditOptions) visitToApplyEditPatch(originalInfos []*resource.Info, patchVisitor resource.Visitor) error { err := patchVisitor.Visit(func(info *resource.Info, incomingErr error) error { editObjUID, err := meta.NewAccessor().UID(info.Object) @@ -498,7 +560,7 @@ func (o *EditOptions) annotationPatch(update *resource.Info) error { if err != nil { return err } - helper := resource.NewHelper(client, mapping) + helper := resource.NewHelper(client, mapping).WithFieldManager(o.FieldManager) _, err = helper.Patch(o.CmdNamespace, update.Name, patchType, patch, nil) if err != nil { return err @@ -588,6 +650,7 @@ func (o *EditOptions) visitToPatch(originalInfos []*resource.Info, patchVisitor mergepatch.RequireKeyUnchanged("apiVersion"), mergepatch.RequireKeyUnchanged("kind"), mergepatch.RequireMetadataKeyUnchanged("name"), + mergepatch.RequireKeyUnchanged("managedFields"), } // Create the versioned struct from the type defined in the mapping @@ -628,7 +691,9 @@ func (o *EditOptions) visitToPatch(originalInfos []*resource.Info, patchVisitor fmt.Fprintf(o.Out, "Patch: %s\n", string(patch)) } - patched, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, patchType, patch, nil) + patched, err := resource.NewHelper(info.Client, info.Mapping). + WithFieldManager(o.FieldManager). + Patch(info.Namespace, info.Name, patchType, patch, nil) if err != nil { fmt.Fprintln(o.ErrOut, results.addError(err, info)) return nil @@ -645,9 +710,13 @@ func (o *EditOptions) visitToPatch(originalInfos []*resource.Info, patchVisitor func (o *EditOptions) visitToCreate(createVisitor resource.Visitor) error { err := createVisitor.Visit(func(info *resource.Info, incomingErr error) error { - if err := resource.CreateAndRefresh(info); err != nil { + obj, err := resource.NewHelper(info.Client, info.Mapping). + WithFieldManager(o.FieldManager). + Create(info.Namespace, true, info.Object) + if err != nil { return err } + info.Refresh(obj, true) printer, err := o.ToPrinter("created") if err != nil { return err diff --git a/vendor/k8s.io/kubectl/pkg/cmd/util/editor/editor.go b/vendor/k8s.io/kubectl/pkg/cmd/util/editor/editor.go index 0f124ec07dc..cee99e1a670 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/util/editor/editor.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/util/editor/editor.go @@ -27,7 +27,7 @@ import ( "runtime" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubectl/pkg/util/term" ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go b/vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go index 323f60c2a92..799c86b6035 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go +++ b/vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go @@ -43,7 +43,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/scale" "k8s.io/client-go/tools/clientcmd" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" ) @@ -89,7 +89,7 @@ func DefaultBehaviorOnFatal() { // fatal prints the message (if provided) and then exits. If V(2) or greater, // klog.Fatal is invoked for extended information. func fatal(msg string, code int) { - if klog.V(2) { + if klog.V(2).Enabled() { klog.FatalDepth(2, msg) } if len(msg) > 0 { @@ -430,10 +430,13 @@ func AddDryRunFlag(cmd *cobra.Command) { cmd.Flags().Lookup("dry-run").NoOptDefVal = "unchanged" } +func AddFieldManagerFlagVar(cmd *cobra.Command, p *string, defaultFieldManager string) { + cmd.Flags().StringVar(p, "field-manager", defaultFieldManager, "Name of the manager used to track field ownership.") +} + func AddServerSideApplyFlags(cmd *cobra.Command) { cmd.Flags().Bool("server-side", false, "If true, apply runs in the server instead of the client.") cmd.Flags().Bool("force-conflicts", false, "If true, server-side apply will force the changes against conflicts.") - cmd.Flags().String("field-manager", "kubectl", "Name of the manager used to track field ownership.") } func AddPodRunningTimeoutFlag(cmd *cobra.Command, defaultTimeout time.Duration) { @@ -520,8 +523,23 @@ func GetFieldManagerFlag(cmd *cobra.Command) string { type DryRunStrategy int const ( + // DryRunNone indicates the client will make all mutating calls DryRunNone DryRunStrategy = iota + + // DryRunClient, or client-side dry-run, indicates the client will prevent + // making mutating calls such as CREATE, PATCH, and DELETE DryRunClient + + // DryRunServer, or server-side dry-run, indicates the client will send + // mutating calls to the APIServer with the dry-run parameter to prevent + // persisting changes. + // + // Note that clients sending server-side dry-run calls should verify that + // the APIServer and the resource supports server-side dry-run, and otherwise + // clients should fail early. + // + // If a client sends a server-side dry-run call to an APIServer that doesn't + // support server-side dry-run, then the APIServer will persist changes inadvertently. DryRunServer ) diff --git a/vendor/k8s.io/kubectl/pkg/cmd/version/BUILD b/vendor/k8s.io/kubectl/pkg/cmd/version/BUILD index 7bbb72c6013..5bf7b43e094 100644 --- a/vendor/k8s.io/kubectl/pkg/cmd/version/BUILD +++ b/vendor/k8s.io/kubectl/pkg/cmd/version/BUILD @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", @@ -20,6 +20,17 @@ go_library( ], ) +go_test( + name = "go_default_test", + srcs = ["version_test.go"], + embed = [":go_default_library"], + deps = [ + "//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library", + "//staging/src/k8s.io/kubectl/pkg/cmd/util:go_default_library", + "//vendor/github.com/spf13/cobra:go_default_library", + ], +) + filegroup( name = "package-srcs", srcs = glob(["**"]), diff --git a/vendor/k8s.io/kubectl/pkg/describe/BUILD b/vendor/k8s.io/kubectl/pkg/describe/BUILD index 1d49bb620fa..df132947f87 100644 --- a/vendor/k8s.io/kubectl/pkg/describe/BUILD +++ b/vendor/k8s.io/kubectl/pkg/describe/BUILD @@ -54,7 +54,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/slice:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/storage:go_default_library", "//vendor/github.com/fatih/camelcase:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -80,6 +80,7 @@ go_test( "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v1:go_default_library", "//staging/src/k8s.io/api/autoscaling/v2beta2:go_default_library", + "//staging/src/k8s.io/api/batch/v1:go_default_library", "//staging/src/k8s.io/api/coordination/v1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", diff --git a/vendor/k8s.io/kubectl/pkg/describe/describe.go b/vendor/k8s.io/kubectl/pkg/describe/describe.go index f72b1bb657e..24e70e2ae75 100644 --- a/vendor/k8s.io/kubectl/pkg/describe/describe.go +++ b/vendor/k8s.io/kubectl/pkg/describe/describe.go @@ -67,7 +67,7 @@ import ( corev1client "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/rest" "k8s.io/client-go/tools/reference" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubectl/pkg/scheme" "k8s.io/kubectl/pkg/util/certificate" deploymentutil "k8s.io/kubectl/pkg/util/deployment" @@ -156,6 +156,28 @@ func (pw *prefixWriter) Flush() { } } +// nestedPrefixWriter implements PrefixWriter by increasing the level +// before passing text on to some other writer. +type nestedPrefixWriter struct { + PrefixWriter + indent int +} + +var _ PrefixWriter = &prefixWriter{} + +// NewPrefixWriter creates a new PrefixWriter. +func NewNestedPrefixWriter(out PrefixWriter, indent int) PrefixWriter { + return &nestedPrefixWriter{PrefixWriter: out, indent: indent} +} + +func (npw *nestedPrefixWriter) Write(level int, format string, a ...interface{}) { + npw.PrefixWriter.Write(level+npw.indent, format, a...) +} + +func (npw *nestedPrefixWriter) WriteLine(a ...interface{}) { + npw.PrefixWriter.Write(npw.indent, "%s", fmt.Sprintln(a...)) +} + func describerMap(clientConfig *rest.Config) (map[schema.GroupKind]ResourceDescriber, error) { c, err := clientset.NewForConfig(clientConfig) if err != nil { @@ -187,6 +209,8 @@ func describerMap(clientConfig *rest.Config) (map[schema.GroupKind]ResourceDescr {Group: extensionsv1beta1.GroupName, Kind: "Ingress"}: &IngressDescriber{c}, {Group: networkingv1beta1.GroupName, Kind: "Ingress"}: &IngressDescriber{c}, {Group: networkingv1beta1.GroupName, Kind: "IngressClass"}: &IngressClassDescriber{c}, + {Group: networkingv1.GroupName, Kind: "Ingress"}: &IngressDescriber{c}, + {Group: networkingv1.GroupName, Kind: "IngressClass"}: &IngressClassDescriber{c}, {Group: batchv1.GroupName, Kind: "Job"}: &JobDescriber{c}, {Group: batchv1.GroupName, Kind: "CronJob"}: &CronJobDescriber{c}, {Group: appsv1.GroupName, Kind: "StatefulSet"}: &StatefulSetDescriber{c}, @@ -820,6 +844,8 @@ func describeVolumes(volumes []corev1.Volume, w PrefixWriter, space string) { printGlusterfsVolumeSource(volume.VolumeSource.Glusterfs, w) case volume.VolumeSource.PersistentVolumeClaim != nil: printPersistentVolumeClaimVolumeSource(volume.VolumeSource.PersistentVolumeClaim, w) + case volume.VolumeSource.Ephemeral != nil: + printEphemeralVolumeSource(volume.VolumeSource.Ephemeral, w) case volume.VolumeSource.RBD != nil: printRBDVolumeSource(volume.VolumeSource.RBD, w) case volume.VolumeSource.Quobyte != nil: @@ -1035,6 +1061,18 @@ func printPersistentVolumeClaimVolumeSource(claim *corev1.PersistentVolumeClaimV claim.ClaimName, claim.ReadOnly) } +func printEphemeralVolumeSource(ephemeral *corev1.EphemeralVolumeSource, w PrefixWriter) { + w.Write(LEVEL_2, "Type:\tEphemeralVolume (an inline specification for a volume that gets created and deleted with the pod)\n") + if ephemeral.VolumeClaimTemplate != nil { + printPersistentVolumeClaim(NewNestedPrefixWriter(w, LEVEL_2), + &corev1.PersistentVolumeClaim{ + ObjectMeta: ephemeral.VolumeClaimTemplate.ObjectMeta, + Spec: ephemeral.VolumeClaimTemplate.Spec, + }, false /* not a full PVC */) + } + w.Write(LEVEL_2, "ReadOnly:\t%v\n", ephemeral.ReadOnly) +} + func printRBDVolumeSource(rbd *corev1.RBDVolumeSource, w PrefixWriter) { w.Write(LEVEL_2, "Type:\tRBD (a Rados Block Device mount on the host that shares a pod's lifetime)\n"+ " CephMonitors:\t%v\n"+ @@ -1533,39 +1571,7 @@ func getPvcs(volumes []corev1.Volume) []corev1.Volume { func describePersistentVolumeClaim(pvc *corev1.PersistentVolumeClaim, events *corev1.EventList, mountPods []corev1.Pod) (string, error) { return tabbedString(func(out io.Writer) error { w := NewPrefixWriter(out) - w.Write(LEVEL_0, "Name:\t%s\n", pvc.Name) - w.Write(LEVEL_0, "Namespace:\t%s\n", pvc.Namespace) - w.Write(LEVEL_0, "StorageClass:\t%s\n", storageutil.GetPersistentVolumeClaimClass(pvc)) - if pvc.ObjectMeta.DeletionTimestamp != nil { - w.Write(LEVEL_0, "Status:\tTerminating (lasts %s)\n", translateTimestampSince(*pvc.ObjectMeta.DeletionTimestamp)) - } else { - w.Write(LEVEL_0, "Status:\t%v\n", pvc.Status.Phase) - } - w.Write(LEVEL_0, "Volume:\t%s\n", pvc.Spec.VolumeName) - printLabelsMultiline(w, "Labels", pvc.Labels) - printAnnotationsMultiline(w, "Annotations", pvc.Annotations) - w.Write(LEVEL_0, "Finalizers:\t%v\n", pvc.ObjectMeta.Finalizers) - storage := pvc.Spec.Resources.Requests[corev1.ResourceStorage] - capacity := "" - accessModes := "" - if pvc.Spec.VolumeName != "" { - accessModes = storageutil.GetAccessModesAsString(pvc.Status.AccessModes) - storage = pvc.Status.Capacity[corev1.ResourceStorage] - capacity = storage.String() - } - w.Write(LEVEL_0, "Capacity:\t%s\n", capacity) - w.Write(LEVEL_0, "Access Modes:\t%s\n", accessModes) - if pvc.Spec.VolumeMode != nil { - w.Write(LEVEL_0, "VolumeMode:\t%v\n", *pvc.Spec.VolumeMode) - } - if pvc.Spec.DataSource != nil { - w.Write(LEVEL_0, "DataSource:\n") - if pvc.Spec.DataSource.APIGroup != nil { - w.Write(LEVEL_1, "APIGroup:\t%v\n", *pvc.Spec.DataSource.APIGroup) - } - w.Write(LEVEL_1, "Kind:\t%v\n", pvc.Spec.DataSource.Kind) - w.Write(LEVEL_1, "Name:\t%v\n", pvc.Spec.DataSource.Name) - } + printPersistentVolumeClaim(w, pvc, true) printPodsMultiline(w, "Mounted By", mountPods) if len(pvc.Status.Conditions) > 0 { @@ -1590,6 +1596,50 @@ func describePersistentVolumeClaim(pvc *corev1.PersistentVolumeClaim, events *co }) } +// printPersistentVolumeClaim is used for both PVCs and PersistentVolumeClaimTemplate. For the latter, +// we need to skip some fields which have no meaning. +func printPersistentVolumeClaim(w PrefixWriter, pvc *corev1.PersistentVolumeClaim, isFullPVC bool) { + if isFullPVC { + w.Write(LEVEL_0, "Name:\t%s\n", pvc.Name) + w.Write(LEVEL_0, "Namespace:\t%s\n", pvc.Namespace) + } + w.Write(LEVEL_0, "StorageClass:\t%s\n", storageutil.GetPersistentVolumeClaimClass(pvc)) + if isFullPVC { + if pvc.ObjectMeta.DeletionTimestamp != nil { + w.Write(LEVEL_0, "Status:\tTerminating (lasts %s)\n", translateTimestampSince(*pvc.ObjectMeta.DeletionTimestamp)) + } else { + w.Write(LEVEL_0, "Status:\t%v\n", pvc.Status.Phase) + } + } + w.Write(LEVEL_0, "Volume:\t%s\n", pvc.Spec.VolumeName) + printLabelsMultiline(w, "Labels", pvc.Labels) + printAnnotationsMultiline(w, "Annotations", pvc.Annotations) + if isFullPVC { + w.Write(LEVEL_0, "Finalizers:\t%v\n", pvc.ObjectMeta.Finalizers) + } + storage := pvc.Spec.Resources.Requests[corev1.ResourceStorage] + capacity := "" + accessModes := "" + if pvc.Spec.VolumeName != "" { + accessModes = storageutil.GetAccessModesAsString(pvc.Status.AccessModes) + storage = pvc.Status.Capacity[corev1.ResourceStorage] + capacity = storage.String() + } + w.Write(LEVEL_0, "Capacity:\t%s\n", capacity) + w.Write(LEVEL_0, "Access Modes:\t%s\n", accessModes) + if pvc.Spec.VolumeMode != nil { + w.Write(LEVEL_0, "VolumeMode:\t%v\n", *pvc.Spec.VolumeMode) + } + if pvc.Spec.DataSource != nil { + w.Write(LEVEL_0, "DataSource:\n") + if pvc.Spec.DataSource.APIGroup != nil { + w.Write(LEVEL_1, "APIGroup:\t%v\n", *pvc.Spec.DataSource.APIGroup) + } + w.Write(LEVEL_1, "Kind:\t%v\n", pvc.Spec.DataSource.Kind) + w.Write(LEVEL_1, "Name:\t%v\n", pvc.Spec.DataSource.Name) + } +} + func describeContainers(label string, containers []corev1.Container, containerStatuses []corev1.ContainerStatus, resolverFn EnvVarResolverFunc, w PrefixWriter, space string) { statuses := map[string]corev1.ContainerStatus{} @@ -2116,7 +2166,9 @@ func describeJob(job *batchv1.Job, events *corev1.EventList) (string, error) { if controlledBy := printController(job); len(controlledBy) > 0 { w.Write(LEVEL_0, "Controlled By:\t%s\n", controlledBy) } - w.Write(LEVEL_0, "Parallelism:\t%d\n", *job.Spec.Parallelism) + if job.Spec.Parallelism != nil { + w.Write(LEVEL_0, "Parallelism:\t%d\n", *job.Spec.Parallelism) + } if job.Spec.Completions != nil { w.Write(LEVEL_0, "Completions:\t%d\n", *job.Spec.Completions) } else { @@ -2341,24 +2393,36 @@ func describeSecret(secret *corev1.Secret) (string, error) { } type IngressDescriber struct { - clientset.Interface + client clientset.Interface } func (i *IngressDescriber) Describe(namespace, name string, describerSettings DescriberSettings) (string, error) { - c := i.NetworkingV1beta1().Ingresses(namespace) - ing, err := c.Get(context.TODO(), name, metav1.GetOptions{}) - if err != nil { - return "", err + var events *corev1.EventList + + // try ingress/v1 first (v1.19) and fallback to ingress/v1beta if an err occurs + netV1, err := i.client.NetworkingV1().Ingresses(namespace).Get(context.TODO(), name, metav1.GetOptions{}) + if err == nil { + if describerSettings.ShowEvents { + events, _ = i.client.CoreV1().Events(namespace).Search(scheme.Scheme, netV1) + } + return i.describeIngressV1(netV1, events) } - return i.describeIngress(ing, describerSettings) + netV1beta1, err := i.client.NetworkingV1beta1().Ingresses(namespace).Get(context.TODO(), name, metav1.GetOptions{}) + if err == nil { + if describerSettings.ShowEvents { + events, _ = i.client.CoreV1().Events(namespace).Search(scheme.Scheme, netV1beta1) + } + return i.describeIngressV1beta1(netV1beta1, events) + } + return "", err } -func (i *IngressDescriber) describeBackend(ns string, backend *networkingv1beta1.IngressBackend) string { - endpoints, err := i.CoreV1().Endpoints(ns).Get(context.TODO(), backend.ServiceName, metav1.GetOptions{}) +func (i *IngressDescriber) describeBackendV1beta1(ns string, backend *networkingv1beta1.IngressBackend) string { + endpoints, err := i.client.CoreV1().Endpoints(ns).Get(context.TODO(), backend.ServiceName, metav1.GetOptions{}) if err != nil { return fmt.Sprintf("", err) } - service, err := i.CoreV1().Services(ns).Get(context.TODO(), backend.ServiceName, metav1.GetOptions{}) + service, err := i.client.CoreV1().Services(ns).Get(context.TODO(), backend.ServiceName, metav1.GetOptions{}) if err != nil { return fmt.Sprintf("", err) } @@ -2379,7 +2443,93 @@ func (i *IngressDescriber) describeBackend(ns string, backend *networkingv1beta1 return formatEndpoints(endpoints, sets.NewString(spName)) } -func (i *IngressDescriber) describeIngress(ing *networkingv1beta1.Ingress, describerSettings DescriberSettings) (string, error) { +func (i *IngressDescriber) describeBackendV1(ns string, backend *networkingv1.IngressBackend) string { + + if backend.Service != nil { + sb := serviceBackendStringer(backend.Service) + endpoints, err := i.client.CoreV1().Endpoints(ns).Get(context.TODO(), backend.Service.Name, metav1.GetOptions{}) + if err != nil { + return fmt.Sprintf("%v ()", sb, err) + } + service, err := i.client.CoreV1().Services(ns).Get(context.TODO(), backend.Service.Name, metav1.GetOptions{}) + if err != nil { + return fmt.Sprintf("%v()", sb, err) + } + spName := "" + for i := range service.Spec.Ports { + sp := &service.Spec.Ports[i] + if backend.Service.Port.Number != 0 && backend.Service.Port.Number == sp.Port { + spName = sp.Name + } else if len(backend.Service.Port.Name) > 0 && backend.Service.Port.Name == sp.Name { + spName = sp.Name + } + } + ep := formatEndpoints(endpoints, sets.NewString(spName)) + return fmt.Sprintf("%s\t %s)", sb, ep) + } + if backend.Resource != nil { + ic := backend.Resource + return fmt.Sprintf("APIGroup: %v, Kind: %v, Name: %v", *ic.APIGroup, ic.Kind, ic.Name) + } + return "" +} + +func (i *IngressDescriber) describeIngressV1(ing *networkingv1.Ingress, events *corev1.EventList) (string, error) { + return tabbedString(func(out io.Writer) error { + w := NewPrefixWriter(out) + w.Write(LEVEL_0, "Name:\t%v\n", ing.Name) + w.Write(LEVEL_0, "Namespace:\t%v\n", ing.Namespace) + w.Write(LEVEL_0, "Address:\t%v\n", loadBalancerStatusStringer(ing.Status.LoadBalancer, true)) + def := ing.Spec.DefaultBackend + ns := ing.Namespace + if def == nil { + // Ingresses that don't specify a default backend inherit the + // default backend in the kube-system namespace. + def = &networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: "default-http-backend", + Port: networkingv1.ServiceBackendPort{ + Number: 80, + }, + }, + } + ns = metav1.NamespaceSystem + } + w.Write(LEVEL_0, "Default backend:\t%s\n", i.describeBackendV1(ns, def)) + if len(ing.Spec.TLS) != 0 { + describeIngressTLSV1(w, ing.Spec.TLS) + } + w.Write(LEVEL_0, "Rules:\n Host\tPath\tBackends\n") + w.Write(LEVEL_1, "----\t----\t--------\n") + count := 0 + for _, rules := range ing.Spec.Rules { + + if rules.HTTP == nil { + continue + } + count++ + host := rules.Host + if len(host) == 0 { + host = "*" + } + w.Write(LEVEL_1, "%s\t\n", host) + for _, path := range rules.HTTP.Paths { + w.Write(LEVEL_2, "\t%s \t%s\n", path.Path, i.describeBackendV1(ing.Namespace, &path.Backend)) + } + } + if count == 0 { + w.Write(LEVEL_1, "\t%s %s\n", "*", "*", i.describeBackendV1(ns, def)) + } + printAnnotationsMultiline(w, "Annotations", ing.Annotations) + + if events != nil { + DescribeEvents(events, w) + } + return nil + }) +} + +func (i *IngressDescriber) describeIngressV1beta1(ing *networkingv1beta1.Ingress, events *corev1.EventList) (string, error) { return tabbedString(func(out io.Writer) error { w := NewPrefixWriter(out) w.Write(LEVEL_0, "Name:\t%v\n", ing.Name) @@ -2396,14 +2546,15 @@ func (i *IngressDescriber) describeIngress(ing *networkingv1beta1.Ingress, descr } ns = metav1.NamespaceSystem } - w.Write(LEVEL_0, "Default backend:\t%s (%s)\n", backendStringer(def), i.describeBackend(ns, def)) + w.Write(LEVEL_0, "Default backend:\t%s (%s)\n", backendStringer(def), i.describeBackendV1beta1(ns, def)) if len(ing.Spec.TLS) != 0 { - describeIngressTLS(w, ing.Spec.TLS) + describeIngressTLSV1beta1(w, ing.Spec.TLS) } w.Write(LEVEL_0, "Rules:\n Host\tPath\tBackends\n") w.Write(LEVEL_1, "----\t----\t--------\n") count := 0 for _, rules := range ing.Spec.Rules { + if rules.HTTP == nil { continue } @@ -2414,25 +2565,33 @@ func (i *IngressDescriber) describeIngress(ing *networkingv1beta1.Ingress, descr } w.Write(LEVEL_1, "%s\t\n", host) for _, path := range rules.HTTP.Paths { - w.Write(LEVEL_2, "\t%s \t%s (%s)\n", path.Path, backendStringer(&path.Backend), i.describeBackend(ing.Namespace, &path.Backend)) + w.Write(LEVEL_2, "\t%s \t%s (%s)\n", path.Path, backendStringer(&path.Backend), i.describeBackendV1beta1(ing.Namespace, &path.Backend)) } } if count == 0 { - w.Write(LEVEL_1, "%s\t%s \t%s (%s)\n", "*", "*", backendStringer(def), i.describeBackend(ns, def)) + w.Write(LEVEL_1, "%s\t%s \t%s (%s)\n", "*", "*", backendStringer(def), i.describeBackendV1beta1(ns, def)) } printAnnotationsMultiline(w, "Annotations", ing.Annotations) - if describerSettings.ShowEvents { - events, _ := i.CoreV1().Events(ing.Namespace).Search(scheme.Scheme, ing) - if events != nil { - DescribeEvents(events, w) - } + if events != nil { + DescribeEvents(events, w) } return nil }) } -func describeIngressTLS(w PrefixWriter, ingTLS []networkingv1beta1.IngressTLS) { +func describeIngressTLSV1beta1(w PrefixWriter, ingTLS []networkingv1beta1.IngressTLS) { + w.Write(LEVEL_0, "TLS:\n") + for _, t := range ingTLS { + if t.SecretName == "" { + w.Write(LEVEL_1, "SNI routes %v\n", strings.Join(t.Hosts, ",")) + } else { + w.Write(LEVEL_1, "%v terminates %v\n", t.SecretName, strings.Join(t.Hosts, ",")) + } + } +} + +func describeIngressTLSV1(w PrefixWriter, ingTLS []networkingv1.IngressTLS) { w.Write(LEVEL_0, "TLS:\n") for _, t := range ingTLS { if t.SecretName == "" { @@ -2444,19 +2603,30 @@ func describeIngressTLS(w PrefixWriter, ingTLS []networkingv1beta1.IngressTLS) { } type IngressClassDescriber struct { - clientset.Interface + client clientset.Interface } func (i *IngressClassDescriber) Describe(namespace, name string, describerSettings DescriberSettings) (string, error) { - c := i.NetworkingV1beta1().IngressClasses() - ic, err := c.Get(context.TODO(), name, metav1.GetOptions{}) - if err != nil { - return "", err + var events *corev1.EventList + // try IngressClass/v1 first (v1.19) and fallback to IngressClass/v1beta if an err occurs + netV1, err := i.client.NetworkingV1().IngressClasses().Get(context.TODO(), name, metav1.GetOptions{}) + if err == nil { + if describerSettings.ShowEvents { + events, _ = i.client.CoreV1().Events(namespace).Search(scheme.Scheme, netV1) + } + return i.describeIngressClassV1(netV1, events) } - return i.describeIngressClass(ic, describerSettings) + netV1beta1, err := i.client.NetworkingV1beta1().IngressClasses().Get(context.TODO(), name, metav1.GetOptions{}) + if err == nil { + if describerSettings.ShowEvents { + events, _ = i.client.CoreV1().Events(namespace).Search(scheme.Scheme, netV1beta1) + } + return i.describeIngressClassV1beta1(netV1beta1, events) + } + return "", err } -func (i *IngressClassDescriber) describeIngressClass(ic *networkingv1beta1.IngressClass, describerSettings DescriberSettings) (string, error) { +func (i *IngressClassDescriber) describeIngressClassV1beta1(ic *networkingv1beta1.IngressClass, events *corev1.EventList) (string, error) { return tabbedString(func(out io.Writer) error { w := NewPrefixWriter(out) w.Write(LEVEL_0, "Name:\t%s\n", ic.Name) @@ -2472,7 +2642,32 @@ func (i *IngressClassDescriber) describeIngressClass(ic *networkingv1beta1.Ingre w.Write(LEVEL_1, "Kind:\t%v\n", ic.Spec.Parameters.Kind) w.Write(LEVEL_1, "Name:\t%v\n", ic.Spec.Parameters.Name) } + if events != nil { + DescribeEvents(events, w) + } + return nil + }) +} +func (i *IngressClassDescriber) describeIngressClassV1(ic *networkingv1.IngressClass, events *corev1.EventList) (string, error) { + return tabbedString(func(out io.Writer) error { + w := NewPrefixWriter(out) + w.Write(LEVEL_0, "Name:\t%s\n", ic.Name) + printLabelsMultiline(w, "Labels", ic.Labels) + printAnnotationsMultiline(w, "Annotations", ic.Annotations) + w.Write(LEVEL_0, "Controller:\t%v\n", ic.Spec.Controller) + + if ic.Spec.Parameters != nil { + w.Write(LEVEL_0, "Parameters:\n") + if ic.Spec.Parameters.APIGroup != nil { + w.Write(LEVEL_1, "APIGroup:\t%v\n", *ic.Spec.Parameters.APIGroup) + } + w.Write(LEVEL_1, "Kind:\t%v\n", ic.Spec.Parameters.Kind) + w.Write(LEVEL_1, "Name:\t%v\n", ic.Spec.Parameters.Name) + } + if events != nil { + DescribeEvents(events, w) + } return nil }) } @@ -3036,15 +3231,6 @@ func (d *NodeDescriber) Describe(namespace, name string, describerSettings Descr return "", err } - lease, err := d.CoordinationV1().Leases(corev1.NamespaceNodeLease).Get(context.TODO(), name, metav1.GetOptions{}) - if err != nil { - if !errors.IsNotFound(err) { - return "", err - } - // Corresponding Lease object doesn't exist - print it accordingly. - lease = nil - } - fieldSelector, err := fields.ParseSelector("spec.nodeName=" + name + ",status.phase!=" + string(corev1.PodSucceeded) + ",status.phase!=" + string(corev1.PodFailed)) if err != nil { return "", err @@ -3071,10 +3257,15 @@ func (d *NodeDescriber) Describe(namespace, name string, describerSettings Descr } } - return describeNode(node, lease, nodeNonTerminatedPodsList, events, canViewPods) + return describeNode(node, nodeNonTerminatedPodsList, events, canViewPods, &LeaseDescriber{d}) } -func describeNode(node *corev1.Node, lease *coordinationv1.Lease, nodeNonTerminatedPodsList *corev1.PodList, events *corev1.EventList, canViewPods bool) (string, error) { +type LeaseDescriber struct { + client clientset.Interface +} + +func describeNode(node *corev1.Node, nodeNonTerminatedPodsList *corev1.PodList, events *corev1.EventList, + canViewPods bool, ld *LeaseDescriber) (string, error) { return tabbedString(func(out io.Writer) error { w := NewPrefixWriter(out) w.Write(LEVEL_0, "Name:\t%s\n", node.Name) @@ -3089,22 +3280,13 @@ func describeNode(node *corev1.Node, lease *coordinationv1.Lease, nodeNonTermina printNodeTaintsMultiline(w, "Taints", node.Spec.Taints) w.Write(LEVEL_0, "Unschedulable:\t%v\n", node.Spec.Unschedulable) - w.Write(LEVEL_0, "Lease:\n") - holderIdentity := "" - if lease != nil && lease.Spec.HolderIdentity != nil { - holderIdentity = *lease.Spec.HolderIdentity + if ld != nil { + if lease, err := ld.client.CoordinationV1().Leases(corev1.NamespaceNodeLease).Get(context.TODO(), node.Name, metav1.GetOptions{}); err == nil { + describeNodeLease(lease, w) + } else { + w.Write(LEVEL_0, "Lease:\tFailed to get lease: %s\n", err) + } } - w.Write(LEVEL_1, "HolderIdentity:\t%s\n", holderIdentity) - acquireTime := "" - if lease != nil && lease.Spec.AcquireTime != nil { - acquireTime = lease.Spec.AcquireTime.Time.Format(time.RFC1123Z) - } - w.Write(LEVEL_1, "AcquireTime:\t%s\n", acquireTime) - renewTime := "" - if lease != nil && lease.Spec.RenewTime != nil { - renewTime = lease.Spec.RenewTime.Time.Format(time.RFC1123Z) - } - w.Write(LEVEL_1, "RenewTime:\t%s\n", renewTime) if len(node.Status.Conditions) > 0 { w.Write(LEVEL_0, "Conditions:\n Type\tStatus\tLastHeartbeatTime\tLastTransitionTime\tReason\tMessage\n") @@ -3181,6 +3363,25 @@ func describeNode(node *corev1.Node, lease *coordinationv1.Lease, nodeNonTermina }) } +func describeNodeLease(lease *coordinationv1.Lease, w PrefixWriter) { + w.Write(LEVEL_0, "Lease:\n") + holderIdentity := "" + if lease != nil && lease.Spec.HolderIdentity != nil { + holderIdentity = *lease.Spec.HolderIdentity + } + w.Write(LEVEL_1, "HolderIdentity:\t%s\n", holderIdentity) + acquireTime := "" + if lease != nil && lease.Spec.AcquireTime != nil { + acquireTime = lease.Spec.AcquireTime.Time.Format(time.RFC1123Z) + } + w.Write(LEVEL_1, "AcquireTime:\t%s\n", acquireTime) + renewTime := "" + if lease != nil && lease.Spec.RenewTime != nil { + renewTime = lease.Spec.RenewTime.Time.Format(time.RFC1123Z) + } + w.Write(LEVEL_1, "RenewTime:\t%s\n", renewTime) +} + type StatefulSetDescriber struct { client clientset.Interface } @@ -3244,29 +3445,57 @@ type CertificateSigningRequestDescriber struct { } func (p *CertificateSigningRequestDescriber) Describe(namespace, name string, describerSettings DescriberSettings) (string, error) { - csr, err := p.client.CertificatesV1beta1().CertificateSigningRequests().Get(context.TODO(), name, metav1.GetOptions{}) - if err != nil { + + var ( + crBytes []byte + metadata metav1.ObjectMeta + status string + signerName string + username string + events *corev1.EventList + ) + + if csr, err := p.client.CertificatesV1().CertificateSigningRequests().Get(context.TODO(), name, metav1.GetOptions{}); err == nil { + crBytes = csr.Spec.Request + metadata = csr.ObjectMeta + conditionTypes := []string{} + for _, c := range csr.Status.Conditions { + conditionTypes = append(conditionTypes, string(c.Type)) + } + status = extractCSRStatus(conditionTypes, csr.Status.Certificate) + signerName = csr.Spec.SignerName + username = csr.Spec.Username + if describerSettings.ShowEvents { + events, _ = p.client.CoreV1().Events(namespace).Search(scheme.Scheme, csr) + } + } else if csr, err := p.client.CertificatesV1beta1().CertificateSigningRequests().Get(context.TODO(), name, metav1.GetOptions{}); err == nil { + crBytes = csr.Spec.Request + metadata = csr.ObjectMeta + conditionTypes := []string{} + for _, c := range csr.Status.Conditions { + conditionTypes = append(conditionTypes, string(c.Type)) + } + status = extractCSRStatus(conditionTypes, csr.Status.Certificate) + if csr.Spec.SignerName != nil { + signerName = *csr.Spec.SignerName + } + username = csr.Spec.Username + if describerSettings.ShowEvents { + events, _ = p.client.CoreV1().Events(namespace).Search(scheme.Scheme, csr) + } + } else { return "", err } - cr, err := certificate.ParseCSR(csr) + cr, err := certificate.ParseCSR(crBytes) if err != nil { return "", fmt.Errorf("Error parsing CSR: %v", err) } - status, err := extractCSRStatus(csr) - if err != nil { - return "", err - } - var events *corev1.EventList - if describerSettings.ShowEvents { - events, _ = p.client.CoreV1().Events(namespace).Search(scheme.Scheme, csr) - } - - return describeCertificateSigningRequest(csr, cr, status, events) + return describeCertificateSigningRequest(metadata, signerName, username, cr, status, events) } -func describeCertificateSigningRequest(csr *certificatesv1beta1.CertificateSigningRequest, cr *x509.CertificateRequest, status string, events *corev1.EventList) (string, error) { +func describeCertificateSigningRequest(csr metav1.ObjectMeta, signerName string, username string, cr *x509.CertificateRequest, status string, events *corev1.EventList) (string, error) { printListHelper := func(w PrefixWriter, prefix, name string, values []string) { if len(values) == 0 { return @@ -3282,9 +3511,9 @@ func describeCertificateSigningRequest(csr *certificatesv1beta1.CertificateSigni w.Write(LEVEL_0, "Labels:\t%s\n", labels.FormatLabels(csr.Labels)) w.Write(LEVEL_0, "Annotations:\t%s\n", labels.FormatLabels(csr.Annotations)) w.Write(LEVEL_0, "CreationTimestamp:\t%s\n", csr.CreationTimestamp.Time.Format(time.RFC1123Z)) - w.Write(LEVEL_0, "Requesting User:\t%s\n", csr.Spec.Username) - if csr.Spec.SignerName != nil { - w.Write(LEVEL_0, "Signer:\t%s\n", *csr.Spec.SignerName) + w.Write(LEVEL_0, "Requesting User:\t%s\n", username) + if len(signerName) > 0 { + w.Write(LEVEL_0, "Signer:\t%s\n", signerName) } w.Write(LEVEL_0, "Status:\t%s\n", status) @@ -3640,6 +3869,9 @@ func DescribeEvents(el *corev1.EventList, w PrefixWriter) { interval = fmt.Sprintf("%s (x%d over %s)", translateTimestampSince(e.LastTimestamp), e.Count, translateTimestampSince(e.FirstTimestamp)) } else { interval = translateTimestampSince(e.FirstTimestamp) + if e.FirstTimestamp.IsZero() { + interval = translateMicroTimestampSince(e.EventTime) + } } w.Write(LEVEL_1, "%v\t%v\t%s\t%v\t%v\n", e.Type, @@ -4031,10 +4263,14 @@ func describeCSINode(csi *storagev1.CSINode, events *corev1.EventList) (output s w.Write(LEVEL_1, "Drivers:\n") for _, driver := range csi.Spec.Drivers { w.Write(LEVEL_2, "%s:\n", driver.Name) - w.Write(LEVEL_3, "Allocatables:\n") - w.Write(LEVEL_4, "Count:\t%d\n", *driver.Allocatable.Count) w.Write(LEVEL_3, "Node ID:\t%s\n", driver.NodeID) - w.Write(LEVEL_3, "Topology Keys:\t%s\n", driver.TopologyKeys) + if driver.Allocatable != nil && driver.Allocatable.Count != nil { + w.Write(LEVEL_3, "Allocatables:\n") + w.Write(LEVEL_4, "Count:\t%d\n", *driver.Allocatable.Count) + } + if driver.TopologyKeys != nil { + w.Write(LEVEL_3, "Topology Keys:\t%s\n", driver.TopologyKeys) + } } } if events != nil { @@ -4597,6 +4833,17 @@ func printTolerationsMultilineWithIndent(w PrefixWriter, initialIndent, title, i if len(toleration.Effect) != 0 { w.Write(LEVEL_0, ":%s", toleration.Effect) } + // tolerations: + // - operator: "Exists" + // is a special case which tolerates everything + if toleration.Operator == corev1.TolerationOpExists && len(toleration.Value) == 0 { + if len(toleration.Key) != 0 { + w.Write(LEVEL_0, " op=Exists") + } else { + w.Write(LEVEL_0, "op=Exists") + } + } + if toleration.TolerationSeconds != nil { w.Write(LEVEL_0, " for %ds", *toleration.TolerationSeconds) } @@ -4696,11 +4943,6 @@ var maxAnnotationLen = 140 func printAnnotationsMultiline(w PrefixWriter, title string, annotations map[string]string) { w.Write(LEVEL_0, "%s:\t", title) - if len(annotations) == 0 { - w.WriteLine("") - return - } - // to print labels in the sorted order keys := make([]string, 0, len(annotations)) for key := range annotations { @@ -4709,7 +4951,7 @@ func printAnnotationsMultiline(w PrefixWriter, title string, annotations map[str } keys = append(keys, key) } - if len(annotations) == 0 { + if len(keys) == 0 { w.WriteLine("") return } @@ -4739,6 +4981,16 @@ func shorten(s string, maxLength int) string { return s } +// translateMicroTimestampSince returns the elapsed time since timestamp in +// human-readable approximation. +func translateMicroTimestampSince(timestamp metav1.MicroTime) string { + if timestamp.IsZero() { + return "" + } + + return duration.HumanDuration(time.Since(timestamp.Time)) +} + // translateTimestampSince returns the elapsed time since timestamp in // human-readable approximation. func translateTimestampSince(timestamp metav1.Time) string { @@ -4807,20 +5059,20 @@ func formatEndpoints(endpoints *corev1.Endpoints, ports sets.String) string { return ret } -func extractCSRStatus(csr *certificatesv1beta1.CertificateSigningRequest) (string, error) { - var approved, denied bool - for _, c := range csr.Status.Conditions { - switch c.Type { - case certificatesv1beta1.CertificateApproved: +func extractCSRStatus(conditions []string, certificateBytes []byte) string { + var approved, denied, failed bool + for _, c := range conditions { + switch c { + case string(certificatesv1beta1.CertificateApproved): approved = true - case certificatesv1beta1.CertificateDenied: + case string(certificatesv1beta1.CertificateDenied): denied = true - default: - return "", fmt.Errorf("unknown csr condition %q", c) + case string(certificatesv1beta1.CertificateFailed): + failed = true } } var status string - // must be in order of presidence + // must be in order of precedence if denied { status += "Denied" } else if approved { @@ -4828,10 +5080,28 @@ func extractCSRStatus(csr *certificatesv1beta1.CertificateSigningRequest) (strin } else { status += "Pending" } - if len(csr.Status.Certificate) > 0 { + if failed { + status += ",Failed" + } + if len(certificateBytes) > 0 { status += ",Issued" } - return status, nil + return status +} + +// backendStringer behaves just like a string interface and converts the given backend to a string. +func serviceBackendStringer(backend *networkingv1.IngressServiceBackend) string { + if backend == nil { + return "" + } + var bPort string + if backend.Port.Number != 0 { + sNum := int64(backend.Port.Number) + bPort = strconv.FormatInt(sNum, 10) + } else { + bPort = backend.Port.Name + } + return fmt.Sprintf("%v:%v", backend.Name, bPort) } // backendStringer behaves just like a string interface and converts the given backend to a string. diff --git a/vendor/k8s.io/kubectl/pkg/drain/BUILD b/vendor/k8s.io/kubectl/pkg/drain/BUILD index d55cd837cf3..c174b34100e 100644 --- a/vendor/k8s.io/kubectl/pkg/drain/BUILD +++ b/vendor/k8s.io/kubectl/pkg/drain/BUILD @@ -12,7 +12,6 @@ go_library( importpath = "k8s.io/kubectl/pkg/drain", visibility = ["//visibility:public"], deps = [ - # Please be wary of additional deps here ... this is intended to be usable as a library "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", diff --git a/vendor/k8s.io/kubectl/pkg/explain/BUILD b/vendor/k8s.io/kubectl/pkg/explain/BUILD index 91bd8c8b6e9..60f58b2c2d1 100644 --- a/vendor/k8s.io/kubectl/pkg/explain/BUILD +++ b/vendor/k8s.io/kubectl/pkg/explain/BUILD @@ -41,6 +41,7 @@ go_test( deps = [ "//staging/src/k8s.io/apimachinery/pkg/api/meta/testrestmapper:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/kubectl/pkg/scheme:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/openapi/testing:go_default_library", ], diff --git a/vendor/k8s.io/kubectl/pkg/explain/explain.go b/vendor/k8s.io/kubectl/pkg/explain/explain.go index 816628d4254..9d0e904bb9a 100644 --- a/vendor/k8s.io/kubectl/pkg/explain/explain.go +++ b/vendor/k8s.io/kubectl/pkg/explain/explain.go @@ -20,9 +20,10 @@ import ( "io" "strings" + "k8s.io/kube-openapi/pkg/util/proto" + "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kube-openapi/pkg/util/proto" ) type fieldsPrinter interface { @@ -43,10 +44,13 @@ func splitDotNotation(model string) (string, []string) { } // SplitAndParseResourceRequest separates the users input into a model and fields -func SplitAndParseResourceRequest(inResource string, mapper meta.RESTMapper) (string, []string, error) { +func SplitAndParseResourceRequest(inResource string, mapper meta.RESTMapper) (schema.GroupVersionResource, []string, error) { inResource, fieldsPath := splitDotNotation(inResource) - inResource, _ = mapper.ResourceSingularizer(inResource) - return inResource, fieldsPath, nil + gvr, err := mapper.ResourceFor(schema.GroupVersionResource{Resource: inResource}) + if err != nil { + return schema.GroupVersionResource{}, nil, err + } + return gvr, fieldsPath, nil } // PrintModelDescription prints the description of a specific model or dot path. diff --git a/vendor/k8s.io/kubectl/pkg/explain/formatter.go b/vendor/k8s.io/kubectl/pkg/explain/formatter.go index 04bdb04644b..76ca017e47e 100644 --- a/vendor/k8s.io/kubectl/pkg/explain/formatter.go +++ b/vendor/k8s.io/kubectl/pkg/explain/formatter.go @@ -19,6 +19,7 @@ package explain import ( "fmt" "io" + "regexp" "strings" ) @@ -103,22 +104,75 @@ func (l *line) Add(word string) bool { return false } +var bullet = regexp.MustCompile(`^(\d+\.?|-|\*)\s`) + +func shouldStartNewLine(lastWord, str string) bool { + // preserve line breaks ending in : + if strings.HasSuffix(lastWord, ":") { + return true + } + + // preserve code blocks + if strings.HasPrefix(str, " ") { + return true + } + str = strings.TrimSpace(str) + // preserve empty lines + if len(str) == 0 { + return true + } + // preserve lines that look like they're starting lists + if bullet.MatchString(str) == true { + return true + } + // otherwise combine + return false +} + func wrapString(str string, wrap int) []string { - words := strings.Fields(str) wrapped := []string{} l := line{wrap: wrap} - - for _, word := range words { - if !l.Add(word) { + // track the last word added to the current line + lastWord := "" + flush := func() { + if !l.Empty() { + lastWord = "" wrapped = append(wrapped, l.String()) l = line{wrap: wrap} + } + } + + // iterate over the lines in the original description + for _, str := range strings.Split(str, "\n") { + // preserve code blocks and blockquotes as-is + if strings.HasPrefix(str, " ") { + flush() + wrapped = append(wrapped, str) + continue + } + + // preserve empty lines after the first line, since they can separate logical sections + if len(wrapped) > 0 && len(strings.TrimSpace(str)) == 0 { + flush() + wrapped = append(wrapped, "") + continue + } + + // flush if we should start a new line + if shouldStartNewLine(lastWord, str) { + flush() + } + words := strings.Fields(str) + for _, word := range words { + lastWord = word if !l.Add(word) { - panic("Couldn't add to empty line.") + flush() + if !l.Add(word) { + panic("Couldn't add to empty line.") + } } } } - if !l.Empty() { - wrapped = append(wrapped, l.String()) - } + flush() return wrapped } diff --git a/vendor/k8s.io/kubectl/pkg/generate/versioned/BUILD b/vendor/k8s.io/kubectl/pkg/generate/versioned/BUILD index 93faeddaba0..e2ee66cc326 100644 --- a/vendor/k8s.io/kubectl/pkg/generate/versioned/BUILD +++ b/vendor/k8s.io/kubectl/pkg/generate/versioned/BUILD @@ -47,6 +47,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/generate:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/hash:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/generate/versioned/run.go b/vendor/k8s.io/kubectl/pkg/generate/versioned/run.go index 4f70a9d4eb2..6eade8d9b26 100644 --- a/vendor/k8s.io/kubectl/pkg/generate/versioned/run.go +++ b/vendor/k8s.io/kubectl/pkg/generate/versioned/run.go @@ -229,6 +229,7 @@ func (BasicPod) ParamNames() []generate.GeneratorParam { {Name: "requests", Required: false}, {Name: "limits", Required: false}, {Name: "serviceaccount", Required: false}, + {Name: "privileged", Required: false}, } } @@ -281,6 +282,18 @@ func (BasicPod) Generate(genericParams map[string]interface{}) (runtime.Object, if len(restartPolicy) == 0 { restartPolicy = v1.RestartPolicyAlways } + + privileged, err := generate.GetBool(params, "privileged", false) + if err != nil { + return nil, err + } + var securityContext *v1.SecurityContext + if privileged { + securityContext = &v1.SecurityContext{ + Privileged: &privileged, + } + } + pod := v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -290,12 +303,13 @@ func (BasicPod) Generate(genericParams map[string]interface{}) (runtime.Object, ServiceAccountName: params["serviceaccount"], Containers: []v1.Container{ { - Name: name, - Image: params["image"], - Stdin: stdin, - StdinOnce: !leaveStdinOpen && stdin, - TTY: tty, - Resources: resourceRequirements, + Name: name, + Image: params["image"], + Stdin: stdin, + StdinOnce: !leaveStdinOpen && stdin, + TTY: tty, + Resources: resourceRequirements, + SecurityContext: securityContext, }, }, DNSPolicy: v1.DNSClusterFirst, diff --git a/vendor/k8s.io/kubectl/pkg/generate/versioned/service_basic.go b/vendor/k8s.io/kubectl/pkg/generate/versioned/service_basic.go index f366c3ed647..b0b584ab7c7 100644 --- a/vendor/k8s.io/kubectl/pkg/generate/versioned/service_basic.go +++ b/vendor/k8s.io/kubectl/pkg/generate/versioned/service_basic.go @@ -27,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/kubectl/pkg/generate" + utilsnet "k8s.io/utils/net" ) type ServiceCommonGeneratorV1 struct { @@ -86,15 +87,11 @@ func (ServiceExternalNameGeneratorV1) ParamNames() []generate.GeneratorParam { func parsePorts(portString string) (int32, intstr.IntOrString, error) { portStringSlice := strings.Split(portString, ":") - port, err := strconv.Atoi(portStringSlice[0]) + port, err := utilsnet.ParsePort(portStringSlice[0], true) if err != nil { return 0, intstr.FromInt(0), err } - if errs := validation.IsValidPortNum(port); len(errs) != 0 { - return 0, intstr.FromInt(0), fmt.Errorf(strings.Join(errs, ",")) - } - if len(portStringSlice) == 1 { return int32(port), intstr.FromInt(int(port)), nil } diff --git a/vendor/k8s.io/kubectl/pkg/generated/bindata.go b/vendor/k8s.io/kubectl/pkg/generated/bindata.go index e647924eb78..4c5baf26be1 100644 --- a/vendor/k8s.io/kubectl/pkg/generated/bindata.go +++ b/vendor/k8s.io/kubectl/pkg/generated/bindata.go @@ -84,6 +84,7 @@ var _translationsOwners = []byte(`# See the OWNERS docs at https://go.k8s.io/own reviewers: - brendandburns approvers: + - sig-cli-maintainers - brendandburns `) diff --git a/vendor/k8s.io/kubectl/pkg/metricsutil/BUILD b/vendor/k8s.io/kubectl/pkg/metricsutil/BUILD index d48876936f3..a0f8b0eac6e 100644 --- a/vendor/k8s.io/kubectl/pkg/metricsutil/BUILD +++ b/vendor/k8s.io/kubectl/pkg/metricsutil/BUILD @@ -2,24 +2,15 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = [ - "metrics_client.go", - "metrics_printer.go", - ], + srcs = ["metrics_printer.go"], importmap = "k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/metricsutil", importpath = "k8s.io/kubectl/pkg/metricsutil", visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/validation:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/printers:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/metrics/pkg/apis/metrics:go_default_library", - "//staging/src/k8s.io/metrics/pkg/apis/metrics/v1alpha1:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/metricsutil/metrics_client.go b/vendor/k8s.io/kubectl/pkg/metricsutil/metrics_client.go deleted file mode 100644 index 55a596edd4d..00000000000 --- a/vendor/k8s.io/kubectl/pkg/metricsutil/metrics_client.go +++ /dev/null @@ -1,171 +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 metricsutil - -import ( - "context" - "encoding/json" - "errors" - "fmt" - - "k8s.io/apimachinery/pkg/api/validation" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - metricsapi "k8s.io/metrics/pkg/apis/metrics" - metricsv1alpha1api "k8s.io/metrics/pkg/apis/metrics/v1alpha1" -) - -const ( - DefaultHeapsterNamespace = "kube-system" - DefaultHeapsterScheme = "http" - DefaultHeapsterService = "heapster" - DefaultHeapsterPort = "" // use the first exposed port on the service -) - -var ( - prefix = "/apis" - groupVersion = fmt.Sprintf("%s/%s", metricsGv.Group, metricsGv.Version) - metricsRoot = fmt.Sprintf("%s/%s", prefix, groupVersion) - - // TODO: get this from metrics api once it's finished - metricsGv = schema.GroupVersion{Group: "metrics", Version: "v1alpha1"} -) - -type HeapsterMetricsClient struct { - SVCClient corev1client.ServicesGetter - HeapsterNamespace string - HeapsterScheme string - HeapsterService string - HeapsterPort string -} - -func NewHeapsterMetricsClient(svcClient corev1client.ServicesGetter, namespace, scheme, service, port string) *HeapsterMetricsClient { - return &HeapsterMetricsClient{ - SVCClient: svcClient, - HeapsterNamespace: namespace, - HeapsterScheme: scheme, - HeapsterService: service, - HeapsterPort: port, - } -} - -func podMetricsURL(namespace string, name string) (string, error) { - if namespace == metav1.NamespaceAll { - return fmt.Sprintf("%s/pods", metricsRoot), nil - } - errs := validation.ValidateNamespaceName(namespace, false) - if len(errs) > 0 { - message := fmt.Sprintf("invalid namespace: %s - %v", namespace, errs) - return "", errors.New(message) - } - if len(name) > 0 { - errs = validation.NameIsDNSSubdomain(name, false) - if len(errs) > 0 { - message := fmt.Sprintf("invalid pod name: %s - %v", name, errs) - return "", errors.New(message) - } - } - return fmt.Sprintf("%s/namespaces/%s/pods/%s", metricsRoot, namespace, name), nil -} - -func nodeMetricsURL(name string) (string, error) { - if len(name) > 0 { - errs := validation.NameIsDNSSubdomain(name, false) - if len(errs) > 0 { - message := fmt.Sprintf("invalid node name: %s - %v", name, errs) - return "", errors.New(message) - } - } - return fmt.Sprintf("%s/nodes/%s", metricsRoot, name), nil -} - -func (cli *HeapsterMetricsClient) GetNodeMetrics(nodeName string, selector string) (*metricsapi.NodeMetricsList, error) { - params := map[string]string{"labelSelector": selector} - path, err := nodeMetricsURL(nodeName) - if err != nil { - return nil, err - } - resultRaw, err := GetHeapsterMetrics(cli, path, params) - if err != nil { - return nil, err - } - versionedMetrics := metricsv1alpha1api.NodeMetricsList{} - if len(nodeName) == 0 { - err = json.Unmarshal(resultRaw, &versionedMetrics) - if err != nil { - return nil, fmt.Errorf("failed to unmarshall heapster response: %v", err) - } - } else { - var singleMetric metricsv1alpha1api.NodeMetrics - err = json.Unmarshal(resultRaw, &singleMetric) - if err != nil { - return nil, fmt.Errorf("failed to unmarshall heapster response: %v", err) - } - versionedMetrics.Items = []metricsv1alpha1api.NodeMetrics{singleMetric} - } - metrics := &metricsapi.NodeMetricsList{} - err = metricsv1alpha1api.Convert_v1alpha1_NodeMetricsList_To_metrics_NodeMetricsList(&versionedMetrics, metrics, nil) - if err != nil { - return nil, err - } - return metrics, nil -} - -func (cli *HeapsterMetricsClient) GetPodMetrics(namespace string, podName string, allNamespaces bool, selector labels.Selector) (*metricsapi.PodMetricsList, error) { - if allNamespaces { - namespace = metav1.NamespaceAll - } - path, err := podMetricsURL(namespace, podName) - if err != nil { - return nil, err - } - - params := map[string]string{"labelSelector": selector.String()} - versionedMetrics := metricsv1alpha1api.PodMetricsList{} - - resultRaw, err := GetHeapsterMetrics(cli, path, params) - if err != nil { - return nil, err - } - if len(podName) == 0 { - err = json.Unmarshal(resultRaw, &versionedMetrics) - if err != nil { - return nil, fmt.Errorf("failed to unmarshall heapster response: %v", err) - } - } else { - var singleMetric metricsv1alpha1api.PodMetrics - err = json.Unmarshal(resultRaw, &singleMetric) - if err != nil { - return nil, fmt.Errorf("failed to unmarshall heapster response: %v", err) - } - versionedMetrics.Items = []metricsv1alpha1api.PodMetrics{singleMetric} - } - metrics := &metricsapi.PodMetricsList{} - err = metricsv1alpha1api.Convert_v1alpha1_PodMetricsList_To_metrics_PodMetricsList(&versionedMetrics, metrics, nil) - if err != nil { - return nil, err - } - return metrics, nil -} - -func GetHeapsterMetrics(cli *HeapsterMetricsClient, path string, params map[string]string) ([]byte, error) { - return cli.SVCClient.Services(cli.HeapsterNamespace). - ProxyGet(cli.HeapsterScheme, cli.HeapsterService, cli.HeapsterPort, path, params). - DoRaw(context.TODO()) -} diff --git a/vendor/k8s.io/kubectl/pkg/proxy/BUILD b/vendor/k8s.io/kubectl/pkg/proxy/BUILD index 9a29fd8d463..8eb1cdd8c1a 100644 --- a/vendor/k8s.io/kubectl/pkg/proxy/BUILD +++ b/vendor/k8s.io/kubectl/pkg/proxy/BUILD @@ -12,7 +12,7 @@ go_library( "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/transport:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/proxy/proxy_server.go b/vendor/k8s.io/kubectl/pkg/proxy/proxy_server.go index 9f235968ec0..db797fa0c54 100644 --- a/vendor/k8s.io/kubectl/pkg/proxy/proxy_server.go +++ b/vendor/k8s.io/kubectl/pkg/proxy/proxy_server.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/util/proxy" "k8s.io/client-go/rest" "k8s.io/client-go/transport" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubectl/pkg/util" ) diff --git a/vendor/k8s.io/kubectl/pkg/scale/BUILD b/vendor/k8s.io/kubectl/pkg/scale/BUILD index 62ab8a0bf3f..f928601661c 100644 --- a/vendor/k8s.io/kubectl/pkg/scale/BUILD +++ b/vendor/k8s.io/kubectl/pkg/scale/BUILD @@ -12,6 +12,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/json:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/scale:go_default_library", ], diff --git a/vendor/k8s.io/kubectl/pkg/scale/scale.go b/vendor/k8s.io/kubectl/pkg/scale/scale.go index 0836e68fa39..04df94ff695 100644 --- a/vendor/k8s.io/kubectl/pkg/scale/scale.go +++ b/vendor/k8s.io/kubectl/pkg/scale/scale.go @@ -27,6 +27,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/json" "k8s.io/apimachinery/pkg/util/wait" scaleclient "k8s.io/client-go/scale" ) @@ -37,10 +38,10 @@ type Scaler interface { // retries in the event of resource version mismatch (if retry is not nil), // and optionally waits until the status of the resource matches newSize (if wait is not nil) // TODO: Make the implementation of this watch-based (#56075) once #31345 is fixed. - Scale(namespace, name string, newSize uint, preconditions *ScalePrecondition, retry, wait *RetryParams, gvr schema.GroupVersionResource) error + Scale(namespace, name string, newSize uint, preconditions *ScalePrecondition, retry, wait *RetryParams, gvr schema.GroupVersionResource, dryRun bool) error // ScaleSimple does a simple one-shot attempt at scaling - not useful on its own, but // a necessary building block for Scale - ScaleSimple(namespace, name string, preconditions *ScalePrecondition, newSize uint, gvr schema.GroupVersionResource) (updatedResourceVersion string, err error) + ScaleSimple(namespace, name string, preconditions *ScalePrecondition, newSize uint, gvr schema.GroupVersionResource, dryRun bool) (updatedResourceVersion string, err error) } // NewScaler get a scaler for a given resource @@ -79,9 +80,9 @@ func NewRetryParams(interval, timeout time.Duration) *RetryParams { } // ScaleCondition is a closure around Scale that facilitates retries via util.wait -func ScaleCondition(r Scaler, precondition *ScalePrecondition, namespace, name string, count uint, updatedResourceVersion *string, gvr schema.GroupVersionResource) wait.ConditionFunc { +func ScaleCondition(r Scaler, precondition *ScalePrecondition, namespace, name string, count uint, updatedResourceVersion *string, gvr schema.GroupVersionResource, dryRun bool) wait.ConditionFunc { return func() (bool, error) { - rv, err := r.ScaleSimple(namespace, name, precondition, count, gvr) + rv, err := r.ScaleSimple(namespace, name, precondition, count, gvr, dryRun) if updatedResourceVersion != nil { *updatedResourceVersion = rv } @@ -115,7 +116,7 @@ type genericScaler struct { var _ Scaler = &genericScaler{} // ScaleSimple updates a scale of a given resource. It returns the resourceVersion of the scale if the update was successful. -func (s *genericScaler) ScaleSimple(namespace, name string, preconditions *ScalePrecondition, newSize uint, gvr schema.GroupVersionResource) (updatedResourceVersion string, err error) { +func (s *genericScaler) ScaleSimple(namespace, name string, preconditions *ScalePrecondition, newSize uint, gvr schema.GroupVersionResource, dryRun bool) (updatedResourceVersion string, err error) { if preconditions != nil { scale, err := s.scaleNamespacer.Scales(namespace).Get(context.TODO(), gvr.GroupResource(), name, metav1.GetOptions{}) if err != nil { @@ -125,15 +126,37 @@ func (s *genericScaler) ScaleSimple(namespace, name string, preconditions *Scale return "", err } scale.Spec.Replicas = int32(newSize) - updatedScale, err := s.scaleNamespacer.Scales(namespace).Update(context.TODO(), gvr.GroupResource(), scale, metav1.UpdateOptions{}) + updateOptions := metav1.UpdateOptions{} + if dryRun { + updateOptions.DryRun = []string{metav1.DryRunAll} + } + updatedScale, err := s.scaleNamespacer.Scales(namespace).Update(context.TODO(), gvr.GroupResource(), scale, updateOptions) if err != nil { return "", err } return updatedScale.ResourceVersion, nil } - patch := []byte(fmt.Sprintf(`{"spec":{"replicas":%d}}`, newSize)) - updatedScale, err := s.scaleNamespacer.Scales(namespace).Patch(context.TODO(), gvr, name, types.MergePatchType, patch, metav1.PatchOptions{}) + // objectForReplicas is used for encoding scale patch + type objectForReplicas struct { + Replicas uint `json:"replicas"` + } + // objectForSpec is used for encoding scale patch + type objectForSpec struct { + Spec objectForReplicas `json:"spec"` + } + spec := objectForSpec{ + Spec: objectForReplicas{Replicas: newSize}, + } + patch, err := json.Marshal(&spec) + if err != nil { + return "", err + } + patchOptions := metav1.PatchOptions{} + if dryRun { + patchOptions.DryRun = []string{metav1.DryRunAll} + } + updatedScale, err := s.scaleNamespacer.Scales(namespace).Patch(context.TODO(), gvr, name, types.MergePatchType, patch, patchOptions) if err != nil { return "", err } @@ -142,12 +165,12 @@ func (s *genericScaler) ScaleSimple(namespace, name string, preconditions *Scale // Scale updates a scale of a given resource to a new size, with optional precondition check (if preconditions is not nil), // optional retries (if retry is not nil), and then optionally waits for the status to reach desired count. -func (s *genericScaler) Scale(namespace, resourceName string, newSize uint, preconditions *ScalePrecondition, retry, waitForReplicas *RetryParams, gvr schema.GroupVersionResource) error { +func (s *genericScaler) Scale(namespace, resourceName string, newSize uint, preconditions *ScalePrecondition, retry, waitForReplicas *RetryParams, gvr schema.GroupVersionResource, dryRun bool) error { if retry == nil { // make it try only once, immediately retry = &RetryParams{Interval: time.Millisecond, Timeout: time.Millisecond} } - cond := ScaleCondition(s, preconditions, namespace, resourceName, newSize, nil, gvr) + cond := ScaleCondition(s, preconditions, namespace, resourceName, newSize, nil, gvr, dryRun) if err := wait.PollImmediate(retry.Interval, retry.Timeout, cond); err != nil { return err } diff --git a/vendor/k8s.io/kubectl/pkg/scheme/BUILD b/vendor/k8s.io/kubectl/pkg/scheme/BUILD index 65e21892b16..3f4506a92c5 100644 --- a/vendor/k8s.io/kubectl/pkg/scheme/BUILD +++ b/vendor/k8s.io/kubectl/pkg/scheme/BUILD @@ -26,6 +26,7 @@ go_library( "//staging/src/k8s.io/api/batch/v1:go_default_library", "//staging/src/k8s.io/api/batch/v1beta1:go_default_library", "//staging/src/k8s.io/api/batch/v2alpha1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/extensions/v1beta1:go_default_library", diff --git a/vendor/k8s.io/kubectl/pkg/scheme/install.go b/vendor/k8s.io/kubectl/pkg/scheme/install.go index ffd15bf1b66..06dc0a2a619 100644 --- a/vendor/k8s.io/kubectl/pkg/scheme/install.go +++ b/vendor/k8s.io/kubectl/pkg/scheme/install.go @@ -33,6 +33,7 @@ import ( batchv1 "k8s.io/api/batch/v1" batchv1beta1 "k8s.io/api/batch/v1beta1" batchv2alpha1 "k8s.io/api/batch/v2alpha1" + certificatesv1 "k8s.io/api/certificates/v1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" corev1 "k8s.io/api/core/v1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -71,7 +72,7 @@ func init() { utilruntime.Must(Scheme.SetVersionPriority(authorizationv1.SchemeGroupVersion, authorizationv1beta1.SchemeGroupVersion)) utilruntime.Must(Scheme.SetVersionPriority(autoscalingv1.SchemeGroupVersion, autoscalingv2beta1.SchemeGroupVersion)) utilruntime.Must(Scheme.SetVersionPriority(batchv1.SchemeGroupVersion, batchv1beta1.SchemeGroupVersion, batchv2alpha1.SchemeGroupVersion)) - utilruntime.Must(Scheme.SetVersionPriority(certificatesv1beta1.SchemeGroupVersion)) + utilruntime.Must(Scheme.SetVersionPriority(certificatesv1.SchemeGroupVersion, certificatesv1beta1.SchemeGroupVersion)) utilruntime.Must(Scheme.SetVersionPriority(extensionsv1beta1.SchemeGroupVersion)) utilruntime.Must(Scheme.SetVersionPriority(imagepolicyv1alpha1.SchemeGroupVersion)) utilruntime.Must(Scheme.SetVersionPriority(networkingv1.SchemeGroupVersion)) diff --git a/vendor/k8s.io/kubectl/pkg/util/BUILD b/vendor/k8s.io/kubectl/pkg/util/BUILD index 80788f4ab72..d9721864e7c 100644 --- a/vendor/k8s.io/kubectl/pkg/util/BUILD +++ b/vendor/k8s.io/kubectl/pkg/util/BUILD @@ -20,6 +20,9 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], @@ -32,9 +35,15 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/vendor/k8s.io/kubectl/pkg/util/certificate/BUILD b/vendor/k8s.io/kubectl/pkg/util/certificate/BUILD index 49bda5e7cdd..980c3cdae25 100644 --- a/vendor/k8s.io/kubectl/pkg/util/certificate/BUILD +++ b/vendor/k8s.io/kubectl/pkg/util/certificate/BUILD @@ -6,7 +6,6 @@ go_library( importmap = "k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/util/certificate", importpath = "k8s.io/kubectl/pkg/util/certificate", visibility = ["//visibility:public"], - deps = ["//staging/src/k8s.io/api/certificates/v1beta1:go_default_library"], ) filegroup( diff --git a/vendor/k8s.io/kubectl/pkg/util/certificate/certificate.go b/vendor/k8s.io/kubectl/pkg/util/certificate/certificate.go index 201958c6fca..c55e5963f36 100644 --- a/vendor/k8s.io/kubectl/pkg/util/certificate/certificate.go +++ b/vendor/k8s.io/kubectl/pkg/util/certificate/certificate.go @@ -20,16 +20,12 @@ import ( "crypto/x509" "encoding/pem" "errors" - - certificatesv1beta1 "k8s.io/api/certificates/v1beta1" ) // TODO(yue9944882): Remove this helper package once it's copied to k/api // ParseCSR extracts the CSR from the API object and decodes it. -func ParseCSR(obj *certificatesv1beta1.CertificateSigningRequest) (*x509.CertificateRequest, error) { - // extract PEM from request object - pemBytes := obj.Spec.Request +func ParseCSR(pemBytes []byte) (*x509.CertificateRequest, error) { block, _ := pem.Decode(pemBytes) if block == nil || block.Type != "CERTIFICATE REQUEST" { return nil, errors.New("PEM block type must be CERTIFICATE REQUEST") diff --git a/vendor/k8s.io/kubectl/pkg/util/i18n/BUILD b/vendor/k8s.io/kubectl/pkg/util/i18n/BUILD index 014bd09bd84..cfdcb2c1f75 100644 --- a/vendor/k8s.io/kubectl/pkg/util/i18n/BUILD +++ b/vendor/k8s.io/kubectl/pkg/util/i18n/BUILD @@ -9,7 +9,7 @@ go_library( deps = [ "//staging/src/k8s.io/kubectl/pkg/generated:go_default_library", "//vendor/github.com/chai2010/gettext-go/gettext:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubectl/pkg/util/i18n/i18n.go b/vendor/k8s.io/kubectl/pkg/util/i18n/i18n.go index 31e830c6496..721b36ed2ff 100644 --- a/vendor/k8s.io/kubectl/pkg/util/i18n/i18n.go +++ b/vendor/k8s.io/kubectl/pkg/util/i18n/i18n.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubectl/pkg/generated" "github.com/chai2010/gettext-go/gettext" - "k8s.io/klog" + "k8s.io/klog/v2" ) var knownTranslations = map[string][]string{ diff --git a/vendor/k8s.io/kubectl/pkg/util/openapi/BUILD b/vendor/k8s.io/kubectl/pkg/util/openapi/BUILD index 01d237a805d..af2da0065ac 100644 --- a/vendor/k8s.io/kubectl/pkg/util/openapi/BUILD +++ b/vendor/k8s.io/kubectl/pkg/util/openapi/BUILD @@ -15,7 +15,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/client-go/discovery:go_default_library", "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", ], ) @@ -31,7 +31,7 @@ go_test( embed = [":go_default_library"], deps = [ "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", + "//vendor/github.com/googleapis/gnostic/openapiv2:go_default_library", "//vendor/github.com/onsi/ginkgo:go_default_library", "//vendor/github.com/onsi/ginkgo/config:go_default_library", "//vendor/github.com/onsi/ginkgo/types:go_default_library", diff --git a/vendor/k8s.io/kubectl/pkg/util/openapi/openapi.go b/vendor/k8s.io/kubectl/pkg/util/openapi/openapi.go index c8f370b99bf..b5d01db1e2a 100644 --- a/vendor/k8s.io/kubectl/pkg/util/openapi/openapi.go +++ b/vendor/k8s.io/kubectl/pkg/util/openapi/openapi.go @@ -17,7 +17,7 @@ limitations under the License. package openapi import ( - openapi_v2 "github.com/googleapis/gnostic/OpenAPIv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kube-openapi/pkg/util/proto" diff --git a/vendor/k8s.io/kubectl/pkg/util/rbac/BUILD b/vendor/k8s.io/kubectl/pkg/util/rbac/BUILD index c7d531248ef..94e7e86ef34 100644 --- a/vendor/k8s.io/kubectl/pkg/util/rbac/BUILD +++ b/vendor/k8s.io/kubectl/pkg/util/rbac/BUILD @@ -6,7 +6,10 @@ go_library( importmap = "k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/util/rbac", importpath = "k8s.io/kubectl/pkg/util/rbac", visibility = ["//visibility:public"], - deps = ["//staging/src/k8s.io/api/rbac/v1:go_default_library"], + deps = [ + "//staging/src/k8s.io/api/rbac/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + ], ) filegroup( diff --git a/vendor/k8s.io/kubectl/pkg/util/rbac/rbac.go b/vendor/k8s.io/kubectl/pkg/util/rbac/rbac.go index a149a51afb0..b5d1f2d528c 100644 --- a/vendor/k8s.io/kubectl/pkg/util/rbac/rbac.go +++ b/vendor/k8s.io/kubectl/pkg/util/rbac/rbac.go @@ -18,6 +18,7 @@ package rbac import ( rbacv1 "k8s.io/api/rbac/v1" + "k8s.io/apimachinery/pkg/util/sets" "reflect" "strings" ) @@ -42,7 +43,13 @@ func CompactRules(rules []rbacv1.PolicyRule) ([]rbacv1.PolicyRule, error) { if existingRule.Verbs == nil { existingRule.Verbs = []string{} } - existingRule.Verbs = append(existingRule.Verbs, rule.Verbs...) + existingVerbs := sets.NewString(existingRule.Verbs...) + for _, verb := range rule.Verbs { + if !existingVerbs.Has(verb) { + existingRule.Verbs = append(existingRule.Verbs, verb) + } + } + } else { // Copy the rule to accumulate matching simple resource rules into simpleRules[resource] = rule.DeepCopy() diff --git a/vendor/k8s.io/kubectl/pkg/util/templates/markdown.go b/vendor/k8s.io/kubectl/pkg/util/templates/markdown.go index 65ee886d10a..6f2368ad1bf 100644 --- a/vendor/k8s.io/kubectl/pkg/util/templates/markdown.go +++ b/vendor/k8s.io/kubectl/pkg/util/templates/markdown.go @@ -111,28 +111,31 @@ func (r *ASCIIRenderer) TableRow(out *bytes.Buffer, text []byte) func (r *ASCIIRenderer) TableHeaderCell(out *bytes.Buffer, text []byte, align int) { r.fw(out, text) } func (r *ASCIIRenderer) TableCell(out *bytes.Buffer, text []byte, align int) { r.fw(out, text) } func (r *ASCIIRenderer) Footnotes(out *bytes.Buffer, text func() bool) { text() } -func (r *ASCIIRenderer) FootnoteItem(out *bytes.Buffer, name, text []byte, flags int) { r.fw(out, text) } -func (r *ASCIIRenderer) AutoLink(out *bytes.Buffer, link []byte, kind int) { r.fw(out, link) } -func (r *ASCIIRenderer) CodeSpan(out *bytes.Buffer, text []byte) { r.fw(out, text) } -func (r *ASCIIRenderer) DoubleEmphasis(out *bytes.Buffer, text []byte) { r.fw(out, text) } -func (r *ASCIIRenderer) Emphasis(out *bytes.Buffer, text []byte) { r.fw(out, text) } -func (r *ASCIIRenderer) RawHtmlTag(out *bytes.Buffer, text []byte) { r.fw(out, text) } -func (r *ASCIIRenderer) TripleEmphasis(out *bytes.Buffer, text []byte) { r.fw(out, text) } -func (r *ASCIIRenderer) StrikeThrough(out *bytes.Buffer, text []byte) { r.fw(out, text) } -func (r *ASCIIRenderer) FootnoteRef(out *bytes.Buffer, ref []byte, id int) { r.fw(out, ref) } -func (r *ASCIIRenderer) Entity(out *bytes.Buffer, entity []byte) { r.fw(out, entity) } -func (r *ASCIIRenderer) Smartypants(out *bytes.Buffer, text []byte) { r.fw(out, text) } -func (r *ASCIIRenderer) DocumentHeader(out *bytes.Buffer) {} -func (r *ASCIIRenderer) DocumentFooter(out *bytes.Buffer) {} -func (r *ASCIIRenderer) TocHeaderWithAnchor(text []byte, level int, anchor string) {} -func (r *ASCIIRenderer) TocHeader(text []byte, level int) {} -func (r *ASCIIRenderer) TocFinalize() {} +func (r *ASCIIRenderer) FootnoteItem(out *bytes.Buffer, name, text []byte, flags int) { + r.fw(out, text) +} +func (r *ASCIIRenderer) AutoLink(out *bytes.Buffer, link []byte, kind int) { r.fw(out, link) } +func (r *ASCIIRenderer) CodeSpan(out *bytes.Buffer, text []byte) { r.fw(out, text) } +func (r *ASCIIRenderer) DoubleEmphasis(out *bytes.Buffer, text []byte) { r.fw(out, text) } +func (r *ASCIIRenderer) Emphasis(out *bytes.Buffer, text []byte) { r.fw(out, text) } +func (r *ASCIIRenderer) RawHtmlTag(out *bytes.Buffer, text []byte) { r.fw(out, text) } +func (r *ASCIIRenderer) TripleEmphasis(out *bytes.Buffer, text []byte) { r.fw(out, text) } +func (r *ASCIIRenderer) StrikeThrough(out *bytes.Buffer, text []byte) { r.fw(out, text) } +func (r *ASCIIRenderer) FootnoteRef(out *bytes.Buffer, ref []byte, id int) { r.fw(out, ref) } +func (r *ASCIIRenderer) Entity(out *bytes.Buffer, entity []byte) { r.fw(out, entity) } +func (r *ASCIIRenderer) Smartypants(out *bytes.Buffer, text []byte) { r.fw(out, text) } +func (r *ASCIIRenderer) DocumentHeader(out *bytes.Buffer) {} +func (r *ASCIIRenderer) DocumentFooter(out *bytes.Buffer) {} +func (r *ASCIIRenderer) TocHeaderWithAnchor(text []byte, level int, anchor string) {} +func (r *ASCIIRenderer) TocHeader(text []byte, level int) {} +func (r *ASCIIRenderer) TocFinalize() {} func (r *ASCIIRenderer) Table(out *bytes.Buffer, header []byte, body []byte, columnData []int) { r.fw(out, header, body) } func (r *ASCIIRenderer) Link(out *bytes.Buffer, link []byte, title []byte, content []byte) { + out.WriteString(" ") r.fw(out, link) } diff --git a/vendor/k8s.io/kubectl/pkg/util/term/BUILD b/vendor/k8s.io/kubectl/pkg/util/term/BUILD index de7909b4900..91ebe3296e5 100644 --- a/vendor/k8s.io/kubectl/pkg/util/term/BUILD +++ b/vendor/k8s.io/kubectl/pkg/util/term/BUILD @@ -16,9 +16,12 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/client-go/tools/remotecommand:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/interrupt:go_default_library", - "//vendor/github.com/docker/docker/pkg/term:go_default_library", "//vendor/github.com/mitchellh/go-wordwrap:go_default_library", + "//vendor/github.com/moby/term:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], @@ -31,9 +34,15 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/vendor/k8s.io/kubectl/pkg/util/term/resize.go b/vendor/k8s.io/kubectl/pkg/util/term/resize.go index 7ca09a8586b..636b8bef452 100644 --- a/vendor/k8s.io/kubectl/pkg/util/term/resize.go +++ b/vendor/k8s.io/kubectl/pkg/util/term/resize.go @@ -19,7 +19,7 @@ package term import ( "fmt" - "github.com/docker/docker/pkg/term" + "github.com/moby/term" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/remotecommand" ) diff --git a/vendor/k8s.io/kubectl/pkg/util/term/term.go b/vendor/k8s.io/kubectl/pkg/util/term/term.go index 18183c0c967..6bcda59d73d 100644 --- a/vendor/k8s.io/kubectl/pkg/util/term/term.go +++ b/vendor/k8s.io/kubectl/pkg/util/term/term.go @@ -19,8 +19,9 @@ package term import ( "io" "os" + "runtime" - "github.com/docker/docker/pkg/term" + "github.com/moby/term" "k8s.io/kubectl/pkg/util/interrupt" ) @@ -70,6 +71,32 @@ func IsTerminal(i interface{}) bool { return terminal } +// AllowsColorOutput returns true if the specified writer is a terminal and +// the process environment indicates color output is supported and desired. +func AllowsColorOutput(w io.Writer) bool { + if !IsTerminal(w) { + return false + } + + // https://en.wikipedia.org/wiki/Computer_terminal#Dumb_terminals + if os.Getenv("TERM") == "dumb" { + return false + } + + // https://no-color.org/ + if _, nocolor := os.LookupEnv("NO_COLOR"); nocolor { + return false + } + + // On Windows WT_SESSION is set by the modern terminal component. + // Older terminals have poor support for UTF-8, VT escape codes, etc. + if runtime.GOOS == "windows" && os.Getenv("WT_SESSION") == "" { + return false + } + + return true +} + // Safe invokes the provided function and will attempt to ensure that when the // function returns (or a termination signal is sent) that the terminal state // is reset to the condition it was in prior to the function being invoked. If diff --git a/vendor/k8s.io/kubectl/pkg/util/term/term_writer.go b/vendor/k8s.io/kubectl/pkg/util/term/term_writer.go index 2d72d1e4525..1733764fce0 100644 --- a/vendor/k8s.io/kubectl/pkg/util/term/term_writer.go +++ b/vendor/k8s.io/kubectl/pkg/util/term/term_writer.go @@ -20,8 +20,8 @@ import ( "io" "os" - "github.com/docker/docker/pkg/term" wordwrap "github.com/mitchellh/go-wordwrap" + "github.com/moby/term" ) type wordWrapWriter struct { diff --git a/vendor/k8s.io/kubelet/config/v1beta1/BUILD b/vendor/k8s.io/kubelet/config/v1beta1/BUILD index af57c42e360..8cb2ba27c0b 100644 --- a/vendor/k8s.io/kubelet/config/v1beta1/BUILD +++ b/vendor/k8s.io/kubelet/config/v1beta1/BUILD @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", @@ -16,6 +16,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/component-base/config/v1alpha1:go_default_library", ], ) @@ -32,3 +33,10 @@ filegroup( tags = ["automanaged"], visibility = ["//visibility:public"], ) + +go_test( + name = "go_default_test", + srcs = ["register_test.go"], + embed = [":go_default_library"], + deps = ["//staging/src/k8s.io/component-base/config/testing:go_default_library"], +) diff --git a/vendor/k8s.io/kubelet/config/v1beta1/types.go b/vendor/k8s.io/kubelet/config/v1beta1/types.go index d35f2422730..629664e176f 100644 --- a/vendor/k8s.io/kubelet/config/v1beta1/types.go +++ b/vendor/k8s.io/kubelet/config/v1beta1/types.go @@ -19,6 +19,7 @@ package v1beta1 import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1" ) // HairpinMode denotes how the kubelet should configure networking to handle @@ -74,6 +75,12 @@ const ( type KubeletConfiguration struct { metav1.TypeMeta `json:",inline"` + // enableServer enables Kubelet's secured server. + // Note: Kubelet's insecure port is controlled by the readOnlyPort option. + // Dynamic Kubelet Config (beta): If dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. + // Default: true + EnableServer *bool `json:"enableServer,omitempty"` // staticPodPath is the path to the directory containing local (static) pods to // run, or the path to a single static pod file. // Dynamic Kubelet Config (beta): If dynamically updating this field, consider that @@ -171,8 +178,7 @@ type KubeletConfiguration struct { TLSMinVersion string `json:"tlsMinVersion,omitempty"` // rotateCertificates enables client certificate rotation. The Kubelet will request a // new certificate from the certificates.k8s.io API. This requires an approver to approve the - // certificate signing requests. The RotateKubeletClientCertificate feature - // must be enabled. + // certificate signing requests. // Dynamic Kubelet Config (beta): If dynamically updating this field, consider that // disabling it may disrupt the Kubelet's ability to authenticate with the API server // after the current certificate expires. @@ -490,6 +496,11 @@ type KubeletConfiguration struct { // Default: "/etc/resolv.conf" // +optional ResolverConfig string `json:"resolvConf,omitempty"` + // RunOnce causes the Kubelet to check the API server once for pods, + // run those in addition to the pods specified by static pod files, and exit. + // Default: false + // +optional + RunOnce bool `json:"runOnce,omitempty"` // cpuCFSQuota enables CPU CFS quota enforcement for containers that // specify CPU limits. // Dynamic Kubelet Config (beta): If dynamically updating this field, consider that @@ -504,6 +515,13 @@ type KubeletConfiguration struct { // Default: "100ms" // +optional CPUCFSQuotaPeriod *metav1.Duration `json:"cpuCFSQuotaPeriod,omitempty"` + // nodeStatusMaxImages caps the number of images reported in Node.Status.Images. + // Note: If -1 is specified, no cap will be applied. If 0 is specified, no image is returned. + // Dynamic Kubelet Config (beta): If dynamically updating this field, consider that + // different values can be reported on node status. + // Default: 50 + // +optional + NodeStatusMaxImages *int32 `json:"nodeStatusMaxImages,omitempty"` // maxOpenFiles is Number of files that can be opened by Kubelet process. // Dynamic Kubelet Config (beta): If dynamically updating this field, consider that // it may impact the ability of the Kubelet to interact with the node's filesystem. @@ -685,6 +703,12 @@ type KubeletConfiguration struct { // Default: "Watch" // +optional ConfigMapAndSecretChangeDetectionStrategy ResourceChangeDetectionStrategy `json:"configMapAndSecretChangeDetectionStrategy,omitempty"` + // Rootless enables the rootless cgroup manager. + // Requires cgroup v2 and systemd. + // Requires the Rootless feature gate to be enabled. + // Default: false + // +optional + Rootless bool `json:"rootless,omitempty"` /* the following fields are meant for Node Allocatable */ @@ -755,6 +779,37 @@ type KubeletConfiguration struct { // Default: [] // +optional AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"` + // volumePluginDir is the full path of the directory in which to search + // for additional third party volume plugins. + // Dynamic Kubelet Config (beta): If dynamically updating this field, consider that changing + // the volumePluginDir may disrupt workloads relying on third party volume plugins. + // Default: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/" + // +optional + VolumePluginDir string `json:"volumePluginDir,omitempty"` + // providerID, if set, sets the unique id of the instance that an external provider (i.e. cloudprovider) + // can use to identify a specific node. + // Dynamic Kubelet Config (beta): If dynamically updating this field, consider that + // it may impact the ability of the Kubelet to interact with cloud providers. + // Default: "" + // +optional + ProviderID string `json:"providerID,omitempty"` + // kernelMemcgNotification, if set, the kubelet will integrate with the kernel memcg notification + // to determine if memory eviction thresholds are crossed rather than polling. + // Dynamic Kubelet Config (beta): If dynamically updating this field, consider that + // it may impact the way Kubelet interacts with the kernel. + // Default: false + // +optional + KernelMemcgNotification bool `json:"kernelMemcgNotification,omitempty"` + // Logging specifies the options of logging. + // Refer [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information. + // Defaults: + // Format: text + // + optional + Logging componentbaseconfigv1alpha1.LoggingConfiguration `json:"logging,omitempty"` + // enableSystemLogHandler enables system logs via web interface host:port/logs/ + // Default: true + // +optional + EnableSystemLogHandler *bool `json:"enableSystemLogHandler,omitempty"` } type KubeletAuthorizationMode string diff --git a/vendor/k8s.io/kubelet/config/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubelet/config/v1beta1/zz_generated.deepcopy.go index c1dc1d5f56f..fd478f82050 100644 --- a/vendor/k8s.io/kubelet/config/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubelet/config/v1beta1/zz_generated.deepcopy.go @@ -86,6 +86,11 @@ func (in *KubeletAuthorization) DeepCopy() *KubeletAuthorization { func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { *out = *in out.TypeMeta = in.TypeMeta + if in.EnableServer != nil { + in, out := &in.EnableServer, &out.EnableServer + *out = new(bool) + **out = **in + } out.SyncFrequency = in.SyncFrequency out.FileCheckFrequency = in.FileCheckFrequency out.HTTPCheckFrequency = in.HTTPCheckFrequency @@ -185,6 +190,11 @@ func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { *out = new(v1.Duration) **out = **in } + if in.NodeStatusMaxImages != nil { + in, out := &in.NodeStatusMaxImages, &out.NodeStatusMaxImages + *out = new(int32) + **out = **in + } if in.KubeAPIQPS != nil { in, out := &in.KubeAPIQPS, &out.KubeAPIQPS *out = new(int32) @@ -285,6 +295,12 @@ func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { *out = make([]string, len(*in)) copy(*out, *in) } + out.Logging = in.Logging + if in.EnableSystemLogHandler != nil { + in, out := &in.EnableSystemLogHandler, &out.EnableSystemLogHandler + *out = new(bool) + **out = **in + } return } diff --git a/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.pb.go b/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.pb.go index baca61f198a..5f0ff254fe5 100644 --- a/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.pb.go +++ b/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.pb.go @@ -48,9 +48,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type DevicePluginOptions struct { // Indicates if PreStartContainer call is required before each container start - PreStartRequired bool `protobuf:"varint,1,opt,name=pre_start_required,json=preStartRequired,proto3" json:"pre_start_required,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + PreStartRequired bool `protobuf:"varint,1,opt,name=pre_start_required,json=preStartRequired,proto3" json:"pre_start_required,omitempty"` + // Indicates if GetPreferredAllocation is implemented and available for calling + GetPreferredAllocationAvailable bool `protobuf:"varint,2,opt,name=get_preferred_allocation_available,json=getPreferredAllocationAvailable,proto3" json:"get_preferred_allocation_available,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DevicePluginOptions) Reset() { *m = DevicePluginOptions{} } @@ -92,6 +94,13 @@ func (m *DevicePluginOptions) GetPreStartRequired() bool { return false } +func (m *DevicePluginOptions) GetGetPreferredAllocationAvailable() bool { + if m != nil { + return m.GetPreferredAllocationAvailable + } + return false +} + type RegisterRequest struct { // Version of the API the Device Plugin was built against Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` @@ -347,7 +356,7 @@ func (m *NUMANode) GetID() int64 { // Health: "Healthy", // Topology: // Node: -//ID: 1 +// ID: 1 //} type Device struct { // A unique ID assigned by the device plugin used @@ -502,6 +511,212 @@ func (m *PreStartContainerResponse) XXX_DiscardUnknown() { var xxx_messageInfo_PreStartContainerResponse proto.InternalMessageInfo +// PreferredAllocationRequest is passed via a call to GetPreferredAllocation() +// at pod admission time. The device plugin should take the list of +// `available_deviceIDs` and calculate a preferred allocation of size +// 'allocation_size' from them, making sure to include the set of devices +// listed in 'must_include_deviceIDs'. +type PreferredAllocationRequest struct { + ContainerRequests []*ContainerPreferredAllocationRequest `protobuf:"bytes,1,rep,name=container_requests,json=containerRequests,proto3" json:"container_requests,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PreferredAllocationRequest) Reset() { *m = PreferredAllocationRequest{} } +func (*PreferredAllocationRequest) ProtoMessage() {} +func (*PreferredAllocationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{9} +} +func (m *PreferredAllocationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PreferredAllocationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PreferredAllocationRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PreferredAllocationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PreferredAllocationRequest.Merge(m, src) +} +func (m *PreferredAllocationRequest) XXX_Size() int { + return m.Size() +} +func (m *PreferredAllocationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PreferredAllocationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PreferredAllocationRequest proto.InternalMessageInfo + +func (m *PreferredAllocationRequest) GetContainerRequests() []*ContainerPreferredAllocationRequest { + if m != nil { + return m.ContainerRequests + } + return nil +} + +type ContainerPreferredAllocationRequest struct { + // List of available deviceIDs from which to choose a preferred allocation + AvailableDeviceIDs []string `protobuf:"bytes,1,rep,name=available_deviceIDs,json=availableDeviceIDs,proto3" json:"available_deviceIDs,omitempty"` + // List of deviceIDs that must be included in the preferred allocation + MustIncludeDeviceIDs []string `protobuf:"bytes,2,rep,name=must_include_deviceIDs,json=mustIncludeDeviceIDs,proto3" json:"must_include_deviceIDs,omitempty"` + // Number of devices to include in the preferred allocation + AllocationSize int32 `protobuf:"varint,3,opt,name=allocation_size,json=allocationSize,proto3" json:"allocation_size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainerPreferredAllocationRequest) Reset() { *m = ContainerPreferredAllocationRequest{} } +func (*ContainerPreferredAllocationRequest) ProtoMessage() {} +func (*ContainerPreferredAllocationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{10} +} +func (m *ContainerPreferredAllocationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainerPreferredAllocationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainerPreferredAllocationRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ContainerPreferredAllocationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainerPreferredAllocationRequest.Merge(m, src) +} +func (m *ContainerPreferredAllocationRequest) XXX_Size() int { + return m.Size() +} +func (m *ContainerPreferredAllocationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ContainerPreferredAllocationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainerPreferredAllocationRequest proto.InternalMessageInfo + +func (m *ContainerPreferredAllocationRequest) GetAvailableDeviceIDs() []string { + if m != nil { + return m.AvailableDeviceIDs + } + return nil +} + +func (m *ContainerPreferredAllocationRequest) GetMustIncludeDeviceIDs() []string { + if m != nil { + return m.MustIncludeDeviceIDs + } + return nil +} + +func (m *ContainerPreferredAllocationRequest) GetAllocationSize() int32 { + if m != nil { + return m.AllocationSize + } + return 0 +} + +// PreferredAllocationResponse returns a preferred allocation, +// resulting from a PreferredAllocationRequest. +type PreferredAllocationResponse struct { + ContainerResponses []*ContainerPreferredAllocationResponse `protobuf:"bytes,1,rep,name=container_responses,json=containerResponses,proto3" json:"container_responses,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PreferredAllocationResponse) Reset() { *m = PreferredAllocationResponse{} } +func (*PreferredAllocationResponse) ProtoMessage() {} +func (*PreferredAllocationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{11} +} +func (m *PreferredAllocationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PreferredAllocationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PreferredAllocationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PreferredAllocationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PreferredAllocationResponse.Merge(m, src) +} +func (m *PreferredAllocationResponse) XXX_Size() int { + return m.Size() +} +func (m *PreferredAllocationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PreferredAllocationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PreferredAllocationResponse proto.InternalMessageInfo + +func (m *PreferredAllocationResponse) GetContainerResponses() []*ContainerPreferredAllocationResponse { + if m != nil { + return m.ContainerResponses + } + return nil +} + +type ContainerPreferredAllocationResponse struct { + DeviceIDs []string `protobuf:"bytes,1,rep,name=deviceIDs,proto3" json:"deviceIDs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainerPreferredAllocationResponse) Reset() { *m = ContainerPreferredAllocationResponse{} } +func (*ContainerPreferredAllocationResponse) ProtoMessage() {} +func (*ContainerPreferredAllocationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{12} +} +func (m *ContainerPreferredAllocationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainerPreferredAllocationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainerPreferredAllocationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ContainerPreferredAllocationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainerPreferredAllocationResponse.Merge(m, src) +} +func (m *ContainerPreferredAllocationResponse) XXX_Size() int { + return m.Size() +} +func (m *ContainerPreferredAllocationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ContainerPreferredAllocationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainerPreferredAllocationResponse proto.InternalMessageInfo + +func (m *ContainerPreferredAllocationResponse) GetDeviceIDs() []string { + if m != nil { + return m.DeviceIDs + } + return nil +} + // - Allocate is expected to be called during pod creation since allocation // failures for any container would result in pod startup failure. // - Allocate allows kubelet to exposes additional artifacts in a pod's @@ -517,7 +732,7 @@ type AllocateRequest struct { func (m *AllocateRequest) Reset() { *m = AllocateRequest{} } func (*AllocateRequest) ProtoMessage() {} func (*AllocateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{9} + return fileDescriptor_00212fb1f9d3bf1c, []int{13} } func (m *AllocateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -562,7 +777,7 @@ type ContainerAllocateRequest struct { func (m *ContainerAllocateRequest) Reset() { *m = ContainerAllocateRequest{} } func (*ContainerAllocateRequest) ProtoMessage() {} func (*ContainerAllocateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{10} + return fileDescriptor_00212fb1f9d3bf1c, []int{14} } func (m *ContainerAllocateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -615,7 +830,7 @@ type AllocateResponse struct { func (m *AllocateResponse) Reset() { *m = AllocateResponse{} } func (*AllocateResponse) ProtoMessage() {} func (*AllocateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{11} + return fileDescriptor_00212fb1f9d3bf1c, []int{15} } func (m *AllocateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -667,7 +882,7 @@ type ContainerAllocateResponse struct { func (m *ContainerAllocateResponse) Reset() { *m = ContainerAllocateResponse{} } func (*ContainerAllocateResponse) ProtoMessage() {} func (*ContainerAllocateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{12} + return fileDescriptor_00212fb1f9d3bf1c, []int{16} } func (m *ContainerAllocateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -740,7 +955,7 @@ type Mount struct { func (m *Mount) Reset() { *m = Mount{} } func (*Mount) ProtoMessage() {} func (*Mount) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{13} + return fileDescriptor_00212fb1f9d3bf1c, []int{17} } func (m *Mount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -808,7 +1023,7 @@ type DeviceSpec struct { func (m *DeviceSpec) Reset() { *m = DeviceSpec{} } func (*DeviceSpec) ProtoMessage() {} func (*DeviceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{14} + return fileDescriptor_00212fb1f9d3bf1c, []int{18} } func (m *DeviceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -868,6 +1083,10 @@ func init() { proto.RegisterType((*Device)(nil), "v1beta1.Device") proto.RegisterType((*PreStartContainerRequest)(nil), "v1beta1.PreStartContainerRequest") proto.RegisterType((*PreStartContainerResponse)(nil), "v1beta1.PreStartContainerResponse") + proto.RegisterType((*PreferredAllocationRequest)(nil), "v1beta1.PreferredAllocationRequest") + proto.RegisterType((*ContainerPreferredAllocationRequest)(nil), "v1beta1.ContainerPreferredAllocationRequest") + proto.RegisterType((*PreferredAllocationResponse)(nil), "v1beta1.PreferredAllocationResponse") + proto.RegisterType((*ContainerPreferredAllocationResponse)(nil), "v1beta1.ContainerPreferredAllocationResponse") proto.RegisterType((*AllocateRequest)(nil), "v1beta1.AllocateRequest") proto.RegisterType((*ContainerAllocateRequest)(nil), "v1beta1.ContainerAllocateRequest") proto.RegisterType((*AllocateResponse)(nil), "v1beta1.AllocateResponse") @@ -881,59 +1100,70 @@ func init() { func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 822 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xdd, 0x8e, 0xdb, 0x44, - 0x14, 0x8e, 0x93, 0x6e, 0xe2, 0x9c, 0xa4, 0xbb, 0xd9, 0xd9, 0x52, 0x79, 0xdd, 0x62, 0x85, 0x41, - 0xc0, 0x22, 0xb5, 0x29, 0x9b, 0x4a, 0x2d, 0xea, 0x05, 0x22, 0x34, 0x0b, 0xac, 0x44, 0xb7, 0xd1, - 0x2c, 0x15, 0x37, 0x48, 0x91, 0xe3, 0x4c, 0x63, 0x0b, 0x67, 0xc6, 0x78, 0x26, 0x91, 0x72, 0xc7, - 0x05, 0x0f, 0xc0, 0x43, 0xf0, 0x18, 0x3c, 0x40, 0x2f, 0xb9, 0xe4, 0x92, 0x86, 0x17, 0x41, 0x1e, - 0x7b, 0x6c, 0xcb, 0xcd, 0x6e, 0x41, 0xea, 0x9d, 0xcf, 0xcf, 0x77, 0xe6, 0x9b, 0x73, 0xce, 0x7c, - 0x86, 0xb6, 0x1b, 0x05, 0x83, 0x28, 0xe6, 0x92, 0xa3, 0xd6, 0xfa, 0x74, 0x46, 0xa5, 0x7b, 0x6a, - 0xdf, 0x5f, 0x04, 0xd2, 0x5f, 0xcd, 0x06, 0x1e, 0x5f, 0x3e, 0x58, 0xf0, 0x05, 0x7f, 0xa0, 0xe2, - 0xb3, 0xd5, 0x4b, 0x65, 0x29, 0x43, 0x7d, 0xa5, 0x38, 0xfc, 0x14, 0x8e, 0xc6, 0x74, 0x1d, 0x78, - 0x74, 0x12, 0xae, 0x16, 0x01, 0x7b, 0x1e, 0xc9, 0x80, 0x33, 0x81, 0xee, 0x01, 0x8a, 0x62, 0x3a, - 0x15, 0xd2, 0x8d, 0xe5, 0x34, 0xa6, 0x3f, 0xaf, 0x82, 0x98, 0xce, 0x2d, 0xa3, 0x6f, 0x9c, 0x98, - 0xa4, 0x17, 0xc5, 0xf4, 0x32, 0x09, 0x90, 0xcc, 0x8f, 0x7f, 0x37, 0xe0, 0x80, 0xd0, 0x45, 0x20, - 0x24, 0x8d, 0x13, 0x27, 0x15, 0x12, 0x59, 0xd0, 0x5a, 0xd3, 0x58, 0x04, 0x9c, 0x29, 0x58, 0x9b, - 0x68, 0x13, 0xd9, 0x60, 0x52, 0x36, 0x8f, 0x78, 0xc0, 0xa4, 0x55, 0x57, 0xa1, 0xdc, 0x46, 0x1f, - 0xc2, 0xcd, 0x98, 0x0a, 0xbe, 0x8a, 0x3d, 0x3a, 0x65, 0xee, 0x92, 0x5a, 0x0d, 0x95, 0xd0, 0xd5, - 0xce, 0x0b, 0x77, 0x49, 0xd1, 0x23, 0x68, 0xf1, 0x94, 0xa7, 0x75, 0xa3, 0x6f, 0x9c, 0x74, 0x86, - 0x77, 0x07, 0xd9, 0xed, 0x07, 0x3b, 0xee, 0x42, 0x74, 0x32, 0x6e, 0xc1, 0xde, 0xd9, 0x32, 0x92, - 0x1b, 0x3c, 0x82, 0x5b, 0xdf, 0x05, 0x42, 0x8e, 0xd8, 0xfc, 0x07, 0x57, 0x7a, 0x3e, 0xa1, 0x22, - 0xe2, 0x4c, 0x50, 0xf4, 0x29, 0xb4, 0xe6, 0xaa, 0x80, 0xb0, 0x8c, 0x7e, 0xe3, 0xa4, 0x33, 0x3c, - 0xa8, 0x14, 0x26, 0x3a, 0x8e, 0x1f, 0x43, 0xf7, 0x7b, 0x1e, 0xf1, 0x90, 0x2f, 0x36, 0xe7, 0xec, - 0x25, 0x47, 0x9f, 0xc0, 0x1e, 0xe3, 0xf3, 0x1c, 0x78, 0x98, 0x03, 0x2f, 0x5e, 0x3c, 0x1b, 0x5d, - 0xf0, 0x39, 0x25, 0x69, 0x1c, 0xdb, 0x60, 0x6a, 0x17, 0xda, 0x87, 0xfa, 0xf9, 0x58, 0xb5, 0xa7, - 0x41, 0xea, 0xc1, 0x18, 0x7b, 0xd0, 0x4c, 0xcf, 0x29, 0x45, 0xda, 0x49, 0x04, 0xdd, 0x86, 0xa6, - 0x4f, 0xdd, 0x50, 0xfa, 0x59, 0xc7, 0x32, 0x0b, 0x9d, 0x82, 0x29, 0x33, 0x1a, 0xaa, 0x55, 0x9d, - 0xe1, 0x7b, 0xf9, 0xc9, 0x65, 0x7e, 0x24, 0x4f, 0xc3, 0x4f, 0xc0, 0x9a, 0x64, 0x03, 0x7c, 0xca, - 0x99, 0x74, 0x03, 0x56, 0x0c, 0xcd, 0x01, 0xc8, 0x2e, 0x78, 0x3e, 0x4e, 0xaf, 0xd2, 0x26, 0x25, - 0x0f, 0xbe, 0x03, 0xc7, 0x3b, 0xb0, 0x69, 0xf7, 0xb0, 0x07, 0x07, 0xa3, 0x30, 0xe4, 0x9e, 0x2b, - 0xa9, 0xae, 0x37, 0x01, 0xe4, 0xe9, 0x3c, 0xb5, 0x46, 0x54, 0x48, 0xdd, 0xa2, 0x0f, 0x72, 0xa2, - 0x79, 0xa9, 0x0a, 0x9c, 0x1c, 0x7a, 0x15, 0x82, 0x22, 0x61, 0x7f, 0x55, 0xfa, 0x5b, 0xd9, 0x2f, - 0xa0, 0x57, 0x40, 0xb2, 0x91, 0x5f, 0xc2, 0x51, 0x99, 0x61, 0xea, 0xd5, 0x14, 0xf1, 0x75, 0x14, - 0xd3, 0x54, 0x82, 0xbc, 0x6a, 0x23, 0x04, 0xfe, 0xb5, 0x01, 0xc7, 0x57, 0x22, 0xd0, 0x97, 0x70, - 0x83, 0xb2, 0xb5, 0x3e, 0xe3, 0xde, 0xdb, 0xcf, 0x18, 0x9c, 0xb1, 0xb5, 0x38, 0x63, 0x32, 0xde, - 0x10, 0x85, 0x44, 0x1f, 0x43, 0x73, 0xc9, 0x57, 0x4c, 0x0a, 0xab, 0xae, 0x6a, 0xec, 0xe7, 0x35, - 0x9e, 0x25, 0x6e, 0x92, 0x45, 0xd1, 0xfd, 0x62, 0x9f, 0x1b, 0x2a, 0xf1, 0xa8, 0xb2, 0xcf, 0x97, - 0x11, 0xf5, 0xf2, 0x9d, 0x46, 0x2f, 0xa0, 0xe3, 0x32, 0xc6, 0xa5, 0xab, 0xdf, 0x56, 0x02, 0x79, - 0xf8, 0x1f, 0xf8, 0x8d, 0x0a, 0x54, 0x4a, 0xb3, 0x5c, 0xc7, 0x7e, 0x0c, 0xed, 0xfc, 0x02, 0xa8, - 0x07, 0x8d, 0x9f, 0xe8, 0x26, 0xdb, 0xec, 0xe4, 0x13, 0xdd, 0x82, 0xbd, 0xb5, 0x1b, 0xae, 0x68, - 0xb6, 0xd9, 0xa9, 0xf1, 0xa4, 0xfe, 0xb9, 0x61, 0x7f, 0x01, 0xbd, 0x6a, 0xe5, 0xff, 0x83, 0xc7, - 0x3e, 0xec, 0xa9, 0x7e, 0xa0, 0x8f, 0x60, 0xbf, 0x18, 0x72, 0xe4, 0x4a, 0x3f, 0xc3, 0xdf, 0xcc, - 0xbd, 0x13, 0x57, 0xfa, 0xe8, 0x0e, 0xb4, 0x7d, 0x2e, 0x64, 0x9a, 0x91, 0x29, 0x53, 0xe2, 0xd0, - 0xc1, 0x98, 0xba, 0xf3, 0x29, 0x67, 0x61, 0xfa, 0xd4, 0x4c, 0x62, 0x26, 0x8e, 0xe7, 0x2c, 0xdc, - 0xe0, 0x18, 0xa0, 0x68, 0xe8, 0x3b, 0x39, 0xae, 0x0f, 0x9d, 0x88, 0xc6, 0xcb, 0x40, 0x08, 0x35, - 0x8b, 0x54, 0x06, 0xcb, 0xae, 0xe1, 0xd7, 0xd0, 0x4d, 0x35, 0x37, 0x56, 0xfd, 0x41, 0x8f, 0xc0, - 0xd4, 0x1a, 0x8c, 0xac, 0x7c, 0x68, 0x15, 0x59, 0xb6, 0x8b, 0x55, 0x49, 0xa5, 0xb0, 0x36, 0xfc, - 0xa3, 0x0e, 0xdd, 0xb2, 0x6c, 0xa2, 0x6f, 0xe1, 0xf6, 0x37, 0x54, 0xee, 0xfa, 0x2b, 0x54, 0xc0, - 0xf6, 0xb5, 0xba, 0x8b, 0x6b, 0x68, 0x04, 0xdd, 0xb2, 0xce, 0xbe, 0x81, 0x7f, 0x3f, 0xb7, 0x77, - 0xc9, 0x31, 0xae, 0x7d, 0x66, 0xa0, 0x11, 0x98, 0x7a, 0xdd, 0x4a, 0xb7, 0xaa, 0xbc, 0x7c, 0xfb, - 0x78, 0x47, 0x44, 0x17, 0x41, 0x3f, 0xc2, 0xe1, 0x1b, 0xa2, 0x85, 0x0a, 0xf5, 0xb9, 0x4a, 0x0c, - 0x6d, 0x7c, 0x5d, 0x8a, 0xae, 0xfe, 0xd5, 0xdd, 0x57, 0xaf, 0x1d, 0xe3, 0xaf, 0xd7, 0x4e, 0xed, - 0x97, 0xad, 0x63, 0xbc, 0xda, 0x3a, 0xc6, 0x9f, 0x5b, 0xc7, 0xf8, 0x7b, 0xeb, 0x18, 0xbf, 0xfd, - 0xe3, 0xd4, 0x66, 0x4d, 0xf5, 0x97, 0x7d, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0x60, - 0xe7, 0xf8, 0xaa, 0x07, 0x00, 0x00, + // 995 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5f, 0x6f, 0x1b, 0x45, + 0x10, 0xcf, 0xd9, 0x75, 0x6c, 0x8f, 0xdd, 0xfc, 0xd9, 0x84, 0xc8, 0xb9, 0x04, 0x93, 0x6e, 0x0a, + 0x0d, 0x52, 0xe3, 0x10, 0x17, 0xb5, 0x28, 0x0f, 0x08, 0x83, 0x03, 0x44, 0xd0, 0xd4, 0xba, 0x50, + 0xf1, 0x00, 0xc2, 0x3a, 0x9f, 0x37, 0xf6, 0x89, 0xf3, 0xee, 0x71, 0xbb, 0xb6, 0xe4, 0x4a, 0x48, + 0x3c, 0xf0, 0x01, 0xfa, 0x1d, 0xe0, 0x2b, 0xf0, 0x1d, 0xfa, 0xc8, 0x23, 0x8f, 0x34, 0x7c, 0x11, + 0x74, 0xbb, 0xb7, 0x77, 0xa7, 0xcb, 0xc5, 0x04, 0xa9, 0x6f, 0xde, 0x99, 0xf9, 0xcd, 0x9f, 0xdf, + 0x8c, 0x67, 0x0e, 0xaa, 0xb6, 0xef, 0xb6, 0xfc, 0x80, 0x09, 0x86, 0xca, 0xb3, 0xe3, 0x01, 0x11, + 0xf6, 0xb1, 0x79, 0x38, 0x72, 0xc5, 0x78, 0x3a, 0x68, 0x39, 0x6c, 0x72, 0x34, 0x62, 0x23, 0x76, + 0x24, 0xf5, 0x83, 0xe9, 0xa5, 0x7c, 0xc9, 0x87, 0xfc, 0xa5, 0x70, 0xf8, 0xa5, 0x01, 0x1b, 0x5d, + 0x32, 0x73, 0x1d, 0xd2, 0xf3, 0xa6, 0x23, 0x97, 0x3e, 0xf3, 0x85, 0xcb, 0x28, 0x47, 0x0f, 0x01, + 0xf9, 0x01, 0xe9, 0x73, 0x61, 0x07, 0xa2, 0x1f, 0x90, 0x9f, 0xa6, 0x6e, 0x40, 0x86, 0x0d, 0x63, + 0xcf, 0x38, 0xa8, 0x58, 0x6b, 0x7e, 0x40, 0x2e, 0x42, 0x85, 0x15, 0xc9, 0xd1, 0x57, 0x80, 0x47, + 0x44, 0xf4, 0xfd, 0x80, 0x5c, 0x92, 0x20, 0x20, 0xc3, 0xbe, 0xed, 0x79, 0xcc, 0xb1, 0x43, 0x57, + 0x7d, 0x7b, 0x66, 0xbb, 0x9e, 0x3d, 0xf0, 0x48, 0xa3, 0x20, 0xd1, 0xef, 0x8c, 0x88, 0xe8, 0x69, + 0xc3, 0x4e, 0x6c, 0xd7, 0xd1, 0x66, 0xf8, 0x77, 0x03, 0x56, 0x2d, 0x32, 0x72, 0xb9, 0x20, 0x41, + 0x18, 0x81, 0x70, 0x81, 0x1a, 0x50, 0x9e, 0x91, 0x80, 0xbb, 0x8c, 0xca, 0x1c, 0xaa, 0x96, 0x7e, + 0x22, 0x13, 0x2a, 0x84, 0x0e, 0x7d, 0xe6, 0x52, 0x21, 0x03, 0x54, 0xad, 0xf8, 0x8d, 0xf6, 0xe1, + 0x6e, 0x40, 0x38, 0x9b, 0x06, 0x0e, 0xe9, 0x53, 0x7b, 0x42, 0x1a, 0x45, 0x69, 0x50, 0xd7, 0xc2, + 0x73, 0x7b, 0x42, 0xd0, 0x63, 0x28, 0x33, 0x55, 0x74, 0xe3, 0xce, 0x9e, 0x71, 0x50, 0x6b, 0xef, + 0xb6, 0x22, 0x2e, 0x5b, 0x39, 0xc4, 0x58, 0xda, 0x18, 0x97, 0xa1, 0x74, 0x3a, 0xf1, 0xc5, 0x1c, + 0x77, 0x60, 0xf3, 0x6b, 0x97, 0x8b, 0x0e, 0x1d, 0x7e, 0x6b, 0x0b, 0x67, 0x6c, 0x11, 0xee, 0x33, + 0xca, 0x09, 0x7a, 0x1f, 0xca, 0x43, 0xe9, 0x80, 0x37, 0x8c, 0xbd, 0xe2, 0x41, 0xad, 0xbd, 0x9a, + 0x71, 0x6c, 0x69, 0x3d, 0x7e, 0x02, 0xf5, 0x6f, 0x98, 0xcf, 0x3c, 0x36, 0x9a, 0x9f, 0xd1, 0x4b, + 0x86, 0x1e, 0x40, 0x89, 0xb2, 0x61, 0x0c, 0x5c, 0x8f, 0x81, 0xe7, 0xcf, 0x9f, 0x76, 0xce, 0xd9, + 0x90, 0x58, 0x4a, 0x8f, 0x4d, 0xa8, 0x68, 0x11, 0x5a, 0x81, 0xc2, 0x59, 0x57, 0xd2, 0x53, 0xb4, + 0x0a, 0x6e, 0x17, 0x3b, 0xb0, 0xac, 0xe2, 0xa4, 0x34, 0xd5, 0x50, 0x83, 0xb6, 0x60, 0x79, 0x4c, + 0x6c, 0x4f, 0x8c, 0x23, 0xc6, 0xa2, 0x17, 0x3a, 0x86, 0x8a, 0x88, 0xd2, 0x90, 0x54, 0xd5, 0xda, + 0x6f, 0xc5, 0x91, 0xd3, 0xf9, 0x59, 0xb1, 0x19, 0x3e, 0x81, 0x46, 0x2f, 0x9a, 0x86, 0xcf, 0x18, + 0x15, 0xb6, 0x4b, 0x93, 0xa6, 0x35, 0x01, 0xa2, 0x02, 0xcf, 0xba, 0xaa, 0x94, 0xaa, 0x95, 0x92, + 0xe0, 0x1d, 0xd8, 0xce, 0xc1, 0x2a, 0xf6, 0xf0, 0x1c, 0xcc, 0x9c, 0x29, 0xd1, 0xae, 0xbf, 0x03, + 0xe4, 0x68, 0x88, 0x1c, 0x4f, 0xc2, 0x85, 0x66, 0xeb, 0x61, 0x9c, 0x73, 0xec, 0xf5, 0x66, 0x4f, + 0xd6, 0xba, 0x93, 0x49, 0x9b, 0xe3, 0x3f, 0x0c, 0xd8, 0xbf, 0x05, 0x14, 0x1d, 0xc1, 0x46, 0x3c, + 0xdc, 0x7d, 0x55, 0x57, 0x52, 0x28, 0x8a, 0x55, 0x5d, 0xad, 0x41, 0x1f, 0xc2, 0xd6, 0x64, 0xca, + 0x45, 0xdf, 0xa5, 0x8e, 0x37, 0x1d, 0xa6, 0x31, 0x05, 0x89, 0xd9, 0x0c, 0xb5, 0x67, 0x4a, 0x99, + 0xa0, 0x1e, 0xc0, 0x6a, 0xea, 0xef, 0xc4, 0xdd, 0x17, 0x6a, 0x8e, 0x4b, 0xd6, 0x4a, 0x22, 0xbe, + 0x70, 0x5f, 0x10, 0xfc, 0x33, 0xec, 0xe4, 0x66, 0x1b, 0xcd, 0xe3, 0x0f, 0xb0, 0x91, 0xe6, 0x4c, + 0x49, 0x35, 0x69, 0x87, 0xb7, 0x24, 0x4d, 0xa1, 0x2c, 0xe4, 0x64, 0x1b, 0xc6, 0x71, 0x17, 0xee, + 0xdf, 0x06, 0x8b, 0x76, 0xa1, 0x9a, 0x25, 0x2b, 0x11, 0x60, 0x07, 0x56, 0x23, 0x0c, 0xd1, 0x3c, + 0xf7, 0x16, 0x34, 0xfb, 0xde, 0xf5, 0xbc, 0x33, 0xf0, 0xbc, 0x0e, 0x9f, 0x40, 0xe3, 0x26, 0xf3, + 0xff, 0x9c, 0xda, 0x11, 0xac, 0x25, 0x90, 0xa8, 0xa4, 0x8b, 0x45, 0xd4, 0xe2, 0x45, 0x29, 0x2e, + 0xe0, 0xf3, 0xd7, 0x22, 0x6c, 0xdf, 0x88, 0x40, 0x9f, 0xc0, 0x1d, 0x42, 0x67, 0x0b, 0x66, 0x3e, + 0x8b, 0x68, 0x9d, 0xd2, 0x19, 0x3f, 0xa5, 0x22, 0x98, 0x5b, 0x12, 0x89, 0xde, 0x83, 0xe5, 0x09, + 0x9b, 0x52, 0xa1, 0xa6, 0xaf, 0xd6, 0x5e, 0x89, 0x7d, 0x3c, 0x0d, 0xc5, 0x56, 0xa4, 0x45, 0x87, + 0xc9, 0x1e, 0x2b, 0x4a, 0xc3, 0x8d, 0xcc, 0x1e, 0xbb, 0xf0, 0x89, 0x13, 0xef, 0x32, 0xf4, 0x1c, + 0x6a, 0x36, 0xa5, 0x4c, 0xd8, 0x7a, 0xa7, 0x86, 0x90, 0x47, 0xb7, 0xc8, 0xaf, 0x93, 0xa0, 0x54, + 0x9a, 0x69, 0x3f, 0xe6, 0x13, 0xa8, 0xc6, 0x05, 0xa0, 0x35, 0x28, 0xfe, 0x48, 0xe6, 0xd1, 0x46, + 0x0b, 0x7f, 0xa2, 0x4d, 0x28, 0xcd, 0x6c, 0x6f, 0x4a, 0xa2, 0x8d, 0xa6, 0x1e, 0x27, 0x85, 0x8f, + 0x0c, 0xf3, 0x63, 0x58, 0xcb, 0x7a, 0xfe, 0x3f, 0x78, 0x3c, 0x86, 0x92, 0xe4, 0x03, 0xbd, 0x0b, + 0x2b, 0x49, 0x93, 0x7d, 0x5b, 0x8c, 0x23, 0xfc, 0xdd, 0x58, 0xda, 0xb3, 0xc5, 0x18, 0xed, 0x40, + 0x75, 0xcc, 0xb8, 0x50, 0x16, 0xd1, 0x45, 0x0a, 0x05, 0x5a, 0x19, 0x10, 0x7b, 0xd8, 0x67, 0xd4, + 0x53, 0x2b, 0xb6, 0x62, 0x55, 0x42, 0xc1, 0x33, 0xea, 0xcd, 0x71, 0x00, 0x90, 0x10, 0xfa, 0x46, + 0xc2, 0xed, 0x41, 0xcd, 0x27, 0xc1, 0xc4, 0xe5, 0x5c, 0xf6, 0x42, 0x9d, 0xbf, 0xb4, 0xa8, 0xfd, + 0x39, 0xd4, 0xd5, 0xad, 0x0d, 0x24, 0x3f, 0xe8, 0x31, 0x54, 0xf4, 0xed, 0x45, 0x8d, 0xb8, 0x69, + 0x99, 0x73, 0x6c, 0x26, 0xa3, 0xa2, 0x4e, 0xe0, 0x52, 0xfb, 0xb7, 0x22, 0xd4, 0xd3, 0xe7, 0x12, + 0x7d, 0x09, 0x5b, 0x5f, 0x10, 0x91, 0xf7, 0x69, 0x91, 0x01, 0x9b, 0x0b, 0xef, 0x2d, 0x5e, 0x42, + 0x1d, 0xa8, 0xa7, 0xef, 0xeb, 0x35, 0xfc, 0xdb, 0xf1, 0x3b, 0xef, 0x0c, 0xe3, 0xa5, 0x0f, 0x0c, + 0x44, 0x64, 0x32, 0x39, 0x4b, 0x09, 0xed, 0xc7, 0xe0, 0x9b, 0x17, 0xbd, 0x79, 0x7f, 0xb1, 0x91, + 0x0e, 0x84, 0x3a, 0x50, 0xd1, 0x53, 0x9d, 0x22, 0x2f, 0xb3, 0x60, 0xcc, 0xed, 0x1c, 0x4d, 0xec, + 0xe2, 0x7b, 0x58, 0xbf, 0x76, 0x13, 0xd1, 0xbd, 0x74, 0xfc, 0xdc, 0x5b, 0x6b, 0xe2, 0x45, 0x26, + 0xda, 0xfb, 0xa7, 0xbb, 0xaf, 0x5e, 0x37, 0x8d, 0xbf, 0x5e, 0x37, 0x97, 0x7e, 0xb9, 0x6a, 0x1a, + 0xaf, 0xae, 0x9a, 0xc6, 0x9f, 0x57, 0x4d, 0xe3, 0xef, 0xab, 0xa6, 0xf1, 0xf2, 0x9f, 0xe6, 0xd2, + 0x60, 0x59, 0x7e, 0x12, 0x3e, 0xfa, 0x37, 0x00, 0x00, 0xff, 0xff, 0x86, 0x3c, 0xb9, 0x8e, 0x57, + 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1027,6 +1257,12 @@ type DevicePluginClient interface { // Whenever a Device state change or a Device disappears, ListAndWatch // returns the new list ListAndWatch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (DevicePlugin_ListAndWatchClient, error) + // GetPreferredAllocation returns a preferred set of devices to allocate + // from a list of available ones. The resulting preferred allocation is not + // guaranteed to be the allocation ultimately performed by the + // devicemanager. It is only designed to help the devicemanager make a more + // informed allocation decision when possible. + GetPreferredAllocation(ctx context.Context, in *PreferredAllocationRequest, opts ...grpc.CallOption) (*PreferredAllocationResponse, error) // Allocate is called during container creation so that the Device // Plugin can run device specific operations and instruct Kubelet // of the steps to make the Device available in the container @@ -1086,6 +1322,15 @@ func (x *devicePluginListAndWatchClient) Recv() (*ListAndWatchResponse, error) { return m, nil } +func (c *devicePluginClient) GetPreferredAllocation(ctx context.Context, in *PreferredAllocationRequest, opts ...grpc.CallOption) (*PreferredAllocationResponse, error) { + out := new(PreferredAllocationResponse) + err := c.cc.Invoke(ctx, "/v1beta1.DevicePlugin/GetPreferredAllocation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *devicePluginClient) Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) { out := new(AllocateResponse) err := c.cc.Invoke(ctx, "/v1beta1.DevicePlugin/Allocate", in, out, opts...) @@ -1113,6 +1358,12 @@ type DevicePluginServer interface { // Whenever a Device state change or a Device disappears, ListAndWatch // returns the new list ListAndWatch(*Empty, DevicePlugin_ListAndWatchServer) error + // GetPreferredAllocation returns a preferred set of devices to allocate + // from a list of available ones. The resulting preferred allocation is not + // guaranteed to be the allocation ultimately performed by the + // devicemanager. It is only designed to help the devicemanager make a more + // informed allocation decision when possible. + GetPreferredAllocation(context.Context, *PreferredAllocationRequest) (*PreferredAllocationResponse, error) // Allocate is called during container creation so that the Device // Plugin can run device specific operations and instruct Kubelet // of the steps to make the Device available in the container @@ -1133,6 +1384,9 @@ func (*UnimplementedDevicePluginServer) GetDevicePluginOptions(ctx context.Conte func (*UnimplementedDevicePluginServer) ListAndWatch(req *Empty, srv DevicePlugin_ListAndWatchServer) error { return status.Errorf(codes.Unimplemented, "method ListAndWatch not implemented") } +func (*UnimplementedDevicePluginServer) GetPreferredAllocation(ctx context.Context, req *PreferredAllocationRequest) (*PreferredAllocationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPreferredAllocation not implemented") +} func (*UnimplementedDevicePluginServer) Allocate(ctx context.Context, req *AllocateRequest) (*AllocateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") } @@ -1183,6 +1437,24 @@ func (x *devicePluginListAndWatchServer) Send(m *ListAndWatchResponse) error { return x.ServerStream.SendMsg(m) } +func _DevicePlugin_GetPreferredAllocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PreferredAllocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DevicePluginServer).GetPreferredAllocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1beta1.DevicePlugin/GetPreferredAllocation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DevicePluginServer).GetPreferredAllocation(ctx, req.(*PreferredAllocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _DevicePlugin_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AllocateRequest) if err := dec(in); err != nil { @@ -1227,6 +1499,10 @@ var _DevicePlugin_serviceDesc = grpc.ServiceDesc{ MethodName: "GetDevicePluginOptions", Handler: _DevicePlugin_GetDevicePluginOptions_Handler, }, + { + MethodName: "GetPreferredAllocation", + Handler: _DevicePlugin_GetPreferredAllocation_Handler, + }, { MethodName: "Allocate", Handler: _DevicePlugin_Allocate_Handler, @@ -1266,6 +1542,16 @@ func (m *DevicePluginOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.GetPreferredAllocationAvailable { + i-- + if m.GetPreferredAllocationAvailable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } if m.PreStartRequired { i-- if m.PreStartRequired { @@ -1564,6 +1850,158 @@ func (m *PreStartContainerResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *PreferredAllocationRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PreferredAllocationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PreferredAllocationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContainerRequests) > 0 { + for iNdEx := len(m.ContainerRequests) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ContainerRequests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ContainerPreferredAllocationRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerPreferredAllocationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContainerPreferredAllocationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AllocationSize != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.AllocationSize)) + i-- + dAtA[i] = 0x18 + } + if len(m.MustIncludeDeviceIDs) > 0 { + for iNdEx := len(m.MustIncludeDeviceIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MustIncludeDeviceIDs[iNdEx]) + copy(dAtA[i:], m.MustIncludeDeviceIDs[iNdEx]) + i = encodeVarintApi(dAtA, i, uint64(len(m.MustIncludeDeviceIDs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.AvailableDeviceIDs) > 0 { + for iNdEx := len(m.AvailableDeviceIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AvailableDeviceIDs[iNdEx]) + copy(dAtA[i:], m.AvailableDeviceIDs[iNdEx]) + i = encodeVarintApi(dAtA, i, uint64(len(m.AvailableDeviceIDs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *PreferredAllocationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PreferredAllocationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PreferredAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContainerResponses) > 0 { + for iNdEx := len(m.ContainerResponses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ContainerResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ContainerPreferredAllocationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerPreferredAllocationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContainerPreferredAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DeviceIDs) > 0 { + for iNdEx := len(m.DeviceIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DeviceIDs[iNdEx]) + copy(dAtA[i:], m.DeviceIDs[iNdEx]) + i = encodeVarintApi(dAtA, i, uint64(len(m.DeviceIDs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *AllocateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1870,6 +2308,9 @@ func (m *DevicePluginOptions) Size() (n int) { if m.PreStartRequired { n += 2 } + if m.GetPreferredAllocationAvailable { + n += 2 + } return n } @@ -1994,6 +2435,75 @@ func (m *PreStartContainerResponse) Size() (n int) { return n } +func (m *PreferredAllocationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ContainerRequests) > 0 { + for _, e := range m.ContainerRequests { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *ContainerPreferredAllocationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AvailableDeviceIDs) > 0 { + for _, s := range m.AvailableDeviceIDs { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.MustIncludeDeviceIDs) > 0 { + for _, s := range m.MustIncludeDeviceIDs { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if m.AllocationSize != 0 { + n += 1 + sovApi(uint64(m.AllocationSize)) + } + return n +} + +func (m *PreferredAllocationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ContainerResponses) > 0 { + for _, e := range m.ContainerResponses { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *ContainerPreferredAllocationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DeviceIDs) > 0 { + for _, s := range m.DeviceIDs { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + func (m *AllocateRequest) Size() (n int) { if m == nil { return 0 @@ -2129,6 +2639,7 @@ func (this *DevicePluginOptions) String() string { } s := strings.Join([]string{`&DevicePluginOptions{`, `PreStartRequired:` + fmt.Sprintf("%v", this.PreStartRequired) + `,`, + `GetPreferredAllocationAvailable:` + fmt.Sprintf("%v", this.GetPreferredAllocationAvailable) + `,`, `}`, }, "") return s @@ -2226,6 +2737,58 @@ func (this *PreStartContainerResponse) String() string { }, "") return s } +func (this *PreferredAllocationRequest) String() string { + if this == nil { + return "nil" + } + repeatedStringForContainerRequests := "[]*ContainerPreferredAllocationRequest{" + for _, f := range this.ContainerRequests { + repeatedStringForContainerRequests += strings.Replace(f.String(), "ContainerPreferredAllocationRequest", "ContainerPreferredAllocationRequest", 1) + "," + } + repeatedStringForContainerRequests += "}" + s := strings.Join([]string{`&PreferredAllocationRequest{`, + `ContainerRequests:` + repeatedStringForContainerRequests + `,`, + `}`, + }, "") + return s +} +func (this *ContainerPreferredAllocationRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerPreferredAllocationRequest{`, + `AvailableDeviceIDs:` + fmt.Sprintf("%v", this.AvailableDeviceIDs) + `,`, + `MustIncludeDeviceIDs:` + fmt.Sprintf("%v", this.MustIncludeDeviceIDs) + `,`, + `AllocationSize:` + fmt.Sprintf("%v", this.AllocationSize) + `,`, + `}`, + }, "") + return s +} +func (this *PreferredAllocationResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForContainerResponses := "[]*ContainerPreferredAllocationResponse{" + for _, f := range this.ContainerResponses { + repeatedStringForContainerResponses += strings.Replace(f.String(), "ContainerPreferredAllocationResponse", "ContainerPreferredAllocationResponse", 1) + "," + } + repeatedStringForContainerResponses += "}" + s := strings.Join([]string{`&PreferredAllocationResponse{`, + `ContainerResponses:` + repeatedStringForContainerResponses + `,`, + `}`, + }, "") + return s +} +func (this *ContainerPreferredAllocationResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerPreferredAllocationResponse{`, + `DeviceIDs:` + fmt.Sprintf("%v", this.DeviceIDs) + `,`, + `}`, + }, "") + return s +} func (this *AllocateRequest) String() string { if this == nil { return "nil" @@ -2390,6 +2953,26 @@ func (m *DevicePluginOptions) Unmarshal(dAtA []byte) error { } } m.PreStartRequired = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GetPreferredAllocationAvailable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.GetPreferredAllocationAvailable = bool(v != 0) default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -3189,6 +3772,401 @@ func (m *PreStartContainerResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *PreferredAllocationRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PreferredAllocationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PreferredAllocationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerRequests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerRequests = append(m.ContainerRequests, &ContainerPreferredAllocationRequest{}) + if err := m.ContainerRequests[len(m.ContainerRequests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerPreferredAllocationRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerPreferredAllocationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerPreferredAllocationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AvailableDeviceIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AvailableDeviceIDs = append(m.AvailableDeviceIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MustIncludeDeviceIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MustIncludeDeviceIDs = append(m.MustIncludeDeviceIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocationSize", wireType) + } + m.AllocationSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AllocationSize |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PreferredAllocationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PreferredAllocationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PreferredAllocationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerResponses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerResponses = append(m.ContainerResponses, &ContainerPreferredAllocationResponse{}) + if err := m.ContainerResponses[len(m.ContainerResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerPreferredAllocationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerPreferredAllocationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerPreferredAllocationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeviceIDs = append(m.DeviceIDs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *AllocateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto b/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto index c7e676e4788..b03b754616b 100644 --- a/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto +++ b/vendor/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto @@ -25,8 +25,10 @@ service Registration { } message DevicePluginOptions { - // Indicates if PreStartContainer call is required before each container start + // Indicates if PreStartContainer call is required before each container start bool pre_start_required = 1; + // Indicates if GetPreferredAllocation is implemented and available for calling + bool get_preferred_allocation_available = 2; } message RegisterRequest { @@ -37,8 +39,8 @@ message RegisterRequest { string endpoint = 2; // Schedulable resource name. As of now it's expected to be a DNS Label string resource_name = 3; - // Options to be communicated with Device Manager - DevicePluginOptions options = 4; + // Options to be communicated with Device Manager + DevicePluginOptions options = 4; } message Empty { @@ -47,7 +49,7 @@ message Empty { // DevicePlugin is the service advertised by Device Plugins service DevicePlugin { // GetDevicePluginOptions returns options to be communicated with Device - // Manager + // Manager rpc GetDevicePluginOptions(Empty) returns (DevicePluginOptions) {} // ListAndWatch returns a stream of List of Devices @@ -55,14 +57,21 @@ service DevicePlugin { // returns the new list rpc ListAndWatch(Empty) returns (stream ListAndWatchResponse) {} + // GetPreferredAllocation returns a preferred set of devices to allocate + // from a list of available ones. The resulting preferred allocation is not + // guaranteed to be the allocation ultimately performed by the + // devicemanager. It is only designed to help the devicemanager make a more + // informed allocation decision when possible. + rpc GetPreferredAllocation(PreferredAllocationRequest) returns (PreferredAllocationResponse) {} + // Allocate is called during container creation so that the Device // Plugin can run device specific operations and instruct Kubelet // of the steps to make the Device available in the container rpc Allocate(AllocateRequest) returns (AllocateResponse) {} - // PreStartContainer is called, if indicated by Device Plugin during registeration phase, - // before each container start. Device plugin can run device specific operations - // such as resetting the device before making devices available to the container + // PreStartContainer is called, if indicated by Device Plugin during registeration phase, + // before each container start. Device plugin can run device specific operations + // such as resetting the device before making devices available to the container rpc PreStartContainer(PreStartContainerRequest) returns (PreStartContainerResponse) {} } @@ -78,7 +87,7 @@ message TopologyInfo { } message NUMANode { - int64 ID = 1; + int64 ID = 1; } /* E.g: @@ -87,7 +96,7 @@ message NUMANode { * Health: "Healthy", * Topology: * Node: - ID: 1 +* ID: 1 *} */ message Device { // A unique ID assigned by the device plugin used @@ -105,13 +114,41 @@ message Device { // - PreStartContainer allows Device Plugin to run device specific operations on // the Devices requested message PreStartContainerRequest { - repeated string devicesIDs = 1; + repeated string devicesIDs = 1; } // PreStartContainerResponse will be send by plugin in response to PreStartContainerRequest message PreStartContainerResponse { } +// PreferredAllocationRequest is passed via a call to GetPreferredAllocation() +// at pod admission time. The device plugin should take the list of +// `available_deviceIDs` and calculate a preferred allocation of size +// 'allocation_size' from them, making sure to include the set of devices +// listed in 'must_include_deviceIDs'. +message PreferredAllocationRequest { + repeated ContainerPreferredAllocationRequest container_requests = 1; +} + +message ContainerPreferredAllocationRequest { + // List of available deviceIDs from which to choose a preferred allocation + repeated string available_deviceIDs = 1; + // List of deviceIDs that must be included in the preferred allocation + repeated string must_include_deviceIDs = 2; + // Number of devices to include in the preferred allocation + int32 allocation_size = 3; +} + +// PreferredAllocationResponse returns a preferred allocation, +// resulting from a PreferredAllocationRequest. +message PreferredAllocationResponse { + repeated ContainerPreferredAllocationResponse container_responses = 1; +} + +message ContainerPreferredAllocationResponse { + repeated string deviceIDs = 1; +} + // - Allocate is expected to be called during pod creation since allocation // failures for any container would result in pod startup failure. // - Allocate allows kubelet to exposes additional artifacts in a pod's @@ -162,13 +199,13 @@ message Mount { // DeviceSpec specifies a host device to mount into a container. message DeviceSpec { - // Path of the device within the container. - string container_path = 1; - // Path of the device on the host. - string host_path = 2; - // Cgroups permissions of the device, candidates are one or more of - // * r - allows container to read from the specified device. - // * w - allows container to write to the specified device. - // * m - allows container to create device files that do not yet exist. - string permissions = 3; + // Path of the device within the container. + string container_path = 1; + // Path of the device on the host. + string host_path = 2; + // Cgroups permissions of the device, candidates are one or more of + // * r - allows container to read from the specified device. + // * w - allows container to write to the specified device. + // * m - allows container to create device files that do not yet exist. + string permissions = 3; } diff --git a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/BUILD b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/BUILD index 37550a9f744..e7d4168f7b7 100644 --- a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/BUILD @@ -12,28 +12,27 @@ go_library( "//cmd/cloud-controller-manager/app/config:go_default_library", "//cmd/cloud-controller-manager/app/options:go_default_library", "//cmd/controller-manager/app:go_default_library", - "//pkg/controller/cloud:go_default_library", - "//pkg/controller/route:go_default_library", - "//pkg/controller/service:go_default_library", - "//pkg/features:go_default_library", - "//pkg/util/configz:go_default_library", - "//pkg/util/flag:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/healthz:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/term:go_default_library", "//staging/src/k8s.io/client-go/tools/leaderelection:go_default_library", "//staging/src/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", + "//staging/src/k8s.io/cloud-provider/controllers/node:go_default_library", + "//staging/src/k8s.io/cloud-provider/controllers/nodelifecycle:go_default_library", + "//staging/src/k8s.io/cloud-provider/controllers/route:go_default_library", + "//staging/src/k8s.io/cloud-provider/controllers/service:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/cli/globalflag:go_default_library", + "//staging/src/k8s.io/component-base/configz:go_default_library", + "//staging/src/k8s.io/component-base/term:go_default_library", "//staging/src/k8s.io/component-base/version:go_default_library", "//staging/src/k8s.io/component-base/version/verflag:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/controllermanager.go b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/controllermanager.go index d2ddb5319fe..31f9c123bbe 100644 --- a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/controllermanager.go +++ b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/controllermanager.go @@ -31,20 +31,19 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/server" "k8s.io/apiserver/pkg/server/healthz" - "k8s.io/apiserver/pkg/util/term" "k8s.io/client-go/tools/leaderelection" "k8s.io/client-go/tools/leaderelection/resourcelock" cloudprovider "k8s.io/cloud-provider" cliflag "k8s.io/component-base/cli/flag" "k8s.io/component-base/cli/globalflag" + "k8s.io/component-base/configz" + "k8s.io/component-base/term" "k8s.io/component-base/version" "k8s.io/component-base/version/verflag" - "k8s.io/klog" + "k8s.io/klog/v2" cloudcontrollerconfig "k8s.io/kubernetes/cmd/cloud-controller-manager/app/config" "k8s.io/kubernetes/cmd/cloud-controller-manager/app/options" genericcontrollermanager "k8s.io/kubernetes/cmd/controller-manager/app" - "k8s.io/kubernetes/pkg/util/configz" - utilflag "k8s.io/kubernetes/pkg/util/flag" ) const ( @@ -67,7 +66,7 @@ func NewCloudControllerManagerCommand() *cobra.Command { the cloud specific control loops shipped with Kubernetes.`, Run: func(cmd *cobra.Command, args []string) { verflag.PrintAndExitIfRequested() - utilflag.PrintFlags(cmd.Flags()) + cliflag.PrintFlags(cmd.Flags()) c, err := s.Config(KnownControllers(), ControllersDisabledByDefault.List()) if err != nil { @@ -81,6 +80,14 @@ the cloud specific control loops shipped with Kubernetes.`, } }, + Args: func(cmd *cobra.Command, args []string) error { + for _, arg := range args { + if len(arg) > 0 { + return fmt.Errorf("%q does not take any arguments, got %q", cmd.CommandPath(), args) + } + } + return nil + }, } fs := cmd.Flags() diff --git a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/core.go b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/core.go index 3f9e9bba92a..e7673f94a66 100644 --- a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/core.go +++ b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/core.go @@ -27,20 +27,26 @@ import ( "strings" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + cloudnodecontroller "k8s.io/cloud-provider/controllers/node" + cloudnodelifecyclecontroller "k8s.io/cloud-provider/controllers/nodelifecycle" + routecontroller "k8s.io/cloud-provider/controllers/route" + servicecontroller "k8s.io/cloud-provider/controllers/service" + "k8s.io/klog/v2" cloudcontrollerconfig "k8s.io/kubernetes/cmd/cloud-controller-manager/app/config" - cloudcontrollers "k8s.io/kubernetes/pkg/controller/cloud" - routecontroller "k8s.io/kubernetes/pkg/controller/route" - servicecontroller "k8s.io/kubernetes/pkg/controller/service" netutils "k8s.io/utils/net" utilfeature "k8s.io/apiserver/pkg/util/feature" - kubefeatures "k8s.io/kubernetes/pkg/features" +) + +const ( + // IPv6DualStack enables ipv6 dual stack feature + // Original copy from pkg/features/kube_features.go + IPv6DualStack = "IPv6DualStack" ) func startCloudNodeController(ctx *cloudcontrollerconfig.CompletedConfig, cloud cloudprovider.Interface, stopCh <-chan struct{}) (http.Handler, bool, error) { // Start the CloudNodeController - nodeController, err := cloudcontrollers.NewCloudNodeController( + nodeController, err := cloudnodecontroller.NewCloudNodeController( ctx.SharedInformers.Core().V1().Nodes(), // cloud node controller uses existing cluster role from node-controller ctx.ClientBuilder.ClientOrDie("node-controller"), @@ -59,7 +65,7 @@ func startCloudNodeController(ctx *cloudcontrollerconfig.CompletedConfig, cloud func startCloudNodeLifecycleController(ctx *cloudcontrollerconfig.CompletedConfig, cloud cloudprovider.Interface, stopCh <-chan struct{}) (http.Handler, bool, error) { // Start the cloudNodeLifecycleController - cloudNodeLifecycleController, err := cloudcontrollers.NewCloudNodeLifecycleController( + cloudNodeLifecycleController, err := cloudnodelifecyclecontroller.NewCloudNodeLifecycleController( ctx.SharedInformers.Core().V1().Nodes(), // cloud node lifecycle controller uses existing cluster role from node-controller ctx.ClientBuilder.ClientOrDie("node-controller"), @@ -84,6 +90,7 @@ func startServiceController(ctx *cloudcontrollerconfig.CompletedConfig, cloud cl ctx.SharedInformers.Core().V1().Services(), ctx.SharedInformers.Core().V1().Nodes(), ctx.ComponentConfig.KubeCloudShared.ClusterName, + utilfeature.DefaultFeatureGate, ) if err != nil { // This error shouldn't fail. It lives like this as a legacy. @@ -116,7 +123,7 @@ func startRouteController(ctx *cloudcontrollerconfig.CompletedConfig, cloud clou } // failure: more than one cidr and dual stack is not enabled - if len(clusterCIDRs) > 1 && !utilfeature.DefaultFeatureGate.Enabled(kubefeatures.IPv6DualStack) { + if len(clusterCIDRs) > 1 && !utilfeature.DefaultFeatureGate.Enabled(IPv6DualStack) { return nil, false, fmt.Errorf("len of ClusterCIDRs==%v and dualstack feature is not enabled", len(clusterCIDRs)) } diff --git a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/options/BUILD b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/options/BUILD index 0728040189f..5cd74e9a922 100644 --- a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/options/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/options/BUILD @@ -16,10 +16,8 @@ go_library( "//cmd/cloud-controller-manager/app/apis/config/v1alpha1:go_default_library", "//cmd/cloud-controller-manager/app/config:go_default_library", "//cmd/controller-manager/app/options:go_default_library", - "//pkg/api/legacyscheme:go_default_library", "//pkg/controller:go_default_library", "//pkg/features:go_default_library", - "//pkg/master/ports:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", @@ -27,12 +25,13 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/options/options.go b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/options/options.go index 197ad31d0dd..0b09c74fb21 100644 --- a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/options/options.go +++ b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/options/options.go @@ -29,20 +29,19 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/informers" clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" v1core "k8s.io/client-go/kubernetes/typed/core/v1" restclient "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/record" + ports "k8s.io/cloud-provider" cliflag "k8s.io/component-base/cli/flag" - "k8s.io/klog" ccmconfig "k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config" ccmconfigscheme "k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config/scheme" ccmconfigv1alpha1 "k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config/v1alpha1" cloudcontrollerconfig "k8s.io/kubernetes/cmd/cloud-controller-manager/app/config" cmoptions "k8s.io/kubernetes/cmd/controller-manager/app/options" - "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/controller" - "k8s.io/kubernetes/pkg/master/ports" // add the kubernetes feature gates _ "k8s.io/kubernetes/pkg/features" @@ -267,8 +266,7 @@ func (o *CloudControllerManagerOptions) Config(allControllers, disabledByDefault func createRecorder(kubeClient clientset.Interface, userAgent string) record.EventRecorder { eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) - // TODO: remove dependence on the legacyscheme - return eventBroadcaster.NewRecorder(legacyscheme.Scheme, v1.EventSource{Component: userAgent}) + return eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: userAgent}) } diff --git a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/BUILD b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/BUILD index c78ceeaf588..a430b26c94a 100644 --- a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/BUILD @@ -9,8 +9,6 @@ go_library( importpath = "k8s.io/kubernetes/cmd/controller-manager/app", visibility = ["//visibility:public"], deps = [ - "//pkg/api/legacyscheme:go_default_library", - "//pkg/util/configz:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/filters:go_default_library", @@ -21,10 +19,12 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/server/mux:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/routes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/component-base/config:go_default_library", + "//staging/src/k8s.io/component-base/configz:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/helper.go b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/helper.go index ac3a9fcb4d3..1807a38cc8a 100644 --- a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/helper.go +++ b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/helper.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" clientset "k8s.io/client-go/kubernetes" - "k8s.io/klog" + "k8s.io/klog/v2" ) // WaitForAPIServer waits for the API Server's /healthz endpoint to report "ok" with timeout. diff --git a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/options/BUILD b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/options/BUILD index f567e0aaae9..12bb664efbd 100644 --- a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/options/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/options/BUILD @@ -12,12 +12,12 @@ go_library( importpath = "k8s.io/kubernetes/cmd/controller-manager/app/options", visibility = ["//visibility:public"], deps = [ - "//pkg/client/leaderelectionconfig:go_default_library", "//pkg/controller/apis/config:go_default_library", "//pkg/controller/service/config:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/config:go_default_library", + "//staging/src/k8s.io/component-base/config/options:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/options/generic.go b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/options/generic.go index 7488ea34b9c..aff299a1961 100644 --- a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/options/generic.go +++ b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/options/generic.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" cliflag "k8s.io/component-base/cli/flag" - "k8s.io/kubernetes/pkg/client/leaderelectionconfig" + "k8s.io/component-base/config/options" kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" ) @@ -62,7 +62,7 @@ func (o *GenericControllerManagerConfigurationOptions) AddFlags(fss *cliflag.Nam "named 'foo', '-foo' disables the controller named 'foo'.\nAll controllers: %s\nDisabled-by-default controllers: %s", strings.Join(allControllers, ", "), strings.Join(disabledByDefaultControllers, ", "))) - leaderelectionconfig.BindFlags(&o.LeaderElection, genericfs) + options.BindLeaderElectionFlags(&o.LeaderElection, genericfs) } // ApplyTo fills up generic config with options. diff --git a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/serve.go b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/serve.go index 15c3ba031b8..da49af3afdd 100644 --- a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/serve.go +++ b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/serve.go @@ -27,21 +27,21 @@ import ( "k8s.io/apiserver/pkg/server/healthz" "k8s.io/apiserver/pkg/server/mux" "k8s.io/apiserver/pkg/server/routes" + "k8s.io/client-go/kubernetes/scheme" componentbaseconfig "k8s.io/component-base/config" + "k8s.io/component-base/configz" "k8s.io/component-base/metrics/legacyregistry" _ "k8s.io/component-base/metrics/prometheus/workqueue" // for workqueue metric registration - "k8s.io/kubernetes/pkg/api/legacyscheme" - "k8s.io/kubernetes/pkg/util/configz" ) // BuildHandlerChain builds a handler chain with a base handler and CompletedConfig. func BuildHandlerChain(apiHandler http.Handler, authorizationInfo *apiserver.AuthorizationInfo, authenticationInfo *apiserver.AuthenticationInfo) http.Handler { requestInfoResolver := &apirequest.RequestInfoFactory{} - failedHandler := genericapifilters.Unauthorized(legacyscheme.Codecs, false) + failedHandler := genericapifilters.Unauthorized(scheme.Codecs) handler := apiHandler if authorizationInfo != nil { - handler = genericapifilters.WithAuthorization(apiHandler, authorizationInfo.Authorizer, legacyscheme.Codecs) + handler = genericapifilters.WithAuthorization(apiHandler, authorizationInfo.Authorizer, scheme.Codecs) } if authenticationInfo != nil { handler = genericapifilters.WithAuthentication(handler, authenticationInfo.Authenticator, failedHandler, nil) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/BUILD index 513a69a5c5f..4f47775adfe 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/BUILD @@ -25,10 +25,8 @@ go_library( "//pkg/master/controller/crdregistration:go_default_library", "//pkg/master/reconcilers:go_default_library", "//pkg/master/tunneler:go_default_library", - "//pkg/registry/cachesize:go_default_library", "//pkg/registry/rbac/rest:go_default_library", "//pkg/serviceaccount:go_default_library", - "//pkg/util/flag:go_default_library", "//staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1:go_default_library", "//staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", "//staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver:go_default_library", @@ -54,17 +52,17 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/storage/etcd3/preflight:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flowcontrol:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/term:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/keyutil:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/cli/globalflag:go_default_library", - "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/workqueue:go_default_library", + "//staging/src/k8s.io/component-base/term:go_default_library", "//staging/src/k8s.io/component-base/version:go_default_library", "//staging/src/k8s.io/component-base/version/verflag:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1:go_default_library", @@ -76,10 +74,16 @@ go_library( "//staging/src/k8s.io/kube-aggregator/pkg/client/informers/externalversions/apiregistration/v1:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/controllers/autoregister:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) +go_test( + name = "go_default_test", + srcs = ["server_test.go"], + embed = [":go_default_library"], +) + filegroup( name = "package-srcs", srcs = glob(["**"]), @@ -97,9 +101,3 @@ filegroup( tags = ["automanaged"], visibility = ["//visibility:public"], ) - -go_test( - name = "go_default_test", - srcs = ["server_test.go"], - embed = [":go_default_library"], -) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go index cf073846fc7..5b22406bdf4 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go @@ -21,12 +21,11 @@ package app import ( "fmt" - "io/ioutil" "net/http" "strings" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" apiextensionsinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -95,28 +94,16 @@ func createAggregatorConfig( return nil, err } - var certBytes, keyBytes []byte - if len(commandOptions.ProxyClientCertFile) > 0 && len(commandOptions.ProxyClientKeyFile) > 0 { - certBytes, err = ioutil.ReadFile(commandOptions.ProxyClientCertFile) - if err != nil { - return nil, err - } - keyBytes, err = ioutil.ReadFile(commandOptions.ProxyClientKeyFile) - if err != nil { - return nil, err - } - } - aggregatorConfig := &aggregatorapiserver.Config{ GenericConfig: &genericapiserver.RecommendedConfig{ Config: genericConfig, SharedInformerFactory: externalInformers, }, ExtraConfig: aggregatorapiserver.ExtraConfig{ - ProxyClientCert: certBytes, - ProxyClientKey: keyBytes, - ServiceResolver: serviceResolver, - ProxyTransport: proxyTransport, + ProxyClientCertFile: commandOptions.ProxyClientCertFile, + ProxyClientKeyFile: commandOptions.ProxyClientKeyFile, + ServiceResolver: serviceResolver, + ProxyTransport: proxyTransport, }, } @@ -252,6 +239,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{ {Group: "extensions", Version: "v1beta1"}: {group: 17900, version: 1}, // to my knowledge, nothing below here collides {Group: "apps", Version: "v1"}: {group: 17800, version: 15}, + {Group: "events.k8s.io", Version: "v1"}: {group: 17750, version: 15}, {Group: "events.k8s.io", Version: "v1beta1"}: {group: 17750, version: 5}, {Group: "authentication.k8s.io", Version: "v1"}: {group: 17700, version: 15}, {Group: "authentication.k8s.io", Version: "v1beta1"}: {group: 17700, version: 9}, @@ -263,6 +251,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{ {Group: "batch", Version: "v1"}: {group: 17400, version: 15}, {Group: "batch", Version: "v1beta1"}: {group: 17400, version: 9}, {Group: "batch", Version: "v2alpha1"}: {group: 17400, version: 9}, + {Group: "certificates.k8s.io", Version: "v1"}: {group: 17300, version: 15}, {Group: "certificates.k8s.io", Version: "v1beta1"}: {group: 17300, version: 9}, {Group: "networking.k8s.io", Version: "v1"}: {group: 17200, version: 15}, {Group: "networking.k8s.io", Version: "v1beta1"}: {group: 17200, version: 9}, @@ -283,7 +272,6 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{ {Group: "scheduling.k8s.io", Version: "v1alpha1"}: {group: 16600, version: 9}, {Group: "coordination.k8s.io", Version: "v1"}: {group: 16500, version: 15}, {Group: "coordination.k8s.io", Version: "v1beta1"}: {group: 16500, version: 9}, - {Group: "auditregistration.k8s.io", Version: "v1alpha1"}: {group: 16400, version: 1}, {Group: "node.k8s.io", Version: "v1alpha1"}: {group: 16300, version: 1}, {Group: "node.k8s.io", Version: "v1beta1"}: {group: 16300, version: 9}, {Group: "discovery.k8s.io", Version: "v1beta1"}: {group: 16200, version: 12}, diff --git a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/BUILD index b833a85aeba..3e8edb7302e 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/BUILD @@ -28,11 +28,13 @@ go_library( "//staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/options:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/cli/globalflag:go_default_library", + "//staging/src/k8s.io/component-base/logs:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/apiserver/scheme:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", @@ -59,12 +61,13 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/apiserver/plugin/pkg/audit/buffered:go_default_library", - "//staging/src/k8s.io/apiserver/plugin/pkg/audit/dynamic:go_default_library", "//staging/src/k8s.io/apiserver/plugin/pkg/audit/truncate:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/cli/globalflag:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", + "//staging/src/k8s.io/component-base/logs:go_default_library", + "//staging/src/k8s.io/component-base/metrics:go_default_library", "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/github.com/google/go-cmp/cmp/cmpopts:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", diff --git a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/options.go b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/options.go index e64604758db..1434cc181b4 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/options.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/options.go @@ -26,6 +26,8 @@ import ( genericoptions "k8s.io/apiserver/pkg/server/options" "k8s.io/apiserver/pkg/storage/storagebackend" cliflag "k8s.io/component-base/cli/flag" + "k8s.io/component-base/logs" + "k8s.io/component-base/metrics" api "k8s.io/kubernetes/pkg/apis/core" _ "k8s.io/kubernetes/pkg/features" // add the kubernetes feature gates kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options" @@ -49,6 +51,8 @@ type ServerRunOptions struct { CloudProvider *kubeoptions.CloudProviderOptions APIEnablement *genericoptions.APIEnablementOptions EgressSelector *genericoptions.EgressSelectorOptions + Metrics *metrics.Options + Logs *logs.Options AllowPrivileged bool EnableLogsHandler bool @@ -97,6 +101,8 @@ func NewServerRunOptions() *ServerRunOptions { CloudProvider: kubeoptions.NewCloudProviderOptions(), APIEnablement: genericoptions.NewAPIEnablementOptions(), EgressSelector: genericoptions.NewEgressSelectorOptions(), + Metrics: metrics.NewOptions(), + Logs: logs.NewOptions(), EnableLogsHandler: true, EventTTL: 1 * time.Hour, @@ -117,7 +123,6 @@ func NewServerRunOptions() *ServerRunOptions { string(api.NodeExternalDNS), string(api.NodeExternalIP), }, - EnableHTTPS: true, HTTPTimeout: time.Duration(5) * time.Second, }, ServiceNodePortRange: kubeoptions.DefaultServiceNodePortRange, @@ -145,15 +150,8 @@ func (s *ServerRunOptions) Flags() (fss cliflag.NamedFlagSets) { s.APIEnablement.AddFlags(fss.FlagSet("API enablement")) s.EgressSelector.AddFlags(fss.FlagSet("egress selector")) s.Admission.AddFlags(fss.FlagSet("admission")) - - // TODO(RainbowMango): move it to genericoptions before next flag comes. - mfs := fss.FlagSet("metrics") - mfs.StringVar(&s.ShowHiddenMetricsForVersion, "show-hidden-metrics-for-version", s.ShowHiddenMetricsForVersion, - "The previous version for which you want to show hidden metrics. "+ - "Only the previous minor version is meaningful, other values will not be allowed. "+ - "The format is ., e.g.: '1.16'. "+ - "The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, "+ - "rather than being surprised when they are permanently removed in the release after that.") + s.Metrics.AddFlags(fss.FlagSet("metrics")) + s.Logs.AddFlags(fss.FlagSet("logs")) // Note: the weird ""+ in below lines seems to be the only way to get gofmt to // arrange these text blocks sensibly. Grrr. @@ -198,15 +196,16 @@ func (s *ServerRunOptions) Flags() (fss cliflag.NamedFlagSets) { // TODO (khenidak) change documentation as we move IPv6DualStack feature from ALPHA to BETA fs.StringVar(&s.ServiceClusterIPRanges, "service-cluster-ip-range", s.ServiceClusterIPRanges, ""+ "A CIDR notation IP range from which to assign service cluster IPs. This must not "+ - "overlap with any IP ranges assigned to nodes for pods.") + "overlap with any IP ranges assigned to nodes or pods.") fs.Var(&s.ServiceNodePortRange, "service-node-port-range", ""+ "A port range to reserve for services with NodePort visibility. "+ "Example: '30000-32767'. Inclusive at both ends of the range.") // Kubelet related flags: - fs.BoolVar(&s.KubeletConfig.EnableHTTPS, "kubelet-https", s.KubeletConfig.EnableHTTPS, - "Use https for kubelet connections.") + kubeletHTTPS := true + fs.BoolVar(&kubeletHTTPS, "kubelet-https", kubeletHTTPS, "Use https for kubelet connections.") + fs.MarkDeprecated("kubelet-https", "API Server connections to kubelets always use https. This flag will be removed in 1.22.") fs.StringSliceVar(&s.KubeletConfig.PreferredAddressTypes, "kubelet-preferred-address-types", s.KubeletConfig.PreferredAddressTypes, "List of the preferred NodeAddressTypes to use for kubelet connections.") diff --git a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/validation.go b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/validation.go index 4f94e438d00..25519a67832 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/validation.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/validation.go @@ -23,8 +23,8 @@ import ( "strings" apiextensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" + genericfeatures "k8s.io/apiserver/pkg/features" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/component-base/metrics" aggregatorscheme "k8s.io/kube-aggregator/pkg/apiserver/scheme" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/features" @@ -35,6 +35,8 @@ import ( // validateClusterIPFlags is expected to be called after Complete() func validateClusterIPFlags(options *ServerRunOptions) []error { var errs []error + // maxCIDRBits is used to define the maximum CIDR size for the cluster ip(s) + const maxCIDRBits = 20 // validate that primary has been processed by user provided values or it has been defaulted if options.PrimaryServiceClusterIPRange.IP == nil { @@ -48,9 +50,8 @@ func validateClusterIPFlags(options *ServerRunOptions) []error { // Complete() expected to have set Primary* and Secondary* // primary CIDR validation - var ones, bits = options.PrimaryServiceClusterIPRange.Mask.Size() - if bits-ones > 20 { - errs = append(errs, errors.New("specified --service-cluster-ip-range is too large")) + if err := validateMaxCIDRRange(options.PrimaryServiceClusterIPRange, maxCIDRBits, "--service-cluster-ip-range"); err != nil { + errs = append(errs, err) } // Secondary IP validation @@ -74,18 +75,26 @@ func validateClusterIPFlags(options *ServerRunOptions) []error { errs = append(errs, errors.New("--service-cluster-ip-range and --secondary-service-cluster-ip-range must be of different IP family")) } - // should be smallish sized cidr, this thing is kept in etcd - // bigger cidr (specially those offered by IPv6) will add no value - // significantly increase snapshotting time. - var ones, bits = options.SecondaryServiceClusterIPRange.Mask.Size() - if bits-ones > 20 { - errs = append(errs, errors.New("specified --secondary-service-cluster-ip-range is too large")) + if err := validateMaxCIDRRange(options.SecondaryServiceClusterIPRange, maxCIDRBits, "--secondary-service-cluster-ip-range"); err != nil { + errs = append(errs, err) } } return errs } +func validateMaxCIDRRange(cidr net.IPNet, maxCIDRBits int, cidrFlag string) error { + // Should be smallish sized cidr, this thing is kept in etcd + // bigger cidr (specially those offered by IPv6) will add no value + // significantly increase snapshotting time. + var ones, bits = cidr.Mask.Size() + if bits-ones > maxCIDRBits { + return fmt.Errorf("specified %s is too large; for %d-bit addresses, the mask must be >= %d", cidrFlag, bits, bits-maxCIDRBits) + } + + return nil +} + func validateServiceNodePort(options *ServerRunOptions) []error { var errs []error @@ -127,6 +136,25 @@ func validateTokenRequest(options *ServerRunOptions) []error { return errs } +func validateAPIPriorityAndFairness(options *ServerRunOptions) []error { + if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIPriorityAndFairness) && options.GenericServerRunOptions.EnablePriorityAndFairness { + // We need the alpha API enabled. There are only a few ways to turn it on + enabledAPIString := options.APIEnablement.RuntimeConfig.String() + switch { + case strings.Contains(enabledAPIString, "api/all=true"): + return nil + case strings.Contains(enabledAPIString, "api/alpha=true"): + return nil + case strings.Contains(enabledAPIString, "flowcontrol.apiserver.k8s.io/v1alpha1=true"): + return nil + default: + return []error{fmt.Errorf("enabling APIPriorityAndFairness requires --runtime-confg=flowcontrol.apiserver.k8s.io/v1alpha1=true to enable the required API")} + } + } + + return nil +} + // Validate checks ServerRunOptions and return a slice of found errs. func (s *ServerRunOptions) Validate() []error { var errs []error @@ -136,6 +164,7 @@ func (s *ServerRunOptions) Validate() []error { errs = append(errs, s.Etcd.Validate()...) errs = append(errs, validateClusterIPFlags(s)...) errs = append(errs, validateServiceNodePort(s)...) + errs = append(errs, validateAPIPriorityAndFairness(s)...) errs = append(errs, s.SecureServing.Validate()...) errs = append(errs, s.Authentication.Validate()...) errs = append(errs, s.Authorization.Validate()...) @@ -144,7 +173,8 @@ func (s *ServerRunOptions) Validate() []error { errs = append(errs, s.InsecureServing.Validate()...) errs = append(errs, s.APIEnablement.Validate(legacyscheme.Scheme, apiextensionsapiserver.Scheme, aggregatorscheme.Scheme)...) errs = append(errs, validateTokenRequest(s)...) - errs = append(errs, metrics.ValidateShowHiddenMetricsVersion(s.ShowHiddenMetricsForVersion)...) + errs = append(errs, s.Metrics.Validate()...) + errs = append(errs, s.Logs.Validate()...) return errs } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go index 2d8cd217cf4..8ef66da8721 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go @@ -53,19 +53,19 @@ import ( "k8s.io/apiserver/pkg/util/feature" utilfeature "k8s.io/apiserver/pkg/util/feature" utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol" - "k8s.io/apiserver/pkg/util/term" "k8s.io/apiserver/pkg/util/webhook" clientgoinformers "k8s.io/client-go/informers" clientgoclientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" "k8s.io/client-go/util/keyutil" cloudprovider "k8s.io/cloud-provider" cliflag "k8s.io/component-base/cli/flag" "k8s.io/component-base/cli/globalflag" - "k8s.io/component-base/metrics" _ "k8s.io/component-base/metrics/prometheus/workqueue" // for workqueue metric registration + "k8s.io/component-base/term" "k8s.io/component-base/version" "k8s.io/component-base/version/verflag" - "k8s.io/klog" + "k8s.io/klog/v2" aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver" aggregatorscheme "k8s.io/kube-aggregator/pkg/apiserver/scheme" "k8s.io/kubernetes/cmd/kube-apiserver/app/options" @@ -82,10 +82,8 @@ import ( "k8s.io/kubernetes/pkg/master" "k8s.io/kubernetes/pkg/master/reconcilers" "k8s.io/kubernetes/pkg/master/tunneler" - "k8s.io/kubernetes/pkg/registry/cachesize" rbacrest "k8s.io/kubernetes/pkg/registry/rbac/rest" "k8s.io/kubernetes/pkg/serviceaccount" - utilflag "k8s.io/kubernetes/pkg/util/flag" ) const ( @@ -106,9 +104,18 @@ func NewAPIServerCommand(stopCh <-chan struct{}) *cobra.Command { for the api objects which include pods, services, replicationcontrollers, and others. The API Server services REST operations and provides the frontend to the cluster's shared state through which all other components interact.`, + + // stop printing usage when the command errors + SilenceUsage: true, + PersistentPreRunE: func(*cobra.Command, []string) error { + // silence client-go warnings. + // kube-apiserver loopback clients should not log self-issued warnings. + rest.SetDefaultWarningHandler(rest.NoWarnings{}) + return nil + }, RunE: func(cmd *cobra.Command, args []string) error { verflag.PrintAndExitIfRequested() - utilflag.PrintFlags(cmd.Flags()) + cliflag.PrintFlags(cmd.Flags()) // set default options completedOptions, err := Complete(s) @@ -123,6 +130,14 @@ cluster's shared state through which all other components interact.`, return Run(completedOptions, stopCh) }, + Args: func(cmd *cobra.Command, args []string) error { + for _, arg := range args { + if len(arg) > 0 { + return fmt.Errorf("%q does not take any arguments, got %q", cmd.CommandPath(), args) + } + } + return nil + }, } fs := cmd.Flags() @@ -252,6 +267,8 @@ func CreateNodeDialer(s completedServerRunOptions) (tunneler.Tunneler, *http.Tra if len(s.SSHUser) > 0 { // Get ssh key distribution func, if supported var installSSHKey tunneler.InstallSSHKey + + cloudprovider.DeprecationWarningForProvider(s.CloudProvider.CloudProvider) cloud, err := cloudprovider.InitCloudProvider(s.CloudProvider.CloudProvider, s.CloudProvider.CloudConfigFile) if err != nil { return nil, nil, fmt.Errorf("cloud provider could not be initialized: %v", err) @@ -325,9 +342,10 @@ func CreateKubeAPIServerConfig( PerConnectionBandwidthLimitBytesPerSec: s.MaxConnectionBytesPerSec, }) - if len(s.ShowHiddenMetricsForVersion) > 0 { - metrics.SetShowHidden() - } + s.Metrics.Apply() + serviceaccount.RegisterMetrics() + + s.Logs.Apply() serviceIPRange, apiServerServiceIP, err := master.ServiceIPRange(s.PrimaryServiceClusterIPRange) if err != nil { @@ -370,6 +388,7 @@ func CreateKubeAPIServerConfig( ServiceAccountIssuer: s.ServiceAccountIssuer, ServiceAccountMaxExpiration: s.ServiceAccountTokenMaxExpiration, + ExtendExpiration: s.Authentication.ServiceAccounts.ExtendExpiration, VersionedInformers: versionedInformers, }, @@ -531,29 +550,17 @@ func buildGenericConfig( genericConfig.DisabledPostStartHooks.Insert(rbacrest.PostStartHookName) } + lastErr = s.Audit.ApplyTo(genericConfig) + if lastErr != nil { + return + } + admissionConfig := &kubeapiserveradmission.Config{ ExternalInformers: versionedInformers, LoopbackClientConfig: genericConfig.LoopbackClientConfig, CloudConfigFile: s.CloudProvider.CloudConfigFile, } serviceResolver = buildServiceResolver(s.EnableAggregatorRouting, genericConfig.LoopbackClientConfig.Host, versionedInformers) - - authInfoResolverWrapper := webhook.NewDefaultAuthenticationInfoResolverWrapper(proxyTransport, genericConfig.EgressSelector, genericConfig.LoopbackClientConfig) - - lastErr = s.Audit.ApplyTo( - genericConfig, - genericConfig.LoopbackClientConfig, - versionedInformers, - serveroptions.NewProcessInfo("kube-apiserver", "kube-system"), - &serveroptions.WebhookOptions{ - AuthInfoResolverWrapper: authInfoResolverWrapper, - ServiceResolver: serviceResolver, - }, - ) - if lastErr != nil { - return - } - pluginInitializers, admissionPostStartHook, err = admissionConfig.New(proxyTransport, genericConfig.EgressSelector, serviceResolver) if err != nil { lastErr = fmt.Errorf("failed to create admission plugin initializer: %v", err) @@ -675,6 +682,14 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { s.Authentication.ServiceAccounts.MaxExpiration > upBound { return options, fmt.Errorf("the serviceaccount max expiration must be between 1 hour to 2^32 seconds") } + if s.Authentication.ServiceAccounts.ExtendExpiration { + if s.Authentication.ServiceAccounts.MaxExpiration < serviceaccount.WarnOnlyBoundTokenExpirationSeconds*time.Second { + klog.Warningf("service-account-extend-token-expiration is true, in order to correctly trigger safe transition logic, service-account-max-token-expiration must be set longer than 3607 seconds (currently %s)", s.Authentication.ServiceAccounts.MaxExpiration) + } + if s.Authentication.ServiceAccounts.MaxExpiration < serviceaccount.ExpirationExtensionSeconds*time.Second { + klog.Warningf("service-account-extend-token-expiration is true, enabling tokens valid up to 1 year, which is longer than service-account-max-token-expiration set to %s", s.Authentication.ServiceAccounts.MaxExpiration) + } + } } s.ServiceAccountIssuer, err = serviceaccount.JWTTokenGenerator(s.Authentication.ServiceAccounts.Issuer, sk) @@ -685,15 +700,8 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { } if s.Etcd.EnableWatchCache { - klog.V(2).Infof("Initializing cache sizes based on %dMB limit", s.GenericServerRunOptions.TargetRAMMB) - sizes := cachesize.NewHeuristicWatchCacheSizes(s.GenericServerRunOptions.TargetRAMMB) - if userSpecified, err := serveroptions.ParseWatchCacheSizes(s.Etcd.WatchCacheSizes); err == nil { - for resource, size := range userSpecified { - sizes[resource] = size - } - } - s.Etcd.WatchCacheSizes, err = serveroptions.WriteWatchCacheSizes(sizes) - if err != nil { + // Ensure that overrides parse correctly. + if _, err := serveroptions.ParseWatchCacheSizes(s.Etcd.WatchCacheSizes); err != nil { return options, err } } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/BUILD index fe3b63c7b0b..f105b14e059 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/BUILD @@ -48,7 +48,7 @@ go_library( "//pkg/controller/certificates/cleaner:go_default_library", "//pkg/controller/certificates/rootcacertpublisher:go_default_library", "//pkg/controller/certificates/signer:go_default_library", - "//pkg/controller/cloud:go_default_library", + "//pkg/controller/certificates/signer/config:go_default_library", "//pkg/controller/clusterroleaggregation:go_default_library", "//pkg/controller/cronjob:go_default_library", "//pkg/controller/daemon:go_default_library", @@ -56,6 +56,7 @@ go_library( "//pkg/controller/disruption:go_default_library", "//pkg/controller/endpoint:go_default_library", "//pkg/controller/endpointslice:go_default_library", + "//pkg/controller/endpointslicemirroring:go_default_library", "//pkg/controller/garbagecollector:go_default_library", "//pkg/controller/job:go_default_library", "//pkg/controller/namespace:go_default_library", @@ -69,13 +70,12 @@ go_library( "//pkg/controller/replicaset:go_default_library", "//pkg/controller/replication:go_default_library", "//pkg/controller/resourcequota:go_default_library", - "//pkg/controller/route:go_default_library", - "//pkg/controller/service:go_default_library", "//pkg/controller/serviceaccount:go_default_library", "//pkg/controller/statefulset:go_default_library", "//pkg/controller/ttl:go_default_library", "//pkg/controller/ttlafterfinished:go_default_library", "//pkg/controller/volume/attachdetach:go_default_library", + "//pkg/controller/volume/ephemeral:go_default_library", "//pkg/controller/volume/expand:go_default_library", "//pkg/controller/volume/persistentvolume:go_default_library", "//pkg/controller/volume/persistentvolume/config:go_default_library", @@ -85,8 +85,6 @@ go_library( "//pkg/quota/v1/generic:go_default_library", "//pkg/quota/v1/install:go_default_library", "//pkg/serviceaccount:go_default_library", - "//pkg/util/configz:go_default_library", - "//pkg/util/flag:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/awsebs:go_default_library", "//pkg/volume/azure_dd:go_default_library", @@ -121,9 +119,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/server/healthz:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/mux:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/term:go_default_library", "//staging/src/k8s.io/client-go/discovery/cached:go_default_library", - "//staging/src/k8s.io/client-go/discovery/cached/memory:go_default_library", "//staging/src/k8s.io/client-go/dynamic:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/informers/storage/v1:go_default_library", @@ -139,10 +135,15 @@ go_library( "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/client-go/util/keyutil:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", + "//staging/src/k8s.io/cloud-provider/controllers/nodelifecycle:go_default_library", + "//staging/src/k8s.io/cloud-provider/controllers/route:go_default_library", + "//staging/src/k8s.io/cloud-provider/controllers/service:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/cli/globalflag:go_default_library", + "//staging/src/k8s.io/component-base/configz:go_default_library", "//staging/src/k8s.io/component-base/featuregate:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", + "//staging/src/k8s.io/component-base/term:go_default_library", "//staging/src/k8s.io/component-base/version:go_default_library", "//staging/src/k8s.io/component-base/version/verflag:go_default_library", "//staging/src/k8s.io/csi-translation-lib:go_default_library", @@ -151,7 +152,7 @@ go_library( "//staging/src/k8s.io/metrics/pkg/client/custom_metrics:go_default_library", "//staging/src/k8s.io/metrics/pkg/client/external_metrics:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], @@ -159,9 +160,13 @@ go_library( go_test( name = "go_default_test", - srcs = ["core_test.go"], + srcs = [ + "certificates_test.go", + "core_test.go", + ], embed = [":go_default_library"], deps = [ + "//pkg/controller/certificates/signer/config:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/client-go/discovery:go_default_library", "//staging/src/k8s.io/client-go/discovery/fake:go_default_library", diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/batch.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/batch.go index ceb11e6388b..e4528a99500 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/batch.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/batch.go @@ -34,7 +34,7 @@ func startJobController(ctx ControllerContext) (http.Handler, bool, error) { if !ctx.AvailableResources[schema.GroupVersionResource{Group: "batch", Version: "v1", Resource: "jobs"}] { return nil, false, nil } - go job.NewJobController( + go job.NewController( ctx.InformerFactory.Core().V1().Pods(), ctx.InformerFactory.Batch().V1().Jobs(), ctx.ClientBuilder.ClientOrDie("job-controller"), diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/certificates.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/certificates.go index 16708d726c2..238b7df2a66 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/certificates.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/certificates.go @@ -22,91 +22,153 @@ package app import ( "fmt" - "os" - - "k8s.io/klog" - "net/http" "k8s.io/apimachinery/pkg/runtime/schema" utilfeature "k8s.io/apiserver/pkg/util/feature" - kubeoptions "k8s.io/kubernetes/cmd/kube-controller-manager/app/options" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller/certificates/approver" "k8s.io/kubernetes/pkg/controller/certificates/cleaner" "k8s.io/kubernetes/pkg/controller/certificates/rootcacertpublisher" "k8s.io/kubernetes/pkg/controller/certificates/signer" + csrsigningconfig "k8s.io/kubernetes/pkg/controller/certificates/signer/config" "k8s.io/kubernetes/pkg/features" ) func startCSRSigningController(ctx ControllerContext) (http.Handler, bool, error) { - gvr := schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"} + gvr := schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1", Resource: "certificatesigningrequests"} if !ctx.AvailableResources[gvr] { klog.Warningf("Resource %s is not available now", gvr.String()) return nil, false, nil } - if ctx.ComponentConfig.CSRSigningController.ClusterSigningCertFile == "" || ctx.ComponentConfig.CSRSigningController.ClusterSigningKeyFile == "" { + missingSingleSigningFile := ctx.ComponentConfig.CSRSigningController.ClusterSigningCertFile == "" || ctx.ComponentConfig.CSRSigningController.ClusterSigningKeyFile == "" + if missingSingleSigningFile && !anySpecificFilesSet(ctx.ComponentConfig.CSRSigningController) { klog.V(2).Info("skipping CSR signer controller because no csr cert/key was specified") return nil, false, nil } - - // Deprecation warning for old defaults. - // - // * If the signing cert and key are the default paths but the files - // exist, warn that the paths need to be specified explicitly in a - // later release and the defaults will be removed. We don't expect this - // to be the case. - // - // * If the signing cert and key are default paths but the files don't exist, - // bail out of startController without logging. - var keyFileExists, keyUsesDefault, certFileExists, certUsesDefault bool - - _, err := os.Stat(ctx.ComponentConfig.CSRSigningController.ClusterSigningCertFile) - certFileExists = !os.IsNotExist(err) - - certUsesDefault = (ctx.ComponentConfig.CSRSigningController.ClusterSigningCertFile == kubeoptions.DefaultClusterSigningCertFile) - - _, err = os.Stat(ctx.ComponentConfig.CSRSigningController.ClusterSigningKeyFile) - keyFileExists = !os.IsNotExist(err) - - keyUsesDefault = (ctx.ComponentConfig.CSRSigningController.ClusterSigningKeyFile == kubeoptions.DefaultClusterSigningKeyFile) - - switch { - case (keyFileExists && keyUsesDefault) || (certFileExists && certUsesDefault): - klog.Warningf("You might be using flag defaulting for --cluster-signing-cert-file and" + - " --cluster-signing-key-file. These defaults are deprecated and will be removed" + - " in a subsequent release. Please pass these options explicitly.") - case (!keyFileExists && keyUsesDefault) && (!certFileExists && certUsesDefault): - // This is what we expect right now if people aren't - // setting up the signing controller. This isn't - // actually a problem since the signer is not a - // required controller. - klog.V(2).Info("skipping CSR signer controller because no csr cert/key was specified and the default files are missing") - return nil, false, nil - default: - // Note that '!filesExist && !usesDefaults' is obviously - // operator error. We don't handle this case here and instead - // allow it to be handled by NewCSR... below. + if !missingSingleSigningFile && anySpecificFilesSet(ctx.ComponentConfig.CSRSigningController) { + return nil, false, fmt.Errorf("cannot specify default and per controller certs at the same time") } c := ctx.ClientBuilder.ClientOrDie("certificate-controller") + csrInformer := ctx.InformerFactory.Certificates().V1().CertificateSigningRequests() + certTTL := ctx.ComponentConfig.CSRSigningController.ClusterSigningDuration.Duration - signer, err := signer.NewCSRSigningController( - c, - ctx.InformerFactory.Certificates().V1beta1().CertificateSigningRequests(), - ctx.ComponentConfig.CSRSigningController.ClusterSigningCertFile, - ctx.ComponentConfig.CSRSigningController.ClusterSigningKeyFile, - ctx.ComponentConfig.CSRSigningController.ClusterSigningDuration.Duration, - ) - if err != nil { - return nil, false, fmt.Errorf("failed to start certificate controller: %v", err) + if kubeletServingSignerCertFile, kubeletServingSignerKeyFile := getKubeletServingSignerFiles(ctx.ComponentConfig.CSRSigningController); len(kubeletServingSignerCertFile) > 0 || len(kubeletServingSignerKeyFile) > 0 { + kubeletServingSigner, err := signer.NewKubeletServingCSRSigningController(c, csrInformer, kubeletServingSignerCertFile, kubeletServingSignerKeyFile, certTTL) + if err != nil { + return nil, false, fmt.Errorf("failed to start kubernetes.io/kubelet-serving certificate controller: %v", err) + } + go kubeletServingSigner.Run(1, ctx.Stop) + } else { + klog.V(2).Infof("skipping CSR signer controller %q because specific files were specified for other signers and not this one.", "kubernetes.io/kubelet-serving") + } + + if kubeletClientSignerCertFile, kubeletClientSignerKeyFile := getKubeletClientSignerFiles(ctx.ComponentConfig.CSRSigningController); len(kubeletClientSignerCertFile) > 0 || len(kubeletClientSignerKeyFile) > 0 { + kubeletClientSigner, err := signer.NewKubeletClientCSRSigningController(c, csrInformer, kubeletClientSignerCertFile, kubeletClientSignerKeyFile, certTTL) + if err != nil { + return nil, false, fmt.Errorf("failed to start kubernetes.io/kube-apiserver-client-kubelet certificate controller: %v", err) + } + go kubeletClientSigner.Run(1, ctx.Stop) + } else { + klog.V(2).Infof("skipping CSR signer controller %q because specific files were specified for other signers and not this one.", "kubernetes.io/kube-apiserver-client-kubelet") + } + + if kubeAPIServerSignerCertFile, kubeAPIServerSignerKeyFile := getKubeAPIServerClientSignerFiles(ctx.ComponentConfig.CSRSigningController); len(kubeAPIServerSignerCertFile) > 0 || len(kubeAPIServerSignerKeyFile) > 0 { + kubeAPIServerClientSigner, err := signer.NewKubeAPIServerClientCSRSigningController(c, csrInformer, kubeAPIServerSignerCertFile, kubeAPIServerSignerKeyFile, certTTL) + if err != nil { + return nil, false, fmt.Errorf("failed to start kubernetes.io/kube-apiserver-client certificate controller: %v", err) + } + go kubeAPIServerClientSigner.Run(1, ctx.Stop) + } else { + klog.V(2).Infof("skipping CSR signer controller %q because specific files were specified for other signers and not this one.", "kubernetes.io/kube-apiserver-client") + } + + if legacyUnknownSignerCertFile, legacyUnknownSignerKeyFile := getLegacyUnknownSignerFiles(ctx.ComponentConfig.CSRSigningController); len(legacyUnknownSignerCertFile) > 0 || len(legacyUnknownSignerKeyFile) > 0 { + legacyUnknownSigner, err := signer.NewLegacyUnknownCSRSigningController(c, csrInformer, legacyUnknownSignerCertFile, legacyUnknownSignerKeyFile, certTTL) + if err != nil { + return nil, false, fmt.Errorf("failed to start kubernetes.io/legacy-unknown certificate controller: %v", err) + } + go legacyUnknownSigner.Run(1, ctx.Stop) + } else { + klog.V(2).Infof("skipping CSR signer controller %q because specific files were specified for other signers and not this one.", "kubernetes.io/legacy-unknown") } - go signer.Run(1, ctx.Stop) return nil, true, nil } +func areKubeletServingSignerFilesSpecified(config csrsigningconfig.CSRSigningControllerConfiguration) bool { + if len(config.KubeletServingSignerConfiguration.CertFile) > 0 || len(config.KubeletServingSignerConfiguration.KeyFile) > 0 { + // if only one is specified, it will error later during construction + return true + } + return false +} +func areKubeletClientSignerFilesSpecified(config csrsigningconfig.CSRSigningControllerConfiguration) bool { + if len(config.KubeletClientSignerConfiguration.CertFile) > 0 || len(config.KubeletClientSignerConfiguration.KeyFile) > 0 { + // if only one is specified, it will error later during construction + return true + } + return false +} + +func areKubeAPIServerClientSignerFilesSpecified(config csrsigningconfig.CSRSigningControllerConfiguration) bool { + if len(config.KubeAPIServerClientSignerConfiguration.CertFile) > 0 || len(config.KubeAPIServerClientSignerConfiguration.KeyFile) > 0 { + // if only one is specified, it will error later during construction + return true + } + return false +} + +func areLegacyUnknownSignerFilesSpecified(config csrsigningconfig.CSRSigningControllerConfiguration) bool { + if len(config.LegacyUnknownSignerConfiguration.CertFile) > 0 || len(config.LegacyUnknownSignerConfiguration.KeyFile) > 0 { + // if only one is specified, it will error later during construction + return true + } + return false +} + +func anySpecificFilesSet(config csrsigningconfig.CSRSigningControllerConfiguration) bool { + return areKubeletServingSignerFilesSpecified(config) || + areKubeletClientSignerFilesSpecified(config) || + areKubeAPIServerClientSignerFilesSpecified(config) || + areLegacyUnknownSignerFilesSpecified(config) +} + +func getKubeletServingSignerFiles(config csrsigningconfig.CSRSigningControllerConfiguration) (string, string) { + // if any cert/key is set for specific CSR signing loops, then the --cluster-signing-{cert,key}-file are not used for any CSR signing loop. + if anySpecificFilesSet(config) { + return config.KubeletServingSignerConfiguration.CertFile, config.KubeletServingSignerConfiguration.KeyFile + } + return config.ClusterSigningCertFile, config.ClusterSigningKeyFile +} + +func getKubeletClientSignerFiles(config csrsigningconfig.CSRSigningControllerConfiguration) (string, string) { + // if any cert/key is set for specific CSR signing loops, then the --cluster-signing-{cert,key}-file are not used for any CSR signing loop. + if anySpecificFilesSet(config) { + return config.KubeletClientSignerConfiguration.CertFile, config.KubeletClientSignerConfiguration.KeyFile + } + return config.ClusterSigningCertFile, config.ClusterSigningKeyFile +} + +func getKubeAPIServerClientSignerFiles(config csrsigningconfig.CSRSigningControllerConfiguration) (string, string) { + // if any cert/key is set for specific CSR signing loops, then the --cluster-signing-{cert,key}-file are not used for any CSR signing loop. + if anySpecificFilesSet(config) { + return config.KubeAPIServerClientSignerConfiguration.CertFile, config.KubeAPIServerClientSignerConfiguration.KeyFile + } + return config.ClusterSigningCertFile, config.ClusterSigningKeyFile +} + +func getLegacyUnknownSignerFiles(config csrsigningconfig.CSRSigningControllerConfiguration) (string, string) { + // if any cert/key is set for specific CSR signing loops, then the --cluster-signing-{cert,key}-file are not used for any CSR signing loop. + if anySpecificFilesSet(config) { + return config.LegacyUnknownSignerConfiguration.CertFile, config.LegacyUnknownSignerConfiguration.KeyFile + } + return config.ClusterSigningCertFile, config.ClusterSigningKeyFile +} + func startCSRApprovingController(ctx ControllerContext) (http.Handler, bool, error) { - gvr := schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"} + gvr := schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1", Resource: "certificatesigningrequests"} if !ctx.AvailableResources[gvr] { klog.Warningf("Resource %s is not available now", gvr.String()) return nil, false, nil @@ -114,7 +176,7 @@ func startCSRApprovingController(ctx ControllerContext) (http.Handler, bool, err approver := approver.NewCSRApprovingController( ctx.ClientBuilder.ClientOrDie("certificate-controller"), - ctx.InformerFactory.Certificates().V1beta1().CertificateSigningRequests(), + ctx.InformerFactory.Certificates().V1().CertificateSigningRequests(), ) go approver.Run(1, ctx.Stop) @@ -123,8 +185,8 @@ func startCSRApprovingController(ctx ControllerContext) (http.Handler, bool, err func startCSRCleanerController(ctx ControllerContext) (http.Handler, bool, error) { cleaner := cleaner.NewCSRCleanerController( - ctx.ClientBuilder.ClientOrDie("certificate-controller").CertificatesV1beta1().CertificateSigningRequests(), - ctx.InformerFactory.Certificates().V1beta1().CertificateSigningRequests(), + ctx.ClientBuilder.ClientOrDie("certificate-controller").CertificatesV1().CertificateSigningRequests(), + ctx.InformerFactory.Certificates().V1().CertificateSigningRequests(), ) go cleaner.Run(1, ctx.Stop) return nil, true, nil diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/cloudproviders.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/cloudproviders.go index e39fa83cf7f..ee5b0babf15 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/cloudproviders.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/cloudproviders.go @@ -19,7 +19,7 @@ package app import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/client-go/informers" cloudprovider "k8s.io/cloud-provider" @@ -41,6 +41,8 @@ func createCloudProvider(cloudProvider string, externalCloudVolumePlugin string, } cloud, err = cloudprovider.InitCloudProvider(externalCloudVolumePlugin, cloudConfigFile) } else { + cloudprovider.DeprecationWarningForProvider(cloudProvider) + loopMode = IncludeCloudLoops cloud, err = cloudprovider.InitCloudProvider(cloudProvider, cloudConfigFile) } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/controllermanager.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/controllermanager.go index 795e78ef82c..fd12f5f424f 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/controllermanager.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/controllermanager.go @@ -41,7 +41,6 @@ import ( "k8s.io/apiserver/pkg/server/healthz" "k8s.io/apiserver/pkg/server/mux" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/apiserver/pkg/util/term" cacheddiscovery "k8s.io/client-go/discovery/cached" "k8s.io/client-go/informers" clientset "k8s.io/client-go/kubernetes" @@ -56,9 +55,11 @@ import ( cloudprovider "k8s.io/cloud-provider" cliflag "k8s.io/component-base/cli/flag" "k8s.io/component-base/cli/globalflag" + "k8s.io/component-base/configz" + "k8s.io/component-base/term" "k8s.io/component-base/version" "k8s.io/component-base/version/verflag" - "k8s.io/klog" + "k8s.io/klog/v2" genericcontrollermanager "k8s.io/kubernetes/cmd/controller-manager/app" "k8s.io/kubernetes/cmd/kube-controller-manager/app/config" "k8s.io/kubernetes/cmd/kube-controller-manager/app/options" @@ -67,8 +68,6 @@ import ( serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/serviceaccount" - "k8s.io/kubernetes/pkg/util/configz" - utilflag "k8s.io/kubernetes/pkg/util/flag" ) const ( @@ -105,9 +104,16 @@ state of the cluster through the apiserver and makes changes attempting to move current state towards the desired state. Examples of controllers that ship with Kubernetes today are the replication controller, endpoints controller, namespace controller, and serviceaccounts controller.`, + PersistentPreRunE: func(*cobra.Command, []string) error { + // silence client-go warnings. + // kube-controller-manager generically watches APIs (including deprecated ones), + // and CI ensures it works properly against matching kube-apiserver versions. + restclient.SetDefaultWarningHandler(restclient.NoWarnings{}) + return nil + }, Run: func(cmd *cobra.Command, args []string) { verflag.PrintAndExitIfRequested() - utilflag.PrintFlags(cmd.Flags()) + cliflag.PrintFlags(cmd.Flags()) c, err := s.Config(KnownControllers(), ControllersDisabledByDefault.List()) if err != nil { @@ -120,6 +126,14 @@ controller, and serviceaccounts controller.`, os.Exit(1) } }, + Args: func(cmd *cobra.Command, args []string) error { + for _, arg := range args { + if len(arg) > 0 { + return fmt.Errorf("%q does not take any arguments, got %q", cmd.CommandPath(), args) + } + } + return nil + }, } fs := cmd.Flags() @@ -373,6 +387,7 @@ func NewControllerInitializers(loopMode ControllerLoopMode) map[string]InitFunc controllers := map[string]InitFunc{} controllers["endpoint"] = startEndpointController controllers["endpointslice"] = startEndpointSliceController + controllers["endpointslicemirroring"] = startEndpointSliceMirroringController controllers["replicationcontroller"] = startReplicationController controllers["podgc"] = startPodGCController controllers["resourcequota"] = startResourceQuotaController @@ -409,6 +424,7 @@ func NewControllerInitializers(loopMode ControllerLoopMode) map[string]InitFunc controllers["pv-protection"] = startPVProtectionController controllers["ttl-after-finished"] = startTTLAfterFinishedController controllers["root-ca-cert-publisher"] = startRootCACertPublisher + controllers["ephemeral-volume"] = startEphemeralVolumeController return controllers } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/core.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/core.go index 78bce527cc9..68e1be8d427 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/core.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/core.go @@ -28,20 +28,21 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime/schema" utilfeature "k8s.io/apiserver/pkg/util/feature" - cacheddiscovery "k8s.io/client-go/discovery/cached/memory" storagev1informer "k8s.io/client-go/informers/storage/v1" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/metadata" restclient "k8s.io/client-go/rest" + cloudnodelifecyclecontroller "k8s.io/cloud-provider/controllers/nodelifecycle" + routecontroller "k8s.io/cloud-provider/controllers/route" + servicecontroller "k8s.io/cloud-provider/controllers/service" "k8s.io/component-base/metrics/prometheus/ratelimiter" csitrans "k8s.io/csi-translation-lib" "k8s.io/kubernetes/pkg/controller" - cloudcontroller "k8s.io/kubernetes/pkg/controller/cloud" endpointcontroller "k8s.io/kubernetes/pkg/controller/endpoint" "k8s.io/kubernetes/pkg/controller/garbagecollector" namespacecontroller "k8s.io/kubernetes/pkg/controller/namespace" @@ -52,12 +53,11 @@ import ( "k8s.io/kubernetes/pkg/controller/podgc" replicationcontroller "k8s.io/kubernetes/pkg/controller/replication" resourcequotacontroller "k8s.io/kubernetes/pkg/controller/resourcequota" - routecontroller "k8s.io/kubernetes/pkg/controller/route" - servicecontroller "k8s.io/kubernetes/pkg/controller/service" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" ttlcontroller "k8s.io/kubernetes/pkg/controller/ttl" "k8s.io/kubernetes/pkg/controller/ttlafterfinished" "k8s.io/kubernetes/pkg/controller/volume/attachdetach" + "k8s.io/kubernetes/pkg/controller/volume/ephemeral" "k8s.io/kubernetes/pkg/controller/volume/expand" persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/volume/persistentvolume" "k8s.io/kubernetes/pkg/controller/volume/pvcprotection" @@ -83,6 +83,7 @@ func startServiceController(ctx ControllerContext) (http.Handler, bool, error) { ctx.InformerFactory.Core().V1().Services(), ctx.InformerFactory.Core().V1().Nodes(), ctx.ComponentConfig.KubeCloudShared.ClusterName, + utilfeature.DefaultFeatureGate, ) if err != nil { // This error shouldn't fail. It lives like this as a legacy. @@ -216,7 +217,7 @@ func startNodeLifecycleController(ctx ControllerContext) (http.Handler, bool, er } func startCloudNodeLifecycleController(ctx ControllerContext) (http.Handler, bool, error) { - cloudNodeLifecycleController, err := cloudcontroller.NewCloudNodeLifecycleController( + cloudNodeLifecycleController, err := cloudnodelifecyclecontroller.NewCloudNodeLifecycleController( ctx.InformerFactory.Core().V1().Nodes(), // cloud node lifecycle controller uses existing cluster role from node-controller ctx.ClientBuilder.ClientOrDie("node-controller"), @@ -373,6 +374,22 @@ func startVolumeExpandController(ctx ControllerContext) (http.Handler, bool, err return nil, false, nil } +func startEphemeralVolumeController(ctx ControllerContext) (http.Handler, bool, error) { + if utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume) { + ephemeralController, err := ephemeral.NewController( + ctx.ClientBuilder.ClientOrDie("ephemeral-volume-controller"), + ctx.InformerFactory.Core().V1().Pods(), + ctx.InformerFactory.Core().V1().PersistentVolumeClaims()) + if err != nil { + return nil, true, fmt.Errorf("failed to start ephemeral volume controller: %v", err) + } + // TODO (before beta at the latest): make this configurable similar to the EndpointController + go ephemeralController.Run(1 /* int(ctx.ComponentConfig.EphemeralController.ConcurrentEphemeralVolumeSyncs) */, ctx.Stop) + return nil, true, nil + } + return nil, false, nil +} + func startEndpointController(ctx ControllerContext) (http.Handler, bool, error) { go endpointcontroller.NewEndpointController( ctx.InformerFactory.Core().V1().Pods(), @@ -500,7 +517,6 @@ func startGarbageCollectorController(ctx ControllerContext) (http.Handler, bool, } gcClientset := ctx.ClientBuilder.ClientOrDie("generic-garbage-collector") - discoveryClient := cacheddiscovery.NewMemCacheClient(gcClientset.Discovery()) config := ctx.ClientBuilder.ConfigOrDie("generic-garbage-collector") metadataClient, err := metadata.NewForConfig(config) @@ -508,8 +524,6 @@ func startGarbageCollectorController(ctx ControllerContext) (http.Handler, bool, return nil, true, err } - // Get an initial set of deletable resources to prime the garbage collector. - deletableResources := garbagecollector.GetDeletableResources(discoveryClient) ignoredResources := make(map[schema.GroupResource]struct{}) for _, r := range ctx.ComponentConfig.GarbageCollectorController.GCIgnoredResources { ignoredResources[schema.GroupResource{Group: r.Group, Resource: r.Resource}] = struct{}{} @@ -517,7 +531,6 @@ func startGarbageCollectorController(ctx ControllerContext) (http.Handler, bool, garbageCollector, err := garbagecollector.NewGarbageCollector( metadataClient, ctx.RESTMapper, - deletableResources, ignoredResources, ctx.ObjectOrMetadataInformerFactory, ctx.InformersStarted, @@ -538,12 +551,17 @@ func startGarbageCollectorController(ctx ControllerContext) (http.Handler, bool, } func startPVCProtectionController(ctx ControllerContext) (http.Handler, bool, error) { - go pvcprotection.NewPVCProtectionController( + pvcProtectionController, err := pvcprotection.NewPVCProtectionController( ctx.InformerFactory.Core().V1().PersistentVolumeClaims(), ctx.InformerFactory.Core().V1().Pods(), ctx.ClientBuilder.ClientOrDie("pvc-protection-controller"), utilfeature.DefaultFeatureGate.Enabled(features.StorageObjectInUseProtection), - ).Run(1, ctx.Stop) + utilfeature.DefaultFeatureGate.Enabled(features.StorageObjectInUseProtection), + ) + if err != nil { + return nil, true, fmt.Errorf("failed to start the pvc protection controller: %v", err) + } + go pvcProtectionController.Run(1, ctx.Stop) return nil, true, nil } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/discovery.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/discovery.go index 3b6fbfe59b8..e0d2421e047 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/discovery.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/discovery.go @@ -25,14 +25,15 @@ import ( discoveryv1beta1 "k8s.io/api/discovery/v1beta1" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" endpointslicecontroller "k8s.io/kubernetes/pkg/controller/endpointslice" + endpointslicemirroringcontroller "k8s.io/kubernetes/pkg/controller/endpointslicemirroring" "k8s.io/kubernetes/pkg/features" ) func startEndpointSliceController(ctx ControllerContext) (http.Handler, bool, error) { if !utilfeature.DefaultFeatureGate.Enabled(features.EndpointSlice) { - klog.V(4).Infof("Not starting endpointslice-controller since EndpointSlice feature gate is disabled") + klog.V(2).Infof("Not starting endpointslice-controller since EndpointSlice feature gate is disabled") return nil, false, nil } @@ -52,3 +53,25 @@ func startEndpointSliceController(ctx ControllerContext) (http.Handler, bool, er ).Run(int(ctx.ComponentConfig.EndpointSliceController.ConcurrentServiceEndpointSyncs), ctx.Stop) return nil, true, nil } + +func startEndpointSliceMirroringController(ctx ControllerContext) (http.Handler, bool, error) { + if !utilfeature.DefaultFeatureGate.Enabled(features.EndpointSlice) { + klog.V(2).Infof("Not starting endpointslicemirroring-controller since EndpointSlice feature gate is disabled") + return nil, false, nil + } + + if !ctx.AvailableResources[discoveryv1beta1.SchemeGroupVersion.WithResource("endpointslices")] { + klog.Warningf("Not starting endpointslicemirroring-controller since discovery.k8s.io/v1beta1 resources are not available") + return nil, false, nil + } + + go endpointslicemirroringcontroller.NewController( + ctx.InformerFactory.Core().V1().Endpoints(), + ctx.InformerFactory.Discovery().V1beta1().EndpointSlices(), + ctx.InformerFactory.Core().V1().Services(), + ctx.ComponentConfig.EndpointSliceMirroringController.MirroringMaxEndpointsPerSubset, + ctx.ClientBuilder.ClientOrDie("endpointslicemirroring-controller"), + ctx.ComponentConfig.EndpointSliceMirroringController.MirroringEndpointUpdatesBatchPeriod.Duration, + ).Run(int(ctx.ComponentConfig.EndpointSliceMirroringController.MirroringConcurrentServiceEndpointSyncs), ctx.Stop) + return nil, true, nil +} diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/BUILD index d9ba251cd78..55ece3b9e45 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/BUILD @@ -16,6 +16,7 @@ go_library( "deprecatedcontroller.go", "endpointcontroller.go", "endpointslicecontroller.go", + "endpointslicemirroringcontroller.go", "garbagecollectorcontroller.go", "hpacontroller.go", "jobcontroller.go", @@ -43,6 +44,7 @@ go_library( "//pkg/controller/deployment/config:go_default_library", "//pkg/controller/endpoint/config:go_default_library", "//pkg/controller/endpointslice/config:go_default_library", + "//pkg/controller/endpointslicemirroring/config:go_default_library", "//pkg/controller/garbagecollector:go_default_library", "//pkg/controller/garbagecollector/config:go_default_library", "//pkg/controller/job/config:go_default_library", @@ -72,10 +74,10 @@ go_library( "//staging/src/k8s.io/client-go/tools/clientcmd:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", + "//staging/src/k8s.io/component-base/logs:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/kube-controller-manager/config/v1alpha1:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", ], ) @@ -105,6 +107,7 @@ go_test( "//pkg/controller/deployment/config:go_default_library", "//pkg/controller/endpoint/config:go_default_library", "//pkg/controller/endpointslice/config:go_default_library", + "//pkg/controller/endpointslicemirroring/config:go_default_library", "//pkg/controller/garbagecollector/config:go_default_library", "//pkg/controller/job/config:go_default_library", "//pkg/controller/namespace/config:go_default_library", @@ -125,6 +128,8 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/options:go_default_library", "//staging/src/k8s.io/component-base/config:go_default_library", + "//staging/src/k8s.io/component-base/logs:go_default_library", + "//staging/src/k8s.io/component-base/metrics:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/csrsigningcontroller.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/csrsigningcontroller.go index 251de045c99..ebb49886803 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/csrsigningcontroller.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/csrsigningcontroller.go @@ -17,21 +17,13 @@ limitations under the License. package options import ( + "fmt" + "github.com/spf13/pflag" csrsigningconfig "k8s.io/kubernetes/pkg/controller/certificates/signer/config" ) -const ( - // These defaults are deprecated and exported so that we can warn if - // they are being used. - - // DefaultClusterSigningCertFile is deprecated. Do not use. - DefaultClusterSigningCertFile = "/etc/kubernetes/ca/ca.pem" - // DefaultClusterSigningKeyFile is deprecated. Do not use. - DefaultClusterSigningKeyFile = "/etc/kubernetes/ca/ca.key" -) - // CSRSigningControllerOptions holds the CSRSigningController options. type CSRSigningControllerOptions struct { *csrsigningconfig.CSRSigningControllerConfiguration @@ -43,9 +35,19 @@ func (o *CSRSigningControllerOptions) AddFlags(fs *pflag.FlagSet) { return } - fs.StringVar(&o.ClusterSigningCertFile, "cluster-signing-cert-file", o.ClusterSigningCertFile, "Filename containing a PEM-encoded X509 CA certificate used to issue cluster-scoped certificates") - fs.StringVar(&o.ClusterSigningKeyFile, "cluster-signing-key-file", o.ClusterSigningKeyFile, "Filename containing a PEM-encoded RSA or ECDSA private key used to sign cluster-scoped certificates") + fs.StringVar(&o.ClusterSigningCertFile, "cluster-signing-cert-file", o.ClusterSigningCertFile, "Filename containing a PEM-encoded X509 CA certificate used to issue cluster-scoped certificates. If specified, no more specific --cluster-signing-* flag may be specified.") + fs.StringVar(&o.ClusterSigningKeyFile, "cluster-signing-key-file", o.ClusterSigningKeyFile, "Filename containing a PEM-encoded RSA or ECDSA private key used to sign cluster-scoped certificates. If specified, no more specific --cluster-signing-* flag may be specified.") + fs.StringVar(&o.KubeletServingSignerConfiguration.CertFile, "cluster-signing-kubelet-serving-cert-file", o.KubeletServingSignerConfiguration.CertFile, "Filename containing a PEM-encoded X509 CA certificate used to issue certificates for the kubernetes.io/kubelet-serving signer. If specified, --cluster-signing-{cert,key}-file must not be set.") + fs.StringVar(&o.KubeletServingSignerConfiguration.KeyFile, "cluster-signing-kubelet-serving-key-file", o.KubeletServingSignerConfiguration.KeyFile, "Filename containing a PEM-encoded RSA or ECDSA private key used to sign certificates for the kubernetes.io/kubelet-serving signer. If specified, --cluster-signing-{cert,key}-file must not be set.") + fs.StringVar(&o.KubeletClientSignerConfiguration.CertFile, "cluster-signing-kubelet-client-cert-file", o.KubeletClientSignerConfiguration.CertFile, "Filename containing a PEM-encoded X509 CA certificate used to issue certificates for the kubernetes.io/kube-apiserver-client-kubelet signer. If specified, --cluster-signing-{cert,key}-file must not be set.") + fs.StringVar(&o.KubeletClientSignerConfiguration.KeyFile, "cluster-signing-kubelet-client-key-file", o.KubeletClientSignerConfiguration.KeyFile, "Filename containing a PEM-encoded RSA or ECDSA private key used to sign certificates for the kubernetes.io/kube-apiserver-client-kubelet signer. If specified, --cluster-signing-{cert,key}-file must not be set.") + fs.StringVar(&o.KubeAPIServerClientSignerConfiguration.CertFile, "cluster-signing-kube-apiserver-client-cert-file", o.KubeAPIServerClientSignerConfiguration.CertFile, "Filename containing a PEM-encoded X509 CA certificate used to issue certificates for the kubernetes.io/kube-apiserver-client signer. If specified, --cluster-signing-{cert,key}-file must not be set.") + fs.StringVar(&o.KubeAPIServerClientSignerConfiguration.KeyFile, "cluster-signing-kube-apiserver-client-key-file", o.KubeAPIServerClientSignerConfiguration.KeyFile, "Filename containing a PEM-encoded RSA or ECDSA private key used to sign certificates for the kubernetes.io/kube-apiserver-client signer. If specified, --cluster-signing-{cert,key}-file must not be set.") + fs.StringVar(&o.LegacyUnknownSignerConfiguration.CertFile, "cluster-signing-legacy-unknown-cert-file", o.LegacyUnknownSignerConfiguration.CertFile, "Filename containing a PEM-encoded X509 CA certificate used to issue certificates for the kubernetes.io/legacy-unknown signer. If specified, --cluster-signing-{cert,key}-file must not be set.") + fs.StringVar(&o.LegacyUnknownSignerConfiguration.KeyFile, "cluster-signing-legacy-unknown-key-file", o.LegacyUnknownSignerConfiguration.KeyFile, "Filename containing a PEM-encoded RSA or ECDSA private key used to sign certificates for the kubernetes.io/legacy-unknown signer. If specified, --cluster-signing-{cert,key}-file must not be set.") + fs.DurationVar(&o.ClusterSigningDuration.Duration, "cluster-signing-duration", o.ClusterSigningDuration.Duration, "The length of duration signed certificates will be given.") fs.DurationVar(&o.ClusterSigningDuration.Duration, "experimental-cluster-signing-duration", o.ClusterSigningDuration.Duration, "The length of duration signed certificates will be given.") + fs.MarkDeprecated("experimental-cluster-signing-duration", "use --cluster-signing-duration") } // ApplyTo fills up CSRSigningController config with options. @@ -56,6 +58,10 @@ func (o *CSRSigningControllerOptions) ApplyTo(cfg *csrsigningconfig.CSRSigningCo cfg.ClusterSigningCertFile = o.ClusterSigningCertFile cfg.ClusterSigningKeyFile = o.ClusterSigningKeyFile + cfg.KubeletServingSignerConfiguration = o.KubeletServingSignerConfiguration + cfg.KubeletClientSignerConfiguration = o.KubeletClientSignerConfiguration + cfg.KubeAPIServerClientSignerConfiguration = o.KubeAPIServerClientSignerConfiguration + cfg.LegacyUnknownSignerConfiguration = o.LegacyUnknownSignerConfiguration cfg.ClusterSigningDuration = o.ClusterSigningDuration return nil @@ -68,5 +74,43 @@ func (o *CSRSigningControllerOptions) Validate() []error { } errs := []error{} + if err := csrSigningFilesValid(o.KubeletServingSignerConfiguration); err != nil { + errs = append(errs, fmt.Errorf("%q: %v", "cluster-signing-kubelet-serving", err)) + } + if err := csrSigningFilesValid(o.KubeletClientSignerConfiguration); err != nil { + errs = append(errs, fmt.Errorf("%q: %v", "cluster-signing-kube-apiserver-client", err)) + } + if err := csrSigningFilesValid(o.KubeAPIServerClientSignerConfiguration); err != nil { + errs = append(errs, fmt.Errorf("%q: %v", "cluster-signing-kube-apiserver", err)) + } + if err := csrSigningFilesValid(o.LegacyUnknownSignerConfiguration); err != nil { + errs = append(errs, fmt.Errorf("%q: %v", "cluster-signing-legacy-unknown", err)) + } + + singleSigningFile := len(o.ClusterSigningCertFile) > 0 || len(o.ClusterSigningKeyFile) > 0 + anySpecificFilesSet := len(o.KubeletServingSignerConfiguration.CertFile) > 0 || len(o.KubeletServingSignerConfiguration.KeyFile) > 0 || + len(o.KubeletClientSignerConfiguration.CertFile) > 0 || len(o.KubeletClientSignerConfiguration.KeyFile) > 0 || + len(o.KubeAPIServerClientSignerConfiguration.CertFile) > 0 || len(o.KubeAPIServerClientSignerConfiguration.KeyFile) > 0 || + len(o.LegacyUnknownSignerConfiguration.CertFile) > 0 || len(o.LegacyUnknownSignerConfiguration.KeyFile) > 0 + if singleSigningFile && anySpecificFilesSet { + errs = append(errs, fmt.Errorf("cannot specify --cluster-signing-{cert,key}-file and other --cluster-signing-*-file flags at the same time")) + } + return errs } + +// both must be specified or both must be empty +func csrSigningFilesValid(config csrsigningconfig.CSRSigningConfiguration) error { + switch { + case (len(config.CertFile) == 0) && (len(config.KeyFile) == 0): + return nil + case (len(config.CertFile) != 0) && (len(config.KeyFile) != 0): + return nil + case (len(config.CertFile) == 0) && (len(config.KeyFile) != 0): + return fmt.Errorf("cannot specify key without cert") + case (len(config.CertFile) != 0) && (len(config.KeyFile) == 0): + return fmt.Errorf("cannot specify cert without key") + } + + return fmt.Errorf("math broke") +} diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/endpointslicemirroringcontroller.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/endpointslicemirroringcontroller.go new file mode 100644 index 00000000000..b76f4e0298b --- /dev/null +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/endpointslicemirroringcontroller.go @@ -0,0 +1,86 @@ +/* +Copyright 2020 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 options + +import ( + "fmt" + + "github.com/spf13/pflag" + + endpointslicemirroringconfig "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config" +) + +const ( + mirroringMinConcurrentServiceEndpointSyncs = 1 + mirroringMaxConcurrentServiceEndpointSyncs = 50 + mirroringMinMaxEndpointsPerSubset = 1 + mirroringMaxMaxEndpointsPerSubset = 1000 +) + +// EndpointSliceMirroringControllerOptions holds the +// EndpointSliceMirroringController options. +type EndpointSliceMirroringControllerOptions struct { + *endpointslicemirroringconfig.EndpointSliceMirroringControllerConfiguration +} + +// AddFlags adds flags related to EndpointSliceMirroringController for +// controller manager to the specified FlagSet. +func (o *EndpointSliceMirroringControllerOptions) AddFlags(fs *pflag.FlagSet) { + if o == nil { + return + } + + fs.Int32Var(&o.MirroringConcurrentServiceEndpointSyncs, "mirroring-concurrent-service-endpoint-syncs", o.MirroringConcurrentServiceEndpointSyncs, "The number of service endpoint syncing operations that will be done concurrently by the EndpointSliceMirroring controller. Larger number = faster endpoint slice updating, but more CPU (and network) load. Defaults to 5.") + fs.Int32Var(&o.MirroringMaxEndpointsPerSubset, "mirroring-max-endpoints-per-subset", o.MirroringMaxEndpointsPerSubset, "The maximum number of endpoints that will be added to an EndpointSlice by the EndpointSliceMirroring controller. More endpoints per slice will result in less endpoint slices, but larger resources. Defaults to 100.") + fs.DurationVar(&o.MirroringEndpointUpdatesBatchPeriod.Duration, "mirroring-endpointslice-updates-batch-period", o.MirroringEndpointUpdatesBatchPeriod.Duration, "The length of EndpointSlice updates batching period for EndpointSliceMirroring controller. Processing of EndpointSlice changes will be delayed by this duration to join them with potential upcoming updates and reduce the overall number of EndpointSlice updates. Larger number = higher endpoint programming latency, but lower number of endpoints revision generated") +} + +// ApplyTo fills up EndpointSliceMirroringController config with options. +func (o *EndpointSliceMirroringControllerOptions) ApplyTo(cfg *endpointslicemirroringconfig.EndpointSliceMirroringControllerConfiguration) error { + if o == nil { + return nil + } + + cfg.MirroringConcurrentServiceEndpointSyncs = o.MirroringConcurrentServiceEndpointSyncs + cfg.MirroringMaxEndpointsPerSubset = o.MirroringMaxEndpointsPerSubset + cfg.MirroringEndpointUpdatesBatchPeriod = o.MirroringEndpointUpdatesBatchPeriod + + return nil +} + +// Validate checks validation of EndpointSliceMirroringControllerOptions. +func (o *EndpointSliceMirroringControllerOptions) Validate() []error { + if o == nil { + return nil + } + + errs := []error{} + + if o.MirroringConcurrentServiceEndpointSyncs < mirroringMinConcurrentServiceEndpointSyncs { + errs = append(errs, fmt.Errorf("mirroring-concurrent-service-endpoint-syncs must not be less than %d, but got %d", mirroringMinConcurrentServiceEndpointSyncs, o.MirroringConcurrentServiceEndpointSyncs)) + } else if o.MirroringConcurrentServiceEndpointSyncs > mirroringMaxConcurrentServiceEndpointSyncs { + errs = append(errs, fmt.Errorf("mirroring-concurrent-service-endpoint-syncs must not be more than %d, but got %d", mirroringMaxConcurrentServiceEndpointSyncs, o.MirroringConcurrentServiceEndpointSyncs)) + } + + if o.MirroringMaxEndpointsPerSubset < mirroringMinMaxEndpointsPerSubset { + errs = append(errs, fmt.Errorf("mirroring-max-endpoints-per-subset must not be less than %d, but got %d", mirroringMinMaxEndpointsPerSubset, o.MirroringMaxEndpointsPerSubset)) + } else if o.MirroringMaxEndpointsPerSubset > mirroringMaxMaxEndpointsPerSubset { + errs = append(errs, fmt.Errorf("mirroring-max-endpoints-per-subset must not be more than %d, but got %d", mirroringMaxMaxEndpointsPerSubset, o.MirroringMaxEndpointsPerSubset)) + } + + return errs +} diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/options.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/options.go index 4da25d2eb84..e36bc8ecde5 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/options.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/options.go @@ -33,6 +33,7 @@ import ( "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/record" cliflag "k8s.io/component-base/cli/flag" + "k8s.io/component-base/logs" "k8s.io/component-base/metrics" kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1" cmoptions "k8s.io/kubernetes/cmd/controller-manager/app/options" @@ -45,8 +46,6 @@ import ( // add the kubernetes feature gates _ "k8s.io/kubernetes/pkg/features" - - "k8s.io/klog" ) const ( @@ -68,6 +67,7 @@ type KubeControllerManagerOptions struct { DeprecatedFlags *DeprecatedControllerOptions EndpointController *EndpointControllerOptions EndpointSliceController *EndpointSliceControllerOptions + EndpointSliceMirroringController *EndpointSliceMirroringControllerOptions GarbageCollectorController *GarbageCollectorControllerOptions HPAController *HPAControllerOptions JobController *JobControllerOptions @@ -87,6 +87,8 @@ type KubeControllerManagerOptions struct { InsecureServing *apiserveroptions.DeprecatedInsecureServingOptionsWithLoopback Authentication *apiserveroptions.DelegatingAuthenticationOptions Authorization *apiserveroptions.DelegatingAuthorizationOptions + Metrics *metrics.Options + Logs *logs.Options Master string Kubeconfig string @@ -130,6 +132,9 @@ func NewKubeControllerManagerOptions() (*KubeControllerManagerOptions, error) { EndpointSliceController: &EndpointSliceControllerOptions{ &componentConfig.EndpointSliceController, }, + EndpointSliceMirroringController: &EndpointSliceMirroringControllerOptions{ + &componentConfig.EndpointSliceMirroringController, + }, GarbageCollectorController: &GarbageCollectorControllerOptions{ &componentConfig.GarbageCollectorController, }, @@ -177,6 +182,8 @@ func NewKubeControllerManagerOptions() (*KubeControllerManagerOptions, error) { }).WithLoopback(), Authentication: apiserveroptions.NewDelegatingAuthenticationOptions(), Authorization: apiserveroptions.NewDelegatingAuthorizationOptions(), + Metrics: metrics.NewOptions(), + Logs: logs.NewOptions(), } s.Authentication.RemoteKubeConfigFileOptional = true @@ -233,6 +240,7 @@ func (s *KubeControllerManagerOptions) Flags(allControllers []string, disabledBy s.DeprecatedFlags.AddFlags(fss.FlagSet("deprecated")) s.EndpointController.AddFlags(fss.FlagSet("endpoint controller")) s.EndpointSliceController.AddFlags(fss.FlagSet("endpointslice controller")) + s.EndpointSliceMirroringController.AddFlags(fss.FlagSet("endpointslicemirroring controller")) s.GarbageCollectorController.AddFlags(fss.FlagSet("garbagecollector controller")) s.HPAController.AddFlags(fss.FlagSet("horizontalpodautoscaling controller")) s.JobController.AddFlags(fss.FlagSet("job controller")) @@ -246,20 +254,14 @@ func (s *KubeControllerManagerOptions) Flags(allControllers []string, disabledBy s.ResourceQuotaController.AddFlags(fss.FlagSet("resourcequota controller")) s.SAController.AddFlags(fss.FlagSet("serviceaccount controller")) s.TTLAfterFinishedController.AddFlags(fss.FlagSet("ttl-after-finished controller")) + s.Metrics.AddFlags(fss.FlagSet("metrics")) + s.Logs.AddFlags(fss.FlagSet("logs")) fs := fss.FlagSet("misc") fs.StringVar(&s.Master, "master", s.Master, "The address of the Kubernetes API server (overrides any value in kubeconfig).") fs.StringVar(&s.Kubeconfig, "kubeconfig", s.Kubeconfig, "Path to kubeconfig file with authorization and master location information.") utilfeature.DefaultMutableFeatureGate.AddFlag(fss.FlagSet("generic")) - mfs := fss.FlagSet("metrics") - mfs.StringVar(&s.ShowHiddenMetricsForVersion, "show-hidden-metrics-for-version", s.ShowHiddenMetricsForVersion, - "The previous version for which you want to show hidden metrics. "+ - "Only the previous minor version is meaningful, other values will not be allowed. "+ - "The format is ., e.g.: '1.16'. "+ - "The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, "+ - "rather than being surprised when they are permanently removed in the release after that.") - return fss } @@ -295,6 +297,9 @@ func (s *KubeControllerManagerOptions) ApplyTo(c *kubecontrollerconfig.Config) e if err := s.EndpointSliceController.ApplyTo(&c.ComponentConfig.EndpointSliceController); err != nil { return err } + if err := s.EndpointSliceMirroringController.ApplyTo(&c.ComponentConfig.EndpointSliceMirroringController); err != nil { + return err + } if err := s.GarbageCollectorController.ApplyTo(&c.ComponentConfig.GarbageCollectorController); err != nil { return err } @@ -374,6 +379,7 @@ func (s *KubeControllerManagerOptions) Validate(allControllers []string, disable errs = append(errs, s.DeprecatedFlags.Validate()...) errs = append(errs, s.EndpointController.Validate()...) errs = append(errs, s.EndpointSliceController.Validate()...) + errs = append(errs, s.EndpointSliceMirroringController.Validate()...) errs = append(errs, s.GarbageCollectorController.Validate()...) errs = append(errs, s.HPAController.Validate()...) errs = append(errs, s.JobController.Validate()...) @@ -392,7 +398,8 @@ func (s *KubeControllerManagerOptions) Validate(allControllers []string, disable errs = append(errs, s.InsecureServing.Validate()...) errs = append(errs, s.Authentication.Validate()...) errs = append(errs, s.Authorization.Validate()...) - errs = append(errs, metrics.ValidateShowHiddenMetricsVersion(s.ShowHiddenMetricsForVersion)...) + errs = append(errs, s.Metrics.Validate()...) + errs = append(errs, s.Logs.Validate()...) // TODO: validate component config, master and kubeconfig @@ -440,17 +447,16 @@ func (s KubeControllerManagerOptions) Config(allControllers []string, disabledBy if err := s.ApplyTo(c); err != nil { return nil, err } + s.Metrics.Apply() - if len(s.ShowHiddenMetricsForVersion) > 0 { - metrics.SetShowHidden() - } + s.Logs.Apply() return c, nil } func createRecorder(kubeClient clientset.Interface, userAgent string) record.EventRecorder { eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) return eventBroadcaster.NewRecorder(clientgokubescheme.Scheme, v1.EventSource{Component: userAgent}) } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/plugins.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/plugins.go index 3cefeb38e1e..c7903012a07 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/plugins.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/plugins.go @@ -23,7 +23,7 @@ import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" // Cloud providers cloudprovider "k8s.io/cloud-provider" diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/plugins_providers.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/plugins_providers.go index 0c1fd8d095f..d50bc2f9809 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/plugins_providers.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/plugins_providers.go @@ -21,7 +21,7 @@ package app import ( "k8s.io/component-base/featuregate" "k8s.io/csi-translation-lib/plugins" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/awsebs" @@ -64,6 +64,7 @@ func appendAttachableLegacyProviderVolumes(allPlugins []volume.VolumePlugin, fea pluginMigrationStatus[plugins.GCEPDInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationGCE, pluginMigrationCompleteFeature: features.CSIMigrationGCEComplete, pluginProbeFunction: gcepd.ProbeVolumePlugins} pluginMigrationStatus[plugins.CinderInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationOpenStack, pluginMigrationCompleteFeature: features.CSIMigrationOpenStackComplete, pluginProbeFunction: cinder.ProbeVolumePlugins} pluginMigrationStatus[plugins.AzureDiskInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationAzureDisk, pluginMigrationCompleteFeature: features.CSIMigrationAzureDiskComplete, pluginProbeFunction: azure_dd.ProbeVolumePlugins} + pluginMigrationStatus[plugins.VSphereInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationvSphere, pluginMigrationCompleteFeature: features.CSIMigrationvSphereComplete, pluginProbeFunction: vsphere_volume.ProbeVolumePlugins} var err error for pluginName, pluginInfo := range pluginMigrationStatus { @@ -72,8 +73,6 @@ func appendAttachableLegacyProviderVolumes(allPlugins []volume.VolumePlugin, fea return allPlugins, err } } - - allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...) return allPlugins, nil } @@ -88,6 +87,7 @@ func appendLegacyProviderVolumes(allPlugins []volume.VolumePlugin, featureGate f pluginMigrationStatus[plugins.CinderInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationOpenStack, pluginMigrationCompleteFeature: features.CSIMigrationOpenStackComplete, pluginProbeFunction: cinder.ProbeVolumePlugins} pluginMigrationStatus[plugins.AzureDiskInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationAzureDisk, pluginMigrationCompleteFeature: features.CSIMigrationAzureDiskComplete, pluginProbeFunction: azure_dd.ProbeVolumePlugins} pluginMigrationStatus[plugins.AzureFileInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationAzureFile, pluginMigrationCompleteFeature: features.CSIMigrationAzureFileComplete, pluginProbeFunction: azure_file.ProbeVolumePlugins} + pluginMigrationStatus[plugins.VSphereInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationvSphere, pluginMigrationCompleteFeature: features.CSIMigrationvSphereComplete, pluginProbeFunction: vsphere_volume.ProbeVolumePlugins} var err error for pluginName, pluginInfo := range pluginMigrationStatus { @@ -96,7 +96,5 @@ func appendLegacyProviderVolumes(allPlugins []volume.VolumePlugin, featureGate f return allPlugins, err } } - - allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...) return allPlugins, nil } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/policy.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/policy.go index 6cb574a076c..a3aa4aae210 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/policy.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/policy.go @@ -23,7 +23,7 @@ package app import ( "net/http" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/runtime/schema" utilfeature "k8s.io/apiserver/pkg/util/feature" diff --git a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/BUILD index 9ef541d7b1d..5c166d08323 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/BUILD @@ -34,7 +34,6 @@ go_library( "//pkg/proxy/ipvs:go_default_library", "//pkg/proxy/userspace:go_default_library", "//pkg/proxy/util:go_default_library", - "//pkg/util/configz:go_default_library", "//pkg/util/filesystem:go_default_library", "//pkg/util/flag:go_default_library", "//pkg/util/ipset:go_default_library", @@ -64,6 +63,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/config:go_default_library", + "//staging/src/k8s.io/component-base/configz:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//staging/src/k8s.io/component-base/version:go_default_library", "//staging/src/k8s.io/component-base/version/verflag:go_default_library", @@ -72,11 +72,24 @@ go_library( "//vendor/github.com/pkg/errors:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//pkg/proxy/metrics:go_default_library", + "//pkg/proxy/util/iptables:go_default_library", + "//pkg/util/node:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + "//staging/src/k8s.io/client-go/tools/watch:go_default_library", + "//staging/src/k8s.io/component-base/metrics:go_default_library", + "//vendor/github.com/opencontainers/runc/libcontainer/system:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//pkg/proxy/metrics:go_default_library", "//pkg/proxy/util/iptables:go_default_library", @@ -129,6 +142,19 @@ go_library( "//vendor/github.com/opencontainers/runc/libcontainer/system:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/proxy/metrics:go_default_library", + "//pkg/proxy/util/iptables:go_default_library", + "//pkg/util/node:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + "//staging/src/k8s.io/client-go/tools/watch:go_default_library", + "//staging/src/k8s.io/component-base/metrics:go_default_library", + "//vendor/github.com/opencontainers/runc/libcontainer/system:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/proxy/metrics:go_default_library", "//pkg/proxy/util/iptables:go_default_library", @@ -142,6 +168,19 @@ go_library( "//vendor/github.com/opencontainers/runc/libcontainer/system:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//pkg/proxy/metrics:go_default_library", + "//pkg/proxy/util/iptables:go_default_library", + "//pkg/util/node:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + "//staging/src/k8s.io/client-go/tools/watch:go_default_library", + "//staging/src/k8s.io/component-base/metrics:go_default_library", + "//vendor/github.com/opencontainers/runc/libcontainer/system:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//pkg/proxy/metrics:go_default_library", "//pkg/proxy/util/iptables:go_default_library", @@ -229,6 +268,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", ], "//conditions:default": [], }), @@ -243,19 +283,27 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/proxy/apis/config:go_default_library", - "//pkg/util/configz:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/component-base/config:go_default_library", "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//pkg/proxy/ipvs:go_default_library", + "//pkg/proxy/util/iptables:go_default_library", + "//pkg/util/iptables:go_default_library", + "//pkg/util/iptables/testing:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//pkg/proxy/ipvs:go_default_library", "//pkg/proxy/util/iptables:go_default_library", "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], "@io_bazel_rules_go//go/platform:darwin": [ "//pkg/proxy/ipvs:go_default_library", @@ -263,6 +311,7 @@ go_test( "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], "@io_bazel_rules_go//go/platform:dragonfly": [ "//pkg/proxy/ipvs:go_default_library", @@ -270,6 +319,7 @@ go_test( "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], "@io_bazel_rules_go//go/platform:freebsd": [ "//pkg/proxy/ipvs:go_default_library", @@ -277,6 +327,15 @@ go_test( "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/proxy/ipvs:go_default_library", + "//pkg/proxy/util/iptables:go_default_library", + "//pkg/util/iptables:go_default_library", + "//pkg/util/iptables/testing:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/proxy/ipvs:go_default_library", @@ -284,6 +343,15 @@ go_test( "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + ], + "@io_bazel_rules_go//go/platform:js": [ + "//pkg/proxy/ipvs:go_default_library", + "//pkg/proxy/util/iptables:go_default_library", + "//pkg/util/iptables:go_default_library", + "//pkg/util/iptables/testing:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ "//pkg/proxy/ipvs:go_default_library", @@ -291,6 +359,7 @@ go_test( "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], "@io_bazel_rules_go//go/platform:nacl": [ "//pkg/proxy/ipvs:go_default_library", @@ -298,6 +367,7 @@ go_test( "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], "@io_bazel_rules_go//go/platform:netbsd": [ "//pkg/proxy/ipvs:go_default_library", @@ -305,6 +375,7 @@ go_test( "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], "@io_bazel_rules_go//go/platform:openbsd": [ "//pkg/proxy/ipvs:go_default_library", @@ -312,6 +383,7 @@ go_test( "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], "@io_bazel_rules_go//go/platform:plan9": [ "//pkg/proxy/ipvs:go_default_library", @@ -319,6 +391,7 @@ go_test( "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], "@io_bazel_rules_go//go/platform:solaris": [ "//pkg/proxy/ipvs:go_default_library", @@ -326,6 +399,7 @@ go_test( "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], "//conditions:default": [], }), diff --git a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/conntrack.go b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/conntrack.go index b474a1b21ae..5a6cf7827d3 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/conntrack.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/conntrack.go @@ -22,7 +22,7 @@ import ( "strconv" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" "k8s.io/kubernetes/pkg/util/sysctl" diff --git a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go index 841fba1d3b9..c5739efd11b 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go @@ -55,10 +55,11 @@ import ( "k8s.io/client-go/tools/record" cliflag "k8s.io/component-base/cli/flag" componentbaseconfig "k8s.io/component-base/config" + "k8s.io/component-base/configz" "k8s.io/component-base/metrics/legacyregistry" "k8s.io/component-base/version" "k8s.io/component-base/version/verflag" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kube-proxy/config/v1alpha1" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/features" @@ -76,7 +77,6 @@ import ( "k8s.io/kubernetes/pkg/proxy/ipvs" "k8s.io/kubernetes/pkg/proxy/userspace" proxyutil "k8s.io/kubernetes/pkg/proxy/util" - "k8s.io/kubernetes/pkg/util/configz" "k8s.io/kubernetes/pkg/util/filesystem" utilflag "k8s.io/kubernetes/pkg/util/flag" utilipset "k8s.io/kubernetes/pkg/util/ipset" @@ -168,8 +168,9 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) { fs.Var(utilflag.IPVar{Val: &o.config.BindAddress}, "bind-address", "The IP address for the proxy server to serve on (set to '0.0.0.0' for all IPv4 interfaces and '::' for all IPv6 interfaces)") fs.Var(utilflag.IPPortVar{Val: &o.config.HealthzBindAddress}, "healthz-bind-address", "The IP address with port for the health check server to serve on (set to '0.0.0.0:10256' for all IPv4 interfaces and '[::]:10256' for all IPv6 interfaces). Set empty to disable.") fs.Var(utilflag.IPPortVar{Val: &o.config.MetricsBindAddress}, "metrics-bind-address", "The IP address with port for the metrics server to serve on (set to '0.0.0.0:10249' for all IPv4 interfaces and '[::]:10249' for all IPv6 interfaces). Set empty to disable.") + fs.BoolVar(&o.config.BindAddressHardFail, "bind-address-hard-fail", o.config.BindAddressHardFail, "If true kube-proxy will treat failure to bind to a port as fatal and exit") fs.Var(utilflag.PortRangeVar{Val: &o.config.PortRange}, "proxy-port-range", "Range of host ports (beginPort-endPort, single port or beginPort+offset, inclusive) that may be consumed in order to proxy service traffic. If (unspecified, 0, or 0-0) then ports will be randomly chosen.") - fs.Var(&o.config.Mode, "proxy-mode", "Which proxy mode to use: 'userspace' (older) or 'iptables' (faster) or 'ipvs'. If blank, use the best-available proxy (currently iptables). If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls back to the userspace proxy.") + fs.Var(&o.config.Mode, "proxy-mode", "Which proxy mode to use: 'userspace' (older) or 'iptables' (faster) or 'ipvs' or 'kernelspace' (windows). If blank, use the best-available proxy (currently iptables). If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls back to the userspace proxy.") fs.Var(cliflag.NewMapStringBool(&o.config.FeatureGates), "feature-gates", "A set of key=value pairs that describe feature gates for alpha/experimental features. "+ "Options are:\n"+strings.Join(utilfeature.DefaultFeatureGate.KnownFeatures(), "\n")) @@ -293,10 +294,7 @@ func (o *Options) processHostnameOverrideFlag() error { } // Validate validates all the required options. -func (o *Options) Validate(args []string) error { - if len(args) != 0 { - return errors.New("no arguments are supported") - } +func (o *Options) Validate() error { if errs := validation.Validate(o.config); len(errs) != 0 { return errs.ToAggregate() } @@ -480,7 +478,7 @@ addon that provides cluster DNS for these cluster IPs. The user must create a se with the apiserver API to configure the proxy.`, Run: func(cmd *cobra.Command, args []string) { verflag.PrintAndExitIfRequested() - utilflag.PrintFlags(cmd.Flags()) + cliflag.PrintFlags(cmd.Flags()) if err := initForOS(opts.WindowsService); err != nil { klog.Fatalf("failed OS init: %v", err) @@ -489,7 +487,7 @@ with the apiserver API to configure the proxy.`, if err := opts.Complete(); err != nil { klog.Fatalf("failed complete: %v", err) } - if err := opts.Validate(args); err != nil { + if err := opts.Validate(); err != nil { klog.Fatalf("failed validate: %v", err) } @@ -497,6 +495,14 @@ with the apiserver API to configure the proxy.`, klog.Exit(err) } }, + Args: func(cmd *cobra.Command, args []string) error { + for _, arg := range args { + if len(arg) > 0 { + return fmt.Errorf("%q does not take any arguments, got %q", cmd.CommandPath(), args) + } + } + return nil + }, } var err error @@ -531,6 +537,7 @@ type ProxyServer struct { NodeRef *v1.ObjectReference CleanupIPVS bool MetricsBindAddress string + BindAddressHardFail bool EnableProfiling bool UseEndpointSlices bool OOMScoreAdj *int32 @@ -576,6 +583,66 @@ func createClients(config componentbaseconfig.ClientConnectionConfiguration, mas return client, eventClient.CoreV1(), nil } +func serveHealthz(hz healthcheck.ProxierHealthUpdater, errCh chan error) { + if hz == nil { + return + } + + fn := func() { + err := hz.Run() + if err != nil { + klog.Errorf("healthz server failed: %v", err) + if errCh != nil { + errCh <- fmt.Errorf("healthz server failed: %v", err) + // if in hardfail mode, never retry again + blockCh := make(chan error) + <-blockCh + } + } else { + klog.Errorf("healthz server returned without error") + } + } + go wait.Until(fn, 5*time.Second, wait.NeverStop) +} + +func serveMetrics(bindAddress, proxyMode string, enableProfiling bool, errCh chan error) { + if len(bindAddress) == 0 { + return + } + + proxyMux := mux.NewPathRecorderMux("kube-proxy") + healthz.InstallHandler(proxyMux) + proxyMux.HandleFunc("/proxyMode", func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "text/plain; charset=utf-8") + w.Header().Set("X-Content-Type-Options", "nosniff") + fmt.Fprintf(w, "%s", proxyMode) + }) + + //lint:ignore SA1019 See the Metrics Stability Migration KEP + proxyMux.Handle("/metrics", legacyregistry.Handler()) + + if enableProfiling { + routes.Profiling{}.Install(proxyMux) + } + + configz.InstallHandler(proxyMux) + + fn := func() { + err := http.ListenAndServe(bindAddress, proxyMux) + if err != nil { + err = fmt.Errorf("starting metrics server failed: %v", err) + utilruntime.HandleError(err) + if errCh != nil { + errCh <- err + // if in hardfail mode, never retry again + blockCh := make(chan error) + <-blockCh + } + } + } + go wait.Until(fn, 5*time.Second, wait.NeverStop) +} + // Run runs the specified ProxyServer. This should never exit (unless CleanupAndExit is set). // TODO: At the moment, Run() cannot return a nil error, otherwise it's caller will never exit. Update callers of Run to handle nil errors. func (s *ProxyServer) Run() error { @@ -595,33 +662,18 @@ func (s *ProxyServer) Run() error { s.Broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: s.EventClient.Events("")}) } - // Start up a healthz server if requested - if s.HealthzServer != nil { - s.HealthzServer.Run() + // TODO(thockin): make it possible for healthz and metrics to be on the same port. + + var errCh chan error + if s.BindAddressHardFail { + errCh = make(chan error) } + // Start up a healthz server if requested + serveHealthz(s.HealthzServer, errCh) + // Start up a metrics server if requested - if len(s.MetricsBindAddress) > 0 { - proxyMux := mux.NewPathRecorderMux("kube-proxy") - healthz.InstallHandler(proxyMux) - proxyMux.HandleFunc("/proxyMode", func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "text/plain; charset=utf-8") - w.Header().Set("X-Content-Type-Options", "nosniff") - fmt.Fprintf(w, "%s", s.ProxyMode) - }) - //lint:ignore SA1019 See the Metrics Stability Migration KEP - proxyMux.Handle("/metrics", legacyregistry.Handler()) - if s.EnableProfiling { - routes.Profiling{}.Install(proxyMux) - } - configz.InstallHandler(proxyMux) - go wait.Until(func() { - err := http.ListenAndServe(s.MetricsBindAddress, proxyMux) - if err != nil { - utilruntime.HandleError(fmt.Errorf("starting metrics server failed: %v", err)) - } - }, 5*time.Second, wait.NeverStop) - } + serveMetrics(s.MetricsBindAddress, s.ProxyMode, s.EnableProfiling, errCh) // Tune conntrack, if requested // Conntracker is always nil for windows @@ -723,9 +775,9 @@ func (s *ProxyServer) Run() error { // Birth Cry after the birth is successful s.birthCry() - // Just loop forever for now... - s.Proxier.SyncLoop() - return nil + go s.Proxier.SyncLoop() + + return <-errCh } func (s *ProxyServer) birthCry() { diff --git a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go index bae72c8f33e..21f41f24fc2 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go @@ -45,6 +45,7 @@ import ( clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/record" toolswatch "k8s.io/client-go/tools/watch" + "k8s.io/component-base/configz" "k8s.io/component-base/metrics" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/proxy" @@ -56,7 +57,6 @@ import ( proxymetrics "k8s.io/kubernetes/pkg/proxy/metrics" "k8s.io/kubernetes/pkg/proxy/userspace" proxyutiliptables "k8s.io/kubernetes/pkg/proxy/util/iptables" - "k8s.io/kubernetes/pkg/util/configz" utilipset "k8s.io/kubernetes/pkg/util/ipset" utiliptables "k8s.io/kubernetes/pkg/util/iptables" utilipvs "k8s.io/kubernetes/pkg/util/ipvs" @@ -65,7 +65,7 @@ import ( "k8s.io/utils/exec" utilsnet "k8s.io/utils/net" - "k8s.io/klog" + "k8s.io/klog/v2" ) // timeoutForNodePodCIDR is the time to wait for allocators to assign a PodCIDR to the @@ -92,10 +92,24 @@ func newProxyServer( return nil, fmt.Errorf("unable to register configz: %s", err) } - protocol := utiliptables.ProtocolIpv4 - if net.ParseIP(config.BindAddress).To4() == nil { - klog.V(0).Infof("IPv6 bind address (%s), assume IPv6 operation", config.BindAddress) - protocol = utiliptables.ProtocolIpv6 + hostname, err := utilnode.GetHostname(config.HostnameOverride) + if err != nil { + return nil, err + } + + client, eventClient, err := createClients(config.ClientConnection, master) + if err != nil { + return nil, err + } + + nodeIP := detectNodeIP(client, hostname, config.BindAddress) + + protocol := utiliptables.ProtocolIPv4 + if utilsnet.IsIPv6(nodeIP) { + klog.V(0).Infof("kube-proxy node IP is an IPv6 address (%s), assume IPv6 operation", nodeIP.String()) + protocol = utiliptables.ProtocolIPv6 + } else { + klog.V(0).Infof("kube-proxy node IP is an IPv4 address (%s), assume IPv4 operation", nodeIP.String()) } var iptInterface utiliptables.Interface @@ -109,7 +123,11 @@ func newProxyServer( iptInterface = utiliptables.New(execer, protocol) kernelHandler = ipvs.NewLinuxKernelHandler() ipsetInterface = utilipset.New(execer) - canUseIPVS, _ := ipvs.CanUseIPVSProxier(kernelHandler, ipsetInterface) + canUseIPVS, err := ipvs.CanUseIPVSProxier(kernelHandler, ipsetInterface) + if string(config.Mode) == proxyModeIPVS && err != nil { + klog.Errorf("Can't use the IPVS proxier: %v", err) + } + if canUseIPVS { ipvsInterface = utilipvs.New(execer) } @@ -128,16 +146,7 @@ func newProxyServer( metrics.SetShowHidden() } - client, eventClient, err := createClients(config.ClientConnection, master) - if err != nil { - return nil, err - } - // Create event recorder - hostname, err := utilnode.GetHostname(config.HostnameOverride) - if err != nil { - return nil, err - } eventBroadcaster := record.NewBroadcaster() recorder := eventBroadcaster.NewRecorder(proxyconfigscheme.Scheme, v1.EventSource{Component: "kube-proxy", Host: hostname}) @@ -156,7 +165,7 @@ func newProxyServer( var proxier proxy.Provider var detectLocalMode proxyconfigapi.LocalMode - proxyMode := getProxyMode(string(config.Mode), kernelHandler, ipsetInterface, iptables.LinuxKernelCompatTester{}) + proxyMode := getProxyMode(string(config.Mode), canUseIPVS, iptables.LinuxKernelCompatTester{}) detectLocalMode, err = getDetectLocalMode(config) if err != nil { return nil, fmt.Errorf("cannot determine detect-local-mode: %v", err) @@ -172,15 +181,6 @@ func newProxyServer( klog.Infof("NodeInfo PodCIDR: %v, PodCIDRs: %v", nodeInfo.Spec.PodCIDR, nodeInfo.Spec.PodCIDRs) } - nodeIP := net.ParseIP(config.BindAddress) - if nodeIP.IsUnspecified() { - nodeIP = utilnode.GetNodeIP(client, hostname) - if nodeIP == nil { - klog.V(0).Infof("can't determine this node's IP, assuming 127.0.0.1; if this is incorrect, please set the --bind-address flag") - nodeIP = net.ParseIP("127.0.0.1") - } - } - klog.V(2).Info("DetectLocalMode: '", string(detectLocalMode), "'") if proxyMode == proxyModeIPTables { @@ -196,12 +196,12 @@ func newProxyServer( // Create iptables handlers for both families, one is already created // Always ordered as IPv4, IPv6 var ipt [2]utiliptables.Interface - if iptInterface.IsIpv6() { + if iptInterface.IsIPv6() { ipt[1] = iptInterface - ipt[0] = utiliptables.New(execer, utiliptables.ProtocolIpv4) + ipt[0] = utiliptables.New(execer, utiliptables.ProtocolIPv4) } else { ipt[0] = iptInterface - ipt[1] = utiliptables.New(execer, utiliptables.ProtocolIpv6) + ipt[1] = utiliptables.New(execer, utiliptables.ProtocolIPv6) } // Always ordered to match []ipt @@ -264,12 +264,12 @@ func newProxyServer( // Create iptables handlers for both families, one is already created // Always ordered as IPv4, IPv6 var ipt [2]utiliptables.Interface - if iptInterface.IsIpv6() { + if iptInterface.IsIPv6() { ipt[1] = iptInterface - ipt[0] = utiliptables.New(execer, utiliptables.ProtocolIpv4) + ipt[0] = utiliptables.New(execer, utiliptables.ProtocolIPv4) } else { ipt[0] = iptInterface - ipt[1] = utiliptables.New(execer, utiliptables.ProtocolIpv6) + ipt[1] = utiliptables.New(execer, utiliptables.ProtocolIPv6) } nodeIPs := nodeIPTuple(config.BindAddress) @@ -303,6 +303,7 @@ func newProxyServer( healthzServer, config.IPVS.Scheduler, config.NodePortAddresses, + kernelHandler, ) } else { var localDetector proxyutiliptables.LocalTrafficDetector @@ -333,6 +334,7 @@ func newProxyServer( healthzServer, config.IPVS.Scheduler, config.NodePortAddresses, + kernelHandler, ) } if err != nil { @@ -380,6 +382,7 @@ func newProxyServer( ProxyMode: proxyMode, NodeRef: nodeRef, MetricsBindAddress: config.MetricsBindAddress, + BindAddressHardFail: config.BindAddressHardFail, EnableProfiling: config.EnableProfiling, OOMScoreAdj: config.OOMScoreAdj, ConfigSyncPeriod: config.ConfigSyncPeriod.Duration, @@ -422,6 +425,23 @@ func waitForPodCIDR(client clientset.Interface, nodeName string) (*v1.Node, erro return nil, fmt.Errorf("event object not of type node") } +// detectNodeIP returns the nodeIP used by the proxier +// The order of precedence is: +// 1. config.bindAddress if bindAddress is not 0.0.0.0 or :: +// 2. the primary IP from the Node object, if set +// 3. if no IP is found it defaults to 127.0.0.1 and IPv4 +func detectNodeIP(client clientset.Interface, hostname, bindAddress string) net.IP { + nodeIP := net.ParseIP(bindAddress) + if nodeIP.IsUnspecified() { + nodeIP = utilnode.GetNodeIP(client, hostname) + } + if nodeIP == nil { + klog.V(0).Infof("can't determine this node's IP, assuming 127.0.0.1; if this is incorrect, please set the --bind-address flag") + nodeIP = net.ParseIP("127.0.0.1") + } + return nodeIP +} + func getDetectLocalMode(config *proxyconfigapi.KubeProxyConfiguration) (proxyconfigapi.LocalMode, error) { mode := config.DetectLocalMode switch mode { @@ -554,28 +574,21 @@ func nodeIPTuple(bindAddress string) [2]net.IP { return nodes } -func getProxyMode(proxyMode string, khandle ipvs.KernelHandler, ipsetver ipvs.IPSetVersioner, kcompat iptables.KernelCompatTester) string { +func getProxyMode(proxyMode string, canUseIPVS bool, kcompat iptables.KernelCompatTester) string { switch proxyMode { case proxyModeUserspace: return proxyModeUserspace case proxyModeIPTables: return tryIPTablesProxy(kcompat) case proxyModeIPVS: - return tryIPVSProxy(khandle, ipsetver, kcompat) + return tryIPVSProxy(canUseIPVS, kcompat) } klog.Warningf("Unknown proxy mode %q, assuming iptables proxy", proxyMode) return tryIPTablesProxy(kcompat) } -func tryIPVSProxy(khandle ipvs.KernelHandler, ipsetver ipvs.IPSetVersioner, kcompat iptables.KernelCompatTester) string { - // guaranteed false on error, error only necessary for debugging - // IPVS Proxier relies on ip_vs_* kernel modules and ipset - useIPVSProxy, err := ipvs.CanUseIPVSProxier(khandle, ipsetver) - if err != nil { - // Try to fallback to iptables before falling back to userspace - utilruntime.HandleError(fmt.Errorf("can't determine whether to use ipvs proxy, error: %v", err)) - } - if useIPVSProxy { +func tryIPVSProxy(canUseIPVS bool, kcompat iptables.KernelCompatTester) string { + if canUseIPVS { return proxyModeIPVS } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_windows.go b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_windows.go index a2e6d2c63e0..759f04b0886 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_windows.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_windows.go @@ -28,23 +28,25 @@ import ( // Enable pprof HTTP handlers. _ "net/http/pprof" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" utilnet "k8s.io/apimachinery/pkg/util/net" + utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/tools/record" + "k8s.io/component-base/configz" "k8s.io/component-base/metrics" + "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/proxy" proxyconfigapi "k8s.io/kubernetes/pkg/proxy/apis/config" proxyconfigscheme "k8s.io/kubernetes/pkg/proxy/apis/config/scheme" "k8s.io/kubernetes/pkg/proxy/healthcheck" "k8s.io/kubernetes/pkg/proxy/winkernel" "k8s.io/kubernetes/pkg/proxy/winuserspace" - "k8s.io/kubernetes/pkg/util/configz" utilnetsh "k8s.io/kubernetes/pkg/util/netsh" utilnode "k8s.io/kubernetes/pkg/util/node" "k8s.io/utils/exec" - - "k8s.io/klog" + utilsnet "k8s.io/utils/net" ) // NewProxyServer returns a new ProxyServer. @@ -102,18 +104,39 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi proxyMode := getProxyMode(string(config.Mode), winkernel.WindowsKernelCompatTester{}) if proxyMode == proxyModeKernelspace { klog.V(0).Info("Using Kernelspace Proxier.") - proxier, err = winkernel.NewProxier( - config.IPTables.SyncPeriod.Duration, - config.IPTables.MinSyncPeriod.Duration, - config.IPTables.MasqueradeAll, - int(*config.IPTables.MasqueradeBit), - config.ClusterCIDR, - hostname, - utilnode.GetNodeIP(client, hostname), - recorder, - healthzServer, - config.Winkernel, - ) + isIPv6DualStackEnabled := utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) + if isIPv6DualStackEnabled { + klog.V(0).Info("creating dualStackProxier for Windows kernel.") + + proxier, err = winkernel.NewDualStackProxier( + config.IPTables.SyncPeriod.Duration, + config.IPTables.MinSyncPeriod.Duration, + config.IPTables.MasqueradeAll, + int(*config.IPTables.MasqueradeBit), + config.ClusterCIDR, + hostname, + nodeIPTuple(config.BindAddress), + recorder, + healthzServer, + config.Winkernel, + ) + } else { + + proxier, err = winkernel.NewProxier( + config.IPTables.SyncPeriod.Duration, + config.IPTables.MinSyncPeriod.Duration, + config.IPTables.MasqueradeAll, + int(*config.IPTables.MasqueradeBit), + config.ClusterCIDR, + hostname, + utilnode.GetNodeIP(client, hostname), + recorder, + healthzServer, + config.Winkernel, + ) + + } + if err != nil { return nil, fmt.Errorf("unable to create proxier: %v", err) } @@ -138,19 +161,20 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi } return &ProxyServer{ - Client: client, - EventClient: eventClient, - Proxier: proxier, - Broadcaster: eventBroadcaster, - Recorder: recorder, - ProxyMode: proxyMode, - NodeRef: nodeRef, - MetricsBindAddress: config.MetricsBindAddress, - EnableProfiling: config.EnableProfiling, - OOMScoreAdj: config.OOMScoreAdj, - ConfigSyncPeriod: config.ConfigSyncPeriod.Duration, - HealthzServer: healthzServer, - UseEndpointSlices: false, + Client: client, + EventClient: eventClient, + Proxier: proxier, + Broadcaster: eventBroadcaster, + Recorder: recorder, + ProxyMode: proxyMode, + NodeRef: nodeRef, + MetricsBindAddress: config.MetricsBindAddress, + BindAddressHardFail: config.BindAddressHardFail, + EnableProfiling: config.EnableProfiling, + OOMScoreAdj: config.OOMScoreAdj, + ConfigSyncPeriod: config.ConfigSyncPeriod.Duration, + HealthzServer: healthzServer, + UseEndpointSlices: utilfeature.DefaultFeatureGate.Enabled(features.WindowsEndpointSliceProxying), }, nil } @@ -180,3 +204,19 @@ func tryWinKernelSpaceProxy(kcompat winkernel.KernelCompatTester) string { klog.V(1).Infof("Can't use winkernel proxy, using userspace proxier") return proxyModeUserspace } + +// nodeIPTuple takes an addresses and return a tuple (ipv4,ipv6) +// The returned tuple is guaranteed to have the order (ipv4,ipv6). The address NOT of the passed address +// will have "any" address (0.0.0.0 or ::) inserted. +func nodeIPTuple(bindAddress string) [2]net.IP { + nodes := [2]net.IP{net.IPv4zero, net.IPv6zero} + + adr := net.ParseIP(bindAddress) + if utilsnet.IsIPv6(adr) { + nodes[1] = adr + } else { + nodes[0] = adr + } + + return nodes +} diff --git a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/BUILD index eb071684b88..8a091fc21cb 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/BUILD @@ -3,6 +3,7 @@ package(default_visibility = ["//visibility:public"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", + "go_test", ) go_library( @@ -15,13 +16,9 @@ go_library( "//pkg/api/legacyscheme:go_default_library", "//pkg/scheduler:go_default_library", "//pkg/scheduler/apis/config:go_default_library", - "//pkg/scheduler/framework/v1alpha1:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/metrics:go_default_library", "//pkg/scheduler/profile:go_default_library", - "//pkg/util/configz:go_default_library", - "//pkg/util/flag:go_default_library", - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/api/events/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", @@ -31,20 +28,18 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/server/healthz:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/mux:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/routes:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/term:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/events:go_default_library", "//staging/src/k8s.io/client-go/tools/leaderelection:go_default_library", - "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/cli/globalflag:go_default_library", + "//staging/src/k8s.io/component-base/configz:go_default_library", "//staging/src/k8s.io/component-base/logs:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", + "//staging/src/k8s.io/component-base/term:go_default_library", "//staging/src/k8s.io/component-base/version:go_default_library", "//staging/src/k8s.io/component-base/version/verflag:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -65,3 +60,15 @@ filegroup( ], tags = ["automanaged"], ) + +go_test( + name = "go_default_test", + srcs = ["server_test.go"], + embed = [":go_default_library"], + deps = [ + "//cmd/kube-scheduler/app/options:go_default_library", + "//pkg/scheduler/apis/config:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/config/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/config/BUILD index 7d4915b98e2..79ddd23c8a1 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/config/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/config/BUILD @@ -11,12 +11,9 @@ go_library( "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/events:go_default_library", "//staging/src/k8s.io/client-go/tools/leaderelection:go_default_library", - "//staging/src/k8s.io/client-go/tools/record:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/config/config.go b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/config/config.go index a3d5932dca9..dc85e6ab6eb 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/config/config.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/config/config.go @@ -21,12 +21,9 @@ import ( "k8s.io/client-go/informers" coreinformers "k8s.io/client-go/informers/core/v1" clientset "k8s.io/client-go/kubernetes" - v1core "k8s.io/client-go/kubernetes/typed/core/v1" - "k8s.io/client-go/kubernetes/typed/events/v1beta1" restclient "k8s.io/client-go/rest" "k8s.io/client-go/tools/events" "k8s.io/client-go/tools/leaderelection" - "k8s.io/client-go/tools/record" kubeschedulerconfig "k8s.io/kubernetes/pkg/scheduler/apis/config" ) @@ -48,12 +45,8 @@ type Config struct { InformerFactory informers.SharedInformerFactory PodInformer coreinformers.PodInformer - // TODO: Remove the following after fully migrating to the new events api. - CoreEventClient v1core.EventsGetter - CoreBroadcaster record.EventBroadcaster - - EventClient v1beta1.EventsGetter - Broadcaster events.EventBroadcaster + //lint:ignore SA1019 this deprecated field still needs to be used for now. It will be removed once the migration is done. + EventBroadcaster events.EventBroadcasterAdapter // LeaderElection is optional. LeaderElection *leaderelection.LeaderElectionConfig diff --git a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/BUILD index efd0a6bee74..0465bf688cd 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/BUILD @@ -12,16 +12,12 @@ go_library( visibility = ["//visibility:public"], deps = [ "//cmd/kube-scheduler/app/config:go_default_library", - "//pkg/client/leaderelectionconfig:go_default_library", - "//pkg/master/ports:go_default_library", "//pkg/scheduler:go_default_library", "//pkg/scheduler/algorithmprovider:go_default_library", "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/apis/config/scheme:go_default_library", - "//pkg/scheduler/apis/config/v1alpha1:go_default_library", - "//pkg/scheduler/apis/config/v1alpha2:go_default_library", + "//pkg/scheduler/apis/config/v1beta1:go_default_library", "//pkg/scheduler/apis/config/validation:go_default_library", - "//pkg/scheduler/framework/plugins:go_default_library", "//pkg/scheduler/framework/plugins/interpodaffinity:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -32,21 +28,22 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd/api:go_default_library", + "//staging/src/k8s.io/client-go/tools/events:go_default_library", "//staging/src/k8s.io/client-go/tools/leaderelection:go_default_library", "//staging/src/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", - "//staging/src/k8s.io/component-base/codec:go_default_library", "//staging/src/k8s.io/component-base/config:go_default_library", + "//staging/src/k8s.io/component-base/config/options:go_default_library", "//staging/src/k8s.io/component-base/config/v1alpha1:go_default_library", + "//staging/src/k8s.io/component-base/logs:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", - "//staging/src/k8s.io/kube-scheduler/config/v1alpha2:go_default_library", + "//staging/src/k8s.io/kube-scheduler/config/v1beta1:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -75,11 +72,13 @@ go_test( deps = [ "//cmd/kube-scheduler/app/config:go_default_library", "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/framework/plugins/interpodaffinity:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/options:go_default_library", "//staging/src/k8s.io/component-base/config:go_default_library", + "//staging/src/k8s.io/component-base/logs:go_default_library", "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/configfile.go b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/configfile.go index 5b6479d7a42..071de9c57c6 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/configfile.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/configfile.go @@ -21,14 +21,10 @@ import ( "io/ioutil" "os" - "k8s.io/klog" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/component-base/codec" kubeschedulerconfig "k8s.io/kubernetes/pkg/scheduler/apis/config" kubeschedulerscheme "k8s.io/kubernetes/pkg/scheduler/apis/config/scheme" - kubeschedulerconfigv1alpha1 "k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1" - kubeschedulerconfigv1alpha2 "k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2" + kubeschedulerconfigv1beta1 "k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1" ) func loadConfigFromFile(file string) (*kubeschedulerconfig.KubeSchedulerConfiguration, error) { @@ -44,26 +40,7 @@ func loadConfig(data []byte) (*kubeschedulerconfig.KubeSchedulerConfiguration, e // The UniversalDecoder runs defaulting and returns the internal type by default. obj, gvk, err := kubeschedulerscheme.Codecs.UniversalDecoder().Decode(data, nil, nil) if err != nil { - // Try strict decoding first. If that fails decode with a lenient - // decoder, which has only v1alpha1 registered, and log a warning. - // The lenient path is to be dropped when support for v1alpha1 is dropped. - if !runtime.IsStrictDecodingError(err) { - return nil, err - } - - var lenientErr error - _, lenientCodecs, lenientErr := codec.NewLenientSchemeAndCodecs( - kubeschedulerconfig.AddToScheme, - kubeschedulerconfigv1alpha1.AddToScheme, - ) - if lenientErr != nil { - return nil, lenientErr - } - obj, gvk, lenientErr = lenientCodecs.UniversalDecoder().Decode(data, nil, nil) - if lenientErr != nil { - return nil, err - } - klog.Warningf("using lenient decoding as strict decoding failed: %v", err) + return nil, err } if cfgObj, ok := obj.(*kubeschedulerconfig.KubeSchedulerConfiguration); ok { return cfgObj, nil @@ -79,7 +56,7 @@ func WriteConfigFile(fileName string, cfg *kubeschedulerconfig.KubeSchedulerConf return fmt.Errorf("unable to locate encoder -- %q is not a supported media type", mediaType) } - encoder := kubeschedulerscheme.Codecs.EncoderForVersion(info.Serializer, kubeschedulerconfigv1alpha2.SchemeGroupVersion) + encoder := kubeschedulerscheme.Codecs.EncoderForVersion(info.Serializer, kubeschedulerconfigv1beta1.SchemeGroupVersion) configFile, err := os.Create(fileName) if err != nil { diff --git a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/deprecated.go b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/deprecated.go index badb7063194..089c510f825 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/deprecated.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/deprecated.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/kubernetes/pkg/scheduler/algorithmprovider" kubeschedulerconfig "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins" + "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity" ) @@ -47,12 +47,12 @@ func (o *DeprecatedOptions) AddFlags(fs *pflag.FlagSet, cfg *kubeschedulerconfig return } - fs.StringVar(&o.AlgorithmProvider, "algorithm-provider", o.AlgorithmProvider, "DEPRECATED: the scheduling algorithm provider to use, one of: "+algorithmprovider.ListAlgorithmProviders()) - fs.StringVar(&o.PolicyConfigFile, "policy-config-file", o.PolicyConfigFile, "DEPRECATED: file with scheduler policy configuration. This file is used if policy ConfigMap is not provided or --use-legacy-policy-config=true") - usage := fmt.Sprintf("DEPRECATED: name of the ConfigMap object that contains scheduler's policy configuration. It must exist in the system namespace before scheduler initialization if --use-legacy-policy-config=false. The config must be provided as the value of an element in 'Data' map with the key='%v'", kubeschedulerconfig.SchedulerPolicyConfigMapKey) + fs.StringVar(&o.AlgorithmProvider, "algorithm-provider", o.AlgorithmProvider, "DEPRECATED: the scheduling algorithm provider to use, this sets the default plugins for component config profiles. Choose one of: "+algorithmprovider.ListAlgorithmProviders()) + fs.StringVar(&o.PolicyConfigFile, "policy-config-file", o.PolicyConfigFile, "DEPRECATED: file with scheduler policy configuration. This file is used if policy ConfigMap is not provided or --use-legacy-policy-config=true. Note: The scheduler will fail if this is combined with Plugin configs") + usage := fmt.Sprintf("DEPRECATED: name of the ConfigMap object that contains scheduler's policy configuration. It must exist in the system namespace before scheduler initialization if --use-legacy-policy-config=false. The config must be provided as the value of an element in 'Data' map with the key='%v'. Note: The scheduler will fail if this is combined with Plugin configs", kubeschedulerconfig.SchedulerPolicyConfigMapKey) fs.StringVar(&o.PolicyConfigMapName, "policy-configmap", o.PolicyConfigMapName, usage) - fs.StringVar(&o.PolicyConfigMapNamespace, "policy-configmap-namespace", o.PolicyConfigMapNamespace, "DEPRECATED: the namespace where policy ConfigMap is located. The kube-system namespace will be used if this is not provided or is empty.") - fs.BoolVar(&o.UseLegacyPolicyConfig, "use-legacy-policy-config", o.UseLegacyPolicyConfig, "DEPRECATED: when set to true, scheduler will ignore policy ConfigMap and uses policy config file") + fs.StringVar(&o.PolicyConfigMapNamespace, "policy-configmap-namespace", o.PolicyConfigMapNamespace, "DEPRECATED: the namespace where policy ConfigMap is located. The kube-system namespace will be used if this is not provided or is empty. Note: The scheduler will fail if this is combined with Plugin configs") + fs.BoolVar(&o.UseLegacyPolicyConfig, "use-legacy-policy-config", o.UseLegacyPolicyConfig, "DEPRECATED: when set to true, scheduler will ignore policy ConfigMap and uses policy config file. Note: The scheduler will fail if this is combined with Plugin configs") fs.BoolVar(&cfg.EnableProfiling, "profiling", cfg.EnableProfiling, "DEPRECATED: enable profiling via web interface host:port/debug/pprof/") fs.BoolVar(&cfg.EnableContentionProfiling, "contention-profiling", cfg.EnableContentionProfiling, "DEPRECATED: enable lock contention profiling, if profiling is enabled") @@ -80,21 +80,21 @@ func (o *DeprecatedOptions) Validate() []error { errs = append(errs, field.Required(field.NewPath("policyConfigFile"), "required when --use-legacy-policy-config is true")) } - if err := interpodaffinity.ValidateHardPodAffinityWeight(field.NewPath("hardPodAffinitySymmetricWeight"), o.HardPodAffinitySymmetricWeight); err != nil { + if err := validation.ValidateHardPodAffinityWeight(field.NewPath("hardPodAffinitySymmetricWeight"), o.HardPodAffinitySymmetricWeight); err != nil { errs = append(errs, err) } return errs } -// ApplyTo sets cfg.AlgorithmSource from flags passed on the command line in the following precedence order: +// ApplyAlgorithmSourceTo sets cfg.AlgorithmSource from flags passed on the command line in the following precedence order: // // 1. --use-legacy-policy-config to use a policy file. // 2. --policy-configmap to use a policy config map value. // 3. --algorithm-provider to use a named algorithm provider. -func (o *DeprecatedOptions) ApplyTo(cfg *kubeschedulerconfig.KubeSchedulerConfiguration) error { +func (o *DeprecatedOptions) ApplyAlgorithmSourceTo(cfg *kubeschedulerconfig.KubeSchedulerConfiguration) { if o == nil { - return nil + return } switch { @@ -120,19 +120,30 @@ func (o *DeprecatedOptions) ApplyTo(cfg *kubeschedulerconfig.KubeSchedulerConfig Provider: &o.AlgorithmProvider, } } +} +// ApplyTo sets a default profile plugin config if no config file is specified +// It also calls ApplyAlgorithmSourceTo to set Policy settings in AlgorithmSource, if applicable. +// Deprecated flags have an effect iff no config file was provided, in which +// case this function expects a default KubeSchedulerConfiguration instance, +// which has a single profile. +func (o *DeprecatedOptions) ApplyTo(cfg *kubeschedulerconfig.KubeSchedulerConfiguration) { + if o == nil { + return + } // The following deprecated options affect the only existing profile that is // added by default. profile := &cfg.Profiles[0] if len(o.SchedulerName) > 0 { profile.SchedulerName = o.SchedulerName } - if o.HardPodAffinitySymmetricWeight != interpodaffinity.DefaultHardPodAffinityWeight { - args := interpodaffinity.Args{ - HardPodAffinityWeight: &o.HardPodAffinitySymmetricWeight, - } - profile.PluginConfig = append(profile.PluginConfig, plugins.NewPluginConfig(interpodaffinity.Name, args)) + plCfg := kubeschedulerconfig.PluginConfig{ + Name: interpodaffinity.Name, + Args: &kubeschedulerconfig.InterPodAffinityArgs{ + HardPodAffinityWeight: o.HardPodAffinitySymmetricWeight, + }, } - return nil + profile.PluginConfig = append(profile.PluginConfig, plCfg) + o.ApplyAlgorithmSourceTo(cfg) } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/options.go b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/options.go index 46c1821d0f3..06195961c0b 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/options.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/options/options.go @@ -30,27 +30,26 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/informers" clientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/kubernetes/scheme" restclient "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/client-go/tools/events" "k8s.io/client-go/tools/leaderelection" "k8s.io/client-go/tools/leaderelection/resourcelock" "k8s.io/client-go/tools/record" cliflag "k8s.io/component-base/cli/flag" componentbaseconfig "k8s.io/component-base/config" + "k8s.io/component-base/config/options" configv1alpha1 "k8s.io/component-base/config/v1alpha1" + "k8s.io/component-base/logs" "k8s.io/component-base/metrics" - "k8s.io/klog" - kubeschedulerconfigv1alpha2 "k8s.io/kube-scheduler/config/v1alpha2" + "k8s.io/klog/v2" + kubeschedulerconfigv1beta1 "k8s.io/kube-scheduler/config/v1beta1" schedulerappconfig "k8s.io/kubernetes/cmd/kube-scheduler/app/config" - "k8s.io/kubernetes/pkg/client/leaderelectionconfig" - "k8s.io/kubernetes/pkg/master/ports" "k8s.io/kubernetes/pkg/scheduler" kubeschedulerconfig "k8s.io/kubernetes/pkg/scheduler/apis/config" kubeschedulerscheme "k8s.io/kubernetes/pkg/scheduler/apis/config/scheme" "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity" ) // Options has all the params needed to run a Scheduler @@ -62,6 +61,8 @@ type Options struct { CombinedInsecureServing *CombinedInsecureServingOptions Authentication *apiserveroptions.DelegatingAuthenticationOptions Authorization *apiserveroptions.DelegatingAuthorizationOptions + Metrics *metrics.Options + Logs *logs.Options Deprecated *DeprecatedOptions // ConfigFile is the location of the scheduler server's configuration file. @@ -71,8 +72,6 @@ type Options struct { WriteConfigTo string Master string - - ShowHiddenMetricsForVersion string } // NewOptions returns default scheduler app options. @@ -106,8 +105,10 @@ func NewOptions() (*Options, error) { UseLegacyPolicyConfig: false, PolicyConfigMapNamespace: metav1.NamespaceSystem, SchedulerName: corev1.DefaultSchedulerName, - HardPodAffinitySymmetricWeight: interpodaffinity.DefaultHardPodAffinityWeight, + HardPodAffinitySymmetricWeight: 1, }, + Metrics: metrics.NewOptions(), + Logs: logs.NewOptions(), } o.Authentication.TolerateInClusterLookupFailure = true @@ -118,7 +119,7 @@ func NewOptions() (*Options, error) { // Set the PairName but leave certificate directory blank to generate in-memory by default o.SecureServing.ServerCert.CertDirectory = "" o.SecureServing.ServerCert.PairName = "kube-scheduler" - o.SecureServing.BindPort = ports.KubeSchedulerPort + o.SecureServing.BindPort = kubeschedulerconfig.DefaultKubeSchedulerPort return o, nil } @@ -136,7 +137,7 @@ func splitHostIntPort(s string) (string, int, error) { } func newDefaultComponentConfig() (*kubeschedulerconfig.KubeSchedulerConfiguration, error) { - versionedCfg := kubeschedulerconfigv1alpha2.KubeSchedulerConfiguration{} + versionedCfg := kubeschedulerconfigv1beta1.KubeSchedulerConfiguration{} versionedCfg.DebuggingConfiguration = *configv1alpha1.NewRecommendedDebuggingConfiguration() kubeschedulerscheme.Scheme.Default(&versionedCfg) @@ -150,7 +151,13 @@ func newDefaultComponentConfig() (*kubeschedulerconfig.KubeSchedulerConfiguratio // Flags returns flags for a specific scheduler by section name func (o *Options) Flags() (nfs cliflag.NamedFlagSets) { fs := nfs.FlagSet("misc") - fs.StringVar(&o.ConfigFile, "config", o.ConfigFile, "The path to the configuration file. Flags override values in this file.") + fs.StringVar(&o.ConfigFile, "config", o.ConfigFile, `The path to the configuration file. The following flags can overwrite fields in this file: + --address + --port + --use-legacy-policy-config + --policy-configmap + --policy-config-file + --algorithm-provider`) fs.StringVar(&o.WriteConfigTo, "write-config-to", o.WriteConfigTo, "If set, write the configuration values to this file and exit.") fs.StringVar(&o.Master, "master", o.Master, "The address of the Kubernetes API server (overrides any value in kubeconfig)") @@ -160,17 +167,10 @@ func (o *Options) Flags() (nfs cliflag.NamedFlagSets) { o.Authorization.AddFlags(nfs.FlagSet("authorization")) o.Deprecated.AddFlags(nfs.FlagSet("deprecated"), &o.ComponentConfig) - leaderelectionconfig.BindFlags(&o.ComponentConfig.LeaderElection.LeaderElectionConfiguration, nfs.FlagSet("leader election")) + options.BindLeaderElectionFlags(&o.ComponentConfig.LeaderElection, nfs.FlagSet("leader election")) utilfeature.DefaultMutableFeatureGate.AddFlag(nfs.FlagSet("feature gate")) - - // TODO(RainbowMango): move it to genericoptions before next flag comes. - mfs := nfs.FlagSet("metrics") - mfs.StringVar(&o.ShowHiddenMetricsForVersion, "show-hidden-metrics-for-version", o.ShowHiddenMetricsForVersion, - "The previous version for which you want to show hidden metrics. "+ - "Only the previous minor version is meaningful, other values will not be allowed. "+ - "Accepted format of version is ., e.g.: '1.16'. "+ - "The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, "+ - "rather than being surprised when they are permanently removed in the release after that.") + o.Metrics.AddFlags(nfs.FlagSet("metrics")) + o.Logs.AddFlags(nfs.FlagSet("logs")) return nfs } @@ -180,10 +180,8 @@ func (o *Options) ApplyTo(c *schedulerappconfig.Config) error { if len(o.ConfigFile) == 0 { c.ComponentConfig = o.ComponentConfig - // only apply deprecated flags if no config file is loaded (this is the old behaviour). - if err := o.Deprecated.ApplyTo(&c.ComponentConfig); err != nil { - return err - } + // apply deprecated flags if no config file is loaded (this is the old behaviour). + o.Deprecated.ApplyTo(&c.ComponentConfig) if err := o.CombinedInsecureServing.ApplyTo(c, &c.ComponentConfig); err != nil { return err } @@ -196,11 +194,18 @@ func (o *Options) ApplyTo(c *schedulerappconfig.Config) error { return err } - // use the loaded config file only, with the exception of --address and --port. This means that - // none of the deprecated flags in o.Deprecated are taken into consideration. This is the old - // behaviour of the flags we have to keep. c.ComponentConfig = *cfg + // apply any deprecated Policy flags, if applicable + o.Deprecated.ApplyAlgorithmSourceTo(&c.ComponentConfig) + + // if the user has set CC profiles and is trying to use a Policy config, error out + // these configs are no longer merged and they should not be used simultaneously + if !emptySchedulerProfileConfig(c.ComponentConfig.Profiles) && c.ComponentConfig.AlgorithmSource.Policy != nil { + return fmt.Errorf("cannot set a Plugin config and Policy config") + } + + // use the loaded config file only, with the exception of --address and --port. if err := o.CombinedInsecureServing.ApplyToFromLoadedConfig(c, &c.ComponentConfig); err != nil { return err } @@ -217,13 +222,20 @@ func (o *Options) ApplyTo(c *schedulerappconfig.Config) error { return err } } - if len(o.ShowHiddenMetricsForVersion) > 0 { - metrics.SetShowHidden() - } - + o.Metrics.Apply() + o.Logs.Apply() return nil } +// emptySchedulerProfileConfig returns true if the list of profiles passed to it contains only +// the "default-scheduler" profile with no plugins or pluginconfigs registered +// (this is the default empty profile initialized by defaults.go) +func emptySchedulerProfileConfig(profiles []kubeschedulerconfig.KubeSchedulerProfile) bool { + return len(profiles) == 1 && + len(profiles[0].PluginConfig) == 0 && + profiles[0].Plugins == nil +} + // Validate validates all the required options. func (o *Options) Validate() []error { var errs []error @@ -236,7 +248,8 @@ func (o *Options) Validate() []error { errs = append(errs, o.Authentication.Validate()...) errs = append(errs, o.Authorization.Validate()...) errs = append(errs, o.Deprecated.Validate()...) - errs = append(errs, metrics.ValidateShowHiddenMetricsVersion(o.ShowHiddenMetricsForVersion)...) + errs = append(errs, o.Metrics.Validate()...) + errs = append(errs, o.Logs.Validate()...) return errs } @@ -260,13 +273,13 @@ func (o *Options) Config() (*schedulerappconfig.Config, error) { return nil, err } - coreBroadcaster := record.NewBroadcaster() + c.EventBroadcaster = events.NewEventBroadcasterAdapter(eventClient) // Set up leader election if enabled. var leaderElectionConfig *leaderelection.LeaderElectionConfig if c.ComponentConfig.LeaderElection.LeaderElect { // Use the scheduler name in the first profile to record leader election. - coreRecorder := coreBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: c.ComponentConfig.Profiles[0].SchedulerName}) + coreRecorder := c.EventBroadcaster.DeprecatedNewLegacyRecorder(c.ComponentConfig.Profiles[0].SchedulerName) leaderElectionConfig, err = makeLeaderElectionConfig(c.ComponentConfig.LeaderElection, leaderElectionClient, coreRecorder) if err != nil { return nil, err @@ -276,9 +289,6 @@ func (o *Options) Config() (*schedulerappconfig.Config, error) { c.Client = client c.InformerFactory = informers.NewSharedInformerFactory(client, 0) c.PodInformer = scheduler.NewPodInformer(client, 0) - c.EventClient = eventClient.EventsV1beta1() - c.CoreEventClient = eventClient.CoreV1() - c.CoreBroadcaster = coreBroadcaster c.LeaderElection = leaderElectionConfig return c, nil @@ -286,7 +296,7 @@ func (o *Options) Config() (*schedulerappconfig.Config, error) { // makeLeaderElectionConfig builds a leader election configuration. It will // create a new resource lock associated with the configuration. -func makeLeaderElectionConfig(config kubeschedulerconfig.KubeSchedulerLeaderElectionConfiguration, client clientset.Interface, recorder record.EventRecorder) (*leaderelection.LeaderElectionConfig, error) { +func makeLeaderElectionConfig(config componentbaseconfig.LeaderElectionConfiguration, client clientset.Interface, recorder record.EventRecorder) (*leaderelection.LeaderElectionConfig, error) { hostname, err := os.Hostname() if err != nil { return nil, fmt.Errorf("unable to get hostname: %v", err) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/server.go b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/server.go index 306571053a3..b7c22674874 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/server.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-scheduler/app/server.go @@ -27,8 +27,6 @@ import ( "github.com/spf13/cobra" - "k8s.io/api/core/v1" - eventsv1beta1 "k8s.io/api/events/v1beta1" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authorization/authorizer" @@ -38,33 +36,29 @@ import ( "k8s.io/apiserver/pkg/server/healthz" "k8s.io/apiserver/pkg/server/mux" "k8s.io/apiserver/pkg/server/routes" - "k8s.io/apiserver/pkg/util/term" - "k8s.io/client-go/kubernetes/scheme" - corev1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/events" "k8s.io/client-go/tools/leaderelection" - "k8s.io/client-go/tools/record" cliflag "k8s.io/component-base/cli/flag" "k8s.io/component-base/cli/globalflag" + "k8s.io/component-base/configz" "k8s.io/component-base/logs" "k8s.io/component-base/metrics/legacyregistry" + "k8s.io/component-base/term" "k8s.io/component-base/version" "k8s.io/component-base/version/verflag" - "k8s.io/klog" + "k8s.io/klog/v2" schedulerserverconfig "k8s.io/kubernetes/cmd/kube-scheduler/app/config" "k8s.io/kubernetes/cmd/kube-scheduler/app/options" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/scheduler" kubeschedulerconfig "k8s.io/kubernetes/pkg/scheduler/apis/config" - framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" + "k8s.io/kubernetes/pkg/scheduler/framework/runtime" "k8s.io/kubernetes/pkg/scheduler/metrics" "k8s.io/kubernetes/pkg/scheduler/profile" - "k8s.io/kubernetes/pkg/util/configz" - utilflag "k8s.io/kubernetes/pkg/util/flag" ) // Option configures a framework.Registry. -type Option func(framework.Registry) error +type Option func(runtime.Registry) error // NewSchedulerCommand creates a *cobra.Command object with default parameters and registryOptions func NewSchedulerCommand(registryOptions ...Option) *cobra.Command { @@ -75,20 +69,28 @@ func NewSchedulerCommand(registryOptions ...Option) *cobra.Command { cmd := &cobra.Command{ Use: "kube-scheduler", - Long: `The Kubernetes scheduler is a policy-rich, topology-aware, -workload-specific function that significantly impacts availability, performance, -and capacity. The scheduler needs to take into account individual and collective -resource requirements, quality of service requirements, hardware/software/policy -constraints, affinity and anti-affinity specifications, data locality, inter-workload -interference, deadlines, and so on. Workload-specific requirements will be exposed -through the API as necessary. See [scheduling](https://kubernetes.io/docs/concepts/scheduling/) + Long: `The Kubernetes scheduler is a control plane process which assigns +Pods to Nodes. The scheduler determines which Nodes are valid placements for +each Pod in the scheduling queue according to constraints and available +resources. The scheduler then ranks each valid Node and binds the Pod to a +suitable Node. Multiple different schedulers may be used within a cluster; +kube-scheduler is the reference implementation. +See [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/) for more information about scheduling and the kube-scheduler component.`, Run: func(cmd *cobra.Command, args []string) { - if err := runCommand(cmd, args, opts, registryOptions...); err != nil { + if err := runCommand(cmd, opts, registryOptions...); err != nil { fmt.Fprintf(os.Stderr, "%v\n", err) os.Exit(1) } }, + Args: func(cmd *cobra.Command, args []string) error { + for _, arg := range args { + if len(arg) > 0 { + return fmt.Errorf("%q does not take any arguments, got %q", cmd.CommandPath(), args) + } + } + return nil + }, } fs := cmd.Flags() namedFlagSets := opts.Flags() @@ -115,37 +117,33 @@ for more information about scheduling and the kube-scheduler component.`, } // runCommand runs the scheduler. -func runCommand(cmd *cobra.Command, args []string, opts *options.Options, registryOptions ...Option) error { +func runCommand(cmd *cobra.Command, opts *options.Options, registryOptions ...Option) error { verflag.PrintAndExitIfRequested() - utilflag.PrintFlags(cmd.Flags()) + cliflag.PrintFlags(cmd.Flags()) - if len(args) != 0 { - fmt.Fprint(os.Stderr, "arguments are not supported\n") - } + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() - if errs := opts.Validate(); len(errs) > 0 { - return utilerrors.NewAggregate(errs) + cc, sched, err := Setup(ctx, opts, registryOptions...) + if err != nil { + return err } if len(opts.WriteConfigTo) > 0 { - c := &schedulerserverconfig.Config{} - if err := opts.ApplyTo(c); err != nil { - return err - } - if err := options.WriteConfigFile(opts.WriteConfigTo, &c.ComponentConfig); err != nil { + if err := options.WriteConfigFile(opts.WriteConfigTo, &cc.ComponentConfig); err != nil { return err } klog.Infof("Wrote configuration to: %s\n", opts.WriteConfigTo) return nil } - c, err := opts.Config() - if err != nil { - return err - } + return Run(ctx, cc, sched) +} - // Get the completed config - cc := c.Complete() +// Run executes the scheduler based on the given configuration. It only returns on error or when context is done. +func Run(ctx context.Context, cc *schedulerserverconfig.CompletedConfig, sched *scheduler.Scheduler) error { + // To help debugging, immediately log version + klog.V(1).Infof("Starting Kubernetes Scheduler version %+v", version.Get()) // Configz registration. if cz, err := configz.New("componentconfig"); err == nil { @@ -154,52 +152,9 @@ func runCommand(cmd *cobra.Command, args []string, opts *options.Options, regist return fmt.Errorf("unable to register configz: %s", err) } - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - return Run(ctx, cc, registryOptions...) -} - -// Run executes the scheduler based on the given configuration. It only returns on error or when context is done. -func Run(ctx context.Context, cc schedulerserverconfig.CompletedConfig, outOfTreeRegistryOptions ...Option) error { - // To help debugging, immediately log version - klog.V(1).Infof("Starting Kubernetes Scheduler version %+v", version.Get()) - - outOfTreeRegistry := make(framework.Registry) - for _, option := range outOfTreeRegistryOptions { - if err := option(outOfTreeRegistry); err != nil { - return err - } - } - - recorderFactory := getRecorderFactory(&cc) - // Create the scheduler. - sched, err := scheduler.New(cc.Client, - cc.InformerFactory, - cc.PodInformer, - recorderFactory, - ctx.Done(), - scheduler.WithProfiles(cc.ComponentConfig.Profiles...), - scheduler.WithAlgorithmSource(cc.ComponentConfig.AlgorithmSource), - scheduler.WithPreemptionDisabled(cc.ComponentConfig.DisablePreemption), - scheduler.WithPercentageOfNodesToScore(cc.ComponentConfig.PercentageOfNodesToScore), - scheduler.WithBindTimeoutSeconds(cc.ComponentConfig.BindTimeoutSeconds), - scheduler.WithFrameworkOutOfTreeRegistry(outOfTreeRegistry), - scheduler.WithPodMaxBackoffSeconds(cc.ComponentConfig.PodMaxBackoffSeconds), - scheduler.WithPodInitialBackoffSeconds(cc.ComponentConfig.PodInitialBackoffSeconds), - scheduler.WithExtenders(cc.ComponentConfig.Extenders...), - ) - if err != nil { - return err - } - // Prepare the event broadcaster. - if cc.Broadcaster != nil && cc.EventClient != nil { - cc.Broadcaster.StartRecordingToSink(ctx.Done()) - } - if cc.CoreBroadcaster != nil && cc.CoreEventClient != nil { - cc.CoreBroadcaster.StartRecordingToSink(&corev1.EventSinkImpl{Interface: cc.CoreEventClient.Events("")}) - } + cc.EventBroadcaster.StartRecordingToSink(ctx.Done()) + // Setup healthz checks. var checks []healthz.HealthChecker if cc.ComponentConfig.LeaderElection.LeaderElect { @@ -262,7 +217,7 @@ func Run(ctx context.Context, cc schedulerserverconfig.CompletedConfig, outOfTre // buildHandlerChain wraps the given handler with the standard filters. func buildHandlerChain(handler http.Handler, authn authenticator.Request, authz authorizer.Authorizer) http.Handler { requestInfoResolver := &apirequest.RequestInfoFactory{} - failedHandler := genericapifilters.Unauthorized(legacyscheme.Codecs, false) + failedHandler := genericapifilters.Unauthorized(legacyscheme.Codecs) handler = genericapifilters.WithAuthorization(handler, authz, legacyscheme.Codecs) handler = genericapifilters.WithAuthentication(handler, authn, failedHandler, nil) @@ -323,20 +278,58 @@ func newHealthzHandler(config *kubeschedulerconfig.KubeSchedulerConfiguration, s } func getRecorderFactory(cc *schedulerserverconfig.CompletedConfig) profile.RecorderFactory { - if _, err := cc.Client.Discovery().ServerResourcesForGroupVersion(eventsv1beta1.SchemeGroupVersion.String()); err == nil { - cc.Broadcaster = events.NewBroadcaster(&events.EventSinkImpl{Interface: cc.EventClient.Events("")}) - return profile.NewRecorderFactory(cc.Broadcaster) - } return func(name string) events.EventRecorder { - r := cc.CoreBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: name}) - return record.NewEventRecorderAdapter(r) + return cc.EventBroadcaster.NewRecorder(name) } } // WithPlugin creates an Option based on plugin name and factory. Please don't remove this function: it is used to register out-of-tree plugins, // hence there are no references to it from the kubernetes scheduler code base. -func WithPlugin(name string, factory framework.PluginFactory) Option { - return func(registry framework.Registry) error { +func WithPlugin(name string, factory runtime.PluginFactory) Option { + return func(registry runtime.Registry) error { return registry.Register(name, factory) } } + +// Setup creates a completed config and a scheduler based on the command args and options +func Setup(ctx context.Context, opts *options.Options, outOfTreeRegistryOptions ...Option) (*schedulerserverconfig.CompletedConfig, *scheduler.Scheduler, error) { + if errs := opts.Validate(); len(errs) > 0 { + return nil, nil, utilerrors.NewAggregate(errs) + } + + c, err := opts.Config() + if err != nil { + return nil, nil, err + } + + // Get the completed config + cc := c.Complete() + + outOfTreeRegistry := make(runtime.Registry) + for _, option := range outOfTreeRegistryOptions { + if err := option(outOfTreeRegistry); err != nil { + return nil, nil, err + } + } + + recorderFactory := getRecorderFactory(&cc) + // Create the scheduler. + sched, err := scheduler.New(cc.Client, + cc.InformerFactory, + cc.PodInformer, + recorderFactory, + ctx.Done(), + scheduler.WithProfiles(cc.ComponentConfig.Profiles...), + scheduler.WithAlgorithmSource(cc.ComponentConfig.AlgorithmSource), + scheduler.WithPercentageOfNodesToScore(cc.ComponentConfig.PercentageOfNodesToScore), + scheduler.WithFrameworkOutOfTreeRegistry(outOfTreeRegistry), + scheduler.WithPodMaxBackoffSeconds(cc.ComponentConfig.PodMaxBackoffSeconds), + scheduler.WithPodInitialBackoffSeconds(cc.ComponentConfig.PodInitialBackoffSeconds), + scheduler.WithExtenders(cc.ComponentConfig.Extenders...), + ) + if err != nil { + return nil, nil, err + } + + return &cc, sched, nil +} diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/BUILD b/vendor/k8s.io/kubernetes/cmd/kubelet/app/BUILD index 1bc274fc631..7a175668c21 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/BUILD @@ -1,29 +1,4 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "server_bootstrap_test.go", - "server_test.go", - ], - embed = [":go_default_library"], - deps = [ - "//pkg/apis/certificates/v1beta1:go_default_library", - "//pkg/controller/certificates/authority:go_default_library", - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/util/cert:go_default_library", - ], -) +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", @@ -38,6 +13,7 @@ go_library( "server_unsupported.go", ], importpath = "k8s.io/kubernetes/cmd/kubelet/app", + visibility = ["//visibility:public"], deps = [ "//cmd/kubelet/app/options:go_default_library", "//pkg/api/legacyscheme:go_default_library", @@ -60,19 +36,15 @@ go_library( "//pkg/kubelet/cm/cpuset:go_default_library", "//pkg/kubelet/config:go_default_library", "//pkg/kubelet/container:go_default_library", - "//pkg/kubelet/dockershim:go_default_library", - "//pkg/kubelet/dockershim/remote:go_default_library", "//pkg/kubelet/eviction:go_default_library", "//pkg/kubelet/eviction/api:go_default_library", "//pkg/kubelet/kubeletconfig:go_default_library", "//pkg/kubelet/kubeletconfig/configfiles:go_default_library", + "//pkg/kubelet/metrics:go_default_library", "//pkg/kubelet/server:go_default_library", - "//pkg/kubelet/server/streaming:go_default_library", "//pkg/kubelet/stats/pidlimit:go_default_library", "//pkg/kubelet/types:go_default_library", - "//pkg/util/configz:go_default_library", "//pkg/util/filesystem:go_default_library", - "//pkg/util/flag:go_default_library", "//pkg/util/flock:go_default_library", "//pkg/util/node:go_default_library", "//pkg/util/oom:go_default_library", @@ -127,7 +99,6 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd:go_default_library", @@ -138,8 +109,11 @@ go_library( "//staging/src/k8s.io/client-go/util/keyutil:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", + "//staging/src/k8s.io/component-base/configz:go_default_library", "//staging/src/k8s.io/component-base/featuregate:go_default_library", + "//staging/src/k8s.io/component-base/logs:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", + "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//staging/src/k8s.io/component-base/version:go_default_library", "//staging/src/k8s.io/component-base/version/verflag:go_default_library", "//staging/src/k8s.io/csi-translation-lib/plugins:go_default_library", @@ -147,7 +121,7 @@ go_library( "//vendor/github.com/coreos/go-systemd/daemon:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ] + select({ @@ -164,6 +138,25 @@ go_library( }), ) +go_test( + name = "go_default_test", + srcs = [ + "server_bootstrap_test.go", + "server_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/apis/certificates/v1:go_default_library", + "//pkg/controller/certificates/authority:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/client-go/rest:go_default_library", + "//staging/src/k8s.io/client-go/util/cert:go_default_library", + ], +) + filegroup( name = "package-srcs", srcs = glob(["**"]), @@ -178,4 +171,5 @@ filegroup( "//cmd/kubelet/app/options:all-srcs", ], tags = ["automanaged"], + visibility = ["//visibility:public"], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/BUILD b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/BUILD index d50c6192bbf..7029cec3685 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/BUILD @@ -13,6 +13,7 @@ go_library( "globalflags.go", "globalflags_linux.go", "globalflags_other.go", + "globalflags_providers.go", "options.go", "osflags_others.go", "osflags_windows.go", @@ -40,7 +41,7 @@ go_library( "//staging/src/k8s.io/component-base/version/verflag:go_default_library", "//staging/src/k8s.io/kubelet/config/v1beta1:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:android": [ "//vendor/github.com/google/cadvisor/container/common:go_default_library", diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/container_runtime.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/container_runtime.go index 512b43988b3..f0bb64f582f 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/container_runtime.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/container_runtime.go @@ -51,7 +51,6 @@ func NewContainerRuntimeOptions() *config.ContainerRuntimeOptions { DockershimRootDirectory: "/var/lib/dockershim", PodSandboxImage: defaultPodSandboxImage, ImagePullProgressDeadline: metav1.Duration{Duration: 1 * time.Minute}, - ExperimentalDockershim: false, //Alpha feature CNIBinDir: "/opt/cni/bin", diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags.go index ff014ca2943..9ebf0d49430 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags.go @@ -27,7 +27,7 @@ import ( // libs that provide registration functions "k8s.io/component-base/logs" "k8s.io/component-base/version/verflag" - "k8s.io/klog" + "k8s.io/klog/v2" ) // AddGlobalFlags explicitly registers flags that libraries (glog, verflag, etc.) register @@ -79,9 +79,7 @@ func addCredentialProviderFlags(fs *pflag.FlagSet) { global := pflag.CommandLine local := pflag.NewFlagSet(os.Args[0], pflag.ExitOnError) - // TODO(#58034): This is not a static file, so it's not quite as straightforward as --google-json-key. - // We need to figure out how ACR users can dynamically provide pull credentials before we can deprecate this. - pflagRegister(global, local, "azure-container-registry-config") + addLegacyCloudProviderCredentialProviderFlags(global, local) fs.AddFlagSet(local) } diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_providerless.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_providerless.go new file mode 100644 index 00000000000..7fba07df799 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_providerless.go @@ -0,0 +1,27 @@ +// +build providerless + +/* +Copyright 2020 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 options + +import ( + "github.com/spf13/pflag" +) + +func addLegacyCloudProviderCredentialProviderFlags(global, local *pflag.FlagSet) { + // no-op when no legacy providers are compiled in +} diff --git a/vendor/k8s.io/apiserver/pkg/server/options/webhook.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_providers.go similarity index 53% rename from vendor/k8s.io/apiserver/pkg/server/options/webhook.go rename to vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_providers.go index bd3ec124d6d..5d2dd44d345 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/webhook.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_providers.go @@ -1,5 +1,7 @@ +// +build !providerless + /* -Copyright 2018 The Kubernetes Authors. +Copyright 2020 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. @@ -17,18 +19,11 @@ limitations under the License. package options import ( - utilwebhook "k8s.io/apiserver/pkg/util/webhook" + "github.com/spf13/pflag" ) -// WebhookOptions holds the outgoing webhook options -type WebhookOptions struct { - ServiceResolver utilwebhook.ServiceResolver - AuthInfoResolverWrapper utilwebhook.AuthenticationInfoResolverWrapper -} - -// NewWebhookOptions returns the default options for outgoing webhooks -func NewWebhookOptions() *WebhookOptions { - return &WebhookOptions{ - ServiceResolver: utilwebhook.NewDefaultServiceResolver(), - } +func addLegacyCloudProviderCredentialProviderFlags(global, local *pflag.FlagSet) { + // TODO(#58034): This is not a static file, so it's not quite as straightforward as --google-json-key. + // We need to figure out how ACR users can dynamically provide pull credentials before we can deprecate this. + pflagRegister(global, local, "azure-container-registry-config") } diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go index e573846e671..cb6684d171a 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go @@ -61,16 +61,6 @@ type KubeletFlags struct { // Crash immediately, rather than eating panics. ReallyCrashForTesting bool - // TODO(mtaufen): It is increasingly looking like nobody actually uses the - // Kubelet's runonce mode anymore, so it may be a candidate - // for deprecation and removal. - // If runOnce is true, the Kubelet will check the API server once for pods, - // run those in addition to the pods specified by static pod files, and exit. - RunOnce bool - - // enableServer enables the Kubelet's server - EnableServer bool - // HostnameOverride is the hostname used to identify the kubelet instead // of the actual hostname. HostnameOverride string @@ -78,16 +68,11 @@ type KubeletFlags struct { // If set, kubelet will use this IP address for the node. NodeIP string - // This flag, if set, sets the unique id of the instance that an external provider (i.e. cloudprovider) - // can use to identify a specific node - ProviderID string - // Container-runtime-specific options. config.ContainerRuntimeOptions - // certDirectory is the directory where the TLS certs are located (by - // default /var/run/kubernetes). If tlsCertFile and tlsPrivateKeyFile - // are provided, this flag will be ignored. + // certDirectory is the directory where the TLS certs are located. + // If tlsCertFile and tlsPrivateKeyFile are provided, this flag will be ignored. CertDirectory string // cloudProvider is the provider for cloud services. @@ -132,9 +117,6 @@ type KubeletFlags struct { RemoteImageEndpoint string // experimentalMounterPath is the path of mounter binary. Leave empty to use the default mount path ExperimentalMounterPath string - // If enabled, the kubelet will integrate with the kernel memcg notification to determine if memory eviction thresholds are crossed rather than polling. - // +optional - ExperimentalKernelMemcgNotification bool // This flag, if set, enables a check prior to mount operations to verify that the required components // (binaries, etc.) to mount the volume are available on the underlying node. If the check is enabled // and fails the mount operation fails. @@ -144,9 +126,6 @@ type KubeletFlags struct { ExperimentalNodeAllocatableIgnoreEvictionThreshold bool // Node Labels are the node labels to add when registering the node in the cluster NodeLabels map[string]string - // volumePluginDir is the full path of the directory in which to search - // for additional third party volume plugins - VolumePluginDir string // lockFilePath is the path that kubelet will use to as a lock file. // It uses this file as a lock to synchronize with other kubelet processes // that may be running. @@ -158,12 +137,6 @@ type KubeletFlags struct { ExitOnLockContention bool // seccompProfileRoot is the directory path for seccomp profiles. SeccompProfileRoot string - // bootstrapCheckpointPath is the path to the directory containing pod checkpoints to - // run on restore - BootstrapCheckpointPath string - // NodeStatusMaxImages caps the number of images reported in Node.Status.Images. - // This is an experimental, short-term flag to help with node scalability. - NodeStatusMaxImages int32 // DEPRECATED FLAGS // minimumGCAge is the minimum age for a finished container before it is @@ -201,24 +174,20 @@ func NewKubeletFlags() *KubeletFlags { } return &KubeletFlags{ - EnableServer: true, - ContainerRuntimeOptions: *NewContainerRuntimeOptions(), - CertDirectory: "/var/lib/kubelet/pki", - RootDirectory: defaultRootDir, - MasterServiceNamespace: metav1.NamespaceDefault, - MaxContainerCount: -1, - MaxPerPodContainerCount: 1, - MinimumGCAge: metav1.Duration{Duration: 0}, - NonMasqueradeCIDR: "10.0.0.0/8", - RegisterSchedulable: true, - ExperimentalKernelMemcgNotification: false, - RemoteRuntimeEndpoint: remoteRuntimeEndpoint, - NodeLabels: make(map[string]string), - VolumePluginDir: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/", - RegisterNode: true, - SeccompProfileRoot: filepath.Join(defaultRootDir, "seccomp"), + ContainerRuntimeOptions: *NewContainerRuntimeOptions(), + CertDirectory: "/var/lib/kubelet/pki", + RootDirectory: defaultRootDir, + MasterServiceNamespace: metav1.NamespaceDefault, + MaxContainerCount: -1, + MaxPerPodContainerCount: 1, + MinimumGCAge: metav1.Duration{Duration: 0}, + NonMasqueradeCIDR: "10.0.0.0/8", + RegisterSchedulable: true, + RemoteRuntimeEndpoint: remoteRuntimeEndpoint, + NodeLabels: make(map[string]string), + RegisterNode: true, + SeccompProfileRoot: filepath.Join(defaultRootDir, "seccomp"), // prior to the introduction of this flag, there was a hardcoded cap of 50 images - NodeStatusMaxImages: 50, EnableCAdvisorJSONEndpoints: false, } } @@ -229,9 +198,6 @@ func ValidateKubeletFlags(f *KubeletFlags) error { if f.DynamicConfigDir.Provided() && !utilfeature.DefaultFeatureGate.Enabled(features.DynamicKubeletConfig) { return fmt.Errorf("the DynamicKubeletConfig feature gate must be enabled in order to use the --dynamic-config-dir flag") } - if f.NodeStatusMaxImages < -1 { - return fmt.Errorf("invalid configuration: NodeStatusMaxImages (--node-status-max-images) must be -1 or greater") - } unknownLabels := sets.NewString() for k := range f.NodeLabels { @@ -357,24 +323,13 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) { "On success, a kubeconfig file referencing the generated client certificate and key is written to the path specified by --kubeconfig. "+ "The client certificate and key file will be stored in the directory pointed by --cert-dir.") - fs.BoolVar(&f.ReallyCrashForTesting, "really-crash-for-testing", f.ReallyCrashForTesting, "If true, when panics occur crash. Intended for testing.") - fs.Float64Var(&f.ChaosChance, "chaos-chance", f.ChaosChance, "If > 0.0, introduce random client errors and latency. Intended for testing.") - - fs.BoolVar(&f.RunOnce, "runonce", f.RunOnce, "If true, exit after spawning pods from static pod files or remote urls. Exclusive with --enable-server") - fs.BoolVar(&f.EnableServer, "enable-server", f.EnableServer, "Enable the Kubelet's server") - fs.StringVar(&f.HostnameOverride, "hostname-override", f.HostnameOverride, "If non-empty, will use this string as identification instead of the actual hostname. If --cloud-provider is set, the cloud provider determines the name of the node (consult cloud provider documentation to determine if and how the hostname is used).") - fs.StringVar(&f.NodeIP, "node-ip", f.NodeIP, "IP address of the node. If set, kubelet will use this IP address for the node. If unset, kubelet will use the node's default IPv4 address, if any, or its default IPv6 address if it has no IPv4 addresses. You can pass `::` to make it prefer the default IPv6 address rather than the default IPv4 address.") - - fs.StringVar(&f.ProviderID, "provider-id", f.ProviderID, "Unique identifier for identifying the node in a machine database, i.e cloudprovider") + fs.StringVar(&f.NodeIP, "node-ip", f.NodeIP, "IP address of the node. If set, kubelet will use this IP address for the node. If unset, kubelet will use the node's default IPv4 address, if any, or its default IPv6 address if it has no IPv4 addresses. You can pass '::' to make it prefer the default IPv6 address rather than the default IPv4 address.") fs.StringVar(&f.CertDirectory, "cert-dir", f.CertDirectory, "The directory where the TLS certs are located. "+ "If --tls-cert-file and --tls-private-key-file are provided, this flag will be ignored.") - fs.StringVar(&f.CloudProvider, "cloud-provider", f.CloudProvider, "The provider for cloud services. Specify empty string for running with no cloud provider. If set, the cloud provider determines the name of the node (consult cloud provider documentation to determine if and how the hostname is used).") - fs.StringVar(&f.CloudConfigFile, "cloud-config", f.CloudConfigFile, "The path to the cloud provider configuration file. Empty string for no configuration file.") - fs.StringVar(&f.RootDirectory, "root-dir", f.RootDirectory, "Directory path for managing kubelet files (volume mounts,etc).") fs.Var(&f.DynamicConfigDir, "dynamic-config-dir", "The Kubelet will use this directory for checkpointing downloaded configurations and tracking configuration health. The Kubelet will create this directory if it does not already exist. The path may be absolute or relative; relative paths start at the Kubelet's current working directory. Providing this flag enables dynamic Kubelet configuration. The DynamicKubeletConfig feature gate must be enabled to pass this flag; this gate currently defaults to true because the feature is beta.") @@ -383,20 +338,12 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) { fs.Var(utiltaints.NewTaintsVar(&f.RegisterWithTaints), "register-with-taints", "Register the node with the given list of taints (comma separated \"=:\"). No-op if register-node is false.") // EXPERIMENTAL FLAGS - fs.StringVar(&f.ExperimentalMounterPath, "experimental-mounter-path", f.ExperimentalMounterPath, "[Experimental] Path of mounter binary. Leave empty to use the default mount.") - fs.BoolVar(&f.ExperimentalKernelMemcgNotification, "experimental-kernel-memcg-notification", f.ExperimentalKernelMemcgNotification, "If enabled, the kubelet will integrate with the kernel memcg notification to determine if memory eviction thresholds are crossed rather than polling.") fs.StringVar(&f.RemoteRuntimeEndpoint, "container-runtime-endpoint", f.RemoteRuntimeEndpoint, "[Experimental] The endpoint of remote runtime service. Currently unix socket endpoint is supported on Linux, while npipe and tcp endpoints are supported on windows. Examples:'unix:///var/run/dockershim.sock', 'npipe:////./pipe/dockershim'") fs.StringVar(&f.RemoteImageEndpoint, "image-service-endpoint", f.RemoteImageEndpoint, "[Experimental] The endpoint of remote image service. If not specified, it will be the same with container-runtime-endpoint by default. Currently unix socket endpoint is supported on Linux, while npipe and tcp endpoints are supported on windows. Examples:'unix:///var/run/dockershim.sock', 'npipe:////./pipe/dockershim'") - fs.BoolVar(&f.ExperimentalCheckNodeCapabilitiesBeforeMount, "experimental-check-node-capabilities-before-mount", f.ExperimentalCheckNodeCapabilitiesBeforeMount, "[Experimental] if set true, the kubelet will check the underlying node for required components (binaries, etc.) before performing the mount") - fs.BoolVar(&f.ExperimentalNodeAllocatableIgnoreEvictionThreshold, "experimental-allocatable-ignore-eviction", f.ExperimentalNodeAllocatableIgnoreEvictionThreshold, "When set to 'true', Hard Eviction Thresholds will be ignored while calculating Node Allocatable. See https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ for more details. [default=false]") bindableNodeLabels := cliflag.ConfigurationMap(f.NodeLabels) fs.Var(&bindableNodeLabels, "node-labels", fmt.Sprintf(" Labels to add when registering the node in the cluster. Labels must be key=value pairs separated by ','. Labels in the 'kubernetes.io' namespace must begin with an allowed prefix (%s) or be in the specifically allowed set (%s)", strings.Join(kubeletapis.KubeletLabelNamespaces(), ", "), strings.Join(kubeletapis.KubeletLabels(), ", "))) - fs.StringVar(&f.VolumePluginDir, "volume-plugin-dir", f.VolumePluginDir, "The full path of the directory in which to search for additional third party volume plugins") fs.StringVar(&f.LockFilePath, "lock-file", f.LockFilePath, " The path to file for kubelet to use as a lock file.") fs.BoolVar(&f.ExitOnLockContention, "exit-on-lock-contention", f.ExitOnLockContention, "Whether kubelet should exit upon lock-file contention.") - fs.StringVar(&f.SeccompProfileRoot, "seccomp-profile-root", f.SeccompProfileRoot, " Directory path for seccomp profiles.") - fs.StringVar(&f.BootstrapCheckpointPath, "bootstrap-checkpoint-path", f.BootstrapCheckpointPath, " Path to the directory where the checkpoints are stored") - fs.Int32Var(&f.NodeStatusMaxImages, "node-status-max-images", f.NodeStatusMaxImages, " The maximum number of images to report in Node.Status.Images. If -1 is specified, no cap will be applied.") // DEPRECATED FLAGS fs.StringVar(&f.BootstrapKubeconfig, "experimental-bootstrap-kubeconfig", f.BootstrapKubeconfig, "") @@ -415,9 +362,25 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) { fs.MarkDeprecated("non-masquerade-cidr", "will be removed in a future version") fs.BoolVar(&f.KeepTerminatedPodVolumes, "keep-terminated-pod-volumes", f.KeepTerminatedPodVolumes, "Keep terminated pod volumes mounted to the node after the pod terminates. Can be useful for debugging volume related issues.") fs.MarkDeprecated("keep-terminated-pod-volumes", "will be removed in a future version") - fs.BoolVar(&f.EnableCAdvisorJSONEndpoints, "enable-cadvisor-json-endpoints", f.EnableCAdvisorJSONEndpoints, "Enable cAdvisor json /spec and /stats/* endpoints.") + fs.BoolVar(&f.EnableCAdvisorJSONEndpoints, "enable-cadvisor-json-endpoints", f.EnableCAdvisorJSONEndpoints, "Enable cAdvisor json /spec and /stats/* endpoints. [default=false]") + // TODO: Remove this flag in 1.20+. https://github.com/kubernetes/kubernetes/issues/68522 fs.MarkDeprecated("enable-cadvisor-json-endpoints", "will be removed in a future version") - + fs.BoolVar(&f.ReallyCrashForTesting, "really-crash-for-testing", f.ReallyCrashForTesting, "If true, when panics occur crash. Intended for testing.") + fs.MarkDeprecated("really-crash-for-testing", "will be removed in a future version.") + fs.Float64Var(&f.ChaosChance, "chaos-chance", f.ChaosChance, "If > 0.0, introduce random client errors and latency. Intended for testing.") + fs.MarkDeprecated("chaos-chance", "will be removed in a future version.") + fs.StringVar(&f.SeccompProfileRoot, "seccomp-profile-root", f.SeccompProfileRoot, " Directory path for seccomp profiles.") + fs.MarkDeprecated("seccomp-profile-root", "will be removed in 1.23, in favor of using the `/seccomp` directory") + fs.StringVar(&f.ExperimentalMounterPath, "experimental-mounter-path", f.ExperimentalMounterPath, "[Experimental] Path of mounter binary. Leave empty to use the default mount.") + fs.MarkDeprecated("experimental-mounter-path", "will be removed in 1.23. in favor of using CSI.") + fs.BoolVar(&f.ExperimentalCheckNodeCapabilitiesBeforeMount, "experimental-check-node-capabilities-before-mount", f.ExperimentalCheckNodeCapabilitiesBeforeMount, "[Experimental] if set true, the kubelet will check the underlying node for required components (binaries, etc.) before performing the mount") + fs.MarkDeprecated("experimental-check-node-capabilities-before-mount", "will be removed in 1.23. in favor of using CSI.") + fs.StringVar(&f.CloudProvider, "cloud-provider", f.CloudProvider, "The provider for cloud services. Set to empty string for running with no cloud provider. If set, the cloud provider determines the name of the node (consult cloud provider documentation to determine if and how the hostname is used).") + fs.MarkDeprecated("cloud-provider", "will be removed in 1.23, in favor of removing cloud provider code from Kubelet.") + fs.StringVar(&f.CloudConfigFile, "cloud-config", f.CloudConfigFile, "The path to the cloud provider configuration file. Empty string for no configuration file.") + fs.MarkDeprecated("cloud-config", "will be removed in 1.23, in favor of removing cloud provider code from Kubelet.") + fs.BoolVar(&f.ExperimentalNodeAllocatableIgnoreEvictionThreshold, "experimental-allocatable-ignore-eviction", f.ExperimentalNodeAllocatableIgnoreEvictionThreshold, "When set to 'true', Hard Eviction Thresholds will be ignored while calculating Node Allocatable. See https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ for more details. [default=false]") + fs.MarkDeprecated("experimental-allocatable-ignore-eviction", "will be removed in 1.23.") } // AddKubeletConfigFlags adds flags for a specific kubeletconfig.KubeletConfiguration to the specified FlagSet @@ -427,14 +390,16 @@ func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfig mainfs.AddFlagSet(fs) }() + fs.BoolVar(&c.EnableServer, "enable-server", c.EnableServer, "Enable the Kubelet's server") + fs.BoolVar(&c.FailSwapOn, "fail-swap-on", c.FailSwapOn, "Makes the Kubelet fail to start if swap is enabled on the node. ") fs.StringVar(&c.StaticPodPath, "pod-manifest-path", c.StaticPodPath, "Path to the directory containing static pod files to run, or the path to a single static pod file. Files starting with dots will be ignored.") fs.DurationVar(&c.SyncFrequency.Duration, "sync-frequency", c.SyncFrequency.Duration, "Max period between synchronizing running containers and config") fs.DurationVar(&c.FileCheckFrequency.Duration, "file-check-frequency", c.FileCheckFrequency.Duration, "Duration between checking config files for new data") fs.DurationVar(&c.HTTPCheckFrequency.Duration, "http-check-frequency", c.HTTPCheckFrequency.Duration, "Duration between checking http for new data") fs.StringVar(&c.StaticPodURL, "manifest-url", c.StaticPodURL, "URL for accessing additional Pod specifications to run") - fs.Var(cliflag.NewColonSeparatedMultimapStringString(&c.StaticPodURLHeader), "manifest-url-header", "Comma-separated list of HTTP headers to use when accessing the url provided to --manifest-url. Multiple headers with the same name will be added in the same order provided. This flag can be repeatedly invoked. For example: `--manifest-url-header 'a:hello,b:again,c:world' --manifest-url-header 'b:beautiful'`") - fs.Var(utilflag.IPVar{Val: &c.Address}, "address", "The IP address for the Kubelet to serve on (set to `0.0.0.0` for all IPv4 interfaces and `::` for all IPv6 interfaces)") + fs.Var(cliflag.NewColonSeparatedMultimapStringString(&c.StaticPodURLHeader), "manifest-url-header", "Comma-separated list of HTTP headers to use when accessing the url provided to --manifest-url. Multiple headers with the same name will be added in the same order provided. This flag can be repeatedly invoked. For example: --manifest-url-header 'a:hello,b:again,c:world' --manifest-url-header 'b:beautiful'") + fs.Var(utilflag.IPVar{Val: &c.Address}, "address", "The IP address for the Kubelet to serve on (set to '0.0.0.0' for all IPv4 interfaces and '::' for all IPv6 interfaces)") fs.Int32Var(&c.Port, "port", c.Port, "The port for the Kubelet to serve on.") fs.Int32Var(&c.ReadOnlyPort, "read-only-port", c.ReadOnlyPort, "The read-only port for the Kubelet to serve on with no authentication/authorization (set to 0 to disable)") @@ -467,11 +432,13 @@ func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfig fs.StringVar(&c.TLSPrivateKeyFile, "tls-private-key-file", c.TLSPrivateKeyFile, "File containing x509 private key matching --tls-cert-file.") fs.BoolVar(&c.ServerTLSBootstrap, "rotate-server-certificates", c.ServerTLSBootstrap, "Auto-request and rotate the kubelet serving certificates by requesting new certificates from the kube-apiserver when the certificate expiration approaches. Requires the RotateKubeletServerCertificate feature gate to be enabled, and approval of the submitted CertificateSigningRequest objects.") - tlsCipherPossibleValues := cliflag.TLSCipherPossibleValues() + tlsCipherPreferredValues := cliflag.PreferredTLSCipherNames() + tlsCipherInsecureValues := cliflag.InsecureTLSCipherNames() fs.StringSliceVar(&c.TLSCipherSuites, "tls-cipher-suites", c.TLSCipherSuites, "Comma-separated list of cipher suites for the server. "+ - "If omitted, the default Go cipher suites will be used. "+ - "Possible values: "+strings.Join(tlsCipherPossibleValues, ",")) + "If omitted, the default Go cipher suites will be used. \n"+ + "Preferred values: "+strings.Join(tlsCipherPreferredValues, ", ")+". \n"+ + "Insecure values: "+strings.Join(tlsCipherInsecureValues, ", ")+".") tlsPossibleVersions := cliflag.TLSPossibleVersions() fs.StringVar(&c.TLSMinVersion, "tls-min-version", c.TLSMinVersion, "Minimum TLS version supported. "+ @@ -486,10 +453,11 @@ func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfig fs.BoolVar(&c.EnableDebuggingHandlers, "enable-debugging-handlers", c.EnableDebuggingHandlers, "Enables server endpoints for log collection and local running of containers and commands") fs.BoolVar(&c.EnableContentionProfiling, "contention-profiling", c.EnableContentionProfiling, "Enable lock contention profiling, if profiling is enabled") fs.Int32Var(&c.HealthzPort, "healthz-port", c.HealthzPort, "The port of the localhost healthz endpoint (set to 0 to disable)") - fs.Var(utilflag.IPVar{Val: &c.HealthzBindAddress}, "healthz-bind-address", "The IP address for the healthz server to serve on (set to `0.0.0.0` for all IPv4 interfaces and `::` for all IPv6 interfaces)") + fs.Var(utilflag.IPVar{Val: &c.HealthzBindAddress}, "healthz-bind-address", "The IP address for the healthz server to serve on (set to '0.0.0.0' for all IPv4 interfaces and '::' for all IPv6 interfaces)") fs.Int32Var(&c.OOMScoreAdj, "oom-score-adj", c.OOMScoreAdj, "The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000]") fs.StringVar(&c.ClusterDomain, "cluster-domain", c.ClusterDomain, "Domain for this cluster. If set, kubelet will configure all containers to search this domain in addition to the host's search domains") + fs.StringVar(&c.VolumePluginDir, "volume-plugin-dir", c.VolumePluginDir, "The full path of the directory in which to search for additional third party volume plugins") fs.StringSliceVar(&c.ClusterDNS, "cluster-dns", c.ClusterDNS, "Comma-separated list of DNS server IP address. This value is used for containers DNS server in case of Pods with \"dnsPolicy=ClusterFirst\". Note: all DNS servers appearing in the list MUST serve the same set of records otherwise name resolution within the cluster may not work correctly. There is no guarantee as to which DNS server may be contacted for name resolution.") fs.DurationVar(&c.StreamingConnectionIdleTimeout.Duration, "streaming-connection-idle-timeout", c.StreamingConnectionIdleTimeout.Duration, "Maximum time a streaming connection can be idle before the connection is automatically closed. 0 indicates no timeout. Example: '5m'") fs.DurationVar(&c.NodeStatusUpdateFrequency.Duration, "node-status-update-frequency", c.NodeStatusUpdateFrequency.Duration, "Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller.") @@ -500,13 +468,15 @@ func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfig fs.Var(cliflag.NewMapStringBool(&c.FeatureGates), "feature-gates", "A set of key=value pairs that describe feature gates for alpha/experimental features. "+ "Options are:\n"+strings.Join(utilfeature.DefaultFeatureGate.KnownFeatures(), "\n")) fs.StringVar(&c.KubeletCgroups, "kubelet-cgroups", c.KubeletCgroups, "Optional absolute name of cgroups to create and run the Kubelet in.") - fs.StringVar(&c.SystemCgroups, "system-cgroups", c.SystemCgroups, "Optional absolute name of cgroups in which to place all non-kernel processes that are not already inside a cgroup under `/`. Empty for no container. Rolling back the flag requires a reboot.") + fs.StringVar(&c.SystemCgroups, "system-cgroups", c.SystemCgroups, "Optional absolute name of cgroups in which to place all non-kernel processes that are not already inside a cgroup under '/'. Empty for no container. Rolling back the flag requires a reboot.") + + fs.StringVar(&c.ProviderID, "provider-id", c.ProviderID, "Unique identifier for identifying the node in a machine database, i.e cloudprovider") fs.BoolVar(&c.CgroupsPerQOS, "cgroups-per-qos", c.CgroupsPerQOS, "Enable creation of QoS cgroup hierarchy, if true top level QoS and pod cgroups are created.") fs.StringVar(&c.CgroupDriver, "cgroup-driver", c.CgroupDriver, "Driver that the kubelet uses to manipulate cgroups on the host. Possible values: 'cgroupfs', 'systemd', 'none'") fs.StringVar(&c.CgroupRoot, "cgroup-root", c.CgroupRoot, "Optional root cgroup to use for pods. This is handled by the container runtime on a best effort basis. Default: '', which means use the container runtime default.") fs.StringVar(&c.CPUManagerPolicy, "cpu-manager-policy", c.CPUManagerPolicy, "CPU Manager policy to use. Possible values: 'none', 'static'. Default: 'none'") - fs.DurationVar(&c.CPUManagerReconcilePeriod.Duration, "cpu-manager-reconcile-period", c.CPUManagerReconcilePeriod.Duration, " CPU Manager reconciliation period. Examples: '10s', or '1m'. If not supplied, defaults to `NodeStatusUpdateFrequency`") + fs.DurationVar(&c.CPUManagerReconcilePeriod.Duration, "cpu-manager-reconcile-period", c.CPUManagerReconcilePeriod.Duration, " CPU Manager reconciliation period. Examples: '10s', or '1m'. If not supplied, defaults to 'NodeStatusUpdateFrequency'") fs.Var(cliflag.NewMapStringString(&c.QOSReserved), "qos-reserved", " A set of ResourceName=Percentage (e.g. memory=50%) pairs that describe how pod resource requests are reserved at the QoS level. Currently only memory is supported. Requires the QOSReserved feature gate to be enabled.") fs.StringVar(&c.TopologyManagerPolicy, "topology-manager-policy", c.TopologyManagerPolicy, "Topology Manager policy to use. Possible values: 'none', 'best-effort', 'restricted', 'single-numa-node'.") fs.DurationVar(&c.RuntimeRequestTimeout.Duration, "runtime-request-timeout", c.RuntimeRequestTimeout.Duration, "Timeout of all runtime requests except long running request - pull, logs, exec and attach. When timeout exceeded, kubelet will cancel the request, throw out an error and retry later.") @@ -517,6 +487,9 @@ func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfig fs.Int64Var(&c.PodPidsLimit, "pod-max-pids", c.PodPidsLimit, "Set the maximum number of processes per pod. If -1, the kubelet defaults to the node allocatable pid capacity.") fs.StringVar(&c.ResolverConfig, "resolv-conf", c.ResolverConfig, "Resolver configuration file used as the basis for the container DNS resolution configuration.") + + fs.BoolVar(&c.RunOnce, "runonce", c.RunOnce, "If true, exit after spawning pods from static pod files or remote urls. Exclusive with --enable-server") + fs.BoolVar(&c.CPUCFSQuota, "cpu-cfs-quota", c.CPUCFSQuota, "Enable CPU CFS quota enforcement for containers that specify CPU limits") fs.DurationVar(&c.CPUCFSQuotaPeriod.Duration, "cpu-cfs-quota-period", c.CPUCFSQuotaPeriod.Duration, "Sets CPU CFS quota period value, cpu.cfs_period_us, defaults to Linux Kernel default") fs.BoolVar(&c.EnableControllerAttachDetach, "enable-controller-attach-detach", c.EnableControllerAttachDetach, "Enables the Attach/Detach controller to manage attachment/detachment of volumes scheduled to this node, and disables kubelet from executing any attach/detach operations") @@ -527,12 +500,15 @@ func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfig fs.Int32Var(&c.ContainerLogMaxFiles, "container-log-max-files", c.ContainerLogMaxFiles, " Set the maximum number of container log files that can be present for a container. The number must be >= 2. This flag can only be used with --container-runtime=remote.") fs.StringSliceVar(&c.AllowedUnsafeSysctls, "allowed-unsafe-sysctls", c.AllowedUnsafeSysctls, "Comma-separated whitelist of unsafe sysctls or unsafe sysctl patterns (ending in *). Use these at your own risk.") + fs.Int32Var(&c.NodeStatusMaxImages, "node-status-max-images", c.NodeStatusMaxImages, "The maximum number of images to report in Node.Status.Images. If -1 is specified, no cap will be applied.") + fs.BoolVar(&c.KernelMemcgNotification, "kernel-memcg-notification", c.KernelMemcgNotification, "If enabled, the kubelet will integrate with the kernel memcg notification to determine if memory eviction thresholds are crossed rather than polling.") + // Flags intended for testing, not recommended used in production environments. fs.Int64Var(&c.MaxOpenFiles, "max-open-files", c.MaxOpenFiles, "Number of files that can be opened by Kubelet process.") fs.StringVar(&c.ContentType, "kube-api-content-type", c.ContentType, "Content type of requests sent to apiserver.") - fs.Int32Var(&c.KubeAPIQPS, "kube-api-qps", c.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver") - fs.Int32Var(&c.KubeAPIBurst, "kube-api-burst", c.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver") + fs.Int32Var(&c.KubeAPIQPS, "kube-api-qps", c.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver. Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags") + fs.Int32Var(&c.KubeAPIBurst, "kube-api-burst", c.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver. Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags") fs.BoolVar(&c.SerializeImagePulls, "serialize-image-pulls", c.SerializeImagePulls, "Pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details.") fs.Var(cliflag.NewLangleSeparatedMapStringString(&c.EvictionHard), "eviction-hard", "A set of eviction thresholds (e.g. memory.available<1Gi) that if met would trigger a pod eviction.") @@ -550,4 +526,8 @@ func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfig fs.StringSliceVar(&c.EnforceNodeAllocatable, "enforce-node-allocatable", c.EnforceNodeAllocatable, "A comma separated list of levels of node allocatable enforcement to be enforced by kubelet. Acceptable options are 'none', 'pods', 'system-reserved', and 'kube-reserved'. If the latter two options are specified, '--system-reserved-cgroup' and '--kube-reserved-cgroup' must also be set, respectively. If 'none' is specified, no additional options should be set. See https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ for more details.") fs.StringVar(&c.SystemReservedCgroup, "system-reserved-cgroup", c.SystemReservedCgroup, "Absolute name of the top level cgroup that is used to manage non-kubernetes components for which compute resources were reserved via '--system-reserved' flag. Ex. '/system-reserved'. [default='']") fs.StringVar(&c.KubeReservedCgroup, "kube-reserved-cgroup", c.KubeReservedCgroup, "Absolute name of the top level cgroup that is used to manage kubernetes components for which compute resources were reserved via '--kube-reserved' flag. Ex. '/kube-reserved'. [default='']") + fs.StringVar(&c.Logging.Format, "logging-format", c.Logging.Format, `Sets the log format. Permitted formats: "text", "json".\nNon-default formats don't honor these flags: -add_dir_header, --alsologtostderr, --log_backtrace_at, --log_dir, --log_file, --log_file_max_size, --logtostderr, --skip_headers, --skip_log_headers, --stderrthreshold, --log-flush-frequency.\nNon-default choices are currently alpha and subject to change without warning.`) + + // Graduated experimental flags, kept for backward compatibility + fs.BoolVar(&c.KernelMemcgNotification, "experimental-kernel-memcg-notification", c.KernelMemcgNotification, "Use kernelMemcgNotification configuration, this flag will be removed in 1.23.") } diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/plugins_providers.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/plugins_providers.go index d54706bf1bd..3ff04819f06 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/plugins_providers.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/plugins_providers.go @@ -21,7 +21,7 @@ package app import ( "k8s.io/component-base/featuregate" "k8s.io/csi-translation-lib/plugins" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/awsebs" @@ -65,6 +65,7 @@ func appendLegacyProviderVolumes(allPlugins []volume.VolumePlugin, featureGate f pluginMigrationStatus[plugins.CinderInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationOpenStack, pluginMigrationCompleteFeature: features.CSIMigrationOpenStackComplete, pluginProbeFunction: cinder.ProbeVolumePlugins} pluginMigrationStatus[plugins.AzureDiskInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationAzureDisk, pluginMigrationCompleteFeature: features.CSIMigrationAzureDiskComplete, pluginProbeFunction: azure_dd.ProbeVolumePlugins} pluginMigrationStatus[plugins.AzureFileInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationAzureFile, pluginMigrationCompleteFeature: features.CSIMigrationAzureFileComplete, pluginProbeFunction: azure_file.ProbeVolumePlugins} + pluginMigrationStatus[plugins.VSphereInTreePluginName] = pluginInfo{pluginMigrationFeature: features.CSIMigrationvSphere, pluginMigrationCompleteFeature: features.CSIMigrationvSphereComplete, pluginProbeFunction: vsphere_volume.ProbeVolumePlugins} var err error for pluginName, pluginInfo := range pluginMigrationStatus { @@ -73,7 +74,5 @@ func appendLegacyProviderVolumes(allPlugins []volume.VolumePlugin, featureGate f return allPlugins, err } } - - allPlugins = append(allPlugins, vsphere_volume.ProbeVolumePlugins()...) return allPlugins, nil } diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go index 022972206f1..bb8e277f4e7 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go @@ -22,9 +22,9 @@ import ( "crypto/tls" "errors" "fmt" + "math" "net" "net/http" - "net/url" "os" "path" "path/filepath" @@ -35,7 +35,7 @@ import ( "github.com/coreos/go-systemd/daemon" "github.com/spf13/cobra" "github.com/spf13/pflag" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" v1 "k8s.io/api/core/v1" @@ -49,7 +49,6 @@ import ( "k8s.io/apiserver/pkg/server/healthz" utilfeature "k8s.io/apiserver/pkg/util/feature" clientset "k8s.io/client-go/kubernetes" - certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" v1core "k8s.io/client-go/kubernetes/typed/core/v1" restclient "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" @@ -59,9 +58,13 @@ import ( "k8s.io/client-go/util/connrotation" "k8s.io/client-go/util/keyutil" cloudprovider "k8s.io/cloud-provider" + "k8s.io/component-base/cli/flag" cliflag "k8s.io/component-base/cli/flag" + "k8s.io/component-base/configz" "k8s.io/component-base/featuregate" + "k8s.io/component-base/logs" "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" "k8s.io/component-base/version" "k8s.io/component-base/version/verflag" kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1" @@ -82,19 +85,15 @@ import ( "k8s.io/kubernetes/pkg/kubelet/cm/cpuset" "k8s.io/kubernetes/pkg/kubelet/config" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/dockershim" - dockerremote "k8s.io/kubernetes/pkg/kubelet/dockershim/remote" "k8s.io/kubernetes/pkg/kubelet/eviction" evictionapi "k8s.io/kubernetes/pkg/kubelet/eviction/api" dynamickubeletconfig "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/configfiles" + kubeletmetrics "k8s.io/kubernetes/pkg/kubelet/metrics" "k8s.io/kubernetes/pkg/kubelet/server" - "k8s.io/kubernetes/pkg/kubelet/server/streaming" "k8s.io/kubernetes/pkg/kubelet/stats/pidlimit" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/util/configz" utilfs "k8s.io/kubernetes/pkg/util/filesystem" - utilflag "k8s.io/kubernetes/pkg/util/flag" "k8s.io/kubernetes/pkg/util/flock" nodeutil "k8s.io/kubernetes/pkg/util/node" "k8s.io/kubernetes/pkg/util/oom" @@ -110,7 +109,7 @@ const ( ) // NewKubeletCommand creates a *cobra.Command object with default parameters -func NewKubeletCommand(stopCh <-chan struct{}) *cobra.Command { +func NewKubeletCommand(ctx context.Context) *cobra.Command { cleanFlagSet := pflag.NewFlagSet(componentKubelet, pflag.ContinueOnError) cleanFlagSet.SetNormalizeFunc(cliflag.WordSepNormalizeFunc) kubeletFlags := options.NewKubeletFlags() @@ -175,7 +174,7 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API // short-circuit on verflag verflag.PrintAndExitIfRequested() - utilflag.PrintFlags(cleanFlagSet) + cliflag.PrintFlags(cleanFlagSet) // set feature gates from initial flags-based config if err := utilfeature.DefaultMutableFeatureGate.SetFromMap(kubeletConfig.FeatureGates); err != nil { @@ -256,17 +255,9 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API // add the kubelet config controller to kubeletDeps kubeletDeps.KubeletConfigController = kubeletConfigController - // start the experimental docker shim, if enabled - if kubeletServer.KubeletFlags.ExperimentalDockershim { - if err := RunDockershim(&kubeletServer.KubeletFlags, kubeletConfig, stopCh); err != nil { - klog.Fatal(err) - } - return - } - // run the kubelet klog.V(5).Infof("KubeletConfiguration: %#v", kubeletServer.KubeletConfiguration) - if err := Run(kubeletServer, kubeletDeps, utilfeature.DefaultFeatureGate, stopCh); err != nil { + if err := Run(ctx, kubeletServer, kubeletDeps, utilfeature.DefaultFeatureGate); err != nil { klog.Fatal(err) } }, @@ -372,9 +363,9 @@ func UnsecuredDependencies(s *options.KubeletServer, featureGate featuregate.Fea hu := hostutil.NewHostUtil() var pluginRunner = exec.New() - var dockerClientConfig *dockershim.ClientConfig + var dockerOptions *kubelet.DockerOptions if s.ContainerRuntime == kubetypes.DockerContainerRuntime { - dockerClientConfig = &dockershim.ClientConfig{ + dockerOptions = &kubelet.DockerOptions{ DockerEndpoint: s.DockerEndpoint, RuntimeRequestTimeout: s.RuntimeRequestTimeout.Duration, ImagePullProgressDeadline: s.ImagePullProgressDeadline.Duration, @@ -390,7 +381,7 @@ func UnsecuredDependencies(s *options.KubeletServer, featureGate featuregate.Fea CAdvisorInterface: nil, // cadvisor.New launches background processes (bg http.ListenAndServe, and some bg cleaners), not set here Cloud: nil, // cloud provider might start background processes ContainerManager: nil, - DockerClientConfig: dockerClientConfig, + DockerOptions: dockerOptions, KubeClient: nil, HeartbeatClient: nil, EventClient: nil, @@ -408,13 +399,16 @@ func UnsecuredDependencies(s *options.KubeletServer, featureGate featuregate.Fea // The kubeDeps argument may be nil - if so, it is initialized from the settings on KubeletServer. // Otherwise, the caller is assumed to have set up the Dependencies object and a default one will // not be generated. -func Run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate featuregate.FeatureGate, stopCh <-chan struct{}) error { +func Run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate featuregate.FeatureGate) error { + logOption := logs.NewOptions() + logOption.LogFormat = s.Logging.Format + logOption.Apply() // To help debugging, immediately log version klog.Infof("Version: %+v", version.Get()) if err := initForOS(s.KubeletFlags.WindowsService); err != nil { return fmt.Errorf("failed OS init: %v", err) } - if err := run(s, kubeDeps, featureGate, stopCh); err != nil { + if err := run(ctx, s, kubeDeps, featureGate); err != nil { return fmt.Errorf("failed to run Kubelet: %v", err) } return nil @@ -462,7 +456,7 @@ func makeEventRecorder(kubeDeps *kubelet.Dependencies, nodeName types.NodeName) } eventBroadcaster := record.NewBroadcaster() kubeDeps.Recorder = eventBroadcaster.NewRecorder(legacyscheme.Scheme, v1.EventSource{Component: componentKubelet, Host: string(nodeName)}) - eventBroadcaster.StartLogging(klog.V(3).Infof) + eventBroadcaster.StartStructuredLogging(3) if kubeDeps.EventClient != nil { klog.V(4).Infof("Sending events to api server.") eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeDeps.EventClient.Events("")}) @@ -471,7 +465,7 @@ func makeEventRecorder(kubeDeps *kubelet.Dependencies, nodeName types.NodeName) } } -func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate featuregate.FeatureGate, stopCh <-chan struct{}) (err error) { +func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate featuregate.FeatureGate) (err error) { // Set global feature gates based on the value on the initial KubeletServer err = utilfeature.DefaultMutableFeatureGate.SetFromMap(s.KubeletConfiguration.FeatureGates) if err != nil { @@ -525,13 +519,12 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate f if kubeDeps.Cloud == nil { if !cloudprovider.IsExternal(s.CloudProvider) { + cloudprovider.DeprecationWarningForProvider(s.CloudProvider) cloud, err := cloudprovider.InitCloudProvider(s.CloudProvider, s.CloudConfigFile) if err != nil { return err } - if cloud == nil { - klog.V(2).Infof("No cloud provider specified: %q from the config file: %q\n", s.CloudProvider, s.CloudConfigFile) - } else { + if cloud != nil { klog.V(2).Infof("Successfully initialized cloud provider: %q from the config file: %q\n", s.CloudProvider, s.CloudConfigFile) } kubeDeps.Cloud = cloud @@ -556,7 +549,7 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate f klog.Warningf("standalone mode, no API client") case kubeDeps.KubeClient == nil, kubeDeps.EventClient == nil, kubeDeps.HeartbeatClient == nil: - clientConfig, closeAllConns, err := buildKubeletClientConfig(s, nodeName) + clientConfig, closeAllConns, err := buildKubeletClientConfig(ctx, s, nodeName) if err != nil { return err } @@ -601,14 +594,15 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate f return err } kubeDeps.Auth = auth - runAuthenticatorCAReload(stopCh) + runAuthenticatorCAReload(ctx.Done()) } var cgroupRoots []string if s.CgroupDriver == "none" { cgroupRoots = []string{"/"} } else { - cgroupRoots = append(cgroupRoots, cm.NodeAllocatableRoot(s.CgroupRoot, s.CgroupDriver)) + nodeAllocatableRoot := cm.NodeAllocatableRoot(s.CgroupRoot, s.CgroupsPerQOS, s.CgroupDriver) + cgroupRoots = append(cgroupRoots, nodeAllocatableRoot) kubeletCgroup, err := cm.GetKubeletContainer(s.KubeletCgroups) if err != nil { klog.Warningf("failed to get the kubelet's cgroup: %v. Kubelet system container metrics may be missing.", err) @@ -623,6 +617,7 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate f // RuntimeCgroups is optional, so ignore if it isn't specified cgroupRoots = append(cgroupRoots, runtimeCgroup) } + if s.SystemCgroups != "" { // SystemCgroups is optional, so ignore if it isn't specified cgroupRoots = append(cgroupRoots, s.SystemCgroups) @@ -739,6 +734,7 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate f EnforceCPULimits: s.CPUCFSQuota, CPUCFSQuotaPeriod: s.CPUCFSQuotaPeriod.Duration, ExperimentalTopologyManagerPolicy: s.TopologyManagerPolicy, + Rootless: s.Rootless, }, s.FailSwapOn, devicePluginEnabled, @@ -805,7 +801,7 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate f select { case <-done: break - case <-stopCh: + case <-ctx.Done(): break } @@ -814,8 +810,8 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate f // buildKubeletClientConfig constructs the appropriate client config for the kubelet depending on whether // bootstrapping is enabled or client certificate rotation is enabled. -func buildKubeletClientConfig(s *options.KubeletServer, nodeName types.NodeName) (*restclient.Config, func(), error) { - if s.RotateCertificates && utilfeature.DefaultFeatureGate.Enabled(features.RotateKubeletClientCertificate) { +func buildKubeletClientConfig(ctx context.Context, s *options.KubeletServer, nodeName types.NodeName) (*restclient.Config, func(), error) { + if s.RotateCertificates { // Rules for client rotation and the handling of kube config files: // // 1. If the client provides only a kubeconfig file, we must use that as the initial client @@ -849,6 +845,23 @@ func buildKubeletClientConfig(s *options.KubeletServer, nodeName types.NodeName) return nil, nil, err } + legacyregistry.RawMustRegister(metrics.NewGaugeFunc( + metrics.GaugeOpts{ + Subsystem: kubeletmetrics.KubeletSubsystem, + Name: "certificate_manager_client_ttl_seconds", + Help: "Gauge of the TTL (time-to-live) of the Kubelet's client certificate. " + + "The value is in seconds until certificate expiry (negative if already expired). " + + "If client certificate is invalid or unused, the value will be +INF.", + StabilityLevel: metrics.ALPHA, + }, + func() float64 { + if c := clientCertificateManager.Current(); c != nil && c.Leaf != nil { + return math.Trunc(c.Leaf.NotAfter.Sub(time.Now()).Seconds()) + } + return math.Inf(1) + }, + )) + // the rotating transport will use the cert from the cert manager instead of these files transportConfig := restclient.AnonymousClientConfig(clientConfig) @@ -867,7 +880,7 @@ func buildKubeletClientConfig(s *options.KubeletServer, nodeName types.NodeName) } if len(s.BootstrapKubeconfig) > 0 { - if err := bootstrap.LoadClientCert(s.KubeConfig, s.BootstrapKubeconfig, s.CertDirectory, nodeName); err != nil { + if err := bootstrap.LoadClientCert(ctx, s.KubeConfig, s.BootstrapKubeconfig, s.CertDirectory, nodeName); err != nil { return nil, nil, err } } @@ -902,7 +915,7 @@ func updateDialer(clientConfig *restclient.Config) (func(), error) { // if no certificate is available, or the most recent clientConfig (which is assumed to point to the cert that the manager will // write out). func buildClientCertificateManager(certConfig, clientConfig *restclient.Config, certDir string, nodeName types.NodeName) (certificate.Manager, error) { - newClientFn := func(current *tls.Certificate) (certificatesclient.CertificateSigningRequestInterface, error) { + newClientsetFn := func(current *tls.Certificate) (clientset.Interface, error) { // If we have a valid certificate, use that to fetch CSRs. Otherwise use the bootstrap // credentials. In the future it would be desirable to change the behavior of bootstrap // to always fall back to the external bootstrap credentials when such credentials are @@ -911,11 +924,7 @@ func buildClientCertificateManager(certConfig, clientConfig *restclient.Config, if current != nil { config = clientConfig } - client, err := clientset.NewForConfig(config) - if err != nil { - return nil, err - } - return client.CertificatesV1beta1().CertificateSigningRequests(), nil + return clientset.NewForConfig(config) } return kubeletcertificate.NewKubeletClientCertificateManager( @@ -930,7 +939,7 @@ func buildClientCertificateManager(certConfig, clientConfig *restclient.Config, clientConfig.CertFile, clientConfig.KeyFile, - newClientFn, + newClientsetFn, ) } @@ -1001,6 +1010,17 @@ func InitializeTLS(kf *options.KubeletFlags, kc *kubeletconfiginternal.KubeletCo return nil, err } + if len(tlsCipherSuites) > 0 { + insecureCiphers := flag.InsecureTLSCiphers() + for i := 0; i < len(tlsCipherSuites); i++ { + for cipherName, cipherID := range insecureCiphers { + if tlsCipherSuites[i] == cipherID { + klog.Warningf("Use of insecure cipher '%s' detected.", cipherName) + } + } + } + } + minTLSVersion, err := cliflag.TLSVersion(kc.TLSMinVersion) if err != nil { return nil, err @@ -1059,6 +1079,7 @@ func RunKubelet(kubeServer *options.KubeletServer, kubeDeps *kubelet.Dependencie if err != nil { return err } + hostnameOverridden := len(kubeServer.HostnameOverride) > 0 // Setup event recorder if required. makeEventRecorder(kubeDeps, nodeName) @@ -1077,7 +1098,9 @@ func RunKubelet(kubeServer *options.KubeletServer, kubeDeps *kubelet.Dependencie kubeDeps, &kubeServer.ContainerRuntimeOptions, kubeServer.ContainerRuntime, - kubeServer.HostnameOverride, + hostname, + hostnameOverridden, + nodeName, kubeServer.NodeIP, kubeServer.ProviderID, kubeServer.CloudProvider, @@ -1087,7 +1110,7 @@ func RunKubelet(kubeServer *options.KubeletServer, kubeDeps *kubelet.Dependencie kubeServer.RegisterWithTaints, kubeServer.AllowedUnsafeSysctls, kubeServer.ExperimentalMounterPath, - kubeServer.ExperimentalKernelMemcgNotification, + kubeServer.KernelMemcgNotification, kubeServer.ExperimentalCheckNodeCapabilitiesBeforeMount, kubeServer.ExperimentalNodeAllocatableIgnoreEvictionThreshold, kubeServer.MinimumGCAge, @@ -1098,7 +1121,6 @@ func RunKubelet(kubeServer *options.KubeletServer, kubeDeps *kubelet.Dependencie kubeServer.KeepTerminatedPodVolumes, kubeServer.NodeLabels, kubeServer.SeccompProfileRoot, - kubeServer.BootstrapCheckpointPath, kubeServer.NodeStatusMaxImages) if err != nil { return fmt.Errorf("failed to create kubelet: %v", err) @@ -1111,7 +1133,9 @@ func RunKubelet(kubeServer *options.KubeletServer, kubeDeps *kubelet.Dependencie } podCfg := kubeDeps.PodConfig - rlimit.RlimitNumFiles(uint64(kubeServer.MaxOpenFiles)) + if err := rlimit.SetNumFiles(uint64(kubeServer.MaxOpenFiles)); err != nil { + klog.Errorf("Failed to set rlimit on max file handles: %v", err) + } // process pods and exit. if runOnce { @@ -1132,7 +1156,8 @@ func startKubelet(k kubelet.Bootstrap, podCfg *config.PodConfig, kubeCfg *kubele // start the kubelet server if enableServer { - go k.ListenAndServe(net.ParseIP(kubeCfg.Address), uint(kubeCfg.Port), kubeDeps.TLSOptions, kubeDeps.Auth, enableCAdvisorJSONEndpoints, kubeCfg.EnableDebuggingHandlers, kubeCfg.EnableContentionProfiling) + go k.ListenAndServe(net.ParseIP(kubeCfg.Address), uint(kubeCfg.Port), kubeDeps.TLSOptions, kubeDeps.Auth, + enableCAdvisorJSONEndpoints, kubeCfg.EnableDebuggingHandlers, kubeCfg.EnableContentionProfiling, kubeCfg.EnableSystemLogHandler) } if kubeCfg.ReadOnlyPort > 0 { @@ -1147,7 +1172,9 @@ func createAndInitKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *kubelet.Dependencies, crOptions *config.ContainerRuntimeOptions, containerRuntime string, - hostnameOverride string, + hostname string, + hostnameOverridden bool, + nodeName types.NodeName, nodeIP string, providerID string, cloudProvider string, @@ -1157,7 +1184,7 @@ func createAndInitKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, registerWithTaints []api.Taint, allowedUnsafeSysctls []string, experimentalMounterPath string, - experimentalKernelMemcgNotification bool, + kernelMemcgNotification bool, experimentalCheckNodeCapabilitiesBeforeMount bool, experimentalNodeAllocatableIgnoreEvictionThreshold bool, minimumGCAge metav1.Duration, @@ -1168,7 +1195,6 @@ func createAndInitKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, keepTerminatedPodVolumes bool, nodeLabels map[string]string, seccompProfileRoot string, - bootstrapCheckpointPath string, nodeStatusMaxImages int32) (k kubelet.Bootstrap, err error) { // TODO: block until all sources have delivered at least one update to the channel, or break the sync loop // up into "per source" synchronizations @@ -1177,7 +1203,9 @@ func createAndInitKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps, crOptions, containerRuntime, - hostnameOverride, + hostname, + hostnameOverridden, + nodeName, nodeIP, providerID, cloudProvider, @@ -1187,7 +1215,7 @@ func createAndInitKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, registerWithTaints, allowedUnsafeSysctls, experimentalMounterPath, - experimentalKernelMemcgNotification, + kernelMemcgNotification, experimentalCheckNodeCapabilitiesBeforeMount, experimentalNodeAllocatableIgnoreEvictionThreshold, minimumGCAge, @@ -1198,7 +1226,6 @@ func createAndInitKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, keepTerminatedPodVolumes, nodeLabels, seccompProfileRoot, - bootstrapCheckpointPath, nodeStatusMaxImages) if err != nil { return nil, err @@ -1261,51 +1288,3 @@ func BootstrapKubeletConfigController(dynamicConfigDir string, transform dynamic } return kc, c, nil } - -// RunDockershim only starts the dockershim in current process. This is only used for cri validate testing purpose -// TODO(random-liu): Move this to a separate binary. -func RunDockershim(f *options.KubeletFlags, c *kubeletconfiginternal.KubeletConfiguration, stopCh <-chan struct{}) error { - r := &f.ContainerRuntimeOptions - - // Initialize docker client configuration. - dockerClientConfig := &dockershim.ClientConfig{ - DockerEndpoint: r.DockerEndpoint, - RuntimeRequestTimeout: c.RuntimeRequestTimeout.Duration, - ImagePullProgressDeadline: r.ImagePullProgressDeadline.Duration, - } - - // Initialize network plugin settings. - pluginSettings := dockershim.NetworkPluginSettings{ - HairpinMode: kubeletconfiginternal.HairpinMode(c.HairpinMode), - NonMasqueradeCIDR: f.NonMasqueradeCIDR, - PluginName: r.NetworkPluginName, - PluginConfDir: r.CNIConfDir, - PluginBinDirString: r.CNIBinDir, - PluginCacheDir: r.CNICacheDir, - MTU: int(r.NetworkPluginMTU), - } - - // Initialize streaming configuration. (Not using TLS now) - streamingConfig := &streaming.Config{ - // Use a relative redirect (no scheme or host). - BaseURL: &url.URL{Path: "/cri/"}, - StreamIdleTimeout: c.StreamingConnectionIdleTimeout.Duration, - StreamCreationTimeout: streaming.DefaultConfig.StreamCreationTimeout, - SupportedRemoteCommandProtocols: streaming.DefaultConfig.SupportedRemoteCommandProtocols, - SupportedPortForwardProtocols: streaming.DefaultConfig.SupportedPortForwardProtocols, - } - - // Standalone dockershim will always start the local streaming server. - ds, err := dockershim.NewDockerService(dockerClientConfig, r.PodSandboxImage, streamingConfig, &pluginSettings, - f.RuntimeCgroups, c.CgroupDriver, r.DockershimRootDirectory, true /*startLocalStreamingServer*/) - if err != nil { - return err - } - klog.V(2).Infof("Starting the GRPC server for the docker CRI shim.") - server := dockerremote.NewDockerServer(f.RemoteRuntimeEndpoint, ds) - if err := server.Start(); err != nil { - return err - } - <-stopCh - return nil -} diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/server_linux.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/server_linux.go index f6011543d38..f6cff9af261 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/server_linux.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/server_linux.go @@ -17,7 +17,7 @@ limitations under the License. package app import ( - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/inotify" ) diff --git a/vendor/k8s.io/kubernetes/pkg/api/endpoints/OWNERS b/vendor/k8s.io/kubernetes/pkg/api/endpoints/OWNERS index 7dffe5f276a..6802ec84f40 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/endpoints/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/api/endpoints/OWNERS @@ -5,6 +5,4 @@ reviewers: - smarterclayton - mikedanese - sttts -- eparis - resouer -- david-mcmahon diff --git a/vendor/k8s.io/kubernetes/pkg/api/persistentvolume/OWNERS b/vendor/k8s.io/kubernetes/pkg/api/persistentvolume/OWNERS index bf52d0cb873..28be348c3ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/persistentvolume/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/api/persistentvolume/OWNERS @@ -3,4 +3,3 @@ reviewers: - smarterclayton - jsafrane -- david-mcmahon diff --git a/vendor/k8s.io/kubernetes/pkg/api/persistentvolumeclaim/OWNERS b/vendor/k8s.io/kubernetes/pkg/api/persistentvolumeclaim/OWNERS index bf52d0cb873..28be348c3ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/persistentvolumeclaim/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/api/persistentvolumeclaim/OWNERS @@ -3,4 +3,3 @@ reviewers: - smarterclayton - jsafrane -- david-mcmahon diff --git a/vendor/k8s.io/kubernetes/pkg/api/pod/BUILD b/vendor/k8s.io/kubernetes/pkg/api/pod/BUILD index a20e7b9cccd..4205b162618 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/pod/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/api/pod/BUILD @@ -13,7 +13,7 @@ go_library( deps = [ "//pkg/apis/core:go_default_library", "//pkg/features:go_default_library", - "//pkg/security/apparmor:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", ], @@ -39,7 +39,7 @@ go_test( deps = [ "//pkg/apis/core:go_default_library", "//pkg/features:go_default_library", - "//pkg/security/apparmor:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", @@ -47,5 +47,6 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/api/pod/OWNERS b/vendor/k8s.io/kubernetes/pkg/api/pod/OWNERS index 67330094b05..8048dbb3a81 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/pod/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/api/pod/OWNERS @@ -3,4 +3,3 @@ reviewers: - smarterclayton - thockin -- david-mcmahon diff --git a/vendor/k8s.io/kubernetes/pkg/api/pod/util.go b/vendor/k8s.io/kubernetes/pkg/api/pod/util.go index d3e51f5ed16..260414d5bc7 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/pod/util.go +++ b/vendor/k8s.io/kubernetes/pkg/api/pod/util.go @@ -19,19 +19,16 @@ package pod import ( "strings" + "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/features" - "k8s.io/kubernetes/pkg/security/apparmor" ) // ContainerType signifies container type type ContainerType int -// DefaultContainers defines default behavior: Iterate containers based on feature gates -const DefaultContainers ContainerType = 0 - const ( // Containers is for normal containers Containers ContainerType = 1 << iota @@ -44,35 +41,40 @@ const ( // AllContainers specifies that all containers be visited const AllContainers ContainerType = (InitContainers | Containers | EphemeralContainers) +// AllFeatureEnabledContainers returns a ContainerType mask which includes all container +// types except for the ones guarded by feature gate. +func AllFeatureEnabledContainers() ContainerType { + containerType := AllContainers + if !utilfeature.DefaultFeatureGate.Enabled(features.EphemeralContainers) { + containerType &= ^EphemeralContainers + } + return containerType +} + // ContainerVisitor is called with each container spec, and returns true // if visiting should continue. type ContainerVisitor func(container *api.Container, containerType ContainerType) (shouldContinue bool) -// VisitContainers invokes the visitor function with a pointer to the container -// spec of every container in the given pod spec. If visitor returns false, +// VisitContainers invokes the visitor function with a pointer to every container +// spec in the given pod spec with type set in mask. If visitor returns false, // visiting is short-circuited. VisitContainers returns true if visiting completes, // false if visiting was short-circuited. -// -// With the default mask (zero value or DefaultContainers) VisitContainers will visit all containers -// enabled by current feature gates. If mask is non-zero, VisitContainers will unconditionally visit -// container types specified by mask, and no feature gate checks will be performed. func VisitContainers(podSpec *api.PodSpec, mask ContainerType, visitor ContainerVisitor) bool { - if mask == DefaultContainers || (mask&InitContainers) > 0 { + if mask&InitContainers != 0 { for i := range podSpec.InitContainers { if !visitor(&podSpec.InitContainers[i], InitContainers) { return false } } } - if mask == DefaultContainers || (mask&Containers) > 0 { + if mask&Containers != 0 { for i := range podSpec.Containers { if !visitor(&podSpec.Containers[i], Containers) { return false } } } - if (mask == DefaultContainers && utilfeature.DefaultFeatureGate.Enabled(features.EphemeralContainers)) || - (mask&EphemeralContainers) > 0 { + if mask&EphemeralContainers != 0 { for i := range podSpec.EphemeralContainers { if !visitor((*api.Container)(&podSpec.EphemeralContainers[i].EphemeralContainerCommon), EphemeralContainers) { return false @@ -89,13 +91,13 @@ type Visitor func(name string) (shouldContinue bool) // referenced by the pod spec. If visitor returns false, visiting is short-circuited. // Transitive references (e.g. pod -> pvc -> pv -> secret) are not visited. // Returns true if visiting completed, false if visiting was short-circuited. -func VisitPodSecretNames(pod *api.Pod, visitor Visitor) bool { +func VisitPodSecretNames(pod *api.Pod, visitor Visitor, containerType ContainerType) bool { for _, reference := range pod.Spec.ImagePullSecrets { if !visitor(reference.Name) { return false } } - VisitContainers(&pod.Spec, AllContainers, func(c *api.Container, containerType ContainerType) bool { + VisitContainers(&pod.Spec, containerType, func(c *api.Container, containerType ContainerType) bool { return visitContainerSecretNames(c, visitor) }) var source *api.VolumeSource @@ -177,8 +179,8 @@ func visitContainerSecretNames(container *api.Container, visitor Visitor) bool { // referenced by the pod spec. If visitor returns false, visiting is short-circuited. // Transitive references (e.g. pod -> pvc -> pv -> secret) are not visited. // Returns true if visiting completed, false if visiting was short-circuited. -func VisitPodConfigmapNames(pod *api.Pod, visitor Visitor) bool { - VisitContainers(&pod.Spec, AllContainers, func(c *api.Container, containerType ContainerType) bool { +func VisitPodConfigmapNames(pod *api.Pod, visitor Visitor, containerType ContainerType) bool { + VisitContainers(&pod.Spec, containerType, func(c *api.Container, containerType ContainerType) bool { return visitContainerConfigmapNames(c, visitor) }) var source *api.VolumeSource @@ -361,7 +363,7 @@ func dropDisabledFields( if !utilfeature.DefaultFeatureGate.Enabled(features.AppArmor) && !appArmorInUse(oldPodAnnotations) { for k := range podAnnotations { - if strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) { + if strings.HasPrefix(k, v1.AppArmorBetaContainerAnnotationKeyPrefix) { delete(podAnnotations, k) } } @@ -394,8 +396,8 @@ func dropDisabledFields( podSpec.EphemeralContainers = nil } - if (!utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpath) || !utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpathEnvExpansion)) && !subpathExprInUse(oldPodSpec) { - // drop subpath env expansion from the pod if either of the subpath features is disabled and the old spec did not specify subpath env expansion + if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpath) && !subpathExprInUse(oldPodSpec) { + // drop subpath env expansion from the pod if subpath feature is disabled and the old spec did not specify subpath env expansion VisitContainers(podSpec, AllContainers, func(c *api.Container, containerType ContainerType) bool { for i := range c.VolumeMounts { c.VolumeMounts[i].SubPathExpr = "" @@ -429,6 +431,7 @@ func dropDisabledFields( dropDisabledProcMountField(podSpec, oldPodSpec) dropDisabledCSIVolumeSourceAlphaFields(podSpec, oldPodSpec) + dropDisabledEphemeralVolumeSourceAlphaFields(podSpec, oldPodSpec) if !utilfeature.DefaultFeatureGate.Enabled(features.NonPreemptingPriority) && !podPriorityInUse(oldPodSpec) { @@ -437,10 +440,11 @@ func dropDisabledFields( podSpec.PreemptionPolicy = nil } - if !utilfeature.DefaultFeatureGate.Enabled(features.EvenPodsSpread) && !topologySpreadConstraintsInUse(oldPodSpec) { - // Set TopologySpreadConstraints to nil only if feature is disabled and it is not used - podSpec.TopologySpreadConstraints = nil + if !utilfeature.DefaultFeatureGate.Enabled(features.SetHostnameAsFQDN) && !setHostnameAsFQDNInUse(oldPodSpec) { + // Set SetHostnameAsFQDN to nil only if feature is disabled and it is not used + podSpec.SetHostnameAsFQDN = nil } + } // dropDisabledRunAsGroupField removes disabled fields from PodSpec related @@ -496,6 +500,16 @@ func dropDisabledCSIVolumeSourceAlphaFields(podSpec, oldPodSpec *api.PodSpec) { } } +// dropDisabledEphemeralVolumeSourceAlphaFields removes disabled alpha fields from []EphemeralVolumeSource. +// This should be called from PrepareForCreate/PrepareForUpdate for all pod specs resources containing a EphemeralVolumeSource +func dropDisabledEphemeralVolumeSourceAlphaFields(podSpec, oldPodSpec *api.PodSpec) { + if !utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume) && !csiInUse(oldPodSpec) { + for i := range podSpec.Volumes { + podSpec.Volumes[i].Ephemeral = nil + } + } +} + func ephemeralContainersInUse(podSpec *api.PodSpec) bool { if podSpec == nil { return false @@ -556,14 +570,6 @@ func overheadInUse(podSpec *api.PodSpec) bool { return false } -// topologySpreadConstraintsInUse returns true if the pod spec is non-nil and has a TopologySpreadConstraints slice -func topologySpreadConstraintsInUse(podSpec *api.PodSpec) bool { - if podSpec == nil { - return false - } - return len(podSpec.TopologySpreadConstraints) > 0 -} - // procMountInUse returns true if the pod spec is non-nil and has a SecurityContext's ProcMount field set to a non-default value func procMountInUse(podSpec *api.PodSpec) bool { if podSpec == nil { @@ -588,7 +594,7 @@ func procMountInUse(podSpec *api.PodSpec) bool { // appArmorInUse returns true if the pod has apparmor related information func appArmorInUse(podAnnotations map[string]string) bool { for k := range podAnnotations { - if strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) { + if strings.HasPrefix(k, v1.AppArmorBetaContainerAnnotationKeyPrefix) { return true } } @@ -731,3 +737,66 @@ func multiplePodIPsInUse(podStatus *api.PodStatus) bool { } return false } + +// setHostnameAsFQDNInUse returns true if any pod's spec defines setHostnameAsFQDN field. +func setHostnameAsFQDNInUse(podSpec *api.PodSpec) bool { + if podSpec == nil || podSpec.SetHostnameAsFQDN == nil { + return false + } + return *podSpec.SetHostnameAsFQDN +} + +// SeccompAnnotationForField takes a pod seccomp profile field and returns the +// converted annotation value +func SeccompAnnotationForField(field *api.SeccompProfile) string { + // If only seccomp fields are specified, add the corresponding annotations. + // This ensures that the fields are enforced even if the node version + // trails the API version + switch field.Type { + case api.SeccompProfileTypeUnconfined: + return v1.SeccompProfileNameUnconfined + + case api.SeccompProfileTypeRuntimeDefault: + return v1.SeccompProfileRuntimeDefault + + case api.SeccompProfileTypeLocalhost: + if field.LocalhostProfile != nil { + return v1.SeccompLocalhostProfileNamePrefix + *field.LocalhostProfile + } + } + + // we can only reach this code path if the LocalhostProfile is nil but the + // provided field type is SeccompProfileTypeLocalhost or if an unrecognized + // type is specified + return "" +} + +// SeccompFieldForAnnotation takes a pod annotation and returns the converted +// seccomp profile field. +func SeccompFieldForAnnotation(annotation string) *api.SeccompProfile { + // If only seccomp annotations are specified, copy the values into the + // corresponding fields. This ensures that existing applications continue + // to enforce seccomp, and prevents the kubelet from needing to resolve + // annotations & fields. + if annotation == v1.SeccompProfileNameUnconfined { + return &api.SeccompProfile{Type: api.SeccompProfileTypeUnconfined} + } + + if annotation == api.SeccompProfileRuntimeDefault || annotation == api.DeprecatedSeccompProfileDockerDefault { + return &api.SeccompProfile{Type: api.SeccompProfileTypeRuntimeDefault} + } + + if strings.HasPrefix(annotation, v1.SeccompLocalhostProfileNamePrefix) { + localhostProfile := strings.TrimPrefix(annotation, v1.SeccompLocalhostProfileNamePrefix) + if localhostProfile != "" { + return &api.SeccompProfile{ + Type: api.SeccompProfileTypeLocalhost, + LocalhostProfile: &localhostProfile, + } + } + } + + // we can only reach this code path if the localhostProfile name has a zero + // length or if the annotation has an unrecognized value + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/service/OWNERS b/vendor/k8s.io/kubernetes/pkg/api/service/OWNERS index 6c0aa0e1831..0abbe713952 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/service/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/api/service/OWNERS @@ -3,4 +3,3 @@ reviewers: - justinsb - freehan -- david-mcmahon diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/pod/BUILD b/vendor/k8s.io/kubernetes/pkg/api/v1/pod/BUILD index 3402380e7eb..c5c52c6db34 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/pod/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/pod/BUILD @@ -32,6 +32,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/pod/util.go b/vendor/k8s.io/kubernetes/pkg/api/v1/pod/util.go index 1457e37ed86..90c3d34f506 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/pod/util.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/pod/util.go @@ -50,28 +50,60 @@ func FindPort(pod *v1.Pod, svcPort *v1.ServicePort) (int, error) { return 0, fmt.Errorf("no suitable port for manifest: %s", pod.UID) } +// ContainerType signifies container type +type ContainerType int + +const ( + // Containers is for normal containers + Containers ContainerType = 1 << iota + // InitContainers is for init containers + InitContainers + // EphemeralContainers is for ephemeral containers + EphemeralContainers +) + +// AllContainers specifies that all containers be visited +const AllContainers ContainerType = (InitContainers | Containers | EphemeralContainers) + +// AllFeatureEnabledContainers returns a ContainerType mask which includes all container +// types except for the ones guarded by feature gate. +func AllFeatureEnabledContainers() ContainerType { + containerType := AllContainers + if !utilfeature.DefaultFeatureGate.Enabled(features.EphemeralContainers) { + containerType &= ^EphemeralContainers + } + return containerType +} + // ContainerVisitor is called with each container spec, and returns true // if visiting should continue. -type ContainerVisitor func(container *v1.Container) (shouldContinue bool) +type ContainerVisitor func(container *v1.Container, containerType ContainerType) (shouldContinue bool) -// VisitContainers invokes the visitor function with a pointer to the container -// spec of every container in the given pod spec. If visitor returns false, +// Visitor is called with each object name, and returns true if visiting should continue +type Visitor func(name string) (shouldContinue bool) + +// VisitContainers invokes the visitor function with a pointer to every container +// spec in the given pod spec with type set in mask. If visitor returns false, // visiting is short-circuited. VisitContainers returns true if visiting completes, // false if visiting was short-circuited. -func VisitContainers(podSpec *v1.PodSpec, visitor ContainerVisitor) bool { - for i := range podSpec.InitContainers { - if !visitor(&podSpec.InitContainers[i]) { - return false +func VisitContainers(podSpec *v1.PodSpec, mask ContainerType, visitor ContainerVisitor) bool { + if mask&InitContainers != 0 { + for i := range podSpec.InitContainers { + if !visitor(&podSpec.InitContainers[i], InitContainers) { + return false + } } } - for i := range podSpec.Containers { - if !visitor(&podSpec.Containers[i]) { - return false + if mask&Containers != 0 { + for i := range podSpec.Containers { + if !visitor(&podSpec.Containers[i], Containers) { + return false + } } } - if utilfeature.DefaultFeatureGate.Enabled(features.EphemeralContainers) { + if mask&EphemeralContainers != 0 { for i := range podSpec.EphemeralContainers { - if !visitor((*v1.Container)(&podSpec.EphemeralContainers[i].EphemeralContainerCommon)) { + if !visitor((*v1.Container)(&podSpec.EphemeralContainers[i].EphemeralContainerCommon), EphemeralContainers) { return false } } @@ -79,9 +111,6 @@ func VisitContainers(podSpec *v1.PodSpec, visitor ContainerVisitor) bool { return true } -// Visitor is called with each object name, and returns true if visiting should continue -type Visitor func(name string) (shouldContinue bool) - // VisitPodSecretNames invokes the visitor function with the name of every secret // referenced by the pod spec. If visitor returns false, visiting is short-circuited. // Transitive references (e.g. pod -> pvc -> pv -> secret) are not visited. @@ -92,7 +121,7 @@ func VisitPodSecretNames(pod *v1.Pod, visitor Visitor) bool { return false } } - VisitContainers(&pod.Spec, func(c *v1.Container) bool { + VisitContainers(&pod.Spec, AllContainers, func(c *v1.Container, containerType ContainerType) bool { return visitContainerSecretNames(c, visitor) }) var source *v1.VolumeSource @@ -176,7 +205,7 @@ func visitContainerSecretNames(container *v1.Container, visitor Visitor) bool { // Transitive references (e.g. pod -> pvc -> pv -> secret) are not visited. // Returns true if visiting completed, false if visiting was short-circuited. func VisitPodConfigmapNames(pod *v1.Pod, visitor Visitor) bool { - VisitContainers(&pod.Spec, func(c *v1.Container) bool { + VisitContainers(&pod.Spec, AllContainers, func(c *v1.Container, containerType ContainerType) bool { return visitContainerConfigmapNames(c, visitor) }) var source *v1.VolumeSource diff --git a/vendor/k8s.io/kubernetes/pkg/apis/abac/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/abac/OWNERS index 9dde2493eca..42148e6acd6 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/abac/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/apis/abac/OWNERS @@ -6,4 +6,3 @@ reviewers: - deads2k - liggitt - mbohlool -- david-mcmahon diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admission/types.go b/vendor/k8s.io/kubernetes/pkg/apis/admission/types.go index 411ac03598a..14051f0169c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/admission/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/admission/types.go @@ -138,6 +138,12 @@ type AdmissionResponse struct { // the admission webhook to add additional context to the audit log for this request. // +optional AuditAnnotations map[string]string + // warnings is a list of warning messages to return to the requesting API client. + // Warning messages describe a problem the client making the API request should correct or be aware of. + // Limit warnings to 120 characters if possible. + // Warnings over 256 characters and large numbers of warnings may be truncated. + // +optional + Warnings []string } // PatchType is the type of patch being used to represent the mutated object diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admission/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/admission/v1/zz_generated.conversion.go index 82ddddd346e..957aad9f126 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/admission/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/admission/v1/zz_generated.conversion.go @@ -143,6 +143,7 @@ func autoConvert_v1_AdmissionResponse_To_admission_AdmissionResponse(in *v1.Admi out.Patch = *(*[]byte)(unsafe.Pointer(&in.Patch)) out.PatchType = (*admission.PatchType)(unsafe.Pointer(in.PatchType)) out.AuditAnnotations = *(*map[string]string)(unsafe.Pointer(&in.AuditAnnotations)) + out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings)) return nil } @@ -158,6 +159,7 @@ func autoConvert_admission_AdmissionResponse_To_v1_AdmissionResponse(in *admissi out.Patch = *(*[]byte)(unsafe.Pointer(&in.Patch)) out.PatchType = (*v1.PatchType)(unsafe.Pointer(in.PatchType)) out.AuditAnnotations = *(*map[string]string)(unsafe.Pointer(&in.AuditAnnotations)) + out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings)) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admission/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/admission/v1beta1/zz_generated.conversion.go index 0a55acfa5b8..6dd4b5bb58a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/admission/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/admission/v1beta1/zz_generated.conversion.go @@ -143,6 +143,7 @@ func autoConvert_v1beta1_AdmissionResponse_To_admission_AdmissionResponse(in *v1 out.Patch = *(*[]byte)(unsafe.Pointer(&in.Patch)) out.PatchType = (*admission.PatchType)(unsafe.Pointer(in.PatchType)) out.AuditAnnotations = *(*map[string]string)(unsafe.Pointer(&in.AuditAnnotations)) + out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings)) return nil } @@ -158,6 +159,7 @@ func autoConvert_admission_AdmissionResponse_To_v1beta1_AdmissionResponse(in *ad out.Patch = *(*[]byte)(unsafe.Pointer(&in.Patch)) out.PatchType = (*v1beta1.PatchType)(unsafe.Pointer(in.PatchType)) out.AuditAnnotations = *(*map[string]string)(unsafe.Pointer(&in.AuditAnnotations)) + out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings)) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admission/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/admission/zz_generated.deepcopy.go index 85b656dd0b4..c73b49515be 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/admission/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/admission/zz_generated.deepcopy.go @@ -93,6 +93,11 @@ func (in *AdmissionResponse) DeepCopyInto(out *AdmissionResponse) { (*out)[key] = val } } + if in.Warnings != nil { + in, out := &in.Warnings, &out.Warnings + *out = make([]string, len(*in)) + copy(*out, *in) + } return } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/apps/OWNERS index 1ed2b1cd1d6..13db28cb0c0 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/OWNERS @@ -10,13 +10,11 @@ reviewers: - sttts - saad-ali - ncdc -- tallclair - dims - errordeveloper - mml - m1093782566 - mbohlool -- david-mcmahon - kevin-wangzefeng - jianhuiz labels: diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1/defaults.go index 941a0c8e8d8..964c34d51be 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1/defaults.go @@ -99,8 +99,10 @@ func SetDefaults_StatefulSet(obj *appsv1.StatefulSet) { if obj.Spec.UpdateStrategy.Type == "" { obj.Spec.UpdateStrategy.Type = appsv1.RollingUpdateStatefulSetStrategyType - // UpdateStrategy.RollingUpdate will take default values below. - obj.Spec.UpdateStrategy.RollingUpdate = &appsv1.RollingUpdateStatefulSetStrategy{} + if obj.Spec.UpdateStrategy.RollingUpdate == nil { + // UpdateStrategy.RollingUpdate will take default values below. + obj.Spec.UpdateStrategy.RollingUpdate = &appsv1.RollingUpdateStatefulSetStrategy{} + } } if obj.Spec.UpdateStrategy.Type == appsv1.RollingUpdateStatefulSetStrategyType && diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1/zz_generated.defaults.go index 34c1e188a97..dd28a2d9671 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1/zz_generated.defaults.go @@ -94,6 +94,13 @@ func SetObjectDefaults_DaemonSet(in *v1.DaemonSet) { if a.VolumeSource.ScaleIO != nil { corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + corev1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + corev1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + corev1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -301,6 +308,13 @@ func SetObjectDefaults_Deployment(in *v1.Deployment) { if a.VolumeSource.ScaleIO != nil { corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + corev1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + corev1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + corev1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -508,6 +522,13 @@ func SetObjectDefaults_ReplicaSet(in *v1.ReplicaSet) { if a.VolumeSource.ScaleIO != nil { corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + corev1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + corev1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + corev1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -715,6 +736,13 @@ func SetObjectDefaults_StatefulSet(in *v1.StatefulSet) { if a.VolumeSource.ScaleIO != nil { corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + corev1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + corev1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + corev1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -863,6 +891,7 @@ func SetObjectDefaults_StatefulSet(in *v1.StatefulSet) { for i := range in.Spec.VolumeClaimTemplates { a := &in.Spec.VolumeClaimTemplates[i] corev1.SetDefaults_PersistentVolumeClaim(a) + corev1.SetDefaults_PersistentVolumeClaimSpec(&a.Spec) corev1.SetDefaults_ResourceList(&a.Spec.Resources.Limits) corev1.SetDefaults_ResourceList(&a.Spec.Resources.Requests) corev1.SetDefaults_ResourceList(&a.Status.Capacity) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.defaults.go index c5adde3443c..7b90fd8c3b1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.defaults.go @@ -90,6 +90,13 @@ func SetObjectDefaults_Deployment(in *v1beta1.Deployment) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -297,6 +304,13 @@ func SetObjectDefaults_StatefulSet(in *v1beta1.StatefulSet) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -445,6 +459,7 @@ func SetObjectDefaults_StatefulSet(in *v1beta1.StatefulSet) { for i := range in.Spec.VolumeClaimTemplates { a := &in.Spec.VolumeClaimTemplates[i] v1.SetDefaults_PersistentVolumeClaim(a) + v1.SetDefaults_PersistentVolumeClaimSpec(&a.Spec) v1.SetDefaults_ResourceList(&a.Spec.Resources.Limits) v1.SetDefaults_ResourceList(&a.Spec.Resources.Requests) v1.SetDefaults_ResourceList(&a.Status.Capacity) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta2/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta2/zz_generated.defaults.go index 66c37c16322..98288c2d0d2 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta2/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta2/zz_generated.defaults.go @@ -94,6 +94,13 @@ func SetObjectDefaults_DaemonSet(in *v1beta2.DaemonSet) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -301,6 +308,13 @@ func SetObjectDefaults_Deployment(in *v1beta2.Deployment) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -508,6 +522,13 @@ func SetObjectDefaults_ReplicaSet(in *v1beta2.ReplicaSet) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -715,6 +736,13 @@ func SetObjectDefaults_StatefulSet(in *v1beta2.StatefulSet) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -863,6 +891,7 @@ func SetObjectDefaults_StatefulSet(in *v1beta2.StatefulSet) { for i := range in.Spec.VolumeClaimTemplates { a := &in.Spec.VolumeClaimTemplates[i] v1.SetDefaults_PersistentVolumeClaim(a) + v1.SetDefaults_PersistentVolumeClaimSpec(&a.Spec) v1.SetDefaults_ResourceList(&a.Spec.Resources.Limits) v1.SetDefaults_ResourceList(&a.Spec.Resources.Requests) v1.SetDefaults_ResourceList(&a.Status.Capacity) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/install/install.go deleted file mode 100644 index ffb905cd131..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/install/install.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2018 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 install adds the experimental API group, making it available as -// an option to all of the API encoding/decoding machinery. -package install - -import ( - "k8s.io/apimachinery/pkg/runtime" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/kubernetes/pkg/api/legacyscheme" - "k8s.io/kubernetes/pkg/apis/auditregistration" - "k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1" -) - -func init() { - Install(legacyscheme.Scheme) -} - -// Install registers the API group and adds types to a scheme -func Install(scheme *runtime.Scheme) { - utilruntime.Must(auditregistration.AddToScheme(scheme)) - utilruntime.Must(v1alpha1.AddToScheme(scheme)) - utilruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion)) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/types.go b/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/types.go deleted file mode 100644 index 97f6bb2ef36..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/types.go +++ /dev/null @@ -1,197 +0,0 @@ -/* -Copyright 2018 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. -*/ - -// +k8s:openapi-gen=true - -package auditregistration - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// Level defines the amount of information logged during auditing -type Level string - -// Valid audit levels -const ( - // LevelNone disables auditing - LevelNone Level = "None" - // LevelMetadata provides the basic level of auditing. - LevelMetadata Level = "Metadata" - // LevelRequest provides Metadata level of auditing, and additionally - // logs the request object (does not apply for non-resource requests). - LevelRequest Level = "Request" - // LevelRequestResponse provides Request level of auditing, and additionally - // logs the response object (does not apply for non-resource requests and watches). - LevelRequestResponse Level = "RequestResponse" -) - -// Stage defines the stages in request handling during which audit events may be generated. -type Stage string - -// Valid audit stages. -const ( - // The stage for events generated after the audit handler receives the request, but before it - // is delegated down the handler chain. - StageRequestReceived = "RequestReceived" - // The stage for events generated after the response headers are sent, but before the response body - // is sent. This stage is only generated for long-running requests (e.g. watch). - StageResponseStarted = "ResponseStarted" - // The stage for events generated after the response body has been completed, and no more bytes - // will be sent. - StageResponseComplete = "ResponseComplete" - // The stage for events generated when a panic occurred. - StagePanic = "Panic" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AuditSink represents a cluster level sink for audit data -type AuditSink struct { - metav1.TypeMeta - - // +optional - metav1.ObjectMeta - - // Spec defines the audit sink spec - Spec AuditSinkSpec -} - -// AuditSinkSpec is the spec for the audit sink object -type AuditSinkSpec struct { - // Policy defines the policy for selecting which events should be sent to the backend - // required - Policy Policy - - // Webhook to send events - // required - Webhook Webhook -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AuditSinkList is a list of a audit sink items. -type AuditSinkList struct { - metav1.TypeMeta - - // +optional - metav1.ListMeta - - // List of audit configurations. - Items []AuditSink -} - -// Policy defines the configuration of how audit events are logged -type Policy struct { - // The Level that all requests are recorded at. - // available options: None, Metadata, Request, RequestResponse - // required - Level Level - - // Stages is a list of stages for which events are created. - // +optional - Stages []Stage -} - -// Webhook holds the configuration of the webhooks -type Webhook struct { - // Throttle holds the options for throttling the webhook - // +optional - Throttle *WebhookThrottleConfig - - // ClientConfig holds the connection parameters for the webhook - // required - ClientConfig WebhookClientConfig -} - -// WebhookThrottleConfig holds the configuration for throttling -type WebhookThrottleConfig struct { - // QPS maximum number of batches per second - // default 10 QPS - // +optional - QPS *int64 - - // Burst is the maximum number of events sent at the same moment - // default 15 QPS - // +optional - Burst *int64 -} - -// WebhookClientConfig contains the information to make a connection with the webhook -type WebhookClientConfig struct { - // `url` gives the location of the webhook, in standard URL form - // (`scheme://host:port/path`). Exactly one of `url` or `service` - // must be specified. - // - // The `host` should not refer to a service running in the cluster; use - // the `service` field instead. The host might be resolved via external - // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve - // in-cluster DNS as that would be a layering violation). `host` may - // also be an IP address. - // - // Please note that using `localhost` or `127.0.0.1` as a `host` is - // risky unless you take great care to run this webhook on all hosts - // which run an apiserver which might need to make calls to this - // webhook. Such installs are likely to be non-portable, i.e., not easy - // to turn up in a new cluster. - // - // The scheme must be "https"; the URL must begin with "https://". - // - // A path is optional, and if present may be any string permissible in - // a URL. You may use the path to pass an arbitrary string to the - // webhook, for example, a cluster identifier. - // - // Attempting to use a user or basic auth e.g. "user:password@" is not - // allowed. Fragments ("#...") and query parameters ("?...") are not - // allowed, either. - // - // +optional - URL *string - - // `service` is a reference to the service for this webhook. Either - // `service` or `url` must be specified. - // - // If the webhook is running within the cluster, then you should use `service`. - // - // +optional - Service *ServiceReference - - // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. - // If unspecified, system trust roots on the apiserver are used. - // +optional - CABundle []byte -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -type ServiceReference struct { - // `namespace` is the namespace of the service. - // Required - Namespace string - - // `name` is the name of the service. - // Required - Name string - - // `path` is an optional URL path which will be sent in any request to - // this service. - // +optional - Path *string - - // If specified, the port on the service that hosting webhook. - // `port` should be a valid port number (1-65535, inclusive). - // +optional - Port int32 -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/BUILD deleted file mode 100644 index aef7545b0d9..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/BUILD +++ /dev/null @@ -1,51 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "defaults.go", - "doc.go", - "register.go", - "zz_generated.conversion.go", - "zz_generated.defaults.go", - ], - importpath = "k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//pkg/apis/auditregistration:go_default_library", - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/utils/pointer:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["defaults_test.go"], - embed = [":go_default_library"], - deps = [ - "//pkg/api/legacyscheme:go_default_library", - "//pkg/apis/auditregistration/install:go_default_library", - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/utils/pointer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/defaults.go deleted file mode 100644 index dc23c0742cd..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/defaults.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2018 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 v1alpha1 - -import ( - auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1" - "k8s.io/apimachinery/pkg/runtime" - utilpointer "k8s.io/utils/pointer" -) - -const ( - // DefaultQPS is the default QPS value - DefaultQPS = int64(10) - // DefaultBurst is the default burst value - DefaultBurst = int64(15) -) - -// DefaultThrottle is a default throttle config -func DefaultThrottle() *auditregistrationv1alpha1.WebhookThrottleConfig { - return &auditregistrationv1alpha1.WebhookThrottleConfig{ - QPS: utilpointer.Int64Ptr(DefaultQPS), - Burst: utilpointer.Int64Ptr(DefaultBurst), - } -} - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - -// SetDefaults_AuditSink sets defaults if the audit sink isn't present -func SetDefaults_AuditSink(obj *auditregistrationv1alpha1.AuditSink) { - if obj.Spec.Webhook.Throttle != nil { - if obj.Spec.Webhook.Throttle.QPS == nil { - obj.Spec.Webhook.Throttle.QPS = utilpointer.Int64Ptr(DefaultQPS) - } - if obj.Spec.Webhook.Throttle.Burst == nil { - obj.Spec.Webhook.Throttle.Burst = utilpointer.Int64Ptr(DefaultBurst) - } - } else { - obj.Spec.Webhook.Throttle = DefaultThrottle() - } -} - -// SetDefaults_ServiceReference sets defaults for AuditSync Webhook's ServiceReference -func SetDefaults_ServiceReference(obj *auditregistrationv1alpha1.ServiceReference) { - if obj.Port == nil { - obj.Port = utilpointer.Int32Ptr(443) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index 0e0d2f55458..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,359 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - unsafe "unsafe" - - v1alpha1 "k8s.io/api/auditregistration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - auditregistration "k8s.io/kubernetes/pkg/apis/auditregistration" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*v1alpha1.AuditSink)(nil), (*auditregistration.AuditSink)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_AuditSink_To_auditregistration_AuditSink(a.(*v1alpha1.AuditSink), b.(*auditregistration.AuditSink), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*auditregistration.AuditSink)(nil), (*v1alpha1.AuditSink)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_auditregistration_AuditSink_To_v1alpha1_AuditSink(a.(*auditregistration.AuditSink), b.(*v1alpha1.AuditSink), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.AuditSinkList)(nil), (*auditregistration.AuditSinkList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_AuditSinkList_To_auditregistration_AuditSinkList(a.(*v1alpha1.AuditSinkList), b.(*auditregistration.AuditSinkList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*auditregistration.AuditSinkList)(nil), (*v1alpha1.AuditSinkList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_auditregistration_AuditSinkList_To_v1alpha1_AuditSinkList(a.(*auditregistration.AuditSinkList), b.(*v1alpha1.AuditSinkList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.AuditSinkSpec)(nil), (*auditregistration.AuditSinkSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_AuditSinkSpec_To_auditregistration_AuditSinkSpec(a.(*v1alpha1.AuditSinkSpec), b.(*auditregistration.AuditSinkSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*auditregistration.AuditSinkSpec)(nil), (*v1alpha1.AuditSinkSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_auditregistration_AuditSinkSpec_To_v1alpha1_AuditSinkSpec(a.(*auditregistration.AuditSinkSpec), b.(*v1alpha1.AuditSinkSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.Policy)(nil), (*auditregistration.Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_Policy_To_auditregistration_Policy(a.(*v1alpha1.Policy), b.(*auditregistration.Policy), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*auditregistration.Policy)(nil), (*v1alpha1.Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_auditregistration_Policy_To_v1alpha1_Policy(a.(*auditregistration.Policy), b.(*v1alpha1.Policy), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.ServiceReference)(nil), (*auditregistration.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_ServiceReference_To_auditregistration_ServiceReference(a.(*v1alpha1.ServiceReference), b.(*auditregistration.ServiceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*auditregistration.ServiceReference)(nil), (*v1alpha1.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_auditregistration_ServiceReference_To_v1alpha1_ServiceReference(a.(*auditregistration.ServiceReference), b.(*v1alpha1.ServiceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.Webhook)(nil), (*auditregistration.Webhook)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_Webhook_To_auditregistration_Webhook(a.(*v1alpha1.Webhook), b.(*auditregistration.Webhook), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*auditregistration.Webhook)(nil), (*v1alpha1.Webhook)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_auditregistration_Webhook_To_v1alpha1_Webhook(a.(*auditregistration.Webhook), b.(*v1alpha1.Webhook), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.WebhookClientConfig)(nil), (*auditregistration.WebhookClientConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_WebhookClientConfig_To_auditregistration_WebhookClientConfig(a.(*v1alpha1.WebhookClientConfig), b.(*auditregistration.WebhookClientConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*auditregistration.WebhookClientConfig)(nil), (*v1alpha1.WebhookClientConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_auditregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig(a.(*auditregistration.WebhookClientConfig), b.(*v1alpha1.WebhookClientConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.WebhookThrottleConfig)(nil), (*auditregistration.WebhookThrottleConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_WebhookThrottleConfig_To_auditregistration_WebhookThrottleConfig(a.(*v1alpha1.WebhookThrottleConfig), b.(*auditregistration.WebhookThrottleConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*auditregistration.WebhookThrottleConfig)(nil), (*v1alpha1.WebhookThrottleConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_auditregistration_WebhookThrottleConfig_To_v1alpha1_WebhookThrottleConfig(a.(*auditregistration.WebhookThrottleConfig), b.(*v1alpha1.WebhookThrottleConfig), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_AuditSink_To_auditregistration_AuditSink(in *v1alpha1.AuditSink, out *auditregistration.AuditSink, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_AuditSinkSpec_To_auditregistration_AuditSinkSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_AuditSink_To_auditregistration_AuditSink is an autogenerated conversion function. -func Convert_v1alpha1_AuditSink_To_auditregistration_AuditSink(in *v1alpha1.AuditSink, out *auditregistration.AuditSink, s conversion.Scope) error { - return autoConvert_v1alpha1_AuditSink_To_auditregistration_AuditSink(in, out, s) -} - -func autoConvert_auditregistration_AuditSink_To_v1alpha1_AuditSink(in *auditregistration.AuditSink, out *v1alpha1.AuditSink, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_auditregistration_AuditSinkSpec_To_v1alpha1_AuditSinkSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_auditregistration_AuditSink_To_v1alpha1_AuditSink is an autogenerated conversion function. -func Convert_auditregistration_AuditSink_To_v1alpha1_AuditSink(in *auditregistration.AuditSink, out *v1alpha1.AuditSink, s conversion.Scope) error { - return autoConvert_auditregistration_AuditSink_To_v1alpha1_AuditSink(in, out, s) -} - -func autoConvert_v1alpha1_AuditSinkList_To_auditregistration_AuditSinkList(in *v1alpha1.AuditSinkList, out *auditregistration.AuditSinkList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]auditregistration.AuditSink, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_AuditSink_To_auditregistration_AuditSink(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha1_AuditSinkList_To_auditregistration_AuditSinkList is an autogenerated conversion function. -func Convert_v1alpha1_AuditSinkList_To_auditregistration_AuditSinkList(in *v1alpha1.AuditSinkList, out *auditregistration.AuditSinkList, s conversion.Scope) error { - return autoConvert_v1alpha1_AuditSinkList_To_auditregistration_AuditSinkList(in, out, s) -} - -func autoConvert_auditregistration_AuditSinkList_To_v1alpha1_AuditSinkList(in *auditregistration.AuditSinkList, out *v1alpha1.AuditSinkList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1alpha1.AuditSink, len(*in)) - for i := range *in { - if err := Convert_auditregistration_AuditSink_To_v1alpha1_AuditSink(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_auditregistration_AuditSinkList_To_v1alpha1_AuditSinkList is an autogenerated conversion function. -func Convert_auditregistration_AuditSinkList_To_v1alpha1_AuditSinkList(in *auditregistration.AuditSinkList, out *v1alpha1.AuditSinkList, s conversion.Scope) error { - return autoConvert_auditregistration_AuditSinkList_To_v1alpha1_AuditSinkList(in, out, s) -} - -func autoConvert_v1alpha1_AuditSinkSpec_To_auditregistration_AuditSinkSpec(in *v1alpha1.AuditSinkSpec, out *auditregistration.AuditSinkSpec, s conversion.Scope) error { - if err := Convert_v1alpha1_Policy_To_auditregistration_Policy(&in.Policy, &out.Policy, s); err != nil { - return err - } - if err := Convert_v1alpha1_Webhook_To_auditregistration_Webhook(&in.Webhook, &out.Webhook, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_AuditSinkSpec_To_auditregistration_AuditSinkSpec is an autogenerated conversion function. -func Convert_v1alpha1_AuditSinkSpec_To_auditregistration_AuditSinkSpec(in *v1alpha1.AuditSinkSpec, out *auditregistration.AuditSinkSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_AuditSinkSpec_To_auditregistration_AuditSinkSpec(in, out, s) -} - -func autoConvert_auditregistration_AuditSinkSpec_To_v1alpha1_AuditSinkSpec(in *auditregistration.AuditSinkSpec, out *v1alpha1.AuditSinkSpec, s conversion.Scope) error { - if err := Convert_auditregistration_Policy_To_v1alpha1_Policy(&in.Policy, &out.Policy, s); err != nil { - return err - } - if err := Convert_auditregistration_Webhook_To_v1alpha1_Webhook(&in.Webhook, &out.Webhook, s); err != nil { - return err - } - return nil -} - -// Convert_auditregistration_AuditSinkSpec_To_v1alpha1_AuditSinkSpec is an autogenerated conversion function. -func Convert_auditregistration_AuditSinkSpec_To_v1alpha1_AuditSinkSpec(in *auditregistration.AuditSinkSpec, out *v1alpha1.AuditSinkSpec, s conversion.Scope) error { - return autoConvert_auditregistration_AuditSinkSpec_To_v1alpha1_AuditSinkSpec(in, out, s) -} - -func autoConvert_v1alpha1_Policy_To_auditregistration_Policy(in *v1alpha1.Policy, out *auditregistration.Policy, s conversion.Scope) error { - out.Level = auditregistration.Level(in.Level) - out.Stages = *(*[]auditregistration.Stage)(unsafe.Pointer(&in.Stages)) - return nil -} - -// Convert_v1alpha1_Policy_To_auditregistration_Policy is an autogenerated conversion function. -func Convert_v1alpha1_Policy_To_auditregistration_Policy(in *v1alpha1.Policy, out *auditregistration.Policy, s conversion.Scope) error { - return autoConvert_v1alpha1_Policy_To_auditregistration_Policy(in, out, s) -} - -func autoConvert_auditregistration_Policy_To_v1alpha1_Policy(in *auditregistration.Policy, out *v1alpha1.Policy, s conversion.Scope) error { - out.Level = v1alpha1.Level(in.Level) - out.Stages = *(*[]v1alpha1.Stage)(unsafe.Pointer(&in.Stages)) - return nil -} - -// Convert_auditregistration_Policy_To_v1alpha1_Policy is an autogenerated conversion function. -func Convert_auditregistration_Policy_To_v1alpha1_Policy(in *auditregistration.Policy, out *v1alpha1.Policy, s conversion.Scope) error { - return autoConvert_auditregistration_Policy_To_v1alpha1_Policy(in, out, s) -} - -func autoConvert_v1alpha1_ServiceReference_To_auditregistration_ServiceReference(in *v1alpha1.ServiceReference, out *auditregistration.ServiceReference, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - out.Path = (*string)(unsafe.Pointer(in.Path)) - if err := v1.Convert_Pointer_int32_To_int32(&in.Port, &out.Port, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_ServiceReference_To_auditregistration_ServiceReference is an autogenerated conversion function. -func Convert_v1alpha1_ServiceReference_To_auditregistration_ServiceReference(in *v1alpha1.ServiceReference, out *auditregistration.ServiceReference, s conversion.Scope) error { - return autoConvert_v1alpha1_ServiceReference_To_auditregistration_ServiceReference(in, out, s) -} - -func autoConvert_auditregistration_ServiceReference_To_v1alpha1_ServiceReference(in *auditregistration.ServiceReference, out *v1alpha1.ServiceReference, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - out.Path = (*string)(unsafe.Pointer(in.Path)) - if err := v1.Convert_int32_To_Pointer_int32(&in.Port, &out.Port, s); err != nil { - return err - } - return nil -} - -// Convert_auditregistration_ServiceReference_To_v1alpha1_ServiceReference is an autogenerated conversion function. -func Convert_auditregistration_ServiceReference_To_v1alpha1_ServiceReference(in *auditregistration.ServiceReference, out *v1alpha1.ServiceReference, s conversion.Scope) error { - return autoConvert_auditregistration_ServiceReference_To_v1alpha1_ServiceReference(in, out, s) -} - -func autoConvert_v1alpha1_Webhook_To_auditregistration_Webhook(in *v1alpha1.Webhook, out *auditregistration.Webhook, s conversion.Scope) error { - out.Throttle = (*auditregistration.WebhookThrottleConfig)(unsafe.Pointer(in.Throttle)) - if err := Convert_v1alpha1_WebhookClientConfig_To_auditregistration_WebhookClientConfig(&in.ClientConfig, &out.ClientConfig, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_Webhook_To_auditregistration_Webhook is an autogenerated conversion function. -func Convert_v1alpha1_Webhook_To_auditregistration_Webhook(in *v1alpha1.Webhook, out *auditregistration.Webhook, s conversion.Scope) error { - return autoConvert_v1alpha1_Webhook_To_auditregistration_Webhook(in, out, s) -} - -func autoConvert_auditregistration_Webhook_To_v1alpha1_Webhook(in *auditregistration.Webhook, out *v1alpha1.Webhook, s conversion.Scope) error { - out.Throttle = (*v1alpha1.WebhookThrottleConfig)(unsafe.Pointer(in.Throttle)) - if err := Convert_auditregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig(&in.ClientConfig, &out.ClientConfig, s); err != nil { - return err - } - return nil -} - -// Convert_auditregistration_Webhook_To_v1alpha1_Webhook is an autogenerated conversion function. -func Convert_auditregistration_Webhook_To_v1alpha1_Webhook(in *auditregistration.Webhook, out *v1alpha1.Webhook, s conversion.Scope) error { - return autoConvert_auditregistration_Webhook_To_v1alpha1_Webhook(in, out, s) -} - -func autoConvert_v1alpha1_WebhookClientConfig_To_auditregistration_WebhookClientConfig(in *v1alpha1.WebhookClientConfig, out *auditregistration.WebhookClientConfig, s conversion.Scope) error { - out.URL = (*string)(unsafe.Pointer(in.URL)) - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(auditregistration.ServiceReference) - if err := Convert_v1alpha1_ServiceReference_To_auditregistration_ServiceReference(*in, *out, s); err != nil { - return err - } - } else { - out.Service = nil - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_v1alpha1_WebhookClientConfig_To_auditregistration_WebhookClientConfig is an autogenerated conversion function. -func Convert_v1alpha1_WebhookClientConfig_To_auditregistration_WebhookClientConfig(in *v1alpha1.WebhookClientConfig, out *auditregistration.WebhookClientConfig, s conversion.Scope) error { - return autoConvert_v1alpha1_WebhookClientConfig_To_auditregistration_WebhookClientConfig(in, out, s) -} - -func autoConvert_auditregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig(in *auditregistration.WebhookClientConfig, out *v1alpha1.WebhookClientConfig, s conversion.Scope) error { - out.URL = (*string)(unsafe.Pointer(in.URL)) - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(v1alpha1.ServiceReference) - if err := Convert_auditregistration_ServiceReference_To_v1alpha1_ServiceReference(*in, *out, s); err != nil { - return err - } - } else { - out.Service = nil - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_auditregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig is an autogenerated conversion function. -func Convert_auditregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig(in *auditregistration.WebhookClientConfig, out *v1alpha1.WebhookClientConfig, s conversion.Scope) error { - return autoConvert_auditregistration_WebhookClientConfig_To_v1alpha1_WebhookClientConfig(in, out, s) -} - -func autoConvert_v1alpha1_WebhookThrottleConfig_To_auditregistration_WebhookThrottleConfig(in *v1alpha1.WebhookThrottleConfig, out *auditregistration.WebhookThrottleConfig, s conversion.Scope) error { - out.QPS = (*int64)(unsafe.Pointer(in.QPS)) - out.Burst = (*int64)(unsafe.Pointer(in.Burst)) - return nil -} - -// Convert_v1alpha1_WebhookThrottleConfig_To_auditregistration_WebhookThrottleConfig is an autogenerated conversion function. -func Convert_v1alpha1_WebhookThrottleConfig_To_auditregistration_WebhookThrottleConfig(in *v1alpha1.WebhookThrottleConfig, out *auditregistration.WebhookThrottleConfig, s conversion.Scope) error { - return autoConvert_v1alpha1_WebhookThrottleConfig_To_auditregistration_WebhookThrottleConfig(in, out, s) -} - -func autoConvert_auditregistration_WebhookThrottleConfig_To_v1alpha1_WebhookThrottleConfig(in *auditregistration.WebhookThrottleConfig, out *v1alpha1.WebhookThrottleConfig, s conversion.Scope) error { - out.QPS = (*int64)(unsafe.Pointer(in.QPS)) - out.Burst = (*int64)(unsafe.Pointer(in.Burst)) - return nil -} - -// Convert_auditregistration_WebhookThrottleConfig_To_v1alpha1_WebhookThrottleConfig is an autogenerated conversion function. -func Convert_auditregistration_WebhookThrottleConfig_To_v1alpha1_WebhookThrottleConfig(in *auditregistration.WebhookThrottleConfig, out *v1alpha1.WebhookThrottleConfig, s conversion.Scope) error { - return autoConvert_auditregistration_WebhookThrottleConfig_To_v1alpha1_WebhookThrottleConfig(in, out, s) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/zz_generated.defaults.go deleted file mode 100644 index 7633a012e78..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/zz_generated.defaults.go +++ /dev/null @@ -1,49 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by defaulter-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "k8s.io/api/auditregistration/v1alpha1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&v1alpha1.AuditSink{}, func(obj interface{}) { SetObjectDefaults_AuditSink(obj.(*v1alpha1.AuditSink)) }) - scheme.AddTypeDefaultingFunc(&v1alpha1.AuditSinkList{}, func(obj interface{}) { SetObjectDefaults_AuditSinkList(obj.(*v1alpha1.AuditSinkList)) }) - return nil -} - -func SetObjectDefaults_AuditSink(in *v1alpha1.AuditSink) { - SetDefaults_AuditSink(in) - if in.Spec.Webhook.ClientConfig.Service != nil { - SetDefaults_ServiceReference(in.Spec.Webhook.ClientConfig.Service) - } -} - -func SetObjectDefaults_AuditSinkList(in *v1alpha1.AuditSinkList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_AuditSink(a) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/validation/validation.go deleted file mode 100644 index 5934883c957..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/validation/validation.go +++ /dev/null @@ -1,123 +0,0 @@ -/* -Copyright 2018 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 validation - -import ( - "strings" - - genericvalidation "k8s.io/apimachinery/pkg/api/validation" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/apiserver/pkg/util/webhook" - "k8s.io/kubernetes/pkg/apis/auditregistration" -) - -// ValidateAuditSink validates the AuditSinks -func ValidateAuditSink(as *auditregistration.AuditSink) field.ErrorList { - allErrs := genericvalidation.ValidateObjectMeta(&as.ObjectMeta, false, genericvalidation.NameIsDNSSubdomain, field.NewPath("metadata")) - allErrs = append(allErrs, ValidateAuditSinkSpec(as.Spec, field.NewPath("spec"))...) - return allErrs -} - -// ValidateAuditSinkSpec validates the sink spec for audit -func ValidateAuditSinkSpec(s auditregistration.AuditSinkSpec, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - allErrs = append(allErrs, ValidatePolicy(s.Policy, fldPath.Child("policy"))...) - allErrs = append(allErrs, ValidateWebhook(s.Webhook, fldPath.Child("webhook"))...) - return allErrs -} - -// ValidateWebhook validates the webhook -func ValidateWebhook(w auditregistration.Webhook, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - if w.Throttle != nil { - allErrs = append(allErrs, ValidateWebhookThrottleConfig(w.Throttle, fldPath.Child("throttle"))...) - } - - cc := w.ClientConfig - switch { - case (cc.URL == nil) == (cc.Service == nil): - allErrs = append(allErrs, field.Required(fldPath.Child("clientConfig"), "exactly one of url or service is required")) - case cc.URL != nil: - allErrs = append(allErrs, webhook.ValidateWebhookURL(fldPath.Child("clientConfig").Child("url"), *cc.URL, false)...) - case cc.Service != nil: - allErrs = append(allErrs, webhook.ValidateWebhookService(fldPath.Child("clientConfig").Child("service"), cc.Service.Name, cc.Service.Namespace, cc.Service.Path, cc.Service.Port)...) - } - return allErrs -} - -// ValidateWebhookThrottleConfig validates the throttle config -func ValidateWebhookThrottleConfig(c *auditregistration.WebhookThrottleConfig, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - if c.QPS != nil && *c.QPS <= 0 { - allErrs = append(allErrs, field.Invalid(fldPath.Child("qps"), c.QPS, "qps must be a positive number")) - } - if c.Burst != nil && *c.Burst <= 0 { - allErrs = append(allErrs, field.Invalid(fldPath.Child("burst"), c.Burst, "burst must be a positive number")) - } - return allErrs -} - -// ValidatePolicy validates the audit policy -func ValidatePolicy(policy auditregistration.Policy, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - allErrs = append(allErrs, validateStages(policy.Stages, fldPath.Child("stages"))...) - allErrs = append(allErrs, validateLevel(policy.Level, fldPath.Child("level"))...) - if policy.Level != auditregistration.LevelNone && len(policy.Stages) == 0 { - return field.ErrorList{field.Required(fldPath.Child("stages"), "")} - } - return allErrs -} - -var validLevels = sets.NewString( - string(auditregistration.LevelNone), - string(auditregistration.LevelMetadata), - string(auditregistration.LevelRequest), - string(auditregistration.LevelRequestResponse), -) - -var validStages = sets.NewString( - string(auditregistration.StageRequestReceived), - string(auditregistration.StageResponseStarted), - string(auditregistration.StageResponseComplete), - string(auditregistration.StagePanic), -) - -func validateLevel(level auditregistration.Level, fldPath *field.Path) field.ErrorList { - if string(level) == "" { - return field.ErrorList{field.Required(fldPath, "")} - } - if !validLevels.Has(string(level)) { - return field.ErrorList{field.NotSupported(fldPath, level, validLevels.List())} - } - return nil -} - -func validateStages(stages []auditregistration.Stage, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - for i, stage := range stages { - if !validStages.Has(string(stage)) { - allErrs = append(allErrs, field.Invalid(fldPath.Index(i), string(stage), "allowed stages are "+strings.Join(validStages.List(), ","))) - } - } - return allErrs -} - -// ValidateAuditSinkUpdate validates an update to the object -func ValidateAuditSinkUpdate(newC, oldC *auditregistration.AuditSink) field.ErrorList { - return ValidateAuditSink(newC) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/zz_generated.deepcopy.go deleted file mode 100644 index 28423787b7e..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/zz_generated.deepcopy.go +++ /dev/null @@ -1,224 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package auditregistration - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuditSink) DeepCopyInto(out *AuditSink) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditSink. -func (in *AuditSink) DeepCopy() *AuditSink { - if in == nil { - return nil - } - out := new(AuditSink) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AuditSink) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuditSinkList) DeepCopyInto(out *AuditSinkList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AuditSink, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditSinkList. -func (in *AuditSinkList) DeepCopy() *AuditSinkList { - if in == nil { - return nil - } - out := new(AuditSinkList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AuditSinkList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuditSinkSpec) DeepCopyInto(out *AuditSinkSpec) { - *out = *in - in.Policy.DeepCopyInto(&out.Policy) - in.Webhook.DeepCopyInto(&out.Webhook) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditSinkSpec. -func (in *AuditSinkSpec) DeepCopy() *AuditSinkSpec { - if in == nil { - return nil - } - out := new(AuditSinkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Policy) DeepCopyInto(out *Policy) { - *out = *in - if in.Stages != nil { - in, out := &in.Stages, &out.Stages - *out = make([]Stage, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy. -func (in *Policy) DeepCopy() *Policy { - if in == nil { - return nil - } - out := new(Policy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { - *out = *in - if in.Path != nil { - in, out := &in.Path, &out.Path - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. -func (in *ServiceReference) DeepCopy() *ServiceReference { - if in == nil { - return nil - } - out := new(ServiceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Webhook) DeepCopyInto(out *Webhook) { - *out = *in - if in.Throttle != nil { - in, out := &in.Throttle, &out.Throttle - *out = new(WebhookThrottleConfig) - (*in).DeepCopyInto(*out) - } - in.ClientConfig.DeepCopyInto(&out.ClientConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webhook. -func (in *Webhook) DeepCopy() *Webhook { - if in == nil { - return nil - } - out := new(Webhook) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { - *out = *in - if in.URL != nil { - in, out := &in.URL, &out.URL - *out = new(string) - **out = **in - } - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - (*in).DeepCopyInto(*out) - } - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. -func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { - if in == nil { - return nil - } - out := new(WebhookClientConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebhookThrottleConfig) DeepCopyInto(out *WebhookThrottleConfig) { - *out = *in - if in.QPS != nil { - in, out := &in.QPS, &out.QPS - *out = new(int64) - **out = **in - } - if in.Burst != nil { - in, out := &in.Burst, &out.Burst - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookThrottleConfig. -func (in *WebhookThrottleConfig) DeepCopy() *WebhookThrottleConfig { - if in == nil { - return nil - } - out := new(WebhookThrottleConfig) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/OWNERS index 3b2fc47dbac..08814e0eb3e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/OWNERS @@ -16,5 +16,4 @@ reviewers: - madhusudancs - mml - mbohlool -- david-mcmahon - jianhuiz diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/batch/OWNERS index badef1377a0..ea5e31b74d0 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/OWNERS @@ -16,7 +16,6 @@ reviewers: - errordeveloper - mml - mbohlool -- david-mcmahon - jianhuiz labels: - sig/apps diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.defaults.go index b15d39cdb02..44ee51207d4 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.defaults.go @@ -88,6 +88,13 @@ func SetObjectDefaults_Job(in *v1.Job) { if a.VolumeSource.ScaleIO != nil { corev1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + corev1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + corev1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + corev1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1beta1/zz_generated.defaults.go index 8a0c09b9a07..daacf1123c1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1beta1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1beta1/zz_generated.defaults.go @@ -89,6 +89,13 @@ func SetObjectDefaults_CronJob(in *v1beta1.CronJob) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.JobTemplate.Spec.Template.Spec.InitContainers { a := &in.Spec.JobTemplate.Spec.Template.Spec.InitContainers[i] @@ -295,6 +302,13 @@ func SetObjectDefaults_JobTemplate(in *v1beta1.JobTemplate) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Template.Spec.Template.Spec.InitContainers { a := &in.Template.Spec.Template.Spec.InitContainers[i] diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.defaults.go index e69b3db1436..9de0a141ee0 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.defaults.go @@ -89,6 +89,13 @@ func SetObjectDefaults_CronJob(in *v2alpha1.CronJob) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.JobTemplate.Spec.Template.Spec.InitContainers { a := &in.Spec.JobTemplate.Spec.Template.Spec.InitContainers[i] @@ -295,6 +302,13 @@ func SetObjectDefaults_JobTemplate(in *v2alpha1.JobTemplate) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Template.Spec.Template.Spec.InitContainers { a := &in.Template.Spec.Template.Spec.InitContainers[i] diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/validation/validation.go index cb1c0e26052..dc646129ed2 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/validation/validation.go @@ -173,16 +173,16 @@ func ValidateJobStatusUpdate(status, oldStatus batch.JobStatus) field.ErrorList } // ValidateCronJob validates a CronJob and returns an ErrorList with any errors. -func ValidateCronJob(scheduledJob *batch.CronJob) field.ErrorList { +func ValidateCronJob(cronJob *batch.CronJob) field.ErrorList { // CronJobs and rcs have the same name validation - allErrs := apivalidation.ValidateObjectMeta(&scheduledJob.ObjectMeta, true, apivalidation.ValidateReplicationControllerName, field.NewPath("metadata")) - allErrs = append(allErrs, ValidateCronJobSpec(&scheduledJob.Spec, field.NewPath("spec"))...) - if len(scheduledJob.ObjectMeta.Name) > apimachineryvalidation.DNS1035LabelMaxLength-11 { + allErrs := apivalidation.ValidateObjectMeta(&cronJob.ObjectMeta, true, apivalidation.ValidateReplicationControllerName, field.NewPath("metadata")) + allErrs = append(allErrs, ValidateCronJobSpec(&cronJob.Spec, field.NewPath("spec"))...) + if len(cronJob.ObjectMeta.Name) > apimachineryvalidation.DNS1035LabelMaxLength-11 { // The cronjob controller appends a 11-character suffix to the cronjob (`-$TIMESTAMP`) when // creating a job. The job name length limit is 63 characters. // Therefore cronjob names must have length <= 63-11=52. If we don't validate this here, // then job creation will fail later. - allErrs = append(allErrs, field.Invalid(field.NewPath("metadata").Child("name"), scheduledJob.ObjectMeta.Name, "must be no more than 52 characters")) + allErrs = append(allErrs, field.Invalid(field.NewPath("metadata").Child("name"), cronJob.ObjectMeta.Name, "must be no more than 52 characters")) } return allErrs } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/certificates/BUILD index a826a7e2266..095b0363790 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/BUILD @@ -16,9 +16,11 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/apis/certificates", deps = [ + "//pkg/apis/core:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", ], ) @@ -35,6 +37,7 @@ filegroup( ":package-srcs", "//pkg/apis/certificates/fuzzer:all-srcs", "//pkg/apis/certificates/install:all-srcs", + "//pkg/apis/certificates/v1:all-srcs", "//pkg/apis/certificates/v1beta1:all-srcs", "//pkg/apis/certificates/validation:all-srcs", ], diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/helpers.go index 2608e407626..ef88bf8a527 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/helpers.go @@ -20,12 +20,15 @@ import ( "crypto/x509" "encoding/pem" "errors" + "fmt" + "reflect" + "strings" + + "k8s.io/apimachinery/pkg/util/sets" ) -// ParseCSR extracts the CSR from the API object and decodes it. -func ParseCSR(obj *CertificateSigningRequest) (*x509.CertificateRequest, error) { - // extract PEM from request object - pemBytes := obj.Spec.Request +// ParseCSR extracts the CSR from the bytes and decodes it. +func ParseCSR(pemBytes []byte) (*x509.CertificateRequest, error) { block, _ := pem.Decode(pemBytes) if block == nil || block.Type != "CERTIFICATE REQUEST" { return nil, errors.New("PEM block type must be CERTIFICATE REQUEST") @@ -36,3 +39,88 @@ func ParseCSR(obj *CertificateSigningRequest) (*x509.CertificateRequest, error) } return csr, nil } + +var ( + organizationNotSystemNodesErr = fmt.Errorf("subject organization is not system:nodes") + commonNameNotSystemNode = fmt.Errorf("subject common name does not begin with system:node:") + dnsOrIPSANRequiredErr = fmt.Errorf("DNS or IP subjectAltName is required") + dnsSANNotAllowedErr = fmt.Errorf("DNS subjectAltNames are not allowed") + emailSANNotAllowedErr = fmt.Errorf("Email subjectAltNames are not allowed") + ipSANNotAllowedErr = fmt.Errorf("IP subjectAltNames are not allowed") + uriSANNotAllowedErr = fmt.Errorf("URI subjectAltNames are not allowed") +) + +var kubeletServingRequiredUsages = sets.NewString( + string(UsageDigitalSignature), + string(UsageKeyEncipherment), + string(UsageServerAuth), +) + +func IsKubeletServingCSR(req *x509.CertificateRequest, usages sets.String) bool { + return ValidateKubeletServingCSR(req, usages) == nil +} +func ValidateKubeletServingCSR(req *x509.CertificateRequest, usages sets.String) error { + if !reflect.DeepEqual([]string{"system:nodes"}, req.Subject.Organization) { + return organizationNotSystemNodesErr + } + + // at least one of dnsNames or ipAddresses must be specified + if len(req.DNSNames) == 0 && len(req.IPAddresses) == 0 { + return dnsOrIPSANRequiredErr + } + + if len(req.EmailAddresses) > 0 { + return emailSANNotAllowedErr + } + if len(req.URIs) > 0 { + return uriSANNotAllowedErr + } + + if !kubeletServingRequiredUsages.Equal(usages) { + return fmt.Errorf("usages did not match %v", kubeletServingRequiredUsages.List()) + } + + if !strings.HasPrefix(req.Subject.CommonName, "system:node:") { + return commonNameNotSystemNode + } + + return nil +} + +var kubeletClientRequiredUsages = sets.NewString( + string(UsageDigitalSignature), + string(UsageKeyEncipherment), + string(UsageClientAuth), +) + +func IsKubeletClientCSR(req *x509.CertificateRequest, usages sets.String) bool { + return ValidateKubeletClientCSR(req, usages) == nil +} +func ValidateKubeletClientCSR(req *x509.CertificateRequest, usages sets.String) error { + if !reflect.DeepEqual([]string{"system:nodes"}, req.Subject.Organization) { + return organizationNotSystemNodesErr + } + + if len(req.DNSNames) > 0 { + return dnsSANNotAllowedErr + } + if len(req.EmailAddresses) > 0 { + return emailSANNotAllowedErr + } + if len(req.IPAddresses) > 0 { + return ipSANNotAllowedErr + } + if len(req.URIs) > 0 { + return uriSANNotAllowedErr + } + + if !strings.HasPrefix(req.Subject.CommonName, "system:node:") { + return commonNameNotSystemNode + } + + if !kubeletClientRequiredUsages.Equal(usages) { + return fmt.Errorf("usages did not match %v", kubeletClientRequiredUsages.List()) + } + + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/BUILD index 360f47b9f1f..18d52721e58 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/BUILD @@ -12,6 +12,7 @@ go_library( deps = [ "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/certificates:go_default_library", + "//pkg/apis/certificates/v1:go_default_library", "//pkg/apis/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go index 8f685da6091..f4e9fcb9ce3 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go @@ -23,6 +23,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/certificates" + v1 "k8s.io/kubernetes/pkg/apis/certificates/v1" "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" ) @@ -33,6 +34,8 @@ func init() { // Install registers the API group and adds types to a scheme func Install(scheme *runtime.Scheme) { utilruntime.Must(certificates.AddToScheme(scheme)) + utilruntime.Must(v1.AddToScheme(scheme)) utilruntime.Must(v1beta1.AddToScheme(scheme)) - utilruntime.Must(scheme.SetVersionPriority(v1beta1.SchemeGroupVersion)) + // TODO(liggitt): prefer v1 in 1.20 + utilruntime.Must(scheme.SetVersionPriority(v1beta1.SchemeGroupVersion, v1.SchemeGroupVersion)) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go index b3a07f8d7cd..b616c000113 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go @@ -16,7 +16,10 @@ limitations under the License. package certificates -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + api "k8s.io/kubernetes/pkg/apis/core" +) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -72,6 +75,28 @@ type CertificateSigningRequestSpec struct { Extra map[string]ExtraValue } +// Built in signerName values that are honoured by kube-controller-manager. +// None of these usages are related to ServiceAccount token secrets +// `.data[ca.crt]` in any way. +const ( + // Signs certificates that will be honored as client-certs by the + // kube-apiserver. Never auto-approved by kube-controller-manager. + KubeAPIServerClientSignerName = "kubernetes.io/kube-apiserver-client" + + // Signs client certificates that will be honored as client-certs by the + // kube-apiserver for a kubelet. + // May be auto-approved by kube-controller-manager. + KubeAPIServerClientKubeletSignerName = "kubernetes.io/kube-apiserver-client-kubelet" + + // Signs serving certificates that are honored as a valid kubelet serving + // certificate by the kube-apiserver, but has no other guarantees. + KubeletServingSignerName = "kubernetes.io/kubelet-serving" + + // Has no guarantees for trust at all. Some distributions may honor these + // as client certs, but that behavior is not standard kubernetes behavior. + LegacyUnknownSignerName = "kubernetes.io/legacy-unknown" +) + // ExtraValue masks the value so protobuf can generate type ExtraValue []string @@ -91,11 +116,17 @@ type RequestConditionType string const ( CertificateApproved RequestConditionType = "Approved" CertificateDenied RequestConditionType = "Denied" + CertificateFailed RequestConditionType = "Failed" ) type CertificateSigningRequestCondition struct { - // request approval state, currently Approved or Denied. + // type of the condition. Known conditions include "Approved", "Denied", and "Failed". Type RequestConditionType + // Status of the condition, one of True, False, Unknown. + // Approved, Denied, and Failed conditions may not be "False" or "Unknown". + // If unset, should be treated as "True". + // +optional + Status api.ConditionStatus // brief reason for the request state // +optional Reason string @@ -105,6 +136,9 @@ type CertificateSigningRequestCondition struct { // timestamp for the last update to this condition // +optional LastUpdateTime metav1.Time + // lastTransitionTime is the time the condition last transitioned from one status to another. + // +optional + LastTransitionTime metav1.Time } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/BUILD new file mode 100644 index 00000000000..192bf1c11c2 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/BUILD @@ -0,0 +1,39 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "conversion.go", + "defaults.go", + "doc.go", + "helpers.go", + "register.go", + "zz_generated.conversion.go", + "zz_generated.defaults.go", + ], + importpath = "k8s.io/kubernetes/pkg/apis/certificates/v1", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/certificates:go_default_library", + "//pkg/apis/core:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/conversion.go new file mode 100644 index 00000000000..f6d672b8a02 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/conversion.go @@ -0,0 +1,38 @@ +/* +Copyright 2020 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 v1 + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/runtime" +) + +func addConversionFuncs(scheme *runtime.Scheme) error { + // Add field conversion funcs. + return scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("CertificateSigningRequest"), + func(label, value string) (string, string, error) { + switch label { + case "metadata.name", + "spec.signerName": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }, + ) +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/defaults.go new file mode 100644 index 00000000000..b1fc88a752a --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/defaults.go @@ -0,0 +1,25 @@ +/* +Copyright 2020 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 v1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/doc.go similarity index 59% rename from vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/doc.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/doc.go index 606c457c302..3f2a7e98c77 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2020 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. @@ -14,11 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/auditregistration -// +k8s:conversion-gen-external-types=k8s.io/api/auditregistration/v1alpha1 +// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/certificates +// +k8s:conversion-gen-external-types=k8s.io/api/certificates/v1 // +k8s:defaulter-gen=TypeMeta -// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/auditregistration/v1alpha1 +// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/certificates/v1 -// +groupName=auditregistration.k8s.io +// +groupName=certificates.k8s.io -package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1" +package v1 // import "k8s.io/kubernetes/pkg/apis/certificates/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/helpers.go new file mode 100644 index 00000000000..94fcddfc3fd --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/helpers.go @@ -0,0 +1,37 @@ +/* +Copyright 2020 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 v1 + +import ( + "crypto/x509" + "encoding/pem" + "errors" +) + +// ParseCSR decodes a PEM encoded CSR +func ParseCSR(pemBytes []byte) (*x509.CertificateRequest, error) { + // extract PEM from request object + block, _ := pem.Decode(pemBytes) + if block == nil || block.Type != "CERTIFICATE REQUEST" { + return nil, errors.New("PEM block type must be CERTIFICATE REQUEST") + } + csr, err := x509.ParseCertificateRequest(block.Bytes) + if err != nil { + return nil, err + } + return csr, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/register.go similarity index 61% rename from vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/register.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/register.go index 0e9db36a6b2..3289ab9d03f 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2020 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. @@ -14,23 +14,32 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1 import ( + certificatesv1 "k8s.io/api/certificates/v1" "k8s.io/apimachinery/pkg/runtime/schema" - kubeschedulerconfigv1alpha1 "k8s.io/kube-scheduler/config/v1alpha1" ) -// GroupName is the group name used in this package -const GroupName = "kubescheduler.config.k8s.io" +// GroupName is the group name use in this package +const GroupName = "certificates.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( - // localSchemeBuilder extends the SchemeBuilder instance with the external types. In this package, - // defaulting and conversion init funcs are registered as well. - localSchemeBuilder = &kubeschedulerconfigv1alpha1.SchemeBuilder + localSchemeBuilder = &certificatesv1.SchemeBuilder + // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = localSchemeBuilder.AddToScheme ) @@ -39,5 +48,5 @@ func init() { // We only register manually written functions here. The registration of the // generated functions takes place in the generated files. The separation // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs) + localSchemeBuilder.Register(addDefaultingFuncs, addConversionFuncs) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/zz_generated.conversion.go new file mode 100644 index 00000000000..8caa8170df9 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/zz_generated.conversion.go @@ -0,0 +1,230 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1 + +import ( + unsafe "unsafe" + + v1 "k8s.io/api/certificates/v1" + corev1 "k8s.io/api/core/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + certificates "k8s.io/kubernetes/pkg/apis/certificates" + core "k8s.io/kubernetes/pkg/apis/core" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1.CertificateSigningRequest)(nil), (*certificates.CertificateSigningRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(a.(*v1.CertificateSigningRequest), b.(*certificates.CertificateSigningRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*certificates.CertificateSigningRequest)(nil), (*v1.CertificateSigningRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_certificates_CertificateSigningRequest_To_v1_CertificateSigningRequest(a.(*certificates.CertificateSigningRequest), b.(*v1.CertificateSigningRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.CertificateSigningRequestCondition)(nil), (*certificates.CertificateSigningRequestCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(a.(*v1.CertificateSigningRequestCondition), b.(*certificates.CertificateSigningRequestCondition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*certificates.CertificateSigningRequestCondition)(nil), (*v1.CertificateSigningRequestCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_certificates_CertificateSigningRequestCondition_To_v1_CertificateSigningRequestCondition(a.(*certificates.CertificateSigningRequestCondition), b.(*v1.CertificateSigningRequestCondition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.CertificateSigningRequestList)(nil), (*certificates.CertificateSigningRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(a.(*v1.CertificateSigningRequestList), b.(*certificates.CertificateSigningRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*certificates.CertificateSigningRequestList)(nil), (*v1.CertificateSigningRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_certificates_CertificateSigningRequestList_To_v1_CertificateSigningRequestList(a.(*certificates.CertificateSigningRequestList), b.(*v1.CertificateSigningRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.CertificateSigningRequestSpec)(nil), (*certificates.CertificateSigningRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(a.(*v1.CertificateSigningRequestSpec), b.(*certificates.CertificateSigningRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*certificates.CertificateSigningRequestSpec)(nil), (*v1.CertificateSigningRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_certificates_CertificateSigningRequestSpec_To_v1_CertificateSigningRequestSpec(a.(*certificates.CertificateSigningRequestSpec), b.(*v1.CertificateSigningRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.CertificateSigningRequestStatus)(nil), (*certificates.CertificateSigningRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(a.(*v1.CertificateSigningRequestStatus), b.(*certificates.CertificateSigningRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*certificates.CertificateSigningRequestStatus)(nil), (*v1.CertificateSigningRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_certificates_CertificateSigningRequestStatus_To_v1_CertificateSigningRequestStatus(a.(*certificates.CertificateSigningRequestStatus), b.(*v1.CertificateSigningRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *v1.CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_CertificateSigningRequest_To_certificates_CertificateSigningRequest is an autogenerated conversion function. +func Convert_v1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *v1.CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { + return autoConvert_v1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequest_To_v1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *v1.CertificateSigningRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_certificates_CertificateSigningRequestSpec_To_v1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_certificates_CertificateSigningRequestStatus_To_v1_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_certificates_CertificateSigningRequest_To_v1_CertificateSigningRequest is an autogenerated conversion function. +func Convert_certificates_CertificateSigningRequest_To_v1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *v1.CertificateSigningRequest, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequest_To_v1_CertificateSigningRequest(in, out, s) +} + +func autoConvert_v1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *v1.CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { + out.Type = certificates.RequestConditionType(in.Type) + out.Status = core.ConditionStatus(in.Status) + out.Reason = in.Reason + out.Message = in.Message + out.LastUpdateTime = in.LastUpdateTime + out.LastTransitionTime = in.LastTransitionTime + return nil +} + +// Convert_v1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition is an autogenerated conversion function. +func Convert_v1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *v1.CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { + return autoConvert_v1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestCondition_To_v1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *v1.CertificateSigningRequestCondition, s conversion.Scope) error { + out.Type = v1.RequestConditionType(in.Type) + out.Status = corev1.ConditionStatus(in.Status) + out.Reason = in.Reason + out.Message = in.Message + out.LastUpdateTime = in.LastUpdateTime + out.LastTransitionTime = in.LastTransitionTime + return nil +} + +// Convert_certificates_CertificateSigningRequestCondition_To_v1_CertificateSigningRequestCondition is an autogenerated conversion function. +func Convert_certificates_CertificateSigningRequestCondition_To_v1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *v1.CertificateSigningRequestCondition, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestCondition_To_v1_CertificateSigningRequestCondition(in, out, s) +} + +func autoConvert_v1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *v1.CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]certificates.CertificateSigningRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList is an autogenerated conversion function. +func Convert_v1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *v1.CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { + return autoConvert_v1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestList_To_v1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *v1.CertificateSigningRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1.CertificateSigningRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_certificates_CertificateSigningRequestList_To_v1_CertificateSigningRequestList is an autogenerated conversion function. +func Convert_certificates_CertificateSigningRequestList_To_v1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *v1.CertificateSigningRequestList, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestList_To_v1_CertificateSigningRequestList(in, out, s) +} + +func autoConvert_v1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *v1.CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { + out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) + out.SignerName = in.SignerName + out.Usages = *(*[]certificates.KeyUsage)(unsafe.Pointer(&in.Usages)) + out.Username = in.Username + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]certificates.ExtraValue)(unsafe.Pointer(&in.Extra)) + return nil +} + +// Convert_v1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec is an autogenerated conversion function. +func Convert_v1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *v1.CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { + return autoConvert_v1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestSpec_To_v1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *v1.CertificateSigningRequestSpec, s conversion.Scope) error { + out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) + out.SignerName = in.SignerName + out.Usages = *(*[]v1.KeyUsage)(unsafe.Pointer(&in.Usages)) + out.Username = in.Username + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + out.Extra = *(*map[string]v1.ExtraValue)(unsafe.Pointer(&in.Extra)) + return nil +} + +// Convert_certificates_CertificateSigningRequestSpec_To_v1_CertificateSigningRequestSpec is an autogenerated conversion function. +func Convert_certificates_CertificateSigningRequestSpec_To_v1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *v1.CertificateSigningRequestSpec, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestSpec_To_v1_CertificateSigningRequestSpec(in, out, s) +} + +func autoConvert_v1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *v1.CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { + out.Conditions = *(*[]certificates.CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) + out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) + return nil +} + +// Convert_v1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus is an autogenerated conversion function. +func Convert_v1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *v1.CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { + return autoConvert_v1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestStatus_To_v1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *v1.CertificateSigningRequestStatus, s conversion.Scope) error { + out.Conditions = *(*[]v1.CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) + out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) + return nil +} + +// Convert_certificates_CertificateSigningRequestStatus_To_v1_CertificateSigningRequestStatus is an autogenerated conversion function. +func Convert_certificates_CertificateSigningRequestStatus_To_v1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *v1.CertificateSigningRequestStatus, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestStatus_To_v1_CertificateSigningRequestStatus(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/zz_generated.defaults.go similarity index 70% rename from vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/zz_generated.defaults.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/zz_generated.defaults.go index 60e98cb8ad0..cce2e603a69 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1/zz_generated.defaults.go @@ -18,23 +18,15 @@ limitations under the License. // Code generated by defaulter-gen. DO NOT EDIT. -package v1alpha1 +package v1 import ( runtime "k8s.io/apimachinery/pkg/runtime" - v1alpha1 "k8s.io/kube-scheduler/config/v1alpha1" ) // RegisterDefaults adds defaulters functions to the given scheme. // Public to allow building arbitrary schemes. // All generated defaulters are covering - they call all nested defaulters. func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&v1alpha1.KubeSchedulerConfiguration{}, func(obj interface{}) { - SetObjectDefaults_KubeSchedulerConfiguration(obj.(*v1alpha1.KubeSchedulerConfiguration)) - }) return nil } - -func SetObjectDefaults_KubeSchedulerConfiguration(in *v1alpha1.KubeSchedulerConfiguration) { - SetDefaults_KubeSchedulerConfiguration(in) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/BUILD index 057b22b2ade..d7349d8ea67 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/BUILD @@ -20,7 +20,9 @@ go_library( importpath = "k8s.io/kubernetes/pkg/apis/certificates/v1beta1", deps = [ "//pkg/apis/certificates:go_default_library", + "//pkg/apis/core:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/defaults.go index ec11d3ab111..14133d9df2a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/defaults.go @@ -18,12 +18,12 @@ package v1beta1 import ( "crypto/x509" - "reflect" - "strings" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" + certificates "k8s.io/kubernetes/pkg/apis/certificates" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { @@ -41,6 +41,12 @@ func SetDefaults_CertificateSigningRequestSpec(obj *certificatesv1beta1.Certific } } +func SetDefaults_CertificateSigningRequestCondition(obj *certificatesv1beta1.CertificateSigningRequestCondition) { + if len(obj.Status) == 0 { + obj.Status = v1.ConditionTrue + } +} + // DefaultSignerNameFromSpec will determine the signerName that should be set // by attempting to inspect the 'request' content and the spec options. func DefaultSignerNameFromSpec(obj *certificatesv1beta1.CertificateSigningRequestSpec) string { @@ -60,70 +66,23 @@ func DefaultSignerNameFromSpec(obj *certificatesv1beta1.CertificateSigningReques } func IsKubeletServingCSR(req *x509.CertificateRequest, usages []certificatesv1beta1.KeyUsage) bool { - if !reflect.DeepEqual([]string{"system:nodes"}, req.Subject.Organization) { - return false - } - - // at least one of dnsNames or ipAddresses must be specified - if len(req.DNSNames) == 0 && len(req.IPAddresses) == 0 { - return false - } - - if len(req.EmailAddresses) > 0 || len(req.URIs) > 0 { - return false - } - - requiredUsages := []certificatesv1beta1.KeyUsage{ - certificatesv1beta1.UsageDigitalSignature, - certificatesv1beta1.UsageKeyEncipherment, - certificatesv1beta1.UsageServerAuth, - } - if !equalUnsorted(requiredUsages, usages) { - return false - } - - if !strings.HasPrefix(req.Subject.CommonName, "system:node:") { - return false - } - - return true + return certificates.IsKubeletServingCSR(req, usagesToSet(usages)) +} +func ValidateKubeletServingCSR(req *x509.CertificateRequest, usages []certificatesv1beta1.KeyUsage) error { + return certificates.ValidateKubeletServingCSR(req, usagesToSet(usages)) } func IsKubeletClientCSR(req *x509.CertificateRequest, usages []certificatesv1beta1.KeyUsage) bool { - if !reflect.DeepEqual([]string{"system:nodes"}, req.Subject.Organization) { - return false - } - - if len(req.DNSNames) > 0 || len(req.EmailAddresses) > 0 || len(req.IPAddresses) > 0 || len(req.URIs) > 0 { - return false - } - - if !strings.HasPrefix(req.Subject.CommonName, "system:node:") { - return false - } - - requiredUsages := []certificatesv1beta1.KeyUsage{ - certificatesv1beta1.UsageDigitalSignature, - certificatesv1beta1.UsageKeyEncipherment, - certificatesv1beta1.UsageClientAuth, - } - if !equalUnsorted(requiredUsages, usages) { - return false - } - - return true + return certificates.IsKubeletClientCSR(req, usagesToSet(usages)) +} +func ValidateKubeletClientCSR(req *x509.CertificateRequest, usages []certificatesv1beta1.KeyUsage) error { + return certificates.ValidateKubeletClientCSR(req, usagesToSet(usages)) } -// equalUnsorted compares two []string for equality of contents regardless of -// the order of the elements -func equalUnsorted(left, right []certificatesv1beta1.KeyUsage) bool { - l := sets.NewString() - for _, s := range left { - l.Insert(string(s)) +func usagesToSet(usages []certificatesv1beta1.KeyUsage) sets.String { + result := sets.NewString() + for _, usage := range usages { + result.Insert(string(usage)) } - r := sets.NewString() - for _, s := range right { - r.Insert(string(s)) - } - return l.Equal(r) + return result } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.conversion.go index e8c87716e59..fbe73f01137 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.conversion.go @@ -24,10 +24,12 @@ import ( unsafe "unsafe" v1beta1 "k8s.io/api/certificates/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" certificates "k8s.io/kubernetes/pkg/apis/certificates" + core "k8s.io/kubernetes/pkg/apis/core" ) func init() { @@ -124,9 +126,11 @@ func Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSignin func autoConvert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *v1beta1.CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { out.Type = certificates.RequestConditionType(in.Type) + out.Status = core.ConditionStatus(in.Status) out.Reason = in.Reason out.Message = in.Message out.LastUpdateTime = in.LastUpdateTime + out.LastTransitionTime = in.LastTransitionTime return nil } @@ -137,9 +141,11 @@ func Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_Certific func autoConvert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *v1beta1.CertificateSigningRequestCondition, s conversion.Scope) error { out.Type = v1beta1.RequestConditionType(in.Type) + out.Status = v1.ConditionStatus(in.Status) out.Reason = in.Reason out.Message = in.Message out.LastUpdateTime = in.LastUpdateTime + out.LastTransitionTime = in.LastTransitionTime return nil } @@ -192,7 +198,7 @@ func Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSi func autoConvert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *v1beta1.CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) - if err := v1.Convert_Pointer_string_To_string(&in.SignerName, &out.SignerName, s); err != nil { + if err := metav1.Convert_Pointer_string_To_string(&in.SignerName, &out.SignerName, s); err != nil { return err } out.Usages = *(*[]certificates.KeyUsage)(unsafe.Pointer(&in.Usages)) @@ -210,7 +216,7 @@ func Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSi func autoConvert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *v1beta1.CertificateSigningRequestSpec, s conversion.Scope) error { out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) - if err := v1.Convert_string_To_Pointer_string(&in.SignerName, &out.SignerName, s); err != nil { + if err := metav1.Convert_string_To_Pointer_string(&in.SignerName, &out.SignerName, s); err != nil { return err } out.Usages = *(*[]v1beta1.KeyUsage)(unsafe.Pointer(&in.Usages)) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.defaults.go index beb1ee2d125..b3ff787cc3f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.defaults.go @@ -40,6 +40,10 @@ func RegisterDefaults(scheme *runtime.Scheme) error { func SetObjectDefaults_CertificateSigningRequest(in *v1beta1.CertificateSigningRequest) { SetDefaults_CertificateSigningRequestSpec(&in.Spec) + for i := range in.Status.Conditions { + a := &in.Status.Conditions[i] + SetDefaults_CertificateSigningRequestCondition(a) + } } func SetObjectDefaults_CertificateSigningRequestList(in *v1beta1.CertificateSigningRequestList) { diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/certificates/validation/BUILD index 93e1542f2b8..690d2ff56bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/validation/BUILD @@ -12,9 +12,16 @@ go_library( importpath = "k8s.io/kubernetes/pkg/apis/certificates/validation", deps = [ "//pkg/apis/certificates:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", "//pkg/apis/core/validation:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", + "//staging/src/k8s.io/client-go/util/cert:go_default_library", ], ) @@ -37,7 +44,11 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/apis/certificates:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", + "//pkg/apis/core:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/validation/validation.go index d24446355af..f182027e439 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/validation/validation.go @@ -17,21 +17,74 @@ limitations under the License. package validation import ( + "bytes" + "crypto/x509" + "encoding/pem" "fmt" "strings" + v1 "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/apimachinery/pkg/util/sets" utilvalidation "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" - + utilcert "k8s.io/client-go/util/cert" "k8s.io/kubernetes/pkg/apis/certificates" + certificatesv1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" apivalidation "k8s.io/kubernetes/pkg/apis/core/validation" ) +var ( + // trueConditionTypes is the set of condition types which may only have a status of True if present + trueConditionTypes = sets.NewString( + string(certificates.CertificateApproved), + string(certificates.CertificateDenied), + string(certificates.CertificateFailed), + ) + + trueStatusOnly = sets.NewString(string(v1.ConditionTrue)) + allStatusValues = sets.NewString(string(v1.ConditionTrue), string(v1.ConditionFalse), string(v1.ConditionUnknown)) +) + +type certificateValidationOptions struct { + // The following allow modifications only permitted via certain update paths + + // allow populating/modifying Approved/Denied conditions + allowSettingApprovalConditions bool + // allow populating status.certificate + allowSettingCertificate bool + + // allow Approved and Denied conditions to be exist. + // we tolerate this when the problem is already present in the persisted object for compatibility. + allowBothApprovedAndDenied bool + + // The following are bad things we tolerate for compatibility reasons: + // * in requests made via the v1beta1 API + // * in update requests where the problem is already present in the persisted object + + // allow modifying status.certificate on an update where the old object has a different certificate + allowResettingCertificate bool + // allow the legacy-unknown signerName + allowLegacySignerName bool + // allow conditions with duplicate types + allowDuplicateConditionTypes bool + // allow conditions with "" types + allowEmptyConditionType bool + // allow arbitrary content in status.certificate + allowArbitraryCertificate bool + // allow usages values outside the known set + allowUnknownUsages bool + // allow duplicate usages values + allowDuplicateUsages bool +} + // validateCSR validates the signature and formatting of a base64-wrapped, // PEM-encoded PKCS#10 certificate signing request. If this is invalid, we must // not accept the CSR for further processing. func validateCSR(obj *certificates.CertificateSigningRequest) error { - csr, err := certificates.ParseCSR(obj) + csr, err := certificates.ParseCSR(obj.Spec.Request) if err != nil { return err } @@ -43,12 +96,83 @@ func validateCSR(obj *certificates.CertificateSigningRequest) error { return nil } +func validateCertificate(pemData []byte) error { + if len(pemData) == 0 { + return nil + } + + blocks := 0 + for { + block, remainingData := pem.Decode(pemData) + if block == nil { + break + } + + if block.Type != utilcert.CertificateBlockType { + return fmt.Errorf("only CERTIFICATE PEM blocks are allowed, found %q", block.Type) + } + if len(block.Headers) != 0 { + return fmt.Errorf("no PEM block headers are permitted") + } + blocks++ + + certs, err := x509.ParseCertificates(block.Bytes) + if err != nil { + return err + } + if len(certs) == 0 { + return fmt.Errorf("found CERTIFICATE PEM block containing 0 certificates") + } + + pemData = remainingData + } + + if blocks == 0 { + return fmt.Errorf("must contain at least one CERTIFICATE PEM block") + } + + return nil +} + // We don't care what you call your certificate requests. func ValidateCertificateRequestName(name string, prefix bool) []string { return nil } -func ValidateCertificateSigningRequest(csr *certificates.CertificateSigningRequest) field.ErrorList { +func ValidateCertificateSigningRequestCreate(csr *certificates.CertificateSigningRequest, version schema.GroupVersion) field.ErrorList { + opts := getValidationOptions(version, csr, nil) + return validateCertificateSigningRequest(csr, opts) +} + +var ( + allValidUsages = sets.NewString( + string(certificates.UsageSigning), + string(certificates.UsageDigitalSignature), + string(certificates.UsageContentCommitment), + string(certificates.UsageKeyEncipherment), + string(certificates.UsageKeyAgreement), + string(certificates.UsageDataEncipherment), + string(certificates.UsageCertSign), + string(certificates.UsageCRLSign), + string(certificates.UsageEncipherOnly), + string(certificates.UsageDecipherOnly), + string(certificates.UsageAny), + string(certificates.UsageServerAuth), + string(certificates.UsageClientAuth), + string(certificates.UsageCodeSigning), + string(certificates.UsageEmailProtection), + string(certificates.UsageSMIME), + string(certificates.UsageIPsecEndSystem), + string(certificates.UsageIPsecTunnel), + string(certificates.UsageIPsecUser), + string(certificates.UsageTimestamping), + string(certificates.UsageOCSPSigning), + string(certificates.UsageMicrosoftSGC), + string(certificates.UsageNetscapeSGC), + ) +) + +func validateCertificateSigningRequest(csr *certificates.CertificateSigningRequest, opts certificateValidationOptions) field.ErrorList { isNamespaced := false allErrs := apivalidation.ValidateObjectMeta(&csr.ObjectMeta, isNamespaced, ValidateCertificateRequestName, field.NewPath("metadata")) @@ -60,7 +184,87 @@ func ValidateCertificateSigningRequest(csr *certificates.CertificateSigningReque if len(csr.Spec.Usages) == 0 { allErrs = append(allErrs, field.Required(specPath.Child("usages"), "usages must be provided")) } - allErrs = append(allErrs, ValidateCertificateSigningRequestSignerName(specPath.Child("signerName"), csr.Spec.SignerName)...) + if !opts.allowUnknownUsages { + for i, usage := range csr.Spec.Usages { + if !allValidUsages.Has(string(usage)) { + allErrs = append(allErrs, field.NotSupported(specPath.Child("usages").Index(i), usage, allValidUsages.List())) + } + } + } + if !opts.allowDuplicateUsages { + seen := make(map[certificates.KeyUsage]bool, len(csr.Spec.Usages)) + for i, usage := range csr.Spec.Usages { + if seen[usage] { + allErrs = append(allErrs, field.Duplicate(specPath.Child("usages").Index(i), usage)) + } + seen[usage] = true + } + } + if !opts.allowLegacySignerName && csr.Spec.SignerName == certificates.LegacyUnknownSignerName { + allErrs = append(allErrs, field.Invalid(specPath.Child("signerName"), csr.Spec.SignerName, "the legacy signerName is not allowed via this API version")) + } else { + allErrs = append(allErrs, ValidateCertificateSigningRequestSignerName(specPath.Child("signerName"), csr.Spec.SignerName)...) + } + allErrs = append(allErrs, validateConditions(field.NewPath("status", "conditions"), csr, opts)...) + + if !opts.allowArbitraryCertificate { + if err := validateCertificate(csr.Status.Certificate); err != nil { + allErrs = append(allErrs, field.Invalid(field.NewPath("status", "certificate"), "", err.Error())) + } + } + + return allErrs +} + +func validateConditions(fldPath *field.Path, csr *certificates.CertificateSigningRequest, opts certificateValidationOptions) field.ErrorList { + allErrs := field.ErrorList{} + + seenTypes := map[certificates.RequestConditionType]bool{} + hasApproved := false + hasDenied := false + + for i, c := range csr.Status.Conditions { + + if !opts.allowEmptyConditionType { + if len(c.Type) == 0 { + allErrs = append(allErrs, field.Required(fldPath.Index(i).Child("type"), "")) + } + } + + allowedStatusValues := allStatusValues + if trueConditionTypes.Has(string(c.Type)) { + allowedStatusValues = trueStatusOnly + } + switch { + case c.Status == "": + allErrs = append(allErrs, field.Required(fldPath.Index(i).Child("status"), "")) + case !allowedStatusValues.Has(string(c.Status)): + allErrs = append(allErrs, field.NotSupported(fldPath.Index(i).Child("status"), c.Status, allowedStatusValues.List())) + } + + if !opts.allowBothApprovedAndDenied { + switch c.Type { + case certificates.CertificateApproved: + hasApproved = true + if hasDenied { + allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("type"), c.Type, "Approved and Denied conditions are mutually exclusive")) + } + case certificates.CertificateDenied: + hasDenied = true + if hasApproved { + allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("type"), c.Type, "Approved and Denied conditions are mutually exclusive")) + } + } + } + + if !opts.allowDuplicateConditionTypes { + if seenTypes[c.Type] { + allErrs = append(allErrs, field.Duplicate(fldPath.Index(i).Child("type"), c.Type)) + } + seenTypes[c.Type] = true + } + } + return allErrs } @@ -140,8 +344,216 @@ func ValidateCertificateSigningRequestSignerName(fldPath *field.Path, signerName return el } -func ValidateCertificateSigningRequestUpdate(newCSR, oldCSR *certificates.CertificateSigningRequest) field.ErrorList { - validationErrorList := ValidateCertificateSigningRequest(newCSR) +func ValidateCertificateSigningRequestUpdate(newCSR, oldCSR *certificates.CertificateSigningRequest, version schema.GroupVersion) field.ErrorList { + opts := getValidationOptions(version, newCSR, oldCSR) + return validateCertificateSigningRequestUpdate(newCSR, oldCSR, opts) +} + +func ValidateCertificateSigningRequestStatusUpdate(newCSR, oldCSR *certificates.CertificateSigningRequest, version schema.GroupVersion) field.ErrorList { + opts := getValidationOptions(version, newCSR, oldCSR) + opts.allowSettingCertificate = true + return validateCertificateSigningRequestUpdate(newCSR, oldCSR, opts) +} + +func ValidateCertificateSigningRequestApprovalUpdate(newCSR, oldCSR *certificates.CertificateSigningRequest, version schema.GroupVersion) field.ErrorList { + opts := getValidationOptions(version, newCSR, oldCSR) + opts.allowSettingApprovalConditions = true + return validateCertificateSigningRequestUpdate(newCSR, oldCSR, opts) +} + +func validateCertificateSigningRequestUpdate(newCSR, oldCSR *certificates.CertificateSigningRequest, opts certificateValidationOptions) field.ErrorList { + validationErrorList := validateCertificateSigningRequest(newCSR, opts) metaUpdateErrorList := apivalidation.ValidateObjectMetaUpdate(&newCSR.ObjectMeta, &oldCSR.ObjectMeta, field.NewPath("metadata")) + + // prevent removal of existing Approved/Denied/Failed conditions + for _, t := range []certificates.RequestConditionType{certificates.CertificateApproved, certificates.CertificateDenied, certificates.CertificateFailed} { + oldConditions := findConditions(oldCSR, t) + newConditions := findConditions(newCSR, t) + if len(newConditions) < len(oldConditions) { + validationErrorList = append(validationErrorList, field.Forbidden(field.NewPath("status", "conditions"), fmt.Sprintf("updates may not remove a condition of type %q", t))) + } + } + + if !opts.allowSettingApprovalConditions { + // prevent addition/removal/modification of Approved/Denied conditions + for _, t := range []certificates.RequestConditionType{certificates.CertificateApproved, certificates.CertificateDenied} { + oldConditions := findConditions(oldCSR, t) + newConditions := findConditions(newCSR, t) + switch { + case len(newConditions) < len(oldConditions): + // removals are prevented above + case len(newConditions) > len(oldConditions): + validationErrorList = append(validationErrorList, field.Forbidden(field.NewPath("status", "conditions"), fmt.Sprintf("updates may not add a condition of type %q", t))) + case !apiequality.Semantic.DeepEqual(oldConditions, newConditions): + conditionDiff := diff.ObjectDiff(oldConditions, newConditions) + validationErrorList = append(validationErrorList, field.Forbidden(field.NewPath("status", "conditions"), fmt.Sprintf("updates may not modify a condition of type %q\n%v", t, conditionDiff))) + } + } + } + + if !bytes.Equal(newCSR.Status.Certificate, oldCSR.Status.Certificate) { + if !opts.allowSettingCertificate { + validationErrorList = append(validationErrorList, field.Forbidden(field.NewPath("status", "certificate"), "updates may not set certificate content")) + } else if !opts.allowResettingCertificate && len(oldCSR.Status.Certificate) > 0 { + validationErrorList = append(validationErrorList, field.Forbidden(field.NewPath("status", "certificate"), "updates may not modify existing certificate content")) + } + } + return append(validationErrorList, metaUpdateErrorList...) } + +// findConditions returns all instances of conditions of the specified type +func findConditions(csr *certificates.CertificateSigningRequest, conditionType certificates.RequestConditionType) []certificates.CertificateSigningRequestCondition { + var retval []certificates.CertificateSigningRequestCondition + for i, c := range csr.Status.Conditions { + if c.Type == conditionType { + retval = append(retval, csr.Status.Conditions[i]) + } + } + return retval +} + +// getValidationOptions returns the validation options to be +// compatible with the specified version and existing CSR. +// oldCSR may be nil if this is a create request. +// validation options related to subresource-specific capabilities are set to false. +func getValidationOptions(version schema.GroupVersion, newCSR, oldCSR *certificates.CertificateSigningRequest) certificateValidationOptions { + return certificateValidationOptions{ + allowResettingCertificate: allowResettingCertificate(version), + allowBothApprovedAndDenied: allowBothApprovedAndDenied(oldCSR), + allowLegacySignerName: allowLegacySignerName(version, oldCSR), + allowDuplicateConditionTypes: allowDuplicateConditionTypes(version, oldCSR), + allowEmptyConditionType: allowEmptyConditionType(version, oldCSR), + allowArbitraryCertificate: allowArbitraryCertificate(version, newCSR, oldCSR), + allowDuplicateUsages: allowDuplicateUsages(version, oldCSR), + allowUnknownUsages: allowUnknownUsages(version, oldCSR), + } +} + +func allowResettingCertificate(version schema.GroupVersion) bool { + // compatibility with v1beta1 + return version == certificatesv1beta1.SchemeGroupVersion +} + +func allowBothApprovedAndDenied(oldCSR *certificates.CertificateSigningRequest) bool { + if oldCSR == nil { + return false + } + approved := false + denied := false + for _, c := range oldCSR.Status.Conditions { + if c.Type == certificates.CertificateApproved { + approved = true + } else if c.Type == certificates.CertificateDenied { + denied = true + } + } + // compatibility with existing data + return approved && denied +} + +func allowLegacySignerName(version schema.GroupVersion, oldCSR *certificates.CertificateSigningRequest) bool { + switch { + case version == certificatesv1beta1.SchemeGroupVersion: + return true // compatibility with v1beta1 + case oldCSR != nil && oldCSR.Spec.SignerName == certificates.LegacyUnknownSignerName: + return true // compatibility with existing data + default: + return false + } +} + +func allowDuplicateConditionTypes(version schema.GroupVersion, oldCSR *certificates.CertificateSigningRequest) bool { + switch { + case version == certificatesv1beta1.SchemeGroupVersion: + return true // compatibility with v1beta1 + case oldCSR != nil && hasDuplicateConditionTypes(oldCSR): + return true // compatibility with existing data + default: + return false + } +} +func hasDuplicateConditionTypes(csr *certificates.CertificateSigningRequest) bool { + seen := map[certificates.RequestConditionType]bool{} + for _, c := range csr.Status.Conditions { + if seen[c.Type] { + return true + } + seen[c.Type] = true + } + return false +} + +func allowEmptyConditionType(version schema.GroupVersion, oldCSR *certificates.CertificateSigningRequest) bool { + switch { + case version == certificatesv1beta1.SchemeGroupVersion: + return true // compatibility with v1beta1 + case oldCSR != nil && hasEmptyConditionType(oldCSR): + return true // compatibility with existing data + default: + return false + } +} +func hasEmptyConditionType(csr *certificates.CertificateSigningRequest) bool { + for _, c := range csr.Status.Conditions { + if len(c.Type) == 0 { + return true + } + } + return false +} + +func allowArbitraryCertificate(version schema.GroupVersion, newCSR, oldCSR *certificates.CertificateSigningRequest) bool { + switch { + case version == certificatesv1beta1.SchemeGroupVersion: + return true // compatibility with v1beta1 + case newCSR != nil && oldCSR != nil && bytes.Equal(newCSR.Status.Certificate, oldCSR.Status.Certificate): + return true // tolerate updates that don't touch status.certificate + case oldCSR != nil && validateCertificate(oldCSR.Status.Certificate) != nil: + return true // compatibility with existing data + default: + return false + } +} + +func allowUnknownUsages(version schema.GroupVersion, oldCSR *certificates.CertificateSigningRequest) bool { + switch { + case version == certificatesv1beta1.SchemeGroupVersion: + return true // compatibility with v1beta1 + case oldCSR != nil && hasUnknownUsage(oldCSR.Spec.Usages): + return true // compatibility with existing data + default: + return false + } +} + +func hasUnknownUsage(usages []certificates.KeyUsage) bool { + for _, usage := range usages { + if !allValidUsages.Has(string(usage)) { + return true + } + } + return false +} + +func allowDuplicateUsages(version schema.GroupVersion, oldCSR *certificates.CertificateSigningRequest) bool { + switch { + case version == certificatesv1beta1.SchemeGroupVersion: + return true // compatibility with v1beta1 + case oldCSR != nil && hasDuplicateUsage(oldCSR.Spec.Usages): + return true // compatibility with existing data + default: + return false + } +} + +func hasDuplicateUsage(usages []certificates.KeyUsage) bool { + seen := make(map[certificates.KeyUsage]bool, len(usages)) + for _, usage := range usages { + if seen[usage] { + return true + } + seen[usage] = true + } + return false +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go index 23636909de0..b0e748b6c11 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go @@ -56,6 +56,7 @@ func (in *CertificateSigningRequest) DeepCopyObject() runtime.Object { func (in *CertificateSigningRequestCondition) DeepCopyInto(out *CertificateSigningRequestCondition) { *out = *in in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) return } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS index 270e4c49962..a689545f7bf 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS @@ -6,7 +6,6 @@ approvers: - smarterclayton - thockin - liggitt -# - bgrant0607 # manual escalations only reviewers: - thockin - lavalamp @@ -28,7 +27,6 @@ reviewers: - sttts - dchen1107 - saad-ali -- zmerlynn - luxas - janetkuo - justinsb @@ -36,7 +34,6 @@ reviewers: - ncdc - tallclair - yifan-gu -- eparis - mwielgus - soltysh - piosz diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/annotation_key_constants.go b/vendor/k8s.io/kubernetes/pkg/apis/core/annotation_key_constants.go index 70b9ff7583b..df0c15fd69c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/annotation_key_constants.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/annotation_key_constants.go @@ -39,17 +39,20 @@ const ( // SeccompPodAnnotationKey represents the key of a seccomp profile applied // to all containers of a pod. + // Deprecated: set a pod security context `seccompProfile` field. SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod" // SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied // to one container of a pod. + // Deprecated: set a container security context `seccompProfile` field. SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/" // SeccompProfileRuntimeDefault represents the default seccomp profile used by container runtime. + // Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead. SeccompProfileRuntimeDefault string = "runtime/default" // DeprecatedSeccompProfileDockerDefault represents the default seccomp profile used by docker. - // This is now deprecated and should be replaced by SeccompProfileRuntimeDefault. + // Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead. DeprecatedSeccompProfileDockerDefault string = "docker/default" // PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized) @@ -61,10 +64,6 @@ const ( // This annotation can be attached to node. ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl" - // BootstrapCheckpointAnnotationKey represents a Resource (Pod) that should be checkpointed by - // the kubelet prior to running - BootstrapCheckpointAnnotationKey string = "node.kubernetes.io/bootstrap-checkpoint" - // NonConvertibleAnnotationPrefix annotation key prefix used to identify non-convertible json paths. NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io" diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/install/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/core/install/OWNERS index eb1df912533..dfbbe68a516 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/install/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/install/OWNERS @@ -8,4 +8,3 @@ reviewers: - liggitt - nikhiljindal - dims -- david-mcmahon diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/pods/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/core/pods/helpers.go index 1dfdb767d51..e05a313a1f1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/pods/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/pods/helpers.go @@ -34,23 +34,23 @@ type ContainerVisitorWithPath func(container *api.Container, path *field.Path) b // of every container in the given pod spec and the field.Path to that container. // If visitor returns false, visiting is short-circuited. VisitContainersWithPath returns true if visiting completes, // false if visiting was short-circuited. -func VisitContainersWithPath(podSpec *api.PodSpec, visitor ContainerVisitorWithPath) bool { - path := field.NewPath("spec", "initContainers") +func VisitContainersWithPath(podSpec *api.PodSpec, specPath *field.Path, visitor ContainerVisitorWithPath) bool { + fldPath := specPath.Child("initContainers") for i := range podSpec.InitContainers { - if !visitor(&podSpec.InitContainers[i], path.Index(i)) { + if !visitor(&podSpec.InitContainers[i], fldPath.Index(i)) { return false } } - path = field.NewPath("spec", "containers") + fldPath = specPath.Child("containers") for i := range podSpec.Containers { - if !visitor(&podSpec.Containers[i], path.Index(i)) { + if !visitor(&podSpec.Containers[i], fldPath.Index(i)) { return false } } if utilfeature.DefaultFeatureGate.Enabled(features.EphemeralContainers) { - path = field.NewPath("spec", "ephemeralContainers") + fldPath = specPath.Child("ephemeralContainers") for i := range podSpec.EphemeralContainers { - if !visitor((*api.Container)(&podSpec.EphemeralContainers[i].EphemeralContainerCommon), path.Index(i)) { + if !visitor((*api.Container)(&podSpec.EphemeralContainers[i].EphemeralContainerCommon), fldPath.Index(i)) { return false } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/types.go b/vendor/k8s.io/kubernetes/pkg/apis/core/types.go index 6b02bf08d34..0f777c79932 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/types.go @@ -154,9 +154,36 @@ type VolumeSource struct { // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod // +optional StorageOS *StorageOSVolumeSource - // CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + // CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). // +optional CSI *CSIVolumeSource + // Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). + // The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + // and deleted when the pod is removed. + // + // Use this if: + // a) the volume is only needed while the pod runs, + // b) features of normal volumes like restoring from snapshot or capacity + // tracking are needed, + // c) the storage driver is specified through a storage class, and + // d) the storage driver supports dynamic volume provisioning through + // a PersistentVolumeClaim (see EphemeralVolumeSource for more + // information on the connection between this volume type + // and PersistentVolumeClaim). + // + // Use PersistentVolumeClaim or one of the vendor-specific + // APIs for volumes that persist for longer than the lifecycle + // of an individual pod. + // + // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + // be used that way - see the documentation of the driver for + // more information. + // + // A pod can use both types of ephemeral volumes and + // persistent volumes at the same time. + // + // +optional + Ephemeral *EphemeralVolumeSource } // PersistentVolumeSource is similar to VolumeSource but meant for the administrator who creates PVs. @@ -1670,6 +1697,53 @@ type CSIVolumeSource struct { NodePublishSecretRef *LocalObjectReference } +// EphemeralVolumeSource represents an ephemeral volume that is handled by a normal storage driver. +type EphemeralVolumeSource struct { + // VolumeClaimTemplate will be used to create a stand-alone PVC to provision the volume. + // The pod in which this EphemeralVolumeSource is embedded will be the + // owner of the PVC, i.e. the PVC will be deleted together with the + // pod. The name of the PVC will be `-` where + // `` is the name from the `PodSpec.Volumes` array + // entry. Pod validation will reject the pod if the concatenated name + // is not valid for a PVC (for example, too long). + // + // An existing PVC with that name that is not owned by the pod + // will *not* be used for the pod to avoid using an unrelated + // volume by mistake. Starting the pod is then blocked until + // the unrelated PVC is removed. If such a pre-created PVC is + // meant to be used by the pod, the PVC has to updated with an + // owner reference to the pod once the pod exists. Normally + // this should not be necessary, but it may be useful when + // manually reconstructing a broken cluster. + // + // This field is read-only and no changes will be made by Kubernetes + // to the PVC after it has been created. + // + // Required, must not be nil. + VolumeClaimTemplate *PersistentVolumeClaimTemplate + + // ReadOnly specifies a read-only configuration for the volume. + // Defaults to false (read/write). + // +optional + ReadOnly bool +} + +// PersistentVolumeClaimTemplate is used to produce +// PersistentVolumeClaim objects as part of an EphemeralVolumeSource. +type PersistentVolumeClaimTemplate struct { + // ObjectMeta may contain labels and annotations that will be copied into the PVC + // when creating it. No other fields are allowed and will be rejected during + // validation. + // +optional + metav1.ObjectMeta + + // Spec for the PersistentVolumeClaim. The entire content is + // copied unchanged into the PVC that gets created from this + // template. The same fields as in a PersistentVolumeClaim + // are also valid here. + Spec PersistentVolumeClaimSpec +} + // ContainerPort represents a network port in a single container type ContainerPort struct { // Optional: If specified, this must be an IANA_SVC_NAME Each named port @@ -1774,7 +1848,7 @@ type EnvVar struct { // EnvVarSource represents a source for the value of an EnvVar. // Only one of its fields may be set. type EnvVarSource struct { - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, + // Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, // metadata.uid, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. // +optional FieldRef *ObjectFieldSelector @@ -2693,6 +2767,12 @@ type PodSpec struct { // If not specified, the pod will not have a domainname at all. // +optional Subdomain string + // If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + // In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). + // In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. + // If a pod does not have FQDN, this has no effect. + // +optional + SetHostnameAsFQDN *bool // If specified, the pod's scheduling constraints // +optional Affinity *Affinity @@ -2725,7 +2805,7 @@ type PodSpec struct { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. - // This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional PreemptionPolicy *PreemptionPolicy // Specifies the DNS parameters of a pod. @@ -2764,7 +2844,6 @@ type PodSpec struct { EnableServiceLinks *bool // TopologySpreadConstraints describes how a group of pods ought to spread across topology // domains. Scheduler will schedule pods in a way which abides by the constraints. - // This field is only honored by clusters that enable the EvenPodsSpread feature. // All topologySpreadConstraints are ANDed. // +optional TopologySpreadConstraints []TopologySpreadConstraint @@ -2892,8 +2971,36 @@ type PodSecurityContext struct { // sysctls (by the container runtime) might fail to launch. // +optional Sysctls []Sysctl + // The seccomp options to use by the containers in this pod. + // +optional + SeccompProfile *SeccompProfile } +// SeccompProfile defines a pod/container's seccomp profile settings. +// Only one profile source may be set. +// +union +type SeccompProfile struct { + // +unionDiscriminator + Type SeccompProfileType + // Load a profile defined in static file on the node. + // The profile must be preconfigured on the node to work. + // LocalhostProfile cannot be an absolute nor a descending path. + // +optional + LocalhostProfile *string +} + +// SeccompProfileType defines the supported seccomp profile types. +type SeccompProfileType string + +const ( + // SeccompProfileTypeUnconfined is when no seccomp profile is applied (A.K.A. unconfined). + SeccompProfileTypeUnconfined SeccompProfileType = "Unconfined" + // SeccompProfileTypeRuntimeDefault represents the default container runtime seccomp profile. + SeccompProfileTypeRuntimeDefault SeccompProfileType = "RuntimeDefault" + // SeccompProfileTypeLocalhost represents custom made profiles stored on the node's disk. + SeccompProfileTypeLocalhost SeccompProfileType = "Localhost" +) + // PodQOSClass defines the supported qos classes of Pods. type PodQOSClass string @@ -3508,22 +3615,32 @@ type ServiceSpec struct { // +optional HealthCheckNodePort int32 - // publishNotReadyAddresses, when set to true, indicates that DNS implementations - // must publish the notReadyAddresses of subsets for the Endpoints associated with - // the Service. The default value is false. - // The primary use case for setting this field is to use a StatefulSet's Headless Service - // to propagate SRV records for its Pods without respect to their readiness for purpose - // of peer discovery. + // publishNotReadyAddresses indicates that any agent which deals with endpoints for this + // Service should disregard any indications of ready/not-ready. + // The primary use case for setting this field is for a StatefulSet's Headless Service to + // propagate SRV DNS records for its Pods for the purpose of peer discovery. + // The Kubernetes controllers that generate Endpoints and EndpointSlice resources for + // Services interpret this to mean that all endpoints are considered "ready" even if the + // Pods themselves are not. Agents which consume only Kubernetes generated endpoints + // through the Endpoints or EndpointSlice resources can safely assume this behavior. // +optional PublishNotReadyAddresses bool - // ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. - // IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is - // available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. - // Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which - // allocate external load-balancers should use the same IP family. Endpoints for this Service will be of - // this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the - // cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment. + // ipFamily specifies whether this Service has a preference for a particular IP family (e.g. + // IPv4 vs. IPv6) when the IPv6DualStack feature gate is enabled. In a dual-stack cluster, + // you can specify ipFamily when creating a ClusterIP Service to determine whether the + // controller will allocate an IPv4 or IPv6 IP for it, and you can specify ipFamily when + // creating a headless Service to determine whether it will have IPv4 or IPv6 Endpoints. In + // either case, if you do not specify an ipFamily explicitly, it will default to the + // cluster's primary IP family. + // This field is part of an alpha feature, and you should not make any assumptions about its + // semantics other than those described above. In particular, you should not assume that it + // can (or cannot) be changed after creation time; that it can only have the values "IPv4" + // and "IPv6"; or that its current value on a given Service correctly reflects the current + // state of that Service. (For ClusterIP Services, look at clusterIP to see if the Service + // is IPv4 or IPv6. For headless Services, look at the endpoints, which may be dual-stack in + // the future. For ExternalName Services, ipFamily has no meaning, but it may be set to an + // irrelevant value anyway.) // +optional IPFamily *IPFamily @@ -3560,7 +3677,8 @@ type ServicePort struct { // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. - // Field can be enabled with ServiceAppProtocol feature gate. + // This is a beta field that is guarded by the ServiceAppProtocol feature + // gate and enabled by default. // +optional AppProtocol *string @@ -3711,7 +3829,8 @@ type EndpointPort struct { // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. - // Field can be enabled with ServiceAppProtocol feature gate. + // This is a beta field that is guarded by the ServiceAppProtocol feature + // gate and enabled by default. // +optional AppProtocol *string } @@ -3816,7 +3935,7 @@ type NodeSystemInfo struct { MachineID string // SystemUUID reported by the node. For unique machine identification // MachineID is preferred. This field is specific to Red Hat hosts - // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html + // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid SystemUUID string // Boot ID reported by the node. BootID string @@ -4037,7 +4156,7 @@ type NodeAddress struct { } // NodeResources is an object for conveying resource information about a node. -// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details. +// see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details. type NodeResources struct { // Capacity represents the available resources of a node // +optional @@ -4519,21 +4638,8 @@ type EventSeries struct { Count int32 // Time of the last occurrence observed LastObservedTime metav1.MicroTime - // State of this Series: Ongoing or Finished - // Deprecated. Planned removal for 1.18 - State EventSeriesState } -// EventSeriesState defines the state of event series -type EventSeriesState string - -// These are valid values of event series state -const ( - EventSeriesStateOngoing EventSeriesState = "Ongoing" - EventSeriesStateFinished EventSeriesState = "Finished" - EventSeriesStateUnknown EventSeriesState = "Unknown" -) - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // EventList is a list of events. @@ -4778,7 +4884,7 @@ type Secret struct { // Immutable field, if set, ensures that data stored in the Secret cannot // be updated (only object metadata can be modified). - // This is an alpha field enabled by ImmutableEphemeralVolumes feature gate. + // This is a beta field enabled by ImmutableEphemeralVolumes feature gate. // +optional Immutable *bool @@ -4906,7 +5012,7 @@ type ConfigMap struct { // Immutable field, if set, ensures that data stored in the ConfigMap cannot // be updated (only object metadata can be modified). - // This is an alpha field enabled by ImmutableEphemeralVolumes feature gate. + // This is a beta field enabled by ImmutableEphemeralVolumes feature gate. // +optional Immutable *bool @@ -5003,6 +5109,7 @@ type ComponentCondition struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ComponentStatus (and ComponentStatusList) holds the cluster validation info. +// Deprecated: This API is deprecated in v1.19+ type ComponentStatus struct { metav1.TypeMeta // +optional @@ -5015,6 +5122,7 @@ type ComponentStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ComponentStatusList represents the list of component statuses +// Deprecated: This API is deprecated in v1.19+ type ComponentStatusList struct { metav1.TypeMeta // +optional @@ -5081,6 +5189,11 @@ type SecurityContext struct { // readonly paths and masked paths. // +optional ProcMount *ProcMountType + // The seccomp options to use by this container. If seccomp options are + // provided at both the pod & container level, the container options + // override the pod options. + // +optional + SeccompProfile *SeccompProfile } // ProcMountType defines the type of proc mount @@ -5187,8 +5300,8 @@ const ( // TopologySpreadConstraint specifies how to spread matching pods among the given topology. type TopologySpreadConstraint struct { // MaxSkew describes the degree to which pods may be unevenly distributed. - // It's the maximum permitted difference between the number of matching pods in - // any two topology domains of a given topology type. + // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference + // between the number of matching pods in the target topology and the global minimum. // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same // labelSelector spread as 1/1/0: // +-------+-------+-------+ @@ -5200,6 +5313,8 @@ type TopologySpreadConstraint struct { // scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) // violate MaxSkew(1). // - if MaxSkew is 2, incoming pod can be scheduled onto any zone. + // When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence + // to topologies that satisfy it. // It's a required field. Default value is 1 and 0 is not allowed. MaxSkew int32 // TopologyKey is the key of node labels. Nodes that have a label with this key @@ -5210,10 +5325,13 @@ type TopologySpreadConstraint struct { TopologyKey string // WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy // the spread constraint. - // - DoNotSchedule (default) tells the scheduler not to schedule it - // - ScheduleAnyway tells the scheduler to still schedule it - // It's considered as "Unsatisfiable" if and only if placing incoming pod on any - // topology violates "MaxSkew". + // - DoNotSchedule (default) tells the scheduler not to schedule it. + // - ScheduleAnyway tells the scheduler to schedule the pod in any location, + // but giving higher precedence to topologies that would help reduce the + // skew. + // A constraint is considered "Unsatisfiable" for an incoming pod + // if and only if every possible node assigment for that pod would violate + // "MaxSkew" on some topology. // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same // labelSelector spread as 3/1/1: // +-------+-------+-------+ diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/OWNERS index 68232a5525c..66ba3983fad 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/OWNERS @@ -21,13 +21,11 @@ reviewers: - sttts - dchen1107 - saad-ali -- zmerlynn - luxas - janetkuo - justinsb - ncdc - tallclair -- eparis - piosz - jsafrane - dims diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/conversion.go index a6ba99cc895..d89ea26354b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/conversion.go @@ -435,6 +435,7 @@ func AddFieldLabelConversionsForEvent(scheme *runtime.Scheme) error { "involvedObject.resourceVersion", "involvedObject.fieldPath", "reason", + "reportingComponent", "source", "type", "metadata.namespace", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go index bc56c783076..1bb6f27dcf2 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go @@ -285,9 +285,11 @@ func SetDefaults_PersistentVolumeClaim(obj *v1.PersistentVolumeClaim) { if obj.Status.Phase == "" { obj.Status.Phase = v1.ClaimPending } - if obj.Spec.VolumeMode == nil { - obj.Spec.VolumeMode = new(v1.PersistentVolumeMode) - *obj.Spec.VolumeMode = v1.PersistentVolumeFilesystem +} +func SetDefaults_PersistentVolumeClaimSpec(obj *v1.PersistentVolumeClaimSpec) { + if obj.VolumeMode == nil { + obj.VolumeMode = new(v1.PersistentVolumeMode) + *obj.VolumeMode = v1.PersistentVolumeFilesystem } } func SetDefaults_ISCSIVolumeSource(obj *v1.ISCSIVolumeSource) { diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/helpers.go index ac3018c9992..ca45fd8ec40 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/helpers.go @@ -131,22 +131,25 @@ func IsOvercommitAllowed(name v1.ResourceName) bool { !IsHugePageResourceName(name) } +// IsAttachableVolumeResourceName returns true when the resource name is prefixed in attachable volume func IsAttachableVolumeResourceName(name v1.ResourceName) bool { return strings.HasPrefix(string(name), v1.ResourceAttachableVolumesPrefix) } -// Extended and Hugepages resources +// IsScalarResourceName validates the resource for Extended, Hugepages, Native and AttachableVolume resources func IsScalarResourceName(name v1.ResourceName) bool { return IsExtendedResourceName(name) || IsHugePageResourceName(name) || IsPrefixedNativeResource(name) || IsAttachableVolumeResourceName(name) } -// this function aims to check if the service's ClusterIP is set or not +// IsServiceIPSet aims to check if the service's ClusterIP is set or not // the objective is not to perform validation here func IsServiceIPSet(service *v1.Service) bool { return service.Spec.ClusterIP != v1.ClusterIPNone && service.Spec.ClusterIP != "" } +// LoadBalancerStatusEqual evaluates the given load balancers' ingress IP addresses +// and hostnames and returns true if equal or false if otherwise // TODO: make method on LoadBalancerStatus? func LoadBalancerStatusEqual(l, r *v1.LoadBalancerStatus) bool { return ingressSliceEqual(l.Ingress, r.Ingress) @@ -191,7 +194,7 @@ func GetAccessModesAsString(modes []v1.PersistentVolumeAccessMode) string { return strings.Join(modesStr, ",") } -// GetAccessModesAsString returns an array of AccessModes from a string created by GetAccessModesAsString +// GetAccessModesFromString returns an array of AccessModes from a string created by GetAccessModesAsString func GetAccessModesFromString(modes string) []v1.PersistentVolumeAccessMode { strmodes := strings.Split(modes, ",") accessModes := []v1.PersistentVolumeAccessMode{} @@ -467,7 +470,7 @@ func getFilteredTaints(taints []v1.Taint, inclusionFilter taintsFilterFunc) []v1 return filteredTaints } -// Returns true and list of Tolerations matching all Taints if all are tolerated, or false otherwise. +// GetMatchingTolerations returns true and list of Tolerations matching all Taints if all are tolerated, or false otherwise. func GetMatchingTolerations(taints []v1.Taint, tolerations []v1.Toleration) (bool, []v1.Toleration) { if len(taints) == 0 { return true, []v1.Toleration{} @@ -492,6 +495,8 @@ func GetMatchingTolerations(taints []v1.Taint, tolerations []v1.Toleration) (boo return true, result } +// GetAvoidPodsFromNodeAnnotations scans the list of annotations and +// returns the pods that needs to be avoided for this node from scheduling func GetAvoidPodsFromNodeAnnotations(annotations map[string]string) (v1.AvoidPods, error) { var avoidPods v1.AvoidPods if len(annotations) > 0 && annotations[v1.PreferAvoidPodsAnnotationKey] != "" { diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go index 4391c593e72..914461f7de5 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go @@ -541,6 +541,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1.EphemeralVolumeSource)(nil), (*core.EphemeralVolumeSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_EphemeralVolumeSource_To_core_EphemeralVolumeSource(a.(*v1.EphemeralVolumeSource), b.(*core.EphemeralVolumeSource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.EphemeralVolumeSource)(nil), (*v1.EphemeralVolumeSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_EphemeralVolumeSource_To_v1_EphemeralVolumeSource(a.(*core.EphemeralVolumeSource), b.(*v1.EphemeralVolumeSource), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1.Event)(nil), (*core.Event)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_Event_To_core_Event(a.(*v1.Event), b.(*core.Event), scope) }); err != nil { @@ -1131,6 +1141,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1.PersistentVolumeClaimTemplate)(nil), (*core.PersistentVolumeClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_PersistentVolumeClaimTemplate_To_core_PersistentVolumeClaimTemplate(a.(*v1.PersistentVolumeClaimTemplate), b.(*core.PersistentVolumeClaimTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.PersistentVolumeClaimTemplate)(nil), (*v1.PersistentVolumeClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_PersistentVolumeClaimTemplate_To_v1_PersistentVolumeClaimTemplate(a.(*core.PersistentVolumeClaimTemplate), b.(*v1.PersistentVolumeClaimTemplate), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1.PersistentVolumeClaimVolumeSource)(nil), (*core.PersistentVolumeClaimVolumeSource)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_PersistentVolumeClaimVolumeSource_To_core_PersistentVolumeClaimVolumeSource(a.(*v1.PersistentVolumeClaimVolumeSource), b.(*core.PersistentVolumeClaimVolumeSource), scope) }); err != nil { @@ -1621,6 +1641,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1.SeccompProfile)(nil), (*core.SeccompProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_SeccompProfile_To_core_SeccompProfile(a.(*v1.SeccompProfile), b.(*core.SeccompProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.SeccompProfile)(nil), (*v1.SeccompProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_SeccompProfile_To_v1_SeccompProfile(a.(*core.SeccompProfile), b.(*v1.SeccompProfile), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*core.Secret)(nil), (*v1.Secret)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_core_Secret_To_v1_Secret(a.(*core.Secret), b.(*v1.Secret), scope) }); err != nil { @@ -3504,6 +3534,28 @@ func Convert_core_EphemeralContainers_To_v1_EphemeralContainers(in *core.Ephemer return autoConvert_core_EphemeralContainers_To_v1_EphemeralContainers(in, out, s) } +func autoConvert_v1_EphemeralVolumeSource_To_core_EphemeralVolumeSource(in *v1.EphemeralVolumeSource, out *core.EphemeralVolumeSource, s conversion.Scope) error { + out.VolumeClaimTemplate = (*core.PersistentVolumeClaimTemplate)(unsafe.Pointer(in.VolumeClaimTemplate)) + out.ReadOnly = in.ReadOnly + return nil +} + +// Convert_v1_EphemeralVolumeSource_To_core_EphemeralVolumeSource is an autogenerated conversion function. +func Convert_v1_EphemeralVolumeSource_To_core_EphemeralVolumeSource(in *v1.EphemeralVolumeSource, out *core.EphemeralVolumeSource, s conversion.Scope) error { + return autoConvert_v1_EphemeralVolumeSource_To_core_EphemeralVolumeSource(in, out, s) +} + +func autoConvert_core_EphemeralVolumeSource_To_v1_EphemeralVolumeSource(in *core.EphemeralVolumeSource, out *v1.EphemeralVolumeSource, s conversion.Scope) error { + out.VolumeClaimTemplate = (*v1.PersistentVolumeClaimTemplate)(unsafe.Pointer(in.VolumeClaimTemplate)) + out.ReadOnly = in.ReadOnly + return nil +} + +// Convert_core_EphemeralVolumeSource_To_v1_EphemeralVolumeSource is an autogenerated conversion function. +func Convert_core_EphemeralVolumeSource_To_v1_EphemeralVolumeSource(in *core.EphemeralVolumeSource, out *v1.EphemeralVolumeSource, s conversion.Scope) error { + return autoConvert_core_EphemeralVolumeSource_To_v1_EphemeralVolumeSource(in, out, s) +} + func autoConvert_v1_Event_To_core_Event(in *v1.Event, out *core.Event, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ObjectReference_To_core_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil { @@ -3585,7 +3637,6 @@ func Convert_core_EventList_To_v1_EventList(in *core.EventList, out *v1.EventLis func autoConvert_v1_EventSeries_To_core_EventSeries(in *v1.EventSeries, out *core.EventSeries, s conversion.Scope) error { out.Count = in.Count out.LastObservedTime = in.LastObservedTime - out.State = core.EventSeriesState(in.State) return nil } @@ -3597,7 +3648,6 @@ func Convert_v1_EventSeries_To_core_EventSeries(in *v1.EventSeries, out *core.Ev func autoConvert_core_EventSeries_To_v1_EventSeries(in *core.EventSeries, out *v1.EventSeries, s conversion.Scope) error { out.Count = in.Count out.LastObservedTime = in.LastObservedTime - out.State = v1.EventSeriesState(in.State) return nil } @@ -5141,6 +5191,32 @@ func Convert_core_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus( return autoConvert_core_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus(in, out, s) } +func autoConvert_v1_PersistentVolumeClaimTemplate_To_core_PersistentVolumeClaimTemplate(in *v1.PersistentVolumeClaimTemplate, out *core.PersistentVolumeClaimTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_PersistentVolumeClaimSpec_To_core_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1_PersistentVolumeClaimTemplate_To_core_PersistentVolumeClaimTemplate is an autogenerated conversion function. +func Convert_v1_PersistentVolumeClaimTemplate_To_core_PersistentVolumeClaimTemplate(in *v1.PersistentVolumeClaimTemplate, out *core.PersistentVolumeClaimTemplate, s conversion.Scope) error { + return autoConvert_v1_PersistentVolumeClaimTemplate_To_core_PersistentVolumeClaimTemplate(in, out, s) +} + +func autoConvert_core_PersistentVolumeClaimTemplate_To_v1_PersistentVolumeClaimTemplate(in *core.PersistentVolumeClaimTemplate, out *v1.PersistentVolumeClaimTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_core_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_core_PersistentVolumeClaimTemplate_To_v1_PersistentVolumeClaimTemplate is an autogenerated conversion function. +func Convert_core_PersistentVolumeClaimTemplate_To_v1_PersistentVolumeClaimTemplate(in *core.PersistentVolumeClaimTemplate, out *v1.PersistentVolumeClaimTemplate, s conversion.Scope) error { + return autoConvert_core_PersistentVolumeClaimTemplate_To_v1_PersistentVolumeClaimTemplate(in, out, s) +} + func autoConvert_v1_PersistentVolumeClaimVolumeSource_To_core_PersistentVolumeClaimVolumeSource(in *v1.PersistentVolumeClaimVolumeSource, out *core.PersistentVolumeClaimVolumeSource, s conversion.Scope) error { out.ClaimName = in.ClaimName out.ReadOnly = in.ReadOnly @@ -5942,6 +6018,7 @@ func autoConvert_v1_PodSecurityContext_To_core_PodSecurityContext(in *v1.PodSecu out.FSGroup = (*int64)(unsafe.Pointer(in.FSGroup)) out.Sysctls = *(*[]core.Sysctl)(unsafe.Pointer(&in.Sysctls)) out.FSGroupChangePolicy = (*core.PodFSGroupChangePolicy)(unsafe.Pointer(in.FSGroupChangePolicy)) + out.SeccompProfile = (*core.SeccompProfile)(unsafe.Pointer(in.SeccompProfile)) return nil } @@ -5964,6 +6041,7 @@ func autoConvert_core_PodSecurityContext_To_v1_PodSecurityContext(in *core.PodSe out.FSGroup = (*int64)(unsafe.Pointer(in.FSGroup)) out.FSGroupChangePolicy = (*v1.PodFSGroupChangePolicy)(unsafe.Pointer(in.FSGroupChangePolicy)) out.Sysctls = *(*[]v1.Sysctl)(unsafe.Pointer(&in.Sysctls)) + out.SeccompProfile = (*v1.SeccompProfile)(unsafe.Pointer(in.SeccompProfile)) return nil } @@ -6045,6 +6123,7 @@ func autoConvert_v1_PodSpec_To_core_PodSpec(in *v1.PodSpec, out *core.PodSpec, s out.PreemptionPolicy = (*core.PreemptionPolicy)(unsafe.Pointer(in.PreemptionPolicy)) out.Overhead = *(*core.ResourceList)(unsafe.Pointer(&in.Overhead)) out.TopologySpreadConstraints = *(*[]core.TopologySpreadConstraint)(unsafe.Pointer(&in.TopologySpreadConstraints)) + out.SetHostnameAsFQDN = (*bool)(unsafe.Pointer(in.SetHostnameAsFQDN)) return nil } @@ -6083,6 +6162,7 @@ func autoConvert_core_PodSpec_To_v1_PodSpec(in *core.PodSpec, out *v1.PodSpec, s out.ImagePullSecrets = *(*[]v1.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) out.Hostname = in.Hostname out.Subdomain = in.Subdomain + out.SetHostnameAsFQDN = (*bool)(unsafe.Pointer(in.SetHostnameAsFQDN)) out.Affinity = (*v1.Affinity)(unsafe.Pointer(in.Affinity)) out.SchedulerName = in.SchedulerName out.Tolerations = *(*[]v1.Toleration)(unsafe.Pointer(&in.Tolerations)) @@ -7000,6 +7080,28 @@ func Convert_core_ScopedResourceSelectorRequirement_To_v1_ScopedResourceSelector return autoConvert_core_ScopedResourceSelectorRequirement_To_v1_ScopedResourceSelectorRequirement(in, out, s) } +func autoConvert_v1_SeccompProfile_To_core_SeccompProfile(in *v1.SeccompProfile, out *core.SeccompProfile, s conversion.Scope) error { + out.Type = core.SeccompProfileType(in.Type) + out.LocalhostProfile = (*string)(unsafe.Pointer(in.LocalhostProfile)) + return nil +} + +// Convert_v1_SeccompProfile_To_core_SeccompProfile is an autogenerated conversion function. +func Convert_v1_SeccompProfile_To_core_SeccompProfile(in *v1.SeccompProfile, out *core.SeccompProfile, s conversion.Scope) error { + return autoConvert_v1_SeccompProfile_To_core_SeccompProfile(in, out, s) +} + +func autoConvert_core_SeccompProfile_To_v1_SeccompProfile(in *core.SeccompProfile, out *v1.SeccompProfile, s conversion.Scope) error { + out.Type = v1.SeccompProfileType(in.Type) + out.LocalhostProfile = (*string)(unsafe.Pointer(in.LocalhostProfile)) + return nil +} + +// Convert_core_SeccompProfile_To_v1_SeccompProfile is an autogenerated conversion function. +func Convert_core_SeccompProfile_To_v1_SeccompProfile(in *core.SeccompProfile, out *v1.SeccompProfile, s conversion.Scope) error { + return autoConvert_core_SeccompProfile_To_v1_SeccompProfile(in, out, s) +} + func autoConvert_v1_Secret_To_core_Secret(in *v1.Secret, out *core.Secret, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta out.Immutable = (*bool)(unsafe.Pointer(in.Immutable)) @@ -7205,6 +7307,7 @@ func autoConvert_v1_SecurityContext_To_core_SecurityContext(in *v1.SecurityConte out.ReadOnlyRootFilesystem = (*bool)(unsafe.Pointer(in.ReadOnlyRootFilesystem)) out.AllowPrivilegeEscalation = (*bool)(unsafe.Pointer(in.AllowPrivilegeEscalation)) out.ProcMount = (*core.ProcMountType)(unsafe.Pointer(in.ProcMount)) + out.SeccompProfile = (*core.SeccompProfile)(unsafe.Pointer(in.SeccompProfile)) return nil } @@ -7224,6 +7327,7 @@ func autoConvert_core_SecurityContext_To_v1_SecurityContext(in *core.SecurityCon out.ReadOnlyRootFilesystem = (*bool)(unsafe.Pointer(in.ReadOnlyRootFilesystem)) out.AllowPrivilegeEscalation = (*bool)(unsafe.Pointer(in.AllowPrivilegeEscalation)) out.ProcMount = (*v1.ProcMountType)(unsafe.Pointer(in.ProcMount)) + out.SeccompProfile = (*v1.SeccompProfile)(unsafe.Pointer(in.SeccompProfile)) return nil } @@ -7979,6 +8083,7 @@ func autoConvert_v1_VolumeSource_To_core_VolumeSource(in *v1.VolumeSource, out * out.ScaleIO = (*core.ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO)) out.StorageOS = (*core.StorageOSVolumeSource)(unsafe.Pointer(in.StorageOS)) out.CSI = (*core.CSIVolumeSource)(unsafe.Pointer(in.CSI)) + out.Ephemeral = (*core.EphemeralVolumeSource)(unsafe.Pointer(in.Ephemeral)) return nil } @@ -8024,6 +8129,7 @@ func autoConvert_core_VolumeSource_To_v1_VolumeSource(in *core.VolumeSource, out out.ScaleIO = (*v1.ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO)) out.StorageOS = (*v1.StorageOSVolumeSource)(unsafe.Pointer(in.StorageOS)) out.CSI = (*v1.CSIVolumeSource)(unsafe.Pointer(in.CSI)) + out.Ephemeral = (*v1.EphemeralVolumeSource)(unsafe.Pointer(in.Ephemeral)) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.defaults.go index 05867995ab1..048457b8d9c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.defaults.go @@ -200,6 +200,7 @@ func SetObjectDefaults_PersistentVolume(in *v1.PersistentVolume) { func SetObjectDefaults_PersistentVolumeClaim(in *v1.PersistentVolumeClaim) { SetDefaults_PersistentVolumeClaim(in) + SetDefaults_PersistentVolumeClaimSpec(&in.Spec) SetDefaults_ResourceList(&in.Spec.Resources.Limits) SetDefaults_ResourceList(&in.Spec.Resources.Requests) SetDefaults_ResourceList(&in.Status.Capacity) @@ -272,6 +273,13 @@ func SetObjectDefaults_Pod(in *v1.Pod) { if a.VolumeSource.ScaleIO != nil { SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.InitContainers { a := &in.Spec.InitContainers[i] @@ -478,6 +486,13 @@ func SetObjectDefaults_PodTemplate(in *v1.PodTemplate) { if a.VolumeSource.ScaleIO != nil { SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Template.Spec.InitContainers { a := &in.Template.Spec.InitContainers[i] @@ -686,6 +701,13 @@ func SetObjectDefaults_ReplicationController(in *v1.ReplicationController) { if a.VolumeSource.ScaleIO != nil { SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/BUILD index 30f0bdcc3c2..8fb48c2400b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/BUILD @@ -27,19 +27,21 @@ go_library( "//pkg/master/ports:go_default_library", "//pkg/security/apparmor:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/events/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) @@ -56,8 +58,9 @@ go_test( "//pkg/apis/core:go_default_library", "//pkg/capabilities:go_default_library", "//pkg/features:go_default_library", - "//pkg/security/apparmor:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", + "//staging/src/k8s.io/api/events/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", @@ -66,6 +69,8 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/github.com/stretchr/testify/require:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/OWNERS index 37f2de1a33a..861d1efdce8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/OWNERS @@ -21,12 +21,10 @@ reviewers: - sttts - quinton-hoole - dchen1107 -- zmerlynn - janetkuo - justinsb - pwittrock - tallclair -- eparis - soltysh - piosz - jsafrane diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/conditional_validation.go b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/conditional_validation.go index e11731686bb..fc7661a2bdf 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/conditional_validation.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/conditional_validation.go @@ -17,14 +17,21 @@ limitations under the License. package validation import ( + "fmt" + "net" + "strings" + "k8s.io/apimachinery/pkg/util/validation/field" utilfeature "k8s.io/apiserver/pkg/util/feature" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/features" + netutils "k8s.io/utils/net" ) -// ValidateConditionalService validates conditionally valid fields. -func ValidateConditionalService(service, oldService *api.Service) field.ErrorList { +// ValidateConditionalService validates conditionally valid fields. allowedIPFamilies is an ordered +// list of the valid IP families (IPv4 or IPv6) that are supported. The first family in the slice +// is the cluster default, although the clusterIP here dictates the family defaulting. +func ValidateConditionalService(service, oldService *api.Service, allowedIPFamilies []api.IPFamily) field.ErrorList { var errs field.ErrorList // If the SCTPSupport feature is disabled, and the old object isn't using the SCTP feature, prevent the new object from using it if !utilfeature.DefaultFeatureGate.Enabled(features.SCTPSupport) && len(serviceSCTPFields(oldService)) == 0 { @@ -32,9 +39,82 @@ func ValidateConditionalService(service, oldService *api.Service) field.ErrorLis errs = append(errs, field.NotSupported(f, api.ProtocolSCTP, []string{string(api.ProtocolTCP), string(api.ProtocolUDP)})) } } + + errs = append(errs, validateIPFamily(service, oldService, allowedIPFamilies)...) + return errs } +// validateIPFamily checks the IPFamily field. +func validateIPFamily(service, oldService *api.Service, allowedIPFamilies []api.IPFamily) field.ErrorList { + var errs field.ErrorList + + // specifically allow an invalid value to remain in storage as long as the user isn't changing it, regardless of gate + if oldService != nil && oldService.Spec.IPFamily != nil && service.Spec.IPFamily != nil && *oldService.Spec.IPFamily == *service.Spec.IPFamily { + return errs + } + + // If the gate is off, setting or changing IPFamily is not allowed, but clearing it is + if !utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) { + if service.Spec.IPFamily != nil { + if oldService != nil { + errs = append(errs, ValidateImmutableField(service.Spec.IPFamily, oldService.Spec.IPFamily, field.NewPath("spec", "ipFamily"))...) + } else { + errs = append(errs, field.Forbidden(field.NewPath("spec", "ipFamily"), "programmer error, must be cleared when the dual-stack feature gate is off")) + } + } + return errs + } + + // PrepareCreate, PrepareUpdate, and test cases must all set IPFamily when the gate is on + if service.Spec.IPFamily == nil { + errs = append(errs, field.Required(field.NewPath("spec", "ipFamily"), "programmer error, must be set or defaulted by other fields")) + return errs + } + + // A user is not allowed to change the IPFamily field, except for ExternalName services + if oldService != nil && oldService.Spec.IPFamily != nil && service.Spec.Type != api.ServiceTypeExternalName { + errs = append(errs, ValidateImmutableField(service.Spec.IPFamily, oldService.Spec.IPFamily, field.NewPath("spec", "ipFamily"))...) + } + + // Verify the IPFamily is one of the allowed families + desiredFamily := *service.Spec.IPFamily + if hasIPFamily(allowedIPFamilies, desiredFamily) { + // the IP family is one of the allowed families, verify that it matches cluster IP + switch ip := net.ParseIP(service.Spec.ClusterIP); { + case ip == nil: + // do not need to check anything + case netutils.IsIPv6(ip) && desiredFamily != api.IPv6Protocol: + errs = append(errs, field.Invalid(field.NewPath("spec", "ipFamily"), *service.Spec.IPFamily, "does not match IPv6 cluster IP")) + case !netutils.IsIPv6(ip) && desiredFamily != api.IPv4Protocol: + errs = append(errs, field.Invalid(field.NewPath("spec", "ipFamily"), *service.Spec.IPFamily, "does not match IPv4 cluster IP")) + } + } else { + errs = append(errs, field.Invalid(field.NewPath("spec", "ipFamily"), desiredFamily, fmt.Sprintf("only the following families are allowed: %s", joinIPFamilies(allowedIPFamilies, ", ")))) + } + return errs +} + +func hasIPFamily(families []api.IPFamily, family api.IPFamily) bool { + for _, allow := range families { + if allow == family { + return true + } + } + return false +} + +func joinIPFamilies(families []api.IPFamily, separator string) string { + var b strings.Builder + for i, family := range families { + if i != 0 { + b.WriteString(separator) + } + b.WriteString(string(family)) + } + return b.String() +} + func serviceSCTPFields(service *api.Service) []*field.Path { if service == nil { return nil diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/events.go b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/events.go index 971918d5372..0aa0bde368a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/events.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/events.go @@ -18,9 +18,14 @@ package validation import ( "fmt" + "reflect" "time" + "k8s.io/api/core/v1" + eventsv1beta1 "k8s.io/api/events/v1beta1" + apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/kubernetes/pkg/apis/core" @@ -33,8 +38,88 @@ const ( NoteLengthLimit = 1024 ) -// ValidateEvent makes sure that the event makes sense. -func ValidateEvent(event *core.Event) field.ErrorList { +func ValidateEventCreate(event *core.Event, requestVersion schema.GroupVersion) field.ErrorList { + // Make sure events always pass legacy validation. + allErrs := legacyValidateEvent(event) + if requestVersion == v1.SchemeGroupVersion || requestVersion == eventsv1beta1.SchemeGroupVersion { + // No further validation for backwards compatibility. + return allErrs + } + + // Strict validation applies to creation via events.k8s.io/v1 API and newer. + allErrs = append(allErrs, ValidateObjectMeta(&event.ObjectMeta, true, apimachineryvalidation.NameIsDNSSubdomain, field.NewPath("metadata"))...) + allErrs = append(allErrs, validateV1EventSeries(event)...) + zeroTime := time.Time{} + if event.EventTime.Time == zeroTime { + allErrs = append(allErrs, field.Required(field.NewPath("eventTime"), "")) + } + if event.Type != v1.EventTypeNormal && event.Type != v1.EventTypeWarning { + allErrs = append(allErrs, field.Invalid(field.NewPath("type"), "", fmt.Sprintf("has invalid value: %v", event.Type))) + } + if event.FirstTimestamp.Time != zeroTime { + allErrs = append(allErrs, field.Invalid(field.NewPath("firstTimestamp"), "", "needs to be unset")) + } + if event.LastTimestamp.Time != zeroTime { + allErrs = append(allErrs, field.Invalid(field.NewPath("lastTimestamp"), "", "needs to be unset")) + } + if event.Count != 0 { + allErrs = append(allErrs, field.Invalid(field.NewPath("count"), "", "needs to be unset")) + } + if event.Source.Component != "" || event.Source.Host != "" { + allErrs = append(allErrs, field.Invalid(field.NewPath("source"), "", "needs to be unset")) + } + return allErrs +} + +func ValidateEventUpdate(newEvent, oldEvent *core.Event, requestVersion schema.GroupVersion) field.ErrorList { + // Make sure the new event always passes legacy validation. + allErrs := legacyValidateEvent(newEvent) + if requestVersion == v1.SchemeGroupVersion || requestVersion == eventsv1beta1.SchemeGroupVersion { + // No further validation for backwards compatibility. + return allErrs + } + + // Strict validation applies to update via events.k8s.io/v1 API and newer. + allErrs = append(allErrs, ValidateObjectMetaUpdate(&newEvent.ObjectMeta, &oldEvent.ObjectMeta, field.NewPath("metadata"))...) + // if the series was modified, validate the new data + if !reflect.DeepEqual(newEvent.Series, oldEvent.Series) { + allErrs = append(allErrs, validateV1EventSeries(newEvent)...) + } + + allErrs = append(allErrs, ValidateImmutableField(newEvent.InvolvedObject, oldEvent.InvolvedObject, field.NewPath("involvedObject"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.Reason, oldEvent.Reason, field.NewPath("reason"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.Message, oldEvent.Message, field.NewPath("message"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.Source, oldEvent.Source, field.NewPath("source"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.FirstTimestamp, oldEvent.FirstTimestamp, field.NewPath("firstTimestamp"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.LastTimestamp, oldEvent.LastTimestamp, field.NewPath("lastTimestamp"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.Count, oldEvent.Count, field.NewPath("count"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.Reason, oldEvent.Reason, field.NewPath("reason"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.Type, oldEvent.Type, field.NewPath("type"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.EventTime, oldEvent.EventTime, field.NewPath("eventTime"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.Action, oldEvent.Action, field.NewPath("action"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.Related, oldEvent.Related, field.NewPath("related"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.ReportingController, oldEvent.ReportingController, field.NewPath("reportingController"))...) + allErrs = append(allErrs, ValidateImmutableField(newEvent.ReportingInstance, oldEvent.ReportingInstance, field.NewPath("reportingInstance"))...) + + return allErrs +} + +func validateV1EventSeries(event *core.Event) field.ErrorList { + allErrs := field.ErrorList{} + zeroTime := time.Time{} + if event.Series != nil { + if event.Series.Count < 2 { + allErrs = append(allErrs, field.Invalid(field.NewPath("series.count"), "", fmt.Sprintf("should be at least 2"))) + } + if event.Series.LastObservedTime.Time == zeroTime { + allErrs = append(allErrs, field.Required(field.NewPath("series.lastObservedTime"), "")) + } + } + return allErrs +} + +// legacyValidateEvent makes sure that the event makes sense. +func legacyValidateEvent(event *core.Event) field.ErrorList { allErrs := field.ErrorList{} // Because go zeroTime := time.Time{} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go index 3daeb139d59..87e946293df 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go @@ -29,7 +29,7 @@ import ( "unicode" "unicode/utf8" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" @@ -37,6 +37,7 @@ import ( apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" unversionedvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" + v1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/intstr" @@ -173,7 +174,7 @@ func ValidatePodSpecificAnnotationUpdates(newPod, oldPod *core.Pod, fldPath *fie if newVal, exists := newAnnotations[k]; exists && newVal == oldVal { continue // No change. } - if strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) { + if strings.HasPrefix(k, v1.AppArmorBetaContainerAnnotationKeyPrefix) { allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "may not remove or update AppArmor annotations")) } if k == core.MirrorPodAnnotationKey { @@ -185,7 +186,7 @@ func ValidatePodSpecificAnnotationUpdates(newPod, oldPod *core.Pod, fldPath *fie if _, ok := oldAnnotations[k]; ok { continue // No change. } - if strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) { + if strings.HasPrefix(k, v1.AppArmorBetaContainerAnnotationKeyPrefix) { allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "may not add AppArmor annotations")) } if k == core.MirrorPodAnnotationKey { @@ -349,15 +350,26 @@ func ValidateObjectMetaUpdate(newMeta, oldMeta *metav1.ObjectMeta, fldPath *fiel return allErrs } -func ValidateVolumes(volumes []core.Volume, fldPath *field.Path) (map[string]core.VolumeSource, field.ErrorList) { +func ValidateVolumes(volumes []core.Volume, podMeta *metav1.ObjectMeta, fldPath *field.Path) (map[string]core.VolumeSource, field.ErrorList) { allErrs := field.ErrorList{} allNames := sets.String{} + allCreatedPVCs := sets.String{} + // Determine which PVCs will be created for this pod. We need + // the exact name of the pod for this. Without it, this sanity + // check has to be skipped. + if podMeta != nil && podMeta.Name != "" { + for _, vol := range volumes { + if vol.VolumeSource.Ephemeral != nil { + allCreatedPVCs.Insert(podMeta.Name + "-" + vol.Name) + } + } + } vols := make(map[string]core.VolumeSource) for i, vol := range volumes { idxPath := fldPath.Index(i) namePath := idxPath.Child("name") - el := validateVolumeSource(&vol.VolumeSource, idxPath, vol.Name) + el := validateVolumeSource(&vol.VolumeSource, idxPath, vol.Name, podMeta) if len(vol.Name) == 0 { el = append(el, field.Required(namePath, "")) } else { @@ -372,8 +384,14 @@ func ValidateVolumes(volumes []core.Volume, fldPath *field.Path) (map[string]cor } else { allErrs = append(allErrs, el...) } - + // A PersistentVolumeClaimSource should not reference a created PVC. That doesn't + // make sense. + if vol.PersistentVolumeClaim != nil && allCreatedPVCs.Has(vol.PersistentVolumeClaim.ClaimName) { + allErrs = append(allErrs, field.Invalid(idxPath.Child("persistentVolumeClaim").Child("claimName"), vol.PersistentVolumeClaim.ClaimName, + "must not reference a PVC that gets created for an ephemeral volume")) + } } + return vols, allErrs } @@ -428,7 +446,7 @@ func devicePathAlreadyExists(devicePath string, mounts map[string]string) bool { return false } -func validateVolumeSource(source *core.VolumeSource, fldPath *field.Path, volName string) field.ErrorList { +func validateVolumeSource(source *core.VolumeSource, fldPath *field.Path, volName string, podMeta *metav1.ObjectMeta) field.ErrorList { numVolumes := 0 allErrs := field.ErrorList{} if source.EmptyDir != nil { @@ -659,6 +677,23 @@ func validateVolumeSource(source *core.VolumeSource, fldPath *field.Path, volNam allErrs = append(allErrs, validateCSIVolumeSource(source.CSI, fldPath.Child("csi"))...) } } + if source.Ephemeral != nil { + if numVolumes > 0 { + allErrs = append(allErrs, field.Forbidden(fldPath.Child("ephemeral"), "may not specify more than 1 volume type")) + } else { + numVolumes++ + allErrs = append(allErrs, validateEphemeralVolumeSource(source.Ephemeral, fldPath.Child("ephemeral"))...) + // Check the expected name for the PVC. This gets skipped if information is missing, + // because that already gets flagged as a problem elsewhere. For example, + // ValidateObjectMeta as called by validatePodMetadataAndSpec checks that the name is set. + if podMeta != nil && podMeta.Name != "" && volName != "" { + pvcName := podMeta.Name + "-" + volName + for _, msg := range ValidatePersistentVolumeName(pvcName, false) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), volName, fmt.Sprintf("PVC name %q: %v", pvcName, msg))) + } + } + } + } if numVolumes == 0 { allErrs = append(allErrs, field.Required(fldPath, "must specify a volume type")) @@ -1552,6 +1587,41 @@ func validateCSIVolumeSource(csi *core.CSIVolumeSource, fldPath *field.Path) fie return allErrs } +func validateEphemeralVolumeSource(ephemeral *core.EphemeralVolumeSource, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + if ephemeral.VolumeClaimTemplate == nil { + allErrs = append(allErrs, field.Required(fldPath.Child("volumeClaimTemplate"), "")) + } else { + allErrs = append(allErrs, ValidatePersistentVolumeClaimTemplate(ephemeral.VolumeClaimTemplate, fldPath.Child("volumeClaimTemplate"))...) + } + return allErrs +} + +// ValidatePersistentVolumeClaimTemplate verifies that the embedded object meta and spec are valid. +// Checking of the object data is very minimal because only labels and annotations are used. +func ValidatePersistentVolumeClaimTemplate(claimTemplate *core.PersistentVolumeClaimTemplate, fldPath *field.Path) field.ErrorList { + allErrs := validatePersistentVolumeClaimTemplateObjectMeta(&claimTemplate.ObjectMeta, fldPath.Child("metadata")) + allErrs = append(allErrs, ValidatePersistentVolumeClaimSpec(&claimTemplate.Spec, fldPath.Child("spec"))...) + return allErrs +} + +func validatePersistentVolumeClaimTemplateObjectMeta(objMeta *metav1.ObjectMeta, fldPath *field.Path) field.ErrorList { + allErrs := apimachineryvalidation.ValidateAnnotations(objMeta.Annotations, fldPath.Child("annotations")) + allErrs = append(allErrs, v1validation.ValidateLabels(objMeta.Labels, fldPath.Child("labels"))...) + // All other fields are not supported and thus must not be set + // to avoid confusion. We could reject individual fields, + // but then adding a new one to ObjectMeta wouldn't be checked + // unless this code gets updated. Instead, we ensure that + // only allowed fields are set via reflection. + allErrs = append(allErrs, validateFieldAllowList(*objMeta, allowedPVCTemplateObjectMetaFields, "cannot be set for an ephemeral volume", fldPath)...) + return allErrs +} + +var allowedPVCTemplateObjectMetaFields = map[string]bool{ + "Annotations": true, + "Labels": true, +} + // ValidatePersistentVolumeName checks that a name is appropriate for a // PersistentVolumeName object. var ValidatePersistentVolumeName = apimachineryvalidation.NameIsDNSSubdomain @@ -1857,7 +1927,8 @@ func ValidatePersistentVolumeUpdate(newPv, oldPv *core.PersistentVolume) field.E // PersistentVolumeSource should be immutable after creation. if !apiequality.Semantic.DeepEqual(newPv.Spec.PersistentVolumeSource, oldPv.Spec.PersistentVolumeSource) { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "persistentvolumesource"), "is immutable after creation")) + pvcSourceDiff := diff.ObjectDiff(newPv.Spec.PersistentVolumeSource, oldPv.Spec.PersistentVolumeSource) + allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "persistentvolumesource"), fmt.Sprintf("spec.persistentvolumesource is immutable after creation\n%v", pvcSourceDiff))) } allErrs = append(allErrs, ValidateImmutableField(newPv.Spec.VolumeMode, oldPv.Spec.VolumeMode, field.NewPath("volumeMode"))...) @@ -1972,7 +2043,8 @@ func ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc *core.PersistentVolumeCl newSize := newPvc.Spec.Resources.Requests["storage"] if !apiequality.Semantic.DeepEqual(newPvcClone.Spec, oldPvcClone.Spec) { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "is immutable after creation except resources.requests for bound claims")) + specDiff := diff.ObjectDiff(newPvcClone.Spec, oldPvcClone.Spec) + allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), fmt.Sprintf("spec is immutable after creation except resources.requests for bound claims\n%v", specDiff))) } if newSize.Cmp(oldSize) < 0 { allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "resources", "requests", "storage"), "field can not be less than previous value")) @@ -1982,7 +2054,8 @@ func ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc *core.PersistentVolumeCl // changes to Spec are not allowed, but updates to label/and some annotations are OK. // no-op updates pass validation. if !apiequality.Semantic.DeepEqual(newPvcClone.Spec, oldPvcClone.Spec) { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "field is immutable after creation")) + specDiff := diff.ObjectDiff(newPvcClone.Spec, oldPvcClone.Spec) + allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), fmt.Sprintf("field is immutable after creation\n%v", specDiff))) } } @@ -2644,21 +2717,31 @@ func validateEphemeralContainers(ephemeralContainers []core.EphemeralContainer, } // Ephemeral Containers should not be relied upon for fundamental pod services, so fields such as - // Lifecycle, probes, resources and ports should be disallowed. This is implemented as a whitelist - // so that new fields will be given consideration prior to inclusion in Ephemeral Containers. - specType, specValue := reflect.TypeOf(ec.EphemeralContainerCommon), reflect.ValueOf(ec.EphemeralContainerCommon) - for i := 0; i < specType.NumField(); i++ { - f := specType.Field(i) - if allowedEphemeralContainerFields[f.Name] { - continue - } + // Lifecycle, probes, resources and ports should be disallowed. This is implemented as a list + // of allowed fields so that new fields will be given consideration prior to inclusion in Ephemeral Containers. + allErrs = append(allErrs, validateFieldAllowList(ec.EphemeralContainerCommon, allowedEphemeralContainerFields, "cannot be set for an Ephemeral Container", idxPath)...) + } - // Compare the value of this field to its zero value to determine if it has been set - if !reflect.DeepEqual(specValue.Field(i).Interface(), reflect.Zero(f.Type).Interface()) { - r, n := utf8.DecodeRuneInString(f.Name) - lcName := string(unicode.ToLower(r)) + f.Name[n:] - allErrs = append(allErrs, field.Forbidden(idxPath.Child(lcName), "cannot be set for an Ephemeral Container")) - } + return allErrs +} + +// validateFieldAcceptList checks that only allowed fields are set. +// The value must be a struct (not a pointer to a struct!). +func validateFieldAllowList(value interface{}, allowedFields map[string]bool, errorText string, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + + reflectType, reflectValue := reflect.TypeOf(value), reflect.ValueOf(value) + for i := 0; i < reflectType.NumField(); i++ { + f := reflectType.Field(i) + if allowedFields[f.Name] { + continue + } + + // Compare the value of this field to its zero value to determine if it has been set + if !reflect.DeepEqual(reflectValue.Field(i).Interface(), reflect.Zero(f.Type).Interface()) { + r, n := utf8.DecodeRuneInString(f.Name) + lcName := string(unicode.ToLower(r)) + f.Name[n:] + allErrs = append(allErrs, field.Forbidden(fldPath.Child(lcName), errorText)) } } @@ -3110,12 +3193,13 @@ func ValidatePodSingleHugePageResources(pod *core.Pod, specPath *field.Path) fie return allErrs } -// ValidatePod tests if required fields in the pod are set. -func ValidatePod(pod *core.Pod, opts PodValidationOptions) field.ErrorList { +// validatePodMetadataAndSpec tests if required fields in the pod.metadata and pod.spec are set, +// and is called by ValidatePodCreate and ValidatePodUpdate. +func validatePodMetadataAndSpec(pod *core.Pod, opts PodValidationOptions) field.ErrorList { fldPath := field.NewPath("metadata") allErrs := ValidateObjectMeta(&pod.ObjectMeta, true, ValidatePodName, fldPath) allErrs = append(allErrs, ValidatePodSpecificAnnotations(pod.ObjectMeta.Annotations, &pod.Spec, fldPath.Child("annotations"))...) - allErrs = append(allErrs, ValidatePodSpec(&pod.Spec, field.NewPath("spec"))...) + allErrs = append(allErrs, ValidatePodSpec(&pod.Spec, &pod.ObjectMeta, field.NewPath("spec"))...) // we do additional validation only pertinent for pods and not pod templates // this was done to preserve backwards compatibility @@ -3142,6 +3226,13 @@ func ValidatePod(pod *core.Pod, opts PodValidationOptions) field.ErrorList { allErrs = append(allErrs, ValidatePodSingleHugePageResources(pod, specPath)...) } + return allErrs +} + +// validatePodIPs validates IPs in pod status +func validatePodIPs(pod *core.Pod) field.ErrorList { + allErrs := field.ErrorList{} + podIPsField := field.NewPath("status", "podIPs") // all PodIPs must be valid IPs @@ -3187,10 +3278,12 @@ func ValidatePod(pod *core.Pod, opts PodValidationOptions) field.ErrorList { // This includes checking formatting and uniqueness. It also canonicalizes the // structure by setting default values and implementing any backwards-compatibility // tricks. -func ValidatePodSpec(spec *core.PodSpec, fldPath *field.Path) field.ErrorList { +// The pod metadata is needed to validate generic ephemeral volumes. It is optional +// and should be left empty unless the spec is from a real pod object. +func ValidatePodSpec(spec *core.PodSpec, podMeta *metav1.ObjectMeta, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} - vols, vErrs := ValidateVolumes(spec.Volumes, fldPath.Child("volumes")) + vols, vErrs := ValidateVolumes(spec.Volumes, podMeta, fldPath.Child("volumes")) allErrs = append(allErrs, vErrs...) allErrs = append(allErrs, validateContainers(spec.Containers, false, vols, fldPath.Child("containers"))...) allErrs = append(allErrs, validateInitContainers(spec.InitContainers, spec.Containers, vols, fldPath.Child("initContainers"))...) @@ -3539,15 +3632,40 @@ func validatePodAffinity(podAffinity *core.PodAffinity, fldPath *field.Path) fie return allErrs } +func validateSeccompProfileField(sp *core.SeccompProfile, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + if sp == nil { + return allErrs + } + + if err := validateSeccompProfileType(fldPath.Child("type"), sp.Type); err != nil { + allErrs = append(allErrs, err) + } + + if sp.Type == core.SeccompProfileTypeLocalhost { + if sp.LocalhostProfile == nil { + allErrs = append(allErrs, field.Required(fldPath.Child("localhostProfile"), "must be set when seccomp type is Localhost")) + } else { + allErrs = append(allErrs, validateLocalDescendingPath(*sp.LocalhostProfile, fldPath.Child("localhostProfile"))...) + } + } else { + if sp.LocalhostProfile != nil { + allErrs = append(allErrs, field.Invalid(fldPath.Child("localhostProfile"), sp, "can only be set when seccomp type is Localhost")) + } + } + + return allErrs +} + func ValidateSeccompProfile(p string, fldPath *field.Path) field.ErrorList { if p == core.SeccompProfileRuntimeDefault || p == core.DeprecatedSeccompProfileDockerDefault { return nil } - if p == "unconfined" { + if p == v1.SeccompProfileNameUnconfined { return nil } - if strings.HasPrefix(p, "localhost/") { - return validateLocalDescendingPath(strings.TrimPrefix(p, "localhost/"), fldPath) + if strings.HasPrefix(p, v1.SeccompLocalhostProfileNamePrefix) { + return validateLocalDescendingPath(strings.TrimPrefix(p, v1.SeccompLocalhostProfileNamePrefix), fldPath) } return field.ErrorList{field.Invalid(fldPath, p, "must be a valid seccomp profile")} } @@ -3566,13 +3684,25 @@ func ValidateSeccompPodAnnotations(annotations map[string]string, fldPath *field return allErrs } +// ValidateSeccompProfileType tests that the argument is a valid SeccompProfileType. +func validateSeccompProfileType(fldPath *field.Path, seccompProfileType core.SeccompProfileType) *field.Error { + switch seccompProfileType { + case core.SeccompProfileTypeLocalhost, core.SeccompProfileTypeRuntimeDefault, core.SeccompProfileTypeUnconfined: + return nil + case "": + return field.Required(fldPath, "type is required when seccompProfile is set") + default: + return field.NotSupported(fldPath, seccompProfileType, []string{string(core.SeccompProfileTypeLocalhost), string(core.SeccompProfileTypeRuntimeDefault), string(core.SeccompProfileTypeUnconfined)}) + } +} + func ValidateAppArmorPodAnnotations(annotations map[string]string, spec *core.PodSpec, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} for k, p := range annotations { - if !strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) { + if !strings.HasPrefix(k, v1.AppArmorBetaContainerAnnotationKeyPrefix) { continue } - containerName := strings.TrimPrefix(k, apparmor.ContainerAnnotationKeyPrefix) + containerName := strings.TrimPrefix(k, v1.AppArmorBetaContainerAnnotationKeyPrefix) if !podSpecHasContainer(spec, containerName) { allErrs = append(allErrs, field.Invalid(fldPath.Key(k), containerName, "container not found")) } @@ -3587,7 +3717,7 @@ func ValidateAppArmorPodAnnotations(annotations map[string]string, spec *core.Po func podSpecHasContainer(spec *core.PodSpec, containerName string) bool { var hasContainer bool - podshelper.VisitContainersWithPath(spec, func(c *core.Container, _ *field.Path) bool { + podshelper.VisitContainersWithPath(spec, field.NewPath("spec"), func(c *core.Container, _ *field.Path) bool { if c.Name == containerName { hasContainer = true return false @@ -3673,6 +3803,7 @@ func ValidatePodSecurityContext(securityContext *core.PodSecurityContext, spec * allErrs = append(allErrs, validateFSGroupChangePolicy(securityContext.FSGroupChangePolicy, fldPath.Child("fsGroupChangePolicy"))...) } + allErrs = append(allErrs, validateSeccompProfileField(securityContext.SeccompProfile, fldPath.Child("seccompProfile"))...) allErrs = append(allErrs, validateWindowsSecurityContextOptions(securityContext.WindowsOptions, fldPath.Child("windowsOptions"))...) } @@ -3702,22 +3833,90 @@ func ValidateContainerUpdates(newContainers, oldContainers []core.Container, fld // ValidatePodCreate validates a pod in the context of its initial create func ValidatePodCreate(pod *core.Pod, opts PodValidationOptions) field.ErrorList { - allErrs := ValidatePod(pod, opts) + allErrs := validatePodMetadataAndSpec(pod, opts) fldPath := field.NewPath("spec") // EphemeralContainers can only be set on update using the ephemeralcontainers subresource if len(pod.Spec.EphemeralContainers) > 0 { allErrs = append(allErrs, field.Forbidden(fldPath.Child("ephemeralContainers"), "cannot be set on create")) } + allErrs = append(allErrs, validateSeccompAnnotationsAndFields(pod.ObjectMeta, &pod.Spec, fldPath)...) return allErrs } +// ValidateSeccompAnnotationsAndFields iterates through all containers and ensure that when both seccompProfile and seccomp annotations exist they match. +func validateSeccompAnnotationsAndFields(objectMeta metav1.ObjectMeta, podSpec *core.PodSpec, specPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + if podSpec.SecurityContext != nil && podSpec.SecurityContext.SeccompProfile != nil { + // If both seccomp annotations and fields are specified, the values must match. + if annotation, found := objectMeta.Annotations[v1.SeccompPodAnnotationKey]; found { + seccompPath := specPath.Child("securityContext").Child("seccompProfile") + err := validateSeccompAnnotationsAndFieldsMatch(annotation, podSpec.SecurityContext.SeccompProfile, seccompPath) + if err != nil { + allErrs = append(allErrs, err) + } + } + } + + podshelper.VisitContainersWithPath(podSpec, specPath, func(c *core.Container, cFldPath *field.Path) bool { + var field *core.SeccompProfile + if c.SecurityContext != nil { + field = c.SecurityContext.SeccompProfile + } + + if field == nil { + return true + } + + key := v1.SeccompContainerAnnotationKeyPrefix + c.Name + if annotation, found := objectMeta.Annotations[key]; found { + seccompPath := cFldPath.Child("securityContext").Child("seccompProfile") + err := validateSeccompAnnotationsAndFieldsMatch(annotation, field, seccompPath) + if err != nil { + allErrs = append(allErrs, err) + } + } + return true + }) + + return allErrs +} + +func validateSeccompAnnotationsAndFieldsMatch(annotationValue string, seccompField *core.SeccompProfile, fldPath *field.Path) *field.Error { + if seccompField == nil { + return nil + } + + switch seccompField.Type { + case core.SeccompProfileTypeUnconfined: + if annotationValue != v1.SeccompProfileNameUnconfined { + return field.Forbidden(fldPath.Child("type"), "seccomp type in annotation and field must match") + } + + case core.SeccompProfileTypeRuntimeDefault: + if annotationValue != v1.SeccompProfileRuntimeDefault && annotationValue != v1.DeprecatedSeccompProfileDockerDefault { + return field.Forbidden(fldPath.Child("type"), "seccomp type in annotation and field must match") + } + + case core.SeccompProfileTypeLocalhost: + if !strings.HasPrefix(annotationValue, v1.SeccompLocalhostProfileNamePrefix) { + return field.Forbidden(fldPath.Child("type"), "seccomp type in annotation and field must match") + } else if seccompField.LocalhostProfile == nil || strings.TrimPrefix(annotationValue, v1.SeccompLocalhostProfileNamePrefix) != *seccompField.LocalhostProfile { + return field.Forbidden(fldPath.Child("localhostProfile"), "seccomp profile in annotation and field must match") + } + } + + return nil +} + // ValidatePodUpdate tests to see if the update is legal for an end user to make. newPod is updated with fields // that cannot be changed. func ValidatePodUpdate(newPod, oldPod *core.Pod, opts PodValidationOptions) field.ErrorList { fldPath := field.NewPath("metadata") allErrs := ValidateObjectMetaUpdate(&newPod.ObjectMeta, &oldPod.ObjectMeta, fldPath) + allErrs = append(allErrs, validatePodMetadataAndSpec(newPod, opts)...) allErrs = append(allErrs, ValidatePodSpecificAnnotationUpdates(newPod, oldPod, fldPath.Child("annotations"))...) specPath := field.NewPath("spec") @@ -3847,6 +4046,14 @@ func ValidatePodStatusUpdate(newPod, oldPod *core.Pod) field.ErrorList { allErrs = append(allErrs, ValidateContainerStateTransition(newPod.Status.ContainerStatuses, oldPod.Status.ContainerStatuses, fldPath.Child("containerStatuses"), oldPod.Spec.RestartPolicy)...) allErrs = append(allErrs, ValidateContainerStateTransition(newPod.Status.InitContainerStatuses, oldPod.Status.InitContainerStatuses, fldPath.Child("initContainerStatuses"), oldPod.Spec.RestartPolicy)...) + if newIPErrs := validatePodIPs(newPod); len(newIPErrs) > 0 { + // Tolerate IP errors if IP errors already existed in the old pod. See http://issue.k8s.io/90625 + // TODO(liggitt): Drop the check of oldPod in 1.20 + if oldIPErrs := validatePodIPs(oldPod); len(oldIPErrs) == 0 { + allErrs = append(allErrs, newIPErrs...) + } + } + // For status update we ignore changes to pod spec. newPod.Spec = oldPod.Spec @@ -3931,7 +4138,6 @@ func ValidatePodTemplateUpdate(newPod, oldPod *core.PodTemplate) field.ErrorList var supportedSessionAffinityType = sets.NewString(string(core.ServiceAffinityClientIP), string(core.ServiceAffinityNone)) var supportedServiceType = sets.NewString(string(core.ServiceTypeClusterIP), string(core.ServiceTypeNodePort), string(core.ServiceTypeLoadBalancer), string(core.ServiceTypeExternalName)) -var supportedServiceIPFamily = sets.NewString(string(core.IPv4Protocol), string(core.IPv6Protocol)) // ValidateService tests if required fields/annotations of a Service are valid. func ValidateService(service *core.Service, allowAppProtocol bool) field.ErrorList { @@ -4132,21 +4338,6 @@ func ValidateService(service *core.Service, allowAppProtocol bool) field.ErrorLi } } - //if an ipfamily provided then it has to be one of the supported values - // note: - // - we don't validate service.Spec.IPFamily is supported by the cluster - // - we don't validate service.Spec.ClusterIP is within a range supported by the cluster - // both of these validations are done by the ipallocator - - // if the gate is on this field is required (and defaulted by REST if not provided by user) - if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) && service.Spec.IPFamily == nil { - allErrs = append(allErrs, field.Required(specPath.Child("ipFamily"), "")) - } - - if service.Spec.IPFamily != nil && !supportedServiceIPFamily.Has(string(*service.Spec.IPFamily)) { - allErrs = append(allErrs, field.NotSupported(specPath.Child("ipFamily"), service.Spec.IPFamily, supportedServiceIPFamily.List())) - } - allErrs = append(allErrs, validateServiceExternalTrafficFieldsValue(service)...) return allErrs } @@ -4255,19 +4446,12 @@ func ValidateServiceCreate(service *core.Service) field.ErrorList { func ValidateServiceUpdate(service, oldService *core.Service) field.ErrorList { allErrs := ValidateObjectMetaUpdate(&service.ObjectMeta, &oldService.ObjectMeta, field.NewPath("metadata")) - // ClusterIP and IPFamily should be immutable for services using it (every type other than ExternalName) + // ClusterIP should be immutable for services using it (every type other than ExternalName) // which do not have ClusterIP assigned yet (empty string value) if service.Spec.Type != core.ServiceTypeExternalName { if oldService.Spec.Type != core.ServiceTypeExternalName && oldService.Spec.ClusterIP != "" { allErrs = append(allErrs, ValidateImmutableField(service.Spec.ClusterIP, oldService.Spec.ClusterIP, field.NewPath("spec", "clusterIP"))...) } - // notes: - // we drop the IPFamily field when the Dualstack gate is off. - // once the gate is on, we start assigning default ipfamily according to cluster settings. in other words - // though the field is immutable, we allow (onetime) change from nil==> to value - if oldService.Spec.IPFamily != nil { - allErrs = append(allErrs, ValidateImmutableField(service.Spec.IPFamily, oldService.Spec.IPFamily, field.NewPath("spec", "ipFamily"))...) - } } // allow AppProtocol value if the feature gate is set or the field is @@ -4391,7 +4575,8 @@ func ValidatePodTemplateSpec(spec *core.PodTemplateSpec, fldPath *field.Path) fi allErrs = append(allErrs, unversionedvalidation.ValidateLabels(spec.Labels, fldPath.Child("labels"))...) allErrs = append(allErrs, ValidateAnnotations(spec.Annotations, fldPath.Child("annotations"))...) allErrs = append(allErrs, ValidatePodSpecificAnnotations(spec.Annotations, &spec.Spec, fldPath.Child("annotations"))...) - allErrs = append(allErrs, ValidatePodSpec(&spec.Spec, fldPath.Child("spec"))...) + allErrs = append(allErrs, ValidatePodSpec(&spec.Spec, nil, fldPath.Child("spec"))...) + allErrs = append(allErrs, validateSeccompAnnotationsAndFields(spec.ObjectMeta, &spec.Spec, fldPath.Child("spec"))...) if len(spec.Spec.EphemeralContainers) > 0 { allErrs = append(allErrs, field.Forbidden(fldPath.Child("spec", "ephemeralContainers"), "ephemeral containers not allowed in pod template")) @@ -4479,15 +4664,8 @@ func ValidateNodeSpecificAnnotations(annotations map[string]string, fldPath *fie return allErrs } -// NodeValidationOptions contains the different settings for node validation -type NodeValidationOptions struct { - // Should node a spec containing more than one huge page resource (with different sizes) - // with pre-allocated memory trigger validation errors - ValidateSingleHugePageResource bool -} - // ValidateNode tests if required fields in the node are set. -func ValidateNode(node *core.Node, opts NodeValidationOptions) field.ErrorList { +func ValidateNode(node *core.Node) field.ErrorList { fldPath := field.NewPath("metadata") allErrs := ValidateObjectMeta(&node.ObjectMeta, false, ValidateNodeName, fldPath) allErrs = append(allErrs, ValidateNodeSpecificAnnotations(node.ObjectMeta.Annotations, fldPath.Child("annotations"))...) @@ -4498,7 +4676,7 @@ func ValidateNode(node *core.Node, opts NodeValidationOptions) field.ErrorList { // Only validate spec. // All status fields are optional and can be updated later. // That said, if specified, we need to ensure they are valid. - allErrs = append(allErrs, ValidateNodeResources(node, opts)...) + allErrs = append(allErrs, ValidateNodeResources(node)...) // validate PodCIDRS only if we need to if len(node.Spec.PodCIDRs) > 0 { @@ -4538,11 +4716,8 @@ func ValidateNode(node *core.Node, opts NodeValidationOptions) field.ErrorList { } // ValidateNodeResources is used to make sure a node has valid capacity and allocatable values. -func ValidateNodeResources(node *core.Node, opts NodeValidationOptions) field.ErrorList { +func ValidateNodeResources(node *core.Node) field.ErrorList { allErrs := field.ErrorList{} - if opts.ValidateSingleHugePageResource { - allErrs = append(allErrs, ValidateNodeSingleHugePageResources(node)...) - } // Validate resource quantities in capacity. for k, v := range node.Status.Capacity { @@ -4558,38 +4733,8 @@ func ValidateNodeResources(node *core.Node, opts NodeValidationOptions) field.Er return allErrs } -// ValidateNodeHugePageResources is used to make sure a node has valid capacity and allocatable values for the huge page resources. -func ValidateNodeSingleHugePageResources(node *core.Node) field.ErrorList { - allErrs := field.ErrorList{} - // Validate resource quantities in capacity. - hugePageSizes := sets.NewString() - for k, v := range node.Status.Capacity { - resPath := field.NewPath("status", "capacity", string(k)) - // track any huge page size that has a positive value - if helper.IsHugePageResourceName(k) && v.Value() > int64(0) { - hugePageSizes.Insert(string(k)) - } - if len(hugePageSizes) > 1 { - allErrs = append(allErrs, field.Invalid(resPath, v, "may not have pre-allocated hugepages for multiple page sizes")) - } - } - // Validate resource quantities in allocatable. - hugePageSizes = sets.NewString() - for k, v := range node.Status.Allocatable { - resPath := field.NewPath("status", "allocatable", string(k)) - // track any huge page size that has a positive value - if helper.IsHugePageResourceName(k) && v.Value() > int64(0) { - hugePageSizes.Insert(string(k)) - } - if len(hugePageSizes) > 1 { - allErrs = append(allErrs, field.Invalid(resPath, v, "may not have pre-allocated hugepages for multiple page sizes")) - } - } - return allErrs -} - // ValidateNodeUpdate tests to make sure a node update can be applied. Modifies oldNode. -func ValidateNodeUpdate(node, oldNode *core.Node, opts NodeValidationOptions) field.ErrorList { +func ValidateNodeUpdate(node, oldNode *core.Node) field.ErrorList { fldPath := field.NewPath("metadata") allErrs := ValidateObjectMetaUpdate(&node.ObjectMeta, &oldNode.ObjectMeta, fldPath) allErrs = append(allErrs, ValidateNodeSpecificAnnotations(node.ObjectMeta.Annotations, fldPath.Child("annotations"))...) @@ -4600,7 +4745,7 @@ func ValidateNodeUpdate(node, oldNode *core.Node, opts NodeValidationOptions) fi // allErrs = append(allErrs, field.Invalid("status", node.Status, "must be empty")) // } - allErrs = append(allErrs, ValidateNodeResources(node, opts)...) + allErrs = append(allErrs, ValidateNodeResources(node)...) // Validate no duplicate addresses in node status. addresses := make(map[core.NodeAddress]bool) @@ -5659,8 +5804,9 @@ func ValidateSecurityContext(sc *core.SecurityContext, fldPath *field.Path) fiel if err := ValidateProcMountType(fldPath.Child("procMount"), *sc.ProcMount); err != nil { allErrs = append(allErrs, err) } - } + } + allErrs = append(allErrs, validateSeccompProfileField(sc.SeccompProfile, fldPath.Child("seccompProfile"))...) if sc.AllowPrivilegeEscalation != nil && !*sc.AllowPrivilegeEscalation { if sc.Privileged != nil && *sc.Privileged { allErrs = append(allErrs, field.Invalid(fldPath, sc, "cannot set `allowPrivilegeEscalation` to false and `privileged` to true")) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go index 1951d5e277b..b3e0a053a8b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go @@ -1433,6 +1433,27 @@ func (in *EphemeralContainers) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EphemeralVolumeSource) DeepCopyInto(out *EphemeralVolumeSource) { + *out = *in + if in.VolumeClaimTemplate != nil { + in, out := &in.VolumeClaimTemplate, &out.VolumeClaimTemplate + *out = new(PersistentVolumeClaimTemplate) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralVolumeSource. +func (in *EphemeralVolumeSource) DeepCopy() *EphemeralVolumeSource { + if in == nil { + return nil + } + out := new(EphemeralVolumeSource) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Event) DeepCopyInto(out *Event) { *out = *in @@ -2987,6 +3008,24 @@ func (in *PersistentVolumeClaimStatus) DeepCopy() *PersistentVolumeClaimStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PersistentVolumeClaimTemplate) DeepCopyInto(out *PersistentVolumeClaimTemplate) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimTemplate. +func (in *PersistentVolumeClaimTemplate) DeepCopy() *PersistentVolumeClaimTemplate { + if in == nil { + return nil + } + out := new(PersistentVolumeClaimTemplate) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PersistentVolumeClaimVolumeSource) DeepCopyInto(out *PersistentVolumeClaimVolumeSource) { *out = *in @@ -3701,6 +3740,11 @@ func (in *PodSecurityContext) DeepCopyInto(out *PodSecurityContext) { *out = make([]Sysctl, len(*in)) copy(*out, *in) } + if in.SeccompProfile != nil { + in, out := &in.SeccompProfile, &out.SeccompProfile + *out = new(SeccompProfile) + (*in).DeepCopyInto(*out) + } return } @@ -3798,6 +3842,11 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) { *out = make([]LocalObjectReference, len(*in)) copy(*out, *in) } + if in.SetHostnameAsFQDN != nil { + in, out := &in.SetHostnameAsFQDN, &out.SetHostnameAsFQDN + *out = new(bool) + **out = **in + } if in.Affinity != nil { in, out := &in.Affinity, &out.Affinity *out = new(Affinity) @@ -4672,6 +4721,27 @@ func (in *ScopedResourceSelectorRequirement) DeepCopy() *ScopedResourceSelectorR return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SeccompProfile) DeepCopyInto(out *SeccompProfile) { + *out = *in + if in.LocalhostProfile != nil { + in, out := &in.LocalhostProfile, &out.LocalhostProfile + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SeccompProfile. +func (in *SeccompProfile) DeepCopy() *SeccompProfile { + if in == nil { + return nil + } + out := new(SeccompProfile) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Secret) DeepCopyInto(out *Secret) { *out = *in @@ -4926,6 +4996,11 @@ func (in *SecurityContext) DeepCopyInto(out *SecurityContext) { *out = new(ProcMountType) **out = **in } + if in.SeccompProfile != nil { + in, out := &in.SeccompProfile, &out.SeccompProfile + *out = new(SeccompProfile) + (*in).DeepCopyInto(*out) + } return } @@ -5712,6 +5787,11 @@ func (in *VolumeSource) DeepCopyInto(out *VolumeSource) { *out = new(CSIVolumeSource) (*in).DeepCopyInto(*out) } + if in.Ephemeral != nil { + in, out := &in.Ephemeral, &out.Ephemeral + *out = new(EphemeralVolumeSource) + (*in).DeepCopyInto(*out) + } return } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/discovery/types.go b/vendor/k8s.io/kubernetes/pkg/apis/discovery/types.go index f99f3cf9217..9cc410cc806 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/discovery/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/discovery/types.go @@ -154,6 +154,5 @@ type EndpointSliceList struct { // +optional metav1.ListMeta // List of endpoint slices - // +listType=set Items []EndpointSlice } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/events/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/events/BUILD index 6169e57d7b0..08a52aa8ebf 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/events/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/BUILD @@ -27,6 +27,7 @@ filegroup( srcs = [ ":package-srcs", "//pkg/apis/events/install:all-srcs", + "//pkg/apis/events/v1:all-srcs", "//pkg/apis/events/v1beta1:all-srcs", ], tags = ["automanaged"], diff --git a/vendor/k8s.io/kubernetes/pkg/apis/events/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/events/install/BUILD index e31fdf8604a..e4c19fb4ae6 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/events/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/install/BUILD @@ -8,6 +8,7 @@ go_library( deps = [ "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/events:go_default_library", + "//pkg/apis/events/v1:go_default_library", "//pkg/apis/events/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/events/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/events/install/install.go index 28ac59e9170..71ce8a7060e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/events/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/install/install.go @@ -23,6 +23,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/events" + "k8s.io/kubernetes/pkg/apis/events/v1" "k8s.io/kubernetes/pkg/apis/events/v1beta1" ) @@ -34,5 +35,6 @@ func init() { func Install(scheme *runtime.Scheme) { utilruntime.Must(events.AddToScheme(scheme)) utilruntime.Must(v1beta1.AddToScheme(scheme)) - utilruntime.Must(scheme.SetVersionPriority(v1beta1.SchemeGroupVersion)) + utilruntime.Must(v1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1beta1.SchemeGroupVersion, v1.SchemeGroupVersion)) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/events/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/BUILD new file mode 100644 index 00000000000..f6430d4b957 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/BUILD @@ -0,0 +1,37 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "conversion.go", + "doc.go", + "register.go", + "zz_generated.conversion.go", + "zz_generated.defaults.go", + ], + importpath = "k8s.io/kubernetes/pkg/apis/events/v1", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/core:go_default_library", + "//pkg/apis/core/v1:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/events/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/conversion.go new file mode 100644 index 00000000000..a45baf2f61f --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/conversion.go @@ -0,0 +1,87 @@ +/* +Copyright 2020 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 v1 + +import ( + "fmt" + + v1 "k8s.io/api/events/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + k8s_api "k8s.io/kubernetes/pkg/apis/core" + k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" +) + +func Convert_v1_Event_To_core_Event(in *v1.Event, out *k8s_api.Event, s conversion.Scope) error { + if err := autoConvert_v1_Event_To_core_Event(in, out, s); err != nil { + return err + } + if err := k8s_api_v1.Convert_v1_ObjectReference_To_core_ObjectReference(&in.Regarding, &out.InvolvedObject, s); err != nil { + return err + } + if err := k8s_api_v1.Convert_v1_EventSource_To_core_EventSource(&in.DeprecatedSource, &out.Source, s); err != nil { + return err + } + out.Message = in.Note + out.FirstTimestamp = in.DeprecatedFirstTimestamp + out.LastTimestamp = in.DeprecatedLastTimestamp + out.Count = in.DeprecatedCount + return nil +} + +func Convert_core_Event_To_v1_Event(in *k8s_api.Event, out *v1.Event, s conversion.Scope) error { + if err := autoConvert_core_Event_To_v1_Event(in, out, s); err != nil { + return err + } + if err := k8s_api_v1.Convert_core_ObjectReference_To_v1_ObjectReference(&in.InvolvedObject, &out.Regarding, s); err != nil { + return err + } + if err := k8s_api_v1.Convert_core_EventSource_To_v1_EventSource(&in.Source, &out.DeprecatedSource, s); err != nil { + return err + } + out.Note = in.Message + out.DeprecatedFirstTimestamp = in.FirstTimestamp + out.DeprecatedLastTimestamp = in.LastTimestamp + out.DeprecatedCount = in.Count + return nil +} + +func AddFieldLabelConversionsForEvent(scheme *runtime.Scheme) error { + mapping := map[string]string{ + "reason": "reason", + "regarding.kind": "involvedObject.kind", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.namespace": "involvedObject.namespace", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.name": "involvedObject.name", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.uid": "involvedObject.uid", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.apiVersion": "involvedObject.apiVersion", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.resourceVersion": "involvedObject.resourceVersion", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.fieldPath": "involvedObject.fieldPath", // map events.k8s.io field to fieldset returned by ToSelectableFields + "reportingController": "reportingComponent", // map events.k8s.io field to fieldset returned by ToSelectableFields + "type": "type", + "metadata.namespace": "metadata.namespace", + "metadata.name": "metadata.name", + } + return scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("Event"), + func(label, value string) (string, string, error) { + mappedLabel, ok := mapping[label] + if !ok { + return "", "", fmt.Errorf("field label not supported: %s", label) + } + return mappedLabel, value, nil + }, + ) +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/events/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/doc.go new file mode 100644 index 00000000000..a5f69e470df --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/doc.go @@ -0,0 +1,24 @@ +/* +Copyright 2020 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. +*/ + +// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/events +// +k8s:conversion-gen-external-types=k8s.io/api/events/v1 +// +k8s:defaulter-gen=TypeMeta +// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/events/v1 + +// +groupName=events.k8s.io + +package v1 // import "k8s.io/kubernetes/pkg/apis/events/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/register.go similarity index 73% rename from vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/register.go rename to vendor/k8s.io/kubernetes/pkg/apis/events/v1/register.go index a74b162b6ad..958d433d6fa 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2020 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. @@ -14,18 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1 import ( - auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1" + eventsv1 "k8s.io/api/events/v1" "k8s.io/apimachinery/pkg/runtime/schema" ) -// GroupName for audit registration -const GroupName = "auditregistration.k8s.io" +// GroupName is the group name use in this package +const GroupName = "events.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { @@ -33,14 +33,13 @@ func Resource(resource string) schema.GroupResource { } var ( - localSchemeBuilder = &auditregistrationv1alpha1.SchemeBuilder - // AddToScheme audit registration - AddToScheme = localSchemeBuilder.AddToScheme + localSchemeBuilder = &eventsv1.SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme ) func init() { // We only register manually written functions here. The registration of the // generated functions takes place in the generated files. The separation // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs) + localSchemeBuilder.Register(RegisterDefaults, AddFieldLabelConversionsForEvent) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/events/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/zz_generated.conversion.go new file mode 100644 index 00000000000..679ef8e7c63 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/zz_generated.conversion.go @@ -0,0 +1,173 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1 + +import ( + unsafe "unsafe" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/api/events/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + core "k8s.io/kubernetes/pkg/apis/core" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1.EventList)(nil), (*core.EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_EventList_To_core_EventList(a.(*v1.EventList), b.(*core.EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.EventList)(nil), (*v1.EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_EventList_To_v1_EventList(a.(*core.EventList), b.(*v1.EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.EventSeries)(nil), (*core.EventSeries)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_EventSeries_To_core_EventSeries(a.(*v1.EventSeries), b.(*core.EventSeries), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.EventSeries)(nil), (*v1.EventSeries)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_EventSeries_To_v1_EventSeries(a.(*core.EventSeries), b.(*v1.EventSeries), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*core.Event)(nil), (*v1.Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_Event_To_v1_Event(a.(*core.Event), b.(*v1.Event), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1.Event)(nil), (*core.Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Event_To_core_Event(a.(*v1.Event), b.(*core.Event), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1_Event_To_core_Event(in *v1.Event, out *core.Event, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.EventTime = in.EventTime + out.Series = (*core.EventSeries)(unsafe.Pointer(in.Series)) + out.ReportingController = in.ReportingController + out.ReportingInstance = in.ReportingInstance + out.Action = in.Action + out.Reason = in.Reason + // WARNING: in.Regarding requires manual conversion: does not exist in peer-type + out.Related = (*core.ObjectReference)(unsafe.Pointer(in.Related)) + // WARNING: in.Note requires manual conversion: does not exist in peer-type + out.Type = in.Type + // WARNING: in.DeprecatedSource requires manual conversion: does not exist in peer-type + // WARNING: in.DeprecatedFirstTimestamp requires manual conversion: does not exist in peer-type + // WARNING: in.DeprecatedLastTimestamp requires manual conversion: does not exist in peer-type + // WARNING: in.DeprecatedCount requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_core_Event_To_v1_Event(in *core.Event, out *v1.Event, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + // WARNING: in.InvolvedObject requires manual conversion: does not exist in peer-type + out.Reason = in.Reason + // WARNING: in.Message requires manual conversion: does not exist in peer-type + // WARNING: in.Source requires manual conversion: does not exist in peer-type + // WARNING: in.FirstTimestamp requires manual conversion: does not exist in peer-type + // WARNING: in.LastTimestamp requires manual conversion: does not exist in peer-type + // WARNING: in.Count requires manual conversion: does not exist in peer-type + out.Type = in.Type + out.EventTime = in.EventTime + out.Series = (*v1.EventSeries)(unsafe.Pointer(in.Series)) + out.Action = in.Action + out.Related = (*corev1.ObjectReference)(unsafe.Pointer(in.Related)) + out.ReportingController = in.ReportingController + out.ReportingInstance = in.ReportingInstance + return nil +} + +func autoConvert_v1_EventList_To_core_EventList(in *v1.EventList, out *core.EventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]core.Event, len(*in)) + for i := range *in { + if err := Convert_v1_Event_To_core_Event(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1_EventList_To_core_EventList is an autogenerated conversion function. +func Convert_v1_EventList_To_core_EventList(in *v1.EventList, out *core.EventList, s conversion.Scope) error { + return autoConvert_v1_EventList_To_core_EventList(in, out, s) +} + +func autoConvert_core_EventList_To_v1_EventList(in *core.EventList, out *v1.EventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1.Event, len(*in)) + for i := range *in { + if err := Convert_core_Event_To_v1_Event(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_core_EventList_To_v1_EventList is an autogenerated conversion function. +func Convert_core_EventList_To_v1_EventList(in *core.EventList, out *v1.EventList, s conversion.Scope) error { + return autoConvert_core_EventList_To_v1_EventList(in, out, s) +} + +func autoConvert_v1_EventSeries_To_core_EventSeries(in *v1.EventSeries, out *core.EventSeries, s conversion.Scope) error { + out.Count = in.Count + out.LastObservedTime = in.LastObservedTime + return nil +} + +// Convert_v1_EventSeries_To_core_EventSeries is an autogenerated conversion function. +func Convert_v1_EventSeries_To_core_EventSeries(in *v1.EventSeries, out *core.EventSeries, s conversion.Scope) error { + return autoConvert_v1_EventSeries_To_core_EventSeries(in, out, s) +} + +func autoConvert_core_EventSeries_To_v1_EventSeries(in *core.EventSeries, out *v1.EventSeries, s conversion.Scope) error { + out.Count = in.Count + out.LastObservedTime = in.LastObservedTime + return nil +} + +// Convert_core_EventSeries_To_v1_EventSeries is an autogenerated conversion function. +func Convert_core_EventSeries_To_v1_EventSeries(in *core.EventSeries, out *v1.EventSeries, s conversion.Scope) error { + return autoConvert_core_EventSeries_To_v1_EventSeries(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/zz_generated.defaults.go similarity index 70% rename from vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/zz_generated.defaults.go rename to vendor/k8s.io/kubernetes/pkg/apis/events/v1/zz_generated.defaults.go index 5c8c9f76275..cce2e603a69 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/v1/zz_generated.defaults.go @@ -18,23 +18,15 @@ limitations under the License. // Code generated by defaulter-gen. DO NOT EDIT. -package v1alpha2 +package v1 import ( runtime "k8s.io/apimachinery/pkg/runtime" - v1alpha2 "k8s.io/kube-scheduler/config/v1alpha2" ) // RegisterDefaults adds defaulters functions to the given scheme. // Public to allow building arbitrary schemes. // All generated defaulters are covering - they call all nested defaulters. func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&v1alpha2.KubeSchedulerConfiguration{}, func(obj interface{}) { - SetObjectDefaults_KubeSchedulerConfiguration(obj.(*v1alpha2.KubeSchedulerConfiguration)) - }) return nil } - -func SetObjectDefaults_KubeSchedulerConfiguration(in *v1alpha2.KubeSchedulerConfiguration) { - SetDefaults_KubeSchedulerConfiguration(in) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/conversion.go index 3a2be8e3168..8c28cd7e581 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/conversion.go @@ -17,8 +17,11 @@ limitations under the License. package v1beta1 import ( + "fmt" + v1beta1 "k8s.io/api/events/v1beta1" conversion "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" k8s_api "k8s.io/kubernetes/pkg/apis/core" k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" ) @@ -56,3 +59,29 @@ func Convert_core_Event_To_v1beta1_Event(in *k8s_api.Event, out *v1beta1.Event, out.DeprecatedCount = in.Count return nil } + +func AddFieldLabelConversionsForEvent(scheme *runtime.Scheme) error { + mapping := map[string]string{ + "reason": "reason", + "regarding.kind": "involvedObject.kind", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.namespace": "involvedObject.namespace", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.name": "involvedObject.name", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.uid": "involvedObject.uid", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.apiVersion": "involvedObject.apiVersion", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.resourceVersion": "involvedObject.resourceVersion", // map events.k8s.io field to fieldset returned by ToSelectableFields + "regarding.fieldPath": "involvedObject.fieldPath", // map events.k8s.io field to fieldset returned by ToSelectableFields + "reportingController": "reportingComponent", // map events.k8s.io field to fieldset returned by ToSelectableFields + "type": "type", + "metadata.namespace": "metadata.namespace", + "metadata.name": "metadata.name", + } + return scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("Event"), + func(label, value string) (string, string, error) { + mappedLabel, ok := mapping[label] + if !ok { + return "", "", fmt.Errorf("field label not supported: %s", label) + } + return mappedLabel, value, nil + }, + ) +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/register.go index 7ff9379602f..d4d5d44f64c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/register.go @@ -41,5 +41,5 @@ func init() { // We only register manually written functions here. The registration of the // generated functions takes place in the generated files. The separation // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(RegisterDefaults) + localSchemeBuilder.Register(RegisterDefaults, AddFieldLabelConversionsForEvent) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/zz_generated.conversion.go index 5be725bf02c..1d1e972cd43 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/events/v1beta1/zz_generated.conversion.go @@ -153,7 +153,6 @@ func Convert_core_EventList_To_v1beta1_EventList(in *core.EventList, out *v1beta func autoConvert_v1beta1_EventSeries_To_core_EventSeries(in *v1beta1.EventSeries, out *core.EventSeries, s conversion.Scope) error { out.Count = in.Count out.LastObservedTime = in.LastObservedTime - out.State = core.EventSeriesState(in.State) return nil } @@ -165,7 +164,6 @@ func Convert_v1beta1_EventSeries_To_core_EventSeries(in *v1beta1.EventSeries, ou func autoConvert_core_EventSeries_To_v1beta1_EventSeries(in *core.EventSeries, out *v1beta1.EventSeries, s conversion.Scope) error { out.Count = in.Count out.LastObservedTime = in.LastObservedTime - out.State = v1beta1.EventSeriesState(in.State) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/extensions/OWNERS index f2ab71a0187..6908d0fb031 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/OWNERS @@ -30,7 +30,6 @@ reviewers: - mml - resouer - mbohlool -- david-mcmahon - therc - pweil- - mqliang diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/BUILD index 55229f6bcae..ae5f1c0e2a5 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/BUILD @@ -37,13 +37,17 @@ go_library( go_test( name = "go_default_test", - srcs = ["defaults_test.go"], + srcs = [ + "conversion_test.go", + "defaults_test.go", + ], embed = [":go_default_library"], deps = [ "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/core/install:go_default_library", "//pkg/apis/extensions/install:go_default_library", + "//pkg/apis/networking:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/extensions/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", @@ -51,6 +55,8 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/github.com/stretchr/testify/require:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go index 8723b0771ef..4a85d23d39c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go @@ -23,6 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/networking" ) @@ -157,3 +158,57 @@ func Convert_networking_IPBlock_To_v1beta1_IPBlock(in *networking.IPBlock, out * copy(out.Except, in.Except) return nil } + +func Convert_v1beta1_IngressBackend_To_networking_IngressBackend(in *extensionsv1beta1.IngressBackend, out *networking.IngressBackend, s conversion.Scope) error { + if err := autoConvert_v1beta1_IngressBackend_To_networking_IngressBackend(in, out, s); err != nil { + return err + } + if len(in.ServiceName) > 0 || in.ServicePort.IntVal != 0 || in.ServicePort.StrVal != "" || in.ServicePort.Type == intstr.String { + out.Service = &networking.IngressServiceBackend{} + out.Service.Name = in.ServiceName + out.Service.Port.Name = in.ServicePort.StrVal + out.Service.Port.Number = in.ServicePort.IntVal + } + return nil +} + +func Convert_networking_IngressBackend_To_v1beta1_IngressBackend(in *networking.IngressBackend, out *extensionsv1beta1.IngressBackend, s conversion.Scope) error { + if err := autoConvert_networking_IngressBackend_To_v1beta1_IngressBackend(in, out, s); err != nil { + return err + } + if in.Service != nil { + out.ServiceName = in.Service.Name + if len(in.Service.Port.Name) > 0 { + out.ServicePort = intstr.FromString(in.Service.Port.Name) + } else { + out.ServicePort = intstr.FromInt(int(in.Service.Port.Number)) + } + } + return nil +} + +func Convert_v1beta1_IngressSpec_To_networking_IngressSpec(in *extensionsv1beta1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error { + if err := autoConvert_v1beta1_IngressSpec_To_networking_IngressSpec(in, out, s); err != nil { + return nil + } + if in.Backend != nil { + out.DefaultBackend = &networking.IngressBackend{} + if err := Convert_v1beta1_IngressBackend_To_networking_IngressBackend(in.Backend, out.DefaultBackend, s); err != nil { + return err + } + } + return nil +} + +func Convert_networking_IngressSpec_To_v1beta1_IngressSpec(in *networking.IngressSpec, out *extensionsv1beta1.IngressSpec, s conversion.Scope) error { + if err := autoConvert_networking_IngressSpec_To_v1beta1_IngressSpec(in, out, s); err != nil { + return nil + } + if in.DefaultBackend != nil { + out.Backend = &extensionsv1beta1.IngressBackend{} + if err := Convert_networking_IngressBackend_To_v1beta1_IngressBackend(in.DefaultBackend, out.Backend, s); err != nil { + return err + } + } + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go index 2b36ff91531..6b94fdc072d 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go @@ -264,16 +264,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1beta1.IngressBackend)(nil), (*networking.IngressBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_IngressBackend_To_networking_IngressBackend(a.(*v1beta1.IngressBackend), b.(*networking.IngressBackend), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*networking.IngressBackend)(nil), (*v1beta1.IngressBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_networking_IngressBackend_To_v1beta1_IngressBackend(a.(*networking.IngressBackend), b.(*v1beta1.IngressBackend), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*v1beta1.IngressList)(nil), (*networking.IngressList)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_IngressList_To_networking_IngressList(a.(*v1beta1.IngressList), b.(*networking.IngressList), scope) }); err != nil { @@ -304,16 +294,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1beta1.IngressSpec)(nil), (*networking.IngressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_IngressSpec_To_networking_IngressSpec(a.(*v1beta1.IngressSpec), b.(*networking.IngressSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*networking.IngressSpec)(nil), (*v1beta1.IngressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_networking_IngressSpec_To_v1beta1_IngressSpec(a.(*networking.IngressSpec), b.(*v1beta1.IngressSpec), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*v1beta1.IngressStatus)(nil), (*networking.IngressStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_IngressStatus_To_networking_IngressStatus(a.(*v1beta1.IngressStatus), b.(*networking.IngressStatus), scope) }); err != nil { @@ -564,6 +544,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*networking.IngressBackend)(nil), (*v1beta1.IngressBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressBackend_To_v1beta1_IngressBackend(a.(*networking.IngressBackend), b.(*v1beta1.IngressBackend), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*networking.IngressSpec)(nil), (*v1beta1.IngressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressSpec_To_v1beta1_IngressSpec(a.(*networking.IngressSpec), b.(*v1beta1.IngressSpec), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*networking.NetworkPolicyEgressRule)(nil), (*v1beta1.NetworkPolicyEgressRule)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_networking_NetworkPolicyEgressRule_To_v1beta1_NetworkPolicyEgressRule(a.(*networking.NetworkPolicyEgressRule), b.(*v1beta1.NetworkPolicyEgressRule), scope) }); err != nil { @@ -584,6 +574,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*v1beta1.IngressBackend)(nil), (*networking.IngressBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_IngressBackend_To_networking_IngressBackend(a.(*v1beta1.IngressBackend), b.(*networking.IngressBackend), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta1.IngressSpec)(nil), (*networking.IngressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_IngressSpec_To_networking_IngressSpec(a.(*v1beta1.IngressSpec), b.(*networking.IngressSpec), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*v1beta1.NetworkPolicyEgressRule)(nil), (*networking.NetworkPolicyEgressRule)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_NetworkPolicyEgressRule_To_networking_NetworkPolicyEgressRule(a.(*v1beta1.NetworkPolicyEgressRule), b.(*networking.NetworkPolicyEgressRule), scope) }); err != nil { @@ -1188,7 +1188,17 @@ func Convert_networking_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in *networkin } func autoConvert_v1beta1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(in *v1beta1.HTTPIngressRuleValue, out *networking.HTTPIngressRuleValue, s conversion.Scope) error { - out.Paths = *(*[]networking.HTTPIngressPath)(unsafe.Pointer(&in.Paths)) + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]networking.HTTPIngressPath, len(*in)) + for i := range *in { + if err := Convert_v1beta1_HTTPIngressPath_To_networking_HTTPIngressPath(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Paths = nil + } return nil } @@ -1198,7 +1208,17 @@ func Convert_v1beta1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(in } func autoConvert_networking_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in *networking.HTTPIngressRuleValue, out *v1beta1.HTTPIngressRuleValue, s conversion.Scope) error { - out.Paths = *(*[]v1beta1.HTTPIngressPath)(unsafe.Pointer(&in.Paths)) + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]v1beta1.HTTPIngressPath, len(*in)) + for i := range *in { + if err := Convert_networking_HTTPIngressPath_To_v1beta1_HTTPIngressPath(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Paths = nil + } return nil } @@ -1296,29 +1316,18 @@ func Convert_networking_Ingress_To_v1beta1_Ingress(in *networking.Ingress, out * } func autoConvert_v1beta1_IngressBackend_To_networking_IngressBackend(in *v1beta1.IngressBackend, out *networking.IngressBackend, s conversion.Scope) error { - out.ServiceName = in.ServiceName - out.ServicePort = in.ServicePort + // WARNING: in.ServiceName requires manual conversion: does not exist in peer-type + // WARNING: in.ServicePort requires manual conversion: does not exist in peer-type out.Resource = (*core.TypedLocalObjectReference)(unsafe.Pointer(in.Resource)) return nil } -// Convert_v1beta1_IngressBackend_To_networking_IngressBackend is an autogenerated conversion function. -func Convert_v1beta1_IngressBackend_To_networking_IngressBackend(in *v1beta1.IngressBackend, out *networking.IngressBackend, s conversion.Scope) error { - return autoConvert_v1beta1_IngressBackend_To_networking_IngressBackend(in, out, s) -} - func autoConvert_networking_IngressBackend_To_v1beta1_IngressBackend(in *networking.IngressBackend, out *v1beta1.IngressBackend, s conversion.Scope) error { - out.ServiceName = in.ServiceName - out.ServicePort = in.ServicePort + // WARNING: in.Service requires manual conversion: does not exist in peer-type out.Resource = (*v1.TypedLocalObjectReference)(unsafe.Pointer(in.Resource)) return nil } -// Convert_networking_IngressBackend_To_v1beta1_IngressBackend is an autogenerated conversion function. -func Convert_networking_IngressBackend_To_v1beta1_IngressBackend(in *networking.IngressBackend, out *v1beta1.IngressBackend, s conversion.Scope) error { - return autoConvert_networking_IngressBackend_To_v1beta1_IngressBackend(in, out, s) -} - func autoConvert_v1beta1_IngressList_To_networking_IngressList(in *v1beta1.IngressList, out *networking.IngressList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { @@ -1388,7 +1397,15 @@ func Convert_networking_IngressRule_To_v1beta1_IngressRule(in *networking.Ingres } func autoConvert_v1beta1_IngressRuleValue_To_networking_IngressRuleValue(in *v1beta1.IngressRuleValue, out *networking.IngressRuleValue, s conversion.Scope) error { - out.HTTP = (*networking.HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP)) + if in.HTTP != nil { + in, out := &in.HTTP, &out.HTTP + *out = new(networking.HTTPIngressRuleValue) + if err := Convert_v1beta1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(*in, *out, s); err != nil { + return err + } + } else { + out.HTTP = nil + } return nil } @@ -1398,7 +1415,15 @@ func Convert_v1beta1_IngressRuleValue_To_networking_IngressRuleValue(in *v1beta1 } func autoConvert_networking_IngressRuleValue_To_v1beta1_IngressRuleValue(in *networking.IngressRuleValue, out *v1beta1.IngressRuleValue, s conversion.Scope) error { - out.HTTP = (*v1beta1.HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP)) + if in.HTTP != nil { + in, out := &in.HTTP, &out.HTTP + *out = new(v1beta1.HTTPIngressRuleValue) + if err := Convert_networking_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(*in, *out, s); err != nil { + return err + } + } else { + out.HTTP = nil + } return nil } @@ -1409,30 +1434,40 @@ func Convert_networking_IngressRuleValue_To_v1beta1_IngressRuleValue(in *network func autoConvert_v1beta1_IngressSpec_To_networking_IngressSpec(in *v1beta1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error { out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) - out.Backend = (*networking.IngressBackend)(unsafe.Pointer(in.Backend)) + // WARNING: in.Backend requires manual conversion: does not exist in peer-type out.TLS = *(*[]networking.IngressTLS)(unsafe.Pointer(&in.TLS)) - out.Rules = *(*[]networking.IngressRule)(unsafe.Pointer(&in.Rules)) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]networking.IngressRule, len(*in)) + for i := range *in { + if err := Convert_v1beta1_IngressRule_To_networking_IngressRule(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Rules = nil + } return nil } -// Convert_v1beta1_IngressSpec_To_networking_IngressSpec is an autogenerated conversion function. -func Convert_v1beta1_IngressSpec_To_networking_IngressSpec(in *v1beta1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error { - return autoConvert_v1beta1_IngressSpec_To_networking_IngressSpec(in, out, s) -} - func autoConvert_networking_IngressSpec_To_v1beta1_IngressSpec(in *networking.IngressSpec, out *v1beta1.IngressSpec, s conversion.Scope) error { out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) - out.Backend = (*v1beta1.IngressBackend)(unsafe.Pointer(in.Backend)) + // WARNING: in.DefaultBackend requires manual conversion: does not exist in peer-type out.TLS = *(*[]v1beta1.IngressTLS)(unsafe.Pointer(&in.TLS)) - out.Rules = *(*[]v1beta1.IngressRule)(unsafe.Pointer(&in.Rules)) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]v1beta1.IngressRule, len(*in)) + for i := range *in { + if err := Convert_networking_IngressRule_To_v1beta1_IngressRule(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Rules = nil + } return nil } -// Convert_networking_IngressSpec_To_v1beta1_IngressSpec is an autogenerated conversion function. -func Convert_networking_IngressSpec_To_v1beta1_IngressSpec(in *networking.IngressSpec, out *v1beta1.IngressSpec, s conversion.Scope) error { - return autoConvert_networking_IngressSpec_To_v1beta1_IngressSpec(in, out, s) -} - func autoConvert_v1beta1_IngressStatus_To_networking_IngressStatus(in *v1beta1.IngressStatus, out *networking.IngressStatus, s conversion.Scope) error { if err := corev1.Convert_v1_LoadBalancerStatus_To_core_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, s); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.defaults.go index e03958755b0..d55f96ec040 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.defaults.go @@ -98,6 +98,13 @@ func SetObjectDefaults_DaemonSet(in *v1beta1.DaemonSet) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -305,6 +312,13 @@ func SetObjectDefaults_Deployment(in *v1beta1.Deployment) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] @@ -553,6 +567,13 @@ func SetObjectDefaults_ReplicaSet(in *v1beta1.ReplicaSet) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } for i := range in.Spec.Template.Spec.InitContainers { a := &in.Spec.Template.Spec.InitContainers[i] diff --git a/vendor/k8s.io/kubernetes/pkg/apis/flowcontrol/types.go b/vendor/k8s.io/kubernetes/pkg/apis/flowcontrol/types.go index ccb145b4a91..2d8553e6de2 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/flowcontrol/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/flowcontrol/types.go @@ -84,7 +84,6 @@ type FlowSchemaList struct { metav1.ListMeta // `items` is a list of FlowSchemas. - // +listType=set Items []FlowSchema } @@ -350,7 +349,6 @@ type PriorityLevelConfigurationList struct { // +optional metav1.ListMeta // `items` is a list of request-priorities. - // +listType=set Items []PriorityLevelConfiguration } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go index 0eaaa470fa5..4ba83a844e8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go @@ -158,7 +158,7 @@ type IPBlock struct { Except []string } -// NetworkPolicyPeer describes a peer to allow traffic from. +// NetworkPolicyPeer describes a peer to allow traffic to/from. type NetworkPolicyPeer struct { // This is a label selector which selects Pods. This field follows standard label // selector semantics; if present but empty, it selects all pods. @@ -248,26 +248,27 @@ type IngressSpec struct { // +optional IngressClassName *string - // Backend is a default backend capable of servicing requests that don't - // match any rule. At least one of 'backend' or 'rules' must be specified. - // This field is optional to allow the loadbalancer controller or defaulting - // logic to specify a global default. + // DefaultBackend is the backend that should handle requests that don't + // match any rule. If Rules are not specified, DefaultBackend must be specified. + // If DefaultBackend is not set, the handling of requests that do not match any + // of the rules will be up to the Ingress controller. // +optional - Backend *IngressBackend + DefaultBackend *IngressBackend // TLS configuration. Currently the Ingress only supports a single TLS // port, 443. If multiple members of this list specify different hosts, they // will be multiplexed on the same port according to the hostname specified // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. + // +listType=atomic // +optional TLS []IngressTLS // A list of host rules used to configure the Ingress. If unspecified, or // no rule matches, all traffic is sent to the default backend. + // +listType=atomic // +optional Rules []IngressRule - // TODO: Add the ability to specify load-balancer IP through claims } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -314,7 +315,6 @@ type IngressClassList struct { metav1.ListMeta // Items is the list of IngressClasses. - // +listType=set Items []IngressClass } @@ -324,6 +324,7 @@ type IngressTLS struct { // this list must match the name/s used in the tlsSecret. Defaults to the // wildcard host setting for the loadbalancer controller fulfilling this // Ingress, if left unspecified. + // +listType=atomic // +optional Hosts []string // SecretName is the name of the secret used to terminate TLS traffic on @@ -404,6 +405,7 @@ type IngressRuleValue struct { // or '#'. type HTTPIngressRuleValue struct { // A collection of paths that map requests to backends. + // +listType=atomic Paths []HTTPIngressPath // TODO: Consider adding fields for ingress-type specific global // options usable by a loadbalancer, like http keep-alive. @@ -462,17 +464,39 @@ type HTTPIngressPath struct { // IngressBackend describes all endpoints for a given service and port. type IngressBackend struct { - // Specifies the name of the referenced service. + // Service references a Service as a Backend. + // This is a mutually exclusive setting with "Resource". // +optional - ServiceName string - - // Specifies the port of the referenced service. - // +optional - ServicePort intstr.IntOrString + Service *IngressServiceBackend // Resource is an ObjectRef to another Kubernetes resource in the namespace - // of the Ingress object. If resource is specified, serviceName and servicePort - // must not be specified. + // of the Ingress object. If resource is specified, a service.Name and + // service.Port must not be specified. + // This is a mutually exclusive setting with "Service". // +optional Resource *api.TypedLocalObjectReference } + +// IngressServiceBackend references a Kubernetes Service as a Backend. +type IngressServiceBackend struct { + // Name is the referenced service. The service must exist in + // the same namespace as the Ingress object. + Name string + + // Port of the referenced service. A port name or port number + // is required for a IngressServiceBackend. + Port ServiceBackendPort +} + +// ServiceBackendPort is the service port being referenced. +type ServiceBackendPort struct { + // Name is the name of the port on the Service. + // This is a mutually exclusive setting with "Number". + // +optional + Name string + + // Number is the numerical port number (e.g. 80) on the Service. + // This is a mutually exclusive setting with "Name". + // +optional + Number int32 +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/BUILD index e33b8803daa..f3da32a1d0b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/BUILD @@ -18,6 +18,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/apis/networking/v1", deps = [ "//pkg/apis/core:go_default_library", + "//pkg/apis/core/v1:go_default_library", "//pkg/apis/networking:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/networking/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.conversion.go index fb1b7dbf7ab..c87863a02fe 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.conversion.go @@ -30,6 +30,7 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" core "k8s.io/kubernetes/pkg/apis/core" + apiscorev1 "k8s.io/kubernetes/pkg/apis/core/v1" networking "k8s.io/kubernetes/pkg/apis/networking" ) @@ -40,6 +41,26 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1.HTTPIngressPath)(nil), (*networking.HTTPIngressPath)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_HTTPIngressPath_To_networking_HTTPIngressPath(a.(*v1.HTTPIngressPath), b.(*networking.HTTPIngressPath), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.HTTPIngressPath)(nil), (*v1.HTTPIngressPath)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_HTTPIngressPath_To_v1_HTTPIngressPath(a.(*networking.HTTPIngressPath), b.(*v1.HTTPIngressPath), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.HTTPIngressRuleValue)(nil), (*networking.HTTPIngressRuleValue)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(a.(*v1.HTTPIngressRuleValue), b.(*networking.HTTPIngressRuleValue), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.HTTPIngressRuleValue)(nil), (*v1.HTTPIngressRuleValue)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_HTTPIngressRuleValue_To_v1_HTTPIngressRuleValue(a.(*networking.HTTPIngressRuleValue), b.(*v1.HTTPIngressRuleValue), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1.IPBlock)(nil), (*networking.IPBlock)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_IPBlock_To_networking_IPBlock(a.(*v1.IPBlock), b.(*networking.IPBlock), scope) }); err != nil { @@ -50,6 +71,126 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1.Ingress)(nil), (*networking.Ingress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Ingress_To_networking_Ingress(a.(*v1.Ingress), b.(*networking.Ingress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.Ingress)(nil), (*v1.Ingress)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_Ingress_To_v1_Ingress(a.(*networking.Ingress), b.(*v1.Ingress), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.IngressBackend)(nil), (*networking.IngressBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressBackend_To_networking_IngressBackend(a.(*v1.IngressBackend), b.(*networking.IngressBackend), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IngressBackend)(nil), (*v1.IngressBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressBackend_To_v1_IngressBackend(a.(*networking.IngressBackend), b.(*v1.IngressBackend), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.IngressClass)(nil), (*networking.IngressClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressClass_To_networking_IngressClass(a.(*v1.IngressClass), b.(*networking.IngressClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IngressClass)(nil), (*v1.IngressClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressClass_To_v1_IngressClass(a.(*networking.IngressClass), b.(*v1.IngressClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.IngressClassList)(nil), (*networking.IngressClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressClassList_To_networking_IngressClassList(a.(*v1.IngressClassList), b.(*networking.IngressClassList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IngressClassList)(nil), (*v1.IngressClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressClassList_To_v1_IngressClassList(a.(*networking.IngressClassList), b.(*v1.IngressClassList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.IngressClassSpec)(nil), (*networking.IngressClassSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressClassSpec_To_networking_IngressClassSpec(a.(*v1.IngressClassSpec), b.(*networking.IngressClassSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IngressClassSpec)(nil), (*v1.IngressClassSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressClassSpec_To_v1_IngressClassSpec(a.(*networking.IngressClassSpec), b.(*v1.IngressClassSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.IngressList)(nil), (*networking.IngressList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressList_To_networking_IngressList(a.(*v1.IngressList), b.(*networking.IngressList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IngressList)(nil), (*v1.IngressList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressList_To_v1_IngressList(a.(*networking.IngressList), b.(*v1.IngressList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.IngressRule)(nil), (*networking.IngressRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressRule_To_networking_IngressRule(a.(*v1.IngressRule), b.(*networking.IngressRule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IngressRule)(nil), (*v1.IngressRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressRule_To_v1_IngressRule(a.(*networking.IngressRule), b.(*v1.IngressRule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.IngressRuleValue)(nil), (*networking.IngressRuleValue)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressRuleValue_To_networking_IngressRuleValue(a.(*v1.IngressRuleValue), b.(*networking.IngressRuleValue), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IngressRuleValue)(nil), (*v1.IngressRuleValue)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressRuleValue_To_v1_IngressRuleValue(a.(*networking.IngressRuleValue), b.(*v1.IngressRuleValue), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.IngressServiceBackend)(nil), (*networking.IngressServiceBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressServiceBackend_To_networking_IngressServiceBackend(a.(*v1.IngressServiceBackend), b.(*networking.IngressServiceBackend), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IngressServiceBackend)(nil), (*v1.IngressServiceBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressServiceBackend_To_v1_IngressServiceBackend(a.(*networking.IngressServiceBackend), b.(*v1.IngressServiceBackend), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.IngressSpec)(nil), (*networking.IngressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressSpec_To_networking_IngressSpec(a.(*v1.IngressSpec), b.(*networking.IngressSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IngressSpec)(nil), (*v1.IngressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressSpec_To_v1_IngressSpec(a.(*networking.IngressSpec), b.(*v1.IngressSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.IngressStatus)(nil), (*networking.IngressStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressStatus_To_networking_IngressStatus(a.(*v1.IngressStatus), b.(*networking.IngressStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IngressStatus)(nil), (*v1.IngressStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressStatus_To_v1_IngressStatus(a.(*networking.IngressStatus), b.(*v1.IngressStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.IngressTLS)(nil), (*networking.IngressTLS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_IngressTLS_To_networking_IngressTLS(a.(*v1.IngressTLS), b.(*networking.IngressTLS), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.IngressTLS)(nil), (*v1.IngressTLS)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressTLS_To_v1_IngressTLS(a.(*networking.IngressTLS), b.(*v1.IngressTLS), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1.NetworkPolicy)(nil), (*networking.NetworkPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_NetworkPolicy_To_networking_NetworkPolicy(a.(*v1.NetworkPolicy), b.(*networking.NetworkPolicy), scope) }); err != nil { @@ -120,9 +261,67 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1.ServiceBackendPort)(nil), (*networking.ServiceBackendPort)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ServiceBackendPort_To_networking_ServiceBackendPort(a.(*v1.ServiceBackendPort), b.(*networking.ServiceBackendPort), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*networking.ServiceBackendPort)(nil), (*v1.ServiceBackendPort)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_ServiceBackendPort_To_v1_ServiceBackendPort(a.(*networking.ServiceBackendPort), b.(*v1.ServiceBackendPort), scope) + }); err != nil { + return err + } return nil } +func autoConvert_v1_HTTPIngressPath_To_networking_HTTPIngressPath(in *v1.HTTPIngressPath, out *networking.HTTPIngressPath, s conversion.Scope) error { + out.Path = in.Path + out.PathType = (*networking.PathType)(unsafe.Pointer(in.PathType)) + if err := Convert_v1_IngressBackend_To_networking_IngressBackend(&in.Backend, &out.Backend, s); err != nil { + return err + } + return nil +} + +// Convert_v1_HTTPIngressPath_To_networking_HTTPIngressPath is an autogenerated conversion function. +func Convert_v1_HTTPIngressPath_To_networking_HTTPIngressPath(in *v1.HTTPIngressPath, out *networking.HTTPIngressPath, s conversion.Scope) error { + return autoConvert_v1_HTTPIngressPath_To_networking_HTTPIngressPath(in, out, s) +} + +func autoConvert_networking_HTTPIngressPath_To_v1_HTTPIngressPath(in *networking.HTTPIngressPath, out *v1.HTTPIngressPath, s conversion.Scope) error { + out.Path = in.Path + out.PathType = (*v1.PathType)(unsafe.Pointer(in.PathType)) + if err := Convert_networking_IngressBackend_To_v1_IngressBackend(&in.Backend, &out.Backend, s); err != nil { + return err + } + return nil +} + +// Convert_networking_HTTPIngressPath_To_v1_HTTPIngressPath is an autogenerated conversion function. +func Convert_networking_HTTPIngressPath_To_v1_HTTPIngressPath(in *networking.HTTPIngressPath, out *v1.HTTPIngressPath, s conversion.Scope) error { + return autoConvert_networking_HTTPIngressPath_To_v1_HTTPIngressPath(in, out, s) +} + +func autoConvert_v1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(in *v1.HTTPIngressRuleValue, out *networking.HTTPIngressRuleValue, s conversion.Scope) error { + out.Paths = *(*[]networking.HTTPIngressPath)(unsafe.Pointer(&in.Paths)) + return nil +} + +// Convert_v1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue is an autogenerated conversion function. +func Convert_v1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(in *v1.HTTPIngressRuleValue, out *networking.HTTPIngressRuleValue, s conversion.Scope) error { + return autoConvert_v1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(in, out, s) +} + +func autoConvert_networking_HTTPIngressRuleValue_To_v1_HTTPIngressRuleValue(in *networking.HTTPIngressRuleValue, out *v1.HTTPIngressRuleValue, s conversion.Scope) error { + out.Paths = *(*[]v1.HTTPIngressPath)(unsafe.Pointer(&in.Paths)) + return nil +} + +// Convert_networking_HTTPIngressRuleValue_To_v1_HTTPIngressRuleValue is an autogenerated conversion function. +func Convert_networking_HTTPIngressRuleValue_To_v1_HTTPIngressRuleValue(in *networking.HTTPIngressRuleValue, out *v1.HTTPIngressRuleValue, s conversion.Scope) error { + return autoConvert_networking_HTTPIngressRuleValue_To_v1_HTTPIngressRuleValue(in, out, s) +} + func autoConvert_v1_IPBlock_To_networking_IPBlock(in *v1.IPBlock, out *networking.IPBlock, s conversion.Scope) error { out.CIDR = in.CIDR out.Except = *(*[]string)(unsafe.Pointer(&in.Except)) @@ -145,6 +344,316 @@ func Convert_networking_IPBlock_To_v1_IPBlock(in *networking.IPBlock, out *v1.IP return autoConvert_networking_IPBlock_To_v1_IPBlock(in, out, s) } +func autoConvert_v1_Ingress_To_networking_Ingress(in *v1.Ingress, out *networking.Ingress, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_IngressSpec_To_networking_IngressSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1_IngressStatus_To_networking_IngressStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1_Ingress_To_networking_Ingress is an autogenerated conversion function. +func Convert_v1_Ingress_To_networking_Ingress(in *v1.Ingress, out *networking.Ingress, s conversion.Scope) error { + return autoConvert_v1_Ingress_To_networking_Ingress(in, out, s) +} + +func autoConvert_networking_Ingress_To_v1_Ingress(in *networking.Ingress, out *v1.Ingress, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_networking_IngressSpec_To_v1_IngressSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_networking_IngressStatus_To_v1_IngressStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_networking_Ingress_To_v1_Ingress is an autogenerated conversion function. +func Convert_networking_Ingress_To_v1_Ingress(in *networking.Ingress, out *v1.Ingress, s conversion.Scope) error { + return autoConvert_networking_Ingress_To_v1_Ingress(in, out, s) +} + +func autoConvert_v1_IngressBackend_To_networking_IngressBackend(in *v1.IngressBackend, out *networking.IngressBackend, s conversion.Scope) error { + out.Service = (*networking.IngressServiceBackend)(unsafe.Pointer(in.Service)) + out.Resource = (*core.TypedLocalObjectReference)(unsafe.Pointer(in.Resource)) + return nil +} + +// Convert_v1_IngressBackend_To_networking_IngressBackend is an autogenerated conversion function. +func Convert_v1_IngressBackend_To_networking_IngressBackend(in *v1.IngressBackend, out *networking.IngressBackend, s conversion.Scope) error { + return autoConvert_v1_IngressBackend_To_networking_IngressBackend(in, out, s) +} + +func autoConvert_networking_IngressBackend_To_v1_IngressBackend(in *networking.IngressBackend, out *v1.IngressBackend, s conversion.Scope) error { + out.Service = (*v1.IngressServiceBackend)(unsafe.Pointer(in.Service)) + out.Resource = (*corev1.TypedLocalObjectReference)(unsafe.Pointer(in.Resource)) + return nil +} + +// Convert_networking_IngressBackend_To_v1_IngressBackend is an autogenerated conversion function. +func Convert_networking_IngressBackend_To_v1_IngressBackend(in *networking.IngressBackend, out *v1.IngressBackend, s conversion.Scope) error { + return autoConvert_networking_IngressBackend_To_v1_IngressBackend(in, out, s) +} + +func autoConvert_v1_IngressClass_To_networking_IngressClass(in *v1.IngressClass, out *networking.IngressClass, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1_IngressClassSpec_To_networking_IngressClassSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1_IngressClass_To_networking_IngressClass is an autogenerated conversion function. +func Convert_v1_IngressClass_To_networking_IngressClass(in *v1.IngressClass, out *networking.IngressClass, s conversion.Scope) error { + return autoConvert_v1_IngressClass_To_networking_IngressClass(in, out, s) +} + +func autoConvert_networking_IngressClass_To_v1_IngressClass(in *networking.IngressClass, out *v1.IngressClass, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_networking_IngressClassSpec_To_v1_IngressClassSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_networking_IngressClass_To_v1_IngressClass is an autogenerated conversion function. +func Convert_networking_IngressClass_To_v1_IngressClass(in *networking.IngressClass, out *v1.IngressClass, s conversion.Scope) error { + return autoConvert_networking_IngressClass_To_v1_IngressClass(in, out, s) +} + +func autoConvert_v1_IngressClassList_To_networking_IngressClassList(in *v1.IngressClassList, out *networking.IngressClassList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]networking.IngressClass)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_IngressClassList_To_networking_IngressClassList is an autogenerated conversion function. +func Convert_v1_IngressClassList_To_networking_IngressClassList(in *v1.IngressClassList, out *networking.IngressClassList, s conversion.Scope) error { + return autoConvert_v1_IngressClassList_To_networking_IngressClassList(in, out, s) +} + +func autoConvert_networking_IngressClassList_To_v1_IngressClassList(in *networking.IngressClassList, out *v1.IngressClassList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1.IngressClass)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_networking_IngressClassList_To_v1_IngressClassList is an autogenerated conversion function. +func Convert_networking_IngressClassList_To_v1_IngressClassList(in *networking.IngressClassList, out *v1.IngressClassList, s conversion.Scope) error { + return autoConvert_networking_IngressClassList_To_v1_IngressClassList(in, out, s) +} + +func autoConvert_v1_IngressClassSpec_To_networking_IngressClassSpec(in *v1.IngressClassSpec, out *networking.IngressClassSpec, s conversion.Scope) error { + out.Controller = in.Controller + out.Parameters = (*core.TypedLocalObjectReference)(unsafe.Pointer(in.Parameters)) + return nil +} + +// Convert_v1_IngressClassSpec_To_networking_IngressClassSpec is an autogenerated conversion function. +func Convert_v1_IngressClassSpec_To_networking_IngressClassSpec(in *v1.IngressClassSpec, out *networking.IngressClassSpec, s conversion.Scope) error { + return autoConvert_v1_IngressClassSpec_To_networking_IngressClassSpec(in, out, s) +} + +func autoConvert_networking_IngressClassSpec_To_v1_IngressClassSpec(in *networking.IngressClassSpec, out *v1.IngressClassSpec, s conversion.Scope) error { + out.Controller = in.Controller + out.Parameters = (*corev1.TypedLocalObjectReference)(unsafe.Pointer(in.Parameters)) + return nil +} + +// Convert_networking_IngressClassSpec_To_v1_IngressClassSpec is an autogenerated conversion function. +func Convert_networking_IngressClassSpec_To_v1_IngressClassSpec(in *networking.IngressClassSpec, out *v1.IngressClassSpec, s conversion.Scope) error { + return autoConvert_networking_IngressClassSpec_To_v1_IngressClassSpec(in, out, s) +} + +func autoConvert_v1_IngressList_To_networking_IngressList(in *v1.IngressList, out *networking.IngressList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]networking.Ingress, len(*in)) + for i := range *in { + if err := Convert_v1_Ingress_To_networking_Ingress(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1_IngressList_To_networking_IngressList is an autogenerated conversion function. +func Convert_v1_IngressList_To_networking_IngressList(in *v1.IngressList, out *networking.IngressList, s conversion.Scope) error { + return autoConvert_v1_IngressList_To_networking_IngressList(in, out, s) +} + +func autoConvert_networking_IngressList_To_v1_IngressList(in *networking.IngressList, out *v1.IngressList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1.Ingress, len(*in)) + for i := range *in { + if err := Convert_networking_Ingress_To_v1_Ingress(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_networking_IngressList_To_v1_IngressList is an autogenerated conversion function. +func Convert_networking_IngressList_To_v1_IngressList(in *networking.IngressList, out *v1.IngressList, s conversion.Scope) error { + return autoConvert_networking_IngressList_To_v1_IngressList(in, out, s) +} + +func autoConvert_v1_IngressRule_To_networking_IngressRule(in *v1.IngressRule, out *networking.IngressRule, s conversion.Scope) error { + out.Host = in.Host + if err := Convert_v1_IngressRuleValue_To_networking_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, s); err != nil { + return err + } + return nil +} + +// Convert_v1_IngressRule_To_networking_IngressRule is an autogenerated conversion function. +func Convert_v1_IngressRule_To_networking_IngressRule(in *v1.IngressRule, out *networking.IngressRule, s conversion.Scope) error { + return autoConvert_v1_IngressRule_To_networking_IngressRule(in, out, s) +} + +func autoConvert_networking_IngressRule_To_v1_IngressRule(in *networking.IngressRule, out *v1.IngressRule, s conversion.Scope) error { + out.Host = in.Host + if err := Convert_networking_IngressRuleValue_To_v1_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, s); err != nil { + return err + } + return nil +} + +// Convert_networking_IngressRule_To_v1_IngressRule is an autogenerated conversion function. +func Convert_networking_IngressRule_To_v1_IngressRule(in *networking.IngressRule, out *v1.IngressRule, s conversion.Scope) error { + return autoConvert_networking_IngressRule_To_v1_IngressRule(in, out, s) +} + +func autoConvert_v1_IngressRuleValue_To_networking_IngressRuleValue(in *v1.IngressRuleValue, out *networking.IngressRuleValue, s conversion.Scope) error { + out.HTTP = (*networking.HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP)) + return nil +} + +// Convert_v1_IngressRuleValue_To_networking_IngressRuleValue is an autogenerated conversion function. +func Convert_v1_IngressRuleValue_To_networking_IngressRuleValue(in *v1.IngressRuleValue, out *networking.IngressRuleValue, s conversion.Scope) error { + return autoConvert_v1_IngressRuleValue_To_networking_IngressRuleValue(in, out, s) +} + +func autoConvert_networking_IngressRuleValue_To_v1_IngressRuleValue(in *networking.IngressRuleValue, out *v1.IngressRuleValue, s conversion.Scope) error { + out.HTTP = (*v1.HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP)) + return nil +} + +// Convert_networking_IngressRuleValue_To_v1_IngressRuleValue is an autogenerated conversion function. +func Convert_networking_IngressRuleValue_To_v1_IngressRuleValue(in *networking.IngressRuleValue, out *v1.IngressRuleValue, s conversion.Scope) error { + return autoConvert_networking_IngressRuleValue_To_v1_IngressRuleValue(in, out, s) +} + +func autoConvert_v1_IngressServiceBackend_To_networking_IngressServiceBackend(in *v1.IngressServiceBackend, out *networking.IngressServiceBackend, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_v1_ServiceBackendPort_To_networking_ServiceBackendPort(&in.Port, &out.Port, s); err != nil { + return err + } + return nil +} + +// Convert_v1_IngressServiceBackend_To_networking_IngressServiceBackend is an autogenerated conversion function. +func Convert_v1_IngressServiceBackend_To_networking_IngressServiceBackend(in *v1.IngressServiceBackend, out *networking.IngressServiceBackend, s conversion.Scope) error { + return autoConvert_v1_IngressServiceBackend_To_networking_IngressServiceBackend(in, out, s) +} + +func autoConvert_networking_IngressServiceBackend_To_v1_IngressServiceBackend(in *networking.IngressServiceBackend, out *v1.IngressServiceBackend, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_networking_ServiceBackendPort_To_v1_ServiceBackendPort(&in.Port, &out.Port, s); err != nil { + return err + } + return nil +} + +// Convert_networking_IngressServiceBackend_To_v1_IngressServiceBackend is an autogenerated conversion function. +func Convert_networking_IngressServiceBackend_To_v1_IngressServiceBackend(in *networking.IngressServiceBackend, out *v1.IngressServiceBackend, s conversion.Scope) error { + return autoConvert_networking_IngressServiceBackend_To_v1_IngressServiceBackend(in, out, s) +} + +func autoConvert_v1_IngressSpec_To_networking_IngressSpec(in *v1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error { + out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) + out.DefaultBackend = (*networking.IngressBackend)(unsafe.Pointer(in.DefaultBackend)) + out.TLS = *(*[]networking.IngressTLS)(unsafe.Pointer(&in.TLS)) + out.Rules = *(*[]networking.IngressRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +// Convert_v1_IngressSpec_To_networking_IngressSpec is an autogenerated conversion function. +func Convert_v1_IngressSpec_To_networking_IngressSpec(in *v1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error { + return autoConvert_v1_IngressSpec_To_networking_IngressSpec(in, out, s) +} + +func autoConvert_networking_IngressSpec_To_v1_IngressSpec(in *networking.IngressSpec, out *v1.IngressSpec, s conversion.Scope) error { + out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) + out.DefaultBackend = (*v1.IngressBackend)(unsafe.Pointer(in.DefaultBackend)) + out.TLS = *(*[]v1.IngressTLS)(unsafe.Pointer(&in.TLS)) + out.Rules = *(*[]v1.IngressRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +// Convert_networking_IngressSpec_To_v1_IngressSpec is an autogenerated conversion function. +func Convert_networking_IngressSpec_To_v1_IngressSpec(in *networking.IngressSpec, out *v1.IngressSpec, s conversion.Scope) error { + return autoConvert_networking_IngressSpec_To_v1_IngressSpec(in, out, s) +} + +func autoConvert_v1_IngressStatus_To_networking_IngressStatus(in *v1.IngressStatus, out *networking.IngressStatus, s conversion.Scope) error { + if err := apiscorev1.Convert_v1_LoadBalancerStatus_To_core_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, s); err != nil { + return err + } + return nil +} + +// Convert_v1_IngressStatus_To_networking_IngressStatus is an autogenerated conversion function. +func Convert_v1_IngressStatus_To_networking_IngressStatus(in *v1.IngressStatus, out *networking.IngressStatus, s conversion.Scope) error { + return autoConvert_v1_IngressStatus_To_networking_IngressStatus(in, out, s) +} + +func autoConvert_networking_IngressStatus_To_v1_IngressStatus(in *networking.IngressStatus, out *v1.IngressStatus, s conversion.Scope) error { + if err := apiscorev1.Convert_core_LoadBalancerStatus_To_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, s); err != nil { + return err + } + return nil +} + +// Convert_networking_IngressStatus_To_v1_IngressStatus is an autogenerated conversion function. +func Convert_networking_IngressStatus_To_v1_IngressStatus(in *networking.IngressStatus, out *v1.IngressStatus, s conversion.Scope) error { + return autoConvert_networking_IngressStatus_To_v1_IngressStatus(in, out, s) +} + +func autoConvert_v1_IngressTLS_To_networking_IngressTLS(in *v1.IngressTLS, out *networking.IngressTLS, s conversion.Scope) error { + out.Hosts = *(*[]string)(unsafe.Pointer(&in.Hosts)) + out.SecretName = in.SecretName + return nil +} + +// Convert_v1_IngressTLS_To_networking_IngressTLS is an autogenerated conversion function. +func Convert_v1_IngressTLS_To_networking_IngressTLS(in *v1.IngressTLS, out *networking.IngressTLS, s conversion.Scope) error { + return autoConvert_v1_IngressTLS_To_networking_IngressTLS(in, out, s) +} + +func autoConvert_networking_IngressTLS_To_v1_IngressTLS(in *networking.IngressTLS, out *v1.IngressTLS, s conversion.Scope) error { + out.Hosts = *(*[]string)(unsafe.Pointer(&in.Hosts)) + out.SecretName = in.SecretName + return nil +} + +// Convert_networking_IngressTLS_To_v1_IngressTLS is an autogenerated conversion function. +func Convert_networking_IngressTLS_To_v1_IngressTLS(in *networking.IngressTLS, out *v1.IngressTLS, s conversion.Scope) error { + return autoConvert_networking_IngressTLS_To_v1_IngressTLS(in, out, s) +} + func autoConvert_v1_NetworkPolicy_To_networking_NetworkPolicy(in *v1.NetworkPolicy, out *networking.NetworkPolicy, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil { @@ -308,3 +817,25 @@ func autoConvert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec(in *networ func Convert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec(in *networking.NetworkPolicySpec, out *v1.NetworkPolicySpec, s conversion.Scope) error { return autoConvert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec(in, out, s) } + +func autoConvert_v1_ServiceBackendPort_To_networking_ServiceBackendPort(in *v1.ServiceBackendPort, out *networking.ServiceBackendPort, s conversion.Scope) error { + out.Name = in.Name + out.Number = in.Number + return nil +} + +// Convert_v1_ServiceBackendPort_To_networking_ServiceBackendPort is an autogenerated conversion function. +func Convert_v1_ServiceBackendPort_To_networking_ServiceBackendPort(in *v1.ServiceBackendPort, out *networking.ServiceBackendPort, s conversion.Scope) error { + return autoConvert_v1_ServiceBackendPort_To_networking_ServiceBackendPort(in, out, s) +} + +func autoConvert_networking_ServiceBackendPort_To_v1_ServiceBackendPort(in *networking.ServiceBackendPort, out *v1.ServiceBackendPort, s conversion.Scope) error { + out.Name = in.Name + out.Number = in.Number + return nil +} + +// Convert_networking_ServiceBackendPort_To_v1_ServiceBackendPort is an autogenerated conversion function. +func Convert_networking_ServiceBackendPort_To_v1_ServiceBackendPort(in *networking.ServiceBackendPort, out *v1.ServiceBackendPort, s conversion.Scope) error { + return autoConvert_networking_ServiceBackendPort_To_v1_ServiceBackendPort(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/BUILD index 1b99d063ba1..0c217d7a797 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/BUILD @@ -5,6 +5,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", srcs = [ + "conversion.go", "defaults.go", "doc.go", "register.go", @@ -21,6 +22,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", ], ) @@ -39,13 +41,20 @@ filegroup( go_test( name = "go_default_test", - srcs = ["defaults_test.go"], + srcs = [ + "conversion_test.go", + "defaults_test.go", + ], embed = [":go_default_library"], deps = [ "//pkg/api/legacyscheme:go_default_library", + "//pkg/apis/networking:go_default_library", "//pkg/apis/networking/install:go_default_library", "//staging/src/k8s.io/api/networking/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/github.com/stretchr/testify/require:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/conversion.go new file mode 100644 index 00000000000..42df29a408d --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/conversion.go @@ -0,0 +1,77 @@ +/* +Copyright 2020 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 v1beta1 + +import ( + v1beta1 "k8s.io/api/networking/v1beta1" + conversion "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/util/intstr" + networking "k8s.io/kubernetes/pkg/apis/networking" +) + +func Convert_v1beta1_IngressBackend_To_networking_IngressBackend(in *v1beta1.IngressBackend, out *networking.IngressBackend, s conversion.Scope) error { + if err := autoConvert_v1beta1_IngressBackend_To_networking_IngressBackend(in, out, s); err != nil { + return err + } + if len(in.ServiceName) > 0 || in.ServicePort.IntVal != 0 || in.ServicePort.StrVal != "" || in.ServicePort.Type == intstr.String { + out.Service = &networking.IngressServiceBackend{} + out.Service.Name = in.ServiceName + out.Service.Port.Name = in.ServicePort.StrVal + out.Service.Port.Number = in.ServicePort.IntVal + } + return nil +} + +func Convert_networking_IngressBackend_To_v1beta1_IngressBackend(in *networking.IngressBackend, out *v1beta1.IngressBackend, s conversion.Scope) error { + if err := autoConvert_networking_IngressBackend_To_v1beta1_IngressBackend(in, out, s); err != nil { + return err + } + if in.Service != nil { + out.ServiceName = in.Service.Name + if len(in.Service.Port.Name) > 0 { + out.ServicePort = intstr.FromString(in.Service.Port.Name) + } else { + out.ServicePort = intstr.FromInt(int(in.Service.Port.Number)) + } + } + return nil +} +func Convert_v1beta1_IngressSpec_To_networking_IngressSpec(in *v1beta1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error { + if err := autoConvert_v1beta1_IngressSpec_To_networking_IngressSpec(in, out, s); err != nil { + return nil + } + if in.Backend != nil { + out.DefaultBackend = &networking.IngressBackend{} + if err := Convert_v1beta1_IngressBackend_To_networking_IngressBackend(in.Backend, out.DefaultBackend, s); err != nil { + return err + } + } + return nil +} + +func Convert_networking_IngressSpec_To_v1beta1_IngressSpec(in *networking.IngressSpec, out *v1beta1.IngressSpec, s conversion.Scope) error { + if err := autoConvert_networking_IngressSpec_To_v1beta1_IngressSpec(in, out, s); err != nil { + return nil + } + if in.DefaultBackend != nil { + out.Backend = &v1beta1.IngressBackend{} + if err := Convert_networking_IngressBackend_To_v1beta1_IngressBackend(in.DefaultBackend, out.Backend, s); err != nil { + return err + } + } + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/zz_generated.conversion.go index c42d834a719..53e7c1bc231 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1beta1/zz_generated.conversion.go @@ -69,16 +69,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1beta1.IngressBackend)(nil), (*networking.IngressBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_IngressBackend_To_networking_IngressBackend(a.(*v1beta1.IngressBackend), b.(*networking.IngressBackend), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*networking.IngressBackend)(nil), (*v1beta1.IngressBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_networking_IngressBackend_To_v1beta1_IngressBackend(a.(*networking.IngressBackend), b.(*v1beta1.IngressBackend), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*v1beta1.IngressClass)(nil), (*networking.IngressClass)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_IngressClass_To_networking_IngressClass(a.(*v1beta1.IngressClass), b.(*networking.IngressClass), scope) }); err != nil { @@ -139,16 +129,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1beta1.IngressSpec)(nil), (*networking.IngressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_IngressSpec_To_networking_IngressSpec(a.(*v1beta1.IngressSpec), b.(*networking.IngressSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*networking.IngressSpec)(nil), (*v1beta1.IngressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_networking_IngressSpec_To_v1beta1_IngressSpec(a.(*networking.IngressSpec), b.(*v1beta1.IngressSpec), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*v1beta1.IngressStatus)(nil), (*networking.IngressStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_IngressStatus_To_networking_IngressStatus(a.(*v1beta1.IngressStatus), b.(*networking.IngressStatus), scope) }); err != nil { @@ -169,6 +149,26 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*networking.IngressBackend)(nil), (*v1beta1.IngressBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressBackend_To_v1beta1_IngressBackend(a.(*networking.IngressBackend), b.(*v1beta1.IngressBackend), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*networking.IngressSpec)(nil), (*v1beta1.IngressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_networking_IngressSpec_To_v1beta1_IngressSpec(a.(*networking.IngressSpec), b.(*v1beta1.IngressSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta1.IngressBackend)(nil), (*networking.IngressBackend)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_IngressBackend_To_networking_IngressBackend(a.(*v1beta1.IngressBackend), b.(*networking.IngressBackend), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta1.IngressSpec)(nil), (*networking.IngressSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_IngressSpec_To_networking_IngressSpec(a.(*v1beta1.IngressSpec), b.(*networking.IngressSpec), scope) + }); err != nil { + return err + } return nil } @@ -201,7 +201,17 @@ func Convert_networking_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in *networkin } func autoConvert_v1beta1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(in *v1beta1.HTTPIngressRuleValue, out *networking.HTTPIngressRuleValue, s conversion.Scope) error { - out.Paths = *(*[]networking.HTTPIngressPath)(unsafe.Pointer(&in.Paths)) + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]networking.HTTPIngressPath, len(*in)) + for i := range *in { + if err := Convert_v1beta1_HTTPIngressPath_To_networking_HTTPIngressPath(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Paths = nil + } return nil } @@ -211,7 +221,17 @@ func Convert_v1beta1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(in } func autoConvert_networking_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in *networking.HTTPIngressRuleValue, out *v1beta1.HTTPIngressRuleValue, s conversion.Scope) error { - out.Paths = *(*[]v1beta1.HTTPIngressPath)(unsafe.Pointer(&in.Paths)) + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]v1beta1.HTTPIngressPath, len(*in)) + for i := range *in { + if err := Convert_networking_HTTPIngressPath_To_v1beta1_HTTPIngressPath(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Paths = nil + } return nil } @@ -253,29 +273,18 @@ func Convert_networking_Ingress_To_v1beta1_Ingress(in *networking.Ingress, out * } func autoConvert_v1beta1_IngressBackend_To_networking_IngressBackend(in *v1beta1.IngressBackend, out *networking.IngressBackend, s conversion.Scope) error { - out.ServiceName = in.ServiceName - out.ServicePort = in.ServicePort + // WARNING: in.ServiceName requires manual conversion: does not exist in peer-type + // WARNING: in.ServicePort requires manual conversion: does not exist in peer-type out.Resource = (*core.TypedLocalObjectReference)(unsafe.Pointer(in.Resource)) return nil } -// Convert_v1beta1_IngressBackend_To_networking_IngressBackend is an autogenerated conversion function. -func Convert_v1beta1_IngressBackend_To_networking_IngressBackend(in *v1beta1.IngressBackend, out *networking.IngressBackend, s conversion.Scope) error { - return autoConvert_v1beta1_IngressBackend_To_networking_IngressBackend(in, out, s) -} - func autoConvert_networking_IngressBackend_To_v1beta1_IngressBackend(in *networking.IngressBackend, out *v1beta1.IngressBackend, s conversion.Scope) error { - out.ServiceName = in.ServiceName - out.ServicePort = in.ServicePort + // WARNING: in.Service requires manual conversion: does not exist in peer-type out.Resource = (*v1.TypedLocalObjectReference)(unsafe.Pointer(in.Resource)) return nil } -// Convert_networking_IngressBackend_To_v1beta1_IngressBackend is an autogenerated conversion function. -func Convert_networking_IngressBackend_To_v1beta1_IngressBackend(in *networking.IngressBackend, out *v1beta1.IngressBackend, s conversion.Scope) error { - return autoConvert_networking_IngressBackend_To_v1beta1_IngressBackend(in, out, s) -} - func autoConvert_v1beta1_IngressClass_To_networking_IngressClass(in *v1beta1.IngressClass, out *networking.IngressClass, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_IngressClassSpec_To_networking_IngressClassSpec(&in.Spec, &out.Spec, s); err != nil { @@ -415,7 +424,15 @@ func Convert_networking_IngressRule_To_v1beta1_IngressRule(in *networking.Ingres } func autoConvert_v1beta1_IngressRuleValue_To_networking_IngressRuleValue(in *v1beta1.IngressRuleValue, out *networking.IngressRuleValue, s conversion.Scope) error { - out.HTTP = (*networking.HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP)) + if in.HTTP != nil { + in, out := &in.HTTP, &out.HTTP + *out = new(networking.HTTPIngressRuleValue) + if err := Convert_v1beta1_HTTPIngressRuleValue_To_networking_HTTPIngressRuleValue(*in, *out, s); err != nil { + return err + } + } else { + out.HTTP = nil + } return nil } @@ -425,7 +442,15 @@ func Convert_v1beta1_IngressRuleValue_To_networking_IngressRuleValue(in *v1beta1 } func autoConvert_networking_IngressRuleValue_To_v1beta1_IngressRuleValue(in *networking.IngressRuleValue, out *v1beta1.IngressRuleValue, s conversion.Scope) error { - out.HTTP = (*v1beta1.HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP)) + if in.HTTP != nil { + in, out := &in.HTTP, &out.HTTP + *out = new(v1beta1.HTTPIngressRuleValue) + if err := Convert_networking_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(*in, *out, s); err != nil { + return err + } + } else { + out.HTTP = nil + } return nil } @@ -436,30 +461,40 @@ func Convert_networking_IngressRuleValue_To_v1beta1_IngressRuleValue(in *network func autoConvert_v1beta1_IngressSpec_To_networking_IngressSpec(in *v1beta1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error { out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) - out.Backend = (*networking.IngressBackend)(unsafe.Pointer(in.Backend)) + // WARNING: in.Backend requires manual conversion: does not exist in peer-type out.TLS = *(*[]networking.IngressTLS)(unsafe.Pointer(&in.TLS)) - out.Rules = *(*[]networking.IngressRule)(unsafe.Pointer(&in.Rules)) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]networking.IngressRule, len(*in)) + for i := range *in { + if err := Convert_v1beta1_IngressRule_To_networking_IngressRule(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Rules = nil + } return nil } -// Convert_v1beta1_IngressSpec_To_networking_IngressSpec is an autogenerated conversion function. -func Convert_v1beta1_IngressSpec_To_networking_IngressSpec(in *v1beta1.IngressSpec, out *networking.IngressSpec, s conversion.Scope) error { - return autoConvert_v1beta1_IngressSpec_To_networking_IngressSpec(in, out, s) -} - func autoConvert_networking_IngressSpec_To_v1beta1_IngressSpec(in *networking.IngressSpec, out *v1beta1.IngressSpec, s conversion.Scope) error { out.IngressClassName = (*string)(unsafe.Pointer(in.IngressClassName)) - out.Backend = (*v1beta1.IngressBackend)(unsafe.Pointer(in.Backend)) + // WARNING: in.DefaultBackend requires manual conversion: does not exist in peer-type out.TLS = *(*[]v1beta1.IngressTLS)(unsafe.Pointer(&in.TLS)) - out.Rules = *(*[]v1beta1.IngressRule)(unsafe.Pointer(&in.Rules)) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]v1beta1.IngressRule, len(*in)) + for i := range *in { + if err := Convert_networking_IngressRule_To_v1beta1_IngressRule(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Rules = nil + } return nil } -// Convert_networking_IngressSpec_To_v1beta1_IngressSpec is an autogenerated conversion function. -func Convert_networking_IngressSpec_To_v1beta1_IngressSpec(in *networking.IngressSpec, out *v1beta1.IngressSpec, s conversion.Scope) error { - return autoConvert_networking_IngressSpec_To_v1beta1_IngressSpec(in, out, s) -} - func autoConvert_v1beta1_IngressStatus_To_networking_IngressStatus(in *v1beta1.IngressStatus, out *networking.IngressStatus, s conversion.Scope) error { if err := corev1.Convert_v1_LoadBalancerStatus_To_core_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, s); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/networking/validation/BUILD index 6ef836b2bcf..f7e5a2b2da8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/networking/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/validation/BUILD @@ -43,6 +43,8 @@ go_library( "//pkg/apis/core/validation:go_default_library", "//pkg/apis/networking:go_default_library", "//pkg/features:go_default_library", + "//staging/src/k8s.io/api/extensions/v1beta1:go_default_library", + "//staging/src/k8s.io/api/networking/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/validation/path:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/validation/validation.go index 3b2ebeeb8b8..b053d279e64 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/networking/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/validation/validation.go @@ -19,9 +19,10 @@ package validation import ( "fmt" "net" - "regexp" "strings" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" + networkingv1beta1 "k8s.io/api/networking/v1beta1" apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" pathvalidation "k8s.io/apimachinery/pkg/api/validation/path" unversionedvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" @@ -198,8 +199,11 @@ var ValidateIngressName = apimachineryvalidation.NameIsDNSSubdomain // IngressValidationOptions cover beta to GA transitions for HTTP PathType type IngressValidationOptions struct { - requireRegexPath bool - allowResourceBackend bool + // AllowInvalidSecretName indicates whether spec.tls[*].secretName values that are not valid Secret names should be allowed + AllowInvalidSecretName bool + + // AllowInvalidWildcardHostRule indicates whether invalid rule values are allowed in rules with wildcard hostnames + AllowInvalidWildcardHostRule bool } // ValidateIngress validates Ingresses on create and update. @@ -214,10 +218,8 @@ func ValidateIngressCreate(ingress *networking.Ingress, requestGV schema.GroupVe allErrs := field.ErrorList{} var opts IngressValidationOptions opts = IngressValidationOptions{ - // TODO(robscott): Remove regex validation for 1.19. - requireRegexPath: true, - // TODO(cmluciano): Allow resource backend for 1.19. - allowResourceBackend: false, + AllowInvalidSecretName: allowInvalidSecretName(requestGV, nil), + AllowInvalidWildcardHostRule: allowInvalidWildcardHostRule(requestGV, nil), } allErrs = append(allErrs, validateIngress(ingress, opts, requestGV)...) annotationVal, annotationIsSet := ingress.Annotations[annotationIngressClass] @@ -233,31 +235,34 @@ func ValidateIngressUpdate(ingress, oldIngress *networking.Ingress, requestGV sc allErrs := apivalidation.ValidateObjectMetaUpdate(&ingress.ObjectMeta, &oldIngress.ObjectMeta, field.NewPath("metadata")) var opts IngressValidationOptions opts = IngressValidationOptions{ - // TODO(robscott): Remove regex validation for 1.19. - // Only require regex path validation for this Ingress if the previous - // version of the Ingress also passed that validation. - requireRegexPath: allPathsPassRegexValidation(oldIngress), - allowResourceBackend: resourceBackendPresent(oldIngress), + AllowInvalidSecretName: allowInvalidSecretName(requestGV, oldIngress), + AllowInvalidWildcardHostRule: allowInvalidWildcardHostRule(requestGV, oldIngress), } allErrs = append(allErrs, validateIngress(ingress, opts, requestGV)...) return allErrs } -func validateIngressTLS(spec *networking.IngressSpec, fldPath *field.Path) field.ErrorList { +func validateIngressTLS(spec *networking.IngressSpec, fldPath *field.Path, opts IngressValidationOptions) field.ErrorList { allErrs := field.ErrorList{} // TODO: Perform a more thorough validation of spec.TLS.Hosts that takes // the wildcard spec from RFC 6125 into account. - for _, itls := range spec.TLS { + for tlsIndex, itls := range spec.TLS { for i, host := range itls.Hosts { if strings.Contains(host, "*") { for _, msg := range validation.IsWildcardDNS1123Subdomain(host) { - allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("hosts"), host, msg)) + allErrs = append(allErrs, field.Invalid(fldPath.Index(tlsIndex).Child("hosts").Index(i), host, msg)) } continue } for _, msg := range validation.IsDNS1123Subdomain(host) { - allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("hosts"), host, msg)) + allErrs = append(allErrs, field.Invalid(fldPath.Index(tlsIndex).Child("hosts").Index(i), host, msg)) + } + } + + if !opts.AllowInvalidSecretName { + for _, msg := range validateTLSSecretName(itls.SecretName) { + allErrs = append(allErrs, field.Invalid(fldPath.Index(tlsIndex).Child("secretName"), itls.SecretName, msg)) } } } @@ -265,21 +270,32 @@ func validateIngressTLS(spec *networking.IngressSpec, fldPath *field.Path) field return allErrs } +// defaultBackendFieldName returns the name of the field used for defaultBackend +// in the provided GroupVersion. +func defaultBackendFieldName(gv schema.GroupVersion) string { + switch gv { + case networkingv1beta1.SchemeGroupVersion, extensionsv1beta1.SchemeGroupVersion: + return "backend" + default: + return "defaultBackend" + } +} + // ValidateIngressSpec tests if required fields in the IngressSpec are set. func ValidateIngressSpec(spec *networking.IngressSpec, fldPath *field.Path, opts IngressValidationOptions, requestGV schema.GroupVersion) field.ErrorList { allErrs := field.ErrorList{} - if len(spec.Rules) == 0 && spec.Backend == nil { - errMsg := "either `backend` or `rules` must be specified" + if len(spec.Rules) == 0 && spec.DefaultBackend == nil { + errMsg := fmt.Sprintf("either `%s` or `rules` must be specified", defaultBackendFieldName(requestGV)) allErrs = append(allErrs, field.Invalid(fldPath, spec.Rules, errMsg)) } - if spec.Backend != nil { - allErrs = append(allErrs, validateIngressBackend(spec.Backend, fldPath.Child("backend"), opts)...) + if spec.DefaultBackend != nil { + allErrs = append(allErrs, validateIngressBackend(spec.DefaultBackend, fldPath.Child(defaultBackendFieldName(requestGV)), opts, requestGV)...) } if len(spec.Rules) > 0 { - allErrs = append(allErrs, validateIngressRules(spec.Rules, fldPath.Child("rules"), opts)...) + allErrs = append(allErrs, validateIngressRules(spec.Rules, fldPath.Child("rules"), opts, requestGV)...) } if len(spec.TLS) > 0 { - allErrs = append(allErrs, validateIngressTLS(spec, fldPath.Child("tls"))...) + allErrs = append(allErrs, validateIngressTLS(spec, fldPath.Child("tls"), opts)...) } if spec.IngressClassName != nil { for _, msg := range ValidateIngressClassName(*spec.IngressClassName, false) { @@ -296,12 +312,13 @@ func ValidateIngressStatusUpdate(ingress, oldIngress *networking.Ingress) field. return allErrs } -func validateIngressRules(ingressRules []networking.IngressRule, fldPath *field.Path, opts IngressValidationOptions) field.ErrorList { +func validateIngressRules(ingressRules []networking.IngressRule, fldPath *field.Path, opts IngressValidationOptions, requestGV schema.GroupVersion) field.ErrorList { allErrs := field.ErrorList{} if len(ingressRules) == 0 { return append(allErrs, field.Required(fldPath, "")) } for i, ih := range ingressRules { + wildcardHost := false if len(ih.Host) > 0 { if isIP := (net.ParseIP(ih.Host) != nil); isIP { allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("host"), ih.Host, "must be a DNS name, not an IP address")) @@ -312,37 +329,41 @@ func validateIngressRules(ingressRules []networking.IngressRule, fldPath *field. for _, msg := range validation.IsWildcardDNS1123Subdomain(ih.Host) { allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("host"), ih.Host, msg)) } - continue - } - for _, msg := range validation.IsDNS1123Subdomain(ih.Host) { - allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("host"), ih.Host, msg)) + wildcardHost = true + } else { + for _, msg := range validation.IsDNS1123Subdomain(ih.Host) { + allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("host"), ih.Host, msg)) + } } } - allErrs = append(allErrs, validateIngressRuleValue(&ih.IngressRuleValue, fldPath.Index(0), opts)...) + + if !wildcardHost || !opts.AllowInvalidWildcardHostRule { + allErrs = append(allErrs, validateIngressRuleValue(&ih.IngressRuleValue, fldPath.Index(i), opts, requestGV)...) + } } return allErrs } -func validateIngressRuleValue(ingressRule *networking.IngressRuleValue, fldPath *field.Path, opts IngressValidationOptions) field.ErrorList { +func validateIngressRuleValue(ingressRule *networking.IngressRuleValue, fldPath *field.Path, opts IngressValidationOptions, requestGV schema.GroupVersion) field.ErrorList { allErrs := field.ErrorList{} if ingressRule.HTTP != nil { - allErrs = append(allErrs, validateHTTPIngressRuleValue(ingressRule.HTTP, fldPath.Child("http"), opts)...) + allErrs = append(allErrs, validateHTTPIngressRuleValue(ingressRule.HTTP, fldPath.Child("http"), opts, requestGV)...) } return allErrs } -func validateHTTPIngressRuleValue(httpIngressRuleValue *networking.HTTPIngressRuleValue, fldPath *field.Path, opts IngressValidationOptions) field.ErrorList { +func validateHTTPIngressRuleValue(httpIngressRuleValue *networking.HTTPIngressRuleValue, fldPath *field.Path, opts IngressValidationOptions, requestGV schema.GroupVersion) field.ErrorList { allErrs := field.ErrorList{} if len(httpIngressRuleValue.Paths) == 0 { allErrs = append(allErrs, field.Required(fldPath.Child("paths"), "")) } for i, path := range httpIngressRuleValue.Paths { - allErrs = append(allErrs, validateHTTPIngressPath(&path, fldPath.Child("paths").Index(i), opts)...) + allErrs = append(allErrs, validateHTTPIngressPath(&path, fldPath.Child("paths").Index(i), opts, requestGV)...) } return allErrs } -func validateHTTPIngressPath(path *networking.HTTPIngressPath, fldPath *field.Path, opts IngressValidationOptions) field.ErrorList { +func validateHTTPIngressPath(path *networking.HTTPIngressPath, fldPath *field.Path, opts IngressValidationOptions, requestGV schema.GroupVersion) field.ErrorList { allErrs := field.ErrorList{} if path.PathType == nil { @@ -376,42 +397,82 @@ func validateHTTPIngressPath(path *networking.HTTPIngressPath, fldPath *field.Pa default: allErrs = append(allErrs, field.NotSupported(fldPath.Child("pathType"), *path.PathType, supportedPathTypes.List())) } - - // TODO(robscott): Remove regex validation for 1.19. - if opts.requireRegexPath { - _, err := regexp.CompilePOSIX(path.Path) - if err != nil { - allErrs = append(allErrs, field.Invalid(fldPath.Child("path"), path.Path, "must be a valid regex")) - } - } - - allErrs = append(allErrs, validateIngressBackend(&path.Backend, fldPath.Child("backend"), opts)...) + allErrs = append(allErrs, validateIngressBackend(&path.Backend, fldPath.Child("backend"), opts, requestGV)...) return allErrs } +// numberPortField returns the field path to a service port number field +// relative to a backend struct in the provided GroupVersion +func numberPortField(numberPortFieldPath *field.Path, gv schema.GroupVersion) *field.Path { + switch gv { + case networkingv1beta1.SchemeGroupVersion, extensionsv1beta1.SchemeGroupVersion: + return numberPortFieldPath.Child("servicePort") + default: + return numberPortFieldPath.Child("service", "port", "number") + } +} + +// namedPortField returns the field path to a service port name field +// relative to a backend struct in the provided GroupVersion +func namedPortField(namedPortFieldPath *field.Path, gv schema.GroupVersion) *field.Path { + switch gv { + case networkingv1beta1.SchemeGroupVersion, extensionsv1beta1.SchemeGroupVersion: + return namedPortFieldPath.Child("servicePort") + default: + return namedPortFieldPath.Child("service", "port", "name") + } +} + +// serviceNameFieldPath returns the name of the field used for a +// service name in the provided GroupVersion. +func serviceNameFieldPath(backendFieldPath *field.Path, gv schema.GroupVersion) *field.Path { + switch gv { + case networkingv1beta1.SchemeGroupVersion, extensionsv1beta1.SchemeGroupVersion: + return backendFieldPath.Child("serviceName") + default: + return backendFieldPath.Child("service", "name") + } +} + // validateIngressBackend tests if a given backend is valid. -func validateIngressBackend(backend *networking.IngressBackend, fldPath *field.Path, opts IngressValidationOptions) field.ErrorList { +func validateIngressBackend(backend *networking.IngressBackend, fldPath *field.Path, opts IngressValidationOptions, requestGV schema.GroupVersion) field.ErrorList { allErrs := field.ErrorList{} hasResourceBackend := backend.Resource != nil - hasServiceBackend := len(backend.ServiceName) > 0 || backend.ServicePort.IntVal != 0 || len(backend.ServicePort.StrVal) > 0 + hasServiceBackend := backend.Service != nil switch { case hasResourceBackend && hasServiceBackend: return append(allErrs, field.Invalid(fldPath, "", "cannot set both resource and service backends")) - case hasResourceBackend && !opts.allowResourceBackend: - return append(allErrs, field.Forbidden(fldPath.Child("resource"), "not supported; only service backends are supported in this version")) case hasResourceBackend: allErrs = append(allErrs, validateIngressTypedLocalObjectReference(backend.Resource, fldPath.Child("resource"))...) - default: - if len(backend.ServiceName) == 0 { - return append(allErrs, field.Required(fldPath.Child("serviceName"), "")) - } - for _, msg := range apivalidation.ValidateServiceName(backend.ServiceName, false) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("serviceName"), backend.ServiceName, msg)) - } - allErrs = append(allErrs, apivalidation.ValidatePortNumOrName(backend.ServicePort, fldPath.Child("servicePort"))...) + case hasServiceBackend: + if len(backend.Service.Name) == 0 { + allErrs = append(allErrs, field.Required(serviceNameFieldPath(fldPath, requestGV), "")) + } else { + for _, msg := range apivalidation.ValidateServiceName(backend.Service.Name, false) { + allErrs = append(allErrs, field.Invalid(serviceNameFieldPath(fldPath, requestGV), backend.Service.Name, msg)) + } + } + + hasPortName := len(backend.Service.Port.Name) > 0 + hasPortNumber := backend.Service.Port.Number != 0 + if hasPortName && hasPortNumber { + allErrs = append(allErrs, field.Invalid(fldPath, "", "cannot set both port name & port number")) + } else if hasPortName { + for _, msg := range validation.IsValidPortName(backend.Service.Port.Name) { + allErrs = append(allErrs, field.Invalid(namedPortField(fldPath, requestGV), backend.Service.Port.Name, msg)) + } + } else if hasPortNumber { + for _, msg := range validation.IsValidPortNum(int(backend.Service.Port.Number)) { + allErrs = append(allErrs, field.Invalid(numberPortField(fldPath, requestGV), backend.Service.Port.Number, msg)) + } + } else { + allErrs = append(allErrs, field.Required(fldPath, "port name or number is required")) + } + default: + allErrs = append(allErrs, field.Invalid(fldPath, "", "resource or service backend is required")) } return allErrs } @@ -485,35 +546,38 @@ func validateIngressTypedLocalObjectReference(params *api.TypedLocalObjectRefere return allErrs } -// allPathsPassRegexValidation returns true if the Ingress has paths that all -// match the Ingress path validation with requireRegexPath enabled. -func allPathsPassRegexValidation(ingress *networking.Ingress) bool { - for _, rule := range ingress.Spec.Rules { - if rule.HTTP == nil { - continue - } - for _, path := range rule.HTTP.Paths { - if len(path.Path) == 0 { - continue - } - if _, err := regexp.CompilePOSIX(path.Path); err != nil { - return false - } - } - } - return true -} - -func resourceBackendPresent(ingress *networking.Ingress) bool { - if ingress.Spec.Backend != nil && ingress.Spec.Backend.Resource != nil { +func allowInvalidSecretName(gv schema.GroupVersion, oldIngress *networking.Ingress) bool { + if gv == networkingv1beta1.SchemeGroupVersion || gv == extensionsv1beta1.SchemeGroupVersion { + // backwards compatibility with released API versions that allowed invalid names return true } - for _, rule := range ingress.Spec.Rules { - if rule.HTTP == nil { - continue - } - for _, path := range rule.HTTP.Paths { - if path.Backend.Resource != nil { + if oldIngress != nil { + for _, tls := range oldIngress.Spec.TLS { + if len(validateTLSSecretName(tls.SecretName)) > 0 { + // backwards compatibility with existing persisted object + return true + } + } + } + return false +} + +func validateTLSSecretName(name string) []string { + if len(name) == 0 { + return nil + } + return apivalidation.ValidateSecretName(name, false) +} + +func allowInvalidWildcardHostRule(gv schema.GroupVersion, oldIngress *networking.Ingress) bool { + if gv == networkingv1beta1.SchemeGroupVersion || gv == extensionsv1beta1.SchemeGroupVersion { + // backwards compatibility with released API versions that allowed invalid rules + return true + } + if oldIngress != nil { + for _, rule := range oldIngress.Spec.Rules { + if strings.Contains(rule.Host, "*") && len(validateIngressRuleValue(&rule.IngressRuleValue, nil, IngressValidationOptions{}, gv)) > 0 { + // backwards compatibility with existing invalid data return true } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go index 398de26fe57..a81c0fac732 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go @@ -124,7 +124,11 @@ func (in *Ingress) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IngressBackend) DeepCopyInto(out *IngressBackend) { *out = *in - out.ServicePort = in.ServicePort + if in.Service != nil { + in, out := &in.Service, &out.Service + *out = new(IngressServiceBackend) + **out = **in + } if in.Resource != nil { in, out := &in.Resource, &out.Resource *out = new(core.TypedLocalObjectReference) @@ -295,6 +299,23 @@ func (in *IngressRuleValue) DeepCopy() *IngressRuleValue { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressServiceBackend) DeepCopyInto(out *IngressServiceBackend) { + *out = *in + out.Port = in.Port + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressServiceBackend. +func (in *IngressServiceBackend) DeepCopy() *IngressServiceBackend { + if in == nil { + return nil + } + out := new(IngressServiceBackend) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IngressSpec) DeepCopyInto(out *IngressSpec) { *out = *in @@ -303,8 +324,8 @@ func (in *IngressSpec) DeepCopyInto(out *IngressSpec) { *out = new(string) **out = **in } - if in.Backend != nil { - in, out := &in.Backend, &out.Backend + if in.DefaultBackend != nil { + in, out := &in.DefaultBackend, &out.DefaultBackend *out = new(IngressBackend) (*in).DeepCopyInto(*out) } @@ -585,3 +606,19 @@ func (in *NetworkPolicySpec) DeepCopy() *NetworkPolicySpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceBackendPort) DeepCopyInto(out *ServiceBackendPort) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceBackendPort. +func (in *ServiceBackendPort) DeepCopy() *ServiceBackendPort { + if in == nil { + return nil + } + out := new(ServiceBackendPort) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go index b3b64b0efac..5dcee4cdac5 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go @@ -157,7 +157,7 @@ type PodSecurityPolicySpec struct { // To allow all capabilities you may use '*'. // +optional AllowedCapabilities []api.Capability - // Volumes is a white list of allowed volume plugins. Empty indicates that + // Volumes is an allowlist of volume plugins. Empty indicates that // no volumes may be used. To allow all volumes you may use '*'. // +optional Volumes []FSType @@ -200,23 +200,23 @@ type PodSecurityPolicySpec struct { // privilege escalation. If unspecified, defaults to true. // +optional AllowPrivilegeEscalation bool - // AllowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used. + // AllowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used. // +optional AllowedHostPaths []AllowedHostPath - // AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all + // AllowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes // is allowed in the "Volumes" field. // +optional AllowedFlexVolumes []AllowedFlexVolume - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. + // AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. // An empty value indicates that any CSI driver can be used for inline ephemeral volumes. - // This is an alpha field, and is only honored if the API server enables the CSIInlineVolume feature gate. + // This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate. // +optional AllowedCSIDrivers []AllowedCSIDriver // AllowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. // Each entry is either a plain sysctl name or ends in "*" in which case it is considered // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. - // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. + // Kubelet has to allowlist all unsafe sysctls explicitly to avoid rejection. // // Examples: // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. @@ -232,7 +232,7 @@ type PodSecurityPolicySpec struct { // e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. // +optional ForbiddenSysctls []string - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. + // AllowedProcMountTypes is an allowlist of ProcMountTypes. // Empty or nil indicates that only the DefaultProcMountType may be used. // +optional AllowedProcMountTypes []api.ProcMountType @@ -449,7 +449,7 @@ const ( // RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses // for a pod. type RuntimeClassStrategyOptions struct { - // allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. + // allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. // A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the // list. An empty list requires the RuntimeClassName field to be unset. AllowedRuntimeClassNames []string diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/BUILD index 76b6fe1d96f..a1d627225c1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/BUILD @@ -18,6 +18,7 @@ go_library( "//pkg/security/apparmor:go_default_library", "//pkg/security/podsecuritypolicy/seccomp:go_default_library", "//pkg/security/podsecuritypolicy/util:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", @@ -32,9 +33,9 @@ go_test( deps = [ "//pkg/apis/core:go_default_library", "//pkg/apis/policy:go_default_library", - "//pkg/security/apparmor:go_default_library", "//pkg/security/podsecuritypolicy/seccomp:go_default_library", "//pkg/security/podsecuritypolicy/util:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/validation.go index 149ad6c3edf..35281eeadbe 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/validation.go @@ -22,6 +22,7 @@ import ( "regexp" "strings" + "k8s.io/api/core/v1" apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" unversionedvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/util/sets" @@ -129,15 +130,15 @@ func ValidatePodSecurityPolicySpec(spec *policy.PodSecurityPolicySpec, fldPath * func ValidatePodSecurityPolicySpecificAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} - if p := annotations[apparmor.DefaultProfileAnnotationKey]; p != "" { + if p := annotations[v1.AppArmorBetaDefaultProfileAnnotationKey]; p != "" { if err := apparmor.ValidateProfileFormat(p); err != nil { - allErrs = append(allErrs, field.Invalid(fldPath.Key(apparmor.DefaultProfileAnnotationKey), p, err.Error())) + allErrs = append(allErrs, field.Invalid(fldPath.Key(v1.AppArmorBetaDefaultProfileAnnotationKey), p, err.Error())) } } - if allowed := annotations[apparmor.AllowedProfilesAnnotationKey]; allowed != "" { + if allowed := annotations[v1.AppArmorBetaAllowedProfilesAnnotationKey]; allowed != "" { for _, p := range strings.Split(allowed, ",") { if err := apparmor.ValidateProfileFormat(p); err != nil { - allErrs = append(allErrs, field.Invalid(fldPath.Key(apparmor.AllowedProfilesAnnotationKey), allowed, err.Error())) + allErrs = append(allErrs, field.Invalid(fldPath.Key(v1.AppArmorBetaAllowedProfilesAnnotationKey), allowed, err.Error())) } } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/scheduling/types.go b/vendor/k8s.io/kubernetes/pkg/apis/scheduling/types.go index 23bfad5449e..5a3d533a7f1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/scheduling/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/scheduling/types.go @@ -69,7 +69,7 @@ type PriorityClass struct { Description string // PreemptionPolicy it the Policy for preempting pods with lower priority. - // This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature. + // This field is beta-level. // +optional PreemptionPolicy *core.PreemptionPolicy } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.defaults.go index b8559cf3ef3..bb91dd766fa 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.defaults.go @@ -94,6 +94,13 @@ func SetObjectDefaults_PodPreset(in *v1alpha1.PodPreset) { if a.VolumeSource.ScaleIO != nil { v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO) } + if a.VolumeSource.Ephemeral != nil { + if a.VolumeSource.Ephemeral.VolumeClaimTemplate != nil { + v1.SetDefaults_PersistentVolumeClaimSpec(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Limits) + v1.SetDefaults_ResourceList(&a.VolumeSource.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests) + } + } } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/validation/validation.go index 5376cf4fc7c..f0a8db49b21 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/settings/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/validation/validation.go @@ -44,7 +44,7 @@ func ValidatePodPresetSpec(spec *settings.PodPresetSpec, fldPath *field.Path) fi allErrs = append(allErrs, field.Required(fldPath.Child("volumes", "env", "envFrom", "volumeMounts"), "must specify at least one")) } - vols, vErrs := apivalidation.ValidateVolumes(spec.Volumes, fldPath.Child("volumes")) + vols, vErrs := apivalidation.ValidateVolumes(spec.Volumes, nil, fldPath.Child("volumes")) allErrs = append(allErrs, vErrs...) allErrs = append(allErrs, apivalidation.ValidateEnv(spec.Env, fldPath.Child("env"))...) allErrs = append(allErrs, apivalidation.ValidateEnvFrom(spec.EnvFrom, fldPath.Child("envFrom"))...) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/storage/BUILD index 2e7f381c2e8..6224e0a493c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/BUILD @@ -16,6 +16,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/apis/storage", deps = [ "//pkg/apis/core:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/storage/OWNERS index 7562f04b86a..ec9af6c5dd0 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/OWNERS @@ -1,5 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners +approvers: +- sig-storage-api-approvers reviewers: -- deads2k -- mbohlool +- sig-storage-api-reviewers +labels: +- sig/storage diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/register.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/register.go index fffba5fc5a2..bf59e88cd1e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/register.go @@ -52,6 +52,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &CSINodeList{}, &CSIDriver{}, &CSIDriverList{}, + &CSIStorageCapacity{}, + &CSIStorageCapacityList{}, ) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/types.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/types.go index 78185dfdbdb..15befc40266 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/types.go @@ -17,6 +17,7 @@ limitations under the License. package storage import ( + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "k8s.io/kubernetes/pkg/apis/core" ) @@ -276,6 +277,14 @@ type CSIDriverSpec struct { // +optional AttachRequired *bool + // Defines if the underlying volume supports changing ownership and + // permission of the volume before being mounted. + // Refer to the specific FSGroupPolicy values for additional details. + // This field is alpha-level, and is only honored by servers + // that enable the CSIVolumeFSGroupPolicy feature gate. + // +optional + FSGroupPolicy *FSGroupPolicy + // If set to true, podInfoOnMount indicates this CSI volume driver // requires additional pod information (like podName, podUID, etc.) during // mount operations. @@ -308,8 +317,59 @@ type CSIDriverSpec struct { // more modes may be added in the future. // +optional VolumeLifecycleModes []VolumeLifecycleMode + + // If set to true, storageCapacity indicates that the CSI + // volume driver wants pod scheduling to consider the storage + // capacity that the driver deployment will report by creating + // CSIStorageCapacity objects with capacity information. + // + // The check can be enabled immediately when deploying a driver. + // In that case, provisioning new volumes with late binding + // will pause until the driver deployment has published + // some suitable CSIStorageCapacity object. + // + // Alternatively, the driver can be deployed with the field + // unset or false and it can be flipped later when storage + // capacity information has been published. + // + // This is an alpha field and only available when the CSIStorageCapacity + // feature is enabled. The default is false. + // + // +optional + StorageCapacity *bool } +// FSGroupPolicy specifies if a CSI Driver supports modifying +// volume ownership and permissions of the volume to be mounted. +// More modes may be added in the future. +type FSGroupPolicy string + +const ( + // ReadWriteOnceWithFSTypeFSGroupPolicy indicates that each volume will be examined + // to determine if the volume ownership and permissions + // should be modified. If a fstype is defined and the volume's access mode + // contains ReadWriteOnce, then the defined fsGroup will be applied. + // This mode should be defined if it's expected that the + // fsGroup may need to be modified depending on the pod's SecurityPolicy. + // This is the default behavior if no other FSGroupPolicy is defined. + ReadWriteOnceWithFSTypeFSGroupPolicy FSGroupPolicy = "ReadWriteOnceWithFSType" + + // FileFSGroupPolicy indicates that CSI driver supports volume ownership + // and permission change via fsGroup, and Kubernetes may use fsGroup + // to change permissions and ownership of the volume to match user requested fsGroup in + // the pod's SecurityPolicy regardless of fstype or access mode. + // This mode should be defined if the fsGroup is expected to always change on mount + FileFSGroupPolicy FSGroupPolicy = "File" + + // NoneFSGroupPolicy indicates that volumes will be mounted without performing + // any ownership or permission modifications, as the CSIDriver does not support + // these operations. + // This mode should be selected if the CSIDriver does not support fsGroup modifications, + // for example when Kubernetes cannot change ownership and permissions on a volume due + // to root-squash settings on a NFS volume. + NoneFSGroupPolicy FSGroupPolicy = "None" +) + // VolumeLifecycleMode specifies how a CSI volume is used in Kubernetes. // More modes may be added in the future. type VolumeLifecycleMode string @@ -424,3 +484,81 @@ type CSINodeList struct { // items is the list of CSINode Items []CSINode } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. +// For a given StorageClass, this describes the available capacity in a +// particular topology segment. This can be used when considering where to +// instantiate new PersistentVolumes. +// +// For example this can express things like: +// - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" +// - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for +// a certain combination: +// - no object exists with suitable topology and storage class name +// - such an object exists, but the capacity is unset +// - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// This is an alpha feature and only available when the CSIStorageCapacity feature is enabled. +type CSIStorageCapacity struct { + metav1.TypeMeta + // Standard object's metadata. The name has no particular meaning. It must be + // be a DNS subdomain (dots allowed, 253 characters). To ensure that + // there are no conflicts with other CSI drivers on the cluster, the recommendation + // is to use csisc-, a generated name, or a reverse-domain name which ends + // with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta + + // NodeTopology defines which nodes have access to the storage + // for which capacity was reported. If not set, the storage is + // not accessible from any node in the cluster. If empty, the + // storage is accessible from all nodes. This field is + // immutable. + // + // +optional + NodeTopology *metav1.LabelSelector + + // The name of the StorageClass that the reported capacity applies to. + // It must meet the same requirements as the name of a StorageClass + // object (non-empty, DNS subdomain). If that object no longer exists, + // the CSIStorageCapacity object is obsolete and should be removed by its + // creator. + // This field is immutable. + StorageClassName string + + // Capacity is the value reported by the CSI driver in its GetCapacityResponse + // for a GetCapacityRequest with topology and parameters that match the + // previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: + // The available capacity, in bytes, of the storage that can be used + // to provision volumes. If not set, that information is currently + // unavailable and treated like zero capacity. + // + // +optional + Capacity *resource.Quantity +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type CSIStorageCapacityList struct { + metav1.TypeMeta + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ListMeta + + // Items is the list of CSIStorageCapacity objects. + Items []CSIStorageCapacity +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/BUILD index 2fc673d4e1a..e76d0c1bde7 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/BUILD @@ -53,7 +53,10 @@ go_test( deps = [ "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/storage/install:go_default_library", + "//pkg/features:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/defaults.go index 856ed98e2d5..f5b4182521b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/defaults.go @@ -49,6 +49,14 @@ func SetDefaults_CSIDriver(obj *storagev1.CSIDriver) { obj.Spec.PodInfoOnMount = new(bool) *(obj.Spec.PodInfoOnMount) = false } + if obj.Spec.StorageCapacity == nil && utilfeature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity) { + obj.Spec.StorageCapacity = new(bool) + *(obj.Spec.StorageCapacity) = false + } + if obj.Spec.FSGroupPolicy == nil && utilfeature.DefaultFeatureGate.Enabled(features.CSIVolumeFSGroupPolicy) { + obj.Spec.FSGroupPolicy = new(storagev1.FSGroupPolicy) + *obj.Spec.FSGroupPolicy = storagev1.ReadWriteOnceWithFSTypeFSGroupPolicy + } if len(obj.Spec.VolumeLifecycleModes) == 0 && utilfeature.DefaultFeatureGate.Enabled(features.CSIInlineVolume) { obj.Spec.VolumeLifecycleModes = append(obj.Spec.VolumeLifecycleModes, storagev1.VolumeLifecyclePersistent) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.conversion.go index 07662262015..4ac067e3f8e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.conversion.go @@ -230,7 +230,17 @@ func Convert_storage_CSIDriver_To_v1_CSIDriver(in *storage.CSIDriver, out *v1.CS func autoConvert_v1_CSIDriverList_To_storage_CSIDriverList(in *v1.CSIDriverList, out *storage.CSIDriverList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]storage.CSIDriver)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]storage.CSIDriver, len(*in)) + for i := range *in { + if err := Convert_v1_CSIDriver_To_storage_CSIDriver(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } @@ -241,7 +251,17 @@ func Convert_v1_CSIDriverList_To_storage_CSIDriverList(in *v1.CSIDriverList, out func autoConvert_storage_CSIDriverList_To_v1_CSIDriverList(in *storage.CSIDriverList, out *v1.CSIDriverList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1.CSIDriver)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1.CSIDriver, len(*in)) + for i := range *in { + if err := Convert_storage_CSIDriver_To_v1_CSIDriver(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } @@ -254,6 +274,8 @@ func autoConvert_v1_CSIDriverSpec_To_storage_CSIDriverSpec(in *v1.CSIDriverSpec, out.AttachRequired = (*bool)(unsafe.Pointer(in.AttachRequired)) out.PodInfoOnMount = (*bool)(unsafe.Pointer(in.PodInfoOnMount)) out.VolumeLifecycleModes = *(*[]storage.VolumeLifecycleMode)(unsafe.Pointer(&in.VolumeLifecycleModes)) + out.StorageCapacity = (*bool)(unsafe.Pointer(in.StorageCapacity)) + out.FSGroupPolicy = (*storage.FSGroupPolicy)(unsafe.Pointer(in.FSGroupPolicy)) return nil } @@ -264,8 +286,10 @@ func Convert_v1_CSIDriverSpec_To_storage_CSIDriverSpec(in *v1.CSIDriverSpec, out func autoConvert_storage_CSIDriverSpec_To_v1_CSIDriverSpec(in *storage.CSIDriverSpec, out *v1.CSIDriverSpec, s conversion.Scope) error { out.AttachRequired = (*bool)(unsafe.Pointer(in.AttachRequired)) + out.FSGroupPolicy = (*v1.FSGroupPolicy)(unsafe.Pointer(in.FSGroupPolicy)) out.PodInfoOnMount = (*bool)(unsafe.Pointer(in.PodInfoOnMount)) out.VolumeLifecycleModes = *(*[]v1.VolumeLifecycleMode)(unsafe.Pointer(&in.VolumeLifecycleModes)) + out.StorageCapacity = (*bool)(unsafe.Pointer(in.StorageCapacity)) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/BUILD index e5a86e68318..bd2653ce416 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/BUILD @@ -16,6 +16,8 @@ go_library( "//pkg/apis/storage:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1alpha1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/zz_generated.conversion.go index b879670e76c..37a4dc8e916 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1alpha1/zz_generated.conversion.go @@ -23,12 +23,14 @@ package v1alpha1 import ( unsafe "unsafe" - corev1 "k8s.io/api/core/v1" + apicorev1 "k8s.io/api/core/v1" v1alpha1 "k8s.io/api/storage/v1alpha1" + resource "k8s.io/apimachinery/pkg/api/resource" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" core "k8s.io/kubernetes/pkg/apis/core" - v1 "k8s.io/kubernetes/pkg/apis/core/v1" + corev1 "k8s.io/kubernetes/pkg/apis/core/v1" storage "k8s.io/kubernetes/pkg/apis/storage" ) @@ -39,6 +41,26 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1alpha1.CSIStorageCapacity)(nil), (*storage.CSIStorageCapacity)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CSIStorageCapacity_To_storage_CSIStorageCapacity(a.(*v1alpha1.CSIStorageCapacity), b.(*storage.CSIStorageCapacity), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*storage.CSIStorageCapacity)(nil), (*v1alpha1.CSIStorageCapacity)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_storage_CSIStorageCapacity_To_v1alpha1_CSIStorageCapacity(a.(*storage.CSIStorageCapacity), b.(*v1alpha1.CSIStorageCapacity), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha1.CSIStorageCapacityList)(nil), (*storage.CSIStorageCapacityList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CSIStorageCapacityList_To_storage_CSIStorageCapacityList(a.(*v1alpha1.CSIStorageCapacityList), b.(*storage.CSIStorageCapacityList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*storage.CSIStorageCapacityList)(nil), (*v1alpha1.CSIStorageCapacityList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_storage_CSIStorageCapacityList_To_v1alpha1_CSIStorageCapacityList(a.(*storage.CSIStorageCapacityList), b.(*v1alpha1.CSIStorageCapacityList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1alpha1.VolumeAttachment)(nil), (*storage.VolumeAttachment)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_VolumeAttachment_To_storage_VolumeAttachment(a.(*v1alpha1.VolumeAttachment), b.(*storage.VolumeAttachment), scope) }); err != nil { @@ -102,6 +124,54 @@ func RegisterConversions(s *runtime.Scheme) error { return nil } +func autoConvert_v1alpha1_CSIStorageCapacity_To_storage_CSIStorageCapacity(in *v1alpha1.CSIStorageCapacity, out *storage.CSIStorageCapacity, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.NodeTopology = (*v1.LabelSelector)(unsafe.Pointer(in.NodeTopology)) + out.StorageClassName = in.StorageClassName + out.Capacity = (*resource.Quantity)(unsafe.Pointer(in.Capacity)) + return nil +} + +// Convert_v1alpha1_CSIStorageCapacity_To_storage_CSIStorageCapacity is an autogenerated conversion function. +func Convert_v1alpha1_CSIStorageCapacity_To_storage_CSIStorageCapacity(in *v1alpha1.CSIStorageCapacity, out *storage.CSIStorageCapacity, s conversion.Scope) error { + return autoConvert_v1alpha1_CSIStorageCapacity_To_storage_CSIStorageCapacity(in, out, s) +} + +func autoConvert_storage_CSIStorageCapacity_To_v1alpha1_CSIStorageCapacity(in *storage.CSIStorageCapacity, out *v1alpha1.CSIStorageCapacity, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.NodeTopology = (*v1.LabelSelector)(unsafe.Pointer(in.NodeTopology)) + out.StorageClassName = in.StorageClassName + out.Capacity = (*resource.Quantity)(unsafe.Pointer(in.Capacity)) + return nil +} + +// Convert_storage_CSIStorageCapacity_To_v1alpha1_CSIStorageCapacity is an autogenerated conversion function. +func Convert_storage_CSIStorageCapacity_To_v1alpha1_CSIStorageCapacity(in *storage.CSIStorageCapacity, out *v1alpha1.CSIStorageCapacity, s conversion.Scope) error { + return autoConvert_storage_CSIStorageCapacity_To_v1alpha1_CSIStorageCapacity(in, out, s) +} + +func autoConvert_v1alpha1_CSIStorageCapacityList_To_storage_CSIStorageCapacityList(in *v1alpha1.CSIStorageCapacityList, out *storage.CSIStorageCapacityList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]storage.CSIStorageCapacity)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_CSIStorageCapacityList_To_storage_CSIStorageCapacityList is an autogenerated conversion function. +func Convert_v1alpha1_CSIStorageCapacityList_To_storage_CSIStorageCapacityList(in *v1alpha1.CSIStorageCapacityList, out *storage.CSIStorageCapacityList, s conversion.Scope) error { + return autoConvert_v1alpha1_CSIStorageCapacityList_To_storage_CSIStorageCapacityList(in, out, s) +} + +func autoConvert_storage_CSIStorageCapacityList_To_v1alpha1_CSIStorageCapacityList(in *storage.CSIStorageCapacityList, out *v1alpha1.CSIStorageCapacityList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha1.CSIStorageCapacity)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_storage_CSIStorageCapacityList_To_v1alpha1_CSIStorageCapacityList is an autogenerated conversion function. +func Convert_storage_CSIStorageCapacityList_To_v1alpha1_CSIStorageCapacityList(in *storage.CSIStorageCapacityList, out *v1alpha1.CSIStorageCapacityList, s conversion.Scope) error { + return autoConvert_storage_CSIStorageCapacityList_To_v1alpha1_CSIStorageCapacityList(in, out, s) +} + func autoConvert_v1alpha1_VolumeAttachment_To_storage_VolumeAttachment(in *v1alpha1.VolumeAttachment, out *storage.VolumeAttachment, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta if err := Convert_v1alpha1_VolumeAttachmentSpec_To_storage_VolumeAttachmentSpec(&in.Spec, &out.Spec, s); err != nil { @@ -181,7 +251,7 @@ func autoConvert_v1alpha1_VolumeAttachmentSource_To_storage_VolumeAttachmentSour if in.InlineVolumeSpec != nil { in, out := &in.InlineVolumeSpec, &out.InlineVolumeSpec *out = new(core.PersistentVolumeSpec) - if err := v1.Convert_v1_PersistentVolumeSpec_To_core_PersistentVolumeSpec(*in, *out, s); err != nil { + if err := corev1.Convert_v1_PersistentVolumeSpec_To_core_PersistentVolumeSpec(*in, *out, s); err != nil { return err } } else { @@ -199,8 +269,8 @@ func autoConvert_storage_VolumeAttachmentSource_To_v1alpha1_VolumeAttachmentSour out.PersistentVolumeName = (*string)(unsafe.Pointer(in.PersistentVolumeName)) if in.InlineVolumeSpec != nil { in, out := &in.InlineVolumeSpec, &out.InlineVolumeSpec - *out = new(corev1.PersistentVolumeSpec) - if err := v1.Convert_core_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(*in, *out, s); err != nil { + *out = new(apicorev1.PersistentVolumeSpec) + if err := corev1.Convert_core_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(*in, *out, s); err != nil { return err } } else { diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/defaults.go index 50cc4fe15c0..3601d300951 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/defaults.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" storagev1beta1 "k8s.io/api/storage/v1beta1" "k8s.io/apimachinery/pkg/runtime" utilfeature "k8s.io/apiserver/pkg/util/feature" @@ -49,6 +49,14 @@ func SetDefaults_CSIDriver(obj *storagev1beta1.CSIDriver) { obj.Spec.PodInfoOnMount = new(bool) *(obj.Spec.PodInfoOnMount) = false } + if obj.Spec.StorageCapacity == nil && utilfeature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity) { + obj.Spec.StorageCapacity = new(bool) + *(obj.Spec.StorageCapacity) = false + } + if obj.Spec.FSGroupPolicy == nil && utilfeature.DefaultFeatureGate.Enabled(features.CSIVolumeFSGroupPolicy) { + obj.Spec.FSGroupPolicy = new(storagev1beta1.FSGroupPolicy) + *obj.Spec.FSGroupPolicy = storagev1beta1.ReadWriteOnceWithFSTypeFSGroupPolicy + } if len(obj.Spec.VolumeLifecycleModes) == 0 && utilfeature.DefaultFeatureGate.Enabled(features.CSIInlineVolume) { obj.Spec.VolumeLifecycleModes = append(obj.Spec.VolumeLifecycleModes, storagev1beta1.VolumeLifecyclePersistent) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go index 7994f458a8f..c21e139365a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go @@ -230,7 +230,17 @@ func Convert_storage_CSIDriver_To_v1beta1_CSIDriver(in *storage.CSIDriver, out * func autoConvert_v1beta1_CSIDriverList_To_storage_CSIDriverList(in *v1beta1.CSIDriverList, out *storage.CSIDriverList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]storage.CSIDriver)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]storage.CSIDriver, len(*in)) + for i := range *in { + if err := Convert_v1beta1_CSIDriver_To_storage_CSIDriver(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } @@ -241,7 +251,17 @@ func Convert_v1beta1_CSIDriverList_To_storage_CSIDriverList(in *v1beta1.CSIDrive func autoConvert_storage_CSIDriverList_To_v1beta1_CSIDriverList(in *storage.CSIDriverList, out *v1beta1.CSIDriverList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.CSIDriver)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1beta1.CSIDriver, len(*in)) + for i := range *in { + if err := Convert_storage_CSIDriver_To_v1beta1_CSIDriver(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } @@ -254,6 +274,8 @@ func autoConvert_v1beta1_CSIDriverSpec_To_storage_CSIDriverSpec(in *v1beta1.CSID out.AttachRequired = (*bool)(unsafe.Pointer(in.AttachRequired)) out.PodInfoOnMount = (*bool)(unsafe.Pointer(in.PodInfoOnMount)) out.VolumeLifecycleModes = *(*[]storage.VolumeLifecycleMode)(unsafe.Pointer(&in.VolumeLifecycleModes)) + out.StorageCapacity = (*bool)(unsafe.Pointer(in.StorageCapacity)) + out.FSGroupPolicy = (*storage.FSGroupPolicy)(unsafe.Pointer(in.FSGroupPolicy)) return nil } @@ -264,8 +286,10 @@ func Convert_v1beta1_CSIDriverSpec_To_storage_CSIDriverSpec(in *v1beta1.CSIDrive func autoConvert_storage_CSIDriverSpec_To_v1beta1_CSIDriverSpec(in *storage.CSIDriverSpec, out *v1beta1.CSIDriverSpec, s conversion.Scope) error { out.AttachRequired = (*bool)(unsafe.Pointer(in.AttachRequired)) + out.FSGroupPolicy = (*v1beta1.FSGroupPolicy)(unsafe.Pointer(in.FSGroupPolicy)) out.PodInfoOnMount = (*bool)(unsafe.Pointer(in.PodInfoOnMount)) out.VolumeLifecycleModes = *(*[]v1beta1.VolumeLifecycleMode)(unsafe.Pointer(&in.VolumeLifecycleModes)) + out.StorageCapacity = (*bool)(unsafe.Pointer(in.StorageCapacity)) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/BUILD index a3f234b1ffe..02351e23c6f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/BUILD @@ -17,6 +17,8 @@ go_library( "//pkg/apis/storage:go_default_library", "//pkg/features:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/validation:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/validation.go index b45fdea6c35..4ba31b66c9d 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/validation.go @@ -22,6 +22,8 @@ import ( "strings" apiequality "k8s.io/apimachinery/pkg/api/equality" + apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" + metav1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" @@ -418,6 +420,8 @@ func validateCSIDriverSpec( allErrs := field.ErrorList{} allErrs = append(allErrs, validateAttachRequired(spec.AttachRequired, fldPath.Child("attachedRequired"))...) allErrs = append(allErrs, validatePodInfoOnMount(spec.PodInfoOnMount, fldPath.Child("podInfoOnMount"))...) + allErrs = append(allErrs, validateStorageCapacity(spec.StorageCapacity, fldPath.Child("storageCapacity"))...) + allErrs = append(allErrs, validateFSGroupPolicy(spec.FSGroupPolicy, fldPath.Child("fsGroupPolicy"))...) allErrs = append(allErrs, validateVolumeLifecycleModes(spec.VolumeLifecycleModes, fldPath.Child("volumeLifecycleModes"))...) return allErrs } @@ -442,6 +446,33 @@ func validatePodInfoOnMount(podInfoOnMount *bool, fldPath *field.Path) field.Err return allErrs } +// validateStorageCapacity tests if storageCapacity is set for CSIDriver. +func validateStorageCapacity(storageCapacity *bool, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + if storageCapacity == nil && utilfeature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity) { + allErrs = append(allErrs, field.Required(fldPath, "")) + } + + return allErrs +} + +var supportedFSGroupPolicy = sets.NewString(string(storage.ReadWriteOnceWithFSTypeFSGroupPolicy), string(storage.FileFSGroupPolicy), string(storage.NoneFSGroupPolicy)) + +// validateFSGroupPolicy tests if FSGroupPolicy contains an appropriate value. +func validateFSGroupPolicy(fsGroupPolicy *storage.FSGroupPolicy, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + if fsGroupPolicy == nil { + // This is not a required field, so if nothing is provided simply return + return allErrs + } + + if !supportedFSGroupPolicy.Has(string(*fsGroupPolicy)) { + allErrs = append(allErrs, field.NotSupported(fldPath, fsGroupPolicy, supportedFSGroupPolicy.List())) + } + + return allErrs +} + // validateVolumeLifecycleModes tests if mode has one of the allowed values. func validateVolumeLifecycleModes(modes []storage.VolumeLifecycleMode, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} @@ -459,3 +490,36 @@ func validateVolumeLifecycleModes(modes []storage.VolumeLifecycleMode, fldPath * return allErrs } + +// ValidateStorageCapacityName checks that a name is appropriate for a +// CSIStorageCapacity object. +var ValidateStorageCapacityName = apimachineryvalidation.NameIsDNSSubdomain + +// ValidateCSIStorageCapacity validates a CSIStorageCapacity. +func ValidateCSIStorageCapacity(capacity *storage.CSIStorageCapacity) field.ErrorList { + allErrs := apivalidation.ValidateObjectMeta(&capacity.ObjectMeta, true, ValidateStorageCapacityName, field.NewPath("metadata")) + allErrs = append(allErrs, metav1validation.ValidateLabelSelector(capacity.NodeTopology, field.NewPath("nodeTopology"))...) + for _, msg := range apivalidation.ValidateClassName(capacity.StorageClassName, false) { + allErrs = append(allErrs, field.Invalid(field.NewPath("storageClassName"), capacity.StorageClassName, msg)) + } + if capacity.Capacity != nil { + allErrs = append(allErrs, apivalidation.ValidateNonnegativeQuantity(*capacity.Capacity, field.NewPath("capacity"))...) + } + return allErrs +} + +// ValidateCSIStorageCapacityUpdate tests if an update to CSIStorageCapacity is valid. +func ValidateCSIStorageCapacityUpdate(capacity, oldCapacity *storage.CSIStorageCapacity) field.ErrorList { + allErrs := apivalidation.ValidateObjectMetaUpdate(&capacity.ObjectMeta, &oldCapacity.ObjectMeta, field.NewPath("metadata")) + + // Input fields for CSI GetCapacity are immutable. + // If this ever relaxes in the future, make sure to increment the Generation number in PrepareForUpdate + if !apiequality.Semantic.DeepEqual(capacity.NodeTopology, oldCapacity.NodeTopology) { + allErrs = append(allErrs, field.Invalid(field.NewPath("nodeTopology"), capacity.NodeTopology, "field is immutable")) + } + if capacity.StorageClassName != oldCapacity.StorageClassName { + allErrs = append(allErrs, field.Invalid(field.NewPath("storageClassName"), capacity.StorageClassName, "field is immutable")) + } + + return allErrs +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go index 5c9ee27e278..0ec57047ec4 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go @@ -21,6 +21,7 @@ limitations under the License. package storage import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" core "k8s.io/kubernetes/pkg/apis/core" ) @@ -93,6 +94,11 @@ func (in *CSIDriverSpec) DeepCopyInto(out *CSIDriverSpec) { *out = new(bool) **out = **in } + if in.FSGroupPolicy != nil { + in, out := &in.FSGroupPolicy, &out.FSGroupPolicy + *out = new(FSGroupPolicy) + **out = **in + } if in.PodInfoOnMount != nil { in, out := &in.PodInfoOnMount, &out.PodInfoOnMount *out = new(bool) @@ -103,6 +109,11 @@ func (in *CSIDriverSpec) DeepCopyInto(out *CSIDriverSpec) { *out = make([]VolumeLifecycleMode, len(*in)) copy(*out, *in) } + if in.StorageCapacity != nil { + in, out := &in.StorageCapacity, &out.StorageCapacity + *out = new(bool) + **out = **in + } return } @@ -225,6 +236,75 @@ func (in *CSINodeSpec) DeepCopy() *CSINodeSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CSIStorageCapacity) DeepCopyInto(out *CSIStorageCapacity) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.NodeTopology != nil { + in, out := &in.NodeTopology, &out.NodeTopology + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + x := (*in).DeepCopy() + *out = &x + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIStorageCapacity. +func (in *CSIStorageCapacity) DeepCopy() *CSIStorageCapacity { + if in == nil { + return nil + } + out := new(CSIStorageCapacity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CSIStorageCapacity) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CSIStorageCapacityList) DeepCopyInto(out *CSIStorageCapacityList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CSIStorageCapacity, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIStorageCapacityList. +func (in *CSIStorageCapacityList) DeepCopy() *CSIStorageCapacityList { + if in == nil { + return nil + } + out := new(CSIStorageCapacityList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CSIStorageCapacityList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageClass) DeepCopyInto(out *StorageClass) { *out = *in diff --git a/vendor/k8s.io/kubernetes/pkg/auth/authorizer/abac/BUILD b/vendor/k8s.io/kubernetes/pkg/auth/authorizer/abac/BUILD index 4d55745831e..9901e474006 100644 --- a/vendor/k8s.io/kubernetes/pkg/auth/authorizer/abac/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/auth/authorizer/abac/BUILD @@ -17,7 +17,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/auth/authorizer/abac/abac.go b/vendor/k8s.io/kubernetes/pkg/auth/authorizer/abac/abac.go index 3dd1a03b366..18735a5c3e3 100644 --- a/vendor/k8s.io/kubernetes/pkg/auth/authorizer/abac/abac.go +++ b/vendor/k8s.io/kubernetes/pkg/auth/authorizer/abac/abac.go @@ -24,7 +24,7 @@ import ( "os" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/authentication/user" diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/.import-restrictions b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/.import-restrictions index 611ddf966d9..8259556e3af 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/.import-restrictions +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/.import-restrictions @@ -1,11 +1,5 @@ -{ - "Rules": [ - { - "SelectorRegexp": "k8s[.]io/kubernetes", - "AllowedPrefixes": [ - "k8s.io/kubernetes/pkg/cloudprovider/providers" - ], - "ForbiddenPrefixes": [] - } - ] -} +rules: + # prevent any k8s.io/kubernetes imports outside of this package + - selectorRegexp: k8s[.]io/kubernetes + allowedPrefixes: + - k8s.io/kubernetes/pkg/cloudprovider/providers diff --git a/vendor/k8s.io/kubernetes/pkg/controller/.import-restrictions b/vendor/k8s.io/kubernetes/pkg/controller/.import-restrictions deleted file mode 100644 index 67a6a8c068d..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/controller/.import-restrictions +++ /dev/null @@ -1,16 +0,0 @@ -{ - "Rules": [ - { - "SelectorRegexp": "k8s[.]io/kubernetes/pkg/client/unversioned$", - "ForbiddenPrefixes": [ - "k8s.io/kubernetes/pkg/client/unversioned" - ] - }, - { - "SelectorRegexp": "k8s[.]io/kubernetes/pkg/client/unversioned/testclient$", - "ForbiddenPrefixes": [ - "k8s.io/kubernetes/pkg/client/unversioned/testclient" - ] - } - ] -} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/BUILD index f447f4c4e5a..1ce63287399 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/BUILD @@ -1,43 +1,4 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "controller_ref_manager_test.go", - "controller_utils_test.go", - ], - embed = [":go_default_library"], - deps = [ - "//pkg/apis/core/install:go_default_library", - "//pkg/controller/testutil:go_default_library", - "//pkg/securitycontext:go_default_library", - "//staging/src/k8s.io/api/apps/v1:go_default_library", - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//staging/src/k8s.io/client-go/util/testing:go_default_library", - "//vendor/github.com/stretchr/testify/assert:go_default_library", - ], -) +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", @@ -51,6 +12,7 @@ go_library( "lookup_cache.go", ], importpath = "k8s.io/kubernetes/pkg/controller", + visibility = ["//visibility:public"], deps = [ "//pkg/api/legacyscheme:go_default_library", "//pkg/api/v1/pod:go_default_library", @@ -92,12 +54,46 @@ go_library( "//staging/src/k8s.io/client-go/util/retry:go_default_library", "//vendor/github.com/golang/groupcache/lru:go_default_library", "//vendor/golang.org/x/oauth2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/integer:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ], ) +go_test( + name = "go_default_test", + srcs = [ + "controller_ref_manager_test.go", + "controller_utils_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/apis/core/install:go_default_library", + "//pkg/controller/testutil:go_default_library", + "//pkg/securitycontext:go_default_library", + "//staging/src/k8s.io/api/apps/v1:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//staging/src/k8s.io/client-go/rest:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//staging/src/k8s.io/client-go/util/testing:go_default_library", + "//vendor/github.com/stretchr/testify/assert:go_default_library", + ], +) + filegroup( name = "package-srcs", srcs = glob(["**"]), @@ -112,7 +108,6 @@ filegroup( "//pkg/controller/apis/config:all-srcs", "//pkg/controller/bootstrap:all-srcs", "//pkg/controller/certificates:all-srcs", - "//pkg/controller/cloud:all-srcs", "//pkg/controller/clusterroleaggregation:all-srcs", "//pkg/controller/cronjob:all-srcs", "//pkg/controller/daemon:all-srcs", @@ -120,6 +115,7 @@ filegroup( "//pkg/controller/disruption:all-srcs", "//pkg/controller/endpoint:all-srcs", "//pkg/controller/endpointslice:all-srcs", + "//pkg/controller/endpointslicemirroring:all-srcs", "//pkg/controller/garbagecollector:all-srcs", "//pkg/controller/history:all-srcs", "//pkg/controller/job:all-srcs", @@ -131,8 +127,7 @@ filegroup( "//pkg/controller/replicaset:all-srcs", "//pkg/controller/replication:all-srcs", "//pkg/controller/resourcequota:all-srcs", - "//pkg/controller/route:all-srcs", - "//pkg/controller/service:all-srcs", + "//pkg/controller/service/config:all-srcs", "//pkg/controller/serviceaccount:all-srcs", "//pkg/controller/statefulset:all-srcs", "//pkg/controller/testutil:all-srcs", @@ -141,6 +136,8 @@ filegroup( "//pkg/controller/util/endpoint:all-srcs", "//pkg/controller/util/node:all-srcs", "//pkg/controller/volume/attachdetach:all-srcs", + "//pkg/controller/volume/common:all-srcs", + "//pkg/controller/volume/ephemeral:all-srcs", "//pkg/controller/volume/events:all-srcs", "//pkg/controller/volume/expand:all-srcs", "//pkg/controller/volume/persistentvolume:all-srcs", @@ -150,4 +147,5 @@ filegroup( "//pkg/controller/volume/scheduling:all-srcs", ], tags = ["automanaged"], + visibility = ["//visibility:public"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/OWNERS b/vendor/k8s.io/kubernetes/pkg/controller/OWNERS index b1147466aa3..a4f3bf7ea3a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/controller/OWNERS @@ -5,8 +5,11 @@ approvers: - derekwaynecarr - mikedanese - janetkuo +- cheftako +- sig-apps-approvers reviewers: - deads2k - cheftako +- sig-apps-reviewers labels: - sig/apps diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/BUILD index ae35f0823a6..f5340ed02bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/BUILD @@ -16,6 +16,7 @@ go_library( "//pkg/controller/deployment/config:go_default_library", "//pkg/controller/endpoint/config:go_default_library", "//pkg/controller/endpointslice/config:go_default_library", + "//pkg/controller/endpointslicemirroring/config:go_default_library", "//pkg/controller/garbagecollector/config:go_default_library", "//pkg/controller/job/config:go_default_library", "//pkg/controller/namespace/config:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/types.go b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/types.go index b9f1d0f8fcc..1548cfc1c24 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/types.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/types.go @@ -24,6 +24,7 @@ import ( deploymentconfig "k8s.io/kubernetes/pkg/controller/deployment/config" endpointconfig "k8s.io/kubernetes/pkg/controller/endpoint/config" endpointsliceconfig "k8s.io/kubernetes/pkg/controller/endpointslice/config" + endpointslicemirroringconfig "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config" garbagecollectorconfig "k8s.io/kubernetes/pkg/controller/garbagecollector/config" jobconfig "k8s.io/kubernetes/pkg/controller/job/config" namespaceconfig "k8s.io/kubernetes/pkg/controller/namespace/config" @@ -78,6 +79,9 @@ type KubeControllerManagerConfiguration struct { // EndpointSliceControllerConfiguration holds configuration for // EndpointSliceController related features. EndpointSliceController endpointsliceconfig.EndpointSliceControllerConfiguration + // EndpointSliceMirroringControllerConfiguration holds configuration for + // EndpointSliceMirroringController related features. + EndpointSliceMirroringController endpointslicemirroringconfig.EndpointSliceMirroringControllerConfiguration // GarbageCollectorControllerConfiguration holds configuration for // GarbageCollectorController related features. GarbageCollectorController garbagecollectorconfig.GarbageCollectorControllerConfiguration diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/BUILD index 75f0021b17d..82d2e12570c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/BUILD @@ -20,6 +20,7 @@ go_library( "//pkg/controller/deployment/config/v1alpha1:go_default_library", "//pkg/controller/endpoint/config/v1alpha1:go_default_library", "//pkg/controller/endpointslice/config/v1alpha1:go_default_library", + "//pkg/controller/endpointslicemirroring/config/v1alpha1:go_default_library", "//pkg/controller/garbagecollector/config/v1alpha1:go_default_library", "//pkg/controller/job/config/v1alpha1:go_default_library", "//pkg/controller/namespace/config/v1alpha1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/defaults.go index 6074d55a009..d97580f8b3a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/defaults.go @@ -28,6 +28,7 @@ import ( deploymentconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/deployment/config/v1alpha1" endpointconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/endpoint/config/v1alpha1" endpointsliceconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1" + endpointslicemirroringconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1" garbagecollectorconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/garbagecollector/config/v1alpha1" jobconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/job/config/v1alpha1" namespaceconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/namespace/config/v1alpha1" @@ -81,6 +82,8 @@ func SetDefaults_KubeControllerManagerConfiguration(obj *kubectrlmgrconfigv1alph endpointconfigv1alpha1.RecommendedDefaultEndpointControllerConfiguration(&obj.EndpointController) // Use the default RecommendedDefaultEndpointSliceControllerConfiguration options endpointsliceconfigv1alpha1.RecommendedDefaultEndpointSliceControllerConfiguration(&obj.EndpointSliceController) + // Use the default RecommendedDefaultEndpointSliceMirroringControllerConfiguration options + endpointslicemirroringconfigv1alpha1.RecommendedDefaultEndpointSliceMirroringControllerConfiguration(&obj.EndpointSliceMirroringController) // Use the default RecommendedDefaultGenericControllerManagerConfiguration options garbagecollectorconfigv1alpha1.RecommendedDefaultGarbageCollectorControllerConfiguration(&obj.GarbageCollectorController) // Use the default RecommendedDefaultJobControllerConfiguration options diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/doc.go index bacd8cda6c4..8efb8e3acc4 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/doc.go @@ -23,6 +23,8 @@ limitations under the License. // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/endpoint/config/v1alpha1 // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1 // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/garbagecollector/config/v1alpha1 +// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1 +// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1 // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/job/config/v1alpha1 // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/namespace/config/v1alpha1 // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/nodeipam/config/v1alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/zz_generated.conversion.go index d74cb218e3a..a93b332a4c9 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/zz_generated.conversion.go @@ -34,6 +34,7 @@ import ( deploymentconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/deployment/config/v1alpha1" endpointconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/endpoint/config/v1alpha1" endpointsliceconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1" + endpointslicemirroringconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1" garbagecollectorconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/garbagecollector/config/v1alpha1" jobconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/job/config/v1alpha1" namespaceconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/namespace/config/v1alpha1" @@ -297,6 +298,9 @@ func autoConvert_v1alpha1_KubeControllerManagerConfiguration_To_config_KubeContr if err := endpointsliceconfigv1alpha1.Convert_v1alpha1_EndpointSliceControllerConfiguration_To_config_EndpointSliceControllerConfiguration(&in.EndpointSliceController, &out.EndpointSliceController, s); err != nil { return err } + if err := endpointslicemirroringconfigv1alpha1.Convert_v1alpha1_EndpointSliceMirroringControllerConfiguration_To_config_EndpointSliceMirroringControllerConfiguration(&in.EndpointSliceMirroringController, &out.EndpointSliceMirroringController, s); err != nil { + return err + } if err := garbagecollectorconfigv1alpha1.Convert_v1alpha1_GarbageCollectorControllerConfiguration_To_config_GarbageCollectorControllerConfiguration(&in.GarbageCollectorController, &out.GarbageCollectorController, s); err != nil { return err } @@ -378,6 +382,9 @@ func autoConvert_config_KubeControllerManagerConfiguration_To_v1alpha1_KubeContr if err := endpointsliceconfigv1alpha1.Convert_config_EndpointSliceControllerConfiguration_To_v1alpha1_EndpointSliceControllerConfiguration(&in.EndpointSliceController, &out.EndpointSliceController, s); err != nil { return err } + if err := endpointslicemirroringconfigv1alpha1.Convert_config_EndpointSliceMirroringControllerConfiguration_To_v1alpha1_EndpointSliceMirroringControllerConfiguration(&in.EndpointSliceMirroringController, &out.EndpointSliceMirroringController, s); err != nil { + return err + } if err := garbagecollectorconfigv1alpha1.Convert_config_GarbageCollectorControllerConfiguration_To_v1alpha1_GarbageCollectorControllerConfiguration(&in.GarbageCollectorController, &out.GarbageCollectorController, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/zz_generated.deepcopy.go index 6d4565fc976..0f5dd63275e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/zz_generated.deepcopy.go @@ -116,6 +116,7 @@ func (in *KubeControllerManagerConfiguration) DeepCopyInto(out *KubeControllerMa out.DeprecatedController = in.DeprecatedController out.EndpointController = in.EndpointController out.EndpointSliceController = in.EndpointSliceController + out.EndpointSliceMirroringController = in.EndpointSliceMirroringController in.GarbageCollectorController.DeepCopyInto(&out.GarbageCollectorController) out.HPAController = in.HPAController out.JobController = in.JobController diff --git a/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/BUILD index 05eca5d130e..fb2faf98db6 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/BUILD @@ -28,7 +28,7 @@ go_library( "//staging/src/k8s.io/cluster-bootstrap/token/jws:go_default_library", "//staging/src/k8s.io/cluster-bootstrap/util/secrets:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/bootstrapsigner.go b/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/bootstrapsigner.go index 0a6093adc6c..c3534fec20e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/bootstrapsigner.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/bootstrapsigner.go @@ -21,7 +21,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "fmt" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/tokencleaner.go b/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/tokencleaner.go index 35a06a33868..083ff0abbf2 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/tokencleaner.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/tokencleaner.go @@ -34,7 +34,7 @@ import ( bootstrapapi "k8s.io/cluster-bootstrap/token/api" bootstrapsecretutil "k8s.io/cluster-bootstrap/util/secrets" "k8s.io/component-base/metrics/prometheus/ratelimiter" - "k8s.io/klog" + "k8s.io/klog/v2" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/controller" ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/util.go b/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/util.go index f61bc73f40c..6f5ad9ff882 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/util.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/bootstrap/util.go @@ -19,7 +19,7 @@ package bootstrap import ( "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" bootstrapapi "k8s.io/cluster-bootstrap/token/api" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/certificates/BUILD index ce63218fd09..985f25b1190 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/BUILD @@ -13,21 +13,21 @@ go_library( importpath = "k8s.io/kubernetes/pkg/controller/certificates", visibility = ["//visibility:public"], deps = [ - "//pkg/apis/certificates/v1beta1:go_default_library", "//pkg/controller:go_default_library", - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//staging/src/k8s.io/client-go/informers/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/informers/certificates/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//staging/src/k8s.io/client-go/listers/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/listers/certificates/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//vendor/golang.org/x/time/rate:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -63,7 +63,7 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/controller:go_default_library", - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/approver/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/certificates/approver/BUILD index 1516c2c7498..6b3b4d1a666 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/approver/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/approver/BUILD @@ -11,9 +11,9 @@ go_test( srcs = ["sarapprove_test.go"], embed = [":go_default_library"], deps = [ - "//pkg/apis/certificates/v1beta1:go_default_library", + "//pkg/apis/certificates/v1:go_default_library", "//staging/src/k8s.io/api/authorization/v1:go_default_library", - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", @@ -26,12 +26,14 @@ go_library( srcs = ["sarapprove.go"], importpath = "k8s.io/kubernetes/pkg/controller/certificates/approver", deps = [ - "//pkg/apis/certificates/v1beta1:go_default_library", + "//pkg/apis/certificates:go_default_library", "//pkg/controller/certificates:go_default_library", "//staging/src/k8s.io/api/authorization/v1:go_default_library", - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/client-go/informers/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/client-go/informers/certificates/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/approver/sarapprove.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/approver/sarapprove.go index 7ab7aff1112..397a75f5689 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/approver/sarapprove.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/approver/sarapprove.go @@ -23,12 +23,14 @@ import ( "fmt" authorization "k8s.io/api/authorization/v1" - capi "k8s.io/api/certificates/v1beta1" + capi "k8s.io/api/certificates/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - certificatesinformers "k8s.io/client-go/informers/certificates/v1beta1" + "k8s.io/apimachinery/pkg/util/sets" + certificatesinformers "k8s.io/client-go/informers/certificates/v1" clientset "k8s.io/client-go/kubernetes" - capihelper "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" + capihelper "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/controller/certificates" ) @@ -100,7 +102,7 @@ func (a *sarApprover) handle(csr *capi.CertificateSigningRequest) error { } if approved { appendApprovalCondition(csr, r.successMessage) - _, err = a.client.CertificatesV1beta1().CertificateSigningRequests().UpdateApproval(context.Background(), csr, metav1.UpdateOptions{}) + _, err = a.client.CertificatesV1().CertificateSigningRequests().UpdateApproval(context.Background(), csr.Name, csr, metav1.UpdateOptions{}) if err != nil { return fmt.Errorf("error updating approval for csr: %v", err) } @@ -140,25 +142,30 @@ func (a *sarApprover) authorize(csr *capi.CertificateSigningRequest, rattrs auth func appendApprovalCondition(csr *capi.CertificateSigningRequest, message string) { csr.Status.Conditions = append(csr.Status.Conditions, capi.CertificateSigningRequestCondition{ Type: capi.CertificateApproved, + Status: corev1.ConditionTrue, Reason: "AutoApproved", Message: message, }) } func isNodeClientCert(csr *capi.CertificateSigningRequest, x509cr *x509.CertificateRequest) bool { - isClientCSR := capihelper.IsKubeletClientCSR(x509cr, csr.Spec.Usages) - if !isClientCSR { + if csr.Spec.SignerName != capi.KubeAPIServerClientKubeletSignerName { return false } - return *csr.Spec.SignerName == capi.KubeAPIServerClientKubeletSignerName + return capihelper.IsKubeletClientCSR(x509cr, usagesToSet(csr.Spec.Usages)) } func isSelfNodeClientCert(csr *capi.CertificateSigningRequest, x509cr *x509.CertificateRequest) bool { - if !isNodeClientCert(csr, x509cr) { - return false - } if csr.Spec.Username != x509cr.Subject.CommonName { return false } - return true + return isNodeClientCert(csr, x509cr) +} + +func usagesToSet(usages []capi.KeyUsage) sets.String { + result := sets.NewString() + for _, usage := range usages { + result.Insert(string(usage)) + } + return result } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/authority/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/certificates/authority/BUILD index 7c109cc8f18..e8a4050a979 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/authority/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/authority/BUILD @@ -14,7 +14,7 @@ go_library( "//cmd/kubelet/app:__pkg__", "//pkg/controller/certificates:__subpackages__", ], - deps = ["//staging/src/k8s.io/api/certificates/v1beta1:go_default_library"], + deps = ["//staging/src/k8s.io/api/certificates/v1:go_default_library"], ) filegroup( @@ -39,7 +39,7 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/github.com/google/go-cmp/cmp/cmpopts:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/authority/policies.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/authority/policies.go index 5c84e3ad005..0d8d9b374d1 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/authority/policies.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/authority/policies.go @@ -22,7 +22,7 @@ import ( "sort" "time" - capi "k8s.io/api/certificates/v1beta1" + capi "k8s.io/api/certificates/v1" ) // SigningPolicy validates a CertificateRequest before it's signed by the diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller.go index 11e5488683a..927da7979bc 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller.go @@ -24,19 +24,18 @@ import ( "golang.org/x/time/rate" - certificates "k8s.io/api/certificates/v1beta1" + certificates "k8s.io/api/certificates/v1" "k8s.io/apimachinery/pkg/api/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" - certificatesinformers "k8s.io/client-go/informers/certificates/v1beta1" + certificatesinformers "k8s.io/client-go/informers/certificates/v1" clientset "k8s.io/client-go/kubernetes" v1core "k8s.io/client-go/kubernetes/typed/core/v1" - certificateslisters "k8s.io/client-go/listers/certificates/v1beta1" + certificateslisters "k8s.io/client-go/listers/certificates/v1" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" - capihelper "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller" ) @@ -62,7 +61,7 @@ func NewCertificateController( ) *CertificateController { // Send events to the apiserver eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) cc := &CertificateController{ @@ -186,22 +185,13 @@ func (cc *CertificateController) syncFunc(key string) error { return err } - if csr.Status.Certificate != nil { + if len(csr.Status.Certificate) > 0 { // no need to do anything because it already has a cert return nil } // need to operate on a copy so we don't mutate the csr in the shared cache csr = csr.DeepCopy() - // If the `signerName` field is not set, we are talking to a pre-1.18 apiserver. - // As per the KEP document for the certificates API, this will be defaulted here - // in the controller to maintain backwards compatibility. - // This should be removed after a deprecation window has passed. - // Default here to allow handlers to assume the field is set. - if csr.Spec.SignerName == nil { - signerName := capihelper.DefaultSignerNameFromSpec(&csr.Spec) - csr.Spec.SignerName = &signerName - } return cc.handler(csr) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller_utils.go index 4a5d0d4f2bb..91c84f6da1c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller_utils.go @@ -16,7 +16,10 @@ limitations under the License. package certificates -import certificates "k8s.io/api/certificates/v1beta1" +import ( + certificates "k8s.io/api/certificates/v1" + v1 "k8s.io/api/core/v1" +) // IsCertificateRequestApproved returns true if a certificate request has the // "Approved" condition and no "Denied" conditions; false otherwise. @@ -25,6 +28,16 @@ func IsCertificateRequestApproved(csr *certificates.CertificateSigningRequest) b return approved && !denied } +// HasCondition returns true if the csr contains a condition of the specified type with a status that is set to True or is empty +func HasTrueCondition(csr *certificates.CertificateSigningRequest, conditionType certificates.RequestConditionType) bool { + for _, c := range csr.Status.Conditions { + if c.Type == conditionType && (len(c.Status) == 0 || c.Status == v1.ConditionTrue) { + return true + } + } + return false +} + func GetCertApprovalCondition(status *certificates.CertificateSigningRequestStatus) (approved bool, denied bool) { for _, c := range status.Conditions { if c.Type == certificates.CertificateApproved { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/cleaner/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/certificates/cleaner/BUILD index 6f195c6f6f5..ddbe08d5a09 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/cleaner/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/cleaner/BUILD @@ -6,15 +6,15 @@ go_library( importpath = "k8s.io/kubernetes/pkg/controller/certificates/cleaner", visibility = ["//visibility:public"], deps = [ - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//staging/src/k8s.io/client-go/informers/certificates/v1beta1:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", - "//staging/src/k8s.io/client-go/listers/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//staging/src/k8s.io/client-go/informers/certificates/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1:go_default_library", + "//staging/src/k8s.io/client-go/listers/certificates/v1:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -37,7 +37,7 @@ go_test( srcs = ["cleaner_test.go"], embed = [":go_default_library"], deps = [ - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/cleaner/cleaner.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/cleaner/cleaner.go index b4cd971e19d..832c678bfa2 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/cleaner/cleaner.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/cleaner/cleaner.go @@ -27,16 +27,16 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" - capi "k8s.io/api/certificates/v1beta1" + capi "k8s.io/api/certificates/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" - certificatesinformers "k8s.io/client-go/informers/certificates/v1beta1" - csrclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" - certificateslisters "k8s.io/client-go/listers/certificates/v1beta1" + certificatesinformers "k8s.io/client-go/informers/certificates/v1" + csrclient "k8s.io/client-go/kubernetes/typed/certificates/v1" + certificateslisters "k8s.io/client-go/listers/certificates/v1" ) const ( @@ -47,6 +47,7 @@ const ( // cleaned up. approvedExpiration = 1 * time.Hour deniedExpiration = 1 * time.Hour + failedExpiration = 1 * time.Hour pendingExpiration = 24 * time.Hour ) @@ -108,7 +109,7 @@ func (ccc *CSRCleanerController) handle(csr *capi.CertificateSigningRequest) err if err != nil { return err } - if isIssuedPastDeadline(csr) || isDeniedPastDeadline(csr) || isPendingPastDeadline(csr) || isIssuedExpired { + if isIssuedPastDeadline(csr) || isDeniedPastDeadline(csr) || isFailedPastDeadline(csr) || isPendingPastDeadline(csr) || isIssuedExpired { if err := ccc.csrClient.Delete(context.TODO(), csr.Name, metav1.DeleteOptions{}); err != nil { return fmt.Errorf("unable to delete CSR %q: %v", csr.Name, err) } @@ -158,6 +159,19 @@ func isDeniedPastDeadline(csr *capi.CertificateSigningRequest) bool { return false } +// isFailedPastDeadline checks if the certificate has a Failed status and the +// creation time of the CSR is passed the deadline that pending requests are +// maintained for. +func isFailedPastDeadline(csr *capi.CertificateSigningRequest) bool { + for _, c := range csr.Status.Conditions { + if c.Type == capi.CertificateFailed && isOlderThan(c.LastUpdateTime, deniedExpiration) { + klog.Infof("Cleaning CSR %q as it is more than %v old and failed.", csr.Name, deniedExpiration) + return true + } + } + return false +} + // isIssuedPastDeadline checks if the certificate has an Issued status and the // creation time of the CSR is passed the deadline that issued requests are // maintained for. @@ -180,13 +194,13 @@ func isOlderThan(t metav1.Time, d time.Duration) bool { // 'Issued' status. Implicitly, if there is a certificate associated with the // CSR, the CSR statuses that are visible via `kubectl` will include 'Issued'. func isIssued(csr *capi.CertificateSigningRequest) bool { - return csr.Status.Certificate != nil + return len(csr.Status.Certificate) > 0 } // isExpired checks if the CSR has a certificate and the date in the `NotAfter` // field has gone by. func isExpired(csr *capi.CertificateSigningRequest) (bool, error) { - if csr.Status.Certificate == nil { + if len(csr.Status.Certificate) == 0 { return false, nil } block, _ := pem.Decode(csr.Status.Certificate) @@ -197,5 +211,8 @@ func isExpired(csr *capi.CertificateSigningRequest) (bool, error) { if err != nil { return false, fmt.Errorf("unable to parse certificate data: %v", err) } + if len(certs) == 0 { + return false, fmt.Errorf("no certificates found") + } return time.Now().After(certs[0].NotAfter), nil } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/rootcacertpublisher/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/certificates/rootcacertpublisher/BUILD index b61759c2338..a1d5341f045 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/rootcacertpublisher/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/rootcacertpublisher/BUILD @@ -17,7 +17,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/rootcacertpublisher/publisher.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/rootcacertpublisher/publisher.go index f6fe90c4691..538bd9d625a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/rootcacertpublisher/publisher.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/rootcacertpublisher/publisher.go @@ -33,7 +33,7 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" "k8s.io/component-base/metrics/prometheus/ratelimiter" - "k8s.io/klog" + "k8s.io/klog/v2" ) // RootCACertConfigMapName is name of the configmap which stores certificates diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/BUILD index c66c4024264..6958607c6c7 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/BUILD @@ -16,8 +16,9 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//pkg/apis/certificates/v1beta1:go_default_library", - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//pkg/apis/certificates/v1:go_default_library", + "//pkg/controller/certificates:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", @@ -35,13 +36,16 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/controller/certificates/signer", deps = [ - "//pkg/apis/certificates/v1beta1:go_default_library", + "//pkg/apis/certificates:go_default_library", "//pkg/controller/certificates:go_default_library", "//pkg/controller/certificates/authority:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates:go_default_library", - "//staging/src/k8s.io/client-go/informers/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/informers/certificates/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/util/cert:go_default_library", "//staging/src/k8s.io/client-go/util/keyutil:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/types.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/types.go index 0452b0f2d5f..edf60b17dca 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/types.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/types.go @@ -28,7 +28,27 @@ type CSRSigningControllerConfiguration struct { // clusterSigningCertFile is the filename containing a PEM-encoded // RSA or ECDSA private key used to issue cluster-scoped certificates ClusterSigningKeyFile string + + // kubeletServingSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kubelet-serving signer + KubeletServingSignerConfiguration CSRSigningConfiguration + // kubeletClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client-kubelet + KubeletClientSignerConfiguration CSRSigningConfiguration + // kubeAPIServerClientSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/kube-apiserver-client + KubeAPIServerClientSignerConfiguration CSRSigningConfiguration + // legacyUnknownSignerConfiguration holds the certificate and key used to issue certificates for the kubernetes.io/legacy-unknown + LegacyUnknownSignerConfiguration CSRSigningConfiguration + // clusterSigningDuration is the length of duration signed certificates // will be given. ClusterSigningDuration metav1.Duration } + +// CSRSigningConfiguration holds information about a particular CSR signer +type CSRSigningConfiguration struct { + // certFile is the filename containing a PEM-encoded + // X509 CA certificate used to issue certificates + CertFile string + // keyFile is the filename containing a PEM-encoded + // RSA or ECDSA private key used to issue certificates + KeyFile string +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1/defaults.go index 4f91b884322..65244798fc1 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1/defaults.go @@ -34,12 +34,6 @@ import ( // run it in your wrapper struct of this type in its `SetDefaults_` method. func RecommendedDefaultCSRSigningControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.CSRSigningControllerConfiguration) { zero := metav1.Duration{} - if obj.ClusterSigningCertFile == "" { - obj.ClusterSigningCertFile = "/etc/kubernetes/ca/ca.pem" - } - if obj.ClusterSigningKeyFile == "" { - obj.ClusterSigningKeyFile = "/etc/kubernetes/ca/ca.key" - } if obj.ClusterSigningDuration == zero { obj.ClusterSigningDuration = metav1.Duration{Duration: 365 * 24 * time.Hour} } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1/zz_generated.conversion.go index dc0383b30a0..5f503a8f968 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1/zz_generated.conversion.go @@ -35,6 +35,16 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1alpha1.CSRSigningConfiguration)(nil), (*config.CSRSigningConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CSRSigningConfiguration_To_config_CSRSigningConfiguration(a.(*v1alpha1.CSRSigningConfiguration), b.(*config.CSRSigningConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.CSRSigningConfiguration)(nil), (*v1alpha1.CSRSigningConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_CSRSigningConfiguration_To_v1alpha1_CSRSigningConfiguration(a.(*config.CSRSigningConfiguration), b.(*v1alpha1.CSRSigningConfiguration), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1alpha1.GroupResource)(nil), (*v1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_GroupResource_To_v1_GroupResource(a.(*v1alpha1.GroupResource), b.(*v1.GroupResource), scope) }); err != nil { @@ -58,9 +68,43 @@ func RegisterConversions(s *runtime.Scheme) error { return nil } +func autoConvert_v1alpha1_CSRSigningConfiguration_To_config_CSRSigningConfiguration(in *v1alpha1.CSRSigningConfiguration, out *config.CSRSigningConfiguration, s conversion.Scope) error { + out.CertFile = in.CertFile + out.KeyFile = in.KeyFile + return nil +} + +// Convert_v1alpha1_CSRSigningConfiguration_To_config_CSRSigningConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_CSRSigningConfiguration_To_config_CSRSigningConfiguration(in *v1alpha1.CSRSigningConfiguration, out *config.CSRSigningConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_CSRSigningConfiguration_To_config_CSRSigningConfiguration(in, out, s) +} + +func autoConvert_config_CSRSigningConfiguration_To_v1alpha1_CSRSigningConfiguration(in *config.CSRSigningConfiguration, out *v1alpha1.CSRSigningConfiguration, s conversion.Scope) error { + out.CertFile = in.CertFile + out.KeyFile = in.KeyFile + return nil +} + +// Convert_config_CSRSigningConfiguration_To_v1alpha1_CSRSigningConfiguration is an autogenerated conversion function. +func Convert_config_CSRSigningConfiguration_To_v1alpha1_CSRSigningConfiguration(in *config.CSRSigningConfiguration, out *v1alpha1.CSRSigningConfiguration, s conversion.Scope) error { + return autoConvert_config_CSRSigningConfiguration_To_v1alpha1_CSRSigningConfiguration(in, out, s) +} + func autoConvert_v1alpha1_CSRSigningControllerConfiguration_To_config_CSRSigningControllerConfiguration(in *v1alpha1.CSRSigningControllerConfiguration, out *config.CSRSigningControllerConfiguration, s conversion.Scope) error { out.ClusterSigningCertFile = in.ClusterSigningCertFile out.ClusterSigningKeyFile = in.ClusterSigningKeyFile + if err := Convert_v1alpha1_CSRSigningConfiguration_To_config_CSRSigningConfiguration(&in.KubeletServingSignerConfiguration, &out.KubeletServingSignerConfiguration, s); err != nil { + return err + } + if err := Convert_v1alpha1_CSRSigningConfiguration_To_config_CSRSigningConfiguration(&in.KubeletClientSignerConfiguration, &out.KubeletClientSignerConfiguration, s); err != nil { + return err + } + if err := Convert_v1alpha1_CSRSigningConfiguration_To_config_CSRSigningConfiguration(&in.KubeAPIServerClientSignerConfiguration, &out.KubeAPIServerClientSignerConfiguration, s); err != nil { + return err + } + if err := Convert_v1alpha1_CSRSigningConfiguration_To_config_CSRSigningConfiguration(&in.LegacyUnknownSignerConfiguration, &out.LegacyUnknownSignerConfiguration, s); err != nil { + return err + } out.ClusterSigningDuration = in.ClusterSigningDuration return nil } @@ -68,6 +112,18 @@ func autoConvert_v1alpha1_CSRSigningControllerConfiguration_To_config_CSRSigning func autoConvert_config_CSRSigningControllerConfiguration_To_v1alpha1_CSRSigningControllerConfiguration(in *config.CSRSigningControllerConfiguration, out *v1alpha1.CSRSigningControllerConfiguration, s conversion.Scope) error { out.ClusterSigningCertFile = in.ClusterSigningCertFile out.ClusterSigningKeyFile = in.ClusterSigningKeyFile + if err := Convert_config_CSRSigningConfiguration_To_v1alpha1_CSRSigningConfiguration(&in.KubeletServingSignerConfiguration, &out.KubeletServingSignerConfiguration, s); err != nil { + return err + } + if err := Convert_config_CSRSigningConfiguration_To_v1alpha1_CSRSigningConfiguration(&in.KubeletClientSignerConfiguration, &out.KubeletClientSignerConfiguration, s); err != nil { + return err + } + if err := Convert_config_CSRSigningConfiguration_To_v1alpha1_CSRSigningConfiguration(&in.KubeAPIServerClientSignerConfiguration, &out.KubeAPIServerClientSignerConfiguration, s); err != nil { + return err + } + if err := Convert_config_CSRSigningConfiguration_To_v1alpha1_CSRSigningConfiguration(&in.LegacyUnknownSignerConfiguration, &out.LegacyUnknownSignerConfiguration, s); err != nil { + return err + } out.ClusterSigningDuration = in.ClusterSigningDuration return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/zz_generated.deepcopy.go index aad96f3b81e..31794ef2a0b 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/config/zz_generated.deepcopy.go @@ -20,9 +20,29 @@ limitations under the License. package config +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CSRSigningConfiguration) DeepCopyInto(out *CSRSigningConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSRSigningConfiguration. +func (in *CSRSigningConfiguration) DeepCopy() *CSRSigningConfiguration { + if in == nil { + return nil + } + out := new(CSRSigningConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CSRSigningControllerConfiguration) DeepCopyInto(out *CSRSigningControllerConfiguration) { *out = *in + out.KubeletServingSignerConfiguration = in.KubeletServingSignerConfiguration + out.KubeletClientSignerConfiguration = in.KubeletClientSignerConfiguration + out.KubeAPIServerClientSignerConfiguration = in.KubeAPIServerClientSignerConfiguration + out.LegacyUnknownSignerConfiguration = in.LegacyUnknownSignerConfiguration out.ClusterSigningDuration = in.ClusterSigningDuration return } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/signer.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/signer.go index 836119bd8ea..a6c084ef45c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/signer.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/signer/signer.go @@ -22,15 +22,17 @@ import ( "crypto/x509" "encoding/pem" "fmt" - "strings" "time" - capi "k8s.io/api/certificates/v1beta1" + capi "k8s.io/api/certificates/v1" + capiv1beta1 "k8s.io/api/certificates/v1beta1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/server/dynamiccertificates" - certificatesinformers "k8s.io/client-go/informers/certificates/v1beta1" + certificatesinformers "k8s.io/client-go/informers/certificates/v1" clientset "k8s.io/client-go/kubernetes" - capihelper "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" + capihelper "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/controller/certificates" "k8s.io/kubernetes/pkg/controller/certificates/authority" ) @@ -40,20 +42,58 @@ type CSRSigningController struct { dynamicCertReloader dynamiccertificates.ControllerRunner } -func NewCSRSigningController( +func NewKubeletServingCSRSigningController( client clientset.Interface, csrInformer certificatesinformers.CertificateSigningRequestInformer, caFile, caKeyFile string, certTTL time.Duration, ) (*CSRSigningController, error) { - signer, err := newSigner(caFile, caKeyFile, client, certTTL) + return NewCSRSigningController("csrsigning-kubelet-serving", capi.KubeletServingSignerName, client, csrInformer, caFile, caKeyFile, certTTL) +} + +func NewKubeletClientCSRSigningController( + client clientset.Interface, + csrInformer certificatesinformers.CertificateSigningRequestInformer, + caFile, caKeyFile string, + certTTL time.Duration, +) (*CSRSigningController, error) { + return NewCSRSigningController("csrsigning-kubelet-client", capi.KubeAPIServerClientKubeletSignerName, client, csrInformer, caFile, caKeyFile, certTTL) +} + +func NewKubeAPIServerClientCSRSigningController( + client clientset.Interface, + csrInformer certificatesinformers.CertificateSigningRequestInformer, + caFile, caKeyFile string, + certTTL time.Duration, +) (*CSRSigningController, error) { + return NewCSRSigningController("csrsigning-kube-apiserver-client", capi.KubeAPIServerClientSignerName, client, csrInformer, caFile, caKeyFile, certTTL) +} + +func NewLegacyUnknownCSRSigningController( + client clientset.Interface, + csrInformer certificatesinformers.CertificateSigningRequestInformer, + caFile, caKeyFile string, + certTTL time.Duration, +) (*CSRSigningController, error) { + return NewCSRSigningController("csrsigning-legacy-unknown", capiv1beta1.LegacyUnknownSignerName, client, csrInformer, caFile, caKeyFile, certTTL) +} + +func NewCSRSigningController( + controllerName string, + signerName string, + client clientset.Interface, + csrInformer certificatesinformers.CertificateSigningRequestInformer, + caFile, caKeyFile string, + certTTL time.Duration, +) (*CSRSigningController, error) { + signer, err := newSigner(signerName, caFile, caKeyFile, client, certTTL) if err != nil { return nil, err } return &CSRSigningController{ certificateController: certificates.NewCertificateController( - "csrsigning", + controllerName, client, csrInformer, signer.handle, @@ -69,36 +109,46 @@ func (c *CSRSigningController) Run(workers int, stopCh <-chan struct{}) { c.certificateController.Run(workers, stopCh) } +type isRequestForSignerFunc func(req *x509.CertificateRequest, usages []capi.KeyUsage, signerName string) (bool, error) + type signer struct { caProvider *caProvider client clientset.Interface certTTL time.Duration + + signerName string + isRequestForSignerFn isRequestForSignerFunc } -func newSigner(caFile, caKeyFile string, client clientset.Interface, certificateDuration time.Duration) (*signer, error) { +func newSigner(signerName, caFile, caKeyFile string, client clientset.Interface, certificateDuration time.Duration) (*signer, error) { + isRequestForSignerFn, err := getCSRVerificationFuncForSignerName(signerName) + if err != nil { + return nil, err + } caProvider, err := newCAProvider(caFile, caKeyFile) if err != nil { return nil, err } ret := &signer{ - caProvider: caProvider, - client: client, - certTTL: certificateDuration, + caProvider: caProvider, + client: client, + certTTL: certificateDuration, + signerName: signerName, + isRequestForSignerFn: isRequestForSignerFn, } return ret, nil } func (s *signer) handle(csr *capi.CertificateSigningRequest) error { - // Ignore unapproved requests - if !certificates.IsCertificateRequestApproved(csr) { + // Ignore unapproved or failed requests + if !certificates.IsCertificateRequestApproved(csr) || certificates.HasTrueCondition(csr, capi.CertificateFailed) { return nil } - // Fast-path to avoid any additional processing if the CSRs signerName does - // not have a 'kubernetes.io/' prefix. - if !strings.HasPrefix(*csr.Spec.SignerName, "kubernetes.io/") { + // Fast-path to avoid any additional processing if the CSRs signerName does not match + if csr.Spec.SignerName != s.signerName { return nil } @@ -106,9 +156,21 @@ func (s *signer) handle(csr *capi.CertificateSigningRequest) error { if err != nil { return fmt.Errorf("unable to parse csr %q: %v", csr.Name, err) } - if !requestValidForSignerName(x509cr, csr.Spec.Usages, *csr.Spec.SignerName) { - // TODO: mark the CertificateRequest as being in a terminal state and - // communicate to the user why the request has been refused. + if recognized, err := s.isRequestForSignerFn(x509cr, csr.Spec.Usages, csr.Spec.SignerName); err != nil { + csr.Status.Conditions = append(csr.Status.Conditions, capi.CertificateSigningRequestCondition{ + Type: capi.CertificateFailed, + Status: v1.ConditionTrue, + Reason: "SignerValidationFailure", + Message: err.Error(), + LastUpdateTime: metav1.Now(), + }) + _, err = s.client.CertificatesV1().CertificateSigningRequests().UpdateStatus(context.TODO(), csr, metav1.UpdateOptions{}) + if err != nil { + return fmt.Errorf("error adding failure condition for csr: %v", err) + } + return nil + } else if !recognized { + // Ignore requests for kubernetes.io signerNames we don't recognize return nil } cert, err := s.sign(x509cr, csr.Spec.Usages) @@ -116,7 +178,7 @@ func (s *signer) handle(csr *capi.CertificateSigningRequest) error { return fmt.Errorf("error auto signing csr: %v", err) } csr.Status.Certificate = cert - _, err = s.client.CertificatesV1beta1().CertificateSigningRequests().UpdateStatus(context.TODO(), csr, metav1.UpdateOptions{}) + _, err = s.client.CertificatesV1().CertificateSigningRequests().UpdateStatus(context.TODO(), csr, metav1.UpdateOptions{}) if err != nil { return fmt.Errorf("error updating signature for csr: %v", err) } @@ -138,25 +200,57 @@ func (s *signer) sign(x509cr *x509.CertificateRequest, usages []capi.KeyUsage) ( return pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: der}), nil } -func requestValidForSignerName(req *x509.CertificateRequest, usages []capi.KeyUsage, signerName string) bool { - // Only handle CSRs with the specific known signerNames. +// getCSRVerificationFuncForSignerName is a function that provides reliable mapping of signer names to verification so that +// we don't have accidents with wiring at some later date. +func getCSRVerificationFuncForSignerName(signerName string) (isRequestForSignerFunc, error) { switch signerName { case capi.KubeletServingSignerName: - return capihelper.IsKubeletServingCSR(req, usages) + return isKubeletServing, nil case capi.KubeAPIServerClientKubeletSignerName: - return capihelper.IsKubeletClientCSR(req, usages) + return isKubeletClient, nil case capi.KubeAPIServerClientSignerName: - return validAPIServerClientUsages(usages) - case capi.LegacyUnknownSignerName: - // No restrictions are applied to the legacy-unknown signerName to - // maintain backward compatibility in v1beta1. - return true + return isKubeAPIServerClient, nil + case capiv1beta1.LegacyUnknownSignerName: + return isLegacyUnknown, nil default: - return false + // TODO type this error so that a different reporting loop (one without a signing cert), can mark + // CSRs with unknown kube signers as terminal if we wish. This largely depends on how tightly we want to control + // our signerNames. + return nil, fmt.Errorf("unrecognized signerName: %q", signerName) } } -func validAPIServerClientUsages(usages []capi.KeyUsage) bool { +func isKubeletServing(req *x509.CertificateRequest, usages []capi.KeyUsage, signerName string) (bool, error) { + if signerName != capi.KubeletServingSignerName { + return false, nil + } + return true, capihelper.ValidateKubeletServingCSR(req, usagesToSet(usages)) +} + +func isKubeletClient(req *x509.CertificateRequest, usages []capi.KeyUsage, signerName string) (bool, error) { + if signerName != capi.KubeAPIServerClientKubeletSignerName { + return false, nil + } + return true, capihelper.ValidateKubeletClientCSR(req, usagesToSet(usages)) +} + +func isKubeAPIServerClient(req *x509.CertificateRequest, usages []capi.KeyUsage, signerName string) (bool, error) { + if signerName != capi.KubeAPIServerClientSignerName { + return false, nil + } + return true, validAPIServerClientUsages(usages) +} + +func isLegacyUnknown(req *x509.CertificateRequest, usages []capi.KeyUsage, signerName string) (bool, error) { + if signerName != capiv1beta1.LegacyUnknownSignerName { + return false, nil + } + // No restrictions are applied to the legacy-unknown signerName to + // maintain backward compatibility in v1. + return true, nil +} + +func validAPIServerClientUsages(usages []capi.KeyUsage) error { hasClientAuth := false for _, u := range usages { switch u { @@ -165,8 +259,19 @@ func validAPIServerClientUsages(usages []capi.KeyUsage) bool { case capi.UsageClientAuth: hasClientAuth = true default: - return false + return fmt.Errorf("invalid usage for client certificate: %s", u) } } - return hasClientAuth + if !hasClientAuth { + return fmt.Errorf("missing required usage for client certificate: %s", capi.UsageClientAuth) + } + return nil +} + +func usagesToSet(usages []capi.KeyUsage) sets.String { + result := sets.NewString() + for _, usage := range usages { + result.Insert(string(usage)) + } + return result } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/client_builder.go b/vendor/k8s.io/kubernetes/pkg/controller/client_builder.go index 9c592f941a7..c2e1718d31a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/client_builder.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/client_builder.go @@ -35,7 +35,7 @@ import ( restclient "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" watchtools "k8s.io/client-go/tools/watch" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/api/legacyscheme" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/serviceaccount" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/client_builder_dynamic.go b/vendor/k8s.io/kubernetes/pkg/controller/client_builder_dynamic.go index 4ece4e0af63..e47cd841767 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/client_builder_dynamic.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/client_builder_dynamic.go @@ -34,7 +34,7 @@ import ( v1core "k8s.io/client-go/kubernetes/typed/core/v1" restclient "k8s.io/client-go/rest" "k8s.io/client-go/transport" - "k8s.io/klog" + "k8s.io/klog/v2" utilpointer "k8s.io/utils/pointer" ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/clusterroleaggregation/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/clusterroleaggregation/BUILD index 2fef3c98f41..1373e9c96ec 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/clusterroleaggregation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/clusterroleaggregation/BUILD @@ -19,7 +19,7 @@ go_library( "//staging/src/k8s.io/client-go/listers/rbac/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go index cbf76d18add..6eb4d9a5266 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/clusterroleaggregation/clusterroleaggregation_controller.go @@ -22,7 +22,7 @@ import ( "sort" "time" - "k8s.io/klog" + "k8s.io/klog/v2" rbacv1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/equality" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go b/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go index 1759e797baa..6840b6a45a1 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/klog" + "k8s.io/klog/v2" ) type BaseControllerRefManager struct { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go index 3b9c583465f..e5c66bfacd3 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go @@ -51,7 +51,7 @@ import ( taintutils "k8s.io/kubernetes/pkg/util/taints" "k8s.io/utils/integer" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -601,8 +601,12 @@ func (r RealPodControl) DeletePod(namespace string, podID string, object runtime if err != nil { return fmt.Errorf("object does not have ObjectMeta, %v", err) } - klog.V(2).Infof("Controller %v deleting pod %v/%v", accessor.GetName(), namespace, podID) - if err := r.KubeClient.CoreV1().Pods(namespace).Delete(context.TODO(), podID, metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) { + klog.V(2).InfoS("Deleting pod", "controller", accessor.GetName(), "pod", klog.KRef(namespace, podID)) + if err := r.KubeClient.CoreV1().Pods(namespace).Delete(context.TODO(), podID, metav1.DeleteOptions{}); err != nil { + if apierrors.IsNotFound(err) { + klog.V(4).Infof("pod %v/%v has already been deleted.", namespace, podID) + return err + } r.Recorder.Eventf(object, v1.EventTypeWarning, FailedDeletePodReason, "Error deleting: %v", err) return fmt.Errorf("unable to delete pods: %v", err) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/BUILD index cd862f073b8..e5f3e37bc11 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/BUILD @@ -34,7 +34,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/reference:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", "//vendor/github.com/robfig/cron:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller.go index 59974333a11..57205423c0f 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller.go @@ -18,14 +18,13 @@ package cronjob /* I did not use watch or expectations. Those add a lot of corner cases, and we aren't -expecting a large volume of jobs or scheduledJobs. (We are favoring correctness +expecting a large volume of jobs or cronJobs. (We are favoring correctness over scalability. If we find a single controller thread is too slow because there are a lot of Jobs or CronJobs, we can parallelize by Namespace. If we find the load on the API server is too high, we can use a watch and UndeltaStore.) -Just periodically list jobs and SJs, and then reconcile them. - +Just periodically list jobs and cronJobs, and then reconcile them. */ import ( @@ -34,7 +33,7 @@ import ( "sort" "time" - "k8s.io/klog" + "k8s.io/klog/v2" batchv1 "k8s.io/api/batch/v1" batchv1beta1 "k8s.io/api/batch/v1beta1" @@ -63,7 +62,7 @@ var controllerKind = batchv1beta1.SchemeGroupVersion.WithKind("CronJob") type Controller struct { kubeClient clientset.Interface jobControl jobControlInterface - sjControl sjControlInterface + cjControl cjControlInterface podControl podControlInterface recorder record.EventRecorder } @@ -71,7 +70,7 @@ type Controller struct { // NewController creates and initializes a new Controller. func NewController(kubeClient clientset.Interface) (*Controller, error) { eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) if kubeClient != nil && kubeClient.CoreV1().RESTClient().GetRateLimiter() != nil { @@ -83,7 +82,7 @@ func NewController(kubeClient clientset.Interface) (*Controller, error) { jm := &Controller{ kubeClient: kubeClient, jobControl: realJobControl{KubeClient: kubeClient}, - sjControl: &realSJControl{KubeClient: kubeClient}, + cjControl: &realCJControl{KubeClient: kubeClient}, podControl: &realPodControl{KubeClient: kubeClient}, recorder: eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "cronjob-controller"}), } @@ -131,15 +130,15 @@ func (jm *Controller) syncAll() { return jm.kubeClient.BatchV1beta1().CronJobs(metav1.NamespaceAll).List(context.TODO(), opts) } - jobsBySj := groupJobsByParent(js) - klog.V(4).Infof("Found %d groups", len(jobsBySj)) + jobsByCj := groupJobsByParent(js) + klog.V(4).Infof("Found %d groups", len(jobsByCj)) err = pager.New(pager.SimplePageFunc(cronJobListFunc)).EachListItem(context.Background(), metav1.ListOptions{}, func(object runtime.Object) error { - sj, ok := object.(*batchv1beta1.CronJob) + cj, ok := object.(*batchv1beta1.CronJob) if !ok { - return fmt.Errorf("expected type *batchv1beta1.CronJob, got type %T", sj) + return fmt.Errorf("expected type *batchv1beta1.CronJob, got type %T", cj) } - syncOne(sj, jobsBySj[sj.UID], time.Now(), jm.jobControl, jm.sjControl, jm.recorder) - cleanupFinishedJobs(sj, jobsBySj[sj.UID], jm.jobControl, jm.sjControl, jm.recorder) + syncOne(cj, jobsByCj[cj.UID], time.Now(), jm.jobControl, jm.cjControl, jm.recorder) + cleanupFinishedJobs(cj, jobsByCj[cj.UID], jm.jobControl, jm.cjControl, jm.recorder) return nil }) @@ -150,10 +149,10 @@ func (jm *Controller) syncAll() { } // cleanupFinishedJobs cleanups finished jobs created by a CronJob -func cleanupFinishedJobs(sj *batchv1beta1.CronJob, js []batchv1.Job, jc jobControlInterface, - sjc sjControlInterface, recorder record.EventRecorder) { +func cleanupFinishedJobs(cj *batchv1beta1.CronJob, js []batchv1.Job, jc jobControlInterface, + cjc cjControlInterface, recorder record.EventRecorder) { // If neither limits are active, there is no need to do anything. - if sj.Spec.FailedJobsHistoryLimit == nil && sj.Spec.SuccessfulJobsHistoryLimit == nil { + if cj.Spec.FailedJobsHistoryLimit == nil && cj.Spec.SuccessfulJobsHistoryLimit == nil { return } @@ -169,107 +168,107 @@ func cleanupFinishedJobs(sj *batchv1beta1.CronJob, js []batchv1.Job, jc jobContr } } - if sj.Spec.SuccessfulJobsHistoryLimit != nil { - removeOldestJobs(sj, + if cj.Spec.SuccessfulJobsHistoryLimit != nil { + removeOldestJobs(cj, successfulJobs, jc, - *sj.Spec.SuccessfulJobsHistoryLimit, + *cj.Spec.SuccessfulJobsHistoryLimit, recorder) } - if sj.Spec.FailedJobsHistoryLimit != nil { - removeOldestJobs(sj, + if cj.Spec.FailedJobsHistoryLimit != nil { + removeOldestJobs(cj, failedJobs, jc, - *sj.Spec.FailedJobsHistoryLimit, + *cj.Spec.FailedJobsHistoryLimit, recorder) } // Update the CronJob, in case jobs were removed from the list. - if _, err := sjc.UpdateStatus(sj); err != nil { - nameForLog := fmt.Sprintf("%s/%s", sj.Namespace, sj.Name) - klog.Infof("Unable to update status for %s (rv = %s): %v", nameForLog, sj.ResourceVersion, err) + if _, err := cjc.UpdateStatus(cj); err != nil { + nameForLog := fmt.Sprintf("%s/%s", cj.Namespace, cj.Name) + klog.Infof("Unable to update status for %s (rv = %s): %v", nameForLog, cj.ResourceVersion, err) } } // removeOldestJobs removes the oldest jobs from a list of jobs -func removeOldestJobs(sj *batchv1beta1.CronJob, js []batchv1.Job, jc jobControlInterface, maxJobs int32, recorder record.EventRecorder) { +func removeOldestJobs(cj *batchv1beta1.CronJob, js []batchv1.Job, jc jobControlInterface, maxJobs int32, recorder record.EventRecorder) { numToDelete := len(js) - int(maxJobs) if numToDelete <= 0 { return } - nameForLog := fmt.Sprintf("%s/%s", sj.Namespace, sj.Name) + nameForLog := fmt.Sprintf("%s/%s", cj.Namespace, cj.Name) klog.V(4).Infof("Cleaning up %d/%d jobs from %s", numToDelete, len(js), nameForLog) sort.Sort(byJobStartTime(js)) for i := 0; i < numToDelete; i++ { klog.V(4).Infof("Removing job %s from %s", js[i].Name, nameForLog) - deleteJob(sj, &js[i], jc, recorder) + deleteJob(cj, &js[i], jc, recorder) } } // syncOne reconciles a CronJob with a list of any Jobs that it created. -// All known jobs created by "sj" should be included in "js". +// All known jobs created by "cj" should be included in "js". // The current time is passed in to facilitate testing. // It has no receiver, to facilitate testing. -func syncOne(sj *batchv1beta1.CronJob, js []batchv1.Job, now time.Time, jc jobControlInterface, sjc sjControlInterface, recorder record.EventRecorder) { - nameForLog := fmt.Sprintf("%s/%s", sj.Namespace, sj.Name) +func syncOne(cj *batchv1beta1.CronJob, js []batchv1.Job, now time.Time, jc jobControlInterface, cjc cjControlInterface, recorder record.EventRecorder) { + nameForLog := fmt.Sprintf("%s/%s", cj.Namespace, cj.Name) childrenJobs := make(map[types.UID]bool) for _, j := range js { childrenJobs[j.ObjectMeta.UID] = true - found := inActiveList(*sj, j.ObjectMeta.UID) + found := inActiveList(*cj, j.ObjectMeta.UID) if !found && !IsJobFinished(&j) { - recorder.Eventf(sj, v1.EventTypeWarning, "UnexpectedJob", "Saw a job that the controller did not create or forgot: %s", j.Name) + recorder.Eventf(cj, v1.EventTypeWarning, "UnexpectedJob", "Saw a job that the controller did not create or forgot: %s", j.Name) // We found an unfinished job that has us as the parent, but it is not in our Active list. // This could happen if we crashed right after creating the Job and before updating the status, - // or if our jobs list is newer than our sj status after a relist, or if someone intentionally created + // or if our jobs list is newer than our cj status after a relist, or if someone intentionally created // a job that they wanted us to adopt. // TODO: maybe handle the adoption case? Concurrency/suspend rules will not apply in that case, obviously, since we can't // stop users from creating jobs if they have permission. It is assumed that if a - // user has permission to create a job within a namespace, then they have permission to make any scheduledJob + // user has permission to create a job within a namespace, then they have permission to make any cronJob // in the same namespace "adopt" that job. ReplicaSets and their Pods work the same way. - // TBS: how to update sj.Status.LastScheduleTime if the adopted job is newer than any we knew about? + // TBS: how to update cj.Status.LastScheduleTime if the adopted job is newer than any we knew about? } else if found && IsJobFinished(&j) { _, status := getFinishedStatus(&j) - deleteFromActiveList(sj, j.ObjectMeta.UID) - recorder.Eventf(sj, v1.EventTypeNormal, "SawCompletedJob", "Saw completed job: %s, status: %v", j.Name, status) + deleteFromActiveList(cj, j.ObjectMeta.UID) + recorder.Eventf(cj, v1.EventTypeNormal, "SawCompletedJob", "Saw completed job: %s, status: %v", j.Name, status) } } // Remove any job reference from the active list if the corresponding job does not exist any more. // Otherwise, the cronjob may be stuck in active mode forever even though there is no matching // job running. - for _, j := range sj.Status.Active { + for _, j := range cj.Status.Active { if found := childrenJobs[j.UID]; !found { - recorder.Eventf(sj, v1.EventTypeNormal, "MissingJob", "Active job went missing: %v", j.Name) - deleteFromActiveList(sj, j.UID) + recorder.Eventf(cj, v1.EventTypeNormal, "MissingJob", "Active job went missing: %v", j.Name) + deleteFromActiveList(cj, j.UID) } } - updatedSJ, err := sjc.UpdateStatus(sj) + updatedCJ, err := cjc.UpdateStatus(cj) if err != nil { - klog.Errorf("Unable to update status for %s (rv = %s): %v", nameForLog, sj.ResourceVersion, err) + klog.Errorf("Unable to update status for %s (rv = %s): %v", nameForLog, cj.ResourceVersion, err) return } - *sj = *updatedSJ + *cj = *updatedCJ - if sj.DeletionTimestamp != nil { + if cj.DeletionTimestamp != nil { // The CronJob is being deleted. // Don't do anything other than updating status. return } - if sj.Spec.Suspend != nil && *sj.Spec.Suspend { + if cj.Spec.Suspend != nil && *cj.Spec.Suspend { klog.V(4).Infof("Not starting job for %s because it is suspended", nameForLog) return } - times, err := getRecentUnmetScheduleTimes(*sj, now) + times, err := getRecentUnmetScheduleTimes(*cj, now) if err != nil { - recorder.Eventf(sj, v1.EventTypeWarning, "FailedNeedsStart", "Cannot determine if job needs to be started: %v", err) + recorder.Eventf(cj, v1.EventTypeWarning, "FailedNeedsStart", "Cannot determine if job needs to be started: %v", err) klog.Errorf("Cannot determine if %s needs to be started: %v", nameForLog, err) return } @@ -284,22 +283,22 @@ func syncOne(sj *batchv1beta1.CronJob, js []batchv1.Job, now time.Time, jc jobCo scheduledTime := times[len(times)-1] tooLate := false - if sj.Spec.StartingDeadlineSeconds != nil { - tooLate = scheduledTime.Add(time.Second * time.Duration(*sj.Spec.StartingDeadlineSeconds)).Before(now) + if cj.Spec.StartingDeadlineSeconds != nil { + tooLate = scheduledTime.Add(time.Second * time.Duration(*cj.Spec.StartingDeadlineSeconds)).Before(now) } if tooLate { klog.V(4).Infof("Missed starting window for %s", nameForLog) - recorder.Eventf(sj, v1.EventTypeWarning, "MissSchedule", "Missed scheduled time to start a job: %s", scheduledTime.Format(time.RFC1123Z)) + recorder.Eventf(cj, v1.EventTypeWarning, "MissSchedule", "Missed scheduled time to start a job: %s", scheduledTime.Format(time.RFC1123Z)) // TODO: Since we don't set LastScheduleTime when not scheduling, we are going to keep noticing // the miss every cycle. In order to avoid sending multiple events, and to avoid processing - // the sj again and again, we could set a Status.LastMissedTime when we notice a miss. + // the cj again and again, we could set a Status.LastMissedTime when we notice a miss. // Then, when we call getRecentUnmetScheduleTimes, we can take max(creationTimestamp, // Status.LastScheduleTime, Status.LastMissedTime), and then so we won't generate // and event the next time we process it, and also so the user looking at the status // can see easily that there was a missed execution. return } - if sj.Spec.ConcurrencyPolicy == batchv1beta1.ForbidConcurrent && len(sj.Status.Active) > 0 { + if cj.Spec.ConcurrencyPolicy == batchv1beta1.ForbidConcurrent && len(cj.Status.Active) > 0 { // Regardless which source of information we use for the set of active jobs, // there is some risk that we won't see an active job when there is one. // (because we haven't seen the status update to the SJ or the created pod). @@ -312,37 +311,37 @@ func syncOne(sj *batchv1beta1.CronJob, js []batchv1.Job, now time.Time, jc jobCo klog.V(4).Infof("Not starting job for %s because of prior execution still running and concurrency policy is Forbid", nameForLog) return } - if sj.Spec.ConcurrencyPolicy == batchv1beta1.ReplaceConcurrent { - for _, j := range sj.Status.Active { + if cj.Spec.ConcurrencyPolicy == batchv1beta1.ReplaceConcurrent { + for _, j := range cj.Status.Active { klog.V(4).Infof("Deleting job %s of %s that was still running at next scheduled start time", j.Name, nameForLog) job, err := jc.GetJob(j.Namespace, j.Name) if err != nil { - recorder.Eventf(sj, v1.EventTypeWarning, "FailedGet", "Get job: %v", err) + recorder.Eventf(cj, v1.EventTypeWarning, "FailedGet", "Get job: %v", err) return } - if !deleteJob(sj, job, jc, recorder) { + if !deleteJob(cj, job, jc, recorder) { return } } } - jobReq, err := getJobFromTemplate(sj, scheduledTime) + jobReq, err := getJobFromTemplate(cj, scheduledTime) if err != nil { klog.Errorf("Unable to make Job from template in %s: %v", nameForLog, err) return } - jobResp, err := jc.CreateJob(sj.Namespace, jobReq) + jobResp, err := jc.CreateJob(cj.Namespace, jobReq) if err != nil { // If the namespace is being torn down, we can safely ignore // this error since all subsequent creations will fail. if !errors.HasStatusCause(err, v1.NamespaceTerminatingCause) { - recorder.Eventf(sj, v1.EventTypeWarning, "FailedCreate", "Error creating job: %v", err) + recorder.Eventf(cj, v1.EventTypeWarning, "FailedCreate", "Error creating job: %v", err) } return } klog.V(4).Infof("Created Job %s for %s", jobResp.Name, nameForLog) - recorder.Eventf(sj, v1.EventTypeNormal, "SuccessfulCreate", "Created job %v", jobResp.Name) + recorder.Eventf(cj, v1.EventTypeNormal, "SuccessfulCreate", "Created job %v", jobResp.Name) // ------------------------------------------------------------------ // @@ -359,29 +358,29 @@ func syncOne(sj *batchv1beta1.CronJob, js []batchv1.Job, now time.Time, jc jobCo if err != nil { klog.V(2).Infof("Unable to make object reference for job for %s", nameForLog) } else { - sj.Status.Active = append(sj.Status.Active, *ref) + cj.Status.Active = append(cj.Status.Active, *ref) } - sj.Status.LastScheduleTime = &metav1.Time{Time: scheduledTime} - if _, err := sjc.UpdateStatus(sj); err != nil { - klog.Infof("Unable to update status for %s (rv = %s): %v", nameForLog, sj.ResourceVersion, err) + cj.Status.LastScheduleTime = &metav1.Time{Time: scheduledTime} + if _, err := cjc.UpdateStatus(cj); err != nil { + klog.Infof("Unable to update status for %s (rv = %s): %v", nameForLog, cj.ResourceVersion, err) } return } // deleteJob reaps a job, deleting the job, the pods and the reference in the active list -func deleteJob(sj *batchv1beta1.CronJob, job *batchv1.Job, jc jobControlInterface, recorder record.EventRecorder) bool { - nameForLog := fmt.Sprintf("%s/%s", sj.Namespace, sj.Name) +func deleteJob(cj *batchv1beta1.CronJob, job *batchv1.Job, jc jobControlInterface, recorder record.EventRecorder) bool { + nameForLog := fmt.Sprintf("%s/%s", cj.Namespace, cj.Name) // delete the job itself... if err := jc.DeleteJob(job.Namespace, job.Name); err != nil { - recorder.Eventf(sj, v1.EventTypeWarning, "FailedDelete", "Deleted job: %v", err) + recorder.Eventf(cj, v1.EventTypeWarning, "FailedDelete", "Deleted job: %v", err) klog.Errorf("Error deleting job %s from %s: %v", job.Name, nameForLog, err) return false } // ... and its reference from active list - deleteFromActiveList(sj, job.ObjectMeta.UID) - recorder.Eventf(sj, v1.EventTypeNormal, "SuccessfulDelete", "Deleted job %v", job.Name) + deleteFromActiveList(cj, job.ObjectMeta.UID) + recorder.Eventf(cj, v1.EventTypeNormal, "SuccessfulDelete", "Deleted job %v", job.Name) return true } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/injection.go b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/injection.go index 5f9504bdd52..aeef2805372 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/injection.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/injection.go @@ -31,33 +31,33 @@ import ( "k8s.io/client-go/tools/record" ) -// sjControlInterface is an interface that knows how to update CronJob status +// cjControlInterface is an interface that knows how to update CronJob status // created as an interface to allow testing. -type sjControlInterface interface { - UpdateStatus(sj *batchv1beta1.CronJob) (*batchv1beta1.CronJob, error) +type cjControlInterface interface { + UpdateStatus(cj *batchv1beta1.CronJob) (*batchv1beta1.CronJob, error) } -// realSJControl is the default implementation of sjControlInterface. -type realSJControl struct { +// realCJControl is the default implementation of cjControlInterface. +type realCJControl struct { KubeClient clientset.Interface } -var _ sjControlInterface = &realSJControl{} +var _ cjControlInterface = &realCJControl{} -func (c *realSJControl) UpdateStatus(sj *batchv1beta1.CronJob) (*batchv1beta1.CronJob, error) { - return c.KubeClient.BatchV1beta1().CronJobs(sj.Namespace).UpdateStatus(context.TODO(), sj, metav1.UpdateOptions{}) +func (c *realCJControl) UpdateStatus(cj *batchv1beta1.CronJob) (*batchv1beta1.CronJob, error) { + return c.KubeClient.BatchV1beta1().CronJobs(cj.Namespace).UpdateStatus(context.TODO(), cj, metav1.UpdateOptions{}) } -// fakeSJControl is the default implementation of sjControlInterface. -type fakeSJControl struct { +// fakeCJControl is the default implementation of cjControlInterface. +type fakeCJControl struct { Updates []batchv1beta1.CronJob } -var _ sjControlInterface = &fakeSJControl{} +var _ cjControlInterface = &fakeCJControl{} -func (c *fakeSJControl) UpdateStatus(sj *batchv1beta1.CronJob) (*batchv1beta1.CronJob, error) { - c.Updates = append(c.Updates, *sj) - return sj, nil +func (c *fakeCJControl) UpdateStatus(cj *batchv1beta1.CronJob) (*batchv1beta1.CronJob, error) { + c.Updates = append(c.Updates, *cj) + return cj, nil } // ------------------------------------------------------------------ // diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils.go b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils.go index 862a5fb2396..1ffbd5927dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils.go @@ -21,7 +21,7 @@ import ( "time" "github.com/robfig/cron" - "k8s.io/klog" + "k8s.io/klog/v2" batchv1 "k8s.io/api/batch/v1" batchv1beta1 "k8s.io/api/batch/v1beta1" @@ -32,8 +32,8 @@ import ( // Utilities for dealing with Jobs and CronJobs and time. -func inActiveList(sj batchv1beta1.CronJob, uid types.UID) bool { - for _, j := range sj.Status.Active { +func inActiveList(cj batchv1beta1.CronJob, uid types.UID) bool { + for _, j := range cj.Status.Active { if j.UID == uid { return true } @@ -41,17 +41,17 @@ func inActiveList(sj batchv1beta1.CronJob, uid types.UID) bool { return false } -func deleteFromActiveList(sj *batchv1beta1.CronJob, uid types.UID) { - if sj == nil { +func deleteFromActiveList(cj *batchv1beta1.CronJob, uid types.UID) { + if cj == nil { return } newActive := []v1.ObjectReference{} - for _, j := range sj.Status.Active { + for _, j := range cj.Status.Active { if j.UID != uid { newActive = append(newActive, j) } } - sj.Status.Active = newActive + cj.Status.Active = newActive } // getParentUIDFromJob extracts UID of job's parent and whether it was found @@ -70,47 +70,47 @@ func getParentUIDFromJob(j batchv1.Job) (types.UID, bool) { return controllerRef.UID, true } -// groupJobsByParent groups jobs into a map keyed by the job parent UID (e.g. scheduledJob). +// groupJobsByParent groups jobs into a map keyed by the job parent UID (e.g. cronJob). // It has no receiver, to facilitate testing. func groupJobsByParent(js []batchv1.Job) map[types.UID][]batchv1.Job { - jobsBySj := make(map[types.UID][]batchv1.Job) + jobsByCj := make(map[types.UID][]batchv1.Job) for _, job := range js { parentUID, found := getParentUIDFromJob(job) if !found { klog.V(4).Infof("Unable to get parent uid from job %s in namespace %s", job.Name, job.Namespace) continue } - jobsBySj[parentUID] = append(jobsBySj[parentUID], job) + jobsByCj[parentUID] = append(jobsByCj[parentUID], job) } - return jobsBySj + return jobsByCj } // getRecentUnmetScheduleTimes gets a slice of times (from oldest to latest) that have passed when a Job should have started but did not. // // If there are too many (>100) unstarted times, just give up and return an empty slice. // If there were missed times prior to the last known start time, then those are not returned. -func getRecentUnmetScheduleTimes(sj batchv1beta1.CronJob, now time.Time) ([]time.Time, error) { +func getRecentUnmetScheduleTimes(cj batchv1beta1.CronJob, now time.Time) ([]time.Time, error) { starts := []time.Time{} - sched, err := cron.ParseStandard(sj.Spec.Schedule) + sched, err := cron.ParseStandard(cj.Spec.Schedule) if err != nil { - return starts, fmt.Errorf("unparseable schedule: %s : %s", sj.Spec.Schedule, err) + return starts, fmt.Errorf("unparseable schedule: %s : %s", cj.Spec.Schedule, err) } var earliestTime time.Time - if sj.Status.LastScheduleTime != nil { - earliestTime = sj.Status.LastScheduleTime.Time + if cj.Status.LastScheduleTime != nil { + earliestTime = cj.Status.LastScheduleTime.Time } else { - // If none found, then this is either a recently created scheduledJob, + // If none found, then this is either a recently created cronJob, // or the active/completed info was somehow lost (contract for status // in kubernetes says it may need to be recreated), or that we have // started a job, but have not noticed it yet (distributed systems can // have arbitrary delays). In any case, use the creation time of the // CronJob as last known start time. - earliestTime = sj.ObjectMeta.CreationTimestamp.Time + earliestTime = cj.ObjectMeta.CreationTimestamp.Time } - if sj.Spec.StartingDeadlineSeconds != nil { + if cj.Spec.StartingDeadlineSeconds != nil { // Controller is not going to schedule anything below this point - schedulingDeadline := now.Add(-time.Second * time.Duration(*sj.Spec.StartingDeadlineSeconds)) + schedulingDeadline := now.Add(-time.Second * time.Duration(*cj.Spec.StartingDeadlineSeconds)) if schedulingDeadline.After(earliestTime) { earliestTime = schedulingDeadline @@ -126,8 +126,8 @@ func getRecentUnmetScheduleTimes(sj batchv1beta1.CronJob, now time.Time) ([]time // controller gets wedged on friday at 5:01pm when everyone has // gone home, and someone comes in on tuesday AM and discovers // the problem and restarts the controller, then all the hourly - // jobs, more than 80 of them for one hourly scheduledJob, should - // all start running with no further intervention (if the scheduledJob + // jobs, more than 80 of them for one hourly cronJob, should + // all start running with no further intervention (if the cronJob // allows concurrency and late starts). // // However, if there is a bug somewhere, or incorrect clock @@ -148,21 +148,21 @@ func getRecentUnmetScheduleTimes(sj batchv1beta1.CronJob, now time.Time) ([]time } // getJobFromTemplate makes a Job from a CronJob -func getJobFromTemplate(sj *batchv1beta1.CronJob, scheduledTime time.Time) (*batchv1.Job, error) { - labels := copyLabels(&sj.Spec.JobTemplate) - annotations := copyAnnotations(&sj.Spec.JobTemplate) +func getJobFromTemplate(cj *batchv1beta1.CronJob, scheduledTime time.Time) (*batchv1.Job, error) { + labels := copyLabels(&cj.Spec.JobTemplate) + annotations := copyAnnotations(&cj.Spec.JobTemplate) // We want job names for a given nominal start time to have a deterministic name to avoid the same job being created twice - name := fmt.Sprintf("%s-%d", sj.Name, getTimeHash(scheduledTime)) + name := fmt.Sprintf("%s-%d", cj.Name, getTimeHash(scheduledTime)) job := &batchv1.Job{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, Annotations: annotations, Name: name, - OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(sj, controllerKind)}, + OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(cj, controllerKind)}, }, } - sj.Spec.JobTemplate.Spec.DeepCopyInto(&job.Spec) + cj.Spec.JobTemplate.Spec.DeepCopyInto(&job.Spec) return job, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/daemon/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/daemon/BUILD index 2a71979c469..04961a81e83 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/daemon/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/daemon/BUILD @@ -20,7 +20,6 @@ go_library( "//pkg/controller:go_default_library", "//pkg/controller/daemon/util:go_default_library", "//pkg/scheduler/framework/plugins/helper:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//pkg/util/labels:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", @@ -47,7 +46,7 @@ go_library( "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/integer:go_default_library", ], ) @@ -61,7 +60,6 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//pkg/api/legacyscheme:go_default_library", "//pkg/api/v1/pod:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/scheduling:go_default_library", @@ -86,7 +84,7 @@ go_test( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemon_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemon_controller.go index 25353c33269..a0fc135156e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemon_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemon_controller.go @@ -24,12 +24,13 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" apps "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" utilerrors "k8s.io/apimachinery/pkg/util/errors" @@ -53,7 +54,6 @@ import ( "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/daemon/util" pluginhelper "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" "k8s.io/utils/integer" ) @@ -139,7 +139,7 @@ func NewDaemonSetsController( failedPodsBackoff *flowcontrol.Backoff, ) (*DaemonSetsController, error) { eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) if kubeClient != nil && kubeClient.CoreV1().RESTClient().GetRateLimiter() != nil { @@ -1005,10 +1005,12 @@ func (dsc *DaemonSetsController) syncNodes(ds *apps.DaemonSet, podsToDelete, nod go func(ix int) { defer deleteWait.Done() if err := dsc.podControl.DeletePod(ds.Namespace, podsToDelete[ix], ds); err != nil { - klog.V(2).Infof("Failed deletion, decrementing expectations for set %q/%q", ds.Namespace, ds.Name) dsc.expectations.DeletionObserved(dsKey) - errCh <- err - utilruntime.HandleError(err) + if !apierrors.IsNotFound(err) { + klog.V(2).Infof("Failed deletion, decremented expectations for set %q/%q", ds.Namespace, ds.Name) + errCh <- err + utilruntime.HandleError(err) + } } }(i) } @@ -1228,14 +1230,7 @@ func (dsc *DaemonSetsController) nodeShouldRunDaemonPod(node *v1.Node, ds *apps. return false, false, nil } - nodeInfo := schedulernodeinfo.NewNodeInfo() - nodeInfo.SetNode(node) - taints, err := nodeInfo.Taints() - if err != nil { - klog.Warningf("failed to get node %q taints: %v", node.Name, err) - return false, false, err - } - + taints := node.Spec.Taints fitsNodeName, fitsNodeAffinity, fitsTaints := Predicates(pod, node, taints) if !fitsNodeName || !fitsNodeAffinity { return false, false, nil diff --git a/vendor/k8s.io/kubernetes/pkg/controller/daemon/update.go b/vendor/k8s.io/kubernetes/pkg/controller/daemon/update.go index c3e31ffee35..1b7620fb355 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/daemon/update.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/daemon/update.go @@ -23,7 +23,7 @@ import ( "reflect" "sort" - "k8s.io/klog" + "k8s.io/klog/v2" apps "k8s.io/api/apps/v1" "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/deployment/BUILD index 5e858360b51..7a99fc4f18a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/BUILD @@ -41,7 +41,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/integer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller.go index c7dea658102..3a74336d224 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller.go @@ -26,7 +26,7 @@ import ( "reflect" "time" - "k8s.io/klog" + "k8s.io/klog/v2" apps "k8s.io/api/apps/v1" "k8s.io/api/core/v1" @@ -100,7 +100,7 @@ type DeploymentController struct { // NewDeploymentController creates a new DeploymentController. func NewDeploymentController(dInformer appsinformers.DeploymentInformer, rsInformer appsinformers.ReplicaSetInformer, podInformer coreinformers.PodInformer, client clientset.Interface) (*DeploymentController, error) { eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: client.CoreV1().Events("")}) if client != nil && client.CoreV1().RESTClient().GetRateLimiter() != nil { @@ -182,12 +182,12 @@ func (dc *DeploymentController) deleteDeployment(obj interface{}) { if !ok { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { - utilruntime.HandleError(fmt.Errorf("Couldn't get object from tombstone %#v", obj)) + utilruntime.HandleError(fmt.Errorf("couldn't get object from tombstone %#v", obj)) return } d, ok = tombstone.Obj.(*apps.Deployment) if !ok { - utilruntime.HandleError(fmt.Errorf("Tombstone contained object that is not a Deployment %#v", obj)) + utilruntime.HandleError(fmt.Errorf("tombstone contained object that is not a Deployment %#v", obj)) return } } @@ -311,12 +311,12 @@ func (dc *DeploymentController) deleteReplicaSet(obj interface{}) { if !ok { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { - utilruntime.HandleError(fmt.Errorf("Couldn't get object from tombstone %#v", obj)) + utilruntime.HandleError(fmt.Errorf("couldn't get object from tombstone %#v", obj)) return } rs, ok = tombstone.Obj.(*apps.ReplicaSet) if !ok { - utilruntime.HandleError(fmt.Errorf("Tombstone contained object that is not a ReplicaSet %#v", obj)) + utilruntime.HandleError(fmt.Errorf("tombstone contained object that is not a ReplicaSet %#v", obj)) return } } @@ -345,12 +345,12 @@ func (dc *DeploymentController) deletePod(obj interface{}) { if !ok { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { - utilruntime.HandleError(fmt.Errorf("Couldn't get object from tombstone %#v", obj)) + utilruntime.HandleError(fmt.Errorf("couldn't get object from tombstone %#v", obj)) return } pod, ok = tombstone.Obj.(*v1.Pod) if !ok { - utilruntime.HandleError(fmt.Errorf("Tombstone contained object that is not a pod %#v", obj)) + utilruntime.HandleError(fmt.Errorf("tombstone contained object that is not a pod %#v", obj)) return } } @@ -378,7 +378,7 @@ func (dc *DeploymentController) deletePod(obj interface{}) { func (dc *DeploymentController) enqueue(deployment *apps.Deployment) { key, err := controller.KeyFunc(deployment) if err != nil { - utilruntime.HandleError(fmt.Errorf("Couldn't get key for object %#v: %v", deployment, err)) + utilruntime.HandleError(fmt.Errorf("couldn't get key for object %#v: %v", deployment, err)) return } @@ -388,7 +388,7 @@ func (dc *DeploymentController) enqueue(deployment *apps.Deployment) { func (dc *DeploymentController) enqueueRateLimited(deployment *apps.Deployment) { key, err := controller.KeyFunc(deployment) if err != nil { - utilruntime.HandleError(fmt.Errorf("Couldn't get key for object %#v: %v", deployment, err)) + utilruntime.HandleError(fmt.Errorf("couldn't get key for object %#v: %v", deployment, err)) return } @@ -399,7 +399,7 @@ func (dc *DeploymentController) enqueueRateLimited(deployment *apps.Deployment) func (dc *DeploymentController) enqueueAfter(deployment *apps.Deployment, after time.Duration) { key, err := controller.KeyFunc(deployment) if err != nil { - utilruntime.HandleError(fmt.Errorf("Couldn't get key for object %#v: %v", deployment, err)) + utilruntime.HandleError(fmt.Errorf("couldn't get key for object %#v: %v", deployment, err)) return } @@ -481,8 +481,13 @@ func (dc *DeploymentController) handleErr(err error, key interface{}) { return } + ns, name, keyErr := cache.SplitMetaNamespaceKey(key.(string)) + if keyErr != nil { + klog.ErrorS(err, "Failed to split meta namespace cache key", "key", key) + } + if dc.queue.NumRequeues(key) < maxRetries { - klog.V(2).Infof("Error syncing deployment %v: %v", key, err) + klog.V(2).InfoS("Error syncing deployment", "deployment", klog.KRef(ns, name), "err", err) dc.queue.AddRateLimited(key) return } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/progress.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/progress.go index 823f96d3b33..6812daa3c1c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/progress.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/progress.go @@ -23,7 +23,7 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog" + "k8s.io/klog/v2" apps "k8s.io/api/apps/v1" "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/rollback.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/rollback.go index 75dfcf20d67..95708d923ad 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/rollback.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/rollback.go @@ -22,7 +22,7 @@ import ( "strconv" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog" + "k8s.io/klog/v2" apps "k8s.io/api/apps/v1" "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/rolling.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/rolling.go index 7cc40bbc53e..e3408bd3fa8 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/rolling.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/rolling.go @@ -21,7 +21,7 @@ import ( "sort" apps "k8s.io/api/apps/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller" deploymentutil "k8s.io/kubernetes/pkg/controller/deployment/util" "k8s.io/utils/integer" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/sync.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/sync.go index 8e50f10fe26..3c7e808b24b 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/sync.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/sync.go @@ -27,7 +27,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller" deploymentutil "k8s.io/kubernetes/pkg/controller/deployment/util" labelsutil "k8s.io/kubernetes/pkg/util/labels" @@ -98,7 +98,7 @@ func (dc *DeploymentController) checkPausedConditions(d *apps.Deployment) error } var err error - d, err = dc.client.AppsV1().Deployments(d.Namespace).UpdateStatus(context.TODO(), d, metav1.UpdateOptions{}) + _, err = dc.client.AppsV1().Deployments(d.Namespace).UpdateStatus(context.TODO(), d, metav1.UpdateOptions{}) return err } @@ -173,7 +173,7 @@ func (dc *DeploymentController) getNewReplicaSet(d *apps.Deployment, rsList, old if needsUpdate { var err error - if d, err = dc.client.AppsV1().Deployments(d.Namespace).UpdateStatus(context.TODO(), d, metav1.UpdateOptions{}); err != nil { + if _, err = dc.client.AppsV1().Deployments(d.Namespace).UpdateStatus(context.TODO(), d, metav1.UpdateOptions{}); err != nil { return nil, err } } @@ -525,7 +525,6 @@ func calculateStatus(allRSs []*apps.ReplicaSet, newRS *apps.ReplicaSet, deployme // by looking at the desired-replicas annotation in the active replica sets of the deployment. // // rsList should come from getReplicaSetsForDeployment(d). -// podMap should come from getPodMapForDeployment(d, rsList). func (dc *DeploymentController) isScalingEvent(d *apps.Deployment, rsList []*apps.ReplicaSet) (bool, error) { newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(d, rsList, false) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/BUILD index 9cf77121c5a..698c83aa55c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/BUILD @@ -25,7 +25,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", "//staging/src/k8s.io/client-go/listers/apps/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/integer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go index 26305c776a1..4312ef03040 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go @@ -37,7 +37,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" appsclient "k8s.io/client-go/kubernetes/typed/apps/v1" appslisters "k8s.io/client-go/listers/apps/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller" labelsutil "k8s.io/kubernetes/pkg/util/labels" "k8s.io/utils/integer" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/disruption/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/disruption/BUILD index 2d1560f189e..26ebc31cb43 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/disruption/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/disruption/BUILD @@ -39,7 +39,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -70,7 +70,7 @@ go_test( "//staging/src/k8s.io/client-go/testing:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption.go b/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption.go index 7386029d919..c0a02c2b50a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption.go @@ -50,7 +50,7 @@ import ( podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/controller" - "k8s.io/klog" + "k8s.io/klog/v2" ) // DeletionTimeout sets maximum time from the moment a pod is added to DisruptedPods in PDB.Status @@ -689,7 +689,6 @@ func (dc *DisruptionController) getExpectedScale(pdb *policy.PodDisruptionBudget } func countHealthyPods(pods []*v1.Pod, disruptedPods map[string]metav1.Time, currentTime time.Time) (currentHealthy int32) { -Pod: for _, pod := range pods { // Pod is being deleted. if pod.DeletionTimestamp != nil { @@ -701,7 +700,6 @@ Pod: } if podutil.IsPodReady(pod) { currentHealthy++ - continue Pod } } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpoint/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/endpoint/BUILD index e3f2a8aeb07..da35826b242 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/endpoint/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpoint/BUILD @@ -35,7 +35,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) @@ -48,7 +48,6 @@ go_test( "//pkg/api/v1/endpoints:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/controller:go_default_library", - "//pkg/controller/util/endpoint:go_default_library", "//pkg/features:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -65,6 +64,7 @@ go_test( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/testing:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller.go index bc77b3751fc..2c91d491911 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller.go @@ -19,7 +19,6 @@ package endpoint import ( "context" "fmt" - "reflect" "strconv" "time" @@ -41,7 +40,7 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" "k8s.io/component-base/metrics/prometheus/ratelimiter" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/api/v1/endpoints" podutil "k8s.io/kubernetes/pkg/api/v1/pod" api "k8s.io/kubernetes/pkg/apis/core" @@ -80,7 +79,7 @@ const ( func NewEndpointController(podInformer coreinformers.PodInformer, serviceInformer coreinformers.ServiceInformer, endpointsInformer coreinformers.EndpointsInformer, client clientset.Interface, endpointUpdatesBatchPeriod time.Duration) *EndpointController { broadcaster := record.NewBroadcaster() - broadcaster.StartLogging(klog.Infof) + broadcaster.StartStructuredLogging(0) broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: client.CoreV1().Events("")}) recorder := broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "endpoint-controller"}) @@ -111,6 +110,9 @@ func NewEndpointController(podInformer coreinformers.PodInformer, serviceInforme e.podLister = podInformer.Lister() e.podsSynced = podInformer.Informer().HasSynced + endpointsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + DeleteFunc: e.onEndpointsDelete, + }) e.endpointsLister = endpointsInformer.Lister() e.endpointsSynced = endpointsInformer.Informer().HasSynced @@ -213,39 +215,27 @@ func (e *EndpointController) addPod(obj interface{}) { } func podToEndpointAddressForService(svc *v1.Service, pod *v1.Pod) (*v1.EndpointAddress, error) { + var endpointIP string + if !utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) { - return podToEndpointAddress(pod), nil - } - - // api-server service controller ensured that the service got the correct IP Family - // according to user setup, here we only need to match EndPoint IPs' family to service - // actual IP family. as in, we don't need to check service.IPFamily - - ipv6ClusterIP := utilnet.IsIPv6String(svc.Spec.ClusterIP) - for _, podIP := range pod.Status.PodIPs { - ipv6PodIP := utilnet.IsIPv6String(podIP.IP) - // same family? - // TODO (khenidak) when we remove the max of 2 PodIP limit from pods - // we will have to return multiple endpoint addresses - if ipv6ClusterIP == ipv6PodIP { - return &v1.EndpointAddress{ - IP: podIP.IP, - NodeName: &pod.Spec.NodeName, - TargetRef: &v1.ObjectReference{ - Kind: "Pod", - Namespace: pod.ObjectMeta.Namespace, - Name: pod.ObjectMeta.Name, - UID: pod.ObjectMeta.UID, - ResourceVersion: pod.ObjectMeta.ResourceVersion, - }}, nil + // In a legacy cluster, the pod IP is guaranteed to be usable + endpointIP = pod.Status.PodIP + } else { + ipv6Service := endpointutil.IsIPv6Service(svc) + for _, podIP := range pod.Status.PodIPs { + ipv6PodIP := utilnet.IsIPv6String(podIP.IP) + if ipv6Service == ipv6PodIP { + endpointIP = podIP.IP + break + } + } + if endpointIP == "" { + return nil, fmt.Errorf("failed to find a matching endpoint for service %v", svc.Name) } } - return nil, fmt.Errorf("failed to find a matching endpoint for service %v", svc.Name) -} -func podToEndpointAddress(pod *v1.Pod) *v1.EndpointAddress { return &v1.EndpointAddress{ - IP: pod.Status.PodIP, + IP: endpointIP, NodeName: &pod.Spec.NodeName, TargetRef: &v1.ObjectReference{ Kind: "Pod", @@ -253,24 +243,15 @@ func podToEndpointAddress(pod *v1.Pod) *v1.EndpointAddress { Name: pod.ObjectMeta.Name, UID: pod.ObjectMeta.UID, ResourceVersion: pod.ObjectMeta.ResourceVersion, - }} -} - -func endpointChanged(pod1, pod2 *v1.Pod) bool { - endpointAddress1 := podToEndpointAddress(pod1) - endpointAddress2 := podToEndpointAddress(pod2) - - endpointAddress1.TargetRef.ResourceVersion = "" - endpointAddress2.TargetRef.ResourceVersion = "" - - return !reflect.DeepEqual(endpointAddress1, endpointAddress2) + }, + }, nil } // When a pod is updated, figure out what services it used to be a member of // and what services it will be a member of, and enqueue the union of these. // old and cur must be *v1.Pod types. func (e *EndpointController) updatePod(old, cur interface{}) { - services := endpointutil.GetServicesToUpdateOnPodChange(e.serviceLister, e.serviceSelectorCache, old, cur, endpointChanged) + services := endpointutil.GetServicesToUpdateOnPodChange(e.serviceLister, e.serviceSelectorCache, old, cur) for key := range services { e.queue.AddAfter(key, e.endpointUpdatesBatchPeriod) } @@ -309,6 +290,15 @@ func (e *EndpointController) onServiceDelete(obj interface{}) { e.queue.Add(key) } +func (e *EndpointController) onEndpointsDelete(obj interface{}) { + key, err := controller.KeyFunc(obj) + if err != nil { + utilruntime.HandleError(fmt.Errorf("Couldn't get key for object %+v: %v", obj, err)) + return + } + e.queue.Add(key) +} + // worker runs a worker thread that just dequeues items, processes them, and // marks them done. You may run as many of these in parallel as you wish; the // workqueue guarantees that they will not end up processing the same service @@ -337,8 +327,13 @@ func (e *EndpointController) handleErr(err error, key interface{}) { return } + ns, name, keyErr := cache.SplitMetaNamespaceKey(key.(string)) + if keyErr != nil { + klog.ErrorS(err, "Failed to split meta namespace cache key", "key", key) + } + if e.queue.NumRequeues(key) < maxRetries { - klog.V(2).Infof("Error syncing endpoints for service %q, retrying. Error: %v", key, err) + klog.V(2).InfoS("Error syncing endpoints, retrying", "service", klog.KRef(ns, name), "err", err) e.queue.AddRateLimited(key) return } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/BUILD index d76da270626..79e77eb0de4 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/BUILD @@ -26,7 +26,6 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", @@ -41,7 +40,8 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/golang.org/x/time/rate:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) @@ -65,8 +65,10 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/endpointslice_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/endpointslice_controller.go index 1f26a165050..4021e1b45ec 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/endpointslice_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/endpointslice_controller.go @@ -20,6 +20,8 @@ import ( "fmt" "time" + "golang.org/x/time/rate" + v1 "k8s.io/api/core/v1" discovery "k8s.io/api/discovery/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -37,7 +39,7 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" "k8s.io/component-base/metrics/prometheus/ratelimiter" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller" endpointslicemetrics "k8s.io/kubernetes/pkg/controller/endpointslice/metrics" endpointutil "k8s.io/kubernetes/pkg/controller/util/endpoint" @@ -47,13 +49,24 @@ const ( // maxRetries is the number of times a service will be retried before it is // dropped out of the queue. Any sync error, such as a failure to create or // update an EndpointSlice could trigger a retry. With the current - // rate-limiter in use (5ms*2^(maxRetries-1)) the following numbers - // represent the sequence of delays between successive queuings of a - // service. + // rate-limiter in use (1s*2^(numRetries-1)) the following numbers represent + // the sequence of delays between successive queuings of a service. // - // 5ms, 10ms, 20ms, 40ms, 80ms, 160ms, 320ms, 640ms, 1.3s, 2.6s, 5.1s, - // 10.2s, 20.4s, 41s, 82s + // 1s, 2s, 4s, 8s, 16s, 32s, 64s, 128s, 256s, 512s, 1000s (max) maxRetries = 15 + + // endpointSliceChangeMinSyncDelay indicates the mininum delay before + // queuing a syncService call after an EndpointSlice changes. If + // endpointUpdatesBatchPeriod is greater than this value, it will be used + // instead. This helps batch processing of changes to multiple + // EndpointSlices. + endpointSliceChangeMinSyncDelay = 1 * time.Second + + // defaultSyncBackOff is the default backoff period for syncService calls. + defaultSyncBackOff = 1 * time.Second + // maxSyncBackOff is the max backoff period for syncService calls. + maxSyncBackOff = 100 * time.Second + // controllerName is a unique value used with LabelManagedBy to indicated // the component managing an EndpointSlice. controllerName = "endpointslice-controller.k8s.io" @@ -69,7 +82,7 @@ func NewController(podInformer coreinformers.PodInformer, endpointUpdatesBatchPeriod time.Duration, ) *Controller { broadcaster := record.NewBroadcaster() - broadcaster.StartLogging(klog.Infof) + broadcaster.StartStructuredLogging(0) broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: client.CoreV1().Events("")}) recorder := broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "endpoint-slice-controller"}) @@ -80,8 +93,19 @@ func NewController(podInformer coreinformers.PodInformer, endpointslicemetrics.RegisterMetrics() c := &Controller{ - client: client, - queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "endpoint_slice"), + client: client, + // This is similar to the DefaultControllerRateLimiter, just with a + // significantly higher default backoff (1s vs 5ms). This controller + // processes events that can require significant EndpointSlice changes, + // such as an update to a Service or Deployment. A more significant + // rate limit back off here helps ensure that the Controller does not + // overwhelm the API Server. + queue: workqueue.NewNamedRateLimitingQueue(workqueue.NewMaxOfRateLimiter( + workqueue.NewItemExponentialFailureRateLimiter(defaultSyncBackOff, maxSyncBackOff), + // 10 qps, 100 bucket size. This is only for retry speed and its + // only the overall factor (not per item). + &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, + ), "endpoint_slice"), workerLoopPeriod: time.Second, } @@ -213,7 +237,7 @@ func (c *Controller) Run(workers int, stopCh <-chan struct{}) { klog.Infof("Starting endpoint slice controller") defer klog.Infof("Shutting down endpoint slice controller") - if !cache.WaitForNamedCacheSync("endpoint_slice", stopCh, c.podsSynced, c.servicesSynced) { + if !cache.WaitForNamedCacheSync("endpoint_slice", stopCh, c.podsSynced, c.servicesSynced, c.endpointSlicesSynced, c.nodesSynced) { return } @@ -283,6 +307,7 @@ func (c *Controller) syncService(key string) error { if apierrors.IsNotFound(err) { c.triggerTimeTracker.DeleteService(namespace, name) c.reconciler.deleteService(namespace, name) + c.endpointSliceTracker.DeleteService(namespace, name) // The service has been deleted, return nil so that it won't be retried. return nil } @@ -380,7 +405,7 @@ func (c *Controller) onEndpointSliceAdd(obj interface{}) { // endpointSliceTracker or the managed-by value of the EndpointSlice has changed // from or to this controller. func (c *Controller) onEndpointSliceUpdate(prevObj, obj interface{}) { - prevEndpointSlice := obj.(*discovery.EndpointSlice) + prevEndpointSlice := prevObj.(*discovery.EndpointSlice) endpointSlice := obj.(*discovery.EndpointSlice) if endpointSlice == nil || prevEndpointSlice == nil { utilruntime.HandleError(fmt.Errorf("Invalid EndpointSlice provided to onEndpointSliceUpdate()")) @@ -409,7 +434,14 @@ func (c *Controller) queueServiceForEndpointSlice(endpointSlice *discovery.Endpo utilruntime.HandleError(fmt.Errorf("Couldn't get key for EndpointSlice %+v: %v", endpointSlice, err)) return } - c.queue.Add(key) + + // queue after the max of endpointSliceChangeMinSyncDelay and + // endpointUpdatesBatchPeriod. + delay := endpointSliceChangeMinSyncDelay + if c.endpointUpdatesBatchPeriod > delay { + delay = c.endpointUpdatesBatchPeriod + } + c.queue.AddAfter(key, delay) } func (c *Controller) addPod(obj interface{}) { @@ -425,7 +457,7 @@ func (c *Controller) addPod(obj interface{}) { } func (c *Controller) updatePod(old, cur interface{}) { - services := endpointutil.GetServicesToUpdateOnPodChange(c.serviceLister, c.serviceSelectorCache, old, cur, podEndpointChanged) + services := endpointutil.GetServicesToUpdateOnPodChange(c.serviceLister, c.serviceSelectorCache, old, cur) for key := range services { c.queue.AddAfter(key, c.endpointUpdatesBatchPeriod) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/endpointslice_tracker.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/endpointslice_tracker.go index 7a0680ab739..d404edd353a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/endpointslice_tracker.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/endpointslice_tracker.go @@ -51,8 +51,11 @@ func (est *endpointSliceTracker) Has(endpointSlice *discovery.EndpointSlice) boo est.lock.Lock() defer est.lock.Unlock() - rrv := est.relatedResourceVersions(endpointSlice) - _, ok := rrv[endpointSlice.Name] + rrv, ok := est.relatedResourceVersions(endpointSlice) + if !ok { + return false + } + _, ok = rrv[endpointSlice.Name] return ok } @@ -63,7 +66,10 @@ func (est *endpointSliceTracker) Stale(endpointSlice *discovery.EndpointSlice) b est.lock.Lock() defer est.lock.Unlock() - rrv := est.relatedResourceVersions(endpointSlice) + rrv, ok := est.relatedResourceVersions(endpointSlice) + if !ok { + return true + } return rrv[endpointSlice.Name] != endpointSlice.ResourceVersion } @@ -73,33 +79,42 @@ func (est *endpointSliceTracker) Update(endpointSlice *discovery.EndpointSlice) est.lock.Lock() defer est.lock.Unlock() - rrv := est.relatedResourceVersions(endpointSlice) + rrv, ok := est.relatedResourceVersions(endpointSlice) + if !ok { + rrv = endpointSliceResourceVersions{} + est.resourceVersionsByService[getServiceNN(endpointSlice)] = rrv + } rrv[endpointSlice.Name] = endpointSlice.ResourceVersion } +// DeleteService removes the set of resource versions tracked for the Service. +func (est *endpointSliceTracker) DeleteService(namespace, name string) { + est.lock.Lock() + defer est.lock.Unlock() + + serviceNN := types.NamespacedName{Name: name, Namespace: namespace} + delete(est.resourceVersionsByService, serviceNN) +} + // Delete removes the resource version in this endpointSliceTracker for the // provided EndpointSlice. func (est *endpointSliceTracker) Delete(endpointSlice *discovery.EndpointSlice) { est.lock.Lock() defer est.lock.Unlock() - rrv := est.relatedResourceVersions(endpointSlice) - delete(rrv, endpointSlice.Name) + rrv, ok := est.relatedResourceVersions(endpointSlice) + if ok { + delete(rrv, endpointSlice.Name) + } } // relatedResourceVersions returns the set of resource versions tracked for the -// Service corresponding to the provided EndpointSlice. If no resource versions -// are currently tracked for this service, an empty set is initialized. -func (est *endpointSliceTracker) relatedResourceVersions(endpointSlice *discovery.EndpointSlice) endpointSliceResourceVersions { +// Service corresponding to the provided EndpointSlice, and a bool to indicate +// if it exists. +func (est *endpointSliceTracker) relatedResourceVersions(endpointSlice *discovery.EndpointSlice) (endpointSliceResourceVersions, bool) { serviceNN := getServiceNN(endpointSlice) vers, ok := est.resourceVersionsByService[serviceNN] - - if !ok { - vers = endpointSliceResourceVersions{} - est.resourceVersionsByService[serviceNN] = vers - } - - return vers + return vers, ok } // getServiceNN returns a namespaced name for the Service corresponding to the diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/reconciler.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/reconciler.go index bd1d0c5653c..866040cc84a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/reconciler.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/reconciler.go @@ -27,7 +27,6 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" clientset "k8s.io/client-go/kubernetes" corelisters "k8s.io/client-go/listers/core/v1" @@ -59,7 +58,7 @@ type endpointMeta struct { func (r *reconciler) reconcile(service *corev1.Service, pods []*corev1.Pod, existingSlices []*discovery.EndpointSlice, triggerTime time.Time) error { addressType := discovery.AddressTypeIPv4 - if isIPv6Service(service) { + if endpointutil.IsIPv6Service(service) { addressType = discovery.AddressTypeIPv6 } @@ -180,8 +179,6 @@ func (r *reconciler) finalize( slicesToDelete []*discovery.EndpointSlice, triggerTime time.Time, ) error { - errs := []error{} - // If there are slices to create and delete, change the creates to updates // of the slices that would otherwise be deleted. for i := 0; i < len(slicesToDelete); { @@ -206,16 +203,20 @@ func (r *reconciler) finalize( } } - for _, endpointSlice := range slicesToCreate { - addTriggerTimeAnnotation(endpointSlice, triggerTime) - createdSlice, err := r.client.DiscoveryV1beta1().EndpointSlices(service.Namespace).Create(context.TODO(), endpointSlice, metav1.CreateOptions{}) - if err != nil { - // If the namespace is terminating, creates will continue to fail. Simply drop the item. - if errors.HasStatusCause(err, corev1.NamespaceTerminatingCause) { - return nil + // Don't create new EndpointSlices if the Service is pending deletion. This + // is to avoid a potential race condition with the garbage collector where + // it tries to delete EndpointSlices as this controller replaces them. + if service.DeletionTimestamp == nil { + for _, endpointSlice := range slicesToCreate { + addTriggerTimeAnnotation(endpointSlice, triggerTime) + createdSlice, err := r.client.DiscoveryV1beta1().EndpointSlices(service.Namespace).Create(context.TODO(), endpointSlice, metav1.CreateOptions{}) + if err != nil { + // If the namespace is terminating, creates will continue to fail. Simply drop the item. + if errors.HasStatusCause(err, corev1.NamespaceTerminatingCause) { + return nil + } + return fmt.Errorf("failed to create EndpointSlice for Service %s/%s: %v", service.Namespace, service.Name, err) } - errs = append(errs, fmt.Errorf("Error creating EndpointSlice for Service %s/%s: %v", service.Namespace, service.Name, err)) - } else { r.endpointSliceTracker.Update(createdSlice) metrics.EndpointSliceChanges.WithLabelValues("create").Inc() } @@ -225,24 +226,22 @@ func (r *reconciler) finalize( addTriggerTimeAnnotation(endpointSlice, triggerTime) updatedSlice, err := r.client.DiscoveryV1beta1().EndpointSlices(service.Namespace).Update(context.TODO(), endpointSlice, metav1.UpdateOptions{}) if err != nil { - errs = append(errs, fmt.Errorf("Error updating %s EndpointSlice for Service %s/%s: %v", endpointSlice.Name, service.Namespace, service.Name, err)) - } else { - r.endpointSliceTracker.Update(updatedSlice) - metrics.EndpointSliceChanges.WithLabelValues("update").Inc() + return fmt.Errorf("failed to update %s EndpointSlice for Service %s/%s: %v", endpointSlice.Name, service.Namespace, service.Name, err) } + r.endpointSliceTracker.Update(updatedSlice) + metrics.EndpointSliceChanges.WithLabelValues("update").Inc() } for _, endpointSlice := range slicesToDelete { err := r.client.DiscoveryV1beta1().EndpointSlices(service.Namespace).Delete(context.TODO(), endpointSlice.Name, metav1.DeleteOptions{}) if err != nil { - errs = append(errs, fmt.Errorf("Error deleting %s EndpointSlice for Service %s/%s: %v", endpointSlice.Name, service.Namespace, service.Name, err)) - } else { - r.endpointSliceTracker.Delete(endpointSlice) - metrics.EndpointSliceChanges.WithLabelValues("delete").Inc() + return fmt.Errorf("failed to delete %s EndpointSlice for Service %s/%s: %v", endpointSlice.Name, service.Namespace, service.Name, err) } + r.endpointSliceTracker.Delete(endpointSlice) + metrics.EndpointSliceChanges.WithLabelValues("delete").Inc() } - return utilerrors.NewAggregate(errs) + return nil } // reconcileByPortMapping compares the endpoints found in existing slices with diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/utils.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/utils.go index ef919a08ee9..316c26b856e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/utils.go @@ -18,7 +18,6 @@ package endpointslice import ( "fmt" - "reflect" "time" corev1 "k8s.io/api/core/v1" @@ -28,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/cache" - "k8s.io/klog" + "k8s.io/klog/v2" podutil "k8s.io/kubernetes/pkg/api/v1/pod" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/discovery/validation" @@ -36,19 +35,7 @@ import ( utilnet "k8s.io/utils/net" ) -// podEndpointChanged returns true if the results of podToEndpoint are different -// for the pods passed to this function. -func podEndpointChanged(pod1, pod2 *corev1.Pod) bool { - endpoint1 := podToEndpoint(pod1, &corev1.Node{}, &corev1.Service{Spec: corev1.ServiceSpec{}}) - endpoint2 := podToEndpoint(pod2, &corev1.Node{}, &corev1.Service{Spec: corev1.ServiceSpec{}}) - - endpoint1.TargetRef.ResourceVersion = "" - endpoint2.TargetRef.ResourceVersion = "" - - return !reflect.DeepEqual(endpoint1, endpoint2) -} - -// podToEndpoint returns an Endpoint object generated from a Pod and Node. +// podToEndpoint returns an Endpoint object generated from pod, node, and service. func podToEndpoint(pod *corev1.Pod, node *corev1.Node, service *corev1.Service) discovery.Endpoint { // Build out topology information. This is currently limited to hostname, // zone, and region, but this will be expanded in the future. @@ -133,7 +120,7 @@ func getEndpointAddresses(podStatus corev1.PodStatus, service *corev1.Service) [ for _, podIP := range podStatus.PodIPs { isIPv6PodIP := utilnet.IsIPv6String(podIP.IP) - if isIPv6PodIP == isIPv6Service(service) { + if isIPv6PodIP == endpointutil.IsIPv6Service(service) { addresses = append(addresses, podIP.IP) } } @@ -141,12 +128,6 @@ func getEndpointAddresses(podStatus corev1.PodStatus, service *corev1.Service) [ return addresses } -// isIPv6Service returns true if the Service uses IPv6 addresses. -func isIPv6Service(service *corev1.Service) bool { - // IPFamily is not guaranteed to be set, even in an IPv6 only cluster. - return (service.Spec.IPFamily != nil && *service.Spec.IPFamily == corev1.IPv6Protocol) || utilnet.IsIPv6String(service.Spec.ClusterIP) -} - // endpointsEqualBeyondHash returns true if endpoints have equal attributes // but excludes equality checks that would have already been covered with // endpoint hashing (see hashEndpoint func for more info). diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/BUILD new file mode 100644 index 00000000000..c6e2fb74f08 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/BUILD @@ -0,0 +1,97 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "endpointset.go", + "endpointslice_tracker.go", + "endpointslicemirroring_controller.go", + "events.go", + "reconciler.go", + "reconciler_helpers.go", + "utils.go", + ], + importpath = "k8s.io/kubernetes/pkg/controller/endpointslicemirroring", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/discovery/validation:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/controller/endpointslicemirroring/metrics:go_default_library", + "//pkg/controller/util/endpoint:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/informers/discovery/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/listers/discovery/v1beta1:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + "//staging/src/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", + "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", + "//vendor/golang.org/x/time/rate:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "endpointslice_tracker_test.go", + "endpointslicemirroring_controller_test.go", + "reconciler_helpers_test.go", + "reconciler_test.go", + "utils_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/controller:go_default_library", + "//pkg/controller/endpointslicemirroring/metrics:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", + "//staging/src/k8s.io/client-go/informers:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//staging/src/k8s.io/client-go/testing:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + "//staging/src/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//staging/src/k8s.io/component-base/metrics/testutil:go_default_library", + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/controller/endpointslicemirroring/config:all-srcs", + "//pkg/controller/endpointslicemirroring/metrics:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/OWNERS b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/OWNERS new file mode 100644 index 00000000000..6337127502b --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/OWNERS @@ -0,0 +1,12 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: +- robscott +- freehan +- sig-network-approvers +reviewers: +- robscott +- freehan +- sig-network-reviewers +labels: +- sig/network diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/BUILD new file mode 100644 index 00000000000..3670c037bea --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/BUILD @@ -0,0 +1,30 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "types.go", + "zz_generated.deepcopy.go", + ], + importpath = "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config", + visibility = ["//visibility:public"], + deps = ["//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/controller/endpointslicemirroring/config/v1alpha1:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/doc.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/doc.go similarity index 77% rename from vendor/k8s.io/kubernetes/pkg/apis/auditregistration/doc.go rename to vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/doc.go index 1046b5a62be..358fba10177 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2020 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. @@ -15,6 +15,5 @@ limitations under the License. */ // +k8s:deepcopy-gen=package -// +groupName=auditregistration.k8s.io -package auditregistration // import "k8s.io/kubernetes/pkg/apis/auditregistration" +package config // import "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/types.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/types.go new file mode 100644 index 00000000000..306232ccd61 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/types.go @@ -0,0 +1,42 @@ +/* +Copyright 2020 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 config + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EndpointSliceMirroringControllerConfiguration contains elements describing +// EndpointSliceMirroringController. +type EndpointSliceMirroringControllerConfiguration struct { + // mirroringConcurrentServiceEndpointSyncs is the number of service endpoint + // syncing operations that will be done concurrently. Larger number = faster + // endpoint slice updating, but more CPU (and network) load. + MirroringConcurrentServiceEndpointSyncs int32 + + // mirroringMaxEndpointsPerSubset is the maximum number of endpoints that + // will be mirrored to an EndpointSlice for an EndpointSubset. + MirroringMaxEndpointsPerSubset int32 + + // mirroringEndpointUpdatesBatchPeriod can be used to batch EndpointSlice + // updates. All updates triggered by EndpointSlice changes will be delayed + // by up to 'mirroringEndpointUpdatesBatchPeriod'. If other addresses in the + // same Endpoints resource change in that period, they will be batched to a + // single EndpointSlice update. Default 0 value means that each Endpoints + // update triggers an EndpointSlice update. + MirroringEndpointUpdatesBatchPeriod metav1.Duration +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/BUILD similarity index 59% rename from vendor/k8s.io/kubernetes/pkg/apis/auditregistration/BUILD rename to vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/BUILD index 65913a1c996..4bcda49b473 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/auditregistration/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/BUILD @@ -3,17 +3,21 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = [ + "conversion.go", + "defaults.go", "doc.go", "register.go", - "types.go", + "zz_generated.conversion.go", "zz_generated.deepcopy.go", ], - importpath = "k8s.io/kubernetes/pkg/apis/auditregistration", + importpath = "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1", visibility = ["//visibility:public"], deps = [ + "//pkg/controller/endpointslicemirroring/config:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/kube-controller-manager/config/v1alpha1:go_default_library", ], ) @@ -26,13 +30,7 @@ filegroup( filegroup( name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/apis/auditregistration/fuzzer:all-srcs", - "//pkg/apis/auditregistration/install:all-srcs", - "//pkg/apis/auditregistration/v1alpha1:all-srcs", - "//pkg/apis/auditregistration/validation:all-srcs", - ], + srcs = [":package-srcs"], tags = ["automanaged"], visibility = ["//visibility:public"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/conversion.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/conversion.go new file mode 100644 index 00000000000..d2b45a290e5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/conversion.go @@ -0,0 +1,40 @@ +/* +Copyright 2020 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 v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/kube-controller-manager/config/v1alpha1" + endpointslicemirroringconfig "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config" +) + +// Important! The public back-and-forth conversion functions for the types in +// this package with EndpointSliceMirroringControllerConfiguratio types need to +// be manually exposed like this in order for other packages that reference this +// package to be able to call these conversion functions in an autogenerated +// manner. TODO: Fix the bug in conversion-gen so it automatically discovers +// these Convert_* functions in autogenerated code as well. + +// Convert_v1alpha1_EndpointSliceMirroringControllerConfiguration_To_config_EndpointSliceMirroringControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_EndpointSliceMirroringControllerConfiguration_To_config_EndpointSliceMirroringControllerConfiguration(in *v1alpha1.EndpointSliceMirroringControllerConfiguration, out *endpointslicemirroringconfig.EndpointSliceMirroringControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_EndpointSliceMirroringControllerConfiguration_To_config_EndpointSliceMirroringControllerConfiguration(in, out, s) +} + +// Convert_config_EndpointSliceMirroringControllerConfiguration_To_v1alpha1_EndpointSliceMirroringControllerConfiguration is an autogenerated conversion function. +func Convert_config_EndpointSliceMirroringControllerConfiguration_To_v1alpha1_EndpointSliceMirroringControllerConfiguration(in *endpointslicemirroringconfig.EndpointSliceMirroringControllerConfiguration, out *v1alpha1.EndpointSliceMirroringControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_EndpointSliceMirroringControllerConfiguration_To_v1alpha1_EndpointSliceMirroringControllerConfiguration(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/defaults.go new file mode 100644 index 00000000000..30825a64b7c --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/defaults.go @@ -0,0 +1,41 @@ +/* +Copyright 2020 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 v1alpha1 + +import ( + kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1" +) + +// RecommendedDefaultEndpointSliceMirroringControllerConfiguration defaults a +// pointer to a EndpointSliceMirroringControllerConfiguration struct. This will +// set the recommended default values, but they may be subject to change between +// API versions. This function is intentionally not registered in the scheme as +// a "normal" `SetDefaults_Foo` function to allow consumers of this type to set +// whatever defaults for their embedded configs. Forcing consumers to use these +// defaults would be problematic as defaulting in the scheme is done as part of +// the conversion, and there would be no easy way to opt-out. Instead, if you +// want to use this defaulting method run it in your wrapper struct of this type +// in its `SetDefaults_` method. +func RecommendedDefaultEndpointSliceMirroringControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.EndpointSliceMirroringControllerConfiguration) { + if obj.MirroringConcurrentServiceEndpointSyncs == 0 { + obj.MirroringConcurrentServiceEndpointSyncs = 5 + } + + if obj.MirroringMaxEndpointsPerSubset == 0 { + obj.MirroringMaxEndpointsPerSubset = 1000 + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/doc.go new file mode 100644 index 00000000000..9a99542d5d8 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2020 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. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config +// +k8s:conversion-gen-external-types=k8s.io/kube-controller-manager/config/v1alpha1 + +package v1alpha1 // import "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1" diff --git a/vendor/k8s.io/kube-scheduler/config/v1alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/register.go similarity index 51% rename from vendor/k8s.io/kube-scheduler/config/v1alpha1/register.go rename to vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/register.go index c42f8412fc2..d5f02b80660 100644 --- a/vendor/k8s.io/kube-scheduler/config/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2020 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. @@ -18,26 +18,17 @@ package v1alpha1 import ( "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" ) -// GroupName is the group name used in this package -const GroupName = "kubescheduler.config.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - var ( - // SchemeBuilder is the scheme builder with scheme init functions to run for this API package - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // AddToScheme is a global function that registers this API group & version to a scheme - AddToScheme = SchemeBuilder.AddToScheme + // SchemeBuilder is the scheme builder with scheme init functions to run for + // this API package + SchemeBuilder runtime.SchemeBuilder + // localSchemeBuilder extends the SchemeBuilder instance with the external + // types. In this package, defaulting and conversion init funcs are + // registered as well. + localSchemeBuilder = &SchemeBuilder + // AddToScheme is a global function that registers this API group & version + // to a scheme + AddToScheme = localSchemeBuilder.AddToScheme ) - -// addKnownTypes registers known types to the given scheme -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &KubeSchedulerConfiguration{}, - ) - return nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000000..740bf6ff5a6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,95 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + v1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1" + config "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1alpha1.GroupResource)(nil), (*v1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_GroupResource_To_v1_GroupResource(a.(*v1alpha1.GroupResource), b.(*v1.GroupResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.GroupResource)(nil), (*v1alpha1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_GroupResource_To_v1alpha1_GroupResource(a.(*v1.GroupResource), b.(*v1alpha1.GroupResource), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*config.EndpointSliceMirroringControllerConfiguration)(nil), (*v1alpha1.EndpointSliceMirroringControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_EndpointSliceMirroringControllerConfiguration_To_v1alpha1_EndpointSliceMirroringControllerConfiguration(a.(*config.EndpointSliceMirroringControllerConfiguration), b.(*v1alpha1.EndpointSliceMirroringControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1alpha1.EndpointSliceMirroringControllerConfiguration)(nil), (*config.EndpointSliceMirroringControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_EndpointSliceMirroringControllerConfiguration_To_config_EndpointSliceMirroringControllerConfiguration(a.(*v1alpha1.EndpointSliceMirroringControllerConfiguration), b.(*config.EndpointSliceMirroringControllerConfiguration), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_EndpointSliceMirroringControllerConfiguration_To_config_EndpointSliceMirroringControllerConfiguration(in *v1alpha1.EndpointSliceMirroringControllerConfiguration, out *config.EndpointSliceMirroringControllerConfiguration, s conversion.Scope) error { + out.MirroringConcurrentServiceEndpointSyncs = in.MirroringConcurrentServiceEndpointSyncs + out.MirroringMaxEndpointsPerSubset = in.MirroringMaxEndpointsPerSubset + out.MirroringEndpointUpdatesBatchPeriod = in.MirroringEndpointUpdatesBatchPeriod + return nil +} + +func autoConvert_config_EndpointSliceMirroringControllerConfiguration_To_v1alpha1_EndpointSliceMirroringControllerConfiguration(in *config.EndpointSliceMirroringControllerConfiguration, out *v1alpha1.EndpointSliceMirroringControllerConfiguration, s conversion.Scope) error { + out.MirroringConcurrentServiceEndpointSyncs = in.MirroringConcurrentServiceEndpointSyncs + out.MirroringMaxEndpointsPerSubset = in.MirroringMaxEndpointsPerSubset + out.MirroringEndpointUpdatesBatchPeriod = in.MirroringEndpointUpdatesBatchPeriod + return nil +} + +func autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error { + out.Group = in.Group + out.Resource = in.Resource + return nil +} + +// Convert_v1alpha1_GroupResource_To_v1_GroupResource is an autogenerated conversion function. +func Convert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error { + return autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in, out, s) +} + +func autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error { + out.Group = in.Group + out.Resource = in.Resource + return nil +} + +// Convert_v1_GroupResource_To_v1alpha1_GroupResource is an autogenerated conversion function. +func Convert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error { + return autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/zz_generated.deepcopy.go rename to vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1/zz_generated.deepcopy.go diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/zz_generated.deepcopy.go new file mode 100644 index 00000000000..1a0a424e21a --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/zz_generated.deepcopy.go @@ -0,0 +1,38 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package config + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointSliceMirroringControllerConfiguration) DeepCopyInto(out *EndpointSliceMirroringControllerConfiguration) { + *out = *in + out.MirroringEndpointUpdatesBatchPeriod = in.MirroringEndpointUpdatesBatchPeriod + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSliceMirroringControllerConfiguration. +func (in *EndpointSliceMirroringControllerConfiguration) DeepCopy() *EndpointSliceMirroringControllerConfiguration { + if in == nil { + return nil + } + out := new(EndpointSliceMirroringControllerConfiguration) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointset.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointset.go new file mode 100644 index 00000000000..bd45d60e138 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointset.go @@ -0,0 +1,96 @@ +/* +Copyright 2020 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 endpointslicemirroring + +import ( + "sort" + + discovery "k8s.io/api/discovery/v1beta1" + endpointutil "k8s.io/kubernetes/pkg/controller/util/endpoint" +) + +// endpointHash is used to uniquely identify endpoints. Only including addresses +// and hostnames as unique identifiers allows us to do more in place updates +// should attributes such as topology, conditions, or targetRef change. +type endpointHash string +type endpointHashObj struct { + Addresses []string + Hostname string +} + +func hashEndpoint(endpoint *discovery.Endpoint) endpointHash { + sort.Strings(endpoint.Addresses) + hashObj := endpointHashObj{Addresses: endpoint.Addresses} + if endpoint.Hostname != nil { + hashObj.Hostname = *endpoint.Hostname + } + + return endpointHash(endpointutil.DeepHashObjectToString(hashObj)) +} + +// endpointSet provides simple methods for comparing sets of Endpoints. +type endpointSet map[endpointHash]*discovery.Endpoint + +// Insert adds items to the set. +func (s endpointSet) Insert(items ...*discovery.Endpoint) endpointSet { + for _, item := range items { + s[hashEndpoint(item)] = item + } + return s +} + +// Delete removes all items from the set. +func (s endpointSet) Delete(items ...*discovery.Endpoint) endpointSet { + for _, item := range items { + delete(s, hashEndpoint(item)) + } + return s +} + +// Has returns true if and only if item is contained in the set. +func (s endpointSet) Has(item *discovery.Endpoint) bool { + _, contained := s[hashEndpoint(item)] + return contained +} + +// Returns an endpoint matching the hash if contained in the set. +func (s endpointSet) Get(item *discovery.Endpoint) *discovery.Endpoint { + return s[hashEndpoint(item)] +} + +// UnsortedList returns the slice with contents in random order. +func (s endpointSet) UnsortedList() []*discovery.Endpoint { + endpoints := make([]*discovery.Endpoint, 0, len(s)) + for _, endpoint := range s { + endpoints = append(endpoints, endpoint) + } + return endpoints +} + +// Returns a single element from the set. +func (s endpointSet) PopAny() (*discovery.Endpoint, bool) { + for _, endpoint := range s { + s.Delete(endpoint) + return endpoint, true + } + return nil, false +} + +// Len returns the size of the set. +func (s endpointSet) Len() int { + return len(s) +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointslice_tracker.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointslice_tracker.go new file mode 100644 index 00000000000..c16df7c10b8 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointslice_tracker.go @@ -0,0 +1,138 @@ +/* +Copyright 2020 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 endpointslicemirroring + +import ( + "sync" + + discovery "k8s.io/api/discovery/v1beta1" + "k8s.io/apimachinery/pkg/types" +) + +// endpointSliceResourceVersions tracks expected EndpointSlice resource versions +// by EndpointSlice name. +type endpointSliceResourceVersions map[string]string + +// endpointSliceTracker tracks EndpointSlices and their associated resource +// versions to help determine if a change to an EndpointSlice has been processed +// by the EndpointSlice controller. +type endpointSliceTracker struct { + // lock protects resourceVersionsByService. + lock sync.Mutex + // resourceVersionsByService tracks the list of EndpointSlices and + // associated resource versions expected for a given Service. + resourceVersionsByService map[types.NamespacedName]endpointSliceResourceVersions +} + +// newEndpointSliceTracker creates and initializes a new endpointSliceTracker. +func newEndpointSliceTracker() *endpointSliceTracker { + return &endpointSliceTracker{ + resourceVersionsByService: map[types.NamespacedName]endpointSliceResourceVersions{}, + } +} + +// Has returns true if the endpointSliceTracker has a resource version for the +// provided EndpointSlice. +func (est *endpointSliceTracker) Has(endpointSlice *discovery.EndpointSlice) bool { + est.lock.Lock() + defer est.lock.Unlock() + + rrv, ok := est.relatedResourceVersions(endpointSlice) + if !ok { + return false + } + _, ok = rrv[endpointSlice.Name] + return ok +} + +// Stale returns true if this endpointSliceTracker does not have a resource +// version for the provided EndpointSlice or it does not match the resource +// version of the provided EndpointSlice. +func (est *endpointSliceTracker) Stale(endpointSlice *discovery.EndpointSlice) bool { + est.lock.Lock() + defer est.lock.Unlock() + + rrv, ok := est.relatedResourceVersions(endpointSlice) + if !ok { + return true + } + return rrv[endpointSlice.Name] != endpointSlice.ResourceVersion +} + +// Update adds or updates the resource version in this endpointSliceTracker for +// the provided EndpointSlice. +func (est *endpointSliceTracker) Update(endpointSlice *discovery.EndpointSlice) { + est.lock.Lock() + defer est.lock.Unlock() + + rrv, ok := est.relatedResourceVersions(endpointSlice) + if !ok { + rrv = endpointSliceResourceVersions{} + est.resourceVersionsByService[getServiceNN(endpointSlice)] = rrv + } + rrv[endpointSlice.Name] = endpointSlice.ResourceVersion +} + +// DeleteService removes the set of resource versions tracked for the Service. +func (est *endpointSliceTracker) DeleteService(namespace, name string) { + est.lock.Lock() + defer est.lock.Unlock() + + serviceNN := types.NamespacedName{Name: name, Namespace: namespace} + delete(est.resourceVersionsByService, serviceNN) +} + +// Delete removes the resource version in this endpointSliceTracker for the +// provided EndpointSlice. +func (est *endpointSliceTracker) Delete(endpointSlice *discovery.EndpointSlice) { + est.lock.Lock() + defer est.lock.Unlock() + + rrv, ok := est.relatedResourceVersions(endpointSlice) + if ok { + delete(rrv, endpointSlice.Name) + } +} + +// relatedResourceVersions returns the set of resource versions tracked for the +// Service corresponding to the provided EndpointSlice, and a bool to indicate +// if it exists. +func (est *endpointSliceTracker) relatedResourceVersions(endpointSlice *discovery.EndpointSlice) (endpointSliceResourceVersions, bool) { + serviceNN := getServiceNN(endpointSlice) + vers, ok := est.resourceVersionsByService[serviceNN] + return vers, ok +} + +// getServiceNN returns a namespaced name for the Service corresponding to the +// provided EndpointSlice. +func getServiceNN(endpointSlice *discovery.EndpointSlice) types.NamespacedName { + serviceName, _ := endpointSlice.Labels[discovery.LabelServiceName] + return types.NamespacedName{Name: serviceName, Namespace: endpointSlice.Namespace} +} + +// managedByChanged returns true if one of the provided EndpointSlices is +// managed by the EndpointSlice controller while the other is not. +func managedByChanged(endpointSlice1, endpointSlice2 *discovery.EndpointSlice) bool { + return managedByController(endpointSlice1) != managedByController(endpointSlice2) +} + +// managedByController returns true if the controller of the provided +// EndpointSlices is the EndpointSlice controller. +func managedByController(endpointSlice *discovery.EndpointSlice) bool { + managedBy, _ := endpointSlice.Labels[discovery.LabelManagedBy] + return managedBy == controllerName +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointslicemirroring_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointslicemirroring_controller.go new file mode 100644 index 00000000000..61f912ceead --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/endpointslicemirroring_controller.go @@ -0,0 +1,509 @@ +/* +Copyright 2020 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 endpointslicemirroring + +import ( + "fmt" + "time" + + "golang.org/x/time/rate" + + v1 "k8s.io/api/core/v1" + discovery "k8s.io/api/discovery/v1beta1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + coreinformers "k8s.io/client-go/informers/core/v1" + discoveryinformers "k8s.io/client-go/informers/discovery/v1beta1" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" + v1core "k8s.io/client-go/kubernetes/typed/core/v1" + corelisters "k8s.io/client-go/listers/core/v1" + discoverylisters "k8s.io/client-go/listers/discovery/v1beta1" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/record" + "k8s.io/client-go/util/workqueue" + "k8s.io/component-base/metrics/prometheus/ratelimiter" + "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/controller" + "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics" +) + +const ( + // maxRetries is the number of times an Endpoints resource will be retried + // before it is dropped out of the queue. Any sync error, such as a failure + // to create or update an EndpointSlice could trigger a retry. With the + // current rate-limiter in use (1s*2^(numRetries-1)) up to a max of 100s. + // The following numbers represent the sequence of delays between successive + // queuings of an Endpoints resource. + // + // 1s, 2s, 4s, 8s, 16s, 32s, 64s, 100s (max) + maxRetries = 15 + + // defaultSyncBackOff is the default backoff period for syncEndpoints calls. + defaultSyncBackOff = 1 * time.Second + // maxSyncBackOff is the max backoff period for syncEndpoints calls. + maxSyncBackOff = 100 * time.Second + + // controllerName is a unique value used with LabelManagedBy to indicated + // the component managing an EndpointSlice. + controllerName = "endpointslicemirroring-controller.k8s.io" +) + +// NewController creates and initializes a new Controller +func NewController(endpointsInformer coreinformers.EndpointsInformer, + endpointSliceInformer discoveryinformers.EndpointSliceInformer, + serviceInformer coreinformers.ServiceInformer, + maxEndpointsPerSubset int32, + client clientset.Interface, + endpointUpdatesBatchPeriod time.Duration, +) *Controller { + broadcaster := record.NewBroadcaster() + broadcaster.StartLogging(klog.Infof) + broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: client.CoreV1().Events("")}) + recorder := broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "endpoint-slice-mirroring-controller"}) + + if client != nil && client.CoreV1().RESTClient().GetRateLimiter() != nil { + ratelimiter.RegisterMetricAndTrackRateLimiterUsage("endpoint_slice_mirroring_controller", client.DiscoveryV1beta1().RESTClient().GetRateLimiter()) + } + + metrics.RegisterMetrics() + + c := &Controller{ + client: client, + // This is similar to the DefaultControllerRateLimiter, just with a + // significantly higher default backoff (1s vs 5ms). This controller + // processes events that can require significant EndpointSlice changes. + // A more significant rate limit back off here helps ensure that the + // Controller does not overwhelm the API Server. + queue: workqueue.NewNamedRateLimitingQueue(workqueue.NewMaxOfRateLimiter( + workqueue.NewItemExponentialFailureRateLimiter(defaultSyncBackOff, maxSyncBackOff), + // 10 qps, 100 bucket size. This is only for retry speed and its + // only the overall factor (not per item). + &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, + ), "endpoint_slice_mirroring"), + workerLoopPeriod: time.Second, + } + + endpointsInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: c.onEndpointsAdd, + UpdateFunc: c.onEndpointsUpdate, + DeleteFunc: c.onEndpointsDelete, + }) + c.endpointsLister = endpointsInformer.Lister() + c.endpointsSynced = endpointsInformer.Informer().HasSynced + + endpointSliceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: c.onEndpointSliceAdd, + UpdateFunc: c.onEndpointSliceUpdate, + DeleteFunc: c.onEndpointSliceDelete, + }) + + c.endpointSliceLister = endpointSliceInformer.Lister() + c.endpointSlicesSynced = endpointSliceInformer.Informer().HasSynced + c.endpointSliceTracker = newEndpointSliceTracker() + + c.serviceLister = serviceInformer.Lister() + c.servicesSynced = serviceInformer.Informer().HasSynced + serviceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: c.onServiceAdd, + UpdateFunc: c.onServiceUpdate, + DeleteFunc: c.onServiceDelete, + }) + + c.maxEndpointsPerSubset = maxEndpointsPerSubset + + c.reconciler = &reconciler{ + client: c.client, + maxEndpointsPerSubset: c.maxEndpointsPerSubset, + endpointSliceTracker: c.endpointSliceTracker, + metricsCache: metrics.NewCache(maxEndpointsPerSubset), + eventRecorder: recorder, + } + + c.eventBroadcaster = broadcaster + c.eventRecorder = recorder + + c.endpointUpdatesBatchPeriod = endpointUpdatesBatchPeriod + + return c +} + +// Controller manages selector-based service endpoint slices +type Controller struct { + client clientset.Interface + eventBroadcaster record.EventBroadcaster + eventRecorder record.EventRecorder + + // endpointsLister is able to list/get endpoints and is populated by the + // shared informer passed to NewController. + endpointsLister corelisters.EndpointsLister + // endpointsSynced returns true if the endpoints shared informer has been + // synced at least once. Added as a member to the struct to allow injection + // for testing. + endpointsSynced cache.InformerSynced + + // endpointSliceLister is able to list/get endpoint slices and is populated + // by the shared informer passed to NewController + endpointSliceLister discoverylisters.EndpointSliceLister + // endpointSlicesSynced returns true if the endpoint slice shared informer + // has been synced at least once. Added as a member to the struct to allow + // injection for testing. + endpointSlicesSynced cache.InformerSynced + + // endpointSliceTracker tracks the list of EndpointSlices and associated + // resource versions expected for each Endpoints resource. It can help + // determine if a cached EndpointSlice is out of date. + endpointSliceTracker *endpointSliceTracker + + // serviceLister is able to list/get services and is populated by the shared + // informer passed to NewController. + serviceLister corelisters.ServiceLister + // servicesSynced returns true if the services shared informer has been + // synced at least once. Added as a member to the struct to allow injection + // for testing. + servicesSynced cache.InformerSynced + + // reconciler is an util used to reconcile EndpointSlice changes. + reconciler *reconciler + + // Endpoints that need to be updated. A channel is inappropriate here, + // because it allows Endpoints with lots of addresses to be serviced much + // more often than Endpoints with few addresses; it also would cause an + // Endpoints resource that's inserted multiple times to be processed more + // than necessary. + queue workqueue.RateLimitingInterface + + // maxEndpointsPerSubset references the maximum number of endpoints that + // should be added to an EndpointSlice for an EndpointSubset. + maxEndpointsPerSubset int32 + + // workerLoopPeriod is the time between worker runs. The workers process the + // queue of changes to Endpoints resources. + workerLoopPeriod time.Duration + + // endpointUpdatesBatchPeriod is an artificial delay added to all Endpoints + // syncs triggered by EndpointSlice changes. This can be used to reduce + // overall number of all EndpointSlice updates. + endpointUpdatesBatchPeriod time.Duration +} + +// Run will not return until stopCh is closed. +func (c *Controller) Run(workers int, stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + defer c.queue.ShutDown() + + klog.Infof("Starting EndpointSliceMirroring controller") + defer klog.Infof("Shutting down EndpointSliceMirroring controller") + + if !cache.WaitForNamedCacheSync("endpoint_slice_mirroring", stopCh, c.endpointsSynced, c.endpointSlicesSynced, c.servicesSynced) { + return + } + + klog.V(2).Infof("Starting %d worker threads", workers) + for i := 0; i < workers; i++ { + go wait.Until(c.worker, c.workerLoopPeriod, stopCh) + } + + <-stopCh +} + +// worker runs a worker thread that just dequeues items, processes them, and +// marks them done. You may run as many of these in parallel as you wish; the +// workqueue guarantees that they will not end up processing the same service +// at the same time +func (c *Controller) worker() { + for c.processNextWorkItem() { + } +} + +func (c *Controller) processNextWorkItem() bool { + cKey, quit := c.queue.Get() + if quit { + return false + } + defer c.queue.Done(cKey) + + err := c.syncEndpoints(cKey.(string)) + c.handleErr(err, cKey) + + return true +} + +func (c *Controller) handleErr(err error, key interface{}) { + if err == nil { + c.queue.Forget(key) + return + } + + if c.queue.NumRequeues(key) < maxRetries { + klog.Warningf("Error mirroring EndpointSlices for %q Endpoints, retrying. Error: %v", key, err) + c.queue.AddRateLimited(key) + return + } + + klog.Warningf("Retry budget exceeded, dropping %q Endpoints out of the queue: %v", key, err) + c.queue.Forget(key) + utilruntime.HandleError(err) +} + +func (c *Controller) syncEndpoints(key string) error { + startTime := time.Now() + defer func() { + syncDuration := float64(time.Since(startTime).Milliseconds()) / 1000 + metrics.EndpointsSyncDuration.WithLabelValues().Observe(syncDuration) + klog.V(4).Infof("Finished syncing EndpointSlices for %q Endpoints. (%v)", key, time.Since(startTime)) + }() + + klog.V(4).Infof("syncEndpoints(%q)", key) + + namespace, name, err := cache.SplitMetaNamespaceKey(key) + if err != nil { + return err + } + + endpoints, err := c.endpointsLister.Endpoints(namespace).Get(name) + if err != nil { + if apierrors.IsNotFound(err) { + klog.V(4).Infof("%s/%s Endpoints not found, cleaning up any mirrored EndpointSlices", namespace, name) + c.endpointSliceTracker.DeleteService(namespace, name) + return c.deleteMirroredSlices(namespace, name) + } + return err + } + + if !c.shouldMirror(endpoints) { + klog.V(4).Infof("%s/%s Endpoints should not be mirrored, cleaning up any mirrored EndpointSlices", namespace, name) + c.endpointSliceTracker.DeleteService(namespace, name) + return c.deleteMirroredSlices(namespace, name) + } + + svc, err := c.serviceLister.Services(namespace).Get(name) + if err != nil { + if apierrors.IsNotFound(err) { + klog.V(4).Infof("%s/%s Service not found, cleaning up any mirrored EndpointSlices", namespace, name) + c.endpointSliceTracker.DeleteService(namespace, name) + return c.deleteMirroredSlices(namespace, name) + } + return err + } + + // This means that if a Service transitions away from a nil selector, any + // mirrored EndpointSlices will not be cleaned up. #91072 tracks this issue + // for this controller along with the Endpoints and EndpointSlice + // controllers. + if svc.Spec.Selector != nil { + return nil + } + + endpointSlices, err := endpointSlicesMirroredForService(c.endpointSliceLister, namespace, name) + if err != nil { + return err + } + + err = c.reconciler.reconcile(endpoints, endpointSlices) + if err != nil { + return err + } + + return nil +} + +// queueEndpoints queues the Endpoints resource for processing. +func (c *Controller) queueEndpoints(obj interface{}) { + key, err := controller.KeyFunc(obj) + if err != nil { + utilruntime.HandleError(fmt.Errorf("Couldn't get key for object %+v (type %T): %v", obj, obj, err)) + return + } + + c.queue.Add(key) +} + +// shouldMirror returns true if an Endpoints resource should be mirrored by this +// controller. This will be false if: +// - the Endpoints resource is nil. +// - the Endpoints resource has a skip-mirror label. +// - the Endpoints resource has a leader election annotation. +// This does not ensure that a corresponding Service exists with a nil selector. +// That check should be performed separately. +func (c *Controller) shouldMirror(endpoints *v1.Endpoints) bool { + if endpoints == nil || skipMirror(endpoints.Labels) || hasLeaderElection(endpoints.Annotations) { + return false + } + + return true +} + +// onServiceAdd queues a sync for the relevant Endpoints resource. +func (c *Controller) onServiceAdd(obj interface{}) { + service := obj.(*v1.Service) + if service == nil { + utilruntime.HandleError(fmt.Errorf("onServiceAdd() expected type v1.Service, got %T", obj)) + return + } + if service.Spec.Selector == nil { + c.queueEndpoints(obj) + } +} + +// onServiceUpdate queues a sync for the relevant Endpoints resource. +func (c *Controller) onServiceUpdate(prevObj, obj interface{}) { + service := obj.(*v1.Service) + prevService := prevObj.(*v1.Service) + if service == nil || prevService == nil { + utilruntime.HandleError(fmt.Errorf("onServiceUpdate() expected type v1.Endpoints, got %T, %T", prevObj, obj)) + return + } + if (service.Spec.Selector == nil) != (prevService.Spec.Selector == nil) { + c.queueEndpoints(obj) + } +} + +// onServiceDelete queues a sync for the relevant Endpoints resource. +func (c *Controller) onServiceDelete(obj interface{}) { + service := getServiceFromDeleteAction(obj) + if service == nil { + utilruntime.HandleError(fmt.Errorf("onServiceDelete() expected type v1.Service, got %T", obj)) + return + } + if service.Spec.Selector == nil { + c.queueEndpoints(obj) + } +} + +// onEndpointsAdd queues a sync for the relevant Endpoints resource. +func (c *Controller) onEndpointsAdd(obj interface{}) { + endpoints := obj.(*v1.Endpoints) + if endpoints == nil { + utilruntime.HandleError(fmt.Errorf("onEndpointsAdd() expected type v1.Endpoints, got %T", obj)) + return + } + if !c.shouldMirror(endpoints) { + klog.V(5).Infof("Skipping mirroring for %s/%s", endpoints.Namespace, endpoints.Name) + return + } + c.queueEndpoints(obj) +} + +// onEndpointsUpdate queues a sync for the relevant Endpoints resource. +func (c *Controller) onEndpointsUpdate(prevObj, obj interface{}) { + endpoints := obj.(*v1.Endpoints) + prevEndpoints := prevObj.(*v1.Endpoints) + if endpoints == nil || prevEndpoints == nil { + utilruntime.HandleError(fmt.Errorf("onEndpointsUpdate() expected type v1.Endpoints, got %T, %T", prevObj, obj)) + return + } + if !c.shouldMirror(endpoints) && !c.shouldMirror(prevEndpoints) { + klog.V(5).Infof("Skipping mirroring for %s/%s", endpoints.Namespace, endpoints.Name) + return + } + c.queueEndpoints(obj) +} + +// onEndpointsDelete queues a sync for the relevant Endpoints resource. +func (c *Controller) onEndpointsDelete(obj interface{}) { + endpoints := getEndpointsFromDeleteAction(obj) + if endpoints == nil { + utilruntime.HandleError(fmt.Errorf("onEndpointsDelete() expected type v1.Endpoints, got %T", obj)) + return + } + if !c.shouldMirror(endpoints) { + klog.V(5).Infof("Skipping mirroring for %s/%s", endpoints.Namespace, endpoints.Name) + return + } + c.queueEndpoints(obj) +} + +// onEndpointSliceAdd queues a sync for the relevant Endpoints resource for a +// sync if the EndpointSlice resource version does not match the expected +// version in the endpointSliceTracker. +func (c *Controller) onEndpointSliceAdd(obj interface{}) { + endpointSlice := obj.(*discovery.EndpointSlice) + if endpointSlice == nil { + utilruntime.HandleError(fmt.Errorf("onEndpointSliceAdd() expected type discovery.EndpointSlice, got %T", obj)) + return + } + if managedByController(endpointSlice) && c.endpointSliceTracker.Stale(endpointSlice) { + c.queueEndpointsForEndpointSlice(endpointSlice) + } +} + +// onEndpointSliceUpdate queues a sync for the relevant Endpoints resource for a +// sync if the EndpointSlice resource version does not match the expected +// version in the endpointSliceTracker or the managed-by value of the +// EndpointSlice has changed from or to this controller. +func (c *Controller) onEndpointSliceUpdate(prevObj, obj interface{}) { + prevEndpointSlice := obj.(*discovery.EndpointSlice) + endpointSlice := prevObj.(*discovery.EndpointSlice) + if endpointSlice == nil || prevEndpointSlice == nil { + utilruntime.HandleError(fmt.Errorf("onEndpointSliceUpdated() expected type discovery.EndpointSlice, got %T, %T", prevObj, obj)) + return + } + if managedByChanged(prevEndpointSlice, endpointSlice) || (managedByController(endpointSlice) && c.endpointSliceTracker.Stale(endpointSlice)) { + c.queueEndpointsForEndpointSlice(endpointSlice) + } +} + +// onEndpointSliceDelete queues a sync for the relevant Endpoints resource for a +// sync if the EndpointSlice resource version does not match the expected +// version in the endpointSliceTracker. +func (c *Controller) onEndpointSliceDelete(obj interface{}) { + endpointSlice := getEndpointSliceFromDeleteAction(obj) + if endpointSlice == nil { + utilruntime.HandleError(fmt.Errorf("onEndpointSliceDelete() expected type discovery.EndpointSlice, got %T", obj)) + return + } + if managedByController(endpointSlice) && c.endpointSliceTracker.Has(endpointSlice) { + c.queueEndpointsForEndpointSlice(endpointSlice) + } +} + +// queueEndpointsForEndpointSlice attempts to queue the corresponding Endpoints +// resource for the provided EndpointSlice. +func (c *Controller) queueEndpointsForEndpointSlice(endpointSlice *discovery.EndpointSlice) { + key, err := endpointsControllerKey(endpointSlice) + if err != nil { + utilruntime.HandleError(fmt.Errorf("Couldn't get key for EndpointSlice %+v (type %T): %v", endpointSlice, endpointSlice, err)) + return + } + + c.queue.AddAfter(key, c.endpointUpdatesBatchPeriod) +} + +// deleteMirroredSlices will delete and EndpointSlices that have been mirrored +// for Endpoints with this namespace and name. +func (c *Controller) deleteMirroredSlices(namespace, name string) error { + endpointSlices, err := endpointSlicesMirroredForService(c.endpointSliceLister, namespace, name) + if err != nil { + return err + } + + c.endpointSliceTracker.DeleteService(namespace, name) + return c.reconciler.deleteEndpoints(namespace, name, endpointSlices) +} + +// endpointSlicesMirroredForService returns the EndpointSlices that have been +// mirrored for a Service by this controller. +func endpointSlicesMirroredForService(endpointSliceLister discoverylisters.EndpointSliceLister, namespace, name string) ([]*discovery.EndpointSlice, error) { + esLabelSelector := labels.Set(map[string]string{ + discovery.LabelServiceName: name, + discovery.LabelManagedBy: controllerName, + }).AsSelectorPreValidated() + return endpointSliceLister.EndpointSlices(namespace).List(esLabelSelector) +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/events.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/events.go new file mode 100644 index 00000000000..ed23181746f --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/events.go @@ -0,0 +1,33 @@ +/* +Copyright 2020 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 endpointslicemirroring + +const ( + // FailedToListEndpointSlices indicates the controller has failed to list + // EndpointSlices. + FailedToListEndpointSlices = "FailedToListEndpointSlices" + // FailedToUpdateEndpointSlices indicates the controller has failed to + // update EndpointSlices. + FailedToUpdateEndpointSlices = "FailedToUpdateEndpointSlices" + // InvalidIPAddress indicates that an IP address found in an Endpoints + // resource is invalid. + InvalidIPAddress = "InvalidIPAddress" + // TooManyAddressesToMirror indicates that some addresses were not mirrored + // due to an EndpointSubset containing more addresses to mirror than + // MaxEndpointsPerSubset allows. + TooManyAddressesToMirror = "TooManyAddressesToMirror" +) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/BUILD new file mode 100644 index 00000000000..4919b3fdacf --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/BUILD @@ -0,0 +1,42 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "cache.go", + "metrics.go", + ], + importpath = "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics", + visibility = ["//visibility:public"], + deps = [ + "//pkg/controller/util/endpoint:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/component-base/metrics:go_default_library", + "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) + +go_test( + name = "go_default_test", + srcs = ["cache_test.go"], + embed = [":go_default_library"], + deps = [ + "//pkg/controller/util/endpoint:go_default_library", + "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/cache.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/cache.go new file mode 100644 index 00000000000..553449687a8 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/cache.go @@ -0,0 +1,158 @@ +/* +Copyright 2020 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 metrics + +import ( + "math" + "sync" + + "k8s.io/apimachinery/pkg/types" + endpointutil "k8s.io/kubernetes/pkg/controller/util/endpoint" +) + +// NewCache returns a new Cache with the specified endpointsPerSlice. +func NewCache(endpointsPerSlice int32) *Cache { + return &Cache{ + maxEndpointsPerSlice: endpointsPerSlice, + cache: map[types.NamespacedName]*EndpointPortCache{}, + } +} + +// Cache tracks values for total numbers of desired endpoints as well as the +// efficiency of EndpointSlice endpoints distribution. +type Cache struct { + // maxEndpointsPerSlice references the maximum number of endpoints that + // should be added to an EndpointSlice. + maxEndpointsPerSlice int32 + + // lock protects changes to numEndpoints and cache. + lock sync.Mutex + // numEndpoints represents the total number of endpoints stored in + // EndpointSlices. + numEndpoints int + // cache stores a EndpointPortCache grouped by NamespacedNames representing + // Services. + cache map[types.NamespacedName]*EndpointPortCache +} + +// EndpointPortCache tracks values for total numbers of desired endpoints as well +// as the efficiency of EndpointSlice endpoints distribution for each unique +// Service Port combination. +type EndpointPortCache struct { + items map[endpointutil.PortMapKey]EfficiencyInfo +} + +// EfficiencyInfo stores the number of Endpoints and Slices for calculating +// total numbers of desired endpoints and the efficiency of EndpointSlice +// endpoints distribution. +type EfficiencyInfo struct { + Endpoints int + Slices int +} + +// NewEndpointPortCache initializes and returns a new EndpointPortCache. +func NewEndpointPortCache() *EndpointPortCache { + return &EndpointPortCache{ + items: map[endpointutil.PortMapKey]EfficiencyInfo{}, + } +} + +// Set updates the EndpointPortCache to contain the provided EfficiencyInfo +// for the provided PortMapKey. +func (spc *EndpointPortCache) Set(pmKey endpointutil.PortMapKey, eInfo EfficiencyInfo) { + spc.items[pmKey] = eInfo +} + +// numEndpoints returns the total number of endpoints represented by a +// EndpointPortCache. +func (spc *EndpointPortCache) numEndpoints() int { + num := 0 + for _, eInfo := range spc.items { + num += eInfo.Endpoints + } + return num +} + +// UpdateEndpointPortCache updates a EndpointPortCache in the global cache for a +// given Service and updates the corresponding metrics. +// Parameters: +// * endpointsNN refers to a NamespacedName representing the Endpoints resource. +// * epCache refers to a EndpointPortCache for the specified Endpoints reosource. +func (c *Cache) UpdateEndpointPortCache(endpointsNN types.NamespacedName, epCache *EndpointPortCache) { + c.lock.Lock() + defer c.lock.Unlock() + + prevNumEndpoints := 0 + if existingEPCache, ok := c.cache[endpointsNN]; ok { + prevNumEndpoints = existingEPCache.numEndpoints() + } + + currNumEndpoints := epCache.numEndpoints() + // To keep numEndpoints up to date, add the difference between the number of + // endpoints in the provided spCache and any spCache it might be replacing. + c.numEndpoints = c.numEndpoints + currNumEndpoints - prevNumEndpoints + + c.cache[endpointsNN] = epCache + c.updateMetrics() +} + +// DeleteEndpoints removes references to an Endpoints resource from the global +// cache and updates the corresponding metrics. +func (c *Cache) DeleteEndpoints(endpointsNN types.NamespacedName) { + c.lock.Lock() + defer c.lock.Unlock() + + if spCache, ok := c.cache[endpointsNN]; ok { + c.numEndpoints = c.numEndpoints - spCache.numEndpoints() + delete(c.cache, endpointsNN) + c.updateMetrics() + } +} + +// metricsUpdate stores a desired and actual number of EndpointSlices. +type metricsUpdate struct { + desired, actual int +} + +// desiredAndActualSlices returns a metricsUpdate with the desired and actual +// number of EndpointSlices given the current values in the cache. +// Must be called holding lock. +func (c *Cache) desiredAndActualSlices() metricsUpdate { + mUpdate := metricsUpdate{} + for _, spCache := range c.cache { + for _, eInfo := range spCache.items { + mUpdate.actual += eInfo.Slices + mUpdate.desired += numDesiredSlices(eInfo.Endpoints, int(c.maxEndpointsPerSlice)) + } + } + return mUpdate +} + +// updateMetrics updates metrics with the values from this Cache. +// Must be called holding lock. +func (c *Cache) updateMetrics() { + mUpdate := c.desiredAndActualSlices() + NumEndpointSlices.WithLabelValues().Set(float64(mUpdate.actual)) + DesiredEndpointSlices.WithLabelValues().Set(float64(mUpdate.desired)) + EndpointsDesired.WithLabelValues().Set(float64(c.numEndpoints)) +} + +// numDesiredSlices calculates the number of EndpointSlices that would exist +// with ideal endpoint distribution. +func numDesiredSlices(numEndpoints, maxPerSlice int) int { + return int(math.Ceil(float64(numEndpoints) / float64(maxPerSlice))) +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/metrics.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/metrics.go new file mode 100644 index 00000000000..8fb8980c372 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics/metrics.go @@ -0,0 +1,149 @@ +/* +Copyright 2020 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 metrics + +import ( + "sync" + + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" +) + +// EndpointSliceMirroringSubsystem is the name of the subsystem used for +// EndpointSliceMirroring controller. +const EndpointSliceMirroringSubsystem = "endpoint_slice_mirroring_controller" + +var ( + // EndpointsAddedPerSync tracks the number of endpoints added on each + // Endpoints sync. + EndpointsAddedPerSync = metrics.NewHistogramVec( + &metrics.HistogramOpts{ + Subsystem: EndpointSliceMirroringSubsystem, + Name: "endpoints_added_per_sync", + Help: "Number of endpoints added on each Endpoints sync", + StabilityLevel: metrics.ALPHA, + Buckets: metrics.ExponentialBuckets(2, 2, 15), + }, + []string{}, + ) + // EndpointsUpdatedPerSync tracks the number of endpoints updated on each + // Endpoints sync. + EndpointsUpdatedPerSync = metrics.NewHistogramVec( + &metrics.HistogramOpts{ + Subsystem: EndpointSliceMirroringSubsystem, + Name: "endpoints_updated_per_sync", + Help: "Number of endpoints updated on each Endpoints sync", + StabilityLevel: metrics.ALPHA, + Buckets: metrics.ExponentialBuckets(2, 2, 15), + }, + []string{}, + ) + // EndpointsRemovedPerSync tracks the number of endpoints removed on each + // Endpoints sync. + EndpointsRemovedPerSync = metrics.NewHistogramVec( + &metrics.HistogramOpts{ + Subsystem: EndpointSliceMirroringSubsystem, + Name: "endpoints_removed_per_sync", + Help: "Number of endpoints removed on each Endpoints sync", + StabilityLevel: metrics.ALPHA, + Buckets: metrics.ExponentialBuckets(2, 2, 15), + }, + []string{}, + ) + // AddressesSkippedPerSync tracks the number of addresses skipped on each + // Endpoints sync due to being invalid or exceeding MaxEndpointsPerSubset. + AddressesSkippedPerSync = metrics.NewHistogramVec( + &metrics.HistogramOpts{ + Subsystem: EndpointSliceMirroringSubsystem, + Name: "addresses_skipped_per_sync", + Help: "Number of addresses skipped on each Endpoints sync due to being invalid or exceeding MaxEndpointsPerSubset", + StabilityLevel: metrics.ALPHA, + Buckets: metrics.ExponentialBuckets(2, 2, 15), + }, + []string{}, + ) + // EndpointsSyncDuration tracks how long syncEndpoints() takes in a number + // of Seconds. + EndpointsSyncDuration = metrics.NewHistogramVec( + &metrics.HistogramOpts{ + Subsystem: EndpointSliceMirroringSubsystem, + Name: "endpoints_sync_duration", + Help: "Duration of syncEndpoints() in seconds", + StabilityLevel: metrics.ALPHA, + Buckets: metrics.ExponentialBuckets(0.001, 2, 15), + }, + []string{}, + ) + // EndpointsDesired tracks the total number of desired endpoints. + EndpointsDesired = metrics.NewGaugeVec( + &metrics.GaugeOpts{ + Subsystem: EndpointSliceMirroringSubsystem, + Name: "endpoints_desired", + Help: "Number of endpoints desired", + StabilityLevel: metrics.ALPHA, + }, + []string{}, + ) + // NumEndpointSlices tracks the number of EndpointSlices in a cluster. + NumEndpointSlices = metrics.NewGaugeVec( + &metrics.GaugeOpts{ + Subsystem: EndpointSliceMirroringSubsystem, + Name: "num_endpoint_slices", + Help: "Number of EndpointSlices", + StabilityLevel: metrics.ALPHA, + }, + []string{}, + ) + // DesiredEndpointSlices tracks the number of EndpointSlices that would + // exist with perfect endpoint allocation. + DesiredEndpointSlices = metrics.NewGaugeVec( + &metrics.GaugeOpts{ + Subsystem: EndpointSliceMirroringSubsystem, + Name: "desired_endpoint_slices", + Help: "Number of EndpointSlices that would exist with perfect endpoint allocation", + StabilityLevel: metrics.ALPHA, + }, + []string{}, + ) + // EndpointSliceChanges tracks the number of changes to Endpoint Slices. + EndpointSliceChanges = metrics.NewCounterVec( + &metrics.CounterOpts{ + Subsystem: EndpointSliceMirroringSubsystem, + Name: "changes", + Help: "Number of EndpointSlice changes", + StabilityLevel: metrics.ALPHA, + }, + []string{"operation"}, + ) +) + +var registerMetrics sync.Once + +// RegisterMetrics registers EndpointSlice metrics. +func RegisterMetrics() { + registerMetrics.Do(func() { + legacyregistry.MustRegister(EndpointsAddedPerSync) + legacyregistry.MustRegister(EndpointsUpdatedPerSync) + legacyregistry.MustRegister(EndpointsRemovedPerSync) + legacyregistry.MustRegister(AddressesSkippedPerSync) + legacyregistry.MustRegister(EndpointsSyncDuration) + legacyregistry.MustRegister(EndpointsDesired) + legacyregistry.MustRegister(NumEndpointSlices) + legacyregistry.MustRegister(DesiredEndpointSlices) + legacyregistry.MustRegister(EndpointSliceChanges) + }) +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/reconciler.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/reconciler.go new file mode 100644 index 00000000000..83cd7ab1ac1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/reconciler.go @@ -0,0 +1,327 @@ +/* +Copyright 2020 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 endpointslicemirroring + +import ( + "context" + "fmt" + + corev1 "k8s.io/api/core/v1" + discovery "k8s.io/api/discovery/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/record" + "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics" + endpointutil "k8s.io/kubernetes/pkg/controller/util/endpoint" +) + +// reconciler is responsible for transforming current EndpointSlice state into +// desired state +type reconciler struct { + client clientset.Interface + + // endpointSliceTracker tracks the list of EndpointSlices and associated + // resource versions expected for each Endpoints resource. It can help + // determine if a cached EndpointSlice is out of date. + endpointSliceTracker *endpointSliceTracker + + // eventRecorder allows reconciler to record an event if it finds an invalid + // IP address in an Endpoints resource. + eventRecorder record.EventRecorder + + // maxEndpointsPerSubset references the maximum number of endpoints that + // should be added to an EndpointSlice for an EndpointSubset. This allows + // for a simple 1:1 mapping between EndpointSubset and EndpointSlice. + maxEndpointsPerSubset int32 + + // metricsCache tracks values for total numbers of desired endpoints as well + // as the efficiency of EndpointSlice endpoints distribution + metricsCache *metrics.Cache +} + +// reconcile takes an Endpoints resource and ensures that corresponding +// EndpointSlices exist. It creates, updates, or deletes EndpointSlices to +// ensure the desired set of addresses are represented by EndpointSlices. +func (r *reconciler) reconcile(endpoints *corev1.Endpoints, existingSlices []*discovery.EndpointSlice) error { + // Calculate desired state. + d := newDesiredCalc() + + numInvalidAddresses := 0 + addressesSkipped := 0 + + for _, subset := range endpoints.Subsets { + multiKey := d.initPorts(subset.Ports) + + totalAddresses := len(subset.Addresses) + len(subset.NotReadyAddresses) + totalAddressesAdded := 0 + + for _, address := range subset.Addresses { + // Break if we've reached the max number of addresses to mirror + // per EndpointSubset. This allows for a simple 1:1 mapping between + // EndpointSubset and EndpointSlice. + if totalAddressesAdded >= int(r.maxEndpointsPerSubset) { + break + } + if ok := d.addAddress(address, multiKey, true); ok { + totalAddressesAdded++ + } else { + numInvalidAddresses++ + klog.Warningf("Address in %s/%s Endpoints is not a valid IP, it will not be mirrored to an EndpointSlice: %s", endpoints.Namespace, endpoints.Name, address.IP) + } + } + + for _, address := range subset.NotReadyAddresses { + // Break if we've reached the max number of addresses to mirror + // per EndpointSubset. This allows for a simple 1:1 mapping between + // EndpointSubset and EndpointSlice. + if totalAddressesAdded >= int(r.maxEndpointsPerSubset) { + break + } + if ok := d.addAddress(address, multiKey, true); ok { + totalAddressesAdded++ + } else { + numInvalidAddresses++ + klog.Warningf("Address in %s/%s Endpoints is not a valid IP, it will not be mirrored to an EndpointSlice: %s", endpoints.Namespace, endpoints.Name, address.IP) + } + } + + addressesSkipped += totalAddresses - totalAddressesAdded + } + + // This metric includes addresses skipped for being invalid or exceeding + // MaxEndpointsPerSubset. + metrics.AddressesSkippedPerSync.WithLabelValues().Observe(float64(addressesSkipped)) + + // Record an event on the Endpoints resource if we skipped mirroring for any + // invalid IP addresses. + if numInvalidAddresses > 0 { + r.eventRecorder.Eventf(endpoints, corev1.EventTypeWarning, InvalidIPAddress, + "Skipped %d invalid IP addresses when mirroring to EndpointSlices", numInvalidAddresses) + } + + // Record a separate event if we skipped mirroring due to the number of + // addresses exceeding MaxEndpointsPerSubset. + if addressesSkipped > numInvalidAddresses { + klog.Warningf("%d addresses in %s/%s Endpoints were skipped due to exceeding MaxEndpointsPerSubset", addressesSkipped, endpoints.Namespace, endpoints.Name) + r.eventRecorder.Eventf(endpoints, corev1.EventTypeWarning, TooManyAddressesToMirror, + "A max of %d addresses can be mirrored to EndpointSlices per Endpoints subset. %d addresses were skipped", r.maxEndpointsPerSubset, addressesSkipped) + } + + // Build data structures for existing state. + existingSlicesByKey := endpointSlicesByKey(existingSlices) + + // Determine changes necessary for each group of slices by port map. + epMetrics := metrics.NewEndpointPortCache() + totals := totalsByAction{} + slices := slicesByAction{} + + for portKey, desiredEndpoints := range d.endpointsByKey { + numEndpoints := len(desiredEndpoints) + pmSlices, pmTotals := r.reconcileByPortMapping( + endpoints, existingSlicesByKey[portKey], desiredEndpoints, d.portsByKey[portKey], portKey.addressType()) + + slices.append(pmSlices) + totals.add(pmTotals) + + epMetrics.Set(endpointutil.PortMapKey(portKey), metrics.EfficiencyInfo{ + Endpoints: numEndpoints, + Slices: len(existingSlicesByKey[portKey]) + len(pmSlices.toCreate) - len(pmSlices.toDelete), + }) + } + + // If there are unique sets of ports that are no longer desired, mark + // the corresponding endpoint slices for deletion. + for portKey, existingSlices := range existingSlicesByKey { + if _, ok := d.endpointsByKey[portKey]; !ok { + for _, existingSlice := range existingSlices { + slices.toDelete = append(slices.toDelete, existingSlice) + } + } + } + + metrics.EndpointsAddedPerSync.WithLabelValues().Observe(float64(totals.added)) + metrics.EndpointsUpdatedPerSync.WithLabelValues().Observe(float64(totals.updated)) + metrics.EndpointsRemovedPerSync.WithLabelValues().Observe(float64(totals.removed)) + + endpointsNN := types.NamespacedName{Name: endpoints.Name, Namespace: endpoints.Namespace} + r.metricsCache.UpdateEndpointPortCache(endpointsNN, epMetrics) + + return r.finalize(endpoints, slices) +} + +// reconcileByPortMapping compares the endpoints found in existing slices with +// the list of desired endpoints and returns lists of slices to create, update, +// and delete. +func (r *reconciler) reconcileByPortMapping( + endpoints *corev1.Endpoints, + existingSlices []*discovery.EndpointSlice, + desiredSet endpointSet, + endpointPorts []discovery.EndpointPort, + addressType discovery.AddressType, +) (slicesByAction, totalsByAction) { + slices := slicesByAction{} + totals := totalsByAction{} + + // If no endpoints are desired, mark existing slices for deletion and + // return. + if desiredSet.Len() == 0 { + slices.toDelete = existingSlices + for _, epSlice := range existingSlices { + totals.removed += len(epSlice.Endpoints) + } + return slices, totals + } + + if len(existingSlices) == 0 { + // if no existing slices, all desired endpoints will be added. + totals.added = desiredSet.Len() + } else { + // if >0 existing slices, mark all but 1 for deletion. + slices.toDelete = existingSlices[1:] + + // Return early if first slice matches desired endpoints. + totals = totalChanges(existingSlices[0], desiredSet) + if totals.added == 0 && totals.updated == 0 && totals.removed == 0 { + return slices, totals + } + } + + // generate a new slice with the desired endpoints. + var sliceName string + if len(existingSlices) > 0 { + sliceName = existingSlices[0].Name + } + newSlice := newEndpointSlice(endpoints, endpointPorts, addressType, sliceName) + for desiredSet.Len() > 0 && len(newSlice.Endpoints) < int(r.maxEndpointsPerSubset) { + endpoint, _ := desiredSet.PopAny() + newSlice.Endpoints = append(newSlice.Endpoints, *endpoint) + } + + if newSlice.Name != "" { + slices.toUpdate = []*discovery.EndpointSlice{newSlice} + } else { // Slices to be created set GenerateName instead of Name. + slices.toCreate = []*discovery.EndpointSlice{newSlice} + } + + return slices, totals +} + +// finalize creates, updates, and deletes slices as specified +func (r *reconciler) finalize(endpoints *corev1.Endpoints, slices slicesByAction) error { + // If there are slices to create and delete, recycle the slices marked for + // deletion by replacing creates with updates of slices that would otherwise + // be deleted. + recycleSlices(&slices) + + epsClient := r.client.DiscoveryV1beta1().EndpointSlices(endpoints.Namespace) + + // Don't create more EndpointSlices if corresponding Endpoints resource is + // being deleted. + if endpoints.DeletionTimestamp == nil { + for _, endpointSlice := range slices.toCreate { + createdSlice, err := epsClient.Create(context.TODO(), endpointSlice, metav1.CreateOptions{}) + if err != nil { + // If the namespace is terminating, creates will continue to fail. Simply drop the item. + if errors.HasStatusCause(err, corev1.NamespaceTerminatingCause) { + return nil + } + return fmt.Errorf("failed to create EndpointSlice for Endpoints %s/%s: %v", endpoints.Namespace, endpoints.Name, err) + } + r.endpointSliceTracker.Update(createdSlice) + metrics.EndpointSliceChanges.WithLabelValues("create").Inc() + } + } + + for _, endpointSlice := range slices.toUpdate { + updatedSlice, err := epsClient.Update(context.TODO(), endpointSlice, metav1.UpdateOptions{}) + if err != nil { + return fmt.Errorf("failed to update %s EndpointSlice for Endpoints %s/%s: %v", endpointSlice.Name, endpoints.Namespace, endpoints.Name, err) + } + r.endpointSliceTracker.Update(updatedSlice) + metrics.EndpointSliceChanges.WithLabelValues("update").Inc() + } + + for _, endpointSlice := range slices.toDelete { + err := epsClient.Delete(context.TODO(), endpointSlice.Name, metav1.DeleteOptions{}) + if err != nil { + return fmt.Errorf("failed to delete %s EndpointSlice for Endpoints %s/%s: %v", endpointSlice.Name, endpoints.Namespace, endpoints.Name, err) + } + r.endpointSliceTracker.Delete(endpointSlice) + metrics.EndpointSliceChanges.WithLabelValues("delete").Inc() + } + + return nil +} + +// deleteEndpoints deletes any associated EndpointSlices and cleans up any +// Endpoints references from the metricsCache. +func (r *reconciler) deleteEndpoints(namespace, name string, endpointSlices []*discovery.EndpointSlice) error { + r.metricsCache.DeleteEndpoints(types.NamespacedName{Namespace: namespace, Name: name}) + var errs []error + for _, endpointSlice := range endpointSlices { + err := r.client.DiscoveryV1beta1().EndpointSlices(namespace).Delete(context.TODO(), endpointSlice.Name, metav1.DeleteOptions{}) + if err != nil { + errs = append(errs, err) + } + } + if len(errs) > 0 { + return fmt.Errorf("Error(s) deleting %d/%d EndpointSlices for %s/%s Endpoints, including: %s", len(errs), len(endpointSlices), namespace, name, errs[0]) + } + return nil +} + +// endpointSlicesByKey returns a map that groups EndpointSlices by unique +// addrTypePortMapKey values. +func endpointSlicesByKey(existingSlices []*discovery.EndpointSlice) map[addrTypePortMapKey][]*discovery.EndpointSlice { + slicesByKey := map[addrTypePortMapKey][]*discovery.EndpointSlice{} + for _, existingSlice := range existingSlices { + epKey := newAddrTypePortMapKey(existingSlice.Ports, existingSlice.AddressType) + slicesByKey[epKey] = append(slicesByKey[epKey], existingSlice) + } + return slicesByKey +} + +// totalChanges returns the total changes that will be required for an +// EndpointSlice to match a desired set of endpoints. +func totalChanges(existingSlice *discovery.EndpointSlice, desiredSet endpointSet) totalsByAction { + totals := totalsByAction{} + existingMatches := 0 + + for _, endpoint := range existingSlice.Endpoints { + got := desiredSet.Get(&endpoint) + if got == nil { + // If not desired, increment number of endpoints to be deleted. + totals.removed++ + } else { + existingMatches++ + + // If existing version of endpoint doesn't match desired version + // increment number of endpoints to be updated. + if !endpointsEqualBeyondHash(got, &endpoint) { + totals.updated++ + } + } + } + + // Any desired endpoints that have not been found in the existing slice will + // be added. + totals.added = desiredSet.Len() - existingMatches + return totals +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/reconciler_helpers.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/reconciler_helpers.go new file mode 100644 index 00000000000..0ab382a51c0 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/reconciler_helpers.go @@ -0,0 +1,137 @@ +/* +Copyright 2020 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 endpointslicemirroring + +import ( + "k8s.io/api/core/v1" + discovery "k8s.io/api/discovery/v1beta1" +) + +// slicesByAction includes lists of slices to create, update, or delete. +type slicesByAction struct { + toCreate, toUpdate, toDelete []*discovery.EndpointSlice +} + +// append appends slices from another slicesByAction struct. +func (s *slicesByAction) append(slices slicesByAction) { + s.toCreate = append(s.toCreate, slices.toCreate...) + s.toUpdate = append(s.toUpdate, slices.toUpdate...) + s.toDelete = append(s.toDelete, slices.toDelete...) +} + +// totalsByAction includes total numbers for added and removed. +type totalsByAction struct { + added, updated, removed int +} + +// add adds totals from another totalsByAction struct. +func (t *totalsByAction) add(totals totalsByAction) { + t.added += totals.added + t.updated += totals.updated + t.removed += totals.removed +} + +// newDesiredCalc initializes and returns a new desiredCalc. +func newDesiredCalc() *desiredCalc { + return &desiredCalc{ + portsByKey: map[addrTypePortMapKey][]discovery.EndpointPort{}, + endpointsByKey: map[addrTypePortMapKey]endpointSet{}, + numDesiredEndpoints: 0, + } +} + +// desiredCalc helps calculate desired endpoints and ports. +type desiredCalc struct { + portsByKey map[addrTypePortMapKey][]discovery.EndpointPort + endpointsByKey map[addrTypePortMapKey]endpointSet + numDesiredEndpoints int +} + +// multiAddrTypePortMapKey stores addrTypePortMapKey for different address +// types. +type multiAddrTypePortMapKey map[discovery.AddressType]addrTypePortMapKey + +// initPorts initializes ports for a subset and address type and returns the +// corresponding addrTypePortMapKey. +func (d *desiredCalc) initPorts(subsetPorts []v1.EndpointPort) multiAddrTypePortMapKey { + endpointPorts := epPortsToEpsPorts(subsetPorts) + addrTypes := []discovery.AddressType{discovery.AddressTypeIPv4, discovery.AddressTypeIPv6} + multiKey := multiAddrTypePortMapKey{} + + for _, addrType := range addrTypes { + multiKey[addrType] = newAddrTypePortMapKey(endpointPorts, addrType) + if _, ok := d.endpointsByKey[multiKey[addrType]]; !ok { + d.endpointsByKey[multiKey[addrType]] = endpointSet{} + } + d.portsByKey[multiKey[addrType]] = endpointPorts + } + + return multiKey +} + +// addAddress adds an EndpointAddress to the desired state if it is valid. It +// returns false if the address was invalid. +func (d *desiredCalc) addAddress(address v1.EndpointAddress, multiKey multiAddrTypePortMapKey, ready bool) bool { + endpoint := addressToEndpoint(address, ready) + addrType := getAddressType(address.IP) + if addrType == nil { + return false + } + + d.endpointsByKey[multiKey[*addrType]].Insert(endpoint) + d.numDesiredEndpoints++ + return true +} + +type slicesByAddrType map[discovery.AddressType][]*discovery.EndpointSlice + +// recycleSlices will recycle the slices marked for deletion by replacing +// creates with updates of slices that would otherwise be deleted. +func recycleSlices(slices *slicesByAction) { + toCreateByAddrType := toSlicesByAddrType(slices.toCreate) + toDeleteByAddrType := toSlicesByAddrType(slices.toDelete) + + for addrType, slicesToCreate := range toCreateByAddrType { + slicesToDelete := toDeleteByAddrType[addrType] + for i := 0; len(slicesToCreate) > i && len(slicesToDelete) > i; i++ { + slices.toCreate = removeSlice(slices.toCreate, slicesToCreate[i]) + slices.toDelete = removeSlice(slices.toDelete, slicesToDelete[i]) + slice := slicesToCreate[i] + slice.Name = slicesToDelete[i].Name + slices.toUpdate = append(slices.toUpdate, slice) + } + } +} + +// removeSlice removes an EndpointSlice from a list of EndpointSlices. +func removeSlice(slices []*discovery.EndpointSlice, sliceToRemove *discovery.EndpointSlice) []*discovery.EndpointSlice { + for i, slice := range slices { + if slice.Name == sliceToRemove.Name { + return append(slices[:i], slices[i+1:]...) + } + } + return slices +} + +// toSliceByAddrType returns lists of EndpointSlices grouped by address. +func toSlicesByAddrType(slices []*discovery.EndpointSlice) slicesByAddrType { + byAddrType := slicesByAddrType{} + for _, slice := range slices { + byAddrType[slice.AddressType] = append(byAddrType[slice.AddressType], slice) + } + return byAddrType +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/utils.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/utils.go new file mode 100644 index 00000000000..ca4d8f1a22f --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslicemirroring/utils.go @@ -0,0 +1,275 @@ +/* +Copyright 2020 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 endpointslicemirroring + +import ( + "fmt" + "net" + "strings" + + corev1 "k8s.io/api/core/v1" + discovery "k8s.io/api/discovery/v1beta1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/leaderelection/resourcelock" + "k8s.io/kubernetes/pkg/apis/discovery/validation" + endpointutil "k8s.io/kubernetes/pkg/controller/util/endpoint" +) + +// addrTypePortMapKey is used to uniquely identify groups of endpoint ports and +// address types. +type addrTypePortMapKey string + +// newAddrTypePortMapKey generates a PortMapKey from endpoint ports. +func newAddrTypePortMapKey(endpointPorts []discovery.EndpointPort, addrType discovery.AddressType) addrTypePortMapKey { + pmk := fmt.Sprintf("%s-%s", addrType, endpointutil.NewPortMapKey(endpointPorts)) + return addrTypePortMapKey(pmk) +} + +func (pk addrTypePortMapKey) addressType() discovery.AddressType { + if strings.HasPrefix(string(pk), string(discovery.AddressTypeIPv6)) { + return discovery.AddressTypeIPv6 + } + return discovery.AddressTypeIPv4 +} + +func getAddressType(address string) *discovery.AddressType { + ip := net.ParseIP(address) + if ip == nil { + return nil + } + addressType := discovery.AddressTypeIPv4 + if ip.To4() == nil { + addressType = discovery.AddressTypeIPv6 + } + return &addressType +} + +// endpointsEqualBeyondHash returns true if endpoints have equal attributes +// but excludes equality checks that would have already been covered with +// endpoint hashing (see hashEndpoint func for more info). +func endpointsEqualBeyondHash(ep1, ep2 *discovery.Endpoint) bool { + if !apiequality.Semantic.DeepEqual(ep1.Topology, ep2.Topology) { + return false + } + + if !boolPtrEqual(ep1.Conditions.Ready, ep2.Conditions.Ready) { + return false + } + + if !objectRefPtrEqual(ep1.TargetRef, ep2.TargetRef) { + return false + } + + return true +} + +// newEndpointSlice returns an EndpointSlice generated from an Endpoints +// resource, ports, and address type. +func newEndpointSlice(endpoints *corev1.Endpoints, ports []discovery.EndpointPort, addrType discovery.AddressType, sliceName string) *discovery.EndpointSlice { + gvk := schema.GroupVersionKind{Version: "v1", Kind: "Endpoints"} + ownerRef := metav1.NewControllerRef(endpoints, gvk) + epSlice := &discovery.EndpointSlice{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{}, + OwnerReferences: []metav1.OwnerReference{*ownerRef}, + Namespace: endpoints.Namespace, + }, + Ports: ports, + AddressType: addrType, + Endpoints: []discovery.Endpoint{}, + } + + for label, val := range endpoints.Labels { + epSlice.Labels[label] = val + } + + epSlice.Labels[discovery.LabelServiceName] = endpoints.Name + epSlice.Labels[discovery.LabelManagedBy] = controllerName + + if sliceName == "" { + epSlice.GenerateName = getEndpointSlicePrefix(endpoints.Name) + } else { + epSlice.Name = sliceName + } + + return epSlice +} + +// getEndpointSlicePrefix returns a suitable prefix for an EndpointSlice name. +func getEndpointSlicePrefix(serviceName string) string { + // use the dash (if the name isn't too long) to make the name a bit prettier. + prefix := fmt.Sprintf("%s-", serviceName) + if len(validation.ValidateEndpointSliceName(prefix, true)) != 0 { + prefix = serviceName + } + return prefix +} + +// addressToEndpoint converts an address from an Endpoints resource to an +// EndpointSlice endpoint. +func addressToEndpoint(address corev1.EndpointAddress, ready bool) *discovery.Endpoint { + endpoint := &discovery.Endpoint{ + Addresses: []string{address.IP}, + Conditions: discovery.EndpointConditions{ + Ready: &ready, + }, + TargetRef: address.TargetRef, + } + + if address.NodeName != nil { + endpoint.Topology = map[string]string{ + "kubernetes.io/hostname": *address.NodeName, + } + } + if address.Hostname != "" { + endpoint.Hostname = &address.Hostname + } + + return endpoint +} + +// epPortsToEpsPorts converts ports from an Endpoints resource to ports for an +// EndpointSlice resource. +func epPortsToEpsPorts(epPorts []corev1.EndpointPort) []discovery.EndpointPort { + epsPorts := []discovery.EndpointPort{} + for _, epPort := range epPorts { + epp := epPort.DeepCopy() + epsPorts = append(epsPorts, discovery.EndpointPort{ + Name: &epp.Name, + Port: &epp.Port, + Protocol: &epp.Protocol, + AppProtocol: epp.AppProtocol, + }) + } + return epsPorts +} + +// boolPtrEqual returns true if a set of bool pointers have equivalent values. +func boolPtrEqual(ptr1, ptr2 *bool) bool { + if (ptr1 == nil) != (ptr2 == nil) { + return false + } + if ptr1 != nil && ptr2 != nil && *ptr1 != *ptr2 { + return false + } + return true +} + +// objectRefPtrEqual returns true if a set of object ref pointers have +// equivalent values. +func objectRefPtrEqual(ref1, ref2 *corev1.ObjectReference) bool { + if (ref1 == nil) != (ref2 == nil) { + return false + } + if ref1 != nil && ref2 != nil && !apiequality.Semantic.DeepEqual(*ref1, *ref2) { + return false + } + return true +} + +// getServiceFromDeleteAction parses a Service resource from a delete +// action. +func getServiceFromDeleteAction(obj interface{}) *corev1.Service { + if service, ok := obj.(*corev1.Service); ok { + return service + } + // If we reached here it means the Service was deleted but its final state + // is unrecorded. + tombstone, ok := obj.(cache.DeletedFinalStateUnknown) + if !ok { + utilruntime.HandleError(fmt.Errorf("Couldn't get object from tombstone %#v", obj)) + return nil + } + service, ok := tombstone.Obj.(*corev1.Service) + if !ok { + utilruntime.HandleError(fmt.Errorf("Tombstone contained object that is not a Service resource: %#v", obj)) + return nil + } + return service +} + +// getEndpointsFromDeleteAction parses an Endpoints resource from a delete +// action. +func getEndpointsFromDeleteAction(obj interface{}) *corev1.Endpoints { + if endpoints, ok := obj.(*corev1.Endpoints); ok { + return endpoints + } + // If we reached here it means the Endpoints resource was deleted but its + // final state is unrecorded. + tombstone, ok := obj.(cache.DeletedFinalStateUnknown) + if !ok { + utilruntime.HandleError(fmt.Errorf("Couldn't get object from tombstone %#v", obj)) + return nil + } + endpoints, ok := tombstone.Obj.(*corev1.Endpoints) + if !ok { + utilruntime.HandleError(fmt.Errorf("Tombstone contained object that is not an Endpoints resource: %#v", obj)) + return nil + } + return endpoints +} + +// getEndpointSliceFromDeleteAction parses an EndpointSlice from a delete action. +func getEndpointSliceFromDeleteAction(obj interface{}) *discovery.EndpointSlice { + if endpointSlice, ok := obj.(*discovery.EndpointSlice); ok { + return endpointSlice + } + // If we reached here it means the EndpointSlice was deleted but its final + // state is unrecorded. + tombstone, ok := obj.(cache.DeletedFinalStateUnknown) + if !ok { + utilruntime.HandleError(fmt.Errorf("Couldn't get object from tombstone %#v", obj)) + return nil + } + endpointSlice, ok := tombstone.Obj.(*discovery.EndpointSlice) + if !ok { + utilruntime.HandleError(fmt.Errorf("Tombstone contained object that is not an EndpointSlice resource: %#v", obj)) + return nil + } + return endpointSlice +} + +// endpointsControllerKey returns a controller key for an Endpoints resource but +// derived from an EndpointSlice. +func endpointsControllerKey(endpointSlice *discovery.EndpointSlice) (string, error) { + if endpointSlice == nil { + return "", fmt.Errorf("nil EndpointSlice passed to serviceControllerKey()") + } + serviceName, ok := endpointSlice.Labels[discovery.LabelServiceName] + if !ok || serviceName == "" { + return "", fmt.Errorf("EndpointSlice missing %s label", discovery.LabelServiceName) + } + return fmt.Sprintf("%s/%s", endpointSlice.Namespace, serviceName), nil +} + +// skipMirror return true if the the LabelSkipMirror label has been set to +// "true". +func skipMirror(labels map[string]string) bool { + skipMirror, _ := labels[discovery.LabelSkipMirror] + return skipMirror == "true" +} + +// hasLeaderElection returns true if the LeaderElectionRecordAnnotationKey is +// set as an annotation. +func hasLeaderElection(annotations map[string]string) bool { + _, ok := annotations[resourcelock.LeaderElectionRecordAnnotationKey] + return ok +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/BUILD index 542e4bfcaae..61263377648 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/BUILD @@ -43,7 +43,7 @@ go_library( "//vendor/gonum.org/v1/gonum/graph/encoding:go_default_library", "//vendor/gonum.org/v1/gonum/graph/encoding/dot:go_default_library", "//vendor/gonum.org/v1/gonum/graph/simple:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector.go b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector.go index 5ca422c1f5d..a337e0f15e0 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" @@ -76,7 +76,6 @@ type GarbageCollector struct { func NewGarbageCollector( metadataClient metadata.Interface, mapper resettableRESTMapper, - deletableResources map[schema.GroupVersionResource]struct{}, ignoredResources map[schema.GroupResource]struct{}, sharedInformers controller.InformerFactory, informersStarted <-chan struct{}, @@ -91,7 +90,7 @@ func NewGarbageCollector( attemptToOrphan: attemptToOrphan, absentOwnerCache: absentOwnerCache, } - gb := &GraphBuilder{ + gc.dependencyGraphBuilder = &GraphBuilder{ metadataClient: metadataClient, informersStarted: informersStarted, restMapper: mapper, @@ -105,10 +104,6 @@ func NewGarbageCollector( sharedInformers: sharedInformers, ignoredResources: ignoredResources, } - if err := gb.syncMonitors(deletableResources); err != nil { - utilruntime.HandleError(fmt.Errorf("failed to sync all monitors: %v", err)) - } - gc.dependencyGraphBuilder = gb return gc, nil } @@ -406,7 +401,9 @@ func ownerRefsToUIDs(refs []metav1.OwnerReference) []types.UID { } func (gc *GarbageCollector) attemptToDeleteItem(item *node) error { - klog.V(2).Infof("processing item %s", item.identity) + klog.V(2).InfoS("Processing object", "object", klog.KRef(item.identity.Namespace, item.identity.Name), + "objectUID", item.identity.UID, "kind", item.identity.Kind) + // "being deleted" is an one-way trip to the final deletion. We'll just wait for the final deletion, and then process the object's dependents. if item.isBeingDeleted() && !item.isDeletingDependents() { klog.V(5).Infof("processing item %s returned at once, because its DeletionTimestamp is non-nil", item.identity) @@ -519,7 +516,8 @@ func (gc *GarbageCollector) attemptToDeleteItem(item *node) error { // otherwise, default to background. policy = metav1.DeletePropagationBackground } - klog.V(2).Infof("delete object %s with propagation policy %s", item.identity, policy) + klog.V(2).InfoS("Deleting object", "object", klog.KRef(item.identity.Namespace, item.identity.Name), + "objectUID", item.identity.UID, "kind", item.identity.Kind, "propagationPolicy", policy) return gc.deleteObject(item.identity, &policy) } } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/graph_builder.go b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/graph_builder.go index fcf09d6609a..7135f032bbe 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/graph_builder.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/graph_builder.go @@ -22,7 +22,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/operations.go b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/operations.go index e8169d58506..ab64a3baceb 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/operations.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/operations.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/util/retry" - "k8s.io/klog" + "k8s.io/klog/v2" ) // cluster scoped resources don't have namespaces. Default to the item's namespace, but clear it for cluster scoped resources diff --git a/vendor/k8s.io/kubernetes/pkg/controller/job/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/job/BUILD index 563bb52ca85..6c9320a86e9 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/job/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/job/BUILD @@ -34,7 +34,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/integer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/job/job_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/job/job_controller.go index 439072a0cb6..02a1cf3a895 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/job/job_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/job/job_controller.go @@ -28,6 +28,7 @@ import ( batch "k8s.io/api/batch/v1" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" utilruntime "k8s.io/apimachinery/pkg/util/runtime" @@ -43,10 +44,9 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" "k8s.io/component-base/metrics/prometheus/ratelimiter" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller" "k8s.io/utils/integer" - - "k8s.io/klog" ) const statusUpdateRetries = 3 @@ -55,13 +55,15 @@ const statusUpdateRetries = 3 var controllerKind = batch.SchemeGroupVersion.WithKind("Job") var ( - // DefaultJobBackOff is the max backoff period, exported for the e2e test + // DefaultJobBackOff is the default backoff period, exported for the e2e test DefaultJobBackOff = 10 * time.Second // MaxJobBackOff is the max backoff period, exported for the e2e test MaxJobBackOff = 360 * time.Second ) -type JobController struct { +// Controller ensures that all Job objects have corresponding pods to +// run their configured workload. +type Controller struct { kubeClient clientset.Interface podControl controller.PodControlInterface @@ -90,16 +92,18 @@ type JobController struct { recorder record.EventRecorder } -func NewJobController(podInformer coreinformers.PodInformer, jobInformer batchinformers.JobInformer, kubeClient clientset.Interface) *JobController { +// NewController creates a new Job controller that keeps the relevant pods +// in sync with their corresponding Job objects. +func NewController(podInformer coreinformers.PodInformer, jobInformer batchinformers.JobInformer, kubeClient clientset.Interface) *Controller { eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) if kubeClient != nil && kubeClient.CoreV1().RESTClient().GetRateLimiter() != nil { ratelimiter.RegisterMetricAndTrackRateLimiterUsage("job_controller", kubeClient.CoreV1().RESTClient().GetRateLimiter()) } - jm := &JobController{ + jm := &Controller{ kubeClient: kubeClient, podControl: controller.RealPodControl{ KubeClient: kubeClient, @@ -137,7 +141,7 @@ func NewJobController(podInformer coreinformers.PodInformer, jobInformer batchin } // Run the main goroutine responsible for watching and syncing jobs. -func (jm *JobController) Run(workers int, stopCh <-chan struct{}) { +func (jm *Controller) Run(workers int, stopCh <-chan struct{}) { defer utilruntime.HandleCrash() defer jm.queue.ShutDown() @@ -156,7 +160,7 @@ func (jm *JobController) Run(workers int, stopCh <-chan struct{}) { } // getPodJobs returns a list of Jobs that potentially match a Pod. -func (jm *JobController) getPodJobs(pod *v1.Pod) []*batch.Job { +func (jm *Controller) getPodJobs(pod *v1.Pod) []*batch.Job { jobs, err := jm.jobLister.GetPodJobs(pod) if err != nil { return nil @@ -176,7 +180,7 @@ func (jm *JobController) getPodJobs(pod *v1.Pod) []*batch.Job { // resolveControllerRef returns the controller referenced by a ControllerRef, // or nil if the ControllerRef could not be resolved to a matching controller // of the correct Kind. -func (jm *JobController) resolveControllerRef(namespace string, controllerRef *metav1.OwnerReference) *batch.Job { +func (jm *Controller) resolveControllerRef(namespace string, controllerRef *metav1.OwnerReference) *batch.Job { // We can't look up by UID, so look up by Name and then verify UID. // Don't even try to look up by Name if it's the wrong Kind. if controllerRef.Kind != controllerKind.Kind { @@ -195,10 +199,10 @@ func (jm *JobController) resolveControllerRef(namespace string, controllerRef *m } // When a pod is created, enqueue the controller that manages it and update it's expectations. -func (jm *JobController) addPod(obj interface{}) { +func (jm *Controller) addPod(obj interface{}) { pod := obj.(*v1.Pod) if pod.DeletionTimestamp != nil { - // on a restart of the controller controller, it's possible a new pod shows up in a state that + // on a restart of the controller, it's possible a new pod shows up in a state that // is already pending deletion. Prevent the pod from being a creation observation. jm.deletePod(pod) return @@ -231,7 +235,7 @@ func (jm *JobController) addPod(obj interface{}) { // When a pod is updated, figure out what job/s manage it and wake them up. // If the labels of the pod have changed we need to awaken both the old // and new job. old and cur must be *v1.Pod types. -func (jm *JobController) updatePod(old, cur interface{}) { +func (jm *Controller) updatePod(old, cur interface{}) { curPod := cur.(*v1.Pod) oldPod := old.(*v1.Pod) if curPod.ResourceVersion == oldPod.ResourceVersion { @@ -283,7 +287,7 @@ func (jm *JobController) updatePod(old, cur interface{}) { // When a pod is deleted, enqueue the job that manages the pod and update its expectations. // obj could be an *v1.Pod, or a DeletionFinalStateUnknown marker item. -func (jm *JobController) deletePod(obj interface{}) { +func (jm *Controller) deletePod(obj interface{}) { pod, ok := obj.(*v1.Pod) // When a delete is dropped, the relist will notice a pod in the store not @@ -320,7 +324,7 @@ func (jm *JobController) deletePod(obj interface{}) { jm.enqueueController(job, true) } -func (jm *JobController) updateJob(old, cur interface{}) { +func (jm *Controller) updateJob(old, cur interface{}) { oldJob := old.(*batch.Job) curJob := cur.(*batch.Job) @@ -352,7 +356,7 @@ func (jm *JobController) updateJob(old, cur interface{}) { // obj could be an *batch.Job, or a DeletionFinalStateUnknown marker item, // immediate tells the controller to update the status right away, and should // happen ONLY when there was a successful pod run. -func (jm *JobController) enqueueController(obj interface{}, immediate bool) { +func (jm *Controller) enqueueController(obj interface{}, immediate bool) { key, err := controller.KeyFunc(obj) if err != nil { utilruntime.HandleError(fmt.Errorf("Couldn't get key for object %+v: %v", obj, err)) @@ -375,12 +379,12 @@ func (jm *JobController) enqueueController(obj interface{}, immediate bool) { // worker runs a worker thread that just dequeues items, processes them, and marks them done. // It enforces that the syncHandler is never invoked concurrently with the same key. -func (jm *JobController) worker() { +func (jm *Controller) worker() { for jm.processNextWorkItem() { } } -func (jm *JobController) processNextWorkItem() bool { +func (jm *Controller) processNextWorkItem() bool { key, quit := jm.queue.Get() if quit { return false @@ -404,7 +408,7 @@ func (jm *JobController) processNextWorkItem() bool { // getPodsForJob returns the set of pods that this Job should manage. // It also reconciles ControllerRef by adopting/orphaning. // Note that the returned Pods are pointers into the cache. -func (jm *JobController) getPodsForJob(j *batch.Job) ([]*v1.Pod, error) { +func (jm *Controller) getPodsForJob(j *batch.Job) ([]*v1.Pod, error) { selector, err := metav1.LabelSelectorAsSelector(j.Spec.Selector) if err != nil { return nil, fmt.Errorf("couldn't convert Job selector: %v", err) @@ -434,7 +438,7 @@ func (jm *JobController) getPodsForJob(j *batch.Job) ([]*v1.Pod, error) { // syncJob will sync the job with the given key if it has had its expectations fulfilled, meaning // it did not expect to see any more of its pods created or deleted. This function is not meant to be invoked // concurrently with the same key. -func (jm *JobController) syncJob(key string) (bool, error) { +func (jm *Controller) syncJob(key string) (bool, error) { startTime := time.Now() defer func() { klog.V(4).Infof("Finished syncing job %q (%v)", key, time.Since(startTime)) @@ -601,7 +605,7 @@ func (jm *JobController) syncJob(key string) (bool, error) { return forget, manageJobErr } -func (jm *JobController) deleteJobPods(job *batch.Job, pods []*v1.Pod, errCh chan<- error) { +func (jm *Controller) deleteJobPods(job *batch.Job, pods []*v1.Pod, errCh chan<- error) { // TODO: below code should be replaced with pod termination resulting in // pod failures, rather than killing pods. Unfortunately none such solution // exists ATM. There's an open discussion in the topic in @@ -614,7 +618,7 @@ func (jm *JobController) deleteJobPods(job *batch.Job, pods []*v1.Pod, errCh cha for i := int32(0); i < int32(nbPods); i++ { go func(ix int32) { defer wait.Done() - if err := jm.podControl.DeletePod(job.Namespace, pods[ix].Name, job); err != nil { + if err := jm.podControl.DeletePod(job.Namespace, pods[ix].Name, job); err != nil && !apierrors.IsNotFound(err) { defer utilruntime.HandleError(err) klog.V(2).Infof("Failed to delete %v, job %q/%q deadline exceeded", pods[ix].Name, job.Namespace, job.Name) errCh <- err @@ -683,7 +687,7 @@ func getStatus(pods []*v1.Pod) (succeeded, failed int32) { // manageJob is the core method responsible for managing the number of running // pods according to what is specified in the job.Spec. // Does NOT modify . -func (jm *JobController) manageJob(activePods []*v1.Pod, succeeded int32, job *batch.Job) (int32, error) { +func (jm *Controller) manageJob(activePods []*v1.Pod, succeeded int32, job *batch.Job) (int32, error) { var activeLock sync.Mutex active := int32(len(activePods)) parallelism := *job.Spec.Parallelism @@ -711,14 +715,17 @@ func (jm *JobController) manageJob(activePods []*v1.Pod, succeeded int32, job *b go func(ix int32) { defer wait.Done() if err := jm.podControl.DeletePod(job.Namespace, activePods[ix].Name, job); err != nil { - defer utilruntime.HandleError(err) // Decrement the expected number of deletes because the informer won't observe this deletion - klog.V(2).Infof("Failed to delete %v, decrementing expectations for job %q/%q", activePods[ix].Name, job.Namespace, job.Name) jm.expectations.DeletionObserved(jobKey) - activeLock.Lock() - active++ - activeLock.Unlock() - errCh <- err + if !apierrors.IsNotFound(err) { + klog.V(2).Infof("Failed to delete %v, decremented expectations for job %q/%q", activePods[ix].Name, job.Namespace, job.Name) + activeLock.Lock() + active++ + activeLock.Unlock() + errCh <- err + utilruntime.HandleError(err) + } + } }(i) } @@ -822,7 +829,7 @@ func (jm *JobController) manageJob(activePods []*v1.Pod, succeeded int32, job *b return active, nil } -func (jm *JobController) updateJobStatus(job *batch.Job) error { +func (jm *Controller) updateJobStatus(job *batch.Job) error { jobClient := jm.kubeClient.BatchV1().Jobs(job.Namespace) var err error for i := 0; i <= statusUpdateRetries; i = i + 1 { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/job/utils.go b/vendor/k8s.io/kubernetes/pkg/controller/job/utils.go index 25c3d08c908..571f8ebd4ab 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/job/utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/job/utils.go @@ -21,6 +21,8 @@ import ( "k8s.io/api/core/v1" ) +// IsJobFinished checks whether the given Job has finished execution. +// It does not discriminate between successful and failed terminations. func IsJobFinished(j *batch.Job) bool { for _, c := range j.Status.Conditions { if (c.Type == batch.JobComplete || c.Type == batch.JobFailed) && c.Status == v1.ConditionTrue { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/namespace/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/namespace/BUILD index 61a1604fab8..c9e8ab1e663 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/namespace/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/namespace/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", "//vendor/golang.org/x/time/rate:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/namespace/deletion/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/namespace/deletion/BUILD index d339f04cd1e..15b0c8123f4 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/namespace/deletion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/namespace/deletion/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/client-go/discovery:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/metadata:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -46,7 +46,9 @@ go_test( "//staging/src/k8s.io/client-go/discovery:go_default_library", "//staging/src/k8s.io/client-go/dynamic:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/metadata:go_default_library", + "//staging/src/k8s.io/client-go/metadata/fake:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/controller/namespace/deletion/namespaced_resources_deleter.go b/vendor/k8s.io/kubernetes/pkg/controller/namespace/deletion/namespaced_resources_deleter.go index 28ac0b3660e..7f97f34fdb9 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/namespace/deletion/namespaced_resources_deleter.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/namespace/deletion/namespaced_resources_deleter.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -265,11 +265,9 @@ func (d *namespacedResourcesDeleter) updateNamespaceStatusFunc(namespace *v1.Nam if namespace.DeletionTimestamp.IsZero() || namespace.Status.Phase == v1.NamespaceTerminating { return namespace, nil } - newNamespace := v1.Namespace{} - newNamespace.ObjectMeta = namespace.ObjectMeta - newNamespace.Status = *namespace.Status.DeepCopy() + newNamespace := namespace.DeepCopy() newNamespace.Status.Phase = v1.NamespaceTerminating - return d.nsClient.UpdateStatus(context.TODO(), &newNamespace, metav1.UpdateOptions{}) + return d.nsClient.UpdateStatus(context.TODO(), newNamespace, metav1.UpdateOptions{}) } // finalized returns true if the namespace.Spec.Finalizers is an empty list @@ -330,10 +328,8 @@ func (d *namespacedResourcesDeleter) deleteCollection(gvr schema.GroupVersionRes // we have a resource returned in the discovery API that supports no top-level verbs: // /apis/extensions/v1beta1/namespaces/default/replicationcontrollers // when working with this resource type, we will get a literal not found error rather than expected method not supported - // remember next time that this resource does not support delete collection... if errors.IsMethodNotSupported(err) || errors.IsNotFound(err) { klog.V(5).Infof("namespace controller - deleteCollection not supported - namespace: %s, gvr: %v", namespace, gvr) - d.opCache.setNotSupported(key) return false, nil } @@ -365,10 +361,8 @@ func (d *namespacedResourcesDeleter) listCollection(gvr schema.GroupVersionResou // we have a resource returned in the discovery API that supports no top-level verbs: // /apis/extensions/v1beta1/namespaces/default/replicationcontrollers // when working with this resource type, we will get a literal not found error rather than expected method not supported - // remember next time that this resource does not support delete collection... if errors.IsMethodNotSupported(err) || errors.IsNotFound(err) { klog.V(5).Infof("namespace controller - listCollection not supported - namespace: %s, gvr: %v", namespace, gvr) - d.opCache.setNotSupported(key) return nil, false, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller.go index 99e59eff8e7..fd8abd43f83 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller.go @@ -37,7 +37,7 @@ import ( "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/namespace/deletion" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/BUILD index ae5bd3fab88..adb33a330c8 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/BUILD @@ -34,7 +34,6 @@ go_library( deps = [ "//pkg/controller/nodeipam/ipam:go_default_library", "//pkg/controller/nodeipam/ipam/sync:go_default_library", - "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", @@ -44,7 +43,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/BUILD index 553222d47cc..8bd80b65564 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/BUILD @@ -66,7 +66,7 @@ go_library( "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/gce:go_default_library", "//staging/src/k8s.io/metrics/pkg/client/clientset/versioned/scheme:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/adapter.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/adapter.go index 8bb13843f02..cc78e12396f 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/adapter.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/adapter.go @@ -21,9 +21,10 @@ package ipam import ( "context" "encoding/json" + "fmt" "net" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -50,7 +51,7 @@ func newAdapter(k8s clientset.Interface, cloud *gce.Cloud) *adapter { } broadcaster := record.NewBroadcaster() - broadcaster.StartLogging(klog.Infof) + broadcaster.StartStructuredLogging(0) ret.recorder = broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "cloudCIDRAllocator"}) klog.V(0).Infof("Sending events to api server.") broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{ @@ -60,8 +61,12 @@ func newAdapter(k8s clientset.Interface, cloud *gce.Cloud) *adapter { return ret } -func (a *adapter) Alias(ctx context.Context, nodeName string) (*net.IPNet, error) { - cidrs, err := a.cloud.AliasRanges(types.NodeName(nodeName)) +func (a *adapter) Alias(ctx context.Context, node *v1.Node) (*net.IPNet, error) { + if node.Spec.ProviderID == "" { + return nil, fmt.Errorf("node %s doesn't have providerID", node.Name) + } + + cidrs, err := a.cloud.AliasRangesByProviderID(node.Spec.ProviderID) if err != nil { return nil, err } @@ -72,7 +77,7 @@ func (a *adapter) Alias(ctx context.Context, nodeName string) (*net.IPNet, error case 1: break default: - klog.Warningf("Node %q has more than one alias assigned (%v), defaulting to the first", nodeName, cidrs) + klog.Warningf("Node %q has more than one alias assigned (%v), defaulting to the first", node.Name, cidrs) } _, cidrRange, err := net.ParseCIDR(cidrs[0]) @@ -83,8 +88,12 @@ func (a *adapter) Alias(ctx context.Context, nodeName string) (*net.IPNet, error return cidrRange, nil } -func (a *adapter) AddAlias(ctx context.Context, nodeName string, cidrRange *net.IPNet) error { - return a.cloud.AddAliasToInstance(types.NodeName(nodeName), cidrRange) +func (a *adapter) AddAlias(ctx context.Context, node *v1.Node, cidrRange *net.IPNet) error { + if node.Spec.ProviderID == "" { + return fmt.Errorf("node %s doesn't have providerID", node.Name) + } + + return a.cloud.AddAliasToInstanceByProviderID(node.Spec.ProviderID, cidrRange) } func (a *adapter) Node(ctx context.Context, name string) (*v1.Node, error) { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidr_allocator.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidr_allocator.go index 765353c7105..6cdd5ea466f 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidr_allocator.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidr_allocator.go @@ -22,7 +22,7 @@ import ( "net" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/BUILD index 89cbf0c2ee7..f8f4e06454c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/BUILD @@ -10,13 +10,23 @@ go_test( name = "go_default_test", srcs = ["cidr_set_test.go"], embed = [":go_default_library"], - deps = ["//vendor/k8s.io/klog:go_default_library"], + deps = [ + "//staging/src/k8s.io/component-base/metrics/testutil:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], ) go_library( name = "go_default_library", - srcs = ["cidr_set.go"], + srcs = [ + "cidr_set.go", + "metrics.go", + ], importpath = "k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset", + deps = [ + "//staging/src/k8s.io/component-base/metrics:go_default_library", + "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", + ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/cidr_set.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/cidr_set.go index f2be0cc6832..359f830e3a6 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/cidr_set.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/cidr_set.go @@ -30,13 +30,26 @@ import ( // be allocated from. type CidrSet struct { sync.Mutex - clusterCIDR *net.IPNet - clusterIP net.IP + // clusterCIDR is the CIDR assigned to the cluster + clusterCIDR *net.IPNet + // clusterMaskSize is the mask size, in bits, assigned to the cluster + // caches the mask size to avoid the penalty of calling clusterCIDR.Mask.Size() clusterMaskSize int - maxCIDRs int - nextCandidate int - used big.Int - subNetMaskSize int + // nodeMask is the network mask assigned to the nodes + nodeMask net.IPMask + // nodeMaskSize is the mask size, in bits,assigned to the nodes + // caches the mask size to avoid the penalty of calling nodeMask.Size() + nodeMaskSize int + // maxCIDRs is the maximum number of CIDRs that can be allocated + maxCIDRs int + // allocatedCIDRs counts the number of CIDRs allocated + allocatedCIDRs int + // nextCandidate points to the next CIDR that should be free + nextCandidate int + // used is a bitmap used to track the CIDRs allocated + used big.Int + // label is used to identify the metrics + label string } const ( @@ -64,53 +77,55 @@ var ( // NewCIDRSet creates a new CidrSet. func NewCIDRSet(clusterCIDR *net.IPNet, subNetMaskSize int) (*CidrSet, error) { clusterMask := clusterCIDR.Mask - clusterMaskSize, _ := clusterMask.Size() + clusterMaskSize, bits := clusterMask.Size() var maxCIDRs int if (clusterCIDR.IP.To4() == nil) && (subNetMaskSize-clusterMaskSize > clusterSubnetMaxDiff) { return nil, ErrCIDRSetSubNetTooBig } + + // register CidrSet metrics + registerCidrsetMetrics() + maxCIDRs = 1 << uint32(subNetMaskSize-clusterMaskSize) return &CidrSet{ clusterCIDR: clusterCIDR, - clusterIP: clusterCIDR.IP, + nodeMask: net.CIDRMask(subNetMaskSize, bits), clusterMaskSize: clusterMaskSize, maxCIDRs: maxCIDRs, - subNetMaskSize: subNetMaskSize, + nodeMaskSize: subNetMaskSize, + label: clusterCIDR.String(), }, nil } func (s *CidrSet) indexToCIDRBlock(index int) *net.IPNet { var ip []byte - var mask int switch /*v4 or v6*/ { - case s.clusterIP.To4() != nil: + case s.clusterCIDR.IP.To4() != nil: { - j := uint32(index) << uint32(32-s.subNetMaskSize) - ipInt := (binary.BigEndian.Uint32(s.clusterIP)) | j - ip = make([]byte, 4) + j := uint32(index) << uint32(32-s.nodeMaskSize) + ipInt := (binary.BigEndian.Uint32(s.clusterCIDR.IP)) | j + ip = make([]byte, net.IPv4len) binary.BigEndian.PutUint32(ip, ipInt) - mask = 32 - } - case s.clusterIP.To16() != nil: + case s.clusterCIDR.IP.To16() != nil: { // leftClusterIP | rightClusterIP // 2001:0DB8:1234:0000:0000:0000:0000:0000 const v6NBits = 128 const halfV6NBits = v6NBits / 2 - leftClusterIP := binary.BigEndian.Uint64(s.clusterIP[:halfIPv6Len]) - rightClusterIP := binary.BigEndian.Uint64(s.clusterIP[halfIPv6Len:]) + leftClusterIP := binary.BigEndian.Uint64(s.clusterCIDR.IP[:halfIPv6Len]) + rightClusterIP := binary.BigEndian.Uint64(s.clusterCIDR.IP[halfIPv6Len:]) - leftIP, rightIP := make([]byte, halfIPv6Len), make([]byte, halfIPv6Len) + ip = make([]byte, net.IPv6len) - if s.subNetMaskSize <= halfV6NBits { + if s.nodeMaskSize <= halfV6NBits { // We only care about left side IP - leftClusterIP |= uint64(index) << uint(halfV6NBits-s.subNetMaskSize) + leftClusterIP |= uint64(index) << uint(halfV6NBits-s.nodeMaskSize) } else { if s.clusterMaskSize < halfV6NBits { // see how many bits are needed to reach the left side - btl := uint(s.subNetMaskSize - halfV6NBits) + btl := uint(s.nodeMaskSize - halfV6NBits) indexMaxBit := uint(64 - bits.LeadingZeros64(uint64(index))) if indexMaxBit > btl { leftClusterIP |= uint64(index) >> btl @@ -118,18 +133,15 @@ func (s *CidrSet) indexToCIDRBlock(index int) *net.IPNet { } // the right side will be calculated the same way either the // subNetMaskSize affects both left and right sides - rightClusterIP |= uint64(index) << uint(v6NBits-s.subNetMaskSize) + rightClusterIP |= uint64(index) << uint(v6NBits-s.nodeMaskSize) } - binary.BigEndian.PutUint64(leftIP, leftClusterIP) - binary.BigEndian.PutUint64(rightIP, rightClusterIP) - - ip = append(leftIP, rightIP...) - mask = 128 + binary.BigEndian.PutUint64(ip[:halfIPv6Len], leftClusterIP) + binary.BigEndian.PutUint64(ip[halfIPv6Len:], rightClusterIP) } } return &net.IPNet{ IP: ip, - Mask: net.CIDRMask(s.subNetMaskSize, mask), + Mask: s.nodeMask, } } @@ -139,34 +151,38 @@ func (s *CidrSet) AllocateNext() (*net.IPNet, error) { s.Lock() defer s.Unlock() - nextUnused := -1 - for i := 0; i < s.maxCIDRs; i++ { - candidate := (i + s.nextCandidate) % s.maxCIDRs - if s.used.Bit(candidate) == 0 { - nextUnused = candidate - break - } - } - if nextUnused == -1 { + if s.allocatedCIDRs == s.maxCIDRs { return nil, ErrCIDRRangeNoCIDRsRemaining } - s.nextCandidate = (nextUnused + 1) % s.maxCIDRs + candidate := s.nextCandidate + var i int + for i = 0; i < s.maxCIDRs; i++ { + if s.used.Bit(candidate) == 0 { + break + } + candidate = (candidate + 1) % s.maxCIDRs + } - s.used.SetBit(&s.used, nextUnused, 1) + s.nextCandidate = (candidate + 1) % s.maxCIDRs + s.used.SetBit(&s.used, candidate, 1) + s.allocatedCIDRs++ + // Update metrics + cidrSetAllocations.WithLabelValues(s.label).Inc() + cidrSetAllocationTriesPerRequest.WithLabelValues(s.label).Observe(float64(i)) + cidrSetUsage.WithLabelValues(s.label).Set(float64(s.allocatedCIDRs) / float64(s.maxCIDRs)) - return s.indexToCIDRBlock(nextUnused), nil + return s.indexToCIDRBlock(candidate), nil } func (s *CidrSet) getBeginingAndEndIndices(cidr *net.IPNet) (begin, end int, err error) { + if cidr == nil { + return -1, -1, fmt.Errorf("error getting indices for cluster cidr %v, cidr is nil", s.clusterCIDR) + } begin, end = 0, s.maxCIDRs-1 cidrMask := cidr.Mask maskSize, _ := cidrMask.Size() var ipSize int - if cidr == nil { - return -1, -1, fmt.Errorf("error getting indices for cluster cidr %v, cidr is nil", s.clusterCIDR) - } - if !s.clusterCIDR.Contains(cidr.IP.Mask(s.clusterCIDR.Mask)) && !cidr.Contains(s.clusterCIDR.IP.Mask(cidr.Mask)) { return -1, -1, fmt.Errorf("cidr %v is out the range of cluster cidr %v", cidr, s.clusterCIDR) } @@ -177,10 +193,9 @@ func (s *CidrSet) getBeginingAndEndIndices(cidr *net.IPNet) (begin, end int, err if cidr.IP.To4() == nil { ipSize = net.IPv6len } - subNetMask := net.CIDRMask(s.subNetMaskSize, ipSize*8) begin, err = s.getIndexForCIDR(&net.IPNet{ - IP: cidr.IP.Mask(subNetMask), - Mask: subNetMask, + IP: cidr.IP.Mask(s.nodeMask), + Mask: s.nodeMask, }) if err != nil { return -1, -1, err @@ -198,8 +213,8 @@ func (s *CidrSet) getBeginingAndEndIndices(cidr *net.IPNet) (begin, end int, err binary.BigEndian.PutUint64(ip[net.IPv6len/2:], ipIntRight) } end, err = s.getIndexForCIDR(&net.IPNet{ - IP: net.IP(ip).Mask(subNetMask), - Mask: subNetMask, + IP: net.IP(ip).Mask(s.nodeMask), + Mask: s.nodeMask, }) if err != nil { return -1, -1, err @@ -218,7 +233,11 @@ func (s *CidrSet) Release(cidr *net.IPNet) error { defer s.Unlock() for i := begin; i <= end; i++ { s.used.SetBit(&s.used, i, 0) + s.allocatedCIDRs-- + cidrSetReleases.WithLabelValues(s.label).Inc() } + + cidrSetUsage.WithLabelValues(s.label).Set(float64(s.allocatedCIDRs) / float64(s.maxCIDRs)) return nil } @@ -229,13 +248,15 @@ func (s *CidrSet) Occupy(cidr *net.IPNet) (err error) { if err != nil { return err } - s.Lock() defer s.Unlock() for i := begin; i <= end; i++ { s.used.SetBit(&s.used, i, 1) + s.allocatedCIDRs++ + cidrSetAllocations.WithLabelValues(s.label).Inc() } + cidrSetUsage.WithLabelValues(s.label).Set(float64(s.allocatedCIDRs) / float64(s.maxCIDRs)) return nil } @@ -245,19 +266,19 @@ func (s *CidrSet) getIndexForCIDR(cidr *net.IPNet) (int, error) { func (s *CidrSet) getIndexForIP(ip net.IP) (int, error) { if ip.To4() != nil { - cidrIndex := (binary.BigEndian.Uint32(s.clusterIP) ^ binary.BigEndian.Uint32(ip.To4())) >> uint32(32-s.subNetMaskSize) + cidrIndex := (binary.BigEndian.Uint32(s.clusterCIDR.IP) ^ binary.BigEndian.Uint32(ip.To4())) >> uint32(32-s.nodeMaskSize) if cidrIndex >= uint32(s.maxCIDRs) { - return 0, fmt.Errorf("CIDR: %v/%v is out of the range of CIDR allocator", ip, s.subNetMaskSize) + return 0, fmt.Errorf("CIDR: %v/%v is out of the range of CIDR allocator", ip, s.nodeMaskSize) } return int(cidrIndex), nil } if ip.To16() != nil { - bigIP := big.NewInt(0).SetBytes(s.clusterIP) + bigIP := big.NewInt(0).SetBytes(s.clusterCIDR.IP) bigIP = bigIP.Xor(bigIP, big.NewInt(0).SetBytes(ip)) - cidrIndexBig := bigIP.Rsh(bigIP, uint(net.IPv6len*8-s.subNetMaskSize)) + cidrIndexBig := bigIP.Rsh(bigIP, uint(net.IPv6len*8-s.nodeMaskSize)) cidrIndex := cidrIndexBig.Uint64() if cidrIndex >= uint64(s.maxCIDRs) { - return 0, fmt.Errorf("CIDR: %v/%v is out of the range of CIDR allocator", ip, s.subNetMaskSize) + return 0, fmt.Errorf("CIDR: %v/%v is out of the range of CIDR allocator", ip, s.nodeMaskSize) } return int(cidrIndex), nil } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/metrics.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/metrics.go new file mode 100644 index 00000000000..df4d2ce6492 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset/metrics.go @@ -0,0 +1,78 @@ +/* +Copyright 2020 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 cidrset + +import ( + "sync" + + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" +) + +const nodeIpamSubsystem = "node_ipam_controller" + +var ( + cidrSetAllocations = metrics.NewCounterVec( + &metrics.CounterOpts{ + Subsystem: nodeIpamSubsystem, + Name: "cidrset_cidrs_allocations_total", + Help: "Counter measuring total number of CIDR allocations.", + StabilityLevel: metrics.ALPHA, + }, + []string{"clusterCIDR"}, + ) + cidrSetReleases = metrics.NewCounterVec( + &metrics.CounterOpts{ + Subsystem: nodeIpamSubsystem, + Name: "cidrset_cidrs_releases_total", + Help: "Counter measuring total number of CIDR releases.", + StabilityLevel: metrics.ALPHA, + }, + []string{"clusterCIDR"}, + ) + cidrSetUsage = metrics.NewGaugeVec( + &metrics.GaugeOpts{ + Subsystem: nodeIpamSubsystem, + Name: "cidrset_usage_cidrs", + Help: "Gauge measuring percentage of allocated CIDRs.", + StabilityLevel: metrics.ALPHA, + }, + []string{"clusterCIDR"}, + ) + cidrSetAllocationTriesPerRequest = metrics.NewHistogramVec( + &metrics.HistogramOpts{ + Subsystem: nodeIpamSubsystem, + Name: "cidrset_allocation_tries_per_request", + Help: "Number of endpoints added on each Service sync", + StabilityLevel: metrics.ALPHA, + Buckets: metrics.ExponentialBuckets(1, 5, 5), + }, + []string{"clusterCIDR"}, + ) +) + +var registerMetrics sync.Once + +// registerCidrsetMetrics the metrics that are to be monitored. +func registerCidrsetMetrics() { + registerMetrics.Do(func() { + legacyregistry.MustRegister(cidrSetAllocations) + legacyregistry.MustRegister(cidrSetReleases) + legacyregistry.MustRegister(cidrSetUsage) + legacyregistry.MustRegister(cidrSetAllocationTriesPerRequest) + }) +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go index 19adb41026c..4e66b969157 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go @@ -25,7 +25,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -88,7 +88,7 @@ func NewCloudCIDRAllocator(client clientset.Interface, cloud cloudprovider.Inter eventBroadcaster := record.NewBroadcaster() recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "cidrAllocator"}) - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) klog.V(0).Infof("Sending events to api server.") eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: client.CoreV1().Events("")}) @@ -230,7 +230,7 @@ func (ca *cloudCIDRAllocator) AllocateOrOccupyCIDR(node *v1.Node) error { return nil } if !ca.insertNodeToProcessing(node.Name) { - klog.V(2).Infof("Node %v is already in a process of CIDR assignment.", node.Name) + klog.V(2).InfoS("Node is already in a process of CIDR assignment", "node", klog.KObj(node)) return nil } @@ -249,8 +249,11 @@ func (ca *cloudCIDRAllocator) updateCIDRAllocation(nodeName string) error { klog.Errorf("Failed while getting node %v for updating Node.Spec.PodCIDR: %v", nodeName, err) return err } + if node.Spec.ProviderID == "" { + return fmt.Errorf("node %s doesn't have providerID", nodeName) + } - cidrs, err := ca.cloud.AliasRanges(types.NodeName(nodeName)) + cidrs, err := ca.cloud.AliasRangesByProviderID(node.Spec.ProviderID) if err != nil { nodeutil.RecordNodeStatusChange(ca.recorder, node, "CIDRNotAvailable") return fmt.Errorf("failed to allocate cidr: %v", err) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/controller_legacyprovider.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/controller_legacyprovider.go index a0d25fd7508..9e37c606884 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/controller_legacyprovider.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/controller_legacyprovider.go @@ -24,7 +24,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" informers "k8s.io/client-go/informers/core/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/range_allocator.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/range_allocator.go index ab626b504bf..695c19c4c49 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/range_allocator.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/range_allocator.go @@ -22,7 +22,7 @@ import ( "sync" "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" @@ -78,7 +78,7 @@ func NewCIDRRangeAllocator(client clientset.Interface, nodeInformer informers.No eventBroadcaster := record.NewBroadcaster() recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "cidrAllocator"}) - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) klog.V(0).Infof("Sending events to api server.") eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: client.CoreV1().Events("")}) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync/BUILD index 0323850791f..4903252e1d4 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync/BUILD @@ -8,7 +8,7 @@ go_library( deps = [ "//pkg/controller/nodeipam/ipam/cidrset:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -21,7 +21,7 @@ go_test( "//pkg/controller/nodeipam/ipam/test:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync/sync.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync/sync.go index ee95392b8ff..3150aebe8ed 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync/sync.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync/sync.go @@ -22,7 +22,7 @@ import ( "net" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" "k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset" @@ -43,9 +43,9 @@ const ( // cloudAlias is the interface to the cloud platform APIs. type cloudAlias interface { // Alias returns the IP alias for the node. - Alias(ctx context.Context, nodeName string) (*net.IPNet, error) + Alias(ctx context.Context, node *v1.Node) (*net.IPNet, error) // AddAlias adds an alias to the node. - AddAlias(ctx context.Context, nodeName string, cidrRange *net.IPNet) error + AddAlias(ctx context.Context, node *v1.Node, cidrRange *net.IPNet) error } // kubeAPI is the interface to the Kubernetes APIs. @@ -204,7 +204,7 @@ func (op *updateOp) run(sync *NodeSync) error { op.node = node } - aliasRange, err := sync.cloudAlias.Alias(ctx, sync.nodeName) + aliasRange, err := sync.cloudAlias.Alias(ctx, op.node) if err != nil { klog.Errorf("Error getting cloud alias for node %q: %v", sync.nodeName, err) return err @@ -293,7 +293,7 @@ func (op *updateOp) updateAliasFromNode(ctx context.Context, sync *NodeSync, nod return err } - if err := sync.cloudAlias.AddAlias(ctx, node.Name, aliasRange); err != nil { + if err := sync.cloudAlias.AddAlias(ctx, node, aliasRange); err != nil { klog.Errorf("Could not add alias %v for node %q: %v", aliasRange, node.Name, err) return err } @@ -325,7 +325,7 @@ func (op *updateOp) allocateRange(ctx context.Context, sync *NodeSync, node *v1. // If addAlias returns a hard error, cidrRange will be leaked as there // is no durable record of the range. The missing space will be // recovered on the next restart of the controller. - if err := sync.cloudAlias.AddAlias(ctx, node.Name, cidrRange); err != nil { + if err := sync.cloudAlias.AddAlias(ctx, node, cidrRange); err != nil { klog.Errorf("Could not add alias %v for node %q: %v", cidrRange, node.Name, err) return err } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/legacyprovider.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/legacyprovider.go index ff01aec147c..e23f52aea8d 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/legacyprovider.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/legacyprovider.go @@ -24,7 +24,7 @@ import ( coreinformers "k8s.io/client-go/informers/core/v1" clientset "k8s.io/client-go/kubernetes" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller/nodeipam/ipam" nodesync "k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/node_ipam_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/node_ipam_controller.go index 99d13e8d175..63223924895 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/node_ipam_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/node_ipam_controller.go @@ -20,7 +20,7 @@ import ( "net" "time" - "k8s.io/klog" + "k8s.io/klog/v2" utilruntime "k8s.io/apimachinery/pkg/util/runtime" @@ -28,7 +28,6 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" - v1 "k8s.io/api/core/v1" coreinformers "k8s.io/client-go/informers/core/v1" clientset "k8s.io/client-go/kubernetes" corelisters "k8s.io/client-go/listers/core/v1" @@ -65,8 +64,6 @@ type Controller struct { nodeInformerSynced cache.InformerSynced cidrAllocator ipam.CIDRAllocator - - forcefullyDeletePod func(*v1.Pod) error } // NewNodeIpamController returns a new node IP Address Management controller to @@ -89,7 +86,7 @@ func NewNodeIpamController( } eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) klog.Infof("Sending events to api server.") eventBroadcaster.StartRecordingToSink( diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/nolegacyprovider.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/nolegacyprovider.go index ed43e8bea48..98beb2949ff 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/nolegacyprovider.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/nolegacyprovider.go @@ -24,7 +24,7 @@ import ( coreinformers "k8s.io/client-go/informers/core/v1" clientset "k8s.io/client-go/kubernetes" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" ) func startLegacyIPAM( diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/BUILD index 042b3e318c6..4b6e8a869cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/BUILD @@ -41,7 +41,7 @@ go_library( "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/node_lifecycle_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/node_lifecycle_controller.go index 8a0cabdede6..33f4c35b59c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/node_lifecycle_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/node_lifecycle_controller.go @@ -28,7 +28,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" coordv1 "k8s.io/api/coordination/v1" v1 "k8s.io/api/core/v1" @@ -145,21 +145,17 @@ var labelReconcileInfo = []struct { ensureSecondaryExists bool }{ { - // Reconcile the beta and the stable OS label using the beta label as - // the source of truth. - // TODO(#73084): switch to using the stable label as the source of - // truth in v1.18. - primaryKey: kubeletapis.LabelOS, - secondaryKey: v1.LabelOSStable, + // Reconcile the beta and the stable OS label using the stable label as the source of truth. + // TODO(#89477): no earlier than 1.22: drop the beta labels if they differ from the GA labels + primaryKey: v1.LabelOSStable, + secondaryKey: kubeletapis.LabelOS, ensureSecondaryExists: true, }, { - // Reconcile the beta and the stable arch label using the beta label as - // the source of truth. - // TODO(#73084): switch to using the stable label as the source of - // truth in v1.18. - primaryKey: kubeletapis.LabelArch, - secondaryKey: v1.LabelArchStable, + // Reconcile the beta and the stable arch label using the stable label as the source of truth. + // TODO(#89477): no earlier than 1.22: drop the beta labels if they differ from the GA labels + primaryKey: v1.LabelArchStable, + secondaryKey: kubeletapis.LabelArch, ensureSecondaryExists: true, }, } @@ -379,7 +375,7 @@ func NewNodeLifecycleController( eventBroadcaster := record.NewBroadcaster() recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "node-controller"}) - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) klog.Infof("Sending events to api server.") eventBroadcaster.StartRecordingToSink( @@ -847,7 +843,7 @@ func (nc *Controller) monitorNodeHealth() error { nodeutil.RecordNodeStatusChange(nc.recorder, node, "NodeNotReady") fallthrough case needsRetry && observedReadyCondition.Status != v1.ConditionTrue: - if err = nodeutil.MarkPodsNotReady(nc.kubeClient, pods, node.Name); err != nil { + if err = nodeutil.MarkPodsNotReady(nc.kubeClient, nc.recorder, pods, node.Name); err != nil { utilruntime.HandleError(fmt.Errorf("unable to mark all pods NotReady on node %v: %v; queuing for retry", node.Name, err)) nc.nodesToRetry.Store(node.Name, struct{}{}) continue @@ -872,7 +868,7 @@ func (nc *Controller) processTaintBaseEviction(node *v1.Node, observedReadyCondi if !nodeutil.SwapNodeControllerTaint(nc.kubeClient, []*v1.Taint{&taintToAdd}, []*v1.Taint{UnreachableTaintTemplate}, node) { klog.Errorf("Failed to instantly swap UnreachableTaint to NotReadyTaint. Will try again in the next cycle.") } - } else if nc.markNodeForTainting(node) { + } else if nc.markNodeForTainting(node, v1.ConditionFalse) { klog.V(2).Infof("Node %v is NotReady as of %v. Adding it to the Taint queue.", node.Name, decisionTimestamp, @@ -885,7 +881,7 @@ func (nc *Controller) processTaintBaseEviction(node *v1.Node, observedReadyCondi if !nodeutil.SwapNodeControllerTaint(nc.kubeClient, []*v1.Taint{&taintToAdd}, []*v1.Taint{NotReadyTaintTemplate}, node) { klog.Errorf("Failed to instantly swap NotReadyTaint to UnreachableTaint. Will try again in the next cycle.") } - } else if nc.markNodeForTainting(node) { + } else if nc.markNodeForTainting(node, v1.ConditionUnknown) { klog.V(2).Infof("Node %v is unresponsive as of %v. Adding it to the Taint queue.", node.Name, decisionTimestamp, @@ -1076,7 +1072,7 @@ func (nc *Controller) tryUpdateNodeHealth(node *v1.Node) (time.Duration, v1.Node } else { transitionTime = nodeHealth.readyTransitionTimestamp } - if klog.V(5) { + if klog.V(5).Enabled() { klog.Infof("Node %s ReadyCondition updated. Updating timestamp: %+v vs %+v.", node.Name, nodeHealth.status, node.Status) } else { klog.V(3).Infof("Node %s ReadyCondition updated. Updating timestamp.", node.Name) @@ -1330,7 +1326,7 @@ func (nc *Controller) processPod(podItem podUpdateItem) { } if currentReadyCondition.Status != v1.ConditionTrue { - if err := nodeutil.MarkPodsNotReady(nc.kubeClient, pods, nodeName); err != nil { + if err := nodeutil.MarkPodsNotReady(nc.kubeClient, nc.recorder, pods, nodeName); err != nil { klog.Warningf("Unable to mark pod %+v NotReady on node %v: %v.", podItem, nodeName, err) nc.podUpdateQueue.AddRateLimited(podItem) } @@ -1476,9 +1472,21 @@ func (nc *Controller) evictPods(node *v1.Node, pods []*v1.Pod) (bool, error) { return nc.zonePodEvictor[utilnode.GetZoneKey(node)].Add(node.Name, string(node.UID)), nil } -func (nc *Controller) markNodeForTainting(node *v1.Node) bool { +func (nc *Controller) markNodeForTainting(node *v1.Node, status v1.ConditionStatus) bool { nc.evictorLock.Lock() defer nc.evictorLock.Unlock() + if status == v1.ConditionFalse { + if !taintutils.TaintExists(node.Spec.Taints, NotReadyTaintTemplate) { + nc.zoneNoExecuteTainter[utilnode.GetZoneKey(node)].SetRemove(node.Name) + } + } + + if status == v1.ConditionUnknown { + if !taintutils.TaintExists(node.Spec.Taints, UnreachableTaintTemplate) { + nc.zoneNoExecuteTainter[utilnode.GetZoneKey(node)].SetRemove(node.Name) + } + } + return nc.zoneNoExecuteTainter[utilnode.GetZoneKey(node)].Add(node.Name, string(node.UID)) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/BUILD index ed3be9c03f7..6949d3866ef 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -42,6 +42,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/rate_limited_queue.go b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/rate_limited_queue.go index 03a1fcb889f..26bcd29d840 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/rate_limited_queue.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/rate_limited_queue.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -194,6 +194,15 @@ func (q *UniqueQueue) Clear() { } } +// SetRemove remove value from the set if value existed +func (q *UniqueQueue) SetRemove(value string) { + q.lock.Lock() + defer q.lock.Unlock() + if q.set.Has(value) { + q.set.Delete(value) + } +} + // RateLimitedTimedQueue is a unique item priority queue ordered by // the expected next time of execution. It is also rate limited. type RateLimitedTimedQueue struct { @@ -280,6 +289,11 @@ func (q *RateLimitedTimedQueue) Clear() { q.queue.Clear() } +// SetRemove remove value from the set of the queue +func (q *RateLimitedTimedQueue) SetRemove(value string) { + q.queue.SetRemove(value) +} + // SwapLimiter safely swaps current limiter for this queue with the // passed one if capacities or qps's differ. func (q *RateLimitedTimedQueue) SwapLimiter(newQPS float32) { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/taint_manager.go b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/taint_manager.go index 873258bd48b..8e38578a1a2 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/taint_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/taint_manager.go @@ -38,7 +38,7 @@ import ( "k8s.io/kubernetes/pkg/apis/core/helper" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -158,7 +158,7 @@ func getMinTolerationTime(tolerations []v1.Toleration) time.Duration { func NewNoExecuteTaintManager(c clientset.Interface, getPod GetPodFunc, getNode GetNodeFunc, getPodsAssignedToNode GetPodsByNodeNameFunc) *NoExecuteTaintManager { eventBroadcaster := record.NewBroadcaster() recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "taint-controller"}) - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) if c != nil { klog.V(0).Infof("Sending events to api server.") eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: c.CoreV1().Events("")}) @@ -358,7 +358,8 @@ func (tc *NoExecuteTaintManager) processPodOnNode( minTolerationTime := getMinTolerationTime(usedTolerations) // getMinTolerationTime returns negative value to denote infinite toleration. if minTolerationTime < 0 { - klog.V(4).Infof("New tolerations for %v tolerate forever. Scheduled deletion won't be cancelled if already scheduled.", podNamespacedName.String()) + klog.V(4).Infof("Current tolerations for %v tolerate forever, cancelling any scheduled deletion.", podNamespacedName.String()) + tc.cancelWorkWithEvent(podNamespacedName) return } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/timed_workers.go b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/timed_workers.go index 36bb985130e..2701e7ba23e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/timed_workers.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodelifecycle/scheduler/timed_workers.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // WorkArgs keeps arguments that will be passed to the function executed by the worker. diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/BUILD index ba5b8fa2a6f..5eb9c96af15 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/BUILD @@ -40,7 +40,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal.go b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal.go index 0c718193d02..950f04787f3 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal.go @@ -46,7 +46,7 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/controller" metricsclient "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" @@ -119,7 +119,7 @@ func NewHorizontalController( ) *HorizontalController { broadcaster := record.NewBroadcaster() - broadcaster.StartLogging(klog.Infof) + broadcaster.StartStructuredLogging(0) broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: evtNamespacer.Events("")}) recorder := broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "horizontal-pod-autoscaler"}) @@ -357,6 +357,9 @@ func (a *HorizontalController) reconcileKey(key string) (deleted bool, err error delete(a.scaleDownEvents, key) return true, nil } + if err != nil { + return false, err + } return false, a.reconcileAutoscaler(hpa, key) } @@ -452,34 +455,31 @@ func (a *HorizontalController) computeStatusForResourceMetric(currentReplicas in }, } return replicaCountProposal, timestampProposal, metricNameProposal, autoscalingv2.HorizontalPodAutoscalerCondition{}, nil - } else { - if metricSpec.Resource.Target.AverageUtilization == nil { - errMsg := "invalid resource metric source: neither a utilization target nor a value target was set" - err = fmt.Errorf(errMsg) - condition = a.getUnableComputeReplicaCountCondition(hpa, "FailedGetResourceMetric", err) - return 0, time.Time{}, "", condition, fmt.Errorf(errMsg) - } - targetUtilization := *metricSpec.Resource.Target.AverageUtilization - var percentageProposal int32 - var rawProposal int64 - replicaCountProposal, percentageProposal, rawProposal, timestampProposal, err := a.replicaCalc.GetResourceReplicas(currentReplicas, targetUtilization, metricSpec.Resource.Name, hpa.Namespace, selector) - if err != nil { - condition = a.getUnableComputeReplicaCountCondition(hpa, "FailedGetResourceMetric", err) - return 0, time.Time{}, "", condition, fmt.Errorf("failed to get %s utilization: %v", metricSpec.Resource.Name, err) - } - metricNameProposal = fmt.Sprintf("%s resource utilization (percentage of request)", metricSpec.Resource.Name) - *status = autoscalingv2.MetricStatus{ - Type: autoscalingv2.ResourceMetricSourceType, - Resource: &autoscalingv2.ResourceMetricStatus{ - Name: metricSpec.Resource.Name, - Current: autoscalingv2.MetricValueStatus{ - AverageUtilization: &percentageProposal, - AverageValue: resource.NewMilliQuantity(rawProposal, resource.DecimalSI), - }, - }, - } - return replicaCountProposal, timestampProposal, metricNameProposal, autoscalingv2.HorizontalPodAutoscalerCondition{}, nil } + if metricSpec.Resource.Target.AverageUtilization == nil { + errMsg := "invalid resource metric source: neither a utilization target nor a value target was set" + err = fmt.Errorf(errMsg) + condition = a.getUnableComputeReplicaCountCondition(hpa, "FailedGetResourceMetric", err) + return 0, time.Time{}, "", condition, fmt.Errorf(errMsg) + } + targetUtilization := *metricSpec.Resource.Target.AverageUtilization + replicaCountProposal, percentageProposal, rawProposal, timestampProposal, err := a.replicaCalc.GetResourceReplicas(currentReplicas, targetUtilization, metricSpec.Resource.Name, hpa.Namespace, selector) + if err != nil { + condition = a.getUnableComputeReplicaCountCondition(hpa, "FailedGetResourceMetric", err) + return 0, time.Time{}, "", condition, fmt.Errorf("failed to get %s utilization: %v", metricSpec.Resource.Name, err) + } + metricNameProposal = fmt.Sprintf("%s resource utilization (percentage of request)", metricSpec.Resource.Name) + *status = autoscalingv2.MetricStatus{ + Type: autoscalingv2.ResourceMetricSourceType, + Resource: &autoscalingv2.ResourceMetricStatus{ + Name: metricSpec.Resource.Name, + Current: autoscalingv2.MetricValueStatus{ + AverageUtilization: &percentageProposal, + AverageValue: resource.NewMilliQuantity(rawProposal, resource.DecimalSI), + }, + }, + } + return replicaCountProposal, timestampProposal, metricNameProposal, autoscalingv2.HorizontalPodAutoscalerCondition{}, nil } // computeStatusForExternalMetric computes the desired number of replicas for the specified metric of type ExternalMetricSourceType. @@ -992,7 +992,7 @@ func getLongestPolicyPeriod(scalingRules *autoscalingv2.HPAScalingRules) int32 { // calculateScaleUpLimitWithScalingRules returns the maximum number of pods that could be added for the given HPAScalingRules func calculateScaleUpLimitWithScalingRules(currentReplicas int32, scaleEvents []timestampedScaleEvent, scalingRules *autoscalingv2.HPAScalingRules) int32 { - var result int32 = 0 + var result int32 var proposed int32 var selectPolicyFn func(int32, int32) int32 if *scalingRules.SelectPolicy == autoscalingv2.DisabledPolicySelect { @@ -1180,15 +1180,13 @@ func setConditionInList(inputList []autoscalingv2.HorizontalPodAutoscalerConditi func max(a, b int32) int32 { if a >= b { return a - } else { - return b } + return b } func min(a, b int32) int32 { if a <= b { return a - } else { - return b } + return b } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/BUILD index a4ef29adeae..5dfa54ac939 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/metrics/pkg/client/custom_metrics:go_default_library", "//staging/src/k8s.io/metrics/pkg/client/external_metrics:go_default_library", "//vendor/k8s.io/heapster/metrics/api/v1/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/legacy_metrics_client.go b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/legacy_metrics_client.go index 2df1d1bc003..82886bd3ff1 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/legacy_metrics_client.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/legacy_metrics_client.go @@ -24,7 +24,7 @@ import ( "time" heapster "k8s.io/heapster/metrics/api/v1/types" - "k8s.io/klog" + "k8s.io/klog/v2" metricsapi "k8s.io/metrics/pkg/apis/metrics/v1alpha1" autoscaling "k8s.io/api/autoscaling/v2beta2" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/rest_metrics_client.go b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/rest_metrics_client.go index 65dbe7f6f2a..b8ffe6dc4ef 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/rest_metrics_client.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/rest_metrics_client.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" autoscaling "k8s.io/api/autoscaling/v2beta2" "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/rate_limiters.go b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/rate_limiters.go index 915cd5c151c..eb97db44351 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/rate_limiters.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/rate_limiters.go @@ -29,20 +29,24 @@ type FixedItemIntervalRateLimiter struct { var _ workqueue.RateLimiter = &FixedItemIntervalRateLimiter{} +// NewFixedItemIntervalRateLimiter creates a new instance of a RateLimiter using a fixed interval func NewFixedItemIntervalRateLimiter(interval time.Duration) workqueue.RateLimiter { return &FixedItemIntervalRateLimiter{ interval: interval, } } +// When returns the interval of the rate limiter func (r *FixedItemIntervalRateLimiter) When(item interface{}) time.Duration { return r.interval } +// NumRequeues returns back how many failures the item has had func (r *FixedItemIntervalRateLimiter) NumRequeues(item interface{}) int { return 1 } +// Forget indicates that an item is finished being retried. func (r *FixedItemIntervalRateLimiter) Forget(item interface{}) { } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator.go b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator.go index 01bc0b18185..02b15c9add4 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator.go @@ -35,10 +35,11 @@ const ( // defaultTestingTolerance is default value for calculating when to // scale up/scale down. defaultTestingTolerance = 0.1 - defaultTestingCpuInitializationPeriod = 2 * time.Minute + defaultTestingCPUInitializationPeriod = 2 * time.Minute defaultTestingDelayOfInitialReadinessStatus = 10 * time.Second ) +// ReplicaCalculator bundles all needed information to calculate the target amount of replicas type ReplicaCalculator struct { metricsClient metricsclient.MetricsClient podLister corelisters.PodLister @@ -47,6 +48,7 @@ type ReplicaCalculator struct { delayOfInitialReadinessStatus time.Duration } +// NewReplicaCalculator creates a new ReplicaCalculator and passes all necessary information to the new instance func NewReplicaCalculator(metricsClient metricsclient.MetricsClient, podLister corelisters.PodLister, tolerance float64, cpuInitializationPeriod, delayOfInitialReadinessStatus time.Duration) *ReplicaCalculator { return &ReplicaCalculator{ metricsClient: metricsClient, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podgc/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/podgc/BUILD index 12b277432e8..3f9f2fbae11 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podgc/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/podgc/BUILD @@ -22,7 +22,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller.go index e7a6150eebc..317a144c399 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller.go @@ -36,7 +36,7 @@ import ( "k8s.io/client-go/util/workqueue" "k8s.io/component-base/metrics/prometheus/ratelimiter" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/BUILD index 1bed30f7336..8e1b95aa4c4 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/BUILD @@ -38,7 +38,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/integer:go_default_library", ], ) @@ -73,7 +73,7 @@ go_test( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/testing:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set.go b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set.go index 134cfacbb24..f52eab6ca92 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set.go @@ -39,6 +39,7 @@ import ( apps "k8s.io/api/apps/v1" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" @@ -56,7 +57,7 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" "k8s.io/component-base/metrics/prometheus/ratelimiter" - "k8s.io/klog" + "k8s.io/klog/v2" podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/controller" "k8s.io/utils/integer" @@ -110,7 +111,7 @@ type ReplicaSetController struct { // NewReplicaSetController configures a replica set controller with the specified event recorder func NewReplicaSetController(rsInformer appsinformers.ReplicaSetInformer, podInformer coreinformers.PodInformer, kubeClient clientset.Interface, burstReplicas int) *ReplicaSetController { eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) return NewBaseController(rsInformer, podInformer, kubeClient, burstReplicas, apps.SchemeGroupVersion.WithKind("ReplicaSet"), @@ -214,16 +215,12 @@ func (rsc *ReplicaSetController) getReplicaSetsWithSameController(rs *apps.Repli } } - if klog.V(2) { - var related string - if len(relatedRSs) > 0 { - var relatedNames []string - for _, r := range relatedRSs { - relatedNames = append(relatedNames, r.Name) - } - related = ": " + strings.Join(relatedNames, ", ") + if klog.V(2).Enabled() { + var relatedNames []string + for _, r := range relatedRSs { + relatedNames = append(relatedNames, r.Name) } - klog.Infof("Found %d related %vs for %v %s/%s%s", len(relatedRSs), rsc.Kind, rsc.Kind, rs.Namespace, rs.Name, related) + klog.InfoS("Found related ReplicaSets", "replicaSet", klog.KObj(rs), "relatedReplicaSets", relatedNames) } return relatedRSs @@ -559,7 +556,7 @@ func (rsc *ReplicaSetController) manageReplicas(filteredPods []*v1.Pod, rs *apps // into a performance bottleneck. We should generate a UID for the pod // beforehand and store it via ExpectCreations. rsc.expectations.ExpectCreations(rsKey, diff) - klog.V(2).Infof("Too few replicas for %v %s/%s, need %d, creating %d", rsc.Kind, rs.Namespace, rs.Name, *(rs.Spec.Replicas), diff) + klog.V(2).InfoS("Too few replicas", "replicaSet", klog.KObj(rs), "need", *(rs.Spec.Replicas), "creating", diff) // Batch the pod creates. Batch sizes start at SlowStartInitialBatchSize // and double with each successful iteration in a kind of "slow start". // This handles attempts to start large numbers of pods that would @@ -595,7 +592,7 @@ func (rsc *ReplicaSetController) manageReplicas(filteredPods []*v1.Pod, rs *apps if diff > rsc.burstReplicas { diff = rsc.burstReplicas } - klog.V(2).Infof("Too many replicas for %v %s/%s, need %d, deleting %d", rsc.Kind, rs.Namespace, rs.Name, *(rs.Spec.Replicas), diff) + klog.V(2).InfoS("Too many replicas", "replicaSet", klog.KObj(rs), "need", *(rs.Spec.Replicas), "deleting", diff) relatedPods, err := rsc.getIndirectlyRelatedPods(rs) utilruntime.HandleError(err) @@ -620,9 +617,11 @@ func (rsc *ReplicaSetController) manageReplicas(filteredPods []*v1.Pod, rs *apps if err := rsc.podControl.DeletePod(rs.Namespace, targetPod.Name, rs); err != nil { // Decrement the expected number of deletes because the informer won't observe this deletion podKey := controller.PodKey(targetPod) - klog.V(2).Infof("Failed to delete %v, decrementing expectations for %v %s/%s", podKey, rsc.Kind, rs.Namespace, rs.Name) rsc.expectations.DeletionObserved(rsKey, podKey) - errCh <- err + if !apierrors.IsNotFound(err) { + klog.V(2).Infof("Failed to delete %v, decremented expectations for %v %s/%s", podKey, rsc.Kind, rs.Namespace, rs.Name) + errCh <- err + } } }(pod) } @@ -788,7 +787,7 @@ func (rsc *ReplicaSetController) getIndirectlyRelatedPods(rs *apps.ReplicaSet) ( relatedPods = append(relatedPods, pod) } } - if klog.V(4) { + if klog.V(4).Enabled() { var relatedNames []string for _, related := range relatedPods { relatedNames = append(relatedNames, related.Name) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set_utils.go index 8fd3ea24ee3..0ce6f4bee52 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set_utils.go @@ -23,7 +23,7 @@ import ( "fmt" "reflect" - "k8s.io/klog" + "k8s.io/klog/v2" apps "k8s.io/api/apps/v1" "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/replication/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/replication/BUILD index 21eda9b8e48..638601af579 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/replication/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/replication/BUILD @@ -39,7 +39,6 @@ go_library( "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller.go index d59f6208267..187367e7118 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller.go @@ -32,7 +32,6 @@ import ( "k8s.io/client-go/kubernetes/scheme" v1core "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/record" - "k8s.io/klog" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/replicaset" ) @@ -51,7 +50,7 @@ type ReplicationManager struct { // NewReplicationManager configures a replication manager with the specified event recorder func NewReplicationManager(podInformer coreinformers.PodInformer, rcInformer coreinformers.ReplicationControllerInformer, kubeClient clientset.Interface, burstReplicas int) *ReplicationManager { eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) return &ReplicationManager{ *replicaset.NewBaseController(informerAdapter{rcInformer}, podInformer, clientsetAdapter{kubeClient}, burstReplicas, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/BUILD index b378e415682..a12f63e18c3 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/BUILD @@ -37,7 +37,7 @@ go_library( "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller.go index 4b1062bad5f..06946c44fe4 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" @@ -430,7 +430,7 @@ func (rq *ResourceQuotaController) Sync(discoveryFunc NamespacedResourcesFunc, p defer rq.workerLock.Unlock() // Something has changed, so track the new state and perform a sync. - if klog.V(2) { + if klog.V(2).Enabled() { klog.Infof("syncing resource quota controller with updated resources from discovery: %s", printDiff(oldResources, newResources)) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_monitor.go b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_monitor.go index df92b103688..8157d8b27f9 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_monitor.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_monitor.go @@ -21,7 +21,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/BUILD index 8644054e737..2c2fd81d877 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/BUILD @@ -33,7 +33,7 @@ go_library( "//staging/src/k8s.io/client-go/util/retry:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -59,7 +59,7 @@ go_test( "//staging/src/k8s.io/client-go/testing:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", "//vendor/gopkg.in/square/go-jose.v2/jwt:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller.go index 9f4ccdbe7e8..b0110f3da30 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller.go @@ -33,7 +33,7 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" "k8s.io/component-base/metrics/prometheus/ratelimiter" - "k8s.io/klog" + "k8s.io/klog/v2" ) // ServiceAccountsControllerOptions contains options for running a ServiceAccountsController diff --git a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller.go index 77559c5cae3..f490ad23ab0 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller.go @@ -37,7 +37,7 @@ import ( clientretry "k8s.io/client-go/util/retry" "k8s.io/client-go/util/workqueue" "k8s.io/component-base/metrics/prometheus/ratelimiter" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/registry/core/secret" "k8s.io/kubernetes/pkg/serviceaccount" ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/statefulset/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/BUILD index e0871ccb039..e8170f226d5 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/statefulset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/BUILD @@ -41,7 +41,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/retry:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set.go index 130d684a635..907f6bebbe8 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set.go @@ -42,7 +42,7 @@ import ( "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/history" - "k8s.io/klog" + "k8s.io/klog/v2" ) // controllerKind contains the schema.GroupVersionKind for this controller type. @@ -82,7 +82,7 @@ func NewStatefulSetController( kubeClient clientset.Interface, ) *StatefulSetController { eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "statefulset-controller"}) @@ -374,7 +374,7 @@ func (ssc *StatefulSetController) resolveControllerRef(namespace string, control func (ssc *StatefulSetController) enqueueStatefulSet(obj interface{}) { key, err := controller.KeyFunc(obj) if err != nil { - utilruntime.HandleError(fmt.Errorf("Couldn't get key for object %+v: %v", obj, err)) + utilruntime.HandleError(fmt.Errorf("couldn't get key for object %+v: %v", obj, err)) return } ssc.queue.Add(key) @@ -389,7 +389,7 @@ func (ssc *StatefulSetController) processNextWorkItem() bool { } defer ssc.queue.Done(key) if err := ssc.sync(key.(string)); err != nil { - utilruntime.HandleError(fmt.Errorf("Error syncing StatefulSet %v, requeuing: %v", key.(string), err)) + utilruntime.HandleError(fmt.Errorf("error syncing StatefulSet %v, requeuing: %v", key.(string), err)) ssc.queue.AddRateLimited(key) } else { ssc.queue.Forget(key) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set_control.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set_control.go index 49ad241e149..5922e200266 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set_control.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set_control.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/client-go/tools/record" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller/history" ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/ttl/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/ttl/BUILD index 1f69b0ae43b..02e013d21e3 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/ttl/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/ttl/BUILD @@ -25,7 +25,7 @@ go_library( "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/ttl/ttl_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/ttl/ttl_controller.go index 2f5fd269f84..5d77536cec9 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/ttl/ttl_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/ttl/ttl_controller.go @@ -49,7 +49,7 @@ import ( "k8s.io/client-go/util/workqueue" "k8s.io/kubernetes/pkg/controller" - "k8s.io/klog" + "k8s.io/klog/v2" ) type TTLController struct { @@ -267,10 +267,10 @@ func (ttlc *TTLController) patchNodeWithAnnotation(node *v1.Node, annotationKey } _, err = ttlc.kubeClient.CoreV1().Nodes().Patch(context.TODO(), node.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}) if err != nil { - klog.V(2).Infof("Failed to change ttl annotation for node %s: %v", node.Name, err) + klog.V(2).InfoS("Failed to change ttl annotation for node", "node", klog.KObj(node), "err", err) return err } - klog.V(2).Infof("Changed ttl annotation for node %s to %d seconds", node.Name, value) + klog.V(2).InfoS("Changed ttl annotation", "node", klog.KObj(node), "new_ttl", time.Duration(value)*time.Second) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/ttlafterfinished/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/ttlafterfinished/BUILD index 55a6e5ce119..d75d878cf81 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/ttlafterfinished/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/ttlafterfinished/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", "//staging/src/k8s.io/kubectl/pkg/scheme:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/ttlafterfinished/ttlafterfinished_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/ttlafterfinished/ttlafterfinished_controller.go index be2866192b7..656884cbf01 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/ttlafterfinished/ttlafterfinished_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/ttlafterfinished/ttlafterfinished_controller.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" batch "k8s.io/api/batch/v1" "k8s.io/api/core/v1" @@ -72,7 +72,7 @@ type Controller struct { // New creates an instance of Controller func New(jobInformer batchinformers.JobInformer, client clientset.Interface) *Controller { eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: client.CoreV1().Events("")}) if client != nil && client.CoreV1().RESTClient().GetRateLimiter() != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/util/endpoint/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/util/endpoint/BUILD index 3a17c9c71f9..81f4068279b 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/util/endpoint/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/util/endpoint/BUILD @@ -10,6 +10,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/api/v1/pod:go_default_library", + "//pkg/apis/core/v1/helper:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/hash:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", @@ -19,6 +20,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/util/endpoint/controller_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/util/endpoint/controller_utils.go index e38e65668d7..9c2ab1eedf9 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/util/endpoint/controller_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/util/endpoint/controller_utils.go @@ -32,8 +32,10 @@ import ( v1listers "k8s.io/client-go/listers/core/v1" "k8s.io/client-go/tools/cache" podutil "k8s.io/kubernetes/pkg/api/v1/pod" + "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/util/hash" + utilnet "k8s.io/utils/net" ) // ServiceSelectorCache is a cache of service selectors to avoid high CPU consumption caused by frequent calls to AsSelectorPreValidated (see #73527) @@ -106,9 +108,6 @@ func (sc *ServiceSelectorCache) GetPodServiceMemberships(serviceLister v1listers return set, nil } -// EndpointsMatch is a type of function that returns true if pod endpoints match. -type EndpointsMatch func(*v1.Pod, *v1.Pod) bool - // PortMapKey is used to uniquely identify groups of endpoint ports. type PortMapKey string @@ -153,9 +152,10 @@ func ShouldSetHostname(pod *v1.Pod, svc *v1.Service) bool { return len(pod.Spec.Hostname) > 0 && pod.Spec.Subdomain == svc.Name && svc.Namespace == pod.Namespace } -// PodChanged returns two boolean values, the first returns true if the pod. -// has changed, the second value returns true if the pod labels have changed. -func PodChanged(oldPod, newPod *v1.Pod, endpointChanged EndpointsMatch) (bool, bool) { +// podEndpointsChanged returns two boolean values. The first is true if the pod has +// changed in a way that may change existing endpoints. The second value is true if the +// pod has changed in a way that may affect which Services it matches. +func podEndpointsChanged(oldPod, newPod *v1.Pod) (bool, bool) { // Check if the pod labels have changed, indicating a possible // change in the service membership labelsChanged := false @@ -175,16 +175,27 @@ func PodChanged(oldPod, newPod *v1.Pod, endpointChanged EndpointsMatch) (bool, b if podutil.IsPodReady(oldPod) != podutil.IsPodReady(newPod) { return true, labelsChanged } - // Convert the pod to an Endpoint, clear inert fields, - // and see if they are the same. - // TODO: Add a watcher for node changes separate from this - // We don't want to trigger multiple syncs at a pod level when a node changes - return endpointChanged(newPod, oldPod), labelsChanged + + // Check if the pod IPs have changed + if len(oldPod.Status.PodIPs) != len(newPod.Status.PodIPs) { + return true, labelsChanged + } + for i := range oldPod.Status.PodIPs { + if oldPod.Status.PodIPs[i].IP != newPod.Status.PodIPs[i].IP { + return true, labelsChanged + } + } + + // Endpoints may also reference a pod's Name, Namespace, UID, and NodeName, but + // the first three are immutable, and NodeName is immutable once initially set, + // which happens before the pod gets an IP. + + return false, labelsChanged } // GetServicesToUpdateOnPodChange returns a set of Service keys for Services // that have potentially been affected by a change to this pod. -func GetServicesToUpdateOnPodChange(serviceLister v1listers.ServiceLister, selectorCache *ServiceSelectorCache, old, cur interface{}, endpointChanged EndpointsMatch) sets.String { +func GetServicesToUpdateOnPodChange(serviceLister v1listers.ServiceLister, selectorCache *ServiceSelectorCache, old, cur interface{}) sets.String { newPod := cur.(*v1.Pod) oldPod := old.(*v1.Pod) if newPod.ResourceVersion == oldPod.ResourceVersion { @@ -193,7 +204,7 @@ func GetServicesToUpdateOnPodChange(serviceLister v1listers.ServiceLister, selec return sets.String{} } - podChanged, labelsChanged := PodChanged(oldPod, newPod, endpointChanged) + podChanged, labelsChanged := podEndpointsChanged(oldPod, newPod) // If both the pod and labels are unchanged, no update is needed if !podChanged && !labelsChanged { @@ -266,3 +277,18 @@ func (sl portsInOrder) Less(i, j int) bool { h2 := DeepHashObjectToString(sl[j]) return h1 < h2 } + +// IsIPv6Service checks if svc should have IPv6 endpoints +func IsIPv6Service(svc *v1.Service) bool { + if helper.IsServiceIPSet(svc) { + return utilnet.IsIPv6String(svc.Spec.ClusterIP) + } else if svc.Spec.IPFamily != nil { + return *svc.Spec.IPFamily == v1.IPv6Protocol + } else { + // FIXME: for legacy headless Services with no IPFamily, the current + // thinking is that we should use the cluster default. Unfortunately + // the endpoint controller doesn't know the cluster default. For now, + // assume it's IPv4. + return false + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/util/node/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/util/node/BUILD index fbb36ecca73..48d28ec1c49 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/util/node/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/util/node/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/client-go/listers/apps/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/util/node/controller_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/util/node/controller_utils.go index 89560eaa1e1..4f941c1ad41 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/util/node/controller_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/util/node/controller_utils.go @@ -37,7 +37,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/util/format" nodepkg "k8s.io/kubernetes/pkg/util/node" - "k8s.io/klog" + "k8s.io/klog/v2" ) // DeletePods will delete all pods from master running on given node, @@ -118,7 +118,7 @@ func SetPodTerminationReason(kubeClient clientset.Interface, pod *v1.Pod, nodeNa // MarkPodsNotReady updates ready status of given pods running on // given node from master return true if success -func MarkPodsNotReady(kubeClient clientset.Interface, pods []*v1.Pod, nodeName string) error { +func MarkPodsNotReady(kubeClient clientset.Interface, recorder record.EventRecorder, pods []*v1.Pod, nodeName string) error { klog.V(2).Infof("Update ready status of pods on node [%v]", nodeName) errMsg := []string{} @@ -136,6 +136,7 @@ func MarkPodsNotReady(kubeClient clientset.Interface, pods []*v1.Pod, nodeName s if !utilpod.UpdatePodCondition(&pod.Status, &cond) { break } + klog.V(2).Infof("Updating ready status of pod %v to false", pod.Name) _, err := kubeClient.CoreV1().Pods(pod.Namespace).UpdateStatus(context.TODO(), pod, metav1.UpdateOptions{}) if err != nil { @@ -147,6 +148,8 @@ func MarkPodsNotReady(kubeClient clientset.Interface, pods []*v1.Pod, nodeName s klog.Warningf("Failed to update status for pod %q: %v", format.Pod(pod), err) errMsg = append(errMsg, fmt.Sprintf("%v", err)) } + // record NodeNotReady event after updateStatus to make sure pod still exists + recorder.Event(pod, v1.EventTypeWarning, "NodeNotReady", "Node is not ready") break } } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/BUILD index 4a226cb0d4a..cb412ec61f8 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/BUILD @@ -17,6 +17,7 @@ go_library( "//pkg/controller/volume/attachdetach/reconciler:go_default_library", "//pkg/controller/volume/attachdetach/statusupdater:go_default_library", "//pkg/controller/volume/attachdetach/util:go_default_library", + "//pkg/controller/volume/common:go_default_library", "//pkg/features:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/csimigration:go_default_library", @@ -44,7 +45,7 @@ go_library( "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/csi-translation-lib:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/attach_detach_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/attach_detach_controller.go index 40f78a22776..dfcfe7b50d9 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/attach_detach_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/attach_detach_controller.go @@ -23,7 +23,7 @@ import ( "net" "time" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" "k8s.io/utils/mount" @@ -53,6 +53,7 @@ import ( "k8s.io/kubernetes/pkg/controller/volume/attachdetach/reconciler" "k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater" "k8s.io/kubernetes/pkg/controller/volume/attachdetach/util" + "k8s.io/kubernetes/pkg/controller/volume/common" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/csimigration" @@ -150,7 +151,7 @@ func NewAttachDetachController( } eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "attachdetach-controller"}) blkutil := volumepathhandler.NewBlockVolumePathHandler() @@ -202,11 +203,8 @@ func NewAttachDetachController( // This custom indexer will index pods by its PVC keys. Then we don't need // to iterate all pods every time to find pods which reference given PVC. - err := adc.podIndexer.AddIndexers(kcache.Indexers{ - pvcKeyIndex: indexByPVCKey, - }) - if err != nil { - klog.Warningf("adding indexer got %v", err) + if err := common.AddPodPVCIndexerIfNotPresent(adc.podIndexer); err != nil { + return nil, fmt.Errorf("Could not initialize attach detach controller: %v", err) } nodeInformer.Informer().AddEventHandler(kcache.ResourceEventHandlerFuncs{ @@ -227,30 +225,6 @@ func NewAttachDetachController( return adc, nil } -const ( - pvcKeyIndex string = "pvcKey" -) - -// indexByPVCKey returns PVC keys for given pod. Note that the index is only -// used for attaching, so we are only interested in active pods with nodeName -// set. -func indexByPVCKey(obj interface{}) ([]string, error) { - pod, ok := obj.(*v1.Pod) - if !ok { - return []string{}, nil - } - if len(pod.Spec.NodeName) == 0 || volumeutil.IsPodTerminated(pod, pod.Status) { - return []string{}, nil - } - keys := []string{} - for _, podVolume := range pod.Spec.Volumes { - if pvcSource := podVolume.VolumeSource.PersistentVolumeClaim; pvcSource != nil { - keys = append(keys, fmt.Sprintf("%s/%s", pod.Namespace, pvcSource.ClaimName)) - } - } - return keys, nil -} - type attachDetachController struct { // kubeClient is the kube API client used by volumehost to communicate with // the API server. @@ -451,7 +425,7 @@ func (adc *attachDetachController) populateDesiredStateOfWorld() error { // The volume specs present in the ActualStateOfWorld are nil, let's replace those // with the correct ones found on pods. The present in the ASW with no corresponding // pod will be detached and the spec is irrelevant. - volumeSpec, err := util.CreateVolumeSpec(podVolume, podToAdd.Namespace, nodeName, &adc.volumePluginMgr, adc.pvcLister, adc.pvLister, adc.csiMigratedPluginManager, adc.intreeToCSITranslator) + volumeSpec, err := util.CreateVolumeSpec(podVolume, podToAdd, nodeName, &adc.volumePluginMgr, adc.pvcLister, adc.pvLister, adc.csiMigratedPluginManager, adc.intreeToCSITranslator) if err != nil { klog.Errorf( "Error creating spec for volume %q, pod %q/%q: %v", @@ -651,7 +625,7 @@ func (adc *attachDetachController) syncPVCByKey(key string) error { return nil } - objs, err := adc.podIndexer.ByIndex(pvcKeyIndex, key) + objs, err := adc.podIndexer.ByIndex(common.PodPVCIndex, key) if err != nil { return err } @@ -660,6 +634,10 @@ func (adc *attachDetachController) syncPVCByKey(key string) error { if !ok { continue } + // we are only interested in active pods with nodeName set + if len(pod.Spec.NodeName) == 0 || volumeutil.IsPodTerminated(pod, pod.Status) { + continue + } volumeActionFlag := util.DetermineVolumeAction( pod, adc.desiredStateOfWorld, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache/BUILD index 9b86e8711ff..dc9dee50cff 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache/BUILD @@ -20,7 +20,7 @@ go_library( "//pkg/volume/util/types:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache/actual_state_of_world.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache/actual_state_of_world.go index 714b2e67553..6d597cf8751 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache/actual_state_of_world.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache/actual_state_of_world.go @@ -26,7 +26,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/metrics/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/metrics/BUILD index 08002eb4c0a..38d23da8bef 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/metrics/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/metrics/BUILD @@ -16,7 +16,7 @@ go_library( "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/metrics/metrics.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/metrics/metrics.go index d082b4914ff..a2dbed738f2 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/metrics/metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/metrics/metrics.go @@ -24,7 +24,7 @@ import ( corelisters "k8s.io/client-go/listers/core/v1" "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache" "k8s.io/kubernetes/pkg/controller/volume/attachdetach/util" "k8s.io/kubernetes/pkg/volume" @@ -168,7 +168,7 @@ func (collector *attachDetachStateCollector) getVolumeInUseCount() volumeCount { continue } for _, podVolume := range pod.Spec.Volumes { - volumeSpec, err := util.CreateVolumeSpec(podVolume, pod.Namespace, types.NodeName(pod.Spec.NodeName), collector.volumePluginMgr, collector.pvcLister, collector.pvLister, collector.csiMigratedPluginManager, collector.intreeToCSITranslator) + volumeSpec, err := util.CreateVolumeSpec(podVolume, pod, types.NodeName(pod.Spec.NodeName), collector.volumePluginMgr, collector.pvcLister, collector.pvLister, collector.csiMigratedPluginManager, collector.intreeToCSITranslator) if err != nil { continue } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/populator/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/populator/BUILD index 9b9a7bafe62..15dde9bafdc 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/populator/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/populator/BUILD @@ -22,7 +22,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/populator/desired_state_of_world_populator.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/populator/desired_state_of_world_populator.go index 17f5737f25f..779798aa2c5 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/populator/desired_state_of_world_populator.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/populator/desired_state_of_world_populator.go @@ -22,7 +22,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/reconciler/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/reconciler/BUILD index b3a94b397e3..d4b56ba2cc3 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/reconciler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/reconciler/BUILD @@ -22,7 +22,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/reconciler/reconciler.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/reconciler/reconciler.go index c1e2edddc26..a010630d77e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/reconciler/reconciler.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/reconciler/reconciler.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/record" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache" "k8s.io/kubernetes/pkg/controller/volume/attachdetach/metrics" "k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater" @@ -228,7 +228,7 @@ func (rc *reconciler) attachDesiredVolumes() { for _, volumeToAttach := range rc.desiredStateOfWorld.GetVolumesToAttach() { if rc.actualStateOfWorld.IsVolumeAttachedToNode(volumeToAttach.VolumeName, volumeToAttach.NodeName) { // Volume/Node exists, touch it to reset detachRequestedTime - if klog.V(5) { + if klog.V(5).Enabled() { klog.Infof(volumeToAttach.GenerateMsgDetailed("Volume attached--touching", "")) } rc.actualStateOfWorld.ResetDetachRequestTime(volumeToAttach.VolumeName, volumeToAttach.NodeName) @@ -239,7 +239,7 @@ func (rc *reconciler) attachDesiredVolumes() { // Don't even try to start an operation if there is already one running for the given volume and node. if rc.attacherDetacher.IsOperationPending(volumeToAttach.VolumeName, "" /* podName */, volumeToAttach.NodeName) { - if klog.V(10) { + if klog.V(10).Enabled() { klog.Infof("Operation for volume %q is already running for node %q. Can't start attach", volumeToAttach.VolumeName, volumeToAttach.NodeName) } continue @@ -249,7 +249,7 @@ func (rc *reconciler) attachDesiredVolumes() { // Don't even try to start an operation if there is already one running for the given volume if rc.attacherDetacher.IsOperationPending(volumeToAttach.VolumeName, "" /* podName */, "" /* nodeName */) { - if klog.V(10) { + if klog.V(10).Enabled() { klog.Infof("Operation for volume %q is already running. Can't start attach for %q", volumeToAttach.VolumeName, volumeToAttach.NodeName) } continue @@ -267,7 +267,7 @@ func (rc *reconciler) attachDesiredVolumes() { } // Volume/Node doesn't exist, spawn a goroutine to attach it - if klog.V(5) { + if klog.V(5).Enabled() { klog.Infof(volumeToAttach.GenerateMsgDetailed("Starting attacherDetacher.AttachVolume", "")) } err := rc.attacherDetacher.AttachVolume(volumeToAttach.VolumeToAttach, rc.actualStateOfWorld) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/BUILD index b72929ecdaa..eb71b46b944 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go index 615444d76e0..5acae4ac46f 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go @@ -19,7 +19,7 @@ limitations under the License. package statusupdater import ( - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/util/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/util/BUILD index 5e42c06070e..210db59761b 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/util/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/util/util.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/util/util.go index 29545e7dec5..389fbec77f6 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/util/util.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/util/util.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" utilfeature "k8s.io/apiserver/pkg/util/feature" corelisters "k8s.io/client-go/listers/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" @@ -39,39 +39,49 @@ import ( // A volume.Spec that refers to an in-tree plugin spec is translated to refer // to a migrated CSI plugin spec if all conditions for CSI migration on a node // for the in-tree plugin is satisfied. -func CreateVolumeSpec(podVolume v1.Volume, podNamespace string, nodeName types.NodeName, vpm *volume.VolumePluginMgr, pvcLister corelisters.PersistentVolumeClaimLister, pvLister corelisters.PersistentVolumeLister, csiMigratedPluginManager csimigration.PluginManager, csiTranslator csimigration.InTreeToCSITranslator) (*volume.Spec, error) { +func CreateVolumeSpec(podVolume v1.Volume, pod *v1.Pod, nodeName types.NodeName, vpm *volume.VolumePluginMgr, pvcLister corelisters.PersistentVolumeClaimLister, pvLister corelisters.PersistentVolumeLister, csiMigratedPluginManager csimigration.PluginManager, csiTranslator csimigration.InTreeToCSITranslator) (*volume.Spec, error) { + claimName := "" + readOnly := false if pvcSource := podVolume.VolumeSource.PersistentVolumeClaim; pvcSource != nil { + claimName = pvcSource.ClaimName + readOnly = pvcSource.ReadOnly + } + if ephemeralSource := podVolume.VolumeSource.Ephemeral; ephemeralSource != nil && utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume) { + claimName = pod.Name + "-" + podVolume.Name + readOnly = ephemeralSource.ReadOnly + } + if claimName != "" { klog.V(10).Infof( "Found PVC, ClaimName: %q/%q", - podNamespace, - pvcSource.ClaimName) + pod.Namespace, + claimName) // If podVolume is a PVC, fetch the real PV behind the claim pvName, pvcUID, err := getPVCFromCacheExtractPV( - podNamespace, pvcSource.ClaimName, pvcLister) + pod.Namespace, claimName, pvcLister) if err != nil { return nil, fmt.Errorf( "error processing PVC %q/%q: %v", - podNamespace, - pvcSource.ClaimName, + pod.Namespace, + claimName, err) } klog.V(10).Infof( "Found bound PV for PVC (ClaimName %q/%q pvcUID %v): pvName=%q", - podNamespace, - pvcSource.ClaimName, + pod.Namespace, + claimName, pvcUID, pvName) // Fetch actual PV object volumeSpec, err := getPVSpecFromCache( - pvName, pvcSource.ReadOnly, pvcUID, pvLister) + pvName, readOnly, pvcUID, pvLister) if err != nil { return nil, fmt.Errorf( "error processing PVC %q/%q: %v", - podNamespace, - pvcSource.ClaimName, + pod.Namespace, + claimName, err) } @@ -79,8 +89,8 @@ func CreateVolumeSpec(podVolume v1.Volume, podNamespace string, nodeName types.N if err != nil { return nil, fmt.Errorf( "error performing CSI migration checks and translation for PVC %q/%q: %v", - podNamespace, - pvcSource.ClaimName, + pod.Namespace, + claimName, err) } @@ -88,8 +98,8 @@ func CreateVolumeSpec(podVolume v1.Volume, podNamespace string, nodeName types.N "Extracted volumeSpec (%v) from bound PV (pvName %q) and PVC (ClaimName %q/%q pvcUID %v)", volumeSpec.Name(), pvName, - podNamespace, - pvcSource.ClaimName, + pod.Namespace, + claimName, pvcUID) return volumeSpec, nil @@ -219,7 +229,7 @@ func ProcessPodVolumes(pod *v1.Pod, addVolumes bool, desiredStateOfWorld cache.D // Process volume spec for each volume defined in pod for _, podVolume := range pod.Spec.Volumes { - volumeSpec, err := CreateVolumeSpec(podVolume, pod.Namespace, nodeName, volumePluginMgr, pvcLister, pvLister, csiMigratedPluginManager, csiTranslator) + volumeSpec, err := CreateVolumeSpec(podVolume, pod, nodeName, volumePluginMgr, pvcLister, pvLister, csiMigratedPluginManager, csiTranslator) if err != nil { klog.V(10).Infof( "Error processing volume %q for pod %q/%q: %v", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/listers/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/common/BUILD similarity index 54% rename from vendor/k8s.io/kubernetes/pkg/scheduler/listers/BUILD rename to vendor/k8s.io/kubernetes/pkg/controller/volume/common/BUILD index 162c80d4a3c..478e53fce3a 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/listers/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/common/BUILD @@ -2,14 +2,14 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["listers.go"], - importpath = "k8s.io/kubernetes/pkg/scheduler/listers", + srcs = ["common.go"], + importpath = "k8s.io/kubernetes/pkg/controller/volume/common", visibility = ["//visibility:public"], deps = [ - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/features:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", - "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", ], ) @@ -22,10 +22,7 @@ filegroup( filegroup( name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/scheduler/listers/fake:all-srcs", - ], + srcs = [":package-srcs"], tags = ["automanaged"], visibility = ["//visibility:public"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/common/common.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/common/common.go new file mode 100644 index 00000000000..1c07496deec --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/common/common.go @@ -0,0 +1,72 @@ +/* +Copyright 2020 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 common + +import ( + "fmt" + + v1 "k8s.io/api/core/v1" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/client-go/tools/cache" + "k8s.io/kubernetes/pkg/features" +) + +const ( + // PodPVCIndex is the lookup name for the index function, which is to index by pod pvcs. + PodPVCIndex = "pod-pvc-index" +) + +// PodPVCIndexFunc creates an index function that returns PVC keys (= +// namespace/name) for given pod. If enabled, this includes the PVCs +// that might be created for generic ephemeral volumes. +func PodPVCIndexFunc(genericEphemeralVolumeFeatureEnabled bool) func(obj interface{}) ([]string, error) { + return func(obj interface{}) ([]string, error) { + pod, ok := obj.(*v1.Pod) + if !ok { + return []string{}, nil + } + keys := []string{} + for _, podVolume := range pod.Spec.Volumes { + claimName := "" + if pvcSource := podVolume.VolumeSource.PersistentVolumeClaim; pvcSource != nil { + claimName = pvcSource.ClaimName + } + if ephemeralSource := podVolume.VolumeSource.Ephemeral; genericEphemeralVolumeFeatureEnabled && ephemeralSource != nil { + claimName = pod.Name + "-" + podVolume.Name + } + if claimName != "" { + keys = append(keys, fmt.Sprintf("%s/%s", pod.Namespace, claimName)) + } + } + return keys, nil + } +} + +// AddPodPVCIndexerIfNotPresent adds the PodPVCIndexFunc with the current global setting for GenericEphemeralVolume. +func AddPodPVCIndexerIfNotPresent(indexer cache.Indexer) error { + return AddIndexerIfNotPresent(indexer, PodPVCIndex, + PodPVCIndexFunc(utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume))) +} + +// AddIndexerIfNotPresent adds the index function with the name into the cache indexer if not present +func AddIndexerIfNotPresent(indexer cache.Indexer, indexName string, indexFunc cache.IndexFunc) error { + indexers := indexer.GetIndexers() + if _, ok := indexers[indexName]; ok { + return nil + } + return indexer.AddIndexers(cache.Indexers{indexName: indexFunc}) +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/BUILD new file mode 100644 index 00000000000..5d72daa0a62 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/BUILD @@ -0,0 +1,62 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "controller.go", + "doc.go", + ], + importpath = "k8s.io/kubernetes/pkg/controller/volume/ephemeral", + visibility = ["//visibility:public"], + deps = [ + "//pkg/controller/volume/common:go_default_library", + "//pkg/controller/volume/events:go_default_library", + "//pkg/volume/util:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = ["controller_test.go"], + embed = [":go_default_library"], + deps = [ + "//pkg/controller:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/client-go/informers:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + "//staging/src/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/OWNERS b/vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/OWNERS similarity index 67% rename from vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/OWNERS rename to vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/OWNERS index 0fcf4abf564..8b52858362e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/OWNERS @@ -1,4 +1,6 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sjenning +- saad-ali +- jsafrane +- pohly diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/controller.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/controller.go new file mode 100644 index 00000000000..59d008a0fff --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/controller.go @@ -0,0 +1,286 @@ +/* +Copyright 2020 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 ephemeral + +import ( + "context" + "fmt" + "time" + + "k8s.io/klog/v2" + + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + coreinformers "k8s.io/client-go/informers/core/v1" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" + v1core "k8s.io/client-go/kubernetes/typed/core/v1" + corelisters "k8s.io/client-go/listers/core/v1" + "k8s.io/client-go/tools/cache" + kcache "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/record" + "k8s.io/client-go/util/workqueue" + "k8s.io/kubernetes/pkg/controller/volume/common" + "k8s.io/kubernetes/pkg/controller/volume/events" + "k8s.io/kubernetes/pkg/volume/util" +) + +// Controller creates PVCs for ephemeral inline volumes in a pod spec. +type Controller interface { + Run(workers int, stopCh <-chan struct{}) +} + +type ephemeralController struct { + // kubeClient is the kube API client used by volumehost to communicate with + // the API server. + kubeClient clientset.Interface + + // pvcLister is the shared PVC lister used to fetch and store PVC + // objects from the API server. It is shared with other controllers and + // therefore the PVC objects in its store should be treated as immutable. + pvcLister corelisters.PersistentVolumeClaimLister + pvcsSynced kcache.InformerSynced + + // podLister is the shared Pod lister used to fetch Pod + // objects from the API server. It is shared with other controllers and + // therefore the Pod objects in its store should be treated as immutable. + podLister corelisters.PodLister + podSynced kcache.InformerSynced + + // podIndexer has the common PodPVC indexer indexer installed To + // limit iteration over pods to those of interest. + podIndexer cache.Indexer + + // recorder is used to record events in the API server + recorder record.EventRecorder + + queue workqueue.RateLimitingInterface +} + +// NewController creates an ephemeral volume controller. +func NewController( + kubeClient clientset.Interface, + podInformer coreinformers.PodInformer, + pvcInformer coreinformers.PersistentVolumeClaimInformer) (Controller, error) { + + ec := &ephemeralController{ + kubeClient: kubeClient, + podLister: podInformer.Lister(), + podIndexer: podInformer.Informer().GetIndexer(), + podSynced: podInformer.Informer().HasSynced, + pvcLister: pvcInformer.Lister(), + pvcsSynced: pvcInformer.Informer().HasSynced, + queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "ephemeral_volume"), + } + + eventBroadcaster := record.NewBroadcaster() + eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) + ec.recorder = eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "ephemeral_volume"}) + + podInformer.Informer().AddEventHandler(kcache.ResourceEventHandlerFuncs{ + AddFunc: ec.enqueuePod, + // The pod spec is immutable. Therefore the controller can ignore pod updates + // because there cannot be any changes that have to be copied into the generated + // PVC. + // Deletion of the PVC is handled through the owner reference and garbage collection. + // Therefore pod deletions also can be ignored. + }) + pvcInformer.Informer().AddEventHandler(kcache.ResourceEventHandlerFuncs{ + DeleteFunc: ec.onPVCDelete, + }) + if err := common.AddPodPVCIndexerIfNotPresent(ec.podIndexer); err != nil { + return nil, fmt.Errorf("Could not initialize pvc protection controller: %v", err) + } + + return ec, nil +} + +func (ec *ephemeralController) enqueuePod(obj interface{}) { + pod, ok := obj.(*v1.Pod) + if !ok { + return + } + + // Ignore pods which are already getting deleted. + if pod.DeletionTimestamp != nil { + return + } + + for _, vol := range pod.Spec.Volumes { + if vol.Ephemeral != nil { + // It has at least one ephemeral inline volume, work on it. + key, err := kcache.DeletionHandlingMetaNamespaceKeyFunc(pod) + if err != nil { + runtime.HandleError(fmt.Errorf("couldn't get key for object %#v: %v", pod, err)) + return + } + ec.queue.Add(key) + break + } + } +} + +func (ec *ephemeralController) onPVCDelete(obj interface{}) { + pvc, ok := obj.(*v1.PersistentVolumeClaim) + if !ok { + return + } + + // Someone deleted a PVC, either intentionally or + // accidentally. If there is a pod referencing it because of + // an ephemeral volume, then we should re-create the PVC. + // The common indexer does some prefiltering for us by + // limiting the list to those pods which reference + // the PVC. + objs, err := ec.podIndexer.ByIndex(common.PodPVCIndex, fmt.Sprintf("%s/%s", pvc.Namespace, pvc.Name)) + if err != nil { + runtime.HandleError(fmt.Errorf("listing pods from cache: %v", err)) + return + } + for _, obj := range objs { + ec.enqueuePod(obj) + } +} + +func (ec *ephemeralController) Run(workers int, stopCh <-chan struct{}) { + defer runtime.HandleCrash() + defer ec.queue.ShutDown() + + klog.Infof("Starting ephemeral volume controller") + defer klog.Infof("Shutting down ephemeral volume controller") + + if !cache.WaitForNamedCacheSync("ephemeral", stopCh, ec.podSynced, ec.pvcsSynced) { + return + } + + for i := 0; i < workers; i++ { + go wait.Until(ec.runWorker, time.Second, stopCh) + } + + <-stopCh +} + +func (ec *ephemeralController) runWorker() { + for ec.processNextWorkItem() { + } +} + +func (ec *ephemeralController) processNextWorkItem() bool { + key, shutdown := ec.queue.Get() + if shutdown { + return false + } + defer ec.queue.Done(key) + + err := ec.syncHandler(key.(string)) + if err == nil { + ec.queue.Forget(key) + return true + } + + runtime.HandleError(fmt.Errorf("%v failed with: %v", key, err)) + ec.queue.AddRateLimited(key) + + return true +} + +// syncHandler is invoked for each pod which might need to be processed. +// If an error is returned from this function, the pod will be requeued. +func (ec *ephemeralController) syncHandler(key string) error { + namespace, name, err := kcache.SplitMetaNamespaceKey(key) + if err != nil { + return err + } + pod, err := ec.podLister.Pods(namespace).Get(name) + if err != nil { + if errors.IsNotFound(err) { + klog.V(5).Infof("ephemeral: nothing to do for pod %s, it is gone", key) + return nil + } + klog.V(5).Infof("Error getting pod %s/%s (uid: %q) from informer : %v", pod.Namespace, pod.Name, pod.UID, err) + return err + } + + // Ignore pods which are already getting deleted. + if pod.DeletionTimestamp != nil { + klog.V(5).Infof("ephemeral: nothing to do for pod %s, it is marked for deletion", key) + return nil + } + + for _, vol := range pod.Spec.Volumes { + if err := ec.handleVolume(pod, vol); err != nil { + ec.recorder.Event(pod, v1.EventTypeWarning, events.FailedBinding, fmt.Sprintf("ephemeral volume %s: %v", vol.Name, err)) + return fmt.Errorf("pod %s, ephemeral volume %s: %v", key, vol.Name, err) + } + } + + return nil +} + +// handleEphemeralVolume is invoked for each volume of a pod. +func (ec *ephemeralController) handleVolume(pod *v1.Pod, vol v1.Volume) error { + klog.V(5).Infof("ephemeral: checking volume %s", vol.Name) + ephemeral := vol.Ephemeral + if ephemeral == nil { + return nil + } + + pvcName := pod.Name + "-" + vol.Name + pvc, err := ec.pvcLister.PersistentVolumeClaims(pod.Namespace).Get(pvcName) + if err != nil && !errors.IsNotFound(err) { + return err + } + if pvc != nil { + if metav1.IsControlledBy(pvc, pod) { + // Already created, nothing more to do. + klog.V(5).Infof("ephemeral: volume %s: PVC %s already created", vol.Name, pvcName) + return nil + } + return fmt.Errorf("PVC %q (uid: %q) was not created for the pod", + util.GetPersistentVolumeClaimQualifiedName(pvc), pvc.UID) + } + + // Create the PVC with pod as owner. + isTrue := true + pvc = &v1.PersistentVolumeClaim{ + ObjectMeta: metav1.ObjectMeta{ + Name: pvcName, + OwnerReferences: []metav1.OwnerReference{ + { + APIVersion: "v1", + Kind: "Pod", + Name: pod.Name, + UID: pod.UID, + Controller: &isTrue, + BlockOwnerDeletion: &isTrue, + }, + }, + Annotations: ephemeral.VolumeClaimTemplate.Annotations, + Labels: ephemeral.VolumeClaimTemplate.Labels, + }, + Spec: ephemeral.VolumeClaimTemplate.Spec, + } + _, err = ec.kubeClient.CoreV1().PersistentVolumeClaims(pod.Namespace).Create(context.TODO(), pvc, metav1.CreateOptions{}) + if err != nil { + return fmt.Errorf("create PVC %s: %v", pvcName, err) + } + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/doc.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/doc.go new file mode 100644 index 00000000000..ae45cbaad1d --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/ephemeral/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2020 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 ephemeral implements the controller part of +// https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1698-generic-ephemeral-volumes +// +// It was derived from the expand controller. +package ephemeral diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/events/event.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/events/event.go index 1229403043f..019bf59e369 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/events/event.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/events/event.go @@ -16,8 +16,8 @@ limitations under the License. package events +// volume relevant event reasons const ( - // volume relevant event reasons FailedBinding = "FailedBinding" VolumeMismatch = "VolumeMismatch" VolumeFailedRecycle = "VolumeFailedRecycle" @@ -30,5 +30,6 @@ const ( ProvisioningCleanupFailed = "ProvisioningCleanupFailed" ProvisioningSucceeded = "ProvisioningSucceeded" WaitForFirstConsumer = "WaitForFirstConsumer" + WaitForPodScheduled = "WaitForPodScheduled" ExternalExpanding = "ExternalExpanding" ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/expand/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/expand/BUILD index 90e05749087..cd418bba620 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/expand/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/expand/BUILD @@ -32,7 +32,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/expand/expand_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/expand/expand_controller.go index 73ce28e4cb1..c81b3fdc89e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/expand/expand_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/expand/expand_controller.go @@ -21,7 +21,7 @@ import ( "net" "time" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" "k8s.io/utils/mount" @@ -134,7 +134,7 @@ func NewExpandController( } eventBroadcaster := record.NewBroadcaster() - eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartStructuredLogging(0) eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) expc.recorder = eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "volume_expand"}) blkutil := volumepathhandler.NewBlockVolumePathHandler() diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/BUILD index bdcd9c36476..35584cc4406 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/BUILD @@ -18,6 +18,7 @@ go_library( deps = [ "//pkg/apis/core/v1/helper:go_default_library", "//pkg/controller:go_default_library", + "//pkg/controller/volume/common:go_default_library", "//pkg/controller/volume/events:go_default_library", "//pkg/controller/volume/persistentvolume/metrics:go_default_library", "//pkg/controller/volume/persistentvolume/util:go_default_library", @@ -55,7 +56,7 @@ go_library( "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/errors:go_default_library", "//staging/src/k8s.io/csi-translation-lib:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], @@ -105,7 +106,7 @@ go_test( "//staging/src/k8s.io/component-base/featuregate:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", "//staging/src/k8s.io/csi-translation-lib:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller.go index c67276d5442..61b1ed1f3ef 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller.go @@ -27,7 +27,6 @@ import ( storage "k8s.io/api/storage/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" utilfeature "k8s.io/apiserver/pkg/util/feature" clientset "k8s.io/client-go/kubernetes" @@ -41,6 +40,7 @@ import ( cloudprovider "k8s.io/cloud-provider" volerr "k8s.io/cloud-provider/volume/errors" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" + "k8s.io/kubernetes/pkg/controller/volume/common" "k8s.io/kubernetes/pkg/controller/volume/events" "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics" pvutil "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util" @@ -51,7 +51,7 @@ import ( "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/pkg/volume/util/recyclerclient" - "k8s.io/klog" + "k8s.io/klog/v2" ) // ================================================================== @@ -157,6 +157,7 @@ type PersistentVolumeController struct { classListerSynced cache.InformerSynced podLister corelisters.PodLister podListerSynced cache.InformerSynced + podIndexer cache.Indexer NodeLister corelisters.NodeLister NodeListerSynced cache.InformerSynced @@ -296,6 +297,31 @@ func checkVolumeSatisfyClaim(volume *v1.PersistentVolume, claim *v1.PersistentVo return nil } +// emitEventForUnboundDelayBindingClaim generates informative event for claim +// if it's in delay binding mode and not bound yet. +func (ctrl *PersistentVolumeController) emitEventForUnboundDelayBindingClaim(claim *v1.PersistentVolumeClaim) error { + reason := events.WaitForFirstConsumer + message := "waiting for first consumer to be created before binding" + podNames, err := ctrl.findNonScheduledPodsByPVC(claim) + if err != nil { + return err + } + if len(podNames) > 0 { + reason = events.WaitForPodScheduled + if len(podNames) > 1 { + // Although only one pod is taken into account in + // volume scheduling, more than one pods can reference + // the PVC at the same time. We can't know which pod is + // used in scheduling, all pods are included. + message = fmt.Sprintf("waiting for pods %s to be scheduled", strings.Join(podNames, ",")) + } else { + message = fmt.Sprintf("waiting for pod %s to be scheduled", podNames[0]) + } + } + ctrl.eventRecorder.Event(claim, v1.EventTypeNormal, reason, message) + return nil +} + // syncUnboundClaim is the main controller method to decide what to do with an // unbound claim. func (ctrl *PersistentVolumeController) syncUnboundClaim(claim *v1.PersistentVolumeClaim) error { @@ -320,7 +346,9 @@ func (ctrl *PersistentVolumeController) syncUnboundClaim(claim *v1.PersistentVol // OBSERVATION: pvc is "Pending", will retry switch { case delayBinding && !pvutil.IsDelayBindingProvisioning(claim): - ctrl.eventRecorder.Event(claim, v1.EventTypeNormal, events.WaitForFirstConsumer, "waiting for first consumer to be created before binding") + if err = ctrl.emitEventForUnboundDelayBindingClaim(claim); err != nil { + return err + } case v1helper.GetPersistentVolumeClaimClass(claim) != "": if err = ctrl.provisionClaim(claim); err != nil { return err @@ -415,6 +443,8 @@ func (ctrl *PersistentVolumeController) syncUnboundClaim(claim *v1.PersistentVol // OBSERVATION: pvc is "Pending", pv is "Bound" if !metav1.HasAnnotation(claim.ObjectMeta, pvutil.AnnBoundByController) { klog.V(4).Infof("synchronizing unbound PersistentVolumeClaim[%s]: volume already bound to different claim by user, will retry later", claimToClaimKey(claim)) + claimMsg := fmt.Sprintf("volume %q already bound to a different claim.", volume.Name) + ctrl.eventRecorder.Event(claim, v1.EventTypeWarning, events.FailedBinding, claimMsg) // User asked for a specific PV, retry later if _, err = ctrl.updateClaimStatus(claim, v1.ClaimPending, nil); err != nil { return err @@ -424,6 +454,9 @@ func (ctrl *PersistentVolumeController) syncUnboundClaim(claim *v1.PersistentVol // This should never happen because someone had to remove // AnnBindCompleted annotation on the claim. klog.V(4).Infof("synchronizing unbound PersistentVolumeClaim[%s]: volume already bound to different claim %q by controller, THIS SHOULD NEVER HAPPEN", claimToClaimKey(claim), claimrefToClaimKey(volume.Spec.ClaimRef)) + claimMsg := fmt.Sprintf("volume %q already bound to a different claim.", volume.Name) + ctrl.eventRecorder.Event(claim, v1.EventTypeWarning, events.FailedBinding, claimMsg) + return fmt.Errorf("Invalid binding of claim %q to volume %q: volume already claimed by %q", claimToClaimKey(claim), claim.Spec.VolumeName, claimrefToClaimKey(volume.Spec.ClaimRef)) } } @@ -604,12 +637,15 @@ func (ctrl *PersistentVolumeController) syncVolume(volume *v1.PersistentVolume) return err } } - if err = ctrl.reclaimVolume(volume); err != nil { // Release failed, we will fall back into the same condition // in the next call to this method return err } + if volume.Spec.PersistentVolumeReclaimPolicy == v1.PersistentVolumeReclaimRetain { + // volume is being retained, it references a claim that does not exist now. + klog.V(4).Infof("PersistentVolume[%s] references a claim %q (%s) that is not found", volume.Name, claimrefToClaimKey(volume.Spec.ClaimRef), volume.Spec.ClaimRef.UID) + } return nil } else if claim.Spec.VolumeName == "" { if pvutil.CheckVolumeModeMismatches(&claim.Spec, &volume.Spec) { @@ -1286,32 +1322,61 @@ func (ctrl *PersistentVolumeController) isVolumeReleased(volume *v1.PersistentVo return true, nil } -// isVolumeUsed returns list of pods that use given PV. +func (ctrl *PersistentVolumeController) findPodsByPVCKey(key string) ([]*v1.Pod, error) { + pods := []*v1.Pod{} + objs, err := ctrl.podIndexer.ByIndex(common.PodPVCIndex, key) + if err != nil { + return pods, err + } + for _, obj := range objs { + pod, ok := obj.(*v1.Pod) + if !ok { + continue + } + pods = append(pods, pod) + } + return pods, err +} + +// isVolumeUsed returns list of active pods that use given PV. func (ctrl *PersistentVolumeController) isVolumeUsed(pv *v1.PersistentVolume) ([]string, bool, error) { if pv.Spec.ClaimRef == nil { return nil, false, nil } - claimName := pv.Spec.ClaimRef.Name - podNames := sets.NewString() - pods, err := ctrl.podLister.Pods(pv.Spec.ClaimRef.Namespace).List(labels.Everything()) + pvcKey := fmt.Sprintf("%s/%s", pv.Spec.ClaimRef.Namespace, pv.Spec.ClaimRef.Name) + pods, err := ctrl.findPodsByPVCKey(pvcKey) if err != nil { - return nil, false, fmt.Errorf("error listing pods: %s", err) + return nil, false, fmt.Errorf("error finding pods by pvc %q: %s", pvcKey, err) } for _, pod := range pods { if util.IsPodTerminated(pod, pod.Status) { continue } - for i := range pod.Spec.Volumes { - usedPV := &pod.Spec.Volumes[i] - if usedPV.PersistentVolumeClaim != nil && usedPV.PersistentVolumeClaim.ClaimName == claimName { - podNames.Insert(pod.Namespace + "/" + pod.Name) - } - } + podNames.Insert(pod.Namespace + "/" + pod.Name) } return podNames.List(), podNames.Len() != 0, nil } +// findNonScheduledPodsByPVC returns list of non-scheduled active pods that reference given PVC. +func (ctrl *PersistentVolumeController) findNonScheduledPodsByPVC(pvc *v1.PersistentVolumeClaim) ([]string, error) { + pvcKey := fmt.Sprintf("%s/%s", pvc.Namespace, pvc.Name) + pods, err := ctrl.findPodsByPVCKey(pvcKey) + if err != nil { + return nil, err + } + podNames := []string{} + for _, pod := range pods { + if util.IsPodTerminated(pod, pod.Status) { + continue + } + if len(pod.Spec.NodeName) == 0 { + podNames = append(podNames, pod.Name) + } + } + return podNames, nil +} + // doDeleteVolume finds appropriate delete plugin and deletes given volume, returning // the volume plugin name. Also, it returns 'true', when the volume was deleted and // 'false' when the volume cannot be deleted because the deleter is external. No diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller_base.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller_base.go index 12e18d70ad0..5747db35fd4 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller_base.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller_base.go @@ -41,13 +41,14 @@ import ( cloudprovider "k8s.io/cloud-provider" csitrans "k8s.io/csi-translation-lib" "k8s.io/kubernetes/pkg/controller" + "k8s.io/kubernetes/pkg/controller/volume/common" "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics" pvutil "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util" "k8s.io/kubernetes/pkg/util/goroutinemap" vol "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/csimigration" - "k8s.io/klog" + "k8s.io/klog/v2" ) // This file contains the controller base functionality, i.e. framework to @@ -76,7 +77,7 @@ func NewController(p ControllerParameters) (*PersistentVolumeController, error) eventRecorder := p.EventRecorder if eventRecorder == nil { broadcaster := record.NewBroadcaster() - broadcaster.StartLogging(klog.Infof) + broadcaster.StartStructuredLogging(0) broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: p.KubeClient.CoreV1().Events("")}) eventRecorder = broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "persistentvolume-controller"}) } @@ -126,10 +127,17 @@ func NewController(p ControllerParameters) (*PersistentVolumeController, error) controller.classLister = p.ClassInformer.Lister() controller.classListerSynced = p.ClassInformer.Informer().HasSynced controller.podLister = p.PodInformer.Lister() + controller.podIndexer = p.PodInformer.Informer().GetIndexer() controller.podListerSynced = p.PodInformer.Informer().HasSynced controller.NodeLister = p.NodeInformer.Lister() controller.NodeListerSynced = p.NodeInformer.Informer().HasSynced + // This custom indexer will index pods by its PVC keys. Then we don't need + // to iterate all pods every time to find pods which reference given PVC. + if err := common.AddPodPVCIndexerIfNotPresent(controller.podIndexer); err != nil { + return nil, fmt.Errorf("Could not initialize attach detach controller: %v", err) + } + csiTranslator := csitrans.New() controller.translator = csiTranslator controller.csiMigratedPluginManager = csimigration.NewPluginManager(csiTranslator) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/volume_host.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/volume_host.go index 3c9bc3708c8..d75333f63d3 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/volume_host.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/volume_host.go @@ -20,7 +20,7 @@ import ( "fmt" "net" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" "k8s.io/utils/mount" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/pvcprotection/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/pvcprotection/BUILD index 3a9d6b92ece..aea680b0cc2 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/pvcprotection/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/pvcprotection/BUILD @@ -6,13 +6,13 @@ go_library( importpath = "k8s.io/kubernetes/pkg/controller/volume/pvcprotection", visibility = ["//visibility:public"], deps = [ + "//pkg/controller/volume/common:go_default_library", "//pkg/controller/volume/protectionutil:go_default_library", "//pkg/util/slice:go_default_library", "//pkg/volume/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", @@ -21,7 +21,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -43,7 +43,7 @@ go_test( "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/pvcprotection/pvc_protection_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/pvcprotection/pvc_protection_controller.go index 19b3740b003..f3c9f2b4f72 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/pvcprotection/pvc_protection_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/pvcprotection/pvc_protection_controller.go @@ -24,7 +24,6 @@ import ( v1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" coreinformers "k8s.io/client-go/informers/core/v1" @@ -33,7 +32,8 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" "k8s.io/component-base/metrics/prometheus/ratelimiter" - "k8s.io/klog" + "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/controller/volume/common" "k8s.io/kubernetes/pkg/controller/volume/protectionutil" "k8s.io/kubernetes/pkg/util/slice" volumeutil "k8s.io/kubernetes/pkg/volume/util" @@ -49,19 +49,24 @@ type Controller struct { podLister corelisters.PodLister podListerSynced cache.InformerSynced + podIndexer cache.Indexer queue workqueue.RateLimitingInterface // allows overriding of StorageObjectInUseProtection feature Enabled/Disabled for testing storageObjectInUseProtectionEnabled bool + + // allows overriding of GenericEphemeralVolume feature Enabled/Disabled for testing + genericEphemeralVolumeFeatureEnabled bool } // NewPVCProtectionController returns a new instance of PVCProtectionController. -func NewPVCProtectionController(pvcInformer coreinformers.PersistentVolumeClaimInformer, podInformer coreinformers.PodInformer, cl clientset.Interface, storageObjectInUseProtectionFeatureEnabled bool) *Controller { +func NewPVCProtectionController(pvcInformer coreinformers.PersistentVolumeClaimInformer, podInformer coreinformers.PodInformer, cl clientset.Interface, storageObjectInUseProtectionFeatureEnabled, genericEphemeralVolumeFeatureEnabled bool) (*Controller, error) { e := &Controller{ - client: cl, - queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "pvcprotection"), - storageObjectInUseProtectionEnabled: storageObjectInUseProtectionFeatureEnabled, + client: cl, + queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "pvcprotection"), + storageObjectInUseProtectionEnabled: storageObjectInUseProtectionFeatureEnabled, + genericEphemeralVolumeFeatureEnabled: genericEphemeralVolumeFeatureEnabled, } if cl != nil && cl.CoreV1().RESTClient().GetRateLimiter() != nil { ratelimiter.RegisterMetricAndTrackRateLimiterUsage("persistentvolumeclaim_protection_controller", cl.CoreV1().RESTClient().GetRateLimiter()) @@ -78,6 +83,10 @@ func NewPVCProtectionController(pvcInformer coreinformers.PersistentVolumeClaimI e.podLister = podInformer.Lister() e.podListerSynced = podInformer.Informer().HasSynced + e.podIndexer = podInformer.Informer().GetIndexer() + if err := common.AddIndexerIfNotPresent(e.podIndexer, common.PodPVCIndex, common.PodPVCIndexFunc(genericEphemeralVolumeFeatureEnabled)); err != nil { + return nil, fmt.Errorf("Could not initialize pvc protection controller: %v", err) + } podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { e.podAddedDeletedUpdated(nil, obj, false) @@ -90,7 +99,7 @@ func NewPVCProtectionController(pvcInformer coreinformers.PersistentVolumeClaimI }, }) - return e + return e, nil } // Run runs the controller goroutines. @@ -231,15 +240,34 @@ func (c *Controller) isBeingUsed(pvc *v1.PersistentVolumeClaim) (bool, error) { func (c *Controller) askInformer(pvc *v1.PersistentVolumeClaim) (bool, error) { klog.V(4).Infof("Looking for Pods using PVC %s/%s in the Informer's cache", pvc.Namespace, pvc.Name) - pods, err := c.podLister.Pods(pvc.Namespace).List(labels.Everything()) + // The indexer is used to find pods which might use the PVC. + objs, err := c.podIndexer.ByIndex(common.PodPVCIndex, fmt.Sprintf("%s/%s", pvc.Namespace, pvc.Name)) if err != nil { return false, fmt.Errorf("cache-based list of pods failed while processing %s/%s: %s", pvc.Namespace, pvc.Name, err.Error()) } - - for _, pod := range pods { - if podUsesPVC(pod, pvc.Name) { - return true, nil + for _, obj := range objs { + pod, ok := obj.(*v1.Pod) + if !ok { + continue } + + if c.genericEphemeralVolumeFeatureEnabled { + // We still need to look at each volume: that's redundant for volume.PersistentVolumeClaim, + // but for volume.Ephemeral we need to be sure that this particular PVC is the one + // created for the ephemeral volume. + if c.podUsesPVC(pod, pvc) { + return true, nil + } + continue + + } + + // This is the traditional behavior without GenericEphemeralVolume enabled. + if pod.Spec.NodeName == "" { + continue + } + // found a pod using this PVC + return true, nil } klog.V(4).Infof("No Pod using PVC %s/%s was found in the Informer's cache", pvc.Namespace, pvc.Name) @@ -255,7 +283,7 @@ func (c *Controller) askAPIServer(pvc *v1.PersistentVolumeClaim) (bool, error) { } for _, pod := range podsList.Items { - if podUsesPVC(&pod, pvc.Name) { + if c.podUsesPVC(&pod, pvc) { return true, nil } } @@ -264,13 +292,14 @@ func (c *Controller) askAPIServer(pvc *v1.PersistentVolumeClaim) (bool, error) { return false, nil } -func podUsesPVC(pod *v1.Pod, pvc string) bool { +func (c *Controller) podUsesPVC(pod *v1.Pod, pvc *v1.PersistentVolumeClaim) bool { // Check whether pvc is used by pod only if pod is scheduled, because // kubelet sees pods after they have been scheduled and it won't allow // starting a pod referencing a PVC with a non-nil deletionTimestamp. if pod.Spec.NodeName != "" { for _, volume := range pod.Spec.Volumes { - if volume.PersistentVolumeClaim != nil && volume.PersistentVolumeClaim.ClaimName == pvc { + if volume.PersistentVolumeClaim != nil && volume.PersistentVolumeClaim.ClaimName == pvc.Name || + c.genericEphemeralVolumeFeatureEnabled && !podIsShutDown(pod) && volume.Ephemeral != nil && pod.Name+"-"+volume.Name == pvc.Name && metav1.IsControlledBy(pvc, pod) { klog.V(2).Infof("Pod %s/%s uses PVC %s", pod.Namespace, pod.Name, pvc) return true } @@ -279,6 +308,43 @@ func podUsesPVC(pod *v1.Pod, pvc string) bool { return false } +// podIsShutDown returns true if kubelet is done with the pod or +// it was force-deleted. +func podIsShutDown(pod *v1.Pod) bool { + // The following text is based on how pod shutdown was + // initially described to me. During PR review, it was pointed out + // that this is not correct: "deleteGracePeriodSeconds tells + // kubelet when it can start force terminating the + // containers. Volume teardown only starts after containers + // are termianted. So there is an additional time period after + // the grace period where volume teardown is happening." + // + // TODO (https://github.com/kubernetes/enhancements/issues/1698#issuecomment-655344680): + // investigate what kubelet really does and if necessary, + // add some other signal for "kubelet is done". For now the check + // is used only for ephemeral volumes, because it + // is needed to avoid the deadlock. + // + // A pod that has a deletionTimestamp and a zero + // deletionGracePeriodSeconds + // a) has been processed by kubelet and is ready for deletion or + // b) was force-deleted. + // + // It's now just waiting for garbage collection. We could wait + // for it to actually get removed, but that may be blocked by + // finalizers for the pod and thus get delayed. + // + // Worse, it is possible that there is a cyclic dependency + // (pod finalizer waits for PVC to get removed, PVC protection + // controller waits for pod to get removed). By considering + // the PVC unused in this case, we allow the PVC to get + // removed and break such a cycle. + // + // Therefore it is better to proceed with PVC removal, + // which is safe (case a) and/or desirable (case b). + return pod.DeletionTimestamp != nil && pod.DeletionGracePeriodSeconds != nil && *pod.DeletionGracePeriodSeconds == 0 +} + // pvcAddedUpdated reacts to pvc added/updated events func (c *Controller) pvcAddedUpdated(obj interface{}) { pvc, ok := obj.(*v1.PersistentVolumeClaim) @@ -344,8 +410,11 @@ func (c *Controller) enqueuePVCs(pod *v1.Pod, deleted bool) { // Enqueue all PVCs that the pod uses for _, volume := range pod.Spec.Volumes { - if volume.PersistentVolumeClaim != nil { + switch { + case volume.PersistentVolumeClaim != nil: c.queue.Add(pod.Namespace + "/" + volume.PersistentVolumeClaim.ClaimName) + case c.genericEphemeralVolumeFeatureEnabled && volume.Ephemeral != nil: + c.queue.Add(pod.Namespace + "/" + pod.Name + "-" + volume.Name) } } } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/pvprotection/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/pvprotection/BUILD index 81e1ae8e68c..f2b41abc35d 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/pvprotection/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/pvprotection/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/component-base/metrics/prometheus/ratelimiter:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -55,6 +55,6 @@ go_test( "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/pvprotection/pv_protection_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/pvprotection/pv_protection_controller.go index 62fad1ae198..590c8ee44c6 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/pvprotection/pv_protection_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/pvprotection/pv_protection_controller.go @@ -32,7 +32,7 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" "k8s.io/component-base/metrics/prometheus/ratelimiter" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller/volume/protectionutil" "k8s.io/kubernetes/pkg/util/slice" volumeutil "k8s.io/kubernetes/pkg/volume/util" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/BUILD index 59f4a3558bd..6525c355ecd 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/BUILD @@ -5,7 +5,6 @@ go_library( srcs = [ "scheduler_assume_cache.go", "scheduler_binder.go", - "scheduler_binder_cache.go", "scheduler_binder_fake.go", ], importpath = "k8s.io/kubernetes/pkg/controller/volume/scheduling", @@ -18,6 +17,8 @@ go_library( "//pkg/volume/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", + "//staging/src/k8s.io/api/storage/v1alpha1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", @@ -27,12 +28,15 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/informers/storage/v1:go_default_library", + "//staging/src/k8s.io/client-go/informers/storage/v1alpha1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/listers/storage/v1:go_default_library", + "//staging/src/k8s.io/client-go/listers/storage/v1alpha1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/csi-translation-lib:go_default_library", "//staging/src/k8s.io/csi-translation-lib/plugins:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -40,7 +44,6 @@ go_test( name = "go_default_test", srcs = [ "scheduler_assume_cache_test.go", - "scheduler_binder_cache_test.go", "scheduler_binder_test.go", ], embed = [":go_default_library"], @@ -51,6 +54,7 @@ go_test( "//pkg/features:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", + "//staging/src/k8s.io/api/storage/v1alpha1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", @@ -61,11 +65,12 @@ go_test( "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/informers/storage/v1:go_default_library", + "//staging/src/k8s.io/client-go/informers/storage/v1alpha1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/metrics/metrics.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/metrics/metrics.go index 808fd6d5783..1ad451bbfe2 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/metrics/metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/metrics/metrics.go @@ -38,11 +38,12 @@ var ( // VolumeSchedulingStageLatency tracks the latency of volume scheduling operations. VolumeSchedulingStageLatency = metrics.NewHistogramVec( &metrics.HistogramOpts{ - Subsystem: VolumeSchedulerSubsystem, - Name: "scheduling_duration_seconds", - Help: "Volume scheduling stage latency", - Buckets: metrics.ExponentialBuckets(1000, 2, 15), - StabilityLevel: metrics.ALPHA, + Subsystem: VolumeSchedulerSubsystem, + Name: "scheduling_duration_seconds", + Help: "Volume scheduling stage latency (Deprecated since 1.19.0)", + Buckets: metrics.ExponentialBuckets(1000, 2, 15), + StabilityLevel: metrics.ALPHA, + DeprecatedVersion: "1.19.0", }, []string{"operation"}, ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_assume_cache.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_assume_cache.go index b79e9cb11a2..355da12aab6 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_assume_cache.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_assume_cache.go @@ -21,9 +21,9 @@ import ( "strconv" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/client-go/tools/cache" ) @@ -134,7 +134,11 @@ func NewAssumeCache(informer cache.SharedIndexInformer, description, indexName s indexFunc: indexFunc, indexName: indexName, } - c.store = cache.NewIndexer(objInfoKeyFunc, cache.Indexers{indexName: c.objInfoIndexFunc}) + indexers := cache.Indexers{} + if indexName != "" && indexFunc != nil { + indexers[indexName] = c.objInfoIndexFunc + } + c.store = cache.NewIndexer(objInfoKeyFunc, indexers) // Unit tests don't use informers if informer != nil { @@ -422,7 +426,7 @@ type pvcAssumeCache struct { // NewPVCAssumeCache creates a PVC assume cache. func NewPVCAssumeCache(informer cache.SharedIndexInformer) PVCAssumeCache { - return &pvcAssumeCache{NewAssumeCache(informer, "v1.PersistentVolumeClaim", "namespace", cache.MetaNamespaceIndexFunc)} + return &pvcAssumeCache{NewAssumeCache(informer, "v1.PersistentVolumeClaim", "", nil)} } func (c *pvcAssumeCache) GetPVC(pvcKey string) (*v1.PersistentVolumeClaim, error) { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder.go index f53f7567fae..10c4caccc13 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder.go @@ -25,6 +25,8 @@ import ( v1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" + storagev1alpha1 "k8s.io/api/storage/v1alpha1" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" @@ -33,11 +35,14 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" coreinformers "k8s.io/client-go/informers/core/v1" storageinformers "k8s.io/client-go/informers/storage/v1" + storageinformersv1alpha1 "k8s.io/client-go/informers/storage/v1alpha1" clientset "k8s.io/client-go/kubernetes" + corelisters "k8s.io/client-go/listers/core/v1" storagelisters "k8s.io/client-go/listers/storage/v1" + storagelistersv1alpha1 "k8s.io/client-go/listers/storage/v1alpha1" csitrans "k8s.io/csi-translation-lib" csiplugins "k8s.io/csi-translation-lib/plugins" - "k8s.io/klog" + "k8s.io/klog/v2" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" pvutil "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util" "k8s.io/kubernetes/pkg/controller/volume/scheduling/metrics" @@ -61,8 +66,28 @@ const ( ErrReasonBindConflict ConflictReason = "node(s) didn't find available persistent volumes to bind" // ErrReasonNodeConflict is used for VolumeNodeAffinityConflict predicate error. ErrReasonNodeConflict ConflictReason = "node(s) had volume node affinity conflict" + // ErrReasonNotEnoughSpace is used when a pod cannot start on a node because not enough storage space is available. + ErrReasonNotEnoughSpace = "node(s) did not have enough free storage" ) +// BindingInfo holds a binding between PV and PVC. +type BindingInfo struct { + // PVC that needs to be bound + pvc *v1.PersistentVolumeClaim + + // Proposed PV to bind to this PVC + pv *v1.PersistentVolume +} + +// PodVolumes holds pod's volumes information used in volume scheduling. +type PodVolumes struct { + // StaticBindings are binding decisions for PVCs which can be bound to + // pre-provisioned static PVs. + StaticBindings []*BindingInfo + // DynamicProvisions are PVCs that require dynamic provisioning + DynamicProvisions []*v1.PersistentVolumeClaim +} + // InTreeToCSITranslator contains methods required to check migratable status // and perform translations from InTree PV's to CSI type InTreeToCSITranslator interface { @@ -71,32 +96,39 @@ type InTreeToCSITranslator interface { TranslateInTreePVToCSI(pv *v1.PersistentVolume) (*v1.PersistentVolume, error) } -// SchedulerVolumeBinder is used by the scheduler to handle PVC/PV binding -// and dynamic provisioning. The binding decisions are integrated into the pod scheduling -// workflow so that the PV NodeAffinity is also considered along with the pod's other -// scheduling requirements. +// SchedulerVolumeBinder is used by the scheduler VolumeBinding plugin to +// handle PVC/PV binding and dynamic provisioning. The binding decisions are +// integrated into the pod scheduling workflow so that the PV NodeAffinity is +// also considered along with the pod's other scheduling requirements. // -// This integrates into the existing default scheduler workflow as follows: +// This integrates into the existing scheduler workflow as follows: // 1. The scheduler takes a Pod off the scheduler queue and processes it serially: -// a. Invokes all predicate functions, parallelized across nodes. FindPodVolumes() is invoked here. -// b. Invokes all priority functions. Future/TBD -// c. Selects the best node for the Pod. -// d. Cache the node selection for the Pod. AssumePodVolumes() is invoked here. +// a. Invokes all pre-filter plugins for the pod. GetPodVolumes() is invoked +// here, pod volume information will be saved in current scheduling cycle state for later use. +// b. Invokes all filter plugins, parallelized across nodes. FindPodVolumes() is invoked here. +// c. Invokes all score plugins. Future/TBD +// d. Selects the best node for the Pod. +// e. Invokes all reserve plugins. AssumePodVolumes() is invoked here. // i. If PVC binding is required, cache in-memory only: // * For manual binding: update PV objects for prebinding to the corresponding PVCs. // * For dynamic provisioning: update PVC object with a selected node from c) // * For the pod, which PVCs and PVs need API updates. // ii. Afterwards, the main scheduler caches the Pod->Node binding in the scheduler's pod cache, // This is handled in the scheduler and not here. -// e. Asynchronously bind volumes and pod in a separate goroutine -// i. BindPodVolumes() is called first. It makes all the necessary API updates and waits for +// f. Asynchronously bind volumes and pod in a separate goroutine +// i. BindPodVolumes() is called first in PreBind phase. It makes all the necessary API updates and waits for // PV controller to fully bind and provision the PVCs. If binding fails, the Pod is sent // back through the scheduler. // ii. After BindPodVolumes() is complete, then the scheduler does the final Pod->Node binding. -// 2. Once all the assume operations are done in d), the scheduler processes the next Pod in the scheduler queue +// 2. Once all the assume operations are done in e), the scheduler processes the next Pod in the scheduler queue // while the actual binding operation occurs in the background. type SchedulerVolumeBinder interface { - // FindPodVolumes checks if all of a Pod's PVCs can be satisfied by the node. + // GetPodVolumes returns a pod's PVCs separated into bound, unbound with delayed binding (including provisioning) + // and unbound with immediate binding (including prebound) + GetPodVolumes(pod *v1.Pod) (boundClaims, unboundClaimsDelayBinding, unboundClaimsImmediate []*v1.PersistentVolumeClaim, err error) + + // FindPodVolumes checks if all of a Pod's PVCs can be satisfied by the + // node and returns pod's volumes information. // // If a PVC is bound, it checks if the PV's NodeAffinity matches the Node. // Otherwise, it tries to find an available PV to bind to the PVC. @@ -104,8 +136,11 @@ type SchedulerVolumeBinder interface { // It returns an error when something went wrong or a list of reasons why the node is // (currently) not usable for the pod. // - // This function is called by the volume binding scheduler predicate and can be called in parallel - FindPodVolumes(pod *v1.Pod, node *v1.Node) (reasons ConflictReasons, err error) + // If the CSIStorageCapacity feature is enabled, then it also checks for sufficient storage + // for volumes that still need to be created. + // + // This function is called by the scheduler VolumeBinding plugin and can be called in parallel + FindPodVolumes(pod *v1.Pod, boundClaims, claimsToBind []*v1.PersistentVolumeClaim, node *v1.Node) (podVolumes *PodVolumes, reasons ConflictReasons, err error) // AssumePodVolumes will: // 1. Take the PV matches for unbound PVCs and update the PV cache assuming @@ -115,9 +150,11 @@ type SchedulerVolumeBinder interface { // // It returns true if all volumes are fully bound // - // This function will modify assumedPod with the node name. // This function is called serially. - AssumePodVolumes(assumedPod *v1.Pod, nodeName string) (allFullyBound bool, err error) + AssumePodVolumes(assumedPod *v1.Pod, nodeName string, podVolumes *PodVolumes) (allFullyBound bool, err error) + + // RevertAssumedPodVolumes will revert assumed PV and PVC cache. + RevertAssumedPodVolumes(podVolumes *PodVolumes) // BindPodVolumes will: // 1. Initiate the volume binding by making the API call to prebind the PV @@ -127,75 +164,77 @@ type SchedulerVolumeBinder interface { // 3. Wait for PVCs to be completely bound by the PV controller // // This function can be called in parallel. - BindPodVolumes(assumedPod *v1.Pod) error - - // GetBindingsCache returns the cache used (if any) to store volume binding decisions. - GetBindingsCache() PodBindingCache - - // DeletePodBindings will delete pod's bindingDecisions in podBindingCache. - DeletePodBindings(pod *v1.Pod) + BindPodVolumes(assumedPod *v1.Pod, podVolumes *PodVolumes) error } type volumeBinder struct { - kubeClient clientset.Interface - classLister storagelisters.StorageClassLister + kubeClient clientset.Interface - nodeInformer coreinformers.NodeInformer - csiNodeInformer storageinformers.CSINodeInformer - pvcCache PVCAssumeCache - pvCache PVAssumeCache + classLister storagelisters.StorageClassLister + podLister corelisters.PodLister + nodeLister corelisters.NodeLister + csiNodeLister storagelisters.CSINodeLister - // Stores binding decisions that were made in FindPodVolumes for use in AssumePodVolumes. - // AssumePodVolumes modifies the bindings again for use in BindPodVolumes. - podBindingCache PodBindingCache + pvcCache PVCAssumeCache + pvCache PVAssumeCache // Amount of time to wait for the bind operation to succeed bindTimeout time.Duration translator InTreeToCSITranslator + + capacityCheckEnabled bool + csiDriverLister storagelisters.CSIDriverLister + csiStorageCapacityLister storagelistersv1alpha1.CSIStorageCapacityLister +} + +// CapacityCheck contains additional parameters for NewVolumeBinder that +// are only needed when checking volume sizes against available storage +// capacity is desired. +type CapacityCheck struct { + CSIDriverInformer storageinformers.CSIDriverInformer + CSIStorageCapacityInformer storageinformersv1alpha1.CSIStorageCapacityInformer } // NewVolumeBinder sets up all the caches needed for the scheduler to make volume binding decisions. +// +// capacityCheck determines whether storage capacity is checked (CSIStorageCapacity feature). func NewVolumeBinder( kubeClient clientset.Interface, + podInformer coreinformers.PodInformer, nodeInformer coreinformers.NodeInformer, csiNodeInformer storageinformers.CSINodeInformer, pvcInformer coreinformers.PersistentVolumeClaimInformer, pvInformer coreinformers.PersistentVolumeInformer, storageClassInformer storageinformers.StorageClassInformer, + capacityCheck *CapacityCheck, bindTimeout time.Duration) SchedulerVolumeBinder { - b := &volumeBinder{ - kubeClient: kubeClient, - classLister: storageClassInformer.Lister(), - nodeInformer: nodeInformer, - csiNodeInformer: csiNodeInformer, - pvcCache: NewPVCAssumeCache(pvcInformer.Informer()), - pvCache: NewPVAssumeCache(pvInformer.Informer()), - podBindingCache: NewPodBindingCache(), - bindTimeout: bindTimeout, - translator: csitrans.New(), + kubeClient: kubeClient, + podLister: podInformer.Lister(), + classLister: storageClassInformer.Lister(), + nodeLister: nodeInformer.Lister(), + csiNodeLister: csiNodeInformer.Lister(), + pvcCache: NewPVCAssumeCache(pvcInformer.Informer()), + pvCache: NewPVAssumeCache(pvInformer.Informer()), + bindTimeout: bindTimeout, + translator: csitrans.New(), + } + + if capacityCheck != nil { + b.capacityCheckEnabled = true + b.csiDriverLister = capacityCheck.CSIDriverInformer.Lister() + b.csiStorageCapacityLister = capacityCheck.CSIStorageCapacityInformer.Lister() } return b } -func (b *volumeBinder) GetBindingsCache() PodBindingCache { - return b.podBindingCache -} - -// DeletePodBindings will delete pod's bindingDecisions in podBindingCache. -func (b *volumeBinder) DeletePodBindings(pod *v1.Pod) { - cache := b.podBindingCache - if pod != nil { - cache.DeleteBindings(pod) - } -} - -// FindPodVolumes caches the matching PVs and PVCs to provision per node in podBindingCache. -// This method intentionally takes in a *v1.Node object instead of using volumebinder.nodeInformer. -// That's necessary because some operations will need to pass in to the predicate fake node objects. -func (b *volumeBinder) FindPodVolumes(pod *v1.Pod, node *v1.Node) (reasons ConflictReasons, err error) { +// FindPodVolumes finds the matching PVs for PVCs and nodes to provision PVs +// for the given pod and node. If the node does not fit, confilict reasons are +// returned. +func (b *volumeBinder) FindPodVolumes(pod *v1.Pod, boundClaims, claimsToBind []*v1.PersistentVolumeClaim, node *v1.Node) (podVolumes *PodVolumes, reasons ConflictReasons, err error) { + podVolumes = &PodVolumes{} podName := getPodName(pod) // Warning: Below log needs high verbosity as it can be printed several times (#60933). @@ -206,6 +245,7 @@ func (b *volumeBinder) FindPodVolumes(pod *v1.Pod, node *v1.Node) (reasons Confl // returns without an error. unboundVolumesSatisfied := true boundVolumesSatisfied := true + sufficientStorage := true defer func() { if err != nil { return @@ -216,6 +256,9 @@ func (b *volumeBinder) FindPodVolumes(pod *v1.Pod, node *v1.Node) (reasons Confl if !unboundVolumesSatisfied { reasons = append(reasons, ErrReasonBindConflict) } + if !sufficientStorage { + reasons = append(reasons, ErrReasonNotEnoughSpace) + } }() start := time.Now() @@ -227,45 +270,27 @@ func (b *volumeBinder) FindPodVolumes(pod *v1.Pod, node *v1.Node) (reasons Confl }() var ( - matchedBindings []*bindingInfo - provisionedClaims []*v1.PersistentVolumeClaim + staticBindings []*BindingInfo + dynamicProvisions []*v1.PersistentVolumeClaim ) defer func() { - // We recreate bindings for each new schedule loop. - if len(matchedBindings) == 0 && len(provisionedClaims) == 0 { - // Clear cache if no claims to bind or provision for this node. - b.podBindingCache.ClearBindings(pod, node.Name) - return - } // Although we do not distinguish nil from empty in this function, for // easier testing, we normalize empty to nil. - if len(matchedBindings) == 0 { - matchedBindings = nil + if len(staticBindings) == 0 { + staticBindings = nil } - if len(provisionedClaims) == 0 { - provisionedClaims = nil + if len(dynamicProvisions) == 0 { + dynamicProvisions = nil } - // Mark cache with all matched and provisioned claims for this node - b.podBindingCache.UpdateBindings(pod, node.Name, matchedBindings, provisionedClaims) + podVolumes.StaticBindings = staticBindings + podVolumes.DynamicProvisions = dynamicProvisions }() - // The pod's volumes need to be processed in one call to avoid the race condition where - // volumes can get bound/provisioned in between calls. - boundClaims, claimsToBind, unboundClaimsImmediate, err := b.getPodVolumes(pod) - if err != nil { - return nil, err - } - - // Immediate claims should be bound - if len(unboundClaimsImmediate) > 0 { - return nil, fmt.Errorf("pod has unbound immediate PersistentVolumeClaims") - } - // Check PV node affinity on bound volumes if len(boundClaims) > 0 { boundVolumesSatisfied, err = b.checkBoundClaims(boundClaims, node, podName) if err != nil { - return nil, err + return } } @@ -293,18 +318,19 @@ func (b *volumeBinder) FindPodVolumes(pod *v1.Pod, node *v1.Node) (reasons Confl // Find matching volumes if len(claimsToFindMatching) > 0 { var unboundClaims []*v1.PersistentVolumeClaim - unboundVolumesSatisfied, matchedBindings, unboundClaims, err = b.findMatchingVolumes(pod, claimsToFindMatching, node) + unboundVolumesSatisfied, staticBindings, unboundClaims, err = b.findMatchingVolumes(pod, claimsToFindMatching, node) if err != nil { - return nil, err + return } claimsToProvision = append(claimsToProvision, unboundClaims...) } - // Check for claims to provision + // Check for claims to provision. This is the first time where we potentially + // find out that storage is not sufficient for the node. if len(claimsToProvision) > 0 { - unboundVolumesSatisfied, provisionedClaims, err = b.checkVolumeProvisions(pod, claimsToProvision, node) + unboundVolumesSatisfied, sufficientStorage, dynamicProvisions, err = b.checkVolumeProvisions(pod, claimsToProvision, node) if err != nil { - return nil, err + return } } } @@ -312,12 +338,12 @@ func (b *volumeBinder) FindPodVolumes(pod *v1.Pod, node *v1.Node) (reasons Confl return } -// AssumePodVolumes will take the cached matching PVs and PVCs to provision -// in podBindingCache for the chosen node, and: +// AssumePodVolumes will take the matching PVs and PVCs to provision in pod's +// volume information for the chosen node, and: // 1. Update the pvCache with the new prebound PV. // 2. Update the pvcCache with the new PVCs with annotations set -// 3. Update podBindingCache again with cached API updates for PVs and PVCs. -func (b *volumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string) (allFullyBound bool, err error) { +// 3. Update PodVolumes again with cached API updates for PVs and PVCs. +func (b *volumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string, podVolumes *PodVolumes) (allFullyBound bool, err error) { podName := getPodName(assumedPod) klog.V(4).Infof("AssumePodVolumes for pod %q, node %q", podName, nodeName) @@ -334,14 +360,9 @@ func (b *volumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string) (al return true, nil } - assumedPod.Spec.NodeName = nodeName - - claimsToBind := b.podBindingCache.GetBindings(assumedPod, nodeName) - claimsToProvision := b.podBindingCache.GetProvisionedPVCs(assumedPod, nodeName) - // Assume PV - newBindings := []*bindingInfo{} - for _, binding := range claimsToBind { + newBindings := []*BindingInfo{} + for _, binding := range podVolumes.StaticBindings { newPV, dirty, err := pvutil.GetBindVolumeToClaim(binding.pv, binding.pvc) klog.V(5).Infof("AssumePodVolumes: GetBindVolumeToClaim for pod %q, PV %q, PVC %q. newPV %p, dirty %v, err: %v", podName, @@ -362,12 +383,12 @@ func (b *volumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string) (al return false, err } } - newBindings = append(newBindings, &bindingInfo{pv: newPV, pvc: binding.pvc}) + newBindings = append(newBindings, &BindingInfo{pv: newPV, pvc: binding.pvc}) } // Assume PVCs newProvisionedPVCs := []*v1.PersistentVolumeClaim{} - for _, claim := range claimsToProvision { + for _, claim := range podVolumes.DynamicProvisions { // The claims from method args can be pointing to watcher cache. We must not // modify these, therefore create a copy. claimClone := claim.DeepCopy() @@ -382,18 +403,21 @@ func (b *volumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string) (al newProvisionedPVCs = append(newProvisionedPVCs, claimClone) } - // Update cache with the assumed pvcs and pvs - // Even if length is zero, update the cache with an empty slice to indicate that no - // operations are needed - b.podBindingCache.UpdateBindings(assumedPod, nodeName, newBindings, newProvisionedPVCs) - + podVolumes.StaticBindings = newBindings + podVolumes.DynamicProvisions = newProvisionedPVCs return } -// BindPodVolumes gets the cached bindings and PVCs to provision in podBindingCache, +// RevertAssumedPodVolumes will revert assumed PV and PVC cache. +func (b *volumeBinder) RevertAssumedPodVolumes(podVolumes *PodVolumes) { + b.revertAssumedPVs(podVolumes.StaticBindings) + b.revertAssumedPVCs(podVolumes.DynamicProvisions) +} + +// BindPodVolumes gets the cached bindings and PVCs to provision in pod's volumes information, // makes the API update for those PVs/PVCs, and waits for the PVCs to be completely bound // by the PV controller. -func (b *volumeBinder) BindPodVolumes(assumedPod *v1.Pod) (err error) { +func (b *volumeBinder) BindPodVolumes(assumedPod *v1.Pod, podVolumes *PodVolumes) (err error) { podName := getPodName(assumedPod) klog.V(4).Infof("BindPodVolumes for pod %q, node %q", podName, assumedPod.Spec.NodeName) @@ -405,8 +429,8 @@ func (b *volumeBinder) BindPodVolumes(assumedPod *v1.Pod) (err error) { } }() - bindings := b.podBindingCache.GetBindings(assumedPod, assumedPod.Spec.NodeName) - claimsToProvision := b.podBindingCache.GetProvisionedPVCs(assumedPod, assumedPod.Spec.NodeName) + bindings := podVolumes.StaticBindings + claimsToProvision := podVolumes.DynamicProvisions // Start API operations err = b.bindAPIUpdate(podName, bindings, claimsToProvision) @@ -432,9 +456,8 @@ func getPVCName(pvc *v1.PersistentVolumeClaim) string { return pvc.Namespace + "/" + pvc.Name } -// bindAPIUpdate gets the cached bindings and PVCs to provision in podBindingCache -// and makes the API update for those PVs/PVCs. -func (b *volumeBinder) bindAPIUpdate(podName string, bindings []*bindingInfo, claimsToProvision []*v1.PersistentVolumeClaim) error { +// bindAPIUpdate makes the API update for those PVs/PVCs. +func (b *volumeBinder) bindAPIUpdate(podName string, bindings []*BindingInfo, claimsToProvision []*v1.PersistentVolumeClaim) error { if bindings == nil { return fmt.Errorf("failed to get cached bindings for pod %q", podName) } @@ -456,7 +479,7 @@ func (b *volumeBinder) bindAPIUpdate(podName string, bindings []*bindingInfo, cl }() var ( - binding *bindingInfo + binding *BindingInfo i int claim *v1.PersistentVolumeClaim ) @@ -466,7 +489,7 @@ func (b *volumeBinder) bindAPIUpdate(podName string, bindings []*bindingInfo, cl for _, binding = range bindings { klog.V(5).Infof("bindAPIUpdate: Pod %q, binding PV %q to PVC %q", podName, binding.pv.Name, binding.pvc.Name) // TODO: does it hurt if we make an api call and nothing needs to be updated? - claimKey := claimToClaimKey(binding.pvc) + claimKey := getPVCName(binding.pvc) klog.V(2).Infof("claim %q bound to volume %q", claimKey, binding.pv.Name) newPV, err := b.kubeClient.CoreV1().PersistentVolumes().Update(context.TODO(), binding.pv, metav1.UpdateOptions{}) if err != nil { @@ -509,7 +532,7 @@ var ( // PV/PVC cache can be assumed again in main scheduler loop, we must check // latest state in API server which are shared with PV controller and // provisioners -func (b *volumeBinder) checkBindings(pod *v1.Pod, bindings []*bindingInfo, claimsToProvision []*v1.PersistentVolumeClaim) (bool, error) { +func (b *volumeBinder) checkBindings(pod *v1.Pod, bindings []*BindingInfo, claimsToProvision []*v1.PersistentVolumeClaim) (bool, error) { podName := getPodName(pod) if bindings == nil { return false, fmt.Errorf("failed to get cached bindings for pod %q", podName) @@ -518,12 +541,12 @@ func (b *volumeBinder) checkBindings(pod *v1.Pod, bindings []*bindingInfo, claim return false, fmt.Errorf("failed to get cached claims to provision for pod %q", podName) } - node, err := b.nodeInformer.Lister().Get(pod.Spec.NodeName) + node, err := b.nodeLister.Get(pod.Spec.NodeName) if err != nil { return false, fmt.Errorf("failed to get node %q: %v", pod.Spec.NodeName, err) } - csiNode, err := b.csiNodeInformer.Lister().Get(node.Name) + csiNode, err := b.csiNodeLister.Get(node.Name) if err != nil { // TODO: return the error once CSINode is created by default klog.V(4).Infof("Could not get a CSINode object for the node %q: %v", node.Name, err) @@ -531,13 +554,14 @@ func (b *volumeBinder) checkBindings(pod *v1.Pod, bindings []*bindingInfo, claim // Check for any conditions that might require scheduling retry - // When pod is removed from scheduling queue because of deletion or any - // other reasons, binding operation should be cancelled. There is no need - // to check PV/PVC bindings any more. - // We check pod binding cache here which will be cleared when pod is - // removed from scheduling queue. - if b.podBindingCache.GetDecisions(pod) == nil { - return false, fmt.Errorf("pod %q does not exist any more", podName) + // When pod is deleted, binding operation should be cancelled. There is no + // need to check PV/PVC bindings any more. + _, err = b.podLister.Pods(pod.Namespace).Get(pod.Name) + if err != nil { + if apierrors.IsNotFound(err) { + return false, fmt.Errorf("pod %q does not exist any more", podName) + } + klog.Errorf("failed to get pod %s/%s from the lister: %v", pod.Namespace, pod.Name, err) } for _, binding := range bindings { @@ -637,13 +661,28 @@ func (b *volumeBinder) checkBindings(pod *v1.Pod, bindings []*bindingInfo, claim return true, nil } -func (b *volumeBinder) isVolumeBound(namespace string, vol *v1.Volume) (bool, *v1.PersistentVolumeClaim, error) { - if vol.PersistentVolumeClaim == nil { +func (b *volumeBinder) isVolumeBound(pod *v1.Pod, vol *v1.Volume) (bound bool, pvc *v1.PersistentVolumeClaim, err error) { + pvcName := "" + ephemeral := false + switch { + case vol.PersistentVolumeClaim != nil: + pvcName = vol.PersistentVolumeClaim.ClaimName + case vol.Ephemeral != nil && + utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume): + // Generic ephemeral inline volumes also use a PVC, + // just with a computed name, and... + pvcName = pod.Name + "-" + vol.Name + ephemeral = true + default: return true, nil, nil } - pvcName := vol.PersistentVolumeClaim.ClaimName - return b.isPVCBound(namespace, pvcName) + bound, pvc, err = b.isPVCBound(pod.Namespace, pvcName) + // ... the PVC must be owned by the pod. + if ephemeral && err == nil && pvc != nil && !metav1.IsControlledBy(pvc, pod) { + return false, nil, fmt.Errorf("PVC %s/%s is not owned by pod", pod.Namespace, pvcName) + } + return } func (b *volumeBinder) isPVCBound(namespace, pvcName string) (bool, *v1.PersistentVolumeClaim, error) { @@ -679,7 +718,7 @@ func (b *volumeBinder) isPVCFullyBound(pvc *v1.PersistentVolumeClaim) bool { // arePodVolumesBound returns true if all volumes are fully bound func (b *volumeBinder) arePodVolumesBound(pod *v1.Pod) bool { for _, vol := range pod.Spec.Volumes { - if isBound, _, _ := b.isVolumeBound(pod.Namespace, &vol); !isBound { + if isBound, _, _ := b.isVolumeBound(pod, &vol); !isBound { // Pod has at least one PVC that needs binding return false } @@ -687,15 +726,15 @@ func (b *volumeBinder) arePodVolumesBound(pod *v1.Pod) bool { return true } -// getPodVolumes returns a pod's PVCs separated into bound, unbound with delayed binding (including provisioning) +// GetPodVolumes returns a pod's PVCs separated into bound, unbound with delayed binding (including provisioning) // and unbound with immediate binding (including prebound) -func (b *volumeBinder) getPodVolumes(pod *v1.Pod) (boundClaims []*v1.PersistentVolumeClaim, unboundClaimsDelayBinding []*v1.PersistentVolumeClaim, unboundClaimsImmediate []*v1.PersistentVolumeClaim, err error) { +func (b *volumeBinder) GetPodVolumes(pod *v1.Pod) (boundClaims []*v1.PersistentVolumeClaim, unboundClaimsDelayBinding []*v1.PersistentVolumeClaim, unboundClaimsImmediate []*v1.PersistentVolumeClaim, err error) { boundClaims = []*v1.PersistentVolumeClaim{} unboundClaimsImmediate = []*v1.PersistentVolumeClaim{} unboundClaimsDelayBinding = []*v1.PersistentVolumeClaim{} for _, vol := range pod.Spec.Volumes { - volumeBound, pvc, err := b.isVolumeBound(pod.Namespace, &vol) + volumeBound, pvc, err := b.isVolumeBound(pod, &vol) if err != nil { return nil, nil, nil, err } @@ -724,7 +763,7 @@ func (b *volumeBinder) getPodVolumes(pod *v1.Pod) (boundClaims []*v1.PersistentV } func (b *volumeBinder) checkBoundClaims(claims []*v1.PersistentVolumeClaim, node *v1.Node, podName string) (bool, error) { - csiNode, err := b.csiNodeInformer.Lister().Get(node.Name) + csiNode, err := b.csiNodeLister.Get(node.Name) if err != nil { // TODO: return the error once CSINode is created by default klog.V(4).Infof("Could not get a CSINode object for the node %q: %v", node.Name, err) @@ -756,7 +795,7 @@ func (b *volumeBinder) checkBoundClaims(claims []*v1.PersistentVolumeClaim, node // findMatchingVolumes tries to find matching volumes for given claims, // and return unbound claims for further provision. -func (b *volumeBinder) findMatchingVolumes(pod *v1.Pod, claimsToBind []*v1.PersistentVolumeClaim, node *v1.Node) (foundMatches bool, bindings []*bindingInfo, unboundClaims []*v1.PersistentVolumeClaim, err error) { +func (b *volumeBinder) findMatchingVolumes(pod *v1.Pod, claimsToBind []*v1.PersistentVolumeClaim, node *v1.Node) (foundMatches bool, bindings []*BindingInfo, unboundClaims []*v1.PersistentVolumeClaim, err error) { podName := getPodName(pod) // Sort all the claims by increasing size request to get the smallest fits sort.Sort(byPVCSize(claimsToBind)) @@ -785,7 +824,7 @@ func (b *volumeBinder) findMatchingVolumes(pod *v1.Pod, claimsToBind []*v1.Persi // matching PV needs to be excluded so we don't select it again chosenPVs[pv.Name] = pv - bindings = append(bindings, &bindingInfo{pv: pv, pvc: pvc}) + bindings = append(bindings, &BindingInfo{pv: pv, pvc: pvc}) klog.V(5).Infof("Found matching PV %q for PVC %q on node %q for pod %q", pv.Name, pvcName, node.Name, podName) } @@ -799,47 +838,56 @@ func (b *volumeBinder) findMatchingVolumes(pod *v1.Pod, claimsToBind []*v1.Persi // checkVolumeProvisions checks given unbound claims (the claims have gone through func // findMatchingVolumes, and do not have matching volumes for binding), and return true // if all of the claims are eligible for dynamic provision. -func (b *volumeBinder) checkVolumeProvisions(pod *v1.Pod, claimsToProvision []*v1.PersistentVolumeClaim, node *v1.Node) (provisionSatisfied bool, provisionedClaims []*v1.PersistentVolumeClaim, err error) { +func (b *volumeBinder) checkVolumeProvisions(pod *v1.Pod, claimsToProvision []*v1.PersistentVolumeClaim, node *v1.Node) (provisionSatisfied, sufficientStorage bool, dynamicProvisions []*v1.PersistentVolumeClaim, err error) { podName := getPodName(pod) - provisionedClaims = []*v1.PersistentVolumeClaim{} + dynamicProvisions = []*v1.PersistentVolumeClaim{} + // We return early with provisionedClaims == nil if a check + // fails or we encounter an error. for _, claim := range claimsToProvision { pvcName := getPVCName(claim) className := v1helper.GetPersistentVolumeClaimClass(claim) if className == "" { - return false, nil, fmt.Errorf("no class for claim %q", pvcName) + return false, false, nil, fmt.Errorf("no class for claim %q", pvcName) } class, err := b.classLister.Get(className) if err != nil { - return false, nil, fmt.Errorf("failed to find storage class %q", className) + return false, false, nil, fmt.Errorf("failed to find storage class %q", className) } provisioner := class.Provisioner if provisioner == "" || provisioner == pvutil.NotSupportedProvisioner { klog.V(4).Infof("storage class %q of claim %q does not support dynamic provisioning", className, pvcName) - return false, nil, nil + return false, true, nil, nil } // Check if the node can satisfy the topology requirement in the class if !v1helper.MatchTopologySelectorTerms(class.AllowedTopologies, labels.Set(node.Labels)) { klog.V(4).Infof("Node %q cannot satisfy provisioning topology requirements of claim %q", node.Name, pvcName) - return false, nil, nil + return false, true, nil, nil } - // TODO: Check if capacity of the node domain in the storage class - // can satisfy resource requirement of given claim + // Check storage capacity. + sufficient, err := b.hasEnoughCapacity(provisioner, claim, class, node) + if err != nil { + return false, false, nil, err + } + if !sufficient { + // hasEnoughCapacity logs an explanation. + return true, false, nil, nil + } - provisionedClaims = append(provisionedClaims, claim) + dynamicProvisions = append(dynamicProvisions, claim) } - klog.V(4).Infof("Provisioning for claims of pod %q that has no matching volumes on node %q ...", podName, node.Name) + klog.V(4).Infof("Provisioning for %d claims of pod %q that has no matching volumes on node %q ...", len(claimsToProvision), podName, node.Name) - return true, provisionedClaims, nil + return true, true, dynamicProvisions, nil } -func (b *volumeBinder) revertAssumedPVs(bindings []*bindingInfo) { - for _, bindingInfo := range bindings { - b.pvCache.Restore(bindingInfo.pv.Name) +func (b *volumeBinder) revertAssumedPVs(bindings []*BindingInfo) { + for _, BindingInfo := range bindings { + b.pvCache.Restore(BindingInfo.pv.Name) } } @@ -849,12 +897,74 @@ func (b *volumeBinder) revertAssumedPVCs(claims []*v1.PersistentVolumeClaim) { } } -type bindingInfo struct { - // Claim that needs to be bound - pvc *v1.PersistentVolumeClaim +// hasEnoughCapacity checks whether the provisioner has enough capacity left for a new volume of the given size +// that is available from the node. +func (b *volumeBinder) hasEnoughCapacity(provisioner string, claim *v1.PersistentVolumeClaim, storageClass *storagev1.StorageClass, node *v1.Node) (bool, error) { + // This is an optional feature. If disabled, we assume that + // there is enough storage. + if !b.capacityCheckEnabled { + return true, nil + } - // Proposed PV to bind to this claim - pv *v1.PersistentVolume + quantity, ok := claim.Spec.Resources.Requests[v1.ResourceStorage] + if !ok { + // No capacity to check for. + return true, nil + } + + // Only enabled for CSI drivers which opt into it. + driver, err := b.csiDriverLister.Get(provisioner) + if err != nil { + if apierrors.IsNotFound(err) { + // Either the provisioner is not a CSI driver or the driver does not + // opt into storage capacity scheduling. Either way, skip + // capacity checking. + return true, nil + } + return false, err + } + if driver.Spec.StorageCapacity == nil || !*driver.Spec.StorageCapacity { + return true, nil + } + + // Look for a matching CSIStorageCapacity object(s). + // TODO (for beta): benchmark this and potentially introduce some kind of lookup structure (https://github.com/kubernetes/enhancements/issues/1698#issuecomment-654356718). + capacities, err := b.csiStorageCapacityLister.List(labels.Everything()) + if err != nil { + return false, err + } + + sizeInBytes := quantity.Value() + for _, capacity := range capacities { + if capacity.StorageClassName == storageClass.Name && + capacity.Capacity != nil && + capacity.Capacity.Value() >= sizeInBytes && + b.nodeHasAccess(node, capacity) { + // Enough capacity found. + return true, nil + } + } + + // TODO (?): this doesn't give any information about which pools where considered and why + // they had to be rejected. Log that above? But that might be a lot of log output... + klog.V(4).Infof("Node %q has no accessible CSIStorageCapacity with enough capacity for PVC %s/%s of size %d and storage class %q", + node.Name, claim.Namespace, claim.Name, sizeInBytes, storageClass.Name) + return false, nil +} + +func (b *volumeBinder) nodeHasAccess(node *v1.Node, capacity *storagev1alpha1.CSIStorageCapacity) bool { + if capacity.NodeTopology == nil { + // Unavailable + return false + } + // Only matching by label is supported. + selector, err := metav1.LabelSelectorAsSelector(capacity.NodeTopology) + if err != nil { + // This should never happen because NodeTopology must be valid. + klog.Errorf("unexpected error converting %+v to a label selector: %v", capacity.NodeTopology, err) + return false + } + return selector.Matches(labels.Set(node.Labels)) } type byPVCSize []*v1.PersistentVolumeClaim @@ -874,10 +984,6 @@ func (a byPVCSize) Less(i, j int) bool { return iSize.Cmp(jSize) == -1 } -func claimToClaimKey(claim *v1.PersistentVolumeClaim) string { - return fmt.Sprintf("%s/%s", claim.Namespace, claim.Name) -} - // isCSIMigrationOnForPlugin checks if CSI migrartion is enabled for a given plugin. func isCSIMigrationOnForPlugin(pluginName string) bool { switch pluginName { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder_cache.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder_cache.go deleted file mode 100644 index 5452e1f349c..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder_cache.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -Copyright 2017 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 scheduling - -import ( - "sync" - - v1 "k8s.io/api/core/v1" - "k8s.io/kubernetes/pkg/controller/volume/scheduling/metrics" -) - -// PodBindingCache stores PV binding decisions per pod per node. -// Pod entries are removed when the Pod is deleted or updated to -// no longer be schedulable. -type PodBindingCache interface { - // UpdateBindings will update the cache with the given bindings for the - // pod and node. - UpdateBindings(pod *v1.Pod, node string, bindings []*bindingInfo, provisionings []*v1.PersistentVolumeClaim) - - // ClearBindings will clear the cached bindings for the given pod and node. - ClearBindings(pod *v1.Pod, node string) - - // GetBindings will return the cached bindings for the given pod and node. - // A nil return value means that the entry was not found. An empty slice - // means that no binding operations are needed. - GetBindings(pod *v1.Pod, node string) []*bindingInfo - - // A nil return value means that the entry was not found. An empty slice - // means that no provisioning operations are needed. - GetProvisionedPVCs(pod *v1.Pod, node string) []*v1.PersistentVolumeClaim - - // GetDecisions will return all cached decisions for the given pod. - GetDecisions(pod *v1.Pod) nodeDecisions - - // DeleteBindings will remove all cached bindings and provisionings for the given pod. - // TODO: separate the func if it is needed to delete bindings/provisionings individually - DeleteBindings(pod *v1.Pod) -} - -type podBindingCache struct { - // synchronizes bindingDecisions - rwMutex sync.RWMutex - - // Key = pod name - // Value = nodeDecisions - bindingDecisions map[string]nodeDecisions -} - -// Key = nodeName -// Value = bindings & provisioned PVCs of the node -type nodeDecisions map[string]nodeDecision - -// A decision includes bindingInfo and provisioned PVCs of the node -type nodeDecision struct { - bindings []*bindingInfo - provisionings []*v1.PersistentVolumeClaim -} - -// NewPodBindingCache creates a pod binding cache. -func NewPodBindingCache() PodBindingCache { - return &podBindingCache{bindingDecisions: map[string]nodeDecisions{}} -} - -func (c *podBindingCache) GetDecisions(pod *v1.Pod) nodeDecisions { - c.rwMutex.RLock() - defer c.rwMutex.RUnlock() - podName := getPodName(pod) - decisions, ok := c.bindingDecisions[podName] - if !ok { - return nil - } - return decisions -} - -func (c *podBindingCache) DeleteBindings(pod *v1.Pod) { - c.rwMutex.Lock() - defer c.rwMutex.Unlock() - - podName := getPodName(pod) - - if _, ok := c.bindingDecisions[podName]; ok { - delete(c.bindingDecisions, podName) - metrics.VolumeBindingRequestSchedulerBinderCache.WithLabelValues("delete").Inc() - } -} - -func (c *podBindingCache) UpdateBindings(pod *v1.Pod, node string, bindings []*bindingInfo, pvcs []*v1.PersistentVolumeClaim) { - c.rwMutex.Lock() - defer c.rwMutex.Unlock() - - podName := getPodName(pod) - decisions, ok := c.bindingDecisions[podName] - if !ok { - decisions = nodeDecisions{} - c.bindingDecisions[podName] = decisions - } - decision, ok := decisions[node] - if !ok { - decision = nodeDecision{ - bindings: bindings, - provisionings: pvcs, - } - metrics.VolumeBindingRequestSchedulerBinderCache.WithLabelValues("add").Inc() - } else { - decision.bindings = bindings - decision.provisionings = pvcs - } - decisions[node] = decision -} - -func (c *podBindingCache) GetBindings(pod *v1.Pod, node string) []*bindingInfo { - c.rwMutex.RLock() - defer c.rwMutex.RUnlock() - - podName := getPodName(pod) - decisions, ok := c.bindingDecisions[podName] - if !ok { - return nil - } - decision, ok := decisions[node] - if !ok { - return nil - } - return decision.bindings -} - -func (c *podBindingCache) GetProvisionedPVCs(pod *v1.Pod, node string) []*v1.PersistentVolumeClaim { - c.rwMutex.RLock() - defer c.rwMutex.RUnlock() - - podName := getPodName(pod) - decisions, ok := c.bindingDecisions[podName] - if !ok { - return nil - } - decision, ok := decisions[node] - if !ok { - return nil - } - return decision.provisionings -} - -func (c *podBindingCache) ClearBindings(pod *v1.Pod, node string) { - c.rwMutex.Lock() - defer c.rwMutex.Unlock() - - podName := getPodName(pod) - decisions, ok := c.bindingDecisions[podName] - if !ok { - return - } - delete(decisions, node) -} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder_fake.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder_fake.go index ddf1cedf31e..00dbd46191f 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder_fake.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/scheduling/scheduler_binder_fake.go @@ -16,7 +16,7 @@ limitations under the License. package scheduling -import "k8s.io/api/core/v1" +import v1 "k8s.io/api/core/v1" // FakeVolumeBinderConfig holds configurations for fake volume binder. type FakeVolumeBinderConfig struct { @@ -42,27 +42,27 @@ type FakeVolumeBinder struct { BindCalled bool } +// GetPodVolumes implements SchedulerVolumeBinder.GetPodVolumes. +func (b *FakeVolumeBinder) GetPodVolumes(pod *v1.Pod) (boundClaims, unboundClaimsDelayBinding, unboundClaimsImmediate []*v1.PersistentVolumeClaim, err error) { + return nil, nil, nil, nil +} + // FindPodVolumes implements SchedulerVolumeBinder.FindPodVolumes. -func (b *FakeVolumeBinder) FindPodVolumes(pod *v1.Pod, node *v1.Node) (reasons ConflictReasons, err error) { - return b.config.FindReasons, b.config.FindErr +func (b *FakeVolumeBinder) FindPodVolumes(pod *v1.Pod, _, _ []*v1.PersistentVolumeClaim, node *v1.Node) (podVolumes *PodVolumes, reasons ConflictReasons, err error) { + return nil, b.config.FindReasons, b.config.FindErr } // AssumePodVolumes implements SchedulerVolumeBinder.AssumePodVolumes. -func (b *FakeVolumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string) (bool, error) { +func (b *FakeVolumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string, podVolumes *PodVolumes) (bool, error) { b.AssumeCalled = true return b.config.AllBound, b.config.AssumeErr } +// RevertAssumedPodVolumes implements SchedulerVolumeBinder.RevertAssumedPodVolumes +func (b *FakeVolumeBinder) RevertAssumedPodVolumes(_ *PodVolumes) {} + // BindPodVolumes implements SchedulerVolumeBinder.BindPodVolumes. -func (b *FakeVolumeBinder) BindPodVolumes(assumedPod *v1.Pod) error { +func (b *FakeVolumeBinder) BindPodVolumes(assumedPod *v1.Pod, podVolumes *PodVolumes) error { b.BindCalled = true return b.config.BindErr } - -// GetBindingsCache implements SchedulerVolumeBinder.GetBindingsCache. -func (b *FakeVolumeBinder) GetBindingsCache() PodBindingCache { - return nil -} - -// DeletePodBindings implements SchedulerVolumeBinder.DeletePodBindings. -func (b *FakeVolumeBinder) DeletePodBindings(pod *v1.Pod) {} diff --git a/vendor/k8s.io/kubernetes/pkg/credentialprovider/BUILD b/vendor/k8s.io/kubernetes/pkg/credentialprovider/BUILD index 5fe1ebb9480..4485ef3b127 100644 --- a/vendor/k8s.io/kubernetes/pkg/credentialprovider/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/credentialprovider/BUILD @@ -18,7 +18,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/credentialprovider", deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/credentialprovider/OWNERS b/vendor/k8s.io/kubernetes/pkg/credentialprovider/OWNERS index d9b6fb8c6a8..2771f3a6bea 100644 --- a/vendor/k8s.io/kubernetes/pkg/credentialprovider/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/credentialprovider/OWNERS @@ -16,11 +16,9 @@ reviewers: - pmorie - dchen1107 - justinsb -- eparis - dims - resouer - mbohlool -- david-mcmahon - mfojtik - therc - andrewsykim diff --git a/vendor/k8s.io/kubernetes/pkg/credentialprovider/config.go b/vendor/k8s.io/kubernetes/pkg/credentialprovider/config.go index 377383aa903..42c184589ee 100644 --- a/vendor/k8s.io/kubernetes/pkg/credentialprovider/config.go +++ b/vendor/k8s.io/kubernetes/pkg/credentialprovider/config.go @@ -29,19 +29,19 @@ import ( "strings" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( maxReadLength = 10 * 1 << 20 // 10MB ) -// DockerConfigJson represents ~/.docker/config.json file info +// DockerConfigJSON represents ~/.docker/config.json file info // see https://github.com/docker/docker/pull/12009 -type DockerConfigJson struct { +type DockerConfigJSON struct { Auths DockerConfig `json:"auths"` // +optional - HttpHeaders map[string]string `json:"HttpHeaders,omitempty"` + HTTPHeaders map[string]string `json:"HttpHeaders,omitempty"` } // DockerConfig represents the config file used by the docker CLI. @@ -49,6 +49,7 @@ type DockerConfigJson struct { // when pulling images from specific image repositories. type DockerConfig map[string]DockerConfigEntry +// DockerConfigEntry wraps a docker config as a entry type DockerConfigEntry struct { Username string Password string @@ -62,19 +63,21 @@ var ( workingDirPath = "" homeDirPath, _ = os.UserHomeDir() rootDirPath = "/" - homeJsonDirPath = filepath.Join(homeDirPath, ".docker") - rootJsonDirPath = filepath.Join(rootDirPath, ".docker") + homeJSONDirPath = filepath.Join(homeDirPath, ".docker") + rootJSONDirPath = filepath.Join(rootDirPath, ".docker") configFileName = ".dockercfg" - configJsonFileName = "config.json" + configJSONFileName = "config.json" ) +// SetPreferredDockercfgPath set preferred docker config path func SetPreferredDockercfgPath(path string) { preferredPathLock.Lock() defer preferredPathLock.Unlock() preferredPath = path } +// GetPreferredDockercfgPath get preferred docker config path func GetPreferredDockercfgPath() string { preferredPathLock.Lock() defer preferredPathLock.Unlock() @@ -88,7 +91,7 @@ func DefaultDockercfgPaths() []string { //DefaultDockerConfigJSONPaths returns default search paths of .docker/config.json func DefaultDockerConfigJSONPaths() []string { - return []string{GetPreferredDockercfgPath(), workingDirPath, homeJsonDirPath, rootJsonDirPath} + return []string{GetPreferredDockercfgPath(), workingDirPath, homeJSONDirPath, rootJSONDirPath} } // ReadDockercfgFile attempts to read a legacy dockercfg file from the given paths. @@ -129,36 +132,37 @@ func ReadDockerConfigJSONFile(searchPaths []string) (cfg DockerConfig, err error searchPaths = DefaultDockerConfigJSONPaths() } for _, configPath := range searchPaths { - absDockerConfigFileLocation, err := filepath.Abs(filepath.Join(configPath, configJsonFileName)) + absDockerConfigFileLocation, err := filepath.Abs(filepath.Join(configPath, configJSONFileName)) if err != nil { klog.Errorf("while trying to canonicalize %s: %v", configPath, err) continue } - klog.V(4).Infof("looking for %s at %s", configJsonFileName, absDockerConfigFileLocation) - cfg, err = ReadSpecificDockerConfigJsonFile(absDockerConfigFileLocation) + klog.V(4).Infof("looking for %s at %s", configJSONFileName, absDockerConfigFileLocation) + cfg, err = ReadSpecificDockerConfigJSONFile(absDockerConfigFileLocation) if err != nil { if !os.IsNotExist(err) { klog.V(4).Infof("while trying to read %s: %v", absDockerConfigFileLocation, err) } continue } - klog.V(4).Infof("found valid %s at %s", configJsonFileName, absDockerConfigFileLocation) + klog.V(4).Infof("found valid %s at %s", configJSONFileName, absDockerConfigFileLocation) return cfg, nil } - return nil, fmt.Errorf("couldn't find valid %s after checking in %v", configJsonFileName, searchPaths) + return nil, fmt.Errorf("couldn't find valid %s after checking in %v", configJSONFileName, searchPaths) } -//ReadSpecificDockerConfigJsonFile attempts to read docker configJSON from a given file path. -func ReadSpecificDockerConfigJsonFile(filePath string) (cfg DockerConfig, err error) { +//ReadSpecificDockerConfigJSONFile attempts to read docker configJSON from a given file path. +func ReadSpecificDockerConfigJSONFile(filePath string) (cfg DockerConfig, err error) { var contents []byte if contents, err = ioutil.ReadFile(filePath); err != nil { return nil, err } - return readDockerConfigJsonFileFromBytes(contents) + return readDockerConfigJSONFileFromBytes(contents) } +// ReadDockerConfigFile read a docker config file from default path func ReadDockerConfigFile() (cfg DockerConfig, err error) { if cfg, err := ReadDockerConfigJSONFile(nil); err == nil { return cfg, nil @@ -167,19 +171,20 @@ func ReadDockerConfigFile() (cfg DockerConfig, err error) { return ReadDockercfgFile(nil) } -// HttpError wraps a non-StatusOK error code as an error. -type HttpError struct { +// HTTPError wraps a non-StatusOK error code as an error. +type HTTPError struct { StatusCode int - Url string + URL string } // Error implements error -func (he *HttpError) Error() string { +func (he *HTTPError) Error() string { return fmt.Sprintf("http status code: %d while fetching url %s", - he.StatusCode, he.Url) + he.StatusCode, he.URL) } -func ReadUrl(url string, client *http.Client, header *http.Header) (body []byte, err error) { +// ReadURL read contents from given url +func ReadURL(url string, client *http.Client, header *http.Header) (body []byte, err error) { req, err := http.NewRequest("GET", url, nil) if err != nil { return nil, err @@ -195,9 +200,9 @@ func ReadUrl(url string, client *http.Client, header *http.Header) (body []byte, if resp.StatusCode != http.StatusOK { klog.V(2).Infof("body of failing http response: %v", resp.Body) - return nil, &HttpError{ + return nil, &HTTPError{ StatusCode: resp.StatusCode, - Url: url, + URL: url, } } @@ -214,12 +219,13 @@ func ReadUrl(url string, client *http.Client, header *http.Header) (body []byte, return contents, nil } -func ReadDockerConfigFileFromUrl(url string, client *http.Client, header *http.Header) (cfg DockerConfig, err error) { - if contents, err := ReadUrl(url, client, header); err != nil { - return nil, err - } else { +// ReadDockerConfigFileFromURL read a docker config file from the given url +func ReadDockerConfigFileFromURL(url string, client *http.Client, header *http.Header) (cfg DockerConfig, err error) { + if contents, err := ReadURL(url, client, header); err == nil { return readDockerConfigFileFromBytes(contents) } + + return nil, err } func readDockerConfigFileFromBytes(contents []byte) (cfg DockerConfig, err error) { @@ -230,13 +236,13 @@ func readDockerConfigFileFromBytes(contents []byte) (cfg DockerConfig, err error return } -func readDockerConfigJsonFileFromBytes(contents []byte) (cfg DockerConfig, err error) { - var cfgJson DockerConfigJson - if err = json.Unmarshal(contents, &cfgJson); err != nil { +func readDockerConfigJSONFileFromBytes(contents []byte) (cfg DockerConfig, err error) { + var cfgJSON DockerConfigJSON + if err = json.Unmarshal(contents, &cfgJSON); err != nil { klog.Errorf("while trying to parse blob %q: %v", contents, err) return nil, err } - cfg = cfgJson.Auths + cfg = cfgJSON.Auths return } @@ -253,6 +259,7 @@ type dockerConfigEntryWithAuth struct { Auth string `json:"auth,omitempty"` } +// UnmarshalJSON implements the json.Unmarshaler interface. func (ident *DockerConfigEntry) UnmarshalJSON(data []byte) error { var tmp dockerConfigEntryWithAuth err := json.Unmarshal(data, &tmp) @@ -272,6 +279,7 @@ func (ident *DockerConfigEntry) UnmarshalJSON(data []byte) error { return err } +// MarshalJSON implements the json.Marshaler interface. func (ident DockerConfigEntry) MarshalJSON() ([]byte, error) { toEncode := dockerConfigEntryWithAuth{ident.Username, ident.Password, ident.Email, ""} toEncode.Auth = encodeDockerConfigFieldAuth(ident.Username, ident.Password) @@ -301,7 +309,7 @@ func decodeDockerConfigFieldAuth(field string) (username, password string, err e parts := strings.SplitN(string(decoded), ":", 2) if len(parts) != 2 { - err = fmt.Errorf("unable to parse auth field") + err = fmt.Errorf("unable to parse auth field, must be formatted as base64(username:password)") return } diff --git a/vendor/k8s.io/kubernetes/pkg/credentialprovider/keyring.go b/vendor/k8s.io/kubernetes/pkg/credentialprovider/keyring.go index ce924484ca1..494770c0e2f 100644 --- a/vendor/k8s.io/kubernetes/pkg/credentialprovider/keyring.go +++ b/vendor/k8s.io/kubernetes/pkg/credentialprovider/keyring.go @@ -23,7 +23,7 @@ import ( "sort" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/sets" ) @@ -73,6 +73,7 @@ type AuthConfig struct { RegistryToken string `json:"registrytoken,omitempty"` } +// Add add some docker config in basic docker keyring func (dk *BasicDockerKeyring) Add(cfg DockerConfig) { if dk.index == nil { dk.index = make([]string, 0) @@ -159,8 +160,8 @@ func isDefaultRegistryMatch(image string) bool { // url.Parse require a scheme, but ours don't have schemes. Adding a // scheme to make url.Parse happy, then clear out the resulting scheme. -func parseSchemelessUrl(schemelessUrl string) (*url.URL, error) { - parsed, err := url.Parse("https://" + schemelessUrl) +func parseSchemelessURL(schemelessURL string) (*url.URL, error) { + parsed, err := url.Parse("https://" + schemelessURL) if err != nil { return nil, err } @@ -170,7 +171,7 @@ func parseSchemelessUrl(schemelessUrl string) (*url.URL, error) { } // split the host name into parts, as well as the port -func splitUrl(url *url.URL) (parts []string, port string) { +func splitURL(url *url.URL) (parts []string, port string) { host, port, err := net.SplitHostPort(url.Host) if err != nil { // could not parse port @@ -181,43 +182,43 @@ func splitUrl(url *url.URL) (parts []string, port string) { // overloaded version of urlsMatch, operating on strings instead of URLs. func urlsMatchStr(glob string, target string) (bool, error) { - globUrl, err := parseSchemelessUrl(glob) + globURL, err := parseSchemelessURL(glob) if err != nil { return false, err } - targetUrl, err := parseSchemelessUrl(target) + targetURL, err := parseSchemelessURL(target) if err != nil { return false, err } - return urlsMatch(globUrl, targetUrl) + return urlsMatch(globURL, targetURL) } // check whether the given target url matches the glob url, which may have // glob wild cards in the host name. // // Examples: -// globUrl=*.docker.io, targetUrl=blah.docker.io => match -// globUrl=*.docker.io, targetUrl=not.right.io => no match +// globURL=*.docker.io, targetURL=blah.docker.io => match +// globURL=*.docker.io, targetURL=not.right.io => no match // // Note that we don't support wildcards in ports and paths yet. -func urlsMatch(globUrl *url.URL, targetUrl *url.URL) (bool, error) { - globUrlParts, globPort := splitUrl(globUrl) - targetUrlParts, targetPort := splitUrl(targetUrl) +func urlsMatch(globURL *url.URL, targetURL *url.URL) (bool, error) { + globURLParts, globPort := splitURL(globURL) + targetURLParts, targetPort := splitURL(targetURL) if globPort != targetPort { // port doesn't match return false, nil } - if len(globUrlParts) != len(targetUrlParts) { + if len(globURLParts) != len(targetURLParts) { // host name does not have the same number of parts return false, nil } - if !strings.HasPrefix(targetUrl.Path, globUrl.Path) { + if !strings.HasPrefix(targetURL.Path, globURL.Path) { // the path of the credential must be a prefix return false, nil } - for k, globUrlPart := range globUrlParts { - targetUrlPart := targetUrlParts[k] - matched, err := filepath.Match(globUrlPart, targetUrlPart) + for k, globURLPart := range globURLParts { + targetURLPart := targetURLParts[k] + matched, err := filepath.Match(globURLPart, targetURLPart) if err != nil { return false, err } @@ -270,11 +271,14 @@ func (dk *providersDockerKeyring) Lookup(image string) ([]AuthConfig, bool) { return keyring.Lookup(image) } +// FakeKeyring a fake config credentials type FakeKeyring struct { auth []AuthConfig ok bool } +// Lookup implements the DockerKeyring method for fetching credentials based on image name +// return fake auth and ok func (f *FakeKeyring) Lookup(image string) ([]AuthConfig, bool) { return f.auth, f.ok } @@ -282,6 +286,8 @@ func (f *FakeKeyring) Lookup(image string) ([]AuthConfig, bool) { // UnionDockerKeyring delegates to a set of keyrings. type UnionDockerKeyring []DockerKeyring +// Lookup implements the DockerKeyring method for fetching credentials based on image name. +// return each credentials func (k UnionDockerKeyring) Lookup(image string) ([]AuthConfig, bool) { authConfigs := []AuthConfig{} for _, subKeyring := range k { diff --git a/vendor/k8s.io/kubernetes/pkg/credentialprovider/plugins.go b/vendor/k8s.io/kubernetes/pkg/credentialprovider/plugins.go index 7256a5a1d05..76051a9b4b5 100644 --- a/vendor/k8s.io/kubernetes/pkg/credentialprovider/plugins.go +++ b/vendor/k8s.io/kubernetes/pkg/credentialprovider/plugins.go @@ -21,7 +21,7 @@ import ( "sort" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" ) // All registered credential providers. diff --git a/vendor/k8s.io/kubernetes/pkg/credentialprovider/provider.go b/vendor/k8s.io/kubernetes/pkg/credentialprovider/provider.go index e2ab4b584db..d575ca9155f 100644 --- a/vendor/k8s.io/kubernetes/pkg/credentialprovider/provider.go +++ b/vendor/k8s.io/kubernetes/pkg/credentialprovider/provider.go @@ -22,7 +22,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" ) // DockerConfigProvider is the interface that registered extensions implement diff --git a/vendor/k8s.io/kubernetes/pkg/credentialprovider/secrets/secrets.go b/vendor/k8s.io/kubernetes/pkg/credentialprovider/secrets/secrets.go index d5397d931c2..4e7c220b397 100644 --- a/vendor/k8s.io/kubernetes/pkg/credentialprovider/secrets/secrets.go +++ b/vendor/k8s.io/kubernetes/pkg/credentialprovider/secrets/secrets.go @@ -30,7 +30,7 @@ func MakeDockerKeyring(passedSecrets []v1.Secret, defaultKeyring credentialprovi passedCredentials := []credentialprovider.DockerConfig{} for _, passedSecret := range passedSecrets { if dockerConfigJSONBytes, dockerConfigJSONExists := passedSecret.Data[v1.DockerConfigJsonKey]; (passedSecret.Type == v1.SecretTypeDockerConfigJson) && dockerConfigJSONExists && (len(dockerConfigJSONBytes) > 0) { - dockerConfigJSON := credentialprovider.DockerConfigJson{} + dockerConfigJSON := credentialprovider.DockerConfigJSON{} if err := json.Unmarshal(dockerConfigJSONBytes, &dockerConfigJSON); err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/features/kube_features.go b/vendor/k8s.io/kubernetes/pkg/features/kube_features.go index e7d0a1498d7..af7b9b4e91a 100644 --- a/vendor/k8s.io/kubernetes/pkg/features/kube_features.go +++ b/vendor/k8s.io/kubernetes/pkg/features/kube_features.go @@ -78,6 +78,7 @@ const ( // owner: @mikedanese // beta: v1.8 + // ga: v1.19 // // Automatically renews the client certificate used for communicating with // the API server as the certificate approaches expiration. @@ -111,14 +112,6 @@ const ( // Allows running an ephemeral container in pod namespaces to troubleshoot a running pod. EphemeralContainers featuregate.Feature = "EphemeralContainers" - // owner: @verb - // alpha: v1.10 - // beta: v1.12 - // GA: v1.17 - // - // Allows all containers in a pod to share a process namespace. - PodShareProcessNamespace featuregate.Feature = "PodShareProcessNamespace" - // owner: @sjenning // alpha: v1.11 // @@ -154,18 +147,21 @@ const ( // owner @smarterclayton // alpha: v1.16 + // beta: v1.19 // // Enable legacy behavior to vary cluster functionality on the node-role.kubernetes.io labels. On by default (legacy), will be turned off in 1.18. LegacyNodeRoleBehavior featuregate.Feature = "LegacyNodeRoleBehavior" // owner @brendandburns // alpha: v1.9 + // beta: v1.19 // // Enable nodes to exclude themselves from service load balancers ServiceNodeExclusion featuregate.Feature = "ServiceNodeExclusion" // owner @smarterclayton // alpha: v1.16 + // beta: v1.19 // // Enable nodes to exclude themselves from network disruption checks NodeDisruptionExclusion featuregate.Feature = "NodeDisruptionExclusion" @@ -198,12 +194,6 @@ const ( // Postpone deletion of a PV or a PVC when they are being used StorageObjectInUseProtection featuregate.Feature = "StorageObjectInUseProtection" - // owner: @aveshagarwal - // alpha: v1.9 - // - // Enable resource limits priority function - ResourceLimitsPriorityFunction featuregate.Feature = "ResourceLimitsPriorityFunction" - // owner: @m1093782566 // GA: v1.11 // @@ -288,15 +278,6 @@ const ( // while making decisions. BalanceAttachedNodeVolumes featuregate.Feature = "BalanceAttachedNodeVolumes" - // owner: @kevtaylor - // alpha: v1.14 - // beta: v1.15 - // ga: v1.17 - // - // Allow subpath environment variable substitution - // Only applicable if the VolumeSubpath feature is also enabled - VolumeSubpathEnvExpansion featuregate.Feature = "VolumeSubpathEnvExpansion" - // owner: @vladimirvivien // alpha: v1.11 // beta: v1.14 @@ -305,13 +286,32 @@ const ( // Enables CSI to use raw block storage volumes CSIBlockVolume featuregate.Feature = "CSIBlockVolume" - // owner: @vladimirvivien + // owner: @pohly // alpha: v1.14 // beta: v1.16 // // Enables CSI Inline volumes support for pods CSIInlineVolume featuregate.Feature = "CSIInlineVolume" + // owner: @pohly + // alpha: v1.19 + // + // Enables tracking of available storage capacity that CSI drivers provide. + CSIStorageCapacity featuregate.Feature = "CSIStorageCapacity" + + // owner: @alculquicondor + // alpha: v1.19 + // + // Enables the use of PodTopologySpread scheduling plugin to do default + // spreading and disables legacy SelectorSpread plugin. + DefaultPodTopologySpread featuregate.Feature = "DefaultPodTopologySpread" + + // owner: @pohly + // alpha: v1.19 + // + // Enables generic ephemeral inline volume support for pods + GenericEphemeralVolume featuregate.Feature = "GenericEphemeralVolume" + // owner: @tallclair // alpha: v1.12 // beta: v1.14 @@ -397,6 +397,7 @@ const ( // owner: @andyzhangx // alpha: v1.15 + // beta: v1.19 // // Enables the Azure Disk in-tree driver to Azure Disk Driver migration feature. CSIMigrationAzureDisk featuregate.Feature = "CSIMigrationAzureDisk" @@ -421,6 +422,25 @@ const ( // Expects Azure File CSI Driver to be installed and configured on all nodes. CSIMigrationAzureFileComplete featuregate.Feature = "CSIMigrationAzureFileComplete" + // owner: @divyenpatel + // beta: v1.19 (requires: vSphere vCenter/ESXi Version: 7.0u1, HW Version: VM version 15) + // + // Enables the vSphere in-tree driver to vSphere CSI Driver migration feature. + CSIMigrationvSphere featuregate.Feature = "CSIMigrationvSphere" + + // owner: @divyenpatel + // beta: v1.19 (requires: vSphere vCenter/ESXi Version: 7.0u1, HW Version: VM version 15) + // + // Disables the vSphere in-tree driver. + // Expects vSphere CSI Driver to be installed and configured on all nodes. + CSIMigrationvSphereComplete featuregate.Feature = "CSIMigrationvSphereComplete" + + // owner: @huffmanca + // alpha: v1.19 + // + // Determines if a CSI Driver supports applying fsGroup. + CSIVolumeFSGroupPolicy featuregate.Feature = "CSIVolumeFSGroupPolicy" + // owner: @gnufied // alpha: v1.18 // Allows user to configure volume permission change policy for fsGroups when mounting @@ -479,6 +499,7 @@ const ( // owner: @denkensk // alpha: v1.15 + // beta: v1.19 // // Enables NonPreempting option for priorityClass and pod. NonPreemptingPriority featuregate.Feature = "NonPreemptingPriority" @@ -512,12 +533,21 @@ const ( // owner: @robscott @freehan // alpha: v1.18 + // beta: v1.19 // // Enable Endpoint Slice consumption by kube-proxy for improved scalability. EndpointSliceProxying featuregate.Feature = "EndpointSliceProxying" + // owner: @robscott @kumarvin123 + // alpha: v1.19 + // + // Enable Endpoint Slice consumption by kube-proxy in Windows for improved scalability. + WindowsEndpointSliceProxying featuregate.Feature = "WindowsEndpointSliceProxying" + // owner: @Huang-Wei + // alpha: v1.16 // beta: v1.18 + // GA: v1.19 // // Schedule pods evenly across available topology domains. EvenPodsSpread featuregate.Feature = "EvenPodsSpread" @@ -550,24 +580,28 @@ const ( // owner: @robscott // alpha: v1.18 + // beta: v1.19 // // Enables AppProtocol field for Services and Endpoints. ServiceAppProtocol featuregate.Feature = "ServiceAppProtocol" // owner: @wojtek-t // alpha: v1.18 + // beta: v1.19 // // Enables a feature to make secrets and configmaps data immutable. ImmutableEphemeralVolumes featuregate.Feature = "ImmutableEphemeralVolumes" // owner: @robscott // beta: v1.18 + // ga: v1.19 // // Enables DefaultIngressClass admission controller. DefaultIngressClass featuregate.Feature = "DefaultIngressClass" // owner: @bart0sh // alpha: v1.18 + // beta: v1.19 // // Enables usage of HugePages- in a volume medium, // e.g. emptyDir: @@ -587,16 +621,44 @@ const ( // Enables usage of any object for volume data source in PVCs AnyVolumeDataSource featuregate.Feature = "AnyVolumeDataSource" + // owner: @javidiaz + // alpha: v1.19 + // + // Allow setting the Fully Qualified Domain Name (FQDN) in the hostname of a Pod. If a Pod does not + // have FQDN, this feature has no effect. + SetHostnameAsFQDN featuregate.Feature = "SetHostnameAsFQDN" + + // owner: @ksubrmnn + // alpha: v1.14 + // + // Allows kube-proxy to run in Overlay mode for Windows + WinOverlay featuregate.Feature = "WinOverlay" + + // owner: @ksubrmnn + // alpha: v1.14 + // + // Allows kube-proxy to create DSR loadbalancers for Windows + WinDSR featuregate.Feature = "WinDSR" + + // owner: @RenaudWasTaken @dashpole + // alpha: v1.19 + // + // Disables Accelerator Metrics Collected by Kubelet + DisableAcceleratorUsageMetrics featuregate.Feature = "DisableAcceleratorUsageMetrics" + + // owner: @AkihiroSuda + // alpha: v1.XX + // + // Enable rootless mode. + Rootless featuregate.Feature = "Rootless" + // owner: @AkihiroSuda // alpha: v1.XX // // Enable support for "none" cgroup driver. // - // The "none" driver is expected to be used in "rootless" mode until OCI/CRI runtime get - // support for cgroup2 (unified) mode with nsdelegate. - // - // Even after cgroup2 gets supported in the ecosystem, the "none" driver will remain - // because nested containers might not always get support for cgroup2 (via systemd). + // The "none" driver is expected to be used for running "rootless" mode on a host + // that does not support cgroup v2. SupportNoneCgroupDriver featuregate.Feature = "SupportNoneCgroupDriver" ) @@ -614,11 +676,10 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS DevicePlugins: {Default: true, PreRelease: featuregate.Beta}, TaintBasedEvictions: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.19 RotateKubeletServerCertificate: {Default: true, PreRelease: featuregate.Beta}, - RotateKubeletClientCertificate: {Default: true, PreRelease: featuregate.Beta}, + RotateKubeletClientCertificate: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.20 LocalStorageCapacityIsolation: {Default: true, PreRelease: featuregate.Beta}, Sysctls: {Default: true, PreRelease: featuregate.Beta}, EphemeralContainers: {Default: false, PreRelease: featuregate.Alpha}, - PodShareProcessNamespace: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.19 QOSReserved: {Default: false, PreRelease: featuregate.Alpha}, ExpandPersistentVolumes: {Default: true, PreRelease: featuregate.Beta}, ExpandInUsePersistentVolumes: {Default: true, PreRelease: featuregate.Beta}, @@ -627,13 +688,12 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS CPUManager: {Default: true, PreRelease: featuregate.Beta}, CPUCFSQuotaPeriod: {Default: false, PreRelease: featuregate.Alpha}, TopologyManager: {Default: true, PreRelease: featuregate.Beta}, - ServiceNodeExclusion: {Default: false, PreRelease: featuregate.Alpha}, - NodeDisruptionExclusion: {Default: false, PreRelease: featuregate.Alpha}, + ServiceNodeExclusion: {Default: true, PreRelease: featuregate.Beta}, + NodeDisruptionExclusion: {Default: true, PreRelease: featuregate.Beta}, CSIDriverRegistry: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.20 CSINodeInfo: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.19 BlockVolume: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.20 StorageObjectInUseProtection: {Default: true, PreRelease: featuregate.GA}, - ResourceLimitsPriorityFunction: {Default: false, PreRelease: featuregate.Alpha}, SupportIPVSProxyMode: {Default: true, PreRelease: featuregate.GA}, SupportPodPidsLimit: {Default: true, PreRelease: featuregate.Beta}, SupportNodePidsLimit: {Default: true, PreRelease: featuregate.Beta}, @@ -648,22 +708,26 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS CSIMigrationGCEComplete: {Default: false, PreRelease: featuregate.Alpha}, CSIMigrationAWS: {Default: false, PreRelease: featuregate.Beta}, // Off by default (requires AWS EBS CSI driver) CSIMigrationAWSComplete: {Default: false, PreRelease: featuregate.Alpha}, - CSIMigrationAzureDisk: {Default: false, PreRelease: featuregate.Alpha}, + CSIMigrationAzureDisk: {Default: false, PreRelease: featuregate.Beta}, // Off by default (requires Azure Disk CSI driver) CSIMigrationAzureDiskComplete: {Default: false, PreRelease: featuregate.Alpha}, CSIMigrationAzureFile: {Default: false, PreRelease: featuregate.Alpha}, CSIMigrationAzureFileComplete: {Default: false, PreRelease: featuregate.Alpha}, + CSIMigrationvSphere: {Default: false, PreRelease: featuregate.Beta}, + CSIMigrationvSphereComplete: {Default: false, PreRelease: featuregate.Beta}, RunAsGroup: {Default: true, PreRelease: featuregate.Beta}, CSIMigrationOpenStack: {Default: false, PreRelease: featuregate.Beta}, // Off by default (requires OpenStack Cinder CSI driver) CSIMigrationOpenStackComplete: {Default: false, PreRelease: featuregate.Alpha}, VolumeSubpath: {Default: true, PreRelease: featuregate.GA}, ConfigurableFSGroupPolicy: {Default: false, PreRelease: featuregate.Alpha}, BalanceAttachedNodeVolumes: {Default: false, PreRelease: featuregate.Alpha}, - VolumeSubpathEnvExpansion: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.19, CSIBlockVolume: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.20 CSIInlineVolume: {Default: true, PreRelease: featuregate.Beta}, + CSIStorageCapacity: {Default: false, PreRelease: featuregate.Alpha}, + GenericEphemeralVolume: {Default: false, PreRelease: featuregate.Alpha}, + CSIVolumeFSGroupPolicy: {Default: false, PreRelease: featuregate.Alpha}, RuntimeClass: {Default: true, PreRelease: featuregate.Beta}, NodeLease: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, - SCTPSupport: {Default: false, PreRelease: featuregate.Alpha}, + SCTPSupport: {Default: true, PreRelease: featuregate.Beta}, VolumeSnapshotDataSource: {Default: true, PreRelease: featuregate.Beta}, ProcMountType: {Default: false, PreRelease: featuregate.Alpha}, TTLAfterFinished: {Default: false, PreRelease: featuregate.Alpha}, @@ -672,23 +736,30 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS WindowsRunAsUserName: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.20 ServiceLoadBalancerFinalizer: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, LocalStorageCapacityIsolationFSQuotaMonitoring: {Default: false, PreRelease: featuregate.Alpha}, - NonPreemptingPriority: {Default: false, PreRelease: featuregate.Alpha}, + NonPreemptingPriority: {Default: true, PreRelease: featuregate.Beta}, VolumePVCDataSource: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.20 PodOverhead: {Default: true, PreRelease: featuregate.Beta}, IPv6DualStack: {Default: false, PreRelease: featuregate.Alpha}, EndpointSlice: {Default: true, PreRelease: featuregate.Beta}, - EndpointSliceProxying: {Default: false, PreRelease: featuregate.Alpha}, - EvenPodsSpread: {Default: true, PreRelease: featuregate.Beta}, + EndpointSliceProxying: {Default: true, PreRelease: featuregate.Beta}, + WindowsEndpointSliceProxying: {Default: false, PreRelease: featuregate.Alpha}, + EvenPodsSpread: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.21 StartupProbe: {Default: true, PreRelease: featuregate.Beta}, AllowInsecureBackendProxy: {Default: true, PreRelease: featuregate.Beta}, PodDisruptionBudget: {Default: true, PreRelease: featuregate.Beta}, ServiceTopology: {Default: false, PreRelease: featuregate.Alpha}, - ServiceAppProtocol: {Default: false, PreRelease: featuregate.Alpha}, - ImmutableEphemeralVolumes: {Default: false, PreRelease: featuregate.Alpha}, - DefaultIngressClass: {Default: true, PreRelease: featuregate.Beta}, - HugePageStorageMediumSize: {Default: false, PreRelease: featuregate.Alpha}, - ExternalPolicyForExternalIP: {Default: false, PreRelease: featuregate.GA}, // remove in 1.19 + ServiceAppProtocol: {Default: true, PreRelease: featuregate.Beta}, + ImmutableEphemeralVolumes: {Default: true, PreRelease: featuregate.Beta}, + DefaultIngressClass: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.20 + HugePageStorageMediumSize: {Default: true, PreRelease: featuregate.Beta}, + ExternalPolicyForExternalIP: {Default: true, PreRelease: featuregate.GA}, // remove in 1.20 AnyVolumeDataSource: {Default: false, PreRelease: featuregate.Alpha}, + DefaultPodTopologySpread: {Default: false, PreRelease: featuregate.Alpha}, + SetHostnameAsFQDN: {Default: false, PreRelease: featuregate.Alpha}, + WinOverlay: {Default: false, PreRelease: featuregate.Alpha}, + WinDSR: {Default: false, PreRelease: featuregate.Alpha}, + DisableAcceleratorUsageMetrics: {Default: false, PreRelease: featuregate.Alpha}, + Rootless: {Default: false, PreRelease: featuregate.Alpha}, SupportNoneCgroupDriver: {Default: false, PreRelease: featuregate.Alpha}, // inherited features from generic apiserver, relisted here to get a conflict if it is changed @@ -696,15 +767,15 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS genericfeatures.StreamingProxyRedirects: {Default: true, PreRelease: featuregate.Deprecated}, genericfeatures.ValidateProxyRedirects: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.AdvancedAuditing: {Default: true, PreRelease: featuregate.GA}, - genericfeatures.DynamicAuditing: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.APIResponseCompression: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.APIListChunking: {Default: true, PreRelease: featuregate.Beta}, - genericfeatures.DryRun: {Default: true, PreRelease: featuregate.Beta}, + genericfeatures.DryRun: {Default: true, PreRelease: featuregate.GA}, genericfeatures.ServerSideApply: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.APIPriorityAndFairness: {Default: false, PreRelease: featuregate.Alpha}, + genericfeatures.WarningHeaders: {Default: true, PreRelease: featuregate.Beta}, // features that enable backwards compatibility but are scheduled to be removed // ... HPAScaleToZero: {Default: false, PreRelease: featuregate.Alpha}, - LegacyNodeRoleBehavior: {Default: true, PreRelease: featuregate.Alpha}, + LegacyNodeRoleBehavior: {Default: true, PreRelease: featuregate.Beta}, } diff --git a/vendor/k8s.io/kubernetes/pkg/generated/openapi/openapi.go b/vendor/k8s.io/kubernetes/pkg/generated/openapi/openapi.go index 0e5fc0804ef..9879d428c5f 100644 --- a/vendor/k8s.io/kubernetes/pkg/generated/openapi/openapi.go +++ b/vendor/k8s.io/kubernetes/pkg/generated/openapi/openapi.go @@ -7,7 +7,7 @@ import ( "time" jsoniter "github.com/json-iterator/go" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/common" ) @@ -35,4 +35,4 @@ func GetOpenAPIDefinitions(_ common.ReferenceCallback) map[string]common.OpenAPI return definitions } -var api = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\x7b\x93\xdb\xb8\xb5\x2f\xfa\x55\x50\xca\x4d\xd9\x4e\xa9\xd5\xed\x99\x3c\xce\xf5\xd4\xae\x73\x3a\xb6\xb3\xe3\xca\x8c\xa7\xb7\xbb\x9d\xd4\xb9\xe9\xd4\x31\x44\x42\x12\x8e\x29\x80\x43\x80\xdd\x56\x76\xcd\x77\xbf\x85\xb5\x00\x10\x24\x41\x8a\x52\x4b\xfd\xb0\x99\x3f\x32\x6e\x11\x04\xf1\x5c\xcf\xdf\x5a\xeb\xbf\x27\x9f\xff\x87\x9a\x71\x79\x4a\x73\x7e\x4a\xd3\x35\x57\x8a\x4b\x51\xb0\x25\x57\xba\xa0\x9a\x4b\x71\x7a\xf3\x72\xf6\x53\xa9\xa9\xe6\x62\xf9\x0f\x36\x5f\x49\xf9\x79\xf2\xea\xbf\x27\x97\xc9\x8a\xad\xa9\xf9\x57\xca\x54\x52\xf0\xdc\xb4\x9d\xbc\x9a\x34\x9a\x12\x7c\x3a\x67\x8a\x50\x41\xfc\x07\xc8\xad\x7d\x4c\x45\x4a\xf4\x8a\x91\x82\x29\x59\x16\x09\x34\x4b\x89\xcc\x19\x7e\x5c\x11\xae\x09\xcd\xf3\x8c\x33\x45\xb4\x9c\x4d\xa6\x13\xbd\xc9\xd9\xe4\xd5\x44\xce\xff\x2f\x4b\xf4\x64\x3a\x29\xd8\x2f\x25\x2f\x58\x3a\x79\xf5\xcf\x89\xa0\x6b\x36\x99\x4e\x92\x8c\x33\xa1\x5f\x4b\xb1\xe0\xcb\xc9\x74\xa2\x78\xca\xde\x2e\x16\x2c\xd1\x6a\x32\x9d\xf8\x31\x7c\x60\x37\x9c\xdd\xfe\x9d\x15\xe6\x0f\x35\xf9\xd7\x74\x92\x17\xe6\xc3\x9a\x33\x65\xe6\xd5\xd5\xb0\x35\xe5\xf3\x78\x43\xc2\x61\xce\xb2\x48\x59\xc1\x52\x92\x71\xa5\x89\x5c\x90\xbc\x60\x0b\x56\x98\x5f\x3e\x35\x5e\xfc\x44\x6e\xdc\xab\x66\x49\xdc\x0a\xb2\x2f\xb9\x19\xfa\x8c\x9c\x5f\xbc\x23\x8a\x15\x37\xac\x20\xb7\x3c\xcb\x88\x2e\x36\x44\x4b\x52\x2a\x46\x16\xbc\x50\xda\xbd\x4e\xb8\x80\x0e\xe0\x8b\xb7\x2b\x9e\xac\xcc\x2a\xaa\x32\xcf\x65\x61\xfa\x79\xb7\x20\x42\x0a\x66\x06\x63\x9a\xf9\x8f\xaa\x9c\x25\x7c\xc1\x59\x8a\x1d\x70\x85\x3d\xd8\x17\x59\x4a\xe6\x9b\x60\x0c\x53\x72\x43\x33\x9e\xc2\x36\xe1\x78\x16\x94\x67\x64\x21\x0b\x7c\x17\x37\x08\xbe\x46\x49\x6e\xbe\xa1\x4c\x1f\x6e\xe3\x13\xd8\x9d\x12\xb7\xd9\x7f\x5a\x11\x9a\x65\xf2\x96\xa5\xd5\xa8\xcc\x79\x48\x25\x53\x44\x48\x4d\xb8\x48\xb2\x32\x65\x84\x8a\x4d\xd5\xe2\xb3\x90\xb7\xc2\xac\x84\x99\x8d\x19\xe0\xa5\x1d\x60\x42\xb3\x4c\xb9\x07\xee\xc3\xd5\x50\x4d\xcf\x73\x46\x54\x09\x23\x75\xed\xcc\xa3\xb2\x60\x24\x97\x19\x4f\x36\xc1\x89\xa3\x45\x41\x37\x93\xe9\x84\x6b\xb6\x86\x53\x60\x7f\x57\xba\xe0\x62\x39\xf9\xf5\xd7\xc6\xc1\x6b\x9d\x93\xd7\xc1\x53\x92\xb2\x05\x17\x4c\x91\x95\xbc\x35\x5f\x4e\xe4\x7a\x5d\x0a\x9e\x50\xcd\xc8\x2d\xd7\x2b\x18\x8a\x19\xef\x8c\x7c\x70\x07\x7c\x3a\xf9\x7f\x0a\xb6\x98\xbc\x9a\xfc\xe6\x14\xde\xe6\x70\x43\x4e\xb9\x9c\x99\x3b\x4c\x73\x3e\x8b\x5e\xe0\xd9\xcd\xcb\x99\x3d\x4b\xe1\x08\x26\xbf\x4e\x27\x76\xae\x17\x30\xd5\xf6\x80\xff\x12\x3e\xae\x8d\xb8\x14\x05\x4b\xe4\x52\xf0\x7f\xb3\x94\xb0\xa2\x90\x85\x22\x8b\x42\xae\x61\xd8\xd5\x2d\x67\x22\xcd\x25\x17\x9a\xd0\x82\x91\x15\x15\x69\xc6\x52\x72\x52\xed\x31\xcd\x4a\xb3\xe5\x05\x23\xef\x96\x42\x16\x8c\xc8\x82\x98\x8f\xce\xc8\x1b\xb6\xa0\x65\xa6\x61\xf7\xe0\x97\x6a\x1f\xdc\x7a\x4f\x27\x6b\xaa\x93\x55\xd7\xe0\x83\x87\xf5\xc5\x5e\x31\x72\x3d\x29\xca\x8c\xa9\xeb\x09\x9e\x70\xae\xcc\x25\x4a\xcd\xb7\xe0\x2d\x73\xcc\xe4\x9a\x8b\x25\x31\xc4\x85\x29\xb8\x7c\xed\x31\x5f\x4f\xde\x7e\xa1\x89\xbe\x9e\x98\x61\x5f\x4f\xde\xfe\x52\xf2\x1b\x9a\x31\xa1\xaf\x27\xb3\x6b\x71\x2d\x4e\x08\x3c\x7f\x65\x3b\xa5\xae\x37\x22\x45\xb6\x21\x7c\x61\x6e\x25\x33\x2d\xb2\x0d\x36\x31\xfd\x06\xb7\xd0\x8c\x71\x46\xfe\x22\x0b\xd3\x6a\x9d\x67\x6c\x6a\x5e\x4a\x59\x9e\xc9\xcd\x9a\x09\xad\x48\x42\x85\x39\xc1\x6b\x99\xe2\x1b\x37\x9c\x1a\x6a\xa9\x4e\x6f\x5e\x4e\xdd\x3f\xe6\x4c\x53\xf3\x97\x48\x09\xfb\xa2\x99\x80\x3b\x53\xfd\x3e\x2f\x75\xb0\x1c\x38\x32\xbc\x64\x29\xf9\x44\x73\xfe\x9f\x85\x2c\x73\xf5\xea\x9f\xd7\x13\xd3\xdf\xf5\xe4\x5f\xa6\x63\xee\x68\x9c\xf9\xfd\xe6\x25\xfc\xea\x29\xf8\x2b\xf2\xcf\xeb\x49\x30\xca\xeb\xc9\xbf\x3e\x4d\x83\xd9\x6b\x59\x1b\x1a\x81\xf9\x35\x07\x46\x6e\x65\x99\xa5\x70\xe7\xcd\x15\x65\x42\x37\xee\xb1\x5b\x61\xbf\xe8\xed\x65\xe6\x0b\xb7\x32\x0a\x7e\xc5\xf1\xc1\x96\x23\x8d\x83\x59\x4f\x09\xbb\x61\x02\x97\x4e\x48\xbd\x62\x05\xd0\x90\xa5\x99\xb7\x19\x9b\x25\x33\x47\xdf\x08\xf3\xfb\xe3\xdd\x88\x39\x33\x14\xfb\x86\x01\x1f\xa8\x5e\x84\x51\x77\xed\x4e\x78\x87\xeb\xd7\x23\x76\x99\x81\x77\xb7\x6e\xf1\xd5\x8a\x11\xf3\xc4\x31\xab\x96\x04\x31\x23\xef\xcd\x63\xb5\x72\xc3\x5c\x94\x59\xb6\x21\xbf\x94\x34\x83\xad\x98\x12\x36\x5b\xce\xa6\x84\xaf\xe9\x92\x59\x9a\xfe\xb9\x9c\xb3\x42\x30\xcd\x8c\xe4\x33\x25\xb7\x2b\x06\xb7\x39\x68\x72\x3d\x31\x44\x41\x37\x3e\x6e\x3f\x89\x7b\x55\xeb\x24\xd6\x5a\x16\x4b\x2a\xf8\xbf\x91\x06\x7b\x2a\x1e\x25\x64\xe6\x35\x95\xd3\x84\x5d\xb2\x8c\x25\x5a\x16\xed\x85\x78\xdf\x6c\x42\x52\x96\xf0\x94\x29\x33\x7c\x38\xb5\x5a\x92\xa2\x14\x35\x5e\x27\x05\x48\x20\xc8\xdf\xe6\xd4\xd0\x38\xb3\x72\xee\x05\x3b\x60\xe8\xd6\x32\x6e\xaa\x5d\x73\x47\x91\x4c\x2b\x65\xbf\x09\xdc\x1c\xe6\x86\x6d\xb8\x56\x2c\x5b\x80\xa0\x53\xf5\x34\x85\x16\xf0\xba\x21\xa1\x5c\x19\xee\xbf\x90\xc5\x1a\xbf\x6e\xe5\x82\x35\xd3\x34\xa5\x9a\xce\x32\x3a\x67\x99\x6a\xf5\xac\xfc\x6d\x4c\xb2\x52\x69\x56\x10\x95\xc8\xdc\x50\x45\x7b\xbc\xa7\x86\x7c\x0a\x66\xa4\x21\xf5\x99\xe7\xaa\x75\xfc\x6a\xf7\xb5\x6b\x71\x36\xf6\x83\x66\x19\xa5\x0a\xd7\x83\xa3\xc4\x41\x95\x92\x09\xa7\x20\xba\x18\xbe\x6c\xae\xa8\xc8\xd8\x0d\xcb\xcc\x2d\x5d\x90\xeb\xc9\x99\x63\x00\x2f\xaf\x27\x3f\x10\xb2\x91\x25\xca\x18\x8a\xe9\xda\xe2\x11\xaa\xc8\x42\x1a\x36\xa2\x5e\x91\xeb\xf6\x9e\x5f\x4f\x5e\x91\xff\xbe\x16\x84\x5c\x23\xef\x7a\xfb\x25\x2f\x18\x9c\x75\x65\x1e\xfd\xd3\x3c\x22\xd8\xc2\xfc\xef\x7a\xf2\x99\x6d\xcc\x83\x70\x44\xd3\xea\x29\xca\xd0\xd8\xed\xf5\xe4\xbd\xd4\xef\x44\xed\x39\x32\xb2\xa0\x67\xfc\xf9\x2c\x68\x44\x70\x52\xee\xcf\x7f\xe1\x3f\x7e\x35\xff\xf9\xd7\xb5\xf8\xd5\x2c\xf2\xbb\x05\xe1\x42\x69\x46\x53\x9c\x38\x45\x52\x00\xe4\x6b\xf7\x05\x6f\x2e\x36\xf2\x6a\x26\x6e\x78\x21\xc5\x1a\x48\x07\xae\x79\x5e\xc8\xd4\x2d\xbb\xd2\x74\xc9\xc5\xd2\x2c\xfe\x03\xac\x7d\x6d\x70\x9d\xcb\x3f\x6c\xed\x71\x56\xb5\xe5\xf7\x93\xeb\xdb\x84\x4b\xc6\xc8\x4a\xeb\x5c\xbd\x3a\x3d\xad\x91\xa5\xd3\x54\x26\xea\x34\x91\x22\x61\xb9\x56\xa7\xf2\x86\x15\x46\xd1\x38\xbd\x95\xc5\x67\x2e\x96\x27\x66\x91\x4f\xec\x7e\x9c\xe2\x45\x3c\x05\x42\xb0\x36\xc2\x98\xbd\x3c\xca\x2c\x39\x3c\xf4\xcb\xa9\x42\xfa\xee\x48\x3f\x5b\xe7\x7a\x43\x7e\x34\x0d\xdd\xb2\x4e\xad\xfa\xe1\x68\x89\xb9\xad\x1b\x6d\xc8\xc2\x6c\xbb\x34\xbb\xa6\x86\x80\xb0\x62\x33\xcb\x3f\x2f\xcd\x0f\x0a\x88\x86\x11\x67\x6b\x1f\x31\x04\x14\xe7\xd0\x4d\x3d\x7f\xae\x3d\x1f\x42\x3a\x3d\xb5\xe4\x35\xba\xb4\xa2\xaa\x22\x6d\x8e\x74\xd5\xbf\x6e\x0e\x32\x33\x3b\x0c\xe7\x98\x2e\xa9\xb9\x20\x64\x2e\xed\x79\x96\x59\x8a\xa3\x01\x2e\x22\xd8\xad\xfd\x0b\x68\xaf\x67\xb6\x11\x9e\x8a\x6c\x87\x2b\xc3\x88\x8d\x4a\x5b\xd4\x24\xd6\x05\x61\x1c\xe6\xd2\x4b\xbe\xcf\x89\x28\xb3\xcc\xb5\x79\x5e\x8d\xc5\xaa\x8c\x09\x55\xc0\xbf\x92\x82\x51\xcd\xa6\xe6\x82\x55\x23\x6c\xb4\x49\x59\xc6\x34\x7b\x61\xda\x54\x4c\x06\x66\x91\x50\x61\x48\xe7\x8a\xde\x30\xbb\x46\xe4\x79\xc6\x3f\x33\x42\xc9\x1b\x2f\x8e\x7c\x90\x59\x36\xa7\xc9\x67\x78\x9f\x5c\xc8\xf4\xa2\x90\x5f\x36\x3f\xe7\xa8\xf6\x63\x77\x2f\x1c\x15\x8e\x4c\x79\x46\x3e\x2a\x16\x6e\x8d\xbf\xeb\x4e\xbc\x0e\xb7\xd3\x28\xa4\xb9\x3e\xe1\x62\x4a\xe6\x2c\xa1\x46\x67\x66\x22\x35\x62\x7f\x61\x36\x74\x03\x3c\x24\x2e\x61\x18\xb5\x57\x31\xad\xcd\x8e\x83\x5a\x6d\x77\xfd\x11\x1d\xff\x82\x71\x71\x23\x13\x10\x35\xba\xf4\xa1\x76\x1b\xc2\x45\x0a\x1a\x67\x70\x11\x8c\xe6\xee\xe6\x5d\xc9\x54\x46\x91\x66\x29\x59\x97\x99\xe6\x79\xc6\x88\xe6\x6b\x23\x53\x2b\x92\xd3\x02\x8c\x1a\x94\x28\x2e\x96\x59\x4d\xf7\xc3\x2b\x00\xc2\x4f\x54\x79\x7a\x6f\x96\xe3\x7a\x62\x05\xdf\x77\x8b\xf7\x8c\xa5\x2c\xb5\xba\x13\x3c\x7c\xd5\x56\xdc\xad\x42\xe0\x06\x64\xc8\x94\x5e\x99\xe3\x27\x0c\x07\x11\x5b\x06\x82\x1c\x0b\x3f\x14\xe9\xbc\xea\x98\x6a\x92\x31\x0a\xaa\x9a\xe9\x2a\x85\xdd\xa1\x19\x4c\x3c\x9c\x77\x43\xdd\xf5\x5f\x6a\x50\x8d\x39\x33\x87\xc7\x34\xd4\xa0\x7a\xa8\x4a\x53\x98\x6f\x08\x8a\x39\x55\x37\x79\x56\x2e\xb9\x50\x84\x2e\xb4\x95\xd2\xe0\x78\xd0\xac\x32\x9e\xd0\x2c\x9b\x39\x03\x91\xc2\x4b\x87\x7a\xe3\xc6\x1a\x5f\x60\xd7\xc9\xef\xd6\xa5\xd2\xbf\x33\xf3\xe2\x29\x5b\xe7\x52\x33\xa1\xa7\x84\xce\xcd\x16\x4a\x92\x17\x32\x61\x4a\x79\x86\xac\x57\x6c\x43\xf2\x82\xdd\x70\x59\xaa\x6c\xe3\xc7\x3b\x23\xef\xa5\x66\xaf\xc8\xef\x50\x62\x2c\xd7\x73\x43\x66\x16\xe1\xba\x54\x47\x4b\xb9\x2b\xbb\x2c\x69\x41\x85\x66\x78\x65\xe7\xcc\xab\xba\x52\xb0\x19\xf9\x9d\x59\xa1\x8e\x0e\x0a\xa6\xcc\xbd\xe2\x82\x2c\xca\x02\xd6\x06\x57\xcb\x3d\xb7\x17\x0e\x87\x3d\x75\x8b\x82\xc7\x2a\xfa\x65\xd3\xf9\x67\x47\x8b\xcd\xb7\x6f\x6b\x2b\x57\x02\x1d\xa9\x56\xcd\x90\x83\x39\x23\x05\x73\xa6\x3b\x43\x72\xb8\xe0\x6b\xfe\x6f\x36\x68\x09\xcc\x27\xb4\x74\xf6\x31\x16\x90\x47\xdc\x52\x9a\x65\x64\x0d\x76\x52\x30\x70\x15\x2c\x1c\x72\x22\x0d\xd3\x35\xc4\xd7\x8c\x8b\x7a\x2b\x9b\x3d\x40\x75\xd2\x64\x65\xaf\x88\xba\x65\x6f\x57\x54\xdd\x00\x25\xb3\x4d\x21\x3e\x98\x9f\x03\x83\xed\x2d\x68\x03\x95\x29\x16\x54\x07\xaa\x2b\x05\xf3\x54\x95\xf3\xca\x70\x1b\x5e\xa7\x84\x16\xe6\x9e\xcf\x65\xa9\x67\xe4\x2a\xfe\x00\x96\xc5\xf5\x6e\xcd\x21\x8e\x52\xfe\x1f\x2a\x36\xff\x87\x7c\x00\x03\xc8\x5f\xe5\x2d\x03\x73\x1e\xb7\xc6\x54\x3c\xbb\x46\x6b\xd7\xe4\xef\x7e\x75\xbc\x31\xd5\x5f\x0b\x43\x58\x9c\x39\xba\xfd\x14\xcc\x55\x79\x59\xd1\x75\xa7\x67\x20\x15\xd1\x60\x89\x03\xf2\x6d\xd9\x19\x1c\x89\xc4\xc8\x50\x2c\xc5\xb7\x8d\xf8\x64\x26\xe2\xb6\x2c\xdb\x90\x94\x2b\x3a\xcf\x5c\x97\x78\x93\xa7\x77\x18\x25\x9c\x69\x50\x72\x2c\x65\x92\xa1\x15\xdd\x99\xa7\x40\x66\xab\x3e\xe2\xac\x7d\x35\x13\x6b\xf8\x9d\x68\x03\x4b\x06\xfa\x2c\x9e\x7b\xdb\x1f\xcd\x4e\xfe\x83\xeb\xd5\xcf\xfe\x34\x81\xbd\x34\xb4\xcc\xb7\x8e\xe3\x65\xf5\x10\xb7\xa3\x83\x4d\x19\x91\xcc\x74\x44\x18\x36\x9e\x91\xf3\xc4\xc8\xbb\x40\xe6\x2a\x8e\xf3\x8a\xbc\x97\x82\x4d\xe1\xff\x7f\x16\x6f\x8a\xcd\x87\x52\x90\xe7\x9e\x12\xa0\xc4\x83\x96\x1b\x67\xfa\x30\x84\x80\x66\x4a\x7a\xda\x7a\x29\xd7\x60\xa3\xfc\x28\xc0\xe6\xfc\x22\xa0\xc1\xa0\xaf\x84\xc3\x20\x3f\x7d\xbc\xbc\x22\xdc\x9c\x0c\x23\xee\x80\xdd\xc5\x48\xe2\x3c\xe3\xd6\xe6\xbd\x51\x9a\xad\xa7\x86\x61\x25\x2c\x30\xcb\x78\xf2\x63\xb6\x03\x39\x04\x25\x8b\x52\x97\x05\x23\x4a\xb3\xdc\xc9\x61\xd5\x31\x48\x56\x54\x2c\x99\xf7\xa5\xd4\x46\x61\xd6\x8b\x2d\x24\x1c\x23\x4f\x10\x4b\x91\x02\x15\xfe\xe0\xce\x8f\xd7\xb6\x52\x5c\x17\xaa\x75\xc1\xe7\x25\x18\xa3\x91\x31\xd2\x52\xcb\x13\x3f\x26\x64\x6f\x1b\x6f\x72\xab\xd8\xa8\x5d\x05\xb7\x71\xff\xf1\x1f\x6e\xb1\xcc\xba\x99\xf5\x8b\x52\x24\xc3\x57\x65\xa9\x2f\xcd\x0a\xa5\x91\xb3\x70\x55\x7b\x1e\xb8\x0b\xcc\x98\xed\xcb\x95\xeb\xc1\x9b\x86\xce\x3d\x07\x75\x6d\x72\xaa\x14\x53\xd3\x06\xb1\xca\x32\x3f\x4f\x0e\x86\xe8\x94\xc8\xc2\xbb\x13\xaa\xe7\xe0\x36\xf0\x9a\x41\xc4\x5b\x00\xb4\xce\x7d\x0b\xce\x1e\x31\x2c\xd8\x74\x3c\x67\xfa\x96\x31\x41\xd0\x66\xf6\xfd\x19\x51\x38\x99\x9a\x20\xf9\xb2\xfa\xb9\x5a\x26\x2e\x34\x5b\xb2\x62\x32\x9d\x2c\x64\xb1\xa6\x1a\x7f\xfa\xfe\xbb\xc9\xaf\xe6\x0e\xbd\x61\x39\x13\x29\x13\x09\xb8\xad\xfe\x39\xc8\x9f\x17\xb9\x8e\xd3\x41\x2f\xc6\xfc\x08\xe1\x9b\x5e\x68\x3d\xcd\x3f\x2f\xcd\x0f\xea\xd4\x08\xad\xa7\x2d\xa1\xf5\x5f\xbf\x0e\xfb\x60\x1f\xc5\xda\xc1\x0d\x59\xa7\x74\x15\x8b\x03\xba\x5f\xa7\x82\x0b\xd8\x9f\x36\xab\x05\x51\x81\x02\x65\x31\x87\x03\xaf\x02\xb4\x35\x17\xd6\x5e\xc1\x4a\x2e\x89\xb9\x2a\x1b\xfe\x45\x6f\xbd\x8d\xb8\x14\x2f\xde\xd9\x67\xde\x77\x11\xb8\xea\x58\x4a\x14\xcc\x1b\x45\x50\x6e\x44\xa6\xbc\x60\x46\x67\x0c\x26\xe1\x3d\x70\xe8\x0e\x53\x4e\x9e\xb7\x76\x5c\x12\x78\x70\xb0\x37\x2f\x59\x65\x86\xd8\x1a\x01\x4c\xb3\xc2\x88\x36\x70\x90\xa7\x7e\xae\x76\xea\x35\x1f\x10\xd2\xd9\x19\xf9\xc9\x50\x1a\x2e\x16\xf2\x95\xb7\x48\x2c\xb9\x9e\xd9\xad\xb6\x5e\x2e\xbd\x39\x4d\xa4\x40\x0a\x23\x0b\x75\x9a\xb2\x1b\x96\x9d\x2a\xbe\x3c\xa1\x45\xb2\xe2\x9a\x25\x86\xd8\x99\x83\x71\x02\x83\x15\x28\x55\xad\xd3\xdf\x78\x69\x23\x46\x44\x3e\x73\x91\xb6\x97\xf2\x6f\x1c\xb5\x66\xc3\xd3\x4d\x4b\x7b\x2d\xfd\x8a\x39\x5e\xfd\xe1\xed\xe5\x55\xe5\x24\x08\x5c\x98\x55\x53\x55\xad\xa5\x59\x07\x2e\x16\x8e\x17\x79\xdf\x97\xf7\x78\xa1\x44\x61\xae\x09\x51\xe5\x7c\xcd\xb5\xaa\xb8\xb5\x96\x33\xf2\xda\x0b\x15\x65\x6e\x84\xc4\x74\x46\xde\x09\xf2\x9a\xae\x59\xf6\x9a\x2a\x76\xf4\x95\x34\xab\xa7\x4e\xcc\x92\x45\xd7\xd2\x99\x67\x23\x6c\x59\x53\x91\xd2\x22\xf5\x86\x06\xdb\xf2\x87\x63\x8f\xd8\x5b\x8c\xef\xa4\x3b\xa3\x2d\xe3\x27\xa6\xa9\x99\xa6\x63\xff\xed\x69\x7a\xc6\x0e\x47\xc7\x39\xef\x6f\x43\xa9\x0d\x98\x30\xf0\xb9\xc0\x2c\xdd\x04\x30\x1c\x45\x9c\x6a\xe2\x31\x7e\x9d\x4e\xbe\x9c\x54\x96\xbf\x93\xdc\xb0\xe5\x93\x35\x2b\x96\xec\xe4\x33\xdb\x4c\x5e\x39\x64\x44\xa4\x15\xf4\xcb\x96\xa6\x11\xbc\xb0\x3f\x57\x69\x8e\x6a\x20\x63\x08\x76\xe4\x10\x5c\xe1\x47\xae\xf4\xbe\x9c\xe1\x47\xeb\x0d\xae\x36\xbc\xaf\xf5\x36\x34\x0a\xee\x73\x1b\x57\x32\xd2\xfd\xc3\xd2\x7d\x7f\x9f\xea\x6b\xf9\xe3\x6e\x5b\x78\xb4\xdb\x59\x97\x59\x7e\x1d\x19\xd5\x7d\x33\x2a\xb8\xcb\x9e\x7b\xdc\xef\x78\xef\x60\xe4\xe5\xca\xb2\xa9\x03\xd1\xe3\xfa\x39\x1c\x2a\xb5\xbb\x51\x0c\x25\xcd\x46\xb5\xe8\x23\xbf\xe6\x39\x9e\x72\x5d\xe6\x19\x38\x12\xce\x2f\xde\x21\xb8\x61\x4a\x2a\xfa\x87\x64\xe7\x83\xbb\xf7\xb3\x77\x40\x98\x0d\xe5\x59\xaf\xcd\x4a\x58\x47\xc0\x67\x46\x54\x89\x46\x60\x0d\x76\x35\x50\xf6\xa0\x67\xf6\x25\xa7\x42\x79\x13\x1b\xd8\xd1\x06\x49\xe5\x38\x98\x28\x71\xc6\x47\xce\xdb\xef\x71\x22\xaa\x81\x61\x9c\xb3\x4c\x9a\xdb\x2a\x67\xe4\xd9\xef\x9e\xc1\x74\xb3\xcc\x36\x05\x4f\xb7\xfd\xd5\x5e\x57\x54\x47\x33\x26\x96\x7a\xe5\xac\xca\x2a\xe3\x49\xa5\x3c\x7a\x6d\xbd\x01\x21\x18\x80\x49\x0b\x40\x22\x7d\xfc\xa6\x36\xa9\x1a\x0e\x71\xdb\xb4\x5c\xe3\xfb\x9e\x58\xc5\x13\xda\x87\xcc\x0f\xb9\xc6\xcc\x43\x5b\xa5\x39\x4c\xe6\x28\x06\xe0\xd2\x06\x68\xe0\x15\x79\x96\xcb\x54\x3d\x23\x6b\x46\x85\x22\xe6\xdf\x33\xfc\xe9\x34\x93\x4b\xf7\x33\x4c\x50\x2e\x49\x60\x0a\x05\x94\x27\xb6\xfe\x9d\x6b\x66\x16\xca\x7f\x1e\x51\x57\x86\xaa\x86\x06\x54\xd7\x79\xed\x9d\x9a\x85\x35\xe8\xf7\x54\x25\x34\x63\xb5\x96\xe6\x87\x66\x87\xbf\x3b\x8d\x8f\xc0\xc9\xaf\xbc\xa8\xbf\x61\x5d\xfa\xb7\x3c\x4b\x13\x43\x3a\x9b\x5b\x19\x40\x3e\x61\xf5\xc0\x2a\xc2\x04\x5c\xc1\xaa\xf3\x54\xc2\xe4\xe4\x0d\x2b\x32\x9a\xa3\x51\x88\xd1\x64\x85\x9e\x0e\x6b\xac\x36\xf4\xcc\xb0\x34\x6b\x48\x61\x22\xc9\xa4\x82\x1f\xac\x5d\xbf\x36\xf5\x35\x5f\xae\xb4\xf3\xfe\x58\xfc\xe0\xbe\x07\x07\x80\x24\xed\x43\x03\x3f\x37\x4c\x4b\xf8\x9b\x97\xb6\xc0\x1e\x0d\x76\xd6\xba\x2b\xeb\x35\x9a\x8e\xaf\x27\x53\x72\x5d\x21\x75\x52\xf3\x37\x7a\xb7\x7e\x77\x3d\x09\x9b\xf9\xb3\x43\x2d\x18\xd0\xda\x9e\x4f\x1a\x18\x17\x85\x0b\x8c\x56\xb6\x60\x08\xfe\x13\x70\x5b\x9d\xff\xc6\x8c\xa5\xde\xd1\xac\x31\x9c\xd6\x77\x3d\x10\x62\xfb\x37\x71\x12\x41\x07\x60\x59\xb4\x4e\x17\xbb\x50\x05\x33\xcb\x9c\x58\x27\xc8\x65\x6d\x03\x6d\x7f\xb5\x35\x35\xe7\x2f\xa7\x85\x91\x3d\x5c\xcb\xca\x1c\xc6\x15\x7e\x33\x62\x30\x6c\x73\x44\x51\x66\xd9\x0e\x1c\xaa\x61\xfc\xda\xc2\xaf\xea\xad\x1b\xdc\x2b\x78\x50\xe7\x58\x64\x64\x59\x23\xcb\xaa\x4f\x4c\xd6\x8e\x5c\x03\xa2\x52\x3b\x60\x60\x48\xac\x7e\xa9\xdb\xfb\x5b\x9e\xb4\x13\xf2\xfa\xc3\xdb\xf3\xab\xb7\x53\xf2\xf1\xe2\x0d\xfc\x57\x16\xe4\x77\x60\x10\x37\xd3\x0d\xac\x11\x23\x8f\x1e\x79\xf4\xc8\xa3\x47\x1e\xfd\xc8\x79\xf4\x25\x2b\x6e\x78\xc2\x3e\xb0\x05\x2b\x98\x48\x7a\x35\xca\x66\x5b\xb2\x92\x59\x8a\x88\x7f\xf7\x8b\x96\xc4\xb6\x9a\x65\x6c\x49\x93\x8d\xd5\xf6\x07\x84\x93\xc1\xca\x4f\x2c\x3c\xbd\x65\xcb\x8b\x83\xd6\x3f\x99\x9f\x3f\xc5\x30\xe1\xca\x8e\x22\x0c\xea\xe9\x46\x83\x77\xf4\x0c\xcf\x6a\xdd\xe3\x39\xdb\xe5\x1b\x39\xd5\xab\x48\xf7\xe6\xe7\x4f\x2e\x70\x2d\xb7\xc8\x96\x8f\x1f\x7e\x24\xe6\x81\x85\x43\x38\x4f\x29\x40\x14\x39\x62\x7a\x83\x90\x02\x38\x8e\x6e\x0c\xd1\x4f\xcb\x42\xb7\x3f\xfd\x6e\x51\x45\xbe\x20\x1d\x33\xed\x1c\xe5\xb1\xfd\xe1\xa1\x5e\x49\x05\xc6\x30\xef\xe6\x0d\x1c\xa8\xbf\xff\xfd\xf7\xc0\xf6\xe6\x34\xf9\x7c\x6b\xa8\x63\x22\xd7\x39\xd5\x7c\xce\x33\xae\x37\x33\xf2\xc9\xf4\xfa\x29\x80\xb6\x59\x80\x0d\x7e\xcd\x02\x7b\x9e\xbf\x3c\xf9\xe3\x1f\xfe\xf0\xfd\x1f\xa6\x18\x81\xa1\xf8\x0d\x7b\xb1\xa7\x3f\x76\x87\x33\xdf\xc2\x6f\xf4\x1d\xfa\x56\xe3\x31\xd0\x72\x0c\xb4\x1c\x03\x2d\xc7\x40\xcb\x31\xd0\x72\x0c\xb4\x1c\x03\x2d\xc7\x40\xcb\x31\xd0\x72\x0c\xb4\x1c\x03\x2d\xc7\x40\xcb\x31\xd0\xf2\x91\x06\x5a\x8e\x71\x96\x63\x9c\xe5\x18\x67\xf9\xc4\xe2\x2c\xc7\xc0\xa9\x31\x70\x6a\x0c\x9c\x1a\x03\xa7\xc6\xc0\xa9\x31\x70\xea\x71\x07\x4e\xf5\x13\xb5\x9d\x5c\x0b\x47\x0d\x9e\xb2\x42\x85\xe7\x08\xe6\x46\x82\x36\x3b\x46\x50\x8d\x11\x54\x5f\x39\x30\x7d\x8c\xa0\x7a\xb0\x08\xaa\xb6\xb3\xf5\x71\xc4\x50\xb5\xc7\x75\xbc\x28\xaa\x7e\x42\xbf\x2d\x8e\x6a\xfb\xdb\xf5\x8d\xef\x6f\x3f\xc6\x52\x3d\x0e\x0e\xb0\x25\x96\x6a\xf0\x26\x1e\xf1\xa6\x8e\xf1\x54\x63\x3c\xd5\x83\xc4\x53\x6d\x39\x89\xc7\x8a\xa8\x8a\xa9\x0e\x3d\x74\x39\xd2\xdc\x90\x2b\x4d\xb9\x85\xbb\x98\xad\x32\xda\x90\x21\x72\x0e\x90\x4e\xc9\xd5\x8f\x97\xa6\x99\x60\x89\xc5\x99\x58\xbd\xf6\xd6\xb3\xa1\x7e\x59\x3c\xa1\x7f\x2e\x45\x9a\xc5\x30\x6b\xee\x11\x02\xcb\xc8\xc5\xdb\x9f\x08\x13\x89\x4c\x59\x4a\x5e\x9f\x93\x39\x3c\x6b\x60\xcb\x1c\x4a\xc0\xa7\x50\x0a\x86\xf2\x4c\x39\x70\x4e\x62\x3e\x0f\x79\xa1\x18\xb8\xb5\x4a\x11\x40\xc8\xd0\x4a\x40\x74\x61\xd4\xc8\x42\x4a\xad\x9c\xea\x69\xb6\x03\x3b\xa0\x05\x7e\xaa\xad\x5a\x07\x2a\xe3\x7c\xa3\x99\xb9\x19\x16\x83\x16\x99\xa0\x7d\x62\xe7\x57\x83\x1d\x86\xe0\xb5\xb6\x9a\xfd\x16\x4d\xc9\x55\x07\xb2\x20\x9f\xca\x22\xfb\xe4\x95\x5f\x3f\x21\x07\xfb\x6d\x18\x5b\x8b\x52\x08\xc0\xc2\x71\xbd\x72\x76\x63\x34\xc7\x81\xaa\x2e\xc0\x53\x63\x99\x56\xa9\x58\xf5\xa9\x01\x32\x60\x37\x4d\x6e\xc1\x33\x7f\x9d\x4e\xca\x22\x8b\x2c\x0d\x4c\x66\xc9\x6f\x98\x43\x61\x27\x9e\xbb\xd6\x4c\xee\x5c\x10\xe5\xe8\xcb\xc7\x0f\x3f\x9a\xb5\x5a\x93\xe7\x9f\x80\xa9\xb2\x57\xa7\xa7\x2b\xa9\xf4\xab\x5c\x16\xfa\x14\x20\x8a\x2f\x66\x08\xf9\xc0\x74\x62\xa6\x37\xfc\x92\x0c\x17\x33\xbe\x86\x57\x2b\x46\x3e\x99\xee\x3c\x0a\xd0\x90\x63\xd8\x34\xf0\xb7\xfb\xed\x72\x4b\x5b\x5f\xd6\x1f\x6c\xba\xb0\x60\x29\xc9\x82\xb3\x2c\xf5\xb9\xb8\xc0\x94\x61\x3e\x60\x01\xd1\x73\x04\xdd\x65\x37\xd6\x48\xc6\xbe\x58\x91\xe0\xcd\xfb\x4b\x98\xb7\x5c\x07\x67\x52\x91\xe7\xe8\x47\xff\x64\xa4\xcc\x13\xff\xfb\x27\x67\x4d\xb5\x7d\x11\x2e\x4e\x9c\xe1\xd5\x74\x44\x55\xc3\xb3\x41\x49\x46\x37\x0c\x19\x1f\x97\x19\x2c\xfb\x8b\x99\x9b\xba\xb7\xd0\xcd\x21\x3d\xd9\xbb\x0b\x42\xd3\xb4\x60\x0a\x3d\x4e\x17\x19\xa3\x0a\x92\xa9\x31\x97\x22\xcd\xf4\xf3\xc9\x6c\x5f\x86\x1d\x98\x95\x7e\xf9\xdd\x9f\x66\x67\xb3\xb3\xd9\xcb\x4f\xe6\xf3\xd4\xf5\x6d\x8e\x25\x57\x9f\x37\xa4\x14\x19\x53\x0a\x8e\xa0\x36\x54\x66\x59\x30\xf0\x5a\x14\xac\xf2\x04\x05\xf6\x48\x29\x00\x00\x6f\x3a\x51\x96\x1e\x98\x36\x54\x04\x37\xd6\x1a\xfa\x11\x69\xce\x82\x90\x9a\x00\x82\x16\xde\xb0\xcb\x12\x50\x46\x4a\xc3\x63\xf3\xe5\x8c\x7f\x66\xd9\xc6\xda\xf3\x84\x14\x27\xe6\x54\xd1\x39\x60\x4d\x66\x6c\x36\x85\xe3\xc0\xa8\x82\x26\xba\x2c\x04\x29\x73\x34\x6d\x0b\x76\xeb\x4e\x81\x3f\x49\x78\x40\xfd\x51\xbb\x9e\x00\x0b\xbc\x9e\xfc\x00\x47\xc4\x9c\x64\xfb\x68\xc9\x85\xf3\x6b\x3b\x2e\x69\xd1\x4b\xe7\x08\xae\xf5\xf9\xe7\x68\x66\x3d\x50\x0b\x87\xeb\x77\x96\x4d\x2a\x36\x4e\x96\xc9\x59\x01\x77\x73\x9e\xd9\xb4\x87\x1f\x3f\xfc\x38\x23\xff\x5b\x96\xd0\xd6\x1d\x51\xe8\x58\x4b\x30\xde\xc1\x3a\x16\x73\xae\x0b\x5a\xf8\x6e\x9a\x9e\xaf\x45\xe8\xca\xa7\x95\x65\x3f\x35\x0c\x79\xc1\xed\xc4\xcf\xb5\x66\xeb\x5c\xdb\x0e\x30\x4d\x5d\xa9\x58\x41\x00\x78\xab\x78\x42\x68\xa9\x57\x80\x07\x21\xd7\x13\xf3\xe4\x95\x19\xc1\xad\x2c\xd2\xff\x85\x80\x0f\x70\xf8\xbb\x08\x81\xbf\x14\x74\x89\xe8\x9e\xe7\xd7\x93\xdf\xcc\x66\xb3\xeb\xc9\x0b\x58\x81\x5f\x4a\x56\x6c\x48\x4e\x0b\xba\x66\x1a\xae\xc6\xf5\xe4\x7f\xba\xe7\x36\xd9\x9f\xed\x65\x6a\xdd\x72\x83\x80\xe8\xc3\xd8\x7d\x8b\xc8\x0d\x64\xd8\x60\x02\x7f\xd2\x25\x53\x46\x84\xee\x88\xd0\x8d\xd9\xe8\x03\x7b\xfb\xa7\x7f\x3e\xb3\x27\xfd\xd9\xbf\x3e\x7d\x1d\xd8\x5d\xbc\xb7\x4f\x1a\xc0\x8b\xcf\x46\x08\xef\x08\xe1\x1d\x21\xbc\x4f\x1a\xc2\x8b\x77\x65\x44\xef\x8e\xe8\xdd\x11\xbd\x3b\xa2\x77\x47\xf4\xee\xa3\x43\xef\x8e\x65\x52\x46\xf8\xee\x08\xdf\x7d\x6a\xf0\xdd\xb1\x4c\xca\x58\x26\x65\x2c\x93\x32\x96\x49\x19\xcb\xa4\x8c\x68\xff\x47\x88\xf6\x47\x0b\xe4\xa3\x80\xfc\x5b\xec\xf9\xd4\x62\xff\x2f\xe5\xba\x19\x01\x30\x02\xf8\x77\x06\xf0\xd7\x6c\xb5\xf6\xe1\x88\xea\xef\x41\xf5\x7f\x7f\x2f\xa8\xfe\xce\x6b\xb7\x83\xbb\xef\xbe\xf1\xfd\x51\x27\xe3\x13\xaa\x8e\x62\x34\x9c\x82\x25\xd4\x5a\x97\x6f\x5e\xce\x5e\xfe\x71\x4a\xf2\x8c\x0a\x61\xd8\x06\x74\xb1\x96\x37\x20\x30\xc0\xd3\xff\x17\x15\x99\x38\xe9\xb4\x0b\x76\xf3\xb2\x9f\x74\x3b\x31\x60\x0c\x2c\x18\x03\x0b\xbe\x6a\x84\xe6\x18\x58\xf0\x50\x81\x05\x71\xf0\xc7\xa3\x88\x2d\x88\x0f\xed\x68\xe1\x05\xdb\x39\xd4\x58\xa9\xe5\x5b\x63\x03\x8f\xac\x52\xcb\x00\x21\x6a\x0c\x2f\x18\xc3\x0b\xee\x27\xbc\x60\xc0\x61\x3c\x52\x84\x41\xa5\xff\x8c\x85\x5b\xc6\x2c\xf8\x63\x52\xf8\x31\x29\xfc\x98\x14\x7e\x4c\x0a\xff\xe8\x92\xc2\x77\x9a\xe9\xc6\xea\x2d\x23\xdf\x1a\xab\xb7\x8c\x8c\x7a\x64\xd4\x23\xa3\x1e\x19\xf5\x63\x61\xd4\x63\x09\x97\xb1\x84\xcb\x37\x56\xc2\x05\x0f\xfe\x53\xaf\xe3\x32\x46\x7f\x8e\xd1\x9f\x63\xf4\xe7\x18\xfd\x39\x46\x7f\x8e\xd1\x9f\x63\xf4\xe7\x18\xfd\x39\x46\x7f\x8e\xd1\x9f\x63\xf4\xe7\x18\xfd\x39\x46\x7f\x8e\xb5\x5b\xc6\xe0\xcf\x31\xf8\xf3\xa9\x06\x7f\x8e\xd1\x5c\x63\x34\xd7\x18\xcd\x35\x46\x73\x8d\xd1\x5c\x63\x34\xd7\xa3\x8c\xe6\xfa\x0a\x4a\xb6\x1c\x2b\xac\x6b\xcb\x04\xc7\xc0\xae\x31\xb0\xeb\x9b\xc0\xc6\x8f\x81\x5d\x0f\x1b\xd8\xf5\x48\xcb\xc6\x74\x0d\xee\xc8\xc1\x5d\x63\x01\x99\x91\x21\x3c\xfa\x02\x32\x83\x64\xab\x31\xcc\x6b\x0c\xf3\xba\xcf\x30\xaf\x87\x29\x25\xd3\xad\xdc\x8c\xf5\x64\xc6\x7a\x32\x0f\x57\x4f\xa6\x03\x30\x3a\x16\x95\x19\x8b\xca\x8c\x45\x65\xc6\xa2\x32\x5f\x51\x51\x99\x0e\x4a\xd7\xe4\xdf\x08\x19\x9a\xbd\x36\xb2\x8e\xcc\x32\x56\x7c\x60\x37\x5c\x6d\x31\x02\xb6\x5b\x57\x56\x7b\xd8\x28\xbe\x5e\x97\xe8\x1b\x50\x82\xe6\x6a\x25\x41\x22\x47\xa7\x0f\x0a\x61\xc8\xe4\xf1\x48\x17\x4c\xe5\x52\xe0\x61\x30\x3b\xa8\x58\xc1\x69\xc6\xff\x0d\x19\x16\x45\x4a\x52\x16\xfe\x52\xf9\x18\x2d\xc9\xb0\x22\x82\x0d\x41\xf0\x5a\x0c\x7c\x6d\x46\x7e\x46\x57\x41\x64\xc8\x2b\xaa\xc8\x9c\x31\x41\x54\x99\x24\x4c\x29\x44\x2a\xd9\x22\xf3\x00\x67\x49\xa8\x20\x4d\xd9\xf7\xaa\x06\x78\x0d\xec\xd9\x01\x34\xd7\xe8\x63\x10\xa1\xe3\xc4\x68\x30\x70\xe2\xa9\x83\x1b\x5f\x6a\x27\x19\xbc\xa1\x9a\x22\x01\x9e\x45\xc6\x08\xe2\xfb\x94\xac\x9c\x8b\x6e\xce\xac\x9f\xd7\xa6\x00\x85\x9e\xa7\x24\x2d\x81\x22\x19\xd1\xdd\x9c\xe6\xf9\xa6\xf2\x6f\xbf\xa1\x6c\x2d\xc5\x25\x43\x7b\xea\xa5\xf9\xee\xa2\xcc\xcc\xdf\x89\xff\x1a\xfa\xb7\x70\x86\xd0\xac\xb0\xce\xe0\x69\x4d\xbb\xe0\x66\xb9\xcc\xde\x55\x1e\x43\x7f\xb5\x03\x40\x2f\x60\xae\xa0\x97\xba\x92\x8a\x2e\x17\x85\x59\x44\x35\x06\x19\x01\x9d\x56\x48\x2f\x12\x7b\x22\x02\xae\x96\xc2\xb1\x07\xb7\x3f\xfa\xa7\x1c\x30\x1f\x23\x26\xf3\x82\xaf\x69\xc1\xb3\x0d\x8c\xdf\x6f\xbc\x5d\x82\x60\x7e\xdb\x34\xf6\xc2\x9d\xf9\x51\x69\x3f\xb6\xd2\x1e\x57\xd5\xe0\x16\x70\x07\x8f\xc0\xbb\xce\x5a\x27\xc8\x85\xac\xc0\xc5\xde\x55\xb7\x2a\x4a\xa1\xf9\x9a\xcd\x3e\xd0\xdb\xb7\x0e\x50\x39\x9a\x95\x1f\xc8\xac\xfc\x4c\xdd\x9f\x3e\xee\x07\x75\x38\xbb\x72\x11\xf0\xc8\x66\xb0\xaa\xe3\x87\x3e\x93\x37\x86\xd0\xd8\x9f\xc3\x23\x5c\x1d\x11\x74\x59\xbf\xb1\xd6\xef\x5e\x77\xe5\x1f\x7f\xbf\x4d\x22\x18\x66\x7d\xed\xd6\xfb\xa3\x17\x65\xb0\xd8\xb0\xcd\x14\x1b\x7f\xc3\xa9\x9f\xf6\x1e\x59\x8e\x0e\xfc\xdf\x1b\x65\x23\x1c\xbc\x0d\xa9\x18\x0d\xb2\x8f\xcf\x20\xfb\xce\xfc\xec\xa8\x7b\xf7\x6e\xaa\xbb\x58\x64\xf3\x5c\xcd\xe2\x62\xec\x68\x6f\xbd\x2f\x1a\xff\x14\xe8\xf8\x70\xa3\x6a\xb7\x62\x74\x57\x93\xa9\xed\xd9\x4b\xe6\x7d\xe4\xb2\x12\xdf\xab\xb3\xd6\x01\xad\x20\x29\xb4\x25\x8a\xe9\x11\x9d\x30\xa2\x13\xbe\x4a\x12\xf3\x75\x89\x91\x2a\x67\x49\x3c\xc4\x2a\x65\xca\x08\x2f\x64\xce\x56\xf4\x86\xcb\xc2\xdf\xb5\xe0\x8e\x1f\x7b\xc2\x66\x74\x27\x54\xa4\x27\x46\x58\x2d\x07\xf8\xb2\x3c\x17\xf6\x44\xeb\xd2\x4c\xd0\x4c\x14\x7b\x88\x4e\x35\x29\x0b\xc8\x19\x81\x6d\xa2\x13\xbd\xc2\x1f\x34\x75\xd6\x06\x59\x82\x0c\x01\xf6\x8a\xf9\x06\x2d\xd0\xb7\x5c\xa4\xf2\x16\xde\x37\xd2\x2b\xb9\x90\x79\x99\x51\x2b\x5a\x83\xcc\x0d\x5e\x95\x19\xf9\xc0\x68\x7a\x22\x45\xb6\x79\x12\x2b\x88\x6f\x0e\xe5\x56\xf5\x95\xef\x67\x3b\x97\x6e\x50\x77\x05\x6e\x34\x3b\x7e\x2d\x05\xd6\x60\x19\xc4\xd8\x7c\xeb\x06\x76\x10\x55\x24\x60\x6c\x81\x0d\x4b\x13\x0a\xbe\x33\xca\x05\x01\x5a\xb7\x4d\xf6\x87\x67\xfe\x04\xb6\x74\x80\x8c\x2a\x7d\x55\x50\xa1\x60\x08\x57\x3c\x16\xf3\xf8\x23\x55\x1a\xeb\x0c\x59\xc6\x6b\xc7\xab\xfd\x7b\x0e\xb0\x2e\x05\x73\xe7\x58\x4b\x17\x30\x77\x37\x40\x13\x0c\x09\x68\xa2\x52\x74\x19\x19\xdd\x39\x59\x95\x6b\x2a\x48\xc1\x68\x0a\x16\x57\xdb\xd2\x69\xa0\x86\xc5\xa4\x4c\x53\x9e\xb9\xb8\x00\xc0\xf1\xfa\xb1\xc7\xeb\xd1\x30\xaa\x62\xa2\xc1\x15\xe8\xb2\xe6\x99\x75\x09\x06\xeb\xf1\x4c\x91\x0c\x56\xaa\xbf\xeb\x2e\x5a\x70\x19\xdc\xff\xa0\xd7\xa9\x73\x90\x5d\x15\x46\x0c\xf8\x0b\xcd\x14\x9b\xf6\x63\xa0\x37\xb1\x84\x40\x57\x1b\xcc\x53\x53\x9d\x25\xff\x89\x9d\x6d\xee\x3d\xd7\x04\xb6\x6b\xdb\x05\xd9\xa6\x23\xd7\x1a\xa2\xf8\x90\x18\x11\x34\x71\xf2\x55\x45\x1c\x47\xdd\xf7\x91\xc8\x7f\x1d\xba\xef\xb9\x57\x78\xe3\x7b\xb6\xb7\xa6\x5b\x69\x0f\xa3\x82\xfb\x95\x03\x8a\x1e\x46\xf1\xad\x0e\xd8\xa1\xf5\xdd\x4b\x2b\xf6\x6e\x25\x7f\xa6\xa1\xf7\x0a\x20\x08\x22\x19\xac\xef\x86\x44\xd0\xc5\x22\x9a\x66\x6c\x9d\x1b\x12\xd3\x26\x89\x6b\x2e\x8c\x68\xb8\xe9\x0e\x9e\x59\x31\xac\x3a\x57\xae\x83\x82\x73\x36\xce\x04\xf8\x21\x7a\xf7\xc1\xd3\x5e\x79\x12\x03\x96\x93\xcb\x34\xc8\x8c\x60\x38\xf6\xc6\xc7\x36\x40\x28\xf6\x02\x1c\x5d\xd6\xfc\xc9\x0a\x92\x14\x54\xad\xb8\x58\xa2\x67\x9b\x6b\xeb\xf6\x0f\xe2\x2f\xe9\x0d\xe5\x99\xe1\xfb\xf5\x20\xa1\x33\xf2\xdc\x7c\xcc\x17\x51\x8c\xbc\x40\xa8\x22\x4a\x4a\x61\xfe\xcb\x6d\x06\x52\x9a\x6e\x86\xe5\xae\xaa\x6c\xe0\x7f\xe5\x4a\xcb\x62\xf3\x23\x5f\xf3\x48\xa2\xae\xab\x5a\x71\x3e\x99\xa5\x64\x85\xed\x01\x41\xc1\xd0\x6f\x2b\xd1\x0b\xee\xdd\x8e\x56\xe2\x07\xca\x05\x24\x05\xa1\x2d\x29\x87\x4c\x5e\x25\x57\x2b\x1f\x05\xc4\xbe\xe4\x19\x4f\xb8\x26\xff\x66\x85\xc4\x10\x5e\xa9\x03\xc4\x4c\x6d\x51\x5e\x9e\x0d\x9c\x9b\xea\x8c\x5c\x3e\xb7\xa1\xd7\xe8\xda\x97\x37\xac\x80\x2c\x8e\xd6\xc3\x5b\x30\xb2\xa6\x82\x2e\x2b\xa5\xa3\xa6\xaf\x95\x4a\xfb\x5c\x36\x55\xa8\x25\x6e\x0f\x1a\x99\x52\x70\x6d\xae\xab\x86\x98\xda\x2c\x25\xee\xd8\x82\x90\x85\x01\xaf\x11\xaa\x73\xe7\x52\xc3\xbf\x81\xff\x9e\xf8\xc0\xf2\xc3\xc6\xc5\xfa\xbb\xd7\x5e\xd6\x7a\xc4\x72\x5d\x13\x80\xf9\x03\x36\xc8\x9d\x66\xbc\x58\xe8\x8b\xaf\x6e\x17\x3c\xc6\x67\x61\x69\x4b\x92\xc8\x7c\xe3\x85\x15\xd3\x19\x14\x06\x35\xfb\x27\x64\x6a\x01\x42\x61\x7c\x76\xb0\xd6\xd0\xc0\x47\x32\x3f\x87\x68\xe6\xf0\x5d\xbe\x20\x42\x36\x5a\xf1\x20\xab\xd7\x8b\x9d\xb7\xc9\xec\x4e\x26\x69\xaa\x4e\x03\xff\xf5\x69\xc1\xcc\x31\x07\xda\x57\xfd\xfc\x9b\x5c\xa6\x27\x7e\x4d\xb7\x2b\x97\x89\x2c\x98\xd9\x97\x0b\x99\x5e\xd9\xb7\x9c\x82\x8e\x8c\xf8\xd2\x07\x09\x44\xf6\xc7\xc2\x03\x5c\x20\x01\xde\xdf\x3c\xa3\x89\x59\x6c\xbc\x99\x75\x4a\x67\x43\x24\x05\xbb\xc5\x44\xa7\xfb\xa8\xbf\x1f\xeb\xe3\xda\x99\x77\x35\xde\xaf\xf1\x25\xb3\x1c\xa7\x91\xe5\x38\x48\xf4\x5d\x87\xb2\x3d\x88\xeb\xa1\x22\xd4\xb4\xf7\xb6\xcc\x24\xbb\x30\x40\xfb\xf6\x7b\xa0\xc4\x66\x04\x69\x99\x41\x0e\x33\xa4\xcd\x3f\x71\xa5\x82\x1f\xad\xf5\xa9\xab\x35\x70\xc9\x36\xff\x34\x2a\x0a\x70\x84\xd7\xb2\x14\x11\x56\x00\x3f\x9b\x81\xaf\xa8\x5a\x11\xdf\x5a\x79\x4d\xd2\xaf\x40\xf3\x62\x57\x47\x9e\x94\xca\x25\xfc\x45\xd0\x22\x75\xca\x11\x3a\x04\xe9\x8d\xe4\x29\x15\x89\xd1\x82\x93\x15\x15\x5c\xad\xc9\xed\x8a\x09\xcc\x4d\xc3\x52\x60\x03\x96\x44\xf8\xfc\x40\xee\xfb\x82\xdd\x1a\xcd\xa3\x6d\xf1\x1f\xc8\x35\xbc\x42\x19\x4d\x62\x5c\xdb\x4d\xab\xe4\x54\xbc\x58\xce\x15\x2b\x6e\x5c\x22\x80\x9a\xd1\xe3\x99\xaa\x6d\x3e\x3b\xa8\xf6\x50\xd9\x6a\xb6\x47\x17\x59\x53\xca\xa0\xe8\xa2\x69\xd7\x91\xdb\x22\x21\x18\x52\x1a\x70\x53\x87\x61\xf5\xd5\x9f\x5f\xba\x43\x6f\xe8\x38\x44\x93\x16\x0c\xb3\x25\x5a\xd8\xb5\x4b\x1c\x52\x35\x3b\x10\x09\xc6\x0e\x15\xd3\xa7\xc3\x4e\x43\xc7\x25\x8a\xce\x5f\x4b\x4d\xb3\xf8\x2a\x04\xe2\xa2\x5d\x8b\xfa\xec\xc8\x73\x4c\x48\x66\x9e\xe0\x6b\x89\x2c\x0a\x06\xcc\x2f\xfe\xc6\xa1\x78\xd2\xae\x0b\x82\xd3\x3b\x77\x47\x7e\x87\x93\xb0\x75\x0d\xcc\x41\x80\xf4\x26\x60\x2b\xb2\xf9\x72\xac\x25\x29\x68\xe6\x4f\x93\x08\xc5\xe0\xe7\x28\x87\x43\x0e\x74\x77\xcc\x0c\x03\x9f\x35\x14\x82\x17\xbb\x4c\xb3\x46\x51\xf7\x3b\xf3\xf5\xc1\x63\x52\x40\x87\x1a\x7d\x94\x27\x3e\xe4\x0e\x0f\xbb\xb9\xb0\xa3\x03\xa9\x36\x0e\xea\xa3\xa0\x47\x3d\x98\x61\xf2\xd7\xfb\x3e\x91\xc8\x5b\x58\xfa\x9f\x4c\xb0\x2a\xc0\x3f\xa2\xdb\x4a\x05\x86\x39\xc3\x69\x96\xbe\x2d\x71\xaf\xb7\x55\x9a\x80\x31\x0f\xc2\x2d\x39\x39\xf3\xce\x44\x31\xbc\x26\xb6\xcb\x60\x55\x0f\x91\xf1\xa1\xdb\xa7\xb1\x4d\xd2\xfb\xd8\x12\xa5\xb7\x4a\x7c\xf5\x57\xbc\xc5\xae\x4c\xb4\x8f\x26\xb2\x2b\x0d\x1b\xd0\x94\xc4\xe1\x9c\x04\xd2\xd3\x56\xe7\xbf\xd9\x32\x2e\x96\xf8\xd9\x88\xac\x82\x8f\xdd\x77\x10\x69\x80\x30\x76\x35\x23\x17\x16\xd3\xef\xd3\x3a\x6d\x72\x46\xfe\x83\x5c\xbb\xd7\xb0\x57\xcc\xf4\x3e\x54\x1c\xa9\xbd\x1a\x58\x36\xb7\x19\xf3\x83\xa3\x88\x83\x05\xe3\x22\x06\x32\x34\x86\x83\xb9\xe9\x7e\x16\x6f\x00\x3e\x7d\x3d\xa9\xa5\xa6\xaf\xb5\xdd\x03\x82\x6f\xcf\x40\xc7\x34\xba\x4e\x8c\xcf\xbd\xd5\x7b\x48\x7c\x2b\xc2\x84\xa1\x0e\x8a\xa4\x2c\xc9\xa8\xb9\x9c\x37\xee\x2c\xa0\x0c\x7d\x61\x74\x2e\x2c\x2d\x03\xda\xe2\x65\x87\x7b\x60\xf4\x04\x8c\x48\x90\xaf\xc7\x16\xdf\xc8\x53\x71\xc8\xf4\x11\x71\x7c\xc6\x65\xd3\x12\xad\x3b\x01\x1b\x2c\x48\xb0\xb7\x93\xfd\xc3\xbf\xb5\x0d\x41\xf1\x53\xc5\xb3\xb3\x4d\xc5\xaa\x55\xcd\x99\x7a\xe7\x41\xec\x08\x42\xa8\x8f\x7e\x0b\xf1\x3b\x38\x0c\xc1\xf7\x3c\x0c\x87\xd0\x6e\xde\x0d\x44\xa8\xf2\x36\x7f\xc3\x48\x04\x33\x50\x64\x71\xf1\x41\x5e\x01\xe9\xae\x06\x8a\x29\x32\xed\x48\x6f\xa9\xf2\x94\x66\xc4\x45\x3c\x22\x5c\x44\x70\xb4\xef\x1f\x18\xe1\xbf\xbd\x15\x19\x51\x6b\x59\x4f\xda\x52\x3d\x1b\x41\x11\x8f\x44\x14\xda\x25\x20\x20\xbe\x7d\xfb\x5b\x38\x2b\xe9\x7a\x04\x48\x3c\x30\x40\xe2\x9e\x81\x0b\xd5\xce\x1f\x0a\xb9\x50\x17\x68\x06\xd1\xa7\x5e\xec\xc2\x70\x89\xf1\xf8\xa8\x86\x9f\xf6\x40\x34\x3c\x09\x1c\xc3\x30\xe3\x58\x4e\x4b\x15\xb3\x40\xbd\x0b\xe2\xf7\xb0\x3e\x5e\xc8\x22\xb9\x22\xf8\x62\xb0\x47\x73\x29\x33\x46\xc1\x91\x92\x17\x72\x59\x30\xa5\xde\x30\x9a\x66\x5c\xb0\x7e\x48\x09\xfd\x02\x1b\x00\xe2\x12\x17\xb5\xe5\xaf\x89\x9c\x2e\x55\x84\xeb\x9d\xcc\x31\x4b\x2d\x4e\xba\x9e\x93\x7b\x8e\x29\x55\x9d\x93\xbc\xce\xdd\x9d\x33\x0d\x1d\xe6\xd2\xd0\x39\x0c\x20\xcf\x0b\x99\x98\x8e\xf1\xd5\x5a\x31\x15\xb0\x50\x86\x82\x1c\xd7\xe6\x5c\x5c\x34\x66\xfa\xf6\x4b\xc2\x58\x0a\xa1\xbb\x20\x0d\xf9\xf2\x6f\x65\xb1\x80\xca\x84\x36\x1b\x49\x30\x20\x14\x7c\x82\x78\xf6\x6a\x82\xf0\xb6\x25\x85\x4c\x69\xbe\x46\x4b\x5f\x59\x38\xc2\x0c\x6b\x46\xe3\x3b\x53\x3b\x47\x7f\x3c\x3b\x1b\x96\x0a\xd6\x5c\x31\xb0\x9e\x44\x76\xeb\xbd\xbf\x22\xee\xf2\x62\x05\xcf\x23\xa1\x55\x8e\x0c\xc4\x09\xac\x44\x4f\x14\x8c\xf3\x63\xad\x0a\x02\x5c\x18\xdc\x90\xb7\x0e\x90\x10\xce\x11\xeb\x5b\x00\x30\x01\x9c\x86\xf0\x9a\x33\x6b\x73\xe5\x8f\x2a\xe4\x97\x30\xf2\x9d\x4f\xfe\xe8\x5a\x54\xc7\x6c\x38\x4c\xe7\xb0\x08\x1a\xd5\x89\xd0\xb8\x6a\x5e\xaa\x0a\xa6\x01\xd9\x54\x22\x68\x8d\x3a\x46\xc3\x4c\x79\xb6\xd5\xbd\x8b\xa7\xe4\x6f\x6c\xb3\x53\x34\x43\xa0\xec\x3b\x24\x47\x1f\x1a\xc8\xc1\x31\xda\x38\x20\x15\x07\x02\xdd\x05\xfc\xb2\xbb\x51\xe3\xe1\xd0\x24\x4d\xa3\xc9\x30\x49\x04\x15\x48\x2b\x8b\xac\x77\x37\x18\x6d\xb1\x1f\x3b\x3e\xfc\xa1\x93\x6e\x5e\x35\x3c\x39\x15\xeb\x86\x2d\x8d\xb9\xbb\x9a\x9e\x2e\xa2\x69\xb1\x64\x1d\x97\x71\x28\x3c\xe3\xae\xf8\x94\xe0\xfa\x5f\xd5\xfe\xbe\x67\x84\x4a\x45\xd5\x1e\x04\x99\x52\xad\xfc\x51\xa0\x29\x11\xfb\xdd\xa1\xb1\x29\x43\x3d\xa2\x7d\x5e\xd0\xd8\xe6\x0f\xf4\x82\xc2\x79\x1f\x7e\x5d\xf0\x7a\x20\xf5\xbb\xf3\x2d\xe8\x96\x6e\x9a\x9f\x15\x52\x9c\x68\x56\xac\xb9\x70\x32\x7f\xef\xf7\xc9\x73\xcc\xbf\x64\x2b\xcc\x04\x25\xa2\x2d\x55\x1b\x0a\x2c\x2e\xc5\x1e\x24\x25\x78\x69\xfb\x4a\x79\x89\x46\x47\xdc\xcc\x75\x38\xaf\xd2\xdc\x26\x72\x02\x79\xcf\x5d\xc4\xba\x54\x0e\x1e\xfe\x97\x67\x67\xbf\x0d\xae\x4d\x42\x73\x9a\x40\xae\xa2\x2b\xac\xfa\xb0\x71\x15\x81\xe6\xac\xf1\x0d\xe7\xc9\x76\x75\xe4\x37\xac\x76\xff\x42\x84\x31\x0e\xc7\x22\x0a\x34\x66\xaf\x0a\x98\xe0\x90\xd5\x45\x8b\xc2\xf0\x95\xdd\xf5\x18\x60\xd1\x65\x33\xc2\x50\xcb\x75\xcc\x1e\x71\x0c\x87\xf4\xd0\x47\xc8\xc5\x00\xf6\x39\xc0\x3b\xdf\x6a\x1d\x88\x23\xb6\x4e\xec\x40\x91\xea\x1e\xbd\xf1\xed\x51\x5f\xa1\x7f\xbe\xe5\xe2\xde\xcf\x37\x1f\x58\xd5\x86\x5b\x94\x43\xaf\x3c\xc3\xe3\xea\x1c\xf2\x4d\xd0\xc0\xd1\xbd\xf2\xd5\x04\x3a\x4e\x49\xc5\x5c\xfb\x4e\x47\xd5\x8a\x30\xa1\xca\xc2\x23\x53\x82\x52\xb1\x35\x9a\x42\x1c\xe1\x6d\xe2\x1a\xa9\xd8\x40\x82\x51\x81\x71\xcb\xa3\xbf\x7e\xf4\xd7\x7f\x8d\xa6\x61\x9b\xff\xf7\x47\x94\x0e\x40\x8e\x0c\xee\x90\xb9\x13\x50\xb1\x0d\x52\xff\x6e\xe0\xef\x14\x29\x81\xb7\x67\x81\x2c\x01\xb9\x05\xf1\x54\x5f\xc8\xf4\xb9\x51\x0c\x9c\x79\x2e\xe8\x0e\x83\x70\xcc\xba\x7f\x03\xf9\x22\xc0\xd2\x1c\x5e\xf7\x9d\xcc\xcd\x81\x2e\xf1\x78\xd3\x21\x54\x83\xdc\x86\x87\xd8\x43\xd9\x0d\x57\xe0\xdb\xcb\x34\x11\x2c\xed\x6e\x28\x8f\xc6\x9e\x6c\xe1\xa5\x87\x46\x79\x54\x3d\x0f\x42\x79\x44\x9a\x77\xa3\x3c\x2c\xa7\x06\x58\xe1\x83\xc0\x3c\x9a\x08\x8a\x31\xe9\xc4\x13\x07\x57\x84\x27\xea\xde\xd1\x15\xd5\xd9\xdf\x86\xae\xa8\xb7\x8c\x25\x9e\xd8\x82\x2c\x1d\x31\x16\x8f\x06\x63\xe1\xaa\xe0\x84\x3b\x76\xc4\x58\xd4\x03\x18\xfe\x02\xc5\x6b\x44\x6c\x7c\xe5\x29\x2d\xee\xbf\x46\x4e\x5b\xbb\x3f\x10\x38\xa4\x21\x07\x0d\x22\xaf\x5b\x12\x5b\x44\xed\xfb\xfd\x10\x90\x11\xf7\xb1\x23\xee\xa3\xdb\x0e\xee\x4c\xa3\x6e\x83\x44\xcb\xeb\xef\xde\xbd\x93\x6b\x3c\xa8\xf8\xd3\xf4\xfb\x1f\x91\x4e\x9f\xfe\xe6\x76\x45\xf5\x09\x57\x27\xf4\x64\x0b\x21\xdf\xcf\x27\x1f\x96\xdd\xa7\x7d\xc9\x32\xec\x39\xaa\xfc\x04\x4e\x48\x4a\x64\x29\xf4\x0c\x2d\x05\xe4\x33\xdb\x20\xf6\xc4\xd6\x98\xc6\x64\x0d\x03\x12\x69\x78\xd3\x74\x20\x7b\x7d\xa3\xc9\x35\xbc\x3b\xdd\x1e\xe8\xdd\x33\x6d\x40\xf5\x78\xa1\xca\xc5\x82\x27\xc0\x04\x6b\xc6\xcc\x94\x69\xc0\x49\x3c\x89\x5c\x17\x5b\xf8\xc4\x7d\xb8\xf1\x5b\x5a\xf1\x30\x9e\x31\x38\x2d\xc4\x70\xf6\xe1\x89\x60\x5b\x4c\x1f\xe0\x82\xab\xd1\xc6\x8a\x2c\xfb\xb3\x31\xc8\xaf\xef\x2b\x8b\x85\xf7\xf4\x21\xbc\xda\xc1\xf7\x8f\xe1\xd6\x8e\x19\x2c\x0e\xed\xd6\x86\x02\x36\x70\x04\x7b\x1d\x7c\xb5\x7d\xab\x08\x32\xf8\xec\x42\xef\xad\x93\xa5\x33\x6f\xb3\x6d\x12\x4c\xf7\x9b\xdb\xf2\xc1\x5b\x37\xc4\x01\xff\x73\xab\x0d\x29\xd8\x22\x73\x25\xfa\x6b\xce\xf9\x45\x9f\xb9\x6f\x07\xb8\xc4\x30\xff\x7c\x6d\x01\xf1\x90\xfb\x43\x7f\x87\xf3\x3c\x5c\x24\x69\x4e\x14\xe7\x19\x8e\xc9\x09\x28\x8f\x5c\x92\xd8\x59\x6a\xdf\xea\xe4\xed\x88\xc1\xed\x21\xb1\x20\x8c\x37\x42\xac\x63\xd6\xf2\x20\xd8\xb8\xa8\xf9\x64\xb7\xfb\xec\xd6\xf4\xcb\xd6\x04\x03\x0e\x06\x5c\xed\x62\x23\x9b\x12\xd6\xba\x42\x47\x6a\x08\x77\x08\xe0\xb0\x2e\x08\xfa\xef\xa0\x14\xdb\xb6\x54\x10\x3a\x57\x32\x2b\xb5\x3f\xb6\xcf\xd9\x97\x57\xe4\x0f\x2f\x08\x20\x8c\x73\x56\x98\x83\x44\x97\x78\x9d\x1b\xee\xff\xc6\x20\xac\xaf\x45\x69\x5a\x68\x77\xed\xac\x67\x1a\x3a\x7d\x79\xf6\xdb\x17\x33\x72\xde\xf8\x1e\x57\x24\xa1\x59\x62\xad\xe4\xa0\x5e\x07\x5f\x9d\x6f\x48\x21\x4b\x91\xe2\x8a\x5a\xa1\x3a\xf1\x1a\xf5\x59\xe5\x14\x46\x65\x9f\x2b\x23\x23\xbf\xc5\x32\x6f\xaf\x10\x3d\xa5\xad\x20\x6e\x76\x47\x4b\xf2\xfd\xd9\x6f\xa7\x66\xac\x70\x51\xbe\x3f\xfb\xad\x1b\xea\xdd\x12\xad\xcc\xd8\xcc\xa1\x95\xe3\xd9\x5d\x5e\xc0\x9a\x3b\xf0\x03\xb7\xe2\xae\xd2\x32\xcf\x2d\x78\x84\xfa\x44\x5a\x6d\xd7\x2f\x80\xca\x7c\x70\x3f\x2d\xb4\x02\x97\x83\x79\xdb\xfa\x8a\xeb\xd3\x91\x8a\xb5\xb6\x07\xeb\x96\x0b\x32\x37\x67\x42\x91\x32\x07\x20\x42\xa3\x95\xaf\x95\x06\xe8\x05\x5b\x22\xcd\xe2\xcb\x2a\x80\xac\x3f\x61\x50\xe7\x0b\x7a\x05\x7c\x38\x4b\x15\x91\x42\x4b\x02\x86\xe6\x46\xdf\x53\xa2\x57\xa5\x42\x9f\x38\xae\x21\x54\x3e\xb3\xdc\xff\x4f\x38\x74\x59\xf0\x25\x17\xbd\xc7\x2c\xfc\x3e\x2c\x55\x96\xc1\x22\xa9\xc8\x71\xdf\x55\x8e\x2e\x35\xcf\x66\x5c\x68\xa5\x8b\xd9\x3b\xa1\x7f\x2e\x2e\xf7\x30\xbf\x9a\x4e\x4e\x23\x9d\x0c\x22\x4b\x83\x22\xff\x87\xd2\xa5\x3d\x88\xd1\x65\x59\xc4\xac\xfa\x71\x32\xd4\x22\x3e\x3e\xb1\x0d\xa1\x73\xd9\xc0\xf9\xd4\x5f\xbb\x13\x25\x0a\x31\xf6\x21\x71\x71\xe4\xc1\x05\x06\x9c\x19\xed\xe4\xa7\x1a\x85\x35\x94\xe0\xec\xae\x64\x28\xd4\xc9\xbf\xfb\xc3\x6f\x87\x50\x1c\x77\x87\x02\x57\xb4\x5f\x33\x6a\x16\xac\xcc\x09\x5f\xaf\x59\xca\xa9\x66\xd9\xc6\x75\xc4\x1a\x7b\x68\x6f\xff\x94\xa8\x12\xb4\x54\x4b\x74\x9b\xc4\x4b\x66\x98\x60\xc6\xdf\xda\x54\x62\xf1\x4f\x88\xc1\x20\x2f\x2d\xa1\xa8\xc7\x2a\xc0\x5d\x37\x6f\xc2\x1b\x40\xaa\x00\x45\xf6\x99\x1b\xad\x79\xba\x75\xf8\x8b\xb2\x30\xd7\x7e\xda\xb8\xe2\x51\x14\x5d\x03\xe5\x02\xde\xac\xd6\xf5\x05\x43\x81\x25\x6d\xd1\x21\x1f\xec\x7a\x4f\xf7\xe4\xc3\xf7\xc8\x7d\xbb\xce\xfc\xfe\x27\x39\x95\xb7\xa2\xfb\xce\x00\x21\xb0\xb7\x65\xcf\xf3\x5e\x0f\x25\x69\x1c\x18\xf3\x75\xd3\xfa\x4f\xed\x7d\xdd\xe1\x22\xd8\x53\x5b\xe3\x4e\x20\x76\x4f\x07\x7c\xdd\x1f\xd8\x85\xc4\x52\xab\xc0\x54\x13\x6a\x3f\x13\xb9\xb3\xad\xb3\xdd\x85\x12\x1d\xca\xa1\xec\x11\xaf\xf1\xc0\xe3\x1c\xf1\xfb\xe2\x60\x41\x1d\xd1\x21\x58\xca\x6d\xef\x9a\x05\xaa\x32\x1d\x81\x6f\x21\x31\xeb\xe6\x4b\xe7\x82\xec\xb4\xad\x97\xab\x4d\x3e\x80\xfd\xe5\xb4\xd0\x3c\xae\x71\x5e\xb8\x47\x8d\xea\x7d\xb2\x48\x41\x5c\xa1\xda\xda\xc5\xcd\x8f\x61\x29\xd5\x4a\x76\xf4\xbd\x07\x56\xdd\x4a\x6c\x1d\x16\xf2\xd4\xde\x44\x51\x66\x59\x7c\x57\x82\x51\xf4\xca\x12\xc1\x60\x03\x0b\x12\x7a\xa4\xdd\x71\x06\xdc\x2a\x58\xda\x95\x86\x50\x3a\xa8\x9a\x6c\xd6\x6d\x46\xde\xf9\x7f\x3b\x6c\x16\x17\x46\x00\x50\xaf\xae\x05\x39\x21\xef\x99\x36\xaa\xe3\x2b\x72\x4e\x14\x17\xcb\x0c\x6e\xae\xb9\x18\x50\xda\x5b\xa4\x50\x14\x5b\xd0\x35\x9b\x41\xf3\x4b\x2d\x0b\xba\x64\xaf\xc8\xb9\x22\x6b\xc3\x1a\xfe\x2e\xb3\x72\xcd\x5e\x67\x94\xaf\x15\xa1\xde\xb9\x06\x25\xcf\xaf\x1a\x8b\xbd\x2c\x69\x41\x85\x66\x15\xe4\x12\x65\x68\x81\x63\x70\xc3\xde\xa0\x11\x93\x66\xb7\x74\x63\xbe\x92\xfb\x9a\xf6\x74\x6d\x86\x07\x23\xf0\x8d\x47\xdc\xe5\x88\xbb\xfc\x4a\x1c\xbc\xf7\x8c\x36\x74\x8c\xac\xa2\x16\x9e\xa0\x70\x2b\x35\x58\x13\xd8\x50\x53\x69\x48\xda\x77\x82\xfb\xb5\x8d\xe1\x17\xe1\x30\x82\x7e\xf7\x43\xfa\xed\x39\x87\xdd\x70\x75\xcd\xd9\x6f\x23\xfb\x87\x46\xd6\x05\x5d\x0f\x82\xd6\xc5\xda\x77\x63\xeb\x94\x6d\xfd\x60\xd8\xba\x47\x91\x42\x69\xc4\xd5\x1d\x06\x57\x17\x9e\xa6\x7b\xc7\xd5\x05\x07\x7f\x1b\xb0\xae\xd1\x34\x86\xac\x0b\x9a\x8c\xd0\xba\x47\x22\xa1\x78\x27\xdf\x5d\x9d\x7f\xa1\x94\x3e\x62\xdb\x1e\xa3\xe8\xb3\x33\x90\x2c\xdc\xd2\x03\x21\xc9\x9a\x9c\xbf\x87\xa0\x9c\x93\x46\xe3\x1e\x34\x59\x28\xf6\xec\x91\x51\x68\x3a\x51\xac\xb8\xe1\x09\x7b\x4f\xd7\x91\xfc\x42\xb9\x4c\x7f\x82\x68\x9b\x35\x13\xfa\x42\x66\x3c\x89\x24\xa7\x88\x34\x72\x66\x6d\x8c\xa5\xf4\x66\x1d\x07\x38\xb1\x36\x14\xd8\x44\x9a\xa1\x41\x87\x94\xf9\x14\x2d\x45\x18\x77\xe9\x03\x2e\xa5\x40\x47\xce\x94\x00\x72\x8d\x09\x6f\xdf\x71\xd6\x2f\x1f\x4d\x44\x72\xfc\x3a\x57\xe4\xd3\xcf\x05\x20\xca\x00\x8f\xf0\x09\x7a\x2e\x58\x7b\x24\x5c\x10\x2e\xcc\x1f\x46\xb1\xb5\x60\xa3\xe7\xb9\x4c\x4f\xce\xa6\xd6\x29\x22\xd3\x93\x97\x53\xc2\x74\xf2\xc2\xf9\x5f\x5a\x49\x76\x6e\x29\x37\xf4\x4d\xf3\x8c\x30\x9a\xac\xc0\x9f\xe4\x00\x6b\x2e\x8d\x8f\x4d\xc4\xc3\xc5\x72\x46\xfe\xd1\x9c\xc4\xb4\xca\x80\x81\xd6\xaf\xb5\xbc\xa9\xb2\xe9\xc8\x3c\x97\x8a\x6b\x86\xc3\xc3\x09\xd3\x0c\x88\x2d\x64\x09\x0e\x26\x7d\x41\x0b\x9a\x65\x2c\xfb\x64\x4d\x19\x61\xd1\x1c\x27\xb4\xe7\xb6\x0d\x66\x1c\x72\x48\x29\x27\xe8\xe3\x5e\x38\xd8\x9f\x99\x19\x00\xfc\xcc\xd4\xa5\xb0\x4f\xc1\xf2\x06\x5d\xa7\x90\x6f\x19\xac\x63\xce\x81\x28\x45\x12\x0b\xe7\xec\x73\x80\x17\x0d\x07\x78\xdb\xdd\xe0\x5b\x58\x99\x03\x6d\x02\x0e\xc3\x03\x4b\xa2\x98\x5d\x3b\xd7\x97\xb0\xf1\xe9\x42\x31\x6f\xe9\xc3\xd8\x33\x2e\x94\xa6\x42\xf3\x0a\x20\xe2\x2d\x07\xae\x4b\x4c\xc8\x6f\xe4\xb2\x1b\x9e\x96\x34\x0b\x30\x51\x99\xb2\x31\xe1\x34\x62\x4e\xd9\xcc\xc8\xbb\x45\x88\xfe\x9b\xba\xb3\x79\x84\xac\x3f\xb1\x56\x1e\x44\xd0\x32\x74\xbb\xd6\x8d\x2c\x2b\x6b\xca\x11\xcf\xe9\xcf\x5b\x40\x52\x9e\x29\xff\x9a\x2b\xed\x85\xe7\xaf\xf9\xab\x5b\x0a\x84\xdb\x40\x50\xbd\xfb\x9a\x61\x2f\x9e\x75\xa1\x81\x96\x3a\x65\x2e\xdb\x10\x9a\xe7\x19\x67\x69\x8b\xe4\x59\xe1\xa5\x7e\xbf\x2b\x17\xf1\xdd\xf3\x0b\xa9\x43\x61\x19\xbf\x62\xd8\x61\xc8\x1c\x22\x0b\xe8\x1f\x7a\x34\xad\xf9\xb7\xbb\x4f\xf8\x18\xd7\x70\x69\x26\x23\x54\x97\xaa\xee\xda\xc2\x3a\x42\xbc\xbd\xa3\x9b\x8d\x03\x89\x94\x08\x88\xab\xca\xcd\x91\x33\x6a\x54\x95\x40\xa5\x61\x23\xf4\x23\xd1\x33\x34\x16\x2c\x99\x26\x6f\xde\x5f\x9e\x3a\x83\xa5\xdd\x61\x74\x1e\xe0\xd6\x51\x6d\x28\xeb\x2b\x20\xfc\x8e\xdf\x9e\x20\x15\x9b\x05\x33\x9e\xd9\x23\x39\x53\x37\xc9\x2c\xc9\x4a\xa5\x59\x31\xcb\x64\x42\x33\xcb\x6a\xae\x27\x91\x1e\xae\x27\x66\xec\x8d\x2a\x72\xa1\xf9\x33\x9a\x6d\x24\x50\x98\x3a\x61\xa0\xfa\xde\x60\xa0\x6f\x1d\x8b\x53\x9a\xae\x73\x96\x82\x6d\x25\x32\x15\xe8\x7e\x51\x66\x0b\xf3\x5f\xd8\xf7\x3a\x71\xb5\x34\xb4\x14\xfc\x97\xb2\x32\xd5\x56\x22\x6c\xc1\x94\x07\xa1\x34\xa4\x9c\x23\xd6\x42\x2b\x1b\xd5\x1a\x6a\xae\x82\x60\x18\x8d\xaa\x0e\xb5\x05\x35\x9f\x94\x1b\x74\x78\x58\x1f\x51\x65\xaa\x6a\x2c\x92\x11\x05\x68\x45\x4e\xe1\x74\xa4\x90\xd1\xcb\x73\xb7\xfd\x0c\x53\xcd\xe2\x6a\xd3\xc9\x4d\x65\x86\x77\x7d\x47\x98\x71\xac\x55\x3d\x15\x6f\x82\x86\x7c\x4c\xe6\xe7\xf1\x1c\xd6\xfd\x06\x79\x33\x16\xac\x60\x46\x0c\x20\x4d\xeb\x7e\x20\x39\x45\xee\xf0\x9a\x22\x16\xa6\x71\x8f\x39\xc3\xb4\x49\xf8\x59\x6e\xd6\xeb\x96\x6e\x5c\x65\x3f\xe4\x5e\xb8\x3f\xe1\xc5\xa7\x58\x2b\xe7\x2d\x94\xf3\x83\x77\xbd\xa9\x10\xa3\x61\x0c\xa9\xc1\x33\xe8\x9c\x77\x52\xb0\x0a\x1b\xf9\x7c\xbe\x01\x72\xf6\x82\xe0\x8a\xfc\x04\x09\xa4\xb8\xb0\x45\x07\x5d\x0c\x84\xdd\x53\xed\x45\x91\xf3\xd8\xc7\x34\xfd\xcc\x14\xc9\x0b\x96\x30\xa3\x78\x30\x64\x31\x54\x6c\x6c\xe7\xaa\xd9\xcf\x14\xfd\x35\x5e\x2e\x01\xef\xca\x1d\x80\xaa\xfe\x46\x18\xae\x0a\x12\x4b\xe0\x94\x31\x6a\xd1\xce\x7a\xd1\xa0\xe2\x7b\xd1\xaf\xdd\x7b\x66\xb5\xb6\x3d\x75\x98\x35\x67\x3b\x28\x9b\xed\xac\x84\x75\x83\xb2\xb7\x65\x30\xab\x3f\xf7\x56\xf1\x6d\x79\xcd\x1a\xcc\xb6\xf3\x3e\x7e\x3b\xb5\xf7\x02\xbb\xe2\x31\xb0\xe0\x51\x13\xfb\x91\xea\xef\x75\xc3\x98\x1b\x0d\xda\xe1\x4e\xc0\x91\x1c\xeb\xef\x95\x44\x2a\x96\x1c\x3e\xb7\xf2\xb9\xe7\x90\xd0\x89\xff\xea\x6e\xdb\x5b\x7f\xab\x67\x32\xd8\x60\x8a\x95\x59\xb5\x4b\x2a\x52\x67\xd2\x6e\x60\x6d\xd1\xc1\xa3\x10\x2c\xb8\xbc\xce\x96\x15\xfb\xa5\x04\xda\xfc\xcf\xb3\x69\x63\xf5\x5e\x44\x85\xb1\x21\x30\xf7\x76\x9b\x08\xca\x3b\x9a\x89\xce\x43\xcd\x6b\x17\xf8\x9d\xc6\x0a\x80\x86\x71\xa6\xde\x02\x5b\xd7\xd8\xaa\xde\xa6\xd6\x0c\xc0\x7d\x59\x06\xa3\xc4\xaf\x4b\x6b\xf7\xb5\xbb\x7e\x7e\xf1\xce\xda\x13\x0f\x83\xa0\xaf\x3d\xbe\xd3\xc1\xab\x22\x17\x28\xa4\xdb\xd8\x90\xd7\x11\x3f\xc0\x7e\xa8\xfb\xa6\xd1\x61\x9f\x01\xee\x94\x95\xad\xfb\x78\xd7\x9f\x1f\xfb\x74\xbb\x89\x9f\x34\x92\xc5\x4d\xdd\x83\x17\xb1\xc3\xbe\x35\xb3\x5c\xa3\xc1\x3d\x11\x9c\xfa\xd2\x1d\x32\xf5\x5c\x94\x8c\x6f\x17\x30\x86\x17\x88\xeb\x56\x26\xea\x3b\xae\x6a\x3a\x46\xcf\xaa\x81\xfa\x61\xd3\x01\xe7\xac\x30\xf3\x76\x15\xc4\x80\x70\x60\x29\x51\xa6\x40\xee\xa4\x29\x4e\x89\x66\x15\x0e\x4b\x11\xc1\x12\xa6\x14\xc5\x02\xee\xae\x8f\x00\xea\xe6\x18\x7a\xb5\x07\x6e\x74\x87\xca\x84\xf7\xd1\x63\xea\x7a\x21\x63\x0a\x85\x0f\x70\x15\x36\x93\xc9\xf5\x80\xc7\xf6\x4a\x8b\x17\x83\xc3\xf5\x3b\x2f\xeb\x1b\xa8\xad\x3f\xb3\x57\x83\x3c\x7a\x6e\xbc\xd8\x2c\xe2\xc7\x79\xce\x34\x7d\x39\x6b\x0b\x6b\xbd\xf9\x14\xdf\x5e\x7c\x78\xfb\xfa\xfc\xea\xed\x1b\x72\x82\x26\x9d\x65\x21\xcb\x3c\x24\x57\xed\x0e\x09\xe6\x96\x2c\x98\xbf\xce\xc1\x08\xbe\x3b\x8d\x88\x8b\xe4\x92\x31\x6b\x1c\x30\x2a\x1b\xe4\xc9\xb4\xf5\xf1\xd6\xce\xb8\x66\x6e\x3b\xb4\x8d\x7d\x70\x9d\x67\xcc\xa5\xbc\x27\x7c\x6d\x58\xa1\x11\x12\x95\xa0\xb9\x5a\x49\xed\xdd\xce\x04\x13\x25\xbc\x06\xcf\x99\xb3\xca\xd7\xb5\x55\xc5\x0a\x4e\x33\xfe\x6f\x57\xe1\x33\x65\xe1\x2f\x95\x0d\xc6\xa1\x8b\x51\x65\xb4\xb1\x19\xde\x59\x8a\x62\x27\x42\x60\x69\x6c\xc8\x2b\xaa\x10\xc3\xad\xca\xc4\x5c\x4e\x08\x03\x74\x74\x14\x82\x37\x02\xe4\xaf\xf7\xe1\x5d\xd5\xf8\xba\xb5\xc5\x50\x0e\xce\x59\x9e\x56\xfe\x23\x9b\xfe\x14\xdd\x81\x18\xcd\x61\x54\x50\x2c\x47\x50\x6a\x27\xcd\xbf\xa1\x9a\xa2\x5e\x10\x5b\x56\x70\x43\x4e\xc9\x4a\xde\xb2\x1b\x56\x4c\xcd\x40\xd0\x31\x90\x06\x79\xff\xa7\x24\xc5\x32\x04\x5c\xc3\xdd\x36\xdb\x3d\x97\x56\xc7\xad\x02\x44\xcc\x4a\xc6\xe9\x1b\x6e\xb3\x8b\xaf\x11\xa9\xcf\x61\x3f\xad\x79\x49\xb9\x59\x2e\xb3\x77\x7f\x75\xc3\xe1\xda\xa1\x80\x54\x69\xad\x62\x12\xf5\x13\xac\x26\x5b\xf3\x85\x1b\xdd\x66\x89\xfa\xf8\xa2\xd4\x65\xe1\x8f\x9a\x42\xd3\x63\x62\x4f\x84\x35\x0a\x9b\x75\x4f\xe1\x26\x1a\xc9\xca\x4c\x4d\x69\x3a\xe7\x19\x7a\x02\xb0\x60\x41\xc1\xd7\xb4\xe0\x19\xc6\xca\xfa\x8d\xb7\x4b\x10\xcc\x6f\xbb\xea\x68\xef\xe1\x88\x0d\x38\x36\x36\x20\x9e\x4e\x05\x6e\x81\x73\xc5\xda\xbb\xce\x5a\x27\xc8\x19\x9d\xf5\x3e\xd1\x4b\x45\x29\x00\x8c\xf6\x81\xde\xbe\xfd\xa2\x99\x50\x56\x79\x1c\x31\x05\x0f\x50\x76\xf2\x89\x27\x94\x2c\x3a\x15\x8e\x8a\x1f\xd6\x04\x15\x6f\x85\x0e\x8f\x70\xd3\x77\xf7\xc6\xd6\x7c\xda\xaa\x27\xee\x0d\xcb\x0a\x66\xd1\x6d\x05\x8c\x5e\x94\xdd\xe4\x99\x6d\xb8\xae\xf8\x1b\x78\xdf\xfc\x65\xb2\x6c\x1d\x84\x00\x6f\x21\x8f\xb0\x71\x2b\x0b\x8c\xe0\xaf\xc7\x41\xe0\x77\xa9\x5d\x17\x11\x78\xee\x6e\x26\xec\x14\xb2\x47\x04\xd9\x7d\x51\xfb\xa7\x40\xd1\x77\x45\xae\x75\x1e\xab\xc3\xa0\xd8\xb0\xfb\x81\xb5\xcd\xb7\xab\x84\x6f\x6a\x95\xbd\x7a\x54\xc1\xb0\x38\xcb\x2e\x2a\xe0\x58\x5f\xfd\xa9\x11\xe6\x91\xf4\x8d\xf5\xd5\xef\x56\x5f\xbd\x49\xa3\x1e\xae\xc8\x7a\x6b\x24\x3b\xc5\x0a\x45\xe7\x31\x84\x28\x1f\x38\x66\xa8\xd9\xfd\x58\x78\x7d\x2c\xbc\x3e\xc6\x30\x3d\xfe\xc2\xeb\xcd\x7b\x3b\x56\x5f\xff\xaa\x04\xa5\x87\xab\xbe\xde\x52\x02\x46\x95\xf5\x5b\x2a\xc1\xde\xda\xfe\xe3\xa8\x96\x1f\xac\x77\x67\x98\x8a\x19\xaa\x7a\xee\x4d\x48\x03\x61\x69\x49\xa0\x15\x56\xf5\xfe\xb4\xf4\x3e\xa4\x9a\x14\xb2\x8d\xc4\x09\xba\x36\x22\x87\x7b\xf7\x4a\x8e\xe4\x6e\xd4\x0b\x9f\x10\x7d\x11\xd1\x70\x8e\x0f\xf6\x84\xbf\x42\x63\x4d\x23\xa4\xe5\xbd\x8d\xec\xe8\xb8\x27\x81\x2c\x57\xdd\x8a\xa8\x3c\x67\x4b\x1c\xba\xc3\x1d\x08\x48\xbe\x26\xf9\xae\x1a\x96\xbb\xf0\xaf\xa1\xeb\x00\xad\x74\x6e\xb6\x81\x76\x00\x47\x21\x8c\xae\x6a\x60\x73\x8c\x3b\x9c\x9c\x11\xef\x83\xc1\x45\x28\x42\x85\xa0\xb9\xa8\x5d\xfd\x96\x68\xb7\x03\x55\x6d\xcc\x64\x18\xa5\xdc\x16\x4e\x5a\x6f\xd9\x19\x4b\x3a\x5c\x11\xef\x55\xc7\x5c\x84\xca\x58\xb3\x60\xc7\x9a\x05\x39\x2d\x15\x8b\xd0\xb8\x77\x81\x8f\xce\x02\xc0\xd2\x9a\xdd\x14\x5f\x0c\x36\x66\x2e\x65\xc6\x28\xf8\x8d\xf3\x42\x2e\x0b\xa6\xd4\x1b\x46\xd3\x8c\x0b\xd6\xb9\xf8\x61\x72\x3c\xd0\x30\xb9\xa8\x2d\x3f\x6d\x54\xc5\x5d\xd3\xcf\x8c\xb8\xde\x5d\xb0\x16\x4e\x3a\x58\x1a\x5c\xdc\x05\xe5\x99\x03\xa5\x44\x2b\x2b\xdb\x38\x55\x0c\x91\x45\xfc\x5a\x21\x13\xd3\x31\xbe\x1a\xbc\x85\x36\x5a\x1a\xea\xbe\x5c\x9b\x73\x71\xd1\x98\xe9\x5b\xc8\x93\x08\xee\x79\x50\x20\xdd\xc6\xa9\xb2\x58\xd0\xa4\x8a\x76\xac\x95\xd5\x87\xec\xaf\x15\x66\xa5\x9a\x20\xbc\x6d\x69\x3a\x53\x9a\xaf\xc3\x38\x66\xd0\x70\xcd\x9a\xd1\xf8\xce\xd4\xce\xd1\x1f\xcf\xce\xd4\x9d\xc1\xab\xef\x5b\x55\x2b\x30\xff\xe3\x1d\x2a\x56\x98\xc9\x75\xd6\xac\x38\x64\xd4\x6a\x3d\xc1\x76\x3d\xc5\x9f\xc2\xf8\x21\x04\x4a\x49\x0c\x2a\xaa\xf8\xc2\x91\xa6\xf7\xdd\xd0\xe9\xf5\x70\xb6\x50\x12\x0d\xb8\x5c\x93\xc5\x19\x92\x60\x73\x20\x82\xd4\x69\x84\x85\x7f\x38\x8a\x92\x31\x0a\xe4\x64\x61\x26\xe6\x05\x53\xd3\x81\x14\xbb\xa0\x17\xbb\x98\x62\x77\x28\x2c\x56\xe3\xf0\x01\xb1\x0b\x5b\x95\x7a\x46\xde\xba\xd2\xc7\xe1\x16\xdd\x42\x6e\x62\x1f\xf9\x85\xaf\x05\x35\x39\xdc\x4d\x03\x08\x9c\x91\x6e\xe9\x62\x51\x6f\x91\xee\x62\x4d\xdd\x29\x5e\xb5\x33\xae\xef\xaa\x79\xd5\x1d\xa8\x56\x3a\xc8\xec\xc0\x72\xcf\xfd\x01\x1a\x78\x76\xff\xc6\x36\x3b\x54\x69\x6c\xdb\x6f\x03\x90\xe9\xf6\xba\x1f\xad\xe8\x4e\x15\x0d\xef\xbc\x53\xdc\xe4\x9e\x16\xeb\x68\x70\x58\x9f\xc0\x73\xdf\xa1\x61\x1d\xa6\xf3\x81\x85\xc3\x77\x2e\x46\xda\x2f\x46\xed\x5e\xa3\xa3\x91\xb6\xb4\x51\x24\x7f\x50\x85\x8e\xbe\x4a\xfa\x43\x83\xb3\xfa\xe3\xd6\x5e\x6f\x8b\x50\x7b\x53\xab\xdd\x1f\xfe\x7d\xcf\xf1\x69\x3b\x94\x92\x38\x46\x5c\x5a\xb5\xf2\x47\x08\x4b\xeb\xf6\xe2\x1c\x3a\x34\x6d\x48\x58\xd4\x55\xa3\xc2\x87\xbb\x2e\x36\x2c\x24\x2a\x24\x1e\xa8\xbc\x47\xe3\xce\xe0\x1d\x41\xaa\x79\xe7\xab\xd0\x2d\xb0\x35\x3f\x2b\xa4\x38\xd1\xac\x58\x73\xe1\xd4\x98\xde\xef\x93\xe7\x08\x1b\x0f\x0b\xb8\x58\x18\x2a\xd2\xb7\x17\x43\x43\x91\xc4\x1e\x74\x25\xcc\x88\xbd\x75\xa5\xbc\x90\xa6\xbb\x12\x2b\x23\xce\xdc\x48\x0e\x9a\x5b\xfc\x39\x88\xb0\xee\x36\xd6\x15\x0d\x08\xff\x7a\x79\x76\xf6\xdb\xe0\xee\x24\x34\xa7\x09\x40\xac\xaf\x56\x6c\x03\xf6\x1a\xc6\xa1\x5e\xc1\x9c\x35\xbe\xe1\xb2\x94\xcf\x4b\x0d\x32\xe0\x86\xd5\x2e\x61\x2d\xcf\x07\x0c\x07\xbe\x87\x92\x3e\x13\x21\xf3\x1c\x1c\xe8\xd5\x57\x9d\xe7\x8e\xc7\xa0\x0a\x88\x0b\xb5\x75\x9f\xfb\xc1\x08\xb8\x07\x8c\x81\xea\xa6\x19\x43\xb9\xe9\xf6\x28\xa8\x76\xeb\x40\xa0\x59\xc9\xdb\x1d\x24\xb3\x43\x84\x1f\xb9\xf8\x02\x2b\xbf\x43\xbc\x91\x9a\x91\x0b\x24\xe5\x44\x8a\x6c\x43\x78\xe8\x50\x09\x23\x8c\xc8\x7f\xb4\x23\x77\x76\x96\xd9\x63\x75\x24\x76\x70\x33\x82\xf1\xd1\x5c\x83\xeb\xc9\x07\x86\xa7\xf7\x7a\x62\xce\xf9\x75\x3d\xc2\xea\x7a\x72\x84\x88\xa3\xfe\x59\xf4\x1d\x9a\x86\x1c\x38\xcc\xe6\xbf\x7d\xcf\x3b\x11\xd0\xb5\x1c\x46\xa1\x1f\xc0\x68\x64\xef\x16\x2e\x0f\xfe\xd9\x34\x7c\x62\x19\x39\x08\x7a\x03\x03\x0e\xe3\x40\xe8\xce\x8c\xdf\xfd\x0b\x38\x96\x13\x19\xcb\x89\x8c\xe5\x44\xc6\x72\x22\x63\x39\x91\xb1\x9c\xc8\xa3\x2e\x27\x12\x61\x63\x63\x4d\x91\x01\x35\x45\x0e\x5c\x3f\x04\xb7\xe1\xd2\x9c\xef\x5e\xd9\x01\x92\x7a\xd6\x0b\x87\xd8\x23\x6f\xbd\xda\xd6\x03\xe4\x1c\xe8\x23\x2c\x7e\x84\x3f\x3c\x61\xf8\xc3\xee\xb0\xf8\x1f\xee\x2b\xfa\xf3\xf8\xf8\xfb\xf0\xca\x35\xbd\xfc\xc0\x09\x8f\xbe\x3b\x66\x5c\x27\x54\xa4\x27\xd6\xdd\xba\xab\x92\x0c\xe4\x6a\x1b\xa8\xbf\x5d\x2c\xe4\xe1\x26\x08\xa9\x8b\x4e\xa4\xc8\x36\x7b\xce\x75\x8f\xb0\x81\x6a\x91\xb6\x30\x86\xa3\x04\x0b\x54\x5f\xdf\xc6\x76\x6c\xc1\x99\xd0\x83\x45\x35\x2e\x3a\x73\xe9\xda\x80\x3d\xa9\x72\xee\x08\xd8\x00\xb5\xbf\xcb\xfe\xd6\xd6\x3c\x31\x17\x74\xc2\x2a\x77\x84\x95\x07\x2d\x87\x39\x1e\x4b\x1e\x90\x8a\xb0\x6a\x36\xa4\x32\x7c\x6b\xa1\xf6\xcf\x45\xd8\xbd\x82\x34\xd1\x65\x5d\xb1\x74\xb6\xfb\x6a\x25\xc3\xdb\xb6\xd3\x42\xf6\xf9\xa8\xf7\x48\xd0\xac\x5c\x86\xe6\xc6\x85\x8f\xe7\x5d\x2e\x15\x2b\x4e\x96\x25\x4f\x99\xcd\xad\x1c\x49\xad\xbc\x2f\x06\x6c\x3a\x41\xab\xee\xe5\x96\xe9\xb5\x5c\xf0\x03\x27\x58\x01\x23\x5c\x5e\x0a\xd0\xf5\x82\x50\x4b\x48\xb5\xb2\xa6\xf9\xc9\x9c\x1a\xb1\x19\xe4\x1d\xb3\x2a\xec\x8b\x39\x57\x8a\xdf\x40\x9a\x64\xfb\xd4\x4f\xb9\xea\x39\x95\x02\xbc\xe4\xe0\x67\x33\xe2\x53\x21\x0d\x9d\xb3\xb2\x6f\x20\x12\x28\x74\xe2\x59\x81\xc4\x39\xa1\x5d\x16\x32\xeb\x75\x5b\x1b\x1d\x08\x4f\x32\xec\xe8\x09\xc8\xed\x44\x6d\x84\xa6\x5f\xc0\x00\x07\x7a\x14\xac\x99\xcd\x9f\x24\xb2\x0d\x51\x65\x9e\xcb\x42\xab\x60\x22\x7e\xa8\x53\x97\x4d\xa6\xf2\x10\x82\x4c\xd7\x6c\xe8\x1e\x42\x35\x80\x1c\x95\xe2\x7b\x4b\xcd\xbd\xd5\xaa\xba\x8d\x70\x0c\x2b\x08\x38\x20\xf4\x36\x54\x46\xfa\x63\x6f\x6b\xf9\x07\x77\x09\xbe\x1d\xcb\x12\x8e\x65\x09\x47\x3d\xea\xdb\xd0\xa3\x9e\x7a\x59\xc2\x16\x79\x7d\xaa\xb5\x09\xdb\x13\xd9\x47\x7b\x18\x50\xa5\xb0\xeb\x43\x07\xd6\x24\xc6\x7a\x85\x63\xbd\xc2\x27\x12\xeb\xfb\x90\xf5\x0a\x5b\xb7\x65\x2c\x5a\xf8\x55\xca\x2f\x87\x2a\x5a\xd8\x56\x27\xc6\x20\xde\xc7\x28\x1d\xed\x17\x9c\x7b\xf8\xf2\x85\x71\xb9\xe0\xfe\x6b\x18\x8e\x85\x0b\xc7\xc2\x85\x63\xe1\xc2\xb1\x70\xe1\x58\xb8\xf0\x10\x85\x0b\x17\xae\xc6\x84\x1d\x26\xe2\x29\x2c\xc8\x5c\x0a\x77\xb9\x83\xea\x56\x63\x09\xc3\xb1\x84\xe1\x58\xc2\x70\x2c\x61\x78\xb4\x12\x86\x2d\x41\x73\xac\x63\x38\xd6\x31\x3c\x74\x1d\xc3\x6d\x87\xec\x11\x17\x33\xec\x32\xbb\x8e\x15\x0d\xc7\x8a\x86\x47\xaa\x68\xd8\x63\x89\x1f\xcb\x1a\x8e\x65\x0d\xc7\xb2\x86\x63\x59\xc3\xe8\x21\x19\xcb\x1a\x3e\xbe\xb2\x86\x3d\xb4\x7c\xa0\xbc\x31\x16\x38\xfc\x0a\x0a\x1c\x0e\x0c\xd0\x39\x7c\x95\xc3\x03\x46\x16\xef\x56\xd0\xf0\xbb\x07\x2d\x68\x38\xd6\x32\x1c\x6b\x19\x8e\xb5\x0c\xc7\x5a\x86\x63\x2d\xc3\x11\x65\x30\xd6\x32\x1c\x6b\x19\xde\xa9\x96\x61\x4c\x94\x19\x6b\x19\x7e\xbb\x04\xfe\x51\xd4\x32\x8c\xca\xd7\x23\xa6\x6c\xac\x65\x78\x37\x2c\x5b\xf4\x58\x1d\x0e\xd2\xf6\xdd\xcc\x4b\xeb\x77\x54\x06\x2b\xa9\xbf\x53\x07\xf4\x4d\x76\xac\x61\xe8\x7b\x6e\xba\x6d\x20\x57\x56\x59\x04\x48\xba\x14\xda\xba\xd8\x87\x31\xb6\x68\x8c\x2d\xfa\xea\x28\xdd\xd7\x25\xd7\xc6\xe3\x9d\xae\x3a\x4b\x31\x40\xe8\x90\xbf\xe3\xf7\x9c\xc9\x60\x37\xfb\x62\x40\x5b\xb7\x05\x53\x5d\x45\x43\xa8\x5a\xb3\xdd\x27\x72\x8a\x5c\xb8\x20\x5f\x67\x9c\x57\x1b\xa5\xd9\x3a\xcc\xca\xf0\x64\x96\x71\xe7\x50\xae\xe6\x1e\x0c\xe0\x83\x47\x08\xe3\x0a\x7a\x1f\x56\x3c\xb2\xd5\xba\x3b\x84\x2b\xb0\xb6\x8d\x01\x5c\x63\x00\xd7\x9d\x02\xb8\xaa\xb3\xf4\x10\xe1\x5b\xc1\x2d\xd9\x5a\xaa\x31\x6c\x18\x0b\xdd\xaa\xa8\xe6\xa8\xa5\x3f\x12\xe9\xb0\x43\x4b\x3f\xf7\xaa\x79\x7c\xcf\xee\xa6\x93\x57\xda\xcd\xa8\x8a\x3f\x70\x8d\xc6\x27\x21\x9c\xee\xa7\xa2\x57\xa7\xec\x28\x9a\xf9\xd6\xfa\x66\x61\xc3\x9e\x30\xb3\x7e\xe5\x38\xa4\x89\x3e\xf6\x62\x7a\x97\x7a\x66\x90\x20\x76\x8f\x9a\x66\x15\x1b\x7a\x12\xd5\xcd\x8e\x5c\x1c\xca\xc5\xe9\x3c\x40\x61\xa8\x03\xc4\xea\x9c\xf7\xc5\xe7\xd0\x82\x35\x03\x29\x6a\xca\x5d\x55\x81\x91\x0b\x1b\xe2\xe7\xf7\x13\x6d\x62\x29\x38\x66\x1b\xa5\x1a\xc3\x88\x1d\x10\xbc\xe6\x2c\x8b\x33\xbf\x47\x1e\xba\xd3\x1d\x2a\x72\x2e\xf6\x88\x0e\xb1\xd5\x65\xfc\xed\x0a\x63\x0c\xd9\x17\x9a\x40\xe1\x1e\x00\xc5\xe7\x1b\x2f\xbb\x98\xce\xa4\x20\x0c\xe0\xf7\x42\xa6\xcc\xe1\xf5\x75\xb2\x72\xc8\x97\x6a\xad\xa1\x81\x8f\xcf\x7a\x6e\xb4\xf6\xda\xbb\x00\x81\x6b\xb4\xe2\xaa\x3a\x7f\x2f\x76\xde\x26\xb3\x3b\x99\xa4\xa9\x3a\x0d\xbc\xef\xa7\x16\xf3\x66\x56\xab\xfa\xf9\x37\xb9\x4c\x4f\x82\x00\xda\x23\x86\xa0\x9c\x8b\x2a\x29\x73\x55\x68\xab\x55\xc7\xa1\x46\xe9\x82\x8a\x0e\x03\xf3\x1c\x77\xc8\x3a\xcd\x88\x91\xbd\x58\xd9\xa0\x88\x80\xe3\xc2\xfc\xdb\x4a\xf9\x20\x26\x38\x38\x5f\xe0\x70\x7e\x68\xdf\xc6\xaa\x83\x97\x2e\xa3\xff\x64\x3a\x41\x52\xfd\x13\x57\x2a\xf8\xd1\x5a\xae\xba\x5a\x03\xd3\xdc\x3d\x58\x60\x7b\x19\xa9\xca\xbc\x5e\xbf\xe7\xdf\x64\x48\x80\x9f\xfe\x91\x02\x02\xa2\x36\x9d\x23\x85\x03\x34\x4f\xd2\x16\xa9\x01\x82\xee\xdb\x15\x80\x7c\x78\xd4\x4b\x77\xf2\x0d\x6d\x87\x6a\xa2\x05\xc3\xd4\x82\x16\x90\x59\x94\x22\x64\xc6\x10\x7f\x75\x10\xb2\x8c\x1d\x2a\xa6\x4f\x87\x1d\x89\x8e\x9b\x14\x9d\x7f\x33\xe9\x7c\xb0\x0a\x81\x08\x69\xd7\xa2\x3e\x3b\xf2\x1c\x91\xb3\x10\xb3\x06\xaf\x01\x18\x1f\x18\x62\xfc\x8d\x43\xf1\xa9\x5d\x17\x04\xa7\x77\xde\x5f\x94\x61\xbf\x35\x80\x84\x81\xf4\x86\xa1\x4d\xc9\x3a\xe2\x5c\x59\xe4\xaa\x99\x3f\x4d\x22\x14\x8d\x63\xa5\xf6\xa0\x18\x53\xb3\xde\xde\x2e\xd3\xac\x91\xd5\xfd\xce\x7c\x7d\xf0\x18\xb4\x6a\x9e\x83\xd0\xfb\x18\x4f\x7c\xc8\x22\x1e\x76\x73\x61\x47\x07\x92\x6e\x1c\xd4\xd6\x6a\x21\x77\x1c\xbb\xb0\xd6\xce\x87\x38\x91\x43\x8b\xfa\x6d\x0b\xff\x69\xa9\x39\xbb\x17\xf8\xb3\xe6\xa0\xbb\x12\xc5\xf0\x9a\xb8\x28\xa2\x6a\x55\x0f\x1b\x71\x11\x65\x96\x83\x04\xbf\xe1\xd1\x16\x1d\xaf\x78\xcb\x5e\x99\xe8\x20\xe2\xa0\xaa\x12\xd5\x94\xd3\xb1\xd4\x43\x25\x4c\xdd\x6f\x61\x35\x8d\x65\xd4\xda\xc5\xca\x76\xd5\x06\xea\x35\xb4\x2a\x33\xe8\xd6\x4a\x6a\xd5\xc9\x74\x25\x7a\xaa\x82\x6a\xf5\x31\x61\x55\xb5\x9f\xc5\x1b\xc0\x87\x1f\xad\xa0\x5a\xe7\x5c\x7a\x0f\xd0\xa0\xaa\x61\x43\x70\x2d\xb5\xe2\xd5\x1d\xc0\x96\xa0\xfa\xdc\x4e\xc8\x96\xaa\x6f\x26\x0c\xd5\x32\x1f\x48\x32\x5a\x60\x7a\x20\x1b\xda\x03\x2f\x43\x94\x95\xa1\x70\x41\x21\xea\x11\xe2\x32\x42\x5c\xbe\x6e\x0f\x42\xa3\x0c\xc9\xf1\xab\x83\x5c\x36\xad\xe6\xba\x13\x89\xd2\xac\x66\xbd\x9b\xee\x58\xd5\xcf\xdc\x02\x0d\xf9\x69\xf7\xba\xda\xfb\x8e\x64\x1f\x74\x45\x7d\x1e\x43\xe8\xf1\x71\xf0\x15\x91\x1a\xad\x83\x8a\xae\x0e\x40\x58\x04\xe5\x67\xbf\x5d\x88\x85\x19\x28\xf2\xdf\xf8\x20\xaf\x5c\x65\x50\x3b\x50\xae\x82\x91\xde\x52\x1f\xa8\x3e\x02\x3e\x1e\x13\xe0\xa3\x5e\x67\xfc\x21\x10\x1f\x7e\x00\x5b\x21\x1f\xb5\x96\xf5\x44\x46\xd5\xb3\x11\xed\xf1\x48\x04\xa5\x5d\x62\x32\xe2\xdb\x77\x47\xe3\x6c\x50\x3c\x7a\x94\xdb\x1e\x16\xf9\xf1\x10\x88\x8c\x6a\xfb\x0f\x0a\xc9\xa8\x8b\x3b\xc3\xca\xba\xf7\x81\x32\x86\x8b\x97\xc7\x87\x6b\xfc\xb4\x07\x54\xe3\x49\x00\x34\x86\x59\xf8\x72\x5a\xaa\x98\x19\xed\x5d\x10\x56\x69\xd3\x73\xa4\x35\x9b\x00\xbe\x18\xec\xd1\x5c\xca\x8c\x51\xf0\x06\xe5\x85\x5c\x16\x4c\xa9\x37\x8c\xa6\x19\x17\xac\x1f\x2b\x63\x33\xbf\x82\x08\xc5\x45\x6d\xf9\x6b\x62\x28\xe4\xff\xfd\xcc\x88\xeb\xdd\x25\xda\xc4\x49\x07\x4b\x83\x8b\xbb\xa0\x3c\x73\xde\xff\x3a\xc7\xaf\x25\x16\xb1\x89\x8e\x31\xbb\x48\x21\x13\xd3\x31\xbe\x1a\xbc\x85\x46\x08\x1a\x0a\x77\x5c\x9b\x73\x71\xd1\x98\xe9\x5b\xa8\xab\x0d\x11\xd5\x20\x21\xb9\x8d\x53\x65\xb1\xa0\x49\x95\xb3\x36\x18\x90\x2b\x17\xe8\xd3\x0c\x54\x13\x84\xb7\x2d\x51\x64\x4a\xf3\x75\x98\x8d\x1a\x44\x38\xb3\x66\x34\xbe\x33\xb5\x73\xf4\xc7\xb3\x33\x75\xe7\x24\x43\xef\xfd\x15\xa9\xd7\x0b\x3f\x12\x0c\xe7\xc8\x08\xa3\xc0\xa4\xf4\x44\x51\x46\x3f\xc6\x8b\xc7\xcd\xc8\x5b\x87\xb4\x08\xe7\x78\xbb\x92\x2a\x48\xda\x8d\xaf\x39\xdb\x3c\x57\xfe\xa8\x42\xda\x0f\x23\xee\xd1\xc5\xa2\xde\x22\x0d\x0c\x7e\x43\xf1\x47\x07\xce\xea\xdb\x09\x3d\xb9\x6a\x5e\xaa\x0a\x7f\x62\x53\x07\xb5\x60\x28\x75\xf0\x89\x99\xf2\x6c\xab\x8f\x1a\x4f\xc9\xdf\xd8\x66\xf7\x70\x8e\xc0\x14\x10\xe4\xd9\xe9\xc4\x3a\x39\x88\x49\x1b\xe5\xa4\xe2\x30\xa7\xbb\x40\x7b\xf6\x34\x7e\x3c\x30\x4c\xa6\x69\x5c\x19\x26\x98\xd4\x2a\x38\xad\x77\xb7\x33\x6d\xb1\x3d\x3b\xb6\xdc\x9d\x5b\xec\xaa\xe1\x9d\xaa\x38\x39\x96\xf4\x8f\xb8\xf0\x9a\xde\x3b\x5b\x23\x31\x7e\x37\x87\xe2\x4e\xee\x0a\xbc\x09\xa8\xc1\x55\xed\xef\x7b\x86\xde\x54\x44\xee\x41\x20\x37\xd5\xca\x1f\x0f\x73\x13\xb1\xf3\x1d\x1a\x74\x33\xd4\xd5\xdb\xe7\xde\x8d\x9d\x80\xc3\x64\x61\x6c\xde\x19\xbc\x23\x48\x0c\xef\x7c\x15\xba\x25\x9e\xe6\x67\x85\x14\x27\x9a\x15\x6b\x2e\x9c\x1e\xd0\xfb\x7d\xf2\x1c\x53\x65\xd9\xd4\xfa\x15\xaf\x74\x3c\x7b\x28\x8a\xba\x14\x7b\xd0\x95\xe0\xa5\xed\x2b\xe5\xa5\x1c\x1d\xf1\x9f\xd7\xb1\xcb\x4a\x73\x9b\x73\x0b\x64\x40\x77\x1b\xeb\x92\x3a\x40\x17\x5e\x9e\x9d\xfd\x36\xb8\x3b\x09\xcd\x69\x02\x69\xa5\xae\x56\x6c\x03\x16\x03\xc6\xf5\x8a\x15\x86\x8d\xd5\xbf\xe1\x5c\xf4\xf3\x52\x83\x10\xb5\x61\xb5\x4b\x58\x2b\x77\x00\xc3\xb1\x50\x09\x8d\x89\xc6\x02\x9e\x38\x38\xa3\x65\x4f\x36\xc8\xbb\x1e\x83\x2a\xf3\x67\xa8\xf9\xfa\xc4\xf7\x00\xd0\x38\x38\xf4\x20\x42\x33\x86\x72\xd3\x01\xb0\x83\x56\xeb\x40\x4e\x59\xc9\xdb\x1d\x04\xae\x7b\x84\x19\xb4\x47\x7d\x85\xc0\x83\x96\xdb\xfe\x0e\xa0\x83\xc0\x04\x37\xdc\x10\x1d\xc2\x0d\x18\x9e\x5e\x87\x34\x68\x42\x22\xee\x07\x6e\x50\xcd\xa2\xef\xd0\x54\xac\xf7\x8e\x78\x83\xaa\xa3\x6e\xbc\x41\xc0\xe7\x77\xc2\x1b\x04\x7d\x33\xa1\xca\xa2\x2a\xe6\xeb\x55\xb3\x3a\xad\xab\xd7\x8f\x08\x80\xa4\x54\x6c\x6c\x29\x1f\x57\x9e\x73\x04\x22\x8c\x40\x84\xaf\xce\xa0\x6d\xeb\xb0\xff\x68\x0b\x02\x2d\x20\x5f\xb5\xbf\x43\xe6\x4e\xd8\x64\xce\xbe\x42\x55\xad\x90\x90\xb5\x21\x40\xe1\x07\x5b\xed\xfd\x42\xa6\xcf\x8d\xd6\xe2\x4c\x89\x41\x77\x18\x09\xa5\xa0\x6e\xf8\x57\x9f\xe1\xa3\x55\xd1\x78\x27\xd3\x78\x48\x00\x1f\x77\xee\x8a\x6a\xa4\xbb\x15\x54\x1e\xa4\x8e\x87\xcb\xf0\x8d\xe6\x06\x09\xd6\x77\x0f\xf8\x4a\x63\x77\x86\xb0\xf7\xa3\xc0\x57\xaa\xee\x07\xc1\x57\x22\xcd\xbb\xe1\x2b\xae\xe6\xd9\x83\xd5\x78\x6e\x42\x43\xc6\x34\x21\x4f\x1c\x35\x12\x9e\xa8\x87\x81\x8d\x54\x17\x60\x1b\x6c\xa4\xde\x32\x96\x2a\x64\x0b\xa0\x76\x04\x8f\x3c\x1a\xf0\xc8\x8f\x16\x2f\x12\xee\xd8\x11\xc3\x85\x0f\x65\xb3\x0c\x54\xc3\x11\x8a\xf2\x95\x27\x21\xa9\x8f\xf7\xbe\x51\x2f\xc1\x49\x3b\x24\xea\xa5\x21\x25\x0d\xa2\xb6\x5b\x52\x91\x44\x3d\x15\xfd\xd8\x96\x11\xd0\xb2\x23\xa0\xa5\xdb\x98\xdf\x5d\xcc\xc7\x29\x5c\xee\xdd\x3b\xf9\xfc\x83\x62\xca\x4d\x40\xc3\x11\xc9\xf6\xe9\x6f\x6e\x57\x54\x9f\x70\x75\x42\x4f\xb6\xd0\xf5\xfd\xc0\x06\x97\x87\x2a\x3f\x8c\xa8\x85\xcf\x6c\x83\xa0\x1a\xe4\xbc\x36\xbd\xc6\x80\xd4\x27\xde\xbe\x1e\xc8\x63\xdf\x68\x3a\x94\xab\x7b\xab\x9c\xfb\x04\xb2\x93\x6c\xe1\x18\xf7\x86\x4a\x68\xe9\xcc\xc3\x18\xc7\xe0\xf4\x1d\xc3\x79\x48\x77\x85\xce\x21\xce\xc4\x1a\x81\xac\x68\xb3\x3f\x20\x83\x60\x0a\xbe\xec\x5f\x78\x59\x1f\xc2\x49\x1f\x7c\xff\x68\x5e\xfa\x98\x39\xe3\xd0\x5e\x7a\x28\x9d\x04\x87\xb1\xd7\x5f\x59\xdb\xbc\x8a\x34\x83\x0b\x32\x74\x46\x3b\xf9\x3a\xf3\xa6\xde\x26\xe9\x74\xbf\xb9\x7d\x1f\xbc\x7f\x43\xf0\x04\x3f\xb7\xeb\x49\x16\x6c\x91\xd9\x8a\x53\x75\xac\xc1\xa2\xcf\x40\xb8\x03\x04\x64\x18\xdc\xa0\xb6\x80\x78\xd2\xfd\xc9\xbf\xc3\xa1\x1e\x2e\x9c\x34\x27\x8a\xf3\x0c\xc7\xe4\x44\x95\x47\x2e\x53\xec\x27\xc9\x0f\xf3\x59\x77\x44\x48\xf7\x15\x27\x34\x02\x7a\x23\x14\x3e\x66\x6e\x0f\xe2\xc1\x8b\x9a\x8b\x79\xbb\xd3\x6f\x4d\xbf\x6c\x4d\x09\xe1\x30\xcf\xd5\x7e\x36\x72\x62\x61\xbd\x35\x74\x09\x87\x38\x8e\x00\xfb\xeb\xe2\xd4\xff\x0e\x2a\xb3\x6d\x4b\x05\xa1\x73\x25\xb3\x52\xfb\x03\xfc\x9c\x7d\x79\x45\xfe\xf0\x82\x00\x9c\x3a\x67\x85\x39\x52\x74\x89\x17\xbb\x81\x6b\x68\x0c\xc2\x3a\x6b\x94\xa6\x85\xaf\x67\x6f\x1d\xed\xd0\xe9\xcb\xb3\xdf\xbe\x98\x91\xf3\xc6\xf7\xb8\x22\x09\xcd\x12\x6b\x61\x07\xe5\x3b\xf8\xea\x7c\x43\x0a\x59\x8a\x14\x57\xd4\x0a\xda\x89\xd7\xb7\xcf\x2a\xf7\x36\x9a\x02\xb8\x32\x72\xf3\xdb\x2f\x74\x9d\x67\xec\x15\x62\xc3\xb4\x15\xce\xcd\xee\x68\x49\xbe\x3f\xfb\xed\xd4\x8c\x15\xae\xcc\xf7\x67\xbf\x75\x43\xbd\x5b\x6a\x9c\x19\x9b\x39\x68\x76\x3c\x1f\xcf\x0b\x58\x73\x87\xea\xe0\x56\x04\x56\x5a\xe6\xb9\x45\xc5\x50\x9f\x0e\xad\xed\x3b\x06\xc8\x9c\x4f\xc2\x40\x0b\xad\xc0\x5d\x61\xde\xb6\xce\xe6\xfa\x74\xa4\x62\xad\xed\x11\x46\xa8\x63\x82\xcc\xcd\x99\x50\xa4\xcc\x01\x57\xd1\x68\xe5\xeb\xf5\x01\x18\xc3\x96\xe9\xb3\xe8\xb9\xa0\xfe\xbd\x3b\x61\x50\x6b\x0e\x7a\x05\x30\x3c\x4b\x15\x91\x42\x4b\x02\x06\xe9\x46\xdf\x53\xa2\x57\xa5\x42\xa7\x3a\xae\x21\x54\xdf\xb3\xc2\xc0\x9f\x70\xe8\xb2\xe0\x4b\x2e\x7a\x8f\x59\xf8\x7d\x58\xaa\x2c\x83\x45\x52\x91\xe3\xbe\xab\x6c\x5d\x6a\x9e\xcd\xb8\xd0\x4a\x17\xb3\x77\x42\xff\x5c\x5c\xee\x61\xa6\x35\x9d\x9c\x46\x3a\x19\x4e\x9b\x06\xe5\x65\x18\x4a\x9c\xf6\xa0\x48\x97\x65\x11\x73\x01\xc4\x69\x51\x8b\x02\xf9\x7c\x44\x84\xce\x65\x03\xc5\x54\x7f\xed\x4e\xe4\x28\x8c\x2a\x08\x29\x8c\xa3\x11\x2e\x14\xe2\xcc\xa8\x2d\x3f\xd5\xc8\xac\x21\x07\x67\x77\xa5\x45\xa1\xb2\xfe\xdd\x1f\x7e\x3b\x84\xec\xb8\x8b\x14\x38\xb4\xfd\x9a\x51\xb3\x60\x65\x4e\xf8\x7a\xcd\x52\x4e\x35\xcb\x36\xae\x23\xd6\xd8\x43\x4b\x02\xa6\x44\x95\xa0\xbe\x5a\xca\xdb\xa4\x60\x32\xc3\xbc\x40\xfe\xea\xa6\x12\x6b\x2b\x43\xd4\x09\x79\x69\xa9\x45\x3d\x3a\x03\x2e\xbc\x79\x13\xde\x00\x7a\x05\x18\xb9\xcf\xdc\xa8\xd3\xd3\xad\xc3\x5f\x94\x85\xb9\xfb\xd3\xc6\x3d\x8f\x62\x04\x1b\x58\x19\x70\x7d\xb5\xee\x30\x58\x10\x2c\x7d\x8b\x0e\xf9\x60\x77\x7c\xba\x27\x33\xbe\x47\x16\xdc\x75\xe6\xf7\x3f\xc9\xa9\xbc\x15\xdd\x77\x06\x08\x81\xbd\x2d\x7b\x9e\xf7\x7a\xf0\x4c\xe3\xc0\x98\xaf\x9b\xd6\x7f\x6a\xef\xeb\x0e\x17\xc1\x9e\xda\x1a\x8b\x02\x29\x7c\x3a\xe0\xeb\xfe\xc0\x2e\x64\x96\xc9\x5b\x34\x19\x99\x06\xf8\x99\xc8\x9d\x6d\x9d\xed\x2e\x0c\xec\x50\x36\x65\x8f\x78\x8d\x11\x1e\xe7\x88\xdf\x2b\x1b\x8b\xd5\x5e\xee\x33\x6f\x6c\x79\x77\x6b\x35\x6c\x90\xa2\x86\xd6\xc0\xee\xe7\x81\x39\x2d\x34\x8f\x6b\xa1\x17\xee\x51\xa3\x96\xa4\x2c\x52\x10\x5c\xa8\xb6\x56\x73\xdd\xa8\x51\x5e\x49\x91\xbe\xf7\xc0\xe6\x5b\x09\xb0\xc3\x22\xbd\xda\x3b\x29\xca\x2c\xeb\xd9\x9a\x4b\x73\xe6\x7b\xe5\x09\xd3\x20\xb4\x29\x51\x7f\x0d\xac\xbb\xcb\x06\x59\x3a\xcf\xda\x88\x68\x1c\x11\x8d\x5f\xb7\x5f\xb4\x91\x5a\xe9\x87\xfb\x42\x16\x1e\x3f\x87\x53\x78\xe5\x9a\xc0\x41\xe0\x8e\xf7\x8d\x69\xdb\x19\x46\x0f\xe4\x6a\x1b\x5e\x30\x56\x2f\xec\xa1\x26\x18\xe0\x05\xf7\x9b\xeb\x1e\xd8\xbd\x6a\x91\xb6\x30\x86\xa3\x20\xf6\xaa\xaf\x6f\x63\x3b\x16\xe9\x1a\x3a\xa1\xa8\xc6\x45\x67\xd6\x26\x0f\x9b\x66\x08\x8d\x23\x60\xdb\x83\x41\x3a\xcd\xa7\x6d\x6d\x94\x0b\xa5\xa9\x48\x58\x15\xb0\x68\x65\x44\xcb\x61\x8e\xc7\x92\xb7\xfb\x7d\x82\x66\x43\x5c\x3e\xad\x85\xda\xdf\xf3\xd3\xbd\x82\x34\xd1\x65\x5d\xd9\x74\xc6\xf5\x6a\x25\xc3\xdb\xb6\xd3\x42\xf6\x39\x96\xf7\x70\x25\x2b\xe7\x4b\x6e\x5c\xf8\xb8\xe9\xbb\x54\xac\x38\x59\x96\x3c\x65\xd6\x61\x1b\xf1\xd7\x36\x57\x93\xa6\x68\x7e\xa6\xd9\x45\x6d\xfd\x9a\x58\xbf\xe9\x04\xe3\xbe\x2e\xb7\x4c\xaf\x15\xa4\x3f\x70\x82\x15\x0e\xc1\x55\xeb\x07\xfd\x2f\x88\x9c\x99\x4b\xbd\x22\x6b\x9a\x9f\xcc\xa9\x11\xa5\x41\xde\x31\xab\xc2\xbe\x98\x73\xa5\xf8\x0d\x33\x0a\x9c\x7d\xea\xa7\x5c\xf5\x9c\x4a\x01\xe1\xf1\x10\x89\x6b\xc4\xa7\x42\x1a\x3a\x67\xe5\xe1\x40\x24\x50\x68\xb3\xb4\x02\x89\x73\x24\xdb\x26\xca\xc6\xe5\xae\x8d\x5e\x84\x27\x19\x76\xf4\x04\x64\x79\xa2\x36\x42\xd3\x2f\x33\x62\x23\x0b\x70\xcd\x30\xeb\x2b\xc4\x66\x41\x52\xea\x42\xab\x60\x22\x7e\xa8\x53\x9c\x62\x18\x43\x0c\x32\x5d\xb3\xa1\x7b\x58\x30\x92\x3b\x80\xf7\xbd\xf9\xfb\xb7\x62\x40\xb7\x11\x8e\x4a\xad\xb8\x63\x24\x55\xa8\xa0\x74\x86\x52\x05\x8d\x76\x8b\xa5\x0a\x7b\xaf\x2b\x16\x4c\x7b\x2d\x19\x42\xfc\x00\xd9\xa3\x34\xe4\x24\x49\x0d\x13\x35\x57\x68\x46\xde\xf9\x7f\xbb\xc0\x11\x6e\x54\x03\xaa\x5e\x5d\x0b\x72\x42\xde\x33\x6d\x56\xfe\x15\x39\x27\x8a\x8b\x65\x06\x06\x01\xa3\x6f\xbf\x79\x7f\x89\x29\xb1\xa5\xd2\x82\xae\xd9\x0c\x9a\x5f\x6a\x59\xd0\x25\x7b\x45\xce\xcd\xd1\x11\x1b\xf2\x77\x99\x95\x6b\xf6\x3a\xa3\x7c\xad\xcc\x41\xb4\xe2\x2b\x4b\x67\xd7\xe2\xaa\xa1\xbe\x2d\x4b\x5a\x50\xa1\x59\x15\x0f\x86\xf6\x79\x81\x63\x70\xc3\xde\xe0\x59\xa7\xd9\x2d\xdd\xc0\x01\x75\x1a\x07\x9c\x79\x85\x23\xf0\x8d\x47\x15\x6a\x54\xa1\xbe\x12\x15\xea\x9e\x43\xa1\x9c\x08\x57\x51\x0b\x4f\x50\xb8\x35\x46\x5a\x47\xfb\x6e\x92\x76\x60\x31\xda\x29\x16\xa9\x2d\x89\x5d\x84\x63\xa9\x91\xd0\x7d\xc2\x90\xee\x32\x91\x7d\x14\x87\xc6\x3a\x0c\xe2\x45\xc7\x51\x22\xaa\xfe\x07\xc5\xfd\xc4\xda\x77\x07\xfe\x28\xdb\xfa\xc1\x02\x7f\x1e\x45\xe2\xda\x31\xe8\xe7\x30\x41\x3f\xe1\x69\x7a\x98\xa0\x9f\xe0\xf4\x6f\x8b\xfa\x69\x34\x8d\x85\xfd\x04\x4d\xc6\xb8\x9f\x47\x22\xbf\x78\xb4\xe1\x41\x50\x88\xa1\x26\x31\x06\xde\x3c\x46\xe9\x68\xbf\x28\x97\x70\x5f\x0f\x19\xe6\xd2\x94\x0b\x7a\xe8\xcb\x39\x69\x34\xee\x09\x75\x09\xc5\xa3\x3d\xf2\xb8\x4e\x27\xca\x28\xe2\x09\x7b\x4f\xd7\x91\xac\xae\xb9\x4c\x7f\x82\xbc\x01\x6b\x26\xf4\x85\xcc\x78\x12\x49\x09\x18\x69\xe4\xa0\x35\x98\xa3\xc6\xbb\x96\x1d\x1a\xde\xfa\x71\x61\x3b\x69\x66\xed\x6e\x65\x3e\x45\x6f\x35\xe6\xb3\xf1\x89\x6c\xa4\x40\x44\xd9\x94\x40\x58\x0d\x13\xde\xb9\xe6\x3c\xf0\x3e\x2f\x02\xc9\xf1\xeb\x5c\x91\x4f\x3f\x17\x10\xee\x02\x38\xe9\x4f\xd0\x73\xc1\xda\x23\xe1\x82\x70\x61\xfe\x30\x5a\xb0\x8d\x84\x78\x9e\xcb\xf4\xe4\x6c\x6a\xd1\x59\x32\x3d\x79\x39\x25\x4c\x27\x2f\x1c\x10\xac\x95\xda\xf4\x96\x72\x43\xee\x34\xcf\x08\xa3\xc9\x0a\x80\x6d\x2e\x9a\xc6\x25\x4f\xb5\xe9\x4f\xb9\x58\xce\xc8\x3f\x9a\x93\x98\x56\x29\x07\xd1\x03\xbf\x96\x37\x55\x0e\x53\x99\xe7\x52\x71\xcd\x70\x78\x38\x61\x9a\x01\xed\x85\x42\x2e\xc1\xa4\x2f\x68\x41\xb3\x8c\x65\x9f\xac\x27\x35\xac\xc1\xea\x24\xfc\xdc\xb6\xc1\x3c\xaf\xce\x20\xe6\xb4\x02\xdc\x0b\x17\x93\x64\x66\x06\xd1\x47\x66\xea\x52\xd8\xa7\xe0\xfd\x87\xae\x53\xa8\xcd\x03\x1e\x7a\x87\x64\x94\x22\x89\x65\xc8\xe9\xc3\xe4\x16\x0d\x4c\x6e\xdb\xc8\xec\x5b\x58\x39\x04\x0d\x08\x2e\xc0\x00\x96\x44\x31\xbb\x76\xae\x2f\x6b\x30\x63\x42\x31\x8f\x36\xc0\x2c\x1a\x68\x68\xd5\xbc\x02\xae\x7b\x33\x83\xeb\x12\x6b\xb9\x19\x59\xed\x86\xa7\x25\xcd\x82\x80\x8d\x4c\xd9\xac\x5b\x34\x62\x7b\xd9\x80\xed\x2d\x08\x4d\x9a\xba\xb3\x79\x84\x5c\xab\xb1\x56\x1e\xd7\xdc\x02\xdb\xb8\xd6\x8d\xb4\x96\x6b\xca\x31\xd8\xcc\x9f\xb7\x80\xa4\x3c\x53\xfe\x35\x57\x29\x1a\xcf\x5f\xf3\x57\xb7\x14\x68\x49\x87\xb4\x65\xee\x6b\x86\xd1\x78\x26\x66\xcd\x63\x4e\xe9\xcb\xc0\x54\x96\x71\x96\xb6\x48\x9e\x95\x65\xea\xf7\xbb\xc2\xaa\xde\x3d\xab\xab\x3a\x54\xa0\xd5\x57\x1c\x13\x15\x32\x87\xc8\x02\xfa\x87\x3e\xd4\xcf\xfc\xdb\xdd\x27\x7c\x8c\x6b\xb8\x34\x93\x11\xaa\x4b\xa5\x77\x6d\x61\x1d\x21\x8f\x99\xa3\x9b\x8d\x03\x89\x94\x08\x88\xab\xca\xcd\x91\x33\xaa\x55\x95\xa7\xb2\x61\x50\xf4\x23\xd1\x33\x34\x2a\x2c\x99\x26\x6f\xde\x5f\x9e\x3a\xeb\xa6\xdd\x61\x04\x30\xe1\xd6\x51\x6d\x28\xeb\x2b\x20\xfc\x8e\xdf\x9e\x20\x15\x9b\x05\x33\x9e\xd9\x23\x39\x53\x37\xc9\x2c\xc9\x4a\xa5\x59\x31\xcb\x64\x42\x33\xcb\x6a\xae\x27\x91\x1e\xae\x27\x66\xec\x8d\xa2\xe4\xa1\xad\x34\x9a\xcf\x31\x50\xa2\x3a\x63\xd4\xf4\xbd\xc5\xa8\xbd\x75\x2c\x4e\x69\xba\xce\x59\x0a\x36\x98\xc8\x54\xa0\xfb\x45\x99\x2d\xcc\x7f\x61\xdf\xeb\xc4\xd5\xd2\xd0\x52\xf0\x5f\xca\xca\xae\x5b\x09\xb3\x05\x53\x1e\x0d\xdf\x90\x72\x8e\x58\x5a\xbb\x6c\x94\xf7\xab\x21\x95\x82\x61\x34\xca\x00\xd6\x16\xd4\x7c\x52\x6e\x10\x6f\x65\x71\x6a\x95\x49\xab\xb1\x48\x46\x14\xa0\x15\x39\x85\xd3\x91\x82\xa3\xc8\x73\xb7\x3b\x18\xb0\x9a\xb5\xba\xa7\x93\x9b\xca\x70\xef\x3e\x10\xe1\xc8\xb1\x56\xf5\xa2\x28\x09\x9a\xfe\x31\x8f\xba\x47\x97\x5b\x1c\x20\x24\x25\x5c\xb0\x82\x19\x59\x80\x34\xfd\x01\x81\xf8\x14\xb9\xc8\x6b\x8a\xc8\xfc\xc6\x65\xe6\x0c\x53\xd4\xe2\x67\xb9\x59\xb4\x5b\xba\x71\xd5\xe2\x91\x85\xe1\x26\x85\xb7\x9f\x62\xad\xd5\xb7\x50\x22\x1e\xde\xf5\x76\x45\x8c\xdc\x37\xf4\x06\x0f\xa2\x43\x11\x4a\xc1\xaa\x98\xad\xe7\xf3\x0d\xd0\xb4\x17\x04\x57\xe4\x27\x48\xd6\xcb\x85\x2d\x64\xef\xa2\xb4\xed\xc6\x6a\x2f\x8f\x9c\xc7\x3e\xa6\xe9\x67\xa6\x48\x5e\xb0\x84\x19\x3d\x84\x21\x9f\xa1\x62\x63\x3b\x57\xcd\x7e\xa6\xe8\xe1\xf1\xc2\x09\xf8\x63\xee\x10\x45\xe7\xaf\x85\x61\xad\x20\xb6\x04\x6e\x1c\xa3\x25\xed\xa7\x26\x0d\xaa\xe5\x1e\xfd\xe4\xc3\xe4\xb3\x6e\xdb\x5d\x87\xd9\x7a\xb6\x03\x09\xd8\xce\x3a\x59\x37\x82\x60\x5b\xde\xe8\xfa\x73\x6f\x4c\xdf\x96\x4d\xba\xc1\x7b\x3b\x6f\xe6\xb7\x53\xca\x3d\x30\x3d\x1e\x2d\x64\x35\x6a\x8a\x3f\x52\x39\xf7\xee\x68\xcb\x46\x83\x76\x7e\x06\xe0\x52\x4e\x1c\xe8\x95\x4e\x2a\x36\x1d\x3e\x77\xee\x71\xc7\x35\xa1\x13\xff\xd5\xdd\xf6\xb8\xfe\x56\xcf\x64\xb0\xc1\xd4\x88\x2f\x10\xa3\x81\x29\x13\xeb\x8c\x3b\xf0\xdb\x37\xc7\xec\x80\xd1\x36\x06\xb6\xce\xaa\x15\xfb\xa5\x04\x52\xfd\xcf\xb3\x69\x63\xf5\x5e\x44\x05\xb4\x21\xd1\xb8\xed\x36\x91\x60\xd4\x68\xfe\x6f\x1f\x11\x5b\xbb\xc5\xef\x34\x16\x94\x37\x7c\x34\xf5\x46\xda\xba\x16\x57\xf5\x36\xb5\xa6\x01\xee\x8b\xe6\x19\xc5\x7e\x5d\x5a\xd3\xb0\xdd\xf5\xf3\x8b\x77\xd6\xda\x78\x98\x40\xdf\xda\xe3\x3b\x1d\xbc\x2a\xc0\x9a\x02\x2e\x70\x43\x5e\x47\xfc\x05\xfb\x05\x07\x37\x0d\x11\xfb\x0c\x70\xa7\x5c\xd8\xdd\xc7\xbb\xfe\xfc\xd8\xa7\xdb\x4d\xfc\xa4\x91\xa2\x7b\xea\x1e\xbc\x88\x1d\xf6\xad\xf9\xbc\x1b\x0d\xee\x89\xe0\xd4\x97\xee\xe0\x09\xbf\xa3\xb4\x7c\xa0\xbc\x31\xbc\xde\x78\xb7\xaa\x51\xdf\x7b\x55\xd3\x40\x7a\xd6\x0f\x94\x13\x5b\xa2\x25\x67\x85\x59\x01\x57\x02\x1a\x48\x08\x17\x49\x56\xa6\x4c\x81\x40\x5a\xc1\xf2\xaa\x20\x11\x45\x04\x4b\x98\x52\xb4\xd8\x84\x7d\x04\xc1\x38\x8e\xbf\x57\xbb\xe1\x46\x77\xa8\xfc\xe3\x1f\x7d\xd4\x4f\x6f\x3c\x8b\x42\x59\x04\x9c\x8b\xcd\xec\xdd\x3d\x91\x2d\xfb\x27\x23\x8f\x05\xec\xf4\xfb\x3c\xeb\xbb\xa8\xad\x1b\xb4\x57\xc9\xbc\x9f\x8c\xe4\xb1\xa9\x34\x4f\x77\x99\x72\x5d\xb0\x25\x87\xed\xe5\x52\x9c\xde\xbc\xa4\x59\xbe\xa2\x2f\x67\xe7\xe6\xd1\x25\x17\x9f\x7b\xfd\x1b\xae\x51\x1d\xda\x66\xad\x28\x24\x63\x37\x2c\x23\xf0\x11\xa2\x4c\x57\x23\xd2\x6b\x44\x7a\x7d\xe3\xbe\xcc\xbd\x90\x5e\x78\x85\xb0\x56\x43\x69\x65\x49\x85\x2a\xf5\x56\x52\xd7\xbc\xe2\xb3\xf6\x15\x1f\x56\xd2\x6a\x00\xad\xd8\x45\xcd\xef\xc1\x3e\x0d\xf8\xd2\x36\x64\x47\xad\x61\xdd\xe0\x55\x11\x2d\x50\x01\x47\x50\xc7\xe3\x20\x55\x5b\x92\xb9\x46\xae\xc0\xdd\xaa\x00\x0f\xb8\x17\x23\x1c\xe4\x51\x92\xd0\xe1\x70\x90\x21\xe2\xcd\x5d\xa1\x21\x43\xc9\xe2\x10\x62\x05\x84\x7f\x25\xb3\xb4\x42\x89\x78\x59\xbc\x57\x8c\x0a\x09\x16\xa2\x08\x26\xd3\xc9\x2d\x9b\xaf\xa4\xfc\x1c\x03\x83\xc4\xf1\x1f\x16\xf2\x11\xd2\x2c\x0b\x49\x30\x83\x40\xcf\x24\x84\xb2\x80\xdd\x81\xdd\x80\xb8\x57\xc5\x74\x2b\x5b\xc9\xca\xbc\x67\xbf\xed\x8b\x5e\xdd\x8d\x53\x59\xc0\xca\xaf\xd5\x9c\x5a\x63\xff\x87\xfd\xa0\x96\x66\x1c\xa9\x1b\xdd\x61\xbe\x6f\x3b\xbf\xcb\x81\xbb\x70\xbb\x32\xac\xb9\xfb\xe2\xf0\xd3\x56\x81\x7a\xba\x8e\x59\x64\x7b\xeb\x22\x85\x5c\x00\xca\x07\x4f\x9a\x5d\x40\x5a\x30\x92\xc9\xe5\x12\x96\xb0\xef\xd8\x81\xb0\x1f\x01\x00\xc3\xcf\x51\xa0\xeb\x8f\xa0\x1e\x60\x24\x89\xad\x8f\x06\x84\x0c\xd1\x1f\x89\x2c\x52\x96\x12\xaa\x67\xa1\xd1\x17\xde\x57\xaf\xc8\x7b\x29\xd8\x94\xfc\x64\xe9\xc9\x94\x7c\xc0\x97\xfd\x3f\x3e\xa0\x33\x8a\x85\x07\x20\x06\x95\x5d\xc6\x9c\x66\x97\xf0\x7b\x5d\x6a\xc0\xb6\x41\x46\xe0\x60\x7d\xda\xc5\xd3\x5a\xec\xa8\xa5\xd4\x0d\x89\x77\xea\xde\xec\x4b\xf4\x5f\x7f\x70\xbe\xb9\x5e\x03\x44\xa3\xad\x25\x30\xb4\xf2\xec\x99\x4b\x63\x5b\xcd\x32\xb6\xa4\xc9\xc6\x32\x84\x2d\x5b\x0e\x8e\xf7\x9c\x42\x1c\xaa\x88\xc2\xce\x44\x14\x6f\xf0\xc9\xfc\xfc\xa9\x07\x6a\x30\x83\x6d\xec\xda\xb6\xea\xb3\xf1\x9e\xe1\x59\xad\x7b\xf8\x65\xa7\x6f\xe4\x54\xaf\x22\xdd\x9b\x9f\xa1\x67\x23\xa0\xe5\xd6\xb0\xf2\xf1\xc3\x8f\xc4\x3c\x08\xa1\x5a\x8e\x1c\x72\x01\x66\x18\x97\x3d\x02\xa8\x63\x05\x93\x88\x5a\x9e\x73\x59\x44\xbc\x44\xef\x16\x24\x80\x22\x21\x69\x2e\x34\x91\xa2\x0d\xd1\x58\x49\xac\x1e\x67\x69\x65\x65\x6d\xd0\x92\xfc\xfe\xf7\xdf\xc3\x19\x9e\xd3\xe4\xf3\x2d\x2d\x8c\x3c\xb9\xce\xa9\xe6\x73\x9e\x01\xe6\xe9\x93\xe9\xf5\x53\x40\xd4\xa9\x91\x6c\x78\x8a\x5f\x73\xd9\x79\x5e\x9e\xfc\xf1\x0f\x7f\xf8\xfe\x0f\x53\xb4\x35\x29\x7e\xc3\x86\xd5\x65\xbc\xe3\xa9\xff\x47\x45\xfc\xbb\x0e\xbb\x63\x03\x15\x13\x6d\x91\xb8\x80\x3d\x6d\x39\xdf\x28\x69\xbd\x86\x0e\x22\x7e\xbd\xf0\x69\xbb\x1a\x6c\xf0\xb4\x3e\x1a\x61\xc1\xe5\x81\x91\xcb\xf1\xf8\xc3\x72\x4d\xbb\x16\xe1\x48\xc0\x96\xb5\x2a\xa4\xd6\xf1\xdc\x4e\xf8\x24\x18\xaf\x25\xb8\x76\x84\xf0\xd8\x89\xb6\xd5\x1a\xde\x7d\x8c\xee\xcb\x6e\x94\xfb\xf3\xd9\xd8\xa4\x77\x3c\x5f\x8d\xc1\x0c\x67\xc1\xb1\x6f\x6f\x3f\xab\xb5\x93\x62\xa1\x08\x16\x00\x51\x05\x92\xfa\x5a\xfe\x34\x3c\x42\x1e\x55\xd0\x7d\x9e\x1b\x67\x96\xfe\xb9\x14\x69\x6c\xef\x3f\xb9\x47\x48\xde\xc8\xc5\xdb\x9f\x08\x13\x89\x34\x3c\xf8\xf5\x39\x99\xc3\xb3\x06\x85\x73\xa6\x5b\xa0\x10\xce\x41\x6c\x87\xf2\x0c\x89\x1c\x2b\x20\x9c\x08\xb1\xce\xac\x8d\xa9\xc4\x42\x52\x44\x17\xa5\xd2\xa4\x90\x52\x2b\x47\xd2\x8c\xf4\x8d\x1d\x18\x16\x0b\x05\xfa\x5b\xd4\x32\xa0\x30\xf3\x8d\x66\x01\xd0\x2d\x32\x41\xfb\xc4\xce\xaf\xc6\xfc\x42\x12\xea\x5d\x73\x9e\x7c\xbe\xc5\x92\xab\x55\x07\xb2\x20\x9f\xca\x22\xfb\x84\xa8\x93\x39\x0b\x2a\xd6\x5f\x8b\x6b\xf1\xae\x46\x63\x00\x1a\x63\xb3\xbc\x99\xfd\xf2\x21\xe2\x60\x23\xb5\xe0\xe4\x8d\x2c\x1d\xcd\x2d\x15\xab\x3e\x35\xc8\x98\xdd\x7d\xbb\x5a\x62\xc2\xaf\xd3\x49\x59\x44\xc4\x31\x9c\xce\x92\xdf\x58\xb9\x30\x93\x49\x8c\x5e\x1a\x82\x6f\x24\x21\x4c\x0d\x63\xf8\x1e\x78\x0e\x9e\x7f\x02\x13\x04\x7b\x75\x0a\x78\xbc\x57\x86\x57\x9c\x02\xab\x7c\x01\x29\xd2\x12\xc8\xc8\x8b\x61\x46\xf8\x25\x19\x2e\x67\x7c\x15\x8d\x84\xf8\xc9\x74\xe7\xb9\x11\xe2\x4f\x17\x98\xe2\x9e\xfa\x0d\x73\x8b\x5b\x5f\xd8\x1f\xd0\x45\xb2\x0a\x16\xd3\x02\x20\xb8\x50\x9a\xd1\x14\x41\x13\xe6\x03\x64\xcd\x97\x2b\x8d\x75\x1c\x94\xcc\x6e\x58\x4a\x6e\x38\x25\xec\x8b\x35\xa0\xbc\x79\x7f\x09\xf3\x96\xeb\xe0\x54\x2a\xf2\x9c\xcd\x96\xb3\x29\xf9\xf4\xb9\x9c\xb3\x13\xff\xfb\x27\x97\x9b\xd5\xf6\x45\xb8\x38\x71\xf6\x70\x08\xc9\x76\xa8\xdd\x8a\xc1\x66\x74\xc3\xd0\x86\xc0\x65\x06\xcb\xfe\x62\xe6\xa6\xbe\xa6\x1b\x04\x2a\x63\x9e\xbc\x77\x17\x84\xa6\x69\xc1\x94\x82\x35\xba\xa8\xe2\xcf\xb1\xd7\x12\xd0\xef\x9f\x00\xbe\x88\x1d\x98\x95\x7e\xf9\xdd\x9f\x66\x67\xb3\xb3\xd9\xcb\x4f\x88\xfe\xb0\x7d\x9b\x83\xc9\xd5\xe7\x0d\x29\x45\xc6\x94\x82\x43\xa8\x0d\x8d\x59\x1a\x79\x96\x24\xe6\xde\x69\x69\xd6\xb7\x76\x21\xcc\x05\x35\xf2\xba\xe9\x44\x59\x8a\x60\xda\x50\x11\xdc\x59\xfc\x19\x17\x56\x30\x24\x13\x40\xbf\x12\x9a\x65\xca\xcb\x41\xfe\x8e\x5d\x96\x50\xc2\x40\x69\x78\x0c\x4a\x07\xff\xcc\xb2\x8d\xad\x66\x20\xa4\x38\x31\xa7\xca\x26\x5c\x9d\xb1\xd9\x14\xbd\xa8\x54\x41\x13\x5d\x16\x02\x32\x47\x0a\xac\xd4\xe1\x4e\x81\x3f\x49\x78\x40\xfd\x51\xbb\x9e\x80\xf5\xe3\x7a\xf2\x03\x1c\x11\x73\x92\xed\xa3\x25\xb7\x64\xd5\x36\x79\x75\x7a\x7a\x3d\x81\x6e\xce\x51\xc8\xe3\xca\x4b\x7e\x16\xc3\xba\x20\xd6\x92\xe3\x62\x59\x8d\xc4\x67\xcd\x42\x39\x2b\xd6\x5c\x21\x28\x0e\x06\xf7\xf1\xc3\x8f\x33\xf2\xbf\x65\x09\x6d\xdd\x11\x85\x8e\xb5\x24\x39\x55\x20\x5a\xd2\x62\xce\x75\x41\x0b\xdf\x4d\x5d\xab\xc6\x1a\x22\x0c\x73\x0f\x4e\x03\x87\x0b\x22\xe6\x16\xdc\x4e\xfc\x5c\x6b\xb6\xce\xb5\xed\xc0\x7c\x8c\x9a\xff\x2f\x08\x08\x80\x8a\x27\x84\x96\x7a\x45\xcc\x39\x26\xd7\x13\xf3\xe4\x95\x19\xc1\xad\x2c\xd2\xff\x85\x00\x57\xb3\xc6\x16\x0b\x38\x23\x7f\x29\xe8\x72\x0d\x4a\xcf\xf3\xeb\xc9\x6f\x66\xb3\xd9\xf5\x04\x43\x29\x10\x6c\x1d\xc8\x33\xcf\xaf\x27\xff\xd3\x3d\x2f\x58\xd8\xcb\xd4\x16\xb0\xde\xc3\xd1\xb5\x83\x36\xb4\x33\xcb\x6e\xb0\xfc\xed\x4c\xbb\xfe\x42\xa7\xb8\xd9\x10\x9b\x50\x67\xdc\xca\xa5\xe7\x65\xa1\x22\x2a\x80\xfb\xe6\x9f\xcd\xe3\xee\xf0\x00\x67\x97\x31\x07\xd2\x25\xa4\x36\x2a\xd6\x5a\x42\x69\x6d\x87\xc0\x7f\xf9\x07\xf2\x5f\x17\x97\xc3\x30\x21\xbf\xe4\xd1\x94\xef\x38\x9c\xff\xba\xb8\x8c\x8c\x62\x4e\x75\xb2\x62\xca\x5c\x00\x5b\x4e\xa7\xfa\xf2\xd9\xd0\x2f\x0f\xd3\x17\x0c\x07\xd5\x36\x96\xea\xf4\xe6\xe5\xec\xcf\xb2\x14\x29\xba\x17\x06\x29\xc8\xb1\xf6\x11\x21\xc1\xdb\xe4\x5d\xf2\x0b\x2d\x3f\x33\x40\xfc\xcc\x4d\x07\x44\xcb\x3b\xa7\xb2\x68\x02\x40\xec\xf7\x75\x54\x4f\xec\x31\x4c\x37\x5f\x27\x7f\x07\x1d\x0e\xec\xb2\x70\x23\x9f\x5d\xc8\xf4\x19\xdc\xdd\x67\x97\x2c\x29\x98\x7e\x16\xfd\x44\x5c\x7d\x7f\x1f\x28\xec\xbd\x23\x2c\x79\x64\x80\x1f\xdf\xbd\x19\xf0\xf2\x7e\x3b\x7f\x65\x76\xc4\x5a\x80\xfa\x76\x3c\x6c\x17\xd8\x9d\xec\x8e\x62\x8a\x47\x8c\x4c\x72\x42\x06\x4d\x30\x46\x64\x5b\x64\x5e\xce\x92\xd1\x57\x34\xba\xb5\xbf\x39\x9f\x4c\xdc\xad\xbd\x5d\x75\x09\x6f\xf0\xac\x71\x83\xdb\xd9\x47\xee\xd8\xdf\xc0\x24\x20\xbd\x64\x25\x92\x0a\xa4\xbf\xfd\xa1\x12\x82\x6c\x1f\xd5\x40\x82\x07\x4e\x26\x6f\x67\xb0\x27\x37\x2f\xe4\x0d\x37\xba\x7e\x20\xc5\x01\xa8\x1a\x49\xa2\x3d\xd0\xdb\xc8\x9f\x11\xb4\x0c\xbb\x8c\xf9\xcb\xfd\xa3\xa8\xfb\x0b\x1e\x01\x6b\x42\xc3\x87\x86\xdd\x49\x89\x7f\xad\xaa\x51\xf1\x99\x89\x19\x39\x37\x44\x8d\xe7\x30\xf6\x60\x9c\x20\xc4\xdb\xb8\x91\x05\xa0\x10\xd7\x8a\x65\x0b\x94\xe8\xa9\x08\x04\x64\xa7\x2e\x66\x81\x7f\xb9\xfd\x21\x1b\x2f\x6b\x24\xd6\x5b\xae\x98\x23\xac\x96\x2e\xd6\xc6\xe3\xa4\x01\x55\x5a\x7c\xef\xba\xcc\x34\xcf\x33\x16\x74\x6d\xf5\x03\x67\x37\x09\xf6\x94\x11\xba\x34\xfb\xe1\xab\x07\x3a\x97\x1f\xbe\x68\x46\xc9\x52\x0c\x65\x5d\xe7\x19\x24\x03\x23\x2b\xbe\x5c\x91\x94\x2d\x0b\x86\xec\xb8\x40\x0d\x06\xcb\xec\xe9\x2a\x6b\x9c\xef\x66\x17\x07\xc5\x74\x32\xaf\x89\x45\xdb\xc4\xa6\xed\x02\x93\x5f\x2d\x6f\x3f\xf2\x72\x13\xa8\xe2\xc1\x33\x48\x71\x37\x67\xd6\xf4\x0c\xfc\x58\x91\x4c\x8a\xa5\x4b\x95\x87\x6f\xda\xde\x21\xcc\x50\xcd\xc8\xfb\x9f\xaf\xde\xbe\x82\xae\x8c\x28\x85\x8a\xe8\x33\x45\xec\xd9\xbf\xe1\xec\xb6\x22\xda\xf0\x99\x9a\xdd\xaa\x3e\x1d\x8c\x6c\xc3\x1a\x1e\xf5\xfd\x13\x52\xcf\xc8\xdf\x18\xcb\xc9\xdb\x2f\x39\x47\x39\xdf\x96\xef\x22\x6a\x6d\x14\x63\xbe\x00\x55\xfa\x96\xe2\xbd\x5a\xe7\x86\xb1\xdc\x58\x8b\xca\x30\x8b\x4e\x93\x8c\x45\x45\xda\x5f\xa7\x13\xd6\x1c\x42\x7b\x9b\xda\xa3\xb4\x9a\x83\xcf\xf4\x46\xd2\xc0\x3a\x0e\x6b\x12\x84\x5c\xba\x9b\x1f\x6c\x11\x9c\xf1\xc2\x0a\x08\xa0\x79\x53\xbf\x79\xe6\x9a\x91\x94\x2f\x50\xb0\xab\x7a\xf3\x9f\x50\x12\xf4\x55\xb8\xb8\x55\x7c\xc9\x8a\x25\x9f\xe1\x73\xcf\xaa\x19\x3d\xf3\xf6\x1a\x4c\xb8\x0d\xfe\xbc\x41\x20\xf6\x9d\x09\x7c\x74\x79\x77\x23\xc0\x5b\xe3\x8f\xda\xad\xab\x8d\x50\x46\x2d\xda\x9d\xdc\x42\xe3\x49\x78\x0a\xae\xf8\x9a\x41\x34\x67\x9b\x00\xc7\x1a\xf5\x1c\x16\xdf\xc8\x8d\x12\x12\x34\x19\xf5\xd2\x37\xa9\x8e\x88\x39\x04\x40\xd2\x0c\x2d\x3c\x48\x3a\x26\x9c\x5a\x7c\x11\x7d\x64\x6c\x4e\x7f\x29\x19\x99\x33\x5a\x80\x4d\xd0\x7e\xfc\xa8\x89\x86\xba\x0e\x81\xa1\x2e\x03\x76\x1f\x88\x10\x45\xb3\x8c\x6a\xb3\x00\xbb\xfd\x60\xde\x84\x04\x4c\x60\xae\x99\x91\xf7\x52\xb3\x57\x35\x42\xe6\x25\x4c\xcb\x52\x12\x9a\xac\x2a\xe4\xfd\xad\x07\x43\x98\xee\x82\x6f\xc8\x82\xe4\x59\xb9\xe4\x3e\x53\x69\xdd\x78\x39\xaa\x37\xa3\x7a\x33\xaa\x37\x77\x41\xed\xa2\x21\x30\x74\xdc\x55\x39\xe1\x1c\x08\x60\xce\xd0\x16\x48\xb3\xd2\xac\xd7\x5e\x02\x41\x40\x0b\x86\x27\x69\x5c\x40\x01\x23\x73\xf5\x2d\x9d\x70\x0e\x36\x73\xb0\x7c\x18\xc3\xed\x8a\x81\xd8\x13\x0e\xd9\x55\xea\x09\xa8\x55\xba\x9f\x24\x13\x0e\xfc\x8e\xfa\x98\x9f\xfc\x70\x12\x7d\x74\x6d\xcc\x8f\x69\x18\x2f\x70\x39\xa1\x28\x09\x9a\xd4\x34\x10\x52\xff\x54\x9f\x68\xb0\x87\xc2\x55\x83\x38\x55\x31\xf7\x46\x41\x52\x95\xd4\xee\x89\x89\x3d\x2f\x55\x0a\x18\xef\x80\xb6\x92\xa1\x7b\x5b\x11\xaa\x66\xc4\x7d\xe7\x84\xde\xa2\x2f\xa9\xc5\x8d\x94\x15\xc4\x59\xc1\x17\x9b\x96\x9a\x00\xc9\x7f\x40\x13\x4c\xeb\x65\x73\xad\x2f\xb1\xae\x23\x85\x21\xfa\xe0\x68\x16\x32\x78\x0a\x59\xae\xad\x92\x3b\xad\xbd\xe9\x12\x20\x79\x8c\x4c\xed\xa1\xfd\xcc\xdf\x7c\xdc\x2e\x89\x71\xcb\x01\xea\xd4\x31\x25\x9a\x1d\x6c\xa3\xc1\x2d\x18\x78\x44\x3b\x64\xd5\x7b\x3a\xa1\x90\x8d\xc2\x6d\x46\x78\x3a\x93\x95\x54\xcc\x53\xb2\xba\x8c\x83\x06\x7a\x48\xd6\x85\xe8\x26\x9b\x09\xcb\x25\x46\x67\x35\x59\x0a\xb2\x81\x59\x35\xbe\x6e\x22\xc0\x18\xba\xb6\xd1\x00\x04\x0a\x55\x25\x89\x6c\xf4\x08\xb7\x3a\x38\x7a\x36\xdb\x18\x7c\xe3\x99\x0a\xf4\x71\x48\x2f\xe1\x6c\x18\xcd\x61\x19\x25\x16\xd3\x16\x31\x5d\xe1\x81\x67\x55\xbf\xa8\x1e\x59\x61\x28\xd0\x65\x31\x89\x6b\x35\xf3\xc8\xf2\x61\xbe\x0e\x2b\xb6\xbb\x20\x52\xac\xd1\xd1\xec\x5f\x4b\xac\xf5\x55\xe5\xde\xaa\x8d\xd2\x92\x04\x5e\x4d\x8b\xc0\x6d\x87\x1b\x48\x1b\x32\xab\xf9\x20\x38\x38\x21\xfa\xb5\xf9\x45\xfb\x41\xcc\xba\xe3\x9f\x05\x1c\xc7\x7c\xe5\x7a\xa2\x8b\x92\x5d\x4f\xa6\x21\xd9\x51\xd6\x52\xe0\x6c\x28\x5b\x6e\x70\x65\x1e\xd8\xed\x0a\xd7\x06\x13\x3b\xb4\xb5\xb1\x06\x71\x81\x2d\xb2\x46\x95\x92\x09\xa7\x9e\x84\xd6\xc4\xfd\x6a\x4c\x73\x29\x33\x46\x21\xc1\x00\x2b\x8a\x58\xee\xab\xb7\xe6\xe7\xee\x6f\x25\xe6\x6c\x88\x67\x20\x9e\x81\x92\x1d\x47\x3b\x9a\xcf\x46\x3c\x35\x0a\x37\x16\x3c\xe4\x8a\x15\xef\xc4\x42\xb6\x46\x0e\xee\x6b\x67\x3c\x1c\xaa\x00\x46\xe4\x02\xf7\x81\x3d\xc4\x01\xff\xea\x56\x26\xed\x5b\xf6\x90\x3e\x3f\xd3\xca\xa7\x1b\x17\xe7\xc0\x93\x2e\x18\xc3\x89\x83\x5d\x0e\x12\x27\xfa\x87\x33\xe8\x06\x68\xc5\x82\x0e\xa9\x15\xc6\xbe\xe8\x22\x16\x1e\x50\x8f\xe3\x0d\x47\xe3\x57\x3e\x46\x06\x63\x1f\xdc\x52\xa6\x63\x3b\x6e\x79\x3a\x81\x02\x0a\x5d\x25\xc0\x21\x15\x97\x5c\x60\x95\x05\x9b\x77\xa4\xb4\xe7\x88\x42\xd5\x37\x22\x17\xbb\xdd\xba\xa8\x17\xf1\xdc\xa5\x9b\x42\x25\x08\x8e\x7d\x20\x7d\x54\xdf\xa5\x49\x21\x95\xb2\x25\x84\xdf\x2d\xea\x23\xc2\xac\x87\x58\x1f\xc3\x66\x93\xc6\x67\x4e\x3e\x76\xc9\x7a\x60\xf8\xa9\x13\x1d\x6c\x81\x03\xc8\x5d\x50\xd9\xba\x3e\xbe\x7b\xa3\xe2\x6e\x50\x65\xb4\xcf\x98\x27\xd5\x2d\x99\x05\xef\xc0\x8c\xb2\x4d\xc7\x44\xd6\x60\xff\xcc\x32\x42\x13\xc8\x16\x69\x7e\x8d\x7d\x70\x2f\xf1\x60\xce\x34\x1d\x8d\x19\xa3\x31\x63\x34\x66\x8c\xc6\x8c\xfb\x36\x66\xb4\x68\xcf\x93\xb2\x68\xb4\x47\xbf\xa7\x59\x23\xbe\x0c\x3b\x92\xed\xa3\x19\x38\xe2\xa3\x1b\xad\x1c\xa3\x95\xe3\x31\x59\x39\xba\xee\xc3\x68\xea\x18\x4d\x1d\xa3\xa9\x63\x34\x75\x3c\x06\x53\x07\xd2\xa8\xfd\xed\x1d\x8d\xf7\x87\x31\xee\xd1\xf2\x31\x5a\x3e\x46\xcb\x87\xbd\x1f\xb2\xe0\xff\xf6\x36\xc1\x1f\x65\x42\xb3\xcb\x12\x8e\xc9\x79\x92\x30\xa5\xb6\x1b\x40\xba\xde\x41\xc2\x53\x29\x1c\xb2\xc0\xd8\x17\x1f\x75\x83\xc5\x47\x8d\xee\xe1\xb2\xee\x51\x01\xb3\xc2\xda\xb1\xbe\xa0\xa6\x8b\x59\x9f\x91\xbf\xd2\x1b\xa3\x60\xd1\x20\x8e\x5d\x25\x32\x67\x69\x25\xaf\xae\x21\x1d\x35\xd7\x64\x5d\x26\x2b\xc2\xa8\xe2\x18\x22\xb7\x2c\xa8\xd0\xed\xf7\x6c\x4a\x0f\x3c\x38\x2e\x57\xa0\x8b\x53\x92\x42\xe1\x24\xb8\x58\x8e\x06\x94\xd1\x80\x32\x1a\x50\xee\xd9\x80\x32\x23\x28\xfb\x56\xd7\xd6\xc5\x2c\xb2\x5f\x4a\x9a\xb9\xb3\x5c\x3d\xde\x40\x2c\x61\xca\x6a\x9d\x5a\xe9\x70\x46\x0c\xe1\x77\xa9\x66\x6d\x79\x63\xd0\x00\x87\x1b\x3b\x3c\xb1\x34\x33\x8f\xd0\xbc\xfb\x30\xd6\x98\x73\x6e\x2b\x12\x20\x49\x3d\xd4\xd8\x87\x9b\x6a\x6a\x3c\xa3\x6b\x19\xfa\x39\x4d\xf7\x00\x0e\x62\xae\xa9\x7d\xeb\xbd\x14\x1f\xec\xa5\x3f\xd7\x78\x91\x58\xaf\x1a\x1c\x7d\xa1\xe2\x0f\x4e\xc4\xf2\x1f\x21\xb4\x6a\x55\xe5\xe7\x59\xc0\xf6\x88\x13\x4f\x70\x02\xe2\x00\x7d\x9c\xdb\x3e\x40\xc1\xb4\xe2\xe1\x56\xe9\x30\x9e\x8c\xe5\xc2\x46\xe3\x6a\x1b\xc0\x0b\x41\xb4\x75\xd4\x72\x8c\x04\xdc\xb0\x62\xde\xee\xec\xef\xac\x98\xfb\xe2\x6c\x2e\xc0\xfd\xaf\x57\x57\x17\x04\xda\x1f\x46\xd4\x08\xd6\xf8\x43\x99\xf5\xc6\x24\x36\x9a\x46\x28\x49\xa3\x20\x0c\x25\x45\x19\x56\xd0\x09\x36\x61\x0b\x1b\x37\x13\x8c\x04\x6c\x88\x6a\x04\x1f\x3f\xfc\x18\xb9\xd8\xef\xeb\x0d\x5c\xd1\x7d\xac\x6a\x4e\x0b\x28\x08\x57\x16\x99\xaf\x15\x0e\x32\x90\x65\xd6\x98\xf6\x1b\x2e\x02\xb0\x0d\xf2\xbb\x5a\xdd\x11\x8b\xbe\x17\xd9\xc6\x01\xfe\x17\x65\x96\x4d\xc9\x82\x1b\xbe\xad\x34\xcb\x9d\x26\x6f\x36\x7d\x46\xc8\xf5\xe4\x77\xd7\x13\xb2\x66\x54\x00\xa5\xd8\x4d\xcc\xc6\x05\xe8\x3c\x12\x95\xe9\xb0\x4a\xde\x5f\x3f\xe4\x36\x72\x73\xae\xa6\x10\xb5\xfe\x8a\x2c\x99\x9e\x92\x5c\x2a\xf3\xff\xa5\x9e\x5a\x69\x7b\x4a\x20\xe5\xff\x94\xac\x18\x4d\xa7\x2e\xb5\xca\xdd\x46\xbf\xd7\x39\xdc\x8d\x32\x1c\x88\x2c\x1c\x96\x24\x80\x20\xdd\x1e\xeb\x7f\x82\x7c\x6d\xef\xb1\xd9\x16\xfc\xc1\x52\x05\x37\x93\xde\x25\x1f\x14\xfd\x1a\x49\x5d\xe5\xe7\x87\x0c\xbd\x8a\xae\xc0\x70\xd2\xeb\xc9\x92\xe9\xeb\x89\xe1\x5f\x4e\xf7\x72\x0f\xf0\xef\xeb\xc9\x8c\x5c\x4f\xae\x27\xe4\x39\xf0\xeb\x17\x03\x06\xd7\x91\x04\xeb\xbd\x97\x0d\xba\x52\x60\x59\x8d\xa3\x31\xd2\x19\x21\xaf\x5d\x35\x37\xd0\xf6\x0a\x86\x39\x00\x48\xca\x95\xe6\xc2\xbd\x84\x01\x46\x42\x06\xfd\x82\x1a\x99\x65\xd5\x2f\xaa\x3e\x97\x50\xf0\x80\x79\x77\x69\x50\xed\xf7\xd0\x7e\x66\xde\xb1\x59\x0e\x4e\x1a\xfa\x8f\x8a\x2d\xdb\xf5\x84\x66\xd9\xf5\x04\x19\x52\x97\xe6\x64\x05\x5c\x4a\x62\xaa\x9c\x2c\xc8\x25\xcb\x16\x31\xcd\x30\x5a\x13\xd1\xd2\xda\xce\xeb\x03\x89\x23\x2a\x8b\x3e\x04\x2d\xe1\xf2\x3b\xd9\xdc\x88\xae\x03\x8f\xa6\x2a\xe7\xdd\x5f\xbc\xac\x1e\xee\xf0\x51\xff\x4d\x21\x45\x3c\x31\x59\x3f\xe7\xa4\x21\x79\x6c\x91\xc6\x1a\x65\x34\xf4\x74\x4a\x6e\x91\x18\x62\xf2\xbc\xa9\xd5\x17\x02\x5a\x59\xc8\x2f\x9b\x81\xcb\x71\xd3\xa5\x70\x3a\x6d\x33\xa0\x08\x7f\xaf\x87\xd8\xef\x44\x13\xee\x44\x6d\xb7\xb1\xfc\x1a\xbf\xb7\x03\xf6\xd1\x89\x70\xf7\xac\x78\x82\x27\x32\x14\x8a\x83\x2c\xfe\xe0\x95\xb0\xc7\x1b\x83\xb6\xb0\x8f\x22\xc5\x1c\x33\x5c\x89\x67\x9a\x28\xbe\x14\x90\x93\x49\xe8\x29\x28\x7d\x36\x1e\x94\xa4\x25\x54\x78\xd0\x4c\xa1\x62\x9c\x4b\x48\x5e\x02\xb0\x0c\x2e\x12\xb9\xce\xcd\xee\x6c\xb3\x0c\x74\x88\x14\x34\xe7\xff\xd9\x61\x42\x3b\xbf\x78\x87\x8f\x62\xa4\xd5\x3d\x44\x49\xa2\x96\x22\x2b\x98\xab\x51\x75\x7c\xcc\xa5\xd9\x69\x6b\x89\x33\x72\x45\x90\x71\x0a\xaa\x22\x24\xa1\xfb\x86\x55\xd6\xf4\xf0\xae\x88\x72\x0d\x95\x36\x42\x7a\x61\xd3\xf9\xf9\xde\x7d\x28\xa3\x4f\x92\x72\x37\x51\xc4\x7d\x09\x48\x78\xf7\x11\x81\xc7\xcd\x34\x84\xb7\x46\x31\xf6\x27\x26\x28\x8a\x08\xeb\x64\x0e\x15\x56\xe8\xb4\x12\xd7\xb9\x77\x4d\x30\x6d\x87\x0b\xad\xd9\x0d\x2b\x36\x7a\x85\x67\xe5\xd0\xf3\xea\x99\x53\xc3\x4d\x5b\xad\x39\x5a\x82\x5a\xe3\x6f\x8c\xc7\xbb\x76\xdc\x4e\x13\x7f\xda\x66\xd7\xc2\xb4\x3e\x5d\x48\x79\x3d\x69\x56\xfd\x0a\x28\x29\x79\xb6\x90\xf2\x19\xb2\x65\xc8\x47\x1a\xec\x7a\x57\xd7\x47\x17\x34\xb7\x08\x99\x07\x22\xa5\xc7\x91\x33\xbb\xf8\x67\x6f\xb2\xd2\xe8\x2b\x11\xc3\xaa\x0e\x4a\xb6\x81\x6a\x11\xb5\xaa\xce\x08\x79\x2f\x35\x98\x1e\x6c\x8e\x30\xda\xb2\xaf\x58\x81\x81\x8b\x86\x08\x63\x24\x32\x90\x01\xac\x6a\x63\xb6\x9f\x66\x24\xa1\x8a\x4d\xc9\x9c\x25\xb4\x54\xd6\x16\xed\xd4\x1a\x9a\xdd\xd2\x8d\x02\x7a\x60\xc4\x5e\x1f\xd9\x1a\xd8\x34\x36\xf1\x71\x8e\xa6\xd6\xd1\xd4\x3a\x9a\x5a\xef\xdd\xd4\x8a\xfe\x25\x91\x3a\x59\xc1\xdb\x5a\x0d\x67\xdc\xcb\xc8\x18\xa7\x5f\xdf\xa4\x91\xb4\x67\x29\x1e\x8f\xa1\xb4\x6f\x94\xbb\xf3\xa9\x5e\xa4\x9b\xb5\x77\xf9\x8c\x0a\xcd\xd4\x98\xde\xd0\x12\x8e\x31\xb0\xba\x98\x23\x10\x9a\x69\x3b\x9a\xf9\x74\x9a\x4c\x6f\x35\xa3\x88\x2e\x33\xf1\x10\xe3\x70\x65\x7c\x0c\xaf\x1d\x5a\x35\x6a\xf6\xb1\xfa\xc4\xf7\x39\x96\x71\x73\x76\x20\x58\xf6\x8d\x7e\xdb\x82\xf5\xcd\xe3\x80\x73\x88\x4d\x60\xd7\x3b\x15\x5f\x87\x9d\xad\x7d\x3b\x5c\x0a\xa3\x8d\xee\x26\xb7\x05\x6f\x54\x4a\x94\x15\xb6\x59\x4b\x9b\xed\x14\xe1\x6c\xae\x5c\x1a\x3a\xc3\xaf\xc2\x6c\x13\x4d\xdd\xd8\x06\x0f\x54\x5a\x2a\x49\x61\x65\x0d\xcd\x0f\xd2\xa4\x43\x4e\x98\xba\xcd\x72\x2d\x53\x2b\x9c\x18\xe5\x0e\xe0\x47\x8a\xb0\x2f\x39\x2b\x00\x56\x05\x09\x52\x1c\x93\xb7\xdc\x03\x44\xcb\x8e\x49\x57\xc9\xd3\x21\xd1\xcf\x7c\x43\x3e\xbe\x03\xc9\x48\xad\xe4\xed\xe9\x8a\xa7\xce\x00\xa7\xa6\x20\xc8\x4a\xf2\x4b\xc9\x93\xcf\xd9\x86\x64\x4c\x03\x64\x4c\xa4\xb8\x1e\x05\xa3\x2a\xe4\x64\xbc\x08\x1d\xf5\x50\xed\xcf\x7e\xec\xfd\xcf\x57\xe4\xcf\xd5\x07\x7d\xee\x5a\xcc\xaf\x0c\x5f\x4f\x0b\x7e\xd3\xb4\xd6\xa6\x2c\xb1\x65\x85\xa9\x53\xb4\x28\x57\x4c\x41\x1a\x4b\xe8\x2c\x65\x79\xa9\x37\x53\x8c\xc9\x20\x19\x5f\x30\xcd\xd7\xec\xb4\x4a\x68\x83\x0b\x07\x75\x4b\x13\x2d\xcc\x1d\x49\xa4\x48\x58\x61\xc6\x17\xa1\x90\xd8\x1c\xcc\x7f\x35\x01\xdf\xa5\x7e\xb2\x1d\x61\x4d\x70\x69\x64\x57\xc8\xc0\x13\x1f\xb4\xb3\x20\xc7\x40\x6e\xa3\x1c\x3d\xca\xd1\xa3\x1c\x7d\x2f\x72\xf4\x1d\x05\xe5\x80\x76\x1e\x5a\x4e\x8e\x30\x1d\xda\x62\x35\x77\x41\x42\x84\x63\xbf\xbb\x9c\xdc\x5c\x89\x41\x62\x72\x7b\x08\x47\x95\x92\x9b\x63\xac\x09\x05\x5b\xa4\xcd\x21\x3e\x2b\x2d\xfd\xc9\x02\xab\x1f\xd4\x9e\xa8\x8a\xb5\x1c\xca\x2a\xbf\xab\x5d\xea\xb0\x60\xbf\x91\x4f\x8d\x7c\x6a\xe4\x53\x8f\x33\x36\x71\x04\xbc\x3d\x45\xc0\xdb\x3e\x36\x9c\xa7\x6f\xbf\xe9\x88\x9b\x78\x6b\x7e\x46\x55\x4a\xe5\x90\xf3\xd3\xd2\x69\x1f\x9c\x31\xfb\x4f\xa6\xa1\xd5\xf3\x17\x64\xcd\xf4\x4a\xa6\x15\x45\xaa\x87\x52\x10\x72\xc9\x85\x2b\x2d\xc6\xcd\x95\xcb\xcb\x20\x80\xb0\xc2\xee\xb8\x7c\x9e\x90\x05\x36\xb3\x11\x63\x2b\x56\x44\xbd\xc5\x47\x8c\xc6\xa8\xfb\x91\xad\x61\x77\x23\xcb\x67\x46\xc3\x64\x88\x7f\x58\xc8\x1d\xe3\xa1\x46\x43\xd9\xc3\x1a\xca\x7a\x8a\x09\xf4\xf2\x00\xb3\xd9\x8d\x48\xb3\x5d\x62\xc1\x40\x94\x8b\x9c\x1d\xf2\x0e\x73\xfc\xa2\x4b\x78\x43\xae\xe1\xad\xeb\x09\xe0\x16\x0d\x97\xbe\xb6\xc7\xd0\x46\xef\x01\x02\x85\x5b\x01\x29\x2f\x30\xf4\x46\x91\xeb\xc9\x3f\xe0\x56\x2d\x20\xe8\x8c\xdc\x32\x57\x2c\x85\xac\x99\x2b\xa4\x41\xc5\xc6\x1e\xe2\x3d\x4a\xa6\x3c\x90\xf9\xb0\x93\xee\xef\x48\x8d\x1d\xb3\xe8\xcd\x39\x8e\x7c\x32\x22\x2d\xdb\x07\x6d\x51\xd9\x72\x56\x5e\x95\x87\x9d\x91\xab\xa2\x64\x66\x23\x02\x78\x5c\x55\xa2\xc9\xa1\x52\x17\x34\x53\xac\x4a\x07\x1e\x0f\x5f\x4c\x99\xe0\xb1\xcf\xbe\x81\xdf\xc3\xfa\x41\xfd\x5f\xc5\x7e\xa6\x41\xf6\x71\xf8\x3c\x9c\x3d\x08\xee\xa5\xd5\x3c\x70\x60\x14\x8a\xac\xb8\xaf\xc0\x6f\xf6\xf4\x35\x68\xf5\x8a\x02\xac\x4f\xe6\x5c\x00\x7f\x13\x95\x10\x22\xab\x76\xc1\xa8\x66\xc4\x8e\xde\x66\xc0\x36\xe3\xd3\x76\xec\xc1\x72\x9a\x9f\x3a\x62\x3a\xbd\xd9\xf4\x6d\x47\x74\x67\xbd\x81\x05\xb7\x58\x29\xc9\xe3\x9d\xa1\x06\x17\x18\x68\x89\x4c\xc0\x74\x5c\x33\xce\xd6\xed\x84\xa0\x9f\x81\x91\x94\x2b\x62\x18\x5a\xc1\xb2\x8d\x43\x34\x81\xa2\xb9\xb4\xf6\x56\xe8\xd0\xac\x5e\xe8\xb9\x97\x46\xd2\x2f\xcd\x3e\x68\x56\xac\xb9\x68\x76\xaf\xac\x9c\x27\x88\xca\xb9\x06\x09\x80\xeb\x19\xf9\x0b\x04\xa9\x2a\x4d\x45\xc2\xa6\xe4\xc3\x9f\xcf\x5f\xbb\x5c\x13\x60\xb7\x85\x58\xae\x42\x66\x0c\x31\xce\x4c\xc8\x72\xb9\x82\x1f\x2c\x52\x49\xf3\x2c\xf3\x05\xa5\x60\x4c\x36\x4b\x7a\xcb\x1a\x1c\x09\x3f\x0f\x01\x89\xa6\x71\x8c\xc6\x43\x27\xb5\x53\x08\x4b\x14\xc8\xa3\x1b\xa0\xe7\x28\x89\x42\x08\x6f\x25\x8a\xe2\xf1\x3a\xb0\x12\xde\xb6\x60\x6c\xa7\x13\xad\x77\x5a\xb8\x30\x9f\x53\x1b\xad\x08\xf6\x34\x5c\x19\xe5\x0b\x51\x19\x76\x5b\xfa\x1d\x06\xb6\x38\x80\xbb\x3a\x2a\x94\xe3\xb9\xf2\xe5\x9e\x7c\x74\xf3\x56\x27\x42\xe8\x40\xf8\xb3\x05\x91\xd4\x0f\x16\x8e\x17\xe0\xf0\x20\x25\xdd\xb0\xa9\xb9\x67\xd4\x83\xa0\x18\x2d\x10\x8a\x86\x3e\x10\xae\x9f\x29\xa2\xe8\x02\x93\xee\x2b\x55\xae\x59\x0d\x28\xb8\x72\x35\xe7\x2a\xdf\xc1\x14\xaa\x44\x21\xe5\xa1\xda\x76\xa3\x76\x40\xf8\x15\x01\x58\xd1\x50\x68\x51\x8f\x57\x30\x3f\x55\x9d\x45\x92\x91\xef\x4a\x0e\x12\xa8\x2e\x67\x66\x6e\x26\x9e\xc8\xf5\x9c\x0b\x5c\x2d\x58\x76\xf8\xe6\xac\x7e\x8e\xfd\xc5\x6e\x52\x0a\x58\xc6\x6a\x04\x53\xa2\xca\x64\x05\x95\xf1\x44\x48\x24\x31\xc0\x42\x32\x04\x4c\x96\x39\x54\xc0\x6d\xbd\x8b\x19\x0f\xa8\x26\xb5\xe9\x9b\x9f\x4f\x65\x41\x1a\x61\x1c\x11\x27\x55\xf4\xf2\x06\x4b\xd7\x2e\x04\x5c\x1d\x57\x4b\x71\x0d\xf1\x16\x1e\xe5\x17\x64\x3b\x00\xad\xd3\x1c\x52\x88\x9d\x2d\x6a\x9f\xc5\x8b\xc0\x15\x59\x4b\xa5\xcd\x82\xae\x21\xdc\x82\x09\xa8\x73\xc4\xe0\x40\x9b\x6e\x6b\x6b\x52\x5b\x2a\xef\x63\x0a\x9f\xc7\xd6\x4b\x85\x67\x3e\xca\x1d\x5a\xa7\x67\x5b\x3c\x8c\xba\x13\x40\x36\x94\xb9\xef\x05\x24\xdb\x52\x30\xee\x22\xd7\x03\x8e\x38\x04\x55\x76\x2c\xd9\xe1\xd6\xeb\x89\xad\x55\x63\xa1\xee\x20\x24\x43\x0f\x3b\xa0\xbb\xb7\x08\xc6\x98\x8a\x61\x0c\x38\x1f\x03\xce\x47\xab\xf8\x68\x15\x7f\x24\x56\xf1\x47\x1d\x70\x8e\x14\xf3\x09\x1b\xe1\xbb\x27\xb0\x9f\x25\xbe\x7f\x41\x06\x70\x9f\x7b\xb4\xc9\xe3\x07\xc7\x48\xf4\xc7\x17\x89\xde\xda\x99\x31\x1c\x7d\x0c\x47\x7f\xa8\x70\x74\x3c\x8c\x63\x4c\xfa\x18\x93\x3e\xc6\xa4\x8f\x31\xe9\x63\x4c\xfa\x3d\xc4\xa4\xd7\x49\xee\x18\x98\x3e\x06\xa6\x8f\x81\xe9\x63\x60\xfa\x37\x13\x98\x6e\x35\xe1\x31\x3a\x7d\x8c\x4e\x1f\xed\xb2\xa3\x5d\xf6\xd1\xda\x65\x0f\x1d\x9d\xde\x4b\xf7\xbe\x71\x8b\xea\xbe\xc1\xea\x0f\x64\x55\x1d\xc3\xd6\x9f\x00\x1a\xb7\xcf\x00\xfe\xa4\x20\xb9\x9d\x26\xba\xfd\x2e\xdb\x1e\x30\xd4\xce\x11\xec\x7a\x5b\xc6\x78\xf6\x31\x9e\x7d\x8c\x67\x1f\x25\xef\x51\xf2\x1e\x25\xef\x03\xc6\xb3\xf7\xf1\x99\x27\x13\xd4\x5e\x93\x65\xef\x1e\xd9\xbe\x75\x4d\x86\x0b\xd6\xf7\x10\xe3\xbe\x75\xb4\x4f\x33\xd0\xbd\x53\x3f\x19\xa3\xdd\x47\x2e\x36\x72\xb1\xaf\x97\x8b\x8d\x68\xbb\x6f\x11\x6d\x37\x86\xc1\x7f\x93\x61\xf0\x63\x14\xfc\x37\x66\x77\x7b\xa2\xf1\xf0\x8f\x2a\x1c\xfe\xa1\x8c\x91\x63\x74\xfc\x18\x1d\x3f\x46\xc7\x8f\xd1\xf1\xbb\x68\xee\x63\x88\xfc\x18\x22\x3f\x86\xc8\x8f\x21\xf2\x63\x88\xfc\x60\xa1\x7f\x8c\x93\xdf\x45\xb9\xd8\x2f\x58\x3e\xbe\xe8\xbb\x62\xcf\xdb\x62\xb3\x54\x09\xcd\xb8\x58\x9e\xde\xbc\x9c\xbd\x2e\xa4\x52\xd6\xda\x8b\xe6\x90\x0f\x0c\x0a\xcf\x27\xbd\xa8\xf5\x9e\xd7\x2a\x3e\x68\x05\x8c\x5a\x20\x9b\x04\xb7\xb5\xd1\x66\x6c\x35\xfa\x8d\x65\x97\x0b\x06\x24\xd2\xed\xf2\x36\xfa\x0f\xe6\x56\x1b\xb1\xb3\xab\x71\xdb\x59\xb2\xab\x40\x1e\x2c\xb5\xbf\xa3\x59\xb7\xf1\xf6\x0f\xf7\x68\x34\xbd\x9e\xec\x18\xbe\xb4\x6d\xac\xaf\x4e\x4f\x2b\xf4\xb1\x19\x6d\x2a\x13\x75\x6a\x14\xd2\x93\x65\xc9\x53\x76\x6a\x77\x8b\xb3\x42\xfd\x06\x1c\x30\x7b\x8b\x61\xe1\xe9\x7b\x6b\x49\xf8\x4f\x4c\x17\x3c\xb9\xf4\xe1\x2d\x5d\xc7\x2e\xd6\x3e\xe0\xb8\x2b\x79\x0b\xc8\x89\x84\x66\xcc\x90\x0c\xa3\xda\x9a\x86\xa8\xe7\x2a\x25\x13\x0e\xc8\x7e\x2b\x29\x6d\xc8\xdf\x2a\xc4\xb5\x35\xb7\x3f\x5f\xc8\x82\xb0\x2f\xd4\x50\x04\x92\x31\xb1\xc4\x60\xd3\x5f\x4a\x66\x34\x0e\x41\x92\x4c\x96\x29\x59\x33\xa5\xe8\xd2\x10\x1e\x23\x89\x71\x23\x6d\xcb\x82\xfc\xd7\xc5\x25\x1a\xb8\x32\x49\xd3\x39\xcd\x8c\x18\x5e\x90\xa2\x14\x02\x24\xba\x52\x2b\x9e\xc2\x56\xd8\xb8\xa6\x17\xdb\x0e\x39\x8e\xfe\x7d\xf4\x8c\x07\xcf\x5a\xcb\x54\x3d\x8b\xc5\x55\xd8\x35\xe1\x82\xa0\xd1\xa2\xc6\x14\x6b\x46\x78\xb3\xc6\x2c\x63\x89\x8e\x49\x48\xf5\xe7\xe6\x43\x00\x01\xd1\xb2\xba\xd9\xd4\x81\xe7\x13\xa2\xf9\x1a\xc4\x56\x6e\xa4\x7c\x07\xd6\xc1\xf4\x18\xd8\xd1\x00\x97\x6a\x8f\xad\xff\x47\x3a\x67\x99\x1f\xeb\xaf\xd3\x89\xa6\xc5\x92\xe9\xf3\x1b\x56\xd0\x25\xfb\x3b\xcd\xca\xc8\x32\xb5\xdb\xb8\xe5\xc2\x27\x86\xfb\x9c\xe4\xd2\xfa\x97\xcc\xf2\x2d\x33\x39\xa7\x99\x5b\xc1\xe7\x46\x0e\x21\xbf\x94\x54\x68\xae\x37\x2f\x66\xe4\xa7\x52\x97\x34\x33\x52\xcc\x17\xb3\xc5\xfc\x86\xe1\x51\xbb\x82\xee\xe0\x0b\xfb\x4c\x73\xe6\x89\xe2\x7f\xd9\x6f\x55\x33\xec\x9d\x5a\x6c\x4e\x7e\x2e\xc1\x51\xd8\x71\x22\xe1\x8a\x1d\x6a\x3e\xfd\xac\xb1\x65\xc3\x3f\x6d\x77\x31\xd0\xe6\x5f\x3f\x29\xfd\xcc\xb1\x41\x6e\xb6\xaa\x86\xb1\xf6\x0d\x68\x81\x43\xb0\xf9\x6d\xa0\x8d\x43\x35\x98\x54\xed\x40\x3c\xa6\x13\xfb\x59\x3c\x2d\x2d\x5a\x62\x9f\xf6\xdf\x96\x48\x23\x77\xb4\x5a\x93\xb2\x73\xa1\xd8\x36\x25\xf2\x06\x71\x59\xb0\xb8\x90\xb4\x26\x55\x87\xbb\x09\xb5\xc9\x75\x8d\xbb\x7f\xc0\xdd\x97\xe1\x60\xa3\xdc\x8f\x60\x7b\x16\x06\xc4\x15\x4c\xe0\xd5\x19\x35\x34\xdc\x3e\x46\xe8\xde\x57\x47\xc8\x1f\x25\x59\xf8\xab\x91\xb8\x8d\x90\x9b\x5d\xc8\xf4\xdc\x9d\xea\xa2\x8f\x32\x38\x33\x4d\x85\x90\x20\x2b\xdf\x8b\xb9\x0e\xd5\xed\x88\xc2\x12\x47\xf0\xc6\x08\xde\x78\x82\xe0\x8d\x16\x90\x01\x13\xae\xd8\xd5\x71\x2d\x8f\x3e\x62\x3f\xa4\xbb\x50\xa6\x21\x70\x92\x39\x5b\xd1\x1b\x2e\xcb\xc2\x1a\x6d\xdd\x8d\x3e\xf6\x04\xcd\x68\x4e\xa8\x48\x4f\xd0\x31\x30\x10\x9e\xe8\x68\xda\xac\x9b\xa6\x6d\xc3\xa6\x38\x46\x1a\x77\x8b\xd6\x69\xda\x81\x46\x34\x18\x6c\x32\x80\x64\x47\x91\x26\x43\xde\x3b\x1c\xcc\x64\xc0\xd7\x5e\x4b\x81\x40\x86\x3e\x0e\xb3\xed\xdd\xc0\xa9\x6e\x93\x1f\x69\x2b\x60\x74\xbc\x49\x20\x91\x4f\xc2\x0a\xb0\xa0\x01\x69\xda\x26\x72\xc2\x33\x7f\x58\x5a\x62\x66\x46\x95\xbe\x2a\xa8\x50\x30\xa0\x2b\x1e\x93\x84\xda\x6d\xbc\xd1\x90\x2a\x8d\xd2\x07\x22\xff\xdd\xbc\xb4\x6f\xcd\x2c\xbe\x44\x0a\xe6\x3c\x64\x5a\x12\x2a\xc0\x8b\x79\xa7\xbb\x0f\x63\x05\xda\x66\xf4\xfe\xa8\x00\x07\x0f\x90\x5b\xac\xca\x35\x15\x27\x05\xa3\x29\x38\xf4\xd8\x97\x3c\xa3\xd6\x59\x60\x6d\x63\x86\x73\xa4\x4c\x53\x9e\xa9\xe0\xba\x54\x33\xd9\xc5\xab\x56\x78\xaf\x1a\x5a\x78\xe0\x2f\x97\x1a\xca\x2f\xd3\x33\x65\x17\xd0\x7f\x23\x9e\x66\xa4\xe3\x9e\x2b\x8f\x41\x73\x87\xa7\x54\x4e\x6e\xae\xb6\xe2\xf9\x55\x61\xb8\xfd\x5f\xd0\xfb\xfb\x51\x7c\x16\xf2\x56\xbc\x88\x7d\x07\x7f\x68\x69\xad\x9b\x9c\x35\xce\xa9\x23\x30\xfe\x23\xbb\x02\x13\x7a\xee\x25\xec\xea\x5e\x37\xf2\x47\xae\x74\xdf\x65\x74\x06\xee\x4e\x19\xcf\xb2\x40\xb5\xed\x46\xa1\xfd\x79\x44\xef\x1e\x5b\x00\xf4\x76\xfe\xbb\xef\xe3\x3e\xae\x83\x01\x7c\x0f\x9c\x2d\xa3\x9c\x7a\xaf\x72\x2a\x6c\xbf\x97\x52\xef\xa6\xd7\x72\x65\x65\xc7\x83\x08\x2e\x83\xd5\x5a\xf7\xd9\xbd\xc8\xdc\x36\x70\xab\x33\x0a\xec\xab\xd5\xd6\xc2\x14\x4c\x2b\xb4\x2f\x7e\x60\x8b\xc9\x74\xb2\xa6\x5f\x3e\x30\x70\xdb\x45\x08\x60\xf8\xb0\x35\xac\x32\xcf\x59\x41\x32\xbe\xe6\xba\xca\x91\x58\x3a\x8c\x5b\x2e\x53\x0b\x47\xb0\xf8\x0b\xc5\xb4\xc3\x53\x57\xc3\xfd\xc1\x3c\xb5\xc7\x57\xad\x69\x96\xa1\x43\x5e\x90\x9f\xb8\x70\x5f\x0e\xa6\x64\xe8\xdd\x12\xb6\x05\xe5\x60\xfc\xe9\xfb\xef\xe0\xa0\x55\x6f\x44\x04\x87\xea\xa1\x17\x74\xe4\x6d\xcf\xf0\x0b\xd7\x5a\x4b\x72\xbb\xe2\xc9\xaa\x31\x70\x98\x15\x7a\x40\x52\x79\x2b\x10\x61\x63\x53\xb1\xc1\x4b\x2f\xcd\x0a\xcc\x08\x69\x7c\x39\x70\xba\xce\x19\x39\xf3\xc8\xb0\x2c\x5f\x51\xb2\x60\xd4\xdc\x32\xb2\x34\x42\xe3\x5f\x2f\xce\x2f\x61\xb3\xe4\xff\xc7\x0a\x89\x00\x27\x23\xe8\xa4\x08\x3e\xd1\x24\x63\xd4\x26\x55\x42\xc9\x97\xc8\x82\x38\xd3\xa8\xf7\x3e\x84\xd0\x95\x19\x21\x97\xce\xa2\xa5\xc0\x2b\x7c\xc3\x08\x55\x24\x93\x62\x09\xce\xfe\xb0\x4f\xdb\xc1\x8d\xb3\xe7\xf9\xa4\x83\x03\xb7\xa3\x71\xd0\x22\xf2\x94\x73\x64\x3a\x57\x52\xe5\x95\xfc\xa1\x87\x13\x40\x4e\xa8\x8c\xd1\x42\xd4\x04\x17\x4f\x6f\x13\x29\x54\xb9\x46\xb0\xb7\x59\x28\x68\x6f\xce\x9e\x69\x9d\x32\x65\x2e\x42\xf3\x98\xce\x37\xa4\x04\xdc\x96\x21\xae\xb0\xe8\x61\xe6\xa2\x3d\x94\xaa\x3e\x77\xaf\xf7\x29\xbc\xbe\xf8\xf8\x51\xf3\xcc\x7a\x95\x2f\x58\x91\x18\xe9\x20\x26\xf6\x5a\x9f\x82\xb5\xf3\x92\xd7\x17\x1f\x49\x59\xbd\x49\x9e\x7b\xbe\x82\x10\x54\x4a\x72\xdf\x19\x9e\x65\x97\x89\xeb\xf5\xc5\xc7\x17\xd6\x4a\x9c\x65\x98\xec\x53\xa6\xea\x07\x73\x0a\xcd\x25\xac\x72\x30\xe1\x62\xc1\x69\xae\x59\x42\x6d\x1a\x74\x97\x98\xab\x54\x35\xa4\x58\xf7\x79\xd8\x8d\x1a\xf7\x2d\xdf\x7e\x14\x76\xab\x4f\xc1\x9d\xa3\x4a\xe6\xee\x21\xb2\x5b\x68\xac\xed\xcb\x53\xa3\xe9\xc4\x9e\xbb\x6e\x42\x6b\x5f\x19\x7e\x24\xdc\x78\xbb\xce\x84\xdf\x64\xb3\xc1\x53\xb2\xcb\x09\x99\x12\x36\x5b\xce\xc8\x9f\xce\xc2\xc4\x65\x54\xf8\x4f\x99\xb5\x00\xeb\xb5\x39\x10\x42\xde\x92\x3f\x9d\xfd\x16\xa1\x91\xaa\xde\xd1\x40\x4a\xd1\x5c\xae\xce\xb9\x46\xa8\xb3\xbb\xc1\x6b\x2a\xc0\x03\xe2\xa0\x50\x51\x86\xd8\x37\x88\xe6\x0e\xb5\x06\xd1\x26\x1d\x87\x1f\x84\x51\x1d\x91\xe6\x77\x2a\xed\x95\x6a\xde\x65\x4f\xb0\xb4\xb4\xcd\x8d\x7f\xf0\x99\x08\x1a\xac\xcc\x42\x61\x0b\x99\x81\x6b\x5f\x2e\xb4\xc5\x99\x35\xc8\x24\x20\x2a\xa9\x58\x0e\x8a\x2e\x1e\xa0\xe6\xcb\x39\x00\x2c\xd3\xff\x64\x82\xa1\xc9\x3e\xc2\xb8\xa5\x02\x3d\xc8\xec\xff\xd2\xb7\x23\xee\xd5\x7d\xd6\xfa\x8f\xbf\x3f\xae\x32\x6b\xdd\x92\x5b\x84\xba\xaa\x95\x27\xbb\x0d\x64\xc5\x9c\x9a\xed\x02\x7c\x85\xb9\x6a\x59\xe5\x3a\x03\x08\xdf\x27\x33\xc9\x4f\xc0\xe3\x20\x68\x09\xc0\xdd\x6b\xaa\x13\xc8\x2e\xb8\xe0\x2c\x4b\x83\xac\x17\x86\x03\x52\xc3\xd9\x13\xb6\x15\x0f\x01\xcf\xda\x58\x4e\x2b\x5a\xb4\xa7\xe2\x11\x82\xc0\xd3\xd1\x1a\xd4\x70\xb7\xba\x88\xa3\xe1\x6e\x57\x23\x4f\x81\xb0\xa4\x6a\x0c\xc8\x2f\x4a\x68\x0a\x4d\xe4\x1a\xe6\x6c\x74\xa7\x44\xae\x73\x29\x20\x03\x61\x37\x24\xe4\xfe\xf1\x27\x3b\x0a\x10\x51\xc4\x0e\x5c\x19\xd8\xaf\xd6\x16\x78\x05\xb3\xda\x00\xbb\xf2\xd6\xce\x83\xa8\x74\x7b\x8e\x3e\xf7\xe2\x71\xa6\x64\xc5\xb5\x3a\xc9\x59\x71\xa2\x58\x22\x05\x9e\x41\x41\xde\x89\x65\xc1\x94\x7b\x65\x9f\x59\x79\x0b\x6d\x6d\x4e\x86\xb6\xb4\x67\x04\x14\xa7\x7f\x3e\x8c\x26\x2b\xe4\x46\x75\x59\x10\xaf\x8f\x15\x9a\xea\x33\x03\xbb\x9c\xc5\x43\x9e\xe4\x85\x4c\x98\x52\x2c\x0d\xe6\xfa\x62\x46\x00\xf7\x88\xd6\x92\x2a\x03\xa9\x73\xb1\x6b\xb9\xc4\x30\x8a\x39\x5b\x18\xbd\x1a\x03\x56\xcd\xa1\xa3\x05\x8a\xf5\x4d\x10\xc8\x1e\xeb\x74\x21\x53\xd5\x5c\xa5\xee\xb4\xc4\x41\x02\xf0\x6a\xb5\xaa\x3a\x37\x96\x66\x38\x44\xaf\x5e\x49\x15\x66\xdb\xe4\xa2\x32\x27\x18\x5a\x02\x0a\x91\x7a\x41\xc0\xa8\x68\xfa\x0a\xae\xe6\xce\x6b\x0f\x82\x84\x11\x4d\x64\x41\xd6\x6c\x2d\x8b\xcd\x8b\x19\xb9\x34\x23\xc1\x61\x21\xfc\x7d\x5e\xf2\x4c\x43\x47\xe1\xd7\xd0\x9a\x05\x59\xed\x5d\x5e\x48\x47\x04\x6c\x9a\x77\x40\xef\x4b\x9b\x85\xdc\xcc\xaa\x4a\x8c\xae\x25\x11\x86\x3c\x64\x1e\x5c\xe4\x3e\x88\x62\x8b\x19\xf2\x35\x9c\xb1\xeb\x09\xd9\x5b\xcc\x77\x00\xd0\xe6\x5e\xf5\x98\x5d\x1d\x4a\xc8\xfc\xbb\x42\x70\xf8\x54\xc9\x55\xf2\xa0\x39\x73\xb1\xa8\xd7\x13\xbc\x37\xd7\x93\x29\xb9\x9e\x5c\xe0\x98\x65\x41\xae\x3d\xea\xd7\x3c\x81\x0d\x59\xd3\x3c\x87\xe9\xc1\x85\xa9\xf3\x02\xbb\x51\x2d\x54\xcb\xf0\xc0\xb3\xad\x90\xc2\x3e\xae\x18\xb9\xfb\x7d\xcd\x5b\x57\xa0\xaf\x71\x74\x1f\x06\x31\xe9\xad\x7a\x41\x0d\x63\x54\xb7\x99\x1b\x71\x0c\xdc\x0f\xa1\x97\xa7\xc6\xa9\x47\x46\xfb\xd4\x18\xad\xf5\x7a\x7e\x55\x8c\xd6\xcf\x69\x64\xb4\x3d\x8c\xd6\xaf\xd2\xc8\x68\x1f\x3d\xa3\xf5\x7b\x75\x27\x46\xeb\x8e\xdc\xee\x6c\xb6\x91\x8d\xe1\x7e\x59\x6d\x1b\x13\xd1\xcb\x6a\xb7\x37\x6f\x5d\x82\x1d\x58\xad\x85\x20\xf4\xb2\xda\x08\xe7\xef\x61\xb8\xed\xd6\x43\x22\x0f\x6a\xc4\xf7\x60\x54\xb7\x97\x77\xc3\xcd\x9b\x4c\xeb\x00\xe0\x10\x2d\xde\x76\x27\xf7\x02\x7f\x69\x37\x40\xbe\x86\x9f\x75\x66\xb8\x3a\x9c\x96\x26\x85\x54\xca\xa6\xd6\xcf\xd8\x0d\x15\x1a\x8d\x36\x8f\x0b\x67\xbb\x43\x60\x84\xea\x44\xd2\xaa\x00\x43\x8b\x38\x09\xf3\xce\x09\x13\x89\x4c\x11\xbd\xbb\xb6\xc2\x98\xf3\x30\x06\x27\x22\xa3\x73\x96\x11\xdf\x85\xf3\xfc\xd4\xa0\xb5\xe4\x1f\x2b\x26\x88\x62\xda\xd5\xff\xcb\xa9\xe1\x5e\x2e\x76\xd4\xe7\x3b\x21\x39\x2d\xe8\x9a\x69\xb4\xa1\x55\x73\x53\x2e\x72\xd8\xf4\xbe\x96\x55\x89\x8c\xa4\x6a\x90\x48\x90\xd4\xe1\x4b\xa5\x80\x6f\xfd\xdf\x52\xe9\xa0\x17\x58\xbf\xd0\xd2\x0e\xf1\xec\x14\xed\x3c\xd8\xcd\x51\xa2\x39\x3a\xfd\x0f\x76\xb9\x9d\x14\x9c\xc6\xc1\xf2\xc7\x70\x95\x1c\x25\xfc\xe2\x5e\x42\x2a\x76\x71\x6d\xf4\x3a\x9b\xef\x07\x73\x1d\x61\x1d\x43\x69\xf5\xc0\x30\x8c\x47\x46\xb0\xfb\x23\x36\x76\xa7\xd8\xd1\x90\x87\x47\x42\xb2\x8f\x1a\xc0\x71\xb8\x38\x93\xaf\x98\xb3\x78\xc6\xe2\x44\xc4\xb6\xb4\x73\x74\x96\x33\x1b\x79\x4e\x2f\xcf\xf9\xaa\xe8\x79\xcb\x8c\xd6\x43\xcd\x9b\x6d\x77\x94\xbb\x8f\x64\x24\x38\xbc\x8d\x60\x70\x34\x5f\x24\xb8\xf5\xa8\xf1\xc1\x8f\x94\x56\x7d\x93\x42\xf0\x1d\x43\x9a\x1f\x1f\xfb\x7f\x94\x21\x7e\x2d\xd3\xc3\x30\xf2\xb4\xb7\xa8\x79\x1c\x1a\xb5\x47\x84\x70\x3f\x51\x39\x78\xa0\xf0\xa3\x39\x85\x87\x95\xee\x1e\x29\xc1\x74\xa7\xab\xc9\x50\xbf\x2d\xd1\xee\x51\x12\x9c\xa8\xa7\x70\x40\xd9\xd8\xc1\x72\x51\xd3\x1d\x10\xb1\xee\x4f\xcd\xce\x6f\xf3\x0b\x4c\x0f\xe4\x03\x38\x98\xfc\x34\x23\x8f\xd6\x9f\x40\xc8\xcf\xc2\xa6\x6e\xbe\xb6\xac\xf9\x7a\x82\x96\xff\x1a\x00\x6a\x1b\xa1\x8e\x67\x39\x8a\xa7\xfb\x11\xdb\xaa\x95\x6f\x53\x42\x6b\x22\x44\x00\xfa\xdc\x22\x6c\x04\x2d\x77\x10\x39\x9a\xa7\xb2\x8b\xea\x6f\x05\x8a\x06\x39\x29\x59\x5a\xff\xa4\xff\x86\xa3\x8d\x2e\xfb\xc4\x00\xe0\xe3\xd1\x65\xae\xe1\x0b\x00\x93\x2e\xe8\xad\xed\xee\x39\x17\x4a\x33\x0a\x69\xa8\xfa\xd7\xe3\xc5\x94\x28\xbe\xe6\x19\xf5\xe4\xdb\x9f\xd3\x9a\xf3\x09\x0e\xe6\xe3\xc9\xe7\xb2\x13\xbd\xdc\x2a\xa4\xc5\xda\x6f\x17\xd4\x1e\x1d\xd1\x7c\xac\x94\x6e\x08\x01\xdb\x4b\xc6\xec\x25\x40\x9d\x4d\x77\x91\x37\x1f\x8e\x04\x55\xce\x5e\xc0\xcd\xce\x99\xcf\xbd\xcb\x17\xe4\x53\x9b\xac\x7c\x82\x8c\xb8\x81\x1c\x57\xb9\x7b\xcd\xbe\xb8\xcb\x1c\x06\x65\xed\x86\x74\x3f\xaa\x5c\xff\xe8\x28\x9d\x5f\xfd\xaa\x74\x33\x88\xa7\x05\x5b\xd2\x22\xcd\xc0\x82\xbf\xd8\x61\x9d\x0f\xa3\x86\x1c\x85\xab\x1f\x9b\x1a\x43\x6c\x40\x6f\xd2\x64\xa0\x6d\x41\x11\x76\xea\x09\x92\xcb\xf6\x5c\x4f\xef\x3f\x26\xc1\x19\x93\xe0\x7c\xdd\xc1\xc5\x8d\x24\x38\x47\x4f\x1f\x7a\x98\x38\xe6\x21\x59\x70\xc2\x2b\x67\x33\xe2\x14\x8e\x60\x81\x90\xf3\x04\xf2\xe1\x00\xc1\x1a\x9a\xfd\xa6\x9e\x0f\xe3\x61\xa6\x48\x3e\x30\x9a\x9e\x18\x41\x62\xef\xd9\xee\x95\x59\xa7\x5a\xa8\xad\x0c\xe2\x48\x59\x73\xaa\x11\x6c\x63\x40\x10\xd4\x54\xc7\x4a\xd3\xaa\xea\x0c\x9a\xd8\x62\x41\xb6\xfd\x8c\xa8\xd8\x21\x34\xcf\x55\x67\x50\x5e\x12\xb4\x51\x71\x2d\x48\xde\x2e\x21\xab\x5b\xf3\xec\x86\xcb\xbf\x75\x91\xf0\x30\x07\xbc\xba\xa6\xa4\x04\x61\xa8\x83\xd6\xaa\x9e\xb4\xbf\x2b\xcc\xb4\x7b\x0d\x69\xa2\x4b\x9a\x05\x4b\xe8\x23\xec\xaa\xb5\x0c\x2f\xde\x4e\x4b\xd9\x67\x95\x45\xc3\xea\x2f\x25\x2b\x36\x18\xb4\x5a\x25\x0e\xb0\x92\x00\x80\x2b\xad\x18\x66\x23\x2e\x21\x79\x7d\x95\xdb\x5e\x19\x51\x8d\x3a\x54\x7e\xcd\x50\x3b\x2f\xbd\x18\x6f\x19\x2b\x0e\x0e\x70\x9b\x37\x92\x9b\xf9\xe9\x42\x9a\x6b\x0e\x32\xc9\x7c\x63\xf9\xa1\xcd\x7f\x6e\x5f\x72\xa6\x33\xd7\x95\xf9\xa0\xed\xc8\x7e\x17\x66\x70\x02\x26\x5c\xa2\x36\x42\xd3\x2f\x01\x6d\xb2\xd9\x87\xea\x63\x53\x03\x73\x42\xc3\x5b\xea\x37\xf0\x9f\x13\xff\xf2\x01\x12\x43\x7f\x87\x69\xcc\xc7\xdc\xe4\x63\x6e\xf2\x87\xca\x4d\x6e\x8f\xe0\xb7\x9e\xa0\xbc\x56\x7e\xf0\x4e\x36\xec\x31\x97\xf9\x98\xcb\x7c\xcc\x65\xfe\x50\x0e\xc6\x38\x39\x1b\x13\x9a\x8f\x09\xcd\xc7\x84\xe6\xdf\x7a\x42\x73\x4b\x1b\xf6\xc8\x6a\xde\x95\xe9\xc5\x1d\xca\x5a\xd2\x73\xb4\xef\x76\xa6\x2e\x9a\xda\x6c\x66\xe6\x17\x23\x90\x27\x40\xb3\x31\x73\x8d\x0a\x95\x2c\xd4\xb1\x5c\xb5\xd2\xca\x00\x6e\x04\xa2\x75\x60\x90\x6c\x69\xa7\x55\xe4\x70\x0d\xc2\xe2\x5c\x77\xa3\xc5\x79\xb4\x38\x7f\x95\x16\x67\xf7\x24\xc8\xde\xfb\x95\xa7\x61\x57\xb6\xc2\x3a\xcc\xb6\x96\xa3\xd2\x59\xdd\x6a\x89\xda\x75\x3d\x55\xf9\x63\x37\x4e\xf7\xd3\xeb\x6d\x36\xeb\x7a\x26\xe7\xa3\xe5\x6f\xdf\x32\xc8\x3d\x4c\xcd\x03\xa6\xbd\x2f\x8f\x3b\x8a\x61\xba\xff\x93\x63\x4e\x77\x3d\xe6\x74\x1f\x73\xba\xdf\x7f\x4e\xf7\xfe\x6b\xb9\x2d\xb1\x7b\x8f\xc4\x4b\xc9\x98\xf5\xfd\x89\xc9\x9f\x1d\x59\xdf\xe1\xe7\x66\xad\xda\xfb\x4b\x01\xbf\x45\x1f\x1b\xf3\xc0\x3f\xb8\xe0\xfc\xe0\x79\xe1\xb7\x1c\x91\x43\x26\x87\x1f\x20\x76\xed\x4e\x2f\x23\x8e\x78\xe7\x2b\x5f\x94\x22\xc1\xb0\x13\xae\x37\x8e\x1d\x75\x74\x73\x8f\x39\xe5\x83\x87\xee\x38\xf4\xa7\x99\xdf\x21\x4f\x7b\x99\x03\x16\xb1\x4a\x38\x0f\xd8\x43\xf0\x34\xaf\x77\xcf\x36\x8f\x76\x8d\x2e\xab\x98\xaa\x5c\xa0\x2d\xed\x08\x41\x09\x76\xb0\x92\x94\x0a\xb0\xc0\x09\xcd\x92\xd2\x10\xf8\xda\x36\xd5\x8d\x31\xcf\xc1\xa2\x42\xbf\xf0\x75\xb9\x6e\x3c\x0a\x60\x9e\x6e\x04\x61\xac\x8f\x8b\x04\x89\xf7\x8b\xb5\xe3\xf1\xf3\x29\x59\x97\x99\xe6\x79\xb6\x71\x74\x0c\x0c\x4b\x64\xce\xf4\x2d\xb3\x79\x81\x6b\x7e\x01\xac\x8c\xdf\xb4\x8d\xda\x2c\xc3\xed\xd4\xcd\x16\x92\xfb\xb6\x58\xca\x69\x80\x78\x86\xef\x2a\x4d\x52\x96\x18\x39\xcc\xbb\xf3\x0d\x13\xf0\x83\xe4\x02\x1f\xa6\xc8\xf3\x6e\x78\xc2\x4e\x0c\xf1\xa4\x33\x42\x2e\x19\xae\x1c\x17\x29\xbf\xe1\x69\x59\x59\xc6\x03\x30\xaa\xaa\x62\xa8\xda\xaa\xd8\x4a\xde\x22\x68\xbc\x91\x33\x0a\xc6\x65\x81\xa9\x87\xe6\x3e\x41\xae\xe0\x5f\xc7\x1a\x06\x4f\xad\x86\x41\xfd\x39\x2a\x7a\xaa\x11\x76\x5e\x09\x00\xd6\x21\x8d\x67\x37\xb0\x96\x3b\xa0\x7a\x40\x16\xbc\xd5\xd4\xbb\x7e\x13\x99\x65\x2c\xd1\x70\xf4\x15\xb9\x65\x59\x46\x70\x63\x11\xb8\x93\x6d\x6c\x6a\xee\xb6\x09\x77\x5f\x9b\xc2\xc1\x92\x24\x0c\xe8\x6f\x2b\x5f\x0c\xee\xc9\x1d\xb8\xe8\x56\x47\x5c\xef\x8b\x1d\xea\xd5\xa0\x8a\x01\xdb\x58\xe8\xf6\x92\x01\xd3\x89\xd7\xe3\x62\xf5\x03\xaa\x67\xb1\xa2\xa8\xf6\x99\x97\xb0\x18\xc8\xda\xc1\x03\x37\x16\x4b\x45\x6a\x09\xd5\x2b\x28\x85\x91\x39\xf1\x58\xdb\x43\xec\x5d\x94\xb7\x2b\x0c\x24\x94\x05\x38\x22\x31\xd6\x25\xe8\x9f\x16\x70\x1b\xef\x49\x78\xaf\xac\x3e\xbf\x56\x6e\xbe\x9f\xba\x38\x76\xfd\x79\xcd\x66\x52\xcf\xee\x1a\xfa\x33\xaa\x54\xfa\x5d\xc9\xe7\x0f\xc9\x1f\x9c\x1d\x6f\x78\xb1\x84\x90\x5e\xdf\xa9\x7e\x02\xd0\x1b\x58\x0c\x65\xd8\x7f\xab\x7a\xc0\x81\xeb\x2b\x34\x39\xdc\x9d\xca\x2e\x54\x63\x0f\xc4\x9b\x7d\x67\x30\xa0\x38\x83\x7f\x1c\x37\xbc\xed\x5c\xb1\x61\xfa\x14\x2b\x36\xb4\xdb\xb8\xd5\x78\x90\x5a\x0e\xfb\x59\x8b\x87\x32\xa4\x9d\x2c\xda\x43\x8d\x66\x63\x01\x89\x31\xaf\xf5\xdd\xf2\x5a\xf7\xc1\x2a\x9f\x78\x72\x6b\x3b\xb5\xb1\x94\xc4\x0e\x8b\x35\xd6\x93\x78\x0a\x69\xae\xed\x66\x7d\xb3\x45\x25\xfa\x88\xd6\x56\x9e\xb9\x53\x79\x89\xae\x6b\xb1\xf5\x8d\x9d\x0b\x4d\xc4\xa4\x85\xb1\xda\xc4\xc8\x95\xbf\xb6\x92\x13\xb1\x5b\x38\xd6\x9d\x18\xcc\x95\xc7\xe2\x13\x4f\x8c\x2b\x7f\x4b\x15\x28\xfa\xc8\xd6\x6e\x7c\x79\xe0\x3b\x3b\x14\xa4\xe8\xdb\x9d\x01\x7c\x79\x2c\x4d\x31\x96\xa6\x78\x9a\x09\xc4\xbf\xc9\xa4\xbc\xf7\x99\x25\x7c\x88\x17\xec\x6b\x2b\x4f\xb1\xa3\xa7\xee\x21\xc3\x68\xc6\x42\x15\x63\xa1\x8a\xb1\x50\xc5\x58\xa8\xe2\x5b\x67\x41\x5f\x29\x79\x1f\xeb\x56\x8c\x75\x2b\x46\x11\x79\xac\x5b\xf1\x98\x23\xb9\xc7\xe2\x15\x63\xf1\x8a\xaf\x8f\x6a\x8e\xc5\x2b\x1e\x77\xfe\x88\xb1\x82\xc5\x58\xc1\x62\xac\x60\x31\x56\xb0\x78\xf0\xbc\xee\x8f\x46\xbe\xdb\x9d\x68\x8e\x65\x2c\x1e\xdc\x07\x3b\x96\xb1\x18\xcb\x58\x3c\x29\x72\x37\x96\xb1\x38\x24\x49\xfe\x6e\xcc\x3a\x3c\x66\x1d\x7e\xd8\xac\xc3\xdf\x7d\xf3\x59\x87\x07\x99\x7e\xbc\x3d\xb9\xcb\x86\xdc\x65\x09\x21\x7e\xe7\x6a\x32\xae\x7d\x38\xdf\x20\x65\x32\x92\x87\xb7\x7a\xec\xe3\x1f\xf9\xce\x82\x6b\xdf\xf9\x73\x32\xc0\x59\x53\x05\xcc\xb4\xa4\xef\x98\x71\xe4\x4e\x03\xc3\xf8\xe0\x3d\x3c\x35\x91\x99\x6d\x3d\xd2\xb5\x4f\x0e\xa0\xc2\x5f\x41\xa6\xda\x4a\x52\xec\x94\x0e\x3b\xa5\x93\x7a\x96\x86\xfa\xc8\x0f\x7e\x10\x40\x06\xaa\x90\x83\x8f\xf6\xf6\xdc\xe3\x41\x0d\x97\x64\xc0\x69\xb5\xe9\x04\xb8\x58\x5e\xc8\x8c\x27\x9b\xde\x50\xee\x46\x5b\x9b\xb1\x07\x41\xd2\x39\xfe\x64\x83\xed\x4b\xa5\xc9\x4a\x66\x29\xd1\x85\xdd\x77\x1a\xe8\x68\x39\x75\x29\x97\x6e\x68\x36\x30\x8d\x1b\x9c\xa0\xc9\x74\x92\xb3\x82\xcb\xf4\x12\x4c\xed\x91\xa8\xed\xfa\xe3\xb6\xd3\x20\x7c\xdc\xa0\x59\xb7\x5c\xa4\x10\xf9\x89\xe1\xa5\x41\x46\x91\x95\x9f\x9e\x35\x1d\xf9\xa9\xcd\x48\xbd\x47\x98\xf8\x9c\x91\x65\xc1\x28\x18\x6e\x57\x54\x90\x7f\xb3\x42\xa2\x2e\x6a\xb3\xa3\x08\xc3\x5c\xd8\x2f\x25\xcd\x20\x25\xc4\xff\x38\x3b\x23\xcf\xbf\x3f\x23\x6b\x2e\x5e\x0c\xb5\x8d\x44\x31\xb2\x57\x16\x23\xeb\xac\xb9\x38\x3f\x94\xca\x9c\xfa\x89\x13\x89\x5a\x9f\x6e\xe2\x6a\x07\x2a\x1a\xb5\x6b\x4d\xd7\x2e\x93\xad\x4d\x91\x80\x0b\xc5\x95\x51\x0d\xd6\x5c\x07\x41\xc1\xf6\x7b\x46\xd6\xef\x5c\x9c\xa3\xd4\x8e\x69\x1d\xf0\x0f\x65\xc6\xfa\x53\x15\xd4\x9b\x56\x29\x32\x54\x6d\x05\x7d\x61\x28\x73\x42\xa4\x60\x24\xe5\x05\x96\x3a\x01\x17\xb5\x62\x04\x5f\xa7\x05\x23\x34\xcf\x33\x73\xe2\xe9\x42\x43\x72\x10\x0c\x99\x36\xbd\xbc\x69\x04\x67\x83\x9c\xe1\xf4\x7c\x47\x28\xff\x7a\x71\x0e\x7d\x6e\x20\xaf\x08\x26\x25\x09\x87\x72\xc3\x32\x99\x70\xbd\x31\x8b\x6d\x37\x1b\x64\x98\x70\xaf\x39\x53\x41\x1f\x79\xc1\x8c\x1c\x4a\x16\x99\x0d\x41\xaa\xbf\x89\x7e\x10\x3a\xaf\x14\x79\xbc\x15\x53\xa2\x24\x86\xa6\xe8\x78\x3e\x14\x1b\xb1\x82\xba\xb1\xd2\x54\xe8\x6c\x33\x25\x56\x71\x9c\x62\xbf\x74\xc1\x94\x67\x05\x2e\x19\x57\xec\x6b\x18\x64\x2d\x15\x13\xdb\x53\x1b\xbb\x39\xc6\xa2\x21\xf0\x49\x3d\xc5\x5d\x2e\xb5\x21\xa9\x81\x41\x06\xda\x41\xc2\x05\x73\x86\xcd\x22\x39\x87\x48\x5a\x16\xc1\x72\xce\xc8\x79\x98\x09\xc5\x52\x04\x77\xa8\x3d\x75\x9b\x62\xd8\xef\x2d\x57\xcc\xed\x61\xed\x54\x39\x83\x7b\xca\x55\x42\x8b\x14\x4d\x19\x5c\xdc\xd0\x8c\xa7\x07\x4d\x75\x10\x21\xee\xbf\x7a\x87\x58\x45\xed\x63\x4e\xb1\x8a\xbe\x37\x49\x09\x2e\x52\x9d\x1a\xda\xe5\x9a\x91\x77\x0b\x77\x08\xa6\x16\xb9\x03\x89\x6f\xec\x96\xff\x44\xbf\x60\xbf\xe8\x9b\x71\xbd\x77\x65\x7e\xac\x4e\xc5\x3f\xe0\x50\x74\xd2\xf4\xcb\xce\xb6\x5e\x61\xf7\xe7\x55\xd9\x07\x15\x71\xcf\x31\x29\x85\xd1\xe8\x98\x48\x6d\x36\xa9\x30\x49\x8c\x30\x42\xbe\x51\x67\x6f\x57\x3c\xab\xae\x5e\x99\x1b\x22\xee\xfe\xc2\x64\x3f\x3d\x23\x89\xd2\xbe\x90\x0b\x6c\x61\x12\xdf\xff\xd1\x30\x09\x73\xee\x56\xb2\x2c\x5e\xd4\xd7\xba\x54\xac\xbd\xde\xea\x15\x39\x21\x7f\xb1\x63\x64\xa4\xcc\x5f\x91\x33\xf2\x9c\xcf\xd8\x8c\x08\xd9\xb8\x76\x5c\x91\x54\x0a\xf6\x62\x56\x7b\xc5\x4c\xea\x15\xf9\xfe\xcc\xbd\xd6\x77\x5d\x4d\x2b\xb7\xb8\x99\x14\xcb\x61\x8c\x6c\x0f\xb9\xa8\x75\xa6\x87\x08\x39\x63\x82\xf8\x31\x41\xfc\x98\x20\xfe\x1b\xca\x73\x39\x26\x88\x7f\xba\x09\xe2\x3b\xe9\xf5\x63\x4a\x10\xdf\x3d\xc8\x7d\x13\xc4\xf7\x4f\x7b\x5f\x1e\x77\xbc\x04\xf1\x9d\x9f\xfc\xb3\xd5\x8f\xf6\x60\xaf\xee\xd5\xad\xaa\x97\x3d\xda\x0e\x28\x2e\xc8\x5c\xea\x15\xf9\x98\x03\x5f\x78\x23\x6f\x45\xa5\x94\x29\xf2\x1c\x3a\xb7\x0f\xe1\xdf\xd0\x02\xc2\x3a\x15\xa4\xa1\x64\x90\xf4\x30\xdb\x44\x0d\xb8\x75\x4e\xe9\xdf\xef\xc8\x5d\x08\x5d\x73\xd5\xd0\xb7\xe1\x76\xba\x9f\xde\x80\xb0\xd8\x2f\x2c\x73\x0c\x42\xcd\xb2\xd0\x02\x9e\x5a\xe7\x77\x98\x3c\x12\x3d\x76\x68\xf1\x0b\xa4\xb0\xb8\xa0\x06\x72\x1c\x7e\x6e\xc5\x97\x2b\xd6\x12\x7d\x3d\x15\x81\x34\x5b\xdf\x9f\x9d\x29\x24\x37\x98\xf0\x74\xdf\x9b\xd2\x50\xc1\x5d\x1a\xc8\x8f\x79\xc7\x1a\x7e\xcc\xb7\xac\xe0\xc7\x7c\xc8\xfa\xb9\x59\x9a\xe3\xf2\xea\x5a\x10\xf2\x3b\x9f\xee\xd4\x88\xc0\x00\x9d\x03\x41\xfb\xf7\x08\x71\xcc\x59\x41\xfe\xe8\xc5\x58\x7c\x21\x95\x25\xb8\xe4\xdb\x89\xc0\x9a\xad\xdf\x47\x84\x6a\xa7\xdf\x1c\x64\xd5\xee\x24\x2c\x63\x1f\xfb\x5f\xea\xb1\xea\x83\x1e\xab\x3e\x8c\x55\x1f\x1e\xa8\xea\x43\xe7\xb5\xdc\xb3\xea\x83\x79\x6d\xac\xfc\xf0\x24\x15\xcb\x47\x5c\xf9\xa1\xdb\xd0\x32\x56\x7e\x78\x70\x8d\xf8\x71\x54\x7e\xe8\x3e\x22\x07\xaf\xfc\xd0\xaf\x4f\x7d\x25\x95\x1f\xe6\x81\xae\x55\x9f\xc5\xfc\xc1\x55\xa9\x4e\x09\xfd\xff\x67\xef\xef\x9b\xdb\xc6\xb1\x3c\x50\xf8\xab\xa0\xdc\xfb\x54\xec\xe7\x4a\x72\x92\x7e\x9b\xc9\xd4\xfe\xe1\xb6\x9d\x6e\xcf\x24\x8e\x37\x76\xba\xef\xd6\x7a\xab\x07\x22\x21\x09\x6b\x0a\xe0\x10\xa4\x6d\xf5\xde\xae\xba\x5f\xe3\x7e\xbd\xfb\x49\x6e\xe1\x9c\x03\x10\x94\x40\x89\xb2\xe5\x74\x92\x66\xed\xd6\x74\x2c\x82\x20\x5e\xcf\xfb\xf9\x9d\x65\x8f\xc8\x24\x30\x52\xd7\x1d\xa3\xb6\xc3\x0b\xf1\x38\x29\x7a\x83\x8e\xfa\xfb\xa0\xaf\x9e\xd1\x57\xcf\xf8\x8c\xab\x67\xb4\xde\x32\x6a\xec\x16\xdd\x88\xd2\xee\xea\x5f\x9e\xff\xff\x7c\x5c\xf0\xf1\xc5\x07\x56\xd5\x31\xdb\xbb\x16\x06\xfa\x42\x1c\x7d\x21\x8e\xf2\x53\x2c\xc4\xb1\x3e\x52\xfa\x21\x42\xcd\x23\x0a\x71\x6c\x66\x51\x1d\x03\xbf\xba\x55\xf2\xd8\x64\x28\xee\x2b\x79\x7c\x21\x95\x3c\x3a\x58\xf2\x3e\xef\x4a\x1e\x2f\xfb\x4a\x1e\x7d\x25\x8f\xbe\x92\xc7\xae\x2b\x79\x74\xa0\x1b\x5d\x19\xd2\x13\x54\xf2\x88\xc4\x45\x6f\xc4\xfe\xae\xdb\x36\xcc\x8c\x3e\xda\x1b\x13\x32\x41\xce\x68\xe0\x39\xf0\x3a\x42\xfd\xa9\x13\xc4\x97\x02\xe2\x3f\x45\x10\x8b\x1e\xac\xe2\x29\xc0\x27\x5e\xf6\x95\x69\x7a\x0c\xfc\x5d\x60\xe0\xb7\xa4\xde\x7d\x09\x18\xf8\x2f\xfb\xca\x34\xdb\x2c\x56\x5f\x99\xe6\xb3\xc1\xc0\x7f\xf9\x27\xaf\x4c\xd3\x42\xb4\x36\xf2\xcc\xed\x2b\xd3\x44\xae\xc5\xc6\x37\x1e\x56\x99\xe6\x65\x5f\x99\xa6\xe7\xca\xad\x5c\xf9\xcb\xa9\x4c\xf3\xb2\xaf\x4c\xf3\x40\xae\xdc\x57\xa6\xf9\xcc\xb8\xf2\x9f\xae\x32\x4d\x0b\xd9\xda\x8e\x2f\x77\x7c\x67\xdb\xca\x34\x2d\xbb\xd3\x99\x2f\x5f\x79\x18\x8b\xf5\x7c\x19\xdb\x35\x2c\x46\x21\x1d\x18\x78\x2f\x2a\xfd\xa9\x0b\xff\x4b\xe0\x53\x25\xce\xdd\x34\x79\x3c\x88\x75\xf3\x0e\x70\x5c\xab\x6d\x3e\x0b\x38\x40\x76\x8c\x94\x06\xe0\x1a\xb3\x05\x83\x54\x58\x68\xf2\x7e\x69\x4c\x81\xe7\xbc\x9b\x5d\xfa\x8b\x2a\xc2\xb3\x86\xfc\xd4\x41\x70\xde\xdb\x14\x8c\xd4\x51\xa8\xe0\x60\x0c\xd8\xcf\xfe\xdc\x36\x50\xc7\xba\xe3\x02\xdc\x7e\xca\x55\x58\x76\x04\xa9\xb5\x8a\xa9\xb1\x91\x70\x04\x8d\x01\x27\xa2\x0d\x08\x65\x8d\x79\x79\xfb\x9b\xff\x99\x03\xf1\x3d\xd5\x65\xfe\x94\x81\xaf\xbb\xdc\xaa\x3f\xa0\x06\xcb\x47\xb9\x56\x5f\x66\x91\x38\x5f\xa8\xe4\x9d\x7b\xba\x54\x77\x68\x95\xab\x2f\xbf\xf2\x40\x4f\xf8\x86\x92\x5a\x9f\x2c\x2e\xd2\x97\x82\x2a\xf6\xa8\xf8\x9f\xa7\x87\x24\xfb\x82\x2b\x7b\xad\x00\x96\x0d\x56\xee\xd4\x67\x05\x61\xf6\x27\x27\x08\x9f\xcb\xdd\xdb\x12\x65\xad\xaf\xbd\xf4\x90\xda\x4b\x3d\x4e\xe6\x97\x8c\x93\xf9\x27\xaa\xf5\xd3\xe3\x69\xfe\xf1\x6c\xe2\x23\x51\xfa\xbe\x96\x4c\x5f\x4b\x66\x53\x15\x86\x36\xa6\xf6\xa4\x45\x65\xbe\x0c\x86\xd4\x9d\xbd\xf4\xf5\x49\x3e\xa9\x2b\xb4\x55\x7d\x92\xcf\x8b\x4b\xae\x81\xea\x7f\xaa\x82\x11\x0f\xe3\x57\x63\x5e\x26\xb3\xc3\xdb\x17\xa3\xbf\xeb\xf1\xba\xab\xf0\x77\x3d\x0e\x1d\x0a\xe5\x0a\xde\x61\x18\x8e\xf2\x3f\x7a\xdc\xc3\x0b\xf6\xf0\x82\x5f\x24\x98\xc2\x65\x13\x4e\xf0\x99\xf9\x02\x01\x05\x2f\x1b\x20\x82\x44\xa4\x5c\x62\x51\x08\x12\xc0\xe1\xaa\x7f\x64\x04\xc1\x0e\x74\x1a\xa8\xda\x08\xa9\xda\x26\x84\xc0\xe3\x48\x5a\xe2\x67\x30\xab\x6e\x90\x82\x21\x79\x5f\xc5\x0c\x6c\x3c\xdd\x11\x28\x60\xd8\x67\x27\x80\xb0\xb0\x5d\x10\xf2\x18\x66\x8b\x8a\x7a\x57\x1e\x8f\xf4\x75\x51\xe8\x71\x4b\x4a\xda\x9b\x16\x28\xaf\x3b\x6e\x58\x32\x13\xc9\xcd\xae\xd2\xc2\xba\x20\x8e\xb5\x0d\x86\x90\xb2\xd6\x40\x8a\xed\x66\x8c\xad\x98\x62\x3f\x55\x73\xae\x98\x87\x11\xf3\x10\x63\x28\x17\xaf\x42\x88\x75\xc1\xf7\x6a\x03\x11\xdb\x1f\x17\x52\x4c\x0e\x9e\x0a\x3e\xec\x32\x0e\x18\x36\x70\x01\x59\x31\xdc\xb0\xb8\x3e\xd5\x5e\x7b\x41\x4f\xec\xc1\x0d\x3b\x3f\xd6\xf3\x3c\x13\xf6\x54\x17\xec\x35\x97\x59\x14\xef\x7c\xa7\xe8\x61\xe1\xa5\xdc\x04\x0f\x46\x4d\x50\x66\xa0\x34\x7c\x62\x03\xff\xa3\xc7\x3d\xe6\xd7\x27\x22\xed\x6d\x83\xf9\xf5\xf7\xe6\xbe\x6d\x9d\x68\x1d\x32\x9e\x1e\xb7\xeb\xe3\x8b\x9a\x4d\x9c\xae\xcf\x42\xcc\xec\x8c\x07\xd6\x50\x40\x1f\x09\xf8\xb5\x22\xed\xac\x27\x73\x4b\xe8\x5d\x60\x57\x9d\x81\xf6\xca\xc4\xbd\x48\x2a\xe4\xfd\x32\xcb\x58\xa6\xf5\x0d\xcb\xe4\xcd\x46\x9b\x45\x29\xe6\xb9\x25\x28\x11\x02\x08\xd0\x2d\x27\x82\xa7\x99\x54\xa2\xbd\x70\x45\xc3\xf2\x96\x3a\xed\x5a\x2a\x5f\x49\xa1\x10\x19\x07\x14\x18\xa2\x5f\xa6\xe4\x45\x79\x85\x72\x02\xd5\x62\xb1\x33\xb0\xd7\x66\x2c\x1c\x62\x0c\xd9\x5a\xa1\xfd\xc2\x94\x62\xce\xca\x02\x3e\xa2\x59\x29\x8a\xb9\x54\x56\xc8\x92\xe5\xdf\xe8\xca\xba\xca\x14\xb9\xb6\x4c\xf5\x56\xb0\x3a\x04\x6b\x63\x76\xf9\x60\x6f\xcc\x93\x1b\x3d\x99\xbc\x91\x73\x19\xb1\xce\x34\x67\x18\xc2\x14\xe0\x90\x68\xa8\x73\x5e\xdc\x20\xc1\x90\x06\x26\x34\x41\x4e\xc9\x4e\x02\xc0\x9e\xef\x3a\x56\x52\x45\x86\x1b\x47\xfb\x58\x5a\xf1\x15\xf8\x04\x53\x25\x89\x30\x66\x52\x65\xd9\x82\xd9\x5b\x60\x66\x22\xc5\x30\x30\xb7\xd6\xb5\xc1\xb7\xa8\x14\x24\xbf\x00\xd6\x53\x59\x52\xd6\x94\x92\x19\x9b\x0b\xae\x4c\xbd\x45\xd4\xab\xab\xeb\x90\xeb\x94\x19\x39\x55\x3c\x33\x2b\x8f\xb3\xcc\x95\x60\x55\xa9\x4b\x9d\xc9\x79\xc1\xb3\x4c\x64\xd2\xcc\xed\x07\xc0\x68\x87\xfd\xd0\x86\xa1\x4b\xb5\x31\x8a\x17\xe1\x18\xc2\x0e\xa4\x41\x8b\x23\x5a\xdf\x5f\x78\xb0\xac\x60\x10\xf8\x4e\xfb\x20\x69\x25\xa2\xb4\x29\x52\x78\x32\xd1\x2a\x11\x79\x69\x0e\xef\x74\x71\x93\x69\x9e\x9a\x43\x82\x67\xc8\x44\x61\x0e\xad\x9c\x31\x2c\x2a\x35\x2c\xf5\xb0\xde\xbb\xc3\x8e\xa0\x67\x5c\x55\xbc\x4e\xb7\x8e\xa0\xb7\x85\xcf\x1d\x2c\x84\x69\x00\x2c\x00\x1a\x04\xa6\xc2\xa3\x45\x16\xa6\x4e\xaf\x98\x11\x7b\x23\xec\x82\xff\xb3\xd9\xd5\x3f\x31\x4f\x9d\x55\x0a\x30\xdb\x16\xba\x02\x63\xab\x43\x2a\xbe\xb3\x4b\xe8\x7e\x4c\x75\x9d\xdd\x3e\xb1\xe2\xa5\x95\x05\x29\xcd\x3d\xb8\xa4\xb9\x4c\x6e\xdc\x30\x2a\x25\xff\x55\xd1\xad\xa7\x2b\x01\x07\x22\xb7\xa4\xd5\x25\x7c\x50\xdb\x1a\x65\x89\x39\x8a\x34\x62\xf8\xb5\x12\x44\x5a\xfb\xb4\x32\x58\xbb\x04\xf3\x08\x8c\xb4\xc2\xbc\x15\xb0\xed\x47\xa1\x9a\x0d\x7e\x30\x58\x85\xe5\xa2\x50\x34\xf1\x11\x03\x31\xb6\x2a\x60\x74\x30\x66\xde\x78\x1b\x88\x51\xc2\xb1\x24\x8d\xc4\xbe\x30\xdb\xdc\xee\x34\xda\x8e\x4b\x8f\x98\x88\xb9\x0d\x49\x99\x2d\x46\x8c\xfd\xa4\xef\xc4\xad\x28\x06\xec\x3f\x75\x05\xdd\x18\xb1\xb2\xf0\xff\x6e\xe7\xf4\x4f\x4b\x23\xb1\x3b\xbb\xd0\x77\xc2\x2e\x3d\x14\xd6\xa1\x74\x34\x48\x87\xc8\x52\xf6\x4f\x71\x5f\x0a\x65\x80\x95\xdd\xbe\x80\xc2\xe5\xff\x64\x47\x17\x67\x4f\x7b\x76\xbf\xaa\xd7\x6e\xb8\xd0\x55\x31\xd4\x77\x6a\x98\xeb\x74\x18\xf8\x41\xe9\x70\x8f\xb5\xce\x04\x57\x90\x38\x55\xdf\xd2\x4d\x84\xcb\x21\xee\xad\x12\xb0\x18\xa9\xb2\x74\x8a\x97\x40\x32\xd0\x04\x6e\x15\x4d\x8c\xe8\x40\x80\xad\xe5\xf7\x5d\x1a\x9c\x65\x44\xa5\xe0\xe9\x82\x14\x73\xe7\xde\xab\x2b\x14\xc1\x0e\xd3\xdb\x77\xf6\xc4\xed\xef\x8f\xec\xe4\x47\x01\x15\x66\x43\x36\xa2\x72\x10\x35\x79\x3d\x60\xd7\xd5\xf3\xe7\x5f\x27\x0c\x9b\x07\x73\x3f\x18\x30\x28\x36\x04\xdd\xd9\x99\xd8\xa5\x67\x99\x98\x00\x7c\x5d\x0a\x40\x6b\xf5\x00\xe6\xfc\x3e\x24\x6f\x9f\x02\x4d\x6a\xc7\xea\x38\xa2\x1b\xf2\xaf\x4a\x14\x0b\xa6\x6f\x45\xe1\xf6\x8b\xfb\xa4\x5d\x48\xed\xf1\x17\x1a\x41\xce\xd8\x39\x78\x5b\xb2\x45\x83\x5e\x18\x01\xb6\x79\x2b\x26\x43\x16\x90\xbd\xce\x0b\x5d\x6d\xbd\x04\x76\x1c\xb7\x52\xdc\xc1\x5a\xd8\x23\x6b\x6f\xd0\x90\x00\x82\x0f\x91\x22\x1c\x7e\x05\xff\xf5\x07\xb8\x83\x05\xab\x3b\xd6\xc6\xa0\x96\xa4\x56\x96\xec\xa4\x91\x16\x0b\x34\x0e\x6e\x3c\x9d\x44\x7f\xe9\xed\x61\x21\x39\x0e\x62\x0f\x3f\x06\x7f\xda\xa4\x49\x25\xba\x10\x76\xba\x17\x3a\xbd\xa2\x09\x3a\xfb\x64\x59\x66\x24\x15\x1e\x4d\x4a\x51\xbc\x26\x49\x23\xe2\xa3\x8d\x37\x24\xaf\x21\x29\x7e\x13\x01\xa6\x23\xb0\x9b\xfd\x5d\x8f\x71\x89\x66\xdc\xd4\x12\x4c\x2d\xe2\xee\x0b\x09\xc4\x78\xd5\x2e\x81\x80\xad\xc1\x81\x92\x86\x40\x25\x5b\xc6\x80\x35\x0d\xed\x10\xec\x47\xe9\x5b\xc6\xe1\xc4\x88\x4c\x4e\x25\x79\x0b\xc7\x62\xa9\xf6\x55\x2a\xec\xb7\x53\x62\x8a\xae\x0b\x69\x28\x40\x80\x1e\x0f\x00\x53\xcd\xce\x2f\x59\x24\x99\x60\xd3\x8a\x17\x5c\x95\x42\x18\xf2\x7e\x4e\xa4\xe2\x99\xfc\x4d\x14\xe6\xc0\x1f\x89\x99\x56\xba\xa0\x62\x74\xcd\xc9\x04\x2c\xd7\x7e\xed\x4e\xab\x67\xe5\x9a\xa1\xc5\x16\xc3\x15\x6a\xab\x7b\x19\x8b\x44\xcf\xc5\xca\x74\xa9\x17\x26\xe7\x73\x91\x4a\x5e\x8a\x6c\x41\xeb\x25\x4b\xbf\x54\x96\x06\x87\x1f\x00\x90\xc9\x61\x66\x95\x37\x87\xa3\x08\xf9\x50\x34\x25\x28\xd5\x48\x8a\x32\x6c\x31\xe2\x4d\xc2\x50\xae\xae\xde\x34\x37\x87\xa0\x2a\x77\x51\x85\xcd\x9e\xe3\xc3\xc8\x39\xee\xaa\xc0\xad\x43\xc4\x89\x58\xa5\x37\xe8\x71\x68\xc5\x5b\x76\x4f\xae\x1a\x90\xff\xde\xc9\x2f\x09\x1a\x53\xc4\x98\xd7\xd0\x56\x38\x41\x1a\x7b\xc6\xb8\x45\xce\x4a\x4d\x32\xe2\x96\xdf\xf7\xc1\x44\xec\x25\xf6\x6c\xcf\x32\x70\xb0\x45\xd3\x45\x4d\x21\x9b\x9e\xd2\xef\xfd\x4d\x70\x40\xa5\x58\x77\x93\xcd\x40\x42\x34\x43\xd2\xab\x74\x91\x8a\xc2\x65\xb6\x18\x61\x19\xa5\x5d\x9e\x9c\x64\x5f\xe3\xba\x0c\xd3\x79\xa4\x62\xef\x5f\x1f\x7f\xfd\xf5\xd7\x7f\x45\xf0\x28\x3a\x88\x52\xb1\x0f\x57\xc7\xbb\xb1\x36\xaf\xc3\x63\xbc\xaa\xad\x74\x75\xc0\x01\x82\xa0\x11\x56\x71\x68\x02\x7c\xb6\xe4\x3b\xf8\x58\xfc\xff\x51\x56\xb5\x00\x80\x71\xb0\x77\x3f\xac\x87\x37\xcc\x6d\xab\xe1\x5c\x14\x53\x31\xbc\x11\x0b\x4a\xee\xdb\x8b\xb6\x32\xa5\xdd\xcc\xe9\x02\xc2\xf1\x8a\x29\x2c\x2c\xaa\xcd\x9b\x8e\x33\xc8\x1c\x88\xc5\x5a\x08\x9e\x80\x86\x3b\xe3\x46\xac\xda\xa7\xd7\x8a\x39\xce\x14\xf1\x80\x33\xcd\x93\x1b\xa5\xef\x32\x91\x4e\x6b\x00\x3f\xb2\x9b\xd3\x1e\x7c\x39\x87\x1d\x64\x5e\x91\x3e\x62\x5b\x2e\x5d\x0f\xbb\x20\xe6\x71\x97\xdd\x23\x30\xfa\x5c\x87\xa0\x5c\x8d\x8e\x0b\xad\x36\x44\x97\x50\x93\xee\x11\x26\x49\xa1\x55\x1f\x66\xd2\x87\x99\x7c\xf9\xb6\xff\x3e\xcc\xc4\x5e\x7b\x77\xdf\x07\x4c\xaa\x24\xab\xd2\xba\xea\xed\x4c\xa4\x55\xf6\xf4\x1b\xf9\xf0\x68\x8d\x06\x11\x7c\x48\x30\x8a\xa7\x75\x9f\xcb\x1c\xb7\x0b\x4d\x59\x5d\x9f\xcd\xbc\x64\xd7\xc1\x2a\x8d\xce\x37\x39\xc8\x83\x66\x31\x27\xb9\xdb\xae\xde\x53\xfe\x89\x30\xac\x6d\x3c\xe5\xb4\xb7\x3b\xf1\x96\x37\xa5\x9f\xde\x6d\xde\xbb\xcd\x9f\xc0\x6d\xde\x3c\x64\x3b\xf2\x9f\xaf\x92\xe4\xcd\xe4\xf0\x01\xce\x74\xa0\x1c\xa0\x08\x4a\x32\xdf\xfa\xe2\x1e\x45\xa5\x36\x17\xc5\x42\xd6\xbf\x37\xd8\xfb\x1f\x3d\xbe\x6a\x75\xbc\x5b\xbd\x1e\xb8\x6a\xb2\xb8\x80\xaa\xb1\xeb\x3c\x29\x94\x5b\x55\x16\x82\x43\xfe\x80\xb3\x24\xf8\x29\x98\xda\x92\xc4\x7e\x06\x4c\x22\xca\x73\xe2\x85\x78\xc5\x86\xec\x7a\xef\x28\xcb\xf4\xdd\xf5\x1e\xdb\xa7\xca\x32\x07\xaf\x9c\xd3\xd6\x11\x17\xfb\x85\xa2\x52\x41\xff\xd9\xe2\x6f\xf0\xee\x6b\x5d\x8c\x65\x7a\xbd\xf7\xca\xaa\x9e\x63\x99\x9a\x70\x0c\x45\xa5\xcc\x80\x99\x1b\x89\x68\x9c\x4a\xdc\xc3\x6f\x4c\x4e\x58\x5e\x88\x5b\xa9\x2b\x70\xd3\xb0\x19\x37\xea\x59\x59\x1b\x7a\x17\xa2\xc4\xde\xdf\x8b\x3c\xe3\x89\xb0\xdd\x27\x5c\x25\x22\xf3\x96\x92\xc0\x8e\xe5\xfc\x8a\x05\x36\x36\xb8\x37\x50\x49\x58\x89\x3b\xa6\x55\x14\x0e\x08\xad\x0c\x76\x72\x3f\x49\x53\xea\x62\xd1\xe2\xfc\x6f\xaa\xb7\xf8\x56\x3d\x52\xe7\x0d\x2c\x44\xc9\xa5\x22\x53\x28\x50\x46\x20\x59\x88\x23\x9e\x4a\x63\x49\x62\x25\xcd\xcc\xd7\x7b\x12\xf7\x79\x26\x13\x59\x82\x21\x16\x86\x0f\xe5\x8f\x5c\x82\x4d\x33\x68\xe0\x45\x47\x6b\x46\x78\xaa\x36\x38\xdf\xfe\xc7\x59\xd8\x37\x3a\x21\xe8\x0c\x74\x41\xa1\x6b\xf2\x91\xbf\xd7\xa3\xf1\x42\xa4\xbb\x01\xd1\x65\x76\x4f\x99\x54\xf0\x55\x86\x33\x1c\x80\x07\xd5\x11\x40\xa1\x46\x77\xf2\x46\xe6\x22\x95\x7c\xa4\x8b\xe9\xa1\xfd\xeb\xd0\x36\x6f\x8b\xa3\x2c\xec\x44\x36\x86\xb1\xbc\x23\xfc\x7c\x96\x52\xcb\x30\x82\x05\x6a\xbb\x51\x4f\x7e\xf9\xe4\xc4\x9e\xb4\xb9\x34\x46\x18\x3f\xf6\x14\x8d\x45\x00\x8d\xa4\x16\x14\x05\x3a\x62\xec\xad\x04\xc0\x79\x38\x2f\xc1\xd5\xf4\xab\xaf\x2b\x07\x43\x44\x47\x4c\x2b\xb1\xd9\x3a\x8b\xd1\x2b\xb5\x43\x72\xdb\xe3\x5c\xbf\xf9\xb1\x8f\xf4\xd7\x5d\x0d\x74\x95\xb1\x1c\x25\x36\x11\x2b\x23\x64\x7c\xca\x4a\x91\x65\xde\xfa\x42\x96\x37\x48\x37\xc5\x57\xad\xac\x60\xac\x98\xd0\x20\x8a\xe0\xe0\x49\xb5\x20\x20\xd8\x3c\xcf\x16\x58\xaa\xbc\x70\xae\xe2\xa2\x0c\x5d\x4e\x66\xc4\x1a\xe3\x87\x10\x88\x51\xc4\x05\xbe\x15\x17\x5c\xbe\x22\x9d\xb8\xdb\x46\x07\x43\xa3\x61\x07\x27\xc3\x16\xa6\xa9\x16\x4f\xc3\x91\x17\x47\xe9\x8c\xc0\x1a\x45\x49\xf5\xa3\x04\x55\xe7\x8c\x5c\xad\x76\xe5\x8a\xb7\xe0\x2d\x8c\x5b\x74\xcf\x02\xa0\x5e\x20\x73\x77\x3c\x56\xc3\xc5\xd9\x77\x1b\x61\x54\xfe\x7e\xef\xc2\x9e\xda\xd1\x55\xb5\x0e\x07\xe4\x51\xf6\xcd\xbf\x37\xf9\xc4\x1a\x47\x95\x6b\x16\xc8\x49\xdc\x07\xe8\x00\x95\x03\xbe\x81\xf9\xd0\xb9\x65\x2e\x70\xa2\xf2\x42\xa0\xb6\x07\x71\x48\xbd\xc9\xb3\x37\x79\x7e\xd9\x7a\xdb\x17\x61\xf2\x5c\x17\xbf\x82\xf7\x2e\x08\x56\x5b\x92\x1a\x69\xd3\xa5\x09\xa2\xf7\x3e\x45\x83\xdf\x8a\x4c\xfa\x28\x76\xbd\x63\x6b\xde\x72\xf7\xdd\x48\x73\xac\xa2\x33\x2f\x39\x45\xd1\x10\xa1\x83\x70\x5b\xe0\x79\x8d\x1d\xab\x69\xf9\x46\x12\xfd\x90\x5b\x10\xc4\xd9\x9a\xb5\x47\xe5\xf3\xbb\x2c\x8f\xf4\x0f\xac\x8b\x3e\xfe\x34\xee\x4b\x9d\x88\xfa\x98\x84\xcd\xc7\xdc\x8a\x97\x10\x49\xd4\x7b\x63\x7b\xd1\xa4\x17\x4d\xfe\xe4\xa2\xc9\x9f\xd8\x1b\xbb\x44\x05\xbf\x4c\x77\xec\xf2\x24\xb7\xf2\xc7\xc6\x56\xa8\x03\x3f\xd9\xb1\x47\x76\xa9\xf7\xde\x25\xfb\x65\x71\xad\x3f\xc8\x25\xbb\x2c\x03\xf5\x3e\xd9\xde\x27\xbb\x7b\x9f\xec\xf2\x29\xdb\x8d\x53\x36\x46\x97\x7b\xaf\x6c\xef\x95\xfd\x8c\xbd\xb2\x9f\x95\x1b\xd6\xdd\xbf\xde\x0f\xdb\xfb\x61\xb7\x3f\xc4\x5f\xa8\xe3\xb5\xed\x52\x74\x63\x61\xbd\xeb\xb5\x77\xbd\x3e\xd0\xf5\x1a\x39\x78\xbd\xef\xf5\x8b\x54\x15\x7b\xfd\xac\x37\x70\xf6\xbe\xd7\x2e\x82\xe8\xe3\x58\xf6\xae\x2d\x77\xbd\xfb\xf5\xf3\xb9\x2f\xbd\xfb\xf5\xe9\xdc\xaf\x89\x3d\x75\x13\xac\x18\x50\x07\x1f\xd6\x3f\x5e\xca\xa9\x95\x28\xdf\x23\x1b\x59\x77\x4d\x4e\x02\xc1\x25\xe8\x15\x20\xb9\x2c\xbf\x23\x4e\xd4\x8b\x28\xbd\x88\xf2\x65\x88\x28\x4f\x4b\xde\xae\x66\xa2\x71\x8d\x68\x95\x98\x2c\x8d\xc8\x26\x88\xad\xa6\x16\x8c\xa7\x98\x0f\xcf\x33\x58\x14\x52\xbb\xba\x18\x8e\xc2\x9b\x3f\xda\x78\xf3\x37\xb9\x22\x4f\x44\x21\x6f\x01\x9e\xa0\xd6\xfd\x10\x5f\xb9\xac\x2b\xeb\x3e\xc1\xb0\xba\x39\x0f\xb7\xa3\x72\xab\x4e\xc5\x2d\xdf\xdf\x91\xb3\x71\xbb\xaf\xb6\xa0\x99\x6f\x5f\xb6\xdd\x6a\xe9\x1f\xe0\xf2\xc5\xd5\x7b\xab\xc0\x9b\x92\xcf\x73\x8f\x77\x0d\x7a\x3d\xde\x57\x0f\x00\x98\x04\x48\x0d\x4f\x88\xf6\x3d\x8b\xa3\x7d\x83\xf1\xb9\x89\xf3\x1d\x9c\x43\x34\xca\x6c\x03\xf4\x0d\x38\xdf\xcb\x30\xdf\x1b\x7b\x8b\xc3\x6e\xbb\xd7\x78\x9e\x17\xfa\x96\x67\xf8\xfe\x20\x30\xe3\x1c\xc1\x13\x91\x32\x5d\xb0\x13\xa1\xe4\xd3\x23\x70\x6f\x77\xd4\x56\xfd\xdd\xbd\xd7\xfa\x8f\xe7\xf3\xde\xba\xf7\x60\xab\xdf\x56\xa4\xb7\x77\x4f\x7f\x92\xb2\x45\x67\x77\xf0\x96\x92\xff\x23\xdd\xc4\x0f\xe0\xc0\x6b\x74\x0d\x74\x8f\x04\xa2\x86\xfd\x73\x3e\xaf\x4a\x60\x02\x35\xca\x9f\x17\x9a\xbc\x4a\x3c\xc2\xba\x78\x70\xfa\x1c\x1d\x56\x29\xfb\x60\xb9\x06\xe1\xda\x19\x96\x70\xe5\x40\x9b\x34\x69\xf1\x58\x76\x01\x70\x08\xa9\x11\xe0\xe4\x92\xd4\x33\x5e\x04\x85\xca\xa0\xc3\xc4\x9f\xb5\xb9\x4e\xb1\x8c\xda\x78\x01\x98\xb6\x1b\xa3\x7c\x9c\xa2\xb4\x42\x31\xc5\x7d\x59\x44\x16\xe3\xd4\xfe\xbc\x5e\xf0\x02\xbc\x5c\x23\x0a\x7b\x99\x10\x59\x77\x74\xa6\x26\x1a\x49\xdc\x84\x27\x68\x61\x26\x7e\x19\x1b\x5f\x2d\x66\x5e\x34\x86\xd4\x46\x6a\x22\xbc\x6a\x5a\xe8\x2a\x8f\x48\x8e\x3f\xda\xdf\x9f\x66\xf8\x1b\x87\x35\xf0\x8b\xbd\x32\xac\x1f\xb8\x11\xdf\x7d\x33\x14\x2a\xd1\xa9\x48\xd9\xc5\x3f\x8e\x2f\xbf\x7a\xf1\x9c\x1d\x5f\xbe\x67\x64\xde\x68\x76\x16\xb8\xd5\xc6\x8b\x12\x71\xb4\xe4\x54\x89\xe2\x3c\x5a\x6b\x8d\x0e\x9f\x40\xc8\x6a\x7b\xaa\x9a\x42\x85\x83\xfe\xe2\xec\x5f\x15\xcf\xf0\x00\x61\x59\x45\xc4\x25\xb3\x1f\x7b\xc5\xfe\x69\x12\x9d\x8b\xe1\x4c\x9b\xd2\x3e\xb4\x97\xcd\xfe\xf7\x9f\x00\x05\x29\xe6\x79\xb9\x18\xf8\x30\x09\x80\x78\x04\xd7\x9a\x48\x5f\x5d\x2b\xf6\x02\x1a\xc9\xf2\x99\xa1\xc2\xe7\x99\x28\x1d\xf9\x0c\x6e\xab\x03\xc7\xe4\x06\x06\x9a\x5e\x2b\xc6\x18\xbb\xde\x6b\x42\xd4\xd9\xbf\x86\x96\x10\x00\xad\x1e\x62\x37\x43\xea\xf5\x7a\x6f\x74\xad\xd8\xcb\xd8\xf7\x6c\x7b\xf0\x69\x3c\xe4\x83\x99\x28\x87\xd4\x01\x7e\xe2\xeb\x11\x7b\x67\xaf\xe8\x9d\x34\x2b\xdd\xac\xf4\x90\x89\x29\x4f\x16\xc3\x0a\xcb\xa6\x40\x07\x27\xd2\x20\x5d\x77\x16\xa5\xa2\x32\x25\xfa\xa1\x61\x93\x8c\x03\x70\x63\xf6\x80\xea\x09\x1b\x73\x95\x8e\x00\xfb\xd9\x92\x0c\x84\x9a\x85\x2a\x84\x35\x48\x26\xd6\x17\xfc\x27\x60\x06\xd7\x07\xe2\x9f\x51\xbf\x79\x25\x23\xcc\xf4\xc3\xd9\xc9\xd3\xdc\x8e\xe0\xbb\x40\xfd\x56\x3f\x0d\x21\x28\x22\x25\xe2\x58\x57\xdd\xe4\x48\x1a\x27\x0c\x5e\x04\x87\xb0\xb8\x27\xbf\xe7\x8d\x58\xf8\xf3\x76\x0b\xb1\x2e\x13\x8d\x43\xab\x99\x6a\xa9\x75\x66\x46\x52\x94\x13\x08\x26\x98\x95\xf3\xec\xb0\x98\x24\xdf\xbe\xfc\xcb\xf3\xaf\x0c\xc6\x45\x0e\xbf\x19\xbd\x1c\xbd\x18\x7d\x8d\xbb\xff\x80\x37\x5f\xbc\xdc\x8a\x0e\xd8\x65\x8b\x57\x45\x3c\x7b\xca\xb5\x5f\xe5\xd1\xaa\xca\xb2\x47\xb1\xce\x88\xdb\x7a\xbd\xc1\x2d\xe8\x3f\x32\xfb\x89\x67\xa2\x00\x83\x48\x9a\xc9\x60\x39\x12\x00\xb6\x1c\x82\x7f\xe0\x89\x34\xa6\x12\x69\xc3\x80\x31\x13\x0d\x6c\xd7\x76\xb2\xb9\x0e\x6b\xd3\x2b\xb9\x30\x94\x4c\xd6\x15\x79\x69\x94\x03\x66\xaa\x64\xc6\xfc\x50\x79\xc6\x60\x03\x94\xe4\xd9\xa3\x3c\xe2\x5b\xc9\xc6\x01\x5e\xe6\x6e\xc5\xb0\xba\xe3\x65\xf9\x4a\xeb\x22\x95\x0a\x8e\x29\xc8\x61\x82\x9b\xb5\x3e\x67\x68\xe0\xb5\x2b\xce\x32\xf8\x9b\x50\x46\x7b\x47\x72\x6f\xa5\xfd\x42\x34\xa9\xe6\x7a\x7e\xd1\xce\x2f\xb8\xd2\x9f\xa0\x9b\x2b\xa4\x4d\x23\x47\x9b\x3a\xf9\xbb\xa2\x54\x6d\x47\x8e\xaf\x58\xd7\x9b\x12\x39\x7c\x23\xbc\x93\x2e\x18\x0b\x69\x29\xd5\x1f\xe8\x93\x38\x3e\x0d\x82\xda\x92\xc4\x71\xe6\x92\x38\xea\xed\x73\xab\xb7\xb2\x7f\x0f\x88\x9b\x8b\x9c\xf4\xde\x50\xd6\xe7\x71\xec\xd4\x70\x17\x15\xf5\x1e\x6b\x9f\x6b\xa5\xb4\x9b\xc8\x21\xc4\xc4\xe0\x19\x5e\x66\x4a\x9c\x58\x52\x87\x78\x57\xa0\x8f\x71\x7f\x53\xf0\x10\xbf\xd3\x44\x68\x77\x81\xb6\x28\xc0\x22\x56\x3b\x52\xdb\xc7\x85\x90\xbe\x95\x49\xa1\x9d\xff\x69\xa6\xb3\x54\x14\x67\xa9\xdd\xf4\x32\x92\x0c\xd2\x7c\xde\x2c\xed\x2f\xdd\xaf\xc4\xa6\xb1\x2d\x85\x04\x87\x83\x8f\xea\xe6\xf0\xe4\x84\xd2\xda\x5b\x03\xe9\x63\xad\x70\xb1\x7c\x8d\x3e\x08\x27\x4b\xb8\x4a\xa5\xbd\xd2\x18\x5e\xef\xc4\x7e\x45\x48\xf5\x77\x5c\x42\xc1\x90\x89\xb6\x74\x86\xd6\x91\xc9\xb2\x0e\x48\x9f\x0b\x6e\xaa\x42\x30\x3e\xb5\xf3\xa3\x68\x5e\x3d\x41\x17\x20\x16\x3d\x10\x29\x7b\x2f\x94\xb8\xb3\x6b\xd7\x31\xfe\x1c\x46\x51\x57\x1c\x6e\x9b\x60\xd0\xc2\xa5\xe1\xd5\x61\xf5\x65\xf0\x10\xd6\x16\xa7\xe6\x02\xe5\x71\xd5\xbb\xd6\xc0\x28\xdc\x04\x62\xee\x3b\x7a\xb4\xee\x30\x86\x7b\x8c\xe3\x98\x71\x13\xfa\x49\xb1\x84\x9d\xdf\xf6\x9d\x1c\xd3\x07\x7b\x04\xeb\x3e\xd6\x53\x05\x54\x4e\x7b\xd5\xf2\x33\x93\x84\x7a\xd9\xa3\x57\x2d\xff\x1c\xaa\x65\x40\xa0\x1e\xa2\x5f\x2e\xbf\xbe\x6b\x25\x33\xe8\xbf\xd7\x34\xbf\x1c\xfa\xfa\x09\x68\x9a\x21\x67\xee\xd5\xcd\x5e\xdd\x7c\x3a\x75\x33\x3c\x69\xbb\xd5\x39\x97\xa9\x6f\xaf\x78\xf6\x8a\x67\xaf\x78\xfe\x59\x15\x4f\x4c\xcd\x3d\xfa\xe5\xf2\xd4\x0e\x5e\x26\x3f\x64\x3a\xb9\xb9\x2c\x75\x21\x7e\xd6\x59\x35\x17\x97\xc0\x9c\xd6\x11\x89\xa0\xa6\x1f\x67\x17\x56\x82\x31\xa5\x5d\xa2\x13\x69\x6e\x6a\xee\x26\x15\x3b\xfa\xe5\x72\x74\xad\xae\xd5\x11\xfc\x93\x9d\xfe\x70\xc9\x52\xdb\x66\x5e\x99\x92\x89\x7b\x4b\xdb\x5d\xd5\x7f\x5d\x29\x57\xaf\x9e\xbb\xcb\x26\x0a\xac\x4c\x5d\xbf\xc3\x33\x03\x55\xff\x28\x56\xc7\xf0\xb9\x80\x9e\x7f\xd3\x4a\x30\xca\x85\xa6\x00\x96\x11\x5b\xfe\x6a\x62\x25\x28\x95\x2d\x30\x76\xcc\x23\x14\x14\x82\xa7\x87\x77\x85\x2c\x05\xb3\x8a\xf4\xc8\xbf\x74\x0b\xcb\x61\x98\xa9\xf2\x5c\x17\x25\xd3\x77\x4a\x14\x66\x26\x73\x36\xe7\x8a\x4f\xc5\xdc\xce\xd9\x8a\x50\x97\xa7\x6f\xa4\xaa\xee\x59\x21\xa0\x32\xb2\x54\xd3\x4d\x02\x24\x76\x7d\x76\xb2\x2a\x43\x4e\xcc\x55\x34\xb6\xf9\xb5\xcc\x04\x15\x7b\xb6\x1d\x3b\xca\x83\x1d\x21\x25\x58\xe8\x8a\xdd\x71\x05\xd7\x7d\x8e\xc5\xa2\xaf\x64\xfe\x8a\x9d\x2a\xb8\xdf\xd0\x06\x22\x9c\x96\xba\x92\x7e\x8a\x75\x05\xc6\x99\xb6\x97\x1f\xeb\x25\xaa\x29\x95\x99\x1e\xb1\xd3\x7b\x3e\xcf\x33\x61\x5e\xb1\xeb\x3d\x71\x5f\x7e\x73\xbd\x37\x60\xd7\x7b\xf7\x13\x83\xff\x50\xa5\xfd\xd7\x88\x9d\xcd\x11\x3b\x21\x23\xf9\xa5\xf0\xe5\x1a\xdd\x6b\x4c\x4e\x58\xa5\x02\x54\xfb\x2d\x6b\x75\x9a\x52\x17\x7c\x2a\x0e\x69\x8f\xbe\xe2\x77\x46\xe0\x71\x1e\xdb\xe3\x6c\x1f\x47\x03\xc7\x73\x5e\x94\x3e\x96\x7f\x35\x2f\xc4\x3f\x76\x27\x6c\xc3\xfa\x9e\x4d\x98\x9e\xcb\xb2\x74\x71\x1b\x14\x07\x06\xa4\x8c\x1a\xd9\x15\xa5\x5e\x20\x92\x2c\x58\xc3\xd7\xba\x70\x8f\xac\x90\x72\x68\x52\xfe\x62\x00\x9f\xa1\xa2\xf1\xd0\x67\x3d\x26\x6e\xd8\xf5\xde\x0b\xbb\xc0\x97\x72\x2e\x33\x5e\xb8\x2a\xe0\xd4\x49\xdd\xd2\x72\x02\xd7\xa5\x1d\xcc\xf5\xde\xf3\xeb\x3d\xb6\x8f\x55\xc1\xe1\x22\x64\x82\xdf\x62\x44\x09\x9d\xbf\x05\x86\xb5\x1d\x74\x26\xa7\x3c\x7d\xa7\xb2\x56\xf8\x9e\x05\xbb\xde\x2b\x8b\x4a\x5c\xef\x05\xdc\x47\xa5\x58\x38\x19\x62\x44\xf1\xfd\xfa\xf3\x52\x31\x24\x40\x6f\xed\xb2\xc1\x02\xba\x2e\xd6\x2e\xf4\xf5\x1e\x80\x59\xd8\x56\x4f\x7a\x88\x3c\x44\xc6\xa0\xbe\xbe\xab\x31\x65\x4a\xfe\xab\x12\xec\xec\xc4\x5d\xd0\xbc\x26\x8f\x69\x84\x3c\xb2\xfd\xa3\x39\xff\x4d\xab\x80\xe0\x1c\x7c\xa4\xcb\xd0\x29\x42\xca\x71\x8b\x09\xf0\xb0\xc5\x3a\xae\xe0\xda\x20\x13\x85\xa0\x54\xe0\x96\xee\x67\x02\xa0\x80\x8c\xc5\x2a\x13\x51\x25\xbb\x49\x0b\x95\x4e\x45\xf8\xe5\xb6\xb4\x48\xdb\xae\xfd\x3b\x3e\x00\x94\x70\x1c\xba\x42\x74\x9c\x87\x5f\xb7\xa4\x43\xa7\x5d\x06\x93\xeb\x74\xcd\x58\xb0\x56\x79\xa2\x87\x99\x86\xd8\x2d\x50\xec\xec\x2b\x21\x47\xb3\xf3\x19\x00\x4f\x1b\x30\x51\x26\x23\x7b\xf1\x8d\xb6\x52\x19\x84\x49\xe7\x3a\xdd\x37\x07\x07\xdb\xcc\xe5\x22\x18\x3b\x4d\x45\x95\xb2\xf3\x74\x54\x29\x87\x9b\xe6\xc4\x6f\xb5\x4c\x59\x5e\x95\xa4\xec\x7e\xb4\x79\x85\x13\xe9\x0a\x4c\xd2\xd8\xdb\xe8\x89\x0f\x57\xac\xb5\x41\xf8\xe9\x36\x39\xab\x2c\xa1\x7e\x2f\x92\xb6\xb5\xf7\xa7\xd1\xb2\x01\x57\x42\xf4\x9d\x53\x0b\x14\x92\xec\x6a\x6e\x10\x33\x20\xee\x72\xb0\x97\x8a\x5b\x99\x88\x0b\x5e\xce\x56\xe5\x8d\xe0\x59\xe4\x14\xb8\x67\xcb\x18\x3c\xf8\x16\xcb\xed\xa3\xbb\x99\x28\x44\xc8\x86\xc8\x2a\x35\x16\x75\xd5\xee\x18\x2b\x8e\x07\x85\x9e\xf3\xb9\x17\x6e\xfc\x7c\xb1\xe3\x47\x92\x30\x7b\x3e\x2f\x74\xba\x16\x78\xc8\x37\x0a\x96\x1f\x6a\x31\x83\x00\x40\x13\xc3\x93\x0e\x27\xdc\xee\x41\xad\x49\xc1\x1a\x80\xe1\x07\x35\xb1\x73\xa0\x4b\x4a\x69\x32\xe2\x41\xee\xdc\x8d\xa8\xb1\x78\x8a\x11\x80\x26\x8c\x9a\xc4\x3d\x2f\xc4\x44\x14\xf5\x50\x00\x97\x4f\x66\x19\x13\xb7\x42\x11\x22\xdf\x58\x24\xf6\xe2\x70\x8a\x85\xd6\x13\xf8\x18\x86\xa8\x6e\x26\xac\x4b\x5f\x88\xc4\xe8\xeb\x4a\xa5\x22\x1d\x1a\x30\x05\x7a\x23\x9b\x9c\x2a\x5e\x56\x05\x62\xe4\x6c\x5a\x97\x01\x33\x28\x52\x5a\x12\xe0\x33\x1b\xb1\x32\x37\x98\xb2\xac\x42\x65\x40\x9a\x52\xe2\x0e\x22\xf3\x2f\xe5\x6f\x7e\xf3\x4d\x66\x4f\x98\x34\x0d\x31\x71\x07\xc8\x4b\x17\xcd\xb9\x9f\xaa\xb2\x58\x74\x08\x26\x75\xb7\x3e\xf6\x76\xdb\xd5\xff\xad\x2a\x84\xd5\x89\xba\xea\x55\xfe\x85\xf0\xba\x71\xc5\xe0\x77\x76\xc2\x4b\x8e\x2a\x16\xca\x95\x5a\xd5\x92\xba\x3d\x22\x63\xa9\x52\x7a\x44\x56\xdf\x16\xe0\xa2\x90\x42\x58\x99\xe4\x9c\xa8\x84\x34\x37\x1f\xde\x9f\x45\x20\x1b\x41\xcd\x9c\xbe\xb5\xf4\x66\x65\xcc\x3f\xd9\xcf\x1f\x63\x0b\x36\xd7\xa9\x78\xc5\xce\x81\xc0\x5b\x01\x0f\x52\x82\xe8\x9f\xbf\x58\x0d\x2b\x6a\x0f\xf1\x63\x88\x8a\xe4\x21\x41\x00\x38\x0e\x10\xa3\x88\xad\x8c\x33\x3d\x66\x24\xfe\xb4\x75\x6d\xe7\x14\xed\xf9\xc3\xfb\xb3\x87\xf5\xda\x55\x47\xab\xf5\x84\xb7\x15\xa8\xba\x70\x5f\x9b\x6d\xba\x6b\x5e\xa3\x5d\xeb\x5c\xdd\x3d\x9a\xa7\xf7\xb9\x48\x4a\xef\x14\x60\x97\x33\x5e\x88\xf4\x15\x9b\x57\x59\x29\xf3\x8c\x56\xcc\x2e\xa1\xb1\x02\xaf\x5b\x3b\xc6\x13\x40\x02\x64\xec\x44\xa4\x10\x73\x9d\xbe\x72\xa5\x03\xfc\x1b\xf1\x17\xde\x82\x86\x9d\xbe\x62\x1c\xce\x3e\x2a\xdc\x69\xb0\x55\xfb\xa0\xc9\x4b\xe5\x1f\x11\xaf\x91\x19\xc8\x28\xa2\x3c\x18\x39\x25\x01\x54\x09\x03\x43\x6e\xc9\x4c\x6e\xd1\x64\x56\x00\xf3\xd8\x7e\x6d\x2c\x38\x18\xd5\x3a\x0c\x70\x40\x20\xd1\xa8\xe8\x34\x14\x1c\x23\x50\x24\x5a\xd2\x6f\xba\x81\xef\xad\xe1\x67\x76\x61\xec\x89\xab\x0d\x30\x5b\xd1\x19\xfb\x6a\x94\xce\xc0\x83\x4b\x51\x00\x87\xdf\x21\xa9\x31\x22\x29\x44\x49\xc4\x06\xb6\x03\xfe\xbd\x42\x6e\x3e\xa1\xfd\x18\x84\x83\x5e\x4d\xd7\x9f\xa1\x4a\x0f\xac\x11\xda\x91\x45\xd6\x99\x8a\x71\x3d\x2f\xe9\x6c\x1f\xd1\xd9\x06\x82\x66\x57\xf1\x1f\x62\x11\xc5\xf8\xf4\x9f\x34\x39\x4f\xd6\x7c\x17\x1e\x7b\x76\xf9\xb0\x01\x34\x2c\x16\x4e\x4e\x27\x43\xda\x85\x8e\xde\x97\x7a\xeb\x56\x55\x7f\xfb\x88\xd1\x16\x3f\x46\x56\x73\x07\xb4\x3f\xd1\x5f\xc4\x89\x7e\xfa\x13\xf3\x83\x54\xa9\x7d\x69\xcd\x19\xa1\x26\xac\x04\x8c\x47\xe5\x9c\xfd\xa0\x4c\x29\xd0\x40\xff\x06\x72\xbb\x40\xfb\xdc\x00\x20\x62\xc1\xab\x3b\xb6\xd2\x70\xad\x74\x59\x4e\xcd\x03\x19\x9e\x9d\xd8\x33\x07\xec\xcd\x6e\xc1\x8b\xd1\xf7\x03\x96\xa3\x8b\xa0\x32\xb8\x55\x63\xfc\xb6\x61\xa6\x1a\x7b\x0b\x90\x93\xa1\xa5\x32\xa5\xe0\x1b\x4f\x5b\xc9\x8b\xa9\x88\x24\x2f\xf7\x51\x07\x7d\x54\xd7\xe7\xec\xe2\xff\x32\x90\x27\xf1\x72\x46\xf5\x0c\x7c\xe6\xc9\xcd\xb2\x2b\x01\x58\x0f\xdd\x18\xd3\x5c\x94\x6d\x4c\x61\xab\x88\xc2\x4f\x8a\xd1\xbb\x2e\x34\x0b\x3b\x3e\xbe\x3c\xdb\x5e\x34\x0d\x5c\x8b\x4e\x27\x80\x05\x93\xc6\x0b\xfa\x96\xfa\x2a\x26\xee\x89\xa8\x1c\x5f\x9e\x39\xc3\x53\x5a\xc8\x5b\x51\xb0\xfd\x1f\x44\xc9\xd9\x44\x80\xa9\xe2\x60\x93\x02\x0c\xef\xec\x39\x9b\xfe\x4f\x5c\xa5\x59\xbc\x6c\x01\x25\xe4\x9e\xde\xe7\x5c\xa5\x97\xc0\x1d\xdf\xdb\xad\x89\x64\xd2\xc6\x9b\x22\xf5\x28\xdc\x4a\xfb\x3d\x47\x46\x4b\xc7\x83\x58\x2d\xa8\x7e\x02\xbc\xdf\xb7\xa2\x91\xa5\x5e\x6a\x96\x73\xe3\x69\xac\x9d\x3e\xcd\xbb\xd4\x2c\xd1\x96\x75\x95\xc2\x3f\x5a\x1e\x0c\x19\x17\x13\x9e\x65\x01\x16\xba\x62\x60\x87\x22\x63\x12\xd6\x1b\x80\x25\x32\x4c\x28\x3e\x06\x5b\x2f\xbe\x7f\x7c\x79\xf6\x33\xb9\x45\x69\x81\xd9\x14\xc0\x2f\xaf\xea\xc4\x7c\x4b\xf1\x08\x7e\xbe\x26\xf6\x63\x81\xfe\x25\xab\x84\x2a\xed\x26\x2d\x8d\xfb\x52\x0a\x3e\x9e\xd6\xf5\x30\x6c\xae\xd1\x87\xa9\x80\x77\x63\xa3\x01\xe3\x59\x46\xff\x46\xdc\x10\xbb\x34\x9d\xc2\x44\xfc\xbd\xf1\xdb\xe3\xee\xcd\x20\xd8\xec\x8b\x6a\x9c\x49\x33\xeb\xb4\xdb\xcb\x6d\xff\xd8\xed\xa6\xd1\xd0\x7e\xdb\x5d\xa8\x9f\x7d\x50\x79\xe3\xa9\x3d\x0d\xe6\xcb\xda\x42\xba\xd6\xab\x02\x37\xae\x9d\x0b\x35\x09\x6d\x4b\x7e\x55\xad\xd0\x86\x3e\x23\x69\x88\xb4\x8c\x00\xd3\xc6\x45\x20\x7d\x16\x06\xa1\xa8\xc9\x5d\xa7\x62\xf3\x91\x3e\x8f\xb4\xfa\x23\x0e\x73\x30\x8e\xe0\x18\xdb\x5f\xff\x04\x07\x58\xa1\x39\x7f\x2a\x36\x6c\x54\xb3\xcd\x1f\xb5\x4d\x30\x8a\xa5\x4d\x8a\xfd\xf6\x41\x99\xe0\xd7\x2f\x70\xdb\xda\x55\x7d\x57\x91\xe5\x15\x84\x34\xa1\xf2\x10\x2c\x74\x0b\xe5\x7e\xef\x40\x8b\x36\x58\x0a\xd6\x84\x29\x1c\x95\x28\x23\xc7\x70\x68\xea\x67\xcb\x01\x45\x9a\xd1\x15\x7b\x00\x68\x55\x80\xfe\xd2\x90\xaa\x56\x3e\xff\x73\xf0\xd4\xd1\xe4\x0a\x23\x28\x82\x90\x19\x56\x88\xb2\x2a\x54\x4d\x11\x03\x91\x2f\xcf\xaa\xa9\x54\xff\xef\xff\xfd\xff\x18\x76\x0c\x38\x64\x3f\xfb\xf1\xc3\x2d\x70\x67\x98\x9a\x6b\x85\xdb\x5e\x97\x54\xa1\x33\xb8\x86\xbc\x77\x94\xa3\x97\x0f\x43\xbb\x54\xfc\xa0\x30\x3b\xd2\x27\x21\x6c\xc0\xc7\xe2\xd6\x9b\x05\x6c\x65\xb0\x4e\x46\xf6\x82\x6e\x07\x69\x78\xd5\x4b\xbc\x35\x3b\x0d\x89\x86\x15\xe0\x67\xb0\xc9\xa6\xc9\x54\x8f\xb5\x32\x55\x46\x15\xad\x16\xba\x2a\x18\x4f\xe7\xb2\xc6\x01\x4d\x74\x51\xd8\x9b\xac\xc8\x2a\x59\x88\xa9\x55\x27\x0a\xe1\xe3\x0a\x92\xac\xb2\x3f\xec\x88\x2b\x6f\x76\xb2\x4c\xa0\xde\x4e\x5e\xe8\x5b\x99\xba\x58\x24\x24\x4e\x78\xa3\xa5\x21\x3a\xe2\x0e\x1e\x37\x46\x27\x12\x6c\x43\xc1\x92\xdc\xcd\x64\x32\x43\x7b\x5e\x2a\x4a\x51\xcc\xa5\x12\x8d\xb8\xa6\x50\x2a\xd0\x58\xdf\xa7\xe7\xe8\x4d\xd6\xf0\x71\x78\x43\xbd\x42\x0f\xe5\x12\x6f\x74\xc2\xb3\x15\xed\x7c\x73\x04\x1d\xe2\x81\xd9\x56\x43\xf0\x75\x35\xcb\x70\xbb\x2b\xe2\xae\xd2\xd3\xf0\x87\x9f\x97\x5a\x80\x52\x2e\x0c\xed\xf1\xd0\xa5\x07\xb0\x9a\x5a\xe0\x6d\xaf\x57\x6a\xf5\x64\xd4\xd7\x1e\x6e\x3c\xfe\xf8\xcc\xb0\x54\x27\xd5\xdc\x9b\x1e\x01\x1b\xce\x8b\xc2\x64\x16\x7c\x04\x2b\xea\x48\xc5\xa3\x9b\xd5\x46\xca\x79\x8e\xfe\x46\xfa\x64\xab\x73\x22\xa5\x20\x8e\x42\xcc\xf5\xad\x30\xec\xe2\xdd\xe5\xd9\xff\xc9\x92\xe0\x75\x34\xfc\xb9\x22\x53\x3e\xfc\xb9\x43\x28\x07\x4f\x23\xb6\xca\xa3\x34\x15\x69\xe3\x03\x5b\x41\xb6\xa5\x85\xce\x63\xec\x68\x0e\xd0\xc9\x0f\xec\x76\x1b\x6b\xfe\xb1\xc8\x67\xaf\x2f\x1f\x65\x3d\xe2\xcc\x76\xc2\x02\x5a\x4f\xde\x1d\x7b\x3c\x33\x6e\x4a\x57\x6c\x76\x22\x5c\xc2\x03\xda\xfb\xed\x6b\x13\xe3\x83\xbf\x53\x8d\x75\xdf\xd6\xc5\x80\xeb\xe2\x01\x21\xe0\x73\xad\x64\xa9\x8b\x48\x1a\xa1\x7f\x12\xc5\xb6\x94\xe0\x79\x7f\x4b\x6d\x62\x55\x8f\x61\xe2\xae\x93\x98\x2d\x95\x3c\x1c\xc6\x19\x54\x69\xae\x87\x09\x4c\xfd\xf0\xfd\xe9\xd1\xc9\xdb\xd3\xd1\x3c\xfd\x6a\xa6\xef\x86\xa5\x1e\x56\x46\x0c\x65\xb9\xd5\x11\xca\xa3\x01\x65\xb5\x0c\xfc\xc1\x60\xf0\xbd\xdd\x03\x17\x8b\x5f\x68\x5d\x0e\x58\xc1\x21\x18\x10\x48\x32\x44\xab\x57\x59\x86\x53\x2a\x0b\x21\x06\xa1\xc3\xf2\x70\x3b\x77\x7e\xfd\xf5\xa7\x75\xbb\x3d\xc5\x92\xaf\x38\xf0\xec\xc1\x5e\x37\xc5\x4b\xdf\xca\x49\x67\x10\xac\x57\x6a\x08\x40\x03\x07\x86\x25\xb1\x1f\x8c\x28\x9a\x6b\x2a\xca\x04\x46\x75\x08\x98\x8b\xc4\x04\x9f\x60\x46\xcb\x0e\xef\xa8\xe0\xb2\x3c\x1f\x92\x5b\x56\xa4\x16\x5e\x95\x33\xa1\x4a\x97\xa8\x46\xa3\x8e\x4e\x10\xc4\x85\xdd\xee\xd1\x23\xf4\x45\xbb\xc8\x1b\xee\x89\x17\xaf\x0b\x9e\x6a\x03\x50\x98\x20\x10\x37\x66\x85\x72\xf3\x13\x6e\xd3\x8e\xb5\x20\x20\xf0\x3d\x59\xef\xc9\x7a\x4f\xd6\x7b\xb2\xfe\x99\x93\xf5\x36\x05\xef\x4b\xa3\xed\x5b\xe9\x46\x52\xa5\xa2\x78\xa4\x04\x9f\x40\x27\xce\xca\x15\x66\x4e\xbd\xcb\x85\x32\x25\x4f\x6e\x46\xec\x88\x1d\x37\x9a\x6d\x99\x5b\x1a\xbe\x15\xcb\x2e\x2d\xc4\x94\x52\xef\x1a\xb9\xa5\x8d\x6f\x7e\xa2\x29\xa2\xbb\xf5\x36\x7d\xc4\xc4\xcf\xe5\x73\x3d\x5f\x98\x7f\x65\x43\x3c\x0d\xc3\x3c\xad\x0f\xf6\xe7\xcb\x28\x3a\x4c\x69\x85\x37\x6c\x20\xa5\x10\x2f\x64\xf0\x90\xb7\x5a\xf1\x72\x5e\xf0\xb9\x80\xfa\xd6\x15\x59\x67\x12\xad\x14\xc5\xc1\xd9\x6b\x75\x09\xd7\xea\x71\x52\x6d\x7b\x7e\x24\x5d\x37\x99\xfa\xcf\x23\x96\x02\xe5\xba\xba\xc7\x8a\xee\xfe\xae\x8f\xc7\x8e\xa5\x58\xf8\x64\x4f\xda\x7a\xd2\xd6\x93\xb6\x2f\x92\xb4\xb5\x49\x76\x9f\x3b\x7d\xdb\x4a\x92\x83\xe0\xd3\xb3\x8b\x63\x70\x3f\xac\x23\x70\xcd\x96\xcb\x29\xa3\x0d\xf7\x05\xb8\x9b\xb1\x3d\x3b\xbb\x60\x63\x6e\x17\xcb\x08\x03\x91\xca\x2e\xd3\x78\xb3\xf1\xdb\xaa\xf8\xba\x2a\x5b\x31\x74\x9a\xcf\x83\x3a\x2b\xe4\x10\x82\x5f\xfd\x48\xce\x2e\x88\x70\xd0\x38\x4c\x29\x93\x9b\x05\xe4\x2e\x8e\x02\xa7\xfd\x9c\x28\xce\x75\xf5\xfc\xf9\xd7\xe2\x39\xfc\xf7\xe5\x77\xf8\xbf\xf8\x63\xf2\xef\x7f\xf9\xee\x9b\xe7\xcf\xf7\xad\xa2\xf2\x82\xa5\x7c\x71\x60\x49\x03\x25\x20\xf8\x34\xf9\x7f\xff\x77\x76\xed\xd7\xcc\x52\x18\xba\xba\xb5\x27\xf1\xc5\xf3\xbf\x50\x2f\x5f\xb3\x99\xae\x0a\xd3\x0d\x9c\x61\x2b\x4b\xbb\x9e\xe7\x5a\x09\xd5\x56\xe4\xb2\x4b\xc5\x16\x5f\x56\x84\x00\x90\x5c\x97\x1b\x03\xda\xed\x33\x5f\xf8\x74\xb5\x28\x57\x51\xe8\x88\xfe\xe4\x07\xca\xa0\x01\x4b\x74\xea\xf2\x6d\xeb\x2f\x03\xb4\x46\x10\xc8\x3f\x13\x3c\x2b\x67\x2c\x99\x89\xe4\x26\x78\x2f\xea\x52\x6d\xad\x88\xf9\x96\x4a\x60\xc6\x66\xbe\x7e\x00\xab\x55\x86\x9a\x43\x8a\x8e\xa3\xad\x20\x2c\x26\xf9\x3a\x3f\xfb\x9a\x21\xfc\x0c\x45\x82\x28\x65\xcf\x3e\xbd\xde\xfb\x09\x3e\xba\xb8\xde\xb3\xcc\xee\x0a\xb0\x35\x2c\x8f\x7b\x8d\x00\x1a\x03\x06\x8d\x3e\xf8\xc2\x4d\xdd\x4b\x6f\x5e\x11\x26\x4d\xb7\xe1\xbc\x0a\x87\xf2\xb8\xc4\x0f\x7f\x80\x63\xe5\x79\x96\x4f\x4e\xa3\x29\xdb\xc7\xa8\xc8\xc6\x8f\x6f\xa4\x29\x0f\x00\xeb\xc9\x84\xf1\x05\x58\x70\x89\x2a\xe2\xa9\x89\xee\xb1\x76\x3f\x7a\x56\xc6\xba\xe2\x45\x6f\x28\x41\xdd\x9f\xb6\xfa\x1c\x1a\x0f\x61\xb6\x83\xdc\xf1\x08\xb5\xfc\x7d\xb0\x77\x3f\xac\xf3\xf7\x87\x39\x2f\x93\xd9\x70\x2e\x8a\xa9\x18\xde\x88\x85\x65\x42\x48\xe6\x22\xad\x4c\x59\xf0\x52\x4c\x6d\x23\x78\xa1\x4f\x3e\xe9\x93\x4f\xb6\x4f\x3e\xe9\x28\xf3\x45\xce\xee\xee\x52\x3d\x56\x89\xe8\x3a\x42\x5c\x73\x30\x9e\x65\x4d\x2e\x66\x82\xd8\x2f\x77\x97\x79\x08\xf4\xba\x4c\xc4\x7b\xc4\xde\x4f\x8a\x4a\xb7\x20\xf6\xbe\xe9\xbc\x7b\x8f\xa7\xcd\xbe\x72\x7d\x4f\x4c\xbf\x68\xb0\xde\xe6\x78\x3f\x0a\x5e\x6f\x5c\xe4\x7c\x34\x58\xaf\xeb\xd6\x2a\xc8\x6f\x79\xbe\x5e\x86\xa5\x46\x24\xa3\x36\x83\x02\x01\x1e\xc3\x12\x50\xc4\xe6\x01\x03\x88\xa9\xe6\x5d\xe0\x7a\x7b\x42\xb8\x5b\x42\x38\x96\x8a\x17\x8b\x93\xe8\x85\xf9\xc1\x3f\x6b\xc2\x0a\xe3\x3b\x0c\x6f\xcf\x29\x4f\x10\x2c\x0a\xec\x0d\x76\x23\x89\x86\x42\xaa\x9e\xaa\xe6\xa2\x90\x09\x4b\x66\xbc\xe0\x49\x29\x0a\x33\x60\xcf\x86\xcf\x06\xec\xd9\xaf\xcf\xac\x16\xf7\x6c\xf4\x6c\xc4\xc2\xef\x70\xe5\xbe\xc5\xc6\x8b\x52\x30\x8c\x7f\x4f\xc2\x80\x4d\x4b\x7d\xc8\x3e\xfc\xe1\xea\xf5\xf0\x2f\xac\xe0\x6a\x4a\xa6\x8f\x1b\xb1\xa0\xe0\x4f\x08\xbd\x0e\x7a\x86\xe1\xd9\x57\xf5\xad\x28\x32\x9e\x63\x30\xb7\xed\x44\xdb\x93\x42\x1d\x42\x53\x08\xe4\x1d\xe0\x21\x91\x86\x09\x05\x96\xc7\x94\xa5\x95\x23\xc3\x4e\xc7\xca\x0b\x9d\x08\x63\x46\xec\x83\xf1\x68\x72\x18\x06\x0c\x16\x4b\xe2\xec\xec\xc5\xe8\xc5\xf3\xff\x83\xf9\xea\xc8\x70\x28\x9c\x1d\xfb\xc1\xb1\xa2\x2b\x85\x53\x7f\x1f\xec\xc5\x09\xdf\xea\x0e\xae\x5e\xc7\x9d\x6c\xe4\xcf\xa8\xc3\xc3\xca\x2a\xad\x86\xb8\x3d\x4b\xfb\x08\xdd\x3b\xc0\x81\x60\x83\x60\xdd\xa2\xbb\xb8\x61\xff\xa0\x35\xed\xdf\x72\x7f\x5b\xed\xe2\xa3\x32\x48\x7c\xf5\xf9\x88\x39\xca\x3d\x1a\x30\x39\x41\x64\x51\xcd\xca\xc2\x92\x07\x01\x98\xb7\x74\xb8\x81\x2c\xd6\xd3\x86\x70\x64\x4f\x47\x93\x65\xb6\x4b\xd0\x42\xc4\xea\x1d\x3b\x73\xa5\xeb\x5d\xd1\xf9\x03\x9f\x0c\xd0\xf8\x2e\x84\xb6\xc0\x41\x5d\x6a\xcf\xec\x25\x53\xce\x9a\x78\xe2\xea\x85\x03\xfa\x99\x6c\xcf\xc5\x85\xf4\x5b\x74\x61\xf8\xd9\x9e\xe6\x33\x31\x17\x05\xcf\xa2\x99\xb8\x51\x2b\x7b\x2f\x08\xf5\x5a\xe5\x2e\xb5\xca\x47\x6a\x8b\x74\xf7\x4e\xd5\xed\x66\xb7\xe9\x6a\x6b\x2a\x07\x0f\xc1\x80\xfe\x1a\x97\x9a\xe5\x3a\xaf\x32\x4e\xe9\x26\x42\xdd\xca\x42\x2b\xf0\x52\xde\xf2\x42\xda\x8b\x83\x14\x14\x10\xc9\xaf\xa8\xc8\x36\xb8\x27\xc8\x94\x4a\x38\x0d\xbe\xcf\x67\x26\x60\x5b\x8e\xf1\xd0\x79\x77\x04\x72\x88\x57\x26\xe7\xb2\x30\x56\x51\x8d\x7e\xb6\x03\xd2\xed\x46\x2c\x4c\x8a\x8d\x2a\xb7\x06\x07\xb6\x64\xfd\x56\x8a\xbb\xc3\x3b\x5d\xdc\x48\x35\x1d\xda\x35\x18\x92\xe2\x75\x08\x38\x52\x87\x5f\xc1\x7f\x62\x87\xdd\xa5\xdc\xb4\x25\xa9\x2c\xd8\xdd\x4c\x50\x64\x5f\x48\x55\x9d\x93\x04\x05\xc6\x98\xeb\x6f\x3b\x23\x2f\xf5\xfb\x0f\xb1\xb8\x84\xcd\x47\xcf\x40\xab\x81\xc1\x1f\x10\xcb\x77\x81\x02\x05\x67\x65\x93\xad\xe0\x46\x2c\x56\x2d\x05\x60\xcb\x8b\xa1\x7b\xd8\x2f\x94\x9a\xce\x64\x3c\x47\xeb\x4b\xdb\x5c\x5d\x30\x4b\xb4\xbd\x4c\xb3\xfb\x7d\xde\x64\x41\x6a\x34\x74\x99\x6c\xc4\x9f\x02\x97\x70\x68\x36\xf2\x83\xef\x0d\x46\x9f\x92\x9e\xb4\xa9\xc4\x13\x46\x73\x2f\x6d\xe2\x8e\x0c\x46\x4e\xdf\xee\x4d\x45\x7d\x29\xbf\x47\xd9\x83\xdc\x41\xda\xb5\x25\xe8\x5c\xa7\x02\xff\xd8\x42\x4e\x5a\x7e\x69\xa9\x74\x51\x33\x79\xb7\x0e\xb9\x0e\x85\x29\x8e\xd9\x07\x10\xc6\x41\x67\xda\x99\xe5\xcf\x9b\x6e\xf3\x56\xd8\x71\xc4\xae\x1c\x38\x08\x72\xd2\xca\xf1\x13\xff\x88\x32\xd8\xe5\x16\xab\x97\x71\xa9\x05\x4b\x45\x92\x71\xab\xe5\x61\x3a\xb5\xe5\x47\x4d\x86\x6a\xd5\xd2\x40\xd3\xd3\x45\x21\x4c\x0e\x41\x1f\x44\x34\x1b\x5d\x3a\xb5\xdd\x94\x45\x05\x47\x6c\x29\xfd\xd8\x4d\xd1\xea\x90\x3c\xcb\x58\xc2\x4d\x43\xb6\xeb\xc4\xf1\x89\xa4\x79\xc5\x40\xad\x8a\x01\x8d\x51\x2f\xe7\x40\x6f\x37\x88\x16\x04\x51\x0f\x2e\x1a\x1d\x4e\x03\x57\x74\xb7\x63\x72\x24\xb2\x95\x87\xbe\x6f\x36\x58\x19\xdf\xf2\xf3\x2d\x46\x39\xd1\xc5\x58\xa6\xa9\x80\xda\x2e\x70\x8c\xad\x94\x33\x08\xe1\xae\xd2\xfa\xd1\x32\x92\x7a\x3d\x87\x4a\x46\x18\xc5\x87\xb3\x93\x95\xb1\x7e\xa8\xab\x80\x7c\xbc\xf1\x3d\x48\xdc\xba\x28\xf4\xff\x60\xa2\xd1\xfa\x3c\x66\x9e\x2f\x69\x5d\x52\x41\x4c\x5e\x8e\xef\x7b\xa4\xfe\xc7\xa8\x58\x63\xc1\x88\x63\xd2\x81\x5a\xe9\xdd\x92\x27\x08\xf6\x64\x95\x71\x0c\x38\xb4\x55\x05\x3d\x52\x6c\xab\x6d\x8d\x90\xb9\x03\x56\xa9\x4c\x18\xa2\x85\x20\x64\x88\x0c\x63\x59\xa1\x60\x05\x6a\x90\x29\x1a\xc1\x7c\x7a\xfb\x9c\xe7\x39\xc0\x77\xea\x09\x7e\x09\x60\x0f\xca\x99\x19\xb1\x73\x5d\xfa\xd2\x4a\x68\xc1\xc1\x80\xbf\x84\x67\x3e\x28\x77\x22\xa7\x73\x9e\xfb\xf2\x08\x48\x50\xed\x17\x5c\x1c\x91\x4b\xf6\x98\xb7\x10\xd7\x26\xa5\x6c\x13\x99\x1a\xd1\xa7\x03\x26\xc8\xee\x18\xa8\xa8\x91\x15\x5a\x47\x30\xeb\xfd\x70\x1b\x00\xfb\x1d\x04\x32\x02\xa3\x80\xd5\xbd\x9b\x69\x43\x08\x20\x74\x0f\x2c\x39\xb6\x67\x97\xce\x40\xa3\x40\x02\x18\xcf\x82\xb1\x3a\x29\x4f\xa4\xb8\xbe\x6b\xbe\xec\xdf\xc2\x1d\xc0\xfb\x51\xa9\x95\xb7\x49\x40\xa2\xb3\x04\x1f\x44\x75\x50\x9a\xa0\x0f\xe4\x1c\x50\xb1\xa0\x74\x6d\x57\x6c\x84\x8d\x22\x4b\x46\x94\x15\x2d\x0d\x06\x92\xd1\x81\x92\x04\x52\x58\xdc\x88\xd4\x23\x55\x8c\xd8\x85\x1d\xa4\x57\x93\x0a\x91\x71\xc0\xd0\x70\x62\xb9\xfd\xac\xb3\xcb\xdb\x8f\x3c\x1b\x8d\x9e\x61\x4a\x97\x2e\x98\x29\x79\x41\xe0\x28\xf6\xf7\x5d\x08\xbd\xff\x10\x8b\x2b\x0d\xd5\x3e\x7e\xff\xb2\x35\x53\xf3\x20\xd5\x34\x2a\xdf\xd5\x6b\xb6\x49\x5e\xeb\x0c\x57\xdd\x4a\x49\x9f\x82\x7e\x7e\x82\x54\xb3\x9e\xf7\x8e\xd3\x0c\x96\x8b\xdb\x00\x5d\x8d\x57\xae\xa8\xc3\xcb\xe7\x00\xea\x2c\x31\xc2\xbc\x32\x00\x13\x95\x00\x9a\x54\x4a\x4b\x36\xf6\x40\xe9\x61\xc6\x01\x12\x56\x57\x8e\xf2\x39\x0c\xf3\xf9\xf7\xdf\x7f\xdf\x44\x63\x79\xfe\xdd\x37\xdf\x8c\xd8\x89\x2c\xc0\x6c\x25\xc9\x0a\x49\xab\x0e\x57\xdd\x39\xdf\xf8\x64\x82\xc4\x0e\x12\x16\x2c\x9d\xc2\x30\x7c\x92\x14\xe6\x72\x3a\x2b\x29\x89\xc3\x72\x95\x4c\x26\x44\x1d\xb0\x7e\x12\x5e\x1a\xe7\xd0\x83\xbe\xea\x7d\x9c\x43\x45\x96\x4c\xde\x08\x36\x31\x3f\x16\xba\xca\x91\x72\xe2\x25\x07\x38\x16\xf2\x58\x60\x67\xf5\x9a\x98\x86\x33\x6d\x5d\x4d\xb8\x9e\x31\xf5\x8c\xa9\x67\x4c\x9f\x16\x63\xc2\x84\xb0\xb5\xcc\xc8\x95\x64\xe1\x79\x9e\xb9\x54\x6b\x9f\x4a\xb6\x8a\x57\x5d\x54\xca\x51\x30\xde\xa5\x4a\x82\x8a\xd6\x44\xe0\xc5\x34\x86\x47\x58\x4c\x01\x03\xca\x2b\xe8\x42\x95\xc5\x02\x8c\x62\x54\x0a\x56\x27\x37\xa2\x60\x72\xce\xa7\xe2\x99\x61\xc7\x6f\x41\xed\x82\x5c\x1b\x39\xf1\x22\x78\x88\xd1\x36\x62\x3f\x93\x1f\x26\x84\xf2\xfa\xb7\xfd\x9f\x8f\xde\xff\x7a\x7e\xf4\xf6\xf4\x00\xc8\xaf\x00\x74\x63\x91\x06\xcc\xd1\x2f\xc1\xb3\x86\x5b\x87\x2e\xac\x73\xee\x04\xfe\x63\xab\xdc\x66\xb7\x8e\x6a\xd4\x96\x15\xba\x41\x52\xe5\x55\xe9\xec\x88\x8e\x8e\x54\x2a\x99\x71\x35\x15\xe4\xa0\x0f\x87\x65\x16\xaa\xe4\xf7\x8e\x2a\x0b\x93\xf0\xdc\xb1\x58\xce\x52\x5d\xd9\x8f\xff\xdb\xbf\x0d\x98\x14\xaf\xd8\xbf\x05\x2f\x8e\xd8\x29\xb5\x0d\xe6\x8b\x94\x47\xdc\x8a\x02\x3a\xa3\xd9\x0e\x58\x21\xa6\xbc\x48\x81\x4e\xe8\x49\xe3\xec\xfa\x09\x42\xc2\xa1\xb1\x27\x58\xe9\x32\x6a\x7b\xec\x76\x03\x4b\x6e\x6e\xcc\xa1\x54\xf6\x88\x0c\xad\x82\x3c\x0c\x0e\x1c\x92\x07\x31\x4c\xf4\x7c\xce\x55\x3a\xe4\x74\x10\x86\x7e\x17\x0e\xbf\x22\x78\xac\x21\xf7\xad\xa4\x1a\xf2\xa1\x99\x89\x2c\xdb\x0a\xc5\x82\x5e\x5f\x3d\x7e\xa7\xfe\xb4\x31\xe8\x06\xd4\x3b\x26\xee\x45\x52\x39\xf1\x06\x4e\x3d\x7c\x32\x7a\x20\x4f\xcf\xaf\xde\xff\xe7\xc5\xbb\xb3\xf3\xab\xfe\x5c\xf6\xe7\x72\xcb\x73\x29\xd4\x6d\x7b\xe8\x6c\xdc\xa1\x0d\x9e\x47\x2f\x18\x04\x09\xc0\xab\xcb\xb1\x03\x26\x7d\xaa\x6e\x7f\xe6\x45\x87\x9c\x07\xb2\xfa\x76\xcc\x79\x10\xea\xf6\x75\xa1\xe7\xed\x73\x27\xff\x51\xc3\xc9\x1f\x5f\x8f\xd5\x85\xf0\x71\x4f\xc4\x6e\x83\x5b\x8c\x86\x98\xb9\x97\xe7\x8f\x7f\x3d\x3b\x39\x3d\xbf\x3a\x7b\x7d\x76\xfa\x7e\xc4\x8e\xb2\x8c\x49\x05\xe1\x4c\x4d\xd9\xaf\x10\x94\x57\xcc\x21\x5c\x07\xaa\x32\x06\xf5\xe2\x3d\xe7\xb4\xf2\x9c\x15\x94\x40\x82\xff\xc5\x3e\x47\x39\x8f\x0e\xae\x54\x75\xfd\x34\x9a\xe0\xa0\x16\x44\x43\xe0\x50\x1f\x91\x05\xd5\xe6\xbd\xfd\x28\xcb\x58\xc9\x6f\x40\x92\x4c\x84\x95\x14\x84\x8f\x14\x73\x73\x45\x1c\xd8\x53\x75\xeb\xef\x67\x85\x47\x1b\xa5\xe0\x78\x1f\x4f\x75\x74\xec\x1e\x93\x6e\x8c\x81\x5d\xd1\x2c\xbb\x93\x80\xa0\x52\xc5\xec\x2d\x25\xbc\x1a\x3e\xf1\x10\x7a\x31\x2d\x30\xa2\x60\x9f\xcb\x32\x7d\xc7\x66\x72\x6a\xc9\x4b\x26\x6e\x45\xe6\xfc\x1e\x81\xfa\x59\x6a\x6f\xa1\xd3\x05\xc4\xc9\x15\x32\x6d\xec\x34\x7e\x46\x2a\x66\x85\xca\x4c\x73\x54\x2e\x10\xcf\xd9\xa0\xd6\x75\x22\xf2\x4c\x2f\xe6\x54\x99\x2a\x65\x97\x25\x2f\xc5\xa4\xca\x2e\x45\x19\xb7\x33\x43\xa7\x17\x55\x96\x5d\xe8\x4c\x26\x11\x7f\xc8\x19\x2c\x51\x5e\x65\x19\xcb\xa1\xc9\x88\xbd\x53\x20\x20\x1f\x65\x77\x7c\x61\x06\xec\xdc\x12\xd6\x01\x3b\x9b\x9c\xeb\xf2\xc2\xe9\x1b\xa1\x6e\x8a\x0d\x2d\x8b\x7a\x45\xfe\xe3\x92\x4f\x1b\x8a\x08\xe4\x04\x86\x1d\xa0\x7e\x78\x27\x4d\xf4\xa4\x3c\x7a\xaf\xbe\x82\x9e\x2c\x39\xc5\xbf\x63\x2b\x93\xc9\x89\x48\x16\x49\x2c\x24\xf0\x28\x09\x74\x60\xb0\xc6\xd7\xdb\x48\xe0\x00\xe4\x51\x87\x63\x2f\x15\x43\x97\x90\x11\x14\x2e\x4d\x3b\xea\x3f\x81\xd7\xdb\xb4\xdc\x8a\xce\x89\xe4\x7e\xc4\x30\xfc\x5b\xa1\x84\x31\x17\x85\x1e\x47\xa6\x70\x21\x0a\xa9\x53\x04\x55\x1d\xbb\xa4\x4a\x3f\x2c\x7c\x15\x2c\x28\xf4\x5b\x4d\x96\x80\xda\x38\x89\x43\xd0\xfb\x13\x2e\xb3\xe8\xf0\xb7\xdd\x2a\x77\xb4\xcd\x61\xae\xf1\x7f\x86\x7e\x95\xbe\xf2\x43\x1c\xc2\x57\x3b\x44\xe4\x07\x05\x59\xed\x32\x74\x52\xfa\xea\x85\xa8\x15\x65\xd0\xf4\x4f\xce\x2f\x7f\x7d\x73\xf4\xc3\xe9\x1b\x0a\xb7\x0d\xae\x26\x69\x29\x48\xe6\x67\xdc\xaa\xb8\x0e\x63\x1c\x8c\x02\xfb\xfe\xdd\x83\xf5\xa4\xaf\x3e\x7f\x96\xfc\xaf\x49\x72\x81\xc7\xf6\x38\x89\xfb\x5c\x1b\x51\xfb\xf7\x03\xae\x74\x6a\x1f\x61\x88\x0a\x98\xbd\x00\x8d\x61\x2a\x6f\x5d\x6e\x3a\x1e\xd5\x3a\x4a\x36\x92\x42\x6c\xdb\x29\x51\xda\x6d\x71\x40\x07\x70\xf4\x03\x1c\x10\x2b\x80\x9a\x01\x1b\x57\x68\xa7\x2b\xe4\x9c\x17\x12\x01\x2c\x5c\x67\x3c\x43\x21\x17\x17\x74\xb1\x3c\xa4\x93\x77\xa7\x97\xec\xfc\xdd\x95\x65\x10\xb7\xc2\x01\xed\xc1\x73\x98\xd6\x58\xd8\x37\x70\xa2\xe9\x88\x1d\xa9\x05\x3e\xf4\xe6\x0b\x30\x7f\x40\x30\x0e\x95\xdc\x73\x94\xf4\x7a\xef\xf9\x08\xfe\xef\x7a\xcf\xce\xb3\x00\x53\x85\x32\x96\xb0\x86\x33\x70\xa7\x9b\x27\x89\x30\x46\x5a\xc1\xcf\xaf\x27\xcd\xfe\x89\x38\x96\xbf\x61\x17\xba\x28\x57\x64\x1e\x3b\xaf\xe1\x9c\xe7\x56\xe0\x01\xfd\x3c\x69\x34\x07\x75\xb7\xd4\x89\xce\xac\xea\xbb\xfa\x26\x0d\x6e\x0e\x41\x03\x1b\x84\xa9\xe5\x9e\x3b\x4a\x55\x85\xe0\xa9\x7c\x20\x9d\x31\x54\x2c\xd1\xf7\x11\x27\x38\x08\x08\x0c\xfb\xe1\xde\x70\x31\x2c\xe6\x73\xa5\x42\x75\xb4\x52\x34\x81\xbc\x2a\x05\x73\x4e\xe8\xc0\xf3\xed\x2c\xb6\x6b\x25\xf0\x07\x30\xc7\x3a\x2c\xe1\x10\x39\x99\xd5\x31\xec\x20\x86\x7e\x9c\x81\x2a\xb2\xc5\x7c\xdd\x1c\x08\x7b\x12\xe4\x12\xc2\x63\xa9\x0a\x59\x2e\xec\x76\x8b\xfb\x48\x45\xb3\x4b\x6a\x10\x98\x9b\xa1\x58\xa6\xe3\xab\xce\x3c\xb4\xf5\x6c\x51\x86\x39\x74\x03\x80\x69\x89\xfb\xf2\x70\x2b\x35\xce\x2d\x99\x18\xda\x93\x51\xaf\xcc\x4a\xaf\xdb\x01\x5c\x35\x96\x04\xb1\x19\x8a\xb2\xca\x5b\x6e\xd6\x65\xf0\x94\x49\x85\xa5\x8f\x03\x99\xe4\x42\xa7\x6c\xc6\x0d\x33\x15\x10\xb5\x49\x95\x01\x4d\x96\xa5\xe4\x99\xfc\x8d\x30\xeb\x03\x09\x4c\x69\x32\xca\xe3\xa9\x26\xc3\x00\x19\x25\x2a\x55\xca\xcc\x1d\x3e\xc4\xdb\x6f\xf6\x4c\x08\xf8\xc0\x00\xfc\x55\x1c\xf8\x81\xac\x88\x0f\x03\xf6\x3f\x80\x18\xe5\x6f\x70\x43\x5e\x81\xd7\xd1\x2c\x60\xbf\x88\x46\x00\x87\x75\x43\xb6\x0d\x96\xca\x09\x5a\x67\xe9\x93\x01\x34\x0f\x2d\xc1\x58\x4c\x25\x82\x9d\x03\x66\xc8\x85\x4e\x9f\x99\x5a\xe8\x1a\xa0\x3a\x25\x4b\xf2\x79\x80\xac\xc6\x59\xa6\xa1\x7c\x27\x56\xbc\x00\x29\x1b\x32\x33\x74\xc1\xee\x78\x31\xb7\x6c\x83\x27\x33\x48\xc2\xe0\xca\xa5\xa3\x40\x69\xcd\xc5\xd0\x58\x69\xdb\x81\x3f\x69\x55\x0f\x7f\xf9\x8a\xfa\x3c\x0c\x36\x0e\xaa\xc8\x85\x79\x18\x76\xf8\x8d\x1d\x76\x6d\x26\x19\x9f\x7e\x7a\xf4\xcc\x94\xa9\x8c\x04\xda\xfc\xe2\x4d\x2a\x21\xd5\xf2\xa5\xfc\x33\x28\x34\x62\x17\x7d\x5c\xd9\xbd\x44\x3c\x7e\xdb\xd5\x8a\x8a\x6d\x6f\x3c\x66\xb5\x9c\x35\x2d\x5d\x46\x94\x03\xe0\x20\x14\xe2\xd8\xf2\x3a\x1c\x40\x8e\x8a\x08\x79\xa2\xa4\x62\xa7\xef\x5e\xd7\x88\x38\x56\x7b\xe3\x99\x69\x49\x6e\x81\x7e\xdf\xa9\x58\xa0\xd3\x2f\x81\xe1\x68\x65\xc0\x3e\xb6\x36\xd3\x94\x35\x85\x23\x4c\x66\x5c\x29\x91\x31\x3e\x29\xad\x00\x59\xc2\x5d\x1d\x0b\xa1\xec\xf9\x71\x5a\xb5\x37\x9a\x97\x25\x4f\x66\xa4\xdf\xd3\x0c\x0d\x24\x03\x05\x3d\x9a\xb2\x10\x7c\xee\x52\x08\xe6\x5c\x62\x57\x8c\x27\x85\x36\xa6\x36\x03\x60\x67\x0e\x80\xc8\x20\x1d\x70\xb3\x63\xe8\x10\xac\x73\x8d\xfc\xd7\x68\x58\x0d\xb3\x3d\x5c\xe6\x81\x47\x46\xf5\x64\x42\xb0\x89\x2c\x4c\xe9\xc2\x4b\xf1\x8b\x64\x48\xb2\xfd\x79\xaf\xa0\xa2\x91\x1a\x1a\xaa\x4a\x41\x06\xcb\x4b\x83\xb7\xae\xee\x90\xba\x4a\xa5\x21\x31\xd4\x0c\xec\x35\x47\x11\x10\x17\xda\x8d\x14\x96\xda\x55\x18\xc4\xde\xe9\xa7\xa0\xbb\xd0\x80\xe2\xa9\x52\x7d\xba\xec\x35\xf3\x27\x62\xd0\x10\x16\x29\xe1\xcc\xd1\xda\x95\xb3\x17\x58\x1b\x0b\x91\x08\xf4\x77\xc5\x8f\x5a\xf4\xa4\x61\xa5\x16\xa0\x20\x04\x06\x74\xb1\x01\x10\xf9\x02\xfc\xbb\x7e\x31\x9c\x37\xb6\xd4\xc1\x2f\xa1\x41\x37\xf8\x02\x23\x20\x22\x4f\xa1\xef\x0a\x59\x96\x02\xd6\xd1\x61\x2b\x7b\xe7\x63\xd8\x47\x0d\x84\x37\x62\x0e\xb3\x28\x78\x57\xaa\x52\x80\x49\x19\xd1\xeb\xc6\x85\x14\x13\x36\x91\x56\xc9\x40\xc8\xa1\x81\x65\x1f\x33\xb2\x6e\x71\x63\x44\x01\xc3\xb1\x84\x1f\x6a\xf1\x63\x97\x23\xf6\x0b\x8d\xab\x2c\x2a\x85\xd5\x8f\x89\x3a\x42\x91\x64\x39\x61\x53\xf0\xa1\x13\xe8\xf3\x37\xcf\xff\xfa\x1d\xa4\x2c\x1a\xb4\xc9\x95\xba\xe4\x99\x9f\x63\x26\xd4\xd4\xae\x14\x5e\x08\x08\x22\xf4\x96\x01\xbf\x00\x99\x9c\x4b\xca\x99\x7b\xf1\xf2\x66\xdc\x34\x65\x1c\xa6\xe2\xf6\x30\x58\xbe\x61\xa6\xa7\x5d\x15\xba\xc8\xbe\xb6\xd9\x5c\x88\x9b\xb3\x99\xbe\xc3\x88\x8c\xc8\x86\x11\x5d\xb1\x8c\xcf\x85\x46\x8c\xb0\x08\x39\xcc\xc4\xe5\x68\x36\x82\x3b\xa2\x27\x6b\x25\xab\xa9\x71\xbf\xcb\xca\xf8\x4f\x6a\xc5\xc6\xba\x9c\x39\xc6\x0f\x37\x8c\x36\x6c\xc4\x5e\xf3\x2c\x1b\xf3\xe4\xe6\x4a\xbf\xd1\x53\xf3\x4e\x9d\x82\x7b\xb8\x31\x16\xb0\x2c\x26\xb3\x4a\xdd\x2c\x19\x1c\xf4\x94\xe9\xaa\xcc\xad\x06\x39\x69\x9d\xf0\x84\xf0\xa8\x91\xd4\xb8\xb0\x82\xba\x17\x71\x2f\xbd\x1d\x93\x13\x70\x17\x9e\x82\xb0\x7f\x13\x6e\xf0\xcb\xe7\xdf\x60\x86\x2b\x58\xf8\xff\xf2\x9c\x65\x56\x0f\x19\xe0\xb5\x11\x54\x74\xca\xcc\x79\x46\x15\xb8\xeb\x83\x60\x17\xba\xf3\xc6\x97\x91\x3d\xee\xcc\x1a\xaf\xae\xfe\x13\xf8\xa2\x2c\x8d\xc8\x26\x03\x04\xd9\xf4\x95\x53\x9f\x01\xcd\x79\x46\xd7\xcc\x92\xec\xae\x0c\x0d\x1d\xfa\x27\xc2\x2a\x54\x11\x35\xa4\xf1\x78\x39\x47\x62\x9c\xe9\xe4\x86\xa5\xf4\x10\xbf\x0d\xe2\x19\xdd\xcd\x5a\x41\xd9\x81\x8a\xfc\x73\x30\x92\x0e\x5e\x01\x1c\x15\x90\xcc\xce\x5a\xec\x6d\x00\x3f\x19\xd1\x61\x75\xea\x23\x88\x1c\x26\xe8\x66\xa2\xf8\x24\xe6\x82\x00\x27\xb3\xc3\x52\xc0\x48\xb7\x5b\x09\x8a\x57\x38\x91\x71\x50\x3c\x3f\x53\x6a\xc7\x52\x8a\x38\x5a\xd4\x99\xca\xcd\xb8\x96\x15\x81\xe8\x99\xf1\xd6\x19\xef\x07\x34\xb6\x35\xf2\x2a\x1f\x7f\xe4\x95\xac\x74\x55\x9a\x03\xab\x6d\xb7\xeb\xd7\x3d\xbd\xa2\x61\xfe\x88\x34\x69\x3a\x17\xda\x9a\xfc\xcc\x8b\xf8\xb3\xda\x3a\x1b\x7d\x8c\xa2\x74\xf4\x51\x54\x8b\x8e\xb6\x5c\x56\x22\xa3\x8d\x1a\xf7\x69\x4d\x0b\x3c\x65\x9b\x82\x3e\xce\x9c\x83\xa5\x2d\xf2\xe3\x04\xfe\x1a\x37\x0d\x6e\xe8\x96\xe9\x90\xe0\xb1\x1a\xd3\x81\x3f\xc7\xb3\x0d\x2c\xfd\x71\x22\x8f\x15\x42\xc0\x77\x21\x0d\x03\xa8\xc1\x11\x13\xa3\xe9\x88\xfd\xd7\x35\xcc\x67\x9a\x14\x76\x4e\xb3\x45\x2e\x0a\x7b\x33\x5e\xdd\xbe\x18\x3d\x1f\x7d\x8f\x50\x85\xe8\x6f\x9f\x55\x63\xdb\x64\xaa\xf5\x34\x13\xbf\x06\x4e\x84\xd5\x97\xfe\x7b\x2b\x17\xac\x91\xbf\x89\x1f\x16\xd1\x5a\x68\x96\x5d\xd9\xc7\xce\x18\x4d\x53\x50\x24\xd4\x6c\x0a\x91\xfb\xee\x9b\xad\x83\xf3\x83\x63\xbf\x3e\xf1\xa7\x6e\x18\xa2\xae\x72\x6f\x1e\x06\x93\x2c\xfa\x3c\x51\x6b\x89\x71\x81\xe8\x4e\x37\x6d\x8f\xd1\xb2\xe8\x8d\x41\x2e\xed\x7c\x35\x1f\x8b\xc2\xd9\xc4\x03\x93\x38\xd9\x82\x73\x50\xfb\xcf\x2e\x9c\x01\xd8\x05\x3a\x86\x11\x96\x32\xc5\x97\x15\xf4\x35\x60\xcf\x09\x63\x95\xdd\xbb\x7f\x7c\xf7\xed\xb7\x5f\x7f\xd7\x31\x44\x71\xa6\x4d\x79\x76\x11\xe3\xf9\xbc\x44\x80\xe8\xb3\x8b\xba\x28\xff\x4c\xd4\x35\x34\x69\x06\x51\x31\xc2\xbe\xf8\xb0\x15\xb0\x6f\xae\xc6\x1c\x3e\x74\x0d\x6c\x47\x3f\x69\x53\x9e\xd3\xbe\x37\x1d\x79\x75\xbf\x73\xcb\x64\x58\xe3\xe0\x8c\xd8\x5b\x6d\xca\x50\xea\xa6\x12\x39\x4a\x58\x81\x6c\x26\x37\x9f\x70\x5c\xe1\xb8\x17\x67\xdd\x0c\x15\x3b\x3b\x3a\x3f\xfa\xf5\xf2\xe7\x63\x08\x14\xa1\xb8\x49\xf0\xd0\x84\x91\xb2\x3a\x25\xe7\x8e\xfd\x42\x1a\x9c\xe9\x35\xde\x9d\x11\x03\xf7\x91\x4b\x5e\xc3\x3d\xb0\x5b\x4d\x86\x2b\x88\x44\x71\x48\xde\x0b\x67\xc4\x8e\xfb\x63\xbd\x41\x7f\x55\x0a\xa1\x27\x04\xbd\x54\x04\x41\xc2\x1f\x4e\x2e\x06\xec\xea\xf8\x02\xdc\xa8\x97\xc7\x57\x17\x4d\x59\xf5\x7a\xef\xea\xf8\x22\x0a\xb4\xfa\x20\x52\x01\x3e\xe5\x4e\xb4\x02\x5a\x12\x86\x94\x5d\x41\x72\xad\x90\x99\x6c\x12\xda\xb1\x01\x10\x5c\xa3\x63\x59\x96\x56\xe5\xb0\x87\xd0\xb8\xf2\x9b\x01\xde\x39\x88\x19\xca\x11\xc8\xf9\xca\xf1\xab\x9d\x3f\xb6\x95\x34\xac\x39\x9c\x5f\xb8\x2c\x3b\x85\x75\x53\xc0\x4d\x8c\xa1\x95\x5c\x66\xc6\x63\xec\xae\x14\x54\xdc\xc2\x80\xd6\x1c\xdb\x7b\xfa\x64\xa0\x2c\x8a\x48\x00\xd9\xf2\x00\xea\xb6\x3b\x18\xc3\x55\xfd\x61\x2b\x0e\xe2\x6a\x6d\x1e\x03\x35\xdc\xc1\x00\x68\x83\xb6\x97\xdc\x1a\x4b\xd8\xe1\x08\x07\x33\xed\xd0\xda\x0d\x6b\x93\x3c\xd4\x18\x45\xe7\x4b\x42\x2f\x10\xc8\x00\xfd\xe1\xef\x09\x5f\xcf\x4a\x9b\xe7\x96\x4c\x59\x47\x11\x3e\x71\x25\xe7\xa2\x69\x27\x0a\x0c\xa4\xdc\xa0\x7e\xbe\x5f\x88\xe1\x01\x75\xf2\xa8\x14\x67\xfb\xb5\x47\x40\xbc\xc0\xeb\x9d\x56\xfb\xaa\x71\x57\xba\x2d\x78\xfd\x0e\xae\x79\x70\x87\xba\x2e\x7b\x28\xc1\x88\x7b\x59\x1e\xeb\x34\x12\x82\xec\xbb\x88\x01\xf9\x87\x1a\xd5\xd9\x89\xd3\x73\x90\xdd\xb1\x67\x28\x85\xbe\x3a\x3c\x44\xf6\xeb\x7b\xfa\x55\xa6\x08\x0b\xff\x2c\xc6\x41\xfc\x50\x56\x03\x4f\xef\x65\xe9\x4c\x3a\xde\xbd\x0d\x7b\x1e\x9a\x5b\x96\xa3\x20\xba\x31\x64\x7b\x36\xcc\x6c\xfb\x63\xd7\xf8\xfc\x4e\x0e\x5c\x07\x6c\x75\x8c\xfb\x74\xa1\xae\x5b\xac\x40\xa3\x4a\x86\x89\xa5\x16\xef\x83\xa5\xf3\x80\xe1\xf3\x07\x2d\x73\x00\xce\x2e\xa7\xf1\x2c\x00\xf8\x7d\xe7\x7b\xd8\x99\x72\xe4\x85\xb8\x95\xba\x32\xe4\x1f\x8c\x7d\x91\x7d\x56\x14\xe4\x97\x9a\xcd\x75\x23\x1f\xf4\x02\xd2\x0e\xc7\xfb\x1e\x46\xaf\xb7\x38\xad\x77\xb3\xc5\xaa\xf3\xc2\x8a\xcf\x0b\x51\x3a\xae\xd1\x92\x11\xdf\xe9\xb4\x3e\xa0\xef\x07\x4b\x90\x9b\x50\xf4\x1b\x4d\x6b\x74\x89\x94\xe4\x0e\x0f\xe0\x5c\x15\xe0\x02\x36\x41\xbd\x82\x46\x84\x44\x97\xbc\x11\x0c\x63\x59\xc0\x7f\xe1\xdc\x1e\x83\xe9\xc3\x45\x8f\xd2\x7f\x63\xa5\x84\x9e\x94\xba\xb7\x07\x6c\xc6\xed\x06\x68\x2b\x58\xf5\x6e\xd1\xe6\x3d\x3a\x6a\xb2\x75\x38\xb1\xc9\x9f\xe1\x83\x15\xc2\xf0\x8c\xcc\x32\xd1\xc9\x59\x42\xe6\xd5\x8b\x75\x02\xe7\x72\x97\x2b\x14\xd0\x63\x7d\x6f\x13\x40\xb9\xa4\xe2\xb4\xea\x99\x4b\xf6\x83\x87\xc7\x05\x76\xf5\x20\xe0\xf1\x6c\xc9\x06\x83\x64\xcf\xa8\x0b\x7a\xc6\x8d\x2b\x90\x8f\xe8\x3e\x14\x67\x85\x01\x13\x71\xb7\x40\xe3\x06\x44\x8f\x99\xf2\xd6\x86\x52\xce\x85\x89\x7c\x13\xdc\xd8\x41\xa8\x07\x5d\xd2\x6c\x41\x35\x78\x88\xd4\xd4\x1d\xa5\x82\xa7\xa1\x55\x00\xb4\x67\x58\x2e\x47\x81\xa8\x4b\x88\x05\x8b\xe1\x21\x24\x3c\x4b\x28\x3f\x18\xd8\xe2\x52\x8f\x23\xf6\x03\x9c\x1a\x6d\x44\xf8\x1d\x5e\x08\x66\x2a\xc4\x50\x2a\x35\x9b\xf2\x62\x6c\xaf\x50\x5d\x12\x97\x6c\x45\x18\x2c\x0f\xe6\xea\xa9\xb0\x7a\x7d\x9e\x23\xd8\xe6\xb7\x56\xa1\xff\xf1\xb8\xa3\xd5\xc2\xf1\xc4\xc7\x6e\x24\x05\x06\xd1\x36\xb2\xb3\x3a\xa8\x07\xf2\xaf\xd1\x65\x3d\x16\x89\x86\xed\x29\x2a\x41\x51\x06\xa6\x11\x32\x64\x10\x26\x36\x15\x85\x15\x7a\x7d\x2c\xcf\x88\xbd\x17\x46\x84\xb5\xbd\xe2\x59\x07\xc1\xfe\xea\x82\xc9\x89\xc3\xc4\x65\x99\x36\xc2\x10\x33\x2c\xc5\x3c\xd7\x05\xc4\x83\x8e\xd8\x99\x71\x11\x18\x30\x26\xe8\x56\xe9\x95\x51\x51\x5a\x41\x5b\x18\xc6\x03\xa8\x83\x63\x12\x3b\x21\x0a\x0f\x52\x4b\xdb\xc4\x90\x13\x2e\xe6\x5a\x9d\x52\x38\xe3\x5a\x33\x7a\xa3\x65\xcd\x10\x63\x55\x7f\xc8\xfe\x8a\xaf\xf8\x60\xc9\x4d\xac\x30\x6e\x7c\x8d\x5b\x1c\x2f\x6a\x43\xa1\xa3\xf0\x53\x79\x2b\xa2\x1f\xdb\x4d\x0d\xa9\x13\x7d\xa7\xee\x78\x91\x1e\x5d\x9c\x75\x03\x92\x09\x2a\x21\xa6\xf4\x2e\x3b\xba\x38\x83\x05\x43\x1b\x1a\x75\x03\x15\xe8\xe2\x08\x33\x9b\x81\x57\xd2\x7a\x58\x4f\x0e\xbd\xe2\xd0\xea\x6a\xc0\xc1\x60\x51\xd0\x67\x03\x1e\xc8\x1d\xf8\x19\x57\x3a\x86\x92\xd1\xbf\x77\x3d\xfc\xf1\xd7\xdb\xee\x40\xb4\xf1\xba\xab\x10\x7b\x21\xf4\x49\x2c\xc1\x8f\x21\xca\x42\x1d\x17\x13\x60\x37\xba\xb0\x52\x48\xdb\xd9\x70\x3f\xa0\x2c\xf9\x6a\x31\x49\xfb\x66\xb4\xb2\x60\x5d\x70\xbd\x46\x0a\x6d\xa0\x0e\xe4\x3a\x7d\xc5\x00\x06\x1a\x84\x00\xac\x59\x37\x60\x80\x3c\x61\x06\x98\x38\xc0\x55\xca\x6a\xb8\x2c\xe4\x57\x54\x71\x72\x1b\x22\x86\x78\xb9\xaf\xed\xd7\x3d\xb4\xa9\xd5\x94\x1f\x80\x59\x41\x30\xe9\x99\x18\x34\xdd\x07\x2d\x20\x15\x71\xaf\x30\x5d\x95\x00\x3a\xa3\xe1\x0c\xfe\x5c\xb0\x28\xe2\x95\xea\xeb\x8d\x87\xf0\x1a\x69\x18\x7d\x94\xd0\x0f\x00\xe0\x20\x84\x64\x73\xd1\x5a\x63\xe1\x10\x41\xc8\xb6\x4f\xa2\x21\x1f\x1b\x9d\x55\x56\xb7\x2c\xe2\x70\x09\xb5\x2b\xa0\x2a\x27\xc3\xbf\x30\xa1\x12\x9d\xba\xb4\x5a\x0c\xc5\xb3\x24\xa0\x86\x35\x08\x47\xe2\xb1\xd9\x97\x00\x17\xd6\x41\xab\xbd\x6e\x3d\xf5\xf5\x59\xf7\x48\x95\xcb\x2a\x00\x1d\x7a\x1f\x5b\x8e\x11\x39\xc6\x63\x90\x01\x02\xe5\x3e\xfe\x38\x4a\xf2\x6a\x40\x0d\x46\x73\x31\xd7\xc5\x62\xe0\x1b\xd9\x87\x8d\xb7\xa8\x05\x66\x35\xd7\x52\xe7\x83\xae\xcc\xfb\x70\xaa\xf5\xa5\xe9\x48\x01\x63\x17\x6e\xad\x73\xbf\xd9\xb4\x2b\xa9\xdc\x8c\x02\xd4\xf2\x4a\xd3\x85\x4b\xd7\x31\x20\x8c\x2b\x2c\x73\xe4\x99\x0d\xab\x79\x5d\x8f\xa8\xf3\x25\x23\xea\xac\xca\x1b\xe9\xea\x11\xf8\x1c\x25\x8e\xd3\x79\x5e\x2e\x4e\xe4\x83\x8a\x6a\x2b\x8a\x3f\xf4\x81\x4f\x54\x83\x12\x3d\xc7\x4b\x8f\x9e\xf4\x96\xcc\x45\x2a\xab\x48\x3e\x3b\x44\x19\x94\x54\x2a\xd3\x94\xba\xb0\x2a\x2d\x36\xf6\x41\xa3\x3c\xb9\xc1\xa3\x1a\xc4\x6f\x5d\x05\x82\xaa\x34\xec\x7a\xef\x7a\xcf\xc5\x64\x09\xae\xfc\x25\x73\xb1\xb7\x41\x1c\x17\x76\x1e\x5c\x31\xb7\x48\x84\xf7\xb0\x4f\x0d\x0f\x2c\x03\x7b\x0b\x24\x7a\x6b\x6b\x14\x4d\xe4\x90\x96\xf4\x2b\xf8\x40\x2a\x5b\xec\xe6\xbf\x89\x37\x96\x65\x44\x0c\x18\x10\x10\xcc\x31\x86\x4f\x4f\x58\xa6\x13\x08\x49\xc6\x55\xf2\x99\x56\x68\x5e\x94\x86\xb9\xa3\xe2\x35\x02\x1f\xa0\x03\x3c\x09\xae\x47\x66\xb4\x83\xb5\x81\xcc\x41\x5d\x30\xe4\x43\x7e\x61\xae\x20\x47\xf8\x5e\xce\xab\x39\xab\x5c\x28\x6d\xa3\x4d\xfd\xa1\x3b\x17\xd6\x0b\x89\xc5\x52\xc1\x4b\x4d\x92\x05\xc9\x21\x6e\x8e\x41\x96\x2a\x24\x53\x3a\xea\x60\x2a\xe0\xf7\xf4\x15\x62\xb1\x54\x0d\x2f\x30\x81\x78\x80\x9d\xe5\xfd\x57\x32\x6b\x6e\xbf\x4b\x2c\xf2\x13\xaf\x94\x53\xd5\x97\x37\x33\xbe\x97\x95\x11\xc5\x70\x5a\xc9\x34\xba\x8b\xdb\xba\x09\x46\x4e\x7e\x18\xfd\x47\xc5\x55\x29\xcb\xc5\xd6\xae\x82\xc3\xd5\x2e\xda\x28\x06\xa9\xb5\x47\x18\x42\xb4\x8e\x58\x2c\x35\x25\xf7\x62\x95\x67\xa4\x48\xa6\x14\x0f\x67\x9c\x9a\x1e\x44\x26\x6d\x82\x8b\xcf\x57\xf5\x8f\x99\x36\x65\x9b\x95\x52\x40\x9c\x4e\x2d\x69\x42\x21\x1d\x32\x35\xc4\x6c\xb9\x79\xbc\x93\xb3\x8b\x95\xd7\x47\xec\x2d\xc1\x77\x8d\x05\xcb\xb4\xce\x81\xa2\xec\xbf\x78\xf9\x3d\xa6\xdb\x1e\xfe\xe5\xc0\x72\x2d\x75\x33\xc4\x0b\xb6\xff\xe2\xbb\xbf\x8e\x5e\x7e\xfb\x0d\x3c\x7b\xf1\xdd\x01\xd8\x8c\x82\xe7\x90\x9c\x92\x80\xfb\x79\xff\xe5\xcb\x6f\xa8\x93\x97\xdf\x1c\x8c\xd8\xd9\xc5\xed\x77\xf5\x35\x83\xe4\x10\xcb\x6a\x2b\x94\x59\x31\xad\xad\xae\xc2\xaf\x11\x1c\x38\xcf\x78\x69\x19\x9d\x19\xb1\xa3\xcc\xe8\x01\x4b\x44\x01\x62\x73\x7d\x2c\xeb\xda\x8f\x86\x18\xac\x7d\x36\xcc\x0b\x7d\xbf\x18\x78\xde\x0e\x5f\x07\xf3\x6b\x1c\xfe\x58\xa7\xe2\x3c\xba\xfa\xb5\x98\x72\x6e\x59\xb2\xdd\x26\x5f\x64\xaa\x5e\xc5\x58\x7e\x5b\x2a\xd0\x90\x1d\xa6\xb9\xe2\x2a\x81\xc5\x41\xb5\x95\x94\x46\xd8\xc6\x16\x55\xd4\xc1\xf1\x94\xda\x61\xc6\x63\x1a\x9d\x53\x82\x43\xbb\xcd\x76\x4a\x65\x50\xb3\x7e\x2b\xd9\x78\x63\x4d\x78\x77\x91\x36\x85\x26\x86\xed\xd6\xdc\x36\x6f\x16\x83\xd8\xa9\x4d\xba\x7e\xd4\x16\xc6\xf3\xfc\xa2\x35\x3e\xcb\xde\x94\x10\xdc\x2c\x0f\xe3\xb5\x30\x33\x12\x82\xb6\x02\x98\x90\x89\xce\x32\x7d\x07\xb6\x52\x2c\xe9\xf3\x8f\xfa\x74\x82\x1c\x40\x30\x48\x23\xf6\x41\x0d\xf3\x42\x4c\xe4\xbd\x20\x73\x00\x1c\x50\x2b\x94\x14\xb7\xc4\xae\xce\x8e\xce\x8f\xea\x9e\x5c\xa6\x34\x36\xde\xe7\x86\xe5\xa2\x60\xef\x5f\x1f\x0f\xbf\xfb\xfa\xeb\x6f\x81\x49\x10\xa1\xbe\xbb\xbb\x1b\x49\xae\xf8\x48\x17\xd3\x43\x6e\x8c\x9c\x02\xdc\x8d\x39\xa4\x2e\x86\xd0\xc5\xc1\x88\x9d\x6b\x35\xf4\xfd\xbb\xd9\xf9\xda\x11\x56\x34\x58\x1a\xa2\x4b\xf0\x99\x2f\xec\x55\xe3\x6a\x31\x4a\xf4\xfc\x70\xbe\x18\x26\x95\x29\xf5\x7c\xe8\xfa\x18\xb1\xd7\x61\x31\x2b\x97\x05\x09\x22\xb2\xab\x67\x5f\xaf\x7c\x5b\x21\xaa\x4d\xc0\xe8\xe0\xba\x08\x49\x21\x6e\x47\x10\x0c\x8a\x01\x8b\xa0\x58\xdb\x86\xcf\x1c\x98\x8b\x33\x7e\x3b\x60\x77\x7b\x67\x68\x5c\x17\x8d\x38\xbc\x86\x2b\xc8\x11\x00\x54\x76\xe5\x04\xc2\xd1\x72\x3a\xa3\xab\x36\xee\x26\xf0\x43\x7c\xf8\xf9\xaa\xd5\x75\x2b\x7b\xeb\xba\xf0\x42\x22\xf4\x6d\xa7\x76\x73\xa8\xa1\x9d\xd6\xd5\xf1\xc5\x23\x7d\xc4\xee\x32\x5f\x56\x63\x23\x3a\x5d\x7b\x6c\x89\x17\x7f\x6a\x15\x24\x10\x72\x90\xa1\xba\x72\x76\x50\x22\x7e\xae\x15\xa4\x36\x3a\xf0\x0c\x94\x78\x3c\xf6\x19\x3d\x0a\xa0\x05\xd0\xb5\x75\xcc\x8b\x52\x18\xc9\xe1\x46\xa7\x55\x02\xad\x8e\x7c\xff\xf7\xec\x02\x3b\x6b\xd4\xe2\x07\x63\xf8\xab\x6b\xc5\xd8\xff\xda\xff\x61\xf5\x0b\xaf\xd8\x7f\xfd\xef\xf5\x9e\xcc\xb1\x3a\xfe\x8b\xe7\x23\xfb\xff\xa3\x17\xd7\x7b\xbf\x0f\xd8\xca\x83\x97\xa3\x97\xd7\x7b\xbf\xff\xf7\x00\xfb\x80\x0f\xbd\xb2\xff\x82\x3e\xec\x19\xc5\xc6\x1c\xa3\xd6\xed\xac\xec\x0f\x7f\xf9\xee\xfb\x6f\xb1\xb7\xba\xc9\xb8\xd9\xe4\xeb\xe7\x7f\xfd\xfd\xbf\x6d\xaf\xbf\x23\x04\x30\xaa\x92\x10\xc4\xb0\xbc\x0c\x74\x2b\x6f\xa5\xb8\x03\xff\xd2\x2b\x1c\x0c\x7f\xc5\xfe\x8b\xf9\xe1\xbf\xb2\xdf\x1c\x30\x3f\x6a\xf8\x9b\xb9\x81\x8f\x9b\x6d\xbf\x7e\xfe\xd7\xb0\xe9\xd7\xcf\xff\xca\xfe\x7b\x73\xed\x50\xb7\x80\x11\x45\xf5\x22\xdc\x6f\x10\x59\xf5\x64\x42\x4e\x34\xb0\x75\x51\x24\x6f\x50\x86\x92\x90\x4a\xb9\x21\xe6\x6e\xcf\x82\x09\x39\x6e\x9d\x5e\x17\x7a\xc9\xf8\x04\xe5\x7b\xc8\x0b\x1f\xf3\x8c\xab\x04\xfc\x88\x2a\xa5\x04\x55\x54\x93\x4a\x99\xc9\xdf\xc4\x6e\x10\xad\x9a\x82\x27\xe0\x96\xea\xf2\xbd\x1d\xf4\xd1\x4e\x96\xc4\x4a\x52\x4e\xda\xa9\x4d\x66\x4b\xeb\xc3\xc6\x22\xe1\xa4\xfd\x2d\x9a\x9e\x59\x17\xf9\xe5\x61\xc8\x06\xf8\xbc\x10\x09\x76\x85\xb9\xfc\x60\x10\x74\xfe\xe7\x64\x26\x92\x1b\x20\x21\x2d\x4d\x1d\x1a\x00\xb6\x7c\xaa\x85\x6c\x81\xd8\x09\x9c\x5b\x86\xf1\x5b\x2e\x33\xd0\xeb\xc8\x6b\xed\x56\x2f\x5c\xe2\x5d\x0e\x10\x81\x60\xba\xca\x52\xcb\xd3\xda\x2c\x49\x6d\x90\xb6\x3a\xe9\x36\xa4\xd5\xd4\x7e\xf2\x26\xc9\x80\x5b\x26\x2d\x25\x9c\xbb\x2a\x76\x3c\x29\x2b\xab\x68\x23\xdb\x1c\xb1\x53\xa4\x94\x40\x4c\xac\x00\x6d\x69\xd4\x7c\x61\x6e\x93\xeb\x3d\x20\x1a\x48\xd5\x2d\xb5\x44\x12\x42\x64\x74\x37\x84\xd4\x93\xd2\x9d\x91\x51\xc6\x7e\x1f\x6c\x33\xd0\xaf\x47\x5f\x6f\x3d\x9e\xbf\x7e\xbd\x61\x34\xdf\x7f\xd7\x18\x4c\x07\x9a\xda\xd7\x19\xdb\x6d\x9d\xb1\xbe\xbe\x57\x5f\x01\x75\xbb\x0a\xa8\x83\x3d\x83\x94\xae\x25\x15\x50\x94\xce\x66\xb7\x22\x98\x56\xca\x5d\xb4\x2c\x63\xd4\xcb\x28\x90\x4c\x2d\x53\xcf\x33\x9e\x38\x04\x07\x6a\xc2\x78\x92\x68\x8a\x7e\xc6\xcb\x76\x76\x61\x90\xaf\x9b\x19\x2f\xc4\x88\xd5\x58\xdd\x64\xc2\x02\x19\xda\xe3\x87\x00\xd7\x1c\x30\xa3\x51\x97\x42\xe9\x02\xd5\x51\x2b\x29\xd8\x3b\xba\xfa\xcc\x9e\xb4\xfd\x86\x10\x91\xd8\x36\x18\xab\xe5\x81\x7c\x6a\xbb\xe4\x81\xc3\x31\x71\x50\x2d\xc0\x44\x68\x3c\x88\x07\x97\x4a\x93\x67\x7c\x81\xf9\xc1\x75\x1f\x6e\x9a\x2e\x42\x34\x80\x09\x42\x41\xfd\x5c\x07\x13\xcb\x32\xab\xb4\x0b\x0e\xb1\x7a\x00\x6e\x10\x2c\xa0\x4a\xd9\xf9\xb2\xac\xe5\xc6\x62\xac\x2a\x89\xdf\xb2\x77\x92\x6c\xab\x8d\x77\x03\x91\xd3\x2a\xc0\x85\x34\x56\x45\x74\x2c\x70\x87\x22\x03\x29\x4b\x5b\x0b\x0d\xf4\x5e\xc7\x82\x72\x9b\x6b\xee\x7a\xf1\x60\x53\x65\xcd\x46\xc3\xa6\x8b\xc9\x1f\xf3\xbe\x76\xe6\xa7\xc1\xd3\x5a\xbc\x83\x6f\xd6\xec\xd7\xa3\x0f\xb4\xe9\xab\x65\x7e\x7c\x6e\x0a\x37\xf0\xa3\x71\xd2\xe6\x78\x3f\x62\x21\xcd\xfa\x8c\xed\xa8\x90\x66\x13\x17\x62\x2d\xd5\x0b\x1a\x86\x01\x18\xc0\x4f\x7c\xac\x0c\x77\x5c\xbf\xae\x44\xbb\x51\x92\x4f\x5c\xd3\xa8\xf9\xff\xaa\x51\x25\xc4\xd7\x91\x86\x53\xbe\x5d\x24\xec\x72\x49\x75\x30\x29\x8a\x89\xbc\x8f\x10\x5b\x55\x63\x60\x63\xd0\xe4\x44\xda\xeb\xa5\x59\x5e\xc0\x2e\x41\x9e\x3a\x55\xe9\x59\x29\x3a\x13\x1a\x55\x1b\x88\xe9\x51\x7f\xaf\x48\x8a\x16\xcf\x87\x9d\xfa\x25\x3c\x7e\xf8\xbc\xf1\xfd\x60\xd2\xdb\x96\x6c\xad\x5f\x6d\x43\xed\x68\xf4\xdf\x7e\xce\x7e\xe6\x6b\x8b\xac\x60\x8b\x46\x68\x8f\x8a\x42\xd8\x87\xb5\x7e\x78\x9d\x20\xfd\xb0\x22\x2b\x9b\x11\x95\x63\x43\xd8\x6a\x83\x81\xc4\xaf\x7e\xe3\x81\xb5\x2d\x7c\xfa\x9a\x03\xb0\xef\x86\xf2\x8f\xe8\x74\x6a\x11\xa0\xd0\xc6\xca\xf0\xff\xc9\x2b\x64\x34\x81\x07\xa2\xa8\x03\xb4\x9f\xf1\x6a\x0c\x97\xcd\x4a\xc0\xb1\x35\x7e\x66\x5c\x19\xad\x80\xe9\x52\x11\x14\x14\x06\x28\x75\x0d\xa2\x0b\xb6\xf1\x68\xe2\x05\xda\xf2\x9a\x37\x5e\x5a\x7b\x77\x3b\xb1\x08\xdf\xae\x19\xa2\xb7\x54\x21\x19\xe7\x89\x12\x29\xbe\xb4\x39\x60\xc8\x33\x89\x7f\x88\xc5\x86\xd8\x4d\xaa\x72\x1c\xd4\x0e\xdc\x32\x65\xc2\x7f\x28\x0c\x37\x6e\x8f\x95\x5e\x17\x21\x4d\xce\x7d\xd3\xac\x1f\x3c\x88\x94\x13\x0e\x7e\x73\x41\xd4\xfe\x87\x46\x88\xb5\xc9\x45\x32\x72\xbe\x7b\xfa\x93\x6e\xf5\x51\x92\xe8\x4a\x95\xf4\x00\x0b\xe0\x22\x9e\x8b\xff\x33\xd7\xe9\xf2\x5f\x66\x07\xc1\xd8\x9f\x46\x6c\x2d\xfd\x29\xf2\x99\x98\x8b\x82\x67\x43\x8a\x8d\x6a\x46\xdd\x0e\x96\x43\x6e\x9b\x61\xb8\x2b\x6f\x3f\x65\x44\xae\xe3\xff\x5b\x9c\x6a\x7c\x81\xc9\x10\x20\x28\xac\x27\xbe\x9d\x64\xd0\x38\xe5\xdb\xca\x06\xe1\xcb\x51\xd2\xf1\xc8\x48\xe2\x35\x12\x47\xf8\xe9\x36\xba\xe5\x36\xb2\x5b\x91\x37\xc5\x56\x5f\x70\xae\x02\xf7\x27\xd8\x43\x08\xd6\x85\xa7\x00\x11\x5a\x27\x89\x41\x88\x8b\x42\x9e\x62\xf9\x20\xe4\x66\x68\x28\x31\x50\x0c\x11\xbc\x1a\x6a\xe2\x24\xa5\xbc\x95\x96\xae\xf9\x20\x83\x54\x8c\xab\xe9\x14\xa2\x6e\xfd\x18\xc2\x38\x37\xf2\x59\x05\x37\xa7\x00\x05\x3d\xad\x32\xfb\xa1\x69\xc5\x0b\xae\x4a\x21\x8c\x8f\xaf\x5d\x34\x2a\x29\xd6\x85\x2f\x5c\x3a\x1c\xd4\xd8\x81\x62\x2d\x77\x58\x76\xc7\x0e\x16\xac\x06\x88\x58\xaf\x8b\x25\x60\x59\x3b\xb1\xd5\xa1\x31\xb0\x89\x19\x7a\x1f\xb0\x9b\x12\xe1\x33\x36\x69\xb0\x84\x07\x29\xb5\x1a\xf8\x9c\x15\x5a\x43\x71\x2b\x13\xf8\x42\x74\xda\xf3\x3a\x4c\x0b\x17\x7b\xec\xe2\x53\xb3\x05\x73\x55\x50\x6a\x74\x75\x4b\x08\xad\xa4\xb1\xa8\x73\x3b\xe0\xad\x5b\xc9\x83\xab\xe2\x67\x11\x7c\xc8\x54\x63\x37\xda\xe5\x15\xac\x0d\x6c\xe1\x77\x98\xb6\xc2\x0f\x74\x1f\x00\x62\x2b\xc6\xb3\x7c\xd6\x0a\x89\xbd\x7a\xbc\x4c\x13\x19\xbb\x2f\x13\xf8\x67\x12\x36\xbf\x80\x72\x6c\x7d\x99\xc0\xfe\x5c\x7e\x8a\xe7\xb2\x2f\x13\xd8\x97\x09\xec\xcb\x04\xee\xbe\x4c\x60\x5f\x84\x6f\x47\x45\xf8\x3c\x9e\xb2\x63\x66\x50\x65\x91\x82\xa1\x23\x72\xf6\x56\x2a\xfa\x56\xa5\xf4\xea\x7a\x39\xbb\x1e\xc6\x16\x55\xeb\x62\x9a\x45\x7b\xfd\x3a\x90\xb7\x21\x1a\xda\x51\x1c\x42\xa5\xe1\x73\xad\xa6\x4b\x39\x42\x03\x28\x1b\xd4\xc0\x4d\x51\x69\xeb\xdc\xba\x16\xb2\x83\x90\xa7\xad\x56\x6d\xc7\xb5\xd6\xba\x54\x2f\xfb\x08\x5b\xbb\xa6\x14\x58\x5d\x02\xac\xf3\x08\xe2\x5a\x60\x65\x04\x33\x39\xa5\x0c\xb8\x2e\x33\x8a\xd7\xa0\x52\x03\xa9\x53\x73\xa8\xda\xfa\x47\xab\xf1\x45\x0d\x9e\xe2\x1a\x6f\x5d\x54\xeb\x63\x6c\x78\x5f\x2b\xa9\xaf\x95\xd4\xd7\x4a\xda\x51\xad\x24\xc8\x79\xf3\x84\x3d\x9e\x8a\x67\xf7\xcc\x9e\xfc\xb2\x91\x01\x14\xce\x0b\x46\x74\xa1\xd3\xcb\x5c\x24\x01\xdc\x4f\x8c\xa7\xe2\x17\x5d\xf2\x48\xa4\x81\x97\xcc\x2b\x7f\xb5\xbc\x69\xd9\xb0\xfd\xb3\x8b\xe3\x01\xbb\x38\x3b\x19\x30\x51\x26\x07\x11\xc0\x42\x8f\x98\x22\x4a\xdc\xf5\x36\xee\x8e\xd0\x7e\x50\x0f\x7a\xc6\x4b\x58\xc3\xe0\x43\x00\x15\x33\xe3\x75\x32\x33\x81\x9b\x87\x88\x46\xb1\x2b\x08\xf2\x80\xcb\x57\xc7\xed\x45\xfb\x5a\xd7\x9a\x46\x7d\xad\xaa\xbe\x56\x55\x5f\xab\xaa\xaf\x55\xd5\xd7\xaa\xea\x6b\x55\xf5\xb5\xaa\xfa\x5a\x55\x7f\x7c\xad\xaa\x55\xa7\xe1\x31\x64\x03\xaf\x0d\xc4\x69\x79\xc7\x79\xb3\xf3\x85\xcb\xbc\x80\x80\x15\xb0\xa0\xd6\x2e\x6f\xa4\x32\x52\x65\x60\xf8\x94\x31\xb7\x38\xd9\x60\x8c\xc8\x79\x01\xcc\x6c\x91\xa3\x9b\xf7\xce\x30\xc1\xcd\x82\x02\xca\x21\x58\x1d\xc4\xd3\x88\x67\xbd\xd4\xc1\x37\x41\x1f\x20\x3c\x01\xd7\x69\xaa\x13\xf0\x10\x20\x73\x72\x72\x20\x8d\x58\x4f\xa2\xc3\x22\xe3\xb0\x12\x77\x2e\xff\xdd\x38\x3f\x7d\xf8\x39\x59\x2e\xb9\x88\x11\x7c\xc6\xb0\x3b\x91\x65\xbd\x1b\xb6\x77\x77\x7d\x5e\xee\xae\xde\x0d\xdb\x9f\xcb\x4f\xf1\x5c\xf6\x6e\xd8\xde\x0d\xdb\xbb\x61\x7b\x37\x6c\xef\x86\xed\xdd\xb0\xbd\x1b\xb6\x77\xc3\xf6\x6e\xd8\xde\x0d\xdb\xbb\x61\x7b\x37\xec\x27\xe6\x86\xed\xdd\x80\xbd\x1b\xb0\x77\x03\xf6\x6e\xc0\xde\x0d\xd8\xbb\x01\x7b\x37\x60\xef\x06\xfc\x3c\xdc\x80\x6b\xb1\x2e\x8f\x6a\x48\xaa\x16\x5d\x2e\xb0\xc2\xd9\xfb\xb6\x21\x2b\x72\x63\x09\xf1\xc8\xf0\x7a\x74\xab\xa7\x46\xb7\x8a\xad\xfa\xb6\x47\x61\xd5\x2c\x0b\xb0\xd9\xe9\x88\x9d\x8b\xbb\xf8\x2b\x2e\xff\x39\xcf\xbd\xc8\x09\x6f\xd9\xef\x0c\x00\x92\xd7\xa7\x40\xb7\xbe\xef\x5d\x39\x3e\xdd\x78\xae\x53\x20\x63\x3b\x31\xce\xae\x66\x7e\xef\xda\xc6\xdf\xe3\x7b\x3d\x0d\xbe\xd7\x6e\x90\x29\xbb\xa2\x9f\xac\x9e\x93\xdd\xe1\x09\xda\x05\x58\x1b\xa5\x01\x7e\x16\x89\x88\x18\x58\x61\x69\x52\xfb\x5f\x8c\x9e\x8b\x3b\x08\x4b\x70\xdc\x38\xab\x4c\xb9\x19\xe6\x28\x00\xf9\x94\xea\x16\xfc\xa4\x38\xd6\x08\x3d\xf6\x65\x48\x23\x35\x98\xf0\x21\xbb\xb3\x44\x92\xdf\x08\x75\x48\xf0\xd6\x75\x41\x77\xa2\x9d\xef\xfd\x0f\x44\x7e\x63\x3b\xdc\x93\xfe\x1d\x93\xfe\x64\x9b\x12\xd7\x56\x89\x83\x43\x35\xe3\x86\xe9\x04\x90\x4c\xd2\x8e\x45\x17\xe0\xc5\x2b\x19\x2d\x4a\x21\xe7\xbe\xbe\xb2\x34\x0c\xcf\xb3\x3d\x30\x68\x8c\xd2\x63\x2c\xf0\xd1\xc1\xc0\xb9\xe6\x56\xbf\x95\x49\xa1\xe1\xfb\x80\xc1\x53\x18\x18\x8c\x29\xf9\xbc\xa5\xe0\x0f\xd8\xa6\x1a\xc6\x19\xb1\x34\x30\xbb\x95\x05\x44\x2c\xec\xc3\x14\xf4\x04\x50\xb1\x9c\xfd\x28\x2f\xd1\xa0\xc2\xae\x16\xb9\xb0\x37\x7c\x74\xf0\xa8\x19\xb8\xc1\x2f\x5d\xc7\xe8\xe0\x89\x09\x04\x51\xfc\x9e\x48\x8c\x75\xf5\xb8\x02\x37\x3d\xcf\xda\x25\xcf\xca\xf8\x03\x4e\xe2\x5c\xe3\xf1\x03\xc7\x28\xde\x43\x95\x04\xf5\xad\xfc\x41\xf5\x47\x74\x27\x27\x8f\x2c\x3a\x31\xd9\x70\x56\xcd\xb9\x1a\x16\x82\xa7\x10\x83\x12\x3c\x76\x4e\x41\xb2\x49\xb9\x31\x5a\x06\x02\x84\x37\x4a\xe7\xff\x2c\xb8\xd7\x85\xe0\x26\xc6\xcb\x30\x2c\xd2\x5b\x0a\xb9\xfd\x77\x51\x0e\x18\x75\x0c\x55\xe7\x0a\xac\x43\x64\x97\x9b\x2e\x1c\x5c\xf7\xa9\xbc\x25\xce\x87\x9d\xfb\x88\xc7\xb2\xe0\xca\xc0\x50\x6b\x23\x88\x5f\x44\x57\x1d\x9e\xf0\xbc\xe2\x65\x6f\xc1\x58\xd9\x6e\xd0\x66\x46\x24\xda\x6e\xce\xc2\x5d\x68\xa8\x02\x68\x37\x25\xd1\xf3\x3c\x13\xf7\x24\x0d\x3c\x00\x28\xac\x41\x7f\x50\xcc\x91\x6a\x7a\xec\xaa\x97\xad\xf7\x47\xc3\x7e\xeb\x2c\x73\xc0\x4b\x62\x2e\x4b\xb0\x24\x7a\x76\x33\x60\x62\x34\x1d\xb1\x7f\x36\x83\x06\xa8\x98\xff\x3f\x5b\x96\x83\x06\x71\xa6\xec\x46\xc4\x1c\x4c\x67\x27\x91\x11\x48\x6a\x1e\x7e\x32\x13\xe5\xf0\x7e\xf1\xdb\x24\xfe\x25\x23\x0a\x19\x33\xf5\x9d\xf0\x92\x07\xc5\xfe\x91\x6f\x62\xe3\x90\x0e\x04\x08\x7a\xba\x80\x8a\x86\x72\xc2\xa4\xdd\x74\xe7\xa7\x2a\xb5\xc2\xb7\xb7\x82\x09\xb4\x2f\x5c\xe2\xd0\xec\x20\x3d\xac\xdf\x2a\x01\xf3\x45\xe6\x98\x5f\xb4\x60\x80\x23\x76\xb9\x7c\xd0\xd7\x9f\xf3\xed\x47\xe9\x71\x5a\x71\x6d\x57\xc6\x48\x75\x42\x83\x45\xdb\x3f\xb7\x12\x4c\x36\x60\xbf\xf0\x42\x49\x35\x3d\x18\x40\x30\x30\x10\x73\x96\xf8\xe1\x42\xd0\x2f\x09\xd6\x93\xca\x12\x8e\x07\x5b\xb2\xc2\xf5\x6c\x57\x04\xd6\x59\xb1\x96\x6f\x4a\x47\x15\xa4\x96\x8c\xb6\xd7\x59\x3a\xbe\x01\xbd\xaf\xd3\x6f\x36\x62\xa5\xbb\x46\x4b\x38\xe9\xb7\xa2\x07\x49\xff\x64\x74\x89\x4d\x20\xe9\xb7\x64\x00\x7d\xb4\x55\x06\x34\xe2\x1e\x1c\xbd\x07\x47\x7f\x22\x70\x74\x38\x5f\xbb\x02\x46\x0f\xc8\xfa\x26\x02\x87\xcd\x9c\x89\x13\x96\xd6\xaa\xd1\x40\x51\x94\xe3\xec\xfe\x26\x0d\x98\x1c\x89\x91\x3d\x8d\x4e\xf4\xbb\xe3\xe6\x50\x1a\x36\x03\x8b\xaa\xfd\xd5\xf6\x24\x55\xa5\x2b\x93\x61\x89\x6e\xa8\x49\x02\xf1\x38\x1d\x80\x72\xa3\x96\x81\x73\x6f\x15\xa8\x15\x0f\x0a\x2f\x86\x10\x14\x18\x63\x95\xd7\xa4\xcc\x94\x6c\x26\x78\x51\x8e\x85\xd5\x45\x91\xcd\x74\xb0\x17\xd8\x17\xdf\x91\xe6\xbf\xc6\x6c\x40\xf2\x15\x7c\x26\xd4\x84\xe8\xcd\xdd\x99\x0c\xac\x60\x1c\x19\xc4\xa5\xfd\xd9\xb3\x01\xdc\xc0\x57\xec\x9d\x9a\x6a\xb0\x64\x15\xec\xb5\xab\x0c\x77\x62\x69\x4a\x82\xf7\xfe\x22\xe3\x4a\x81\x11\x6c\xae\x6f\x39\xd6\x99\x7c\x31\x7a\xf1\x97\x6d\x85\x87\x4e\x5c\x7d\xed\xc1\xdc\x0c\xc6\x5c\x37\x73\x07\xd3\x34\x4e\x26\x54\x7e\x27\x6b\x63\x97\x53\xd5\x2a\xb1\x7b\x61\x1e\x69\xeb\xb2\xdd\x45\x1a\x36\x15\xca\x2a\x8d\x2d\xee\xfa\x99\x36\xb1\xf3\xaa\x53\x07\x78\xa0\xb6\xed\x73\xab\x9a\x9d\xf7\x22\x39\xf2\x86\xd0\xd6\xd5\xf4\xad\x1a\x45\x79\xaf\xf7\x08\xc4\xc0\x7b\x37\xae\xf7\x48\x57\xea\xb4\xa4\xf1\xac\x9d\x63\x7c\xe0\x82\x00\xa8\x1d\xc4\x4a\x20\xc4\x2a\xa4\xef\x58\x85\x44\xa6\x4b\x11\x24\xe8\x03\x5e\x71\x16\x7b\x5d\xd2\xf5\x05\x51\x58\x5a\x97\x6c\xff\xd9\xe1\xb3\x83\x15\x87\xef\x92\x6b\xfd\x2a\x78\xd3\x12\x0b\x39\xcf\xb3\x05\x8c\xe3\x59\x3a\x60\xd2\x87\x5d\xe2\x62\xc0\xa8\x28\xa7\x68\xc0\x8c\xb6\x0a\x6c\x2a\x9d\xaa\x69\x7f\x05\x5d\xaa\xa8\x50\xa7\x64\xfb\xcf\xfe\xaf\x67\x04\x28\x71\xa7\xd5\xb3\x12\x86\x3f\x62\x57\x58\xb1\xdf\x77\xb4\xd0\x15\x53\x42\x10\xca\x6c\x9e\xc9\x44\x96\xd9\x82\x25\x3c\xcb\x18\xa8\x52\x1a\x89\x29\xe5\x32\x9d\xde\xcb\x32\xb0\x5d\x3c\xc7\x00\x3e\xc1\x29\xcf\x21\x93\xb7\xe2\x70\x26\x78\x56\xce\x30\xb6\x45\x69\x35\xfc\x4d\x14\x1a\x6b\xc3\xd3\x93\x75\xbe\xa8\x95\x33\xb7\xc5\xa1\x7b\x7d\x8c\x2e\xdf\xcd\xd7\xf8\x7d\x08\xa3\xfe\x5a\x8e\x0b\xc1\x8e\x29\x92\xd1\x15\xf5\x8f\xfd\x8a\x95\x4f\x01\x4d\x7b\x2c\x7c\x60\x19\x15\xc4\x3c\xbc\x2b\xa4\x25\x7e\x90\x1c\x11\x7f\xdb\x61\x68\xe8\x3b\x25\x0a\x33\x93\x39\x9b\x73\xc5\xa7\x58\x12\xd1\x2e\xd7\xe5\xe9\x1b\xa9\xaa\x7b\x28\x28\x39\x16\x19\x69\x77\xeb\x0f\xfc\xc4\x5c\x45\xd5\xb8\xd7\xfe\xa8\x61\x22\xa9\x8b\xf9\x08\xab\x2c\x4c\x96\xda\xd4\x45\xd3\x29\x04\xc6\x52\x11\x67\x9c\x52\x53\xe6\x8e\xee\xe9\xfd\x88\x5d\xef\x89\xfb\xf2\x1b\x2c\x37\x78\x3f\x31\xf8\x0f\x55\xda\x7f\x8d\xd8\xd9\xdc\x1f\x25\x90\x12\x0b\x1f\x43\xe7\x5e\xb3\x6a\x77\xa5\x7c\x98\x45\x94\x86\x65\x55\x44\x19\xa9\x03\x06\x5f\x1f\x13\xf4\x0a\xcb\x2a\x45\x06\xfa\x6e\xec\xd4\xee\xd7\x3b\x95\x45\x02\x9a\xea\xde\xc3\x38\x29\x08\x40\x62\xfb\xf5\x36\x1f\x8c\xd8\x7b\xea\x03\xb3\x5c\x21\x08\x64\xa2\x51\x74\x16\xf5\x43\x23\x4a\x58\x39\xa9\x58\x10\x8f\x60\xe2\xc1\x4c\x38\x9b\x5f\x7e\x39\x8f\xe8\x0d\xb1\x69\xdf\xe9\x22\x4b\xef\x64\xea\x6b\x7a\xdb\x57\x0f\xb6\x4a\x26\xbb\xbb\x93\xe9\xa6\xaf\xe1\xf1\xc5\xaf\x31\xf8\x5c\x5d\xbc\xc5\xb0\x7d\xe8\xe2\x80\x9d\x4a\x88\x04\x83\xbf\x2c\xab\x4f\xf4\x7c\xec\x82\xdf\xac\x44\xe0\xe7\x06\x27\xdd\xee\x98\x4b\x70\x80\xe0\x67\x57\xbd\x1f\x43\xf3\xe4\xbc\xca\x4a\xae\x04\xc8\x6a\x4f\x46\x2f\x32\x71\x7f\x61\x75\x58\x53\x0a\x55\x76\xa5\x1d\xed\x6f\x35\xab\x33\x00\x2b\x95\x09\xcb\x7d\x5b\xb7\x90\x81\x92\xc5\x81\xca\x43\xb2\x27\xaa\xd2\x87\x14\x65\xec\x52\x39\x01\xf9\x5c\x24\x6c\xcc\x8d\x48\x59\x9e\x55\x53\x19\x65\x82\xa1\x86\x9f\x16\xf2\x56\x14\xab\x2a\x3e\xfd\xbe\x6a\x39\x83\xdf\x1d\x63\x0c\xe1\x90\xf0\x0d\xa8\x5f\x6c\x44\x5d\xff\x9b\x68\x64\xec\xca\x7e\x92\xd4\x08\x32\x70\x29\x5a\x2b\xf8\x48\x0a\xe7\xc4\x58\x51\xc8\x6e\x2a\x6e\x25\xc3\x51\x47\x27\x87\xc5\x8b\xd6\x5e\x97\xd3\xfb\xb2\xe0\x9e\xad\xd3\x0b\x96\xd6\x71\xb5\x88\xed\x1b\x4f\x1d\x13\xbf\x68\xec\xd5\xea\x4d\xfd\x44\x69\xd6\x9a\x42\x4b\xf5\xb8\x2e\x5d\x23\x8c\x53\x77\xa9\xc5\xa4\x15\x51\xe9\x05\xb2\x36\x90\xb8\x84\x85\xc7\xc1\x44\x7f\x2b\x1a\x22\x76\xa9\x59\xce\x8d\x37\x0f\xe1\x9d\xa0\x6d\x33\x94\x40\xe5\x80\xf0\x21\xc8\x56\x4e\x98\xd2\x4b\x5f\x09\xd3\xeb\x28\x5e\xbe\x65\x20\x06\x6d\xf6\x10\x98\xad\x95\x6b\x34\xc0\x12\x9b\xf0\x6f\xaa\xab\xc9\x8d\x09\x52\x75\x9a\xa3\xda\xba\x80\x44\x60\xe1\xef\xa8\xa7\x2f\xbf\xd7\xa2\xe8\xd4\x27\xbd\x1b\xa9\xfb\xd9\xd1\xac\x08\x69\xeb\xe9\x59\x4f\xcf\x7a\x7a\xd6\xd3\xb3\xf5\x09\xbb\x3a\xe1\xd9\x8a\xdb\xb2\x23\x51\x8b\xbe\xdc\x4a\xd9\x20\x27\xfc\x61\x3a\x20\xbe\xeb\x28\x9a\x53\xed\xe8\x9e\xba\xa7\x7c\x0a\x0e\xba\x77\x4a\x80\x0c\x0b\x8a\xa0\xc6\x6c\xef\x94\x97\xdc\x08\xa8\x11\x05\xcf\xe8\xef\x0f\x1f\xce\x4e\x02\xcf\x35\x54\x06\x6e\x7e\xcb\xb0\x54\x63\xc4\xf9\x3a\xe5\x50\x17\x0f\xd2\x0d\x83\x51\xad\xf7\x09\x53\x43\x66\x4a\x5d\xa0\x4a\xeb\x0c\xdb\x6c\x78\x5d\x3d\x7f\xfe\x75\x6d\x35\x0a\x9b\x5b\x0a\xea\xa6\x53\xcf\x32\xd1\x60\xad\xa0\x8e\x52\x6f\xe9\x8b\x91\xa0\x60\x9d\x56\x47\x08\xab\xd7\x1c\x61\x5d\x17\x86\xd2\xa2\x83\x3a\x92\x50\xc7\xc9\x0d\x87\xda\x3f\xce\x8c\xf5\xe3\xf1\x69\x2d\xea\x9f\x48\x73\xf3\xa0\xc3\x55\x77\xc1\x6c\x1f\x35\xbf\x94\x8a\xfd\xa8\xf5\x34\x13\xec\x58\xcf\xf3\xaa\x14\xec\x54\x4d\xa5\x12\xa3\x6b\x75\xad\x8e\xd8\x8f\xc7\xa7\xec\xe2\x04\xd5\x24\x88\xfd\x65\x63\x31\xb1\x77\x17\x8e\x27\x05\x0b\xf2\x65\x14\x8b\xd4\x7e\x02\xde\x81\x1c\x9b\xb1\x68\x94\xa7\xb6\x7d\xe6\x85\x06\x82\x60\xcf\xe9\x6f\xf6\xfc\x72\xe4\x94\xe4\x7b\x1f\x31\xff\xe9\x6e\xe6\x0e\x2c\x6b\xc4\xd3\x21\x34\x9d\x73\xb5\xc0\x18\xb9\x11\x75\xb3\x33\xc3\x47\x28\x14\xe4\xe9\x79\x14\x31\xaa\x2b\xc3\xa6\x63\x45\x17\x1e\x24\x97\x85\xae\xd8\x1d\x57\x65\xc0\xcc\xaf\x64\xfe\x8a\x9d\x2a\x53\x15\x01\x42\xea\x32\x5f\x97\x66\x0b\xd6\xce\xe7\x79\x26\xcc\xab\x5d\x9b\x4f\xb6\xc5\x7c\xa0\x22\x6c\x87\x44\x84\xbe\x9a\x26\xa2\x56\x54\xed\x11\x8a\xe2\x05\xf0\xa2\x94\xf1\xe8\x56\x7b\xf2\xfc\x63\x77\xe2\x36\x2c\xee\xd9\x84\x69\x8c\x3d\x41\x03\x6b\x5a\x67\x7c\xf9\x04\xa5\xf1\xc2\xf5\x82\x20\x1f\xf5\x02\xbe\xd6\x9e\x5c\x43\x3e\xa3\x49\xf9\x0b\xb4\x67\xe2\xaa\xe0\x3e\xd4\x63\xe2\x86\x5d\xef\xbd\xb0\xab\x7b\x29\xe7\x32\xe3\x45\xb6\x18\x84\xa3\xac\x5b\x5a\xaa\xe6\xba\xb4\x83\xb9\xde\x7b\x7e\xbd\xc7\xf6\x75\x01\xbd\xdb\x3b\x91\x09\x7e\x8b\x42\x06\x1d\xbe\x05\xb2\xe6\x83\xa7\xdc\x87\x75\x06\x2d\xba\x0d\xab\x14\x14\x89\x64\x28\x03\x5f\x9c\x34\x09\xd0\xf1\xe9\x88\x7d\x20\x4e\x4f\xc4\x14\x97\x0e\x08\x89\x6b\xf1\x31\x8e\x57\xbb\x44\xf8\x38\x39\x6f\x55\x8c\x7c\xca\xf9\x78\x59\x72\x2b\x46\x23\xcb\xf7\x22\xd7\x0f\x62\x2f\xe1\x2d\x83\x2c\x13\xca\xa3\xad\x53\x91\xc2\xec\x59\xce\xa6\x12\x23\x8f\x8c\xc4\x8c\xb7\x1f\xe9\xef\x6d\x04\x92\xc8\x5b\xae\x79\x84\x94\x5b\x76\x76\x72\x7a\xf1\xfe\xf4\xf8\xe8\xea\xf4\xe4\x15\xa3\xd9\xda\xd1\xa6\x81\x1f\xf0\x4a\xd7\x9a\x63\x23\x57\x9d\x50\x89\xdc\xc0\x07\x44\x1b\xb8\x62\xa7\xf6\xd6\x9d\xc8\x02\x63\xf8\xb8\x62\x67\x4a\x96\xc7\xcd\xc2\x82\x49\xa6\x95\x8f\x01\xcc\x35\x29\xa2\x53\x89\xf0\xdf\x8a\x3a\x83\x98\xb1\x46\x6f\x94\xc4\xf5\xcc\x44\x13\x41\xa3\x4c\xa9\x5e\xd6\x88\xb6\xea\xdc\x46\x11\xe2\x89\xe6\xdc\xda\xb1\x44\x80\x46\x96\x89\xdb\x9d\x70\x2e\x70\x4d\x58\x05\xb8\x20\xcf\x46\xa3\x67\x23\x66\xa9\xe8\xb3\xd1\x33\xc7\x84\x32\x9f\xb2\x48\xc7\xa2\xee\xd4\xe5\x29\xda\x87\xcb\x67\x80\xbd\x73\x80\x42\x03\xcb\x59\x96\xb2\x1f\x9d\x01\x58\xd6\xb9\xe6\x91\x5e\xbc\x9c\x51\x8d\xc3\x8f\xd2\x19\x9c\xca\x5b\xa1\x70\x62\x6d\xf1\x83\xb4\x72\xb1\xd3\xee\x3e\xf1\xe1\xfd\x9b\xf8\xdb\x78\x6a\xe2\x5e\x3f\x84\xa5\x98\x79\x77\x5d\x0d\xbe\xe3\xde\x7b\xa4\xb7\xf3\x47\x4c\x22\x99\x98\xed\xad\xc9\x8d\x9b\xec\xfb\xf1\x67\x92\x97\xe0\xcc\x77\x79\xcb\x13\x51\x92\x9b\x9f\x63\x36\x59\xfd\xc6\x93\x68\x13\x8d\x64\xc4\xa0\x48\x7e\xce\xcb\xd9\xea\x09\xaf\x5b\x44\x20\x13\xe9\x11\x28\x1d\x64\x99\xf1\xb1\x42\xc0\x9e\x60\xb2\xa9\x28\xb9\xcc\x4c\x30\xaf\x52\xe7\x3a\xd3\xd3\x45\x94\x64\x0b\x92\x06\x5c\x94\x0d\x2d\xc2\xe1\xd4\xbd\x7e\xf8\xfe\xf4\xe8\xe4\xed\xe9\x68\x9e\x7e\x95\x80\x9b\x72\xc8\x87\xb9\x8e\x6a\x22\x22\x1c\x22\x56\x7d\x5d\x3f\x0d\x68\x13\x5a\x99\xf0\x07\xa4\x39\x4e\xd7\xae\x27\xe2\xfa\x0f\xd0\x39\x1c\x96\x2a\xc8\x0e\x78\xd5\xdc\x17\xea\x0f\xa4\x01\xf3\xf2\x62\x7c\xfd\x39\x92\xdd\xc7\xba\x52\x29\xbb\xf8\xf9\xf8\xc9\xd7\x29\x8f\xc2\x78\x00\x04\x03\xad\xc5\xf2\xa1\x64\xf6\x95\x27\x1f\xd7\x03\xa5\x87\x95\xc1\xa2\x9c\xed\xb4\x1d\xa0\x5f\xb5\x72\x93\x8b\x62\x2e\x1d\xe2\x4c\x37\xb1\xe2\xf1\x73\x7c\x98\x44\xe1\xba\xef\x29\xd1\xe7\x46\x89\xfa\x1b\xf6\x59\xdc\xb0\x9f\xae\xae\x2e\x7e\x14\xe5\xe6\x30\xa7\x46\xc3\x30\xd2\x49\xb9\x7c\x50\xf4\x86\x68\xc5\x6c\x53\xf6\xa3\x28\xeb\xba\xe9\x9b\xcc\x20\xba\x88\xe4\xa0\xc6\x83\xbf\x7e\xd2\xc6\x9d\x70\xcd\x08\x7f\x8a\x95\x7a\xb0\xc2\x62\x72\x9d\xb2\xb3\x8b\x11\xfb\x4f\x5d\x59\x89\x7c\xcc\xc7\xd9\xc2\x2b\xef\x46\x94\xec\x1a\xfa\xba\xde\xb3\x22\x9f\xdd\x85\x9f\x04\x4f\x45\x61\x20\x02\x49\xf0\x96\x80\xb4\xba\x5d\x44\x4c\xab\x4c\xa9\xe7\x6c\x46\xfd\x34\xf1\x6a\x69\x2d\x46\xb8\x3a\x04\x68\x5e\x88\x1c\xc3\x8e\xe8\x9d\x5d\x24\xb8\xdb\xfe\x71\x88\xe0\xa1\x58\x73\x0f\xad\xb2\x81\xe8\x41\x64\x11\x85\xa1\x61\xbe\x63\x2b\xd4\x62\x9b\x09\xb6\x08\x93\x4b\x61\xf9\x8b\x72\xf5\x0b\x81\x99\x8f\xa2\x4e\x5d\xfc\x84\x5b\x26\xae\xa6\x82\xbd\xb0\x6f\x7e\xf7\xed\xb7\x5f\x7f\x3b\x62\xe7\x21\x8c\xa4\x55\x8e\x8e\xce\x8f\x7e\xbd\xfc\xf9\x18\x90\x96\xb7\x4e\x82\xab\x4a\x99\x8d\x2c\xe5\x2c\x8b\xd1\x99\x2a\xdf\x15\x97\x75\x4e\x8e\x3d\xf9\xb1\x78\x50\xf8\x3d\xf4\xb7\xd1\xb1\x0b\x32\x9d\xed\x59\x6d\xde\x74\xbb\x96\x0f\xc7\x40\x09\x36\xb1\x3d\x68\xd9\xce\xe5\x30\x32\x97\x16\xd7\x42\xd0\xe7\x86\x7b\x8e\xad\x1a\xe1\x8c\x49\x78\xb6\x43\x98\x21\x49\xf7\x3d\x07\x68\xc3\x2e\xf8\xf8\x83\x3d\x08\xde\x5f\xbd\xf0\x71\x14\xd2\x2b\xbb\xbc\xf8\x59\x94\x35\xa9\x93\x95\xd3\x89\xbd\x6e\x7e\x1f\xdb\x3d\x4a\x57\xfa\x89\xab\x34\xdb\xb0\x8e\xd8\xc4\xe7\x9a\x70\xa7\xb1\x25\x8e\x5e\x52\x48\xa2\x73\x38\x40\x2a\xfd\x46\x67\x88\xb8\x17\x49\xc4\xa9\x17\x71\xe6\x80\x91\x57\x5b\x3a\x03\xb6\xdb\xda\x7d\x53\x9b\x5b\x4f\xef\x45\xe2\xff\x46\xa6\xec\xc6\xa6\x61\x3c\x5b\xa5\x65\xd5\xd1\xb2\x44\x28\x7f\x14\x31\xfa\x8d\x7c\x64\xe9\xb3\xb6\xb9\x23\x91\xe0\x4b\x14\xc5\x44\x17\xf3\x6d\xbe\xdf\xe4\x64\xbf\x0f\xf6\xca\x24\xbf\xd4\xc9\x4d\x6c\x10\x57\xc7\x17\xf8\x28\x18\x46\xcd\xc8\x30\x1b\x1b\x1c\xfd\xec\xea\xf8\x02\x48\xd9\x08\xfe\x35\xd3\xfa\x06\xe3\x59\x17\xa2\xac\xed\xe5\x5b\x8c\xd2\x7f\xd9\x8d\xb3\x6b\x02\x43\xbd\xba\x1d\xf8\x78\xb4\xc9\xf2\xa7\xdb\xc8\x84\x36\xe5\x51\x26\xf9\xda\xdc\x06\xdf\x88\xcd\x74\x96\xe2\x1e\xce\x79\x9e\xdb\x45\x1b\x8b\xf2\x4e\x08\xc5\xce\x2e\xe0\x4c\x5a\xd2\x88\x91\x7d\x98\xd0\x40\x06\x1c\x04\xa1\xaf\x91\xc5\x55\x59\x1b\x5f\x72\x30\x58\xd9\x17\x31\xd8\x78\xb3\x8f\xd0\x7f\x24\x3e\x54\xfc\xbe\x33\x9d\xf0\xb1\xbe\x15\x30\xbc\x34\x2d\x84\x59\xcb\x75\x57\x5d\xfe\x32\x92\xd2\x5d\xf7\xe5\x6e\x1e\xb8\x4e\x00\x26\x0f\x66\xf6\x48\xdb\x8c\x9d\x83\x65\xd9\x0f\x52\x83\x60\x28\x56\x0c\x80\x1d\x72\x20\x92\xa4\xf1\xfc\xe4\x1f\x3e\xb9\xc6\x13\xd7\x72\xd6\xc8\x27\xce\x69\xea\xed\x70\x24\x44\x20\xb3\xa5\xf0\x80\x9c\x34\x0a\xce\xcc\x62\x9e\x49\x75\x03\x51\xe7\x24\xbd\x5b\xea\x47\xba\x9e\xba\x71\xbc\xba\x10\x3c\x6b\xd7\x35\xb6\x31\xa0\xdb\x81\xe4\x88\xe9\xb6\x8a\x34\xd8\x9e\x96\x6a\xcf\xa1\xdb\x51\x32\xf2\x37\x44\x87\xeb\xbd\xeb\xbd\xa7\x1b\xda\x36\xe7\xee\xec\xf2\xf8\xf2\x6c\x7b\x7b\xe0\x9a\xd7\x1a\x31\x58\x8a\x41\x4b\x70\xd2\x8c\xe8\xdf\xdb\x06\xa9\x37\xdf\x7a\x02\x1f\x2d\xc6\xfc\x5e\xe8\xa2\xe4\x99\xa5\x0c\xff\xb2\xe4\x35\xab\xd4\xea\x51\x4e\x66\x3c\x3f\xaa\xca\xd9\x89\x34\x89\xbe\x15\x31\x2b\xb0\xab\xee\xe1\xc6\x29\x61\xf4\xfe\x05\x76\xfc\xd3\xd1\x05\xe3\x55\x39\x13\xaa\xa4\xb2\x1c\xd1\x00\x1f\xf7\xa9\x4b\x44\x0e\xee\xfa\x21\x6a\xde\xf9\x33\xbd\x1f\xfa\x41\x97\x4f\x9a\xc4\xc8\x68\x3a\xad\x95\x0c\x78\xa9\x5b\x0a\xba\x92\x02\x89\x7b\x75\xe6\xda\x82\x06\x04\xf4\xae\xf1\x7a\x23\x5a\x0a\x0d\x10\xf0\xdd\x33\x55\x8a\x62\xc2\x13\xb1\x14\x80\x8e\xd9\xee\xd8\xb7\xf4\x6d\x20\x2e\x26\xa1\x50\xfc\x1c\x0e\x39\x86\xca\xbc\xc2\x27\x81\xdf\x9a\x42\x68\x1c\x03\x4f\x28\x63\xa6\xce\x1f\x42\xa5\xa8\x05\xfe\xc3\xde\x9b\x36\x9f\x11\x0e\xea\x3f\x2a\x9e\xe1\x64\xce\xdb\x1c\x2c\xcd\x09\xae\xf6\xe7\x56\xce\xcd\xee\xdc\x5b\xc2\x2a\x83\x22\x1e\xb6\x00\xdc\x0c\x14\xeb\x42\xc2\xfb\x8c\x6c\x08\xcf\xd8\x7e\x99\xe4\x07\xdd\xd3\x39\xb0\x57\x9a\xcd\x1b\x9f\xc7\xd1\x11\x47\x09\x97\x3d\x22\xba\x34\xba\x45\x0a\xc4\xde\x48\x43\xf5\xc1\xe8\x07\x69\x98\xc0\xac\x05\x0e\x32\x97\x2e\x98\xcc\x7f\xb5\xe2\xc8\x2b\xbc\xf9\x81\x3e\x2e\x0d\x16\xdd\xc0\xc0\x39\x17\xaa\xb0\x5f\x2e\x72\x99\xf0\x2c\x5b\x78\x71\xd7\xb0\xbf\x7c\xf7\x1c\x08\xe6\xd7\x2f\xbf\x7b\x7e\xb0\x9d\x84\xf4\x11\x5d\xe0\xdb\x46\x3f\x02\xe1\xc3\xc0\x47\x44\xf2\xc5\xe3\x80\x2b\x0c\x39\x6c\xfe\xd6\xad\x90\xc7\x07\xc7\x3e\x0f\x9a\x3c\xa4\xcb\x36\xff\x91\x3b\xbc\xa5\xa9\xa2\x63\xc8\x36\xf0\xe9\x87\xc8\xaf\xbd\x90\xd0\x0b\x09\xbd\x90\xd0\x0b\x09\xbd\x90\xf0\x10\x21\x21\xef\x85\x84\x4f\x52\x48\x88\x27\x14\x7c\xd9\x92\xc2\x36\x79\x10\xff\x10\x8b\x2b\xed\x8a\xad\xb4\x89\x09\x6f\x79\x1e\x40\x02\xdd\x88\x05\xc6\x92\x83\x49\xc8\x97\x3e\x5c\xc9\x8b\x8a\x32\xf0\x1b\xb1\x68\x75\xc4\x03\x06\x74\xcc\xad\x40\x5f\xa4\x50\xf4\x38\xea\xa1\x4e\x23\x24\xa8\x4e\xc2\xb1\xcf\xd9\x58\xe2\x71\xad\x0c\x25\x27\x48\xb4\x7b\x0e\x82\x82\x8d\x08\x78\xe4\x6c\xab\xb8\x1f\xcf\xbf\xff\xfe\xfb\x36\xb0\x7f\x17\x39\x87\xfb\xfa\xd6\x7e\x26\xc4\xf8\x77\x29\x39\x0e\xe2\x1f\x81\x2a\x26\x99\x4c\x28\x30\x0f\xcf\x86\xcb\x95\x02\xf2\xc8\x27\x13\x44\x20\xa5\x02\x20\x76\xec\x03\x96\xc9\x1b\xc1\x26\xe6\xc7\x42\x57\xb9\x2f\x26\xe4\x0a\x3b\x51\xe5\x54\xec\xac\x9e\xab\x11\x65\x57\xb2\x17\x35\x0f\x5e\xc1\x17\x32\x0e\x69\x48\x79\x60\x2b\x74\xc5\x76\xe6\x3c\xc7\x6c\x00\xd8\xa1\x11\x7b\x5b\xe3\x8a\x73\xc5\xf8\xd8\xe8\xac\x2a\x7d\xc4\x01\x3d\x0c\xa3\x02\xa1\x53\x91\xa1\x4c\x88\x41\x8a\xae\x59\x10\xbd\x88\x20\x98\x70\xfa\xa0\xcd\xe3\xac\x6d\x6f\xc2\x6a\x84\x6d\x67\xbe\xae\x4b\x18\xb8\xe7\x92\x60\x97\xd0\x14\xef\xe5\x59\x12\x9b\xc8\xff\x03\x05\x30\xa5\xb2\xdb\x93\x6b\x65\x9c\x13\xdd\x15\x7f\xf1\x7d\x13\x0a\x1b\xc4\xa7\x63\x08\xa9\x29\x2f\x61\xde\x76\x83\x2f\x0a\x71\x59\xea\x3c\x68\x3f\x43\x6f\x97\x19\x34\xac\xc4\x93\xa6\xcf\x17\x6b\x95\x98\xa0\xf4\x93\x73\xb8\x18\x42\x93\x2c\xc5\x80\x55\x0a\x4a\xe1\x36\xdf\xa4\x42\x4f\x50\xe2\x06\x0a\x06\x12\xee\x4b\xc2\xa9\x9e\x0d\x0d\x80\xe0\x70\x8b\x26\xf8\x4b\x8b\xd3\x20\x77\x93\x8a\xd8\x9f\xfd\x7c\xed\xd8\x78\x96\x89\x94\xc9\xf9\x5c\xa4\x92\x97\x22\x5b\x50\xa9\x30\xde\xac\x5d\x45\xc2\x8e\x37\x4d\xbb\x31\xd1\xa0\xcb\xe5\x5a\x57\xae\xb2\x8e\x2f\x90\x45\xa5\xaf\x18\x4f\x12\xed\x81\xb4\x11\x74\x0c\x0f\x9d\xaf\xce\x89\xf7\x69\x9b\xa5\x9e\x69\x7d\xe3\x57\x39\x8e\x2a\xd7\xb1\xbc\xa6\xff\xe7\xd0\xef\xff\x10\x1c\x63\x87\x5f\xd5\x8f\xe0\x87\x6d\xbc\x77\xe4\x51\xb5\x57\x1e\x4f\x57\x64\x53\xe8\xd8\xc5\xb7\x84\xd2\x8a\x78\xeb\x1a\xa7\x15\x1c\x77\xae\xd8\xd1\xc5\x99\x77\x36\xea\xc6\x3a\x12\xc0\x3a\x95\xc3\x72\x95\x39\x0f\xa9\xaa\x1f\x3a\xb9\x5d\x9d\xa5\x01\xcb\x0b\x21\xe6\x30\xba\x41\x9d\x8e\x40\x71\xea\xf0\xa3\x28\x13\xe4\xcf\xc1\xf1\x04\x4a\x43\xc3\x5f\xde\xb5\xa4\xe0\x66\x86\x15\x90\xc4\xbd\x2c\xa9\x72\x56\x08\xfa\x1a\x14\x63\x92\x66\x29\xbd\x91\x3e\xe2\x24\x82\x74\xa9\xbc\xd8\xb4\xb0\xd2\x6e\x2e\x0a\xa9\x53\x06\x50\x60\xa9\xbe\xb3\xe4\x79\x2a\x95\x71\xcb\x07\x97\x9d\xd6\xd9\xee\xa1\xc0\xd8\x4e\x2a\x0b\x3e\x22\x48\xf7\x2c\xf0\x74\xe9\xaa\x4c\x74\x9d\x99\x41\x83\x58\x3e\xee\xc0\x7b\x60\x75\x2b\x10\x2e\xfc\xbe\x38\x46\x5d\x6e\x1c\xf3\x0e\x8e\xbd\x5d\xd8\xfa\x59\xeb\xe2\x40\x3e\x2c\x24\x7c\x7f\xba\xf7\xa4\x6b\x20\x09\xb5\x6f\x11\xb3\xde\xc8\xb9\x2c\xdf\x73\x35\xdd\xc0\x73\x5c\x2b\xcb\xb9\x4d\x7d\xd6\x2b\xac\xe5\x26\x01\x19\x11\xaa\x58\xf2\x64\xc6\x6e\xa4\x4a\xed\xd6\x84\x19\x3a\x9c\xf9\x60\xe0\xcd\x84\xb9\x87\xf1\xdc\x31\x8c\x67\x0f\xaa\xf9\x51\x41\x35\xbf\x08\x1c\x73\xab\x4f\x44\xe6\x98\x8b\xa4\x71\xf1\xe8\xf2\x0b\x05\x3a\x7a\x9c\x60\xee\x72\xa6\x76\x58\x43\xae\xd2\x21\x02\xb8\x6d\x55\x74\xdb\x51\x31\x3b\x89\xee\x5a\x6b\xf3\xb5\x9d\x15\x81\xa9\xfb\x3d\x2b\xc5\xbc\x1b\xf9\x3d\x43\x84\x0c\x17\x51\x36\x97\xea\x70\xce\xef\x43\x32\x4c\xd8\x8d\x8b\x25\x3c\x93\x39\x2f\xa1\xea\xab\x56\x40\x9d\x37\x9a\xb3\xed\xb3\xd5\xe4\x2f\xd4\x25\x23\x58\x25\x64\x3c\xf0\xdf\x2c\xea\xf2\x68\x34\x2c\x52\x5f\x83\x71\x41\x0c\xaf\x0c\xb8\x04\x36\xb4\xc4\x05\xf3\x69\xb7\x41\xe6\xd8\xf6\xd0\x8f\x7c\xf5\xb2\xff\xa8\xb8\x2a\x65\xb9\x00\xa3\x14\xcd\xf0\x3d\x92\xa3\xd6\x89\xd2\x73\x17\xc8\x9e\xae\x9b\xbe\x93\x33\x3b\x2c\x40\x51\x77\xfb\xc7\x2d\xc1\x9c\xdf\xc7\x0c\x2d\xee\x90\x25\x5a\x99\xb2\xe0\x12\x12\x31\xc9\x54\x01\xfc\x7e\x79\x66\x7f\xcc\xd0\xf1\xaa\xe0\x3a\xbe\xb7\x1c\x3f\x3a\x97\x95\x56\x91\x74\x41\x3b\x87\xb4\x9e\x12\x18\x62\x66\xfc\x56\x40\x49\x26\xdc\x27\x44\xde\xb4\x87\x16\xcd\x23\x85\x40\xe0\x37\x8f\x17\x89\x45\x9a\xb0\x49\x2a\x6f\x65\x2a\x68\x9d\xfc\x3e\x93\xaa\xcb\x21\x2d\x52\xfc\xab\xe2\x99\x93\x34\x84\xaa\xe6\x88\x62\x8a\x47\xe7\x6f\x4b\xe2\x8c\x8b\xb9\xbb\x67\xe3\xaa\x30\xa5\xb7\xb0\x37\xc7\xfd\x47\xec\x42\xac\xfa\xf8\x5b\xa9\x3e\x83\x03\xb4\xbe\x94\x40\x93\xa2\x52\x59\x3b\xbb\xb5\x1c\x32\x56\x41\x78\x79\x34\xda\xef\xe1\xea\xc8\x36\xf2\x8f\x4d\x48\xfb\xcd\x96\x4d\xb8\xfd\x40\xb4\x07\x63\x7d\x0f\xbc\xff\x69\x48\xec\x2d\xc0\xfb\x56\x00\x30\xad\x3b\x88\x8b\xf4\x20\xe3\x0e\xd4\x77\x85\x05\x3f\x44\xfd\x7a\x98\x20\x9a\xcb\xd0\x0f\x73\xe8\xb5\xd6\xc3\x1d\xa4\xa9\x04\x9a\x67\x0f\xfb\xdf\xc3\xfe\x3f\x0d\xec\x7f\x70\xc8\x76\x84\xfd\xbf\xa4\x0d\x74\xa2\xba\x0d\x9d\xa9\x5d\x6a\xf7\x17\x2d\x10\xd9\xbb\x0a\xec\xa8\x85\xad\xd2\x65\xfa\x3d\x3e\xb8\x95\x5a\xe2\x4b\x8a\x06\x91\x93\x5a\xba\xf1\x4a\xde\x4e\xef\x3f\xa8\x3f\x31\xd0\xdb\x0d\x5b\x0a\xef\xb5\x6e\xd3\x26\x96\x68\xc5\x39\x48\x5d\xa8\x29\x29\xcd\xd7\x97\xbf\xae\x7d\x46\x37\x0a\x2c\xa5\x0b\x02\xa4\x5b\x4a\x90\xeb\x19\xe5\xa7\xc7\x28\xdf\x34\xf7\xf4\xe1\x07\xb6\x49\x8e\xa8\x70\xfa\xe8\x3d\xbf\x3b\xbd\x2f\x85\x32\x98\xc3\xd3\xf3\xaf\x9e\x7f\xed\x90\x7f\x75\xe1\x4f\xed\xfc\x2c\x7a\x46\xdb\xe8\xa4\xe6\xe9\x0f\x3c\xe3\x2a\x11\xc5\x99\x9a\x16\xc2\xac\x4d\xfb\x8a\x34\x5f\xd6\x48\xeb\xba\x0a\x9c\x65\x9a\xa7\xc3\x31\xb5\x67\x92\x5e\x80\x33\xfa\x8a\x95\x05\x9f\x4c\x64\x02\x04\x07\x6a\x85\x7b\x64\x1b\x51\xdc\xca\x44\x34\x10\x27\x31\x44\x90\xab\x66\x27\xdd\xf3\xc2\xda\xd3\xc2\x20\x42\x8e\x02\x7d\xd6\x8c\x37\xe0\x82\x27\xe7\x97\x94\xeb\x1e\x04\xcb\x1c\xfd\x72\xd9\x7c\x3d\x84\xb0\x0f\xa8\x55\x3c\x79\x6c\xeb\x31\x9c\x5d\xac\x0e\xe1\xc7\xe3\x53\xa6\x0b\xf6\x2e\x17\xea\xb2\xe4\xc9\xcd\xe6\xf1\x6c\x15\x9c\x10\x6c\xfd\x25\x9a\x5e\x3b\x1e\x14\x6c\xdd\xf9\x9c\x6c\xde\x54\x59\x1f\xd4\xa5\x95\xa4\xd5\xaa\xf5\xa3\x00\xb7\x76\x69\x29\xdd\x69\x6b\x7e\x9b\x5d\x6d\x7f\x2a\xcb\x99\x30\x62\xa9\xfb\x9d\x48\x48\x91\xbb\xd9\x5d\x4c\x8a\xbc\xdc\x4a\x03\x22\x61\x59\x6b\xf7\x76\xb5\x7d\x8d\x15\x24\x94\xae\xa6\xb3\x65\x6c\xe0\x4c\x60\xb0\x6f\xa6\x13\x5e\x0a\x8a\x10\xa2\x77\x53\x0f\xff\x5b\x57\xad\x69\xe2\x03\x6d\x3e\x12\xf1\x3b\x1e\x82\xc3\xd2\xe7\xca\xad\x95\x63\x7d\x6b\x77\x5e\xdc\x1d\x52\xe9\x9c\xe1\x9d\x2c\x67\x43\x92\x2b\x0e\x61\x8c\x87\x5f\x61\xee\xe9\x23\x2f\x58\xc2\xb3\xae\x01\xf2\xd0\x38\xbc\x52\x98\x24\x99\x2d\x86\x1e\xaa\x9c\xe2\x8d\x31\x50\x49\xe9\x54\x30\x7b\xb2\x2d\x1b\x64\xfb\x3f\x88\x92\xb3\x89\xe0\x96\xe1\x1d\x3c\x28\x6d\x73\x7b\x48\xf1\xb3\xda\x50\x06\x21\xfb\x54\x1d\x5c\xb0\x0b\x9f\xc1\x09\xde\x7b\x96\x0a\x7b\xd1\x3e\x3a\x06\x39\x8a\x66\x08\xdb\xc9\xab\x52\x0f\x8d\xc8\x00\x60\x16\x3e\x8f\x5f\xef\x50\xee\xa5\x3d\x60\x6d\x52\x65\x98\x77\xea\x24\x6e\x0a\xd1\xa3\xac\x56\xbb\x45\xb0\x4a\x14\x33\xe7\x02\x39\xc3\xfc\xd7\xa2\xb1\x44\x6c\x3f\x95\xe6\x66\x50\x83\x7e\x0e\xd8\x68\x34\xea\x16\xa0\xd9\x7e\x0e\xcf\x5f\x5f\x3e\x2c\x4d\xe3\xfc\xf5\x65\x67\xa0\x25\xdb\xf6\xc9\x13\x8e\x51\x51\x6b\x0d\xeb\x5c\x87\x8c\x42\x30\x94\xe2\xbe\x79\xce\xec\xb0\x49\xfd\x7b\x6c\xf8\xbf\x9a\x44\x65\xdf\x07\x86\x45\xdb\x81\xe1\x60\x77\x0e\x4c\xf4\xe0\x49\x35\x82\xad\x8b\x68\x91\x03\xd4\x68\x9c\x19\xc2\x09\x6b\x76\xb7\x57\x33\xea\x9f\x7a\xed\xb7\xba\x23\x21\xba\x5e\xdb\xed\xa8\xd1\xef\x00\x10\x34\x45\x10\x90\x44\x53\x06\x38\x3c\x06\xd4\x5a\x3b\xc3\x79\x95\x95\x32\xcf\x02\xa6\x07\x62\x8c\xa6\x40\xe1\x3e\x66\xa6\x8f\x99\xf9\xb2\x35\xfa\x3f\x53\xcc\xcc\x58\xcc\xf8\xad\xd4\x1e\x2b\xab\x0e\x8d\xfb\x74\xa3\x67\xfc\x18\x31\x78\x06\xab\xa7\x56\x11\x25\x8c\xd4\xbd\x3a\x3a\x1d\xce\x2e\x54\x71\x2d\x1b\x5a\xdf\xe7\x35\x6b\x7c\xb3\xab\xfa\xd5\x5c\xad\xf5\x3c\xe4\xd2\x0d\x6a\x47\x81\x45\xbe\xe3\x63\xad\x52\x8f\x74\xbf\x91\x4b\xf9\xd6\xb5\x2e\xe7\xe0\x23\xf9\x58\x57\xb8\x77\xc0\xab\xd6\xea\x65\x2b\x61\x44\xfe\xa4\xac\x3a\x27\xb8\x29\xaf\x0a\x0e\xe5\x64\xb4\x72\x15\x81\x1f\x7e\x17\x5d\x5d\xdf\xb9\x30\x86\x63\x44\x6b\x4c\xbe\x32\xb8\x20\x2b\x8f\x36\x1c\xe8\x3a\xd6\x38\x25\x61\x9b\x80\xb6\xae\x0a\xcb\xce\x5e\x5b\x01\x6a\xc0\x3e\x28\xf0\x15\x44\x55\x83\xf5\xe1\x05\x35\x1a\x2e\x9c\x72\x9d\x65\xa2\xa8\xbf\xf6\xf8\xc8\x82\x6e\xa5\xfb\xfd\x71\xd8\xe4\x41\x69\x34\x6c\x7a\xa4\xfd\xa3\x3e\x9a\xe0\x13\x91\x65\x36\x45\x13\x84\x4e\xc0\x5a\x6c\x75\xfe\x3f\x8a\xce\xcf\x20\xa9\x74\xf7\xd6\x13\x38\x29\xbb\x08\x29\xa8\xa5\xf2\xde\x23\xd3\x7b\x64\x9e\x26\xa2\xa0\x3e\x63\x3b\x0a\x28\x68\x4a\x0a\x5d\x08\x2e\x89\x93\xa1\x78\xc5\x4b\x5c\x44\x8c\xf0\xdd\x2a\xd7\x62\x22\x15\xcf\xe4\x6f\x51\x40\xdb\xd7\xfe\x19\x5c\x19\xc5\x74\xce\xff\x55\xd5\xa4\x02\x49\x1b\x85\x2b\x90\xb5\x0e\xab\xbb\x21\x84\xe3\x9c\x2b\xa1\xca\x6c\x81\x45\xf1\x1d\x41\xc1\xeb\x41\x3a\x79\x57\x82\x52\x72\x73\x63\x0e\x79\x3a\x97\x4a\x9a\x52\x14\xc3\x04\x71\x91\x3b\x92\x90\x15\xd6\xf9\x10\x65\x7f\xb3\xdb\x63\xa9\xa9\x5d\xb5\xd0\x10\x8e\x72\xd4\x66\x79\xb8\x43\x7d\x78\x12\x0b\x22\x9b\xf6\xbe\xe9\x67\x21\x8e\xc5\x6f\xb9\xcc\xf8\x38\xb3\x9b\x60\x44\x71\xcb\x31\x63\x14\x3e\xec\x97\xf0\x99\x69\x0c\x4c\xec\xc2\x8b\x11\x91\x46\x7f\x1f\xec\xdd\x0f\xeb\x3d\x1e\xe6\xbc\x4c\x66\xc3\xb9\x28\xa6\x62\x08\xb9\xd6\x4e\x70\x8c\xb4\x32\x65\xc1\x4b\x31\xb5\x8d\xe0\x05\x30\xb9\xce\xb8\x89\x08\x56\x17\xf6\x67\x5f\x29\x9f\xe6\x55\xa7\xac\xc2\x5b\x4e\xaa\x53\x6b\x75\x91\x47\x9f\xc7\x2d\x13\xe5\x23\x6b\xd6\x46\x3d\x28\xbd\xbc\xf5\x40\xea\x54\x20\xbb\xb3\xfc\x57\x14\xe8\x08\x90\x8a\xfd\xa3\x9e\x12\x3b\xe5\x09\x79\x08\xc0\xaa\x48\x51\xce\xab\xa5\xe9\x48\x0e\x48\x78\x32\x13\x6c\x5f\x8e\xc4\xc8\xfe\x24\xca\x24\x3d\xe8\xed\x53\xbd\x7d\xea\xcb\x96\x6f\xfe\xac\xf6\x29\x4e\x8e\xa9\x4f\xcc\x2e\xa3\xd3\x8d\x86\xa8\xb7\xda\xc0\xb5\x47\x11\x04\xd9\x1e\xf8\x45\x43\x75\x1e\x27\x77\xe1\xcb\x8d\xb9\x18\x3f\xf2\x20\xbe\x77\x9e\x93\x4f\xd9\x46\x65\xd7\x62\x4b\xf3\x94\x5b\xbe\x56\xa6\xb2\x73\xa3\x94\x4e\xc5\x11\x3a\x74\x36\xf1\x2b\x6a\x56\x9b\xa1\x42\x11\xca\xa7\xb9\xe8\xd4\x8a\x2b\xab\x08\xce\xeb\x0c\x51\xd4\x3a\x62\x70\xa8\x47\xb6\xea\xb7\x45\xdf\xf9\xca\x87\x36\xd9\x75\xce\x83\xd7\xc0\x6d\xed\x0d\x46\x2e\xf4\x68\xc0\x4e\xef\x91\xe7\x20\x54\xcf\x99\x72\x7f\x3d\xd6\x85\x6b\x57\x91\x9c\xfd\x1b\xa5\x03\x1f\x15\x00\x5c\x63\x5a\xe8\x2a\x07\x73\x54\xe3\x99\x65\x99\x69\x95\x59\xee\x51\x54\x59\xdc\xb0\xb3\xe4\x5d\x85\x80\x8b\x42\xa4\x27\x95\x9d\xc0\xa5\xef\xe0\x6c\xaa\xb4\xff\xf9\x14\x80\x05\xa2\x42\x81\x5d\x7a\xfa\xac\xc3\x0f\xc0\x3e\xa1\xb0\x06\x3d\x60\xb9\x4e\x81\x91\xdb\xe1\x92\x26\x62\x78\x29\x0d\x95\x7f\xf4\x13\x10\xf7\x96\xab\x81\xe3\x33\x00\x44\x83\xdb\xee\x8a\x58\x0d\xd8\xb8\x2a\x99\x2c\x81\xdb\x25\x33\xad\x8d\x20\xea\x87\xfd\xde\x4a\x0d\xa2\x02\x6e\x63\x81\x15\xa8\x89\x8c\x04\xdd\x63\x54\x41\xfd\x9a\x34\x6c\x0e\x20\xdb\x6e\x41\x9c\x48\x6a\xbb\xa9\x2b\xcb\x01\x76\x88\xb1\xec\x73\x6e\x3b\xbd\x13\x72\x3a\x2b\xcd\x80\x81\x98\xe5\x53\xeb\xeb\x6e\xe7\x02\x6a\x5c\x67\x99\x1b\x42\xb8\x45\x75\xfe\xa1\x61\xfb\xcb\xf9\x85\x03\xf7\x7c\x65\x6b\xa2\xcb\x85\x28\x16\x07\x03\x46\x09\x21\x56\xb4\xa8\xe6\x76\xe9\x64\xe9\x02\x2e\xca\x59\x01\x51\x3f\xb0\x14\x19\x7d\x58\x37\x2a\x84\x59\x71\x8a\xa7\x00\x6a\x72\xbd\x87\xb3\xbb\xde\xf3\xe5\xc0\xaa\xb9\x03\xc3\x80\x19\xba\x74\x55\x34\xb8\x16\x88\x56\x03\xef\xc2\x93\xd3\x7a\x74\x7f\xf3\x2f\xed\x9b\x83\x7a\x39\x67\x72\x3a\x73\xab\xc9\x09\xd6\xa2\xb9\x0b\xbb\xd0\x6d\x2e\x5c\x67\xf5\x12\x5e\x89\x62\x4e\xf8\x66\xf1\x35\xee\x7a\xfc\x09\x43\xc6\xef\x48\x63\x4f\x5b\x4e\x30\x4c\xd5\xca\x59\x73\x51\x32\x7b\x13\xea\x9d\x2d\xa5\xa5\x37\x25\xd5\xc5\x81\xdb\x44\x02\x99\xbb\x4a\x29\xd3\xae\x60\x24\x85\xa2\x3c\x64\x04\x89\xe0\xc6\x17\x47\xa2\x51\xe8\xb9\xc0\xb0\x38\x96\xc2\xac\x61\x08\xc2\x4d\x9d\xed\x8b\xd1\x74\x14\xa0\xb3\xa0\x84\x78\x30\x08\x18\x31\x5c\x49\x40\x6a\xc1\x90\xfc\xb2\x00\x13\x43\x80\x27\x22\x6e\x25\x41\x53\xd9\xce\x41\x40\xb5\x42\x28\xcc\x64\x5b\x5e\x0a\x71\x3f\xba\x3b\xc6\x46\xe3\xa5\x28\x41\x6e\x3b\x28\x6b\x98\x65\x37\xe7\x4d\xd8\xb0\x66\x98\xde\x3c\xb0\xc2\x3a\xb9\x5f\x91\x47\xfa\x6d\x7e\x12\xbc\x28\xc7\x82\x97\xce\x6d\xb3\x14\x9f\xc6\x4d\x09\x67\x8e\xdd\x09\x36\xd5\x65\xbd\xaf\x68\xa0\xc2\x42\x9a\x0d\xef\xc6\xe3\xfd\x3e\x71\x7f\x52\xdb\xc0\x1a\xce\x1c\x04\x7b\x94\x64\x9b\xb2\x94\x99\xc4\x44\x38\x92\x00\x5f\xb6\x9b\x31\x06\xbe\xa9\xa5\x78\xe4\x6a\xce\x15\x44\xea\x80\x95\x86\xda\x31\xa9\x52\x00\x17\x54\xd3\x25\x6f\x5c\x06\x13\xf1\xb3\x6d\xa9\x47\xea\x9c\x5d\xcd\x6f\xed\x8f\x0b\x29\x26\x07\x0d\x60\xa1\x70\x35\x9e\x99\x4e\xdd\xff\xd1\x0e\x33\xcb\x29\x3e\xbe\x83\x0c\xaf\xdc\x44\x4e\x37\xc7\xc7\x2d\xb7\x0d\xab\xcd\x30\x62\xca\xc1\x44\xea\x1c\x4c\x80\xad\x4d\x4a\x2a\xe6\x63\xaa\x31\x12\xd7\x7d\x71\x9f\x64\x15\xf2\x41\x52\x0e\x0f\xbc\xe1\x55\x69\x35\x54\xb2\x43\xa4\x10\x7e\xe9\x2d\x8f\x84\xa2\x1f\xbb\x47\x28\x0c\xfa\x10\x5d\xc4\x55\x3c\x47\x99\xdb\x37\xda\x82\xae\xfa\x77\x56\x96\xaf\x2b\x91\x6d\xef\x61\xf3\x46\x6d\xb6\xdb\x2e\xb5\x5d\x32\xaf\x9b\xe5\x03\x3d\x91\x53\xc6\x8d\x91\x53\x85\x0c\xd0\xbe\x3f\xb2\x0a\xd5\x28\x1c\x59\x07\xa3\x58\x52\xca\xdb\xc8\x11\x3f\x82\xdf\xa1\x2c\x71\x41\x76\xdc\x64\x26\x92\x1b\xe0\xa2\x22\x75\x43\xf0\xf2\x92\x44\x0c\xc0\x5b\x91\x2d\xb0\x32\xf4\x88\x51\x17\xc0\xe9\xbd\x49\xc7\x05\x95\x86\x16\x51\xb2\xb2\xb9\xd9\x1d\xb9\x69\xe1\x37\x06\x4c\x37\x9b\x5b\x02\xfa\x0f\x7b\x63\x7f\xd4\xba\x6e\x94\xc2\x06\xda\x83\xa9\x15\x73\xb0\xd2\xbc\x2c\x01\x1e\x0d\x71\xec\x2a\x42\xea\x5b\xfa\x00\x21\x45\x82\x97\x91\x2b\x26\x8a\x42\x77\x21\xb5\x0d\x8e\xdd\x3c\x50\x83\x3d\xb7\x35\x91\x85\x75\x1f\xef\xbc\xb4\xb0\x80\x24\x6f\x54\x46\x8c\xd8\x2f\x33\xa1\x5a\x36\xdc\xee\x03\xd9\xb7\x06\x75\x0f\x75\xf7\xe4\xac\x31\x46\x27\x92\x07\x1f\xcb\xf9\x22\xd3\x1c\x70\xdc\x32\x08\xec\xc6\xb8\x5e\x9e\x69\x35\x75\x75\xc3\x0b\x91\xe8\x22\x0d\xf9\x81\x4f\x51\xc0\x5e\x02\xbd\x03\xee\x2d\xd9\x37\xc1\x5c\x0a\xaf\x96\xda\x69\x35\x56\x32\xa2\x4f\xd7\x83\x1b\x10\x08\xa1\x5b\x97\xfa\x45\xa9\xfc\xa6\x8d\xea\xed\x83\x78\x52\x9c\xad\x77\x11\xd3\x45\x41\x74\x44\x8c\xba\x87\x1e\x66\xdc\xb0\xb1\xb0\x1c\x3f\x5c\xea\x52\x13\xa8\xfb\x2f\x2e\x14\xfc\x1f\xd5\x58\x64\xa2\x44\x00\x36\x42\x43\x84\x7a\x3e\x65\x81\x00\x0b\x6c\xce\x6f\xe2\xc7\x08\x7e\xc3\x33\x4f\xbf\x8c\x17\x90\xdc\x01\x7a\x8d\x02\x9b\xad\x4c\xb9\x37\x80\x36\x46\xe2\x36\xc0\x1b\xbb\xe1\x56\xfb\x49\x3f\xf2\x38\xc2\x99\x5e\x3d\x8b\xa7\xf6\xe7\x46\x25\xcd\x05\x00\x0c\x66\x62\x8e\x4b\xaf\x12\x99\xb9\xe1\xae\x9e\x35\x92\xd5\x1b\x73\x1e\x31\xe8\x14\x0d\xb6\x3a\x49\xaa\x62\x80\xba\x23\x82\xa0\x0f\x96\xae\x64\xbd\x06\xed\xfd\xe3\x81\x0c\xee\x8d\xdd\xd0\x35\x1d\x81\x08\x4e\xcb\x19\x9c\x74\x38\xc5\x2b\x1f\x59\xee\x07\xde\xd2\x85\xdb\xab\xe8\x4e\x13\xaa\xe2\xf2\x44\xad\xa6\x91\xca\x09\x26\x79\xb8\x24\x9f\xbb\x99\xcc\xac\x0e\xa1\x12\xfb\x01\xbf\x46\xbc\xc8\xa4\x28\x90\xd6\x18\xa7\x7f\xe8\x3b\xe5\x3e\x5f\x4f\xc7\xbe\x86\xcd\x0e\x6a\xa5\x89\xb0\x6d\x01\xd5\xae\xd0\x59\x36\xe6\x09\x14\x97\x6a\x90\xc6\xd0\x81\x60\x74\x76\x2b\x18\x4f\x0a\x6d\x8c\x3f\xe3\x85\x80\x43\x3d\x62\x6f\x78\xb9\x3c\x18\x77\x6e\xeb\xa5\xc0\x6a\x74\x11\x4a\x75\xe0\x48\x7c\x87\x31\x81\xd1\x9d\x5c\x1e\xf6\x9b\x09\x87\x52\xf9\x70\xdf\x2a\x83\x8a\x54\xae\x8d\x91\x63\x44\xd1\x75\x23\x07\xb5\x1e\x4e\xeb\x78\xc1\x26\xf2\xde\xdf\xa1\x25\x4e\x28\xd5\xea\x16\x63\x01\xd6\x84\x2b\x36\x91\x64\x02\xc0\x90\xe6\x15\xdd\x24\x15\xe3\x6a\x3a\x85\x0a\x72\x0b\x66\x04\x18\x4c\xe9\x43\xf8\xf1\x5a\x26\x6e\x10\x8b\x4c\xbb\x73\x8f\x52\xcb\xcc\x4a\xd2\x43\x2f\x49\x07\x97\xce\x5b\x6b\xa0\x31\xb8\x38\xff\xc6\x48\x0e\xc4\x62\x12\xb0\xc0\x9e\x81\xe9\x02\xf6\xdb\xf7\x4d\x25\xce\xc7\x95\xaf\xdb\x88\xc7\x21\xf3\xa5\xc9\x4c\xc9\xc7\x32\xb3\xda\x32\x7d\x0a\xdf\x2d\xc5\x7d\xb9\xbc\xff\xc4\x77\xe3\x26\xc5\x2c\xdc\xb6\xb8\x16\x53\x33\xe1\xed\x78\xd9\x84\x67\x19\x73\xc7\x03\x92\x70\x64\xc9\x84\x02\x40\x50\xcb\x35\x1c\x13\xee\xc6\xbe\x91\xeb\x2c\x13\xe3\xb1\x48\xf4\x9c\x84\xa7\x98\xc0\x50\x27\xff\xc0\xb8\x52\x81\x50\x9c\x22\x80\x30\x5e\xee\x52\x1a\x58\xdc\x0c\x0b\x5d\x82\x51\x28\x29\x09\xc5\x5a\x7a\xbf\x75\xb6\x60\xd2\x52\xba\xb9\x70\xb5\x40\x38\x7b\xf1\x7c\x38\x97\xaa\x2a\x05\x33\x9a\xdf\x38\x8c\x4f\xe0\x2e\x76\x6e\x7e\x28\x19\xe5\x54\x01\xc7\xd2\x93\xd8\x08\x6a\xe7\x55\x54\x58\xb2\x4d\x88\x1e\xd3\x2c\x04\x22\x61\x02\x37\xc5\x0f\xc3\x7d\x6b\x5d\x9f\x11\x3b\xd7\xa5\x33\x1c\x4e\x22\x54\x19\x39\xa3\x80\x34\x0f\x25\x33\xb6\x6f\xf7\x85\x84\x06\x4a\xe7\x20\xcb\x49\x73\xdd\xed\xcd\xc8\x8c\x6e\x20\xe6\x86\x1d\x0d\xec\x98\xb8\xdb\xe4\x46\x87\xc1\xe4\x78\x76\xc7\x17\xc6\x5e\xf8\x6a\x2e\x52\x36\x85\x11\xdb\xfb\x1d\x5c\x07\xe0\xd0\xd0\x82\xb0\xc3\xeb\xa8\x07\x32\xda\xcf\x45\x39\xd3\xb0\x2e\x6e\xe3\x6b\xea\x1c\xdc\xa0\x60\x9f\x95\x30\x66\x60\x77\x13\x16\x12\xed\xb3\x88\x78\x53\xd0\x5a\xd6\xfa\x93\x3d\x22\x44\x21\x26\x55\x59\x15\x5b\xdb\x7f\x1e\xa4\x9e\x6c\xa3\x95\x9c\x70\x31\xd7\xea\x34\x2c\xef\xbe\x4e\x31\x59\x6a\x0e\xd1\x37\x86\x90\xf9\x75\x2e\x48\x05\x49\xa1\x95\x61\x45\xa5\x14\xc9\xe1\x10\x5a\xde\x62\xee\x59\x42\xb8\x47\x9a\xe4\xbe\x11\x91\x55\x9c\xa3\x57\x3b\xe4\xed\x40\x54\xcb\xa0\xcc\x1f\x25\x64\x75\x5d\xe9\xe6\xac\x3a\xaf\xf3\xd2\x6b\x6b\x56\x79\x63\x00\x2b\xb5\x71\xe6\xf8\xbb\x99\xce\xea\xd0\x26\x4b\x24\xcf\xc1\xa7\x80\xd3\x85\xa0\x08\x10\x61\x0b\x31\x85\x88\x0f\x27\xd4\xcc\xb9\xfd\xab\x8f\x74\xfd\x34\xa2\x22\x36\xc0\x81\x80\x9b\x68\x17\x51\x4d\x3a\xed\xa3\x4c\xfb\x28\xd3\x27\x8b\x32\xb5\xc7\x6b\x57\x01\xa6\x3a\x15\x17\x85\xbe\x5f\x60\xd1\x91\x8d\xec\x26\x6c\xeb\x68\xe3\xbf\x2a\x51\x2c\xea\x62\x20\x81\x31\x30\xb7\xad\x01\xcf\xbe\x0f\x01\xeb\x43\xc0\x3e\x63\xe2\xb3\x26\x1b\x9c\x2e\xc1\x87\xf7\x6f\x7c\xfa\xbe\x15\x94\x27\x4b\x96\x51\xbc\x0a\x41\x11\xfb\x25\x57\xdb\x43\x23\x39\xde\xfb\x23\xb0\xe1\xe6\xfa\x86\x2e\x5a\x9b\xc2\xad\x75\x81\x57\x60\x81\xb1\x01\x1e\x94\x7f\x39\x30\xd9\x85\x7a\x19\x81\x05\xf9\x5f\x1d\x1e\x16\x22\x13\xdc\x08\xe3\x76\xe1\xa7\xd3\xa3\x13\x0c\x80\x4d\x85\x55\x7d\x3c\x5c\xa9\x5d\x62\xf8\x12\x44\x45\x90\xab\x6a\x93\x50\x74\xcc\x73\x9e\x00\xc4\xe9\x32\xa9\xf0\x4f\x56\x5d\x14\xf4\x64\x19\x4f\xa6\x0e\x70\xae\x71\xf4\x7c\xf8\xda\xc7\x86\x92\x7d\x32\xd0\xd7\x86\xab\x79\xcd\x71\x38\x42\xc5\xda\x50\xd3\xe5\xc5\xaa\x54\x60\x0d\x71\x06\x78\x3d\x69\x44\xb6\x00\xca\x02\x50\x7e\x80\xec\xb8\x05\x2c\x0a\xab\x30\x3a\x31\xea\x6f\x2e\xbe\x05\x54\xda\xa5\x2f\xbc\x7b\xef\xe3\x52\x68\x0c\x01\xcd\xae\xe3\xec\x9a\xa3\xb4\xca\xe0\xc6\x43\xa3\x82\x25\xb8\xb2\x2f\xac\x9e\x9e\xd5\x26\x91\x28\x79\xec\x71\xc4\x8e\xbc\xcc\x1f\x1b\x0c\x98\x37\xe0\x9f\x10\x5c\xf1\xee\xfd\x6e\x22\x47\xce\x97\x46\xd8\x1d\xd8\x67\xe5\xcd\x0e\x27\xe5\x7d\x1d\xb9\xb1\xdd\xa1\xa9\x61\xcc\x91\x9f\xf8\xb5\xb1\x1b\xef\xc3\x0d\x90\x15\x0e\x18\x67\x37\x62\x81\x5c\x13\x72\x45\x44\xc1\x7d\x63\xa8\xd6\x45\x4c\xfd\x46\x2c\x9c\x45\xbe\xda\x9c\x23\x88\x95\xd9\x5c\x6f\x5b\x54\x67\xc3\x03\x0c\x15\xc0\x9c\x51\xc9\x4f\x60\x2d\x64\x73\xf0\xb5\xb5\x90\x27\xb6\xef\x67\x86\x0a\x91\x69\x05\x98\x25\x20\x1b\xd1\x2d\x71\x22\xc2\xcf\x3c\x93\xa9\x5f\x0f\x3c\x48\x67\x6a\xc0\xce\x75\x69\xff\x73\x7a\x6f\x15\xfa\x01\x3b\xd1\xc2\x9c\xeb\x12\xfe\x1c\xb1\x1f\xc9\x21\xf3\x26\x5e\x57\x0e\xfb\x8e\xec\xa1\x62\x70\x28\xed\xf7\x43\xf6\x6f\xbc\xcd\xca\xef\x8b\x34\x96\x01\xeb\xc2\x8d\x03\xe4\x2d\xcc\xe8\xc1\x2e\x42\xcf\x32\x98\x3e\xa3\x7d\xe0\xf0\x6d\x3f\xe1\x04\xd6\x74\xd7\xde\xd5\x8f\x00\xf4\xf2\xa6\xf5\x65\xca\x4c\x30\x52\x4d\x33\x1f\x68\xe6\xe0\x3a\x5d\x75\x3b\x10\xe2\xf2\x42\x38\xfb\x9f\x62\x54\x5f\x8e\x8c\x85\xd8\x1f\x8a\x90\x19\x4f\xa0\x30\x54\x81\xe6\x75\x4a\x2e\x91\x09\x83\xdc\x12\x06\x29\x27\xdb\x94\xb5\xdc\x96\xb5\x37\x2e\xf2\xfa\x9b\x59\x65\x19\x60\xc4\x43\x7a\xd5\x2a\xa5\xf2\x21\x73\x4a\xd7\x30\xd0\x58\x3c\x2a\x88\xda\x42\x92\x8c\x21\x71\x47\xe7\x27\x58\x06\x50\xb0\x2b\x9d\xeb\x4c\x4f\x17\xe1\x70\xa8\xd0\xae\x33\xa6\xc2\xf5\xaf\xc6\x74\xb2\x9d\x65\x29\x7c\x61\xb3\xfc\xbf\x1c\xbb\x17\x9b\x67\x9c\x16\x37\x26\x31\x5e\x38\x43\x22\xdc\xf0\x9d\x60\xad\xb5\x51\x4b\x2c\x2b\x50\x26\xb3\xd7\x52\x64\xe9\xe3\x47\x0c\x71\x1c\x4f\x3c\xe2\x07\x30\x92\xb0\x83\x75\xfc\x64\x53\x8a\x22\xb5\x69\xcf\x4e\x44\x00\x43\x1f\xb4\xe0\xca\x03\xdf\xc9\x72\xd6\x35\x70\xa5\x0e\xbb\x59\x09\x98\x5c\x2a\xe1\x60\xbc\x23\x73\x2a\xca\x48\x94\x0d\x2a\x31\xf6\x02\x9c\x2c\x14\x9f\xcb\x84\x6c\x9a\x68\xc7\x75\xf8\x68\x6c\xca\x4b\x51\x13\x2f\x65\x65\xcc\x1a\x16\xd0\x99\x41\xbd\x87\xc4\x45\x42\x3e\xd6\x67\xec\x22\xc3\x4f\x56\x67\x7a\x62\x79\x50\x82\x2a\xd4\xb9\x2e\xc1\x56\x49\x16\x5c\x83\x64\x10\xec\xfa\x7e\x28\x23\xf6\x1e\xf3\x2f\x29\x48\x14\xbc\xf3\x2f\x46\x2f\xbe\x06\x51\xbf\xd6\xb6\xa4\x31\x55\x2d\xea\x7f\xf7\xe2\xaf\xdf\x7d\x17\xd5\x94\x74\x7a\x7c\x76\xf2\x3e\xa2\x2c\xe1\x83\x65\x51\x30\xd7\x29\x3b\xbb\x60\x05\x18\xec\xbd\xaf\x30\x0c\x35\x5d\xf3\x95\xc8\x95\x73\x4f\x96\xbf\xe3\xbe\x61\xa2\x1f\x81\x1d\x43\xc8\xed\xf1\x82\x5d\xe8\x94\xca\x4f\xf0\x32\x0c\x77\xf5\x71\xac\x61\xdd\x6c\x3c\x4d\xcf\xcb\x19\x13\xaa\x2c\x88\x17\x21\x3c\x37\xcd\x0f\xa6\x4d\x6b\x7d\x46\x01\xe4\x54\x4c\x94\x97\x18\x78\xfc\x82\xd4\x70\x1f\xca\xad\x27\xec\xec\xe2\xf6\x1b\x60\xf2\x67\x17\xb7\xdf\x6d\xc1\x67\xba\x67\x46\x22\xf0\x54\x11\x3b\x45\x67\x27\x61\x0e\x4c\x23\x9c\x09\x55\x79\x5d\xa5\x0e\xb9\xca\xe7\xfe\xa1\xca\xf8\x8a\x2a\x82\x5f\xd0\xd3\x73\x5f\xf8\xfb\xd5\xe1\x61\xf3\xd1\x25\x2e\x62\x62\xcf\xf8\xd9\x09\x36\x8a\x86\xfa\x71\xe7\x0a\xd9\x74\xab\x89\x92\xe2\x0b\xbb\xa0\xa4\x57\x5c\x12\xa5\xaf\x14\x05\x43\xdb\x3b\xbe\x3a\x96\x0f\xe1\x63\x87\xd2\x61\x88\xf0\xbb\x27\xde\xfb\xab\xc4\x1d\x64\x27\x8c\xd8\x0f\x0b\xe7\x4a\x1b\x78\xca\x17\xf4\xb4\x35\xa6\x02\x68\x5f\xf0\xbf\x87\x5f\xcd\xb9\xaa\x78\x36\xb4\x7f\x0c\x5d\x36\x6a\xd1\x56\xab\xff\xa1\xbe\xac\x28\x43\xc0\x65\x5b\xc7\x2d\x3a\x85\xdd\x3d\x24\x53\xba\x2d\x86\x39\x9a\xd4\x13\x93\x92\x9d\x3b\xc0\x37\xc1\x7a\x8f\x9c\xe2\x1e\xea\x18\xf8\xff\x00\xf5\x97\x02\xca\x9b\x57\x62\xc0\xe4\xa4\xb6\x3a\x3c\x6a\x13\xeb\x61\x9c\xeb\x52\xbc\x42\x39\xd5\xd3\xa1\x54\x24\x19\x2f\x50\x9a\x85\x9b\x6d\xbf\x87\x51\x08\x90\xd6\x00\xa2\xaa\x55\x73\xa8\xb8\xa8\xa9\x26\x13\x99\x48\xf4\x86\x63\x16\xef\xc0\x97\xcb\x55\x0c\xbd\xbc\x29\x2f\x39\x78\x57\x2b\x8c\x8c\x70\x81\x00\x92\xbe\x91\x8e\xd8\x31\xcf\xb2\xc0\x8a\x2a\x95\x29\x05\x4f\x81\xcd\x71\x00\xb3\x1c\x92\x04\x0d\x0a\x22\xca\xca\xec\xb2\xb6\x1d\xe5\x85\x63\x25\xdf\xff\xf5\xeb\xbf\xbe\xa0\xca\x64\x2e\x16\x69\x57\x32\x90\x4b\x2a\xdb\x75\x52\x39\xcf\x00\xab\x36\x4e\x09\x8e\xea\x87\xcb\x5c\x28\x62\x7d\xaa\x61\x9b\x6b\x23\x95\x5d\x8c\x3a\x3d\xa3\x89\xc5\xe8\x4c\x5c\x7f\x40\x05\xa4\x64\x6b\xbb\x5b\xa9\x4b\x88\x9a\x58\x99\xf5\x83\x51\x1a\x73\x51\x18\xf0\x28\x97\x43\x07\xd8\xe8\x87\xf5\xf1\x17\x64\x0d\xd2\x82\xcf\xbc\x70\x06\x57\xaf\x79\x3b\xa2\xe5\x93\x4e\x9b\xb1\xea\xdb\x57\xe8\x09\xa9\x85\xef\x66\x47\x37\xe8\xe9\x80\x19\x50\xda\xee\x90\x20\xd0\x88\x22\x0b\x85\xb6\x5b\xc9\xe1\x8f\x14\x05\x74\x2f\x6e\x27\x0d\x11\xfd\x81\x11\x1e\x94\x33\x3b\xd8\x4b\x57\x03\x32\xe2\xe1\x0f\x30\xe6\x0d\x91\x16\xdb\x0c\x64\x39\x12\xe4\xf7\xc1\x9e\x9c\xf3\xe9\x3a\x96\x15\x54\xb7\x86\x96\xbe\x88\x5a\xd3\xce\xfd\xe0\x13\x71\xec\xfa\x3f\xb3\xdd\xc3\x1d\xb0\x3d\x9f\xa9\x49\xa4\x96\xde\x25\x9a\x03\x64\x6a\x0e\xab\x4a\x62\x26\x26\x72\x9c\x6c\xe1\x82\x69\x17\x01\x3b\x7d\xc4\xa9\xb7\x6f\x6d\x9b\xc8\x05\xb9\x63\x30\xf2\x76\x94\x10\x70\x79\x86\x48\x21\xab\x19\xe3\x6d\x98\x21\x8f\x9d\x12\xf6\x06\xd0\xd0\x8e\xd7\x2b\x71\x2b\x0a\x96\xbb\x74\x74\x34\x01\x2a\x7d\x87\x72\x80\x57\xfb\xa2\x16\x41\xa4\x95\x47\x84\xff\xdd\x7e\x82\x1c\xee\x72\xcd\x95\x1c\x64\x78\x5c\x27\x7b\xf0\x51\x72\x43\x41\x38\x69\x38\x4a\xf4\xed\x33\xf5\x21\xb6\x17\x5e\x2c\x83\x17\x81\x4f\xba\xc1\x42\xfd\x40\xc1\xf6\x09\xd7\xf8\x20\x74\x20\x3c\xce\x42\x17\x15\x81\x97\x86\x1e\x95\x71\x97\x6e\xca\xc6\xb4\xf7\x0e\xa9\x7e\xdd\x12\x59\x3a\x07\x96\xb5\x8b\xe6\xf5\xcd\x58\x1b\x65\xb0\xa5\x63\xaa\xee\x75\x93\xd0\xef\x5b\x3a\xc7\xc2\x56\x74\x64\x83\xc7\x80\xa6\x71\x76\xb2\x37\xd8\xc3\xfc\xd1\x0f\x1f\xe0\x8f\xb1\xd6\x25\xfc\xe3\xc6\xde\xcf\xcc\x05\x23\x0c\xf6\xb4\x71\x7b\xe8\xc9\xeb\x7b\xac\xa2\x52\xb7\x21\x0b\x4b\xf3\x07\x08\x96\x08\xfa\x71\x10\xf4\x38\x41\x2b\x9e\x04\x5e\xe9\x48\xf8\x57\xf8\x34\xea\xc4\x38\x0a\x5a\x50\xa0\x6f\xd3\x7b\x16\x23\x05\x34\xcf\x95\x0e\x7f\xd0\xba\x64\x67\x27\xd1\x7e\xa2\x34\xa5\x6d\x35\x62\xa2\x50\xa3\x21\x73\xc1\x1c\xb1\x4f\xf9\x74\x71\xaa\x54\x03\xf0\x60\xa5\x60\x47\x17\x67\x3e\x18\x3f\xb9\x11\xc5\xab\xc3\xc3\x17\xa3\x6f\x47\xcf\x63\x88\xf6\xcb\x7b\xb8\x1a\x05\x01\x8f\xd7\x8f\x03\xb4\xba\x67\x15\x60\x8e\x0f\x8b\x67\xf4\xf1\xaf\x47\x2f\xbe\x1b\x3d\x1f\x3e\x1f\x8d\x73\x3d\xfa\x66\xc8\xe7\xe9\x77\xdf\xb4\x0c\x61\xf9\x04\xac\x8e\xc2\xb5\x58\x3b\x90\xd6\xce\x83\xf3\x16\xed\xda\x8a\x42\x5b\x77\x5c\x5f\x8f\x48\x6d\x5c\x7a\x14\xef\x8d\xbd\xd6\x85\xc3\x85\xa2\x5e\x7c\xca\x4c\xc2\x29\xe1\x98\xac\x47\x80\x86\xb5\x64\x51\xab\x93\xef\xd9\x1b\xc1\x0b\x85\x8e\x66\xd8\x85\x39\x57\xfb\xdf\x1e\xb8\x5e\x87\x32\x7d\xe5\xd4\xc8\x39\x57\xdf\x8f\x74\x31\x3d\xcc\xa4\xaa\xee\xed\x9f\xc3\xdc\x0a\x3e\xf6\x5f\xdf\x1e\xd6\x2f\x8c\xbe\x1d\xcd\xca\x79\xd6\xee\xce\xab\xaf\x65\xf4\xa6\xbd\xf3\xe5\x23\xb0\x55\xe7\xdb\xe6\x88\xc7\x4a\xaf\xef\x2e\x19\x3c\x59\x73\xf8\x0e\x45\x99\x1c\x6a\x33\xa4\x38\x0b\x3a\x81\x27\x62\x2c\xb9\x62\x3f\x9e\x7f\x38\xc4\x9a\x07\xdf\xb3\xfd\xbb\x99\x10\xbf\x2d\x0e\xe2\x07\x31\xa0\x72\xab\x32\x9a\x7f\xf6\xe0\x4d\xad\x8f\x45\x73\x13\xaf\x62\xf6\xd2\xc4\x12\xef\xf7\x22\x65\x3f\xf1\x12\x20\xfd\x8d\x17\x8c\x78\x92\x08\x63\x46\x85\x48\x67\xbc\x1c\x25\x7a\x6e\x85\xa3\x6a\xee\xa2\xb8\x0e\x85\x1a\x7e\xb8\x3c\x7c\x2f\xd2\x5f\x7f\xe2\xe5\xaf\x97\xd5\xd8\xcf\xe3\xd7\xb7\xbe\x16\xc4\xe1\x8b\x43\xbb\xcf\x87\xef\x7f\xba\x7c\x7b\x38\x15\xa5\xdd\xb2\x21\x2e\xc0\xd0\x32\x8f\x96\x53\xb0\x8d\x6b\x0e\xe1\x6c\xc0\xe5\xd3\x25\xd8\x22\xd2\x9c\x1c\x41\xa0\x15\xd6\xa1\x6d\x22\xa5\xd5\x6a\x84\xab\x6d\xe0\x66\xf0\xc6\x45\xb4\x82\xc5\xba\x80\xba\x9f\x9b\x69\x9d\x14\x3e\x67\xff\xf9\xda\x75\x68\x37\xed\xae\x90\x65\x29\xf0\xde\x42\x94\x83\x9e\x0c\x7c\x26\x81\xdd\xc9\xeb\xbd\xdb\x17\xd7\x7b\xd1\x53\x57\x8f\x2c\x1e\x37\x45\x9f\xc6\x29\x97\x9a\xd6\xc4\xe7\x0a\x7a\x04\x09\x4b\xf7\x29\xd0\xef\x91\xe1\x52\x5b\x54\x31\x7a\x60\x01\x23\x09\xe5\x5f\x4a\x8c\x92\x49\x9d\x54\xe2\xa1\x5d\xda\xb7\x74\xab\x50\xc8\xe5\xa4\x5c\x5f\xbc\x68\xcb\x6d\x38\x9b\xd0\xd0\x28\x89\x87\xb3\x5c\x0a\x4c\x3a\xaf\xe3\xc3\x9c\x61\x0f\x7f\xb4\x17\xbf\x70\x50\x9d\x03\x24\xe0\x14\x48\x50\x87\x53\xa2\x67\x03\x73\xd3\xd8\xdf\x2f\xdf\x9d\x1f\xfe\xa8\x9d\x77\x09\xee\x38\x26\x57\xa1\x7b\xde\x54\xc9\x8c\x71\xc8\xa9\xb6\x67\xfa\x12\x90\x25\xe7\x5c\xc9\x89\x30\x96\x0a\x90\xe4\x60\xfe\xeb\xe5\x7f\x23\x31\xf2\xd9\x8a\x04\x09\xe3\xa3\x12\xdd\x5e\x51\x91\x9e\x40\x17\xbe\x93\xe5\x0c\x86\x94\xeb\x94\x06\x7d\x07\x83\x2d\xf9\x0d\x41\x4e\xa0\xfb\x25\x93\x37\xe2\x15\xbb\x06\x24\xb4\xe0\xdb\xff\x6b\x65\x80\xdf\xaf\xf7\x80\xce\x16\x82\x5d\x43\x45\xa9\xeb\xbd\x46\x2a\x2d\x95\xec\xaf\xcd\x16\xf4\x71\x0c\x2f\x29\xe4\x74\x0a\x59\x01\x10\x15\x79\x2b\x54\x79\x60\x4f\x89\x9c\x30\xa5\x83\xc6\xbe\xe6\x9c\x3f\xfe\x2b\x83\xf9\xaf\x97\xff\x6d\x47\xd2\x9c\x1d\x93\x2a\x15\xf7\xec\x25\x5e\x1f\x4b\x87\x75\x7a\x40\x24\xd8\x2c\x54\xc9\xef\xc1\xa1\x3a\xd3\x46\x28\xcc\xcd\x2d\x35\x06\x4c\x00\xfe\xca\x9d\xc8\xb2\x21\x46\xd6\xa6\xec\x0e\xad\x54\x6e\x41\x31\xf8\x21\xe7\x45\xd9\x46\x98\x3a\x85\x9c\x76\x29\xb4\xf5\x11\x03\x3a\x3f\xd1\x92\x60\x38\x30\x5f\x3c\xa6\xad\x64\xcc\x47\x18\x62\x1b\x48\xa9\x65\x3f\xa8\xf5\xb5\x92\x28\xe7\xd5\x63\x4b\x2d\x31\xa5\x50\x82\x63\x14\x22\x6c\x82\x1b\x3b\xe7\x29\x5e\x69\xae\x9e\x1e\x4d\xcf\xae\x03\xd8\x60\x93\xc5\x90\x1c\x75\x00\xae\x97\x68\x85\xb6\xe5\x64\x11\x9b\x78\x25\x23\x87\xfb\x43\xed\x29\x7d\xda\x13\x63\x35\xdf\xc7\xf1\xbf\x0b\x6f\x3a\x27\xc3\xc5\x1a\x06\xb8\xdc\x96\xed\x5f\xfc\x7c\xe0\xe2\xc6\xb1\x74\x9c\x8f\x15\x06\x9f\x17\x49\x30\xe3\x05\x98\xba\x6b\x5f\xa3\x2e\xc0\xe9\x0d\x26\x70\x9e\xe9\xa9\x26\xd8\x9c\x5d\x7b\x01\xfa\xfc\x82\x3e\xbf\xe0\xf3\xcd\x2f\xe8\x21\x66\x83\x12\xf8\x4e\x55\xac\x2f\x17\xab\xef\xbb\xaf\x8b\x78\xd7\x08\x47\x01\x83\xc2\x88\x5d\x6c\x22\x45\xbb\xf3\x3a\x46\x49\x50\x67\x6c\xc0\x25\xf2\xda\xb1\x6c\xd2\x92\x77\xd5\x39\x12\x03\x6d\xe4\x90\x22\x21\x5c\x04\xda\xca\xc2\x3d\x18\xce\xf6\x93\x58\xa6\xed\x80\x6c\xa3\xab\xdc\x89\x35\xee\x1a\xe0\x76\xb9\xff\xe3\x8c\xcb\xb5\x31\xbd\xd1\x17\x90\xae\x56\x46\x14\xcf\x3c\x79\xa3\xc0\x89\x94\x25\xd0\x02\xd5\xb8\xe5\x4d\xef\x99\x63\xcf\x1c\x7b\xe6\xf8\x05\x30\x47\x88\x76\x40\x4b\x09\x4b\x66\xbc\xe0\x49\x29\x0a\x69\x4a\x99\x50\x6c\x0d\x71\x47\xda\x5e\xe2\x82\x10\x64\xcb\xab\x72\xf6\x54\x1c\x10\x7f\x01\x0a\xf4\x18\xf2\x0e\x44\x6e\xe7\xac\xb0\x45\x80\x80\xd1\x3e\x39\xd3\xdb\xe9\xca\x3c\x8e\xfb\xd5\xab\xdb\x9d\x45\x7d\x14\x3e\xd8\x09\xcc\x76\xfd\x9b\x64\x42\xcb\x5a\xab\x12\xe6\xb7\xc9\xe3\x61\x6d\x2f\x0a\x3d\x16\x1d\x20\x6d\x73\xdb\x2e\x75\x76\xc0\x4f\x0c\xc4\x96\x3c\x0d\x7f\x28\x92\xed\xf0\xe3\x20\xd9\x7e\xa0\xf0\x56\x34\x53\xa3\xc4\x01\x25\xe3\xcd\x4c\x17\xe5\xc0\x3b\xb4\x2a\x95\x8a\xc2\x00\x2f\xb1\x63\x22\xde\x0c\x86\xdb\xa9\xbc\x15\x2e\xf2\xc7\xc3\xe1\xae\x83\xc2\x65\x67\x13\x4a\x78\x05\x08\x9e\xeb\xbd\xf7\xc2\xc8\xdf\xac\x40\x59\x94\x22\xbd\xde\x73\xf8\xec\x5c\xb9\x64\xdb\x54\x14\x19\x24\x5f\xaf\xd2\x28\x69\xd8\x58\x50\x5e\xb6\x15\x6d\x36\x00\xed\xb6\x42\xe4\x7e\x0c\xe8\xdb\xe8\x05\xdd\x04\xb3\xd3\xfa\x52\xb3\x66\x64\x8b\x34\x5c\x8a\xcd\x09\xc1\x3d\xb4\xce\x1f\x0a\xad\x53\x67\xc0\xb5\x70\xe0\xed\xa3\x5d\x1f\xc2\x77\x1f\x8d\xe5\x1f\xd5\xdf\x7a\x88\x9f\x1e\xe2\xe7\x69\x20\x7e\xe2\xe7\x6d\x47\x98\x3f\xed\x82\xe1\xb6\x94\x3a\x92\xce\x69\xd7\x5c\xab\x46\xcd\xc9\x89\x77\x19\xa4\xe2\x56\x26\x00\x66\x9b\x32\x9e\x65\xfa\xce\xde\x10\xc2\x2e\xb4\x8c\xd5\x65\xcf\x0c\x7d\xb4\x48\xdd\x4f\x07\xb8\xec\x44\x18\xf3\x16\x30\xbc\x22\x98\xd9\xfe\x61\xed\xcc\x0f\xb5\x29\xf2\x4c\xcf\xa9\x52\x8c\x8b\x2d\x75\x74\x7b\xc6\x6f\x77\x9a\xb3\x80\x9f\x1b\xc2\xe7\x86\x2f\xb6\x08\x51\x1d\xec\xd9\x93\xdf\x96\xe6\x1a\xc4\xdc\x24\x5c\xc1\x45\x37\x18\xba\x8b\x2b\xba\x20\x8c\xef\x57\xec\xff\xcf\x8e\x14\x13\xf7\x56\x77\x54\x53\x46\x56\x2f\xc5\x73\x33\xd3\xa5\xa3\x41\xfb\x86\x7e\x18\xb9\x7a\x9c\x74\x9a\x96\x9a\x0f\xd9\x0f\xa2\xe4\x07\x4b\x7d\x5e\xfc\x7c\xcc\xf6\xa3\xc7\x66\xb9\x65\x52\x99\x52\xcf\x3d\x1d\x3c\xa4\xcf\x23\x80\x48\x9d\x63\x0e\x59\x49\x14\xfd\x0c\xa5\x41\x8e\xb2\x7c\xc6\x0f\x10\xa7\x20\xc5\xd2\x3f\x95\x11\x2d\x93\x81\xbb\x8c\x49\x82\x3c\xb7\x27\xa7\x90\x56\x37\x58\x9b\xc7\xbb\xdf\xec\xea\xc4\xaf\x3c\xd3\x05\x3b\x52\x0b\x7c\x5c\xff\x7c\xe0\x70\x0b\x6a\x97\x18\xe0\xc4\x42\x62\x13\xf1\xf3\xb0\x7e\x37\x57\xcc\x54\xb9\x95\x14\x97\x82\x5e\x60\xaa\x86\x50\x90\x65\x89\x79\xbb\x98\x0f\xcd\x38\x24\x0f\xd2\xf1\x1c\x73\x03\x68\xdb\x3e\xe8\x20\xc8\xe4\x8f\xf7\xe7\xb1\x15\xa2\x4f\xeb\x34\xb1\x1c\xa3\xc1\x06\xe1\x65\x08\x2b\xc3\xb8\xec\x6c\x7b\x97\x21\x90\x87\xcb\xcc\x2e\xa4\x43\x5a\xf0\xe1\x64\x08\xb3\x00\x31\x0f\x1e\x62\x18\xb1\x37\x07\xa0\x2c\x65\x1c\x3c\xc3\x6e\x21\x10\x22\x28\x18\x11\x6c\xdc\xff\xc7\xde\xdb\xf8\x36\x6e\x64\x7b\xa2\xff\x4a\x3d\xe7\x2d\xda\xbe\x90\xe4\xee\x24\x37\xb3\x9b\x8b\x8b\x07\xc7\x76\x27\xc6\x74\xbb\x3d\x96\x93\x60\xdf\xf3\x62\x6e\x89\x2c\x49\xb5\x26\x59\x0c\x8b\xb4\xac\xc1\xce\xff\xfe\x50\xe7\x9c\xfa\x20\x59\xd4\x87\xed\xce\x74\x66\x84\x01\x26\x6d\xb1\x58\xac\xcf\xf3\x7d\x7e\xc7\x7d\x26\xac\x3e\xd7\x5d\x69\x0f\xfd\xb9\x4f\xaa\xc5\xdd\xba\x14\xe9\x07\x95\xf0\xac\x1b\x20\x14\x38\xbb\xa3\x20\x31\x36\xab\xa9\x63\x8b\xc8\x65\x21\xf3\x26\x0f\xd2\x9e\x3e\x3f\x3d\x09\x65\xb3\x5d\x27\x6e\x27\x10\xe4\xf7\x43\x92\x89\x0e\xa2\xda\x7a\xd2\x9c\xc3\xfd\x59\x23\xea\x8f\xcb\x17\x80\x30\x16\x0d\xe9\xc0\x86\x94\xcf\x24\x20\xfe\xbf\x4c\x9b\xfc\x60\xbe\xe6\x2b\xee\x18\x5d\x07\x56\xe0\x3c\xe3\x5a\x5f\x6f\x0d\xe1\x98\x06\xad\x5d\x59\x2b\xef\x33\x02\xfb\xcf\x2b\xa6\xa1\x99\xcf\x84\xb4\xbc\x9b\x7d\xf1\x91\xca\xb1\xb6\x07\xec\x9f\x39\x6d\x63\x05\x21\x43\x54\xc8\xc4\xab\x82\x03\x33\xf8\x05\x44\x4b\x35\x67\xef\x65\x26\xa8\x22\x92\xd4\x40\x38\xcd\xe5\x86\xdc\x4d\x73\x67\x65\x91\x64\x4d\x8a\x40\xdc\xe8\x2c\x80\xc8\xa2\xe1\xf1\xc6\x17\xf8\x17\xf7\xcc\xe6\xc4\xd0\x56\xb7\x0b\x82\x98\x07\xbd\x20\x82\x19\x4f\x1e\x50\xf4\x95\x9a\x86\xff\xec\x32\xb8\xd1\xd3\x1b\xcf\x45\x1e\xbc\xe0\xbb\x0a\x54\xad\x63\xb8\x97\x54\xb5\x35\xcb\x79\xc3\x6b\xdd\xea\xc4\xbb\xd8\x33\x3f\x93\x94\xc4\x93\xba\xe1\xd9\xa0\x90\xe4\xf7\x55\x00\xdb\x5f\xf2\x57\x55\xeb\x5e\x20\x2c\x0d\xa7\xac\x76\x2a\x61\xd3\x0c\x5b\xa9\xaa\x1d\xfb\x0c\x39\x50\xbf\xb0\x34\x53\x3a\x1c\xde\x14\x3a\xac\x6b\x03\xeb\xdf\xcb\xe0\x64\x96\x00\x39\xb6\xef\xdf\x32\x78\x82\x07\x7f\xd3\x32\x70\xbd\x79\x95\xca\x79\x9b\xad\xc4\xbf\x6b\x85\xf0\x01\x3f\x83\xcb\xf5\x8b\x8e\xf5\xf9\x54\x6d\xcb\xd4\x5f\x29\x1f\x2b\xfa\x15\x92\x75\xb7\xd6\xad\xda\xfa\xb2\x67\x04\x64\xe2\x44\x87\xb5\x21\x0c\x36\xba\xdb\x70\x8f\xa0\xaa\x3a\xa8\x2d\x74\x04\xe7\x46\xdb\x46\xbe\xa2\x9a\x22\x65\x37\xbf\xa0\xed\x4b\x35\xb8\x07\xdc\x1d\x56\x17\xe3\xa0\x00\xa8\x6f\xfb\xb8\xa4\x1e\x31\xa1\xc1\xfe\xc2\xb3\x6c\x3d\x62\x9c\xad\x2a\x5e\x96\xa2\x62\xbc\x82\x8f\x91\x0d\xbc\xcb\x7c\x6d\xa9\x4e\x17\x74\xa2\x55\x2e\x54\x21\x98\xc8\xb4\x60\xc7\x3e\x88\x22\x5a\xea\x3c\x34\x47\xc2\x3d\x04\xc6\xda\x33\x49\xfa\x47\xfd\x4b\x6e\x1f\x59\x96\x60\x43\x8d\xf9\x90\x69\x34\xb6\xce\x08\x91\x8f\x90\x3b\x50\x07\x0a\xf9\xb0\x8d\x0b\xf9\xfd\xcc\x70\x2d\xcb\x7d\xfa\xa9\xc8\x22\xe4\xf9\x57\xa8\x46\xa1\xd0\x2c\x26\xc0\x4d\x67\x1a\x1a\xaa\x43\xf5\x8d\x48\xcf\xfb\x08\x07\xc3\x61\x24\xb0\x39\xcf\x74\x48\xa4\x37\xe0\x9b\xec\x1e\x2a\xb9\xaf\x1d\x7b\xbb\x09\xfb\x60\xbd\xfe\x03\x58\xaf\x3f\x0c\xd9\xae\x5f\x53\xbc\xf9\x0c\x0c\xf3\x60\x99\x3e\x58\xa6\x7f\x27\xcb\xf4\xe7\x32\x4a\xef\x2f\x87\xf8\x1a\x38\x5a\xe6\x32\xe3\x60\x0f\x6c\x3d\x9a\x35\xe8\x79\xad\x9d\xe8\xd0\x8a\x0e\x65\xab\xa5\x22\xb3\x96\x91\x56\x74\xbb\xce\xa6\x9a\x43\x65\xbc\x5c\xe4\x33\x38\xf1\x64\x2a\xd4\x62\x97\x84\xae\x95\xbe\xcc\xb8\xae\x65\xf2\x43\xa6\x92\x87\x69\xad\x62\x19\xdd\x67\xbf\x4e\x7b\xad\x42\xf9\x93\x17\xec\xec\xd7\x29\xbb\x90\xfa\x21\xbc\x99\x28\x9a\x84\x30\x0d\xdc\x02\xfe\xbd\xd1\x90\x63\xe9\x1c\xdd\x64\x44\x2b\x98\x78\x2a\x95\xf6\x98\x0e\x20\x41\x3d\x93\xa0\x39\x25\x6d\xa5\x05\x8e\x7e\x66\x46\xaf\x61\x8e\xbb\x1b\xa3\x62\x93\x6f\x9d\x84\xbf\x8f\x8e\xf8\xdf\x9a\x4a\x98\xe9\x47\xd6\xce\x3e\xea\x2e\x98\xf9\x9d\x5d\xf0\x9a\xe3\xba\x81\x18\x69\xed\xa5\xb0\x36\x66\x4d\x66\xd2\x4a\x98\xe1\x8a\xec\x33\x7a\xfb\xf9\xe8\x90\xdf\xcb\x28\x4c\x94\x7d\x14\x1d\x32\x3c\x30\xe4\x55\x26\xe2\xb3\x8e\xda\x7c\x68\xe0\xf2\x19\xd5\x53\x94\xcb\x79\x4c\xed\x14\xe5\xf2\xfd\xb4\x35\x72\x66\x7e\x63\xef\xa7\x91\xd1\x62\xe5\xfd\x25\xaf\x20\xbe\xbb\x54\xe9\x1b\x0d\xb8\x29\xb5\xcc\xf7\x39\x23\xf8\xd1\x0d\x83\x95\x46\xb7\x8d\x0c\x16\x7e\x6f\x0f\x16\xdb\x5a\x01\xdf\xdd\x1e\xa7\x6a\xa0\x55\xdd\x01\x67\x86\xd7\x28\x7a\x55\x28\x2d\xd1\x01\x64\xe6\x6b\xfd\x5b\x36\xc6\xaf\x8c\xcb\xf4\xf4\xf6\xf2\xec\xe2\xe3\xe5\x24\xdf\x07\xfa\x13\xc7\xbd\x61\xbe\x5a\x46\x26\x3b\xbd\x0a\x67\x6a\x5d\x6f\x96\x4e\x2c\x79\x91\x66\x2e\x3a\xde\x79\x25\xcc\x5b\x69\x25\x1f\x45\xc5\x8e\x7f\x10\x35\xb7\x7e\x91\x93\x7d\xce\xd3\xf9\xf4\x6a\x78\xb0\xf3\x48\x6c\xe3\xfb\xf3\xf6\xa6\xbc\x97\xb3\x4a\xb0\xf3\x25\x2f\x0a\x91\x7d\x06\x1a\xb7\xc7\x5c\xde\x9f\xf7\x26\x90\x89\x27\x9f\x38\xd5\x99\x88\x7b\xd6\x9e\xd0\x42\x14\xa2\x92\x89\x0f\xcb\xec\xcc\x28\x48\x9d\x3a\x75\xb3\x43\xdd\x0c\x76\x47\x24\xe4\xe1\x29\xb3\x66\x21\x77\x09\x22\xf3\x13\xc8\xc4\xd3\x86\xdd\xc8\x00\x44\x23\x36\x13\x78\xd0\xd9\x17\xfa\xb1\x7b\x5b\xb6\xed\x43\x7f\x0b\x80\xf3\x1a\x3e\x0a\x60\xab\xa4\xf9\x63\x7d\x60\x6d\x49\x86\xfd\x1a\x79\xca\x98\x26\x2a\x48\x96\x29\x04\xd6\xda\x6b\x25\xa0\xbf\xee\x12\x2c\x92\x80\xee\xc5\xb9\xca\x8f\xe7\x97\xed\x26\xed\x65\xf9\xf1\xfc\xf2\xb3\x71\xe3\x81\x4c\x96\x17\xb3\xe9\x45\x22\xbc\x0a\x92\x9a\x59\xef\xbe\x90\xbd\xe5\xe8\x2d\x29\xe6\xe1\xc4\x18\xc6\x8f\xf6\x51\x67\x09\xdd\xcf\x1d\x53\x4b\x7b\x05\x1d\xcf\x7b\xe9\x52\x75\xc9\x34\x2d\xcb\xa9\x1b\xf9\xb3\x08\xb5\x9b\xc5\xf0\x85\x33\x33\x88\xa7\xe1\xff\x44\x4f\xda\x0b\x93\xca\x0a\xdc\x0d\xeb\x90\x91\xf6\xe7\xca\x40\x65\x30\xb2\x26\x94\xe2\x16\x98\x06\x65\xeb\x5e\x36\x5a\xcc\x9b\x0c\xe1\x24\x01\x16\x7f\x4c\x15\x35\xe1\x1d\x40\xe6\x84\x43\x28\xd0\x0f\xaf\x8a\x6c\xfd\x7f\xb1\x4f\xc5\x18\x96\xdb\x72\x8e\xae\x47\x18\x6b\x71\xaf\x21\x4f\xdc\xbc\xfd\xeb\xd5\x87\x0f\xec\xfa\xd3\x1d\xfb\xf5\xd3\xed\x9f\xb1\xc6\x6c\xde\x64\xb5\xc4\x6f\xb9\xd4\xac\x17\x9e\x5b\x33\x24\xa8\xc2\xb3\xfb\xae\xd8\x85\xed\x6e\x85\xd4\x51\xc6\x79\x35\xed\xb0\x4e\x5e\x30\xfc\xed\xf7\xbe\xe3\x7b\xcc\x11\x06\x38\x7c\xea\xa0\x54\x67\xc4\xae\x41\xc5\x4c\xdd\x54\xf1\xb4\x65\xeb\xb1\x9b\x94\xdd\x7d\x40\x17\x40\x0c\xe8\x39\x8c\x64\xbd\xc7\xe8\xe0\x3b\xdd\x31\x15\x31\xf2\x70\xdd\x11\x26\x0b\x76\x1d\x93\x24\x3f\x1f\x5d\x34\xa3\xda\x03\x40\xf0\xfd\xb4\x3b\xad\x72\xa9\x6a\x55\x6c\xe3\x28\x37\x91\x56\xed\x8b\x8f\x2d\xce\x7d\x94\x48\x60\x7c\x32\xf4\x7a\x3f\x59\x75\x9f\x9c\x83\xc8\xd0\x7a\x93\x54\x55\xbd\x52\xd5\xa0\x1c\x74\xd3\x7a\xde\x9e\x98\x7d\xf7\x59\x32\xf7\x3e\xf3\x68\x8d\xc1\x8f\xfd\xb7\x46\xcd\xd6\x75\x64\xd0\x7f\xc1\x07\xed\xd1\xda\x1f\x3f\x9b\x32\x43\x1f\xe8\x8e\xb2\x9a\x45\x8c\x76\xb7\x3f\x5c\xb4\x47\x77\xcb\x53\xa5\x19\x68\xca\xec\x42\x0c\xe8\x88\x9b\x06\xba\x17\x73\xac\x66\xcf\xd3\x5f\x6e\x7f\xb8\x18\x26\x4d\x3a\xe1\x99\xb8\xfa\x14\xb1\xa8\xe1\x83\xf6\x84\xed\x8f\x7d\x97\xe5\xd0\x31\xfa\xb3\xbb\xfc\x58\x90\x6a\x1f\xaa\x4a\x5f\xdb\x30\x78\xa4\x1e\x2a\x9a\x9f\x04\x8f\x3e\x75\x94\x63\xff\xf3\x06\x41\xc7\x6c\xdd\x06\x46\x62\x67\x27\x8b\x40\xa0\xde\x63\x1f\xdd\xa8\x9f\xb5\x9b\x6e\x06\xc3\xcb\xf2\xa8\xcb\xa5\xb0\x76\x9b\x48\xe8\x48\xf8\xb8\xbd\x3c\x8f\x53\x78\xf4\xb9\x69\x83\x1d\x81\xac\xea\x86\x67\x7d\x0a\xb7\x2b\x00\xe8\x36\x63\x55\xd4\xc4\x19\x37\x12\x0d\x37\xdd\x60\x99\x89\x43\x8e\x0e\x4a\x02\xf1\xe6\x9b\xac\x29\xf1\x37\x36\xd9\x23\xa2\x6f\x74\xb4\xe8\x78\x9b\x61\x45\x75\xa0\x7d\x5f\x9d\x8b\x36\xdc\xac\xae\xc4\x5f\xd9\x22\xc8\x47\x5f\x8a\xca\x99\xd1\x96\x9b\xa4\xb5\xe8\x0b\x7d\x01\x2a\x8e\xaf\xda\x11\x47\xe2\x16\xf6\x6d\xfc\x3d\xfe\x56\x8c\x9b\x46\x5b\xc6\x18\x5a\xb4\xe1\x30\x5b\x88\x36\xdf\x4c\x8c\xe3\xaf\x6c\x21\x55\xd1\x97\xb6\xd0\x86\x5d\xfd\x16\x7b\xc6\xd1\x43\x08\x3d\x79\xf5\x77\x01\xbe\xf8\x1c\x11\x5e\x3c\xcb\x18\x94\xee\x0f\x42\xba\x28\x7c\x9c\x68\xef\xe7\x8a\xe6\xda\x2b\x96\xeb\xe0\x45\x39\x78\x51\xfe\xa0\x5e\x94\xc1\x28\xc4\x33\x16\xfc\xed\x62\xda\xbb\x97\x1e\xe0\x3e\x6c\x60\x22\x80\x7d\xd8\x22\x20\xff\x1c\x65\x34\x0e\x4e\xa6\x2f\xd8\xc9\x94\x71\x99\xdf\x9a\xbe\xa2\x51\x69\xb7\x62\x0e\x8e\x0c\x8b\x0f\xc9\x66\x72\x8c\xd6\x24\x38\x2f\x2e\x38\x7c\x26\xea\x95\x10\x45\x3f\x0e\xca\x2c\x46\x3c\x88\x92\x5d\x3e\x95\x22\xa9\x91\xc0\x52\xa5\xd1\x42\x66\x18\xd1\x0e\xc1\x81\x13\x8a\x6b\xed\xc7\xa4\x23\xda\x85\xac\x79\x2d\x1f\x31\x42\xdd\x8f\x00\x03\x0a\x6f\x7e\x39\x7f\xcd\xdb\x43\xf3\xdc\x63\xe1\x23\xd9\x26\x07\x87\xde\xc1\xa1\x77\x70\xe8\x1d\x1c\x7a\x07\x87\xde\xc1\xa1\x77\x70\xe8\x1d\x1c\x7a\x7f\x0c\x87\x1e\x88\xb2\x9f\xca\x81\x04\x25\x8f\x00\x42\x22\x3b\x36\x1c\x31\x28\x66\xf1\xff\xdd\x1f\x55\xea\xfe\x68\xc4\xee\x8f\xb4\x9a\xd7\xf7\x47\xff\x0b\xab\x16\x03\x78\x3c\xe4\x17\x8f\xe9\x3d\x2c\x5d\x2c\xf3\x32\x5b\x43\xae\x31\x93\x73\x88\xcb\x84\xda\xa0\xd0\xfc\x15\xc5\xb9\xd3\xaf\xe0\xa3\x63\x1a\xec\x5e\x66\x8a\x7f\x52\xff\xa6\x39\x32\x67\xf6\xc4\x44\xeb\x36\xd9\xa7\x2e\xef\x20\x51\x85\xae\x2b\x28\xc5\x8b\x97\x2c\x93\xb9\xac\x31\xbd\xb5\xa0\x1c\x42\x9f\xf8\x43\x16\x27\x34\x0f\x11\x44\x55\xbb\x8a\x48\x31\xcf\x1a\x9f\x56\xe4\x0b\x64\x42\x88\xbe\x4a\xe9\x23\xae\xd2\xb6\x37\x98\xed\xec\x1e\x40\x3d\x22\x9c\xe9\xdf\x47\x47\x65\xe7\x36\xde\x62\x42\xcb\x8d\xca\x64\x12\xcb\x5c\x31\x83\x58\xf2\xb2\x14\x85\x1e\xc0\xe3\x44\x15\x86\xca\xba\x10\x18\x97\x91\xa1\x7c\x46\xaf\x4c\xed\x45\x81\x22\x6c\xb7\x02\x8a\x2a\x1c\xa7\x36\xc9\x45\x55\x0c\x8b\xfb\x66\x6b\x97\x89\xdf\xa5\x1a\xfa\x64\xc4\x2e\x0c\x0d\x13\xed\x17\xa9\x5c\x22\xbc\x1b\x62\x77\xc7\xde\x37\xe4\xee\x96\xea\xdb\x1d\xfb\x1a\x73\x27\x13\xf7\xab\x0b\x84\x76\xec\x84\xd2\x93\x69\xaa\x28\xe8\x86\x69\x87\xb0\x39\xdd\x8f\xbd\x6e\x32\x3c\x2c\x24\x0a\x95\xfd\xda\xe1\x07\x47\xfd\xc1\x51\x7f\x70\xd4\xff\x4b\x39\xea\x77\x00\x8c\x68\x81\x45\xb4\x2b\x55\xf4\xe7\x32\x13\x99\x2a\x16\x7a\xc2\x2e\xf3\xb2\x5e\x53\x0e\x95\x05\xf5\xe3\x75\x8b\xaf\xa5\x4a\x68\x02\x4d\x31\x2f\x21\xd4\xe2\xba\xf5\xbd\x01\x5c\xbf\x43\x8c\x41\x2c\xc6\x00\xfe\xde\x19\x4b\x43\x06\xa8\xb8\x20\x2a\xd6\xa2\x48\x9d\x49\x11\xd0\x91\x40\x22\xe6\x0c\x81\x63\x6b\x28\xc3\xe5\x80\x34\x14\x64\x11\x55\x22\x37\xec\x57\x16\xac\xe2\x2b\x06\x9e\x19\x84\x16\x7d\x1e\xfa\xc6\x30\xee\xc6\x21\x7e\xe2\x10\x3f\x71\x88\x9f\xf8\x32\xe3\x27\x36\x81\xc7\x1c\x82\x2c\x76\x0d\xb2\xe8\x6b\x58\xcf\x09\xc6\xf8\x4c\x38\x18\xfb\xc3\xf5\x3c\x03\xa9\x67\x7b\x04\xc7\x20\x78\xf2\x19\x5b\xee\x09\x9f\xbc\x5a\xb6\x94\x31\xe0\x80\xb6\x6c\x9f\xe1\x5f\x71\x05\x69\x03\x1e\x0a\x7d\xa9\xcf\x59\xf9\x23\x97\x99\x19\xd4\x88\x80\x3b\xb0\x08\x9f\x51\xc4\x46\x86\x8d\x3a\x6d\x17\xac\x9c\xaf\x8e\xbe\x85\x83\xde\x03\x1c\xfa\x16\xf1\x9c\x21\x15\x7e\x56\x49\x31\xf7\xd9\xe6\x2d\x04\x68\x0f\x6f\x69\xa4\x36\x8b\x72\xc7\x31\x8b\xde\x67\x13\x5b\x19\xaa\xe4\x15\x79\x7b\x52\x56\xcb\x74\x6d\x54\xc1\x32\x83\xf4\x78\xc4\xd1\xf9\x70\xf5\xc2\x32\x96\x5b\x49\xcc\x86\xe3\x7b\xdb\x57\x60\xd9\x06\x0d\xd6\x5d\xa4\x2d\x30\x15\x65\x7a\x75\xd1\x47\xa9\x98\xeb\x3b\xc2\x9f\xee\x78\xa4\xbc\xa4\x04\x38\x2b\xb5\x42\x11\x65\xc2\x3e\x92\x2d\x81\x87\x22\x18\xb4\xe9\x59\x17\x40\x80\x71\xa5\x7b\x5d\x0d\x9b\xcb\xa7\x09\xbb\x3f\x12\x4f\xf5\xb7\x68\x54\x7c\x9a\x6b\xfc\x47\x51\x9b\x7f\x4d\xd8\x95\x11\xcc\x12\x59\x67\x04\x58\x50\x39\x59\xd0\xbe\x66\x0e\x76\x53\x38\x74\xc4\xf8\x15\x49\x63\xc5\x74\xaf\x2e\x48\xe2\xa6\x02\xb9\x42\x6f\x5f\xe3\x17\x9e\x05\x95\x6e\xa4\x56\x8a\xb0\x1e\x12\xf3\xed\xc4\xc6\x98\xf8\x62\x92\x38\xde\x84\x17\xac\x6a\x0a\xac\x84\x89\x66\xc8\x3b\x84\x06\xf1\xa0\x90\xd6\xc8\x34\x5b\x13\x8e\x03\x06\xa2\x90\x11\x0e\xa4\xcb\x5a\x61\x45\xdf\x17\x17\x38\x3d\xe0\x97\x1c\xca\xcd\x7c\xd1\x58\x1f\xff\xe4\xe5\x66\x5a\x31\xa8\x21\x48\x72\x0f\x7c\x75\x20\xe2\xf1\x35\x67\x6e\x86\x09\xd5\x39\xb5\xad\x45\xb2\xbb\x7d\x31\xdd\x56\x4c\xe6\xa3\xe1\x22\x95\x48\x44\x01\x30\x1f\x33\x6d\xce\x78\x1a\xc8\x6f\x6e\x96\x18\xd7\xc0\x6b\x0e\xe7\xdf\x9d\x5f\x43\x37\x52\x30\x04\x3c\xb3\xac\xda\x97\xb3\x54\x7b\x56\x97\xa1\xc5\x1d\x62\x4b\xaf\x5e\x39\x46\xa5\xa1\xf7\x69\x13\xc7\xb3\x7e\x4d\x24\x7d\x8b\x4a\x35\x25\xa0\xb7\x18\x9a\x8e\xa5\x90\x6c\x83\xc0\x85\x54\x35\x99\xd8\x81\x73\xb9\xfa\xf6\x17\x8d\xa1\x17\x53\xd7\xc1\xd5\xa2\x50\xee\xe7\xcb\x27\x91\x34\x75\x94\xbd\xdd\x79\xcf\x15\xd4\x6e\xce\x32\xaa\x99\x0f\x18\xc8\xf4\x80\xbc\x59\xca\x79\xc9\x78\xcd\x34\xaf\xa5\xa6\x8a\xe2\x6e\x02\xe2\xc9\xd0\x67\x0d\x7e\x22\x8f\xe7\x0c\x07\xd0\xba\xcd\x46\x00\x7b\x23\x6b\x42\x47\x56\x4a\x0b\xaa\xbe\x4a\x60\x7a\x52\x01\xd3\x43\x90\x9b\x0a\xf1\x97\xe9\xe4\x07\xdd\x9b\x1b\x20\x82\xd7\x8c\xf0\x6b\x2e\x8f\x5b\x10\xab\x03\x99\x6e\xc0\xa2\x66\xfe\x58\x20\x9a\x8e\x61\x04\xb9\xe9\x74\x25\xe4\x62\x59\xeb\x11\x93\x13\x31\x01\xb9\x59\xf0\x64\x19\x74\x9b\x0b\x51\x63\x40\x7a\x50\x9a\xde\x6e\x51\x80\xf4\xca\x8e\x1d\xbf\x22\xde\x32\x72\xf8\xb8\xdd\xad\x89\x2e\xd7\x88\x89\x3a\x99\x9c\x8c\x58\xa2\xf2\xb2\x01\x58\x6d\x33\xc6\xd9\x9a\xc9\xda\x0a\x95\xf5\xb2\x82\x6a\xef\xb0\x14\x16\x85\xdc\xca\x1d\x54\xd0\xbc\x48\x19\x4f\x21\xc2\xf1\xfe\x08\x67\x77\x7f\x64\x85\x09\xd3\x21\x55\x29\x87\x19\x2e\xb9\xc6\x9d\x45\xdb\x72\xce\xeb\x64\xe9\x60\xf3\xab\x4a\xe8\x52\x61\xb0\x64\xe9\x0f\xfb\x9d\xa8\xf2\xff\x70\x5d\x1c\xeb\x13\xbf\xb8\x4b\xb9\x58\xda\xb5\xe5\x15\xe2\xe4\xb5\xf7\xe4\x35\xc0\x38\x7f\x85\x49\x89\xf4\xa6\x3d\x26\x70\x75\x0f\xad\xf8\xae\x97\x81\x90\xc8\xdd\xfe\xb4\x76\x78\xe0\x3c\xc3\x54\x0d\xfd\xcd\x45\xcd\xcc\xbd\xf0\xfb\x5c\xcb\x5c\x8c\x9c\xd1\x3a\x04\x2b\xef\x88\xa9\x76\x39\x1d\x16\xfa\x7e\x23\x48\x8c\x22\x4b\x5a\x83\x1d\x85\xca\xcd\x57\x8d\xf8\x93\xc2\xac\x61\x08\xc2\x4e\x9d\x1d\x43\xb4\x43\xda\x08\xf2\x08\xab\x94\xa0\xb4\x51\x04\x3a\x19\x05\x2c\x03\x6e\xaa\xaa\x1c\xa3\xa9\x2b\x28\xd7\x0e\x08\xea\xe8\xf1\x15\x8f\x32\xa9\x7d\x04\x9e\x75\x1f\xe3\x94\x7e\x25\xc8\x56\xa3\xa5\x56\x02\x43\x77\xca\xcc\x9f\x60\xfc\x54\x26\x35\x1e\xe6\x82\x72\x41\xc2\xf3\x67\xbe\x66\xee\x65\xe7\x1c\x42\x7f\x40\x46\x35\xc4\xe5\xd2\x35\x36\xb7\xb5\x16\x55\x1e\x80\x62\x01\xad\x92\xaf\x73\x00\xfb\x07\x6f\x77\x16\xd5\x7a\x31\xca\x57\x86\x8e\xf7\x76\x36\x04\xcd\x36\xb0\xa2\x0b\x5f\xd0\x56\xd4\x2e\x44\xe1\xb8\x30\x72\xae\x39\x4e\x86\x10\x03\x09\xb0\x62\x78\x16\xc2\x4c\xb3\x4a\x64\x18\xbc\x4c\xe7\x75\x21\x1f\x45\xe1\xc1\x3c\x8f\xf5\xc9\x49\xe0\x6b\x32\xe7\xc0\x57\xb8\x4a\xd4\x38\x53\xe0\xa8\x67\xc7\xf6\x68\x9f\x98\x23\x65\x8e\x53\xeb\x61\x51\xcb\xb1\x6f\x61\x48\xcb\x88\xad\xe0\xec\x04\xcd\x20\xa2\xd3\x4c\x06\xc0\xfc\x29\x5e\x13\xb5\x45\xa0\x6b\x2b\x98\xcb\xa3\xf5\x84\xb8\xb9\x20\xa9\x7a\x10\x6b\x76\xdf\xbc\x7d\xfb\x4d\x52\xab\x52\x65\x6a\xb1\xfe\xb3\x58\xc3\x0f\x22\x20\x81\x1c\xc3\xc7\x8b\x35\x76\xa9\x0a\x22\x92\x78\x57\x2c\x33\x08\x16\x52\xea\x20\x72\x74\x63\x61\x37\xff\xd5\x58\x59\xb7\x10\xda\x7b\x17\xc0\x7b\xb7\x9d\x4e\x21\x1b\x39\x9b\x5a\x62\xe8\x82\x19\xdd\x2b\xc3\xde\xfb\x8a\xfc\xfd\x21\xfa\x67\x8e\x5e\x59\x06\x13\x3c\xea\x9f\x2f\x5e\x96\x99\x44\xe0\xfe\x63\xbb\x0d\x7c\xc1\x65\xa1\xeb\x93\xff\x60\x45\x63\x58\x70\xc5\x04\xf8\x37\x09\xdb\x90\x17\x9a\xdd\x1f\xd9\xf3\xf6\x46\xfb\x0f\xdc\x1f\xed\x15\x22\x15\x6e\x49\xbc\x86\xc9\xeb\x9d\x67\x4b\x26\xf5\xa6\xcb\x66\xf1\x72\x1d\xc1\xf7\x4b\xf7\x59\xee\x43\xb0\x00\xbb\xdc\x81\x62\xed\x6f\x40\x86\x29\x11\x9d\x3b\x60\x3d\xd1\x61\xc7\x14\xe7\x09\x85\x76\xa2\x76\xac\x67\xd7\x81\xdb\x0d\x10\x5f\xa5\x67\x45\x2d\x77\x96\xda\x8b\x5a\xee\x20\xba\xb7\x5a\xfd\x61\xe5\xf7\xf0\x98\x1e\x84\xf8\xdd\x84\xf8\xa1\x35\x3b\x48\xf2\x5f\x90\x24\xdf\xda\xa4\x7f\x9c\x38\xbf\xff\x30\x0e\x32\xfd\xbf\xb4\x4c\x0f\xf1\x32\x41\x0c\xfb\x06\x4e\xd5\x6a\x6b\x09\x26\x09\x88\xf4\x23\x9c\x87\x1b\x10\x91\x2a\x91\xab\xda\x06\xe4\xb0\x84\x67\xd9\xc1\x3d\xf2\xbb\xbb\x47\x9c\xc3\x2b\xce\xcf\xdd\x63\x23\x07\x52\xdc\x9f\xa2\x8b\x6e\xab\x28\xe7\x39\x2f\x52\x57\x65\x00\x16\x44\x15\xd9\x3a\x7c\x77\x4e\x37\x54\x6a\x7c\x64\x98\x68\xab\xeb\x20\x6b\xf1\xe0\xc1\xf9\x8c\x1e\x1c\x5d\xa7\xa2\x8a\xec\xf5\x14\x7e\x87\x8d\xaa\x9a\x30\x94\x01\x05\x34\x7a\xaa\x89\x0b\x54\x02\x93\x68\x44\xea\xe1\xc2\x83\x5b\xdc\x3a\x0a\xa6\xbf\x58\xcd\x09\x18\x8b\x8c\x5c\xe3\xa9\xf9\xd9\x8e\x64\xe4\xbe\x45\x99\x0d\xd6\xcf\x24\x8b\x12\x8a\x98\x57\x82\xe7\x81\x37\x82\xc6\x03\x0a\x67\x77\x24\x83\xe5\x2f\x60\x28\xaa\xa9\xa3\x63\x51\x46\xba\x1c\x5c\x16\x78\xfa\xba\xcb\x52\xc7\x92\x48\xee\xee\xfe\xe7\xd0\x28\x38\xab\xeb\xb5\x2b\x3d\x64\x54\x1a\x54\xc5\xa2\x43\xb0\xd9\x72\x25\x87\x44\x92\x50\xf8\xf3\xf7\xb1\x6a\x0a\x28\x92\xae\x91\xb2\xd5\xa4\x74\xb8\x9e\x29\x40\x7b\xa5\xaa\x07\x51\xa1\xd4\x67\xeb\xae\x75\xfb\xd8\x71\x07\xf6\x74\xec\xef\x56\x16\x3f\x68\xe7\x01\x5d\x6c\x0c\x90\x5d\x1d\x1b\x97\x94\x84\x45\xa2\xac\x1e\xbf\x2d\xb8\xe3\x50\x18\xff\x9f\xb6\x30\xbe\x2a\xc4\x78\xa5\xaa\x74\x14\xc4\x3e\x05\x75\xee\x5b\xcb\x14\xa9\x75\xbf\xb9\x1a\x7d\xcf\x77\x1e\x04\xca\xb5\x1d\xac\xfe\x2c\x18\xce\x62\x2e\xf8\x1d\x50\xc5\xf7\xe6\x26\x8d\xd8\xcf\xc5\x43\xa1\x56\xfb\xa7\xc0\x99\xab\x9b\x29\x9e\xea\x53\xa3\xaa\x99\xff\x1b\x67\x72\x8e\x69\x4b\x5f\x99\xbf\x82\xba\x6a\x91\x99\xd4\xd1\xe0\xa5\xbb\x75\xe9\x40\x26\x6c\x95\xa8\xce\x1c\x7e\xcf\x61\x7e\x9e\x52\xfe\x2a\xbd\xb8\x9e\x9e\xab\x62\x2e\x17\x5b\x88\x8f\x6b\xd7\x92\x46\x2f\xae\xa7\xac\xe4\x15\xcf\x85\xd1\x2b\x28\x0e\x52\x61\xa2\x71\x6a\x6f\x9d\x22\x1b\x38\x40\x2a\x20\x31\x37\x77\xef\xe2\x7a\x8a\x99\x75\xdb\xe5\x64\x30\xd2\xa1\x4c\xb3\x29\xef\xd4\x8c\x06\x0a\x66\x61\x5b\x76\x75\x63\x46\x51\x09\xad\x85\x26\x66\xe1\x18\x4b\x59\xba\xf4\x00\x33\x91\x99\xb9\x11\xc1\x67\x86\x07\xcb\x2e\x9a\x32\x93\xc8\x3a\xc2\x17\x7c\x39\xdc\x5c\x3d\x6e\x56\x9e\xfa\x76\x52\xb5\x3d\xa9\xd6\x4c\xce\x08\x7e\x99\x99\x19\xb5\xef\x4c\x0a\x0a\xdd\xa5\xde\xda\x00\x93\xb2\xaa\xca\x4e\x13\x12\x46\x4a\x13\xfd\xc9\xb0\x5b\xf3\x65\xd4\x86\x5d\x87\xe0\xa7\x90\x05\xb3\x1a\x12\xbc\xa4\x1e\x45\x55\x49\x30\x10\x29\x4d\x66\x22\xb3\xd8\xdc\x09\xc6\x30\xaa\xd8\xe6\xbf\x44\xc9\x74\xc7\x13\x07\x03\x8b\xaa\x85\x11\x2f\xa3\xe0\x68\xad\x55\xc5\x76\x2c\x55\x39\xf0\x54\x43\x10\x97\x4a\xd7\x63\x38\x4a\x99\x52\x0f\x4d\xb9\xcb\xe9\xa1\x6e\x4a\x5e\x2f\x77\x5c\xed\xd6\x1b\x2f\x38\x3f\xbb\xab\xd4\xdd\x65\xda\x81\x2e\x50\xcb\x1d\xa9\x03\xb6\x76\x34\x22\x76\x68\x1d\x95\xd8\xed\xde\xc7\x62\x5b\x51\x66\x89\x67\xd6\x18\xbd\x29\xba\x48\x7b\xc9\x64\x97\x4f\x22\xd9\xcd\x4a\x10\xb4\xdc\xd5\x46\x00\xe8\x30\x43\x16\x82\x56\x11\x41\xd4\x46\x0f\x75\xe1\x7e\x07\xc3\x01\xae\x74\x1f\x94\x09\x1f\xd8\xad\xa5\x1d\xa4\xe6\x81\xf5\x60\xc2\x78\xb5\x78\x64\x70\x57\x11\xd9\x80\x1e\x20\x3d\x06\x70\x0d\xbd\x14\xad\x3d\xdf\xa5\xac\xed\xb0\x41\xe3\xfc\x60\xcc\xf8\x97\x30\x66\xdc\x92\x1e\xde\xb6\x18\x88\xaa\x52\xd5\x7e\x16\x83\xbd\x6d\x17\xf1\x2f\xff\x3e\xb6\x8a\xf8\xb7\x55\x53\xef\xfd\xf1\xdf\xcf\x36\xe1\xe9\xfa\x67\xb1\x13\x5c\xdd\x6c\x62\x45\x5e\xd8\x85\x23\x5c\xe5\x48\xce\xc1\x6b\x47\x52\x1d\x5d\xe6\xe3\x32\x6b\x2a\x9e\x9d\x30\xe8\x93\xfc\x22\x13\x76\xc9\x93\x25\x34\x5d\xdb\x1c\x56\xfd\xfd\x7d\xc1\x18\xbb\xba\xf9\x9e\x9d\x15\x81\x34\x1d\x4c\x3d\x04\xc5\xb9\x55\x4d\x0d\x2a\x2d\xaf\x59\x26\x8c\x0a\x49\x94\x0f\x2f\x26\xa2\x09\x6d\xe5\xf9\xb2\xec\xcf\x4d\x96\x40\x4e\x5a\x63\x38\xbe\xba\x79\xfc\x96\x29\x23\xe5\x3f\x7e\x77\xc2\xb8\xd6\x72\x51\xb4\x46\xf4\xe2\x8c\x8b\xad\xc5\x60\xb1\x49\xa7\xfe\x2b\x45\x85\x1c\xaa\xbd\xfe\xe3\xb9\xfa\xb6\x6a\xaf\x66\xab\x3e\xf3\x00\x5f\x47\xbd\x39\xd4\x79\x3d\xd4\x79\xfd\x5c\x75\x5e\x81\x50\xee\x16\x0d\xb4\xad\xb4\xab\x4a\x3f\xa8\xc5\x6e\x6a\x93\x6f\x18\xd7\x9a\x0c\xdf\xb2\x6a\x53\xa6\x16\x1a\xcf\xef\xc1\xad\xfa\x65\xbb\x55\xe7\x50\x5c\x97\x54\x11\x92\xd2\xcc\xee\xed\xa1\x82\xec\xa1\x7d\xcc\x55\x96\xa9\x55\x24\xef\x14\x7e\xc7\x05\x57\x8b\xbe\xb4\xb8\xb3\x70\x2a\x0b\x2d\x92\xa6\x12\xd3\x07\x59\xde\x7d\x98\xfe\x22\x2a\x39\x5f\xff\xc0\x93\x07\x11\xa3\xc4\x9b\x5a\x77\x45\x49\x70\x65\x95\x92\x0c\x95\x74\x7e\x30\xc8\xb1\x98\xcb\x0a\x89\x2d\x80\xdd\xc9\x3a\x88\x09\xac\x1e\x0d\x39\x4f\xcc\x51\x87\xd4\x2d\x67\x95\x9e\xd9\xcf\x80\x34\x92\xa8\xa2\x10\x09\x92\x7e\x35\x61\x81\xf1\x2a\xe7\x0f\xa8\x1b\xfe\x74\x77\x77\x33\x75\x0d\x55\xe1\x50\x93\xdb\x23\x23\x14\x44\xdf\x3f\xcd\x91\x0c\x62\x16\x09\x27\x7c\x25\x41\xca\xff\x08\xd3\x77\x9b\x00\x19\x55\x38\xba\x4a\x24\x42\xe2\x44\x78\x2e\x3c\x6f\xa9\x04\xcf\x2c\x70\xc9\x84\xd9\x10\x1f\xfa\x81\xa6\x35\x97\x8b\x86\x32\x79\x83\x0f\xb8\x8f\xbf\xd1\xec\xee\xc3\x94\x25\x95\x80\xcc\x5c\x9e\xe9\x91\xf9\xa8\x43\xe6\x31\xe3\xb5\x56\x7c\x3b\x71\xba\x9a\xe1\xd7\xcd\xc7\x1e\x9b\xac\x10\x15\xc8\xb3\x60\xc1\xc9\x79\x61\xcf\x63\x2e\xd3\x34\x23\x57\xe4\x03\x45\x07\xf1\x82\xfe\x06\xf8\x5b\xbb\x9b\x70\xd1\x13\x51\xd2\x86\x27\x75\xc3\x33\xbf\x1c\x89\xca\xcd\x2a\x44\x17\xe0\x24\x7e\x22\x0f\x32\xc0\xeb\xc9\x00\x00\x52\xf8\xc3\xba\x8e\x59\x88\xaf\xe6\x4c\x8b\x1a\xa3\xad\x8a\x26\x9f\x09\x48\x85\x9c\xad\x6b\x0c\xa4\xae\x04\x4f\xfd\x82\xd0\xc1\x9f\x89\xb9\x99\x4f\x2d\xaa\x5c\x16\xdc\x2d\xba\xd9\x6e\xd4\x5b\xed\xa5\xa1\xd0\x30\x0b\x18\x00\x07\xa1\x04\xf8\xbe\xb9\x34\x5c\x21\x93\x58\x86\x3c\x53\x8b\x85\x2c\x16\x21\x7f\xa8\x9b\xaa\x60\x3a\x93\x8b\x65\x9d\xad\x29\xfa\xb3\xf2\x3f\x64\x46\x33\xaa\x97\xbc\x1b\xe5\x0c\x53\x0d\x4e\x94\x39\x97\x0b\x51\x1d\x19\x1a\x6a\x34\x45\xfc\xe9\xbb\x6f\x21\xe5\xbd\x12\x8f\x52\xc5\x5c\x7b\xb7\xf8\x79\xdb\xc0\xcd\x54\xa4\x01\xcd\xee\x93\xfb\x4d\xda\xbf\x2c\x12\x31\x15\x89\x32\x5b\x14\x31\xd3\xfb\xdc\x08\x99\x0b\x40\x54\xc2\xb6\x6e\xad\x03\x9f\x37\x34\x81\x3d\xf1\x1c\x68\xa9\x56\x34\xa0\x2b\xe2\xe7\x78\x33\x4a\x43\x83\x52\xe2\xfd\xf0\x22\xfa\xad\x56\x1c\xf0\x32\x2a\x88\x8f\x03\x36\x05\xb2\x07\x0c\xd3\xd9\x1a\xa0\x41\x60\xaf\x37\x8b\x02\x67\xbb\xf5\x09\xe9\xf4\xed\x79\x63\x0e\xe8\x88\x15\x0a\x7b\xeb\xbf\xf9\xa9\xf0\xb5\xe7\xc3\x25\x61\x08\xff\x9b\x80\xcb\x1d\x4e\xc0\x2c\xd8\xd5\x1d\xf7\xd3\x75\x10\x59\xe0\x82\xdd\xbe\x3f\xff\xe6\x9b\x6f\xfe\x07\x2c\x82\xae\x79\x5e\xfe\xcb\x2d\xe1\xcb\x5d\xfd\x35\x97\xd9\x07\x23\x4a\xee\x4a\x47\x32\x90\x3b\x43\x82\xea\xd2\x07\xcc\xec\x68\xd9\x61\x39\x00\xc0\xd9\x0e\x77\x84\xcf\x79\x25\xa0\x41\xe1\xbb\x00\xd4\x86\x20\x91\xdb\xdf\x47\x3b\xff\xd8\x7a\xec\x76\x80\xdc\xd1\x88\xcf\x0f\x03\x9b\x78\x9a\x1a\x1e\x68\x8f\x93\xaa\xec\x3f\xaf\x79\xa1\x82\xd3\x45\xb2\xcf\x4c\x2c\x24\x65\x53\xcc\x99\x78\x34\x92\x7f\x40\xf5\x1c\xbd\x7c\xa6\x19\xed\x75\x5c\xe3\x37\xaa\xaa\xdf\xab\x6a\xc5\xab\x74\x37\x9d\xa6\xff\xc2\x56\x8f\x50\xa9\x2a\x80\x95\x31\xef\x80\x76\x83\x40\x72\x58\x48\xe0\x57\x31\x9b\xaa\xe4\x41\xd4\x14\xcf\xff\x5f\xa6\xf5\x7f\x51\x67\xce\xed\x8e\x81\xbb\x78\x46\xd6\x74\xc3\xaa\xda\xec\x80\xf9\xaf\x66\xc7\xe0\x06\x60\x5a\x98\x37\x6a\x91\x9e\xc0\x62\xd2\x27\xd5\xa3\xa8\x26\xec\x26\x18\x05\xec\x89\x61\x67\xd3\x9b\x8b\xff\xe9\x25\x27\x04\xdb\x15\xde\xa1\x3c\x61\x57\xb5\x8d\xb8\xd6\xfe\xb3\x18\x3b\x46\x01\x59\x74\x7b\x69\xdc\x4b\xc1\x53\x23\x52\xfa\x22\x22\x24\x2d\x1c\x34\xba\x03\x8e\xc8\x1f\x58\x8e\x84\x6b\xb6\xc9\xca\x58\x11\x01\xa3\x3b\x67\xfd\xd7\xf1\xab\xbe\xdd\x3d\x18\xa7\xd5\xdf\x7c\x1d\x8d\x04\xd8\x68\xe0\xbe\xa9\xd4\xd3\x7a\x47\xda\x16\x34\xdd\x4e\xd5\x4c\xe3\x83\xb1\xe6\x70\xb5\xff\xf0\x57\x3b\x5a\xf7\x03\x6a\x7e\xd0\x1d\xf8\xf9\xf6\x03\x04\xf0\x98\x43\x63\x78\x64\x37\x12\x17\xaf\x02\xcd\xd9\x34\x8a\x1b\xb3\xf6\xbc\xb8\xb7\x82\xa7\xe6\x3a\xe8\x1f\x79\xbd\x11\x07\xae\xdb\xd6\x87\x0e\xa3\xc1\x81\x30\x2e\x7d\x62\x93\x8b\x41\xdc\x1a\x9a\x42\xed\x00\xfa\xad\xe7\xca\x6a\x3f\x8e\xc5\x2e\xf8\xc7\x38\x0c\x22\x20\x3e\x5a\xd7\x1b\xff\xde\xe8\xe0\x67\x30\xcb\x43\x88\x9b\x4f\xf3\x5d\x97\x31\x80\xc3\x3d\xd7\x74\x2a\x92\xa6\x92\xf5\xfa\x5c\x15\xb5\x78\xda\xe6\xf8\xeb\xb4\x66\x4b\x95\xa5\x10\x65\x3d\xce\xcc\xe1\x63\x9a\x9e\x33\x5e\xe3\xb9\xb4\x05\xfd\x54\x9e\xfb\x08\x6e\x51\x19\xf5\xc0\x5c\x3e\x73\xa9\x94\x51\x60\xa5\x30\x1d\x19\x11\x9f\x67\x5a\x31\xba\x73\x66\x35\xdc\x3b\x13\xdd\xfe\xf8\x84\xb1\xf7\x90\xdb\x86\xe4\xa7\x85\xfc\xd6\x6d\xcb\x6a\xfe\xe0\x94\x37\xb3\xf3\x20\xeb\xcd\x3b\xaf\xf7\x27\xb8\x9d\x90\xcf\xf5\x8f\x95\x6a\x22\xde\xdb\x33\x14\x4e\x79\x06\xe0\x7e\x98\xc8\xc6\x33\x4a\xfa\xb5\x01\x82\x36\x45\xdd\x88\xc0\x01\x6c\x1d\xc4\xcd\x80\xc9\x16\x56\xc7\xc2\x5d\x9b\x5b\x8b\xf9\xce\x70\x46\xfe\x4c\x66\xbb\x5a\xb1\x64\xc9\x8b\x05\x2a\x9a\x6a\x65\xba\x58\xca\x12\xf9\x03\x77\xa0\xde\x28\xa3\x9a\xc7\x0e\xc3\xa9\x54\xe9\xf7\xf7\xc5\x7d\xf1\x0e\x25\x6d\xb5\x02\xdd\xe4\xc7\xab\x0b\xa7\x6a\x9a\x56\xef\xa7\x30\x45\xf6\x35\xb6\xd2\xa2\x5e\xc8\x94\xcd\xd0\xac\xa9\x45\xcd\x8e\x0b\xb1\x42\x48\x43\x87\xa3\x47\xc7\xd8\xd6\x83\xa0\xde\xdc\xc7\xa9\xcb\x13\xf6\x0d\xf6\x59\x8a\x2a\x97\x90\xef\x6a\xfa\xc5\x83\xf0\xe9\xf6\x0d\x45\x75\x56\xab\x71\xb5\x1a\x8f\xc7\x63\x33\xd6\x2b\x80\x2f\xb4\xda\xa5\x5d\x03\x97\x3e\x99\xab\xd4\x2a\x04\x7e\x25\xcc\x11\xf4\x9f\xd0\x36\x0d\xbd\x07\x58\xba\x49\x1f\xa4\x8d\x3e\x87\x95\x1e\x2a\x8e\x11\x69\xe4\x78\x78\x88\x2e\x06\xfb\x05\x3a\xc7\xc0\x18\xad\x46\xeb\x00\xd9\xc1\xf0\x83\x15\xc5\x6c\x69\x1e\x59\x68\x99\x0a\x73\x6a\x5b\x75\x44\x30\x20\xb5\xc8\xd6\x70\xc0\x20\x0f\xb3\x75\x80\xd0\xc8\x41\x88\x93\x8c\x46\x4c\x65\xdb\xdc\x70\x8e\x3b\x4b\x76\x02\x8a\x0f\x74\xbd\xe4\x8f\x82\x15\x8a\x89\xf9\xdc\x30\x48\x55\x30\x51\x2e\x45\x2e\x2a\x23\x2c\x84\x1f\xd2\x4d\xb2\x64\x5c\x7f\x6f\xa8\x42\x65\x36\x0c\x2d\xd9\x39\x2f\x91\x28\x00\xf8\x42\x2a\x2b\x5b\x11\x84\x2e\xa2\xd9\xfb\xfb\xa3\x4f\xc5\xad\x52\xf5\x47\xa9\x81\xde\xdd\x1f\xc1\x1b\xf7\x47\x67\xd9\x8a\xaf\x11\xe9\xb2\x63\x25\x60\x69\xa0\x35\x07\x0d\xa3\x89\x03\x4d\x71\x36\x74\x6f\xcd\x71\x34\x37\xa0\x56\x00\x1a\x89\x7c\xbd\xae\xd6\xc8\xd9\x7b\x86\x86\xb2\x52\x89\xd0\x7a\xc2\x7e\xd6\x42\xbb\xac\x1b\x5b\x8f\x44\xd2\x61\x9d\xb0\x8f\x7c\x8d\xa4\x6d\x86\x38\x1f\xb2\x60\x5d\x5a\x03\xc6\x7f\x7a\x36\x53\xf5\xb2\xdb\x00\xeb\x3a\xf6\x68\xd4\xc8\x7a\x4d\x9a\xd0\xf6\xd9\xef\x1f\x68\xa0\x0e\x89\x20\x72\x6d\x5e\x07\x74\x73\xb7\xbb\x00\xeb\x77\xad\x60\x8b\x22\xd6\x91\xbe\xd3\xc7\xaf\x17\xa8\xed\x66\x61\xb9\x86\x14\xff\x62\x5c\x29\x54\xb4\x2b\x34\x84\x81\x5d\xa5\x77\xb5\x6d\xc1\x24\x78\x22\x73\xbe\x80\x78\x1b\xbb\xdc\xb5\x62\xa2\xd0\x4d\x65\xf3\xfe\x03\xdf\x07\x7d\xea\xe7\xab\x0b\xf6\x96\x1d\x9b\x6f\x9d\xc0\x3a\x42\x8d\x25\x70\xd7\x19\xad\xbc\x3d\x46\x39\xb7\x5d\xc0\x90\x60\x07\x99\xaa\xd0\x16\x03\xe6\x38\x38\xda\x34\x26\x73\x5b\x2d\x81\x2b\x45\x65\x56\x0b\x2a\x4a\x7f\x79\x1b\x1e\xb7\x46\xc3\x66\xfe\xac\x87\xdc\x9c\x3f\x3f\xe3\x2e\x84\x06\x2c\xb3\xb3\xed\x61\xe2\xf6\xd9\x18\x83\x2e\x1e\xed\x97\xb8\x70\xcf\xbf\x29\x5a\x7c\x90\x45\xf3\x34\x58\x3e\xcc\xac\xf0\xf4\x12\xda\x40\xdf\xf0\x75\x45\xd1\xf6\x50\x62\xa1\x27\x1d\xd8\x33\xe9\xcd\xa3\xf1\xcc\x3f\x38\x93\x36\x66\x8d\x71\x56\xf1\x22\x55\x79\xef\x6b\x0e\xe0\xc2\x4f\x8d\xfd\x81\xf6\x60\xe7\xd2\x1b\x97\xad\x8d\x30\x5b\x13\x88\x65\xc0\x0b\x36\xa6\x4c\x80\xdc\xa6\xc3\x5d\x01\x0b\xbd\xac\x00\xc6\x02\xce\x3d\xdc\x11\x59\x74\x56\x73\xd4\x4f\x0b\x0a\x76\x0b\xcc\x06\x32\xe7\xd5\xda\x30\x1d\x5c\xd4\xd6\xde\x16\xca\x7e\xda\x45\x60\xa6\x94\x83\x61\x44\x98\xd8\x79\xdc\xcf\x82\x62\xce\xa9\x59\x8d\xb5\x4e\xea\x2c\x96\xd9\x86\x0f\x40\xd4\x0f\x02\xfe\x1c\x82\x50\xca\xe8\x55\xac\x36\x62\x35\x41\x2c\x18\x08\x18\x22\x46\x84\x6b\x0a\x0f\x71\x6d\xdb\x1f\x0f\x25\x9c\x9e\xb0\x5c\x2e\x96\xb5\xa3\xd1\x19\x6f\x8a\x64\xf9\x1a\x39\x33\x38\x19\x98\xf0\x4a\x16\xa9\x5a\xe9\x8d\x37\xf3\x57\x6c\x63\x0f\x6a\xe2\xd4\x96\x7d\x6f\xa7\x72\xc9\x42\x14\x14\x1f\x1e\x80\xee\xc9\xb7\x1b\x6d\xd6\x73\xf2\x0f\x60\x11\x3b\x03\xae\xe0\xea\x74\xba\x74\x37\x6c\xc7\x48\xac\xce\xc5\x8c\xd7\x62\xc0\x6d\x8b\xa3\x61\x6c\x1c\xc5\xb0\x9f\x63\x2a\x17\x05\x94\x8c\xde\x0c\x72\x67\xd1\xf1\xd1\xa4\xc3\xb5\x6e\x57\xe3\x23\xb3\x1a\x7f\x54\x32\x45\x6b\x10\x22\x9a\x5c\x3e\xf1\xa4\x26\xdf\x1c\x8a\xe5\x1e\xee\xcb\xc8\x83\xdb\x91\x9c\x20\xf3\x99\x50\xd5\x63\x4e\xe9\xc0\x86\x91\x78\xf8\x75\xc4\xe6\x82\xf1\x0d\x0c\xed\x65\x10\xcb\x46\x3f\x08\x6a\x7a\x3f\xdb\x09\xd5\xe9\x68\xc3\x36\x11\x8c\xf3\x26\xa3\x44\x29\x12\x34\xf2\x05\x8f\x36\xe6\x5b\x75\x4c\x3a\x74\x75\x23\xa1\xc9\x49\x2d\x1f\xc5\x85\xe0\x69\x26\x8b\x61\x8f\x3d\x1e\x36\x9e\xb1\xb4\xa9\xb8\xb5\xe2\x58\x9f\xbd\x75\xfe\x92\x13\x16\xbb\xb4\xe9\xf7\x90\x77\x1f\x42\x21\x4e\x8d\x38\x0a\x4e\xdb\xc0\xd7\x4f\x18\x3b\xc8\xd0\xe1\x7d\xa3\xd6\x21\xc4\x4e\xce\xab\x07\x23\xad\x1a\x5a\x49\x05\x91\x1e\xa0\x9d\xd6\x2a\x91\xed\x28\x05\x6d\xeb\x39\xe5\xae\x10\x41\xa9\xb4\x84\x6f\x13\x73\xd8\x51\xac\xe1\x83\x95\x32\x0d\xb9\x6a\xd3\x3e\x34\x65\x05\xc0\x47\x41\xdd\xcc\x3d\xa8\x4d\x58\xb2\x92\x37\xb5\x82\x9a\x0a\x53\x2c\xb5\x7d\x96\x24\xe6\xaf\x3b\xf5\x20\x62\xf6\xf4\x0d\xad\x83\x08\xb5\xd5\x52\xd4\x4b\x42\x40\xc4\x02\xde\x1c\x1b\xb2\x1a\x5a\xfa\x0b\x0c\x9f\xe7\x35\xd5\x98\xa4\xfa\x53\x71\xe1\x3a\x38\x5d\x83\xae\x92\xc0\xf0\x83\x35\xd4\x08\xcf\xc8\xb1\xd1\x73\xdf\x80\xc2\xcc\xc8\xce\x9a\xad\xbd\x40\x00\x98\x9a\x94\xb7\x7a\x07\x81\x85\x6e\x97\x6d\x62\x42\x2f\xcc\x90\xa3\xf1\xa0\x6f\x8e\x7e\x05\x56\xeb\x06\x6d\x96\xe1\x69\xec\x53\xc4\xc7\xa5\xd1\xe8\xc7\x90\xb6\x3b\x7e\x10\x6b\x02\x79\x3c\x8a\xb6\x32\x07\xa5\x16\x0b\xd3\x08\x5e\x30\x9d\xa5\x85\xf6\xc9\xdb\x51\x78\xf7\xcd\x79\xda\x13\x76\xe3\x7f\xf4\xdc\x11\xd6\xac\x93\x54\x6c\xc1\x49\x5d\x5e\xab\xe9\xd2\x06\xe4\xe1\x55\x27\xc3\x49\xd1\x4e\xee\x7d\x4e\x12\x2f\xcd\x6d\xc8\xb6\x34\x15\x35\xce\x08\xcd\x4a\x2d\x41\xeb\xa2\x65\xfb\x38\xc7\xac\x93\xf7\x46\x38\xbd\x3f\x8a\x98\x57\xde\x84\x2d\x7e\x95\xf5\xf2\x27\xa5\xeb\x6b\x51\xbf\x19\xb5\x1f\x99\xbf\xa9\xeb\x37\xe6\x80\xbd\xb9\x56\x85\x78\x33\xe9\x2e\xac\xcb\x89\xf6\xe9\xf2\x43\xc9\xd9\x34\x78\x87\xf3\x08\x0f\x82\x3c\xe1\x3b\x85\xf6\x25\xf3\x05\x2b\x34\x19\xf1\x87\x43\x6d\x41\x68\xbd\xc4\xb1\xae\x54\xf5\x30\x62\x6b\xd5\xe0\x0b\x46\x95\xa7\x60\x80\x60\x91\xc4\x93\x2b\x87\x52\xab\xe1\x69\x47\x8d\x44\xa2\xe0\xb3\x4c\x10\xcd\xf8\x20\x8b\x87\xc8\x15\xbe\xec\xb5\x89\x10\x94\x30\x31\x09\xc1\x2d\x88\xc0\xe8\x80\xa6\xc8\xe2\x7f\xe3\x8a\x40\x65\x42\xa4\x99\xa2\x78\x94\x95\x2a\xa0\xee\xf9\x23\xaf\xa4\xf9\x96\x1e\xb5\x81\x3e\xf5\xba\xa8\xf9\x13\x24\x75\x43\xdd\x33\x96\x99\x51\x4c\x98\xe5\x49\xdf\xef\x98\x15\xe6\x6c\x78\xe7\x3b\x50\x2c\x6f\xf0\x0b\x68\x17\x69\x3f\x0e\x77\x85\x5d\xc6\x5a\x11\x1b\xa4\xc6\xbc\x60\xe2\x49\x62\x35\x77\xc3\x24\xcd\xd4\xd1\x84\x02\x76\x83\x31\x5c\x1d\xb8\x78\x3c\xa1\xc3\x80\x46\x45\x96\x8a\x59\x03\x71\x82\x64\xfb\x04\xbd\x24\x71\x84\xcc\x5f\x6b\x70\x37\x63\xa0\x50\xb1\x40\x02\x80\xde\x4c\x19\xb6\x07\xb3\x31\xc1\xe6\x01\x11\xb4\xeb\x0b\x71\x5b\xa5\x48\xc0\x43\xa7\xaa\x14\x91\x30\x29\xee\x27\xb2\x0e\xa8\x98\xb5\x66\x35\xb2\x61\x24\x76\x5b\xed\x5b\xc1\xb2\xe8\x66\xe6\xaa\x11\xb5\x8a\x42\x6b\xc6\xb3\x72\xc9\xc9\xbf\x42\x39\xb9\x60\xdd\x5d\x2a\xc0\x2e\x34\x23\xb6\x68\x0c\x20\x92\xe2\xb9\x85\xef\x5d\xf6\x37\x95\xcd\x05\x48\xbd\xaf\x41\xe2\xfb\xdd\xbf\x3a\xad\x37\x97\xfd\x2c\x93\x5c\xc7\xc2\xcc\x7e\xf2\x0f\x29\x53\x4e\x59\x49\xcc\xaa\xa9\x50\xb1\x07\x96\xed\xea\x86\xd6\xc7\x92\xa6\xf6\x8d\xf3\xdb\x83\xaf\xcc\x65\x26\x98\x0c\x84\x19\x8f\xbb\x04\xab\x0f\xc6\x3f\x20\xc2\x85\x2a\xc6\x01\x4d\x72\x00\xc9\x2f\x5d\x5d\x37\xbb\x1d\x16\x55\x96\xfb\x2d\xe9\xd5\xcd\x79\x04\x36\x87\x4e\xa9\x69\xf0\x46\x33\x59\x26\x5e\xcb\x8f\x10\x94\x2d\x41\xae\xc1\x92\xc4\x77\x8e\x15\xf8\xd4\xc2\xa6\x0a\xed\xb3\x4a\x2d\x09\xe9\x0c\x89\xde\x08\x87\x65\x63\x27\x71\xe7\xc9\x23\x35\x72\x91\x59\x9d\x3d\x07\x13\x85\x83\x7c\xf4\x5b\xbb\xfb\x94\x6e\x62\x95\xb1\x3a\xc3\x2c\x65\xfa\xd2\x95\x8b\x63\x40\xb4\xc5\x1b\xdb\xce\x1a\x62\x6f\x54\x1a\x89\x9d\x6c\x1f\x6c\x68\x6f\x57\x43\xa3\xf3\x90\x93\x82\x31\xb6\xa8\xcf\x20\x29\x44\x79\x22\x98\x6e\x6f\x9a\x2c\x9b\x82\x4b\x27\x16\x1a\xd9\x69\x31\x74\x31\x9d\x13\x1e\x03\x3f\x6d\x63\x0a\xe1\x36\xa3\x74\x2b\x18\x06\x19\x94\x4d\x46\x70\xb9\x2e\x3f\x04\xc6\x44\xd6\x27\x0b\x7a\x4a\x5a\x21\x5a\x4f\x5a\x6b\x01\x90\x25\xf8\x31\x67\xb4\x27\x1c\x35\x05\xbc\xfb\x51\xa6\x0d\xcf\xe0\x43\x86\x77\xe7\xd6\x46\xe8\x13\xb4\xea\xa5\xc8\x69\x4c\x13\xf6\x5e\x55\x8c\x8a\x05\x8f\xec\xf0\x01\x27\x5d\xcd\x59\x0a\x1c\x99\xe2\x81\x91\x3d\x93\x78\x84\x45\xdf\x68\x1c\x46\x22\x23\x62\xbe\x37\xba\x92\x67\x21\xa7\xb8\x0e\x5f\x91\x14\x24\x8b\xc5\x18\x7e\x31\x13\xa1\x2f\x8d\x55\x31\xe6\xe3\x56\x8e\xf0\xb3\xa9\x13\x94\x1e\xed\xd6\x0c\x7d\x6d\xea\x6f\x06\xb0\x8b\x3c\x82\x62\x42\x26\xff\x86\x42\xd6\x56\x85\xea\xaa\x90\x75\xd8\xca\xec\x80\x03\xae\x90\x96\xcf\x97\x95\xc4\xfa\xc8\xad\xfe\xa0\x1c\x1f\x46\x7a\xc3\xf1\x32\x27\x51\xb6\xfa\x03\x5d\x5c\x7b\x68\x5f\xcc\xe1\xd1\x32\x15\x94\xc3\x03\x02\x6b\xa0\xb0\x4b\xcd\x96\xbc\x48\xe1\xcf\x24\x51\x95\x05\xb4\xc5\xb8\x21\xf8\x98\x93\x8f\x97\x78\x31\x30\x53\xb0\xe8\x7e\x19\xd8\x51\x95\xb7\x04\x12\x4b\xee\x1a\x40\x45\x63\x3c\x37\x92\x74\xcf\x68\xd9\x59\x11\x9b\xad\x01\x43\xfd\x60\xf1\xba\xac\x14\x36\x62\x2e\xbc\x06\x41\xef\xf4\x88\x7d\x30\x4a\x40\xf8\x83\xaa\xd0\x9a\xd1\x94\xf4\x13\x8e\xde\x8a\x39\xb7\x21\x6c\x31\xc6\xac\x75\x26\x03\x50\xd1\x1c\x95\x74\x43\xa6\x48\x1b\x27\xb0\xe2\xc0\xa0\x30\x5b\xb3\xb9\x24\x18\xe0\x00\x6e\x9a\x98\xca\x29\xa4\x81\x78\x3f\x87\x0f\xf3\x5a\x97\x14\xd8\x56\xfb\x90\x44\xc8\x74\x42\x81\xda\xc5\x4f\x20\xd2\x3d\xaa\x5b\x04\x12\x8e\xc6\x9b\xf6\x4a\xeb\x09\xfb\x20\x73\x1b\xbe\x10\x58\x88\x65\x67\x71\x11\x16\x45\xe6\x32\xe3\xe6\xb0\xe8\x25\xe0\xaa\x75\xb7\x60\x37\x55\x3f\x12\x4a\xf6\x32\x80\x36\x33\xd8\x71\x40\x56\xbe\x68\x53\x40\xa1\x52\x31\x50\xf7\x9e\x9e\xa0\x61\x30\x88\x44\x73\x20\xf6\xae\xb0\x08\x80\x6c\x73\x6f\xe4\x77\x58\xdb\x18\xe1\x62\xe4\x3b\x08\x55\x20\xc0\x6b\x87\x8e\xaf\x0d\x73\x70\x28\xfd\xc0\x94\xc3\x1e\xe1\xec\x98\xbe\x46\x8c\x6b\xdd\xe4\xae\xe4\xaa\x39\x8c\x74\xb5\x3d\x3a\xbc\xbd\x0a\x51\xb6\x6b\x7a\x19\xae\xe2\x71\x1d\x3c\xa5\x60\x47\xfb\x17\xe1\xb7\x13\x05\x00\x74\x8f\xc0\x6e\x00\x72\x88\xac\x7d\x69\x87\x09\x9b\x46\xde\x04\x7d\x93\x5a\x00\x4c\xe2\x4c\x04\xe0\x9b\xd4\x4f\x07\xb6\xdc\xcf\xfe\x39\x2c\xcd\x9b\x57\x4e\x11\xe1\xc2\x30\xad\xb1\xe9\xed\x34\x62\xcd\xb5\xce\x35\x9e\xdd\xb4\xac\xb7\x11\xc0\xb9\x47\x51\x2d\x05\x8f\x04\x8a\x7e\xa2\x27\x61\xd9\xf9\x3a\xa0\x56\xcc\xbe\x1a\x1a\x56\x31\x38\x89\xea\x63\x70\x87\xc8\xc2\xc9\x20\x72\x8b\xde\xac\xf3\x8c\x6b\xdd\x8f\xd0\x21\x3b\x62\xe9\xea\xea\xf1\x9a\xf1\xd4\x86\xff\x80\x07\x97\xfc\x63\x61\x3f\x41\x13\x6f\xf5\x77\xc0\xf0\x5b\x5b\x9a\xe3\x81\xfa\x61\x3a\xf2\x53\x82\x5d\xb6\x8a\x33\xfa\x9a\x8c\x2c\x89\xb1\x5c\x2e\x72\x15\xc9\xf7\xf6\x4f\xc0\xec\x28\x4c\x38\xd2\x0d\x9d\x2c\x34\xda\x2c\xc3\x85\xcd\x2a\xc1\xd3\x35\xb8\x47\xcc\x84\x5a\x5f\x6a\xe7\xc1\x42\x69\x56\x6b\x42\x22\xa1\x8b\x44\xbe\x11\x73\x5b\xd9\x11\x73\xbd\x47\xcc\xca\xb9\x56\x5c\x6b\x01\xc9\x87\x9f\x1d\x31\x80\x46\x5d\x49\x2d\xcc\xad\xa5\x99\xe5\x5c\x16\x14\x14\x02\xcc\x83\x42\xde\xb8\x66\x7f\x13\x95\xda\x16\xbc\x2b\x8a\x25\x2f\x12\xbc\xec\xa7\x0f\xa2\xd4\x10\xb1\x0b\x67\xfb\xeb\xb7\xef\xfe\xc7\xdb\xaf\xbf\xfe\x0e\x4e\xbb\x5d\x97\x49\x9e\x6e\x32\x08\x00\xef\xfc\xb3\xbb\x4e\xec\xf1\xdd\xe4\xdd\x77\xa3\x7d\x0d\x05\x37\x2a\x75\xcb\xd6\x37\x10\x6c\xbd\x69\xfb\x3a\x94\x26\xfd\x12\xe6\x7f\xc7\x1c\x4c\x43\x68\xa5\x2a\x86\x6c\xa0\x37\x9d\x16\x36\x1e\xf9\xc6\xdb\x44\x6d\x27\x68\x7b\x21\xf7\x73\xa6\x56\x56\xa0\x93\xf5\x7a\xc2\x3e\x61\xd2\xd5\xb5\x78\x34\xf2\x39\xf5\xfa\xc1\x34\xba\x71\x6d\x42\xbb\x59\xac\x45\x10\xdc\xf5\x6a\x06\x9b\x6b\x55\xdc\xb8\xf1\xbb\x0f\xf5\x77\x24\x88\xd5\xa6\x46\x71\x07\xb6\x7d\x4a\x2a\x1d\xfb\x85\x57\x90\xc3\x4a\x1e\xa5\x44\xe5\xa5\x2a\x80\xd8\xa1\x89\xca\x4d\x03\x38\x03\x65\xc1\xbb\x4e\x42\x2c\x01\x28\xd9\xe0\x46\x78\xe6\x08\xc1\x79\x9c\xd6\x48\x28\xf6\xf1\x68\x3f\x55\x51\xd4\x3c\xf9\xd3\x83\x2f\x23\x95\x89\x12\x16\x4b\x2a\x75\x38\x50\xe8\xc6\x8e\x03\x2e\xad\xe1\xfa\xd8\x0b\x08\x82\x95\xbf\xf8\x23\x2f\x1e\x56\xad\x99\x6d\xf5\x7a\x7d\xf3\x75\xb8\xd6\xee\x33\xdb\xdc\x5f\x21\xfc\x81\xd5\xc2\xfd\x21\xbc\x3f\x22\xbd\xdb\x5c\xfe\x71\x52\x49\xf0\x28\xb9\x50\x47\x7a\x48\x10\x52\xad\xe7\x46\x30\x5e\x29\x17\x60\xfc\x20\xd6\x2b\x55\xb9\x72\x2d\xf6\xab\x2d\x61\x98\x3e\x8b\x30\xa7\x64\x8c\x87\x50\xb5\x8a\x74\x9a\x48\xe3\xf5\x84\x9d\x19\x3d\x1b\xac\xd8\xa0\x75\x58\x49\xc2\x52\xd0\xd9\x3a\x34\xad\xb6\xb6\xc1\x26\x50\xd0\xd7\x8c\x34\x00\x1b\x33\x68\xa1\xf0\xe7\xcc\x12\x6e\x1b\x45\xa9\x2a\xa0\xac\x2d\xc8\x8c\x42\xd9\xc7\x43\xd0\xd0\x3e\xfc\x7f\x20\x43\xd5\x8f\x80\x03\x5d\xb7\x1a\xcd\x02\xad\xf7\x34\x08\x61\x8e\x8e\x03\x3c\x33\xe3\x74\x2d\x27\xec\xcc\x2a\x78\xc8\xba\xc0\xd6\x6c\x3a\x33\xe2\x5d\x47\xbf\xc4\x16\x67\xd7\x17\x56\xf7\x22\xd0\xe3\x76\x7c\x06\x01\x22\xb4\x46\x02\xac\x92\x20\xa5\xc5\x6f\x0d\xcf\xd0\xcb\x73\x57\x35\xe2\xfe\xe8\x79\xdc\x06\xed\x68\xa7\x6f\xdf\xbe\xfd\x13\x30\x1b\x18\xdc\x7f\xfb\xfa\x87\xff\xf6\xf5\x0f\xaf\x86\xde\xd4\xce\xd6\xc0\x2a\x3c\x81\x2e\x1b\x8b\x69\xc0\x60\xcc\xc0\xc1\xd5\x89\x8b\x0f\x90\xd5\x80\x08\x11\x19\xc7\x58\xdf\x11\xfb\x54\xbc\xe7\x32\x83\x94\x69\xa0\xec\x2d\xbb\x1e\x36\x7a\x55\xf8\xea\xd3\xaf\x68\x46\x63\x1c\xf2\x40\xa8\xb1\x13\x27\xe2\x24\xe3\xb6\xd3\xa2\x95\x18\xd2\x12\x82\xe8\x46\x49\x1f\x3b\x40\xdb\x8c\x21\x62\x23\x1b\xda\xed\x9c\x4a\x0d\xd9\xb5\x30\x78\xd3\x1a\x55\xf1\x0a\xb6\xbb\x76\x72\x6e\x58\xeb\xc9\x5c\xd8\x14\xa3\x5e\xe2\x85\x8a\xaa\xa6\x68\x47\xc8\x06\x7a\xd2\xfd\x51\x26\x16\x3c\x59\xdf\x1f\xb5\xbf\x14\x9a\x62\xed\x88\xd1\x46\x68\xd4\x29\x99\x18\x25\x98\x1a\xd6\x4b\x70\xa5\x40\xe5\x37\x7f\xde\x90\x98\x34\x9a\x06\x69\x89\x84\x0d\x7b\x44\x4b\x4a\xf5\x02\x31\x8c\x7a\x1a\xc3\x30\x9c\xf8\x05\x8a\xd5\x4c\xd4\xdc\xb2\xe3\xb8\xec\xf5\x6d\x1c\x36\xde\x2a\x8d\xbb\x70\x8d\xd6\x4a\x1b\x32\x28\x35\x68\xc0\x24\x3a\x38\x72\xe1\x3a\xdd\x44\x54\xe3\x9d\xd8\x45\xf3\x5d\x44\x47\xdd\xcf\x0d\xea\xba\xa4\x5f\x3d\x1d\x28\xee\xb7\x84\x33\x30\x61\x6c\x2a\x08\x96\x3e\x8c\xf4\x31\x84\xc2\x4e\xc8\x27\xf3\x80\xad\x07\x45\x8a\x3d\x2b\x85\x77\x66\x0d\x0b\x11\x06\x8e\xc4\xc2\xc4\xca\x4a\x00\x34\x64\x3b\xc4\xc4\x46\x25\x99\xa7\xe4\xc6\xcc\x24\x47\xdd\xb9\xdd\x12\x85\x16\xdf\xcf\xf7\xe0\xfa\xd0\xbd\x36\x4c\x16\xba\x36\x5a\x41\x7c\xbf\xba\xcd\x63\x5b\xd6\xef\xd2\xdf\x76\x2b\xe2\x75\xa6\x41\x06\xf8\x1e\x25\xd9\x8d\x96\xd6\x5c\x3f\x78\xb5\x5e\x8c\x09\xf4\x1f\xb7\x3e\xf8\x9d\x86\x3f\x26\x43\xdf\x69\x74\x8a\x4b\x5e\x89\x1b\x8c\xb7\xbd\xb6\x0e\x82\xc8\x2c\x97\x60\x82\x63\x5a\x16\x8b\x4c\xb8\x00\x5d\xef\x52\xb0\xb8\x4f\x41\x15\xbf\x68\xfe\x15\x55\x26\xc3\xfb\x6f\x88\x5c\x8b\x1b\x91\x1a\x4f\x68\x49\x8f\x52\xac\x50\x35\x95\x8b\x82\x67\xf6\xab\x16\xf3\x02\xc5\xa8\xf6\x57\x9c\xb3\xc3\x79\xa5\xfb\x51\xc5\xbd\x88\xe2\x16\x09\x76\x08\xa0\x37\x57\x17\xec\xdd\x84\xfd\x84\x3e\x2a\xe8\x6b\x1a\x5b\x2c\xe7\xf4\x56\xf5\xd2\x46\x23\xee\xed\xa2\xd2\xcd\x0c\x81\xe3\x77\xa1\x65\xf3\x26\xcb\xd6\xcc\x08\x2e\x48\xb7\x6e\x54\xda\xf7\x45\xdd\x1f\x61\x11\x5d\xfb\x00\x2b\xe8\x4e\xf0\x47\xf7\xb9\xd6\xaf\x86\xbc\xf9\x12\xad\xf8\x44\x3f\x26\xf4\x94\xe4\x66\x16\xbe\x18\xcb\x1b\x8a\x70\x36\x10\xb8\x38\xbd\x09\xa3\xe4\x50\x67\x34\x7a\xe9\x1c\xf0\x91\x2a\x7e\xac\x78\x22\x6e\x44\x25\x81\x88\xbc\x20\x56\xb0\x10\x02\x0b\x6c\x3a\xac\x21\xb6\x30\x7d\xc3\x4a\x62\x86\x04\x88\xc7\x46\xf6\x26\xc4\x89\x54\x00\x94\x92\xc5\x96\xe8\x04\xfa\x15\xaa\x18\x17\x62\xc1\x5b\xa1\x7e\xa0\x23\xa1\x45\x04\xc5\x6b\xa7\xad\x50\x67\x32\xcf\x45\x6a\xe8\x96\xf9\x68\x0f\xa4\xa6\x90\xd9\xa8\xc5\x81\x61\x88\xac\x84\xf9\xb7\x3d\xae\x96\x68\xc1\x17\x5b\xcd\x88\xf6\xc4\x16\x83\xcf\x6b\xa7\xa6\xd9\x8b\x64\x8d\x6d\x5e\x08\x44\x58\x18\x51\x00\x4e\xb1\xdf\x0a\x7b\x07\xed\x95\xc2\x8c\x08\x2a\x33\x18\x74\x68\xde\x9e\xab\x2a\x91\x33\xa3\xa0\xf3\xcc\x99\xf5\x38\x86\x51\x62\x37\x13\x36\x15\x75\x38\xfd\x4c\x15\x0b\x18\x1c\x61\x4e\x89\xa7\x12\x8d\x51\x89\xb9\x21\x4d\x49\xb0\x4c\xaa\x62\x6b\xd5\x0c\x24\xc6\x7c\xf3\xd6\x4e\x75\xc7\xa0\xcb\x5a\x65\x02\x97\x69\xab\x42\xe3\xd5\xcd\xe0\xa5\xd7\x08\x4a\xb8\x73\xdd\xb5\x2a\x1d\x4f\x4b\xa3\x41\x9c\x07\x81\x9d\x7d\x73\xc4\x50\x53\xe2\xe5\x33\xa3\xe9\xa8\x55\x58\x17\x17\xec\x37\xaa\x59\x2c\xd1\x70\x0f\x2f\x32\x9e\x54\x4a\x6b\x57\x09\xd8\x16\xb0\x98\xb0\x69\xbb\x6c\x6d\xbb\x58\x2d\x50\xf4\x15\x5f\xdb\x92\xc3\x33\x99\x0a\x1d\x54\xbc\xb2\x83\xe9\xda\x72\xba\x86\x1b\xa2\x2a\x91\x50\x9b\x47\x51\xdc\xa8\x54\xe3\xf4\x9c\xc9\x86\x9d\x65\x19\x1b\x5c\x25\x38\x7e\x67\xd7\x17\xaf\x13\x71\x39\xb4\xc2\x3d\xaf\x4b\x26\x75\x3d\xce\x79\x39\x7e\x10\x6b\xdd\xad\x21\x3e\x3a\x32\xd7\xe4\xe7\x82\x0a\x62\x9a\x09\x1e\xfd\xaf\x58\x07\x34\xdc\x9c\x0f\xc4\x9e\x84\x5e\x9d\xf6\x07\x76\x74\xee\x60\x32\xe9\x06\xb7\x2f\x35\xa0\xac\x20\x2c\xad\x44\xd1\xb8\xb0\x57\xdb\xdc\xc0\x7b\xaa\x82\xba\x56\x15\x5f\x88\x53\x3b\xae\x97\xef\xd8\x2f\xd0\xd3\xab\x7a\xc5\x46\x95\x30\x93\xfe\xb3\xd9\xd9\x5d\x53\x30\x5c\x68\x75\x34\x08\xdf\x7b\xef\xa2\x8f\x23\x41\x60\xd1\x76\x3e\x9c\x29\xfa\x38\x1a\x4f\xb0\xbd\x7c\xd3\x6e\x50\x11\xbb\x82\x1f\x44\xdb\x05\x24\x6f\xe0\xf9\xc0\xb5\x8b\xb6\xa6\x2d\xdf\x88\x3d\x7c\xda\x37\x8f\x6f\x48\x90\x70\x15\xc9\x36\xa5\x48\xa0\xf5\x28\x70\x6e\xf5\x83\x52\xeb\x56\xe1\x32\x8b\x3f\x80\x3f\xe4\x7c\xcd\xcc\xac\x32\x68\x45\x88\x9e\xa6\xb1\xc0\xb6\x68\xab\x1c\x31\x41\x26\xc9\x6c\xdd\xaa\x27\x0d\x17\x14\xe3\xea\x2c\xdb\xb6\xde\x6d\x73\x68\x12\x9f\x80\x5b\xa9\x8c\x95\x19\x2f\xa2\xee\x87\x01\xb0\x8d\x08\x85\x38\x27\x1c\x12\x1b\xc9\xef\x86\xfa\x9c\x7b\xff\xac\x0a\x66\x2f\xb1\x9c\xf9\xd2\x88\xdb\x29\x03\x95\x2f\xdc\x91\xa4\x3a\x92\x88\xfb\x1a\x23\xae\x77\x54\x69\x19\x8a\x80\xab\x82\x32\x7e\x8d\xbc\xd6\x87\x28\xce\x79\x21\xe7\x20\x6e\x86\x65\x14\x74\x10\xb3\x00\x1e\x3e\x2c\x5f\xa1\xe6\xec\xbf\x30\x22\xca\xc8\x83\x46\x5e\xfa\xaf\xd7\xdf\x0a\x5e\x04\xba\xe5\x98\xaa\xf5\xbd\x62\x04\x03\xdd\xb6\xbf\x47\x23\xa6\x87\x17\x95\xae\x11\x06\xed\xac\xe3\xf1\xd3\x78\x49\x8c\xea\xd1\x8b\xa4\xde\xcd\xbf\xe4\x5d\xc9\xff\xb8\x90\xe0\xd8\x42\x61\xc0\xe9\xc6\xda\x1d\xa4\x82\x9b\x96\x86\x43\x13\x0e\xa7\x8f\x9f\xb2\x5a\xee\x84\x5d\x82\x35\x50\xa2\x12\xb7\x16\xde\x84\x15\x37\x89\xb4\x22\xc8\x9e\x75\xe8\x3b\x41\x49\xbd\x93\x7f\x67\x8b\xd9\x57\x22\x41\xc0\xa7\xc4\xc8\xfa\xf3\x26\xeb\xbe\xea\xd1\x33\xd0\x17\xf0\x9f\x01\xd8\x41\xd0\x43\xb6\xb6\xf1\x65\xd1\x77\xb5\xcb\x10\x43\x5c\x89\x3f\xee\x05\x1a\xac\x15\x7a\xc6\x96\x4d\xce\x0b\xb6\x7b\xb5\xd0\xd5\x72\x1d\x1e\x17\x7b\x79\x5a\x55\x58\x23\x51\x35\x84\xe3\x7b\x3d\x18\x45\xd4\x6b\x62\xcd\x40\x70\xe1\x56\xce\x38\x84\xee\x2b\x70\xdc\x6a\x32\xf4\xa0\xf2\xe2\x4d\xf5\x23\x36\x6b\xea\x76\xd2\x81\x0f\x98\xa9\x20\xdf\x99\x1b\x05\x85\x6b\xe6\xfd\xe0\xec\x51\x26\xb5\xcc\x2d\x7a\x38\x5c\x61\x59\x39\x63\x40\x4b\xe3\x45\x8d\xba\xad\xc1\x38\x18\x8c\x45\xc3\x2b\x5e\xd4\x42\x78\x4c\x8e\xd0\x3a\xdc\x09\xdd\x71\x69\xac\x5e\xa7\x32\x12\x40\x2a\x12\xa8\x71\xa8\x0c\x8b\x0e\x70\x6d\x45\xa6\xc5\x0a\x1d\x73\x73\xeb\x2d\x84\x12\xfd\x33\x91\xa8\x5c\x30\xfe\xc8\x65\x06\x1b\xa9\x95\x02\x80\x81\x76\xbf\x80\x34\xe0\x3b\x5f\xd0\x44\x9d\x53\x42\xb7\x46\x85\x8e\x11\xf2\xe2\x3a\x9f\x21\x84\x21\x41\x74\x95\x07\x21\x42\x0b\x82\x5f\xcd\x09\x3b\xc3\x60\x30\xdd\x64\x10\x23\xee\xd6\x89\xb2\x52\x52\x39\x07\xd1\xb3\x46\xcd\xde\x46\x11\xdb\x28\xb3\xc0\x80\x80\xe7\x6c\x33\xed\x29\x97\x5c\xc7\x4a\xac\x9a\xf7\x97\x14\x22\x0c\x19\x78\x14\xb4\x25\x31\x88\xd8\xcc\xcc\xda\xcf\x9b\x1c\xa0\x01\xd4\x9c\xe1\xfa\xda\x30\x6f\x3c\xe3\xb2\xd6\xcc\xdd\x5e\xa4\x44\x81\x5f\x11\xee\xea\xc8\x7a\x14\xb5\x91\xf3\x8a\xd4\x5d\x25\x44\xdc\xf2\x36\xc7\x20\xf4\x39\x30\xcb\x23\xdb\x82\x9e\x9c\x43\x13\xf1\xb7\xf1\xfe\x05\xa2\x23\xa5\x79\xc2\x1b\x36\x03\x11\xac\x2b\x66\x37\x4b\xa5\xb5\x34\x07\x00\x27\x8e\x56\x7a\x80\x9e\xba\x11\x10\x76\xf3\x3d\xc2\x40\xa9\x14\x28\xf0\x0c\x4c\xb3\x89\x21\x59\x1e\xac\x2a\x70\xb4\x58\x71\xd3\xdc\x28\x40\x3f\xae\x08\x14\xbc\x8b\x48\x42\xb1\xe1\xa6\x4f\xbc\x73\x36\x17\xc8\xe7\x73\x50\xd1\x27\x8a\xb8\x0a\x71\x96\xfc\xa5\xe0\x9a\xad\x04\x24\xd5\x62\x33\x5d\x9a\x33\x92\xaa\x55\x61\x68\x29\x18\xa4\xf0\x43\x00\x2b\x06\x37\xde\x26\xa8\x21\x2b\x43\x6c\x7c\x00\x21\xe3\xe6\x27\xb3\x5d\xb7\x68\xcb\x8a\xcc\x7c\xa6\x1a\xac\xb2\xc7\x6d\xfc\x60\x91\x0e\x58\xaa\x81\x25\xb4\xa7\x75\x36\x90\xee\x69\x36\x07\x02\x98\xf0\xbb\x10\xa0\xeb\xb1\xa6\xad\xb5\x59\xcd\x91\xc3\x00\x38\x55\x65\xc3\x8f\x21\xcf\x6a\x6a\x38\x9b\x48\x45\xfa\x3d\x58\x35\xfa\x96\x6c\x9c\xc4\xa3\x08\x21\xd2\x65\x61\x39\x22\x4e\xa3\xe5\x3e\x14\x2e\x90\xfa\x3d\x44\x43\xef\xd1\x31\x2d\x4a\x7c\xae\x66\x25\xdb\x63\x98\xa3\x63\xd8\x5d\x12\x6a\x28\x24\x50\x2b\xf1\x24\x9d\xe1\xaf\x50\xc5\x18\xcc\xa1\x56\x17\xaa\x00\xdc\x3b\xe8\x8e\xce\x23\x1e\xc2\x89\xad\xdf\xfc\x3d\xa4\x02\x68\x95\xbb\xeb\x66\x15\x2a\x11\x96\x6c\xf3\x55\x12\x66\x82\xa9\x19\x8c\x23\x1d\xb1\x7a\x5d\x52\x3a\x71\xda\x08\x9b\x43\x06\xc5\xee\x00\x02\x0f\xf0\x1e\x89\xf3\xb9\xf0\x0d\x90\x96\x82\x98\x1c\x73\x9d\x5e\x5b\x1c\x40\x1a\x16\x85\x7f\x4d\xb7\xc8\x74\x2f\x28\x97\xd6\x97\xf2\x5c\x67\x71\x4a\x0b\x25\xdd\xfa\xa3\xc1\xdf\xc9\x2d\x69\x3e\x10\xd6\x46\x1e\x18\xa0\xb5\x73\x3b\x71\xbb\x63\x56\x7d\x5b\x5b\x45\x27\x08\x8e\xa5\xb7\xaf\x6e\x6c\x10\x13\x20\x9f\xd8\x94\x7f\xf7\x1d\x5e\xa3\xa0\xf7\x8e\xcc\xc8\x2e\x26\x5d\xcd\x19\x14\x76\xc3\x44\xb5\xc7\xef\xc2\xa4\x46\xa9\xc9\x05\x0e\xcb\x01\x79\x6c\xfe\xd6\xfb\xbe\xd7\x2d\x54\x89\x97\xa8\x9f\x57\x37\xaf\x9c\x71\xf6\x9b\xd2\xe0\xfb\x8f\xf3\xc2\xbf\x34\x3c\xa3\xe8\x32\x72\x3b\xb2\xe3\xbf\x7c\x9a\x9e\x60\x18\x00\x56\x7c\x01\x2b\x45\xbf\xd6\x9d\x4f\xbe\x8e\xc6\x52\x83\xbb\xf8\x46\xa5\x7f\xf9\x34\xc5\xd8\x03\x70\x1d\x83\x12\xe6\x24\x92\xbf\x7c\x9a\xe2\x87\x84\x7e\x2e\xea\x2a\x06\x28\x57\xaa\x54\x9a\x67\xfa\x14\x63\x08\x68\x3c\xe3\xdf\x54\xbb\x1e\xda\xf6\xea\xf5\x67\x6c\x56\x49\x31\x0f\x6a\xd6\x3f\x57\xfc\x05\xe2\x33\x61\x50\xa9\xe5\xcd\xa5\x11\x25\x45\xfa\x66\xa0\xaa\x3d\xea\x14\x91\xe8\x94\xf7\xe7\x0c\xb0\xed\x01\x7d\x0d\xa4\x05\x89\x0e\x31\xaf\xa4\xd9\x48\x2f\xae\x19\x4f\x0c\x31\xcc\x44\xba\x68\x33\xee\xcc\x85\x49\xca\x56\x19\x0b\x0b\xf2\x06\xe9\x56\x69\x8c\x7b\x1f\xeb\x93\x56\xae\xfb\x2b\xd4\x2e\xd8\xd1\x2c\xda\xd5\x59\x86\x2c\x70\xe7\x01\x78\xec\x60\x0d\xcb\x1d\x8b\x8d\x6d\x01\xe7\xc7\x91\xdc\x82\x00\xbb\x93\xc9\x0f\x9b\xa2\x80\xb9\xaa\x78\x59\x52\xb9\xaa\xd0\x26\x88\xc5\x24\xcc\x6e\xd9\x42\x40\xa1\x41\x5d\x14\x89\x39\xd0\xa9\x30\xff\x49\x0f\xc0\xd6\x07\x60\xeb\x3f\x2e\xb0\xf5\x0e\xf5\x0f\x71\x75\xde\xe8\xdf\xaf\x06\xa2\x1b\xd4\x8b\x80\x99\x60\xd8\x58\x02\x11\xe8\x79\x1d\x2b\x65\xf4\xb1\x65\x65\x52\x33\x30\x12\xa6\x81\xd5\xdf\x49\x41\x40\xaa\x01\x9e\xd1\x66\x02\xc2\x9e\x9a\xbb\x94\x02\x53\xb9\x09\x8d\x8d\xa1\x38\x7c\x2b\x78\x3a\x56\x05\xc4\x29\x7c\xde\x85\x33\x82\x19\xd8\xab\x9c\x95\x6a\x9f\x28\x2f\x6b\x87\xda\xb9\x5e\x64\x84\x0b\x6c\x02\xb8\xf2\x1b\x32\x4c\xce\xef\x44\x5e\x66\xdb\xb1\xcc\x6d\xb3\xc0\x53\xce\x59\x6d\x7f\x34\xe4\xdc\x05\x61\x27\xaa\x94\xc2\x3a\x70\x2a\x61\xe3\xb4\x07\x70\xb0\x0e\xa4\xfb\x40\xba\x0f\xa4\xfb\x8b\x22\xdd\x75\x40\x12\x3a\xba\x92\xa7\x02\xfe\x02\x7a\x24\x42\x6b\xca\xb5\xc6\x4f\x3a\x01\x64\x9c\xb6\xdd\x4e\xbe\x3c\x4a\x6c\xe7\x05\x48\x7f\x7b\xd0\xe3\xd6\x7b\x9f\x83\x2a\xef\x50\x08\x3d\x6c\xda\x2b\x88\x6e\x1f\x1e\x0a\xa3\x7f\x21\xf4\x78\x7b\x61\x74\x77\x4f\x5e\xc9\x93\xef\x18\xfc\xa1\x92\xf9\xa1\x92\xf9\x67\xab\x64\xee\x4e\xd9\xeb\x55\x34\x6f\x11\xd7\xdd\x68\x20\xc0\xb0\xa6\x2d\xc0\x5c\x50\x20\x30\x31\x9e\x68\x0b\x58\x2e\x3d\x24\x9b\xe5\x53\x5e\x9c\xdd\x2a\xa5\xfe\xab\x08\x02\x9a\x56\x3e\x8a\x00\x95\xb4\xca\x5e\xa6\x42\x43\x65\xb5\xb0\xc2\xc8\xa6\x20\xc7\x2f\x86\xf5\xef\xcb\xf2\x5f\x9b\xd5\x57\xf5\x4a\x55\x4f\x18\x92\x37\x05\xc2\xba\xf9\xac\xf7\xdb\x87\x21\x75\x9c\xd9\x16\xb6\x0e\x8a\x8b\xe3\xdb\x22\x00\x60\xf3\xab\x8b\xbe\x0c\x30\xd7\xf1\x52\x52\xef\xa7\x54\x43\xaa\x85\x56\x01\x35\x78\x30\xb5\x1b\x4c\xdd\xb5\xc2\x78\x58\xf6\xd1\x01\xfe\x76\x9b\x78\x58\x76\xd2\xe3\xd1\xab\x54\x42\xc8\x63\xb1\x70\x6a\xfd\xe5\xd3\x84\xdd\x1f\x89\xa7\xfa\xdb\xfb\xa3\x11\xbb\x3f\x7a\x9a\x63\x15\x96\xdc\x01\x6c\x02\xbb\x21\x84\x23\x48\xe8\xc0\xc6\xdd\xfa\x0e\x43\xd9\xba\x9f\x8a\x2c\x92\x13\xda\x2b\x85\xca\x8e\x4d\xe3\xd3\x55\x25\x6b\x71\x82\xd6\x06\x28\x82\xeb\xd1\x5b\xe7\xaa\xa2\xd8\x04\xf7\xd0\xa6\x99\xcb\x82\xe1\xe6\x7d\x34\xab\xa2\xe3\xb9\x2d\x6e\x33\x7a\x83\xf9\x85\x9e\x10\x94\x92\x99\x33\x14\x5c\x07\x44\xb6\xde\xee\xbf\xb0\x34\x17\x64\x81\x9e\x3d\x2a\x99\xde\xa8\x54\x5f\x16\x75\xb5\xde\x0d\xa9\x9c\xef\x81\x53\xbe\xe5\x5c\x96\x21\x4c\x7a\xef\x6c\x0a\x08\x4e\x51\x45\xdc\x71\x70\xd7\x71\x13\x00\x1a\x40\x5d\xad\xd1\x4d\x60\x6b\x18\xd4\x14\x78\xf5\x3a\x25\x89\x07\x23\x8a\x7e\xda\x1a\x4f\x84\x2e\x94\xed\x83\x8c\xf9\x1e\x5b\x50\xf2\x7d\x07\x57\x6b\x3b\xf6\x4d\x46\x74\x5d\x6f\xf0\x18\x1d\x83\xc3\xe8\xc4\xfa\x9d\x9f\x39\x95\x3d\xc8\xb0\x1b\xd4\x6b\x78\x35\xe0\xa0\x57\x22\x9d\x3a\x40\xaf\x3b\x51\xe5\x9b\xce\xfa\x99\x4d\x0a\x2e\xed\xbb\x21\x1a\x58\x2d\xaa\xdc\xa5\x31\x43\xd4\x04\x1c\x6d\x4a\x28\x76\x49\xc6\x2b\x01\x31\x57\x6f\xd9\xb1\x9c\x88\x09\x93\x46\x5e\xe0\xac\x50\x63\x55\x9e\x4c\xd8\x19\x33\x57\x73\x87\x0f\x14\xca\xf5\x4f\x1d\x69\x8c\x67\x72\x7d\x6d\xb9\x63\x38\x0e\x10\x73\x3c\x1c\x7e\xaf\x1a\x80\x7f\x16\xf1\x17\x42\x54\x94\xc3\x7c\x32\xc3\x1b\xf5\x60\x8a\xfa\x40\x37\xf8\xe1\x7d\xce\x63\x08\x34\x05\x7b\xf4\xf7\x91\x1d\x7e\x6f\x54\xbf\xe2\xf2\x76\x87\xd1\xc2\x2e\x6e\x8f\xa7\xe8\xf4\xee\xe0\x14\x2b\xa8\x6d\xf7\x6e\xfc\xee\xed\xdb\x9d\x80\x3a\x76\x3c\xc8\xbd\xd9\x0c\x1e\x50\x35\xdb\x2c\x17\x98\x06\x2d\xdb\xec\x52\xf0\xac\x5e\xb2\x64\x29\x92\x07\x5b\x1b\xda\x56\x86\x62\x7c\xc1\x65\xa1\xeb\xb0\x08\x08\x98\xd5\x05\x86\x98\x08\x8f\x1b\x8d\x26\x85\x0c\xea\x05\x54\x14\x34\x5a\x2b\x1f\x0b\x58\xf1\xf9\x5c\x26\xdb\x0d\xbb\xe2\x29\x26\x4a\x7e\x2a\xd0\x9f\xab\x82\x1a\xf2\x88\x0a\x92\x65\x6a\x05\xbc\xdf\x97\xac\xf0\x50\xa9\x97\x4f\x22\x71\x7f\x6b\x9b\x0f\x60\x6b\xdb\xf0\x87\xbd\x4a\x88\x98\xce\xce\x12\x1b\xea\x4e\x41\x3a\x77\xcb\x4a\xe8\xa5\xca\x22\xca\xf2\x47\x59\xc8\xbc\xc9\x21\x63\x4b\x24\x0d\xa4\x33\xd2\x5b\x01\x22\x19\xec\x07\x2e\x7b\x00\xbc\x68\x01\x17\x21\x28\xd0\x08\xca\x66\x86\x36\xa4\xa9\x93\x9a\x37\x61\xf6\x4b\x2e\xdd\xf1\xdd\x8e\x20\x31\x46\xc8\xfe\x51\x44\x6e\xc4\x4f\x77\x77\x37\x3f\x8a\xba\xb3\x76\xa6\x79\xab\x50\x2a\x9e\x93\x7d\x16\x91\x3a\xf6\xeb\x48\x70\x98\x17\x22\xe3\xeb\xc1\x44\xd4\x6b\x57\x97\xbf\x9f\x70\xd9\x8e\xa4\xb2\xd1\xc8\xe4\xb6\xcf\xda\x40\x8f\x10\xe4\xe7\x70\xba\x5f\x37\x20\xd9\x07\x22\xe3\xb7\x76\x84\xe9\xd9\x9c\x81\xfb\x93\x5a\x31\x35\xaf\x45\xc1\x8e\x7d\xb6\xe9\x49\x08\x3d\xee\x0e\x51\x0b\x40\xe4\x9d\xcf\xd7\x7c\xfe\xe9\xa0\x58\xb8\x3d\x8f\x38\xbd\xb5\xfd\x8c\x07\xc1\xe7\xad\x73\x8e\x67\xbf\x7d\xc8\xdf\x4d\x9c\x5a\xf0\x0e\xfa\x75\x1b\x0b\x39\xec\x08\xdd\xf9\x82\xa9\xd6\x49\x89\xc5\xbd\x23\x52\xd1\xf9\x0d\x3e\x0a\x2e\x03\x2f\x2c\x1d\x91\xc5\xa3\xca\x1e\x11\x52\xe8\xee\xfc\x06\x70\x9c\x27\xf0\xaf\xa5\x52\x0f\xda\x47\xfe\x5b\xd5\x65\x8f\xbb\xe2\xbe\xec\x6f\x4b\x2d\x73\xa1\x9a\x7a\xef\x8b\x12\x24\x29\xe0\x66\xc8\x5c\x68\xa6\x9a\xba\xb3\xcc\xf4\x5a\x74\x25\xff\xe1\xb7\x65\x47\x5e\x19\xd0\xe9\x78\x72\x5f\x8b\x04\xc5\xd3\xe4\x3a\x2b\x3f\xcc\x6d\x11\x96\x7d\x57\xad\xfc\x36\x54\xc0\x4b\xfb\xb6\xd5\xc0\x51\xff\xde\x22\x82\x59\x93\x71\x4f\xec\xa2\xcc\xf6\x8f\x2a\x8d\xc8\x5d\xe6\x57\xac\x56\x4b\xf0\x18\x2a\x30\x6a\x41\x31\x5c\x0f\xb4\x32\x09\x34\x70\xdc\x7e\x0b\x40\xf1\x16\x6e\xdb\xdb\x3f\xfd\xe9\x4f\x13\x76\x21\x2b\x90\x46\x2c\x48\x97\x8d\x7e\xe5\xf5\x12\xa8\xac\x39\xf8\x1c\xaa\xae\x06\x50\xd7\xa4\xdb\x92\xcb\x1e\x0b\xa7\x01\xba\x3d\x00\x26\x66\xd2\x42\x70\x61\x5c\xbe\x2b\x5b\x0f\x05\x88\xb1\x82\xab\xb5\x1c\xb0\x1c\x82\x8d\x33\xf9\x20\x6c\x59\x58\x1f\x1f\x8e\x41\xf3\x36\x28\x08\x3b\xcb\xdd\x0a\xb4\x4b\x5a\x6d\x24\x80\xb4\xd6\xbd\xe5\xcc\x5a\x49\xbd\x76\x27\x5f\x29\xa9\x0e\x0f\xd3\x8d\xeb\xd3\x1c\xfc\xdd\x4e\x7e\xef\xcd\x81\x73\xfb\x97\x46\xcd\xd6\xb5\x78\xd6\xa9\xa5\x77\xc9\x56\x03\x5b\x93\x71\x9b\x2c\x69\xee\x37\x84\xdc\xf9\xa4\x4c\xdb\xde\xe6\x3f\xa7\x0a\x21\x2d\xa8\xa4\xaf\xaf\x29\x9c\xf3\x82\x2f\x20\x16\x12\xd0\x98\xa9\xf2\x63\x25\x00\xc2\xd5\x1c\x9a\x2d\x17\xa3\x12\x0b\xa9\xeb\xca\x2c\x39\xd9\x34\x7a\x57\x64\x11\xaf\xa2\x8b\x45\x85\xa1\x3e\x55\x69\xb7\x94\x03\x6f\x32\x3f\x5a\xae\x8a\x38\x6e\xd8\xc5\x5e\x66\xa1\x8d\x66\x9f\xf6\xf2\x10\x93\xb4\x79\xe1\x88\xd9\x6a\x63\x54\xc2\x12\xc7\x6d\xb2\xbd\x01\xfc\xc4\xad\x4a\x64\x58\xf8\xa4\x6d\x15\x24\x10\x1a\x55\xb1\xbc\xc9\x6a\x59\x66\x7e\x88\xee\x05\x5f\x11\xc6\xc1\x3b\xf1\xc0\x27\xc4\x11\xbd\xff\x7b\xd8\xdf\x92\xcb\x8a\x1d\xbb\xbe\x8c\x96\x2f\x49\x0e\xd3\xa2\xe4\x95\xd7\xb6\x12\x95\xe7\x5c\x9f\x58\xd0\x03\xa3\xa4\x72\x2a\x65\x67\xde\xe2\x19\xb3\x73\x01\x01\xa0\x97\xd8\x1e\xa2\x9c\x14\x3c\x86\x7c\x74\x07\xbf\xdb\xca\xe1\xa6\x67\xc4\xbe\xed\xec\x01\x51\xb2\x1f\x78\xf2\x20\x8a\x94\xfd\xac\xed\x08\xd3\x75\xc1\x73\x8a\x7c\x2f\x2b\xf5\x28\xc9\x7d\xd9\x39\xe2\x23\xcf\x34\xb5\xa8\x5d\xf9\xf2\xac\x59\xc8\x22\x36\xdc\x26\x5a\xce\xf6\x67\x8d\xaa\xd6\xa6\x33\x49\xe5\x08\x2a\xf9\x98\x08\x8b\x38\x0e\xbd\x45\xbe\x42\x77\x62\xc0\x4e\xd8\x72\xea\xc1\xa5\x0e\x6a\x1e\x18\x69\x87\xf0\x6e\x2d\xcf\xe8\x2c\xd9\x6c\x8d\x80\x89\x2f\x33\x23\xde\xfe\x70\x71\x23\x2a\x2d\x75\x2d\x8a\xfa\x59\xc4\xe9\x96\xa7\x4a\xb3\x1f\x32\x95\x3c\xb0\x0b\x01\xe1\xd9\xbb\xd2\xa9\xdb\x1f\x2e\x1c\x8d\xda\x48\x9c\x00\xac\x68\x6f\xea\x94\xab\x42\xd6\xaa\x32\xe7\x15\x22\x85\xf7\xb0\x9e\x77\x8c\xe0\xed\x62\xeb\x30\xb1\xb5\x6a\xd8\x8a\x23\xf6\x15\xcc\x77\xc2\xee\x64\xf9\x3d\xbb\x0c\xea\x4c\xc7\x4c\xee\x52\xef\x61\x52\x87\xb2\x11\xfa\xfb\xbe\x61\xdd\xfc\xa3\xa8\x9f\x6b\x62\x7f\x21\xb0\xc5\x57\xd5\x2c\x1a\xb0\x8e\x8b\x1c\x35\x71\x56\x70\x48\xb0\xb0\x33\xc2\x7c\x46\x86\x40\x65\x32\xb4\xf5\x3d\xd1\xe7\x4e\xab\x59\x7a\x7a\x7b\x79\x76\xf1\xf1\x72\x92\xa7\x5f\x2d\xd5\x6a\x5c\xab\x71\xa3\xc5\x58\xd6\xd1\xa8\x2a\xb1\x86\x7f\xf6\x3d\xe9\xf8\xc0\x62\x0a\x81\xd8\x54\x2b\xf6\x20\xd6\x0c\x7e\x37\x24\xee\xf6\x87\x8b\x9f\x75\x88\x0c\x29\x35\x3b\x15\x75\x72\x9a\x88\x72\x79\x4a\x5d\x7f\xce\xd1\xbb\x43\x1b\xb1\xe3\x25\x2a\xcb\x50\xca\x30\x27\xf2\x5c\x94\x4b\x66\x9b\xbf\xfe\x90\x86\xaa\x04\x07\x70\xe9\xa5\x52\xd9\xa6\xfd\x36\xcf\x69\xbb\x83\xe5\xac\x66\xf1\x13\xf8\x4a\x0b\xf8\x4c\xa1\x60\xab\x2f\x28\xc2\xfd\x5f\x7d\x16\x21\x82\x1a\x94\x64\xb9\x35\xe2\x6b\x04\x55\x11\x1f\x81\x7c\x14\xa0\xf2\xf1\xa6\x5e\x8a\xa2\xb6\xde\x5f\xec\xa2\x7d\xac\xaf\xe6\xc8\x46\xa1\x4c\xc4\xa3\xa8\x2a\xc0\x39\x72\xe7\x3a\x14\xbc\x64\xf6\x8a\x13\xdc\xb9\x00\xb3\x9d\x9b\xaf\x18\x13\xe7\xd5\xfe\x94\x41\x01\xf9\xde\x29\xe3\x69\x2e\x8b\xcf\x77\xce\x76\x2d\x5e\xdc\x99\xce\x80\x72\x70\xfb\xc3\xc5\x81\xf7\x1e\x78\xef\x81\xf7\x1e\x78\xef\x81\xf7\x1e\x78\xef\x3f\x88\xf7\x0e\x95\x6c\xfb\x23\x33\xe0\xe8\x9c\x86\xb8\x30\x2f\x16\xe2\x0c\x13\xa6\x29\xa8\x7a\x90\x0b\xb7\x9b\xa2\xa1\xaa\x36\xbc\xb5\x99\x65\x32\x01\x76\xb3\xd5\x78\x66\xfa\x38\x1a\x1d\x41\x5c\xe0\x21\xb8\xfb\x73\x07\x77\xc7\x63\x42\x2f\x78\xcd\x09\xba\x5d\xd6\x08\x64\x62\xbd\x9b\x92\xca\xe0\x05\xe9\xf9\x0e\x1a\xc0\x81\x62\x88\x47\xac\x97\x22\x16\x46\x58\xea\x1b\x63\x02\x13\xf7\x6c\x5d\x8b\x43\xd6\xcf\x21\xeb\xe7\x39\xc1\xbe\x48\x2b\xe2\x64\x08\x91\x5b\xbc\x15\x31\x88\x39\xf4\xd1\x31\xee\x70\xa0\xe4\xfb\xc6\x8c\x2f\x56\xd6\x7c\x33\x59\x7d\x51\x38\xed\xad\x30\xb2\x32\x90\x20\x5f\x04\x68\x8b\xaa\xd3\x7f\xa1\x1b\xd2\xda\x2e\xb6\x0f\xfa\x4d\xe5\xdf\x0b\x8b\xa0\x1d\xf2\x1b\x0f\xf9\x8d\xff\x8c\x94\x8e\x6a\xfb\x7d\xc0\xb2\x8b\x70\x03\xe2\x37\x07\xaa\xd8\xba\x02\x2c\x6b\xf8\x9b\xfc\xcf\x4e\x6d\xad\x6d\xc1\x01\x6e\x0b\xa7\xa5\xc7\xfa\xc4\xab\xd4\xf1\xbb\x45\xf6\x02\x0d\x78\xb0\xff\x44\x64\x77\x38\xc7\xa2\x45\x05\xf4\x3e\x49\x17\x03\xd4\xe9\xcb\xcd\xc3\x88\x1e\x26\xcc\xcc\x18\x46\x12\x20\xf0\x10\x52\xf7\xf3\x5d\x70\x05\x86\x16\xa6\x0d\x35\x30\x03\xbc\x58\xa8\x9e\xcd\x6b\xf0\x82\x01\xa4\xd6\x4a\x16\x29\xc4\x6d\x41\x98\xcd\x1f\x1c\x7e\x20\xbe\xe2\xfb\x01\x12\x0c\xef\xda\xee\xcc\xf9\xb5\x11\x0d\xa2\x1f\xf1\xe8\x38\xfb\x8a\x02\xee\xcd\x4e\x56\x59\x80\x3b\x3d\x40\xae\x38\x44\xd7\x8a\x0a\xe0\x0a\x81\x3d\x6c\x53\xd6\x08\x46\x99\xb6\xb2\xa7\xad\x65\x5c\xd7\x77\x15\x2f\xb4\xdc\x90\xf0\x00\x8c\x5c\xd7\x08\x90\x54\x87\x60\x8c\xac\x76\xef\xda\x8c\x37\x55\x38\xb4\x6d\x40\x7b\x83\x88\x9a\xcf\x9c\x05\xb1\x3f\xae\xaa\x99\x85\x1f\xfb\x50\xee\x4e\x34\x29\xe1\xce\xe3\x4e\xda\xa0\x45\xb7\x1e\x50\x45\xd8\xac\xd4\xe6\xae\xb7\x10\x1f\x8f\x86\x88\xbd\x8e\x6c\x14\xf3\x1d\xc0\xea\xbe\xe7\x99\x16\x23\x0b\xcf\x17\xaf\xdd\x12\xb5\x50\xdf\x91\x59\x7a\xe0\x70\x6d\x02\x95\x7d\xb6\x78\xbd\x29\x43\x22\x7a\x39\xb6\x25\xa7\x0f\xbe\x84\xa2\x59\xdb\xdc\x19\x9f\xe9\x21\x6f\xfd\x0b\x91\xb3\xb7\xe4\xad\x0f\xed\xde\xf3\x83\x4b\x83\x5e\x4e\x83\xde\xfd\xcf\xaf\x10\x92\x17\x57\x17\x0f\x79\xf2\x87\x3c\xf9\xcf\x93\x27\x1f\x3f\x6f\xaf\x94\x31\x3f\x2c\x8d\xed\x4b\xa2\x41\xf9\x90\x03\x7a\xc7\xf3\x6d\x1f\xb9\x2c\x8c\x64\x3c\x9c\x0e\x62\x83\xd3\x8b\x5e\xb4\xbb\xe1\xde\x14\x40\xc8\x0a\xb1\xca\x7c\xc4\x5a\x90\xd7\x3f\xb3\xa0\xf6\x2b\x59\x2f\x8d\xe4\xc0\x0b\x40\xf4\x6c\x15\xc2\x65\x49\xc5\xf5\x12\xb0\x87\x4d\xa7\xb2\xee\x27\x30\x38\x60\xce\xb6\x4f\xe8\x2d\x3b\x0e\xe1\xca\x63\x2f\x18\x8d\x56\x2b\xc0\x09\xa5\xcc\x29\x18\xd0\xc9\x6e\x61\xc9\xb4\xae\x91\x85\xa1\x5d\x72\xba\x8e\x5f\x20\xab\x01\xda\x77\x27\x41\xa1\x50\x20\x1e\x94\xd8\x25\xb5\x21\x4e\x8d\xd4\x4b\x17\xf5\x2d\x9e\x28\x0b\x11\x90\x86\x0d\xff\x69\xf9\x90\xbb\x69\x1a\x9f\x8d\x8e\x7f\xb5\x5a\xf2\x7a\x2c\xf5\x98\x8f\xb7\xd0\xf9\x8d\x31\xdd\x94\x45\x17\x73\xa7\x51\x52\x22\x62\xe3\xf0\x99\xc8\xd8\x6f\x8d\xa8\xd6\x88\x94\xdd\xcb\x4f\xf6\x68\xba\x6e\xd9\x13\x0c\x00\xb8\x9a\xb3\xb0\x33\xb2\x73\xe0\x46\xb7\x8c\x1c\xc8\xe7\xc1\x56\x42\xe4\xde\xa2\xf0\xdf\xb4\x70\x90\xc0\x9e\xc2\x1e\xc4\x1a\xf3\x5d\xa8\x70\x28\x0c\x26\x00\xf6\x95\x05\x53\x55\x8a\x1b\x39\x13\xfe\xca\xf9\xf8\xfb\xf8\x8d\x1c\x31\x39\xf7\x95\x6b\xfd\xe8\x68\x64\xaa\xe8\x8c\x66\xcf\x2d\x36\xab\xf7\x28\xc5\x0a\xf6\x5a\x16\x8b\xb1\xb9\x76\x63\x4a\x44\x3d\xc5\x8f\x9c\x7e\x05\xff\x1d\xdb\xdd\xd1\x7b\x14\xf4\xef\xfb\xa3\x77\xc0\xa5\xa2\x0b\x42\xdc\x16\x56\xb2\xad\xb8\x39\x8c\xfe\x2e\x56\x95\x9c\x33\x59\xe8\x66\x3e\x97\x09\x70\x5a\x7b\xa3\xc8\x84\x55\x43\xc6\x03\x5d\xaf\x9a\x3f\x08\xd8\xda\x44\x18\x82\x2f\xf0\x24\x71\x66\x87\x71\x2b\xe6\x9f\xf5\xc6\x94\x2a\x1d\x07\x60\x25\xbf\x37\xd0\xd5\x5e\x0c\x68\x6b\x69\xa8\x0d\xaf\xf5\x0c\xf1\xb6\xa4\x52\x50\x22\x6a\x77\x6e\xd4\xce\x2a\x20\x5a\xdb\xd7\x1c\x2c\x31\xbf\x1d\x24\xc7\x77\x2d\x12\xec\xa9\xbf\x3b\x32\xc7\xc8\x87\x00\xe5\xd9\x42\x8c\x77\xb8\x9f\x05\x14\x1e\xbc\xbd\x3b\xe6\xb2\x6c\xaa\x40\x75\xdb\x5e\x3d\xd2\x3c\xfc\x78\xd1\x48\x86\x85\x19\x37\x2d\xe6\x1b\xdd\x5a\xf9\x57\x29\xd2\xb3\xc5\x4e\xf3\xda\x45\xa7\xa0\x6a\x29\x90\x5b\x91\xee\xba\xb1\x9e\x33\x00\x62\x10\x91\xcd\x56\xf6\x78\xe6\x0c\xe2\x8e\xb6\x58\x4a\xb4\xd9\xe2\xb8\xdb\xe6\x5a\x2b\xe6\x8f\xa2\xb0\xe5\xdf\xfa\x29\xd4\xbd\x36\xac\x12\xf3\x0c\xd0\x00\x20\x17\xc2\xff\x4e\x43\x1a\xb0\x94\x3e\x73\xa4\x58\x17\x14\x0e\xfc\xae\x0b\x8b\xb7\xc3\xdd\x96\xd7\xb9\x08\xbb\x4b\x4f\xdd\xf9\xe3\xf4\xc3\xe1\x59\x59\xea\xcb\x16\x7a\x5e\xa2\x74\xf8\x9b\x36\x48\xcc\x51\x7b\x7d\x2f\x45\x96\x4e\x03\xe1\x6a\x98\x8c\x47\x5e\x08\x09\xb8\x17\xc1\x7d\x4d\x9d\xe3\xa4\x6c\x46\x2c\x17\xb9\xaa\xd6\x27\x36\xcf\x4f\x56\xb6\x5c\x1b\xcd\x78\x1b\x29\xa7\x04\xcb\x1e\x29\x77\x5f\x8c\x17\x56\x72\xd8\xea\x10\x58\xf4\xbd\x85\xed\x4f\xc3\x3c\xa4\x11\x65\x2b\xf2\x0c\x0b\x25\x14\x8f\xec\x91\x57\xf1\xe0\x0f\xf9\x28\x75\x54\x00\x6d\x25\xdb\xb7\xa6\x66\xaf\xa4\x78\x2a\x95\x86\x3b\x48\x2b\x33\xb2\x22\x1b\xc8\xdf\xf7\x47\xef\xee\x8f\x9e\xa1\xaa\x4e\xfa\x45\x1c\xe1\xa6\x68\x17\x02\xdc\xdd\x43\x5c\x81\xef\x03\xe3\x85\x22\x54\x8f\x17\x1b\x1a\x77\xaf\x28\x69\x8f\xd2\x5f\x1a\x85\x56\x83\x6d\x67\x0e\x1a\x32\x2d\x6a\xcd\xf8\x62\x51\x89\x85\x21\xc0\xbf\xc1\x8f\x95\x30\xc3\xc5\x24\x4e\x26\x0a\x08\x08\x4c\xa1\xa8\x9a\x2b\xdb\x7d\x70\xda\x1f\x9c\xf6\xff\xd4\xd6\xb5\x7f\x25\x3f\xb9\x35\x88\xc0\xed\xff\xd2\x90\x86\x5b\xf4\x6a\x47\xf7\x76\x38\x39\x2a\x7a\xeb\xc8\x18\x92\x38\xa8\xbf\x59\x7b\x19\xbd\xd1\x7c\xf1\xc5\x81\x2c\xb7\xa7\xbe\xaf\x9f\xb9\xbb\x6c\xdb\xd9\xc6\xeb\xfb\x95\x83\xce\xb7\x3b\xbe\x3a\x8d\xdb\xb8\xcc\x6d\xb6\x05\xaa\xd3\xc1\xcd\xf5\x65\x70\xa6\x01\x37\xd7\x95\xf9\x79\xd3\x26\x92\xd9\x6b\x6f\x95\xa1\x54\x99\x4c\xd6\x41\xa9\x26\xd3\x9b\x3e\x7d\x15\x05\x3b\x14\xa2\x0e\x3e\xad\x83\x4f\xeb\x73\xf9\xb4\xc2\x73\xf6\x6a\xbe\xac\x2e\xc5\xdf\x95\xda\x0e\x0a\x04\x4b\xdc\x93\x9c\xc0\x72\x88\x87\x82\x56\x07\x2f\x6e\xf7\x5f\x99\x1e\xfa\x5f\x87\x7e\xad\xb3\x4c\xd4\xa1\x53\x26\xfc\xa4\x2b\xb3\x67\xd4\x0e\xaf\xe8\xbd\x3e\xc1\xd8\x6a\x57\x7f\x0d\x25\xd2\x88\x2d\x89\x2a\xc5\x74\xd0\xeb\xd2\x7a\x1c\x00\x52\xb6\x83\x3e\xe6\x32\xab\x0d\xb9\x00\xbc\x1f\x78\xa5\xef\xfe\xc0\xe2\x84\x64\xd0\xaf\x78\xf2\x80\x8e\x0f\x4e\xd2\xcf\xac\xa9\x8d\xfa\x0c\x49\x13\x29\x6b\xb4\xa1\x57\xd3\xf0\xe3\x9f\x20\xf1\xd2\x55\xb1\x9c\xd9\x5a\xc5\x80\xfd\xe1\x8a\xc2\x5a\xe6\xf3\x5e\x55\x58\x9e\xd7\xa9\xbf\x30\x8a\x11\x9b\xa9\x7a\x69\x87\x78\x76\x7d\xc1\xda\x13\x3c\x96\xf3\x00\x36\x45\x16\xf0\xc7\xc9\x08\xe7\x31\x13\x04\xd5\xb9\x4b\xe5\x38\x9f\xa6\xdc\x5a\x60\xbb\xe2\x3b\x24\x0e\xda\x45\xdd\x6f\x21\xc1\xbd\x05\x10\x3e\xed\x5a\x93\xb8\xca\x11\x2c\xd3\x4d\x56\xe0\x9e\xa5\x60\xc7\x54\xe6\xd6\x94\x37\xd2\x92\x67\x5a\x13\x76\x71\x47\xf4\x9a\xb7\xe8\x89\x13\xbe\xc3\xdb\x0d\x18\x96\xd6\x90\xda\xe8\x68\x5e\xd6\x2e\xc4\xe4\xa7\x3e\x31\x89\x7e\xef\x9f\x8e\x9a\x34\x5a\x44\x96\x03\x30\x7a\x64\xdb\xf7\xe3\x96\xb9\x56\x35\xcf\x50\xd9\xf1\xc6\x76\xba\xb6\x94\x3b\xe5\x4c\x3c\xb1\xfd\xf8\xac\x33\xfa\xec\xb6\xb1\xdb\xa0\xc6\xe8\x2e\xc7\x39\x6c\xdf\x71\x89\x26\x2a\x2f\x9b\x5a\xc4\xeb\x97\x6e\x3f\xc9\x78\x24\x63\xa1\x61\x70\x54\xdb\xdf\xca\xf9\x13\x84\x78\x70\xc4\x10\x50\xf3\xde\xd7\xb1\x26\xee\xea\x19\x69\xec\xad\x34\x9d\x53\x4c\x17\x18\x53\xf7\x63\xd7\xfd\xd8\x59\x85\xff\x01\xc7\xdc\x8a\xb8\x71\xd3\x2b\x08\xbf\x9d\xf5\xa2\x90\x98\x4d\xeb\x65\xf5\x44\xa0\xe0\xae\x1f\x23\x9f\xe7\xb2\xae\xc9\x9e\x1d\x20\xfd\x42\xc8\x42\x68\x5e\xa6\x9d\x92\x73\x57\xbd\xde\xc6\x86\x64\xeb\x90\x1d\x40\x7c\xf0\x4a\x6a\x5b\x1c\x1a\x8a\xc5\xe7\x56\x63\x1c\xdb\x42\x6f\xc0\x4a\xff\xf9\x76\xef\xb3\x5d\x69\x42\xbe\xf8\x54\x3a\x37\xee\xd0\x65\x6e\xb7\x84\xc8\x84\xc0\x0b\x89\xe1\x21\xbc\x2c\x33\xe9\xc3\x50\xdc\x7a\x6d\xbf\xc7\x46\xd7\x88\x5c\x63\xf3\xb3\x39\x13\x16\xa0\x03\xda\x51\x1c\x0d\x42\x38\xc2\x17\x75\xef\x8b\xf1\x50\x6d\x95\xc5\x1c\x0f\x2a\x23\xac\x32\x07\x03\x62\x7e\x79\xee\x47\x36\xc4\x54\xb7\x3e\x02\x88\x1d\xcf\xfd\xc8\x06\x7c\xb7\xd6\x47\x20\x75\xfd\x79\x1f\xd9\x07\x65\x6d\x9a\xf0\x4c\x5c\x7d\xda\x1f\x69\x6d\xe3\x8b\x6d\x14\xc1\xd2\xb5\x61\xf4\x56\xaf\xce\x44\xd4\x7a\xb5\xe0\xb5\x58\x81\x84\x88\x29\x32\x47\x21\xfe\xc1\xb3\x51\x5b\x3c\x32\xcb\x67\x2a\x2d\x12\xa2\xb0\x04\xa8\x03\xf4\x34\x76\x26\xec\x44\xa3\x0e\x70\xf8\xb4\xad\x4c\x4f\x12\x8b\x5d\xc6\xb3\x9b\x2b\xf6\x23\xbe\x1c\xaf\xf0\x50\xa9\x1a\x25\xfc\x0b\x95\x73\x39\x90\xeb\x10\x82\x45\xd8\x9e\x6f\xdc\x9b\x0c\x5f\x0d\x53\x21\x80\xe2\x42\x96\x14\x20\xc0\x7c\xf9\x85\x51\x76\x82\xcd\x08\x30\x0e\xe9\x92\x05\x50\x19\x76\x5d\xe0\x5a\x82\xdc\x0e\x38\xb2\x5a\x40\x16\xc8\x23\xb2\xac\x2a\x07\x36\xe4\x2b\xf1\x13\xf8\x82\xc5\xd6\x18\xb1\x0f\x6a\x21\x0b\x7b\x90\x40\x9b\x34\xb3\xe3\x32\xdb\x4b\xc5\xeb\x23\x51\x69\x9d\x5d\x16\x7c\x96\xc5\xc4\xe1\xf7\x19\x5f\xa0\xed\xc2\x34\x38\x4d\xa5\x86\x30\x9e\xe9\xf4\x03\x23\xfb\x51\x12\xa8\xb6\x74\x9c\x9c\x27\x19\xb7\x28\xbe\xaa\xb8\xfd\x71\x8c\xe1\x2b\x4c\xcc\x11\xda\x15\x05\xc0\x04\x28\x78\x85\x64\x0b\x8b\x74\xec\x02\x71\xef\x96\x32\x79\xb8\x09\xc0\x34\x55\x65\x7e\x2b\x82\x9f\x5a\x77\xaa\xfb\x2c\x9e\x8a\x03\x9f\xbc\x19\x44\xa5\xb1\x5b\x3b\xa5\xb1\x99\x96\xd1\x22\x14\xfe\x36\xb1\x14\xee\x44\xfc\x7b\x48\xab\xb6\xde\x34\xbb\x14\x44\x77\x20\x5e\xd4\xdd\x2c\x59\xd8\x61\x45\xbf\x81\x0b\x17\x8f\x4f\x08\xbf\xe3\x96\xb8\x8b\xd8\x49\x9a\x8e\x9d\xba\xa5\x7d\x24\xc7\xf5\x27\x2f\x75\x1b\x96\xfa\xf9\x45\x58\x76\xc4\x1d\xa3\x91\xed\xc9\x8d\x0e\x3c\x68\x27\x1e\x14\x3d\x53\x07\x26\x74\x60\x42\xaf\x00\xc9\x74\xe0\x44\x07\x4e\xf4\xc7\xe0\x44\xfb\x00\x70\x4d\xbb\x6e\x8b\xc1\x02\x5f\x68\xe1\xf7\x35\xad\x3a\xb1\xe8\x67\xd7\x17\x6e\xd9\x6d\x76\x43\x17\x02\x07\x1e\x9a\x5e\x52\x67\xc1\x08\xfb\xdb\xc7\xca\x06\x06\xf8\x4b\xf4\x73\xc4\xa3\xbd\xcf\x9c\x6b\xba\x37\xf0\xc0\xf4\x37\x5b\xd3\xe3\x8e\xc9\x74\xa3\x39\x7f\x2f\x97\x45\x6a\x4d\x8e\x76\x95\x03\xd3\xe3\x9e\xae\x80\x8d\x5d\x6d\xda\xe0\x8d\x2f\x6e\xdf\xf4\x2d\xdb\x45\xee\x72\x57\xec\xcc\x1c\x71\x52\xe3\x35\x39\x92\x46\xa6\x01\xac\xb3\xb9\x37\x18\xf7\xc0\x2d\xa9\xb6\xef\x54\x02\xa2\x24\xfc\x31\xc1\x4b\xe6\x53\x81\xb6\x45\x85\xc0\x4b\x70\x65\x47\x47\xb6\xeb\xbe\x2c\xe3\x9e\x6c\x06\x7a\x85\xce\xde\x68\x1c\x95\xd9\xe1\xa5\x84\xea\x09\xdc\x7a\x22\xac\x8b\xec\x17\x9e\xc9\xd4\x4d\x05\xcd\x50\x57\xc5\x88\x5d\xab\xda\xfc\xe7\xf2\x49\xea\x5a\x8f\xd8\x85\x12\xfa\x5a\xd5\xf0\x67\x9c\xaa\xb9\xd1\x6f\x27\x6c\xb0\x3a\x0e\x21\xc6\x2d\xbd\xb7\xa5\xc4\x69\x1a\x8c\x38\xb2\xcd\x05\xc1\xb0\x99\xcb\x12\x44\x3d\x68\xe2\xb5\xc2\x6f\x94\xd4\xec\xaa\x30\x3c\x83\x66\x07\x21\x34\x98\xa7\x85\x5d\x58\x0f\x5f\xa1\x8a\x31\x24\x5b\x45\xfb\xc0\x45\x31\xfd\x84\xcb\xb2\xa1\x3b\xea\x0a\xd2\x8d\xf0\x09\x05\xc8\xf3\x44\xa4\x2c\x6d\xb0\x24\x03\xa3\x5c\x07\x99\x30\x48\x75\x60\x90\x01\xf1\x32\xcf\xdc\x06\x13\x13\x08\x30\x1b\xa5\x77\x14\x71\x96\x2a\x4b\xb5\x95\x77\x00\x56\x05\x18\x87\x45\xc3\x00\xe4\x42\x66\xf6\x18\x7d\x38\xb3\xb5\xb9\x05\x16\x84\x17\x57\x83\xb8\x09\x60\xe7\xcd\xa5\xc8\x52\xb7\x32\x19\x14\x4b\x58\xf2\x82\x7d\xe4\x4f\xf8\xc1\xa9\xfc\x9b\xc0\x5e\x0e\x08\x5c\x5f\x12\xe8\xa1\x23\x8a\x81\xf8\x8b\xd1\x30\x97\x3c\x59\x02\x32\x2f\xec\x2a\xe4\xd2\x22\xef\xe2\x59\xb9\xe4\x45\x93\x8b\x4a\x26\x2c\x59\xf2\x8a\x27\xb5\xa8\xf4\x88\xbd\x19\xbf\x19\xb1\x37\x7f\x7d\x63\xee\xd0\x9b\xc9\x1b\x3c\x3f\x5a\x54\x92\x67\xb0\x14\x50\x35\xcd\x31\x64\x7f\xf2\x10\x78\x91\x6b\xf1\xdd\xb7\x4c\x14\x89\x4a\x41\xd3\xa8\x20\x03\xb8\x17\xe4\xc4\xab\x99\xac\x2b\x5e\xad\xd9\x31\x45\x06\xac\xe1\x62\xe3\x0b\x27\xd8\x23\x06\x48\x19\x75\xc2\x08\x8e\xe8\xad\x01\xf1\xc7\x2e\x7d\xad\x54\xa6\x27\x52\xd4\xf3\x89\xaa\x16\xa7\xcb\x3a\xcf\x4e\xab\x79\xf2\xed\x77\xdf\xfe\xf7\xaf\x34\x4a\x7b\xe3\x6f\x9f\x9d\x09\xd9\x83\x7b\x04\x68\xe6\xbc\xa9\x8d\x08\x1e\x11\x9a\xed\x23\x48\x07\x35\xa4\xdc\x1c\x37\x40\x27\x11\x80\x65\x4d\x81\x02\x30\x35\x23\x40\x06\xa2\x1c\x2e\x63\xd2\x0d\xc5\x62\xc7\x58\xaf\x11\x43\x09\x6c\x88\x93\xad\xcb\x94\xab\x14\xfc\x45\x27\x3e\xa2\x20\xfc\x28\x82\x66\x9b\x0b\xdd\x69\x0f\x88\x39\xc5\x9a\xc0\x95\x2e\xc2\x8c\x55\xc0\xaa\x75\x89\xcd\x05\x1e\x12\xea\x05\x55\x10\x10\xb7\xdc\x54\x2f\xcb\xa5\xc8\x45\xc5\xb3\x5f\x08\x7d\x7c\x2e\xa0\x56\x2c\x5b\xb4\xb3\xd7\x02\xc5\xe3\x10\x1c\x77\x08\x49\xdf\x3b\x24\x1d\x66\x7c\x11\x9d\xa9\x7f\x86\xfe\x6c\x5b\x55\x69\x8d\x65\x66\x8b\xf1\x4c\x16\x1c\x8a\x2e\x05\xa4\xaa\xb0\xc7\x0c\xca\x6f\xb2\x2b\x90\x34\x1d\x9e\x33\x14\x63\x02\xb3\x06\xd6\x8d\xc2\x09\x4a\x48\x40\xce\x45\xbd\x54\xe9\x84\x9d\x65\xfd\x7c\x72\x23\x9f\x81\x74\x60\x2e\x36\xf1\x9a\xd4\xf3\x55\xa3\xa5\x9b\x4e\x47\x90\xc5\x6c\xfe\x09\xa2\x45\xb1\x66\xe2\x09\x61\x03\xbc\x70\x84\xc8\xd1\xe2\x51\xb8\x14\xad\xd5\x52\x20\x98\x13\x0c\xdb\x9e\xe4\xb3\x9b\xab\x7d\x42\x2e\x22\xa9\xde\x51\xeb\x1b\xc4\x83\x80\x9d\x27\x91\x99\x04\x08\xae\xb2\x52\x8b\x8a\xe7\x39\xaf\x65\xc2\x96\xbc\x48\xa1\x3c\x32\x42\x47\x38\x76\xf3\xbb\x62\x90\x22\xd5\xbc\x2c\x1e\x77\x30\x76\xb6\x9b\x92\x5c\x0b\xce\x43\x1c\x7d\xad\x58\x49\x28\x73\x44\x21\x1e\x65\xa5\x0a\x50\x42\x1e\x79\x25\x0d\xb1\xc3\x3a\x7d\x93\xfb\xe2\xbe\xb8\x23\x7f\x22\x48\xf4\xc4\x0b\x6b\x5e\x2d\x44\x4d\x1d\xbe\xd1\xa1\x44\x05\xe6\x22\x47\xa0\xa0\xf5\x83\x58\x8f\x91\xc6\x95\x5c\x56\x50\xaa\x2b\xfa\xcd\xed\x72\x56\x11\x15\xec\xaf\x03\xa1\x9e\x2c\x64\xf5\x2b\x23\x0f\x40\xd0\xcf\xe9\x57\xf0\x9f\x18\x75\xb2\x09\x7d\x43\x89\x7a\xeb\x96\x75\x89\x36\xc2\x0a\x9f\x14\xe3\x10\x61\x21\xfb\x0b\xd2\x7f\x16\xeb\x5d\x0c\x11\xbd\xc6\xc1\x31\x31\x12\x14\x88\xd6\xd8\x68\x9b\xbe\xf8\x20\xd6\x7d\xf5\x10\xd2\xa9\x63\x0a\x18\x75\x1e\x08\x54\x2e\x19\x10\x6e\xfa\x84\xb5\x2b\x4a\xca\xd4\xb6\x7b\x10\x71\x03\xf2\x3f\xd7\x99\x00\xf8\x18\xed\xa5\xd8\x57\x3e\x1e\xdb\x92\x4c\x7c\xab\x76\x62\xc2\x6e\x47\xe1\x90\x50\xf2\xa5\x25\x94\xd0\xdd\x79\x6e\x26\x49\x3b\x7e\x0a\x3b\x7b\x0d\x93\x1e\x76\x74\xc8\x1f\x39\xe4\x8f\x7c\x9e\xfc\x91\xa9\x3d\xa9\xaf\x92\x38\x82\xbd\x05\xa5\x72\x37\x19\x7b\x53\x5e\xa2\xe5\x13\x6f\x1e\x08\xc7\xfd\xfa\xcd\xcf\x96\xac\x66\x82\x79\x6f\x80\x2c\x62\xa5\xa1\xb9\xa6\x32\xcd\x98\xb7\x40\x12\x58\xcc\xfa\x45\x58\xd9\x50\x23\x19\xd8\xd8\x84\x5d\xab\xda\xd9\x44\x51\x35\x46\x58\xfe\x84\x67\xd6\x6e\x0b\xf3\x6a\x79\x59\x1c\x38\x1a\xe6\xc6\xa0\xdb\x2b\x57\xe9\x0e\x21\xeb\x43\xa4\xac\x55\x7c\x6a\x84\x71\xe9\x6d\x39\x32\x32\x9f\x36\xbf\x4f\x44\x6a\xb9\xaa\x5f\x3a\xbb\x56\x4e\x69\xf1\x8b\x86\x4e\x76\xb6\x5a\x2a\x4d\x86\x62\x8a\x12\x37\xcc\xd8\xb0\x04\xda\x2b\xfb\x33\x85\xa4\x5e\xcd\xbb\xd9\x0d\xe6\x92\x89\x14\x17\x7d\xc3\x97\x7d\x6a\x47\xc9\xeb\xa5\x1e\x11\x5c\x5a\xef\x6d\x22\x39\xb4\xed\xf0\x41\x14\xd2\x64\x58\x55\x17\x91\xec\x9c\x37\x17\xa5\xef\x96\xcd\x65\x14\xce\x57\x8b\xba\x29\xb1\x7f\x51\x55\xaa\x32\x1f\x16\xda\x22\xcc\xe5\xbc\x7a\x10\xa9\x83\xa9\x98\xb0\x1b\x33\x42\x27\x91\xa0\x35\xff\x51\x38\x46\x69\xbe\x49\x76\x39\xf8\xc8\x9b\xc9\xe4\x0d\xd6\xca\x32\x92\x65\xcd\x2b\xaa\xd5\x6d\x7e\x7f\x0d\x9f\xd0\x9f\xc5\xfa\x4e\x99\x31\x01\x0f\x39\x48\x80\xdb\xe8\xa1\x5f\xaf\x8d\x24\xce\x3b\x3a\xb7\x8a\x88\xae\x69\x3b\x90\x86\xe6\xe0\x9e\x82\x7a\xbf\x04\x85\x4f\x35\x8b\x65\x18\x82\x60\xc8\x49\x25\xea\x4a\x8a\x47\xe1\xa9\x25\xd8\x08\x76\x47\xd1\xd8\xb0\xf5\x52\xb3\xa6\x90\xbf\x35\xc2\x96\x9c\xe7\xbe\x5f\xfc\xb6\x9d\x81\x23\x6a\x2e\xba\x7a\x48\xcf\xc0\x41\x45\xbf\x87\xfd\xb6\xd1\xf5\x79\xe2\x3e\x8e\xd7\x33\x50\x7b\x80\xc0\xd8\x0d\xc6\x81\xbe\x34\x58\x17\x3a\xde\x35\x26\xca\x31\xaa\x69\x8b\x51\xbd\x3a\x7b\x7a\x0d\xa6\x34\x0d\x79\xce\xab\x95\x7d\x6c\x9f\x24\x62\x5b\xf1\x20\x91\x4f\x74\x91\xbf\x07\xae\xc6\x66\x94\xef\xd9\x68\xc1\x54\xe1\x82\x15\x70\x82\x33\x87\x8c\x38\x69\xab\xb2\x8d\x70\x30\x99\x6f\x61\x98\x6f\xff\xf4\xa7\x3f\x75\xe0\x40\xbf\xfb\xf6\xdb\x09\xbb\x90\x15\xe8\xe4\x92\xcc\x30\xb6\x68\x93\xa1\xa7\xbc\x12\x58\xb1\x6b\x3e\x47\x76\x62\xe1\x1a\x29\xd8\x88\x4c\xda\xb9\x5c\x2c\xe1\xcb\x90\x9f\x58\xcc\x33\x99\x10\x09\xc6\xa0\x20\x45\xd1\xfe\x18\x3c\x0e\x7d\xf9\x55\x37\x73\x1c\x61\xfa\xe4\x5c\x43\xc1\xfb\x91\x85\x51\x32\x57\xc4\x30\x77\x32\xb3\x63\x67\x7e\x4d\x74\x4b\x47\xdc\x84\xac\x75\xe0\xfb\x07\xbe\xff\x52\xbe\xff\x42\xf6\xaa\x77\xe0\xaf\x36\x2e\x2f\x1e\x51\x10\x8a\x18\x9e\x83\xd5\x88\xda\xf7\x46\xb7\xf9\x4d\x33\xa0\x20\xee\x53\x44\xb5\xab\x81\xef\x19\xd3\xb4\x8b\x18\xd0\x54\xb2\x5e\x9f\x9b\x13\xff\xb4\xcd\x52\x14\x36\xf5\xee\x79\xf8\xb5\x53\xde\xaa\x05\x8e\x1a\x24\x13\x05\x09\x64\x13\x36\x55\x39\x79\xf1\xd0\xbd\x10\x1c\x66\xc8\x93\xee\x7e\xd1\x1c\xc2\x1b\x95\x76\x7e\x9e\x30\xf6\xeb\x52\xd0\x2b\xa6\x1b\x2d\xda\x21\x11\xb2\xe8\xf5\x54\xf3\x07\x11\x20\xaf\xee\xe0\xef\xcf\x32\xb5\xba\xa9\xe4\xa3\xcc\xc4\x42\x5c\xea\x84\x67\x03\x48\x8a\x67\x03\x2d\x2d\x16\xa1\x0f\x3b\x04\x4d\x2e\x31\x77\xd1\x10\xd7\x85\xb9\x52\xb9\x82\x65\xa0\x97\x29\x40\xc1\x9c\xde\x92\x43\xda\x2a\xbd\x40\x34\xdf\x1c\x5a\x96\x02\xef\x40\x47\x0e\xf6\x2f\xf1\x7c\x16\xea\xaf\x85\x58\xfd\xd5\xf4\xa6\xd9\x3c\xe3\x0b\xb7\x1f\x10\x89\x53\xb4\xf3\x86\x7c\xd7\x83\x13\x30\xd4\xb0\x6a\x04\xe3\xd9\x8a\xaf\x35\xfa\x6c\xda\x7d\x48\xfd\x3d\x7b\x77\xc2\xaa\x06\xb0\xab\x5d\x1f\x29\xfb\xfa\x04\x64\xc2\xf3\xb3\x9b\xbf\x4e\xff\xe7\xf4\xaf\x67\x17\x1f\xaf\xae\xa3\x97\x2f\xe1\x25\x9f\xc9\x4c\x7a\x26\xdd\xb5\x27\x87\x2d\xe0\x44\xa5\xe9\x69\x5a\xa9\x92\x7c\x48\x4d\x01\xe5\x10\xdd\x98\x3a\x25\x59\x43\x7d\x95\x02\x92\x5a\x1d\x2e\x2a\x1e\x86\xdd\x05\x68\x83\x4d\x01\x2e\xe5\x3d\x42\x62\xcf\xc3\xb9\x40\xe0\xb3\x5d\x8f\x48\x0c\x55\x53\x84\xeb\x58\xf8\x43\x90\xa2\x5e\xcd\x6e\x70\x7f\xf0\x3c\x07\x4f\xfd\x4c\xb1\x6c\x96\x06\x73\x19\xcf\xb2\x35\x13\xbf\x35\xf2\x91\x67\x02\xeb\x4f\x57\x4a\xb9\x6d\x5f\x2a\x5d\xc7\x6a\xd5\x46\xf7\xc4\x9c\x0c\x08\x64\xee\x0f\xdb\x3d\x62\xa9\x28\x94\x8d\x42\xab\xa9\xec\x88\x79\x6a\xcb\x7c\xa3\xec\x14\xc4\x6b\xbb\xed\xb9\x0b\xb6\x44\x6a\x3b\xa8\x1b\xd7\x33\xf2\xbb\x46\xbb\x3c\xe3\xce\x96\xf8\x24\xd4\x39\x04\xd8\xf1\x14\xfc\x9a\xc0\x6a\x89\x6f\xe9\x07\xcb\x7b\xe9\xe6\x90\x0d\x9b\x2a\x87\xd9\x4f\x41\x6a\x9f\x75\xf2\xcf\x29\x38\x79\x26\x6c\x70\xc0\xc6\x90\xf2\x5b\xa5\x6a\x1f\xd6\xdf\x5f\xa9\x5f\x1d\x63\x92\x21\x88\xe5\x12\xc4\x91\xca\x96\x7a\xc2\x4d\xf2\xa1\xff\xad\x98\xe2\x0d\x5b\x54\x35\xc5\x19\x0a\x6e\xf1\x4b\xf3\xe3\xd5\x05\x1c\x81\xa6\x20\xfb\x67\x5d\xad\xd1\x02\xea\x4b\xcf\x74\xe9\xc0\xcf\x66\xc5\x3b\x6b\x4c\x35\xc2\x85\x91\x74\xf9\x1a\xd1\x38\x88\xa0\xc8\x22\x4e\x9b\xaf\xe6\xf6\xf1\x1e\x34\x3d\xa0\xdf\x6d\x40\x8c\x18\x21\xd7\x71\x4a\xbe\x11\x68\xd6\xac\xd7\xb5\x2a\xcc\xae\x6d\x8a\x10\x77\xb1\x82\x7e\x7d\x40\x84\x20\x0a\xc7\xc1\x07\x0f\x7b\xd6\xd8\xc2\xc9\x3e\x3e\xe5\xcf\xcd\x4c\x64\x56\x26\x05\xcf\x96\x75\xc0\x62\x89\x73\x5e\xbb\xe5\x85\x20\x78\x5f\x12\x5e\xd6\x2c\x55\x02\x25\x3c\xfa\xd4\xcf\x57\x17\xec\x2d\x3b\x36\xdf\x42\x88\xd3\x39\x97\x60\xa0\x43\xa1\xab\x43\x87\xe7\xb6\x0b\x18\x12\xec\x98\x91\x83\xe6\x58\x48\xa8\x50\x4c\x37\xc9\xd2\x8e\xc9\xc5\xfc\x1b\xd9\x53\x54\x66\xb5\x20\x6f\xfe\x4b\xdf\xe0\xee\xf9\xff\x79\xb0\xfa\xf3\xcf\xcf\x38\xfe\x21\x71\x84\x04\x8b\xd6\x30\x71\x07\x5d\xd0\x52\xaf\x74\xfe\x97\xbe\x76\x9b\x2e\x87\x16\xdd\x4c\xf2\x48\x6a\x02\x29\xdc\x89\xfd\xd4\xc6\xac\x71\x7b\x0a\xdb\xda\x53\x9f\x92\xc3\x29\xb4\x55\x8c\x0d\x5d\xe4\x45\xaa\xf2\xde\xc7\x1c\x6e\x49\xf0\x81\x2f\x78\xc9\x77\x76\x92\xb5\x33\xf8\xff\x3e\x3a\xc2\x5a\x81\x7a\xe3\x4e\xfc\x8a\x6d\x5c\x89\x15\x6b\x17\xd0\x2d\xb1\x3b\xcb\x5a\x3c\x37\xb6\x1d\xd6\x42\xe0\xbc\x64\xfd\x65\x70\x64\xa2\xd1\x04\x14\xf1\x85\x2e\x25\x2d\x4a\xa7\x4b\xb7\xb2\x3b\x6a\x4f\x2d\x01\x6e\x17\xd0\x85\x68\x9b\xcd\x63\x19\xd4\xcb\x6c\x48\xea\x8e\x26\xda\x5e\x73\xf4\xa6\x7a\x9b\x27\x44\x5d\xb8\x38\x57\x72\xa0\x1f\xe2\x9c\x0f\xa0\xc5\x7f\x5c\xf7\x77\x15\x5e\x8d\x58\xcd\xc6\xe0\xec\xbb\xa3\x66\x0d\x36\x24\x60\xef\x41\x54\x7a\xd9\x8d\x3b\x92\x91\x5d\x73\xca\x44\xf5\x28\xb7\x5e\x73\xd3\x04\x4f\x0a\x82\x76\xf1\x99\xae\x2b\xee\x50\xdb\xb4\x9a\xd7\x2b\x34\x82\x60\xd3\x63\x60\x96\x4f\x3c\x2f\x33\x31\x62\xf9\x5a\xff\x96\x9d\xd8\x48\x79\x8a\x71\x34\xec\x36\x63\x60\x60\x0f\x5b\xb3\x6f\xbe\x79\xfb\x5d\x50\x50\xb9\xac\xd4\xd3\x1a\x4d\x9e\x85\x66\xaa\xf0\x26\xe2\x76\x0e\x53\x2a\x6a\x51\xe5\x40\x0e\x50\x75\x83\x0a\x18\xc8\xda\x0b\xbd\x12\x95\x3f\x63\x14\x30\x58\x81\xa7\xc8\x7d\xe3\x40\x95\x0e\x54\xe9\x0f\x4c\x95\xfe\x65\xe2\xd6\x77\x83\x52\x0f\xab\x8a\x73\x4b\x96\xbe\x34\x5c\x71\x22\xac\xdb\xc0\xd4\x3f\xee\x52\x1d\xdc\x4d\xf1\x0f\x5d\xd9\xdb\xae\xc8\x7e\x18\xeb\xe1\x3a\x6e\x62\x72\xaf\x8d\xab\x4e\xdd\x9e\x25\x89\xb5\x53\x6e\x61\xa1\xd4\x92\xcd\xcc\x2d\x66\xb5\x5a\x80\x75\xee\x7b\xf6\x6f\xc4\x58\x47\xac\x29\x52\x51\xe9\x5a\x29\xd8\xbe\x46\x43\xfa\x98\xa1\xe3\xa5\xa8\x96\xbc\x04\xb7\x6f\x29\x2a\x59\x2e\x45\xc5\x33\xda\x5b\x8d\xf5\x20\x79\x41\x41\x54\xf5\x1a\x7a\x2c\x2b\x59\x24\xb2\xe4\x84\xdd\x45\xbe\x54\xde\xd4\x4b\x8c\xb4\x32\x67\x04\x72\x7b\x9b\x7a\xa9\x2a\xe0\x0a\xff\xe6\x33\x66\xd1\x07\x14\x2b\x7a\x77\xe0\x8a\x9f\x95\x2b\xf2\xa6\x56\x60\xbe\x6e\x1f\x9a\x3b\xf5\x20\x62\x4b\xbc\xa1\xb5\xad\x4b\x1e\x80\x4e\x80\x54\x64\xdd\x15\x10\x02\x01\x3e\x7d\x94\xda\x38\x1d\x4f\x5a\x61\xa8\x1c\xc6\x0b\x80\x56\xa9\xa1\x3f\x18\x1a\x87\x28\xbd\x6c\x8d\x36\x76\xc3\x07\xcf\xc9\x4b\xff\x28\xaa\x4a\xa6\xa9\x69\x58\x5b\xf7\x24\x42\xee\xc5\xed\x67\x60\xce\xba\x69\xb2\x6c\x4a\x67\x2d\x92\x00\xd8\x6e\xd1\x8e\x3a\x6e\xc3\x94\x68\xdb\x84\x24\x6d\x9e\x8b\x9e\x67\x14\xee\x49\xd9\x64\x99\x4d\x13\x82\x21\xa0\x73\xc3\x55\x4c\x0b\x24\x78\xb3\x3a\xed\x85\x9d\xb0\xde\x98\xa0\xc8\x22\x08\xb6\x94\x5c\xc0\xec\x93\x99\x48\xb8\xf9\xaa\xfd\xdb\x65\x0d\x36\x45\x80\x3a\x51\xaa\x74\x04\x50\xd0\xd1\x9e\xc1\x40\xcf\x93\x04\x31\xa2\x89\xa6\x3f\xa0\x91\xf7\x39\x81\xd6\x64\x8d\x39\xc5\x99\x9f\x7e\xe5\x53\xbb\xc6\xf0\x93\x59\x1d\x5a\xca\xb1\x2a\xc6\x7c\x5c\xaa\xf4\x15\x5c\xea\x71\xa4\x96\x83\x10\x78\x10\x02\x9f\x23\x04\x0e\xd1\x8b\x80\x4c\xd8\x48\x99\x80\x97\x59\x74\x5e\xb2\x1b\x37\x74\xa1\x5a\x34\xd1\xc6\x8d\x45\x2e\xfe\x97\x91\xd4\x10\x41\x3b\xda\x52\x6d\xb2\x40\x90\x8d\x9d\xaa\x4d\xbe\x04\xb5\x26\x2a\x23\x6d\x6a\xf4\x8a\xc2\xd7\xf6\x84\xa3\x6e\xeb\x6e\xe2\x51\x4b\x40\xa3\xc8\xdb\x43\x1e\xd2\x17\x21\x11\x0d\x04\xf1\x7d\x88\xee\xdd\xce\xd9\x47\x35\xd7\x0f\xfe\x96\x0a\xc3\xe7\x02\x84\x66\xff\x3b\x49\x47\x63\x92\x8e\x5e\xa3\xbe\x4d\x47\x71\x38\xb0\xc1\x43\x82\xd2\xe7\x4a\x50\x6a\x1d\xb4\x57\x4b\x54\xea\xa9\x1a\xbb\x65\x2d\x6d\x7c\xb1\x03\x95\xe9\x02\x5a\xbb\xda\x09\xaa\x22\x14\x40\x8e\x81\x35\xa5\xef\x84\x44\xec\x86\xb2\xed\x65\xa1\x0d\x49\xe4\x03\xbd\xb8\x60\x59\x2b\x03\x80\x43\x38\x00\xc1\x34\xfa\x82\x91\xe0\xf9\x82\xcb\x42\xd7\x46\x17\xd2\xec\xf8\xcf\x8e\x9a\x80\x72\x84\xf7\x8a\xa9\xca\xa3\xcc\x9f\x6c\xcb\x61\x2d\x21\x3c\xb2\xc7\x3a\x9a\x54\xc6\x5d\x0b\x67\xf4\xc4\x8a\x36\x86\x86\x17\x80\xac\x60\x1f\xd8\xd0\x79\x33\xb1\x09\x3b\x33\x6c\x40\x96\x70\x87\xc1\x06\x86\x13\x86\x38\x12\xb4\x12\xcc\xd7\x4c\xd6\x5a\x64\x73\x8c\x9d\x75\xd6\x83\xb9\xec\x86\x1d\x00\xba\x4c\xec\x33\x23\x8f\xff\x08\xd0\xfa\xc4\x88\x88\x8f\x04\xa3\xb9\x0b\x7b\x48\x3b\x91\x71\xc1\x67\xa9\x73\x73\x1a\x61\x4d\xa3\xc1\x4f\xe2\xa9\x94\x28\x55\x51\x3d\xf2\xfe\x6a\x5d\x76\x9b\xd8\x65\x23\x32\x86\x30\x54\x8e\xa7\x42\x48\x8a\xac\xd7\x1d\x63\x5a\xfb\xb0\x4c\xd8\x99\xf6\x73\x62\xbc\x2c\x2b\xc5\xa1\xb0\x8c\x1f\xd0\x28\xd4\xce\x6c\x2c\x74\x99\x35\x0b\x49\xc1\x2e\xf0\x4e\x2d\x1f\x05\x44\x5d\xd5\x36\x34\x67\xe0\x83\x77\x41\x67\xf0\x3a\x85\xdd\x54\x80\xc4\x01\xd1\x75\xae\x0b\x3a\xd0\xf3\xf0\x0f\xcd\x54\x96\x02\x99\xe7\x05\xfb\xef\x6f\x59\x29\xaa\x84\x0e\x04\xa4\x16\x50\x10\x50\x26\x1f\x05\x04\x2c\x0f\xbf\xfc\xf5\xb7\x6c\xa9\x9a\x4a\x4f\xc2\x00\x95\x77\xf0\x1b\x8a\x0f\x36\x03\xc1\x96\x8c\x7f\xf7\x96\xe5\xb2\x68\xda\xb0\x56\x9b\xe2\x3f\xe0\x42\xf4\x36\xf2\x86\xd7\x4b\xbb\x77\x10\xf0\xed\x62\xc3\xe9\xf0\x60\xa0\x5f\x2b\xac\x06\xc2\xec\x6b\x65\xa9\x42\x38\xa7\x22\x0a\xb6\xb6\x5f\xf6\x0b\xec\xd4\x8e\xf2\x26\x88\x28\x18\xb2\x1c\x26\x4b\xc3\xb3\x43\xdd\xc4\x3f\x86\x78\x69\xb7\xeb\xf5\xe4\xbe\x83\xc0\x77\x10\xf8\x3e\xaf\xc0\xf7\xca\x92\xde\x8d\xaa\x76\xa1\x76\xa6\x99\xc7\xcd\x0b\x73\x30\x55\x61\xaf\xd1\x1b\x0d\x3e\xff\xad\xe2\x91\xf9\x62\x84\xf4\x95\x37\x95\xaa\x55\x32\x84\x5d\x0c\xc1\x67\x04\xdf\x5c\x52\x4b\x0a\xff\x96\xf4\x61\x94\x18\x31\xa1\x6b\xae\x08\xde\xca\x9e\x92\x40\xb0\xc3\xaa\x27\x7a\x5d\xd4\xfc\x69\xc2\x7e\x2e\xc6\x65\x25\xe6\xf2\x49\xa4\x68\x54\x06\xdb\xac\xb9\x68\xe0\x8b\x33\x9f\xb8\x3a\xbb\x3e\xf3\x3d\x59\x8e\x8e\x8d\x8f\xb9\x86\xba\xed\xb7\xef\xcf\xc7\xdf\x7d\xf3\xcd\xbf\x03\x4d\x34\x07\xef\xfb\xd3\xd3\xd5\x6a\x35\x91\xbc\xe0\x80\xb7\xc7\xb5\x96\x0b\xc0\x2b\xd2\xa7\x56\xf1\x84\x2e\x4e\x26\xec\x1a\xc0\xfc\xa8\x7f\x3b\x3b\x47\x9e\x8d\x94\xda\x19\x22\x84\xdb\x72\xcd\xf2\x75\xa2\xf2\x92\x17\xeb\x49\xa2\xf2\xd3\x7c\x3d\x4e\x1a\x5d\xab\x7c\x6c\xfb\x98\xb0\xf7\x21\xa8\x9d\x45\xa5\x03\xb1\xd0\x8a\xec\x7e\xe5\x87\x00\xe9\xb6\x41\xe5\xb4\x71\x51\x69\x3b\xc2\xc4\x43\xe7\xc2\xc4\xd4\x42\x97\xd3\x78\x71\x3d\xfd\xeb\x87\xb3\x1f\x2e\x3f\x20\x44\x98\x79\x4d\xfb\x64\xdb\xc0\xf9\x87\xef\x80\xdb\x82\x52\x72\x29\xb1\x13\x32\x75\x20\xfc\x24\x15\x95\x25\xa1\x96\xf8\x69\x42\xdf\xa6\x8e\x46\x38\xb8\xa0\xf6\x20\x64\x9c\x99\x9e\xde\xd0\xb1\xa1\xf1\x5e\x52\x07\x37\x70\xac\x6c\xee\xa6\x91\xa2\x10\x62\xb0\x10\x2c\xbc\x18\xd2\xd6\xe2\x4b\x31\x1f\xc2\x3b\x5e\xe2\x8b\xa8\x52\x77\xef\xfa\x0b\x89\x89\xa9\x05\x15\xd2\x53\x29\x24\x88\xda\xe4\xdf\xc0\xa5\x83\xf5\xb0\x94\x86\x0c\x3e\x81\xf0\xa5\xff\x79\x4d\x5d\x1b\x99\xef\x83\xe2\xe9\x0f\x3c\xe3\x45\x22\xaa\x09\xfb\x59\x37\xe0\xda\xc1\x63\xd8\xf7\x21\xb7\x93\x11\x65\x90\x6c\x45\xe1\xb3\xa9\x07\x8c\xa7\x01\xcc\x59\x53\x80\x36\xa6\x2a\x26\x32\x2d\x30\x8d\x95\xa4\x8d\xb0\xa5\x07\x80\x0f\xd3\x0f\x6a\x05\x5e\xa7\x71\x10\x9f\x0b\x73\x27\x59\x95\x16\xf8\x6e\x5d\xfa\x73\x65\xe3\x95\x5c\xba\x85\x2a\x9e\x91\x12\x47\x5c\x7f\x5c\x88\x9a\x92\xf2\xed\x6f\xa7\x40\xde\xc7\x66\xd5\x81\x4c\xed\x94\x88\x5a\x6e\xde\xca\x56\xe6\x9a\xdd\x31\x9f\x73\xdb\x3d\x26\x1b\xbf\xb4\x91\x42\x5e\xdd\x0c\x12\xc6\x29\xe6\x3b\x6b\x76\x7f\x74\x77\x7e\x83\xe5\x1b\x7e\xbe\x80\x7f\x18\x72\x75\x7f\x34\x3d\xbf\xbb\xe9\xd4\x72\xb8\x3b\xbf\x89\x57\xb1\x82\x04\xee\xf8\xf9\xbd\x6e\xf2\x19\xaa\xcb\x21\x4c\x32\x2e\x83\x22\x57\x97\x4d\x19\x42\xaf\x1c\x74\x16\x9c\x46\x4b\x28\xa8\x27\x4b\x2a\xe8\x5e\x56\xbc\x58\x08\xf6\xce\x74\xf6\xdd\xbf\xff\xfb\x37\xff\x3e\x61\xd7\x61\x12\x3c\x2f\x80\x54\xff\x75\xfa\xcb\xf9\x5f\xaf\xcf\x3e\x5e\xb6\x6a\x14\x70\x87\xaf\x1a\x1c\xee\x4c\xa9\x07\x91\xb2\xa6\xa4\xec\x0b\x08\x81\xc3\x53\x58\x84\xe9\xea\x37\x90\x8d\x19\x44\xf5\x9b\xd5\xec\x95\x40\xe8\x04\x40\xa3\x80\x47\x8b\xf0\xc6\xbc\xe2\xc8\x8c\x46\x33\xc6\x71\xe8\xd8\xcf\x79\x79\xd2\xe2\x61\xa6\xe3\x45\x01\xd0\xa7\x73\xc0\x57\xc3\x73\x8b\xd4\x3b\xc9\x1a\x5d\x8b\xea\xea\xe6\x3f\xaf\x55\x41\xa2\xb8\x2f\x2f\x60\x6b\xec\xc1\x6b\x35\x13\xbf\x35\x88\xbe\xd2\x1d\xc9\xeb\x5e\x1e\x14\x82\x8a\xc5\x98\x5b\xd3\xea\xbe\x22\x52\x53\xcb\x6c\x62\x28\x77\x5d\x4d\xae\x8a\xfa\x53\x35\x7d\x06\x32\xa2\xe9\xe4\x34\xd2\xc9\x16\x49\xa8\x52\x4f\xeb\x5d\xaa\xdd\xf5\x9b\x5b\x35\xf6\xb7\x46\x54\x6b\x9f\x19\xaf\x3c\xeb\x79\xa3\x29\xdc\x31\xe1\x59\x76\x88\x47\x3c\xc4\x23\xfe\x81\x55\xb2\x5d\xcc\x39\x15\xe8\xd7\x3f\xdf\x7e\xa0\xc0\x0b\x59\x24\x59\x93\x7a\x89\xc0\x49\x68\x23\xa6\x9b\xb9\x91\x6c\x6d\x30\x14\xaf\x78\x2e\xb0\x50\x74\x27\xc5\x93\x2a\xed\xe2\x3d\xa2\x05\xa3\x2c\x04\xe4\x19\xef\xc3\xc8\x64\xf3\xca\x6a\xa9\x32\x67\x18\x34\xa3\x31\x03\x24\xd9\x1c\x82\x94\x97\x4a\xd7\x40\x0b\x1e\xdf\x9d\xba\x80\x12\x0d\x04\x70\x8c\x82\x91\x23\x78\xa7\x22\xe3\xba\x96\x89\x16\x66\xf9\xc6\x99\x5a\x2c\x0c\xed\xfb\x2b\xfe\xfd\xff\xfc\xf6\x9f\x8d\x16\xd5\xf7\x0f\x32\x4f\x96\x6b\x44\x3d\x30\x1f\x8b\x3f\x7e\x15\x3b\xd5\xb6\xfa\xf3\xa1\xf4\xdc\xae\xde\xca\x6b\x3c\x15\x36\x1f\x91\x63\x3e\x1a\x82\x90\x00\x7f\xe6\x11\xc1\x64\x80\x54\x39\x3e\xd4\x1f\x81\x7b\x64\xcf\xc5\xd5\x4d\xb7\xc6\x93\xb3\x8e\x16\xc4\x14\x3b\x42\x2a\x26\x6c\x65\x6b\x2b\x1f\xe4\xdc\xf4\x88\x48\x16\x85\xeb\xac\x05\x67\x91\xf3\x82\x3a\xc1\x3e\xcd\x55\x92\x05\x1c\xa5\xd9\x1a\x2d\xda\x7a\x27\x01\xf7\x3f\xbc\xf9\x7b\xb4\x8b\x68\x1b\x70\x6e\xa3\x6e\xd1\x15\x4e\x96\x46\x66\x49\x5d\x54\x3a\x5e\x69\x57\xaf\x22\x00\x43\xbe\x3f\x32\x9c\xdc\xc8\x64\x50\x65\xc1\xd2\xa4\xe3\xfb\xa3\xfb\xa3\x93\x11\xc3\x3a\x42\xf0\x92\x5f\xc7\x89\x7b\xcb\xaa\x78\x7e\x21\xcc\xc5\x59\x0a\x9e\x02\x3a\x87\x17\x1e\x8c\xae\x00\x77\x08\x0a\x4b\x51\x4e\xa8\xab\xd5\x0b\x65\xa7\xc2\x5a\xa0\x86\x16\xb0\x73\xbb\x93\x23\x66\x35\x0c\xbc\xae\x6d\x1d\xe3\x8a\xa4\x15\x23\xc1\x53\x55\xd3\xcb\x27\x64\x14\x46\x4e\x7b\x5d\x61\xe3\x51\x56\x75\xc3\xb3\xb1\x2c\x35\x46\xa4\x92\x4e\x6d\xe6\x26\xe3\x5c\x40\xd0\x60\xae\x6e\x22\x46\xc1\xe0\x61\x3b\x80\xc0\xaf\xb6\x40\x85\x12\x95\x31\xa3\x24\xb8\x90\x34\x3a\xea\x36\xe1\x50\xa3\xb0\x5b\x42\x45\xfb\xf9\x5c\x26\x5e\x20\x77\xd4\x8a\xdd\x2d\x85\x36\x77\x42\x3b\x48\x1e\x04\x21\x02\x61\xd8\x9b\x2b\xb0\x25\x5e\x51\x60\xe7\xba\x34\xea\xee\x2c\x43\xd2\x08\x69\xbe\xc8\xa8\xb8\xff\x1c\xaf\x2a\xf9\x68\xce\x55\x0d\x39\xc5\xa9\x08\xca\x1b\x5d\xdd\x4c\x18\x3b\x83\x8a\x58\x46\xcd\xa4\xe4\x0c\x50\x27\x89\xa9\x67\x8a\xa7\xe3\x19\x6d\xab\x25\x12\x34\x46\x4b\xdb\x6d\x42\x32\xd9\x54\x7c\xf6\xcb\xae\x25\x3e\xfc\x76\xc4\xa1\x51\xc2\xa7\x96\x80\xb8\x11\x86\x81\x7c\xbc\x06\x4f\x4a\x5a\x40\x21\x93\x00\xa3\x80\x80\xa4\xeb\xa6\xa2\xe4\xea\x73\xa3\x14\x80\x70\x53\xa5\x91\x1d\xb9\x56\xfe\x62\x58\xe2\x20\x8b\x47\x95\x3d\x42\x0a\x6e\x07\x54\xf8\xf6\xfd\xf9\xf8\xdd\xbb\xaf\xbf\x01\xec\x03\x50\x77\x8e\xb7\x54\x5a\x30\xad\x31\xd7\xda\xe9\xaf\x77\x54\xad\x6f\x26\xda\x37\x65\xd3\xe9\xbd\xc3\x3d\xbe\x81\x22\xf9\xc3\xeb\xd6\x6a\xe6\xe0\x14\x64\x47\x93\x4e\x85\x46\xdc\x02\xc5\x2a\xd5\xd4\xc1\x12\xdb\xa3\x54\x2b\x38\x40\x63\xcc\xea\x51\x95\x3d\xeb\xe3\x95\x4c\x03\x46\x6e\x28\x11\xc4\x0e\xdd\x1f\x21\xee\x4a\xf5\x68\x01\x16\x48\xd4\x41\xe9\xc9\xdc\xa6\x22\x65\xfc\x51\xc9\x94\x50\x2e\x55\x91\xb2\xa5\x2a\x61\x47\x42\x82\x02\x0d\xaf\x49\x17\xa7\xa2\x85\x44\x11\x30\xaa\xb2\x92\xfa\xc1\xa8\xb8\xb5\x43\xa8\x90\x39\x1d\xdb\xd4\x8d\x5f\x97\x84\x03\x6f\x46\x48\x84\xec\xfe\x88\xa9\x99\x4e\x9a\x6a\xd3\x10\x8d\x1c\x87\x41\x9e\xad\x51\x42\xee\x17\xc2\x56\x15\x00\x73\x65\x46\x12\xc6\xd5\x2e\x94\x4a\x21\x62\x96\x67\x74\x95\xfc\x10\x62\xfb\xba\x14\x3c\xab\x97\xe7\x4b\x91\x3c\x5c\x0f\x5a\x86\x22\x8d\x1c\xa9\xc7\x39\x60\x8b\xc4\xb4\x60\xd6\xc2\xe4\x84\x27\x77\xc6\x6d\xed\x0b\xaf\xa9\xfe\x14\xe9\x59\x6a\x07\x49\xd6\x56\xcc\x19\x2f\x25\x9b\xf1\xe4\x41\x14\x41\xb9\x38\xcf\x41\xed\x87\x27\xec\x57\x73\x81\xcc\xe2\x19\xc2\x35\xf6\x5c\xc9\x0d\x0d\x65\x6d\x19\x98\x9d\x1c\x48\x0a\xec\x06\xf1\x22\x01\xd0\x62\xc4\xb7\x6c\xad\x6c\x2a\xdd\xd1\x3b\x2c\x97\xd1\xb3\x1f\xbe\x90\xf0\x6c\x57\x7c\xb1\xf2\x3d\xcf\x65\xac\xb6\xa3\x7d\x12\x6c\xc0\x2a\x44\xe3\xb0\x77\x0b\xb1\x38\x4a\x4f\xab\xd0\x1a\x69\x28\xa8\x4c\x9a\x8c\x57\xe6\xa4\xcd\xb1\xab\x63\x31\x59\x4c\xd8\xd5\xcd\xe3\xb7\xec\x51\xc3\x3f\xbe\x3b\xc1\xe4\x72\xee\x33\xb1\x7d\x73\xa9\xbd\xbf\x7b\x14\x72\x20\xd3\xa4\x05\xa6\xe7\xf7\x86\x14\x11\x5e\x53\x27\x23\x82\x75\x30\xcc\xee\x91\xcb\x0c\x6a\x25\xb6\xf9\x19\x8e\xa0\x50\xbb\x7c\x19\x54\x5c\x99\xf3\x6a\x1d\xb4\x6e\xe7\x77\x7f\x82\x35\xb2\x43\xd4\xec\x38\x0b\x36\xd0\x08\x17\xe1\xdf\x08\x40\x78\x6b\xa4\x27\x3d\x62\x01\x77\x3e\x71\x90\x6a\x95\xca\x32\xc3\xa0\x90\x21\x3b\x3b\xe2\x10\x1f\x0b\xcc\xe9\x2e\x8c\xdc\x0d\x75\xc2\x9c\xd5\x57\x7b\xde\x30\x0d\xc5\xbc\x99\x37\x44\xba\x77\x3a\xe6\x1a\x5b\xea\x85\xf1\x79\x6d\x45\x6a\x28\x96\x79\x06\x12\x2d\x56\xc7\xa2\x4e\xaf\x6e\xe8\x18\x01\x1a\xdf\xc0\x0e\xf8\x83\xf1\x9d\x79\x02\x07\x04\xcb\x6c\xe0\xf3\x13\xaa\x3d\x83\x50\x6c\x86\x48\x81\x85\x05\x96\xc8\xc9\xa6\xb6\x30\x97\x3f\x23\xde\x19\x11\x25\x49\xed\x7d\x89\xa0\x19\x76\xa4\x44\xbb\x4c\xe6\x7e\x7e\xdf\xbe\x96\xad\x3f\x60\x44\x0b\x51\x3b\xea\xe2\x48\xc8\xd5\x4d\x37\x30\xc5\xae\xab\x15\xac\xc9\x35\x91\x82\x96\xa4\xd1\x28\xee\xb1\xd9\x20\xbb\x26\x5b\xe3\x2c\x55\x93\x8e\xa9\x3e\x49\x65\xb1\x1e\x5b\x95\x4e\xc0\x92\xd1\x9a\x23\xd2\x17\x0e\xbf\x32\x7b\x64\x02\x3a\xd8\x12\xef\x9d\x70\x10\xc8\xbb\xb0\x65\xad\x0f\x3b\xc4\x15\x8b\x36\x09\x11\x0c\x38\x8d\xad\xab\x1e\x9e\xfe\x28\xc8\xa1\x5f\x2d\xb0\xfc\x75\x8b\xf9\x96\x19\xaf\x0d\x4d\x23\x9f\x07\x89\x42\xe6\x5b\x89\x97\x12\xc3\x4c\xd9\xce\xe0\x5b\x57\xc7\x4d\xd8\xf6\x10\xe8\x4a\x6e\x18\xc4\x43\xaf\x6e\xf4\x6b\xaf\xd5\xfd\xd1\x5e\x71\x9f\x68\x66\x1e\x07\x0e\xc3\x31\x1d\xfc\x20\xf4\xb3\xfd\xfd\xf1\x5c\x56\x62\xc5\xb3\x6c\x53\x08\x68\x5f\x80\x85\x73\x15\x37\xc6\x5b\xe5\x01\x8f\x9e\x93\xa0\x87\xec\xff\xff\x18\xcd\xe8\xa5\xd1\x0e\x20\xaa\x74\xa3\xd4\xcd\xcc\xc7\x39\x2f\xc7\x0f\x62\xad\x9d\xc3\x37\x70\x5e\xfc\xaf\xd8\x0b\x34\xa2\x9c\x97\xf1\x78\xf6\x30\xea\x9d\x3a\xdc\x29\xea\x7d\x74\x54\x36\xb3\x4c\xea\xe5\xb5\xaa\x6f\x05\x4f\xd7\x67\x56\x95\x8b\x80\x8f\x0d\xb4\x1c\x21\x71\x68\xd5\x0b\x93\x6d\x48\xa7\x8b\xeb\x29\x93\x46\x8f\xca\xad\xa1\x95\xfc\x8c\xd4\x27\x9c\xe7\xa2\xdb\x31\xc4\xa0\x34\x33\x2d\x1c\xcb\x11\x01\x13\x8a\x15\xe6\x9d\x7a\x47\xaa\xc7\xd0\x22\x49\xca\x02\x7a\xc1\x33\xcb\x8a\x0d\xb3\x4b\x38\x99\xd1\x6c\x39\xe9\xba\xc5\xb4\xc8\xce\xc6\xd9\xb4\xe6\xb5\x98\x37\xd9\x14\x80\x79\x7f\xb2\xa6\x03\x4b\xdc\x31\xee\xaa\xe4\x0b\xc3\x63\xa7\xb7\xbf\x90\x22\x85\x43\x97\xb5\x66\x37\x98\x97\x8f\x40\xee\x46\x4f\x85\x10\x2d\xa0\x13\xb2\xa2\x6a\x4c\xa6\x43\xcc\xd4\xaa\xcc\x4d\x80\x2b\x22\x0c\x01\x90\x3a\x31\x32\xf3\x7a\xa8\xb6\xb5\xaf\x48\xd3\x01\xba\x03\xad\xc5\x8a\xa7\x81\xd2\x52\xda\xd1\x90\xbf\xbf\x5b\x7f\x0a\x3c\xc0\x6e\x35\xec\x07\x40\x42\x46\xfb\x8b\xaa\x42\x44\xd4\x51\xdb\xf7\x09\xdb\xd3\xe4\x48\x08\x6d\x3a\x9d\x13\x3c\x2c\x0e\x23\x28\xf4\x60\x67\xa9\x75\x68\xf3\x44\x81\x25\x50\x9f\x1d\x5c\x2b\x94\x9d\x5b\xff\x81\xec\x30\x2f\xaa\xa7\xa5\xb1\x6c\xf0\xd9\x1c\xa8\x4d\x44\xd4\x0e\x1c\x97\xe7\xc0\x5f\xae\x6e\xee\x8f\xc8\x67\x89\x76\x2f\xc0\x95\x83\x5d\xc8\xb9\x44\x1c\x59\xea\x95\x71\xea\x76\xc2\xb0\x62\xb8\x67\x51\x50\x79\x31\x8d\x34\xb4\x4a\xbe\xfd\x18\x96\x58\x2d\x44\x1b\xbe\xeb\xfa\xd5\xdd\xce\xcf\x30\x66\x75\xd6\xee\x1c\x58\x5b\x7f\x05\xa3\xcd\xda\x25\x30\x5b\xe9\x4c\x48\x94\xba\x0b\xb3\x57\xa2\x77\x6c\x5c\x7f\x1f\x1d\xd5\xaa\x54\x99\x5a\xac\xff\x0c\x7c\xa1\x3b\xce\xf0\x29\xda\xdf\xbc\xe2\x34\x56\x15\xc8\x24\xc4\x53\x6d\x53\x42\x3a\x46\xf8\xe2\x0e\xf1\x0d\xa2\xfb\x5a\x72\xbf\x72\xdd\x92\xc5\x40\x1b\x69\xc3\x07\x8c\xa0\x18\x08\x12\x44\x37\x5b\x0c\x8c\xc6\x81\x65\x17\x3c\xb8\xb6\xf4\xaf\xd1\x25\x20\xe8\x96\x7b\x3b\x5a\x4b\x0b\xfd\x4f\xd4\x3d\xd9\x5d\x6b\xf0\xd6\x73\x8d\x26\xa5\x0e\xa1\xe2\x86\x1c\xe8\x9a\xbd\xfb\x8e\x1a\xf3\x75\xcb\xc2\x3b\x09\x99\x45\x25\x58\xb2\x54\x5a\x14\x74\xb6\xc9\xcb\x3e\x97\x15\x78\x49\xfc\x47\x29\x26\xdc\xe9\x1b\xa4\xcd\x07\xde\x6c\xc7\x19\xda\x32\x26\xcf\x32\x40\xba\x33\x14\x09\x28\x5e\xa1\xdc\xcb\xc8\x05\x7d\x50\x8d\xfb\xa0\xc5\xc3\x83\xfb\xd4\xa6\xa1\x46\x3d\x0e\xbb\x98\xbb\xa2\xd5\x78\x4d\x49\xcb\x2b\x30\xfc\xdf\x6d\xa3\x35\xb6\xd3\x42\x58\x1f\x24\xbb\x3f\xfa\xb7\xfb\x23\xbb\x46\x36\x49\x20\x17\xbc\x60\xf7\x47\x50\xc0\x93\x86\x64\x48\x06\xc8\xa7\x09\x88\x0c\x3c\x73\x4e\x4c\x39\x87\xf7\x46\xa8\x60\xe5\x00\x17\xa6\x45\xa1\x85\x45\x94\xcf\xb8\x76\xdc\xb6\x70\x69\x88\xc3\x61\x00\x60\x8f\x34\xbc\x04\x20\x12\xdd\x9a\x24\xaa\x30\x82\x0a\x9e\xb7\x36\xa4\xf1\x7e\x06\xd4\x78\x39\x42\x20\xf9\x01\x68\xce\x52\xad\x42\xd9\x21\x08\x1c\x6a\x53\x35\xc7\x5c\x7c\x2d\x6d\x5c\x78\x73\xb6\x42\xfe\x31\xda\x95\x0f\xdd\x1f\x85\xaf\xc1\xee\x94\xba\xaf\x39\x88\x16\x6f\x72\x46\x3a\x24\xf5\xa4\xd4\x1b\x82\x60\x0d\x8f\xce\xf9\x1c\xf8\x93\xcc\xe1\x09\x74\x16\x0a\xa2\x0f\xac\x93\xed\xab\xe2\x96\x27\x30\x70\x11\xe6\x90\x8d\x96\xe7\x75\x24\xac\x63\xb6\x26\xff\x12\x6d\x62\x93\x04\x4e\x75\xff\x09\xeb\x5e\xbf\x9a\xb3\x96\x13\xcc\xbb\x78\x0a\xc5\x88\xe6\x33\x7c\xe4\xed\x34\x16\x05\x49\xb4\x46\x4c\x82\xa4\x2d\xb8\x49\x50\x0e\xbe\x4d\xc5\x49\x17\xe6\xe0\xbe\x43\x2b\x84\xd9\x4b\xf3\x4d\xdc\xa2\xfb\x23\x36\x6b\x64\x86\xca\xf3\xb9\xb7\x05\xe0\xdd\x76\xcb\xec\x02\xd0\x8c\x38\x46\xce\x03\xa0\xb1\x60\x20\x76\xfb\x97\xf8\xe3\x72\x7f\x14\xee\x7b\xeb\x33\xce\xa4\x08\xb7\x99\x3c\x8c\xa1\xa8\xd4\x56\x34\x8f\xe5\x3c\xd0\x65\xad\x29\x84\x3c\xbf\xa0\xb3\x9d\x6c\x1b\xcc\x6b\xb2\x65\x5a\x74\x59\x2c\xc6\xae\x9d\x65\xcd\x20\x91\x3d\x1b\x48\x3d\xd4\xa0\x06\xbc\xbc\x31\x36\xba\x39\x84\x65\xea\x60\x66\xb6\x39\x85\x11\x60\x26\x48\xcb\x0a\xd7\xd9\xc3\xcf\xec\xe1\x07\x0e\x8d\x17\x91\x88\xfb\xd0\x0a\xd4\x16\x3e\x7a\x1f\xb5\xc6\x19\x77\x2a\x46\x18\x78\x29\xb0\xec\x2c\xd6\x32\xd8\x43\x20\x09\xbf\xbd\x27\xfc\x4c\xe4\xd5\xc1\x1d\x18\x90\xc6\x86\x77\x22\x26\x97\x75\x77\x64\x27\xc9\x6c\x9b\x83\x1e\x45\xd9\x98\x7f\x9e\x84\xdc\x2d\xd2\xe0\xf9\x36\xb1\x79\x1f\x0c\x73\xfa\xa6\x15\x0b\x77\x45\xce\x6c\xbf\x36\xb4\x09\x58\xec\xe0\xd3\xf4\x46\x54\x1a\x70\xe5\x76\x2e\x66\x73\xdb\xaa\x41\x64\xfb\x61\xa5\xeb\xc8\xa6\x7c\x45\x2a\xfc\x0c\x2c\xfc\x5c\xdf\x45\xf9\xb3\x47\xf5\x46\xed\xcc\x88\x29\x04\x43\xe0\x5c\x8c\xf3\x4e\x9b\x9e\x7d\x6f\x69\x04\x43\xf3\x35\x0e\x1a\xbd\x8d\xe2\xbd\x7c\x32\xd4\x58\x3c\xd5\xdf\x62\x90\xe7\xd3\x5c\xe3\x3f\x8a\xda\xfc\x6b\xc2\xae\xf2\x32\x93\x89\xac\x33\x8a\x51\xaa\x1c\x66\x82\x7d\xad\x8b\x3d\xbc\x09\xa4\xbc\x3f\xb9\x1e\x04\x3c\x3b\x36\x8d\x4f\xa1\x96\xf3\x09\x42\x55\x81\x6e\xbb\x14\x95\x8d\x9e\x50\x18\x55\x25\xfc\x43\x6b\xa8\x90\x05\xc3\x0d\xfc\x88\xf9\xdf\x1b\xea\x6b\xdc\x9a\xf3\x37\x58\x69\xaa\xe3\x2b\xf3\x85\x63\x6d\x84\x91\x9a\x99\x1b\x60\x6d\xc3\xfe\x00\x9c\xdd\x5c\x19\xb6\x95\xa2\xbe\xa0\xad\x43\xa4\x25\x14\xb4\xec\x30\x81\x48\x57\xd7\x46\xf8\xc3\x25\x7c\x01\x06\x04\x1e\xbc\xb8\x93\xfc\x17\xf7\xcc\xba\xc8\x97\x4d\xce\x8b\xb1\x59\x73\x90\x00\xc2\x38\x5c\x3f\x2b\x9b\x62\x4b\xab\x1b\xe4\x3d\x80\xe8\x3b\x58\xf5\x2a\x7a\x18\xfc\xf8\x06\x8a\x5b\xfd\xd2\x6e\xd0\xdd\x8b\x44\x95\x6e\x88\x74\xc9\xe8\xcb\x6e\xc0\xce\x0f\xe5\x51\x7f\x5a\xea\x49\x6d\x4b\x47\xdc\x74\xaa\xa6\xb4\xfd\x4f\x28\xf7\x53\xe1\xf3\x4e\x00\x03\x2c\x94\x19\x0b\x89\x8e\x33\xc1\x72\x59\x55\x60\x47\xe9\x0e\x07\x55\x15\xb9\x58\xd6\x50\x5b\xa1\x16\x8b\x8a\xdc\x3c\x53\x51\xb3\x60\x4f\xc0\x57\x8c\xd5\xc8\xcc\xbf\x09\x46\x09\x0f\xbb\x3d\x35\x84\x67\xd7\x54\xf8\x76\xad\xd8\xbd\x2d\x25\x85\x97\x71\xad\x1a\x17\x7d\x81\x18\x26\x3e\x54\x2d\xb2\x52\xd7\xfe\x21\xc2\x67\x2a\x6b\xc6\x1a\x43\xe5\xf4\xfe\x6c\xec\x22\x59\x57\xc7\xb3\x85\x9a\x5d\x81\x49\xed\x97\x0f\xc4\xf9\x40\x9c\xff\x48\xc4\x39\x8e\x74\x75\xa0\xd0\x07\x0a\xfd\x47\xa1\xd0\xd1\x13\x3c\x44\xa6\xd7\x3a\xa9\xb3\x8d\x3a\x0c\xb4\x70\x69\x08\x9c\x3d\x98\xbd\xca\x7c\x10\x37\x6d\x93\x0e\xe1\xb1\xa2\x49\xa1\x04\x64\x05\x97\xb4\x9f\x1c\xba\xb9\x3c\x2b\x20\x8a\x98\xd6\x6b\x8c\x06\x8f\x54\x37\xb3\x3d\xf7\x0f\xbe\x4d\xd1\xd9\xa1\x93\x7d\x62\xb4\xef\xce\x6f\xa6\x2a\x79\x10\xf5\xd9\x56\xe4\x94\x4e\xd3\x20\x56\x9b\x17\x8c\x80\xb8\x9d\x49\x57\x95\x82\x82\x48\x34\xbc\xf3\xac\x5c\x5b\xc3\x9e\x22\x31\x1d\xae\x42\xe5\x4f\x86\x7d\xd9\x1b\x41\x16\x58\x56\xab\x51\x0f\xde\xa3\x54\x29\xbb\x8a\x67\x89\xc5\x93\xe2\xf6\xc9\x0f\x0b\x6a\x71\xbc\x4e\x32\xd8\x1f\x21\x17\xe9\x8e\xcb\xcd\x70\xb3\x90\x6a\xab\x52\xca\x42\x81\xe6\x60\x3d\xac\x6b\x9e\x2c\xad\x37\x12\x49\xe7\xfd\x11\xc6\xce\xdd\x1f\x41\x48\x7f\x01\x70\x78\x96\xe2\x50\xb8\x45\xad\x32\x23\xa5\x20\xbd\x83\xde\xb6\xa5\x6f\x3f\x88\xf5\xd1\x88\x7a\xee\x1f\x2d\xfa\x3d\x22\xc1\xd9\x00\x73\x33\x01\x6c\xe5\x2b\xc2\x02\xc2\x47\x88\xd3\x49\x14\xb1\x35\x3a\x68\x66\x4d\xd3\x36\x2a\xd0\x50\xdd\x6b\x65\x16\x2b\x6d\x32\x31\x62\x37\xe0\xdc\xf1\xbf\x50\x08\xe9\xe5\x93\x48\x9a\x81\x94\x66\x88\x29\xd8\x3c\x5e\x1c\xe1\x83\x58\xf7\xcb\xd2\x60\x74\x75\x3c\x51\x52\xe6\xe2\x2c\x4d\x63\xd5\xd9\xee\xec\xa3\xae\xc1\x07\x5d\x48\x75\x50\xec\x17\xbf\xbd\xe2\x9a\x71\xf3\x02\x94\x43\x96\x1a\xa5\x00\x23\xb7\xd5\xa2\x00\x66\xe7\x26\x89\x6f\xe8\xbd\x8f\x7b\x0b\x9d\xc0\x0c\x70\x03\xd9\xf4\x8b\x82\xde\x90\x44\x55\x18\x97\x9e\x12\x6f\xae\xc3\x55\xdb\x9b\x5d\x6d\x80\x35\x80\x81\x0d\x5d\x1e\x3c\x2e\xdb\xe8\x2d\x11\x2e\xbc\x40\xee\x95\xee\x2d\xb2\x67\x4f\xc3\xcd\xc1\xb9\x78\x27\x97\x2d\x4c\x57\xc9\x32\x13\xec\xbe\x79\xfb\xf6\x9b\xe4\x41\xac\x47\xe8\x49\xa2\x7b\x67\x7e\x15\x41\xb9\x62\x17\x71\x80\xaa\x81\xaa\xe8\x45\xfb\x27\xbe\xb0\x5d\x77\x19\xba\x64\x97\x78\xad\xc2\xd0\x14\xbb\x0b\x74\xe3\xc0\x4b\x5e\x27\xcb\x09\xbb\x84\x10\x87\x5c\xf0\x82\x22\x21\xc0\xbd\x17\x36\xb6\xc9\xf5\x81\x2c\x6d\x41\x36\x83\xa4\x95\xcf\x71\xf9\xfe\x8c\x15\x6a\xeb\xf6\xcd\xb3\x65\x23\x6a\xbf\x65\x3e\x3e\x62\xf3\x84\x1e\xc4\xda\xba\x37\x85\xad\x7f\x4b\x7e\x39\xb7\x15\x96\x6d\x5c\x1a\x09\x4c\xff\x87\xad\xab\x97\xcf\x64\x81\x1f\xc3\xae\xed\x0a\x32\xe7\x37\xd4\xce\x39\x0a\x9f\x89\x57\x71\xc7\x8f\xc4\x98\x2e\x7d\xbe\x85\x90\xf6\x20\xd6\x6f\x34\xe1\x21\xa9\x02\xea\x53\xdb\x9a\xc3\x58\x39\xd8\xfa\xe7\xf0\x65\xeb\xa1\x33\x03\xc7\x30\xe8\xdf\x1a\x9e\xb5\x9d\x7b\xf4\x13\x35\x32\xf3\x6f\xd5\x72\x5c\xc9\x2c\x4d\x38\x65\x45\x90\x3b\x54\x2b\x9b\x1e\x66\xae\x4b\xc2\x0b\x4f\x8f\xdd\xd2\x92\x97\x20\x08\x69\x36\x27\x6f\xa1\xaa\xd8\xa5\x1f\x1d\xf9\xbd\x1b\xc4\xf7\xba\xeb\x36\xe9\x92\xc8\x52\x54\x52\x61\xc5\x66\x00\xb9\x6a\x1f\x89\x63\xa4\x9c\x76\x37\xd5\xdc\x1e\x7d\x77\x0e\x47\x01\xaa\x59\x1d\x4b\xb6\x3e\x09\xee\x7e\xc0\x78\x7e\x70\x55\xb9\x47\x14\x35\x0d\x9a\xa6\xa8\x6d\x38\x8f\x3d\x20\x5d\x9e\x65\xd6\x54\x3c\x8a\x8a\x1d\x13\x5b\x13\x8f\x32\xa9\x4f\x26\xec\xff\x15\x95\x82\xfd\x2a\xc4\x02\x91\xaf\x3a\x4a\x6a\x4d\x51\xb2\x5c\xb3\xb7\xec\x18\x5e\x63\x32\xcf\x45\x2a\x79\x2d\xb2\xf5\x49\x07\xc3\x61\x37\x34\xae\x8d\x92\x70\xeb\xda\x21\x6d\xef\x2c\xb0\x23\x7f\xca\xdd\x28\x77\x87\x20\xce\xc8\x1c\xb0\x56\x4d\x2e\x97\x94\x6e\xaf\x9c\x5b\xfe\xff\x6d\x76\x89\xb3\x4a\x2c\xe0\xe8\xe0\x39\x79\x61\x76\xa4\x8d\xaf\x98\x92\x3f\xf7\x03\x9f\x89\x8c\xd8\x79\x2e\x36\x0b\x57\x67\xde\x47\xef\xdc\xc1\x95\x7f\x95\x52\x85\x5b\xc5\x69\xec\x72\x2c\xe4\xa3\x28\x30\x80\x83\xc2\x0b\x30\x2e\x9b\x67\xe5\x92\xbb\xe0\x65\x97\x56\x02\x49\x81\x56\x90\x9d\x37\x9d\x90\xe0\x0d\x82\x17\x9e\x90\xbe\xe0\x15\x25\xa4\x10\x88\x6a\x63\x4a\x3c\x05\x75\x33\x08\xe8\xe7\xa0\xce\x14\xb9\xa2\x67\x05\x83\xe0\x04\xf0\x47\x05\x89\xd3\x7a\xc2\x3e\x15\x76\xdb\x3b\x28\x2b\x38\x0c\xab\x0e\x66\x80\xff\x38\x61\x97\x3c\x59\x62\xf5\x44\xb0\x26\x51\x79\x65\xcd\x3e\xdd\xee\x17\x0a\xf1\x92\x03\x72\x27\xaa\x7c\xdf\x43\x51\x8b\x2a\xef\xd2\x25\xaa\x6b\xaf\xe6\x34\xd7\xdf\x1a\x51\x49\xb3\x26\x67\xcc\x0c\xc6\xc5\x82\x0c\x75\x67\x4f\x52\xa1\x2c\x46\x31\x0a\x9f\xc1\x01\xb4\xee\xd1\x1c\x08\xfe\xd9\xf5\x05\xc9\x83\x14\xc6\x0c\xa7\x13\xc2\x49\x4d\xbb\x79\x53\x24\xa8\xd1\xc9\x7a\x6d\x48\xc8\xb5\x4a\x45\x38\xe9\x57\x3c\xa7\xed\xb3\x08\x33\x81\x7b\x77\xf9\x64\x96\x48\xc7\x8b\x0d\x9e\xf5\x03\xba\x62\xb7\x0e\x0a\x63\xc0\x92\xea\xd7\x28\x00\xbf\x95\x3e\xc4\x4e\x53\xd4\x96\xb2\xb5\xa7\x41\x31\x95\xde\x83\xac\xb0\x73\x17\x0c\xb4\x51\x68\x1d\x78\x27\xb0\xd4\x41\x98\x8f\xa2\x74\x37\x2f\x6b\x82\x52\xc5\x73\x45\x32\x28\xd2\x29\xbb\xe0\xdb\x68\x4e\xce\x9f\xa6\x0f\x62\x75\xd4\x0a\xde\x3b\x1a\x1d\xad\x96\xa2\xf8\xb9\xd0\xbc\x96\x7a\x2e\xf9\x2c\x8b\xd8\x6c\x60\xc7\xa6\x83\x61\xbb\x1f\xc2\xc7\x0e\x0f\xa5\x56\x6c\x2e\x8b\xce\xe8\x27\x18\x58\xdc\x8a\x30\x93\x0e\xc5\xcb\xd1\xb2\xca\xa8\x21\x58\x7d\xa1\x56\x3e\xc0\x07\x23\xaf\xc9\xee\x30\xc7\xe5\xc0\xf3\x2c\xab\x9e\xde\x42\xc7\x30\x55\x39\x97\xc5\xcb\x34\xa8\xd6\x04\x01\xc9\x8e\xd6\xb2\x5f\x04\x08\x1f\x74\x92\xf4\x53\xb1\xa8\x04\x58\x60\x82\xa2\x67\x36\xba\xad\x10\x8f\xc2\x28\x80\xa9\xd4\x94\xca\x0f\x84\xe0\x8d\x26\x3d\xe3\x49\xe6\x4d\x6e\x24\x25\x82\x81\x49\xe5\xdc\xe6\xa0\xcd\x44\xbd\x12\x64\x8b\xf5\xcb\xd2\x3e\x2e\x12\xcd\x05\xf5\x4a\x75\xd7\x84\xe4\xbd\xf6\x29\x02\x2f\x48\x07\x7e\x01\xac\xd2\xdf\x8c\xff\xa6\x0a\x17\x9c\x33\x62\x76\xa6\x3e\x21\xef\x1d\xa1\x3e\xb8\x58\x6d\x17\x4c\xd9\x3a\x3f\xf6\x54\x73\xcd\xde\x9d\xbe\x3b\x7d\xfb\x3d\xfb\x3f\xcc\x74\xfd\x8e\xfe\xfb\x35\xfd\xf7\x1b\xf6\x7f\xd8\xff\x61\x8c\xdd\x30\xd6\xfa\x2f\x83\xff\x8e\x99\x9c\x87\x63\x78\x67\x86\x99\xa8\x9c\xe6\x0d\x22\x2e\xe8\xd5\x86\x47\x91\x0e\x03\x87\x09\xbb\x06\xe6\x95\xa8\x5c\xc0\x18\xde\xfd\x87\x6d\x83\xf1\xdd\x4c\x15\xd4\xf2\xdd\x31\x0c\xe9\x84\xad\x40\xf0\xc9\xf9\x03\x1e\xc2\xb3\xa4\x6e\x78\x66\x3e\x7e\xfc\xf5\xf8\xed\x09\x53\x45\xbb\xf9\xa3\x54\x99\x11\x1c\x69\x84\xc7\xef\x4e\x26\xbd\x21\x7f\x1d\x19\x72\x6b\xb4\x30\x0a\xb3\x79\x7f\x83\x18\x65\x38\x13\xdc\xe5\xf7\xdb\x8c\xaa\x8b\x6e\xe6\xc0\x3b\xd8\x86\xb7\x56\xaa\x25\x45\x6f\xc7\x4c\xc9\x90\x36\x0c\x52\xae\x40\xa9\x33\xc2\x88\x9a\xa3\x19\x8b\x08\x3b\x30\x27\xba\xe3\x18\x4d\x4f\xf7\xdb\xa7\xad\x9b\xb7\x00\xd2\x21\xc5\x1a\x47\x59\xa8\x86\x5a\x04\x38\xe7\x30\x0b\x4b\xc5\x38\x6a\xc7\x7e\xf5\x2d\x11\x5f\xcd\x6b\xee\xd8\x1b\xe9\xec\x10\x62\x77\x7f\x34\x6b\x92\x07\x51\x5b\x94\x2c\x23\xa5\xd4\x8a\x95\x4d\xcd\x5c\x92\x71\x8f\xb0\xd4\x0a\x3b\xc6\x57\x87\x36\x20\x26\x6d\xf5\x69\x6a\xac\xe6\x7b\xbb\x49\xa0\xeb\x13\xf9\x4f\x05\xa7\x45\x43\xb5\xcd\x57\xee\x2e\xde\xd4\x0c\x5f\x25\xa5\x01\xaf\x94\x0f\x46\x35\xa7\xed\x42\x5d\xab\xda\xe9\xef\xc7\xa4\xf0\x9c\xb0\x5a\x64\x99\x75\x06\xe1\xc3\x8a\x2c\x74\xee\x07\xf3\x9d\x31\xb3\xef\x9e\x15\xeb\x15\x5f\x47\xdf\x83\x1a\xe3\x00\x79\x1c\xbc\x09\xeb\x14\xec\x22\xd7\xec\xfe\xa8\x35\x57\x74\xb5\x00\x2a\xb5\xb9\xa3\x72\xce\xca\x8c\x27\xe8\x88\x0c\x6e\x04\x99\x3a\x1d\x6d\xa2\x5b\x65\xba\xa3\x7b\x74\x7f\xf4\x7b\xd1\xaa\x6f\x0c\x9d\xd8\x4c\xab\x6e\xe0\x7f\x7d\x9a\x75\x35\x67\x91\xdd\x76\x63\x69\xed\xd3\x3e\x64\xec\x6b\xa0\x36\xdf\x9c\x04\xd4\xec\x9b\xd3\xaf\x4f\xdf\x1d\x9b\xb1\x7e\x7d\x62\x46\xdd\xa2\x53\xef\x1c\x9d\x72\x6f\xd2\x88\x84\x6e\x51\xaa\xab\x02\x15\x3b\xb6\x52\x55\xaa\x5b\x99\xc1\x30\x22\xdc\x72\x73\x33\x5d\x8a\x3e\xa5\xce\xbb\x83\xb1\x52\xe6\x8c\x02\xbd\x94\x35\xfb\xb7\x5c\x55\xe2\xdf\x82\xe6\xbb\x5f\xa6\x67\x5b\x17\xdb\x4c\x7b\x48\x7e\x5b\x97\x22\x8d\x3a\xd2\x36\x09\x70\x43\x2f\xf9\xe0\x3b\x51\x40\x32\x66\x08\xae\x5a\x2b\x96\x89\x1a\xfc\x8b\x94\xdb\x0c\xda\xb8\xe9\xcb\x43\x60\xa4\xbe\x10\xad\xb6\xae\xcb\x76\x89\xac\xad\xaa\xa5\x2c\xd2\x23\x02\xf7\x8c\x81\x52\xff\x58\xa9\xa6\x8c\x22\x91\xc1\x13\x4b\xd7\x17\xf0\x87\x4d\x64\x73\x78\x59\x33\x61\x4e\xa6\x1f\x2e\xd8\x0d\xc2\x77\x23\xd0\x79\xde\x71\x0c\x18\x5d\x1d\xcf\x8f\xd9\x09\x70\xfe\xc3\x17\xf1\x36\x9b\x4b\xaf\x6c\x0e\x7e\x95\x8e\x4b\x0e\xbe\xbc\x75\x29\xf4\xa8\xf5\x35\x87\x75\xb3\x3f\x4e\x98\x5d\x7c\xac\x50\x36\x30\xbd\xdd\x61\x53\xc3\xa0\x00\xeb\x0f\xdb\xa3\xdb\x7d\x94\x5e\xf4\x78\x6f\x3a\xa0\xbf\xd8\x08\x9a\xc0\x0e\x89\x70\x88\xe4\xf1\x07\x2a\xe9\x3c\x48\x24\x89\x86\xd5\xcb\xcc\x0e\x78\x84\x44\x5f\x01\x6d\xdb\xe9\x1b\x38\x76\x2b\x7d\x89\x88\x5b\x3f\x64\x2a\x79\x98\xd6\xaa\x8a\xd5\x4e\xf8\x75\xda\x6b\xd5\x9a\x43\xc1\xce\x7e\x9d\xb2\x0b\xa9\x1f\x42\x00\x37\xde\x73\x9a\x71\x8b\xc6\xff\x46\x63\xf8\x0e\x51\x09\x1b\x8d\x5f\xb8\xd4\x5d\xef\xfb\xdc\x3f\xd6\x1c\x1d\xfa\xa7\xb8\xa2\xfa\x2b\xbe\xd2\x84\x2a\x36\x33\xa3\xd7\x30\xc7\xdd\xc3\x51\x62\x93\x6f\x85\x54\xfd\x7d\x74\xc4\xff\xd6\x54\xc2\x4c\x3f\xb2\x76\xf6\x51\x77\xc1\xcc\xef\xec\x82\xd7\x1c\xd7\x0d\x71\xf8\xc9\x2b\x0b\x6b\x63\xd6\x64\x06\xf7\x92\x4a\x1a\x84\x5b\xbd\xf3\xe8\xed\xe7\xa3\x43\x7e\x2f\x63\x02\xd0\x99\x7d\x14\x1d\x32\x3c\xb0\x59\x2e\x9f\x73\xd4\xe6\x43\xdd\x51\x27\xa2\x5c\xce\x23\x56\x8e\x73\x51\x2e\xdf\x4f\xdb\xf7\xca\xfc\xc6\xde\x4f\x23\x63\x84\xa3\xa9\x97\xbc\xa2\x4c\x8c\xf4\x8d\x66\x99\x9c\x8b\x5a\xe6\xfb\x9c\x0c\xfc\x68\x6f\x88\xb2\x48\x63\xc1\xf9\xe7\xf0\x7b\x7b\x88\xd8\xd6\xde\x7d\x77\x53\xb8\x5d\x3e\x0c\x47\xa0\x3b\xd3\xbe\x32\xd1\x6b\x41\xc2\x96\xb6\x20\x85\x50\x38\x7c\x8c\x5f\x19\x97\xe9\xe9\xed\xe5\xd9\xc5\xc7\xcb\x49\x9e\xee\x33\x4b\x78\xbb\x37\x4b\x08\x11\xff\xc8\x23\x0c\xeb\xdc\x3e\xea\xcc\xd5\xfd\x4c\xcb\x0f\x7a\x5b\x49\xd5\x76\x51\xfb\xc0\x85\xd8\x67\x70\xb6\xd3\xde\xf8\xb4\x8c\x8c\x6c\x7a\xc5\x8e\xcf\x1d\xf1\xa4\xc8\x1f\x76\x55\xd4\xa2\x9a\xf3\x44\x9c\x84\x23\x26\x32\xe2\xe8\xd8\x92\x17\x69\x66\x69\xb0\xcf\xac\x31\x7d\xa6\x95\x04\xcf\xc3\x59\x68\xde\x3b\xd9\x2b\x60\x7f\x7a\xd5\x9d\x41\xaa\x56\xc5\x8a\x57\xe9\xd9\xcd\x55\x24\xc6\xd0\x3f\x0c\xc7\x6c\xdf\x01\xb6\xcd\x67\xaa\xf1\x65\x44\x5f\x71\xd1\x83\x8f\x77\x07\x0d\xb6\xd7\x0b\x19\x39\xfe\x97\xf4\xa4\x7d\x28\x6a\x91\x97\xaa\xe2\xd5\x9a\xa5\xb2\x02\x79\x70\xbd\xf1\x76\xbe\x98\x19\xc0\x00\x53\x59\xed\x31\x5d\x3b\xf2\xee\x5c\xe7\x91\x3a\xda\xef\xcf\xdb\xf3\x7b\x2f\x67\x95\x60\xe7\x4b\x5e\x14\x22\xfb\x0c\xbc\x71\x8f\x69\xbc\x3f\xef\x4d\x20\x13\x4f\x5e\x64\xe9\x4c\xc4\x3d\x6b\x4f\x68\x21\x0a\x51\xc9\xa4\x1b\x0a\xec\x66\x04\x46\x72\x84\xc8\x3d\x75\xb3\x43\xe7\x3c\xdc\x1a\x91\x50\x98\x15\x16\xf5\xd9\x6b\x02\x6e\x48\xe1\x14\x54\xf2\x10\xa3\xb6\xef\xf1\x41\x67\x37\xe8\xc7\x2e\xbd\xdd\xb0\xfa\x64\xbe\x0f\xf0\x70\xcc\xd2\xdb\x8e\x08\x1e\xc9\x25\xdb\x92\x38\x89\xa5\x30\xf7\x9a\x1a\xf4\xd7\x9d\xdd\x22\x11\x3e\xc7\x26\x2e\x5e\xfc\x78\x7e\xd9\x6e\xd2\x9e\xf1\x8f\xe7\x97\x5f\xaa\x58\xb6\x48\x84\x0f\x2d\x4f\xcd\xe4\x76\x5f\xaf\xde\xac\x7b\x2b\x27\xeb\x5b\x51\xaa\xc8\x7a\xe1\x83\xce\xa1\x96\x80\x31\xac\xb4\x04\x02\x84\xde\x78\xef\x6c\xaf\x04\x1e\xe9\x09\xbb\xb8\xbc\xb9\xbd\x3c\x3f\xbb\xbb\xbc\xf8\x9e\xd9\x9e\xf0\x74\x54\x22\x21\x00\x23\xe5\xef\x00\x72\x3d\xe2\x36\x64\x2e\xb2\xdf\x1a\x91\x5c\xc2\x0b\xe6\x48\xa3\x44\xb3\x22\xbb\x2a\x64\xed\xd9\x14\x65\x6b\x2b\x8b\x41\x6d\xde\xa6\x2b\xb5\x90\x98\xed\x5d\x58\x69\x6b\x29\x3a\xbd\xf9\x60\x60\x1f\xe9\xb7\xcf\x42\xe3\x24\x7b\xcb\x8b\x26\x87\x98\x24\xf6\xa3\x7d\xd4\x39\x88\xee\xe7\xfd\xc4\xb1\x9d\xc4\x1c\x3a\x52\xa7\x6e\x58\xcf\x12\x74\xdc\x10\xbb\xb3\x35\x83\xbc\x89\xc2\x31\xff\x44\x4f\xba\xa5\xf7\x28\xc4\xd8\x6c\x11\x14\xd3\x52\x55\xc0\xdf\xc2\xa9\xdb\x8b\x66\x6f\x25\xb6\xca\xd6\xdd\x0b\x17\x84\x69\x5a\x77\x22\x50\x62\x00\x57\x00\xa7\x0e\x20\xcf\x60\xba\x04\x5f\xa0\x17\x93\xca\xe9\xb1\xb2\x92\x8f\x32\x13\x88\x8f\x2b\x8b\x45\x80\x94\x14\x14\xf4\xd5\x42\xf4\xc6\x65\x56\x5f\xd7\xfe\xeb\x14\x34\x71\xfd\xe9\x8e\x15\x02\xbb\xdb\xb9\x5c\xe8\x20\x21\x30\x1f\x04\xb4\xeb\xdd\xb7\xca\xae\x7b\x77\xa7\xa4\x8e\xca\x7d\x57\x53\x23\xa5\xb5\x95\x19\xfc\xed\x77\xa4\x8d\x43\x87\x16\xc6\xfc\xac\x03\x0b\x53\xe8\x2e\x41\xdc\x08\x82\xad\x28\x25\x20\xcc\xb2\x71\xb5\x61\x60\x3e\xed\x84\x87\xe7\x52\x7a\xf5\x68\xd8\xa1\x58\x9d\x52\xa6\xf7\xd8\xf4\x37\x26\x77\x3b\x22\x80\x9f\x7e\x05\xff\x89\x5a\x71\x62\x54\xe5\xba\xa3\xdc\x15\xec\x7a\x6f\xcd\xee\xa5\xe7\xd4\x0c\x6c\xf7\xcd\xb9\xee\x6b\x86\x65\x27\x5f\xf6\x3c\xe3\x32\x8f\x60\xbc\xc7\x9a\x85\x7d\xb5\xa9\x4d\x00\xd2\x6b\x4e\x6b\xf4\xed\x78\x4d\xff\x67\xdf\x5c\x3f\x91\xb1\x5d\x1c\xff\x13\xfe\x92\x98\xcf\xee\xb3\x5e\x5b\x67\x0d\x2b\xb8\x54\xb5\x2a\xb6\xc9\x44\x37\x91\x56\xed\x35\xc3\x16\xe7\x0e\xdc\x32\x4c\x72\x33\xa2\xc8\x7e\xaa\xf8\x3e\xb3\x8c\x0c\xad\x37\x49\x55\xd5\x2b\x55\x0d\x8a\xe6\x37\xad\xe7\x1d\xd6\x43\xcf\x9e\x65\x52\xd8\x67\x1e\xad\x31\x04\x63\xb7\x55\x67\x23\x44\xb8\x16\x39\x95\x8a\xca\x32\x73\x20\x55\xe1\xf5\x07\x6d\x4b\xcc\x8f\xc8\x4e\x90\xf3\x92\x6a\x15\x84\x3a\xed\x3e\x23\xb4\x23\xe9\x0e\xf1\xb7\x46\xcd\xd6\x75\x64\x5d\xff\x82\x0f\xda\x0b\x6a\x7f\xfc\x6c\x46\x24\xfa\x40\x77\x94\xd5\x2c\xb2\x84\xb7\x3f\x5c\xb4\x47\x77\xcb\x53\xa5\x19\xd8\x25\xd9\x85\x18\xb0\xc8\xbd\x9a\x78\x55\xcd\x9e\x67\x41\xba\xfd\xe1\xa2\x3b\x3d\x9d\xf0\x4c\x5c\x7d\x8a\x24\x3b\xe1\x83\xf6\x34\xed\x8f\xfd\x54\xd4\xa1\xf3\x1d\x26\xb4\xa9\x54\xec\x12\xa7\xef\xa1\xb5\xf0\x6b\xbd\x21\xc3\x01\x1d\x4a\xb0\x6c\x0f\xd8\x26\x57\x6e\xb1\xb9\xbc\x58\x74\xa2\x31\xed\x03\x1b\x66\x5e\xe8\x4d\x0d\xbb\x55\x11\xc6\xeb\xb3\xe3\xaa\x78\x7a\xf0\xe7\xdc\x88\x68\x06\xf3\xdf\x47\x47\x8f\xba\x5c\x0a\x6b\x85\x8f\x08\x3b\xe1\xe3\xf6\xb8\x1f\xa7\xf0\xe8\x73\x93\x47\x3b\x02\xc4\x1e\xea\x13\xf9\x1d\x63\xdf\xb6\xba\x1e\xa2\x5e\xa8\xb8\xc9\x7f\xb8\x69\xcf\xce\x1e\x6d\xda\x15\x35\xe3\x8d\xfa\x16\xf1\x78\xbb\xbe\x4d\x39\xde\x2e\x6a\xde\x8d\x36\x1d\x32\x4a\x46\x1b\x47\x4d\x7a\xd1\x96\x1d\xab\x59\xbc\x4d\xd7\x30\x35\xd0\xaa\x6f\xe3\x89\x36\xdc\x6c\xdc\x88\xbf\x12\x51\xd3\xe3\x0d\xa3\x3a\x6e\xb4\x69\x54\xc7\x8a\xb6\xec\xeb\x21\xd1\x66\x5d\x89\x38\xda\x68\xbb\x18\x18\x7f\x6d\x9b\x5c\x15\x7f\x2b\x26\xc5\xc4\x5b\x46\xa5\x89\x68\xd3\x18\x43\x8f\x36\xec\xb2\xc5\x78\x7a\x70\x84\x19\x0d\x40\x23\xf5\x28\xfb\x1e\xb0\x10\x71\x77\xf6\x66\x2a\x36\x10\xb8\x81\x6d\x50\x1a\xd9\xe4\x0a\x7f\x0c\xda\x85\xe9\xb8\x2c\xe7\x25\x24\x9f\x43\x0c\x64\xc5\x57\x0c\xdc\xb6\x2c\x15\x84\x11\x4f\xc9\xf8\x2d\x7b\xd6\x0e\x59\xcf\xf8\x3e\xd8\x71\x7a\x6e\xf0\xe0\x59\x6f\x9c\xfe\x59\xab\x8e\x3a\x85\x81\x58\xe4\xc5\xb6\xb5\x0e\x43\x4b\x5b\x98\xf6\x66\x56\x60\x24\xd8\xa3\xe2\x6b\xe1\x32\x6d\x7d\x88\x7f\xe1\xf3\xb1\x37\x69\x7a\xa5\x7a\x95\x58\x06\x00\x9d\xd8\x1e\xd0\x00\xcd\xda\x9b\x68\x7e\x71\xbb\xf8\x4b\x0b\xce\x60\xff\xbd\x83\xde\xe2\x5b\xe7\x1f\xc5\x8b\xa5\x05\xb6\x0c\xbf\x49\xad\xdc\x4f\x92\x05\x7c\x06\x0d\x09\x02\x13\x86\x76\x92\x42\x39\x0b\x18\x7b\xf3\xfd\x9b\xe8\xfe\xe1\x28\x08\xb7\x39\x5a\x50\xb0\xdb\xa2\x8b\x1d\x09\xcf\x09\x84\xd0\xe2\x3f\xa7\xbe\xac\x1d\x4a\xf2\x2a\x9c\x03\x01\x18\x52\x3c\x18\x5f\x33\x5e\xa9\xa6\x48\x29\xa1\xd0\xa5\x4d\x7d\xec\x7c\xf8\x9a\x30\xde\x10\x0a\xa2\x5d\x59\x61\x26\x6a\x6e\x4e\xd0\xbb\xc9\xbb\xb7\x7b\x55\x26\xee\x17\xfc\xf5\xb8\x01\xb8\xf9\x7b\x82\xa8\x7c\x24\x61\xcc\xb4\x18\xdb\x50\x44\x04\x05\x87\x9f\x00\x4c\x25\x48\x72\x3a\x46\xa4\x15\x55\x85\xc0\x2d\x27\xed\xec\x3c\x04\xee\x8e\x03\xa8\x34\xb3\xdd\xce\x10\x1d\x16\xd8\x17\x7f\x84\xdc\xae\xbc\xd1\x1b\x8e\x53\x38\x96\xfb\xa3\xfb\x23\x76\xfc\x68\xcd\x72\x95\x52\xf5\x49\x74\x89\x68\x64\x97\x4f\x65\xcc\xa9\xfa\x54\xf2\x22\x15\x29\x92\xa4\x57\x1a\xe6\x0f\x62\xc9\x1f\x8d\x46\x2e\x73\x99\xf1\x2a\x83\x78\xdc\x29\x0e\x03\x62\x09\x45\xf1\x28\x2b\x05\x75\x2d\xd8\x23\xaf\x30\x6a\xd2\x99\xa1\x34\xfb\xbf\x8f\x7f\x39\xbb\x05\x34\x80\x13\x0b\xc7\x8f\xa3\xf4\x49\xba\xe1\x48\x82\xee\x76\x58\x23\x3b\x12\xb3\x20\x70\x07\xec\xc8\xcc\x97\xf2\xa6\xc6\xaa\x74\xe2\x29\xc9\x1a\x2d\x1f\x63\xc7\x6e\x7f\x2a\x78\xad\x52\x11\xa2\x67\x6f\x26\x86\x61\x6b\x87\xda\x11\xa2\xd1\x02\x8b\xc8\x64\x2e\x0d\x15\xe2\x35\xd5\x38\x0b\xf4\x42\x1b\x70\xee\xe2\xbe\xcc\x3e\x6e\xcf\x08\xf2\x84\x73\x28\xd1\x3e\x4c\x64\xe1\x15\x96\x09\xea\x0f\xcd\xc6\x01\xe6\x62\x2f\x04\xc8\x30\xf3\x69\x67\x15\xa7\xf5\xd2\x46\x89\x82\x44\xb0\x2d\x79\xe7\xbe\x55\x2b\x82\xce\xd9\xa5\x18\xcf\x14\x14\x1e\xab\x97\x44\x39\x3d\xae\x14\x2d\x7e\x07\x72\x74\x08\xf0\x71\x38\x00\x26\x8c\x2d\xf5\x41\x18\x3e\xfe\x25\xe5\x35\x27\x9c\x7f\xea\x7a\xef\x70\x97\x60\x31\xb6\x85\x8a\xc4\x47\x13\xbc\xf2\x82\xf1\x04\x4a\x57\x7b\x44\x43\xc6\x92\xf8\x60\xc8\x5c\xf2\xfc\x71\xa0\xf0\xdb\x1d\x02\x16\xde\x4f\x20\x5f\xe9\x4e\x3d\x88\x08\x57\x1e\x1a\x4f\xef\xd5\x17\x0d\xae\xd7\x5b\x38\xd2\x5d\xb1\x39\x23\x5b\xbf\x4d\x11\xde\xd6\xb4\xb7\x6c\x9b\x60\x6f\x07\xc6\xbf\xf1\xce\xee\x05\x3a\x07\x2b\x8f\x0e\x0e\x90\x1b\xec\x75\x74\xd8\x70\x80\x8b\x66\xa4\x17\x35\x87\x52\x0f\xb9\xc8\x67\xb6\x14\x70\x0b\xb1\x7d\x7b\xe5\xe7\x43\xd8\xeb\x21\xec\xf5\x10\xf6\x7a\x08\x7b\x3d\x84\xbd\x1e\xc2\x5e\x0f\x61\xaf\x87\xb0\xd7\x43\xd8\xeb\x21\xec\xf5\x10\xf6\x7a\x08\x7b\x3d\x84\xbd\x1e\xc2\x5e\x0f\x61\xaf\x7f\xc4\xb0\xd7\x43\xd4\xe8\x21\x6a\xf4\x10\x35\x7a\x88\x1a\x3d\x44\x8d\x1e\xa2\x46\x0f\x51\xa3\x87\xa8\xd1\x43\xd4\xe8\x21\x6a\xf4\x10\x35\x7a\x88\x1a\x3d\x44\x8d\xfe\x31\xa2\x46\x37\xbf\xb5\x6b\xd9\xb2\x0e\xa5\xde\x54\xa9\x2c\x0c\x33\xc4\xe6\xf1\x00\xc3\x7f\xe2\x1a\x66\xc4\xc1\xb1\x74\xfa\xd5\xc5\x20\x1f\x67\xd8\x82\xfd\x00\x26\xec\x8f\xbc\xe0\x0b\x84\xea\x3e\x9e\xde\xfc\xf0\xf1\x84\x95\x95\x02\x7b\xcf\xd5\x05\xe3\x5a\xab\x44\x42\xec\xa2\x43\xef\x9b\x86\x9f\x81\xf2\xd3\x5b\x07\x13\xaf\xf2\xb5\xe7\x70\x8a\xa1\x4f\x05\xdb\x1d\x0f\xf8\x43\x8b\x08\x40\x60\x42\xb0\x54\xe7\x58\x3d\xe6\xe9\xc3\xcb\xe2\xca\x7e\x15\x50\x35\x2b\xbd\x51\xa9\x0d\x15\xdb\x86\x90\x7d\xb7\x14\x6c\x05\xaf\x21\x3c\x6c\x96\xd9\xe0\x63\xc4\xb4\x4e\xd9\x40\xa7\x18\xde\x89\xa1\xa5\x50\xdd\xc4\x48\xc4\x63\x2c\x6f\x43\x48\xc0\xd0\x8b\x39\x8a\x58\xb6\xdf\x9c\x26\xf3\xfc\x58\x9f\x6c\xb9\x38\x38\xa0\x23\xa3\x7e\xb6\x27\xd2\xbb\x46\xdd\x06\x1b\x8a\xc1\x9c\x81\xe7\xce\xd6\xbd\x05\xdc\xee\x51\xf4\x60\xb5\x81\x85\x71\x2c\xfb\x88\x8a\xdd\xd5\xff\xfb\xc8\x4e\xa8\x37\x3a\xfc\xbd\x37\x0a\x87\xe8\xdb\x1f\x4e\x67\xc2\xa3\x4e\x41\xa5\xf1\xbb\xb7\x6f\x77\x42\x7e\xdd\x51\xea\xeb\xce\x65\x80\xce\xfe\x2a\x8b\x54\xad\xf4\x54\x24\x4d\x85\x05\x91\x6b\xf1\x54\x63\x55\xaa\x8d\x35\xad\x37\xbe\xe8\xe2\xa3\xa9\xd5\x98\xe8\x4e\xe2\xab\xdb\x63\x61\x72\x57\x44\x70\x6b\x88\xce\x22\xd7\xfc\xdc\xbd\x30\x2d\x45\xc4\xed\xf8\xe3\xc7\xe9\x59\xbb\x0d\x93\x9a\xad\xe0\xaa\x9a\xa5\x36\xcf\x19\x4f\x73\x89\x95\x94\x57\x62\xb6\x54\xea\x81\x1d\x5b\xa5\x69\x21\xeb\x65\x33\x9b\x24\x2a\x0f\xf4\xa7\xb1\x96\x0b\x7d\xba\xa2\x89\x98\x61\x9c\x30\x59\x64\xd2\xfa\x21\xcc\x54\x03\x94\x78\xfc\x88\x9f\x1a\x84\x21\x11\xa6\x1f\x11\xf9\xfe\x30\x21\x38\x7a\x18\xa4\xb6\x3f\xf7\x38\x3d\x1c\xe8\xb8\x03\x76\x38\x38\x48\xac\xfd\x18\x0f\xcc\x6e\x8a\x33\xfd\xb3\x16\x55\xfc\xc3\x86\x16\xd9\xa7\xcc\x6f\xbb\xe9\xb1\x6a\xf0\x98\x43\xbd\x01\xa8\x9a\xdf\xcf\x91\x28\x2b\x95\x08\xad\xdb\xd1\xbe\xa6\x49\xa3\x45\x15\xa0\x52\xca\x82\xc9\xdc\x10\xfc\x5c\xd4\x1c\x02\xf0\x3a\x4c\x8d\x7d\xe4\x6b\xc6\x33\x6d\xeb\xdf\x99\x37\x6e\x54\xda\x39\xa4\x00\x85\x49\x4f\x67\xaa\x5e\xb2\xce\x73\x38\x9c\xfd\xd7\x5a\xe5\x35\xc2\x31\x75\x5f\xaf\xf9\x83\x80\x9a\xe9\x89\x59\xdf\x68\x75\xc8\x5d\x78\x43\x2a\x75\xa2\x1e\x45\xb5\x3e\x7d\x7c\x07\x85\x02\xde\x4d\x2e\x8b\x14\x96\x70\xd3\xc5\xb4\x6d\x3a\xb6\x04\x59\x2c\x32\xc1\x32\xb5\x00\x10\xe7\xfb\xa3\x19\x4f\x1e\x44\x91\x1a\xc1\x20\x2f\x33\xe0\x97\x54\xe2\x6e\xb8\xf6\x7c\x48\xe9\x79\x9a\x56\x42\xeb\x58\x55\x0c\xff\xa8\x37\x38\xf7\x08\x0f\x81\xd4\x4c\xd0\x70\xb1\xec\x42\xfb\x32\xb9\x54\x04\x0e\xf6\x8d\x5a\x54\x65\x25\x20\x68\x37\x49\x54\x15\x56\xbd\x6a\x93\x5a\xbb\x04\xd3\x4c\x26\xc0\xe3\xcc\x37\x8d\xd4\x66\x91\xb8\xcf\x55\xa1\x9b\x1c\x62\x05\x8d\x6c\x86\x31\x2d\x0e\xaf\xbd\xc6\x90\x5f\xe0\xaa\x6e\xbc\x41\xce\x88\xd9\x63\x3c\xc3\xb2\x62\x6a\x55\xb0\x84\x97\x7c\x26\x33\x59\x43\xe5\x09\x9f\xfd\x60\xa9\x20\xaf\x59\x26\xb8\x91\xec\x0a\x37\x1c\x88\x9c\x2f\x8c\x8c\x08\xc4\x89\x17\xac\xcd\x00\xb6\x55\xdf\x18\x1d\x3d\xfd\xff\xec\xbd\x7d\x73\xe3\xb8\x91\x3f\xfe\x56\x50\x4e\x5d\x79\xbc\x25\xcb\x33\xbb\x7b\x7b\xc9\xa4\xae\xf2\xf3\x7a\x66\x13\xd7\xcd\xce\xf8\x6c\x6f\xae\xae\xa2\xd4\x19\x22\x21\x09\xdf\xa1\x08\x85\x20\x6d\x6b\xab\xf2\xde\x7f\x85\xee\xc6\x13\x1f\x44\x4a\x96\xe7\x61\xa3\xfc\x91\x1d\x8b\x20\x00\x02\x8d\x46\x3f\x7c\xba\xfb\x34\x60\x52\x99\xd4\xe5\xa9\x6d\x22\x4a\xc2\x26\xa5\xb2\x6c\xaf\x02\xe1\x9f\xf9\x4c\xb8\x1d\x30\xe5\xaa\x80\x25\xd1\x50\x88\xdf\x9e\x5d\xb7\x6b\x03\x6e\x57\x47\xc7\xe3\x06\x1d\x5f\xf8\x29\x92\x83\xb1\x3d\xa0\xc4\x3e\x69\xa5\x1a\x47\x25\x36\x4f\x3f\x65\x46\x4d\xdc\x26\xab\x99\x7b\x01\x58\x4b\x8a\x4e\xc9\x4a\xea\x45\xf0\x00\x82\x23\x20\x8d\x38\xfa\x0b\x5f\x88\xf1\x7c\x6c\xf6\xfd\xcd\xfb\x1b\x74\x77\x9c\x18\x59\x3e\x2b\xa1\xfa\x98\x7f\x0f\xe3\x29\x2a\x1d\xe4\x00\x76\xf3\xf5\xe1\x14\x41\x96\xed\x59\x95\xcf\xe5\x34\x13\x34\xc2\xd2\x76\x79\x6e\x73\xab\xe3\x98\x27\xa4\x39\xac\xb8\xd6\x30\x07\xc8\x93\xcc\x5e\x5c\xff\x74\xc1\x5e\xbd\xfa\xf6\xbb\x13\xd3\x5c\xa6\x58\x61\xb5\xb5\xee\x13\x2f\xe6\x1d\x55\x80\xdd\x23\xac\xae\x53\xf3\xfe\x04\xe6\x36\x4a\x72\x0c\x02\x70\x54\x7a\x25\xdc\x84\xa7\x55\x5a\xb7\x49\xc3\x5b\x66\x69\xd3\x89\x3b\x1a\xe5\xc5\x54\x96\x00\x94\x72\xcf\x22\xb2\x6d\x11\x0a\x23\x06\xa3\x21\x0f\xfe\x19\x32\xf1\x15\x97\x85\x3f\xa9\xa6\x17\xff\x16\xe6\xc1\xc7\x9e\xc7\x7b\xc8\x72\x83\x19\xf7\x99\xcd\xcb\x0f\xb4\x2a\xf3\x24\xab\x52\x01\x21\x8e\x58\x3b\x42\xcd\xd8\xab\x1f\xea\x33\xb4\xbe\x6e\x6c\xad\x31\x7f\x37\x25\x70\x86\xa8\x11\xef\x74\x9d\xa9\x2c\x53\x0f\x28\xfc\x66\x19\xfb\x98\x1b\xee\xf4\x51\xac\xf5\x6b\xf6\x0d\x8b\x27\x6f\x49\xf4\x75\x70\xab\xc5\x35\xec\xe2\x43\x87\x05\x30\x27\x39\x0b\xe4\x29\xbb\xb4\x66\x36\x98\x29\xdb\x46\x90\x11\xdd\xfb\xf0\xaf\x88\x41\x9b\x5e\x7c\x1d\x82\xf1\x24\xff\xc6\x57\x0b\x88\x67\xf9\xab\xca\x37\xcc\x10\x72\xc7\xbb\xe9\x98\x5e\x77\x9d\xd1\xc0\xe9\x14\x62\x2e\x55\xde\x3d\x21\x7c\xbe\xff\x29\xb5\xdc\xc5\x3c\x45\xce\xc9\xb3\xab\xe8\xf2\xed\x2f\xd2\x34\xa8\x88\xfc\x50\x49\x24\xe0\xe0\x7f\x1f\x2c\xbe\x5c\x44\x37\x53\x9f\x20\xe3\x5b\xd7\x8b\x3f\xd9\xbb\xc9\xdd\x66\x70\x65\xe7\x11\x63\xea\x0b\x91\xe2\x69\x0b\xe3\x81\x9f\xa3\xbd\x85\x20\xde\x80\xe7\x21\xc8\x4f\xac\x38\x59\x5a\x8c\xb0\x27\xef\x05\x2b\x0b\xa3\xa7\x26\xa3\x58\x44\x79\x58\xf0\x12\x8a\xd1\x91\xf1\xc7\x08\x08\x3c\xe7\x73\xab\x29\x7a\x1e\x75\xce\x72\x99\x35\x68\x8b\xe7\xac\xca\xf1\x34\x9b\x7b\x58\x40\xe2\x7f\x50\xd0\x13\xae\x29\x9a\x0c\xaf\x3a\xa2\x29\x27\x2c\xe1\xac\xa3\x97\x19\xd7\x10\x33\xb9\x6e\x0b\x7d\x7c\xa2\x60\x7a\x45\x05\x88\xfb\xf6\xd4\xb4\xab\x39\xd3\xcd\x2f\x95\x4b\x6a\x1e\xcb\x70\xfd\x01\x1c\xab\xd5\x55\xa1\x4a\x95\xa8\xac\x5d\x3b\x81\xa2\x6b\x09\xde\x12\x2b\x6a\x49\x49\xf3\xcd\x4e\xaa\x22\x16\x25\x90\x91\x6a\xb3\x60\x79\xca\x8b\x34\xbc\x12\xa9\x04\xd2\x3a\x2f\xf9\xe3\x98\xfd\x92\x9f\xae\x0a\x31\x93\x8f\x22\x0d\xca\xc5\x9b\xef\x2a\xee\x09\x8f\x74\x79\xfe\xfe\xdc\xf7\x64\x41\x92\xd8\xf8\x05\xd7\x6c\x25\x0a\x76\xfd\xd3\xc5\xe9\x0f\xdf\x7d\xf7\xef\xa0\x7b\x98\xeb\xe6\xf5\xd9\xd9\xc3\xc3\xc3\x58\xf2\x9c\x8f\x55\x31\x3f\xe3\x5a\xcb\x39\x04\x45\xea\x33\xea\xe2\xd4\x0a\x25\xef\x55\x7e\xea\xfa\xb7\x5f\xe7\x68\xc1\x48\x26\xf1\x14\x7d\x29\x1a\x5b\x92\xb3\xbb\x0a\x60\x77\x8c\x6f\xa8\x51\xba\x35\x3c\xcf\x32\xf8\x17\x95\x33\xaa\x89\xe2\x24\x6d\x43\xa5\x19\xca\x2d\x87\x09\xe8\xa8\xa6\x61\xdc\x1a\x20\x85\xe6\x4e\xa5\xb8\xe7\x48\x30\xa1\x35\x18\xd9\x92\xa1\x96\x73\x3a\xdd\x91\x62\x33\xc6\x30\x9b\xbf\xfd\x7d\x8c\x03\xf9\x62\xd5\x42\x82\x94\x87\x35\xab\xc3\x45\x60\xaa\x70\x32\x17\xe5\xc2\xf3\x82\x96\xb9\x48\x6d\x3c\x64\x24\xbd\xff\xf0\x1d\x4b\x16\xbc\xe0\x49\x69\x8e\x61\xa6\xf2\xf9\xd8\x36\x05\xd1\x0f\x6b\xae\x65\xea\x01\x2a\x73\x68\x81\xb5\xdf\x72\x73\x6a\x65\x12\xbe\xaa\x0a\x76\x7c\x7a\xec\x5e\xd6\x25\x2f\x50\x23\x15\x39\x49\x35\xb6\x70\x5c\xe3\xe5\xed\xf6\xb5\xbd\x58\xf8\xad\x2d\x0d\xee\x8b\xec\xc4\x1c\xea\x92\xf6\xbb\x59\x42\x02\xf7\xdd\x96\xe4\x2f\x84\x19\x0a\x63\x2c\xa3\x62\x12\x5e\x8d\x6b\xd5\xa9\x98\xb3\x15\x59\xae\x36\xb0\x20\xd2\x6a\x23\x03\xb8\xbc\xea\x3c\xf7\xd6\x3e\xff\xcb\x9b\xab\x11\xbb\xbd\xb8\x1a\x99\x3d\xb8\xb9\xb8\xbd\x8a\xd6\xf3\xf6\xa2\xad\xe6\xfa\x13\xf9\x25\x72\xb7\x01\x0c\x13\x4f\x44\xac\xd2\xbb\xa2\x83\xe1\x06\xd1\x65\xe5\x94\xfa\x40\xa3\xc7\x8a\x1d\x54\x46\xcc\xb2\xa1\x12\x64\x15\x52\x9d\x9c\x2a\x12\x0f\x4b\x42\xec\xc8\xd5\x90\xf4\xc5\x01\x5d\x19\x56\x5a\xc3\xff\xa7\x64\x8e\x37\xe2\xaa\x50\x69\x85\x03\xb0\x59\x95\x65\x8c\x26\xeb\x26\x3a\xd0\xc2\x00\xde\x96\xd1\x91\x7b\xad\xd3\xde\xd0\xee\x96\x09\xb5\x7f\x1f\xed\x1c\xd6\x14\xb1\x0a\x79\xc2\x8b\x42\x5a\x2b\x9d\xd4\xf1\x1a\x20\x67\xab\x99\x03\x8c\x0c\xe7\xf9\xda\x34\x50\x00\xb1\x36\x5b\x9c\x4c\x41\x2e\x97\x55\x09\xb1\xf1\x7c\x06\xf5\x79\x0a\x81\xba\x1b\x58\x3e\xbc\xe8\x6e\xe7\x83\x46\x08\xa8\xb3\x85\x72\x4e\xb6\xf6\x0e\x23\xc3\x87\x2e\xaf\xee\xbf\x7f\xcd\xae\x63\x3c\xe7\xd5\xfd\xf7\xec\x1c\x7b\x18\x63\x9b\x1f\x5a\xda\xfc\x10\xb6\xf9\xe9\xbf\xdf\xbc\x8f\xdb\xb0\x9f\xaa\x2c\x5b\xb3\xff\xae\x78\x86\x56\xae\x37\x50\x87\x8e\x75\x3a\x6b\xf8\x4a\xfe\x55\x14\xba\x35\xd3\xc5\xf9\xd5\x25\x3d\x73\xd1\xef\x20\x3f\xe3\x6f\x22\x85\x5a\x44\x4b\xee\x2e\x12\x47\xe4\x3c\x10\xe9\x90\x42\xc6\xc0\xd5\x03\x39\x27\x51\xf9\xbd\x00\x51\x22\x51\xf3\x5c\xfe\xea\x7a\x73\xd7\x00\x94\xa1\x2a\x91\xed\xe4\xb6\x7c\xd9\xc8\xd5\xda\x2c\x04\xe8\xb7\x55\x1e\xf4\x60\xcb\xaa\xb6\xc0\x6a\xe6\xb2\xb4\x78\xa6\x44\x2d\x97\x55\x2e\xcb\xf5\x19\x84\x3f\xc8\x69\x55\xaa\x42\x9f\xa5\xe2\x5e\x64\x67\x5a\xce\x4f\x79\x91\x2c\x64\x29\x92\xb2\x2a\x84\xe1\x03\xa7\x30\xd9\x1c\x24\xd9\xf1\x32\xfd\x9d\x43\xad\xb5\x2d\xa8\x27\xf7\xc6\x7a\xfa\x93\x0e\xba\xbb\x2d\xe7\x49\xf7\x69\xf0\x34\x24\x51\xaa\xfa\x4a\xe4\xda\xa9\x7c\xbe\x7c\xf9\xb2\xf5\x80\x6e\x5d\xf8\x73\x83\xd1\x67\xa3\xed\x8a\x97\x6a\x29\x93\xfe\xa2\x40\x3c\xaa\x81\xeb\x69\xc6\x4a\xd4\xd7\x6f\x6f\x6e\x43\x44\xb3\x74\xa6\x0c\xcf\x43\x3d\x35\xe1\x82\xcc\x04\x5d\x0b\x2e\xcb\x8a\x93\xf6\xb1\xae\x96\x04\x43\x58\x35\x5d\xca\x12\x2b\x1a\x09\x5d\x62\x4d\xe6\x0b\x9e\x9b\x3b\x6f\x2a\x58\xb5\x4a\x51\xc5\xbb\xcc\xd9\x05\x5f\x8a\xec\x82\xeb\x76\x88\xd6\x3e\x69\x09\x78\xc5\xa9\x59\xb2\x56\x6a\xb2\xf6\xf2\x36\x17\x2a\x89\x8d\xb8\x3a\xc7\xda\xd9\xd6\x9f\x56\x88\x13\xf5\xc9\x9f\x45\xc9\xad\xa8\xd1\x42\xc9\x28\x30\xc4\x5c\xd9\x92\x73\x2e\xca\x07\x55\x7c\x24\xa1\xc2\x82\xcb\xa7\x6b\xb4\xd0\x79\x35\xac\x85\xc8\x41\x7c\xe9\x14\x35\x21\x1b\x0e\x89\xa8\xae\x20\xbd\x2c\x9b\xda\x9e\xb9\x17\x51\x98\x21\xbe\x95\xe2\x6b\xd4\x05\xc2\x64\x51\x48\xc5\xa7\x14\xda\x62\x14\x38\x78\x44\xac\x26\xea\x7b\x72\xc4\xad\x84\x3c\x39\x1a\x7c\x28\x69\xe0\xe7\x39\x8f\xa0\xb3\x0d\x39\x93\x3d\xa6\x84\x4d\xfe\x8a\xad\xf4\xc7\xd1\xb0\xb2\x71\x01\x89\x0d\x37\x3d\xc0\x65\xfe\x4e\xea\x41\x5a\xaa\x6b\x1c\x0b\x5e\x96\x44\x1d\x11\xc2\x06\xb6\xa5\x08\x09\xc5\x19\xdc\xaa\xb6\x42\x6f\x87\x9b\x73\x9f\x37\xa7\x3b\x12\xb5\xd2\xc7\x7d\x9b\xb6\xcf\x23\x85\x62\xfd\x00\x1f\xcd\xe1\x92\xfb\xa4\x97\x1c\x9c\xdc\xfd\x5c\x70\x86\x9e\xf0\x7a\xdb\x9d\x2d\x5a\xdb\xd6\x20\x76\xe7\x06\xdc\xc0\xec\xa6\xa2\x3c\x78\x89\x0f\x5e\xe2\xaf\xdd\x4b\x1c\x93\xf1\xc1\x49\x7c\x70\x12\x1f\x9c\xc4\x07\x27\xf1\xc1\x49\xfc\xd5\x38\x89\x3b\x19\xf8\x60\xd9\xe5\xe0\x22\xfe\xcd\xb8\x88\xe3\x8d\x3d\x78\x88\xbf\x06\x0f\x31\xd3\x55\xb2\x30\x54\xb0\x5c\x27\x6a\xb9\xe2\xf9\x1a\x50\xd1\xcb\xf5\x69\x52\xe9\x52\x2d\x4f\x6d\x1f\x07\x8f\xf1\xc1\x63\x7c\xf0\x18\x3f\xa7\xc7\x38\x66\x9f\x07\x87\xf1\xc1\x61\x7c\x70\x18\x1f\xcc\xde\xbf\x69\x87\x71\xcd\x8c\x79\xf0\x17\x7f\x81\xa6\xf4\x83\xbf\xf8\x5f\xc6\x5f\xdc\xa2\xc0\xed\xd9\x5d\x5c\x3b\xf0\xdb\xa8\x92\x7b\x75\x16\xb7\xc8\x5a\x07\x5f\xf1\x6f\xf8\xd2\xfc\x2c\xbe\xe2\x36\x81\xfe\xe0\x2a\xfe\xd2\xee\xb7\xcf\xed\x2a\x6e\xa3\x92\x27\x7a\x8a\xc5\x3d\xd8\x86\x5c\xdf\xe6\xcf\x8d\xac\xcd\x34\xb0\xbe\x1f\xb8\xa1\xc8\x76\x0a\xbf\x6b\xb5\x14\x68\xc3\xb6\x4a\x39\x66\x05\x1a\xb3\xcb\x32\xc8\xca\x9a\x8a\x5c\x81\xf5\x45\x2d\x05\x19\x17\x93\x05\xa4\x3c\xb0\xd9\x24\x31\xc7\x49\x0f\x47\x84\x31\x6f\xe5\x52\xb4\x70\x45\x57\x04\xa8\x96\xa1\x00\xb2\xbb\x62\xed\x9f\x07\xc3\xaa\xf8\x47\x91\x9f\xcd\xb8\xcc\xa0\x8e\xd8\x9c\x47\xbe\x61\xff\x03\x31\xc1\x83\xd6\xf2\x09\x18\xb0\x4f\x19\x7d\x61\x2b\x0b\xd6\x32\xfc\xbb\x06\xd6\xc9\xaf\x75\x05\x8c\x6e\xca\x93\x8f\x90\xd1\x11\x0c\x94\xa5\x04\xd7\xfa\x1a\x85\x2a\x72\x24\x32\xa4\xe0\x12\x0d\x02\x03\x0c\x42\x7e\x3a\x3f\xc9\x42\x03\xbd\xe9\x92\x2f\x5b\xaa\x3b\xec\x71\x5e\xbb\x33\x16\x38\x0f\xd1\xb4\xdf\xf1\xaf\x71\xd6\x3e\xa9\xd3\xe7\x9a\xae\xaf\x72\x60\x5e\x0a\x0a\x39\x38\xb6\xb3\x21\x3f\x8d\x79\xce\x1e\x8c\x8c\x8f\x66\x20\x18\xd7\x70\x9c\x99\x21\x22\xa6\xa6\x68\xe9\x7f\xda\x25\xf2\xb3\x4c\x0a\x65\x97\xee\x20\x0b\x3c\x8f\x2c\xb0\x2f\xfd\xd5\x5c\x79\xcd\xfd\xc1\xe4\x38\x3c\x1b\xb3\x73\xb6\xa8\x96\x3c\x3f\x2d\x04\x4f\xc1\xc0\x17\x34\x74\x46\xed\x00\x4a\x63\x76\x08\x93\x82\xa9\x7c\xcc\x7e\x36\xba\x1e\xcf\x58\x26\xf2\x79\xb9\xf0\x9e\xf7\x12\x1c\x20\xaf\x3e\xfe\x88\xde\xff\x4c\x4e\x0b\x5e\x18\x3d\xd9\x03\x4c\x42\x7f\x24\xe1\x99\x08\x4e\x52\xad\xcc\x6f\x3f\x7c\xff\xf1\xc7\xae\xca\x9c\xba\xfd\x92\xc5\x9c\x36\xf5\x7b\xb6\xa3\x13\xba\x63\xdb\x0d\xee\x0e\x46\xe2\x0e\x91\x21\xe6\xa9\xaa\xca\xba\x33\x53\x96\xc7\x60\x98\xfc\xe0\xc8\x56\x15\x40\xde\x89\x4f\xc6\xec\x0c\xda\x7a\xcc\xde\x8e\xe7\x63\x76\x2d\xc0\xc1\x77\x23\xca\x8b\xb6\x56\xc1\x73\x4d\x59\xcd\x8d\xbe\x6f\xe7\x21\x96\xb2\x04\x43\xb6\x48\x78\xa5\x85\xd1\xd2\x79\x52\x42\x29\x0c\x10\x6d\x50\xa8\x41\x27\x56\xd0\x55\x20\x4d\x3c\x01\xfd\x52\x08\x73\xbf\xb7\x1c\x79\x4b\x52\x4c\x8b\x44\x19\xc1\x75\x6d\x57\x71\xa6\x0a\xf4\x35\x19\x0e\x99\x89\x47\xda\x21\xbb\x18\xc0\xae\xea\x32\x0f\x2b\x0b\x39\x9f\x9b\x43\xcf\x9d\xb1\x19\x92\xf6\x8b\x4c\x58\xd2\xa4\xa9\xec\xeb\xbb\x68\xe3\xfc\x8e\xb4\x64\x6d\x0f\xe0\x25\xc1\xfe\x82\xd5\xc5\xee\x8a\xa7\x99\x11\x03\xbc\xd4\x5d\x8c\xc9\xa0\x54\xac\x77\x1d\x64\x49\xb3\xb8\xcc\x75\xc9\xf3\xb6\x9b\xe8\xf2\x4d\xcb\x0c\x24\x35\x0f\x87\xcc\x44\x79\xfa\xb8\xfe\x75\xd6\x3e\x92\x16\x85\x6c\x03\x3c\x42\xfd\x33\x8f\xa6\x43\xe2\xc7\xc6\x21\x19\x06\x96\x05\x55\x80\xdd\x48\xce\xe8\x2c\x10\x74\xb3\x54\x39\xbe\x3d\x64\x63\x50\x1f\x18\x47\xfa\xc0\x0d\xce\xf0\x9f\x76\xf2\x8d\x73\x4a\x3e\x90\x60\x56\x2f\xde\x1b\x39\x2a\x1b\xb1\xff\xe1\x45\x2e\xf3\xf9\xc9\x88\xe5\xe2\x81\xbc\x11\x89\xe5\x3c\x98\x69\x8e\x64\xfe\x59\x65\x98\xf5\x20\xe7\x58\x2b\x10\x25\xbc\xa5\x5b\xd3\x9a\x6d\x44\xaa\xb4\xe9\x41\xf4\xdd\x03\x35\x2c\x7f\x19\x6f\x6f\x7e\x1a\xf8\x06\xea\x3a\xfd\x0a\x5c\xaf\x7d\xca\x36\x8a\x8d\xff\x48\x62\xe4\xa7\xeb\x53\xbe\x0e\xe6\xa8\xcf\x6a\x8e\xc2\x9c\xf7\xd1\xf6\xd9\xd5\x6b\xec\xdf\xd6\x96\xa9\x36\x26\x70\xf4\xcf\x83\x8c\xf9\x79\xed\x4d\xcf\x3d\x5f\x37\xa1\x4f\x62\xd7\x6a\x35\x3c\x3d\x83\x31\xeb\xc6\x5d\xaf\x1b\xb9\x21\x36\x73\xb8\xfb\x10\x1b\xac\x72\x7b\xed\xaa\x19\x5e\x6f\x7a\xc4\xe4\x58\x8c\xb1\x64\x10\x0a\x1d\x0f\x5c\x9f\x41\x25\xc4\xd5\x4a\xe4\x56\xea\x94\x79\xa5\x2a\x9d\xad\xb1\x02\x91\x91\x08\xa1\x32\x42\x0f\x67\x85\x12\xba\x47\xa3\xa3\x8c\xeb\xf2\x03\xe9\x89\x74\xaf\x80\xad\xac\xc9\x74\x93\x76\x3b\xc9\x7b\x87\xbd\x51\x09\x7a\xff\x93\x10\x74\x80\xdf\x84\x32\x3e\x32\x48\x5d\xb2\x85\xe0\x45\x39\x15\xbc\x64\x54\x6d\x62\x80\x85\xa4\x31\xd1\xa6\x84\xe0\xb4\x61\x18\x04\x2f\x1a\x77\xa2\x69\x26\x46\x4f\xd0\x42\xe4\x6c\x2a\x66\x86\xd2\xe3\xf9\xec\x51\x53\xc6\x55\x6c\xb2\xd4\x60\xcf\x1f\x16\x02\x70\x5d\xe1\x4a\x19\x76\x95\xcf\x15\x61\xbb\xcc\x04\xf4\x02\x4b\xf6\xfb\x12\x67\x57\x19\xcf\x73\x30\x25\x2e\xd5\x3d\x47\x8c\xd0\xab\xf1\xab\xdf\x6f\x2b\xd5\x0c\x92\x33\xea\xd4\xff\x58\x8a\x5c\xc3\x9a\xd8\x13\x70\x8e\x35\xac\x2e\x6e\x2e\xdf\x40\x1d\xce\x4d\xc7\xa0\xde\xb6\x35\x0a\x08\x93\x9c\x42\x65\x4f\x6a\xe5\x0a\x43\xf9\x72\x59\x14\x4a\xd1\x47\xe7\x80\x08\x6c\xd0\x72\x3b\x4e\x30\xcc\x59\x5a\x88\xb9\xd4\x25\x04\x44\x84\x28\x73\x5f\x6d\x74\x37\x7c\x55\xf7\xf2\xfd\x14\x15\x83\xec\x59\xbf\xae\xea\x90\xb4\x80\xe6\xb1\x2d\x5a\xdd\xbd\x72\x01\x4d\xbd\x06\x24\x66\xb3\x73\x38\x3d\x2b\x4c\x72\x7d\x7e\x75\xc9\xfe\x5c\xa8\x6a\x05\xea\x87\xe0\xbd\x4b\x4f\xeb\xd4\x58\xfc\xd4\x51\x49\xfc\x6d\x54\xc5\xb5\x25\x69\x6c\xf0\x3d\xd8\x68\x47\x74\x5b\xf7\xea\xff\x25\x28\x31\xd7\xb3\xf6\xae\xe6\x5c\x28\x5e\x42\xfa\x74\x9a\x62\x10\xbc\x84\x5c\x5b\x66\x99\x59\x74\x91\xf3\xa9\x2d\x60\x6b\x17\xd5\x1c\xdd\x95\x42\x24\x68\x65\xc4\x85\xcb\x92\xd1\x1a\x62\xc7\x2b\x33\x12\x42\x64\x69\xef\xc8\x89\xdf\xb9\x7d\x6e\x7e\x5b\x6f\x5e\x2d\x4f\x36\x2f\x17\x57\x30\x70\x0b\x1e\xc2\x3d\xb3\xdb\x15\xcd\x93\x60\x09\xd1\xaa\x00\xcc\x01\x82\x09\xe0\x23\x53\x25\x08\x94\x89\x38\x31\x76\xf7\xcd\xdd\x98\xdd\x16\x5c\x66\x90\x7f\x3e\xe3\x7a\x41\x98\xb2\xb2\x90\xcb\xa5\x48\x91\xb5\x5b\x78\x2b\x49\x7b\xe1\xb0\x84\x6a\x80\x41\xcd\xef\xe3\x49\x3e\xc9\xdf\x52\x31\xa0\xd7\xec\xee\x6c\xa6\xd4\x1d\x7b\x00\x49\x1e\x8e\x03\xfd\x34\xc2\xff\x9e\xdd\x81\x98\x8e\xff\x9e\xf2\xe2\x2e\x7e\xc3\xcc\x35\x78\x2b\xbd\x33\xfc\xf9\xee\x4c\x94\x09\xb4\xea\x30\x5d\xa5\x1f\xf2\xac\x05\xc3\x0f\x9f\xa2\x05\x96\xe7\x2e\x8c\x86\x00\x44\x82\xfd\x07\xab\xa6\xe3\xbc\xde\xc1\xb2\xab\x3c\x5b\x1b\x25\x9c\x67\x99\x5b\x61\x73\x41\x5b\x8c\x37\x8e\xbc\x2b\x8a\xbe\xe5\xa0\xbc\xe1\x62\xa9\xf2\x1b\xb1\x51\xe7\xf3\xf5\x39\xd9\x29\x62\x0a\xe7\x40\x74\xa4\x7d\x99\xf3\xec\xfa\x89\x0b\x77\xc2\xa9\x58\xad\xec\x78\xdf\x9e\xb9\x76\x46\x58\x17\xc4\x93\x33\xc1\x35\x1a\x1c\xb5\xb7\x33\x05\x62\xd4\x38\xe8\xbe\x1e\x8f\x01\xb5\x58\xaa\xc2\xab\x79\x2c\x85\xb6\x66\x1f\x06\x14\xea\x3f\xa8\x9c\xfb\x55\x39\x0f\x5a\xde\x67\x46\xcd\x7d\x15\x9a\x5e\xec\xdd\xd0\xad\xc9\xf7\x6f\x17\xe0\xc6\x30\x62\x07\x9b\x8a\x05\xbf\x97\xaa\x70\x67\x2d\x38\xe3\xcf\xfd\xc1\x66\x76\xa7\x3c\x4f\x4f\xd1\x81\x32\xc4\x0e\xea\xd8\xec\xb8\xc1\x66\xa1\xd0\x00\xe9\x11\x55\x8b\x6d\xe6\xb6\x23\xf8\xb9\xf6\xcd\x58\x3d\x9b\x97\xdc\x02\xe7\x55\x05\x76\x1c\x43\xc5\x86\xe7\x82\xc2\x88\x35\x06\xe0\x7d\x28\xaa\x77\x45\xc5\xde\x5c\xe1\x00\x5b\x0e\xe6\x5a\xf0\xf4\xd4\x5c\x3d\x5f\xdb\x62\x62\x27\xbd\xe6\x82\x0d\xd7\x1e\xec\xc7\xe0\x4b\xf2\xc6\xce\xfa\x89\x18\xc1\x4d\x63\xb8\xd8\xc3\x8d\x37\x72\xa3\x35\xb9\xfc\xa6\x74\x4b\x21\x32\x06\xee\x43\x7f\x77\x42\x05\xee\x44\x14\x60\xa6\xe8\x0c\x57\x0c\x85\x7d\xf2\x76\xd3\x6e\x35\x64\x7e\xa3\x66\xdf\x16\x3c\xd7\x30\x85\x76\xfd\xfd\x9d\x51\xc5\xa1\xd2\x2d\xdd\xd7\x34\xdf\xd2\xbd\x67\xa3\xab\x54\xee\xbc\x94\x50\xb0\x1b\x22\xe2\x9f\xa6\xbb\x5b\xb5\x7d\x29\xb4\xe6\xf3\x96\xd9\x91\xe7\x94\x39\xcf\x29\xb5\xb4\x90\x59\x73\x33\xa5\xa2\xe4\x32\xd3\x81\x43\xc5\xcf\x7d\x2b\xe7\xe6\x2d\x48\x3b\xe6\x19\x05\x00\x05\xeb\x71\xac\xd1\x68\xd1\xd3\x75\x17\xdf\xb8\x89\x12\x25\xb8\x5e\x47\xb0\xa8\x6a\xc6\x6e\x41\x1c\xfd\x89\x67\x5a\x8c\xd8\x2f\x18\x9b\xd9\x1e\xbf\xbf\xd1\x4d\xe3\x69\xc9\x0d\xb1\xb5\xd7\x65\x5b\x27\xc5\x86\xb3\xd2\xe7\xac\x88\x1a\xa2\x00\x92\xa8\x2c\x13\x89\x95\xd0\x3c\x4f\x3d\x38\x2d\xbe\x10\x09\xb2\xc3\x69\x71\xee\x7c\x15\xed\x7b\xb6\xbd\xa3\x62\xc3\xc5\x72\x70\x58\x1c\x1c\x16\x7b\x75\x58\x6c\x52\xbc\x9f\xea\xb8\xe8\x93\x6e\x86\xf0\x47\x5b\xdb\x2a\x8c\x7e\x1d\xac\x52\x47\x02\x83\x58\xae\xb2\x56\x47\xc3\x52\xe6\x46\xce\x5c\xdf\x00\xb2\xa4\x43\xf4\x5d\xca\x1c\xc2\x4e\x7c\xe8\x2f\x02\x51\xd0\x2e\x80\x91\x9e\x9c\xe5\xe2\x21\x5b\x23\xa2\x44\xa4\xc1\x9d\xb4\x52\x69\x80\x4d\xc2\x8c\x0a\x0f\xb2\x5c\x98\x6b\x9b\xe7\x6b\xd3\x9d\x39\x38\xbe\x50\x54\x52\x70\xbd\x90\xf9\x7c\x04\xdd\xcb\x92\x6c\x71\x41\xda\x1c\x7e\xcf\x65\x66\x04\x83\xb8\x98\xd4\x4b\xf6\xc2\x0c\x66\x6d\x80\x6d\x2f\x30\xae\x99\x56\x90\x1f\x06\x42\x70\x28\x03\xc2\xc9\xc0\x58\xe2\x42\xdc\x4b\xb3\xab\x7f\x91\xba\x54\xc5\xfa\x9d\x5c\xca\x8e\x58\x69\xbf\x56\x2a\x4b\xd9\x02\xdb\x63\x82\x08\x10\xf4\x8c\x2c\x05\x16\xa8\x42\x65\xd9\x94\x27\x1f\x6d\x6e\x17\x2c\xbc\x0d\xf7\x43\x3d\x41\xd1\x54\x94\x0f\x42\xe4\x4c\x3c\x62\x1d\x48\xf6\xab\x28\x14\x5c\x1d\x51\xc4\x75\xbc\x28\xaf\x86\x15\x9c\x1b\x1d\x61\x14\xaf\x6a\x31\x16\x9f\x53\xae\x83\x7f\x54\xa2\x58\x33\x75\x2f\xac\x1d\x15\xb0\xd7\x10\x27\x9c\xf3\xb9\xd7\x60\x22\x3d\xd0\x99\x22\xa1\x8e\x7b\x91\xe2\x67\x4d\x03\x8c\x4d\x0a\xc1\xe3\x14\x73\x95\xe2\xd4\xd1\x7a\x4e\xa9\x72\x14\xd4\xf7\x62\x96\x8a\xb7\x2e\x85\x3d\x24\x1f\xcf\xd9\xef\xe0\xbf\xa7\x76\x15\x06\x68\x41\x9b\x78\x90\xe9\xeb\xc6\x2e\xa8\x11\xe0\xec\x09\x6c\x2e\x6e\x1e\x65\x56\x8a\x15\x06\x43\xce\x91\x5d\x9b\x8e\x17\x06\x07\xfb\x33\x06\x8f\xf1\x19\x13\x8f\x3c\x29\xb3\x35\xc8\x98\x89\x5a\xad\x83\x4c\x0c\x50\xb0\x5a\xdc\x9b\x5d\xc4\x4a\x90\xa6\x6b\x2c\x24\x49\xc1\xcf\x34\xcd\x63\x2c\xc1\xcd\xec\x6a\xb0\x17\x46\xcd\x8f\xde\x95\x33\x96\xab\x5a\x2b\xe9\xe3\xf6\xd2\x93\xad\xb7\xc9\xec\x4e\xa6\x78\xaa\xcf\x3c\xfc\x4a\x9f\x15\xc2\x65\xec\xf0\x3f\xff\x6e\xa5\xd2\x53\xb7\xa6\x5b\xd5\x7e\xbc\xa5\xb7\xac\xce\x6f\x7b\xf9\x33\x04\x33\xb4\x07\x19\x78\x53\xeb\x98\x9d\x33\x6d\xae\xf8\x3c\x71\x67\x3c\x92\x32\xb8\xcf\x53\x30\x77\x3d\x5a\x0d\xc0\x53\x70\xa7\xd6\x7f\x59\xb2\x84\xe7\xb6\xb2\x1d\x58\x9e\x53\x44\x43\x83\xb0\x61\x83\xc3\xfb\x8e\xf4\x0f\xdf\x9b\x6f\x43\xa9\xe3\xa6\x2c\x78\x29\xda\xb2\x6a\x9d\xe7\x24\x98\x18\xb1\x09\xda\x20\x87\x5a\x65\x3c\x31\x84\x84\xbc\x27\xe6\xe5\x1a\x6d\xff\xb9\x78\x80\xbf\x06\x41\xd0\x36\x08\x75\xbf\xc4\x53\xdc\xa2\xf0\x65\xb4\x91\x83\x2f\xdf\xda\x78\x43\xaf\xf9\xe8\x3c\x6f\x73\xd7\x3b\xcd\xb0\xff\xb6\x47\x65\xb1\x23\xb5\x91\x37\x3b\x6d\x73\xf1\xd3\xdb\x88\x1b\x30\x33\x48\xab\x4c\xa4\x47\xa3\x23\x24\xdd\x9f\xa5\xd6\xc1\x8f\x64\xd8\xeb\x6a\x0d\x82\x42\x1b\x56\x21\xcb\xe0\x52\xec\x08\xee\x80\x9f\xcd\xc4\x17\x5c\x2f\x98\x6b\xad\x9d\xb6\x1d\x78\x1f\x62\xae\x16\xa0\x30\x2b\x6d\x41\x92\x36\x46\x80\xb4\x46\xe8\x8b\xf1\x7b\x25\x53\x6e\xce\xe4\x52\x24\x0b\x9e\x4b\xbd\x44\x17\x96\x2c\x59\x2e\x04\xfa\xfc\x88\x3f\x3a\x87\xa7\x1d\x3f\x17\x0f\x46\x25\xf3\xe8\xd4\x6b\xba\xe5\x07\x5e\x9c\x9b\x92\x2b\x5e\xc7\xbb\x49\xda\x9f\x17\x47\x30\x6c\x80\xa3\x07\x33\x36\x0c\x1d\xeb\x68\xf3\xc5\x73\xa9\x55\xde\xb4\x55\x8f\x4f\x5c\x99\x9b\xe1\x74\x29\x8a\xb9\x38\xfd\x28\xd6\x47\xaf\xad\xe5\xa9\xa5\x95\x76\x4c\xe6\x08\x5e\x80\x85\x69\xa7\xbe\x1e\x79\xc9\x5c\x29\x81\x6c\x51\x54\x39\xc0\x6f\x5c\xe2\xcc\x57\x96\xfe\xa1\x5e\x70\x8e\x19\x41\xc1\xb3\xa9\x29\x05\x17\x15\x23\xf5\xcd\xf6\x74\x15\x61\x87\x5a\x94\x67\x43\x03\x8d\x5a\xcf\x53\xeb\xf7\x97\xaa\xe4\x59\xfb\x2a\x04\xc2\x33\xad\x45\xfc\x75\xec\x05\x46\x88\xdb\x4c\x71\x94\xf6\x08\x84\x80\xf6\x37\xf6\x75\x37\x6f\xbb\x20\xf8\x79\xe7\x96\xfa\xb7\xa0\x84\xde\x35\x80\x7c\x59\xfc\x5e\xa0\x69\x8d\xbc\x95\x74\xed\x06\xcd\x1c\x35\xe5\xa1\x52\xf0\x02\xb5\x12\xc3\x10\x1c\x99\x99\x6b\x7c\x5c\x53\x8f\x4e\xb6\xf9\xcc\x88\xb9\xee\x46\xf3\xf1\xe4\x31\xe0\xc3\xe6\x51\xfa\x22\x29\x3e\xbc\x28\x3e\xef\xe6\xd6\x13\xdb\xf5\xcf\xfa\x97\x9c\x3f\x2b\x61\xe6\x64\xf4\xfd\x1c\x14\x69\xa3\xd3\x36\x09\xb9\xb7\xb6\x1c\x7c\x21\x12\x73\xe9\x84\xe2\x2b\xbd\xde\x54\xf0\x82\x3b\x7a\x2b\x99\xf4\xc9\x4c\x31\x3c\x26\xd4\x65\xb0\xaa\x7b\x28\xb1\x3e\xcc\x1b\xb4\x85\x28\xf8\x4b\x43\x18\xf7\x22\x61\x4f\x72\x4a\x23\xe7\xe4\x73\xec\xa0\x45\xc6\xc0\xc7\x56\x94\x47\xf0\x05\x5b\xf1\x82\x2f\xf5\x98\x5d\xa1\xfc\xe1\x40\x2c\x90\xdf\xea\x3f\xd9\xc4\xbe\x86\xbd\x4e\x8e\x76\x14\xe4\xa3\x5e\x02\x53\x6d\x9f\xcf\x22\x20\x21\x9c\x37\x58\x4b\xcd\x39\x6a\xcc\xcc\x9c\xf8\xc9\xd1\x87\xfc\x8d\xc8\x04\xcc\x34\x4c\xbf\x66\x7f\xde\x3e\xcc\xa4\x65\xaf\x3a\x3e\x66\xc0\x26\x8b\x55\xa6\xd6\xcb\x9e\x50\xfb\x21\x88\x1d\xd7\x51\x1f\x64\xc7\x35\xdc\x12\xb3\xe3\x07\x40\x8c\x9c\x19\x25\xc9\xb8\x39\xe9\xf7\xd6\x4e\x8d\x2f\x5f\x19\x65\xcf\xb0\xa5\x20\x66\xee\x00\xde\x39\x80\x77\x7e\xdb\x1e\x0f\x5a\x9d\xe7\x48\x78\xd5\x0e\xa9\xb9\xa9\x5b\xf6\xcb\x4e\x8c\x8d\x08\x8e\xef\xae\x86\x17\xd7\x41\x1f\xe8\xe5\x67\x2f\x0b\x64\x6b\x2f\x02\xc4\xc9\xff\xf7\x39\x9f\xdd\x71\x23\xf1\x37\x0d\x67\xd6\xcf\x89\x1c\x71\x83\x0c\x83\x8e\x34\x9b\x77\x63\x47\x52\xcf\xc3\xff\x75\xc1\x23\x66\xa2\x78\x51\x77\x44\xa8\xd8\x00\x18\x9a\x28\x64\x03\xb6\x33\x7d\xe0\xda\x31\xa8\x03\x94\xe5\x0b\x82\xb2\x04\xa4\xfd\x59\xb1\x2c\x6e\x1a\xbd\x60\x96\xa8\x65\x1c\xbf\xe9\x9f\x1d\x70\x2c\x5f\x88\x30\xd5\x17\x7c\x1b\x26\x9b\x6c\xdf\xbe\xbd\xd8\x5e\xbd\xba\x70\xc0\xb4\xfc\x4b\x24\x7d\xdb\xac\x33\x3e\x03\xd8\xc4\x75\x7e\x4d\xf8\x82\x61\x8a\x69\xa8\x20\xda\x37\x99\x2e\x95\x0d\x91\x0a\xc3\x68\x2d\xff\x02\x0b\xa4\x6d\x1b\x4a\x27\x83\xe2\x05\x47\x47\xf6\xdd\x5b\x75\x60\x80\x07\x6d\xf2\x2b\xe2\x35\xed\x91\xad\x36\x65\xd8\xeb\xa0\xfa\x9b\x2f\xec\x63\xf3\xdc\x74\x9c\x93\x40\xc6\xf3\xa7\xa2\x3d\x1e\x01\xcd\x7c\x2e\x0e\xc1\x0b\x4e\x0e\x51\xb4\xbb\x45\xcf\xbc\x7e\x01\x03\x04\x26\xdb\x73\xb3\x19\xbc\xc3\xd1\x09\xc5\x55\x7c\x03\x1b\xfb\x4a\x96\x59\xa8\x25\x96\x86\x0c\xef\x99\x8a\x18\x75\x18\xf5\x82\xef\xd9\x86\x77\xf6\x22\xf5\xa2\x96\x9d\x50\xbd\xe1\x0a\xfd\x33\x81\xf8\x7e\xde\x01\xc0\xf7\x55\xc0\xf6\x06\x56\x00\xe1\x95\x6e\x73\x31\x5c\x36\x92\x7b\x87\xc7\x48\x6a\x86\x2f\x02\x4f\x87\xd9\x11\x33\x5a\x15\x2a\x11\x5a\x07\xfe\x90\x48\x6b\x69\xfa\x43\x5c\x3c\x28\xec\xdc\xbc\x10\x5a\xbf\x11\x3c\xcd\x64\x2e\x36\x03\x2f\x29\xdf\x37\xa8\xb0\x32\x8f\x76\x2d\x32\x03\x94\x8a\x2d\xf9\x47\x98\xd9\x1c\x2b\x4a\x62\xc6\x05\x5c\xab\x60\x45\x71\x4f\x30\x3d\x2a\xc2\x2d\x5a\xe7\x4e\x80\x32\xcc\x78\x21\xa8\x6e\x87\xf9\x66\x7a\x35\x78\x0b\x4d\xc4\x3c\x54\xae\x31\x36\xf8\xaa\xf6\xa5\x6f\x1f\x13\x21\x52\x48\xa5\x00\x1a\xaa\xdd\x6f\x5d\x15\x33\x9e\xf8\xb4\x51\xc1\x84\x50\x19\x1d\xb3\xf7\xaa\x24\xb0\x9a\xfb\xc0\x70\x3f\x84\x2e\xe5\x12\x3d\x40\x1e\x2a\x05\x6b\xc6\x5b\x37\xd4\x43\x2d\x6d\x58\x30\xae\x35\xdd\x7a\x86\xb2\x0d\xe9\xb0\x17\x90\x13\xe4\xdb\x57\xdf\xff\xc7\xf7\xbf\xff\xee\x87\xef\xff\xe3\xc4\xec\x37\x01\x14\x5d\x85\x13\xc1\x73\xcd\x26\x47\x90\x0f\x1e\x3f\x14\x7d\x29\x83\xd0\xa4\x60\x57\x6f\xd9\x7c\x9f\xe8\xc3\xf2\x0d\xc0\x5a\x3d\x17\x44\xf4\x99\xd1\xaf\x61\xce\xbd\x4f\x84\x80\xdd\xff\x06\xe3\xac\xc1\x53\x9b\x65\xf4\x59\xf6\xab\x86\xef\xf8\x86\x4b\x3d\x14\xc2\x83\x0b\xbe\x7e\xbb\x1b\xde\x47\x0e\x3f\x10\xb8\x8d\x9c\xf4\x3f\x96\x75\x66\x02\xf2\x3e\x62\x25\x19\x27\x93\x9b\x0e\x54\x2e\xf6\x26\x0f\x74\x23\x85\xb1\x2e\xa9\xc3\x83\xda\x8c\x0b\x63\xf6\xd6\x62\x09\x43\x5a\x78\x58\x28\x2d\x10\x53\x08\x18\x9e\xa0\x8c\x10\x7c\xb5\xe5\x10\x66\xf7\x94\x11\xef\xf9\x6c\x16\xb7\x48\xb7\x31\x3f\x6f\x83\xd7\xd5\x9d\x98\xc9\xdb\x3a\x8b\xf2\xc0\x49\x28\xfc\xda\x82\x9f\x8c\x51\x93\xe6\x4b\xc6\xbd\x20\x2a\x24\xb7\xff\x12\xeb\x5d\xc3\x31\x03\x23\xb7\xc5\x56\x6e\x82\x21\x5b\x34\x65\x13\x80\xac\xdb\x11\xc8\x4f\x41\xdd\x3e\x17\xc8\xb3\xf9\xcd\x7d\xaf\xd4\x88\xfb\xb9\xe0\xa0\x75\x8f\xc3\x30\x99\x12\x4d\xae\x24\x55\x2e\xb7\x77\xc7\xf4\x38\x6a\xad\x70\x75\xdd\x79\x0d\xdd\xd6\xf0\x17\x5e\x1e\x03\xba\x68\x03\xa9\xd4\xf1\x29\x0c\xeb\x0b\x77\x9e\xd9\x41\xf8\xca\xa7\x02\x4c\x03\x5f\xf9\x6d\xf4\xf7\x27\x86\x98\x7a\xe6\xf7\x59\xa0\xa5\x7e\xe5\x9f\x1b\x5b\xda\xe2\xfc\xda\x37\xb8\x74\x28\xa4\x69\x13\x8c\xa9\x47\x6c\xdf\x04\x63\x02\xd2\x1f\x7e\x72\xf0\xa4\x20\x37\x7d\xf2\x81\xe8\x96\x1b\xeb\xc3\xe6\x2a\x3f\x2d\x45\xb1\x94\xb9\xd5\xe9\x36\x8e\xcf\x5e\x60\x21\x7b\x8a\xbb\xf1\x56\x0b\x7b\xa3\x0f\x8d\x93\xaa\xf2\x1d\xb8\x4b\xf0\x52\xff\x4a\x39\x09\xaf\x6c\xc1\x89\xc5\xd1\x49\xba\x34\x57\x97\xb3\x56\xda\x33\x19\xab\x4f\x00\xd1\x7b\xf5\xf2\xe5\xbf\x05\x27\x28\xe1\x2b\x9e\xc8\x72\x0d\x5c\x03\x0b\x75\xfb\xea\xa0\xf1\x18\x16\x8a\x86\x95\xfc\x4b\xb6\x16\xd1\x51\x0c\x03\xa6\x70\x3a\x04\x09\x34\xfa\x8b\xc8\xc3\x4b\x75\xc8\xea\xa2\x55\x65\xf8\xca\x6e\x4b\x06\x30\x4f\x98\x61\x68\xba\xb0\xc2\x03\x02\x11\x9f\x09\x62\xd7\xc2\x39\xb6\xbb\x5f\xdb\xe0\x75\xdd\x37\x2c\x09\x6f\x5e\xe8\x59\xa8\x87\x2d\x64\xb8\x4f\x88\xdb\x6b\xce\xfa\x16\x91\x7c\x11\x68\x6d\x2f\x28\xbe\xc0\x3b\x35\xdc\x5f\x1b\xe2\xf7\x04\xd2\xb3\x85\xee\xd5\x91\x86\x21\x7e\xaf\x31\xfb\x3d\x83\xf8\xfc\xb7\xf4\x93\xd1\x4f\x37\x90\xb6\xcd\xae\x2f\xa6\x5d\xdf\x28\xac\xb5\xbf\x11\xb9\x23\xbc\x82\x60\x96\xcc\xa8\xaa\x8a\x5a\x55\x84\xde\x0e\x84\x06\xdb\xb8\x99\x70\xae\x63\xa4\x27\xe6\x9d\x2b\x20\x9d\x7d\xf3\xbb\xf0\x77\xcc\x08\xb7\x10\x2e\xa1\x21\xfd\xac\x66\x6c\x46\xd8\x45\x3d\x66\xec\x72\xc6\xd6\xaa\xa2\xd4\x6d\x99\xfc\x08\x4a\xd0\x4c\x15\x89\xf0\x59\x12\x6d\x7b\xd3\x5d\x0e\xd8\xf5\x6c\xed\x9f\x42\xbf\x78\xba\x4a\x5b\x2b\x35\x2a\x70\x3c\x66\xd7\x21\xfb\xfe\xb9\xd2\xe5\x75\x95\x9f\xef\xdb\x2f\x7b\xf9\xe6\xda\xcc\x04\x9c\xb2\x45\xd5\x86\x03\x37\xbf\x3a\x3b\xaf\xdb\x59\xa7\x1f\xa5\x32\x01\x98\xce\x83\xf9\x85\xb6\xcc\x34\x87\xad\x26\xfb\xd6\x8d\x48\xaa\x42\x96\xeb\x0b\x2c\x6f\xbc\x17\x9a\xb7\x13\xef\xa7\xf1\xbf\xdc\xde\x5e\x5d\xe6\x60\x43\xeb\xcb\xc1\x58\x6b\xca\xb8\xd6\x2a\x91\x58\x87\x1e\x93\x01\x92\xa5\xcf\x28\x50\xb0\x49\x97\x79\xa2\x96\xc0\xd2\x8a\xac\x25\x9d\x1e\xd0\xd3\x4c\x15\x0f\xbc\x48\x91\xf4\xcd\x13\xfb\x76\x8f\xf9\x9b\x9a\x35\xad\xdf\xf6\x41\x63\xfe\x3f\xe2\x83\xe8\x34\x16\x36\x59\xbc\x2f\xc0\xee\xbd\x51\x8a\x4c\x3e\x84\xc0\x99\xcd\x64\xe2\xd4\xde\x70\xda\x3b\x32\x59\x5a\x4b\x9a\x16\x1a\xa6\x71\x07\xe2\x79\xc3\x62\x4b\x5a\x3f\x91\x32\x3e\xe7\xe6\x40\xfb\x65\x44\xcf\xa5\xb4\x8b\x4d\x2e\xb3\x31\xbb\x70\x05\x81\x25\x46\x91\xda\xe4\xc7\x41\x19\xf1\x54\x6a\x7b\x9a\x9d\x3f\xce\x7b\xbd\x78\xc6\x26\x30\xab\xc9\x91\xb9\x88\xb0\x16\x18\xfb\xe5\xfa\x9d\xd1\x86\x6c\x45\xcb\xe9\x9a\x5d\xff\x74\xc1\xbe\xfb\xc3\xef\x7f\x18\x33\x33\x59\x6d\x2b\x1d\xcf\xa5\xb3\xfe\x1e\x9f\x1d\x53\x49\xcc\x2a\x0f\x6a\x81\x43\x9d\x4b\x78\x05\x46\xaf\x7f\x83\xa6\x70\x72\xf8\xf0\xf6\xea\xe4\xbc\x5c\xb4\x97\x74\xbe\xa2\x27\x2c\x15\x28\xeb\x38\x97\x35\x55\x16\x8f\xfc\x31\xb0\xc8\x96\x42\xf1\x33\xe0\x65\x0a\xbe\x0d\x62\x35\x7c\x09\x66\xf4\xdf\xbe\x66\xdf\xb0\xb7\x8f\x3c\x29\x5f\xb3\x9f\x83\xd0\x69\xb3\x48\xb0\x3b\x14\x7f\x3d\x66\xdf\x30\xcc\x1f\xe9\xdb\x4d\xb9\xe1\x03\x46\x99\xf4\xcd\x29\xa1\xa6\x5e\x65\xb2\x34\x4b\x0b\x0b\xf7\xb3\x3d\x3a\x52\x4f\x72\x06\xd6\x3b\x7c\x0d\x47\xa0\x1a\xde\xd3\xb5\xff\x27\xd7\x52\x8f\xd9\x79\xdc\x00\xa8\xdd\x4a\xc9\xa6\x23\x0b\x6d\x21\x01\x9f\x38\x12\xbc\xe3\x26\x60\x7e\x39\x3e\x3b\x66\x5a\x18\x51\xa4\x54\x85\xe9\x96\xf6\x07\x8c\xb3\xa6\x23\x54\x0d\xc0\xbe\x07\x1f\x61\x24\x14\x0c\x0e\x07\x7e\xc7\x73\x3b\x87\xd3\x07\xa9\x85\xfd\x48\x23\x9a\xd3\xb2\x9a\x4e\x6c\xa7\x90\x40\x34\x30\xf2\xcb\x99\x4f\x5f\x6d\x3f\x85\x36\x63\x45\x67\x03\xeb\x9c\x03\x55\x98\x9e\x54\xcb\x1b\x32\x8f\x06\x18\x91\x33\x04\x72\x8b\xd2\xfc\x5f\x40\x49\x0f\x9b\x84\xd4\x7d\x97\xd0\xee\xb7\xb3\x29\xff\x15\xe3\xae\x5c\x12\x55\x7c\xd5\x36\x98\xf2\x5f\x4f\xc6\x93\xfc\x1b\x76\x69\x6b\xcc\x00\x99\x59\x50\xef\x6b\x76\xd9\x4f\x7e\x70\x43\xac\x58\xa9\xcc\x0c\xcc\x53\xe2\x14\x17\x19\xd7\x7a\x5c\xeb\x59\x03\x89\x96\x05\x64\xf4\x36\x72\x3b\xd8\x29\x68\xb3\x84\x23\x64\x58\x95\x82\xda\x99\x2f\x4f\xcd\x09\x4f\xa0\x5a\x5f\xa9\x98\xcd\x6c\x5a\x20\x29\xe3\xba\x82\xbb\x7b\x3c\xc9\xeb\x03\x62\x96\x53\x0f\xf6\xb0\x69\x64\xed\x61\xa6\x17\x23\x9f\x42\xfb\x72\xec\xe7\xb2\x8b\xf9\xe8\x56\x77\xde\x75\x95\x89\xbf\x9a\x63\x3c\xf0\xe2\x73\xed\x63\x64\xdf\xa2\x2c\x57\x4e\x29\xd6\xe8\xad\xa0\x32\x83\x74\x1d\x69\x80\x2a\x00\xda\x01\xb3\xe2\x22\x42\xe1\xf5\xd9\xd9\xa4\x7a\xf9\xf2\xbb\x64\xa1\x74\x09\xff\x12\xf4\x03\x70\x5d\xf8\xe1\x4f\xf8\x83\x16\xbc\x48\x16\x86\x0b\xe3\xcf\xec\x94\xfe\x4b\x23\x30\xac\xcb\x88\xff\x6f\x9a\x39\x2b\x60\x55\x64\x18\x02\xaa\x57\x2a\x87\x1d\xb3\xfc\x7a\x64\x91\x30\x84\xe0\xb0\xb7\x9b\x15\x45\x91\xb6\xed\x85\x03\x07\x1a\x53\xe2\xa3\x47\xc1\x9d\x31\xc3\x1f\x8c\x68\x46\x6e\x46\x60\x93\x50\x06\xed\xf8\x4f\xc7\x86\xa8\x8e\x7f\x77\xdc\x77\x9f\xc3\x2d\xd0\xbc\xcd\xf1\xe7\x16\x18\x6d\x9c\x22\x0c\xef\x10\xca\x5f\xb1\x0a\x51\x23\x7e\x03\xf6\x2b\x1b\xd6\x05\xa7\x5d\xa0\x08\xf5\x3e\x06\x90\xae\xd2\x50\x01\x19\xc5\xbb\x4d\x34\x1b\x36\x74\x22\x0f\x27\xd1\xda\x90\x2c\xa4\x6a\x86\x0a\xd7\xdb\x67\xca\x8e\x52\x65\x4f\x95\x95\xd3\x43\x11\xbd\x2f\x63\x76\x3c\xc1\x27\x25\x3b\x5f\xca\xfc\x68\x74\xb4\xe4\x8f\x2d\x50\x08\xde\x92\x41\x7b\xc9\x5d\xea\x6c\x33\x51\x3a\x25\xb0\x32\x23\xac\xae\xad\xe5\xbd\x18\x68\x7c\x31\x83\x37\x47\x90\xb9\xd7\x0a\x48\x6e\xda\x79\x8c\x1d\x93\x46\x5b\x1d\x60\x03\x91\x50\x13\xb6\x2a\xd4\xbd\x4c\x81\x3e\x96\x32\x3f\x33\xeb\x83\x32\x65\xa4\xe8\x99\xdf\x2e\xdf\xe8\xe6\x56\xda\x6e\xbe\xc6\x4d\x44\xeb\xed\xf3\x6e\xa2\x19\x63\xd7\x4d\xbc\xfa\x31\x53\x43\xc1\x9a\xec\xd5\xf8\x0f\x9d\x91\x84\xd4\x53\x33\x8c\x90\x6a\xe8\xcb\x7c\x7e\x76\xff\xea\x8c\x9a\x8d\x5d\x7b\x6f\x0a\xe3\x70\xab\xc8\xa4\xca\x78\xc1\x2e\x2e\xdf\x5c\xb3\x17\x6f\x1f\xc7\x6c\x72\xf4\xea\x0f\xdf\x8e\x5f\xfd\xf0\xfb\xf1\xab\xf1\xab\xb3\x6f\xbf\x9f\x1c\x8d\x26\x47\xdf\xbe\x7c\xf9\xea\x75\x3a\xfd\xc3\xeb\xd7\x67\x3f\x7c\x3f\x39\x3a\x69\xab\x85\xe0\xfc\x89\x56\xb1\x01\x96\xf3\x1e\xa7\x73\x05\x64\x64\xe4\x84\x63\xc8\x54\x64\xbd\x6b\xe8\xb1\x11\x8f\x89\x58\x95\x4c\xe4\x65\x11\x1a\xeb\xcc\xa4\xe2\x38\x6c\x42\x84\x50\xc9\x7c\xac\xbe\x6f\xeb\xa3\x18\xdd\xbd\x37\x61\x8a\x4c\x5b\xaa\x28\xc0\xaf\x4d\xbf\x93\x59\x92\x10\x34\xd9\x80\x4b\x5e\x5e\x31\x5c\xd4\xbf\xf2\x4c\xa6\x56\x12\x40\x81\xaa\xb9\x8c\x68\x2c\xab\xad\x64\x9b\x0e\x84\xab\xd1\x9c\xd0\x5b\x5c\x25\x9c\x52\x66\x74\x5b\x35\x1b\xbe\x46\x3c\xdf\xc7\x7c\x19\x4d\x82\x0a\x4e\xda\x5b\x06\xe1\xb0\x22\x25\xd9\x7e\x0d\x5d\xaa\xaa\xd4\x32\x45\xf1\x01\x16\x13\x4e\xda\x86\x6b\xbb\x1f\x0c\x38\xec\x90\xe1\x15\xbc\x91\x53\x62\x93\xb6\xec\xa4\x86\x8c\xac\xe5\x1f\xf0\x2b\x32\x9f\xaa\x2a\x07\xcc\x70\x8e\xcd\x08\xe6\xc2\xc9\x96\x60\x2d\x0c\x91\x0a\x1d\x98\x4d\xce\x73\x2b\xf1\x5b\xf5\xd3\x26\xd0\xc7\x83\x33\x97\xf7\xc2\x9a\x2b\x34\x33\x1f\x54\xe4\x46\x90\x3f\x85\x21\xc0\xc3\x50\x15\x99\x1e\xb1\x4c\xf1\x94\x4d\x79\x06\x6e\x4a\xb2\x60\x8c\x98\xb3\xfc\xb3\x9b\x9b\x77\x23\xa6\x66\x33\x51\xa0\x7b\x12\xf5\xd1\x7b\x59\x94\x15\xcf\x40\x42\x30\x94\x2b\xca\x64\xcc\x06\xc4\x2a\x07\x6b\xd4\xc5\x61\x2c\x12\x97\x56\xde\xbe\xb2\x55\xc8\xf2\x21\xe2\xf8\x80\x11\xff\x7a\x31\xe2\xff\xda\xe5\x02\x42\x58\xb4\x75\x23\xba\x40\xd6\xc0\xd2\xf1\x75\xa4\xb8\xa7\xc9\xf6\x05\x4e\xc7\xb8\x9d\x08\x67\xf1\x55\x7f\xf6\xce\xf1\xd9\xe1\xba\x0d\xbc\x9b\x9f\x31\x32\xbb\x66\x3e\xea\x17\x02\xbc\x1f\xc1\x49\xc6\x59\x16\x5c\xea\x88\xc6\x36\x97\x74\xee\x9c\x0a\x86\xc5\x1b\x65\x7b\x80\x0b\x8e\x38\x65\x1b\xc0\x87\x78\xa8\x0c\xca\x60\x5f\x8b\x59\x10\x4a\xcd\xfe\xcb\x41\x65\x3c\xcb\x25\xab\xae\xb9\xe1\xf5\x8a\x27\x75\xa2\x73\xd7\xd9\xe5\x2c\x78\x27\xc8\xdc\x39\xb2\x5f\x01\xb1\x2a\xe6\x4b\xe8\x6f\xa3\xbe\xa3\xa9\x9f\x38\xae\x07\xdc\x6e\x81\x06\xbc\x5d\xaf\x44\xfa\x4e\x25\x3c\x6b\xa9\x15\x1d\x8c\xdc\x99\x29\x41\x34\x8b\x96\x35\xdd\x3a\x5d\x95\x99\xed\x77\xf4\xf5\x0e\x06\xce\x8d\xbd\x6f\xc5\x39\xab\x52\x66\x63\x43\x2d\x65\x31\xbe\xcc\xcb\x0f\xc5\xcd\x76\xb5\x90\xbb\x17\xad\xfb\x88\x98\x31\xcf\x5a\xc6\x1c\x7c\x44\xfa\x62\x9f\x83\x66\x6d\x82\xb2\x65\x72\x87\xd0\xe7\x2f\x42\xaa\xdb\x26\xf4\xb9\xb9\x75\x7b\x71\xaf\x93\xde\x75\x88\x79\x3e\xc8\x98\xcf\x1f\x5f\x6d\xa9\x6d\xff\xc1\xd5\x81\x6f\x68\x00\x7b\x34\xcd\xea\x59\x7d\xd1\x86\xb0\xe4\xab\x55\x88\x8f\xd0\xac\xca\x53\x51\xf8\x1c\xd2\x22\x45\xb3\x3d\x31\x9e\x42\x50\xca\x68\x12\x48\xac\x49\x20\x00\x5e\x44\x7e\x74\x74\xc9\x08\x73\x86\xe0\x3d\x14\x54\xa0\x47\x30\xc1\x8d\x10\x8d\x53\xa8\xaa\x6c\xc0\x31\x3c\xda\x23\xf5\xc0\x1c\xe7\xb0\xac\x7b\xc7\xfa\xc5\x1c\x33\x6a\xbb\xd7\xc2\xf2\x9e\x59\x95\x65\x6b\xf6\x8f\x8a\x67\xf8\xe5\xa9\x5a\x72\x99\xbb\x6b\x9e\x5b\xb3\x02\x7c\xc0\xa8\x13\x90\x40\x6e\xe4\xd0\x6f\x9f\x8a\x7b\xc9\x03\xbc\x94\x79\x3a\x81\x19\x05\x30\x07\xf4\xe1\x5f\x86\xfd\xca\xdc\xf5\xfb\x9a\xbd\x1a\xb3\xcb\x2b\xed\xd2\x6f\x92\x5d\x33\x04\x5d\xf0\xbc\xb1\x2e\x60\xcf\x01\x04\x1f\x07\xc4\x13\xba\x78\xad\x6d\xd0\x02\x82\x8c\x92\xe4\xfc\xdb\xa0\x2c\x58\xfe\x3b\xc9\xbf\x45\x03\xe8\xdd\xeb\x3b\x96\x8a\x4c\x2e\x65\x89\x65\x5b\xcd\x1c\x0a\x61\xe8\x04\x28\x42\x24\xbc\xd2\x82\xfc\x3b\xf5\x39\x4e\xf2\x49\xc9\x82\x89\x86\xf2\x8d\x9f\xb4\xe9\x55\x2e\x31\xae\x2a\x5b\xb3\xd7\xbf\x7f\x09\x04\x03\xae\x4e\x9e\xa7\xd8\xc9\xeb\xef\xbf\xff\xce\xfd\x6c\xe6\xf7\x23\x39\x83\xb4\x00\x36\x9b\x2c\xc0\x33\x40\x5f\x36\xab\x0c\x77\xe8\x22\xcf\x36\x7c\x0b\x10\x67\xe0\x55\x6c\x10\x9a\x91\x5a\x5d\x43\xa9\x63\x74\x49\x28\xe5\x02\x55\xa3\xa8\x6e\xb1\x3c\x0e\x7e\x11\x44\xe9\x8a\xb4\x39\xc6\x24\x9f\xe4\x40\x99\x89\x45\x34\xae\x0a\x91\x48\x2d\x26\x47\x84\x10\x82\x2b\x2a\x24\x50\x1b\x19\x0b\xd0\x21\xb2\xb7\x01\xe9\xa9\xb2\x49\xbc\x84\x3b\x98\x1c\xcd\x94\x1a\x4f\x79\x31\x4e\xd4\x72\x72\x74\x82\xf6\xd4\x07\x99\xa5\x09\x2f\xd2\xc9\xd1\xa8\x6b\x30\x44\x53\xd8\x83\xe9\x50\x74\xf6\x4d\xaa\xd6\x60\x07\xf9\x66\x6c\x86\xc1\x21\x90\x98\x5c\x43\x87\x0b\x62\xc7\xdf\x1c\xa3\x64\xcf\x57\x2b\xc1\x0b\x73\xa4\x64\xa9\x45\x36\x33\xe7\xc1\xbb\x77\xdf\xbc\xbf\xa1\xde\x51\xda\x41\xb0\x04\x12\xb8\x9d\x06\x3c\x1f\xb3\xff\x55\x95\x59\x3f\x43\x87\x80\x24\xe6\xf5\xf9\xf9\x21\x70\xa6\xb0\xe2\xff\xf9\x9f\x66\xc6\x30\xd3\x6b\x4b\x2b\xd6\x86\xdc\x46\x2f\xf0\x12\xc6\x6b\x58\x9a\x73\xc7\xfe\x81\xaf\xf1\xd8\xce\x98\xe5\x33\xb4\x8f\x23\x62\xa7\x88\x0e\xf1\x05\x10\xc8\x49\x60\x01\x28\x40\xfa\xb0\x61\x0b\xc1\x53\x3c\x77\xc2\x30\x28\xc3\x2b\x4d\x97\x63\xf6\x6d\xd4\xbd\xff\x46\x62\xad\x3b\x0f\x53\x2a\x3f\x12\x50\x6b\x35\x9b\xc9\x47\xf6\x02\xca\x90\xdb\x3b\x03\xf7\x04\x56\xf3\xc4\x32\x10\xb7\xc8\x35\x6f\x87\x97\x16\xcc\x70\x4f\xf7\x81\x7b\x20\xc5\xd3\xfc\xe0\xbe\x9f\xad\xee\xdd\x5e\x0c\x47\x83\x13\x47\xb5\xbb\x61\xf9\x8d\x1a\x8d\x38\x54\x22\xa8\x06\x1a\xcd\x71\x1b\x0b\xfb\xd4\xbc\x94\xda\xf3\x9a\x00\x15\x15\x5f\xa2\x9e\xb9\x38\x23\xbf\x67\xbf\x4b\xf9\x08\xac\x41\xce\x40\x87\x2b\x11\x3e\xe3\x5d\x0b\x32\xf7\x87\x29\xb4\xb1\x3b\xe4\xde\x88\x69\x15\x95\xf9\x68\x20\xd5\x08\x8f\x37\xac\xdc\xee\x57\x4f\x10\x7d\x69\x1a\x82\x66\xb5\xf0\x46\xbb\xbc\x80\x9a\xd1\x10\xf7\x0e\xa5\xb0\xcd\xf1\x7b\x94\x7a\xc0\xe2\x75\xa2\x4f\xcf\x6d\x20\xb1\x93\xa8\x12\xbe\xc2\x68\x90\x19\x49\x6e\xd1\x8d\x88\xd5\x5f\x54\x7e\x6c\x11\x66\x3c\x5f\xe3\x21\x66\xe7\x36\xb8\x8e\xf6\xfa\x98\x7a\x44\xa8\x0d\x10\xcd\xb1\xdf\xf2\x5a\x10\x34\x31\x47\x4d\xb0\x73\x64\x29\xe8\xb8\x02\x8d\x4f\xf1\x94\x3c\x46\x45\x18\x0d\xa7\x0a\x3b\x7f\x33\xcb\x4c\xcd\x65\x02\xd0\x2f\xe8\xdd\x70\xfb\x79\xa6\xa6\x3c\xb3\x8d\xf6\x06\x89\x95\x01\xf4\xad\xdd\x0a\x74\x59\x6b\xd1\x56\xc4\x3e\x6c\xc3\x92\xac\xd2\x10\x0f\x4d\xfa\x22\x5e\x82\x81\x7c\x1b\xb5\xb6\x06\x05\xbc\x7b\xeb\x29\x11\xa4\x85\xb5\xd1\xf9\xf7\x3d\xa2\x99\x21\xe3\x89\xb0\xe6\x6e\xe7\x12\xbb\x8b\x13\xaf\xd3\x27\x8e\x13\x33\xde\x5d\x90\x35\x65\xcc\x7e\x52\x05\x90\xcb\x03\x2f\x52\xcd\x12\xb5\x5c\xf1\x52\x4e\x65\x26\xcb\xf5\x08\xa3\x0d\xd1\xef\xe8\x5e\xa1\x18\x77\x00\x37\x5a\x0a\x40\x4b\xa4\x19\x5d\xa4\x50\xa7\x06\x2a\x36\xf9\xc8\x46\x17\x5e\x6e\xbf\x0c\x02\x9b\x96\xb2\x34\xf7\x17\x2f\x20\x8e\x89\xae\x26\x8a\x84\x34\xea\x80\x1f\x12\xae\x73\xcf\xbd\xac\x6d\xa3\x8e\x1a\xb4\xc6\x97\xf3\xab\x4b\x6b\x5b\x91\xf3\xdc\x08\x76\xb4\xde\x42\xfb\x84\x22\x0c\x16\x23\x24\x5e\xef\x14\xc5\x7d\x71\xda\x3e\xd5\xd6\x5d\xf2\xe2\xa3\x48\x49\x5c\x0f\x03\xf6\x49\x68\xb3\x90\x36\x2d\x4a\x08\x7d\xc4\xb3\x88\xf6\x04\x0c\x01\xf3\xeb\xf1\x53\x8b\xdf\x71\x84\x66\x3f\xcb\xd1\x63\x1a\x51\x49\xe5\xbe\xb4\x3d\x7b\x8f\x39\x94\x6d\x4c\xc1\x21\x08\x21\x9c\x17\xf8\xbd\x8b\x03\xb1\x4e\xdf\xd8\x45\x70\x39\x8b\x85\x5c\x55\xb0\x5c\xe1\x8d\x44\x22\xc5\x28\x92\x72\x81\x22\x72\xa7\x34\xd6\xb8\xd0\xf3\x98\x74\x40\x15\x36\x6c\xbf\xcc\xda\xc2\xd1\xde\xdd\xc4\x25\xe1\xc7\x35\x65\xc4\x59\xa6\x8d\x20\x49\xe8\x52\xed\x2f\x41\xf3\xbe\xf9\x69\xc4\xbe\xff\xfe\x3b\x58\x90\xa5\xe1\x4b\x2b\xc8\xa6\xb9\x9c\x8a\xc2\x13\x1b\x2c\xaf\x65\x52\x9e\x46\xcd\x6a\xeb\x11\x22\x0f\x9c\x38\x49\x7d\x3c\x06\x3a\x01\x48\xd7\x00\x6d\x4d\x12\x55\xa4\x04\xe9\xb4\xfa\x06\x70\x18\x7f\xb5\x97\x8b\x42\x55\x73\xd4\x8c\x6f\xde\x5f\xc2\x34\xdd\x12\x8d\xec\x11\x92\xd6\xb3\xef\xcf\xdb\xac\xca\x66\x12\x63\xbf\xc2\x16\xee\xc3\x6f\xde\x5f\x3e\xcf\x36\xdd\xbe\xbb\xd9\x09\xb7\x58\x63\xd3\xdb\xd8\x47\x06\xb6\x35\x33\x1b\x7e\xdf\xf7\x06\xd1\x47\x0d\xdd\x9d\xdf\xef\x8f\xeb\xbd\xee\xcd\x75\xf9\x23\x5d\x97\x2d\xe9\x2f\x82\xa7\x36\xf8\xa2\xab\x8c\x93\xbd\x7c\x4f\xed\xed\xbb\x8d\x0f\x25\x1c\x68\xa0\x5f\xce\x7a\x12\x5a\x5e\x1d\xbc\xf0\x66\x97\xfa\x57\xdd\x9c\x83\x58\xcc\x82\x9c\xb3\x70\xae\x32\xbe\x16\x05\xd3\x14\x02\xd5\x30\x32\x79\x6b\xc4\x30\x8b\x52\x0b\xb3\x31\xba\x18\xda\x17\x78\xc4\x6c\xb5\x07\x3c\x91\xa6\x08\x6c\xc9\xf4\x07\xb9\xba\x48\x2c\x20\xdc\x92\xc5\x8c\x61\xae\xc8\x38\x85\x9b\x61\x03\x67\x71\x4c\x57\x99\xe9\x1b\x91\x14\xa2\x8c\x41\xf0\x91\x42\x06\x1c\x5f\x8b\x12\x04\x2a\x1b\x84\xdc\x25\x7e\x45\x2c\x42\x6a\xbb\x2a\xc0\x55\x32\x31\x2b\xc3\x2b\x61\x13\xaf\xa8\x23\xa6\x46\x47\x1a\xe6\xd9\xe1\x60\x73\xcf\xda\x84\x2a\x7c\xd3\x5d\x57\x11\xac\xc8\xdd\x3e\x2a\x47\x26\xfd\x93\x15\x3b\x61\xb6\x4d\xd9\xd3\xbc\x63\x74\x26\xcc\x63\x43\x76\x19\xc3\x45\x1d\xa3\xe5\x99\xca\xbd\xbd\xc7\x3e\x42\xed\xc8\x6c\x8b\xc8\x71\xc9\x66\x99\x4c\x4a\xed\x8d\x94\x13\x20\x81\xc9\x91\xd5\xa6\x51\x86\xa9\x28\x5d\x57\x6c\xa4\x1b\xd5\xfa\xa6\x5d\x85\xdd\xb1\x56\x1c\x95\x83\x00\xe4\x52\x07\x39\xb3\x83\xd7\xd6\xdd\x4b\xf4\x45\x83\xc2\x1c\x06\x41\xd5\x22\x74\xe4\x1e\x50\xa1\x51\x7f\x7d\xd8\xd0\xa8\xf1\xb8\xf6\xae\x3f\xe1\x10\xec\x68\xed\x5b\x81\x14\xe2\xe2\xcc\xc0\xec\x0c\xe5\x0c\x67\x50\x54\xe2\x80\xe8\x3a\x20\xba\x0e\xde\xb6\x2f\xcf\xdb\xb6\xbf\x6a\x15\x4e\xc1\x8a\x59\xc8\x6e\x46\x82\x06\x42\x7c\x17\x0b\x53\xb3\x93\xe7\xc0\x16\x45\xa3\xbc\x1d\xe4\x25\xdc\x85\x71\xfb\x9e\xb7\x62\xe1\xfe\xb5\x71\x67\x7f\x1d\xf0\x7f\xe2\xde\x96\xbb\xd7\xd1\xfd\x46\x87\xb7\x79\x57\xb6\x47\xf7\xdb\x5e\x03\x39\x0b\x62\x8c\x48\x0d\x84\xd8\x22\x32\xb1\x40\x12\x05\xa9\x99\x59\xee\xd3\xcc\x1c\x0f\x23\x10\xbc\x1a\xff\xbe\xf7\x4e\x81\xce\x5a\x44\x76\x12\x11\x53\xa1\x4b\x7b\xdd\xe3\xb8\x86\x86\x55\x55\xce\x15\xb0\x41\x9c\xe2\x98\xbd\xe5\xc9\x82\x19\xf1\x2a\x16\x11\x21\xcb\xe6\x72\x0a\x6e\xc3\x4a\x63\x21\x60\x30\x9a\xf1\x8c\x7d\xb8\x26\x29\x26\xb4\xc6\x41\xb9\x6b\xa8\x65\x27\xb5\x86\xac\xa9\xde\x2f\x60\x3d\x05\x10\x5f\x09\x73\x79\x61\x97\x88\xdc\x7e\x65\x21\x6d\x1e\x3c\xd3\xe0\xa4\x65\x00\x62\xcc\xb0\x7c\x4e\x15\xe1\xa1\x25\xd1\x7c\x85\xf3\x53\xd8\xb1\x61\x47\x75\x20\xce\x51\xd5\xb0\x70\x9b\xec\xf4\xc2\xce\x40\xba\x27\x69\x38\x8b\x2d\xa7\xfb\x50\x60\x23\x3a\x02\xfc\x16\x58\x1b\x5a\xd2\x28\xb6\x6c\x68\xfb\x5e\x3a\x82\x75\x79\x07\x1d\xd7\x42\xb3\x2b\x21\x63\xc2\x6d\x36\x6a\xc5\x86\x7d\x66\x86\xe0\xc8\xc2\xb1\xf3\x8e\x47\x13\xdf\xb0\xf1\x41\xbb\xa7\xed\xff\x53\xb7\xde\x9f\x06\xf0\xa9\x3c\xfb\xee\x0b\x51\xec\x64\xc5\x68\xf6\xb2\x15\x3b\x07\xaa\xdb\xf2\x0a\x18\x88\x14\xd9\xe5\x0e\x08\xd1\x25\xdb\x5c\x02\xc1\x7b\xc4\x53\x3b\xbb\x75\x1e\x4b\x2b\xd3\xcf\x30\x7f\xcd\x06\xc2\x08\xf8\xf6\xf9\xfb\x37\x20\xfc\xf5\x6b\xf2\xa6\x55\xf7\x41\x26\xb1\x96\xac\xbb\x3e\x25\x35\xf8\x52\x8c\x3e\x99\x24\xd6\x85\xf3\x25\x1e\x67\x3b\xfd\x0d\x27\x19\x9b\x7c\x39\x87\x18\x44\xf6\x4f\x74\x8c\x47\x7d\x17\x33\x12\x53\x7d\xf3\x97\x3c\x15\xb4\xf3\x12\x7c\x6a\x79\x3f\x01\x1c\xae\xee\x2f\xe6\xea\xfe\x2a\x98\x77\x6f\xe9\xa7\x1d\xb8\xb6\xc5\x4a\x0f\x66\xd7\xe6\x05\x27\xad\x33\xb2\xbd\x34\x4b\x4d\xc5\xb6\x19\xe4\xb3\x07\xe4\xf5\x17\x62\x7d\xe9\x43\x5e\xfb\x6d\xb4\xab\xd7\xd8\xbf\xbd\x1f\xc4\x03\x08\xfb\x73\x17\x9e\xfa\x2a\x4c\x42\x4f\x01\x60\xc7\xf4\xb6\x7f\x18\x76\xf3\x4a\xd8\x33\xb3\x36\x7d\x6e\xc5\xac\xcd\x0b\xfd\xe2\xae\x5c\xb9\x1c\x0f\x35\x86\xe0\x52\x30\x20\x67\xa5\xd4\x1a\x94\xf8\xcb\xd9\x62\x7c\xca\x86\xba\xe0\x00\xd5\x0e\x8c\x50\x90\x53\x9e\x5a\xb2\xcf\x61\xac\x18\x34\xb3\x21\xe6\xbb\x02\x76\x28\x3f\x05\x55\x3f\x82\xf8\xb2\x9b\xce\x72\x00\xf8\x44\x43\xd1\x23\x68\xaa\x49\xc2\x22\x48\xce\xa9\x4e\xd4\x4a\x10\x20\x54\x47\x80\x25\xc4\xb2\x69\xa6\xdd\xe1\x89\x4b\x0b\x68\xb1\xe4\x79\x29\x13\xfd\x47\x23\xe3\x58\x89\x69\x5a\x95\x28\x9e\x01\x20\x46\xd3\xf0\x46\x18\x73\xb3\xd5\x00\xef\xbd\x04\x4f\x84\x9d\x39\x9a\xb2\xb4\x42\x28\x8d\x43\x6e\x36\x89\x01\x72\x6d\x3d\x2c\x54\x26\x5c\xe7\xa6\xe1\x95\xb3\x7b\x99\x8f\x8b\x3a\xa6\x9e\xfc\x02\x84\x55\x0e\xde\xd7\x97\x70\xcc\x3e\x98\xad\x82\x9c\x69\xb5\x0f\x80\x31\xb6\xed\x6e\xbf\x45\x11\x02\xc3\x5d\x5b\xae\x6d\x5b\xbb\xa3\xb6\x53\x24\xba\xd3\xa7\x5c\xf9\x3a\x26\xcf\xb3\xd1\x50\x6f\x82\xb6\xb8\xb1\x20\x5f\xfa\x46\x0f\x1a\x03\xd9\xc2\xb1\x66\xea\x21\xf7\x3d\xef\x75\xaf\x77\x80\x88\x10\x63\x78\xa6\x0a\x0a\x4d\x61\x7e\xdf\xbc\x1e\x94\xa0\x6d\x78\xfd\xa0\xe8\xde\x55\x6b\xa8\xe9\xe5\x8c\xd5\xa2\x16\x30\x1c\x03\xf7\xd7\xe2\xf7\x54\xa9\x12\x95\x8d\x19\x4e\xdf\xb0\x6d\x9f\x7d\x9c\xb3\xbc\x5a\x8a\x02\x94\x54\x85\xd9\x3c\x52\xd7\x09\x37\x87\x00\x13\xf3\xc6\xf7\x83\x91\x9f\x28\xf7\x53\x4a\x5a\x6b\x5d\x61\x45\x46\x89\x25\x75\x20\x7f\x38\x22\xd0\xe8\xdc\x8d\x50\xab\x0c\x9c\xfd\x31\xda\xd9\x4e\x1a\x8c\x3f\xd0\x5d\x0d\xbc\xbf\xbf\xc0\x59\x58\x69\x18\xac\xb9\xbe\x1f\x08\x6e\x00\x6b\x27\xfc\xac\x5e\xdc\x5e\x5c\x8d\xd8\x2f\x6f\xae\x00\x45\x77\x73\x71\x7b\x75\x62\x53\xbe\x36\x5c\x10\xf0\xd9\x51\x55\xa1\x51\xb8\x9a\x69\x00\xf3\xb8\xbd\xb8\x7a\x62\x8d\xe2\xdd\x43\x75\x9b\x7e\xad\x3d\x1f\x0c\x9b\xc2\x61\xf0\xc1\xb8\x89\xb3\xc3\xb7\x27\xff\x0b\x6e\x92\x86\xfe\x29\x5c\x76\x9e\x76\x8b\x90\xa0\x00\x1f\xcc\xc3\x03\x59\xe7\xf8\x6a\x95\xc9\x00\x7e\x6f\x59\x2f\x16\x1f\xfa\x50\xb7\xfc\x07\x9e\x2b\x34\x90\x14\x82\x82\xa6\xa2\x6f\x97\x8e\x8b\xbb\x28\x3d\x95\xb2\x17\x60\x96\x21\x4c\xb1\x15\xd1\x1c\x33\xb7\x46\x18\x6f\x74\x39\x19\xb1\x0f\xd7\x83\x0c\x31\xc1\x87\x31\x9e\x14\x4a\xe3\xb1\x24\x21\xae\x55\xc5\xf7\x35\x94\xdc\x2d\xb1\x0c\x92\xd2\x02\x1f\xe8\x30\x60\x79\xeb\x51\xdc\x33\x04\x99\xd1\xc8\xf5\x85\x7b\x61\xb3\x01\x98\x95\x51\x99\xc0\x64\xa2\x22\xd7\x88\x5a\xa5\x22\x7a\x60\x85\x0b\xaf\x65\xa3\xe7\x68\x95\x71\xe7\xb9\x80\xb3\x73\x52\x47\xa8\x6f\x70\xea\xed\x5d\xff\x7d\x1b\xe3\x56\x65\xde\x43\x74\x16\xa4\x39\x9c\xea\x6e\x9b\xc4\x06\x65\x30\x0d\x0d\x6d\x4f\x75\x4d\x12\xf2\x99\x1b\xa8\xcd\xb1\x66\x99\x32\x17\x42\xae\x52\x31\x98\xe8\xc2\x0f\xfb\x8c\x54\xe7\xd2\xeb\x22\x3c\x8c\xe7\xeb\xe7\x22\xba\x67\x24\xaa\x3a\x1a\x7a\xa3\xc0\x7c\x13\xc8\x7c\x36\xd9\xa6\xcd\x3f\xde\x58\x1e\x32\xac\x20\xc5\x69\xba\xd7\x60\xfe\x4d\xe2\x34\x04\xe7\x29\xd3\xac\x64\x6c\x16\xb7\x05\x3f\x08\xfc\xfe\xb3\xc5\x52\x5b\x08\xd7\xca\x52\xa1\x11\x39\xf0\x2d\x8f\x8e\x26\x20\x00\x92\x38\xa6\xb8\x05\xe1\xc4\x06\xd5\xc5\x53\x99\xa9\x82\x41\x1a\xb4\xc8\xd3\x82\xb5\x5e\xef\x45\xb6\xae\x73\x80\xf7\x1f\x6e\x3d\x56\xd0\x6c\xfb\x60\xed\x00\x02\x06\x90\xc4\xda\xc8\xd2\x6a\x06\xce\xf4\x9f\x3f\x8b\xdc\x6c\xb6\xdc\xec\xd7\xed\x7a\xd5\x06\xff\xb7\xcc\x04\xc3\xcf\x20\xea\xcb\xd1\x6f\xbc\xdf\x18\xea\x8d\x86\x2f\x4c\xc6\x67\xab\x46\x60\x2e\x3e\xa2\xb4\xc9\xd1\x88\x4d\x8e\xde\xba\x7f\x43\x04\xa9\xc5\x8a\xda\x9f\x5b\xce\x62\x4d\xae\x91\xb6\x7c\x81\x8b\x15\x08\x02\x65\x21\x10\x0a\xe3\x48\x7c\xce\x37\x55\xb0\xb7\xc1\x46\xff\xd1\x13\x0d\x7c\x90\x4d\x3c\xcf\x73\xdb\x4c\x53\x5e\x10\x00\xe6\x6a\x5d\x2d\x89\x3a\xa1\xa2\x1f\x35\x42\x4b\x2e\x6e\x15\xf5\xf6\xe2\x61\x21\xd0\x92\x51\xc0\xa4\x01\xc1\x1f\xf4\x6e\xe7\x43\xdd\x9f\x74\xf4\x1f\x06\x53\x40\xad\x0a\x4e\xf9\xfe\x0b\x59\x0a\xc8\x56\x0e\xcf\x4f\x41\xba\xc5\x2d\x1c\x41\x43\x90\x07\x6d\xb5\xc9\x6c\xed\x42\x0b\x82\x6d\x66\x7f\x0b\xb6\x80\xfd\x7d\xcc\xde\xc9\x8f\xe2\x01\xa2\x4c\x65\xeb\x68\x56\x68\xc0\x9c\x8c\x41\xd6\x19\x5e\x9a\xbb\x40\xf8\xcc\x83\x36\xdc\xcf\xcd\xc4\x87\x5f\x85\x13\x40\xfb\x2c\x62\x72\x10\xe3\x1c\xce\xe8\x85\x96\x66\xf3\x74\x05\x45\x7e\x69\xec\x07\x97\x09\xd2\xbe\xd1\xb2\x55\x79\x4a\xed\xbc\x78\x63\x29\xa4\x54\xec\xff\x99\x09\xfd\x2d\xa4\x45\xf6\xf7\x27\x5d\xe9\x4f\x2f\xf5\xdc\x75\xc3\xef\xec\xb3\x7f\x26\x6d\x16\x94\x7a\x84\xc0\xf7\x23\x7b\x1b\x8d\xd9\x5c\xdd\x8b\x82\x02\x0b\x38\x46\x87\xb9\x0a\xc0\x71\x3c\x21\x91\x7f\x19\x94\x1d\x61\x54\x77\x24\xce\x02\x1d\x5e\x18\x20\x6f\x04\xbe\x47\x51\x34\x53\x00\x37\x27\xf5\xc4\x4a\x34\x07\xa7\xd3\x01\xf2\xfb\x35\xfb\x76\x7e\xc3\x90\x5f\x8d\x71\xd3\xfe\xe0\xd1\x29\x17\x39\x14\x79\x1a\x94\xfc\xad\x45\x72\x6e\xb0\x90\x5d\xa1\xbd\xed\x1d\x3d\x07\xbc\xb7\x31\x52\x1f\x44\xa0\xf5\x85\xd8\xe5\xdb\xe4\xa4\xd6\xfb\xdb\xcf\x74\xa1\xb7\x27\x65\x61\x3f\x40\x00\x3e\x2b\x04\x40\x7e\x62\x08\x40\x53\xf0\x38\xc0\x00\x0e\x30\x80\xe7\x85\x01\x34\x69\x6e\xff\x50\x80\xf6\x2b\x60\x1b\xc6\x7c\xd3\x77\xc9\xf5\x73\x63\xe8\xe2\x49\xdc\x58\x8b\x77\x32\xaf\x1e\xcd\xaf\x55\x7e\xae\x7f\xd1\x00\x73\x83\x6a\x89\x98\x59\x21\x83\xee\x0c\xe1\xcd\x34\xfc\xb3\x85\x75\x1b\xa5\xf1\xaa\x90\xf7\x32\x13\x73\xf1\x56\x27\x3c\xeb\xa8\x8e\xdc\xd5\x32\x2c\xa0\x26\x67\xa4\x0f\x24\xdc\x97\xd3\x72\x41\x9c\x2b\xfb\x32\x13\xee\xed\x66\xc2\x82\xd0\x55\x52\x16\x51\xb2\xb8\xa9\x52\x99\xe0\x50\x1c\x9a\x94\xdd\x8b\x9b\xcb\x37\x85\x34\xac\xa2\xe5\xe6\xa9\x37\xa1\x9c\x4b\x86\xfe\x33\x67\xa7\xcd\x64\x2e\xd8\xc5\xcd\x25\x4b\xa9\x11\x56\x09\xa2\xe4\x18\xa1\x2e\x2f\x4a\x32\xe4\x8a\xe5\x54\xa4\x61\x29\x04\xf8\x64\x28\x73\xeb\xcd\x4a\xc8\xfe\x64\x9e\x42\xb4\xb0\x55\xb0\xf2\x75\x30\x56\x94\x7b\x62\x06\x1e\x5b\x98\x8d\x58\x2d\xc4\x52\x14\xe6\xba\x52\x59\xb5\x14\xfb\x66\xeb\xf5\x85\x01\xae\x6e\x17\x94\xaf\x50\x47\x94\x6d\x16\xa9\x96\x46\xf1\x75\x94\x84\x4f\xd0\xb6\x83\xdf\x48\xc4\x40\x3a\x63\xea\xac\xe0\x81\xd2\x18\xf7\x9a\x87\x36\x28\x4a\xe2\xc1\x61\xd5\xbd\x05\x97\xf1\xaa\x5c\xa8\xe2\x18\xb2\x1d\x25\x85\x40\x82\xfa\x5f\x6b\xfe\x30\x8c\x1f\x81\xdb\x7e\x5e\xe6\x3a\x41\xd8\x79\xdb\xb7\x18\xb9\xc0\x9e\xb0\x37\x85\x5a\x85\x0f\xb7\x8b\x9b\xa6\xde\x7f\xca\xc4\xe3\x5f\x71\x13\x3b\x57\x33\x68\xd3\x42\xa1\xd6\x19\x60\x5a\x59\x72\x60\xec\xad\x05\x15\xe7\x32\x6b\x10\x59\x96\x85\xad\xed\xe2\x19\x2a\xb3\xde\x61\xa8\x1a\x2c\x28\x37\xa0\x00\xad\x5f\xde\x0b\xf4\xd6\x3e\x58\x98\x43\xa5\xf9\xdc\x85\x30\x87\x1d\x86\xfe\xb0\x9c\x82\xa8\xe9\xd9\xe4\x88\xec\xc4\xcf\x42\xb1\x7e\xa5\xc2\x35\x86\x52\x51\xed\x75\xc0\xea\x2d\x82\xf5\x65\xf5\x05\xc6\x8a\x57\xa6\xd5\x98\x96\xb7\x65\x5d\x7d\xa3\x68\x59\x9f\xe5\x6b\xed\xac\xc3\x6f\xbd\x2a\x54\xf2\xb3\xaa\xf2\xb2\xc3\x64\x7c\xde\xd6\x6c\x03\x55\xc5\x0d\xc7\x1b\xe9\x0a\x7d\xf9\x0b\x61\x73\x16\x44\xef\xc6\x54\x46\xf9\x8d\xa8\x02\x18\xc0\x54\xa2\xc6\x33\xc1\x8d\x00\xc2\x66\x19\x9f\x5b\xa6\x8a\x85\xc5\x76\x3a\x65\xbf\xe4\x9a\xcf\xc4\xcd\x5a\x27\xad\x09\x65\xda\x5a\xc5\x6c\x2b\x60\xf3\x76\x65\x2a\x68\xcd\x34\x36\x8f\xaf\xa5\x1c\x52\x0d\x40\x80\x00\xd6\x18\x32\xa7\x08\xc1\x16\x9c\xad\x32\x2e\x73\x7a\x8f\x12\x22\x14\x46\x5e\x05\x9e\x06\xd9\x0a\xcd\x3f\x6c\xf2\x21\x04\xf4\x40\x50\x41\xae\x65\x2a\x0a\x4c\x52\xc4\x83\x1a\x98\x76\x46\x34\x95\x31\xbb\xc1\x3c\x37\xdf\xb0\xa5\xe0\x39\x3a\x2b\xe2\xd9\xa2\x59\xdb\xa6\x1c\xfd\xaf\x6a\x2a\x32\x51\xb2\x05\xb7\x4e\x23\xa2\x03\xf3\x62\xfb\xe7\x86\x0b\x62\xf8\xf5\xbd\x92\x29\x29\x4b\x86\xc5\x4e\xf2\x49\xfe\x96\xaa\xfd\xbc\x66\x3e\x3b\xe5\x99\xf9\x38\x72\x69\xe3\x0f\x53\x5e\xa0\xd3\x01\xff\xf8\xd5\xfc\x01\x05\x63\x82\x94\x96\xf5\x97\xc6\xe1\x4b\xe3\xe0\xa5\xad\x48\x83\xf6\xeb\x3c\xed\xb9\xd2\xda\xdb\xf9\x2a\x14\x68\xc0\x26\x3f\x56\xf3\x7a\x73\x16\xd1\x34\xa8\x51\xec\x2e\x35\x56\xe5\x59\x10\x6d\x04\x32\x82\xb5\xe1\x63\x71\xcd\xb4\x50\x2b\xca\xf9\xe2\xae\xa8\x31\xc3\x3b\x8c\xaf\x7b\xae\xb0\x8e\xb9\x6f\xbc\xc5\xe2\x6b\x16\xa7\xed\x7c\xcb\x41\x42\x57\xe7\x4d\x00\x6c\x8f\x10\xcd\x42\x50\xc4\xfb\xdb\xee\xd1\xbe\xb8\x90\xee\xed\x1a\x2c\x8e\xf6\xbc\x60\xb3\xa3\x34\xb6\xd1\xe5\x53\xb1\xae\x22\x73\xd4\x54\x62\xab\x29\xcd\xcd\xe1\x85\xe4\x5e\x4e\x5a\x85\x9d\xce\x99\x51\x2d\x29\xdf\x2e\xbd\xd0\x2e\x99\xce\x54\x31\x95\x69\x2a\xf2\x4e\x7e\x54\x6f\xd1\xc9\x8b\x5c\xc3\x2f\x81\x0d\x35\x26\xd3\xca\x88\x42\x0e\xe4\xde\xd8\xcc\x30\xb0\xd9\xb6\x1c\x23\x7a\x6b\x3f\x2c\xc3\x2a\x49\xcd\x0d\xd3\xae\x34\x7b\x39\xa0\x92\xbb\xab\x5e\x6f\x73\xbd\x50\x99\xe4\x96\x52\xee\x3b\x48\x07\xed\xa5\xfd\x21\x55\xab\xd2\xe5\xe5\xd5\x45\x73\xfe\xf4\xa0\xa6\xa9\x05\x6a\x6b\x00\x43\x32\xba\xaa\xc2\x1c\xb5\xe6\x15\x07\x22\x25\x05\xa7\x95\xe4\x4d\xff\xe4\x14\x6b\x1f\xdc\x06\x24\x6d\x39\x01\xfb\xda\xe0\x49\x5c\x5d\xbe\x69\x9f\xc0\xd5\xe5\x9b\x6d\x07\x37\xaf\x0c\x1f\xb8\x3d\x2a\xd1\x3d\x0a\x07\xc7\x33\xe7\x0a\xac\x62\x19\xbb\xe8\xce\xb6\x22\xd1\xe3\x4a\xed\x5f\xba\x8c\x6b\xc4\x02\xee\xc4\x72\xba\x16\xb3\x9e\x7f\x36\x44\xcf\x37\x8a\x5e\x95\x1b\xce\xe1\xdf\x6b\x5f\xb4\x42\xf0\xf4\x43\x9e\xad\xaf\x95\x2a\x7f\x92\x99\xd0\x6b\x5d\x8a\x96\xb0\xde\xf6\x76\xa8\xa4\x90\x46\x5e\x16\x15\x95\x26\x06\xdb\x8b\xbf\x7d\xb1\xae\x5e\xe5\x8a\xcc\x9b\xbe\x50\x8a\x2d\x94\x2a\xd9\x4c\x66\x20\xf0\x94\x62\x69\xd1\xaf\xe1\xd5\x1d\x5d\xd3\x61\xc5\xe0\xa0\xc7\x5c\xe5\xa7\xdd\xbd\xa2\xe0\x7b\x73\x65\xcd\xd5\xa9\xc8\xd7\x11\xe2\x89\x3e\x60\xc6\x33\x2d\x6a\xa3\x83\x75\x7a\xc8\xd4\xcd\x5e\x00\x20\x03\x32\xd1\x4e\xab\xd2\xc1\x33\xe8\xbe\x46\x83\x14\x2b\x55\xd7\x46\xb4\x0b\x0a\x6d\x5b\xd1\xde\x12\x28\x37\x92\x60\x1a\xd2\x91\x91\x72\x56\x22\xf5\xf6\xdb\x40\xed\x67\xb7\x90\x0e\xbe\x5e\x35\x3c\x78\x0b\x9c\xcb\xce\x8e\x0b\x22\xcb\x76\x8c\x1d\xcc\x63\x1d\xbc\xfd\xda\x3d\x1b\xc0\xde\x9d\xbc\x03\xd1\xe4\xc1\xab\x94\x07\x8e\x2a\x4c\xaf\x6d\x32\xe5\x26\x94\x46\x2d\x65\x59\x7a\x18\x77\x7a\xac\xc3\x6e\xa0\x56\x3b\xff\x28\xc0\x50\x74\x8f\x19\xec\x03\x84\x44\xa4\x51\x05\xaf\x59\x75\x6a\x0e\x73\xac\xab\x53\x3b\xf0\x08\xdf\x77\xcb\x35\xe3\x8d\x8d\x4d\x12\xb1\x8f\x76\x5b\x4b\x78\xb3\x63\x29\x9f\xf0\x21\xa6\xdb\xf6\xef\x28\xe5\x52\x40\x8e\xd6\xd6\x4f\x71\x4f\x77\xf9\x1a\xf7\xb2\xb0\x25\xbf\xda\x71\x8e\x2d\x04\x11\x0e\x0d\xd9\xf5\x5c\xe3\x2a\xf7\x21\xe1\x63\xf6\x16\x8d\xcd\x90\x5f\x58\xcd\x62\xb8\xf9\x0a\x44\x3d\xc2\x64\x85\xd3\x89\x89\x65\x2a\xa0\x84\xe7\x53\x89\xc5\xf5\xde\xb2\xcc\xd6\x4a\xdd\x74\x14\xe3\x83\xad\x17\x17\xc3\xbf\xf6\x44\x20\x37\x6f\x61\x12\x6d\xf3\x6e\xda\xd1\x9b\x9f\xd0\x68\x33\x54\x46\x0c\xdf\x44\x69\x11\xf9\xe8\xfe\xe5\xc5\x9b\xc6\x1c\x5b\x3e\xf6\xbe\xcb\x46\x79\xdf\x30\x4c\x36\x0c\x67\xd8\x84\xad\xb2\x6a\x2e\xf3\x2e\xe3\x59\xae\x58\xab\x3d\xf2\xd6\x3a\x07\x8c\xf2\x60\x5b\xac\x49\xfb\x35\xd2\xd8\xf1\x37\xc7\xdb\x30\xfb\xed\x1d\x4e\x0d\x6b\x78\x9f\xf7\xa8\x69\x8c\x1c\xf8\x86\x33\xe8\xf5\xb5\xef\x10\xf1\xb7\xab\xfe\xdf\xd7\xba\x9b\xc7\x0f\x7a\xb3\x8d\xa9\x0e\x78\xb1\x93\x53\xf4\xbd\xdb\x71\x50\x7b\x5f\xeb\xa5\xfe\x7e\x77\xe1\xb5\x30\x1a\x39\xbf\x11\x43\xc3\xc8\xba\x22\x65\x7c\x47\xcd\x10\x19\xbe\x5a\xd9\x11\xbf\x3d\xf3\x0d\xb7\xaa\x7d\x1c\x0e\x80\x80\x77\x6b\xba\x0e\x82\xae\x30\x4e\x8b\x50\xd9\x90\x84\x5e\x26\x1c\x99\x4f\x51\xe5\x90\xce\x9d\x3c\x55\x18\x59\x66\x76\xec\x00\xc8\x3b\x00\xf2\x7e\x93\x28\x0b\xd2\xfa\xde\xa1\x48\x01\xa5\x97\x82\x33\x64\xce\x04\x85\x0d\xbb\x2a\xf4\x64\x80\x73\x4a\x8a\x0b\x75\xe0\x2e\x1e\xf7\x85\x3e\xf1\x40\xfd\xa0\xbb\x25\xcf\xf9\xdc\xd0\xd5\xbf\x02\x0c\xb0\x81\x90\xd0\x83\x52\x81\xd2\xef\x21\x03\xfc\x1a\x8a\x1e\xfb\xf9\x6e\x57\xee\x79\x09\x75\x1d\x44\x82\xc5\x0d\xd4\x14\xe2\x96\xd2\x5a\xde\xf7\x70\x31\xe0\x62\x31\x1b\x68\xc5\x28\xca\xa5\x99\x82\x34\xbf\x66\x5a\x41\x79\xb1\x3c\x55\x0f\xf0\xba\x61\xde\xec\x4a\xad\x2a\x17\xd9\x04\x7b\x41\x56\x8f\x6b\xc1\x53\x88\x62\xf8\xea\x56\x79\xe7\xea\xd2\xb5\x9d\x1a\x7e\xf7\x3f\x63\x8d\x69\x3f\xc8\x85\xca\x53\x69\x1d\x1e\x5d\x92\x46\x4b\xf3\x5a\x06\x7d\x57\xad\x80\xdb\x0b\x1e\x0b\x9b\x80\x1f\x49\x14\x10\x0e\x03\x9c\xbd\x0f\x62\x04\xcf\x1c\x31\x37\xd0\x43\x19\xd7\xe5\x6d\xc1\x73\x0d\x93\xb8\x95\x6d\x59\xe2\x6f\xe1\x0e\xd6\x25\xd0\xa2\x35\xfe\xd0\xac\x4b\xf7\xae\x35\x0e\xa9\x5c\x58\xea\xf7\x75\xab\x9f\x16\x74\x05\xd3\x82\x5b\x40\x6b\x3e\x6f\x99\xe1\x39\x5b\x54\x4b\x30\x64\xf2\x14\x34\x4c\x6a\x69\x75\x18\x2c\x0a\x59\x72\x99\x69\xc6\xa7\xae\x6e\x9f\x9b\x7b\x7b\x49\x17\xc1\x75\x9b\x30\x74\x0b\xa2\x9c\x79\xe6\xb2\xfa\xbb\xf5\x38\xd6\xb4\x52\x9b\xbb\xee\x61\x2d\x6a\x16\xf7\x3a\xb2\x85\xa0\x6e\x0b\x23\xf8\xfc\xc4\x33\x2d\x46\xec\x97\xfc\x63\xae\x1e\xda\x07\xc0\x1f\x1a\x33\x5f\xaf\xa0\x9b\x90\xa2\xdc\x20\x4f\x8c\x68\x8f\xce\x0e\x6c\xd8\x36\xa7\xa6\x0f\x57\x1d\xb7\x6c\x2b\x3e\xed\x5b\x1c\xd2\xa0\x7d\x21\x02\x70\x07\x06\xda\x06\x45\x86\x3b\xd6\x36\xcf\xb8\x88\x56\xaa\x12\x6d\x66\x99\x88\x55\xa9\xcf\x1e\x54\xf1\x31\x53\x3c\xd5\x67\xbe\x86\x86\x3e\x23\xba\x36\xe3\xf8\x9f\xf7\xeb\x7b\x09\x34\xc9\x03\x92\xfa\x37\x8e\xa4\x8e\xe7\xfb\x79\xc0\xd4\x01\xbd\xed\x1f\x45\x5d\x93\xa4\x06\xf1\x5f\x9b\x1e\xa4\x55\x21\x08\x75\xaf\x7e\x8b\xc3\x52\xe6\x46\x7c\x5d\xdf\x08\x73\x09\xb5\x70\x8a\x9f\x65\x2e\x97\xd5\x32\x30\x78\x68\x6c\x4a\xf0\x0f\x09\x11\xae\xb9\x78\xc8\xd6\x2c\x29\x04\xa7\x5c\x0c\x41\xda\x58\x23\x10\xac\x7d\xd5\xb9\x1c\xa3\xe7\x4b\x1d\xf8\xe9\x92\x82\xeb\x05\x64\x75\x05\x00\xaf\xf5\x82\x86\x30\x8a\x7b\x2e\x33\x23\x56\xc4\xc5\x7e\x5e\xb2\x17\x66\x30\xeb\x21\x6b\x7b\xc1\xa8\x94\x5a\x29\xf0\xa7\x22\x3a\x03\x26\x74\xe2\x97\xc6\xf0\xf4\x39\x30\x29\x34\x02\xe1\x4f\xdf\x7d\x8b\x02\x08\x5a\x76\x3a\xb7\xc3\x29\x21\x7e\x81\xac\x3a\x66\xdf\x25\x7d\x03\x98\x11\x70\x09\xac\x70\x97\x4a\x6d\xb8\x50\x25\xf5\x82\x4d\x45\xf9\x20\x44\xee\x60\x2b\xec\x57\x51\x28\xb8\x5c\xc2\x9a\x43\xd1\xa7\xbf\x7a\x4e\x86\x7d\xf6\xbb\x87\x05\x2f\x4f\xa5\x3e\xe5\xa7\x3d\x1c\x7d\xd3\xea\xe9\x9e\x44\x0c\x94\x1c\x8c\x12\x0c\xfc\xa3\x12\xc5\x1a\x0b\x27\x62\x6e\x06\x30\xf1\x23\x1d\xf9\x4a\x50\x56\x70\x4a\x54\x95\x97\xae\x54\x91\x0e\xfa\xf3\x39\xca\xa4\x8e\x2d\x0d\x78\x91\x83\x95\xc2\x26\x35\xf3\x49\x8c\x59\x29\x96\xab\x0c\x8a\x52\x81\x25\x83\x7d\x14\x6b\xed\xcb\x10\x85\x98\x76\x9c\x8d\xcc\x99\x2a\x52\xdc\xcc\x69\x50\xdc\xd1\x67\x7b\x08\x84\xbc\xad\x77\xcb\xac\xc3\xbd\x14\x0f\x67\x94\xf3\xe7\xd4\x9c\xa0\x53\x0a\x51\x3a\xc3\xaf\x38\xfb\x1d\xfc\xf7\xd4\x7e\xfd\x13\x79\x64\x3d\xaf\x82\x5d\x90\x16\x29\x96\x9e\x58\xe2\xa7\x2b\x13\xeb\xa9\x46\x4a\x14\x2c\x6c\xe8\xc5\xb6\x4c\x42\xce\x98\xcc\xa1\xc4\x72\x02\xd7\x65\x64\x43\x4d\x45\x29\xd0\x3d\xf7\x7c\x34\xfe\xbb\x95\x4a\x4f\xdd\x27\x0e\xaf\x03\x77\xa5\x52\xfb\xf9\x83\xa2\x27\x6d\x11\xb8\xfa\x7b\xcf\x14\xe7\xde\xd0\xb5\x87\x5d\x29\xa8\xf5\x04\x05\x9b\xcb\xd6\x0a\x7a\x7d\xb7\x4b\x28\xe3\x3b\xde\xd9\x14\xf3\x2d\x73\xbe\xee\x64\xaf\xb7\x11\x4b\xf5\xdc\xdc\x91\xc9\x0b\xbc\x57\xc0\x2b\x6c\x73\xeb\xd4\x6e\xb3\x93\x20\x1b\x79\x70\x12\x87\xf1\x2e\xa7\x94\xb5\xf3\xfe\x70\x99\x48\x37\xf0\x93\x44\x13\x94\xaf\xc9\x1a\x19\x10\x8e\x75\x5c\x0f\x71\xcf\xc8\xa4\x36\x33\xc8\x3f\x47\x47\x8f\xa7\xfe\xd8\x9c\xae\x0c\xff\x3a\x5d\x8a\x62\x2e\x4e\x3f\x8a\xf5\xd1\x6b\x6b\xa2\x68\x69\x65\x7d\xb0\x47\xaf\x8f\xe0\x05\x40\x67\x56\x59\xb6\x06\xc2\x14\xe9\xd0\x2d\xf4\x2c\x1d\x6a\xd9\x12\x1b\x76\x39\x17\x03\xd6\xac\x66\x0d\x96\x6c\x7f\xb3\xbb\x3f\x78\x17\xad\x31\xf0\xcf\x22\xa7\xb2\x02\x2d\x99\xeb\x1a\x6d\x58\x21\x66\x3e\x51\xd0\xdc\xff\x4e\xd3\xe8\x30\x38\xb6\x1e\x8d\xf6\xd9\xfd\xf0\xbd\xc5\x6f\xad\x87\x2e\x20\xd2\xbb\xa3\xff\x27\x90\xf6\x70\xa1\xa6\xfe\xa1\xf8\x9d\xe1\x9c\xac\x88\xf3\x85\xcb\x22\x4f\x91\xfa\xfd\x39\x1a\xc0\x7d\x55\x96\x4d\x79\xf2\xf1\x02\x4a\xef\x0e\xf3\x74\xf6\x4b\xe9\x85\xb8\x97\xed\x46\x11\x34\x84\xe1\x53\x80\xd5\xd1\xf8\xa0\x6c\x7a\x70\xdc\xcb\x51\xf8\x84\x0e\x1b\x6c\x2d\xbe\x3a\x88\x5e\x77\x2c\xa7\x68\x96\x44\xe6\xf3\x5f\x40\xdf\x7d\xc3\xc5\x52\xe5\x3d\x4e\x60\xd0\x6f\xb0\x38\xb3\xd9\xe2\x4e\x1f\x47\x0a\x9d\xc1\x37\x16\x38\x08\x69\xd5\x03\xf4\x1e\xfe\xf8\x4b\xee\x18\x76\xfb\xba\x2e\xf9\x63\x4d\xf5\x71\xb3\x0f\xb8\x99\x0d\x3f\xf4\xbd\xb1\xb4\x2a\x2c\x4b\xa3\xf9\x30\xa8\xae\x6f\xdb\xf2\x9c\xf1\xa9\x56\x59\x55\xba\xf3\xfd\x42\x3c\xbe\x66\xff\x7e\xc2\x10\xe3\x24\x0a\x73\xe2\x6c\xe0\x98\x2a\x79\xd6\x3d\x09\xf2\x90\xe9\x92\x17\xa5\xe5\x4f\x38\x2a\x76\xfa\xea\xe5\xbf\x9d\x8c\xd9\x79\x6d\x3c\xc8\x1f\x96\x25\xe4\xd0\xc0\x00\x5a\x3f\xea\x74\xcd\x0a\x55\xe5\x29\xae\xe8\xd8\x25\x43\x25\xd3\xc5\x4b\xa7\x89\xd8\x00\x4d\x6d\xd4\x11\xc2\xa6\xbf\xb6\xc1\x6f\xa8\xf3\x10\x05\x7e\xf7\xf2\xdf\x46\x66\xae\xc0\x51\xbe\x7b\xf9\x6f\x76\xaa\xf5\xaf\xcb\x55\x2a\x62\xd1\x7f\xea\x5d\xea\x40\x08\xb8\xe9\x90\x15\x52\x8e\xc5\x98\x84\x93\x31\x11\xc8\x7b\xe8\xc9\x50\x56\x5a\x65\x22\x3d\x81\x35\x87\x1b\xa7\x5c\x08\x49\x9a\x85\x2e\x09\x49\x69\x96\x3b\xb7\xcb\xd5\x74\xd8\x43\xc6\x37\x7a\x0a\x0b\xac\xc1\x3b\x64\xde\x26\x0f\x7f\xfc\x39\x4a\x8b\xc6\xf6\xe4\x29\xe6\xdf\x9b\x1a\x9a\xd0\xac\x5a\x19\x65\xb9\xde\x0a\x21\xd2\x66\x7a\x19\x4f\xc4\x98\x7d\xc8\x13\xb4\xf2\x9b\xb6\xd8\x4f\x21\xbc\x80\x01\xca\x0d\xf4\x0a\x41\x14\x02\x40\x6a\xa5\xa2\x9c\xe3\x71\xdf\x23\x56\x2e\x2a\x8d\x48\x06\x5c\x43\x5e\x7a\x89\xe9\x3f\x70\xea\xaa\x90\x73\x99\x6f\x24\xb3\x70\x7c\x46\x81\x7c\x66\x91\x74\x0b\xb9\xef\x2d\xe1\xec\xa7\xc9\xe7\x1a\x73\x28\xb1\xca\xd4\x7a\x29\xf2\xbd\xb0\xa8\x1d\xf8\xd2\x4d\x55\xb4\xf9\x57\xda\x39\x52\x83\x0f\x69\x4b\xf9\x8c\x4f\x15\x52\xbd\x9b\x58\xfc\xda\x93\x98\x92\xed\x12\xc6\x0f\xf8\x8c\x4b\x9b\x6c\x59\x85\xd1\xf3\x7e\x8e\x98\xad\x61\x0a\x2f\x9f\xca\x91\x7e\x74\xc9\x25\x47\x8c\xfb\x3a\xc1\xaf\x6c\xb4\xc8\x10\x6e\x64\xcf\xd7\xf5\x85\x5f\x3c\x6e\x56\xae\x5a\x31\xb9\x5c\x8a\x54\xf2\x52\x84\xb1\xbc\xf1\x66\x12\x47\x18\x61\x96\x37\x07\x55\xa8\x33\x34\x95\xa5\x14\xfd\x45\x27\x39\x55\xb0\x38\xe2\xd1\x1c\x5c\xf6\x8a\x98\x47\xb8\xa0\x74\xfe\xcd\x9b\xf0\x06\xb0\xaf\xa9\x10\x39\xfb\x28\xb3\x4c\xa4\xa3\xce\x69\xcf\xaa\xc2\xb0\x80\x51\xed\xb8\xd7\xe7\x04\xbd\xd6\x70\x4a\xe0\x58\x6c\x1c\x65\xb0\xcf\x10\x9b\x6b\x9d\xea\x1e\x73\x4b\xef\x76\x27\x7f\xc2\x9b\xb8\x8b\xe8\x77\x27\xe5\x54\x3d\xe4\xdd\x87\x06\x38\x01\x1d\x97\x98\xe0\x67\xf2\x51\xa4\x4f\x20\x7b\x43\x5a\x0d\xfa\x31\x93\x31\xad\xfe\xa3\xb9\xcd\x5b\x9c\x07\x22\xde\xe8\xe2\x02\xd5\x65\xb4\x61\x54\x47\xb7\x98\x7b\x94\x4a\xb4\x25\x9c\xba\x0f\x8e\x6a\x83\xb4\x5b\x8e\x1c\x8e\x3b\xf0\xb2\x22\x0a\x8f\xae\xc3\xe7\xa1\xf0\x4f\x74\x99\x75\x22\x52\x37\x19\x82\xba\x5e\x8a\xc1\x47\x0e\x8e\xbd\x5e\x09\xcc\x1b\x9a\xaf\x5d\x92\x54\x5b\xa3\x1e\x0d\x7c\xd1\x0b\xcd\x44\x2e\xdd\x03\x3e\x29\x99\x4b\x51\x65\xa2\x69\x6e\xc2\xd8\xb0\x96\xe8\x04\x1f\x33\x16\xc4\xe0\xda\x50\x32\x35\x63\x73\x99\xc6\x10\x79\x3c\x63\x36\xa1\x29\x88\xa7\x99\xfc\x08\xe1\x22\x18\x36\xc5\x99\xc6\x70\xce\xb9\x24\xb9\x0f\x30\xea\x6b\xff\x00\x7a\xf7\x95\xf3\x31\xc1\x2f\x08\xef\x66\x41\x45\x9e\x8e\xd9\xb5\x8d\xe0\x31\xf2\xe9\xcf\x95\x2e\x61\xb5\xf6\x6c\x27\xba\x7c\xe3\x63\xd7\x8a\xaa\x8d\xdf\x16\x54\xe6\x72\xcf\xe1\x3c\xdb\x62\x1c\x5a\x2b\x5f\xd0\xe4\x07\x1e\x87\x36\x98\x75\xdf\x69\x68\x79\xe7\x59\x0f\x43\xdb\x78\x5f\xd2\x59\xa8\x76\x3f\x0b\xd5\xbf\xf2\x59\xe8\x09\xc7\xfa\xb4\x47\xa1\x33\x70\x60\xf3\x69\xe8\x7a\x8d\x0e\xc4\x9e\xc2\xba\x7a\xe8\x99\x48\xf2\xba\x16\xd7\xd5\xe6\x5e\xe8\x6a\xd9\x95\xd4\xa4\xd1\xb2\x25\xd9\x4b\x14\xfe\x85\x05\x5b\xa2\xed\x74\xa1\x01\xbe\x18\xcc\xb9\x97\xd0\x30\x57\x00\x46\xf8\xbb\x24\x56\x8d\x2e\xa3\x04\xd4\x00\x2d\xa2\x0c\x5a\x20\xb3\x41\x6d\xd1\xa0\x64\x2c\xe4\x87\xf0\xb9\xb2\x60\xa2\xf5\xe0\xc6\xb6\x10\x38\x74\x57\x56\x79\x4c\x81\xc3\xd3\x4b\xd4\xbb\xed\x4c\x2b\xd1\x18\xbf\x96\x0f\xa4\xf1\xbc\x54\x98\x23\x24\xf7\x01\xbe\xb7\x41\xfb\x9f\x7f\xb9\xb9\x05\xa9\xdd\xcb\x88\x01\xaf\x6a\x6e\x22\x2d\x90\xdf\x85\x5c\x66\xbe\xe8\xc1\xb2\x72\xc4\x79\x15\x51\x5f\xf7\x59\x1c\x64\xef\xec\x88\xb1\xd9\x64\x4c\x68\x7d\xe3\xb9\x6e\x9b\x8e\xd1\x9e\xe3\xae\xd9\x1f\x2b\xed\x0e\x57\x6c\x02\x3b\x31\x22\x32\x58\xf7\xd6\x88\x49\xfb\xdd\x61\xb8\x34\x86\xdd\xff\xd1\xff\x16\x5d\x3a\x03\x7d\x1c\x25\xd7\x1f\xc1\xad\x31\x93\xf3\xaa\x10\xa7\x2b\x95\x9e\x3a\xa8\xcb\x99\xa6\x70\x44\xf8\x49\x3c\x96\x67\x5b\x78\x9e\x69\xe7\x5c\xc4\xe1\x40\xc7\x73\xed\xb5\xfe\x8b\xe2\xc6\x68\x66\x9b\x08\x36\x70\x13\x73\xa7\xa6\xd9\x0c\x06\xc8\xd0\x2d\xa4\xee\x10\xf4\x74\x08\x7a\xfa\x6d\x03\x22\x69\x75\x6c\xcb\x3f\x7e\xaa\xe0\xa3\xa7\xe1\xf9\x87\x44\x1f\x85\x47\xae\x1e\x5b\x04\xd6\x9b\x4f\x1d\xf0\xb2\x6b\xf0\xb6\x99\x6b\x5f\x48\x51\x13\xeb\xf2\xf9\x3e\x33\x08\x29\x7a\xca\x17\xef\x1c\xde\xe3\x17\x6c\xd0\x55\xf1\x8c\x41\x3d\x7e\x26\x1b\xae\xa3\x18\x71\xc6\x4b\xdc\x02\x41\xd0\x1b\xd8\x42\xc3\x7c\x2c\x53\x1b\xe0\x6e\xef\xc2\x47\x34\x3d\x29\x46\x40\xe2\x79\x22\xb4\x0b\x44\x21\xbb\x26\xdd\x3a\xbb\x81\x13\x86\x09\x9a\xc1\xda\x0f\xbb\xac\xbb\x30\x5d\x8d\x25\xda\x1d\xda\xd5\xbd\x76\x3c\x29\xab\xd8\x33\x62\x71\x33\x7e\x0d\xc3\x53\xb7\xd5\x12\x6e\xc2\x9a\xee\x80\x2e\xd5\x16\x5e\x5a\x3b\xf8\xed\x12\x5f\xa5\x45\x71\x3a\xaf\x64\x2a\x08\x97\xd9\x02\xcb\xac\xaf\x26\xd6\xe3\x52\x39\xcf\xae\xa2\xf5\x6b\x6a\x5d\x25\x2f\xe6\xa2\xec\xae\x69\x56\xab\xce\x65\xc8\x70\x8b\x0f\xf4\xd0\x64\x2d\x0a\xc9\x33\xf9\x2b\x38\x2d\x82\x78\x7b\x48\x92\xb8\xe4\xab\x53\xac\x50\x05\xd2\x8f\x59\x15\xf1\x68\xe8\x4a\xcb\x7b\x10\xc5\xe9\xa9\xfb\x64\xdf\x73\xaa\x72\xe1\xf3\x5f\xca\xbc\x2c\x94\xe1\x77\x20\xa0\x91\x26\x8b\x02\x82\x46\x6d\x8f\xc4\x13\x8b\x17\xa5\x26\x60\x1b\xc2\x5d\xb7\x41\xc2\xb0\xa3\xa7\x90\x85\x97\xe9\x75\x5e\xf2\x47\x07\x07\xc6\x35\x43\x65\x09\xf4\x66\x5d\xad\x56\x90\x42\xcc\x7f\x88\x9b\xea\x08\x3f\x31\xc8\xfc\x82\x12\x5e\xbd\xa1\x7d\x58\x18\xd5\x94\x62\x41\x3f\x19\xac\x77\x4f\xba\x69\x6f\x22\x87\x4d\x6a\x6a\xdf\xcb\x3d\x1a\xeb\x6e\xda\x6a\xef\xa0\x4f\x2c\x82\xb4\xb3\x41\xb4\x25\xf9\x0c\x66\x40\xeb\xb5\x87\x36\xdf\xfc\x17\x31\x8f\x76\x26\xed\xb1\x39\x1e\xe9\xb0\xb7\xe4\xec\x79\x2e\x3b\xe9\x2c\x53\x0f\x04\xe2\x38\xbb\x7f\xc5\xb3\xd5\x82\xbf\x1a\xff\x94\xa9\x87\x37\x3e\x3c\x43\x14\x3f\x8b\x72\xa1\xd2\x4d\x87\xa3\xe3\x95\xa8\xd6\x9c\x30\x4a\x82\xf9\x11\x2e\x5d\x33\x72\x18\x04\x82\x11\xba\xbd\x71\xc4\x8d\x1b\xb7\x3d\xce\xf4\xce\xfc\x7c\x67\xf7\xa4\xa4\xa8\xd3\xe6\x98\x76\x4a\xc0\x79\x91\x49\x9a\xd3\x09\x19\xaf\xb1\xec\xe1\x8f\xeb\x5f\xb4\x28\x26\x47\x40\x74\xe6\x4f\x57\xfe\x7c\x72\xe4\x09\x70\x47\xfb\x59\xe7\xf2\xfb\x75\xde\xb4\xe2\xf8\x2c\xe6\x3b\xce\x22\xc0\xe9\x6c\xd1\x77\xeb\x31\x7b\xaf\x4a\x61\x73\xb9\xc0\x52\x40\x31\xee\xd4\xe8\x9e\x24\x08\x09\x2a\x68\x30\x55\x55\x9e\x02\x3b\x71\xda\x2a\x9c\x43\x2d\x97\x32\xe3\x45\x28\x64\x72\xd4\xab\x65\x6a\x04\x7a\xb0\x00\x4f\xa1\x58\x20\x97\x18\x2e\x05\xab\xa1\x5f\xa3\x0f\x1b\x52\xc8\xda\x64\xf0\x6e\xfe\x60\xcf\x63\x93\xa3\xe6\xf6\x4c\x8e\x0e\x06\x94\x83\x01\xe5\x37\x69\x40\xb9\xb3\x8f\xee\xfc\xcd\xf1\x2c\x19\x5d\x3e\x67\x02\x97\x3b\xf3\xf3\x5d\x67\xb0\x66\x17\x6c\x90\x07\xdc\x61\xdf\xdf\xbe\x7d\x12\x91\x80\x49\x8f\x5b\x98\x74\x9f\x65\xe5\x0e\x1f\xb8\x55\x68\xd3\x40\xbf\xa6\xcf\x1d\x66\x56\xe9\xb9\xd9\x9a\xd6\x95\xbe\x17\xf6\x64\x64\xe9\x19\x66\x50\xee\x94\x96\xe6\x41\xd8\x9f\x8f\x9c\x22\x5f\x40\xb0\xb9\xbd\x97\xd9\x90\x64\x28\x77\xcd\x46\x8e\xb8\xbe\xec\x24\x29\x77\xf4\xe4\x0e\x2f\x12\xc8\x98\x72\x3a\x3c\x63\xca\x90\xbc\x26\x5d\x29\x53\xee\xf0\x01\x8d\x5c\xe5\xf2\x1f\xe6\x2a\x56\xb9\x38\x7d\x50\x45\x3a\xf2\x37\xc6\x73\x25\x56\xa9\xb3\x01\xdd\x9e\x68\x05\x6e\x34\x73\x9d\xb5\x26\x5a\xd9\x24\x6f\x76\xa5\x5c\x69\x17\x85\x6b\x83\x6e\x25\xc7\x3e\x21\x05\x4b\xcf\xf1\xeb\x4b\xc2\x12\xb7\x8c\x6b\x1e\x04\x02\x65\xb3\x92\xe1\x21\x0b\xcb\x97\x97\x85\xe5\x0e\x7e\xbf\xeb\xda\xc5\x27\xa9\xf1\x3d\x97\x58\x23\x24\xd4\x0c\x7f\x6a\x07\x2b\xd5\x52\x26\x07\x49\xf8\x0b\x90\x84\xf7\x97\x6d\xe5\xb3\x97\xa9\xec\x53\xf5\x9f\x98\x5b\x65\x88\xbc\x35\x88\xb1\x52\xce\x45\x2b\xcd\x2c\xd4\x43\x4d\x5d\x3f\xd6\x35\x41\x3e\x53\xea\xa3\x06\x63\x5f\x1f\xc3\x5d\x15\x52\x15\xb2\x5c\xbf\x33\x5b\x72\x41\x10\x11\x0c\x4b\x6e\x70\xe1\xb4\xdd\x00\x55\x23\x9d\x96\x56\x77\x8e\x33\xc3\xdc\x15\x4b\xd4\x72\x55\x91\xa5\xb5\xc5\x02\x64\x2e\xfa\xb8\x84\xbd\x75\x17\x48\x4d\x0c\x78\xcc\xee\x72\x99\xdd\x45\xd6\x2c\x02\xdf\xc7\x7d\x49\xa8\x22\x08\x89\xd0\x29\xf4\xad\xd2\x68\x03\xe4\xd9\x03\x5f\x6b\x0b\x66\x43\xc8\x1a\x1e\x8e\x21\x3e\xce\x4e\x76\xd6\x66\xa6\x83\x58\x12\x8c\x2b\xbf\x2a\x44\x22\x0c\x3d\xb6\x0a\x63\x8d\x46\x77\xce\x12\x69\x96\x6d\xa1\x94\x16\x8c\x2f\x15\xf1\xb3\x80\x35\x87\xeb\xc4\x29\x64\x90\xd6\x10\xbd\x18\xc9\x42\x69\x91\x87\x77\xb2\x61\x98\xd4\x95\xe9\xd6\x99\x75\xf3\x6a\x29\x0a\xaa\x90\x91\xa9\x07\x73\xbf\xbd\xc0\xbc\x3a\x0f\x02\xeb\x18\x20\x60\x2f\x53\x73\x6a\xb5\x90\xf3\x85\xd0\xe5\x09\xfb\xb9\xf1\x01\x63\x86\xa5\x8c\x9a\x4f\x88\x49\x5b\x44\x21\xd8\x96\xc1\xe0\xfa\xb7\x57\xa3\x57\x2f\x5f\xbe\x7c\xf9\xf7\xd0\x3e\x66\x6b\xbb\xf8\xd7\x25\xa2\xe6\x82\x1a\xa3\xd2\x27\xf5\xa0\xf8\x12\xd3\x0f\xe3\x2e\xe9\xca\x40\xcf\xdd\x86\x43\xd1\xdc\xb3\xee\xc6\x77\x56\x8c\x28\xc4\x4c\x14\x30\x67\xce\xae\x3a\x9b\x7b\xdf\x53\xa5\x4b\x51\x38\xd7\x91\x7f\xdb\x07\xbc\x9a\x3b\x2c\xbb\xb7\xf5\x05\x82\x3d\x75\x4e\xaa\x79\xae\x0a\xeb\x1c\xe3\xc5\x47\x2c\xfc\x24\xf3\x7b\x9e\x81\xcf\x0b\xf2\x1d\x79\xe7\xbe\x17\x35\x77\xa2\xfb\xee\x8f\xba\xb6\x93\x3f\x22\x53\x7d\x9b\xd4\x01\xbf\xdf\x05\x2c\x0e\xa9\x2d\x30\x74\x66\x59\xc8\x02\x80\x65\x58\x3e\x00\x5e\xbd\x60\x05\xa0\x9d\xd0\x80\xf8\x42\xfc\x97\x9c\xa1\xb7\x07\xe0\xaa\x33\x1f\x5b\x63\xf4\xad\xa5\x70\x99\x03\xcc\x24\xdc\xdb\xb8\xf0\x74\x7c\xb0\x16\x8b\x39\x2e\x16\xda\xaa\x33\x99\x08\x58\xfc\x42\xb8\x35\xcf\x95\x9f\x72\x94\x46\xa2\x55\xdd\xdc\x8f\x00\x85\x45\x87\xaf\xcd\xdc\xff\x47\x96\x8b\x9b\x0a\xe5\xec\x41\xd2\xd4\xae\xd7\x63\x1b\x87\xeb\xbf\xf9\xba\x66\x3a\xe0\xcd\x01\xd4\xb5\xe5\xdd\xdb\x8b\x51\xa8\xb7\xdd\x94\x88\x46\x34\x2c\x46\xbd\x46\x85\x4d\xb9\x5c\xee\xfc\xc3\x9a\x24\xde\x18\x58\xc7\xf2\xf9\x33\x8a\xe7\xdd\xa9\x5b\x80\xb2\x96\x7c\x75\xfa\x51\xac\x75\xe8\x14\xea\xa4\xbf\x25\x5f\x3d\x55\x36\xeb\xcc\x80\xd1\xfa\x1e\x86\x75\x21\xc1\x6d\xda\xf4\xb0\x1d\x5b\xa8\x2c\xd5\x64\xee\x80\x7b\xc9\x25\xe4\x07\xf9\x04\x3c\x39\x20\x5b\x1b\xd9\xbf\x06\x0b\x69\x15\xb5\x72\xbe\x6c\x71\x96\xe5\xad\x78\xf5\x3c\x00\xa7\x57\x5a\x14\xce\x29\x6b\xef\x78\xa1\x47\x4c\x15\x84\xe2\x2f\x95\xbd\xf8\xb3\x2c\x68\xae\xb1\xca\x40\x20\x97\x2f\xaa\xe9\x38\x51\xcb\x00\x0f\x00\xa2\x2c\xe8\x3b\x67\xd3\x4c\x4d\xcf\x96\xdc\xdc\x3d\x28\xe4\x56\xe5\xc2\xc8\xe6\x28\x53\x02\xa6\x04\xfe\x6f\x3c\x07\xff\x31\xe5\xa4\x16\x59\x76\x0a\x96\x10\x9a\x22\x04\x22\x3c\x8f\x17\xee\x9d\x5c\xca\xf2\x5a\xe8\x95\xca\xf5\x46\x34\x70\xd4\xb0\x2e\x7b\x2e\x78\x9e\x66\xa2\x26\x5f\x06\xb1\xae\xe2\x51\x24\x55\x29\x52\x56\xc8\xf9\xa2\x64\xb9\x7a\xd8\xcd\x0b\xfa\x8f\x4a\x54\xe6\x7b\x9b\xe7\x9b\x9e\xdc\x11\x89\x91\xdd\x27\x10\x04\x5c\x1d\x67\xb4\x57\x52\xfb\xa8\x66\x14\x41\xce\x73\x95\x9f\xe2\x8d\x64\x6f\x37\x6f\x5b\xba\x9b\x1c\xfd\x77\x25\x2a\x31\x39\xba\xdb\xf9\x62\xff\x6f\x1c\x3a\x96\x81\x06\xd8\xb5\xdc\xd0\x48\xa4\xd7\x60\x06\x99\x1c\x8d\x83\x07\x41\xe8\x49\xff\x5e\x54\x2b\x95\x33\x5e\x14\xf2\x9e\x67\xe0\x05\x5e\x40\xe9\xa4\x9c\x71\x58\x1d\xc1\xaa\xbc\x94\x90\xf4\x60\x6d\xa3\x79\xdd\xbb\x60\xf1\xa5\x35\x64\x99\x21\x0d\xca\xb9\x98\x2c\x8c\x46\xee\x67\xf7\xc4\x29\xa1\xad\x47\xa4\x9b\x89\xbf\xc6\x17\xab\x1c\x2f\x81\xbf\x81\x7a\x95\x14\x72\x29\x73\x0e\xa8\x2a\x9b\x01\x0b\xf6\x5b\x9f\x96\xea\x34\x68\x20\x7e\x5c\x47\x34\x76\x44\x1b\x75\xf4\xcf\x7f\xfe\x7d\x07\xc6\xda\xba\xcd\x43\x38\x2b\x9c\x34\x91\x76\xdf\xd0\xbd\xc7\x74\xd3\xcb\x81\x76\xb7\xe9\xf0\x9a\xc5\x27\x1e\x6c\xda\xc0\x16\xeb\x31\xbb\x2c\x19\x4f\xd3\x42\x40\x50\x57\xf9\xa0\x98\xd4\xba\x12\xfa\xf5\x24\x67\xdf\xb0\xbf\xa8\x07\x57\x9b\x0e\x7a\x72\xd9\xab\xac\x3c\xcf\x32\x33\x1f\xec\x4d\xa4\x7f\x82\xb7\xfe\x27\xce\x02\x03\x40\x32\x50\x9b\xe2\x09\x51\x26\x05\x0c\x89\x5a\xca\xf2\x4f\xfd\x1e\x73\xad\xab\x42\xa4\x17\x2a\xc7\xfb\x3d\x59\xdf\x2c\x78\xd1\x2a\x2c\x77\x35\xbd\x63\x2f\xce\x2f\x6e\x4e\x1c\x2b\x21\x21\x16\xe9\x15\x8c\x02\x66\x2a\x23\x92\xad\x49\xae\x30\x87\x81\x82\x9b\xc2\x1c\x5a\xf4\x31\xd6\x64\x5a\x5b\x92\x30\xe6\x45\x3c\x8a\x2a\x29\x6d\xd6\x86\x28\x55\x0d\x3b\xbf\xb8\x71\xda\x1d\x67\x2b\xa5\x25\x94\xa3\xc7\x81\x08\x5a\x07\x57\xcf\x31\xb8\x68\xec\xe7\xd0\xb4\x5e\xdc\x5c\xbc\x3b\x41\xf5\xfd\x5e\xa6\x46\x7f\x71\x6a\x6f\xd0\xf8\x34\x48\x72\x19\x4f\x13\x72\xd8\x98\x55\x56\x45\x49\xb9\xa8\x30\xa3\x0d\x2d\x60\x34\xa4\x86\x25\x24\x0e\xbb\x2a\x54\x5a\x25\x16\xbc\xdb\xd2\x1a\x15\xd7\x17\xe7\x17\x7f\x3d\x61\xa7\xa7\xa7\x5d\xcb\x57\x5b\x27\xb3\x0d\x76\x9d\xc0\x1f\x64\x5e\x35\x64\x67\x38\x11\xe6\xec\x88\xbf\xe0\xf5\x24\x9f\xe4\x2c\xf8\xdf\xf9\xc5\x5f\x5f\x64\x27\xec\x3f\x59\x22\x64\xf6\x82\xdd\x5c\xbc\x63\xdf\x98\x55\x36\x3f\x9e\xb1\x17\x4c\x57\xcb\xbf\xd5\x17\xe1\xe3\xdf\xa1\xc5\xc7\x13\x76\xc2\x4e\x4c\x87\x53\x39\x9f\x8b\x82\xe6\x0b\x7b\x0c\xfb\x24\x38\x15\x48\x36\x52\x2e\x80\x60\xdd\x17\x07\xdc\xf0\x05\xd9\x58\xc4\xe3\x4a\xe4\x58\x54\x55\xdc\x03\x8c\x15\x12\xfd\x5c\xbd\x3b\x89\x6e\xa9\x05\x14\x1b\x4e\xa3\xd4\x4c\x6a\xc6\xbe\x7b\x39\x50\x11\xcf\xea\x37\x7e\xdd\xed\x16\x3e\xbf\x0b\x8a\x93\x3d\x60\x92\x11\x96\xaa\xb6\xf3\xb9\xf1\xb6\xdf\xf5\xaa\x8c\xa5\x93\x9d\xe4\xdb\xb8\x8b\x21\xfc\xf7\xbd\xd1\x81\xd0\x9c\xed\xf5\xab\x4d\x3c\xb7\xf5\x05\xca\x04\x5c\x08\x5c\xbe\x48\xcc\xa4\x62\xa8\x64\x32\x77\xeb\xc8\x93\x44\x15\x90\x31\xc4\x9d\xab\x7b\x51\x4c\x6d\x76\x29\x8b\x77\x8d\x5e\xfe\xe5\xfa\xdd\x98\x9d\xb3\xf6\x29\xf4\xaa\xed\x00\x89\x7d\xc1\x4f\xba\xf4\x77\x33\x7c\xab\xfe\x0e\xbd\xbc\x98\x76\xbe\x98\xfb\xf9\xfc\x72\xfd\xae\xdd\x04\xd0\x23\x01\xc2\xd8\x47\xa3\xa3\x5a\x57\x2d\xd2\x7e\xad\x41\x93\xa4\x6b\x2d\xee\x2c\x14\x1a\x14\xc0\xaa\xc8\xa8\x74\xb7\x2f\x01\x06\xf2\x3e\xdd\x49\x90\x97\x87\x27\x50\xf6\xbc\x54\xce\x0b\x65\x69\xdd\x08\x8a\x63\xf6\x93\x61\x39\x94\x94\xc5\xf0\x97\x53\x36\x39\x3a\x5b\x08\x9e\x95\x8b\x5f\x27\x47\x66\xbc\x4c\xcc\x79\x16\x3e\xfa\x06\x7f\x97\x59\xe3\x49\xf0\x02\x54\xa9\xf5\x54\x53\x2e\x64\x3e\x0f\x9b\x42\x55\x70\x9e\x69\xb5\xa9\x91\x99\x04\x34\x74\xf4\x90\x65\x6c\x25\x8a\xd3\x44\x2d\x57\x2a\x37\xcc\x08\x5b\xb1\x64\x21\x92\x8f\x7a\x3c\xc9\x29\x92\x39\x68\x1f\x51\x5d\x55\x64\x3a\x30\xe1\x90\x16\x0f\xc6\xc2\x46\x30\x33\xd4\x5b\x6f\x95\xdf\xfa\x82\x91\x37\xa8\xbb\x5a\x94\x50\x8b\x11\x68\xa4\xb9\xe1\xf0\x7b\x4d\xd1\x77\xd6\x23\x24\xea\xf6\x7d\x6c\x7e\x37\xb4\x06\xbb\xe1\x67\xfd\xd6\x9d\x15\xbc\x2e\x13\xd1\x06\x7e\xd6\xf1\x0a\x7c\x3a\x19\x13\x39\x03\x17\x2d\x1e\x97\xd5\x2a\x03\x67\x81\x0a\x18\x0d\x9c\x14\xe6\x14\x61\x94\x4c\xe0\x1d\x9b\xbe\x9d\x7c\x60\x24\x63\x2e\xf9\x47\x6b\xd9\xa3\x2e\x46\xd6\xe5\x3c\xa5\xd2\xab\xf4\xbb\x8d\x9a\xc7\xa6\xd6\xed\x08\xc6\x73\x9e\x58\x25\x82\x6e\xcc\xae\x2f\x79\x32\x63\xd4\xf5\x9e\xb6\xe0\x8d\x76\xd2\x30\x2d\xa3\x49\x05\xec\xe9\xba\xd3\x60\xda\xc3\x2d\xed\x84\x36\xb2\xc7\xeb\x0e\x5b\x71\xbd\x49\xed\xe4\xb4\x5e\x2e\xc4\x2b\x09\x10\xbb\xf6\xc7\xeb\xc9\xd7\xd9\xbe\x0d\x6e\xed\xf7\xf9\x30\xd7\x78\xd1\xb3\x72\x45\xcb\xb2\x81\x1d\x1b\xeb\xae\x3c\xdb\xa2\xb9\x10\x2e\x76\x1e\x12\x99\x9a\xb1\xfa\x94\xcc\x8b\x2d\x1b\xbc\x40\xb8\x45\x68\xee\xd8\xfb\xc2\xef\xbc\xea\x3a\x60\x52\xf5\x2a\xc2\x74\xee\x2c\x10\x8c\x48\x34\x37\x62\x2e\xda\xe9\x46\xa0\x00\xc9\x44\x98\xa5\xac\x0c\xa7\x56\x91\xa9\x0f\x01\x2b\x46\x3c\x4a\x8c\x7e\x82\xa0\x2b\xe0\x4f\x85\x77\x9c\xb5\x1d\x5d\x49\x99\xd6\x60\x7f\x8d\xd0\x85\x1b\x8d\x3b\x9a\x27\x59\x95\x0a\x6d\x83\x8c\x6c\xdd\xb8\xd7\x81\xc1\x8f\x3c\x47\xf4\xa0\xca\xe3\x47\x81\x89\xd1\x9d\x7f\x54\x03\x9c\xcb\x64\xc8\xb5\xb2\xd3\x46\x59\x33\xee\x73\x39\x38\xda\x4f\x60\xff\xdd\xb5\xd3\x4b\xf6\x63\x86\x88\xfa\xbb\xd9\x58\x36\x18\x57\xea\x1e\x8d\xe8\x21\x78\x34\x62\x5d\xf2\x80\xfb\x3f\xe0\xfe\xff\xd5\xd0\x4e\x07\xdc\x3f\x9b\x1c\xd1\x2e\x9f\x5a\x76\x30\x39\xfa\x42\x21\xf1\xdd\xcc\x6e\x1f\x11\x01\xbf\x8d\x85\x78\x42\xac\x40\xcf\xf2\x3e\xe5\x0a\x7b\xd6\x58\x82\xee\x61\x07\xc5\x16\x0c\x78\x3d\xba\xd2\x3c\xc4\x5f\xcd\xb6\xbe\x42\x0f\xd1\x06\x87\x68\x83\x7f\xb9\x68\x83\xee\x13\xd6\x17\x7d\xb0\xf9\xcd\xd8\x34\xb0\x41\x14\x3e\x44\x27\x7c\x51\x62\xef\x36\xd1\x09\xb5\x3b\x59\x8a\xfd\x07\x29\x6c\xd0\xbc\x0e\x41\x0b\x07\x31\xfe\x0b\x09\x5c\xd8\x40\xa5\xcf\x11\xc8\x30\x04\x94\xb9\x13\xe3\xbe\xf6\x70\x67\xcc\x51\xa9\x23\xec\x1d\x98\xb0\x80\x92\x1d\x97\x6b\x13\xcc\xc9\x0e\x0f\x29\xa1\xf7\x88\xcb\xbb\x33\x3f\x3b\xfa\x0a\x93\x27\xd4\x30\x12\xb1\x35\xc5\x3a\x05\xe8\xcb\xd2\x67\x81\xc7\xf5\x88\xe7\x3b\x6d\x06\x84\x9e\xc4\x19\x43\x76\xb2\x13\xf5\xc3\xe5\x08\x67\xd3\xe5\xe4\x17\xe9\x5d\x0d\x0d\xe4\xcd\xd0\x85\x20\x5c\x10\xd5\x4f\x62\x04\x2c\xaa\xcf\x2b\xc2\xcf\x91\xf1\xd4\x03\xe8\x6a\x5e\x95\x08\x47\x47\x1d\x3e\x05\x49\xd7\x8f\x94\xea\x15\xe0\x02\x74\x83\x00\xb8\x45\x1b\x38\x47\xea\x06\x16\x8a\x76\xca\xc5\x83\x78\x4c\xd0\x98\x85\xc9\x88\xef\x26\x47\x6f\x1f\xcd\x62\x4c\x8e\xee\x5a\xb1\x70\x1d\x78\x20\xb3\x01\x10\x89\xe1\xc7\xb5\xd8\xa2\x17\x2e\xe4\x06\x1a\x89\x7b\x81\x70\x46\x91\x9e\xc0\x6a\x53\xe9\x99\x54\x94\x05\x4f\x4a\x7f\x5b\x25\x7c\xc5\x13\x33\x02\x24\x43\xf1\x95\x33\x5c\x49\xa9\x1a\xcc\xa5\xf1\x21\x7e\xc7\xc2\x2f\x79\xc1\x4f\x7a\xbf\xe6\xff\x78\x21\xfe\xaf\x89\x27\x73\x9e\x32\x80\xbd\xda\xb4\x70\x16\xbe\x44\x34\xea\xe7\x6d\xf3\xb8\xf8\xa9\x8b\xc7\x24\xab\xb4\xbc\x17\xd9\x1a\x19\x57\x63\xe8\x4f\x08\x1c\x74\xa7\xcd\x2e\xd4\x8e\xc0\xc1\x7e\xaa\x7e\xda\x5d\xd2\x0f\xd4\xef\x7b\x77\x00\x70\xbf\xd5\xb0\xb3\x57\x08\x7f\xeb\xc0\x3d\xc3\x3e\xb7\xec\xfa\x45\x20\xfa\x87\x4c\x6f\x08\x05\xb5\x02\x58\x37\x50\x4d\x5b\xfb\x2d\xe1\xd8\xbd\x04\x62\xee\xa4\x1b\xf9\x6b\x1b\x43\xb7\x8f\xac\x17\x76\x09\x28\x97\x18\x20\x49\x50\xb5\x18\xcd\xa9\x17\xd5\x6c\x96\x09\xc0\x2b\x82\xe7\x35\xc4\x1b\xca\xbc\x54\xc8\x5d\x0d\x3f\xfc\x9f\x85\xc8\x99\xc8\x2d\xf0\xd9\xc3\x07\xac\x5f\xb1\x81\xea\x74\x0e\xfc\x63\x0a\xb1\x72\x19\xa4\x0a\xf6\xc2\x69\x29\x2b\x2e\x0b\xc0\x65\x2e\xb8\x5e\xb8\xa0\x4a\x01\x7f\xfa\xea\x8b\x36\x64\xd1\x4e\x38\x74\x80\xe2\x14\x91\xff\x0b\x9e\x31\x0e\xd7\xb7\xe3\xa9\xf2\xd7\xb0\x78\xc1\x42\x14\x62\xcc\xd8\x6d\x80\x59\x30\x73\xaf\x4a\xfc\x5c\xf2\x24\xe3\xda\xa8\x02\xd4\x5d\xea\x5f\xe6\xb6\xba\x6f\x9e\x8e\x59\xb0\xe6\xfe\xee\x67\x19\x2f\xe6\xb8\xd4\x39\xbb\xc3\xf7\xee\x50\x3f\xf6\x28\x5f\x2d\xe7\x39\xd8\xca\xa1\xe4\x2c\xec\x95\x59\x10\xad\x5c\xe2\x2e\xf1\xc0\x16\x82\xdf\xaf\x31\xab\x97\xbd\xd4\x34\x2f\x0d\x05\x51\xcd\x5a\x9a\x24\x8e\x71\x32\x66\x10\x9a\x61\xc3\x3b\x4e\x67\x3c\xc1\xea\x5b\x49\xb5\x74\xca\xbf\x21\x36\x4a\x6c\x09\xc9\xe3\xee\x05\x9b\x57\x32\xe5\x50\x8a\x0d\xaa\x8c\x92\x8e\x68\xa5\x1a\x58\xa7\x3e\xf0\xe5\xef\x07\x62\x2f\x61\xa6\xef\x44\x3e\x2f\x17\xc0\xe5\x3b\x02\x19\xc2\x26\x8e\xd7\x35\x8b\xa2\x79\x69\x8d\xd2\x16\xa2\x43\xff\x81\x4b\xf8\x06\x40\xf2\x23\x78\x18\xf1\xfc\x5d\xa2\x86\x05\xcf\xfe\x11\x40\xd6\x5a\xc7\x62\xa0\x87\xe0\xe3\x42\xc4\x11\xa6\xf6\x80\x61\x52\xc4\xee\xd8\xd1\xa8\x42\xff\xbf\x0f\xc5\xaa\xe2\xce\x76\xad\x92\xbf\x07\xfc\x9a\x10\x9d\x76\x20\xcf\x11\x86\x44\x6d\xc4\x23\x98\xb3\xf2\x94\xf8\xab\xa1\x44\x5e\x22\x72\xb8\x06\x5c\xea\xfc\xe6\x1b\xa2\x17\x89\x91\xb1\x4c\xcc\x66\x22\x29\x51\x20\x59\x15\x82\x40\x01\x74\x60\x1d\x83\x71\x02\xdc\x92\x7f\x24\x26\xd4\x9a\xae\xcf\xdc\xa4\x5a\xab\x44\x62\x89\x39\x1f\xa1\xa9\x99\x2c\x0a\x91\x89\x7b\x9e\x97\x83\x08\xf4\x87\xef\xf7\x96\xa3\x78\xa8\xa7\x7e\x63\x45\xfa\xad\xd0\xb2\x20\x1d\x36\xe0\xb2\x23\x80\x93\xd5\x40\x63\xc7\xba\x0f\x2e\xd3\x82\xca\x89\xe0\x60\xf1\x28\x35\x0d\xe6\xf5\x4e\x60\xd9\xd1\x26\x34\x18\x5f\xc9\x3f\xc7\xa8\x8f\xf8\xcd\xa4\x17\x47\xd6\xf1\x26\xc8\xd6\xe9\x49\x3b\x3c\xd7\x26\x77\x7c\x12\x32\xd7\x4d\xfd\xc8\x03\xa5\xda\x4d\xb9\xd4\xac\x25\xf0\xc2\x3e\xeb\x02\x6b\x9e\x5f\x5d\x5a\x54\xcc\x50\xc4\x66\xfc\xca\xc8\x6c\xa1\x03\x6d\x7e\x52\x74\x2a\x05\x9d\xdf\x24\xaa\x55\x03\x0d\x1f\xb7\x6a\xa2\x36\x02\x31\x06\xda\xdb\x9b\x10\xd8\xec\x9a\x71\xbf\x99\x36\xa3\xc0\x82\xaf\x56\x22\xd7\x4c\x48\xe8\x67\x2a\x12\x5e\x69\x11\x03\x26\x29\xd0\xdf\xbd\x0b\x21\x5d\x21\x88\x11\x4f\x0e\x61\x7f\x1d\xb9\x9c\x50\x04\xbd\xe3\x37\x52\x33\xb5\x94\x25\xc5\x84\xcd\x78\x86\x03\x61\xf8\xcb\x9d\x7f\xf1\x2e\xb4\x11\x90\x11\xca\xcc\xdd\x99\x0a\xa0\x8c\x8f\x5f\xfd\xa9\x52\x99\xe0\x20\x47\xfb\x4e\x3a\x6c\x47\x76\x84\x38\xae\x97\xd0\x85\x9e\xd2\x49\xef\x36\xfb\x17\x20\x37\x41\xcb\x75\x1f\x0d\xb1\x48\xce\x24\xc2\x1b\xbd\x38\x42\xb3\x26\x0d\x5a\x63\xc3\x16\x60\x55\x60\x78\x67\x64\x43\xc0\x59\xbd\x0f\x55\x00\x43\x68\x69\x0f\xc4\x3c\x66\x41\x8a\x86\x1a\x79\xe7\xeb\x40\x8c\xf3\x3d\x4e\xab\x32\x28\x79\x44\xf9\x2a\xa2\x8f\xfa\x3f\xf7\x98\x08\xe7\xff\x62\xca\xd1\x24\x39\xd5\xa8\x12\x37\x0d\x6f\x53\x5e\xda\x40\x14\xcc\x57\x43\x41\x38\x66\xf7\x46\x30\x03\x67\xe6\xa9\x51\xb6\x66\x65\x51\x89\xbd\x1e\x2d\xcf\x6e\xba\x31\x99\x9d\x3c\xc5\x33\x4e\xa8\x2d\x3e\x82\x84\x1c\x45\xc2\x35\x66\xb0\x5e\x65\x55\xc1\xb3\x13\x08\x72\x01\xee\x41\x18\x8e\x51\x94\x3b\x9f\x85\x98\xff\x11\xfb\x1b\x9b\x1c\x11\xee\x50\x4f\x8e\x46\x6c\x72\x04\x35\xce\xcf\xd0\x23\x39\x39\x62\x7f\xb7\xf7\xb4\x5b\xbc\x3e\x3e\xe6\xa7\xf9\x79\xd9\xd8\xa7\x02\xd9\x7f\xd6\xcf\xdc\x59\xf2\xb9\xc1\x4d\x3f\x47\xb0\xe9\x80\x80\xf8\xd6\x17\xfa\x22\xe3\x89\xb4\x4e\x09\xd3\xba\x75\x8c\x3c\x9c\xf2\xa3\xd1\x1e\xec\xf2\x6e\x87\xe3\xef\xb0\xee\xde\xb6\x08\xfa\x42\xcc\x79\x91\x66\x46\xb3\x20\xd9\xa3\xc7\xe7\xee\x67\xbc\x81\xe1\x47\x33\x23\xc6\xda\x3b\xbd\xe7\x09\xa2\x1f\xb2\xeb\x2e\xce\xc1\x8b\x5b\x54\x8f\xbf\xb4\xa8\x30\x2f\xba\xd5\x13\x4d\x47\xd1\x05\x51\x0a\x01\x82\x13\x5b\xfc\x32\x26\xb2\x2f\x84\xd1\x02\xd7\x3a\x5a\x10\x9e\x07\x03\xfe\xd1\xf4\x8a\x68\x69\x10\x95\x60\xdb\x88\xc8\x18\x11\x59\x1f\x5d\x81\x07\xb6\x41\x4b\xd0\xdd\xce\xa6\xb5\x28\xab\x44\xa7\x97\xd7\xee\x61\x7b\x61\xb8\x70\xdf\x77\x87\x44\xb7\x1e\xeb\x7f\x8e\x8e\xcc\xa2\xed\xdc\x2b\x94\x7f\xb5\x7d\x6d\x61\x7d\x86\x65\xd8\x6c\x7d\xa6\x75\xc7\x7c\x1b\x47\xcd\x75\xa8\xf1\x9d\x23\xfb\x25\x47\x66\x4e\x3b\x5a\xaa\xa3\xdd\xda\x95\x55\xf6\xbf\x17\xae\xda\x10\xc3\x65\xd8\x7e\xc3\x91\x0c\x9a\xf5\xb1\x5f\xb0\x27\x3d\x57\x5e\x92\x98\xcf\x9a\xa1\x80\xd7\x0e\xcd\x4b\xb2\x9f\xe4\x20\x72\xc9\xe7\x02\xeb\x6b\xf8\x85\xbc\x34\x3f\x5e\x8b\x7b\x29\x1e\x36\x2d\x64\xd0\x8c\x22\x08\x6d\x66\x31\x9b\x69\xdf\x34\xd0\x68\x90\x5a\x29\x2c\xae\x42\x36\xab\xde\xb8\xa6\x95\x48\x0e\xe8\xa0\x03\x28\xfe\x2b\x45\xd3\x3c\x2f\xfe\x1c\x90\x04\xc8\xba\x42\x8e\x85\xc0\xce\x12\x8b\xeb\x12\x4e\x42\x98\xad\x33\x6b\x35\xc0\xd7\x1e\xf0\x82\x71\x1b\x2f\xe8\x03\x7e\x93\x93\x10\x6c\x04\x19\xb2\x53\x2b\xc4\x4c\x79\xf2\x51\xe4\xe8\xe0\x68\xf3\xbd\xe3\x94\xbd\x9f\x20\xe0\x12\x4f\x9e\xf5\x30\x94\x76\x1f\x23\x6c\xc2\xb2\x7b\xdf\xd8\x13\x0e\xbb\x6f\x9c\x0b\x5b\x7e\xb6\x0f\x9a\xd2\xf5\x0e\x1e\xf5\xa0\x2d\x8a\xa5\xae\xac\x2d\x68\xc4\xd2\x95\x6d\xc6\xd2\x4e\xd2\x63\x20\xfa\xfd\xbb\xf0\x09\xcd\x09\x81\x5e\x4c\x29\x86\xa8\x7f\x43\xcd\x78\x6f\xbc\x2e\xf9\xdc\x5c\x7f\xf0\xc7\xff\x77\xf3\x97\xf3\xd7\x2f\x5f\x7d\xfb\xdd\xf7\xff\xfe\xc3\x7f\xfc\x81\x4f\x93\x54\xcc\x9e\xe9\xc6\xdb\x62\x15\x3b\x17\x6f\xf7\x95\x02\x16\xc7\x3b\x5c\xe1\xe7\xfe\x61\xac\x7e\x7f\x14\xeb\x53\xe4\xd1\x2b\x2e\x0b\xcd\xc4\x23\x60\x40\x2c\x3c\xbd\xc4\x2a\xd8\xc7\x46\xd5\x76\x3d\x40\x52\x1f\x34\xdd\xd8\x20\xc6\x8f\x62\x6d\xf3\x45\xfa\x9a\x72\x2b\x5e\x9a\x3b\x8d\xdd\x7d\x83\x47\xed\x94\xce\x1a\x2d\xe9\x37\x77\xd0\x91\xd4\xac\x5a\x99\xcb\x10\xdc\x28\x0f\x62\xba\x50\xea\xa3\x3b\xf6\xa5\x32\x32\x96\x28\x96\x32\x17\x36\xfd\x10\x5c\x95\xab\x42\x00\xc7\x02\x13\x8c\x9b\xda\x88\x52\x4b\xf2\xac\x15\x00\x35\xbc\xba\x9e\x23\xe1\x96\xc5\x74\x47\xa0\xb6\x96\xdc\x5c\x3e\x24\xc0\x98\xef\x0f\x39\xac\xcc\xf1\xfb\xfc\xd1\xa0\x46\x57\x8e\xe1\x62\xdd\xb3\x27\xc5\x6a\xf6\x71\xb4\xf8\xc0\xff\x73\xb3\xe2\xec\xea\x39\x35\xd5\x66\x4b\xa5\x52\xc7\x73\x67\xb2\x0d\x8d\xff\x44\xfe\x19\x4f\x7a\x4b\x16\xd7\x0f\x5d\x69\x34\xb6\x9f\x5b\x08\x5d\x65\x6e\x33\x0b\x94\x56\x6d\x3c\xc2\xd0\x33\x1a\x4a\xa6\x74\x35\xb5\x08\xa7\xf4\xa0\x79\x6c\xc9\x4d\xeb\x2f\x3e\x74\x76\x67\x99\x95\x90\x1f\x84\x97\x8c\xc9\x9b\x5b\x54\x79\xbb\x59\x9c\x57\xa9\x2c\xcf\x37\xb2\x89\x5a\x0b\xe7\x8c\xe5\x69\x8a\xfd\x97\xb5\x4a\xaa\x28\xb4\xd1\x1a\xf1\x74\x29\x35\xc8\xd1\x2e\x1f\x94\x4b\x21\xcd\x2a\x6d\x08\xe5\xf8\x3c\x4d\xfd\x00\xc7\x84\x29\x00\xf6\xe1\xef\x70\x4c\xae\x72\x0a\xf6\x1f\x32\xb8\x76\x76\x8f\x49\xa4\xd3\x14\x93\x47\x98\x75\x2d\x24\x2f\x6d\x1f\x27\x4f\xe3\x02\x5d\x61\x2c\xd7\x18\x9c\xe2\x67\x8c\x1e\x89\x2a\x87\x29\xbb\x5d\xd3\xe4\xde\x90\x39\xf1\x46\xb0\x18\x4b\x34\xe6\x7a\x97\x06\x40\x26\xea\x17\x01\xe4\x4e\x92\x9a\x3d\x14\x2a\x9f\x8f\x19\xfb\x2f\xa7\xf6\xc3\xdb\x65\x51\xe5\xe0\xf7\x44\x07\x3c\xfa\x8f\x33\x65\xe4\xb6\xa2\x50\x05\x48\x48\x39\x4b\xa5\x5e\x65\x7c\xed\x93\x03\x80\xfe\xb7\xe3\xf5\x97\x8b\x92\x8a\x53\x1a\xa9\xe3\xf2\xea\xc7\x4c\x25\x1f\x37\x9e\x2c\x6c\x12\x64\x14\xe6\x6c\xc5\x8b\x52\x26\x55\xc6\x0b\x76\x71\xf9\xe6\x9a\xbd\x78\xfb\x38\x66\x93\xa3\x57\x7f\xf8\x76\xfc\xea\x87\xdf\x8f\x5f\x8d\x5f\x9d\x7d\xfb\xfd\xe4\x68\x34\x39\xfa\xf6\xe5\xcb\x57\xaf\xd3\xe9\x1f\x5e\xbf\x3e\xfb\xe1\xfb\xc9\xd1\x09\x85\xcd\x47\xd8\x05\x3a\x89\xd6\x35\x43\x25\xd6\xde\xe3\x44\xd1\x5d\x6b\x98\xc6\xb1\x36\xad\x6c\xa9\x54\x74\xd0\x9b\x75\x5b\x95\x68\x1f\x0e\x66\x68\x26\x15\xd7\x48\x25\xc5\x81\xae\xba\xd4\x8b\x34\x94\x14\xa0\xef\xd4\x27\x32\x2d\x9a\x47\x1e\x7e\x6d\xde\x2c\x66\x49\x42\xf5\xa9\xa1\x38\x5d\x5e\x31\x5c\xd4\xbf\x42\x0a\x69\xf2\x26\xd8\x9a\x7c\xf5\x65\x44\x23\x40\x6d\x25\xdb\x34\x10\x5c\x8d\xe6\x84\xde\xe2\x2a\xc5\x59\x2a\x06\xaf\x11\xcf\xf7\x31\x5f\x46\x93\x40\xad\xd7\xb1\x24\x8b\x32\x21\xcb\xc1\x1a\xba\x54\x55\xa9\x65\x8a\x17\x14\x2c\x26\xe4\x33\x1f\x6e\xf4\xdf\xe1\x20\x44\xd4\xb6\x31\xe9\x57\xd8\x30\x4a\xb3\xcd\x4b\x46\x7d\xb2\xb2\xe0\xb3\x99\x4c\x42\x3a\x47\x34\x35\xc9\x15\x57\x2a\x6d\x2b\x1b\x7c\x30\x76\x1c\x8c\x1d\x5f\xa1\xb1\xa3\x61\x05\x78\x8e\x40\xa1\x21\x73\xfe\x64\x09\x00\x6e\x06\x85\xfc\x3b\x30\x5a\xc4\x33\x86\xd8\x34\x3c\x6f\x1a\xd7\x79\x13\xc9\xfc\x9b\x85\xf1\x0d\xbc\xad\x61\xc7\xd8\xc9\x26\xb1\x61\x80\xb7\xf3\x42\x68\xdd\x9b\x3b\xb1\xfd\x95\x2e\x29\xc3\xea\x63\xc4\x57\xeb\x42\x84\xaa\xe0\xf1\x8e\x42\x84\xed\x15\xdc\xce\xa8\xf8\x42\x3a\x1f\xac\x29\x0e\x90\x32\x45\x08\x08\x88\xf8\x05\x7d\xa9\xe4\xa7\x14\x24\x92\xb3\x57\xe3\xdf\xf7\x72\x73\xe8\xac\xb9\x0e\xef\x48\xeb\x4c\x01\xd3\x46\x18\x69\x18\xd7\x50\x8f\xaa\xca\xb9\x02\x06\x84\x53\x1c\x63\xfd\x0f\x73\xef\xb9\xb4\x44\x19\x05\xe7\x26\x6a\x39\x95\x39\x64\x14\x42\x8c\x32\x95\x14\x61\x1f\xae\x5b\xc0\x3b\x94\xe8\xba\x60\x20\x8c\xe7\xf3\x51\x90\x1f\x29\x4a\x17\x08\x73\x79\x61\x97\xc8\xb0\x24\x0b\xa5\xc1\x35\x36\x0d\xda\xd0\x41\xc4\x12\x61\xf9\x1c\xce\x25\x42\xb4\x99\xaf\x18\x59\xd0\x90\x1d\x1b\x76\x54\xbb\x2d\xb1\xd0\x92\x32\xdc\x26\x3b\xbd\xb0\x33\x33\x0d\x6b\x43\xaa\x41\x8a\xb6\xd6\xbf\x37\x9c\xbe\x2b\x55\xa0\x07\xaf\x54\x83\xf6\xb2\x7d\x1b\x1d\xad\x62\x0d\x78\x91\x7a\x56\x01\xb2\x28\xbb\x34\x53\x8d\x77\xd8\xc8\x45\x1b\xb6\x98\x19\x5a\xe3\x18\x87\xb4\xf3\x66\x47\x13\xdf\xb0\xe7\x41\xbb\xa7\x6d\xfd\x53\x77\xdd\x1f\x04\x81\xd1\x45\xcf\xb7\xf1\x02\xbc\xa5\xbb\xf3\x5d\xe8\x60\x28\x0f\x05\x32\x1b\xce\x72\x2f\xf3\xed\x79\x6e\xf0\xce\x8e\x4c\xf7\x69\x9a\x5b\x3f\xd3\x35\x32\x53\xbf\xc1\xd4\xb4\xea\x3e\x8a\x16\x49\x85\x8a\x7b\xe0\x5f\xa0\x00\x38\x9b\xdf\xd5\x7e\xc7\x17\x76\x20\x1d\x5e\xad\xfb\x2c\x62\x93\x2f\xe7\x18\x82\xa4\xfb\xfc\x07\x71\xd4\x77\xa1\x22\x1d\xd5\xf7\x1d\xe3\x08\x61\xd3\xa5\x21\x01\x95\xf7\xef\xfd\xe1\xca\xfd\x12\xae\xdc\x2f\x93\xf3\xf6\xe5\x54\x69\x34\xae\x65\x58\x8d\x8c\x09\x87\xcc\x29\x5f\x94\xb9\xa0\x23\x73\x0a\x5d\x05\xe1\x36\xea\xae\xba\xbc\xfb\x3c\x07\xc0\xf4\x0e\x26\x8c\x4f\x6a\xc2\xd8\x5f\x81\xd6\x4f\x66\xbe\x18\x9c\xf8\x64\x93\xfd\xf3\x89\x49\x4e\xfa\x98\xf1\x50\x86\x69\x1a\xc7\xc2\xa9\xc0\xf8\x18\xb8\xb2\xdc\xed\x04\x82\x22\xfb\x60\xee\xad\x44\x14\xe0\x8e\xc1\x9b\x99\x34\x19\x35\xc3\x3b\x52\x87\x00\xb4\x7e\xcc\xc2\xca\xb9\x46\xba\x1c\x22\xc8\x49\x57\xc4\xbd\xf3\x58\x7a\xa6\x66\x2d\xf7\xb4\x46\x9f\x77\xce\x72\x8a\x22\x21\x03\x12\x66\x63\xa0\xa9\x22\x2c\x62\x7b\x63\x91\xf5\xe8\x84\x5e\x61\x2b\x79\xb7\x81\xd2\x33\x48\xab\xfc\xde\x87\xcb\xa0\x2c\x43\xa1\x1c\xa7\x3a\x51\x2b\x91\xb2\x8c\x4f\x21\x33\x44\x10\x71\x38\x53\x28\x37\xf8\x6a\xc6\xa6\x0d\x49\x51\x80\x2a\x5e\xf2\xbc\x94\x89\xfe\x63\x80\xed\x87\x78\x11\x0a\x1d\x91\x25\x35\xae\x07\x1b\x8d\x27\xf9\x24\xbf\x04\x2b\xb9\x9d\x39\xea\x1d\x5a\x99\xb5\x1b\xf9\x40\xa3\x26\xb5\x40\x18\xe4\xc3\x42\x65\xc2\x75\x4e\xfe\xf9\xa0\x8e\x64\xd4\x31\xf5\xe4\x17\xc0\xc9\x81\xd3\xb5\xff\xd9\x2b\x2f\x1f\xcc\x2e\x3d\x48\x74\x01\x86\x1f\x00\x63\x6c\xdb\xdd\xd3\xce\xba\x59\x71\xb7\xb9\x20\x13\xa7\xdd\x7b\x0d\x7b\x87\xf7\x56\xbc\x53\x24\x24\xd3\xa7\x98\xcf\x78\xd6\x8d\x36\xc2\xb6\xdd\xe2\xc6\x82\x7c\xe9\x1b\x3d\x68\x0c\xe4\x08\xc7\x9a\xa9\x87\xdc\xf7\xbc\xd7\xbd\xde\x8a\xb9\x5b\x9e\x30\x94\xad\x47\x43\x6d\xc1\xdb\x8d\xec\x3c\x98\xb7\x7b\x6f\x39\xf1\x76\xf3\x43\x83\xb7\x43\xc6\xad\x7e\xcb\x6a\x1b\xb5\x93\x86\x42\x2a\x1e\x06\xc4\xaf\x0a\x55\xaa\x44\xd9\xfc\x45\x86\xc9\xba\x68\x49\xc6\x7d\xb5\x66\x28\xcf\xc0\x97\x22\x75\x7d\x00\x82\xb9\x85\x99\x1b\x09\x67\x55\x28\x28\xab\x45\x1a\x5d\x5d\x99\x43\xd6\x06\xf2\x2e\x55\x8a\xda\x9a\x14\xaa\x52\x66\x63\x99\x97\xba\x2c\xc6\x97\x79\xf9\xa1\xb8\x71\x62\x8c\xfd\xa4\x8e\x25\xa0\xa7\xec\xc5\xed\xc5\xd5\x88\xfd\xf2\xe6\x0a\x30\xe5\x37\x17\xb7\x57\x27\x74\xf0\x9b\x96\x98\x71\x4b\x4c\x7f\xf0\xd5\x14\x65\x0e\xf2\xfd\xed\xc5\xd5\x13\xd3\x5c\x9a\x4f\x3b\x6b\xf9\xb4\xe1\x74\xd7\x87\xd8\x6b\x34\xb6\x1b\xd6\x91\xbf\xb9\x66\xc1\xea\xab\xfa\x1e\xf0\xdc\x86\x52\x26\xc0\xc8\xd6\x6d\xa5\xc0\xe7\x54\x2f\x99\x8a\x99\x40\x59\x15\x67\x5e\x73\x4c\x0a\xd8\x26\xfb\x50\x37\x25\x07\x06\x39\x54\xda\x29\x1a\x28\x57\xd1\x57\x48\xc7\xef\xac\x32\xb0\x52\x29\xa6\x94\xa2\xab\xde\xc9\x31\x8e\xed\x59\xc3\x80\x37\x04\x9c\x8c\xd8\x87\xeb\x41\xc6\x81\xe0\xc3\x18\x4f\x0a\xa5\xf1\x38\x90\xa4\xd3\xaa\xf7\x1a\x6e\xae\x45\x68\x29\x8c\xa2\xa6\xda\x8f\x1f\x1a\x55\xbc\x45\x23\xee\xd9\xa6\x9b\x32\x23\xd7\x17\x0e\xbe\x1d\x92\x3d\x68\xa6\x55\x46\xa9\xa4\x44\xae\xab\x42\xf8\x02\xf8\x60\x19\x0a\x2f\x30\xa3\x01\x68\x95\x71\x67\x0a\x87\xb3\x10\x97\x6a\xdb\xec\x20\xda\xa7\x52\x18\x38\xdb\xcc\x99\x93\x79\x0f\xbd\x51\x83\x2d\x08\xee\xb6\x49\x67\x90\x93\x0c\x80\x83\x9f\x87\xe0\x7c\x28\x3b\x75\x7b\xac\x59\xa6\x0c\xd7\xce\x55\x2a\x06\x93\x68\xb8\x16\x9f\x91\x46\x5d\x80\x36\x5e\x7c\x3c\x5f\x3f\x13\x89\x3e\x0f\x05\x86\xbe\x87\x7f\xf6\x89\xa0\x37\x81\x14\x05\xd3\x2e\x95\xbd\x84\x9a\x0b\x43\xa6\x09\x2a\x33\x85\x5e\x03\x98\x79\x93\x90\x0d\x71\x7a\x2a\x36\x4b\x18\x5b\x74\x21\x0a\xc1\x67\xf6\xf9\xb9\xca\x4a\xb9\xca\x84\xc3\xeb\xac\x2c\xc5\x1a\x81\x00\xdf\xc2\xb3\xc0\x97\x2e\x98\x09\x8f\xc3\x25\xed\x61\xc2\x35\xd6\xac\xaf\xcd\xc4\xd5\xa0\x8c\xdc\x03\x88\x55\xbc\x17\xd9\xba\xce\x27\xde\x7f\xb8\x65\x6a\x85\x38\x46\xf4\x7a\x0c\x95\xb6\xc7\xec\xdc\x56\xd0\x6f\x23\x47\x2b\x69\x3b\xa3\x75\xfe\x2c\x72\xa8\xd9\x70\xb3\x5b\xb7\xeb\x55\x5b\x50\xbe\xe5\x3b\x70\xc6\xc0\x1e\xe3\xe9\x36\xde\xed\x42\x64\x08\x8d\x55\x63\x42\x99\xe1\xb2\x58\x90\x19\xd1\x19\xc6\xd8\xbf\x75\xff\x06\xa8\x19\x3d\x1b\xd9\x9f\x3b\xc4\xb4\x96\x0c\x45\x36\x61\xce\x94\x6b\x91\x5a\x51\x11\x12\x04\x41\xd6\x54\x35\x63\xd4\xb7\x19\xe8\x6d\xb0\xd1\x7f\xf4\x34\x63\x73\x8b\x21\x0e\x34\xb7\xcd\xb4\x61\x7d\x50\xd6\x18\x0b\x9f\x2e\x89\x38\x21\x53\x10\x35\x42\x23\x28\x6e\x15\xf5\xf6\xc2\x06\xc5\x40\x81\xb0\x12\x41\x71\x41\xef\x76\x3e\xd4\xfd\x49\x47\xff\xd4\x0c\x56\x62\xad\x2a\xf6\xc0\x73\x90\xae\x1f\x0a\x59\x0a\xd3\x0f\x5e\xd0\xa7\x60\xed\xc7\x2d\x1c\x41\x43\x90\x02\xc5\xe3\xca\x4c\x07\x72\x74\x51\xbe\x91\x60\x9b\x21\xe9\x81\x5d\x6b\xf6\xf7\x31\x7b\x27\x3f\x0a\xc3\xc0\x01\xb7\xdf\x32\x9a\xe5\xf4\xb5\x34\x1b\xf0\x67\xae\xac\xac\xe0\x6f\x98\x60\x26\x3e\xdd\x49\x38\x01\xb4\x6f\x86\x15\x98\xc2\x19\xbd\xd0\xd2\x6c\x1e\x54\x81\x75\x63\x3f\x38\x88\xa3\x7d\xa3\x65\xab\xf2\x94\xda\xf9\x3b\xc9\x52\x48\xa9\xd8\xff\x33\x13\xfa\x5b\x48\x8b\xec\xef\x4f\xba\xf8\xfb\x61\x8b\x43\x2d\x76\x81\x1c\xb0\x8b\xd3\x78\xef\x8a\xa1\x59\x85\x57\xe3\xbf\xdc\xde\x5e\xd1\x30\x57\xbc\x5c\x6c\x92\xd1\x6b\x4d\x7d\xfe\x2b\xf4\x49\x97\x0b\xac\x3d\xcb\x6d\x48\x89\xe1\xc4\x89\x5a\x42\x5e\xe2\x22\x0b\xd4\x71\x0a\x59\x41\x06\x3c\x53\xc5\x03\x2f\x02\xd0\xbb\x7d\xbb\x47\xa6\xa7\x66\x4d\x79\xde\x3e\x68\xcc\xff\x47\x8a\x74\x09\xdd\x2b\x41\x8e\x62\x1b\x62\xef\x6d\xe7\xfe\xe2\xf3\x62\x8a\x05\xc5\x86\xd3\xde\xda\x02\x88\x4b\x4f\x6b\x49\xd3\x02\x3e\x4d\x3b\x50\x4b\xf9\x69\x96\x4a\x7a\x07\x3e\x9f\x73\x99\xeb\xd2\x2f\x23\xfa\x7e\xa4\x5d\x6c\x57\x94\xec\x02\x53\x70\x66\x6b\xc3\x4b\xcd\xb5\x69\x79\x54\xb2\xe0\x10\x7b\x54\x68\x96\x4a\xed\xe0\xaf\x2e\x1b\xad\xb3\x79\xf3\x8c\x4d\x60\x56\x93\x23\xb0\x9b\xa2\xea\xf5\xcb\xf5\x3b\xc6\x35\xad\x23\xdc\xdc\xd7\x3f\x5d\xb0\xef\xfe\xf0\xfb\x1f\xc6\xcc\x4c\x56\xdb\xec\x20\x73\x99\x5b\x9a\x38\x3e\x3b\x1e\x63\x8e\xc6\x2a\x0f\x98\x3c\xf0\x55\x78\x05\x46\xaf\x7f\x03\xde\x2c\xf4\xe1\xad\xf9\x28\xcc\xcb\xb7\xad\x69\x84\xaf\xe8\x89\x0f\x6b\xd2\x24\x0c\x50\x50\x53\x84\x0c\x84\x45\xb6\x14\x8a\x9f\x01\x2f\x53\xe8\x5b\x90\x77\x11\x6f\x7f\xe7\xc2\xd1\xaf\xd9\x37\xec\xed\x23\x4f\xca\xd7\xec\xe7\x40\xce\x34\x8b\x04\xbb\x23\xcc\x33\x23\x55\x7c\xc3\xae\x20\x54\xc2\xb7\x73\x57\x1a\xf7\xcd\x31\x9c\x82\xe9\x55\x26\x4b\xb3\xb4\xb0\x70\x3f\xdb\xa3\x23\xf5\x24\x67\x58\x88\x9d\x8c\xd9\x66\x84\x4c\x2c\xc1\x9e\xb7\xf6\xff\xe4\x5a\x1a\xf1\x23\x6e\x00\xd4\x6e\xc3\x6e\x4c\x47\xd6\x3b\x86\xb6\x63\x67\x1b\x33\xef\xb8\x09\x98\x5f\x8e\xcf\x8e\x99\x16\x2b\x5e\x70\x30\xbb\x9d\x87\xb9\x29\xb9\xe9\x08\xd1\x21\x46\xb2\xc2\x8f\x80\xfc\x4b\x50\x22\x6f\x05\x6d\x72\x3b\x87\x53\xe0\xd8\xf4\x91\x46\x64\xa3\x65\x35\x9d\xd8\x4e\x4d\x17\xe3\x20\xd1\x12\x69\x0a\x50\x8d\xc4\x7e\x8a\x8d\xe0\xa3\xb3\x81\x11\x61\x40\x15\xa6\x27\xd5\xf2\x86\xcc\xa3\x01\x46\x54\x34\x16\xc4\x7a\x9a\xff\x0b\x31\x9e\x8f\xd9\xd9\x4c\xa9\xb3\x29\x2f\xdc\x77\x09\xed\x7e\x3b\x9b\xf2\x5f\x47\x6d\x39\x9d\x6c\x83\x29\xff\xf5\x64\x3c\xc9\xbf\x61\x97\xcb\x15\x0e\xec\x12\x8b\xcb\x99\x4c\x5e\xb3\xcb\x7e\xf2\x73\x91\x7a\x66\x06\x10\x8b\x80\x9c\xe2\x22\xe3\x20\x2e\x44\x3d\xa3\x40\x5c\x16\xc2\xe6\x39\xe5\x58\x40\x19\x36\x4b\x38\x42\x86\x55\x29\xa8\x9d\xb4\x75\x2e\x13\x9e\xa1\xc2\x72\x45\x1b\x52\x20\x29\xe3\xba\x82\x30\x38\x9e\xe4\xf5\x01\x31\xf5\x24\xb2\x62\x48\x7a\x5a\xad\xc0\x86\x66\x0f\x33\xbd\xc8\xde\x04\x46\xa8\xf6\xe5\xd8\x3e\x86\xad\xe5\x0a\xab\xf1\xd1\xad\xee\x3c\x73\xb5\xfe\xd5\x1c\xe3\x81\x17\x9f\x6b\x1f\x7b\x97\x17\x65\xb9\x72\xf2\xbf\xc6\x7c\xfd\x14\x0b\x44\xd7\x91\xd5\x4b\x84\xab\x45\x0d\x2f\xbd\x3e\x3b\x9b\x54\x2f\x5f\x7e\x97\x2c\x94\x2e\xe1\x5f\x82\x7e\x00\xae\x0b\x3f\xfc\x09\x7f\xd0\x82\x17\xc9\xc2\x70\x61\xfc\x99\x9d\xd2\x7f\x6d\x04\xe7\x03\xe8\xf9\xf8\xff\xa6\x99\x2b\xb6\x53\x15\x19\x4b\x54\x51\x40\xa5\x75\xd8\x31\xcb\xaf\x2d\xbe\xc5\xfa\x9b\xed\xed\x66\xd3\xd9\x52\x3a\x0b\xba\x70\xe0\x40\x97\x98\xb1\x66\x56\x52\x50\x38\x9c\x31\xc3\x1f\x8c\x64\x36\x15\x33\x55\x60\x50\xc8\x4c\x16\xe6\xc1\x9f\x8e\x0d\x51\x1d\xff\xee\xb8\xef\x3e\x87\x5b\xa0\x79\x9b\xe3\xcf\x4d\xb4\x04\x4b\x54\x96\x91\x4c\x68\xd8\x08\xdc\x21\x94\x97\x63\x15\xfa\xb8\xfd\x06\xec\x4b\xb9\x6e\x17\x9c\xb6\x13\x0d\xdb\xfb\xe8\x27\xdd\x4b\x6f\x3d\xea\x0c\x06\xcb\xbd\xac\x5e\x5b\xa5\xc2\xd7\xb9\x45\x4b\x86\xcc\xa7\xaa\x42\x28\x52\x8e\xcd\x60\xc9\x0a\x50\x8f\x43\x20\x41\x74\xdb\x07\x12\xde\xb9\xd7\x76\xe8\xa6\x74\x19\x9c\x81\x80\xe6\xf2\x5e\x58\xc9\x0a\x62\x9e\x01\x5e\x92\xad\x4f\x61\x08\x80\xf8\x19\xd9\x70\xc4\x32\xc5\x53\x36\xe5\x19\x64\xfb\x25\x61\x6b\xc4\xf0\xe2\x36\x7c\xec\xe6\xe6\xdd\x88\xa9\xd9\x4c\xa0\xd1\x9f\xae\xce\x7b\x59\x94\x15\xcf\x98\x39\x3d\x90\x4a\xa1\x4c\x0e\x65\x3b\x0f\x41\x3b\xbf\x6d\xc4\xcb\x6f\x3c\x68\xc7\x1a\x8d\x6d\xac\x8e\x2b\x20\x10\x48\x42\xcf\xfe\xc5\xdb\x17\xa6\xec\x56\xf0\x86\xe7\x64\x29\xdb\xea\x26\x7c\xb5\x9f\x3d\x2c\xa9\x4b\xf7\x25\xd7\x4c\xe7\xb2\xa1\xed\x9e\x12\xb9\xf4\x8b\x97\xfd\x37\xaf\xb7\x33\x38\xcf\x79\x96\x05\x37\x29\x86\x99\xa2\xb3\xdb\xe5\xf5\xcb\xd1\x8d\xdd\x7f\x7b\x59\x4e\xd9\x16\x2b\xef\xbd\x2e\x3c\x67\xf8\x91\xd7\x62\x16\xd4\xbb\x0c\x83\xdb\x7d\xbe\xe1\x9c\x35\x72\x35\x06\x44\xe7\xae\xb3\xcb\x59\x94\xa3\x38\xd0\xe2\xe9\x2b\xde\x9b\x8b\xd9\xfa\x43\x64\x22\x00\x3f\x00\xa6\x00\xe2\xb8\xee\x95\x21\x16\x93\x44\x15\x02\xaa\x6c\xae\x57\x22\x7d\xa7\x12\x9e\xb9\x2f\xa2\x7a\x5b\x3e\xa5\xe0\xfb\xd6\xec\x6d\x37\x51\x21\xa7\xb0\x7a\x55\xd3\xec\xd3\x5e\xdb\xd2\x7f\x47\x5f\xef\x88\x41\xd8\xd4\xfb\x7e\xc0\x04\x3d\xa7\xc9\x2c\xda\xd9\xc6\x45\xeb\x3e\x22\xbb\x78\xf9\xa3\x23\x02\xfa\xe9\x80\x03\x02\xed\x1a\x85\x6a\xe0\xc7\x98\xf4\x46\xe1\x52\x92\x29\xc2\x52\xa5\x59\x7e\x74\x38\xdd\x91\x7b\x07\x7a\x18\xfb\xac\x8d\x66\xc2\x52\x9f\x92\x75\xf8\x14\x1e\xdf\x05\x39\x6c\xac\xc4\x6a\x95\x1d\x9b\xfb\x83\x04\xe4\x3c\x52\xbb\x83\x00\x85\x44\xe5\x5a\xa6\xc2\xdc\x4d\xd4\x37\x59\xb6\x38\xd3\x32\x9f\x67\xb1\xbe\xee\xcf\xcc\xc2\x08\x7a\xa0\xa1\xfb\x29\x00\xce\x50\x41\x12\xe6\x11\xcb\xc5\x83\xfb\x3c\x9f\x61\xf8\x41\x96\x0b\x55\x95\x46\x98\xc7\x89\xb8\x24\xd3\x2e\x67\x88\xd6\x72\x6e\x84\x53\xe8\xdd\x5a\xc3\x71\x39\x0e\xd2\xf0\x41\x1a\x3e\x48\xc3\xbf\x6d\x69\x98\xec\x82\x5f\x91\x6c\x08\x33\xde\x3e\x4c\xbe\xa3\x8f\x67\x94\xfa\x60\x90\xbe\x08\xa2\x7a\xdb\x36\xd3\x4b\xd8\x46\x1c\xe2\x87\xbe\x10\x5e\xdd\x17\x3f\x54\x06\x65\xbc\x3a\x77\x70\x1f\xd6\xc4\x48\x82\x1a\x90\xf8\xff\x70\xc9\x7c\xc6\x20\xa3\xcf\x10\xfc\xd3\x42\x25\xfb\x0c\x00\xea\x60\xac\x03\x79\x5e\x8c\xd7\x6d\x4f\x77\xeb\xc4\x7b\x2f\x57\x0f\xaa\x39\x49\xd9\xe7\xda\x73\x43\xba\xc4\x77\xe0\xd6\x24\x56\x14\xea\x79\x41\xfa\xba\x30\x8b\x16\x96\xcf\x25\x94\x18\x5e\x9e\x80\x10\x21\x70\xa3\x51\xd0\x53\x39\x03\xcd\xa3\x64\x93\xa3\x59\xc6\xef\x55\xa1\x27\x47\xa4\x19\x14\x41\xc7\x4e\x2f\x01\x1c\x9a\x1f\x6f\x1c\xd7\x20\x01\xb0\x0c\x5f\xb3\x05\xbf\x17\x41\xdf\x57\x71\xa9\x45\xd7\x8f\xb4\xde\x32\x88\xf3\x09\x3a\x85\x69\x06\xb5\xfa\x9c\x2e\x80\xb5\xc5\xd4\x92\xcb\xfc\x14\xbd\xab\x22\x45\x67\x5c\xae\xb0\xaa\x1e\x14\xfd\xfb\xf6\xdf\x5f\x86\xde\x7f\x99\xb3\x0c\xea\xd9\x8d\x18\xb8\x3e\x27\x47\x3c\x59\x0a\x50\x9c\x70\x8f\x4e\xfd\xe0\x93\xa3\x3a\x8e\x46\x2e\x97\x55\xc9\xa7\x59\xbb\xf2\xec\xcb\x48\xb6\xf9\xe6\xdd\x77\x93\x1f\x2d\xff\x88\x98\xd5\xa4\xd2\xa5\x5a\x7a\xe6\x44\x90\x05\xf0\x39\xb9\x6c\x82\xb5\x82\x95\x76\xe9\x1a\x0b\x65\xf8\x9a\x05\xee\xc9\x06\x45\x38\x0f\x2e\xdd\xbc\x98\x92\x35\x28\x7f\xb9\x27\x2b\xc5\x93\x55\xf6\xc1\x27\x77\xa0\xa0\xd2\x23\xa3\x1c\x84\x93\xaf\x56\x38\x79\x1e\xa9\xe4\x10\xd6\x7c\x50\x6b\x3f\x9d\x74\xf3\x7c\x82\x4d\x5f\xf2\x9d\x30\xdf\x4e\xcd\x3a\x89\x9e\xf3\x25\x5f\xad\x42\x00\xa3\x66\x55\x9e\x0a\x48\x1a\xe9\x0b\xf8\x2a\x5d\x5a\xc6\x83\x80\xe9\xd4\x21\x34\xac\x23\x3c\x40\x46\x46\x40\x37\xc4\x4c\xb8\x7a\x00\xe4\x29\x80\x1e\x01\x89\x41\xd1\x96\x85\xaa\xca\x06\x5e\x32\x2c\x47\x0a\x98\xbb\x72\x21\x3c\xa2\xa8\x0e\x5f\xe9\x97\xbd\xcc\xa8\x2d\x50\x18\x85\x57\x07\x20\x3c\xaa\x2c\x5b\xb3\x7f\x54\x3c\xc3\x2f\x47\xe9\xc3\xc9\x5f\xdc\x41\xf7\x4d\x57\xa3\x4e\xc4\x20\xe1\xbc\x42\x60\x5d\x2a\xee\xa5\xcd\xcd\x65\xcf\xfe\x04\x66\x14\xe0\x10\x11\x64\x77\x19\xf6\x2b\x73\xd7\xef\x6b\xf6\x6a\xcc\x2e\xaf\xb4\xab\xd6\x6f\xcb\x15\x04\xa8\x48\x2f\x8a\x7a\x58\x4f\x62\x2e\x9a\xdc\x3c\x5c\xad\x00\x1a\x35\xc9\x19\x81\xb0\xae\xac\xa7\x04\xe4\x5d\x07\x40\x03\x41\xce\xf2\xdf\x49\xfe\x2d\x19\xa5\x5f\xdf\xb1\x54\x60\xdd\xf9\xc2\xe2\xcc\x0a\x61\xe8\x04\x28\x82\x0a\x3f\x52\x2a\xa5\xda\x1c\x27\xf9\xa4\x64\xc1\x44\x43\x07\x43\x80\x2f\x07\x11\xcc\xa1\xc0\x5f\xff\xfe\x25\x10\x0c\x60\x91\x78\x9e\x62\x27\xaf\xbf\xff\xfe\x3b\xf7\xb3\x99\xdf\x8f\x0a\x69\x43\x0b\x4c\x8e\xbc\xe0\xf9\xdc\xa7\xf6\xaf\x0c\x77\xe8\x22\xcf\x36\x00\x2a\x10\x67\x00\xfb\x69\x10\x1a\xe2\xfc\xa9\xa1\xd4\x31\xfc\x33\x34\xe8\x03\x55\xa3\xaf\xcc\x82\x6d\x23\xc8\xbf\x3f\x62\x8d\x31\x26\xf9\x24\x07\xca\x24\x8b\xfe\xe4\x68\x55\x88\x44\x6a\x31\x39\x22\x08\xaf\xf4\xe2\x31\x12\xa8\xb5\xaa\x03\xb6\x97\x50\x26\x58\x92\xba\x6c\x12\x2f\x01\x03\x27\x47\x33\xa5\xc6\x53\x5e\x8c\x13\xb5\x9c\x1c\x9d\x60\x64\xc3\x83\xcc\xd2\x84\x17\xe9\xe4\x68\xd4\x35\x98\x13\xc8\x09\x0c\x4b\x6e\x02\xfb\x26\xc5\x8f\xd8\x41\xbe\x19\x9b\x61\x70\x08\x24\x26\xd7\xd0\x89\xee\xec\xf8\x9b\x63\x74\xad\xf1\xd5\x4a\xf0\xc2\x1c\x29\x59\x6a\x91\xcd\x18\xd7\x01\xfe\xea\xcd\xfb\x1b\xea\x1d\xa5\x9d\xa0\x42\xa6\x9b\x06\x3c\x1f\xb3\xff\x55\x95\x59\x3f\x43\x87\xa0\xa5\xf0\xfa\xfc\xfc\x10\x38\x53\x58\xf1\xff\xfc\x4f\x2c\x7e\x74\x82\x65\x8e\x80\x56\xac\x5f\xa2\x8d\x5e\xe0\x25\xd2\x20\xf2\xda\xb1\x7f\xe0\x6b\x3c\xb6\x33\x66\xf9\x0c\xed\xe3\x88\xd8\x29\xc2\x37\x7d\x38\x97\xcd\x8f\x44\xc2\x3d\x90\x3e\x6c\xd8\x42\xf0\x14\xcf\x9d\x30\x0c\xca\xf0\x4a\xd3\xe5\x98\x7d\x1b\x75\xef\xbf\x31\x08\x64\xdf\x69\x98\x52\xf9\x91\x80\x5a\xab\xd9\x4c\x3e\xb2\x17\x85\x58\xaa\x7b\x7b\x67\xe0\x9e\xc0\x6a\x9e\x58\x06\xe2\x16\xb9\x96\xe2\xda\x4b\x0b\x66\xb8\xa7\x83\xd4\x3c\xd2\xf1\x69\x40\x35\xdf\xcf\x56\xf7\x6e\x2f\xc8\xb2\xc1\x89\x83\x1b\x98\x53\x70\x92\x22\xae\x6c\x09\xaa\x01\x17\x77\xdc\xa6\xa0\xc2\xd5\x9a\x97\x52\x7b\x5e\x13\xc0\x96\xe3\x4b\xd4\x33\x17\x07\x6d\xf3\xec\x77\x29\x1f\x81\x35\x38\xb5\x1d\xa3\xa4\x1c\xa0\x4e\x36\x5d\x7f\x66\x04\x0f\xad\x1f\x31\xad\x2c\x0e\xbc\x1d\x4a\x6e\xcb\x69\x6a\x31\x00\x02\xf0\xd5\x13\xc4\x40\xe3\x12\xdc\xb3\x1e\x45\x11\x5e\x16\x25\x65\xd8\x67\x0f\x52\x2f\x30\x4c\x16\x42\xc2\xfa\x17\xaf\x33\x3c\xe4\x3c\x88\x34\x43\x89\x2a\xe1\x2b\x40\x28\xaa\x19\x49\x6e\xd1\x8d\x48\x15\x9f\xf3\x63\x57\xd6\x37\x5f\x53\x3a\xba\xf3\x30\x86\x55\xcd\xd8\x31\xf5\x88\x58\x58\x20\x9a\x63\xbf\xe5\x0e\x14\x51\x33\xaf\x38\xd3\x85\xcf\xb8\x60\x34\x3e\xc5\x53\xc2\x49\x16\xa1\x35\x43\x15\x76\xfe\x66\x96\x90\xe5\x0e\xb0\xd9\x2e\x38\x6b\x9e\xa9\x29\x77\xe1\x74\x7b\x8b\x59\x91\x81\x21\xb0\x1d\x86\x71\x59\x6b\x51\x2f\x5b\x5a\xf7\x64\xb9\xe0\x63\x5f\xd0\x17\xe2\x4a\xbd\x7c\x1b\xb5\xb6\x06\x05\x2a\xfc\x50\x2b\x58\xe1\x2c\x69\x74\xfe\x7d\x8f\x68\x66\xc8\xa8\xfe\xb4\x60\xa9\xe1\x37\x09\xf4\x7f\x57\x03\x11\x90\x70\xd7\x40\x10\xa0\x91\xcf\x6c\xee\x03\x2f\x52\x48\x36\xb8\xe2\xa5\x9c\xca\x4c\x96\xeb\x11\x56\x86\x20\x30\x81\xf3\xf8\x63\x72\x21\x88\x3e\xb0\x14\x60\xf3\x5e\x88\x44\xa4\x18\xd3\x78\xef\x54\x5f\x8c\x86\xbd\x8d\x2d\x57\x46\x70\x13\x4b\x59\x9a\xfb\x8b\x17\x60\x1c\xa3\xab\x09\x89\x07\x22\x16\xfd\x90\x35\xa3\xa3\xb5\x6d\xd4\x61\xfd\xd6\xf8\x72\x7e\x75\x69\x6d\x2b\x72\x9e\x1b\xc1\x8e\xd6\x7b\x13\x18\x21\x84\x02\xd7\x70\x0f\x54\x8d\x7a\xc9\x8b\x8f\x68\xa8\x24\x12\x1c\xb9\x5a\x1d\x11\x0c\x43\x8b\x12\xaa\x35\xe1\x59\x44\x7b\x82\x4b\xf7\x48\xeb\x61\x96\x7d\x69\xd5\x61\x32\x36\x13\x58\xc4\x72\xf4\x98\x46\x54\x52\xb9\x2f\x6d\xbd\x64\xe1\x50\xb6\x31\x05\x07\xf1\x37\xf7\x3d\xf2\x7b\x3b\x53\x07\x75\x8e\x31\x7a\x97\xb3\x58\xc8\x85\x28\xd1\x28\x87\xe4\x28\x92\x72\x81\x22\x72\xa7\x34\xd6\xb8\xd0\xf3\x98\x74\x5c\x2c\x78\x99\xb5\x7c\xf5\xed\xbb\x9b\xd8\xc4\x3a\xae\x29\x23\x0e\x1a\x66\x04\x49\x0a\xff\xd0\xfe\x12\x34\xef\x9b\x9f\x46\xec\xfb\xef\xbf\x83\x05\x59\xda\x70\xee\xa5\x80\xec\x2a\x8e\xd8\x60\x79\x2d\x93\xf2\x34\x6a\x56\x5b\x8f\x30\xb2\xd6\x89\x93\xd4\xc7\x63\xa0\x13\x80\x74\x0d\xb1\x27\x49\xa2\x8a\x34\xa8\xbf\x62\x7a\x00\x0e\xe3\xaf\xf6\x72\x51\xa8\x6a\x8e\x9a\xf1\xcd\xfb\x4b\x98\xa6\x78\x2c\x45\xae\x81\x7c\xe4\x2c\x0a\x16\x0f\xce\xdb\xac\xca\x66\x32\xcb\xac\x18\x67\x5b\xb8\x0f\xbf\x79\x7f\xf9\x3c\xdb\x74\xfb\xee\x66\xa7\xc0\x82\x1a\x9b\xde\xc6\x3e\x32\xb0\xad\x99\xd9\xf0\xfb\xbe\xbf\x36\x54\xd8\xd0\xdd\xf9\xfd\x80\xd8\xde\xeb\xde\x5c\x97\x3f\xd2\x75\xd9\x12\xfb\x1e\x3c\xf5\xf9\x58\xeb\xa3\x56\x0e\x97\x66\x7a\x3b\xb5\xb7\xef\x36\xee\x81\x70\xa0\x81\xc0\x58\xeb\x17\x68\x79\x75\xf0\xc2\x9b\x5d\xea\x5f\x75\x73\x0e\x62\x31\xab\x2c\x78\xae\xe1\x5c\x65\x7c\x2d\x0a\xa6\x45\x52\x15\xb2\x5c\x37\x8c\x4c\xdb\x78\xf3\xe0\x4c\xb7\x9b\x94\x28\xed\x5f\xc4\x6c\xb5\xaf\x72\x43\x9a\x22\xb0\x25\xd3\x1f\x64\x02\x22\xb1\x80\x8a\xd5\x44\x79\x7f\x83\x84\xd5\x56\xd0\x38\x23\xb6\x6d\x33\x91\x67\xfa\x46\x24\x85\x28\xe3\x28\xb5\x48\x21\x03\x8e\xaf\x45\x09\x02\x95\xf5\x31\x75\x89\x5f\x11\x8b\x90\xda\x23\x18\xe5\x8c\x65\x62\x56\x86\x57\xc2\x16\xb5\xf1\x01\x84\x6a\xe6\xd9\x81\x70\x75\xcf\xda\x84\x2a\x7c\xd3\x5d\x57\x3e\x98\xc6\x2c\xa4\xcf\xde\x85\x0c\x14\x38\xf5\x4f\x56\xf6\x84\x29\x37\x05\x50\xf3\xa2\x51\x9c\xcc\x67\x3a\xe3\x8c\x61\xa5\x8e\xdb\xf2\x4c\xe5\xde\xe8\x63\x1f\xa1\x8a\x94\x41\xce\x06\x5c\xb7\x59\x26\x21\x57\x8b\xb5\x54\x4e\x80\x0e\x26\x47\x56\xa5\x46\x41\x06\xa6\x3e\xad\x5b\xea\x46\xb5\xbe\x69\x6b\x61\x8b\xac\x29\x87\x52\x05\xa0\xf8\x40\xeb\xf1\x97\x58\x65\x77\x2f\xd1\x17\xed\x5a\xad\x4b\xa5\xc2\x57\xc4\xfb\x70\x2f\x0a\x33\xc4\xa6\x63\x67\xdb\x30\x5d\x16\x15\xd8\xe3\x1b\xe6\x66\x2b\x3b\x29\xdb\xb4\x7e\xf0\x8a\x2a\x47\xa7\x28\x24\xb4\x19\x90\x80\x2d\xfd\x49\x3e\xb6\x55\xbe\xbb\xa2\x27\xf5\x29\xcc\xe8\xc7\x27\x4f\xa4\xab\x08\xdc\xb6\x4e\x86\xb1\x13\xde\xff\xbb\xe2\x79\x29\xcb\x75\xef\xd5\xd8\xf0\x1e\x9c\x35\xfb\xa8\xf3\xd2\x68\x37\xaf\xab\xbc\x94\x4b\xd1\x0b\x6c\x0e\xdb\x39\x85\x84\x7b\xd0\x83\x2f\x46\x59\x60\x4b\x2b\x3b\x78\x8e\x44\x4a\x0f\x32\xb5\xa8\x3f\xe9\x25\x4e\x5f\xa1\xd3\x6b\x3b\x71\xbf\x41\xe3\xa2\xca\x41\xce\x4c\x82\x2a\x9a\x2e\x49\x5e\x38\x02\x55\x09\x7b\x91\x58\x19\xef\x84\x2d\x79\x5e\x41\x6c\x70\x14\xf6\x07\x1a\xb7\x2a\x7c\x76\xa8\x42\xdd\x4b\xf0\xe0\x16\xe8\x4e\x0d\xe0\xda\xf4\x59\x57\x2a\xf5\x48\xed\xff\xaa\xa6\x22\x13\x68\x7e\x81\x60\x54\xcc\xf0\x0e\x67\x50\x68\x95\x39\x43\x59\x38\x3b\xe0\x6e\xae\x63\x6b\x6b\xb6\x64\x57\xda\x94\x4e\x5e\x27\xc0\x52\xf1\x7a\xc4\xb4\x10\x6d\x9e\x32\x91\x2f\x0c\xfb\x36\xfa\x80\x3e\xfb\x28\x56\x1a\xdc\x63\xb0\xf1\xb4\x8a\x88\x15\x1f\x2f\xdb\x32\xd0\x1e\x2a\xa0\x1f\x10\xd5\xbf\x49\xd7\xf3\xd7\xe0\x5e\xde\xb9\xf0\x57\xc4\x50\xbf\x3c\xa0\xb4\x4a\xc5\xb8\xf5\xd2\x19\x86\x91\xee\xbc\xb3\xf6\x04\x8f\xee\xec\xbf\x0f\x70\x54\x6f\x1b\x67\x4d\x88\x36\xe5\x50\x59\xe1\x8b\xe2\xb9\x9f\xa5\xb2\x42\xe7\x31\x38\x20\x90\x3e\x37\xe6\xf9\x37\x86\x3e\xea\x96\xf2\x9f\x8a\x3e\xda\xcc\x8b\x07\xf2\x4a\x1b\xf9\xc3\xdb\x32\x1f\x87\x0d\xa1\xb0\xbf\x33\x5c\x79\xe8\xaa\x47\x2a\x87\x89\x7a\x22\xbb\x5a\xc4\x7d\x89\x59\xb9\x0a\xf0\xf6\x29\xa6\x2b\x9a\xf1\x44\xb0\x17\x17\xd7\x97\x27\xde\x9f\x42\x36\x77\xae\xd9\x83\xc8\x32\xc0\x1f\xe7\x94\x28\x16\xfc\x20\x2a\x27\x55\x12\x6a\xee\xe2\xf8\x80\x96\x82\xac\x99\x6c\x41\xee\xac\x95\xf2\x71\x8c\x45\x95\x37\xd5\x1f\xbb\x14\x6d\x60\xe3\xd6\x1b\x82\x64\xf8\xbf\x00\xc6\xbb\x25\xdf\xb3\x0a\x34\xf4\x0e\xbd\xfc\x69\xda\x78\x14\xe0\x1d\x6f\xd6\x3e\x74\x94\x6f\x5f\xbe\xfa\xc3\xcb\x6f\xbf\xfd\xe1\x74\xa5\xd2\x53\x3b\xa3\xf1\x32\xad\x79\x0f\x81\x02\x29\xcb\x21\x07\x25\x34\x88\xfd\xbe\x7f\x35\x7e\xf5\xef\x78\x09\x49\xb2\xe2\x2f\x54\xae\x0a\xaa\x57\x46\x4c\x10\xf6\x4e\xe4\x58\x88\x0d\x75\x39\xb7\x44\x33\xc1\x01\x2a\xb4\xb5\x74\xe3\x0c\x24\xe0\x74\x89\xb6\xaa\xeb\x48\xd0\xf3\x28\x2d\xa5\x40\x62\xca\xa0\xe4\xba\x55\x7e\xa9\xaa\x56\x00\x0d\x77\x99\x4c\x2f\xae\x2f\x6b\xb4\x8b\x64\x57\x69\xc0\x15\x50\x44\x00\x64\x63\xb5\x72\x80\x8b\x0c\x30\xbf\x53\x31\x32\xb2\x36\x9a\x83\x65\x4f\xa6\x8b\x3b\x50\xa9\x60\x93\xea\xe5\xcb\x6f\x7f\x80\xd1\x6a\x0e\x14\x73\x50\x21\x3b\x17\xa5\x01\xa5\x24\x3c\x34\x72\x41\x16\xd0\x7b\x2e\x33\x4e\x55\xcf\x30\x7f\x1a\xe6\x4b\x86\x23\x63\x5b\x5a\xf3\x9e\x51\x8c\xd1\xe8\x56\x08\x66\x4e\xc0\x3d\xcf\x20\x37\x5a\xf8\x6e\x2d\x10\x81\xdb\x6e\x58\xc2\x21\x7c\x61\x62\x76\x21\x99\x1c\xb1\xa5\x9c\x2f\xbc\x2b\xc6\x2d\x9c\x79\xca\x3e\x5c\x5c\xba\x45\x7e\x81\xd5\x47\x72\x5e\xca\x7b\xc1\xde\xc9\xbc\x7a\x0c\x4c\x0c\x27\x8d\x1c\x52\x45\x95\x3b\xe4\x7d\xc3\x0c\x11\x9c\x76\xbb\xcb\x60\xbc\x35\x8b\xa7\x8a\xa5\x5d\xdb\x37\xef\x6f\xd8\x3b\x04\x49\x5d\xff\x74\xc1\x5e\xbd\xfa\xf6\xbb\x13\xcb\xd9\x96\x08\x11\xc9\x07\x84\x24\x18\x51\x25\xad\x32\xf3\x57\xf3\xde\x73\xcf\xd8\x42\x65\x29\xe5\x9d\xf7\x3f\x26\x2a\xd7\x65\xc1\x21\x83\x43\x2d\xc3\x33\x50\x8d\x65\x01\x64\xd1\x94\x3a\x66\xb0\x40\x31\xd8\x1b\x2e\x8b\xd9\x1b\x5b\xdb\x9d\xf2\xa7\x49\x4c\xb2\x10\x0c\x2a\x35\xcb\x65\x36\x6a\xe9\x2f\x24\x25\x48\x11\xee\x0d\x4a\xd3\x35\x16\x6b\x31\x03\x6c\x7f\x3e\xfd\x3a\x6c\x79\x8b\xba\x83\xbd\xe1\x3e\x0c\x3a\xdf\x78\x6f\xde\x44\x1b\xd5\x75\x63\x06\x5b\x16\xb3\x86\x8e\x6d\x9b\x81\x27\xd6\x2c\x3b\x2d\x16\xb2\xec\x88\x45\xf7\x5a\x52\x4d\x07\xdd\xd9\xb3\xc3\xa7\x20\x41\x69\x9b\x5b\x11\x73\x93\x91\xc7\xdf\x56\x60\x51\x79\x1b\x1d\x34\x76\x7b\x8c\xf5\x4c\xf0\xe0\x35\x69\xc1\x61\x56\xa7\x35\x1a\xe3\xc8\x94\x82\xca\x9f\xf0\xb2\x8e\xaa\x7c\x46\x5d\x45\xf3\x97\x9a\x2d\x45\x31\xf7\xb8\x45\xcc\xe3\x0e\x40\x1b\x60\x01\x41\xe3\x31\x3b\xcf\xd7\x91\x61\x3f\xcb\x18\x62\x5c\xed\x35\x8f\x74\x8a\x0a\x0f\x1a\x08\x79\x0a\x75\x16\x23\x97\x7c\xaf\xdd\xb8\xe9\x21\x29\x55\x46\x75\x3c\x5b\x34\x96\xe0\x21\xb2\xd8\x15\xd0\x73\xca\x5e\x88\xc7\x24\xab\xc0\x65\x9c\x56\xab\x0c\x5c\x4a\xfa\xc4\xcc\x72\xc8\x79\x4e\xab\x02\x63\x92\xe8\x0b\x46\x4c\x40\x56\x67\xc8\x20\xce\xaa\x5c\x2a\x67\x9e\xa4\xe4\xe4\xb4\xd1\x38\x1d\x1f\x37\x66\x56\x06\xea\x57\xd7\xb6\xe2\x29\x8a\x94\x0b\x4a\x72\xdf\xbe\x31\xa6\x94\x97\x6a\x29\xfb\xcd\x0c\x2e\x50\xc9\xf7\xda\x7e\x88\xd1\x05\x79\xf0\x84\xfc\x26\x3c\x21\xb8\x99\x07\x47\xc8\xc1\x11\xb2\x41\xe7\x5a\x74\x29\x5b\x07\xbb\xdc\x9e\xed\x72\x8b\x2e\x5d\xe9\xa0\x24\xfd\xa6\x95\xa4\x27\x69\x47\xa3\x61\xea\xd1\xc1\xc0\x7a\xf0\xb3\xb5\xf9\xd9\x0e\x16\xb3\xcf\x63\x31\xab\xc9\xd1\x07\x03\xc6\x90\xe5\xda\xde\x7e\x51\x5b\xe6\x6e\x21\x38\xe8\x7a\x5f\x3e\xd5\xa6\x74\x7d\x70\xa9\xfe\x56\x45\xb7\xcf\xe8\x52\x6d\x51\xe2\x0e\x1e\xd5\x83\x47\x75\xff\x1e\xd5\x16\x42\xdb\x8f\x43\xb5\xc1\x81\x0f\x76\xe1\x83\x5d\xf8\x60\x17\xfe\x3a\xec\xc2\x58\xdf\xcf\x9d\xe2\x73\x8c\x8a\xbe\xb8\xb9\x7c\x53\xc8\x7b\x34\x66\x74\x9d\xe5\x7a\xdb\x38\x2c\x9c\xe2\xcd\x64\x9e\xc9\x5c\xb0\x8b\x9b\x4b\x46\xad\xb0\x6e\x54\x54\x0f\x97\xb4\xed\x3e\x69\x28\xe7\x4b\xd1\x14\x86\xf2\xd6\xf0\x8b\x30\xf0\xa2\x10\x73\xa9\x4b\xc8\x0a\x1d\xc6\x60\x98\x39\xa5\xf8\x95\x3b\x45\x17\xb4\x2f\xdd\x4f\x99\x78\xfc\xab\xca\xaa\xe5\xc6\x90\xfa\x46\xe3\xd6\xc5\x33\x8f\xef\xf1\xf1\xee\xab\x46\x9f\xd8\x58\xb7\xd4\x6d\x70\x3c\x35\xfc\xbd\x2d\x68\x25\x98\x0e\x36\xda\x31\x2c\xa3\x7d\xe1\xfe\xa2\x74\xd9\x57\xe7\xb0\xd6\x34\x92\x70\x21\xe0\x84\xa6\x97\xa8\x1c\x39\x11\xb1\x69\x6b\xd3\x41\xfd\x8f\x2c\xc5\x54\xda\x12\x2a\xa3\x51\x35\xdd\xca\x08\x2b\x97\x2e\xed\x1c\xe5\x8f\x0f\x6a\xbf\xe1\xb2\x93\xc1\x79\x80\x47\x83\x97\x0b\xac\xdf\xd5\xfc\x16\xff\xcc\xd5\x62\x0e\x07\xb2\xf6\xab\xf0\xb3\xa2\x1a\xf3\x41\x9d\x33\x7b\x0b\xdd\x7d\x73\x07\x25\xa7\x25\x5e\xb0\x19\x87\x00\x7c\xc3\x42\xcb\x42\x2e\x8d\x3e\x07\x71\xcf\xf7\x3c\x93\x29\x2f\xa3\x7a\x8f\x34\x2c\xdd\x1a\x30\x28\xd4\x7a\x9b\xe4\x93\xfc\x2d\x1a\xdf\xf4\x6b\x76\x77\x36\x53\xea\x8e\xaa\x7c\x62\xdc\x11\xfe\x34\xc2\xff\x9e\xdd\x01\x63\xbc\xb3\x25\xd7\xee\xe2\x37\x7c\x9d\x66\xf8\x39\xbd\x63\xaa\x60\x77\x67\xa2\x4c\xa0\x55\x6b\xf0\xaf\xe0\xe9\x87\x3c\x5b\x37\xd7\x0f\x3e\x25\x4a\xd2\x0e\xbb\x8c\xfd\x07\xab\xd6\x52\xdd\xd2\x96\x54\x33\x17\xb0\x9c\x81\x46\x6b\x57\x58\x55\x79\x69\xcb\xa8\xe1\xc8\xc1\x2e\x4f\x95\xca\x04\xcf\x77\xa2\xf2\xb7\xf7\x32\x29\x49\x63\xeb\x22\x6f\xdb\x86\x89\x7b\xb8\x91\xc9\x02\x03\xe5\x17\x4b\xbc\xe9\x8d\x00\x0e\x82\x7c\xa9\x20\xe0\x8e\xcb\xdc\x57\xbf\x85\x02\x0f\x7c\x26\xca\x75\x28\x44\xf9\x8c\x8b\x50\x8a\xcf\x1b\x80\x66\x46\x46\x19\xb3\xa0\x66\xa0\xe9\x14\x04\x00\xac\xfe\x4a\x13\xa1\xd8\xf8\xa4\x10\xf6\x16\xbc\xfa\x70\x73\x4b\x01\xbd\xe3\xf1\xf8\xcc\x1c\x1f\x5b\x1b\x4d\x21\x93\xa5\x82\x69\xf6\xfd\x43\xb6\xfb\x4f\xaf\xd4\xa6\x22\x13\xa5\xf8\xb0\xea\x90\xb2\xde\x84\x8f\x6d\x26\x00\x4a\x15\x9b\x3e\x49\x33\x89\x7a\x3e\x58\xaf\x3f\x95\x32\xeb\x2d\x5a\xb5\x90\x61\x90\xe4\x49\x7e\x98\x0a\x28\xc6\x66\x8e\xe5\xa0\x5a\x2f\x03\x2d\xd1\x5b\xba\xb8\xbd\x6e\x19\xd3\xca\x93\x6d\x77\x35\xa6\xfb\xd3\xcd\x9f\x0b\x55\xad\x6e\x4a\x23\xbf\xcf\xd7\xc1\x59\xe8\x62\xc1\xed\x6f\x44\x5c\x47\xd3\x33\xc8\x35\x04\x5c\xc0\xd6\x5a\x77\xd9\x27\x80\x53\x46\x8d\x07\x54\x0f\xe2\xf9\xbc\x2d\xcf\x05\xfe\x8e\xb7\xf8\x42\x38\x01\x90\x7e\x56\x33\x36\xd3\x6c\x6e\xe6\xac\xc7\xcc\xd5\x2b\x07\xce\x96\xc9\x8f\xe0\x1c\x9c\x29\x73\x70\x9c\x54\x69\xdb\x33\x48\xab\x65\x64\x87\x30\xe5\x18\xf4\xeb\x83\x7f\xb1\x86\x7f\xc9\x8b\x12\xbe\x14\xd2\x2f\x5d\x5b\xdc\xb2\x11\x9d\x7e\xae\x74\x79\x5d\xe5\xe7\x4f\xd2\x7e\x70\xdb\x7c\x8a\x85\x37\xd7\x66\x16\xa0\x29\x16\x94\x19\xb2\xb6\x28\x94\x44\x2a\xde\x0f\x27\xea\xa5\x32\x81\x94\x04\x0f\xe6\x17\xda\x52\x07\x3b\xb0\xa9\x02\x29\x70\xfe\x42\xe5\xa5\x78\x2c\xb7\xaf\x77\x5a\xa3\x35\x3b\xe9\xcd\x14\x09\xa2\xab\x2a\x4a\x6c\xbb\xa9\xb2\x69\xd8\x30\xc0\x6b\xe0\xfe\xd8\xac\x27\x98\xe4\x62\x7b\x19\x37\x12\x72\xa7\xca\x6e\x76\xb8\xcf\xfd\xb2\x6e\xa8\x65\x2c\x65\x7e\x34\x3a\x5a\xf2\xc7\xa6\xa2\x61\x7e\x6c\x7c\xde\x92\x3b\xb1\xd7\x8c\x65\xcb\x33\x99\x8f\x1b\x61\x76\x01\x2d\xef\x43\x5f\xa8\xb9\x7d\xe7\xa0\xaa\x61\x5a\x19\xfc\xe9\xbb\x6f\x81\x27\xca\x16\x99\x61\x29\x73\x4f\x21\x41\x62\xca\x9d\xc6\xd8\x41\xe0\xb3\xf4\xb0\x29\xc9\x03\x36\xf1\x09\xda\x39\x5b\xca\xfc\xcc\xac\x0d\x8a\x2c\xd1\x61\x87\x64\xc2\x6f\x7a\x7d\x06\x9f\x69\x27\x7e\xf8\xfe\xf9\x77\xc2\x8c\xb1\xc3\x4e\x5c\xa9\xf4\x8d\xd4\x45\x05\xf3\xf9\xb1\x4a\xe7\x62\xa3\x1b\xa7\xa5\x39\xd5\x6d\x53\x4e\xf4\xc6\x53\x01\x5f\x61\xd6\x2f\x75\xed\xf1\x2c\xda\x82\xab\xdc\xde\x08\xf5\x7c\xde\xe6\x30\x1e\x24\xe2\x43\xb4\xf2\x6f\x43\x0e\xfd\x0c\x51\xc3\xb6\xe8\xd2\x54\x2c\xf8\xbd\x54\x85\xab\xd6\xde\x3c\xbc\x43\xfc\xd4\x35\x01\xa4\xa5\x97\xbe\x52\xa1\x3f\x43\x12\x32\x91\x60\x26\x2e\x35\x05\xdc\x41\x5a\x4b\x52\xf4\x7c\xb3\x1b\x96\xb8\xa8\x9f\x31\x36\x2b\x7b\x0e\x78\x67\x4f\x15\x3e\xfb\x47\xea\xf3\xc0\x77\xbc\xd2\x56\x51\xa1\xa5\xe9\xc1\x1d\xff\x85\xf0\xe9\x7a\xca\xa5\xa7\xea\x13\x6d\x02\xc0\xc1\xc9\xfe\x25\xde\x07\x83\x9d\xda\x03\x44\xbc\x27\x7a\xb7\x07\xf2\xca\xed\xb8\x91\x8f\x1e\x0e\x9a\x62\xec\x70\xc7\xdd\xb0\x59\x44\x5c\xf2\xc7\x5f\x72\x87\xba\x6d\x61\x3f\xb1\x09\xd7\xea\x13\x72\xc6\x78\xc9\x96\xe6\xca\x9a\xd4\xfa\x98\x1c\xa1\xa6\x88\x1e\x67\xd4\x23\x27\x47\xd6\xff\x3c\x39\x02\x43\x44\xe5\xdb\x33\x3e\x2b\x05\x26\x60\xb3\x23\x8d\x98\x1c\x8b\x31\x13\xf7\x22\x07\x97\xf1\x54\x63\xea\xd4\x99\x6f\x25\x52\xc4\xcf\x46\xd8\x5e\x95\x63\x92\xff\x55\x61\x5e\x2d\x9d\x5d\x3e\x2f\x79\xb1\x76\xbd\x6b\x40\xf5\x21\xcc\xd7\x1c\xc5\x97\xa1\x7d\x7b\x59\x95\x18\x13\x00\x9e\x62\xa3\x54\xb8\x34\x71\x60\xd2\x98\x18\x65\xe4\xdc\x7f\xeb\xfe\xaa\xff\x8e\xa2\x9e\xb7\xdc\x09\x4c\x49\x5c\x9f\x5c\xcf\x46\x80\xc2\xaf\x4b\x5b\x69\x76\xf8\x86\x80\x19\x69\xc3\xa6\xb0\x1b\xb0\x19\xd9\x8d\x01\x8b\xd2\xf6\xfb\x32\x39\x7a\xf5\xf2\xe5\xbf\xed\x77\x89\x75\x27\x8a\x03\x41\xd6\xff\xa8\x44\xb1\xc6\x1c\xbd\xb0\x76\x0f\x0b\xa5\x45\x30\x43\x2c\x95\x90\xf3\xb9\x77\xe6\x07\xaa\xdb\x74\xa8\x40\xb6\x89\x81\x99\x79\x38\xb0\xc9\xee\x76\xd1\xb8\x9f\x27\x57\x86\x1e\x2c\xc4\x6d\xc9\xce\x50\xba\x0d\x7c\xd7\xed\x25\xe6\xbc\x14\xdc\xce\xe7\x18\x75\x64\x2e\xc9\xb2\xe0\x32\x43\x1a\x4d\xcc\x61\xf6\xd9\x45\x39\xd3\x6b\x5d\x8a\x65\xaf\xc7\xdb\x75\xaf\xc9\x61\x7c\x34\x3a\xa2\xc0\xa1\xbf\x08\x9e\x95\x0b\x23\x4c\x90\x06\xe1\x7f\x10\x8f\x58\x01\xe4\xca\xe8\xe6\x0d\x21\xaf\xf6\x7e\x63\x75\x6c\x56\xd2\xbc\x5a\x4e\x05\xa8\x23\x0b\x6c\x5a\xd3\xf5\x37\xd9\xb1\x6a\x53\x6a\x33\xa4\xc8\x65\xb5\x74\xca\xcf\x93\xc6\xc2\x45\xa2\xcf\x6d\x7a\x87\xc2\xc7\x3e\x8d\x45\x73\x7b\x5b\xce\x19\x7b\xe0\x9a\xad\x0a\x95\x08\xad\xfd\x41\x83\xdc\xd5\x20\x0c\xf9\x86\xa1\x3b\xd2\xc6\x75\x4c\xab\x12\xea\x71\x1b\x61\x67\x2d\x8c\xc0\x23\x72\xaf\x4f\x51\x67\x6d\x36\x9a\xb0\xc6\xdc\x79\x94\xbd\xc2\x66\x20\x5d\xf2\x95\x17\xbc\x20\x18\xe4\xc1\x56\x96\x08\x66\xe7\x67\x1e\xf2\xd0\xd0\x47\xda\x7c\xdd\x8c\x06\x30\x2d\x91\x83\x7f\xf4\xcd\x8f\x61\x06\x52\xae\x99\xd1\x52\xf3\x39\x7e\x0c\xa5\xdb\x86\x5a\x86\x22\x13\xd0\xfb\x0b\x55\x10\xe3\xe6\xd0\xb5\xaa\x4a\xaa\x30\xf2\x51\xac\x2d\xd3\x36\xf3\x6f\xc1\x65\x84\x78\x24\x94\x55\xa9\xd1\x8e\x9f\xe8\x72\x84\xba\xd9\xa5\x32\xcd\x8f\x4b\xa6\x92\xa4\x2a\x30\x85\xb9\xfb\x62\xb8\x7f\xca\x85\x30\xb2\xa7\x37\x42\x43\x6d\x0d\x91\xfa\xd5\x06\x80\x25\xaf\x4a\x65\x88\x27\x81\x2b\xda\xac\xd3\xc6\x6d\xa4\x05\xd1\x6a\x89\x9f\x02\xf3\x82\xc8\xa0\x12\xdc\xf9\x73\x25\x34\xd3\x4b\xa5\x2c\xdc\xcb\xac\x8f\xaf\xc0\x28\x96\xab\x72\xed\xb2\xc3\x82\xb0\x43\x0b\x86\x9d\xbd\xe3\xc5\x5c\x04\x67\x48\x18\xb1\xd8\xe6\xab\xc5\xc5\x46\xa1\x9d\x6a\xcf\xaf\x0a\x35\xcd\xc4\x92\x32\xa3\x9a\xef\xb7\xeb\xd3\xaa\x38\xee\x2b\xa4\xd4\xdf\x2d\xb7\x72\x89\x3e\x91\x16\x06\xd7\x04\x40\xb9\xef\x82\x99\xfa\x37\x82\x4a\x99\xbe\xdc\x12\x55\x37\x1a\xc6\x3a\x22\x46\xd9\x82\xde\x2b\x79\x16\x2c\xeb\x0a\x19\x48\x95\x97\x01\x9e\xb1\x71\xeb\x0e\x1b\xd9\xb2\x81\x3f\x8b\xdc\xe2\xd9\x36\x19\x62\xd8\xdc\xb5\xf3\x1c\x04\xce\x03\xa8\x50\x0e\x9a\x69\x8e\x2b\x5e\x51\x63\xf6\xa6\xb1\xb6\xe8\xe2\x83\xec\x39\x74\x8f\x85\x5c\x50\x6a\xc4\xd3\x38\x34\x49\x73\x8e\x58\x7e\x06\x94\xf2\xab\x37\x3f\x1e\x3b\x35\xd1\xcf\x6e\x47\xcb\xf7\x40\x59\x02\xe8\xa6\x57\x20\xb0\xfe\xb0\x2b\x78\xd2\x23\x08\xc4\x8d\xd9\xdc\x88\x5c\x94\x9e\x9b\x63\x8d\x05\xf3\xb5\x4b\xfe\x51\xd4\xaa\x72\x70\x80\x5c\x46\x0e\x38\x46\x1e\xb8\xd8\x8d\xc5\x57\xab\x4c\x5a\xe3\xb9\xe5\x70\x2e\x06\xef\x00\x27\x39\x18\xcf\x7f\x23\xc6\x92\xdf\x56\x95\xc9\x21\x06\x7d\x8d\xc5\x83\xfc\xc1\x23\x2f\xb5\xc8\x01\xa9\x30\x04\x96\xd2\x62\xe1\x8b\x59\xd2\xa0\xec\x9c\x7d\x4c\x70\x3f\x39\x3a\xfb\x46\x19\x60\xd4\x6e\xbe\x10\x47\x25\x35\x39\xf2\x21\xc0\xec\x8b\x62\x9e\x1d\x01\x66\xf2\x39\x03\xcc\xfa\x8e\xc8\xc1\x04\x7e\x88\x33\x7b\x5e\x93\x7c\x8d\xde\xf6\x6e\x90\x6f\xe1\xd6\xdb\xf0\xd1\x9b\x01\xf7\xd0\xc6\x1c\xf3\x02\xb2\x47\x1c\x41\xb6\xc4\x73\xfd\x8b\x06\xb1\x1d\x00\x75\x98\xa6\x23\x03\xe0\x99\xa1\x95\x99\x86\x7f\xb6\x70\x5a\xa3\x63\x5c\x15\xf2\x5e\x66\x62\x2e\xde\xea\x84\x67\x1d\x7a\x4d\x57\x4b\x9f\x70\x47\x83\x35\x19\x84\xe5\x84\x47\x06\x0b\x04\xc5\xaf\xec\xcb\x4c\xb8\xb7\x9b\x35\xb1\xd2\xb0\xe8\x4a\x11\xd5\x23\x76\xf8\xf7\xd1\x11\xaf\x05\xff\xb4\x15\xe8\xaa\x37\xa1\xb2\x9e\x86\x64\x2d\xb7\x0b\xc2\x83\x52\x6a\x14\x45\xdd\x89\x47\x57\x44\x97\xa0\xfe\xa0\xd8\x4f\x45\x9a\x52\x8c\x9b\xcd\xc5\x01\xa6\x67\x28\x75\x86\x7a\x3f\x19\x42\x48\x79\xb7\xda\x47\xbe\x0e\xc6\x8a\xca\x9b\xcd\x54\x61\x67\x23\x56\x0b\xb1\x14\x05\xb7\x51\x01\x21\x82\x3e\xc7\x5c\x04\x98\x9a\xa0\x3d\xe9\x00\x15\xab\x0a\xed\x5d\x00\xc9\xd3\x36\xea\xe8\x12\x86\xa1\xb8\x1f\xca\x3d\xc0\xe6\xbc\x14\x7b\xe4\xf6\x8d\x40\xae\x7f\x06\x9b\xc6\x57\xa8\xa4\xc9\x36\xbc\x69\x4b\xa3\xf8\x86\x4a\xc2\x27\x21\xdc\x89\x08\x8e\x94\xb6\xd4\x55\xf0\xf4\x5a\x1b\x8b\x7b\xcd\x83\xca\x71\x16\x81\xce\x61\x67\x29\xf8\x05\xf4\xbe\xaa\x5c\xa8\xe2\x18\x6c\x06\x49\x21\x90\x68\xff\x57\x55\x48\x23\xe6\x3e\x40\xdb\x92\x9f\x17\xd8\xcb\x00\xd4\xd8\xf6\x2d\x98\x03\x0a\x4f\xf1\x9b\x42\xad\xc2\x87\xdb\x95\xff\xe1\xf5\x20\xae\xee\xd5\x0c\xda\xb4\x9c\x02\xeb\x0c\xf2\x01\x56\x7a\xcc\xd8\x5b\xa0\x63\x55\xb0\x5c\x66\x0d\x42\xce\xb2\xb0\xb5\x5d\x3c\x88\x07\x63\x48\xad\x2e\xe3\x30\x94\xda\xb5\x91\x8e\x48\xaa\xce\x26\x58\x69\x3e\x6f\x89\xef\xd2\x91\x8b\x0a\x9b\xfe\xff\xec\xbd\x8b\x72\x1b\x39\x92\x2e\xfc\x2a\x08\xf6\x46\x58\x9a\x9f\xa4\x6e\xb6\x67\x5a\x13\x1b\x7d\x34\xb6\xbb\x57\xff\x74\xdb\xfa\x25\xb9\xf7\x9c\xd3\xec\x0d\x82\x55\x20\x89\x71\xb1\xc0\x29\x54\x49\x66\xaf\x1d\xb1\x0f\x72\xce\xcb\xed\x93\xfc\x81\xcc\x04\x0a\x55\x05\xde\x24\xd2\x97\xee\xda\x88\xe9\xb5\x58\x28\x14\x2e\x89\x44\x5e\xbf\x1c\x74\xe8\xd9\xa0\x43\xb5\xfe\x76\x4e\xad\x5e\xee\x9c\xb7\xbe\x36\xdb\x6b\xf9\xea\xba\x16\xde\xda\xb2\xfa\xe2\xba\x9c\x26\xdd\xa7\xa5\x0d\xac\x69\xd9\xa8\xb2\xa4\x3b\x9f\xa9\x4b\x76\xf3\xe6\x79\x95\xa9\xe8\x27\x55\xa4\xf9\xad\x11\x33\x96\xf2\xd3\x6a\xb3\x15\xd4\x54\x6d\xd8\x5f\x49\x4f\x40\x15\x00\x58\x84\xdc\xbf\xf2\x6e\x95\xba\xa8\x3c\xa7\x97\x20\x57\x6d\x6c\x19\xda\x38\xe1\x13\xcb\xb0\x31\x24\xf9\x41\xa7\xeb\x6d\xaa\xf9\x58\xdc\x2c\x74\x14\xac\x87\x18\x6a\x55\x65\x57\xde\x15\x62\x57\xa6\x80\xd6\x4c\x63\xf3\xea\x95\x97\x42\x91\xac\x57\x3c\x9a\x82\x41\x78\x01\xa7\x47\x82\xf5\x8f\xb3\x79\xc2\x65\x4a\xef\x91\x09\xde\x70\xf7\x18\x78\x19\x14\xdb\x36\xff\xb0\xb5\x33\x35\x98\xc4\x25\xb8\x4f\xb4\x8c\x21\x01\x95\x43\x56\x17\xe5\x9f\x95\x7b\x45\x43\xe9\xb3\x1b\x8c\xc2\xff\x13\x9b\x09\x9e\x62\xc9\xf5\xea\x68\x31\x23\xda\x56\xcc\xb7\x68\x75\x53\xd4\x90\x4a\x3a\xe0\x36\x15\xae\x31\x5d\x7f\x41\x0c\x9f\xbe\x53\x32\x26\xbd\xc9\xb0\xd6\x6a\xc2\x5f\x59\x5c\xfd\xc8\x4c\x0e\x7a\xd4\xf4\xc3\x88\x67\x83\x4e\xd7\xfd\xf1\x9b\xf9\x43\xe4\x51\xdf\x7b\xa9\x5f\x7f\xa9\xef\xbf\xd4\xf7\x5e\xda\x8a\x34\x68\xbf\x2e\xe2\x35\x57\x59\xb8\x9d\xf5\x8e\xd8\x6a\x9e\x94\xec\xdd\xbc\xd6\x9c\x29\x12\xae\xa4\xfa\x65\xc6\x8a\x34\xb1\xf5\x8e\xad\xfc\x51\x62\xc2\x03\x2e\x61\xa6\xe6\x54\xb2\xd0\x5d\x4d\x7d\x86\x77\x17\x5f\xac\xb9\xba\x96\x8c\x7d\xe5\xed\x55\xbd\x5e\x71\xd8\xe0\x99\x31\x34\x23\x67\xf5\x73\x80\xe2\x0b\x20\xc0\x93\x5a\x55\x2f\xeb\x17\xba\x3f\x93\x6a\x2d\xe7\x2d\xb6\x6b\x63\x51\x77\xcd\x0b\xd6\x45\xd4\xd8\x46\x57\x0e\xf0\x7e\x2a\xec\x89\x45\x4f\x17\x88\x28\x13\x73\x78\x01\xb1\xca\x49\xc2\xb0\xd3\x29\x64\x57\xce\x39\xf8\x6f\xe9\x85\xb0\xd4\x3b\x56\xd9\x48\xc6\xb1\x48\x97\xf2\xa3\x7a\x8b\xa5\xbc\xc8\x35\xfc\x12\xd8\x50\x63\x30\x41\x46\xe4\x73\x20\xf7\xc6\x6a\x86\x81\xcd\xb6\xe5\x18\x95\xb7\x76\xc3\x32\xac\x02\xd6\xdc\x30\xed\xb2\x83\x36\x49\x26\x72\xc9\x53\x36\x9b\x88\x1c\xd2\x81\x6c\xa2\x2d\x25\x83\x25\xb9\x6a\x1f\xbb\x50\x9d\xf3\xf2\xea\x45\x73\xec\xf4\xa0\xa6\x01\x7a\x9a\x2c\xb1\x5e\x94\xf4\x40\xce\xfb\x37\x7a\x45\xa6\x15\xc6\x15\x26\x77\xd3\xff\x6b\xac\x60\x1a\xfe\x38\x3d\xdc\x76\x00\xf6\xb5\x8d\x07\x71\x75\xf9\x32\x3c\x80\xab\xcb\x97\xdb\x7e\xdc\xbc\xb2\xf9\x87\x55\x16\x2a\x8c\xea\x1e\xf9\x1f\xc7\xf3\xe6\xd2\xb2\x98\x97\xb8\x57\x45\x6d\x10\xef\xe7\x6a\xb7\x52\x65\x35\xab\xcc\xd0\xbb\xe3\x70\x01\xeb\x5e\xf9\x6c\x13\xdb\x01\x56\xff\x60\x10\xd2\x61\xdf\x0b\x2f\x98\xcd\x98\xbf\x56\x2a\xff\x5e\x26\x02\xa3\x75\x02\xc9\x7b\xc1\x76\xac\x9e\xd0\x8f\xa7\x0f\x93\x17\x3d\xf0\x4d\x82\xe4\x24\xa4\x02\xd3\x17\x4a\xaf\x99\x52\x39\x1b\xcb\x44\xd8\x28\x21\x66\xc3\x18\xca\x2b\xbb\x72\x3d\x7b\xa6\x45\xbf\xc7\x54\xa5\xbd\xe5\xbd\xa2\xc0\x7b\x73\x65\x2d\xd6\xb1\x48\x1d\x28\x0c\x22\xec\xe1\x04\xc6\x3c\x21\x1c\x9d\xf2\xeb\x60\xa0\xde\x64\xe8\x66\x2f\x20\x98\x02\xf0\x1b\x46\x45\xee\x42\x2b\xe8\x9e\x46\xfb\x14\xcb\xd5\xb2\x8d\x08\x0b\x08\xa1\xad\x08\xb7\x74\xe9\xa6\xcb\xa5\x22\x23\xdd\xcc\xfd\x10\x0f\x4f\xcd\x67\xb7\x53\xa1\x45\xa3\xc8\x8d\xf7\x16\x78\x73\x9d\x39\x17\x44\x95\xed\x18\x3a\x98\xdc\x96\xf0\xf4\x6b\xf7\x6c\x03\xb6\xee\xe4\x1c\x08\x9e\xf4\x5e\x25\xac\x5c\xb4\x47\xa1\x06\xa4\x85\x0d\x8e\xf1\xd1\x29\xd5\x4c\xe6\xb9\x11\xa7\x88\x0e\x9e\x68\xbf\x1b\x73\x9c\x72\xfe\x4e\x80\xf1\x09\xfa\xec\xfb\xe8\x96\x15\x4d\xca\x7b\xcd\xb7\x0b\x35\xd5\xa8\x2d\xf9\x43\xd9\x6f\xe0\x7a\x29\x8d\x97\x81\x34\x5b\x7a\xf4\xb0\x75\x84\x37\x97\x2c\xe3\x03\x27\x61\xba\x0c\xcf\xa1\x02\x82\xde\x98\x46\x05\xdd\x72\xdb\x99\xf8\x28\xe4\x88\x87\x6a\x4f\xfb\x5a\x42\xc8\xea\x28\xe1\xae\x71\x91\x66\xc2\xd0\x33\x24\xe2\xb3\x57\x68\x73\x9e\x01\xc4\x58\xa5\xdf\x18\x2c\xee\xda\xd6\xd5\xaf\x40\x5a\x55\x88\x84\x52\xfb\x1f\x43\x24\x65\x69\xa7\xe6\x12\x5b\x6b\x77\xd3\x9d\x8b\x0f\xb6\x5e\xd8\x0a\xca\xda\x63\x08\xe3\xe6\x15\x0c\x20\x34\xe6\xa6\x2d\xbe\x39\xfc\x46\x9b\x4d\x65\x41\xff\x4d\x4a\xc1\xc7\xe8\xf8\x9d\xca\x85\x37\x8d\xf1\x05\x26\x7a\xb7\xcc\xfe\x78\xd7\x30\x3a\x36\x0c\x63\x04\x7d\x33\x4f\x8a\x89\x4c\x97\x19\xc7\x52\xc5\x82\xb6\xc6\x5b\xeb\x5c\x28\x41\x74\x34\x04\x8c\x9b\x56\x46\xea\x7a\xf2\xa7\x27\xdb\x30\xf6\xed\x7c\x4c\x0d\x2b\xf7\x76\x00\x5d\xdb\xa0\x52\x3d\x00\x66\x62\x73\x1c\x80\x55\x2d\x97\xf3\xee\xb5\x6f\x85\x98\xe5\x9a\x97\x96\x72\x80\x55\xef\x2d\x39\x80\x2b\x5f\x59\x4b\xd5\xab\xbd\x7f\xcb\x57\x65\x35\x40\x6f\xf8\xa5\x35\xf8\x1e\x50\x3e\xef\x61\x18\x1f\xd5\xf2\x77\x49\x00\xbf\xee\xc1\xb8\x1f\x13\x19\x57\xb9\x27\x9e\xc8\x4d\x20\x40\x26\x32\xfe\x03\xa0\x7f\x6c\x2b\xd9\x7d\x1a\x04\x90\xa5\x27\x73\x1d\xe1\x06\xde\xf9\x2a\xe9\xb6\x78\x38\xdd\x16\x7f\x54\xba\x5d\x23\x49\x7f\x1a\xb2\x5d\x7a\x37\x6c\x5a\x3a\x35\x48\xbc\x3b\x92\xc6\xd7\xd0\x30\x91\x61\xbd\x68\x4f\x28\xf6\x6d\x59\xcb\x65\xbe\xa7\x46\xcb\x80\x4f\xae\x8a\xd8\x0b\x8d\x2a\xdb\x68\xc3\x2f\x8c\x94\x4f\xda\xc5\x05\x85\x30\xa8\x31\x99\x74\xd1\x10\xeb\xe2\x18\x1a\x5d\x7a\x3e\x5b\x0a\x88\xa3\x20\x0a\xb3\x82\x18\x9d\x0e\xb6\x85\xd4\x25\x64\x78\xe1\x12\x30\xd0\xba\x2e\x1a\xd2\x5c\x08\x78\x34\xad\x52\xde\xe6\x5e\x80\x7a\xb7\x4b\xad\xff\x8d\xef\xd7\xdc\x36\x8d\xe7\xb9\x42\x57\x4e\x5a\xda\x63\x6e\xbd\xf6\x3f\xbd\xbd\xb9\x05\x5b\x03\x31\x24\x12\xd0\x97\x6e\x22\x2d\x50\xb9\x0b\xa9\x4c\x4a\xc8\xcd\x59\xe1\x88\xf3\xaa\x42\x7d\x8f\x00\x42\x5d\x22\x46\xad\x82\xd3\x0e\xbe\xf1\x59\x6f\x85\xdd\x31\xbe\xe5\xfa\x61\xb3\x7a\x28\xaa\xa0\x4b\xb1\x0e\xab\xcf\x2b\x36\x29\xb4\x6d\xfe\xb5\xfc\xad\x72\x3d\x84\x22\xf4\x4a\x48\x66\xb3\x8f\xb1\x8a\xf4\x51\xce\xf5\x3b\x7d\x64\x2b\x26\x09\xa8\x66\xe2\xcc\x61\x47\x9a\x74\x40\xf8\x49\xbc\xcf\x8f\x36\x50\x02\x2d\x1e\x34\xed\xb0\x53\xf5\x36\x04\x7c\xae\xbd\xb6\x9a\xb5\xaf\x97\xc5\x57\x91\xe0\xba\x97\xbf\x68\xec\xbc\x80\x0a\xbf\x21\x8a\x5e\xf3\xcd\x3f\x80\x64\xb2\xd4\xec\xf1\x79\xb0\xf5\xb2\x11\x8f\x0c\xb5\x5f\x4c\x26\x99\x98\x80\x6f\xf8\x9a\xa6\xb7\x14\x41\xba\xda\xd4\x43\xca\x84\xb2\xe7\x8a\x25\x0a\x92\xfd\x5e\x60\xf9\xc0\x6b\x05\x71\x7b\x8a\x71\x7a\xcf\x30\x03\x5b\x91\xbd\x6c\xb2\x96\x40\xa3\xb2\xad\x4d\xea\x0e\x90\xeb\x8b\x40\x2b\xaa\x18\xe4\x05\x88\xbb\x27\xe8\x70\xaa\xd7\x2b\x1b\xcb\x34\xae\x0e\x1f\x6c\xed\xe5\xb1\x32\x7b\xad\x41\xde\x86\x9b\x80\x8a\xb1\xb9\x5e\x01\x2d\xb9\x8b\xc4\x5c\x9b\xe6\x13\xcd\xe6\x22\x23\xf8\x7c\x5d\x8d\x8f\x78\x38\xb5\x6e\x93\x4d\xbf\x9b\x74\xfa\x25\x64\xe4\x6f\xe8\x0a\x12\xf2\x9a\x11\xb0\x10\x95\x9a\x84\xfa\x54\x5d\x96\xa8\x89\x8c\xec\xd1\x90\xe9\x04\x13\x34\x0c\x3d\x1b\x8a\xab\x87\x4c\xba\x62\x94\xe0\x92\x2f\x52\x99\x23\x72\xa3\xe9\xfe\x6f\x32\x85\x62\x07\x2a\xf3\x77\x81\x7e\xdd\x20\x05\xae\x79\x2c\x56\x1f\x06\x42\xb9\x83\xc7\x3c\xb1\x02\x9f\x19\x6e\xe3\x98\x8c\x0a\x99\xd8\x0a\x08\x09\x09\xe2\x60\xb4\xf6\x06\x0a\x34\x16\xf8\x86\x16\xb9\x47\x5f\xf8\x3e\xe4\xa3\x96\x99\xbf\x16\xa4\xc1\x90\x6e\x2c\x33\x11\xe5\x2c\x9a\x22\xd7\xce\x15\xbd\x62\xc9\x4f\xe7\x6a\x36\x2f\x05\x3a\x2f\x0d\x7c\x83\x7b\xd6\xec\x7d\x3f\xc0\x42\x3e\x76\xdb\x24\x98\x36\x83\xf0\xab\xce\x35\x69\x66\x10\xee\x30\xb3\x0f\x2e\x91\x90\xba\x9f\x08\x77\x65\x21\x30\x40\x85\xf7\x85\xd8\xc4\x23\xe4\x1c\x7b\x7a\xcb\x4f\xac\x77\x21\x2c\x13\x1a\x82\x57\x82\xd7\xf1\xa3\xf3\x00\x03\xd7\x0c\xb1\xf2\x0d\x6f\x1b\x7b\x1d\xb8\x4b\xc3\x1c\x1a\xef\x79\x17\x42\x05\x0c\xd5\x92\xee\x01\x55\xff\xd8\x65\x4e\x21\x1d\xb6\x3c\x71\xe5\x25\x2b\xb2\x4d\x12\x35\xe2\x18\x4d\xa6\xe7\x3c\x22\x76\xc2\x63\x44\xf7\xa8\xa4\xbc\xdf\x49\xce\x6e\xb0\x0c\xc1\x5a\x25\x51\x25\xe2\x5a\x8c\xdb\x0c\xc3\x96\xb9\xb6\xcc\x75\x73\xe6\x4a\xa7\xa6\xc9\x5e\xf1\x41\x59\x3e\x6c\xcb\x43\xed\x90\x5d\xbc\x8e\x68\x23\xb0\xb8\xb9\x0d\x5e\xb8\x80\xa4\x1b\xf9\x9b\x2d\x6b\x9c\x89\xbc\xc8\x52\xa8\x08\x92\x65\x6a\x2b\xc9\x8a\x3e\x85\xee\x78\xcc\x6a\x0d\x59\x11\xf0\x09\x5d\x1d\x1e\x87\xa3\x53\x49\xf9\xb0\xa8\xc0\x98\x19\x22\x3e\x84\xae\xc6\x40\x3d\xf8\x02\xa1\xef\x6f\x7e\x7b\xd8\x59\x05\x39\xbc\xed\x6d\x8f\x57\xc6\xba\xa4\xf1\xf0\x1b\x21\x20\xd4\x66\xcb\x10\x32\x75\x9b\x34\xfe\xc5\x24\x8d\x07\xaa\x92\xae\xdc\xc3\x07\x1f\x8a\x80\xa0\xd2\xa6\x8c\x7f\xed\x37\xcd\xc6\xe9\xdc\x2b\xc4\xd5\x47\x26\x72\x07\x7a\xde\x82\x9d\x6d\xc0\xc7\x5a\x06\xf6\x15\x33\xb0\x1d\x73\xae\x96\x65\xfd\xa1\x59\xd6\xae\x78\x95\x67\x08\x58\x09\x31\x61\x5b\x91\x20\xeb\xab\xcd\x35\x43\xaa\x2b\xce\x93\x15\x56\x75\x77\xde\x65\xa7\xbf\x37\xe0\x36\x8d\x2e\x6e\x8d\xf8\x9e\x0c\xcc\x20\xe9\x4d\x46\xd3\x52\xd6\x0f\x35\x5b\xa7\xae\xdf\x89\x6c\x14\x66\x8c\xcb\xa2\x67\x2f\xae\x2e\xab\x41\xb3\x3e\x30\xa5\x7d\x48\x26\x6f\x0b\x22\x0a\x03\xb3\x7c\x03\xdd\x6d\xb3\x22\xc9\xe5\x3c\x41\xd4\x04\x2f\x94\xd6\xc3\xa5\xe0\xe9\x82\xf1\x0a\x4e\xa5\x88\x19\x9f\x98\x1e\x73\x80\x8e\xb6\x50\xc6\x69\x31\xa3\x7a\xbd\xee\x23\x00\x43\x9d\x2e\xca\xde\x4b\xdf\x45\x03\xf9\x70\x83\x50\x86\x54\xa5\xd7\xd4\xf5\xdb\xeb\x1f\x03\xab\xf2\xba\xda\x80\x98\x0c\xe6\x99\xce\x79\x96\x4b\x9e\xb0\x22\xb3\xce\x6d\xce\x0a\x2d\x32\x7b\x1b\x4c\xf9\x9d\x60\x3c\x82\xac\x45\xc3\x0e\xd8\x9f\x2a\x39\x44\x48\x29\xa0\xfc\x71\x5c\xca\x71\x91\x24\x5d\x36\x96\x29\x60\xe5\x8a\xb9\xcb\x6e\xe2\xf9\x94\xdd\x48\xa3\x1c\x62\x4e\x0b\x31\x30\x18\x91\xe9\xd1\x50\x9a\x23\x17\x50\xfc\x2a\xc1\xec\xf0\x89\x39\x94\x59\x1e\x25\x90\x73\x52\x75\x2b\x79\xbe\x0b\x60\x72\x3c\xe4\xa4\x20\x5b\xbd\x51\x58\x6d\xfa\x22\xf8\x47\x73\x05\x9b\x51\xee\xd0\x01\x96\x9c\xd4\x6c\xd0\x99\xab\x58\x0f\x3a\x86\xa4\x07\x1d\x2d\xa2\x4c\xe4\x7a\xd0\x39\x84\xcc\xf5\xda\x3c\x28\x55\xdf\x7b\xd7\x1c\xda\x41\xe7\xb0\xcb\x9c\x2d\x6c\xa4\xf2\xe9\x96\xa9\x25\xf4\x85\x25\x61\x3f\xd7\xfe\xe3\xba\xcf\xa4\x1a\x62\xed\x45\xfa\x84\x4e\x23\x2b\xe3\x6f\x0c\x71\x78\x01\x3e\x1e\xca\x69\x19\xd5\xf3\xb0\x59\xac\x98\x41\xed\x12\x2e\x37\x03\x45\x98\xc6\x68\xed\x7b\x17\x49\x52\xa9\x57\x0c\x7f\xda\xf3\xbc\xd5\x20\x91\xe1\x34\x06\xf8\xb3\xf9\xb9\x3a\x38\xfc\x09\xcf\x8b\xa3\xa0\x1f\x7f\xc4\x0b\x9a\x3e\x6e\x2e\x74\x74\x77\x5e\xe4\x78\xf3\x89\x6b\xca\xb1\x00\x87\xa5\x0d\xc9\x88\x1d\xf4\x88\x99\x63\x9f\x41\xe7\x81\x49\xc1\x1d\xf8\xb8\xe8\xf5\x66\xd0\x8f\x6f\x41\x58\x19\x39\xe7\xfc\x8b\xfe\x19\xdd\xb9\x73\xb1\x45\xd2\x6c\x4d\xb5\xad\x34\xfa\xd9\xfc\x60\x9f\xd1\x01\xb6\x0f\xdf\xd6\x86\x4e\xad\xa5\xde\xac\x4c\x2d\x97\x85\x97\xf8\xb2\x7c\x7b\x37\x44\x57\x95\x12\x30\x04\x07\x6f\x66\x16\xcf\xd7\xba\xba\xf0\x62\x29\x3b\xf7\x9b\x8d\x16\x0d\xe9\x5b\xe6\x4c\xbc\x97\x1a\x4a\x22\x98\xab\xd3\x33\xcd\x81\x34\xca\x26\xf2\x4e\xa4\xfe\x60\x01\x43\xcc\x08\x7f\x08\xd6\x84\x83\xe5\x9e\x88\xd6\x3a\xdb\x5a\x0e\xde\x72\xf0\xcf\xe2\x6c\x5b\xc6\x70\x5c\xd5\x8f\x87\xf0\x9c\xd6\x15\xf7\x15\xba\xe2\xb6\xf0\xc1\x6d\xe0\x7c\x6b\xbd\x6e\x5f\x1c\x6f\xdf\xdc\x68\xbd\x63\x77\x5b\xeb\x67\xfb\x3d\x5d\x32\x5b\x1b\xad\xf7\xe0\x60\xdb\xc4\xb3\xb6\xca\xa5\xd6\xfa\xd2\xbe\x56\xb6\xb4\x2b\x7e\xd4\x32\xa2\x3f\x26\x23\xda\x25\x07\x22\xe1\x7a\x15\x03\x02\xf9\x37\x54\x63\x0e\x14\x60\xd8\x78\x77\x7e\x41\xe4\x44\xac\x9b\x42\xfb\x79\x27\xe1\xbc\x5f\x72\x5d\x75\x88\x8c\xbb\x1d\x23\x81\x2f\x77\x71\x2d\xf7\x70\x59\x07\x17\xfa\x8f\x6c\x59\x31\x47\xd8\x38\xa2\xd2\xe4\xba\xbd\xda\x68\xba\x83\xb4\x38\xcf\x14\xbf\x51\xb7\x69\x30\x8d\xd6\xcf\x99\xb5\x4e\xb9\x2d\xba\xdd\xc6\x94\x6d\x85\xec\x95\x69\x82\x78\xe6\xdd\x2e\x73\x4f\xa7\xaa\x28\x16\x46\x83\x02\x7f\x98\x8c\xcd\xb1\x42\x34\x32\xda\x75\x32\x19\x55\x9c\x12\x80\xa5\xe5\xf9\x97\x8c\xda\xc2\xb8\xcd\x1a\xb9\xb8\xba\x2c\xd9\x0d\x7d\xaf\x8b\x4a\x1a\xf2\xab\x31\xb9\x95\xac\x56\x63\x5d\x49\x30\x04\x73\x29\xe0\x7e\x83\xde\xb6\xce\x00\xf3\x58\x0a\x43\x8d\x8b\x3c\xa7\xf4\x61\xf2\x6a\x7a\xb6\x7c\x52\xdd\xfa\x16\xab\x19\x4e\xc6\xa0\x83\xb8\x99\xc0\x48\x65\x24\x2e\x22\x28\xb9\x66\x1b\xeb\x7a\x6b\x60\xf2\x9c\x54\x4b\xac\x04\x80\x1b\x4b\xdd\xbc\xb5\xd3\xc7\x91\xb9\x6e\xb6\x24\x6b\x35\xb6\xab\x5f\xa7\xb8\x3e\xfb\x19\xe1\x0c\x50\x04\x28\x4b\xc3\x95\x53\xe7\x99\x60\x83\x8e\x19\x09\xe2\x7f\xc2\x50\xcc\x3f\xcd\xb8\x06\x9d\xea\x4c\x07\x1d\xa7\x51\x7b\x1a\xb3\xb3\x22\x7a\xb7\xb9\x69\x62\x86\x6c\x6f\xfe\xda\x2b\x24\x48\x64\x02\x40\x1c\x7d\x35\x7b\x9b\x83\x47\xdb\xb6\x6c\xf2\xcb\x7a\x03\xd3\x40\xb8\x4b\x32\x2f\x34\xc8\xc1\x0a\x42\x76\xf6\xf4\xc9\x77\xc4\x55\x0c\x6d\x7b\x41\xfd\xa5\xa7\x14\xd7\x15\xbd\xac\x95\x95\x85\x5d\x70\x75\x24\xcd\xe2\xa1\x8b\xf2\xa1\xeb\xb4\x05\x27\x81\xda\x0a\x6d\x3e\x67\x9b\xcf\xb9\x8b\x7c\x4e\x22\xa6\xaf\x2c\xab\x93\xbd\x34\x52\x71\x04\xf1\x2b\x32\x65\x77\x27\xfd\x93\x3f\x9b\x7f\x8c\xf9\x9d\x82\x7a\x9a\x4b\x39\xf7\xd1\xdd\x49\x35\x1b\xc8\xd0\x09\xa1\x86\xb2\x44\xa5\x13\x91\x21\x86\x02\x94\xc1\xc4\xbe\x4f\x8f\xdb\x34\xd2\x1d\xa6\x91\x2e\xe1\x5f\x6d\x32\x69\xeb\x82\x69\x95\xd2\xaf\x24\x99\x94\xce\xf0\x03\x3c\xea\x4b\x4e\xff\x8a\xbb\x69\x0f\x2e\xf8\xe6\xad\xf7\xf5\x27\x99\xee\xec\x4e\xa4\xc9\x3d\xe2\x6a\x6c\xfd\xed\x2d\xb3\x6f\x99\x7d\x9b\xdc\x5a\xb9\x2b\xbe\x06\xbf\x3a\x0d\x75\x5b\xef\x7a\x6d\x86\x2b\x6e\x9c\x5d\x7b\xda\x97\x5e\x64\x7b\x4d\x7d\xdd\xf9\x5d\xa3\x77\x74\xd9\xb4\x7e\xb6\x2f\xcd\xcf\xb6\x97\xa4\xdb\xe5\xe2\x5b\xeb\x89\xfb\xda\xef\xc1\x6d\x3d\x71\xcb\x69\x61\x37\xde\xb9\x66\xff\x3b\x4e\xc3\xdd\x1d\x33\x6d\xb9\xe8\x1f\x80\x8b\xee\x85\x7d\xb6\x7c\xb3\xe5\x9b\xbb\x0a\x67\x68\x5a\x6d\xda\x5c\xe0\x36\x17\xb8\xcd\x05\x6e\x73\x81\xdb\x5c\xe0\x36\x17\xf8\xe1\xb9\xc0\x9e\x91\xe5\x4b\xc8\x08\x7e\x9c\xd4\xbe\x5b\xdf\x73\x2b\x98\xb7\x96\xf4\x56\x12\xfe\x92\x73\x8f\x1f\xed\x2f\xdd\x9f\x13\xb4\xcd\x46\xde\x67\x36\xf2\xe3\xaf\x89\xd6\x1d\xdb\x5e\x22\xed\x25\xf2\x15\xb8\x63\x7f\x17\xe9\xcf\xad\xb3\x76\xef\xce\xda\xfd\x25\x47\xef\xec\xb2\x31\x1f\x6b\x9d\x09\x5f\xd5\x75\xf3\xb9\x32\xb2\x03\x52\x64\xeb\x4c\xf8\xda\x6f\xbf\x07\x3a\x13\xf6\xe6\x7d\xdd\x49\x8e\xf6\x0e\x64\xf1\x96\x2f\xfe\xce\xf9\xe2\x6e\x19\x62\xcb\x09\xff\xc8\x9c\x70\xf7\x2c\xb0\x4d\x12\xff\x9d\x27\x89\xd7\x14\x8f\x36\x55\x7c\x35\x9d\x6d\x72\x53\x86\xd2\xc5\xcd\x30\xe8\xd6\xdc\x3c\x75\xfc\xee\x64\x47\xc9\xe3\x6e\x9f\xdb\x2c\xf2\x36\x8b\xfc\xb3\x65\x91\x63\xcd\xe0\x36\x89\xbc\x4d\x22\x7f\x7c\x12\x39\xd2\x52\x9b\x43\xde\xe6\x90\x7f\xaa\x1c\xf2\x30\xf7\x6a\x53\xc8\x5b\x37\x56\xab\xbe\x7e\x25\x29\xe4\x78\x84\x1f\x10\x11\x11\x3e\xfb\xcb\xef\xa5\x3d\x84\x4e\x34\x2e\xbc\x36\x7d\xbc\x4d\x1f\x6f\x19\x7d\xcb\xe8\xbf\x14\x46\xff\x3b\x4a\x1f\x47\x5e\xfb\x35\x04\x24\xe0\x48\xb7\x8d\x47\xa8\xce\x6f\xf9\x6d\xb3\xeb\x68\x84\x65\x77\xd8\xd7\x95\x39\xde\x7a\xe4\xbe\xba\x8b\xe6\x33\x27\x8f\x2f\x95\xdd\x5a\x67\xdd\xd7\x7e\x09\x6e\xeb\xac\x5b\x4a\x0a\xbb\xf1\xdc\x35\xba\x6f\x33\xc7\x5b\x16\xfa\x55\x67\x8e\x37\x0d\xbd\x2d\xd3\xfc\xc3\x33\xcd\x9d\x72\xcb\x36\x6d\xbc\x4d\x1b\x6f\xd3\xc6\xdb\xb4\xf1\x3f\x74\xda\xf8\x93\x3f\x3d\x59\x9a\x2e\xee\xf2\xe6\xec\x89\x65\x8e\x6b\xf4\xd9\x93\x3f\x1d\x8d\x95\xaa\xbc\x0c\x6d\x8b\x91\xdb\xcd\x27\xd0\xc0\x10\xd9\xc6\xdd\xb6\x09\xea\x5b\x44\x54\xb4\xf9\xe9\x6d\x7e\x7a\x6b\xaa\x6f\x05\xee\xaf\x2b\x3f\xfd\x91\xce\xd8\xbd\xb9\x58\xdb\xe4\xf4\x36\x39\xbd\xbd\x41\xda\x1b\xa4\xbd\x41\xda\xe4\xf4\xd6\x15\xbc\x5f\x57\x70\x9b\x97\xde\xde\x34\x9f\x3b\xff\x72\xd7\x6e\xde\xd6\xbf\xfb\x7b\xba\xf7\x1e\xe6\xaa\xd8\x97\x63\x77\x27\x49\xe9\x6d\x4e\x7a\xcb\x13\xf7\x9f\x93\xee\x99\x26\x5b\x2e\xf8\xc7\xe5\x82\x3b\x67\x7f\x6d\x42\xfa\xef\x3c\x21\xbd\xaa\x6f\xb4\xf9\xe8\x6d\xe9\xf2\x36\xe9\xbc\x4d\x3a\xdf\x9e\x9d\x18\xb9\x2d\x2e\x12\x99\x4e\xcc\xfd\x72\x95\x49\x95\xc9\x7c\xf1\x22\xe1\x5a\xaf\x8c\xf3\xf1\x1b\x3a\x01\x73\xc6\xe7\xe0\x23\xa5\x68\x88\x39\x35\x62\x11\xb4\x02\x86\x48\x1c\xc7\x3d\x32\x12\xa2\x91\x89\x61\xda\x7d\x76\x6b\x44\x54\x58\x01\xf2\xa9\xf2\x74\x61\x7e\x90\xb1\x6d\xb9\x36\x82\xc7\xbc\xdd\x8a\xca\x7b\x17\x95\x2b\x4b\x58\x5f\x51\xef\x2f\x8a\x0f\xe1\xd9\x48\xe6\x19\xcf\x16\x56\x86\x05\x29\xa3\xd0\x05\x4f\x92\x05\x9b\x67\xea\x4e\xc6\x42\xb3\x49\x21\x63\x91\xc0\x16\xa8\x94\xdd\x63\x6a\xb3\xd4\x75\x52\xa2\xc5\x25\x88\x80\xe0\xa1\x46\xab\x28\xf1\xde\xe6\x08\x2b\x8f\x5d\x70\x85\x36\x9f\x84\xcb\x0c\xbe\x5a\xa5\xf2\xf2\xa3\x91\x4a\xb5\x8c\x45\x86\x8e\x7e\xb3\x89\x31\x75\xe4\xc6\x69\x58\xf9\x5c\xc5\x14\x20\x10\x2b\x38\xce\x18\xd9\x94\x2e\x6a\xd3\xe9\xb3\x37\x69\xb2\x80\x10\xae\xea\x17\xe9\x0c\xcc\x78\xf6\x0e\x3f\x35\xac\x0c\x7b\xd8\x67\xff\xa6\xee\xc5\x9d\xc8\xba\x4c\x8e\xd9\xcc\x50\x43\x3e\x85\x04\xa2\x5a\x4f\x42\x5b\x1f\xd5\xbd\xcc\xa7\x66\xc4\x32\xab\x77\x46\x81\x4f\x5a\xe4\x40\x99\x99\xe5\xd0\x7a\xc6\x93\xc4\x50\x28\x9e\x4b\x35\x46\x56\x46\x56\x67\x3b\xf1\xfa\xe7\x2a\x10\x0e\x4b\x16\xc9\xdb\xb7\x91\x52\x89\xe0\x69\xeb\x01\xf9\x02\x74\xa0\x7d\x8f\xd9\x0d\x6a\x77\x9e\x96\x79\x26\xcc\x55\x29\x55\x8a\x0e\xef\xd0\x85\x55\x6d\x61\xa5\x74\xfa\x0b\x8e\x2b\x35\x49\x27\x78\x72\xe1\xa8\x24\xea\x5e\x64\x25\xc5\xb2\x37\x18\x67\xf9\x1a\x4f\x1d\xf5\xfa\xa3\x69\x74\xe5\xda\xf8\x02\x5f\xa8\x85\x39\xac\x45\xaa\x45\xde\x47\x19\xda\x45\x1c\x02\xfa\x50\x0f\xe0\x36\x80\xff\xdb\x20\xc4\xa9\x4a\x55\x86\x92\x9a\x26\xca\xc5\x20\xb9\x14\x02\x13\xcd\x3c\x5e\xab\xf4\xca\x8d\xdf\x7d\x68\x2c\xb8\xd9\x85\x20\x83\xc4\x8b\xb2\xb1\x50\xe5\x0d\x6c\xaf\xbb\x3a\xb3\x82\x31\xd3\xf2\xf1\x28\x2f\x78\x52\x36\x21\xdd\x11\x1c\x3b\x91\x90\x77\xc2\xf2\x70\x41\x2e\xef\x6a\x84\xac\x51\x20\x80\xd3\xa1\x2b\x4b\x02\xcf\x04\x6e\xec\x0d\x99\x2e\xfe\x4e\xb7\x83\x3a\x2a\xfe\x74\x76\xba\x4e\xcd\x7e\x90\xe3\x65\x85\x3c\xb4\xce\xa4\xd8\x68\x1c\xb2\x2d\x56\x17\x73\xbd\x66\xd3\x5a\xfe\x3e\xab\xe5\x4f\x5a\xcb\x1f\x4c\x8d\x6c\x7f\xb5\xbb\xee\x11\x56\xc0\x92\xda\xfa\x0d\xe9\xbb\xb5\x07\x7e\xf2\xbb\x10\x36\xd8\xb6\xfb\x2a\xae\xc1\x8d\x4d\x8e\xab\xf4\xbc\x47\x1a\x1f\x2b\x5d\xdb\xaa\x28\x9b\x2a\x92\x2f\x5f\x5d\x5d\xbf\x7a\x71\x71\xfb\xea\x25\xeb\xe1\xcd\x82\x26\x08\x0f\x05\xb0\x2a\x13\x4b\xa3\x6e\x3a\xcf\x8c\xb9\x11\xcb\x33\xe4\xfc\x2f\x47\x95\x77\xfa\xac\x55\x57\xff\xe8\xfc\xbd\x55\x57\x5b\x75\xb5\x55\x57\xbf\xfe\x2b\xba\x55\x57\x5b\x75\xb5\x55\x57\x37\x97\xbd\x5a\xa5\xf5\x77\x2c\xd4\x7c\x01\x4a\x6b\x50\xde\x6f\x55\xd7\x56\x75\xdd\x93\xea\x1a\xa4\xb7\x5d\x2a\xb0\x94\x37\xd5\xea\xaf\xad\xfe\xfa\x25\xb1\xfa\x56\x7f\x6d\xf5\xd7\x56\x7f\xfd\xfa\xef\xe9\x56\x7f\x6d\xf5\xd7\x56\x7f\xdd\x58\xf4\x6a\xd5\xd7\xdf\xb1\x4c\xf3\x05\xa8\xaf\x21\x69\xbf\xd5\x5e\x5b\xed\x75\x4f\xda\x6b\x88\xdc\x1e\xab\xbc\x8a\xdc\xd0\x9d\xf6\x74\x63\x15\x5f\x19\x22\x5b\xcd\x38\x6d\x23\xa4\x67\x8b\xc4\x57\xd2\x2c\x40\xf5\x21\x27\xe3\x71\x0c\x4b\xc3\x13\x96\x15\x69\x2e\x67\x82\x11\xbb\x9c\x01\x7e\x13\x60\x56\xb1\x2b\x15\xb7\x88\x43\x2d\x5e\xc4\xef\x84\x51\xed\x4a\x54\x36\xc2\xd5\x46\xb7\x12\x1d\xe3\x7e\xf3\x18\xdf\x98\x2e\xd6\xb2\x99\xe5\x6c\x00\xde\x7f\x34\x22\xc1\x8a\x0f\xac\x15\xd2\xfc\x86\xd5\x34\xca\x92\x0d\xa9\x46\x9e\x4b\x2b\x9b\x7d\x79\xb2\x59\x20\x13\xd6\xae\x5e\x63\xff\xb6\x97\xcc\x96\x9f\x81\x56\x28\xfb\xcc\x42\xd9\xd7\x61\xa6\xd8\x5c\x2a\x5b\x21\x35\xed\x4f\x20\xbb\xa1\xcb\x60\x2d\xa3\x34\x0d\x91\xa6\x7d\xd3\xae\xe1\x44\xa0\xb1\x03\xb9\xe6\xeb\xa5\x2d\x91\xde\x35\x3f\xf2\x2a\xbd\xab\xf0\xc1\xaa\xae\xfc\x2a\xbd\xfb\x99\x67\x86\x79\xc9\xf4\x1f\x08\x4e\x96\x2b\x87\xe6\x99\x3d\xea\x7c\x47\x2a\x13\x66\x97\xf0\x1b\x70\xa4\x45\x7a\xf7\x7d\xa6\x66\xc1\x51\x9a\x07\xab\x47\x6a\x5a\xdc\xd0\x79\xde\xf3\x80\xcb\x4f\xc1\xb8\x6d\x6d\xd1\xc0\xf1\xa1\x27\xc4\x24\xf9\x48\x24\xec\x9f\x85\xc8\x16\x4c\xdd\x89\xac\x44\x41\x76\xdc\xb7\xeb\x10\x52\x23\xae\x05\x58\x73\xfa\xec\x9a\xae\xbc\x47\x26\xa4\x57\x6b\x8d\x76\x3b\x77\x2a\x29\x66\xe2\x27\x55\xa4\x21\x68\xa6\x9f\xbd\xa7\x2b\x16\xde\x6b\xb6\xdf\x65\xf7\x3e\x84\x08\xb6\xf0\xf7\xd2\x81\xaf\x1f\x73\x7d\xb8\xe0\x1a\x53\x2b\x61\x85\xb7\x1b\xeb\x7a\x40\x29\xd3\xfe\xa8\x41\x52\xdd\x25\x4d\xcc\x31\x09\x3e\xa3\xcf\xad\x78\x86\xcb\xb6\x29\x2f\x5b\x55\x4b\x56\xe7\x2a\xe3\x13\xe8\xfa\xc5\xcd\xe5\xcb\x4c\xde\x89\x6c\x15\x17\x73\x8d\x58\xc4\xe7\x86\xdd\xeb\x00\x8c\x3b\x67\x2f\x2c\xad\xb0\x1b\xfc\x00\xbb\x34\x32\xd2\x98\x47\x82\x1d\xbc\xb8\xb9\x3c\x64\xb8\xdf\x2c\xc6\xce\x62\x31\x4f\xd4\x42\xc4\x4c\x11\x40\x1a\x22\xa1\xf5\xd9\xdf\x8b\x91\xc8\x52\x91\x1b\x4d\x35\xcf\x79\x34\x65\xb1\x80\xff\xe7\x95\x41\x2d\xb4\x05\x75\xa6\x3b\x3f\x57\xa6\x95\xc8\x66\x32\x15\xce\x0b\x45\xaf\x4b\x6d\xf5\xdb\x18\x7b\x4f\x44\xbe\x61\x0f\x86\x3b\xfb\x93\x4d\x85\x88\x41\x14\x1c\x09\x36\xe7\x5a\xe3\xf0\x67\x66\x6f\xfa\xac\x5c\x28\x9b\x03\x8f\xa0\xe4\x5e\xde\x70\x50\xa5\xf6\xe5\x61\xd0\x2f\x5a\x71\xb8\x55\xb3\x7f\x57\xa2\x27\xad\x4e\x29\x7c\xba\x7f\x21\xc2\x46\x1a\xcb\xc8\x10\x52\xcd\xbf\x21\xcc\x91\xb2\xfc\x82\x40\xe7\xfd\xb5\x1e\x83\x2b\x47\xfd\x95\xc9\x9c\xfd\xf4\xf6\xe6\xd6\x2c\x51\x05\x4d\x96\x20\x10\xcb\x1a\xc8\xa6\xbf\x1f\x44\x7e\x95\x14\x13\x99\x9a\x6f\x1f\x1c\xb2\x88\x27\x09\x61\x91\xf0\x9c\xbe\x86\xa1\x14\xf4\x65\xe8\x09\x10\x15\x47\x82\x3d\x3f\x63\xd1\x94\x67\x3c\xca\xcd\xc7\x55\xc6\x12\xa1\x75\x97\x8d\xc4\x44\xa6\x29\x60\x6a\xa4\xb1\xd9\x5a\xf3\x4f\x70\x81\xf1\x14\x1d\x53\x50\xc5\x41\x46\xe5\xdb\xec\xe0\x17\xde\xfb\xed\xb8\xf7\xed\x45\xef\x7f\xff\x7a\x88\x8d\x63\xae\xa7\x42\xb3\x83\xde\x61\x97\xc5\x2a\xd7\xec\xa0\x7f\x48\x75\x45\xbd\x3e\x34\x1b\x89\xfc\x5e\x88\xf4\xeb\x90\xe2\xc3\x16\x94\x1a\xa9\x60\x08\x41\xe4\x98\x92\xdd\x2d\xe4\xa8\x9b\x60\x57\xd2\xbd\xd6\xf7\xef\xb5\xcd\x6c\x2d\x81\x0b\x71\x47\x46\x96\x40\xcf\x6b\x6b\x53\xf9\x0d\x83\x95\xa9\xea\xd7\x4c\x6b\x63\xf9\x32\x2e\x95\x6d\xfc\x5f\xa5\xe4\xf5\x08\xfb\x4a\x80\xe0\x5b\xc3\x4a\xeb\xed\xda\xa5\x5d\x25\xa4\x2b\x3c\xd6\xa0\xb2\x8c\xdd\x6e\xc2\x14\xad\x25\x25\x2f\x4b\xa8\x94\x77\x06\x2f\x8f\xd5\x06\xae\x2b\x50\x0e\xae\x1d\x9f\xac\x7f\xb2\xfa\xbc\x22\xa3\x48\x0d\x57\x53\x55\x9f\x21\x8e\x8b\xe1\x7a\xa8\x78\x98\xcf\xe1\xe0\x0e\x46\x22\xe2\x85\x06\x74\x79\x39\x9b\x27\xe4\x69\xb3\x97\xdc\x0b\xa7\xd9\x5c\x15\xa3\x44\xea\x29\xea\x7c\x07\x87\x86\xac\xa6\x2a\x3e\xb4\x80\x42\x54\x77\x67\x13\x15\xc9\x72\x5b\x5b\xd4\x80\x1a\xd2\xa0\xa5\xd3\xcd\x10\xff\x3e\x9a\x8a\xe8\x1d\x31\x79\x68\x81\xcd\x67\x70\x6c\x73\x9e\x17\x88\xa2\x7f\xcf\xcd\xf9\x2d\xd2\x5c\x26\x5e\x5b\xe0\x2a\xd0\xde\x48\x5a\x62\x6c\x4e\xc0\x3c\x53\x91\x10\x20\x06\xe5\x0a\x35\x24\xa8\x96\x72\x4b\x53\x16\xef\x91\xb9\xf7\xe8\xc5\x8c\x45\x4a\x65\xb1\x4c\x61\x8d\x41\x18\x6a\xae\xb1\x19\x02\x72\x89\xd5\x43\xb5\x51\x33\xcd\x8d\x90\x9a\x45\xca\x6c\x40\x5e\xe2\x6a\x3b\xa2\xb9\x16\x13\xa9\xf3\xcc\x05\xfe\xb0\x09\xcf\x61\x72\x18\x29\x14\xd3\x26\x88\x12\xd4\xa9\xac\xe2\x93\x2b\x36\xe6\x89\xa6\xa8\xbf\xc6\x77\x6d\x40\x9f\x7e\x27\xe7\x73\xc3\xe3\xde\x18\xfd\xf2\x5e\x6a\xb1\xba\xbd\xd9\xbe\x8a\xd6\xe8\x85\xfa\xcd\x55\x7c\x99\x8e\xd5\x9b\x14\x6d\x03\x4d\xe3\xfe\xb8\x1a\x8e\x58\x6d\xbf\x0d\x45\x97\x0e\xe3\xba\x42\x7c\x90\xc8\x77\x60\x74\x31\xc2\x34\x7c\xe2\xed\xe5\xcb\x2e\x13\x79\xd4\x3f\x64\x71\x01\xf7\x0c\x6c\x7e\x39\x37\x0d\x0b\x4f\x23\xa3\x35\xab\x77\x4b\x08\xab\x79\x50\xcf\xb6\x61\xa7\xe6\xba\x31\xaf\x97\x44\x45\x03\x2f\xe3\x51\x6b\x53\xe6\x1a\xaa\x95\x19\x5e\x51\xb1\x42\x18\xda\x41\x72\x80\x85\xb2\x36\x02\x18\x85\xf9\x7c\x63\x7c\x5c\x93\x09\xca\x9c\x5c\xf1\x3e\xb7\xd8\xed\x66\x10\xaf\x55\x2c\xea\xc7\xd8\x6c\xa3\x6e\x8c\x13\x04\x27\x3d\x57\xa9\x96\xb6\x20\xd9\x9c\x67\xda\x6a\x11\x10\xb8\xcd\xdd\xbd\xec\x7f\x9f\xd6\x44\x36\x47\x82\x1f\x19\xab\x24\x51\xf7\xe6\x4d\xf7\xd0\x8c\xd2\x52\x95\x7d\x7d\xdc\xa0\x09\xed\x93\x0c\x05\xab\xe1\xfd\x26\x27\xd3\x9c\x4d\x32\x75\x8f\x65\x3e\x30\x0c\x5d\x8c\xe5\xfb\x4a\xb0\x6a\x9f\x0d\x3a\x91\x2e\x65\x13\xe2\xfb\x73\x15\xf7\x8d\x1a\x35\xe8\x9c\x83\x85\x0e\xd4\xbe\x95\x2d\xc1\x5c\xe2\x37\x47\xd8\xb6\xa5\xef\x14\x32\x36\xad\xf1\xe2\x3e\x30\xbf\xbc\xbd\x7c\x79\x18\x6e\x2f\xe6\x53\x31\x13\x19\x4f\xcc\x1b\x83\x8e\x99\xea\xa0\xc3\xe4\x78\x5c\xe7\x69\x29\x73\x4d\x99\x4c\x13\x99\xda\xa7\x83\x94\xad\xf9\x3f\x0f\x8d\x0f\xae\x25\xdc\x07\xb4\x0f\x76\x99\x72\xa7\x7f\xd0\x01\x1a\x1e\x74\x06\xe9\x20\x5d\x37\x5a\xaa\x67\x25\xee\x1d\x87\x92\xa9\x7f\x19\x9c\xf4\x4f\x9e\x43\x4d\x14\x1b\xfa\x68\xd5\x00\xa0\x2d\xa4\x3a\x4d\x1c\x5f\x17\x73\x00\x9c\x1b\x29\x0c\x69\x66\x83\xce\x95\x11\xef\x75\x2e\xd2\x7c\xd0\x21\x6c\xc0\x57\xde\xc7\x71\x0a\x3f\xca\xb1\x88\x16\x51\x22\x7e\x52\xb1\x20\x3e\xe6\xba\x8e\x78\xca\x12\xc1\xef\x84\x3b\x31\x2c\x96\xda\x31\xcf\x23\x95\x31\x39\x49\x31\xd2\xda\x86\x6e\xf6\xd9\x85\xae\x4d\xe2\x19\xe0\x0d\xa6\x4f\x72\x37\xca\xb2\x79\xb7\xf2\x31\x98\xa5\x6d\xa4\x52\xc1\x66\x2a\xa6\xa8\x49\xdf\xc0\x88\x68\x7d\xd6\xc6\xe8\xf8\x78\x79\xfa\x4b\xdb\x9f\x5d\x1f\xe8\x08\x6e\x5c\xa9\xbb\xb0\x7e\xe2\x3d\x37\x37\x07\xd4\x96\x31\x4a\xd9\x6c\x66\xfa\x01\xaa\x98\xf3\x8c\xcf\x4c\x0f\x56\x75\x8d\xeb\x52\x88\xc7\xb7\xef\x9a\xeb\x18\x50\x1b\x42\xad\x9c\x32\x76\x6f\xc6\xf5\x8e\x80\x21\xc9\x8e\xbe\x8c\x8d\xd3\xea\x10\xfb\xb1\x51\xe4\x72\x5c\xea\x23\xe6\x86\x03\x64\x42\xa9\x6b\x54\xd0\xa5\xc5\x20\x89\xab\xd0\x7c\x22\xaa\x40\x93\xc8\xd0\xaa\xa2\x18\x04\xdf\x5a\x29\x07\xd9\x94\xb7\xbf\x66\xf9\xb0\xb3\x82\x27\xec\xea\xe7\xa3\xab\x9f\x5f\xb0\x99\x88\xa6\x3c\x95\x7a\x86\xa3\x84\xf3\x81\x5b\x00\x63\xf2\xc8\x10\xd4\x03\x98\xaa\x79\xdc\x75\xb3\xe7\x59\x39\x32\x3a\xab\x12\xf2\x0c\xac\x5b\x00\x06\xe9\x24\x0b\xff\x3c\x5a\x7a\x90\x19\x4b\xec\x7a\xc3\x94\xe9\x62\xc7\x85\xb2\x0f\x60\x87\x31\x4e\xb7\xcf\x2e\xec\x2a\x4f\xb9\xb5\x0b\xf3\x7b\x33\x14\xab\x19\xfb\x82\x1f\x1d\xca\x89\x22\xa9\x68\x22\x72\xc6\x9b\xf7\x45\x69\x91\x22\xb2\xc5\x29\xf6\xd9\xf7\x2a\xc3\x34\x85\xa6\xfd\xdd\x2d\x37\xde\x16\x6e\x75\xb4\x10\x4e\x0d\x79\xe7\xf6\xa0\x67\xd8\xcc\x44\xe6\xd3\x62\x64\x38\x4c\xac\x22\x5d\xb2\x99\x5e\xa2\x22\x9e\xf4\x68\x5d\xfb\xd3\x7c\x96\x94\xd3\x34\x67\xce\x3f\x6e\x76\x44\x48\xf6\x1a\xcf\x1f\xca\x8a\xf0\x3b\xfe\x69\x94\x44\xb3\x32\x71\x6c\x0b\x08\x0a\x36\x2e\x20\xb6\xba\x16\xc3\x3d\x12\x88\xda\xbc\x61\xd9\xc0\x6e\xe7\x7d\xcf\x9b\x96\xa1\xe6\x9e\x6d\x02\x51\x06\x9b\x40\x66\x56\xf4\x11\xb3\x1b\x6b\x34\x11\xd3\x24\x50\x0e\x97\x1c\x21\x49\xe2\x5d\xf1\xa6\x85\xce\x41\x86\x33\x6c\x88\xb3\x14\x98\xa6\xdf\x80\x92\x5b\x52\x81\xb4\x16\x65\xc2\x08\x9d\x74\xb0\xe0\x53\xa4\x7d\x23\x10\x6f\xb2\x00\x7e\x99\x28\x23\x24\x68\x0c\x0d\x2f\x48\x8a\x34\x9d\xf7\xb0\xdf\x5e\x86\xb2\x2c\xcf\x98\x39\x03\x11\xcf\x4a\x67\x1e\x8a\xa8\xef\x7c\x21\x87\x17\xb9\x32\xd3\x88\x30\x9f\x48\xcd\x8b\x64\xc9\x28\x2c\x68\xb3\x27\xc6\x78\x52\x95\xed\x74\x0e\x06\x56\x66\x07\x61\xd6\xa7\xef\x7a\x9a\x52\x42\x4b\x69\xa6\x85\xf2\x8a\xb8\x34\x55\xf0\x55\x43\xc7\x52\x6b\xa8\x7c\x25\x6d\x41\x51\xc2\x27\x36\xff\x11\xe4\x62\xf1\x4c\x85\x9a\xf1\x3b\x2e\x13\x08\xed\x27\xd7\x52\x0a\x47\x81\x06\x6e\x85\x3b\x9b\xd1\x67\x04\x1c\x75\xcf\x44\xaa\x8a\xc9\x94\x18\x7e\xee\xee\x1f\xb7\x1d\xce\x0a\x52\x9d\x07\x4f\xd9\x9b\xfb\xd4\xa8\x0e\x0e\x83\xb9\x09\xb7\x1d\xa9\x0c\xe5\x3c\x50\x87\xd2\x72\x35\x5b\x6f\xd0\x17\x61\xb8\x6b\xed\x65\x9f\xc2\x5e\xe6\x7c\x3e\x15\x7f\x4a\xcd\x9c\x01\x87\xc3\x34\xd8\x65\xe1\xae\xb0\xcb\x41\xaf\x32\x25\xd9\x9b\x60\x5b\xb7\x83\x79\xe9\x01\x4e\x07\xf7\xda\x8e\x5d\x0e\xa6\xdf\x8d\x3c\xfc\x65\xc3\xa5\x37\x5b\x70\x9d\x8c\x0c\xe0\x6b\xb4\xcd\xdb\x6e\x0d\x8b\x03\xe8\xef\x6e\xc7\xb4\xbc\x7c\x19\xe0\x75\x89\x91\x46\x72\xc3\xcd\x03\x26\xba\xf2\x61\xbd\x12\x33\x89\xc0\x65\xd9\x65\x30\x0f\xa6\x4e\xa6\x87\x02\xe4\xee\x9e\x00\x59\xab\xcc\x23\x59\x22\x93\x6c\x41\x09\x28\xc8\x99\x45\x75\xa5\xa9\x97\xe3\x9c\xfb\x19\x61\x5b\x3b\x3f\x69\xb0\x3b\x76\x7f\x06\x61\xd5\x71\x8b\x1a\xc3\xc7\xdf\xed\xa0\x61\x89\x1d\x57\xa3\xe1\x23\x67\x33\xaa\x8a\x14\xf7\x95\xe5\x45\xcb\x5a\x45\xff\x83\xb8\x23\x60\x52\x91\xb9\x7a\x41\x60\xa7\xa5\x65\x7a\xa1\xc1\x9b\xe2\xa7\x05\xeb\x29\xcf\xfc\x89\xab\x99\x48\xa3\x04\xd5\x63\x2c\x4a\x10\x9b\x0b\xe6\xfb\x52\x83\xeb\xfa\x9f\xc3\x8b\x09\x18\xb2\x2a\xab\x7b\x9a\x59\x00\xba\xbb\xf9\xd7\x89\x51\x84\xac\xd1\xa3\x3a\x94\xea\xeb\xde\x20\xfc\xf7\x2f\x8c\xd6\xf2\xef\x46\x27\xf5\xbe\x2b\xb5\x2e\x84\xf6\x14\x49\xfb\x7e\xb5\x7f\x33\x28\x34\x0e\x5a\x3d\x00\xc7\x69\x4f\x22\x09\x37\x12\xeb\xab\xa2\x24\xe8\x56\x37\x57\xd5\xb1\x39\xee\xca\x0a\x6d\xaf\xaf\xcb\x97\xa5\x5d\xb9\xf6\x6d\x10\x0d\x8b\x34\x16\x99\xce\x79\x1a\x77\x99\xe8\x4f\xfa\xe5\x9c\xe0\xb4\x0b\x0e\x3a\xa8\x5b\xa8\xfa\xe1\xc9\xbc\xc8\xb7\x06\x49\xe5\x6a\xae\x12\x35\x59\xfc\x5d\x2c\x02\x1a\xb0\xff\xb4\xee\x3f\x7b\x67\x7e\x23\x45\xa4\xa4\x6f\xeb\xbc\x87\xb5\xe6\x9e\x99\x0d\x8e\x2b\x4f\x40\xe2\x00\xce\x44\x96\x00\x58\x38\x97\x3e\xef\x82\xf9\xec\x97\xf1\x33\x56\x26\x2c\x57\x42\xb3\x03\x5a\x8a\x48\xcd\xe6\x3c\x5d\xf4\x23\x35\x3b\xfa\x4d\xa5\x02\x0b\x2c\xf8\xbf\x1a\x19\x58\xa5\x83\xce\xe1\x26\xc3\x72\x9b\xe9\xc6\xe4\x48\xaa\x3a\x26\x0e\x0a\x00\x9c\x0d\x2b\x41\x55\xac\x96\xe2\xfd\x5c\xa1\x56\xa0\x1b\xaf\x6a\x0c\x63\x04\x8c\x00\x23\x5e\xa8\xfb\xb4\x22\x94\x36\x48\x15\x8a\x3f\xb8\x4e\x50\xbf\x85\x01\x1a\x99\xd2\xca\xe6\x15\xf2\x83\x6d\xaa\x45\x54\xc9\x68\x6a\x3f\x2c\xf3\xb2\xea\x41\x9e\x49\x71\xe7\xb1\x0c\x6f\x24\x20\x38\x82\xfd\x75\xc4\xa3\x77\x96\x88\xed\x26\xa3\x99\x6b\xae\x74\x69\x3d\x8d\xe5\x18\xc4\xf0\x1c\x0f\xbd\x79\xc3\x0c\xa9\xfc\xb9\xb2\x12\xfd\xb2\xe4\xc9\x48\x58\x0b\x48\x69\x19\xb6\x15\x2f\x9c\x09\x8a\xde\x7d\x5c\x55\xfb\x65\x42\x40\xe8\xc6\x58\x7b\xb5\x6f\x10\x4b\x60\x9b\x2d\x89\x24\xf0\x54\xbb\x36\x8e\xe0\x0b\x51\x47\xb6\x8c\x23\x78\x5d\x11\xb2\x1e\x19\x45\x00\x9d\xb5\x31\x04\x6d\x0c\xc1\xbe\x62\x08\x88\x5a\x77\x18\x41\xe0\x74\xa7\xf5\x8c\x10\xa2\x07\xb6\xd2\x6f\x36\x30\xe7\xad\xe1\x9a\xf4\x66\x93\x6f\xda\x07\x4d\xf8\x1f\xfb\x2d\x3f\x2d\xcb\x1f\xaf\x37\x2e\x6b\xf3\x02\x7c\x1a\x73\xfa\x3c\x2b\xe3\x25\x36\x2b\x87\x5e\x72\x0e\x73\x83\x17\xa9\x9b\x4c\xd7\x26\x2c\x98\x9b\x30\x52\x33\xba\x0d\x1f\x95\xfc\xd5\x60\x2b\x36\x40\xa9\x66\xb3\x9d\xf3\x3c\x9a\xf6\x66\x22\x9b\x88\xde\x3b\xb1\x30\x0a\x05\xaa\x84\x81\x56\x60\x4b\x14\x93\x05\x58\x13\xb2\x89\x78\x00\xed\xd1\x28\x96\x53\x14\x45\xaf\xaf\x45\x0a\xf3\xdb\x51\x5a\xcf\x88\xae\x37\xe7\x0d\xb2\xb9\xd4\x88\xd2\xa1\xc6\x4e\xc0\x36\x3f\xa3\x44\x54\x7a\x5b\x6c\xd6\x03\xc9\x23\xf1\x22\xe5\x33\x6b\x90\xb5\xc2\x96\x88\xfb\x83\x74\x90\xfa\xdf\x16\xa1\x30\xf3\xbf\x36\x94\x49\xfb\x65\x1c\x0a\x8f\x22\x08\xb6\x00\x37\x84\xc8\xa3\x18\xa5\x51\x56\xda\x15\xc0\xe7\xba\x4e\x22\x28\xc7\x95\x85\x55\xf7\x7b\x9c\xd4\xab\xf7\x73\x9e\x2e\x91\x10\x02\xad\xcc\x0d\x7f\xef\x83\x49\x35\x86\x6f\x5e\xb2\xea\x90\x30\xaf\xc5\x41\x4f\x1b\xb4\x13\xf1\x2d\x4a\x6e\x32\xe4\x66\xbb\x16\x86\x4f\x47\x79\x29\x7b\xe6\xae\xb5\x19\x41\x26\x9c\x87\x69\xcd\xc6\xb0\x57\x5e\x7c\x0d\x19\xc0\xad\xd0\x63\xc5\xec\x52\x63\x71\x92\x68\x85\xe5\xe8\x3e\xbb\x48\x49\x14\xa5\x51\x2f\x6c\x1e\xc7\xad\xc8\x66\xf6\x9e\xe0\xa9\x26\xfb\x37\x54\x16\x2b\x7b\xcb\x68\x3a\x60\x70\xaf\x6a\x62\x9b\x62\xe1\x90\x67\xcc\x99\x43\x02\x30\x38\x0f\x4e\xab\x09\xcd\x09\xc4\x8d\x56\x88\x6c\x6d\xda\x5f\xb3\xfc\xf6\xbb\xc0\x01\x83\xf8\xaa\x37\x30\xb7\x00\xa7\x7c\x19\xe6\x7b\x81\x1b\xcc\x1e\xc4\x1a\xd3\xce\x04\xb9\xd3\x62\x87\xa3\x07\x0e\xe3\xf2\xa3\x64\x61\xfa\x65\xd0\xc9\x14\x5a\x52\xb4\x1a\xe7\x83\xce\xaf\x7d\xf6\x5a\xe5\x36\x20\x4a\xc4\xac\x67\x83\xca\xf0\x72\xbb\xfa\x99\x20\xf3\xb4\x9c\xcd\x93\x05\x1b\x73\x99\x18\x55\x5e\xa5\x02\x2f\x36\x78\x73\x1b\xc5\xbd\xdb\x29\x2f\xf1\x40\x62\x6f\x79\xc1\x97\xa5\x46\x6b\xb7\x3e\x06\x48\xb9\xfb\x11\xd9\xac\xe5\x3a\xe8\x55\xbc\x5b\xb5\x5e\xa1\xbb\xb7\x0c\xc4\xbb\xaa\x5c\xb5\x81\xd1\x7b\x37\x73\x00\x65\xab\x1c\x56\x35\xf7\xc6\xd6\xce\xad\x0d\x3e\x68\xbc\xcb\x44\x94\x70\x39\x5b\x06\x19\xb7\x07\x72\x01\xde\xee\x7d\xb4\x8a\x15\xf7\x52\x40\x54\x67\x10\xac\x0d\xbe\x44\xb5\xe9\x7f\x22\x0f\x7f\x28\xe7\xd4\x6b\xe2\xad\xcc\x54\xdd\x37\x86\xfd\xc2\x0c\xc3\x47\xb5\xf4\xe7\x68\x2e\x87\x91\x2a\xd2\xb8\xcf\xd0\x98\x06\x78\x75\x5d\x56\xf9\xc8\xe5\x6c\x26\x62\x49\x11\xa6\x18\x3b\xb7\xb7\x0b\x7b\x79\x09\xd1\x60\x36\x6b\xf0\x9a\xde\xa5\x6b\xca\x17\x60\xd7\x19\xb1\xea\x6d\x43\x96\xac\x0a\xe9\xb4\x88\x70\x5f\x8a\x10\xb2\x0e\x75\xc4\xb7\x64\x55\x75\x9a\xdd\x68\x9e\x15\x5d\xae\xb5\x6a\xb5\x56\xad\xbd\x58\xb5\x2a\x54\xb6\x3b\xd3\x16\xb2\xf5\x0b\x97\xdc\xb0\x8a\x47\xd6\xdb\x96\xa9\xfa\x18\x39\x9e\xa3\xf3\xc3\xe5\x19\x64\x36\x61\xc4\x33\x7a\x19\x9e\x61\x1d\x8c\x47\x8e\x5a\xcb\x87\x60\x54\x1a\xa4\x83\xb4\xf1\xb1\x36\xdd\xfd\x0b\xe7\xc3\x2d\xdb\xfb\xbc\xe9\xee\x5f\x03\xe7\x7b\x70\x96\x76\x2c\x34\xa4\x18\x20\x6f\x39\x22\xc6\x42\xac\x64\x24\xa6\xfc\x4e\xaa\xac\xcf\xae\x28\xa8\xd4\x39\xeb\x3d\x07\x33\xc6\x1b\x3c\x28\xc6\xa6\x64\x43\x18\x76\xd5\xed\x60\x0e\x58\x70\x7b\xf2\x42\xdb\x51\x37\x98\x18\xd1\x60\x60\xa0\x66\xa5\xf3\x85\xcd\x1b\xb3\xa7\xa2\xc1\x4a\x5d\x82\x53\x97\xc9\xbe\xe8\xe3\xab\xf5\x2c\xb7\xc7\xce\x11\xe7\xb6\xb5\x5f\xb9\xb6\x4a\x9b\x5e\x39\xf4\xb9\x5d\x4a\xfe\xf5\x4f\xac\x93\xfe\x43\xed\x43\x1a\xc0\xb2\x4b\xa9\x55\x05\xbe\x8c\x2b\x68\x1b\x55\xa0\xbe\x97\x3b\xd2\x06\x1a\x02\x55\xab\x11\xb4\x1a\xc1\x5e\x34\x82\x06\xa5\xed\x4f\x2b\x20\xc4\xb1\x2d\x38\x28\xe5\x3c\x79\x01\xb3\x65\x64\xa1\x67\xa3\x1c\x09\x97\xd3\xdd\x67\xd7\x90\xfd\x99\xaa\x7b\x34\x4a\x39\x63\x58\xcd\x67\xe9\x92\xc0\xef\x24\x77\x77\x9f\xfd\x35\x03\x64\x3c\x4c\xfb\x61\xf7\x02\x4e\x03\x3a\xf2\x78\xa2\x55\x35\xbf\x12\x9c\x91\x08\x9d\xf7\xea\x3d\x8f\x72\xaa\xef\x32\x13\xb3\x11\x25\x21\x8d\x04\xdb\x08\x33\x11\xbb\x25\x13\x59\x50\xa8\xa9\xb7\xb0\x89\x32\xe0\x66\x6c\x64\xde\xa6\x22\x12\x5a\xf3\x6c\x51\x89\xcc\x9c\x3b\xeb\xa0\x4b\xbe\xf3\xf3\x3f\xe7\x2a\x7e\xa2\xed\x0c\xfd\xcc\xb3\xba\xc9\x6f\xee\x64\x0f\x58\x67\x2f\xd9\xe6\x27\x39\xa1\xd4\x70\x6b\xdd\x63\x97\x79\x39\xd4\x3c\xe3\xa9\xc6\x37\xa1\x33\xed\xaa\x48\x2d\xfb\x34\x86\x91\xd6\xcd\x9a\x66\x01\x76\x53\x57\x23\x5e\x3e\xf2\x0d\x64\x20\xeb\x30\x0c\x8d\x0f\x72\xdf\x6b\xbf\xbf\x0e\x46\x56\xbf\xf6\x1c\xe0\xcd\x2d\x72\x1b\xf8\x70\x43\x69\x70\x78\x5b\x1c\xde\x35\x61\x2b\xa1\xf6\x2b\xd0\x2f\x96\xca\xb4\x6b\x64\x20\x7b\x40\x3b\xdd\x8e\xb6\x00\x86\x46\xdb\x87\x45\x6d\x8a\x46\xb6\x75\x53\x30\xb2\x50\x0e\xcb\x01\xbd\xaa\xa9\xa9\x40\x2e\x10\xba\x3e\xe5\x69\x9c\x08\x2b\x2f\x91\x24\xde\x08\x8c\xf7\xe3\xd9\x6b\x71\xec\x4b\x43\xd6\xc3\x94\x71\xeb\xbc\xfd\x36\xf6\x99\x46\xd6\xe4\x7e\xe6\xe6\x0d\x75\xae\x1d\xe7\xad\xdd\x75\x0d\xfe\xea\x75\xbf\x8c\xc3\x3e\x52\x2d\xb0\x48\xa6\x0f\x57\x0b\xb0\x87\x2d\x48\xd7\x69\x59\x1b\x13\x2f\xea\x5f\x96\x7c\x9d\x36\xf6\x68\xba\x8d\x97\xd1\xe8\xab\x2c\x0b\x41\xba\xde\x82\x14\xad\x73\x26\xcc\x73\x26\xd2\x48\x15\x46\x9a\x16\xb1\x45\xac\xa8\xc3\x71\x40\x81\x30\x9e\x2e\x2a\x9c\x11\x32\x98\x80\x11\xe2\x5d\xb4\x99\xba\xb8\x37\x25\x11\x27\xfb\xb1\x5b\xae\x4a\x53\xd8\xae\x1c\xcb\x12\xe7\x40\x17\x91\xb9\xd4\xc6\x45\x92\x2c\xbc\x4b\xff\x93\xcd\x35\x10\xb8\xe3\x68\xe1\xa7\xa5\x32\xe5\xdb\x39\x26\xf6\xd3\xd0\xe9\xab\x5d\x3f\xff\xa1\x72\xa3\x12\x1a\xdf\xa2\x72\x9d\xd7\x33\x64\x1a\x40\x2c\x70\x60\x6d\xb2\x9a\x83\xdd\xc8\x95\x11\xd0\xb5\x21\xd3\x34\x67\xff\xce\x65\xfe\xbd\xca\x2e\x9c\x45\x00\xc1\x34\x1c\xe8\xc7\xa7\x5d\xc6\x07\x78\x8b\xd1\x82\xf1\xe0\xe3\x12\x30\x80\x3c\xf6\xb8\xec\xdd\xa6\x42\xc7\x65\x5b\x8e\x89\xaf\xad\x63\x93\x6e\x25\x57\xf3\x46\x68\x56\x9a\xea\x79\xba\x82\x23\xd9\xe3\xea\x56\x64\xbd\xe8\x3b\x33\x82\xea\x24\x74\x43\xe5\x6e\xdb\x64\x62\x57\x7c\xe9\xa7\x4b\xb2\x7e\x59\xdb\x14\xda\x5f\x52\x91\x29\xc9\x3f\x51\x93\x89\x88\xbb\xcc\x88\xf4\xee\xaa\x33\x5a\x2b\xc9\xaa\x4c\x8b\x54\xcb\x5c\xde\x55\xe4\xea\x70\x7a\x90\x0c\x5e\xdd\x72\x26\xbc\x11\xdf\x73\xed\x8f\xfa\x71\x79\xa3\xa6\xef\x47\x14\x46\x83\xd7\xd7\x11\x47\x35\xc7\x63\x2d\x91\x54\x9a\x93\x4d\xa2\x0a\x39\xce\x12\x09\xa6\x82\x6a\x16\xa3\x87\x0c\xb2\x9e\x54\xa2\x30\x82\xd4\x4f\xfc\xbd\x9c\x15\x33\x96\x16\xa0\x77\xa9\x31\x2b\x52\xf9\xcf\xa2\xd4\xd2\x66\x3c\xe5\x93\x6a\x7e\xa1\x2f\xda\x91\xa2\x56\xe8\x2a\xfc\xc1\x45\x45\x1a\x92\x1a\x31\x68\x9c\xbc\x85\xe0\x11\x45\x9a\xfb\x6f\x21\x72\x97\x2b\x1c\x8a\x50\x1b\xd4\x71\x24\xba\x40\x61\xf9\xbd\x8c\x08\x0d\x0a\x52\xa6\xb2\x22\x11\x8c\xcf\xe7\x89\x14\x36\x12\xb7\x32\x7e\xf7\x7d\x48\x21\x8c\x19\x9f\x29\x43\xc7\x45\x92\xcb\x79\x82\xd0\xed\x16\x42\xc0\x65\xf5\x11\x42\x81\x7f\xc5\x40\x92\x90\x75\x93\x01\xb8\x02\xbd\xe3\x82\x3d\xcb\xf5\x73\x21\x3f\x84\x61\x62\xa7\x56\xa4\x10\x2f\x52\xf1\x98\x6d\x53\xb9\x6f\x15\xac\x05\x95\x2d\x68\xfd\x89\xad\x31\xb7\xf5\x27\x7e\x8d\x46\xd3\xd6\x9f\xf8\x09\xfc\x89\x4b\xb8\xe4\xef\xd0\xab\xb8\x6c\xa6\xdb\xfa\x16\x57\xad\xd8\x76\x57\xd1\xee\xfd\x8c\x4b\x3e\xd4\x7a\x1b\xff\x18\x17\xd4\xe7\xf7\x36\x2e\x13\xba\x5a\x9f\x63\xeb\x73\xdc\x87\xcf\x71\x19\xbd\xed\xcc\xf3\xb8\x8c\x75\xb7\xfe\xc7\xd6\xff\xd8\xfa\x1f\xbf\x0a\xff\xe3\x2a\x81\xad\xf5\x42\xb6\x5e\xc8\xdd\xa8\x11\xdb\xfa\x22\x57\xf7\xb3\x35\x31\xb7\x7e\xc9\x2f\xc4\x2f\x59\xd9\xa0\xd6\x3b\xd9\x7a\x27\x5b\xef\xe4\xc3\x0e\xcd\xc3\x38\xe9\x1a\x4f\x65\xa0\xed\x1f\xcf\x5f\xd9\xba\x2b\x57\x5c\xb0\x23\x91\xf3\x2f\xb4\x44\xec\xc6\xf8\xe9\x95\x42\x79\x1e\x82\xfa\x25\x21\x57\x02\x7c\xba\x51\x04\x2d\x84\x3a\x7d\x62\x03\x14\x75\x82\x49\x74\x63\x44\x06\x5e\x01\xc3\xcd\x6b\xb8\xea\x38\x36\xed\xd7\xa9\x6a\x98\x6e\x1c\x8b\x21\x94\xc3\xb6\x1a\x6e\x6b\x2d\x6d\xdd\x79\xbf\x2b\x7b\x64\x5b\x0d\xb7\xad\x86\xfb\x09\xab\xe1\xd6\xee\xf1\x2d\xd1\xe9\x43\x6f\xef\xd0\x4f\x57\xeb\xbe\x2d\x8e\xfb\x7b\xbd\x63\x3e\x5f\x71\xdc\xba\x1c\xdb\x7a\xe0\x5a\x0f\xdc\x3e\x3c\x70\x75\x3a\xdb\x99\xe7\x2d\xc4\x82\xdb\x5a\xb9\x6d\xad\xdc\xb6\x56\x6e\x5b\x2b\xb7\xad\x95\xdb\xd6\xca\x6d\x6b\xe5\xb6\xb5\x72\xff\xd8\xb5\x72\x03\xab\xdd\xd6\xca\x6d\x6b\xe5\xfe\xde\x6a\xe5\x3e\xaa\xf0\xd0\xaa\x0c\x21\xa7\x61\xac\xab\x7e\xfb\xf2\xd5\xd5\xf5\xab\x17\x17\xb7\xaf\x5e\xb2\x1e\x5e\x78\x93\x4c\x15\x73\x57\x4c\xd5\x2b\x2a\x24\xcd\x09\x9c\x67\x22\xb2\x41\xef\xe5\xe7\x8e\xa8\x8d\xd1\x91\x91\xe4\x32\x91\x08\xae\x85\x11\x63\x28\x55\xab\xbe\x77\x5e\xd9\xd5\xb6\xf2\x6e\x5b\x79\xb7\xad\xbc\xfb\xbb\xb0\x0a\xb6\x76\xb8\xb6\xf2\xee\x0e\x2a\xef\x56\xee\xaf\x87\x3a\x38\xf6\x51\x83\xb7\xd2\x79\x5b\x88\x77\xdb\x42\xbc\x0f\x20\x82\xb6\xf2\x6e\x5b\x79\xb7\xad\xbc\xdb\x56\xde\x6d\x2b\xef\xb6\x95\x77\xb7\xb8\xff\xb7\x2a\xbf\x5b\xb9\xd5\xdb\x1a\xbc\xbf\x47\xc5\xe4\x73\xd5\xe0\xad\x5a\x62\xda\x50\x85\x36\x54\x61\xaf\xa1\x0a\xbb\xad\xc6\xdb\x54\xa5\xda\x92\xbc\x5f\x64\x49\xde\x90\x5a\xfa\x99\xea\xf2\x86\x86\xb2\x86\xc0\xda\x0a\xbd\x6d\x85\xde\xb6\x42\x6f\x5b\xa1\xf7\x2b\x17\x31\x5b\xc1\xae\xad\xd0\xdb\x56\xe8\x6d\x2b\xf4\xb6\x15\x7a\xdb\x0a\xbd\x5f\x5c\x85\xde\xa6\xa4\xdd\x96\xe9\xfd\xdd\x4a\x22\x9f\xb9\x4c\x6f\x40\xab\x6b\x0d\x5f\xad\xe1\x6b\x7f\x86\xaf\xfd\x14\xec\xf5\x1d\x09\x2d\xca\x76\xcb\x96\x5b\x05\xf1\xeb\x62\x80\x2d\xca\xf6\x27\x40\xd9\x0e\x33\xc9\xdf\x21\xc8\xf6\x92\x89\x6e\x8b\xb1\xbd\x62\xbd\xb6\xba\x86\x76\x8f\xb0\x1d\xfe\x4e\x0b\xb0\xfd\xc7\xb8\x9b\x3e\x3f\xc0\xf6\x12\x71\xab\xd5\x1c\x5a\xcd\x61\x7f\x9a\xc3\xfe\xe0\xb5\x97\xb0\xed\x16\x5d\xbb\x45\xd7\x6e\xd1\xb5\xbf\x0a\x74\xed\x15\xa2\x5a\x0b\xae\xdd\x82\x6b\xef\x44\x7d\xd8\x16\x5b\x7b\x65\x37\xdb\x52\x72\x8b\xac\xfd\x85\x20\x6b\xfb\xfb\xd3\x02\x6b\xb7\xc0\xda\x2d\xb0\xf6\x83\xce\xcc\x83\xb8\xe8\x1a\x58\xed\x66\xd3\x3f\x1e\xaa\x76\x5b\x05\x78\x3d\xac\x76\x5b\x0a\xf8\xf7\x59\x0a\x58\x26\x5f\x4a\x01\x60\xc3\x2f\x21\x56\x57\xf7\x0c\x75\x82\x0a\x57\xd2\x6a\xa5\x81\x21\xda\x17\x60\xa9\x34\x7f\x5e\xa3\x28\xb6\x32\x76\xbf\xde\xb8\x16\x5e\x1d\xb9\xe7\x56\xb0\xf3\x62\xaf\xd6\xc9\x78\x85\x8c\x3b\xe6\x6e\x02\xff\x44\x69\x9c\xed\x74\xa9\x79\x28\x6e\xbf\xd1\xb8\x19\xc1\x5f\x6f\x62\xc5\x52\x3b\x50\x48\x7e\x45\x6b\x2d\x66\xa2\x5a\xff\x68\xae\xfa\x36\xfd\x72\xb6\x30\x97\x0a\xe5\xb2\x42\x8e\xe1\xdd\xc9\xa0\x13\x62\x5a\x76\xa8\x8d\x71\xd8\x5e\x6b\x36\xd2\xa8\xd0\xb9\x9a\x95\xe7\xb8\xfc\x38\x20\xdb\xe1\xc0\xc4\xca\x00\xb9\xad\xf8\x5d\x56\xa4\x86\xaf\xf6\xaf\xf9\xfd\x2b\x4b\x07\x20\x13\x98\xd5\x6f\x0c\xba\x90\x31\x61\x7c\xc9\xd8\x5c\xdc\x63\x29\x32\x67\xbe\x30\x9a\xe0\x9d\x8c\x0b\x9e\xd8\xcd\x3e\x22\xa4\x36\xb4\x62\x80\x15\x48\xb3\x18\xb3\x21\x0a\xa9\xa7\x86\x25\x41\xa2\x43\x4a\x09\xe1\xce\x20\x8a\x11\xf7\x80\x09\xe4\x50\xbf\xf0\x93\x11\x4f\xd8\x81\x21\xa2\x24\x11\xee\x43\x1a\xd0\xf3\x0e\xf1\x9c\xbf\xbd\x7c\x09\xa8\x25\x82\xa7\x84\xca\x06\xa9\x8b\x53\xc1\x32\x73\xb2\x58\x9e\xc9\x39\x3b\xa8\x0f\xf1\xd0\xa2\x47\xd7\xbd\x5b\x17\x57\x97\x64\xf8\x70\x10\x58\xf7\x62\x34\x55\xea\x1d\x71\x18\x80\x65\x22\xe8\x3f\xd0\x65\x31\x2d\x52\x17\x32\x77\xb9\xec\x80\x3f\x92\x20\x2e\x5d\xa2\x26\x46\xea\xc9\x0c\x07\xf2\xbf\x49\xbd\x22\xae\xb5\x3d\xa9\x84\xa2\x85\x78\x2b\xbc\x30\x12\x9d\xe1\xe3\x19\x8b\xc5\xa8\x98\x4c\x28\x39\x7e\x2b\xb3\x46\xf5\xc6\x0a\x12\xc0\xaf\xbb\xe2\x20\xb8\xb6\x9b\xb2\x10\x6c\xed\xf1\x10\x5e\xe5\x20\x44\x4c\x1b\xf1\x0d\x77\x54\xde\xd0\x09\x34\x8d\x74\x91\xe4\x4d\xae\xd1\x68\xda\x18\x64\xbd\x45\xe3\xd4\xda\xe7\x3e\x00\xd2\xd0\x12\x04\x9d\xe1\xa1\xc5\x0f\x1b\xe2\x40\x86\x55\xdd\xcb\x07\xb8\xc3\x14\x1f\xa0\x66\x4b\x15\x52\x33\xf1\x7e\x2e\x22\xcc\x48\x80\xfb\x7e\x58\x7a\xb3\x86\x25\x98\x94\xc7\x31\xe8\x63\x38\x8a\x06\xe3\x1b\xe2\x07\xd0\x6a\x6f\xa4\x73\x30\xd0\x4e\xf9\x9d\x97\xca\xaf\xe5\x6f\x82\x40\x8e\x98\x4c\xe7\x45\x8e\xcd\x6d\x50\x30\x36\x72\xac\xcc\xbb\x17\x55\x16\x8b\x8c\x1d\x88\x7f\x1a\x76\xf0\x4e\xa6\x71\xb7\x74\xa8\x17\xd2\xff\x0b\xe1\x87\xcc\xfd\xee\xff\x02\x01\x28\x87\x8d\x25\xa0\x34\x11\x80\x47\x2d\x72\x9e\x0b\x9b\xcf\x0c\x87\x26\x4d\x55\x5e\x26\x67\x2c\x08\x11\x2d\x9a\xf2\x74\x22\xec\x7a\x38\xff\x84\x59\x7c\x99\x88\x34\x4f\x16\x84\xaf\xf7\x09\xb8\x2a\x91\x60\x83\xc0\xf0\x77\xcf\xd0\x0b\x58\x58\xf0\x9b\x23\x2f\x8d\x20\x9f\xf9\xd4\xa8\x40\x19\x27\x81\x5d\x5b\xaa\xf2\x1a\x8d\xb9\x4c\x8c\x06\x4f\x84\xd6\x47\x8b\xcb\xd0\xc7\xeb\x5b\xf6\x12\x43\x04\xb5\x48\x88\x18\x6d\x00\xa2\xd1\x4b\x03\x58\x00\x16\xbf\x66\x03\x23\xba\x36\xdd\x99\x8e\x0b\x07\x77\xe6\x7d\xd2\x48\x7d\x9e\x02\xef\x8d\x05\xc8\x11\x48\xbc\xf6\xed\x5c\xb1\xe1\x0d\xbe\x32\x34\xaf\xd3\xa0\x37\x7d\xf5\x7b\x1c\xca\x10\xd3\xda\x31\xc1\x1f\x11\xc6\xdc\x62\xa6\xee\x45\x52\x98\x86\x34\xbd\xbc\xc8\x52\xf0\x64\x59\x03\xd6\xe9\xf1\x71\x75\x81\xdc\x0b\x3e\xb8\x27\xc9\x13\x3a\xcf\x0a\x48\xa7\x27\x3d\x85\xda\xba\xcb\x53\xa4\x31\xdc\x22\x8f\x53\x58\x6c\x58\xc1\xce\xaf\x6f\xd4\xec\x9c\x2d\x33\x52\x73\x69\x68\xc5\x5c\x8a\xce\xd3\x59\xc5\xd8\x72\x7c\xa7\x90\xf1\xf0\x91\x77\x54\x45\xab\x5a\x1b\xc1\xb0\xdf\x1b\xed\x4e\x8a\xfb\x4d\xef\x33\xd3\x76\xf9\x6d\x56\x5b\xe3\xf5\xe0\xdb\x6d\xec\x42\x1b\x57\xf7\xa5\x86\x07\x64\xa5\xb2\x58\xbf\xd9\x42\x8a\x21\xcf\x71\x0c\xa2\xcc\xc0\x69\x9e\x8d\x0d\x78\x61\xe8\x20\x97\x6c\xb1\xd2\xa0\x1f\x54\x6e\xf1\x4e\x76\x52\x6a\xe3\x56\xae\x4b\xa4\x9b\x0c\xbe\x3c\xd0\xfb\x1b\x3d\x0d\x79\x0d\x1b\x7d\xb4\xee\xbf\x5b\x35\xe0\x71\x4c\x18\x34\x63\x6b\xf6\x7a\xa1\x92\x62\x96\xbe\x74\xcb\xba\x92\x25\xaf\x7c\xd3\x43\x3e\x87\xe0\xb3\x62\x96\xa2\xd9\x0c\x75\x3e\x40\xc3\x9d\x67\x12\xa1\xf8\x37\xc3\x4e\x83\x26\xdd\xce\x3f\xb4\x4a\xaf\x78\x3e\x0d\xda\x29\xca\xf1\x05\x2c\x14\xf6\x2f\xe4\x43\xd3\x62\xc6\x0d\x5d\xf1\x18\xf4\x49\xff\xb9\xe5\xe7\x38\xee\xa0\xd9\xd4\x9a\x8c\xea\x9f\xc1\xdf\x49\x1e\x50\x73\xf4\x14\xb0\x37\x73\x91\x1a\x8d\x17\xd2\xcb\x4a\xaa\x25\x42\x2f\xbf\x04\x82\xcf\x13\x33\xdf\x27\xcc\xeb\x09\x0c\x6b\x0e\x48\x6b\x9e\xc9\x19\xcf\x16\xbe\xb4\x41\x0b\x9c\x2b\xc6\xb5\x86\x98\xbf\x94\xd8\x9e\xb6\xcd\x16\x86\xc3\x52\x3b\xe9\x44\x61\x64\xb3\x80\x4b\x08\x68\xb1\x1e\x8f\x9b\x16\x23\xb0\xc1\xbc\xb9\xb8\x3c\xa2\xf1\xf7\x2a\xb1\xae\x47\xa3\x44\x8d\x8e\x66\x5c\xe7\x22\x3b\x22\xa2\xd4\x47\xa7\xfd\x63\xc3\xd8\x8c\x32\xd0\x03\xee\x86\x00\x46\x28\x08\x06\x97\xd2\x6d\x68\x63\x31\xed\x13\xba\x38\x00\x59\x98\xfd\xbf\x37\x6f\x5e\xb3\xb9\xf9\xf5\x00\xbc\x17\xe8\x81\x32\x8a\x05\xb3\x8a\xca\x61\x89\x15\x2d\xcc\x3d\x03\x9e\x2a\x3e\x31\x3a\x40\xce\x04\x54\xa7\xa8\x19\x84\x72\x65\x04\xd7\xb8\x88\x50\x4b\xc3\xcb\xa9\xbe\x3b\x41\x07\x79\xd0\x39\x0e\xda\x57\x88\xca\xe0\x41\xc9\xde\x96\x76\x3b\xcf\xa4\xca\x64\x1e\x48\x2b\xb4\x4f\xac\xc8\x89\x46\x4c\x22\x2a\xba\x44\xd1\x28\x72\x27\x98\x9c\xcd\x55\x06\x86\xa0\x1a\x4d\x83\x67\x88\x93\x7d\x17\x14\x3a\xdd\x67\x3f\xaa\x7b\x91\x91\x31\x95\xf2\x0f\x4b\x3b\xf0\x54\x4e\xa0\x48\x21\x7d\xbe\xcf\xf0\xc4\x53\xd8\x0a\xf9\x25\xd4\x4c\xe6\x04\xb3\x0d\xa6\x72\x23\xd4\x00\x58\xbe\x8e\x44\xca\x33\xa9\x7c\x71\x17\xed\x80\xdc\x75\xc9\x26\x90\xed\x08\x16\xed\x94\x1d\x6f\x64\xa9\xb5\x4d\x1a\x10\x6b\xe6\xa0\xe1\x0a\x6d\x7c\xf6\x3e\x0f\xfd\xef\xc1\xd6\x5c\x63\xcc\xf6\xc2\xd8\x86\x99\xbb\x7b\xb7\xbc\xa3\xa7\xea\xde\xb7\xe2\x96\xd8\x63\x76\xea\x54\xf7\xe6\x7a\x6d\x7e\x8b\x85\x33\x69\x30\xf0\x12\xe8\xa4\x81\x69\x4a\x4f\xbc\x6b\xc5\x8c\xa7\x76\x8c\x1d\xd1\x92\xd9\xc8\xda\x01\xed\x08\xfb\xec\x82\x2c\x1d\x28\x28\x9b\xe6\xe7\xac\xc7\x86\xaf\x55\x2a\x86\xe7\xc0\x7d\xed\xdb\x19\xba\x55\xad\x99\xc3\x08\x28\x4e\x53\xc0\x02\x34\xce\xe9\x96\x2b\x00\x47\x77\xa6\x11\x52\xe5\xa9\xaa\x6a\x75\x88\x7d\xf3\xb9\x7f\x47\xd3\xcb\xf0\x1c\xcc\xa0\x28\xcc\xa2\x7a\x8b\x35\x72\x14\x68\xb4\x36\x04\xd0\x1a\x6a\x72\xc5\x62\xd5\x54\xf6\xcb\x8a\x28\x9e\xab\x6f\x90\x32\x70\x98\x80\xc1\xa1\x24\x75\xbc\x90\x48\xf1\x74\x45\x55\xcc\x9a\xf6\x41\xb8\xce\xee\xc4\xdb\xf4\x5d\xaa\xee\xd3\xef\x31\x10\x0e\x0d\xe4\x54\x1a\xc5\xcc\x1a\xda\x7a\xdf\xf7\x06\xd7\x88\x2a\x2c\xd9\x19\xb5\x6a\xee\xab\x7d\xbd\x49\x66\x36\x7e\xd0\xb7\xd2\x60\xe3\x3e\x73\xa5\x90\xa0\xba\xc2\xd0\x12\xc7\xd0\x2b\x1a\xe2\xd6\x78\xf7\x02\x23\xf5\xec\x1d\xac\xdd\xca\x8b\xcd\xfe\x77\x28\xe1\x3d\x44\xb6\xf3\xa4\xba\x4a\xe0\xab\xa7\xa6\x55\x62\xb2\x10\xa3\xd1\xd5\x15\x2e\x4d\xfd\x7d\xc6\x2e\x73\x8d\x97\xa0\x05\x76\xb5\x18\xfc\x28\xed\x0c\x8a\xe3\xe3\xb3\xa8\x0f\x54\x06\x55\x5a\xcc\xdf\xa2\xef\xff\x0c\x90\xf8\xf4\x7b\x9b\x49\xd7\x6a\xfc\xbf\x2f\x8d\xdf\x4f\x08\xf8\x04\x30\xe1\x35\xbe\x6b\x9d\x6e\xf7\xdc\x5a\x9c\xcb\xab\xd5\xdc\x4a\xf3\xb9\xe0\xd9\xee\x35\xf0\x25\xdc\x66\x5d\xde\x1a\x59\x8c\xab\xb1\xb2\x3c\xca\x0b\x9e\x80\x35\xb9\x04\x9c\x5e\xc6\x02\x3f\xd9\x4c\x36\x4a\x4c\xdb\x11\x63\x6f\xa4\xaf\xed\xaa\xdf\xdd\x24\xb9\xed\x68\x34\x2f\x54\x1a\x3f\xf8\x1e\x73\x2f\x97\xbe\x21\xeb\xaa\x70\xca\x59\x91\x81\x74\x1b\xb9\xa6\x96\xe7\xcf\xd5\xda\x14\x6e\x32\x55\x10\xe1\x36\x6e\xa0\x84\xeb\xfc\x36\xe3\x10\xa2\xa5\xd2\xdb\x60\x04\x56\xb3\x0d\xc6\x0b\xe6\x36\x32\xab\x1c\x58\xee\x9a\x19\x59\xcf\x70\x44\x95\xba\x80\x60\x10\x26\x41\x2e\xdd\x45\xd4\x56\x77\x79\xc0\x9b\xf5\xbd\x94\x6a\x6f\xcf\xa9\xbd\xee\x19\x1e\xd5\x32\x30\x4e\x13\x14\x25\x4e\xcd\xcd\x63\x09\xde\x0e\xd7\xa1\x3b\x1b\x7f\xc7\xef\x62\xd4\x51\xd7\x2c\x40\xef\x5e\x65\x71\xb7\xe4\xec\x8c\xda\x79\xc6\x45\x5c\xbf\x27\x7a\xa3\xcf\xaf\xe3\x42\xf5\x30\xec\xca\x37\xe0\xde\x31\x97\xce\x2d\x94\xf5\xfb\x1e\x05\x6a\x92\xb5\xc3\x71\x79\x2b\xf5\xda\x3a\x56\x91\xf7\xa1\x5b\x50\x3a\x65\x1a\x25\x45\x2c\xd8\x2b\x9d\x73\x28\xe8\x24\xe2\x2e\x83\xe2\x75\x17\x51\x24\xe6\x39\xf9\x17\x6f\xc1\x73\xc9\xf3\xc7\x47\x3c\xac\x8b\xd1\xdb\xd1\xb1\x5f\x8b\x07\xbd\xe2\xbd\x2a\xbe\xe8\x52\x19\xb7\xcd\x85\xfd\xa2\xa4\xcb\x95\x58\xd1\x58\x34\xae\xf4\xb1\xae\xdb\xd4\x87\x87\x22\xec\x48\x12\x68\x33\x68\xbf\x48\x81\x79\xd3\x94\xd5\x5d\xe9\xde\x8f\x4b\x6c\xdd\xd1\x28\xe0\x3a\x78\x08\x33\x85\x17\x03\x39\x6a\x1a\x63\xa8\xb2\x3b\x22\xcb\x15\xd3\x5f\x89\xaa\x9b\x14\x19\x4f\x3a\x74\x4e\x9a\x81\x65\x3c\x17\x13\x95\x05\xd1\x6c\xcb\x67\x55\x66\x0f\x46\x03\x11\xfb\xea\x0c\x98\x7e\x6b\x6e\x80\x91\x48\x54\x3a\x81\x69\x60\x21\x8c\x27\x3c\x49\x9e\x1c\x96\x89\x74\xf3\x82\x2e\x53\x26\x53\x30\x6c\xc4\x52\x47\xea\x4e\x64\x0b\x16\xab\xa8\x80\xfc\x7b\x64\xa9\x10\xa5\x32\x5a\x38\x37\x0c\x24\xb7\x60\xc1\x05\x99\xde\x29\x82\xbb\x65\x50\xb4\x78\xf8\xae\x18\x89\x28\x4f\xb0\x0c\x63\x92\x0c\xb7\x43\x6a\x0c\xb3\x93\x77\xc4\x4e\x40\x2a\x11\x99\x2d\xc7\x61\x4b\x75\xfa\xca\x9d\x0d\xae\x4c\x55\x36\x03\xbc\xc2\x52\x68\x02\x9b\x9f\x4c\x27\x45\xc2\xb3\x3e\x6d\x68\xb9\x5e\x65\x98\x29\x96\x54\xb1\x65\x32\x90\x73\x51\x84\xdb\xd0\x7c\x72\x58\xfa\x77\xed\xd2\x61\x26\x4f\xe8\x4c\x9b\x5d\xfb\x7b\x70\x52\xf6\xc9\x9a\x89\xc1\xb6\x3b\xab\x67\x39\x4d\x1f\x2e\x71\xd0\xc1\x81\x99\x33\x36\xe8\x84\xbd\x30\x48\x88\x4d\x1f\x0c\xfc\x6e\xc7\x40\x7f\xf9\x49\x9a\xbe\x5f\x09\xce\x03\x7a\xf6\x82\xe6\x6a\x78\x1e\x63\x11\x16\x36\xc4\x23\x8c\xf6\x2e\xcf\xd2\x45\xbf\x90\xa4\x40\xbf\xf5\xfb\x7d\xfa\x1d\x87\x80\x3f\x0f\xfb\xec\xa7\x42\xe7\x6c\xc6\x73\xc2\xb2\xaa\xd4\x5e\x5a\x76\x41\x1e\x78\x86\x38\x36\xc4\x6e\xe1\x4c\xf7\xfd\xce\xfb\x8d\x91\x0d\x0f\xe9\x7b\x23\x01\x39\xdf\x89\xba\x17\x59\xc4\x75\x18\x88\x52\x4f\x55\x96\x3b\xbe\x53\x13\xa4\xdd\x33\x5c\x17\xf3\x27\xb1\x15\x2b\xb3\xdb\x95\xeb\x3a\x1b\xe3\xde\x8e\x21\x4e\x14\x06\x51\x1a\x22\x87\x70\x52\x66\x6b\xa6\xbb\xc1\x91\xb5\x47\x2a\xb0\x0a\xf4\xc4\x51\xb8\xfd\x3b\x44\x5f\x2b\x86\x53\xa1\x75\xf7\x73\x4c\xa7\xf1\x33\x38\xa2\x6a\x06\x8a\x07\x5c\x3b\x37\x4d\x8b\x15\xaf\xd9\xab\x64\x56\x39\x7b\xce\x60\xb5\xea\xba\x01\x62\xee\xa0\x2b\xd7\x88\x18\x3a\x52\xa0\xbd\x5b\xaf\xd1\xb2\xd0\xe6\xb0\x8c\x1f\xf9\xbe\x33\x94\xf1\xbd\x9f\xb4\xc8\x8d\x1c\x57\x52\xf4\x8b\xeb\x97\x7b\x08\x69\x59\xe6\x01\xfc\xd8\xa5\xd9\x36\x86\x8d\x85\x66\x89\xe6\xcc\x89\xc2\x1f\x1c\x9c\x15\x02\x32\x34\x9c\x59\x8f\xe4\x6a\xfd\x7e\xff\xd3\xb3\xab\x65\x6e\xfc\x00\x4b\x42\xee\x83\x3e\xc7\x45\x95\xb3\x1b\xe6\x02\x57\x4e\x95\x43\xd5\x57\xe8\x93\x99\x18\x91\xa9\x42\xe8\x40\xc0\x91\x17\x8a\x23\x08\xf9\xfb\x7c\x99\x8e\xe7\xae\x36\x2e\x3e\x2c\xd3\x47\xa0\x7c\x94\x03\x41\xa4\xad\xb0\x8e\x76\x52\x62\x7d\x64\x60\x41\xe4\x00\xfe\x3a\x02\x93\xa0\xe2\x0b\x36\x87\xd4\x73\xaf\x76\x6b\xa1\xed\xb8\xd6\x66\x94\x76\x24\x54\x4e\xbb\x6c\x90\x19\xf6\x77\xcf\x17\xba\xfc\x58\x1d\x89\xc3\x2b\x97\x2c\x53\x36\xe6\x77\x0a\x32\xc6\xe8\x44\xb2\xe1\xfb\x9e\x7d\xb5\x57\xe0\x9a\xf4\xf0\x6b\x43\x4c\x77\x29\x40\x70\x19\x82\x0f\xca\xb2\x86\x5f\xfe\xf4\x6b\x1f\xa7\xdb\x57\x38\xfb\x9f\xcf\x90\xab\x0d\xab\xf1\x04\x65\x4d\x0f\x57\xe5\x3a\xe7\xfa\x9d\x3e\xe2\x10\x75\xed\xd7\xfc\x00\x88\x0c\xd8\xe4\x9e\x3b\x52\xf5\x1f\x7a\x3e\x29\x7d\x33\xcf\x8a\x54\xa6\x93\x9e\x19\x55\xa1\xed\x34\xcc\x2f\xd5\x89\x2c\x89\x44\xf0\x32\xc4\x91\xf5\x35\xef\x24\xf3\xb3\x47\x1b\x7e\x61\x8a\x25\xac\x01\xb2\x08\xb1\x16\x5d\x8f\x29\xbc\xbd\x20\x14\xa4\x07\x9d\xc5\x21\x57\x3c\x1b\xbe\xc0\x37\x30\x38\x7c\xf8\xda\x41\x66\x86\xee\x2b\x8f\x41\x37\x06\xec\x42\x12\x6a\x19\x25\xe6\x8a\x34\x24\xea\x87\x2c\xac\xe4\x6f\xd6\x5c\x93\x3a\xb1\xa4\x8c\x3e\x9f\xcd\x0b\x2a\x25\x8d\x69\x19\x32\xa5\x13\x42\xc4\xee\x3e\x62\x5e\x33\x23\x08\x88\x2b\xae\x2e\xb4\xbb\x20\x50\xf5\x87\x52\xf3\x86\x28\x7a\x46\x32\x19\x74\xa0\x12\x1d\x22\xbc\x1b\xd1\x85\x8f\xd4\x1d\xc0\x8a\x56\x5b\xd5\x7a\xd1\x5d\x3f\xe3\x2b\xc3\x38\x9e\x44\xbc\x97\x91\x9a\x64\x7c\x3e\x45\x70\xf2\x3e\x1b\x74\xfe\xde\xec\x43\x33\x9d\xf3\x8c\x92\x52\x38\x1b\x74\xee\xcc\x28\x20\xf9\x92\x43\x01\x4a\xda\x3e\xc0\xe8\xa1\x04\xcc\x03\x48\x05\xe1\xff\x50\x99\xed\xe5\x90\x5e\xb1\x91\x70\xc9\x82\xac\xa4\x30\xcb\x41\x07\xe0\x71\x06\x1d\x43\x21\x83\xce\x48\xe4\xe6\xdf\x98\x74\x82\xa1\x14\x95\x8e\x65\xea\x75\x0c\x77\x8f\xc6\x3a\xd9\x1a\xd3\x40\xc7\x32\xd3\x90\x01\xff\xc3\x05\x8a\x6f\x46\xa1\xcb\xb9\xfd\x37\x7c\x8b\x1d\x60\x4d\x93\x1f\x2e\x50\x41\xac\x64\x80\xa4\x46\x38\x1c\x8f\xe5\x7b\x2a\x77\xaf\xf1\x7d\x95\xe1\xbb\x87\x5d\x9b\xab\x96\x82\x48\x09\x21\x54\x98\x95\xed\x4d\x99\x66\x5c\x19\x2d\x56\x35\xc1\xc4\x46\x3b\x5a\x4b\x93\x76\xbd\xcf\xd9\xdd\xc9\x71\x97\xdd\x9d\x76\xd9\xdd\x89\xf9\x1f\xe4\x32\xc3\x5f\xc7\xe6\x5f\x67\x5d\x76\x77\x06\xe9\xcd\xe6\xa7\x53\x18\x11\xb6\x83\x7f\x9e\x76\xd9\x58\xa9\x13\xfc\xef\xf1\x23\x72\x6e\x76\x74\x1f\xfd\x5c\xc6\x46\xec\xcf\xa2\xe2\x89\x36\x7b\xb3\x8f\xec\xa1\xe3\x9f\xf7\x19\xd7\xb1\x1e\x48\x66\xf5\x9b\x35\xbb\xce\xa6\x8e\xd4\x35\x59\x16\xe4\x74\x58\xa2\xfa\x55\x1e\x33\x5b\xf6\x96\x4c\x4a\xae\x8e\x31\x78\x76\x01\xea\xc2\x1c\x3a\xcb\x88\xd1\xde\xe4\x71\xd4\xdb\xa9\x58\xd8\x80\x44\xaf\x42\xe6\x94\xa7\x5e\xaf\x12\x23\x94\x3f\x83\x7c\xe6\x5c\x35\xe1\x8c\x48\x7a\xe6\x76\x81\x36\xc0\x5c\xdd\x73\x9e\xe5\x32\x02\x65\x90\x9b\xc1\xe7\x36\xe4\x6e\xed\xae\x7c\x26\x1e\x50\xfa\x68\x41\xe7\xcd\x55\x26\xe2\x9f\x97\x5e\xda\xd5\xe7\xc0\x1f\x11\x46\xce\xbf\xad\xab\x9f\x22\xea\xb8\x37\x1c\x5d\x40\x41\x66\xc2\x14\x33\xd2\x5f\xc6\xa3\x77\x64\x33\xd7\xc2\xbb\x8d\x31\x61\x9a\xb3\x99\xc3\x56\x83\x68\x62\x88\x4e\x87\x21\x94\x6d\x65\x0a\xc5\xc1\x50\xcf\x71\x92\xe4\xac\xc0\x14\x64\xad\x2a\xbd\x80\x7d\x5b\x25\x09\x81\xec\x99\x45\xd0\xd3\x4a\x8b\xd2\x17\xeb\xee\x9d\x03\x91\x6a\x84\x00\x49\x15\x53\x49\x5c\xc1\x0d\x4f\xc4\x18\x42\xb9\x49\x46\xf6\xef\x9f\x4c\xcc\x14\xa5\x94\x66\x42\xbb\x42\x30\x6e\xe4\x64\xe7\xa7\x92\xb5\x4e\x90\x41\x7f\x00\xd9\xf3\xb1\x0f\x72\x19\x57\x05\xdb\xa1\x91\x1c\xb0\xbc\xc6\x02\x4b\xed\xa1\x94\x6f\xfb\xdb\x59\xa9\xd8\x9d\x47\x03\xec\xed\x1e\xd8\x0b\xb3\xfe\x79\xdb\xd0\xdc\xc6\xab\x95\x4c\x38\x97\x75\xaa\x32\x6b\x59\xd8\x20\xb1\x02\xe5\xd5\x0e\x9e\x50\x3e\x09\x21\xd6\x79\xa0\x47\xe0\x3f\xa4\xe0\xef\x00\x27\x5f\xd2\xd2\xcf\x07\x29\x23\x56\x23\x7a\xe8\x00\xa3\x64\xca\x6e\xe1\x6c\xa9\x22\x9f\x17\xf9\x5a\x25\x0a\xaa\x80\x8b\x34\x12\x47\x50\xf8\x1b\x94\x27\xf2\x21\x99\x1b\x45\x1f\x7d\x93\x89\x48\x48\x50\x86\x9c\x36\xd5\xe3\xba\x97\x63\x79\x76\x5f\x23\x32\xa2\x78\xaa\xdc\x98\x40\xb0\xb4\x3a\x6e\x17\xf2\x0f\xd2\x49\x62\xa3\xf6\xcd\x85\x33\x4f\xf8\xc2\xc1\x4a\x4d\x4a\x5f\x7c\x53\x13\x82\xea\x36\x9f\x89\x1d\x37\x72\x7a\x3e\xae\x4d\x5b\xf0\x15\x12\xf3\x1b\x95\xa5\xfa\xef\xff\xfa\x3f\x77\x27\xff\xfd\x5f\xff\xb7\x0b\xff\x3a\x05\x59\x14\xfe\x14\x79\xb4\xa9\x29\x08\xdd\x03\x36\x8c\x3a\xdf\xda\xe0\x0d\xe9\xfe\x43\xec\x12\xe2\x7d\x8d\x62\x1e\x36\x35\x2f\x39\x4f\x64\x9e\xa8\x26\x9f\xd1\x8f\x20\x53\x18\x9a\xa0\x4a\x5b\x20\xce\x93\x7a\x8d\xcc\x37\x46\xab\x2a\xc1\xfe\x54\x66\x13\xde\xfe\x7d\x4b\x18\x3f\xbb\x91\xc2\xa4\xf1\x28\x37\x27\x8d\x7b\x00\x2a\xcf\x38\xe1\x13\xc4\x19\x95\xe9\xe4\x28\x96\x1a\xff\x55\x9d\x0c\xdc\x09\x28\x68\x59\x75\x56\x72\x74\x3d\x5f\x5c\x5d\xea\xb0\xf5\x80\xd8\x47\xf0\x66\xf7\xc2\x7f\xac\xf7\xcd\x69\xab\xce\x52\x04\xeb\x5f\x37\x12\x35\x88\xca\xb7\x1a\xdd\x82\x36\x67\x4d\xe0\xc2\xc3\xbb\xad\x68\x76\xd4\xfe\x5f\x6b\xd4\xe2\x0f\xbe\x18\x65\x3e\x56\x54\x6d\x06\xde\x53\x67\x0f\xbc\x87\xb0\x67\xff\x49\x88\x1e\x96\x19\x48\xa6\xfc\x6e\xef\xc4\x71\xe3\x4f\x6a\xbf\x8a\x58\x8d\xc9\xec\xec\xae\xac\x4c\x61\x67\xbd\x7a\xa7\x66\x87\xf7\xba\x37\xd6\x9b\x88\x27\xab\x11\x5a\x56\xbe\xe9\x7c\x07\x94\x0e\x61\x9d\xea\x86\x53\x99\xc7\x1e\xd5\xe1\x65\x5f\x15\x8b\x37\x09\x8c\xbf\x16\xf3\x44\x46\x5c\x43\xea\x9d\x0d\x6f\xab\xfc\x18\x88\x5b\x1c\x89\xc4\xd6\x44\x0b\xa7\xec\x35\x9a\x54\x22\x9d\xca\xdc\x3d\xb2\xe0\x82\xfe\xd2\x48\xc6\x03\x44\x33\x87\x7b\x00\x07\x1e\x57\x65\x88\xa3\xec\x6b\xfa\xc0\xb0\xcf\xde\xa4\xc9\xa2\xec\x57\xc3\x71\xb7\xc5\xad\xab\x59\x81\x64\x25\x06\xb3\x95\xe7\xb3\xc4\x97\x61\xa8\xe4\xad\x70\xe0\x16\x0a\xfe\x98\x8b\x68\x58\xb6\xa7\xfc\x92\x7b\x95\xbd\x43\xd6\xf2\x6f\x2a\x93\xbf\xa9\x34\xe7\xc9\x95\x8a\x2f\x8a\x5c\xc1\x0e\x65\xbe\xce\x00\x81\x36\x16\xbc\x4d\x6a\x6f\x19\x9c\xef\xce\x9a\xc4\xf0\x85\x03\x23\xa1\x73\x82\x6f\x7c\xcf\xec\x74\x19\xe2\x5d\xd8\xf4\xc6\x12\x6b\xdb\xf7\x83\xc3\x0e\x94\xaf\x48\x67\x53\x1c\xab\x6c\x16\x8c\xd6\xd9\xa3\x71\xfa\x1b\x58\x8c\x9e\x4f\xae\x68\xf0\x74\x95\x7b\x31\x54\xc0\x0a\x07\x36\x2b\x90\x68\x24\x74\xa1\x76\x31\xa8\xa0\x4e\x09\xd4\x11\xbd\x33\x3c\x82\x0f\x0f\x2b\x07\x05\xec\xa7\x74\x81\xdb\xa0\x38\x2c\x35\x8c\x2b\x14\x16\x23\xea\x47\x25\x18\x48\xef\xb7\xd8\x31\xc5\x1b\xb5\x2c\xa3\xee\xf7\x45\xef\x48\xe2\x3b\xda\x99\xa5\x4b\x4f\x68\x2f\x0e\xad\x45\xa5\xec\x87\x57\xb7\x2b\x82\x6d\xd7\xac\x7b\xa3\xcd\x5e\x78\xcd\xbe\xd7\x1e\x79\xcd\xce\x56\xbf\x3e\xea\x07\x9c\x8b\xe3\xcf\x10\x1d\xe0\x5f\x80\x5b\x1a\x30\x1b\xaf\xae\xb8\x3c\xf1\xf9\xba\xdb\x93\x95\xd0\xda\x2e\xa4\xb2\xc4\xde\x2c\xef\x87\x30\x89\x55\x7b\xeb\x63\x01\x54\x28\x7f\xfa\x27\x0a\x5b\x31\x1c\xfb\x68\xc9\x58\x42\x1a\xe4\x9f\xd8\xd5\xdb\x5b\x3f\x2a\x13\x5a\x85\x7a\xc8\xf9\x3b\x11\xa0\x72\x14\x02\x50\x83\x41\x54\x2e\x4a\x6c\xa5\xfc\x80\x45\x0e\xa8\x81\xe2\xbd\x51\x9a\x2b\x2b\x95\xf3\xf4\x37\x8e\x03\x38\xba\x7a\x73\x73\x7b\x74\x75\x71\xfb\xe2\xdf\x1a\x63\x69\xe8\xbc\x8d\x8f\x34\x3a\x6d\x88\x28\x9f\x8e\xc2\x1e\x46\x5c\xba\xc2\x5e\x68\x2e\x10\x1f\x57\x17\xc9\xf4\xa6\x32\x59\x2d\xfd\xd9\xca\x8c\x75\x85\xd5\x74\x5f\xb5\xca\xd7\xd7\x9b\x54\x28\xa4\x74\x1e\x3e\xe6\xc0\xea\x90\x07\x43\x62\xfc\x90\x93\xb0\x62\xd4\xc0\xbb\x93\x21\xf1\x3d\x8a\x2f\xff\x74\x9a\x09\x8a\xca\xdb\xe6\x79\xad\x5f\x01\x3a\xa4\xde\x12\xd0\x59\xa4\x1a\x1b\xe7\xec\xa4\xbf\x96\x90\x2d\xd8\x86\x0b\x97\x0e\x53\xf6\xd0\x7d\x0d\x0f\x0c\xe9\x7e\x36\x56\xff\x74\xfd\x87\x82\x03\x5e\x75\x58\x15\xb9\xe0\xc9\xad\xb1\x7a\x04\x9f\x70\x37\xf7\x9f\xea\xd6\xa0\x9d\x3d\xde\x42\x3b\xd4\x0e\x3d\x9d\x73\x63\xf6\x53\xbe\x53\x8d\x67\x2e\xed\x53\x6c\x26\xf2\xa9\x8a\x1f\xc8\x72\x6a\x51\x2b\x01\x40\xdd\x6a\x03\x6b\x1d\xb4\xb1\x3e\x77\x67\xd6\x74\x96\x2b\x08\xff\xad\x1a\xcf\x08\x11\x10\xec\x67\xbb\xa7\x41\x73\xfd\xe2\xb0\xae\x32\x35\xdf\x35\xcd\xd5\x7b\x7f\x14\x25\xbc\x22\x30\x87\x97\x14\x9d\xba\x96\x0c\x82\x2f\x58\xdf\x95\xb5\x7a\x03\x68\xbd\x87\x14\x51\x11\x24\x60\x00\xb1\x88\x5d\x44\xec\x86\x88\xf6\x35\x14\xa5\x86\x68\x5e\x64\x49\xd0\xcd\xb3\xeb\xdb\xdb\xac\xff\xaa\x15\x02\xe1\xcb\xc7\x23\x48\x17\x48\x79\x28\x96\x81\xd8\x6b\x83\x44\x10\x88\x05\x8c\xd1\x16\x34\xfc\x9c\x8d\x94\x4a\xba\x4c\xa6\xf9\xf3\xa7\x5d\x36\x4e\x14\x87\x7f\xe0\x84\xba\xec\x97\x5f\xc1\x7d\x31\xe6\x91\xf8\xcf\x8f\x5d\x36\xe3\xf3\x5f\xf0\x91\xff\x3b\xd0\x77\x2a\x93\xfe\xee\x85\x97\x3a\xf9\xad\x59\x09\xaf\x29\x72\x0a\xf3\x63\x8f\x0e\x2d\x06\xeb\x18\x6a\xa9\x16\x2b\x7d\x99\xf1\x71\xce\x9e\xb2\x83\x69\x9e\xcf\xcf\x8f\x8e\xfe\xa1\x55\xda\xb3\xf1\x6c\xd9\xe4\xe8\x70\x3d\xb5\xe0\x89\x0e\x90\xc9\xbf\x94\xf6\xf7\xc6\xb3\xd2\x03\x74\xb9\x1f\x0f\x48\x6d\x45\xde\x64\x7f\x53\x2a\xa9\x7e\xf9\x2a\x30\x8d\xfd\x7f\x3e\x49\xde\xf8\xcb\xb5\x67\x47\x50\x93\x41\x76\x3b\x3c\x5d\x7c\xee\x21\x90\xaa\x19\xc2\x68\x43\x1d\x14\x08\xd8\xfe\x51\x62\x71\x19\x65\x18\x6d\xe9\x95\xb8\x54\x17\xea\x4e\x81\x73\x1c\xa3\xb6\xa8\x60\x9a\xa7\x42\x37\x3c\xa9\xf6\x25\xdb\x74\xc2\x73\x51\xe9\x6d\x4b\x88\x9c\xfd\x5c\x71\x1d\x5c\x32\xdb\x99\xb7\x77\x6b\x8b\xd2\x7c\x8a\xbd\xf4\x99\xde\x17\x32\xb2\x37\x19\x56\x5f\xb9\x00\xda\xc6\x61\xae\xbe\xd4\x44\x5a\xcc\x3e\xed\xa1\x80\x61\x51\x48\xe0\xbe\xbe\x60\x3e\x10\x25\x85\x96\x77\x82\x0a\x8c\x78\x73\xf4\x7c\x5f\x65\x2b\x99\xae\x6a\xe5\x44\x92\x3d\xac\x49\x58\x42\xda\x14\x69\xd1\x93\x47\xe9\x77\x32\xe9\xda\x1c\x7b\xfa\x19\x85\x00\x0b\x4c\x8e\x26\x7a\x77\x39\xfa\x4d\x48\x86\x15\xf1\xf9\x20\x1d\xa4\x3d\x36\xd2\x2a\x45\xa2\x96\xf1\xb9\x61\x31\xda\x25\x15\xb3\xcb\x97\x54\x48\x89\xb3\xd3\xa7\x46\x57\xcb\x78\x94\x8b\x4c\xb3\xa9\x78\x6f\x8d\xef\x3d\x56\x64\xf2\xdc\x0c\xf5\xed\xf5\x25\xe3\x9a\xcd\x79\x46\xa9\x49\x3f\xa8\x84\xa7\x13\x96\x8a\xfc\xa8\xc8\x92\xfe\x95\x79\x40\x48\xa1\xa6\x6d\x8f\x89\x19\x97\x09\xbc\x0b\xff\x62\x3c\x8e\x33\xa1\xf5\xd2\x5e\x4c\x23\xec\xe6\x82\x5a\xf6\xd8\x54\x69\xc8\x63\x32\x63\x47\x29\xa9\x96\x5c\x0e\x55\x5b\x52\x76\x09\xd9\xe1\x22\x87\x17\xc8\xf9\xcf\xb5\x5f\x91\xf3\xfa\xfb\x17\xec\xe4\xf8\xcc\x88\x4a\x54\x50\xfa\xac\x7f\xc2\x7e\xb9\xfe\xfe\x85\xf9\xf5\xd7\x3e\xeb\x31\x39\xbf\x7b\x0a\xe3\xbd\xbc\xba\x7b\xca\x2e\xaf\x96\x8d\x14\x07\x79\x79\x85\xaf\x3c\xb7\xaf\x3c\xdf\xec\x95\x48\xc6\x99\x99\xce\x8b\xcb\x97\xd7\xab\x9b\x43\x8b\x1e\x9b\xf1\xc8\xb4\xff\xe9\xe2\xc5\xba\x25\xc4\xd7\x4c\xc3\x1e\x2b\x0a\xd8\xf1\x94\xbd\x7d\x7b\xf9\x92\xa2\x11\x51\x0c\x2f\xe6\x73\xcc\xaa\xf2\x97\x07\x23\xb2\x26\xe2\x3d\x3b\xf8\x4e\x1e\xfe\xc7\x2f\xc7\xbd\x6f\x79\x6f\xfc\xeb\x7f\xfe\xe5\x63\xef\x3b\xf7\xc7\xd3\xcd\xfe\x38\x39\xfd\xf8\x2f\x34\x82\x33\x37\x84\xb3\x1d\x8e\xe1\xcc\xfd\x75\xb6\xc9\x20\x9e\xba\x41\x3c\xdd\xe1\x20\x9e\x56\x07\xf1\x97\x6f\xf9\xe8\xd7\xf0\xb8\xbc\xa1\x3c\x73\x43\x79\xb6\xc3\xa1\x3c\xdb\x76\x28\x52\x8f\x52\x24\xdb\x9b\xbf\xbd\x3e\x39\x66\x2a\xc3\x7f\x9d\xd9\xc8\x75\x3a\xfe\x90\x5f\x38\xe8\x1c\x9f\x9d\x9e\xfc\xf9\xd9\xc9\xf1\xd3\x33\x1b\xf3\xfe\xed\x9f\xff\xd2\x73\xbf\x9e\x0c\x3a\xd4\xe7\xc9\xb1\xdf\xeb\xfa\xbe\xe8\xad\xb3\xf2\xad\x25\x23\x08\x7c\x2f\xca\x44\x2c\xf3\x88\x67\xc0\xd8\xf0\x2f\x66\xfe\xb4\x3d\x04\x57\xf2\x3f\x0e\xbe\x3b\x87\x9d\x83\xb5\x38\xf8\xee\x1c\xff\x7d\xf6\xf1\xf0\xbb\x0f\xcf\x7e\x39\xe9\x3d\xfb\x95\x1e\x3e\xfd\xf8\xe1\xf9\xc1\x77\xe7\xc7\x27\x27\x1f\x60\x79\xf1\xf7\x43\xf7\xea\x87\xb3\x5f\x9e\xfe\xd9\x36\x3e\xfb\xf8\xe1\xcc\x34\xfe\xe5\xb8\xf7\xec\xd7\x0f\xbf\x3c\xff\x4b\xb5\xf5\xc9\xc7\x0f\x07\xdf\x9d\x9f\x9e\x9c\x9d\x7c\x38\xf9\xcb\xf1\xf1\x87\xb3\x67\x83\x41\x6c\xbe\x69\xfe\xdf\xc9\xc9\xc7\xc3\x7f\x29\x0b\x12\xa6\x2a\x65\xb1\x9c\x98\xb9\x94\x1c\x79\x26\xdf\x63\x94\x59\x8f\x69\x6d\x76\x8e\xbd\xed\xdf\xf4\x99\x56\x91\xe4\x89\x61\x68\x05\x20\x91\xd2\xc4\xcb\xab\xc1\x9b\x37\x7e\xf1\x97\x1e\xfb\xf5\x3b\xf3\xcf\xd3\xf2\x9f\x4f\x81\x24\xa6\xe2\x7d\xa4\x12\x95\xc1\x56\x4c\xc5\x7b\x1e\x8b\x48\xce\x30\xd8\x0d\x6a\xd6\xc4\xc2\x6e\xc6\x37\xdf\xc3\xff\x9d\x87\x3f\xf4\xcd\x77\x07\x44\x6e\x17\xbd\xef\xcd\xca\x7e\xf0\xff\x7c\x6e\x26\xdb\x63\xd9\x64\x54\x7e\xed\xfa\x87\xbf\x35\xbe\x92\x4d\x46\xf6\x73\xd9\x64\x74\x70\xfa\xec\x59\x97\xfe\xf7\x2d\xec\xfe\x68\x91\x8b\x73\x36\xe2\x5a\x3c\x7f\x0a\x35\xde\x62\xb3\xd3\x32\xe5\xd9\x82\x41\x6e\x55\x0f\x0a\x34\xde\x2b\x20\x8f\x74\xe1\xf2\xac\xdd\xc5\x66\xae\x49\xb3\x92\x31\x46\x2b\xfb\xd4\x76\x7a\x7c\xfc\xbc\x77\x7c\xd2\x3b\x3e\x1d\x74\x6a\xd7\xc8\xb8\x48\x92\x1e\xbc\x22\x53\x73\xa7\x9c\x9d\x9d\x7d\x6b\x3a\x2b\x30\x56\x16\x3a\xa4\x7f\xd7\x3b\x3d\x65\xa9\xc6\xfe\x1a\xbc\x1b\x4a\x14\x00\xf3\x7e\x69\x5f\x86\xd5\x98\xcd\x79\x2e\x47\x89\x40\xf2\xb8\x89\x78\xe2\x75\x4f\x12\x03\xce\xc4\xf4\xe0\x66\x03\x60\x4b\xf5\x29\x9d\x3c\xed\x9d\x9c\xf6\x4e\x9e\xdd\x9e\x7c\x7b\x7e\x76\x7c\x7e\x7a\xdc\x3f\x3e\x3e\xfe\xdf\x8d\x09\x9a\x0e\x7a\xd0\x41\x39\xc1\xa0\xaf\x13\x6b\x4a\x2c\xc7\x3d\xd9\xb3\xa8\x4c\x42\x72\xb7\x33\xe3\xef\x2f\x6b\x41\xbc\x61\xe0\xdd\xe7\x4f\xa9\xf9\x8f\x22\x9d\xa0\x67\x76\xb3\xf6\xc1\x8a\x99\x6b\xde\xa9\xc9\xa3\x78\x32\xfd\xc6\xb1\x2a\x46\xe8\x3f\x98\xc9\x74\xab\x09\xc8\x74\xbb\x09\xc8\x74\xfb\x09\x34\x04\xea\x95\x13\xa0\x82\x78\x15\x05\x7d\xd5\x0b\xa9\xca\x3f\x81\x9a\xd7\xed\xa4\x45\x92\xf0\x11\x2a\x2a\x4d\xc5\x40\xa5\xe2\x73\x9b\x14\xe6\x3c\x37\x72\x6b\xf0\x20\xd1\xb3\xe0\xde\x7d\x01\x1a\xf4\xfc\x0b\x1d\x57\x19\x2f\xb6\x7c\x63\x9b\xc0\x06\xb9\xcc\x2b\x64\xd2\x04\x34\x6b\x1a\x94\x01\xb3\xad\x7e\x72\x3d\xfa\x7a\xef\x47\x20\x89\xd9\x48\xc4\xb1\x88\x5d\xb8\x51\x53\x33\x5c\xdd\xde\xf3\xe2\xda\xc2\xe5\x18\x21\x81\xc5\x61\xa9\xb9\x5f\xab\xce\x96\xbe\x79\x43\x5e\x74\xb8\x43\x6e\x17\x73\xf1\x93\xa0\xe4\xe4\x12\xec\x10\x75\x4a\x80\x66\xb3\xb1\x5d\xd6\x09\x88\x18\x2b\x5e\xad\xad\x71\x91\x81\x0f\x2f\x13\x66\x31\xa2\x9c\x02\x92\x68\x00\xf6\x35\xcc\x85\xae\x81\x4f\x57\x32\x9f\x9d\xae\xca\x78\x91\xab\x19\xcf\x6d\x62\x67\x65\x21\x96\x64\x37\xd7\xc6\x34\x12\x10\x51\xdd\x65\xa3\x22\x67\xb1\x12\x1a\x92\x45\xb0\x7c\x19\x3c\x95\xbe\x5f\xd1\xbc\x8c\x05\xae\xcb\x6c\xf0\x83\x62\x6e\x9a\xd6\x87\x5d\xa6\x73\x1f\x86\x03\x70\x2b\x83\x95\x69\xde\x53\x59\x8f\x88\x64\xf5\x0e\x57\xda\x7a\x79\x06\xb4\xbf\x0e\x8e\x46\x6a\x57\xf1\xaf\xc4\xcd\x87\x5a\xa5\xd6\x56\x60\x0b\x8e\x52\x58\x79\x17\x09\x62\x9e\x2f\x98\xc3\x93\xa7\x95\x82\x3c\x1c\xf3\x1b\xd7\x2c\x9a\xca\x24\x46\x70\xb6\xc5\x9b\x31\xa0\x04\x89\xcc\x02\xe1\x8f\x3d\xd9\x4e\xa5\x2e\x47\xa0\xfc\x91\xb8\x93\x06\x3b\xc3\xc9\x21\x76\x72\x3e\x48\x19\x63\x3d\xf8\xc4\xb9\x1d\x6b\xe5\x37\x1c\xf2\x20\x3d\x3d\x64\x60\x54\xb6\x6f\x78\xaf\x87\x3b\x68\x76\x01\x3f\xf5\xfb\x7d\xf6\x9b\xc8\x94\x59\x90\x99\xca\xc4\xfa\x2d\x4a\xa4\xce\x7b\x33\x3e\xef\xbd\x13\x8b\x80\xd3\x7e\x79\x5b\x5b\x51\x0e\xab\x31\x63\xdc\x94\x2b\x7d\xd7\x7c\x0d\x96\x79\x38\xe3\xf3\xa1\x91\xaa\x28\xf6\xda\x8a\xca\xd0\x1f\x44\x8d\xbb\x72\x7a\xb1\x78\x6f\x57\x79\xc6\xe7\x7d\xb3\xac\x00\x04\x90\xf3\x09\x82\x4e\xdb\x72\xd9\xb6\x58\x2e\x26\x9a\x01\xb5\xb8\x32\x7d\x83\xc0\xf8\xcd\x40\x06\x1d\xe6\x38\xa7\x0d\x05\x1d\x74\x66\x7c\x3e\xe8\xf4\xd9\x45\xa2\x55\xb7\xe4\x28\xda\x3b\x14\x0e\x8b\xa8\x44\x41\xf2\x42\x3f\x8d\x38\x9a\xc1\xae\xc4\x14\x00\x6a\x73\x09\x80\xb4\x30\xea\xb3\xc8\x04\x3b\x48\x15\x4b\x85\xb6\x96\x6e\xe7\xcc\x3a\xa4\x69\x0a\x56\xde\x26\xde\xd7\xe1\x53\x44\xfb\x90\xf7\x45\xf0\xe9\x2a\xc3\x19\xd7\x8c\xed\x5d\x33\x2b\xc8\x4b\x33\x8b\xa1\x74\xa5\x57\xc3\x70\xc8\x70\x84\x36\xa3\x24\x21\x14\x3e\xc3\xc0\xb7\x43\xc1\x09\xaf\xf1\x26\xb4\x84\x67\xaf\x49\x47\x1e\x57\xb5\x09\x1e\x4c\x42\xd0\xc5\x5c\x25\x6a\x62\x8b\xa7\x97\x7b\x58\x29\xa0\x5e\xa5\x08\x0b\x8c\x08\x4b\x74\xc6\xe6\x4a\x6b\x50\x21\x70\x73\xed\x79\x1d\xf2\x5c\xcd\x64\x34\x3c\x2f\x81\x06\x80\x7d\x08\x64\xc8\xba\x4c\x1c\xc2\x9a\xec\x5d\x54\x24\xec\xae\xf7\xe9\x50\x5e\x40\x2f\xf4\x65\x5b\xe9\xce\xbc\x91\x89\x64\xc1\x32\x31\x4f\x78\x64\x73\x23\x1c\x0e\x5f\x75\x2e\xd4\x13\x65\xbe\xba\x52\xd0\xe9\xc2\x21\x85\xc2\xe8\x0e\x90\x9c\xba\x34\x80\xae\x39\xfa\x86\x7e\x4e\x0f\xd9\x50\x8b\x7c\x68\x99\xc7\x8d\xc8\x4b\xe8\x02\xed\x95\xec\x77\x17\x82\xab\xdf\x8c\x58\x8c\xd5\xf2\x95\xe4\x7f\x7d\xc5\xa3\x29\x75\x88\x5c\xb8\x4e\xf6\xdd\x12\xd3\x12\x7b\xa8\x6c\xb6\xe1\x19\xc8\x00\x68\x99\x81\x61\xdb\xa9\x7a\xbc\x63\x19\xdf\xa0\xd7\xfa\x83\xf4\xec\x10\xb9\x88\x9d\x1f\x7a\x86\x69\xab\x33\xd2\x96\x67\x7c\x4e\x15\x37\x51\x36\x90\x19\x13\x89\x00\x3c\x29\x7b\x54\x52\x95\xf6\x90\xcb\xbc\x13\x0b\xea\xcb\xe6\x22\xdb\x5a\x3b\xe6\xd5\x59\x9f\xbd\x41\x5c\x08\x0f\x94\x84\x15\x73\x08\xd9\xc8\x28\x77\xc5\x7c\xd0\x70\x26\xbb\x77\x21\x6a\xe4\x5e\x75\x50\x37\x18\xc3\x20\x60\x57\x51\x4a\x18\xa4\x3e\xdc\x13\x4e\x1a\x8f\xa7\x59\xa2\x30\xca\x5a\x70\xa1\xd7\x1c\x3e\xb7\x1f\x95\xb3\x47\xdb\xb7\x83\xc3\x07\xf4\x6d\x2f\x5b\xea\xb6\x72\x0e\x4f\x97\x9e\xc3\x49\xc6\xd3\x22\xe1\x59\x6d\x83\x61\x47\xcb\xf4\x71\xfc\xfb\xe0\x9d\x58\xf4\x90\x1e\xe7\x5c\x66\xfa\x10\x3e\x02\x95\x81\x48\x2a\x02\x37\x41\x6a\xbd\x5b\x39\x75\x09\x59\x51\xd0\x0c\xa3\xaf\x0e\x20\x3f\x36\x32\x62\x82\xf9\x71\x64\x3e\x97\xca\x79\x91\x70\x8a\x17\xd5\x62\xce\x33\x9e\xc3\xd7\x55\xa6\x4b\x24\x41\xea\x90\x12\x84\x80\xf7\x8e\xc4\x94\xdf\x49\x55\x64\x8e\xaf\x9a\xb1\xd2\xc9\xdc\x29\x97\x81\x35\xd8\x90\xc9\xac\xa5\x9c\x25\x72\xe5\x1a\x42\x5a\x26\x8d\xea\x5c\xcd\x4b\x10\x2a\xaa\x16\x16\x8b\x48\x41\xf9\x4b\x9d\x8b\x39\x6e\x02\x05\x15\x6d\x08\x4d\xe4\x45\x24\x51\x78\x03\xee\x03\x1f\x8f\x21\xd9\x9a\x7a\xc9\x44\x54\x64\x5a\xde\x89\x64\x81\x02\xb0\xbe\x97\x79\x34\x15\x9a\x8d\xa0\xd8\xb5\x22\x84\x44\xf7\xf5\x72\xcb\xe4\x18\x2e\x66\x11\xfb\x77\xa5\xd9\xc6\x80\xfe\x56\x4d\x2d\x75\x05\x7e\xfd\x81\x01\x49\xb9\x0b\x1b\xc0\x87\x7c\x07\x78\x1f\x11\xa4\x41\xfc\x56\xd9\x48\xc6\xb1\x48\x43\x52\xf5\x4e\x03\xa2\xc2\x1e\xba\xc7\x46\xf8\xec\x30\x44\x66\x77\x5d\x59\xab\xd8\x2e\x7b\x84\x18\x90\x5d\x76\xe8\xfb\xb8\x1f\x15\x9c\xb6\x64\xf2\x9b\x47\x1c\xd1\x1b\xd5\xea\x30\xc8\x5e\x31\xbf\xa2\x42\xcd\x18\x9b\xe4\x07\x2c\xa1\xeb\x11\x6f\x73\x35\xae\x3f\xee\xb3\x9f\xb8\x34\x97\x04\x64\x47\x50\x11\x41\xc8\x76\x22\xf4\x86\x22\x83\xa0\xfa\xfd\x07\x61\xd1\x26\x6e\xb3\x30\xe6\x05\x7f\x5d\x42\x53\x67\x74\x5e\xad\xcc\xe4\x5f\xe5\x70\xf4\x6d\x5e\x80\x6d\x47\x2c\x66\xf1\x29\x66\xec\x53\xd9\x36\x13\xf7\xde\xab\xd2\x45\x70\x05\x48\x79\x07\x12\xd8\xc3\xac\x6e\x44\x76\x27\x23\x71\x6d\xd1\x02\x56\xcd\xa4\xde\x96\x4d\x15\x08\x04\x2e\xea\x12\x2c\x21\xd4\xaa\x9f\x88\x09\x8f\x16\x04\x76\xbd\x01\xdc\x02\xe0\x99\x11\xd8\x64\x33\xc1\x72\x7d\x5a\xbe\x0f\x8e\xa8\x69\x0c\xae\x1e\xd6\x52\x64\x43\xf8\x68\x18\xdd\x10\xca\xf3\x79\x9d\xe3\x0f\xdb\x7c\x61\x1e\xcc\xce\x9a\xdb\xba\x8d\x5e\x19\xcc\xb7\xd7\x3f\x62\xba\x0c\xcf\xe9\xc6\xce\xbd\x42\xf4\x56\x20\x81\xb4\xc6\x68\x99\xec\x61\x14\xde\xc0\xd7\x00\xd0\xb5\xfa\x35\x1a\x3c\x83\x67\x1b\x7e\x91\x0d\x4d\xeb\xa1\x97\x92\x6e\xc3\x25\xa0\x17\x0b\x47\x76\xd2\x7b\xfe\xec\xd9\xd9\xb3\x2e\x96\x59\x30\x12\xc3\x61\xf5\xd8\x3e\x7d\x0a\x81\x28\x20\x37\xdc\xf3\x2c\x76\x2e\x28\x99\x48\x73\x6e\x37\x28\x6d\xb8\xfb\x88\x5a\x5b\x58\x0c\xa0\x70\x5f\xa8\x74\x2c\x27\xab\x0e\x42\xa0\x79\xb5\x94\xbe\x57\x6f\xce\xcc\x79\x86\xb9\x47\xb7\x3f\xde\x98\x66\x29\x05\x87\x38\xad\xd0\x56\x6f\x5b\x1b\x52\x1a\xf1\xbf\x15\x69\x1c\xca\x84\xb1\x4f\x30\xca\xef\xea\xd5\x4f\xce\x61\xf9\xe2\x82\x8d\xf0\x11\xee\x72\xbd\x56\xbc\x35\x91\xfa\x23\x79\xa2\xad\x7c\x19\x99\x8f\x43\x54\xac\x00\x23\x60\x91\x7a\xc0\x1f\x7a\xa1\x73\x31\x33\x8c\x58\xe7\x2c\x53\xca\x28\x5f\x28\xb1\xb9\x35\x77\xc0\x80\x4d\x8a\xf5\xf6\x75\xb4\xc8\x85\xc5\x68\x90\xa1\xf3\x68\x09\x56\x36\xb8\x8d\x77\x16\x4b\x53\x92\x2b\x87\xf7\x0a\xaf\x56\xdb\xc0\x08\x8a\x59\xe2\x14\x6d\x37\x15\xb0\x11\x11\xdc\xa0\x3d\x01\x12\xac\xdb\x20\xcb\x9a\x8d\xb2\x99\x85\x08\xc3\x48\x48\x76\x0b\x55\xd8\xf3\x50\x68\x81\xe0\x1b\x32\x12\x7b\xa8\xac\xd7\x60\xd3\x65\xb8\x79\xad\xe4\x7e\x96\x40\x42\x24\xa1\x3b\x12\x8c\xb3\xe5\x5a\x34\xb9\x2e\xe6\x3e\xf3\x34\x36\x07\xd0\xf0\x1e\x00\x8b\x3d\x18\x82\xa4\x2d\xce\x8f\x8e\xa6\x4a\xe7\xe7\xe6\x60\x1f\x19\xae\x34\x3c\xec\xb3\x57\x1e\x80\x84\x1a\xb3\x61\x91\x25\x98\x06\x6e\x27\xbd\x64\x59\x8d\x2a\x3f\x34\xdd\x39\xd6\x61\xf4\x10\xd8\x43\x50\xc8\xdd\xe6\xd8\xd5\xae\xae\xf4\x5f\x09\x3a\xdd\x5b\x5d\x57\x45\x52\xe7\x82\x53\xa8\x1a\xc4\x64\xcd\xe4\x64\x4a\xf0\x4d\x5a\x25\x16\x99\xc3\xe5\x00\xbc\x7c\x7d\x03\xf3\x56\x33\x8f\x40\x35\xc2\xd9\x77\x11\xe2\xba\xdc\x8b\xa1\x11\xcd\x70\xa4\xd0\x17\x93\x69\x8f\x86\x04\x1d\x71\x0b\xb0\x55\x72\xc3\x84\x2f\x04\x56\xa7\x90\x2a\xc1\x6a\xbb\x7d\x3b\x75\xa3\xa5\xf3\x44\x83\x9f\x00\x42\xb9\x6c\x9c\x15\xac\xd1\x55\x22\xb8\x06\x05\x8d\xc4\x42\x80\xec\x61\x43\xb3\x7d\x09\x76\x60\x56\xfa\xe4\xf4\xcf\xfd\xe3\xfe\x71\xff\x64\x88\x7a\x2d\xf5\x6d\x28\x55\xea\x77\x0b\x56\xa4\x89\xd0\x1a\xa8\x12\xb2\x1d\xa1\x6a\x2c\x8b\x00\x34\x4e\x99\xf5\xad\x9c\x0e\x86\x59\x13\xb0\x74\x56\x4d\x34\x6d\x8c\xbc\xe9\x8e\x2f\xfe\x8c\x0b\x9b\x0a\xe4\x18\xc0\xcd\x00\xa2\x1e\x0f\xa0\x7f\xe0\x6e\x8a\x68\x8a\xd8\xf7\xe6\xb1\x35\x1e\x25\x0b\x72\x91\xa4\x2a\xed\x41\xdd\xdd\x51\x22\x30\x32\xb0\x0b\xe4\x20\xb8\x86\x26\x90\x05\x5d\xcc\xcd\x36\x71\x96\x8a\x7b\x4b\x05\x8e\x92\x90\x40\x1d\xa9\x0d\x3a\x90\xa9\x3f\xe8\xfc\x15\x48\xc4\x50\x32\x3d\x9a\x48\x62\xb0\xd4\xe4\xfc\xe8\x68\xd0\x81\x6e\x2e\x98\xbd\x80\xed\x7d\x48\xd9\x9f\x63\x67\xbd\x25\x43\x21\x4f\x6d\xfe\x3b\xfa\x2d\xc8\xba\x02\x83\x7b\x7b\xfd\x63\x9f\xfd\x2f\x55\x40\x5b\x4b\xa2\xd0\x71\xae\x20\x2c\x04\xe5\xf6\x91\xcc\x33\x9e\xb9\x6e\x88\x61\xb9\x63\x88\xd9\x28\x10\xe9\xda\x65\xdc\xce\xd6\xab\x5f\x8d\x23\xce\x73\x31\x9b\x5b\x58\x60\xf3\x31\x02\xf7\x86\x6b\x54\xcb\x88\xf1\x22\x9f\x22\x12\xd1\xa0\x63\x9e\x9c\xdb\xc0\x94\xff\x31\xe8\x60\xd6\x74\x5e\xe6\x5c\x7f\x9f\xf1\x09\x9a\xca\x0e\x06\x9d\x6f\xfa\xfd\xfe\xa0\x83\x56\x9e\x7f\x16\x22\x5b\xb0\x39\xcf\xf8\x4c\x40\x4c\xd0\xc1\xa0\xf3\x9d\x7d\x4e\x06\x04\xea\xa5\x4b\x5a\xcb\xd6\xa5\x91\x1e\x2b\x9e\x3e\x4a\x9d\x6b\xd6\x0f\xdd\xe0\x92\x5f\x55\xf1\xd7\x9c\x1f\x1e\x28\xc4\xba\x46\xdc\x8d\xbc\x52\xf5\x77\x52\xdc\xff\xbc\x1c\x4f\xbd\x26\x91\xd4\x6e\x7d\x5f\x00\x91\x56\xf4\x40\x2b\xb6\x04\xac\x3b\x95\x35\xca\xc6\xba\x0b\x0e\x02\x95\xb0\x76\xb0\xd4\x9f\xa2\x2c\xac\x3f\x17\x84\x7b\x0c\xaf\xc2\x0a\xe4\xf8\x6a\x4b\x2b\xd7\x5a\x00\x5f\x4a\x01\x9c\xc3\xed\x62\x7e\x19\xbe\xa8\xbd\x39\x2c\x71\x00\xcd\x5a\xd0\xc8\x98\x78\x0f\xa0\x91\x78\x97\x78\xe6\x35\xaf\x76\x87\x20\x10\x5d\xbb\xd3\x74\x4d\xa1\x01\x1a\x6b\xaa\xe7\xd6\xed\x64\x11\xd3\x4a\xaf\x66\x09\x1d\x5c\x35\x6e\x11\x6a\x60\x35\x01\x8b\x8d\x16\xde\x20\xba\x15\xfa\x32\x03\x1a\x73\x99\x2c\x85\x55\x37\x5f\xe6\x25\xda\xa3\x9b\x62\x04\xeb\xee\xe2\xc6\x4a\xcc\x39\x0b\x36\xed\x50\x20\xd3\xb8\x74\x6f\xdb\x62\x69\x90\x42\x66\x5b\x60\xd8\x38\xf1\xb2\xb2\x4e\x73\xd7\xbf\x14\x6a\xaa\x84\x19\xf2\x67\x83\x46\x0c\xd1\xdf\x63\xf8\x08\xc0\xbb\xf5\x7d\xd2\x82\x90\xf4\x95\xb9\xab\xf5\xc6\x35\x94\x35\x6f\x8b\x29\x1d\xda\xe3\xc3\xeb\x30\x8b\x0a\x69\xb4\xcf\x58\x68\xf3\x43\x59\x49\xad\xd3\xed\xd8\xda\x5e\x0d\xbe\xd2\x6c\x1c\x48\x39\xaa\x35\xa9\xe3\xdf\x79\x25\xcf\x11\x82\xc3\x02\x74\xe6\xaa\x6f\x2f\xa3\xd9\x82\xcf\x65\x9f\xae\x38\x28\x1a\x7f\x77\x32\xe8\x84\xb4\x57\x3b\xd4\x66\x9e\x2d\xf5\x5a\x03\x2c\x0f\x03\x39\xd8\xa4\x23\x57\xe9\xfc\x11\xd8\x82\xd5\xa2\x58\x36\xd4\xe5\x9a\xdf\xbf\xb2\xc4\x00\xae\xda\x42\x06\x50\xe5\x0a\x19\x13\x73\x2a\xef\x72\x77\x64\xbd\xaa\x6c\xb4\xd9\x47\x08\xb2\xa2\xb1\x6c\x09\x05\x6c\xc7\x88\xf2\x56\x48\x3d\x45\xb9\xd8\x56\x14\x52\xe3\x32\x67\xde\x83\x31\x37\xf7\xf1\xbd\xd4\x82\x3e\x19\xf1\x84\x1d\x18\x22\x4a\x12\xe1\x3e\xa4\x01\x92\x10\x21\xc2\xd9\xdb\xcb\x97\x00\xda\x2a\x78\x8a\xa8\x3f\x19\xd8\xf2\xa7\x82\x65\xaa\x48\x63\x96\x67\x72\xce\x0e\xea\x43\x3c\x74\xc5\xe3\x4d\x4b\x2f\x18\xc8\xe3\x9b\x04\xc6\x5a\x0a\x3a\x50\x0c\xde\xd6\xd0\xa5\x1e\x6d\xdc\x8f\x2e\x24\xa2\xc6\x8e\x21\x20\x35\xcb\x44\x82\x85\x30\x13\x35\x61\x22\xcd\xa1\x66\x95\xff\x4d\xcb\x59\x00\x0e\xdd\x1e\x57\x12\xa6\x28\x8c\xa5\x88\x25\x22\x11\x66\x2c\x16\xa3\x62\x32\x79\x7c\x19\xc7\x20\x01\xec\x96\x8d\xe0\x02\x6f\xca\x47\xb0\x75\x05\xe5\xb4\xc2\x46\x88\xa2\x36\x62\x1e\xee\xbc\xbc\x71\xd5\x00\x33\xa1\x8b\x24\x5f\x56\xe2\xc5\x6b\xba\xe4\xba\x2e\x5b\x34\x8e\xae\x7d\xee\x03\x02\x0e\x2d\x55\xd0\x41\x1e\xda\x78\xaa\x21\x0e\x04\x4b\xd8\x17\x80\xbb\x35\x2e\x92\xae\x47\xef\x10\x88\x84\x24\xed\x69\xef\x78\xa7\x5b\x24\xec\x9c\x0d\xcb\x88\xab\x21\x5d\xcb\xba\xc2\x36\xe8\x63\x38\x8a\x06\xf7\x1b\xe2\x07\x60\x0e\xa0\x63\x80\x3a\xe7\xc2\x62\xc0\xb3\xaf\xe5\x6f\xa2\x0c\xb7\x99\x17\xb9\xe7\x9f\x76\x8d\x1c\x3f\x4b\xbd\xdf\xc0\x1d\x7e\x20\xfe\x69\x78\x42\xb5\xc4\x47\xbf\x90\xfe\x5f\x60\xe5\xf4\xe3\xdc\xfa\xce\x34\x79\xd8\x58\x02\x2f\x7a\x6d\x56\x00\x58\x36\x40\xa0\x69\x2a\x24\x60\x21\x99\x74\x9f\x5d\xa4\x0b\x72\xdc\x22\xa0\x86\x5d\x0f\x17\x4d\x67\x16\x5f\x26\x22\xcd\x93\x85\x4b\x12\xdb\x3b\x6b\x25\x12\x0c\xd4\xb5\x35\xbf\x57\x4d\x6e\xf4\x9b\x23\x2f\xed\x4c\x6c\xe2\x7d\x9e\x71\x57\x55\x57\x8e\xeb\x17\xae\x91\x4d\xc0\xc0\x89\x5d\x38\x0c\xa3\xd8\x5c\xbe\x33\x08\x88\x5c\xf6\x92\xe1\x2f\x40\x93\x22\xb6\x49\x73\xf5\x5e\x1c\x36\xb6\x8b\x2d\x32\x8b\xef\xd9\xfd\x81\x08\x90\xae\x4d\x77\xa6\xe3\x22\xf3\xcb\xd7\x96\x95\x12\x3c\xfa\xf7\xc7\x02\xe4\x08\x24\x5e\xfb\x76\xae\xd8\xf0\x06\x5f\x19\x9a\xd7\x69\xd0\x9b\xbe\xfa\x3d\x0e\x65\x48\x58\x15\xea\x0e\x2a\xcb\xa8\x4c\x94\x8b\x99\xba\x17\xa9\x90\xf1\x90\xa6\x07\x9a\xbc\xd1\xbc\x2d\x1c\xd0\xe9\xf1\x71\x75\x81\xdc\x0b\x75\x8b\x64\xa4\x48\x85\x29\xf1\xd0\x6c\x95\x64\x7b\x83\x0a\xac\x5f\xf6\xc8\xc2\xcd\x16\x90\x65\xe7\x77\x38\x38\xaa\x4b\x43\x79\xa4\xe6\x46\xe0\x57\xe6\x66\x74\x55\x46\x4b\x64\x35\x30\xf5\x58\xbe\x53\xc8\x0d\x4b\x90\x6d\x58\x6f\x78\x6d\x69\xf2\x4f\x70\xad\x19\xc5\x6b\xd3\x4b\xcd\xb4\x5d\x7e\xa5\xd5\x16\x7a\x7d\x71\x85\xb6\xe4\xf0\x6e\x4b\x0e\xb7\xf5\x79\x77\x57\x9f\x37\x2b\xd5\xc6\xfa\xf5\x16\x52\x11\x5d\x7c\xac\xf6\x0b\xb5\xd7\xce\xc6\xce\x8d\x37\xcb\x74\x5d\xbc\x9d\x9d\xbc\xda\xb8\x9f\xeb\xb2\xe9\x26\x33\x28\x4f\xf5\x9e\xa7\x40\xe3\xde\xa9\x95\x61\xd9\x42\xed\x41\x3f\xd8\x01\x77\x5e\x0d\x51\xbd\x31\x08\x57\xfd\x4d\xdf\xae\x64\xcb\x01\x50\x58\x8a\xb9\xfc\x00\x09\x72\x9e\xc9\xb4\x56\x55\x7f\x55\x09\x06\x68\xd2\x85\x28\x8a\x30\xf4\xb2\x7b\x12\x8c\xbc\xb8\xb2\xce\x76\xa6\x25\xd4\x98\x2a\x91\x29\x0f\x00\x99\x00\xb3\x62\x2b\x10\xa5\x16\x45\xd8\x28\x11\x86\x93\x61\x24\xe1\xc4\x88\x9a\x39\x86\x33\x36\xb0\x52\x95\x91\x8f\xe2\x22\x12\x5e\xda\x8c\x73\x47\xe2\x42\x04\x7d\xf6\x35\xf4\x8d\x86\x05\xc6\xfe\x85\x53\x98\x16\x33\x6e\x0e\x0a\x8f\x41\x5f\xf6\x9f\xdb\x5b\x6a\xc5\xb7\x36\x82\x8b\x70\x31\x02\x16\x37\x02\x42\x4e\xcb\x63\xd8\x98\x15\xc8\x74\x4f\xcc\x66\x3d\x61\x5e\x4f\xf3\x79\x22\x51\x9c\x03\xc7\x08\x61\x05\x7a\x82\x14\x51\x47\xae\x18\xd7\x9a\xaa\xa8\xd8\x52\xb4\x36\x58\x18\x30\xee\xb1\x9d\x74\x52\x3e\xae\xb8\xf9\x60\xb5\x06\xc6\x44\xe6\xd3\x62\x04\x36\xa6\x37\x17\x97\x47\x34\xfe\x5e\x05\xd7\xe9\x68\x94\xa8\xd1\xd1\x8c\xeb\x5c\x64\x47\xd6\x9e\x79\x74\xda\x3f\x36\xec\xda\xe8\x39\x3d\xc4\xc3\x0a\x97\x03\xac\x86\x8e\x2c\x8f\x46\x69\x6c\x14\x3c\x28\x59\xde\xd2\x1d\x9a\x67\x52\x65\x32\x5f\x04\xa2\x38\xe8\x89\x15\x48\x29\x47\x07\xf7\xc5\x25\x47\x27\x3c\x97\x77\x82\xc9\x19\xf8\xd8\x52\x1b\xad\xe2\x36\x8b\x0a\xb3\xe1\xbe\x80\xba\xa7\xfb\xec\x47\x75\xef\xca\xc9\xa1\xcb\xce\x08\xe0\x12\x4d\xea\x53\x39\x31\x4a\xa1\xfd\x7c\x9f\xd9\xa2\x25\x18\xf4\x8e\x7e\x32\x65\x53\x7a\x52\x96\xc8\x99\x34\xff\xc4\x58\x19\x1d\x89\x94\x67\x52\xf9\xc2\x30\x9a\x0a\xb9\xeb\x12\xbd\x94\x16\xaf\xf1\x78\xa3\x00\x90\x32\x65\xae\xba\x4a\x2e\x17\x29\xdd\x9c\x7c\x3f\x0f\x09\xed\x3c\x84\x25\xcc\xd7\x37\xf1\x73\x2d\x7b\x27\xe0\xee\x22\xa9\xb6\x2c\x1d\xe6\xd7\x9f\xe2\xec\xc5\xf5\x5a\x74\x7d\x72\x38\xad\x2a\x1c\xdc\x3a\x83\xfe\x10\xce\xa0\x4a\x50\xd8\xf0\x97\x41\x87\x68\x78\xd0\xf9\x75\xcb\x22\xff\x8e\xa8\x02\xf0\xb8\xe4\xdf\x2c\x67\x68\x48\x39\x58\x8b\xa7\x34\x4a\x5a\x53\xb3\x9d\x62\xa8\x20\xeb\x39\xeb\xb1\xe1\x6b\x95\x8a\xe1\x39\x96\xf7\xa1\xb7\x33\x4c\xda\xb0\x46\x34\x0c\x85\xf2\xd3\x53\xef\x5d\x08\x4c\xae\xa0\x92\xa6\x33\xbc\xd9\xa8\x96\xf0\x46\xf6\x4a\x07\xed\xb9\xb7\xcc\xb8\xa0\xe8\xdb\x55\x15\xc4\x4b\xbb\xe2\xb9\x62\xb1\x6a\x9a\x92\xca\x4a\x53\x5e\xac\xda\x20\x65\x10\x2d\x00\xe6\xac\x92\x55\xa2\x4c\x40\x66\x8d\x2d\x81\xdf\x50\xa5\x85\xb6\xde\xf7\xef\x03\x01\x74\xf8\x92\x16\x79\xf0\x6a\x0c\xbc\xd1\xdc\xef\x50\xb7\x3b\x73\x8b\xbb\x48\x4f\xcc\x02\x19\xda\x56\x68\x98\xc6\x84\xc7\xfd\x39\xd1\x91\xbf\x07\x3d\xe9\xbb\xd7\x62\xf6\xe4\x30\x5d\x56\x8c\xf1\x01\x25\xde\xaa\x81\xd3\x55\x20\xef\x52\xd6\x40\x4c\xf9\xd8\x46\x25\x96\x6c\xb4\xcf\xd8\x65\xae\x51\x2e\x83\xcc\xd7\x91\xab\x03\x40\x32\x2c\x16\xd9\x82\xfa\x0f\x60\x61\xaf\x54\x4d\xc7\x9f\xbd\x9a\x5c\x86\x9b\xf9\x35\xb4\xef\x4e\xfa\x27\xcf\xbb\x6c\x9e\xf0\x34\xa5\x93\x04\x25\x05\xe1\xb8\xc1\xd3\x6f\xfb\xec\xad\x06\xee\xe0\x6d\x33\xad\xef\xdd\xc9\xf2\xea\xee\x36\xea\x6d\x83\x32\x36\x81\x62\x75\xad\x39\xac\x35\x87\x7d\xa9\xe6\x30\xeb\x6a\xda\xda\x7d\x54\xb1\xe9\x97\x78\x13\xb6\x44\x4d\x40\x2c\x98\x8b\xa8\x2e\xdd\x5a\xdf\xf4\x3d\xb7\x3e\x99\x4a\x55\x35\x3e\x9f\x0b\x9e\xed\xc9\x32\xb5\xac\xe8\xb0\x19\xfc\xb6\xe0\xff\x94\xcb\xb9\x69\x6d\xe2\x4f\x39\x9d\x3d\xc0\xdf\x6f\xb0\x80\xfb\xba\xb5\xd6\x3a\x56\x2a\x6e\x18\x8f\x2c\xf7\x77\x91\x96\xa5\x5e\x1f\x70\xa3\xba\x97\x4b\xb7\xaa\xf5\xf2\x95\xda\x45\x06\x5a\x9f\xab\xc5\xec\x2e\x83\xb9\x5a\x7b\x23\x91\x1d\x8f\x88\x39\x50\x40\x4d\xe7\xb7\x19\x4f\x35\x74\x7c\x2b\x43\xf6\x95\x66\x1b\x66\x7e\x42\x2c\x32\x92\x70\x69\x60\xb9\x6b\x66\xab\xf8\x1a\xfd\x8b\x4e\x4c\x59\x6c\xf8\x71\xfe\x43\x18\x25\x70\x2e\xf0\x4e\x36\x07\x6c\xdd\x96\xa5\x4d\xa8\xe7\x6c\x42\xee\x19\x1e\x5f\x73\x27\xd8\xf5\xe6\x23\x55\xe4\x34\x35\x37\x8f\xa0\x54\x9c\x09\xae\x43\x97\x39\xfe\x8e\xdf\x45\x10\xa1\xae\x59\x80\xde\xbd\xca\xe2\x6e\xc9\xf2\x19\xb5\xf3\xac\xf1\xb8\x7e\x4f\xf4\x46\x9f\x5f\xc7\x99\x2a\xf5\x60\x4a\x87\x36\x7e\x03\x2e\x24\x73\x1b\xdd\x02\xa0\xcc\xf7\xa8\x2d\x90\x22\x11\xfc\xdc\x6a\xa3\x4f\x6e\xd1\x85\x9a\x1f\xba\x05\x8b\x8c\x55\x5f\x5f\xe9\x9c\x8f\x12\xa9\xa7\x22\xee\x32\xa8\x60\x7c\x41\x45\xd6\x41\xde\xb8\x05\xa7\x3f\xcf\x1f\x1f\x31\x54\xe1\x00\x40\x2c\xfb\x3b\xfb\x3f\xca\x35\x01\x88\x2b\xde\xab\x16\xd0\x58\x2a\x7a\x52\xe0\xca\xba\x83\x8e\x9a\x7a\x2b\x7b\xee\x5b\xf6\x74\x16\x91\xea\x5a\x22\xe2\x08\xe2\x20\x94\x31\x0a\xeb\x36\xf5\x53\x55\x60\x5e\xa3\x09\x7e\x6c\x65\xea\x2f\x50\xa6\x36\x3c\x02\x25\xea\x4f\x27\xbb\x6d\x2a\x58\xb9\xb1\xed\x8f\xb5\x62\x91\xfb\x07\xf0\x56\x78\xb1\x26\x9f\x43\xb4\x9e\x5f\x7a\x4f\xea\x55\xf2\xf9\x2a\x46\x3b\x4f\x8a\x8c\x03\x70\x82\x39\x31\x4d\x8b\x3a\xcf\xc5\x44\x65\xa1\xda\x35\xde\xb3\x2a\xef\x07\x93\x86\x88\x59\xad\x6e\x73\xdd\xdd\x39\x12\x89\x4a\x27\x30\x0d\xc8\x9e\x63\x4f\x78\x92\x3c\x29\x21\x5c\xd8\xbc\xa0\x0b\x96\xc9\x14\xcc\x2e\xb1\xd4\x91\xba\x13\xd9\xc2\xd5\xdc\xd1\xc8\x61\x0b\x42\xa9\xb5\xae\x3f\xb3\x32\x68\xfa\x66\x32\xbd\xa3\xf4\x45\x8d\x98\x2d\x90\xa2\x17\xe5\x09\x9b\x08\x08\x92\xde\xd2\x4e\x1c\x66\x2c\xef\x88\xb1\x50\x22\xa9\xad\x15\x6b\xb1\x7c\x7d\x4d\xd0\x06\x2c\x23\xd4\x49\xb2\xf0\x04\x29\x30\x72\xca\x74\x52\x24\x3c\xeb\xd3\x86\x7a\x35\xff\x5c\xe8\xb6\xe7\x43\x70\xe8\x7b\x14\x30\x3a\x34\x9f\x1c\x7a\x30\x68\xb4\x74\x60\x47\x0f\xca\x43\x66\xd7\xfe\x1e\x9c\x94\x7d\xb2\x66\x62\xb0\xed\xce\xcc\x5b\x4e\xd3\x37\xcd\x0f\x3a\x38\x30\x73\xd0\x06\x9d\xb0\xdb\x12\x09\xb1\xe9\xb4\x84\xdf\xed\x18\xe8\x2f\x3f\x4d\xdf\xf7\x9f\xc3\x79\xd8\xb4\x56\xfe\xb6\xb5\xf1\xe9\x77\x1c\x02\xfe\x6c\x0b\x17\xcf\x78\x4e\xb9\xef\xfe\xc8\x96\xde\x97\x07\x9e\x99\x90\x0d\xb1\x5b\x38\xd3\x7d\xbf\xf3\x7e\x63\x64\xc3\x43\xaf\xd8\x69\x92\xb0\x44\xdd\x23\x1a\x7b\x58\xb0\x9e\xaa\x2c\x77\x7c\xa7\x26\x5c\xbb\x67\xb8\x2e\x53\x48\xbf\x87\xbf\xad\x1c\x5f\x16\x3e\xb5\x16\xd0\xbd\x1d\x43\x9c\x28\x0c\xa2\x34\x93\x0e\xe1\xa4\xcc\xd6\x4c\x77\x13\xd7\x0e\x1d\xa9\xc0\x2a\xd0\x13\x47\xe1\xf6\xef\x10\x7d\xad\x18\x4e\x85\xd6\xdd\xcf\x31\x9d\xc6\xcf\xe5\xb9\xad\xd9\x30\x1e\x70\xf7\xdc\x34\x6d\x5c\xbc\x66\xe1\x92\x59\xe5\x00\x3a\x13\xd7\xaa\x3b\x07\x28\x9a\x40\x3a\x8c\xc4\xa1\x23\x35\x0f\xa0\x75\xf8\xd8\x4e\x20\x57\x53\xd8\x40\x73\xfc\xcb\x5a\xfa\x4e\xc9\xd2\x57\x15\xd1\x43\x8c\x2f\x46\xba\xbe\x05\x75\x5a\x15\xf9\xbc\xc8\xab\xee\xfc\x40\xf5\x6e\x87\x1d\x70\x04\x29\xd6\x50\xb5\x9b\xc4\x2a\xa3\x02\xea\xa3\x6f\x32\x11\x09\x79\x67\x9e\x39\xfe\xd3\xe3\xba\x07\x19\x2a\x55\xaf\x3e\xbb\x74\x19\xc3\x5d\x92\x1f\xc1\x85\x67\x9d\xab\x42\xbb\xf1\x5a\xd8\xb2\xd2\xa5\x78\xab\xe6\xbd\xc4\x88\x79\x18\x5c\x2d\xb2\x9e\xf5\xea\xda\x77\xcc\xe1\x9e\x15\x79\x01\x37\x8d\xab\x43\x43\xce\x64\x96\xbb\xf7\x55\xb6\xf4\x75\x0f\xab\xc1\xa1\xa0\x51\x24\x48\x2c\xf5\x3c\xe1\x0e\x2d\x94\x4f\x4a\xbd\xb9\x7e\x79\xe9\x3a\x80\xc3\xa7\x57\x11\x1a\x11\x6a\x1f\x2b\xf9\xa3\xab\x82\x04\x9c\x46\xe9\xfd\xa4\x45\x6e\x14\x86\x92\x61\xbe\xb8\x7e\xb9\xaf\xb0\xc3\x65\x11\x19\x1f\xbb\x74\x98\x1a\x63\x87\x9f\x2d\x5f\x33\x5c\x1b\x7f\xa0\xed\xb1\x38\xfa\x0d\x0f\xf1\x23\x6f\xce\x7e\xbf\xff\xe9\xaf\xc4\xa5\xb0\x3c\x4b\x20\x79\x2c\xc8\x6d\x55\x7a\x30\x27\x08\xc4\x9a\xea\x2d\x58\x5f\xa1\x4f\x6b\xee\xc6\xdb\x1b\x82\xba\x02\x2e\xf2\x50\x84\x57\xc8\x93\xee\x2b\x0f\x3c\xaf\x56\x77\x5b\x07\xed\x67\x43\xa0\xc8\x78\x52\xba\x45\x4b\xcc\x4d\xf0\x64\x53\x78\x08\xc1\x0b\xe8\x5c\x65\x7c\x22\xfa\x15\x80\xea\x6a\x4a\x12\x2e\x38\xd6\x8e\xb2\xc3\x84\xd0\xce\x0a\xf6\x36\x4f\xee\xf9\xc2\x03\xf8\x04\xce\x45\x31\x01\xd6\x02\x63\xef\x64\x4b\xd4\x4d\x3e\xd9\x40\xfc\x02\xff\x29\x96\xb1\xf3\x50\x84\x74\x0d\x46\xc8\xf3\xc7\x9e\xbb\x04\x13\x97\x81\xe3\xc5\x27\x90\x3f\x96\x5d\xe1\x30\x9d\x41\xa9\x48\x2b\x13\x8c\xd0\x54\xb9\x1e\x3e\x91\xa0\x3b\x40\xa0\xdf\x04\xd6\xf1\x1c\x66\x35\x2c\xa1\x3f\xd7\x5e\x61\x39\xd7\xef\xf4\x11\x87\xac\x1e\xff\x03\xe6\x2a\x43\x92\x2f\x6f\xae\xfa\x0f\x3d\x9f\xee\xbf\x21\xac\x46\xb8\x3a\x0a\x37\x42\xf3\x4b\x0d\x7a\x32\x1c\xcb\xe6\xc1\x5f\xa3\x18\x10\xa8\xcf\xad\xe6\x7e\x7d\xee\xfb\xa9\xa0\xd2\xcc\x4b\xf9\x98\xe1\x7b\x04\x83\xd1\x33\x57\x9b\xcb\x6e\xeb\x41\x67\x71\x28\x18\x87\x0d\x5f\xe0\x1b\x98\x7c\x34\x7c\x6d\xdf\x89\x87\x8e\x80\x20\x96\xc3\x7f\x10\x14\xbb\x6b\x85\xd0\x6b\xb3\xf1\xcb\x98\x5b\x46\x74\x0f\x11\x07\xfe\x93\x55\x93\x9b\xf2\x8d\xc4\x86\x46\xc1\xf4\x4d\x65\x87\xca\x8b\x4b\x04\x88\x4f\xc1\x06\x2b\x15\xe5\x3f\x76\x3b\x77\x95\x02\xcf\xd5\x65\xf5\x8e\x50\x35\x5d\xc0\x1d\x28\x62\x0c\xe1\xe2\xc9\x4b\xc4\x96\xc0\x32\x37\xcf\x2a\x89\x36\x15\x18\xac\x8d\x97\x9a\x58\xd8\x67\x5c\x65\xaf\x6c\xb6\x59\xe3\x65\xb2\xd0\x5d\x35\x7d\x1f\x8a\x01\x96\x79\xb7\xfb\x94\x29\x96\x68\xe3\xab\xe5\x0c\x8c\xac\x34\xb2\xa5\x65\xb2\x43\xbb\x1f\x43\xb2\x6b\x8f\xdd\x4f\x74\xe2\xcb\x06\x66\x70\x23\x95\x4f\x3d\x14\x2a\xf6\xc6\xc6\xb4\x7b\x2f\x6a\x0c\xdb\x2a\x1b\xf9\x17\x06\x80\x79\x79\x0d\x1b\x31\x37\x25\xcb\xb8\x5b\x1a\xa7\x7a\xe7\xc5\xa5\xfa\xd9\xcf\x86\xc0\xbc\x3d\xd0\x6b\x37\x21\x34\xfc\xfa\xe8\x6f\xb7\x5e\xc4\x59\x75\x07\xca\x8e\x29\x0e\x71\xcb\x35\xb6\xfe\x9b\xd4\x19\x26\xca\x74\xce\xd9\xbc\x20\x7c\x39\xcc\x73\x96\x29\x89\x2e\x44\x45\x65\xb4\x29\x61\xaa\x07\x0c\x16\x54\x82\xa2\x44\x9f\x20\x37\x80\xd4\x6c\xd0\x01\xe8\xae\x44\xbe\x13\x83\x4e\x97\xc9\x1c\x2f\x7c\x0d\xe0\x86\x23\x75\x07\xb0\x53\xd5\x56\xb5\x5e\x74\xd7\xc7\x51\xb0\x01\xc4\xe2\xbd\x8c\xd4\x24\xe3\xf3\xa9\xad\x1a\x32\xe8\xfc\xbd\xd9\x87\x66\x3a\xe7\x19\x65\x79\x73\x36\xe8\xdc\x99\x51\x00\x3e\x1c\xcf\x6c\x3d\x0b\xb4\xae\x70\x07\x93\x08\xb9\xd5\xfc\x1f\x86\xab\x61\x2f\x87\xf4\x8a\xcd\xbf\x48\x16\xe4\x3b\x85\x59\x0e\x3a\x3c\x99\x4f\xb9\x2d\x8d\x67\x98\xc1\xa0\x43\x59\xdc\x18\x3d\x5a\xe9\x58\xa6\x5e\xc7\xb6\xd2\x37\x1c\x5b\x0c\x29\x46\xea\x18\x2d\xd8\x0f\x17\x68\xc0\x11\x58\x18\x98\xfe\x0d\xdf\x62\x07\xf7\x80\x2a\xfb\xc3\x05\x9a\x88\x2b\x29\xd5\xa9\x62\xba\x18\x8f\xe5\x7b\xa6\x21\x88\x55\xe3\xfb\x70\x53\xcd\xa7\xfc\xb0\x6b\x11\x20\x52\x30\x2a\x41\xd6\x81\x99\x47\x65\xca\x34\xe3\xca\x68\xfb\xec\x22\xb5\x88\x58\x76\xb4\xae\xb2\x3f\xad\xf7\x39\xbb\x3b\x39\xee\xb2\xbb\xd3\x2e\xbb\x3b\x31\xff\x03\xe6\x08\x7f\x1d\x9b\x7f\x9d\x75\xd9\xdd\x19\xf0\x4b\xf3\xd3\x29\x8c\x08\xdb\xc1\x3f\x4f\xbb\x6c\xac\xd4\x09\xfe\xf7\xf8\xb3\xaa\xb5\xa5\xb6\x60\x5d\xa3\xbb\x45\xbe\xd9\x48\x95\xde\x5b\xce\xc1\x7e\xfd\x31\xfb\xea\xfd\xe7\xbd\x8c\xbe\x22\x10\xed\xb6\x6b\x4f\x0a\xd8\x9f\x0f\xec\xc6\x45\x7a\x6c\x6d\x88\x0c\x45\xa9\x6d\x1a\x9e\xb6\x26\xbb\x9b\xc2\x36\x96\x18\xca\x2b\x8f\x81\xfd\x79\x0e\x38\x28\x8c\xea\x6a\x1f\x40\x9d\x05\xc3\xa0\xec\xa5\x85\xde\x39\xef\xf6\xb9\x9d\x8a\x85\xcd\x77\x2a\xf3\x5f\x20\x67\xa9\xec\x55\x62\x2e\xc5\xe7\xb2\x34\xb8\x88\x97\x70\xd6\x0c\x3d\x73\x5b\x41\xbb\x60\x44\xeb\x39\xcf\x72\x19\x81\xfd\x9c\x6b\xc8\x7e\xa1\x8c\x9e\xb5\x5b\xf3\x39\x99\x66\x19\xef\x86\x69\x20\x2a\x13\xf1\xf2\xbc\xa1\xea\x73\x5b\xde\xc4\x93\xf6\x9b\xc1\x2f\x16\xe3\xd3\xdc\x83\xe2\x4e\x64\x65\x26\x4d\x9f\xdd\x66\x3c\x7a\x47\xaa\xbe\xf6\x72\x7a\x08\xbc\x89\xb3\x99\x9c\x50\x7e\x0d\x64\x9b\x42\x1a\x2c\x0c\xa1\x6c\x2b\x53\x26\xf2\xc8\x56\xdb\xb6\x40\x21\xb3\x02\xe1\x90\xb4\xaa\xf4\x02\x11\x02\x2a\x49\x44\x06\xd6\x08\xb3\x08\x7a\x5a\x69\x51\xc6\xb5\xb9\xdb\xfa\x00\x8a\x15\x99\x61\xa6\x8a\xa9\x24\x76\xe8\x33\x20\x6a\x89\x71\x8e\x48\xb0\x60\xf2\xf1\x6f\x6d\x88\x56\x17\xd6\xcc\x96\x37\x32\x97\x28\x52\x82\x32\x96\x9c\xf8\x87\x11\x15\x14\x11\x81\x7d\x50\xf8\xdd\x10\x0e\x46\x29\x43\xde\x4f\x65\x02\xfd\x1b\xa5\x89\xd2\x3f\xcb\xfe\x3e\x13\x52\xdc\xa6\xe4\xb6\xdf\x9b\x6d\x7f\x5c\xfc\xe7\x6d\xb3\x01\x1b\xaf\x56\xa0\x39\x1c\x16\x8e\xca\xac\x05\x7d\x83\x84\x6e\x14\xfa\x3b\x78\x60\xf9\xe4\x0f\xeb\x3d\x7a\xb8\x07\xe8\x2a\xd0\xd6\xd5\x9f\xe2\x68\xeb\xa4\x84\xa4\x12\x0a\x8e\xcc\x65\x07\xa5\xe3\xc8\xbe\x5a\x1a\x86\x0b\x74\x15\x83\xb6\x7b\xd8\x7a\x9a\xdc\xd5\xb2\xbe\xf8\xc0\x9d\xa7\xfe\x76\x11\xfc\xf0\xbf\xff\xeb\xff\xdc\x9d\xfc\xf7\x7f\xfd\xdf\x2e\xfc\xeb\x14\x3e\x06\x7f\x8a\x3c\xda\xd4\xb2\x82\x76\x2b\x9b\x3e\x98\x6f\x6f\x69\x01\x3d\x1e\xbb\x1c\xda\xe2\x8d\x61\xd3\xe7\x12\x7e\x40\x96\xb2\x87\x5b\xe6\xbc\x09\x2c\xb3\xd4\x3d\xd8\xc8\x56\x39\x09\x15\x9f\xc2\x76\x27\xa1\x69\x19\x5c\x76\x26\x3e\xbd\x59\x8f\xd8\x65\x10\x12\x5f\x50\x48\xe4\x38\xe1\x13\x26\x52\x3e\x4a\x64\x3a\x39\x8a\xa5\xc6\x7f\x55\x57\x1f\xae\x61\x94\x72\xad\xdd\x45\x72\x8c\x97\xbc\xb8\xba\xd4\x61\xbb\x3e\xb1\xe8\xa0\x30\xe5\x45\xaf\xdb\x40\x31\xb7\x17\xd5\xe5\xab\xbb\x99\x1a\x84\xef\xfb\x9d\x6e\xc1\xec\x60\x3d\x43\xc2\x83\x9d\xaf\x98\x20\xa8\xfd\xbf\xd6\x28\xda\x1f\xfc\x6e\xac\xf9\x4d\x02\x5e\x6e\xdd\xbf\x5b\x4d\xcd\x1b\x58\xe7\xab\x24\xed\xbf\xf0\x00\xba\xae\xce\xf1\x33\x92\x74\xd5\x1f\xf0\x95\x9b\x38\xbe\x4e\x5d\xde\x1b\xf5\x4d\xc4\x93\xd5\x28\xa3\x2b\xdf\x74\x11\x15\x94\x42\x6d\x23\x59\x05\x94\xd4\x13\x3e\xd5\xa1\x68\x58\xd5\xa9\x36\x49\x5d\xbd\x16\xf3\x44\x46\x5c\x03\xae\x8f\xcd\x33\xa9\xfc\x18\x48\x20\x1a\x89\xe4\x46\x24\x22\xca\x55\x16\xc6\x03\x6a\x34\xa9\x64\x1b\x94\xc0\x40\xe4\xcd\x06\x0d\xb8\x81\xf4\x03\x55\xbb\x1c\x76\x1f\xb0\x2e\x5c\x95\x21\x8e\xb2\xaf\xe9\x03\xc3\x3e\x7b\x93\x26\x8b\xb2\x5f\xac\x03\xaa\x0a\x8c\x2a\xaf\x42\x0e\x91\xc7\x9c\x10\xfa\x5d\xa0\x20\xbe\x0c\x43\x25\x57\x8b\x03\x68\x54\xf0\xc7\x5c\x44\xc3\xb2\x3d\xb1\x84\x7b\x95\xbd\x43\x26\xf9\x6f\x2a\x93\xbf\xa9\x34\xe7\xc9\x95\x8a\x2f\x8a\x5c\xc1\x0e\x65\xbe\xc2\x09\x71\xee\x68\x9e\x06\x5e\x57\x2e\x83\x57\x8f\x14\xad\xd0\xf8\xc2\x01\xf0\x20\x30\xea\x26\xe2\x3d\xb3\xd3\xa5\x5a\xbc\x16\x3b\xc9\x25\x91\x71\x3f\xf8\x14\x76\xa0\x7c\x45\x3a\x33\xfe\x58\x65\xb3\x60\xb0\xfc\x1e\x1d\xe0\xdf\xc0\x62\xf4\x7c\x72\x45\x1f\x43\x26\x30\xca\x97\xe2\x73\xad\x28\x66\xb1\x6b\x88\x46\x42\xb2\x0c\xd6\x38\x6e\x50\x82\x2d\xb3\x4d\x9e\x98\x23\xf8\xf0\xb0\x72\x50\xc0\x65\x61\xeb\x5d\x52\x62\x0a\x16\xd8\xa6\x12\xdc\x41\xa1\xad\x7e\x54\x82\xa9\xae\x7e\x8b\x1d\x53\xbc\xd1\xe9\x33\xea\x7e\x5f\xf4\x8e\x24\xbe\xa3\x9d\x59\xba\xf4\x84\x58\xea\x10\x47\x55\xca\x7e\x78\x75\xbb\x22\xeb\x6d\xcd\xba\x37\xda\xec\x85\xd7\xec\x7b\xed\x91\xd7\xec\x6c\xf5\xeb\xa3\x7e\xc0\xb9\x38\xfe\x5c\x21\xb9\xfe\x2d\xb8\xa5\x31\xbc\xf1\xea\x8a\x1b\x14\x9f\xaf\xbb\x42\xd9\x8d\xcb\xb0\x74\x69\x4d\x96\x87\x0b\xef\x92\x08\xd3\x59\xb5\xb7\x3e\xfb\x77\x23\x9e\x6b\x91\x77\xd9\x9f\x28\x60\xdc\xb0\xed\xa3\x25\x63\x09\x69\xee\x7f\x62\x57\x6f\x6f\xfd\xcc\x28\x68\x15\xea\x21\xc7\x52\x68\x61\xf4\x7e\x2a\xc4\x03\xf0\xd2\x84\xa1\x43\xd9\xba\x8b\x1c\x30\xf0\xc5\xfb\x48\xcc\xf3\xca\x4a\xe5\x3c\xfd\x8d\xe3\x00\x8e\xae\xde\xdc\xdc\x1e\x5d\x5d\xdc\xbe\xf8\xb7\xc6\x58\x1a\xb6\x86\xc6\x47\x1a\x9d\x36\xe4\x94\x4f\x4c\x66\x0f\xa3\x30\x5d\x61\x34\x34\x21\x48\x4f\xa9\x0b\x67\x7a\x53\xe9\xac\x2a\x68\x69\x2b\x3d\xd6\x0d\x05\x3c\x11\x35\x37\x4f\x7d\xd1\x49\x05\x41\x72\xe7\xe1\x03\x0f\x4c\x0f\xb9\x31\xe0\x79\x0d\x39\x89\x2d\x46\xb5\xbd\x3b\x19\x12\x07\xa4\x6c\xcf\x4f\xac\xbc\xa0\xe4\xbc\x2d\x26\xc3\xfa\x65\xa0\xe3\xea\xad\x03\x9d\x4a\x50\xea\x45\x7c\xce\x4e\xfa\x6b\x49\xda\x82\x2c\xba\xe4\xc5\x30\x8d\x0f\xdd\xd7\xf0\xe8\x90\x52\x6b\xd3\x67\x4f\xd7\x7f\x28\x38\xe0\x55\xc7\x56\x51\xd4\x1f\x39\xcb\x56\x8f\xe0\x53\x6f\xe9\x27\x82\xa5\x68\x50\xd1\xbe\xaf\xa7\x5d\x2b\x90\x3f\x57\x62\xf8\x36\xe3\x4b\xe5\x3b\xd5\x3c\x43\xcf\xe0\x36\x13\xf9\x54\xc5\x0f\xe4\x45\x0a\x43\x9c\x7f\x3e\x5b\x36\x9c\x5a\x03\x6b\xae\xb5\xa1\xd1\x77\x67\xd6\xe0\x47\x85\xd5\x96\x5b\x33\xf7\x44\x97\xf5\x4a\xdd\x7b\xa0\xc3\xfa\x27\x1e\x4f\x18\xe1\x7a\xe7\x2b\xa8\x22\xf8\x82\x75\x95\x5a\xaf\x0a\x94\x39\xf6\x10\xec\x2a\x52\x07\x8c\x22\x16\xb1\x4b\x5c\x83\x2e\xd6\x53\x48\x0d\x60\xb7\x21\xcc\x53\x11\xcd\x4f\x23\x51\x42\x59\xf7\x35\xa5\xa2\x2b\xc8\x66\xe9\x82\x6a\xec\xc2\x13\x2a\x82\x8d\xe1\x5c\x88\x32\x5a\x81\x8a\x3c\x87\x32\xd8\x5d\x26\xd3\xfc\xf9\xd3\x2e\x1b\x27\x8a\xc3\x3f\x70\x56\x5d\xf6\xcb\xaf\xe0\x23\x1b\xf3\x48\xfc\xe7\xc7\x2e\x9b\xf1\xf9\x2f\xf8\xc8\xff\x1d\x68\x3e\x95\xc9\xee\x6b\x4d\x87\xa9\x71\xf3\xca\xd9\xc8\x42\xcc\x8f\x3d\x3a\xcd\x18\x5b\x67\xe8\xa6\x02\xd1\xca\x5e\x66\x7c\x9c\xb3\xa7\xec\x60\x9a\xe7\xf3\xf3\xa3\xa3\x7f\x68\x95\xf6\xf0\xa0\xf7\x55\x36\x39\x3a\x5c\x4f\x37\x78\xd4\x03\x04\xf3\x2f\xa5\xa7\xa4\xf1\xac\xf4\x35\x5e\xee\xd1\x61\x15\x2e\xbd\x5e\xf9\xfc\x55\x60\x2e\x9f\x68\x0c\x49\xf2\xc6\x5f\xb8\x4f\xe1\xc1\x6b\xf2\xd0\x6e\x87\xa7\x8b\x2f\x62\x1c\xa4\xba\x86\xc0\xbd\x5d\x5e\x02\x77\x0a\x6e\x09\x1c\x6e\x94\x6b\xf4\x32\x54\x72\x7e\x5c\x3e\x03\xc5\xbe\x72\x0c\xbc\x1c\x0b\x9e\x17\x99\xaf\x92\x37\xfc\xf8\xf6\x25\xdb\x74\x02\x25\x9d\x97\xb9\xfb\xd1\x7e\x60\xc7\x55\x26\xea\x44\x00\xd6\x1c\x7b\x59\x2e\x77\x27\xec\x40\x65\x2c\x15\xf7\x22\x3b\x5c\x9e\x24\x76\x71\x75\xb9\xc7\x1b\x14\xa1\xd4\x5d\x8f\xde\xbe\xbb\xe3\xfd\xf9\x0e\x07\xd1\x81\xcf\x49\xbf\xa4\xe1\xbd\xc9\x6e\x80\x81\x5d\xc0\x09\xf9\xd8\x04\xa5\x6f\xb0\x39\x91\x16\xb3\xcf\x70\xb4\x60\x6c\x14\x1b\xbc\xd7\xcf\x98\xaf\x90\x3f\xee\x27\xfe\x5e\xce\x2a\xb3\xf5\x1c\x8c\x65\x2b\x99\xae\x6a\xe5\x64\x9f\x7d\xad\x4e\x58\x1e\xdb\x14\xf2\xdf\x13\x86\xe9\x77\x32\x39\x5b\x30\x2e\xfa\x19\xa5\x0d\x5b\xfc\x0b\x5d\x08\xee\x02\xf6\x9b\xd8\x5c\x9a\xf8\x7c\x90\x0e\xd2\x1e\x1b\x69\x95\x22\xa1\xcb\xf8\xdc\xb0\x2c\xed\x80\x87\xd8\xe5\x4b\xac\x03\xcd\x38\x3b\x7d\x6a\x94\xc7\x8c\x47\x50\x7b\x78\x2a\xde\x5b\xe7\x40\x8f\x15\x99\x3c\x37\x43\x7d\x7b\x7d\xc9\xb8\x66\x73\x9e\x11\x5e\xc1\x0f\x2a\xe1\xe9\x84\xa5\x22\x3f\x2a\xb2\xa4\x7f\x65\x1e\x50\xe5\x0d\xd3\xb6\xc7\xc4\x8c\xcb\x04\xde\x85\x7f\xd9\xb2\xdb\x4b\x7b\x31\x8d\xb0\x9b\x0b\x6a\xd9\x83\x0a\xd9\x29\x9f\x09\x33\x76\x14\xc7\x6a\x00\x54\x90\xa2\x95\xb2\x4b\x40\x90\x12\x39\x56\x23\xc7\x50\x10\xae\x9d\xbb\x78\xb4\x60\xd7\xdf\xbf\x60\x27\xc7\x67\x46\x26\x13\x80\x45\xcc\xce\xfa\x27\xec\x97\xeb\xef\x5f\x98\x5f\x7f\xed\xb3\x1e\x93\xf3\xbb\xa7\xe7\x58\x23\xfc\xee\x29\x14\x0a\x0f\x8f\x14\x07\x79\x79\x85\xaf\x3c\xb7\xaf\x3c\xdf\xec\x95\x48\xc6\x99\x99\xce\x8b\xcb\x97\xd7\xab\x9b\x43\x8b\x1e\x9b\xf1\xc8\xb4\xff\xe9\xe2\xc5\xba\x25\xc4\xd7\x4c\xc3\x1e\x2b\x0a\xd8\xf1\x94\xbd\x7d\x7b\xf9\x92\x82\x6e\x51\xe8\x2f\xe6\x73\x84\x5a\xf0\x97\x07\xc3\x0d\x27\xe2\x3d\x3b\xf8\x4e\x1e\xfe\xc7\x2f\xc7\xbd\x6f\x79\x6f\xfc\xeb\x7f\xfe\xe5\x63\xef\x3b\xf7\xc7\xd3\xcd\xfe\x38\x39\xfd\xf8\x2f\x34\x82\x33\x37\x84\xb3\x1d\x8e\xe1\xcc\xfd\x75\xb6\xc9\x20\x9e\xba\x41\x3c\xdd\xe1\x20\x9e\x56\x07\xf1\x97\x6f\xf9\xe8\xd7\xf0\xb8\xbc\xa1\x3c\x73\x43\x79\xb6\xc3\xa1\x3c\xdb\x76\x28\x52\x8f\x52\x24\xdb\x9b\xbf\xbd\x3e\x39\x66\x2a\xc3\x7f\x9d\xd9\x64\x16\x3a\xfe\x00\x3a\x32\xe8\x1c\x9f\x9d\x9e\xfc\xf9\xd9\xc9\xf1\xd3\x33\x9b\x06\xf3\xed\x9f\xff\xd2\x73\xbf\x9e\x0c\x3a\xd4\xe7\xc9\xb1\xdf\xeb\xfa\xbe\xe8\xad\xb3\xf2\xad\x25\x23\x08\x7c\x2f\xca\x44\x2c\xf3\x88\x67\xc0\xd8\xf0\x2f\x66\xfe\xb4\x3d\x04\x57\xf2\x3f\x0e\xbe\x3b\x87\x9d\x83\xb5\x38\xf8\xee\x1c\xff\x7d\xf6\xf1\xf0\xbb\x0f\xcf\x7e\x39\xe9\x3d\xfb\x95\x1e\x3e\xfd\xf8\xe1\xf9\xc1\x77\xe7\xc7\x27\x27\x1f\x60\x79\xf1\xf7\x43\xf7\xea\x87\xb3\x5f\x9e\xfe\xd9\x36\x3e\xfb\xf8\xe1\xcc\x34\xfe\xe5\xb8\xf7\xec\xd7\x0f\xbf\x3c\xff\x4b\xb5\xf5\xc9\xc7\x0f\x07\xdf\x9d\x9f\x9e\x9c\x9d\x7c\x38\xf9\xcb\xf1\xf1\x87\xb3\x67\x83\x41\x6c\xbe\x69\xfe\xdf\xc9\xc9\xc7\xc3\x7f\xa1\x14\xa6\x74\x01\x09\x53\xb1\x9c\x98\xb9\x94\x1c\x79\x26\xdf\x63\xcc\x64\x8f\x69\x6d\x76\x8e\xbd\xed\xdf\xf4\x99\x56\x91\xe4\x89\x61\x68\x05\xd4\xf3\xa0\x89\x97\x57\x83\x37\x6f\xfc\xe2\x2f\x3d\xf6\xeb\x77\xe6\x9f\xa7\xe5\x3f\x9f\x02\x49\x4c\xc5\xfb\x48\x25\x2a\x83\xad\x98\x8a\xf7\x3c\x16\x91\x9c\x61\xe8\x26\x14\x87\x8d\x85\xdd\x8c\x6f\xbe\x87\xff\x3b\x0f\x7f\xe8\x9b\xef\x0e\x88\xdc\x2e\x7a\xdf\x9b\x95\xfd\xe0\xff\xf9\xdc\x4c\xb6\xc7\xb2\xc9\xa8\xfc\xda\xf5\x0f\x7f\x6b\x7c\x25\x9b\x8c\xec\xe7\xb2\xc9\xe8\xe0\xf4\xd9\xb3\x2e\xfd\xef\x5b\xd8\xfd\xd1\x22\x17\xe7\x6c\xc4\xb5\x78\xfe\x94\x89\xd4\xbc\x18\xb3\x91\x4c\x79\xb6\x60\x90\x07\xdf\x63\xb6\x10\xff\x39\xac\xab\x05\x5f\x72\x17\x9b\xb9\x26\xcd\x4a\xc6\x18\x8f\xef\x53\xdb\xe9\xf1\xf1\xf3\xde\xf1\x49\xef\xf8\x74\xd0\xa9\x5d\x23\xe3\x22\x49\x7a\xf0\x8a\x4c\xcd\x9d\x72\x76\x76\xf6\xad\xe9\x8c\x0a\x3a\x40\x87\xae\xb8\x43\xb5\xd3\x53\x96\x6a\xec\xaf\xc1\xbb\xa1\x0c\x20\x30\xef\x97\xf6\x65\x58\x0d\xcc\xab\x4f\x04\x92\xc7\x4d\xc4\x13\xaf\x7b\x92\x18\x70\x26\xa6\x07\x37\x1b\x40\x65\xad\x4f\xe9\xe4\x69\xef\xe4\xb4\x77\xf2\xec\xf6\xe4\xdb\xf3\xb3\xe3\xf3\xd3\xe3\xfe\xf1\xf1\xf1\xff\x6e\x4c\xd0\x74\xd0\x83\x0e\xca\x09\x06\x7d\xb1\x58\xb7\x71\x39\x36\xe2\xa7\x10\x9f\x49\x70\xee\x76\x66\xfc\xfd\x65\x2d\x4c\x3d\x5c\xc3\xe6\xf9\x53\x6a\xfe\xa3\x48\x27\xe8\x3e\xde\xac\x7d\x55\x37\xd8\xec\x9d\x9a\x64\x8a\xc7\xd3\x6f\x1c\xab\x62\x84\x5e\x8d\x99\x4c\xb7\x9a\x80\x4c\xb7\x9b\x80\x4c\xb7\x9f\x40\x43\xb4\x5e\x39\x01\xa3\xe4\xce\x13\x51\x51\xfd\x57\xbd\x90\xaa\xfc\x53\x29\x81\xdd\x4e\x5a\x24\x09\x1f\xa1\xf2\xd2\xd4\x13\x54\x2a\xbe\x08\x8b\xc5\x9c\xe7\x46\x8c\x0d\x9e\x2b\x7a\x16\xdc\xc5\x2f\x40\x95\xc5\xf1\x7f\xc9\x83\x2b\x03\xdd\x96\xef\x73\x13\x06\x2d\x97\x79\x85\x6a\x9a\x90\xc8\x4d\xbb\x36\xa0\x3e\xd7\x4f\xb3\x47\x6e\x15\x70\x12\x31\x1b\x89\x38\x16\xb1\x8b\x93\x6a\xaa\x8c\xab\xdb\x7b\x4e\x67\x9e\x5b\x64\x94\xc2\x16\xe3\xb2\xcd\xfd\x6a\xf1\xb6\xee\xec\x1b\xf2\xfc\xc3\xe5\x72\xbb\x98\x8b\x9f\x04\x21\xcc\x94\x98\xe9\xa8\x6c\x02\xb8\xb3\x35\x44\x59\x77\x25\x22\x32\x7a\x85\xae\xc7\x45\x06\xde\xc6\x4c\x98\xc5\x88\x72\x8a\xa4\xa2\x01\xd8\xd7\x10\xd0\xa6\x56\x9b\xa7\x02\x5f\xe3\x94\x58\xc6\x8b\x5c\xcd\x78\x6e\x93\xc0\x37\x41\x75\xa9\x8d\x69\x24\x20\xf0\xbe\xcb\x46\x45\x5e\x96\x53\xc2\xda\xe1\xf0\x54\xfa\x1e\x50\xf3\xb2\xb9\xe1\x17\x1e\xdc\xcc\x41\x31\x37\x4d\xeb\xc3\x2e\x31\x79\x0e\xc3\x31\xd0\x95\xc1\xca\x34\xef\xa9\xac\x47\x44\xb2\x7a\x87\x2b\x6d\xbd\x74\x1a\xda\x5f\x07\x5e\x29\xb5\xab\xb9\x5f\x96\xa5\x33\xea\xb0\x33\x22\x5c\x52\x16\x00\x65\x1f\x74\x91\x20\xe6\xf9\x82\xb9\x72\x6d\xb4\x52\x90\x7d\x66\x7e\xe3\x9a\x45\x53\x99\xc4\x88\xec\xbc\x78\x33\x06\x4c\x51\x91\xd9\x3a\x73\x63\x4f\xe8\xf3\xea\x6a\x95\x3f\x12\x9f\xd2\x60\x80\x38\x39\xc4\x4e\xce\x07\x29\x63\xac\x07\x9f\x38\xb7\x63\xad\xfc\x86\x43\x1e\xa4\xa7\x87\x0c\xec\xd8\xf6\x0d\xef\xf5\x70\x07\xcd\x2e\xe0\xa7\x7e\xbf\xcf\x7e\x13\x99\x32\x0b\x32\x53\x99\x58\xbf\x45\x89\xd4\x79\x6f\xc6\xe7\xbd\x77\x62\x11\x08\x2f\x58\xde\xd6\x96\x73\x17\x70\xe0\x30\xe0\xcb\xd5\x9d\x6f\xbe\x06\xcb\x3c\x9c\xf1\xf9\xd0\x88\x5b\x14\xfe\x6e\x65\x68\xe8\x0f\x82\xc4\x5d\x2d\xfb\x58\xbc\xb7\xab\x3c\xe3\xf3\xbe\x59\x56\xc0\x7a\xcd\xf9\x04\x0b\xe8\x40\xd9\x2b\x1b\x5b\xae\x52\x4a\xaf\x04\x6a\x71\x35\xf2\x07\x81\xf1\x9b\x81\x0c\x3a\x25\xfc\x91\x8d\x61\x1d\x74\x66\x7c\x3e\xe8\xf4\xd9\x45\xa2\x55\xb7\xe4\x28\x7e\xd1\x34\x87\x5c\x5a\x62\xa6\x7a\x31\xab\x46\x4e\xcd\x60\x57\x62\x8a\x5c\xb5\xf9\x27\x40\x5a\x18\xae\x5a\x64\x82\x1d\xa4\x8a\xa5\x42\x5b\x93\xba\x73\xa7\x1d\xd2\x34\x05\x2b\xaf\x14\xef\xeb\xf0\x29\xa2\x7d\x1f\x5c\x4a\x65\x38\xe3\x9a\x55\xbf\x6b\x66\x05\xd9\x98\x66\x31\x94\xae\xf4\x6a\x18\x0e\x59\x94\x1c\xde\x0f\x42\x9d\x18\x06\xbe\x1d\x66\x66\x78\x8d\x37\xa1\x25\x3c\x7b\x4d\x3a\xf2\xb8\xaa\xcd\x03\x62\x12\xc2\x43\xe6\x2a\x51\x93\x05\xe1\xfe\x96\x7b\x08\x4b\x13\xa6\x08\x8b\xaa\x0e\x4b\x74\xc6\xe6\x4a\x6b\xd0\x2d\x70\x73\xed\x79\x1d\xf2\x5c\xcd\x64\x34\x3c\x2f\x91\x53\x80\x7d\xa0\xf3\x81\xeb\x32\xc9\x4c\xa4\xb9\xcc\x17\x5d\xd4\x30\xec\xae\xf7\xe9\x50\x5e\x40\x2f\xf4\x65\x8b\x02\x66\xde\xc8\x44\xb2\x60\x99\x98\x27\x3c\xb2\xe9\x29\x0e\xbf\xbb\x3a\x17\xea\x89\x32\xbf\xed\x5c\x8c\x2e\x67\x6b\x0d\xc0\xe8\x0e\x90\x9c\xba\x34\x80\xae\x39\xfa\x86\x7e\x4e\x0f\xd9\x50\x8b\x7c\x68\x99\xc7\x8d\xc8\x4b\x98\x13\x5b\x45\xd3\x26\x76\xc0\x9a\x58\x11\x16\xb7\xbe\x3c\xc3\x9a\xcf\x84\xf5\x00\xbf\xe2\xd1\x94\x3a\x44\x2e\x5c\x27\xfb\x6e\x09\x88\x8f\x3d\x54\x36\xdb\xf0\x0c\x64\x00\xb4\xcc\xc0\xb0\xed\x54\x3d\xde\xb1\x8c\x6f\xd0\x6b\xfd\x41\x7a\x76\x88\x5c\xc4\xce\x0f\x7d\xd3\xb4\xd5\x19\xa9\xd1\x33\x3e\xd7\x18\xe4\x89\xb2\x81\xcc\x98\x48\x04\xa0\xcf\xda\xa3\x92\xaa\xb4\x87\x5c\xe6\x9d\x58\x50\x5f\x36\x17\xdf\x56\x83\x35\xaf\xce\xfa\xec\x0d\x62\xc8\x78\xc8\x72\xac\x98\x43\x20\x49\x46\xe9\x43\xe6\x83\x86\x33\xd9\xbd\x0b\x51\x23\xc5\xa2\xc0\x34\xdd\x60\x0c\x83\x80\x5d\x45\x29\x61\x90\xfa\xe8\x73\x38\x69\x3c\x9e\x66\x89\xc2\x98\xcc\xc1\x85\x5e\x73\xf8\xdc\x7e\x54\xce\x1e\x6d\xdf\x0e\x0e\x1f\xd0\xb7\xbd\x6c\xa9\xdb\xca\x39\x3c\x5d\x7a\x0e\x27\x19\x4f\x8b\x84\x67\xb5\x0d\x86\x1d\x2d\xe1\x13\xf0\xef\x83\x77\x62\xd1\x43\x7a\x9c\x73\x99\xe9\x43\xf8\x08\xd4\x4b\x26\xa9\x08\xfc\x07\xa9\x75\x85\xe5\xd4\x25\x24\xa6\x41\x33\x8c\x13\x3b\x80\xac\xf0\xc8\x88\x09\xe6\xc7\x91\xf9\x5c\x2a\xe7\x45\xc2\x29\xc6\x55\x8b\x39\xcf\x00\xab\x2b\xca\x55\xa6\x4b\xdc\x71\xea\x90\x72\xb4\x80\xf7\x8e\xc4\x94\xdf\x49\x55\x64\x8e\xaf\x9a\xb1\xd2\xc9\xdc\x29\x97\x81\x35\xd8\x90\xc9\xac\xa5\x9c\x25\x72\xe5\x1a\x42\x5a\x26\x8d\xea\x5c\xcd\x4b\xf0\x2f\x2a\x67\x1a\x8b\x48\xc5\x20\xdc\xe5\x62\x8e\x9b\x60\x13\x37\x37\xc3\x97\x6c\x64\x4d\xd2\x3e\xf0\xf1\x18\x20\x06\xa8\x97\x4c\x44\x45\xa6\xe5\x9d\x48\x16\x28\x00\xeb\x7b\x99\x47\x53\xa1\x01\xbc\xd1\xd0\x37\xe2\xa9\xbb\xaf\x97\x5b\x26\xc7\x70\x31\x8b\xd8\xbf\x2b\xcd\x36\x06\x94\xb8\x6a\x1a\xb2\x1d\x63\x65\x60\x40\x52\xee\xc2\x06\x34\x49\xdf\xd3\xde\xc7\x1a\x34\x20\x7e\xab\x6c\x24\xe3\x58\xa4\x21\xa9\x7a\xf7\x11\x5a\x61\xff\xdd\x4e\xa2\x8d\x76\x1d\xae\xb3\xe3\xfe\xac\xf5\x6c\xe7\xdd\x42\x3c\xca\xce\x7b\xf5\x3d\xe5\x8f\x0f\xa3\x5b\xb2\x16\x9b\x47\x44\xd1\x1b\xd5\x62\x98\xc8\x81\x31\x77\xa4\x42\xf0\x18\x3b\xe5\x07\x54\xa1\xdb\x12\x2f\x7c\x35\xae\x3f\xee\xb3\x9f\xb8\x34\xf7\x08\x64\x7e\x50\x19\x7f\xc8\xe4\x22\x58\x93\x22\x83\x5c\x81\x4f\x14\x29\x46\x7b\xba\xcd\xea\x98\x17\xfc\xc5\x09\xcd\x9f\xd1\xb9\xb6\xb2\x55\x03\x70\xd6\xe6\x3c\xd8\x76\xc4\x8a\x16\x9f\x6c\xda\x3e\xd1\x6d\x33\x7b\xef\xbd\x2a\x85\x04\x97\x81\x34\x7d\x20\x86\x7d\x4d\xed\x46\x64\x77\x32\x12\xd7\x16\x46\x63\xd5\x74\xea\x6d\xd9\x54\x81\x08\xe1\xc2\x45\xc1\x76\x42\xad\xfa\x89\x98\xf0\x68\x41\x65\x75\x36\xc0\x21\x01\x14\x58\xc2\xb1\x6f\xe6\x92\xae\xc7\x7b\xf0\xb1\x16\x35\x8d\xc1\x15\x08\x5e\x8a\x6a\x0d\x1f\x0d\x23\x5b\x43\xbd\x7c\xaf\x73\xfc\x61\x9b\x2f\xcc\x83\x89\x68\x98\xfc\x83\x02\xa5\xc5\x91\x7c\x7b\xfd\x23\x26\x05\x71\x5b\xad\x3c\xaf\x97\xe8\x1e\x09\xcc\xe0\x8c\x96\x49\x2b\x46\x45\x0e\x7c\x0d\x0a\x46\x54\xbf\x46\x83\x67\xf0\x6c\xc3\x2f\xb2\xa1\x69\x3d\xf4\x72\xd6\x6d\xe4\x05\xf4\x62\xc1\x0e\x4f\x7a\xcf\x9f\x3d\x3b\x7b\xd6\xc5\xd2\x6e\x46\xc6\x38\xac\x1e\xe0\xa7\x4f\xcf\x2a\x30\xd1\x35\x94\xe8\x72\x62\x61\x17\xc4\xd9\xe9\xde\x42\x81\x43\x25\x96\x57\x9c\x86\x40\xf3\x32\xc5\x16\x4d\x34\xae\x8a\xb7\x99\xf8\x0c\xd3\xac\x6e\x7f\xbc\x31\xcd\x52\x0a\x36\x71\xca\x24\xad\xfc\xfa\x30\xd8\x88\xff\xad\x48\xe3\x50\xbe\x8f\x7d\x82\x51\x88\x57\xaf\x7e\x72\x0e\xd0\x17\x17\x6c\x84\x8f\x70\xab\xed\xf6\x36\xa0\x76\xbd\x91\x3c\xd1\x56\x2c\x8d\xcc\xc7\x21\x92\x17\x31\x7c\x8b\xd4\xc3\x96\xd1\x0b\x9d\x8b\x99\xe1\xcb\x3a\x67\x99\x52\x46\x67\x43\x41\xcf\x2d\xbc\xc3\x1e\x6d\x92\xad\xb7\xb9\xa3\x45\x2e\x2c\xba\x86\x0c\x1d\x4a\x4b\xb5\xb2\xc1\x72\xbc\x03\x59\x5a\xa0\xec\x82\xb2\x57\x78\xdd\xda\x06\x46\xbe\xcc\x12\xa7\x9f\x97\x80\xa9\x46\xc1\x22\x44\x53\x57\x79\x1c\x8c\xe2\x20\x02\x9b\x8d\xb2\x99\x94\x08\x6d\x4d\x60\x99\x0b\x55\xd8\x43\x01\x20\xb5\xf4\x9d\x7d\xd5\x1b\x6f\x30\xec\x32\x62\xbe\xba\x5c\x66\x92\x13\x79\x47\x09\x4f\x09\x15\x8c\xb1\xfc\x8b\x66\xd8\xc5\x84\x6f\x9e\xc6\xe6\x28\x1a\x2e\x04\x25\x03\x0e\x86\x20\xa5\x8b\xf3\xa3\xa3\xa9\xd2\xf9\xb9\x39\xe2\x47\x86\x3f\x0d\x0f\xfb\xec\x95\x87\xff\xa1\xc6\x6c\x58\x64\x09\xe6\xbe\xdb\x99\x2f\x59\xdb\xdb\xa9\x60\x43\xd3\x9d\x63\x22\x46\x87\x81\x8d\x04\x65\xde\xed\x90\x5d\xf2\xea\x72\xff\x95\x8a\x34\x79\x4b\xec\x0a\xf4\x23\x18\x30\x18\x1a\x20\xd0\x6b\x26\x27\x53\x02\x3c\xd3\x2a\xb1\xc0\x2a\x2e\x8d\xe1\xe5\xeb\x1b\x98\xb7\x9a\x79\x54\xaa\xb1\x70\x56\x17\x8b\xe9\x94\x1b\x32\x34\x32\x1b\x8e\x14\xfa\x62\x32\xed\xd1\x90\xa0\x23\x6e\x21\xe9\x4a\xbe\x98\xf0\x85\xc0\x8a\x78\x52\x25\xb0\xec\x87\x7d\x3b\x75\xa3\xe1\xf3\x44\x83\x8f\x01\xe2\xc3\x6c\xf0\x16\xac\xd1\x55\x22\xb8\x06\xe5\x8e\xe4\x45\x8c\xea\x1d\x9a\xed\x4b\xb0\x03\xb3\xd2\x27\xa7\x7f\xee\x1f\xf7\x8f\xfb\x27\x43\xd4\x89\xa9\x6f\x43\xae\x52\xbf\x5b\xb0\x22\x4d\x84\xd6\x40\x9a\x90\xdd\x39\x31\x0a\x34\x8b\x00\x70\x51\x99\xf5\xad\x1c\x11\x86\x89\x1f\xb0\x74\x56\xc5\x34\x6d\x8c\x20\xea\xce\x30\xfe\x8c\x0b\x9b\x0a\x64\x1b\xc0\xd2\xa0\x18\x16\x9e\x42\xff\xd4\xdd\x14\xd1\x14\xab\x6c\x99\xc7\xd6\xf0\x94\x2c\xc8\xbd\x92\xaa\xb4\x67\xa8\x8a\x8f\x12\x81\xe1\x86\x5d\x20\x07\xc1\x35\x34\x81\xd4\xef\x62\x6e\xb6\x89\xb3\x54\xdc\x5b\x2a\x70\x94\x84\x04\xea\x48\x6d\xd0\x01\x78\x82\x41\xe7\xaf\x40\x22\x86\x92\xe9\xd1\x44\x12\x97\xa5\x26\xe7\x47\x47\x83\x0e\x74\x73\xc1\xec\x55\x6c\x6f\x46\xca\x76\x75\x30\xe5\xd6\xc8\xc8\x53\x9b\xf4\x8f\x3e\x0f\xb2\xcc\xc0\xe0\xde\x5e\xff\xd8\x67\xff\x4b\x15\xd0\xd6\x92\x28\x74\x9c\x2b\x88\x35\x41\x81\x7e\x24\xf3\x8c\x67\xae\x1b\xe2\x5a\xee\x18\x62\x42\x0d\x04\xd2\x76\x19\xb7\xb3\xb5\x86\x36\x49\x13\xbf\xc8\x73\x31\x9b\xdb\xba\x10\xe6\x63\x54\x41\x08\x2e\x54\x2d\x23\xc6\x8b\x7c\x8a\x60\x57\x83\x8e\x79\x72\x6e\xa3\x5d\xfe\xc7\xa0\x83\xa9\xe2\x79\x99\x68\xfe\x7d\xc6\x27\x68\x66\x3b\x18\x74\xbe\xe9\xf7\xfb\x83\x0e\x5a\x88\xfe\x59\x88\x6c\xc1\xe6\x3c\xe3\x33\x01\x81\x46\x07\x83\xce\x77\xf6\x39\x19\x1f\xa8\x97\x2e\xa9\x33\x5b\x17\x66\xdd\x89\xb4\x5a\xd5\xf8\x1a\x45\x09\x8f\x5c\xee\xe6\xff\x57\x70\x30\x18\xad\xba\xd1\x6d\x1b\x42\x70\x92\xef\x45\xdc\xc3\xb4\xcd\x40\x75\x53\x92\x78\xc0\xdd\x39\xcf\xd4\x9d\x8c\x6d\x41\x9b\x54\x22\xe5\x64\x7a\x8a\x29\xb2\x45\x5a\xfe\x61\x68\x06\x32\x87\xcc\x32\xff\xaf\x8b\x9f\x7e\x04\x0e\x6c\xad\x27\x20\x3f\xc3\xea\x1d\xe0\x46\x5c\xe8\xcb\x34\x7f\xfe\xd4\xfc\x05\xe0\x1a\x2a\xd3\xe5\x09\xa8\xa8\x7e\x2e\x7e\x18\x0c\x85\x08\x3e\xf6\x4f\x9a\x10\x81\x48\xd3\xff\x9d\x9f\xff\xab\xad\x11\x26\x27\xa9\x88\x5f\xc3\x44\xb0\x0d\xfd\x0e\x40\xd2\xf4\x4b\xca\xd8\xc1\x6b\xc7\x8f\x9a\x0d\xec\x19\x01\x07\x62\xb7\x2c\xd8\x39\xe8\x0c\x3a\x0c\x42\x17\x65\x4a\xaf\x51\xe8\xd8\xcd\x25\xd5\x9f\x39\xb4\x03\x85\xc0\xb6\xea\x28\x69\xa0\xc7\xec\x03\x3b\x61\x1f\xc0\x6f\xf7\x81\x7d\xcb\xbc\xf6\xba\xfe\x42\x39\x31\xbf\xbf\x0f\xcd\xdf\x02\x9d\x50\x8d\x1c\x6f\x29\x96\xf6\xab\x43\x1d\xeb\x4a\x49\x9d\xf5\xed\xcc\x94\x96\x0e\xc3\xec\x4b\x63\x35\x70\x18\x9d\xff\x67\xd0\x31\x3d\x76\x7a\x83\xce\xd2\x5d\xac\x0e\xba\x32\xa9\x0f\x8d\x4f\x04\x1a\x05\x36\x39\xb0\x18\x18\x55\x67\x37\xb3\x9c\x26\x6e\xf2\xab\xf7\x73\x95\x8a\xb4\xb1\x0b\x55\x12\x08\x77\xe5\x7d\xea\xef\x92\x7d\x60\x3f\x99\xff\xfc\x60\xfe\x73\x6b\xfe\x73\x65\xfe\xf3\x4a\x02\x65\x62\x80\x37\x27\xc5\xe6\x06\x85\x51\x28\x16\x23\x73\xfd\x57\x76\x23\x04\x02\xd7\x9c\x1f\x1d\xcd\xa7\x0b\x2d\x23\xdd\x4f\xa5\xce\xfb\x13\x75\x77\x14\x15\xc5\xd1\x5b\xd3\xee\x08\xbf\xdf\x9f\xe6\xb3\xa4\xa4\xc9\xda\x48\xcb\x31\xcd\x60\x03\x60\x1f\xde\x99\xd1\x99\xc1\x99\xb1\x99\xa1\x99\x91\xd5\x8e\xcc\xc9\xf1\xe9\x53\xf6\xaf\xec\xe4\xef\x12\x6c\xad\x27\xc7\xc7\xc7\xe6\xcf\x77\x7f\x65\x97\x2c\x96\x71\xfa\x24\x67\xd1\x54\x29\xba\x39\x22\x3e\x97\xb9\x3b\xd6\xfd\xfa\x70\x6a\xcb\x8a\x34\x21\x56\xd1\x82\x19\xeb\xab\x15\x0d\x0c\xbb\x78\x6d\xee\xf2\x3c\x77\xd7\x3c\x09\x89\xf9\x34\x13\x02\xf0\x27\x52\x72\x83\xce\xb4\x85\x84\x34\xd7\x35\xb3\x0c\x86\xaa\x32\xdb\x5b\xd3\x81\xea\x83\xdc\x61\xf3\xcc\x4f\xff\xe3\xf9\x59\xef\xc4\x70\x83\x19\x9f\xa4\x32\x2f\x62\x61\x3a\xc9\xb0\xe4\xaf\xf5\xb5\x29\x70\xc6\xf2\x94\x9d\x31\x1b\x69\x0a\xe6\x7a\xdd\x67\x38\x6a\xcd\x12\x9e\x51\x48\x03\xb4\x9e\x67\x22\x92\x5a\x94\x3a\x2b\x9f\xcf\xd1\xe9\x9b\xa9\x02\x12\x54\x8b\x79\x9f\x1d\xbc\xea\x4f\xfa\xe7\xec\xb8\x7f\x32\x23\x78\x19\xf7\xd0\x70\xdd\x93\x59\xff\x10\x4d\xd2\x96\x9d\xd9\xec\x56\x5b\x4a\xab\x00\xcf\xb4\x1c\xb3\x7b\xe7\x59\xf6\x46\xa2\x67\x1c\x70\x80\x69\x45\xa4\x40\x3e\x0d\x88\x01\x9c\xf9\x37\x0b\x05\x79\x02\x9f\xe4\x2e\x11\xd4\x96\x48\xc8\xc4\x4c\xc0\xd2\xe5\x5e\xed\x74\x02\xf6\x87\x35\x8a\x51\x46\xf1\xaa\x96\x92\x23\x12\xdd\x55\x13\x0e\xa5\x1c\x44\x6a\x5a\x4b\xed\x21\x3d\xc1\x78\xfe\x26\xc6\x2a\x2b\xaf\x0e\xf8\xb4\x1b\x9c\x5d\xc0\x79\x01\xd8\xbf\x83\x4e\xc4\x53\x95\x02\x90\x9d\xd9\xfa\x41\x87\x8c\xf6\x33\xc1\x53\x12\x7a\x2d\x39\x1e\xd1\x10\x6d\x17\x3c\xfe\x47\x01\x5e\x82\x62\x6e\x56\x27\x56\xf7\x29\x3b\xa0\x72\x0c\x25\x7c\x0e\xde\x87\x51\x06\x32\x2f\x00\xb1\xd2\xbf\x65\xca\x7e\x32\x83\xd2\x9a\x1f\x62\x3d\x03\xf3\x35\x70\x78\xf1\x3e\x7b\xad\x68\xcf\x29\x89\x3d\x51\x1a\x1c\x57\x23\x78\x34\xce\x78\x44\xec\x00\x59\x6b\xe9\x01\xc2\x60\x15\xd3\x94\xe0\x3e\x1d\x69\x1f\x98\x2d\x84\x29\x1c\xc2\xed\x4f\x44\x06\x41\xb9\xe4\x87\xeb\xd3\xad\x2b\x27\xa9\xeb\x51\x51\xf8\x0b\xc9\xdb\x60\x29\x42\xca\x37\xa2\x96\x98\xf0\x5c\xde\x09\x58\xf8\x57\x28\xdb\x69\x98\xc3\x49\xff\x99\xeb\xc2\x83\xe2\xe2\x9a\x0d\x3a\x27\xcf\x8e\x8f\x67\x83\x0e\x35\xfb\x41\xae\x68\x78\xf6\xfc\x27\x69\x5a\x9a\xf3\x6b\x99\x8d\x19\xc2\x3f\x2b\x1b\xfa\xfa\xd5\xcf\xaf\xae\x21\xa2\x89\xaa\xa9\x27\x8b\x3a\x42\x0d\xc7\xc4\x64\x10\x6f\x41\xde\xb1\xb2\xcd\xed\x14\x53\x92\x40\x54\x9d\xaa\x44\xd0\x73\x0b\x23\x2a\xde\x8b\xcc\x9c\xbd\x3e\x0e\x22\xed\x95\x14\x43\xa1\x21\x58\xf7\x23\x37\xff\x05\xc2\x87\xa5\x55\xe9\x84\xe2\x58\x16\x20\x4e\xde\x8b\x04\x49\xcc\xb0\x15\xc3\x23\xcb\xf2\x60\x3d\x61\x23\x8c\x52\xf2\x53\x57\x89\xb2\xcf\x0e\x6e\x94\x2d\x6c\x66\xce\x43\xf5\x71\x17\xa9\xcf\xf0\xd8\x58\x8e\xc7\xc0\x4e\x31\x4c\xa6\xcc\xb7\x32\xeb\x02\x27\xdd\x6a\x34\x12\x1b\xcb\x88\x00\x8e\xe8\x98\x69\xbb\xb9\x25\x92\xd3\x7d\x26\x61\xd5\x40\x93\x84\xea\x26\xe6\xb4\x1a\xad\x97\x27\x6c\xca\xd3\x18\x44\x3e\x88\x5e\x27\x36\x32\x55\xf3\x32\x64\x8b\xd3\x4c\x23\x6e\x3e\x21\x0d\x81\x18\x71\x5c\x65\xe8\xdd\x36\x5a\x22\xca\xf8\x20\x8b\xd2\xda\xbb\x66\xf5\x74\xfb\xd2\x12\xb8\xc6\x38\xb6\x42\x4c\x86\x20\xdf\x8b\x99\x2a\xd2\x7c\x95\xa4\xec\x35\xab\xda\xb1\x69\xa0\xee\x74\xa6\xc5\x4c\x64\x3c\x07\xaf\x46\xec\x6b\x41\x80\x18\x63\x8f\x9f\x8d\x19\x1c\x73\xed\x6e\x0b\x35\x17\x19\x95\xb8\x35\xa7\x3c\x1d\xf7\x5f\x8a\xc8\x82\x41\x14\x76\x0d\xa9\x08\x9c\x4f\xcf\x5c\x63\xb6\xfd\x3a\x50\x43\xe8\x06\xea\xa5\xf2\x24\x60\x70\x76\x98\x3a\x6b\xcd\x91\x5d\xea\x6a\x93\xe8\xe9\x0d\x4c\x97\x2b\x2a\xab\x5f\x5c\x5d\xfe\x60\x0b\x54\x2e\xdb\x1a\xdb\xa6\x6a\x8b\xc4\xcc\x37\xb8\x2b\x6c\x2c\x95\x43\x8e\x77\x18\xf3\x66\xdf\xc6\x22\xf3\xf0\xf0\x51\xd3\x01\x54\xe3\x0d\xa1\xc4\x5d\xf1\xa5\x26\x84\xb8\x0b\x91\x0c\x0e\xfa\xe7\x5a\x6d\x50\x0f\xc2\x59\xc4\x16\x12\xc4\xf2\x9d\x80\x3e\x96\xba\x40\xd2\x1b\x32\xe7\x90\x91\x09\x8b\x8c\x1a\x3a\x8d\xd4\x24\x05\xfe\x69\x71\x89\x49\x09\x4f\x78\x2e\x00\xee\x9e\xcc\x43\x14\x1c\x66\xe3\x31\x32\x01\xe1\x19\x45\xea\xf5\x80\x34\x18\x84\x47\x9c\xc8\x9c\x9c\x1e\x47\x91\x9a\xcd\x8c\x20\xba\x38\x82\x4a\x01\x72\x54\x98\xb3\x7d\x14\x8b\x3b\x91\x1c\x69\x39\xe9\xf1\x2c\x9a\xca\x5c\x40\xd0\x9b\x85\x2d\xbf\x33\x1a\xbf\x4a\x75\x7f\x16\x7f\xe3\x83\x9a\x36\x4e\x79\xb8\x78\xba\xad\x31\xee\xdc\x47\xe8\x7c\x74\x2b\x66\x23\x0a\x01\x65\xd8\x83\x78\x2a\xe3\x50\xca\x03\x5d\xae\x25\x88\x68\xe9\xd8\xe2\x5f\x3b\x25\xcf\x01\x1b\xa1\xa1\x0e\x34\x5f\x5d\x8c\x66\xe6\xda\xf5\x30\x8b\xfa\xec\x05\xda\xd0\x46\xa2\x8c\xea\xba\x4c\xcb\x6a\xed\x7b\x5f\x49\xc0\xe6\xe8\x99\x25\x0b\xae\xe5\x76\xee\xa5\xfa\x81\xf0\x7c\x30\xf6\x04\x2d\x25\xf5\x7a\x8b\x3a\x5c\x79\x79\x06\x29\x3f\xad\x8c\x0f\xb1\x25\xb1\xe6\x99\x1a\xf1\x51\xb2\x70\x85\xb6\x09\xf9\xd9\x16\x6c\x5a\x6f\x78\x76\x3c\xa6\xb4\x36\x1b\x1e\xd3\xbf\x3b\xe9\x03\xf3\xa0\xb1\x7d\xaf\xb2\x97\xb6\xde\x8a\x03\xbe\xce\x28\x0b\xf7\x6f\x0b\x72\x7d\x5c\xbe\xbc\x0e\xd5\x01\x80\x90\x2f\x35\xb6\x54\x01\x49\xab\x16\x58\x2f\x73\x19\xab\x39\x49\x18\x54\xe6\x12\xc9\x0b\xd7\xd7\x86\x10\x99\xb7\xa6\x22\x99\xbb\x4a\xe8\x19\x04\x21\x59\xab\x2d\x5d\xac\x33\x48\xf0\x15\xf9\xbd\xca\xde\xf5\x84\xb9\xbd\xe1\xb3\xf7\x7c\x51\x4a\x70\xec\x05\xf5\x60\xae\x0d\x2b\x3c\xf3\xb9\xe1\x53\x99\x84\x74\xaf\xea\xe0\x38\x84\x38\x23\x78\x03\x0c\x9f\x24\xac\x05\x56\x69\x03\x12\x06\x0b\x87\x1a\x97\x41\x82\xf0\x48\xe8\xae\x1b\xae\xe7\x1c\x40\x4b\x7c\x3a\x11\xb6\xd0\x9b\x99\xb2\xe9\x1a\xc5\x51\xfa\xbc\x85\x5a\x83\x88\x31\x0c\x4c\x85\x45\xa6\xc5\x82\x60\xef\xf4\x9d\x17\xd8\x4f\x4b\x6c\x66\x45\x03\xfb\xbe\x34\x27\x9e\x53\x88\x30\x5c\xad\x35\x60\x4d\xc7\xf2\x2e\xaf\x70\x86\xe6\x93\x5d\x1b\xfb\x4e\xdd\xc2\x72\x5b\xf0\x3a\x1c\x21\x5a\xa5\xab\x1d\x58\x66\xc1\x12\xa5\xde\x69\xc6\x73\xf6\x3f\x7b\xdf\xab\xec\x9e\x67\xb1\x88\xcd\xbf\xd8\x54\xf0\x18\xb5\xa5\xff\xd9\xbb\x16\x3c\xe9\x5d\xce\xbd\xdf\x88\x5d\xf4\xaf\xc5\x4c\xe5\x90\xea\x4d\x65\x8c\x79\x8e\x05\xe0\x0e\x0d\x21\x4c\x44\x65\xca\x97\x57\x8f\x28\x4d\xb0\xe2\x14\xdc\x2c\xa3\x74\x88\xe7\xdd\xa0\xc2\xa0\xad\x6d\x54\x56\xa4\x73\xf7\xae\x2d\xab\x52\xe7\x22\x3b\x1c\xfe\xf2\x43\xbc\xc6\x28\xbb\x42\xf8\x58\xda\xe7\x86\xc2\xcb\xf2\x25\x5d\x63\xc4\x6d\xca\x3f\x3f\x4a\xbd\x52\x3c\xf5\xdb\x55\x51\xce\xec\x93\x2e\x0a\xd8\x89\xba\x77\xc7\x34\x57\xae\xb8\x94\xe3\xbb\x3c\x67\x30\x82\x75\xc2\x0f\x6c\x65\x2b\xf3\xec\x5f\xe6\xa1\x85\x0e\x17\x68\xd7\xe1\xbd\xde\xcf\x11\x73\xb2\xf8\xc7\x56\x14\xdb\xa1\x28\xf6\x60\xf6\xe4\xf6\x63\x1b\x6e\x72\xed\xe5\xd6\xad\x60\x26\xd7\x0e\x26\xd4\x4b\xba\x2a\x45\x42\x5e\xad\x7b\x6f\x4b\x6a\xa3\x01\xce\x45\x0e\xc5\x9b\x16\x63\x92\xe9\xa4\x48\x78\xf6\x1a\xff\x2c\xdf\xef\x10\x9d\xc1\xfd\x33\x0a\x70\x9b\x88\xe7\x62\xa2\xb2\x10\xcc\x9e\xf7\xac\x7a\x48\x9c\x38\x2b\x62\x56\x2b\xb1\xe1\x26\x35\x12\x46\x66\x01\xd6\x01\x2e\x72\xf6\x84\x27\xc9\x93\xc3\xad\x52\x60\x26\x56\x6f\x0d\x9c\x5b\x2b\xc7\x96\xa2\x2f\xfe\x4c\xc3\x2b\xf1\x57\xd9\x2b\x48\x52\x93\xb3\x79\x62\xf7\xa0\xd2\x92\x54\x5e\x73\xae\xdc\xe0\xb1\x18\xda\xf7\x60\xdf\x2b\x71\x76\xa9\xfe\xb4\x0b\xb7\xe7\x5e\x05\x41\x62\x85\x63\x5f\x84\x02\x7c\xd0\x41\x27\x28\xf3\x87\x0f\xff\x3b\x3a\xfc\x90\xbd\x65\xfe\x6d\x83\x16\xdd\xc8\xfe\x7f\xf6\xfe\xbd\x39\x6e\x23\xcb\x13\x86\xbf\x4a\x06\xf7\x0f\x4a\x8e\x62\x89\x92\xbb\x7b\xa7\xd5\x31\xf1\x06\x4d\x4a\x36\xc7\xba\x70\x49\xca\xfd\xce\x2c\x27\xb6\xb3\x80\xac\xaa\x34\x51\x48\x34\x32\x41\xaa\x3c\xe1\xef\xfe\x44\x9e\x73\xf2\x02\x20\x51\x17\xb2\x28\xcb\xee\x7a\x9e\x9d\xb6\x58\x48\x24\xf2\x7a\xee\xe7\x77\x68\x2d\xdf\x2a\x75\xd8\x6b\x18\x1d\xa9\xc3\xa9\x52\xf1\x62\x6f\xa3\xb4\x54\x45\x53\xf3\xa2\xa5\xbb\xf8\xd5\x5c\x19\x12\x97\x98\x50\x78\x16\x61\xe9\xca\xd6\xe9\x6f\x1d\x77\x28\x15\xaf\xcc\x40\x21\x98\xb9\xaa\xcd\x40\x91\xc8\xf0\xac\x7d\x54\x75\x33\x9b\x61\xe8\x39\xb4\xa0\x02\x8f\xc3\xd3\xda\xe0\x54\xb6\xee\x5a\x7f\x20\xd1\x53\xaf\x6b\xd1\x6f\xe9\x35\x65\x14\x6e\x8f\xe0\x2d\x91\x64\x01\xb6\x40\xbf\x1f\x80\xfd\xec\x3a\x52\x15\xff\x67\x23\x8a\x25\xa9\x00\x9d\x6f\x82\x87\x03\x2c\xe6\x19\xe6\xa1\xd5\xc2\x8a\x91\x98\x24\x00\xc0\xc6\x90\x39\x43\x49\x11\x50\x5d\xda\xf6\x8e\xb5\xa0\xdd\x27\x00\x33\x95\x3e\x1d\x80\xe6\x03\xeb\xb8\x6d\x26\x22\x33\x05\x3b\x7d\x77\xce\x3c\xee\xe4\x00\xd0\x3e\xa8\x9a\x24\xb8\xfc\xc0\x75\x22\xbe\x11\xa2\x70\xb8\x9e\x13\xbb\x73\x01\x93\x6d\x25\x75\xd4\x52\x7a\xdb\xf4\x46\x6a\x27\xc0\xa0\x51\x16\xdc\x19\xf7\xb5\x34\x46\x94\x4e\x7e\x81\xa4\x60\x28\xde\x38\x66\x3f\xb5\x12\xae\xa2\x64\x11\x5c\x5a\xa8\x77\x8c\x5b\x41\x98\xfc\xe2\x9f\x0d\x2f\xa4\xf1\x65\x90\x01\xfc\xaa\x6c\xe7\x48\x43\x48\x5c\xd0\x41\x79\x49\x35\x98\x1d\x58\x9f\x93\x94\x10\x5c\x19\x02\x30\x42\x7d\xc5\x96\xcf\xa8\x53\x4b\xb2\x52\x51\xde\x4c\x3b\x4e\x0e\x14\x3e\x52\xbe\xae\x7a\x2b\xdd\xc2\x09\x84\x2c\x5f\x44\xa2\xa6\x41\xe2\x07\x9c\x13\x89\xcb\x28\xde\x53\xdc\x89\xd2\xf6\x2b\x0d\x9b\xd5\x3c\x6f\xec\xd5\x1d\x2a\x9d\x3e\x49\x6b\x35\x93\xde\x65\x74\xea\x8c\x3d\x3c\x0c\x5b\x3c\xc3\xac\xe2\x32\x2b\x9a\x5c\x68\xab\xab\x8d\xe0\x85\x11\xbb\xb7\x6a\xe9\x88\xb0\x0a\x47\x24\x78\x8c\x58\x85\x3f\xe7\xa2\x10\xf6\x4f\xfc\x6f\xa6\x8a\x02\xa3\x23\x47\x84\xf6\xab\x3e\x2f\xb7\xe3\x36\x9b\x16\xde\x4f\x1a\x3c\xd7\xf2\x9c\x6e\xf1\xb4\x01\xae\xf3\x68\xa6\x73\xf7\x92\x3d\xc3\xa2\x9c\x54\x2a\x80\x33\x0a\x84\xe9\x0f\xa1\x0e\x63\x3e\x24\xd5\xf2\x79\x92\x5f\x3d\xda\x02\xed\x84\xa1\x0d\x94\xb0\xb8\x69\x4f\x36\xbf\xf4\x85\x28\x50\x50\x72\xb1\xa8\x58\xee\xa0\x67\x73\x8b\xaa\x66\xc5\x9a\x34\x77\x32\x59\x46\xa2\x80\x3d\x31\x9e\xc6\x50\x34\x57\x8b\xed\x6e\x25\x93\xcd\x22\xa5\x17\x1e\x39\xdd\x64\xaf\xea\x7d\x11\x55\x6f\x70\x49\xe3\xa7\xee\x36\xf7\x0e\x00\xae\x66\xe2\x20\x4e\x55\x2a\x5e\x6d\xaf\xc7\xed\xd2\xa4\xbe\xa2\xd0\x5f\xb8\xcb\x3d\x27\x55\xff\xba\x87\x3b\x8c\xce\xe2\xe4\xe5\xdd\xad\x62\xef\xd5\xc2\x47\x98\xcb\xe2\x6e\xb6\x51\x49\xe3\x6a\xd9\x2b\x48\x6b\xa7\x68\x76\xcb\xd4\x18\x2a\xa9\xdf\x71\x59\x60\x84\xed\x36\xe6\x2e\xe7\x67\xa0\x6b\x55\x2b\x65\x30\xa0\x95\xf6\x06\x33\x7b\x2c\x7b\x22\x08\xe1\x95\x6e\x56\x37\x9f\x95\xee\x83\x3d\x39\xdd\x7b\x0b\x7f\x3f\xa4\x6d\xef\x07\xdb\xfb\xc1\xf6\x7e\xb0\xad\xfc\x60\xbc\x92\xab\x18\xd4\x36\x66\x9b\x07\xb3\xe4\x1d\x78\xa0\x4e\x41\x81\xfd\x58\x99\x75\x2c\xba\xd5\xd0\xc5\x94\x52\x9e\x00\x21\x4f\x80\x32\x4c\xe7\xc7\x72\xdf\x50\x6c\x69\x75\x02\xe0\x9e\x35\xee\x98\x35\xe6\xf5\xf2\xb2\x49\x2c\x26\x04\xef\xd2\xfa\x8c\x5a\x05\xc4\xb8\x61\x0b\x95\xfb\xea\x26\x3a\x4e\x68\xb3\xfb\x8c\x75\xb5\x2d\xdb\x3a\xb1\xb4\x01\xf3\x64\x01\xd8\x22\x9a\x3a\x7e\x96\xe5\xb2\x16\x99\x91\x77\xbe\xea\xa5\x86\x1a\x14\x51\xe1\x4b\x8c\x96\xd5\x68\x73\x2a\x03\xf8\x4c\x55\xab\x4c\x68\xed\xeb\xba\x0b\x4f\x3b\x18\x54\x79\x72\x91\x72\xbc\x16\xaf\xd9\x11\x3b\x29\x8a\xd7\x90\xe7\x95\xd7\x4b\xc8\xef\xd2\x86\xcf\x44\x08\x8f\xa5\xee\xe2\x54\xe6\x0d\x4c\x2d\x60\x76\x7a\xcf\x4b\x3e\x13\x75\x02\xd5\x3e\x7a\x8a\x72\x06\x08\xf9\x5c\x03\x44\xb1\xd5\xe1\x7d\x02\x2c\x20\xc7\xd8\x45\x42\x64\x17\xcf\x11\x17\xfc\x96\xa4\x10\xed\x4b\x99\x21\x9b\x68\x03\x2d\x51\x04\x2e\x07\x88\xdc\x97\xaf\xfe\x2d\xc6\x49\xb6\xbc\x06\xcf\x21\xf0\x12\xd2\x3a\x58\x55\xcb\x12\x32\xd0\xa2\xb6\x5d\x7c\x78\x7f\x1a\x01\x91\x17\x6a\xd5\x58\xaa\xd0\x94\x32\x53\xb9\x78\xf1\xbf\xce\xf5\x85\xed\x65\xaf\x4e\x7e\x61\xb7\xe0\x36\x56\xab\x33\xb0\x2b\x6e\x40\xb5\x5b\x0d\xd3\x54\x1b\x6c\x94\x7b\xaa\xbd\xa7\xda\xbf\x6b\xaa\x3d\xab\x79\x26\x2e\x44\x2d\x55\x7e\x25\x32\x55\xa6\x70\xac\x2c\x89\xf5\xa0\xe2\xb2\x64\x1a\x1b\xb2\x09\xe6\x90\x98\x80\x8e\x1a\x30\x21\xd0\x82\x9f\x77\x7d\x32\xa5\x2a\x8f\x5c\x3a\x84\x43\xe9\x8c\x69\x38\x20\x72\x86\xad\xc2\x5e\x98\x5c\x2c\x44\x6e\xb9\x44\xb1\x0c\x98\xa5\xde\x41\x53\xca\x02\x9d\x48\x0e\x57\x0c\xe6\x64\x77\x51\xaa\xe0\x6d\x0d\xf0\x53\x90\x1f\x13\x03\x1f\xb4\x71\x29\x38\xa8\x38\x34\x21\xfa\xc8\xb4\x8d\xb2\x45\xc8\xa1\x98\xfe\x92\x18\xe3\x3a\xec\x0a\x84\xcf\xde\x33\x85\xdd\x29\xe2\xaa\xae\xe6\xbc\x74\x8c\xc1\x24\x0e\xf1\x99\x5d\x95\x0c\x2a\xdf\xb0\x0a\x93\xeb\x9d\x02\x7a\x51\xab\x8a\xcf\xe0\x78\x5f\xa8\x42\x66\x4b\xf2\xcf\x44\x8e\x34\x38\xd1\xae\x03\x7b\x07\x5e\x8e\xff\xf7\x98\x5d\xe1\x71\xc7\xb3\x47\x9f\xa6\x5d\xd0\x90\x15\x04\xa3\x82\xb5\x9a\x02\x60\xd1\x8b\x29\x2f\x34\xc5\xdf\xdf\xd0\xa0\x6f\x0e\xd8\x54\x96\x90\xd0\x53\x47\x69\x53\x98\x87\xf2\xc2\x39\x12\xfd\x8e\x61\xf7\x87\x3a\xbc\xa4\x29\xb4\x81\xe0\x2d\xa2\xa1\xab\xba\x3f\x37\xc7\xcc\xa0\xa6\xf4\xa4\x41\x74\xcb\x89\x32\xf3\xb4\x7f\xde\xce\x59\x95\x79\xa8\xdd\xd5\x5e\x55\x57\xa1\x7c\xda\x14\x53\x59\x14\x56\x52\x42\xa2\xc0\x89\x3f\xa2\x51\x3e\xe3\x75\x6d\xaf\x9e\x6a\x0c\xac\x85\xfd\xa6\x33\x42\x8c\x18\x67\x7f\x3a\xfe\x2b\x3b\x55\xe5\xb4\x90\x96\x88\xa0\x3b\x3b\xa4\xfe\x58\xe5\x1c\x8d\xbc\x0f\xd7\x5f\x2f\x5a\xf3\x20\x28\xf2\xd6\xc2\x24\x19\x08\xa1\x27\xe7\x50\x0d\x7c\xc6\xeb\x09\x9f\x09\x16\xfc\x92\x81\xf8\x8a\x1a\xd3\x96\x06\xb6\xe1\x63\xe7\x7c\x0e\xef\x02\x10\x43\x47\xc9\x2a\xdc\x32\xa9\x21\x05\x32\x0f\xae\x62\xf1\x59\x22\x28\x6e\x38\x3a\x5a\x18\x6f\xfa\x21\xe0\xe9\x71\x74\x46\x5c\x6a\x87\x23\x19\x47\xde\x5d\xd6\xfe\xd8\x98\x9d\x64\x99\xa8\x50\x1a\x8e\x39\xd0\x21\xce\xe1\x90\x1d\xd1\xb9\x6e\x9f\x7b\xfd\x37\x76\xf8\x1d\xcf\x6e\x67\x90\x4e\x69\x5b\xa1\x99\x19\xfc\x31\xed\x85\x53\x00\xf3\x41\x74\xb3\xdd\x89\x9b\xc1\xc4\xf7\xf4\x37\x76\xf8\x56\xd5\x22\xea\x96\x65\x5c\x67\x3c\xc7\x24\x35\x58\x1f\xe0\xe8\xd8\x9f\x46\x16\xd9\xeb\x70\xea\xfb\xd8\x1a\x9f\x60\x85\x3c\xd9\x3e\x55\x1b\x1b\x0f\x5c\x0d\x8f\x95\x12\xa8\x67\xb8\x96\x17\xdc\xd7\xbc\xaa\x00\x40\xc7\x4e\x01\xcb\x81\xf8\x16\x68\xa4\x27\x6f\xa8\xf6\x41\x22\x11\xd6\x80\x51\x00\x31\x00\x87\xe0\x3f\xae\x3e\x7e\x00\xe2\x5d\xf1\xda\xc8\xac\x01\x48\x5a\xe9\x9b\x43\xd2\x94\x22\xe6\xa3\x9d\x07\x80\xd2\xab\x1c\xf0\xf4\x82\x57\x88\x44\x2d\x4b\xf6\xb3\xde\x51\xf2\x59\x58\x9f\x37\x9f\xed\x4c\x36\x10\xd3\x5b\x0d\x9d\x9b\x02\x31\x2b\x14\xfd\x18\xaa\xc7\x23\xb4\x0d\xf0\xcd\x99\x30\x00\x57\x62\x39\xbf\xa3\xea\x63\x76\x51\xf0\xb2\x24\xec\x6a\xa0\xbb\xbc\x40\x52\xff\xf2\xdf\xd6\x39\x37\x04\x0c\xe4\x00\x6a\xe0\x65\x66\xef\xc5\x78\x72\xa1\x1f\xd7\xb9\x8f\x4c\x17\x38\x32\x6e\x09\x66\x70\x73\xbb\x34\x88\x57\xe4\x7e\x5f\x70\x49\x1e\x47\x82\x58\x09\x04\x91\xc0\x51\x01\x50\xf6\xf0\x83\xf3\x32\x1e\x3e\xe4\xb0\xb4\x6a\x0d\xa6\x71\xd9\xfc\x90\xbd\x4c\x3b\x71\x83\xb7\xdf\x61\x78\xc6\xe1\x42\x56\x1e\xb8\x15\x0d\xa7\x08\xf9\x62\xef\x66\x10\x4f\x97\x8f\x1c\xe6\x5e\x2a\xfd\x3a\x4c\x15\x6f\x61\xa3\x7f\x7a\xb9\x8a\xfc\xb9\x36\x18\xff\x06\xbb\x23\x20\xaa\xc6\x55\xba\x28\xb1\xe0\x13\x8f\x10\xf5\x09\x26\xf9\xba\x96\x62\xe4\x31\x68\x50\x39\xc1\xfc\x74\x9e\xcd\x2d\x6d\x8f\xab\x47\xb0\xc3\xf1\x61\x7f\xaf\x29\x90\xcd\x68\x51\x4c\x23\x2c\x02\x4a\xc1\x06\x9c\x6f\x15\x0a\x4a\x80\xa4\x13\xa3\x59\xb6\xfa\xe3\x76\x7f\x8f\xbc\xb8\x64\x15\x56\xf2\x00\x61\x63\xe8\x19\x6b\x48\x44\x55\x25\xa0\x28\x3c\xc2\x47\x2f\xb8\xd1\xaf\xd9\xe1\xf4\x35\xa1\x98\xf0\x05\xe2\x99\x88\x43\xcb\xc2\x44\xed\x81\x5d\xfc\x83\x6e\x3e\x1f\xf7\x20\x62\xcc\xad\x17\x0c\x18\xd6\xc2\xfe\x66\x67\x74\x78\x47\x1f\x80\xf3\x9f\xfc\x42\xf4\xc4\x7d\x02\x08\x10\x30\x4a\x1a\xaa\x71\x54\x14\x3f\xec\xcb\x09\xb0\x43\x49\xfd\x03\xe0\x7a\xb2\xff\xe8\x09\x46\x11\x6a\x19\xb0\x88\xa0\x13\xe9\x21\xd4\x0f\x6f\xa9\x3b\xcb\xac\x93\xbd\x85\x07\x78\xbd\xc9\x47\x19\x0f\xea\x50\xc3\x1a\x38\xca\x03\x6c\x43\xd6\x0c\xab\xd8\x38\x11\xf1\xdc\x7e\xfd\x16\x1c\x81\x95\x6e\x6d\x3c\x1e\x52\x5f\x68\xc1\x1f\x1c\x20\x61\xf6\x8d\x28\x6f\x1c\x51\x31\x4c\xc0\xd6\x34\x1e\xe4\x08\xd7\x30\x24\xeb\x3b\xcb\xac\x2c\x99\x96\x33\xed\xae\xb4\x3f\xe8\xf9\x11\x80\xce\x1f\xe5\x72\x3a\xed\x31\xef\x47\xdd\xcc\xef\xc5\x26\xa2\x49\x68\x15\xb2\x33\x49\x04\xd9\x46\x40\xd9\x9b\x13\xf7\xf1\x11\xbf\x57\x06\x18\x42\xbf\x06\x4f\x28\xd8\x68\xbd\x5d\xed\x35\x3b\x62\x12\x60\x45\x2d\xb3\x00\x50\x4d\x52\x59\xa9\x1a\xbb\xb3\x05\xe0\x4a\xd5\xe0\x18\xf7\x01\xe5\x13\x4e\xf5\x23\xfe\xd9\xa8\xba\x59\x1c\xd5\x82\xe7\x6c\x5a\xf0\xd9\xdf\xb0\x5b\x69\x0e\x35\x3b\xa6\x7e\xef\x05\xd3\x72\x51\x01\x04\x0a\x38\xff\xef\x01\x84\x43\xb0\xac\xa9\x6b\x51\x9a\x82\x42\x73\x65\xc9\x32\x9e\xcd\x01\xa0\x88\xcd\x1a\x5e\xf3\xd2\x08\x41\x3d\x52\x3d\x9c\x52\x95\x60\x10\x4c\x0e\x99\x1b\x56\x08\xae\x8d\x55\x9b\xa6\xb5\xd0\x73\xfb\x8f\x99\xbc\x13\x25\xab\xef\x76\x1e\x96\x0b\x99\x4f\x3f\xd2\x09\x1e\x24\x4d\xae\x51\x94\xc6\xc4\xd9\xf7\x3e\x68\x92\xb3\x1f\xa1\x96\x55\xab\x22\xd6\x54\x41\x5a\x93\xcf\x2d\x67\x3e\x1a\xa5\xd1\x62\xda\x00\xca\x8a\x2f\x07\x82\x60\x27\x65\x26\x2a\xa3\x59\xde\x60\x9d\x49\xa5\x6e\x9b\x2a\x58\xad\x11\x38\x65\xce\xef\xb0\x28\x54\x6d\x24\x20\xd2\xa0\xb1\x1d\xce\xd5\x26\x21\xb9\x2e\x17\xaa\xa7\x71\xf9\x3c\xa3\xc1\x0b\xbe\xfb\x85\xdf\x24\x8b\xac\xd5\x70\x70\x03\x42\x4c\xf4\xef\x64\x13\x7c\x71\xba\x2d\x36\x22\x2e\x68\xb7\xfb\xcd\x88\x68\xce\xca\xbd\x70\x1c\xb2\x15\x81\x7a\x83\xc3\xbe\x39\xf0\x76\xb3\x1b\x17\xca\x72\x73\xe0\x8c\x22\x28\x01\x15\xcb\x00\xce\xe9\x0b\x79\x6c\x14\x4e\x1e\x50\x52\xb6\x59\xb5\x28\xa5\xe1\xc9\x16\xad\x95\xd6\xfd\x98\x05\x7c\xe1\x17\x0d\x16\x32\x5a\x44\xc7\x47\x41\x6c\xf5\xe7\xf9\x9c\x3c\xfd\x90\xe3\x80\xb2\x1c\xd4\xd6\x13\xa2\x72\x65\x74\x7a\xf8\xe0\x9b\xc4\xeb\xaf\x5e\xe7\xcd\x82\xcb\xdb\x39\x9f\x27\x17\xe7\x89\x38\xf3\x60\x6d\x5c\xf4\x97\x60\x20\xd1\x66\x75\x82\x4a\xfb\xab\xa9\xef\xa8\x69\xbc\xae\xad\x28\x41\xed\xca\xbb\xf9\x60\xdf\xb9\x60\xa6\x86\x12\xab\x88\x50\x55\x48\xe3\x65\x97\x78\x37\x9f\x86\x33\x51\xe7\x1b\x31\xa8\xa8\x2d\x6b\x4a\xbe\x98\xc8\x59\xa3\x1a\xdd\xbe\x6e\x1c\x32\x25\xc7\xcc\x1e\x1c\x4b\x25\xcb\x43\xc3\x78\xa9\xca\xe5\x82\x9a\x62\x0a\x52\x6b\x6a\xa0\x9d\xdc\x29\x19\x55\x8f\x64\x99\xf2\x14\x35\xea\x09\x31\xb7\xd2\xef\x66\x8d\x36\x6a\xe1\xac\xa6\x05\x62\x98\x6f\x73\xe5\x77\xc6\xb8\xbe\x0c\x49\xd8\x98\xb7\x75\xda\xaf\xda\xbb\x28\xb9\xea\xf7\xb8\x7f\x3b\xe6\x79\x4f\xb7\x8f\x84\x8d\x5a\xbc\xb1\xa2\xfb\xaa\x0d\x6c\x35\x04\x0c\x3c\x8d\x19\x7b\x63\xfc\xc5\x6b\x8e\x6b\xd6\xea\xda\x3e\x1b\x1d\x60\x95\xd8\xfe\xf2\xd0\xef\xbd\xcf\x7f\x74\x35\x56\x5f\xdf\x94\xec\x1b\x76\x3e\x85\xa2\xb3\x96\x96\x9d\x60\x85\xd8\x9a\xbd\x87\xb8\x0d\xab\x2a\x80\xed\x46\xdc\x83\xbb\xd0\x67\x8b\xf8\xea\x70\xed\xd7\x31\x9c\x87\x5e\x4a\xbc\x10\x7b\xef\x9d\x07\xd3\xf9\x2f\x7b\x9d\x7d\xa7\xd4\xed\x82\xd7\xb7\xaf\xe3\x0e\x9e\x01\xc2\x79\x99\x91\x45\x07\x62\x0c\x26\x02\x4c\x57\x10\xfe\x9c\x3f\x47\xb3\x0b\xd4\x25\x83\xd8\xb3\xcb\xb6\x6e\x14\xf2\x42\xb5\x30\x63\xf6\xb1\x64\xba\x01\xa4\x67\x2b\xd6\xd5\x42\x1b\xb2\x8b\x40\x77\x04\x1a\x0a\x9d\x4d\x68\x38\xac\xa3\x6c\xb9\x78\x6b\xdb\xa5\x57\x5c\x72\xd4\x57\x0c\x18\x18\x6a\x51\x09\x6e\x20\x29\x14\xeb\xbd\x01\x06\xab\x04\xa0\xf2\x25\xfe\xac\x7b\xb3\x7f\x53\xd7\xaa\x7e\xcd\xbe\xe1\x95\x1c\x5f\xa1\xa7\x16\x14\x33\xab\x4a\x02\x7a\xe2\xdf\xa8\x54\x1c\x48\x8f\xa0\xe1\x02\x96\xa2\x16\xa5\xc6\xd9\xa3\x73\x0e\xeb\xc3\x82\xd0\x20\x3e\x9b\xad\x9d\xbb\xed\x12\xc5\xf6\xf2\x5c\xa7\xcb\x2d\x6f\xe3\xdb\xeb\x74\xba\xb1\x3f\xef\x1d\x9f\x88\xe2\x4a\xa0\x6f\x73\x65\xbe\x0e\x2b\x6c\x53\xa6\xa9\x2d\xe5\x42\xc2\x6f\x64\x15\x82\x70\x7b\x67\xc7\xf5\x86\x0a\x34\x86\x92\x56\xa9\xa6\x18\xd5\x0e\x9f\x75\x65\x3b\x4d\x36\x7f\xf3\xb9\xaa\x85\x0e\xe1\xd6\x27\x1f\xce\x28\x86\x09\x2d\x71\x9d\x6f\x53\x5c\x3e\x38\x4c\x29\x68\x61\xcc\x4e\x98\x25\x2c\x43\x4d\x4b\xe5\x5b\xae\x35\x4c\x75\x87\xd4\x5f\x8d\xde\xa0\x5b\x99\xa1\x9d\x21\x10\x79\x59\xa0\x01\xe5\x7a\x2e\x5a\xbf\x44\xf3\x7d\x92\xf0\xf7\xd6\x0e\x5f\x86\x0f\x43\x0c\x55\xb4\x19\x03\x93\xa4\x9d\x8a\x2d\xac\xff\x73\x2b\x96\x23\x30\x22\xfd\x8a\x25\x19\xed\xda\x53\xf6\x7e\xfc\xcc\xb9\xf4\xa3\x6e\x6c\x0f\x52\x33\x3b\x8a\x3b\x5e\xd8\x2b\x4e\xf6\x56\x84\x03\xf5\xe7\x23\x5a\x5a\xab\xb2\x28\x2d\x82\x21\xd7\x76\x70\x73\x70\x2b\x96\x56\x9d\x01\x3a\x56\x11\x3e\x27\x3c\x38\x07\x35\xc7\xe9\x3e\x3e\x0c\xa0\xe6\xcb\x20\xe6\x03\x15\xbb\x41\xcc\x4b\x94\x3b\x37\xd8\x93\xb5\xc5\xde\x77\x16\xe4\x3f\xb8\x65\x0f\xbb\xd6\x71\x0f\xdb\xdc\xf0\x68\x45\xc8\x7e\xe8\x9e\x20\x6e\xa9\x5b\x4d\x5c\xe3\x11\x5a\xd1\x71\xe9\x3d\xf8\xa9\x6b\x5c\x8b\x82\x22\x18\x71\x27\x41\xf3\x40\x93\xe9\x1a\x86\x7c\x2b\xec\x45\x70\xbd\xf5\x39\xb2\x7d\xde\x47\x2e\x11\x1e\x59\x10\x27\x65\x7f\xf0\x39\x36\x7e\x1e\xbc\xa2\x8c\x78\x95\x2a\xeb\xd3\x2e\x82\x69\x8f\x25\x19\xe6\xe1\x93\x34\xb0\x44\x23\x6d\x6a\x6e\xc4\xcc\xb6\x81\xf6\x10\xe5\xe5\xc6\xdf\x1b\xaa\x5f\xa7\x16\x08\xed\xad\x58\x1e\x6a\x5c\x35\x7b\x09\xe6\xb2\x72\xf5\x65\xe0\x92\x38\x6b\x33\x46\x5b\xba\x2e\xf0\xdc\x9e\x97\x23\xf6\x41\x19\xfb\x9f\x37\x9f\x7d\x75\xe4\x33\x25\xf4\x07\x65\xe0\x97\x34\x6e\x02\x74\x99\xd0\xe6\xf0\x06\x49\xdd\x2a\xea\x17\x9b\x92\x35\x45\x36\xb6\x6f\xe2\x39\x04\xb1\xd3\x40\x7a\x57\x31\x8e\xaa\x04\x12\x9f\xec\x83\xc6\xaf\xea\xd6\xf0\x57\x74\x47\x5d\x21\x82\x09\x3c\x41\xdf\x00\x16\x4b\x25\x4b\x12\xa8\xe7\x76\x87\x64\x86\xe5\x7d\x11\xc3\xe1\x71\xf9\x3b\xdb\x08\xb5\xeb\x60\x07\x20\xc5\xdb\x15\xa6\x73\x4c\x85\xb8\x97\xb3\xe0\x58\xe9\x84\xec\xe7\x50\x94\xd5\x85\x57\x51\x05\xa6\x35\x97\x0a\x27\xb6\x8f\xf5\x78\x6a\x8f\x8c\x3f\x40\x89\x0d\x0e\x7b\xba\x2b\xbe\xef\x84\xc0\x4b\x7e\xff\xc6\x15\x9e\xd9\x63\xbb\xed\xd8\x31\xe4\x22\x14\x13\xe1\x30\xce\x0f\x0a\x57\xd6\x47\x32\x7e\xd9\xf1\x3e\x42\x50\x94\xda\xbc\x17\x86\x3f\x22\xa8\xd0\x77\x31\x4c\x08\x93\x67\x74\x73\xb9\xc6\x7d\x60\x0d\xf5\xb4\x6d\x7c\x61\x73\xed\xf7\x02\x45\x00\xbd\x2c\xcd\x5c\x18\x99\x45\x08\x0d\xc0\x40\xe6\xfc\x4e\x50\xd5\x47\x50\xf2\x0a\xcf\x3d\xef\x78\x2d\x55\xa3\x3d\x5e\x55\xd0\x39\xfc\xbd\xf0\x90\x38\x20\x5c\x52\xa4\xc7\xff\xa0\x3e\x66\x87\x33\x62\x6e\x60\xbf\x6e\x50\x20\x51\xd9\xeb\xd7\xa4\x0a\x24\xd2\x93\x28\x0c\xd7\xe5\xf8\x42\x48\x95\xfd\xdb\x32\x8d\x85\x34\x0e\x0f\x8a\xca\x39\xa8\x29\x15\xff\x77\xae\x48\xc2\x96\x69\x67\x97\x44\x99\xc1\x73\x4e\xd8\x5d\xb0\x74\x21\xcf\x35\x4a\x7a\x90\x1e\xa0\xca\x51\xe2\xa8\x22\xa3\xd4\x1a\x1e\xa0\x52\x4d\x77\xdc\x11\xf4\x88\x1c\xd8\x2d\xc1\x8a\xfb\x40\x31\xe0\xf6\x18\x65\x87\x59\x4b\x41\x56\xe0\x52\x7c\x36\x4e\xf8\xf1\x23\x09\xfb\x70\x8a\xab\x82\xdc\x3d\x53\x25\x24\xc1\x94\x86\x6e\x62\x60\x95\xbe\x20\xbd\x9c\xc6\x33\xcd\xa0\xf4\xa5\x0b\x4a\xb5\xf3\xc6\x24\xbd\xdc\x17\x68\x81\xa4\x3c\xce\xa6\xe2\x9e\x2d\x64\xd9\xd8\xe5\x82\xcd\xae\xb8\xd6\x22\xf7\x3a\x6e\xc2\x2c\xe2\x1d\xbf\x58\xaa\x5d\xfb\xcc\x78\xbf\x93\xb8\x94\x2e\x1e\x1b\xcd\x8c\x19\x2f\xdc\x4a\xd1\x4a\x93\xd9\x5c\xd6\xda\xf8\xbc\x9c\x51\x5c\x25\x0f\xc6\x53\x8b\x4c\x48\xbf\x94\x46\xdd\x8a\x92\x2c\x2e\x2e\xa7\x67\x21\xb4\xe6\xb3\x34\x34\x1a\x82\x6e\xc9\x72\x76\x6e\xc4\xe2\xd4\x55\x50\xe8\x02\x9f\x74\xdb\xf8\x70\x24\x7f\xce\x74\x33\xd1\x76\xbb\x4b\x43\x47\x8e\x46\x0f\xdb\xd1\xae\xff\x4e\x66\xd2\x00\x29\x0c\x6d\xdc\x04\xbd\x54\x48\xbf\xe2\x11\x22\xcd\x43\xe4\x24\xdc\xab\x9a\xd6\xda\x09\xf6\x3a\xf2\x67\x87\x51\xf9\x91\xbb\x41\x69\x46\x15\xed\xbd\xba\xd8\xce\x9b\x28\xc4\xd4\xa0\x4b\x1f\xf3\x2e\xa9\x8c\x07\x89\x91\xad\xda\x65\xed\x81\xc2\xee\x2e\x2a\x88\x12\x7f\xe6\x4b\x65\x53\x89\x0c\xe3\x6a\xd8\x65\xf3\xa6\x84\xbc\x50\x15\x9e\x1a\xe7\x01\x01\x99\x47\x53\xa3\xe7\x61\x3e\xb5\xa0\xa5\xc3\x73\xd9\x9d\x13\x4e\xa4\x97\x01\xb2\xd5\x4c\x1c\x27\x57\x45\xee\x2a\x59\xdc\xbd\x1c\xbf\xfc\x33\xcb\xd1\x00\x07\xb1\x03\xfe\x1b\x78\xf6\x7d\x01\x92\x46\x47\xf8\x37\xa9\x93\xf2\x8d\xd0\x46\x2e\x20\x6b\xfc\x1b\xbc\x83\xf2\x17\x32\x3d\x86\xec\x84\x00\xef\xd0\x2a\xb3\x09\x84\x75\xa8\x6f\x2c\xca\x08\x34\xa2\xa6\x3f\x30\x7c\x76\xb3\x9c\xa6\xb5\x01\x1f\x57\x54\xf5\x10\x72\x7a\xdb\x6e\x53\x24\x23\x87\x3a\x92\x4f\x63\x70\xb3\x20\x30\xc5\x05\x3f\x80\x4c\x06\x5c\x3f\x4c\x2c\x30\xa2\x5e\xc8\x52\x20\xb1\x70\xf9\x38\x70\xb3\x89\x22\x6d\x03\x15\x88\xd0\x73\x40\xa1\x58\x53\x2e\xc8\xfe\x0c\x19\x0a\x71\xc9\x59\x51\x8f\xd9\x45\x17\xd1\x0f\x6b\xe2\x8e\xd9\xa5\xe0\xf9\x91\x65\x69\x4f\x2e\xc7\x64\xaa\xc4\x08\x96\x6c\x79\x04\x5d\xa8\xe2\x88\x97\xf9\x91\x27\xe7\xd9\x32\x0d\x64\x52\x4c\xdf\xc9\xf2\x36\x81\x7d\x49\x4f\x50\xc6\xfd\x74\xf9\xae\x2b\xda\xfa\x7d\xd9\x68\xfe\x37\xe5\x4d\x79\xf6\xe6\xe2\xf2\xcd\xe9\xc9\xf5\x9b\x33\xf6\xa3\x57\xfb\x5d\x81\x20\x55\x31\x9f\x9a\xe3\xfa\xf7\x81\x99\x2f\xc7\xaf\x8e\xed\x09\x86\xf4\xad\x36\xb9\x91\x9a\x55\x14\xeb\x8c\xc7\x36\x82\x60\x7c\x39\x7e\xf5\xd2\xbd\xb6\x73\xc7\xa6\x15\x48\x36\x88\x07\x8c\x9a\x0d\x26\x2a\xf0\x4e\x14\x20\x90\xc1\x0d\xc3\x00\x8b\x42\xdd\xff\xdd\x6a\xe0\xce\x3d\x91\x82\xa0\xe9\x37\x0a\x5a\x03\x3a\x16\xd0\xea\x4f\xc9\xf8\xcb\x4a\xb0\x9b\x83\xef\x3e\x7e\xfc\xf1\xfd\xc9\xe5\x8f\x37\x07\x81\xaa\x61\xc6\x0d\x52\x32\x5f\x87\xc8\xbb\x22\x48\x7f\x99\x95\xc8\xf4\xed\x0e\x16\x7c\x46\x78\xa4\xae\x09\x87\xf2\x63\x25\xd4\x1d\x6f\x5d\xff\x5c\xea\xac\x16\x83\x04\x8c\x6b\xdd\x2c\x44\xa7\x23\x2f\x1f\x70\x83\x35\x5a\x5d\x2c\x3f\xd0\x92\x3b\x5e\x84\x02\x73\x88\x1f\x86\x9d\x44\xd2\x0b\x1e\x3f\x01\x66\xb7\x25\x73\x73\xc6\xf5\x88\x6c\x1e\x68\x4f\x0d\x59\xa8\xae\x92\xaa\x03\xb6\x8c\xcf\xab\xa6\x25\xc8\x3d\x5f\x6b\x01\x77\x76\x36\x82\x7a\x22\x2c\x4f\x08\xe2\x75\x78\xa0\x43\xdd\x26\x03\xf8\xf7\xe6\x87\x1d\x9b\x1f\x86\xd5\x88\x6b\x02\xfd\x04\x01\x14\xef\x71\x94\x02\x6d\x99\x28\x70\x20\x92\xc1\xed\x09\x22\x71\x43\x43\xb2\xb1\xd7\xea\x1d\xff\xb8\x92\xa5\xb3\x0d\x78\xcd\x80\x8e\x27\x85\x3b\x07\x10\x25\xbb\x62\xa0\x24\xb9\x2c\xd6\x8e\x24\x4c\x65\x05\xab\x5a\xdc\x81\xd2\x85\xc4\x86\x3c\x48\x70\xbd\x83\x8c\xdc\xaf\xf2\x2b\x3e\x67\xa2\x32\x3e\x79\xda\xc7\xaa\xbb\x8f\x3c\xf7\xd4\x97\xc6\x17\x6d\x20\xef\x0e\x45\x46\x11\x6c\x7e\x6f\xfd\x9d\x08\x89\xd9\xdd\xd7\xc0\xdf\x04\xe8\x50\x35\x45\xa4\x39\x44\xf5\xbc\x11\x84\x10\x2a\x49\xdd\x78\x36\x13\xa5\xa8\x21\x78\x6d\x2a\xef\xe0\xe9\x54\x4e\x8d\x10\xa5\x53\x35\x9e\x63\xf6\x41\x5b\x4b\x71\xa0\xbd\x65\x34\x97\x51\x8f\x2c\x50\x95\x42\x46\x75\x0b\xff\xf4\xf2\xd8\x7b\x6f\xdf\xd8\x21\x88\x9c\xd4\x02\xa3\x66\x38\x40\x5f\xe1\x90\x66\x04\x3a\x84\x9f\x32\x19\x6e\x4a\x21\xc0\x38\xd9\x51\xb5\x30\x1b\xaf\x41\x01\x1e\xdc\xbe\x18\x70\x8f\x72\x3f\x85\xec\xb5\x76\x9c\x44\xc8\x8f\xf6\xd3\xf7\xd2\x25\x18\xd3\x57\xec\xce\x10\x5d\x43\x1d\xb2\xa5\x05\x78\xd4\x15\xd4\x72\xbc\xe6\xe3\x7f\xb7\x93\x85\xc9\xad\x5d\x16\xe8\x17\x06\x0c\x89\xa9\xee\x70\x83\xd2\x09\x3e\x8d\x49\x63\xc2\xcf\x44\x0c\x74\xc9\x2b\x3d\x57\x26\x82\x1a\x94\x65\xb4\x20\xbe\xbd\x3f\xc8\x4e\xb5\x81\x2b\x74\xe4\xc5\x3b\x0f\x25\x85\xd0\xc2\xf9\x88\x39\x51\x0d\x4b\xff\x61\x04\x00\xe3\x53\x43\x00\x66\xa8\x04\x76\x16\x83\xb4\xc7\x96\x3a\x25\x22\x4d\xb1\x5d\xb4\x50\xd6\x98\x05\x09\x08\x56\xbe\xe3\x9b\x03\x37\x65\x2a\x2f\x7e\xdd\x22\xde\x20\xfc\x7b\xe4\x5a\x84\xb4\x06\xd6\x6b\xa5\x82\xba\x89\x40\xd9\x60\xe7\xe0\x00\xf0\xd8\xed\xef\xb5\x9a\xae\xaa\xec\x2c\x8f\xc4\x0a\x5b\xb6\x6c\x02\x9f\x30\xc1\xbf\xdf\x42\xc0\x48\x2a\xb2\x30\xe4\xd8\xad\xdd\x75\x75\x05\x57\x96\x82\xb3\x5a\xcb\xcc\x04\xfd\x0d\x94\x45\x1a\x8b\x4f\x8a\x5f\xd2\xba\x61\x36\x49\x1b\x79\x41\xdc\x89\x7a\x69\xe6\xb2\x9c\xed\x41\x74\x9e\xd8\xfe\x5a\x74\x23\x16\x76\xb8\xb5\xd0\xf7\x76\x5b\x0b\x96\xb6\xfe\x30\xd0\x00\x47\x5e\xf3\xcf\x72\xd1\x2c\x5a\x86\x08\xbc\x94\x9a\xcc\x5c\x4d\x5d\x52\xc5\x84\x20\x36\x5b\x82\x0b\x2c\x17\xf5\x7a\x11\x1c\x5f\x6d\xa9\x0f\xa7\xf6\x0f\x47\x50\xff\xe1\x12\xf7\x23\x83\x4b\xb0\x7e\x5a\x39\x1d\x0f\x59\x4f\x11\xf5\x54\x13\x0a\xf1\x82\xe5\xd8\xb3\xd7\x55\xc6\x38\x22\x67\xf6\xfc\x19\xca\x87\xc3\xb9\x23\x5b\xc5\xb9\x89\x7b\x67\x48\x30\x01\x2b\xc6\x92\x34\x2c\xbf\xe9\x2d\x93\xcf\xb0\x90\x31\x42\xa9\xd8\x5f\x9e\x3b\x3a\x86\xc2\x2c\x07\xd2\xed\xde\x76\xdb\x67\x69\xd8\x54\x16\x46\xd4\x88\xd3\x00\x04\xa3\x83\xd8\xd8\x92\x37\xf0\xd2\x64\x22\x46\x3f\x0f\xdc\xa8\xa7\x88\x03\xeb\x69\x89\x3f\x6d\xdc\xbf\xd6\xd5\xa3\x32\xd8\xf6\x06\x19\xe5\xa8\x25\xed\x85\x5d\x16\x5e\xcf\x1a\xd0\x38\x7c\xd6\xa1\x83\x70\x2c\x0a\x37\x9e\x60\xe0\xf4\xab\x7b\x3e\x65\xfe\x48\x05\xb1\xc3\x49\x32\x9d\x09\x48\xed\x2a\xd9\xc7\x22\x97\x57\x1c\xb8\x89\xcc\x47\xc9\x09\xad\x22\xfb\x72\xda\x21\xfa\x51\x2d\x7f\x7b\x2e\x7d\xc0\x56\x64\x50\x76\x3b\x95\xb2\x85\xfa\xb1\x27\x0d\xa0\x52\x6b\xb2\xea\x52\x80\x89\xbf\x21\x5e\x9e\x70\x07\xee\xc8\xc1\xad\x8d\xa2\x60\x9f\x2d\x79\xaa\x63\xa7\xa0\x1e\xe9\x46\xe4\x49\xc6\x0a\x6a\x5a\x30\x71\xba\x19\xe4\x9e\x8e\x86\x48\x66\xad\x16\xc2\xc8\x85\xb0\x73\x27\x98\x7e\x7b\x0b\x3b\xb2\x53\x10\x25\xec\x8e\x8a\x52\x37\xb5\xf0\x99\xd2\x44\xab\x1d\x96\x1c\xae\x1a\x4e\x19\x2e\x26\x88\x3d\xbe\x78\x37\xd8\x0b\xb5\x8f\x4d\x5f\x52\x11\x68\x92\x9e\xed\x8d\xc7\xee\x51\x99\xd4\x02\x4a\x69\x04\xbb\xb8\xb7\xa8\x9f\x4f\x5b\xf7\x8b\x58\x41\x50\x27\xe1\x3b\x82\x7c\x5d\xa6\x5f\x51\x20\x36\x78\xdd\x73\xcd\x7c\x5d\x75\x6c\x6d\xd7\xa4\x2f\xcb\xa0\x84\xcf\xb5\xdd\xe0\x8c\xec\x31\x51\xee\xd4\xae\x2c\x79\xed\xd4\x2d\x27\x04\xe2\xa9\xb6\x47\x6b\x64\xa9\xc6\xbd\x73\x02\xd0\x46\xa8\x2c\x6b\x6a\x7f\x60\xb8\x89\x40\x28\xda\xa5\x66\x43\x68\x70\xcc\x46\x5c\x5f\x9e\x1f\x4f\xc4\x4c\x96\x25\xe5\x11\xcc\xa5\x36\xaa\x5e\x8e\x59\x67\x68\x96\x2b\xd8\xb5\xd9\xa7\x97\xd9\x8d\xb5\x87\x46\x35\x66\x18\xed\x0b\x9f\x7b\xdd\xcf\xae\xdc\x8b\xb0\xad\x74\x2b\xe1\xea\xa0\xf5\xc0\x43\x83\x39\x46\x00\x9b\x5f\x8b\x19\xaf\x73\xf0\xab\x80\xd9\x60\xc9\x78\x66\xe4\x9d\x34\x4b\x48\xf0\x2e\xdd\x5f\x1b\x1e\x47\x18\x40\xe2\x10\xa2\x58\xac\xea\x70\xcc\xa8\x2c\x0c\xb9\x2d\xf3\x0e\x80\x3c\x6d\x87\x99\x8b\x05\x12\x10\x6d\x6a\xc1\x21\x89\x82\xe7\x79\x28\x48\x82\x6d\x17\xea\x0e\xb8\x50\x24\x28\xb3\x2b\x84\x59\xe8\x4a\xdf\x29\x63\xcc\xe3\x0c\x8b\x88\x96\x99\x63\xfe\xf4\x9b\xd2\xac\x4e\xc5\xe9\xb7\x26\xe4\x18\x55\xdf\x4e\x0b\x75\x7f\x24\xf3\x11\xe3\x98\x8d\x7d\x45\x1e\x0c\xe3\x6b\x25\x0c\x54\x3d\x09\xcc\x07\xe5\x75\xfb\x5e\x2a\xda\x6b\xe7\xb9\xc9\x91\x05\xaa\x3d\x12\xcf\x52\x3b\x63\xc1\xd2\x3a\x3e\x3b\xbc\x9f\x7e\xf4\x73\x03\x14\xf2\x56\x90\xb6\x5b\x1d\x15\x56\x98\x66\xd1\x38\x48\x8d\xc6\x1c\xa4\x52\x64\x42\x6b\x8e\x82\x9b\xa9\xc1\xda\xdf\x1e\x1f\x8f\x46\x12\xf9\xa5\x32\x2f\xf9\xfb\xf4\x04\x30\x4b\xf8\x4a\x46\xc3\xba\x96\x76\x31\xcc\x29\x98\x07\x17\x80\x0d\xa7\x5b\xda\xe7\x0b\x59\x42\x8c\x97\xbb\xa9\xa1\x88\x0c\xe5\xea\xd3\x7a\x44\x09\x4a\xb0\x4e\x35\x56\x56\xf2\x94\xc8\xfb\xda\x3d\x03\x03\xf1\xf6\x35\xbb\xf1\x08\x13\xe9\xe4\xa5\x69\x84\x51\x31\x80\x4c\x81\x01\x58\x81\x47\x01\xdc\x84\x5b\x44\x37\x3e\x1d\x5d\x57\x12\x55\xe3\x4f\x83\x21\xfa\x71\xf0\x5f\x1e\x4d\x03\xc2\x75\x07\x30\x6a\x63\x78\xda\x32\x78\xa7\x6a\x77\x2b\xdc\x55\x62\xd0\x43\xc0\xa2\x25\x5d\x36\x89\x4b\xe7\x8a\xd7\x27\x92\x1d\xdc\x23\xb7\xa9\x60\x6e\x57\xd3\x50\xf0\x9e\x4c\x22\x85\x65\x34\x40\xd6\xa4\x66\x89\x6b\x8e\x69\x06\x24\xa2\xe1\x45\x80\x1d\xbd\x8b\x41\x24\xf1\x8c\xf8\xdb\x63\xa5\x91\xc3\x93\xaa\x2a\x96\x87\x70\x3c\x0e\x3f\x01\xdd\x3b\x1c\xe4\x18\x69\x3e\x01\x43\xb7\x82\x99\xe1\x0b\x88\x6a\xbe\x27\x0e\xe5\x57\x85\xdd\x8b\x1a\x81\x1c\xec\xbd\x22\x3d\x82\x20\x42\x5c\xa8\xa1\xe5\x75\xad\xd5\xa0\x91\x3d\x6a\xc7\xed\xf0\x1e\x11\x84\xe3\x0f\xcc\x86\xc4\x1a\x3e\xb7\x71\x04\xce\x7b\x99\xd5\xea\x9a\x96\x75\x90\xa2\xbb\x46\x50\x85\x2c\xd0\x1d\xf8\x09\xc4\xad\x85\x6d\x81\x68\x9c\x0c\xa9\x59\x55\x8b\x4c\xa6\xf3\xf7\x22\xae\x6a\xb7\xfa\x08\x76\xf5\x51\x0c\x2a\x84\xe5\xac\x9a\x46\x68\x05\xa9\x9d\xad\x20\x22\x90\x9a\x1d\xda\x6a\x3a\x90\x88\xcc\x82\xae\x94\x58\x94\xac\x00\xa1\x3a\xd4\x16\x4f\xff\x06\x1c\xc9\xd2\x66\x3e\x00\x66\x78\x12\x1e\x12\x0d\x68\xca\x80\x27\x02\xd1\xcf\x84\x34\xcd\x2b\x84\xdc\xf1\x62\x6f\x9b\x4d\x45\x51\x45\x93\x25\xe4\xad\x82\xbf\xc3\x28\x55\x60\x5a\xa6\x51\x54\x38\xce\x5b\x04\x78\x3d\x91\xa6\xb6\xec\x26\x84\xbc\x5d\xfb\x4a\x37\xca\xa0\x11\x01\xd4\x59\x28\x1a\xe8\xbd\x0c\xa0\x12\x40\xdc\x0f\xdc\x3d\x50\xd0\x20\xf5\xdb\x2b\x21\x1d\x4b\xd3\xeb\x17\x2f\x42\xb0\xb5\xdd\xe4\x5c\x65\xfa\x85\x5d\xcb\xa3\x59\x23\x73\xf1\x22\x5e\xa3\x87\xc7\xed\x8f\x0e\x08\x57\x2b\x5d\x52\xf1\xba\x53\xe6\x87\x1a\xd3\x76\x47\xba\x4f\xa8\x39\x3a\x8e\x93\xdd\x73\xaa\x5b\x63\x64\x39\x6b\xa4\x9e\x47\x87\x07\xb6\x04\x0c\x30\x08\x31\x5e\xe6\xa1\x54\x90\x65\x2f\x81\x4d\xd2\x47\x75\x52\x57\x07\x19\x69\x89\x58\x39\xb5\x9c\xcd\xad\xbe\x7f\x8f\x71\xf9\xbe\x4e\x9f\xd4\x6c\xa6\x08\x60\x8f\xdc\x9d\xd2\x38\xd1\x5d\x12\xb2\x3f\xd4\x04\x44\xb9\xd2\x23\xfc\x26\xfd\x4c\x50\x06\x40\x95\xd7\x8e\xa0\xf6\x57\xed\xb4\xdb\x04\x65\xbc\x40\x82\x7b\x66\x4f\x1a\x28\x68\x8a\x44\x9c\x83\xe5\x13\x94\x44\xc7\x37\xce\x7d\x48\x4d\x3b\x5b\xcc\x85\xc7\x95\x6c\xce\xab\x4a\x94\xfa\x88\x12\xe4\xa0\x06\x05\xe3\x96\x04\x69\xa6\x45\xc5\x6b\x98\xab\x23\xe4\xba\x6d\xc8\x6e\xc5\xbc\xc0\x35\x72\x9f\xf4\x63\x46\xee\x7f\xf9\xf6\xf4\xdb\x6f\xbf\xfd\x2b\xe6\x36\x73\x34\xee\xca\x92\x7d\xba\x3e\x05\x23\xc9\x26\x31\x16\x1f\x9a\xa2\xf0\x5a\xdf\xd3\x7b\x0f\x7d\x30\xeb\xe3\xf9\xd5\xe8\xc0\xa5\x1d\x7e\xbf\x01\x30\xf3\x87\x10\x2b\x46\x90\xcc\xbe\xa2\xa7\x63\xf7\xce\x82\xa0\x10\x15\x79\xda\x58\x51\x14\xcd\x72\x76\xb7\x68\x2b\xa5\x89\xe0\x56\x3b\x80\xb3\x6e\x7d\xa1\x60\xa6\xf7\x69\xba\x61\xb6\x4f\x62\xa1\x15\xf2\xfa\xf7\xce\x3b\x69\x4f\xcf\x5c\xd5\x46\x00\x0c\x6e\xd8\xa3\xcd\xb4\xbe\xde\x57\x06\x90\xda\xbb\x03\xb9\x7c\x7b\xca\xe0\x10\xc1\xa5\xe3\x84\x98\x69\x95\x65\x47\x5f\x62\xd5\x22\x20\xfc\x12\x66\x75\x9b\x1a\x10\x19\x8f\xad\xc6\x76\x05\xb8\x5f\xd1\x16\xd4\x6d\xb0\xac\xd2\x3b\x96\xb2\x8e\xdc\x41\xb6\xb7\x00\x11\xc3\x71\x31\x11\x66\x75\xb2\xf4\x16\xaa\x76\x10\x24\x18\x21\x3f\x57\x22\x33\xfe\x2e\x3a\xa3\xdb\xb3\xc8\x37\x2a\x51\x6a\x27\xab\x45\x54\x79\x52\x8f\xbc\xdf\x07\x8a\xd6\xb8\xaf\x59\x7a\xf8\x3c\xb2\xdb\xc1\xea\xb8\xd8\x41\x98\xf8\x88\x29\xf4\x45\x8b\x2e\xd0\xb0\x37\x8c\x8e\xd9\x49\xcb\x1b\xd6\x6b\xe8\x73\x9b\xc0\x0a\x3d\x6a\x2d\xd3\xa4\x50\xd9\xad\x5d\xeb\x8f\xee\x33\xc9\x13\x45\x96\x1a\xef\x10\x8f\xa2\x50\x31\x10\x0f\xcb\xad\xda\x7f\x39\x58\x75\x80\x2f\x35\xbe\xe8\xea\x88\xf1\xc2\xcc\x55\x33\x9b\x33\x19\x38\xb3\x3b\x92\xac\x5b\x8b\x99\x1a\xb8\x55\xae\x6a\x89\x3e\x10\x8c\x04\x95\x0b\xd1\x2a\x25\x34\x72\x18\x8c\x68\xa7\xa7\xd8\x5c\xb4\x38\x56\x2a\x47\x9c\x32\xec\x49\x96\xec\xdb\x63\x77\x4f\x71\x97\x7f\x6c\x26\xf6\xa1\x33\x60\xf3\x0c\xce\x99\xa6\xe4\xd8\xe8\x7c\xb9\xfb\x0a\xf1\x05\x72\x56\x86\xb0\x56\x17\xc4\x19\xca\x3e\x55\x2a\x1f\xb3\x93\x60\x60\x0b\x1f\x45\xc7\x47\xeb\xa3\xe8\x17\x66\x73\x5e\xe7\xa9\x8f\x3c\xbb\x3a\xff\xfe\xc7\xf3\x77\xef\x9e\xf7\x3e\x87\x7c\x10\xbe\x92\x15\x82\x97\x4d\x35\x72\xe6\x12\x1a\x44\x20\x20\x27\x17\xe7\xe0\xfc\xea\x3a\x0d\xa8\x36\x15\x9a\x00\x0d\x66\x29\xc6\x34\x0b\xdd\x9f\x76\x98\xe0\xb7\xf1\xc7\x35\xd6\x39\x46\xac\x29\x8d\x2c\x20\xab\x2a\x5f\xc8\x52\x42\x52\x12\x96\x0f\x21\xf5\x1b\x76\x11\xa0\xf1\xc1\x70\x1b\x9c\x12\xa6\x73\xd1\x3a\xb4\x31\xf7\x48\xd5\x70\x08\xfb\x97\xbd\x6d\xa3\x9d\x73\x4d\x27\x13\xdc\xe8\x44\x04\x56\xb1\xac\xcd\xc8\xc8\x97\x0c\x1e\xdc\x29\x23\x0b\xd4\x60\x18\x36\x1c\xd5\xbf\x7e\x1d\x81\xe8\xde\xf8\x63\x54\x8b\x99\xdd\xdd\xe5\x98\x01\x44\xa5\xf0\x26\xae\x96\xaa\x1e\x15\x57\xaf\x54\x89\x74\x31\x53\x8b\x4a\x95\xde\xfc\xef\x2a\x23\xbb\xc3\x8a\x3d\x05\xd7\x3a\x80\xa9\x53\xa4\x46\x9f\x28\x75\x70\x03\x34\x96\x34\x90\xc5\x08\xfa\x81\xb2\xfa\x71\x0c\xb6\x3d\x72\x8e\x11\x12\x6b\x1d\xb3\xb7\x81\x50\x86\xd2\x22\x58\xbc\x21\x32\x3c\x7a\x2f\x09\x08\x5a\x63\xc6\x3e\x82\xc0\x25\x35\xfb\xf0\xf1\x9a\x89\x12\xc0\xa0\xf2\x56\x48\x74\x69\x6a\x95\x37\x50\x1b\x57\xce\x4a\xb0\x5a\x96\x86\xd5\x52\xdf\x62\xba\x61\x93\xdd\x46\x54\x7a\x1c\x53\x6c\x74\xa1\xcf\xb9\x55\x6a\x88\x03\x90\xd1\x56\x51\x38\x4b\x65\x6f\x86\x46\xa8\x1f\x6e\xcf\x38\x0a\x80\x32\xac\x56\x00\x23\x77\x8c\x22\xcc\x4b\x96\x38\x0f\x6f\xc5\x96\x78\x1f\x9d\x75\x83\x33\x2d\x4d\xe3\x6b\x4c\x04\x3d\x20\xec\x5e\xbc\xa7\x6e\x9f\xd1\xaa\x14\x3e\x1c\xc7\xc8\x4b\xcd\xee\xb9\xc4\x68\x14\x44\x1e\x25\xb2\x86\xac\x9d\xc2\xcf\xbc\x7a\x86\xb7\x12\x3c\x5b\x10\x28\xf3\xdc\x8e\xde\xae\x66\x4e\x0c\x7a\x70\x20\x3c\x9e\x39\x37\xed\x61\x8c\xc8\x5a\x0f\xe1\xe5\x00\xc8\x2a\x78\x6e\xb9\xdf\x98\xfd\x9d\x9c\x6f\x7e\x2f\x61\x85\x5a\xb0\xee\xe4\x98\xad\x05\x84\x34\x91\xc8\xbd\xb0\x1a\x11\xd8\x65\x17\x5a\x14\x77\x64\xda\x76\x9a\xe2\x5d\x53\x94\xa2\x06\x56\xef\x5e\x01\x03\x11\x19\xc8\xa3\xa1\x6d\x91\xac\xb9\x71\x8e\x2e\xc6\x61\x19\x91\x56\xfb\xbe\x8f\x9e\xd2\xe5\xf5\xc5\xc9\xab\x5a\x4c\xe5\xe7\x91\x0f\xe9\x6e\x45\x64\x29\xe6\x3a\xb6\x2c\x17\xa1\x47\x41\xbd\xfb\xf8\xe1\xdd\x7f\xb2\xf3\xb7\xd0\x1a\x7a\xc5\xcd\x6d\x91\x63\x57\xb8\x27\x84\x6d\x7a\xe1\xce\x7e\x0c\x19\x23\xf4\xe6\x3d\x40\x8e\xe1\xa1\xdb\xd0\x4b\x88\x5e\x75\xf4\x7e\x78\x78\x2d\x24\xb0\x78\x49\x85\xb0\x70\x35\x08\x6d\x99\x5a\x4c\x20\xd5\x82\xcc\x05\x34\x01\xdd\x4c\xa7\xf2\x33\x0a\x03\xbe\xb8\x10\xbe\x3e\x27\x99\x0a\xf4\x58\xb0\xe4\xe1\xd5\xa8\x9b\x42\x68\x27\x70\x85\xf9\x8e\xe2\xd4\x21\x53\x37\x65\x16\xf3\x9b\x42\x94\xb3\x50\xb5\x15\xbf\xea\x12\xd3\x61\xaa\x80\xd0\x11\x02\xfd\x68\x78\xad\xa8\x38\xe0\x64\xbd\xe5\xeb\x7b\xd1\xdd\x36\xa1\xd2\x8d\xac\x5b\xf7\x63\x2e\x2c\x09\x73\x3e\x7b\x28\xff\x70\xc4\x64\xa9\x8d\xe0\xf9\xc8\x6b\x23\x94\xf3\x41\xcd\x5e\x1d\xbf\x64\xa7\x14\xa7\xaf\x6a\xf6\xe7\xe3\x63\x5c\xcd\x4b\xc1\xb5\x2a\x29\x7c\xc0\x39\xaf\x28\x1f\x0b\xe5\xa8\xf8\xb8\x64\x71\xa1\x9f\x29\x80\xe9\xd3\x85\x40\x0d\xa1\x28\x94\x31\x2e\xab\x2b\x0e\xf2\x41\x83\x4b\x2d\x2c\xaf\x78\xe6\xce\x6c\xb1\xec\x0b\xd1\x98\x08\xe6\xbb\xbd\xb4\x6f\x1c\xa1\x40\x86\xb5\x1d\x9f\xc3\x52\x9e\x80\xef\x22\xf7\xa5\xfe\xdd\x8d\xe8\x14\x9a\x79\x62\x8e\x2f\x73\xb1\xa8\xd4\x60\x5a\x00\x6d\x66\xda\x81\xc3\xd0\x75\x9f\xf9\xec\xa0\x2e\xa2\xb3\xaf\xc7\xee\x7b\x71\x47\x30\x17\x1a\x8e\x1e\x40\xf1\x6c\x94\x37\xb0\x99\xbe\x58\x0c\x80\x70\xbc\x47\xcc\x0d\x8a\x10\xc3\x98\x3d\x8f\x9d\xd0\x0f\xe3\x01\xb2\x39\xe3\xa5\xfc\x05\x95\x47\xbb\xa1\x33\x55\xdb\x3f\x9f\xe9\x4c\x55\x64\x83\x83\x10\xa9\xe7\x91\xa1\x8d\x53\x1d\xd4\x90\x42\x85\xc1\x3d\x55\x41\xee\x43\x46\x29\x19\x85\xab\xc8\x01\x55\x5e\xb3\x44\x84\xf3\x5a\x2b\x1d\x4d\xf5\x31\x06\xba\x45\xec\x4b\x58\xe3\x51\x44\x5c\xe7\xc8\x99\xd8\x2e\xaf\xee\xf2\x60\x62\xf4\x71\x1f\x91\x49\xdf\xc1\xcd\xb5\x02\x18\xf5\x12\x0c\x7a\x0b\xa5\xad\x42\x0c\xe8\x95\x2e\x3a\x7c\xae\x1a\x2d\x6e\x85\xa8\xa4\x2b\xd9\x87\xf6\x5e\xb3\xac\xc8\xa3\x86\x77\xb2\x3c\xc4\x48\x5a\xac\xa5\x6b\xb0\x4e\x57\x2e\x6a\x48\xa5\x68\xa5\x58\x9d\x04\x0f\x0e\xed\xb6\xd3\xcf\x0f\x35\x50\x87\x11\x85\xec\xe2\x0e\xf9\x1f\x49\xd4\x08\x40\xe1\xfe\x64\xf3\xaa\x2a\x96\x58\x12\x1b\x5c\x8b\x37\x07\x99\x3c\xca\x72\x87\x86\xd2\x41\x63\xd7\xce\xf1\x41\xa4\x21\x14\xa7\x27\x27\xab\x1f\x1e\x06\x93\xb5\xed\xb9\x41\xea\x7c\x1a\x88\x9b\x84\xbb\xd9\x1e\x92\x32\xc9\xc7\x81\x5a\xb9\xec\x29\xa2\xaf\x96\x1a\x83\x80\xe3\xad\xad\x63\x76\xae\x03\x9f\x69\xd7\x3a\xf5\xf6\xda\x48\x41\xd7\x6a\x11\x17\x7c\x87\x78\x2b\x80\x7c\x0f\xf1\x3b\x2a\x52\xb3\x45\x87\xb2\x58\x25\x30\xaa\x5d\x8c\xd6\xdf\xd8\x07\x3b\xf6\x54\xb6\xaa\xe5\x82\xd7\x12\x10\xe6\x28\xe7\x0e\x82\x08\xc8\xbe\xca\x02\x5d\x24\x0a\xd0\x8a\x1a\x0f\x6b\x9b\x0c\xf4\xdc\xf6\x2a\x07\xf5\x45\xff\x2f\x58\xbb\x14\x29\xf6\x8b\x9a\xde\x0c\xb4\x6e\xc7\x9e\x74\xfc\x85\x36\x05\x0a\x44\x97\xfd\x4d\x8b\xd0\xa1\x22\x1b\x79\x17\x5b\x08\x1d\xb2\x54\x27\xe8\xe6\x20\x34\xc5\x98\xee\xf8\x11\xf9\x32\x33\x5e\xaa\x12\xc2\xcf\xda\x29\x24\x63\xf6\x41\x99\x96\x13\x07\xb3\x77\x82\x28\x32\x11\x0c\x48\x2c\x29\x05\x61\x54\x47\xac\x95\x89\x10\xc9\x21\xa8\x0b\x28\x1d\x42\xe4\x9c\xbc\x86\x76\x2a\xcb\x6e\x9d\xc6\xc9\xd9\xd9\x87\xab\xff\xf7\xee\xe4\xbb\x37\xef\x76\xb2\x77\x7e\x7c\xe9\xb2\x64\xf7\xa5\xa8\x2f\x05\xc8\x8c\x59\x0a\x17\xa6\x83\x61\xe1\x0a\x17\x11\xad\x8c\x52\xeb\xce\xa7\xec\xe4\xdd\x3b\xdf\x2e\x56\x73\x20\x90\x08\xe4\x5c\xd2\x99\xdb\x66\x14\xb7\x16\x9d\x22\x4c\xb1\x34\x1c\x94\xd9\x88\x54\xc7\xa4\x90\x94\x36\x88\x7b\x03\xb5\x3b\x56\x71\xe1\x03\x14\x15\xad\x42\x56\xb6\x7b\xd3\xc7\xc4\x86\x1f\xa3\xc0\x09\x08\xae\x68\x84\x8b\x4b\x08\xc1\x13\x21\x61\x5c\x95\x22\x78\xdc\x43\x27\x4f\x43\x05\x3f\xb6\x76\x6c\x40\xef\x89\x01\x8c\x1a\x99\x6f\x0e\x60\xb4\x36\xa8\xee\xa4\x74\x09\xa8\x51\x84\x71\x84\x69\x64\x28\x4b\xf8\xa9\xd3\x63\xdf\x47\x20\x04\xf6\x7a\x59\x81\x77\x21\x35\x42\x6d\xfa\x0c\xd3\x91\xcb\x9f\xb1\x7d\x42\xca\x71\x90\x9b\x31\x62\x2c\xc4\x32\xa8\x32\x76\x93\xaa\x3a\x01\x71\xe7\xdd\x45\xf6\xae\x42\x4a\x2e\x85\x12\x38\x94\xa2\x16\x4e\xc2\x66\x29\xb9\xd7\x58\x9c\x3e\x78\x23\x30\x2a\x02\xb5\xf6\x28\xf8\x70\xe5\xc8\x36\xf5\x3b\x6d\x99\x54\xfc\xfb\x4b\x06\xbe\xfa\xe3\x27\x03\x8f\xe0\x46\xf7\x66\xfe\xe9\xfc\xcc\xf1\x36\x12\x77\x2c\x0d\x94\xe4\x5f\x46\x0e\x45\x89\x77\x6d\xd7\x9b\xf3\x72\x06\xb1\x35\x68\xc8\x6d\xaf\x92\x6a\x41\x7e\x7a\x51\xa4\x15\x0e\x1b\xfb\x91\x9c\xaf\xcf\xc7\xc5\xda\x1e\x2e\x3e\x5d\xc7\x2e\xd8\x4d\x4f\xee\x63\x44\x96\x46\x6e\x56\xfd\x68\xc3\xc8\x9b\x84\x1c\xba\x69\x3c\x4a\x9b\x76\x3f\x49\xe4\x4e\xe7\x1b\xab\xe2\x5e\x5a\x2d\x83\x33\x4c\x94\xe8\x8c\x2a\x51\x7d\x25\xf5\xa9\x10\x06\xf0\x47\x1c\x78\x3f\x58\xc6\xee\xcb\x10\xc8\x01\x92\x5a\xeb\x17\x4f\x68\x48\x18\xf0\x21\x0f\x78\x1a\xc9\x46\xe4\x4b\x21\x8e\xc8\x57\xe6\xcb\x9d\x81\x94\x35\x62\x1a\x08\x66\xed\xf2\x2d\x43\x07\xa8\x35\xad\xc1\x40\x8b\x42\x3c\x29\x43\x8b\x54\x06\xbc\x47\xdb\x82\xa3\xf5\x03\x51\xd1\xde\x96\xbc\xa8\xe0\x43\x84\x65\x76\x4e\xe0\x04\xa2\x31\x16\x5e\x1d\xb1\x93\x0f\x67\x0e\xaf\x06\xa4\x32\x6f\x61\xbb\x39\x08\xb5\x21\x5d\x3f\x71\x4d\xd6\x28\xec\x1a\x5f\x0c\x32\x4a\xcf\x47\x71\x2b\x96\x47\x48\x05\x30\xc4\x07\x9d\x53\xe4\x6d\x76\x27\x01\xfe\x20\x4f\x40\x1c\xdc\x0e\xb5\x61\xc7\xec\x5a\x75\xb0\x41\xbc\x93\x11\xf3\x45\x6f\xd0\x2b\x2e\x6e\x0e\x62\x8b\xbc\x8a\xa6\x36\x42\xfb\xf5\xbd\xd4\x82\xfd\xe9\xd5\x2b\xf6\xec\x53\x49\x76\x78\x30\x0a\xbf\x81\xb2\xfa\xcf\x93\x05\x56\xfb\xe9\xe4\x41\xe0\x5a\xb1\xb8\x9d\x19\x82\x30\xe8\x43\xb1\x57\xcb\x6e\x9b\x95\x9e\xeb\x1e\x87\xdf\x38\x7d\x6e\x85\x52\xbc\x6e\xa4\xbb\xd1\x06\x07\x79\xd4\x4e\x3f\xbf\x29\x65\xdf\x26\x68\xf0\x02\x8b\x8c\x84\xa8\x40\x07\x03\x37\x44\x47\x93\x2f\xa0\x00\x02\x9c\x14\x10\xc8\xfa\x30\x05\xcb\xa0\xff\x98\x39\x0b\x6f\x03\x3f\x06\xd6\xa9\x63\xa9\x78\x26\x0c\xe3\xc0\x7c\xa9\x06\x78\x10\x0d\xa3\x00\x46\x82\x47\x70\x49\x53\xb7\xa5\xba\x77\xa6\x99\x5c\x18\x2e\x0b\xed\x36\xe0\xae\x97\x15\xb0\xaf\xdf\xb5\xaf\xdf\xf5\x7b\x4b\x13\xde\x00\xa6\xd1\xd7\x23\xff\x62\x50\x8d\x3b\x89\x52\x88\x62\x97\x1f\x2e\xaa\x46\x9d\x6c\x2c\x40\x26\xc9\xd9\x3a\x2c\xdb\xc1\x97\x82\x58\xd9\xc3\xb8\x75\x8f\x10\x68\xbf\x70\xd9\xd9\xd1\xea\xed\xb1\x6d\x7f\x7b\x6a\x35\x80\x6d\x8b\x99\xdc\x41\x67\xe0\x99\x77\xdf\x86\x1c\x5a\xdb\xe6\x69\xac\x60\x69\x26\xbd\x07\xc1\xdd\x83\xe0\x7e\x45\x20\xb8\x1b\x88\x95\x5b\x50\x65\x4a\x2f\x1d\xa6\xc0\x94\xad\xef\xe3\x34\xac\xd0\x28\xef\x04\xda\xc9\xb3\x5a\x98\x28\xdf\x00\x52\xb9\x88\x30\x45\x56\xad\x8b\x93\xeb\xd3\x1f\xbc\x03\x6b\xa2\xf2\x44\x19\xb3\x47\x0a\xd7\x26\x9b\x6f\x00\x46\x17\xb7\x8b\x42\xd0\x70\x62\x60\x16\x06\x1b\x36\xf8\xf1\x4b\x28\x75\xe6\xad\x7a\xf1\x9b\x90\xcf\xc3\x3d\x6a\x24\x67\xba\xa9\x44\x4d\xe6\x53\xcc\x28\xa3\xa6\x7b\x39\xf8\x8b\x73\x96\xbc\x5e\x5e\x36\x43\x79\xfb\xb4\x3e\xa3\x2e\x70\x71\x0b\x14\x28\x46\xdd\xb3\x07\xc4\x25\x6a\x81\x29\x4a\x96\x68\x49\x07\x77\x7b\x34\x75\xfc\x2c\x05\xb9\xdb\xfb\xe1\xa0\xa2\x20\x61\xbd\x0c\x10\xba\x0e\xbf\x85\x22\xd4\x7d\xfc\x36\x99\x2a\x28\xa7\xdf\x04\xa8\x13\x57\xa8\xc1\xd7\x2c\x10\xaf\xd9\x11\x3b\x29\x8a\xd7\xe0\x50\xcc\xeb\x25\xab\x9b\x32\xd4\xb6\x44\xeb\x86\x8f\x40\xdc\xa2\x30\x01\x65\xb6\xbe\x1f\x4a\x14\x8d\x9f\x22\xdb\xc3\x9b\xaf\xb5\xca\x24\x58\x5a\xbd\xd3\x0b\xe3\x27\x55\xcd\x04\x58\x5d\x3c\x00\xc5\x82\xdf\x86\x04\x52\x0a\xcd\x8b\x31\xa1\x9d\x6d\x0f\x12\xe8\xd1\x0d\x56\xb3\x97\xaf\xfe\xcd\xb6\xad\x79\x06\x28\x6d\x85\x72\x91\x11\x20\xdf\x91\xb4\xc0\xaa\x5a\x96\x98\x57\x10\xda\x8e\x30\xc9\x16\x4b\x66\x4f\x96\xe1\x34\xaa\x82\x97\xb3\xb1\xaa\x67\x40\x4c\x9a\x52\x66\x2a\x17\x2f\xfe\xd7\xb9\xbe\xb0\xbd\x74\x53\x21\xbc\xa3\x76\x4a\x75\x3f\x96\x81\xe1\x3e\x83\x6c\x6c\x3c\x3a\x2f\xe0\x19\x3a\xc2\x9e\x83\x8f\xd8\x47\xf9\xd9\x37\x4b\x55\x1e\xf9\xd0\x89\x6c\x4e\xa5\xa2\x9e\xfd\x87\x56\xe5\x05\xc2\x28\xbe\x17\xf5\x4c\xd0\xbf\xaf\x5c\x9d\x89\xf0\xe3\xf3\x74\x0e\xb5\xaa\x53\xee\xf1\xb7\x8a\x02\xbc\x7d\xaa\xd6\x0d\x36\xbd\x39\x60\x27\xad\x39\x80\x6d\xc0\x52\x34\xcc\x2d\x74\x47\xf7\x88\x67\x30\x6d\x88\x02\x28\x64\x86\x11\xa5\x18\xd4\xa1\xee\x69\x45\x11\x5b\xad\x12\xaa\x2a\x30\x47\x20\x13\x88\x7a\x19\x1c\xee\x90\xa5\x90\x98\xbe\xff\xfc\xb6\x56\xb1\xbd\xc4\xb5\x95\xc4\xf5\x48\xc3\x55\x0d\x69\x14\x72\x3d\x73\x8d\x1b\xfa\xed\x9f\x36\xc5\x54\x16\x05\x04\x6c\x4f\x31\xfd\x33\xf2\x8e\x3e\x73\xb8\x13\x68\xdb\x1d\x31\x61\xb2\xf1\x73\x48\xd3\xe7\x75\x2d\x11\x92\x69\x3d\x13\x5d\x0f\xbf\xdc\xaa\x26\x6a\x78\x3d\x13\xa6\x5b\x89\x6e\x63\x7b\x63\xb2\xb3\x4f\xe7\x67\x3b\x87\xd8\xbd\x54\xca\x5c\x70\x33\x5f\xb9\xec\xbe\x11\x55\x1c\x80\x74\x13\xf8\x3b\x20\x41\x71\xc3\x6a\xa5\x4c\x2b\x87\xe7\x35\xbb\x39\x78\x31\x17\xbc\x30\xf3\x5f\x6e\x0e\x46\xf6\x2f\xfb\xf1\x9b\x83\x75\xae\x0f\xe8\xbc\xaf\x22\x57\x6e\xa0\xed\xe1\xd1\x50\x28\xcf\x61\x68\x60\x5f\xac\x7a\x0e\xde\xf8\x93\x3c\xaf\x85\xd6\xdf\x2d\xd1\xf5\x7e\x7a\x7e\x76\xb9\x6a\x89\x07\x5f\x62\x73\x51\x54\x3a\xa6\x0e\xad\x40\x83\xc8\xc9\xc9\xf1\x65\x1f\xf3\xe6\xa2\xf8\x2c\xc1\x1d\xb5\x4b\x03\x86\xde\xe0\x13\xe1\x8d\x45\xa7\xd0\x50\x72\x77\xc2\x9b\x07\xa3\x03\x1d\x0f\xbc\xbf\x65\x59\x6b\xf6\xfd\x44\x65\xf8\x3e\xb0\x74\x4c\x4b\x70\x76\xe3\x8c\x97\x14\xf0\x89\xb6\x95\xf3\x0b\xc4\x1d\x9d\x35\xb5\x60\x0e\xa5\x73\x83\x89\x27\xb9\x59\x7b\xcc\x7d\x99\x98\xfa\x73\x32\xaf\x8b\x94\xd7\x8d\x44\xe6\x8f\x21\x0e\x31\xee\x95\xab\xe2\x07\x72\xc9\x44\xdd\xe1\xc4\x88\xc7\x53\xc0\x08\x67\x73\xa5\x0d\xc6\x3d\xba\x7f\xbd\xae\x54\x6d\x46\x76\x76\xca\xce\x11\xfe\xdc\xf9\x1d\xc7\x5a\x92\x2b\x4f\x9f\xaf\x36\xc9\x5d\x4c\x78\xf0\xb8\x67\xbc\x28\x3c\x2c\x75\x79\x68\x5c\x0b\x64\xcb\x1b\x17\x2d\xdc\x6b\x21\x3b\x07\x4f\xce\x13\x22\xd9\x55\x33\x9b\x61\x92\xec\x0f\xd7\xd7\x17\x6e\xaf\x6c\xdb\x10\x3e\x81\x55\x62\x46\xec\x98\x49\x9f\x86\xb7\x36\x0c\xfc\xdb\x57\x98\x36\x0c\xbe\x98\xfe\x77\xa1\x58\x8e\xd5\x71\xb1\x18\x4b\x42\x5e\xaf\x21\x9b\x60\xcc\x30\xc9\x0c\xff\x82\x05\xc6\x2d\x67\x56\xe2\x51\xf7\x25\x16\x23\x87\x9e\xf0\x5b\x5d\x49\xd9\xcb\xbb\x2e\x30\x05\xbe\xe8\xd3\x4b\x92\x99\xf6\x56\xbc\x54\xf5\x02\xab\x39\x2e\xdd\x71\x22\x28\x66\x3c\xda\x41\x82\x0f\x83\xdd\x01\x3c\x0e\x5e\xad\x33\x5a\xb6\xbd\xd0\xb9\x63\x33\x1f\xd4\x8a\x49\x65\x50\xcc\x9b\x05\x2f\x01\x49\x0e\x48\x76\xf4\xd8\x27\xeb\x50\xad\x24\x17\xe2\xe7\x24\xc6\x24\xcb\xf8\x17\x30\x28\x5a\x26\x6f\x0f\x7d\x6a\x35\xa9\x83\xc1\xf5\xbc\x9f\x2f\x3b\xab\x48\xd8\x12\x18\x06\xf2\x96\xcb\xa2\xa9\xad\x56\x88\x8b\x1e\xe2\x63\x3d\x1e\x39\x46\x4a\xc7\xe1\x32\x71\x18\x4f\x84\xfd\x79\xe2\xd2\x92\xb2\x82\xd7\x54\xee\xbc\x44\x62\x47\x3b\x0a\xc4\xce\x6a\xc6\x1e\x1a\x5d\xdd\x89\xba\x96\xb9\xa5\x31\x69\x81\xc0\x73\xc8\x24\x5f\x54\x71\xe5\x47\x08\xb5\xfe\x08\xe5\xb3\xac\x7c\x7b\x85\x71\x65\x37\x07\x96\x83\x47\x33\x7d\xf2\x03\xa0\x2b\x91\x41\xc8\x21\x0d\x7e\x77\x61\x62\xdb\x1a\x88\xdb\x24\x6e\x63\xc3\x30\xbe\x76\xca\x1b\xbd\x32\xd8\x2b\x6a\xe6\x0c\xa9\x54\xf6\xab\x75\x40\x26\x08\xac\xcb\xa2\xe2\xd9\x53\xdc\x8b\xb8\x62\x5a\xc6\xb5\xd0\x94\xfe\xd1\x14\x46\x56\x85\x40\x9b\x19\xea\x0f\xa2\xcc\x54\x53\x02\x50\xef\x7a\x81\x06\x18\x52\x5a\xaa\x25\x8c\xe3\x14\xe2\x1f\x14\xef\xe2\x98\x0b\x65\x2f\x00\x01\xc0\x73\xcc\x88\x01\xfe\x63\xa9\x30\x80\xb9\x75\xea\x1e\xbd\xe7\xa1\x6a\x7f\xae\x10\x7c\xae\x52\xda\x4c\xe5\x67\xe6\x70\x85\xd0\x0a\x42\xe8\xc5\x06\xcf\x95\x15\x54\x4e\xac\xce\x83\x93\xfc\x45\xd4\xea\x48\x96\xb9\xf8\x6c\xc9\x39\xf3\x49\x48\x4b\xc6\xab\x4a\xf0\xba\x15\x1f\x8e\xb8\x3e\x71\x65\x55\x18\xbc\x76\x75\x02\xc8\x56\x33\xe7\x58\x83\xa1\xbd\xa6\x63\xf6\x91\x78\x35\x44\x4b\xbe\x41\xad\x10\x4a\xd0\xb3\x1b\x88\xf4\xb9\x39\xa0\xe4\x03\x5c\x31\xff\xa3\xd3\x51\x10\x48\xcf\x2f\x21\xbe\x08\x7a\xdb\xff\x3d\xfe\xef\xf1\x06\x3d\x60\x12\x33\x0e\xde\x07\xd8\x53\x17\x69\xe4\xbd\x47\xf1\x14\xcc\x17\xa7\x3f\x60\x11\xc6\x2c\x16\x5f\xbc\x43\xc0\xa1\xf2\x70\x7d\x24\x29\x2e\xa6\x86\x14\xc6\x81\xba\x67\x0f\x25\xcc\x43\x83\x7a\x30\xfd\x7d\x1a\xe5\xe4\x2c\x88\x95\xab\xe9\x00\x35\x74\xf5\x9e\x0d\xa1\x8b\x4a\x9f\xe8\xec\x6e\x28\xde\xb6\xf7\x27\xff\x19\xc1\x85\x45\x3a\xa3\x51\x8e\x98\xc4\xaf\x27\x28\x4a\x54\xea\xed\x1a\x72\x4e\x81\xf7\xf8\x0b\xce\xd9\x55\x5c\x72\xd1\xab\x2f\x00\x4a\x1b\x2e\xa0\xb7\x99\x03\x84\x4f\x2b\x1a\x9f\xc0\xad\xe2\xcc\x3e\xaa\xfe\xe3\xf5\x5f\x2f\x9c\x3a\x1c\x43\x70\x5a\xfb\xde\x47\x31\x6e\x59\x8c\xa2\x0d\x28\x03\xae\x95\x3b\x7b\x84\xbc\x4d\x4e\x86\x91\x4f\xea\x73\x1f\xd9\xa0\xf8\x23\x50\x80\x01\x7d\x1e\xa9\x03\xd5\x36\x76\xd0\x72\x58\xa5\x91\xb6\x2e\xa5\x1b\xe0\x22\xba\xc5\x45\xba\x1d\x12\x9a\xe2\xa7\x48\xa9\xdc\xde\x61\x9f\x22\x27\xaa\xf4\x34\x2e\xfb\x98\x51\xd9\xc3\x0e\xf8\xa7\xe9\xe9\x23\xe4\x6b\x58\xf3\x2e\x0b\x48\xcd\x9d\xa4\x96\x78\x92\x5b\x14\x69\xb0\x5f\xb5\x4f\x76\xf0\x51\xf6\xb1\xc4\x3c\xc1\x10\xe5\x8e\xfa\x19\xa4\xe6\xc7\x70\x21\x0e\x87\xc9\x7f\xc2\xaa\x2f\xbf\xb5\x32\x90\x8e\x1c\xf5\x68\x78\x8f\x5e\x1f\xf6\xec\x3e\xd4\x38\x44\xfa\x83\x90\xef\xd0\x3d\x99\xaf\xd0\xd4\xe3\x31\x57\xd3\xde\x14\x48\x75\x87\xbc\xf5\x41\xfc\xb1\xf3\x69\x48\x55\x1f\xc5\x39\xf0\x1e\x8f\x2c\x86\x76\xf1\x42\x77\x00\x2f\x44\xf8\xc3\x7c\xcc\xae\xec\x8e\x92\x8c\x83\xfa\x20\xba\x25\x63\xdd\x0f\xd3\x82\xf8\x2d\x98\xce\x79\x01\x76\x10\x03\x1e\x36\xdb\xe9\x51\x94\x06\x48\x1d\x99\x36\x4b\xf3\x7d\xce\xd5\x3d\xe2\x56\x19\x05\x00\x21\x7e\x94\xde\x27\xd7\xeb\x7e\x43\xc3\xc3\xfa\xb0\x5c\x87\x6a\x3e\xb4\x4d\x01\x94\x6c\x60\xab\xbe\xa6\x54\x8d\x98\xe6\x6c\x2c\x51\x5f\x5b\x0e\xbd\x8a\x87\x42\x03\x02\x36\xe4\x13\xca\xce\xea\x99\xd2\x1c\x5f\x3d\xb9\x38\x8f\x73\xc8\xa2\x1a\x0a\xa6\xe6\xa5\xb6\x7b\xa4\x59\x8c\xd8\x53\x22\xd8\x0c\xbe\x5d\xf9\x82\x02\x99\x2a\x9a\x45\x89\x40\xb9\xff\x6c\x64\x76\x0b\x7e\xc1\x3b\x29\xee\xdb\xc9\xd7\x49\x23\x62\xcb\xf0\x0c\x1d\x9d\x05\xfa\x6d\x9f\xab\xfb\x7d\x30\xdd\x97\x30\x36\x76\x97\x3e\x51\xf9\xb9\xd3\x24\x2a\x70\x0d\x02\x0b\x36\x08\x95\x9f\x9c\xc1\x0e\x0b\xc3\x5a\x7e\x8d\x87\x2c\x14\xa2\xc9\x44\x51\x68\x56\x89\x9a\xd5\xea\xde\xe1\xbe\x40\x9e\x7f\x90\x8d\xa2\xd6\xd8\x7f\xc4\xdf\x9f\x46\x1e\x80\x5b\x74\xda\x99\xed\x3e\x84\x6f\x1f\xc2\xf7\x00\x8b\x9b\xa5\x5e\xfd\x12\xd6\xea\x3e\x14\x59\xa6\xd0\xe3\x56\x9d\x6a\xd3\x51\xc5\x76\x7d\xb8\x2f\xd5\x7d\xd2\x0d\xfa\x44\x06\xa4\xf4\x85\xda\xe6\x65\x3b\xe0\xed\xd8\x64\xef\x73\xeb\xd8\x66\xf7\x85\x08\x83\x33\xa1\x35\x12\x2d\x0a\x44\x0e\x37\xee\xba\xb3\x71\x49\x36\x47\x49\x7e\xd0\xc4\x8b\x42\xa3\xd6\x98\x2c\xbf\x93\xaa\x96\x66\xd9\xe7\x7d\xad\xb1\x77\xa7\x12\x9b\x07\x80\x24\x81\x4d\x83\x0d\x9b\x0f\x00\x72\xc0\xce\x65\x28\x2e\x08\xe4\xb4\x5e\x18\x97\x2f\x17\x11\xc3\x90\x7d\xac\x44\x69\x85\x0a\x50\x63\x29\xb7\xbc\x0e\x6e\x29\xfa\x0e\x3b\x71\xd5\x0b\xa8\x49\x84\xe1\x0f\x39\xba\x8b\x4a\x81\x8e\x19\xf4\x76\x80\xee\x1a\x21\x50\x4c\x4e\xb0\xd0\x20\x2f\x63\x47\x31\x4e\x1d\x0c\x1d\xf9\xcc\xa1\x5d\xe8\xc3\xa8\xb4\x05\x27\xe0\x28\x62\xd5\x88\x64\xb2\x8c\x31\x10\x69\x5b\x51\x82\x84\x34\x47\x3b\xaa\x43\xec\xf5\x10\x4b\x27\x69\x00\xc8\x2b\xbd\x2b\xdb\xe5\x9d\x62\x9e\x1e\xb2\x40\xdd\xd6\x40\xec\x40\x2c\x65\x17\x31\xe1\x9a\x37\x93\x71\xa6\x16\x2f\x3e\x9e\x9c\xbf\xa0\x95\x3b\xa2\xb8\x10\x0a\x05\x9b\x14\x6a\xf2\x62\xc1\xb5\x11\xb5\x2b\xc7\xa1\x5f\xbc\x1a\x1f\x5b\x6a\x65\x49\xe2\x11\x46\x7f\xd9\x99\x5b\x0d\x3c\xb9\x83\x69\xad\xa9\x74\x20\x72\xdd\xf3\x01\x0f\x1c\x42\xe0\x8a\x83\xe1\x8f\x67\x3f\x5a\x83\x9e\x38\x80\x49\x94\xf9\x89\x6b\x13\x27\xac\x45\xc1\x21\xc2\xd1\xee\x75\x6d\xb8\xaf\x85\xe6\x4f\x09\x40\x06\x72\x02\x36\x01\x4f\xb4\x1e\xb3\x77\xea\x5e\xd4\x24\x10\xa0\xad\x13\xd2\xf1\x73\x28\xbc\x36\x97\x33\x8c\x81\xc4\xcf\x8f\xd9\x29\x89\xa5\x31\xae\xbc\x2b\x3c\x2f\x4b\x2c\xc3\x23\x5c\x02\xba\xce\x44\xc9\x6b\xa9\x74\xa4\x62\x61\x2d\x20\xde\xeb\x79\x33\x85\xc6\x24\x0b\x92\x18\x2a\x45\xc2\xcb\xf6\x6d\x09\x74\xbc\x7b\x5f\x46\x4c\x37\x19\xd4\x26\xc2\x89\x8f\xdc\x92\x8e\xe8\xb0\x83\x89\x87\xc4\xab\xdf\xe0\x88\x3d\xce\x3c\x08\x04\x73\x83\xb0\xeb\xb8\x1d\x16\x04\xf3\x38\x4f\x9c\x79\xb5\xa7\x87\x20\x9d\xf1\x4e\xce\xec\x3e\x78\xe1\x0b\x25\xe7\xa0\x69\x10\x93\x0a\x12\x49\x3a\xf1\x63\x96\x8b\x0c\xbc\x3e\xae\xd6\xa1\x51\xde\x0f\x82\xe9\x3b\xd8\x8c\x83\xe5\x01\x0b\x30\x1b\x77\x3d\x78\x1d\xf3\x67\x5f\x63\xca\x52\x9a\x9b\x83\x0f\xaa\x14\x37\x07\xad\x32\x87\xbe\x34\xdf\x88\x0c\x30\xd4\x14\x87\xd2\x69\x0c\x1e\x86\xc6\x43\x2e\x81\x48\x60\x69\x3e\x59\x64\xe3\xf7\x5d\xe2\xc4\xcd\x01\x7b\x46\x26\x5d\xde\x14\xe6\x79\xaf\xbf\x5e\xd6\x9f\x93\x1d\xd2\xd9\xba\x60\xfb\x93\xa5\xcf\xee\xbf\x7b\x39\x11\x86\xbf\x74\x66\x11\x10\xeb\x70\x47\x41\x9f\x07\x03\xe5\xbe\x06\xec\x57\x1c\x0c\xeb\xe5\xd9\x75\xd4\xee\x52\xdd\x7b\x1e\x9a\xcb\x3b\x99\x37\x56\x12\xb2\x3f\x96\x68\xdf\x59\x2f\x69\x82\x7e\x9d\x08\xda\x83\x9f\xfb\x0a\x3e\x68\xe3\xce\x93\xc1\xed\x3f\x73\x0f\x86\xd1\x57\xbe\xc9\x09\xe0\x28\x91\x8b\xa1\xc7\x55\xd2\x23\xcf\xa7\x9f\x4d\x0b\xc5\xcd\x5f\xfe\x84\xc5\xeb\xcc\x5f\xfe\xf4\x7c\xc4\x28\x48\x5b\x8f\xb0\xd6\x1f\xd4\x85\x01\x01\x0f\x10\x4f\x95\x65\xf2\x45\x81\xec\xcc\xcb\x86\x2d\xa7\x6b\x6f\x38\x24\xff\x45\x9e\x08\x88\x30\xf2\xf3\xdb\x20\x3e\xd4\xa5\x11\x21\x74\x43\x3e\x6c\x07\xf1\x11\xca\xce\x00\x12\xcb\xaa\x21\xec\x84\xc3\x6e\x79\x2c\xc7\x5a\x14\xe2\x8e\x97\x86\x46\x8a\x82\x57\xa3\x09\x6a\x49\x83\x30\xe3\x3a\xc6\x18\x77\x62\x01\xb5\xba\x1f\xb9\x82\xae\x81\x82\x8c\x42\x05\xd7\x89\x08\xb8\x8a\xb6\x0d\xb0\x43\xd5\x98\xaa\x31\x51\x51\x2b\xe7\x64\xf2\x9f\x61\x4e\x18\x39\x3c\x55\x76\x13\x8c\xc8\x0f\x47\x34\x3a\x3f\xf2\x90\xe5\xd2\x2d\xd5\x63\xc5\xe3\xba\x29\x31\xfc\x0a\xde\x07\x05\x09\x40\x3f\xcb\x20\x3f\x41\x1a\xc6\x9d\xd4\x0d\xb8\xef\x7a\x22\xd4\x13\xa8\xb6\xa7\x6e\x82\xb0\x95\x6a\x80\x05\x45\x5e\x5b\xaf\xe9\xb5\xbd\x1f\x2b\x1d\x87\x31\x63\xf2\xf5\x2d\xa3\x24\x53\x62\x6d\x95\x2a\x64\xb6\x44\x41\x85\x7a\x76\x24\x15\x75\x45\x76\x3e\xf5\x8c\x6a\xd4\x81\x08\x76\xae\xbc\x69\xcc\x9f\xa0\x89\xdb\xf6\x88\xd3\xb4\xa3\x09\x3a\x60\xeb\x5e\xa2\x27\x87\x7b\x84\x17\x43\x05\x36\xa6\x6b\x79\x98\xbb\xe0\x51\xb7\xc1\x36\x73\x3a\x17\x54\xe6\xcf\xab\xc4\xe8\xb5\xc2\xa2\x3f\x3f\x25\x8b\xb3\x92\xf3\xa0\xe2\xb5\xf6\x4a\xdb\x42\xe4\x92\x7b\x47\x68\xd4\x38\x6d\x1d\x14\x65\x56\x28\xaa\x48\xab\x0d\x16\xff\x84\x15\x82\x0a\x95\x10\x65\x01\xd7\x61\x44\xf9\x42\x6e\xe1\xe0\x89\x28\x33\x95\x87\x42\xce\x5b\x07\x02\xd6\x4d\x09\x75\x2d\x2e\xf9\x3d\x84\x47\x6a\x3c\x73\x0f\x35\xab\xf4\xcf\xef\x30\x4b\x49\x7e\x7a\x3b\x0b\x49\xeb\x4b\x1b\x30\x23\xdf\xd8\x61\x80\x10\x95\x80\x04\xc6\x05\xaf\x6f\x3d\x48\x77\xf2\xde\xac\xe3\x55\x64\x0e\xa1\x68\xa7\x1e\xcf\x1a\x0c\xdb\xf8\xa1\xad\xc0\x52\xbb\x18\xc6\xda\x3b\xa6\xe1\xe2\x42\xfd\x7f\x70\x70\xc8\xc1\x68\xc0\xa1\x78\x8c\x67\x93\x5a\x8a\xe9\x73\x17\x95\x11\xbe\x4a\xe1\xa4\x41\x71\xa6\xa5\x3a\xd4\x1b\x7d\x6f\xb3\xf8\x34\xdf\xeb\x08\x80\x1d\xd5\x94\x5d\x03\x84\xd0\x5b\x5e\x68\x31\x62\x9f\xca\xdb\x52\xdd\xa7\x3f\x90\x56\x46\xaf\xe9\x96\xd9\x6d\xf4\x9d\x27\x38\x86\x0f\x22\x89\x18\x45\xbc\xc0\x9d\x3a\xdb\xa4\x06\xa9\xfb\x18\x7e\x11\xb8\x85\x25\x9a\x96\xb0\x3a\x86\xe1\x70\xac\x63\x08\xf6\x61\xae\x41\x31\x4b\x88\x6c\xae\xee\x23\xd8\x43\x87\xdf\x1f\xa3\xa1\xce\x55\x69\x39\x59\xb9\x8c\xf9\xea\xa4\x31\x91\x82\x1f\x55\xc0\xc6\x62\x65\xbe\x8a\x27\x1e\x95\x39\x2f\xf3\xc2\x91\xeb\xd0\xcb\xee\x95\xe0\x35\xe5\x0c\x5d\x25\x43\xce\xee\x6b\x5e\x55\xc2\xaa\xfb\x80\xbf\x0e\x24\x00\x8b\x1a\x82\xc5\x8a\xaa\xa4\x5b\xdd\xa8\xae\xb1\x10\x4c\xad\xe7\xbc\xa0\xe4\xbd\xff\x3c\x79\xff\x0e\x96\xda\x52\xbf\x31\x63\x7f\xc7\xde\x70\xfd\x7c\x12\x33\xe8\xfa\x80\x02\x44\xa5\x29\x20\x11\x13\xaa\xeb\xcd\x55\x1e\x55\x55\x07\x0b\x5c\xc5\xb3\x5b\x7b\xdf\xd4\x74\x2a\xea\xc4\xd2\xec\xbe\x76\x62\xab\xa2\xd5\xaa\x25\x8b\xca\xbc\x61\x2d\x42\x9f\x42\xda\xc6\xe8\xb5\x6d\x11\x8e\xb7\x85\x68\x5c\xd5\xca\xa8\x49\x33\x75\x8b\x68\x57\xf1\x45\x53\x46\x7f\x39\x80\xc2\x00\x4b\xe8\x5d\xa4\x31\x2b\x6e\x65\x90\x5c\x43\x21\xa4\x33\x8c\x00\x82\xe2\x23\x25\xfb\x5e\xd1\x00\xd7\x7a\x48\x29\x38\x00\x90\xe2\x4a\x95\x20\x93\xf8\x73\x1f\x5f\x4b\x95\x47\xa5\x98\xa1\xd1\x6d\x5a\xa3\x67\x5e\x3b\x6f\x30\x54\xc1\xe4\x86\xc1\xcb\xf8\x97\x15\xf5\x8a\x06\xe9\xc1\x07\xf7\x22\x3d\xa3\x2c\x62\xa0\xf5\xa1\x2f\x88\x31\xc0\xa2\x43\x00\x88\x5a\xc6\x9f\x84\x9e\xdb\xa0\xf1\xaa\x41\x51\xf8\x9e\xd7\xb9\x43\x84\x1c\x33\x07\x36\x0c\x2a\xe3\xb1\xdd\x9d\xbf\xfe\xf5\xaf\x23\xfa\x3f\x94\xad\xb4\xbc\x13\xe3\x44\xd0\x9d\x33\xe8\x41\x1e\x2f\xd5\xf2\x6c\xa7\x45\x81\xfa\xfe\x79\xd3\x54\x08\x3d\x14\xbb\x71\x19\xa8\x9a\x0b\xd6\x50\x53\xf6\xe9\xfa\x14\x6f\x84\x96\x65\x26\xd8\xa7\x52\x7e\x66\xa2\x52\xd9\x9c\xbd\xfc\xeb\xff\x3e\x3e\x3a\x7e\x79\x74\xfc\xf2\xfa\xf8\xf8\x35\xfc\xbf\xff\xea\xce\xf4\x18\x9e\xb7\x9a\xd0\xe4\xff\x7a\xf4\xf2\xd5\xd1\xb7\x2f\xaf\x5f\x7d\xfb\xfa\xcf\x7f\x7d\xfd\xe7\xbf\xfe\x57\xb4\x0a\x9b\x40\xfb\x3f\x92\x34\x2d\x2b\xb1\xae\x4c\xa9\x6b\x13\xf9\x83\xdb\x4a\xab\x8f\x1f\x70\x90\x08\x3e\x81\x1d\x92\xd9\x11\xd3\x01\x6b\x4f\xa2\xf2\xd8\xb7\x3f\x24\x04\x42\x10\x5b\x8d\x86\x0e\xc9\x04\xe7\x4b\x35\x5f\xb9\xda\xa3\x11\x96\x7e\x30\xd8\xd9\xcb\xed\x4b\xa7\x12\x3b\x90\x65\x61\x39\xba\x9b\xcb\xde\x64\xb8\x47\x1f\xfb\x17\x35\x50\xb5\xd0\x47\x56\xdd\xfb\x56\xc3\x34\x16\x0a\x2c\x4e\x02\x0b\xe5\xa4\x28\x7c\x6d\x87\xb2\x8d\x77\x12\x2a\x5d\x63\x01\x20\xda\x3c\xdb\x2e\x46\x50\xd9\x5f\xd0\x3d\x2c\xca\x1e\x16\xe5\xf7\x07\x8b\xb2\xa7\xfc\x5f\x2f\xe5\xff\xbb\xa5\xaf\x6f\xec\xc7\x56\x91\x7d\x68\x10\xab\xf6\x3e\x02\x57\xdc\x91\x46\xc5\xb1\x86\x41\x14\x41\xbe\xa1\xf5\x87\x9e\xf5\xd4\x9a\x21\x23\xee\x47\x57\x7e\xe3\xf5\x4d\xc9\xbe\x61\xe7\x53\x10\xe0\xec\xa9\x39\xc9\x73\x94\xf4\xde\x53\x8d\x83\xd7\x18\x4d\x28\xee\xc9\xe4\xd0\x12\x26\xc7\xdd\xd7\xcf\x10\x9f\xfa\xb5\x0f\x16\xef\x4a\x9f\x72\x01\x96\x4a\x23\x0a\x5f\x85\xd3\x55\xbc\xec\x75\xf6\xc6\x92\xa7\xd7\xec\x9b\x90\x86\x6f\xc9\xdb\x62\x01\xba\xe6\xdf\xc8\xa2\x81\x8e\xf6\x05\x14\xc2\xba\xb5\xba\x56\xa9\x21\x1f\x6a\x50\x85\xd9\x81\xa9\x32\x18\x86\x1e\x11\xd7\xfc\x28\x53\x24\x38\x33\xbf\x1a\x64\xcf\x75\xa7\x74\x0f\xed\xb9\x87\xf6\xdc\x43\x7b\xee\xe3\x82\xff\xb8\xd0\x9e\x49\x62\xbe\x0a\x3a\x2a\x6a\xe7\x8a\xc2\xa2\xf5\xbd\xc8\x11\xe9\x43\x23\xde\x65\x19\xaa\x05\xbb\x38\x33\x48\x1a\xbe\x56\x60\x05\xb5\x67\x79\x84\x9c\x8f\x93\x59\x2f\x04\x61\xb6\x3e\xc2\x35\x58\x7d\xd0\x77\x5d\xb2\xa5\x6a\x6a\xdf\xf5\x28\xa6\xab\x60\x02\x42\x5a\xf7\xd1\x1b\xa0\xa0\xb9\x27\x87\xd8\x66\xcc\xfe\x53\x35\xa8\x6f\xba\x6a\x88\x58\x31\x5b\xd4\xd8\xfe\x8e\xd7\x52\x35\x9a\x55\x45\x33\x93\xe8\x36\xc7\xc1\xbf\x78\xc1\xce\x5d\x5f\x64\x08\x7f\x8d\x23\x7b\xbf\x3c\xb9\x38\xa7\xcf\x92\xf1\xf9\x7f\x6e\xca\x1b\xe3\xd6\xd7\xdb\xcc\xfe\xf1\xb3\x56\xe5\xeb\x9b\x83\x11\x1a\xa0\x6e\x0e\xfe\x61\x9b\xbd\x5f\x5e\xe0\xb7\x5c\x7b\xea\xca\xb5\x5e\xd0\x73\x68\xfe\x2b\x7e\x12\x7f\x39\x69\x7d\xee\x04\xb5\x65\x47\x80\xdc\xeb\x1c\x7f\xc6\xb7\x69\x22\x6f\x3e\x7f\x91\x89\xb4\xf6\xf2\x09\xa7\xf3\x11\x1d\xd5\xf7\xb2\x46\xdf\x2f\x7a\x7c\x41\x87\x2b\x94\xba\x85\x44\x48\x33\x47\xc7\xf1\x2d\x9e\xbf\xd7\xf8\x91\x1b\x20\xe7\x37\x07\xaf\x6f\x0e\xa2\xc9\xdf\x1c\x8c\xf0\x61\x60\xf6\xd0\xe4\xee\xa5\x7f\x12\x66\xe1\x7a\x8a\xfb\xa2\xf9\xb8\xd6\x26\x1a\xf6\xeb\x9b\x83\xa9\x52\xf4\xe4\xd7\x11\x4d\xe2\x4a\x61\x96\xf1\x9c\x57\x95\x28\xf5\xff\x8f\x9d\x09\x84\xf9\x81\x94\x77\x48\xc3\xb5\xf3\xb7\x32\xee\x92\x2f\x0a\x7b\x6c\xbd\x77\xc2\xa5\x42\x83\x17\xc2\x81\xf6\x80\x73\xa2\x75\x5f\xe2\xdd\xb5\xba\x22\x54\x3f\x83\x9e\x41\x4b\xe6\xf7\xe4\x41\xc7\xda\x82\x46\xd5\x22\x47\x47\x09\x38\x2f\x4a\x7b\x52\xb0\x76\xb3\x15\xac\x3f\xdb\x03\x22\xc0\xe1\x02\x21\x21\xd5\x92\x3d\x6b\x40\xeb\xb6\x84\x05\x65\x15\xbb\x6c\xcf\x71\x20\x26\xae\xc7\xe6\x2e\xa2\xed\x89\x4e\x8a\x3b\x87\x87\xda\x95\x7a\x01\x1a\x84\xf5\x9d\x43\x6f\x6c\xda\x94\xe4\x81\x90\xa5\x36\x1c\x70\x02\x91\x74\xc0\x66\xe3\x28\xc3\x09\xc0\x59\x58\x52\x10\x9f\xc4\x11\x33\x4d\x0d\x52\xa1\x34\x61\x78\xce\x8b\xe6\xdc\x9a\xcb\xca\xe5\x62\x1b\x55\xfb\xc6\xd0\xd4\xad\xe1\xb3\xeb\x8f\x67\x1f\x5f\x5b\x86\x8a\xe1\xa7\x5a\x90\x6b\xd1\xb4\x2a\xdf\xa3\x58\xd7\xa0\xc7\xd6\x75\xec\xef\x08\x79\x72\xbb\x65\x08\x33\x57\x15\x8d\x46\x20\xf2\xf1\xf3\x47\x83\x20\x77\xef\xf1\x46\x86\x7e\xa9\x5d\xbd\xfb\x09\xd4\x19\x65\x46\x55\xac\xb0\x1c\x35\x94\xf4\xa5\xca\xdc\x95\xa8\xd9\x3d\x87\x58\x26\x57\x6a\x5f\x63\x80\x67\x81\xa0\x50\x9e\x2a\xe3\x2a\x44\xb7\xd1\xd1\x9f\x7b\x61\x2f\x6b\x8a\x0c\x31\xfb\xff\xf5\x28\x11\x63\x49\x62\x04\x8d\xc7\xe3\x31\x7b\xf1\x82\x54\x2e\xb4\x40\x5a\x8a\x63\x0f\x11\x7b\xa6\x26\x3f\xb3\x6f\xfa\x1f\x7c\xce\xae\x84\xf9\xbe\x56\x4d\x45\x17\xdf\x0a\x76\xcf\x66\x77\xb7\xec\x1b\xcb\x68\xef\x5e\x8e\xbb\x0f\x9f\xb3\xff\x61\xf4\x08\x6d\x9b\x6e\x6c\xf6\x13\xa3\xd9\xdd\xed\x73\xf6\xeb\xdf\x58\xaf\xcb\xe7\xec\x9b\xee\x6f\xc0\x22\xa3\x65\xf7\xe6\x55\x38\x54\x00\xdf\x06\xd2\x8a\x14\x65\x26\x90\x91\x59\x01\x91\x96\x1a\x6d\x66\xc5\xd2\x49\x89\xb6\x03\xe7\xaf\x75\x80\x00\xb8\xf8\xf6\xb8\x85\xe4\x68\x5f\x1c\x7d\x6b\x33\xeb\xa0\x6d\xe7\xb1\x86\x8a\xce\xdd\x58\x69\x97\xa6\xeb\xe3\xc2\x54\x2a\x19\x55\x37\x35\xf3\xd6\xb5\xd3\x44\xdc\xb0\x24\xe2\x91\x99\xd7\xaa\x99\xcd\xdb\xc0\x7e\x4e\xa6\xc9\x05\x2f\xc2\x22\x05\x73\x36\x09\xe1\x1c\xe4\x83\x23\x59\x8e\x59\xfb\x02\xeb\xd8\x2d\xea\xc8\x95\x25\x1f\x7e\x63\xa7\x82\x83\xb3\xea\xe8\x08\xa2\xa6\x46\x21\x36\x4b\x98\x6c\x1c\x22\x85\xed\xcd\x27\x9f\x67\x63\xb8\xd9\x28\xae\xe6\x92\xdf\x1f\x8c\x0e\x4e\x31\x72\xf9\x4d\x99\xa9\x1c\xdd\xf2\xf4\x8b\x1d\x43\x5f\xa3\xed\x36\xef\xad\x71\xa7\x01\x38\xd5\xdd\xbf\xdd\x7a\x61\x78\x15\x3b\xbc\xe4\xf7\x87\x0c\x45\xf5\x4f\x65\x28\x7b\x8f\x68\xc1\xa5\xf2\x2f\x26\x6d\x83\xf1\x30\x87\x46\x01\x76\x16\x86\x48\x8e\x91\xdf\x1d\x03\x16\xfc\x70\x3c\x3b\xc4\x11\xa5\x06\x13\xf5\x07\x21\x12\xa9\x01\xd9\xf5\x4c\x89\xc1\x48\xa6\x41\xee\x45\xde\x81\x11\x2e\x31\x17\x76\xf4\x1c\xf3\xd3\x5d\x05\x6e\x88\x9e\x42\x6b\x19\x86\x4f\x79\xe9\x93\x10\x41\xac\x86\xa3\x0d\x50\xc6\x62\x09\x91\xa0\x20\xb7\x84\x38\x96\x5c\x95\xc2\x1d\x4c\xbb\x11\x08\x7b\x07\x31\x0c\x1c\xed\xde\xd2\xaa\x85\x70\xb4\xf1\x82\x63\x19\xc3\x55\xc1\x1a\x93\xa5\x81\x38\x8d\x2f\x74\xbd\x1b\x23\x8b\x17\xb2\x34\xda\xd4\xe3\xf3\xd2\x7c\xac\xaf\xb0\xa7\x15\xd7\x3c\x6a\x46\x29\xef\x50\x3a\xc0\x95\x70\x85\x9d\xc0\x04\xa4\x6f\x5f\xb1\x56\x72\x18\x03\x8f\x05\x9c\x0b\x59\xa2\x58\xa0\x6a\x8c\x8e\x89\xa2\x3b\xb0\x70\x7a\x1c\xef\x31\xb2\xeb\x58\xd5\x2a\x6f\x32\xa1\x19\xd2\x5e\xdd\x2c\x84\x2b\x2e\x5b\x92\x19\xcf\x61\x02\x11\x01\x5a\xaa\x06\x54\x22\x7e\x27\x30\xbc\x96\xe0\x73\x47\x2e\x42\x11\xaf\xb4\x1f\x39\xcf\x60\xff\xc8\x07\xa0\x5c\xc6\xd3\xca\xed\x92\xa5\x39\x52\xf5\x51\xd8\x98\xad\x56\xdf\xf9\xcd\xcf\xcb\xa9\x5a\xbd\xe4\x53\x15\xec\x2f\xf4\x16\xac\x7f\x9c\x82\x31\x57\xf7\xec\x5e\x1c\x16\x05\xbb\xa7\x0a\x07\xb9\xd4\x0e\x9c\x83\x82\x8a\x37\x0e\x0b\x5c\xf0\x9f\x55\x7d\x30\x3a\x58\xc8\x12\xfe\x3b\x93\x26\x80\x2d\xcf\xa4\x39\x55\x8b\x85\x34\xf8\xef\xeb\x5a\x88\x2b\xc3\x8d\x38\x18\x1d\x4c\x1a\x59\xe4\x67\xf8\xef\x99\x0a\xaf\xd8\x7b\x29\x0b\x88\x94\xa8\x0a\x6e\xec\x38\xfa\xe4\x2f\xbc\x9c\x3a\xf3\xbe\x8b\xd4\xc3\x30\xa4\x81\xa7\x61\x90\x03\x0d\x56\x5d\xb7\x30\x93\xd4\x53\x5c\xab\xe4\x13\x58\xbd\xd4\x13\xbf\x08\x0f\xba\xc4\x88\x17\x11\x0c\x0f\xbc\xc9\xa5\x79\x71\xf7\x72\xbc\xa1\x17\x21\xe3\x15\x46\x69\x80\x10\x39\x6f\x63\xbe\xc5\xd5\x98\x83\x7d\xcf\x07\x91\xc0\xb7\x58\xa1\x66\xeb\x8e\x10\x08\xa6\x07\xa3\x03\x78\xe1\xfc\x0c\x83\x4c\x67\x82\x5a\x09\x6d\x3e\x5d\x9e\x1f\x8c\x0e\xee\x44\x3d\x39\x18\x1d\x34\x5a\xd4\x09\x13\x6f\xe9\x10\xd8\x52\x80\xc2\xe1\x21\x65\x6c\x34\xa5\x76\x11\x28\x39\xbb\x15\x4b\xe7\x83\xe3\x95\x53\x40\x90\xd4\x97\x34\x0b\xf2\x9c\x44\x99\x8a\x04\x69\x85\x26\x07\xab\xdb\xdc\xa9\xdb\x90\x67\xec\x82\x66\xec\xfa\x43\xde\xe9\x9c\xcb\x32\x06\xc2\xe3\x8d\x99\x8b\xd2\x90\xe3\x75\x04\x7f\xab\xda\x71\x46\x88\xca\xce\x5d\x01\x4c\xfa\x06\xe0\x31\x09\x1f\xde\x07\x7e\xd4\x30\x2f\x5e\x87\xbc\xd0\x68\xcc\xa8\x0f\x11\xa0\x15\xe8\x4b\xba\x52\xa5\x4f\xb1\xf5\x46\xba\xb8\x2b\x87\xcf\x09\xc6\x49\xe3\xf9\xe2\x98\xfd\x28\x96\xde\xb6\x8d\xa5\x82\x8b\x65\x28\xeb\x1a\x8e\x07\x66\xda\x2e\x2a\x55\x3a\x7f\xd3\x9d\x92\x39\x92\xcb\x4c\x15\x85\x44\x9b\xd3\x33\x31\x9e\x8d\x59\xa5\x72\x2d\xb2\xa6\x96\x66\x89\xc1\xf8\x63\x3f\x73\x67\x22\xc4\xdf\x9f\x53\x15\xea\x38\x05\x54\xcf\x55\x0d\xf5\x63\xdb\x0b\x11\x9f\x46\x3b\x2c\x9f\xad\x05\x47\x2d\x75\x1e\x43\x4c\xf4\x45\xeb\x5c\xf5\x1d\xc5\x7b\x67\xc2\x8e\x9d\x09\xee\xda\x27\xf4\x04\xa8\x46\x8d\xa7\xf9\xfc\x6c\x14\xc5\x71\x02\x97\xe6\xa1\xc0\x44\x52\x12\x94\x8b\x4a\xd4\x5a\x95\xf6\x8d\x4f\x3a\x59\xe5\x35\x6a\x81\x75\x31\x3a\x9c\x6f\x8d\x35\x79\xdc\xbe\xc6\x63\xab\x4f\x6a\x51\x03\x9b\xde\xbb\x1d\x76\xea\x76\x40\x26\xd1\xbf\x71\xf6\x70\xbc\x03\xcb\x06\x77\x92\x3b\x12\xeb\x7b\x1e\x05\xfe\xa6\x7a\xc4\xc5\xbc\xb4\x1b\x3c\xe0\xb6\x0e\x65\x7f\xe9\xb6\x22\x51\x97\x9a\x2a\x42\x00\xc6\xe7\x98\x9d\x39\x98\x5b\xcc\x0a\xb3\x67\xf3\x9d\xd4\x06\x52\xb3\xfd\x1a\x63\xd6\x9c\x2a\x8f\xfc\x8e\xc6\xb5\x51\xd6\x9c\x33\x2a\xf9\xef\x5d\x16\x70\x25\x42\xad\xc7\x50\xb4\xfb\x57\xcf\x33\x87\x32\x7b\x83\x5a\xdc\x03\x94\x1b\x79\x69\x1b\xef\x80\x43\x5c\x8c\xfa\x73\xbe\xf1\x3a\xf7\xd8\x99\x1d\x8e\xf7\x8c\x62\xf4\x2d\xbd\x39\x72\x09\x3c\x1c\x01\x55\x9f\x8f\x30\x57\xc0\x12\x2c\x67\x1e\x0c\x96\xc2\x91\xcb\x67\x02\x49\x3e\xb0\x3f\x55\xb3\x85\xa8\x67\x51\x3c\x37\xef\x3b\x2b\x82\xf6\x16\xac\x80\xf6\x4a\xd0\x91\xe6\x8c\x62\x97\xb0\x8d\x2a\x1d\xda\xf9\x98\x7d\x24\x26\x37\x1d\xdc\x1f\xc6\x3e\x96\xc5\xd2\x4a\x32\x33\xd8\x71\xb7\x24\x8c\xce\x5d\xe9\xc0\x0d\x1e\xec\xf5\x77\x46\x93\xb0\x7d\x97\x22\x13\xf2\x4e\xe4\xad\x60\xfa\x44\xd6\x41\xbc\xf4\x2e\x7d\x03\x44\x00\x7f\x68\x1e\xe5\x13\x7b\x2f\xb3\x5a\x5d\x53\x4a\x40\x24\x8d\x25\x62\xae\xdd\xb3\x00\xae\x81\xa3\xb2\x3f\x71\xab\xfa\x97\x1e\x03\x34\x14\xd2\xe0\x2c\x8c\x32\x91\xe5\x83\xf1\x62\x1b\x1c\xe5\x2e\xce\x8b\x7b\xd5\x1f\x69\x77\x96\xe3\x1e\xdb\x87\x79\x6a\x44\x1d\xdb\xad\x89\xa9\xfa\x83\x16\x59\x97\x83\xc5\x80\x0e\xb6\x3d\x22\x0f\x39\x46\x14\x0f\xf7\xce\x49\x25\x8f\x3f\x3c\xd8\xe3\xd5\x40\xbe\xd2\x75\xb4\x34\xbe\x0a\x41\xa5\xaa\xa6\x00\x0e\x68\x09\x27\x73\xe8\x7d\x89\xc5\x02\x1a\xe7\x00\x57\x51\x91\x7e\xab\x6a\xa6\x11\x82\x7b\xda\x14\xbe\x73\x3d\x8a\xf2\x20\x21\x90\xc3\x01\x06\xd8\x9e\x4f\x55\x8e\x41\x80\xd8\x15\x41\x78\x63\x67\x76\xed\x74\xf8\x42\x27\x74\xb0\xd5\xaf\xbd\xd7\x8d\x51\x47\x61\x02\xde\xf8\x87\x6f\xbd\xc7\x5c\xb3\x5d\x14\x10\x80\x84\x03\xd8\xd0\xf3\x8b\x54\x22\x18\xee\xf5\xf9\x85\x1e\x21\x59\x0d\x4e\x05\x77\x0f\x54\x2d\x67\xb2\xf4\x0e\x02\x90\xd2\x28\x44\x89\x55\xb5\xfa\x2c\x57\xc3\xa7\xf6\x05\x51\x54\x92\x52\x5e\xf8\x99\xe8\x04\x52\x86\x4c\x29\xda\x5d\xa9\x89\x4b\x82\x4f\xc6\x72\xb8\x16\xbb\x1c\x4a\x82\x9b\x89\x87\xd0\x23\x97\xd4\x8a\x82\x1c\x74\xb3\x43\xaa\xd4\x24\x25\xbb\x93\x20\x98\x3d\x89\x68\x67\x7b\x3c\x99\x91\x0e\xdd\x11\x5b\xdd\x23\x22\x2e\x48\x0e\x61\x08\x1c\x7e\x26\xb1\xaf\x16\x95\xaa\x63\x2c\x14\xa0\x8a\x1d\x2d\x8f\x85\xde\x62\xef\x42\xeb\x15\xe2\x76\x8d\x36\x8e\xdd\x99\xba\xd1\x43\xdb\x08\x6a\x74\x6f\xd0\x3f\x89\x7a\xe2\x28\x77\x00\xdd\xb4\xdc\x75\x32\x50\x4c\x84\x22\x74\xdf\x0e\xd1\x3b\xba\xa9\x0e\x46\x4d\xdd\x8b\xfa\x28\x83\x44\x6c\xa8\x15\x80\xc6\xdf\x8d\x52\xf5\xe2\xe0\x8b\x17\xed\x6d\x79\x11\x6f\xcb\x86\x41\x17\xe1\xf4\x6c\x57\xbf\x67\x73\xdf\xc7\x46\x16\x98\xae\xe8\xf6\xdf\x5b\x18\x6e\xd6\x85\xde\xf9\x46\xa8\x67\xb8\x20\x3b\xbc\x80\xf0\x70\x6d\x26\xdb\x3e\x94\xee\x0b\x87\xd2\x3d\x30\x1e\x6e\x50\x35\x40\x0b\xdf\x3e\xfa\xed\xe9\xa2\xdf\xbe\xbe\x50\xb3\x35\xe6\xde\x0d\x49\x0c\xf8\xb8\x2f\xfd\xa1\x5d\x41\x67\xda\x2d\xe3\x98\x73\x7f\x60\x60\x25\x23\xab\x70\x17\x00\x69\xc0\x6b\x3d\x80\xf1\x0e\x1f\x74\x3c\x05\xdd\x2f\x53\xef\xed\x45\xf0\x77\xca\x5e\x6d\x21\x86\xb4\x30\x94\xb1\xd2\x42\x60\xc2\x6e\xc8\x14\x51\x22\xd6\xe0\x34\xb9\xde\x3e\xf0\x45\x0a\x84\xff\x32\x7e\xdc\x26\xbf\x7e\x4d\xbc\xd0\x55\xf2\x85\x88\x12\xb6\x09\x8c\x84\x52\x91\xc7\xec\x93\xc6\x4b\xe8\x33\x69\x89\x40\x6b\x16\xd6\x9c\x62\x7f\x9c\xa3\x14\x32\x75\x70\x86\xf0\x59\xb9\xa8\x0a\x5f\x8d\x41\xdc\x09\x28\xc0\xa1\x23\x44\xbf\x08\x05\x51\x6a\xe7\xe8\xdc\x4e\x10\xad\xe3\xa3\x92\x5e\x8d\x81\x95\x20\x20\xf3\xba\x29\x04\x81\x3f\x02\x11\xb8\x29\x6f\xca\x56\x19\xcb\xc3\x4a\xe5\xfa\xd0\xe7\x68\xdb\xbf\xc6\xf8\xe3\x8b\x42\xcd\x0e\x5b\xe5\xff\x0a\x35\xb3\x94\xc5\xcf\x4a\x4d\x5d\xfb\x6f\x42\x43\x8e\x19\x4a\x34\x08\x2a\x64\x26\xeb\xf8\x45\xff\x85\xce\x6b\x71\x93\xb8\xf3\x17\x3a\xe3\x85\xe8\xb4\xb5\x3f\xb5\x3b\xb5\x73\x3b\x9f\x5a\x05\x26\xcf\x20\xb3\x5a\x87\xd4\x2c\x83\xc9\x40\x32\x47\x86\x08\xcb\x02\x9a\x8e\x28\x75\x53\x47\x07\xd9\x19\xf4\xd5\x9d\xa8\x0b\x5e\xa1\x58\x86\xe1\xd6\x66\x2e\x6a\xf8\x48\xfa\x1c\xf4\x27\xde\x9a\x8f\x24\xe5\xc0\x5f\x01\x82\x3a\xda\x71\xf5\xce\x8d\x85\xa2\x15\xb4\xa7\xd3\x34\x0a\x3b\x2f\xc1\x8f\xde\xf2\x54\x29\x56\x08\x03\x8e\x5e\x09\x41\x05\x06\xac\x4a\x2a\x77\x7e\x0b\x8f\x95\x4e\xe2\xc7\x26\x51\x35\xdf\xa7\x49\xd4\xc9\xc5\xf9\x03\xa9\x54\x7b\x08\xbb\xa0\x55\x1b\x4a\x6b\xb2\x25\xa8\x3d\x64\xb0\xab\x90\x4d\x93\x0f\x00\xd5\x33\xf9\xd4\x1d\xc6\x95\x0f\x57\x79\x59\xa3\x03\x9d\x7c\x4e\x95\x0c\x76\xe8\x4c\xbd\x00\xba\xbd\x32\x17\x06\x29\x7b\x2c\x16\x67\xaa\x84\x72\xaa\x41\xf8\x75\xfe\xd2\x99\x74\x59\x7e\xb0\xd4\x4d\x41\x00\x9f\x73\x75\x4f\xb5\x40\x50\xb9\x44\x2d\xdb\x6a\xb8\x33\x55\x4b\x4c\x90\x24\xf3\xd2\x3a\xe9\x1e\x3a\xdd\x4b\xf7\xfb\x9c\xf9\xdf\xa9\xe8\x9d\x62\x05\x2e\x04\xd3\x3b\x7f\xa7\x8a\x52\x09\xa0\x3e\xcb\x44\x16\xd2\x2c\x91\x55\x5a\xd2\x26\xcb\x69\xcd\x7d\x14\xc0\xe3\x0c\x52\x61\x00\xe0\x58\x5a\x48\x03\x56\xb8\x84\x40\xf4\xd1\x3f\x6b\x4b\x44\x94\xc3\x6c\x87\x8c\x4e\xac\x52\xa1\x85\x8e\x70\x94\x31\xb4\xb8\x6d\x1c\xa2\x08\x48\x97\x88\x1f\x82\xe5\xa0\x60\x83\x15\x1e\x64\xe9\x8b\xad\x68\xb4\xcd\x35\x25\x5d\xc6\x89\x32\x73\xe8\x9a\x20\x97\xb7\x14\xf9\x80\x7e\xf4\xc5\x3d\xa0\x55\x84\xbb\x1a\x85\x22\x90\xa3\x24\x84\x45\x44\x65\x72\x9c\xfd\xdd\x8c\xd9\x89\x6f\x80\x69\x96\x26\x9b\x87\x92\x76\x84\x31\xde\x9f\xd2\xdb\xf3\xcb\xab\x6b\x6c\x0d\x5c\xb2\x41\xac\xe1\x46\xbb\xd0\x77\x07\xc0\x47\x04\x16\xc6\x22\x35\xfb\xa0\x4a\x82\x15\xa2\x18\x16\xaa\x52\x99\x8b\x12\xc2\xa6\x2d\x65\xcd\xe6\x47\x20\x31\x35\x58\xc8\x9c\xae\x93\xe3\x90\x76\xf3\xc6\x0c\x69\x3b\x4e\xdd\x2e\xa8\x5d\x26\x08\xea\xb5\x13\xab\x57\xaf\xec\x43\x95\xfb\xf0\xcd\xc7\xd4\x09\x88\x8e\xed\x16\x7c\x0e\xbe\xba\xa1\x2a\x89\x6f\xac\xcd\x14\xf5\xad\x52\xf6\x2a\x78\xda\xb6\x8e\xef\x2d\x56\x7f\x44\x8b\x15\x89\x51\x7b\x93\xd5\xde\x64\x15\x4e\xc3\x56\x84\x06\x48\xd3\x5a\x42\x63\x5b\x01\xa0\x71\xd8\x46\x42\x88\x9d\x4e\x43\x2c\x3f\x94\x2a\x8f\xf9\xd7\xd8\xf9\xfd\x09\x4b\x2d\x80\x9c\xa2\x88\xae\xa6\x64\x60\x41\x5b\xcd\x33\x2a\xae\x50\x6b\x91\x39\x6a\x01\x0d\x9f\x6f\x16\x0f\xd9\x23\x64\x03\x11\x30\x96\xc3\x21\x7f\x05\xb1\xc0\x4f\xc9\x33\xc4\xc8\xc4\x52\xb7\x19\xee\x90\xd6\x06\xca\x59\x0a\xa5\xce\x3f\x8b\x44\x90\x1a\x57\x93\x4c\x56\x3d\xa5\xf5\xe6\xe0\xe6\xc0\xdb\x44\x00\x73\xce\x75\x92\xc7\x86\xb9\xb4\xb5\x02\xd7\xd3\xbf\xb1\x9d\x8c\x52\xaa\xd2\x99\x9f\x3e\x5d\xbe\x4b\x83\xee\xc5\x0d\x5a\x35\x4d\x3f\x5d\xbe\x63\x15\x37\x73\x9a\x69\x10\x58\xe0\x40\xd8\x2b\xfe\x0d\x72\x7b\x88\x21\x77\x69\x77\xe0\xe9\x26\x40\xee\x69\x53\x14\x23\x36\x95\x98\x3e\x27\x2a\x17\x9a\x60\x7b\x1d\xb3\xb8\x16\xef\xcd\x81\xbd\x22\xb5\xcc\x34\x14\xd3\x7d\xa7\x66\x61\x17\x01\xed\xd9\x9d\x7b\xe6\x9a\xc1\x3b\x73\xc1\x0b\x33\xff\xe5\x1b\xff\x92\x95\x54\xf0\x47\x96\xcd\x45\x76\xab\xb7\x5a\xae\xdf\x5e\x6a\x25\x28\x66\xa8\x13\xbe\x85\xe0\xda\x39\x3b\x3e\x6d\xa5\x16\x28\x89\x41\x54\x28\xa2\x13\x6f\x6b\xca\xda\xd0\xb6\x39\x74\x19\x86\x4d\x70\xc1\x2a\x5e\x14\x91\xb1\xed\x29\x44\xc5\x8e\x35\xff\x57\x72\x5e\xc3\xcf\x03\x21\x22\xe0\xab\x26\xf3\x5f\xd2\x40\xcb\x4e\xc8\xa5\xae\xe3\x0a\x2f\x9e\xe2\xc8\x29\xe5\x11\x72\xb6\x10\xae\x3a\x5c\x84\x58\xfa\xc9\x7f\x7f\xf5\xc5\x0f\xe3\xd8\x6e\xd3\xec\x7b\x2b\xa6\xa6\xd9\x33\x2b\xdf\xf7\x23\x04\x2c\xa1\x79\x3e\x34\xe3\x35\xe3\xdc\x6e\x84\x77\xa2\x9e\x0c\x8c\x10\x1e\x45\x98\xa4\x61\x3c\xab\x07\x61\xdf\x7b\x9c\x99\xf6\xff\x3e\xc0\x39\xb4\x19\x7b\xe6\x45\x35\xe7\x5f\x67\xd2\x81\xf1\x01\x2d\xfb\x04\x84\x7d\x02\xc2\x3e\x01\xe1\x5f\x50\xa1\xdd\x27\x20\xec\xd5\xe8\xdf\x22\x01\xe1\xf7\x63\xd0\xfe\xfd\x67\x4a\x90\x04\xb2\xcf\x97\xd8\xe7\x4b\xec\xf3\x25\xf6\xf9\x12\xfb\x7c\x89\x7d\xbe\xc4\xbf\x68\xbe\x84\xf9\x6d\x29\xe4\x3e\x6d\x63\x9f\xb6\xf1\x65\xd2\x36\x06\xbc\xdb\x8f\x49\xf4\xe8\x57\x85\xda\x6d\x52\xc8\x80\x94\xba\xbd\x91\x6d\x9f\x20\xf2\x87\xb1\x4e\x3c\x95\xbb\xbd\x65\x93\xdd\xfb\xdc\xf7\x3e\xf7\xce\x91\xd8\x8a\xe8\xec\x53\x46\xf6\x29\x23\xfb\x94\x91\x7d\xca\xc8\x97\x4f\x19\x19\x10\x99\xbe\xe6\xc4\x91\x55\xc9\x0b\xff\x32\x49\x13\xb4\x6f\xfb\xd4\x89\xbd\xdc\xbb\x4f\x9d\xd8\xa7\x4e\xec\x53\x27\xf6\xa9\x13\x5f\x24\x75\xa2\xc5\x77\xbe\x70\x02\x45\xff\xdb\x5b\x29\x59\xfb\x64\x8a\x3f\x1e\x97\x7b\x62\xeb\xce\x3e\xa5\x62\x6f\xde\x19\x10\xb9\x1f\x40\x7a\xf6\xe9\x15\xfb\xf4\x8a\x7d\x7a\xc5\x3e\xbd\x62\x9f\x5e\xd1\xe5\xb3\xfb\x24\x8b\x7d\x92\xc5\xee\x92\x2c\xd2\x87\x6a\x33\x86\x8d\x05\x7b\xf7\x99\x16\xfb\x4c\x8b\x7d\xa6\xc5\x3e\xd3\xe2\x2b\xd3\x76\xf7\x99\x16\x7b\xed\xfa\x8f\x97\x69\xc1\xce\xde\x5c\x5c\xbe\x39\x3d\xb9\x7e\x73\xf6\xda\x8a\x5d\xec\xaa\x15\xf9\x49\x43\xd5\x4d\x55\xa9\xda\x6a\x8e\x32\xab\x15\xd3\x22\x53\x10\xd6\xaa\x8d\xe0\x60\x16\x0d\x43\x19\x9f\x82\x64\x1f\x7a\xf0\x0e\x2d\x81\x8a\x81\x69\x15\x2b\x85\x62\xaf\x1a\x66\xbe\xcf\xf8\xf0\x92\x39\x0a\x42\xfb\x84\x8f\x7d\xc2\xc7\x3e\xe1\x63\x9f\xf0\xb1\x4f\xf8\xd8\x27\x7c\xec\x13\x3e\x1e\x48\x21\x7b\x02\xce\xe5\x00\x0d\xde\x44\xd4\xd9\xa7\x8f\xec\xd3\x47\xf6\xe9\x23\x4f\x92\x3e\x92\x16\x79\xb7\xb6\x1b\xee\x93\x47\xfe\x30\x06\x97\xa7\x0a\x2f\x88\xad\xcc\xfb\xe0\x82\x7d\x70\x41\xfb\x44\x6c\x43\x71\xf6\x99\x23\xfb\xcc\x91\x7d\xe6\xc8\x3e\x73\xe4\xcb\x67\x8e\xa4\xa5\xa5\xaf\x39\x71\x64\x5f\x71\x64\x5f\x71\x24\x3a\xba\xfb\xdc\x99\xbd\xd8\xbf\xcf\x9d\xd9\xe7\xce\xec\x73\x67\xf6\xb9\x33\x5f\x24\x77\x26\x66\x3b\x5f\x38\x75\xa6\xf7\xe9\x6d\x74\xcc\x7d\xe2\xcc\x1f\x8f\xc5\x3d\xad\x65\x6b\x9f\x37\xb3\x37\x6d\xa5\xa5\xed\xed\xe9\xce\x3e\x6b\x66\x9f\x35\xb3\xcf\x9a\xd9\x67\xcd\xec\xb3\x66\x3a\x4c\x76\x9f\x34\xb3\x4f\x9a\xd9\x5d\xd2\x4c\xf2\x4c\x45\xdc\x1a\xc5\xa6\xa3\x99\x0a\xaf\xe2\x4f\xbd\xd8\x02\x07\x83\xf6\x59\x64\xa7\xb5\x80\x9c\x07\x5e\xac\x74\x88\xb7\x5a\x3a\x2d\xd0\x6a\x73\xe2\xb3\xc8\x8e\x90\x8f\xbb\xf4\x11\xa3\x18\x89\x59\x76\x7f\x2d\x39\xa2\xf7\xe0\x11\x44\x49\x98\x9a\x97\x1a\x22\x68\xb6\xc5\x13\xda\x2b\x16\x7b\xdb\xd9\x57\x24\xef\x5b\x3e\x9a\x08\xc0\xab\x44\xc6\xe6\xaa\x00\x66\x13\x5c\x26\x15\xd7\xf6\x9e\xd0\xe9\xc1\xeb\xe2\x42\x9e\xfc\x8d\xb0\xc2\x1c\xd2\x76\x74\x0d\x38\xcb\x8d\x3d\x55\x14\x32\xe3\xb8\x77\x16\xf7\x3e\x62\xba\xc9\xe6\x56\x0c\x92\x94\xf2\x24\xb4\xf3\x44\xc0\x09\xe5\x99\x91\x77\x6b\xed\x71\x9e\x88\x04\x9e\x96\x22\x22\xe3\x01\x22\x62\x67\x4e\x91\x82\xc9\xf0\x53\x8a\x1c\x05\x17\x6c\x51\x60\xb4\x2e\xad\x00\xad\x07\xc4\x52\xc3\xd2\xc1\xd1\x88\x89\x87\x73\xec\xfa\xb5\xf2\xf9\x5b\x56\x5a\x51\xb8\x66\x99\x71\x9e\x96\xa7\x9e\x2a\x45\x85\xae\x20\xe6\x8f\xa4\xc8\xb0\x98\xbb\x22\xef\x34\xdc\xdd\xf1\x8b\x2b\x3a\xfa\xeb\x79\x86\x34\xd8\x9a\xf6\x75\xd3\x13\xdd\x0b\x0b\x0c\x77\x64\x2d\xd3\x88\x4e\x7c\x22\x53\x2a\x3c\x04\x3f\x5d\xdd\x88\x10\xf3\x1c\x0e\x57\x2e\x2c\x5d\x70\x4e\xa5\xc5\x82\x23\x81\x9c\x08\x48\x09\xe4\x70\x7c\x81\xa0\x39\x95\x93\xba\xac\x6a\xb5\xa8\xe2\x31\x4e\x94\x2a\x04\x6f\x85\x67\x27\xe5\x5a\x0c\xca\x96\x3a\x8a\xc7\x4e\x0c\x4b\x94\x99\x6a\x40\xc3\x45\x5e\x4a\xa1\xd2\x99\xca\x85\x0e\x44\xe0\x4f\xc7\x2f\xed\x1f\xb3\x99\xd0\x40\xba\xab\x5a\xdc\x49\x65\xdb\x45\x37\xea\x5e\x00\xed\x04\x27\xf9\xce\x6f\x8b\x9b\xd0\x6e\x6f\x88\xef\x75\x87\x07\xd9\xd3\xaa\xcd\xc4\x1f\xa2\x61\x78\x98\xe3\xe5\x74\x29\xab\x61\xaf\x8c\xb2\xb4\x09\x02\x08\xae\xd5\xad\x40\xea\x76\x0a\x63\xfb\x51\x2c\xcf\xb8\xe1\x68\xd9\x16\xa5\x96\x70\x76\xc0\x88\xa1\x89\x07\x80\x41\x84\x48\x1c\xe8\xb8\x13\xea\x9b\x12\x0d\x64\x79\xb4\x10\x0b\x55\xdb\x07\xe6\x5e\x88\xd2\x71\x52\xfb\x15\x2b\x98\x39\x9a\x5a\xd5\x0a\xc3\xeb\xdf\x44\x3f\x4a\xa3\x45\x31\x75\xfd\x73\xc3\x0a\xc1\x35\x70\xda\xaa\x56\xf6\xe4\x5b\x71\x45\x72\x4b\xa8\x05\xab\x44\x4d\xc9\x38\x1b\x48\x6c\x38\x8a\x53\xfb\xc3\x14\x64\xc0\xb3\xa4\x77\xe9\xe2\xcd\x7b\x9f\x1e\x44\x03\xbf\x7e\x77\xc5\xb2\xf0\x9e\x66\xcf\x42\x96\x71\x1c\x2e\xaf\x47\x96\xcb\xf1\x72\xf9\x3c\x69\x4d\xc9\xe2\x15\x5e\xfd\xe1\xaa\x96\x77\x56\x4a\xbd\x15\xcb\x90\x72\x3c\x51\x77\x22\x1e\x47\xf2\x23\xe2\x73\x25\xd1\xc9\xbc\x22\x22\xfe\x4d\xbf\x11\x93\x65\x4e\xb3\xe3\x0c\x88\x9f\xbf\xe4\x9e\xe0\xc5\xa7\x0a\xbe\xf3\x48\x3f\x9a\x8f\x94\xb7\x87\x30\xa1\xfb\xc0\xd9\x04\xe1\x6f\x22\x78\x6d\xa5\x35\xf8\xc5\x09\xf9\x91\x90\x36\x85\x54\x0c\x22\xe0\xed\x9b\xbf\x6d\xcc\xf3\xba\xd0\xe1\xc7\xdc\xf0\xcb\x88\xce\x0e\xdd\x6a\x4f\x71\x9d\xea\xe0\x8d\x90\x7c\xa2\x1a\xc3\x38\x9b\x72\x59\x88\x3c\x4e\x8e\x73\x87\xb1\x4b\x79\x91\x99\xb9\x0e\xe7\x82\xe7\xa2\xde\xe4\xa6\xa8\x3c\xc1\x0a\x20\x39\x86\x02\x48\x7a\x1f\xf2\x79\x4e\xb4\x2f\xbd\xec\x29\x7b\x4f\x66\xa2\x3e\x18\x1d\x20\x27\xc5\x9f\xbe\x7d\x65\xf7\x1f\x07\xd6\xff\xe2\x0f\xf0\x3b\x91\x34\xf8\x24\x4d\x61\xfd\xe7\x36\xcd\x3a\xdf\x40\x29\x5e\x13\x2e\xb2\xf9\x21\xa0\x50\xcd\x07\xaa\xb7\x7a\xaf\xdf\xee\xf5\xdb\xbd\x7e\xfb\xaf\xae\xdf\xa6\x88\xc8\x1f\x53\xbd\x4d\xce\x74\x97\xda\xed\xe0\x52\xee\x88\xb6\x3f\x46\xb7\x1d\x1c\xdb\xd7\xa2\xda\x3e\x29\x57\xdc\xeb\x3e\x7b\xdd\x67\xaf\xfb\x7c\xd5\xba\xcf\x6d\x33\x11\x47\x7c\x36\xab\xc5\x8c\x1b\x15\xfb\x85\xec\xda\xcc\xa4\x36\xb5\xcf\x19\x3d\xb9\x38\xb7\x92\x89\x5c\x1d\xe6\x1f\x5a\xc5\xf1\xef\x0e\x88\x01\x9d\xdf\xac\xe2\xb5\x91\x59\x53\xf0\x9a\x81\xcb\x89\xe4\xd0\x31\xfb\xc0\x17\x02\x43\x31\x26\x82\xdd\x1c\x90\x2c\x3a\x06\x5f\xe1\xcd\xc1\x5e\xde\xdd\xcb\xbb\xbf\x63\x79\x77\x37\xf1\x5b\xed\xb0\xe5\x15\x32\xb4\x97\x82\x63\xd9\xc0\xde\xbf\x42\x59\xc2\x52\xce\xe0\xf0\x05\x6d\x13\xf0\x1b\x00\xcc\x8f\x2e\xeb\x1a\xca\xd8\xa1\x1d\x51\x9c\x42\x9b\x76\x8c\x5b\xb4\x63\x43\x29\xd7\x0f\x3e\x17\xb5\xbc\x03\x9e\x1c\x26\x41\x26\x14\xcc\x52\x7c\xca\xb1\xae\x97\x53\xb7\x0f\xd3\x7d\x18\xc9\x6d\x4b\xb4\x0f\xec\xa3\x27\xc9\x3e\xac\x9f\x53\x55\xa2\x35\x66\x33\x3e\xe0\x9b\x33\x6c\x31\x21\xc2\x6b\x4f\x80\x20\xb2\x1a\x71\x0d\x6e\xda\x0c\x02\xae\xfe\x9a\xf0\x3a\x78\xe6\xcf\x54\x3f\xcc\x8e\x6b\x73\x6d\xe5\x3b\xe9\x04\x86\xfe\x78\xdf\x59\x19\xcd\x38\x44\x8f\xcc\x8f\xd9\xf8\xf7\x9c\x47\x46\x95\x0e\xdc\x06\x03\x0a\x31\x8f\x6f\x27\x62\xc4\x02\x11\x65\x12\x36\xb4\x66\xc1\xcb\xa3\x5a\xf0\x9c\x4f\x0a\xc1\xa8\x9d\x93\x78\xec\xcd\xcd\x85\xe1\xb2\xd0\x74\x37\x0a\x98\x8d\x1f\xfa\x40\x76\x2c\xd7\x29\x3e\x89\x68\x82\x23\x3b\xcf\xa3\x7b\x55\xe7\xa3\x40\x41\x19\xbe\xe3\x05\x3a\xbf\x4c\x87\x7a\xa3\x4f\xae\x57\x6d\xdd\xc1\x68\x3c\xba\xa6\xff\x06\xd0\x77\x4b\xdc\xaf\x6b\x3b\xbc\xb7\xbc\xd0\x62\xc4\x08\xe1\x21\xf9\x39\xfc\xa1\x27\x94\x2d\x2b\x6f\x01\x05\x0c\xa0\xde\x87\xbe\x3a\x81\x6b\x5d\xf0\x7d\xbb\x65\x3b\xa0\x2f\xba\x5a\x78\x77\xf6\x41\xf8\x5f\x89\x6c\xf5\xa8\x20\xfc\x87\x71\xb4\x7d\x4c\xfe\x57\x29\xd3\x3d\x49\x4c\xfe\x03\x75\xbb\x47\x13\xab\x75\x06\xae\x76\xcb\xc7\x8b\xa9\x63\x04\xbe\x83\xcd\xb7\x07\x98\xf0\xb3\x44\x3e\x62\x66\x0e\xa9\xe5\x4b\xd5\x60\x60\xb7\xe5\x9d\x46\xb1\x5c\x6a\xf8\x67\x64\x89\xb0\xa4\x0a\xff\xd9\x66\x00\x49\x02\x09\xea\xe8\x45\x2d\x55\x2d\xcd\xf2\xbd\x2c\xe5\xa2\x59\x20\xee\xb6\xa5\x76\xee\x41\x9f\x82\x66\xfc\xbb\xa6\xcc\x8b\x94\x57\xee\x04\x9f\xe0\x05\xbc\x78\xf3\x9e\x39\x3b\xca\xe9\x09\x9b\xe0\x23\x8c\x9e\x76\xd0\x74\x0d\x59\xc3\x09\x84\x40\xb4\xc5\xe1\x43\x1d\x10\xb5\x23\x73\x0b\x3b\x9f\xb2\xa6\xf4\xf1\xd9\x23\xa6\x97\xda\x88\x05\x62\x5f\xb1\x5a\x29\xa3\x99\x2a\xdb\xf8\x65\xb0\x72\x90\x97\xd7\x3b\xff\x91\x17\x70\xb2\x34\x20\xc1\x6c\x02\x06\x12\x12\xd5\x21\xd7\x1e\x08\x03\x7d\x6b\xae\xb4\x49\xde\xb3\xe4\x92\xa7\x3f\x13\xb7\x2a\x9b\x85\xfb\x6a\x45\x3f\xe3\xf7\xf0\xfb\xc4\x61\xe6\xfc\x4e\x78\x43\xdd\x98\xfd\x00\x68\x9b\xe1\x05\x0c\x3f\xf7\x26\xf4\x99\x9b\x4b\xe5\xb3\xea\x27\x4b\xa2\x61\x1a\xf2\x11\x11\xb9\x2b\x74\xa0\x4a\xd1\x02\x25\x07\x89\xd1\x31\x47\xed\x99\x22\x76\xbc\x90\xb3\xb9\xf1\xe9\x98\x80\x99\x88\xf0\x9f\x2c\x39\xbb\x3b\x42\xfa\x6e\x20\xa2\x98\x86\x78\x3f\x57\x85\x1b\xe8\x4c\x80\xfd\x65\xde\x9e\x14\xa6\x75\x54\xb5\x5c\xf0\x7a\xc9\xb4\xaa\x41\x6a\xa0\x9c\x99\xb2\xff\xa9\x45\xb3\x18\xb9\xdc\x48\xec\x4b\x1b\x56\x36\x10\x04\x6e\x14\x4c\x58\x1b\xf6\xec\xd5\x31\x9b\x88\xa9\xa5\xc8\x2f\x8f\x9f\xe3\x37\x10\xbf\x2e\xf9\x15\x38\x67\x45\x35\xe7\x13\x61\x64\xc6\x0b\xc0\x42\xe7\xb5\xd4\x01\xd4\x20\x46\x63\x70\xf2\x01\x7b\x76\xf7\x72\x3c\xe1\xb5\xfb\xd4\xdd\xcb\xf1\x54\xa9\xe7\xec\xef\xe2\x30\x07\x29\x61\xb1\x10\x65\xce\xb4\x5a\x08\x03\x71\xeb\x85\xbc\x15\xaf\xd9\x37\xc4\x13\xd8\x33\xf1\x39\x13\x95\x01\xec\xcd\x12\xb6\xe0\xb9\xdd\xfd\x97\xff\x76\x7c\x7c\x0c\xc4\xe6\x82\xf3\x2b\xa1\xd9\xb3\x8f\x95\x28\xaf\xe6\x72\x6a\x46\xec\x4c\x48\xdb\x8a\xb2\x6d\xe0\x03\x78\xff\x00\xde\x1f\x86\xf7\xea\xf8\xf8\x58\x6f\xe6\x2a\x97\x25\x20\xb9\x8b\xab\x5b\x59\x5d\xbf\xbb\xfa\xc9\xd2\x9e\x65\x2a\x96\x2c\xd1\xcc\x51\x2f\xdd\x35\xea\xb6\x48\x18\xda\x3e\x13\x54\x33\xba\x6d\x64\x0d\xb7\x7f\x9b\x5a\x95\xb3\x02\xfa\xce\x54\x53\xf3\x99\xe5\xb3\xec\x3f\x55\xd3\x72\x13\xcd\x05\x0b\x84\x2a\xe0\x11\xf6\x23\xd1\x74\xb0\x13\x76\x04\x7d\x92\x44\x81\xcc\x45\x20\xc8\xca\xfb\xff\xed\x53\x54\x2f\x08\xdb\xc4\x8d\x95\x9d\x1b\xb4\x0c\xc6\xfe\x71\x55\x32\xf0\x07\xfc\xe9\x4f\xdf\x5a\xda\x66\x3b\x89\x3e\x51\xca\x62\x44\x11\xf7\x74\x85\x45\x80\xaa\x74\x3a\x8c\xa7\x46\x77\x01\x5d\x03\x1a\x89\x1c\x58\x50\x51\x2c\xf1\xac\xb6\xd6\x4d\x40\x90\x1e\x52\x63\x2d\x17\x95\x5d\x3b\x51\x58\x3e\xe9\x67\x53\xda\x6d\x2f\xa8\xaf\x1a\x2b\x1b\xd0\x89\x99\x36\x05\xfa\xf0\xd6\xa9\x8d\xdb\x48\x79\x34\xf1\x16\x5a\xf3\xdd\x90\xc0\xde\x81\x12\xb1\x8b\xe0\x91\x69\xbb\xf4\x78\xcc\x58\x04\xf1\x33\x62\x37\x07\x77\x2f\x6f\x0e\x06\x70\x12\x5b\x1c\x70\xe8\xb3\xae\x01\x30\xff\x5a\x15\x38\x08\x20\x2f\x76\x6b\x1c\x41\x8c\x47\x25\x21\x1d\xc5\x3e\xb2\x22\x22\x26\x8f\x30\xf6\x9e\x4c\xc5\x33\x48\x4b\xb2\x1b\xca\x4b\xf6\x8b\xa8\xd5\x1a\xfa\xd6\x19\x47\x9f\xb4\x0d\xd3\xb4\x2b\x69\x4f\xac\x34\x87\x3a\x1a\x13\xc7\x11\x21\x2e\x10\x91\x45\x4a\x50\xd7\x0b\x5e\x14\x23\x56\xd5\x6a\xc2\x27\x80\x54\x0b\x8d\x5e\x1e\x6b\x90\x64\x21\x1b\x4a\x4d\x99\xf8\x67\x13\xe0\xa6\x1d\x99\x96\x88\x48\x1b\xa0\x5e\x48\x34\xef\x0a\x01\x96\x6e\x36\x46\x84\x55\x74\x43\xe3\x6e\xa5\xe8\x72\x74\xfa\x91\x9a\xdd\x1c\xc0\x19\xb3\x24\xf2\xe6\x60\xc4\xa4\xa1\x33\x6d\x57\x0c\xfd\x35\xa5\x2a\xdb\xad\x3a\xbd\xe8\x11\x89\x26\x90\xc1\x45\xeb\x58\x88\xcf\x32\x53\xb3\x9a\x57\x73\x09\x77\x68\xcc\x6e\x0e\x7e\xec\xf7\x61\x69\x0f\xaf\x8d\x93\xe8\x6e\x0e\xee\xec\x28\x8c\x25\x5e\x58\xa8\x03\x73\xf1\x30\xb7\x9f\x16\xf6\x99\x9d\xc9\x82\xff\xac\x3c\x0f\x7d\x4e\xaf\xa8\x0a\x83\x84\x0a\x8a\x27\x72\xf9\x8a\xc0\x64\x6e\x0e\x98\xaa\xd9\xcd\xc1\x44\x18\xfb\x6f\x28\x1d\x82\xc6\x9b\x76\xc7\xb2\x8c\x3a\x86\x73\xa4\x31\xcf\x52\x23\xf4\xe8\x54\xd6\x1a\xb0\xa6\xbf\x3f\x61\x37\xcd\xf1\xf1\xb7\x82\xd9\x2e\xdd\xbf\xe1\x5b\xec\x19\x22\xf4\x7e\x7f\x82\xa4\xce\xad\x18\x4c\xb3\x54\x4c\x37\xd3\xa9\xfc\xec\xa3\x0e\xe0\x7d\x55\xe3\xbb\xcf\x3d\x8c\x0c\xf8\xf7\x89\x27\x96\xb3\xf6\x94\x69\xc6\xad\xd1\x62\x22\x11\x5e\x53\x37\x5a\x67\x06\x70\xeb\xfd\x9a\xdd\xbd\x3c\x1e\xb1\xbb\x57\x23\x76\xf7\xd2\xfe\x1f\xb8\x6e\xe1\xaf\x63\xfb\xaf\x6f\x47\xec\xee\x5b\xf0\xe6\xda\x9f\x5e\x61\xc8\x1b\xb4\x83\x7f\xbe\x1a\xb1\xa9\x52\x2f\xf1\x7f\x8f\x37\x8a\x0c\x5b\xa1\xd2\x6c\xa3\x60\xf4\xc8\xdb\xe3\x15\x95\xb5\xfe\xe9\x6e\xdb\x87\x98\xa5\xd7\x05\xe9\x91\xd1\x29\x61\x15\x3b\x25\x60\x63\xc7\x16\x83\xc1\xb4\x92\x34\xac\x87\x66\x17\x3e\xcc\x7a\x10\x0c\xbf\xbf\x8e\x0e\x3e\x1f\x05\xcc\xdb\xa3\x0a\x50\x37\x16\xa2\x9e\x89\xa3\x5b\xb1\x3c\x78\xed\x4c\xb2\x89\x56\xd0\xb7\x98\xd9\x46\xf0\xc2\xce\x4e\x48\x6a\xa0\x0f\x3c\x24\xbd\xc3\xb6\xe2\x90\x74\xdb\x52\x00\x43\x47\xbe\x71\x1b\x66\x65\x84\x6c\x49\xa2\xe8\xda\xe3\xe1\x30\xb9\xfa\x49\xdb\x29\xb8\x32\x27\x76\xad\xca\x01\x5f\x91\x02\x1e\x77\x89\x3f\xac\xef\xd7\x4a\x5f\x09\xc1\x75\xca\x22\x25\x13\xf1\x12\x6b\xe3\x44\x7e\x77\x9e\x41\x32\xb3\x12\x06\xb0\x34\x31\x99\x2b\x75\x3b\x66\x67\x04\xfc\x62\x14\x48\x75\x56\x4c\x9b\xf0\xec\xf6\x9e\xd7\x39\xd2\x42\x23\x11\x15\x68\xcc\xfe\x61\x7b\xfd\x47\x9c\xc9\x4d\x75\x18\xe0\x6b\x8e\xa8\xbf\x3c\xfa\xcb\x9f\xff\xfc\xed\x9f\x29\xc2\x56\xcb\x3b\xf1\xfc\x81\x74\xab\x1d\x1c\xb3\xc5\x79\xc2\xe8\x98\xbd\x03\xfd\x5f\xd0\xc8\xbb\x37\xb6\x7e\x6d\xc6\xd6\xdf\xa3\x03\xbd\x4b\x40\xbe\x7a\x2f\x7a\x6f\xc0\xbf\xb1\x2b\x3d\xb9\x80\x3b\xe9\xe8\x31\x4e\xf5\x6e\x67\x7b\xcf\xfa\xde\xb3\xbe\xf7\xac\x3f\xb9\x67\xbd\x7b\xed\xf6\xee\xf5\x3f\xa2\xe4\xf5\xa5\xdc\xeb\x3d\xe1\x7e\xef\x63\xff\x1a\xc5\xbe\xdf\xda\xc7\xde\x3b\x26\xbb\xa1\x5d\x7b\x6f\xfb\xde\xdb\xbe\xf7\xb6\xef\xbd\xed\x7b\x6f\xfb\xde\xdb\xbe\xf7\xb6\x7f\x31\x6f\x3b\xb2\xe1\xbd\xcb\x7d\xef\x72\xdf\xbb\xdc\xf7\x2e\xf7\x3f\xa6\xcb\x7d\x80\xc6\xed\x48\x6f\xd9\x3b\xdf\x1f\x60\x5b\xf8\xba\x3d\xf0\xc3\xa3\x7d\xcc\x99\xd9\xfb\xe2\xf7\xbe\xf8\x8d\x7c\xf1\x24\xd9\x14\xa2\x3e\x5a\xf0\x92\xcf\x44\xfd\x02\xeb\x75\x05\xe8\xae\x13\x63\x78\x36\x3f\x13\xf6\x7f\x4f\x7d\xf3\xd3\xb8\xaa\xd7\x4a\x92\xb4\xfe\xf5\xa8\xae\x5d\x21\x16\xa0\xa4\x92\x73\xc6\xae\x6c\xba\x83\x75\x16\x90\x33\xd4\x41\xe2\x97\x2f\xad\x9e\x97\xc9\x42\xd4\x57\xcb\x32\x3b\x18\x1d\xb4\x7f\x78\xa7\x54\x75\x21\x6a\xa9\xf2\xbe\x5d\x64\x7d\x6f\x09\x34\x33\xf7\x9c\xd5\x4d\x69\xef\x53\x05\x9d\xcb\x8c\x15\x4a\x55\xf6\x7c\xd4\xae\x09\x1c\xab\x5c\x68\x3b\xf8\x40\x35\x41\x4f\x76\x85\xb0\x79\x66\x1a\x80\xd0\x8f\x1f\xaa\xba\x40\x4c\x84\x5a\xce\x66\x28\x94\x72\x18\x22\x38\x60\xb2\x39\x83\x82\x50\x68\x33\x44\x55\x6a\x5a\xf0\x19\x13\x25\xaa\x67\xaa\x0e\xaa\x9a\x1f\x8b\xd5\x63\x34\x9b\xf2\x42\x0b\xdb\x35\xd5\x14\x72\xcc\xbe\xd1\xf4\xf6\x80\x5e\x35\xb8\xa4\x2b\xd6\xa7\xdd\xd2\xdd\x62\xbe\x50\x4d\x09\x32\x81\x09\x35\xe3\xfd\x92\xea\x65\x99\xe1\x62\x68\x5c\xce\x7b\x2e\x8d\x87\x1e\xd1\x4d\x96\x09\x6d\xaf\x0a\x40\x8f\x34\xb4\x02\xe7\x1a\xea\x1a\x18\xc5\xfe\x6c\x95\xfe\x68\x7a\x8f\x73\x98\x9d\xb9\x6b\xf0\x70\x33\xa9\xef\xa2\x4b\xf5\x37\xb8\xa0\xa7\x57\x97\x57\x72\x56\xca\x72\xf6\x80\xeb\xb9\xf6\xe5\xd5\x97\x33\xf5\xfa\xba\xab\x79\x5a\x34\xda\x88\xda\xbd\x27\x6a\xf3\x56\x16\x96\x3a\xb7\x1f\xfc\x28\x96\xc9\xdf\xc3\x52\x75\x6f\xe9\x40\xc7\xbd\x39\x67\xc9\x76\xee\xe0\x4d\x65\x21\x80\x2b\xd1\xc4\xe1\x56\xb1\x18\xa7\xe5\xff\xff\xe7\xe3\xbf\xb2\xd3\x93\x96\x69\xc3\xe9\x38\x52\xeb\x46\x30\xfa\xc2\x91\xce\x54\x25\xf2\x16\x8c\x4c\x8a\x0b\x0d\x4c\x70\xcd\xc0\x5d\x3b\x5f\xfb\x5e\x94\x33\x33\xb7\x37\x26\x77\x4f\xb4\x9c\x95\x9d\xef\x7b\xad\x6c\x26\xef\x44\xb9\xab\x83\x3f\xb4\x79\x3b\x5f\xfb\xcb\xab\x13\x4b\xb7\xde\x9c\x9e\x5d\x9d\xb4\x00\x73\x1e\xb1\x01\xbf\xcd\xad\x2d\x54\x93\x5f\x20\xc8\xce\x16\xd7\x75\xf0\xad\x70\x4f\x27\x5c\xa3\x32\x1b\x6e\x2c\x4a\xfa\x99\x7d\xd9\x01\xfb\xac\xbd\xa6\x56\xae\x82\xcb\xa7\x9a\x1c\xbf\x04\x3b\x9a\xb8\x75\xed\x06\x89\x2d\x6f\x35\xf0\xe6\x6e\x6e\x59\x9b\x22\x4f\x5b\x3c\xb2\x4e\xc9\x50\x7b\x28\x92\x1e\xf5\x0f\x6b\xa5\x4b\xdf\xa3\x15\xc3\xf0\x23\x24\xbd\xe9\x8d\xfc\xea\x0f\x93\x98\xce\xb8\x58\xa8\xf2\x4a\x98\x07\xd0\xe3\x75\xef\xae\x26\xc7\x89\xb7\xd7\x52\x63\x55\x66\xa8\xb7\xf9\x97\x2d\x43\x4e\x78\xdb\x07\x5b\xf6\x77\x7c\xa0\xa5\x97\xd0\x1b\x57\x09\x25\x87\xe7\x50\x6d\x08\x23\x01\x50\xaa\x8e\x4a\x0a\xd9\x23\x02\xdc\x3e\x74\x5a\x2c\xc7\xec\x1d\xaf\x67\xc1\x24\xf2\xef\x6c\xa1\xb0\x82\x74\xa5\x4a\xe0\xfb\xbe\x63\x2c\x49\x04\x8f\x4f\x2f\x3e\xb1\x67\x56\x8e\x29\x85\xb9\x57\xf5\xed\x73\x56\xa8\x96\x81\xf8\xe9\x85\xe9\x33\x51\x15\x6a\x69\xf7\xed\x21\x67\x63\xdd\xcb\x6b\x0e\x47\xe2\xf5\x2d\x4e\x87\x7f\x1b\x37\x7d\x94\x1c\x8e\x7d\x36\x24\x44\x0f\xf7\xb5\xea\x00\xb5\x9b\x26\x4e\x90\x6f\xb0\xf3\x23\xe4\x7b\xd6\xbb\x39\x44\x6b\x97\xac\xb7\x0e\xf9\xca\xf6\x9e\xca\xe1\x5f\x96\xc6\xd9\x69\xba\x88\x88\x68\xfc\xbf\x6b\xf9\xf6\x4c\x54\xb5\x80\xd2\x44\x0f\xbb\x33\xab\x5f\x4e\xdc\x99\x09\xac\x1d\xbd\xb6\x56\xd1\x14\x85\x30\xb2\x9c\x5d\xa8\x5c\xff\x9f\x8b\x2b\xb8\x17\xe1\x97\xef\x9a\x5a\x1b\x50\x35\x67\xd2\x0a\x24\x97\xc2\xd4\xcb\x53\xab\xd9\x24\x94\xcc\xde\x7b\xfd\xd9\xbc\xb9\xb8\x7c\x73\x7a\x72\xfd\xe6\xec\x35\x78\x73\x5a\xcd\xfb\x77\xa3\x54\xb9\x00\x7f\x39\x5a\xbe\x2b\x95\x63\x45\xb2\x89\x6d\x8e\xfe\x20\xc4\x6e\xf4\xf6\x7d\xfb\x06\xc0\x6c\x37\xb5\x18\x83\x3f\x05\x0e\xbd\x8b\xe7\x2b\x94\xba\x65\xb2\x34\x8a\x5d\x72\x23\xde\xc9\x85\x34\x1b\x63\x5d\x77\x17\x6a\xe3\xc9\xfd\x9f\x2a\x71\xed\x71\x6a\x95\x55\x05\xc1\x7d\x9b\x98\xe5\xba\xe9\x85\x61\x63\xb7\xf1\xa8\xa7\x85\xe2\x06\x15\xda\xde\xc6\xf5\x06\x5e\xf7\xda\xf4\xc7\x5b\x0b\x03\xa5\xcb\xb1\x56\xb3\x84\xb2\x4d\x25\xe2\x87\x47\xd6\x4b\x06\x5d\x60\xd8\xd8\x1d\x2f\xd0\xdd\xa2\xa1\xe1\x91\xbd\xda\x47\x78\xd5\xbf\x28\xcb\x7a\x43\x21\x51\x0f\xb8\x7c\x6b\x5e\x5d\xcd\xae\xfa\x2f\x6f\xce\xac\xdc\xbb\x8e\x55\xb9\xbf\x3f\x41\xac\x96\xfe\x8e\x9b\x6c\xbe\x9e\x4d\xb5\x7b\x59\xc1\xa4\x5a\x0d\xfb\x7b\xef\x83\xca\x1c\x75\x0e\x66\x19\xe4\x55\x4e\x25\xcb\x55\x29\xd6\x30\xa9\x29\xb7\x27\x2d\x74\x09\xd1\x67\x50\x47\x7f\x37\x1c\x6a\xc5\x4a\x0d\x6e\x6f\xbf\x6d\x27\xb8\x3a\x68\xa6\xed\x71\x0b\xab\xac\x50\xa1\x3c\x3a\xd9\xec\x02\xf1\x61\xc9\xc1\x5a\xa9\x9c\x65\x73\x5e\xce\x22\xc5\x35\x17\x05\x5f\x3a\x30\x50\xa9\x83\xb6\x6b\x14\xfb\x59\xa1\xe3\x72\x81\x96\xb3\x4a\x19\x2a\x91\xd6\x54\x99\x5a\xd8\x4e\xdd\x87\xb1\x40\x40\xde\x64\xe4\x8f\xbc\x13\x35\x2f\x8a\xc4\xae\x69\xf7\xca\xef\x9a\x89\xfa\x23\x5a\xa0\x93\xe1\xa1\x57\x79\xd5\xfb\x9b\xdd\xe7\x4e\x0f\x9b\x5f\x6a\x72\x41\x74\xef\xf6\x7b\xfe\xd9\xfd\xa4\x2f\x44\x0d\xdd\x3f\xf8\xca\x27\xbf\xb1\xe2\xe6\xa7\xda\xf7\x09\x80\xf3\x18\x3c\x25\x21\xd0\x76\xde\x7b\x72\xf0\xfb\x23\x07\x03\x27\xb8\xb7\xbc\x8b\x44\x2b\x77\xd4\x16\xfc\xb3\x5c\x34\x8b\xe4\x70\x5b\x07\x8b\xe7\x14\x15\xc6\xcb\xf6\x85\xa4\x80\xe5\xf0\x1a\x88\x56\xf0\x0d\x78\xb7\x16\xba\x29\x8c\x95\xa5\xa6\xe2\x5e\xd4\xb0\x5e\x05\x1e\xc9\xf6\x11\x24\x5d\x89\x9e\x85\xda\xc6\x8f\xf4\xc1\x3f\x1d\x65\xfc\x9e\xd7\x13\x3e\x13\xa7\xb6\x55\x66\x54\xfd\x00\xe2\xb8\x61\x17\xab\xe9\xe3\x70\x27\xeb\x48\xe4\x1b\xf0\xc8\x74\xdf\x3f\x18\x45\x74\xed\xfb\x53\x47\x2e\xbf\x3f\x3d\x9f\x95\xaa\x16\x79\x54\xb3\x74\x98\x1e\xba\xf7\x56\x90\x40\x6a\xd2\xa7\x7a\x33\x1c\x10\xcb\xdc\x88\x98\x25\x3f\xa2\xde\x54\x41\xdf\x94\x42\x25\x27\xdf\x1b\xb0\x73\x7a\x41\x80\xac\x28\x45\x2d\xb3\xfe\x08\xc7\xec\xfd\xa7\xab\x6b\x88\x87\x5a\x96\x99\xc8\x83\xff\x2d\x53\x35\x9a\x06\x00\xff\x1d\xdc\x68\xe4\x85\x43\xe7\xbc\x2f\x3d\xcc\xfe\x7e\x72\xf9\xe1\xfc\xc3\xf7\xaf\x57\x7f\x09\x02\x6e\x4a\x0a\xc3\x99\x0a\x6e\xda\x1a\x49\xe4\x52\x4b\x6c\x58\x6f\x72\xb3\xac\xdb\xc6\x3b\x05\x28\xb0\xa6\x5d\xa6\x16\x77\xa0\x33\x28\x70\x18\xa0\x2f\x5a\x42\x6f\x8f\x0a\xd6\xe8\xdf\xbc\x31\xde\xbc\x50\x91\xae\x35\xa6\xd5\x65\x78\x37\xbe\xcc\xad\x2e\x1f\x42\x0d\x70\xc3\xc2\xe5\x7b\x8f\x0d\x37\xa7\x05\x9b\x74\xe0\x0a\x36\xb4\xed\xdc\x90\xa6\xee\x4e\x4c\x62\xfd\xd6\x90\x81\x0b\x55\xdb\x9f\x4e\xf2\xbc\x16\x1a\x24\x23\x59\x5e\x0a\x1d\xcc\x4b\xa3\x03\x2c\xf7\x70\xaa\xca\x12\xf7\x1b\x69\x84\x33\x2c\x19\x5e\x9b\x73\x52\x3d\x0f\x46\x07\xef\xa0\xe4\xd4\x9b\x22\xd1\x14\xcd\x7f\x93\x66\x36\x93\xe5\xac\x4f\x3f\xdc\x10\x7a\x8b\xc3\xf1\x81\x3b\x9c\xe7\x17\xcc\xfd\x62\x29\x80\xbd\x40\x56\x8f\x7f\x46\x5e\xda\xe3\x31\xfc\xff\xb8\x30\x45\x81\x6a\xf1\x94\x67\x42\xa7\x4b\x2d\xf4\x66\x97\x70\x9f\xb4\x5b\xf8\x30\x0f\xed\xaf\x32\xee\x09\x56\x9a\x80\xbc\x0e\x4c\x02\xca\xa2\x77\x84\xb1\x22\x56\xa8\xb1\x51\xd5\xea\xf3\xd2\xc5\xa2\x62\x99\x8d\x15\xd1\xcd\x51\xe6\xc2\xda\x92\x31\x6a\x51\xa9\x52\x94\x06\x2a\x5e\xf5\xee\x4f\x77\x36\xed\x33\xfa\xeb\xf0\xde\xf6\x33\x3a\xd5\x3d\x2b\x54\x39\xb3\xa3\x6f\x7b\xd2\xed\x7b\x90\xa4\xe1\xbb\x62\x74\x1c\xf5\xee\x5c\x87\xd1\xb9\x4a\x14\x5f\xf3\x0f\xbb\x34\x2d\x8b\x1e\x19\x45\x81\x09\x51\x54\x03\x3b\xfc\xe6\x90\x02\xab\x6f\x0e\xec\x01\xa2\xd0\x85\xc8\xf1\x1f\xf7\x71\x73\xc0\x0e\xa7\x4a\x85\x57\xa8\x43\xf8\xd1\x3e\x3c\x6a\x3d\xf5\x1f\xa1\xc7\x18\x70\x69\x09\x64\x1f\x70\x02\x7c\x9a\xf7\xb2\xd4\x5b\x55\x46\x0f\x37\x2c\x61\xd6\xa4\x47\x9b\x91\x15\xdf\x9c\xd5\x02\x0b\x99\x12\xcb\x59\x2b\xc5\xae\x39\x82\xe9\x71\xd8\x4d\xed\x50\x8f\xde\x0c\x8a\xd6\xf3\x56\x8e\x66\x7b\xfc\x6a\xca\xb0\xad\x95\x9a\xb0\x31\xde\xc9\x47\x0e\xbd\x3d\xc0\xde\xf8\xbb\xc4\xb3\x2f\x8f\xb7\x1b\xb8\xc3\x59\xc3\x6f\xce\x26\x2f\x4b\x56\x8b\x29\xb2\x7c\xfd\x37\x2f\x86\xd7\xbc\xcc\xd5\xc2\xdf\xb2\x6e\x57\x96\xee\xbc\xfa\xa6\xf3\xeb\xee\xf4\x8d\x8b\x64\xd0\x5b\x45\xd1\xe7\x3e\xdc\xcd\x27\xeb\xf4\x59\xd1\xa1\x86\x6c\x36\xaf\xd8\x42\x84\x53\x2b\x2d\xed\x29\x85\xfc\x50\x6b\xa9\xb5\xc3\x09\x17\xfb\x2a\xfa\xb8\x69\x2f\x03\x47\x7c\xd3\xd7\x57\x1d\xb3\x87\xc8\x27\x2d\x01\x67\x95\x1c\x12\x37\x8c\x14\x70\x5e\x52\xda\x95\x53\xcd\xd6\x89\x15\xd0\x11\xb8\x30\x9c\x54\xd5\x65\xf7\xdf\xa7\x53\xea\x66\x71\x4a\x1d\xfe\x61\xcf\x95\x0c\xb9\x53\xad\x31\x26\x59\x7a\x3c\xd3\xae\xd1\x9d\xa6\x16\xee\x1d\xfe\xbd\xe5\x37\x76\x65\x26\xff\xe1\xe2\xe4\x01\x9a\xe3\xf0\x5b\xab\x95\xc5\xd6\x7b\xeb\x76\xf0\x07\x55\xcb\x5f\x6c\x6f\xc5\x85\xca\x4f\x1a\xa3\x74\xc6\xdb\x8e\xc7\xd1\x50\x9b\x4f\x15\xfc\xf7\xad\xaa\x27\x32\xcf\x45\xf9\x77\x59\xe6\xea\x7e\xb8\xfd\x99\xba\x2f\xe1\x5f\x57\x86\x4f\x64\x21\x7f\x81\xb9\x6c\xfc\xd6\xc6\xdf\xb9\x56\x85\xa8\x79\x09\x96\xbe\xa1\xa1\x6b\x71\xf9\xe6\xea\x1a\x89\x80\x1e\x6e\x77\x7a\xf1\xe9\x1c\x1d\x32\x34\xda\x75\x6b\x42\xad\x2f\x05\xcf\x2d\xcb\xd2\x67\xa2\xe0\x89\x5c\xda\x2d\x3f\x97\x90\xc9\xb6\x79\xbf\xe3\x0b\xe6\x53\x23\x6a\x30\x97\x51\xe2\x8a\x15\x47\x4f\x2f\x3e\x31\x0d\x69\x17\x9a\x92\x38\xad\xa2\x7b\x2b\xab\x6a\x7d\x9e\xd7\xe6\xdc\x65\xdb\x3d\xde\x74\xe2\x43\x1d\x60\xea\x4a\x6b\xde\xe8\x08\x2c\xc5\x67\xc3\x72\xf7\x96\xb3\x35\x7c\xb9\x89\xa6\xae\xc0\x36\x93\x1d\xe8\xa3\x35\x5f\x2b\xdc\x51\x5a\x93\x7f\x17\xa5\x0c\x70\xd5\xba\xc8\x73\xb4\x6f\x96\xca\x30\x5c\x0b\xbb\x2a\x6c\x22\x0a\x75\xcf\x78\xb9\x0c\x19\xa3\x14\x4f\x68\xd8\x82\xe7\x82\xe5\x4d\x8d\xb1\x04\xdc\xb0\x6a\xc7\x32\xc8\x56\x77\x6b\xd3\x55\x4b\xbe\x0d\x89\xd0\xe9\x5b\x41\x13\xc4\x05\xac\xdd\x5b\xde\xc2\xcc\x6b\xc1\x0c\xa4\xec\xe5\x8c\xeb\xa8\xc1\x44\xd8\xd7\xac\x96\xea\x54\x40\x14\xfe\x8d\x5c\x08\x4c\xe9\x83\x12\x89\x62\x3a\x15\x99\xf1\x79\x82\x92\xcc\x2e\x3f\x5c\x9c\xe0\x16\xe5\x52\xd7\x62\xc6\xeb\xbc\x75\x33\x01\x8b\xa2\x29\xed\xd7\x96\xe8\xcc\xc6\x44\x03\x9e\x23\xaa\x4d\x77\x9c\xbf\xc5\x36\xad\x8a\x59\x59\xfb\xca\x9a\xb0\x95\x60\x40\x84\xc9\x4b\xab\xd5\xb8\x1e\x61\xef\xc2\x49\x7f\xf2\x79\x06\x36\xb3\xe9\x34\xfd\x1b\x1e\xd4\xc7\xff\x80\x77\x55\x94\x41\x54\x69\x00\x37\x49\x37\xb3\x19\xe0\x8a\x34\xc0\x6c\x65\x39\x7b\xe1\xa8\x16\x62\x18\x0c\x46\x29\xe4\xaa\x99\x14\x62\xc5\xf8\x07\xd8\xf7\xa6\x93\x49\xbf\xbe\x9a\xe0\xe2\x24\xbe\x1c\xb9\xed\xb0\xf9\x8d\xa7\xd6\x7a\x8d\x65\xbc\xd1\xa4\x7d\xda\xeb\x19\x59\x3b\xc8\x9e\x03\xf0\x32\x0e\x42\xc1\xcc\x6b\x80\xed\x08\xe6\x5f\x9f\x9b\x85\x3b\x4c\x86\x86\x91\x4b\x42\xb7\xa7\xb9\xd1\xee\x84\x63\x0e\x15\x5b\x08\x53\xcb\x4c\x3b\x0b\x53\xdc\x69\x48\xc8\x43\xe3\x52\xca\x32\xfc\x9b\x38\x4b\xfe\x43\x4d\x1e\x20\xe5\x0e\xbf\xb5\x5a\xca\x6d\xbd\xb7\xb9\xa3\xf8\x3f\xd4\x64\x6d\x08\xab\x6f\xb3\xc2\xb3\xe1\xda\xf4\x5d\x1b\x3f\xab\xc9\xae\xa3\x0d\x7f\x56\x93\x1d\x85\x19\xee\x4a\xa3\xf9\xb1\x99\x08\x08\xee\xbe\x9a\xf3\x5a\xe4\x1b\xef\xf6\xaa\xf7\x12\xfb\xad\xa1\x15\x9b\x2c\xd9\x44\x99\x39\xeb\x8c\xce\x59\x1b\xc9\x16\xab\x9a\x3c\xf1\x10\xd7\xcd\x8a\x37\x64\x3d\x27\x5b\xcf\xda\x44\x94\x28\x98\xfe\x60\x74\xf0\xe6\x33\xa2\x75\xc1\xef\x3f\xa9\xa2\x59\x88\x0b\xa8\x4f\x7c\x30\x3a\xf8\xa4\x05\xf9\xfa\x4f\xb2\x4c\x35\xa5\x09\x35\x98\xad\x6e\x71\x62\xf7\xfe\x53\x69\xf8\x6c\x26\x72\x78\xdf\x6a\xcc\xaa\x31\xc2\xe5\x39\xc9\xb6\x6e\xf1\x41\xe5\xe2\xbd\x2a\xa5\x51\x75\x64\x9d\x87\xa4\x05\x1f\x78\x0f\x7f\x9d\x9e\x9f\x5d\xd2\x07\x32\x6e\x84\x7d\xcf\xfe\x64\x3f\x6a\xff\x4b\xbf\xab\xfa\x1a\x53\x57\xdd\x6a\xe3\x0e\xc0\x08\x34\x7d\x6e\x55\x6c\x6e\xbf\xfb\x7e\x22\x5f\xb7\x89\xcf\x23\xc3\xbf\x2c\x7b\xbb\x00\x71\x05\x10\x24\x38\x35\x07\x6b\x16\x94\x48\x4e\x0d\x0d\xae\x16\x20\xe8\xe1\x5b\x10\x09\x5e\x26\x72\x02\xd2\xbe\xb1\xc4\xb2\xf7\x0d\x05\x0d\x25\xb4\x37\xd4\x8e\x7a\xb6\xa4\xd9\xf2\x65\x9d\xec\xb9\xbf\xb6\x7d\xcb\x74\xb7\x09\xcb\x85\x11\xf5\x02\xec\x98\xf7\x96\x2a\xdc\xca\x32\x77\x61\x0b\xb6\xb5\x5b\x14\x55\xb7\xb0\x11\x06\x9c\x19\xf1\xe1\xdc\x26\x11\x64\xc8\x08\xdc\x7a\x65\x6b\x43\xf0\xa6\x4e\xbd\x15\x79\x2d\xbf\xb6\x0f\xf5\x50\x6e\x10\xac\x94\xc4\x63\xc5\x2e\x41\xc4\xf5\x67\x4b\x96\x2e\xb5\x67\x60\xd1\xc2\x0d\x1a\xea\x3e\xce\x0f\x71\x67\x00\x90\x92\xe4\xe7\x00\x25\xb9\xea\x1b\xa9\x1b\x96\xe2\x22\xfd\xc3\xde\xbe\x30\xe1\x86\x20\xac\x44\xef\x7e\xe1\x95\xf0\x3d\xe5\xdb\xdc\x8c\x61\x5a\xd6\xf7\x8c\x0f\x35\xed\x78\xc7\xa8\x56\x7b\xcb\xc1\xd5\x3a\x52\x80\xd3\xe1\x7a\xbb\x39\x18\xb3\x73\x30\x28\x7b\x26\xd8\xaa\xe1\x0d\x96\xf1\x4a\x75\x26\x03\x93\x46\x40\x1a\x0c\x8f\xb5\x64\xff\x0e\xc6\xe4\x84\x32\x07\x4d\xf2\xe3\xe9\xfb\x74\x56\x50\x8f\xb2\xf6\x66\x5c\x76\x9b\xac\x50\x49\x80\x72\x12\x22\x68\x09\x7f\xb5\x45\x92\xdd\x08\xb7\x1d\xfa\x9c\x1c\xf1\x46\x1a\x14\xc6\x45\x83\x0e\x09\x2b\xeb\x4f\x09\x7b\xa7\x4a\xcb\x47\xf1\x1d\x9d\x8e\xea\xc9\x78\x51\xc0\x16\xb4\x77\x85\xe4\x12\xbe\xc4\x60\x2b\xc6\x73\xc2\xa3\x55\x53\x56\x8a\x7b\xfa\x28\xbc\xe6\xef\xcd\x6e\xd6\x65\x98\x85\xf6\xe9\xfc\x50\xd3\xc4\x6a\xb9\x4c\x62\xf0\x88\xe1\xdd\xcc\x48\xd1\xb7\x8f\x3f\xc0\x7c\x00\x33\xad\x75\xd3\x76\x37\xaf\x95\xe2\x44\x6f\x6a\xcd\x8a\xd6\x51\x09\xff\xfb\xb9\x00\x9c\x98\xd8\x2f\x1a\xc0\x05\x3c\x1f\xb4\x2f\xdc\xc9\x1c\xd2\xc9\x1d\xcc\x31\x76\x1b\xd7\xfa\x7f\x1a\x95\x63\x97\x69\x92\x0f\x50\x5f\x40\x34\x7d\x70\x68\xc7\xfa\xb7\x57\xab\x33\x03\xa2\xed\x5a\x07\x0c\xca\xb4\x07\xa3\xae\x64\x6d\xc5\xc2\x24\x38\x82\x95\x03\x13\x89\xd9\x07\xa3\x54\x7a\xe1\x40\x26\xd7\xc1\x08\x80\x90\xc5\xb4\x29\x12\xcd\x7b\x39\x35\x51\xc4\x6d\xf2\xc7\x4e\xd4\xef\xc1\x68\x45\xd0\xdc\xc1\xa8\xed\x17\x39\x18\xb5\x35\xc8\x83\x51\x00\xfd\x68\xff\xaa\x72\x71\x7e\x71\xf2\xbe\xf7\xe3\x3b\x39\x15\xd9\x32\x2b\xda\xcd\x2f\x44\xad\xa5\x36\xa2\x34\xc8\xf5\xbe\x93\x25\x1e\xb2\xa8\x89\xca\xbf\x3f\x6d\xfd\x72\x29\xaa\x42\x66\xbc\xbb\x26\xf4\x33\xf9\xf8\xe2\xdf\xd1\xd6\xf3\x7f\x1a\x65\x78\x7b\x75\xdb\x33\x0c\xf8\x2f\xe1\xb7\xeb\xeb\x77\x27\x53\x23\xea\xb7\xb2\x94\x7a\xde\x5a\xee\xbe\x04\x9f\x3e\x09\x0f\xc2\xe3\x18\x92\x20\xd3\xef\x3e\x99\x28\xb9\x09\xf2\xc8\xaf\x03\x47\xfd\x01\x40\x07\x83\x72\x73\xe2\xcd\xa7\x13\x9f\xd7\x82\x39\xfc\x9a\xbe\xc5\xdb\x67\x12\x0f\x06\x8b\xf4\x5f\x7c\xb2\xe9\xae\x4d\x95\x1e\x48\x9a\x7c\x48\x72\xec\x70\x70\x4c\xff\xcd\xa7\x9b\xf0\xda\x04\xe0\x5f\x07\x08\xec\x03\x52\x1b\x87\x66\xac\xd5\x22\x4e\x71\x7c\x8a\x49\xae\xc9\xd8\xfc\x35\xc9\x2e\xb6\x4e\x20\x1b\x9a\x60\xff\xbd\x27\xdb\xd0\x75\xe9\x71\xbf\x0e\xf3\xc0\x87\x25\xd9\xac\x9b\x73\xe7\xe5\x27\x9f\xf8\xca\x8c\xa2\x5f\x57\xf2\xf9\x07\x07\xd2\x0f\xad\xc1\xf0\xfb\x4f\xb6\x0c\x9b\xa6\x0f\xd8\x95\x20\x41\x6e\x28\x66\xf8\x41\x51\xc1\xbb\x9a\xc6\x46\x71\xcf\xbf\x76\x25\xb3\x6d\x02\x5a\x86\x66\xd7\x7a\xe5\xc9\xf6\x69\x45\x7c\xce\xaf\x5d\xf9\x72\x1b\x07\xc6\xd0\xac\x5a\xaf\x3c\xd9\xac\x56\xf8\x63\x7e\xed\xeb\x0b\xdb\x99\xea\x07\xb9\x07\x1a\xec\xbb\x53\x42\xf3\xbd\x24\xa3\x50\x22\x60\x18\x6c\x39\x2b\x74\xa0\x5d\xac\xc7\x4a\x9f\xc5\xaf\x69\xbd\x61\x18\x51\x70\xdb\x3d\x4f\xbc\xf8\x64\x3b\xbf\x6e\x90\xce\xaa\xd4\xd1\x87\xfa\x93\xed\xb5\xd9\x70\xae\xbd\xf7\x9e\x6e\xaa\xab\x87\xe8\x66\x9a\x52\xf2\x92\xd3\x4d\x34\xdc\x7c\xce\x89\x97\x9f\x74\xe2\xeb\x06\x0b\x01\xbd\xeb\x14\xd9\xde\x32\xac\x7b\x63\xb3\xf5\x58\xd7\xcb\x93\x2d\xcc\x56\xc3\xc7\x90\xe7\xb6\x1e\xdf\x5f\x90\x76\x83\x0d\xe7\xdf\x7e\xe9\xe9\xa6\xbb\x62\x70\x18\x25\x9b\xb0\x49\x24\x10\x17\xfb\xad\x36\x9b\x67\x78\xf3\xc9\xa6\xb8\x76\x70\xd1\x3c\x3b\x46\x96\xa1\x89\xb6\x9b\x6d\x35\xd3\xf6\xab\x4f\x3d\xe9\x15\x03\x8d\x63\xa0\xbb\x26\xa4\xc4\xbc\x93\x0d\x37\x9d\x79\xf2\xe5\x27\x9c\xfb\xfa\xc1\xda\xd9\x5f\xad\x14\x37\xaf\xb6\x96\x36\x3b\x86\xf4\xa7\x9f\xe8\xe0\x10\x61\x76\x3d\xab\xdf\x10\x3e\xf3\x03\xe7\xf9\x25\x26\xb8\x72\x80\x30\xcb\xa4\x21\x39\x59\x78\xaf\xd7\x6c\xc3\xd9\xa6\x5e\x7d\xba\x19\xaf\x1d\xa8\x9d\xf5\x0a\xeb\x6d\xbf\x0c\xe0\x60\xdb\xcd\xe6\x3f\xfc\xfe\x93\x2d\xc2\x86\x43\xb6\x2b\xb1\xaf\xd3\xb7\xaf\x90\xfc\x95\x96\xca\xdb\x41\xce\xf9\x26\x6e\x8a\x27\x00\x75\xde\x3d\x2c\xe9\x13\xa0\x59\x3e\x01\xd8\xdf\xce\x01\xcc\x9e\x06\x4b\xe9\xc9\x70\x48\x9e\x08\xd2\x60\x97\x09\x6f\xbb\x0c\x2b\xde\x6d\xd8\xea\xd6\xbd\xad\x35\xb3\x6c\xdf\xe3\x1a\x6b\xc6\x83\x3a\x5c\x6b\x25\xd8\xba\xd7\xed\x54\xec\xed\xbb\x5f\xa5\xd2\x6e\xdd\xdb\x7a\xed\xf1\xa1\x5d\xae\xd2\xcd\x1e\xd0\xe7\x06\x3a\xcf\xd6\xbd\x0e\x2b\x18\xdb\x77\xb5\x5a\x94\xdf\xbe\xbf\xf5\x82\xf2\xd6\x7d\x6e\x2a\x77\x3e\x20\x3c\x68\xed\x65\x5f\x11\x1c\xb4\xd6\x68\xbc\x32\x34\x28\xf1\xf6\x26\xf8\xec\xf0\x4a\x2b\x8f\x37\x64\x38\xb4\x9e\xaf\xcc\x85\xe8\xb4\x5c\x91\x11\xd1\x6e\x99\x40\x65\x0d\xa5\x77\xb6\xca\x8e\xd8\x0c\xea\x29\x35\xe3\x7e\xa4\x64\xbf\xd1\xaa\x70\x49\x3f\xe0\x42\x4e\xc5\x11\x90\xd0\x3f\x04\xde\xe3\x3a\x2e\xb3\xea\x24\xaf\xf1\x08\xac\x3e\xc8\xf6\xe5\x8a\x2f\x36\x3f\xc7\x8e\xe6\x60\x9e\xc3\x95\x2b\xc6\xda\xfe\xd9\x05\x45\xbf\xe7\xfa\xf6\x4a\xfe\x22\x12\x3f\x9d\x5f\xdc\xfd\x29\xfd\xf3\x5f\xfa\x87\xbf\xd7\x5f\x72\x15\xe2\x16\x01\x6a\x4f\xdf\x32\x6d\x7f\xb0\xe7\x08\x62\x94\x33\x99\xd7\xe9\xc8\xf4\x95\xa7\x39\x35\xfe\xb5\xc3\xb0\xad\x36\x18\x4a\xde\xf0\xe2\x48\x1b\x9e\xdd\x3e\x7e\x54\x7f\xd9\x68\x54\x7f\x79\xca\x51\x25\x4f\x45\x6f\x54\x3a\xd1\x2a\x91\x48\x40\x4f\x5b\xc9\x04\xbe\xd0\x2c\x84\xa8\xd3\x50\x59\x6b\xa8\xa0\x12\x27\x3e\xb0\xa0\xe2\x9e\x6a\xca\x72\x39\x85\x92\x69\x86\x9d\x5f\xb0\x29\x5f\x48\xa8\xf0\xc8\x4b\xd6\x3e\xcc\x3d\x75\x7e\xcd\xac\xb6\x9d\xcc\xd3\x81\x5c\x6c\x24\x6a\xae\x21\x2d\x6b\xbd\x6f\x6b\xe9\x4b\xa2\x87\xcd\x20\x12\xaf\xb9\x2c\xcd\x7b\x1f\x37\x61\xfb\x7a\x73\x27\x01\x98\xe5\x92\x1b\x11\x93\x9f\xc4\x33\xca\x04\xa8\x4d\x53\x7d\x5f\xf3\x4c\xa4\x72\xb9\xda\x0f\x2e\x54\xee\xfa\xb8\x96\x0b\xa1\x1a\x3b\x2c\x48\x04\xf4\xd5\x72\x7e\x11\xd7\xf3\x5a\xe8\xb9\x2a\xec\x0b\x9f\xca\xb9\xe0\x85\x99\x2f\xff\x4b\x95\xd1\x83\x1e\xf9\x4a\x4c\x27\x59\xc4\x0e\x71\xd4\x4c\xdd\x08\x9f\x7b\xf2\x41\xbd\x81\x92\x58\x82\xc1\xeb\x88\x0c\x00\xc9\x00\xc2\x0e\x15\x80\xd6\x4a\x65\x8e\x30\x6f\x19\x6c\x46\x17\x2a\x67\x75\x53\x42\x35\x1e\x55\x52\x74\xbc\xdd\x22\x13\x10\x12\xa5\xf6\xd9\x4e\xd8\x6f\x3a\x2d\x65\x78\xf2\xc3\xb7\xb9\xbb\x15\xf6\x16\xc8\x85\x95\xce\xa5\x29\x96\x00\xd5\x5a\x43\x7a\x32\x60\xc6\x51\xa9\x17\xbc\xb2\x58\xd6\xd6\x55\xdc\x55\x35\xd5\xaf\x35\x0a\xf1\x49\x07\x76\x61\x43\x32\xd9\x3a\x1e\xc9\x8c\x8d\xee\xa8\x77\x0d\x61\x8f\x49\x38\x9c\xfd\xa2\x4a\xe8\x9f\x0e\xcf\x46\xc0\xf6\x03\x87\x76\x28\x57\xc6\xc8\x56\xbb\x81\x2a\x6d\x38\xfc\x7b\x92\xf6\x18\xf7\xc7\x06\x46\x8d\xf9\x4c\x4d\x19\x65\xbd\x52\xc9\xe2\x05\xaf\x6f\xa1\xd2\xaf\x61\x8d\xbb\x02\x63\x5f\x36\xf9\x03\x74\xae\x31\x31\x16\x76\xd2\xd2\xab\x42\x98\x43\x84\xc6\xc7\xf4\x1c\x84\x1d\x7e\x0b\xa6\xc7\x32\x5b\x8e\x18\xd6\xb6\xfd\x40\x80\x6d\x7d\x28\x7e\x27\x91\xda\x03\x43\x1d\xda\x21\x56\x4a\x1b\x1c\xaf\x86\x7e\x77\x9c\xe4\xd3\x27\x20\xe9\x64\x9f\x5e\xbb\xcd\x96\xdc\x03\xf6\xf1\x07\xad\xf9\x0e\x31\xc6\x7a\xa4\x2f\x81\x38\xd6\x6d\x13\xd0\xa2\xac\x48\x1e\xc9\xeb\xae\x1e\x04\x5e\x0d\x55\xc2\x0d\x10\x39\xde\xa1\xdd\x8d\x7a\x98\xfc\x6f\x47\x9e\x9e\xfa\xa2\xfb\x0d\xdb\xe8\xaa\x0f\x70\x95\xde\x94\xfe\x8b\x7a\x8f\x30\x4f\xfc\x87\xec\xc8\x7a\x24\xcd\xb2\x8e\xe1\x75\xc0\x31\x1b\x56\x08\xae\xa3\x33\xd6\x1a\x04\x7b\x56\x2a\x56\x00\x00\xa8\xbd\xd7\xdf\x3e\xb7\x33\x47\x06\x43\x69\x7e\x30\x65\xbb\x44\x1f\x94\xb9\x14\x3c\xdf\x64\xca\xbf\x89\xc6\xb5\x9d\xc1\x6c\x85\x90\xb4\x5d\x6c\xce\x4a\x69\x69\x5d\x57\x6b\x21\x65\x7f\x3a\x2d\xb8\x5c\xe0\x6b\x2d\x3b\x03\xf6\xd7\xb1\xb8\x74\xc5\x94\xa1\xd7\xfb\x94\xe0\x2e\xd9\x70\x85\xe2\x5e\xf9\x99\x51\x7a\x28\x0a\x32\xbd\x9f\x59\x66\x3b\xde\x21\x89\x48\x4d\xbc\x37\x9f\xbb\x7e\xa3\x41\xd7\x2d\x8d\xf3\xa9\xdc\xb4\xa9\xf1\xfe\x16\x89\x7c\xc9\x03\xf3\xf8\x5b\x76\x89\x9a\xc0\xc3\x6f\x57\xb2\x83\xd5\xb7\xaa\x7f\xc8\x30\x35\x5a\xaf\xbb\x4e\xef\x11\xa6\x1f\x8a\xfc\x20\x3e\xb3\xfd\x93\x78\xdf\x87\xb7\x57\xa8\x32\x5c\x8b\x45\x65\xcf\xc2\x5b\x59\x88\x0b\x6e\xe6\xf8\xe0\xbc\xcc\x6a\x18\xca\xba\xe6\x3f\x28\x6d\xec\x7f\x7b\x1f\x88\x1e\x74\x3b\xf3\x8f\x7a\x57\x78\xb0\x65\x6f\x61\xe5\x40\xcb\x90\x6b\x4f\xcf\xbd\xe8\x82\xc5\x08\x2c\x5f\xfc\x5e\x5a\x41\xe5\x24\x33\xf2\x4e\x9c\x09\x9e\x17\xb2\x14\xc8\x8b\x35\x05\xc0\xfb\xde\x74\x56\x37\x93\x09\xc2\x78\x8d\x99\xd7\xdb\x51\x48\xb8\x13\x85\xaa\xe0\x1b\x50\xae\x58\x60\x6d\x6e\x55\x16\xcb\xa0\xe6\x94\xca\x00\x10\xbd\x65\x30\x9c\x2d\x9a\xc2\xc8\x23\xb4\x52\x6c\x65\x92\x48\xed\xc7\xda\x35\xf9\xf0\xf6\x6a\x27\xcb\x51\x32\xdb\x53\x6b\x29\x36\x1b\x75\xeb\x04\xa6\x4a\x4c\xf8\xa7\x76\x9c\x7d\x99\xd9\x8e\xfc\xe2\x27\x56\xd3\xa5\x21\xc5\x91\x14\x4a\x12\xcb\xac\xbc\x82\xd5\xad\xc1\x9a\x7a\xf1\xd3\xa6\x63\x4b\x9f\xd6\x14\xf0\x6e\xa2\x9d\x37\x3f\xe1\xd3\x81\xd5\x23\xf0\x82\xce\x99\x72\x34\xe0\xb7\x3e\x53\x7d\x82\xb0\x66\xf2\xd1\x79\xda\x7c\xde\x78\x78\x5a\x73\xde\x6c\x78\xab\x88\x4d\x4a\xb8\x1f\x6a\x1c\x57\xfb\xf5\x65\x60\x39\xa0\xa4\x04\x46\x87\x96\x38\xae\x19\x67\x86\xfa\xc1\x6c\x11\xd7\x49\x9f\x0a\xe3\x89\x93\xe5\x6c\xfc\xb4\x5b\x18\x0c\x77\x03\xd4\x7a\x93\xc5\x88\xb6\xee\x41\xeb\x60\xdf\x5f\xb1\x04\x4f\x67\x03\x5c\xe9\xb9\x5d\xc5\x78\x57\x45\x58\xaf\x96\x62\xdb\x6f\xae\xe3\xb2\xd7\x80\xc1\x63\x85\x29\x78\x71\x85\x19\x6d\xb0\x65\x6f\xf0\x66\xa0\x65\x5f\xd9\x0b\x2d\x23\xf0\xc6\x8c\x97\x4c\x7c\x96\x60\xce\x98\xa2\x15\x43\x74\x5a\x26\x4a\x84\x80\x2e\xaf\x83\xee\xdb\xe9\x7a\xcc\xce\xa7\xec\xa6\x39\x3e\xfe\x36\xfb\x77\x76\x3c\xda\xac\x4f\xa9\x1d\x3a\xfe\x97\x05\x13\x5b\xef\xa1\x5f\x71\x74\xd6\x47\xae\xaf\x3c\x3f\xa9\xd7\x37\x47\x93\xbb\xbc\x5a\xeb\x40\x75\x4d\x56\x78\x4e\xa9\x49\xaa\x30\x24\x0c\x8e\x69\x11\x7b\x4b\x1f\x09\x26\xe7\x3a\xa5\xf4\x2a\xbb\x22\x5f\x17\xb6\xdc\x06\xd1\x15\xeb\xcf\xc3\x8a\xb7\x37\x3a\x10\xed\xf7\xb7\x38\x11\xa7\xeb\x4f\xc4\xfa\xba\x49\x97\x43\x75\x93\xea\x30\xba\x76\x89\x8b\xdd\x00\x0d\xba\xb3\xf1\xf5\x1e\x8d\x0d\x82\x64\x56\x1e\x8e\x0d\xb2\x20\xd6\x1c\x8f\x64\x0f\xeb\x0e\x48\xeb\xb5\x81\xa0\x8c\x5e\x9b\xd5\xa7\xa8\xdf\x7a\xd5\x81\xea\xb5\x4e\x9d\x2d\x8a\xfa\xfd\xa7\x6d\xb4\xb3\x33\x05\xbd\xed\xfc\x44\x8d\x06\x97\x74\xb0\x1a\x40\xa7\xe1\x0a\x03\x12\x0e\x99\x10\x78\x3d\xbe\x97\x6d\xac\x97\xda\x88\xc5\xef\x3a\xfa\x63\x38\x24\x6c\xc5\xc5\x19\xce\xa5\x59\x79\x5b\x86\x12\x6a\x36\x8c\xfb\xa0\xf7\x7e\x14\x4b\x2b\x19\xb7\x2e\xcb\xd5\xc9\xb5\xba\x15\xa5\xab\x5c\x77\xa9\x94\x39\x3d\x81\x56\xab\x2a\x78\xc6\x2f\xad\xaa\xdc\x19\xb5\x1b\xae\xd8\xe9\x80\xb1\x8c\x6d\xfb\x80\xb2\x9d\x1b\x1e\xf3\x30\xb3\x04\xac\x99\x7b\xe6\x2b\x5d\x28\x65\x58\x66\xe7\x3e\x05\xe0\x2f\xc6\x1b\x33\x57\xb5\x34\x4b\x3f\x10\x59\x66\x45\x93\xa3\x3f\xa1\x33\x95\x43\xed\x26\x23\xb2\x5a\x18\x52\x95\x5c\x10\x03\x67\x77\xbc\x90\x39\xbb\x78\xf3\xfe\x48\x94\x99\xb2\x7d\x9c\x9e\xb0\x49\x53\xe6\x45\xba\x42\x47\x7a\x1b\x87\xa2\x18\xda\xcd\x62\x05\x08\x4a\x24\xd1\x41\x43\xff\x55\x3c\x86\xaa\x96\x77\x76\xaa\x97\x57\x27\xec\x56\x10\x92\xa0\xa5\x55\x72\xd6\x9b\x21\xce\x4f\x3f\x61\x18\xc4\x9a\x30\xc9\x55\x77\x6c\x75\x32\xd7\x26\x17\xed\x21\x12\x0b\xbd\xba\x96\xe1\xb4\xda\xad\x2f\x7b\xbb\xfa\xf2\xec\x8c\xbb\xb8\xfd\xfd\x5a\x25\x96\x0d\xa2\x5c\x57\x1d\x89\xf5\x59\x6f\xab\x8f\x45\xea\xfd\x2d\x8e\x46\x78\x7d\xfd\xf1\xe8\xb6\x5d\x75\x44\x3a\x6d\x13\xc7\x84\x5a\x00\xe6\xef\x6e\xc1\xb4\xa3\xae\xbf\x32\x50\xed\x4d\xa3\x97\x57\x1c\x98\x4d\x73\x05\x57\x9e\x9a\xe1\x4e\x36\x3f\x3a\xd7\xd7\xef\xd6\x1e\x19\xdf\x66\xc5\x51\x71\x6d\xfa\x47\xe4\xfa\xfa\xdd\x11\x54\x18\x38\x9a\xd2\x38\x9f\xb4\x9a\xec\xae\x36\x79\xc0\x47\x38\xb4\xa1\x89\xe6\x61\xf3\xbe\xe1\x45\xf1\x0d\x13\x65\xb3\xb0\x32\x87\xc8\xa1\xf6\xac\x86\xa0\x16\x08\x57\xf1\xf0\xc0\x10\xb9\xd5\xf1\x47\xb1\xb7\x98\xad\x27\x9d\xe3\x71\x34\x50\xd0\x8d\x4d\x64\xc9\x6b\x12\x20\x10\x0a\xd5\x92\xdb\x65\x40\xc9\xb6\xdb\x81\xbd\xb7\xa6\x37\x62\x82\x67\xf3\x98\x71\x83\x59\xb5\x5f\xc6\xaf\x14\x22\xa7\x60\x1b\xac\x54\x82\x68\xc2\x54\xbc\x06\x4d\x62\x25\xab\xb8\x26\xce\x8e\x85\x32\xed\xb1\xaa\xa5\x1d\x0d\xb6\xc7\xea\x2a\xbd\x54\x26\x37\x7c\x3a\x40\x30\x84\x8a\xd7\xc6\x15\x01\xb3\x42\x04\x7d\xea\xb6\x54\xf7\x04\xcf\x4d\xab\x04\x5f\xd7\x4d\x55\xa9\x9a\xe0\xca\xa9\x29\xae\x74\xa8\xfc\x0b\x45\x26\xed\x6c\x69\x2c\x1b\xc5\x1c\x3a\x7b\x35\x60\x98\x6a\xa9\x4a\x34\xce\xe2\xc3\xb3\x65\xc9\x17\x32\xeb\x3c\xdb\xcc\xc7\x39\x3a\x78\x5b\x88\xcf\x31\x5e\xf3\x99\x4c\xe0\x42\x0e\x7f\x68\xa0\x44\x72\xa2\x29\x8b\x8b\x27\x57\xf1\x03\x7f\x28\x34\x95\x36\xa1\x78\xaf\x7b\x69\xe6\xb2\x64\xbc\x64\xa2\xbc\x93\xb5\x2a\x17\x58\xe2\x82\x1b\xb7\xd2\x9a\xe5\xf8\xa1\x56\x87\x63\x76\x86\x85\x39\xb5\x0b\x5c\x1c\x80\xb7\x1e\x5e\xdb\x81\x69\xa5\xda\xfa\x79\x79\xa7\xc2\xc5\x4f\xed\xf9\xf5\x26\xa5\x1a\xc3\x78\x17\x17\x18\x65\x68\x20\x3f\xda\xbb\x17\xec\x39\x8a\x5d\x0f\x6a\xda\xee\xda\x3b\xfa\x23\x97\x46\xfc\x5c\x6a\x2c\xd8\xe4\x0f\x26\xac\xe7\x92\xdd\xf3\xe5\x88\xdd\xab\xf2\x70\xb5\xbf\x02\x93\x98\x29\x11\xda\xe5\xdf\x6a\xba\x81\xbc\x5c\x1a\x28\xb3\xaf\x00\x30\x18\x62\x6f\xbc\x5b\xa4\xe5\x31\x49\x2f\x7f\xea\xe4\x0d\x04\x41\xf8\x06\x5e\xd8\x6f\x8a\x02\xbd\x1d\x74\x39\x73\x59\x03\x41\x87\x18\x23\xbc\x79\xd0\xae\x10\x9f\xdb\xf4\xcc\xcd\x46\x0b\x5e\xdb\xeb\x69\x27\x42\x48\xd4\xbc\xb0\x54\xae\xce\xe1\xd6\x2f\x3b\x64\x30\xe9\xb9\xd9\x34\x8e\xa0\xe3\xc8\xd9\x28\x7a\x60\x28\xd4\x63\x65\xe0\xc0\x53\xe0\xe2\xa4\x67\xb5\x8b\xa4\xe7\xcd\xbe\xd4\x35\x5d\x40\x31\x9b\x64\xc6\xe6\x85\x7d\xb2\x15\x12\x73\xff\x8d\x48\xe2\xb9\x13\x35\x9d\xf0\x52\x64\x42\x6b\xcb\x1c\x5a\xcc\x12\x10\xe4\x9b\x89\xa8\x4b\x61\x84\x6e\x95\x70\x5e\x47\xd7\x27\xb2\xcc\x43\x91\x6d\x8c\x6a\xfb\xe5\xbb\xd6\x8f\x54\xda\xa7\xfd\x23\x12\x9b\x8b\x5a\x4d\x25\x79\xe8\xb2\x56\x89\x8f\xb9\xd2\xc6\x6a\xc1\x1f\x31\xa0\x59\x40\x83\x5e\xbd\x6e\x59\x19\xa0\x59\xf0\xcf\x3b\xfb\x1f\xa5\x16\x57\x99\xaa\xc5\x49\xfe\xb3\xfd\xb4\x82\x37\x2d\xcd\x80\x2c\x81\x83\xd1\x41\x93\x57\xe7\x79\x21\x42\x08\x7a\xa6\xca\xd2\xd4\x3c\xbb\xc5\x7f\x4f\xe5\xac\x65\xae\xb4\x64\xe4\x42\xd5\x86\x86\x0e\xdf\xba\x97\xe5\xad\x5d\xac\xe2\x60\x74\xa0\xe7\xea\xfe\x07\x88\xb8\x7e\x8f\xf3\x7c\xab\x6a\x87\xef\x30\x3a\xc8\x85\x11\x99\x79\xa7\x32\x5e\xbc\xb7\x63\xe9\x71\xa4\x3d\x1a\xc4\x8e\xd1\x20\xe2\x03\xd9\x5b\xd1\xe8\x61\xa2\xec\xfa\x50\x09\xf3\x6d\x6a\xb1\xa7\x86\xd4\x3b\xb8\x89\x6a\x1c\xff\x52\xa5\xd8\xb3\x2d\x0a\x9f\xd8\x81\xc1\xbf\x6b\x48\xf3\x21\x36\xe9\xaa\xe1\xc5\xf5\x49\xa8\xc2\x86\xb3\x86\x4d\x6a\x99\xcf\x04\x33\x35\x9f\x4e\x01\x2c\x74\x01\x82\x86\xd5\x01\x54\x63\xb4\xcc\x7d\x67\xa1\x83\x29\x08\x07\x24\xca\xe4\x23\x56\x2a\xa6\xa6\xd3\x23\x6a\x80\x5d\xe2\x92\xa1\x69\xb1\x12\xb5\x55\x9b\x06\xaa\xd6\xf4\xa8\xc9\x40\x61\x94\xb6\x89\x7e\xae\xee\x99\x9a\x1a\xd8\xa6\x16\xcf\x74\x58\x23\x7e\x9b\x18\xdc\xf9\x69\x2d\xac\x2e\x18\x32\x04\x66\xa0\xb1\x90\x20\x73\xbc\xbb\x60\xcf\x40\x28\x53\xf3\xc0\x47\x81\xeb\xf8\x9f\x8e\x5c\x30\x67\xa7\x92\x79\x85\xf7\x79\x13\x66\x8f\x65\xdf\x52\xf0\x96\x8e\xef\xe1\xa7\x7a\x07\xad\x4b\x7e\x13\xb0\xd1\xad\x06\x71\xd1\xa2\x05\x65\x0c\xb8\x50\x21\xec\xcb\xee\x7e\x61\x9b\xbb\x83\x35\x72\xd5\xf3\x81\x70\xfa\x9e\xda\x05\xab\x7a\x47\xa3\xcb\xfe\x06\xe4\x74\xdf\xc0\x0b\xe7\x95\xff\xe5\x4e\x72\x76\x2f\x26\x81\xf8\x58\x0a\xf5\x22\x17\x93\x66\xf6\xc2\xaa\x8a\x53\x2a\x1d\x53\x8f\x59\xe8\x86\x7e\xd2\xfe\x04\xe3\x0f\x50\x88\xc6\x95\xe0\xeb\x31\xfe\x48\xd6\x25\x39\xfd\x7b\x9e\xac\xf3\x13\x3f\x45\xec\x9d\x05\xaf\xec\x2d\xa3\x07\x98\x61\x0c\x97\x53\xa9\x82\x8c\x15\x38\x33\x90\xb4\x31\x16\x83\xc1\xfe\xbe\x10\x9f\x2b\x51\x4b\x2b\x76\xf3\xa2\x15\x08\xdc\x15\x47\x82\xd8\x7b\xd1\x62\xad\xbd\x82\x1d\x49\xf9\xa4\x37\x89\x7e\x9b\x04\xab\x80\xf0\x6a\x55\x87\x9a\xa7\xf8\x16\xcb\xe6\x22\xbb\x4d\xb0\x0e\x7f\x4a\x20\x74\xc5\x73\x90\xd7\x2f\x8f\x5f\xfd\xf9\x2f\xa9\x03\xd2\x93\x7f\xfa\xe3\xec\xb4\x80\xb2\x62\xa5\x2a\x8f\xc4\xa2\x32\x56\x2b\x8a\x8a\x6a\x31\x4e\x71\x96\x50\xd0\xc4\x2c\xe3\x52\x8c\x40\x52\x32\xd3\xf0\x82\xb9\x2e\x93\xd4\xcc\xcb\x5a\xfd\xc0\x4e\x7a\x12\x2e\xbf\xfb\xe5\xe9\xef\xfe\xf9\xc5\x35\x7c\xa9\x77\xf5\x41\x1e\x4c\x0c\xf5\xae\x35\xcc\xbb\x2f\x32\xc4\x9f\xae\x7a\xc3\xdb\x83\x56\xed\x0a\xb4\x2a\xa9\x60\xf4\x43\x45\x7b\x6d\x36\xb9\xd5\x6d\x92\xb8\xea\x42\xbf\x7c\xf5\xbf\xe1\x4a\xbf\xb4\x57\xfa\x4f\x7f\x7d\xa8\xa8\xb8\x48\x72\x29\x60\x45\x41\x24\xa4\x74\x29\x90\xee\x22\x2e\x95\xbc\xb5\x7d\xf5\x25\x99\x61\xd7\x6a\xe2\x56\xe6\x08\x6c\x28\x76\x41\x8e\xb8\x7f\x86\x27\xd2\xa5\x09\xe2\xd9\xb7\x63\xb1\x8a\xe5\x98\xfd\x04\x1a\x80\xf7\xa0\xa2\xff\xf4\xfc\x82\x4d\x0a\x95\xdd\x6a\x30\x58\x6a\x41\x7a\x02\x9a\xa9\xa1\x7c\x2e\xaf\xf9\x42\x18\xb7\xc2\x85\x3d\xc8\x18\x16\xee\x16\x8b\xf2\x17\xdd\x78\xc0\xd8\xa3\xe1\x14\x42\x86\x98\x56\x0b\xa1\x4a\xc1\xee\x41\xb7\x29\xe4\x2d\xac\x89\xf8\x5c\x29\x2d\xec\x65\x22\x9f\x99\x2a\x91\x77\x5b\x3a\x07\x53\x40\x4e\x7e\x27\xb5\xc4\x68\x58\xa8\x05\x81\x66\xa0\xe8\xdb\x60\xad\xe0\xb5\x91\x59\x53\xf0\x9a\x55\x4d\x6d\xfb\x1d\x31\xce\x0a\xa9\xc1\x96\xe5\x67\x48\x23\xc8\x15\xf0\x36\x90\x28\xed\x41\x90\x70\x16\x6e\x0e\xdc\x29\x39\x7e\xf1\x6f\x37\x07\xa3\x78\x05\x81\x5a\x83\xa9\x36\x9a\x7f\xa1\x54\x35\xb1\x52\x55\xe0\xf1\x0e\x79\xd9\x6e\x58\xa7\x7b\x0e\xd4\xff\x17\x51\x2b\x3f\x9e\xfe\x27\xa6\xb2\x20\xd9\x10\xcb\xc1\xdb\x17\x7f\xb6\xbb\x85\x57\xc1\x39\x10\xaa\xaa\x90\xc1\xf4\x6c\x97\x7d\xcc\x4e\x4a\x06\xac\xc5\xd1\x26\x5d\x48\xac\xec\xec\xcd\xef\x34\x74\xc8\x9a\x46\xa7\x52\xb4\x8c\xd1\xf1\xe4\x75\xcd\x97\x56\x67\x37\x62\x11\xb3\x6a\xef\x9a\x6e\xeb\xf1\xbd\x13\x1b\x3d\xf4\x56\x6e\xb5\x38\xd2\xf6\xb7\x23\x9e\xff\xbc\xdd\x21\x25\xf3\x2c\x44\x13\x80\x8e\xf1\x7f\x8f\x5e\x1e\x1f\x1f\x8f\x98\xfd\xdf\xff\xde\x2c\x68\x21\x58\x18\x12\xe1\xce\xf4\xc8\x87\x2c\x38\x45\x06\x8e\x21\x9a\x7f\x9f\x4d\xc4\x4c\x96\x76\x53\x8f\x44\x99\xdb\xff\x8e\x30\x6e\x41\xcb\x3b\xf1\x1c\x37\xc5\x92\x71\x2c\x81\xa8\x9b\x05\x9a\x40\x55\x9d\xe3\xa5\x09\xaa\x9e\xdd\x13\x12\x4d\xe1\x7c\x34\xa5\x23\x1c\x39\x7b\x76\x7c\x74\xfc\x9c\x7c\x0b\xf0\x59\x27\x23\xd4\xbc\xcc\xd5\xa2\x58\xb2\x6c\xae\xb4\x28\x93\x94\x64\x95\xa1\xa3\xef\xc7\x1d\x6e\xec\x96\x81\xcc\x18\x51\xd5\xfe\xa5\x6a\xd8\xbd\x3b\x4a\x56\x0d\x9a\x63\x26\x3b\x51\xe1\xe4\xa8\x3a\xe6\x9c\x7e\xb5\xb8\xd6\x73\xa7\x5f\x15\x0a\x6c\xd2\x4c\xe6\x85\x60\x9f\xce\x2e\x62\x35\xda\xad\xc9\xad\xa8\x0c\x53\x95\x28\xd9\x33\x31\x9e\x8d\xd9\xe1\xab\x3f\x1f\x2f\xf4\xe1\x88\x1d\xbe\xd2\x87\xcf\x07\xd5\x2d\xf6\x11\x22\xe9\x2b\x88\x2b\xb4\xd2\x2c\x50\x0f\xbb\x3d\x56\x2d\xf8\xf7\x46\x8b\x1a\x30\x76\x76\xa7\x97\x05\x6b\x54\x6f\xf6\xfe\x51\x90\x79\xfc\x4f\x4f\x2f\xf8\xfc\xdd\x7d\xea\xe9\x12\xee\xda\x96\x88\x44\xc1\xbc\x55\x96\x88\x6d\xcd\xb1\x29\x25\x73\xab\x3e\xd2\xc2\xea\x96\x5d\x74\x85\xc9\xad\x5e\x1f\xd8\x92\xed\x4d\xd3\xa9\xb5\xd8\xd0\x46\x9d\x78\x35\x61\x36\xe8\x9b\xb3\x1e\x68\xa1\x5e\xf0\xcf\x17\xa2\x3e\x55\xb5\x38\x18\x1d\x2c\xa0\x7e\xb5\xc9\xaa\x37\xda\x6a\x28\xe0\x45\x0f\xa6\x60\x93\x55\xa7\x85\xd2\xe2\xef\x5c\xba\x24\xb5\xbe\xc5\x36\xea\x2f\x95\x33\x46\xcf\x02\x00\x10\x64\x91\x45\x6e\xfc\x0f\x27\xd7\x11\xb9\x21\xd7\x9e\x9d\x70\x25\x6a\x08\xca\xb0\x5c\x8c\x3d\x3b\x06\x60\x0e\xc1\xef\xd0\x3c\x5f\xc8\x85\x95\x51\xf4\x91\x44\x31\x55\xce\x4a\xc0\x2d\x90\xe5\xf3\x0d\xe3\xea\x16\xa9\x72\xb7\x0b\x59\x76\x73\xa6\x90\x77\xaa\xa9\x1b\xe4\x11\x8c\x0e\x8a\x83\x8a\x4c\xd5\x98\x3f\xe5\xea\xf3\x8e\x58\x2d\x66\xbc\xce\x21\x6b\x9d\xde\x81\xf6\xef\xc3\x4a\x80\x28\x1c\x56\xe6\xdf\x87\x67\xb6\xe9\x54\x52\xfb\xd4\xcf\x52\xe9\x37\x4a\x92\xff\x70\xe2\x44\x69\xd0\xef\x76\xfa\xee\xe3\xd5\x9b\xff\xf7\xf7\x93\xf3\x6b\x0c\x9e\x71\xf5\x61\x17\xdc\x2e\x57\xe9\x1c\xfa\xf4\x1a\xa8\xba\x63\xc7\x25\xfe\x72\xbc\x82\x3b\xa0\x90\x64\x76\x47\xfb\xd3\x27\x39\xb5\x16\xfd\x66\xc9\xd5\xb8\x3e\xdd\x90\x19\xc2\x2c\xbf\xcc\x34\x77\x1f\x35\xfc\x20\x3a\xbd\x09\x79\x4b\xbe\xb9\xb1\x5d\x24\x17\x86\xcb\x62\x07\x14\x4f\xff\xb3\x11\x35\xcf\xc5\x77\xd2\x3e\x0b\x7f\x9f\x14\xe0\xb2\x8a\xfd\x5b\x0b\x59\xae\xaa\x85\xdf\x7e\x37\x41\xf0\xa2\xc7\xcc\x88\xa2\xd0\xb1\xc8\x6d\x14\xbb\xb2\xf4\x2e\x72\x41\xca\x29\x6b\xb4\xb3\x63\x54\x8d\xa5\x94\xce\x7c\x14\x34\xda\xb4\xf1\xb1\x3d\xaf\x15\x63\xf9\x4e\x7a\xf0\x94\x89\xf4\x71\x2f\xfe\x3b\xd3\xfb\x05\xaf\x6f\x19\x42\x1d\x46\x16\x5e\x18\xea\x66\xe3\x5b\xaf\x43\x1c\x8f\xd8\xb7\x2f\xff\x7b\x73\xda\xbc\xca\x4d\xd0\x7a\xdc\xa5\xd7\x14\xce\x0f\x2a\x82\x1f\x6a\xdd\x14\xa4\x60\x7b\x07\x81\xbb\xb9\x7f\x06\x19\xf6\xe5\x02\x24\xd9\xf9\xab\x57\x8b\xc3\xe7\xbb\xa3\x47\x7a\xc5\x2c\xf4\x50\x26\xc2\xa3\x86\x3e\x44\x83\x7e\xc7\xc4\xa7\x2b\xe1\x6d\x46\x78\x3a\x6f\x6d\x64\xe5\xdc\x11\xc1\x59\x41\x50\x46\x07\x3a\x9b\x8b\xbc\xc1\x1a\xbe\xe2\x33\x84\xe2\x43\x45\x7f\xfb\xc8\xea\x75\xe6\xe4\xf2\x02\x65\xaf\x96\x20\xf6\x56\x46\x30\x71\x4d\x5e\x0d\xca\x63\xad\x3e\x13\xf5\xfc\xc3\x53\xb4\xac\x3a\x9b\x8d\xfd\xe9\x50\x47\x31\x36\x60\x1b\xb6\xd3\x96\xa2\x8e\x63\x85\x8c\x6a\xb2\xb9\x2b\xf1\x2f\x38\xc4\x23\x35\x15\x36\x77\xd1\xdd\xdb\x19\x37\x76\x77\xdd\xef\x7e\xc3\xab\xee\xf7\x35\x6d\x65\x8f\xf7\xbd\x6f\x4c\xf0\x3b\xdf\x27\x13\xf0\x88\x9d\x5c\x5e\xc4\xe1\x9c\x75\xf5\xff\x48\xe4\xb5\xd2\xaf\xfd\x93\x97\xa5\x6a\x4a\xa4\xe0\xfc\x4e\xc9\x9c\xf1\x52\xdf\x0b\x30\x4d\xd9\x97\x2d\x2f\x90\xae\xfc\x3f\x5c\x3c\x3b\xac\xe3\x60\x91\x4a\xf2\x98\xc7\x10\xb0\xed\x37\xe3\xa9\x89\x57\xf7\x26\xa5\x04\xc3\xf0\xd8\xcd\xca\xd0\x9f\xa8\x09\xf8\x38\x39\x4b\x62\x40\x3e\xd4\x42\x6b\x50\x5d\x20\x1a\xd9\xaa\x05\x42\xde\x61\x9a\xca\xdb\xf3\x0f\x18\x95\x4a\xd6\x71\xea\x43\x6a\x76\x3c\xf2\x76\x6b\x01\x54\x05\xbf\x45\x31\xc9\x9d\x6f\xaa\xa7\x48\x3e\x6b\xd1\x98\xd4\x4a\x6c\xb6\x0c\x20\x26\xf7\xd6\xe2\x2b\x9e\x75\x44\x3c\x53\xe6\xb1\x2d\x36\xff\xd3\xd9\x05\xab\x78\x76\x2b\xcc\xd7\x3b\xdf\x2f\xce\xaf\x07\x4c\x2a\x9b\x30\xed\xf4\xab\x81\x73\xff\x5d\x96\xb9\xba\xd7\x2f\x7e\xf8\x70\xb5\x33\x73\x08\x19\xe6\x3f\xf0\x85\x25\x80\xe8\x41\xfc\x49\x56\x3e\x24\xef\xec\xea\x32\xc1\x63\xfd\xa3\xa1\x38\xe9\xab\xcb\xbe\xf4\x7f\x3f\x17\xe0\x4a\xb1\xc3\xaf\x54\x21\xed\x76\x38\xc6\x3a\x11\x14\x59\x4f\xa0\xa9\xb6\xef\x14\x3d\x8e\x87\xdb\xf7\x5c\x85\x87\x3e\x5d\xc2\xfe\x9b\x04\x7e\xe7\x83\xe8\xfa\x40\xac\xbc\x6f\x94\x8b\xec\x77\x5e\x50\xe7\xfe\xc3\x71\x26\x99\x96\x5f\xac\x3e\x6b\x70\x8f\x12\x5e\x45\x1a\x0d\x39\x6b\x7f\x3a\xbf\xb0\x9f\x04\xbf\xab\xbf\x5d\x56\xf1\x00\x01\xa3\x50\x3c\x9f\xf0\x82\x43\x6a\xe5\x03\x73\xf6\x3c\xe3\x0d\x67\x76\xfc\xe6\xb3\xb1\x2f\xd5\xab\x8e\xa5\x6b\x43\x11\xbb\xc0\xdf\x9c\x63\x2e\x84\x55\x85\xd8\x31\x11\x22\xc7\x04\xbd\x0a\x1e\x07\xce\xee\x44\x3d\x41\x64\x46\xef\x7b\x78\x41\x51\x09\xa8\x99\x71\x8d\x2e\x0c\x60\x9c\x71\x07\xe8\x80\x20\xb1\xcb\x05\x62\x51\x9c\x88\x6d\x62\x69\xed\xba\x13\xde\xd4\xc5\x45\x2d\xa6\xf2\x73\xff\x1c\x4f\x64\x99\xff\x24\xea\x49\x22\xed\xc4\x0e\xd9\x5d\x2d\xdb\x8c\x65\xbc\x28\x46\xe4\xf1\x92\xd3\x76\xf8\x39\x05\xb9\xbb\x79\xf2\x0a\xb6\xc4\xfb\xcb\x3e\x5d\xbe\xc3\x11\xe0\xa6\x4a\xad\x1b\xa7\x51\xfa\xae\xd1\x41\x19\x2d\x1b\xf8\xe6\x17\xc2\xcc\x51\xbc\x90\x8b\x0a\x33\x95\x30\x38\x27\x5e\x24\xb7\x8a\xf1\x6f\x87\xda\xa7\x7c\x4d\x64\x21\x0d\xe8\xde\xf0\x31\x0a\x97\x03\x31\xc9\x07\xf8\xa1\x97\x42\x95\xf1\xca\xf3\x32\x7c\x94\x22\x05\x9a\x12\xcc\x40\x49\xcf\x0b\x65\x12\x18\x53\x25\xc4\x6e\x4a\x49\xb8\xbe\xbe\xb8\x6a\x39\xae\x91\x20\x40\x8c\x40\x44\x09\x36\x3a\x5b\xe9\x78\x24\x70\x67\x6e\xb0\xa5\xe4\xf7\x7c\x9a\x4d\x8d\x3a\x6f\x6d\x6b\x32\xb0\xc7\x98\xff\x8f\xbd\x77\x7d\x6e\xdb\xc6\x1a\xc6\xbf\xff\xfe\x0a\x8c\x9e\xd9\x69\xd2\x91\x15\x3b\xdb\xec\xef\x69\xde\xd9\x0f\xae\xd3\xb4\x99\xe6\xe2\xc6\xce\xdb\x67\xa6\xee\xec\x42\x24\x24\x61\x4d\x11\x5c\x80\xb4\xa3\x7d\xa6\xff\xfb\x3b\x38\xe7\x00\x04\x49\x50\xa2\x6c\x29\x71\x5a\xf5\xc3\x6e\x2c\x80\xb8\x1e\x9c\xfb\xa5\x9f\x1c\xdb\x03\x73\xf4\xb8\xe9\x02\xea\x28\x67\x1a\xba\xd0\x73\x3f\x65\xf3\x11\xbe\x24\x23\x2f\x7d\x33\x03\x19\x0f\x70\x10\xa2\x06\x0a\x56\x21\xc8\x98\xb0\x73\x2d\x95\x96\xa5\xfc\x4f\x3d\x8f\x85\x40\xe0\xb7\xd3\x31\xbb\xfe\x6f\xf3\x04\x8d\xe2\x6e\x0a\x4b\x72\xf0\x13\xe2\x76\x7d\x08\x72\x6d\xbc\xce\x9b\x7a\x9c\xb8\xfa\xe3\x6f\xdf\x80\xaf\x8e\x9d\xc9\x02\x4c\xf7\x44\x5e\xb9\xa6\xe0\x3c\xe4\xac\x89\x33\xdc\x5a\x6d\xb7\x31\x93\x13\x31\x09\x37\x1a\x48\x72\xf6\x20\xf0\xf6\x1a\xdf\x6b\x51\x56\xda\xb2\xb3\x39\x13\x5a\x2b\xcd\x30\x35\x90\xfd\x42\x0b\x9e\x2c\x40\xbf\xdb\xa3\x91\xca\xf9\x5c\xa4\xef\xbd\x43\x72\x67\xfd\x6f\x5a\x3d\x9a\x32\x28\x2d\x21\xf5\xbe\x3c\x41\x00\x1f\x8d\x8d\x8f\x5f\x9a\xe0\x7a\x8f\xd8\x29\xbc\x68\xa7\x9c\x35\x02\x6d\xa6\x8d\x4d\x11\x73\x85\xa0\x30\x0e\xaf\xd8\x92\xb9\xef\x64\x9e\x5e\xe5\x8c\x3d\x8a\x9c\xa5\x43\x53\x42\x3f\x66\xc5\x82\x83\x43\xc8\xcc\x43\x4b\xed\x19\xe4\xb2\xd9\xda\x71\x2c\x26\x51\x8d\xa1\xc2\x3d\x81\x66\x4c\x1a\xd8\x36\xe0\x3a\x7c\x80\x4a\x87\x14\x62\x6c\xc7\xb1\xe0\x0c\xbe\xbd\xdd\xbd\x85\x47\x70\x95\x1f\xd9\x61\x5e\x21\x84\x7e\xb7\xba\x70\x24\xcf\xae\x3f\x4c\xf4\x8e\xaf\xc4\xad\x84\xdc\x21\x3c\x81\xb4\x33\xc2\x44\xe6\x5a\x16\xe8\xbb\xe7\x9e\xb4\x77\xae\x92\xb9\xe5\x65\x53\x40\x4a\x6b\xc5\xfc\x8d\xd6\x52\x3f\x6d\x6d\x31\xf5\x74\xb9\x05\x26\xa0\x25\xb0\x0f\xe8\x8c\x27\x0b\x71\xc6\x8b\xf8\xe3\x78\xdb\xea\xd1\xc0\x19\x6d\xca\x2a\x0d\x4b\xa8\x9b\x9a\xb1\x04\x18\x61\xca\x45\x2e\x73\x7c\x93\x52\xe5\x63\x66\x54\x88\x2a\x6a\x55\x08\x39\xa7\xe4\x29\xaa\x22\x78\x16\x7e\xc6\xf8\xd4\x62\x0d\x98\x30\x93\x73\x69\x67\xc1\x4c\xcf\x40\xea\xf1\x54\xdb\x2b\xe2\x99\x16\x3c\x5d\xc1\x5a\x2c\x23\x54\x65\x99\xd7\x48\xa9\x19\x25\xdf\x0f\xb2\x1f\x93\x1b\x76\xf4\x25\x16\x5a\x58\xa0\x1a\x40\x09\xa8\xe7\x9e\x48\x41\x38\xfa\x46\x5a\x50\xf8\x47\x39\x68\xdd\xfe\x05\xef\x6b\xe9\x8d\x09\x36\xae\xbe\xcc\xc8\xcc\x11\x89\xca\x7e\x4d\xca\xc8\x36\x15\xd3\x3c\x37\xe0\xc0\x95\xf1\x15\xa6\x00\xaf\x20\x57\x07\xbe\x88\x21\x3e\x07\xeb\x5e\x91\x9f\x16\xc4\x5e\xcf\x06\x76\x96\x57\x1f\x02\x2f\x03\x05\x60\xf8\x54\xf8\x0d\x97\x19\xbc\xba\xc8\xce\x6f\x85\x9c\x2f\x22\xe4\xfb\x12\xe3\xb5\x85\x96\x09\x06\x21\x16\x99\x14\xda\xdf\x20\xe6\xd1\x4f\x94\x0e\xdf\x67\xfb\xd4\xe7\x22\x87\xd8\x66\x92\xb0\x71\xaa\x80\x57\xe2\xac\x50\x46\x96\xf2\x06\xdd\xe3\xe6\xe1\x7b\xe8\xa7\xb1\x9b\x82\xdc\xd6\xc9\x0c\x6d\xdc\x34\x5c\xda\xa8\xef\xa3\x2d\x53\x6f\x33\xdf\x00\x91\xa5\xf5\x89\x8b\xed\x27\xa8\xe3\x7a\x5e\x61\xcc\x7f\x9c\xe4\x06\x94\x16\x52\x13\x76\x60\x3e\x2e\x48\x5b\x91\xb4\x23\x61\xc8\x0e\x49\xea\xe1\x69\x5a\x64\x2b\x27\x0a\xe3\x79\xe4\xe6\x31\x39\x00\x20\x1d\x28\x85\x7b\xd1\x6e\x31\xb7\x7c\x51\x64\x2b\x48\xc8\x1c\xa3\x56\xa1\x44\x1d\x15\xa5\x43\x19\xba\x73\x44\xac\xc7\x29\xfc\xde\xe2\x68\x0d\x20\x03\x2e\xb9\x46\x2a\x5e\x41\xe2\x95\x22\x16\x57\x61\x1c\xc1\xe5\xeb\x0b\x94\x1d\xba\x72\x83\xbf\xc6\xe6\x95\x25\xfc\x05\x2f\x23\xf3\x9e\x9d\xda\xdf\x49\x1a\x0e\xf3\xef\x4c\x57\xf6\xa2\x1e\x95\xab\x42\xda\x27\xbb\xb2\x5c\x62\x8a\x7a\x66\xde\x49\x48\x64\x28\x5f\xd0\xe3\x09\xa3\x01\x4b\x7e\x0d\x3a\x1b\x91\x08\x7b\x6e\x02\x8a\xb6\x30\x4a\x79\xd4\x3e\xe3\xe0\x29\xdb\x69\x21\x0e\x87\xc7\xb3\x0a\x5d\x6a\x4b\x1e\xd3\xc8\x0a\x20\xd5\x17\x08\x7e\xd1\x30\x25\xa1\xcb\x9e\x13\xa0\x96\x6d\xcf\xc0\xc5\xa6\x05\x69\x99\x66\x12\x8f\xc0\x8d\xd8\x73\x08\x42\x97\x83\x8f\xc1\xf5\x8d\xe6\x15\x02\xb6\x1e\x1e\xab\x01\x90\x88\x2c\x89\x57\xe5\x42\xe4\x25\x65\x17\x8c\x86\x3c\xe4\x40\xa0\xfa\xa7\x08\xd0\x72\x92\x08\xc8\xd6\xe0\xe2\xe2\x6f\x84\x96\xb3\x95\xa3\xad\xb0\x84\x7a\xee\x09\x7b\x69\x69\x42\x90\x7b\x37\xfe\x56\xaf\xc5\x2a\x7e\x33\x3f\x61\xc3\x0e\x2e\xe6\x5a\xac\xdc\xe5\xb8\x41\xe3\x77\x53\x27\x25\xdb\x78\x35\xd7\x7d\x89\xaf\x76\x76\x33\x08\xcd\x71\xad\xe0\x85\x6f\xb3\x08\xad\x99\x44\x83\x1c\xf9\xd1\xda\xff\x0a\x3d\xa9\xea\x3a\x67\x41\x1c\x44\xa9\x9a\xb1\x3c\x8d\xf7\xc4\xe7\x16\xfb\xa0\x28\xd3\x9c\x8d\xb4\x5c\x10\x11\x44\xc1\x34\x81\x76\x23\x2f\x39\x09\xc7\x75\x00\x9f\x6d\xdd\x25\x6a\x7d\xcd\xa7\x02\x18\x1f\xa1\xed\xdd\xad\x43\xac\xad\xae\x71\xbd\x9f\x97\x47\x83\x6d\x04\x61\xe3\x75\x42\x10\xa4\x3d\x12\x73\xaf\x39\xcd\xd1\x06\x1a\x9a\xd9\x15\x00\x42\x16\x06\x56\xdb\xa1\xa7\xd8\xa3\xcb\xc1\xd1\x62\x30\xa0\x69\xb6\x42\xde\xea\x6a\x34\xd7\xaa\x2a\xcc\xd5\x28\xce\x6d\xd3\x24\x11\xbe\x4d\x92\x60\x4e\x6f\x0f\xb2\x9d\x80\x52\x4e\x57\x62\xcc\x16\x72\x6e\x49\xb2\xdf\x9d\x34\x6c\x2e\x6f\xb0\xc6\x16\x4a\x28\x70\x4a\x0b\xef\xd2\x66\x17\x6d\x3f\x9f\xf1\xcc\x0c\xff\x3e\x55\xc0\xca\x37\x87\x89\xe0\x85\xfb\xc1\x86\x39\x0f\xce\x61\x2d\x68\xf8\x9e\x3b\x81\x0c\xe2\x4a\x20\x0b\x9f\x67\x6b\x40\xdd\xbe\x6a\x7a\x25\x6c\x62\xbc\xe0\x58\xcc\x66\xa8\x89\x68\x63\x2e\xc1\xdf\x10\x75\x2f\xd8\x87\x6c\xb7\x3d\x60\xc4\x4e\xb3\xcc\xe9\x35\xa8\x7f\x8d\xf2\x85\x2c\xf1\x56\x21\xde\x8a\x3d\x52\x9a\xf1\xa9\xfd\xe7\xe3\x26\xc7\x8f\x55\xa7\x12\x95\x1b\x99\x0a\x2d\x52\xc6\xd9\x4c\x62\xfc\x89\xc5\x11\x5e\xfc\x52\xe9\x56\x4e\x04\xeb\xc0\x59\x34\x01\x19\xf7\xd8\x61\x31\xa3\xbb\x72\xdb\xf1\xbb\xa9\xe3\xc5\x72\xcc\xa6\xb0\x33\x70\x3c\x87\xcb\x5f\x07\x86\xd8\x23\x60\xe7\x21\x30\xae\x4a\x4a\x52\xec\x10\xf8\x78\x3e\xd5\x21\x72\x5e\xc8\x4d\x50\x54\xb3\xc9\xa3\x5a\x10\x87\x3f\xbc\x92\x73\x34\x1e\x2d\xb8\x4e\xcf\x55\x7a\x3a\x03\x61\x74\x75\xb1\x5a\x62\x30\xc2\x2f\x28\x01\x8e\x47\x3c\xbb\xe5\x2b\x73\x66\x49\xc5\x69\x66\x91\xa9\x1b\xb4\x9b\xe9\xa1\xaf\x67\x67\xd7\xbf\x58\x7e\xfe\xb4\xa7\x7b\x4b\xc3\x35\x0e\x1e\x13\x10\x2c\x48\xbd\xe3\x3c\x54\xf1\x39\xa6\x81\x4c\xc0\x84\xc5\x3b\x68\xb8\x07\xa5\x9d\xc6\x6c\x70\x08\xe4\x4b\xd4\x15\x4f\xd8\x2f\x4e\x49\x0a\xf0\x53\x4f\x49\x08\x2d\x90\x4b\xae\x65\x61\x3a\xaa\x33\xef\x73\x17\x4c\x8c\x73\x5a\xc0\x97\x39\x94\x2d\x0b\x5a\x11\x42\xb1\x8c\x59\x9c\x13\x3a\xe4\xc9\xd8\x71\x9e\x8c\x1a\xca\xbb\x56\x08\x8f\xed\x43\x0d\xdf\x26\xfb\xcc\xa3\x30\xa2\x71\xb7\xda\x51\x8c\xdd\x5e\xff\x14\x23\xa9\xaf\xf1\xb1\xbf\xa8\xec\x96\x2f\x6a\x83\x00\xa7\x11\x7c\x52\x29\x37\x12\x26\x47\x2c\x21\xd2\x10\xdc\xec\x7d\x65\x4d\x86\x5c\xd2\xda\xd1\x74\x95\xb5\x89\x9e\x95\x4a\x6f\x84\x5e\xb1\xcd\x6b\xb1\x5f\x4f\xd8\x8f\x6b\xf7\x18\x04\xf7\xc2\xc9\x93\x6e\x48\xcd\xb6\x5e\xe7\x98\x35\x9c\x55\x4f\x8e\x4e\x8e\x8f\x07\xba\xaa\x1e\x02\x97\x77\x17\xb8\x5c\xac\x21\x02\x6b\x1e\x61\xc8\x65\x59\x4e\xa2\x46\xa3\x8e\xed\x36\xbb\x7e\x89\x9e\xfe\x10\xcd\xfe\xfd\xf7\x06\xd1\xbc\xeb\xea\x3b\xf2\xc2\x1e\x16\x8e\x33\xf8\x75\xdf\x47\x13\x3a\x40\xf5\xd9\x3e\xa8\x21\x5f\x34\x56\x38\x44\x53\xea\x27\x39\x25\xcd\xe6\x5a\x1e\xaa\xdd\xb9\x8d\x46\x6a\xf5\x68\xe3\x7e\x22\x50\x35\x80\x77\xaf\x1d\x0b\x2c\x5a\x2a\x0d\x5b\x8a\xe5\xd4\xbd\xe5\x69\x6d\xa1\x4a\x37\xb9\x14\x53\x8a\x6c\xc2\x5a\xa3\x31\xf1\xf4\xe7\x1b\x78\xfe\xf3\xb5\x5c\x71\x8b\xe1\x20\x86\xc9\xf1\xc3\x3c\x8c\xf2\x06\xd6\x7d\x01\xe1\xe9\x56\xf6\xe7\x32\x27\xb1\x0e\x59\x8c\x94\x41\x3d\xf7\xb2\x1d\x00\x05\x78\xef\xae\x76\x8c\x96\x7c\x46\x7a\x8e\xf0\x18\x86\xec\x8a\xbc\x66\x4c\x8d\xf2\x21\x04\x55\xa5\x86\x4d\x45\xa6\xf2\x39\x91\xa6\x3a\x2e\xfe\x15\xb8\x22\x81\x61\x1a\xb6\xd8\x16\xac\x49\x4a\xc2\xaf\xbd\x2a\x85\x2f\xbd\xa8\x04\x02\xf7\x9d\xb6\x7c\xd1\xda\xe0\x9d\xde\x67\xeb\xdc\x36\x3f\xa0\xf6\xac\x5b\x3d\xba\x01\x62\x4b\xb3\x6b\x4c\x7e\xb1\x4c\x67\x70\x71\xf8\x96\x06\x99\x1c\xc6\x23\xf7\x60\x23\x32\x46\x80\x0f\xfa\x10\x72\x28\xc1\xb7\xf1\x31\x6a\x25\xfc\xb2\xee\x7a\xa9\x5d\xfc\xd4\x6b\x77\x78\x85\x70\x26\xa9\x5e\x54\x03\x9a\x09\xc1\xbc\x44\x4f\x97\xca\x94\x6a\x59\xb7\x8e\x6b\x77\xbf\x84\xe7\xe4\x45\xa4\x8f\xdc\xeb\x7c\x19\xf5\x92\x84\xb4\x5e\x81\x50\x12\x0c\x22\xc3\x0c\x39\xad\xf5\xf8\x51\xc3\x93\xd9\xa8\xb0\xdb\x0c\xb7\xdd\x73\x1a\x06\x88\x48\x30\x86\x21\xff\x66\xdf\xc1\xb8\xbf\x4d\x97\x3f\x03\xea\xcf\x4b\xd9\x46\xff\x81\x5e\x13\xbf\x11\xa6\x14\xe9\xa5\x3a\xe3\x05\x4f\x64\xb9\x7a\x6f\x57\xe2\xf6\x1a\x91\xc1\xdb\x83\xf4\xa0\xd3\xd6\xe6\x1f\x30\xb1\x08\xf6\xf2\xfb\x90\x13\x89\x6e\xf8\x7d\xcf\x67\x91\x93\x00\x85\x3a\xe0\x0f\x0d\x92\x2c\x48\x81\xbe\xd5\x2c\x78\xb1\x31\xb1\x41\xef\x86\xfa\x96\x51\xaf\x3e\x20\x88\x21\x70\x6c\x73\x8b\x22\x37\x95\x06\x44\x3c\x57\x2a\x65\xa6\x00\xf3\xc8\x23\x9e\x97\xf2\xc8\xd1\xcb\xc7\x5f\x02\xc1\x0c\x0f\xe0\xee\x44\xb3\xf1\xa0\x36\x7d\xb1\xf9\x82\x86\x53\xde\x70\xf9\xdb\x20\xbd\x21\xc4\x37\xec\xb9\x86\xf6\x12\x7c\x6c\x45\x7a\x6f\xbd\xde\x6f\xef\x34\xb8\x6b\x49\xb9\x97\x00\x74\x37\x52\xdc\x38\xa3\x36\x25\xc6\xc6\x7b\x11\xe2\x36\x99\xd9\x9e\x20\xf7\x1a\x9c\xf6\xea\xae\x13\xa0\x15\xef\xb0\x13\xf7\xd7\xf1\x39\x99\x20\x69\x2b\x1e\x50\xe0\xc3\x03\x27\x9a\x8b\x39\xff\x14\x1e\x3d\x1d\x58\x18\xf2\xf2\x36\xbf\xfa\xb5\xf5\xe7\x36\x7c\x4c\xa6\xa5\x9a\x0f\x21\x2e\x21\xb1\x0f\x63\x38\x61\xda\x18\xa1\x6a\x29\x53\xf7\xad\xea\xd0\x71\x77\xa7\x7a\x07\xe7\x8a\x74\x51\x88\x04\xb4\x25\xb8\x82\xae\xee\xda\xce\x06\xe9\xf0\x41\xa1\x85\x53\xc4\x2c\xa9\x35\x71\xdd\xe9\x3a\x3f\x94\x32\x93\xff\x01\x06\xee\xc2\x4e\x70\x6e\x97\x71\x47\x35\x49\x63\xcf\x9b\x01\x2b\x3e\xf5\x30\x90\x0c\x26\x1a\x50\xfd\xd0\xf6\x0b\x39\x5f\x23\xf3\x79\x16\xf8\xf8\x42\x95\x0b\x7c\xb8\xf6\xf1\x4f\x65\x0e\x61\x6e\xe4\x26\xef\xaf\x62\x23\x30\xdf\xcd\x65\x6c\x8d\x43\x16\x61\xbc\x5a\x61\x0a\xa6\xc4\xc0\x5f\xad\xf7\x85\xac\x0d\xdd\xe8\x43\x88\xbf\x78\x85\x72\x38\xeb\x20\x27\xfe\x3b\x1b\x01\xdb\xa2\xf8\xe6\x7a\x61\xae\xeb\x83\xb4\x4a\x7f\x06\x53\xf4\x92\x97\x54\x00\x62\xbf\x26\xe7\x7b\x5f\x71\x8b\x67\xdf\x74\xcd\x41\xf7\xcf\xe6\x9a\xb2\x3f\x7f\x94\x3b\x9f\x66\x1c\x6d\xae\x39\xcf\xe8\x07\x11\x74\x88\x14\x28\x44\x78\xbd\xb4\x27\x1e\x77\x57\xcf\x03\x69\x1f\x94\x8e\x20\x3b\xfc\xb9\x7b\xe7\x90\xf4\x8a\x1b\x23\xe7\x39\x9e\x24\xb2\xc1\xc1\x98\xec\xd1\x8a\xf1\x8f\xd2\x3c\x86\xe4\x2b\x32\x0d\xb3\x88\x42\xc6\xa1\x93\xa1\x26\xac\x70\xa1\xeb\x4e\x8b\x3d\xfa\xb8\x69\xc6\xe3\x09\x7b\x59\x65\xd9\x8a\x16\x2a\x52\xbc\xf8\x25\x2f\x8c\xeb\xb0\xb3\x5a\x5b\x11\x60\x08\x62\x91\xbd\x2f\xf1\x56\x61\xc8\xf1\xaf\xea\x87\x04\x52\x53\x37\x91\x43\xf4\xfe\x79\x36\xb7\x60\xb3\x58\x5e\x38\x3f\xf1\x4c\xf0\x54\xe8\xef\x33\x5f\xaf\x23\x52\xc2\x63\x2a\x73\x97\x90\xea\x42\x24\x0a\x2d\x65\x85\x4a\x5f\x59\x0e\x86\x67\xdf\xf1\xe4\x5a\xcd\x66\x8d\xa6\x37\xfc\x63\xeb\xe7\x88\xb3\x45\x73\x2d\x5d\xbe\xab\xd9\xa1\x15\xa7\x50\x93\x02\x3f\x10\xab\x89\xe1\x5d\x18\x2d\x57\x1d\xd1\xb5\xb4\xe6\x3f\xb8\x38\xec\xa9\x14\x48\x0b\xb4\xba\x05\x00\x1c\xc8\x97\x8a\xdd\x72\xe9\x1c\x8b\xec\xa7\x8d\xe2\xb6\xe4\xfe\x50\x64\xa2\x14\x6c\x2a\x66\xe0\x85\x2f\x21\xb0\x49\x55\x25\xa6\x83\xf2\xd9\xa0\xac\xcc\xd7\x96\xe9\x30\x9c\x03\xcd\xe2\x20\x0f\xd6\xfe\x58\x39\x4e\x0d\x15\xbf\x5c\x20\xb0\xcf\xa8\x90\xcb\x0c\x85\xe2\x66\xae\x85\x30\xbb\xfb\xc0\x28\xcb\xcd\x65\x48\xda\xe9\x32\xff\xe0\x65\x48\xa8\xde\xc0\x39\x86\x6c\x45\x4f\xe4\x45\xbb\x8b\x2b\x52\x60\x7c\x3c\x64\x51\xb7\x51\x95\x82\xb8\x07\x13\xc6\x27\x9c\xa9\xbc\x44\xf8\xdd\x58\xfc\x21\xd2\xd5\x97\x81\xc8\x14\xd5\xda\xc0\x0e\x75\x59\x08\xa8\x02\xd0\x2e\x1e\x21\xcd\x9a\xea\x71\x7b\x29\x45\x61\xb9\xcc\xe7\x85\xd2\x65\x58\x90\xe2\x49\x74\xfe\x83\x5f\xcf\xde\xfc\x7a\x8e\xb7\xf0\xeb\x19\x52\x1a\xe3\xc7\x4f\x5d\x1a\xe3\x24\x86\xd6\x0f\x1e\x48\xbb\xf3\x40\x6a\x71\x68\x5d\x3f\xf0\x46\x7b\x83\xf7\x68\xa5\x8d\x9e\x31\x1c\x8b\x09\xd7\x19\x8f\xe5\x9e\x0c\x53\x83\x49\x6d\xae\xa6\x83\xcf\x87\xd4\x81\x78\xb3\xe7\x3a\x10\x0d\xe8\x8d\x07\xfd\x0a\x9d\x58\xc6\x6c\x2e\xde\xcd\xde\xaa\x54\x98\x4b\x75\x11\x17\x8a\xce\x5b\x3d\xa9\x63\x90\x7c\x8c\x9a\x9b\xd1\xd2\x20\x16\xab\x1c\x8a\x05\x54\x79\x6a\xa9\x92\x91\x2e\x13\xb9\x2b\xdf\xc9\x2d\xed\x1a\xb7\x23\xbd\x4b\x55\x18\x30\xdd\x06\x55\x25\xc1\x3d\xd8\x8f\x11\x0b\xc8\xa6\x90\xe3\x85\xc8\x0a\xc8\x5b\xa2\xd5\x4d\x30\xea\x57\xc6\x95\xc9\xe2\x79\x22\x26\xec\x22\xe0\xad\x6f\xf9\xca\x92\x26\x89\x45\x81\x66\xf6\x09\xbb\xac\x02\xec\x6a\xb4\x94\xf9\x4b\x9a\x97\x0e\xea\xa5\xcc\xd3\xab\x51\x7b\x35\xb9\x62\x4b\x5e\x96\x42\x63\x25\xdb\xd2\xf3\x59\x8e\x1b\x26\x27\xe6\x09\xfb\xfe\x23\xb7\x2c\xdc\x73\x97\x42\xc2\x15\xf6\x32\xf2\x3f\x70\xac\xcf\x8e\x8f\x5d\xd8\x3a\x65\x4e\x89\x0e\xc4\xfe\x7a\x0c\x47\x97\x77\xce\x6e\x46\x7c\xe3\xac\xd2\x60\x25\x6e\xad\x14\x6e\xc5\xbb\x40\x9f\x3c\x3b\xae\x3b\xa8\x5c\x84\x7e\xd7\x61\x46\x2d\xc7\xf9\x05\x17\xfe\xe8\xd9\x5f\x8e\x8e\x9e\x1d\xff\x85\x59\xce\x27\xf5\x99\xb4\xec\x36\x9a\x45\xcd\x1e\xfb\x64\x48\xb0\x00\x9f\x56\xc1\x02\xd2\xb0\x62\xdf\xe3\x11\xd6\xe5\xec\x8b\xf5\x3e\x0f\x5a\x89\xbc\x62\x0e\x79\x9e\x81\xd7\xb8\x9a\x79\x8b\x11\x16\x2e\xad\x75\xfd\x16\xbc\xc2\x1a\xc2\xec\xdd\x52\x02\xf3\x48\xc8\xc5\x76\x35\xce\xd5\x1f\x3f\x96\x86\x59\x9a\x7b\xc3\x33\x8a\xd2\xaa\x93\xb5\xba\x63\x72\x2c\x6a\xb3\xb8\xf2\xae\x35\xe7\xae\xf4\x67\x78\x36\xbf\x8f\x47\x1f\x8f\xae\xbd\xa1\xeb\x28\x93\xa6\x3c\x5a\xf2\xe2\xe8\x5a\xac\x4c\xa8\x00\xee\xf6\xa2\xa5\x2d\x79\x51\x9f\x78\x04\x7d\x9d\x53\x95\x66\x64\xcc\x57\x14\x4b\x86\x5a\x1b\x6a\xc2\xba\xc2\x75\x94\x0a\x70\x6b\x69\x50\x5f\x2b\x9d\xb0\xef\xe9\xc7\xb0\xe8\x73\xb9\x40\x20\xec\x1b\xc0\xde\x1c\x55\xda\x72\x72\xa1\x07\x4c\x57\x61\x9b\xd8\xe5\xe6\xc0\x3c\x5f\xf9\xea\xb6\xcd\x0f\xda\x53\xd5\x0b\x84\x77\x90\xab\xd8\xea\x03\x48\xa8\x2b\x5b\x60\x1d\xdf\x3a\x47\x14\x2a\xb3\xc6\x9d\x09\x3d\x50\xb4\x7a\x36\xab\x65\x21\x76\x70\xdc\xe2\xea\x9e\x24\x8c\xee\x0c\xcb\x84\xf4\xe8\x35\x22\x91\x2f\xf1\x9e\xde\x2c\x8a\x8d\x6c\x8a\xad\xb0\xb1\x2a\xa7\x45\x40\x20\x74\xa1\x52\x83\x15\x62\x7c\x86\x15\x8b\x7a\x96\x3d\x65\x2b\xba\x82\x67\x95\x45\x25\xcf\x47\x27\xe6\xf1\x5d\xc4\xcf\xa8\xe2\x26\xb6\xef\x4e\xaf\x20\x97\xfe\x8e\xf6\xdb\x77\x0f\x5b\x1d\xc3\xf1\xdd\xce\xc1\x03\x4a\x4f\xf4\x6a\xd8\x0c\x0b\x08\x0c\x41\xfe\xdb\x71\x3b\xe3\x12\x65\x5d\x0c\x53\xe7\x50\xbd\x9b\x20\x85\x50\xf0\xb9\xa7\x1b\x85\x4a\xbf\x32\xec\x6a\x64\x4f\x6d\xd2\x98\xfc\x6a\x34\x28\x2e\xf5\xd7\x3d\xd4\xe2\x18\xa8\xea\x5c\xc7\x0f\x0e\x1d\xb0\x81\xc0\xb7\xfb\x68\x80\xbf\xcb\x26\xb5\xdf\x00\x6b\xe7\xb6\x1b\x1f\xaa\xf1\x5d\x33\x06\x13\x1f\x0b\x6e\x1f\xde\xba\x3e\xa5\xc2\x0a\x45\x69\x83\x83\x74\xd6\xfb\xed\x6c\x67\xf5\x34\xa8\x35\x36\x22\x28\xf5\xa2\x45\x2e\x6e\x5f\x08\x9e\x66\x32\x47\xbf\xbf\x52\xaf\x7c\x7a\x69\x27\xca\xbd\x56\x50\xc1\xd9\xfd\x49\xf9\x2d\xc3\x3f\x21\xdf\xbb\x1d\x5f\x25\xd7\xef\x60\x19\xfd\xbf\x46\x0c\x3f\xc1\x1a\x3b\x07\x1b\x34\x7a\xf5\x08\xef\x11\x88\xc0\xb8\x01\x1e\x82\xd0\x6c\x16\xb2\x70\x0a\x45\xf1\x51\x24\x95\x97\x54\xa1\xda\x44\xa6\x54\xe1\xe8\x35\x3e\xe2\x46\x15\x7e\x2d\xa0\xce\x10\x66\xf6\xa6\xe7\x87\x54\x6e\x21\xe7\x0b\x97\xc5\x06\x12\x02\xc6\xb5\x3f\xcd\xc3\x8e\x6d\xac\x6e\x76\x78\xd8\xe7\xa0\x03\x4a\x9a\xab\xfc\x88\x76\x9a\xf0\x3c\x95\x29\xc6\x98\x5a\x24\x04\x0a\x55\x8a\x35\x9c\x82\xef\x1c\x48\x1e\xc1\xc6\xe1\x6e\x79\xc6\xaa\xbc\x94\x19\xb3\x4c\xfc\xb2\x70\xa2\x14\x4f\x00\x42\xc2\xee\xe0\xb9\x05\xe5\x4a\x2b\xd4\x37\xe7\xe2\x56\xa4\xee\xa0\x4d\xa6\x4a\x92\x45\x2c\x9b\x38\x9b\xd9\x73\xbf\x11\xd9\xca\x51\x0f\x48\xa0\xdd\x5c\xbd\xbf\x25\x72\xcd\xb1\x6c\x7c\x61\x27\xc0\x1b\xc1\x44\x8b\xf6\x94\x79\xe2\x32\xc4\x60\x2a\x3c\xbf\xd7\x7a\x46\xd5\xaa\xfc\x24\xbb\x32\xb1\x5d\x17\xb2\x34\xbb\xcb\xef\xdb\x82\xdc\xae\x0c\xdf\x68\x6f\xc8\xf0\xa0\x46\x24\xf5\x07\xd0\x99\x17\xdf\x9f\xbf\xff\xfe\xec\xf4\xf2\xfb\x17\xcf\xeb\xe2\x60\x62\xa9\x6e\x90\x01\x9c\xf1\x1b\x05\x7e\x58\xad\x67\xd6\xd5\x2b\x44\xde\xd8\x86\x85\x61\x39\x86\x70\x75\xb9\xff\xd5\xd9\xbd\x83\xe5\xde\x65\xa5\xee\xad\x77\x96\xdb\x44\x31\x9d\x85\x36\x9a\x6b\x0e\xac\x14\xfa\xc6\xb2\x60\xa2\xbc\x15\x22\x77\xd0\x6b\x5c\xba\x4e\x8e\xd5\x82\x97\xdc\x50\x65\x43\x18\xa6\x09\xff\x16\x64\x03\x58\x43\x21\xd2\xb6\x83\x31\x00\x00\xcb\x31\x30\xe0\x34\x0c\xdc\x8b\x95\x9a\xfe\x5d\x71\x9f\xf8\x11\x1e\xa9\x87\xeb\xcf\x0e\x8f\x0d\x8c\x1c\x39\xcb\xba\x35\xb0\x81\x34\xdc\x5c\xe8\x8a\xed\x35\xe1\x2b\x6d\x70\xe7\xa5\x42\x40\x48\x41\x15\xda\xc5\xb2\xab\x24\x13\xf1\x62\x71\x0d\xa8\xed\x5d\x19\x32\x5e\x8d\x95\x39\x1e\xac\xb3\xc2\x3d\x2d\xae\xe7\xc1\x6c\x58\xa1\x7f\x2b\xfb\x5d\x66\x4d\x7d\x23\x0b\xf4\x8d\x11\x62\xe1\x34\xa5\xde\xf2\x08\xf4\xa1\xf5\x7c\x80\x44\x58\xcc\x6f\x50\xd4\xe4\x79\xea\xa9\x04\xa1\x7f\xf7\x7a\x3e\x33\xa4\xef\x3e\xd3\xf8\x26\x86\x73\xad\xdb\x33\x4a\xc5\xb5\xc5\xce\xab\x4c\x00\x78\x21\xd3\x4d\x69\x9c\x6d\xc1\xa7\x0c\xc3\x03\x9b\x30\xb2\x44\xb8\x64\x38\x70\xa0\x90\x25\x07\x34\x8e\x4e\xc0\xdf\xb5\x7f\x5b\x1b\xdb\xd7\x7a\x8c\x3b\xb8\xad\x85\x83\xd5\x26\x14\x1c\x6e\x8c\x3b\xf2\x09\xb7\xfb\xb6\xb5\x37\x17\x8d\xf3\x96\x0e\x6d\xfd\x35\x76\x92\x27\x06\x71\x3a\x4d\x95\x49\x9d\xde\xc8\xdf\x37\xa9\x40\x4b\x89\xe7\x49\x9a\x02\xf2\x69\x99\xb0\x53\xd7\x0f\xdd\xcd\x0c\x93\xf9\x8d\xba\x16\xa0\x79\x25\x2f\x68\xd1\x56\x8f\x18\xec\x47\x03\x01\x7c\x24\x62\xc2\x4e\xf5\xdc\x00\xe3\x04\x29\x6b\xb8\x9e\xca\x52\x73\xbd\x22\x3f\xfb\x4a\x8b\x09\x7b\x85\x30\x55\x38\x5a\xe5\xe6\x56\x4e\x3c\xb5\xbf\x1a\x01\x43\xdd\x0d\xbc\xb8\x9e\x47\xf4\x08\xb0\xb4\x10\x22\xea\x13\x6c\x66\x84\xf2\x9a\xaa\x0d\xa7\xb6\x71\xab\xdb\x62\x15\x6d\x79\xde\xa5\x98\x7c\xc8\xaf\x73\x75\xbb\x29\x35\x5f\xff\x4b\x61\x53\x51\x6b\x4c\x2b\x1d\x86\x57\x0d\x10\xda\x3b\x98\xaa\xbd\xac\x6d\x71\xd4\x85\x58\x1f\x90\xe6\x3a\x05\xc0\xed\x94\x7c\x16\x47\xa5\x6d\x0d\x62\x5c\xb3\x87\x89\xe6\x73\x06\xaa\xdc\x20\xf1\xd6\x52\x1a\x03\x56\x70\xa5\xd1\x73\xa2\xad\x00\xe4\xe5\x66\xfd\x5f\x0c\x0e\x9b\x30\xe7\x56\xd9\xeb\x30\x90\x06\xdb\xdb\x4e\xe9\xc9\x21\x09\x6e\xf3\x8b\x5c\x20\xbc\x06\xbd\xc7\xf5\xee\x29\x1b\xa2\xcb\x24\x07\x11\x78\x57\xa3\xaf\xaf\x46\x8d\xac\x3e\x18\x72\xb1\x57\x2d\xf8\xee\xf4\xdf\x04\x11\xdd\xe3\x75\x8a\xeb\xfa\x74\x37\xa8\xbd\x5b\x5a\xeb\x8e\xc6\x1a\x0b\x92\x73\x8d\xd9\x57\x2d\x10\x82\xb8\xda\x01\x9b\xdc\x27\x88\x83\x30\x2e\x2c\xbc\x5c\xeb\x9f\x17\x42\xef\xdc\x37\x7f\xc0\xd9\xba\xe9\x4a\xb5\x94\xc9\x9d\x62\x42\x9a\x93\x6c\xfb\xd8\xd7\xc6\x7e\x38\x5b\x85\xd3\x12\xf5\x12\x17\x82\xfc\x40\x6f\x5b\x06\xce\xd1\x0d\x44\x10\x06\x5d\xb6\x9f\x70\x6d\xc4\xc0\x47\x50\x33\x7c\x84\x2c\xda\x1f\x58\xc6\x71\x29\xcb\x52\xa4\xb5\x61\x1f\xf7\x49\xd6\xbd\x50\xeb\xdb\xb2\xb2\x38\x46\xa9\xcf\xa0\x10\xb7\xb1\x10\x8c\x11\x24\xc5\x80\x68\x1c\x07\x40\x52\x4c\x8b\x55\x88\x0b\x1c\xe1\x26\xf9\xb1\xf5\x49\x17\xf7\x39\x49\xd2\xe3\x58\xe4\xad\x8f\xdc\x5b\x41\x93\x47\xce\x52\x61\x2c\xc9\xc5\xf5\x6d\x46\x86\xd3\xa8\x3f\xc6\x77\xde\x1f\xa3\x7d\x91\xad\x97\x1a\xb0\x1f\x57\xf0\xd5\xd5\xa8\x73\x53\x4d\xf5\x37\x18\x58\x35\x5f\x8a\x5b\xa5\xaf\xd1\xaf\x2e\x48\x82\x45\xe9\xaf\x4c\x4d\xda\x5d\xa1\xf4\xd0\xf6\x8c\x79\xab\x5a\xe9\xaa\x82\x6f\xb8\x61\x46\x59\xf1\x03\x33\x55\xb9\x12\x01\xa6\x82\x3c\x9f\x3b\xb1\x08\x59\x4a\xe9\x4b\x58\x74\x0f\x90\x8a\x38\x6c\x73\x84\xc0\xd5\xe3\x78\xce\x31\x31\x70\x09\x48\xd0\x15\x45\x57\x08\x7d\xe7\x6a\xa3\x24\xb4\xcd\x36\x0a\xa1\x97\xb1\xaa\x9c\xe7\xf0\xfb\x9a\x6d\x80\x63\x8b\xca\x6a\x97\x4b\x2b\xe4\xd9\xc5\x11\x6e\x76\x9d\x2d\xf3\x55\x68\x71\x43\xc9\xe9\x52\x91\xf1\x55\xf7\xa3\x5d\xee\x48\x99\xf2\xbb\x28\x6c\x9f\x53\xcb\x76\xf0\x0d\xef\x1a\xfc\x2e\xc0\x76\x89\x90\x34\x03\xef\xf1\xa9\xaa\xf2\x9d\xaf\xfd\x65\x0f\x60\x9d\xfb\xb6\x35\xeb\xe7\xba\xbd\xf2\x26\x5c\xc9\xbc\xe9\xda\xb0\xd3\xc5\x6b\xd1\x73\xee\xd8\xb0\xd5\xb1\x13\x72\xf4\xe7\xbe\xfb\xa3\xd6\xa2\xf7\xa4\x5d\xd3\xf6\x88\xd0\x7f\xba\x25\x36\xdc\xe1\xc6\xfe\x5d\x89\x4a\x5c\x28\x1d\x79\xd4\x3f\xbb\xa6\xed\xd1\x93\x51\x1a\x74\x3c\x60\xaa\x74\x2c\x55\xbd\x13\x98\x74\x97\xbb\xa0\x3a\x74\xd1\xe0\x40\xf0\xe1\x8a\xee\xa0\xb1\x64\x1c\x02\x6d\x17\x2e\xbc\xca\x61\xd1\x62\xb7\x38\x67\x6d\x78\xcc\xd6\x67\xad\x79\x7e\xed\x8a\x7c\x84\x39\x6a\x9d\x04\xec\x4b\x17\xc1\x85\x2c\xb8\xd9\xe9\xc9\x57\x79\xef\xd9\x7f\x70\x4d\x03\x4e\x1f\x5f\x2e\xaa\x30\x39\xa4\xa5\xbe\x91\xaa\x32\x90\xd9\x1a\xc6\x48\xd1\x44\x63\x79\x13\x62\xf8\x21\x60\x41\xef\x7a\x47\xf7\xe5\xae\xed\x20\xc3\x19\xec\x5e\x93\xf1\xba\xc8\xb9\x9e\x6f\x9c\x2e\xd6\x69\x85\x67\x61\x54\x4f\x1d\xe2\x32\x61\xef\x72\xdf\x69\x26\x45\x96\x7a\x96\x31\xe0\xcd\x2d\xd3\x18\xf6\x41\xce\x76\x59\x95\x15\xa4\x1b\x87\x82\xbb\x46\xde\x44\xc3\xc5\x9a\x8c\x63\xe1\x73\x39\x44\xb3\xbe\x02\x68\x50\x28\x26\xba\x2b\xec\x2b\x18\x07\x27\xac\x23\x71\x48\x5a\x8e\x62\x74\x6c\x69\x97\x1b\xe4\x21\x0e\xab\x97\xe9\x06\xa2\xb0\x87\xed\xfc\x29\x86\x02\x48\x63\xf5\x77\x00\x30\xfc\x1e\x55\x8e\x6f\x78\xb1\x05\x98\x45\xbf\x6c\xdc\x9b\x11\xda\xa9\x0c\x65\x0e\x4a\x4a\xf2\xce\x5b\xf2\xc2\x95\x18\x85\x92\x2b\xf6\x30\xfb\xc6\xfd\x49\xac\xd8\xb5\x18\x94\xa2\xc3\x59\xf8\xb6\xd6\x44\xb7\xee\x73\x51\xa7\x9f\xaa\x17\x1c\xb5\x87\xe4\xfd\xe6\x9a\xda\xaa\x29\x7b\x0c\x9a\x43\xa6\xb8\xa7\xe2\xb9\x75\xa8\x2f\x65\x26\xb6\xbe\xe1\xfa\xa3\xbe\xcb\x2d\x95\x95\x2a\xaf\xb1\x38\xb3\x2b\x85\x70\x23\xad\xbc\x5e\x2e\x36\xa6\x62\xe6\xe5\xa2\x7b\x59\xf0\x6b\xf7\x01\xf2\x72\xe1\x8e\x33\x53\x49\x1d\xde\x16\xae\xa6\x93\xd2\x65\x3f\x67\xb9\xf5\x39\xd2\x19\x36\xa2\x2b\x97\x82\xe7\xe0\xfd\xac\xa6\x90\x37\x2a\xc4\xcc\xf8\xd5\xa7\x46\xcb\x89\x7b\x77\x91\x00\x31\xd7\x84\x70\x10\xbc\x65\x07\x12\x7b\xc0\xcb\x6d\xcc\x84\x32\x73\xe4\xbd\x59\x30\xc5\x85\x41\x78\xda\x1e\x97\x14\xbc\xa2\xdd\x61\xf0\xf6\x3e\xef\xff\xc2\x87\x12\x83\xa7\x0f\x24\x82\xf8\x93\xc5\x0b\x03\xc8\x5b\x20\x69\xe6\x7b\xef\xda\x96\x0e\x21\xb9\x87\x90\xdc\x43\x48\xee\x21\x24\xf7\xcf\x15\x92\xbb\xa6\x36\xc0\xf7\xbe\x02\xb0\x33\xb7\x38\xe1\xbd\x66\x5b\xfc\xe7\x63\x8c\xee\x59\xa8\x2c\x75\x4e\xad\x94\x42\xc3\xb2\xd8\xea\x76\x40\x3d\x71\xd4\x01\x8b\xc6\xac\x66\xc1\x35\x39\x63\x66\x59\x98\xb6\x87\x70\xfa\xde\xaa\xb4\xae\x35\xc2\x19\xd4\x7a\x1c\xe2\x68\x0f\x71\xb4\x0f\x2e\x8e\xf6\xe9\x21\x8e\xf6\x10\x47\x7b\x88\xa3\xfd\xdc\x71\xb4\x87\xe8\xbf\x3f\x7d\xf4\x9f\x97\x3b\x63\xaa\x65\x68\x41\x16\xa7\xd6\x26\xbb\x2f\x10\x1f\xb5\xcb\x02\x63\xd9\x6f\x33\x61\xe7\x2a\x45\x1b\x79\xb2\x50\xca\xb8\x14\x80\xae\x67\x4a\x6a\xd6\x86\x03\x0d\x8d\x6c\x19\x29\x92\x10\x00\x67\x71\x63\x54\x22\x21\xa6\xa8\x9e\x08\x2a\x00\xe3\x24\x54\xab\x30\xff\xaa\xf4\x61\xc8\x3c\x5f\xb5\xfa\x86\xbb\x70\x79\xc2\xed\x31\x5e\x8d\xe8\x20\x83\x2a\xfc\x23\xb7\x12\xe0\x94\x5d\x01\xba\xbd\xb9\x54\xb5\x88\x21\x9d\xfb\x66\xe7\xb5\x66\xe0\xe6\x46\x2f\xb6\xcf\x16\x29\xb9\x45\xb9\x9a\x6d\x99\x83\x3b\x0d\xe8\x0e\xf8\x8e\xda\xa8\x43\xac\xe3\x9d\x63\x1d\x0f\x41\x8c\x87\x20\xc6\x2f\x24\x88\xf1\x10\x81\x77\x88\xc0\x3b\x44\xe0\x1d\x22\xf0\x1e\x68\x04\x5e\x0f\x4b\x33\x94\xff\xa0\xfe\xa4\x57\xeb\xf0\xf6\x03\x5c\x65\x0e\x29\x98\x7a\xb9\xf9\x43\x0a\xa6\x3f\x41\x0a\x26\x08\xe1\x60\xb5\xdf\x69\x64\x05\xe3\x3a\x3c\xa7\xee\x47\x61\xb1\x16\x87\x35\x5e\x49\xc7\x83\x02\xd7\x9f\x65\x0d\x2b\xc2\xbd\xa1\xd2\xdc\x25\xe3\x4f\x48\xef\x9a\x8a\xc5\x40\x34\x87\xfb\x97\xc6\xa3\x10\x7b\x40\xcd\x91\xa0\x2e\x00\x70\xb1\x24\x7b\x37\x52\xfd\x98\x66\xaa\x9f\x20\xe2\xc5\x39\xa8\xb7\x85\xf7\x60\xb2\xdd\xf9\xb1\x3d\xbd\x4b\x02\x9e\xfa\x74\x87\xe3\xef\x43\x04\xf5\x17\x1d\x41\xfd\xf4\x10\x41\x7d\x88\xa0\xfe\x63\x47\x50\x3f\x3d\x44\x50\xff\x59\x23\xa8\x9f\x1e\x22\xa8\xf7\xa8\xee\xff\x04\x11\xd4\x4f\xb7\x8d\xa0\x7e\x7a\x88\xa0\x3e\x44\x50\x1f\x22\xa8\xef\xf7\xa4\xbf\xf0\x08\xea\xa7\x7f\xb8\x08\xea\xf6\x8e\xbe\xa4\x08\xea\xf6\xda\x1f\x76\x10\x72\x77\xb5\x7f\x90\x20\xe4\xee\xc6\xfa\xbc\xba\xa8\x65\x60\x10\x3b\x5d\x81\x49\x94\x7d\xd9\xbb\x5c\xe2\x17\x1a\x27\xfd\xf4\x8b\x8a\x93\x7e\xfa\x07\x8a\x93\x7e\xfa\x87\x8b\x93\x7e\xba\x8b\x38\xe9\xa7\xfd\x71\xd2\x99\x28\xeb\xce\x53\x51\x52\x3e\xec\x4c\x94\xa7\xb9\xca\x57\x4b\x55\x99\xd3\xca\x32\x9c\xa5\x4c\x22\x9e\x21\xeb\xb9\xaf\x5e\x51\xc9\x4b\xd5\x59\xa6\x6e\xad\x04\x43\x53\x85\x9e\xc9\x3e\x0a\x23\xb3\x02\x39\xc6\x48\xb8\xaa\xbc\x01\x16\x02\xb6\xc1\x1d\x7d\x60\x80\xe7\x8d\x55\xb3\xa5\x28\x17\x2a\x45\x3e\x1c\x3c\xd6\x52\xcb\x3e\x75\x27\x9e\xb0\xd3\xee\x62\x50\xaf\x02\xd5\xd7\x9d\x7e\xc3\xac\x4c\x29\x96\xcf\xfd\x00\x18\x20\xc4\x19\x94\x25\x65\xad\x5e\x55\x1e\xac\xa6\x21\xe8\x7a\x57\x8b\x21\x2a\xbc\x35\x77\x75\xe7\x2b\xf2\x1b\xe8\x5e\x52\x7d\x38\x24\xc5\x9b\x3a\xdc\x45\x8b\xcc\xe9\xca\xeb\x6e\xcd\x23\x1f\x00\xf5\x99\x28\x6b\x70\x1f\x04\x7c\xa0\x69\x9d\x2e\x94\x8a\x58\xdf\xa9\x61\xfd\x6a\x5d\xa7\xa9\xe0\x1a\x3c\x17\xae\xed\x03\xdf\xdd\xc2\x7f\xc1\xf1\xbb\xcb\xfe\xf8\xec\xf8\xdb\xee\x9a\xed\xaf\xeb\x17\x8c\x3d\x28\xf0\xc8\xde\xdb\x0c\x23\x3a\x76\xb8\xe6\xff\x79\x76\xfc\x6d\x7b\xc1\x1b\x50\xcd\xf6\x68\x63\x20\x24\xc7\xcf\x6f\xe0\xc7\x91\x8d\x0c\x47\x77\x55\xb9\x50\x3a\x28\x5e\x3b\xf4\x05\x2d\x55\x1a\xa1\x2f\xf6\x57\x67\x71\xe2\xe1\xd0\x6c\x49\xf4\x9b\x17\x45\xb6\x42\xd7\x99\xf5\x38\xaf\x53\x21\xf7\x14\xbc\xd2\x4f\x2d\xee\x04\xac\x43\x67\x36\x71\xff\xc0\x29\x2a\x43\x2a\xd9\x8b\x0a\x16\x7e\x0a\x3c\xfd\x7b\x71\x23\xc5\x2d\x3b\x3d\x7f\x85\x2a\xa7\xd2\x8a\x40\x79\x6b\x8d\x3d\xa5\xcd\xef\xf3\xee\xdc\xd2\x3a\xf3\xec\xe4\xa9\xd5\x17\x77\x77\xc0\x8d\x0e\x37\x18\x7c\xb6\xf2\x9e\x6c\xf7\xaf\x8f\xae\x1b\xb6\xe2\x02\x3c\xe8\xbb\x8d\x1a\x0f\xde\x17\x57\xc2\x7b\x83\x49\x5a\x53\x84\xc1\x23\xec\x91\xc1\x1f\x28\x6a\xc4\xdb\x72\x7d\xf4\x9b\x79\x3c\x61\x2f\x56\x39\x5f\xca\xc4\x0f\x40\x26\xa2\x47\xf6\x84\x1e\x3f\x67\xaf\x66\x2c\xc5\x1e\x10\x30\x0f\x61\x46\xe8\xd7\x20\x0d\x86\xd4\x8f\x7d\x45\x75\xb2\xfc\x94\x10\xd7\x94\x4a\xa3\xab\xa2\x0c\x7d\x17\xb1\xd9\x4e\xce\x93\xb2\x36\xc0\xfe\xd4\x7a\x33\x2f\x50\xbd\xf4\x9c\x5d\x8d\x68\xe5\xb1\x4a\xe1\xe3\x11\x30\x20\x22\xfd\x90\x1b\x3e\x13\x17\x2b\x93\x94\xb1\x8a\xf2\xa7\x10\x4b\xc7\x99\x11\x05\xd7\x00\xd1\xb7\x0b\x59\x0a\xc7\x34\x56\xf0\xb5\x25\xf6\xf6\x73\xa6\x34\xfd\x93\x15\x10\xf3\x91\x1b\xf6\x48\xa0\x2a\x40\xe6\xec\xeb\xc7\x13\xf6\x21\xfc\x00\x59\x06\x7c\xd9\xd7\x42\xe7\x22\x9b\x98\xc5\xf2\xeb\xb1\xfb\x63\x69\xe6\xf5\x1f\x46\x2c\xc7\x6c\x66\x26\x4b\x94\x52\xbe\x46\xb6\x23\x17\xe5\xe4\x6b\xa7\x93\x70\xcb\x00\xe6\xc8\x79\x4e\xa1\x4b\xa4\xe5\x95\x68\xc7\x96\x55\x22\x1d\xdc\x84\xb1\x97\x4a\x33\xe1\x22\x4f\xae\x46\xe1\xcc\x76\x6c\x59\xdc\x7c\x33\xd1\xaa\x2a\xc5\x64\x29\xf3\x7f\x14\xcb\xb2\xba\x1a\xd5\x67\xfc\xeb\x6f\x5b\xd4\xba\x3f\x54\x63\xde\x79\xe8\x37\xef\x70\x7f\xad\x97\xdf\x64\x85\x6b\xfb\xc4\x42\xdd\x76\xa8\x0f\xbd\xa4\xaf\x7c\x28\x19\x78\xb9\x84\xec\xeb\xc3\x7d\xee\xe6\xf9\x55\xce\x6a\x86\x14\xfe\x62\x4e\xd3\xfe\x9c\xcd\x78\x66\x84\xfd\x8d\x28\x56\xbb\xbd\xd4\x95\xc0\x9f\x12\x9e\x2c\xc4\xe5\xe5\x6b\xfb\x18\x9e\x2e\x01\x75\xdc\x83\x97\xed\xf0\x82\xbc\xcd\x6b\x74\xef\xab\xe6\x17\xee\x78\x5d\x76\x80\x87\x7f\x57\x96\x53\x79\xee\x98\x83\xee\xd5\xc0\x3d\x9c\xfa\xdd\xd0\x8d\x3c\x5b\x5e\x8d\x82\xf6\x0f\x39\x6f\xf7\xf8\xeb\xb1\xd9\xc1\xa5\x05\x5c\xc5\x78\x94\x00\x9a\x7e\xa1\xe5\x4d\x4c\x15\x98\xc2\xef\x78\x04\x21\x0f\x87\x4c\x98\x62\x4b\x9e\xcb\xa2\xb2\xf8\x85\x25\x84\xef\xc9\x6d\x74\xa1\x4c\xc9\x1e\xe1\x8f\x33\x47\x3c\x4a\xb1\x4c\x1f\x6f\xba\xbb\x4b\x7f\x47\x0e\xc3\x35\xe3\x78\xe1\x0a\x54\x55\x32\xce\x66\x15\xc5\x5e\x32\x2d\xa6\x4a\x95\xce\xf7\xc1\x92\x21\x03\xf4\xfd\x5a\x88\x22\x8c\xd0\xf2\xd6\x44\x5e\x67\x04\xca\x88\x35\x69\x90\x57\xb7\xf2\x38\x7d\xc5\xd6\xf7\x4a\x45\x54\x78\x75\x9b\xe3\x49\xb4\xfd\x37\xfe\xec\x72\x27\x58\x7e\x03\x23\xd0\x9c\x3f\xec\x82\xe7\x69\xe6\x4a\xaf\x09\xc7\x3a\x09\x08\x1c\x45\x0f\x89\x9c\x71\x36\xb5\xfb\x12\xb3\x99\xd2\x25\x9b\x72\x23\xcd\x46\x2e\xe5\x61\x1c\xe7\xba\x63\x34\xe7\x42\xff\xfc\xee\xa2\xcf\xf2\xcc\x7e\x56\x17\x14\x6d\x79\x86\x67\xb8\x90\x42\x5b\xca\xb2\x7a\xce\x4a\x55\xb0\xcc\x92\x1b\x0f\x7f\xf6\x64\xed\x17\x67\x19\x37\x16\x4a\x4f\x73\xd0\xc7\xb0\xef\x2a\x6d\x4a\x18\xcf\xd2\xbd\xef\x84\x29\xbf\xc7\x63\x04\x7d\xa9\x45\x2f\x53\xad\xaa\xf9\xa2\x64\x55\x51\xa7\x18\x93\x41\xd4\x4e\x3d\x97\x1d\x1f\xe7\xfb\x22\x8e\xdf\x12\x80\x68\x18\x0c\x85\xaa\xbe\x78\x1b\x39\xfc\xba\xad\xa9\x4a\xac\x19\x6c\x51\xb3\xd8\x2e\x9c\xd7\xf6\x76\x08\xf1\xd5\xcc\x4a\x4c\x63\x8f\x33\xc0\xdd\xc3\xbb\xcc\xc0\x9d\x78\x20\x37\xee\x5d\x20\x82\x56\x38\x92\xe5\x0e\xb2\x0a\x5d\xc1\x73\x53\x0a\x9e\x3a\x23\x82\xc5\x2e\x5f\x99\x60\xba\xcd\xef\x60\x7b\x92\x90\x2c\x78\x3e\x77\x41\x3d\x60\xe1\x2e\xf9\xb5\xa0\x08\x1b\xfb\x1c\x31\x82\xd2\xa9\xdd\x66\x25\x65\xa5\xc3\x9b\x9d\xb0\x17\x9a\x5c\x44\x5c\x14\x30\xaa\x53\x2d\xd3\x64\xc5\x38\x6f\x61\x80\x79\x9a\x4b\x09\x2e\x2f\x97\xd9\x56\x6c\xa8\xbb\x37\xb5\xe4\x32\x42\x84\x1b\xcd\x0e\x41\xd9\x73\x4c\xf1\x17\xbc\x51\x69\xea\x10\xf3\xad\xef\x91\x42\xd8\x61\x14\x1a\x35\xe2\x87\x4c\x57\x48\x9d\xb1\xdf\xe6\x5b\x7c\xb1\xfe\x0a\x5d\x25\xff\xe0\x94\xc7\xf6\x71\xc8\x50\x93\x7f\x2d\x0a\x4b\xd0\x99\x59\xe5\x49\x4d\xcf\x03\x9b\x74\xbd\xf7\xcd\x18\xcc\xa5\xe0\x3a\xcd\xd3\x0b\x91\x68\x51\x9e\x01\xd4\xbc\x10\x25\x06\x31\x5c\x94\x56\xb2\x9a\x47\x92\x56\x9e\x0d\xfd\x14\xdf\x1f\x6a\x5e\x72\xaa\xdb\x19\x24\x52\x83\x3c\x6e\xf0\xbd\x25\xc7\x7c\xee\x92\x9e\x50\xb0\x5c\x63\x13\xbf\xf0\x32\x59\xf4\xee\x04\xef\xf0\xb5\x9a\xbf\xe1\x1f\x5f\xc6\x63\x8e\xdf\x50\x38\x59\x5e\x2d\xa7\x02\xca\xa5\xd5\x84\x2a\x53\x98\x53\xa8\xb6\x7d\xa3\x1b\x14\x46\xe7\xa2\x2f\x89\xef\xbd\x87\xf7\x6a\x05\x40\x8d\x31\xc9\xc0\xcb\x25\xdc\x62\x94\x60\x55\xe8\xcd\x65\x27\x13\xe1\x0b\x7b\x36\x2c\x18\xbf\x75\x40\x17\xf2\x3f\x11\xfd\xd8\x29\xfb\x77\xc5\xf3\x52\x96\xab\x86\xa0\xe7\xa2\xf0\x1a\x79\x02\x3a\x07\xd7\x0a\xbf\x53\x25\xa6\x2d\x69\x49\xb1\xcf\xde\xc8\xab\x91\x65\xa8\xae\x46\x4f\x9f\xfd\xed\x27\x79\x35\xda\x9f\xa6\xa2\xd4\x72\x3e\xa7\x15\xc2\x7a\xc0\x31\x33\x00\xa8\x93\x63\xbb\x9a\x3e\x78\x12\x79\x79\x09\xbf\x77\xb0\x50\xdd\x68\xb7\x1a\xfe\x09\xb1\x50\x24\x0c\x18\x8a\x17\xa9\xb3\x49\xed\x6d\xa7\x72\x59\xf0\x04\x99\x5c\x8a\x1c\x8d\xe9\x8f\xa2\xb9\x87\x4e\xcf\x5f\x85\x44\x2f\xfc\x24\x53\x96\x4a\xc2\x4d\x87\xb2\x43\xfd\x05\x4b\x2b\xd4\x9a\x12\xb5\xf1\x5e\xfa\xb4\x56\x00\x14\x6c\x49\x7c\x42\x1b\x2d\xac\xc0\x4f\xf9\x32\xd3\xd6\x81\x44\x98\x2f\x72\x3a\xb7\x67\xff\xe4\x26\x4f\x27\xb5\x4b\xdb\xa4\xd0\xaa\x54\xd3\x6a\xd6\x73\x87\x45\x75\xf6\xf2\xe2\xe7\x4a\x95\x11\x8d\x5f\xd0\xe8\xa3\x7f\xcf\xce\x3f\xb0\xb3\x97\x17\xec\xdf\xf4\xeb\x4c\xe9\x44\x2c\xdd\xf3\x0f\xc9\x04\x18\x57\x29\x20\xc6\x7e\x95\xc9\xa5\x2c\xf7\x41\xc5\xd1\xf3\x2a\x40\x0b\x5a\xa4\x55\x42\x04\xd9\x72\x84\x18\x26\x3c\x84\x5b\xaa\x37\xdc\x17\x4c\x77\x76\xfe\xa1\xd9\xc5\x51\xd8\xe6\xc1\x14\xd8\x46\x7a\x98\xa4\xa8\x26\xc9\xcc\xfc\x03\x7f\xfd\x47\xb5\x8f\x53\xc0\xe3\x05\x8f\xba\xd6\x4d\x00\x39\xd7\xc2\x54\x19\x10\xc5\x54\xce\x66\x42\x83\x55\x86\x96\x85\x4b\x76\xca\x6f\x12\x58\xe0\x2b\x87\x1d\x02\x59\x45\x98\x92\xeb\xd2\x4b\x81\x70\xc8\xe8\x2c\xad\x45\xed\x2e\xdd\x42\x21\xc7\xcb\xcd\x62\xed\xf0\x58\xd6\xa4\xa8\xde\x20\x1d\x3c\xef\x49\x17\x7d\x76\xfe\xa1\xd1\x23\x16\x42\x43\xb9\x40\x29\x0d\x33\x18\x68\xa5\x16\xfe\x32\xe9\x7b\x97\x2d\x8e\xcd\x2d\x46\x40\x02\xe3\x3d\x20\xbf\x00\xc9\xe0\x6a\x94\xab\x5c\xf4\x3e\x7e\xda\xe5\x7b\x7b\x75\x89\xcc\xc4\x1a\xb0\x67\xee\x44\x34\x75\x96\xa8\xe6\x41\xa0\xde\xcb\x01\x6e\xff\x0a\xcc\x42\xe9\x52\x78\x9e\x9c\x9e\x21\xf2\x0a\x5a\xaf\x18\x0f\x13\x26\x11\x49\x68\xc1\xea\x2e\x21\xf5\x93\x67\x13\x7c\x21\xa6\xd5\xdc\x8a\x1a\x3f\x82\xb2\x41\x1b\x9f\x55\x70\xf7\x67\x0d\x33\x36\xb8\xb1\x01\x27\x0c\xaa\xcc\x0d\x99\x17\xb5\xca\x32\xa1\x4f\xcb\x92\x27\x8b\x17\xc2\xfe\xef\xba\xe3\xea\xf6\xf6\x27\x06\x94\x18\x1a\x9e\x50\x4b\xe2\x3f\x20\xe5\x16\x9f\x0b\xc6\xa1\x8b\x25\x62\x4f\x52\xe1\xfe\x69\xd1\xc4\x8d\xca\xaa\xa5\x08\xe3\xde\x1c\xf1\xb6\x4f\x75\x1c\xc6\x56\x18\x2f\x3d\x81\xd7\x73\x9d\xf1\x82\xe7\x2b\x9a\x80\x06\xaf\xb3\x95\x9a\x3d\x49\xb4\x90\xa7\x93\x84\x08\x52\x72\xa2\x60\x6a\x0a\xdb\xd9\xe5\x2b\xc3\xdd\xd1\x21\xe0\x96\xc1\x01\x48\xde\x10\x5a\x47\x5a\xea\xe8\x86\x3b\x0c\x2d\x66\x14\xdd\x0b\x66\x58\xbb\x23\x39\x6b\x48\xc0\x16\xcb\xa5\x56\x34\x16\x29\x2b\xb4\x54\xda\x49\x84\x88\xf7\xf0\xdc\xe4\x0c\xa5\xeb\x66\x52\x20\xea\x48\x54\x05\xf3\xb7\x2e\x84\x9b\x3b\xe4\x6b\xc0\x38\xe1\x2e\xf3\x08\x37\x91\x1e\xe1\x49\x1f\xd1\xba\x80\x9f\xf2\x29\x3e\x1c\xd6\x25\xfd\x1b\x9d\x39\x24\x0d\x9c\x8b\x5c\x68\x9e\x8d\x89\x31\xaf\xb1\x6e\x26\xf8\x8d\x08\xd1\x2e\x58\x15\x03\xd4\xbb\xad\x42\xa6\xe7\x99\xf6\x01\x78\xf7\x3d\x3b\xd8\x26\xee\xd2\x65\x4b\x44\x9d\x8a\xe5\xe2\x31\xd7\x3a\x9c\x31\x2e\xce\xe5\x54\x09\x45\x39\x6c\x07\xe3\x60\x9e\x9a\x31\x85\x13\x38\xb4\x69\xa1\x77\x4c\x50\x3b\xb6\x83\x92\x97\x50\xa1\x74\x39\x53\xfa\x96\xeb\xd4\xa1\xf5\x4f\xc2\xd0\xed\xc0\x9c\xba\xe6\x42\x80\x85\x7d\xab\x52\x71\x9a\x41\xfa\x78\x7b\xbe\xdd\xfb\xb8\xf4\x49\xea\x9a\xe9\x76\x6f\xb8\x96\xaa\x32\xcc\x0e\xc0\x82\x11\x42\xde\x98\x96\xeb\x16\x97\x0b\x91\x82\xb0\x4a\x98\x92\x38\x2e\x18\xdc\xde\x5e\x51\x86\xea\x38\x0c\xdb\x37\x13\x76\x0a\x4d\x30\x36\xfd\x06\x8f\xe7\x9f\x96\xc0\xff\x73\xcc\xfe\x59\xa8\xd4\xd8\xff\x47\x35\xfc\x91\x73\xf1\xfb\x27\xbb\xaa\x8e\x8f\x9f\xfe\x8d\xfd\x13\x5c\xed\xfc\xcf\x20\xca\xe0\xc7\xad\x98\xe9\x5c\x31\x74\x45\x73\xd3\xd8\x3b\x08\x03\xa3\x2d\xb1\x9f\x21\x0a\xfd\xb5\xbd\xef\xdf\x1e\x6d\x63\x46\x34\x72\x9e\x1f\x15\x5a\x15\xca\xf0\xcc\x3c\xb1\xef\x1e\xfe\xe7\x88\xd7\x23\x4e\x96\xe9\x63\x96\xaa\xa4\x4e\x99\x28\x73\x14\xde\x51\x56\xdd\x35\xf8\x41\xc9\x78\x24\xbc\xc1\x0d\x06\x82\x05\xbc\x7f\x27\x57\x84\x49\x00\x27\xec\x34\x03\x0b\x2c\xa6\xe7\x19\x83\x4a\x6c\x9b\x81\x02\x00\x47\x04\x7e\x2b\xb4\xa0\x64\x0a\x4b\x44\x86\x3c\x77\xca\x2c\x74\xe0\xe4\x4b\x55\x21\xb5\xf2\xa6\xd6\xff\x83\x29\x1c\x50\xa1\x30\xa6\xd9\xed\x10\x0d\x00\x08\x34\x28\x74\x74\x00\x93\xef\xde\xbd\xb1\xb8\x59\x92\x09\xa8\x67\x56\x3f\x17\x22\x86\x7a\x8a\x16\xf0\x05\x93\x60\x0b\x4b\xb9\x58\xaa\x3c\x9c\x0a\x22\x70\x6c\x8f\x4d\x73\x05\xcf\xf9\xd7\xab\x91\x05\xf7\xab\xd1\x76\x16\x7c\x08\x74\x00\x3b\x41\x04\xe1\xfa\xb6\x20\xbd\x60\x43\xa7\xc3\xd9\x14\x9a\xd5\x8c\x61\xc4\x04\x68\x86\xed\x0b\x19\xb3\x52\x2c\x0b\xa5\xb9\x96\xd9\xca\x39\x87\xb6\xfa\x00\xef\x0b\xdf\x7b\x26\x02\x54\x6c\x63\x7b\xd5\x99\x05\x04\x09\x32\x40\xc9\xc4\xc7\x44\x08\x04\x1c\x3b\x84\x65\xce\x75\xfa\xf3\xf9\xc5\x84\xbd\xf3\xf1\xd6\x72\xd6\x6a\x84\x57\xfe\x57\xc1\x8e\xf7\xae\x41\x31\x09\x77\xb9\xb7\x2c\x2d\x0d\x94\xdb\x22\x80\xc6\x52\xf3\xd9\x4c\x26\x96\x4b\xb5\xb0\x0e\x64\xb7\x75\x22\xc1\x7d\x9e\x1c\x0f\x53\xd1\x35\xf7\xdc\x73\x89\xf5\x99\xb4\x2e\xb2\x7d\x23\x85\xd0\xcc\x40\xa2\x47\x40\x86\x98\x79\x54\x13\x0f\x83\x12\xb5\x7b\xbb\xfb\x10\x56\xf6\x7f\xac\x03\x15\x9f\xe2\x46\x82\x3e\xfa\x47\xae\x23\xb2\xdf\x1b\x0e\x09\xca\x2c\xaa\xe6\x19\x7a\xe6\x58\x10\x26\x35\xa8\x74\xda\x60\xa7\x0d\x5d\x58\xee\xc0\x8d\xc8\xca\x85\x16\x66\xa1\xb2\xd4\xb4\xd4\x9c\xff\x7b\x35\x5a\x8a\xa5\xd2\xab\x09\x25\x73\xcb\xc4\xd5\x08\x4d\xe0\xa0\x71\xfc\x7d\xc2\x2e\x15\x13\x1f\x8b\x4c\x26\xb2\xcc\x56\x8e\xd1\x1e\x83\x0b\x3e\xe3\xec\xf8\x2f\x4c\x69\x76\x72\x7c\xfc\x97\x7a\x12\xe0\x60\xf3\x20\x92\xdc\xe1\x8e\xfd\x2b\x50\x7d\xf4\xd4\xb9\xaa\xb7\x1f\xdc\x05\x38\x0d\xb4\x36\xfc\x9c\xa1\x76\xc4\xee\xd7\xb6\x5b\x1a\x32\x33\x9d\xf6\xbf\x34\x5a\x25\x84\x24\xbc\xd4\x02\x75\xc5\xd4\x28\x97\x7c\xde\xfa\xf6\x6a\x74\x62\x5b\x23\x8e\x77\xce\x52\xc3\xb3\xf3\x86\x0b\x5e\x0c\x61\xe2\x46\xde\xf0\x8f\xe7\x2a\xfd\x41\xf3\xa4\x57\x45\xe0\x0c\x07\xce\x4f\x6b\x6e\x3b\x3b\x09\xfc\x91\xcc\xe9\xa5\x99\xc7\x8d\xea\x02\xe8\xc6\xc9\x1b\x71\x2d\x24\xa8\x90\xda\xd4\xa8\x59\x19\x81\x27\x52\x3a\x2d\x85\x4b\x8d\x87\xfc\x79\x98\x1d\x2f\xe1\x14\x8d\x78\x0e\x59\x4e\x2e\xdd\x54\x2a\x0f\x36\xe2\x52\xca\xe2\xe7\x94\x7a\xab\x31\xa7\x99\xb0\xb7\xaa\x14\xcf\xd9\x0b\xd4\xe4\x4a\x63\x2a\xc1\xfe\xeb\x6f\xdf\x3c\xa3\x5c\xc5\x6c\x2a\x16\xfc\xc6\xca\x39\x0b\x6e\x80\x4a\x58\xf9\x4b\xe8\x86\xe0\x90\x54\x5a\x8b\xdc\x02\xf2\xbf\x2a\x4b\x43\x6e\x84\xd6\x32\x25\x26\xb2\x71\x56\xb1\x35\x8c\x9d\x40\xc7\x73\xcb\xab\x6b\x48\x2e\xd7\xf9\x12\x44\xcf\x5b\xca\x40\x01\xb1\xb5\x75\x54\x22\x1e\x12\x2c\x8d\xa2\xf2\x67\xf2\xa3\x0b\xfa\x98\x55\xa0\xa2\xd1\x02\xb2\xd6\xed\xd9\x72\x93\x0a\x5c\xbf\x69\xa3\x36\xb9\x14\x28\x13\xc2\x0a\x21\x76\xa1\x54\xb8\x43\x8c\xe8\x4b\x2c\xd3\xce\x2a\x9f\x57\x12\x41\xe0\x5a\x42\xfc\x2f\x1d\x5b\x0b\x60\x02\x64\x38\x98\xc4\x10\xc8\xcb\xdc\xc2\xf3\x7b\x91\x64\x5c\x2e\xef\x8d\x16\x97\x38\x1c\xd3\x38\x9e\x71\x37\x8a\x83\x4e\xf1\x36\x5d\xa7\xfa\x50\x38\x9b\xcb\x1b\x0c\xa4\x72\x69\xf5\x45\xd3\x50\x4b\x03\xe2\x73\x22\x89\xc2\xa7\x21\xaf\x1f\x0e\x32\x19\xc4\xe0\x1a\x5f\xb9\x0b\xfd\x20\x0a\x2d\x8c\x81\xd4\x22\x6d\x1c\xdd\xc1\x2b\x88\xa4\x9f\xfe\x60\x51\xf4\xde\x90\x2a\x19\x44\x16\xea\x96\xdd\x8a\x2c\xab\x77\x61\xe1\x9f\xb4\x36\x7e\x17\xf5\xe2\xe3\x26\xf5\x7b\xa0\xbd\x73\x1a\xfa\x52\xf3\x1c\x53\xdf\xf5\x61\xbf\x17\xa1\xdb\x33\xde\x6c\x78\x53\x0b\xf4\xd5\xa4\xdc\x7a\xa8\xd7\xf0\x63\xba\xb0\x62\x74\x02\xf5\x7b\x75\xfb\xb2\x47\x84\x0b\xff\x04\x26\x55\xf7\x38\xfb\x85\x1c\xc2\xdb\x81\xbe\xc7\xe2\x32\x2b\xe1\x41\xd4\x7f\x43\x9b\xfa\x6c\xb3\x0b\xe2\x16\xca\x54\x3a\x98\x0b\x35\x8b\xb0\xef\x5b\x3e\xc7\x1e\xaa\x72\x07\x2e\xe5\xf3\x30\x16\xb5\x73\xaf\x33\x2b\x2e\xc0\x53\xc3\xab\x1f\xb4\x28\x94\x0e\xd4\x5d\x28\x9f\xee\xfc\x85\xd8\xcb\xd8\xc0\x16\x6c\x75\x2f\x21\x3d\x0b\x52\x11\x36\xaf\x0b\x07\x1b\x7e\x55\xe6\x33\x5e\xd4\x0e\xcf\x7c\xc6\x65\x76\x71\xcb\x8b\x77\x11\xaf\x9f\xba\x8d\x95\x22\xcb\x4c\xdb\xae\x6d\xdb\xc1\x75\xa7\xe4\xba\xb4\xd2\xa3\xb9\xc5\x92\x7d\x3e\x97\x5f\x1e\x82\xc9\xce\xed\x32\x3e\x99\x3c\x48\xbf\xda\xd5\xc6\x42\xd5\x40\xdb\x06\xaf\xb9\x59\x1c\x65\x4a\x15\x91\x85\x0e\xd1\xe9\x91\x6e\xf2\x07\x5e\xc6\x3c\x5c\xc2\x56\xf2\xbc\x41\x18\x75\x96\x2a\x0f\xa4\x76\x48\x13\x18\x3b\x44\x90\xf1\x90\x41\x80\xea\x13\xf1\xd1\xc2\xea\x52\xe4\x25\xcf\x02\x9d\x68\x60\xfa\x5b\xaa\x94\x92\xea\x48\x91\x88\xa5\xe0\x19\xf2\x8c\x95\xcc\xca\x23\x48\x0c\x12\x54\x11\xa0\x3a\x38\x57\x61\xec\x0e\x2a\xbc\x21\x8f\x94\x9b\x00\x7e\xff\x87\x9f\x6e\xae\x76\xef\x22\x22\x58\xaa\x12\x48\xee\xd5\x0c\xe7\x71\x93\xb2\x95\xaa\x40\xff\xe8\xcd\x40\xfe\x6c\xc0\x27\xe9\x17\xe0\x37\x6e\x6d\x7b\xa2\x2a\x6d\x29\xb6\x3b\x5f\x88\x1e\xb0\xa0\x4e\x1e\xc6\xd7\xe0\x10\x53\x28\x83\xb6\x89\x52\x35\x16\x4a\x27\x1f\xd8\x5a\xfc\x1a\xc6\xcc\xa8\xa5\xf0\x6e\x7c\xa8\x59\xc3\xe4\xda\x81\x2d\xd5\xb8\x4a\x98\xcb\x60\xf5\x61\xdf\x84\x6b\xcb\x60\xb2\x44\x29\x9d\x92\x84\x80\xf1\x6d\xa5\x56\xdc\x49\x13\x34\xf9\x7d\xdf\x73\x1d\x38\x8b\x35\x2b\xcf\x16\x22\xb9\x7e\x09\x0e\x31\x79\xcc\x94\xdd\xed\xd3\x49\xe2\xeb\x92\xf5\x42\x19\xa8\x20\x4f\x2b\x3a\x45\xd9\x8b\xcb\xc5\x2d\x4b\x79\xc9\xf7\x6e\x70\xf5\x6b\xea\x7f\xdd\x5a\x64\x8a\x3b\xdb\xc4\x85\x85\xae\x04\x30\x66\x23\x7a\x8c\x14\x8f\x33\xdc\x73\x99\xad\x1c\xbb\x6c\xef\x8d\xa2\x9a\x7d\xed\xbe\x0d\x26\xdd\xa7\x3b\x35\xe9\x2e\xb8\xd4\x85\xcc\xdf\x44\x83\x27\x83\xc6\x56\xf8\x43\xc3\x38\xe1\xc3\x7a\xc8\xc3\xb2\xe9\x2c\x36\xd5\x32\x9d\xa3\x89\x8e\xc6\x63\x05\x4f\xae\x05\x16\xcf\x2a\x83\x0b\x01\x83\x01\x29\x1b\xbd\x1d\x08\x04\xba\x0b\xa1\x6f\x64\x22\x30\xa5\x34\x4f\xa7\x3c\x83\xd3\x99\xf2\xe4\x9a\x6c\x6c\x4b\x23\xb2\x1b\x8b\x00\x49\x01\x4b\x8b\x2a\xf5\x0a\x73\xd4\xbb\x34\x82\x52\x33\x75\x9b\xbb\x01\x27\x58\x43\x11\x63\x20\xae\x46\x85\x56\x4b\x69\x92\x4a\x55\xe6\x08\x97\x6d\x49\x2e\xbc\xe8\xe8\x9e\x82\xfe\x13\x1c\x81\x76\x78\x74\x23\xca\x85\xfd\x16\xff\x73\x56\x36\xb7\x7f\xd8\x69\x1d\x6e\x28\x34\xb3\xfd\x83\x58\x3e\x1a\x0d\x7d\x1d\xdc\x28\xee\xbf\x54\xb1\x5c\x95\x0b\x8b\x96\xae\xf2\x1f\xd0\xd4\x67\x21\x4a\xe5\x54\x0c\xd2\x4e\x77\x74\xe4\x96\xb2\x54\xa9\xf8\x7b\xb8\x2e\x3c\x90\x85\x14\x37\xf5\x8a\xde\x9e\x5e\x8e\xd9\x54\x20\x84\x77\x8f\x81\x71\x63\xc0\x5a\x8a\xe6\x34\x69\x4a\x91\xbb\x32\xeb\x9d\x53\xb1\xf4\x26\x65\xc9\x54\xef\x51\x77\xeb\x70\x1d\x0f\x31\xe3\x98\xa5\x10\x70\x8a\x59\xee\x90\xfe\x8b\xf2\x56\xe9\x6b\x9f\xfb\x39\x78\x47\xb1\xcb\x8e\xb9\x95\x0c\x29\x77\xd7\xed\xb3\x26\xbc\x93\x3a\x47\x4a\x84\x7d\xf2\x28\xa1\xa5\xca\x65\xa9\xb4\x9f\x0f\x97\xd6\xf4\x20\x79\xfa\xff\x43\xe0\xe6\xc9\xda\xd3\x39\x8f\x26\x87\x09\x1a\x7d\x29\x32\xfb\x6f\x12\xbf\x00\x67\x42\xdc\x8d\x3b\x12\x5f\x2c\xcf\x87\xbb\x52\xdd\x6d\x4b\xaa\x36\x06\xe2\x7c\xfa\xe3\x39\x39\x7e\xfa\xcd\x7f\x0f\xd3\xc3\x2c\xca\xb2\xd8\x44\x1c\xbb\x7d\x36\x13\x47\xfb\xcd\x83\x23\x8a\x85\xca\x32\xcb\x9b\x97\x32\x39\x57\xe9\x87\xf7\xaf\x1f\x2c\xfd\x03\x85\xd0\x0f\x67\x3f\xca\xf9\xe2\xd2\x49\xcd\x54\x4d\xaf\x7b\x3f\x6b\x3a\xb7\x4a\xed\x59\x10\x87\x72\xf1\x95\x01\x97\x9c\x19\xd6\x9c\xb3\x5b\x86\x41\xd8\x9c\xeb\xa9\xfd\xff\x44\x65\x41\xf5\x00\xaa\x73\xa7\xab\x1c\x53\xd6\x15\xf5\xe0\x09\xcf\x92\x2a\x73\x09\x53\x82\x08\x02\xaa\x3b\x87\x0a\x97\x93\xe3\x3d\x22\xdd\x8e\x64\xd8\xdd\x44\x54\x8e\xc7\x1d\xab\x1b\xa1\x17\x10\x12\x93\xc7\x24\xf8\xff\x1e\x68\xdc\xa1\x3b\x78\xad\x6e\x07\xdf\x57\xa4\xef\xfa\xeb\x22\x95\xd6\xe6\xfb\xca\xc5\x0d\x06\xbc\x4d\xd8\x6b\x75\x2b\x4c\x19\x8e\x02\x05\x84\x1a\x5f\x41\x9d\xcf\x3f\xdb\xbd\x0e\xd4\x53\xc3\x60\xa4\xa4\xfe\xe1\xec\x74\x1e\x61\x47\x3b\x5d\xbc\x41\xd4\xe9\x99\x89\xcf\xe4\x39\xab\x72\xb4\x2b\x2f\x83\xfb\x44\x6f\xa8\xd6\xe6\xf6\x69\x0a\xdd\xeb\xc1\x0e\x8a\x88\xde\x02\x11\xa2\x2f\x8e\x79\xa1\x55\xf1\x5d\x2c\x49\x63\xab\x83\x3b\xfb\xa9\xf4\xf4\xdc\xf5\x60\xb3\xdb\x25\xd7\xd7\x0c\x6b\xc5\x80\x4c\xac\xaf\xe1\x62\x52\xad\x8a\x02\x6c\x63\x4e\x02\x40\xfe\xdb\xa7\x1d\xbd\x95\x96\xb1\x45\x87\x09\x38\x8e\x5f\x8f\xc7\xec\xaf\x27\xbf\x4d\xd8\x1b\x9f\x98\xd4\xf9\x7b\x83\x6a\x01\x3d\x7b\x60\x82\xe9\x7e\xfc\xf1\x65\xe0\xe1\x34\x15\xb5\x54\xed\xca\x06\x50\x9d\x29\xcf\x3a\x8c\x59\x26\xaf\x51\x55\x7e\x04\x55\xc8\xc7\xbe\x44\x28\xba\xec\x05\xf1\x79\xd3\xc0\xc2\x67\x45\x97\x37\xfc\x5a\xbc\x3a\xbf\x84\x53\xfc\x50\xca\xec\x6c\xc1\x29\x91\x6c\x57\x5d\x74\x32\x14\x61\xd2\xad\xbc\xe1\xe6\xdf\x95\xd0\x3c\x15\x6b\xaf\xb7\xd1\xed\x4e\x97\x7c\xf1\xf6\xf4\x72\xf7\xf7\xfa\x0b\xd7\x96\x03\x79\xce\xce\xb1\x14\x15\xd4\x7e\x20\x97\x35\x5f\x78\xd5\x5e\x8f\x46\x7b\x6b\x8a\x60\xa6\xf9\x52\x40\x66\xc8\x3c\xb8\x91\x3f\x13\x94\x7c\x33\x0c\x4a\x0e\xa5\xb2\x77\x57\x2a\xdb\x5e\xea\xe9\xf9\xab\x1e\xc7\xac\xb0\xd5\xbf\x2f\xe7\x48\x05\xea\x0f\x67\xdc\xe4\x19\x70\xf8\x00\x3f\xb5\xe6\xb4\x0e\x2e\x7b\x58\x2e\x3c\x4d\x7f\xd5\x3c\xf5\xa9\x31\xc2\x70\xb3\xad\x3d\xa4\xe8\xb4\xa2\xde\x51\x75\x9b\x3b\x47\xfb\x4f\xef\x8e\xf1\x87\x3f\xc3\x81\x04\xc0\x6e\x9b\x52\x9c\x46\x9e\xf8\xa9\xcb\x5a\xfe\x3e\x28\xfc\xf6\x77\xf7\xc7\xcf\x2e\x38\xf4\x91\x98\xcc\x27\x2c\x29\xaa\xbf\x3f\x3d\x3e\x5e\x8e\xd1\x34\xf5\xf7\x93\x67\xc7\x3f\x3c\x66\x05\x97\xda\xdb\xbd\xc8\xfc\xef\xbd\x1c\x6b\xc7\x47\x4b\x1b\x82\x2b\x20\x07\xca\x1a\x25\x4e\xd8\x99\x77\x2a\x49\x8a\x6a\x4c\xfe\x45\x81\xeb\xb7\x29\x95\x76\x3c\x1e\xe4\xa8\x80\x20\x54\x1a\x08\x3c\xef\xb1\x58\xb0\x45\x08\x17\x42\xc0\xdb\x7f\xfe\xe4\x49\xd3\xcd\x3e\x55\x89\x79\x52\x19\xa1\x8f\xe6\x95\x4c\x05\x94\xaa\xad\x4a\x70\x24\xa5\x15\x7b\xc7\xdc\x54\x94\x5c\x66\xfb\xe3\x0f\x09\x89\x85\xa6\x82\x86\x37\x4c\xcc\x3f\xd5\x29\xe9\x28\xed\x12\x05\x29\x69\x61\xe4\x7f\x40\x57\x8e\x59\x25\x26\x94\x9c\x8e\x65\x4a\x5d\x53\x28\x73\xcb\x27\xfc\x7b\xf2\x04\x24\x7f\x3b\x14\x51\x63\x21\xea\xa5\x62\x22\x37\xa8\xd8\xa5\xb4\x2a\x8e\x44\xf1\x30\x47\xf5\x0e\x4d\x83\x21\xc8\x62\x0e\x8d\x75\x1e\xec\x58\x4e\xde\xf9\x26\xc8\xd4\x62\xea\xd9\x8a\xf1\x29\x64\x63\x08\xc2\xe4\x5a\xb9\x37\x7c\x99\x42\x72\x8a\x64\xff\xfc\x29\x98\xf7\x9f\x8c\x20\xa3\x26\x6c\x78\x1f\xb5\x01\xe9\xa7\x1a\x9a\x31\x3a\xb3\xe1\x13\xfc\x25\xb9\x95\x3f\x8c\xd8\xbe\xb8\x8a\x91\x2e\x16\xe1\x20\xa2\x7c\x6d\xb6\xfb\x64\x8f\xed\xdb\x77\xf9\x56\xc0\xe5\x4d\x41\x0a\xa0\xd0\xa5\x45\x6e\xd4\xbe\x3e\xe4\x33\x5a\x46\x59\xc2\xee\x59\xbd\x9a\x81\x99\x79\xec\xf7\x88\x2f\x1b\x38\x3c\x24\x03\x9e\xbf\xd7\x95\x2b\xd5\xee\x32\x22\xa8\x1c\x92\x60\xb8\x04\x77\xd8\x01\xd8\x54\x54\x60\x73\xc3\xaa\x12\x49\x1d\xb6\x41\x58\x16\x05\x94\x84\xac\x2f\xd0\x12\xbb\x82\x73\xe4\xc6\x2f\x17\x8d\xd1\x2c\xff\x4c\x49\x4a\x30\x8d\x8e\xca\x99\xdb\x5c\x53\x3c\xb1\xa4\xc1\xb5\x90\x5c\xba\xef\x00\x1e\x58\xa1\xab\x31\x10\xd2\x6b\x60\x63\x17\x82\x43\x47\xb8\xbe\x6c\xc5\x96\xd2\xd4\x51\xc4\xad\xb3\x1d\x62\xfa\x5f\xf2\x8f\xef\x0a\x91\xf7\x24\xb7\x08\x5b\x2d\x78\xbd\xf5\x49\x2e\xba\x69\x2d\x54\x21\x72\x74\x9f\x71\x0b\xa6\xe2\x5a\x9f\x34\x45\x81\x9a\xb5\x55\xc5\xdd\xa0\x27\xfb\x6e\xbe\x32\xb8\x05\x40\xa8\x0d\xb6\x11\xfe\xdb\xc4\xf8\xfc\xed\x1b\x3a\xbc\x73\x95\xc6\xcf\x0d\x1c\x33\x5d\x18\xb5\x3f\xb6\xc2\x57\xff\xb7\xa7\xa6\xab\x1c\x75\x2f\xd2\xd4\xe1\x75\x7b\xcb\xda\x53\x87\x96\xc0\xda\x9c\x93\x0b\x4f\xa1\x5e\x95\x82\xa5\xb8\x49\x29\x6c\x3d\xaa\x3c\xf2\x22\x1a\xfa\x4b\xc9\x1c\x08\xff\xe4\xa2\xe4\x65\x65\x26\x67\xbc\xe0\x89\x2c\x57\xbf\xde\x9c\x4c\x1c\x93\x67\xe7\xfb\x6d\xcc\xca\x45\x65\x18\x47\x41\x33\x9f\x3b\x27\xda\x20\x23\x7f\x2a\x12\x69\xd0\x09\xe8\x15\xb2\x29\x7e\x67\x38\xa9\x5d\x09\xcf\x8c\xaa\xdd\xee\x02\x5d\x3e\xe4\xb5\x01\xc2\x84\x69\x88\x28\xdb\x0a\x4f\xae\x61\x95\xe8\x1c\x2d\xf3\x79\xd6\xd1\x74\x9d\x0c\x15\x16\xec\x77\xaf\xc3\x52\xe8\xe4\x0d\xdd\x85\x80\xbe\x9e\xd1\x8a\xc2\x3f\x85\xfe\xa9\xe4\x87\x6c\x65\xd2\xa6\xae\x01\x86\x1b\xd7\xee\x84\x6f\xdd\x14\xde\x51\x24\x14\xd0\x91\x98\x50\x03\x55\xde\x82\xb2\xb6\x54\x72\x59\x01\x3c\x02\x09\x41\xab\x93\x7d\xb9\x0b\x7e\xe3\x64\x07\x9f\x3d\x03\x10\x25\x86\x33\x82\x97\x19\x01\x5e\x50\x07\xdc\xae\x0a\x6d\xb2\x75\xca\x27\x0c\xf8\x25\x8d\x0c\x28\x21\x80\x9f\x40\xd5\x8a\xcf\x56\xea\xd3\x83\xe0\xef\xe2\x63\x21\xc1\x4d\xc5\x7b\x4b\xd2\x25\x3a\x80\x16\x29\xab\x72\x5c\x2e\x61\x75\xfc\x50\x9a\xc0\x5f\xdc\x55\x83\x17\x37\x42\xaf\xd8\xc9\xb1\x19\x43\xe0\xca\x4f\xdf\x9f\x1f\x1d\x1f\x1f\x7f\x0b\xa2\x3c\x78\xe6\x00\xfc\x8d\x83\xf9\x5d\x89\x66\x5f\x15\xdd\x05\xf2\x89\xb2\x26\x14\x65\xa4\x58\x79\x23\x96\xbf\x7b\x2f\x9f\x24\x94\x9f\x9e\x44\xc7\x88\x16\xc6\xcf\xa9\x4c\x68\x30\x7b\x59\xc2\x09\x7e\xf9\x84\x8d\xc2\x70\xac\x5e\xda\x03\xc7\xe3\xc6\xc7\x23\x40\xa9\x8d\xa3\x05\xef\x28\x93\x56\x96\x70\x26\x71\x18\xff\x71\xf0\xcc\xbe\xd9\xe2\x95\x21\x36\x79\x0f\x48\x66\x8d\x41\xb3\xb7\xab\x7b\x67\x33\xff\x03\xec\xd3\x31\x63\x85\x32\xa5\xf1\x19\x4f\xca\x8a\x3c\xab\x20\x65\x9b\x9c\x35\x1a\x52\x25\x30\x44\x1b\x51\xe0\xa4\xf9\x5a\xe5\x3c\x57\x2e\x70\xa1\x9e\x0b\x83\x7f\x4d\xd9\x18\x48\x2e\x97\x22\x95\xbc\x14\xd9\xca\xce\xc1\x73\x8f\x55\xa5\x81\x04\xdd\x68\x2b\x40\x46\xae\xae\x14\x7a\x8b\x45\x84\x53\x77\xe4\xb1\xc7\xde\x7b\x0c\x5f\x99\xa6\xbf\x9c\xfd\xea\x64\x39\x61\xdf\x55\xa5\xdb\x27\x7e\xf7\x01\x58\xcc\xc6\xf1\x59\xa8\xaf\xe3\x89\xc6\x5b\x4c\xe2\x98\x2c\xb2\xb1\xf7\xcf\x62\xc1\x70\xca\x93\x6b\x88\x90\xb6\x0c\x1c\x2f\x65\x27\xfd\xcc\xd5\xe8\x64\x97\x76\x88\xde\xd5\xac\x83\xae\xc8\xf1\xac\x81\x2e\x92\xeb\x1a\x00\x06\xa8\x2e\x7e\x8d\x10\xc3\x98\x53\x45\x45\x2a\x53\x65\x89\xdc\xdd\xe0\xd7\x45\xdf\xfc\xd2\x0f\x37\x8d\x09\x2d\x7a\xe5\x55\x09\x3c\x34\xc0\x5a\x43\x85\x64\x71\x4c\xc9\xf3\x12\x16\x06\xca\x76\x78\xdb\xc0\x4b\xd9\xc1\xdf\xa0\x07\x43\xe0\xd2\x6c\x91\xbe\x6d\xa9\xb3\x0d\xec\x9d\x01\xc4\x73\xa8\x15\x61\x54\xa3\x03\xcf\x90\x34\x0a\x48\x4e\xfc\x9a\xbe\x32\x7d\xcb\xf7\x65\xad\x11\x78\xdf\x7e\xfd\xb6\x0f\x0a\xc6\x14\xb5\xf4\xb6\xcb\xe7\x69\x51\x6a\x29\x4c\x98\x93\xa1\xb5\x00\x30\x3d\x98\xba\x25\xa0\x6b\x7b\x4b\xaf\xa2\xd4\x12\xca\xfb\x9c\xa6\xff\xea\x02\x7b\xd0\x68\xf7\x63\x89\xab\x52\xcb\x23\x28\x13\x74\xc4\xd3\x7f\xd1\xdb\x76\x4a\xb6\x06\x83\xbf\xd1\x18\x73\x64\xf9\xea\x31\x70\xd7\xbf\x7d\x12\x79\xa0\x11\x8a\x81\x45\x89\x30\x74\x87\x74\x7e\x91\x20\x98\xa3\x6f\xbf\xfd\x76\x18\x81\x2a\x54\x7a\xf6\xea\xc5\xfb\x98\xca\x48\x30\xdb\xd2\x4a\x6a\xdb\x48\x11\x1a\x56\x81\x96\xb9\x5d\x68\x9e\xf2\x0c\x7c\xeb\x80\x2b\x7d\x95\xfb\xe4\xa1\x4b\x60\xa2\x4a\xca\x87\xab\xa6\x25\xe6\x08\xf1\xf6\x0c\xf7\xe0\xb7\xd6\x2b\x90\x1b\x48\x0d\xe5\x60\x1d\x59\x16\x65\x90\x2b\xfe\x95\x77\xbc\x84\xf5\xba\x44\x59\xc1\x7a\x5d\x18\x7c\x10\x6c\x67\x31\x8b\xdd\x78\x7c\x45\x03\xf4\x0c\x85\x4a\xcf\x65\x6a\x5e\xcb\x78\x1d\xbf\xa0\xb5\x1d\xac\x1c\x08\x59\x12\xe3\x22\x2d\x85\x2d\x3a\xa9\x96\x2e\x50\x85\xdb\x18\xea\x93\x32\x6a\xed\x10\x22\xc7\x6f\xd5\x7e\x8e\xf4\xae\x9c\x77\xfb\x4c\x69\xb0\x31\xd4\xdc\xb5\x63\x45\x6a\xd8\x3d\x19\x26\xb1\x5a\xf9\xf3\x5c\xe8\xb3\x68\xe9\xaf\xa0\x71\xcd\xe1\x5a\xd9\xaa\x00\x53\xa3\x7d\x3d\x64\x29\xc3\x10\x7c\x86\x61\xaf\xa6\x8e\x0e\x0f\xd3\x90\x22\xab\xb4\x8f\x13\x3d\x48\xb8\x9b\x24\xdc\x81\x9c\x77\x11\xf5\xb2\x2c\xda\xee\x95\x6b\xea\x88\x3c\xe8\x1a\x21\x27\xc7\x4f\x9f\x0d\x3d\x09\xad\x2c\x43\xfe\x13\x14\xc8\x70\x99\xec\x23\x47\x13\xeb\x06\xf9\xc5\x50\x0b\x0a\xd0\xd8\x09\x2e\x12\x5a\x2b\x90\x33\xb0\xfe\x06\x18\x19\x8c\x2f\x72\x86\xd9\x79\xc5\xc7\x42\x24\xa5\x99\xb0\x77\xe5\x42\xe8\x5b\xd9\xf2\x81\x04\x16\x9b\x97\x56\x6e\x83\x21\x21\x6a\x66\xd5\x1c\x10\x58\xc2\x32\x59\x80\x2e\x01\xc7\xdb\x57\x0e\x98\x6e\x6e\xb3\x8d\x71\x4a\xd0\x88\xcb\x25\x96\x34\x50\x64\x72\x53\x2b\x90\xdd\x41\x0c\xc8\x89\xf6\x6f\x65\xfa\x0d\x91\x41\x23\xb9\x1c\x88\x46\x1e\x18\x54\xe4\x63\x9a\xa1\x44\xe4\x25\x9f\x8b\xd0\xf2\xe8\x72\x73\x86\xfe\x60\x41\x4f\x70\x55\x6f\x19\x72\xc8\x26\x29\x3e\x5a\x82\x2e\x6f\xa0\x54\x93\x8b\x2f\x9c\x57\x5c\xf3\xbc\xb4\x58\xf3\x67\x75\xc1\x4a\x69\x21\xb5\xb6\x4f\x7a\x43\x63\x6d\x9a\xb3\x44\x13\xb9\x97\xab\x51\x93\xa4\xfd\xfc\xee\xc2\xef\xec\x0b\xcf\xbf\x78\x5f\xc3\x9e\x16\x3c\x7d\x97\x67\xab\xb8\xbf\x78\xd8\xea\x6b\x11\x08\x9e\x1e\x01\x8b\xb3\x09\xb7\x39\xa9\xa7\x55\x92\xed\x49\xb3\xd4\xd5\x43\x46\x80\xc7\xec\x91\xab\xbb\xfd\x78\x18\x1e\xd4\x62\x2e\x4d\xa9\x57\x3d\xbe\x26\x8d\xe6\xbe\x3c\x40\xe0\x7c\xb2\x62\x45\x95\x65\xf1\xcc\x3f\xd0\x72\x97\x7c\x3f\x6e\xfa\xf3\x2a\xcb\xba\x09\x7f\x5a\xad\x5f\x42\xc6\x1f\x74\xcc\x84\xf3\xb8\x83\x2f\x4b\x6b\xc3\xfd\xd7\xe5\x4e\x84\x2e\x0c\x33\xf7\xa8\xfa\xc4\xe8\x46\xc2\x7c\x3f\x17\x2e\x5e\x02\x42\x01\x28\xdb\xcf\x17\x77\x92\x03\x3d\x5a\x1c\xfa\xbe\x00\xf3\xd0\xd9\xf9\x87\x08\xe9\x07\x6c\xf9\xbe\xd3\x91\x92\xc0\xb5\xb2\xde\x25\x45\x85\x09\xea\x1a\x84\xa1\x74\x65\x61\xd0\x69\x80\xac\xfb\xe5\xc2\xa2\x24\xcc\x38\x18\xb8\xb3\xf8\x1a\x7b\xd8\x4c\x1a\x7e\xd2\xec\x33\xce\xae\x46\x18\x0f\x71\x35\xa2\xf4\xd1\x76\x36\x0e\x5e\x81\x3e\x47\xd8\xd5\x88\x6e\xe3\x6a\x84\x1d\xa6\xab\x4e\x06\x32\x37\xad\xff\x85\x66\xa2\x7d\xa9\x1b\xa1\x6f\xb5\x2c\x31\xb7\xb5\x5f\x40\x3a\x6c\xa8\x98\xc8\x07\x45\x2d\x6e\x2c\xe0\x44\x2b\x27\xab\xec\xc6\xca\x24\x00\x56\x1e\x65\xe3\xaf\xed\x0a\x7a\x16\x4d\xc0\xe3\x27\x1a\x03\xf5\x60\xea\x92\x1c\x5e\xbe\x6a\x95\xd2\x68\x8c\xf2\x87\x2d\x9b\x71\x35\x7a\x22\xca\xe4\x09\x9e\x1d\x14\x43\x8a\x4b\xe0\x98\x65\xff\xac\xae\x40\x1a\x81\xfd\x6e\x1f\x9f\x67\x33\x52\xc1\xb4\xce\x93\x7f\xd9\xe6\x60\xc9\xeb\x12\xa2\x73\x6e\x1b\x1f\x79\x25\x47\xf0\xa3\x21\x47\x16\x76\x7a\xfe\x8a\xa0\xd2\x3b\x28\xf1\x9c\xf1\xc2\x02\x23\x3a\xc4\xd0\xbf\xdb\x23\x40\x2a\x04\xa4\x1c\xae\x0c\xb0\x5d\xd3\x7b\xd8\x8f\xab\xd8\x08\x3b\x38\x0b\xd7\x42\x3c\x95\xd3\x6f\xed\xd1\x88\xd3\x97\xca\xb3\x6c\x94\x00\x73\x28\xb1\x6c\xf0\x22\xd1\x0c\xfc\xa1\xd6\x00\xb9\xcb\xc6\x79\x90\xc9\x6d\x10\x77\x4d\x75\x97\xa8\x34\xf3\xa5\x5c\x0a\x55\xc5\x78\x82\x58\x37\xf7\x74\x4b\xfa\xd3\x95\x97\x74\xb5\x9c\xbc\xfb\xad\x25\xee\x45\xc9\x32\x65\x2f\x89\x32\xb1\xfa\xc6\x23\x40\xe8\x2e\xc5\xaa\xf8\x28\x12\xd4\xf4\x42\xe6\xd5\x07\xcd\x79\xed\x38\x98\xc2\x08\x2d\x79\x26\xff\x23\x5e\x59\x32\x67\xc9\x79\xe4\x95\x46\x3a\xa1\x86\xdf\xeb\xfe\xa3\xa9\x2f\xec\x11\x23\xf9\x34\x10\xf2\xcb\xed\xf3\xb4\x97\x34\x61\xbf\x88\x1a\xef\xb0\xaf\x73\x55\x7e\xdd\x24\xc9\x4d\x33\x90\xca\xc3\x72\xf0\xba\xca\x59\xaa\x92\x6b\xa1\xc9\x7f\x0d\x4f\x8d\x2a\x3e\x32\xe4\xce\x12\x76\x32\xf9\x96\x61\x84\xcd\x69\x35\x33\xde\x23\x73\xca\x93\x6b\x01\x79\x07\x31\x9b\xd8\xc9\xf1\xb7\xcf\xbe\x85\x34\x41\x81\x23\xe5\xa7\x71\x35\x09\xc3\x07\xd5\xac\x87\xd1\xe8\x75\xb8\x41\xc8\xb8\x7c\x7d\xf1\x9d\x52\xa5\x29\x35\x8f\x78\x1e\x76\xfb\xb4\xd3\x18\x87\x4f\x78\xea\x3a\x4d\xd8\xab\xba\x28\x94\x11\xd9\xcc\x63\x3b\x0e\xdf\x81\xfb\x66\xfd\xe1\xb8\xab\x50\xa8\xd1\xf1\xc3\x40\xc5\xe8\xd0\xff\x00\x50\x31\x7a\x66\x94\xaa\x20\xfe\x03\xfd\x04\xd4\xac\xf5\xe0\x1b\x27\x14\xe6\xa0\xbb\x2b\x06\x71\x1e\x14\x80\x0e\x4b\xa1\x97\x63\x57\x1f\xa5\x83\xc4\xdb\xa5\x68\xfa\xf1\xb8\x59\xa8\xdb\x1f\x65\x9a\x8a\xfc\x8d\x28\xb5\x4c\xcc\x4b\xa5\x7b\x0b\xb5\x42\x34\xa1\x16\x37\x60\x1f\x74\x8f\xb5\x4e\xda\xb5\x52\x15\xbb\xe5\x58\x94\xc6\x8e\xcb\x16\x30\x30\x5b\xe2\xc8\x24\x91\x95\xe1\x20\x4b\x99\x2b\xed\x87\x92\x86\x2d\x05\xb7\x80\x30\xab\xb2\x31\x85\xb1\x50\x6e\x97\x5b\x27\xf1\x4d\x85\x4b\x93\x88\x40\x82\x1c\xbb\xfd\x16\xb1\xc6\x92\xff\x4b\x69\x14\xef\x26\xf4\x8b\x9d\x04\x7f\x41\x77\xc0\xe7\xec\xab\x93\xc9\xc9\xdf\xbe\xa2\xf8\xc8\x4a\x17\xca\x08\x5f\x5e\xb6\x1e\x10\x92\x31\x80\x33\xb2\xdd\x1a\x26\xd5\x5b\x08\xa6\x40\x1d\x03\xce\xb3\x68\xd2\x2e\x65\x22\x7c\x22\x77\xf1\xb1\x74\xc9\x00\xed\x01\xd8\x37\xe0\x35\x16\xee\x28\xc6\x0d\x6e\x1c\x53\xf1\x99\x4a\x17\x5a\x7a\x2b\x3f\x24\x96\x00\x87\x48\x61\xf1\x8b\x73\x67\x59\xaa\x1b\xd4\x42\x23\xec\xe1\x34\x8e\xac\xf3\x72\x80\x55\xc5\x47\x4a\x9f\xf3\x32\x52\x1c\xa0\xd1\xec\x35\xbd\x1c\x33\x39\x00\x5e\x97\x5a\x24\xa5\xd2\x2b\xc7\x44\x7b\x17\x44\xf6\x08\x3f\x7e\x4c\xae\x6d\xca\xe2\xf9\x31\x23\x96\xdb\x8d\xe1\xd5\xd2\xd8\x19\x6c\x62\x96\x5b\xdf\xc3\xb3\x05\x3d\x13\x2a\xf6\xea\xc9\x82\x74\xdd\xcc\xd9\x83\xc5\x2d\x2e\x8f\x7c\x7c\xea\xf0\x30\x2f\x2d\xa9\xbc\xa5\xba\x05\x7a\x0d\x0b\x01\xdb\x01\x69\xc4\x5c\x60\x95\x34\x0d\x66\x61\xa5\x2a\xdd\x0d\xa9\xdc\x70\x3f\x1f\xde\xbf\x5e\x73\x3d\x1f\xde\xbf\x76\xb7\x63\xff\x09\x3c\x14\x38\xc7\x03\x2c\x05\xbb\xc5\x6b\xf8\xbc\x87\x0b\x41\xf9\x0f\xec\x6c\x7f\x14\x3c\x8d\x55\x75\xed\xf6\x69\x24\xba\x32\x99\x4c\x00\x1d\x95\x0b\xf6\xe3\xe5\xe5\x39\x5b\x40\x1f\xd3\xc8\xcc\x5a\xdf\x04\xda\x49\xe0\xb6\xf6\xcd\x91\x86\xae\xaf\x90\x2b\x88\x63\x88\x1f\x15\xb8\x8e\xdc\x15\x10\xf3\x8b\x60\xbf\xf7\x55\xbe\x6e\x4c\x23\x0e\x77\xa0\x05\x5f\xca\x7c\x7e\xa6\xf2\x1c\xe3\x92\x5f\xa5\x99\xe8\x15\x21\xd6\xf7\x6f\xeb\x19\x41\x80\x80\x08\x42\xfc\xc8\x1e\x19\x7d\xe5\x6c\x64\x32\xcd\x1a\x05\x32\x82\x1e\xf6\xa2\xab\x52\x2d\xed\x89\x70\xcc\x9a\xaa\xcc\x27\xc8\x5f\xdd\x66\x05\xb4\xc8\x56\xe0\xf8\x99\xbb\x2c\x16\xa4\x00\xc0\x84\x91\xd1\xed\xb5\xab\x43\xc7\xe4\x8e\x6f\x16\xbb\x94\x3b\x56\x79\xb2\xc6\x61\xaa\xd1\x1c\x5c\x93\x4b\xb8\xeb\x92\x8b\xd8\x7e\x0b\xad\x72\x0c\x29\x72\x62\x5e\xa7\xda\x06\xd9\x06\xf6\x9a\x6e\x44\x9a\xa6\xab\xe4\xe6\x64\x21\x63\x26\x00\xe1\xc1\x74\xbc\xed\xf9\x03\xba\x9c\xb0\xd8\x97\x0b\xb8\x32\x9d\x6a\x07\xb2\x65\x01\x6e\xe6\x3d\xa9\x2b\xc9\x58\xe6\x0f\xea\x48\xcd\xb4\x30\x0b\x00\x77\xd4\x6a\xf9\x82\x99\x78\x60\x58\x33\xd3\xec\xcf\x75\x0e\xf5\x7b\xbd\x71\x32\x8d\x66\x78\x57\x7d\x21\x32\xbe\x6a\xa7\x15\x37\x33\x9e\x60\xd1\xd4\x5c\xe5\x47\x64\xc0\xac\x3d\x20\xe0\xc6\xbc\x69\x34\xb3\x18\x6e\x85\x39\xbb\x82\xca\x99\xdf\x83\xeb\x0a\x69\xa6\x83\xdf\xdf\xab\x0c\x38\x78\xcc\xe3\x65\x19\xc7\x8c\xcf\x03\x41\xc5\x5b\xaf\xbe\x00\xcb\x58\x2f\x7d\x83\x53\xef\x37\x7b\x36\xdb\x1b\x96\xcf\x4f\x12\x91\x09\xb7\x5a\xab\xb1\xe3\xe1\x98\xa0\x15\x4d\x8a\x0a\xbd\x31\x28\x2c\xf3\x10\x6f\xf9\x87\x89\xb7\x6c\x02\xe1\xa7\x8c\xb8\xbc\x68\xcc\x3c\x20\xe6\xf2\xdd\xc5\x21\xcc\x72\x2f\x88\xaa\xcc\xcc\x99\xd0\xe5\x4b\x19\x2b\x17\x15\x34\x7a\xe7\x6a\xfb\xef\x40\xde\xfc\xf8\xec\xf8\x5b\xd6\xd0\x05\x29\x0d\xec\xf8\xc5\x84\x3d\x3a\x3b\x05\x8d\xc8\x98\x3c\xeb\xe1\x7d\xda\x4e\x79\x60\x53\x09\x74\x34\x8f\x31\xf2\x24\x98\x14\xe4\x8c\xcc\x9c\x6b\x79\xc3\x4b\xf1\x93\x58\xe1\xaf\x44\x78\x9c\x95\x6b\x0c\xc8\x33\x9b\x1d\xd9\xab\x14\x69\x43\x0b\x03\xd6\x2e\x12\xe0\xb1\x40\x5a\x19\xd8\xf9\x8a\x6a\x9a\xc9\xc4\xe7\xea\x83\x0c\xab\xfc\xa6\x2e\xe1\x56\x8b\xd8\x05\x37\xa6\xfe\xbd\x56\xfa\x1f\x1d\xd9\xd9\x8e\x52\xa9\xe1\x8d\x3c\x70\x75\x77\x3f\x0c\xc8\x62\x21\xf4\x45\x25\xa3\x96\xa5\xcb\xd7\x17\x61\x87\xda\x42\x8d\x75\x84\x5c\xb1\x8c\x04\xfa\x30\x83\x9d\xdc\x19\xbb\x65\x90\x3b\x32\xd7\x4e\x77\x99\x19\xf0\x92\xc3\xcc\x48\xe8\xd0\x6e\x58\xfd\x74\x55\xc6\xf3\xf9\x44\xe9\x39\x24\x0d\x4e\xf4\xaa\x28\xd5\x93\x32\x33\x4f\xfe\xab\xb8\x9e\x1f\xf9\x2f\x1e\x3f\xe8\x23\xdf\xb6\x2c\x7e\x99\x99\x37\x32\xef\xd7\xfb\xbd\xbe\xa8\x9b\xdb\x79\xb0\x2e\x5f\x5f\x78\x05\x5e\x40\xa2\xff\x94\xe7\xbe\x06\xd4\x9b\xc8\x24\x8a\xf4\x5a\xf8\x66\x1d\xea\x2b\xb0\x2b\xe0\x18\xf0\xeb\x83\x1d\x06\x28\xec\x4b\x3c\x24\x55\xa8\x4c\xcd\x57\x1b\xea\x13\x5f\xc6\xba\x0d\x28\x52\x0c\x1d\xa5\x95\xa0\x6b\xcd\xab\xcb\x7a\xeb\x53\xbc\xda\xef\x5a\x13\x7c\xe9\x5e\x74\xeb\xaa\x18\x63\x6d\xd0\x8b\x92\x97\xe6\x74\x3e\xef\x2b\x43\xf0\xa3\xba\x0d\xb2\x69\x82\xc1\xc1\xe5\x11\x44\xe1\x9c\x27\xbe\xce\x68\x98\x93\xd0\xd9\x75\x41\xd7\xf4\x00\xcb\x15\xef\x4e\x1c\xb6\x38\xf4\x05\xa4\x03\x16\x79\x02\x8c\xef\xaf\x2e\x0b\x7d\x38\x04\xa0\x36\x3b\xc4\x13\x3b\xc4\x93\x70\x88\x71\x98\xb5\x3e\x13\xe5\x13\xbc\xc7\x27\x37\x27\xf6\x80\x4e\x26\x74\x6c\xa7\x0d\x6f\xc3\x6d\xbe\xf2\x4e\x89\xa3\xdf\x7e\x1f\xf8\xd9\x2f\x62\xba\x50\xea\xba\x35\xe7\xf3\xff\x1d\x5d\x24\x0b\xb1\xe4\x01\x29\xf1\x52\x40\xd1\xe0\xfd\x01\x30\x2e\x2f\x23\x6a\x6c\xd7\x52\xbb\x8a\x70\xc4\x61\x96\xae\x37\xe6\x23\xdd\x87\xd9\x71\x5d\xe9\x08\x98\xbb\x6a\x0e\xe4\x88\x38\x15\x5c\x03\xa7\x7f\x2d\xf2\xf6\x9a\xa6\xe8\x66\x4f\xee\xbb\xd0\x45\x8b\x1b\x29\x6e\xcd\xa4\xd9\x33\xb0\x8c\x46\xcc\x6f\xf7\x07\x9b\xbb\xdc\x65\x0d\x09\xdb\x5e\xa5\xfb\x5a\xa4\xfd\x97\xda\xe8\xd3\x8d\x70\x57\x84\x2d\xbe\xe2\xbe\xdf\x57\xbe\x68\x59\x90\x9e\xed\x16\xd7\xcb\x7c\x37\x3d\xd9\x5d\x0d\x7c\xbb\x82\x0f\x39\x1f\xb0\x9b\x56\xaf\x35\xfb\xa9\xf2\xcf\xb6\xa3\x4f\x08\x46\xff\xf3\xec\xf8\xdb\x7b\xe0\x03\xf4\xa6\x3a\x8d\x73\x40\x61\x6b\xdb\xf0\xc8\xd9\xf9\xf7\x6f\x8e\x44\x9e\xa8\xb4\x25\x69\x4d\xab\x3c\xcd\x30\x79\x80\x11\x10\xc2\xb3\xf2\xae\x0b\x41\xe2\x40\x1e\x73\x46\x23\xc1\x6d\xba\x02\xdf\x16\x62\x1b\xe8\x7e\xa0\xbc\x0e\xd9\x59\x71\x0e\xb2\x0e\x78\x0f\x2b\x4a\xb6\xc8\x2d\x7b\xa1\x81\xf1\x68\xe6\x68\x20\xa1\xed\x4c\x2d\x97\x2a\x7f\xcb\x97\x54\xbc\x9b\xd4\x9e\xd1\xbe\xef\xf4\x9c\xe7\xf4\x3a\xdd\xe4\xdd\x75\x47\x3c\x27\xbb\x20\x90\x57\x59\xb6\xf1\x56\x2f\x9c\x57\x50\xfa\x56\xa5\x02\x49\xf2\x05\xa8\x42\x9a\xd7\xda\xbc\xa8\xfe\xaf\x1c\xee\xc4\x18\x64\xef\x73\xc4\x6e\x4e\x26\xed\xae\xe4\x28\x62\xf7\x01\xb5\xd4\x30\x04\x12\x74\xe2\x96\x01\x68\x16\x1a\x47\xa9\x4e\x73\x2a\xd1\xb1\x10\xc9\x35\x24\x6f\x14\xa9\xe3\x1a\x88\xef\x31\xc0\x36\x41\xd1\x00\x13\x66\x9c\xc8\x44\x49\x85\x3d\x4e\xcf\x5f\xe1\x15\x78\x65\x1b\x86\x0f\x26\x19\x37\x86\x0c\x97\x86\x71\x27\xd2\xc0\xaa\x8a\xaa\x6c\x89\xe0\x93\x88\x06\xac\x09\xeb\xbc\x90\xbd\xf2\xd4\xe9\xf9\x2b\x27\x4c\xb9\xda\x4d\x10\x6a\xe6\xa7\x34\x70\xf2\xde\x23\xc1\xe7\xb5\x44\xc0\xc0\x5a\x67\x38\x6f\x9d\xe8\xb2\xae\x8c\x71\x23\x74\x09\xbe\x59\xf3\xdc\x5e\x12\x8d\xe6\xed\x43\x64\x0f\x74\x87\x8d\xdc\x64\x1d\xfb\xa6\x05\xe4\xd2\xac\xf2\x60\x04\xf4\xc1\xd8\x7b\xaa\x4b\xaf\x09\x8d\x66\xe6\x3a\x24\x0d\xdd\x59\xd2\x50\xe3\xdf\x78\xeb\x65\xfb\xda\x86\x20\x5c\xb8\xc3\xe2\x25\xbb\x45\xfd\x97\x7b\xd2\x76\x9c\x8d\xc4\x6b\x02\x61\xa1\x91\xb7\xbf\x89\x64\x3d\xb1\x1f\x3e\x89\x7d\xd8\x22\x54\x54\xde\x29\x59\xa6\x4f\x92\x4c\x55\xe9\x51\x1d\x53\x7f\x84\xa5\x0e\xf5\x13\x5e\x14\x48\xf5\x3c\xee\x83\xea\x53\x27\x93\x33\xfb\xc5\x99\xff\x80\xc4\xbd\xb3\xd0\x01\x7c\x3d\x71\x23\xa1\x31\xb5\x8b\x87\xd2\x28\x32\x19\x8d\x47\x16\x43\xc0\xd0\x17\x0b\x6e\x1b\xc7\x23\xaa\xff\x52\x4f\x35\x1a\x8f\x7a\x13\x09\x8c\x7e\x6b\x63\x12\x37\x74\xe7\xb6\xa8\x81\x41\xf1\xbd\xb6\xff\x3b\x58\x05\xe6\xd4\xa3\x7b\x2c\x1b\x6e\x0f\x3c\xf5\xbb\x5f\x4d\x48\xba\xf4\x67\x48\x4b\xd8\x70\x8a\xbf\x77\x4f\xa5\xfb\x90\x9b\x1d\x1a\x03\xf4\xee\xd0\x40\x5f\x1f\x0e\xe1\x2b\x54\x4d\x15\x54\xb8\x61\x00\x14\xcd\x44\x0b\x28\xd3\xfb\x68\x84\x6e\xdb\x26\xae\x6c\xe8\xd1\xac\xdb\x90\x3d\x91\x7e\x08\xe8\x9c\x4d\x6f\xd7\x6e\xee\x11\xfb\x54\x7d\x05\xcd\x60\x73\xce\x7d\x00\x9c\x70\xbf\xa2\x44\x21\x3b\xe3\xa8\xbb\x10\x1e\x63\x1a\x9a\x5d\x86\xdd\x70\xe7\xb3\xce\x65\xef\xea\xbe\xd6\x2f\xd0\xee\xf2\x40\xd2\x0f\x24\xfd\x81\x92\xf4\x1d\x2b\xa0\x62\x74\xb4\x4d\x3e\x87\xa1\xfe\xad\x87\x5d\x8b\x36\xb7\x1e\x6d\xc3\xa3\x8e\xb3\x13\xfe\x90\xf8\x94\x27\x5e\x56\xaa\xf5\xd1\x7d\x72\x11\xa9\xa2\x49\x57\x6f\x6a\x4f\xd7\xd3\xef\x4e\xcf\x9c\x3a\x5a\x57\x99\x88\x08\x0f\x21\x2f\x61\x0a\x91\x74\xd9\x80\x03\xf6\x39\x60\x9f\x07\x8a\x7d\xc6\x08\xb2\x5d\x9a\x5f\x88\xc4\xfb\x04\x99\xd0\x28\x43\xaf\x60\x13\xdd\x26\xc7\x1e\xcf\x7b\xd8\x07\x39\x69\x3e\x48\x3b\xc7\x5a\xfc\x37\xf0\x61\xc3\x38\xdb\xe3\x83\x0b\xda\xf8\x7a\x9c\x00\x07\xe1\xf1\x02\x68\x99\x4a\xbc\x05\xb2\x58\xf3\x0d\xe8\xa1\x83\x0a\x7e\x88\x7b\xcd\x9c\x9e\xbf\x82\x96\xb6\x3d\x8c\xe7\xb5\xe2\x63\xc2\x5c\xaf\xb1\xf7\xfa\xc2\xd7\xfa\xd6\xe5\xe2\x04\x59\xcf\xa1\xa4\x3a\x77\x48\xe0\x27\xe3\xc2\x74\xae\x46\x5f\x5f\x8d\xb0\x59\x18\xb0\xf6\xf8\x79\xa2\x80\xd2\xe3\xed\xd3\x58\x34\xaa\x67\x10\x51\x55\x99\x60\xbc\x28\x32\x08\x9e\x56\x13\xf6\xbd\x04\xeb\x5d\x65\xb0\xd2\xd1\xdc\x7d\xd7\x5d\x2c\xfa\x58\xc1\x3a\x63\xcb\x24\x57\xaa\xd8\x1a\x7d\x4a\xd2\x08\x27\xee\x4f\xa8\x7d\xc0\x61\x22\xd3\xbd\x9e\xaf\x9f\xc7\xb0\x47\x32\x4f\xb2\x0a\x14\x88\x55\xee\x7f\x4f\xfd\xe7\x8f\xa3\xbb\x53\xb9\xcf\x54\x14\x8d\x00\x79\xdb\xec\xe0\x27\xcf\x55\x7e\xd4\x5e\x21\x28\x68\xa3\xcb\x84\x06\x76\x35\x7a\x32\x53\xea\x49\xbb\xd1\x54\x53\x6c\x57\x33\x36\x53\x2a\x1e\x09\xce\x53\x95\x67\x11\x69\xe8\x3d\xb5\xf8\x11\x5d\xd7\x1a\x63\x62\x04\x8d\x76\x54\x88\xd7\xe1\x6c\xd4\xb6\x26\xb0\x55\xf4\x29\x47\xdc\xa1\x74\xaf\xde\x7d\xb3\xe7\x9b\x5f\x4b\xcd\xec\x8b\xe8\xae\xf9\x83\xc1\xf0\x05\xf0\xeb\x73\x6a\xea\x3d\xbf\x2c\x3b\x42\xec\x61\x6d\xd2\x51\x53\x6c\x54\x8d\x6e\x93\xca\x94\x6a\xf9\x0f\xf7\xbb\x43\xbc\x18\xa8\xf6\x5a\x9a\xf2\x1d\x6c\xd3\xac\xc3\xbf\x9d\xce\x5e\xd9\x0c\x0a\x6a\x28\x94\x47\x13\x90\xce\x59\x6a\x96\xf1\xa9\xc8\xa8\x55\x69\x73\xd0\xf5\x1e\x58\xb3\x2f\x97\x35\x03\x60\xbe\x20\x58\x8e\x97\xe4\xc1\x36\x0c\x1a\xb2\x1f\x52\x70\xb3\x73\xb4\xd3\xa2\xac\xb4\x05\x55\x3c\xc5\xf6\x43\xa9\x83\x0c\x00\xec\x20\xd5\x36\x56\x8c\x8e\x16\x8f\xc0\x07\xb9\xbb\x45\xc5\x5f\xef\x20\x19\xf9\x3e\xf8\x07\xfc\xdb\x36\x63\x9e\xff\xeb\x32\x2d\x73\x5a\x68\x90\x3a\x15\xaa\xea\x7b\x94\xb2\x4e\x22\x74\x3c\x74\xfa\xce\xb5\xe2\x60\x96\xac\xd8\x4f\xe5\x52\x98\x92\x2f\x8b\xd1\x78\x04\xc3\x1f\xa4\xc7\xbd\xa3\xa8\xf6\x95\x74\x4e\xd5\xb2\x05\x10\xe9\x88\x15\x0b\x31\x25\x02\x7d\x53\xdf\xfa\x50\x13\x0a\xce\xf2\xde\x8d\x78\x40\x92\xbb\x45\x92\xc1\x73\xea\x7a\x66\xb6\xfc\x0a\xb1\x6f\x54\x0a\xee\x45\x68\x1e\x9d\xd5\x87\x4b\xc0\x1f\x72\x1a\x94\x22\x08\x1e\xce\x54\xb4\xd9\x14\x8c\x7c\x85\xc9\xf1\x79\x40\x68\xd8\xdc\xd5\xe4\x67\xff\xa2\x34\x08\xe8\xfd\x4c\x23\x92\x03\xb9\xcc\x1d\x0c\xfe\xbb\x12\x7a\xe5\x87\x9e\x09\x64\xe8\xfc\xc8\x13\xcc\x15\x9e\x89\x59\xc9\xa6\x19\xcf\xaf\x29\x45\x71\xbd\xf1\xaf\x0c\x70\xb3\x3e\xb1\xbb\x1b\x6a\x8e\x11\xed\x2e\xd8\xff\x5e\xb6\x85\x26\x79\xf8\x3d\xc4\x70\xdd\x5a\xa2\x58\xc3\x42\xd4\x39\x65\x9a\x46\x10\x47\x1f\x6e\x05\x16\xbf\x80\xac\x60\xf7\x5a\xdd\xa5\x5c\xc2\x03\xbc\x71\x24\xa0\x0b\x2f\x8d\x32\xa1\x84\xf8\xd1\x33\x5d\xde\xc5\xea\x32\xf1\x12\x86\x8b\xc8\xb2\xf3\xdf\xca\x3c\x55\xb7\x9b\x4e\x04\x7b\xb1\x47\xbf\x5e\xba\x33\x3c\xfa\x05\x7e\x1a\x33\xff\xcb\x6f\x8f\xf1\x49\xfb\x53\x33\xad\x73\xab\x0b\x47\x53\xd1\x11\x24\xbf\x10\xb1\xc9\xcb\xba\x73\x50\x60\x1a\x06\x4c\xaa\xa5\xfd\x53\xde\xd4\x5d\x1e\x29\xcd\xfe\x23\xb4\xf2\x01\x61\xc1\x37\x12\xbd\xbc\x79\x2e\x20\x39\x04\x7e\xf1\x78\x32\x24\x9f\xf1\x40\x8b\x72\x1b\x8f\x8e\xd7\xa9\xc9\x9f\x74\x8f\x7d\x6d\xff\x5a\xad\xde\x04\xe0\x81\x1f\x01\x5c\xfd\x76\x2f\x86\xc4\x0a\x3a\x03\x99\x12\xdb\x15\x09\x85\x63\xa9\x28\xd3\x06\x99\x8e\xe5\x8d\x4f\xdd\x51\x73\x2b\x14\x2c\x48\x8c\xe0\x06\xae\x05\x03\x0e\x0e\xac\xc8\xbe\x59\x11\x1f\xd8\x31\x0c\x0f\xf1\x44\x2b\x63\xa2\x0c\x89\x59\x13\x35\xb2\x0e\x67\x39\xa4\xef\x51\x65\x13\x52\x27\x31\xd6\xf9\xf7\x03\x0b\xb3\x6b\x16\x86\xa7\xbc\xe4\x9b\xee\x6a\x03\xe5\x95\xa6\x7c\x23\x4a\x7e\x0f\x93\xa2\x1f\xe2\x5e\x92\xd5\xd6\x78\xf0\x29\x7d\xfe\x0a\x03\x44\x25\xaa\xc3\xd6\x23\xc2\xba\xaf\x8b\x2b\x95\x22\x10\xd5\xa6\x2b\x64\xfc\x78\x9e\x8e\x29\xe7\xa5\xe5\xb4\xc6\x9e\xbd\xda\x80\x00\xed\xc7\x5d\xfc\x97\x47\xb9\x4c\x98\x28\x12\xc5\x12\xe2\xe1\x03\xcf\xf9\xe9\x78\xce\xbb\x83\x7f\x63\x9c\x3b\x83\xf1\x41\xbf\xf9\x07\xa6\xd8\x07\xba\x77\xd0\x6f\x3e\x50\xfd\xe6\xd3\x3b\xea\x37\x03\x06\x73\x97\x1a\xce\x83\x76\xf3\xa0\xdd\x3c\xa0\xc8\x9d\x68\x37\x77\x23\xc4\x45\xd8\xec\x83\x7e\x6e\x9d\x7e\xae\xb7\x2c\xf0\x41\x4d\xf7\xd9\xd5\x74\x00\x29\xf7\x97\x33\xef\xcc\xe4\x1f\x74\x76\x7f\x56\x02\xfb\xa5\xe8\xec\x9e\x1e\x74\x76\x07\x9d\xdd\x50\x69\x61\x1d\x1e\x14\x1f\xf1\x81\x76\x94\x7e\xdf\x53\xc3\x40\xb1\x23\xd2\xbd\xc7\xbd\xc2\xcd\xe8\x5a\x4e\x9d\x3b\x7e\xa3\xa7\x34\xb5\xea\x0f\x42\xc1\xa9\xd5\x29\xfe\xea\x0c\x89\x04\xd8\x4e\x26\x7c\xa9\x34\x84\x8d\x53\xff\x72\x81\x04\x18\x52\xcc\x2e\xab\xac\x94\x45\x26\xea\xe4\xe5\xe5\x22\xc8\x7c\x6c\x44\x09\xae\x8f\x34\xd4\x06\x94\xdc\x70\xf5\x08\xc4\x4b\x73\x90\x8d\x0e\xca\x9b\x2f\x1f\x01\xd6\xe0\x1c\x11\x32\xe9\xe9\xe1\x43\xa1\x4c\x53\x3e\x01\xa4\x7b\xcf\x20\x53\x18\x01\x45\xb6\x5d\xfa\xb7\xb6\xc2\xfc\x0e\x79\x2a\x77\xe3\x13\xf2\x07\x90\x8c\x0e\x0e\x0b\x9f\x5e\x12\xda\xb5\x90\xb3\x2b\xd2\xbc\x49\x58\xe9\xf9\xe4\x4e\x42\x4b\x5b\xd1\x79\x10\x58\x1e\x9e\xc0\x12\x13\x56\x7c\x42\x42\x77\xb9\x0d\x2c\xbe\x2b\x71\xa5\x0d\xb5\x93\x75\x0c\xe5\x41\x70\xf9\xf3\x0a\x2e\x5b\x49\x1e\xeb\xf0\x64\xfd\xbd\xcb\x20\xe2\xb2\xcb\x53\xed\xa4\x75\x88\xb1\xdd\x17\x85\x00\x0f\x50\x98\x31\xd1\x91\x1c\x88\x2a\xaa\x73\xd7\x0f\x71\x33\x18\x8f\x60\x88\xa1\xee\x06\x7e\x39\xac\x3f\x73\x95\x95\x6e\x00\x72\x0b\x95\x4e\x4c\x21\x92\x49\x5d\x95\x21\x6a\xfb\xc2\x15\x44\xcb\x46\x51\x1e\x77\xdc\xa6\x37\x17\xc1\x6f\xb7\x4a\x43\x5a\x27\x13\x4f\xab\xd4\xc7\xb0\xed\x82\x25\xd9\x01\x11\xde\x0a\x60\xde\xaa\x54\x0c\x80\x95\xa0\xdb\x66\x30\x81\xd2\x37\x1b\x20\x24\x14\x13\x89\x09\xeb\x85\x97\x03\xe5\x3c\xc8\x8b\x7f\x70\xba\x83\xd6\x05\xa4\x3c\x6b\x25\x34\xac\x2f\x97\x65\xea\xd6\x5e\x07\xa4\xa1\x35\x04\xf9\x28\xaf\x01\x2c\xde\xf0\x2c\x94\x46\x9a\x72\x88\xca\x32\x91\x78\xf1\xc2\x1e\xbf\xff\x66\xad\x80\x73\x3f\x67\x26\x27\xe8\x7d\x79\x18\x39\x94\x12\x3f\x43\x72\xcc\xbb\x8b\x59\xdd\x4c\x2a\xeb\xfb\x07\x40\xb8\x2b\x41\x6e\x1d\xbd\xd9\x24\xb8\xb5\xba\x36\x05\xb6\xa0\x71\x13\xa9\x39\xc8\x63\x9f\x55\x1e\x7b\x4d\x37\x06\x99\xc4\x97\x9d\x2b\xbb\x9f\xc8\x55\x4b\x5a\x11\x7e\xe6\x20\x62\xed\x8f\xd4\xb5\xd2\xaa\x94\x3c\x4f\xb9\x4e\xf1\x79\xba\x7e\x9f\x78\xbd\x0f\x5d\xea\x5b\xcb\x7b\x6f\x85\x44\xcf\x55\x3a\x80\x67\xaf\x7b\x6d\x66\xd9\xad\x3c\x75\x17\x8e\xbd\x16\xbf\x0e\x08\x76\xef\x08\x36\x38\xec\x1e\x97\x0c\xe3\x2b\x1c\x84\xd5\x0a\x1b\x4c\xdf\xad\x2c\x17\x94\x86\x18\x4a\x35\x00\xd3\x88\xf7\xb9\x3f\xac\xdc\x51\x4b\x1c\x50\xf3\x41\x0a\xf9\x9c\x52\xc8\x67\xe5\xe8\x3f\x39\x87\x7e\x1f\x05\xe2\x1d\x09\xd3\x26\xe6\xbe\xd9\xb3\xc9\xdb\xd7\x6d\x07\xd6\xfe\x61\x50\x9e\x0d\xac\x7d\xa1\xd2\xfd\x73\xf6\x01\xd3\x73\xa0\x1e\x07\xc6\xfe\x21\x33\xf6\x01\xa8\x0e\x43\x9f\x68\xfd\x39\x18\x6f\x0e\xc6\x9b\x6d\xe0\xe5\x60\xbb\xf9\x13\x92\xe2\x03\xdd\x3b\x48\x4d\x07\xdb\xcd\xc1\x76\xf3\x29\x6d\x37\x1d\x72\x73\x30\xdd\xfc\xb1\x88\xca\xe7\x35\xdd\x74\xb9\x99\x83\x80\x77\x10\xf0\x1e\xa4\x80\xd7\x05\xd5\x6d\x30\xe8\xc1\x6e\xf3\xa7\xc4\xae\x5f\xa0\xdd\xa6\x47\x21\x71\xc0\xcb\x07\x01\xe4\x60\xb6\x79\x48\x66\x9b\x9e\x87\x7a\x37\xaa\x74\x30\xda\xfc\x91\xc8\xce\x67\x35\xda\x74\x18\x9e\x03\xe9\x38\xb0\xf4\x0f\x98\xa5\x6f\x98\x6c\x7e\xff\xff\xfe\x5f\x00\x00\x00\xff\xff\x7f\x46\x82\xf0\x67\x11\x14\x00") +var api = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xbd\x7b\x93\xdb\xb8\xb5\x2f\xfa\x55\x50\xca\x9d\xb2\x3d\xa5\x56\xdb\x33\x3b\xc9\xb9\x9e\xda\x75\xaf\x63\x3b\x89\x4f\x3c\x9e\x3e\xee\x76\x52\xe7\xa6\x53\xc7\x10\x09\x49\xd8\xa6\x00\x0e\x01\x76\x5b\xd9\x35\xdf\xfd\x16\xd6\x02\x40\xf0\x29\x4a\x2d\xf5\xcb\xc8\x1f\x19\xb7\x08\x82\x78\xae\xe7\x6f\xad\xf5\xdf\x93\x2f\xff\x43\xcd\xb8\x3c\xa5\x39\x3f\xa5\xe9\x9a\x2b\xc5\xa5\x28\xd8\x92\x2b\x5d\x50\xcd\xa5\x38\xbd\x7a\x31\xfb\xb9\xd4\x54\x73\xb1\xfc\x07\x9b\xaf\xa4\xfc\x32\x79\xf9\xdf\x93\xf3\x64\xc5\xd6\xd4\xfc\x2b\x65\x2a\x29\x78\x6e\xda\x4e\x5e\x4e\x1a\x4d\x09\x3e\x9d\x33\x45\xa8\x20\xfe\x03\xe4\xda\x3e\xa6\x22\x25\x7a\xc5\x48\xc1\x94\x2c\x8b\x04\x9a\xa5\x44\xe6\x0c\x3f\xae\x08\xd7\x84\xe6\x79\xc6\x99\x22\x5a\xce\x26\xd3\x89\xde\xe4\x6c\xf2\x72\x22\xe7\xff\xc5\x12\x3d\x99\x4e\x0a\xf6\x6b\xc9\x0b\x96\x4e\x5e\xfe\x73\x22\xe8\x9a\x4d\xa6\x93\x24\xe3\x4c\xe8\xd7\x52\x2c\xf8\x72\x32\x9d\x28\x9e\xb2\xb7\x8b\x05\x4b\xb4\x9a\x4c\x27\x7e\x0c\x1f\xd9\x15\x67\xd7\x7f\x67\x85\xf9\x43\x4d\xfe\x35\x9d\xe4\x85\xf9\xb0\xe6\x4c\x99\x79\xf5\x35\x6c\x4d\xf9\x55\x77\x43\xc2\x61\xce\xb2\x48\x59\xc1\x52\x92\x71\xa5\x89\x5c\x90\xbc\x60\x0b\x56\x98\x5f\x3e\x37\x5e\xfc\x4c\xae\xdc\xab\x66\x49\xdc\x0a\xb2\xaf\xb9\x19\xfa\x8c\xbc\x3a\x7b\x47\x14\x2b\xae\x58\x41\xae\x79\x96\x11\x5d\x6c\x88\x96\xa4\x54\x8c\x2c\x78\xa1\xb4\x7b\x9d\x70\x01\x1d\xc0\x17\xaf\x57\x3c\x59\x99\x55\x54\x65\x9e\xcb\xc2\xf4\xf3\x6e\x41\x84\x14\xcc\x0c\xc6\x34\xf3\x1f\x55\x39\x4b\xf8\x82\xb3\x14\x3b\xe0\x0a\x7b\xb0\x2f\xb2\x94\xcc\x37\xc1\x18\xa6\xe4\x8a\x66\x3c\x85\x6d\xc2\xf1\x2c\x28\xcf\xc8\x42\x16\xf8\x2e\x6e\x10\x7c\x8d\x92\xdc\x7c\x43\x99\x3e\xdc\xc6\x27\xb0\x3b\x25\x6e\xb3\xff\xb4\x22\x34\xcb\xe4\x35\x4b\xab\x51\x99\xf3\x90\x4a\xa6\x88\x90\x9a\x70\x91\x64\x65\xca\x08\x15\x9b\xaa\xc5\x17\x21\xaf\x85\x59\x09\x33\x1b\x33\xc0\x73\x3b\xc0\x84\x66\x99\x72\x0f\xdc\x87\xab\xa1\x9a\x9e\xe7\x8c\xa8\x12\x46\xea\xda\x99\x47\x65\xc1\x48\x2e\x33\x9e\x6c\x82\x13\x47\x8b\x82\x6e\x26\xd3\x09\xd7\x6c\x0d\xa7\xc0\xfe\xae\x74\xc1\xc5\x72\xf2\xdb\x6f\x8d\x83\xd7\x3a\x27\xaf\x83\xa7\x24\x65\x0b\x2e\x98\x22\x2b\x79\x6d\xbe\x9c\xc8\xf5\xba\x14\x3c\xa1\x9a\x91\x6b\xae\x57\x30\x14\x33\xde\x19\xf9\xe8\x0e\xf8\x74\xf2\x7f\x15\x6c\x31\x79\x39\xf9\xdd\x29\xbc\xcd\xe1\x86\x9c\x72\x39\x33\x77\x98\xe6\x7c\xd6\x79\x81\x67\x57\x2f\x66\xf6\x2c\x85\x23\x98\xfc\x36\x9d\xd8\xb9\x9e\xc1\x54\xdb\x03\xfe\x73\xf8\xb8\x36\xe2\x52\x14\x2c\x91\x4b\xc1\xff\xcd\x52\xc2\x8a\x42\x16\x8a\x2c\x0a\xb9\x86\x61\x57\xb7\x9c\x89\x34\x97\x5c\x68\x42\x0b\x46\x56\x54\xa4\x19\x4b\xc9\x49\xb5\xc7\x34\x2b\xcd\x96\x17\x8c\xbc\x5b\x0a\x59\x30\x22\x0b\x62\x3e\x3a\x23\x6f\xd8\x82\x96\x99\x86\xdd\x83\x5f\xaa\x7d\x70\xeb\x3d\x9d\xac\xa9\x4e\x56\x7d\x83\x0f\x1e\xd6\x17\x7b\xc5\xc8\xe5\xa4\x28\x33\xa6\x2e\x27\x78\xc2\xb9\x32\x97\x28\x35\xdf\x82\xb7\xcc\x31\x93\x6b\x2e\x96\xc4\x10\x17\xa6\xe0\xf2\xb5\xc7\x7c\x39\x79\xfb\x95\x26\xfa\x72\x62\x86\x7d\x39\x79\xfb\x6b\xc9\xaf\x68\xc6\x84\xbe\x9c\xcc\x2e\xc5\xa5\x38\x21\xf0\xfc\xa5\xed\x94\xba\xde\x88\x14\xd9\x86\xf0\x85\xb9\x95\xcc\xb4\xc8\x36\xd8\xc4\xf4\x1b\xdc\x42\x33\xc6\x19\xf9\xb3\x2c\x4c\xab\x75\x9e\xb1\xa9\x79\x29\x65\x79\x26\x37\x6b\x26\xb4\x22\x09\x15\xe6\x04\xaf\x65\x8a\x6f\x5c\x71\x6a\xa8\xa5\x3a\xbd\x7a\x31\x75\xff\x98\x33\x4d\xcd\x5f\x22\x25\xec\xab\x66\x02\xee\x4c\xf5\xfb\xbc\xd4\xc1\x72\xe0\xc8\xf0\x92\xa5\xe4\x33\xcd\xf9\x5f\x0a\x59\xe6\xea\xe5\x3f\x2f\x27\xa6\xbf\xcb\xc9\xbf\x4c\xc7\xdc\xd1\x38\xf3\xfb\xd5\x0b\xf8\xd5\x53\xf0\x97\xe4\x9f\x97\x93\x60\x94\x97\x93\x7f\x7d\x9e\x06\xb3\xd7\xb2\x36\x34\x02\xf3\x6b\x0e\x8c\x5c\xcb\x32\x4b\xe1\xce\x9b\x2b\xca\x84\x6e\xdc\x63\xb7\xc2\x7e\xd1\xdb\xcb\xcc\x17\x6e\x65\x14\xfc\x8a\xe3\x83\x2d\x47\x1a\x07\xb3\x9e\x12\x76\xc5\x04\x2e\x9d\x90\x7a\xc5\x0a\xa0\x21\x4b\x33\x6f\x33\x36\x4b\x66\x8e\xbe\x11\xe6\xf7\xfb\xbb\x11\x73\x66\x28\xf6\x15\x03\x3e\x50\xbd\x08\xa3\xee\xdb\x9d\xf0\x0e\xd7\xaf\x47\xd7\x65\x06\xde\xdd\xba\xc5\x17\x2b\x46\xcc\x13\xc7\xac\x5a\x12\xc4\x8c\x7c\x30\x8f\xd5\xca\x0d\x73\x51\x66\xd9\x86\xfc\x5a\xd2\x0c\xb6\x62\x4a\xd8\x6c\x39\x9b\x12\xbe\xa6\x4b\x66\x69\xfa\x97\x72\xce\x0a\xc1\x34\x33\x92\xcf\x94\x5c\xaf\x18\xdc\xe6\xa0\xc9\xe5\xc4\x10\x05\xdd\xf8\xb8\xfd\x24\xee\x55\xad\x93\xae\xd6\xb2\x58\x52\xc1\xff\x8d\x34\xd8\x53\xf1\x4e\x42\x66\x5e\x53\x39\x4d\xd8\x39\xcb\x58\xa2\x65\xd1\x5e\x88\x0f\xcd\x26\x24\x65\x09\x4f\x99\x32\xc3\x87\x53\xab\x25\x29\x4a\x51\xe3\x75\x52\x80\x04\x82\xfc\x6d\x4e\x0d\x8d\x33\x2b\xe7\x5e\xb0\x03\x86\x6e\x2d\xe3\xa6\xda\x35\x77\x14\xc9\xb4\x52\xf6\x9b\xc0\xcd\x61\x6e\xd8\x86\x6b\xc5\xb2\x05\x08\x3a\x55\x4f\x53\x68\x01\xaf\x1b\x12\xca\x95\xe1\xfe\x0b\x59\xac\xf1\xeb\x56\x2e\x58\x33\x4d\x53\xaa\xe9\x2c\xa3\x73\x96\xa9\x56\xcf\xca\xdf\xc6\x24\x2b\x95\x66\x05\x51\x89\xcc\x0d\x55\xb4\xc7\x7b\x6a\xc8\xa7\x60\x46\x1a\x52\x5f\x78\xae\x5a\xc7\xaf\x76\x5f\xfb\x16\x67\x63\x3f\x68\x96\x51\xaa\x70\x3d\x38\x4a\x1c\x54\x29\x99\x70\x0a\xa2\x8b\xe1\xcb\xe6\x8a\x8a\x8c\x5d\xb1\xcc\xdc\xd2\x05\xb9\x9c\x3c\x77\x0c\xe0\xc5\xe5\xe4\x27\x42\x36\xb2\x44\x19\x43\x31\x5d\x5b\x3c\x42\x15\x59\x48\xc3\x46\xd4\x4b\x72\xd9\xde\xf3\xcb\xc9\x4b\xf2\xdf\x97\x82\x90\x4b\xe4\x5d\x6f\xbf\xe6\x05\x83\xb3\xae\xcc\xa3\x7f\x9a\x47\x04\x5b\x98\xff\x5d\x4e\xbe\xb0\x8d\x79\x10\x8e\x68\x5a\x3d\x45\x19\x1a\xbb\xbd\x9c\x7c\x90\xfa\x9d\xa8\x3d\x47\x46\x16\xf4\x8c\x3f\x3f\x0f\x1a\x11\x9c\x94\xfb\xf3\x5f\xf8\x8f\xdf\xcc\x7f\xfe\x75\x29\x7e\x33\x8b\xfc\x6e\x41\xb8\x50\x9a\xd1\x14\x27\x4e\x91\x14\x00\xf9\xda\x7d\xc1\x9b\x8b\x8d\xbc\x9a\x89\x2b\x5e\x48\xb1\x06\xd2\x81\x6b\x9e\x17\x32\x75\xcb\xae\x34\x5d\x72\xb1\x34\x8b\x7f\x07\x6b\x5f\x1b\x5c\xef\xf2\x8f\x5b\x7b\x9c\x55\x6d\xf9\xfd\xe4\x86\x36\xe1\x9c\x31\xb2\xd2\x3a\x57\x2f\x4f\x4f\x6b\x64\xe9\x34\x95\x89\x3a\x4d\xa4\x48\x58\xae\xd5\xa9\xbc\x62\x85\x51\x34\x4e\xaf\x65\xf1\x85\x8b\xe5\x89\x59\xe4\x13\xbb\x1f\xa7\x78\x11\x4f\x81\x10\xac\x8d\x30\x66\x2f\x8f\x32\x4b\x0e\x0f\xfd\x72\xaa\x90\xbe\x3b\xd2\xcf\xd6\xb9\xde\x90\xf7\xa6\xa1\x5b\xd6\xa9\x55\x3f\x1c\x2d\x31\xb7\x75\xa3\x0d\x59\x98\x6d\x97\x66\xd7\xd4\x10\x10\x56\x6c\x66\xf9\x97\xa5\xf9\x41\x01\xd1\x30\xe2\x6c\xed\x23\x86\x80\xe2\x1c\xfa\xa9\xe7\x2f\xb5\xe7\x63\x48\xa7\xa7\x96\xbc\x46\x97\x56\x54\x55\xa4\xcd\x91\xae\xfa\xd7\xcd\x41\x66\x66\x87\xe1\x1c\xd3\x25\x35\x17\x84\xcc\xa5\x3d\xcf\x32\x4b\x71\x34\xc0\x45\x04\xbb\xb6\x7f\x01\xed\xf5\xcc\xb6\x83\xa7\x22\xdb\xe1\xca\x30\x62\xa3\xd2\x16\x35\x89\x75\x41\x18\x87\xb9\x0c\x92\xef\x57\x44\x94\x59\xe6\xda\x3c\xad\xc6\x62\x55\xc6\x84\x2a\xe0\x5f\x49\xc1\xa8\x66\x53\x73\xc1\xaa\x11\x36\xda\xa4\x2c\x63\x9a\x3d\x33\x6d\x2a\x26\x03\xb3\x48\xa8\x30\xa4\x73\x45\xaf\x98\x5d\x23\xf2\x34\xe3\x5f\x18\xa1\xe4\x8d\x17\x47\x3e\xca\x2c\x9b\xd3\xe4\x0b\xbc\x4f\xce\x64\x7a\x56\xc8\xaf\x9b\x5f\x72\x54\xfb\xb1\xbb\x67\x8e\x0a\x77\x4c\x79\x46\x3e\x29\x16\x6e\x8d\xbf\xeb\x4e\xbc\x0e\xb7\xd3\x28\xa4\xb9\x3e\xe1\x62\x4a\xe6\x2c\xa1\x46\x67\x66\x22\x35\x62\x7f\x61\x36\x74\x03\x3c\xa4\x5b\xc2\x30\x6a\xaf\x62\x5a\x9b\x1d\x07\xb5\xda\xee\xfa\x3d\x3a\xfe\x05\xe3\xe2\x4a\x26\x20\x6a\xf4\xe9\x43\xed\x36\x84\x8b\x14\x34\xce\xe0\x22\x18\xcd\xdd\xcd\xbb\x92\xa9\x8c\x22\xcd\x52\xb2\x2e\x33\xcd\xf3\x8c\x11\xcd\xd7\x46\xa6\x56\x24\xa7\x05\x18\x35\x28\x51\x5c\x2c\xb3\x9a\xee\x87\x57\x00\x84\x9f\x4e\xe5\xe9\x83\x59\x8e\xcb\x89\x15\x7c\xdf\x2d\x3e\x30\x96\xb2\xd4\xea\x4e\xf0\xf0\x65\x5b\x71\xb7\x0a\x81\x1b\x90\x21\x53\x7a\x65\x8e\x9f\x30\x1c\x44\x6c\x19\x08\x72\x2c\xfc\x50\x47\xe7\x55\xc7\x54\x93\x8c\x51\x50\xd5\x4c\x57\x29\xec\x0e\xcd\x60\xe2\xe1\xbc\x1b\xea\xae\xff\x52\x83\x6a\xcc\x99\x39\x3c\xa6\xa1\x06\xd5\x43\x55\x9a\xc2\x7c\x43\x50\xcc\xa9\xba\xc9\xb3\x72\xc9\x85\x22\x74\xa1\xad\x94\x06\xc7\x83\x66\x95\xf1\x84\x66\xd9\xcc\x19\x88\x14\x5e\x3a\xd4\x1b\x37\xd6\xf8\x02\xbb\x4e\xbe\x5f\x97\x4a\x7f\x6f\xe6\xc5\x53\xb6\xce\xa5\x66\x42\x4f\x09\x9d\x9b\x2d\x94\x24\x2f\x64\xc2\x94\xf2\x0c\x59\xaf\xd8\x86\xe4\x05\xbb\xe2\xb2\x54\xd9\xc6\x8f\x77\x46\x3e\x48\xcd\x5e\x92\xef\x51\x62\x2c\xd7\x73\x43\x66\x16\xe1\xba\x54\x47\x4b\xb9\x2b\xbb\x2c\x69\x41\x85\x66\x78\x65\xe7\xcc\xab\xba\x52\xb0\x19\xf9\xde\xac\x50\x4f\x07\x05\x53\xe6\x5e\x71\x41\x16\x65\x01\x6b\x83\xab\xe5\x9e\xdb\x0b\x87\xc3\x9e\xba\x45\xc1\x63\xd5\xf9\x65\xd3\xf9\x17\x47\x8b\xcd\xb7\xaf\x6b\x2b\x57\x02\x1d\xa9\x56\xcd\x90\x83\x39\x23\x05\x73\xa6\x3b\x43\x72\xb8\xe0\x6b\xfe\x6f\x36\x6a\x09\xcc\x27\xb4\x74\xf6\x31\x16\x90\x47\xdc\x52\x9a\x65\x64\x0d\x76\x52\x30\x70\x15\x2c\x1c\x72\x22\x0d\xd3\x35\xc4\xd7\x8c\x8b\x7a\x2b\x9b\x3d\x40\x75\xd2\x64\x65\xaf\x0e\x75\xcb\xde\xae\x4e\x75\x03\x94\xcc\x36\x85\xf8\x68\x7e\x0e\x0c\xb6\xd7\xa0\x0d\x54\xa6\x58\x50\x1d\xa8\xae\x14\xcc\x53\x55\xce\x2b\xc3\x6d\x78\x9d\x12\x5a\x98\x7b\x3e\x97\xa5\x9e\x91\x8b\xee\x07\xb0\x2c\xae\x77\x6b\x0e\x71\x94\xf2\xff\x50\xb1\xf9\x3f\xe4\x23\x18\x40\xfe\x2a\xaf\x19\x98\xf3\xb8\x35\xa6\xe2\xd9\x35\x5a\xbb\x26\x7f\xf7\xab\xe3\x8d\xa9\xfe\x5a\x18\xc2\xe2\xcc\xd1\xed\xa7\x60\xae\xca\xcb\x8a\xae\x3b\x3d\x03\xa9\x88\x06\x4b\x1c\x90\x6f\xcb\xce\xe0\x48\x24\x46\x86\x62\x29\xbe\x6d\xc4\x27\x33\x11\xb7\x65\xd9\x86\xa4\x5c\xd1\x79\xe6\xba\xc4\x9b\x3c\xbd\xc1\x28\xe1\x4c\x83\x92\x63\x29\x93\x0c\xad\xe8\xce\x3c\x05\x32\x5b\xf5\x11\x67\xed\xab\x99\x58\xc3\xef\x74\x36\xb0\x64\x60\xc8\xe2\xb9\xb7\xfd\xd1\xec\xe4\x3f\xb8\x5e\xfd\xe2\x4f\x13\xd8\x4b\x43\xcb\x7c\xeb\x38\x9e\x57\x0f\x71\x3b\x7a\xd8\x94\x11\xc9\x4c\x47\x84\x61\xe3\x19\x79\x95\x18\x79\x17\xc8\x5c\xc5\x71\x5e\x92\x0f\x52\xb0\x29\xfc\xff\x2f\xe2\x4d\xb1\xf9\x58\x0a\xf2\xd4\x53\x02\x94\x78\xd0\x72\xe3\x4c\x1f\x86\x10\xd0\x4c\x49\x4f\x5b\xcf\xe5\x1a\x6c\x94\x9f\x04\xd8\x9c\x9f\x05\x34\x18\xf4\x95\x70\x18\xe4\xe7\x4f\xe7\x17\x84\x9b\x93\x61\xc4\x1d\xb0\xbb\x18\x49\x9c\x67\xdc\xda\xbc\x37\x4a\xb3\xf5\xd4\x30\xac\x84\x05\x66\x19\x4f\x7e\xcc\x76\x20\x87\xa0\x64\x51\xea\xb2\x60\x44\x69\x96\x3b\x39\xac\x3a\x06\xc9\x8a\x8a\x25\xf3\xbe\x94\xda\x28\xcc\x7a\xb1\x85\x84\x63\xe4\x09\x62\x29\x52\xa0\xc2\x1f\xdd\xf9\xf1\xda\x56\x8a\xeb\x42\xb5\x2e\xf8\xbc\x04\x63\x34\x32\x46\x5a\x6a\x79\xe2\xc7\x84\xec\x6d\xe3\x4d\x6e\x15\x1b\xb5\xab\xe0\x36\xee\x3f\xff\xd3\x2d\x96\x59\x37\xb3\x7e\x9d\x14\xc9\xf0\x55\x59\xea\x73\xb3\x42\x69\xc7\x59\xb8\xa8\x3d\x0f\xdc\x05\x66\xcc\xf6\xe5\xca\xf5\xe0\x4d\x43\xaf\x3c\x07\x75\x6d\x72\xaa\x14\x53\xd3\x06\xb1\xca\x32\x3f\x4f\x0e\x86\xe8\x94\xc8\xc2\xbb\x13\xaa\xe7\xe0\x36\xf0\x9a\x41\x87\xb7\x00\x68\x9d\xfb\x16\x9c\x3d\x62\x58\xb0\xe9\x78\xce\xf4\x35\x63\x82\xa0\xcd\xec\xc7\xe7\x44\xe1\x64\x6a\x82\xe4\x8b\xea\xe7\x6a\x99\xb8\xd0\x6c\xc9\x8a\xc9\x74\xb2\x90\xc5\x9a\x6a\xfc\xe9\xc7\x1f\x26\xbf\x99\x3b\xf4\x86\xe5\x4c\xa4\x4c\x24\xe0\xb6\xfa\xe7\x28\x7f\x5e\xc7\x75\x9c\x8e\x7a\xb1\xcb\x8f\x10\xbe\xe9\x85\xd6\xd3\xfc\xcb\xd2\xfc\xa0\x4e\x8d\xd0\x7a\xda\x12\x5a\xff\xf5\xdb\xb8\x0f\x0e\x51\xac\x1d\xdc\x90\x75\x4a\x57\xb1\x38\xa0\xfb\x75\x2a\xb8\x80\xfd\x69\xb3\x5a\x10\x15\x28\x50\x16\x73\x38\xf0\x2a\x40\x5b\x73\x61\xed\x15\xac\xe4\x92\x2e\x57\x65\xc3\xbf\xe8\xad\xb7\x1d\x2e\xc5\xb3\x77\xf6\x99\xf7\x5d\x04\xae\x3a\x96\x12\x05\xf3\x46\x11\x94\x1b\x91\x29\x2f\x98\xd1\x19\x83\x49\x78\x0f\x1c\xba\xc3\x94\x93\xe7\xad\x1d\x97\x04\x1e\x1c\xec\xcd\x4b\x56\x99\x21\xb6\x46\x00\xd3\xac\x30\xa2\x0d\x1c\xe4\xa9\x9f\xab\x9d\x7a\xcd\x07\x84\x74\x76\x46\x7e\x36\x94\x86\x8b\x85\x7c\xe9\x2d\x12\x4b\xae\x67\x76\xab\xad\x97\x4b\x6f\x4e\x13\x29\x90\xc2\xc8\x42\x9d\xa6\xec\x8a\x65\xa7\x8a\x2f\x4f\x68\x91\xac\xb8\x66\x89\x21\x76\xe6\x60\x9c\xc0\x60\x05\x4a\x55\xeb\xf4\x77\x5e\xda\xe8\x22\x22\x5f\xb8\x48\xdb\x4b\xf9\x37\x8e\x5a\xb3\xe1\xe9\xa6\xa5\xbd\x96\x7e\xc5\x1c\xaf\xfe\xf8\xf6\xfc\xa2\x72\x12\x04\x2e\xcc\xaa\xa9\xaa\xd6\xd2\xac\x03\x17\x0b\xc7\x8b\xbc\xef\xcb\x7b\xbc\x50\xa2\x30\xd7\x84\xa8\x72\xbe\xe6\x5a\x55\xdc\x5a\xcb\x19\x79\xed\x85\x8a\x32\x37\x42\x62\x3a\x23\xef\x04\x79\x4d\xd7\x2c\x7b\x4d\x15\x3b\xfa\x4a\x9a\xd5\x53\x27\x66\xc9\x3a\xd7\xd2\x99\x67\x3b\xd8\xb2\xa6\x22\xa5\x45\xea\x0d\x0d\xb6\xe5\x4f\xc7\x1e\xb1\xb7\x18\xdf\x48\x77\x46\x5b\xc6\xcf\x4c\x53\x33\x4d\xc7\xfe\xdb\xd3\xf4\x8c\x1d\x8e\x8e\x73\xde\x5f\x87\x52\x1b\x30\x61\xe0\x73\x81\x59\xba\x09\x60\x38\x8a\x38\xd5\xc4\x63\xfc\x36\x9d\x7c\x3d\xa9\x2c\x7f\x27\xb9\x61\xcb\x27\x6b\x56\x2c\xd9\xc9\x17\xb6\x99\xbc\x74\xc8\x88\x8e\x56\xd0\x2f\x5b\x9a\x46\xf0\xc2\xfe\x5c\xa5\x39\xaa\x91\x8c\x21\xd8\x91\x43\x70\x85\xf7\x5c\xe9\x7d\x39\xc3\x7b\xeb\x0d\xae\x36\x7c\xa8\xf5\x36\x34\x0a\xee\x73\x1b\x57\x12\xe9\xfe\x61\xe9\xbe\xbf\x4f\xf5\xb5\x7c\xbf\xdb\x16\x1e\xed\x76\xd6\x65\x96\xdf\x22\xa3\xba\x6d\x46\x05\x77\xd9\x73\x8f\xdb\x1d\xef\x0d\x8c\xbc\x5c\x59\x36\x75\x20\x7a\x5c\x3f\x87\x63\xa5\x76\x37\x8a\xb1\xa4\xd9\xa8\x16\x43\xe4\xd7\x3c\xc7\x53\xae\xcb\x3c\x03\x47\xc2\xab\xb3\x77\x08\x6e\x98\x92\x8a\xfe\x21\xd9\xf9\xe8\xee\xfd\xec\x1d\x10\x66\x43\x79\xd6\x6b\xb3\x12\xd6\x11\xf0\x85\x11\x55\xa2\x11\x58\x83\x5d\x0d\x94\x3d\xe8\x99\x7d\xcd\xa9\x50\xde\xc4\x06\x76\xb4\x51\x52\x39\x0e\xa6\x93\x38\xe3\x23\xe7\xed\xf7\x38\x11\xd5\xc0\x30\xce\x59\x26\xcd\x6d\x95\x33\xf2\xe4\xfb\x27\x30\xdd\x2c\xb3\x4d\xc1\xd3\x6d\x7f\xb5\xd7\x15\xd5\xd1\x8c\x89\xa5\x5e\x39\xab\xb2\xca\x78\x52\x29\x8f\x5e\x5b\x6f\x40\x08\x46\x60\xd2\x02\x90\xc8\x10\xbf\xa9\x4d\xaa\x86\x43\xdc\x36\x2d\xd7\xf8\xb6\x27\x56\xf1\x84\xf6\x21\xf3\x43\xae\x31\xf3\xd0\x56\x69\x0e\x93\x39\x8a\x01\xb8\xb4\x01\x1a\x78\x49\x9e\xe4\x32\x55\x4f\xc8\x9a\x51\xa1\x88\xf9\xf7\x0c\x7f\x3a\xcd\xe4\xd2\xfd\x0c\x13\x94\x4b\x12\x98\x42\x01\xe5\x89\xad\xbf\x77\xcd\xcc\x42\xf9\xcf\x23\xea\xca\x50\xd5\xd0\x80\xea\x3a\xaf\xbd\x53\xb3\xb0\x06\xfd\x9e\xaa\x84\x66\xac\xd6\xd2\xfc\xd0\xec\xf0\xfb\xd3\xee\x11\x38\xf9\x95\x17\xf5\x37\xac\x4b\xff\x9a\x67\x69\x62\x48\x67\x73\x2b\x03\xc8\x27\xac\x1e\x58\x45\x98\x80\x2b\x58\x75\x9e\x4a\x98\x9c\xbc\x62\x45\x46\x73\x34\x0a\x31\x9a\xac\xd0\xd3\x61\x8d\xd5\x86\x9e\x19\x96\x66\x0d\x29\x4c\x24\x99\x54\xf0\x83\xb5\xeb\xd7\xa6\xbe\xe6\xcb\x95\x76\xde\x1f\x8b\x1f\xdc\xf7\xe0\x00\x90\xa4\x7d\x68\xe0\xe7\x86\x69\x09\x7f\xf3\xd2\x16\xd8\xa3\xc1\xce\x5a\x77\x65\xbd\x46\xd3\xf1\xe5\x64\x4a\x2e\x2b\xa4\x4e\x6a\xfe\x46\xef\xd6\xf7\x97\x93\xb0\x99\x3f\x3b\xd4\x82\x01\xad\xed\xf9\xa4\x81\x71\x51\xb8\xc0\x68\x65\x0b\x86\xe0\x3f\x01\xb7\xd5\xf9\x6f\xcc\x58\xea\x1d\xcd\x1a\xc3\x69\x7d\xd7\x03\x21\xb6\x7f\x13\x27\x11\x74\x00\x96\x45\xeb\x74\xb1\x0b\x55\x30\xb3\xcc\x89\x75\x82\x9c\xd7\x36\xd0\xf6\x57\x5b\x53\x73\xfe\x72\x5a\x18\xd9\xc3\xb5\xac\xcc\x61\x5c\xe1\x37\x3b\x0c\x86\x6d\x8e\x28\xca\x2c\xdb\x81\x43\x35\x8c\x5f\x5b\xf8\x55\xbd\x75\x83\x7b\x05\x0f\xea\x1c\x8b\x44\x96\x15\x59\x56\x7d\x62\xb2\x76\xe4\x1a\x10\x95\xda\x01\x03\x43\x62\xf5\x4b\xdd\xde\xdf\xf2\xa4\x9d\x90\xd7\x1f\xdf\xbe\xba\x78\x3b\x25\x9f\xce\xde\xc0\x7f\xdf\xbc\x7d\xff\xd6\xfc\xf7\xf5\x2f\x1f\x3e\xbc\x7d\x7d\x41\x64\x41\xbe\x07\x03\xb9\x99\x3e\x4c\x4b\xaa\xda\x17\xc0\xe8\x29\x36\xce\xd1\x50\x7d\xac\x36\x0a\x8a\x50\x6e\x9a\xa6\xa0\x07\x44\x7e\x1f\xf9\x7d\xe4\xf7\x91\xdf\xdf\x6b\x7e\x7f\xce\x8a\x2b\x9e\xb0\x8f\x6c\xc1\x0a\x26\x92\x41\xed\xb4\xd9\x96\xac\x64\x96\x62\xf4\x80\xfb\x45\x4b\x62\x5b\xcd\x32\xb6\xa4\xc9\xc6\x5a\x0e\x46\x84\xa6\xc1\xca\x4f\x2c\xd4\xbd\x65\x17\xec\x06\xc0\x7f\x36\x3f\x7f\xee\xc2\x97\x2b\x3b\x8a\x30\x40\xa8\x1f\x59\xde\xd3\x33\x3c\xab\x75\x8f\xe7\x6c\x97\x6f\xe4\x54\xaf\x3a\xba\x37\x3f\x7f\x76\x41\x70\xb9\x45\xc9\x7c\xfa\xf8\x9e\x98\x07\x16\x5a\xe1\xbc\xae\x00\x77\xe4\x88\x0f\x0e\xc2\x13\xe0\x38\xba\x31\x74\x7e\x5a\x16\xba\xfd\xe9\x77\x8b\x2a\x8a\x06\xe9\x98\x69\xe7\x28\x8f\xed\x0f\x0f\xf5\x4a\x2a\x30\xac\x79\x97\x71\xe0\x8c\xfd\x8f\xff\xf8\x11\x58\xe6\x9c\x26\x5f\xae\x0d\x75\x4c\xe4\x3a\xa7\x9a\xcf\x79\xc6\xf5\x66\x46\x3e\x9b\x5e\x3f\x07\x30\x39\x0b\xd6\xc1\xaf\x59\x90\xd0\xd3\x17\x27\x7f\xf8\xfd\xef\x7f\xfc\xfd\x14\xa3\x39\x14\xbf\x62\xcf\xf6\xf4\xed\xee\x70\xe6\x5b\x58\x90\xa1\x43\xdf\x6a\x1c\x83\x36\x63\xd0\x66\x0c\xda\x8c\x41\x9b\x31\x68\x33\x06\x6d\xc6\xa0\xcd\x18\xb4\x19\x83\x36\x63\xd0\x66\x0c\xda\x8c\x41\x9b\x31\x68\xf3\x9e\x06\x6d\xc6\x98\xcd\x18\xb3\x19\x63\x36\x1f\x58\xcc\x66\x0c\xc2\x8a\x41\x58\x31\x08\x2b\x06\x61\xc5\x20\xac\x18\x84\x75\xbf\x83\xb0\x86\x89\xda\x4e\xae\x85\xa3\x06\x62\x59\xa1\xc2\x73\x04\x73\x23\x41\x9b\x8d\xd1\x58\x31\x1a\xeb\x91\x83\xdc\x63\x34\xd6\x9d\x45\x63\xb5\x9d\xad\xf7\x23\x1e\xab\x3d\xae\xe3\x45\x64\x0d\x13\xfa\x6d\x31\x59\xdb\xdf\xae\x6f\xfc\x70\xfb\x18\x97\x75\x3f\x38\xc0\x96\xb8\xac\xd1\x9b\x78\xc4\x9b\x1a\x63\xb3\x62\x6c\xd6\x9d\xc4\x66\x6d\x39\x89\xc7\x8a\xce\xea\x52\x1d\x06\xe8\x72\x47\x73\x43\xae\x34\xe5\x16\xee\x62\xb6\xca\x68\x43\x86\xc8\x39\x70\x3b\x25\x17\xef\xcf\x4d\x33\xc1\x12\x8b\x33\xb1\x7a\xed\xb5\x67\x43\xc3\xb2\x78\x42\xff\x54\x8a\x34\xeb\xc2\xac\xb9\x47\x08\x2c\x23\x67\x6f\x7f\x26\x4c\x24\x32\x65\x29\x79\xfd\x8a\xcc\xe1\x59\x03\x5b\xe6\x50\x02\x3e\x1d\x53\x30\x94\x27\xca\x81\x73\x12\xf3\x79\xc8\x31\xc5\xc0\xad\x55\x8a\x00\x42\x86\x56\x02\xa2\x0b\xa3\x46\x16\x52\x6a\xe5\x54\x4f\xb3\x1d\xd8\x01\x2d\xf0\x53\x6d\xd5\x3a\x50\x19\xe7\x1b\xcd\xcc\xcd\xb0\x18\xb4\x8e\x09\xda\x27\x76\x7e\x35\xd8\x61\x08\x5e\x6b\xab\xd9\x6f\xd1\x94\x5c\x75\x20\x0b\xf2\xb9\x2c\xb2\xcf\x5e\xf9\xf5\x13\x72\xb0\xdf\x86\xb1\xb5\x28\x85\x00\x2c\x1c\xd7\x2b\x67\x37\x46\x73\x1c\xa8\xea\x02\x3c\x35\x96\x69\x95\x8a\x55\x9f\x1a\x21\x03\xf6\xd3\xe4\x16\x3c\xf3\xb7\xe9\xa4\x2c\xb2\x8e\xa5\x81\xc9\x2c\xf9\x15\x73\x28\xec\xc4\x73\xd7\x9a\xc9\x9d\x0b\xa2\x1c\x7d\xf9\xf4\xf1\xbd\x59\xab\x35\x79\xfa\x19\x98\x2a\x7b\x79\x7a\xba\x92\x4a\xbf\xcc\x65\xa1\x4f\x01\xa2\xf8\x6c\x86\x90\x0f\x4c\x4d\x66\x7a\xc3\x2f\xc9\x70\x31\xbb\xd7\xf0\x62\xc5\xc8\x67\xd3\x9d\x47\x01\x1a\x72\x0c\x9b\x06\xfe\x76\xbf\x5d\x6e\x69\xeb\xcb\xfa\x93\x4d\x3d\x16\x2c\x25\x59\x70\x96\xa5\x3e\xaf\x17\x98\x32\xcc\x07\x2c\x20\x7a\x8e\xa0\xbb\xec\xca\x1a\xc9\xd8\x57\x2b\x12\xbc\xf9\x70\x0e\xf3\x96\xeb\xe0\x4c\x2a\xf2\x14\xfd\xe8\x9f\x8d\x94\x79\xe2\x7f\xff\xec\xac\xa9\xb6\x2f\xc2\xc5\x89\x33\xbc\x9a\x8e\xa8\x6a\x78\x36\x28\xc9\xe8\x86\x21\xe3\xe3\x32\x83\x65\x7f\x36\x73\x53\xf7\x16\xba\x39\xa4\x3a\x7b\x77\x46\x68\x9a\x16\x4c\xa1\xc7\xe9\x2c\x63\x54\x41\x62\x36\xe6\xd2\xad\x99\x7e\x3e\x9b\xed\xcb\xb0\x03\xb3\xd2\x2f\x7e\xf8\xe3\xec\xf9\xec\xf9\xec\xc5\x67\xf3\x79\xea\xfa\x36\xc7\x92\xab\x2f\x1b\x52\x8a\x8c\x29\x05\x47\x50\x1b\x2a\xb3\x2c\x18\x78\x2d\x0a\x56\x79\x82\x02\x7b\xa4\x14\x00\x80\x37\x9d\x28\x4b\x0f\x4c\x1b\x2a\x82\x1b\x6b\x0d\xfd\x88\x34\x67\x41\x78\x4e\x00\x41\x0b\x6f\xd8\x79\x09\x28\x23\xa5\xe1\xb1\xf9\x72\xc6\xbf\xb0\x6c\x63\xed\x79\x42\x8a\x13\x73\xaa\xe8\x1c\xb0\x26\x33\x36\x9b\xc2\x71\x60\x54\x41\x13\x5d\x16\x82\x94\x39\x9a\xb6\x05\xbb\x76\xa7\xc0\x9f\x24\x3c\xa0\xfe\xa8\x5d\x4e\x80\x05\x5e\x4e\x7e\x82\x23\x62\x4e\xb2\x7d\xb4\xe4\xc2\xf9\xb5\x1d\x97\xb4\xe8\xa5\x57\x08\xae\xf5\xb9\xec\x68\x66\x3d\x50\x0b\x87\xeb\x77\x96\x4d\x2a\x36\x4e\x96\xc9\x59\x01\x77\x73\x9e\xd9\x14\x8a\x9f\x3e\xbe\x9f\x91\xff\x2d\x4b\x68\xeb\x8e\x28\x74\xac\x25\x18\xef\x60\x1d\x8b\x39\xd7\x05\x2d\x7c\x37\x4d\xcf\xd7\x22\x74\xe5\xd3\xca\xb2\x9f\x1a\x86\xbc\xe0\x76\xe2\xaf\xb4\x66\xeb\x5c\xdb\x0e\x30\xe5\x5d\xa9\x58\x41\x00\x78\xab\x78\x42\x68\xa9\x57\x80\x07\x21\x97\x13\xf3\xe4\xa5\x19\xc1\xb5\x2c\xd2\xff\x17\x01\x1f\xe0\xf0\x77\x11\x02\x7f\x2e\xe8\x12\xd1\x3d\x4f\x2f\x27\xbf\x9b\xcd\x66\x97\x93\x67\xb0\x02\xbf\x96\xac\xd8\x90\x9c\x16\x74\xcd\x34\x5c\x8d\xcb\xc9\xff\xe3\x9e\xdb\xc4\x81\xb6\x97\xa9\x75\xcb\x8d\x02\xa2\x8f\x63\xf7\x2d\x22\x37\x92\x61\x83\x09\xfc\x41\x97\x5f\x89\x08\xdd\x88\xd0\xed\xb2\xd1\x07\xf6\xf6\xcf\xff\x7c\x62\x4f\xfa\x93\x7f\x7d\x7e\x1c\xd8\x5d\xbc\xb7\x0f\x1a\xc0\x8b\xcf\x22\x84\x37\x42\x78\x23\x84\xf7\x41\x43\x78\xf1\xae\x44\xf4\x6e\x44\xef\x46\xf4\x6e\x44\xef\x46\xf4\xee\xbd\x43\xef\xc6\x92\x2b\x11\xbe\x1b\xe1\xbb\x0f\x0d\xbe\x1b\x4b\xae\xc4\x92\x2b\xb1\xe4\x4a\x2c\xb9\x12\x4b\xae\x44\xb4\xff\x3d\x44\xfb\xa3\x05\xf2\x5e\x40\xfe\x2d\xf6\x7c\x6a\xb1\xff\xe7\x72\xdd\x8c\x00\x88\x00\xfe\x9d\x01\xfc\x35\x5b\xad\x7d\x18\x51\xfd\x03\xa8\xfe\x1f\x6f\x05\xd5\xdf\x7b\xed\x76\x70\xf7\xdd\x36\xbe\xbf\xd3\xc9\xf8\x80\x2a\xad\x18\x0d\xa7\x60\x09\xb5\xd6\xe5\xab\x17\xb3\x17\x7f\x98\x92\x3c\xa3\x42\x18\xb6\x01\x5d\xac\xe5\x15\x08\x0c\xf0\xf4\xff\x46\x45\xa6\x9b\x74\xda\x05\xbb\x7a\x31\x4c\xba\x9d\x18\x10\x03\x0b\x62\x60\xc1\xa3\x46\x68\xc6\xc0\x82\xbb\x0a\x2c\xe8\x06\x7f\xdc\x8b\xd8\x82\xee\xa1\x1d\x2d\xbc\x60\x3b\x87\x8a\x55\x5f\xbe\x35\x36\x70\xcf\xaa\xbe\x8c\x10\xa2\x62\x78\x41\x0c\x2f\xb8\x9d\xf0\x82\x11\x87\xf1\x48\x11\x06\x95\xfe\x13\x8b\xc0\xc4\x8c\xfa\x31\x29\x7c\x4c\x0a\x1f\x93\xc2\xc7\xa4\xf0\xf7\x2e\x29\x7c\xaf\x99\x2e\x56\x82\x89\x7c\x2b\x56\x82\x89\x95\x60\x22\xd3\x8f\x4c\x3f\x32\xfd\xc7\xc8\xf4\x63\x39\x98\x58\x0e\xe6\x1b\x2b\x07\x83\x07\xff\xa1\xd7\x84\x89\x91\xa4\x31\x92\x34\x46\x92\xc6\x48\xd2\x18\x49\x1a\x23\x49\x63\x24\x69\x8c\x24\x8d\x91\xa4\x31\x92\x34\x46\x92\xc6\x48\xd2\x18\x49\x1a\xeb\xc0\xc4\x40\xd2\x18\x48\xfa\x50\x03\x49\x63\x64\x58\x8c\x0c\x8b\x91\x61\x31\x32\x2c\x46\x86\xc5\xc8\xb0\x7b\x19\x19\xf6\x08\xca\xbf\x1c\x2b\x44\x6c\xcb\x04\x63\x90\x58\x0c\x12\xfb\x26\x70\xf6\x31\x48\xec\x6e\x83\xc4\xee\x69\x09\x9a\xbe\xc1\x1d\x39\x50\x2c\x16\xa3\x89\x0c\xe1\xde\x17\xa3\x19\x25\x5b\xc5\x90\xb1\x18\x32\x76\x9b\x21\x63\x77\x53\x96\xa6\x5f\xb9\x89\xb5\x69\x62\x6d\x9a\xbb\xab\x4d\xd3\x03\x18\x8d\x05\x6a\x62\x81\x9a\x58\xa0\x26\x16\xa8\x79\x44\x05\x6a\x7a\x28\x5d\x93\x7f\x23\x64\x68\xf6\xda\xc8\x3a\x32\xcb\x58\xf1\x91\x5d\x71\xb5\xc5\x08\xd8\x6e\x5d\x59\xed\x61\xa3\xf8\x7a\x5d\xa2\x6f\x40\x09\x9a\xab\x95\x04\x89\x1c\x9d\x3e\x28\x84\x21\x93\xc7\x23\x5d\x30\x95\x4b\x81\x87\xc1\xec\xa0\x62\x05\xa7\x19\xff\x37\x64\x6b\x14\x29\x49\x59\xf8\x4b\xe5\x63\xb4\x24\xc3\x8a\x08\x36\x04\xc1\x6b\x31\xf0\xb5\x19\xf9\x05\x5d\x05\x1d\x43\x5e\x51\x45\xe6\x8c\x09\xa2\xca\x24\x61\x4a\x21\x52\xc9\x16\xac\x07\x38\x4b\x42\x05\x69\xca\xbe\x17\x35\xc0\x6b\x60\xcf\x0e\xa0\xb9\x46\x1f\x83\x08\x1d\x27\x46\x83\x81\x13\x4f\x1d\xdc\xf8\x52\x3b\xc9\xe0\x0d\xd5\x14\x09\xf0\xac\x63\x8c\x20\xbe\x4f\xc9\xca\xb9\xe8\xe6\xcc\xfa\x79\x6d\x3a\x51\xe8\x79\x4a\xd2\x12\x28\x92\x11\xdd\xcd\x69\x9e\x6f\x2a\xff\xf6\x1b\xca\xd6\x52\x9c\x33\xb4\xa7\x9e\x9b\xef\x2e\xca\xcc\xfc\x9d\xf8\xaf\xa1\x7f\x0b\x67\x08\xcd\x0a\xeb\x0c\x9e\xd6\xb4\x0b\x6e\x96\xcb\xec\x5d\xe5\x31\xf4\x57\x3b\x00\xf4\x02\xe6\x0a\x7a\xa9\x2b\xa9\xe8\x72\x51\x98\x91\x54\x63\x90\x11\xd0\x69\x85\xf4\x22\xb1\x27\x22\xe0\x6a\x29\x1c\x7b\x70\xfb\xa3\x7f\xca\x01\xf3\x31\xfa\x32\x2f\xf8\x9a\x16\x3c\xdb\xc0\xf8\xfd\xc6\xdb\x25\x08\xe6\xb7\x4d\x63\x2f\xdc\x99\x8f\x4a\xfb\xb1\x95\xf6\x6e\x55\x0d\x6e\x01\x77\xf0\x08\xbc\xeb\xac\x75\x82\x5c\xc8\x0a\x5c\xec\x5d\x75\xab\xa2\x14\x9a\xaf\xd9\xec\x23\xbd\x7e\xeb\x00\x95\xd1\xac\x7c\x47\x66\xe5\x27\xea\xf6\xf4\x71\x3f\xa8\xc3\xd9\x95\x8b\x80\x47\x36\x83\x55\x1d\x3f\xf4\x59\xc1\x31\x84\xc6\xfe\x1c\x1e\xe1\xea\x88\xa0\xcb\xfa\x8d\xb5\x7e\x0f\xba\x2b\xff\xf0\x1f\xdb\x24\x82\x71\xd6\xd7\x7e\xbd\xbf\xf3\xa2\x8c\x16\x1b\xb6\x99\x62\xbb\xdf\x70\xea\xa7\xbd\x47\x96\xa3\x03\xff\xf7\x46\xd9\x0e\x0e\xde\x86\x54\x44\x83\xec\xfd\x33\xc8\xbe\x33\x3f\x3b\xea\xde\xbf\x9b\xea\x26\x16\xd9\x3c\x57\xb3\x6e\x31\x36\xda\x5b\x6f\x8b\xc6\x3f\x04\x3a\x3e\xde\xa8\xda\xaf\x18\xdd\xd4\x64\x6a\x7b\xf6\x92\xf9\x10\xb9\xac\xc4\xf7\xea\xac\xf5\x40\x2b\x48\x0a\x6d\x89\x62\x3a\xa2\x13\x22\x3a\xe1\x51\x92\x98\xc7\x25\x46\xaa\x9c\x25\xdd\x21\x56\x29\x53\x46\x78\x21\x73\xb6\xa2\x57\x5c\x16\xfe\xae\x05\x77\xfc\xd8\x13\x36\xa3\x3b\xa1\x22\x3d\x31\xc2\x6a\x39\xc2\x97\xe5\xb9\xb0\x27\x5a\xe7\x66\x82\x66\xa2\xd8\x43\xe7\x54\x93\xb2\x80\x9c\x11\xd8\xa6\x73\xa2\x17\xf8\x83\xa6\xce\xda\x20\x4b\x90\x21\xc0\x5e\x31\xdf\xa0\x05\xfa\x9a\x8b\x54\x5e\xc3\xfb\x46\x7a\x25\x67\x32\x2f\x33\x6a\x45\x6b\x90\xb9\xc1\xab\x32\x23\x1f\x19\x4d\x4f\xa4\xc8\x36\x0f\x62\x05\xf1\xcd\xb1\xdc\xaa\xbe\xf2\xc3\x6c\xe7\xdc\x0d\xea\xa6\xc0\x8d\x66\xc7\xaf\xa5\xc0\x7a\x2e\xa3\x18\x9b\x6f\xdd\xc0\x0e\xa2\x8a\x04\x8c\x2d\xb0\x61\x69\x42\xc1\x77\x46\xb9\x20\x40\xeb\xb6\xc9\xfe\xf0\xcc\x9f\xc0\x96\x0e\x90\x51\xa5\x2f\x0a\x2a\x14\x0c\xe1\x82\x77\xc5\x3c\xbe\xa7\x4a\x63\xcd\x22\xcb\x78\xed\x78\xb5\x7f\xcf\x01\xd6\xa5\x60\xee\x1c\x6b\xe9\x02\xe6\x6e\x06\x68\x82\x21\x01\x4d\x54\x8a\x2e\x3b\x46\xf7\x8a\xac\xca\x35\x15\xa4\x60\x34\x05\x8b\xab\x6d\xe9\x34\x50\xc3\x62\x52\xa6\x29\xcf\x5c\x5c\x00\xe0\x78\xfd\xd8\xbb\x6b\xdb\x30\xaa\xba\x44\x83\x0b\xd0\x65\xcd\x33\xeb\x12\x0c\xd6\xe3\x89\x22\x19\xac\xd4\x70\xd7\x7d\xb4\xe0\x3c\xb8\xff\x41\xaf\x53\xe7\x20\xbb\x28\x8c\x18\xf0\x67\x9a\x29\x36\x1d\xc6\x40\x6f\xba\x12\x02\x5d\x6c\x30\x4f\x4d\x75\x96\xfc\x27\x76\xb6\xb9\x0f\x5c\x13\xd8\xae\x6d\x17\x64\x9b\x8e\x5c\x6b\x88\xe2\x43\x62\x44\xd0\xc4\xc9\x57\x15\x71\x8c\xba\xef\x3d\x91\xff\x7a\x74\xdf\x57\x5e\xe1\xed\xde\xb3\xbd\x35\xdd\x4a\x7b\x88\x0a\xee\x23\x07\x14\xdd\x8d\xe2\x5b\x1d\xb0\x43\xeb\xbb\xe7\x56\xec\xdd\x4a\xfe\x4c\x43\xef\x15\x40\x10\x44\x32\x5a\xdf\x0d\x89\xa0\x8b\x45\x34\xcd\xd8\x3a\x37\x24\xa6\x4d\x12\xd7\x5c\x18\xd1\x70\xd3\x1f\x3c\xb3\x62\x58\xc1\xae\x5c\x07\xc5\xeb\x6c\x9c\x09\xf0\x43\xf4\xee\x83\xa7\xbd\xf2\x24\x06\x2c\x27\x97\x69\x90\x19\xc1\x70\xec\x8d\x8f\x6d\x80\x50\xec\x05\x38\xba\xac\xf9\x93\x15\x24\x29\xa8\x5a\x71\xb1\x44\xcf\x36\xd7\xd6\xed\x1f\xc4\x5f\xd2\x2b\xca\x33\xc3\xf7\xeb\x41\x42\xcf\xc9\x53\xf3\x31\x5f\x90\xb1\xe3\x05\x42\x15\x51\x52\x0a\xf3\x5f\x6e\xb3\x99\xd2\x74\x33\x2e\x77\x55\x65\x03\xff\x2b\x57\x5a\x16\x9b\xf7\x7c\xcd\x3b\x12\x75\x5d\xd4\x0a\xfd\xc9\x2c\x25\x2b\x6c\x0f\x08\x0a\x86\x7e\x5b\x89\x5e\x70\xef\x76\xb4\x12\x3f\x50\x2e\x20\x29\x08\x6d\x49\x39\x64\xf2\x2a\xb9\x5a\xf9\x28\x20\xf6\x35\xcf\x78\xc2\x35\xf9\x37\x2b\x24\x86\xf0\x4a\x1d\x20\x66\x6a\x8b\xf2\xe2\xf9\xc8\xb9\xa9\xde\xc8\xe5\x57\x36\xf4\x1a\x5d\xfb\xf2\x8a\x15\x90\xc5\xb1\xca\x9e\xb9\xa6\x82\x2e\x2b\xa5\xa3\xa6\xaf\x95\x4a\xfb\x5c\x36\x55\xa8\x25\x6e\x0f\x1a\x99\x52\x70\x6d\xae\xab\x86\x98\xda\x2c\x25\xee\xd8\x82\x90\x85\x01\xaf\x1d\x54\xe7\xc6\x65\x8b\x7f\x07\xff\x3d\xf1\x81\xe5\x87\x8d\x8b\xf5\x77\xaf\xbd\xac\xf5\x88\xe5\xba\x26\x00\xf3\x07\x6c\x90\x3b\xcd\x78\xb1\xd0\x17\x5f\xdd\x2e\x78\x8c\xcf\xc2\x32\x99\x24\x91\xf9\xc6\x0b\x2b\xa6\x33\x28\x32\x6a\xf6\x4f\xc8\xd4\x02\x84\xc2\xf8\xec\x60\xad\xa1\x81\x8f\x64\x7e\x0a\xd1\xcc\xe1\xbb\x7c\x41\x84\x6c\xb4\xe2\x41\x56\xaf\x67\x3b\x6f\x93\xd9\x9d\x4c\xd2\x54\x9d\x06\xfe\xeb\xd3\x82\x99\x63\x0e\xb4\xaf\xfa\xf9\x77\xb9\x4c\x4f\xfc\x9a\x6e\x57\x2e\x13\x59\x30\xb3\x2f\x67\x32\xbd\xb0\x6f\x39\x05\x1d\x19\xf1\xb9\x0f\x12\xe8\xd8\x1f\x0b\x0f\x70\x81\x04\x78\x7f\xf3\x8c\x26\x66\xb1\xf1\x66\xd6\x29\x9d\x0d\x91\x14\xec\x1a\x13\x9d\xee\xa3\xfe\x7e\xaa\x8f\x6b\x67\xde\xd5\x78\xbf\xc6\x97\xcc\x72\x9c\x76\x2c\xc7\x41\xa2\xef\x7a\x94\xed\x51\x5c\x0f\x15\xa1\xa6\xbd\xb7\x65\x26\xd9\x85\x01\xda\xb7\x3f\x00\x25\x36\x23\x48\xcb\x0c\x72\x98\x21\x6d\xfe\x99\x2b\x15\xfc\x68\xad\x4f\x7d\xad\x81\x4b\xb6\xf9\xa7\x51\x51\x80\x23\xbc\x96\xa5\xe8\x60\x05\xf0\xb3\x19\xf8\x8a\xaa\x15\xf1\xad\x95\xd7\x24\xfd\x0a\x34\x2f\x76\x75\xe4\x49\xa9\x5c\xc2\x5f\x04\x2d\x52\xa7\x1c\xa1\x43\x90\x5e\x49\x9e\x52\x91\x18\x2d\x38\x59\x51\xc1\xd5\x9a\x5c\xaf\x98\xc0\xdc\x34\x2c\x05\x36\x60\x49\x84\xcf\x0f\xe4\xbe\x2f\xd8\xb5\xd1\x3c\xda\x16\xff\x91\x5c\xc3\x2b\x94\x9d\x49\x8c\x6b\xbb\x69\x95\x9c\x8a\x17\xcb\xb9\x62\xc5\x95\x4b\x04\x50\x33\x7a\x3c\x51\xb5\xcd\x67\x07\xd5\x1e\x2a\x5b\xcd\xf6\xe8\x22\x6b\x4a\x19\x15\x5d\x34\xed\x3b\x72\x5b\x24\x04\x43\x4a\x03\x6e\xea\x30\xac\xbe\x92\xf4\x0b\x77\xe8\x0d\x1d\x87\x68\xd2\x82\x61\xb6\x44\x0b\xbb\x76\x89\x43\xaa\x66\x07\x22\xc1\xd8\xa1\x62\xfa\x74\xdc\x69\xe8\xb9\x44\x9d\xf3\xd7\x52\xd3\xac\x7b\x15\x02\x71\xd1\xae\x45\x7d\x76\xe4\x29\x26\x24\x33\x4f\xf0\xb5\x44\x16\x05\x03\xe6\xd7\xfd\xc6\xa1\x78\xd2\xae\x0b\x82\xd3\x7b\xe5\x8e\xfc\x0e\x27\x61\xeb\x1a\x98\x83\x00\xe9\x4d\xc0\x56\x64\xf3\xe5\x58\x4b\x52\xd0\xcc\x9f\x26\x11\x8a\xc1\x4f\x51\x0e\x87\xfc\xe9\xee\x98\x19\x06\x3e\x6b\x28\x04\xcf\x76\x99\x66\x8d\xa2\xee\x77\xe6\xeb\x83\xc7\xa4\x80\x0e\x35\x7a\x2f\x4f\x7c\xc8\x1d\xee\x76\x73\x61\x47\x47\x52\x6d\x1c\xd4\x27\x41\x8f\x7a\x30\xc3\xe4\xaf\xb7\x7d\x22\x91\xb7\xb0\xf4\x2f\x4c\xb0\x2a\xc0\xbf\x43\xb7\x95\x0a\x0c\x73\x86\xd3\x2c\x7d\x5b\xe2\x5e\x6f\xab\x34\x01\x63\x1e\x85\x5b\x72\x72\xe6\x8d\x89\x62\x78\x4d\x6c\x97\xc1\xaa\x1e\x22\xe3\x43\xbf\x4f\x63\x9b\xa4\xf7\xa9\x25\x4a\x6f\x95\xf8\xea\xaf\x78\x8b\x5d\x99\x68\x1f\x4d\x64\x57\x1a\x36\xa0\x29\x89\xc3\x39\x09\xa4\xa7\xad\xce\x7f\xb3\x65\x5c\x2c\xf1\xb3\x1d\xb2\x0a\x3e\x76\xdf\x41\xa4\x01\xc2\xd8\xd5\x8c\x9c\x59\x4c\xbf\x4f\xeb\xb4\xc9\x19\xf9\x4f\x72\xe9\x5e\xc3\x5e\x31\xd3\xfb\x58\x71\xa4\xf6\x6a\x60\xd9\xdc\x66\xcc\x0f\x8e\x22\x0e\x16\x8c\x8b\x18\xc8\xd0\x18\x0e\xe6\xa6\xfb\x45\xbc\x01\xf8\xf4\xe5\xa4\x96\x9a\xbe\xd6\x76\x0f\x08\xbe\x3d\x03\x3d\xd3\xe8\x3b\x31\x3e\xf7\xd6\xe0\x21\xf1\xad\x08\x13\x86\x3a\x28\x92\xb2\x24\xa3\xe6\x72\x5e\xb9\xb3\x80\x32\xf4\x99\xd1\xb9\xb0\x4c\x0d\x68\x8b\xe7\x3d\xee\x81\xe8\x09\x88\x48\x90\xc7\x63\x8b\x6f\xe4\xa9\x38\x64\xfa\x88\x6e\x7c\xc6\x79\xd3\x12\xad\x7b\x01\x1b\x2c\x48\xb0\xb7\x93\xfd\xc3\xbf\xb5\x0d\x41\xf1\x73\xc5\xb3\xb3\x4d\xc5\xaa\x55\xcd\x99\x7a\xe3\x41\xec\x08\x42\xa8\x8f\x7e\x0b\xf1\x3b\x38\x0c\xc1\xf7\x3c\x0e\x87\xd0\x6e\xde\x0f\x44\xa8\xf2\x36\x7f\xc3\x48\x04\x33\x50\x64\x71\xdd\x83\xbc\x00\xd2\x5d\x0d\x14\x53\x64\xda\x91\x5e\x53\xe5\x29\x4d\xc4\x45\xdc\x23\x5c\x44\x70\xb4\x6f\x1f\x18\xe1\xbf\xbd\x15\x19\x51\x6b\x59\x4f\xda\x52\x3d\x8b\xa0\x88\x7b\x22\x0a\xed\x12\x10\xd0\xbd\x7d\xfb\x5b\x38\x2b\xe9\x3a\x02\x24\xee\x18\x20\x71\xcb\xc0\x85\x6a\xe7\x0f\x85\x5c\xa8\x0b\x34\xa3\xe8\xd3\x20\x76\x61\xbc\xc4\x78\x7c\x54\xc3\xcf\x7b\x20\x1a\x1e\x04\x8e\x61\x9c\x71\x2c\xa7\xa5\xea\xb2\x40\xbd\x0b\xe2\xf7\xb0\x3e\x5e\xc8\x22\xb9\x22\xf8\x62\xb0\x47\x73\x29\x33\x46\xc1\x91\x92\x17\x72\x59\x30\xa5\xde\x30\x9a\x66\x5c\xb0\x61\x48\x09\xfd\x0a\x1b\x00\xe2\x12\x17\xb5\xe5\xaf\x89\x9c\x2e\x55\x84\xeb\x9d\xcc\x31\x4b\x2d\x4e\xba\x9e\x93\x7b\x8e\x29\x55\x9d\x93\xbc\xce\xdd\x9d\x33\x0d\x1d\xe6\xd2\xd0\x39\x0c\x20\xcf\x0b\x99\x98\x8e\xf1\xd5\x5a\x31\x15\xb0\x50\x86\x82\x1c\xd7\xe6\x5c\x9c\x35\x66\xfa\xf6\x6b\xc2\x58\x0a\xa1\xbb\x20\x0d\xf9\xf2\x6f\x65\xb1\x80\xca\x84\x36\x1b\x49\x30\x20\x14\x7c\x82\x78\xf6\x6a\x82\xf0\xb6\x25\x85\x4c\x69\xbe\x46\x4b\x5f\x59\x38\xc2\x0c\x6b\x46\xbb\x77\xa6\x76\x8e\xfe\xf0\xfc\xf9\xb8\x54\xb0\xe6\x8a\x81\xf5\xa4\x63\xb7\x3e\xf8\x2b\xe2\x2e\x2f\x56\xf0\x3c\x12\x5a\xe5\xc8\x40\x9c\xc0\x4a\xf4\x40\xc1\x38\xef\x6b\x55\x10\xe0\xc2\xe0\x86\xbc\x75\x80\x84\x70\x8e\x58\xdf\x02\x80\x09\xe0\x34\x84\xd7\x9c\x59\x9b\x2b\x7f\x54\x21\xbf\x84\x91\xef\x7c\xf2\x47\xd7\xa2\x3a\x66\xe3\x61\x3a\x87\x45\xd0\xa8\x5e\x84\xc6\x45\xf3\x52\x55\x30\x0d\xc8\xa6\xd2\x81\xd6\xa8\x63\x34\xcc\x94\x67\x5b\xdd\xbb\x78\x4a\xfe\xc6\x36\x3b\x45\x33\x04\xca\xbe\x43\x72\x0c\xa1\x81\x1c\x1c\xa3\x8d\x03\x52\xdd\x40\xa0\x9b\x80\x5f\x76\x37\x6a\xdc\x1d\x9a\xa4\x69\x34\x19\x27\x89\xa0\x02\x69\x65\x91\xf5\xee\x06\xa3\x2d\xf6\x63\xc7\x87\x3f\xf6\xd2\xcd\x8b\x86\x27\xa7\x62\xdd\xb0\xa5\x5d\xee\xae\xa6\xa7\x8b\x68\x5a\x2c\x59\xcf\x65\x1c\x0b\xcf\xb8\x29\x3e\x25\xb8\xfe\x17\xb5\xbf\x6f\x19\xa1\x52\x51\xb5\x3b\x41\xa6\x54\x2b\x7f\x14\x68\x4a\x87\xfd\xee\xd0\xd8\x94\xb1\x1e\xd1\x21\x2f\x68\xd7\xe6\x8f\xf4\x82\xc2\x79\x1f\x7f\x5d\xf0\x7a\x20\xf5\xbb\xf1\x2d\xe8\x97\x6e\x9a\x9f\x15\x52\x9c\x68\x56\xac\xb9\x70\x32\xff\xe0\xf7\xc9\x53\xcc\xbf\x64\x2b\xcc\x04\x25\xa2\x2d\x55\x1b\x0b\x2c\x2e\xc5\x1e\x24\x25\x78\x69\xfb\x4a\x79\x89\x46\x77\xb8\x99\xeb\x70\x5e\xa5\xb9\x4d\xe4\x04\xf2\x9e\xbb\x88\x75\xa9\x1c\x3c\xfc\x2f\x9e\x3f\xff\x2e\xb8\x36\x09\xcd\x69\x02\xb9\x8a\x2e\xb0\xea\xc3\xc6\x55\x04\x9a\xb3\xc6\x37\x9c\x27\xdb\xd5\x91\xdf\xb0\xda\xfd\x0b\x11\xc6\x38\x1c\x8b\x28\xd0\x98\xbd\x2a\x60\x82\x63\x56\x17\x2d\x0a\xe3\x57\x76\xd7\x63\x80\x45\x97\xcd\x08\x43\x2d\xd7\x31\x7b\xc4\x31\x1c\xd2\x43\xdf\x41\x2e\x46\xb0\xcf\x11\xde\xf9\x56\xeb\x40\x1c\xb1\x75\x62\x47\x8a\x54\xb7\xe8\x8d\x6f\x8f\xfa\x02\xfd\xf3\x2d\x17\xf7\x7e\xbe\xf9\xc0\xaa\x36\xde\xa2\x1c\x7a\xe5\x19\x1e\x57\xe7\x90\x6f\x82\x06\x8e\xee\x95\xaf\x26\xd0\x73\x4a\x2a\xe6\x3a\x74\x3a\xaa\x56\x84\x09\x55\x16\x1e\x99\x12\x94\x8a\xad\xd1\x14\xe2\x08\x6f\x13\xd7\x48\xc5\x06\x12\x8c\x0a\x8c\x5b\x8e\xfe\xfa\xe8\xaf\x7f\x8c\xa6\x61\x9b\xff\xf7\x3d\x4a\x07\x20\x47\x06\x77\xc8\xdc\x09\xa8\xd8\x06\xa9\x7f\x37\xf0\x77\x8a\x94\xc0\xdb\xb3\x40\x96\x80\xdc\x82\x78\xaa\xcf\x64\xfa\xd4\x28\x06\xce\x3c\x17\x74\x87\x41\x38\x66\xdd\xbf\x81\x7c\x11\x60\x69\x0e\xaf\xfb\x4e\xe6\xe6\x40\x97\xb8\xbf\xe9\x10\xaa\x41\x6e\xc3\x43\xec\xa1\xec\x86\x2b\xf0\xed\x65\x9a\x08\x96\x76\x37\x94\x47\x63\x4f\xb6\xf0\xd2\x43\xa3\x3c\xaa\x9e\x47\xa1\x3c\x3a\x9a\xf7\xa3\x3c\x2c\xa7\x06\x58\xe1\x9d\xc0\x3c\x9a\x08\x8a\x98\x74\xe2\x81\x83\x2b\xc2\x13\x75\xeb\xe8\x8a\xea\xec\x6f\x43\x57\xd4\x5b\x76\x25\x9e\xd8\x82\x2c\x8d\x18\x8b\x7b\x83\xb1\x70\x55\x70\xc2\x1d\x3b\x62\x2c\xea\x01\x0c\x7f\x81\xe2\x15\x11\x1b\x8f\x3c\xa5\xc5\xed\xd7\xc8\x69\x6b\xf7\x07\x02\x87\x34\xe4\xa0\x51\xe4\x75\x4b\x62\x8b\x4e\xfb\xfe\x30\x04\x24\xe2\x3e\x76\xc4\x7d\xf4\xdb\xc1\x9d\x69\xd4\x6d\x90\x68\x79\xfd\xdd\xbb\x37\x72\x8d\x07\x15\x7f\x9a\x7e\xff\x23\xd2\xe9\xd3\xdf\x5d\xaf\xa8\x3e\xe1\xea\x84\x9e\x6c\x21\xe4\xfb\xf9\xe4\xc3\xb2\xfb\x74\x28\x59\x86\x3d\x47\x95\x9f\xc0\x09\x49\x89\x2c\x85\x9e\xa1\xa5\x80\x7c\x61\x1b\xc4\x9e\xd8\x1a\xd3\x98\xac\x61\x44\x22\x0d\x6f\x9a\x0e\x64\xaf\x6f\x34\xb9\x86\x77\xa7\xdb\x03\xbd\x7b\xa6\x0d\xa8\x1e\x2f\x54\xb9\x58\xf0\x04\x98\x60\xcd\x98\x99\x32\x0d\x38\x89\x07\x91\xeb\x62\x0b\x9f\xb8\x0d\x37\x7e\x4b\x2b\x1e\xc7\x33\x46\xa7\x85\x18\xcf\x3e\x3c\x11\x6c\x8b\xe9\x23\x5c\x70\x35\xda\x58\x91\x65\x7f\x36\x46\xf9\xf5\x7d\x65\xb1\xf0\x9e\xde\x85\x57\x3b\xf8\xfe\x31\xdc\xda\x5d\x06\x8b\x43\xbb\xb5\xa1\x80\x0d\x1c\xc1\x41\x07\x5f\x6d\xdf\x2a\x82\x0c\x3e\xbb\xd0\x7b\xeb\x64\xe9\xcc\xdb\x6c\x9b\x04\xd3\xfd\xe6\xb6\x7c\xf4\xd6\x8d\x71\xc0\xff\xd2\x6a\x43\x0a\xb6\xc8\x5c\x89\xfe\x9a\x73\x7e\x31\x64\xee\xdb\x01\x2e\x31\xce\x3f\x5f\x5b\x40\x3c\xe4\xfe\xd0\xdf\xe0\x3c\x8f\x17\x49\x9a\x13\xc5\x79\x86\x63\x72\x02\xca\x3d\x97\x24\x76\x96\xda\xb7\x3a\x79\x7b\x62\x70\x07\x48\x2c\x08\xe3\x8d\x10\xeb\x2e\x6b\x79\x10\x6c\x5c\xd4\x7c\xb2\xdb\x7d\x76\x6b\xfa\x75\x6b\x82\x01\x07\x03\xae\x76\xb1\x91\x4d\x09\x6b\x5d\xa1\x23\x35\x84\x3b\x04\x70\x58\x17\x04\xfd\x77\x50\x8a\x6d\x5b\x2a\x08\x9d\x2b\x99\x95\xda\x1f\xdb\xa7\xec\xeb\x4b\xf2\xfb\x67\x04\x10\xc6\x39\x2b\xcc\x41\xa2\x4b\xbc\xce\x0d\xf7\x7f\x63\x10\xd6\xd7\xa2\x34\x2d\xb4\xbb\x76\xd6\x33\x0d\x9d\xbe\x78\xfe\xdd\xb3\x19\x79\xd5\xf8\x1e\x57\x24\xa1\x59\x62\xad\xe4\xa0\x5e\x07\x5f\x9d\x6f\x48\x21\x4b\x91\xe2\x8a\x5a\xa1\x3a\xf1\x1a\xf5\xf3\xca\x29\x8c\xca\x3e\x57\x46\x46\x7e\x8b\x65\xde\x5e\x22\x7a\x4a\x5b\x41\xdc\xec\x8e\x96\xe4\xc7\xe7\xdf\x4d\xcd\x58\xe1\xa2\xfc\xf8\xfc\x3b\x37\xd4\x9b\x25\x5a\x99\xb1\x99\x43\x2b\x77\x67\x77\x79\x06\x6b\xee\xc0\x0f\xdc\x8a\xbb\x4a\xcb\x3c\xb7\xe0\x11\xea\x13\x69\xb5\x5d\xbf\x00\x2a\xf3\xc1\xfd\xb4\xd0\x0a\x5c\x0e\xe6\x6d\xeb\x2b\xae\x4f\x47\x2a\xd6\xda\x1e\xac\x5b\x2e\xc8\xdc\x9c\x09\x45\xca\x1c\x80\x08\x8d\x56\xbe\x56\x1a\xa0\x17\x6c\x89\x34\x8b\x2f\xab\x00\xb2\xfe\x84\x41\x9d\x2f\xe8\x15\xf0\xe1\x2c\x55\x44\x0a\x2d\x09\x18\x9a\x1b\x7d\x4f\x89\x5e\x95\x0a\x7d\xe2\xb8\x86\x50\xf9\xcc\x72\xff\x3f\xe2\xd0\x65\xc1\x97\x5c\x0c\x1e\xb3\xf0\xfb\xb0\x54\x59\x06\x8b\xa4\x3a\x8e\xfb\xae\x72\x74\xa9\x79\x36\xe3\x42\x2b\x5d\xcc\xde\x09\xfd\x4b\x71\xbe\x87\xf9\xd5\x74\x72\xda\xd1\xc9\x28\xb2\x34\x2a\xf2\x7f\x2c\x5d\xda\x83\x18\x9d\x97\x45\x97\x55\xbf\x9b\x0c\xb5\x88\x8f\x4f\x6c\x43\xe8\x5c\x36\x70\x3e\xf5\xd7\x6e\x44\x89\x42\x8c\x7d\x48\x5c\x1c\x79\x70\x81\x01\xcf\x8d\x76\xf2\x73\x8d\xc2\x1a\x4a\xf0\xfc\xa6\x64\x28\xd4\xc9\x7f\xf8\xfd\x77\x63\x28\x8e\xbb\x43\x81\x2b\xda\xaf\x19\x35\x0b\x56\xe6\x84\xaf\xd7\x2c\xe5\x54\xb3\x6c\xe3\x3a\x62\x8d\x3d\xb4\xb7\x7f\x4a\x54\x09\x5a\xaa\x25\xba\x4d\xe2\x25\x33\x4c\x30\xe3\x6f\x6d\x2a\xb1\xf8\x27\xc4\x60\x90\x17\x96\x50\xd4\x63\x15\xe0\xae\x9b\x37\xe1\x0d\x20\x55\x80\x22\xfb\xc2\x8d\xd6\x3c\xdd\x3a\xfc\x45\x59\x98\x6b\x3f\x6d\x5c\xf1\x4e\x14\x5d\x03\xe5\x02\xde\xac\xd6\xf5\x05\x43\x81\x25\x6d\x9d\x43\x3e\xd8\xf5\x9e\xee\xc9\x87\x6f\x91\xfb\xf6\x9d\xf9\xfd\x4f\x72\x2a\xaf\x45\xff\x9d\x01\x42\x60\x6f\xcb\x9e\xe7\xbd\x1e\x4a\xd2\x38\x30\xe6\xeb\xa6\xf5\x1f\xdb\xfb\xba\xc3\x45\xb0\xa7\xb6\xc6\x9d\x40\xec\x9e\x8e\xf8\xba\x3f\xb0\x0b\x89\xa5\x56\x81\xa9\x26\xd4\x7e\xa6\xe3\xce\xb6\xce\x76\x1f\x4a\x74\x2c\x87\xb2\x47\xbc\xc6\x03\x8f\x73\xc4\x6f\x8b\x83\x05\x75\x44\xc7\x60\x29\xb7\xbd\x6b\x16\xa8\xca\x74\x04\xbe\x85\xc4\xac\x9b\x2f\x9d\x0b\xb2\xd3\xb6\x5e\x2e\x36\xf9\x08\xf6\x97\xd3\x42\xf3\x6e\x8d\xf3\xcc\x3d\x6a\x54\xef\x93\x45\x0a\xe2\x0a\xd5\xd6\x2e\x6e\x7e\x0c\x4b\xa9\x56\xb2\xa3\xef\x3d\xb0\xea\x56\x62\xeb\xb8\x90\xa7\xf6\x26\x8a\x32\xcb\xba\x77\x25\x18\xc5\xa0\x2c\x11\x0c\x36\xb0\x20\xa1\x47\xda\x1d\x67\xc0\xad\x82\xa5\x5d\x69\x08\xa5\x83\xaa\xc9\x66\xdd\x66\xe4\x9d\xff\xb7\xc3\x66\x71\x61\x04\x00\xf5\xf2\x52\x90\x13\xf2\x81\x69\xa3\x3a\xbe\x24\xaf\x88\xe2\x62\x99\xc1\xcd\x35\x17\x03\x4a\x7b\x8b\x14\x8a\x62\x0b\xba\x66\x33\x68\x7e\xae\x65\x41\x97\xec\x25\x79\xa5\xc8\xda\xb0\x86\xbf\xcb\xac\x5c\xb3\xd7\x19\xe5\x6b\x45\xa8\x77\xae\x41\xc9\xf3\x8b\xc6\x62\x2f\x4b\x5a\x50\xa1\x59\x05\xb9\x44\x19\x5a\xe0\x18\xdc\xb0\x37\x68\xc4\xa4\xd9\x35\xdd\x98\xaf\xe4\xbe\xa6\x3d\x5d\x9b\xe1\xc1\x08\x7c\xe3\x88\xbb\x8c\xb8\xcb\x47\xe2\xe0\xbd\x65\xb4\xa1\x63\x64\x15\xb5\xf0\x04\x85\x5b\xa9\xc1\x9a\xc0\xc6\x9a\x4a\x43\xd2\xbe\x13\xdc\xaf\x6d\x0c\x3f\x0b\x87\x11\xf4\xbb\x1f\xd2\x6f\xcf\x39\xec\x86\xab\x6b\xce\x7e\x1b\xd9\x3f\x34\xb2\x2e\xe8\x7a\x14\xb4\xae\xab\x7d\x3f\xb6\x4e\xd9\xd6\x77\x86\xad\xbb\x17\x29\x94\x22\xae\xee\x30\xb8\xba\xf0\x34\xdd\x3a\xae\x2e\x38\xf8\xdb\x80\x75\x8d\xa6\x5d\xc8\xba\xa0\x49\x84\xd6\xdd\x13\x09\xc5\x3b\xf9\x6e\xea\xfc\x0b\xa5\xf4\x88\x6d\xbb\x8f\xa2\xcf\xce\x40\xb2\x70\x4b\x0f\x84\x24\x6b\x72\xfe\x01\x82\xf2\x8a\x34\x1a\x0f\xa0\xc9\x42\xb1\x67\x8f\x8c\x42\xd3\x89\x62\xc5\x15\x4f\xd8\x07\xba\xee\xc8\x2f\x94\xcb\xf4\x67\x88\xb6\x59\x33\xa1\xcf\x64\xc6\x93\x8e\xe4\x14\x1d\x8d\x9c\x59\x1b\x63\x29\xbd\x59\xc7\x01\x4e\xac\x0d\x05\x36\x91\x66\x68\xd0\x21\x65\x3e\x45\x4b\x11\xc6\x5d\xfa\x80\x4b\x29\xd0\x91\x33\x25\x80\x5c\x63\xc2\xdb\x77\x9c\xf5\xcb\x47\x13\x91\x1c\xbf\xce\x15\xf9\xfc\x4b\x01\x88\x32\xc0\x23\x7c\x86\x9e\x0b\xd6\x1e\x09\x17\x84\x0b\xf3\x87\x51\x6c\x2d\xd8\xe8\x69\x2e\xd3\x93\xe7\x53\xeb\x14\x91\xe9\xc9\x8b\x29\x61\x3a\x79\xe6\xfc\x2f\xad\x24\x3b\xd7\x94\x1b\xfa\xa6\x79\x46\x18\x4d\x56\xe0\x4f\x72\x80\x35\x97\xc6\xc7\x26\xe2\xe1\x62\x39\x23\xff\x68\x4e\x62\x5a\x65\xc0\x40\xeb\xd7\x5a\x5e\x55\xd9\x74\x64\x9e\x4b\xc5\x35\xc3\xe1\xe1\x84\x69\x06\xc4\x16\xb2\x04\x07\x93\x3e\xa3\x05\xcd\x32\x96\x7d\xb6\xa6\x8c\xb0\x68\x8e\x13\xda\x73\xdb\x06\x33\x0e\x39\xa4\x94\x13\xf4\x71\x2f\x1c\xec\xcf\xcc\x0c\x00\x7e\x66\xea\x52\xd8\xa7\x60\x79\x83\xae\x53\xc8\xb7\x0c\xd6\x31\xe7\x40\x94\x22\xe9\x0a\xe7\x1c\x72\x80\x17\x0d\x07\x78\xdb\xdd\xe0\x5b\x58\x99\x03\x6d\x02\x0e\xc3\x03\x4b\xa2\x98\x5d\x3b\xd7\x97\xb0\xf1\xe9\x42\x31\x6f\xe9\xc3\xd8\x33\x2e\x94\xa6\x42\xf3\x0a\x20\xe2\x2d\x07\xae\x4b\x4c\xc8\x6f\xe4\xb2\x2b\x9e\x96\x34\x0b\x30\x51\x99\xb2\x31\xe1\xb4\xc3\x9c\xb2\x99\x91\x77\x8b\x10\xfd\x37\x75\x67\xf3\x08\x59\x7f\xba\x5a\x79\x10\x41\xcb\xd0\xed\x5a\x37\xb2\xac\xac\x29\x47\x3c\xa7\x3f\x6f\x01\x49\x79\xa2\xfc\x6b\xae\xb4\x17\x9e\xbf\xe6\xaf\x6e\x29\x10\x6e\x03\x41\xf5\xee\x6b\x86\xbd\x78\xd6\x85\x06\x5a\xea\x94\xb9\x6c\x43\x68\x9e\x67\x9c\xa5\x2d\x92\x67\x85\x97\xfa\xfd\xae\x5c\xc4\x37\xcf\x2f\xa4\x0e\x85\x65\x7c\xc4\xb0\xc3\x90\x39\x74\x2c\xa0\x7f\xe8\xd1\xb4\xe6\xdf\xee\x3e\xe1\x63\x5c\xc3\xa5\x99\x8c\x50\x7d\xaa\xba\x6b\x0b\xeb\x08\xf1\xf6\x8e\x6e\x36\x0e\x24\x52\x22\x20\xae\x2a\x37\x47\xce\xa8\x51\x55\x02\x95\x86\x8d\xd0\x8f\x44\xcf\xd0\x58\xb0\x64\x9a\xbc\xf9\x70\x7e\xea\x0c\x96\x76\x87\xd1\x79\x80\x5b\x47\xb5\xa1\xac\x2f\x81\xf0\x3b\x7e\x7b\x82\x54\x6c\x16\xcc\x78\x66\x8f\xe4\x4c\x5d\x25\xb3\x24\x2b\x95\x66\xc5\x2c\x93\x09\xcd\x2c\xab\xb9\x9c\x74\xf4\x70\x39\x31\x63\x6f\x54\x91\x0b\xcd\x9f\x9d\xd9\x46\x02\x85\xa9\x17\x06\xaa\x6f\x0d\x06\xfa\xd6\xb1\x38\xa5\xe9\x3a\x67\x29\xd8\x56\x3a\xa6\x02\xdd\x2f\xca\x6c\x61\xfe\x0b\xfb\x5e\x27\xae\x96\x86\x96\x82\xff\x5a\x56\xa6\xda\x4a\x84\x2d\x98\xf2\x20\x94\x86\x94\x73\xc4\x5a\x68\x65\xa3\x5a\x43\xcd\x55\x10\x0c\xa3\x51\xd5\xa1\xb6\xa0\xe6\x93\x72\x83\x0e\x0f\xeb\x23\xaa\x4c\x55\x8d\x45\x32\xa2\x00\xad\xc8\x29\x9c\x8e\x14\x32\x7a\x79\xee\xb6\x9f\x61\xaa\x59\x5c\x6d\x3a\xb9\xaa\xcc\xf0\xae\xef\x0e\x66\xdc\xd5\xaa\x9e\x8a\x37\x41\x43\x3e\x26\xf3\xf3\x78\x0e\xeb\x7e\x83\xbc\x19\x0b\x56\x30\x23\x06\x90\xa6\x75\x3f\x90\x9c\x3a\xee\xf0\x9a\x22\x16\xa6\x71\x8f\x39\xc3\xb4\x49\xf8\x59\x6e\xd6\xeb\x9a\x6e\x5c\x65\x3f\xe4\x5e\xb8\x3f\xe1\xc5\xa7\x58\x2b\xe7\x2d\x94\xf3\x83\x77\xbd\xa9\x10\xa3\x61\x0c\xa9\xc1\x33\xe8\x9c\x77\x52\xb0\x0a\x1b\xf9\x74\xbe\x01\x72\xf6\x8c\xe0\x8a\xfc\x0c\x09\xa4\xb8\xb0\x45\x07\x5d\x0c\x84\xdd\x53\xed\x45\x91\x57\x5d\x1f\xd3\xf4\x0b\x53\x24\x2f\x58\xc2\x8c\xe2\xc1\x90\xc5\x50\xb1\xb1\x9d\xab\x66\x3f\x53\xf4\xd7\x78\xb9\x04\xbc\x2b\x37\x00\xaa\xfa\x1b\x61\xb8\x2a\x48\x2c\x81\x53\xc6\xa8\x45\x3b\xeb\x45\xa3\x8a\xef\x75\x7e\xed\xd6\x33\xab\xb5\xed\xa9\xe3\xac\x39\xdb\x41\xd9\x6c\x67\x25\xac\x1f\x94\xbd\x2d\x83\x59\xfd\xb9\xb7\x8a\x6f\xcb\x6b\xd6\x60\xb6\xbd\xf7\xf1\xdb\xa9\xbd\x17\xd8\x15\x8f\x81\x05\xef\x34\xb1\x1f\xa9\xfe\x5e\x3f\x8c\xb9\xd1\xa0\x1d\xee\x04\x1c\xc9\xb1\xfe\x41\x49\xa4\x62\xc9\xe1\x73\x2b\x9f\x7b\x0e\x09\x9d\xf8\xaf\xee\xb6\xbd\xf5\xb7\x06\x26\x83\x0d\xa6\x58\x99\x55\xbb\xa4\x22\x75\x26\xed\x06\xd6\x16\x1d\x3c\x0a\xc1\x82\xcb\xeb\x6c\x59\xb1\x5f\x4b\xa0\xcd\xff\x7c\x3e\x6d\xac\xde\xb3\x4e\x61\x6c\x0c\xcc\xbd\xdd\xa6\x03\xe5\xdd\x99\x89\xce\x43\xcd\x6b\x17\xf8\x9d\xc6\x0a\x80\x86\x71\xa6\xde\x02\x5b\xd7\xd8\xaa\xde\xa6\xd6\x0c\xc0\x7d\x59\x06\xa3\xc4\xaf\x4b\x6b\xf7\xb5\xbb\xfe\xea\xec\x9d\xb5\x27\x1e\x06\x41\x5f\x7b\x7c\xa3\x83\x57\x45\x2e\x50\x48\xb7\xb1\x21\xaf\x3b\xfc\x00\xfb\xa1\xee\x9b\x46\x87\x7d\x06\xb8\x53\x56\xb6\xfe\xe3\x5d\x7f\x7e\xec\xd3\xed\x26\x7e\xd2\x48\x16\x37\x75\x0f\x9e\x75\x1d\xf6\xad\x99\xe5\x1a\x0d\x6e\x89\xe0\xd4\x97\xee\x90\xa9\xe7\x3a\xc9\xf8\x76\x01\x63\x7c\x81\xb8\x7e\x65\xa2\xbe\xe3\xaa\xa6\x63\x0c\xac\x1a\xa8\x1f\x36\x1d\x70\xce\x0a\x33\x6f\x57\x41\x0c\x08\x07\x96\x12\x65\x0a\xe4\x4e\x9a\xe2\x94\x68\x56\xe1\xb0\x14\x11\x2c\x61\x4a\x51\x2c\xe0\xee\xfa\x08\xa0\x6e\x8e\xa1\x57\x7b\xe0\x46\x77\xa8\x4c\x78\x9f\x3c\xa6\x6e\x10\x32\xa6\x50\xf8\x00\x57\x61\x33\x99\xdc\x00\x78\x6c\xaf\xb4\x78\x5d\x70\xb8\x61\xe7\x65\x7d\x03\xb5\xf5\x67\x0e\x6a\x90\x47\xcf\x8d\xd7\x35\x8b\xee\xe3\x3c\x67\x9a\xbe\x98\xb5\x85\xb5\xc1\x7c\x8a\x6f\xcf\x3e\xbe\x7d\xfd\xea\xe2\xed\x1b\x72\x82\x26\x9d\x65\x21\xcb\x3c\x24\x57\xed\x0e\x09\xe6\x96\x2c\x98\xbf\xce\xc1\x08\x7e\x38\xed\x10\x17\xc9\x39\x63\xd6\x38\x60\x54\x36\xc8\x93\x69\xeb\xe3\xad\x9d\x71\xcd\xdc\x76\x68\xdb\xf5\xc1\x75\x9e\x31\x97\xf2\x9e\xf0\xb5\x61\x85\x46\x48\x54\x82\xe6\x6a\x25\xb5\x77\x3b\x13\x4c\x94\xf0\x1a\x3c\x67\xce\x2a\x5f\xd7\x56\x15\x2b\x38\xcd\xf8\xbf\x5d\x85\xcf\x94\x85\xbf\x54\x36\x18\x87\x2e\x46\x95\xd1\xc6\x66\x78\x67\x29\x8a\x9d\x08\x81\xa5\x5d\x43\x5e\x51\x85\x18\x6e\x55\x26\xe6\x72\x42\x18\xa0\xa3\xa3\x10\xbc\x11\x20\x7f\xbd\x0f\xef\xa2\xc6\xd7\xad\x2d\x86\x72\x70\xce\xf2\xb4\xf2\x1f\xd9\xf4\xa7\xe8\x0e\xc4\x68\x0e\xa3\x82\x62\x39\x82\x52\x3b\x69\xfe\x0d\xd5\x14\xf5\x82\xae\x65\x05\x37\xe4\x94\xac\xe4\x35\xbb\x62\xc5\xd4\x0c\x04\x1d\x03\x69\x90\xf7\x7f\x4a\x52\x2c\x43\xc0\x35\xdc\x6d\xb3\xdd\x73\x69\x75\xdc\x2a\x40\xc4\xac\x64\x37\x7d\xc3\x6d\x76\xf1\x35\x22\xf5\x39\xec\xa7\x35\x2f\x29\x37\xcb\x65\xf6\xee\xaf\x6e\x38\x5c\x3b\x14\x90\x2a\xad\x55\x4c\xa2\x7e\x82\xd5\x64\x6b\xbe\x70\xa3\xdb\x2c\x51\x1f\x5f\x94\xba\x2c\xfc\x51\x53\x68\x7a\x4c\xec\x89\xb0\x46\x61\xb3\xee\x29\xdc\x44\x23\x59\x99\xa9\x29\x4d\xe7\x3c\x43\x4f\x00\x16\x2c\x28\xf8\x9a\x16\x3c\xc3\x58\x59\xbf\xf1\x76\x09\x82\xf9\x6d\x57\x1d\xed\x3d\x8c\xd8\x80\x63\x63\x03\xba\xd3\xa9\xc0\x2d\x70\xae\x58\x7b\xd7\x59\xeb\x04\x39\xa3\xb3\xde\x27\x7a\xa9\x28\x05\x80\xd1\x3e\xd2\xeb\xb7\x5f\x35\x13\xca\x2a\x8f\x11\x53\x70\x07\x65\x27\x1f\x78\x42\xc9\xa2\x57\xe1\xa8\xf8\x61\x4d\x50\xf1\x56\xe8\xf0\x08\x37\x7d\x77\x6f\x6c\xcd\xa7\xad\x7a\xe2\xde\xb0\xac\x60\x16\xfd\x56\xc0\xce\x8b\xb2\x9b\x3c\xb3\x0d\xd7\xd5\xfd\x06\xde\x37\x7f\x99\x2c\x5b\x07\x21\xc0\x5b\xc8\x3b\xd8\xb8\x95\x05\x22\xf8\xeb\x7e\x10\xf8\x5d\x6a\xd7\x75\x08\x3c\x37\x37\x13\xf6\x0a\xd9\x11\x41\x76\x5b\xd4\xfe\x21\x50\xf4\x5d\x91\x6b\xbd\xc7\xea\x30\x28\x36\xec\x7e\x64\x6d\xf3\xed\x2a\xe1\x9b\x5a\x65\xaf\x01\x55\x30\x2c\xce\xb2\x8b\x0a\x18\xeb\xab\x3f\x34\xc2\x1c\x49\x5f\xac\xaf\x7e\xb3\xfa\xea\x4d\x1a\x75\x77\x45\xd6\x5b\x23\xd9\x29\x56\xa8\x73\x1e\x63\x88\xf2\x81\x63\x86\x9a\xdd\xc7\xc2\xeb\xb1\xf0\x7a\x8c\x61\xba\xff\x85\xd7\x9b\xf7\x36\x56\x5f\x7f\x54\x82\xd2\xdd\x55\x5f\x6f\x29\x01\x51\x65\xfd\x96\x4a\xb0\xb7\xb6\xff\x38\xaa\xe5\x47\xeb\xdd\x19\xa7\x62\x86\xaa\x9e\x7b\x13\xd2\x40\x58\x5a\x12\x68\x85\x55\xbd\x3f\x2d\xbd\x0f\xa9\x26\x85\x6c\x23\x71\x82\xae\x8d\xc8\xe1\xde\xbd\x90\x91\xdc\x45\xbd\xf0\x01\xd1\x17\xd1\x19\xce\xf1\xd1\x9e\xf0\x97\x68\xac\x69\x84\xb4\x7c\xb0\x91\x1d\x3d\xf7\x24\x90\xe5\xaa\x5b\xd1\x29\xcf\xd9\x12\x87\xee\x70\x07\x02\x92\xaf\x49\xbe\xab\x86\xe5\x2e\xfc\x6b\xe8\x3a\x40\x2b\xbd\x32\xdb\x40\x7b\x80\xa3\x10\x46\x57\x35\xb0\x39\xc6\x1d\x4e\xce\x88\xf7\xc1\xe0\x3a\x28\x42\x85\xa0\x39\xab\x5d\xfd\x96\x68\xb7\x03\x55\x6d\xcc\x64\x1c\xa5\xdc\x16\x4e\x5a\x6f\xd9\x1b\x4b\x3a\x5e\x11\x1f\x54\xc7\x5c\x84\x4a\xac\x59\xb0\x63\xcd\x82\x9c\x96\x8a\x75\xd0\xb8\x77\x81\x8f\xce\x02\xc0\xd2\x9a\xdd\x14\x5f\x0c\x36\x66\x2e\x65\xc6\x28\xf8\x8d\xf3\x42\x2e\x0b\xa6\xd4\x1b\x46\xd3\x8c\x0b\xd6\xbb\xf8\x61\x72\x3c\xd0\x30\xb9\xa8\x2d\x3f\x6d\x54\xc5\x5d\xd3\x2f\x8c\xb8\xde\x5d\xb0\x16\x4e\x3a\x58\x1a\x5c\xdc\x05\xe5\x99\x03\xa5\x74\x56\x56\xb6\x71\xaa\x18\x22\x8b\xf8\xb5\x42\x26\xa6\x63\x7c\x35\x78\x0b\x6d\xb4\x34\xd4\x7d\xb9\x36\xe7\xe2\xac\x31\xd3\xb7\x90\x27\x11\xdc\xf3\xa0\x40\xba\x8d\x53\x65\xb1\xa0\x49\x15\xed\x58\x2b\xab\x0f\xd9\x5f\x2b\xcc\x4a\x35\x41\x78\xdb\xd2\x74\xa6\x34\x5f\x87\x71\xcc\xa0\xe1\x9a\x35\xa3\xdd\x3b\x53\x3b\x47\x7f\x78\xfe\x5c\xdd\x18\xbc\xfa\xa1\x55\xb5\x02\xf3\x3f\xde\xa0\x62\x85\x99\x5c\x6f\xcd\x8a\x43\x46\xad\xd6\x13\x6c\xd7\x53\xfc\x29\x8c\x1f\x42\xa0\x94\xc4\xa0\xa2\x8a\x2f\x1c\x69\x7a\x3f\x8c\x9d\xde\x00\x67\x0b\x25\xd1\x80\xcb\x35\x59\x9c\x21\x09\x36\x07\x22\x48\x9d\x46\x58\xf8\x87\xa3\x28\x19\xa3\x40\x4e\x16\x66\x62\x5e\x30\x35\x1d\x48\xb1\x0b\x7a\xb1\x8f\x29\xf6\x87\xc2\x62\x35\x0e\x1f\x10\xbb\xb0\x55\xa9\x67\xe4\xad\x2b\x7d\x1c\x6e\xd1\x35\xe4\x26\xf6\x91\x5f\xf8\x5a\x50\x93\xc3\xdd\x34\x80\xc0\x19\xe9\x96\x2e\x16\xf5\x16\xe9\x2e\xd6\xd4\x9d\xe2\x55\x7b\xe3\xfa\x2e\x9a\x57\xdd\x81\x6a\xa5\x83\xcc\x8e\x2c\xf7\x3c\x1c\xa0\x81\x67\xf7\x6f\x6c\xb3\x43\x95\xc6\xb6\xfd\x36\x00\x99\x6e\xaf\xfb\xd1\x8a\xee\x54\x9d\xe1\x9d\x37\x8a\x9b\xdc\xd3\x62\xdd\x19\x1c\x36\x24\xf0\xdc\x76\x68\x58\x8f\xe9\x7c\x64\xe1\xf0\x9d\x8b\x91\x0e\x8b\x51\xbb\xd7\xe8\x68\xa4\x2d\x6d\x14\xc9\x1f\x55\xa1\x63\xa8\x92\xfe\xd8\xe0\xac\xe1\xb8\xb5\xd7\xdb\x22\xd4\xde\xd4\x6a\xf7\x87\x7f\xdf\x72\x7c\xda\x0e\xa5\x24\x8e\x11\x97\x56\xad\xfc\x11\xc2\xd2\xfa\xbd\x38\x87\x0e\x4d\x1b\x13\x16\x75\xd1\xa8\xf0\xe1\xae\x8b\x0d\x0b\xe9\x14\x12\x0f\x54\xde\xa3\x71\x67\xf0\x8e\x20\xd5\xbc\xf1\x55\xe8\x17\xd8\x9a\x9f\x15\x52\x9c\x68\x56\xac\xb9\x70\x6a\xcc\xe0\xf7\xc9\x53\x84\x8d\x87\x05\x5c\x2c\x0c\x15\xe9\xdb\xb3\xb1\xa1\x48\x62\x0f\xba\x12\x66\xc4\xde\xba\x52\x5e\x48\xd3\x7d\x89\x95\x11\x67\x6e\x24\x07\xcd\x2d\xfe\x1c\x44\x58\x77\x1b\xeb\x8a\x06\x84\x7f\xbd\x78\xfe\xfc\xbb\xe0\xee\x24\x34\xa7\x09\x40\xac\x2f\x56\x6c\x03\xf6\x1a\xc6\xa1\x5e\xc1\x9c\x35\xbe\xe1\xb2\x94\xcf\x4b\x0d\x32\xe0\x86\xd5\x2e\x61\x2d\xcf\x07\x0c\x07\xbe\x87\x92\x3e\x13\x21\xf3\x1c\x1d\xe8\x35\x54\x9d\xe7\x86\xc7\xa0\x0a\x88\x0b\xb5\x75\x9f\xfb\xc1\x08\xb8\x07\x8c\x81\xea\xa7\x19\x63\xb9\xe9\xf6\x28\xa8\x76\xeb\x40\xa0\x59\xc9\xeb\x1d\x24\xb3\x43\x84\x1f\xb9\xf8\x02\x2b\xbf\x43\xbc\x91\x9a\x91\x33\x24\xe5\x44\x8a\x6c\x43\x78\xe8\x50\x09\x23\x8c\xc8\x7f\xb6\x23\x77\x76\x96\xd9\xbb\xea\x48\xec\xe0\x66\x04\xe3\xa3\xb9\x06\x97\x93\x8f\x0c\x4f\xef\xe5\xc4\x9c\xf3\xcb\x7a\x84\xd5\xe5\xe4\x08\x11\x47\xc3\xb3\x18\x3a\x34\x0d\x39\x70\x9c\xcd\x7f\xfb\x9e\xf7\x22\xa0\x6b\x39\x8c\x42\x3f\x80\xd1\xc8\xde\x2d\x5c\x1e\xfc\xe7\xd3\xf0\x89\x65\xe4\x20\xe8\x8d\x0c\x38\xec\x06\x42\xf7\x66\xfc\x1e\x5e\xc0\x58\x4e\x24\x96\x13\x89\xe5\x44\x62\x39\x91\x58\x4e\x24\x96\x13\xb9\xd7\xe5\x44\x3a\xd8\x58\xac\x29\x32\xa2\xa6\xc8\x81\xeb\x87\xe0\x36\x9c\x9b\xf3\x3d\x28\x3b\x40\x52\xcf\x7a\xe1\x10\x7b\xe4\xad\x57\xdb\x7a\x80\x9c\x03\x3d\xc2\xe2\x23\xfc\xe1\x01\xc3\x1f\x76\x87\xc5\xff\x74\x5b\xd1\x9f\xc7\xc7\xdf\x87\x57\xae\xe9\xe5\x07\x4e\x78\xf4\xdd\x31\xe3\x3a\xa1\x22\x3d\xb1\xee\xd6\x5d\x95\x64\x20\x57\xdb\x40\xfd\xed\x62\x21\x77\x37\x41\x48\x5d\x74\x22\x45\xb6\xd9\x73\xae\x7b\x84\x0d\x54\x8b\xb4\x85\x31\x1c\x25\x58\xa0\xfa\xfa\x36\xb6\x63\x0b\xce\x84\x1e\x2c\xaa\x71\xd1\x99\x4b\xd7\x06\xec\x49\x95\x73\x47\xc0\x46\xa8\xfd\x7d\xf6\xb7\xb6\xe6\x89\xb9\xa0\x13\x56\xb9\x23\xac\x3c\x68\x39\xcc\xf1\x58\xf2\x88\x54\x84\x55\xb3\x31\x95\xe1\x5b\x0b\xb5\x7f\x2e\xc2\xfe\x15\xa4\x89\x2e\xeb\x8a\xa5\xb3\xdd\x57\x2b\x19\xde\xb6\x9d\x16\x72\xc8\x47\xbd\x47\x82\x66\xe5\x32\x34\x37\x2e\x7c\x77\xde\xe5\x52\xb1\xe2\x64\x59\xf2\x94\xd9\xdc\xca\x1d\xa9\x95\xf7\xc5\x80\x4d\x27\x68\xd5\x3d\xdf\x32\xbd\x96\x0b\x7e\xe4\x04\x2b\x60\x84\xcb\x4b\x01\xba\x5e\x10\x6a\x09\xa9\x56\xd6\x34\x3f\x99\x53\x23\x36\x83\xbc\x63\x56\x85\x7d\x35\xe7\x4a\xf1\x2b\x48\x93\x6c\x9f\xfa\x29\x57\x3d\xa7\x52\x80\x97\x1c\xfc\x6c\x46\x7c\x2a\xa4\xa1\x73\x56\xf6\x0d\x44\x02\x85\x4e\x3c\x2b\x90\x38\x27\xb4\xcb\x42\x66\xbd\x6e\x6b\xa3\x03\xe1\x49\x86\x1d\x3d\x01\xb9\x9d\xa8\x8d\xd0\xf4\x2b\x18\xe0\x40\x8f\x82\x35\xb3\xf9\x93\x44\xb6\x21\xaa\xcc\x73\x59\x68\x15\x4c\xc4\x0f\x75\xea\xb2\xc9\x54\x1e\x42\x90\xe9\x9a\x0d\xdd\x43\xa8\x06\x90\xa3\x52\x7c\x6b\xa9\xb9\xb7\x5a\x55\xb7\x11\x8e\x71\x05\x01\x47\x84\xde\x86\xca\xc8\x70\xec\x6d\x2d\xff\xe0\x2e\xc1\xb7\xb1\x2c\x61\x2c\x4b\x18\xf5\xa8\x6f\x43\x8f\x7a\xe8\x65\x09\x5b\xe4\xf5\xa1\xd6\x26\x6c\x4f\x64\x1f\xed\x61\x44\x95\xc2\xbe\x0f\x1d\x58\x93\x88\xf5\x0a\x63\xbd\xc2\x07\x12\xeb\x7b\x97\xf5\x0a\x5b\xb7\x25\x16\x2d\x7c\x94\xf2\xcb\xa1\x8a\x16\xb6\xd5\x89\x18\xc4\x7b\x1f\xa5\xa3\xfd\x82\x73\x0f\x5f\xbe\xb0\x5b\x2e\xb8\xfd\x1a\x86\xb1\x70\x61\x2c\x5c\x18\x0b\x17\xc6\xc2\x85\xb1\x70\xe1\x21\x0a\x17\x2e\x5c\x8d\x09\x3b\x4c\xc4\x53\x58\x90\xb9\x14\xee\x72\x07\xd5\xad\x62\x09\xc3\x58\xc2\x30\x96\x30\x8c\x25\x0c\x8f\x56\xc2\xb0\x25\x68\xc6\x3a\x86\xb1\x8e\xe1\xa1\xeb\x18\x6e\x3b\x64\xf7\xb8\x98\x61\x9f\xd9\x35\x56\x34\x8c\x15\x0d\x8f\x54\xd1\x70\xc0\x12\x1f\xcb\x1a\xc6\xb2\x86\xb1\xac\x61\x2c\x6b\xd8\x79\x48\x62\x59\xc3\xfb\x57\xd6\x70\x80\x96\x8f\x94\x37\x62\x81\xc3\x47\x50\xe0\x70\x64\x80\xce\xe1\xab\x1c\x1e\x30\xb2\x78\xb7\x82\x86\x3f\xdc\x69\x41\xc3\x58\xcb\x30\xd6\x32\x8c\xb5\x0c\x63\x2d\xc3\x58\xcb\x30\xa2\x0c\x62\x2d\xc3\x58\xcb\xf0\x46\xb5\x0c\xbb\x44\x99\x58\xcb\xf0\xdb\x25\xf0\xf7\xa2\x96\x61\xa7\x7c\x1d\x31\x65\xb1\x96\xe1\xcd\xb0\x6c\x9d\xc7\xea\x70\x90\xb6\x1f\x66\x5e\x5a\xbf\xa1\x32\x58\x49\xfd\xbd\x3a\xa0\x6f\xb2\x63\x0d\x43\xdf\x73\xd3\x6d\x03\xb9\xb2\xca\x22\x40\xd2\xa5\xd0\xd6\xc5\x3e\xc4\xd8\xa2\x18\x5b\xf4\xe8\x28\xdd\xe3\x92\x6b\xbb\xe3\x9d\x2e\x7a\x4b\x31\x40\xe8\x90\xbf\xe3\xb7\x9c\xc9\x60\x37\xfb\x62\x40\x5b\xb7\x05\x53\x5d\x74\x86\x50\xb5\x66\xbb\x4f\xe4\x14\x39\x73\x41\xbe\xce\x38\xaf\x36\x4a\xb3\x75\x98\x95\xe1\xc1\x2c\xe3\xce\xa1\x5c\xcd\x3d\x18\xc1\x07\x8f\x10\xc6\x15\xf4\x3e\xae\x78\x64\xab\x75\x7f\x08\x57\x60\x6d\x8b\x01\x5c\x31\x80\xeb\x46\x01\x5c\xd5\x59\xba\x8b\xf0\xad\xe0\x96\x6c\x2d\xd5\x18\x36\xec\x0a\xdd\xaa\xa8\x66\xd4\xd2\xef\x89\x74\xd8\xa3\xa5\xbf\xf2\xaa\x79\xf7\x9e\xdd\x4c\x27\xaf\xb4\x9b\xa8\x8a\xdf\x71\x8d\xc6\x07\x21\x9c\xee\xa7\xa2\x57\xa7\xec\x28\x9a\xf9\xd6\xfa\x66\x61\xc3\x81\x30\xb3\x61\xe5\x38\xa4\x89\x3e\xf6\x62\x7a\x93\x7a\x66\x90\x20\x76\x8f\x9a\x66\x15\x1b\x7a\x10\xd5\xcd\x8e\x5c\x1c\xca\xc5\xe9\xdc\x41\x61\xa8\x03\xc4\xea\xbc\x1a\x8a\xcf\xa1\x05\x6b\x06\x52\xd4\x94\xbb\xaa\x02\x23\x17\x36\xc4\xcf\xef\x27\xda\xc4\x52\x70\xcc\x36\x4a\x35\x86\x11\x3b\x20\x78\xcd\x59\xd6\xcd\xfc\xee\x79\xe8\x4e\x7f\xa8\xc8\x2b\xb1\x47\x74\x88\xad\x2e\xe3\x6f\x57\x18\x63\xc8\xbe\xd2\x04\x0a\xf7\x00\x28\x3e\xdf\x78\xd9\xc5\x74\x26\x05\x61\x00\xbf\x17\x32\x65\x0e\xaf\xaf\x93\x95\x43\xbe\x54\x6b\x0d\x0d\x7c\x7c\xd6\x53\xa3\xb5\xd7\xde\x05\x08\x5c\xa3\x15\x57\xd5\xf9\x7b\xb6\xf3\x36\x99\xdd\xc9\x24\x4d\xd5\x69\xe0\x7d\x3f\xb5\x98\x37\xb3\x5a\xd5\xcf\xbf\xcb\x65\x7a\x12\x04\xd0\x1e\x31\x04\xe5\x95\xa8\x92\x32\x57\x85\xb6\x5a\x75\x1c\x6a\x94\x2e\xa8\xe8\x30\x32\xcf\x71\x8f\xac\xd3\x8c\x18\xd9\x8b\x95\x8d\x8a\x08\x38\x2e\xcc\xbf\xad\x94\x8f\x62\x82\xa3\xf3\x05\x8e\xe7\x87\xf6\x6d\xac\x3a\x78\xee\x32\xfa\x4f\xa6\x13\x24\xd5\x3f\x73\xa5\x82\x1f\xad\xe5\xaa\xaf\x35\x30\xcd\xdd\x83\x05\xb6\x97\x91\xaa\xcc\xeb\xf5\x7b\xfe\x4d\x86\x04\xf8\xe9\x1f\x29\x20\xa0\xd3\xa6\x73\xa4\x70\x80\xe6\x49\xda\x22\x35\x40\xd0\x7d\xbb\x02\x90\x0f\x8f\x7a\xe1\x4e\xbe\xa1\xed\x50\x4d\xb4\x60\x98\x5a\xd0\x02\x32\x8b\x52\x84\xcc\x18\xe2\xaf\x0e\x42\x96\xb1\x43\xc5\xf4\xe9\xb8\x23\xd1\x73\x93\x3a\xe7\xdf\x4c\x3a\x1f\xac\x42\x20\x42\xda\xb5\xa8\xcf\x8e\x3c\x45\xe4\x2c\xc4\xac\xc1\x6b\x00\xc6\x07\x86\xd8\xfd\xc6\xa1\xf8\xd4\xae\x0b\x82\xd3\x7b\x35\x5c\x94\x61\xbf\x35\x80\x84\x81\xf4\x8a\xa1\x4d\xc9\x3a\xe2\x5c\x59\xe4\xaa\x99\x3f\x4d\x22\x14\x8d\xbb\x4a\xed\x41\x31\xa6\x66\xbd\xbd\x5d\xa6\x59\x23\xab\xfb\x9d\xf9\xfa\xe0\x31\x68\xd5\x3c\x07\xa1\xf7\x3e\x9e\xf8\x90\x45\xdc\xed\xe6\xc2\x8e\x8e\x24\xdd\x38\xa8\xad\xd5\x42\x6e\x38\x76\x61\xad\x9d\x77\x71\x22\xc7\x16\xf5\xdb\x16\xfe\xd3\x52\x73\x76\x2f\xf0\x67\xcd\x41\x37\x25\x8a\xe1\x35\x71\x51\x44\xd5\xaa\x1e\x36\xe2\xa2\x93\x59\x8e\x12\xfc\xc6\x47\x5b\xf4\xbc\xe2\x2d\x7b\x65\xa2\x83\x88\x83\xaa\x4a\x54\x53\x4e\xc7\x52\x0f\x95\x30\x75\xbb\x85\xd5\x34\x96\x51\x6b\x17\x2b\xdb\x55\x1b\xa8\xd7\xd0\xaa\xcc\xa0\x5b\x2b\xa9\x55\x27\xd3\x95\xe8\xa9\x0a\xaa\xd5\xc7\x84\x55\xd5\x7e\x11\x6f\x00\x1f\x7e\xb4\x82\x6a\xbd\x73\x19\x3c\x40\xa3\xaa\x86\x8d\xc1\xb5\xd4\x8a\x57\xf7\x00\x5b\x82\xea\x73\x3b\x21\x5b\xaa\xbe\x99\x30\x54\xcb\x7c\x20\xc9\x68\x81\xe9\x81\x6c\x68\x0f\xbc\x0c\x51\x56\x86\xc2\x05\x85\xa8\x23\xc4\x25\x42\x5c\x1e\xb7\x07\xa1\x51\x86\xe4\xf8\xd5\x41\xce\x9b\x56\x73\xdd\x8b\x44\x69\x56\xb3\xde\x4d\x77\xac\xea\x67\x6e\x81\x86\xfc\xbc\x7b\x5d\xed\x7d\x47\xb2\x0f\xba\xa2\x3e\x8f\x31\xf4\xf8\x38\xf8\x8a\x8e\x1a\xad\xa3\x8a\xae\x8e\x40\x58\x04\xe5\x67\xbf\x5d\x88\x85\x19\x28\xf2\xdf\xee\x41\x5e\xb8\xca\xa0\x76\xa0\x5c\x05\x23\xbd\xa6\x3e\x50\x3d\x02\x3e\xee\x13\xe0\xa3\x5e\x67\xfc\x2e\x10\x1f\x7e\x00\x5b\x21\x1f\xb5\x96\xf5\x44\x46\xd5\xb3\x88\xf6\xb8\x27\x82\xd2\x2e\x31\x19\xdd\xdb\x77\x43\xe3\x6c\x50\x3c\x3a\xca\x6d\x77\x8b\xfc\xb8\x0b\x44\x46\xb5\xfd\x07\x85\x64\xd4\xc5\x9d\x71\x65\xdd\x87\x40\x19\xe3\xc5\xcb\xe3\xc3\x35\x7e\xde\x03\xaa\xf1\x20\x00\x1a\xe3\x2c\x7c\x39\x2d\x55\x97\x19\xed\x5d\x10\x56\x69\xd3\x73\xa4\x35\x9b\x00\xbe\x18\xec\xd1\x5c\xca\x8c\x51\xf0\x06\xe5\x85\x5c\x16\x4c\xa9\x37\x8c\xa6\x19\x17\x6c\x18\x2b\x63\x33\xbf\x82\x08\xc5\x45\x6d\xf9\x6b\x62\x28\xe4\xff\xfd\xc2\x88\xeb\xdd\x25\xda\xc4\x49\x07\x4b\x83\x8b\xbb\xa0\x3c\x73\xde\xff\x3a\xc7\xaf\x25\x16\xb1\x89\x8e\x31\xbb\x48\x21\x13\xd3\x31\xbe\x1a\xbc\x85\x46\x08\x1a\x0a\x77\x5c\x9b\x73\x71\xd6\x98\xe9\x5b\xa8\xab\x0d\x11\xd5\x20\x21\xb9\x8d\x53\x65\xb1\xa0\x49\x95\xb3\x36\x18\x90\x2b\x17\xe8\xd3\x0c\x54\x13\x84\xb7\x2d\x51\x64\x4a\xf3\x75\x98\x8d\x1a\x44\x38\xb3\x66\xb4\x7b\x67\x6a\xe7\xe8\x0f\xcf\x9f\xab\x1b\x27\x19\xfa\xe0\xaf\x48\xbd\x5e\xf8\x91\x60\x38\x47\x46\x18\x05\x26\xa5\x07\x8a\x32\x7a\xdf\x5d\x3c\x6e\x46\xde\x3a\xa4\x45\x38\xc7\xeb\x95\x54\x41\xd2\x6e\x7c\xcd\xd9\xe6\xb9\xf2\x47\x15\xd2\x7e\x18\x71\x8f\x2e\x16\xf5\x16\x69\x60\xf0\x1b\x8b\x3f\x3a\x70\x56\xdf\x5e\xe8\xc9\x45\xf3\x52\x55\xf8\x13\x9b\x3a\xa8\x05\x43\xa9\x83\x4f\xcc\x94\x67\x5b\x7d\xd4\x78\x4a\xfe\xc6\x36\xbb\x87\x73\x04\xa6\x80\x20\xcf\x4e\x2f\xd6\xc9\x41\x4c\xda\x28\x27\xd5\x0d\x73\xba\x09\xb4\x67\x4f\xe3\xc7\x1d\xc3\x64\x9a\xc6\x95\x71\x82\x49\xad\x82\xd3\x7a\x77\x3b\xd3\x16\xdb\xb3\x63\xcb\xfd\xb9\xc5\x2e\x1a\xde\xa9\x8a\x93\x63\x49\xff\x0e\x17\x5e\xd3\x7b\x67\x6b\x24\x76\xdf\xcd\xb1\xb8\x93\x9b\x02\x6f\x02\x6a\x70\x51\xfb\xfb\x96\xa1\x37\x15\x91\xbb\x13\xc8\x4d\xb5\xf2\xc7\xc3\xdc\x74\xd8\xf9\x0e\x0d\xba\x19\xeb\xea\x1d\x72\xef\x76\x9d\x80\xc3\x64\x61\x6c\xde\x19\xbc\x23\x48\x0c\x6f\x7c\x15\xfa\x25\x9e\xe6\x67\x85\x14\x27\x9a\x15\x6b\x2e\x9c\x1e\x30\xf8\x7d\xf2\x14\x53\x65\xd9\xd4\xfa\x15\xaf\x74\x3c\x7b\x2c\x8a\xba\x14\x7b\xd0\x95\xe0\xa5\xed\x2b\xe5\xa5\x1c\xdd\xe1\x3f\xaf\x63\x97\x95\xe6\x36\xe7\x16\xc8\x80\xee\x36\xd6\x25\x75\x80\x2e\xbc\x78\xfe\xfc\xbb\xe0\xee\x24\x34\xa7\x09\xa4\x95\xba\x58\xb1\x0d\x58\x0c\x18\xd7\x2b\x56\x18\x36\x56\xff\x86\x73\xd1\xcf\x4b\x0d\x42\xd4\x86\xd5\x2e\x61\xad\xdc\x01\x0c\xc7\x42\x25\x34\x26\x1a\x0b\x78\xe2\xe8\x8c\x96\x03\xd9\x20\x6f\x7a\x0c\xaa\xcc\x9f\xa1\xe6\xeb\x13\xdf\x03\x40\xe3\xe0\xd0\x83\x0e\x9a\x31\x96\x9b\x8e\x80\x1d\xb4\x5a\x07\x72\xca\x4a\x5e\xef\x20\x70\xdd\x22\xcc\xa0\x3d\xea\x0b\x04\x1e\xb4\xdc\xf6\x37\x00\x1d\x04\x26\xb8\xf1\x86\xe8\x10\x6e\xc0\xf0\xf4\x3a\xa4\x41\x13\x12\x71\x3b\x70\x83\x6a\x16\x43\x87\xa6\x62\xbd\x37\xc4\x1b\x54\x1d\xf5\xe3\x0d\x02\x3e\xbf\x13\xde\x20\xe8\x9b\x09\x55\x16\x55\x31\x5f\xaf\x9a\xd5\x69\x5d\xbd\x7e\x44\x00\x24\xa5\x62\x63\x4b\xf9\xb8\xf2\x9c\x11\x88\x10\x81\x08\x8f\xce\xa0\x6d\xeb\xb0\xbf\xb7\x05\x81\x16\x90\xaf\xda\xdf\x21\x73\x27\x6c\x32\x67\x5f\xa1\xaa\x56\x48\xc8\xda\x10\xa0\xf0\x83\xad\xf6\x7e\x26\xd3\xa7\x46\x6b\x71\xa6\xc4\xa0\x3b\x8c\x84\x52\x50\x37\xfc\xd1\x67\xf8\x68\x55\x34\xde\xc9\x34\x1e\x12\xc0\xfb\x9d\xbb\xa2\x1a\xe9\x6e\x05\x95\x47\xa9\xe3\xe1\x32\x7c\xa3\xb9\x41\x82\xf5\xdd\x03\xbe\xd2\xd8\x9d\x31\xec\xfd\x28\xf0\x95\xaa\xfb\x51\xf0\x95\x8e\xe6\xfd\xf0\x15\x57\xf3\xec\xce\x6a\x3c\x37\xa1\x21\x31\x4d\xc8\x03\x47\x8d\x84\x27\xea\x6e\x60\x23\xd5\x05\xd8\x06\x1b\xa9\xb7\xec\x4a\x15\xb2\x05\x50\x1b\xc1\x23\xf7\x06\x3c\xf2\xde\xe2\x45\xc2\x1d\x3b\x62\xb8\xf0\xa1\x6c\x96\x81\x6a\x18\xa1\x28\x8f\x3c\x09\x49\x7d\xbc\xb7\x8d\x7a\x09\x4e\xda\x21\x51\x2f\x0d\x29\x69\x14\xb5\xdd\x92\x8a\xa4\xd3\x53\x31\x8c\x6d\x89\x80\x96\x1d\x01\x2d\xfd\xc6\xfc\xfe\x62\x3e\x4e\xe1\x72\xef\xde\xc8\xe7\x1f\x14\x53\x6e\x02\x1a\x8e\x48\xb6\x4f\x7f\x77\xbd\xa2\xfa\x84\xab\x13\x7a\xb2\x85\xae\xef\x07\x36\x38\x3f\x54\xf9\x61\x44\x2d\x7c\x61\x1b\x04\xd5\x20\xe7\xb5\xe9\x35\x46\xa4\x3e\xf1\xf6\xf5\x40\x1e\xfb\x46\xd3\xa1\x5c\xdc\x5a\xe5\xdc\x07\x90\x9d\x64\x0b\xc7\xb8\x35\x54\x42\x4b\x67\x1e\xc7\x38\x46\xa7\xef\x18\xcf\x43\xfa\x2b\x74\x8e\x71\x26\xd6\x08\x64\x45\x9b\xfd\x01\x19\x05\x53\xf0\x65\xff\xc2\xcb\x7a\x17\x4e\xfa\xe0\xfb\x47\xf3\xd2\x77\x99\x33\x0e\xed\xa5\x87\xd2\x49\x70\x18\x07\xfd\x95\xb5\xcd\xab\x48\x33\xb8\x20\x43\x67\xb4\x93\xaf\x33\x6f\xea\x6d\x92\x4e\xf7\x9b\xdb\xf7\xd1\xfb\x37\x06\x4f\xf0\x4b\xbb\x9e\x64\xc1\x16\x99\xad\x38\x55\xc7\x1a\x2c\x86\x0c\x84\x3b\x40\x40\xc6\xc1\x0d\x6a\x0b\x88\x27\xdd\x9f\xfc\x1b\x1c\xea\xf1\xc2\x49\x73\xa2\x38\xcf\x70\x4c\x4e\x54\xb9\xe7\x32\xc5\x7e\x92\xfc\x38\x9f\x75\x4f\x84\xf4\x50\x71\x42\x23\xa0\x37\x42\xe1\xbb\xcc\xed\x41\x3c\x78\x51\x73\x31\x6f\x77\xfa\xad\xe9\xd7\xad\x29\x21\x1c\xe6\xb9\xda\xcf\x46\x4e\x2c\xac\xb7\x86\x2e\xe1\x10\xc7\x11\x60\x7f\x5d\x9c\xfa\xdf\x41\x65\xb6\x6d\xa9\x20\x74\xae\x64\x56\x6a\x7f\x80\x9f\xb2\xaf\x2f\xc9\xef\x9f\x11\x80\x53\xe7\xac\x30\x47\x8a\x2e\xf1\x62\x37\x70\x0d\x8d\x41\x58\x67\x8d\xd2\xb4\xf0\xf5\xec\xad\xa3\x1d\x3a\x7d\xf1\xfc\xbb\x67\x33\xf2\xaa\xf1\x3d\xae\x48\x42\xb3\xc4\x5a\xd8\x41\xf9\x0e\xbe\x3a\xdf\x90\x42\x96\x22\xc5\x15\xb5\x82\x76\xe2\xf5\xed\xe7\x95\x7b\x1b\x4d\x01\x5c\x19\xb9\xf9\xed\x57\xba\xce\x33\xf6\x12\xb1\x61\xda\x0a\xe7\x66\x77\xb4\x24\x3f\x3e\xff\x6e\x6a\xc6\x0a\x57\xe6\xc7\xe7\xdf\xb9\xa1\xde\x2c\x35\xce\x8c\xcd\x1c\x34\xbb\x3b\x1f\xcf\x33\x58\x73\x87\xea\xe0\x56\x04\x56\x5a\xe6\xb9\x45\xc5\x50\x9f\x0e\xad\xed\x3b\x06\xc8\x9c\x4f\xc2\x40\x0b\xad\xc0\x5d\x61\xde\xb6\xce\xe6\xfa\x74\xa4\x62\xad\xed\x11\x46\xa8\x63\x82\xcc\xcd\x99\x50\xa4\xcc\x01\x57\xd1\x68\xe5\xeb\xf5\x01\x18\xc3\x96\xe9\xb3\xe8\xb9\xa0\xfe\xbd\x3b\x61\x50\x6b\x0e\x7a\x05\x30\x3c\x4b\x15\x91\x42\x4b\x02\x06\xe9\x46\xdf\x53\xa2\x57\xa5\x42\xa7\x3a\xae\x21\x54\xdf\xb3\xc2\xc0\x1f\x71\xe8\xb2\xe0\x4b\x2e\x06\x8f\x59\xf8\x7d\x58\xaa\x2c\x83\x45\x52\x1d\xc7\x7d\x57\xd9\xba\xd4\x3c\x9b\x71\xa1\x95\x2e\x66\xef\x84\xfe\xa5\x38\xdf\xc3\x4c\x6b\x3a\x39\xed\xe8\x64\x3c\x6d\x1a\x95\x97\x61\x2c\x71\xda\x83\x22\x9d\x97\x45\x97\x0b\xa0\x9b\x16\xb5\x28\x90\xcf\x47\x44\xe8\x5c\x36\x50\x4c\xf5\xd7\x6e\x44\x8e\xc2\xa8\x82\x90\xc2\x38\x1a\xe1\x42\x21\x9e\x1b\xb5\xe5\xe7\x1a\x99\x35\xe4\xe0\xf9\x4d\x69\x51\xa8\xac\xff\xf0\xfb\xef\xc6\x90\x1d\x77\x91\x02\x87\xb6\x5f\x33\x6a\x16\xac\xcc\x09\x5f\xaf\x59\xca\xa9\x66\xd9\xc6\x75\xc4\x1a\x7b\x68\x49\xc0\x94\xa8\x12\xd4\x57\x4b\x79\x9b\x14\x4c\x66\x98\x17\xc8\x5f\xdd\x54\x62\x6d\x65\x88\x3a\x21\x2f\x2c\xb5\xa8\x47\x67\xc0\x85\x37\x6f\xc2\x1b\x40\xaf\x00\x23\xf7\x85\x1b\x75\x7a\xba\x75\xf8\x8b\xb2\x30\x77\x7f\xda\xb8\xe7\x9d\x18\xc1\x06\x56\x06\x5c\x5f\xad\x3b\x0c\x16\x04\x4b\xdf\x3a\x87\x7c\xb0\x3b\x3e\xdd\x93\x19\xdf\x22\x0b\xee\x3b\xf3\xfb\x9f\xe4\x54\x5e\x8b\xfe\x3b\x03\x84\xc0\xde\x96\x3d\xcf\x7b\x3d\x78\xa6\x71\x60\xcc\xd7\x4d\xeb\x3f\xb6\xf7\x75\x87\x8b\x60\x4f\x6d\x8d\x45\x81\x14\x3e\x1d\xf1\x75\x7f\x60\x17\x32\xcb\xe4\x35\x9a\x8c\x4c\x03\xfc\x4c\xc7\x9d\x6d\x9d\xed\x3e\x0c\xec\x58\x36\x65\x8f\x78\x8d\x11\x1e\xe7\x88\xdf\x2a\x1b\xeb\xaa\xbd\x3c\x64\xde\xd8\xf2\xee\xd6\x6a\xd8\x20\x45\x8d\xad\x81\x3d\xcc\x03\x73\x5a\x68\xde\xad\x85\x9e\xb9\x47\x8d\x5a\x92\xb2\x48\x41\x70\xa1\xda\x5a\xcd\x75\xa3\x46\x79\x25\x45\xfa\xde\x03\x9b\x6f\x25\xc0\x8e\x8b\xf4\x6a\xef\xa4\x28\xb3\x6c\x60\x6b\xce\xcd\x99\x1f\x94\x27\x4c\x83\xd0\xa6\x44\xfd\x35\xb0\xee\x2e\x1b\x64\xe9\x3c\x6b\x11\xd1\x18\x11\x8d\x8f\xdb\x2f\xda\x48\xad\xf4\xd3\x6d\x21\x0b\x8f\x9f\xc3\x29\xbc\x72\x4d\xe0\x20\x70\xc7\xdb\xc6\xb4\xed\x0c\xa3\x07\x72\xb5\x0d\x2f\xd8\x55\x2f\xec\xae\x26\x18\xe0\x05\xf7\x9b\xeb\x1e\xd8\xbd\x6a\x91\xb6\x30\x86\xa3\x20\xf6\xaa\xaf\x6f\x63\x3b\x16\xe9\x1a\x3a\xa1\xa8\xc6\x45\x67\xd6\x26\x0f\x9b\x66\x08\x8d\x23\x60\xdb\x83\x41\x7a\xcd\xa7\x6d\x6d\x94\x0b\xa5\xa9\x48\x58\x15\xb0\x68\x65\x44\xcb\x61\x8e\xc7\x92\xb7\xfb\x7d\x82\x66\x63\x5c\x3e\xad\x85\xda\xdf\xf3\xd3\xbf\x82\x34\xd1\x65\x5d\xd9\x74\xc6\xf5\x6a\x25\xc3\xdb\xb6\xd3\x42\x0e\x39\x96\xf7\x70\x25\x2b\xe7\x4b\x6e\x5c\xf8\x6e\xd3\x77\xa9\x58\x71\xb2\x2c\x79\xca\xac\xc3\xb6\xc3\x5f\xdb\x5c\x4d\x9a\xa2\xf9\x99\x66\x67\xb5\xf5\x6b\x62\xfd\xa6\x13\x8c\xfb\x3a\xdf\x32\xbd\x56\x90\xfe\xc8\x09\x56\x38\x04\x57\xad\x1f\xf4\xbf\x20\x72\x66\x2e\xf5\x8a\xac\x69\x7e\x32\xa7\x46\x94\x06\x79\xc7\xac\x0a\xfb\x6a\xce\x95\xe2\x57\xcc\x28\x70\xf6\xa9\x9f\x72\xd5\x73\x2a\x05\x84\xc7\x43\x24\xae\x11\x9f\x0a\x69\xe8\x9c\x95\x87\x03\x91\x40\xa1\xcd\xd2\x0a\x24\xce\x91\x6c\x9b\x28\x1b\x97\xbb\x36\x7a\x11\x9e\x64\xd8\xd1\x13\x90\xe5\x89\xda\x08\x4d\xbf\xce\x88\x8d\x2c\xc0\x35\xc3\xac\xaf\x10\x9b\x05\x49\xa9\x0b\xad\x82\x89\xf8\xa1\x4e\x71\x8a\x61\x0c\x31\xc8\x74\xcd\x86\xee\x61\xc1\x48\xee\x00\xde\xb7\xe6\xef\xdf\x8a\x01\xdd\x46\x38\x2a\xb5\xe2\x86\x91\x54\xa1\x82\xd2\x1b\x4a\x15\x34\xda\x2d\x96\x2a\xec\xbd\xae\x58\x30\xed\xb5\x64\x08\xf1\x03\x64\x8f\xd2\x90\x93\x24\x35\x4c\xd4\x5c\xa1\x19\x79\xe7\xff\xed\x02\x47\xb8\x51\x0d\xa8\x7a\x79\x29\xc8\x09\xf9\xc0\xb4\x59\xf9\x97\xe4\x15\x51\x5c\x2c\x33\x30\x08\x18\x7d\xfb\xcd\x87\x73\x4c\x89\x2d\x95\x16\x74\xcd\x66\xd0\xfc\x5c\xcb\x82\x2e\xd9\x4b\xf2\xca\x1c\x1d\xb1\x21\x7f\x97\x59\xb9\x66\xaf\x33\xca\xd7\xca\x1c\x44\x2b\xbe\xb2\x74\x76\x29\x2e\x1a\xea\xdb\xb2\xa4\x05\x15\x9a\x55\xf1\x60\x68\x9f\x17\x38\x06\x37\xec\x0d\x9e\x75\x9a\x5d\xd3\x0d\x1c\x50\xa7\x71\xc0\x99\x57\x38\x02\xdf\x38\xaa\x50\x51\x85\x7a\x24\x2a\xd4\x2d\x87\x42\x39\x11\xae\xa2\x16\x9e\xa0\x70\x6b\x8c\xb4\x8e\xf6\xdd\x24\xed\xc0\x62\xb4\x53\x2c\x52\x5b\x12\x3b\x0b\xc7\x52\x23\xa1\xfb\x84\x21\xdd\x64\x22\xfb\x28\x0e\x8d\x75\x18\xc5\x8b\x8e\xa3\x44\x54\xfd\x8f\x8a\xfb\xe9\x6a\xdf\x1f\xf8\xa3\x6c\xeb\x3b\x0b\xfc\xb9\x17\x89\x6b\x63\xd0\xcf\x61\x82\x7e\xc2\xd3\x74\x37\x41\x3f\xc1\xe9\xdf\x16\xf5\xd3\x68\xda\x15\xf6\x13\x34\x89\x71\x3f\xf7\x44\x7e\xf1\x68\xc3\x83\xa0\x10\x43\x4d\x22\x06\xde\xdc\x47\xe9\x68\xbf\x28\x97\x70\x5f\x0f\x19\xe6\xd2\x94\x0b\x06\xe8\xcb\x2b\xd2\x68\x3c\x10\xea\x12\x8a\x47\x7b\xe4\x71\x9d\x4e\x94\x51\xc4\x13\xf6\x81\xae\x3b\xb2\xba\xe6\x32\xfd\x19\xf2\x06\xac\x99\xd0\x67\x32\xe3\x49\x47\x4a\xc0\x8e\x46\x0e\x5a\x83\x39\x6a\xbc\x6b\xd9\xa1\xe1\xad\x1f\x17\xb6\x93\x66\xd6\xee\x56\xe6\x53\xf4\x56\x63\x3e\x1b\x9f\xc8\x46\x0a\x44\x94\x4d\x09\x84\xd5\x30\xe1\x9d\x6b\xce\x03\xef\xf3\x22\x90\x1c\xbf\xce\x15\xf9\xfc\x4b\x01\xe1\x2e\x80\x93\xfe\x0c\x3d\x17\xac\x3d\x12\x2e\x08\x17\xe6\x0f\xa3\x05\xdb\x48\x88\xa7\xb9\x4c\x4f\x9e\x4f\x2d\x3a\x4b\xa6\x27\x2f\xa6\x84\xe9\xe4\x99\x03\x82\xb5\x52\x9b\x5e\x53\x6e\xc8\x9d\xe6\x19\x61\x34\x59\x01\xb0\xcd\x45\xd3\xb8\xe4\xa9\x36\xfd\x29\x17\xcb\x19\xf9\x47\x73\x12\xd3\x2a\xe5\x20\x7a\xe0\xd7\xf2\xaa\xca\x61\x2a\xf3\x5c\x2a\xae\x19\x0e\x0f\x27\x4c\x33\xa0\xbd\x50\xc8\x25\x98\xf4\x19\x2d\x68\x96\xb1\xec\xb3\xf5\xa4\x86\x35\x58\x9d\x84\x9f\xdb\x36\x98\xe7\xd5\x19\xc4\x9c\x56\x80\x7b\xe1\x62\x92\xcc\xcc\x20\xfa\xc8\x4c\x5d\x0a\xfb\x14\xbc\xff\xd0\x75\x0a\xb5\x79\xc0\x43\xef\x90\x8c\x52\x24\x5d\x19\x72\x86\x30\xb9\x45\x03\x93\xdb\x36\x32\xfb\x16\x56\x0e\x41\x03\x82\x0b\x30\x80\x25\x51\xcc\xae\x9d\xeb\xcb\x1a\xcc\x98\x50\xcc\xa3\x0d\x30\x8b\x06\x1a\x5a\x35\xaf\x80\xeb\xde\xcc\xe0\xba\xc4\x5a\x6e\x46\x56\xbb\xe2\x69\x49\xb3\x20\x60\x23\x53\x36\xeb\x16\xed\xb0\xbd\x6c\xc0\xf6\x16\x84\x26\x4d\xdd\xd9\x3c\x42\xae\xd5\xae\x56\x1e\xd7\xdc\x02\xdb\xb8\xd6\x8d\xb4\x96\x6b\xca\x31\xd8\xcc\x9f\xb7\x80\xa4\x3c\x51\xfe\x35\x57\x29\x1a\xcf\x5f\xf3\x57\xb7\x14\x68\x49\x87\xb4\x65\xee\x6b\x86\xd1\x78\x26\x66\xcd\x63\x4e\xe9\xcb\xc0\x54\x96\x71\x96\xb6\x48\x9e\x95\x65\xea\xf7\xbb\xc2\xaa\xde\x3c\xab\xab\x3a\x54\xa0\xd5\x23\x8e\x89\x0a\x99\x43\xc7\x02\xfa\x87\x3e\xd4\xcf\xfc\xdb\xdd\x27\x7c\x8c\x6b\xb8\x34\x93\x11\xaa\x4f\xa5\x77\x6d\x61\x1d\x21\x8f\x99\xa3\x9b\x8d\x03\x89\x94\x08\x88\xab\xca\xcd\x91\x33\xaa\x55\x95\xa7\xb2\x61\x50\xf4\x23\xd1\x33\x34\x2a\x2c\x99\x26\x6f\x3e\x9c\x9f\x3a\xeb\xa6\xdd\x61\x04\x30\xe1\xd6\x51\x6d\x28\xeb\x4b\x20\xfc\x8e\xdf\x9e\x20\x15\x9b\x05\x33\x9e\xd9\x23\x39\x53\x57\xc9\x2c\xc9\x4a\xa5\x59\x31\xcb\x64\x42\x33\xcb\x6a\x2e\x27\x1d\x3d\x5c\x4e\xcc\xd8\x1b\x45\xc9\x43\x5b\x69\x67\x3e\xc7\x40\x89\xea\x8d\x51\xd3\xb7\x16\xa3\xf6\xd6\xb1\x38\xa5\xe9\x3a\x67\x29\xd8\x60\x3a\xa6\x02\xdd\x2f\xca\x6c\x61\xfe\x0b\xfb\x5e\x27\xae\x96\x86\x96\x82\xff\x5a\x56\x76\xdd\x4a\x98\x2d\x98\xf2\x68\xf8\x86\x94\x73\xc4\xd2\xda\x65\xa3\xbc\x5f\x0d\xa9\x14\x0c\xa3\x51\x06\xb0\xb6\xa0\xe6\x93\x72\x83\x78\x2b\x8b\x53\xab\x4c\x5a\x8d\x45\x32\xa2\x00\xad\xc8\x29\x9c\x8e\x14\x1c\x45\x9e\xbb\xdd\xc0\x80\xd5\xac\xd5\x3d\x9d\x5c\x55\x86\x7b\xf7\x81\x0e\x8e\xdc\xd5\xaa\x5e\x14\x25\x41\xd3\x3f\xe6\x51\xf7\xe8\x72\x8b\x03\x84\xa4\x84\x0b\x56\x30\x23\x0b\x90\xa6\x3f\x20\x10\x9f\x3a\x2e\xf2\x9a\x22\x32\xbf\x71\x99\x39\xc3\x14\xb5\xf8\x59\x6e\x16\xed\x9a\x6e\x5c\xb5\x78\x64\x61\xb8\x49\xe1\xed\xa7\x58\x6b\xf5\x2d\x94\x88\x87\x77\xbd\x5d\x11\x23\xf7\x0d\xbd\xc1\x83\xe8\x50\x84\x52\xb0\x2a\x66\xeb\xe9\x7c\x03\x34\xed\x19\xc1\x15\xf9\x19\x92\xf5\x72\x61\x0b\xd9\xbb\x28\x6d\xbb\xb1\xda\xcb\x23\xaf\xba\x3e\xa6\xe9\x17\xa6\x48\x5e\xb0\x84\x19\x3d\x84\x21\x9f\xa1\x62\x63\x3b\x57\xcd\x7e\xa6\xe8\xe1\xf1\xc2\x09\xf8\x63\x6e\x10\x45\xe7\xaf\x85\x61\xad\x20\xb6\x04\x6e\x1c\xa3\x25\xed\xa7\x26\x8d\xaa\xe5\xde\xf9\xc9\xbb\xc9\x67\xdd\xb6\xbb\x8e\xb3\xf5\x6c\x07\x12\xb0\x9d\x75\xb2\x7e\x04\xc1\xb6\xbc\xd1\xf5\xe7\xde\x98\xbe\x2d\x9b\x74\x83\xf7\xf6\xde\xcc\x6f\xa7\x94\x7b\x60\x7a\x3c\x5a\xc8\x6a\xa7\x29\xfe\x48\xe5\xdc\xfb\xa3\x2d\x1b\x0d\xda\xf9\x19\x80\x4b\x39\x71\x60\x50\x3a\xa9\xd8\x74\xf8\xdc\xb9\xc7\x1d\xd7\x84\x4e\xfc\x57\x77\xdb\xe3\xfa\x5b\x03\x93\xc1\x06\x53\x23\xbe\x40\x8c\x06\xa6\x4c\xac\x33\xee\xc0\x6f\xdf\x1c\xb3\x03\x46\xdb\x18\xd8\x3a\xab\x56\xec\xd7\x12\x48\xf5\x3f\x9f\x4f\x1b\xab\xf7\xac\x53\x40\x1b\x13\x8d\xdb\x6e\xd3\x11\x8c\xda\x99\xff\xdb\x47\xc4\xd6\x6e\xf1\x3b\x8d\x05\xe5\x0d\x1f\x4d\xbd\x91\xb6\xae\xc5\x55\xbd\x4d\xad\x69\x80\xfb\xa2\x79\x46\xb1\x5f\x97\xd6\x34\x6c\x77\xfd\xd5\xd9\x3b\x6b\x6d\x3c\x4c\xa0\x6f\xed\xf1\x8d\x0e\x5e\x15\x60\x4d\x01\x17\xb8\x21\xaf\x3b\xfc\x05\xfb\x05\x07\x37\x0d\x11\xfb\x0c\x70\xa7\x5c\xd8\xfd\xc7\xbb\xfe\xfc\xd8\xa7\xdb\x4d\xfc\xa4\x91\xa2\x7b\xea\x1e\x3c\xeb\x3a\xec\x5b\xf3\x79\x37\x1a\xdc\x12\xc1\xa9\x2f\xdd\xc1\x13\x7e\x77\xd2\xf2\x91\xf2\xc6\xf8\x7a\xe3\xfd\xaa\x46\x7d\xef\x55\x4d\x03\x19\x58\x3f\x50\x4e\x6c\x89\x96\x9c\x15\x66\x05\x5c\x09\x68\x20\x21\x5c\x24\x59\x99\x32\x05\x02\x69\x05\xcb\xab\x82\x44\x14\x11\x2c\x61\x4a\xd1\x62\x13\xf6\x11\x04\xe3\x38\xfe\x5e\xed\x86\x1b\xdd\xa1\xf2\x8f\x7f\xf2\x51\x3f\x83\xf1\x2c\x0a\x65\x11\x70\x2e\x36\xb3\x77\x0f\x44\xb6\xec\x9f\x8c\xbc\x2b\x60\x67\xd8\xe7\x59\xdf\x45\x6d\xdd\xa0\x83\x4a\xe6\xed\x64\x24\xef\x9a\x4a\xf3\x74\x97\x7a\x65\x74\x2c\xf4\x43\x18\xe1\xfb\x4f\xb2\x14\x29\xc2\x12\x3e\x3a\xc5\x6f\xe8\x74\x77\xb5\x47\xfd\xd2\xeb\x8d\xe8\xaa\xaf\xd9\x31\x28\xd1\xf2\x0b\x03\x6e\x39\x37\x1d\x10\x2d\x6f\x0c\x03\x6b\x12\x4f\xfb\x7d\xdd\xc9\xdd\x07\x7c\x7c\xcd\xd7\xc9\xdf\x69\xc6\x53\x02\x2e\x2e\xd0\x8d\x9f\x9c\xc9\xf4\x09\x58\xaf\x9e\x9c\xb3\xa4\x60\xfa\x49\xe7\x27\x44\xa7\xa9\xed\x43\x60\x57\x1b\x1c\x61\xc9\x3b\x06\xf8\xe9\xdd\x9b\x11\x2f\x8f\xc2\x52\xb6\x76\xfe\xc2\xec\xc8\x47\xf4\x2d\x0e\xed\x78\xd8\xae\xf2\x45\xba\x1d\xc5\xf0\x28\xb4\xea\x3b\x5b\x20\x4d\xd0\xbe\xba\xcd\xab\x65\x74\xc4\xe8\x3c\x8f\xe0\xbf\x6f\xcd\xbd\xdd\x0d\xfe\xdb\xca\xc3\x6a\x37\x78\xd6\xb8\xc1\x6d\xe4\xde\x0d\xfb\x1b\x09\xa0\x1b\x24\x2b\x1d\x30\xba\xe1\xf6\x87\x02\xd3\x6d\x1f\xd5\x48\x82\x07\x0e\x2d\x6b\x2e\x54\xee\xe4\xe6\x85\xbc\xe2\x29\x4b\x43\xb1\x05\x0c\x12\x48\x12\xed\x81\xde\x46\xfe\x68\x99\x72\xc3\x2e\xbb\x00\x44\xfe\x51\x9b\x04\xba\x47\xc0\x9a\x50\x66\xd3\xb0\x3b\x29\xf1\xaf\x55\xf9\x5d\xbe\x30\x31\x23\xaf\x0c\x51\xe3\x39\x8c\x3d\x18\x27\x98\x50\xad\xcd\x75\x01\x12\xfc\x5a\xb1\x6c\x61\x0b\x77\x0a\xfb\x68\xc1\x2b\x33\xa9\x33\x21\x77\x7f\xc8\xfa\x9a\xf5\x8a\x15\xd7\x5c\x31\x47\x58\x2d\x5d\xac\x8d\xc7\x49\x03\xaa\xb4\xba\xf1\xba\xcc\x34\xcf\x33\x16\x74\x6d\x71\xa2\x4e\x5c\x0c\xf6\x94\x11\xba\x34\xfb\xe1\x33\x6f\x42\xec\x94\x7f\xd1\x8c\xd2\xe8\x13\xa5\x26\x7c\x9d\x67\x00\xa4\x27\x2b\xbe\x5c\x91\x94\x2d\x0b\x86\xec\xb8\x28\xc1\x53\x85\x29\x2a\x83\x88\x0b\xdf\xcd\x90\x05\xa9\x1d\xe3\x32\xaf\x89\x45\xdb\xc4\xa6\xed\x02\x93\x5f\x2d\xef\x9a\xf0\x72\x13\xd8\xfe\x82\x67\x10\x1e\x32\x67\x86\x80\x73\x9b\x55\x47\x91\x4c\x8a\xa5\x0b\x33\xc1\x37\x6d\xef\xe0\xa2\x53\x33\xf2\xe1\x97\x8b\xb7\x2f\xa1\x2b\x23\x4a\x81\x95\xa2\x78\xa2\x88\x3d\xfb\x57\x9c\x5d\x57\x44\x1b\x3e\x03\xdd\x3b\xa3\x60\x7d\x3a\xe8\x15\xc2\xfc\x37\xf5\xfd\x13\x52\xcf\xc8\xdf\x18\xcb\xc9\xdb\xaf\x39\x47\x33\x86\x4d\x7d\x47\xd4\x9a\x66\x99\xd1\x8e\x37\xb2\x24\xd7\x14\xef\xd5\x3a\x37\x8c\xe5\x4a\x5a\xa2\x34\x46\xb4\x6f\x91\xb1\x4e\x91\xf6\xb7\xe9\x84\x35\x87\xd0\xde\xa6\xf6\x28\xad\xe2\xeb\xa3\x24\x48\x5a\x56\xf9\xd6\x60\x4d\x02\x77\xa5\xbb\xf9\xc1\x16\xc1\x19\x2f\xac\x80\xa0\xcb\x42\xf8\xeb\x67\xeb\xe3\xa6\x7c\x81\x82\x5d\xd5\x9b\xff\x84\x92\x84\x3a\xa2\x53\xd9\x66\x57\x2c\xf9\x02\x9f\x7b\x52\xcd\xe8\x89\x35\xf6\x72\xf4\x49\x81\x63\x86\x8d\x32\x00\xed\x4c\xe0\x3b\x97\x77\x37\x02\xbc\xd5\x76\xdf\x6e\x5d\x6d\x84\x32\x7a\xd4\xee\xe4\x16\x1a\x4f\xc2\x53\x70\xc1\xd7\x0c\x3c\xa1\x6d\x02\xdc\xd5\x68\xe0\xb0\xf8\x46\xbe\x3c\x1c\x47\xa9\xbf\xea\xa7\x3a\x22\xe6\x10\x00\x49\x33\xb4\xf0\x20\x50\x66\x9c\x5a\xf7\x22\x7a\xaf\x72\x4e\x7f\x2d\x19\x99\x33\x5a\x40\xca\x58\xfb\xf1\xa3\x82\x74\xfb\x0e\x81\xa1\x2e\x23\x76\x1f\x88\x10\xd5\x9a\xad\x73\xc4\xe0\xd4\x59\x80\xdd\x7e\xf3\x3b\x01\xf0\xb2\x61\x15\x05\x56\x89\x7e\x59\x23\x64\x5e\xc2\xb4\x2c\x25\xa1\xc9\xaa\xb2\x5a\x5d\xb3\xf9\x4a\xca\x2f\xb6\xbb\xe0\x1b\xb2\x20\x79\x56\x2e\xb9\x8f\xf2\xfb\x52\xce\xd9\x89\x99\x76\xd3\xbc\x1a\xd5\x9b\xa8\xde\x44\xf5\x66\xe7\xd8\xa6\x95\xcc\xc0\xa4\xed\xa3\x27\x83\x78\x0a\x97\x7e\x65\xce\xcc\x56\x31\xb3\x7d\x66\xbd\xf6\x12\x08\x02\x5a\x30\x3e\xc0\x69\x01\xc9\xbf\xcc\xd5\x77\x25\x90\xe0\x10\x20\x8a\xc9\x9b\x00\xaf\x57\x0c\xc4\x9e\x70\xc8\x2e\xcb\x55\x40\xad\x46\xd5\x9e\x1e\x1e\xf8\x0d\xf5\x31\x3f\xf9\xf1\x24\xfa\xe8\xda\x98\x1f\xd3\x38\x5e\xe0\xf0\xd4\x94\x04\x4d\x6a\x1a\x08\xa9\x7f\x6a\x48\x34\xd8\x43\xe1\xaa\xa1\x68\x2a\xbc\x8a\x51\x90\x54\x25\xb5\x7b\x62\x62\xcf\x4b\x05\x9f\xf4\x90\x10\x2b\x19\xba\xb7\x15\xa1\x6a\x46\xdc\x77\x4e\xe8\x35\x68\x76\x6d\x6e\x64\x0b\xd0\x5f\xb1\x82\x2f\x36\x2d\x35\x01\x80\xb3\xa0\x09\xa6\xf5\x94\xd3\x36\xdc\xa7\xae\x23\x85\xf0\x16\x00\xbe\x0a\x19\x3c\x85\x08\x71\xab\xe4\x4e\x6b\x6f\x3a\xf0\x30\x5a\xb3\x2d\xe7\xf0\x0f\xed\x67\xfe\xe6\x7d\xde\xa4\x8b\x5b\x8e\x50\xa7\x8e\x29\xd1\xec\x60\x1b\x0d\x6e\xc1\xc8\x23\xda\x23\xab\xde\xd2\x09\x05\x24\x97\xdb\x8c\xf0\x74\x26\x2b\xa9\x98\xa7\x64\x75\x19\xc7\x57\x14\x4e\xe4\x3a\xa7\x1a\xe0\x5c\x70\x54\x6d\x52\x01\x56\x93\xa5\x00\x49\x6f\xd5\xf8\xba\x89\x00\xfd\x4f\x6d\xa3\x01\x08\x14\xaa\x0a\xb0\x6a\xf4\x08\xb7\x3a\x38\x7a\x16\xa9\x0f\xdf\x78\xa2\x02\x7d\x1c\xa0\x59\xce\x86\xd1\x1c\x96\x51\x62\x11\xf2\xcb\x74\x15\x71\x31\xab\xfa\x45\xf5\xc8\x0a\x43\x81\x2e\x8b\x01\x90\xd5\xcc\x3b\x96\x0f\xb1\x6e\x56\x6c\x77\x0e\x58\xcc\x6f\xd3\xec\x5f\x4b\x5b\x40\xb5\xba\x9e\xe1\x28\x2d\x49\xe0\xd5\xb4\x08\xdc\x76\xb8\x81\xb4\x21\xb3\x9a\x0f\x9a\xf5\x40\xcf\x71\xf3\x8b\xf6\x83\x88\x58\xf5\xcf\x02\x8e\x63\xbe\x72\x39\xd1\x45\xc9\x2e\x27\xd3\x90\xec\x28\x6b\x29\x70\x36\x94\x2d\x37\xb8\x32\x0f\xec\x76\x85\x6b\x83\xe9\x3a\xb4\xb5\xb1\x06\x3e\xb5\x16\x59\xa3\x4a\xc9\x84\x53\x4f\x42\x6b\xe2\x7e\x35\xa6\xb9\x94\x19\xa3\x00\xce\x61\x45\xd1\x85\x1b\x7f\x6b\x7e\xee\xff\x56\x62\xce\x86\x78\x02\xe2\x19\x28\xd9\x20\x6e\xb4\x1d\x35\x8a\x75\xf4\xfd\x49\xe1\xc6\x9a\xee\xcc\xbf\xdf\x89\x85\x6c\x8d\x1c\x40\xbc\xce\x78\x38\x56\x01\xec\x90\x0b\xdc\x07\xf6\x10\x07\xfc\xab\x5b\x99\xb4\x6f\x39\x40\xfa\xfc\x4c\x51\x94\xc3\xeb\xde\x25\xce\x99\x45\x03\x13\x06\x1a\xf3\xf8\x3a\xcf\x98\x2d\xfc\x8d\x0f\x67\xd0\x0d\xd0\x8a\x05\x1d\x93\x67\x8f\x7d\xd5\x45\x57\x04\x56\xdd\x07\x1e\x8e\xc6\xaf\x7c\x17\x19\xec\xfa\xe0\x96\x14\x37\x5b\x2f\xc1\x6f\xd3\x09\x24\x1f\xe9\x4b\x9f\x0f\x30\x76\xb9\xc0\x0c\x25\x16\xb3\x57\xda\x73\x44\x21\x63\x22\x91\x8b\xdd\x6e\x5d\xa7\x17\xf1\x95\x83\x6a\xa3\x12\x04\xc7\x3e\x90\x3e\xaa\xef\xd2\xa4\x90\x4a\xd9\xf4\xdb\xef\x16\xf5\x11\x61\xc4\x10\xe6\x96\xb1\x91\xd8\xf8\xcc\xc9\xc7\x0e\xe8\x0a\xc3\x4f\x9d\xe8\x60\x93\x83\x00\xee\xa7\xb2\x75\x7d\x7a\xf7\x46\x75\xbb\x41\x95\xd1\x3e\xfb\xca\x45\x42\xf7\x30\x7e\x9c\x51\xb6\xe9\x99\xc8\x1a\xec\x9f\x59\x46\x68\x02\x91\x56\xe6\xd7\xae\x0f\xee\x25\x1e\xcc\x99\xa6\xd1\x98\x11\x8d\x19\xd1\x98\x11\x8d\x19\xb7\x6d\xcc\x68\xd1\x9e\x07\x65\xd1\x68\x8f\x7e\x4f\xb3\x46\xf7\x32\xec\x48\xb6\x8f\x66\xe0\xe8\x1e\x5d\xb4\x72\x44\x2b\xc7\x7d\xb2\x72\xf4\xdd\x87\x68\xea\x88\xa6\x8e\x68\xea\x88\xa6\x8e\xfb\x60\xea\x40\x1a\xb5\xbf\xbd\xa3\xf1\xfe\x38\xc6\x1d\x2d\x1f\xd1\xf2\x11\x2d\x1f\xf6\x7e\xc8\x82\xff\xdb\xdb\x04\xdf\xcb\x84\x66\xe7\x25\x1c\x93\x57\x49\xc2\x94\xda\x6e\x00\xe9\x7b\x07\x09\x4f\xa5\x70\xc8\x02\xe2\xa4\x28\xce\x43\x16\x36\x71\xaf\xd1\x3d\x5c\xc4\x0a\x15\x30\x2b\xcc\xbb\xec\x93\xd1\x9a\xc3\x94\x43\xe5\xb6\xbf\xd2\x2b\xa8\xad\x54\xfd\x46\x54\x22\x73\xa8\x5b\x6d\xe5\xd5\x35\x84\x72\x73\x4d\xd6\x65\xb2\x22\x8c\x2a\x8e\x15\x94\x97\x05\x15\xba\xfd\x9e\xcd\xd0\x83\x07\xc7\xc5\xd9\xe4\xac\x58\x73\x85\xd1\xb9\x30\x09\x2e\x96\xd1\x80\x12\x0d\x28\xd1\x80\x72\xcb\x06\x94\x19\x41\xd9\xb7\xba\xb6\x6b\x84\xf5\x12\xf6\x6b\x49\x33\x77\x96\xab\xc7\x1b\x59\xda\x2c\x1d\x41\xa7\x56\x3a\x9c\x11\x43\xf8\x5d\x98\xa6\x4d\x0d\x0e\x1a\xe0\x78\x63\x87\x27\x96\x66\xe6\x1d\x34\xef\x36\x8c\x35\xe6\x9c\xdb\x6c\x1e\x48\x52\x0f\x35\xf6\xf1\xa6\x9a\x1a\xcf\xe8\x5b\x86\x61\x4e\xd3\x3f\x80\x83\x98\x6b\x6a\xdf\xfa\x20\xc5\x47\x7b\xe9\x5f\xf9\x0a\x1c\x43\x2c\xad\xf3\x85\x8a\x3f\x38\x11\xcb\x7f\x24\x2c\xec\x51\x25\x34\x58\xc0\xf6\x88\x13\x4f\x70\x02\xe2\x00\x7d\xbc\xb2\x7d\x80\x82\x69\xc5\xc3\x11\x65\xbc\xf4\xaa\x3d\xe2\x33\xaa\x57\x5e\x66\xff\xf8\x9e\x98\x56\x0d\xd4\x72\x17\x09\xb8\x62\xc5\xbc\xdd\xd9\xdf\x59\x31\xf7\x89\x0d\x5d\xdd\xa0\xbf\x5e\x5c\x9c\x11\x68\x7f\x18\x51\x23\x58\xe3\x8f\xe5\x70\x15\xaf\x46\xd3\x0e\x4a\xd2\x48\xa6\x44\x49\x51\x86\xd9\xa7\x82\x4d\xd8\xc2\xc6\xcd\x04\x3b\x02\x36\x44\x35\x82\x4f\x1f\xdf\x77\x5c\xec\x0f\xf5\x06\xae\x60\x05\x56\x04\xa0\x05\x24\x53\x2c\x8b\xcc\xe7\xd9\x07\x19\xc8\x32\x6b\x0c\x99\x87\x8b\x00\x6c\x83\x7c\x5f\xcb\xd9\x63\xd1\xf7\x22\xdb\x38\xc0\xff\xa2\xcc\xb2\x29\x59\x40\x69\x36\xa5\x59\xee\x34\x79\xb3\xe9\x33\x42\x2e\x27\xdf\x5f\x4e\xc8\x9a\x51\x01\x94\x62\x37\x31\x1b\x17\xa0\xf7\x48\x54\xa6\xc3\x2a\xf1\x45\xfd\x90\xdb\xc8\xcd\xb9\x9a\x92\x8c\x7f\x61\x2f\xc9\x92\xe9\x29\xc9\xa5\x32\xff\x5f\xea\xa9\x95\xb6\xa7\x04\xd2\x65\x4c\xc9\x8a\xd1\x74\x4a\x64\x8e\x5c\xeb\x46\xa3\xdf\xeb\x1c\xee\x46\x19\x0e\x44\x16\x0e\x4b\x12\x40\x90\x6e\x8f\xf5\x2f\x20\x5f\xdb\x7b\x6c\xb6\x05\x7f\xb0\x54\xc1\xcd\x64\x70\xc9\x47\x45\xbf\x76\x64\x98\xf3\xf3\x43\x86\x5e\x45\x57\x60\x38\xe9\xe5\x64\xc9\xf4\xe5\xc4\xf0\x2f\xa7\x7b\xb9\x07\xf8\xf7\xe5\x64\x46\x2e\x27\x97\x13\xf2\x14\xf8\xf5\xb3\x11\x83\x03\x01\xa0\x7b\x84\x28\x1b\x04\xc3\xc4\x1f\x9c\x39\x19\x35\x8e\xc6\x48\x67\x84\xbc\x76\x99\x10\x41\xdb\x2b\xa0\x07\x21\x49\xca\x95\xe6\xc2\xbd\x84\x01\x46\x42\x06\xfd\x82\x1a\x99\x65\xd5\x2f\xaa\x3e\x97\x50\xf0\x80\x79\xf7\x69\x50\xed\xf7\xd0\x7e\x66\xde\xb1\x89\xed\x4e\x1a\xfa\x8f\xea\x5a\xb6\xcb\x09\xcd\xb2\xcb\x09\x32\xa4\x3e\xcd\xc9\x0a\xb8\x94\x74\xa9\x72\xb2\x20\xe7\x2c\x5b\x74\x69\x86\x9d\xf9\x44\x2d\xad\xed\xbd\x3e\x66\x2e\x81\x45\x1f\x82\x96\x70\xf9\x9d\x6c\x6e\x44\xd7\x91\x47\x33\xac\x9f\xd5\x96\xb8\xaa\x87\x3b\x7c\xd4\x7f\x53\x48\xd1\x9d\x33\x75\x98\x73\xd2\x90\x3c\xb6\x48\x63\x8d\x32\x1a\x7a\x3a\x25\xd7\x48\x0c\x31\xe1\xc6\xd4\xea\x0b\x01\xad\x2c\xe4\xd7\xcd\xc8\xe5\xb8\xea\x53\x38\x9d\xb6\x19\x50\x84\xbf\xd7\x43\xec\x77\xa2\x09\x37\xa2\xb6\xdb\x58\x7e\x8d\xdf\xdb\x01\xfb\xe8\x44\xb8\x7b\x56\x3c\xc1\x13\x19\x0a\xc5\x41\x06\x0c\xf0\x4a\xd8\xe3\x8d\x41\x5b\xd8\x47\x91\x32\x4c\x73\xac\xc4\x13\x4d\x14\x5f\x0a\xc8\xdd\x2c\xf4\x14\x94\x3e\x1b\x0f\x4a\xd2\x12\xb2\xa3\x68\xa6\x50\x31\xce\xa5\x52\x7c\x8e\xd1\x78\x5c\x24\x72\x9d\x9b\xdd\xd9\x66\x19\xe8\x11\x29\x68\xce\xff\xd2\x63\x42\x7b\x75\xf6\x0e\x1f\x75\x91\x56\xf7\xd0\x56\x67\x96\x41\x7e\xbd\x60\xae\x46\xd5\xf1\x31\x97\x66\xa7\xad\x25\xce\xc8\x15\x41\x06\x5c\xc8\x28\x92\x84\xee\x1b\x56\x59\xd3\xc3\xbb\x22\xca\x35\x64\xa9\x09\xe9\x05\x17\xf0\xbe\xef\xdd\x87\x32\xda\x9d\xb8\xa9\x28\xe2\xbe\x04\x24\xbc\xff\x88\xc0\x63\xf4\xd9\x58\x31\x02\x32\x7d\x72\x5d\x9d\x98\x20\xa1\x28\xac\x93\x39\x54\x98\xdd\xd6\x4a\x5c\xaf\xbc\x6b\x82\x69\x3b\x5c\x68\xcd\xae\x58\xb1\xd1\x2b\x3c\x2b\x87\x9e\xd7\xc0\x9c\x1a\x6e\xda\x6a\xcd\xd1\x12\xd4\x1a\x7f\x63\x3c\xde\xb5\xe3\x76\x9a\xf8\xd3\x36\xbb\x14\xa6\xf5\xe9\x42\xca\xcb\x49\x33\x63\x5e\x40\x49\xc9\x93\x85\x94\x4f\x90\x2d\x43\xd2\xe0\x60\xd7\xfb\xba\x3e\xba\xa0\xb9\x45\xc8\x3c\x10\x29\x3d\x8e\x9c\xd9\xc7\x3f\x87\x32\x0d\x75\xbf\xd2\x61\x58\xd5\x41\xba\x43\x50\x2d\x3a\xad\xaa\x33\x42\x3e\x48\x0d\xa6\x07\x4c\xf2\x6e\x74\x94\x86\x7d\xc5\x0a\x0c\xe6\x59\x4d\x84\x31\x12\x19\xc8\x00\x56\xb5\x31\xdb\x4f\x33\x92\x50\xc5\xa6\x64\xce\x12\x5a\x2a\x6b\x8b\x76\x6a\x8d\x2d\x17\x66\xe8\x81\x11\x7b\x7d\x64\x6b\x60\xd3\xd8\x74\x8f\x33\x9a\x5a\xa3\xa9\x35\x9a\x5a\x6f\xdd\xd4\x8a\xfe\x25\x91\x3a\x59\xc1\xdb\x5a\x0d\x67\xdc\xcb\xc8\xd8\x4d\xbf\xbe\x49\x23\xe9\xc0\x52\xdc\x1f\x43\xe9\xd0\x28\x77\xe7\x53\x83\x48\x37\x6b\xef\xf2\x19\x15\xc8\xdb\xaf\x34\xd1\xd9\xc6\x49\x9d\xde\xd0\x12\x8e\x31\xb0\xba\x98\x23\x10\x9a\x69\x7b\x9a\xb9\x33\xac\x98\xde\x6a\x46\x11\x7d\x66\xe2\x31\xc6\xe1\xca\xf8\x18\x5e\x3b\xb4\x6a\xd4\xec\x63\xf5\x89\xef\x73\x2c\xbb\xcd\xd9\x81\x60\x39\x34\xfa\x6d\x0b\x36\x34\x8f\x03\xce\xa1\x6b\x02\xbb\xde\xa9\xee\x75\xd8\xd9\xda\xb7\xc3\xa5\x30\xda\xe8\x6e\x72\x5b\xf0\x46\xa5\x44\x59\x61\x9b\xb5\xb4\xd9\x5e\x11\xee\x9a\x1b\x25\x24\x74\x7c\xbb\x62\x1f\x16\xcb\xd5\xd4\x8d\x6d\xf0\x40\xa5\xa5\x92\x14\x56\x16\x6a\xe9\x88\x80\x96\x02\x2e\x2d\xb4\x59\xae\x65\x6a\x85\x13\xa3\xdc\x01\xfc\x48\x11\xf6\x35\x67\x05\xc0\xaa\x7c\x89\x20\x60\xcf\xc8\x3d\xb0\x2e\x6e\xf7\xa4\xad\x94\xe4\x12\xfd\xcc\x37\xe4\xd3\x3b\x90\x8c\xd4\x4a\x5e\x9f\xae\x78\xea\x0c\x70\x58\x45\x48\x4b\xf2\x6b\xc9\x93\x2f\xd9\x86\x64\x4c\x03\x64\x4c\xa4\xb8\x1e\xb6\x8c\x9e\xe7\x64\xbc\x08\x1d\xf5\x90\x29\xd3\x7e\xec\xc3\x2f\x17\xe4\x4f\xd5\x07\xd9\x57\x2b\x78\xa9\x8d\x32\x22\xbd\xf9\x48\x5a\xf0\xab\xa6\xb5\x36\x65\x89\x4d\xc9\x4d\x9d\xa2\x45\xb9\x62\xca\x88\x78\x0b\xe8\x2c\x65\x79\xa9\x37\x53\x8c\xc9\x20\x19\x5f\x30\xcd\xd7\xec\xb4\x4a\x68\x83\x0b\x07\x39\x7f\x13\x2d\xcc\x1d\x81\x9a\x21\x85\x19\x5f\x07\x85\xc4\xe6\x60\xfe\xab\x09\xf8\x2e\xf5\x93\xed\x08\xf3\xe9\x4b\x23\xbb\x42\x06\x9e\xee\x41\x3b\x0b\x72\x17\xc8\x2d\xca\xd1\x51\x8e\x8e\x72\xf4\xad\xc8\xd1\x37\x14\x94\x03\xda\x79\x68\x39\xb9\x83\xe9\xd0\x16\xab\xb9\x09\x12\x22\x1c\xfb\xcd\xe5\xe4\xe6\x4a\x8c\x12\x93\xdb\x43\x38\xaa\x94\xdc\x1c\x63\x4d\x28\xd8\x22\x6d\x8e\xf1\x59\x69\xe9\x4f\x16\x58\xfd\xa0\x5a\xc4\x8c\x7c\xb4\x54\xfc\x50\x56\xf9\x5d\xed\x52\x87\x05\xfb\x45\x3e\x15\xf9\x54\xe4\x53\xf7\x33\x36\x31\x02\xde\x1e\x22\xe0\x6d\x1f\x1b\xce\xc3\xb7\xdf\xf4\xc4\x4d\xbc\x35\x3f\x77\xd5\x61\xf1\xc1\x19\xb3\xbf\x30\x0d\xad\x9e\x3e\x23\x6b\xa6\x57\x32\xad\x28\x52\x3d\x94\x82\x90\x73\x2e\x5c\xe5\x44\x6e\xae\x5c\x5e\x06\x01\x84\x15\x76\xc7\xe5\xf3\x84\x2c\xb0\xae\xfa\xf8\x8a\x15\x9d\xde\xe2\x23\x46\x63\xd4\xfd\xc8\xd6\xb0\xbb\x91\xe5\x13\xa3\x61\x32\xc4\x3f\x2c\xe4\x8e\xf1\x50\xd1\x50\x76\xb7\x86\xb2\x81\x62\x02\x83\x3c\xc0\x6c\x76\x23\xd2\x6c\x97\x58\x30\x10\xe5\x3a\xce\x0e\x79\x87\x39\x7e\xd1\x25\xbc\x21\x97\xf0\xd6\xe5\x04\x70\x8b\x86\x4b\x5f\xda\x63\x68\xa3\xf7\x00\x81\xc2\xad\x80\x94\x17\x18\x7a\xa3\xc8\xe5\xe4\x1f\x70\xab\x16\x10\x74\x46\xae\x59\xc1\xac\x0c\xb9\x66\xae\x2a\x0d\x15\x1b\x7b\x88\x77\xaf\xab\x71\x57\xe6\xc3\x5e\xba\xbf\x23\x35\x76\xcc\x62\x30\xe7\x38\xf2\xc9\x0e\x69\xd9\x3e\x68\x8b\xca\x96\xb3\x72\x3c\xa5\xa0\x55\x90\x8b\xa2\x64\x66\x23\x02\x78\xdc\xb5\x33\xe3\x79\x54\xea\x82\x66\x8a\x55\xe9\xc0\xbb\xc3\x17\x53\x26\x78\xd7\x67\xdf\xc0\xef\x80\xc8\xb2\x90\x8d\xe1\xaf\x62\x3f\xd3\x20\xfb\x38\x7c\x1e\xce\x1e\x04\xf7\xd2\x6a\x1e\x38\x30\xc3\x60\x52\xff\x15\xf8\xcd\x9e\xbe\x06\xad\x5e\x51\x80\xf5\xc9\x9c\x0b\xe0\x6f\xa2\x12\x42\x64\xd5\x2e\x18\xd5\x8c\xd8\xd1\xdb\x0c\xd8\x66\x7c\xda\x8e\x3d\x58\x4e\xf3\x53\x4f\x4c\xa7\x37\x9b\xbe\xed\x89\xee\xac\x37\xb0\xe0\x16\x2b\x25\x79\xbc\xb3\x92\x6b\x86\x06\x5a\x22\x13\x30\x1d\xd7\x8c\xb3\x75\x3b\x21\xe8\x67\x58\x4e\x48\x11\xc3\xd0\x0a\x96\x6d\x1c\xa2\x89\x61\x21\x2a\xb4\xb7\x42\x87\x66\xf5\x42\xcf\x3d\xd6\x48\xc7\x62\xb3\xc5\x9a\x8b\x66\xf7\xca\xca\x79\x82\xa8\x9c\x63\xb5\x45\xae\x67\xe4\xcf\x10\xa4\xaa\x34\x15\x09\x9b\x92\x8f\x7f\x7a\xf5\xda\xe5\x9a\x00\xbb\x2d\xc4\x72\x15\x32\xb3\x75\x67\x99\x90\xe5\x72\x05\x3f\x58\xa4\x92\xe6\x59\xe6\x72\x0f\xe0\x98\x6c\x96\xf4\x96\x35\xb8\x23\xfc\x3c\x04\x24\x9a\xc6\x5d\x34\x1e\x3a\xa9\x9d\x42\xac\xb8\x54\xc9\xa3\x1b\xa0\xe7\x28\x89\x42\x08\x6f\x25\x8a\xe2\xf1\x3a\xb0\x12\xde\xb6\x60\x6c\xa7\x13\xad\x77\x5a\xb8\x30\x9f\x53\x1b\xad\x08\xf6\x34\x40\x85\x67\x44\x65\xd8\x6d\x19\x76\x18\xd8\xe2\x00\xee\xea\xa8\x50\x8e\xe7\x68\x27\xe7\xcb\xb2\xf0\xd1\xcd\x5b\x9d\x08\xa1\x03\xe1\x4f\x16\x44\x52\x3f\x58\x38\x5e\x80\xc3\x83\x94\x74\xc5\xa0\xe2\x1a\xf5\x20\x28\x46\x0b\x5b\x75\x16\x7c\x20\x5c\x3f\x51\x44\xd1\x05\x26\xdd\x57\xaa\x5c\xb3\x1a\x50\x70\x45\x5d\x69\x5c\xef\x3b\x98\x12\x76\x65\x98\xd2\x02\x1f\x60\x37\x6a\x07\x84\x5f\x11\x80\x15\x0d\x85\x16\xf5\x78\x05\xf3\x53\xd5\x59\x47\x32\xf2\x5d\xc9\x81\xd9\x2b\x9c\xb9\x99\x78\x22\xd7\x73\x2e\x70\xb5\x60\xd9\xe1\x9b\xb3\xfa\x39\xf6\x17\xbb\x49\x29\x60\x19\xab\x11\x4c\x89\x2a\x93\x15\xd4\x14\x15\x21\x91\xc4\x00\x0b\xc9\x10\x30\x59\xe6\xb9\x2c\x74\xfb\x5d\xcc\x78\x40\x35\xa9\x4d\xdf\xfc\x7c\x2a\x0b\xd2\x08\xe3\xe8\x70\x52\x75\x5e\xde\x60\xe9\x5a\x2b\xf3\xae\x3a\xae\x96\xe2\x62\x7d\x31\x87\xf2\x0b\xb2\x1d\x80\xd6\x69\x0e\x29\xc4\xce\x16\xb5\xcf\xe2\x45\xe0\x0a\xcb\x3c\x26\x72\xbd\x86\x70\x0b\x26\xa0\xce\x11\x83\x03\x0d\xe5\xa0\xc3\x35\xa9\x2d\x95\xf7\x31\x85\xcf\xbb\xd6\x4b\x85\x67\xbe\x93\x3b\xb4\x4e\xcf\xb6\x78\x18\x75\x23\x80\x6c\x28\x73\xdf\x0a\x48\x76\xf7\x7a\xad\x03\x72\x3d\xe0\x88\x43\x50\x65\xcf\x92\x1d\x6e\xbd\x1e\xd8\x5a\x35\x16\xea\x06\x42\x32\xf4\xb0\x03\xba\x7b\x8b\x60\x8c\xa9\x18\x62\xc0\x79\x0c\x38\x8f\x56\xf1\x68\x15\xbf\x27\x56\xf1\x7b\x1d\x70\x8e\x14\xf3\x01\x1b\xe1\xfb\x27\xb0\x9f\x25\x7e\x78\x41\x46\x70\x9f\x5b\xb4\xc9\xe3\x07\x63\x24\xfa\xfd\x8b\x44\x6f\xed\x4c\x0c\x47\x8f\xe1\xe8\x77\x15\x8e\x8e\x87\x31\xc6\xa4\xc7\x98\xf4\x18\x93\x1e\x63\xd2\x63\x4c\xfa\x2d\xc4\xa4\xd7\x49\x6e\x0c\x4c\x8f\x81\xe9\x31\x30\x3d\x06\xa6\x7f\x33\x81\xe9\x56\x13\x8e\xd1\xe9\x31\x3a\x3d\xda\x65\xa3\x5d\xf6\xde\xda\x65\x0f\x1d\x9d\x3e\x48\xf7\xbe\x71\x8b\xea\xbe\xc1\xea\x77\x64\x55\x8d\x61\xeb\x0f\x00\x8d\x3b\x64\x00\x7f\x50\x90\xdc\x5e\x13\xdd\x7e\x97\x6d\x0f\x18\x6a\xef\x08\x76\xbd\x2d\x31\x9e\x3d\xc6\xb3\xc7\x78\xf6\x28\x79\x47\xc9\x3b\x4a\xde\x07\x8c\x67\x1f\xe2\x33\x0f\x26\xa8\xbd\x26\xcb\xde\x3c\xb2\x7d\xeb\x9a\x8c\x17\xac\x6f\x21\xc6\x7d\xeb\x68\x1f\x66\xa0\x7b\xaf\x7e\x12\xa3\xdd\x23\x17\x8b\x5c\xec\xf1\x72\xb1\x88\xb6\xfb\x16\xd1\x76\x31\x0c\xfe\x9b\x0c\x83\x8f\x51\xf0\xdf\x98\xdd\xed\x81\xc6\xc3\xdf\xab\x70\xf8\xbb\x32\x46\xc6\xe8\xf8\x18\x1d\x1f\xa3\xe3\x63\x74\xfc\x2e\x9a\x7b\x0c\x91\x8f\x21\xf2\x31\x44\x3e\x86\xc8\xc7\x10\xf9\xd1\x42\x7f\x8c\x93\xdf\x45\xb9\xd8\x2f\x58\xbe\x7b\xd1\x77\xc5\x9e\xb7\xc5\x66\xa9\x12\x9a\x71\xb1\x3c\xbd\x7a\x31\x7b\x5d\x48\xa5\xac\xb5\x17\xcd\x21\x1f\x19\x14\x9e\x4f\x06\x51\xeb\x03\xaf\x55\x7c\xd0\x0a\x18\xb5\x40\x36\x09\x6e\x6b\xa3\xcd\xd8\x6a\xf4\x1b\xcb\x2e\x17\x0c\x48\xa4\xdb\xe5\x6d\xf4\x1f\xcc\xad\x36\x62\x67\x57\xe3\xb6\xb3\x64\x57\x81\x3c\x58\x6a\x7f\x47\xb3\x6e\xe3\xed\x9f\x6e\xd1\x68\x7a\x39\xd9\x31\x7c\x69\xdb\x58\x5f\x9e\x9e\x56\xe8\x63\x33\xda\x54\x26\xea\xd4\x28\xa4\x27\xcb\x92\xa7\xec\xd4\xee\x16\x67\x85\xfa\x1d\x38\x60\xf6\x16\xc3\xc2\xd3\xf7\xd6\x92\xf0\x9f\x99\x2e\x78\x72\xee\xc3\x5b\xfa\x8e\x5d\x57\xfb\x80\xe3\xae\xe4\x35\x20\x27\x12\x9a\x31\x43\x32\x8c\x6a\x6b\x1a\xa2\x9e\xab\x94\x4c\x38\x20\xfb\xad\xa4\xb4\x21\x7f\xab\x10\xd7\xd6\xdc\xfe\x74\x21\x0b\xc2\xbe\x52\x43\x11\x48\xc6\xc4\x12\x83\x4d\x7f\x2d\x99\xd1\x38\x04\x49\x32\x59\xa6\x64\xcd\x94\xa2\x4b\x43\x78\x8c\x24\xc6\x8d\xb4\x2d\x0b\xf2\xbf\xce\xce\xd1\xc0\x95\x49\x9a\xce\x69\x66\xc4\xf0\x82\x14\xa5\x10\x20\xd1\x95\x5a\xf1\x14\xb6\xc2\xc6\x35\x3d\xdb\x76\xc8\x71\xf4\x1f\x3a\xcf\x78\xf0\xac\xb5\x4c\xd5\xb3\xae\xb8\x0a\xbb\x26\x5c\x10\x34\x5a\xd4\x98\x62\xcd\x08\x6f\xd6\x98\x65\x2c\xd1\x5d\x12\x52\xfd\xb9\xf9\x10\x40\x40\xb4\xac\x6e\x36\x75\xe0\xf9\x84\x68\xbe\x06\xb1\x95\x1b\x29\xdf\x81\x75\x30\x3d\x06\x76\x34\xc2\xa5\x3a\x60\xeb\x7f\x4f\xe7\x2c\xf3\x63\xfd\x6d\x3a\xd1\xb4\x58\x32\xfd\xea\x8a\x15\x74\xc9\xfe\x4e\xb3\xb2\x63\x99\xda\x6d\xdc\x72\xe1\x13\xc3\x7d\x4e\x72\x69\xfd\x4b\x66\xf9\x96\x99\x9c\xd3\xcc\xad\xe0\x53\x23\x87\x90\x5f\x4b\x2a\x34\xd7\x9b\x67\x33\xf2\x73\xa9\x4b\x9a\x19\x29\xe6\xab\xd9\x62\x7e\xc5\xf0\xa8\x5d\x40\x77\xf0\x85\x7d\xa6\x39\xf3\x44\xf1\x7f\xd9\x6f\x55\x33\x1c\x9c\x5a\xd7\x9c\xfc\x5c\x82\xa3\xb0\xe3\x44\xc2\x15\x3b\xd4\x7c\x86\x59\x63\xcb\x86\x7f\xda\xee\x62\xa4\xcd\xbf\x7e\x52\x86\x99\x63\x83\xdc\x6c\x55\x0d\xbb\xda\x37\xa0\x05\x0e\xc1\xe6\xb7\x81\x36\x0e\xd5\x68\x52\xb5\x03\xf1\x98\x4e\xec\x67\xf1\xb4\xb4\x68\x89\x7d\x3a\x7c\x5b\x3a\x1a\xb9\xa3\xd5\x9a\x94\x9d\x0b\xc5\xb6\x29\x91\x57\x88\xcb\x82\xc5\x85\xa4\x35\xa9\x3a\xdc\x4d\xa8\x4d\xae\x6f\xdc\xc3\x03\xee\xbf\x0c\x07\x1b\xe5\x7e\x04\xdb\xb3\x30\x20\xae\x60\x02\xaf\xce\xa8\xa1\xe1\xf6\x31\x42\xf7\x1e\x1d\x21\xbf\x97\x64\xe1\xaf\x46\xe2\x36\x42\x6e\x76\x26\xd3\x57\xee\x54\x17\x43\x94\xc1\x99\x69\x2a\x84\x04\x59\xf9\x5e\xcc\x75\xa8\x6e\x47\x27\x2c\x31\x82\x37\x22\x78\xe3\x01\x82\x37\x5a\x40\x06\x4c\xb8\x62\x57\xc7\xb5\x3c\xfa\x88\xfd\x90\x6e\x42\x99\xc6\xc0\x49\xe6\x6c\x45\xaf\xb8\x2c\x0b\x6b\xb4\x75\x37\xfa\xd8\x13\x34\xa3\x39\xa1\x22\x3d\x41\xc7\xc0\x48\x78\xa2\xa3\x69\xb3\x7e\x9a\xb6\x0d\x9b\xe2\x18\x69\xb7\x5b\xb4\x4e\xd3\x0e\x34\xa2\xd1\x60\x93\x11\x24\xbb\x13\x69\x32\xe6\xbd\xc3\xc1\x4c\x46\x7c\xed\xb5\x14\x08\x64\x18\xe2\x30\xdb\xde\x0d\x9c\xea\x36\xf9\x91\xb6\x02\x46\xcf\x9b\x04\x12\xf9\x24\xac\x00\x0b\x1a\x90\xa6\x6d\x22\x27\x3c\xf3\x87\xa5\x25\x66\x66\x54\xe9\x8b\x82\x0a\x05\x03\xba\xe0\x5d\x92\x50\xbb\x8d\x37\x1a\x52\xa5\x51\xfa\x40\xe4\xbf\x9b\x97\xf6\xad\x99\xc5\x97\x48\xc1\x9c\x87\x4c\x4b\x42\x05\x78\x31\x6f\x74\xf7\x61\xac\x40\xdb\x8c\xde\xdf\x29\xc0\xc1\x03\xe4\x16\xab\x72\x4d\xc5\x49\xc1\x68\x0a\x0e\x3d\xf6\x35\xcf\xa8\x75\x16\x58\xdb\x98\xe1\x1c\x29\xd3\x94\x67\x2a\xb8\x2e\xd5\x4c\x76\xf1\xaa\x15\xde\xab\x86\x16\x1e\xf8\xcb\xa5\x86\xf2\xcb\xf4\x44\xd9\x05\xf4\xdf\xe8\x4e\x33\xd2\x73\xcf\x95\xc7\xa0\xb9\xc3\x53\x2a\x27\x37\x57\x5b\xf1\xf4\xa2\x30\xdc\xfe\xcf\xe8\xfd\xfd\x24\xbe\x08\x79\x2d\x9e\x75\x7d\x07\x7f\x68\x69\xad\x9b\x9c\x35\xce\xa9\x23\x30\xfe\x23\xbb\x02\x13\x06\xee\x25\xec\xea\x5e\x37\xf2\x3d\x57\x7a\xe8\x32\x3a\x03\x77\xaf\x8c\x67\x59\xa0\xda\x76\xa3\xd0\xfe\x1c\xd1\xbb\xc7\x16\x00\xbd\x9d\xff\xe6\xfb\xb8\x8f\xeb\x60\x04\xdf\x03\x67\x4b\x94\x53\x6f\x55\x4e\x85\xed\xf7\x52\xea\xcd\xf4\x5a\xae\xac\xec\x78\x10\xc1\x65\xb4\x5a\xeb\x3e\xbb\x17\x99\xdb\x06\x6e\x75\x46\x81\x7d\xb5\xda\x5a\x98\x82\x69\x85\xf6\xc5\x8f\x6c\x31\x99\x4e\xd6\xf4\xeb\x47\x06\x6e\xbb\x0e\x02\x18\x3e\x6c\x0d\xab\xcc\x73\x56\x90\x8c\xaf\xb9\xae\x72\x24\x96\x0e\xe3\x96\xcb\xd4\xc2\x11\x2c\xfe\x42\x31\xed\xf0\xd4\xd5\x70\x7f\x32\x4f\xed\xf1\x55\x6b\x9a\x65\xe8\x90\x17\xe4\x67\x2e\xdc\x97\x83\x29\x19\x7a\xb7\x84\x6d\x41\x39\x18\x7f\xfa\xf1\x07\x38\x68\xd5\x1b\x1d\x82\x43\xf5\xd0\x0b\x3a\xf2\x7a\x60\xf8\x85\x6b\xad\x25\xb9\x5e\xf1\x64\xd5\x18\x38\xcc\x0a\x3d\x20\xa9\xbc\x16\x88\xb0\xb1\xa9\xd8\xe0\xa5\x17\x66\x05\x66\x84\x34\xbe\x1c\x38\x5d\xe7\x8c\x3c\xf7\xc8\xb0\x2c\x5f\x51\xb2\x60\xd4\xdc\x32\xb2\x34\x42\xe3\x5f\xcf\x5e\x9d\xc3\x66\xc9\xff\x8f\x15\x12\x01\x4e\x46\xd0\x49\x11\x7c\xa2\x49\xc6\xa8\x4d\xaa\x84\x92\x2f\x91\x05\x71\xa6\x51\xef\x7d\x08\xa1\x2b\x33\x42\xce\x9d\x45\x4b\x81\x57\xf8\x8a\x11\xaa\x48\x26\xc5\x12\x9c\xfd\x61\x9f\xb6\x83\x2b\x67\xcf\xf3\x49\x07\x47\x6e\x47\xe3\xa0\x75\xc8\x53\xce\x91\xe9\x5c\x49\x95\x57\xf2\xa7\x01\x4e\x00\x39\xa1\x32\x46\x0b\x51\x13\x5c\x3c\xbd\x4d\xa4\x50\xe5\x1a\xc1\xde\x66\xa1\xa0\xbd\x39\x7b\xa6\x75\xca\x94\xb9\x08\xcd\x63\x3a\xdf\x90\x12\x70\x5b\x86\xb8\xc2\xa2\x87\x99\x8b\xf6\x50\xaa\x86\xdc\xbd\xde\xa7\xf0\xfa\xec\xd3\x27\xcd\x33\xeb\x55\x3e\x63\x45\x62\xa4\x83\x2e\xb1\xd7\xfa\x14\xac\x9d\x97\xbc\x3e\xfb\x44\xca\xea\x4d\xf2\xd4\xf3\x15\x84\xa0\x52\x92\xfb\xce\xf0\x2c\xbb\x4c\x5c\xaf\xcf\x3e\x3d\xb3\x56\xe2\x2c\xc3\x64\x9f\x32\x55\x3f\x99\x53\x68\x2e\x61\x95\x83\x09\x17\x0b\x4e\x73\xcd\x12\x6a\xd3\xa0\xbb\xc4\x5c\xa5\xaa\x21\xc5\xfa\xcf\xc3\x6e\xd4\x78\x68\xf9\xf6\xa3\xb0\x5b\x7d\x0a\xee\x1c\x55\x32\xf7\x00\x91\xdd\x42\x63\x6d\x5f\x9e\x1a\x4d\x27\xf6\xdc\xf5\x13\x5a\xfb\xca\xf8\x23\xe1\xc6\xdb\x77\x26\xfc\x26\x9b\x0d\x9e\x92\x5d\x4e\xc8\x94\xb0\xd9\x72\x46\xfe\xf8\x3c\x4c\x5c\x46\x85\xff\x94\x59\x0b\xb0\x5e\x9b\x03\x21\xe4\x35\xf9\xe3\xf3\xef\x10\x1a\xa9\xea\x1d\x8d\xa4\x14\xcd\xe5\xea\x9d\x6b\x07\x75\x76\x37\x78\x4d\x05\x78\x40\x1c\x14\xaa\x93\x21\x0e\x0d\xa2\xb9\x43\xad\x41\xb4\x49\xc7\xe1\x07\x61\x54\x47\xa4\xf9\xbd\x4a\x7b\xa5\x9a\xf7\xd9\x13\x2c\x2d\x6d\x73\xe3\x9f\x7c\x26\x82\x06\x2b\xb3\x50\xd8\x42\x66\xe0\xda\x97\x0b\x6d\x71\x66\x0d\x32\x09\x88\x4a\x2a\x96\xa3\xa2\x8b\x47\xa8\xf9\x72\x0e\x00\xcb\xf4\x2f\x4c\x30\x34\xd9\x77\x30\x6e\xa9\x40\x0f\x32\xfb\xbf\xf4\xed\x88\x7b\x75\x9f\xb5\xfe\xc3\x7f\x1c\x57\x99\xb5\x6e\xc9\x2d\x42\x5d\xd5\xca\x93\xdd\x06\xb2\x62\x4e\xcd\x76\x01\xbe\xc2\x5c\xb5\xac\x72\x9d\x01\x84\xef\xb3\x99\xe4\x67\xe0\x71\x10\xb4\x04\xe0\xee\x35\xd5\x09\x64\x17\x5c\x70\x96\xa5\x41\xd6\x0b\xc3\x01\xa9\xe1\xec\x09\xdb\x8a\x87\x80\x67\x6d\x2c\xa7\x15\x2d\xda\x53\xf1\x08\x41\xe0\xe9\x68\x0d\x6a\xb8\x5b\x5d\xc4\xd1\x78\xb7\xab\x91\xa7\x40\x58\x52\x35\x06\xe4\x17\x25\x34\x85\x26\x72\x0d\x73\x36\xba\x53\x22\xd7\xb9\x14\x90\x81\xb0\x1f\x12\x72\xfb\xf8\x93\x1d\x05\x88\x4e\xc4\x0e\x5c\x19\xd8\xaf\xd6\x16\x78\x05\xb3\xda\x00\xbb\xf2\xd6\xce\x83\xa8\x74\x7b\x8e\xbe\x0c\xe2\x71\xa6\x64\xc5\xb5\x3a\xc9\x59\x71\xa2\x58\x22\x05\x9e\x41\x41\xde\x89\x65\xc1\x94\x7b\x65\x9f\x59\x79\x0b\x6d\x6d\x4e\x86\xb6\xb4\x67\x04\x14\x67\x78\x3e\x8c\x26\x2b\xe4\x46\x75\x59\x10\xaf\x8f\x15\x9a\xea\x33\x03\xbb\x9c\xc5\x43\x9e\xe4\x85\x4c\x98\x52\x2c\x0d\xe6\xfa\x6c\x46\x00\xf7\x88\xd6\x92\x2a\x03\xa9\x73\xb1\x6b\xb9\xc4\x30\x8a\x39\x5b\x18\xbd\x1a\x03\x56\xcd\xa1\xa3\x05\x8a\xf5\x4d\x10\xc8\x1e\xeb\x74\x26\x53\xd5\x5c\xa5\xfe\xb4\xc4\x41\x02\xf0\x6a\xb5\xaa\x3a\x37\x96\x66\x38\x44\xaf\x5e\x49\x15\x66\xdb\xe4\xa2\x32\x27\x18\x5a\x02\x0a\x91\x7a\x46\xc0\xa8\x68\xfa\x0a\xae\xe6\xce\x6b\x0f\x82\x84\x11\x4d\x64\x41\xd6\x6c\x2d\x8b\xcd\xb3\x19\x39\x37\x23\xc1\x61\x21\xfc\x7d\x5e\xf2\x4c\x43\x47\xe1\xd7\xd0\x9a\x05\x59\xed\x5d\x5e\x48\x47\x04\x6c\x9a\x77\x40\xef\x4b\x9b\x85\xdc\xcc\xaa\x4a\x8c\xae\x25\x11\x86\x3c\x64\x1e\x5c\xe4\x3e\x88\x62\x8b\x19\xf2\x25\x9c\xb1\xcb\x09\xd9\x5b\xcc\x77\x00\xd0\xe6\x5e\x0d\x98\x5d\x1d\x4a\xc8\xfc\xbb\x42\x70\xf8\x54\xc9\x55\xf2\xa0\x39\x73\xb1\xa8\x97\x13\xbc\x37\x97\x93\x29\xb9\x9c\x9c\xe1\x98\x65\x41\x2e\x3d\xea\xd7\x3c\x81\x0d\x59\xd3\x3c\x87\xe9\xc1\x85\xa9\xf3\x02\xbb\x51\x2d\x54\xcb\xf8\xc0\xb3\xad\x90\xc2\x21\xae\xd8\x71\xf7\x87\x9a\xb7\xae\xc0\x50\xe3\xce\x7d\x18\xc5\xa4\xb7\xea\x05\x35\x8c\x51\xdd\x66\x6e\xc4\x31\x70\x3f\x84\x5e\x9e\x1a\xa7\x8e\x8c\xf6\xa1\x31\x5a\xeb\xf5\x7c\x54\x8c\xd6\xcf\x29\x32\xda\x01\x46\xeb\x57\x29\x32\xda\x7b\xcf\x68\xfd\x5e\xdd\x88\xd1\xba\x23\xb7\x3b\x9b\x6d\x64\x63\xb8\x5d\x56\xdb\xc6\x44\x0c\xb2\xda\xed\xcd\x5b\x97\x60\x07\x56\x6b\x21\x08\x83\xac\xb6\x83\xf3\x0f\x30\xdc\x76\xeb\x31\x91\x07\x35\xe2\x7b\x30\xaa\x3b\xc8\xbb\xe1\xe6\x4d\xa6\x75\x00\x70\x88\x16\x6f\xbb\x93\x07\x81\xbf\xb4\x1f\x20\x5f\xc3\xcf\x3a\x33\x5c\x1d\x4e\x4b\x93\x42\x2a\x65\x53\xeb\x67\xec\x8a\x0a\x8d\x46\x9b\xfb\x85\xb3\xdd\x21\x30\x42\xf5\x22\x69\x55\x80\xa1\x45\x9c\x84\x79\xe7\x84\x89\x44\xa6\x88\xde\x5d\x5b\x61\xcc\x79\x18\x83\x13\x91\xd1\x39\xcb\x88\xef\xc2\x79\x7e\x6a\xd0\x5a\xf2\x8f\x15\x13\x44\x31\xed\xea\xff\xe5\xd4\x70\x2f\x17\x3b\xea\xf3\x9d\x90\x9c\x16\x74\xcd\x34\xda\xd0\xaa\xb9\x29\x17\x39\x6c\x7a\x5f\xcb\xaa\x44\x46\x52\x35\x48\x24\x48\xea\xf0\xa5\x52\xc0\xb7\xfe\xab\x54\x3a\xe8\x05\xd6\x2f\xb4\xb4\x43\x3c\x3b\x45\x3b\x0f\x76\x73\x94\x68\x8e\x5e\xff\x83\x5d\x6e\x27\x05\xa7\xdd\x60\xf9\x63\xb8\x4a\x8e\x12\x7e\x71\x2b\x21\x15\xbb\xb8\x36\x06\x9d\xcd\xb7\x83\xb9\xee\x60\x1d\x63\x69\xf5\xc8\x30\x8c\x7b\x46\xb0\x87\x23\x36\x76\xa7\xd8\x9d\x21\x0f\xf7\x84\x64\x1f\x35\x80\xe3\x70\x71\x26\x8f\x98\xb3\x78\xc6\xe2\x44\xc4\xb6\xb4\x73\x74\x96\x33\x8b\x3c\x67\x90\xe7\x3c\x2a\x7a\xde\x32\xa3\x0d\x50\xf3\x66\xdb\x1d\xe5\xee\x23\x19\x09\x0e\x6f\x23\x18\x1d\xcd\xd7\x11\xdc\x7a\xd4\xf8\xe0\x7b\x4a\xab\xbe\x49\x21\xf8\x86\x21\xcd\xf7\x8f\xfd\xdf\xcb\x10\xbf\x96\xe9\x61\x1c\x79\xda\x5b\xd4\x3c\x0e\x8d\xda\x23\x42\x78\x98\xa8\x1c\x3c\x50\xf8\xde\x9c\xc2\xc3\x4a\x77\xf7\x94\x60\xba\xd3\xd5\x64\xa8\xdf\x96\x68\x77\x2f\x09\x4e\xa7\xa7\x70\x44\xd9\xd8\xd1\x72\x51\xd3\x1d\xd0\x61\xdd\x9f\x9a\x9d\xdf\xe6\x17\x98\x1e\xc8\x07\x70\x30\xf9\x69\x46\xee\xad\x3f\x81\x90\x5f\x84\x4d\xdd\x7c\x69\x59\xf3\xe5\x04\x2d\xff\x35\x00\xd4\x36\x42\xdd\x9d\xe5\xa8\x3b\xdd\x8f\xd8\x56\xad\x7c\x9b\x12\x5a\x13\x21\x02\xd0\xe7\x16\x61\x23\x68\xb9\x83\xc8\xd1\x3c\x95\x7d\x54\x7f\x2b\x50\x34\xc8\x49\xc9\xd2\xfa\x27\xfd\x37\x1c\x6d\x74\xd9\x27\x46\x00\x1f\x8f\x2e\x73\x8d\x5f\x00\x98\x74\x41\xaf\x6d\x77\x4f\xb9\x50\x9a\x51\x48\x43\x35\xbc\x1e\xcf\xa6\x44\xf1\x35\xcf\xa8\x27\xdf\xfe\x9c\xd6\x9c\x4f\x70\x30\xef\x4f\x3e\x97\x9d\xe8\xe5\x56\x21\xad\xab\xfd\x76\x41\xed\xde\x11\xcd\xfb\x4a\xe9\xc6\x10\xb0\xbd\x64\xcc\x41\x02\xd4\xdb\x74\x17\x79\xf3\xee\x48\x50\xe5\xec\x05\xdc\xec\x9c\xf9\xdc\xbb\x7c\x41\x3e\xb7\xc9\xca\x67\xc8\x88\x1b\xc8\x71\x95\xbb\xd7\xec\x8b\xbb\xcc\x61\x50\xd6\x6e\x48\xf7\xa3\xca\xf5\xf7\x8e\xd2\xf9\xd5\xaf\x4a\x37\x83\x78\x5a\xb0\x25\x2d\xd2\x0c\x2c\xf8\x8b\x1d\xd6\xf9\x30\x6a\xc8\x51\xb8\xfa\xb1\xa9\x31\xc4\x06\x0c\x26\x4d\x06\xda\x16\x14\x61\xa7\x9e\x20\xb9\x6c\xcf\xf5\xf4\xfe\x31\x09\x4e\x4c\x82\xf3\xb8\x83\x8b\x1b\x49\x70\x8e\x9e\x3e\xf4\x30\x71\xcc\x63\xb2\xe0\x84\x57\xce\x66\xc4\x29\x1c\xc1\x02\x21\xe7\x01\xe4\xc3\x01\x82\x35\x36\xfb\x4d\x3d\x1f\xc6\xdd\x4c\x91\x7c\x64\x34\x3d\x31\x82\xc4\xde\xb3\xdd\x2b\xb3\x4e\xb5\x50\x5b\x19\xc4\x91\xb2\xe6\x54\x23\xd8\xc6\x80\x20\xa8\xa9\x8e\x95\xa6\x55\xd5\x19\x34\xb1\x75\x05\xd9\x0e\x33\xa2\x62\x87\xd0\x3c\x57\x9d\x41\x79\x49\xd0\x46\xc5\xb5\x20\x79\xbb\x84\xac\x6e\xcd\xb3\x1b\x2e\xff\xd6\x45\xc2\xc3\x1c\xf0\xea\x9a\x92\x12\x84\xa1\x8e\x5a\xab\x7a\xd2\xfe\xbe\x30\xd3\xfe\x35\xa4\x89\x2e\x69\x16\x2c\xa1\x8f\xb0\xab\xd6\x32\xbc\x78\x3b\x2d\xe5\x90\x55\x16\x0d\xab\xbf\x96\xac\xd8\x60\xd0\x6a\x95\x38\xc0\x4a\x02\x00\xae\xb4\x62\x98\x8d\xb8\x84\xe4\xf5\x55\x6e\x7b\x65\x44\x35\xea\x50\xf9\x35\x43\xed\xbc\xf4\x62\xbc\x65\xac\x38\x38\xc0\x6d\x5e\x49\x6e\xe6\xa7\x0b\x69\xae\x39\xc8\x24\xf3\x8d\xe5\x87\x36\xff\xb9\x7d\xc9\x99\xce\x5c\x57\xe6\x83\xb6\x23\xfb\x5d\x98\xc1\x09\x98\x70\x89\xda\x08\x4d\xbf\x06\xb4\xc9\x66\x1f\xaa\x8f\x4d\x8d\xcc\x09\x0d\x6f\xa9\xdf\xc1\x7f\x4e\xfc\xcb\x07\x48\x0c\xfd\x03\xa6\x31\x8f\xb9\xc9\x63\x6e\xf2\xbb\xca\x4d\x6e\x8f\xe0\xb7\x9e\xa0\xbc\x56\x7e\xf0\x46\x36\xec\x98\xcb\x3c\xe6\x32\x8f\xb9\xcc\xef\xca\xc1\xd8\x4d\xce\x62\x42\xf3\x98\xd0\x3c\x26\x34\xff\xd6\x13\x9a\x5b\xda\xb0\x47\x56\xf3\xbe\x4c\x2f\xee\x50\xd6\x92\x9e\xa3\x7d\xb7\x37\x75\xd1\xd4\x66\x33\x33\xbf\x18\x81\x3c\x01\x9a\x8d\x99\x6b\x54\xa8\x64\xa1\x8e\xe5\xaa\x95\x56\x06\x70\x23\x10\xad\x03\x83\x64\x4b\x3b\xad\x22\x87\x6b\x10\x16\xe7\xba\x8b\x16\xe7\x68\x71\x7e\x94\x16\x67\xf7\x24\xc8\xde\xfb\xc8\xd3\xb0\x2b\x5b\x61\x1d\x66\x5b\xcb\x51\xe9\xac\x6e\xb5\x44\xed\xba\x9e\xaa\xfc\xbe\x1b\xa7\x87\xe9\xf5\x36\x9b\x75\x3d\x93\xf3\xd1\xf2\xb7\x6f\x19\xe4\x1e\xa6\xe6\x11\xd3\xde\x97\xc7\x1d\xc5\x30\x3d\xfc\xc9\x98\xd3\x5d\xc7\x9c\xee\x31\xa7\xfb\xed\xe7\x74\x1f\xbe\x96\xdb\x12\xbb\x0f\x48\xbc\x94\xc4\xac\xef\x0f\x4c\xfe\xec\xc9\xfa\x0e\x3f\x37\x6b\xd5\xde\x5e\x0a\xf8\x2d\xfa\x58\xcc\x03\x7f\xe7\x82\xf3\x9d\xe7\x85\xdf\x72\x44\x0e\x99\x1c\x7e\x84\xd8\xb5\x3b\xbd\xec\x70\xc4\x3b\x5f\xf9\xa2\x14\x09\x86\x9d\x70\xbd\x71\xec\xa8\xa7\x9b\x5b\xcc\x29\x1f\x3c\x74\xc7\x61\x38\xcd\xfc\x0e\x79\xda\xcb\x1c\xb0\x88\x55\xc2\x79\xc0\x1e\x82\xa7\x79\xbd\x7b\xb6\x79\xb4\x6b\xf4\x59\xc5\x54\xe5\x02\x6d\x69\x47\x08\x4a\xb0\x83\x95\xa4\x54\x80\x05\x4e\x68\x96\x94\x86\xc0\xd7\xb6\xa9\x6e\x8c\x79\x0a\x16\x15\xfa\x95\xaf\xcb\x75\xe3\x51\x00\xf3\x74\x23\x08\x63\x7d\x5c\x24\x48\x77\xbf\x58\x3b\x1e\x3f\x9f\x92\x75\x99\x69\x9e\x67\x1b\x47\xc7\xc0\xb0\x44\xe6\x4c\x5f\x33\x9b\x17\xb8\xe6\x17\xc0\xca\xf8\x4d\xdb\xa8\xcd\x32\xdc\x4e\xdd\x6c\x21\xb9\x6f\x8b\xa5\x9c\x06\x88\x67\xf8\xae\xd2\x24\x65\x89\x91\xc3\xbc\x3b\xdf\x30\x01\x3f\x48\x2e\xf0\x61\x8a\x3c\xef\x8a\x27\xec\xc4\x10\x4f\x3a\x23\xe4\x9c\xe1\xca\x71\x91\xf2\x2b\x9e\x96\x95\x65\x3c\x00\xa3\xaa\x2a\x86\xaa\xad\x8a\xad\xe4\x35\x82\xc6\x1b\x39\xa3\x60\x5c\x16\x98\x7a\x68\xee\x13\xe4\x0a\xfe\x2d\xd6\x30\x78\x68\x35\x0c\xea\xcf\x51\xd1\x53\x8d\xb0\xf3\x4a\x00\xb0\x0e\x69\x3c\xbb\x81\xb5\xdc\x01\xd5\x03\xb2\xe0\xad\xa6\xde\xf5\x9b\xc8\x2c\x63\x89\x86\xa3\xaf\xc8\x35\xcb\x32\x82\x1b\x8b\xc0\x9d\x6c\x63\x53\x73\xb7\x4d\xb8\xfb\xda\x14\x0e\x96\x24\x61\x44\x7f\x5b\xf9\x62\x70\x4f\x6e\xc0\x45\xb7\x3a\xe2\x06\x5f\xec\x51\xaf\x46\x55\x0c\xd8\xc6\x42\xb7\x97\x0c\x98\x4e\xbc\x1e\xd7\x55\x3f\xa0\x7a\xd6\x55\x14\xd5\x3e\xf3\x12\x16\x03\x59\x3b\x78\xe0\xc6\x62\xa9\x48\x2d\xa1\x7a\x05\xa5\x30\x32\x27\x1e\x6b\x7b\x88\xbd\x8b\xf2\x7a\x85\x81\x84\xb2\x00\x47\x24\xc6\xba\x04\xfd\xd3\x02\x6e\xe3\x2d\x09\xef\x95\xd5\xe7\xb7\xca\xcd\xf7\x73\x1f\xc7\xae\x3f\xaf\xd9\x4c\xea\xd9\x5d\x43\x7f\x46\x95\x4a\xbf\x2f\xf9\xfc\x21\xf9\x83\xb3\xe3\x8d\x2f\x96\x10\xd2\xeb\x1b\xd5\x4f\x00\x7a\x03\x8b\xa1\x0c\xfb\x6f\x55\x0f\x38\x70\x7d\x85\x26\x87\xbb\x51\xd9\x85\x6a\xec\x81\x78\xb3\xef\x0c\x46\x14\x67\xf0\x8f\xbb\x0d\x6f\x3b\x57\x6c\x98\x3e\xc4\x8a\x0d\xed\x36\x6e\x35\xee\xa4\x96\xc3\x7e\xd6\xe2\xb1\x0c\x69\x27\x8b\xf6\x58\xa3\x59\x2c\x20\x11\xf3\x5a\xdf\x2c\xaf\xf5\x10\xac\xf2\x81\x27\xb7\xb6\x53\x8b\xa5\x24\x76\x58\xac\x58\x4f\xe2\x21\xa4\xb9\xb6\x9b\xf5\xcd\x16\x95\x18\x22\x5a\x5b\x79\xe6\x4e\xe5\x25\xfa\xae\xc5\xd6\x37\x76\x2e\x34\xd1\x25\x2d\xc4\x6a\x13\x91\x2b\x3f\xb6\x92\x13\x5d\xb7\x30\xd6\x9d\x18\xcd\x95\x63\xf1\x89\x07\xc6\x95\xbf\xa5\x0a\x14\x43\x64\x6b\x37\xbe\x3c\xf2\x9d\x1d\x0a\x52\x0c\xed\xce\x08\xbe\x1c\x4b\x53\xc4\xd2\x14\x0f\x33\x81\xf8\x37\x99\x94\xf7\x36\xb3\x84\x8f\xf1\x82\x3d\xb6\xf2\x14\x3b\x7a\xea\xee\x32\x8c\x26\x16\xaa\x88\x85\x2a\x62\xa1\x8a\x58\xa8\xe2\x5b\x67\x41\x8f\x94\xbc\xc7\xba\x15\xb1\x6e\x45\x14\x91\x63\xdd\x8a\xfb\x1c\xc9\x1d\x8b\x57\xc4\xe2\x15\x8f\x8f\x6a\xc6\xe2\x15\xf7\x3b\x7f\x44\xac\x60\x11\x2b\x58\xc4\x0a\x16\xb1\x82\xc5\x9d\xe7\x75\xbf\x37\xf2\xdd\xee\x44\x33\x96\xb1\xb8\x73\x1f\x6c\x2c\x63\x11\xcb\x58\x3c\x28\x72\x17\xcb\x58\x1c\x92\x24\xff\x10\xb3\x0e\xc7\xac\xc3\x77\x9b\x75\xf8\x87\x6f\x3e\xeb\xf0\x28\xd3\x8f\xb7\x27\xf7\xd9\x90\xfb\x2c\x21\xc4\xef\x5c\x4d\xc6\xb5\x0f\xe7\x1b\xa4\x4c\x46\xf2\xf0\x56\x8f\x7d\xfc\x23\x3f\x58\x70\xed\x3b\x7f\x4e\x46\x38\x6b\xaa\x80\x99\x96\xf4\xdd\x65\x1c\xb9\xd1\xc0\x30\x3e\x78\x0f\x4f\x4d\xc7\xcc\xb6\x1e\xe9\xda\x27\x47\x50\xe1\x47\x90\xa9\xb6\x92\x14\x7b\xa5\xc3\x5e\xe9\xa4\x9e\xa5\xa1\x3e\xf2\x83\x1f\x04\x90\x81\x2a\xe4\xe0\xbd\xbd\x3d\xb7\x78\x50\xc3\x25\x19\x71\x5a\x6d\x3a\x01\x2e\x96\x67\x32\xe3\xc9\x66\x30\x94\xbb\xd1\xd6\x66\xec\x41\x90\x74\x8e\x3f\xd9\x60\xfb\x52\x69\xb2\x92\x59\x4a\x74\x61\xf7\x9d\x06\x3a\x5a\x4e\x5d\xca\xa5\x2b\x9a\x8d\x4c\xe3\x06\x27\x68\x32\x9d\xe4\xac\xe0\x32\x3d\x07\x53\x7b\x47\xd4\x76\xfd\x71\xdb\x69\x10\x3e\x6e\xd0\xac\x6b\x2e\x52\x88\xfc\xc4\xf0\xd2\x20\xa3\xc8\xca\x4f\xcf\x9a\x8e\xfc\xd4\x66\xa4\xde\x23\x4c\x7c\xce\xc8\xb2\x60\x14\x0c\xb7\x2b\x2a\xc8\xbf\x59\x21\x51\x17\xb5\xd9\x51\x84\x61\x2e\xec\xd7\x92\x66\x90\x12\xe2\x7f\x3c\x7f\x4e\x9e\xfe\xf8\x9c\xac\xb9\x78\x36\xd6\x36\xd2\x89\x91\xbd\xb0\x18\x59\x67\xcd\xc5\xf9\xa1\x54\xe6\xd4\x4f\x9c\x48\xa7\xf5\xe9\xaa\x5b\xed\x40\x45\xa3\x76\xad\xe9\xda\x65\xb2\xb5\x29\x12\x70\xa1\xb8\x32\xaa\xc1\x9a\xeb\x20\x28\xd8\x7e\xcf\xc8\xfa\xbd\x8b\x73\x94\xda\x31\xad\x03\xfe\xb1\xcc\xd8\x70\xaa\x82\x7a\xd3\x2a\x45\x86\xaa\xad\xa0\x2f\x0c\x65\x4e\x88\x14\x8c\xa4\xbc\xc0\x52\x27\xe0\xa2\x56\x8c\xe0\xeb\xb4\x60\x84\xe6\x79\x66\x4e\x3c\x5d\x68\x48\x0e\x82\x21\xd3\xa6\x97\x37\x8d\xe0\x6c\x90\x33\x9c\x9e\xef\x08\xe5\x5f\xcf\x5e\x41\x9f\x1b\xc8\x2b\x82\x49\x49\xc2\xa1\x5c\xb1\x4c\x26\x5c\x6f\xcc\x62\xdb\xcd\x06\x19\x26\xdc\x6b\xce\x54\xd0\x47\x5e\x30\x23\x87\x92\x45\x66\x43\x90\xea\x6f\xa2\x1f\x84\xce\x2b\x45\x1e\x6f\xc5\x94\x28\x89\xa1\x29\xba\x3b\x1f\x8a\x8d\x58\x41\xdd\x58\x69\x2a\x74\xb6\x99\x12\xab\x38\x4e\xb1\x5f\xba\x60\xca\xb3\x02\x97\x8c\xab\xeb\x6b\x18\x64\x2d\x15\x13\xdb\x53\x1b\xbb\x39\x76\x45\x43\xe0\x93\x7a\x8a\xbb\x5c\x6a\x43\x52\x03\x83\x0c\xb4\x83\x84\x0b\xe6\x0c\x9b\x45\x72\x0e\x91\xb4\x2c\x82\xe5\x9c\x91\x57\x61\x26\x14\x4b\x11\xdc\xa1\xf6\xd4\x6d\x8a\x61\xbf\xd7\x5c\x31\xb7\x87\xb5\x53\xe5\x0c\xee\x29\x57\x09\x2d\x52\x34\x65\x70\x71\x45\x33\x9e\x1e\x34\xd5\x41\x07\x71\xff\xcd\x3b\xc4\x2a\x6a\xdf\xe5\x14\xab\xe8\x7b\x93\x94\xe0\x22\xd5\xa9\xa1\x5d\xae\x19\x79\xb7\x70\x87\x60\x6a\x91\x3b\x90\xf8\xc6\x6e\xf9\xcf\xf4\x2b\xf6\x8b\xbe\x19\xd7\x7b\x5f\xe6\xc7\xea\x54\xfc\x03\x0e\x45\x2f\x4d\x3f\xef\x6d\xeb\x15\x76\x7f\x5e\x95\x7d\x50\x11\xf7\x1c\x93\x52\x18\x8d\x8e\x89\xd4\x66\x93\x0a\x93\xc4\x08\x23\xe4\x1b\x75\xf6\x7a\xc5\xb3\xea\xea\x95\xb9\x21\xe2\xee\x2f\x4c\xf6\x33\x30\x92\x4e\xda\x17\x72\x81\x2d\x4c\xe2\xc7\x3f\x18\x26\x61\xce\xdd\x4a\x96\xc5\xb3\xfa\x5a\x97\x8a\xb5\xd7\x5b\xbd\x24\x27\xe4\xcf\x76\x8c\x8c\x94\xf9\x4b\xf2\x9c\x3c\xe5\x33\x36\x23\x42\x36\xae\x1d\x57\x24\x95\x82\x3d\x9b\xd5\x5e\x31\x93\x7a\x49\x7e\x7c\xee\x5e\x1b\xba\xae\xa6\x95\x5b\xdc\x4c\x8a\xe5\x38\x46\xb6\x87\x5c\xd4\x3a\xd3\x63\x84\x9c\x98\x20\x3e\x26\x88\x8f\x09\xe2\xbf\xa1\x3c\x97\x31\x41\xfc\xc3\x4d\x10\xdf\x4b\xaf\xef\x53\x82\xf8\xfe\x41\xee\x9b\x20\x7e\x78\xda\xfb\xf2\xb8\xe3\x25\x88\xef\xfd\xe4\x9f\xac\x7e\xb4\x07\x7b\x75\xaf\x6e\x55\xbd\xec\xd1\x76\x40\x71\x41\xe6\x52\xaf\xc8\xa7\x1c\xf8\xc2\x1b\x79\x2d\x2a\xa5\x4c\x91\xa7\xd0\xb9\x7d\x08\xff\x86\x16\x10\xd6\xa9\x20\x0d\x25\x83\xa4\x87\xd9\xa6\xd3\x80\x5b\xe7\x94\xfe\xfd\x9e\xdc\x85\xd0\x35\x57\x0d\x7d\x1b\x6e\xa7\xfb\xe9\x0d\x08\x8b\xc3\xc2\x32\xc7\x20\xd4\x2c\x0b\x2d\xe0\xa9\x75\x7e\x87\xc9\x23\xd1\x63\x87\x16\xbf\x40\x0a\xeb\x16\xd4\x40\x8e\xc3\xcf\xad\xf8\x72\xc5\x5a\xa2\xaf\xa7\x22\x90\x66\xeb\xc7\xe7\xcf\x15\x92\x1b\x4c\x78\xba\xef\x4d\x69\xa8\xe0\x2e\x0d\xe4\xa7\xbc\x67\x0d\x3f\xe5\x5b\x56\xf0\x53\x3e\x66\xfd\xdc\x2c\xcd\x71\x79\x79\x29\x08\xf9\xde\xa7\x3b\x35\x22\x30\x40\xe7\x40\xd0\xfe\x0f\x84\x38\xe6\xac\x20\x7f\xf0\x62\x2c\xbe\x90\xca\x12\x5c\xf2\xed\x44\x60\xcd\xd6\x1f\x3a\x84\x6a\xa7\xdf\x1c\x64\xd5\x6e\x24\x2c\x63\x1f\xfb\x5f\xea\x58\xf5\x41\xc7\xaa\x0f\xb1\xea\xc3\x1d\x55\x7d\xe8\xbd\x96\x7b\x56\x7d\x30\xaf\xc5\xca\x0f\x0f\x52\xb1\xbc\xc7\x95\x1f\xfa\x0d\x2d\xb1\xf2\xc3\x9d\x6b\xc4\xf7\xa3\xf2\x43\xff\x11\x39\x78\xe5\x87\x61\x7d\xea\x91\x54\x7e\x98\x07\xba\x56\x7d\x16\xf3\x3b\x57\xa5\x7a\x25\xf4\xa6\x47\x64\x11\x18\xa9\xab\x8e\x51\xdb\xa1\x05\xbb\x99\x14\xbd\x45\x47\xfd\x6d\x1a\xab\x67\xc4\xea\x19\x0f\xb8\x7a\x46\xef\x2d\xb3\x8d\xdd\xa2\x2b\xa6\xcd\xae\xfe\x8f\xe7\xdf\x79\x5c\xf0\xeb\xb3\x4f\xa4\xac\x30\xdb\x87\x16\x06\x62\x21\x8e\x58\x88\x43\xdf\xc7\x42\x1c\xc3\x48\xe9\x7d\x84\x9a\x1b\x14\xe2\xd8\xce\xa2\x46\x02\xbf\xc6\x55\xf2\xd8\x66\x28\x8e\x95\x3c\x1e\x49\x25\x8f\x11\x96\xbc\x87\x5d\xc9\xe3\x87\x58\xc9\x23\x56\xf2\x88\x95\x3c\x0e\x5d\xc9\x63\x04\xdd\x18\xcb\x90\x8e\x50\xc9\xa3\x03\x17\xbd\x35\xf7\x77\xd5\xb6\x66\x66\xf4\x68\x6f\x0c\xc8\x04\x39\xa3\x96\xcf\x81\x56\x08\xf5\x63\x07\x88\x37\x00\xf1\xf7\x31\x89\x45\x4c\x56\x71\x8c\xe4\x13\x3f\xc4\xca\x34\x31\x07\xfe\x21\x72\xe0\xf7\x84\xde\x3d\x86\x1c\xf8\x3f\xc4\xca\x34\xbb\x2c\x56\xac\x4c\xf3\x60\x72\xe0\xff\xf0\x8d\x57\xa6\xe9\x21\x5a\x5b\x79\xe6\xee\x95\x69\x3a\xae\xc5\xd6\x37\xf6\xab\x4c\xf3\x43\xac\x4c\x13\xb9\x72\x2f\x57\x7e\x3c\x95\x69\x7e\x88\x95\x69\xf6\xe4\xca\xb1\x32\xcd\x03\xe3\xca\xdf\x5c\x65\x9a\x1e\xb2\xb5\x1b\x5f\x1e\xf9\xce\xae\x95\x69\x7a\x76\x67\x34\x5f\xbe\xf0\x69\x2c\x86\xf9\x32\xb6\xab\x59\x8c\x42\x3a\x30\xf5\x5e\x54\xfb\xa7\x2c\xfc\x2f\x81\x4f\xd5\x72\xee\xba\xc9\x63\x2f\xd6\x4d\x47\xa4\xe3\x6a\xb7\x79\x10\xe9\x00\xc9\x6b\xa4\x34\x90\xae\x31\xdb\x10\x08\x85\x85\x26\x1f\x1b\x63\x0a\x3c\xe7\xe3\xec\xd2\x8f\xaa\x08\xcf\x00\xf9\xa9\x40\x70\xde\xdb\x14\x8c\xd4\x51\xa8\xe0\x60\x4c\xc9\xdf\xfd\xb9\xad\x65\x1d\x1b\x9f\x17\xe0\xea\x3e\x57\x61\x39\x50\x4a\xad\x76\x4e\x8d\xad\x84\x23\x68\x0c\x79\x22\xfa\x12\xa1\x0c\x98\x97\x77\xbf\xf9\x0f\x3c\x11\xdf\xb1\x2e\xf3\x7d\x4e\x7c\x3d\xe6\x56\xdd\x41\x0d\x96\x5b\xb9\x56\x8f\xb3\x48\x9c\x2f\x54\xf2\x8b\x7b\xda\xa8\x3b\xd4\xe6\xea\xcd\x57\xf6\xf4\x84\x6f\x29\xa9\x75\x6f\xf3\x22\x3d\x96\xac\x62\x37\xc2\xff\x1c\x3f\x25\xd9\x23\xae\xec\xd5\x4a\x58\x36\x6d\xdd\xa9\x07\x95\xc2\xec\x1b\x27\x08\x0f\xe5\xee\xed\x98\x65\x2d\xd6\x5e\xda\xa7\xf6\x52\xcc\x93\xf9\x98\xf3\x64\x7e\x43\xb5\x7e\x62\x3e\xcd\xbb\x67\x13\xb7\x44\xe9\x63\x2d\x99\x58\x4b\x66\x5b\x15\x86\x3e\xa6\x76\xd4\xa2\x32\x8f\x83\x21\x8d\x67\x2f\xb1\x3e\xc9\xbd\xba\x42\x3b\xd5\x27\x79\x58\x5c\x72\x20\x55\xff\xb1\x0a\x46\xec\xc7\xaf\xe6\x54\x27\xab\xd3\xab\x17\xb3\xff\x29\xe7\x43\x57\xe1\x7f\xca\x79\xe8\x50\xd0\xad\x7c\x87\x21\x1c\xe5\xbf\xe4\x3c\xa6\x17\x8c\xe9\x05\x1f\x65\x32\x85\xf3\x7a\x3a\xc1\x27\xea\x11\x26\x14\x3c\xaf\x25\x11\xb4\x44\xca\x05\x16\x85\x49\x02\x28\x5c\xf5\x5b\xce\x20\x38\x82\x4e\x03\x55\x9b\x21\x55\xdb\x96\x21\xf0\x75\x47\x58\xe2\x03\x98\xd5\xb8\x94\x82\x21\x79\x6f\xe7\x0c\xac\x3d\x3d\x50\x52\xc0\xb0\xcf\x51\x09\xc2\xc2\x76\x01\xe4\x31\x8c\x16\x65\xd5\xae\xdc\x3c\xd3\xd7\x59\x21\xe7\x3d\x21\x69\xef\x7b\x52\x79\x5d\x53\x45\x92\x15\x4b\xbe\x1c\x2a\x2c\x6c\x4c\xc6\xb1\xbe\xc1\xd8\x4c\x59\x03\x29\xc5\x0e\x33\xc6\xde\x9c\x62\x7f\x2d\xd7\x54\x10\x9f\x46\xcc\xa7\x18\x43\xb9\xb8\x9d\x42\x6c\x4c\x7e\xaf\xbe\x24\x62\x4f\xe7\x05\x67\x8b\x67\xc7\x4a\x1f\x76\xde\x9d\x30\x6c\xea\x00\x59\x5d\x79\xc3\xba\xf5\xa9\xfe\xda\x0b\x72\x61\x0e\x6e\xd8\xf9\x6b\xb9\xce\x33\x66\x4e\x75\x41\xfe\x4c\x79\xd6\x99\xef\xfc\xa0\xd9\xc3\xc2\x4b\xb9\x2d\x3d\x98\x6d\x82\x32\x83\x0d\xc3\xb7\x6c\xe0\xbf\xe4\x3c\xe6\xfc\xba\x27\xd2\xde\x2e\x39\xbf\xfe\x67\x7d\xdf\x76\x0e\xb4\x0e\x19\x4f\xcc\xdb\x75\xfb\xa2\x66\x3d\x4f\xd7\x83\x10\x33\x47\xe7\x03\xab\x29\xa0\x37\x4c\xf8\xd5\x92\x76\x86\xc9\x5c\x23\x7b\x17\xd8\x55\x57\xa0\xbd\x12\xf6\x95\x25\x25\xf2\x7e\x9e\x65\x24\x93\xf2\x0b\xc9\xf8\x97\xad\x36\x0b\xcd\xd6\xb9\x21\x28\x1d\x04\x10\x52\xb7\xbc\x61\x34\xcd\xb8\x60\xfd\x85\x2b\x6a\x96\xb7\xd4\x69\xd7\x5c\xf8\x4a\x0a\x05\xcb\x28\x64\x81\xb1\xf4\x4b\x69\x5a\xe8\x0b\x94\x13\x6c\x2d\x16\x33\x03\x73\x6d\xe6\xcc\x65\x8c\xb1\xb6\x56\x68\xbf\x51\x9a\xad\x89\x2e\xe0\x23\x92\x68\x56\xac\xb9\x30\x42\x16\xd7\x3f\xd9\x2b\xeb\x2a\x53\xe4\xd2\x30\xd5\x2b\x46\x2a\x08\xd6\xd6\xe8\xf2\xe9\x64\x4e\x93\x2f\x72\xb1\x78\xcf\xd7\xbc\xc3\x3a\x53\x9f\x61\x98\xa6\x00\x87\x64\x87\xba\xa6\xc5\x17\x24\x18\x5c\xc1\x84\x16\xc8\x29\xc9\x9b\x20\x61\xcf\x1f\x46\x56\x52\x45\x86\xdb\x9d\xed\xa3\xb1\xe2\xad\xf4\x09\xaa\x4c\x12\xa6\xd4\xa2\xcc\xb2\x0d\x31\xb7\x40\xad\x58\x8a\x30\x30\xb7\xd6\x95\xc1\xb7\x28\x05\x04\xbf\x40\xae\x27\xad\x6d\xd4\x94\xe0\x19\x59\x33\x2a\x54\xb5\x45\xb6\x57\x57\xd7\x21\x97\x29\x51\x7c\x29\x68\xa6\x5a\x8f\xb3\xcc\x95\x60\x15\xa9\x0b\x9d\xc9\x69\x41\xb3\x8c\x65\x5c\xad\xcd\x07\xc0\x68\x87\xfd\xd8\x0d\x43\x97\x6a\x6d\x14\x2f\xc2\x31\x84\x1d\x70\x85\x16\x47\xb4\xbe\xbf\xf0\xc9\xb2\x82\x41\xe0\x3b\xfd\x83\xb4\x2b\xd1\x49\x9b\x3a\x0a\x4f\x26\x52\x24\x2c\xd7\xea\xf4\x5a\x16\x5f\x32\x49\x53\x75\x6a\xd3\x33\x64\xac\x50\xa7\x46\xce\x38\x29\x4a\x71\xa2\xe5\x49\xb5\x77\xa7\x23\x93\x9e\x51\x51\xd2\x2a\xdc\xba\x23\x7b\x5b\xf8\xdc\xa5\x85\x50\xb5\x04\x0b\x90\x0d\x02\x43\xe1\xd1\x22\x0b\x53\xb7\xaf\xa8\x19\x79\xcf\xcc\x82\x7f\xae\x77\xf5\x19\xe3\xd4\x49\x29\x20\x67\xdb\x46\x96\x60\x6c\x75\x99\x8a\xaf\xcd\x12\xba\x1f\x53\x59\x45\xb7\x2f\x8c\x78\x69\x64\x41\x1b\xe6\x1e\x5c\xd2\x9c\x27\x5f\xdc\x30\x4a\xc1\x7f\x2d\xed\xad\xb7\x57\x02\x0e\x44\x6e\x48\xab\x0b\xf8\xb0\x6d\xab\x2c\x4b\xc4\x51\xa4\x19\xc1\xaf\x69\x10\x69\xcd\xd3\x52\x61\xed\x12\x8c\x23\x50\xdc\x08\xf3\x46\xc0\x36\x1f\x85\x6a\x36\xf8\xc1\x60\x15\x9a\x45\xa1\xec\xc4\x67\x04\xc4\xd8\xb2\x80\xd1\xc1\x98\x69\xed\x6d\x20\x46\x09\xc5\x92\x34\x1c\xfb\xc2\x68\x73\xb3\xd3\x68\x3b\xd6\x3e\x63\x22\xc6\x36\x24\x3a\xdb\xcc\x08\xf9\xab\xbc\x66\x57\xac\x98\x92\xff\x2d\x4b\xe8\x46\xb1\xd6\xc2\xff\xa7\x99\xd3\x67\x43\x23\xb1\x3b\xb3\xd0\xd7\xcc\x2c\x3d\x14\xd6\xb1\xe1\x68\x10\x0e\x91\xa5\xe4\x33\xfb\xaa\x99\x50\xc0\xca\xae\x5e\x40\xe1\xf2\xcf\xe4\xd5\xd9\xbb\xe3\x9e\xdd\xdf\x55\x6b\x77\xb2\x91\x65\x71\x22\xaf\xc5\x49\x2e\xd3\x93\xc0\x0f\x6a\x0f\xf7\x5c\xca\x8c\x51\x01\x81\x53\xd5\x2d\xdd\x46\xb8\x5c\xc6\xbd\x36\x01\xeb\x22\x55\x86\x4e\x51\x0d\x24\x03\x4d\xe0\x46\xd1\x44\x44\x07\x26\xd8\x6a\xbe\xef\xc2\xe0\x0c\x23\xd2\x8c\xa6\x1b\xab\x98\x3b\xf7\x5e\x55\xa1\x08\x76\xd8\xbe\x7d\x6d\x4e\xdc\xd3\xa7\x33\x33\xf9\x59\x40\x85\xc9\x09\x99\xd9\x72\x10\x15\x79\xfd\xff\xd9\x7b\xdb\xe5\x46\x6e\x2c\x51\xf0\x55\x10\xf2\x44\x94\x74\x2f\x49\x55\xf9\xa3\xdc\x5d\x13\xf3\x43\x96\x54\xb6\xda\x55\x2a\x8d\xa4\xb2\xb7\x63\x34\xd1\x06\x33\x41\x12\xa3\x24\x90\x9d\xc8\x94\x44\xdf\xed\x88\x7d\x8d\x7d\xbd\x7d\x92\x0d\x9c\x73\x80\x44\x66\x82\x64\x52\xa2\xca\x65\x9b\xf7\x4e\xb4\x4b\x4c\x7c\xe3\xe0\x7c\x7f\x1c\xb0\x9b\xea\xe5\xcb\xaf\x12\x86\xcd\x83\xbd\x1f\x0c\x18\x14\x1b\x82\xe1\xec\x4e\xec\xd1\xb3\x4c\x4c\x20\x7d\x5d\x0a\x89\xd6\xea\x05\xcc\xf9\x43\x88\xde\x3e\x07\x9c\xb4\x3c\x57\xc7\x11\xbd\x90\x7f\x56\xa2\x58\x30\x7d\x27\x0a\x77\x5f\xdc\x07\xed\x42\x68\x8f\x7f\xd0\x98\xe4\x8c\x9d\x83\xb5\x25\x5b\x34\xf0\x85\x11\xa0\x9b\xb7\x6c\x32\x44\x01\xd9\xe7\xbc\xd0\xd5\xc6\x47\x60\xd7\x71\x27\xc5\x3d\x9c\x85\x05\x59\xfb\x82\x86\x94\x20\xf8\x10\x31\xc2\xe1\x17\xf0\x5f\x0f\xc0\x3d\x34\x58\xfd\x73\x6d\x0c\x6a\x4e\xaa\x73\x64\x27\x8d\xb0\x58\xc0\x71\xf0\xe2\x09\x12\xfd\xa3\xb7\xc0\x42\x7c\x1c\xf8\x1e\x7e\x0a\xfa\xb4\x4e\x92\x4a\x74\x21\xec\x76\x2f\x74\x7a\x4d\x1b\x74\xfa\xc9\xb2\xcc\x88\x2b\x3c\x9a\x94\xa2\x78\x4b\x9c\x46\xc4\x46\x1b\x6f\x48\x56\x43\x12\xfc\x26\x02\x54\x47\xa0\x37\xfb\x9b\x1e\xe3\x11\xcd\xb8\xa9\x39\x98\x9a\xc5\xdd\x17\x12\x90\x71\x57\x2f\x81\x09\x5b\x03\x80\x92\x86\x92\x4a\x2e\x59\x03\xd6\x34\xb4\x4b\xb0\x93\xd2\x5c\xc6\xe5\x89\x11\x99\x9c\x4a\xb2\x16\x8e\x45\xab\xf6\x55\x2a\xec\xdc\x29\x11\x45\x37\x84\x34\xe4\x20\x40\x9f\x07\x90\x53\xcd\xee\x2f\x59\x24\x99\x60\xd3\x8a\x17\x5c\x95\x42\x18\xb2\x7e\x4e\xa4\xe2\x99\xfc\x55\x14\xe6\xc0\x83\xc4\x4c\x2b\x5d\x50\x31\xba\xe6\x66\x02\x92\x6b\x67\xbb\xd7\xea\x45\xb9\x62\x69\xb1\xc3\x70\x85\xda\xea\x51\xc6\x22\xd1\x73\xd1\xd9\x2e\x8d\xc2\xe4\x7c\x2e\x52\xc9\x4b\x91\x2d\xe8\xbc\x64\xe9\x8f\xca\xe2\xe0\x70\x02\x48\x32\x39\xcc\xac\xf0\xe6\xf2\x28\x42\x3c\x14\x6d\x09\x4a\x35\x92\xa0\x0c\x57\x8c\xf9\x26\x61\x29\xd7\xd7\xef\x9a\x97\x43\xa9\x2a\xb7\x51\x85\xcd\xc2\xf1\x61\x04\x8e\xfb\x0a\x70\xab\x32\xe2\x44\xb4\xd2\x6b\xe4\x38\xd4\xe2\xb5\xcd\x93\x5d\x05\xf2\xdf\x7a\xd9\x25\x41\x62\x8a\x28\xf3\x1a\xd2\x0a\xa7\x94\xc6\x9e\x30\x6e\x10\xb3\x52\xa3\x8c\xb8\xe6\xf7\x32\xd8\x88\x7d\xc4\x9e\xec\x59\x02\x0e\xba\x68\x7a\xa8\x29\x44\xd3\x53\xf8\xbd\x7f\x09\x2e\x51\x29\xd6\xdd\x64\x33\xe0\x10\xcd\x90\xe4\x2a\x5d\xa4\xa2\x70\x91\x2d\x46\x58\x42\x69\x8f\x27\x27\xde\xd7\xb8\x21\xc3\x70\x1e\xa9\xd8\xe5\xdb\xe3\xaf\xbe\xfa\xea\xaf\x98\x3c\x8a\x00\x51\x2a\xf6\xf1\xfa\x78\x3b\xda\xe6\x55\xf9\x18\xaf\x6b\x2d\x5d\xed\x70\x80\x49\xd0\x28\x57\x71\xa8\x02\x7c\xd1\xb2\x1d\x7c\x2a\xfa\xff\x24\xad\x5a\x90\x80\x71\xb0\xf7\x30\xac\x97\x37\xcc\x6d\xab\xe1\x5c\x14\x53\x31\xbc\x15\x0b\x0a\xee\xdb\x8b\xb6\x32\xa5\xbd\xcc\xe9\x02\xdc\xf1\x8a\x29\x1c\x2c\x8a\xcd\xeb\xc0\x19\x78\x0e\xcc\xc5\x5a\x08\x9e\x80\x84\x3b\xe3\x46\x74\xf5\xd3\x2b\xd9\x1c\xa7\x8a\x78\x04\x4c\xf3\xe4\x56\xe9\xfb\x4c\xa4\xd3\x3a\x81\x1f\xe9\xcd\xe9\x0e\xfe\x38\xc0\x0e\x3c\xaf\x48\x9f\x70\x2d\x57\x6e\x84\x6d\x20\xf3\xb8\xc9\xee\x09\x39\xfa\xdc\x80\x20\x5c\x8d\x8e\x0b\xad\xd6\x78\x97\x50\x93\xfe\x1e\x26\x49\xa1\xd5\xce\xcd\x64\xe7\x66\xf2\xc7\xd7\xfd\xef\xdc\x4c\xec\xb3\x77\xef\x7d\xc0\xa4\x4a\xb2\x2a\xad\xab\xde\xce\x44\x5a\x65\xcf\x7f\x91\x8f\xf7\xd6\x68\x20\xc1\xc7\x38\xa3\x78\x5c\xf7\x7b\xd9\xe3\x66\xae\x29\xdd\xf3\x59\x4f\x4b\xb6\xed\xac\xd2\x18\x7c\x9d\x81\x3c\x68\x16\x33\x92\xbb\xeb\xda\x59\xca\x3f\x13\x82\xb5\x89\xa5\x9c\xee\x76\x2b\xd6\xf2\x26\xf7\xb3\x33\x9b\xef\xcc\xe6\xcf\x60\x36\x6f\x02\xd9\x96\xec\xe7\x5d\x94\xbc\x1e\x1d\x3e\xc2\x98\x0e\x98\x03\x04\x41\x49\xea\x5b\x5f\xdc\xa3\xa8\xd4\xfa\xa2\x58\x48\xfa\xf7\x06\x7b\xff\xa3\xc7\xd7\x4b\x0d\xef\x56\xae\x07\xaa\x9a\x2c\x2e\xa0\x6a\xec\x2a\x4b\x0a\xc5\x56\x95\x85\xe0\x10\x3f\xe0\x34\x09\x7e\x0b\xa6\xd6\x24\xb1\x9f\x20\x27\x11\xc5\x39\xf1\x42\xbc\x61\x43\x76\xb3\x77\x94\x65\xfa\xfe\x66\x8f\xed\x53\x65\x99\x83\x37\xce\x68\xeb\x90\x8b\x9d\xa1\xa8\x54\x30\x7e\xb6\xf8\x77\xe8\xfb\x56\x17\x63\x99\xde\xec\xbd\xb1\xa2\xe7\x58\xa6\x26\x5c\x43\x51\x29\x33\x60\xe6\x56\x62\x36\x4e\x25\x1e\xe0\x37\x26\x27\x2c\x2f\xc4\x9d\xd4\x15\x98\x69\xd8\x8c\x1b\xf5\xa2\xac\x15\xbd\x0b\x51\xe2\xe8\x97\x22\xcf\x78\x22\xec\xf0\x09\x57\x89\xc8\xbc\xa6\x24\xd0\x63\x39\xbb\x62\x81\x8d\x0d\xde\x0d\x54\x12\x56\xe2\x9e\x69\x15\x4d\x07\x84\x5a\x06\xbb\xb9\x1f\xa4\x29\x75\xb1\x58\x62\xfc\x6f\x8a\xb7\xd8\xab\x5e\xa9\xb3\x06\x16\xa2\xe4\x52\x91\x2a\x14\x30\x23\xa0\x2c\xcc\x23\x9e\x4a\x63\x51\x62\x25\xcd\xcc\xd7\x7b\x12\x0f\x79\x26\x13\x59\x82\x22\x16\x96\x0f\xe5\x8f\x5c\x80\x4d\xd3\x69\xe0\x55\x4f\x6d\x46\x08\x55\x6b\x8c\x6f\xff\xe3\x34\xec\x6b\x8d\x10\x04\x03\x7d\xb2\xd0\x35\xe9\xc8\xdf\xea\xd5\x78\x26\xd2\xbd\x80\xe8\x31\xbb\xaf\x4c\x2a\x98\x95\xe1\x0e\x07\x60\x41\x75\x08\x50\xa8\xd1\xbd\xbc\x95\xb9\x48\x25\x1f\xe9\x62\x7a\x68\xff\x3a\xb4\xcd\x97\xf9\x51\x16\x76\x23\x6b\xdd\x58\x3e\x50\xfe\x7c\x96\x52\xcb\xd0\x83\x05\x6a\xbb\xd1\x48\xfe\xf8\xe4\xc4\x42\xda\x5c\x1a\x23\x8c\x5f\x7b\x8a\xca\x22\x48\x8d\xa4\x16\xe4\x05\x3a\x62\xec\xbd\x84\x84\xf3\x00\x2f\xc1\xd3\xf4\xa7\xaf\x2b\x97\x86\x88\x40\x4c\x2b\xb1\x5e\x3b\x8b\xde\x2b\xb5\x41\x72\x53\x70\xae\x7b\x7e\x6a\x90\xfe\xaa\xaf\x82\xae\x32\x96\xa2\xc4\x36\x62\x79\x84\x8c\x4f\x59\x29\xb2\xcc\x6b\x5f\x48\xf3\x06\xe1\xa6\xd8\xd5\xf2\x0a\xc6\xb2\x09\x0d\xa4\x08\x06\x9e\x54\x0b\x4a\x04\x9b\xe7\xd9\x02\x4b\x95\x17\xce\x54\x5c\x94\xa1\xc9\xc9\x8c\x58\x63\xfd\xe0\x02\x31\x8a\x98\xc0\x37\xa2\x82\xed\x27\xd2\x8b\xba\xad\x35\x30\x34\x1a\xf6\x30\x32\x6c\xa0\x9a\x5a\x62\x69\x38\xf2\xec\x28\xc1\x08\x9c\x51\x14\x55\x3f\x89\x51\x75\xc6\xc8\x6e\xb5\x2b\x57\xbc\x05\x5f\x61\x5c\xa3\x7b\x16\x24\xea\x05\x34\x77\xcf\x63\x35\x5c\x9c\x7e\xb7\xe1\x46\xe5\xdf\xf7\x36\xf4\xa9\x3d\x4d\x55\xab\xf2\x80\x3c\x49\xbf\xf9\xb7\x26\x9d\x58\x61\xa8\x72\xcd\x02\x3e\x89\x7b\x07\x1d\xc0\x72\x40\x37\x30\x1e\x3a\xb7\xc4\x05\x20\x2a\x2f\x04\x4a\x7b\xe0\x87\xb4\x53\x79\xee\x54\x9e\x7f\x6c\xb9\xed\x0f\xa1\xf2\x5c\xe5\xbf\x82\xef\x2e\x70\x56\x6b\x71\x8d\x74\xe9\xd2\x04\xde\x7b\x9f\xa3\xc2\xaf\xc3\x93\x3e\x89\x5c\x6f\x59\x9b\xd7\x1e\xbe\x1f\x6a\x8e\x55\x74\xe6\x25\x27\x2f\x1a\x42\x74\xe0\x6e\x0b\x34\xaf\x71\x63\x35\x2e\x5f\x8b\xa2\x1f\xf3\x0a\x02\x3f\x5b\xb3\x12\x54\x7e\x7f\x8f\xe5\x89\xf6\x81\x55\xde\xc7\x9f\xc7\x7b\xa9\x03\x51\x9f\x12\xb0\xf9\x94\x57\xf1\x25\x78\x12\xed\xac\xb1\x3b\xd6\x64\xc7\x9a\xfc\xc9\x59\x93\x3f\xb1\x35\xb6\x85\x05\xff\x98\xe6\xd8\xf6\x26\x37\xb2\xc7\xc6\x4e\xa8\x07\x3d\xd9\xb2\x45\xb6\x35\xfa\xce\x24\xfb\xc7\xa2\x5a\xbf\x91\x49\xb6\xcd\x03\xed\x6c\xb2\x3b\x9b\xec\xf6\x6d\xb2\x6d\x28\xdb\x8e\x51\x36\x86\x97\x77\x56\xd9\x9d\x55\xf6\x77\x6c\x95\xfd\x5d\x99\x61\xdd\xfb\xdb\xd9\x61\x77\x76\xd8\xcd\x81\xf8\x0f\x6a\x78\x5d\xf6\x28\xfa\x91\xb0\x9d\xe9\x75\x67\x7a\x7d\xa4\xe9\x35\x02\x78\x3b\xdb\xeb\x1f\x52\x54\xdc\xc9\x67\x3b\x05\xe7\xce\xf6\xda\x87\x11\x7d\x1a\xc9\xde\xb6\xe6\x6e\x67\x7e\xfd\xfd\xbc\x97\x9d\xf9\xf5\xf9\xcc\xaf\x89\x85\xba\x09\x56\x0c\xb0\x2d\x8f\xeb\xbf\xaf\xe4\xd4\x32\x93\x97\x48\x41\x56\x32\xc2\xcb\x3a\x11\x98\x1a\x96\x17\xfa\x4e\xa6\x02\xaa\xdc\x24\x33\xae\x28\x31\x98\x1e\x43\xee\xa9\x87\x6f\x5e\xfe\x95\x85\x2b\x81\xbc\x11\x40\xc1\x48\x20\x0e\x3e\x42\x8e\x2f\xfb\x2b\x91\x36\x5f\x17\x00\xf2\xff\x94\x8c\x9b\x85\x4a\x66\x85\x56\xba\x32\xd9\xc2\x0a\x1d\x85\xbe\xb3\x52\x1e\x90\x64\x53\x89\x74\x74\xa3\x6e\xd4\x8f\xd5\x58\x64\xa2\x34\xcc\xa7\x7d\x3a\xba\x38\xab\xd7\xf4\xe6\x46\xb1\x57\x23\x47\x4d\x1b\x6b\xb3\x02\x4c\x55\xce\xec\xcd\xc3\x7a\x4a\x0d\x75\xe3\x86\xf6\xc4\x81\x52\xb3\x7d\x9f\xd1\xe9\x66\xaf\x19\xca\xdf\x6c\x38\xc4\xe1\x21\x52\x3e\x83\x02\x1d\x76\x6f\xa2\x38\xe7\x73\x71\x30\xba\x51\xec\xcb\x11\xa4\xcf\x00\xae\x2f\x5c\x82\xe5\x07\xaf\xdf\x5d\x79\xca\x6f\xda\x2b\x48\x38\x68\x8a\x94\x65\x25\xac\x90\x26\x92\xaa\x10\xd9\x62\xcd\xca\x32\x51\x0e\x69\xbe\xce\x5a\x6e\xd4\xb5\x3b\x24\x3b\xf8\x18\x12\x74\xa5\x28\xb3\xe2\x5d\x7f\x92\xb3\x6a\xae\x0b\x6a\x01\xd7\x70\xd4\x3c\x23\x8b\xfb\x92\xca\x94\x7a\xce\x94\x56\xc3\xa0\x82\x3c\x8e\xb0\xd6\xdc\x02\x78\x67\x67\x6d\xd9\xb1\xd0\xbf\x4f\x16\xfa\x79\xc9\xaf\xfd\xb5\x55\xc2\x24\xc0\xd1\x0d\xdc\x2c\x0d\x93\xf3\x79\x55\x42\x62\x14\x4c\x29\x84\xc2\xac\x56\x23\x2c\x53\x54\xce\x82\x2e\xf5\xfb\xc6\xee\x95\xe1\x53\x41\x39\x87\x8c\x43\x3e\x46\x94\x4c\xab\x70\x1c\xc8\x11\x45\x8d\x20\x87\xa1\x28\xe4\x1d\x26\xeb\x08\x9e\xbe\x1d\x30\xf1\x77\x38\xd7\x29\x96\xb8\x19\x2f\x20\xdf\xa0\xe9\xa3\x71\x0d\xb1\xcc\x68\x15\xc9\x5c\x67\xbe\x27\xb3\xbd\x3f\x44\x19\xe8\x4d\x30\x37\x79\x58\x18\xdd\xa1\x59\xfb\x26\x1c\x4d\xd3\x05\x4b\x85\x92\x22\x1d\xf8\xac\x98\xe1\x2d\x20\xb9\x73\xe9\x4a\xf0\x5c\x11\x65\xce\x04\xa8\x3c\xab\x22\x4c\xdd\x1e\xa4\x48\xc7\xb6\xae\xcd\x76\x4f\xa5\x9f\xbd\xbf\x37\x63\xd2\x75\x01\xe8\xdf\x75\x4b\x5e\x01\xbd\x27\xec\x55\x71\x60\x7d\xef\x86\x92\xa8\xbe\x3f\xd0\x08\xad\xe3\xc5\x9e\x5e\xa1\x60\x5d\x65\x80\x6e\x1b\x5f\x71\xbf\x5b\x2e\xa0\x95\x1e\xdf\xc9\x2c\xf1\xc2\x01\xec\x6c\xe2\x52\xa2\x81\x7c\x85\xd6\xa5\xa0\xf6\xc0\x22\x87\xb9\x78\x9a\xe2\xe3\xe0\x8a\x89\x07\xd4\x9a\x37\x92\xf2\xd3\xd0\xd2\x30\xcb\x8c\x4e\xed\xfb\xc1\x8c\xa1\xc0\x92\xa4\x5e\x03\x0d\x92\x93\x6e\xe8\x73\x21\x13\xe5\xd6\xaa\x2c\x7c\x04\x22\xb2\xfc\x1c\xeb\xef\x8d\x33\x24\xa9\x06\x0e\x0f\xe9\x90\x4f\xbc\x9a\x04\x19\x72\x9e\xb1\xca\x82\x2b\xab\xe0\x91\x17\x67\xb3\x78\xe1\x05\xe0\xef\x9a\x25\x17\x42\x74\x06\xfa\xf1\x4d\x6a\x2e\x50\xad\x85\xba\xce\x19\x67\x50\x85\xa1\x5d\x84\x61\xed\x04\x6b\xd0\xf2\x66\x55\x17\xd8\x11\xe1\xe4\x01\x3b\x09\x30\x32\xe6\xa7\xaa\x07\x41\x0e\x84\xa8\xcf\xcd\x1e\x0c\x72\xb3\x67\x41\xf5\x66\x8f\x86\xba\xd9\xdb\xa0\x84\x43\x49\x25\x1c\x1a\x2b\x1d\xb1\x1f\xa1\xa6\x5b\x30\xab\x25\x88\x37\x7b\x6e\x8d\x37\x7b\x03\x76\xb3\x87\xeb\xb4\xff\xb6\x2b\xb5\x8b\xb1\x6b\xbd\xd9\x03\x66\xff\x48\x35\xda\x87\x54\xc2\xbd\xaf\x3b\xc9\x61\xde\x43\x24\x47\x3c\xb3\x1c\x93\xe3\xc4\x06\x21\x35\x09\xaf\x03\x92\x69\x85\x32\x59\x9d\x9d\x3a\x46\xae\x70\x31\xc1\x6a\xb7\xbb\x12\xa4\x9e\xe1\x3a\xe8\x6e\x56\xae\xc5\x9d\xd4\xca\xb5\x10\x18\xad\x5a\x49\x40\x65\x51\x94\x82\x59\xdb\x64\x1c\xa7\x0d\x8f\x0c\xcf\xa2\x7d\xbf\xf3\x8a\xfc\x20\xc4\x43\x92\x55\x46\xde\x89\xfe\x50\x59\xb3\x44\x85\x98\x23\x6b\xa1\x12\x81\x5b\x82\xf9\x7d\x35\xc9\x16\xb9\xa1\xf4\xbc\x0e\xf1\x66\x99\xbe\x7f\xfe\x7a\x21\xbd\xe9\xed\x5a\xc7\xbc\x55\x1d\x63\xae\x7a\x6b\x35\x1d\x3b\x0f\xbe\xcf\x42\xa6\x5c\xe7\xc1\xf7\x84\x7b\xdd\xdc\x98\xda\x97\x33\xde\x39\xfc\x7d\x96\xd2\x70\x6f\x07\xbb\xfe\xba\xd4\x27\xfa\xdc\x6d\x26\x1b\x3d\x06\xff\x5d\xf5\x91\xee\xd7\xe9\xcf\x0a\xbf\xdb\x5a\xa4\xef\xe2\x3e\xf1\x50\x16\x91\xa5\xc1\xcf\xf5\x12\xf0\x4f\x5e\x22\x94\x08\xcf\x9e\x41\x95\x00\xb0\x94\x39\x9b\x87\xfd\x75\xe9\xbe\x46\xec\x42\xe7\x55\x06\x0d\x89\xb6\x1f\x5d\x9c\x39\xc6\x3f\x50\x28\xa0\xe2\xc2\x69\x2d\x62\x3b\xe5\x29\xd2\x41\x9e\x5d\x34\xf6\xb3\x0c\x4d\x44\x08\xe2\xb4\xd0\x55\x1e\x41\x53\xf8\x7b\xbd\x79\xf8\x9b\xcd\xc5\x7c\x2c\x0a\x33\x93\xf9\x6f\xb6\xf9\x75\x9b\x6a\xa5\x7d\xcd\xa4\x29\x87\xae\x6b\xa9\xe7\x32\x41\xc6\xde\x1b\x14\xda\x9c\x3d\x29\x92\xbd\x4c\xd1\x35\x0d\xb4\xb5\xff\x4c\xa8\x44\xa7\x98\x17\x95\xb3\x9b\xbd\xe3\xd3\xcb\xeb\xb3\xb7\x67\xc7\x47\xd7\xa7\xec\xf2\xf4\x3f\x3f\x9e\x5e\x5d\xdf\xec\xb1\x8b\xd3\xf7\x6c\x9c\xe9\xe4\x96\xd2\x77\x1b\x51\x48\x48\xc3\x0d\xce\x5f\x7f\xbb\xfa\x70\x6e\x59\xf0\xbf\x1f\xbd\x7f\x37\xa8\x8d\x7a\xc8\xd2\xd1\x1d\x67\x0b\x36\xe6\x46\xbc\xfe\x7a\x48\x13\x76\x79\x9c\xc0\xb1\x6a\xbc\x28\x3b\x39\x70\xe3\x87\x11\xbc\x8c\xae\x20\xe2\xbf\xb5\xaa\x3a\xd3\xde\x45\xea\x75\x3a\xdc\x91\x87\x7f\x56\x3c\x43\x95\x96\xe2\x73\x64\x1d\x2d\x16\x39\xbc\x87\x24\xfd\x1e\x79\x5b\x21\x69\x29\x9c\xa0\x92\x6d\x22\xb3\x12\xc1\x22\xc8\x29\x8e\xd5\x92\xed\x41\x43\x11\x84\x7a\x85\xff\x71\x7e\xf4\xfe\xf4\x66\x0f\x9b\xb9\xd4\xd9\x30\xfd\xcf\x22\xcb\x86\x58\x64\xba\xab\x82\x07\x0f\x58\x34\xb5\xf4\x54\xff\xbf\x41\x26\xd9\xc4\xcd\x0d\xf0\x16\x9a\xe6\x89\xd5\xf6\x87\xd1\x8d\x62\xec\x32\x3c\x16\xd8\x2d\x71\xe6\x96\xad\x56\xc2\xbe\x0e\x5e\x95\x7a\xe8\xe5\x96\xf1\x02\x87\xa9\x5d\xe1\x86\x73\xae\xf8\xd4\x5e\x05\x4d\xdf\x14\x20\x6e\xf6\x12\x53\x10\xe8\xa2\xdc\xe0\x5c\xe8\xa4\x5a\x36\x14\x19\x80\x36\x34\x21\xad\x3f\x9f\xdb\x86\xe5\xeb\x69\x07\x44\x9b\xed\x9c\x8e\xdf\x33\xfe\xb8\xc1\xae\x07\x4e\x45\xbb\xbd\x43\xfc\x2a\x7e\x88\x4d\x6b\x17\x9d\x5a\xd4\xdc\x16\x3d\x36\x38\x9e\xa6\x15\x6e\x40\xc9\x90\xfb\x19\xe3\xb6\x0f\x7a\xdb\x3e\xb9\x1b\x05\xfc\x9b\x57\xde\x14\x61\x49\x75\x5e\xd6\xe9\xca\xff\x52\xe7\x29\x2f\x9c\x1b\xdd\x21\x07\xb7\xbe\xa1\x05\x2f\x05\xff\xfb\x6b\xc8\xb8\x0c\x69\x39\x43\x87\x93\x0e\xbf\x08\x90\x25\xa1\x07\xbb\x84\x63\x34\xe1\xd5\xa8\x06\xd1\x13\xcf\x0c\x66\xd6\xae\x53\x0e\x5d\xd7\x22\x35\x49\x4a\x84\x5a\xae\x8b\xca\x94\xe0\x3e\x0b\xdc\x83\xd4\xea\x0d\x3a\xed\xc3\xef\xfb\xc7\x47\x6c\x5c\xa9\x34\x13\xe6\x00\x2d\x07\xae\x21\xc8\xbe\xf6\x0d\x5e\x88\x62\x2e\x4b\x40\xb8\x15\xca\x03\x6f\xe0\xb0\xbd\x9b\x01\xa9\x23\x53\x69\x48\x04\x76\x0d\x31\x7d\x37\xa1\x6b\x02\xc6\x4b\xe2\x91\x06\x2c\x77\xe3\x82\x56\x1e\xdd\xf7\x53\x41\x54\xaf\x2e\x04\xe4\xaa\xea\x3b\x9a\xb7\x5f\xc7\x35\x3a\x0b\x01\x4d\x77\x94\x95\x78\x44\x70\x57\xb8\x14\x07\x95\xc0\x2c\x0f\xac\x74\x50\x16\x32\x29\x5d\xc5\x7c\xb7\x60\x14\xdb\x0e\xd6\xed\xcb\xaf\xaa\xb3\xb3\xaf\xfb\xec\xec\x56\x2c\x9c\x41\xe7\x10\xc7\xb2\xc4\xbb\xfe\xd5\x0e\xf4\xcd\x88\x9d\x3e\xe4\x12\x23\xb9\x43\x98\xf1\x85\x43\xde\xf8\x7d\x63\xe5\x8e\x89\x7c\xe8\xda\x39\x7c\x40\xb8\x85\x56\xfa\xc6\xd3\xb9\x54\x76\x8e\xd7\xc0\x09\xc0\x10\xba\x00\xa5\x4f\x93\x36\x1e\x35\x31\x40\x70\x9c\x51\xed\x5c\x25\x23\x42\x5b\x25\xd3\x26\x0f\x6d\x7f\xf8\xad\x58\xb7\x60\xad\x70\xd0\x91\xe5\xe2\xb5\x18\x1f\xb3\xc0\xd1\xca\x36\x09\x2f\xad\x66\x3d\x08\x26\x09\xd1\xb4\xf5\x55\x0d\xbc\x66\x91\x64\x94\x1c\x2d\x72\x2a\x61\x42\xc3\xbe\x61\x37\x7b\xa9\x9c\xca\x92\x67\x58\xca\xcd\x0a\x7e\xa8\xad\xb4\x6b\xb0\x52\x57\x3e\x13\xc5\x1c\x38\x01\xfb\x2b\x8d\x6a\xb1\x0b\x29\x2e\x3b\x13\xc7\x31\x7a\x6c\xe6\xf8\x14\x4b\xd6\x43\x47\x1f\xcc\xdc\x89\xec\xb9\x51\xb6\x9d\xc3\xba\x2b\xc6\xb2\x40\x02\x87\xa3\xe7\x73\x59\xd2\xd4\xd0\x3b\xbe\x24\xfb\x2b\x9f\x16\x42\x04\xab\xb4\x1c\x6b\xab\x25\x8c\x60\xb7\x0d\xf3\xd1\x54\x45\x16\xfc\xe5\x3a\x40\xd1\x16\x1a\x48\x74\x7e\xe2\x6a\xe1\x46\x6b\xec\xba\x73\x01\x34\xa3\x4e\x3d\x9b\x4e\xd3\xcc\xb9\xcc\x58\x5e\xe8\x12\x35\x2e\x74\x82\x87\x73\x39\x17\xae\x97\xcc\x8d\x48\x18\x44\x12\x40\xb1\x28\x6c\x83\xbf\x96\x95\x52\x22\x0b\x7f\xb1\xcf\xc7\xf5\xb4\x08\xc1\x94\x7c\x9e\xfb\xf9\x74\x62\xf2\xe6\x0a\xe6\x32\x29\xb4\xd1\x93\x92\x99\x69\x82\x3f\x29\x51\x9a\x84\xe7\x02\x7f\xd9\xb2\x8c\x63\xd7\xa7\xa2\x4c\xbd\xfb\xd2\xc4\x0c\xf0\xcb\x6f\x8d\x1a\xba\xea\x0d\x55\x65\xd9\x63\x55\x0f\xeb\xc3\x27\x56\x77\xad\x0f\x28\xd0\x53\x3b\xa6\xde\xc9\x43\xde\x94\x70\x88\x9a\xfc\x43\xd2\xa5\x37\x6d\x38\x0d\x6f\x84\x25\x48\x6b\xad\x53\x66\xd0\xb8\xbb\x97\xa6\xd5\x9d\xe5\xfe\x46\x30\x0a\x4e\x45\x66\x6c\x92\x2b\xf2\x8b\xe0\xca\xab\xec\x9b\xc6\x05\x52\xde\xb5\xeb\x2f\x59\x04\xbd\xc2\xe2\x30\x62\x1f\x54\x22\xea\xe5\x0c\x5a\xf5\xa1\x6a\x68\xb0\x08\xec\x6c\xd2\xd1\xf4\xb4\xa5\x6d\x69\x6a\x87\x83\xa6\x29\x00\x4c\x00\x81\x99\xc6\x1b\x44\xf0\xcc\xfd\xac\x85\x45\x06\xca\x30\x31\xcf\xcb\x05\x95\xac\x12\x81\x38\x61\x49\x71\xd4\x0c\xb2\x6c\x46\x6f\x8c\xe9\x37\xa3\xc7\xd4\xf8\x26\x48\x5f\x65\x31\xa6\xe3\x16\xc3\xfd\x43\xa5\x59\x02\x44\xb4\xff\x15\x6c\x6e\x79\x62\xaf\x51\x30\xc4\x22\x1e\x65\x59\xf0\x23\x76\x04\x4f\x60\xe4\xbf\x03\xbd\xc4\xcd\x1e\x16\xd5\x1b\xf8\x81\x95\x66\x33\xc1\x53\x51\x98\x1a\x44\x9d\x5e\xc3\x22\x76\x2b\x28\xb8\x9a\xb7\x9c\x7d\x77\x7a\xe9\x94\x10\xec\xe8\xea\x7c\xf4\x2a\xc4\x0d\xcc\x94\x45\x05\xfa\x52\x06\xe6\x2d\xf4\x13\x48\x29\xae\x0e\xb6\xfc\xb5\x3d\xbc\xcb\xb7\xc7\xdf\x7c\xf9\x97\x97\xc4\x91\x9e\x6b\x35\xb4\x8b\x77\x84\x68\xce\xc1\x71\x52\xf0\x82\xf9\x52\x35\x41\xf1\xb4\xf6\x76\x82\x7d\x93\x22\xa2\x52\x77\x78\xc6\x22\xb5\x48\x1a\x83\xbe\x32\x7d\x0f\x54\x59\x3c\xe4\x19\x57\xbc\xd4\xc5\x82\x95\xe2\xa1\x5c\xba\xd2\x6f\x46\x5f\xd2\x5a\xbf\xfd\xfa\xf5\x5f\x1c\x8c\xce\xb1\x54\x30\xc7\x0b\xf1\x73\x07\xaf\xa4\x3e\xc5\x5a\xd9\xdb\xc2\x05\x02\xcb\x85\x06\x1a\x8c\x3a\x4e\xcd\x23\x17\xf0\x3a\xb8\x97\x86\x2a\x92\x4e\x64\x61\xef\xc0\x4d\x16\x47\x24\x38\x77\x10\x0d\x47\x07\x53\x9b\x39\x4b\xc2\xea\xdc\xa0\x59\x85\xca\xad\xb5\x18\x4e\x95\xb2\x46\xd1\x1f\xcb\xca\xcc\xb8\x4a\xcd\x8c\xdf\x02\x9b\x7c\xa3\xae\x3b\xee\x3e\xa1\x36\xcc\x1e\x0c\x2a\xa4\x50\x0d\xb3\x25\xbd\xd7\x80\x19\x6d\xb9\xee\x44\x2b\x23\x2d\x9f\xa5\x27\x6f\xec\xf8\x8c\x31\x6a\xb9\x8f\x7f\x0c\xed\xff\xfb\xee\xf4\xfb\xb3\x73\x16\x40\x0b\xfc\x8a\x0d\x46\xa3\x51\xd0\xf2\xf4\xfc\x64\x49\xbb\x83\xed\x68\xda\x56\x95\xf0\x0a\x2d\xa9\x79\x9e\x49\x24\x32\x01\xb8\x3c\xd5\xa4\xfe\x29\xcc\x47\xcb\x8b\x74\xc1\x81\xcc\x79\x3e\xbc\x15\x0b\xe3\xbd\x7c\xfe\x7b\xc5\xb1\xcd\x79\xbe\x3d\x73\x47\xbd\xb0\xd5\x76\x0c\xca\x7c\xfb\x18\x0f\xf4\x93\xd0\x21\x6a\x39\xfd\xda\xc5\xc7\xed\x9c\x7b\xff\xec\xe6\xcc\x3e\xce\xbd\x6d\xca\xe2\xd9\xbf\xd2\x88\x6c\x82\x85\xbd\xd5\x22\x20\x13\xa1\xef\xea\x23\xbc\x45\xd7\xbc\xfc\x75\x8e\xb4\x27\xe4\xea\xdb\x75\xa0\x0d\x51\xf8\xf6\x97\xf5\x28\x4f\xd6\x3e\x7b\x7d\x02\x96\x7c\x26\x9f\xd6\x35\xb3\x2e\x71\x6c\x5d\xeb\x69\xba\x73\x30\xfd\x0d\x1d\x4c\xbd\xe2\xc4\xfb\x4c\xfe\x86\x0e\xa5\x9f\xc8\x7b\x74\xbb\xae\xa2\x57\xbf\xb9\xab\x68\x23\x5d\xc6\xcd\x9e\x9d\xd0\xfe\x5a\xc3\x71\x54\xee\xf0\x0d\xb7\xef\x69\x8a\xa6\x89\x47\xb1\xc6\x9f\xc2\x57\x70\x0d\x1e\xeb\x3a\x0c\xee\xbc\xf9\x7e\x7b\x26\xb2\xad\x8a\x7d\xaa\x0c\xb5\x4e\xd0\xd8\xf9\xe1\x7d\x8e\x8c\xeb\x63\xfd\xf0\xd6\xdd\xf6\x76\x9d\xf1\xfa\xb0\x77\x2b\x04\x59\x4c\xfc\x14\xf0\xb1\x91\xe0\xb9\x56\x34\x18\x59\x09\x82\x50\x3a\xe7\xbb\x6a\xdf\xf5\xc7\x1e\xd1\x73\x03\xd4\x74\x6d\x25\x7a\xae\x8f\x43\x60\x5f\x1f\xc0\x53\x70\xfa\x5b\xc9\xd5\xdb\x07\x67\xe7\xb6\x8f\x09\x4d\x27\xa3\x33\x35\xd1\x88\xe2\x26\x3c\xc1\xdc\x39\xc4\x40\x7c\x62\x37\xbe\xef\xc1\x6d\xef\x59\x96\xff\xbc\x8e\x78\xdf\x35\x34\x7e\xec\xe2\xc7\xe3\xab\x2f\x5e\xbd\x64\xc7\x57\x97\x8c\x52\x3b\x3c\xb3\xe7\xdb\x65\xcb\xc1\xad\xcd\xa9\xb9\xc2\xe8\x6d\x7f\x37\x67\x94\xb6\xcb\x79\xc3\x7e\x31\x89\xce\xc5\x70\xa6\x4d\x09\xce\x70\x52\x1f\xda\xff\xfe\x02\xec\x11\x58\x03\x06\x3e\x89\xe4\x58\x38\xae\x5c\xa4\x64\x07\x38\x9b\x30\x59\xbe\xb0\x93\x90\xeb\x4f\xc4\x86\x3d\x20\x07\x04\x6e\x60\xa1\x29\x6a\x2c\x37\x74\xd9\x22\x0b\x42\x77\xbe\x88\xe9\xba\xff\x84\x0d\xf7\x26\xd2\xf3\x7f\xa8\x15\xda\xcd\x61\x3a\x23\x64\x62\xca\x93\xc5\xb0\xf2\x8c\xe6\x8d\x3a\x09\xfc\x67\x80\x3f\x01\xef\x19\xc8\xd2\x47\xce\x7c\x54\xde\x9e\x59\x20\xd7\x13\x36\xe6\x2a\x1d\xb1\xbf\xeb\x0a\xd0\x8e\x01\xa7\xc0\xa8\x3f\xe1\x2f\x2d\x55\xfc\x2f\xfd\x7d\x2c\x3e\x9e\x9d\x3c\xcf\x0b\x5b\xef\x2f\x41\xfe\x20\x1f\x97\xba\x4d\x54\x3e\x42\x4e\x3c\x50\x56\xb8\x5b\xb1\xf0\xf0\x06\x16\x12\x3b\x3b\x2c\xad\x26\xcc\xa5\xd6\x99\x19\x49\x51\x4e\x20\xd5\xe2\xac\x9c\x67\x87\xc5\x24\xf9\xe6\xcb\xbf\xbc\xfc\x82\x2c\x23\xc3\xaf\x47\x5f\x8e\x5e\x8d\xbe\xc2\xdb\x7f\x44\xcf\x57\x5f\xae\xf7\x57\x80\x3f\x63\x1e\x0b\x64\xe5\xdf\xc0\x67\xc1\xff\x1e\x7a\x2d\xe0\xf8\x7d\xfc\x16\xf0\x87\xda\x73\x01\xfe\x6e\xfb\x2e\xe0\x70\x22\xf2\xe3\x52\xff\x05\x1c\x77\xad\x07\x03\x4e\xd7\xf5\x61\xc0\x11\xd7\x79\x31\x04\xbf\x7b\x3f\x86\xe0\xb7\x15\x9e\x0c\xf0\x5b\xcb\x97\x01\x7e\x6b\x7b\x33\xc0\x8f\xbf\x91\x3f\xc3\xd9\x73\x3e\xbe\x47\x78\x24\xf4\x53\x8f\xad\x14\xf1\x36\xb0\xfb\x9f\x4d\xa2\x81\x8d\x83\x76\xa2\x4c\x78\xf3\x90\x1b\x77\x89\xd9\x90\xcd\x44\x11\xf1\xc9\xd8\xba\xa5\xeb\x78\x9d\xa5\x6b\xc0\x4c\x95\xcc\x98\xdf\x0c\xcf\x5c\x96\x01\x9e\x6d\xd1\x8c\xd5\x5b\x9f\xf8\x9b\xd8\xb2\x7a\xaf\xae\x2d\x0b\x68\x5d\xa4\x52\xa1\xe3\xa2\x95\x19\x04\x37\x2b\x33\x3f\x42\x03\xaf\x09\xe0\x2c\x83\xbf\x13\xad\x12\x91\x47\xe3\x6b\x76\x9a\x86\x9d\xb9\xea\x77\x28\xf5\x37\xcf\xf3\x0f\x9d\x82\x0e\x9e\xf4\x67\x98\x6c\x2e\xc4\x4d\x23\x87\x9b\x7a\x65\x9d\x8b\x62\xb5\x2d\xa5\x9f\x8b\x0d\xbd\x2e\x6a\xdb\x37\xc2\x37\xe9\x52\x22\x23\x2e\xa5\x78\xdd\x5d\x29\x95\xcf\x03\xa1\x2e\x09\xc4\x3e\xab\x03\xb1\xdd\xf5\xb9\xd3\xeb\xdc\xdf\x23\xb2\x57\x47\x20\x7d\xa7\xd4\xdd\x55\x53\xd9\xaa\x92\x39\xca\xea\x3d\x55\x97\xbc\x14\xd3\xae\x43\x87\x10\xb0\x8d\x30\xdc\x26\x4a\x9c\x48\x52\x8f\xac\xf3\x80\x1f\xe3\xc6\xe2\xe0\x23\xce\x03\xb6\x76\xb0\x92\x87\xd6\x6b\x64\x60\x41\x16\xc2\x0e\x4f\x4c\xe4\xfe\xde\x8a\xba\xce\x78\x3c\xd3\x59\x2a\x8a\xb3\xd4\x5e\x7a\x19\x29\xc9\xd2\xfc\xde\xf4\xb0\x97\xee\x57\x22\xd3\xd8\x96\x12\xf3\x87\x8b\x8f\xea\x80\xe0\xcb\x09\x15\x97\x5c\x5a\xce\x22\xd6\x0a\x0f\x2b\x75\x75\x29\x5d\x84\x6a\x0a\xce\xb1\x18\xa5\xe2\xd8\x7e\x25\x50\x1a\xbb\xe7\x12\x02\x05\x27\xda\xe2\x19\x3a\x47\x26\xcb\xba\x2c\xc4\x5c\x70\x03\x2e\xbe\x53\xbb\xbf\xd2\x27\x85\x02\xfb\xbd\x1e\x83\x96\x23\x65\x97\x42\x89\xfb\x6b\x72\x27\xe8\x51\x05\x02\x56\x51\x3b\x56\x2c\xdb\x60\xd0\xc2\xf9\x5d\xd4\xc5\x2d\xca\xe0\x23\x9c\x2d\x6e\xcd\x95\xab\xc0\x53\x5f\x5f\x63\x03\x17\x54\xb8\x0d\xc4\x62\xc5\xe9\xd3\x2a\x60\x0c\xef\x18\xd7\x31\xe3\x26\x74\x72\x40\x27\x61\x7f\xed\x5b\x01\xd3\x47\x5b\xaf\xeb\x31\x56\x63\x05\x14\x4e\x77\xa2\xe5\xef\x8c\x13\xda\xf1\x1e\x3b\xd1\xf2\xcf\x21\x5a\x06\x08\xea\x31\xf2\x65\xbb\xfb\xb6\x85\xcc\x60\xfc\x9d\xa4\xf9\xc7\xc1\xaf\x9f\x81\xa4\x19\x52\xe6\x9d\xb8\xb9\x13\x37\x9f\x4f\xdc\x0c\x21\x6d\xbb\x32\x67\x1b\xfb\xee\x04\xcf\x9d\xe0\xb9\x13\x3c\xff\xac\x82\x27\x16\xc8\x3b\xfa\xf9\xea\xd4\x2e\x5e\x26\xdf\x65\x3a\xb9\xbd\x2a\x75\x21\x7e\xd2\x59\x35\x17\x57\x40\x9c\x56\x21\x89\xcb\xba\x2c\x22\x67\x17\x96\x83\x31\xe0\x37\x72\x22\xcd\x6d\x4d\xdd\xa4\x62\x47\x3f\x5f\xb9\xcc\xc3\x47\x3f\x5f\xb1\xd3\xef\xae\x58\x6a\xdb\x40\xe0\x33\x04\x59\xb8\x58\xe4\xb9\xae\x88\x4a\x6a\xe6\x53\x04\x8a\x02\x13\x00\xd5\x7d\x5c\x86\x20\xf2\x09\x33\x7c\x2e\x60\xe4\x5f\xb5\x82\xe0\x68\xf0\xc7\x41\x47\xa9\x11\x6b\xcf\x9a\x40\x78\x71\xb6\x40\x3f\x47\x5f\x27\xb4\x10\x3c\x3d\xbc\x2f\x64\x29\x20\x41\xee\xc8\x77\xba\x83\xe3\x30\xcc\x54\x79\xae\x8b\x92\xe9\x7b\x45\xb9\xfa\x30\x9d\xd2\x1c\x7c\x4c\x54\xca\xae\x4e\xdf\x49\x55\x3d\xb0\x42\x40\x10\xb8\x54\xd3\x75\x0c\x24\x0e\x7d\x76\xd2\xe5\x21\x27\xe6\x3a\xea\xab\xff\x56\x66\x02\xfd\x4f\x58\xe8\xb6\x8f\x03\x21\x26\x58\xe8\x8a\xdd\x73\x05\xcf\x1d\xf6\x37\x62\xd7\x32\x7f\xc3\x4e\x15\xbc\x6f\x68\x83\x31\xcf\xcd\xa1\xa4\xdf\x62\x9d\x6e\x62\xa6\xed\xe3\xcf\x45\x41\xb5\x03\xa0\xf9\x88\x9d\x3e\xf0\x79\x9e\x09\xf3\x86\xdd\xec\x89\x87\xf2\x6b\x8c\x03\x78\x98\x18\xca\xbf\x51\xda\x7f\x8d\xd8\xd9\x1c\x2b\x98\x66\xc4\xbf\x14\x88\x8b\x20\xe8\x01\xbb\x31\x09\xd1\x0c\x75\xa2\xa7\x08\x65\x6f\x7a\xaf\x41\x26\x2a\x52\x75\x98\x43\x53\xea\x82\x4f\xc5\x21\xdd\xd1\x17\xfc\xde\x08\x04\x67\x8c\xcd\xb6\xe0\x1c\xc3\xbd\x39\x2f\x4a\x1f\xd4\xd4\x0d\x90\xf3\x9f\x1d\x84\xad\x39\xdf\xb3\x09\xd3\x2e\x27\x12\xc5\xa6\xf3\x2a\x03\xd1\xc2\x35\xb2\x27\x4a\xa3\x80\xc7\x62\x70\x86\x6f\x75\xe1\x3e\x59\x26\xe5\xd0\xa4\xfc\xd5\x00\xa6\xc1\x83\xc1\xab\xa8\xd7\x04\x51\x1e\xaf\xec\x01\x5f\xc9\xb9\xcc\x78\x91\x2d\x06\xe1\x2a\xeb\x96\x96\x12\xb8\x21\xed\x62\x6e\xf6\x5e\xde\xec\xb1\x7d\x5d\xc0\xe8\xf6\x21\x64\xc2\x25\x32\x20\xf8\x5b\xa0\xfb\xe4\x41\x6f\x74\xca\xd3\x0f\x2a\x5b\x5a\x44\x7b\xc1\x6e\xf6\x4a\x08\x48\x09\xa8\x8f\x4a\xc1\x8f\x0e\xfd\x99\xb1\x7f\x3d\xbd\x54\x0c\x11\xd0\x7b\x7b\x6c\x14\xfc\x52\xd6\xc1\x2f\xcb\x0e\xfa\x66\x6f\x82\x71\x34\xcf\x0c\x44\xbe\x50\xed\xa0\x7e\xbe\x5d\xdf\x45\x25\xff\x59\x09\x76\x76\xe2\x1e\x68\x5e\xa3\xc7\x34\x82\x1e\xd9\xfe\xd1\x9c\xff\xaa\x55\x80\x70\x0e\x3e\xd1\x63\xe8\xe5\x88\xe5\xa8\xc5\x04\x68\xd8\x62\x15\x55\x70\x6d\x90\x88\x62\x7e\x53\x4b\x2d\xdd\xcf\x54\x06\x16\x42\xb7\xab\x4c\x44\x85\xec\x26\x2e\x54\x3a\x15\xe1\xcc\xcb\xe2\xc3\x6d\xbb\xe5\xf3\x78\x47\x63\xaa\xa6\xda\xb7\x50\xee\x79\x38\xbb\x45\x1d\x3a\xed\xb3\x98\x5c\xa7\x2b\xd6\xb2\x2f\x46\xd3\x11\x4b\xf4\x30\xd3\x98\x9b\x71\x26\xb1\x4b\x48\xd1\xec\x7e\x06\x40\xd3\x06\x4c\x94\xc9\xc8\x3e\x7c\xa3\xe7\x94\xbc\xc2\x36\xdf\x37\x07\x07\x9b\xec\xe5\x22\x58\x3b\x6d\x45\x95\xb2\xf7\x76\x54\x29\x87\xeb\xf6\xc4\xef\xb4\x4c\x59\x5e\x95\x24\xec\x7e\xb2\x7d\x85\x1b\xe9\x5b\x1e\xb8\x71\xb7\x51\x88\x0f\x4f\x6c\x69\x83\x70\xea\x65\x7c\x56\x59\x72\x7b\x60\x88\xda\x56\xbe\x9f\x46\xcb\x46\x3d\x18\xc2\xef\x9c\x5a\x20\x93\x64\x4f\x73\x0d\x9b\x01\xee\x9d\x83\xbd\x54\xdc\xc9\x44\x5c\xf0\x72\xd6\xe5\x37\x82\x6f\x11\x28\x70\xdf\xda\x95\xb0\xb1\x17\xcb\xed\xa7\xfb\x99\x28\x44\x48\x86\xea\xf0\x44\x9f\x59\x32\x46\x8a\xe3\xbe\xa7\xe7\x41\xd6\x2c\xbf\x5f\x1c\xf8\x89\x28\xcc\xc2\xe7\x85\x4e\x57\xe6\xaf\xf2\x8d\x82\xe3\xcf\xed\x9f\xc0\x00\xd0\xc6\x10\xd2\x01\xc2\xed\x1d\xd4\x92\x14\x9c\x01\x28\x7e\x50\x12\x3b\x07\xbc\xa4\x94\x26\x25\x1e\x04\xbe\xde\x8a\xba\x22\x76\x31\x82\xd2\xa5\xa3\x26\x72\xcf\x21\xdf\x66\xbd\x14\x4b\x36\xc1\xd9\x54\xdc\x09\x45\xf5\x20\xc6\x22\xb1\x0f\x87\x93\xcf\xbd\x9e\xc0\x64\xe8\x09\xbb\x1e\xb1\xb6\x66\x88\x44\x8b\xe8\x4a\xa5\x22\x1d\x1a\x50\x05\x7a\x25\x9b\x73\x18\x37\x58\xae\x7c\xf5\xb9\x0c\x98\x41\x96\xd2\xa2\x00\x1f\x96\xac\x0b\x2b\x45\x61\xbc\x76\x96\x0a\x03\xdc\x94\x12\xf7\x10\x01\x72\x25\x7f\xf5\x97\x6f\x32\x0b\x61\x90\x77\x28\x56\xfa\xfe\xd1\xf5\xcf\x2f\x9a\x7b\x3f\x55\x65\x01\x78\xa3\x1f\xe2\x88\xf6\x5e\xf6\xf4\x7f\xad\x0a\x61\x65\xa2\xbe\x72\x95\xef\x10\x3e\x37\xae\x18\xfc\xce\x4e\x78\xc9\x51\xc4\x42\xbe\x52\xab\x9a\x53\x87\x04\x9f\x52\xa5\xf4\x89\xb4\xbe\x4b\xca\x87\x87\x18\xc2\xf2\x24\xe7\x84\x25\xa4\xb9\xfd\x78\x79\xd6\x45\x11\x09\x88\x99\xd3\xf7\x16\xdf\x74\xd6\xfc\x83\x9d\xfe\x18\x5b\xb0\xb9\x4e\xc5\x1b\x76\x0e\x08\xde\x32\x78\x10\xbe\x46\xff\xfc\xd9\x4a\x58\x51\x7d\x88\x5f\x43\x94\x25\x0f\x11\x02\x44\x16\x00\x1b\x45\x64\x65\x9c\xe9\x31\x23\xf6\x67\xd9\xd0\x76\x4f\xd1\x91\x3f\x5e\x9e\x3d\x6e\xd4\xbe\x32\x5a\x2d\x27\xbc\xf7\x99\xbe\xda\xc2\x57\x7f\xc9\x6b\xb4\x6d\x99\xab\xbf\x45\xf3\xf4\x21\x17\x49\xe9\x8d\x02\xec\x6a\xc6\x0b\x91\xbe\x61\xf3\x2a\x2b\x65\x9e\xd1\x89\xd9\x23\x34\x96\xe1\x75\x67\xc7\x78\x92\x00\x3c\xb2\x13\x81\xe9\xb7\xd2\x37\xcc\x48\x35\x0d\x7b\xc4\x3b\xbc\x07\x09\x3b\x7d\xc3\x38\xc0\x3e\x0a\xdc\x69\x70\x55\xfb\x20\xc9\x4b\xe5\x3f\x11\xad\x91\x19\xf0\x28\xa2\x3c\x18\x05\x39\x19\x34\x33\xb0\xe4\x25\x69\x05\x96\x48\x32\x61\x1c\x3e\xc8\x18\x6c\xbf\x56\x16\x1c\x8c\x6a\x19\x06\x28\x20\xa0\x68\x14\x74\x1a\x02\x8e\x11\xc8\x12\xb5\xe4\x9b\x51\x44\xb2\xd8\x88\x9e\xd9\x83\xb1\x10\x57\x2b\x60\x36\xc2\x33\xb6\x6b\x14\xcf\xc0\x87\x2b\x51\x00\x85\xdf\x22\xaa\x31\x22\x29\x44\x49\xc8\x06\xae\x23\x5e\x3c\xe2\x33\xba\x8f\x41\xb8\xe8\x6e\xfa\x84\x20\xc9\x27\xb6\x23\x8d\xac\x53\x15\xe3\x79\x5e\x11\x6c\x1f\x11\x6c\x03\x42\xb3\xa7\xf8\xa3\x58\x44\x13\x53\xf8\x29\x4d\xce\x93\x15\xf3\xc2\x67\x4f\x2e\x1f\xb7\x80\x86\xc6\xc2\xf1\xe9\xa4\x48\xbb\xd0\xd1\xf7\x52\x5f\x5d\x57\xf4\xb7\x9f\x18\x5d\xf1\x53\x78\x35\x07\xa0\x3b\x88\xfe\x43\x40\xf4\xf3\x43\xcc\x77\x52\xa5\xb6\xd3\x0a\x18\xa1\x26\xcc\xde\x0a\x26\x73\x41\xcb\x6b\x9d\x2b\xe8\xdf\x29\x95\x25\xe8\xe7\x06\x8c\xa3\x00\x6b\xd8\xd8\x72\xc3\xb5\xd0\x65\x29\x35\x0f\x78\x78\x76\x62\x61\x0e\xc8\x9b\xbd\x82\x57\xa3\x6f\x07\x2c\x47\x13\x01\x16\x22\x17\x00\x5e\x52\x4d\x1b\x89\x5c\x3d\x0f\x2d\x95\x29\x05\x5f\x0b\x6d\x25\x2f\xa6\x22\x12\x68\xbf\xf3\x3a\xd8\x79\x75\xfd\x9e\x4d\xfc\x78\x3a\x2f\xcc\xef\xcc\xcc\xdf\xf4\xf8\xa2\xc7\x19\x95\x33\xf0\x9b\x47\x37\x6d\x53\x02\x90\x1e\x7a\x31\xa6\x79\x28\x9b\xa8\xc2\x70\x3d\x97\xae\x54\x47\x6f\x55\x58\xbb\xdf\x16\x5c\xb3\x70\xe0\xe3\xab\xb3\xcd\x59\xd3\xc0\xb4\xe8\x64\x02\x38\x30\x69\x3c\xa3\x6f\xb1\xaf\x82\x3a\x13\x80\x54\x8e\xaf\xce\x9c\xe2\x29\x2d\xe4\x9d\x28\xd8\xfe\x77\xa2\xe4\x6c\x22\x40\x55\x71\xb0\x4e\x00\x86\x3e\x7b\x4e\xa7\xff\x03\x57\x69\x16\x21\xe1\x75\xdc\xef\xe9\x43\xce\x55\x7a\x05\xd4\xf1\xd2\x5e\x4d\x24\x1c\x37\xde\x14\xb1\x87\x2f\xa6\xe2\xef\x1c\x09\x2d\x81\x07\x91\x5a\x10\xfd\x04\x58\xbf\xef\x44\x23\x1b\x42\xa9\x59\xce\x8d\xc7\xb1\x76\xfb\xb4\xef\x52\xb3\x44\x5b\xd2\x55\x0a\xff\xa9\xbd\x18\x52\x2e\x26\x3c\xcb\x6a\xbd\x15\x94\x5e\xc9\x67\x4e\x99\x64\xf1\x33\x1d\x91\x61\x42\xf1\x31\xe8\x7a\xb1\xff\xf1\xd5\xd9\x4f\x64\x16\xa5\x03\x66\x53\x5e\x8a\x76\x0e\x73\x0d\x87\xc1\xb3\x1a\xd9\x8f\x05\xda\x97\xac\x10\xaa\xb4\xdb\x34\xd5\x1b\x01\xd7\x0e\x9f\x37\x3c\x76\x1e\xa6\x95\x22\x1a\x1b\x0d\x18\xcf\x32\xfa\x37\xe6\xb8\xb1\x47\xd3\xcb\x4d\xc4\xbf\x1b\x7f\x3d\xee\xdd\x0c\x82\xcb\xbe\xa8\xc6\x99\x34\xb3\x5e\xb7\xdd\x6e\xfb\xdb\x5e\x37\xad\x86\xee\xdb\xde\x42\xfd\xed\xa3\xca\x1b\x5f\x2d\x34\x98\x3f\xd6\x15\xd2\xb3\xee\x32\xdc\x78\x76\xb2\x5b\xa2\xa1\x3e\x55\xcb\xb4\xf9\xd2\x4d\x88\x16\xea\x32\x38\x51\xad\xc9\xe7\xa8\x10\x8a\xaa\xdc\x75\x2a\xd6\x83\xf4\x79\xa4\xd5\x6f\x01\xcc\xc1\x3a\x02\x30\xb6\xbf\xfe\x09\x00\x58\xa1\x3a\x7f\x2a\xd6\x5c\x54\xb3\xcd\x6f\x75\x4d\xb0\x8a\xd6\x25\xc5\x7e\xfb\xa8\x4c\xf0\xeb\x1f\xf0\xda\x96\x8b\xfa\x1f\x68\x5f\x6f\xc0\xa5\x09\x85\x87\xe0\xa0\x97\x60\x6e\x5f\x10\x66\x8d\xa6\x60\x85\x9b\xc2\x91\x2f\xb0\x1a\xb5\x39\xb6\x8a\xaf\x3a\x87\x17\xcd\xe8\x89\x3d\x22\xc1\x9a\x17\xe0\x5b\x5c\x55\x67\xfa\x9f\x82\xaf\x0e\x27\x57\xe8\x41\x11\xb8\xcc\xb0\x42\x94\x55\xa1\x6a\x8c\x18\xb0\x7c\x79\x56\x4d\xa5\xfa\xff\xfe\x9f\xff\xd7\xb0\x63\xc8\x99\xf7\x93\x5f\x3f\xbc\x02\x07\xc3\xd4\x1c\x6b\xa3\x85\xa5\x1c\x08\x06\x57\xa0\xf7\x9e\x7c\x74\x1b\x18\x96\x73\xc5\x8f\x72\xb3\x23\x79\x12\xdc\x06\xbc\x2f\x6e\x7d\x59\x40\x56\x06\xab\x78\x64\xcf\xe8\xf6\xe0\x86\xbb\x56\xe2\x8d\xc9\x69\x88\x34\x2c\x03\x3f\x83\x4b\x36\x4d\xa2\x7a\xac\x95\xa9\xb2\x12\x0d\xa3\x0b\x5d\x15\x58\xcc\xcd\x7b\x6c\x24\xba\x28\xec\x4b\x56\xa4\x95\x2c\xc4\xd4\x8a\x13\x45\x5d\xaa\x2c\xc9\x2a\xfb\xc3\x96\xa8\xf2\x7a\x23\xcb\x04\xb2\xf7\x42\xfd\xcb\xd4\xf9\x22\x21\x72\xc2\x17\x2d\x0d\xe1\x11\x07\x78\xdc\x18\x9d\x48\xd0\x0d\x05\x47\x82\xd5\xfb\x40\x9f\x97\x8a\x52\x14\x73\xa9\x44\xc3\xaf\x29\xe4\x0a\x34\xa4\xf5\x59\xec\x28\x7a\x93\x34\x7c\x1a\xda\x50\x9f\xd0\x63\xa9\xc4\x3b\x9d\xf0\xac\x23\x9d\xaf\xf7\xa0\xc3\xbc\x73\xb6\xd5\x10\x6c\x5d\xbe\xf6\xa1\xf7\xf0\xab\x11\xdb\x73\xd1\x87\x9f\x5a\x2d\x40\x28\x17\x86\xee\x78\xe8\xc2\x03\x58\x8d\x2d\xf0\xb5\xd7\x27\xd5\x85\x8c\xfa\xd9\xc3\x8b\xc7\x1f\x5f\x18\x96\xea\xa4\x9a\x7b\xd5\x23\xe4\x20\xf4\xac\x30\xa9\x05\x9f\x40\x8a\x7a\x62\xf1\xe8\x65\x2d\x43\xe5\x3c\x47\x7b\x23\x4d\xb9\xd4\x38\x91\x92\x13\x47\x21\xe6\xfa\x4e\x18\x76\xf1\xe1\xea\xec\xff\x62\x49\xd0\x1d\x15\x7f\x45\xa5\x14\x65\x9d\x47\xf7\xe7\x1e\xae\x1c\x3c\x8d\xe8\x2a\x8f\x20\x97\x7d\x38\x41\xff\xdc\x71\x20\x3c\xe9\x3c\x46\x8e\xe6\x58\xc3\xec\x71\xc3\x6e\xa2\xcd\x3f\x16\xf9\xec\xed\xd5\x93\xb4\x47\x9c\xd9\x41\x58\x80\xeb\xc9\xba\x63\xc1\x33\xe3\x86\x1c\x99\x5c\xf5\x51\xa4\xa7\xb9\x4e\xa1\xdb\xc4\x78\xe7\xef\x54\x03\xc6\x5f\xe9\x03\xae\x8b\x47\xb8\x80\xcf\xb5\x92\xa5\x2e\x22\x61\x84\xfe\x4b\x34\x87\xaa\x04\xcb\xfb\x7b\x6a\x83\x58\x3c\xb1\x8c\x63\xe2\xf8\x02\xd8\xb8\x1b\x24\xa6\x4b\x25\x0b\x87\x71\x0a\x55\xda\xeb\x61\x02\x5b\x3f\xbc\x3c\x3d\x3a\x79\x7f\x3a\x9a\xa7\x5f\xcc\xf4\xfd\xb0\xd4\xc3\xca\x88\xa1\x2c\x37\x02\xa1\x3c\xea\x50\x56\xf3\xc0\x1f\x0d\x3a\xdf\xdb\x3b\x70\xbe\xf8\x85\xd6\xe5\x80\x15\x1c\x9c\x01\x01\x25\x83\xb7\x7a\x95\x65\xb8\xa5\xb2\x10\x62\x10\x1a\x2c\x0f\x37\x33\xe7\xd7\xb3\x3f\xaf\xd9\xed\x39\x8e\xbc\x63\xc0\xb3\x80\xbd\x6a\x8b\x57\xbe\x95\xe3\xce\xc0\x59\xaf\xd4\xe0\x80\x06\x06\x0c\x8b\x62\x3f\x1a\x51\x34\xcf\x54\x94\x09\xac\xea\x10\x52\x3b\x12\x11\x7c\x86\x1d\xb5\x0d\xde\x51\xc6\xa5\xbd\x1f\xe2\x5b\x3a\x5c\x4b\x50\xef\xdc\x3e\x02\x5a\x75\x74\x83\x54\xa4\x70\x9b\x3b\x7a\x82\xbc\x68\x0f\x79\xcd\x3b\xf1\xec\x75\xc1\x53\x6d\xb0\x94\xa8\x65\x88\x1b\xbb\x42\xbe\xf9\x19\xaf\x69\xcb\x52\x10\x20\xf8\x1d\x5a\xdf\xa1\xf5\x1d\x5a\xdf\xa1\xf5\xdf\x39\x5a\x5f\x26\xe0\xfd\xd1\x70\xfb\x46\xb2\x91\x54\xa9\x28\x9e\xc8\xc1\x27\x30\x88\xd3\x72\x85\x91\x53\x1f\x72\xa1\x4c\xc9\x93\xdb\x11\x3b\x62\xc7\x8d\x66\x1b\xc6\x96\x86\xbd\x62\xd1\xa5\x85\x98\x52\xe8\x5d\x23\xb6\xb4\x31\xe7\x67\x1a\x22\xba\x5d\x6b\xd3\x27\x0c\xfc\x6c\xc3\xf5\x7c\x61\xfe\x99\x0d\x11\x1a\x86\x79\x5a\x03\xf6\xef\x97\x50\xf4\xd8\x52\x87\x36\xac\x41\xa5\xe0\x2f\x84\xa5\xef\x96\x6b\xf1\x72\x5e\xf0\xb9\x28\x45\x51\xd7\x5d\x4f\xb4\x52\xe4\x07\x67\x9f\xd5\x15\x3c\xab\xa7\x71\xb5\xcb\xe3\x23\xe9\xb9\xc9\xb4\x2e\xfb\x0e\xb9\x14\x28\xd6\xd5\x7d\x56\xf4\xf6\xb7\x0d\x1e\x5b\xe6\x62\x61\xca\x1d\x6a\xdb\xa1\xb6\x1d\x6a\xfb\x43\xa2\xb6\x65\x9c\xdd\xef\x1d\xbf\x6d\xc4\xc9\x81\xf3\xe9\xd9\xc5\x31\x98\x1f\x56\x21\xb8\x66\xcb\x76\xc8\x68\xc3\x7c\x01\xe6\x66\x6c\xcf\xce\x2e\xa0\xc8\x7c\xca\x8c\x30\xe0\xa9\xec\x22\x8d\xd7\x2b\xbf\xad\x88\xaf\xab\x72\x69\x0e\x9d\xe6\xf7\xa0\x9e\x0f\x19\x84\xe0\x57\xbf\x92\xb3\x0b\x42\x1c\xb4\x0e\x53\xca\xe4\x76\x81\xc5\x5b\x03\xa3\xfd\x9c\x30\xce\x4d\xf5\xf2\xe5\x57\xe2\x25\xfc\xf7\xcb\xd7\xf8\xbf\xf8\x63\xf2\x1f\x7f\x79\xfd\xf5\xcb\x97\xfb\x56\x50\x79\xc5\x52\xbe\x38\xb0\xa8\x81\x02\x10\x7c\x98\xfc\x7f\xfc\x07\xbb\xf1\x67\x16\x94\xfd\xac\x2d\x89\xaf\x5e\xfe\x85\x46\xf9\x8a\xcd\x74\x55\x98\x7e\xc9\x19\x36\xd2\xb4\xeb\x79\xae\x95\x50\xcb\xaa\xfd\xf6\x29\x0c\x53\xd7\xd2\xc5\x04\x48\x6e\xc8\xb5\x0e\xed\xf6\x9b\x2f\xc4\xda\x2d\x20\x57\x14\x3a\x22\x3f\xf9\x85\x32\x68\xc0\xa0\xb0\x0f\xc6\xdb\xd6\x33\x43\x6a\x8d\xc0\x91\x7f\x26\x78\x56\xce\x58\x32\x13\xc9\x6d\xd0\x2f\x6a\x52\x5d\x5a\xce\xf6\x3d\xd5\xaf\x8d\xed\x7c\xf5\x02\xba\xd5\xac\x9a\x4b\x8a\xae\x63\xc3\x02\xb5\xdd\x25\x34\x8a\x41\x4d\xa0\xc8\xec\x0f\x30\xe9\xe2\x66\xef\x8d\xaf\x17\x3b\xa8\x0b\xd1\x0e\xda\x95\x68\xfb\x97\x92\xbd\xa6\x9c\x34\xfd\x96\xf3\x26\x5c\xca\xd3\x02\x3f\x3c\x00\xc7\xaa\x00\xb5\x21\xa7\xd1\x94\xed\xa3\x57\x64\xe3\xc7\x77\xd2\x94\x07\x90\xeb\xc9\x84\xfe\x05\x58\xd8\x8b\xaa\x37\xaa\x89\x0e\x63\x3e\xde\xa0\x95\xfa\xe8\xe2\xcc\xbe\xd9\xb4\x11\x0b\x72\xf7\x6a\xf4\xea\xaf\xff\x7b\x97\x98\xf7\x53\x87\x70\xac\x2a\x97\xf4\x8e\xa2\xd9\x3d\x68\x86\xa5\x8e\x5d\xbe\xb3\x2d\x04\x9a\x47\x50\x6b\xbb\xf0\x51\xce\xcb\x64\x36\x9c\x8b\x62\x2a\x86\xb7\x62\x41\x25\x99\xdb\x15\xa1\xb0\x95\x29\x0b\x5e\x8a\xa9\x6d\x04\x1d\x76\x91\x2a\xbb\x48\x95\xcd\x23\x55\x7a\x32\x88\x11\xd8\xdd\x5e\x5c\x48\x17\xe3\xae\xc2\xda\x35\xb9\xe3\x59\xd6\x24\x79\x26\x70\x14\x73\x6f\x99\x87\x59\x61\xdb\x18\xdf\xa5\x87\x7d\x2a\xf6\xde\xe5\x02\xfe\x6c\x72\x01\xbf\x5b\x73\xd5\xdb\x44\xe4\xc4\x62\xec\xd2\x00\xff\xc1\xd3\x00\x37\xd7\xfb\x49\x32\x01\xc7\x99\xd9\x27\xa7\x01\x76\xc3\x5a\xd1\xfb\x3d\xcf\x57\x73\xc7\xd4\x88\xb8\xdf\xa6\xbb\x21\x24\xde\xb0\xd8\x16\xb3\xfe\x80\x6a\xc5\x54\xf3\x3e\x89\x80\x77\x88\x70\xbb\x88\x70\x2c\x15\x2f\x16\x27\xd1\x07\xf3\x9d\xff\xd6\x4c\x58\x8c\x7d\x18\xbe\x9e\x53\x9e\x60\x1a\x2a\xd0\x64\xd8\x8b\x24\x1c\x0a\x41\x80\xaa\x9a\x8b\x42\x26\x2c\x99\xf1\x82\x27\xa5\x28\xcc\x80\xbd\x18\xbe\x18\xb0\x17\xff\x78\x61\xe5\xc3\x17\xa3\x17\x23\x16\xce\xc3\x95\x9b\x8b\x8d\x17\xa5\x60\xe8\x59\x9f\x84\xae\xa0\x16\xfb\x90\xe6\xf9\xe3\xf5\xdb\xe1\x5f\x58\xc1\xd5\x94\x94\x2a\xb7\x62\x41\x6e\xa5\x40\x73\x83\x91\x61\x79\xb6\xab\xbe\x13\x45\xc6\x73\x74\x13\xb7\x83\x68\x0b\x29\x34\x20\x34\x05\x17\xe1\x01\x02\x89\x34\x4c\x28\xd0\x69\xa6\x2c\xad\x1c\x1a\x76\xd2\x5b\x5e\xe8\x44\x18\x33\x62\x1f\x8d\xcf\x53\x87\x0e\xc6\xa0\x0b\x25\xca\xce\x5e\x8d\x5e\xbd\xfc\xdf\xcc\xd7\xf7\x06\xa0\x70\x1a\xf2\x47\x7b\xa1\xb6\x2b\xbf\x82\xaf\x65\xf4\x1e\xbb\x37\xd8\x7d\x8e\x5b\xb9\xc8\x9f\x50\x3b\x00\x27\xab\xb4\x1a\xe2\xf5\xb4\xee\x11\x86\x77\xa9\x0c\x82\x0b\x82\x73\x8b\xde\xe2\x9a\xfb\x83\xd6\x74\x7f\xed\xf1\x36\xba\xc5\x27\xc5\xa6\xc8\xf9\xbc\x2a\x21\x3b\x5d\x57\xd1\xe5\x3e\x0d\x98\x9c\x60\xce\x52\xcd\xca\xc2\xa2\x07\x01\xd9\x74\x09\xb8\x01\x2d\xd6\xdb\x06\x47\x67\x8f\x47\x93\x36\xd9\xa5\xa4\x45\x44\xea\x1d\x39\x83\x17\x04\x29\x89\x53\xb0\x1b\x1c\xf8\x30\x83\xc6\xbc\xe0\x34\x03\x80\xda\x6a\xcf\xec\x23\x53\x4e\x4f\x79\xe2\x2a\xde\x43\x5e\x35\x19\x46\xf9\xb2\xb1\x70\x87\x8c\x61\xbd\x68\x1a\xf1\x7b\x3d\xcd\x67\x62\x2e\x0a\x9e\x45\x23\x7c\xa3\xda\xfb\x1d\x1b\xb4\x13\x40\xb7\x29\x80\x3e\x51\xb0\xa4\x97\x77\xaa\xee\xd6\x9b\x63\xbb\xad\x99\x11\x99\x95\x19\x18\x0f\x1e\x71\xa9\x59\xae\xf3\x2a\xe3\x14\xc6\x22\xd4\x9d\x2c\xb4\x02\xeb\xe7\x1d\x2f\xa4\x7d\x38\x88\x3f\x21\xd3\xf9\x35\xd5\x08\x07\xb3\x07\xa9\x68\x29\xff\x83\x1f\xf3\x85\x09\x88\x96\x23\x3b\x04\xef\x0e\x3d\x0e\xf1\xc9\xe4\x5c\x16\xc6\xca\xb4\xd1\x69\x7b\x64\xd0\x5d\x9b\x63\x93\x7c\xae\xca\x8d\x93\x0e\x5b\xa4\x7e\x27\xc5\xfd\xe1\xbd\x2e\x6e\xa5\x9a\x0e\xed\x19\x0c\x49\xec\x3a\x84\xfc\x54\x87\x5f\xc0\x7f\x62\xc0\xee\x42\x79\x96\x05\xbf\x2c\xd8\xfd\x4c\x90\xc7\x60\x88\x53\x9d\xf1\x05\xd9\xc5\x98\x49\x71\x33\xe5\x31\x8d\xfb\xa3\x58\x5c\xc1\xe5\xa3\xc5\x61\xa9\x2e\xc2\x03\x88\xa5\xba\x80\x81\x02\x58\x59\x67\xef\xb8\x15\x8b\xae\x9e\x00\xd4\x7e\xb1\xac\x21\x76\x86\x52\x13\x4c\xc6\x63\xbf\xfe\x68\x97\xab\x0b\x66\x91\xb6\xe7\x68\xb6\x7f\xcf\xeb\x94\x4d\x8d\x86\x2e\x42\x8e\xe8\x53\x60\x6a\x0e\x35\x4c\x7e\xf1\xbb\xd2\x51\x9f\x93\x94\xb4\xae\x74\x14\x7a\x89\xb7\x2e\x71\x4b\xea\x22\x27\x6d\xef\x14\x45\xbb\x12\x81\x4f\xd2\x06\x39\x40\xda\xb6\x1e\xe8\x5c\xa7\x02\xff\xd8\x80\x4f\x6a\x77\x6a\x95\x44\x6a\x06\x05\xd7\xae\xdc\x21\x33\xc5\x31\xaa\x01\xdc\x43\x08\xa6\x9d\x06\xff\xbc\x69\x8e\x5f\x9a\xce\x1c\x73\x62\x0e\x5c\x6a\x73\x92\xc9\x71\x8a\x1f\xa3\x04\xb6\xdd\xa2\xfb\x18\x5b\x2d\x58\x2a\x92\x8c\x5b\x19\x0f\xc3\xb4\x2d\x3d\x6a\x12\x54\x2b\x94\x06\x72\x9e\x2e\x0a\x61\x72\x70\x26\x21\xa4\xd9\x18\xd2\x09\xed\xa6\x2c\x2a\x00\xb1\x56\x58\xb3\xdb\xa2\x95\x20\x79\x96\xb1\x84\x9b\x06\x6f\xd7\x8b\xe2\x13\x4a\xf3\x82\x81\xea\xb2\x01\x8d\x55\xb7\x63\xab\x37\x5b\xc4\x92\xcc\xa4\x3e\x69\x69\x74\x39\x8d\x7c\xa5\xdb\x5d\x93\x43\x91\x4b\x69\xe8\x65\xb3\x41\x67\x7d\xed\xef\x1b\xac\x72\xa2\x8b\xb1\x4c\x53\x01\x35\x63\x00\x8c\x2d\x97\x33\x08\xd3\x68\xa5\xf5\xa7\x76\x86\xf6\x7a\x0f\x95\x8c\x10\x8a\x8f\x67\x27\x9d\xb5\x7e\xac\xab\x8b\x7c\xba\xf5\x3d\x8a\xdd\xba\x28\xf4\xff\x60\x00\xd3\xea\xf8\x68\x9e\xb7\xa4\x2e\xa9\xc0\xd7\x2f\xc7\xfe\xbe\x02\xc0\x53\x44\xac\xb1\x60\x44\x31\x09\xa0\x3a\xa3\x5b\xf4\x04\x4e\xa4\xac\x32\x8e\x00\x87\x9a\xaa\x60\x44\xf2\x99\xb5\xad\x31\x15\xef\x80\x55\x2a\x13\x86\x70\x21\x30\x19\x22\x43\x1f\x59\x28\x84\x81\x12\x64\x8a\x2a\x30\x1f\x36\x3f\xe7\x79\x0e\x69\x41\xf5\x04\x67\x82\x74\x0a\xe5\xcc\x8c\xd8\xb9\x2e\x7d\xc9\x26\xd4\xdf\xa0\x23\x61\xc2\x33\xef\xec\x3b\x91\xd3\x39\xcf\x7d\xd9\x05\x44\xa8\x76\x06\xe7\x9f\xe4\x82\x48\xe6\x4b\x90\x6b\x13\x53\x2e\x63\x99\x1a\x5e\xad\x03\x26\x48\xeb\x18\x88\xa8\x91\x13\x5a\x85\x30\xeb\xfb\x70\x17\x00\xf7\x1d\x38\x48\x02\xa1\x80\xd3\xbd\x9f\x69\x43\x99\x45\xe8\x1d\x58\x74\x6c\x61\x97\x60\xa0\x51\x78\x01\x54\x67\xc1\x5a\x1d\x97\x27\x52\x3c\xdf\x15\x33\xfb\x5e\x78\x03\xf8\x3e\x2a\xd5\xe9\x4d\x0c\x12\xc1\x12\x4c\x88\xe2\xa0\x34\xc1\x18\x48\x39\xa0\x12\x42\xe9\xda\x76\x34\x84\x8d\xe2\x4d\x46\x94\x15\x1d\x0d\x3a\xa8\x11\x40\x49\x4a\x7e\x58\xdc\x8a\xd4\x67\xc0\x18\xb1\x0b\xbb\x48\x2f\x26\x15\x22\xe3\x90\x9b\xc3\xb1\xe5\x76\x5a\xa7\x95\xb7\x93\xbc\x18\x8d\x5e\x60\xa8\x98\x2e\x98\x29\x79\x41\x49\x57\xec\xef\xdb\x60\x7a\x7f\x14\x8b\x6b\x0d\x55\x44\xfe\xf5\xc7\x96\x4c\xcd\xa3\x44\xd3\x28\x7f\x57\x9f\xd9\x3a\x7e\xad\x77\x1a\xec\xa5\x98\xf4\x39\xf0\xe7\x67\x88\x35\xeb\x7d\x6f\x39\x7c\xa1\x5d\x34\x07\xf0\x6a\xbc\x22\x46\xed\xb6\x3e\x87\x64\xd1\x16\x70\x9c\x33\xb8\x11\x25\xcb\x45\x31\x97\xe0\x61\x6c\x98\x56\x2c\x81\xb4\x55\x29\x9d\xe1\xd8\x67\x64\x0f\x42\x1b\x14\xd3\x49\xe9\x44\x6f\x5f\xfe\xf2\xe5\xcb\x97\x2f\x61\x07\x2f\xbf\xfd\xf6\x5b\x06\xde\x96\xa9\x48\xe4\xbc\xdb\x10\x5a\x7d\xf3\xea\xd5\x88\xfd\xfd\xe8\xfd\x3b\xc6\x13\x78\x4a\x6c\xac\x2d\x3a\x80\x91\x6d\x83\x46\x67\x33\x60\x7f\xbb\xfa\x70\x5e\xe7\x01\x6d\x7e\x05\xb6\xdd\x6f\xaf\x99\x7d\xe6\xe5\xeb\xaf\xbf\x1e\xb1\x13\x59\x80\x3a\x4d\x92\x76\x94\xa0\x01\x50\x90\x33\x09\xf2\xc9\x04\x91\x30\x04\x68\x58\xfc\x89\x61\x07\xc4\xc1\xcc\xe5\x74\x56\x52\xd0\x8a\xa5\x76\x99\x4c\x08\x6b\x61\xbd\x28\x7c\xcc\xce\xcc\x08\x63\xd5\xf0\x35\x87\x0a\x34\x99\xbc\x15\x6c\x62\xbe\x2f\x74\x95\x23\x46\x47\xe4\x03\xe9\x67\xc8\x8e\x82\x83\xd5\x77\x65\x1a\x26\xbe\x55\x35\xf0\x76\x04\x73\x47\x30\x77\x04\xf3\xf3\x22\x98\x18\x00\xb7\x92\x48\xba\x12\x34\x3c\xcf\x33\x17\x5a\xee\x43\xe7\xba\xf9\xb9\x8b\x4a\x39\x0c\xc6\xfb\x54\x85\x50\xd1\x1a\x10\xbc\x98\xc6\xf2\x2f\x16\x53\xc8\x79\xe5\x15\x07\x42\x95\xc5\x02\x94\x75\x54\xfa\x56\x27\xb7\xa2\x60\x72\xce\xa7\xe2\x85\x61\xc7\xef\x41\x1c\x04\x72\x22\x27\x5e\x34\x08\x73\xd2\x8d\xd8\x4f\x64\x1f\x0a\x53\x97\xfd\xdb\xfe\x4f\x47\x97\xff\x38\x3f\x7a\x7f\x7a\x00\xe8\x57\x40\x36\x67\x91\x06\x44\xdb\x1f\xc1\x8b\x86\xb9\x89\x1e\xac\x33\x3a\x05\x56\x6d\x2b\x74\x67\x77\x0e\x6b\xd4\x1a\x1f\x7a\x41\x52\xe5\x55\xe9\xf4\x9b\x0e\x8f\x54\x2a\x99\x71\x35\x15\xe4\x36\x10\x2e\xcb\x2c\x54\xc9\x1f\x1c\x56\x16\x26\xe1\xb9\x23\xfd\x9c\xa5\xba\xb2\x93\xff\xdb\xbf\x0d\x98\x14\x6f\xd8\xbf\x05\x1d\x47\xec\x94\xda\x06\xfb\x45\xcc\x23\xee\x44\x01\x83\xd1\x6e\x07\xac\x10\x53\x5e\xa4\x80\x27\xf4\xa4\x01\xbb\x7e\x83\x10\x60\x69\x2c\x04\x2b\x5d\x46\x75\xa2\xfd\x5e\x60\xc9\xcd\xad\x39\x94\xca\x82\xc8\xd0\x0a\xee\xc3\x00\xe0\x10\x3d\x88\x61\xa2\xe7\x73\xae\xd2\x21\x27\x40\x18\xfa\x5b\x38\xfc\x82\xd2\x81\x0d\xb9\x6f\x25\xd5\x90\x0f\xcd\x4c\x64\xd9\x46\x59\x3b\xa8\x7b\x17\xfc\x4e\x3d\xb4\x31\x18\x06\xc4\x4e\x26\x1e\x44\x52\x39\xb6\x0b\xa0\x1e\xa6\x8c\x02\xe4\xe9\xf9\xf5\xe5\xdf\x2f\x3e\x9c\x9d\x5f\xef\xe0\x72\x07\x97\x1b\xc2\xa5\x50\x77\xcb\x1d\x7a\xe3\x86\x76\xe2\xa1\x5d\xf6\xcf\x3a\xe0\xb9\x7b\x1c\x5b\x20\xd2\xa7\xea\xee\x27\x5e\xf4\x08\xdb\x20\x6d\x74\xcf\xb0\x0d\xa1\xee\xde\x16\x7a\xbe\x7c\xef\x64\xd7\x6a\x38\x1f\xc4\xcf\xa3\x7b\x10\xde\x1b\x8b\xc8\x6d\xf0\x8a\x51\x41\x34\xf7\x11\xd3\xc7\xff\x38\x3b\x39\x3d\xbf\x3e\x7b\x7b\x76\x7a\x39\x62\x47\x59\xc6\xa4\x02\x27\xab\x26\xef\x57\x08\x8a\xa3\xe6\x50\x2a\x00\xaa\x50\x06\xf5\xf1\x3d\xe5\xb4\xfc\x9c\x65\x94\x80\x83\xff\xd9\x7e\x47\x3e\x8f\x00\x57\xaa\xba\x5e\x1c\x6d\x70\x50\x33\xa2\x61\xa2\x54\xef\x27\x06\xd5\xf5\xbd\x5e\x2b\xcb\x58\xc9\x6f\x81\x93\x4c\x84\xe5\x14\x84\xf7\x5f\x73\x7b\xc5\xbc\xb7\xa7\xea\xce\xbf\xcf\x0a\x41\x1b\xb9\xe0\xf8\x18\xcf\x05\x3a\xf6\x8e\x49\x66\x47\x77\xb3\x68\x54\xe1\x49\x80\x50\xa9\x42\xf8\x86\x1c\x5e\x9d\x2e\xf2\x10\x46\x31\x4b\xd2\xa6\x82\xde\x30\xcb\xf4\x3d\x9b\xc9\xa9\x45\x2f\x99\xb8\x13\x99\xb3\xc7\x04\x62\x71\xa9\xbd\xe6\x50\x17\xe0\xbd\x57\xc8\xb4\x71\xd3\x38\x8d\x54\xcc\x32\x95\x99\xe6\x28\x5c\x60\xfe\x6a\x83\x52\xd7\x89\xc8\x33\xbd\x98\x53\x25\xae\x94\x5d\x95\xbc\x14\x93\x2a\xbb\x12\x65\x5c\xff\x0d\x83\x5e\x54\x59\x76\xa1\x33\x99\x44\xec\x34\x67\x70\x44\x79\x95\x65\x2c\x87\x26\x23\xf6\x41\x01\x83\x7c\x94\xdd\xf3\x85\x19\xb0\x73\x8b\x58\x07\xec\x6c\x72\xae\xcb\x0b\x27\x6f\x84\xb2\x29\x36\xb4\x24\xea\x0d\xd9\xb5\x4b\x3e\x6d\x08\x22\x10\x03\x19\x0e\x80\xf2\xe1\xbd\x34\x51\x48\x79\xf2\x5d\x7d\x01\x23\x59\x74\x8a\x7f\xc7\x4e\x26\x93\x13\x91\x2c\x92\x98\xa3\xe2\x51\x12\xc8\xc0\x60\x25\xa8\xaf\x91\x92\x21\x90\xa5\x1f\xc0\x5e\x2a\x86\xa6\x2a\x23\xc8\x89\x9b\x6e\xd4\x4f\x81\xcf\xdb\x2c\x79\x15\xbd\x03\xe7\xfd\x8a\x61\xf9\x77\x42\x09\x63\x2e\x0a\x3d\x8e\x6c\xe1\x42\x14\x52\xa7\x98\x44\x76\xec\x82\x48\xfd\xb2\xb0\x2b\x68\x76\xe8\xb7\x1a\x2d\x01\xb6\x71\x1c\x87\xa0\xfe\x13\x2e\xb3\xe8\xf2\x37\xbd\x2a\x07\xda\xe6\x30\xd7\xf8\x3f\x43\x7f\x4a\x5f\xf8\x25\x0e\x61\xd6\x1e\x71\x02\x41\x01\x5a\x7b\x0c\xbd\x84\xbe\xfa\x20\x6a\x41\x19\x24\xfd\x93\xf3\xab\x7f\xbc\x3b\xfa\xee\xf4\x1d\x39\x01\x07\x4f\x93\xa4\x14\x44\xf3\x33\x6e\x45\x5c\x97\x53\x1d\x94\x02\xfb\xbe\xef\xc1\x6a\xd4\x57\xc3\x9f\x45\xff\x2b\x42\x6f\xe0\xb3\x05\x27\xf1\x90\x6b\x23\x6a\xbf\x83\x80\x2a\x9d\xda\x4f\xe8\x3a\x03\xea\x38\xc8\x3e\x31\x95\x77\x2e\x16\x1f\x41\xb5\xf6\xdd\x8d\x84\x4c\xdb\x76\x4a\x94\xf6\x5a\x5c\x62\x07\x00\xfd\x20\xef\x89\x65\x40\xcd\x80\x8d\x2b\xd4\x1f\x16\x72\xce\x0b\x89\x09\x3b\xdc\x60\x3c\x43\x26\x17\x0f\x74\xd1\x5e\xd2\xc9\x87\xd3\x2b\x76\xfe\xe1\xda\x12\x88\x3b\xe1\x12\x0b\xc2\x77\xd8\xd6\x58\xd8\x1e\xb8\xd1\x74\xc4\x8e\xd4\x02\x3f\x7a\xf5\x05\xa8\x3f\xc0\x49\x88\x4a\x0c\x3a\x4c\x7a\xb3\xf7\x72\x04\xff\xff\x66\xcf\xee\xb3\x00\x55\x85\x32\x16\xb1\x86\x3b\x70\xd0\xcd\x93\x44\x18\x23\x2d\xe3\xe7\xcf\x93\x76\xff\x4c\x14\xcb\xbf\xb0\x0b\x5d\x94\x1d\x9e\xc7\xee\x6b\x38\xe7\xb9\x65\x78\x40\x3e\x4f\x1a\xcd\x41\xdc\x2d\x75\xa2\x33\x2b\xfa\x76\x7b\xd2\xe2\xe6\xe0\xcc\xb0\x86\x99\x6a\x8f\xdc\x93\xab\x2a\x04\x4f\xe5\x23\xf1\x8c\xa1\xe2\x90\x7e\x8c\x38\xc2\xc1\x04\xc8\x70\x1f\xae\x87\xf3\xad\x31\xbf\x57\x2c\x54\x7b\x51\x45\x03\xe6\xab\x52\x30\x67\x1c\x0f\x2c\xf2\x4e\x63\xbb\x92\x03\x7f\x04\x71\xac\xdd\x25\x0e\x91\x92\x59\x19\xc3\x2e\x62\xe8\xd7\x19\x88\x22\x1b\xec\xd7\xed\x81\x72\x6d\x02\x5f\x42\xf9\x67\xaa\x42\x96\x0b\x7b\xdd\xe2\x21\x52\xc1\xed\x8a\x1a\x04\xea\x66\x28\x0e\xea\xe8\xaa\x53\x0f\x6d\xbc\x5b\xe4\x61\x0e\xdd\x02\x60\x5b\xe2\xa1\x3c\xdc\x48\x8c\x73\x47\x26\x86\x16\x32\xea\x93\xe9\x8c\xba\x59\x42\xaf\xc6\x91\x60\x2e\x8a\xa2\xac\xf2\x25\x2f\xeb\x2a\xf8\xca\xa4\xc2\x52\xcf\x01\x4f\x72\xa1\x53\x36\xe3\x86\x99\x0a\x90\xda\xa4\xca\x00\x27\xcb\x52\xf2\x4c\xfe\x4a\x39\xfa\x03\x0e\x4c\x69\x52\xca\x23\x54\x93\x62\x80\x94\x12\x95\x2a\x65\xe6\x80\x0f\xeb\x0b\x34\x47\xa6\x8c\xff\x40\x00\xfc\x53\x1c\xf8\x85\x74\xd8\x87\x01\xfb\x1f\xc8\x90\xe5\x5f\x70\x83\x5f\x81\xee\xa8\x16\xb0\x33\xa2\x12\xc0\x99\x73\x48\xb7\xc1\x52\x39\x41\xed\x2c\x4d\x19\xa4\x22\xa2\x23\x18\x8b\xa9\xc4\xe4\xee\x90\x23\xe5\x42\xa7\x2f\x4c\xcd\x74\x0d\x50\x9c\x92\x25\xd9\x3c\x80\x57\xe3\x2c\xd3\x50\xae\x14\x2b\x7c\x00\x97\x0d\xf1\x22\xba\x60\xf7\xbc\x98\x5b\xb2\xc1\x93\x19\x84\x86\x70\xe5\x82\x64\xa0\x94\xe8\x62\x68\x2c\xb7\xed\x92\x5d\x69\x55\x2f\xbf\xfd\x44\xdb\xd1\x21\x14\xf2\x11\xc4\x87\xd8\xe5\x37\x6e\xd8\xb5\x99\x64\x7c\xfa\xf9\xe1\x33\x53\xa6\x32\xe2\x00\xf4\xb3\x57\xa9\x84\x58\xcb\x3d\x62\x2b\x16\x81\x94\xc8\xd9\xb8\xb2\x77\x89\xf5\x07\xec\x50\x1d\x11\xdb\xbe\x78\x8c\xb5\x39\x6b\x6a\xba\x8c\x28\x07\x40\x41\xc8\xf5\x72\x49\x77\x00\x40\x8e\x82\x08\x59\xa2\xa4\x62\xa7\x1f\xde\xd6\x19\x80\xac\xf4\xc6\x33\xb3\x24\xe8\x06\xc6\xfd\xa0\x62\x0e\x58\x3f\x07\x8a\xa3\xce\x82\xbd\xcf\x6f\xa6\x29\x96\x0b\x57\x98\xcc\xb8\x52\x22\x63\x7c\x52\x5a\x06\xb2\x84\xb7\x3a\x16\x42\x59\xf8\x71\x52\xb5\x57\x9a\x97\x25\x4f\x66\x24\xdf\xd3\x0e\x0d\x84\x28\x05\x23\x9a\xb2\x10\x7c\xee\x42\x1b\xe6\x5c\xe2\x50\x8c\x27\x85\x36\xa6\x56\x03\xe0\x60\x2e\xe1\x92\x41\x3c\xe0\x76\xc7\xd0\x20\x58\x47\x40\xf9\xd9\x68\x59\x0d\xb5\x3d\x3c\xe6\x81\xcf\x04\xeb\xd1\x84\x60\x13\x59\x98\xd2\xb9\xbd\xe2\x8c\xa4\x48\xb2\xe3\x79\xab\xa0\xa2\x95\x1a\x5a\xaa\x4a\xbd\xa1\x14\x5e\x5d\x3d\x20\x0d\x95\x4a\x43\x6c\xa8\x19\xd8\x67\x8e\x2c\x20\x1e\xb4\x5b\x29\x1c\xb5\xab\xa8\x88\xa3\xd3\x4f\xc1\x70\xa1\x02\xc5\x63\xa5\x1a\xba\xec\x33\xf3\x10\x31\x68\x30\x8b\x14\x06\xe7\x70\x6d\x07\xf6\x02\x6d\x63\x21\x12\x81\xf6\xae\x38\xa8\x45\x21\x0d\x2b\xd3\x00\x06\xa1\xe4\x47\x17\x6b\x12\x40\x5f\x80\x7d\xd7\x1f\x86\xb3\xc6\x96\x3a\xf8\x25\x54\xe8\x06\x33\x30\x4a\xbc\xe4\x31\xf4\x7d\x21\xcb\x52\xc0\x39\xba\x5c\xd2\xde\xf8\x18\x8e\x51\x27\xfe\x1b\x31\x97\xa3\x29\xe8\x2b\x55\x29\x40\xa5\x8c\xd9\xfa\xc6\x85\x14\x13\x36\x91\x56\xc8\xc0\x14\x4b\x03\x4b\x3e\x66\xa4\xdd\xe2\xc6\x88\x02\x96\x63\x11\xbf\x45\x73\xb4\xac\x11\xfb\x99\xd6\x55\x16\x95\xc2\x1c\x11\x84\x1d\xa1\x28\xb4\x9c\xb0\x29\x98\xf2\x29\xc9\xf5\xd7\x2f\xff\xfa\x1a\x02\x29\x0d\xea\xe4\x4a\x5d\xf2\xcc\xef\x31\x13\x6a\x6a\x4f\x0a\x1f\x04\x38\x37\x7a\xcd\x80\x3f\x80\x4c\xce\x25\x45\xf2\xbd\xfa\xf2\x76\xdc\x54\x65\x1c\xa6\xe2\xee\x30\x38\xbe\x61\xa6\xa7\x7d\x05\xba\xc8\xbd\x2e\xd3\xb9\x10\x35\x67\x33\x7d\x8f\x9e\x22\x91\x0b\x23\xbc\x62\x09\x9f\x73\xd9\x18\x61\xd1\x75\xd8\x89\x8b\x1c\x6d\x38\x9d\x44\x21\xab\x13\x6d\xd5\x78\xdf\x65\x65\xfc\x94\x5a\xa1\xfb\x02\x11\x7e\x78\x61\x74\x61\x23\xf6\x96\x67\xd9\x98\x27\xb7\xd7\xfa\x9d\x9e\x9a\x0f\xea\x14\xcc\xc3\x8d\xb5\x80\x66\x31\x99\x55\xea\xb6\xa5\x70\xd0\x53\xa6\xab\x32\xb7\x12\xe4\x64\xe9\x86\x27\x94\x7f\x1b\x51\x8d\x73\x2b\xa8\x47\x11\x0f\xd2\xeb\x31\x39\x25\x2a\x43\x28\x08\xc7\x37\xe1\x05\x7f\xf9\xf2\x6b\x8c\xbb\x05\x0d\xff\x5f\x5e\xb2\xcc\xca\x21\x03\x7c\x36\x82\x8a\x6c\x99\x39\xcf\xa8\xe2\x78\x0d\x08\xf6\xa0\x7b\x5f\x7c\x19\xb9\xe3\xde\xa4\xf1\xfa\xfa\xef\x40\x17\x65\x69\x44\x36\x19\x60\x52\x51\xef\x21\xf2\x02\x70\xce\x0b\x7a\x66\x16\x65\xf7\x25\x68\x68\xd0\x3f\x11\x56\xa0\x8a\x88\x21\x8d\xcf\xed\xd8\x8d\x71\xa6\x93\x5b\x96\xd2\x47\x9c\x1b\xd8\x33\x7a\x9b\xb5\x80\xb2\x05\x11\xf9\xa7\x60\x25\x3d\xac\x02\xb8\x2a\x40\x99\xbd\xa5\xd8\xbb\x20\xdd\x66\x44\x86\xd5\xa9\xf7\x6c\x72\x39\x50\xd7\x23\xc5\x67\x51\x17\x04\x79\x41\x7b\x1c\x05\xac\x74\xb3\x93\x20\x7f\x85\x13\x19\x4f\x02\xe8\x77\x4a\xed\x58\x4a\x1e\x47\x8b\x3a\x7e\xba\xe9\xd7\xd2\x61\x88\x5e\x18\xaf\x9d\xf1\x76\x40\x63\x5b\x23\xad\xf2\xfe\x47\x5e\xc8\x4a\xbb\xdc\x1c\x68\x6d\xfb\x3d\xbf\xfe\x61\x1f\x0d\xf5\x47\xa4\x49\xd3\xb8\xb0\xac\xc9\x4f\xbc\x88\x7f\xab\xb5\xb3\xd1\xcf\xc8\x4a\x47\x3f\x45\xa5\xe8\x68\xcb\xb6\x10\x19\x6d\xd4\x78\x4f\x2b\x5a\x20\x94\xad\x73\xfa\x38\x73\x06\x96\x65\x9e\x1f\x27\xf0\xd7\xb8\xa9\x70\x43\xb3\x4c\x8f\xc0\x93\xae\x4f\x07\xfe\x1c\x8f\x82\xb0\xf8\xc7\xb1\x3c\x96\x09\x01\xdb\x85\x34\x0c\x52\x2b\x8e\x98\x18\x4d\x47\xec\xbf\x6e\x60\x3f\xd3\xa4\xb0\x7b\x9a\x2d\x72\x51\xd8\x97\xf1\xe6\xee\xd5\xe8\xe5\xe8\x5b\x4c\xcd\x88\xf6\xf6\x59\x35\xb6\x4d\xa6\x5a\x4f\x33\xf1\x8f\xc0\x88\xd0\xed\xf4\xdf\x1b\x99\x60\x8d\xfc\x55\x7c\xb7\x88\xd6\x7e\xb3\xe4\xca\x7e\x76\xca\x68\xda\x82\x22\xa6\x66\x9d\x8b\xdc\xeb\xaf\x37\x0e\x1a\x08\xc0\x7e\x75\x40\x52\xdd\x30\xcc\x32\xcb\xbd\x7a\x18\x54\xb2\x68\xf3\x44\xa9\x25\x46\x05\xa2\x37\xdd\xd4\x3d\x46\xcb\xc0\x37\x16\xd9\xba\xf9\x6a\x3e\x16\x85\xd3\x89\x07\x2a\x71\xd2\x05\xe7\x20\xf6\x9f\x5d\x38\x05\xb0\x73\x74\xf4\x16\x59\xb4\xbe\x42\x67\x05\x63\x0d\xd8\x4b\xca\x29\xcb\x1e\xdc\x3f\x5e\x7f\xf3\xcd\x57\xaf\x7b\xba\x28\xce\xb4\x29\xcf\x2e\x62\x34\x9f\x97\x98\x10\xfb\xec\x02\xa8\xa6\x24\x26\xc6\xd7\x0c\xa5\x1d\x44\xd9\x08\xdb\xf1\x71\x27\x60\x7b\x76\x7d\x0e\x1f\x7b\x06\x76\xa0\x1f\xb4\x29\xcf\xe9\xde\x9b\x86\xbc\x7a\xdc\xb9\x25\x32\xac\x01\x38\x23\xf6\x5e\x9b\x32\xe4\xba\xa9\x24\x90\x12\x96\x21\x9b\xc9\xf5\x10\x8e\x27\x1c\xb7\xe2\xac\xda\xa1\x62\x67\x47\xe7\x47\xff\xb8\xfa\xe9\x18\x1c\x45\xc8\x6f\x12\x2c\x34\xa1\xa7\xac\x4e\xc9\xb8\x63\x67\x48\x03\x98\x5e\x61\xdd\x19\x31\x30\x1f\xb9\xa0\x3a\xbc\x03\x7b\xd5\xa4\xb8\x02\x4f\x14\x97\xb9\x7c\xe1\x94\xd8\x71\x7b\xac\x57\xe8\x77\xb9\x10\xfa\x42\x09\xa1\x8a\xc0\x57\xf9\xe3\xc9\xc5\x80\x5d\x1f\x5f\x80\x19\xf5\xea\xf8\xfa\xa2\xc9\xab\xde\xec\x5d\x1f\x5f\x44\x13\xcb\x3e\x0a\x55\x80\x4d\xb9\x17\xae\x80\x96\x94\xd9\xca\x9e\x20\x99\x56\x48\x4d\x36\x09\xf5\xd8\x90\x00\x5d\xa3\x61\x59\x96\x56\xe4\xb0\x40\x68\x5c\xb9\xd1\x20\xbf\x3b\xb0\x19\xca\x21\xc8\x79\x07\xfc\x6a\xe3\x8f\x6d\x25\x0d\x6b\x2e\xe7\x67\x2e\xcb\x5e\xee\xe6\xe4\x70\x13\x23\x68\x25\x97\x99\xf1\x39\x85\x3b\x05\x24\x37\x50\xa0\x35\xd7\x76\x49\x53\x06\xc2\xa2\x88\x38\x90\xb5\x17\x50\xb7\xdd\xc2\x1a\xae\xeb\x89\x2d\x3b\x88\xa7\xb5\x7e\x0d\xd4\x70\x0b\x0b\xa0\x0b\xda\x9c\x73\x6b\x1c\x61\x0f\x10\x0e\x76\xda\xa3\xb5\x5b\xd6\x3a\x7e\xa8\xb1\x8a\xde\x8f\x84\x3a\x50\xf2\x03\xfa\xc3\xbf\x13\xbe\x9a\x94\x36\xe1\x96\x54\x59\x47\x11\x3a\x71\x2d\xe7\xa2\xa9\x27\x0a\x14\xa4\xdc\xa0\x7c\xbe\x5f\x88\xe1\x01\x0d\xf2\xa4\xd0\x6b\x3b\xdb\x13\x52\xcf\x40\xf7\x5e\xa7\x7d\xdd\x78\x2b\xfd\x0e\xbc\xee\x83\x67\x1e\xbc\xa1\xbe\xc7\x1e\x72\x30\xe2\x41\x96\xc7\x3a\x8d\xb8\x20\xfb\x21\x62\x85\x0b\x42\x89\xea\xec\xc4\xc9\x39\x48\xee\xd8\x0b\xe4\x42\xdf\x1c\x1e\x22\xf9\xf5\x23\xfd\x43\xa6\x98\x06\xff\x45\x8c\x82\xf8\xa5\x74\x1d\x4f\x1f\x64\xe9\x54\x3a\xde\xbc\x0d\x77\x1e\xaa\x5b\xda\x5e\x10\xfd\x08\xb2\x85\x0d\x33\xdb\x1c\xec\x1a\xd3\x6f\x05\xe0\x7a\xe4\x92\x47\xbf\x4f\xe7\xea\xba\xc1\x09\x34\xaa\x82\x98\x58\xc8\xf3\x3e\x68\x3a\x0f\x18\x7e\x7f\xd4\x31\x07\xc9\xe8\xe5\x34\x1e\x05\x00\xbf\x6f\xfd\x0e\x7b\x63\x8e\xbc\x10\x77\x52\x57\x86\xec\x83\xb1\x19\xd9\xef\x0a\x83\xfc\x5c\x93\xb9\x7e\xe8\x83\x3a\x20\xee\x70\xb4\xef\x71\xf8\x7a\x03\x68\xbd\x9f\x2d\xba\xc6\x0b\xcb\x3e\x2f\x44\xe9\xa8\xc6\x92\x48\xfd\x5e\xd0\xfa\x88\xb1\x1f\xcd\x41\xae\xab\x1a\xd0\x68\x5a\x67\xbd\x48\x89\xef\xf0\x39\xa8\xab\x02\x4c\xc0\x26\xa8\xcf\xd0\xf0\x90\xe8\x13\x37\x82\x6e\x2c\x0b\xf8\x2f\xc0\xed\x31\xa8\x3e\x9c\xf7\x28\xfd\x37\x56\x3a\xe9\x59\xb1\xfb\x72\x87\xcd\xb8\xde\x00\x75\x05\x5d\xeb\x16\x5d\xde\x93\xbd\x26\x97\x2e\x27\xb6\xf9\x33\xfc\xd0\x41\x0c\x2f\x48\x2d\x13\xdd\x9c\x45\x64\x5e\xbc\x58\xc5\x70\xb6\x87\xec\x60\x40\x9f\xae\x7c\x13\x07\xca\x96\x88\xb3\x54\xce\x6c\xe9\x0f\x1e\xef\x17\xd8\xd7\x82\x80\xe0\xb9\x24\x1a\x0c\x82\x3d\xa3\x26\xe8\x19\x37\x2c\xe7\x06\xe2\x43\x20\xeb\x10\xf9\x59\xa1\xc3\x44\xdc\x2c\xd0\x78\x01\x51\x30\x53\x5e\xdb\x50\xca\xb9\x30\x91\x39\xc1\x8c\x1d\xb8\x7a\xd0\x23\xcd\x16\x54\x73\x88\x50\x4d\x3d\x50\x2a\x78\x1a\x6a\x05\x40\x7a\x86\xe3\x72\x18\x88\x86\x04\x5f\xb0\x58\x9e\x86\x84\x67\x09\xc5\x2d\x03\x59\x6c\x8d\x38\x62\xdf\x01\xd4\x68\x23\xc2\x79\x78\x21\x98\xa9\x30\xb7\x53\xa9\xd9\x94\x17\x63\xfb\x84\xea\x12\xc0\xa4\x2b\x42\x67\x79\x50\x57\x4f\x85\x95\xeb\xf3\x1c\x53\x80\x7e\x63\x05\xfa\xef\x8f\x7b\x6a\x2d\x1c\x4d\x7c\xea\x45\x92\x63\x10\x5d\x23\x3b\xab\x9d\x7a\x20\x2e\x1c\x4d\xd6\x63\x91\x68\xb8\x9e\xa2\x12\xe4\x65\x60\x1a\x2e\x43\x06\x93\xd7\xa6\xa2\xb0\x4c\xaf\xf7\xe5\x19\xb1\x4b\x61\x44\x58\xcb\x2c\x1e\x75\x10\xdc\xaf\x2e\x98\x9c\xb8\x4c\xbd\x2c\xd3\x46\x18\x22\x86\xa5\x98\xe7\xba\x00\x7f\xd0\x11\x3b\x33\xce\x03\x03\xd6\x04\xc3\x2a\xdd\x59\x15\x85\x15\x2c\x73\xc3\x78\x04\x76\x70\x44\x62\x2b\x48\xe1\x51\x62\xe9\x32\x36\xe4\x84\x8b\xb9\x56\xa7\xe4\xce\xb8\x52\x8d\xde\x68\x59\x13\xc4\x58\x95\x23\xd2\xbf\x62\x17\xef\x2c\xb9\x8e\x14\xc6\x95\xaf\x71\x8d\xe3\x45\xad\x28\x74\x18\x7e\x2a\xef\x44\x74\xb2\xed\xd4\xcc\x3a\xd1\xf7\xea\x9e\x17\xe9\xd1\xc5\x59\xbf\x04\x37\x41\xe5\xc7\x94\xfa\x62\xc1\x09\x35\xd1\xa8\x43\xa3\x61\xa0\xe2\x5e\x3c\xf3\xcd\xfa\x84\x30\x69\xbd\xac\x67\x4f\x09\xe3\xb2\xe8\xd5\x89\x10\x83\x43\x41\x9b\x0d\x58\x20\xb7\x60\x67\xec\x0c\x0c\x25\xb2\xff\xd5\x17\xf8\xe3\xdd\x97\xbd\x81\x68\xe3\x55\x4f\x21\xd6\x21\xb4\x49\xb4\xd2\xa2\x61\xb2\x87\xda\x2f\x26\xc8\x29\xe9\xdc\x4a\x21\x6c\x67\xcd\xfb\x80\x32\xec\xdd\xe2\x99\xb6\x67\xb4\x92\x62\x5d\x60\xbe\xce\x60\xda\xc8\x3a\x90\xeb\xf4\x0d\x83\xe4\xd4\xc0\x04\x60\x8d\xbe\x01\x83\x8c\x18\x66\x80\x81\x03\x5c\xa5\xac\x4e\xe3\x85\xf4\x8a\x2a\x6c\x6e\x82\xc4\x30\x8f\xef\x5b\x3b\xbb\x4f\xb9\x6a\x25\xe5\x6d\xe4\xd2\xa0\x6c\xee\x99\x18\x84\xda\xf6\xcf\x3d\x79\x46\xdc\x5a\x4d\x4f\x38\x48\x35\xd2\x30\x52\xff\x5e\x72\x64\xe4\x51\x87\xb1\x1a\x20\xc1\xed\x47\x1a\x46\x93\x52\x56\x06\x48\xbc\x10\xa6\xb0\x73\x5e\x64\x63\xe1\x12\xa6\x90\xcd\x81\x58\x56\x3e\x36\x3a\xab\xac\xcc\x5b\xc4\xd3\x38\xd4\x26\x8a\xaa\x9c\x0c\xff\xc2\x84\x4a\x74\xea\xc2\x7d\xd1\x45\xd0\xa2\xa6\x3a\xdd\x42\xb8\x12\x9f\xc9\xbe\x95\x08\x62\x55\x2a\xba\xb7\x4b\x5f\x63\xfd\x06\x7d\x66\xcf\xb6\x68\x42\x8f\xd1\xfb\xbc\xa3\xa7\x90\xf1\x39\xdb\x20\x63\xe7\x3e\xfe\x38\x4a\xf2\x6a\x40\x0d\x46\x73\x31\xd7\xc5\x62\xe0\x1b\xd9\x8f\x8d\x5e\xd4\x02\xa3\xad\x6b\x6e\xf8\x51\x4f\xf9\x32\xdc\x6a\xfd\x98\x7b\x62\xe6\x18\x22\x58\xe9\x74\xd0\x6c\xda\x17\x85\xaf\xcf\x9a\xb4\xa4\x4b\xd3\xb4\x4c\xcf\x31\x40\xd8\x1d\x52\x3e\xf2\x44\x90\xd5\x34\xf8\x73\xc9\x40\x54\x6a\xf0\x7d\xeb\x97\x70\x88\xed\x72\x18\xfd\xd9\x73\x18\x75\x39\xbc\xb4\x0b\xdc\xbf\x47\x1e\xef\x74\x9e\x97\x8b\x13\xf9\xa8\xb2\xed\x8a\x3c\x3e\xbd\xab\x19\x55\x39\x45\x5b\x7d\xeb\xd3\xb3\xbe\xff\xb9\x48\x65\x15\xc9\x20\x00\x7e\x1d\x25\x15\x63\x35\xa5\x2e\xf8\x54\x30\x6c\xec\xdd\x74\x79\x72\x8b\xa0\x1a\x78\xcc\x5d\x07\xa2\x81\x34\xec\x66\xef\x66\xcf\x79\xc1\x09\xae\x3c\xfa\x70\xde\xce\x81\xe7\x1c\x0e\xde\x78\xe9\x78\x48\x94\x61\x63\x9f\x1a\x1e\xd8\xe7\xfd\x1e\x88\xcf\xc6\xfa\x3f\xda\xc8\x21\x1d\xe9\x17\x30\x41\x2a\x97\x58\x2a\x7e\x15\xef\x2c\x31\x8c\xa8\x8c\xc0\x05\x9b\xa3\xd7\xa4\x9e\xb0\x4c\x27\xe0\x04\x8e\xa7\xe4\x63\xdb\x50\xa1\x2b\x0d\x73\xa0\xe2\x65\x30\xef\x12\x05\xd4\x16\x9e\x47\x66\xb4\x4b\x24\x04\xb1\x9a\x16\xa7\xc0\x26\xfd\xc1\x5c\x43\x54\xf6\x83\x9c\x57\x73\x56\x39\xe7\xe5\x46\x9b\x7a\xa2\x7b\xe7\x48\x0d\xa1\xdc\x52\x41\xa7\x26\x26\x84\x70\x1c\xb7\xc7\x20\x2e\x18\xc2\x57\x1d\x76\x30\x15\x70\x32\x34\x0b\x31\x0f\x54\x42\x31\x50\x3a\xf9\x94\x46\xed\xfb\x57\x32\x6b\x5e\xbf\x0b\xe5\xf2\x1b\xaf\x94\x53\x8e\xb4\x2f\x33\x7e\x97\x95\x11\xc5\x70\x5a\xc9\x34\x7a\x8b\x9b\x1a\x66\x46\x8e\x33\x1a\xfd\x67\xc5\x55\x29\xcb\xc5\xc6\xc6\x99\xc3\xee\x10\xcb\x30\x06\x29\x12\x8e\xd0\x69\x6b\x15\xb2\x68\x35\x25\x83\x6e\x95\x67\x24\xba\xa7\xe4\x81\x68\x9c\x62\x24\xf0\x05\x5b\x57\x38\x20\xef\x4a\x7c\x33\x6d\xca\x65\x7a\x61\x01\x9e\x51\x35\x0f\x0d\x05\x95\x48\xb9\x13\xd3\x9e\xe7\xf1\x41\xce\x2e\x3a\xdd\x47\xec\x3d\x25\x4c\x1b\x0b\x96\x69\x9d\x03\x46\xd9\x7f\xf5\xe5\xb7\x18\xe0\x7c\xf8\x97\x03\x4b\xb5\xd4\xed\x10\x1f\xd8\xfe\xab\xd7\x7f\x1d\x7d\xf9\xcd\xd7\xf0\xed\xd5\xeb\x03\xd0\xd2\x05\xdf\x21\x1c\x28\x01\x83\xff\xfe\x97\x5f\x7e\x4d\x83\x7c\xf9\xf5\xc1\x88\x9d\x5d\xdc\xbd\xae\x9f\x19\xd0\x7c\x4b\x6a\x2b\xe4\xc6\x31\x90\xd0\xb3\xae\xf6\x5d\x59\x00\xcf\x33\x5e\x5a\x42\x67\x46\xec\x28\x33\x7a\xc0\x12\x51\x80\x40\x50\x83\x65\x5d\x30\xd4\x10\x81\xb5\xdf\x86\x79\xa1\x1f\x16\x03\x4f\xdb\x61\x76\x50\x78\xc7\x13\x61\xeb\x54\x9c\x47\x4f\xbf\x66\x9f\xce\x2d\x49\xb6\xd7\xe4\x8b\x8d\xd5\xa7\x18\x8b\x28\x4c\x05\x9a\x0e\xc2\xc0\x62\x3c\x25\xd0\xf1\xa8\x65\x45\xcb\x31\x81\xe7\x12\xe1\xdf\x25\x40\x2a\xb5\xab\x1e\x80\x81\x8b\x4e\xed\x10\x6a\xca\x36\x13\xe3\xfd\xd8\x1b\x72\xfd\x75\xbf\x35\x6f\x6e\x9d\x33\x68\xd8\x6e\xc5\x6b\xf3\x8a\x48\xf0\x56\x5b\xa7\x5d\x89\x6a\x1f\x79\x9e\x5f\x2c\xf5\x88\xb3\x2f\x25\x4c\x27\x97\x87\x1e\x72\x18\x8b\x0a\x6e\x72\x41\x62\x96\x89\xce\x32\x7d\x0f\xda\x69\x2c\xee\xf4\x63\x0d\x9d\xc0\x07\x50\xe2\xa9\x11\xfb\xa8\x86\x79\x21\x26\xf2\x41\x90\x02\x06\x00\xd4\x32\x25\xc5\x1d\x91\xab\xb3\xa3\xf3\xa3\x7a\x24\x17\x9b\x8e\x8d\xf7\xb9\xb1\xfc\x3a\xbb\x7c\x7b\x3c\x7c\xfd\xd5\x57\xdf\x00\x91\x20\x44\x7d\x7f\x7f\x3f\x92\x5c\xf1\x91\x2e\xa6\x87\xdc\x18\x39\x85\x04\x43\xe6\x90\x86\x18\xc2\x10\x07\x23\x76\xae\xd5\xd0\x8f\xef\x76\xe7\xab\x88\x58\xd6\xa0\xb5\x44\x17\x52\x35\x5f\xd8\xa7\xc6\xd5\x62\x94\xe8\xf9\xe1\x7c\x31\x4c\x2a\x53\xea\xf9\xd0\x8d\xb1\xa4\x3e\x19\xdc\x9f\x34\x6c\x5a\xf1\x22\x0d\xe2\x50\x71\x59\x47\xf5\x5d\x34\x8a\x94\xc1\xd6\x82\xd0\x55\x27\x86\xf4\xcf\xa5\x0f\x56\xa5\x10\x67\xe2\xbd\x05\x7e\xba\xe8\x4b\x0a\xba\x05\xdb\xf0\x85\xcb\xb3\xe3\xec\x12\xae\x16\x80\x7d\x5c\xb4\xdc\x8b\x86\x8b\x64\xc3\x4a\xe7\x30\x05\xca\xfb\x72\x02\x9e\x82\x39\x01\x73\xd7\xfc\xd0\xcc\xc9\x11\x5f\x7e\xde\x55\x88\x6f\xa4\x0a\x5f\xe5\xf9\x49\x14\x61\x19\x78\xaf\xf7\x02\xb5\xdb\xba\x3e\xbe\x78\xa2\xf9\xde\xbd\xfa\xab\x6a\x6c\x44\x2f\xfc\x80\x2d\x11\xcc\xa6\x56\x92\x02\x6e\x08\x29\xaf\xab\x7f\xc8\x2d\x55\x98\x6b\x05\x12\xae\xcb\x6b\x82\xac\x91\x4f\x4b\x47\x9f\x82\xac\x0f\x68\x75\x3c\xe6\x45\x29\x8c\xe4\xf0\xf4\xd3\x2a\x81\x56\x47\x7e\xfc\x07\x76\x81\x83\xbd\xd5\x05\x13\x0f\x7c\x9e\x67\x62\x80\x76\x8a\x37\x37\x8a\xb1\xff\x63\xff\x87\xd5\x1d\xde\xb0\xff\xfa\x3f\x37\x7b\x32\xbf\xd9\x7b\xc3\x6e\xf6\x5e\xbd\x1c\xd9\xff\x1b\xbd\xba\xd9\xfb\xd7\x80\x75\x3e\x7c\x39\xfa\xf2\x66\xef\x5f\xff\x3d\xc0\x31\x60\xa2\x37\xf6\x5f\x30\x86\x85\x51\x6c\xcc\x31\xa0\xc0\xee\xca\xfe\xf0\x97\xd7\xdf\x7e\x83\xa3\xd5\x4d\xc6\xcd\x26\x5f\xbd\xfc\xeb\xbf\xfe\xdb\x8e\xfa\x2f\xcc\x1a\x8d\x32\x27\xf8\x97\xb4\x8f\x81\xc8\xd8\x9d\x14\xf7\x60\xfa\x7b\x83\x8b\xe1\x6f\xd8\x7f\x31\xbf\xfc\x37\x76\xce\x01\xf3\xab\x86\xbf\x99\x5b\xf8\xb8\xd9\xf6\xab\x97\x7f\x0d\x9b\x7e\xf5\xf2\xaf\xec\xbf\xd7\x17\x9b\x75\x07\x18\x91\x68\x2f\xc2\xfb\x06\xde\x56\x4f\x26\x64\xdf\x04\x75\x1f\x39\x59\x07\x75\x4b\x29\x89\x2c\x37\xc4\x05\x58\x58\x30\x21\x69\xae\x23\x1f\x43\x03\x26\x9f\xa0\x20\x00\x21\xfb\x63\x9e\x71\x95\x80\x89\x57\xa5\x14\x3b\x8c\xf2\x54\x29\x33\xf9\xab\xd8\x4e\xb2\xb1\x26\x87\x0a\x29\x65\x75\x79\x69\x17\x7d\xb4\x95\x23\xb1\x2c\x97\x63\x8b\x6a\xad\x61\xeb\x7c\xd8\x58\x24\x9c\xc4\xc4\x45\xd3\x68\xee\x9c\xf2\x7c\x86\xb8\x01\x7e\x2f\x44\x82\x43\x61\x9a\x05\xd0\x89\x3a\xd7\x80\x64\x26\x92\x5b\x40\x21\x4b\x9a\xba\x44\x0d\xd8\xf2\xb9\x0e\x72\x49\xf6\xa3\xc0\xee\x68\x18\xbf\xe3\x32\x03\x01\x90\x1c\x0a\xdc\xe9\x85\x47\xbc\xcd\x05\x62\x8e\x9e\xbe\x4c\x57\x7b\x5b\xeb\x59\xae\x35\x6c\x59\x2f\x21\x88\xa8\x7a\xed\xc2\xd0\x44\x19\x48\xe2\x2d\x26\x9c\xbb\xc2\x87\x3c\x29\x2b\x2b\x91\x23\xd9\x1c\xb1\x53\xc4\x94\x80\x4c\x2c\xa7\x6d\x71\xd4\x7c\x61\xee\x92\x9b\x3d\x40\x1a\x88\xd5\x2d\xb6\x44\x14\x42\x68\x74\x3b\x88\xd4\xa3\xd2\xad\xa1\x51\xc6\xfe\x35\xd8\x64\xa1\x5f\x8d\xbe\xda\x78\x3d\x7f\xfd\x6a\xcd\x6a\xbe\x7d\xdd\x58\x4c\x0f\x9c\xba\x2b\x4d\xb7\xdd\xd2\x74\xbb\x92\x70\xbb\xa2\xb9\x9b\x15\xcd\x1d\xec\x19\xc4\x74\x4b\xa2\x34\x45\xe9\x94\x7b\x1d\xc6\xb4\x52\xee\xa1\x65\x19\xa3\x51\x46\x01\x67\x6a\x89\x7a\x9e\xf1\xc4\x25\xd7\xa0\x26\x8c\x27\x89\x26\xc7\x74\x7c\x6c\x67\x17\x06\xe9\xba\x99\xf1\x42\x8c\x58\x9d\x46\x9d\x74\x5d\xc0\x43\xfb\xd4\x2e\x40\x35\x07\xcc\x68\x94\xa5\x90\xbb\x40\xb9\xd5\x72\x0a\xf6\x8d\x76\xbf\x59\x48\xdb\x6f\x30\x11\x89\x6d\x83\x6e\x74\x3e\xc7\x52\xad\xc0\x3c\x70\x29\x66\x5c\x16\x1d\x20\x22\xb4\x1e\x4c\xd5\x97\x4a\x93\x67\x7c\x81\xa1\xdb\xf5\x18\x6e\x9b\xce\x79\x37\xc8\xe0\x84\x8c\xfa\xb9\x0e\x36\x96\x65\x56\xba\x17\x1c\xdc\x28\xc1\xe4\x14\x1c\xa0\x4a\xd9\x79\x9b\xd7\x72\x6b\x31\x56\x94\xc4\xb9\xec\x9b\x24\x25\x6c\xa3\x6f\xc0\x72\x5a\x49\xb9\x90\xc6\x8a\x88\x8e\x04\x6e\x91\x65\x20\x61\x69\x63\xa6\x81\xfa\xf5\xac\x41\xb8\xbe\x4c\xb3\x67\x0f\xd6\x15\x63\x6d\x34\x6c\xda\xa2\x3c\x98\xef\xca\xad\x7e\x1e\x34\x6d\x89\x19\xf1\xdd\x8a\xfb\x7a\x32\x40\x9b\x5d\x81\xd5\x4f\x4f\x4d\xe1\x05\x7e\x32\x4a\xda\x5c\xef\x27\xac\xbd\x5a\xc3\xd8\x96\x6a\xaf\x36\x53\x76\xac\xc4\x7a\x41\xc3\xd0\x07\x05\xe8\x89\x77\x17\xe2\x8e\xea\xd7\xc5\x8b\xd7\x72\xf2\x89\x6b\x1a\xb5\x13\x5c\x37\x0a\xb8\xf8\xd2\xe3\x00\xe5\x9b\x39\x29\xb7\xab\xf0\x83\x4a\x51\x4c\xe4\x43\x04\xd9\xaa\x3a\x3d\x39\xfa\xb3\x4e\xa4\x7d\x5e\x9a\xe5\x05\xdc\x12\xa4\x10\xa0\x02\x4a\x9d\x7a\x40\xa1\x52\xb5\x91\xcc\x3e\x6a\x18\x16\x49\xb1\xc4\x44\x72\x0d\xaa\x65\xfb\xf9\xf1\xfb\xc6\xfe\xc1\xa6\x37\xad\xf2\x5b\x77\x5d\x96\x50\xa5\x31\xfe\x72\x38\xfb\x89\xaf\xac\x7f\x83\x2d\x1a\xde\x4d\x2a\x5a\x5d\x20\x2c\xc3\xc4\xeb\xd8\xf5\xc7\xd5\xbf\x59\x9f\xec\x3a\xb6\x84\x8d\x2e\x18\x50\x7c\x77\x8e\x47\x96\x1d\xf1\x91\x85\xae\xb6\x40\xbf\x02\x0c\x98\x38\x50\x2d\x82\x04\xc1\x91\x6e\x7f\xf6\xe2\x25\xcd\x9c\x10\xd1\x84\x10\x74\x9f\xf1\x42\x19\x57\xcd\xe2\xd1\xb1\x33\x7e\x61\x5c\x85\xb3\x80\xe8\x52\x7d\x1a\x64\x06\x28\xaa\x10\xdc\x10\x36\x31\x7d\xe2\x03\xda\xf0\x99\x37\x3a\xad\x7c\xbb\xbd\x48\x84\x6f\xd7\xf4\x52\x6c\x15\xd5\xc6\x7d\x22\x47\x8a\x9d\xd6\x7b\x16\x79\x22\xf1\xa3\x58\xac\x71\x5f\xa5\xc2\xd8\x41\xb9\xc9\x0d\xa3\x59\xfc\x44\xa1\x27\xf8\x72\x37\xf6\x55\xce\xeb\xe4\x05\x60\x9a\x25\xa7\x07\x91\x0a\xd4\x03\xf6\x8b\xff\x11\x1d\xdc\xff\xeb\x05\x06\x3e\xfe\x78\xfa\x77\x8a\x77\xfc\xef\x5f\xc2\x56\x81\x4f\x7c\xbc\xa9\xc9\x45\x32\x72\xee\x00\xf4\x27\xbd\xff\xa3\x24\xd1\x95\x2a\xe9\x03\x56\x57\xc6\xa4\x3c\xfe\xcf\x5c\xa7\xed\xbf\xcc\x16\x3c\xea\x3f\x0f\x47\x64\xfa\x53\xe4\x33\x31\x17\x05\xcf\x86\xe4\x6e\xd5\x74\x51\x1e\xb4\xfd\x93\x9b\x3e\xcb\x9d\xde\xcf\xe9\xbe\xec\x38\x85\x0d\xe0\x1f\x3b\x30\x19\x66\x79\x0a\x8b\xd5\x6f\xc6\x43\x34\xde\xc3\xa6\x5c\x44\xd8\x39\x8a\x64\x9e\xe8\x76\xbd\x82\x37\x09\xa7\x5e\x86\xe1\xdc\x45\xf6\xab\xd4\xa7\x58\xb7\x83\x33\x2a\xb8\x3f\x41\x73\x42\xb9\x79\x78\x0a\x79\x5e\xeb\x48\x3f\xf0\x9a\x51\x48\x7d\x2c\xc5\x84\x00\x1b\x0d\x75\x22\x8a\x21\x66\x20\x87\xc2\x46\x49\x29\xef\xa4\xc5\x80\xde\x6f\x21\x15\xe3\x6a\x3a\x05\x47\x5e\xbf\x86\xd0\x75\x8e\xac\x5b\xc1\xcb\x29\x40\x94\x4f\xab\xcc\x4e\x34\xad\x78\xc1\x55\x29\x84\xf1\x2e\xbb\x8b\x46\x39\xcc\xba\x7a\x89\x8b\x69\x84\x42\x49\x50\x71\xe7\x1e\x6b\x27\xd9\xc5\x82\x7e\x01\xcb\x0e\xe8\xa2\x95\x1d\xd8\x6e\xac\xbb\x34\x06\xda\x33\x43\xfd\x21\x01\x57\x22\x7c\xd8\x2d\x2d\x96\x92\x7a\x4a\xad\x06\x3e\xf0\x88\xce\x50\xdc\xc9\x04\x66\x88\x6e\x7b\x5e\x7b\x7e\xe1\x61\x8f\x9d\xcb\x6b\xb6\x60\xae\x94\x4d\x9d\x22\xdf\x22\x42\xcb\x93\x2c\xea\x78\x1c\xe8\x75\x27\x79\xf0\x54\xfc\x2e\x82\x89\x4c\x35\x76\xab\x6d\x9f\x60\xad\x8a\x0b\xe7\x61\xda\xb2\x49\x30\x7c\xe0\x53\xa2\x18\xcf\xf2\xd9\xd2\xbc\xe6\x5d\xf0\x32\xcd\xf4\xe6\xbb\x5a\x8f\x7f\x26\xb6\xf4\x0f\x50\x53\x6f\x57\xeb\x71\x07\x97\x9f\x23\x5c\xee\x6a\x3d\xee\x6a\x3d\xee\x6a\x3d\x6e\xbf\xd6\xe3\xae\x92\xe2\x96\x2a\x29\xfa\xa4\xd8\x8e\x98\x41\xa9\x4c\xf2\xaf\x8e\xf0\xd9\x1b\x89\xe8\x1b\xd5\x43\xac\x8b\x1e\x6d\x7b\x19\x1b\x94\x1e\x8c\x49\x16\xcb\x8b\x10\x02\xbf\x0d\x7e\xd3\x0e\xe3\x50\x6a\x21\x3e\xd7\x6a\xda\x0a\x3b\x1a\x40\xed\xa7\x46\xf2\x1b\x95\x2e\xdd\x5b\xdf\x6a\x84\xe0\x1c\xb5\xd1\xa9\x6d\xb9\x60\x5e\x9f\x12\x74\x9f\xe0\x6a\x57\xd4\x73\xab\xeb\xb8\xf5\x5e\x41\x5c\x0a\xac\x8c\x60\x26\xa7\x28\x04\x37\x64\x46\x9e\x1d\x54\x2f\x22\x75\x62\x0e\x95\xcc\xff\x64\x85\xda\xa8\xc1\x73\x3c\xe3\x8d\x2b\xa3\x7d\x8a\x0b\xdf\x15\xbc\xda\x15\xbc\xda\x15\xbc\xda\x52\xc1\x2b\x08\xa3\xf3\x88\x3d\x1e\xdd\x67\xef\xcc\x42\x7e\xd9\x88\x15\x0a\xf7\x05\x2b\xba\xd0\xe9\x55\x2e\x92\x20\x67\x53\x8c\xa6\xe2\x8c\x2e\xcc\x24\xd2\xc0\x73\xe6\x95\x7f\x5a\x5e\xb5\x6c\xd8\xfe\xd9\xc5\xf1\x80\x5d\x9c\x9d\x0c\x98\x28\x93\x83\x48\xd6\x49\x9f\x5e\x46\x94\x78\xeb\xcb\xa8\x3b\xe6\x67\x84\xa2\xde\x33\x5e\xc2\x19\x06\x13\x41\xbe\x9f\x19\xaf\xe3\xa3\x29\x43\x7d\x98\x96\x2a\xf6\x04\x81\x1f\x70\x21\xf0\x78\xbd\xa8\x5f\xeb\x5b\x98\x6a\x57\x70\x6c\x57\x70\x6c\x57\x70\x6c\x57\x70\x6c\x57\x70\x6c\x57\x70\x6c\x57\x70\x6c\x57\x70\xec\xb7\x2f\x38\xd6\x35\x1a\x1e\x43\xdc\xf0\x4a\x97\x9d\x25\x7d\x9c\x35\x3b\x5f\xb8\x18\x0d\x70\x6d\x01\x0d\x6a\x6d\xf2\x46\x2c\x23\x55\x06\x8a\x4f\x19\x33\x8b\x93\x0e\xc6\x88\x9c\x17\x40\xcc\x16\x39\x9a\x79\xef\x0d\x13\xdc\x2c\xc8\xf5\x1c\xdc\xda\x81\x3d\x8d\x58\xd6\x4b\x1d\xcc\x09\xf2\x00\xa5\x28\x70\x83\xa6\x3a\x01\x0b\x01\x12\x27\xc7\x07\xd2\x8a\xf5\x24\xba\x2c\x52\x0e\x2b\x71\xef\x22\xe5\x8d\xb3\xd3\x87\xd3\xc9\xb2\x65\x22\xc6\x7c\x36\x86\xdd\x8b\x2c\xdb\x99\x61\x77\xe6\xae\xdf\x97\xb9\x6b\x67\x86\xdd\xc1\xe5\xe7\x08\x97\x3b\x33\xec\xce\x0c\xbb\x33\xc3\xee\xcc\xb0\x3b\x33\xec\xce\x0c\xbb\x33\xc3\xee\xcc\xb0\x3b\x33\xec\xce\x0c\xbb\x33\xc3\xee\xcc\xb0\x9f\x99\x19\x76\x67\x06\xdc\x99\x01\x77\x66\xc0\x9d\x19\x70\x67\x06\xdc\x99\x01\x77\x66\xc0\x9d\x19\xf0\xf7\x61\x06\x5c\x99\x15\xf3\xa8\x4e\x5e\xb5\x44\x96\x0b\xb4\x70\xf6\xbd\xad\x89\x8a\x5c\x5b\x07\x3e\xb2\xbc\x5d\x1e\xac\xe7\xce\x83\x15\x3b\xf5\x4d\x41\xa1\xab\x96\x85\x04\xdb\xe9\x88\x9d\x8b\xfb\x78\x17\x17\xff\x9c\xe7\x9e\xe5\x84\x5e\x76\x9e\x01\x24\xef\xf5\x21\xd0\x4b\xfb\x7b\x53\x8e\x0f\x37\x9e\xeb\x14\xd0\xd8\x56\x94\xb3\xdd\xc8\xef\x6d\xeb\xf8\x77\x99\xc0\x9e\x27\x13\xd8\x76\x72\x58\xf6\xcd\x93\xd2\x85\x93\xed\x65\x1e\x74\x63\x3f\xb2\xf6\x93\x7f\x39\x54\xfd\xca\x15\x29\x98\x71\x95\x66\x4e\x5f\xa1\x74\x31\x0f\xaa\x0a\xa5\x85\xbc\xeb\x53\x7b\xdf\xca\xd0\x1f\x54\xb6\xb2\xb4\x36\x26\xc7\x1e\x42\x46\x0e\xc7\x1b\x34\x5d\x31\x5c\xa1\xa2\x90\x4f\xc7\xca\xc9\xfb\xb6\xeb\xa1\x15\x4f\xc5\xc1\x2a\x6e\xf8\x38\xe3\x72\x7e\x2d\xe6\x79\x16\xad\x6e\xfc\x73\xc0\xaf\x04\x05\x4d\x39\x16\x9f\x18\xf2\x4c\x2b\xc1\x2e\x7e\x3a\xc6\x0c\x5e\xfa\x4e\x02\xfd\x08\x97\x76\x4d\x31\xfb\xe0\x67\x8c\xa2\xb9\x34\x2c\x7a\x35\x28\xea\x8c\x05\xf8\x83\x38\x4e\xc9\x8e\x05\xa5\xb4\x9c\x8a\xfc\xe2\xa7\xe3\x01\x93\x23\x31\x72\x7f\xf9\xa6\xa9\xc8\x04\x8a\x39\x53\x94\x34\x3c\x7d\x05\x6c\xca\xae\x5b\x0e\xdc\x61\xdf\x5f\x30\xcf\x8b\x5d\x29\xa4\x52\x86\x64\x2f\x43\xfc\x91\xae\xbf\xfe\xfd\x17\x76\x0f\xee\x2a\xbf\x2c\xfd\x4e\xd2\x03\xcc\xe6\x91\xc5\x2f\xe4\x22\x4e\xdc\x86\xf9\x05\x5d\x02\xd0\x23\x65\x04\x4c\x00\xd8\x06\xf1\x8e\x49\xab\xf5\x3f\xae\x44\x1c\x1c\xa2\xf7\x3c\xb7\xa2\x92\x02\x9a\x01\x73\x90\x6a\x10\x4d\x8b\x58\xa4\xcc\xee\x6e\x7f\x12\xd6\x1f\x28\xb5\x66\x99\x56\xd3\x83\xd1\x8d\xba\x51\x47\x41\x9e\x0c\x3c\x09\x38\x2c\x5e\xe2\x88\x0e\xd8\xed\xb0\xf6\xfc\xbd\xa4\x63\xd7\x01\x6b\xfb\x5f\x4a\x97\xff\xcb\x03\x47\xe0\x25\x0e\x59\x38\xee\xb4\x74\x2e\x06\x5c\x01\xe1\xc6\x0c\xe9\x74\x58\xe3\x05\x9b\x4b\x53\xf2\x5b\x31\x62\x57\x64\xd2\xac\xb7\x69\x50\x53\x06\x42\x57\x43\x89\x55\x8f\x63\x97\x5c\x67\xcb\x40\x95\x1e\xa8\x57\x58\x5e\x88\xa1\xab\x50\x48\xad\xe6\x82\xab\x32\x22\xb5\xe5\x9a\x78\x76\xdb\x6e\x86\xdc\x08\xe1\x67\x2f\x55\x23\xf0\x15\x61\x55\x1d\xb7\x4e\x48\x41\xe1\xfe\x40\x1b\xec\x88\x9d\x03\x42\xc8\x5c\x79\x40\x64\x80\x08\xf7\x2b\x91\x58\xd1\xbe\x58\x20\x91\x96\x3e\x93\x49\x65\xc4\xa4\xca\xd0\xe4\x3b\xe7\xaa\x82\x01\x2c\xaf\xa3\x4c\x59\x54\x58\x2a\x9a\xb3\x71\xa1\x6f\x85\x62\x49\x56\x99\x52\x14\x70\x8b\x41\x85\x19\x69\x02\x7c\x01\xd5\x7b\x35\x43\x97\x8b\x5a\xd5\x33\xe7\x29\x9c\x7d\x50\x7c\x86\xf6\x63\x4f\xa0\xab\x99\x75\xc5\x57\xed\x54\xae\x88\xeb\xa0\xae\x8f\x6a\xb7\x24\xb3\x8d\xf4\xe7\x96\x9d\x34\xa5\x50\xe5\x4f\x11\xfc\xd3\x97\x6a\xac\x1e\x65\x19\x39\xb0\xf4\x70\xa5\xd3\x1e\x98\xdd\x25\x22\x5e\xac\xe1\x37\xa9\xcd\xf1\x46\xcf\x05\x3e\x7b\x27\x9c\xd1\x35\xac\x61\xcc\x83\xec\xd0\x52\xdd\x81\xdb\x0c\x92\xae\x08\x7b\xee\x4b\x8b\x47\xaa\xfc\xe1\x47\x76\x6f\xa1\x94\xdf\x0a\x75\x48\x75\x11\xd0\xaf\x25\xc8\xdc\x7c\xe9\x7f\x20\x6e\x3c\x46\xf0\x77\x92\xc0\x96\x25\x01\x48\xfb\x15\x4f\x35\x19\x14\xe7\x91\xa0\x51\x81\xe0\x20\x00\x2a\xfb\xd0\x74\x02\x89\xad\xd2\x9e\xd5\x7a\xa0\xe3\xb5\x8c\x56\x33\x92\x73\xe1\xdc\x46\x2c\x91\x45\x37\x12\x6e\xc8\x36\xa1\xc7\x58\x42\xaa\xc7\x7b\x5d\xc1\xe4\xbd\x97\x49\xa1\x61\x7e\x48\xde\x56\x18\x58\x8c\x29\xf9\x7c\x49\x49\x39\x30\x55\x34\x74\xf5\xa2\xb5\x30\x7b\x95\x05\x38\xb0\xed\xc3\x16\xf4\x04\xd2\x29\x3a\x73\x42\x5e\xa2\x7e\x9d\x5d\x2f\x72\x61\x19\xbe\xd1\xc1\x93\x76\xe0\x16\xdf\x7a\x8e\xd1\xc5\x93\x4c\x10\x04\x75\x79\x24\x31\xd6\xd5\xd3\x4a\xa8\xed\x44\x98\x6d\x8a\x30\x19\x7f\x04\x24\xce\x35\x82\x1f\xf8\xc9\xe0\x3b\x54\x49\x50\x41\xd1\x03\xaa\x07\xd1\xad\x40\x1e\x29\xf8\x63\xaa\x82\x59\x35\xe7\x6a\x68\x09\x39\xb8\x24\x06\x9f\x1d\xdb\x4a\x26\x0a\xb7\x46\x4b\x40\x00\xf1\x46\xf1\xfc\x9f\xa5\x60\x42\x21\xb8\x89\xd1\xb2\xeb\x80\x09\x03\x8f\x3c\x33\xd3\x45\x39\x60\x34\x30\xd4\x35\x2d\xb0\xd2\x9d\x3d\x6e\x7a\x70\xf0\xdc\xa7\xf2\x8e\x28\x1f\x0e\xee\x59\xdc\xb2\xe0\xca\xc0\x52\x6b\x9d\xb8\x3f\x44\x4a\x52\xe8\xd2\x3b\xc6\x4b\xc6\x03\x0b\xbb\xdc\xbe\xc9\x8c\xe5\xfc\x52\x5e\x2c\xdc\x83\xc6\xda\xd5\x85\x80\x9a\x01\x99\x78\x20\x6e\xe0\x11\x79\x23\x1b\xf8\x07\xd9\x1c\xa9\xa6\xc7\xae\x3e\xe6\x6a\xf7\x24\xb8\x6f\x9d\x65\x2e\x0f\x9f\x98\xcb\x12\x24\x2e\x4f\x6e\x06\x4c\x8c\xa6\x23\xf6\x4b\xd3\x87\xcc\xfe\x95\x89\xf2\x97\x25\xc7\x41\x8b\x38\x53\xf6\x22\x62\xfe\x06\x67\x27\x91\x15\x48\x6a\x1e\x4e\x99\x89\x72\xf8\xb0\xf8\x75\x12\x9f\xc9\x88\x42\xc6\x2c\x3f\x27\xbc\xe4\x88\xcf\x61\x0e\xa4\x9b\xd8\x38\xc4\x03\x41\xea\x55\x5d\x40\xcd\x5c\x39\x61\xd2\x5e\xba\x73\x5b\x28\xb5\xc2\xde\x1b\xe5\x97\xb5\x1d\xae\x70\x69\x76\x91\x5e\x4d\xd1\x45\x60\xbe\x8c\x29\xf3\x87\x16\x2c\x70\xc4\xae\xda\x80\xbe\x1a\xce\x37\x5f\xa5\x4f\xf0\x8d\x67\xdb\x59\x23\x55\xa2\x0e\x0e\x6d\x1f\xe5\xa1\x01\xfb\x99\x17\x4a\xaa\xe9\xc1\x00\x62\x43\x00\x99\xb3\xc4\x2f\x17\x64\x7e\x62\xac\x27\x95\x45\x1c\x8f\x36\x6c\x84\xe7\xb9\x5c\x10\x58\x65\xd4\x68\xbf\x94\x9e\x1a\xa9\x9a\x33\xda\x5c\x85\xd5\xb3\x07\x8c\xbe\x4a\xbe\x59\x5b\x64\xc3\x35\x6a\x15\xd8\xb8\x13\xbb\xea\x1a\x9f\x8d\x2c\xb1\xae\xba\xc6\x1d\xd9\xc3\x9e\xac\xa4\x07\x89\x78\x57\x55\x63\x57\x55\xe3\x99\xaa\x6a\x00\x7c\x6d\xab\xa2\x46\x80\xd6\xd7\x21\x38\x6c\xe6\x2c\x5e\x70\xb4\x56\x8c\x06\x8c\xa2\x1c\x65\xf7\x2f\xc9\xab\x93\x3d\xeb\x77\xcf\xcd\x21\x28\xfa\xf3\x5c\x58\xa2\x05\x23\x49\x55\xe9\xca\x64\x0b\xf4\xd9\xd4\x73\x94\x27\xfa\x64\x58\x8f\x6a\x06\xce\xbd\x56\xa0\x16\x3c\x28\xda\x04\x3c\x12\x61\x8d\x55\x5e\xa3\x32\x53\xb2\x99\xe0\x45\x39\x16\x56\x16\x45\x32\xd3\x43\x5f\x60\x3b\x7e\x20\xc9\x7f\x85\xda\x80\xf8\x2b\x98\x26\x94\x84\xa8\xe7\xb6\x54\x06\x1b\x56\xed\x8f\x11\xd7\x95\xf0\xb1\x3e\x99\x7e\xdd\xcc\xc1\x87\x69\x00\x08\x68\xcf\x49\xe9\xd7\xe7\x72\x97\x32\xce\x9e\xa7\x46\x14\xd7\x56\x7f\x48\xc3\xa6\x42\x59\xd9\x6d\x89\x13\xd5\x4c\x9b\x18\xd8\xe8\xd4\x59\x31\xd4\xa6\x63\x6e\x54\x73\xf9\x41\x24\x47\x5e\x1f\xb9\xf4\x34\x7d\xab\x46\xf5\xf5\x9b\x3d\x4a\x2d\xe3\x6d\xce\x37\x7b\x24\xb2\xf4\x3a\xd2\x78\x2c\xe5\x31\x7e\x70\xc6\x15\x6a\x07\x1e\x6c\x98\xf8\x1a\x82\x2a\xad\x5c\x20\xd3\x96\x5f\x1f\x6a\xf9\x3b\x2e\x3c\x5e\xa4\x73\x63\x81\x12\x5d\xeb\x92\xed\xbf\x38\x7c\x71\xd0\x71\xc3\x69\x39\x3c\x5d\x07\x3d\xed\x9b\x95\xf3\x3c\x5b\xc0\x3a\x5e\xa4\x03\x26\xbd\xfd\x04\x0f\x03\x56\x45\x91\x9e\x03\x66\xb4\x95\x23\x53\xe9\x24\x3e\xfb\x2b\x88\x34\xa0\xee\xd7\xca\xb0\xfd\x17\xff\xf7\x0b\x4a\xf3\x73\xaf\xd5\x8b\x12\x96\x3f\x62\xd7\x1a\xbc\x0b\xfd\x40\x0b\x5d\x31\x25\x04\xe5\xfe\xce\x33\x99\xc8\x32\x5b\xb0\x84\x67\x19\x03\x89\x46\x23\x4e\xa3\x08\xd3\xd3\x07\x59\x06\x2a\x84\x97\xe8\x56\x8d\xd6\x12\x6e\xa0\xc6\xee\xe1\x4c\xf0\xac\x9c\x39\x23\x82\x1a\xfe\x2a\x0a\x0d\xc1\xa7\x8a\xbe\xac\xf2\x10\xe8\xc0\xdc\x06\x40\xf7\xf6\xf8\x31\xa6\x5a\xf6\x56\x8e\x0b\xc1\x8e\xc9\xbf\xdc\x59\x1e\x63\xbf\x62\xe5\x6a\xb0\x90\x8c\x85\x77\xf7\xa5\x82\xc6\x68\x2e\x05\xab\xce\xb2\xde\x2e\xb3\x11\x18\x85\xcc\x4c\xe6\x6c\xce\x15\x9f\x62\x49\x5b\x7b\x5c\x57\xa7\xef\xa4\xaa\x1e\xa0\x20\xf0\x58\x64\x24\x64\xad\x06\xf8\x89\xb9\x8e\x4a\x53\x6f\x3d\xa8\x61\x78\xbf\xf3\xc4\x0b\xab\xe4\x4c\x5a\x6d\x7c\x65\x04\x67\xe2\xb2\x58\xc4\xe9\x88\xd4\x94\x39\xd0\x3d\x7d\x18\xb1\x9b\x3d\xf1\x50\x7e\x8d\xe5\x62\x1f\x26\x06\xff\xa1\x4a\xfb\xaf\x11\x3b\x9b\x7b\x50\x02\x66\xad\xf0\x9e\xcd\xae\x9b\x95\x7e\x2b\xe5\x9d\xdf\xa2\x38\x2c\xab\x22\x32\x41\xed\xc6\xfd\xf6\x98\x12\x62\xb1\xac\x52\xa4\x27\xef\x47\xd5\x96\xdb\xcf\xeb\xd1\xd7\x58\xc5\xd9\x25\x8d\x81\xb9\x07\xc0\x44\x36\xd1\x05\x99\xf4\xfc\x47\x23\x4a\x38\x39\xa9\x58\xe0\x25\x66\xe2\x46\x75\xdc\xcd\xcf\x3f\x9f\x47\xd8\xf7\xd8\xb6\xef\x75\x91\xa5\xf7\x92\x50\xba\x61\xfb\xb6\xeb\xc1\x46\x21\xbe\xf7\xf7\x32\x5d\x37\x1b\x19\x5d\x61\x36\x06\xd3\xd5\xc5\xb7\x0c\xdb\x87\x21\x0e\xd8\xa9\x44\xab\xb9\xfd\x8b\xe9\xc2\xa2\xb6\xb1\x73\x49\xb6\xec\x81\xdf\x1b\x40\xba\xbd\x31\x17\x76\x06\x21\x29\xe3\x8a\x8c\x82\xe0\x30\x2d\xe7\x55\x56\x72\x25\x80\x65\x7a\x36\x7c\x91\x89\x87\xb6\x2d\x70\x3d\xee\x58\xde\xab\x59\x5d\x07\x48\xa9\x4c\x58\xee\xdb\xba\x83\x0c\x64\x1d\xb4\x92\x7b\xdf\x07\x91\x1e\x52\xec\x47\x60\xfd\xb6\x14\x81\x8d\xb9\x11\x29\xcb\xb3\x6a\x2a\xa3\x44\x30\x14\xb4\xd1\x8b\xa4\x2b\x69\xd3\xef\x5d\x05\x16\xfc\xde\xf0\x3a\x20\x7e\x0e\x7b\x80\x5d\xdb\xb8\x42\x41\xd2\x38\x1c\x19\x7b\xb2\x9f\x25\x36\x82\xbc\x08\xe4\x43\x1b\x4c\x92\x02\x9c\x18\xcb\x0a\xd9\x4b\xc5\xab\x64\xb8\xea\xe8\xe6\xb0\xf8\xdc\xca\xe7\x72\xfa\x50\x16\xdc\x93\x75\xea\x60\x71\x1d\x57\x8b\xd8\xbd\xf1\xd4\x11\xf1\x8b\xc6\x5d\x75\x5f\xea\x67\x8a\xb3\x56\x14\xca\xab\xd7\x75\xe5\x1a\xa1\x9b\x41\xcb\x19\x82\x0a\xe2\x90\xd0\x4f\xec\x12\x5c\xb0\x00\x4d\xf9\x9d\x68\xb0\xd8\xa5\x66\x39\x37\x5e\x4b\x83\x6f\x82\xae\xcd\x50\x58\xab\x2b\x4f\x02\xa1\x0f\x72\xc2\x94\x6e\xcd\x12\x06\x3d\x53\x14\xd3\x92\x85\x18\x54\x9d\x43\xb8\x8c\x56\xae\xd1\x00\x4b\x24\xc3\xbf\xa9\x2e\x32\x37\x26\x08\xa0\x6c\xae\x6a\xe3\xb2\x3e\x81\xa2\xbd\xa7\xb8\xdc\xee\xb7\x44\xd0\xa9\x21\xbd\x1f\xaa\xfb\xc9\xe1\xac\x08\x6a\xdb\xe1\xb3\x1d\x3e\xdb\xe1\xb3\x1d\x3e\x5b\x9d\x46\x41\x27\x3c\xeb\x58\x0f\x7b\x22\xb5\x68\xe7\xa5\x98\x0d\x32\x75\x3c\x4e\x06\xc4\xbe\x0e\xa3\x39\xd1\x8e\xde\xa9\xfb\xca\xa7\x60\x27\xfb\xa0\x04\xf0\xb0\x20\x08\x6a\xcc\xc1\x91\xf2\x92\x1b\x01\x95\xfb\xe0\x1b\xfd\xfd\xf1\xe3\xd9\x49\x60\x40\x86\xca\xee\xcd\xb9\x0c\x4b\x35\xc6\x01\xad\x12\x0e\x75\xf1\x28\xd9\x30\x58\xd5\x6a\xd3\x2c\x35\x04\x47\x64\x14\x69\x9d\x7e\x99\xa1\x1b\x6b\xad\x35\x0a\x9b\x5b\x0c\xea\xb6\x53\xef\x32\xd1\xa0\xad\xa0\x81\x52\x7b\xce\x10\x89\x1a\x43\x41\xc1\x39\x75\x57\x08\xa7\xd7\x5c\x61\x5d\xad\x8b\x92\x55\x04\x75\x80\xa1\xba\x9e\x5b\x0e\xb5\x7f\x9a\x1a\xeb\xfb\xe3\xd3\x9a\xd5\x3f\x91\xe6\xf6\x51\xc0\x55\x0f\xc1\xec\x18\x35\xbd\x94\x8a\x7d\xaf\xf5\x34\x13\xec\x58\xcf\xf3\xaa\x14\xec\x54\x4d\xa5\x12\xe8\x61\xcb\xbe\x3f\x3e\x65\x17\x27\x28\x26\x81\x7f\x28\x1b\x8b\x89\x7d\xbb\x00\x9e\xe4\xb3\xc7\xdb\xb9\x85\x52\x3b\x05\xf4\x81\xc8\xc7\xb1\xf7\x38\x34\xf6\x02\xed\x98\x79\xa1\x01\x21\x58\x38\xfd\xd5\xc2\x2f\x47\x4a\x49\x26\xf0\x11\xf3\x53\xf7\x53\x77\x60\xb1\x39\xe7\x3b\x3a\xe7\x6a\x81\xae\x6a\x23\x1a\x66\x6b\x8a\x8f\x90\x29\xc8\xd3\xf3\x68\x1e\xbf\xbe\x04\x9b\xc0\x2a\x74\xce\x5f\xe8\x8a\xdd\x93\xab\x2f\x11\xf3\x6b\x99\xbf\x61\xa7\xca\x54\x45\x90\xb7\xba\x4d\xd7\xa5\xd9\x80\xb4\x83\x37\xb5\x79\xb3\x6d\xf5\xc9\xa6\x99\x78\x28\xe2\xe0\x90\x90\xd0\x17\xd3\x44\xd4\x82\xaa\x05\xa1\x68\x16\x17\x5e\x94\x32\xee\x64\x0a\x8e\xfa\xee\xb3\x83\xb8\x35\x87\x7b\x36\x61\x1a\x5d\x40\x50\xc1\x9a\xd6\x71\xb8\x3e\x6c\x74\xbc\x60\x81\x83\x7c\x78\x80\x6f\xb5\x47\xd7\x10\x65\x6e\x52\xfe\x0a\xf5\x99\x78\x2a\xe4\xa3\xed\xd7\xc4\x0d\xbb\xd9\x7b\x65\x4f\xf7\x4a\xce\x65\xc6\x8b\x6c\x31\x08\x57\x59\xb7\xb4\x58\xcd\x0d\x69\x17\x73\xb3\xf7\xf2\x66\x8f\xed\xeb\x02\x46\xb7\x6f\x22\x13\xfc\x8e\x7c\xb7\x11\xf8\x16\x48\x9a\x0f\x9e\xf3\x1e\x56\x29\xb4\xe8\x35\x74\x31\x28\x22\xc9\x46\xdc\xc2\x49\x13\x01\x1d\x9f\x8e\xd8\x47\xa2\xf4\x84\x4c\xf1\xe8\x00\x91\xb8\x16\x9f\x02\xbc\x96\x73\x84\x4f\xe3\xf3\xba\x6c\xe4\x73\xee\xc7\xf3\x92\x1b\x11\x1a\x59\x5e\x8a\x5c\x3f\x8a\xbc\xb4\xe2\x8b\x7c\x76\x83\x3a\x80\x25\xcc\x69\xc0\xd9\x54\xa2\x03\x90\x91\x18\x87\xfc\x3d\xfd\xbd\x09\x43\x12\xe9\xe5\x9a\x47\x50\xb9\x25\x67\x27\xa7\x17\x97\xa7\xc7\x47\xd7\xa7\x27\x6f\x18\xed\xd6\xae\xb6\xe6\x0e\xc0\x36\x51\x47\x01\xf1\x46\x32\x1a\xc8\x15\xe7\x16\x3e\x20\xdc\xc0\x15\x3b\xb5\xaf\xee\x44\x16\xe8\x4a\xc7\x15\x3b\x53\xb2\x3c\x6e\x96\x7b\x4d\x32\xad\xbc\x2b\x5e\xae\x49\x10\x9d\x4a\x2c\xca\xa0\x68\x30\x70\xdd\x6a\x8c\x46\xa1\xb5\x2f\x4c\x34\x3c\x3f\x4a\x94\xea\x63\x8d\x48\xab\xce\x6c\x14\x41\x9e\xa8\xce\xad\x0d\x4b\x94\x66\xce\x05\x4a\x38\x4b\xb4\xa6\x0c\x32\x78\x20\x2f\x46\xa3\x17\x23\x66\xb1\xe8\x8b\xd1\x0b\x47\x84\x32\x1f\x48\x4e\x60\x51\x0f\x1a\xc6\x44\xb5\x61\x80\x7d\x70\x69\xde\x06\x96\xb2\xb4\x62\xd2\x9d\x02\x58\xd6\x19\x40\x22\xa3\x78\x3e\xa3\x1a\x87\x93\x12\x0c\x4e\xe5\x9d\x50\xb8\xb1\x65\x6e\x7c\x74\x72\x31\x68\x77\x53\x7c\xbc\x7c\x17\xef\x8d\x50\x13\xb7\xfa\x61\x48\xca\xcc\x9b\xeb\xea\x94\x68\xae\xdf\x13\xad\x9d\xdf\x63\x2c\xc7\xc4\x6c\xae\x4d\x6e\xbc\x64\x3f\x8e\x87\x49\x5e\x82\x4d\xdd\x65\x93\x98\x88\x92\xac\xed\x1c\xa3\xd2\xea\x1e\xcf\x22\x4d\x34\x42\xc4\xc9\xc1\xc6\x58\x29\x83\x97\xb3\x2e\x84\xd7\x2d\x22\x89\x6c\xe9\xd3\x39\xc5\x9b\x35\x5c\x76\xea\x90\xb1\x54\x94\x5c\x66\x26\xd8\x57\xa9\x73\x9d\xe9\xe9\x22\x8a\xb2\x29\x38\xcd\x38\x67\x17\x3a\x84\xc3\xa9\xeb\x7e\x78\x79\x7a\x74\xf2\xfe\x74\x34\x4f\xbf\xc0\x60\xa4\x21\x1f\xe6\x3a\x2a\x89\x88\x70\x89\x58\x8b\x7b\xf5\x36\xa0\x4d\xa8\x65\xc2\x1f\x10\xe7\x38\x59\xbb\xde\x88\x1b\x3f\xc8\x99\xe4\x02\xaf\x80\x77\xc0\xa7\xe6\x66\xa8\x27\x48\x03\xe2\xe5\xd9\xf8\x7a\x3a\xe2\xdd\xc7\xba\x52\x10\xb0\xf6\xec\xe7\x94\x47\x93\x2b\x41\x62\x1c\x3a\x8b\x36\x50\x32\xdb\xe5\xd9\xd7\xf5\x48\xee\xa1\xb3\x58\xe4\xb3\x9d\xb4\x03\xf8\xab\x16\x6e\x72\x51\xcc\xa5\xcb\x03\xd6\x8f\xad\x78\xfa\x1e\x1f\xc7\x51\xb8\xe1\x77\x98\xe8\xf7\x86\x89\x76\x2f\xec\x77\xf1\xc2\x7e\xb8\xbe\xbe\xf8\x5e\x94\xeb\xdd\x9c\x1a\x0d\x43\x4f\x27\xe5\xc2\x32\xd1\x1a\xa2\x15\xb3\x4d\xd9\xf7\xa2\xf4\x2e\xab\x6b\xd5\x20\xba\x88\x84\x82\xc6\x9d\xbf\x7e\xd0\xc6\x41\xb8\x66\x94\x15\x90\x95\x7a\xd0\x21\x31\xb9\x4e\xd9\xd9\xc5\x88\xfd\x5d\x57\x96\x23\x1f\xf3\x71\xb6\xf0\xc2\xbb\x11\x25\xbb\x81\xb1\x6e\xf6\x2c\xcb\x67\x6f\xe1\x07\xc1\x53\x51\x18\xf0\x40\x12\x7c\x89\x43\x5a\xdd\x2e\xc2\xa6\x55\xa6\xd4\x73\x36\xa3\x71\x9a\x59\xc4\xe9\x2c\x46\x78\x3a\x54\x66\xa2\x10\x39\xba\x1d\x51\x9f\x6d\xa4\x1d\xb1\xe3\xe3\x12\xc1\x42\xb1\xe2\x1d\x5a\x61\x03\x73\xba\x91\x46\x14\x96\x86\x61\x87\x4b\x13\xe0\x2e\x53\xc1\x16\x61\x8c\x27\x1c\x7f\x51\x76\x67\x08\xd4\x7c\xe4\xfc\xe9\xfc\x27\xdc\x31\x71\x35\x15\xec\x95\xed\xf9\xfa\x9b\x6f\xbe\xfa\x66\xc4\xce\xc3\xe4\xbe\x56\x38\x3a\x3a\x3f\xfa\xc7\xd5\x4f\xc7\x90\xff\x7e\xe3\x58\xb4\xaa\x94\xd9\xc8\x62\xce\xb2\x18\x9d\xa9\xf2\x43\x71\x55\x87\xc6\x58\xc8\x8f\xf0\x4b\xf0\x22\x44\x68\x6f\x23\xb0\x0b\x02\x8e\x2d\xac\x36\x5f\xba\x3d\xcb\xc7\x67\xa6\x0a\x2e\x71\xb9\xef\xb0\xdd\xcb\x61\x64\x2f\x4b\x4c\x0b\xc1\x98\x6b\xde\x39\xb6\x6a\xb8\x33\x26\x21\x6c\x87\x69\x04\x24\xbd\xf7\x1c\x12\xce\xf6\xa9\x5a\x32\xd8\x03\x1f\xfa\xee\x83\x8f\xe7\x86\xbe\xb6\xc7\x8b\xd3\x22\xaf\x49\x83\x74\xa0\x13\x47\x5d\xdf\x1f\xdb\x3d\x49\x56\xfa\x01\xd2\x9f\xac\x3e\x47\x6c\xe2\x43\x3e\xb8\x93\xd8\x12\x87\x2f\xc9\x25\xd1\x19\x1c\x20\xa2\x7d\xad\x31\x44\x3c\x88\x24\x62\xd4\x8b\x18\x73\x40\xc9\xab\x2d\x9e\x01\xdd\x6d\x6d\xbe\xa9\xd5\xad\xa7\x0f\x22\xf1\x7f\x23\x51\x76\x6b\xd3\xb0\x9e\x8d\xa2\xa3\x6a\x6f\x59\x42\x94\xdf\x8b\x18\xfe\x46\x3a\xd2\x9a\xd6\x36\x77\x28\x12\x6c\x89\xa2\x98\xe8\x62\xbe\xc9\xfc\x4d\x4a\xf6\xaf\xc1\x5e\x99\xe4\x57\x3a\xb9\x8d\x2d\xe2\xfa\xf8\x02\x3f\x05\xcb\xa8\x09\x19\x06\x45\x63\xbe\x89\xeb\xe3\x0b\x40\x65\x23\xf8\xd7\x4c\xeb\x5b\xf4\x67\x5d\x88\xb2\xd6\x97\x6f\xb0\x4a\x3f\xb3\x5b\x67\xdf\x38\x82\xfa\x74\x7b\xd0\xf1\x68\x93\xf6\xd4\xcb\xd0\x84\x36\xe5\x51\x26\xf9\xca\x10\x03\xdf\x88\xcd\x74\x96\xe2\x1d\xce\x79\x9e\xdb\x43\x1b\x8b\xf2\x5e\x08\xc5\xce\x2e\x00\x26\x2d\x6a\x44\xcf\x3e\x8c\x2b\x20\x05\x0e\x96\x06\xa9\xeb\x3d\xa8\xb2\x56\xbe\xe4\xa0\xb0\xb2\x1d\xd1\xd9\x78\xbd\x8d\xd0\x4f\x12\x5f\x2a\xce\xef\x54\x27\x7c\xac\xef\x04\x2c\x2f\x4d\x0b\x61\x56\x52\xdd\xae\xc9\x5f\x46\x22\xab\xeb\xb1\xdc\xcb\x03\xd3\x09\x24\x2f\xc5\xd4\x36\x4f\xc4\x37\xda\x40\x4a\xc7\x47\x89\x41\xb0\x14\xcb\x06\xc0\x0d\xb9\xd4\xbe\x24\xf1\xfc\xe0\x3f\x3e\xbb\xc4\x13\x97\x72\x56\xf0\x27\xce\x68\xea\xf5\x70\xc4\x44\x20\xb1\x25\xf7\x80\x9c\x24\x0a\xce\xcc\x62\x9e\x49\x75\x0b\x5e\xe7\xc4\xbd\x5b\xec\x47\xb2\x9e\xba\x75\xb4\xba\x10\x3c\x5b\x2e\x6b\x6c\xa2\x40\xb7\x0b\xc9\x31\xd3\x66\x37\xff\xeb\xf2\xe8\x50\x0b\x87\xee\x46\x49\xc9\xdf\x60\x1d\x6e\xf6\x6e\xf6\x9e\x6f\x69\x9b\xc0\xdd\xd9\xd5\xf1\xd5\xd9\xe6\xfa\xc0\x15\xdd\x1a\x3e\x58\x8a\x41\x4b\x30\xd2\x8c\xe8\xdf\x9b\x3a\xa9\x37\x7b\x3d\x83\x8d\x16\x7d\x7e\x2f\x74\x51\xf2\xcc\x62\x86\x7f\x5a\xf4\x9a\x55\xaa\x0b\xca\xc9\x8c\xe7\x47\x55\x39\x3b\x91\x26\xd1\x77\x22\xa6\x05\x76\x35\x97\xdc\x3a\x25\xac\xde\x77\x60\xc7\x3f\x1c\x5d\x30\x5e\x95\x33\xa1\x4a\x2a\x96\x14\x75\xf0\x71\x53\x5d\x61\x3e\xf7\xbe\x13\x51\xf3\xde\xd3\xec\xec\xd0\x8f\x7a\x7c\xd2\x24\x46\x46\xa3\x5a\x2d\x67\xc0\x4b\xbd\xa4\xcc\x36\x09\x90\x78\x57\x67\xae\x2d\x48\x40\x80\xef\x1a\xdd\x1b\xde\x52\xa8\x80\x80\x79\xcf\x54\x29\x8a\x09\x4f\x44\xcb\x01\x1d\x83\xce\x71\x6c\xe9\xdb\x60\xfa\x36\x72\xc5\xcf\x01\xc8\xd1\x55\xe6\xcd\x92\xc4\x6e\x9e\x80\xbb\xfc\x62\x75\xfc\x10\x0a\x45\x4b\xb2\x70\xd8\x77\xb3\xcc\x66\x84\x8b\xfa\xcf\x8a\x67\xb8\x99\xf3\x65\x06\x96\xe6\x06\xbb\xe3\xb9\x93\x73\xbb\x3b\xf7\x9a\xb0\xca\x20\x8b\x87\x2d\x20\x7d\x05\xb2\x75\x21\xe2\x7d\x41\x3a\x84\x17\x6c\xbf\x4c\xf2\x83\xfe\xe1\x1c\x38\x2a\xed\xe6\x9d\x8f\xe3\xe8\x99\xce\x08\x8f\x3d\xc2\xba\x34\x86\x45\x0c\xc4\xde\x49\x43\x55\x1b\xe9\x07\x69\x98\xc0\xa8\x05\x0e\x3c\x97\x2e\x98\xcc\xff\x61\xd9\x91\x37\xf8\xf2\x03\x79\x5c\x1a\x2c\x85\x84\x8e\x73\xce\x55\x61\xbf\x5c\xe4\x32\x81\x7c\x6b\x8e\xdd\x35\xec\x2f\xaf\x5f\x02\xc2\xfc\xea\xcb\xd7\x2f\x0f\x36\xe3\x90\x3e\xa1\x09\x7c\x53\xef\x47\x40\x7c\xe8\xf8\x88\xf9\xd5\x11\x1c\xf0\x84\x21\x86\xcd\xbf\xba\x0e\x7a\x7c\xb4\xef\xf3\xa0\x49\x43\xfa\x5c\xf3\x6f\x79\xc3\x1b\xaa\x2a\x7a\xba\x6c\x03\x9d\x7e\x5c\x16\xd2\x1d\x93\xb0\x63\x12\x76\x4c\xc2\x8e\x49\xd8\x31\x09\x9b\x33\x09\xf9\x8e\x49\xf8\x2c\x99\x84\x78\x40\xc1\x1f\x9b\x53\xd8\x24\x0e\xe2\x47\xb1\xb8\xd6\xae\x04\xd6\x32\x36\xe1\x3d\xcf\x83\xcc\x3c\xb7\x62\x81\xbe\xe4\xa0\x12\xf2\x05\x69\x3b\x71\x51\x51\x02\x7e\x2b\x16\x4b\x0d\xf1\x90\x99\x3f\x66\x56\xa0\x19\xc9\x15\x3d\x9e\x7c\x50\xa7\x11\x14\x54\x07\xe1\xd8\xef\x6c\x2c\x4b\xe3\xf3\x8b\x1b\x8b\x63\x6b\xfb\x31\x2a\xbd\x24\x29\x42\xeb\xc0\x2c\xc5\x74\x52\xba\x7c\x4e\x5e\xe7\xfa\xf2\xe5\x4b\xbc\xaa\x97\xdf\x7e\xfb\x2d\x83\x24\xd8\xa9\x48\xe4\xbc\xdb\x10\x5a\x7d\xf3\xea\xd5\x88\xfd\xfd\xe8\xfd\x3b\x5f\x80\x0d\x22\x97\x71\x64\x88\x00\x09\x3b\x9b\x01\xfb\xdb\xd5\x87\xf3\xba\x0e\x51\xf3\x2b\x65\xe8\xa3\xfd\x2c\x2b\x0d\xe3\x3c\xfa\x10\xde\xde\xdb\xe6\x61\x45\x18\x17\x2a\xe4\x0a\xc2\x60\x02\x8d\x49\x26\x13\x72\x18\x44\x98\x75\x31\x5c\x80\xb6\xf9\x64\xe2\x32\x84\x83\xc6\xd5\xae\x61\xc0\x32\x79\x2b\xd8\xc4\x7c\x5f\xe8\x2a\xf7\xa5\xe7\x5c\x19\x40\xaa\xb3\x8d\x83\xd5\x77\x60\x44\xd9\x17\x1d\x47\xd5\x96\xd7\x30\x43\xc6\x21\x3c\x2a\x0f\x74\x98\xae\x34\xdb\x9c\xe7\x18\xa5\x00\x90\x33\x62\xef\xeb\x2a\x14\x5c\x31\x3e\x36\x3a\xab\x4a\xef\x09\x41\x1f\x43\x6f\x45\x18\x54\x64\xc8\xab\xa2\xf3\xa4\x6b\x16\x78\x55\x62\x8e\x4c\x78\x15\xd0\xe6\x69\x5a\xc0\x77\x61\xed\xda\x65\x6f\xb1\xae\x62\x1b\x98\x0d\x93\xe0\x96\xd0\x44\xe0\xf9\x6c\x62\xe7\xc8\x2e\x05\xe5\x92\xa5\xb2\xd7\x93\x6b\x65\x9c\x71\xdf\x95\x0a\xf3\x63\x53\x92\x36\xf0\x9b\x47\xd7\x56\x53\x42\xee\x74\xb8\xe0\x8b\x42\x5c\x95\x3a\x0f\xda\x63\x9d\x82\xc2\x0c\x1a\xda\xeb\x49\xd3\x16\x8d\x49\xd6\x4d\x90\x63\xdd\x19\x82\x0c\x25\x9b\x2c\xc5\x80\x55\x0a\x0a\xa7\x37\x7b\x52\x59\x40\x28\x88\x06\xe5\x65\x29\x1f\x4d\xc2\xa9\xfa\x19\x2d\x80\xb2\xe5\x16\xcd\xa4\x34\x4b\x8c\x19\xb9\xdb\x54\x44\x2f\xee\xf7\x6b\xd7\xc6\xb3\x4c\xa4\x4c\xce\xe7\x22\x95\xbc\x14\xd9\x82\xd2\x97\xf3\x66\xa5\x43\x97\xc1\xdc\xa9\xcc\xdd\x9a\x68\xd1\x65\xbb\x32\xa2\xab\xc3\xe6\xcb\x29\x52\xa1\x44\x8b\x24\xb4\xcf\xb3\x8d\x39\xc9\x10\xe8\x7c\x2d\x67\x7c\x4f\x9b\x1c\xf5\x4c\xeb\x5b\x7f\xca\xf1\xa4\x73\x3d\x8b\x31\xfb\x7f\x0e\xfd\xfd\x0f\xc1\x60\x77\xf8\x45\xfd\x09\x7e\xd8\xc4\xaa\x48\x96\x5e\xfb\xe4\x11\xba\x22\x97\x42\x60\x17\xbf\x12\x0a\x77\xe2\x4b\xcf\x38\xad\x00\xdc\xb9\x62\x47\x17\x67\xde\x08\xaa\x1b\xe7\x48\xf9\xd7\xa9\x78\xa2\xab\xe3\x7c\x48\x35\x60\xd1\xf8\xee\xaa\xf2\x0d\x58\x5e\x08\x31\x87\xd5\x0d\xea\x30\x09\xf2\x9f\x87\x1f\x45\x99\x20\xdf\x10\x80\x27\x60\x1a\x5a\x7e\xfb\xd6\x92\x82\x9b\x19\xd6\xcb\x13\x0f\xb2\xa4\x3a\x8b\x61\x4e\xd8\xa0\x74\x9f\x34\xad\xb0\x4b\x9a\xc4\x71\x2a\x69\xab\x18\xe5\xb4\xb0\x5c\x78\x2e\x0a\xa9\x53\x06\x99\xc2\x52\x7d\x6f\xd1\xf3\x54\x2a\xe3\x8e\x0f\x1e\x3b\x9d\xb3\xbd\x43\x81\x3e\xa7\x98\xef\x28\x1d\x51\xc6\xf7\x2c\xb0\xc0\xe9\xaa\x4c\x74\x1d\x31\x42\x8b\x68\x83\x3b\xd0\x1e\x38\x5d\x2c\x38\xe0\xef\xc5\x31\x10\xe5\xda\x35\x6f\x01\xec\xed\xc1\xd6\xdf\x96\x1e\x0e\x96\x37\x48\x66\x4f\x2b\x5a\xfe\xbc\xef\xa4\xaf\x83\x0b\xb5\x5f\xc2\xfe\xbd\x93\x73\x59\x5e\x72\x35\x5d\x43\x73\x5c\x2b\x4b\xb9\x4d\x0d\xeb\x15\x56\xfe\x94\x90\x38\x11\x0a\x80\xf0\x64\xc6\x6e\xa5\x4a\xed\xd5\x84\x91\x43\x9c\x79\x27\xe5\xf5\x88\x79\x97\xe5\x73\xcb\x59\x3e\x77\x39\x37\x3f\x69\xce\xcd\x3f\x44\x9a\x73\x2b\x4f\x44\xf6\x98\x8b\xa4\xf1\xf0\xe8\xf1\x0b\x05\xba\x83\x38\xc2\xdc\xe6\x4e\xed\xb2\x86\x5c\xa5\x43\x4c\x2c\xb7\x89\x2a\xc0\x63\x31\xbb\x89\xfe\xd2\x74\xb3\xdb\xd6\x4a\x86\xd5\xe3\x9e\x95\x62\xde\x0f\xfd\x9e\x61\xe6\x0e\xe7\xe9\x36\x97\xea\x70\xce\x1f\x42\x34\x4c\x39\x25\x17\xad\x3c\x2b\x73\x5e\x42\x8d\x70\xad\x00\x3b\xaf\x55\xb3\xdb\x6f\xdd\xa0\x34\x94\x25\x23\x39\x54\x48\xa9\xe1\xe7\x2c\xea\x62\x9a\xb4\x2c\x92\x8a\x83\x75\x61\x31\xa9\x80\x4a\x60\x43\x8b\x5c\x30\xce\x77\x93\x8c\x21\x9b\x02\xfd\xc8\xd7\xba\xfc\xcf\x8a\xab\x52\x96\x0b\x50\x96\xd1\x0e\x2f\x11\x1d\x2d\xdd\x28\x7d\x77\x0e\xf6\xe9\xaa\xed\x3b\x3e\xb3\xc7\x01\x14\xf5\xb0\xbf\xdd\x11\xcc\xf9\x43\x4c\x01\xe4\x80\x0c\xcb\x44\x71\x09\x01\xa2\xa4\x31\x01\x7a\xdf\xde\xd9\x6f\xb3\x74\x7c\x2a\x78\x8e\x97\x96\xe2\x47\xf7\xd2\x69\x15\x09\x63\xb4\x7b\x48\xeb\x2d\x81\x63\xf4\x8c\xdf\x09\xa8\xd8\x84\xf7\x84\x19\x41\x2d\xd0\xa2\x7a\xa4\x10\xa8\xd6\xf1\x79\x2c\xb1\x86\x13\x36\x49\xe5\x9d\x4c\x05\x9d\x93\xbf\x67\x12\x75\x39\x84\x6b\x8a\x7f\x56\x3c\x73\x9c\x86\x50\xd5\x1c\xb3\xab\x22\xe8\xfc\x7b\x8b\x9d\x71\xbe\x80\x0f\x6c\x5c\x15\xa6\xf4\x9a\xff\xe6\xba\x7f\x8b\x5b\x90\x11\xae\xed\xbd\x54\xbf\x03\x00\x5a\x5d\x69\xa0\x89\x51\xa9\x08\xaa\xbd\x5a\x0e\x91\xb4\xc0\xbc\x6c\xaa\xb3\xed\x50\x90\xc3\xee\xca\xd6\xd2\x8f\x75\x89\xf8\x9b\x2d\x9b\xd9\xf8\x03\xd6\x1e\x8c\x08\xbb\xbc\xfc\x9f\x07\xc7\xbe\x24\x2f\xbf\x65\x00\xcc\xd2\x1b\xc4\x43\x7a\x94\x72\xa7\xae\xf8\x79\x88\xf2\xf5\x30\xc1\x2c\x33\x43\xbf\xcc\xa1\x97\x5a\x0f\xb7\x10\x3e\x13\x48\x9e\xbb\xaa\x00\xbb\xaa\x00\xcf\x53\x15\x20\x00\xb2\x2d\x95\x06\x68\x49\x03\xbd\xb0\x6e\x43\x66\x5a\xce\xb5\xfb\x87\x16\xb0\xec\x7d\x19\x76\x94\xc2\xba\x78\x99\x7e\x8f\x2f\xce\x38\x06\xb6\x8b\x4a\x40\xd0\x20\x74\x52\x73\x37\x5e\xc8\xdb\xea\xfb\x07\xf1\x27\x96\x8c\x77\xcd\x95\x42\xbf\xa5\xd7\xb4\x8e\x24\x5a\x76\x0e\x42\x2a\x6a\x4c\x4a\xfb\x1d\x90\x6d\x21\xa8\x5c\x7e\xab\x40\x53\xba\xa0\x44\x79\xc5\x92\xba\xcb\x3b\x42\xf9\xd9\x10\xca\x77\xcd\x3b\x7d\x3c\xc0\x36\xd1\x51\x51\x29\xa8\xc4\x71\xc9\xef\x4f\x1f\x4a\xa1\x0c\xc6\x16\xed\xe8\xd7\x8e\x7e\x6d\x91\x7e\xf5\xa1\x4f\xcb\xe9\x59\x14\x46\x97\xe1\x49\xcd\xd3\xef\x78\xc6\x55\x22\x8a\x33\x35\x2d\x84\x59\x19\x8e\x16\x69\xde\x96\x48\xeb\x7a\x0f\x9c\x65\x9a\xa7\xc3\x31\xb5\x67\x92\x3a\x00\x8c\xbe\x61\x65\xc1\x27\x13\x99\x00\xc2\x51\x69\xe0\xbb\x66\xf1\xab\x4c\x44\x23\x13\x26\xba\x2e\x72\xd5\x1c\xa4\x7f\xbc\xda\xf2\x70\x35\xf0\xdc\x23\x07\xa4\x15\xeb\x0d\xa8\xe0\xc9\xf9\x15\xc5\xe0\x07\x4e\x3c\x47\x3f\x5f\x35\xbb\x87\xa9\xf5\x03\x6c\x15\x0f\x6a\xdb\x78\x0d\x67\x17\xdd\x25\x7c\x7f\x7c\xca\x74\xc1\x3e\xe4\x42\x5d\x95\x3c\xb9\x5d\xbf\x9e\x8d\x9c\x13\x82\xab\xbf\x42\xd5\x6b\x4f\x40\xc1\xd6\xbd\xe1\x64\xfd\xa5\xca\x1a\x50\x5b\x27\x49\xa7\x55\xcb\x47\x41\x3e\xdd\xd6\x51\x3a\x68\x6b\xce\xcd\xae\x37\x87\xca\x72\x26\x8c\x68\x0d\xbf\x15\x0e\x29\xf2\x36\xfb\xb3\x49\x91\xce\x4b\x71\x40\xc4\x5d\x6c\xe5\xdd\x76\xdb\xd7\x39\x8c\x84\xd2\xd5\x74\xd6\xce\x59\x9c\x09\x74\x42\xce\x74\xc2\x4b\x41\x1e\x42\xd4\x37\xf5\x69\x89\xeb\x6a\x3a\xcd\xbc\x45\xeb\x41\x22\xfe\xc6\xc3\xa4\xb5\x34\x5d\xb9\xb1\x70\xac\xef\xec\xcd\x8b\xfb\x43\x2a\xe9\x33\xbc\x97\xe5\x6c\x48\x7c\xc5\x21\xac\xf1\xf0\x0b\x8c\x89\x7d\xe2\x03\x4b\x78\xd6\xd7\x71\x1f\x1a\x87\x4f\x0a\x83\x37\xb3\xc5\xd0\xa7\x50\x27\x3f\x68\x74\x54\x52\x3a\x15\xcc\x42\xb6\x25\x83\x6c\xff\x3b\x51\x72\x36\x11\xdc\x12\xbc\x83\x47\x85\x93\x6e\x9e\xea\xfc\xac\x56\x94\x41\x28\x01\x15\x0f\x17\xec\xc2\x47\x96\x82\xf5\x9e\xa5\xc2\x3e\xb4\x4f\x9e\x1b\x1d\x59\x33\x4c\x27\xca\xab\x52\x0f\x8d\xc8\x20\xf1\x2d\x4c\x8f\xb3\xf7\x28\x43\xb3\xdc\x61\x6d\x52\x65\x18\x0f\xeb\x38\x6e\x72\xd1\xa3\x68\x5b\x7b\x45\x70\x4a\xe4\x33\xe7\x1c\x4c\xc3\xb8\xdc\xa2\x71\x44\x6c\x3f\x95\xe6\x76\x50\x27\x23\x1d\xb0\xd1\x68\xd4\xcf\x71\x74\x39\x1c\x9e\xbf\xbd\x7a\x5c\xf8\xc8\xf9\xdb\xab\xde\x09\xa0\x6c\xdb\x67\x0f\x84\x46\x41\x6d\xa9\xbb\xe9\xaa\x8c\x2d\x94\x1e\x53\x3c\x34\xe1\xcc\x2e\x9b\xc4\xbf\xa7\x86\x25\xa8\x49\x94\xf7\x7d\xa4\xbb\xb6\x5d\x18\x2e\x76\xeb\x09\x93\x1e\xbd\xa9\x86\x13\x78\x11\x2d\xbe\x80\x12\x8d\x53\x43\x38\x66\xcd\xde\x76\x37\xd2\xff\xb9\xcf\x7e\xa3\x37\x12\x66\xfd\x5b\xf6\x3a\xea\xac\x7c\x90\xa8\x34\xc5\xe4\x24\x89\xa6\xc8\x74\xf8\x0c\xd9\x74\xed\x0e\xe7\x55\x56\xca\x3c\x0b\x88\x1e\xb0\x31\x9a\x1c\x98\x77\x3e\x33\x3b\x9f\x99\x3f\xb6\x44\xff\x67\xf2\x99\x19\x8b\x19\xbf\x93\xda\xe7\xf0\xaa\x5d\xe3\x3e\x5f\xef\x19\xbf\x46\x74\x9e\x19\xec\x19\x2f\x04\x76\x6e\xd4\x0a\x76\xb5\x77\x3a\xc0\x2e\x14\x79\x2d\x1b\x52\xdf\xef\x6b\xd7\xd8\xb3\xaf\xf8\xd5\x3c\xad\xd5\x34\xe4\xca\x2d\x6a\x4b\x8e\x45\x7e\xe0\x63\xad\x52\x9f\x81\x7f\x2d\x95\xf2\xad\x6b\x59\xce\xa5\xb5\xe4\x63\x5d\xe1\xdd\x01\xad\x5a\x29\x97\x75\xdc\x88\x3c\xa4\x74\x8d\x13\xdc\x94\xd7\x05\x87\x32\x37\x5a\xb9\x82\xc1\x8f\x7f\x8b\x58\xf6\xd7\x62\x1b\x63\x38\x7a\xb4\xc6\xf8\x2b\x83\x07\xd2\xf9\xb4\x06\xa0\x6b\x5f\xe3\x94\x98\x6d\x4a\x00\x76\x5d\x58\x72\xf6\xd6\x32\x50\x03\xf6\x51\x81\xad\x20\x2a\x1a\xac\x76\x2f\xa8\xb3\xf4\x02\x94\xeb\x2c\x13\x45\x3d\xdb\xd3\x3d\x0b\xfa\x55\xf6\xf7\xe0\xb0\xce\x82\xd2\x68\xd8\xb4\x48\xfb\x4f\x3b\x6f\x82\xcf\x84\x97\x59\xe7\x4d\x10\x1a\x01\x6b\xb6\xd5\xd9\xff\xc8\x3b\x3f\x83\x60\xd7\xed\x6b\x4f\x00\x52\xb6\xe1\x52\x50\x73\xe5\x3b\x8b\xcc\xce\x22\xf3\x3c\x1e\x05\x35\x8c\x6d\xc9\xa1\xa0\xc9\x29\xf4\x41\xb8\xc4\x4e\x86\xec\x15\x2f\xf1\x10\xd1\xc3\x77\xa3\x58\x8b\x89\x54\x3c\x93\xbf\x46\x13\xed\xbe\xf5\xdf\xe0\xc9\x28\xa6\x73\xfe\xcf\xaa\x46\x15\x14\x8f\x8a\xee\x0a\xa4\xad\xc3\xaa\x73\x98\x5a\x72\xce\x95\x50\x65\x66\xf1\xe2\x5c\xdf\x39\x84\x82\xcf\x83\x64\xf2\xbe\x08\xa5\xe4\xe6\xd6\x1c\xf2\x74\x2e\x95\x34\xa5\x28\x86\x09\xe6\x6b\xee\x89\x42\x3a\xa4\xf3\x31\xc2\xfe\x7a\xb3\x47\xab\xa9\x3d\xb5\x50\x11\x8e\x7c\xd4\x7a\x7e\xb8\x47\xdd\x7a\x62\x0b\x22\x97\x76\xd9\xb4\xb3\x10\xc5\xe2\x77\x5c\x66\x7c\x9c\xd9\x4b\x30\xa2\xb8\xe3\x18\x31\x0a\x13\xfb\x23\x7c\x61\x1a\x0b\x13\xdb\xb0\x62\x44\xb8\xd1\x7f\x0d\xf6\x1e\x86\xf5\x1d\x0f\x73\x5e\x26\xb3\xe1\x5c\x14\x53\x31\x84\x18\x70\xc7\x38\x46\x5a\x99\xb2\xe0\xa5\x98\xda\x46\xd0\x01\x54\xae\x33\x6e\x22\x8c\xd5\x85\xfd\xd9\x57\xf0\xa7\x7d\xd5\x21\xab\xd0\xcb\x71\x75\x6a\xa5\x2c\xf2\x64\x78\xdc\x30\x80\x3f\x72\x66\xcb\xb0\x07\x85\xbd\x2f\x05\x48\x9d\x0a\x24\x77\x96\xfe\x8a\x02\x0d\x01\x52\xb1\x1f\xeb\x2d\xb1\x53\x9e\x90\x85\x00\xb4\x8a\xe4\xe5\xdc\x2d\x99\x47\x7c\x40\xc2\x93\x99\x60\xfb\x72\x24\x46\xf6\x27\x51\x26\xe9\xc1\x4e\x3f\xb5\xd3\x4f\xfd\xb1\xf9\x9b\x3f\xab\x7e\x8a\x93\x61\xea\x33\xd3\xcb\xe8\x74\xad\x22\xea\xbd\x36\xf0\xec\x91\x05\x41\xb2\x07\x76\xd1\x50\x9c\xc7\xcd\x5d\xf8\x32\x68\xce\xc7\x8f\x2c\x88\x97\xce\x72\xf2\x39\xeb\xa8\xec\x59\x6c\xa8\x9e\x72\xc7\xb7\x94\xa8\x6c\x5d\x29\xa5\x53\x71\x84\x06\x9d\x75\xf4\x8a\x9a\xd5\x6a\xa8\x90\x85\xf2\x61\x2e\x3a\xb5\xec\x4a\x37\xb3\xf4\x2a\x45\x14\xb5\x8e\x28\x1c\xea\x95\x75\xed\xb6\x68\x3b\xef\x4c\xb4\x4e\xaf\x73\x1e\x74\x03\xb3\xb5\x57\x18\x39\xd7\xa3\x01\x3b\x7d\x40\x9a\x83\x29\x84\xce\x94\xfb\xeb\xa9\x26\x5c\x7b\x8a\x64\xec\x5f\xcb\x1d\x78\xaf\x00\xa0\x1a\xd3\x42\x57\x39\xa8\xa3\x1a\xdf\x2c\xc9\x4c\xab\xcc\x52\x8f\xa2\xca\xe2\x8a\x9d\x96\x75\x15\x1c\x2e\x0a\x91\x9e\x54\x76\x03\x57\x7e\x80\xb3\xa9\xd2\xfe\xe7\x53\x48\x2c\x10\x65\x0a\xec\xd1\xd3\xb4\x2e\x7f\x00\x8e\x09\xc9\x7b\xe8\x03\xcb\x75\x0a\x84\xdc\x2e\x97\x24\x11\xc3\x4b\x69\xa8\x2c\xa5\xdf\x80\x78\xb0\x54\x0d\x33\xfd\xd4\x89\xda\xe0\xb5\xbb\xe2\x5a\x03\x36\xae\x4a\x26\x4b\xa0\x76\xc9\x4c\x6b\x23\x08\xfb\xe1\xb8\x77\x52\x03\xab\x80\xd7\x58\x60\x65\x6c\x42\x23\xc1\xf0\xe8\x55\x50\x77\x93\x86\xcd\x21\xf9\xb7\x3b\x10\xc7\x92\xda\x61\xea\x8a\x77\x90\x3b\xc4\x58\xf2\x39\xb7\x83\xde\x0b\x39\x9d\x95\x66\xc0\x80\xcd\xf2\xa1\xf5\xf5\xb0\x73\x01\xb5\xb7\xb3\xcc\x2d\x21\xbc\xa2\x3a\xfe\xd0\xb0\xfd\x76\x7c\xe1\xc0\x7d\xef\x5c\x4d\xf4\xb8\x30\x8b\xc5\xc1\x80\x51\x40\x88\x65\x2d\xaa\xb9\x3d\x3a\x59\x3a\x87\x8b\x72\x56\x80\xd7\x0f\x1c\x45\x46\x13\xeb\x46\xe5\x32\xcb\x4e\xf1\x14\x92\x9a\xdc\xec\xe1\xee\x6e\xf6\x7c\x99\xb2\x6a\xee\x92\x61\xc0\x0e\x5d\xb8\x2a\x2a\x5c\x0b\xcc\x56\x03\x7d\xe1\xcb\x69\xbd\xba\x7f\xf7\x9d\xf6\xcd\x41\x7d\x9c\x33\x39\x9d\xb9\xd3\xe4\x94\xd6\xa2\x79\x0b\xdb\x90\x6d\x2e\xdc\x60\xf5\x11\x5e\x8b\x62\x4e\x79\xd7\xe2\x67\xdc\x17\xfc\x29\x87\x8c\xbf\x91\xc6\x9d\x2e\x81\x60\xd8\xaa\xe5\xb3\xe6\xa2\x64\xf6\x25\xd4\x37\x5b\x4a\x8b\x6f\x4a\xaa\xd7\x03\xaf\x89\x18\x32\xf7\x94\x52\xa6\x5d\x21\x4b\x72\x45\x79\xcc\x0a\x12\xc1\x8d\x2f\xda\x44\xab\xd0\x73\x81\x6e\x71\x2c\x85\x5d\xc3\x12\x84\xdb\x3a\xdb\x17\xa3\xe9\x28\xc8\xce\x82\x1c\xe2\xc1\x20\x20\xc4\xf0\x24\x21\x53\x0b\xba\xe4\x97\x05\xa8\x18\x82\x7c\x22\xe2\x4e\x52\x6a\x2a\x3b\x38\x30\xa8\x96\x09\x85\x9d\x6c\x4a\x4b\xc1\xef\x47\xf7\xcf\xb1\xd1\xe8\x14\x45\xc8\xcb\x00\x65\x05\xb1\xec\x67\xbc\x09\x1b\xd6\x04\xd3\xab\x07\x3a\xa4\x93\xfb\x13\x79\xa2\xdd\xe6\x07\xc1\x8b\x72\x2c\x78\xe9\xcc\x36\x2d\xff\x34\x6e\x4a\x80\x39\x76\x2f\xd8\x54\x97\xf5\xbd\xa2\x82\x0a\x0b\x7c\x36\xac\x1b\x4f\xb7\xfb\xc4\xed\x49\xcb\x16\xd6\x30\xe6\x60\x12\x4a\x49\xba\x29\x8b\x99\x89\x4d\x04\x90\x84\xf4\x65\xdb\x59\x63\x60\x9b\x6a\xf9\x23\x57\x73\xae\xc0\x53\x07\xb4\x34\xd4\x8e\x49\x95\x42\xd2\x43\x35\x6d\x59\xe3\x32\xd8\x88\xdf\xed\x92\x3a\xa9\xce\xd8\xd5\x9c\x6b\x7f\x5c\x48\x31\x39\x68\x24\x16\x0a\x4f\xe3\x85\xe9\x35\xfc\x6f\x6d\x30\xb3\x94\xe2\xd3\x1b\xc8\xf0\xc9\x4d\xe4\x74\xbd\x7f\x5c\xbb\x6d\x58\x05\x87\x11\x51\x0e\x36\x52\xc7\x60\x42\x3a\xdd\xa4\xa4\x22\x43\xa6\x1a\x23\x72\xdd\x17\x0f\x49\x56\x21\x1d\x24\xe1\xf0\xc0\x2b\x5e\x95\x56\x43\x25\x7b\x78\x0a\xe1\x4c\xef\x79\xc4\x15\xfd\xd8\x7d\x42\x66\xd0\xbb\xe8\x62\xbe\xc7\x73\xe4\xb9\x7d\xa3\x0d\xf0\xaa\xef\xd3\x39\xbe\xbe\x48\x76\xf9\x08\xeb\x2f\x6a\xbd\xde\xb6\xd5\xb6\xa5\x5e\x37\x6d\x80\x9e\xc8\x29\xe3\xc6\xc8\xa9\x42\x02\x68\xfb\x8f\xac\x40\x35\x0a\x57\xd6\x43\x29\x96\x94\xf2\x2e\x02\xe2\x47\xf0\x3b\x94\x4b\x2e\x48\x8f\x9b\xcc\x44\x72\x0b\x54\x54\xa4\x6e\x09\x9e\x5f\x92\x98\x03\xf0\x4e\x64\x0b\xac\x58\x3d\x62\x34\x04\x50\x7a\xaf\xd2\x71\x4e\xa5\xa1\x46\x94\xb4\x6c\x6e\x77\x47\x6e\x5b\x38\xc7\x80\xe9\x66\x73\x8b\x40\x7f\xb4\x2f\xf6\x7b\xad\xeb\x46\x29\x5c\xa0\x05\x4c\xad\x98\x4b\x77\xcd\xcb\x12\xd2\xa3\x61\x1e\xbb\x8a\x32\xf5\xb5\x26\xa0\x4c\x91\x60\x65\xe4\x8a\x89\xa2\xd0\x7d\x50\x6d\x83\x62\x37\x01\x6a\xb0\xe7\xae\x26\x72\xb0\x6e\xf2\xde\x47\x0b\x07\x48\xfc\x46\x65\xc4\x88\xfd\x3c\x13\x6a\xc9\x85\xdb\x7b\x20\xfd\xd6\xa0\x1e\xa1\x1e\x9e\x8c\x35\xc6\xe8\x44\xf2\x60\xb2\x9c\x2f\x32\xcd\x21\x8f\x5b\x06\x8e\xdd\xe8\xd7\xcb\x33\xad\xa6\xae\x9e\x79\x21\x12\x5d\xa4\x21\x3d\xf0\x21\x0a\x38\x4a\x20\x77\xc0\xbb\x25\xfd\x26\xa8\x4b\xa1\x6b\xa9\x9d\x54\x63\x39\x23\x9a\xba\x5e\xdc\x80\x92\x10\xba\x73\xa9\x3b\x4a\xe5\x2f\x6d\x54\x5f\x1f\xf8\x93\xe2\x6e\xbd\x89\x98\x1e\x0a\x66\x47\x44\xaf\x7b\x18\x61\xc6\x0d\x1b\x0b\x4b\xf1\xc3\xa3\x2e\x35\x25\x9b\xff\xd9\xb9\x82\xff\x58\x8d\x45\x26\x4a\x4c\xc0\x46\xd9\x10\xa1\xce\x50\x59\x60\x82\x05\x36\xe7\xb7\x71\x30\x82\xdf\x10\xe6\xe9\x97\xf1\x02\x82\x3b\x40\xae\x51\xa0\xb3\x95\x29\xf7\x0a\xd0\xc6\x4a\xdc\x05\x78\x65\x37\xbc\x6a\xbf\xe9\x27\x82\x23\xc0\x74\x17\x16\x4f\xed\xcf\x8d\x0a\x9f\x0b\x48\x30\x98\x89\x39\x1e\xbd\x4a\x64\xe6\x96\xdb\x85\x35\xe2\xd5\x1b\x7b\x1e\x31\x18\x14\x15\xb6\x3a\x49\xaa\x62\x80\xb2\x23\x26\x67\x1f\xb4\x9e\x64\x7d\x06\xcb\xc7\x47\x80\x0c\xde\x8d\xbd\xd0\x15\x03\x01\x0b\x4e\xc7\x19\x40\x3a\x40\x71\x67\x92\xf6\x38\xd0\x4b\x17\xee\xae\xa2\x37\x4d\x59\x15\xdb\x1b\xb5\x92\x46\x2a\x27\x18\xe4\xe1\x82\x7c\xee\x67\x32\xb3\x32\x84\x4a\xec\x04\xfe\x8c\x78\x91\x49\x51\x20\xae\x31\x4e\xfe\xd0\xf7\xca\x4d\x5f\x6f\xc7\x76\xc3\x66\x07\xb5\xd0\x44\xb9\x6d\x21\xab\x5d\xa1\xb3\x6c\xcc\x13\x28\x7a\xd5\x40\x8d\xa1\x01\xc1\xe8\xec\x4e\x30\x9e\x14\xda\x18\x0f\xe3\x85\x00\xa0\x1e\xb1\x77\xbc\x6c\x2f\xc6\xc1\x6d\x7d\x14\x58\x25\x2f\x82\xa9\x0e\x1c\x8a\xef\xb1\x26\x50\xba\x93\xc9\xc3\xce\x99\x70\x28\xe1\x0f\xef\xad\x32\x28\x48\xe5\xda\x18\x39\xc6\x2c\xba\x6e\xe5\x20\xd6\x03\xb4\x8e\x17\x6c\x22\x1f\xfc\x1b\x6a\x51\x42\xa9\xba\x57\x8c\x85\x61\x13\xae\xd8\x44\x92\x0a\x00\x5d\x9a\x3b\xb2\x49\x2a\xc6\xd5\x74\x0a\x95\xed\x16\xcc\x08\x50\x98\xd2\x44\x38\x79\xcd\x13\x37\x90\x45\xa6\x1d\xdc\x23\xd7\x32\xb3\x9c\xf4\xd0\x73\xd2\xc1\xa3\xf3\xda\x1a\x68\x0c\x26\xce\x7f\x67\xc4\x07\x62\x91\x0b\x38\x60\x4f\xc0\x74\x01\xf7\xed\xc7\xa6\xd2\xeb\xe3\xca\xd7\x93\x44\x70\xc8\x7c\xc9\x34\x53\xf2\xb1\xcc\xac\xb4\x4c\x53\x61\xdf\x52\x3c\x94\xed\xfb\x27\xba\x1b\x57\x29\x66\xe1\xb5\xc5\xa5\x98\x9a\x08\x6f\x46\xcb\x26\x3c\xcb\x98\x03\x0f\x08\xc2\x91\x25\x13\x0a\x12\x82\x5a\xaa\xe1\x88\x70\x3f\xf2\x8d\x54\xa7\x8d\x8c\xc7\x22\xd1\x73\x62\x9e\x62\x0c\x43\x1d\xfc\x03\xeb\x4a\x05\xa6\xe2\x14\x41\x0a\xe3\xf6\x90\xd2\xc0\xe1\x66\x58\x80\x13\x94\x42\x49\x49\x59\xac\xa5\xb7\x5b\x67\x0b\x26\x2d\xa6\x9b\x0b\x57\xa3\x84\xb3\x57\x2f\x87\x73\xa9\xaa\x52\x30\xa3\xf9\xad\xcb\xf1\x09\xd4\xc5\xee\xcd\x2f\x25\xa3\x98\x2a\xa0\x58\x7a\x12\x5b\x41\x6d\xbc\x8a\x32\x4b\xb6\x09\xe1\x63\xda\x85\xc0\x4c\x98\x40\x4d\x71\x62\x78\x6f\x4b\xcf\x67\xc4\xce\x75\xe9\x14\x87\x93\x08\x56\x46\xca\x28\x20\xcc\x43\xc9\x8c\xed\xdb\x7b\x21\xa6\x81\xc2\x39\x48\x73\xd2\x3c\x77\xfb\x32\x32\xa3\x1b\x19\x73\xc3\x81\x06\x76\x4d\xdc\x5d\x72\x63\xc0\x60\x73\x3c\xbb\xe7\x0b\x63\x1f\x7c\x35\x17\x29\x9b\xc2\x8a\xed\xfb\x0e\x9e\x03\x50\x68\x68\x41\xb9\xc3\x6b\xaf\x07\x52\xda\xcf\x45\x39\xd3\x70\x2e\xee\xe2\x6b\xec\x1c\xbc\xa0\xe0\x9e\x95\x30\x66\x60\x6f\x13\x0e\x12\xf5\xb3\x98\xf1\xa6\xa0\xb3\xac\xe5\x27\x0b\x22\x84\x21\x26\x55\x59\x15\x1b\xeb\x7f\x1e\x25\x9e\x6c\x22\x95\x9c\x70\x31\xd7\xea\x34\x2c\x3b\xbf\x4a\x30\x69\x35\x07\xef\x1b\x43\x15\x03\x74\x2e\x48\x04\x49\xa1\x95\x61\x45\xa5\x14\xf1\xe1\xe0\x5a\xbe\x44\xdd\xd3\xca\xbc\x8f\x38\xc9\xcd\x11\xe1\x55\x9c\xa1\x57\xbb\xcc\xdb\x01\xab\x96\x41\xf9\x41\x0a\xc8\xea\x7b\xd2\xcd\x5d\xf5\x3e\xe7\x56\xb7\x15\xa7\xbc\xd6\x81\x95\xda\x38\x75\xfc\xfd\x4c\x67\xb5\x6b\x93\x45\x92\xe7\x60\x53\xc0\xed\x82\x53\x04\xb0\xb0\x85\x98\x82\xc7\x87\x63\x6a\xe6\xdc\xfe\xb5\xf3\x74\xfd\x3c\xbc\x22\xd6\xa4\x03\x01\x33\xd1\x36\xbc\x9a\x74\xba\xf3\x32\xdd\x79\x99\x3e\x9b\x97\xa9\x05\xaf\x6d\x39\x98\xea\x54\x5c\x14\xfa\x61\x81\xc5\x50\xd6\x92\x9b\xb0\xad\xc3\x8d\xff\xac\x44\xb1\xa8\x8b\x81\x04\xca\xc0\xdc\xb6\x86\x7c\xf6\x3b\x17\xb0\x9d\x0b\xd8\xef\x18\xf9\xac\x88\x06\xa7\x47\xf0\xf1\xf2\x9d\x0f\xdf\xb7\x8c\xf2\xa4\xa5\x19\xc5\xa7\x10\x14\xd7\x6f\x99\xda\x1e\xeb\xc9\x71\xe9\x41\x60\xcd\xcb\xf5\x0d\x9d\xb7\x36\xb9\x5b\xeb\x02\x9f\xc0\x02\x7d\x03\x7c\x52\xfe\xb6\x63\xb2\x73\xf5\x32\x42\xf4\x8a\xed\x68\x9c\x38\x50\xd6\xc3\x2f\x12\x9e\xf3\xc4\x72\xef\x13\xe7\x21\x41\x66\xab\x75\x0c\xd2\x31\x75\xec\xf2\x48\xfe\x4b\xd7\x5c\xe1\x26\x6b\xe5\x96\xa9\x9d\x9d\xeb\x9c\x7a\xde\x95\xed\x53\xa7\x95\x7d\xb6\x04\xb0\x0d\xb3\xf3\x0a\xd0\x38\x42\x21\xdb\x50\xd3\xf6\x61\x55\x2a\xd0\x8c\x38\x65\xbc\x9e\x34\xbc\x5c\x20\xe3\x02\x50\x01\x48\xdf\x71\x07\x79\x29\xac\xf0\xe8\x58\xaa\x7f\x77\xbe\x2e\x20\xde\xb6\x66\xf8\x70\xe9\x7d\x54\x68\x0d\x01\xfe\xae\x7d\xee\x9a\xab\xb4\x82\xe1\x5a\xa0\x51\xc1\x11\x5c\xdb\x0e\x5d\xe8\xe9\x36\x89\x78\xcc\xe3\x88\x23\x76\xe4\xf9\xff\xd8\x62\x40\xd5\x01\xff\x04\x47\x8b\x0f\x97\xdb\xf1\x22\x39\x6f\xad\xb0\x7f\x92\x9f\x4e\xcf\x1e\x90\x72\x59\x7b\x71\x6c\x06\x34\x75\x4a\x73\xa4\x2d\xfe\x6c\xec\xc5\x7b\xd7\x03\x57\xc0\x8c\xb3\x5b\xb1\x40\x0a\x0a\x71\x23\xa2\xe0\xbe\x31\x54\xee\x22\x02\x7f\x2b\x16\x4e\x3b\x5f\xad\x8f\x17\xc4\xea\x71\x6e\xb4\x0d\x2a\xc8\x21\x00\x43\x35\x30\xa7\x60\xf2\x1b\x58\x99\xbe\x39\x98\x6d\x65\xfa\x13\x3b\xf6\x0b\x43\x45\xc9\xb4\x82\xfc\x25\xc0\x27\xd1\x2b\x71\xec\xc2\x4f\x3c\x93\xa9\x3f\x0f\x04\xa4\x33\x35\x60\xe7\xba\xb4\xff\x39\x7d\xb0\xc2\xfd\x80\x9d\x68\x61\xce\x75\x09\x7f\x8e\xd8\xf7\x64\x9c\x79\x17\xaf\x7d\x87\x63\x47\xee\x50\x31\x00\x4a\x3b\x7f\xc8\x0a\x18\xaf\xbf\xf2\xf7\x22\x8d\x25\xc6\xba\x70\xeb\x00\xde\x0b\xa3\x7b\x70\x88\xd0\xca\x0c\x6a\xd0\xe8\x18\xb8\x7c\x3b\x4e\xb8\x81\x15\xc3\x2d\x1f\xea\x7b\x48\xfa\xf2\x6e\x69\x67\x8a\x52\x30\x52\x4d\x33\xef\x74\xe6\x52\x77\xba\x4a\x77\xc0\xd0\xe5\x85\x70\xba\x40\xc5\xa8\xd6\x1c\x29\x0e\x71\x3c\x64\x27\x33\x9e\x40\x91\xa8\x02\x55\xed\x14\x68\x22\x13\x06\x71\x26\x0c\xc2\x4f\x36\x29\xbd\xb9\x29\x99\x6f\x3c\xe4\xd5\x2f\xb3\xca\x32\xc8\x17\x0f\xa1\x56\x5d\x4c\xe5\xdd\xe7\x94\xae\x53\x42\x63\x21\xa9\xc0\x83\x0b\x51\x32\xba\xc7\x1d\x9d\x9f\x60\x49\x40\xc1\xae\x75\xae\x33\x3d\x5d\x84\xcb\xa1\x62\xc0\x4e\xb1\x0a\xcf\xbf\x1a\x13\x64\x3b\x2d\x53\xd8\x61\xbd\x2c\xd0\xf6\xe3\x8b\xed\x33\x8e\x8b\x1b\x9b\x18\x2f\x9c\x52\x11\x5e\xf8\x56\xf2\xae\x2d\xc3\x96\x58\x62\xa0\x4c\x66\x6f\xa5\xc8\xd2\xa7\xaf\x18\x7c\x3a\x9e\x79\xc5\x8f\x20\x24\xe1\x00\xab\xe8\xc9\xba\x70\x45\x6a\xb3\x3c\x52\x11\x93\x19\x7a\x07\x06\x57\xc2\xf8\x5e\x96\xb3\xbe\x4e\x2c\xb5\x0b\x4e\xc7\x79\xb2\x55\xce\xc1\x78\xa3\xe6\x54\x94\x11\x8f\x1b\x14\x68\xec\x03\x38\x59\x28\x3e\x97\x09\xe9\x37\x51\xa7\xeb\x72\xa5\xb1\x29\x2f\x45\x8d\xbc\x94\xe5\x31\xeb\x14\x81\x4e\x25\xea\xad\x25\xce\x2b\xf2\xa9\xf6\x63\xe7\x25\x7e\xd2\xdd\xe9\x89\xa5\x41\x09\x8a\x53\xe7\xba\x04\xbd\x25\x69\x73\x0d\xa2\x41\xd0\xf1\xfb\xa5\x8c\xd8\x25\xc6\x62\x92\xc3\x28\x58\xea\x5f\x8d\x5e\x7d\x05\x6c\x7f\x2d\x79\x49\x63\x2c\xa1\xa0\xcb\x7f\xfd\xea\xaf\xaf\x5f\x47\xa5\x26\x9d\x1e\x9f\x9d\x5c\x46\x04\x27\xfc\xd0\x66\x05\x73\x9d\xb2\xb3\x0b\x56\x80\xf2\xde\xdb\x0d\x43\xb7\xd3\x15\xb3\x44\x9e\x9c\xfb\xd2\x9e\xc7\xcd\x61\xa2\x93\xc0\x8d\x61\xfa\xed\xf1\x82\x5d\xe8\x94\x4a\x51\xf0\x32\x74\x7d\xf5\x3e\xad\x61\x6d\x6f\x84\xa6\x97\xe5\x8c\x09\x55\x16\x44\x8b\x30\x55\x37\xed\x0f\xb6\x4d\x67\x7d\x46\xce\xe4\x54\x58\x94\x97\xe8\x84\xfc\x8a\x44\x72\xef\xd6\xad\x27\xec\xec\xe2\xee\x6b\x20\xf2\x67\x17\x77\xaf\x37\xa0\x33\xfd\xa3\x24\x31\x09\x55\x11\x83\xa2\xb3\x93\x30\x1e\xa6\xe1\xda\x84\x62\xbd\xae\x52\x97\xc5\xca\xc7\x01\xa2\xf8\xf8\x86\xaa\x96\x5f\xd0\xd7\x73\x5f\x9c\xfc\xcd\xe1\x61\xf3\xd3\x15\x1e\x62\x62\x61\xfc\xec\x04\x1b\x45\xdd\xfe\xb8\x33\x8b\xac\x7b\xd5\x84\x49\xb1\xc3\x36\x30\xe9\x35\x97\x84\xe9\x2b\x45\x8e\xd1\xf6\x8d\x77\xd7\xf2\x31\xfc\xec\x32\x76\x18\x42\xfc\xee\x8b\xb7\x04\x2b\x71\x0f\x91\x0a\x23\xf6\xdd\xc2\x99\xd5\x06\x1e\xf3\x05\x23\x6d\x9c\x5f\x01\xc5\x6e\xfb\xbf\x87\x5f\xcc\xb9\xaa\x78\x36\xb4\x7f\x0c\x5d\x64\x6a\xe1\x0a\x66\xb7\x93\xb2\x3d\xd6\xae\x15\x25\x08\x78\x6c\xab\xa8\x45\x2f\x17\xbc\xc7\x44\x4d\x2f\xf3\x67\x8e\x06\xf8\xc4\xb8\x64\x67\x1a\xf0\x4d\xb0\xf6\x23\x27\x1f\x88\xda\x1f\xfe\x3f\x41\xfc\x25\xe7\xf2\xe6\x93\x18\x30\x39\xa9\xb5\x0e\x4f\xba\xc4\x7a\x19\xe7\xba\x14\x6f\x90\x4f\xf5\x78\x28\x15\x49\xc6\x0b\xe4\x66\xe1\x65\xdb\xf9\xd0\x23\x01\x42\x1c\x80\x55\xb5\x62\x0e\x15\x1a\x35\xd5\x64\x22\x13\x89\x96\x71\x8c\xe8\x1d\xf8\xd2\xb9\x8a\xa1\xc5\x37\xe5\x25\x07\x4b\x6b\x85\x5e\x12\xce\x29\x40\xd2\x1c\xe9\x88\x1d\xf3\x2c\x0b\x34\xaa\x52\x99\x52\xf0\x14\xc8\x1c\x87\xc4\x96\x43\xe2\xa0\x41\x40\x44\x5e\x99\x5d\x91\x1e\xe9\xcd\xe1\x61\x5e\x38\x52\xf2\xed\x5f\xbf\xfa\xeb\x2b\xaa\x52\xe6\xfc\x92\xb6\xc5\x03\xb9\x00\xb3\x6d\x07\x98\xf3\x0c\xf2\xd6\xc6\x31\xc1\x51\xfd\xb1\x4d\x85\x22\xda\xa7\x3a\x85\x73\xad\xa4\xb2\x87\x51\x87\x6a\x34\xf3\x32\x3a\x15\xd7\x6f\x50\x0d\x29\xd9\x58\xef\x56\xea\x12\x3c\x28\x3a\xbb\x7e\x74\xc6\xc6\x5c\x14\x06\xac\xcb\xe5\xd0\x25\x6f\xf4\xcb\xfa\xf4\x07\xb2\x22\xeb\x82\x8f\xc2\x70\xca\x57\x2f\x79\x3b\xa4\xe5\x03\x50\x9b\x7e\xeb\x9b\x57\xeb\x09\xb1\x85\x1f\x66\x4b\x2f\xe8\xf9\x92\x34\x20\xb7\xdd\x23\x58\xa0\xe1\x51\x16\x32\x6d\x77\x92\xc3\x1f\x29\x32\xe8\x9e\xdd\x4e\x1a\x2c\xfa\x23\xbd\x3d\x28\x7e\x76\xb0\x97\x76\x9d\x33\xe2\xae\x10\xb0\xe6\x35\x5e\x17\x9b\x2c\xa4\xed\x15\xf2\xaf\xc1\x9e\x9c\xf3\xe9\x2a\x92\x15\x54\xba\x86\x96\xbe\xa0\x5a\x53\xcf\xfd\x68\x88\x38\x76\xe3\x9f\xd9\xe1\xe1\x0d\xd8\x91\xcf\xd4\x24\x52\x57\xef\x0a\xd5\x01\x32\x35\x87\x55\x25\x31\x2a\x13\x29\x4e\xb6\x70\x8e\xb5\x8b\x80\x9c\x3e\x01\xea\x6d\xaf\x4d\x83\xba\x20\x8e\x0c\x56\xbe\x3c\x63\x08\x98\x3f\xc3\xac\x21\xdd\xe8\xf1\x65\xf9\x43\x9e\xba\x25\x1c\x0d\xd2\x44\x3b\x5a\xaf\xc4\x9d\x28\x58\xee\x42\xd3\x51\x05\xa8\xf4\x3d\xf2\x01\x5e\xec\x8b\x6a\x04\x11\x57\x1e\x51\x2e\xf0\xe5\x10\xe4\x72\x30\xd7\x54\xc9\xa5\x0f\x8f\xcb\x64\x8f\x06\x25\xb7\x14\x4c\x2d\x0d\xa0\x44\x73\x9f\xa9\x8f\xb1\xbb\xf0\x6c\x19\x74\x04\x3a\xe9\x16\x0b\xb5\x04\x05\xdb\xa7\x1c\xc7\x07\xa1\x01\xe1\x69\x1a\xba\x28\x0b\xdc\x5a\x7a\x94\xc7\x6d\xbd\x94\xb5\x21\xf0\x3d\xc2\xfe\xfa\x05\xb5\xf4\x76\x32\x5b\xce\x9a\xd7\x2f\x63\xa5\xc7\xc1\x86\x86\xa9\x7a\xd4\x75\x4c\xbf\x6f\xe9\x0c\x0b\x1b\xe1\x91\x35\x16\x03\xda\xc6\xd9\xc9\xde\x60\x0f\x63\x49\x3f\x7e\x84\x3f\xc6\x5a\x97\xf0\x8f\x5b\xfb\x3e\x33\xe7\x98\x30\xd8\xd3\xc6\xdd\xa1\x47\xaf\x97\x58\x51\xa5\x6e\x43\x1a\x96\xe6\x0f\xe0\x38\x11\x8c\xe3\xd2\xd1\xe3\x06\x2d\x7b\x12\xd8\x4b\x23\xae\x60\xe1\xd7\xa8\x11\xe3\x28\x68\x41\x4e\xbf\x4d\xeb\x59\x0c\x15\xd0\x3e\x3b\x03\x7e\xa7\x75\xc9\xce\x4e\xa2\xe3\x44\x71\xca\xb2\xd3\x88\xb1\x42\x8d\x86\xcc\x39\x76\xc4\xa6\xf2\xa1\xe3\x54\xb5\x06\x52\x85\x95\x82\x1d\x5d\x9c\x79\xc7\xfc\xe4\x56\x14\x6f\x0e\x0f\x5f\x8d\xbe\x19\xbd\x8c\x65\xb7\x6f\xdf\x61\xd7\x23\x02\x3e\xaf\x5e\x07\x48\x75\x2f\x2a\xc8\x3f\x3e\x2c\x5e\xd0\xe4\x5f\x8d\x5e\xbd\x1e\xbd\x1c\xbe\x1c\x8d\x73\x3d\xfa\x7a\xc8\xe7\xe9\xeb\xaf\x97\x2c\xa1\x0d\x01\xdd\x55\xb8\x16\x2b\x17\xb2\x74\xf0\x00\xde\xa2\x43\x5b\x56\x68\xe3\x81\xeb\xe7\x11\xa9\x93\x4b\x9f\xe2\xa3\xb1\xb7\xba\x70\x39\xa2\x68\x14\x1f\x3e\x93\x70\x0a\x3e\x26\xed\x11\x64\xc6\x6a\x69\xd4\xea\x40\x7c\xf6\x4e\xf0\x42\xa1\xa1\x19\x6e\x61\xce\xd5\xfe\x37\x07\x6e\xd4\xa1\x4c\xdf\x38\x31\x72\xce\xd5\xb7\x23\x5d\x4c\x0f\x33\xa9\xaa\x07\xfb\xe7\x30\xb7\x8c\x8f\xfd\xd7\x37\x87\x75\x87\xd1\x37\xa3\x59\x39\xcf\x96\x9b\xf3\xea\x67\x19\x7d\x69\x1f\x7c\x29\x09\x6c\xd5\xfb\xb5\x39\xe4\xd1\x19\xf5\xc3\x15\x83\x2f\x2b\x80\xef\x50\x94\xc9\xa1\x36\xc3\x42\x64\x10\x44\x8f\x10\x78\x22\xc6\x92\x2b\xf6\xfd\xf9\xc7\x43\xac\x7f\xf0\x2d\xdb\xbf\x9f\x09\xf1\xeb\xe2\x20\x0e\x88\x01\x96\xeb\xf2\x68\xfe\xdb\xa3\x2f\xb5\x06\x8b\xe6\x25\x5e\xc7\xf4\xa5\x89\x45\xde\x97\x22\x65\x3f\xf0\x12\xd2\xfb\x1b\xcf\x18\xf1\x24\x11\xc6\x8c\x0a\x91\xce\x78\x39\x4a\xf4\xdc\x32\x47\xd5\xdc\x79\x74\x1d\x0a\x35\xfc\xff\xd9\x7b\x17\xe6\xc6\x8d\x6b\x5d\xf4\xaf\xf4\x55\xea\xd4\x48\xbb\x48\x6a\xc6\xf6\x76\xce\x99\x54\xea\x96\x2c\x69\x6c\x1d\xcf\x68\x18\x49\xb6\x2b\x77\x2b\xe5\x34\x81\x26\xd9\x47\x20\x1a\x46\x37\x24\x31\x67\xfb\xbf\xdf\xea\xb5\x56\x3f\x00\x36\xf8\x90\x34\xce\x38\x61\xa5\x2a\x1e\x11\x8d\x46\x3f\xd7\x7b\x7d\xab\xd1\xc7\xb5\xc8\x7f\x9e\x73\xf3\xb3\x6e\x26\x7e\x1e\x3f\x87\xba\x10\xc7\x6f\x8e\xed\x3e\x1f\xd7\x73\xbd\x00\x6e\xf1\xbc\x68\x1b\x84\xb1\x01\xf7\xce\x36\x81\x15\x89\xe6\xe4\xf4\x01\x0d\x30\x84\xb4\x89\x9c\x56\xa6\x15\xa6\xb6\x81\x73\xc1\x1b\xe3\x64\xe5\x8a\x75\x81\x74\x3f\xb6\xd3\x39\x29\x6c\xce\xfe\xf3\x9d\xeb\xd0\x6e\xd0\x43\x2d\x8d\x11\x78\x47\x21\xa2\x41\x4d\x07\x3e\x83\xc0\xee\xda\xed\xc1\xfd\x9b\xdb\x83\xe4\x09\x0b\x23\x4b\xc7\x4b\xd1\xa7\x71\xca\x46\xd1\x9a\xf8\x1c\x41\x8f\x1c\x61\x69\x3c\x05\xf8\x3d\x33\x4c\x6a\x87\xea\x45\x4f\x2c\x5c\x24\xa1\xec\x8b\xc1\x88\x98\xdc\x49\x20\x1e\xd2\xa5\x7f\x4b\x77\x0a\x81\xec\x26\xe3\xfa\xa2\x45\x3b\x6e\xc3\xc5\x94\x86\x46\xc9\x3b\x9c\x55\x52\x60\xb2\x79\x88\x0b\x73\x46\x3c\xfc\xd1\x5e\xf2\xda\x41\x74\x0e\x90\x58\x53\xd0\x40\x08\xa3\x44\x2f\x06\xe6\xa4\xb1\xff\x7d\xfd\xf1\xf2\xf8\x5b\xe5\x3c\x49\x70\x9f\x31\xa9\x0a\x5d\xf1\xba\xc9\xe6\x8c\x43\x2e\xb5\x3d\xd3\xd7\x80\x28\xb9\xe0\xa5\x9c\x0a\x6d\x6f\x3c\x49\x09\xfa\xbf\xbe\xf8\x1b\x12\x1e\x9f\xa5\x48\x50\x30\x3e\x1a\xd1\xed\x15\x15\xe7\x89\xf4\xde\x07\x69\xe6\x30\xa4\x4a\xe5\x34\xe8\x07\x18\xac\xe1\x77\x04\x35\x81\xae\x96\x42\xde\x89\xb7\xec\x16\x10\xd0\xa2\x6f\xff\x5f\xcb\xef\x7f\xbd\x3d\x00\x9a\x5a\x0b\x76\x0b\x95\xa4\x6e\x0f\x5a\x29\xb4\x54\xaa\x3f\x98\x28\xe8\xe3\x18\x4a\x52\xcb\xd9\x0c\xb2\x01\x20\x1a\xf2\x5e\x94\xe6\xc8\x9e\x12\x39\x65\xa5\x8a\x1a\xfb\x5a\x73\xfe\xf8\xaf\x0c\xe6\xbf\xbe\xf8\x9b\x1d\x49\x7b\x76\x4c\x96\xb9\x78\x64\x5f\xe0\xf5\xb1\x34\x57\xe5\x47\x44\x6e\xf5\xb2\x34\xfc\x11\x9c\xa7\x73\xa5\x45\x89\x39\xb9\x46\x61\x70\x04\xe0\xae\x3c\x88\xa2\x18\x62\x44\x6d\xce\x1e\xd0\x22\xe5\x16\x14\x03\x1d\x2a\x5e\x9b\x3e\xc2\xb4\x55\xa8\xe9\x36\x05\xb6\x7e\xc3\x40\xce\xcf\xb4\x14\x18\x0e\xcc\x17\x8d\xe9\x2b\x15\xf3\x1b\x0c\xb1\x0f\x9c\xd4\xb2\x1f\xd4\xf0\x7a\x49\x94\xf3\xe0\xb1\x4e\x4b\x4c\x25\x94\xe0\x04\x85\x68\x9a\xe8\xc6\x2e\x78\x8e\x57\x9a\x97\x9f\x1e\x45\xcf\xae\x03\xd8\x5b\xb3\xe5\x90\x9c\x72\x00\xaa\x97\xa9\x12\xed\xc8\xd9\x32\x35\x71\x2b\x39\xac\xba\xf8\x82\x57\xf4\xd3\x9e\x18\xab\xe5\x3e\x8f\xff\x8d\xbd\x99\x9c\x8c\x14\x6b\x18\x60\xb7\x2d\x3b\x1c\xff\x78\xe4\xe2\xc5\xb1\x64\x9c\x8f\x11\x06\xff\x16\x49\x30\x93\x25\x98\xb5\x83\x5f\x51\xd5\xe0\xe0\x06\x73\x37\x2f\xd4\x4c\x11\x5c\xce\x4b\x5b\xfc\xf7\x79\x05\xfb\xbc\x82\xdf\x6f\x5e\xc1\x1e\x5a\x36\x2a\x7d\xef\xd4\xc2\x70\xb9\x58\xb8\xef\xbe\x1e\xe2\x43\x2b\xf4\x04\x8c\x07\x23\x36\xde\x44\x8a\x5e\xce\xc3\x98\x24\x41\x5b\x63\x02\x76\xc8\xeb\x96\xe5\x92\x3a\x9e\x54\xe7\x34\x8c\xb4\x91\x63\x8a\x7a\x70\xd1\x66\x2b\x0b\xf7\x64\x18\xdb\xcf\x62\x99\x76\x03\xb0\x4d\xae\xf2\x56\xac\xf1\xa5\x81\x6d\xbb\xfd\x9f\x16\x5c\xae\x8d\xdf\x4d\xbe\x80\x74\xb5\xd1\xa2\x7e\xe5\xc9\x1b\x05\x49\xe4\x2c\x83\x16\xa8\xc6\x75\x37\x7d\xcf\x1c\xf7\xcc\x71\xcf\x1c\xff\x05\x98\x23\x44\x36\xa0\xa5\x84\x65\x73\x5e\xf3\xcc\x88\x5a\x6a\x23\x33\x8a\xa3\x21\xee\x48\xdb\x4b\x5c\x10\x02\x6a\x79\x63\xe6\x9f\x8a\x03\xe2\x2f\x40\x81\x9e\x43\xde\x81\xc8\xbd\x38\x2b\xec\x11\x20\x60\xb4\x9f\x9c\xe9\xbd\xe8\xca\x3c\x8f\xfb\x85\xd5\xdd\x9e\x45\xfd\x26\x7c\x70\x2b\x10\xdb\xf5\x6f\x92\x09\xad\xe8\xad\x46\x58\xdd\x67\xcf\x87\xb3\x1d\xd7\x6a\x22\xb6\x80\xb2\xad\x6c\xbb\xdc\xd9\x01\x3f\x33\xf0\x5a\xf2\x34\xfc\x53\x11\x6c\x87\xbf\x0d\x82\xed\x0f\x14\xca\x8a\x66\x6a\x94\x38\xa0\x54\xbc\x9e\xab\xda\x0c\xbc\xf3\xaa\x29\x73\x51\x6b\xe0\x25\x76\x4c\xc4\x9b\xc1\x70\x3b\x93\xf7\xc2\x45\xf9\x78\x18\xdc\x75\x10\xb8\xec\x62\x4a\xc9\xad\x00\xbd\x73\x7b\x70\x25\xb4\xfc\x87\x15\x28\x6b\x23\xf2\xdb\x03\x87\xcb\xce\x4b\x97\x58\x9b\x8b\xba\x80\xa4\xeb\x55\x1a\x25\x35\x9b\x08\xca\xc7\xb6\xa2\xcd\x06\x80\xdd\x5e\x68\xdc\xdf\x02\xf2\x36\x79\x41\x37\xc1\xeb\xf4\xbe\xd4\xae\x15\xd9\x23\x0d\x1b\xb1\x39\xf9\x77\x0f\xa9\xf3\x4f\x85\xd4\x09\xd9\x6e\x3d\x1c\x78\xf7\xc8\xd6\xa7\xf0\xdd\x67\x63\xf8\x27\xf5\xb7\x3d\xb4\xcf\x1e\xda\xe7\xd3\x40\xfb\xa4\xcf\xdb\x0b\x61\xfd\xf4\x0b\x86\xbb\x52\xea\x44\xea\xa6\x5d\x73\x55\xb6\x6a\x4d\x4e\xbd\xcb\x20\x17\xf7\x32\x03\x10\xdb\x9c\xf1\xa2\x50\x0f\xf6\x86\x10\x66\xa1\x65\xac\x2e\x53\x66\xe8\x23\x43\x42\x3f\x5b\xc0\x64\x67\x42\xeb\x0f\x80\xdd\x95\xc0\xca\xf6\x0f\x83\x33\x3f\xd6\xa6\xc8\x33\xbd\xa0\x0a\x31\x2e\x8e\xd4\xd1\xed\x39\xbf\x7f\xd1\xfc\x04\xfc\xdc\x10\x3e\x37\x7c\xb3\x43\x38\xea\xe0\xc0\x9e\xfc\xbe\x94\xd6\x28\xbe\x26\xe3\x25\x5c\x74\x8d\x61\xba\xb8\xa2\x4b\xc2\xf6\x7e\xcb\xfe\x83\x9d\x94\x4c\x3c\x5a\xdd\xb1\x9c\x31\xb2\x7a\x95\xbc\xd2\x73\x65\x1c\x0d\x3a\xd4\xf4\xc3\xc8\xd5\xe1\xa4\xd3\xd4\x69\x3e\x64\xdf\x08\xc3\x8f\x3a\x7d\x8e\x7f\x3c\x65\x87\xc9\x63\xd3\x6d\x99\x35\xda\xa8\x85\xa7\x83\xc7\xf4\x79\x04\x0b\x09\xf9\xe4\x90\x81\x44\x91\xce\x50\x12\xe4\xa4\xa8\xe6\xfc\x08\x31\x09\x72\x2c\xf9\xd3\x68\xd1\x33\x19\xb8\xcb\x98\x10\xc8\x2b\x7b\x72\x6a\x69\x75\x83\xb5\x39\xbb\x87\xed\xae\xce\xfc\xca\x33\x55\xb3\x93\x72\x89\x8f\xc3\xcf\x47\x0e\xa3\x20\xb8\xc4\x00\x1f\x16\x92\x98\x88\x9f\xc7\x75\xbb\x79\xc9\x74\x53\x59\x49\xb1\x13\xf4\x02\x53\xd5\x84\x7e\x2c\x0d\xe6\xe8\x62\xee\x33\xe3\x90\x28\x48\xc7\x73\xc2\x35\xa0\x6c\xfb\xa0\x83\x28\x6b\x3f\xdd\x9f\xc7\x51\x48\x3e\x0d\x29\x61\x15\x46\x7e\x0d\xe2\xcb\x10\x57\x84\x71\x99\xd8\xf6\x2e\x43\x20\x0f\x97\x85\x5d\x48\x87\xaa\xe0\x43\xc7\x10\x52\x01\x62\x1e\x3c\xb4\x30\x62\x6e\x0e\x40\x59\x2a\x38\x78\x86\xdd\x42\x20\x1c\x50\x34\x22\xd8\x38\xff\x99\xb8\xea\x5c\x77\xa5\x03\xe4\xe7\x2e\x69\x15\x37\xcb\x4a\xe4\xef\x55\xc6\x8b\x6e\x80\x50\xe4\xec\x4e\x02\xc2\xb8\x0c\xa6\x8e\x2d\x62\x21\x4b\xb9\x68\x16\x51\x8a\xd3\xa7\xa7\x27\xb1\x6c\xb6\xed\xc4\xdd\x04\xa2\x5c\x7e\x48\x28\xd1\x51\x54\xdb\x8a\x34\xe7\x31\x7e\x96\x88\xf0\xe3\x73\x03\x20\x8c\x45\x43\xea\xaf\x25\xe5\x13\x09\x48\xff\xcf\xd3\x26\xdf\xdb\xaf\x85\x4a\x3b\x56\xd7\x81\x15\x38\x2d\xb8\xd6\x97\x1b\x43\x38\xae\xa3\xd6\xbe\x9c\x55\xf0\x19\x81\xfd\xe7\x05\x53\xce\xec\x67\x62\x5a\xde\xcd\xb4\xf8\x40\x65\x58\xdb\x03\x0e\xcf\xbc\xb6\xf1\x00\x21\x43\x54\xc0\x24\xa8\x82\x3d\x33\xf8\x11\x44\x4b\x35\x65\xef\x64\x21\xa8\x12\x92\xd4\x40\x38\xed\xe5\x86\x3c\x4d\x7b\x67\x65\x99\x15\x4d\x8e\x00\xdc\xe8\x2c\x80\xc8\xa2\xfe\xf1\xa6\x17\xf8\x47\xff\xcc\xe5\xbf\xd0\x56\xb7\x0b\x81\xd8\x07\x2b\x41\x04\x13\x9e\xdd\xa1\xe8\x2b\x35\x0d\xff\xc9\xe5\x6f\x93\xa7\x37\x9d\x77\xdc\x7b\xc1\xb7\x15\xa8\x5a\xc7\x70\x27\xa9\x6a\x63\x46\xf3\x9a\xd7\xba\x55\x89\xb7\xb1\x67\x7e\x22\x29\x89\x67\xa6\xe1\x45\xaf\x90\x14\xf6\x55\x00\xdb\x9f\xf3\x17\x55\xeb\x9e\x21\x2c\xf5\xa7\xa7\x76\x2a\x60\xd3\x0c\x5b\x69\xa9\x1d\xfb\x0c\x39\x50\x3f\xb3\x94\x52\x3a\x1c\xc1\x14\xda\xaf\x6b\x03\xeb\xdf\xc9\xe0\x64\x97\x00\x39\x76\xe8\xdf\x31\x78\x82\x05\x7f\xd5\x32\x70\xbd\x7a\x91\x8a\x79\xeb\xad\xc4\xbf\x69\x65\xf0\x1e\x3f\x83\xcf\xeb\x4b\x8e\xf5\xe9\x54\x6d\xc3\xd4\x5f\x28\xf7\x2a\xf9\x95\x1b\xb1\xa8\x0a\x6e\x76\x0a\x0b\x6b\xbd\x88\x05\x22\x50\xdd\xa8\x6a\x95\x37\xd9\x2a\x0b\x40\xcb\x1d\x85\xb6\x59\xd1\x30\x0a\x2c\x3d\xaf\xe6\x62\x21\x6a\x5e\x90\xd4\xdd\x5b\x1e\x29\xb6\xef\x81\xd3\x6c\xc5\xbc\xd7\x6f\x49\xf8\x10\x21\xad\x20\x1a\x14\xc1\xcf\x95\xca\x50\xb9\x7b\xd0\x3b\xdc\x29\xcf\x54\x25\x81\x67\x3a\x9e\xf6\xe3\x29\xb2\x54\x90\x7f\xa1\xc2\x8e\x19\xb1\x4b\xc5\xc0\x78\x4e\x70\x4d\x98\x24\x69\x15\x5c\x12\x90\x83\x50\x6c\xa7\x10\x10\xc4\x5c\xdd\x8e\xe7\xfa\x07\xb6\x71\x24\xde\x04\x99\x3f\x6b\x97\xc9\x4d\x9f\x61\xc8\x33\xa5\x80\x6f\xd2\x2c\x20\x88\x18\x17\xa4\x29\x51\xd2\xee\x2c\x0d\x1a\xcd\x85\x09\x48\x4d\x64\xa5\xb2\xbc\x8c\xce\x09\xf6\xac\xad\x04\xe1\x96\x0b\x0b\x3b\xf5\x9c\x16\x5c\x4c\xad\x28\xa2\x7c\x2e\x76\xcb\xdf\x5e\xe3\x65\x7c\x51\x4f\xda\xcb\x3b\xc6\xe2\x7b\xb0\xf3\xad\x8c\x5f\x0e\xa2\x19\x39\x1d\x30\x84\xc4\x6e\x98\xcb\xb7\xb0\xbb\xe1\x03\x7f\x29\x72\x9c\x98\xc2\x54\x96\x39\x49\x7a\xaa\x29\x73\x36\xfe\x11\xad\xd1\xaa\x41\xaa\xc8\x3d\xfb\xf0\x51\x47\x0a\x60\x32\x37\x8f\x4b\xea\x01\x13\x1a\x2c\xa2\xbc\x28\x96\x03\xc6\xd9\x43\xcd\xab\x4a\xd4\x8c\xd7\xf0\x31\xf2\x4a\x75\xc5\x61\x57\x34\xd7\x87\x81\x69\xb5\x10\xaa\x14\x4c\x14\x5a\xb0\xc3\x10\xd6\x74\xb4\x89\x80\x00\x67\x04\x51\x77\x85\x8a\x84\x47\xab\x6c\xd7\x3d\x72\x42\x9a\x0b\xfe\xef\x3b\xc4\xc9\x75\xc6\x62\x15\x08\x78\x05\x15\xd9\xf0\xa2\xb8\x48\xad\xdf\xce\x30\xde\xf2\xa5\xe5\x1f\xcb\x22\x21\x30\xfd\x04\x75\x61\x14\x1a\xaa\x05\x38\xce\x6d\x43\x2b\x07\x50\xa5\x31\xb2\xbc\x7c\x80\x83\xe1\x11\x4a\xd8\x94\x17\x3a\xa6\xe3\x6b\xd0\x85\xb6\x0f\x5e\xde\xd5\xb3\xb4\xd9\xa9\xb4\xf7\x27\xfd\x0e\xfc\x49\xef\xfb\xbc\x49\x2f\xa9\x70\x7c\x02\x11\x76\xef\x2b\xda\xfb\x8a\x7e\x23\x5f\xd1\xa7\x72\x13\xed\x2e\x87\x84\x6a\x54\x5a\x2e\x64\xc1\xc1\x42\xdf\x7a\x34\x69\x30\x16\xc2\x78\xd1\xa1\x15\xaf\xcd\x1e\xe6\x8a\x04\x49\x2b\xad\xe8\x76\xc5\x5b\x35\x85\x1a\x95\x0b\xb1\x98\xc0\x89\x27\xe3\xbd\x16\xdb\xa4\x58\x3e\xe8\xf3\x82\x6b\x23\xb3\x6f\x0a\x95\xdd\x5d\x1b\x95\xc2\x53\x38\xf9\xe9\x7a\xa5\x55\xac\x11\xf2\x92\x9d\xfc\x74\xcd\xce\xa4\xbe\x8b\x6f\x26\x8a\x26\x31\x48\x0a\x77\x70\x9b\xaf\x34\x64\x38\xfb\xd0\x13\x32\x6b\x97\x4c\x3c\x56\x4a\x07\x44\x15\x90\xa0\x9e\x48\xd0\xbc\xd9\xe4\x41\x0b\x1c\xfd\xc4\x8e\x5e\xc3\x1c\xb7\x97\x9b\x53\x93\x6f\x9d\x84\x5f\x07\x07\xfc\x1f\x4d\x2d\xec\xf4\x13\x6b\xe7\x1e\x75\x17\xcc\xfe\xce\xce\xb8\xe1\xb8\x6e\x20\x46\x3a\x0f\x06\xac\x8d\x5d\x93\x89\x74\x12\x66\xbc\x22\xbb\x8c\xde\x7d\x3e\x39\xe4\x77\x32\x09\xd2\xe6\x1e\x25\x87\x0c\x0f\x2c\x79\x95\x99\xf8\xa4\xa3\xb6\x1f\xea\xb9\x7c\xbf\x0e\x0e\x32\x51\xcd\xa7\x29\x43\x90\xa8\xe6\xef\xae\x5b\x23\x67\xf6\x37\xf6\xee\x3a\x31\x5a\x38\xa4\x7a\xce\x6b\xc8\xb8\xa8\x54\xfe\x4a\x03\x6a\x91\x91\x8b\x5d\xce\x08\x7e\x74\xcd\x60\x65\x99\x8b\x84\x23\xe1\x14\x7e\x6f\x0f\x16\xdb\x3a\x01\xdf\xdf\x1e\xaf\x6a\xa0\x9f\xcb\xc3\xd6\xc6\xd7\x28\x79\x55\x28\x51\xd8\xc3\xd3\x2e\x96\xfa\x97\x62\x88\x5f\x19\x56\xf9\xf1\xd5\xf9\xc9\xd9\x87\xf3\xd1\x62\x17\xe0\x5d\x1c\xf7\x9a\xf9\x6a\x99\x98\xec\xf5\x45\x3c\x53\xe7\x0c\x77\x74\x62\xce\xcb\xbc\xf0\xf9\x2a\xde\x4f\x68\xdf\xca\x6b\x79\x2f\x6a\x76\xf8\x8d\x30\xdc\x79\x2a\x8f\x76\x39\x4f\xa7\xd7\x17\xfd\x83\x9d\x26\x8c\x04\xef\x4e\xdb\x9b\xf2\x4e\x4e\x6a\xc1\x4e\xe7\xbc\x2c\x45\xf1\x09\x68\xdc\x0e\x73\x79\x77\xba\x32\x81\x42\x3c\x86\x54\xc6\xce\x44\xfc\xb3\xf6\x84\x66\xa2\x14\xb5\xcc\x42\xa0\x74\x67\x46\x51\x32\xe3\xb1\x9f\x1d\xea\x66\xb0\x3b\x22\x23\x9f\x6b\x55\x34\x33\xb9\x8d\xd9\x26\x4c\xa0\x10\x8f\x6b\x76\xa3\x00\x08\x9b\xd4\x4c\xe0\x41\x67\x5f\xe8\xc7\xee\x6d\xd9\xb4\x0f\xab\x5b\x00\x9c\xd7\xf2\x51\x80\x3a\x26\xcd\x1f\x2b\x75\x6b\x47\x32\xdc\xd7\xc8\x77\xcd\x34\x51\x41\xb2\x15\x23\xac\xdd\x4e\x2b\x01\xfd\x75\x97\x60\x96\x45\x74\x2f\xcd\x55\xbe\x3d\x3d\x6f\x37\x69\x2f\xcb\xb7\xa7\xe7\x9f\x8c\x1b\xf7\xe4\x96\x3d\x9b\x4d\xcf\x32\x11\x54\x90\xdc\xce\x7a\xfb\x85\x5c\x59\x8e\x95\x25\xc5\xcc\xb8\x14\xc3\xf8\xd6\x3d\xea\x2c\xa1\xff\xb9\x63\x6a\x69\xaf\xa0\xe7\x79\xcf\x5d\xaa\x2e\x99\xa6\x65\x39\xf6\x23\x7f\x12\xa1\xf6\xb3\xe8\xbf\x70\x76\x06\x69\x60\x8c\xef\xe8\x49\x7b\x61\x72\x59\x83\x03\x70\x19\x33\xd2\xd5\xb9\x32\x50\x19\xac\xac\x09\x45\xf1\x05\x26\x26\xba\x0a\xb4\x8d\x16\xd3\xa6\x40\x30\x57\x28\x4a\x31\xa4\xda\xb6\xf0\x0e\xe0\xe2\xc2\x21\x14\x18\x19\xa3\xca\x62\xf9\xff\xb0\x8f\xe5\x10\x96\xdb\x71\x8e\x6e\x8c\x06\x56\xc5\x5f\x02\x72\x83\x7d\xfb\xa7\x8b\xf7\xef\xd9\xe5\xc7\x1b\xf6\xd3\xc7\xab\xef\xd1\xb2\xba\x68\x0a\x23\xf1\x5b\x3e\x59\xf2\x99\xe7\xd6\x0e\x09\xea\x61\x6d\xbf\x2b\x6e\x61\xbb\x5b\x21\x75\x92\x71\x5e\x5c\x77\x58\x27\x2f\x19\xfe\xf6\x5b\xdf\xf1\x1d\xe6\x08\x03\xec\x3f\x75\x50\x34\x37\x61\xd7\xa0\xb2\xc2\x7e\xaa\x78\xda\x8a\xe5\xd0\x4f\xca\xed\x3e\xe0\x7d\x20\x02\xfb\x14\x46\xb2\xdc\x61\x74\xf0\x9d\xee\x98\xca\x14\x79\xb8\xec\x08\x93\x25\xbb\x4c\x49\x92\x9f\x8e\x2e\xda\x51\xed\x00\xdf\xf9\xee\xba\x3b\xad\x6a\xae\x8c\x2a\x37\x71\x94\x71\xa2\x55\xfb\xe2\x63\x8b\xd3\x10\xb7\x15\x19\x9f\x2c\xbd\xde\x4d\x56\xdd\xc5\x73\x91\x18\xda\xca\x24\x55\x6d\x1e\x54\xdd\x2b\x07\x8d\x5b\xcf\xdb\x13\x73\xef\x3e\x49\xe6\xde\x65\x1e\xad\x31\x84\xb1\xff\xd2\xa8\xc9\xd2\x24\x06\xfd\x17\x7c\xd0\x1e\xad\xfb\xf1\x93\x29\x33\xf4\x81\xee\x28\xeb\x49\xc2\x68\x77\xf5\xcd\x59\x7b\x74\x57\x3c\x57\x9a\x81\xa6\xcc\xce\x44\x8f\x8e\xb8\x6e\xa0\x3b\x31\xc7\x7a\xf2\x34\xfd\xe5\xea\x9b\xb3\x7e\xd2\xa4\x33\x5e\x88\x8b\x8f\x09\x8b\x1a\x3e\x68\x4f\xd8\xfd\xb8\x1a\x44\xd0\x77\x8c\xbe\xf7\x97\x1f\xcb\xc1\xed\x42\x55\xe9\x6b\x6b\x06\x8f\xd4\x43\x25\x33\x06\xe1\xd1\xc7\x8e\x72\x1c\x7e\x5e\x23\xe8\xd8\xad\x5b\xc3\x48\xdc\xec\xbc\x0f\xd4\x0a\xd4\x3b\xec\xa3\x1f\xf5\x93\x76\xd3\xcf\xa0\x7f\x59\xee\x75\x35\x17\xce\x6e\x93\x08\xe6\x8a\x1f\xb7\x97\xe7\xfe\x1a\x1e\x7d\x6a\xda\xe0\x46\x20\x6b\xd3\xf0\x62\x95\xc2\x6d\x0b\xbf\xbb\xc9\x58\x95\x34\x71\xa6\x8d\x44\xfd\x4d\xd7\x58\x66\xd2\x80\xbf\xbd\x92\x40\xba\xf9\x3a\x6b\x4a\xfa\x8d\x75\xf6\x88\xe4\x1b\x1d\x2d\x3a\xdd\xa6\x5f\x51\xed\x69\xbf\xaa\xce\x25\x1b\xae\x57\x57\xd2\xaf\x6c\x10\xe4\x93\x2f\x25\xe5\xcc\x64\xcb\x75\xd2\x5a\xf2\x85\x55\x01\x2a\x8d\x6e\xdc\x11\x47\xd2\x16\xf6\x4d\xfc\x3d\xfd\x56\x8a\x9b\x26\x5b\xa6\x18\x5a\xb2\x61\x3f\x5b\x48\x36\x5f\x4f\x8c\xd3\xaf\x6c\x20\x55\xc9\x97\x36\xd0\x86\x6d\xfd\x16\x3b\x66\xb6\x40\x52\x0b\x79\xf5\xb7\x81\xa2\xf9\x14\x31\x97\xbc\x28\xac\x36\xd7\x0a\xb2\xa4\x84\x0e\xa2\xbd\x9f\x2a\xbe\x72\xa7\xe8\xca\xbd\x17\x65\xef\x45\xf9\x9d\x7a\x51\x7a\xe3\x82\x4f\x58\xf4\xb7\xcf\x32\xe9\x5e\x7a\x00\xe0\x71\xa1\xc2\x00\xbf\xe3\x4a\xf0\xfc\x6b\x14\xb1\xd9\x3b\x99\x3e\x63\x27\x53\xc1\xe5\xe2\xca\xf6\x95\x8c\x4a\xbb\x12\x53\x70\x64\xb8\xc0\x5a\x36\x91\x43\xb4\x26\xc1\x79\xf1\xe9\x1a\x13\x61\x1e\x84\x28\x57\xe3\xa0\xec\x62\xf4\x84\x84\x9e\x3f\x56\x18\xbf\x6a\x94\xab\xf3\x5b\xca\x02\x03\x62\x21\x38\x70\x44\x91\xe6\xab\x59\x22\x88\x3f\x23\x0d\x37\xf2\x1e\x73\x46\xc2\x08\x30\xa0\x70\xfc\xe3\xe9\x4b\xde\x1e\x9a\xe7\x0e\x0b\x9f\xc8\xff\xda\x3b\xf4\xf6\x0e\xbd\xbd\x43\x6f\xef\xd0\xdb\x3b\xf4\xf6\x0e\xbd\xbd\x43\x6f\xef\xd0\xfb\x7d\x38\xf4\x40\x94\xfd\x58\xf5\xa4\x0c\x06\x4c\x1e\x12\xd9\xb1\xe1\x80\x41\x29\x99\xff\xba\x3d\xa8\xd5\xed\xc1\x80\xdd\x1e\x68\x35\x35\xb7\x07\x7f\xc3\x9a\xe1\x94\xaa\x24\x72\x36\xa4\xf7\xb0\x70\xb8\x5c\x54\xc5\x12\xb2\xff\x99\x9c\x42\x5c\x26\x54\xe6\x85\xe6\x2f\x28\xce\x1d\xff\x01\x3e\x3a\xa4\xc1\xee\x64\xa6\xf8\x17\xf5\x6f\xda\x23\x73\xe2\x4e\x4c\xb2\x6a\x9a\x7b\xea\xf3\x0e\x32\x55\x6a\x53\x43\x21\x6c\xbc\x64\x85\x5c\x48\x83\x09\xe7\x25\x65\xf5\x86\xc4\x1f\xb2\x38\xa1\x79\x88\x52\xb9\xda\x35\x7c\xca\x69\xd1\x84\xb4\xa2\x50\x9e\x16\x42\xf4\x55\x4e\x1f\xf1\x75\xee\x83\xc1\x6c\x6b\xf7\x00\xea\x11\xf1\x4c\x7f\x1d\x1c\x54\x9d\xdb\x78\x85\x09\x2d\x63\x55\xc8\x2c\x95\xb9\x62\x07\x31\xe7\x55\x25\x4a\xdd\x83\x90\x8b\x2a\x0c\x15\x55\xa2\xa4\x35\x2b\x43\x85\x1c\x7b\x99\xbb\x8b\x02\x09\x69\x57\x02\x52\x08\x0f\x73\x97\xe4\xa2\x6a\x86\xa5\xb5\x8b\xa5\xcf\x7d\xeb\x52\x0d\x7d\x34\x60\x67\x96\x86\x89\xf6\x8b\x54\xac\x14\xde\x8d\xd1\xf4\x53\xef\x5b\x72\x77\x45\xd5\x25\x0f\x43\x85\xc7\xa3\x91\xff\xd5\x07\x42\x7b\x76\x42\x80\x01\x34\x55\x14\x74\xe3\x44\x60\xd8\x9c\xee\xc7\x5e\x16\x9e\x02\x16\x12\x85\xca\xd5\xca\xfd\x7b\x47\xfd\xde\x51\xbf\x77\xd4\xff\x5b\x39\xea\xb7\x80\x70\x69\xc1\xb7\xb4\x6b\xc7\xac\xce\x65\x22\x0a\x55\xce\xf4\x88\x9d\x2f\x2a\xb3\xa4\x1c\x2a\x07\xb3\xc9\x4d\x8b\xaf\xe5\x4a\x68\x82\x31\xb2\x2f\x21\xf8\xe9\xb2\xf5\xbd\x1e\xa4\xcd\x7d\x8c\x41\x2a\xc6\x00\xfe\xde\x1a\xdd\x46\x46\x38\xd5\x20\x2a\x1a\x51\xe6\xde\xa4\x08\x00\x02\x20\x11\x73\x86\x50\xce\x90\x44\x1e\xa0\x6d\x14\x64\x11\xd5\x62\x61\xd9\xaf\x2c\x59\xcd\x1f\x18\x78\x66\x10\xec\xf7\x69\x78\x38\xfd\x48\x38\xfb\xf8\x89\x7d\xfc\xc4\x3e\x7e\xe2\xf3\x8c\x9f\x58\x07\xe7\xb4\x0f\xb2\xd8\x36\xc8\x62\x55\xc3\x7a\x4a\x30\xc6\x27\x42\xa6\xd9\x1d\x40\xeb\x09\xd8\x59\x9b\x23\x38\x7a\xe1\xcc\x4f\xd8\x7c\x47\x40\xf3\x87\x79\x4b\x19\x03\x0e\xe8\x0a\x69\x5a\xfe\x95\x56\x90\xd6\x20\x14\xd1\x97\x56\x39\x2b\xbf\xe7\xb2\xb0\x83\x1a\x10\x70\x07\x96\xc5\xb4\x8a\xd8\xc0\xb2\x51\xaf\xed\x82\x95\xf3\xc5\xf1\xf0\x70\xd0\x3b\xc0\xb5\x5f\x21\xc2\x3a\xa4\xc2\x4f\x6a\x29\xa6\x21\xdb\xbc\x85\xc9\x1e\x00\x67\xad\xd4\xe6\x70\x27\x39\x66\xd1\x87\x6c\x62\x27\x43\x55\xbc\x26\x6f\x4f\xce\x8c\xcc\x97\x56\x15\xac\x0a\x48\x8f\x47\x64\xab\xf7\x17\xcf\x2c\x2c\xbb\x91\xc4\xac\x39\xbe\x57\xab\x0a\x2c\x5b\xa3\xc1\xfa\x8b\xb4\x01\xa6\xa2\xca\x2f\xce\x56\x51\x2a\xa6\xfa\x86\x10\xe1\x3b\x1e\xa9\x20\x29\x01\xce\x8a\x51\x28\xa2\x8c\xd8\x07\xb2\x25\xf0\x58\x04\x83\x36\x2b\xd6\x05\x10\x60\x7c\xe1\x6c\x5f\x55\xea\xfc\x71\xc4\x6e\x0f\xc4\xa3\xf9\x0a\x8d\x8a\x8f\x53\x8d\xff\x28\x8d\xfd\xd7\x88\x5d\x58\xc1\x2c\x93\xa6\x20\xc0\x82\xda\xcb\x82\xee\x35\x7b\xb0\x9b\xd2\xe3\x95\xa6\xaf\x48\x9e\x2a\x65\x7d\x71\x46\x12\x37\x95\xa7\x16\x7a\xf3\x1a\x3f\xf3\x2c\xa8\x7c\x2d\xb5\x52\x84\xf5\x90\xd9\x6f\x67\x2e\xc6\x24\x94\x77\xc5\xf1\x66\xbc\x64\x75\x53\x62\x6d\x5a\x34\x43\xde\x20\x34\x48\x80\x69\x75\x46\xa6\xc9\x92\x70\x1c\x30\x10\x85\x8c\x70\x20\x5d\x1a\x85\xf5\xb4\x9f\x5d\x72\x78\x8f\x5f\xb2\x2f\x00\xf5\x59\x63\x7d\xfc\x8b\x17\x80\x6a\xc5\xa0\xc6\xb0\xe5\x2b\x70\xc8\x3d\x11\x8f\x2f\x39\x73\x3b\x4c\xa8\x97\xab\x5d\x75\xa0\xed\xed\x8b\xf9\xa6\xf2\x4e\x1f\x2c\x17\xa9\x45\x26\x4a\x80\xf9\x98\x68\x7b\xc6\xf3\x48\x7e\xf3\xb3\xc4\xb8\x06\x6e\x38\x9c\x7f\x7f\x7e\x2d\xdd\xc8\xc1\x10\xf0\xc4\x42\x87\x9f\xcf\x52\xed\x58\xef\x89\x16\xb7\x8f\x2d\xbd\x78\x2d\x27\x95\xc7\xde\xa7\x75\x1c\xcf\xf9\x35\x91\xf4\xcd\x6a\xd5\x54\x80\xde\x62\x69\x3a\x16\x27\x73\x0d\x22\x17\x52\xdd\x14\x62\x0b\xce\x55\xb9\xf2\xfa\x67\x00\xa9\x78\xed\x3b\xb8\x98\x95\xca\xff\x7c\xfe\x28\xb2\xc6\x24\xd9\xdb\x4d\xf0\x5c\x41\x35\xf5\xa2\x60\xd8\x27\xa0\x92\xd3\x03\xf2\x66\x29\xef\x25\xe3\x86\x69\x6e\xa4\xa6\x1a\xff\x7e\x02\xe2\xd1\xd2\x67\x0d\x7e\xa2\x80\xb0\x0e\x07\xd0\xb9\xcd\x06\x00\x7b\x23\x0d\xe1\x95\x2b\xa5\x05\xd5\x43\x26\x30\x3d\xa9\x80\xe9\x21\xc8\x4d\x8d\x88\xe8\x74\xf2\xa3\xee\x11\x46\x31\xbc\x66\x85\x5f\x7b\x79\xfc\x82\x38\x1d\xc8\x76\x03\x16\x35\xfb\xc7\x0c\xd1\x74\x2c\x23\x58\xd8\x4e\x1f\x84\x9c\xcd\x8d\x1e\x30\x39\x12\x23\x90\x9b\x05\xcf\xe6\x51\xb7\x0b\x21\x0c\x06\xa4\x3b\x54\xf9\x68\x8b\x22\xec\x65\x76\xe8\xf9\x15\xf1\x96\x81\x47\xac\xee\x6e\x4d\x72\xb9\x06\x4c\x98\x6c\x74\x34\x60\x99\x5a\x54\x0d\x00\xdd\xdb\x31\x4e\x96\x4c\x1a\x27\x54\x9a\x79\xad\x9a\x19\xce\x44\xb8\xba\x00\x4e\xee\x40\x9f\x24\xa0\x79\xe6\x10\xe1\x78\x7b\x80\xb3\xbb\x3d\x70\xc2\x84\xed\x50\xe2\x34\x60\x86\x73\xae\x71\x67\xd1\xb6\xbc\xe0\x26\x9b\xfb\x42\x16\x75\x2d\x74\xa5\x30\x58\xb2\x0a\x87\xfd\x46\xd4\x8b\x3f\xf9\x2e\x0e\xf5\x51\x58\xdc\xb9\x9c\xcd\xdd\xda\xf2\x1a\x71\xf2\xda\x7b\xf2\x12\xf0\xb8\x3f\xc1\xa4\x44\x3e\x6e\x8f\x09\x5c\xdd\x7d\x2b\xbe\xed\x65\xa0\xda\x00\x7e\x7f\x5a\x3b\xdc\x73\x9e\x61\xaa\x96\xfe\x2e\x84\x61\xf6\x5e\x84\x7d\x36\x72\x21\x06\xde\x68\x1d\x97\x0f\xe8\x88\xa9\x6e\x39\x7d\x75\x82\xdd\x46\x90\x59\x45\x96\xb4\x06\x37\x0a\xb5\xb0\x5f\xb5\xe2\x0f\x81\xad\xda\x21\x08\x37\x75\x76\x08\xd1\x0e\x79\x23\xc8\x23\xac\x72\x02\xb7\x47\x11\xe8\x68\x10\xb1\x0c\xb8\xa9\xaa\xf6\x8c\xc6\xd4\x4b\xfb\x16\xd4\x34\x40\x8f\xaf\xb8\x97\x99\x09\x11\x78\xce\x7d\x8c\x53\xfa\x89\x40\x94\xad\x96\x5a\x0b\x0c\xdd\xa9\x8a\x70\x82\xf1\x53\x85\xd4\x78\x98\x4b\xca\x05\x89\xcf\x9f\xfd\x9a\xbd\x97\x9d\x73\x08\xfd\x01\x19\xd5\x10\x97\x4b\xd7\xd8\xde\x56\x23\xea\x45\x04\x8a\x05\xb4\x4a\xbe\xcc\x01\x5c\x3d\x78\xdb\xb3\xa8\xd6\x8b\x49\xbe\xd2\x77\xbc\x37\xb3\x21\x68\xb6\x86\x15\x9d\x85\x12\xd3\xc2\xf8\x10\x85\xc3\xd2\xca\xb9\xf6\x38\x59\x42\x0c\x24\xc0\x89\xe1\x45\x0c\xfc\xce\x6a\x51\x60\xf0\x32\x9d\xd7\x99\xbc\x17\x65\x00\xf3\x3c\xd4\x47\x47\x91\xaf\xc9\x9e\x83\x50\x73\x2e\x53\xc3\x42\x81\xa3\x9e\x1d\xba\xa3\x7d\x64\x8f\x94\x3d\x4e\xad\x87\xa5\x91\xc3\xd0\xc2\x92\x96\x01\x7b\x80\xb3\x13\x35\x83\x88\x4e\x3b\x19\x28\xaf\x41\xf1\x9a\xa8\x2d\x02\x5d\x7b\x80\xb9\xdc\x3b\x4f\x88\x9f\x0b\x92\xaa\x3b\xb1\x64\xb7\xcd\xeb\xd7\x5f\x66\x46\x55\xaa\x50\xb3\xe5\xf7\x62\x09\x3f\x88\x88\x04\x72\xc2\x65\x5e\x62\x97\xaa\x24\x22\x89\x77\xc5\x31\x83\x68\x21\xa5\x8e\x22\x47\xd7\x96\x5a\x0c\x5f\x4d\x15\x5a\x8c\xc1\xf6\xb7\x29\x41\xe1\xb7\xd3\x2b\x64\x03\x6f\x53\xcb\x2c\x5d\xb0\xa3\x7b\xe1\x42\x14\x7e\xd7\x13\x22\x6c\x78\xe6\xe9\x95\x63\x30\xd1\xa3\xd5\xf3\xc5\xab\xaa\x90\x58\x4a\xe3\xd0\x6d\x03\x9f\x71\x59\x6a\x73\xf4\x27\x56\x36\x96\x05\xd7\x4c\x80\x7f\x93\xb0\x0d\x79\xa9\xd9\xed\x81\x3b\x6f\xaf\x74\xf8\xc0\xed\xc1\x4e\x21\x52\xf1\x96\xa4\xab\x0a\xbd\xdc\x79\x76\x64\x52\xaf\xbb\x6c\x0e\x2f\xd7\x13\xfc\xb0\x74\x9f\xe4\x3e\x44\x0b\xb0\xcd\x1d\x28\x97\xe1\x06\x14\x98\x12\xd1\xb9\x03\xce\x13\x1d\x77\x4c\x71\x9e\x84\x0c\xbe\x33\x4a\xfc\xb3\x4b\x54\xa8\xfc\xa4\x34\x72\x6b\xa9\xbd\x34\x72\x0b\xd1\xbd\xd5\xea\x77\x2b\xbf\xc7\xc7\x74\x2f\xc4\x6f\x27\xc4\xf7\xad\xd9\x5e\x92\xff\x8c\x24\xf9\xd6\x26\xfd\xf3\xc4\xf9\xdd\x87\xb1\x97\xe9\xff\xad\x65\x7a\x88\x97\x89\x62\xd8\xd7\x70\xaa\x56\x5b\x47\x30\x49\x40\xa4\x1f\xe1\x3c\x8c\x41\x44\xaa\xc5\x42\x19\x17\x90\xc3\x32\x5e\x14\x7b\xf7\xc8\x6f\xee\x1e\xf1\x0e\xaf\x34\x3f\xf7\x8f\xad\x1c\x48\x71\x7f\x8a\x2e\xba\xab\x6b\xbe\x58\xf0\x32\xf7\x55\x06\x60\x41\x54\x59\x2c\xe3\x77\xa7\x74\x43\xa5\xc6\x47\x96\x89\xb6\xba\x8e\xb2\x16\xf7\x1e\x9c\x4f\xe8\xc1\xd1\x26\x17\x75\x62\xaf\xaf\xe1\x77\xd8\xa8\xba\x89\x43\x19\x50\x40\xa3\xa7\x9a\xb8\x40\x2d\x30\x89\x46\xe4\x01\x2e\x3c\xba\xc5\xad\xa3\x60\xfb\x4b\xd5\x9c\x80\xb1\xc8\xc4\x35\xbe\xb6\x3f\xbb\x91\x0c\xfc\xb7\x28\xb3\xc1\xf9\x99\x64\x59\x35\x76\x60\xb5\xe0\x8b\xc8\x1b\x41\xe3\x01\x85\xb3\x3b\x92\xde\xf2\x17\x30\x14\xd5\x98\xe4\x58\x94\x95\x2e\x7b\x97\x05\x9e\xbe\xec\xb2\x98\x54\x12\xc9\xcd\xcd\x5f\xfb\x46\xc1\x99\x31\x4b\x5f\xd8\xc8\xaa\x34\xa8\x8a\x25\x87\xe0\xb2\xe5\x2a\x0e\x89\x24\xb1\xf0\x17\xee\x63\xdd\x94\x56\xc0\x60\x1a\x29\x9b\x21\xa5\xc3\xf7\x4c\x01\xda\x0f\xaa\xbe\x13\x35\x4a\x7d\xae\x12\x62\xb7\x8f\x2d\x77\x60\x47\xc7\x7e\xa8\xc3\xb5\x9e\x1f\x85\x5a\x69\x1e\xd0\xc5\xc5\x00\xb9\xd5\x71\x71\x49\x59\x5c\xb6\xcd\xe9\xf1\x9b\x82\x3b\xa8\xbc\x19\xf9\x94\x12\x16\x14\x6d\xc6\xb5\x9a\x08\x28\xd7\xbf\x9a\x99\xc6\xb5\x01\x49\x0e\xaa\xaf\xda\x76\xb9\x5b\x44\x1c\xca\xf3\x4c\x25\xf0\xd1\x5f\x07\x30\x8a\x9b\x9a\x97\x1a\x5e\xde\x34\x94\xd6\x00\x98\xf1\xef\xb9\x5c\x1c\x4b\xb9\xc9\x07\x08\xd1\xda\x50\x14\xe8\x65\x06\xda\x1b\xdb\xf5\xdd\x8e\x91\x5d\x05\xcc\xc6\x0f\x3d\xc9\x54\xfa\x62\x9f\x7e\x28\xe5\x2f\x96\xec\xa8\x52\x0c\x1f\x54\x9d\x0f\xa2\xd8\x27\x7c\x27\x1c\x1d\xb7\x4c\xaf\xf4\x56\x9f\xec\xf3\xb4\xb6\x03\xe5\xda\x0e\xd6\x70\x16\x2c\x67\xb1\x17\xfc\x06\xa8\xe2\x3b\x7b\x93\x06\xec\x87\xf2\xae\x54\x0f\xbb\xa7\xc0\xd9\xab\x5b\x28\x9e\xeb\x63\xab\xaa\xd9\xff\x1b\x16\x72\x8a\x69\x4b\x7f\xb0\x7f\x45\x95\x0e\x13\x33\x31\xc9\xe0\xa5\x9b\x65\xe5\x41\x26\x5c\x95\xa8\xce\x1c\x7e\xcb\x61\x3e\xd9\x84\x03\xe7\xb1\x5f\x20\x3e\xbb\xbc\x3e\x55\xe5\x54\xce\x36\x10\x1f\xdf\xae\x25\x8d\x9e\x5d\x5e\xb3\x8a\xd7\x7c\x21\xac\x5e\x41\x71\x90\x0a\x13\x8d\x73\x77\xeb\x14\xd9\xc0\x01\x52\x21\x14\x6f\x3b\xbb\xbc\xc6\xcc\xba\xcd\x72\x32\x18\xe9\x50\xa6\x59\x97\x77\x6a\x47\x03\x05\xb3\xb0\x2d\xbb\x18\xdb\x51\xd4\x42\x6b\xa1\x89\x59\x78\xc6\x52\x55\x3e\x3d\xc0\x4e\x64\x62\x6f\x44\xf4\x99\xfe\xc1\xb2\xb3\xa6\x2a\x24\xb2\x8e\xf8\x85\x50\x8b\x6f\xa1\xee\xd7\x2b\x4f\xab\x76\x52\xb5\x39\xa9\xd6\x4e\xce\x0a\x7e\x85\x9d\x19\xb5\xef\x4c\x0a\x4a\x4f\xe6\xc1\xda\x00\x93\x72\xaa\xca\x56\x13\x12\x56\x4a\x13\xab\x93\x61\x57\xf6\xcb\xa8\x0d\xfb\x0e\xc1\x4f\x21\x4b\xe6\x34\x24\x78\x49\xdd\x8b\xba\x96\x60\x20\x52\x9a\xcc\x44\x76\xb1\xb9\x17\x8c\x61\x54\xa9\xcd\x7f\x8e\x92\xe9\x8f\x27\x0e\x06\x16\x55\x0b\x2b\x5e\x26\xc1\xd1\x5a\xab\x8a\xed\x58\xae\x16\xc0\x53\x2d\x41\x9c\x2b\x6d\x86\x70\x94\x0a\xa5\xee\x9a\x6a\x9b\xd3\x43\xdd\x54\xdc\xcc\xb7\x5c\xed\xd6\x1b\xcf\x38\x3f\xdb\xab\xd4\xdd\x65\xda\x82\x2e\x50\xcb\x2d\xa9\x03\xb6\xf6\x34\x22\x75\x68\x3d\x95\xd8\xee\xde\xa7\x62\x5b\x51\x66\x49\x67\xd6\x58\xbd\x29\xb9\x48\x3b\xc9\x64\xe7\x8f\x22\xdb\xce\x4a\x10\xb5\xdc\xd6\x46\x00\xe8\x30\x7d\x16\x82\x56\x11\x41\xd4\x46\xf7\x75\xe1\x7e\x03\xc3\x01\xae\xf4\x2a\x28\x13\x3e\x70\x5b\x4b\x3b\x48\xcd\x23\xeb\xc1\x88\xf1\x7a\x76\xcf\xe0\xae\x22\xb2\x01\x3d\x40\x7a\x0c\xe0\x1a\x7a\x2e\x5a\x7b\xbe\x4d\xa1\xe9\x7e\x83\xc6\xe9\xde\x98\xf1\x6f\x61\xcc\xb8\x22\x3d\xbc\x6d\x31\x10\x75\xad\xea\xdd\x2c\x06\x3b\xdb\x2e\xd2\x5f\xfe\x6d\x6c\x15\xe9\x6f\xab\xc6\xec\xfc\xf1\xdf\xce\x36\x11\xe8\xfa\x27\xb1\x13\x5c\x8c\xd7\xb1\xa2\x20\xec\xc2\x11\xae\x17\xa1\x18\xb3\x93\xea\xe8\x32\x1f\x56\x45\x53\xf3\xe2\x88\x41\x9f\xe4\x17\x19\xb1\x73\x9e\xcd\xa1\xe9\xd2\xe5\xb0\xea\xb7\xb7\x25\x63\xec\x62\xfc\x96\x9d\x94\x91\x34\x1d\x4d\x3d\x06\xc5\xb9\x52\x8d\x01\x95\x96\x1b\x56\x08\xab\x42\x12\xe5\xc3\x8b\x89\x68\x42\x1b\x79\xbe\xac\x56\xe7\x26\x2b\x20\x27\xad\x31\x1c\x5e\x8c\xef\xbf\x62\xca\x4a\xf9\xf7\x5f\x1f\x31\xae\xb5\x9c\x95\xad\x11\x3d\x3b\xe3\x62\x63\x31\x58\x6c\xd2\xa9\xff\x4a\x51\x21\xfb\x6a\xaf\xff\x7c\xae\xbe\xa9\xda\xab\xdd\xaa\x4f\x3c\xc0\x97\x51\x6f\xf6\x75\x5e\xf7\x75\x5e\x3f\x55\x9d\x57\x20\x94\xdb\x45\x03\x6d\x2a\xed\xaa\xf2\xf7\x6a\xb6\x9d\xda\x14\x1a\xa6\xb5\x26\xcb\xb7\x9c\xda\x54\xa8\x99\xc6\xf3\xbb\x77\xab\x7e\xde\x6e\xd5\x29\x14\xd7\x25\x55\x84\xa4\x34\xbb\x7b\x3b\xa8\x20\x3b\x68\x1f\x53\x55\x14\xea\x21\x91\x77\x0a\xbf\xe3\x82\xab\xd9\xaa\xb4\xb8\xb5\x70\x2a\x4b\x2d\xb2\xa6\x16\xd7\x77\xb2\xba\x79\x7f\xfd\xa3\xa8\xe5\x74\xf9\x0d\xcf\xee\x44\x8a\x12\xaf\x6b\xdd\x15\x25\xc1\x95\x55\x49\x32\x54\xd2\xf9\xc1\x20\xc7\x72\x2a\x6b\x24\xb6\x00\x76\x27\x4d\x14\x13\x58\xdf\x5b\x72\x9e\xd9\xa3\x0e\xa9\x5b\xde\x2a\x3d\x71\x9f\x01\x69\x24\x53\x65\x29\x32\x24\xfd\x6a\xc4\x22\xe3\xd5\x82\xdf\xa1\x6e\xf8\xdd\xcd\xcd\xf8\xda\x37\x54\xa5\x47\x4d\x6e\x8f\x8c\x50\x10\x43\xff\x34\x47\x32\x88\x39\x24\x9c\xf8\x95\x0c\x29\xff\x3d\x4c\xdf\x6f\x02\x64\x54\xe1\xe8\x6a\x91\x09\x89\x13\xe1\x0b\x11\x78\x4b\x2d\x78\xe1\x80\x4b\x46\xcc\x85\xf8\xd0\x0f\x34\xad\xa9\x9c\x35\x94\xc9\x1b\x7d\xc0\x7f\xfc\x95\x66\x37\xef\xaf\x59\x56\x0b\xc8\xcc\xe5\x85\x1e\xd8\x8f\x7a\x64\x1e\x3b\x5e\x67\xc5\x77\x13\xa7\xab\x19\x7f\xdd\x7e\xec\xbe\x29\x4a\x51\x83\x3c\x0b\x16\x9c\x05\x2f\xdd\x79\x5c\xc8\x3c\x2f\xc8\x15\x79\x47\xd1\x41\xbc\xa4\xbf\x01\xfe\xd6\xed\x26\x5c\xf4\x4c\x54\xb4\xe1\x99\x69\x78\x11\x96\x23\x53\x0b\xbb\x0a\xc9\x05\x38\x4a\x9f\xc8\xbd\x0c\xf0\x72\x32\x00\x80\x14\x7e\xb3\x34\x29\x0b\xf1\xc5\x94\x69\x61\x30\xda\xaa\x6c\x16\x13\x01\xa9\x90\x93\xa5\xc1\x40\xea\x5a\xf0\x3c\x2c\x08\x1d\xfc\x89\x98\xda\xf9\x18\x51\x2f\x64\xc9\xfd\xa2\xdb\xed\x46\xbd\xd5\x5d\x1a\x0a\x0d\x73\x80\x01\x70\x10\x2a\x80\xef\x9b\x4a\xcb\x15\x0a\x89\x65\xc8\x0b\x35\x9b\xc9\x72\x16\xf3\x07\xd3\xd4\x25\xd3\x85\x9c\xcd\x4d\xb1\xa4\xe8\xcf\x3a\xfc\x50\x58\xcd\xc8\xcc\x79\x37\xca\x19\xa6\x1a\x9d\x28\x7b\x2e\x67\xa2\x3e\xb0\x34\xd4\x6a\x8a\xf8\xd3\xd7\x5f\x41\xca\x7b\x2d\xee\xa5\x4a\xb9\xf6\xae\xf0\xf3\xae\x81\x9f\xa9\xc8\x23\x9a\xbd\x4a\xee\xd7\x69\xff\xb2\xcc\xc4\xb5\xc8\x94\xdd\xa2\x84\x99\x3e\xe4\x46\xc8\x85\x00\x44\x25\x6c\xeb\xd7\x3a\xf2\x79\x43\x13\xd8\x93\xc0\x81\xe6\xea\x81\x06\x74\x41\xfc\x1c\x6f\x46\x65\x69\x50\x4e\xbc\x1f\x5e\x44\xbf\xd5\x03\x07\xbc\x8c\x1a\xe2\xe3\x80\x4d\x81\xec\x01\xc3\xf4\xb6\x06\x68\x10\xd9\xeb\xed\xa2\xc0\xd9\x6e\x7d\x42\x7a\x7d\x7b\xda\xd8\x03\x3a\x60\xa5\xc2\xde\x56\xdf\xfc\x58\x86\xda\xf3\xf1\x92\x30\x84\xff\xcd\xc0\xe5\x0e\x27\x60\x12\xed\xea\x96\xfb\xe9\x3b\x48\x2c\x70\xc9\xae\xde\x9d\x7e\xf9\xe5\x97\xff\x0b\x16\x41\x1b\xbe\xa8\xfe\xed\x96\xf0\xf9\xae\x7e\xc3\x65\xf1\xde\x8a\x92\xdb\xd2\x91\x02\xe4\xce\x98\xa0\xfa\xf4\x01\x3b\x3b\x5a\x76\x58\x0e\x00\x70\x76\xc3\x1d\xe0\x73\x5e\x0b\x68\x50\x86\x2e\x00\xb5\x21\x4a\xe4\x0e\xf7\xd1\xcd\x3f\xb5\x1e\xdb\x1d\x20\x7f\x34\xd2\xf3\xc3\xc0\x26\x9e\xe7\x96\x07\xba\xe3\xa4\x6a\xf7\xcf\x4b\x5e\xaa\xe8\x74\x91\xec\x33\x11\x33\x49\xd9\x14\x53\x26\xee\xad\xe4\x1f\x51\x3d\x4f\x2f\x9f\x68\x46\x7b\x19\xd7\xf8\x58\xd5\xe6\x9d\xaa\x1f\x78\x9d\x6f\xa7\xd3\xac\xbe\xb0\xd1\x23\x54\xa9\x1a\x60\x65\xec\x3b\xa0\xdd\x20\x90\x1c\x16\x12\xf8\x49\x4c\xae\x55\x76\x27\x0c\xc5\xf3\xff\xdd\xb6\xfe\x3b\x75\xe6\xdd\xee\x18\xb8\x8b\x67\x64\x49\x37\xac\x36\x76\x07\xec\x7f\x35\x3b\x04\x37\x00\xd3\xc2\xbe\x61\x44\x7e\x04\x8b\x49\x9f\x54\xf7\xa2\x1e\xb1\x71\x34\x0a\xd8\x13\xcb\xce\xae\xc7\x67\x7f\x0d\x92\x13\x82\xed\x8a\xe0\x50\x1e\xb1\x0b\xe3\x22\xae\x75\xf8\x2c\xc6\x8e\x51\x40\x16\xdd\x5e\x1a\xf7\x5c\xf0\xdc\x8a\x94\xa1\x88\x08\x49\x0b\x7b\x8d\x6e\x8f\x23\xf2\x3b\x96\x23\xe1\x9a\xad\xb3\x32\xd6\x44\xc0\xe8\xce\x39\xff\x75\xfa\xaa\x6f\x76\x0f\xa6\x69\xf5\x97\x5f\x24\x23\x01\xd6\x1a\xb8\xc7\xb5\x7a\x5c\x6e\x49\xdb\xa2\xa6\x9b\xa9\x9a\x6d\xbc\x37\xd6\xec\xaf\xf6\xef\xfe\x6a\x27\xeb\x7e\x40\xcd\x0f\xba\x03\x3f\x5c\xbd\x87\x00\x1e\x7b\x68\x2c\x8f\xec\x46\xe2\xe2\x55\xa0\x39\xdb\x46\x69\x63\xd6\x8e\x17\xf7\x4a\xf0\xdc\x5e\x07\xfd\x2d\x37\x6b\x71\xe0\xba\x6d\x43\xe8\x30\x1a\x1c\x08\xe3\x32\x24\x36\xf9\x18\xc4\x8d\xa1\x29\xd4\x0e\xa0\xdf\x56\x5c\x59\xed\xc7\xa9\xd8\x85\xf0\x18\x87\x41\x04\x24\x44\xeb\x06\xe3\xdf\x2b\x1d\xfd\x0c\x66\x79\x08\x71\x0b\x69\xbe\xcb\x2a\x05\x70\xb8\xe3\x9a\x5e\x8b\xac\xa9\xa5\x59\x9e\xaa\xd2\x88\xc7\x4d\x8e\xbf\x4e\x6b\x36\x57\x45\x0e\x51\xd6\xc3\xc2\x1e\x3e\xa6\xe9\x39\xe3\x06\xcf\xa5\x2b\xe8\xa7\x16\x8b\x10\xc1\x2d\x6a\xab\x1e\xd8\xcb\x67\x2f\x95\xb2\x0a\xac\x14\xb6\x23\x2b\xe2\xf3\x42\x2b\x46\x77\xce\xae\x86\x7f\x67\xa4\xdb\x1f\x1f\x31\xf6\x0e\x72\xdb\x90\xfc\xb4\x90\xdf\xba\x6d\x99\xe1\x77\x5e\x79\xb3\x3b\x0f\xb2\xde\xb4\xf3\xfa\xea\x04\x37\x13\xf2\xa9\xfe\xb6\x56\x4d\xc2\x7b\x7b\x82\xc2\x29\x2f\x00\xdc\x0f\x13\xd9\x78\x41\x49\xbf\x2e\x40\xd0\xa5\xa8\x5b\x11\x38\x82\xad\x83\xb8\x19\x30\xd9\xc2\xea\x38\xb8\x6b\x7b\x6b\x31\xdf\x19\xce\xc8\xf7\x64\xb6\x33\x8a\x65\x73\x5e\xce\x50\xd1\x54\x0f\xb6\x8b\xb9\xac\x90\x3f\x70\x0f\xea\x8d\x32\xaa\x7d\xec\x31\x9c\x2a\x95\xbf\xbd\x2d\x6f\xcb\x37\x28\x69\xab\x07\xd0\x4d\xbe\xbd\x38\xf3\xaa\xa6\x6d\xf5\xee\x1a\xa6\xc8\xbe\xc0\x56\x5a\x98\x99\xcc\xd9\x04\xcd\x9a\x5a\x18\x76\x58\x8a\x07\x84\x34\xf4\x38\x7a\x74\x8c\x5d\x3d\x08\xea\xcd\x7f\x9c\xba\x3c\x62\x5f\x62\x9f\x95\xa8\x17\x12\xf2\x5d\x6d\xbf\x78\x10\x3e\x5e\xbd\xa2\xa8\xce\xfa\x61\x58\x3f\x0c\x87\xc3\xa1\x1d\xeb\x05\xc0\x17\x3a\xed\xd2\xad\x81\x4f\x9f\x5c\xa8\xdc\x29\x04\x61\x25\xec\x11\x0c\x9f\xd0\x2e\x0d\x7d\x05\xb0\x74\x9d\x3e\x48\x1b\x7d\x0a\x2b\xdd\x57\x1c\x23\xd1\xc8\xf3\xf0\x18\x5d\x0c\xf6\x0b\x74\x8e\x9e\x31\x3a\x8d\xd6\x03\xb2\x83\xe1\x07\x2b\x8a\xb9\xd2\x3c\xb2\xd4\x32\x17\xf6\xd4\xb6\xea\x88\x60\x40\x6a\x59\x2c\xe1\x80\x41\x1e\x66\xeb\x00\xa1\x91\x83\x10\x27\x19\x8d\x98\xca\xb6\xf9\xe1\x1c\x76\x96\xec\x08\x14\x1f\xe8\x7a\xce\xef\x05\x2b\x15\x13\xd3\xa9\x65\x90\xaa\x64\xa2\x9a\x8b\x85\xa8\xad\xb0\x10\x7f\x48\x37\xd9\x9c\x71\xfd\xd6\x52\x85\xda\x6e\x18\x5a\xb2\x17\xbc\x42\xa2\x00\xe0\x0b\xb9\xac\x5d\x45\x10\xba\x88\x76\xef\x6f\x0f\x3e\x96\x57\x4a\x99\x0f\x52\x03\xbd\xbb\x3d\x80\x37\x6e\x0f\x4e\x8a\x07\xbe\x44\xa4\xcb\x8e\x95\x80\xe5\x91\xd6\x1c\x35\x4c\x26\x0e\x34\xe5\x49\xdf\xbd\xb5\xc7\xd1\xde\x00\xa3\x00\x34\x12\xf9\xba\xa9\x97\xc8\xd9\x57\x0c\x0d\x55\xad\x32\xa1\xf5\x88\xfd\xa0\x85\xf6\x59\x37\xae\x1e\x89\xa4\xc3\x3a\x62\x1f\xf8\x12\x49\xdb\x04\x71\x3e\x64\xc9\xba\xb4\x06\x8c\xff\xf4\x6c\xa2\xcc\xbc\xdb\x00\xeb\x3a\xae\xd0\xa8\x81\xf3\x9a\x34\xb1\xed\x73\xb5\x7f\xa0\x81\x3a\x26\x82\xc8\xb5\xb9\x89\xe8\xe6\x76\x77\x01\xd6\xef\x52\xc1\x16\x25\xac\x23\xab\x4e\x9f\xb0\x5e\xa0\xb6\xdb\x85\xe5\x1a\x52\xfc\xcb\x61\xad\x50\xd1\xae\xd1\x10\x06\x76\x95\x95\xab\xed\x0a\x26\xc1\x13\xb9\xe0\x33\x88\xb7\x71\xcb\x6d\x14\x13\xa5\x6e\x6a\x97\xf7\x1f\xf9\x3e\xe8\x53\x3f\x5c\x9c\xb1\xd7\xec\xd0\x7e\xeb\x08\xd6\x11\x6a\x2c\x81\xbb\xce\x6a\xe5\xed\x31\xca\xa9\xeb\x02\x86\x04\x3b\xc8\x54\x8d\xb6\x18\x30\xc7\xc1\xd1\xa6\x31\xd9\xdb\xea\x08\x5c\x25\x6a\xbb\x5a\x50\x51\xfa\xf3\xdb\xf0\xb4\x35\x1a\x36\xf3\x07\xdd\xe7\xe6\xfc\xe1\x09\x77\x21\x36\x60\xd9\x9d\x6d\x0f\x13\xb7\xcf\xc5\x18\x74\xf1\x68\x3f\xc7\x85\x7b\xfa\x4d\xd1\xe2\xbd\x2c\x9b\xc7\xde\xf2\x61\x76\x85\xaf\xcf\xa1\x0d\xf4\x0d\x5f\x57\x14\x6d\x0f\x25\x16\x56\xa4\x03\x77\x26\x83\x79\x34\x9d\xf9\x07\x67\xd2\xc5\xac\x31\xce\x6a\x5e\xe6\x6a\xb1\xf2\x35\x0f\x70\x11\xa6\xc6\x7e\x47\x7b\xb0\x75\xe9\x8d\xf3\xd6\x46\xc0\xd6\x64\x99\x5a\x54\xe3\x5a\x4d\x93\xa5\xb7\x51\xd6\x81\x36\xb1\xb6\x6f\xd5\x9d\x6e\xa6\x64\x80\x1d\xdf\xb1\x6a\xeb\x75\x7b\x0c\x76\x54\x91\xb0\x08\x1c\x6a\x6d\x22\x07\x48\x93\x3a\x3e\x2b\xe0\x37\x90\x35\x80\x6b\xc0\x6d\x84\x9b\x2b\xcb\xce\x1e\x0f\x56\x93\x95\xa2\xf9\x80\x31\x43\x2e\x78\xbd\xb4\xac\x10\xb7\xba\x75\xe2\x4a\xe5\x3e\xed\xe3\x42\x73\xca\x0c\xb1\x82\x55\xea\x96\xec\x66\xd7\xb1\xb7\xc7\xae\xc6\x52\x67\xa6\x48\xe5\xdb\xe1\x03\x50\x40\xa2\x30\x44\x8f\x6b\x94\x33\x7a\x15\x6b\xa0\x38\xfd\x14\xcb\x18\x02\xb2\x89\x15\x2c\x9b\x32\x00\x6f\xbb\xf6\x87\x7d\x69\xb0\x47\x6c\x21\x67\x73\xe3\x39\x47\xc1\x9b\x32\x9b\xbf\x44\x26\x0f\x4e\x06\x26\xfc\x20\xcb\x5c\x3d\xe8\xb5\xf4\xe2\x27\x6c\xe3\xae\x4f\xe6\x95\xa9\x5d\x69\x86\xf2\x29\x4c\x14\xaa\x1f\x1f\x80\xee\x7d\x74\x1b\x6d\xd7\x73\xf4\x4f\x60\x5c\x5b\xc3\xc0\xe0\xea\x74\xba\xf4\xf7\x7e\xcb\xf8\xb0\x0e\xb9\x48\x57\x88\x68\x5f\xde\x74\x1b\xdc\xda\x34\x8e\xc7\xda\x91\xf6\x7b\x68\xae\xe5\xac\x84\x62\xd7\xeb\xe1\xf9\x1c\xae\x3f\x1a\xa3\xb8\xd6\xed\x3a\x82\x64\x10\xe4\xf7\x4a\xe6\x48\xbb\x10\x8b\xe5\xfc\x91\x67\x86\xbc\x8a\xa8\x50\x04\xa0\x32\x2b\xc9\x6e\xc6\xa0\x82\x9c\x6d\xc2\x83\x4f\xb9\xd3\x23\xeb\x4b\x16\x80\xe3\x11\x55\x0c\xc6\xd7\x33\xb4\xe7\x81\x43\x5b\xcd\x26\xaa\x46\xfe\x64\xf7\x59\xa7\xa3\x35\xdb\x44\x00\xd4\xeb\xcc\x29\x95\xc8\xd0\x3c\x19\x3d\x5a\x9b\x29\xd6\x31\x46\xd1\xf5\x4e\x04\x55\x67\x46\xde\x8b\x33\xc1\xf3\x42\x96\xfd\xb1\x06\x78\xd8\x78\xc1\xf2\xa6\xe6\xce\xfe\xe4\xa2\x0d\x9c\xdb\x9a\xdc\xc7\xd8\xa5\x03\x0e\x00\xc4\x80\x18\xc4\xf1\xda\x0a\xd2\xe0\x6e\x8e\xa2\x14\x08\x1d\x08\x45\x11\x78\xdf\x2a\xa4\x08\x0e\xb4\xe0\xf5\x9d\x95\xb3\x2d\x3d\xa5\x52\x4e\x77\xd0\x4e\x6b\x95\xc9\x76\x7c\x85\x76\x95\xa8\x16\xbe\x84\x42\xa5\xb4\x84\x6f\x13\x03\xd9\x52\x20\xe3\xbd\x35\x3e\x2d\x49\x6b\xd3\x47\x34\xc2\x45\x90\x4d\x51\xc5\xcf\x1d\x28\x52\x5c\x6c\x93\x37\x46\x41\x35\x88\x6b\x2c\x12\x7e\x92\x65\xf6\xaf\x1b\x75\x27\x52\x9e\x80\x35\xad\xa3\xd8\xba\x87\xb9\x30\x73\xc2\x6e\xc4\xd2\xe3\x1c\x1b\x32\x03\x2d\xc3\x05\x86\xcf\x73\x43\xd5\x31\xa9\x72\x56\x5a\x2d\x88\x4e\x57\xaf\x93\x27\x12\x80\xb0\xfa\x1b\x21\x31\x79\x56\x7b\x1a\x1a\x50\x80\x1c\x59\x88\x8b\x65\x10\x1a\x00\x0d\x94\x32\x6e\x6f\x20\x24\xd2\xef\xb2\x4b\xa9\x58\x09\x90\xe4\x68\xf6\x58\x35\xa4\xbf\x00\x3b\xf6\x83\xb6\xcb\xf0\x38\x0c\xc9\xed\xc3\x8a\x9b\x6c\x3e\x84\x84\xe3\xe1\x9d\x58\x12\x3c\xe5\x41\xb2\x95\x3d\x28\x46\xcc\x6c\x23\x78\xc1\x76\x96\x97\x3a\xa4\x9d\x27\x81\xe9\xd7\x67\x98\x8f\xd8\x38\xfc\x18\x38\x28\xac\x59\x27\x1d\xda\xc1\xaa\xfa\x8c\x5c\xdb\xa5\x0b\x25\xc4\xab\x4e\x26\x9f\xb2\x9d\x96\xfc\x94\xf4\x63\x9a\x5b\x9f\x55\xec\x5a\x18\x9c\x11\x1a\xc4\x5a\xc2\xd8\x59\xcb\x6a\x73\x8a\xf9\x32\xef\xac\x00\x7b\x7b\x90\x30\x0c\xbd\x8a\x5b\xfc\x24\xcd\xfc\x3b\xa5\xcd\xa5\x30\xaf\x06\xed\x47\xf6\x6f\xea\xfa\x95\x3d\x60\xaf\x2e\x55\x29\x5e\x8d\xba\x0b\xeb\xb3\xb9\x43\xa2\x7f\x5f\x5a\x39\x0d\xde\x23\x54\xc2\x83\x28\xc3\xf9\x46\xa1\x65\xcc\x7e\xc1\x09\x56\x56\x44\xe2\x50\x15\x11\x5a\xcf\x71\xac\x0f\xaa\xbe\x1b\xb0\xa5\x6a\xf0\x05\xa3\x7c\x18\x43\xb4\x48\xe2\xd1\x17\x72\x31\xaa\x7f\xda\x49\xf3\x96\x28\xf9\xa4\x10\x44\x33\xde\xcb\xf2\x2e\x71\x85\xcf\x57\xda\x24\x08\x4a\x9c\x52\x85\xb0\x1c\x44\x60\x74\x44\x53\x64\xf9\x7f\x70\x45\xa0\xa6\x22\xd2\x4c\x51\xde\xcb\x5a\x95\x50\xb1\xfd\x9e\xd7\xd2\x7e\x4b\x0f\xda\x10\xa5\x7a\x59\x1a\xfe\x08\xe9\xe8\x50\xb1\x8d\x15\x76\x14\x23\xe6\x78\xd2\xdb\x2d\xf3\xd9\xbc\xf5\xf1\x74\x0b\x8a\x15\x4c\x95\x11\xed\x22\x0d\xc9\x2b\x70\xec\x3c\xd5\x8a\xd8\x20\x35\xe6\x25\x13\x8f\x12\xeb\xd0\x5b\x26\x69\xa7\x8e\xc6\x1f\xb0\x78\x0c\xe1\xea\xc0\xc5\xe3\x19\x1d\x06\x34\x87\xb2\x5c\x4c\x1a\x88\x70\x24\xab\x2d\xe8\x2e\x99\x27\x64\xe1\x5a\x83\xa3\x1c\x43\x9c\xca\x19\x12\x00\xf4\xc3\xca\xb8\x3d\x18\xbc\x09\xf0\x0f\x88\xa0\x5b\x5f\x88\x38\xab\x44\x06\xbe\x45\x55\xe7\x88\xe1\x49\x11\x4b\x89\x75\x40\xe5\xad\x35\xab\x81\x0b\x80\x71\xdb\xea\xde\x8a\x96\x45\x37\x13\x5f\x47\xa9\x55\xce\x5a\x33\x5e\x54\x73\x4e\x9e\x21\xca\x26\x06\xbb\xf4\x5c\x01\xea\xa2\x1d\xb1\xc3\x91\x00\x91\x14\xcf\x2d\x7c\xef\x7c\x75\x53\xd9\x54\x80\xd4\xfb\x12\x24\x7e\xb5\xfb\x17\xa7\xf5\xf6\xb2\x9f\x14\x92\xeb\x54\x80\xdc\x77\xe1\x21\xe5\xf8\x29\x27\x89\x39\x55\x16\x6a\x0d\xc1\xb2\x5d\x8c\x69\x7d\x1c\x69\x6a\xdf\xb8\xb0\x3d\xf8\x8a\x55\x46\x98\x8c\x84\x99\x80\x18\x05\xab\x0f\x66\x4b\x20\xc2\xa5\x2a\x87\x11\x4d\xf2\xd0\xce\xcf\x5d\x5d\x3f\xbb\x2d\x16\x55\x56\xbb\x2d\xe9\xc5\xf8\x34\x01\xf8\x43\xa7\xd4\x36\x78\xa5\x99\xac\xb2\x60\x09\x48\x10\x94\x0d\xe1\xb9\xd1\x92\xa4\x77\x8e\x95\xf8\xd4\x01\xbe\x0a\x1d\xf2\x61\x1d\x09\xe9\x0c\x89\xde\x88\x87\xe5\xa2\x3e\x71\xe7\xc9\x97\x36\xf0\x31\x65\x9d\x3d\x07\x33\x86\x07\xab\x0c\x5b\xbb\xfd\x94\xc6\xa9\x9a\x5e\x9d\x61\x56\x32\x7f\xee\xca\xa5\xd1\x2b\xda\xe2\x8d\x6b\xe7\x4c\xc8\x63\x95\x27\xa2\x3e\xdb\x07\x1b\xda\xbb\xd5\xd0\xe8\xf6\xe4\xa4\x60\x0c\x1d\x5e\x35\x48\x0a\x49\x9e\x08\x46\xe7\x71\x53\x14\xd7\xe0\x8c\x4a\x05\x75\x76\x5a\xf4\x5d\x4c\x1f\x3e\x80\x21\xab\xae\x31\x05\x9f\xdb\x51\xfa\x15\x8c\xc3\x23\xaa\xa6\x20\xa0\x5f\x9f\xd9\x02\x63\x22\x0b\x95\x83\x6b\x25\xad\x10\x2d\x2c\xad\xb5\x00\xb0\x15\xfc\x98\x77\x37\x10\x02\x9c\x02\xde\x7d\x2f\xf3\x86\x17\xf0\x21\xcb\xbb\x17\xce\x8e\x18\x52\xcb\xcc\x5c\x2c\x68\x4c\x23\xf6\x4e\xd5\x8c\xca\x1c\x0f\xdc\xf0\x01\xe1\x5d\x4d\x59\x0e\x1c\x99\x22\x99\x91\x3d\x93\x78\x84\xe5\xea\x68\x1c\x56\x22\x23\x62\xbe\x33\x2e\x54\x60\x21\xc7\xb8\x0e\x7f\x20\x29\x48\x96\xb3\x21\xfc\x62\x27\x42\x5f\x1a\xaa\x72\xc8\x87\xad\xec\xe6\x27\x53\x27\x28\x9a\xda\xad\x76\xfa\xd2\xd4\xdf\x0e\x60\x1b\x79\x04\xc5\x84\x42\xfe\x03\x85\xac\x8d\x0a\xd5\x45\x29\x4d\xdc\xca\xee\x80\x87\xdc\x90\x8e\xcf\x57\xb5\xc4\xca\xce\xad\xfe\xa0\x90\x20\xc6\xa8\xc3\xf1\xb2\x27\x51\xb6\xfa\x03\x5d\x5c\x07\x50\x62\xcc\x3e\xd2\x32\x17\x94\x7d\x04\x02\x6b\xa4\xb0\x4b\xcd\xe6\xbc\xcc\xe1\xcf\x2c\x53\xb5\x83\xe2\xc5\x88\x27\xf8\x98\x97\x8f\xe7\x78\x31\x30\xc7\xb1\xec\x7e\x19\xd8\x51\xbd\x68\x09\x24\x8e\xdc\x35\x80\xe7\xc6\xf8\xc2\x4a\xd2\x2b\x86\xcd\xce\x8a\xb8\x3c\x13\x18\xea\x7b\x87\x34\xe6\xa4\xb0\x01\xf3\x81\x41\x08\xd7\xa7\x07\xec\xbd\x55\x02\xe2\x1f\x54\x8d\xd6\x8c\xa6\xa2\x9f\x70\xf4\x4e\xcc\xb9\x8a\x01\x97\x31\xda\xae\x33\x19\x00\xb9\xe6\xa8\xa4\x5b\x32\x45\xda\x38\xc1\x2c\x47\x06\x85\xc9\x92\x4d\x25\x01\x18\x47\x40\xd9\xc4\x54\x8e\x21\x81\x25\x78\x68\x42\x80\xda\xb2\xa2\x90\x3c\x13\x82\x29\x21\x47\x0b\x05\x6a\x1f\xf9\x81\x18\xfd\xa8\x6e\x11\xbc\x39\x1a\x6f\xda\x2b\xad\x47\xec\xbd\x5c\xb8\xc0\x8b\xc8\x8a\x2c\x3b\x8b\x8b\x80\x2e\x72\x21\x0b\x6e\x0f\x8b\x9e\x03\x22\x5c\x77\x0b\xb6\x53\xf5\x13\x41\x70\xcf\x83\x96\xb3\x83\x1d\x46\x64\xe5\xb3\x36\x05\x94\x2a\x17\x3d\x15\xfb\xe9\x09\x1a\x06\xa3\x18\x3a\x0f\xbf\xef\x4b\xa2\x00\x3c\x38\x0f\x8e\x00\x8f\x12\x8e\xb1\x39\x56\xbe\x83\x20\x0b\x82\xea\xf6\xb8\xfe\xda\x32\x07\x5f\x5f\x00\x98\x72\xdc\x23\x9c\x1d\xdb\xd7\x80\x71\xad\x9b\x85\x2f\x16\x6b\x0f\x23\x5d\xed\x80\x6b\xef\xae\x42\x92\xed\xda\x5e\xfa\xeb\x8f\x5c\x46\x4f\x29\x4c\xd3\xfd\x45\xc8\xf3\x44\x01\x00\x97\x24\xb2\x1b\x80\x1c\x22\x4d\x28\x4a\x31\x62\xd7\x89\x37\x41\xdf\xa4\x16\x00\xf0\x38\x11\x11\x6c\x28\xf5\xd3\x01\x5c\x0f\xb3\x7f\x0a\x4b\x0b\xe6\x95\x63\xc4\xe6\xb0\x4c\x6b\x68\x7b\x3b\x4e\x58\x73\x9d\x03\x8e\x17\xe3\x96\xf5\x36\x01\x95\x77\x2f\xea\xb9\xe0\x89\x10\xd7\x8f\xf4\x24\x2e\x98\x6f\x22\x6a\xc5\xdc\xab\xb1\x61\x15\xc3\xaa\xa8\xb2\x07\xf7\x58\x32\x9c\x0c\x22\x57\xe8\xf1\x3a\x2d\xb8\xd6\xab\xb1\x45\x64\x47\xac\x7c\x45\x40\x6e\x18\xcf\x5d\xe0\x12\xf8\x9e\xc9\x87\x16\xf7\x13\x35\x09\x56\x7f\x0f\x69\xbf\xb1\xa5\x3d\x1e\xa8\x1f\xe6\x83\x30\x25\xd8\x65\xa7\x38\xa3\x3f\xca\xca\x92\x18\x85\xe6\x63\x6e\x91\x7c\x6f\xfe\x04\xcc\x8e\x02\x9c\x13\xdd\xd0\xc9\x42\xa3\xcd\x3c\x5e\xd8\xa2\x16\x3c\x5f\x82\x7b\xc4\x4e\xa8\xf5\xa5\x76\x06\x2f\x14\x95\x75\x26\x24\x12\xba\x48\xe4\x1b\x30\xbf\x95\x1d\x31\x37\x78\xcd\x9c\x9c\xeb\xc4\xb5\x16\x04\x7e\xfc\xd9\x01\x03\x50\xd7\x07\xa9\x85\xbd\xb5\x34\xb3\x05\x97\x25\x85\xb3\x00\xf3\xa0\x60\x3d\xae\xd9\x3f\x44\xad\x36\x85\x1d\x8b\x72\xce\xcb\x0c\x2f\xfb\xf1\x9d\xa8\x34\xc4\x1a\xc3\xd9\xfe\xe2\xf5\x9b\xff\xf5\xfa\x8b\x2f\xbe\x86\xd3\xee\xd6\x65\xb4\xc8\xd7\x19\x04\x80\x77\x7e\xef\xaf\x13\xbb\x7f\x33\x7a\xf3\xf5\x60\x57\x43\xc1\x58\xe5\x7e\xd9\x56\x0d\x04\x1b\x6f\xda\xae\x0e\xa5\xd1\x6a\xf1\xf5\x5f\x31\x7b\xd4\x12\x5a\xa9\xca\x3e\x1b\xe8\xb8\xd3\xc2\x45\x52\x8f\x83\x4d\xd4\x75\x82\xb6\x17\x72\x51\x17\xea\xc1\x09\x74\xd2\x2c\x47\xec\x23\xa6\x8b\x5d\x8a\x7b\x2b\x9f\x53\xaf\xef\x6d\xa3\xb1\x6f\x13\xdb\xcd\x52\x2d\xa2\xb0\xb4\xf6\xfe\x4c\x84\xa1\xed\x19\xb0\x59\x5c\xec\xf3\x52\x95\x63\x3f\x3a\xdf\x0d\xad\xf7\x70\xd6\x5b\x6a\x9d\x5a\xa6\xfd\xd8\xee\x29\x69\x6d\xec\x47\x5e\x43\x82\x2d\x39\x8d\x32\xb5\xa8\x54\x09\xf4\x0c\xad\x50\x7e\xa4\x40\xfc\x29\x45\xdf\x77\x12\x03\x1d\x40\x3d\x09\x3f\xcc\x13\x7f\xd7\x4f\xd3\xe4\x44\x42\x25\x92\x7b\xf7\xa9\x9a\x42\xfa\xc9\xad\x1e\x7d\x19\x09\x49\x92\x76\x38\x6a\xa8\xe3\x81\x42\x37\x6e\x1c\x70\x2f\x2d\x63\xc7\x5e\x40\xd6\xab\xc3\xdd\x1e\x04\x09\xb0\x6e\xcd\x6c\xa3\x63\xeb\xcb\x2f\xe2\xb5\xf6\x9f\xd9\xe4\xe1\x8a\xb1\x19\x9c\xa2\x1d\xce\xd9\xed\x01\xa9\xd6\xf6\x7e\x0f\xb3\x5a\x82\xd3\xc8\xc7\x61\xd2\x43\xc2\xb7\x6a\x3d\xb7\xb2\xef\x83\xf2\xd1\xcf\x77\x62\xf9\xa0\x6a\x5f\x4b\xc6\x7d\xb5\x25\xef\xd2\x67\x11\x83\x95\xec\xed\x10\x47\x57\x93\xda\x92\x68\xbc\x1c\xb1\x13\xab\x4a\x83\xa1\x1a\x14\x0b\x27\x2c\x38\x22\x39\x59\xc6\xd6\xd3\xd6\x36\xb8\xec\x0e\xfa\x9a\x65\xf8\xb0\x31\xbd\x46\x88\x70\xce\x1c\x6d\x76\x21\x9e\xaa\x06\xe2\xd9\xc2\xf3\x28\x95\x7b\xdc\x87\x5b\x1d\x72\x13\x7a\xd2\x67\xc3\x08\x38\x90\x6e\xa7\xb4\xcc\xd0\x40\x4f\x83\x10\xf6\xe8\x78\x34\x36\x3b\x4e\xdf\x72\xc4\x4e\x9c\x0e\x87\xdc\x09\xcc\xc9\xb6\x33\x2b\xc1\x75\x54\x48\x6c\x71\x72\x79\xe6\xd4\x2b\x42\x64\x6e\x87\x69\x10\x5a\x43\x6b\x24\xc0\x0d\x09\xef\x5a\xfc\xd2\xf0\x02\x1d\x39\x37\x75\x23\x6e\x0f\x9e\xc6\x50\xd0\x54\x76\xfc\xfa\xf5\xeb\x3f\x02\x3f\x81\xc1\xfd\x8f\x2f\xbe\xf9\x1f\x5f\x7c\xf3\x62\xd0\x52\xed\x54\x12\x2c\x11\x14\xa9\xab\xa9\xb0\x05\x8c\x14\x8d\x7c\x58\x9d\xa0\xfd\x08\xf6\x0d\x88\x10\x51\x6a\x0c\x44\x1e\xb0\x8f\xe5\x3b\x2e\x0b\xc8\xe7\x06\xe2\xdd\x32\xdd\x61\xa3\x17\xc5\xd6\x3e\xfe\x03\xcd\x68\x88\x43\xee\x89\x83\xf6\x12\x43\x9a\x64\x5c\x75\x5a\xb4\xb2\x56\x5a\x72\x0e\xdd\x28\x19\xc2\x03\x68\x9b\x31\x52\x6c\xe0\xe2\xce\xbd\xdf\xa8\x21\xd3\x15\x46\x96\x3a\xbb\x29\x5e\xc1\x76\xd7\x5e\x94\x8d\x0b\x51\xd9\x0b\x9b\x63\x60\x4b\xba\x8a\x52\xdd\x94\xed\xf0\xdd\x48\x15\xba\x3d\x28\xc4\x8c\x67\xcb\xdb\x83\xf6\x97\x62\x6b\xab\x1b\x31\x9a\x01\xad\xc6\x24\x33\xab\xe7\x52\x43\x33\x07\x6f\x09\x94\xa5\x0b\xe7\x0d\x89\x49\xa3\x69\x90\x8e\x48\xb8\x98\x4c\x34\x96\xd4\xcf\x90\xb4\xa8\xa7\x21\x0c\xc3\x4b\x58\xa0\x3b\x59\xee\xed\x78\x72\x5a\xbc\xfa\x2a\x8d\x69\xef\xf4\xc2\x6d\xb8\x46\x6b\xa5\x2d\x19\x94\x1a\x94\x5c\x92\xd2\x3c\xb9\xf0\x9d\xae\x23\xaa\xe9\x4e\xdc\xa2\x85\x2e\x92\xa3\x5e\x4d\x5c\xea\x7a\x9d\x5f\x3c\x57\x29\xed\x9a\x84\x33\x30\x62\xec\x5a\x10\x66\x7e\x1c\xcc\x63\x09\x85\x9b\x50\xc8\x34\x02\x73\x0e\x8a\x14\x3b\x96\x31\xef\xcc\x1a\x16\x22\x8e\x0d\x49\x45\x82\x55\xb5\x00\xdc\xca\x76\x14\x89\x0b\x3c\xb2\x4f\xc9\x53\x59\x48\x8e\xea\x71\xbb\x25\x0a\x2d\xa1\x9f\xb7\xe0\xdd\xd0\x2b\x6d\x98\x2c\xb5\xb1\x82\x7f\x7a\xbf\xba\xcd\x53\x5b\xb6\xda\x65\xb8\xed\x4e\xc4\xeb\x4c\x83\x6c\xec\x2b\x94\x64\x3b\x5a\x6a\xb8\xbe\x0b\x9a\xbb\x18\x52\x45\x02\xdc\xfa\xe8\x77\x1a\xfe\x90\x6c\x79\xc7\xe9\x29\x9a\xef\xc8\x53\x71\xa2\xdf\xfd\xe5\xec\xb2\x17\x39\x62\x9d\x6f\x23\xd6\x16\x63\xd9\xcc\x76\x38\x60\x35\x37\x28\x20\x12\xda\x4d\x21\x38\x86\xbd\xb2\xc3\x88\xe0\x1c\x81\xd3\x37\x04\x7a\x23\x8b\x1a\xe0\xea\x20\x7c\x55\x90\x6e\x05\x74\xed\x28\xb7\x1f\x0f\x8a\xb0\xb4\xe6\x77\x76\xdd\x0a\xfc\x86\xa5\x43\xed\x16\xda\xd4\x4d\x66\x58\x63\xb4\xfd\x1d\x3f\xee\xa2\x54\xb7\xf8\x7c\x2d\x66\x52\x9b\x7a\x19\x6a\x8a\x86\x41\x90\xad\xc6\x37\xb9\x13\x4b\xf6\xdd\xf7\xe7\x7f\xfd\xf9\xfd\xc7\xd3\x93\xf7\x3f\x7f\x38\x39\xfd\xee\xe2\xf2\xfc\xf6\xf6\xfa\xaf\xd7\x37\xe7\x1f\x6e\x6f\x4f\xd1\xe8\x48\x92\xfe\xb5\x30\xb7\xb7\x74\x5e\xf4\xed\xed\x4d\x56\xc9\xea\xf6\x36\x0a\xa2\x31\x0a\x26\x8f\xf6\x70\xa0\x49\x3e\x73\x04\x24\x1b\x5c\x74\x18\xf7\x9c\xeb\x90\xf6\xb4\xad\xe3\x4d\xcf\x79\x2d\xc6\x18\x89\x7d\xe9\xdc\x42\x89\x83\x3f\x07\xc3\x2b\xd3\xb2\x9c\x15\xc2\x87\x6e\x07\x47\x92\xc3\x29\x8b\xaa\x4e\x26\xf3\x05\xa9\x92\x1e\xb2\x04\xcb\xf7\x5a\x02\x0a\x19\x6f\x08\xdd\xeb\x5e\x8a\x07\x34\x48\xc8\x59\xc9\x0b\xf7\x55\x87\xd1\x82\x92\x75\x37\xc6\x9d\x5c\x5c\x3e\x16\x61\x35\xde\x7c\x25\xd6\xbc\xc5\x95\x3d\x62\xed\xf8\xe2\x8c\xbd\x19\xb1\xef\xd0\x33\x09\x7d\x5d\xa7\x16\xcb\x87\x3a\x28\x33\x77\x31\xa8\x3b\x3b\x26\x75\x33\xc1\x42\x07\xdb\xb0\xb7\x69\x53\x14\x4b\x66\x65\x59\x64\x65\x63\x95\xaf\xde\xd2\xdb\x03\x2c\xfa\xec\x1e\x60\xc5\xe7\x11\xfe\xe8\x3f\xd7\xfa\xd5\x9e\xae\x50\x52\x18\x9f\xe8\xfb\x8c\x9e\x92\x2a\xc5\xe2\x17\x53\x79\x6e\x09\x61\x07\x4e\x2a\xa7\x37\x61\x94\x1c\xea\xe2\x26\xe9\xb0\x07\xea\x52\xe5\xb7\x35\xcf\xc4\x58\xd4\x12\xf8\xca\x33\x22\x44\x4b\x21\xb0\x20\xac\xc7\xc6\x62\x33\xdb\x37\xac\x24\x66\xf4\x80\xc6\x64\xd5\x31\x42\x48\xc9\x05\x40\x7f\x39\x2c\x94\x4e\x78\x67\xa9\xca\x61\x29\x66\xbc\x15\xe0\x09\x6a\x33\x92\x08\xd4\xb8\xbc\x02\x4b\x9d\xc9\xc5\x42\xe4\x96\x95\xd9\x8f\xae\x80\x2a\x95\xb2\x18\xb4\x84\x32\x18\x22\xab\x60\xfe\x6d\x3f\xbb\xe3\x63\xf0\xc5\x56\x33\x62\x47\xa9\xc5\xe0\x53\xe3\x35\x77\x77\x91\x9c\x89\x35\xe8\x05\x08\x63\x24\x4a\xc0\xd5\x0e\x5b\xe1\xee\xa0\xbb\x52\x98\xc1\x43\x65\x31\xa3\x0e\xed\xdb\x53\x55\x67\x72\x52\x2c\xd9\x9c\x17\xde\x98\xcb\x31\x78\x16\xbb\x19\xb1\x6b\x61\xe2\xe9\x17\xaa\x9c\xc5\x5c\x43\x3c\x56\x68\x82\xcc\xec\x0d\x69\x2a\x82\x11\x53\x35\x5b\xaa\xa6\x27\x91\xeb\xcb\xd7\x6e\xaa\x5b\x86\xda\x1a\x55\x08\x5c\xa6\x8d\x3a\x6e\xe0\x72\xd1\x4b\x2f\x11\x8a\x72\xe3\xbb\x6b\x55\xe6\xbe\xae\xac\x52\x79\x1a\x85\xf3\xae\x5a\xa8\xfa\x9a\x92\x78\x37\xb1\xca\xaf\x7a\x88\xeb\x38\x83\xd5\x4e\x35\xb3\x39\xba\x6b\xe0\x45\xc6\xb3\x5a\x69\xed\x2b\x57\xbb\x82\x2b\x23\x76\xdd\x2e\xb3\xdc\x2e\xae\x0c\x14\xfd\x81\x2f\x5d\x89\xec\x89\xcc\x85\x8e\xf2\x8e\xdc\x60\x46\xec\xa4\x28\x58\xef\xb4\xe0\xbc\x9c\x5c\x9e\xbd\x4c\x60\x6c\xdf\x92\xac\x38\xc7\x0a\xa9\xcd\x70\xc1\xab\xe1\x9d\x58\xea\x6e\x91\xfa\xc1\x81\x3d\xd7\x3f\x94\x54\x71\xd5\x72\xa3\x83\xbf\xa5\x3a\xa0\xe1\x2e\x78\x4f\x88\x50\xec\x7c\x6b\x7f\x60\x4b\x1f\x1c\x66\x2b\xaf\xf1\xce\x53\x03\x4a\x3b\xc3\xda\x5d\x14\x34\x0d\xd6\xa5\x4d\xde\xfa\x1d\xd5\x79\x6d\x54\xcd\x67\xe2\xd8\x8d\xeb\xf9\x3b\xf6\x23\xf4\xf4\xa2\xce\xcb\x41\x2d\xec\xa4\xbf\xb7\x3b\xbb\x6d\x36\x8d\x8f\x80\x4f\xe6\x4a\x04\x27\x6b\xf2\x71\x22\x56\x2f\xd9\x2e\x44\x9d\x25\x1f\x27\xc3\x3e\x36\xd7\x07\xdb\x0e\x8b\x64\x5b\x74\x8d\x64\xbb\x88\x46\xf5\x3c\xef\xb9\x76\xc9\xd6\xb4\xe5\x6b\xc1\xad\x8f\x57\xbd\x18\x6b\xf2\x58\x7c\xc9\xbb\x75\x99\x2c\x68\x01\x8c\x7c\x90\xab\xb1\xc3\xa6\x55\x19\xcf\x01\x5c\xe0\x0f\x0b\xbe\x64\x76\x56\x05\xb4\x22\xc8\x58\xdb\x58\x60\x5b\xb4\x37\x0f\x98\x20\xb3\x72\xb1\x6c\x15\x2c\x87\x0b\x8a\xe1\x8f\x8e\xcf\xba\x20\x04\x7b\x68\xb2\x90\xe1\x5d\xab\x82\x55\x05\x2f\x93\x5e\xa2\x1e\x34\x97\x04\x85\x20\x35\xc3\x27\x5c\xf8\xa1\x3e\xe5\xde\x3f\xa9\x44\xde\x73\xac\x9f\xa1\xf6\xe6\x66\xca\x40\xf5\x31\xb7\x24\xa9\x9e\x24\xe2\xbe\xa6\x88\xeb\x0d\x95\xf2\x06\x85\x4a\x95\x94\x52\x6e\x05\xac\x55\x0c\xec\x05\x2f\xe5\x14\xe4\xc3\xb8\x4e\x87\x8e\x42\x4b\xc0\x11\x8b\xf5\x51\xd4\x94\xfd\x1d\x03\xd7\xac\x00\x67\x05\x9c\xbf\xbf\xfc\x56\xf0\x32\xb2\x0f\x0c\xa9\x1c\xe4\x0b\x06\x9a\xd0\x6d\xfb\x35\x19\xd8\xde\xbf\xa8\x74\x8d\x30\xb6\x6a\x99\x0e\x73\xc7\x4b\x62\x75\x85\x95\x80\xf7\xed\xe2\xb6\x83\xc7\xff\x9f\x17\xb9\x9d\x5a\x28\x8c\x0b\x5e\x5b\x1c\x86\x74\x66\xdb\xd2\x72\x68\x02\x7a\x0d\x61\x6e\x4e\x2d\x1d\xb1\x73\xb0\xe8\x4a\xd4\xba\x96\x22\x98\x21\xd3\x66\xad\x56\xa0\xdf\x93\x0e\x7d\x27\x76\x6c\xe5\xe4\xdb\x57\x17\x0a\xa2\xc2\x32\x44\x14\xcb\xac\x70\x3e\x6d\x8a\xee\xab\x01\x9e\x05\xfd\x39\x7f\x8e\xd0\x34\xa2\x1e\x8a\xa5\x0b\x03\x4c\xbe\xab\x7d\x22\x1f\x02\x97\xfc\x7e\x2f\x50\x6f\x31\xda\x13\x36\x6f\x16\xbc\x64\xdb\x97\xa3\x7d\x98\x2f\xe3\xe3\xe2\x2e\x4f\xab\xcc\x6f\x22\xf8\x89\x80\xa2\x2f\x7b\x83\xbd\x56\x9a\x38\xbb\x0d\x5c\xb8\x07\x6f\xcd\x41\x17\x24\x78\xe0\x35\x59\x66\x50\xdb\x08\xee\x96\x01\x9b\x34\xa6\x9d\x1b\x12\xe2\x9a\x6a\x48\x5d\xe7\x56\xa3\xe0\x9a\x85\x70\x05\x76\x2f\x33\x23\x17\x0e\x9e\x1e\xae\xb0\xac\xbd\xf6\xde\x52\x51\x51\x05\x6e\x07\x04\x79\x6b\xd9\xac\xe1\x35\x2f\x8d\x10\x01\xf4\x25\xb6\xf0\x77\x22\xac\x7c\xb6\x71\x50\x82\xac\x04\x90\x8b\x0c\x8a\x68\x2a\xcb\xa2\x23\xe0\x64\x51\x68\xf1\x80\xce\xd5\xa9\xf3\xf8\x2a\x50\x88\x44\xa6\x16\x82\xf1\x7b\x2e\x0b\xd8\x48\xad\x14\x20\x58\xb4\xfb\x05\x28\x8b\xd0\xf9\x8c\x26\xea\x1d\x4b\xba\x35\x2a\x74\x6e\x91\x27\xde\xfb\x7d\x21\x5a\x0c\x82\xe0\x02\xca\x15\xaa\xfc\x61\x35\x47\xec\x04\x63\xf6\x74\x53\x98\x41\x1c\x09\x40\xc9\x43\xb9\x9c\x82\xe8\x69\x50\x15\x77\xc1\xde\x2e\x18\x30\xd2\xf8\xf1\x9c\xad\xa7\x3d\xd5\x9c\xeb\x1e\xe0\x0a\x78\x84\xa2\xd3\x58\x39\x08\x44\x89\xb1\xde\x76\x66\xce\x07\xd2\x2c\x00\xe5\x41\x4d\x19\xae\xaf\x8b\xc6\xc7\x33\x2e\x8d\x66\xfe\xf6\x22\x25\x8a\x7c\xc3\x70\x57\x07\xce\x2b\xac\xad\x9c\x57\xe6\xfe\x2a\x21\xa4\x5b\x30\x12\x46\x11\xea\x91\x6b\x05\xd9\x16\xf4\xe4\x4d\xc5\x08\xf0\x8e\xf7\x2f\x12\x1d\x29\x1b\x17\xde\x70\x89\xa2\x60\x0e\xb1\xbb\x59\x29\xad\xa5\x3d\x00\x38\x71\xf4\xb4\x00\xb6\xd9\x58\x40\x74\xd4\x5b\xc4\x19\x53\x39\x50\xe0\x09\xd8\x52\x33\x4b\xb2\x42\x90\x4b\xe4\x2c\x73\xe2\xa6\xbd\x51\x00\xaf\x5d\x13\xea\x7c\x17\xf2\x86\x42\xf8\xd1\x36\x6c\xb0\x5f\x3a\x1d\x2e\xed\x86\xaa\x8a\x51\x60\x5c\x0c\xe4\x15\x2e\x05\xd7\xec\x41\x40\xee\x33\x36\xd3\x95\x3d\x23\xb9\x7a\x28\x2d\x2d\x05\x0b\x12\x7e\x08\x70\xeb\xe0\xc6\xbb\x3c\x42\x64\x65\x58\x7c\x01\x50\xee\xb8\xfd\xc9\x6e\xd7\x15\x1a\x9f\x12\x33\x9f\xa8\x06\xcb\x38\x72\x17\xe6\x59\xe6\x3d\xa6\x65\x60\x09\xed\x69\x9d\xf4\x64\xe5\xda\xcd\x81\x38\x33\xfc\x2e\xc4\x51\x07\x30\x73\x67\x1e\x06\x77\x01\xaf\x81\xc6\x42\x38\xb0\xfb\x6b\xc4\xae\x2d\x67\x13\xb9\xc8\xdf\x82\x55\x63\xd5\xf4\x8c\x93\xb8\x17\x31\x06\xbf\x2c\x1d\x47\xc4\x69\xb4\x5c\xc0\xc2\xc7\xbb\xbf\x83\xa0\xf5\x1d\x3a\xa6\x45\x49\xcf\xd5\xae\x64\x7b\x0c\x53\x74\xee\xfb\x4b\x42\x0d\x85\x04\x6a\x25\x1e\xa5\xb7\xd4\x95\xaa\x1c\x82\xfd\xd2\xe9\x42\x35\xa0\xc7\x47\xdd\xd1\x79\xc4\x43\x38\x72\x05\xc2\xdf\x42\xc6\x86\x56\x0b\x7f\xdd\x9c\x42\x25\xe2\x9a\x80\xa1\x0c\xc7\x44\x30\x35\x81\x71\xe4\x03\x66\x96\x15\x65\x7d\xe7\x8d\x70\xa9\x7e\x50\x4d\x11\x30\x16\x01\x50\x94\x38\x9f\x0f\xc1\x01\x69\x29\x8a\xab\xb2\xd7\xe9\xa5\xc5\x01\xa4\x61\x49\x7c\xe1\x7c\x83\x4c\xf7\x8c\x7a\x7c\xab\x52\x9e\xef\x2c\x4d\x69\xa1\x66\xe0\xea\x68\xf0\x77\x72\x2d\xdb\x0f\xc4\xc5\xb7\x7b\x06\xe8\x0c\xd3\x5e\xdc\xee\xd8\x41\x5f\x1b\xa7\xe8\x44\x31\xcc\xf4\xf6\xc5\xd8\x05\xa2\x01\x88\x8d\x43\x66\xf0\xdf\xe1\x06\x05\xbd\x37\x64\xf7\xf5\xa9\x03\x6a\xca\xa0\x72\x20\xe6\x13\xde\x7f\x1d\xe7\x9e\x4a\x4d\x61\x0c\xb0\x1c\x90\x6e\x18\x6e\x7d\xe8\x7b\xd9\x02\xff\x78\x8e\xfa\x79\x31\x7e\xe1\xc4\xc0\x5f\x94\x86\xf8\x8d\x34\x2f\xfc\x4b\xc3\x0b\x8a\x10\x24\x57\x20\x3b\xfc\xcb\xc7\xeb\x23\x0c\xe5\xc0\x92\x42\x60\xa5\x58\x2d\xa6\x18\x72\xe4\x93\x21\xef\xe0\xf2\x1f\xab\xfc\x2f\x1f\xaf\x31\x7e\x04\xdc\xff\xa0\x84\x79\x89\xe4\x2f\x1f\xaf\xf1\x43\x42\x3f\x15\xd6\x17\xe3\xc8\x6b\x55\x29\xcd\x0b\x7d\x8c\x71\x20\x34\x9e\xe1\x2f\xaa\x5d\x70\xaf\x15\x66\xa6\x93\xf8\xd2\x6c\x52\x4b\x31\x0d\x78\xc3\x4f\x16\x7f\x81\xf8\x8c\x18\x94\x02\x7a\x75\x6e\x45\x49\x91\xbf\x4a\x57\x79\x25\x9d\x22\x11\x61\xf4\xee\x94\x41\xf1\x04\x80\xf7\x03\x69\x41\xa2\x07\x2b\x28\x69\x2e\x5a\x8f\x6b\xc6\x33\x4b\x0c\x0b\x91\xcf\xda\x8c\xbb\xf0\xd1\xac\xb2\x55\x27\xc5\xa1\x08\x42\x56\x5c\x9e\xe2\xde\x87\xfa\xa8\x05\x49\xf0\x02\xc5\x31\xb6\x34\x8b\x76\x75\x96\x3e\x0b\xdc\x69\x84\x4e\xdc\x5b\x24\x75\xcb\x6a\x76\x1b\xaa\x3f\xe0\x48\xae\x40\x80\xdd\xca\xe4\x87\x4d\x51\xc0\x7c\xa8\x79\x55\x51\x3d\xb4\xd8\x26\x88\xd5\x4a\xec\x6e\xb9\x4a\x53\xb1\x41\x5d\x94\x99\x3d\xd0\xb9\xb0\xff\xc9\xf7\xc8\xe9\x7b\xe4\xf4\xdf\x2f\x72\xfa\x16\x05\x36\x71\x75\x5e\xe9\xdf\xae\xc8\xa6\x1f\xd4\xb3\xf0\xb3\x60\xd8\x58\x63\x13\xe8\xb9\x49\xd5\xca\xfa\xd0\xb2\x32\xa9\x09\x18\x09\xf3\xc8\xea\xef\xa5\x20\x20\xd5\x80\xff\xe9\x12\x36\x61\x4f\xed\x5d\xca\x81\xa9\x8c\x63\x63\x63\x2c\x0e\x5f\x09\x9e\x0f\x55\x09\x81\x05\x9f\x76\xe1\xac\x60\x06\xf6\x2a\x6f\xa5\xda\x25\x52\xcf\xd9\xa1\xb6\x2e\x48\x9a\xe0\x02\xeb\x70\xc8\xc2\x86\xf4\x93\xf3\x1b\xb1\xa8\x8a\xcd\x60\xf9\xae\x59\xe4\xda\xe6\xcc\xb8\x1f\x2d\x39\xf7\x81\xf4\x99\xaa\xa4\x70\x0e\x9c\x5a\xb8\x58\xfb\x1e\xb8\xb2\x3d\xe9\xde\x93\xee\x3d\xe9\xfe\xac\x48\xb7\x89\x48\x42\x47\x57\x0a\x54\x20\x5c\xc0\x00\x18\xe9\xe3\x53\xc9\xf8\x49\x27\x80\x8c\xd3\xae\xdb\xd1\xe7\x47\x89\xdd\xbc\x00\x90\x71\x07\x7a\xdc\x7a\xef\x53\x50\xe5\x2d\x2a\xed\xc7\x4d\x57\x2a\xee\xbb\x87\xfb\xca\xfb\x9f\x09\x3d\xde\x5c\x79\xdf\xdf\x93\x17\xf2\xe4\x7b\x06\xbf\x2f\x95\xbf\x2f\x95\xff\xc9\x4a\xe5\xfb\x53\xf6\x72\x25\xf3\x5b\xc4\x75\x3b\x1a\x08\x68\xb9\x79\x0b\xd7\x18\x14\x08\x8c\xdb\x27\xda\x02\x96\xcb\x80\x9c\xe7\xf8\x54\x10\x67\x37\x4a\xa9\xff\x2e\x82\x80\xa6\x95\x4f\x02\x75\x65\xad\xba\xaa\xb9\xd0\x50\xba\x2f\x2e\x61\xb3\x2e\xc8\xf1\xb3\x61\xfd\xbb\xb2\xfc\x97\x66\xf5\xb5\x79\x50\xf5\x23\x86\xe4\x5d\x03\x61\x5d\x7f\xd6\x57\xdb\xc7\x21\x75\x9c\xb9\x16\xae\xd0\x8e\x8f\xe3\xdb\x20\x00\x60\xf3\x8b\xb3\x55\x19\x60\xaa\xd3\xb5\xca\xde\x5d\x53\x91\xb2\x16\xa8\x08\x14\x79\xc2\xf4\x7c\x30\x75\x1b\x85\xf1\xb0\xec\x83\xc7\x65\xee\x36\x09\x08\xfb\xa4\xc7\xa3\x57\xa9\x82\x90\xc7\x72\xe6\xd5\xfa\xf3\xc7\x11\xbb\x3d\x10\x8f\xe6\xab\xdb\x83\x01\xbb\x3d\x78\x9c\x62\x99\x9f\x85\xc7\x41\x05\x76\x43\x40\x54\x90\x81\x81\x8d\xbb\x05\x44\xfa\x32\xae\x3f\x96\x45\x22\xaf\x77\xa5\xd6\x2e\x3b\xb4\x8d\x8f\x1f\x6a\x69\xc4\x11\x5a\x1b\xa0\xca\x72\x00\xd9\x9d\xaa\x9a\x62\x13\xfc\x43\x97\xcd\x24\x4b\x86\x9b\xf7\xc1\xae\x8a\x4e\x27\xa3\xf8\xcd\x58\x19\xcc\x8f\xf4\x84\x10\xaf\xec\x9c\xa1\xa2\x3f\x00\xe7\xad\xec\xfe\x33\x6b\xbf\x41\x26\xef\xc9\xbd\x92\xf9\x58\xe5\xfa\xbc\x34\xf5\x72\x3b\x40\x79\xbe\x03\x9c\xfc\x86\x73\x59\xc5\x68\xf6\x2b\x67\x53\x40\x70\x8a\x2a\xd3\x8e\x83\x9b\x8e\x9b\x00\x10\x1d\x4c\xbd\x44\x37\x81\x2b\x47\x61\x28\xf0\xea\x65\x6a\x5e\xf7\x46\x14\x7d\xb7\x31\x9e\x08\x5d\x28\x9b\x07\x99\xf2\x3d\xb6\x10\xff\x57\x1d\x5c\xad\xed\xd8\x35\xa1\xd4\x77\xbd\xc6\x63\x74\x08\x0e\xa3\x23\xe7\x77\x7e\xe2\x54\x76\x20\xc3\x7e\x50\x2f\xe1\xd5\x80\x83\x5e\x8b\xfc\xda\xe3\xae\xdd\x88\x7a\xb1\xee\xac\x9f\xb8\xc4\xee\xca\xbd\x1b\x83\xb6\x19\x51\x2f\x7c\x2a\x3a\x44\x4d\xc0\xd1\xa6\xa4\x70\x9f\x28\xfe\x20\x20\xe6\xea\x35\x3b\x94\x23\x31\x62\xd2\xca\x0b\x9c\x95\x6a\xa8\xaa\xa3\x11\x3b\x61\xf6\x6a\x6e\xf1\x81\x52\xf9\xfe\xa9\x23\x8d\xf1\x4c\xbe\xaf\x0d\x77\x0c\xc7\x01\x62\x4e\xa8\x5a\xb0\x52\xb4\x21\x3c\x4b\xf8\x0b\x21\x2a\xca\x43\x73\xd9\xe1\x0d\x56\xd0\xa4\x56\xf1\x88\xf0\xc3\xbb\x9c\xc7\x18\x0f\x0c\xf6\xe8\xd7\x81\x1b\xfe\xca\xa8\x7e\xc2\xe5\xed\x0e\xa3\x05\x31\xdd\x1e\x4f\xd9\xe9\xdd\xa3\x5e\xd6\x50\x3c\xf1\xcd\xf0\xcd\xeb\xd7\x5b\x81\xad\x6c\x79\x90\x57\x66\xd3\x7b\x40\xd5\x64\xbd\x5c\x60\x1b\xb4\x6c\xb3\x73\xc1\x0b\x33\x67\xd9\x5c\x64\x77\xae\xf8\xb8\x2b\x3d\xc6\xf8\x8c\xcb\x52\x9b\xb8\x9e\x0b\x98\xd5\x05\x86\x98\x88\x00\xef\x8d\x26\x85\x02\xca\x3a\xd4\x14\x34\x6a\x54\x88\x05\xac\xf9\x74\x2a\xb3\xcd\x86\x5d\xf1\x98\x12\x25\x3f\x96\xe8\xcf\x85\x50\x46\x55\xfa\x28\x95\xa9\x2a\x0a\xf5\x00\xbc\x3f\x54\x16\x09\x88\xb6\xe7\x8f\x22\xf3\x7f\x6b\x97\x0f\xe0\xca\x14\xf1\xbb\x9d\xaa\xc1\xd8\xce\x4e\x32\x17\xea\x4e\x41\x3a\x37\xf3\x5a\xe8\xb9\x2a\x12\xca\xf2\x07\x59\xca\x45\xb3\x80\x14\x2b\x91\x35\x90\x7f\x48\x6f\x45\xc0\x71\xb0\x1f\xb8\xec\x11\x3e\xa6\xc3\xc5\x84\xa0\x40\x2b\x28\xdb\x19\xba\x90\xa6\x4e\x2e\xdd\x88\xb9\x2f\xf9\xfc\xc4\x37\x5b\x02\xfd\x58\x21\xfb\x5b\x91\xb8\x11\xdf\xdd\xdc\x8c\xbf\x15\xa6\xb3\x76\xb6\x79\xab\x12\x2f\x9e\x93\x5d\x16\x91\x3a\x0e\xeb\x48\xa8\xa5\x67\xa2\xe0\xcb\xde\xcc\xd1\xcb\x66\x31\x11\xa0\x2a\xac\x66\x48\xb6\x23\xa9\x5c\x34\x32\xb9\xed\x8b\x36\x1e\x27\x04\xf9\x79\x38\xf5\x97\x0d\x48\x0e\x81\xc8\xf8\xad\x2d\xa1\x96\xd6\xa7\xcc\x7e\xa7\x1e\x98\x9a\x1a\x51\xb2\xc3\x90\x1e\x7a\x14\x23\xc4\xfb\x43\xd4\x4a\x23\x7f\x13\x12\x2c\x9f\x7e\x3a\x28\x16\x6e\xc7\x23\x4e\x6f\x6d\x3e\xe3\x51\xf0\x79\xeb\x9c\xe3\xd9\x6f\x1f\xf2\x37\x23\xaf\x16\xbc\x81\x7e\xfd\xc6\x42\xd2\x39\x22\xac\x3e\x63\xaa\x26\xab\xb0\x7a\x7c\x42\x2a\x3a\x1d\xe3\xa3\xe8\x32\xf0\xd2\xd1\x11\x59\xde\xab\xe2\x1e\x61\xa1\x6e\x4e\xc7\x00\xb7\x3d\x82\x7f\xcd\x95\xba\xd3\x21\xf2\xdf\xa9\x2e\x3b\xdc\x15\xff\xe5\x70\x5b\x8c\x5c\x08\xd5\x98\x9d\x2f\x4a\x94\xa4\x80\x9b\x21\x17\x42\x33\xd5\x98\xce\x32\xd3\x6b\xc9\x95\xfc\xa7\xdf\x96\x2d\x79\x65\x44\xa7\xd3\xc9\x7d\x2d\x12\x94\x4e\x93\xeb\xac\x7c\x3f\xb7\x45\xf4\xfc\x6d\xb5\xf2\xab\x58\x01\xaf\xdc\xdb\x4e\x03\x47\xfd\x7b\x83\x08\xe6\x4c\xc6\x2b\x62\x17\xa5\xa2\x7f\x50\x79\x42\xee\xb2\xbf\x62\x39\x64\x07\x95\xa4\x85\x69\xd7\x31\x8e\xac\x5c\x50\x7e\x39\xa0\xe7\x84\xbb\xc7\x4b\xa6\x32\xe3\x8c\xe8\x1e\x49\xe2\xf5\xeb\xd7\xaf\xe1\x22\xbe\xfe\xe3\x1f\xff\xc8\x00\xfc\x33\x17\x99\x5c\xac\x36\x84\x56\xff\xf9\xe6\xcd\x88\xfd\xf5\xe4\xc3\x7b\x0a\x9b\xd6\x08\xc8\x80\x3d\xdb\x06\xad\x97\xf5\x80\xfd\xef\xeb\x8f\x97\x2e\x58\x4e\x77\x9e\x02\x35\x58\xb8\xe9\x8d\xd8\x99\xac\x41\x4a\x72\x00\x70\x2e\x2a\x97\x9b\x39\x50\x7f\x7b\x21\x39\xe0\x6e\x44\x48\xe9\xa4\x73\x53\x28\x01\xd6\xe6\x83\xe2\x08\x80\xa0\x52\x48\x07\xef\x86\xf9\x02\xbe\x82\x23\x54\xde\xc6\xd2\xc5\xce\xa2\x01\x43\x19\xb0\x42\xde\x09\x57\x0f\x39\xc4\xad\x63\x30\xbf\x0b\x56\xc2\xce\xfc\xd0\x3b\x15\xd1\xd6\x12\x66\x3a\x03\x2b\xdb\x5c\xb4\x92\x8d\xdd\x09\x7b\xa1\x64\x3f\x3c\xe4\x63\xdf\xa7\xbd\x90\xdb\xdd\xc8\x95\x37\x7b\xee\xd3\x5f\x1a\x35\x59\x1a\xf1\xa4\xdb\x44\xef\x92\x0d\x09\xb6\xa6\xe0\x2e\x89\xd3\xd2\x1d\x08\x05\x0c\xc9\xa2\xae\xbd\xcb\xcb\xce\x15\x62\x63\x50\x2d\xeb\x50\x4c\x7b\xc1\x4b\x3e\x83\x18\x4d\x00\xf3\xa6\x92\xa7\xb5\x00\x04\x60\x7b\x68\x36\x5c\x58\x07\x37\x73\xe0\xac\x35\xab\x57\x77\x96\x2e\x1f\x8d\xd5\xb4\xa1\xbc\x59\xe5\xb6\x94\x03\xcf\xb4\x3f\x3a\x6e\x8f\x18\x81\xd8\xc5\x4e\xe6\xaa\xb5\xe6\xa8\xf6\xf2\x10\xf3\x76\xf9\xea\x08\xf9\xeb\x62\x67\x62\x32\xd2\x66\x27\x6b\x50\x54\xfc\xaa\x24\x86\x45\xf0\x3c\x2d\x6b\x25\xa1\xd9\xd8\xbb\xde\x14\x46\x56\x45\x18\xa2\x7f\x21\x14\x14\xf2\xd0\x61\x3c\xf2\x55\x71\x04\x48\x7a\x0b\xfb\x5b\x71\x59\xb3\x43\xdf\x97\x28\x0d\x50\x0c\x44\xd4\xa8\x78\x1d\xb4\xc0\x4c\x2d\x16\x5c\x1f\x39\xf4\x04\xab\x3c\x13\x96\x52\x66\xdf\xe2\x45\x00\x14\xb2\xa4\x68\x25\xe1\x3e\x86\x4b\x29\x79\x0a\x55\xeb\x06\x7e\x77\x25\xf3\x6d\xcf\x08\x9d\xdc\xd9\x03\xa2\x64\xdf\xf0\xec\x4e\x94\x39\xfb\x41\xbb\x11\xe6\xcb\x92\x2f\x28\x22\xbf\xaa\xd5\xbd\x24\xb7\x6a\xe7\x88\x0f\x02\x33\xb7\xc4\xdf\xd5\xed\x2f\x9a\x99\x2c\x53\xc3\x6d\x92\x75\x9c\x7f\xd0\xa8\x02\xae\x3b\x93\x54\xcd\xa2\x96\xf7\x99\x70\x80\xf5\xd0\x5b\xe2\x2b\x74\x27\x7a\xec\x97\x2d\x67\x23\x5c\xea\xa8\x64\x86\x95\xc2\x08\x2e\xd9\xb1\xae\xce\x92\x4d\x96\x08\xc6\xf9\x3c\xf3\xe6\xd5\x37\x67\x63\x51\x6b\xa9\x8d\x28\xcd\x93\x88\xd3\x15\xcf\x95\x66\xdf\x14\x2a\xbb\x63\x67\x02\xc2\xc6\xb7\xa5\x53\x57\xdf\x9c\x79\x1a\xb5\x96\x38\x01\xea\xd1\xce\xd4\x69\xa1\x4a\x69\x54\x6d\xcf\x2b\x44\x30\xef\x60\xd5\xef\x18\xe7\x49\x23\x77\x04\xc3\x4e\x6c\xa9\x1a\xf6\xc0\x11\x57\x0d\xe6\x3b\x62\x37\xb2\x7a\xcb\xce\xa3\x02\xeb\x29\x57\x80\xd4\x3b\x98\xfa\xa1\xea\x88\x7e\xbb\x6a\xf0\xb7\xff\x28\xcd\x53\x4d\xff\xcf\x04\xdc\xf8\x43\x3d\x49\x06\xd2\xe3\x22\x27\x4d\xaf\x35\x1c\x12\xac\x68\x8e\x10\xb2\x89\x21\x50\x95\x15\xed\x7c\x62\xf4\xb9\xe3\x7a\x92\x1f\x5f\x9d\x9f\x9c\x7d\x38\x1f\x2d\xf2\x3f\xcc\xd5\xc3\xd0\xa8\x61\xa3\xc5\x50\x9a\x64\xb4\x97\x58\xc2\x3f\x57\x3d\xfc\xf8\xc0\x81\x13\x81\xd8\x64\x14\x40\xa5\xc1\xef\x96\xc4\x5d\x7d\x73\xf6\x83\x8e\x51\x47\xa5\x66\xc7\xc2\x64\xc7\x99\xa8\xe6\xc7\xd4\xf5\xa7\x1c\xbd\x3f\xb4\x09\xfb\x62\xa6\x8a\x02\xa5\x0c\x7b\x22\x4f\x45\x35\x67\xae\xf9\xcb\x0f\xa9\xaf\x10\x75\x84\xb6\x5f\x29\x55\xac\xdb\x6f\xfb\x9c\xb6\x3b\x5a\xce\x7a\x92\x3e\x81\x2f\xb4\x80\x4f\x14\x0a\x36\xfa\xa8\x12\xdc\xff\xc5\x67\x11\x43\xb1\x41\x45\x9f\x2b\x2b\xbe\x26\x10\x3b\xf1\x11\xc8\x47\x11\xe2\x23\x6f\xcc\x5c\x94\xc6\x79\xa5\xb1\x8b\xf6\xb1\xbe\x98\x22\x1b\x85\x2a\x23\xf7\xa2\xae\x01\x30\xc9\x9f\xeb\x58\xf0\x92\xc5\x0b\x4e\x70\x87\x4a\xef\x38\xb7\x50\x70\x28\xcd\xab\xc3\x29\xb3\xcf\x57\x4f\x19\xcf\x17\xb2\xfc\x74\xe7\x6c\xdb\xfa\xd8\x9d\xe9\xf4\x28\x07\x57\xdf\x9c\xed\x79\xef\x9e\xf7\xee\x79\xef\x9e\xf7\xee\x79\xef\x9e\xf7\xfe\x93\x78\x6f\x5f\xc5\xbf\xdf\x33\x03\x4e\xce\xa9\x8f\x0b\xf3\x72\x26\x4e\x30\x91\x9b\x82\xbd\x7b\xb9\x70\xbb\x29\x1a\xaa\x8c\xe5\xad\xcd\xa4\x90\x19\xb0\x9b\x8d\xc6\x33\xdb\xc7\xc1\xe0\x00\xe2\x15\xf7\x41\xe7\x9f\x3a\xe8\x3c\x1d\xab\x7a\xc6\x0d\xa7\xb2\x00\xd2\x20\xc0\x8a\xf3\xba\x4a\xaa\xa2\x18\xc1\x06\x78\xc8\x02\x0f\xd6\x21\xee\xb1\x16\x8f\x98\x59\x61\x69\xd5\x18\x13\x99\xb8\x27\x4b\x23\xf6\xd9\x48\xfb\x6c\xa4\xa7\x04\x21\x23\xad\x48\x93\x21\x44\x94\x09\x56\xc4\x28\x16\x32\x44\xed\xf8\xc3\x81\x92\xef\x2b\x3b\xbe\x54\x55\xfc\xf5\x64\xf5\x59\x61\xbe\x57\xc2\xca\xca\x40\x82\x42\x81\xa9\x0d\xaa\xce\xea\x0b\xdd\x50\xdb\x56\x31\x41\xd4\x6f\xea\xf0\x5e\x5c\x43\x6f\x9f\x77\xb9\xcf\xbb\xfc\x57\xa4\x74\x54\x1a\xf2\x3d\x56\xed\x84\x1b\x90\xbe\x39\x50\x04\xd9\x17\xf7\x59\xc2\xdf\xe4\x06\xf7\x6a\xab\x71\x95\x0b\xb8\xab\xbb\x97\x1f\xea\xa3\xa0\x52\xa7\xef\x16\xd9\x0b\x34\xe0\xd4\xfe\x0b\x91\xdd\xfe\xdc\x8f\x16\x15\xd0\xbb\x24\x83\xf4\x50\xa7\xcf\x37\x3f\x24\x79\x98\x30\x63\xa4\x1f\xe1\x80\x40\x4d\x48\xdd\x5f\x6c\x83\x77\xd0\xb7\x30\x6d\x08\x84\x09\xe0\xd8\x42\xf1\x75\x6e\xc0\x0b\x06\x50\x5f\x0f\x50\x46\x05\xba\x92\x8b\xdf\x3b\x2c\x42\x7a\xc5\x77\x03\x4a\xe8\xdf\xb5\xed\x99\xf3\x4b\x23\x2d\x24\x3f\x12\x50\x7b\x76\x15\x05\xfc\x9b\x9d\x6c\xb7\x08\x0f\xbb\x87\x5c\x71\x88\xfa\x15\x35\xc0\x28\x02\x7b\xd8\xa4\xac\x11\xbc\x33\x6d\xe5\x8a\xb6\x56\x70\x6d\x6e\x6a\x5e\x6a\xb9\x26\x11\x03\x18\xb9\x36\x08\xdc\x64\x62\x90\x48\x66\xfc\xbb\x2e\x13\x4f\x95\x1e\x05\x1c\x50\xe8\x20\xa2\xe6\x13\x67\x67\xec\x8e\xf7\x6a\x67\x11\xc6\xde\x97\x53\x94\x4c\x96\xb8\x09\x78\x98\x2e\x98\xd2\xaf\x07\x14\xa1\xb6\x2b\xb5\xbe\xeb\x0d\xc4\x27\xa0\x34\x62\xaf\x03\x17\x5d\x7d\x03\x70\xbf\xef\x78\xa1\xc5\xc0\xc1\x06\xa6\x8b\xc0\x24\x2d\xd4\x37\x64\x96\xee\x39\x5c\xeb\xc0\x6e\x9f\x2c\x5e\xaf\xcb\xdc\x48\x5e\x8e\x4d\x49\xf3\xbd\x2f\xa1\x68\xd6\x36\x77\xa6\x67\xba\xcf\xa7\xff\x4c\xe4\xec\x0d\xf9\xf4\x7d\xbb\xf7\xf4\xa0\xd7\xa8\x97\xe3\xa8\xf7\xf0\xf3\x0b\x84\xe4\xa5\xd5\xc5\x7d\xfe\xfe\x3e\x7f\xff\xd3\xe4\xef\xa7\xcf\xdb\x0b\x65\xf2\xf7\x4b\x63\xbb\x92\x68\x50\x3e\x64\x8f\xde\xf1\x74\xdb\xc7\x42\x96\x56\x32\xee\x4f\x53\x71\x41\xf3\xe5\x4a\x14\xbe\xe5\xde\x14\x40\xc8\x4a\xf1\x50\x84\x88\xb5\x08\x6f\x60\xe2\xc0\xf6\x1f\xa4\x99\x5b\xc9\x81\x97\x80\x34\xda\x2a\xb2\xcc\xb2\x9a\xeb\x39\x60\x22\xdb\x4e\xa5\x59\x4d\xac\xf0\x80\xa1\x6d\x9f\xd0\x6b\x76\x18\xc3\xa8\xa7\x5e\xb0\x1a\xad\x56\x80\x5f\x4a\x19\x5d\x30\xa0\xa3\xed\xc2\x92\x69\x5d\x13\x0b\x43\xbb\xe4\x75\x9d\xb0\x40\x4e\x03\x74\xef\x8e\xa2\x22\xb4\x40\x3c\x28\xe1\x4c\x6a\x4b\x9c\x1a\xa9\xe7\x3e\x98\x5c\x3c\x52\x76\x24\x20\x20\x5b\xfe\xd3\xf2\x21\x77\xd3\x47\x3e\x19\x1d\xff\xc3\xc3\x9c\x9b\xa1\xd4\x43\x3e\xdc\x40\xe7\xd7\xc6\x74\x53\x76\x5f\xca\x9d\x46\xc9\x92\x88\xd9\xc3\x27\xa2\x60\xbf\x34\xa2\x5e\x22\x82\xf7\x4a\xde\x74\x40\xf9\xf5\xcb\x9e\x61\x00\xc0\xc5\x94\xc5\x9d\x91\x9d\x03\x37\xba\x65\xe4\x40\x3e\x0f\xb6\x12\x22\xf7\xae\x3a\xc0\xb8\x85\xcf\x04\xf6\x14\x76\x27\x96\x98\x87\x43\x11\xf9\x30\x98\x08\x70\x58\x96\x4c\xd5\x39\x6e\xe4\x44\x84\x2b\x17\xe2\xef\xd3\x37\x72\xc0\xe4\x34\x54\x45\x0e\xa3\xa3\x91\xa9\xb2\x33\x9a\x1d\xb7\xd8\xae\xde\xbd\x14\x0f\xb0\xd7\xb2\x9c\x0d\xed\xb5\x1b\x52\x82\xec\x31\x7e\xe4\xf8\x0f\xf0\xdf\xa1\xdb\x1d\x9d\x20\x12\x3c\x47\x51\x96\x17\xe3\x16\xb9\x58\xf5\x47\x6f\x81\x97\x45\x17\x84\xb8\x2d\xac\x64\x5b\x71\xf3\xb5\x03\xba\x18\x5a\x72\xca\x64\xa9\x9b\xe9\x54\x66\xc0\x69\xdd\x8d\x22\x13\x96\x81\x8c\x07\xba\x5e\x86\xdf\x09\xd8\xda\x4c\x58\x82\x2f\xf0\x24\x71\xe6\x86\x71\x25\xa6\x9f\xf4\xc6\x54\x2a\x1f\x46\x20\x2a\xbf\x35\x00\xd7\x4e\x0c\x68\x63\xc9\xaa\x35\xaf\xad\x18\xe2\x5d\xa9\xa7\xa8\x74\xd5\xf6\xdc\xa8\x9d\x55\x40\xb4\x76\x55\x73\x70\xc4\xfc\xaa\x97\x1c\xdf\xb4\x48\x70\xa0\xfe\xfe\xc8\x1c\x22\x1f\x02\xf4\x69\x07\x7d\xde\xe1\x7e\x0e\xe8\xb8\xf7\xf6\x6e\x99\xcb\xb2\xae\x32\xd6\x55\x7b\xf5\x48\xf3\x08\xe3\x45\x23\x19\x56\x78\x5c\xb7\x98\xaf\x74\x6b\xe5\x5f\xa4\x78\xd0\x06\x3b\xcd\x4b\x17\xc3\x82\xf2\xa7\x40\x6e\x45\xbe\xed\xc6\x06\xce\x00\x48\x46\x44\x36\x5b\x59\xed\x85\x37\x88\x7b\xda\xe2\x28\xd1\x7a\x8b\xe3\x76\x9b\xeb\xac\x98\xdf\x8a\xd2\x95\xa5\x5b\x4d\xed\x5e\x69\xc3\x6a\x31\x2d\x00\xa5\x00\x72\x21\xc2\xef\x34\xa4\x1e\x4b\xe9\x13\x47\x8a\x05\x46\xe1\xc0\x6f\xbb\xb0\x78\x3b\xfc\x6d\x79\x99\x8b\xb0\xbd\xf4\xd4\x9d\x3f\x4e\x3f\x1e\x9e\x93\xa5\x3e\x6f\xa1\xe7\x39\x4a\x47\xb8\x69\xbd\xc4\x1c\xb5\xd7\x77\x52\x14\xf9\x75\x24\x5c\xf5\x93\xf1\xc4\x0b\x31\x01\x0f\x22\x78\xa8\xf5\x73\x98\x55\xcd\x80\x2d\xc4\x42\xd5\xcb\x23\x97\xe7\x27\x6b\x57\x46\x8e\x66\xbc\x89\x94\x53\xe2\xe7\x0a\x29\xf7\x5f\x4c\x17\x7c\xf2\x98\xef\x10\x58\xf4\xd6\x65\x48\xe6\x71\x1e\xd2\x80\xb2\x15\x79\x81\x05\x1c\xca\x7b\x76\xcf\xeb\x74\xf0\x87\xbc\x97\x3a\x29\x80\xb6\x40\x00\x5a\x53\x73\x57\x52\x3c\x56\x4a\xc3\x1d\xa4\x95\x19\x38\x91\x0d\xe4\xef\xdb\x83\x37\xb7\x07\x4f\x50\x55\x47\xab\xc5\x25\xe1\xa6\x68\x1f\x02\xdc\xdd\x43\x5c\x81\xb7\x91\xf1\x42\x11\xda\xc8\xb3\x0d\x8d\xdb\x57\xba\x74\x47\xe9\x2f\x8d\x42\xab\xc1\xa6\x33\x07\x0d\x99\x16\x46\x33\x3e\x9b\xd5\x62\x66\x09\xf0\x2f\xf0\x63\x2d\xec\x70\x31\x89\x93\x89\x12\x02\x02\x73\x28\xf6\xe6\xeb\x7f\xef\x9d\xf6\x7b\xa7\xfd\xbf\xb4\x75\xed\xdf\xc9\x4f\xee\x0c\x22\x70\xfb\x3f\x37\x04\xe4\x16\xbd\xda\xd2\xbd\x1d\x4f\x8e\x8a\xf1\x7a\x32\x86\x24\x0e\xea\x82\x9a\x20\xa3\x37\x9a\xcf\x3e\x3b\xf0\xe7\xf6\xd4\x77\xf5\x33\x77\x97\x6d\x33\xdb\x78\x79\xbf\x72\xd4\xf9\x66\xc7\x57\xa7\x71\x1b\x2f\xba\xcd\xb6\x40\x75\xda\xbb\xb9\x3e\x0f\xce\xd4\xe3\xe6\xba\xb0\x3f\xaf\xdb\x44\x32\x7b\xed\xac\x32\x54\xaa\x90\xd9\x32\x2a\x21\x65\x7b\xd3\xc7\x2f\xa2\x60\xc7\x42\xd4\xde\xa7\xb5\xf7\x69\x7d\x2a\x9f\x56\x7c\xce\x5e\xcc\x97\xd5\xa5\xf8\xdb\x52\xdb\x5e\x81\x60\x8e\x7b\x02\x27\xcd\x28\xc7\x43\x41\xab\x83\x17\x37\xfb\xaf\x6c\x0f\xab\x5f\x87\x7e\x9d\xb3\x4c\x98\xd8\x29\x13\x7f\xd2\x97\xff\xb3\x6a\x47\x50\xf4\x5e\x9e\x60\x6c\xb4\xab\xbf\x84\x12\x69\xc5\x96\x4c\x55\xe2\xba\xd7\xeb\xd2\x7a\x1c\x01\x65\xb6\x83\x3e\xa6\xb2\x30\x96\x5c\x00\xde\x0f\xbc\xb2\xea\xfe\xc0\xa2\x89\x64\xd0\xaf\x79\x76\x87\x8e\x0f\x4e\xd2\xcf\xa4\x31\x56\x7d\x86\xa4\x89\x9c\x35\xda\xd2\xab\xeb\xf8\xe3\x1f\x21\xf1\xd2\x57\xd7\x9c\xb8\x1a\xca\x80\xfd\xe1\x8b\xd5\x3a\xe6\xf3\x0e\xe0\x97\x62\xf5\x17\x46\x31\x40\x8c\x25\x1a\xe2\xc9\xe5\x19\x6b\x4f\xf0\x50\x4e\x23\xd8\x14\x59\xc2\x1f\x47\x03\x9c\xc7\x44\x10\x84\xe8\x36\x15\xed\x42\x9a\x72\x6b\x81\xdd\x8a\x6f\x91\x38\xe8\x16\x75\xb7\x85\x04\xf7\x16\x40\xf8\xb4\x6b\x60\xe2\x2a\x27\x30\x56\xd7\x59\x81\x57\x2c\x05\x5b\xa6\x32\xb7\xa6\xbc\x96\x96\x3c\xd1\x9a\xb0\x8d\x3b\x62\xa5\x79\x8b\x9e\x78\xe1\x3b\xbe\xdd\x80\xad\xe9\x0c\xa9\x8d\x4e\xe6\x65\x6d\x43\x4c\xbe\x5b\x25\x26\xc9\xef\xfd\xcb\x51\x93\x46\x8b\xc4\x72\x00\x46\x8f\x6c\xfb\x7e\xfc\x32\x1b\x65\x78\x81\xca\x4e\x30\xb6\xd3\xb5\xa5\xdc\x29\x6f\xe2\x49\xed\xc7\x27\x9d\xd1\x27\xb7\x8d\x5d\x45\xb5\x4f\xb7\x39\xce\x71\xfb\x8e\x4b\x34\x53\x8b\xaa\x31\x22\x5d\x57\x75\xf3\x49\xc6\x23\x99\x0a\x0d\x83\xa3\xda\xfe\xd6\x82\x3f\x42\x88\x07\x47\x0c\x01\x35\x5d\xf9\x3a\xd6\xea\x7d\x78\x42\x1a\x7b\x2b\x4d\xe7\x18\xd3\x05\x86\xd4\xfd\xd0\x77\x3f\xf4\x56\xe1\x7f\xc2\x31\x77\x22\x6e\xda\xf4\x0a\xc2\x6f\x67\xbd\x28\x24\x66\xdd\x7a\x39\x3d\x11\x28\xb8\xef\xc7\xca\xe7\x0b\x69\x0c\xd9\xb3\x23\x04\x62\x08\x59\x88\xcd\xcb\xb4\x53\x72\xea\xab\xea\xbb\xd8\x90\x62\x19\xb3\x03\x88\x0f\x7e\x90\xda\x15\xad\x86\x22\xf6\x0b\xa7\x31\x0e\x5d\x01\x3a\x60\xa5\xff\x7a\xbb\xf7\xc9\xae\x34\x21\x5f\x7c\xac\xbc\x1b\xb7\xef\x32\xb7\x5b\x42\x64\x42\xe4\x85\xc4\xf0\x10\x5e\x55\x85\x0c\x61\x28\x7e\xbd\x36\xdf\x63\xab\x6b\x24\xae\xb1\xfd\xd9\x9e\x09\x07\xd0\x01\xed\x28\x8e\x06\x21\x1c\xe1\x8b\x7a\xe5\x8b\xe9\x50\x6d\x55\xa4\x1c\x0f\xaa\x20\xac\x32\x0f\x03\x62\x7f\x79\xea\x47\xd6\xc4\x54\xb7\x3e\x02\x88\x1d\x4f\xfd\xc8\x1a\x7c\xb7\xd6\x47\x20\x75\xfd\x69\x1f\xd9\x05\x65\xed\x3a\xe3\x85\xb8\xf8\xb8\x3b\xd2\xda\xda\x17\xdb\x28\x82\x95\x6f\xc3\xe8\xad\x95\xfa\x17\x49\xeb\xd5\x8c\x1b\xf1\x00\x12\x22\xa6\xc8\x1c\xc4\xf8\x07\x4f\x46\x6d\x09\xc8\x2c\x9f\xa8\xe4\x49\x8c\xc2\x12\xa1\x0e\xd0\xd3\xd4\x99\x70\x13\x4d\x3a\xc0\xe1\xd3\xae\x62\x3e\x49\x2c\x6e\x19\x4f\xc6\x17\xec\x5b\x7c\x39\x5d\x79\xa2\x56\x06\x25\xfc\x33\xb5\xe0\xb2\x27\xd7\x21\x06\x8b\x70\x3d\x8f\xfd\x9b\x0c\x5f\x8d\x53\x21\x80\xe2\x42\x96\x14\x20\xc0\x7c\xfe\x05\x5b\xb6\x82\xcd\x88\x30\x0e\xe9\x92\x45\x50\x19\x6e\x5d\xe0\x5a\x82\xdc\x0e\x38\xb2\x5a\x40\x16\xc8\x3d\xb2\xac\x7a\x01\x6c\x08\x38\xaa\xa1\x80\x4a\xab\x1b\x39\x6c\x8d\x01\x7b\xaf\x66\xb2\x74\x07\x09\xb4\x49\x3b\x3b\x2e\x8b\x9d\x54\xbc\x55\x24\x2a\xad\x8b\xf3\x92\x4f\x8a\x94\x38\xfc\xae\xe0\x33\xb4\x5d\xd8\x06\xc7\xb9\xd4\x10\xc6\x73\x7d\xfd\x9e\x91\xfd\x28\x8b\x54\x5b\x3a\x4e\xde\x93\x8c\x5b\x94\x5e\x55\xdc\xfe\x34\xf6\xf1\x05\x26\xe6\x08\xed\x8b\x15\x60\x02\x14\xbc\x42\xb2\x85\x43\x60\xf6\x81\xb8\x37\x73\x99\xdd\x8d\x23\x30\x4d\x55\xdb\xdf\xca\xe8\xa7\xd6\x9d\xea\x3e\x4b\xa7\xe2\xc0\x27\xc7\xbd\xa8\x34\x6e\x6b\xaf\x69\x6c\xb6\x65\xb2\x38\x46\xb8\x4d\x2c\x87\x3b\x91\xfe\x1e\xd2\xaa\x8d\x37\xcd\x2d\x05\xd1\x1d\x88\x17\xf5\x37\x4b\x96\x6e\x58\xc9\x6f\xe0\xc2\xa5\xe3\x13\xe2\xef\xf8\x25\xee\x22\x76\x92\xa6\xe3\xa6\xee\x68\x1f\xc9\x71\xab\x93\x97\xba\x0d\x97\xfd\xf4\xe2\x30\x5b\xe2\x8e\xd1\xc8\x76\xe4\x46\x7b\x1e\xb4\x15\x0f\x4a\x9e\xa9\x3d\x13\xda\x33\xa1\x17\x80\x64\xda\x73\xa2\x3d\x27\xfa\x7d\x70\xa2\x5d\x00\xb8\xae\xbb\x6e\x8b\xde\xc2\x63\x68\xe1\x0f\xb5\xb6\x3a\xb1\xe8\x27\x97\x67\x7e\xd9\x5d\x76\x43\x17\x02\x07\x1e\xda\x5e\x72\x6f\xc1\x88\xfb\xdb\xc5\xca\x06\x06\xf8\x73\xf4\x73\xa4\xa3\xbd\x4f\xbc\x6b\x7a\x65\xe0\x91\xe9\x6f\xb2\xa4\xc7\x1d\x93\xe9\x5a\x73\xfe\x4e\x2e\x8b\xdc\x99\x1c\xdd\x2a\x47\xa6\xc7\x1d\x5d\x01\x6b\xbb\x5a\xb7\xc1\x6b\x5f\xdc\xbc\xe9\x1b\xb6\x8b\xdc\xe5\xbe\x08\x9b\x3d\xe2\xa4\xc6\x6b\x5f\x74\x83\xd3\x3a\xdb\x7b\x83\x71\x0f\xdc\x91\x6a\xf7\x4e\x2d\x20\x4a\x22\x1c\x13\xbc\x64\x21\x15\x68\x53\x54\x08\xbc\x04\x57\x76\x70\xe0\xba\x5e\x95\x65\xfc\x93\xf5\x40\xaf\xd0\xd9\x2b\x8d\xa3\xb2\x3b\x3c\x97\x50\x3d\x81\x3b\x4f\x84\x73\x91\xfd\xc8\x0b\x99\xfb\xa9\xa0\x19\xea\xa2\x1c\xb0\x4b\x65\xec\x7f\xce\x1f\xa5\x36\x7a\xc0\xce\x94\xd0\x97\xca\xc0\x9f\x69\xaa\xe6\x47\xbf\x99\xb0\xc1\xea\x78\x84\x18\xbf\xf4\xc1\x96\x92\xa6\x69\x30\xe2\xc4\x36\x97\x04\xc3\x66\x2f\x4b\x14\xf5\xa0\x89\xd7\x8a\xb0\x51\x52\xb3\x8b\xd2\xf2\x0c\x9a\x1d\x84\xd0\x60\x9e\x16\x76\xe1\x3c\x7c\xa5\x2a\x87\x90\x6c\x95\xec\x03\x17\xc5\xf6\x13\x2f\xcb\x9a\xee\xa8\x2b\x48\x37\xc2\x27\x14\x20\xcf\x33\x91\xb3\xbc\xc1\x92\x0c\x8c\x72\x1d\x64\xc6\x20\xd5\x81\x41\x06\xc4\xf3\x3c\x73\x6b\x4c\x4c\x22\xcb\xd4\xa2\x1a\xd7\xca\x8a\xb8\x6b\xa5\xf8\x56\x4b\xef\x3f\x03\x5c\xe0\x63\x6f\xf1\x7a\xa5\xad\x4c\x64\x1b\x5a\x3e\x08\x2d\x49\x0e\xd3\x23\xf6\xd1\x95\xaa\xf3\x8f\xf0\x42\x12\x40\x4b\xbb\xda\x4b\x3f\x9e\xc6\x2a\x8c\x86\x65\x16\x56\x0a\x8e\xa6\xd1\xa9\x02\xd3\x69\xe1\xa0\x29\x04\x55\x1d\x8a\xa6\x04\x5c\x0f\x25\x7e\x97\xe1\x87\x05\x1a\xbd\xf8\xd1\x68\xcc\x1a\x0b\xf3\x70\x3b\x5c\xd5\x22\xe2\xce\xf1\xdb\x46\xb1\x07\x55\xdf\xc5\x3a\x85\x1d\xa1\xc0\xda\x89\x15\x37\xf3\x01\xdd\xd2\x7b\xe1\x84\xcb\xbb\x66\x22\x0a\x61\x5e\xb5\x58\x7e\x77\x75\x1d\x96\x24\xf5\x0c\xd5\x47\x70\x2d\xc1\xf8\x4f\xf6\xd1\xdb\x83\xf7\x6e\x05\x7a\x34\x8c\xb4\x7d\x15\xdf\x8f\x64\x34\x99\xcd\xd9\x9d\xb4\xd2\xed\x74\x65\x28\x2e\xfd\x8e\xcc\xd5\x81\xaa\x78\xd3\xf6\xdb\xdb\xf2\xb6\xf4\x23\x61\xc3\x27\x2f\xfe\x55\x53\x1a\xb9\x10\x4e\xc6\x1b\xb6\xcd\xae\xac\xc6\xc7\x5e\x38\xf5\xe7\xad\xd3\xcd\x0f\x25\xac\xac\xfd\xee\x90\x95\x2a\xd1\xce\xcd\x25\x21\xc8\x74\x12\x95\x9a\x12\x79\xf8\x7f\xfd\xdf\x83\x5c\xda\x35\x5c\xc8\x12\x49\xb4\xcb\x6b\x9a\x4a\x51\xe4\x7a\x68\xd4\x30\x6a\x20\xbe\x59\xa6\x8f\x70\xd8\x31\xf7\xd3\xaf\xbf\xfe\x6d\xb7\x9b\x5d\x8b\xb5\x9c\x11\x5b\xb0\xb9\x2a\x72\xed\x34\x19\x00\x4c\x02\x91\xd0\xe1\xdc\x00\x26\x29\x9c\x76\xf4\xce\x4e\x96\xf6\x24\x38\x78\x6d\xa4\x73\x24\x27\x02\x2a\x26\xcc\xd2\xdf\x88\x02\xca\xa0\xcc\x79\xc9\x3e\xf0\x47\xfc\xe0\xb5\xfc\x87\xc0\x5e\xf6\xd8\x7a\x9f\x13\x9c\xa9\x17\x77\x22\xc5\x16\xe3\xdc\xce\xb9\xbd\xf5\x82\x38\x19\x64\xc9\xa3\x54\xca\x8b\x6a\xce\xcb\x66\x21\x6a\x99\xb1\x6c\xce\x6b\x9e\x19\x51\xeb\x01\x7b\x35\x7c\x35\x60\xaf\x7e\x7e\x65\xb9\xe3\xab\xd1\x2b\x3c\x3f\x5a\xd4\x92\x17\xb0\x14\x50\xa7\xd1\x8b\xda\xe1\xe4\x21\xa4\x2a\xd7\xe2\xeb\xaf\x98\x28\x33\x95\x83\x0d\xa1\x86\xdc\xfe\x95\xf0\x45\x5e\x4f\xa4\xa9\x79\xbd\x64\x87\x14\xf3\xb3\x04\x96\x8d\x2f\x1c\x61\x8f\x18\xfa\x38\x17\x35\xa4\xfe\xa3\x1f\x16\xa8\x8c\x5b\x7a\xa3\x54\xa1\x47\x52\x98\xe9\x48\xd5\xb3\xe3\xb9\x59\x14\xc7\xf5\x34\xfb\xea\xeb\xaf\xfe\xe7\x1f\x34\xea\x71\xc3\xaf\x9e\x9c\xe3\xbc\x02\xe4\x0a\xa0\xeb\x8b\xc6\x58\xe5\x3a\xa1\x0e\xbb\x47\x90\xe8\x6d\x89\xb8\x3d\x6e\x80\x3b\x24\x00\xa5\x9e\x42\x80\x60\x6a\x56\x35\x8c\x94\x34\x5c\xc6\xac\x1b\x64\xc9\x0e\xb1\x42\x2c\x06\x09\xb9\xe0\x45\x57\x71\x6d\xa1\x72\xf0\x04\x1f\x85\x58\xa1\xf8\xa3\x08\x87\x6f\x2f\x74\xa7\x3d\x60\x61\x95\x4b\x82\x4d\x3b\x8b\x73\xd1\x01\x85\x3a\x40\x16\x4c\x84\x27\x0a\x68\x5a\x00\x35\xca\x4f\xf4\xbc\x9a\x8b\x85\xa8\x79\xf1\x23\x55\x15\x98\x0a\xa8\x4d\xcd\x66\xed\xac\xd4\xc8\xa0\xb0\x0f\x7a\xdd\xa7\x9a\xec\x9c\x6a\x02\x33\x3e\x4b\xce\x34\x3c\xc3\x38\x15\x57\x2d\x6d\x89\x65\xad\xcb\xe1\x44\x96\x1c\x8a\xa9\x45\x84\xaa\x74\xc7\x0c\xca\xfd\xb2\x0b\xd0\x20\x3d\x4e\x3b\x14\x59\x03\x73\x25\xd6\x83\xc3\x09\x4a\x00\x16\x58\x08\x33\x57\xf9\x88\x9d\x14\xab\x38\x11\x56\xef\x02\xa9\xdf\x5e\x6b\xe2\x34\x79\xe0\xaa\xaa\xc4\x4e\x07\x80\x4e\x60\xff\x09\x2a\x43\xb9\x64\xe2\x11\xe1\x40\x82\xd2\x83\x88\xf0\xe2\x5e\xf8\xd4\xcb\x87\xb9\x40\x90\x36\x18\xb6\x3b\xc9\x27\xe3\x8b\x5d\x42\xa9\x12\x10\x0e\x49\xc9\xf1\x07\x2a\xaa\x39\xe5\x99\x2c\x24\x40\xeb\x55\xb5\x9a\xd5\x7c\xb1\xe0\x46\x66\x6c\xce\xcb\x1c\xca\xb1\xa3\x20\xe9\x99\xcd\x6f\x8a\x2d\x8c\x34\xf3\xbc\xbc\xdf\xc2\x89\xd1\x6e\x4a\xfa\x2a\x04\x05\xe0\xe8\x8d\x62\x15\xa1\x47\x12\x85\xb8\x97\xb5\x2a\xc1\xb8\x70\xcf\x6b\x69\x89\x1d\xd6\xdf\x1c\x59\x29\xf8\x86\x04\x56\xd0\xd4\x89\x13\x1a\x5e\xcf\x84\xa1\x0e\x5f\xe9\x58\x9e\x02\xd9\xda\x13\x28\x54\x0f\xc4\x72\x88\x34\xae\xe2\xb2\x86\x12\x7c\xc9\x6f\x6e\x96\xb2\xca\xa4\xc2\x7e\x19\x29\xeb\x64\xf9\x36\x2f\x8c\x28\x02\xc1\x7c\xc7\x7f\x80\xff\xa4\xa8\x93\x4b\xd4\xed\x4b\xc0\x5d\xb6\xac\xc6\xb4\x11\x4e\xf4\x24\x8d\x22\xc1\x42\x76\x54\x90\x6b\x61\xbe\x17\xcb\x6d\x0c\x8c\x2b\x8d\xa3\x63\x62\xe5\x27\x10\xac\xb1\xd1\x26\x4d\xf7\x4e\x2c\x57\x15\x5d\x80\x49\x48\x19\x56\xa8\xf3\x48\x9c\xf2\x49\xbe\x70\xd3\x47\x2c\x52\x3c\xef\x41\x2d\xa3\x76\x77\x22\xed\x18\xfa\xd7\x3a\x13\x00\x0b\xa5\x83\x0c\xfb\xc2\xc7\x63\x53\xf2\x58\x68\xd5\x4e\x38\xda\xee\x28\xec\x13\xc5\x3e\xb7\x44\x31\xba\x3b\x4f\xcd\x10\x6b\xc7\x45\x62\x67\x2f\x61\xaa\xc7\x8e\xf6\x79\x61\xfb\xbc\xb0\x4f\x93\x17\x76\xed\x4e\xea\x8b\x24\x84\x61\x6f\x51\x09\xec\x75\x4e\x9c\x9c\x57\xe8\xd1\xc0\x9b\x07\xc2\xf1\x6a\xbd\xf8\x27\x4b\x56\x68\xbb\x25\x2f\x1f\x98\x20\x57\x4a\xd1\x73\x4d\x55\xe0\x31\x1f\x89\x24\xb0\x94\xed\x8b\x30\xf0\xc1\x92\x08\x6c\x6c\xc4\x2e\x95\xf1\xbe\x0e\x54\x8c\xb1\xdc\x46\xc6\x0b\xe7\x8f\x81\x79\xb5\xbc\xa7\x1e\xf4\x10\x73\xde\xd0\x94\xb9\x50\xf9\x16\xa9\x28\x7d\xa4\xac\x55\x54\x6e\x80\xf9\x26\x6d\x39\x32\x31\x9f\x36\xbf\xcf\x44\xee\xb8\x6a\x58\x3a\xb7\x56\x5e\x69\x09\x8b\x46\xd6\xdc\x87\xb9\xd2\xe4\x00\xa2\xec\x0f\xcb\x8c\x2d\x4b\xa0\xbd\x72\x3f\x53\xa8\xf9\xc5\xb4\x9b\xb5\x64\x2f\x99\xc8\x71\xd1\xd7\x7c\x39\xa4\x6c\x55\xdc\xcc\xf5\x80\x60\x10\x57\xde\x26\x92\x43\xdb\x0e\x1f\x44\x21\x4d\xc6\xd5\xb2\xd1\xe2\xed\xa3\x34\x50\xfa\x6e\x59\x5c\x06\xf1\x7c\xb5\x30\x4d\x85\xfd\x8b\xba\x56\xb5\xfd\xb0\xd0\x0e\x39\x72\xc1\xeb\x3b\x91\x7b\xf8\x99\x11\x1b\xdb\x11\x7a\x89\xc4\xdb\xff\x1d\xa3\xb4\xdf\x24\xab\x1c\x7c\xe4\xd5\x68\xf4\x0a\x6b\xe0\x59\xc9\xd2\xf0\x9a\x6a\xf0\xdb\xdf\x5f\xc2\xd7\xfb\xbd\x58\xde\x28\x3b\x26\xe0\x21\x7b\x09\x70\x13\x3d\x0c\xeb\xb5\x96\xc4\x85\x00\x86\x8d\x22\xa2\x6f\xda\x0e\x90\xa3\x39\xf8\xa7\xa0\xde\xcf\x41\xe1\x53\xcd\x6c\x1e\x87\x16\x59\x72\x52\x0b\x53\x4b\x71\x2f\x02\xb5\x04\x1b\xc1\xf6\xe8\x38\x6b\xb6\x5e\x6a\xd6\x94\xf2\x97\x06\xa9\x13\x90\x4a\xdf\x2f\x7e\xdb\xcd\xc0\x13\x35\x9f\x35\xd1\xa7\x67\xe0\xa0\x92\xdf\xc3\x7e\xdb\x55\x33\x78\xe6\x3f\x8e\xd7\x33\x52\x7b\x80\xc0\xb8\x0d\xc6\x81\x3e\x37\x08\x1f\x3a\xde\x36\xd6\xd1\x33\xaa\xeb\x16\xa3\x7a\x71\xf6\xf4\x12\x4c\xe9\x3a\xe6\x39\x2f\x56\xce\xb5\x7d\x92\x88\x6d\xa5\x83\xbf\x3e\xd2\x45\x7e\x0b\x5c\x8d\x4d\xec\x05\x6d\xc8\x6e\xa4\x85\x61\x95\xa8\x17\x12\x63\x63\x98\x2a\x7d\x54\x12\xce\x78\xe2\x21\x50\x23\xa7\x6a\xc9\x54\x66\x9c\xc6\xe1\x61\x71\x5f\xbf\x7e\xfd\x1a\x66\xf0\xfa\x8f\x7f\xfc\x23\x83\x98\xb2\x5c\x64\x72\xb1\xda\x10\x5a\xfd\xe7\x9b\x37\x23\xf6\xd7\x93\x0f\xef\xa1\x8c\xbf\xdd\x4e\x48\x14\xc6\x9e\x6d\x83\xd6\xcb\x7a\xc0\xfe\xf7\xf5\xc7\x4b\x17\x4c\xa2\x3b\x4f\x21\x86\xcd\x4f\xaf\x03\x3f\xfc\xf5\x57\x5f\x8d\xd8\x99\xac\xc1\x56\x20\xc9\x3c\xe4\x8a\xc4\x59\x3a\xcf\x6b\x81\x15\x02\xa7\x53\x64\x73\x0e\x1e\x96\x9c\xea\x64\x68\x5f\xc8\xd9\x1c\x16\x00\xf2\xa1\xcb\x69\x21\x33\x62\x0d\x18\x84\xe8\x5c\xb0\x98\xac\x02\x7d\x85\xd3\x60\x07\x37\xc0\x74\xed\xa9\xfe\xb6\x56\x4d\x35\x70\xb0\x6d\xf6\xea\x5a\xa1\x83\x8c\xff\xd8\x59\xd8\xab\xb6\xc3\x7e\x1d\x92\xdf\x5e\x1e\xd9\xcb\x23\xcf\x95\x47\x9e\xc9\xf6\xf5\x16\x7c\xdf\xc5\x01\xa7\x23\x98\x62\xd1\x27\x70\x56\x83\x28\xa1\xaf\x74\x9b\x0f\x36\x3d\x8a\xeb\x2e\x45\x9b\xbb\x96\x81\x1d\x63\x28\xb7\x11\x4f\x9a\x5a\x9a\xe5\xa9\x3d\xf1\x8f\x9b\x2c\x58\x71\xd3\x10\x34\x00\xbf\x76\xca\xe9\xb5\xc0\x98\xa3\xe4\xc5\x28\x61\x75\xc4\xae\xd5\x82\x7c\x8b\xe8\xf6\x88\x0e\x33\x90\xdb\xee\x17\xed\x21\x1c\xab\xbc\xf3\xf3\x88\xb1\x9f\xe6\x82\x5e\xb1\xdd\x68\xd1\x0e\xc1\x92\xe5\x4a\x4f\x86\xdf\x89\x08\xe9\x79\x8b\x28\x84\xa2\x50\x0f\xe3\x5a\xde\xcb\x42\xcc\xc4\xb9\xce\x78\xd1\x83\xdc\x7a\xd2\xd3\xd2\x61\x9f\x86\x30\x67\xd0\x30\x33\x7b\x17\x2d\x71\x9d\xd9\x2b\xb5\x50\xb0\x0c\xf4\x32\x85\x4d\xd8\xd3\x5b\x71\x48\x93\xa7\x17\x88\xe6\xdb\x43\xcb\x72\xe0\x1d\xe8\x60\xc2\xfe\xe5\x94\xa2\x66\x7e\x2e\xc5\xc3\xcf\xb6\x37\xcd\xa6\x05\x9f\xf9\xfd\x80\xc8\xbf\xb2\x13\x30\xe3\xbb\xee\x9d\x80\xa5\x86\x75\x23\x18\x2f\x1e\xf8\x52\xa3\x2f\xa9\xdd\x87\xd4\x6f\xd9\x9b\x23\x56\x37\x80\x95\xef\xfb\xc8\xd9\x17\x47\x20\xab\x9e\x9e\x8c\x7f\xbe\xfe\xeb\xf5\xcf\x27\x67\x1f\x2e\x2e\x93\x97\x2f\xe3\x15\x9f\xc8\x42\x06\xe1\xa1\x6b\xe7\x8e\x5b\xc0\x89\xca\xf3\xe3\xbc\x56\x15\xf9\xb6\x9a\x12\xca\xaf\xfa\x31\x75\xf8\x6d\xac\x47\x53\x00\x64\xab\xc3\x59\xcd\xe3\x30\xdf\x95\x78\xa2\x5d\x42\xf0\x4f\xe3\xb9\x40\xa2\x85\x5b\x8f\x44\xcc\x66\x53\xc6\xeb\x58\x86\x43\x90\xa3\xbe\xcf\xc6\xb8\x3f\x78\x9e\xa3\xa7\x61\xa6\x58\xa6\x4f\x83\x19\x8f\x17\xc5\x92\x59\x71\xe4\x9e\x17\x02\xeb\xdd\xd7\x4a\xf9\x6d\x9f\x2b\x6d\x52\xb5\xb1\x93\x7b\x62\x4f\x06\x24\x4e\xac\x0e\xdb\x3f\x62\xb9\x28\x95\x8b\x7a\x35\x54\xe6\xc8\x3e\xc5\x44\x1a\x22\x87\x71\x7e\x88\xdf\x9e\x9b\x68\x4b\xa4\x76\x83\x1a\xfb\x9e\x91\xdf\x35\xda\xe3\x1a\xf4\x84\x78\xa1\x9c\x55\x0b\x9e\x83\xbf\x15\x58\x2d\xf1\x2d\x7d\xe7\x78\x2f\xdd\x1c\x2f\xa9\xd9\x1e\xfd\xa7\x20\x95\xd8\x05\x1f\x4c\x29\x19\x62\x22\x5c\xd0\xc2\xda\x14\x96\x2b\xa5\x4c\x48\x23\x5a\x5d\xa9\x9f\x3c\x63\x92\x31\x68\xee\x1c\xc4\x91\xda\x95\x96\xc3\x4d\x0a\xa9\x46\xad\x1c\x86\x35\x5b\x54\x37\xe5\x09\x0a\x6e\xe9\x4b\xf3\xed\xc5\x19\x1c\x81\xa6\x24\xbb\xac\xa9\x97\x68\x99\x0d\xa5\xae\xba\x74\xe0\x07\xbb\xe2\xdd\x30\x3a\x09\xe2\x9a\xb0\x02\x37\x5f\x22\xfa\x8f\x0b\x35\x2c\xd3\xb4\xf9\x62\xea\x1e\xef\x40\xd3\x23\xfa\xdd\x06\xe0\x49\x11\x72\x9d\xa6\xe4\x6b\x81\xad\xed\x7a\x5d\xaa\xd2\xee\xda\xba\x8c\x14\x1f\x9b\x1c\xd6\x07\x44\x08\xa2\x70\x1c\x62\x03\x60\xcf\x1a\x57\xa8\x3d\x44\xcd\x7c\x8f\xc1\x9b\x48\x76\xc1\xe3\xe6\x1c\xc3\x72\xc1\x67\x82\x71\xe3\x97\x17\x92\x6e\x74\x53\x93\x85\x50\x1a\x96\x2b\x81\x12\x1e\x7d\xea\x87\x8b\x33\xf6\x9a\x1d\xda\x6f\x21\xa4\xf2\x94\x4b\x30\x1c\xa2\xd0\xd5\xa1\xc3\x53\xd7\x05\x0c\x09\x76\xcc\xca\x41\x53\x2c\x5c\x56\x2a\xa6\x9b\x6c\xee\xc6\xe4\x73\x8c\xac\xec\x29\x6a\xbb\x5a\x80\xd3\xf1\xb9\x6f\x70\xf7\xfc\xff\xd0\x5b\x6d\xfe\x87\x27\x1c\xff\x98\x38\x42\x42\x57\x6b\x98\xb8\x83\x3e\x94\x4a\x4e\xdb\x65\x56\x3e\xfb\xb5\x5b\x77\x39\xb4\xe8\x22\x57\x24\x52\xa1\xc8\x10\x90\xb9\x4f\xad\x45\xa9\x70\xa7\xb0\xad\x3d\xad\x52\x72\x38\x85\xae\x6a\xba\xa5\x8b\xbc\xcc\xd5\x62\xe5\x63\x1e\x27\x29\xfa\xc0\x67\xbc\xe4\x5b\x3b\xef\xda\x88\x21\xa8\x8a\x74\x42\xf3\x57\x77\xc2\x85\x60\x7b\x05\x1f\x39\xad\xb3\x12\xb4\xf7\xa0\xdb\x18\xa5\x6e\x17\xb1\x64\x70\x49\x48\x9d\x61\xb7\xcd\xeb\xd7\x5f\x7c\x1d\x6d\x13\x60\x84\x74\xf7\xce\x75\xa5\xee\x45\x5d\xcb\x5c\xf8\xd7\xe9\xc1\x8e\x99\xf3\xf1\x7c\x7f\x1d\x1c\x60\x75\x56\xbd\xf6\x2c\xfe\x84\x6d\x7c\x51\x2b\x9f\x6e\xd0\x52\x3c\x8a\xa2\x25\x75\xa4\x0e\xa4\x9b\x8a\xf7\x5f\xae\x1e\x04\x4f\x28\x31\x7a\xfc\xf3\x3d\x4c\xb4\x28\x9d\x2e\xfd\xd9\xda\x52\x7f\x6c\x89\xb0\xdb\xc0\xdc\x6c\x93\x61\x92\x6c\xb3\x7e\xbc\xbd\xda\xab\x0b\x27\xde\xd2\xc0\xbe\xd2\x1c\x7d\xe1\xc1\x62\x0d\x66\x47\x1f\xa3\x4c\xe1\x0f\xfb\x18\xf5\x3d\x94\xfc\xef\x37\x78\xa1\x8e\xaf\xc6\x2a\xf5\x6c\x9d\x7d\x7f\xd4\x9c\x59\x8b\xd4\x90\x1d\x08\xcf\x4a\xce\xf9\x96\xa4\x66\xdb\x4c\x5f\x51\xdf\xcb\x8d\xd7\xdc\x36\xc1\x93\x82\x50\x8a\x7c\xa2\x4d\xcd\x3d\x96\xa6\x56\x53\xf3\x80\xa6\x22\x6c\x7a\x08\x22\xc5\x23\x5f\x54\x85\x18\xb0\xc5\x52\xff\x52\x1c\xb9\x2c\x07\x8a\x50\x85\xf4\x1c\x06\xee\x91\xb8\x35\xfb\xf2\xcb\xd7\x5f\x47\x65\xee\xab\x5a\x3d\x2e\xd1\x30\x0c\x2e\x8b\x60\x48\x6f\x67\x96\xe6\xc2\x88\x7a\x01\xe4\x00\x15\x5c\xa8\x4b\x84\x02\x50\xa9\x1f\x44\x1d\xce\x18\x85\x7b\xd6\xe0\xe7\xf3\xdf\xd8\x53\xa5\x3d\x55\xfa\x1d\x53\xa5\x7f\x9b\xac\x83\xed\x0a\x5c\x4c\xc4\x9c\xdf\x4b\x85\xa5\xe7\x1c\x59\xfa\xdc\xaa\x3d\x10\x61\xdd\x54\xe2\xe2\x43\xba\x12\x99\x6e\xd5\x56\xf7\x53\x1c\x53\xc4\x7c\x80\x56\x20\xcb\xd7\x95\x33\x8a\x7d\xf2\x6d\x7f\xfe\x8a\xec\x56\xf9\x22\x5e\xc7\x75\x4c\xee\xa5\xab\x5d\x50\xb7\x27\x59\xe6\xac\xb9\x1b\x58\x28\xb5\x64\x13\x7b\x8b\x99\x51\x33\xb0\x61\xbe\x65\xff\x41\x8c\x75\xc0\x9a\x32\x17\xb5\x36\x4a\xc1\xf6\x35\x1a\x52\xff\x2c\x1d\xaf\x44\x3d\xe7\x15\xf8\xe8\x2b\x51\xcb\x6a\x2e\x6a\x5e\xd0\xde\x6a\xac\xd2\xcb\x4b\x0a\x81\x33\x4b\xe8\xb1\xaa\x65\x99\xc9\x8a\x13\xa2\x22\x79\x9c\x79\x63\xe6\x18\x27\x67\xcf\x08\x20\x2e\x34\x66\xae\x6a\xe0\x0a\xff\x11\x70\x0c\xd0\x53\x96\x2a\x45\xba\xe7\x8a\x9f\x94\x2b\xf2\xc6\x28\x30\xf2\xb7\x0f\xcd\x8d\xba\x13\xa9\x25\x5e\xd3\xba\x95\x66\x8e\xe6\x72\x90\x8a\x9c\x53\x07\x02\x58\x20\xf2\x01\xa5\x36\x4e\xc7\x93\x56\x18\xea\x39\xf2\x12\x00\xaf\x0c\xf4\x07\x43\xe3\x10\x63\x59\x2c\xd1\x13\x61\xf9\xe0\x29\xc5\x32\xa0\xc5\x22\xb7\x0d\x8d\x37\x5b\x80\x91\x23\x6d\x65\x04\xa3\xdf\xb8\x29\x8a\x6b\x3a\x6b\x89\xe4\xcd\x76\x8b\x76\xcc\x78\x1b\x3c\x4a\xbb\x26\x24\x69\xf3\x85\x58\xf1\x1f\xc3\x3d\xa9\x9a\xa2\x70\x49\x5e\x30\x04\x74\x01\xf9\x3a\x96\x91\x04\x6f\x57\xa7\xbd\xb0\x23\xb6\x32\x26\x28\x7d\x0b\x82\x2d\xa5\x86\x30\xf7\x64\x22\x32\x6e\xbf\xea\xfe\xf6\x19\x9f\x4d\x19\x61\x01\x55\x2a\x1f\x00\x40\x7f\xb2\x67\x70\x63\xf0\x2c\x43\xe4\x7e\xa2\xe9\x84\x63\xf0\x94\x30\x79\xb2\xd8\x1c\xe3\xcc\x8f\xff\x10\x12\xf3\x86\xf0\x93\x5d\x1d\x5a\xca\xa1\x2a\x87\x7c\x58\xa9\xfc\x05\x02\x0f\xd2\xf8\x59\x7b\x21\x70\x2f\x04\x3e\x45\x08\xec\xa3\x17\x11\x99\x70\xf1\x44\x11\x2f\x73\x98\xe9\x64\x5d\x6f\xe8\x42\xb5\x68\xa2\x8b\xfa\x4b\x5c\xfc\xcf\x23\x25\x25\x81\x41\xb7\xa1\x06\x70\x89\xd0\x47\x5b\xd5\x00\x7e\x0e\x96\x58\x52\x46\x5a\xd7\xe8\x05\x85\xaf\xcd\xe9\x62\xdd\xd6\xdd\xb4\xb1\x96\x80\x46\x71\xd3\xfb\x2c\xb2\xcf\x42\x22\xea\x09\x75\x7c\x9f\xdc\xbb\xad\x73\xc7\x0c\xd7\x77\xe1\x96\x0a\xcb\xe7\x22\xdc\xfc\xf0\x3b\x49\x47\x43\x92\x8e\x5e\xa2\xea\x58\x47\x71\xd8\xb3\xc1\x7d\x7a\xd9\xa7\x4a\x2f\x6b\x1d\xb4\x17\x4b\x33\x5b\x51\x35\xb6\xcb\x39\x5b\xfb\x62\x07\xc0\xd8\x87\xfd\x76\xb5\x13\x54\x45\x28\xfc\x1f\xc3\x8f\xaa\xd0\x09\x89\xd8\x2e\xe6\x5d\x96\xda\x92\x44\xde\xd3\x8b\x0f\x29\x76\x32\x00\xb8\xcd\x23\x68\x62\xab\x2f\x58\x09\x9e\xcf\xb8\x2c\xb5\xb1\xba\x90\x66\x87\xdf\x7b\x6a\x02\xca\x11\xde\x2b\xa6\xea\x50\xfb\xe3\x68\x53\x06\x72\x05\x41\xa4\x2b\xac\xa3\xc9\x65\xda\xb5\x70\x42\x4f\x9c\x68\x63\x69\x78\x09\x5e\x66\xf7\xc0\x25\x3e\xd8\x89\x8d\xd8\x89\x65\x03\xb2\x82\x3b\x0c\x36\x30\x9c\x30\x44\xdb\xa0\x95\x60\xba\x64\xd2\x68\x51\x4c\x31\xc2\xd8\x5b\x0f\xa6\xb2\x1b\x9c\x01\xc8\x40\xa9\xcf\x0c\x02\x2a\x2f\x14\x3c\x21\x46\x44\x7c\x24\x1a\xcd\x4d\xdc\x43\xde\x89\x1f\x8c\x3e\x4b\x9d\xdb\xd3\x08\x6b\x9a\x0c\x11\x13\x8f\x95\x44\xa9\xea\x5a\x64\xca\xde\xa9\x95\xd5\x3a\xef\x36\x71\xcb\x46\x64\x0c\xc1\x01\x3d\x4f\x85\xc0\x1d\x69\x96\x1d\x63\x5a\xfb\xb0\x8c\xd8\x89\x0e\x73\x62\xbc\xaa\x6a\xc5\xa1\xdc\x57\x18\xd0\x20\xd6\xce\x5c\xc4\x78\x55\x34\x33\x49\x21\x41\xf0\x8e\x91\xf7\x02\x62\xd3\x8c\x0b\x60\xea\xf9\xe0\x4d\xd4\x19\xbc\x4e\xc1\x49\x35\xe0\xa8\x40\x0c\xa2\xef\x82\x0e\xf4\x34\xfe\x43\x33\x55\xe4\x40\xe6\x79\xc9\xfe\xe7\x6b\x56\x89\x3a\xa3\x03\x01\x05\xfe\x28\x54\xaa\x90\xf7\x02\xc2\xba\xfb\x5f\xfe\xe2\x2b\x36\x57\x4d\xad\x47\x71\x18\xcf\x1b\xf8\x0d\xc5\x07\x97\x2e\x62\x58\x21\xb8\x36\xec\xcd\x6b\xb6\x90\x65\xd3\x86\x24\x5b\x17\x25\x03\x17\x62\x65\x23\xc7\xdc\xcc\xdd\xde\x41\x58\x7c\x17\xd1\x0f\xc3\x21\x5b\xc1\x47\x90\x8c\x60\x94\xa3\x0a\xf1\x9c\xca\x24\x04\xe6\x6e\xb9\x4b\xb0\x53\x5b\xca\x9b\x20\xa2\x60\x60\x77\x9c\xea\x0e\xcf\xf6\xd5\x6c\x7f\x1f\xe2\xa5\xdb\xae\x97\x93\xfb\xf6\x02\xdf\x5e\xe0\xfb\xb4\x02\xdf\x0b\x4b\x7a\x63\x55\x6f\x43\xed\x6c\xb3\x80\x79\x18\x67\xd0\xaa\xd2\x5d\xa3\x57\x1a\x7c\xfe\x1b\xc5\x23\xfb\xc5\x04\xe9\xab\xc6\xb5\x32\x2a\xeb\x43\x94\x87\x00\x35\x02\xd5\xaf\xa8\x25\x05\xc9\x4b\xfa\x30\x4a\x8c\x98\xf6\x36\x55\x04\x4e\xe6\x4e\x49\x24\xd8\x61\x2d\x2a\xbd\x2c\x0d\x7f\x1c\xb1\x1f\xca\x61\x55\x8b\xa9\x7c\x14\x39\x1a\x95\xc1\x36\x6b\x2f\x1a\xf8\xe2\xec\x27\x2e\x4e\x2e\x4f\x42\x4f\x8e\xa3\x63\xe3\x43\xae\x2d\xf3\x65\x57\xef\x4e\x87\x5f\x7f\xf9\xe5\x7f\x02\x4d\xb4\x07\xef\xed\xf1\xf1\xc3\xc3\xc3\x48\xf2\x92\x03\x56\x22\xd7\x5a\xce\x00\x6d\x4a\x1f\x3b\xc5\x13\xba\x38\x1a\xb1\x4b\x00\x62\xa4\xfe\xdd\xec\x3c\x79\xb6\x52\x6a\x67\x88\x10\x94\xcc\x35\x5b\x2c\x33\xb5\xa8\x78\xb9\x1c\x65\x6a\x71\xbc\x58\x0e\xb3\x46\x1b\xb5\x18\xba\x3e\x7a\xb0\x05\x1d\x28\xfd\xac\xe1\x75\x1e\x6c\xcf\x4e\x88\x0f\x7b\xd1\x02\x18\x84\xa9\x45\xb0\x84\x2e\xa3\x74\x7b\x44\xa4\x36\xac\x35\xed\x5b\x9c\xc7\xe9\x7d\x9d\x98\xa9\xe9\x51\x98\xce\x2e\xaf\x7f\x7e\x7f\xf2\xcd\xf9\x7b\x44\x82\xb3\xaf\xe9\x90\x53\x1d\x79\x09\xf1\x1d\xf0\x6f\x50\xe6\x35\xe5\xef\x42\xe2\x13\xc4\xa9\xe4\xa2\x76\xb4\xd6\x51\x49\x4d\xc5\x13\xa8\xa3\x01\x0e\x2e\x2a\x1d\x0b\x09\x7c\xb6\xa7\x57\xb4\x82\x34\xde\x73\xea\x60\x0c\xe7\xcf\xa5\xe8\x5a\x71\x4b\x39\xf8\xe6\xf8\x06\x49\xed\xa1\x7b\x21\xbd\x24\x78\x68\xd2\x8b\xa8\x72\x7f\x41\x57\x17\x12\xf3\x8f\x4b\xaa\x83\xaa\x72\x00\x01\x76\x39\xde\x91\xef\x07\xcb\x19\x2a\x0d\x09\x91\x02\x31\x6a\xff\x7c\x49\x5d\x5b\xe1\xf0\xbd\xe2\xf9\x37\xbc\xe0\x65\x26\xea\x11\xfb\x41\x37\xe0\x03\xc2\xf3\xba\xea\x6c\x6e\xe7\x76\xca\x28\x77\x8d\xa2\x91\xf3\x50\xef\x83\x06\x30\x65\x4d\x09\x6a\x9b\xaa\x99\x28\xb4\xc0\xe4\x64\x12\x4b\xe2\x96\xa1\x7e\x47\x9c\xcd\x61\x14\xb8\xa7\x86\x51\xb8\x33\xcc\x9d\x84\x5a\x5a\xe0\x9b\x65\x15\xce\x95\x0b\x6c\xf2\xd9\x2b\xaa\x7c\x42\x86\x21\x89\x07\xc3\x52\x18\xc2\x5e\x70\xbf\x1d\x03\x1f\x18\xda\x55\x07\x7a\xb6\x55\x5e\x6f\xb5\x7e\x2b\x5b\x89\x80\x6e\xc7\x42\x0a\x73\xf7\x98\xac\xfd\xd2\x5a\x52\x7a\x31\xee\xa5\xa0\xd7\x98\xd6\xae\xd9\xed\xc1\xcd\xe9\x18\xab\xef\xfc\x70\x06\xff\xb0\x97\xff\xf6\xe0\xfa\xf4\x66\xdc\x29\xc5\x73\x73\x3a\x4e\x83\x64\x43\x9e\x7e\xfa\xfc\x5e\x36\x8b\x09\xea\xd5\x31\xca\x3d\x2e\x83\x22\x9f\x98\xcb\xc0\x42\xf7\x1d\x74\x16\x9d\x46\x47\x28\xa8\x27\x47\x2a\xe8\x5e\xd6\xbc\x9c\x09\xf6\xc6\x76\xf6\xf5\x7f\xfe\xe7\x97\xff\x39\x62\x97\x31\xd6\x01\x2f\x81\xa6\xff\x7c\xfd\xe3\xe9\xcf\x97\x27\x1f\xce\x5b\x25\x66\xb8\x07\xd1\x8d\x0e\x77\xa1\xd4\x9d\xc8\x59\x53\x51\x32\x0b\xc4\xca\xe1\x29\x2c\x63\x54\x82\x31\x24\xb7\x46\x49\x12\x76\x35\x57\x2a\xd8\x74\xa2\xa9\x51\x12\xa4\x45\x78\x65\x5f\xf1\x64\x86\x72\xfc\x0f\xe3\x08\x80\x05\xaf\x8e\x5a\xcc\xce\x76\x3c\x2b\x01\xdf\x76\x0a\x30\x7a\x78\x6e\x51\xfb\xcf\x8a\x46\x1b\x51\x5f\x8c\xff\x7c\xa9\x4a\x92\xd9\x03\x64\xb7\x2b\x91\x0a\xaf\x19\x26\x7e\x69\x10\x64\xa7\x3b\x92\x97\xbd\x3c\x28\x2d\x95\xb3\x21\x77\x36\xd8\x5d\x65\xa9\xc6\xc8\x62\x64\x29\xb7\xa9\x47\x17\xa5\xf9\x58\x5f\x3f\x01\x00\xd3\x76\x72\x9c\xe8\x64\x83\xc8\x54\xab\xc7\xe5\x36\xc5\x4a\x57\x9b\x3b\x7d\xf7\x97\x46\xd4\xcb\x38\x0f\xc1\xb3\x9e\x57\x9a\xe2\x22\x33\x5e\x14\xfb\xc0\xc5\x7d\xe0\xe2\xef\x58\x77\xdb\xc6\xee\x53\x83\x22\xfe\xc3\xd5\x7b\x8a\xd0\x90\x65\x56\x34\x79\x90\x08\xbc\x84\x36\x60\xba\x99\x5a\x11\xd8\x45\x4d\xf1\x9a\x2f\x04\xd6\xf9\xef\x64\xcc\x52\xa1\x74\xbc\x47\xb4\x60\x94\xae\x80\x3c\xe3\x5d\x1c\xc2\x6c\x5f\x79\x98\xab\xc2\x5b\x10\xed\x68\xec\x00\x49\x88\xf7\xc5\x06\x80\x16\xdc\xbf\x39\xf6\x91\x27\x1a\x08\xe0\x10\x05\x23\x4f\xf0\x8e\x45\xc1\xb5\x91\x99\x16\x76\xf9\x86\x85\x9a\xcd\x2c\xed\xfb\x19\xff\xfe\x7f\x7f\xf9\x73\xa3\x45\xfd\xf6\x4e\x2e\xb2\xf9\x12\x41\x24\xec\xc7\xd2\x8f\x5f\xc4\xa0\x75\x4d\x71\x95\x1b\xe8\x14\x05\x5a\xc6\xc5\xb7\xb9\xc1\x53\xe1\xd2\x3b\x39\xa6\xf7\x21\xb4\x0c\xf0\x67\x9e\x10\x4c\x7a\x48\x95\xe7\x43\xab\x23\xf0\x8f\xdc\xb9\xb8\x18\x77\x4b\xf4\x79\x33\x6a\x49\x4c\xb1\x23\xa4\x62\xfe\x5b\xb1\x74\xf2\xc1\x82\xdb\x1e\x11\x18\xa4\xf4\x9d\xb5\xd0\x41\x16\xbc\xa4\x4e\xb0\x4f\x7b\x95\x64\xe9\x52\xc2\xc0\xf4\xad\xb7\x12\x70\xff\x14\xec\xe4\x83\x6d\x44\xdb\x88\x73\x67\xbc\x74\x58\x26\xd9\xdc\xca\x2c\xb9\x0f\x5f\xc7\x2b\xed\xcb\x0d\x45\x98\xd7\xb7\x07\x96\x93\x5b\x99\x0c\x8a\xe4\x38\x9a\x74\x78\x7b\x70\x7b\x70\x34\x40\xc8\x1e\x84\xad\x0d\xeb\x38\xf2\x6f\x39\x3f\x4a\x58\x08\x7b\x71\xe6\x82\xe7\x00\x76\x12\x84\x07\xab\x2b\xc0\x1d\x82\xba\x80\x94\x62\xeb\x4b\xad\x43\x79\x9a\xb8\x94\xb3\xa5\x05\xec\xd4\xed\xe4\x80\x39\x0d\x03\xaf\x6b\x5b\xc7\xb8\x20\x69\x25\x2a\xba\x72\xfe\x88\x8c\xc2\xca\x69\x2f\x2b\x6c\xdc\xcb\xda\x34\xbc\x18\xca\x4a\x63\xe8\x2a\x29\xdf\x76\x6e\x32\xcd\x05\x04\x0d\xe6\x62\x9c\xb0\x1e\x46\x0f\xdb\x91\x06\x61\xb5\x09\xc9\x08\x95\x31\xab\x24\xf8\xd8\x35\x3a\xea\x2e\x7f\x53\x2b\x82\x4d\x62\xa6\xe6\xd3\xa9\xcc\x82\x40\xee\xa9\x15\xbb\x99\x0b\x6d\xef\x84\xf6\x08\x47\x88\x35\x05\xc2\x70\xb0\x6b\x60\x4b\xbc\xa2\xc0\xce\x75\x65\xd5\xdd\x49\x81\xa4\x11\xb2\xa6\x91\x51\xf1\xf0\x39\x5e\xd7\xf2\xde\x9e\x2b\x03\x29\xda\xb9\x88\xaa\xd3\x5d\x8c\x47\x8c\x9d\x40\x41\x43\xab\x66\x52\x16\x07\xa8\x93\xc4\xd4\x0b\xc5\xf3\xe1\x84\xb6\xd5\x11\x09\x1a\xa3\xa3\xed\x2e\xbf\x9b\x8c\x2f\x21\x4d\x66\xdb\x0a\x4d\x61\x3b\xd2\x48\x33\xf1\x53\x47\x40\xfc\x08\xe3\x88\x3f\x6e\xc0\xe5\x92\x97\x50\x87\x2a\x82\x7c\x20\xbc\x70\xd3\xd4\x94\xab\x7e\x6a\x95\x02\x10\x6e\xea\x3c\xb1\x23\x97\x2a\x5c\x0c\x47\x1c\x64\x79\xaf\x8a\x7b\xc8\x68\xee\x60\x47\x5f\xbd\x3b\x1d\xbe\x79\xf3\xc5\x97\x00\x25\x01\xea\xce\xe1\x86\x72\x1a\xb6\x35\xa6\xae\x7b\xfd\xf5\x86\x8a\xad\x4e\x44\xfb\xa6\xac\x3b\xbd\x37\xb8\xc7\x63\x55\xc8\x2c\x01\x85\x9d\x6c\xe6\xd1\x29\x64\x47\x93\xce\x85\x46\x18\x08\xc5\x6a\xd5\x98\x68\x89\xdd\x51\x32\x0a\x0e\xd0\x10\xd3\x7f\x54\xed\xce\xfa\xf0\x41\xe6\x11\x23\x1f\xb9\xfa\x4a\xb7\x07\x08\x63\x53\xdf\x3b\xbc\x0a\x12\x75\x50\x7a\xb2\xb7\xa9\xcc\x19\xbf\x57\x32\x27\x30\x53\x55\xe6\x6c\xae\x2a\xd8\x91\x98\xa0\x40\xc3\x4b\xd2\xc5\xa9\xe6\x2c\x51\x04\x0c\xbf\xac\xa5\xbe\xb3\x2a\xae\xf1\x80\x1f\x72\x41\xc7\x36\xf7\xe3\xd7\x15\xc1\xfd\xdb\x11\x12\x21\xbb\x3d\x60\x6a\xa2\xb3\xa6\x5e\x37\x44\x2b\xc7\x61\x34\x68\x6b\x94\x90\x24\x86\x28\x60\x25\xa0\x86\xd9\x91\xc4\x01\xb8\x33\xa5\x72\x08\xad\xe5\x05\x5d\xa5\x30\x84\xd4\xbe\xce\x05\x2f\xcc\xfc\x74\x2e\xb2\xbb\xcb\x5e\xcb\x50\xa2\x91\x27\xf5\x38\x07\x6c\x91\xd9\x16\xcc\x59\x98\xbc\xf0\xe4\xcf\xb8\x2b\x70\x12\x34\xd5\xef\x12\x3d\x4b\xed\x81\xe6\xda\x8a\x39\xe3\x95\x64\x13\x9e\xdd\x89\x32\xaa\xf6\x19\x38\xa8\xfb\xf0\x88\xfd\x64\x2f\x90\x5d\x3c\x4b\xb8\x86\x81\x2b\xf9\xa1\xa1\xac\x2d\x23\xb3\x93\xc7\x9c\x81\xdd\x20\x5e\x24\x00\xa9\x8d\xf8\xd6\x0d\x71\x15\xaa\xcf\xb2\x72\x58\xce\x93\x67\x3f\x7e\x21\xe3\xc5\xb6\x70\x6d\xd5\x3b\xbe\x90\xa9\xd2\xbc\xee\x49\xb4\x01\x0f\x31\xb8\x89\xbb\x5b\x08\x6d\x52\x05\x5a\x85\xd6\x48\x4b\x41\x65\xd6\x14\xbc\xb6\x27\x6d\x8a\x5d\x1d\x8a\xd1\x6c\xc4\x2e\xc6\xf7\x5f\xb1\x7b\x0d\xff\xf8\xfa\x28\x00\x0c\xd9\x3f\xcf\x1a\x5e\x5c\x1b\x9e\xdd\xb5\x8d\xb7\x96\x6e\x13\x3a\x8b\xd5\x12\x38\xcb\x2d\x53\xd4\xd0\x90\x6e\xea\x80\x2d\x55\x03\xf2\x01\x85\x0e\x33\x3f\x03\xf8\x02\xca\x36\x50\x77\xcf\x33\x7a\x3f\x09\xa3\x42\xa6\x5e\x0b\x5c\x8c\xd0\x96\x8a\xc0\xf5\x9c\x19\xaf\xc4\x79\xa8\x1a\xc6\x0d\x93\x04\x08\x32\x14\x19\xb6\x1e\x8b\x97\x5d\xd6\x0e\xc5\x09\x72\x70\xf5\x5a\xdf\x3d\x0f\xa4\xe9\xa2\x64\x42\x42\xf3\x8c\x6b\xac\x2b\x64\x87\x91\xab\xe8\x32\x2c\x21\xa0\xc2\x0d\x46\x3c\x56\x85\xcc\xa4\x29\x96\x41\x56\x74\x10\x30\x0e\xdc\x01\xd7\x0a\x54\x7b\xb9\xe0\xf5\x32\x6c\x67\xd7\x8c\xe3\x98\xa6\x95\x59\x8b\x6a\xce\xdd\x16\x86\x15\x21\x02\x82\x52\xc0\x9d\x80\x50\x77\xae\x75\xb3\x70\x38\x05\x13\xd5\x18\x86\x80\x83\x0b\x5e\x5a\x45\x84\xa0\x08\xc1\xdb\x6f\x00\xc9\x2f\xf7\xb5\x9d\xf8\x44\xdd\x0b\x98\x77\x38\x6d\x83\xee\x87\xa0\xff\x00\xb8\x62\x37\xe5\xd0\xd2\x77\x50\x3f\x8f\x62\xe1\x95\x4f\x8d\x53\x10\x00\xdb\x4c\x2e\xc4\x9f\x5a\xef\x81\x59\x1c\xb6\xc0\x04\xd8\xb1\xdb\x03\xbb\x1f\xb7\x07\x64\x63\xb4\x9b\x72\x7b\xf0\x27\xe6\x12\x40\xed\x64\x9c\x52\x47\xa6\x32\x7b\x7e\x67\xf2\x5e\x94\x7e\xcf\x33\x55\x13\xba\x57\x2d\xa6\x58\x46\x22\x56\x06\x35\x44\x53\x80\x38\xc2\x8d\x7b\x69\xc4\x0e\xad\x2a\xb8\x72\x96\xf5\x00\xec\x7d\x56\x28\x0a\xaa\x09\x28\x90\xa2\x63\x74\x86\xf2\x98\xd1\x59\x42\xdd\xb2\x7b\x20\xa3\xfe\x5a\x5e\x87\x01\x49\x88\x54\xd2\x31\xba\x90\x24\x2d\x4e\x1b\xbb\xf9\xd8\x69\xcc\xf6\xa3\x8e\xfd\x41\xb4\x44\xa4\x54\x6c\x21\x78\x09\xc6\xcb\x09\x1c\x83\xa8\x5c\x24\x65\x2d\xcb\xba\x16\x85\xb8\xe7\x7e\x31\x79\xb9\x7c\xe0\xcb\xd1\x51\x8a\xe5\x14\x11\xe1\x4c\x69\x6e\x5d\x2d\xc0\x2d\x8b\xa5\xbf\x6f\xdb\x64\xb7\xf5\x07\x5c\x93\x99\x30\x9e\x7b\x78\x16\x71\x31\xee\x46\x28\xb9\xfb\xe1\xee\x0a\x11\xb5\x1c\xb4\x60\x8d\x4e\x8f\x40\x6d\x20\xcd\xaa\x00\xd1\x2c\x2b\x54\x93\x0f\x09\xb4\xa3\x76\x90\xad\xad\x82\x45\x60\xa9\x6a\xcd\x11\xa9\x0b\x87\x5f\x99\x13\x6d\x23\x3e\xd7\xba\xb1\x5e\xf8\x8b\xf4\x19\xb8\xf0\xad\x0f\x7b\x80\x22\x07\x1a\x0b\x5b\x8b\xd3\x48\x32\xfa\x78\x44\x88\xa2\x7b\x65\xaf\x57\x1a\x13\x34\xac\x16\x58\x76\xbb\xb5\xf6\xab\x82\x1b\xcb\xb3\xc8\xa7\x45\xa2\xae\xfd\x56\x16\xb4\x80\x38\x65\xba\x33\xf8\x96\x88\xef\x27\xec\x7a\x88\x74\x61\x3f\x0c\x92\x91\x2e\xc6\xfa\xa5\xd7\xea\xf6\x60\xa7\x00\x60\x74\x23\x0c\x23\xcf\xf1\x90\xae\x73\x14\x03\xdc\xfe\xfe\x70\x2a\x6b\xf1\xc0\x8b\x62\x5d\x2c\xf0\xaa\x82\x02\xe7\x2a\xed\x6c\x71\xca\x21\x1e\x3d\xaf\x21\xf5\xf9\x77\xfe\x39\x9a\xef\x73\xc3\x5e\x40\x14\xed\xa6\x2b\xd8\x99\x0f\x17\xbc\x1a\xde\x89\xa5\xf6\x9e\xff\xc8\x39\xf5\xb7\xd4\x0b\x34\xa2\x05\xaf\xd2\x89\x0d\x71\xfa\x03\x75\xb8\x55\xfa\xc3\xe0\xa0\x6a\x26\x85\xd4\xf3\x4b\x65\xae\x04\xcf\x97\x27\x4e\x55\x4f\x60\xf5\xf5\xb4\x8c\xb2\xee\x70\x23\x2d\xef\x9d\x09\x8f\xbc\x97\x0b\x5e\x90\xd7\xa5\xed\x59\x6e\x49\x7b\xc4\x58\x73\xa9\x6b\x31\xe3\x75\x8e\xd9\x6a\xd8\x33\xe2\x03\x4d\x01\xe6\x6e\x79\x5c\x2a\x33\x84\x7f\xb9\x02\xba\x28\x3d\x58\x61\xd9\x8a\x27\xe4\xec\x31\xc6\xe7\xb5\x78\x39\x82\xdc\xd9\x96\xe9\x4d\x9b\xe2\x1a\x70\xb2\xbf\x4b\x88\x49\x55\xad\x2a\x0e\xe2\xe1\xf5\xd5\x8f\xec\xec\xf2\x9a\x94\x5e\x4d\x92\x98\x66\x63\x95\x6b\xaf\x1d\x54\x4d\x6d\x8f\x2d\x9c\x67\x61\x6f\xab\xd4\x99\x55\x60\x68\x80\x91\x9a\x1f\x84\x3e\x5a\xab\x99\x28\x85\xdd\x93\x20\x6d\xa1\x20\x4e\x7f\x5d\x17\xe8\xae\x25\xd3\x3c\x7c\xd1\x31\x39\x74\x22\x54\x50\xa8\x69\x8e\xfe\x60\xcb\xe5\x68\x0f\x8a\x22\x5a\x6c\x7b\xb5\x9c\x93\x5f\x58\x59\x02\x96\xef\xf6\x80\x89\xfb\x10\x42\x39\xc6\x7c\x40\xb1\xd0\xa2\xb8\x17\xde\xaa\x32\x62\x27\x33\x08\x51\xc6\xcd\xb4\xdd\x58\xa9\x07\x24\x96\x68\x66\x6e\x22\x79\xf4\xd9\x98\x7e\x86\xf9\x59\xa6\xdd\x33\x3d\x90\x6b\xf9\x54\x14\xcb\x20\x5c\x49\xed\x73\xdb\xd3\x49\x95\x3a\x2a\xaa\xd5\xc1\xc4\x04\x8d\xdc\xa9\x5e\x91\x42\x4e\x50\x19\x66\x4e\x41\x2f\xdd\x12\x7a\x10\xdd\xe0\x8f\x8f\xfb\x00\x68\x7f\x68\x5b\x54\x75\x0c\x9e\x3c\x68\xfb\xf5\x35\x0d\x1e\x98\x80\xcb\x29\xf5\x76\x01\x07\xd9\x0a\xc6\x2a\xb0\x21\x1a\xbd\x2a\xfb\x44\x2b\xeb\x91\x9d\xa1\x6e\xe6\xf2\x77\x64\x63\x7c\x56\x49\x40\x2d\x00\xb5\xfd\x64\x0a\x94\x36\xa1\x46\x46\x4e\xf9\x53\xe0\xad\x17\x63\x2f\x2b\xa3\x4d\x17\x20\x28\x61\x17\x16\x5c\x22\xe4\x34\xf5\xca\x38\x75\x3b\x62\xe7\xa0\xfd\x05\xf6\x0c\xa5\x63\xf3\x44\x43\x67\xc0\x72\x1f\xc3\xea\xef\xa5\x68\x23\xfd\x5d\xbe\x78\x48\xc5\x13\x0c\xb5\x9d\xb5\x3b\x05\xb6\xbe\xba\x82\xc9\x66\xed\x1a\xbe\xad\x9c\x3e\x8d\xd1\xa1\x9d\x85\xd9\x09\xed\x20\x35\xae\x5f\x07\x07\x46\x55\xaa\x50\xb3\xe5\xf7\xc0\x13\x57\x2a\x88\x47\x4f\xd1\xb6\x1c\x8c\x02\x43\x55\x83\x3c\x46\xf2\x84\x6b\x4a\xa0\xe8\x88\x74\xbe\xa8\x0a\xa8\x40\x10\x4f\x82\x68\x68\x14\x4b\x06\x74\x9f\xaa\x91\xa0\x35\x4c\x5b\x49\x2b\x90\x33\x14\x81\x41\x7a\xea\xa6\x4c\x0e\x9c\x22\xe7\x1c\x8f\x1a\xe1\xf0\x7c\x5e\x36\x44\x9e\xf3\x60\x23\x6e\x59\x58\xfe\x8c\x76\x15\x76\xd3\x1a\xbc\x8b\xca\x40\x73\x69\x87\x50\x71\x4b\x0e\xb4\x61\x6f\xbe\xa6\xc6\xa4\xcf\x04\x04\xc9\xf3\x36\xf5\xb7\x0a\x6e\x49\x67\x9b\x22\x48\xa6\xb2\x06\x0f\x60\xf8\x28\x25\x46\xdc\x73\x59\xc0\xa5\x20\x4b\x55\x14\xa9\xe1\x59\x69\x5b\xbe\x46\x76\x63\xa0\xfe\x00\x50\xbc\x52\xf9\x97\x91\x21\x85\x80\x31\xff\x41\x07\x9d\x09\xf7\xa9\x4d\x43\x49\x6b\xf3\x5d\x4c\x9d\xd2\x4b\xd7\x94\x30\xf6\x4b\xcc\x81\xf1\xdb\xe8\x1c\x49\xb4\x10\xbe\x36\xc3\xed\xc1\x7f\xdc\x1e\xb8\x35\x72\x99\x32\xc0\x2c\x6f\x0f\xa0\x02\x31\x0d\xc9\x92\x0c\x90\xcd\x33\x10\x97\x78\xe1\x1d\xf4\x72\x0a\xef\x0d\x90\xef\x2d\x00\x57\x4f\x8b\x52\x0b\x57\x14\xa3\xe0\xda\xdb\xe4\x4a\x9f\x8b\xdb\x1f\xe2\x02\xb6\x76\xcb\x4b\x00\x4d\xd5\xaf\x89\x65\xaf\xa6\xe6\x78\xde\x3a\xb5\xf0\x77\x92\xbd\xd7\xd4\xe2\x8f\x90\xa3\xe6\xea\xa1\xab\xb7\x93\x08\xde\xa6\x6a\x9e\xb9\x24\x0a\xf2\xb7\xf8\xc7\x60\x5b\x3e\x74\x7b\x10\xbf\x06\xbb\x53\xe9\x55\xad\x49\xb4\x78\x93\x37\x40\x23\xa9\x27\x8b\x99\x25\x08\xce\xa8\xee\x03\x2b\x22\x5f\xa9\x3d\x3c\x91\xbe\x46\x99\x24\x91\xe5\xbd\x7d\x55\xfc\xf2\x44\xc6\x5b\x02\xde\x72\x29\x23\x18\x26\xda\x31\x04\x4f\x96\xe4\x3b\xa5\x4d\x6c\xb2\x28\x60\x24\x12\x7f\x28\x74\xe4\x62\xca\x5a\x0e\xde\xe0\xbe\x2c\x15\x23\x9a\xcf\xf0\x51\xb0\x0f\x3b\x28\xb0\xb6\x68\x47\x82\xb9\xab\x19\x4c\x78\x26\xa1\x4d\xcd\x83\xa5\x8b\x33\x0d\x35\xb3\xc1\x8d\x65\xbf\x89\x5b\x74\x7b\xc0\x26\x8d\x2c\xd0\x70\x10\x2c\x3f\x74\xb7\xfd\x32\xfb\xe0\x4a\x2b\xdd\x92\x63\x0c\x68\x2c\x38\x3f\x74\xc7\xb4\x87\x9f\x88\xf7\xbd\xf5\x19\x6f\x2e\x87\xdb\x4c\xde\xf3\x58\x54\x6a\x2b\xd9\x87\x72\x1a\xe9\xf1\xce\x71\x48\x86\x2c\xd0\x57\x8f\x36\x0d\xe6\x25\xd9\x32\x2d\xba\x2c\x67\x43\xdf\xce\xb1\x66\x90\xc8\x9e\x5c\x73\x21\xd6\x1e\x7b\x22\x18\x52\x6c\x74\x7d\x78\xd6\xb5\xc7\x5a\xda\x14\xf0\x80\x28\x4b\x51\x6e\x62\xd7\x60\x88\x18\x4c\x3b\xc4\x38\xc4\x86\x9b\x44\xda\x49\x6c\x01\x6b\x0b\x1f\x2b\x1f\x75\x86\x29\x7f\x2a\x06\x18\x54\x2c\xb0\x72\x36\x96\x3d\xd9\x41\x20\x89\xbf\xbd\x23\x06\x53\xe2\xd5\xde\x1d\xe8\x91\xc6\xfa\x77\x22\x25\x97\x75\x77\x64\x2b\xc9\x6c\x53\xf0\x09\x8a\xb2\xa9\xd8\x13\x12\x72\x37\x48\x83\xa7\x9b\xc4\xe6\x5d\xca\x1d\xd0\x37\x9d\x58\xb8\x2d\xc4\x6c\xfb\xb5\xbe\x4d\xc0\xba\x28\x1f\xaf\xc7\xa2\xd6\x00\xae\xb8\x75\x3d\xae\xab\x56\x19\x35\xd7\x0f\xab\x7c\x47\x2e\xef\x31\x51\xa4\xac\x67\xe1\xa7\xfa\x26\xc9\x9f\x43\x01\x00\xd4\xce\xac\x98\x42\x58\x1c\xde\x7d\x3e\xed\xb4\x59\xb1\x6d\xce\xad\x60\x68\xbf\x86\x9e\x20\x17\xa1\x7e\xfe\x68\xa9\xb1\x78\x34\x5f\x61\x00\xf3\xe3\x54\xe3\x3f\x4a\x63\xff\x35\x62\x17\x0b\xe7\xb3\xc1\xf8\xbb\xda\x03\x87\xb8\xd7\xba\x30\xe5\xeb\xea\x19\xac\x4e\x6e\xa5\x5a\x04\x3b\xb4\x8d\x8f\xa1\x1c\xfd\x11\xe2\xb5\x81\x6e\x3b\x17\xb5\x8b\x0c\x52\x18\x31\x28\xc2\x43\x67\xd9\x91\x25\xc3\x0d\xfc\x80\x20\x08\x6b\x4a\xf1\x5c\xd9\xf3\xd7\x5b\x2c\xaf\xe3\x07\x0e\xb5\xaf\x5d\xf4\x9c\x9a\xd8\x1b\xe0\xec\xe2\xe1\x00\x9c\x8c\x2f\x2c\xdb\xca\x51\x5f\xd0\x08\x0d\xde\x11\x0a\x9c\xcf\x8b\x0c\x0b\x5e\xa4\x33\xc6\x0a\x7f\xb8\x84\xcf\x00\x42\xc1\x83\x97\x0e\x00\xf9\xd1\x3f\x73\xe1\x1f\xf3\x66\xc1\x4b\x30\x9d\x81\x04\x10\xc7\x98\x87\x59\xb9\x3c\x73\x5a\xdd\x28\xf9\x07\x44\xdf\xde\xc2\x7d\xc9\xc3\x10\xc6\xd7\x53\x9f\xef\xc7\x76\x83\xee\x5e\x64\xaa\xf2\x43\xa4\x4b\x46\x5f\xf6\x03\x76\xcb\x1e\x41\x5f\xb5\xd4\x13\xe3\x9c\xc0\xe3\x4e\x81\xa5\x36\x10\x37\xca\xfd\x1c\xd3\xa3\x3a\xc1\x39\xb0\x50\x76\x2c\x24\x3a\x4e\x04\x5b\xc8\xba\x06\x3b\x4a\x77\x38\xa8\xaa\xc8\xd9\xdc\x40\x19\x16\x23\x66\x48\x2d\x47\xec\x5a\x18\x16\xed\x09\xb8\x9d\xb0\xa0\xa2\xfd\x77\x0b\xfd\xdc\x9d\x1a\x32\x7c\x35\x35\xbe\x6d\x14\xbb\x75\xd5\xf0\xf0\x32\x2e\x55\xe3\x23\x8b\x10\xc8\x27\x84\x61\x26\x56\xea\x32\x3c\x44\x0c\x59\xe5\xcc\x58\x43\xf1\x68\x35\xe8\x95\xd9\xb8\x45\x72\x6e\x9e\x27\x0b\x35\xdb\xa2\xf3\xba\x2f\xef\x89\xf3\x9e\x38\xff\x9e\x88\x73\x1a\xee\x6d\x4f\xa1\xf7\x14\xfa\xf7\x42\xa1\x93\x27\xb8\x8f\x4c\x2f\x75\x66\x8a\xb5\x3a\x0c\xb4\xf0\x29\x36\x9c\xdd\xd9\xbd\x2a\x42\x82\x02\x6d\x93\x8e\x31\xe2\x92\x99\xd1\x84\xe6\x06\x97\x74\x35\x43\x7a\x7d\x85\x69\x80\xd5\xb1\xad\x97\x54\x0f\x36\x79\x05\xa0\xe7\xd5\x83\xef\xd2\xcf\xb6\xe8\x64\x97\xfc\x83\x9b\xd3\xf1\xb5\xca\xee\x84\x39\xd9\x08\x1f\xd4\x69\x1a\xe5\x21\xf0\x92\x11\x1a\xbd\x37\xe9\xaa\x4a\x20\xc8\x29\xd3\xf0\xce\x93\x12\xce\x2d\x7b\x4a\xc4\xb3\xf8\x22\xbb\xdf\x59\xf6\xe5\x6e\x04\x59\x60\x99\x51\x83\x15\x8c\x9b\x4a\xe5\xec\x22\x9d\x01\x99\x4e\xf8\xdc\x25\xf7\x31\xaa\x49\xf3\x32\x89\x8e\xbf\x87\x3c\xbb\x1b\x2e\xd7\x63\x2e\x43\x1a\xb9\xca\xc9\x69\x0a\xcd\xc1\x7a\x68\x0c\xcf\xe6\xce\x1b\x89\xa4\xf3\xf6\x00\xe3\x42\x6f\x0f\x20\x68\xac\x04\x4c\x48\x47\x71\x28\xd4\xc4\xa8\x02\x5d\xd3\xf6\x05\xe8\x6d\x13\x86\xc1\x9d\x58\x1e\x0c\xa8\xe7\xd5\xa3\x45\xbf\x27\x24\x38\x97\x3c\x61\x27\x80\xad\x42\x51\x6b\x80\xb9\x89\xc1\x6a\x89\x22\xb6\x46\x07\xcd\x9c\x69\xda\x45\xbc\x5a\xaa\x7b\xa9\xec\x62\xe5\x4d\x21\x06\x6c\x0c\xce\x9d\xf0\x0b\x85\x47\x9f\x3f\x8a\xac\x31\x69\xe6\x08\xf1\x14\xeb\xc7\x8b\x23\xbc\x13\xcb\xd5\x0a\x56\x98\x39\x90\x4e\x02\x96\x0b\x71\x92\xe7\xa9\x42\x8e\x37\xee\x51\xd7\xe0\x83\x2e\x24\x13\xd5\x2b\xc7\x6f\x3f\x70\xcd\xb8\x7d\x01\x2a\xba\x4b\x8d\x52\x80\x95\xdb\x8c\x28\x81\xd9\xf9\x49\xe2\x1b\xdb\x54\x54\x5a\x03\xd1\x61\x07\xb8\x86\x6c\x86\x45\x41\x6f\x08\x44\x20\xea\x4a\x95\x39\xf1\x66\x13\xaf\xda\xce\xec\x6a\x0d\xb6\x07\x0c\xac\xef\xf2\xe0\x71\xd9\x44\x6f\x89\x70\xe1\x05\xf2\xaf\x74\x6f\x91\x3b\x7b\x1a\x6e\x0e\xce\x25\x38\xb9\x5c\x0d\xcb\x5a\x56\x85\x80\x1a\x58\x5f\x66\x77\x62\x39\x40\x4f\x12\xdd\x3b\xfb\xab\x88\x2a\xae\xfb\x88\x03\x54\x0d\x54\x4d\x2f\xba\x3f\xf1\x85\xcd\xba\x4b\xdf\x25\x3b\xc7\x6b\x15\x47\xea\xb8\x5d\xa0\x1b\x07\x5e\x72\x93\xcd\x47\xec\x1c\x42\x1c\x16\x82\x97\x14\x09\x01\xee\xbd\xb8\xb1\x03\x8e\x88\x64\x69\x87\x34\x1b\x25\x64\x7d\x8a\xcb\xf7\x3d\x16\xb3\x36\xed\x9b\xe7\x6a\xa7\x98\xb0\x65\x21\x3e\x62\xfd\x84\xee\xc4\xd2\xb9\x37\x85\x2b\x95\x4d\x7e\x39\xbf\x15\x8e\x6d\x9c\x5b\x09\x4c\xff\xc9\xd5\x45\x5b\x4c\x64\x89\x1f\xc3\xae\xdd\x0a\x32\xef\x37\xd4\xde\x39\x0a\x9f\x49\xcd\xd2\x7d\x24\xc5\x74\xe9\xf3\x2d\x98\xc0\x3b\xb1\x7c\xa5\x09\x14\x4c\x95\x50\x62\xdf\x95\x27\xc7\x22\xe3\xce\x3f\x87\x2f\x3b\x0f\x9d\x1d\x38\x46\x16\xfd\xd2\xf0\xa2\xed\xdc\xa3\x9f\xa8\x91\x9d\x7f\xab\xec\xeb\x83\x2c\xf2\x8c\x53\xc6\x0f\xb9\x43\xb5\x72\xa9\x8f\xf6\xba\x64\xbc\x0c\xf4\xd8\x2f\x2d\x79\x09\xa2\x70\x7d\x7b\xf2\x66\xaa\x4e\x5d\xfa\xc1\x41\xd8\xbb\x5e\x90\xbb\x9b\x6e\x93\x2e\x89\xac\x44\x2d\x15\x16\x77\x07\xa4\xb7\xf6\x91\x38\xa4\xb0\x62\xda\x4d\x35\x75\x47\xdf\x9f\xc3\x41\x04\xed\x67\x52\x40\x02\x47\xd1\xdd\x8f\x18\xcf\x37\x1e\xf5\x65\x40\x65\xd1\x41\xd3\x14\xc6\x87\x32\xd3\x01\xe9\xf2\x2c\xbb\xa6\xe2\x5e\xd4\xec\x90\xd8\x9a\xb8\x97\x99\x39\x1a\xb1\xff\x4f\xd4\x0a\xf6\xab\x14\x33\x84\x7f\xeb\x28\xa9\x86\x22\x84\xb9\x66\xaf\xd9\x21\xbc\xc6\xe4\x62\x21\x72\xc9\x8d\x28\x96\x47\x1d\x7c\x92\xed\x20\xe9\xd6\x4a\xc2\xad\x6b\x87\xb4\xbd\xb3\xc0\x9e\xfc\x29\x7f\xa3\xfc\x1d\x82\x38\x23\x7b\xc0\x5a\xc5\xeb\x3c\xe0\x82\xbb\x72\x7e\xf9\xff\x8f\xdd\x25\xce\x6a\x31\x83\xa3\x83\xe7\xe4\x99\x99\xbf\x2e\xbe\xe2\x9a\xfc\xb9\xef\xf9\x44\x14\xc4\xce\x17\x62\xbd\x70\x75\x12\x7c\xf4\xde\x1d\x5c\x87\x57\x29\x0d\xbe\x55\xa1\xc9\x2d\x07\x46\xe4\x43\x00\x47\x04\x3c\xd4\x49\x65\x08\x29\x53\x90\x33\xd0\x09\x75\xdf\x4a\xf0\xc2\x13\xb2\x2a\x78\x25\x09\x29\x04\xe1\xba\x98\x92\x40\x41\xfd\x0c\x22\xfa\xd9\xab\x33\x25\xae\xe8\x49\xc9\x20\x38\x01\xfc\x51\x11\x28\x80\x1e\xb1\x8f\xa5\xdb\xf6\x0e\x82\x10\x0e\xc3\xa9\x83\x05\x80\xa0\x8e\xd8\x39\xcf\xe6\x58\x68\x15\xac\x49\x54\x89\x5d\xb3\x8f\x57\xbb\x85\x42\x3c\xe7\x80\xdc\x88\x7a\xb1\xeb\xa1\x30\xa2\x5e\x74\xe9\x52\x2d\x74\x53\x80\x50\x8b\x73\xfd\xa5\x11\xb5\xb4\x6b\x72\xc2\xec\x60\x7c\x2c\x48\x5f\x77\xee\x24\x95\xca\x01\x75\xa3\xf0\x19\x1d\x40\xe7\x1e\x5d\x00\xc1\x3f\xb9\x3c\x23\x79\x90\x42\xb8\xe1\x74\x36\x13\x0a\x0d\x98\x36\x65\x86\x1a\x9d\x34\x4b\x4b\x42\x2e\x55\x2e\xe2\x49\xbf\xe0\x39\x6d\x9f\x45\x98\x09\xdc\xbb\xf3\x47\xbb\x44\x3a\x5d\x95\xf3\x64\x35\xa0\x2b\x75\xeb\xa0\x3a\x0c\x2c\xa9\x5e\x77\x24\xb6\xb5\xe1\x6d\xa4\x0f\xa9\xd3\x94\xb4\xa5\x6c\xec\xa9\x57\x4c\xa5\xf7\x20\xe3\xf1\xd4\x07\x03\xad\x15\x5a\x7b\xde\x89\x2c\x75\x10\xe6\xa3\x28\x95\x33\xc8\x9a\xa0\x54\xf1\x85\x22\x19\x14\xe9\x94\x5b\xf0\x4d\x34\x67\xc1\x1f\xaf\xef\xc4\xc3\x41\x2b\x78\xef\x60\x70\xf0\x30\x17\xe5\x0f\xa5\xe6\x46\xea\xa9\xe4\x93\x22\x61\xb3\x81\x1d\xbb\xee\x0d\xdb\x7d\x1f\x3f\xf6\x58\x3f\x46\xb1\xa9\x2c\x3b\xa3\x1f\xb9\xa8\xe5\x28\xc2\x4c\x7a\x28\x3b\x4f\xcb\x20\xfc\x19\x4b\x90\xb4\x92\xe0\xec\xac\x4b\xb2\x3b\x4c\x71\x39\xf0\x3c\xcb\x7a\x45\x6f\xa1\x63\x98\xab\x05\x97\xe5\xf3\x34\xa8\xd6\x04\x01\xce\x91\xd6\x72\xb5\x12\x16\x3e\xe8\x00\x50\xe4\x62\x56\x0b\xb0\xc0\x44\x95\xff\x5c\x74\x5b\x29\xee\x85\x55\x00\x73\xa9\x09\xa6\x22\x27\x69\xfd\xef\x2b\x5b\xf3\xe7\x33\x75\xa9\x8c\x93\xc9\xff\xee\x84\x17\x54\x48\x1e\xe5\xa2\x59\x58\x91\x8a\xb0\x90\x72\x39\x75\x89\x98\x13\x61\x1e\x04\x19\x6d\xc3\xfa\xb5\xcf\x55\x1b\x00\xca\xaf\x9f\x8b\x60\x9a\x15\x6a\xc2\x0b\xb6\x90\xa5\xfd\x4c\x07\x7c\x04\xec\xd6\x5f\x0e\xff\xa1\x4a\x11\x92\x30\xdd\x5a\x84\x74\xd4\x37\x84\x79\xe2\xa3\xb9\x7d\xb8\x65\xeb\x84\xb9\x73\xcf\x35\x7b\x73\xfc\xe6\xf8\xf5\x5b\xf6\xdf\xcc\x76\xfd\x86\xfe\xfb\x05\xfd\xf7\x4b\xf6\xdf\xec\xbf\x19\x63\x63\xc6\x5a\xff\x65\xf0\xdf\x21\x93\xd3\x78\x0c\x6f\xec\x30\x33\xb5\xa0\x09\x87\x34\x3e\xcb\xc5\x68\x45\xe1\xb8\x61\xd7\xc0\xde\x32\xb5\x10\x30\x86\x37\x7f\x72\x6d\x30\x02\x9c\xa9\x92\x5a\xbe\x39\x84\x21\x1d\xb1\x07\x10\x8d\x20\x99\xd1\x4e\xeb\x24\x33\x0d\x2f\xec\xc7\x0f\xbf\x18\xbe\x3e\x62\xaa\x6c\x37\xbf\x97\xaa\xb0\xa2\x25\x8d\xf0\xf0\xcd\xd1\x68\x65\xc8\x5f\x24\x86\xdc\x1a\x2d\x8c\xc2\xea\xb4\xff\x80\x28\xe6\xbe\x53\xe3\x0e\xcc\x09\xa4\xc8\xf9\x63\xe3\xae\xa9\xa5\x23\x6c\x2e\x67\x50\x7e\xc9\xd7\x1e\x46\xc5\x19\x4e\x81\x74\xd6\x6d\xec\x74\xc9\xa4\xb1\xbc\xea\x15\x56\xd2\x45\x12\xe3\x92\xdb\xce\x62\x1f\x0d\xac\x3b\xec\xf9\x6b\x27\x64\x93\xde\xb9\x65\x52\x72\x4c\xaa\x7a\x09\x69\xa4\x63\x5a\xd9\x48\x4d\xd1\xaa\x46\x7c\x06\x78\x25\x8d\x1f\x83\xfb\x89\xdc\x04\x84\x08\xfb\x16\xa0\xa7\xe4\x58\x77\xac\x88\xb5\xe2\x28\x0f\x03\x45\x9e\xb8\x7c\x93\x27\xbe\xec\xa7\xd0\x12\xa1\x0c\x83\x21\x01\x7b\x23\x13\x02\x44\xfc\xdd\x1e\x4c\x9a\xec\x4e\x18\x07\x48\x67\x85\x26\xa3\x58\xd5\x18\xe6\xf3\xf9\x57\xe8\x9c\x51\xd8\x31\xbe\xda\xb7\x01\x29\xe1\x6f\x95\xc4\xaf\xac\xe5\x4f\xdd\x26\x91\xe9\x81\xb8\x51\x2e\x38\x2d\x1a\x6a\x91\x72\x6a\xcf\x51\xae\x84\x2e\x5f\x85\xa3\x81\xe1\xa0\x70\x7f\x43\x6c\xac\x3d\xda\x2d\xd2\xc5\x0e\x49\xff\x3a\x62\x46\x14\x85\xf3\x4d\xe1\xc3\x9a\x0c\x86\xfe\x07\x38\x6f\x43\xd6\x3e\xc6\xc9\x17\xe3\x97\x9c\x55\x5b\xa2\xc1\x14\x82\x22\xa5\x2a\x07\xb7\x25\x83\xac\xd2\x99\xbc\xb7\x17\x6b\xab\x83\x8f\x97\x7b\x2e\x8a\x8a\xd5\x22\x6f\xd0\x8d\x6a\x3b\xd2\x77\xe2\x61\x74\x5b\x9e\x44\x93\x65\x58\x84\x3d\x24\xef\xb4\xd6\xf5\xf6\xc0\x97\xc2\x8b\xaf\xb6\x9c\x22\x52\xbd\x25\x48\x72\x4a\xf1\x9a\x95\xd2\x08\x7c\x02\xe7\x19\x40\x82\x40\x77\xf1\xd1\xd5\xf6\x4d\x1c\x9a\x23\x27\xb7\x8e\x05\xa1\xa5\x58\xab\xd6\x21\xfd\x6d\x88\xf6\x97\x96\x60\xae\x27\xda\x63\xf8\xdf\x2a\xf1\xbe\x98\xb2\xc4\x49\xf4\x63\x69\x9d\xa1\x5d\xe8\xf9\x17\x40\x76\xbf\x3c\x8a\xc8\xfa\x97\xc7\x5f\x1c\xbf\x39\xb4\x63\xfd\xe2\xc8\x8e\xba\x45\xb0\xdf\x78\x82\xed\xdf\xa4\x11\x09\xdd\x22\xd9\x17\x25\xa5\xa5\x3f\xa8\x3a\x27\x5d\xd9\x81\xe3\x40\x76\x94\x71\xf9\xa2\x1e\xa9\x83\x10\x34\xfc\x99\x7d\x50\xf6\xfe\x00\xe3\x90\x86\xfd\xc7\x42\xd5\xe2\x3f\xa2\xe6\xdb\x5f\xf4\x27\x1b\x62\xdb\xf2\x4d\x9f\xa8\xbb\xac\x44\x9e\xf4\x39\xae\x93\x75\xfb\x5e\x0a\x71\x8a\xa2\x84\x9c\xb3\x18\x8c\xd9\x28\x56\x08\x03\xae\x58\xc2\x58\x00\xc9\xc4\xf6\x15\x90\x70\xf2\x50\xb8\x5a\x3b\x2f\x6f\xbb\xa4\xde\x46\x2d\x5c\x96\xf9\x01\x61\xfc\xa6\x40\xec\xbf\xad\x55\x53\x25\x01\x09\xe1\x89\xe3\x39\x33\xf8\xc3\xe5\x16\x7a\xd8\xbc\x89\xb0\x27\x33\x0c\x17\x4c\x2c\xf1\xbb\x09\x04\xcd\xe0\x63\x07\xa8\xbe\x8e\x93\xcc\xee\x04\xc4\x49\xc0\x17\xf1\x36\x5b\xca\xe6\x70\x11\x64\x9d\x0f\x2b\x0e\x6e\xcf\x65\x25\xf4\xa0\xf5\x35\x0f\x79\xb5\x3b\x5c\xa0\x5b\x7c\xcc\xe8\xec\x99\xde\xf6\xe8\xc9\x71\xfc\x84\x73\x1d\xee\xd0\xed\x2e\xf6\x81\xff\x9f\xbd\x7f\x6f\x8e\xdb\x38\xf6\xc7\xe1\xb7\x32\xc5\x3c\xa7\x48\xba\x96\x4b\xc9\xf6\xf1\x49\x94\x4a\xe5\xa1\x29\x29\x61\x1d\x49\xe6\x21\x69\xa7\x4e\x85\xa9\xc3\x59\x60\x96\x3b\x5f\x61\x31\x1b\x0c\x40\x6a\x5d\x95\xf7\xfe\xab\xe9\xee\xb9\x01\x83\x05\x96\x17\x5b\x72\xd6\x7f\x58\xd2\x62\x30\x98\x4b\x4f\x4f\x5f\x3e\xdd\x8d\xe0\x80\x4d\x04\xfa\x93\x05\x1b\x05\x26\x5b\xcc\x8a\x4a\xe0\x08\xe0\x92\xce\xd9\x46\x42\x7b\x58\xed\xd0\xec\x80\x4f\x94\xea\x2b\x26\x0e\x51\x5f\x0f\xd9\xdd\xeb\x37\x98\x78\xef\xfb\x42\x65\x1f\x2f\x6b\x55\xa5\x6a\xad\xfc\xed\xb2\xd3\x2a\x9a\x43\xc9\x4e\xfe\x76\xc9\x5e\x4b\xfd\x31\xcc\xe3\xc8\x3b\xfe\x45\x6e\xab\x77\xec\x6b\x44\x3a\x11\x97\xb0\x62\x7f\xe9\x22\xbc\xbd\x9b\x78\x7b\x58\x3e\x62\x1f\x8e\x71\x45\xf5\xef\xf8\xbd\xa6\xe4\x82\x33\x33\x7a\x0d\x73\x1c\x8f\xdc\x49\x4d\x3e\x42\x9f\xfd\x6b\xb2\xc7\x7f\x6e\x2a\x61\xa6\x9f\x58\x3b\xfb\xa8\xbd\x60\xe6\x77\xf6\x9a\xd7\x1c\xd7\x0d\xeb\x76\x90\x03\x1b\xd6\xc6\xac\xc9\x0c\xce\x25\x95\x40\x09\xb7\x7a\xf4\xe8\xed\xe7\x93\x43\x7e\x2b\x53\xc2\xd9\x89\x7d\x94\x1c\x32\x3c\xb0\x01\x41\xcf\x39\x6a\xf3\xa1\xf6\xa8\x33\xb1\x5a\xcc\x13\x06\xa1\x53\xb1\x5a\xbc\xbd\x8c\xcf\x95\xf9\x8d\xbd\xbd\x4c\x8c\x11\x95\x8b\x05\xaf\x28\x68\x25\xdf\xd7\xac\x90\x73\x51\xcb\xe5\x36\x94\x81\x1f\xed\x0c\x51\x96\x79\x2a\x8e\xe1\x14\x7e\x8f\x87\x88\x6d\xed\xd9\x77\x27\x85\xdb\xe5\x43\xe4\x06\x9d\x99\xf8\xc8\x24\x8f\x05\x09\x5b\xda\xe6\x2a\x5d\xae\xf5\x3f\x8b\x23\xfc\xca\xd1\x2a\x3f\xbe\x78\x73\xf2\xfa\xfd\x9b\xe9\x32\xdf\x66\x96\xf0\x76\x67\x96\x80\xa6\x7f\xcf\x13\x17\xd6\xa9\x7d\xd4\x9a\xab\xfb\x99\x96\x1f\x04\xc9\x15\x55\xe7\x46\xcd\x08\x17\x62\x9b\xc1\xd9\x4e\x3b\xe3\xd3\x32\x31\xb2\xcb\x33\x76\x70\xea\x98\x27\x81\xa4\xd8\x59\x59\x8b\x6a\xce\x33\x71\x18\x8e\x58\xac\x16\x62\x89\x45\xa5\xa9\x9d\xe5\x68\x0b\x5e\xe6\x94\xcc\x3f\x13\x15\xc4\x0d\xbb\x98\x24\xf3\x89\xbc\x92\x90\xa9\xf6\xe0\x7b\xa8\x1d\x80\x86\xd1\xc3\xad\x42\x1d\x2e\xcf\xda\x13\xca\xd5\x7d\x79\xcf\xab\xfc\xe4\xfc\x2c\x81\xce\xf4\x0f\xc3\x29\xd8\x77\xe0\x16\xc7\x14\x47\xb5\x73\x61\x3f\xd9\x1e\x04\x1f\x6f\x0f\x1a\xac\xd6\xaf\x65\xe2\x34\xbc\xa1\x27\x31\x8d\xd4\x62\xb9\x52\x15\xaf\xd6\x2c\x97\x15\x88\x87\xeb\x8d\x87\xf5\xd1\x77\x03\x0c\x30\x97\xd5\x16\xd3\xb5\x23\xef\xcc\xd5\xd2\x4b\x62\xb2\x8e\x94\xa2\xd9\xd2\xb1\x4f\x90\x95\x0b\x58\x74\xb4\x87\x34\xc5\x0e\x4e\x42\x63\xfb\x21\x9a\xf9\xb1\x1f\x5a\x96\x6c\x9d\xa1\x0e\x53\xcb\xe8\x1a\x25\x74\x0c\xe1\xed\x64\xcd\x8e\xc2\x24\xad\x2e\x1d\x9d\x98\x9b\x05\xb5\xef\x40\x79\x2d\x4a\x1d\x9c\x1b\x1e\xe4\xaa\x21\x58\x65\xd7\x48\x7a\x4b\x75\x27\xf2\xe9\x75\x79\x5d\xfe\x68\x1d\xa3\x72\xfe\x8a\xf1\xc3\x10\xf5\x69\x81\x27\xa5\x10\x39\xf4\x22\x03\x9d\xb9\x6a\x4a\x3d\x61\xb3\x43\x3b\x31\x8d\x56\x95\x6a\xc9\x0b\x7a\xdf\x4c\xee\x23\x66\xd0\x51\xe0\x36\x82\xbc\xcf\xba\xe4\x2b\xbd\x50\x50\x8f\x21\xe3\x2b\x9e\xc9\x7a\x6d\xd4\x64\x56\x57\x3c\xfb\x08\x68\xb7\x4a\xd0\x27\x27\xd7\x65\x86\x23\x6a\xad\x69\x0b\x6c\x8a\x39\x29\xb8\x6b\x95\x15\x5c\xdb\x25\x48\xbe\xef\x32\x24\xe5\xeb\x92\x2f\x65\xe6\xca\x9c\x55\xea\x4e\x6a\xa9\x08\x7d\x0c\xfd\xc2\xe0\x38\x6b\x07\x19\x9d\x16\x5c\x2e\xd9\x81\x16\x82\x39\x5a\x09\xe9\x0b\xc4\x7d\xa3\xa9\xc1\xfb\xad\x42\x32\x84\x78\xa3\x60\xe7\xc0\xf8\xea\x0e\x33\x88\xd3\xf8\xe9\x32\x4f\x7f\xfc\xd0\xed\x5f\x7a\x6c\xaa\x82\x30\x3a\x8b\xe4\x15\x65\xae\x5c\xda\xc1\x0c\xab\x00\x82\xff\x9f\x36\x0b\xcd\x05\xd8\x13\x05\xd8\x96\xb7\x3e\x9b\x9a\x08\x48\x15\x03\x60\x65\x99\xcb\x3b\x99\x37\xbc\x00\x59\xc1\x0e\xc6\xb0\x53\x78\x5d\xde\x2e\xea\xa3\x7b\x61\xfe\x60\x98\x2a\xd3\xf3\x67\xfb\x51\x4a\x54\xe2\x59\xb0\xd9\xda\xa5\xe0\x28\x86\xb8\xd0\x6e\x30\xb0\xf0\x35\x3b\x82\xcc\x64\x60\x30\x57\x59\xb3\x0c\x53\xb8\xc3\x8f\xd8\x85\x5d\xf9\x70\xd5\x61\x78\x27\xce\x0c\x00\xb9\x8f\x55\xbd\xa0\x4c\x1b\x6a\x9e\x18\x1b\xd8\x34\xda\x41\x07\xba\x93\x03\x60\x9b\x4b\x22\x49\x29\x86\x13\xcd\xb3\x44\x70\xc2\x69\xcc\x7b\xde\xca\x59\x25\xd8\xe9\x82\x97\xa5\x28\x9e\x41\x68\xdf\x62\x1e\x6f\x4f\x3b\x13\x28\xc4\x27\xaf\x4b\xb5\x26\xe2\x9e\xc5\x13\x82\x04\x33\xfe\xf0\x75\x66\xe4\x4e\xa3\xc8\x8f\xdd\xec\x10\x60\x05\x31\xc5\x22\x23\xa8\x2c\x56\x27\xdc\x6a\x02\x6e\x48\xe1\x14\x54\xf6\x31\x25\x06\xbe\xc5\x07\xad\xdd\xa0\x1f\xdb\x82\xe0\x86\xd5\x27\x17\x6c\x90\xcf\xcd\x2c\xbd\xed\x88\x12\x09\xb9\x84\x09\xa4\xe7\x62\x4d\xef\xad\xa6\x06\xfd\xb5\x67\x77\x9b\x09\xcf\x26\xd2\x7a\xcf\x5f\x4e\xdf\xc4\x4d\xe2\x19\xff\xe5\xf4\xcd\xe7\xaa\x2f\xde\x66\xc2\x9f\xd4\xdc\x4c\x6e\xfc\x7a\x75\x66\xdd\x59\x39\x59\x5f\x88\x95\x4a\xac\x17\x3e\x68\x11\xb5\x84\x1a\x08\x4a\x4b\x10\x85\x10\x51\xe5\x01\x53\x95\x40\x92\x9e\xb2\xd7\x6f\xce\x2f\xde\x9c\x9e\x5c\xbd\x79\xfd\x8a\xd9\x9e\x90\x3a\x2a\x91\x51\x02\x3e\xe5\xcf\x00\x8a\xe3\x24\x06\x93\x8d\xdd\x7e\x6b\x42\x0a\x13\x2f\x99\x13\xd2\x24\x3a\x7e\xd8\x59\x29\x6b\x2f\x3f\x53\xc6\x0d\x65\x6b\x64\x98\xb7\xe9\x48\xdd\x4a\xcc\xd8\x51\x5a\x35\x70\x21\x5a\xbd\xf9\x80\x0e\x8f\xd6\xde\x66\xa1\x71\x92\x9d\xe5\x45\xb1\x29\xa5\x22\xfe\xc5\x3e\x6a\x11\xa2\xfb\x79\x3b\x3d\x71\x94\xfe\x45\x24\x75\xec\x86\xf5\x20\x0d\xcc\x0d\xb1\x3d\x5b\x33\xc8\xf3\x64\xb9\x88\xbf\xd2\x93\x76\x0d\x61\x0a\x13\x01\x01\xca\x08\x60\xaa\x0a\x24\xed\x70\xea\xf6\xa0\xd9\x53\x89\xad\x30\x73\x6b\x78\xe0\x02\xa8\xbd\x85\x84\x60\xaa\xaf\xa2\x58\xe3\x7d\x0b\xe9\xd6\x30\xe4\x8d\x63\xa6\x30\x5b\x17\x98\xad\x2a\x79\x27\x0b\x81\xf9\xfb\x65\x79\x1b\x64\xfa\xb3\x78\x51\xca\x1f\xda\x1e\x97\x59\x7d\x5d\xfb\xaf\x13\xf0\xed\xc3\x0f\x57\x20\xed\x81\xf0\xf3\x68\x46\x60\x3e\x08\xd5\x38\xc6\x6f\x95\x5d\xf7\xf6\x4e\x49\x9d\x54\x48\xcf\x2e\x8d\xb0\x12\x5b\x59\xf0\xb7\x5f\x90\x37\xf6\x11\x2d\x8c\xf9\x41\x04\x0b\x53\x68\x2f\x41\xda\x3a\xfb\x93\xd5\x5d\x4a\xcc\x2e\xd6\xad\x5d\x07\xf3\x89\x83\xd6\x1e\xca\xe9\xd5\x9d\xb9\x0e\xc5\xfd\x31\x65\xeb\x38\x32\xfd\x1d\x11\x64\x0a\x2b\x94\x1c\xff\x0e\xfe\x48\x9a\x97\x53\x5c\xe5\x43\xcb\xea\x54\xb2\x0f\x5b\x9b\x9c\x1e\x4b\xa7\x66\x60\xe3\x37\xe7\x43\xd7\x64\xb5\x4a\x89\xfc\x89\x1a\x34\xa9\x66\x91\x9a\x12\x71\x9b\xa0\x88\x80\xea\xd5\x79\x42\xef\xb6\xf7\xa4\x3c\x74\x45\xfc\x44\x8e\xec\xe2\xf8\x9f\xf0\x97\xcc\x7c\x76\x9b\xf5\x1a\x9c\x35\xac\xe0\x42\xd5\xaa\x1c\x92\x89\xce\x13\xad\xe2\x35\xc3\x16\xa7\x3e\xf7\x77\xa0\x33\x18\x51\x64\x3b\x1b\xe1\x36\xb3\x4c\x0c\xad\x33\x49\x55\xd5\xf7\xaa\xea\x15\xcd\xcf\xa3\xe7\xad\xab\x87\x9e\x3d\xc8\xd6\xb9\xcd\x3c\xa2\x31\x04\x63\xb7\xe5\xf3\x13\x4c\xb8\x16\x4b\xca\xfd\x59\x14\x86\x20\x8d\xa2\xeb\x93\x4e\x62\x4c\xb1\x9e\x90\x01\x73\xc9\x57\xd6\x1a\x10\x58\xd7\xb6\x19\xa1\x1d\x49\x7b\x88\xff\x6c\xd4\x6c\x5d\x27\xd6\xf5\x7f\xf0\x41\xbc\xa0\xf6\xc7\x67\xb3\x6e\xd3\x07\xda\xa3\xac\x66\x89\x25\xbc\xf8\xfe\x75\x3c\xba\x0b\x9e\x2b\xcd\xc0\x61\xc2\x5e\x8b\x1e\x57\xc1\x93\x89\x57\xd5\xec\x61\xa6\xed\x8b\xef\x5f\xb7\xa7\xa7\x33\x5e\x88\xb3\x1f\x12\x01\xab\xf8\x20\x9e\xa6\xfd\xb1\x9b\x4e\xa0\x8f\xbe\xc3\xa0\x64\x95\x8b\x31\xb1\x56\x3e\x3d\x22\x7e\xad\x33\x64\x20\xd0\xbe\x20\xf9\x78\xc0\x36\x40\x7e\xc0\xfa\xfb\x68\xd1\x89\xc6\xb4\x4d\xea\x47\xf3\x42\x67\x6a\xd8\xad\x4a\x5c\xbc\x3e\xc2\xb9\x4a\xa7\x78\x78\xce\x8d\x48\x66\xa1\xf8\xd7\x64\xef\x4e\xaf\x16\xc2\xba\x07\x13\xc2\x4e\xf8\xb8\x65\x0b\xbe\x84\x47\xcf\xcd\x1e\xed\x08\x30\x7f\x5c\x97\xc9\x8f\xc4\x2f\x0f\xfa\x44\x93\xee\xf1\xb4\x2f\xb2\xbf\x69\xc7\x01\x98\x6c\xda\x16\x35\xd3\x8d\xba\xae\xba\x74\xbb\xae\xb3\x2b\xdd\x2e\xe9\x77\x4a\x36\xed\x73\x8f\x24\x1b\x27\x9d\x0b\xe9\x96\x49\xeb\x5f\xb2\x69\xcb\xc0\x96\x6e\xd3\xb6\x61\xf5\xb4\xea\x9a\x83\x92\x0d\x37\xdb\x41\xd2\xaf\x24\x34\xfa\x74\xc3\xa4\x3a\x9c\x6c\x9a\x54\xc7\x92\x2d\xbb\x2a\x4b\xb2\x59\x5b\x78\x4e\x36\x1a\x96\x18\xd3\xaf\x0d\x89\x60\xe9\xb7\x52\x02\x4f\xba\x65\x52\xf0\x48\x36\x4d\xdd\xfd\xc9\x86\xed\x1b\x34\x9d\x0d\x22\x71\x6f\xf5\x64\xc2\xeb\x5c\x02\x5b\x64\x01\x4a\x43\x72\x36\x33\xbc\x1e\xf0\x19\xb6\x41\xc1\x65\x13\x9c\xe7\x2e\x68\x17\x66\x5f\x60\x4b\xbe\x82\x5c\x23\x10\xe2\x58\xf1\x7b\x06\xd0\x13\x96\x0b\xaa\x6a\x48\xb9\x57\x22\xd3\xd7\x88\x24\x17\xf8\x3e\x98\x7c\x3a\x50\x9e\xe0\x59\x67\x9c\xfe\x99\xaf\x21\x6a\xfe\x8e\x50\x36\x9b\x68\x37\x36\xec\x61\x24\x81\xaf\xc2\x38\x13\x30\x2b\xb0\x27\x6c\x51\xbc\xbe\x74\x89\x15\x7c\x44\x57\xe9\xd3\x6f\x6c\x52\x0a\x57\xea\x49\xf0\x58\x90\x63\x68\x18\x94\x05\xcd\xe2\x4d\x34\xbf\xb8\x5d\xfc\x29\xca\x5e\xb3\xfd\xde\x41\x6f\xe9\xad\xf3\x8f\xd2\x75\x5f\x03\xb3\x87\xdf\xa4\x28\xd4\x9f\xc4\x06\x1f\x30\x49\x32\xc3\x94\xa1\x49\xa5\x54\xce\x58\xc6\xf6\x5f\xed\x27\xf7\x0f\x47\x41\xa5\x0d\x92\xb5\x91\xdb\x2d\xda\xa9\x82\xe1\x39\xe5\x9c\xb5\x25\x12\x72\x5f\xa1\x17\x85\x7e\x15\xce\x81\xa2\x3d\x08\xd3\xca\xd7\x8c\x57\xaa\x29\x6d\x44\x8a\x8b\x92\x7d\xdf\xfa\xf0\x07\x4a\xe9\x89\x99\x7f\xe2\x62\x50\x33\x51\x73\x43\x41\x2f\xa7\x2f\x5f\x6c\x41\xa7\xd0\x49\x8b\x4e\x7d\x9a\x18\xdc\xfc\x2d\x73\x66\xbd\x27\xb9\xcd\xb4\x38\xb2\x50\xeb\xba\x6a\xc4\x04\x7f\x82\xdc\x59\x41\x4c\xeb\x01\x26\xd6\x52\x55\x98\xa7\xeb\x30\x0e\xc6\x86\x26\x3d\xf9\xb2\x9a\xd9\x38\x1a\x22\x62\x81\x7d\xf1\x24\xe4\x76\x65\x5f\x6f\x20\xa7\x70\x2c\xd7\x7b\xd7\x7b\xec\xc0\xa1\x0f\x2a\xa5\xea\xc3\xe4\x12\xd1\xc8\xde\x7c\x5a\xa5\x90\x20\x9f\x56\xbc\xcc\x45\x8e\x2c\xe9\x89\x86\xf9\xbd\x58\xf0\x3b\xa3\xbc\xcb\xa5\x2c\x78\x55\x40\xbc\xc3\x25\x0e\x03\xf0\xd0\xa2\xbc\x93\x95\x2a\x97\x58\x1d\xab\x42\xe4\xb7\xb3\x58\x69\xf6\xff\x3b\xf8\xe9\xe4\x02\x92\xbf\x1c\xda\xca\x33\x38\x4a\x9f\x93\x21\x1c\x49\xd0\xdd\x88\x35\xb2\x23\x31\x0b\x02\x67\xc0\x8e\xcc\x7c\x69\xd9\xd4\x58\x60\x57\x7c\xca\x8a\x46\xcb\xbb\x14\xd9\x6d\xcf\x05\x3f\xa8\x5c\x84\xc5\x12\x36\x33\xc3\xb0\xb5\x03\x8d\x84\xc9\xc7\xe1\x8a\x28\xe4\x52\x1a\x2e\xc4\x6b\x2a\xd7\x1a\x62\x0e\x28\x7a\xc8\x61\x57\xcd\x3e\x0e\x07\x80\x7a\xc6\xd9\x97\x57\x25\x8c\x5b\xe4\x15\x56\x3c\xec\x0e\xcd\x62\x99\x97\x62\xab\x84\xbf\x61\xa0\xeb\x68\x6d\x28\x7a\x69\xa3\x44\x41\x22\xd8\x40\x9a\x11\xdf\x2a\x42\x01\x3b\x13\x16\xe3\x85\x82\x1a\xaa\xf5\x82\x38\xa7\x4f\x23\x18\x00\x3e\xf4\x70\x7e\xdf\x7e\x10\x5f\x88\x31\xf1\xc8\x31\x8f\xe1\xcb\x79\xcd\xa9\x14\x0e\x75\xbd\x35\x64\x2f\x58\x8c\x21\x7c\x5b\x7a\x34\xc1\x2b\x8f\x18\x4f\xa0\x9f\xc5\x23\xea\xb3\xab\xa4\x07\x43\x96\x95\x87\x8f\x03\x85\xdf\xf6\x10\xc0\x7d\x7f\x92\x41\x78\xea\x95\xfa\x28\x12\xb7\x72\xdf\x78\x3a\xaf\x3e\x6a\x70\x9d\xde\xc2\x91\x8e\x4d\xc5\x9c\xd8\xfa\x21\x9d\x79\xa8\x69\x67\xd9\x36\x65\x39\xef\x19\xff\xc6\x33\xbb\x55\x8e\x51\x58\x79\xf4\x85\x80\xdc\x60\x8f\xa3\x4b\x05\x0a\x69\x30\x09\x49\x25\x6b\xcd\x96\x62\x39\x13\x55\xa2\x40\xc7\xe0\xe1\xdd\x41\xf7\x77\xd0\xfd\x1d\x74\x7f\x07\xdd\xdf\x41\xf7\x77\xd0\xfd\x1d\x74\x7f\x07\xdd\xdf\x41\xf7\x77\xd0\xfd\x1d\x74\x7f\x07\xdd\xdf\x41\xf7\x77\xd0\xfd\x1d\x74\x7f\x07\xdd\xdf\x41\xf7\x77\xd0\xfd\x1d\x74\x7f\x07\xdd\x7f\x0a\xe8\xfe\x0e\xf9\xbe\x43\xbe\xef\x90\xef\x3b\xe4\xfb\x0e\xf9\xbe\x43\xbe\xef\x90\xef\x3b\xe4\xfb\x0e\xf9\xbe\x43\xbe\xef\x90\xef\x3b\xe4\xfb\x0e\xf9\xfe\x9b\x43\xbe\x6f\x7e\x6b\x6c\xa5\xdd\x16\x53\xdf\x54\x5c\x37\x84\x4a\x63\xf3\x34\x48\xfa\x37\x5c\x76\x97\x2e\xfb\x73\x55\xc8\x6c\x7d\xf6\xba\xf7\xca\x67\xd8\x82\x7d\x0f\xd6\xee\xf7\xbc\xe4\xb7\x58\x5d\xe6\xe0\xf2\xfc\xfb\xf7\x87\x6c\x55\x29\x30\x0d\x9d\xbd\x66\x5c\x6b\x95\x49\x70\x0c\xba\x2c\xca\x97\xe1\x67\x3e\xf0\x1e\x3c\xb3\x6e\xb7\x7a\xf4\x70\xca\xbe\x4f\x05\xdb\x9d\x06\x2d\xa3\xf1\x04\xd2\xa4\x03\xe0\xb3\x45\x56\x77\xcb\xfc\xe3\xe3\xb0\xb1\x7f\x03\xb7\x94\xc8\xcf\x55\x6e\xe1\xae\x43\x45\x5d\xae\x16\x82\xa1\x37\x0b\x2b\x58\x15\x85\x75\x3b\x61\x19\x96\x9c\xf5\x74\x8a\x10\x75\x84\xc7\x43\x41\x3e\x23\x3c\x1f\x61\x45\x46\x2a\x5e\x01\xbd\x18\x52\x5c\x81\x09\xc1\x50\x93\x79\x7e\xa0\x0f\x07\x0e\x0e\x0e\x68\xcf\x68\xaa\xf1\x44\x3a\xc7\xa8\xdd\x60\x43\xfd\x42\x74\x93\x71\x0b\x03\xae\x45\xb5\x9c\x24\x09\x2b\xae\x85\x81\x63\xd9\x46\xaa\x6c\xaf\xfe\xbf\x26\x76\x42\x9d\xd1\x91\x1f\xb1\x3d\x0a\x57\x5b\xa2\x3b\x9c\xd6\x84\x27\xad\x1a\xa0\x47\x2f\x5f\xbc\x18\x55\x1d\x60\xa4\x80\xd8\x9e\x4b\x0f\x9f\xfd\x9b\x2c\x73\x75\xaf\x2f\x45\xd6\x54\xb2\x5e\x9f\xaa\xb2\x16\x9f\x6a\x2c\xa4\xaa\x37\x91\xdf\xc6\x17\x5d\x8c\x07\xb5\xf2\x6e\x5e\x45\x0d\x8c\x54\x1d\xd6\xbd\x1e\x84\x19\xde\x2e\x35\x3f\x75\x2f\x5c\xae\x44\xc2\x43\xf9\x97\xf7\x97\x27\x71\x1b\x26\x35\xbb\x87\xa3\x6a\x96\xda\x3c\x67\x3c\x5f\x4a\xa8\xe7\xc3\xee\xc5\x6c\xa1\xd4\x47\x76\x60\xf5\xab\x5b\x59\x2f\x9a\xd9\x34\x53\xcb\x40\xd5\x3a\xd2\xf2\x56\x1f\xdf\xd3\x44\xcc\x30\x0e\x99\x2c\x0b\x69\x5d\x16\x66\xaa\x41\x61\x23\xfc\x88\x9f\x1a\x00\x03\x28\xb7\x32\x31\xf9\xee\x30\x21\xc0\xa3\xbf\x90\x41\x77\xee\x69\x7e\xd8\xd3\x71\x2b\xe9\x74\xef\x20\xb1\x5c\x79\x3a\xb8\xa4\x29\x4f\xf4\x8f\x5a\x54\xe9\x0f\x1b\x5e\x64\x9f\x32\xbf\xed\xa6\xc7\xaa\x41\x32\x87\x12\x59\x2b\x05\x75\x52\xdb\x71\x5e\xab\x4a\x65\x42\xeb\x38\x62\xc1\x34\x69\xb4\xa8\x02\x64\x85\x2c\x99\x5c\x1a\x86\xbf\x14\x35\x07\x10\x71\xeb\x52\x63\xef\xf9\x9a\xf1\x42\xdb\x92\xcd\xe6\x8d\x73\x95\xb7\x88\x14\x52\x92\xd3\x53\x70\xba\xb7\x9e\x23\xc4\xa1\xf3\x5a\x54\x11\x2e\x1c\x53\xfb\xf5\x9a\x7f\x14\x3a\xa8\xac\xf0\xc0\xb8\x89\x5c\xea\x4c\xdd\x89\x6a\x7d\x7c\xf7\x12\x6a\x5b\xbd\x9c\xbe\x29\x73\x58\xc2\x4d\x07\xd3\xb6\x69\x99\x1d\x64\x79\x5b\x08\x56\xa8\x5b\x28\xf4\x71\xbd\x37\xe3\xd9\x47\x51\xe6\x46\x30\x58\xae\x0a\xb8\x2f\xa9\x2a\x33\xfa\x7b\x87\x44\x24\x9e\xe7\x95\xd0\x3a\x55\xc8\xcd\x3f\xea\x0c\xce\x3d\x42\x22\x90\x9a\x09\x1a\x2e\xe2\x90\xe2\xc3\xe4\xc2\xa9\x38\x98\x42\x6a\x51\xad\x2a\x00\x10\xf1\x2c\x53\x55\x58\xa8\x35\x66\xb5\x76\x09\x2e\x0b\x99\xc1\x1d\x67\xbe\x69\xa4\x36\x5b\xad\xe5\x54\x95\xba\x59\x02\xde\xd9\xc8\x66\x08\x9b\x72\x95\x83\x6a\x8f\xc2\xf0\xe3\x0d\xe2\xde\xcc\x1e\x23\x0d\xcb\x8a\xa9\xfb\x12\x70\x43\x33\x59\xc8\x1a\x8a\xa5\xf9\x08\x2e\xcb\x05\x79\xcd\x0a\xc1\x8d\x64\x57\xba\xe1\x40\xf4\x4f\xa9\x10\x18\x02\x98\x96\xf8\x02\x18\x2a\x18\x37\xd9\xfb\x74\x14\x30\xa9\x42\xea\xfa\xc8\x36\x11\x35\xe1\x2b\x73\x59\xa7\x0b\x97\xf9\x67\xbe\x22\x41\x4f\xa8\x45\x53\xc1\x92\xe8\x9a\xd7\x8d\x63\x72\x6e\xd7\x46\xdc\xae\x8e\x8e\xa7\x1d\x3a\x3e\xf5\x43\x24\x5f\x64\x3a\x28\xce\x3e\x49\x52\x8d\xa3\x12\x5b\x5a\x8a\x32\xd4\x67\x6e\x93\xd5\xdc\xbd\x00\xac\x25\x47\xff\x65\x23\xf5\x22\x78\x00\x70\x30\x28\x35\x83\xae\xc5\x03\x31\xbd\x9d\x9a\x7d\x7f\xfd\xe1\x12\x3d\x23\x87\x46\x96\x2f\x6a\x28\x98\xeb\xdf\xc3\x98\xb0\x46\x07\xb5\x18\xdc\x78\x7d\x48\x58\x50\x1a\x65\xde\x94\xb7\x50\xdf\x04\xbf\xb0\xb4\x5d\x9e\xd8\xfa\x3b\xf8\xcd\x43\xd2\x1c\x56\x5c\x6b\x18\x03\xd4\xab\x60\x07\x17\x6f\x4f\xd9\xcb\x97\x5f\x7f\x73\x68\x9a\xcb\x1c\xe1\x44\xc9\x52\xa5\x50\xd3\xea\xc2\xec\x4e\x7b\x41\xdd\x23\x2c\x08\xd9\x72\x14\x05\x96\x39\x2a\x36\x01\x02\x70\x54\x2d\x30\xdc\x84\x2d\x44\xac\x76\x11\x8d\xa0\xd8\x51\x62\x94\xb6\x1a\x97\xa3\x51\x5e\xcd\x64\x0d\xe8\x4e\xf7\x2c\x22\xdb\x84\x50\x18\x31\x18\x0d\xb5\x92\x8e\x91\x89\xaf\xb8\xac\xfc\x49\x35\xbd\xf8\xb7\xb0\x56\x12\xf6\x3c\x7d\x82\xa4\x5e\x58\x95\x89\xd9\xda\x4d\x40\xab\xb2\xcc\x8a\x26\x17\x10\xa6\x8d\x55\xcc\xd4\x9c\xbd\xfc\xae\x3d\x42\xeb\x16\xc7\xd6\x1a\xeb\xa8\x50\x21\x0d\x88\x7c\xf3\xfe\xd9\xb9\x2a\x0a\x75\x8f\xc2\x6f\x51\xb0\x8f\xa5\xe1\x4e\x1f\xc5\x5a\xbf\x62\x5f\xb1\x78\xf0\x96\x44\x5f\x05\xb7\x5a\x5c\x76\x39\x3e\x74\x58\x8d\xe7\xba\x64\x81\x3c\x65\x97\xd6\x8c\x06\x2b\x96\xd8\x28\x58\xa2\x7b\x1f\xc2\x1a\x31\x68\xd3\x8b\xaf\x55\x35\xbd\x2e\xbf\xf2\xc5\x7a\xe2\x51\xfe\xac\xca\x0d\x23\x84\x1a\x3e\x6e\x38\xa6\xd7\x87\x8e\x68\xe4\x70\x2a\x71\x2b\x55\xd9\x3f\x20\x7c\xfe\xf4\x43\x4a\xdc\xc5\x3c\x47\xce\xc9\x8b\xf3\xe8\xf2\x1d\xae\x2b\x9a\x54\x17\xda\xe7\x72\xac\x24\x12\x70\xf0\x7f\x8c\x16\x5f\x4e\xa3\x9b\x69\x48\x90\xf1\xad\xdb\xf5\x4a\xed\xdd\xe4\x6e\x33\x42\x82\x86\x8c\x69\x28\xcc\x93\xe7\x09\xc6\x03\x3f\x47\x7b\x0b\x28\xcb\x80\xe7\x21\x1e\x50\xac\x38\x59\x5a\x8c\xb0\x27\xef\x04\xab\x2b\xa3\xa7\x66\x93\x58\x44\xb9\x5f\xf0\x1a\xea\x27\x93\xf1\xc7\x08\x08\xbc\xe4\xb7\x56\x53\xf4\x3c\xea\x84\x95\xb2\xe8\xd0\x16\x2f\x59\x53\xe2\x69\x36\xf7\xb0\x80\x02\x4c\xa0\xa0\x67\x5c\x53\x44\x2c\x5e\x75\x44\x53\x4e\x58\xc2\x51\x47\x2f\x33\xae\x21\xee\x7b\x9d\x0a\xdf\x7e\xa4\x60\x7a\xae\xaa\x51\xc2\xa9\x69\xd7\xf2\xbb\x9b\x5f\x1a\x57\x5c\x26\x96\xe1\x86\x83\xd0\x56\xab\xf3\x4a\xd5\x2a\x53\x09\xec\xbc\x11\x2c\xa1\x4e\x30\x56\x42\x33\xea\x06\xb4\xa4\xe2\x45\x66\x27\x55\x15\x8b\x12\xc8\x48\xb5\x59\xb0\x32\xe7\x55\x1e\x5e\x89\x54\xb5\x73\x5d\xd6\xfc\xd3\x94\xfd\x58\x1e\xad\x2a\x31\x97\x9f\x44\x8e\x42\x02\x08\xab\x66\x5e\xd5\x1d\x41\x97\xce\x4e\x3e\x9c\xf8\x9e\x2c\x9e\x12\x1b\x1f\x70\xcd\x56\xa2\x62\x17\x6f\x4f\x8f\xbe\xfb\xe6\x9b\xff\x04\xdd\xc3\x5c\x37\xaf\x8e\x8f\xef\xef\xef\xa7\x92\x97\x7c\xaa\xaa\xdb\x63\x28\x83\x06\x81\xdd\xfa\x98\xba\x38\xb2\x42\xc9\x07\x55\x1e\xb9\xfe\xed\xec\x1c\x2d\x18\xc9\x24\x1e\xa2\x2f\x57\x68\xab\xc8\xf7\x17\xae\xee\xcf\x53\x10\x6a\x94\x6e\x0d\x4f\x8a\x82\x21\x94\x1d\xea\xcf\xb5\x44\x71\x92\xb6\xa1\x1a\x21\xa5\xd2\xc4\x7c\x9b\x54\x86\x3b\x6e\x0d\xe8\x43\x73\xa7\x52\xee\x86\x48\x30\xa1\x35\x98\xd8\x2a\xf7\x96\x73\x3a\xdd\x91\xe2\xcb\xa6\x30\x9a\xbf\xff\x63\x8a\x1f\xfa\xe0\xd2\x80\x08\x09\x52\xde\x4c\x00\xc7\x08\x16\x81\xa9\xca\xc9\x5c\x94\xfa\xd3\x0b\x5a\xe6\x22\xb5\x31\xdd\x91\xf4\xfe\xdd\x37\x2c\x5b\xf0\x8a\x67\xb5\x39\x86\x85\x2a\x6f\xa7\xb6\x29\x88\x7e\x58\x26\xb8\x50\xf7\x50\x21\x4d\x0b\x2c\x57\x5c\x9a\x53\x2b\xb3\xf0\x55\x55\xb1\xfd\xa3\x7d\xf7\x32\xc4\x4f\x00\x55\x88\x92\xa4\x1a\x5b\xeb\xb8\xf3\xf2\x76\xfb\xba\xa2\xb3\xda\xdd\x57\xf3\x24\x28\xc4\x18\x73\xa8\x33\xda\xef\x6e\x29\x2f\xdc\x77\x08\x97\x50\x35\xc4\x59\x54\x12\xe3\xc4\xa3\xa2\x5e\x5e\x8d\x4b\xea\x54\xcc\xd9\x8a\x2c\x57\x1b\x59\x34\x73\xb5\x91\x01\x9c\x9d\xf7\x9e\x7b\x6b\x9f\xff\xf1\xf5\xf9\x84\x5d\x9d\x9e\x4f\xcc\x1e\x5c\x9e\x5e\x9d\x47\xeb\x79\x75\x7a\xfe\xf4\x8a\x3c\x72\xb7\x11\x0c\x13\x4f\x44\xac\xd2\xbb\x3a\xd9\xe1\x06\xd1\x65\xe5\x94\xfa\x40\xa3\xc7\xca\x69\x54\x3f\xd9\xb2\xa1\x1a\x64\x15\x52\x9d\x9c\x2a\x12\x7f\x96\x84\xd8\x89\x2b\x7b\xee\xeb\x59\x4f\x48\xfd\xb1\xdb\xfb\xff\x94\x2c\xf1\x46\x5c\x55\xca\x56\x8c\x64\xf3\xa6\x28\x18\x0d\xd6\x0d\x74\xa4\x85\x01\xbc\x2d\x93\x3d\xf7\x5a\xaf\xbd\x21\xed\x96\x09\xb5\x7f\x9f\xb1\xa1\x0e\x6a\xbb\x59\x85\x3c\xe3\x55\x25\xad\x95\x4e\xea\x78\x0d\x90\xb3\xb5\xcc\x01\x46\x86\xf3\x7c\x6d\x16\x28\x80\xa6\xef\x76\x42\x18\xb9\x5c\x36\x35\xe4\xf7\xe0\x73\xa8\x93\x58\x09\xd4\xdd\xc0\xf2\xe1\x45\x77\x3b\x1e\x34\x42\x40\x2d\x56\x94\x73\x8a\xb5\x77\x18\x19\x3e\x74\x76\x7e\xf7\xed\x2b\x76\x11\x43\x3f\xcf\xef\xbe\x65\x27\xd8\xc3\x14\xdb\x7c\x97\x68\xf3\x5d\xd8\xe6\xed\xff\xbc\xfe\x10\xb7\x61\x6f\x9b\xa2\x58\xb3\xff\x69\x78\x81\x56\xae\xd7\x50\x4e\x9a\xf5\x3a\x6b\xf8\x4a\xfe\x24\x2a\x9d\xcc\xd6\x73\x72\x7e\x46\xcf\x5c\xec\x18\x06\x00\x55\x18\x4b\x01\x35\x21\x97\xdc\x5d\x24\x8e\xc8\x79\x20\xd2\x21\x85\x4c\x81\xab\x07\x72\x4e\xa6\xca\x3b\x01\xa2\x44\xa6\x6e\x4b\xf9\xb3\xeb\xcd\x5d\x03\x85\x11\xa0\x6a\x64\x3b\xa5\x2d\x71\x3b\x71\xe5\xe1\x2b\x01\xfa\x6d\x53\x06\x3d\xa0\x16\x9e\x44\xe0\xdc\xca\xda\x42\x9f\x32\xb5\x5c\x36\xa5\xac\xd7\xc7\x10\x29\x21\x67\x4d\xad\x2a\x7d\x9c\x8b\x3b\x51\x1c\x6b\x79\x7b\xc4\xab\x6c\x21\x6b\x91\xd5\x4d\x25\x0c\x1f\x38\x82\xc1\x96\x20\xc9\x4e\x97\xf9\xef\x1c\xc0\x2d\xb5\xa0\x9e\xdc\x3b\xeb\xe9\x4f\x3a\xe8\xee\xb6\x02\x3d\xdd\xa7\xc1\xd3\x90\x44\xa7\xec\x0d\xcf\x16\x96\x5c\x7b\x95\xcf\x17\x2f\x5e\x24\x0f\xe8\xd6\xb5\xea\x37\x18\x7d\x36\xda\xae\x78\xad\x96\x32\x1b\x2e\xce\xc8\xed\x65\x8d\xa2\xb2\xa3\x19\x2b\x51\x5f\xbc\xb9\xbc\x0a\xc1\xcf\xd2\x99\x32\x3c\x0f\xf5\xd4\x84\x0b\x32\x17\x74\x2d\xb8\x4c\x51\x4e\xda\x87\x6b\xaa\x90\x60\x08\x6b\x66\x4b\x59\x63\x65\x49\xa1\xc1\xa0\x34\x65\xa7\xbc\x34\x77\xde\x4c\xb0\x66\x95\xa3\x8a\x77\x56\xb2\x53\xbe\x14\xc5\x29\xd7\x69\x34\xd7\x53\xd2\x12\xf0\x8a\x23\xb3\x64\x49\x6a\xb2\xf6\xf2\x94\x0b\x95\xc4\x46\x5c\x9d\x7d\xed\x6c\xeb\x8f\xab\x1d\x8f\xfa\xe4\x7b\x51\x73\x2b\x6a\x24\x28\x19\x05\x86\x98\x2b\x5b\x72\x2e\x45\x7d\xaf\xaa\x8f\x24\x54\x58\x1c\xfa\x6c\x8d\x16\x3a\xaf\x86\x25\x88\x1c\xc4\x97\x5e\x51\x13\x32\x7a\x91\x88\x4a\x52\x12\x56\x06\x6f\x6b\x7b\xe6\x5e\x44\x61\x86\xf8\x56\x8e\xaf\x51\x17\x88\xa8\x45\x21\x15\x9f\x52\x14\x8c\x51\xe0\xe0\x11\xb1\x9a\xa8\xef\xeb\x3d\x6e\x25\xe4\xeb\xbd\xd1\x87\x92\x3e\xfc\x3c\xe7\x11\x74\xb6\x31\x67\x72\xc0\x94\xb0\xc9\x5f\xb1\x95\xfe\x38\x19\x57\xbe\x37\x20\xb1\xf1\xa6\x07\xb8\xcc\xdf\x49\x3d\x4a\x4b\x75\x8d\x63\xc1\xcb\x92\xa8\x23\x42\xd8\xc0\x54\x9a\xa3\x50\x9c\xc1\xad\x4a\x15\xdc\xdd\xdd\x9c\x4f\x79\x73\xba\x23\x11\xaf\xe5\xbb\xa1\x4d\x7b\xca\x23\x85\x62\xfd\xbf\x76\xb7\xd8\x2f\x7d\x8b\xc1\xd1\x7c\x9a\x1b\xcc\x10\x0c\xde\x5f\x0f\xe7\x7b\xd6\x78\x35\x8a\x9f\xb9\x0f\x6e\xe0\x66\x33\x51\xef\xdc\xc0\x3b\x37\xf0\x97\xee\x06\x8e\xc9\x78\xe7\x05\xde\x79\x81\x77\x5e\xe0\x9d\x17\x78\xe7\x05\xfe\x62\xbc\xc0\xbd\x0c\x7c\xb4\xec\xb2\xf3\x01\xff\x66\x7c\xc0\xf1\xc6\xee\x5c\xc0\x5f\x82\x0b\x98\xe9\x26\x5b\x18\x2a\x58\xae\x33\xb5\x5c\xf1\x72\x0d\xb0\xe7\xe5\xfa\x28\x6b\x74\xad\x96\x47\xb6\x8f\x9d\x4b\x78\xe7\x12\xde\xb9\x84\x9f\xd3\x25\x1c\xb3\xcf\x9d\x47\x78\xe7\x11\xde\x79\x84\x77\x76\xed\xdf\xb4\x47\xb8\x65\xc6\xdc\x39\x84\x3f\x43\x53\xfa\xce\x21\xfc\x6f\xe3\x10\x4e\x28\x70\x4f\xec\x0f\x6e\x1d\xf8\x6d\x54\xc9\x27\xf5\x06\x27\x64\xad\x9d\x33\xf8\x37\x7c\x69\xfe\x2a\xce\xe0\x94\x40\xbf\xf3\x05\xff\xdb\xf9\x82\x53\x64\xf0\x48\x57\xb0\xb8\x03\xe3\xcf\xdd\xcb\xe9\x1b\xf3\xb7\x8d\x6c\xcb\x34\xb0\x7e\x1d\xb8\x7d\xc8\x2e\x0a\xbf\x6b\xb5\x14\x68\x9f\xb6\x0a\x37\xa6\xf4\x99\xb2\xb3\x3a\xc8\xbe\x9a\x8b\x52\x81\x65\x45\x2d\x05\x19\x0e\xb3\x05\xe4\x2b\xb0\x59\x23\x31\x41\xc9\x00\xb7\x83\x6f\x5e\xc9\xa5\x48\x70\x3c\x57\x85\xac\xa5\xa4\x61\x26\x7a\x08\xdf\xe7\x35\xa3\x7f\xde\x1b\x86\xc4\x3f\x8a\xf2\x78\xce\x65\x01\x25\x0d\x6f\x79\xe4\x01\xf6\x3f\x58\x56\x77\x56\xa3\xa9\x15\x16\xfb\xa8\x12\x3c\x37\x1a\x57\xa4\x8a\x65\xbc\x24\xc9\xa0\x46\x8b\xea\xcb\xaf\x7f\x1f\xd8\x5f\x76\xfa\xcd\x2f\xc1\xaa\x7d\xa2\xe9\x53\x5b\x28\xb5\x5d\x3c\x36\x6a\x60\xd3\x1a\xf8\x9f\x2d\x4a\x40\xeb\x06\x18\xe9\x8c\x67\x1f\x21\x3d\x24\x58\x38\x6b\x09\xbe\xf9\x35\x4a\x65\xe4\x89\x64\x78\x4c\x40\x39\x1f\x67\x52\xf2\x9f\x7b\x2b\x2b\x0d\x54\xad\x6b\xbe\x4c\x14\xb1\xe9\x6b\xf9\x1c\x03\x7f\x38\x6b\x83\x63\x19\xcd\xeb\x1d\x1f\x39\xad\xa8\xe1\xe7\x3e\x2b\x9f\x38\xaa\x6f\x3a\x94\x41\xf7\x97\x9f\x87\x2f\xc7\x60\xde\x0a\xca\xc1\x38\xb6\xd9\xd5\xf8\xed\x23\x3b\x5c\xc8\x62\x4c\x75\x55\xa4\xa6\xef\x1b\x76\x39\x37\xb4\xc7\xd4\x0c\x9d\x11\x96\x1d\x5a\xee\xfc\xb8\x55\x7e\x2f\xb3\x4a\xd9\xa5\xde\x49\x37\xcf\x23\xdd\x3c\x95\xca\x6d\x6e\xf2\xee\xfe\x98\x5f\x71\x7f\x16\xcd\x92\x97\xee\x7e\x64\x41\x33\x67\x85\x0f\xb0\x3f\x66\x7f\x30\x4d\x99\x2a\xa7\xec\xbd\x51\x4e\x79\xc1\x0a\x51\xde\xd6\x0b\x0f\x15\xc0\xbe\x5f\x7e\xfc\x1e\xe1\x0a\x85\x9c\x55\xbc\x32\x8a\xbd\x47\xc4\x84\x0e\x54\x02\x60\x11\xfe\xa5\x59\x99\xdf\xbe\xfb\xf6\xe3\xf7\x7d\xf5\x8e\x75\xea\xf2\xc5\xdf\x51\x72\xc0\x7c\x3b\x6d\xe1\xc1\x1e\x82\x78\xc6\x8f\x96\x08\x9c\xe8\x91\x1a\x93\x95\x4a\x1c\x86\xc5\x0c\xcc\xc1\x6a\xdc\x89\x35\x3b\x31\x53\x4d\xdd\x76\xee\xca\x7a\x1f\x0c\xb5\x3f\xb8\x33\xa1\xaa\xda\xf6\x47\x89\xaa\x9d\x81\x5f\x4f\x18\x40\x8a\x2e\x04\x38\x3c\x2f\x45\x7d\x9a\x6a\x15\x3c\xd7\x94\xf1\x5d\x6a\x92\x0f\xc1\x10\x22\x6b\xac\xe7\x94\xf1\x46\x0b\x26\x41\x0a\x83\x32\x21\x20\x0e\xa2\x20\x88\x4e\xbd\xa0\x2b\x2b\xb7\x3c\x0e\x0d\x54\x09\x23\xc5\x24\xf8\x09\x3d\xb0\x6c\x0f\xd3\x49\xf1\x82\x69\x91\x29\x23\xf6\xaf\xed\xa2\xba\xa2\x3b\x86\x4b\x17\xe2\x13\x51\x81\x9e\xb2\x37\x66\x6d\x80\x55\xb6\x85\x45\x56\x57\xf2\xf6\xd6\x30\x18\xee\x6c\xf1\x50\xdf\x40\x14\xc2\x1e\x04\x3b\x80\x27\x9a\x26\xed\xa3\xdf\xa0\xd4\x94\x3b\x8d\x52\x29\x9d\x02\x4a\x00\x7b\x95\xdd\x3f\x4f\x5d\x44\x16\x37\x31\x9a\x85\x12\xda\xde\xb4\xe9\x9f\xf8\x23\xfa\x0c\xcd\x6a\x96\xe2\x1e\xfb\xe9\x23\x7f\x1a\xe6\x59\xa9\x6b\x5e\xa6\xee\xda\x4e\x13\x3b\x8f\xb3\xd7\x89\x59\x48\x6a\x14\x0e\xbb\x10\xf5\xd1\xa7\xf5\xcf\xf3\x6d\x46\x0b\xb4\x2d\xeb\x07\x9d\x69\x2d\x2a\x99\x02\xb0\xe2\xef\x60\xeb\xe3\x35\x0f\x70\x92\x78\x8c\xe9\x71\x70\xa0\x02\x9b\x91\x19\x9c\x2c\x98\x9c\xd3\xa9\x26\x50\x6e\xad\x4a\x7c\x7b\x0c\x4d\xa1\x22\xe8\x65\x06\x1c\xe6\xbf\xec\x0c\x3a\x10\xba\xf5\xca\x4b\x0a\xe4\xe4\x0a\x06\x77\xf0\x01\xea\xa4\x4d\xd8\xdf\x78\x55\xca\xf2\xf6\x70\x02\xcb\x87\xee\xa6\xcc\x72\x6a\xcc\x15\x48\x8a\xdf\xbc\x31\x57\x5b\xaf\x76\x35\xc6\x2b\x9a\x44\x20\x85\x22\x50\x32\x61\xdd\x46\x88\x52\x4b\x3f\xa6\x65\x19\xa9\x74\x7b\x69\x66\x7b\x93\xe3\xc8\x37\x50\x07\xde\xa8\xd3\x0f\x9a\x23\x6d\xa3\xd8\xd7\x83\x74\x47\x6e\xd9\x21\x7d\x7c\x67\x7d\xfc\x55\xad\x8f\xf0\x73\xbc\x7d\x76\xf5\x3a\xfb\xb7\xb5\x21\xb2\xc5\x19\x76\x86\xc7\x5f\xdb\xf0\xf8\xdc\xe3\x75\x03\xfa\x45\x0c\x9c\x6d\x0b\xe4\xd3\x1a\x34\x2f\xdd\x75\xbb\x91\xfd\x61\x33\x17\x57\xd1\x2a\x66\x49\x97\xaf\x9a\xe3\xed\xa6\x27\x4c\x4e\xc5\x14\xcb\x43\xd9\xd2\x8d\xfa\x18\xaa\xa5\xae\x56\xa2\xb4\x52\xb4\x2c\x1b\xd5\xe8\x02\xa5\x07\x90\x70\xb1\x0a\xc6\x5f\xd5\x3d\x53\xf3\xda\x68\xd6\x8a\x48\xd2\xdf\xf4\x97\x4e\x0e\x40\x6d\x05\x28\xdd\x5e\xf8\xaa\x02\xb9\x02\xc0\x1c\x39\xa1\x86\xe2\x87\xe6\x36\xbd\xb6\xeb\x81\x87\xe2\xe8\x56\x1d\xd7\x4a\x15\xda\xae\x0d\xfc\xf1\x7f\xb3\x4a\xf1\x3c\xe3\x60\xa3\xbd\x55\xd7\x7b\x86\x77\xde\x6b\xb6\x50\xf7\xe4\xee\xac\xab\x26\xab\x71\x20\x39\xa7\x5a\x05\x0b\xc1\xab\x7a\x26\x38\xc9\x40\x46\x00\xba\x6d\x64\x2e\x18\x62\xfc\x80\x4f\xfa\xa1\x58\xc5\x80\x23\x69\x0d\xdc\x21\x50\xc0\x7e\x6f\xb2\x57\x70\x5d\xff\x40\xd6\x85\xb4\x89\x37\x4b\x9b\xf3\xb2\xd0\x88\xe7\x91\x65\x2a\x43\x6c\x4b\x16\x42\x6a\x70\x95\xfd\x12\x9b\x8f\xfa\xd9\xb9\xb2\x97\x23\xcc\x77\x9d\xe1\x76\xc6\xd5\x6e\xd1\xb5\xb0\xc0\xd7\xf1\xc2\x75\xec\x8d\x86\x68\x74\x4c\x2d\x44\x69\xab\xe0\xc6\x03\x7d\x32\x6b\xcb\xe6\x43\x3a\x4a\xc6\xe9\x3b\x88\xe4\xb5\xd8\xb9\x17\x76\xee\x85\xdf\x94\x2c\xb6\x73\x2f\x7c\x26\x86\xf8\x9d\x7b\x61\xe7\x5e\xd8\xb9\x17\x3e\x1b\x1d\x66\xe7\x5e\xd8\xb9\x17\x76\xee\x85\x9d\x7b\x61\xe7\x5e\xd8\xb9\x17\xba\x46\xc4\x40\x1b\xdc\xf9\x18\xfa\x35\xe5\x2f\xcb\xd1\x10\x0c\x7c\xe7\x6d\xf8\xed\x68\xb8\xbf\xaa\xb7\x21\x34\x1b\xed\x5c\x0e\x3b\x97\xc3\x73\xb8\x1c\x42\x1a\x7b\x2a\xbf\x43\x97\x89\x7f\x4e\xce\x87\x9d\x0d\xfe\xdf\xca\x06\xff\xa9\x16\xa5\x86\xc1\x58\xc2\x3c\x29\x0a\x75\x2f\xf2\xd3\xcb\xb3\xd7\x95\xbc\x43\xf1\xbd\x8f\x3a\xdb\x6d\x93\x99\xdf\xb0\x72\x1d\x3b\xbd\x3c\x63\xd4\x0a\x83\xc3\x35\xe3\xf8\x3a\x95\x0d\x6d\x74\x54\x23\x34\x49\x7e\x90\x05\xa2\x43\x6a\xe9\xdc\x10\x61\x21\xba\x4a\xdc\x4a\x5d\x43\x12\xac\x50\xc3\x30\x63\xca\x71\x96\x0f\x8a\xa9\xef\x5f\x3e\x5f\x5a\x79\xc4\xfa\xf9\xc6\xc9\x05\x34\x8f\xa9\xec\xe7\x86\x95\x63\xaf\x9d\x7d\xef\x15\x64\xdf\xe8\x76\x0e\x64\xbb\xc2\xca\xa5\x27\xe7\x67\xec\x2f\x95\x6a\x56\xa0\x95\x08\x3e\xb8\xf4\xb4\x4e\x9d\xc5\xcf\x1d\x95\xb4\xcc\x90\xb8\xd7\x09\xbd\x2e\x98\x0f\x36\x7a\x60\x46\x83\xfe\xd5\xb7\x25\xa0\x47\xac\xbd\x6d\x1a\x49\x7d\x50\x13\x97\x86\x18\x24\xac\x43\x66\x2a\x8b\x02\x14\xb3\xd2\xa8\x04\x98\x38\xc6\x2e\xaa\x61\xa5\x2b\x85\xd9\x3f\x1a\x8d\x7a\x04\xad\x21\x76\xbc\x32\x5f\xc2\xb4\x28\xb4\x77\x14\xb8\xd9\xbb\x7d\x6e\x7c\x5b\x6f\x5e\xab\xf8\x29\xaf\x17\xe7\xf0\xe1\x44\x0c\xac\x7b\x66\xb7\x2b\x1a\x27\x85\xa2\x46\xab\x02\xa1\xad\x90\x40\x0a\x26\x99\x2b\x41\x89\x38\x30\x37\x00\xbb\xf9\xca\x28\xb4\x15\x97\x05\x14\x15\x2e\xb8\x5e\x50\x1e\x81\xba\x92\xcb\xa5\xc8\x91\xa7\xda\x94\x26\x24\x84\x85\x9f\xa5\x48\x56\xf8\xa8\xf9\x7d\x7a\x5d\x5e\x97\x6f\x3e\xf1\xe5\xaa\x10\xfa\x15\xbb\x39\x9e\x2b\x75\xc3\xee\x41\xc0\x86\xe3\x40\x3f\x4d\xf0\xcf\xe3\x1b\x90\x9e\xf1\xef\x33\x5e\xdd\xc4\x6f\x98\xb1\x06\x6f\xe5\x37\x46\x89\xbd\x39\x16\x75\x06\xad\x7a\xcc\x73\xf9\x0f\x65\x91\xc8\xdb\x04\x53\xd1\xa2\x86\x7b\xaa\x32\x82\x3b\x10\x09\xf6\x1f\xac\x9a\x8e\x8b\xb5\x06\xcb\xae\xca\x62\x6d\xf4\x67\x5e\x14\x6e\x85\xcd\x45\x69\xf3\xfa\xe0\x97\x1f\x9a\x39\x29\x71\x50\x5e\x73\xb1\x54\xe5\xa5\xd8\xa8\x8a\xbd\x7e\x73\x7e\xf1\xe6\xf4\xe4\xea\xcd\x6b\x76\x84\xd6\x89\x5b\x20\x3a\x52\x8a\xcc\x79\x76\xfd\x60\x10\xb2\xf3\x30\x98\x53\xb1\x5a\xd9\xef\x7d\x7d\xec\xda\x19\x19\x5a\x10\x4f\x2e\x04\xd7\x68\x54\xd5\xde\xba\x15\x48\x37\xd3\xa0\xfb\x76\x0e\x2e\xa8\xc5\xdf\x54\x5e\xfb\x62\x39\xb4\x35\xfb\x30\x7c\x1a\x76\x9a\xe0\x13\x6b\x82\x3b\xe5\xeb\x57\xce\x94\xf0\x45\x28\x60\xb1\xff\x46\x27\x2b\x2a\x23\x74\x49\x1b\xb1\x83\xcd\xc4\x82\xdf\x49\x55\xb9\xb3\x16\x9c\xf1\xe7\x9e\xb0\x19\xdd\x11\x2f\xf3\x23\x74\x12\x8d\x31\x61\x3a\x36\x3b\xed\xb0\x59\xa8\x1e\x0d\x25\xe6\xa1\xb3\xe4\xac\x53\x09\x6f\x5b\x73\xbe\x5a\x58\x03\x2d\x25\x4b\x52\x0d\x98\x57\x00\x22\x36\x5b\xa3\x1e\x87\x85\xa3\xe1\x7d\x80\x93\x9d\xab\x55\x53\xf0\xa0\xe4\xbf\xad\xf1\x7f\x21\x78\x7e\x64\xae\x9e\x2f\x6d\x31\xb1\x93\x41\x2d\x7e\xc3\xb5\x07\xfb\x31\xfa\x92\xbc\xb4\xa3\x7e\x64\x5e\x88\x4d\xdf\x70\xf9\x26\x37\xde\xc8\x9d\xd6\xe4\xd6\x9c\xd1\x2d\x85\x90\x26\xb8\x0f\xfd\xdd\xc9\x6b\xc6\x59\x26\x2a\xb0\x1e\xf4\xa6\xa8\x0c\x85\xfd\x1a\xf3\x5d\xd1\x6e\x75\x64\x7e\xa3\xdf\x5e\x55\xbc\xd4\x30\x84\xb4\x42\xfd\xce\xe8\xc0\xa0\x3d\xd3\x7d\x4d\xe3\xad\xdd\x7b\x36\xa3\x9e\x2a\x9d\x27\xb6\x56\x8c\x97\x90\x05\xf9\x69\xd0\x12\x4b\xa1\x35\xbf\x4d\x8c\xee\x04\x7d\xa5\xcc\x79\x87\xa9\xa5\x4d\x93\x62\x6e\xa6\x5c\xd4\x5c\x16\x3a\xf0\x85\xf8\xb1\x6f\xe5\xc0\xbd\x02\x69\x07\x9c\xb8\x98\xf4\x2d\x58\x8f\x7d\x8d\xd6\x82\x81\xae\xfb\xf8\xc6\x65\x94\x1c\xdb\xf5\x3a\x81\x45\x55\x73\x76\x05\xe2\xe8\x5b\x5e\x68\x31\x61\x3f\x62\x3e\xce\x74\xce\xe6\xa4\x87\xe5\x8a\xbc\x2a\x9e\x96\xdc\x27\xb6\x76\x86\x6c\xeb\x3b\xd8\x70\x56\x86\x7c\x08\x51\x43\x14\x40\x32\x55\x14\x22\xb3\x12\x9a\xe7\xa9\x3b\x5f\xc2\x67\x22\x41\xf6\xf8\x12\x4e\x9c\x0b\x21\xbd\x67\xdb\xfb\x0f\x36\x5c\x2c\x3b\x3f\xc2\xce\x8f\xf0\xa4\x7e\x84\x4d\x8a\xf7\x63\xfd\x09\x43\xd2\xcd\x18\xfe\x68\x1a\x5a\x9b\x8f\xcd\x78\x3a\x5a\xa5\x8e\x04\x06\xb1\x5c\x19\xc6\xd3\x65\x94\x4b\x59\x1a\x39\x73\x7d\x09\x78\x96\x1e\xd1\x77\x29\x4b\x48\x35\xe6\x1d\x02\x08\x7f\x41\xbb\x00\x66\xf7\xe4\xac\x14\xf7\xc5\x1a\x71\x2c\x22\x0f\xee\xa4\x95\xca\x03\xfc\x15\x66\xd1\xbe\x97\xf5\xc2\x5c\xdb\xbc\x5c\x9b\xee\xcc\xc1\x21\xff\x09\x64\xbd\xe4\x7a\x21\xcb\xdb\x09\x74\x2f\x6b\xb2\xc5\x05\xa5\x12\xf8\x1d\x97\x05\x82\xa8\x28\xfb\x2a\xf0\xd7\x17\xec\xc0\x7c\xcc\xda\x00\x53\x2f\x30\xae\x99\x56\x50\x13\x00\xd2\xae\x51\xd6\xeb\xc3\x91\x9e\x8a\x4a\xdc\x49\xb3\xab\x7f\x95\xba\x56\xd5\xfa\x9d\x5c\xca\x9e\xfc\xb8\x81\xf3\xa4\xc8\xd9\x02\xdb\x63\x52\x70\x10\xf4\x8c\x2c\x05\x16\xa8\x4a\x15\xc5\x8c\x67\x1f\x6d\x3e\x7f\x0d\x06\x4b\xb8\x1f\xda\x45\x29\x66\xa2\xbe\x17\xa2\x64\xe2\xd3\xaa\x90\x99\xac\xd9\xcf\xa2\x52\x70\x75\x44\x59\x76\xe3\x45\x79\xf9\x62\xe4\xdc\x30\x73\xab\x4a\x18\x8b\x4f\x28\xbf\xf5\x3f\x1b\x51\xad\x99\xba\x13\xd6\x8e\x0a\x50\x79\xc8\x0d\x5b\xf2\x5b\xaf\xc1\x44\x7a\xa0\x33\x45\x32\x59\x32\x55\xe5\x38\xad\x59\x00\xbd\xc9\x21\x61\x30\xe5\xd9\xa3\xb8\x18\xb4\x9e\x53\x79\x04\x55\xb2\x73\x95\x33\x4b\xc5\x49\x36\xf4\xd8\x1a\x0c\xc7\xbf\x83\x3f\x8f\xec\x2a\x8c\xd0\x82\x36\xf1\x20\xd3\xd7\xa5\x5d\x50\x23\xc0\xd9\x13\xd8\x5d\xdc\x32\xaa\xa6\x11\x2b\x0c\x86\x9c\x23\xbb\x36\x1d\x2f\x8c\x21\xf2\x67\x0c\x1e\xe3\x33\x26\x3e\xf1\xac\x2e\xd6\x20\x63\x66\x6a\xb5\x0e\xb2\x6f\x43\x10\x90\xb8\x33\xbb\x08\x65\x04\xa0\x6b\xd8\x1c\x9b\xf0\x96\x86\xb9\xaf\xb1\x81\x5d\x0d\x76\x60\xd4\xfc\xe8\x5d\x39\x67\xa5\x6a\xb5\x92\x3e\x57\x63\x7e\xb8\xf5\x36\x99\xdd\x29\x14\xcf\xf5\xb1\x47\x65\xe9\xe3\x4a\xb8\x2c\xed\xfe\xe7\xdf\xad\x54\x7e\xe4\xd6\x74\x3c\x26\xee\x5c\xe5\x57\xf4\x96\xd5\xf9\x6d\x2f\x7f\x81\x28\x94\x74\x74\x88\x37\xb5\x4e\xd9\x09\xd3\xe6\x8a\x2f\x33\x77\xc6\x23\x29\x83\xfb\xdc\xd4\xb7\xae\x47\xab\x01\x78\x0a\xee\xd5\xfa\xcf\x10\x38\x36\x13\x98\x0c\xb9\x2c\xd6\x2c\x47\x1c\x38\x08\x1b\x36\x21\xf0\xd0\x91\xfe\xee\x5b\x33\x37\x94\x3a\x2e\xeb\x8a\xd7\x22\x55\x49\xe5\xa4\xb4\x01\x6c\x9a\xda\x20\x87\x5a\x15\x3c\x33\x84\x84\xbc\x27\xe6\xe5\x1a\x6d\xff\xa5\xb8\x87\x7f\x8d\x42\x8f\x6d\x10\xea\x7e\x8c\x87\x38\x16\xb2\xd5\xde\xc8\xd1\x97\x6f\xeb\x7b\x63\xaf\xf9\xe8\x3c\x6f\x73\xd7\x3b\xcd\x70\xf8\xb6\x47\x65\xb1\xa7\x9c\x85\x37\x3b\x6d\x73\xf1\xd3\xdb\x1f\x80\x50\xcd\x08\xf2\xa6\x10\xf9\xde\x64\x0f\x49\xf7\xbd\xd4\x3a\xf8\x91\x0c\x7b\x7d\xad\x41\x50\x48\x41\x09\x8a\x02\x2e\xc5\x9e\x38\x1a\x8c\x9e\x51\x73\xb6\xe0\x7a\xc1\x5c\x6b\xed\xb4\xed\xc0\xfb\x10\x73\xb5\x00\x9c\xd9\x68\x8b\x6f\xb4\xd1\x11\xa4\x35\x42\x5f\x8c\xdf\x29\x99\x03\xc2\x73\x29\xb2\x05\x2f\xa5\x5e\xa2\x0b\x4b\xd6\xac\x14\x02\x7d\x7e\xc4\x1f\x9d\xc3\xd3\x7e\xbf\x14\xf7\x46\x25\xf3\x70\xd7\x0b\xba\xe5\x47\x5e\x9c\x9b\x0a\x6a\x5d\xc4\xbb\x49\xda\x9f\x17\x47\x30\x50\x02\x23\x2c\x5b\x86\xa1\x7d\x1d\x6d\xbe\x78\x2e\xb5\xca\x9b\xb6\xda\x39\x5e\x57\xe6\x66\x38\x5a\x8a\xea\x56\x1c\x7d\x14\x6b\xc2\x74\xee\x25\x5b\x69\xc7\x64\xf6\xe0\x05\x58\x98\x34\xf5\x0d\xc8\x4b\xe6\x4a\x09\x64\x8b\xaa\x29\x01\x15\xe3\x8a\xa5\xbd\xb4\xf4\x6f\xee\x33\x23\xfc\x98\x56\xe0\xd9\xd4\x54\x76\xa5\x29\x43\x31\x64\xa5\xf2\x27\xba\x8a\xb0\x43\x2d\xea\xe3\xb1\xb1\x5b\xc9\xf3\x94\x9c\x7f\xad\x6a\x5e\xa4\x57\x21\x10\x9e\x69\x2d\xe2\xd9\xb1\x03\xcc\x0a\x6c\xab\x03\x51\xa9\x0b\x10\x02\xd2\x6f\x3c\xd5\xdd\xbc\xed\x82\xe0\xf4\x4e\x2c\xf5\x6f\x41\x09\x83\x6b\x00\x35\x52\xf8\x9d\x40\xd3\x1a\x79\x2b\xe9\xda\x0d\x9a\x39\x6a\x2a\x43\xa5\xe0\x00\xb5\x12\xc3\x10\x1c\x99\x99\x6b\x7c\xda\x52\x8f\x0e\xb7\x99\x66\xc4\x5c\x1f\x46\xf3\xf1\xe0\x31\xa8\xc5\xd6\xce\xf8\x2c\x29\x3e\xbc\x28\x7e\xdd\xcd\x6d\x17\x33\x1a\x1e\xf5\x8f\x25\x7f\x56\xc2\x2c\xc9\xe8\xfb\x6b\x50\xa4\x8d\xc7\xdb\x24\xe4\x82\xa6\xaf\x20\x9d\x75\x66\x2e\x9d\x50\x7c\xa5\xd7\xbb\x0a\x5e\x70\x47\x6f\x25\x93\x3e\x9a\x29\x86\xc7\xc4\x66\x38\xf0\xab\x3a\x66\x55\x1e\x61\x1d\xf2\x57\xe6\x16\xa2\xe0\x8f\x1d\x61\xdc\x8b\x84\x03\x05\xc9\x8c\x9c\x53\xde\x62\x07\x09\x19\x03\x1f\x5b\x51\x1e\xc1\x17\x6c\xc5\x2b\xbe\xd4\x53\x76\x8e\xf2\x87\x03\xb1\x40\x28\xc6\x9f\xd8\xb5\x7d\x0d\x7b\xbd\xde\x7b\xa0\x20\x1f\xf5\x12\x98\x6a\x87\x7c\x16\x01\x09\xe1\xb8\xc1\x5a\x6a\xce\x51\x67\x64\xe6\xc4\x5f\xef\xfd\x50\xbe\x16\x85\x80\x91\x86\x25\x77\xec\xcf\xdb\x47\x7f\x24\xf6\xaa\x67\x32\x23\x36\x59\xac\x0a\xb5\x5e\x0e\xe4\x48\x18\x83\xd8\x71\x1d\x0d\x41\x76\x5c\xc3\x2d\x31\x3b\xfe\x03\x88\x91\x33\x5f\xc9\x0a\x6e\x4e\xfa\x9d\xb5\x53\xe3\xcb\xe7\x46\xd9\x33\x6c\x29\x08\xdc\xdb\x81\x77\x76\xe0\x9d\xdf\xb6\xc7\x83\x56\xe7\x39\x8a\x9c\xa4\x21\x35\x97\x6d\xcb\x7e\xdd\x8b\xb1\x11\xc1\xf1\x7d\xa8\xe1\xc5\x75\x30\x04\x7a\x79\xef\x65\x81\x62\xed\x45\x80\xb8\xe0\xf3\x53\x8e\xe7\xe1\xb8\x91\x78\x4e\xe3\x99\xf5\x73\x22\x47\xdc\x47\xc6\x41\x47\xba\xcd\xfb\xb1\x23\xb9\xe7\xe1\xff\xbe\xe0\x11\x33\x50\xbc\xa8\xd3\x83\xbc\xb2\x21\x29\x34\x50\xa8\x00\x69\x47\x7a\xcf\x5d\x5e\xac\x1d\x94\xe5\x73\x82\xb2\x04\xa4\xfd\xab\x62\x59\xdc\x30\x06\xc1\x2c\x51\xcb\x38\xac\xd2\x3f\xdb\xe1\x58\x3e\x13\x61\xaa\x07\xc7\x72\x66\x63\x62\xeb\xa0\xc0\x58\x7a\xfb\x9e\xc4\xf6\xea\xd5\x85\x1d\xa6\xe5\xdf\xa2\x0e\xd0\x66\x9d\xf1\x19\xc0\x26\xae\xf3\x0b\xc2\x17\x8c\x53\x4c\x43\x05\xd1\xbe\xc9\x74\xad\x6c\x88\x54\x18\xdd\x6a\xf9\x17\x58\x20\x6d\xdb\x50\x3a\x19\x15\x2f\x38\xd9\xb3\xef\x5e\xa9\x1d\x03\xdc\x69\x93\x5f\x10\xaf\x49\x47\xb6\x5e\x10\x85\xbf\x42\x13\x8f\x8f\xc5\x83\xe9\x7e\xa0\x50\xcb\x9e\x73\x12\xc8\x78\xfe\x54\xa4\xe3\x11\xd0\xcc\xe7\xe2\x10\xbc\xe0\xe4\x10\x45\x0f\xb7\xe8\x99\xd7\x4f\xe1\x03\x81\xc9\xf6\xc4\x6c\x06\xef\x71\x74\x42\x41\x7d\xdf\xc0\xc6\xbe\x92\x65\xd6\x08\xff\xc1\x10\x13\x7c\x81\xe7\x28\xec\xf1\xe2\x3c\x62\x00\x1d\xc1\xef\x41\x46\xbd\x60\x3e\xdb\xf0\xce\x41\xa4\x5e\xd4\xb2\x17\xaa\x37\x5e\xa1\x7f\x26\x10\xdf\xfb\x07\x00\xf8\xbe\x08\xd8\xde\xc8\xaa\xef\xbc\xd1\x29\x17\xc3\x59\xa7\xa0\x6b\x78\x8c\xa4\x66\xf8\x22\xf0\x74\x18\x1d\x31\xa3\x55\xa5\x32\xa1\x75\xe0\x0f\x89\xb4\x96\xae\x3f\xc4\xc5\x83\xc2\xce\xdd\x56\x42\xeb\xd7\x82\xe7\x85\x2c\xc5\x66\xe0\x25\xd5\x78\x05\x15\x56\x96\xd1\xae\x45\x66\x80\x5a\xb1\x25\xff\x08\x23\x83\xde\x6d\xaa\x03\x5c\xab\x60\x45\x71\x4f\x30\x9b\xad\x4d\x44\x9d\x18\x3b\x01\xca\x30\x11\x85\xa0\x5a\xed\x66\xce\xf4\x6a\xf0\x16\x9a\x88\x79\xa8\x5c\x63\x6c\xf0\x79\x6b\xa6\x6f\x3e\x65\x42\xe4\x90\x44\x17\x34\x54\xbb\xdf\xba\xa9\xe6\x3c\xf3\x59\x9e\x82\x01\xa1\x32\x3a\x65\x1f\x54\x4d\x60\x35\x37\xc1\x70\x3f\x84\xae\xe5\x12\x3d\x40\x1e\x2a\x05\x6b\xc6\x93\x1b\xea\xa1\x96\x36\x2c\x18\xd7\x9a\x6e\x3d\x43\xd9\x86\x74\xd8\x01\xa4\xea\xf8\xfa\xe5\xb7\xff\xf5\xed\xef\xbf\xf9\xee\xdb\xff\x3a\x34\xfb\x4d\x00\x45\x57\xd5\x5e\xf0\x52\xb3\xeb\x3d\xa8\x01\x8c\x13\x45\x5f\xca\x28\x34\x29\xd8\xd5\x13\x9b\xff\xc1\x1d\x54\xcb\x37\x00\x6b\xf5\x5c\x10\xd1\x67\x46\xbf\x86\x89\xff\x7e\x21\x04\xec\xd3\x6f\x30\x8e\x1a\x3c\xb5\x45\xd1\x9e\xd6\xf8\x2d\xdf\x70\xab\x87\x52\x78\x70\xc3\xb7\xaf\x77\xc3\xfc\xc8\xe3\x07\x12\xb7\x11\x94\xfe\x66\x79\x67\x21\x20\xb9\x25\x9f\x9b\xc5\x73\x42\xb9\xe9\x40\x95\xa3\x72\xc3\x8e\x12\x08\xfa\xa1\xc2\x00\x94\xf3\x80\x50\x9b\x72\x61\xca\xde\x58\x30\x61\x48\x0c\xf7\x0b\xa5\x05\x82\x0a\x01\xc4\x03\xaf\x59\xb6\x2a\xb5\x63\x11\x90\x7a\xd1\xc8\xf7\x7c\x3e\x8f\x5b\xe4\xdb\xd8\x9f\xb7\x01\xec\xea\x5e\xd0\xe4\x55\x9b\x47\x79\xe4\x64\xa3\x45\x12\x40\x19\xc3\x26\xcd\x4c\xa6\x83\x28\x2a\xa4\xb7\xff\x16\xeb\x87\xc6\x63\x06\x56\x6e\x0b\xae\xdc\x84\x43\xb6\x70\xca\x2e\x02\x59\xa7\x21\xc8\x8f\x81\xdd\x3e\x17\xca\xb3\x3b\xe7\xa1\x57\x5a\xc4\xfd\x5c\x78\xd0\xb6\xcb\x61\x9c\x50\x89\x36\x57\x12\x2b\x97\xdb\xfb\x63\x06\x3c\xb5\x56\xba\xba\xe8\xbd\x87\xae\x5a\x00\x0c\x2f\x90\x01\x5d\xa4\x50\x2a\x6d\x80\x0a\xab\x79\x75\x2b\xfa\xcf\xec\x28\x80\xe5\x63\x11\xa6\x81\xb3\xfc\x2a\xfa\xf7\x2f\x8c\x31\xf5\xcc\xef\x57\xc1\x96\xfa\x95\x7f\x6e\x70\x69\xc2\xfb\xf5\xd4\xe8\xd2\xb1\x98\xa6\x4d\x38\xa6\x01\xb9\x7d\x13\x8e\x09\x48\x7f\xfc\xc9\xc1\x93\x82\xdc\xf4\xd1\x07\xa2\x5f\x70\x6c\x7f\xb6\x54\xe5\x51\x2d\xaa\xa5\x2c\xad\x52\xb7\xf1\xfb\xec\xa0\x5e\x08\x59\xd9\xc0\x1b\x6f\xb6\xb0\x37\xfa\xd8\x40\xa9\xa6\x7c\x00\x77\x09\x5e\x1a\x5e\x29\x27\xe2\xd5\x09\xa0\x58\x1c\x9e\xa4\x6b\x73\x75\x39\x73\xa5\x3d\x93\xb1\xfe\x04\x18\xbd\x97\x2f\x5e\xfc\x47\x70\x82\x32\xbe\xe2\x99\xac\xd7\xc0\x35\xd6\x60\xcf\x12\xb2\x5e\x88\x0a\xb4\xc0\xe8\x1b\x16\x8b\x36\x6b\x6a\x90\x45\xd7\x22\x3a\x8a\x61\xc4\x14\x0e\x87\x30\x81\x46\x81\x11\x65\x78\xa9\x8e\x59\x5d\x34\xab\x8c\x5f\xd9\x6d\xc9\x00\xc6\x09\x23\x0c\x6d\x17\x56\x78\x40\x24\xe2\x33\x61\xec\x12\x9c\x63\xbb\xfb\x35\x85\xaf\xeb\xbf\x61\x49\x78\xf3\x42\x0f\x54\x50\x1a\x2d\xc3\xfd\x82\xc0\xbd\xee\xa8\xaf\x10\xca\x17\xa1\xd6\x9e\x04\xc6\x17\xb8\xa7\xc6\x3b\x6c\x43\x00\x9f\x40\x7a\xb6\xd8\xbd\x36\xd4\x30\x04\xf0\x75\x46\xff\xc4\x28\x3e\x3f\x97\x61\x32\x7a\x7b\x09\x79\xdb\xec\xfa\xfe\xb0\x72\x37\x6f\x1f\x29\xa5\xdf\x88\xfc\x11\x5e\x41\x30\x4b\x66\x74\x55\x45\xad\x1a\x82\x6f\x07\x42\x83\x6d\xdc\xcd\x38\xd7\xf3\xa5\x47\x26\x9e\xab\x20\xa9\x7e\x77\x5e\xf8\x3b\xa6\x84\x5b\x08\x97\xd1\x90\x7e\x56\x73\x36\x27\xf0\xa2\x9e\x32\x76\x36\x67\x6b\xd5\x50\xee\xb6\x42\x7e\x04\x25\x68\xae\xaa\x4c\xf8\x34\x89\xb6\xbd\xe9\xae\x04\xf0\x7a\xb1\xf6\x4f\xa1\x5f\x3c\x5d\xb0\x0a\x1c\xeb\x3f\x55\x35\xac\x97\x28\xf3\x29\xbb\x08\xd9\xf7\xfb\x46\xd7\x17\x4d\x79\xf2\xd4\x8e\xd9\xb3\xd7\x17\x66\x24\xe0\x95\xad\x9a\x14\x10\xdc\xfc\xea\x0c\xbd\x6e\x67\x9d\x7e\x94\xcb\x0c\x70\x3a\x50\x45\x8a\xb6\x0c\x8a\xb0\x69\x6f\xe0\xba\x14\x59\x53\xc9\x7a\x7d\xaa\xca\x5a\x7c\x4a\x59\xff\xb7\xa7\x79\x3b\xf0\x61\x1a\xff\xeb\xd5\xd5\xf9\x59\x09\x46\xb4\xa1\x24\x8c\xad\xa6\x8c\x6b\xad\x32\x09\x06\x53\x8e\xd9\x00\xc9\xd4\x67\x14\x28\xd8\xa4\xb3\x32\x53\x4b\x60\x69\x55\x91\xc8\xa7\x07\xf4\x34\x57\xd5\x3d\xaf\x72\x24\x7d\xf3\xc4\xbe\x3d\x60\xff\xa6\x66\x5d\xf3\xb7\x7d\xd0\x19\xff\xf7\xf8\x20\x3a\x8d\x95\x4d\xe2\x9e\x33\x23\x0b\xca\x2c\x74\x47\x29\xb2\xf9\x10\x04\x67\x3e\x97\x99\x53\x7b\xc3\x61\x3f\x90\xc9\xd2\x5a\xd2\xb0\xd0\x32\x8d\x3b\x10\x8f\x1b\x16\x5b\xd2\xfa\x89\x9c\xf1\x5b\x6e\x0e\xb4\x5f\x46\x74\x5d\x4a\xbb\xd8\xe4\x33\x9b\xb2\x53\x14\xe9\xcd\x7d\x81\x61\xa4\x36\x29\xb1\x2f\x3b\xc0\x72\xa9\xed\x69\x76\x0e\x39\xef\xf6\xe2\x05\xbb\x86\x51\x5d\xef\x99\x8b\x08\xab\xb8\xb1\x1f\x2f\xde\x19\x6d\x88\xb2\x61\x1a\x81\xe1\xe2\xed\x29\xfb\xe6\x0f\xbf\xff\x6e\xca\xcc\x60\xc9\xcb\x35\x13\xb7\xd2\x99\x7f\xf7\x8f\xf7\xa7\xec\x6f\xe6\xb0\x37\xa5\x33\xcc\x4d\xc0\x78\xb6\x82\x57\xe0\xeb\xed\x39\x68\x8a\x27\x87\x89\x27\xfd\x62\xe6\xe5\xab\xe4\x95\x74\x4e\x4f\x58\x2e\x50\xd6\x71\x3e\xeb\x5a\x54\xab\x4a\xd4\x91\x43\x06\x16\xd9\x52\x28\x4e\x03\x5e\xa6\xe8\xdb\x20\x58\x63\xae\xcc\x7a\x39\xaf\xa8\x7e\xc5\xbe\x62\x6f\x3e\xf1\xac\x7e\xc5\xde\x07\xb1\xd3\x66\x91\x60\x77\x28\x00\x7b\xca\xbe\x62\x98\x40\xd2\xb7\x9b\x71\x8d\x95\x18\xb9\x6f\x4e\x19\x35\xf5\xaa\x90\xb5\x59\x5a\x58\xb8\xf7\xf6\xe8\x48\x7d\x5d\x32\xb0\xde\xe1\x6b\xf8\x05\x2c\xa9\x62\x5a\xbb\xbf\x72\x2d\xf5\x94\x9d\xc4\x0d\x80\xda\xad\x94\x6c\x3a\xb2\xd8\x16\x12\xf0\x89\x23\xc1\x3b\x6e\x00\xe6\x97\xfd\xe3\x7d\xa6\x85\x11\x45\x6a\x55\x99\x6e\x69\x7f\xc0\x3a\x6b\x3a\x42\xd5\x00\xec\x7b\x30\x09\x23\xa1\x60\x74\x38\xf0\x3b\x5e\xda\x31\x1c\xdd\x4b\x2d\xec\x24\x8d\x68\x4e\xcb\x6a\x3a\xb1\x9d\x42\x06\xd1\xc0\xca\x2f\xe7\x3e\xa3\xb4\x9d\x0a\x6d\xc6\x8a\xce\x06\x67\xba\x99\x21\x55\x98\x9e\x54\xe2\x0d\x59\x46\x1f\x98\x90\x37\x04\x92\x8b\xd2\xf8\x0f\xa0\xd4\x87\xcd\x42\xea\xe6\x25\xb4\xfb\xed\x78\xc6\x7f\xc6\xc0\x2b\x97\x45\x15\x5f\xb5\x0d\x66\xfc\xe7\xc3\xe9\x75\xf9\x15\x3b\x8b\xea\x65\x5a\x54\xef\x2b\x76\x36\x4c\x7e\xae\x5e\xa8\x19\x81\x79\x4a\x9c\xe2\xb4\xe0\x5a\x4f\x5b\x3d\x6b\x20\xd1\xba\x82\x24\xdb\x46\x6e\x07\x3b\x05\x6d\x96\x70\x84\x0c\xab\x52\x51\x3b\x33\xf3\xdc\x9c\xf0\x0c\xea\x2c\xd6\x8a\xd9\xd4\xa6\x15\x92\x32\xae\x2b\xf8\xbb\xa7\xd7\x65\xfb\x83\x98\xe6\xd4\xa3\x3d\x6c\x1e\x59\x7b\x98\xe9\xc5\xc8\xa9\x90\x5e\x8e\xa7\xb9\xec\x62\x3e\xba\xd5\x9d\x77\xd1\x14\xe2\x27\x73\x8c\x47\x5e\x7c\xae\x7d\x0c\xed\x5b\xd4\xf5\xca\x29\xc5\x1a\xdd\x15\x54\x16\x92\xae\x23\x0d\x58\x05\x80\x3b\x60\x5a\x5c\x84\x28\xbc\x3a\x3e\xbe\x6e\x5e\xbc\xf8\x26\x5b\x28\x5d\xc3\xdf\x04\xfd\x00\x5c\x17\x7e\xf8\x33\xfe\xa0\x05\xaf\xb2\x85\xe1\xc2\xf8\x33\x3b\xa2\x3f\xe9\x0b\x0c\x2b\x6a\xe2\xff\x4d\x33\x67\x05\x6c\xaa\x02\x63\x40\xf5\x4a\x95\xb0\x63\x96\x5f\x4f\x2c\x14\x86\x20\x1c\xf6\x76\xb3\xa2\x28\xd2\xb6\xbd\x70\xe0\x40\x63\xaa\x7a\xf4\x28\xb8\x33\x66\xf8\x83\x11\xcd\xc8\xcf\x08\x6c\x12\x2a\xbf\xed\xff\x79\xdf\x10\xd5\xfe\xef\xf6\x87\xee\x73\xb8\x05\xba\xb7\x39\xfe\x9c\xc0\xd1\xc6\x39\xc2\xf0\x0e\xa1\x04\x16\xab\x10\x36\xe2\x37\xe0\x69\x65\xc3\xb6\xe0\xf4\x10\x2c\x42\xbb\x8f\x11\xa4\xab\x74\x7d\xae\xaa\x1a\xc5\xbb\x4d\x34\x1b\x36\x74\x22\x0f\x27\xd1\xda\x90\x2c\xe4\x6a\x56\x55\xfd\x90\x54\xd9\x51\xae\xec\x99\xb2\x72\x7a\x28\xa2\x0f\xa5\xcc\x8e\x07\xf8\xa8\x6c\xe7\x4b\x59\xee\x4d\xf6\x96\xfc\x53\x02\x0b\xc1\x13\x29\xb4\x97\xdc\xe5\xce\x36\x03\xa5\x53\x02\x2b\x33\x61\x10\x3c\xad\xe5\xdd\xd8\x6a\x05\xe6\xe3\xdd\x2f\xc8\xd2\x6b\x05\x24\x37\x3d\xf8\x1b\x0f\xcc\x1a\x6d\x75\x80\x0d\x44\x42\x4d\xd8\xaa\x52\x77\x32\x07\xfa\x58\xca\xf2\xd8\xac\x0f\xca\x94\x91\xa2\x67\x7e\x3b\x7b\xad\xbb\x5b\x69\xbb\xf9\x12\x37\x11\xad\xb7\xcf\xbb\x89\xe6\x1b\x0f\xdd\xc4\xf3\xef\x0b\x35\x16\xad\xc9\x5e\x4e\xff\xd0\x1b\x4a\x48\x3d\x75\xe3\x08\x4b\x51\x53\x22\xa4\xe3\xbb\x97\xc7\xd4\x6c\xea\xda\x7b\x53\x18\x87\x5b\x45\x66\x4d\xc1\x2b\x76\x7a\xf6\xfa\x82\x1d\xbc\xf9\x34\x65\xd7\x7b\x2f\xff\xf0\xf5\xf4\xe5\x77\xbf\x9f\xbe\x9c\xbe\x3c\xfe\xfa\xdb\xeb\xbd\xc9\xf5\xde\xd7\x2f\x5e\xbc\x7c\x95\xcf\xfe\xf0\xea\xd5\xf1\x77\xdf\x5e\xef\x1d\xa6\x8a\x21\x38\x7f\xa2\x55\x6c\x80\xe5\x7c\xc0\xe1\x9c\x03\x19\x19\x39\x61\x1f\x52\x15\x59\xef\x1a\x7a\x6c\xc4\xa7\x4c\xac\x6a\x26\xca\xba\x0a\x8d\x75\x66\x50\x71\x20\x36\x41\x42\x30\x23\x82\xc8\x41\x1b\xb1\x25\x4b\x8c\xee\x3e\x98\x31\x45\xe6\x89\x32\x0a\xf0\x6b\xd7\xef\x64\x96\x24\x44\x4d\x76\xf0\x92\x67\xe7\x0c\x17\xf5\x27\x5e\xc8\xdc\x4a\x02\x28\x50\x75\x97\x11\x8d\x65\xad\x95\x4c\xe9\x40\xb8\x1a\xdd\x01\xbd\xc1\x55\xc2\x21\x15\x46\xb7\x55\xf3\xf1\x6b\xc4\xcb\xa7\x18\x2f\xa3\x41\x50\x55\x4d\x7b\xcb\x20\x1e\x56\xe4\x24\xdb\xaf\xa1\x4b\xd5\xd4\x5a\xe6\x28\x3e\xc0\x62\xc2\x49\xdb\x70\x6d\x0f\xa3\x01\xc7\x1d\x32\xbc\x82\x37\x72\x4a\x6c\x92\x4a\x4f\x6a\xc8\xc8\x5a\xfe\x01\xc0\x22\xcb\x99\x6a\x4a\x00\x0d\x97\xd8\x8c\x70\x2e\x9c\x6c\x09\xd6\xc2\x10\xa9\xd0\x81\xd9\xe4\xa4\xb4\x12\xbf\x55\x3f\x6d\x06\x7d\x3c\x38\xb7\xf2\x4e\x58\x73\x85\x66\x66\x42\x55\x69\x04\xf9\x23\xf8\x04\x78\x18\x9a\xaa\xd0\x13\x56\x28\x9e\xb3\x19\x2f\xc0\x4d\x49\x16\x8c\x09\x73\x96\x7f\x76\x79\xf9\x6e\xc2\xd4\x7c\x2e\x2a\x74\x4f\xa2\x3e\x7a\x27\xab\xba\xe1\x05\x48\x08\x86\x72\x45\x9d\x4d\xd9\x88\x60\xe5\x60\x8d\xfa\x38\x8c\x85\xe2\xd2\xca\xdb\x57\xb6\x8a\x59\xde\x85\x1c\xef\x40\xe2\x5f\x2e\x48\xfc\xdf\xbb\x5e\x40\x88\x8b\xb6\x6e\x44\x17\xc9\x1a\x58\x3a\xbe\x8c\x1c\xf7\x34\xd8\xa1\xc8\xe9\x18\xb7\x13\xe1\x2c\xbe\xe8\x69\x3f\x38\x40\x3b\x5c\xb7\x91\x77\xf3\x33\x86\x66\xb7\xcc\x47\xc3\x42\x80\xf7\x23\x38\xc9\xb8\x28\x82\x4b\x1d\xe1\xd8\xe6\x92\x2e\x9d\x53\xc1\xb0\x78\xa3\x6c\x8f\x70\xc1\x11\xa7\x4c\x01\x7c\x88\x87\xca\xa0\x18\xf7\x85\x98\x07\xb1\xd4\xec\xbf\x1d\x54\xc6\xb3\x5c\xb2\xea\x9a\x1b\x5e\xaf\x78\xd6\x26\x3a\x77\x9d\x9d\xcd\x83\x77\x82\xd4\x9d\x13\x3b\x0b\x08\x56\x31\x33\xa1\x7f\x1b\xf5\x1d\x4d\xfd\xc4\x71\x3d\xe2\x76\x0b\x34\xe0\xd5\x7a\x25\xf2\x77\x2a\xe3\x45\xa2\x44\x75\xf0\xe5\xde\x54\x09\xa2\x5b\xb5\xac\xeb\xd6\xe9\xab\xaf\x6c\xe7\x31\xd4\x3b\x18\x38\x37\xf6\xbe\x15\xe7\x6c\x6a\x59\x4c\x0d\xb5\xd4\xd5\xf4\xac\xac\x7f\xa8\x2e\xb7\xab\x51\xdc\xbf\x68\xfd\x47\xc4\x7c\xf3\x38\xf1\xcd\xd1\x47\x64\x28\xf8\x39\x68\x96\x12\x94\x2d\x93\xdb\xc5\x3e\x7f\x16\x52\xdd\x36\xb1\xcf\xdd\xad\x7b\x12\xf7\x3a\xe9\x5d\xbb\xa0\xe7\x9d\x8c\xf9\xfc\x01\xd6\x96\xda\x9e\x3e\xba\x3a\xf0\x0d\x8d\x60\x8f\xa6\x59\x3b\xad\x2f\xda\x10\x96\x7c\xb5\x0a\xf1\x11\x9a\x35\x65\x2e\x2a\x9f\x44\x5a\xe4\x68\xb6\x27\xc6\x53\x09\xca\x19\x4d\x02\x89\x35\x09\x04\xc0\x8b\xc8\x8f\x8e\x2e\x19\x61\xce\x10\xbc\x87\x82\x0a\xf4\x08\x26\xb8\x09\xa2\x71\x2a\xd5\xd4\x1d\x38\x86\x47\x7b\xe4\x1e\x98\xe3\x1c\x96\x6d\xef\xd8\xb0\x98\x63\xbe\x9a\xf6\x5a\x58\xde\x33\x6f\x8a\x62\xcd\xfe\xd9\xf0\x02\x67\x9e\xab\x25\x97\xa5\xbb\xe6\xb9\x35\x2b\xc0\x04\x26\xbd\x80\x04\x72\x23\x87\x7e\xfb\x5c\xdc\x49\x1e\xe0\xa5\xcc\xd3\x6b\x18\x51\x00\x73\x40\x1f\xfe\x59\xd8\xaf\x2c\x5d\xbf\xaf\xd8\xcb\x29\x3b\x3b\xd7\x2e\xff\x26\xd9\x35\x43\xd0\x05\x2f\x3b\xeb\x02\xf6\x1c\x40\xf0\x71\x40\x3c\xa1\x8b\xd7\xda\x06\x2d\x20\xc8\x28\x49\xce\xbf\x0d\xca\x82\xe5\xbf\xd7\xe5\xd7\x68\x00\xbd\x79\x75\xc3\x72\x51\xc8\xa5\xac\xb1\x6e\xab\x19\x43\x25\x0c\x9d\x00\x45\x88\x8c\x37\x5a\x90\x7f\xa7\x3d\xc6\xeb\xf2\xba\x66\xc1\x40\x43\xf9\xc6\x0f\xda\xf4\x2a\x97\x18\x58\x55\xac\xd9\xab\xdf\xbf\x00\x82\x01\x57\x27\x2f\x73\xec\xe4\xd5\xb7\xdf\x7e\xe3\x7e\x36\xe3\xfb\x9e\x9c\x41\x5a\x00\x9b\xcd\x16\xe0\x19\xa0\x99\xcd\x1b\xc3\x1d\xfa\xc8\x33\x85\x6f\x01\xe2\x0c\xbc\x8a\x1d\x42\x33\x52\xab\x6b\x28\x75\x8c\x2e\x09\xa5\x5c\xa0\x6a\x14\xd5\x2d\x96\xc7\xc1\x2f\x82\x30\x5d\x91\x77\xbf\x71\x5d\x5e\x97\x40\x99\x99\x45\x34\xae\x2a\x91\x49\x2d\xae\xf7\x08\x21\x04\x57\x54\x48\xa0\x36\x34\x16\xa0\x43\x64\x6f\x03\xd2\x53\x75\x97\x78\x09\x77\x70\xbd\x37\x57\x6a\x3a\xe3\xd5\x34\x53\xcb\xeb\xbd\x43\xb4\xa7\xde\xcb\x22\xcf\x78\x95\x5f\xef\x4d\xfa\x3e\x86\x68\x0a\x7b\x30\x1d\x8a\xce\xbe\x49\xe5\x1a\xec\x47\xbe\x9a\x9a\xcf\xe0\x27\x90\x98\x5c\x43\x87\x0b\x62\xfb\x5f\xed\xa3\x64\xcf\x57\x2b\xc1\x2b\x73\xa4\x64\xad\x45\x31\x37\xe7\xc1\xbb\x77\x5f\x7f\xb8\xa4\xde\x51\xda\x41\xb0\x04\x12\xb8\x1d\x06\x3c\x9f\xb2\xff\x55\x8d\x59\x3f\x43\x87\x80\x24\xe6\xed\xf1\xf9\x4f\xe0\x48\x61\xc5\xff\xf4\x27\x33\x62\x18\xe9\x85\xa5\x15\x6b\x43\x4e\xd1\x0b\xbc\x84\xf1\x1a\x96\xe6\xdc\xb1\xbf\xe7\x6b\x3c\xb6\x73\x66\xf9\x0c\xed\xe3\x84\xd8\x29\xa2\x43\x7c\x05\x04\x72\x12\x58\x00\x0a\x90\x3e\x6c\xd8\x42\xf0\x1c\xcf\x9d\x30\x0c\xca\xf0\x4a\xd3\xe5\x94\x7d\x1d\x75\xef\xe7\x48\xac\xf5\xc1\x9f\xa9\x95\xff\x12\x50\x6b\x33\x9f\xcb\x4f\xec\xa0\x12\x4b\x75\x67\xef\x0c\xdc\x13\x58\xcd\x43\xcb\x40\xdc\x22\xb7\xbc\x1d\x5e\x5a\x30\x9f\x7b\xbc\x0f\xdc\x03\x29\x1e\xe7\x07\xf7\xfd\x6c\x75\xef\x0e\x62\x38\x3a\x9c\x38\x2a\xde\x0d\xcb\x6f\xd4\x68\xc4\xa1\x12\x41\x75\xd0\x68\x8e\xdb\x58\xd8\xa7\xe6\xb5\xd4\x9e\xd7\x04\xa8\xa8\xf8\x12\xf5\xcc\xc5\x19\xf9\x3d\xfb\x5d\xca\x4f\xc0\x1a\xe4\x1c\x74\xb8\x1a\xe1\x33\xde\xb5\x20\x4b\x7f\x98\x42\x1b\xbb\x43\xee\x4d\x98\x56\x51\x9d\x8f\x0e\x52\x8d\xf0\x78\xe3\xea\xed\x7e\xf1\x04\x31\x94\xa7\x21\x68\xd6\x0a\x6f\xb4\xcb\x0b\xa8\x19\x0d\x81\xef\x50\x0b\xdb\x1c\xbf\x4f\x52\x8f\x58\xbc\x5e\xf4\xe9\x89\x8d\x24\x76\x12\x55\xc6\x57\x18\x0d\x32\x27\xc9\x2d\xba\x11\xb1\xfc\x8b\x2a\xf7\x2d\xc2\x8c\x97\x6b\x3c\xc4\xec\xc4\x06\xd7\xd1\x5e\xef\x53\x8f\x08\xb5\x01\xa2\xd9\xf7\x5b\xde\x8a\x82\x26\xe6\xa8\x09\x76\x8e\x2c\x05\x1d\x57\xa0\xf1\x29\x9e\x93\xc7\xa8\x0a\xa3\xe1\x54\x65\xc7\x6f\x46\x59\xa8\x5b\x99\x01\xf4\x0b\x7a\x37\xdc\xfe\xb6\x50\x33\x5e\xd8\x46\x4f\x06\x89\x95\x01\xf4\x2d\x6d\x05\x3a\x6b\xb5\x48\x55\xb1\x0f\xdb\xb0\xac\x68\x34\xc4\x43\x93\xbe\x88\x97\x60\x20\xdf\x46\xad\xad\x41\x01\xef\xde\x76\x4e\x04\x69\x61\x6d\x74\xfe\x7d\x8f\x68\x66\x28\x78\x26\xac\xb9\xdb\xb9\xc4\x6e\xe2\xcc\xeb\x34\xc5\x69\x66\xbe\x77\x13\xa4\x4d\x99\xb2\xb7\xaa\x02\x72\xb9\xe7\x55\xae\x59\xa6\x96\x2b\x5e\xcb\x99\x2c\x64\xbd\x9e\x60\xb4\x21\xfa\x1d\xdd\x2b\x14\xe4\x0e\xe0\x46\x4b\x01\x68\x89\x34\x5f\x17\x39\x14\xaa\x81\x92\x4d\x3e\xb2\xd1\x85\x97\xdb\x99\x41\x60\xd3\x52\xd6\xe6\xfe\xe2\x15\xc4\x31\xd1\xd5\x44\x91\x90\x46\x1d\xf0\x9f\x84\xeb\xdc\x73\x2f\x6b\xdb\x68\xa3\x06\xad\xf1\xe5\xe4\xfc\xcc\xda\x56\xe4\x6d\x69\x04\x3b\x5a\x6f\xa1\x7d\x46\x11\x06\x8b\x11\x12\xaf\x77\x8a\xe2\xbe\x38\x6d\x9f\x8a\xeb\x2e\x79\xf5\x51\xe4\x24\xae\x87\x11\xfb\x24\xb4\x59\x48\x9b\x16\x35\x84\x3e\xe2\x59\x44\x7b\x02\x86\x80\xf9\xf5\x78\x9b\xf0\x3b\x4e\xd0\xec\x67\x39\x7a\x4c\x23\x2a\x6b\xdc\x4c\xd3\xe9\x7b\xcc\xa1\x4c\x31\x05\x87\x20\x84\x70\x5e\xe0\xf7\x2e\x0e\xc4\x3a\x7d\x63\x17\xc1\xd9\x3c\x16\x72\x55\xc5\x4a\x85\x37\x12\x89\x14\x93\x48\xca\x05\x8a\x28\x9d\xd2\xd8\xe2\x42\xcf\x63\xd2\x01\x55\xd8\xb0\xfd\xba\x48\x85\xa3\xbd\xbb\x8c\x6b\xc2\x4f\x5b\xca\x88\xb3\x4c\x1b\x41\x92\xd0\xa5\xda\x5f\x82\xe6\x7d\xf3\xd3\x84\x7d\xfb\xed\x37\xb0\x20\x4b\xc3\x97\x56\x90\x4e\x73\x39\x13\x95\x27\x36\x58\x5e\xcb\xa4\x3c\x8d\x9a\xd5\xd6\x13\x44\x1e\x38\x71\x92\xfa\xf8\x14\xe8\x04\x20\x5d\x03\xb4\x35\xcb\x54\x95\x13\xa4\xd3\xea\x1b\xc0\x61\xfc\xd5\x5e\x2f\x2a\xd5\xdc\xa2\x66\x7c\xf9\xe1\x0c\x86\xe9\x96\x68\x62\x8f\x90\xb4\x9e\x7d\x7f\xde\xe6\x4d\x31\x97\x18\xfb\x15\xb6\x70\x13\xbf\xfc\x70\xf6\x3c\xdb\x74\xf5\xee\xf2\x41\xb8\xc5\x16\x9b\xde\xc6\x3e\x32\xb2\xad\x19\xd9\xf8\xfb\x7e\x30\x88\x3e\x6a\xe8\xee\xfc\x61\x7f\xdc\xe0\x75\x6f\xae\xcb\xef\xe9\xba\x4c\xa4\xbf\x08\x9e\xda\xe0\x8b\xbe\x3a\x4e\xf6\xf2\x3d\xb2\xb7\xef\x36\x3e\x94\xf0\x43\x23\xfd\x72\xd6\x93\x90\x78\x75\xf4\xc2\x9b\x5d\x1a\x5e\x75\x73\x0e\x62\x31\x0b\x92\xce\xc2\xb9\x2a\xf8\x5a\x54\x4c\x53\x08\x54\xc7\xc8\xe4\xad\x11\xe3\x2c\x4a\x09\x66\x63\x74\x31\xb4\x2f\xf0\x88\xd9\x6a\x0f\x78\x22\x4d\x11\xd8\x92\xe9\x0f\x92\x75\x91\x58\x40\xb8\x25\x8b\x19\xc3\x64\x91\x71\x0e\x37\xc3\x06\x8e\xe3\x98\xae\xba\xd0\x97\x22\xab\x44\x1d\x83\xe0\x23\x85\x0c\x38\xbe\x16\x35\x08\x54\x36\x08\xb9\x4f\xfc\x8a\x58\x84\xd4\x76\x55\x80\xab\x14\x62\x5e\x87\x57\xc2\x26\x5e\xd1\x46\x4c\x4d\xf6\x34\x8c\xb3\xc7\xc1\xe6\x9e\xa5\x84\x2a\x7c\xd3\x5d\x57\x11\xac\xc8\xdd\x3e\xaa\x44\x26\xfd\xd6\x8a\x9d\x30\xda\xae\xec\x69\xde\x31\x3a\x13\xe6\xb1\x21\xbb\x8c\xe1\xa2\x8e\xd1\xf2\x42\x95\xde\xde\x63\x1f\xa1\x76\x64\xb6\x45\x94\xb8\x64\xf3\x42\x66\xb5\xf6\x46\xca\x6b\x20\x81\xeb\x3d\xab\x4d\xa3\x0c\xd3\x50\xbe\xae\xd8\x48\x37\x69\xf5\x4d\xbb\x0a\xbb\x63\xad\x38\xaa\x04\x01\xc8\xe5\x0e\x72\x66\x07\xaf\xad\xbb\x97\x68\x46\xa3\xc2\x1c\x46\x41\xd5\x22\x74\xe4\x13\xa0\x42\xa3\xfe\x86\xb0\xa1\x51\xe3\x69\xeb\x5d\x7f\xc2\x21\xd8\xd1\xda\xb7\x02\x29\xc4\xc5\x99\x81\xd9\x19\xea\x19\xce\xa1\xaa\xc4\x0e\xd1\xb5\x43\x74\xed\xbc\x6d\x9f\x9f\xb7\xed\xe9\xca\x55\x38\x05\x2b\x66\x21\x0f\x33\x12\x74\x10\xe2\x0f\xb1\x30\x75\x3b\x79\x0e\x6c\x51\xf4\x95\x37\xa3\xbc\x84\x0f\x61\xdc\xbe\xe7\xad\x58\xb8\x7f\x6d\xda\xdb\x5f\x0f\xfc\x9f\xb8\xb7\xe5\xee\x6d\x74\xbf\xd1\xe1\x6d\xde\x95\xed\xd1\xfd\xb6\xd7\x40\xce\x82\x18\x23\x52\x03\x21\xb6\x88\x4c\x2c\x90\x44\x41\x6a\x66\x96\xfb\xa8\x30\xc7\xc3\x08\x04\x2f\xa7\xbf\x1f\xbc\x53\xa0\xb3\x84\xc8\x4e\x22\x62\x2e\x74\x6d\xaf\x7b\xfc\xae\xa1\x61\xd5\xd4\xb7\x0a\xd8\x20\x0e\x71\xca\xde\xf0\x6c\xc1\x8c\x78\x15\x8b\x88\x90\x66\x73\x39\x03\xb7\x61\xa3\xb1\x12\x30\x18\xcd\x78\xc1\x7e\xb8\x20\x29\x26\xb4\xc6\x41\xbd\x6b\x28\x66\x27\xb5\x86\xb4\xa9\xde\x2f\x60\x3d\x05\x10\x5f\x09\x63\x39\xb0\x4b\x44\x6e\xbf\xba\x92\x36\x0f\x9e\x69\x70\x98\xf8\x00\x31\x66\x58\x3e\xa7\x8a\xf0\xd0\x92\x68\x66\xe1\xfc\x14\xf6\xdb\xb0\xa3\x3a\x10\xe7\xa8\x6c\x58\xb8\x4d\x76\x78\x61\x67\x20\xdd\x93\x34\x5c\xc4\x96\xd3\xa7\x50\x60\x23\x3a\x02\xfc\x16\x58\x1b\x12\x69\x14\x13\x1b\x9a\xde\x4b\x47\xb0\x2e\xef\xa0\xe3\x5a\x68\x76\x25\x64\x4c\xb8\xcd\x46\xad\xd8\xb0\xcf\xcc\x10\x1c\x59\x38\x1e\xbc\xe3\xd1\xc0\x37\x6c\x7c\xd0\xee\x71\xfb\xff\xd8\xad\xf7\xa7\x01\x7c\x2a\xcf\xbe\xfb\x42\x54\x0f\xb2\x62\x74\x7b\xd9\x8a\x9d\x03\xd5\x6d\x79\x05\x8c\x44\x8a\x3c\xe4\x0e\x08\xd1\x25\xdb\x5c\x02\xc1\x7b\xc4\x53\x7b\xbb\x75\x1e\x4b\x2b\xd3\xcf\x31\x7f\xcd\x06\xc2\x08\xf8\xf6\xc9\x87\xd7\x20\xfc\x0d\x6b\xf2\xa6\x55\xff\x41\x26\xb1\x96\xac\xbb\x3e\x27\x35\xf8\x52\x8c\x3e\x99\x65\xd6\x85\xf3\x39\x1e\x67\x3b\xfc\x0d\x27\x19\x9b\x7c\x3e\x87\x18\x44\xf6\x5f\xe8\x18\x4f\x86\x2e\x66\x24\xa6\xf6\xe6\x2f\x79\x2e\x68\xe7\x25\xf8\xd4\xca\x61\x02\xd8\x5d\xdd\x9f\xcd\xd5\xfd\x45\x30\xef\xc1\xda\x4f\x0f\xe0\xda\x16\x2b\x3d\x9a\x5d\x9b\x17\x9c\xb4\xce\xc8\xf6\xd2\xad\x35\x15\xdb\x66\x90\xcf\xee\x90\xd7\x9f\x89\xf5\x65\x08\x79\xed\xb7\xd1\xae\x5e\x67\xff\x9e\xfc\x20\xee\x40\xd8\xbf\x76\xe5\xa9\x2f\xc2\x24\xf4\x18\x00\x76\x4c\x6f\x4f\x0f\xc3\xee\x5e\x09\x4f\xcc\xac\x4d\x9f\x5b\x31\x6b\xf3\xc2\xb0\xb8\x2b\x57\x2e\xc7\x43\x8b\x21\xb8\x14\x0c\xc8\x59\x29\xb5\x06\x25\xfe\x72\xb6\x18\x9f\xb2\xa1\x2d\x38\x40\xb9\x03\x23\x14\x94\x94\xa7\x96\xec\x73\x18\x2b\x06\xcd\x6c\x88\xf9\x43\x01\x3b\x94\x9f\x82\xca\x1f\x41\x7c\xd9\x65\x6f\x39\x00\x7c\xa2\xa1\xea\x11\x34\xd5\x24\x61\x11\x24\xe7\x48\x67\x6a\x25\x08\x10\xaa\x23\xc0\x12\x62\xd9\x34\xd3\xee\xf0\xc4\xa5\x05\xb4\x58\xf2\xb2\x96\x99\xfe\xa3\x91\x71\xac\xc4\x34\x6b\x6a\x14\xcf\x00\x10\xa3\xe9\xf3\x46\x18\x73\xa3\xd5\x00\xef\x3d\x03\x4f\x84\x1d\x39\x9a\xb2\xb4\x42\x28\x8d\x43\x6e\x76\x89\x01\x72\x6d\xdd\x2f\x54\x21\x5c\xe7\xa6\xe1\xb9\xb3\x7b\x99\xc9\x45\x1d\x53\x4f\x7e\x01\xc2\x2a\x07\x1f\xda\x4b\x38\x65\x3f\x98\xad\x82\x9c\x69\xad\x09\xc0\x37\xb6\xed\xee\x69\x8b\x22\x04\x86\xbb\x54\xae\x6d\x5b\xbc\xa3\xb5\x53\x24\xba\xd3\x54\xce\x7d\x21\x93\xe7\xd9\x68\xa8\x37\x41\x5b\xdc\x59\x90\xcf\x7d\xa3\x47\x7d\x03\xd9\xc2\xbe\x66\xea\xbe\xf4\x3d\x3f\xe9\x5e\x3f\x00\x22\x42\x8c\xe1\x99\x2a\x28\x74\x85\xf9\xa7\xe6\xf5\xa0\x04\x6d\xc3\xeb\x47\x45\xf7\xae\x92\xa1\xa6\x67\x73\xd6\x8a\x5a\xc0\x70\x0c\xdc\x5f\x8b\xdf\x53\xb5\xca\x54\x31\x65\x38\x7c\xc3\xb6\x7d\xf6\x71\xce\xca\x66\x29\x2a\x50\x52\x15\x66\xf3\xc8\x5d\x27\xdc\x1c\x02\x4c\xcc\x1b\xdf\x0f\x46\x7e\xa2\xdc\x4f\x39\x69\xad\x6d\x85\x15\x19\x25\xd6\xd4\x81\xfc\xe1\x88\x40\xa3\x73\x37\x41\xad\x32\x70\xf6\xc7\x68\x67\x3b\x68\x30\xfe\x40\x77\x2d\xf0\xfe\xd3\x05\xce\xc2\x4a\xc3\xc7\xba\xeb\xfb\x03\xc1\x0d\x60\xed\x84\x1f\xd5\xc1\xd5\xe9\xf9\x84\xfd\xf8\xfa\x1c\x50\x74\x97\xa7\x57\xe7\x87\x36\xe5\x6b\xc7\x05\x01\xd3\x8e\xca\x0a\x4d\xc2\xd5\xcc\x03\x98\xc7\xd5\xe9\xf9\x23\x8b\x14\x3f\x3c\x54\xb7\xeb\xd7\x7a\xe2\x83\x61\x53\x38\x8c\x3e\x18\x97\x71\x76\xf8\x74\xf2\xbf\xe0\x26\xe9\xe8\x9f\xc2\x65\xe7\x49\x5b\x84\x04\x05\xf8\x60\x1e\x1e\xc8\x3a\xc7\x57\xab\x42\x06\xf0\x7b\xcb\x7a\xb1\xf8\xd0\x0f\x6d\xcb\x7f\xe0\xb9\x42\x03\x49\x25\x28\x68\x2a\x9a\xbb\x74\x5c\xdc\x45\xe9\xa9\x9c\x1d\x80\x59\x86\x30\xc5\x56\x44\x73\xcc\xdc\x1a\x61\xbc\xd1\xe5\x70\xc2\x7e\xb8\x18\x65\x88\x09\x26\xc6\x78\x56\x29\x8d\xc7\x92\x84\xb8\xa4\x8a\xef\x6b\x28\xb9\x5b\x62\x19\x24\xa5\x05\x3e\xd0\x63\xc0\xf2\xd6\xa3\xb8\x67\x08\x32\xa3\x2f\xb7\x17\xee\xc0\x66\x03\x30\x2b\xa3\x0a\x81\xc9\x44\x45\xa9\x11\xb5\x4a\x55\xf4\xc0\x0a\x17\x5e\xcb\x46\xcf\xd1\xaa\xe0\xce\x73\x01\x67\xe7\xb0\x8d\x50\xdf\xe0\xd4\x7b\x72\xfd\xf7\x4d\x8c\x5b\x95\xe5\x00\xd1\x59\x90\xe6\x78\xaa\xbb\xea\x12\x1b\xd4\xc1\x34\x34\xb4\x3d\xd5\x75\x49\xc8\x67\x6e\xa0\x36\xfb\x9a\x15\xca\x5c\x08\xa5\xca\xc5\x68\xa2\x0b\x27\xf6\x2b\x52\x9d\x4b\xaf\x8b\xf0\x30\x5e\xae\x9f\x8b\xe8\x9e\x91\xa8\xda\x68\xe8\x8d\x02\xf3\x65\x20\xf3\xd9\x64\x9b\x36\xff\x78\x67\x79\xc8\xb0\x82\x14\xa7\xe9\x5e\x83\xf1\x77\x89\xd3\x10\x9c\xa7\x4c\xb3\x92\xb1\x59\xdc\x16\xfc\x20\xf0\xfb\x7b\x8b\xa5\xb6\x10\xae\x95\xa5\x42\x23\x72\xe0\x5b\x1e\x1d\x4d\x40\x00\x24\x71\x4c\x71\x0b\xc2\x89\x0d\xaa\x8b\x87\x32\x57\x15\x83\x34\x68\x91\xa7\x05\x8b\xbd\xde\x89\x62\xdd\xe6\x00\x1f\x7e\xb8\xf2\x58\x41\xb3\xed\xa3\xb5\x03\x08\x18\x40\x12\x4b\x91\xa5\xd5\x0c\x9c\xe9\xbf\x7c\x16\xb9\xd9\x6c\xb9\xd9\xaf\xab\xf5\x2a\x05\xff\xb7\xcc\x04\xc3\xcf\x20\xea\xcb\xd1\x6f\xbc\xdf\x18\xea\x8d\x86\x2f\x4c\xc6\x67\xab\x46\x60\x2e\x3e\xa2\xb4\xeb\xbd\x09\xbb\xde\x7b\xe3\xfe\x0e\x11\xa4\x16\x2b\x6a\x7f\x4e\x9c\xc5\x96\x5c\x23\x6d\xf9\x02\x17\x2b\x10\x04\xca\x42\x20\x14\xc6\x91\xf8\x9c\x6f\xaa\x62\x6f\x82\x8d\xfe\xa3\x27\x1a\x98\x90\x4d\x3c\xcf\x4b\xdb\x4c\x53\x5e\x10\x00\xe6\x6a\xdd\x2c\x89\x3a\xa1\xa2\x1f\x35\x42\x4b\x2e\x6e\x15\xf5\x76\x70\xbf\x10\x68\xc9\xa8\x60\xd0\x80\xe0\x0f\x7a\xb7\xe3\xa1\xee\x0f\x7b\xfa\x0f\x83\x29\xa0\x56\x05\xa7\x7c\xff\x95\xac\x05\x64\x2b\x87\xe7\x47\x20\xdd\xe2\x16\x4e\xa0\x21\xc8\x83\xb6\xdc\x64\xb1\x76\xa1\x05\xc1\x36\xb3\xbf\x07\x5b\xc0\xfe\x31\x65\xef\xe4\x47\x71\x0f\x51\xa6\x32\xf9\x35\x2b\x34\x60\x4e\xc6\x20\xeb\x0c\xaf\xcd\x5d\x20\x7c\xe6\x41\x1b\xee\xe7\x46\xe2\xc3\xaf\xc2\x01\xa0\x7d\x16\x31\x39\x88\x71\x0e\x47\x74\xa0\xa5\xd9\x3c\xdd\x40\x95\x5f\xfa\xf6\xbd\xcb\x04\x69\xdf\x48\x6c\x55\x99\x53\x3b\x2f\xde\x58\x0a\xa9\x15\xfb\x7f\x66\x40\x7f\x0f\x69\x91\xfd\xe3\x51\x57\xfa\xe3\x6b\x3d\xf7\xdd\xf0\x0f\xf6\xd9\x3f\x93\x36\x0b\x4a\x3d\x42\xe0\x87\x91\xbd\x9d\xc6\xec\x56\xdd\x89\x8a\x02\x0b\x38\x46\x87\xb9\x12\xc0\x71\x3c\x21\x91\x7f\x1d\x94\x1d\x61\x54\x77\x24\xce\x02\x1d\x5e\x18\x20\x6f\x04\xbe\x47\x51\x75\x53\x00\x77\x07\xf5\xc8\x4a\x34\x3b\xa7\xd3\x0e\xf2\xfb\x25\xfb\x76\x7e\xc3\x90\x5f\x8d\x71\xd3\xfe\xe0\xd1\x29\x17\x25\x14\x79\x1a\x95\xfc\x2d\x21\x39\x77\x58\xc8\x43\xa1\xbd\xe9\x8e\x9e\x03\xde\xdb\xf9\xd2\x10\x44\x20\xf9\x42\xec\xf2\xed\x72\x52\xeb\xfd\x1d\x66\xba\xd0\xdb\xa3\xb2\xb0\xef\x20\x00\xbf\x2a\x04\x40\xfe\xc2\x10\x80\xae\xe0\xb1\x83\x01\xec\x60\x00\xcf\x0b\x03\xe8\xd2\xdc\xd3\x43\x01\xd2\x57\xc0\x36\x8c\xf9\x72\xe8\x92\x1b\xe6\xc6\xd0\xc5\xa3\xb8\xb1\x16\xef\x64\xd9\x7c\x32\xbf\x36\xe5\x89\xfe\x51\x03\xcc\x0d\xaa\x25\x62\x66\x85\x02\xba\x33\x84\x37\xd7\xf0\xd7\x04\xeb\x36\x4a\xe3\x79\x25\xef\x64\x21\x6e\xc5\x1b\x9d\xf1\xa2\xa7\x3a\x72\x5f\xcb\xb0\x80\x9a\x9c\x93\x3e\x90\x71\x5f\x4e\xcb\x05\x71\xae\xec\xcb\x4c\xb8\xb7\xbb\x09\x0b\x42\x57\x49\x5d\x45\xc9\xe2\x66\x4a\x15\x82\x43\x71\x68\x52\x76\x4f\x2f\xcf\x5e\x57\xd2\xb0\x8a\xc4\xcd\xd3\x6e\x42\x99\x71\xe1\xd5\xc2\x19\x6a\x0b\x59\x0a\x76\x7a\x79\xc6\x72\x6a\x85\x65\x82\x28\x3b\x46\xa8\xcc\x8b\x9a\x2c\xb9\x62\x39\x13\x79\x58\x0b\x01\xe6\x0c\x75\x6e\xbd\x5d\x09\xf9\x9f\x2c\x73\x08\x17\xb6\x1a\x56\xb9\x0e\xbe\x15\x25\x9f\x98\x83\xcb\x16\x46\x23\x56\x0b\xb1\x14\x95\xb9\xaf\x54\xd1\x2c\xc5\x53\xf3\xf5\xf6\xca\x00\x5b\xb7\x2b\xca\x57\xa8\x24\xca\x94\x49\x2a\xd1\x28\xbe\x8f\xb2\xf0\x09\x1a\x77\x70\x8e\x44\x0d\xa4\x34\xe6\xce\x0c\x1e\x68\x8d\x71\xaf\x65\x68\x84\xa2\x2c\x1e\x1c\x56\xdd\x9b\x70\x19\x6f\xea\x85\xaa\xf6\x21\xdd\x51\x56\x09\xa4\xa8\xff\xb5\xf6\x0f\xc3\xf9\x11\xb9\xed\xc7\x65\xee\x13\xc4\x9d\xa7\xe6\x62\x04\x03\x7b\xc4\x5e\x57\x6a\x15\x3e\xdc\x2e\x70\x9a\x7a\x7f\x5b\x88\x4f\x3f\xe1\x26\xf6\xae\x66\xd0\x26\x45\xa2\xe6\xb1\xa5\x03\xc6\xde\x58\x38\x71\x29\x8b\x0e\x75\x15\x45\xd8\xda\xae\x9a\x21\x2f\xeb\x17\x86\x7a\xc1\x82\xb2\x02\x0a\xd0\xf7\xe5\x9d\x40\x3f\xed\xbd\x05\x38\x34\x9a\xdf\xba\xe0\xe5\xb0\xc3\xd0\x13\x56\x52\xf8\x34\x3d\xbb\xde\x23\x0b\xf1\xb3\x90\xaa\x5f\xa2\x70\x71\xa1\x48\x54\xba\x02\x58\xbb\x45\x6a\x61\xb1\xc6\x95\x79\x3a\xa5\x65\x4d\xac\xa7\x6f\x14\x2d\xe7\xb3\xcc\xd2\x8e\x36\x9c\xe3\x79\xa5\xb2\xf7\xaa\x29\xeb\x1e\x23\xf1\x49\xaa\x59\x6a\xb6\x76\xe3\xe2\x96\xd3\x8d\x04\x85\xee\xfb\x85\xb0\x69\x0a\xa2\x77\x63\xf2\xa2\x94\x46\x54\xf4\x0b\x90\x29\x51\xe3\xb9\xe0\x46\xe6\x60\xf3\x82\xdf\x5a\x36\x8a\xb5\xc4\x1e\x74\xae\x7e\x2c\x35\x9f\x8b\xcb\xb5\xce\x92\x39\x64\x52\xad\x62\x46\x15\x30\x76\xbb\x32\x0d\xb4\x66\x1a\x9b\xc7\x37\x51\x09\xd9\x05\x20\x26\x00\xcb\x0a\x99\xe3\x83\xf8\x0a\xce\x56\x05\x97\x25\xbd\x47\x39\x10\x2a\x23\xa2\x02\x17\x83\x04\x85\xe6\x2f\x36\xdf\x10\x62\x78\x20\x8e\xa0\xd4\x32\x17\x15\xe6\x25\xe2\x41\xd9\x4b\x3b\x22\x1a\xca\x94\x5d\x62\x6a\x9b\xaf\xd8\x52\xf0\x12\xfd\x13\xf1\x68\xd1\x92\x6d\xb3\x8c\xfe\x77\x33\x13\x85\xa8\xd9\x02\x35\x21\x4f\x07\x89\x17\x83\x85\x30\x4d\xef\x94\xcc\x49\x2f\x32\xcc\xf4\xba\xbc\x2e\xdf\x50\x61\x9f\x57\xcc\x27\xa2\x3c\x36\x93\x22\xef\x35\xfe\x30\xe3\x15\xfa\x17\xf0\x1f\x3f\x9b\x7f\x40\x6d\x98\x20\x7b\x65\xfb\xa5\x69\xf8\xd2\x34\x78\x69\x2b\x92\xa0\x7d\x3a\xc9\x07\x2e\xaf\x74\x3b\x5f\x70\x02\x6d\xd5\xe4\xb2\xea\x5e\x64\xce\xf8\x99\x07\xe5\x88\xdd\xf5\xc5\x9a\xb2\x08\x02\x8b\x40\x1a\xb0\xe6\x7a\xac\xa3\x99\x57\x6a\x45\xe9\x5d\xdc\x65\x34\x65\x78\x5b\xf1\xf5\xc0\x65\xd5\x33\xf6\x8d\xf7\x55\x7c\xa1\xe2\xb0\x9d\x1b\x39\xc8\xdd\xea\x1c\x07\x00\xe3\x11\xa2\x5b\xf3\x89\x98\x7d\xea\xc6\x1c\x0a\x01\xe9\xdf\xae\xd1\x92\xe7\xc0\x0b\x36\x11\x4a\x67\x1b\x5d\xea\x14\xeb\x15\x32\x47\x4c\x65\xb6\x70\xd2\xad\x39\xb4\x90\xc7\xcb\x09\xa6\xb0\xd3\x25\x33\x5a\x24\xa5\xd6\xa5\x17\xd2\x42\xe8\x5c\x55\x33\x99\xe7\xa2\xec\xe5\x43\xed\x16\xbd\x3c\xc8\x35\xfc\x1c\xd8\x4f\x67\x30\x49\x06\x14\x72\x1e\xf7\xc6\x66\x86\x81\xcd\xb6\xe5\x18\xd1\x5b\x4f\xc3\x32\xac\x3e\xd4\xdd\x30\xed\xaa\xb0\xd7\x23\x8a\xb6\xbb\x42\xf5\x36\xad\x0b\x55\x44\x4e\x54\x6d\x7f\x80\x58\x90\xae\xe2\x0f\x59\x59\x95\xae\xcf\xce\x4f\xbb\xe3\xa7\x07\x2d\xa5\x2c\xd0\x50\x03\xc4\x91\x51\x4b\x15\xa6\xa3\x35\xaf\x38\xbc\x28\xa9\x32\x49\x92\x37\xfd\x93\xff\x2b\xfd\x71\x1b\x7b\xb4\xe5\x00\xec\x6b\xa3\x07\x71\x7e\xf6\x3a\x3d\x80\xf3\xb3\xd7\xdb\x7e\xdc\xbc\x32\xfe\xc3\xe9\x00\x44\xf7\x28\xfc\x38\x9e\x39\x57\x4b\x15\x2b\xd6\x45\x77\xb5\x15\x85\x3e\xad\xd4\xd3\x8b\x95\x71\x39\x58\x80\x98\x58\x4e\x97\xb0\xe0\xf9\x67\x63\x54\x7a\xa3\xd2\x35\xa5\xe1\x1c\xfe\xbd\xf4\xa2\x55\x82\xe7\x3f\x94\xc5\xfa\x42\xa9\xfa\xad\x2c\x84\x5e\xeb\x5a\x24\x22\x78\xd3\xed\x50\x2b\x21\xdd\xbb\xae\x1a\xaa\x42\x0c\x66\x16\x7f\xfb\x62\x09\xbd\xc6\xd5\x93\x37\x7d\xa1\xf4\x5a\x29\x55\xb3\xb9\x2c\x40\xe0\xa9\xc5\xd2\x02\x5d\xc3\xab\x3b\xba\xa6\xc3\xe2\xc0\x41\x8f\xa5\x2a\x8f\xfa\x7b\x45\x81\xf7\xf2\xdc\x5a\xa6\x73\x51\xae\x23\x70\x13\x4d\x60\xce\x0b\x2d\x5a\x5f\x07\x43\xf4\x98\xa1\x9b\xbd\x00\xec\x05\x24\x9d\x9d\x35\xb5\x43\x62\xd0\x7d\x8d\xb6\x27\x56\xab\xbe\x8d\x48\x0b\x0a\xa9\xad\x48\xb7\x04\xca\x8d\x24\x98\x8e\x74\x64\xa4\x9c\x95\xc8\xbd\xa9\x36\x50\xf0\xd9\x15\x64\x7e\x6f\x17\x08\x0f\xde\x02\x3f\xb2\x33\xd9\x82\xc8\xb2\x1d\x63\x07\x4b\x58\x0f\x6f\xbf\x70\xcf\x46\xb0\x77\x27\xef\x40\xe0\x78\xf0\x2a\xa5\x7c\xa3\x62\xd2\x6b\x9b\x37\xb9\x8b\x9a\x51\x4b\x59\xd7\x1e\xb1\x9d\xef\xeb\xb0\x1b\x28\xcb\xce\x3f\x0a\x30\x09\xdd\x61\xb2\xfa\x00\x0c\x11\x69\x52\xc1\x6b\x56\x8d\xba\x85\x31\xb6\xd5\xa8\x07\xf0\x08\xdf\x77\xe2\x9a\xf1\x76\xc5\x2e\x89\xd8\x47\x0f\x5b\x4b\x78\xb3\x67\x29\x1f\x31\x11\xd3\x6d\x7a\x1e\xb5\x5c\x0a\x48\xc7\x9a\x9c\x8a\x7b\xfa\x90\xd9\xb8\x97\x85\xad\xee\x95\x86\x34\x26\x08\x22\xfc\x34\x24\xd2\x73\x8d\x9b\xd2\x47\x7f\x4f\xd9\x1b\xb4\x2b\x43\x2a\x61\x35\x8f\x91\xe5\x2b\x10\xf5\x08\x7e\x15\x0e\x27\x26\x96\x99\x80\x6a\x9d\x8f\x25\x16\xd7\x7b\x62\x99\xad\x41\xba\xeb\x13\xc6\x07\x5b\x2f\x2e\x46\x7a\x3d\x11\x81\x5c\xbe\x81\x41\xa4\xc6\xdd\x35\x99\x77\xa7\xd0\x69\x33\x56\x46\x0c\xdf\x44\x69\x11\xf9\xe8\xd3\xcb\x8b\x97\x9d\x31\x26\x26\x7b\xd7\x67\x8d\xbc\xeb\x37\x41\xe2\x23\xb6\x2a\x9a\x5b\x59\xf6\x59\xcb\x4a\xc5\x92\x86\xc7\x2b\x6b\xff\x37\x4a\x83\x6d\xb1\x26\xad\xd7\x48\x61\xfb\x5f\xed\x6f\xc3\xe4\xb7\xf7\x29\x75\xec\xdd\x43\x0e\xa2\xae\xd5\x71\xe4\x1b\xce\x82\x37\xd4\xbe\x47\xb4\xdf\xae\xc0\xff\x50\xeb\x7e\xde\x3e\xea\xcd\x14\x33\x1d\xf1\x62\x2f\x87\x18\x7a\xb7\xe7\x80\x0e\xbe\x36\x48\xf5\xc3\x1e\xc1\x0b\x61\x34\x71\x7e\x29\xc6\x46\x8a\xf5\x05\xc3\xf8\x8e\xba\x51\x30\x7c\xb5\xb2\x5f\xfc\xfa\xd8\x37\xdc\xaa\xbc\x71\xf8\x01\xc4\xb4\x5b\x5b\x75\x10\x57\x85\xa1\x58\x04\xbc\x86\x3c\xf3\x32\xe3\xc8\x74\xaa\xa6\x84\x8c\xed\xe4\x8b\xc2\xe0\x31\xb3\x63\x3b\xcc\xdd\x0e\x73\xf7\x9b\x04\x52\x90\xb6\xf7\x0e\x45\x09\xa8\xae\x14\x9c\x21\x73\x26\x28\x32\xd8\x15\x9a\x27\xc3\x9b\x53\x4e\x5c\x34\x03\x77\x21\xb7\x07\xfa\xd0\x63\xf1\x83\xee\x96\xbc\xe4\xb7\x86\xae\xfe\x1d\x90\x7e\x1d\x10\x84\x1e\x95\xed\x93\x7e\x0f\x19\xe0\x97\x50\xd7\xd8\x8f\x77\xbb\x8a\xce\x4b\x28\xdd\x20\x32\xac\x5f\xa0\x66\x10\x9a\x94\xb7\x52\xbb\x87\x8b\x01\x17\x8b\xd9\x40\x2b\x46\x51\xba\xcc\x1c\xa4\xf8\x35\xd3\x0a\x2a\x88\x95\xb9\xba\x87\xd7\x0d\xf3\x66\xe7\x6a\xd5\xb8\xe0\x25\xd8\x0b\xb2\x76\x5c\x08\x9e\x43\xa0\xc2\x17\xb7\xca\x0f\x2e\x20\xdd\xda\xa9\xf1\x77\xff\x33\x96\x91\xf6\x1f\x39\x55\x65\x2e\xad\xa3\xa3\x4f\xd2\x48\x34\x6f\x25\xc9\x77\x05\x09\xb8\xbd\xe0\xb1\x76\x09\xf8\x8f\x44\x05\x11\x2f\xc0\xd9\x87\x50\x44\xf0\xcc\x11\x73\x07\x20\x54\x70\x5d\x5f\x55\xbc\xd4\x30\x88\x2b\x99\x4a\x04\x7f\x05\x77\xb0\xae\x81\x16\xad\xd1\x87\x46\x5d\xbb\x77\xad\x51\x48\x95\xc2\x52\xbf\x2f\x4d\xfd\xb8\xb8\x2a\x18\x16\xdc\x02\x5a\xf3\xdb\xc4\x08\x4f\xd8\xa2\x59\x82\x01\x93\xe7\xa0\x59\x52\x4b\xab\xc3\x60\xdd\xc7\x9a\xcb\x42\x33\x3e\x73\xa5\xf9\xdc\xd8\xd3\x55\x5b\x04\xd7\x29\x61\xe8\x0a\x44\x39\xf3\xcc\x25\xee\x77\xeb\xb1\xaf\x69\xa5\x36\x77\x3d\xc0\x5a\xd4\x3c\xee\x75\x62\x6b\x3d\x5d\x55\x46\xf0\x79\xcb\x0b\x2d\x26\xec\xc7\xf2\x63\xa9\xee\xd3\x1f\xc0\x1f\x3a\x23\x5f\xaf\xa0\x9b\x90\xa2\xdc\x47\x1e\x19\xb4\x1e\x9d\x1d\xd8\xb0\x6d\x4e\xcd\x10\x74\x3a\x6e\x99\xaa\x2f\xed\x5b\xec\x32\x9d\x7d\x26\x02\x70\x0f\xcc\xd9\xc6\x3d\x86\x3b\x96\x1a\x67\x5c\x27\x2b\x57\x99\x36\xa3\xcc\xc4\xaa\xd6\xc7\xf7\xaa\xfa\x58\x28\x9e\xeb\x63\x5f\x26\x43\x1f\x13\x5d\x9b\xef\xf8\x9f\x9f\xd6\xe7\x12\x68\x92\x3b\xb0\xf4\x6f\x1c\x2c\x1d\x8f\xf7\xd7\xc1\x4b\x07\xf4\xf6\xf4\x40\xe9\x96\x24\x35\x8a\xff\xda\x0c\x20\x49\x85\x20\xd4\xbd\x86\x2d\x0e\x4b\x59\x1a\xf1\x75\x7d\x29\xcc\x25\x94\xe0\x14\xef\x65\x29\x97\xcd\x32\x30\x78\x68\x6c\x4a\xb0\x0f\x09\x41\xac\xa5\xb8\x2f\xd6\x2c\xab\x04\xa7\x74\x0b\x41\x66\x58\x23\x10\xac\x7d\x61\xb9\x12\x03\xe4\x6b\x1d\xf8\xe7\xb2\x8a\xeb\x05\x24\x6e\x05\x88\xae\xf5\x7e\x86\xf0\x89\x3b\x2e\x0b\x23\x56\xc4\xf5\x7c\x5e\xb0\x03\xf3\x31\xeb\x19\x4b\xbd\x60\x54\x4a\xad\x14\xf8\x51\x11\x95\x01\x03\x3a\xf4\x4b\x63\x78\xfa\x2d\x30\x29\x34\x02\xe1\x4f\xdf\x7c\x8d\x02\x08\x5a\x76\x7a\xb7\xc3\x29\x21\x7e\x81\xac\x3a\x66\xdf\x25\x7d\x03\x98\x11\x70\x09\x2c\x62\x97\x4b\x6d\xb8\x50\x23\xf5\x82\xcd\x44\x7d\x2f\x44\xe9\xe0\x2a\xec\x67\x51\x29\xb8\x5c\xc2\xb2\x42\xd1\xd4\x5f\x3e\x27\xc3\x3e\xfe\xdd\xfd\x82\xd7\x47\x52\x1f\xf1\xa3\x01\x8e\xbe\x69\xf5\xf4\x40\xae\x05\xca\xff\x45\x39\x04\xfe\xd9\x88\x6a\x8d\xb5\x11\x31\xfd\x02\x98\xf6\x91\x8e\x7c\xb1\x27\x2b\x38\x65\xaa\x29\x6b\x57\x8d\x48\x07\xfd\xf9\x34\x64\x52\xc7\x96\x06\xbc\xc8\xc1\x4a\x61\xf3\x96\xf9\x3c\xc5\xac\x16\xcb\x55\x01\x75\xa7\xc0\x92\xc1\x3e\x8a\xb5\xf6\x95\x86\x42\xd4\x3a\x8e\x46\x96\x4c\x55\x39\x6e\xe6\x2c\xa8\xdf\xe8\x13\x3a\x04\x42\xde\xd6\xbb\x65\xd6\xe1\x4e\x8a\xfb\x63\x4a\xeb\x73\x64\x4e\xd0\x11\x45\x21\x1d\xe3\x2c\x8e\x7f\x07\x7f\x1e\xd9\xd9\x3f\x92\x47\xb6\x53\x27\xd8\x05\x49\x48\xb1\xf4\xc4\x12\x3f\x5d\x99\x58\x32\x35\x52\xa2\x60\x61\x43\xef\xb5\x65\x12\x72\xce\x64\x09\x55\x94\x33\xb8\x2e\x23\x1b\x6a\x2e\x6a\x81\x6e\xb9\xe7\xa3\xf1\xdf\xad\x54\x7e\xe4\xa6\x38\xbe\xd4\xdb\xb9\xca\xed\xf4\x47\x05\x48\xda\x3a\x6f\xed\xf7\x9e\x29\x94\xbd\xa3\x6b\x8f\xbb\x52\x50\xeb\x09\x6a\x32\xd7\xc9\x22\x79\x43\xb7\x4b\x28\xe3\x3b\xde\xd9\x15\xf3\x2d\x73\xbe\xe8\x65\xaf\x57\x11\x4b\xf5\xdc\xdc\x91\xc9\x01\xde\x2b\xe0\x0d\xb6\xe9\x73\x5a\xb7\xd9\x61\x90\x70\x3c\x38\x89\xe3\x78\x97\x53\xca\xd2\xbc\x3f\x5c\x26\xd2\x0d\xfc\x20\xd1\x04\xe5\xcb\xae\x46\x06\x84\x7d\x1d\x97\x3c\x7c\x62\x44\x52\xca\x0c\xf2\xaf\xc9\xde\xa7\x23\x7f\x6c\x8e\x56\x86\x7f\x1d\x2d\x45\x75\x2b\x8e\x3e\x8a\xf5\xde\x2b\x6b\xa2\x48\xb4\xb2\xbe\xd7\xbd\x57\x7b\xf0\x02\xa0\x32\x9b\xa2\x58\x03\x61\x8a\x7c\xec\x16\x7a\x96\x0e\xe5\x6a\x89\x0d\xbb\xb4\x8a\x01\x6b\x56\xf3\x0e\x4b\xb6\xbf\xd9\xdd\x1f\xbd\x8b\xd6\x18\xf8\x17\x51\x52\xe5\x80\x44\x72\xba\x4e\x1b\x56\x89\xb9\xcf\x05\x74\xeb\x7f\xa7\x61\xf4\x18\x1c\x93\x47\x23\x3d\xba\xef\xbe\xb5\xb8\xad\xf5\xd8\x05\x44\x7a\x77\xf4\xff\x08\xd2\x1e\x2f\xd4\xb4\x27\x8a\xf3\x0c\xc7\x64\x45\x9c\xcf\x5c\x16\x79\x8c\xd4\xef\xcf\xd1\x08\xee\xab\x8a\x62\xc6\xb3\x8f\xa7\x50\x5d\x77\x9c\xa7\x73\x58\x4a\xaf\xc4\x9d\x4c\x1b\x45\xd0\x10\x86\x4f\x01\x4e\x47\xdf\x07\x65\xd3\x83\xe2\x5e\x4c\xc2\x27\x74\xd8\x60\x6b\xf1\xd5\x51\xf4\xfa\xc0\x8a\x89\x66\x49\x64\x79\xfb\x23\xe8\xbb\xaf\xb9\x58\xaa\x72\xc0\x09\x0c\xfa\x0d\xd6\x5f\x36\x5b\xdc\xeb\xe3\xc8\xa1\x33\x98\x63\x85\x1f\x21\xad\x7a\x84\xde\xc3\x3f\xfd\x58\x3a\x86\x9d\x5e\xd7\x25\xff\xd4\x52\x7d\xdc\xe8\x03\x6e\x66\x03\x0c\x7d\x6f\x2c\x6f\x2a\xcb\xd2\x68\x3c\x0c\x0a\xe8\xdb\xb6\xbc\x64\x7c\xa6\x55\xd1\xd4\xee\x7c\x1f\x88\x4f\xaf\xd8\x7f\x1e\x32\xc4\x36\x89\xca\x9c\x38\x1b\x21\xa6\x6a\x5e\xf4\x0f\x82\x3c\x64\xba\xe6\x55\x6d\xf9\x13\x7e\x15\x3b\x7d\xf9\xe2\x3f\x0e\xa7\xec\xa4\xf5\x3d\x48\x11\x56\x64\xe4\xd0\xc0\x18\x59\xff\xd5\xd9\x9a\x55\xaa\x29\x73\x5c\xd1\xa9\xcb\x77\x4a\xa6\x8b\x17\x4e\x13\xb1\x21\x98\xda\xa8\x23\x84\x49\x7f\x65\xa3\xdc\x50\xe7\x21\x0a\xfc\xe6\xc5\x7f\x4c\xcc\x58\x81\xa3\x7c\xf3\xe2\x3f\xec\x50\xdb\xb3\x2b\x55\x2e\x62\xd1\x7f\xe6\x5d\xea\x40\x08\xb8\xe9\x90\xf8\x51\x4e\xc5\x94\x84\x93\x29\x11\xc8\x07\xe8\xc9\x50\x56\xde\x14\x22\x3f\x84\x35\x87\x1b\xa7\x5e\x08\x49\x9a\x85\xae\x09\x41\x69\x96\xbb\xb4\xcb\xd5\x75\xd8\x43\x52\x37\x7a\x0a\x0b\xac\xc1\x3b\x64\xde\x26\x0f\x7f\x3c\x1d\xa5\x45\x67\x7b\xca\x1c\x53\xec\xcd\x0c\x4d\x68\xd6\xac\x8c\xb2\xdc\x6e\x85\xd0\x68\x33\xbc\x82\x67\x62\xca\x7e\x28\x33\xb4\xf2\x9b\xb6\xd8\x4f\x25\xbc\x80\x01\xca\x0d\xf4\x0a\xc1\x13\x02\xc0\x69\xb5\xa2\xb4\xe2\x71\xdf\x13\x56\x2f\x1a\x8d\x48\x06\x5c\x43\x5e\x7b\x89\xe9\xbf\x70\xe8\xaa\x92\xb7\xb2\xdc\x48\x66\xe1\xf7\x19\x45\xee\x99\x45\xd2\x09\x72\x7f\xb2\x9c\xb2\xbf\x4c\xca\xd6\x98\x43\x89\x55\xa1\xd6\x4b\x51\x3e\x09\x8b\x7a\x00\x5f\xba\x6c\xaa\x94\x7f\x25\xcd\x91\x3a\x7c\x48\x5b\xca\x67\x7c\xa6\x90\xea\xdd\xc0\xe2\xd7\x1e\xc5\x94\x6c\x97\xf0\xfd\x80\xcf\xb8\xcc\xc8\x96\x55\x18\x3d\xef\x7d\xc4\x6c\x0d\x53\x78\xf1\x58\x8e\xf4\xbd\xcb\x1f\x39\x61\xdc\x97\x02\x7e\x69\xa3\x44\xc6\x70\x23\x7b\xbe\x2e\x4e\xfd\xe2\x71\xb3\x72\xcd\x8a\xc9\xe5\x52\xe4\x92\xd7\x22\x0c\xda\x8d\x37\x93\x38\xc2\x04\x13\xb9\x39\xa8\x42\x9b\xa1\xa9\x22\xa7\xa8\x2f\x3a\xc9\xb9\x82\xc5\x11\x9f\xcc\xc1\x65\x2f\x89\x79\x84\x0b\x4a\xe7\xdf\xbc\x09\x6f\x00\xfb\x9a\x09\x51\xb2\x8f\xb2\x28\x44\x3e\xe9\x1d\xf6\xbc\xa9\x0c\x0b\x98\xb4\x8e\x7b\x7b\x4c\xd0\x6b\x0b\xa7\x04\x8e\xc5\xce\x51\x06\xfb\x0c\xb1\xb9\xe4\x50\x9f\x30\x7d\xf4\xc3\xee\xe4\x5f\xf0\x26\xee\x23\xfa\x87\x93\x72\xae\xee\xcb\xfe\x43\x03\x9c\x80\x8e\x4b\x4c\xf0\x73\xf9\x49\xe4\x8f\x20\x7b\x43\x5a\x1d\xfa\x31\x83\x31\xad\xfe\xab\xbb\xcd\x5b\x9c\x07\x22\xde\xe8\xe2\x02\xd5\x65\xb2\xe1\xab\x8e\x6e\x31\xbd\x28\x55\x61\xcb\x38\x75\x1f\x1c\xd5\x0e\x69\x27\x8e\x1c\x7e\x77\xe4\x65\x45\x14\x1e\x5d\x87\xcf\x43\xe1\xbf\xd0\x65\xd6\x8b\x48\xdd\x64\x08\xea\x7b\x29\x06\x1f\x39\x18\xf6\x7a\x25\x30\x35\x68\xb9\x76\x79\x50\x6d\x19\x7a\x34\xf0\x45\x2f\x74\x73\xb5\xf4\x7f\xf0\x51\xf9\x5a\xaa\xa6\x10\x5d\x73\x13\xc6\x84\x25\xa2\x12\x7c\xac\x58\x10\x7b\x6b\x43\xc8\xd4\x9c\xdd\xca\x3c\x86\xc6\xe3\x19\xb3\x39\x4b\x41\x3c\x2d\xe4\x47\x08\x13\xc1\x70\x29\xce\x34\x86\x71\xde\x4a\x92\xfb\x00\x9b\xbe\xf6\x0f\xa0\x77\x5f\x1c\x1f\x73\xf8\x82\xf0\x6e\x16\x54\x94\xf9\x94\x5d\xd8\xc8\x1d\x23\x9f\xbe\x6f\x74\x0d\xab\xf5\xc4\x76\xa2\xb3\xd7\x3e\x66\xad\x6a\x52\xfc\xb6\xa2\x4a\x96\x4f\x1c\xc6\xb3\x2d\xc6\x21\x59\xdc\x82\x06\x3f\xf2\x38\xa4\x60\xd6\x43\xa7\x21\xf1\xce\xb3\x1e\x86\xd4\xf7\x3e\xa7\xb3\xd0\x3c\xfc\x2c\x34\xff\xce\x67\x61\x20\x0c\xeb\x97\x3d\x0a\xbd\x81\x03\x9b\x4f\x43\xdf\x6b\x74\x20\x9e\x28\x9c\x6b\x80\x9e\x89\x24\x2f\x5a\xf1\x5c\x29\xf7\x42\x5f\xcb\xbe\x24\x26\x9d\x96\xa9\x08\x9d\x28\xee\x0b\x8b\xb2\x44\xfb\xe9\x62\x03\x7c\xc1\x97\x13\x2f\xa2\x61\x92\x00\x0c\xed\x77\x79\xaa\x3a\x5d\x46\x49\xa6\x01\x5b\x44\x49\xb2\x40\x68\x83\xfa\xa1\x41\x59\x58\x48\x0c\xe1\xd3\x61\xc1\x40\xdb\x51\x8d\xa9\xd8\x37\xf4\x57\x36\x65\x4c\x82\xe3\xf3\x4a\xb4\xbb\xed\xcd\x27\xd1\xf9\x7e\x2b\x11\x48\xe7\x79\xad\x30\x39\x48\xe9\x23\x7b\xaf\x82\xf6\xef\x7f\xbc\xbc\x02\xb1\xdd\x0b\x89\x01\xb3\xea\xee\x22\x2d\x90\xdf\x85\x52\x16\xbe\xb0\xc1\xb2\x71\xd4\x79\x1e\x91\x5f\xff\x61\x1c\x65\xf0\xec\x09\xb2\xd9\x64\x4d\x48\xbe\xf1\x5c\xd7\x4d\xcf\xd7\x9e\xe3\xb2\x79\x3a\x5e\xda\x1f\xa7\xd8\x45\x76\x62\x28\x64\xb0\xee\xc9\x50\x49\x3b\xef\x30\x4e\x1a\xe3\xed\xff\xe8\x7f\x8b\x6e\x9d\x91\x4e\x8e\x9a\xeb\x8f\xe0\xd7\x98\xcb\xdb\xa6\x12\x47\x2b\x95\x1f\x39\xac\xcb\xb1\xa6\x38\x44\xf8\x49\x7c\xaa\x8f\xb7\x70\x3d\xd3\xce\xb9\x50\xc3\x91\x9e\xe7\xd6\x6b\xc3\x37\xc5\xa5\x51\xcd\x36\x11\x6c\xe0\x27\xe6\x4e\x4f\xb3\xa9\x0b\x90\xa3\x5b\x4c\xdd\x2e\xea\x69\x17\xf5\xf4\xdb\x46\x44\xd2\xea\xd8\x96\x7f\xfc\xa5\xa2\x8f\x1e\x07\xe8\x1f\x13\x7e\x14\x1e\xb9\x76\x70\x11\x98\x6f\x7e\xe9\x88\x97\x87\x46\x6d\x9b\xb1\x0e\xc5\x14\x75\xc1\x2e\xbf\xde\x34\x83\x98\xa2\xc7\xcc\xf8\xc1\xf1\x3d\x7e\xc1\x46\x5d\x15\xcf\x18\xd5\xe3\x47\xb2\xe1\x3a\x8a\x21\x67\xbc\xc6\x2d\x10\x84\xbd\x81\x2d\x34\xcc\xc7\x32\xb5\x11\xfe\xf6\x3e\x80\x44\xd7\x95\x62\x04\x24\x5e\x66\x42\xbb\x48\x14\x32\x6c\xd2\xad\xf3\x30\x74\xc2\x38\x41\x33\x58\xfb\x71\x97\x75\x1f\xa8\xab\xb3\x44\x0f\xc7\x76\xf5\xaf\x1d\xcf\xea\x26\x76\x8d\x58\xe0\x8c\x5f\xc3\xf0\xd4\x6d\xb5\x84\x9b\xc0\xa6\x0f\x80\x97\x6a\x8b\x2f\x6d\x1d\xfc\xb4\xc4\xd7\x68\x51\x1d\xdd\x36\x32\x17\x04\xcc\x4c\xe0\x32\xdb\xab\x89\x35\xb7\x54\xc9\x8b\xf3\x68\xfd\xba\x5a\x57\xcd\xab\x5b\x51\xf7\xd7\x2d\x6b\x55\xe0\x32\x64\xb8\xc5\x04\x3d\x36\x59\x8b\x4a\xf2\x42\xfe\x0c\x5e\x8b\x20\xe0\x1e\xb2\x23\x2e\xf9\xea\x08\xab\x50\x81\xf4\x63\x56\x45\x7c\x32\x74\xa5\xe5\x1d\x88\xe2\xf4\xd4\x4d\xd9\xf7\x9c\xab\x52\xf8\xc4\x97\xb2\xac\x2b\x65\xf8\x1d\x08\x68\xa4\xc9\xa2\x80\xa0\x51\xdb\x23\xf1\xc4\x02\x46\xa9\x09\x18\x87\x70\xd7\x6d\x94\x30\xec\xe8\x11\xe4\xdb\x65\x7a\x5d\xd6\xfc\x93\xc3\x03\xe3\x9a\xa1\xb2\x04\x7a\xb3\x6e\x56\x2b\xc8\x1d\xe6\x27\xe2\x86\x3a\xc1\x29\x06\x29\x5f\x50\xc2\x6b\x37\xb4\x0f\x2b\xa3\x9a\x52\x30\xe8\x2f\x86\xeb\x7d\x22\xdd\x74\x30\x93\xc3\x26\x35\x75\xe8\xe5\x01\x8d\xf5\x61\xda\xea\xe0\x47\x1f\x59\xe8\xe8\xc1\x16\xd1\x44\xd6\x19\x4c\x7d\x36\x68\x10\xed\xbe\xf9\x6f\x62\x1f\xed\xcd\xd6\x63\x93\x3b\xd2\x61\x4f\x24\xeb\x79\x2e\x43\xe9\xbc\x50\xf7\x84\xe2\x38\xbe\x7b\xc9\x8b\xd5\x82\xbf\x9c\xbe\x2d\xd4\xfd\x6b\x1f\x9f\x21\xaa\xf7\xa2\x5e\xa8\x7c\xd3\xe1\xe8\x79\x25\xaa\x27\x27\x8c\x92\x60\x7e\x84\x4b\xd7\x7c\x39\x8c\x02\xc1\x10\xdd\xc1\x40\xe2\xce\x8d\x9b\x0e\x34\xbd\x31\x3f\xdf\xd8\x3d\xa9\x29\xec\xb4\xfb\x4d\x3b\x24\xe0\xbc\xc8\x24\xcd\xe9\x84\x1c\xd7\x58\xda\xf0\xfb\xf5\x8f\x5a\x54\xd7\x7b\x40\x74\xe6\x9f\xae\xc4\xf9\xf5\x9e\x27\xc0\x07\xda\xcf\x7a\x97\xdf\xaf\xf3\xa6\x15\xc7\x67\x31\xdf\x71\x16\x01\x4e\x67\x8b\xe6\xad\xa7\xec\x83\xaa\x85\x4d\xe6\x02\x4b\x01\x05\xb7\x73\xa3\x7b\x92\x20\x24\xa8\x66\xc1\x4c\x35\x65\x0e\xec\xc4\x69\xab\x70\x0e\xb5\x5c\xca\x82\x57\xa1\x90\xc9\x51\xaf\x96\xb9\x11\xe8\xc1\x02\x3c\x83\x82\x80\x5c\x62\xbc\x14\xac\x86\x7e\x85\x4e\x6c\xc8\x1d\x6b\xd3\xbe\xbb\xf1\x83\x3d\x8f\x5d\xef\x75\xb7\xe7\x7a\x6f\x67\x40\xd9\x19\x50\x7e\x93\x06\x94\x1b\xfb\xe8\xc6\xdf\x1c\xbf\xfd\x94\x2e\x37\xe6\xe7\x9b\xde\xf0\xcd\x3e\x20\x21\x0f\xd8\xc5\x67\x98\x67\x24\x60\xe3\xd3\x04\x1b\x1f\xb2\xbd\xdc\xe0\x03\xb7\x2c\x29\x1d\xf5\x8b\x9e\xff\x38\x4b\xcc\xc0\x65\xd8\x35\xc8\x0c\xbd\xf0\x44\x76\x99\x81\xcf\x8c\xca\xb7\x92\x68\x1e\x84\x0a\xfa\x68\x2b\x72\x1f\x04\xbb\x3d\x78\xff\x8d\x49\xa0\x72\xd3\x6d\xe4\xa8\xed\xf3\x4e\xac\x72\x43\x4f\x6e\xf0\xee\x81\x2c\x2b\x47\xe3\xb3\xac\x8c\xc9\x85\xd2\x97\x66\xe5\x06\x1f\xd0\x97\x9b\x52\xfe\xd3\xdc\xde\xaa\x14\x47\xf7\xaa\xca\x27\xfe\x92\x79\xae\x64\x2c\x6d\xbe\xa0\xd3\xc9\x59\xe0\x12\x34\x37\x60\x32\x39\xcb\x26\x11\xb5\x2f\x4d\x4b\x5a\x7a\x6e\x7d\x74\x2b\xd1\xf7\x11\x69\x5b\x06\x8e\xdf\x50\xe2\x96\xb8\x65\x5c\x1f\x21\x90\x41\xbb\x05\x0e\x77\x99\x5b\x3e\xbf\xcc\x2d\x37\xf0\xfb\x4d\xdf\x2e\x3e\x4a\xf3\x1f\xb8\xc4\x76\xd9\x56\x3e\x07\xd1\xf8\xb7\x5c\xac\x72\xc8\x18\xf0\xc8\xf4\x2b\x63\xc4\xab\x51\x7c\x94\xd2\x32\x5a\xe1\x65\xa1\xee\x5b\x0a\xfd\xbe\x6e\x49\xf6\x85\x52\x1f\x35\x98\x03\x87\xf8\xeb\xaa\x92\xaa\x92\xf5\xfa\x9d\xd9\xa3\x53\x02\x91\x60\xe4\x72\x87\xe9\xe6\x69\x13\x55\x8b\x96\x12\xad\x6e\x1c\x23\x86\xb1\x2b\x96\xa9\xe5\xaa\x21\x5b\x6c\xc2\x46\x64\xee\xf5\xb8\x90\xbd\x75\x28\x48\x4d\xfc\x76\xca\x6e\x4a\x59\xdc\x44\xf6\x2e\xc2\xe7\xc7\x7d\x49\x28\x25\x08\x39\xd2\x29\x3a\xae\xd1\x68\x25\xe4\xc5\x3d\x5f\x6b\x0b\x77\x43\x50\x1b\x9e\x96\x31\x5e\xd0\x5e\xee\x95\x32\xe4\x41\xb8\x09\x86\x9e\x9f\x57\x22\x13\x86\x1e\x93\xb2\x57\xa7\xd1\x8d\xb3\x55\x9a\x65\x5b\x28\xa5\x05\xe3\x4b\x45\x0c\x2e\xe0\xc4\xe1\x3a\x71\x8a\x2a\xa4\x35\x44\x3f\x47\xb6\x50\x5a\x94\xe1\x15\x6c\x38\x28\x75\x65\xba\x75\x86\xdf\xb2\x59\x8a\x8a\x8a\x67\x14\xea\xde\x5c\x67\x07\x98\x7a\xe7\x5e\x60\x89\x03\x84\xf4\x15\xea\x96\x5a\x2d\xe4\xed\x42\xe8\xfa\x90\xbd\xef\x4c\x60\xca\xb0\xca\x51\xf7\x09\x71\x6d\x8b\x39\x04\xeb\x33\x98\x64\xff\xfe\x72\xf2\xf2\xc5\x8b\x17\x2f\xfe\x11\x5a\xd0\x6c\xd9\x17\xff\xba\x44\x5c\x5d\x50\x69\x54\xfa\xbc\x1f\x14\x82\x62\xfa\x61\xdc\xe5\x65\x19\xe9\xdb\xdb\x70\x28\xba\x7b\xd6\xdf\xf8\xc6\x4a\x0d\x95\x98\x8b\x0a\xc6\xcc\xd9\x79\x6f\x73\xef\x9d\x6a\x74\x2d\x2a\xe7\x5c\xf2\x6f\xfb\x98\x58\x73\xa9\x15\x77\xb6\xf4\x40\xb0\xa7\xce\x8d\x75\x5b\xaa\xca\xba\xcf\x78\xf5\x11\x6b\x42\xc9\xf2\x8e\x17\xe0\x15\x83\x94\x48\xde\xfd\xef\x25\xcb\x07\xd1\x7d\xff\xa4\x2e\xec\xe0\xf7\xc8\x98\x9f\x12\x32\xe0\xf7\x9b\x80\xc5\x21\xb5\x05\xa6\xd0\xa2\x08\x59\x00\xb0\x0c\xcb\x07\xc0\xef\x17\xac\x00\xb4\x13\x1a\x30\x61\x88\x10\x93\x73\xf4\x07\x01\xa0\x75\xee\xc3\x6f\x8c\x7a\xb5\x14\x2e\xb9\x80\x19\x84\x7b\x1b\x17\x9e\x8e\x0f\x96\x69\x41\x90\x2e\xf1\x89\x42\x66\x02\x16\xbf\x12\x6e\xcd\x4b\xe5\x87\x1c\x65\x9a\x48\x6a\x97\x4f\x23\x2f\x61\xe9\xe1\x0b\x33\xf6\xbf\xc9\x7a\x71\xd9\xa0\x58\xdd\xc9\xc1\x61\xee\xf1\x23\xfb\xe5\x5a\x2d\xe5\x70\x26\x99\xad\x5c\x15\xc3\x37\x5f\xdf\x48\x47\xbc\x39\x82\xba\xb6\xbc\x7b\x07\x51\x0c\xed\xb6\x9b\x72\xd5\x88\x8e\xc5\x68\xd0\x86\xb0\x29\xdd\xcb\x8d\x7f\xd8\x12\xbc\x3b\x1f\xd6\xb1\x38\xfe\x8c\xd2\x78\x7f\x76\x17\xa0\xac\x25\x5f\x1d\x7d\x14\x6b\x1d\xba\x8d\x7a\xe9\x6f\xc9\x57\x8f\x95\xcd\x7a\x93\x64\x24\xdf\xc3\xc8\x2f\x24\xb8\x4d\x9b\x1e\xb6\x63\x0b\x55\xe4\x9a\xac\x1b\x70\x2f\xb9\x9c\xfd\x20\x9f\x80\xaf\x07\x84\x6d\xa3\x0c\xb4\x80\x23\x49\x51\xab\xe4\xcb\x84\x3b\xad\x4c\x22\xda\xcb\x00\xbe\xde\x68\x51\x39\xb7\xad\xbd\xe3\x85\x9e\x30\x55\x11\xce\xbf\x56\xf6\xe2\x2f\x8a\xa0\xb9\xc6\x42\x04\x81\xa0\xbe\x68\x66\xd3\x4c\x2d\x03\xc4\x00\x88\xb2\xa0\x00\x1d\xcf\x0a\x35\x3b\x5e\x72\x73\xf7\xa0\x90\xdb\xd4\x0b\x23\x9b\xa3\x4c\x09\xa8\x13\xf8\xdf\xf4\x16\x3c\xcc\x94\xb6\x5a\x14\xc5\x11\x18\x3e\x68\x88\x10\xaa\xf0\x3c\x7e\xba\x77\x72\x29\xeb\x0b\xa1\x57\xaa\xd4\x1b\xf1\xc2\x51\xc3\xb6\xec\xb9\xe0\x65\x5e\x88\x96\x7c\x19\x84\xc3\x8a\x4f\x22\x6b\x6a\x91\xb3\x4a\xde\x2e\x6a\x56\xaa\xfb\x87\xf9\x49\xff\xd9\x88\xc6\xcc\xb7\x7b\xbe\xe9\xc9\x0d\x91\x18\x99\x79\x02\x41\xc0\xd5\x74\x46\xf3\x24\xb5\x8f\xca\x49\x11\x28\xbd\x54\xe5\x11\xde\x48\xf6\x76\xf3\xa6\xa4\x9b\xeb\xbd\xff\x69\x44\x23\xae\xf7\x6e\x1e\x7c\xb1\xff\x0f\x7e\x3a\x96\x81\x46\x98\xb1\xdc\xa7\x91\x48\x2f\xc0\xea\x71\xbd\x37\x0d\x1e\x04\xc1\x29\xc3\x7b\xd1\xac\x54\xc9\x78\x55\xc9\x3b\x5e\x80\x9f\x78\x01\x55\x95\x4a\xc6\x61\x75\x04\x6b\xca\x5a\x42\x5e\x84\xb5\x0d\xf8\x75\xef\x82\x81\x97\xd6\x90\x15\x86\x34\x28\x2d\x63\xb6\x30\x2a\xba\x1f\xdd\x23\x87\x84\xa6\x1d\x91\x6f\x26\xfe\x16\x5f\x6c\x4a\xbc\x04\xfe\x0e\xea\x55\x56\xc9\xa5\x2c\x39\xe0\xae\x6c\x92\x2c\xd8\x6f\x7d\x54\xab\xa3\xa0\x81\xf8\x7e\x1d\xd1\xd8\x1e\x6d\xd4\xde\xbf\xfe\xf5\x8f\x07\x30\xd6\xe4\x36\x8f\xe1\xac\x70\xd2\x44\xde\x7f\x43\x0f\x1e\xd3\x4d\x2f\x07\xda\xdd\xa6\xc3\x6b\x16\x9f\x78\xb0\x69\x03\x5b\xac\xa7\xec\xac\x66\x3c\xcf\x2b\x01\x71\x5f\xf5\xbd\x62\x52\xeb\x46\xe8\x57\xd7\x25\xfb\x8a\xfd\x55\xdd\xbb\xb2\x75\xd0\x93\x4b\x70\x65\xe5\x79\x56\x98\xf1\x60\x6f\x22\xff\x33\xbc\xf5\xb7\x38\x51\x0c\x40\xcd\x40\x6d\x8a\x07\x44\xc9\x16\x30\x68\x6a\x29\xeb\x3f\x0f\xfb\xd4\xb5\x6e\x2a\x91\x9f\xaa\x12\xef\xf7\x6c\x7d\xb9\xe0\x55\x52\x58\xee\x6b\x7a\xc3\x0e\x4e\x4e\x2f\x0f\x1d\x2b\x21\x21\x16\xe9\x15\x8c\x02\x66\x28\x13\x92\xad\x49\xae\x30\x87\x81\xc2\x9f\xc2\x34\x5b\x34\x19\x6b\x21\x6d\x2d\x49\x18\x15\x23\x3e\x89\x26\xab\x6d\x62\x87\x28\x9b\x0d\x3b\x39\xbd\x74\xda\x1d\x67\x2b\xa5\x25\x94\xa6\xc7\x0f\x11\xf8\x0e\xae\x9e\x7d\xf0\xc8\xd8\xe9\xd0\xb0\x0e\x2e\x4f\xdf\x1d\xa2\xfa\x7e\x27\x73\xa3\xbf\x38\xb5\x37\x68\x7c\x14\xe4\xc1\x8c\x87\x09\x69\x6e\xcc\x2a\xab\xaa\xa6\x74\x55\x98\xf4\x86\x16\x30\xfa\xa4\x86\x25\x24\x0e\xbb\xaa\x54\xde\x64\x16\xde\x9b\x68\x8d\x8a\xeb\xc1\xc9\xe9\x4f\x87\xec\xe8\xe8\xa8\x6f\xf9\x5a\xeb\x64\xb6\xc1\xae\x13\xb8\x7f\xcc\xab\x86\xec\x0c\x27\xc2\xb4\x1e\xf1\x0c\x5e\x5d\x97\xd7\x25\x0b\xfe\x3b\x39\xfd\xe9\xa0\x38\x64\x7f\x62\x99\x90\xc5\x01\xbb\x3c\x7d\xc7\xbe\x32\xab\x6c\x7e\x3c\x66\x07\x4c\x37\xcb\xbf\xb7\x17\xe1\xe3\x3f\xa0\xc5\xc7\x43\x76\xc8\x0e\x4d\x87\x33\x79\x7b\x2b\x2a\x1a\x2f\xec\x31\xec\x93\xe0\x54\x3b\xd9\x48\xb9\x00\x93\x75\x33\x0e\xb8\xe1\x01\xd9\x58\xc4\xa7\x95\x28\xb1\xde\xaa\xb8\x03\xa0\x2b\xe4\x02\x3a\x7f\x77\x18\xdd\x52\x0b\xa8\x43\x9c\x47\xd9\x9b\xd4\x9c\x7d\xf3\x62\xa4\x22\x5e\xb4\x6f\xfc\xb6\x97\x2d\x7c\x7e\x13\xd4\x2f\xbb\xc7\x3c\x24\x2c\x57\xa9\xf3\xb9\xf1\xb6\x7f\xe8\x55\x19\x4b\x27\x0f\x92\x6f\xe3\x2e\xc6\xf0\xdf\x0f\x46\x07\x42\xfb\xb6\xd7\xaf\x36\xf1\xdc\xe4\x0b\x94\x2c\xb8\x12\xb8\x7c\x91\x98\x49\x75\x52\xc9\x86\xee\xd6\x91\x67\x99\xaa\x20\xa9\x88\x3b\x57\x77\xa2\x9a\xd9\x04\x54\x16\x11\x1b\xbd\xfc\xe3\xc5\xbb\x29\x3b\x61\xe9\x21\x0c\xaa\xed\x00\x9a\x3d\xe0\x87\x7d\xfa\xbb\xf9\x7c\x52\x7f\x87\x5e\x0e\x66\xbd\x2f\x96\x7e\x3c\x3f\x5e\xbc\x4b\x9b\x00\x06\x24\x40\xf8\xf6\xde\x64\xaf\xd5\x55\x42\xda\x6f\x35\xe8\x92\x74\xab\xc5\x8d\x05\x4b\x83\x02\xd8\x54\x05\x55\xf5\xf6\x55\xc2\x40\xde\xa7\x3b\x09\x52\xf7\xf0\x0c\x2a\xa2\xd7\xca\x39\x9d\x2c\xad\x1b\x41\x71\xca\xde\x1a\x96\x43\x79\x5b\x0c\x7f\x39\x62\xd7\x7b\xc7\x0b\xc1\x8b\x7a\xf1\xf3\xf5\x9e\xf9\x5e\x21\x6e\x79\x11\x3e\xfa\x0a\x7f\x97\x45\xe7\x49\xf0\x02\x14\xb0\xf5\x54\x53\x2f\x64\x79\x1b\x36\x85\x82\xe1\xbc\xd0\x6a\x53\x23\x33\x08\x68\xe8\xe8\xa1\x28\xd8\x4a\x54\x47\x99\x5a\xae\x54\x69\x98\x11\xb6\x62\xd9\x42\x64\x1f\xf5\xf4\xba\xa4\x58\xe7\xa0\x7d\x44\x75\x4d\x55\xe8\xc0\x84\x43\x5a\x3c\x18\x0b\x3b\xe1\xce\x50\x8a\x3d\x29\xbf\x0d\x85\x2b\x6f\x50\x77\xb5\xa8\xa1\x4c\x23\xd0\x48\x77\xc3\xe1\xf7\x96\xa2\xef\xac\x47\x48\xd4\xe9\x7d\xec\xce\x1b\x5a\x83\xdd\xf0\x57\x9d\xeb\x83\x15\xbc\x3e\x13\xd1\x06\x7e\xd6\xf3\x0a\x4c\x9d\x8c\x89\x9c\x81\x47\x16\x8f\xcb\x6a\x55\x80\xb3\x40\x05\x8c\x06\x4e\x0a\x73\x8a\x30\x4a\x26\xf0\x8e\xcd\xf0\x4e\x4e\x31\x92\x31\x97\xfc\xa3\xb5\xec\x51\x17\x13\xeb\x61\x9e\x51\x55\x56\xfa\xdd\xc6\xd5\x63\x53\xeb\x87\x04\xe3\x39\xcf\xac\x12\x41\x37\x66\xdf\x4c\x1e\xcd\x18\x75\xbb\xa7\x2d\x78\xa3\x1d\x34\x0c\xcb\x68\x52\x01\x7b\xba\xe8\x35\x98\x0e\x70\x4b\x3b\xa0\x8d\xec\xf1\xa2\xc7\x56\xdc\x6e\xd2\x3a\x39\xc9\xcb\x85\x78\x25\x41\x66\xd7\xfe\x78\x3d\xfa\x3a\x7b\x6a\x83\x5b\xfa\x3e\x1f\x63\xcc\x35\x4b\xbc\x79\xe5\xaa\xc4\xb2\x81\x1d\x1b\x4b\xb3\x3c\xdb\xa2\xb9\x20\x2f\x76\x12\x12\x99\x9a\xb3\xf6\x90\xcc\x8b\x89\x0d\x5e\x20\xba\x22\x34\x77\x3c\xf9\xc2\x3f\x78\xd5\x75\xc0\xa4\xda\x05\x86\xe9\xdc\x59\xdc\x17\x91\x68\x69\xc4\x5c\xb4\xd3\x4d\x40\x01\x92\x99\x30\x4b\xd9\x18\x4e\xad\x22\x53\x1f\xe2\x53\x8c\x78\x94\x19\xfd\x04\x31\x56\xc0\x9f\x2a\xef\x38\x4b\x1d\x5d\x49\xc9\xd8\x60\x7f\x8d\xd0\x85\x1b\x8d\x3b\x5a\x66\x45\x93\x0b\x6d\xc3\x90\x6c\x69\xb9\x57\x81\xc1\x8f\x3c\x47\xf4\xa0\x29\xe3\x47\x81\x89\xd1\x9d\x7f\x54\x03\x9c\xcb\x64\xcc\xb5\xf2\xa0\x8d\xb2\x66\xdc\xe7\x72\x70\xa4\x4f\xe0\xf0\xdd\xf5\xa0\x97\xec\x64\xc6\x88\xfa\x0f\xb3\xb1\x6c\x30\xae\xb4\x3d\x1a\xd1\x43\xf0\x68\xc4\xba\xe4\x2e\x32\x60\x17\x19\xf0\xef\x06\x7f\xda\x45\x06\x74\x23\x03\xae\xf7\x68\xdb\x8f\x2c\x7f\xb8\xde\xfb\x52\x30\xf2\xfd\xec\xf0\x29\x62\x06\x7e\xa3\x2b\xf3\x88\x68\x82\x81\xf5\x7e\xcc\xad\xf7\xac\xd1\x06\xfd\x9f\x1d\x15\x7d\x30\xe2\xf5\xe8\x16\xf4\x41\x00\x6a\xbe\xf5\xad\xbb\x8b\x47\xd8\xc5\x23\xfc\xdb\xc5\x23\xf4\x9f\xb0\xa1\xf8\x84\xcd\x6f\xc6\xd6\x84\x0d\xd2\xf3\x2e\x7e\xe1\xb3\x92\x94\xb7\x89\x5f\x68\x5d\xd2\x52\x3c\x7d\x18\xc3\x06\x65\x6d\x17\xd6\xb0\x93\xeb\x7f\x9d\xd0\x86\x0d\x44\xf9\x1c\xa1\x0e\x63\x60\x9b\x0f\xe2\xd3\x17\x1e\x10\x8d\x79\x2e\x75\x84\xce\x03\x23\x17\x90\xb6\x63\x6a\x29\xc1\x9c\x2c\xf5\x90\x57\xfa\x09\x91\x7b\x37\xe6\x67\x47\x70\x61\x02\x86\x16\x8a\x22\xb6\xb7\x58\xb7\x01\xcd\x2c\x7f\x16\x00\xdd\x80\x34\xfe\xa0\xcd\x80\xe0\x94\x38\xeb\xc8\x83\x2c\x49\xc3\x80\x3a\x42\xe2\xf4\xc1\x00\x44\x7e\xd3\xc2\x0b\x79\x43\x75\x25\x08\x39\x44\x45\x98\x18\x41\x8f\xda\xe3\x8a\x10\x76\x64\x5e\xf5\x10\xbb\x96\xdf\x25\x42\xda\x51\x87\x8f\xc1\xda\x0d\x63\xa9\x06\xe5\xb5\x00\xff\x20\x00\x90\x91\x82\xef\x48\xdd\x41\x4b\xd1\x4e\xb9\x88\x11\x8f\x1a\x9a\xb2\x30\xa1\xf1\xcd\xf5\xde\x9b\x4f\x66\x31\xae\xf7\x6e\x92\x68\xb9\x1e\xc4\x90\xd9\x00\x88\xd5\xf0\xdf\xb5\xe8\xa3\x03\x17\x94\x03\x8d\xc4\x9d\x40\xc0\xa3\xc8\x0f\x61\xb5\xa9\x7e\x4d\x2e\xea\x8a\x67\xb5\xbf\xbe\x32\xbe\xe2\x99\xf9\x02\x24\x54\xf1\xe5\x37\x5c\x5d\xaa\x16\x10\xa6\x33\x11\xbf\x63\xe1\x4c\x0e\xf8\xe1\xe0\x6c\xfe\x8f\x57\xe2\xff\xba\x88\x33\xe7\x4b\x03\x60\xac\x4d\x2d\x67\x01\x4e\x44\xa3\x7e\xdc\x36\x17\x8c\x1f\xba\xf8\x94\x15\x8d\x96\x77\xa2\x58\x23\xe3\xea\x7c\xfa\x17\x84\x16\xba\xd3\x66\x17\xea\x81\xd0\xc2\x61\xaa\x7e\xdc\x5d\x32\x0c\xe5\x1f\x7a\x77\x04\xb4\x3f\x69\xd8\x79\x52\x90\x7f\xf2\xc3\x03\x9f\x7d\x6e\x51\xf5\xb3\xc0\xfc\x8f\x19\xde\x18\x0a\x4a\x42\x5c\x37\x50\x4d\xaa\xfd\x96\x80\xed\x41\x02\x31\x77\xd2\xa5\xfc\x39\xc5\xd0\xed\x23\xeb\xa7\x5d\x02\x0e\x26\x86\x50\x12\x98\x2d\xc6\x7b\xea\x45\x33\x9f\x17\x02\x10\x8d\xe0\x9b\x0d\x11\x89\xb2\xac\x15\x72\x57\xc3\x0f\xff\xb6\x10\x25\x13\xa5\x85\x46\x7b\x80\x81\xf5\x3c\x76\x70\x9f\xce\xc5\xbf\x4f\x41\x58\x2e\x0b\x55\xc5\x0e\x9c\xda\xb2\xe2\xb2\x02\xe4\xe6\x82\xeb\x85\x0b\xbb\x14\xf0\x4f\x5f\xc2\xd1\x06\x35\xda\x01\x87\x2e\x52\x1c\x22\xf2\x7f\xc1\x0b\xc6\xe1\xfa\x76\x3c\x55\xfe\x1c\x16\x40\x58\x88\x4a\x4c\x19\xbb\x0a\x50\x0d\x66\xec\x4d\x8d\xd3\x25\x5f\x33\xae\x8d\xaa\x40\xbb\xa5\xfe\x65\x69\x4b\x04\x97\xf9\x94\x05\x6b\xee\xef\x7e\x56\xf0\xea\x16\x97\xba\x64\x37\xf8\xde\x0d\xaa\xc3\x1e\x07\xac\xe5\x6d\x09\xc6\x73\xa8\x5b\x0b\x7b\x65\x16\x44\x2b\x97\xfc\x4b\xdc\xb3\x85\xe0\x77\x6b\xcc\x0c\x66\x2f\x35\xcd\x6b\x43\x41\x54\xf8\x96\x06\x89\xdf\x38\x9c\x32\x08\xde\xb0\x01\x20\x47\x73\x9e\x61\x09\xaf\xac\x59\x3a\x5d\xdf\x10\x1b\x25\xc7\x84\x04\x74\x77\x82\xdd\x36\x32\xe7\x50\xcf\x0d\x4a\x95\x92\xd2\x68\xa5\x1a\x58\xa7\x21\x78\xe6\xef\x47\xa2\x33\x61\xa4\xef\x44\x79\x5b\x2f\x80\xcb\xf7\x84\x3a\x84\x4d\x1c\xaf\xeb\x56\x56\xf3\xd2\x1a\xa5\x3e\x44\x97\xff\x3d\x97\x30\x07\xc0\xfa\x23\xbc\x18\x11\xff\x7d\xa2\x86\x85\xd7\xfe\x11\x60\xd8\x5a\xc7\x62\xa0\x07\xe9\xe3\x42\xc4\x31\xa8\xf6\x80\x61\x62\xc5\xfe\xe8\xd2\xa8\xcc\xff\x7f\x8e\x45\xb3\xe2\xce\xf6\xad\x92\xbf\x07\xfc\x9a\x10\x9d\xf6\x60\xd3\x11\xa8\x44\x6d\xc4\x27\xb0\x5e\x95\x39\xf1\x57\x43\x89\xbc\x46\x6c\x71\x0b\xda\xd4\x3b\xe7\x4b\xa2\x17\x89\xb1\xb3\x4c\xcc\xe7\x22\xab\x51\x20\x59\x55\x82\x60\x03\x74\x60\x1d\x83\x71\x02\xdc\x92\x7f\x24\x26\x94\x4c\xf9\x67\x6e\x52\xad\x55\x26\xb1\x4e\x9d\x8f\xe1\xd4\x4c\x56\x95\x28\xc4\x1d\x2f\xeb\x51\x04\xfa\xdd\xb7\x4f\x96\xe7\x78\xac\x2f\x7f\x63\x59\xfb\xad\xf0\xb4\x20\x1d\x76\x00\xb5\x13\x00\x9c\xb5\x60\x65\xfb\x7a\x08\x50\x93\xc0\xed\x44\x80\xb1\xf8\x2b\x2d\x0d\xe6\xd5\x83\xe0\xb4\x93\x4d\x78\x31\xbe\x92\x7f\x89\x71\x21\xf1\x9b\xd9\x20\xd2\xac\xe7\x4d\x90\xad\xf3\xc3\x34\x80\xd7\x26\x88\x7c\x14\x76\xd7\x0d\x7d\xcf\x43\xa9\xd2\x96\x5b\x6a\x96\x08\xcd\xb0\xcf\xfa\xe0\x9c\x27\xe7\x67\x16\x37\x33\x16\xd3\x19\xbf\x32\x31\x5b\xe8\x60\x9d\xbf\x28\x7e\x95\xc2\xd2\x2f\x33\x95\xd4\x40\xc3\xc7\x49\x4d\xd4\xc6\x28\xc6\x50\x7c\x7b\x13\x02\x9b\x5d\x33\xee\x37\xd3\xe6\x1c\x58\xf0\xd5\x4a\x94\x9a\x09\x09\xfd\xcc\x44\xc6\x1b\x2d\x62\x48\x25\xa5\x02\x70\xef\x42\xd0\x57\x08\x73\xc4\x93\x43\xe8\x60\x47\x2e\x87\x14\x63\xef\xf8\x8d\xd4\x4c\x2d\x65\x4d\x51\x63\x73\x5e\xe0\x87\x30\x40\xe6\xc6\xbf\x78\x13\xda\x08\xc8\x08\x65\xc6\xee\x4c\x05\x50\x0a\xc8\xaf\xfe\x4c\xa9\x42\x70\x90\xa3\x7d\x27\x3d\xb6\x23\xfb\x85\x38\xf2\x97\xf0\x87\x9e\xd2\x49\xef\x36\xfb\x17\x60\x3b\x41\xcb\x75\x93\x86\x68\x25\x67\x12\xe1\x9d\x5e\x1c\xa1\x59\x93\x06\xad\xb1\x61\x0b\xb0\x2a\xf0\x79\x67\x64\x43\x48\x5a\xbb\x0f\x55\x01\x43\x48\xb4\x07\x62\x9e\xb2\x20\x89\x43\x8b\xbc\xcb\x75\x20\xc6\xf9\x1e\x67\x4d\x1d\x94\x4d\xa2\x8c\x16\xd1\xa4\xfe\xcf\x3d\x26\xc2\xf9\xbf\x98\x72\x34\x49\x4e\x2d\xaa\xc4\x4d\xc3\xdb\x94\xd7\x36\x54\x05\x53\xdc\x50\x98\x8e\xd9\xbd\x09\x8c\xc0\x99\x79\x5a\x94\xad\x59\x5d\x35\xe2\x49\x8f\x96\x67\x37\xfd\xa8\xcd\x5e\x9e\xe2\x19\x27\x14\x28\x9f\x40\xca\x8e\x2a\xe3\x1a\xb3\x60\xaf\x8a\xa6\xe2\xc5\x21\x84\xc1\x00\xf7\x20\x50\xc7\x24\xca\xbf\xcf\xc2\xa8\x80\x09\xfb\x3b\xbb\xde\x23\x64\xa2\xbe\xde\x9b\xb0\xeb\x3d\x28\x94\x7e\x8c\x0e\xc8\xeb\x3d\xf6\x0f\x7b\x4f\xbb\xc5\x1b\xe2\x63\x7e\x98\xbf\x2e\x1b\xfb\xa5\x60\xf8\xbf\xea\x34\x1f\x2c\xf9\x5c\xe2\xa6\x9f\x20\x1c\x75\x44\xc8\x7c\xf2\x85\xa1\xd8\x79\x22\xad\x23\x42\xbd\x6e\x1d\x45\x0f\xa7\x7c\x6f\xf2\x04\x76\x79\xb7\xc3\xf1\x3c\xac\x77\x37\x15\x63\x5f\x89\x5b\x5e\xe5\x85\xd1\x2c\x48\xf6\x18\x70\xb1\xfb\x11\x6f\x60\xf8\xd1\xc8\x88\xb1\x0e\x0e\xef\x79\xc2\xec\xc7\xec\xba\x8b\x84\xf0\xe2\x16\x15\xf5\xaf\x2d\x4c\xcc\x8b\x6e\xed\x64\xd5\x51\xfc\x41\x94\x64\x80\x00\xc7\x16\xe1\x8c\xc9\xf0\x2b\x61\xb4\xc0\xb5\x8e\x16\x84\x97\xc1\x07\xff\x68\x7a\x45\x3c\x35\x88\x4a\xb0\x6d\x44\x64\x8c\x88\x6c\x88\xae\xc0\x25\xdb\xa1\x25\xe8\xee\xc1\xa6\xb5\x28\xef\x44\xaf\xdb\xd7\xee\x61\xba\xb8\x5c\xb8\xef\x0f\x07\x4d\x27\x8f\xf5\xbf\x26\x7b\x66\xd1\x1e\xdc\x2b\xd4\x90\xb5\x7d\x6d\x61\x7d\x86\x65\xd8\x6c\x7d\xa6\x75\xc7\x8c\x1c\x7b\xdd\x75\x68\xf1\x9d\x3d\x3b\x93\x3d\x33\xa6\x07\x5a\xaa\xa3\xdd\x7a\x28\xab\x1c\x7e\x2f\x5c\xb5\x31\x86\xcb\xb0\xfd\x86\x23\x19\x34\x1b\x62\xbf\x60\x4f\x7a\xae\xcc\x25\x31\x9f\x35\x9f\x02\x5e\x3b\x36\x73\xc9\xd3\xa4\x0f\x91\x4b\x7e\x2b\xb0\x46\x87\x5f\xc8\x33\xf3\xe3\x85\xb8\x93\xe2\x7e\xd3\x42\x06\xcd\x28\xc6\xd0\xe6\x1e\xb3\xd9\xfa\x4d\x03\x8d\x06\xa9\x95\xc2\x02\x2d\x64\xb3\x1a\x8c\x7c\x5a\x89\x6c\x07\x06\xda\xc1\xe6\xbf\x50\x78\xcd\xf3\x02\xd2\x01\x49\x80\xac\x2b\xe4\x58\x88\xe3\xac\xb1\x40\x2f\xe1\x24\x84\xd9\x3a\xb3\x56\x23\x7c\xed\x01\x2f\x98\xa6\x78\xc1\x10\xf0\x9b\x9c\x84\x60\x23\x28\x90\x9d\x5a\x21\x66\xc6\xb3\x8f\xa2\x44\x07\x47\xca\xf7\x8e\x43\xf6\x7e\x82\x80\x4b\x3c\x7a\xd4\xe3\x40\xd9\x43\x8c\xb0\x8b\xc2\x1e\x7c\xe3\x89\x60\xd7\x43\xdf\x39\xb5\x25\x6c\x87\xa0\x29\x7d\xef\xe0\x51\x0f\xda\xa2\x58\xea\x4a\xe3\x82\x46\x2c\x5d\xe9\x67\x2c\x0f\x25\x3d\x06\x62\xd8\xbf\x0b\x53\xe8\x0e\x08\xf4\x62\x4a\x42\x44\xfd\x1b\x6a\xc6\x7b\xe3\x55\xcd\x6f\xcd\xf5\x07\xff\xf8\xff\x5f\xfe\xf5\xe4\xd5\x8b\x97\x5f\x7f\xf3\xed\x7f\x7e\xf7\x5f\x7f\xe0\xb3\x2c\x17\xf3\x67\xba\xf1\xb6\x58\xc5\xde\xc5\x7b\xf8\x4a\x01\x8b\xe3\x3d\xae\xf0\x13\xff\x30\x56\xbf\x3f\x8a\xf5\x11\xf2\xe8\x15\x97\x95\x66\xe2\x13\x60\x40\x2c\x1a\xbd\xc6\x4a\xda\xfb\x46\xd5\x76\x3d\x40\xda\x1f\x34\xdd\xd8\x30\xc7\x8f\x62\x6d\x33\x4a\xfa\xba\x74\x2b\x5e\x9b\x3b\x8d\xdd\x7c\x85\x47\xed\x88\xce\x1a\x2d\xe9\x57\x37\xd0\x91\xd4\xac\x59\x99\xcb\x10\xdc\x28\xf7\x62\xb6\x50\xea\xa3\x3b\xf6\xb5\x32\x32\x96\xa8\x96\xb2\x14\x36\x41\x11\x5c\x95\xab\x4a\x00\xc7\x02\x13\x8c\x1b\xda\x84\x92\x4f\xf2\x22\x09\x80\x1a\x5f\xa1\xcf\x91\x70\x62\x31\xdd\x11\x68\xad\x25\x37\x97\x0f\x09\x30\x66\xfe\x21\x87\x95\x25\xce\xcf\x1f\x0d\x6a\x74\xee\x18\x2e\xd6\x4e\x7b\x54\x34\xe7\x10\x47\x8b\x0f\xfc\xbf\x36\x2b\xce\xae\x26\x54\x57\x6d\xb6\x54\x2a\x75\x3c\x76\x26\x53\xe0\xfb\x47\xf2\xcf\x78\xd0\x5b\xb2\xb8\x61\xe8\x4a\xa7\xb1\x9d\x6e\x25\x74\x53\xb8\xcd\xac\x50\x5a\xb5\xe1\x07\x63\xcf\x68\x28\x99\xd2\xd5\x94\x10\x4e\xe9\x41\xf7\xd8\x92\x9b\xd6\x5f\x7c\xe8\xec\x2e\x0a\x2b\x21\xdf\x0b\x2f\x19\x93\x37\xb7\x6a\xca\xb4\x59\x9c\x37\xb9\xac\x4f\x36\xb2\x89\x56\x0b\xe7\x8c\xe5\x79\x8e\xfd\xd7\xad\x6a\xac\x28\xb4\xd1\x1a\xf1\x7c\x29\x35\xc8\xd1\x2e\x63\x94\x4b\x32\xcd\x1a\x6d\x08\x65\xff\x24\xcf\xfd\x07\xf6\x09\x53\x00\xec\xc3\xdf\xe1\x98\x7e\xe5\x08\xec\x3f\x64\x70\xed\xed\x1e\xd3\x4c\xe7\x39\xa6\x97\x30\xeb\x5a\x49\x5e\xdb\x3e\x0e\x1f\xc7\x05\xfa\xa2\x56\x2e\x30\x16\xc5\x8f\x18\x3d\x12\x4d\x09\x43\x76\xbb\xa6\xc9\xbd\x21\x4b\xe2\x8d\x60\x31\x96\x68\xcc\xf5\x2e\x0d\x80\x4c\xb4\x2f\x02\xc8\xae\x24\x35\xbb\xaf\x54\x79\x3b\x65\xec\xbf\x9d\xda\x0f\x6f\xd7\x55\x53\x82\xdf\x13\x1d\xf0\xe8\x3f\x2e\x94\x91\xdb\xaa\x4a\x55\x20\x21\x95\x2c\x97\x7a\x55\xf0\xb5\x4f\x1f\x00\xfa\xdf\x03\xaf\xbf\x52\xd4\x54\xe0\xd2\x48\x1d\x7f\xbd\xba\x3a\x3f\x2b\x6f\x2b\xa1\xf5\x39\xaf\x17\x9b\x4e\x58\xab\xa9\xf7\x50\x83\x07\xd7\xfc\x02\xf9\xa3\xb8\x65\xfa\x46\x38\xcf\xd4\x12\x90\xc3\x55\xd1\xca\xf3\x0b\xed\x8d\x3a\x38\x57\xd5\x3d\xaf\x02\xb2\xb4\x6f\x0f\x9c\x42\x6a\xd6\x3d\x85\xf6\x41\x67\xfc\xdf\xd3\x5d\x14\x2a\x87\x01\x8a\xd8\x1a\xc1\xbc\x36\xa2\x68\xbb\xc1\x9f\x5c\xf1\xf9\x5c\x66\xee\x24\x85\xc3\x1e\x23\xa4\xfa\x55\x37\x32\x3e\x2d\x23\x8d\x08\xf2\x68\xd3\xe2\xb7\xf0\x78\x66\x95\xa4\x75\x59\xe5\x8c\xdf\x72\x59\xea\xda\xaf\x20\x2a\xad\xd2\xae\xb3\xcb\x29\x70\x8a\xf8\x38\x73\xb7\x63\x0e\x2f\x4b\xa6\xd9\x82\x83\x60\x50\x61\xae\x77\x22\x71\x0f\x15\x75\x0a\x0f\x2f\xd8\x35\x8c\xea\x7a\x8f\xad\x78\x45\x37\xe3\x8f\x17\xef\x28\x47\xb8\x2c\xd1\x42\x79\xf1\xf6\x94\x7d\xf3\x87\xdf\x7f\x37\x65\x66\xb0\xda\x9a\xee\x6f\xcd\x61\x41\x72\xd8\x3f\xde\x9f\x22\x80\xaa\x29\x03\x8c\x08\xa0\xb4\xe0\x15\xf8\x7a\x7b\x0e\x88\x41\xa1\x89\x27\x8d\xc5\xe6\xe5\xab\x24\xc6\xf7\x9c\x9e\x78\x99\x43\xd3\x4d\x4e\x12\x47\x14\xba\x0b\x8b\x6c\x89\x13\xa7\x01\x2f\x93\x5c\x1a\x80\xa2\xe6\xca\xac\x97\xd3\x87\xf5\x2b\xf6\x15\x7b\xf3\x89\x67\xf5\x2b\xcc\xd9\x4e\x9f\x31\x8b\x04\xbb\x23\xcc\xb3\x62\x3d\x65\x5f\xb1\x73\xe0\x63\xbe\x1d\xd6\xaf\x35\x3a\x9b\x6f\x8e\xbc\x8e\xe9\x55\x21\x6b\xb3\xb4\xb0\x70\x36\x19\x3c\x93\xfa\xba\x64\x98\x47\x11\x5e\xc3\x2f\x60\xb9\x4e\xd3\xda\xfd\x95\x6b\xa9\xa7\xec\x24\x6e\x00\x84\x6e\xef\x44\xd3\x91\x95\x76\xb0\xae\xad\x95\xbe\xe1\x1d\x37\x00\xf3\xcb\xfe\xf1\x3e\xd3\x62\xc5\x2b\x5e\xab\x6a\x1a\xb8\x4c\x8d\xcc\x64\x3a\x42\x41\x11\x6a\x1b\xc3\x24\xc0\x39\x0a\x19\x2e\x56\x36\x0f\x38\x8e\xe1\xe8\x5e\x6a\xcb\xd0\x21\x78\x93\x96\xd5\x74\x62\x3b\x35\x5d\x24\x52\xd9\x43\x64\xa0\x9d\x8a\x15\xaf\xe9\x6c\xa0\xb8\x06\x54\x61\x7a\x52\x89\x37\x64\x19\x7d\x60\x42\x39\x9f\x4a\x55\x33\x4a\x82\xce\x0e\xc4\xf4\x76\xca\x8e\xe7\x4a\x1d\xcf\x78\xe5\xe6\x25\xb4\xfb\xed\x78\xc6\x7f\x9e\xa4\x1c\xae\xb6\xc1\x8c\xff\x7c\x38\xbd\x2e\xbf\x62\x67\x4b\x5b\x45\xd5\xa2\xfe\xe5\x5c\x66\xaf\xd8\xd9\x30\xf9\x39\x31\xda\x8c\xc0\x3c\x25\x4e\x71\x5a\x70\x6d\x04\xf6\xa8\x67\x54\x9d\x6a\x23\xbe\xa0\x45\x85\x63\xfe\x33\xd8\x2c\xe1\x08\x19\x56\xa5\xa2\x76\xd2\xa6\xa9\xc1\x6a\x04\xb5\x22\xca\x34\x2d\x80\x94\x71\x5d\xc1\xd2\x31\xbd\x2e\xdb\x1f\xb4\x79\x40\x21\xd6\xbd\x56\xb6\x2e\xa9\x3b\xcc\xf4\xe2\xd6\xc2\x63\x7c\x29\xb5\xd8\xe3\x3f\x46\x5e\x60\x17\x4d\x21\x7e\x32\x07\x73\xe4\x2d\xe6\xda\xc7\xf2\xff\xa2\xae\x57\xbe\x04\x35\x86\xc7\xd0\xd5\x4b\x77\x8b\x06\xbb\x13\x26\x77\xc4\xe4\x70\xb6\x04\xf9\x75\xf3\xe2\xc5\x37\xd9\x42\xe9\x1a\xfe\x26\xe8\x07\xe0\xa3\xf0\xc3\x9f\xf1\x07\x2d\x78\x95\x2d\x0c\x5f\xc5\x9f\xd9\x11\xfd\x69\x15\xa6\x7b\x4c\x97\x0f\xff\x37\xcd\x5c\x28\x6b\x53\x15\x2c\x53\x55\x05\xa9\x0f\x61\x0f\x2c\x07\x9e\x58\xb3\x26\x99\xe3\xec\x55\x65\xd1\xa3\x64\x3d\xa6\x2b\x04\x8e\x68\x8d\x0e\xa2\x79\x4d\x36\x18\x38\x35\xe6\xc4\xf3\xd2\xc8\x43\x73\x45\x25\x96\xe7\xb2\x32\x0f\xfe\xbc\x6f\xc8\x64\xff\x77\xfb\x83\xa5\x52\x0c\x5f\xef\x5e\xcd\xf8\x73\x57\x5c\x65\x99\x11\x02\x33\x7b\x2a\xf0\x56\x20\x33\xf8\x2a\x34\x01\xfa\x0d\x78\x84\x76\x15\x5f\xc5\x6d\x01\xe8\x09\x92\xe5\x6c\x96\xb0\x36\x52\xf3\xd9\xf9\xf7\x85\xca\x3e\x6e\x54\x74\xb0\x49\x50\x02\x82\x03\x85\xc8\xac\x29\x78\xc5\x4e\xcf\x5e\x5f\xb0\x83\x37\x9f\xa6\xec\x7a\xef\xe5\x1f\xbe\x9e\xbe\xfc\xee\xf7\xd3\x97\xd3\x97\xc7\x5f\x7f\x7b\xbd\x37\xb9\xde\xfb\xfa\xc5\x8b\x97\xaf\xf2\xd9\x1f\x5e\xbd\x3a\xfe\xee\xdb\xeb\xbd\x43\x62\xb3\x11\x94\x94\x14\x23\x2f\x76\x40\xd5\xdc\x0f\x38\x50\x44\xcf\x19\xa6\xb6\x6f\xce\x46\x6e\xab\xdf\x23\x5e\xd2\x88\xb1\xab\x1a\xdd\xf5\xc1\x08\xcd\xa0\xe2\xb2\xf7\x64\xc7\x25\xcb\x43\xee\x2d\x4c\x94\xc5\x69\x88\xc2\x32\x99\x57\x5d\x02\x83\x5f\xbb\x8a\xbe\x59\x92\xd0\x9a\xdd\xb1\x63\x9f\x9d\x33\x5c\xd4\x9f\xa0\xe6\x07\x9d\x6a\x5b\x66\xb9\xbd\x8c\xe8\x93\x69\xad\x64\x4a\x42\xc1\xd5\xe8\x0e\xe8\x0d\xae\x52\x9c\x56\x6c\xf4\x1a\xf1\xf2\x29\xc6\xcb\x68\x10\x28\xc9\x38\x66\x61\x41\xbf\x74\xf3\xae\xa1\x4b\xd5\xd4\x5a\xe6\xc8\x0a\x60\x31\xa1\x00\xcd\x78\x0c\xc6\x03\xf4\x12\x3a\x31\x1b\x0f\x02\x36\xc1\x65\x8c\x39\x48\xe5\x93\xb2\x01\x5d\xbb\xb2\xd1\x99\x2a\x4b\x6c\x06\xec\x04\x32\x9b\x47\x3e\x88\x48\xb6\x0d\x54\x99\x93\xd2\x5e\xc5\x56\x2e\x74\xc1\x04\x70\x66\x6e\xe5\x9d\xb0\x2a\x04\x98\xdf\xc0\x0b\x54\xac\x8f\xe0\x13\x10\xb3\x64\x94\xa0\x09\x2b\x14\xcf\xd9\x8c\x17\x00\x3c\x27\xad\x62\xc2\x50\x4c\x35\xb7\xf6\xe5\xe5\xbb\x09\x53\xf3\xb9\xa8\x10\x79\x81\x82\xe2\x9d\xac\xea\x86\x17\xcc\xdc\x2c\x60\xd5\xaf\xb3\x5d\x8e\xa9\x9d\xb3\xec\x37\xe2\x2c\xeb\x78\x91\xbe\xe8\xc8\xf3\xd1\x0e\x3c\x32\x50\xda\xd4\x51\x2e\x96\x2d\x90\xfb\x3f\xc3\x94\x48\x49\x4b\xc6\x78\xcf\x60\x32\x7a\xef\x4b\x9c\xf1\x38\xaf\x62\xf2\x56\xeb\xba\x12\xd3\xcd\x9e\xc8\x7f\xb8\x51\xb9\x1a\xbe\x60\xbd\xdd\xcc\x09\x9c\x45\x11\x5c\x98\x18\x26\x8e\xf1\x46\x0e\x49\x56\xe6\xcc\x28\x86\xc3\x97\x94\x65\x88\xfd\xc1\x22\x64\x45\xc0\xf9\x5d\x88\x79\x90\x50\x29\x34\xa7\x7a\x84\x7b\xd9\x45\x07\x06\x04\xe6\x6e\xad\xb3\x79\x84\x8a\x0f\x4d\x53\x76\x1e\xd3\x0f\xe6\x0a\x86\x08\x36\xfa\xe1\xdc\x68\xbb\x60\xe3\x22\xe6\xea\x5e\x23\x88\x34\x5c\x04\xcb\xc6\xdc\xd6\xc5\xda\xc7\x29\xbb\x00\x33\x30\x8a\x5d\x5b\x50\x16\x06\xa9\x0e\x11\x60\xa6\x2a\x01\x19\xa0\xd6\x2b\x91\xbf\x53\x19\x2f\xdc\x62\xf8\x8a\x71\x34\xc2\x5e\xdc\xa9\xb7\x75\x9a\x11\xda\x1f\xc1\x64\xf0\xbd\x95\x72\xb6\x99\x81\xdd\x9e\x71\x53\x48\x9f\x21\x1c\x84\x33\x83\x0e\x9c\x25\xb3\x0c\xc7\x1b\x97\x61\xc4\x99\x8a\x3f\x39\xe6\xa4\x80\xed\x65\xc4\x39\x81\x76\x9d\x08\x69\xf8\x31\xa6\xc0\x49\x68\x76\x26\x33\x9b\x25\x4e\xc3\x1a\x50\x95\xba\x91\xf8\x13\xf4\x30\xf5\x1a\xa9\x19\xab\xd4\x47\x14\xe9\x75\x04\x8f\x6f\x02\xe7\xa9\x95\x4f\xad\xda\x6f\x9d\x4e\x24\x0e\x97\x91\x49\x29\xf0\x7d\xd8\x04\xde\x22\x77\x25\x20\xd1\x6a\xcb\x99\x96\xe5\x6d\x11\xdb\xa2\xfc\xd1\x81\x94\xc3\x60\x7d\xf2\x43\xa0\x92\x92\x35\x24\xd9\x2a\xc5\xbd\x9b\x9e\x87\xb6\x1b\x2a\x52\x4d\x6d\x44\x77\x1c\x88\x8b\x6e\x70\xce\x2a\xad\xe5\x6d\x09\xc5\x61\xa4\x2b\x4b\x89\xad\x77\xb2\xef\x4e\xf6\xdd\xc9\xbe\xbf\x71\xd9\x97\x6c\xde\x5f\x86\x38\x08\x83\x25\x38\xc6\x03\x24\x42\xff\xfa\xf3\x48\x7b\xd0\xff\x50\xba\xbf\x76\xdb\x94\x65\x25\x6c\x23\x76\x29\xfd\x3e\x13\xe6\xdc\x93\xd2\xef\xcc\xfc\xdc\xce\xa9\xdf\xbb\x83\x8f\x34\xa4\x47\xd2\xd2\x2e\x73\xdf\x2f\x7e\x63\x60\x78\xa1\xbd\x2d\x7e\x99\xdc\x79\x1b\xe4\xe5\x47\xa6\xc9\x1b\xe0\x92\x23\xb9\x18\x5c\x35\xab\x4a\xdd\xc9\x5c\xf4\x41\xa5\x9d\x84\xee\x45\xe3\x51\xf9\x8a\x08\xb9\x94\xc6\x15\x3a\xd0\x14\x78\xdd\x89\xb9\x84\x19\xee\x02\xe8\x53\x68\xf2\xa7\xa2\x8d\x40\xc4\x28\xe9\xa2\x4e\x06\x56\x6c\x54\xb5\x73\x39\x07\xe5\xa1\x66\xd7\x7b\xf3\x82\xdf\xa9\x4a\x5f\xef\xf9\xea\x8e\x41\x91\x3f\x52\x2d\xb4\xf9\xac\xff\xde\x34\x8e\x5f\x5d\xab\x06\x4e\x0f\xd4\xc3\xf2\x7d\x9f\xc7\x69\x7a\x5c\x3f\xd2\x3a\x84\x01\x2e\x18\x74\x0a\xc3\x0c\xf2\xbc\x38\x71\x1e\xf3\x52\xa8\x25\x97\xe5\x11\x15\xe4\xca\xd1\x57\x5c\x2a\xcc\xc8\x02\x09\x63\xbe\xfe\xcf\x17\x21\x38\x45\x96\xac\x80\x5c\x28\x13\x06\x9e\xf9\xeb\x3d\x9e\x2d\x05\xe8\x3e\xb8\x47\xbe\x9a\x61\x75\xbd\x17\x65\xa3\x33\x2a\xec\x72\xd9\xd4\x7c\x16\xb9\x91\x42\xe0\x88\x9d\x5b\x0a\x3a\xe2\xe6\x4d\x4e\xe1\xf2\x23\xe6\x60\xcb\x1a\x5d\xab\xa5\x67\x49\x84\xa8\x01\x07\xaa\x43\xa2\xb5\x92\x1d\x05\x59\x8e\xe3\x85\x32\xdc\x6c\x45\xaf\xc8\x0e\x45\x38\x80\x01\xdd\xa5\x08\xe7\x0d\x52\x27\x3d\x91\xd1\xe0\xd1\xfa\xf6\x98\x43\x3b\x52\xea\x18\x10\x38\x76\x92\xc6\x17\x2b\x69\x3c\xb9\x88\xb1\x93\x2e\x76\xfa\xe8\x2f\x22\xc9\x3c\x8b\x10\x33\x94\x23\x29\x68\xd6\x36\x26\x56\x54\x46\x6e\xb5\x0a\x61\xb4\x9a\x35\x65\x2e\x2a\x43\xf3\x3e\xd1\x9b\xc2\x62\x7d\x88\x71\x2d\x00\xd4\x6f\xa1\x45\xd6\x4b\x1d\xe0\x73\x23\xcc\x25\x82\x7d\x5c\xdc\x18\xd9\xf7\xa1\x47\x00\x84\x4c\x30\xcf\x4b\xa5\x9a\xba\x83\xda\x0d\xd3\x56\x81\x9d\x18\x13\x98\x11\xb8\xad\x8d\xbb\x1a\x96\xb3\xcc\x57\x13\x18\x2e\x85\x77\x05\x40\x93\x9a\xa2\x58\xb3\x7f\x36\xbc\xc0\x99\xa3\xa4\xe1\x64\x2d\xce\x68\x13\x60\x02\x93\x5e\xf0\x2a\x41\x0e\x43\x8c\x67\x2e\xee\x24\xc1\xde\xdc\x89\xbf\x86\x11\x05\x90\x58\xc4\x7b\x9e\x85\xfd\xca\xd2\xf5\xfb\x8a\xbd\x9c\xb2\xb3\x73\xed\xb2\xba\xda\xb0\xb6\x00\xa0\xeb\xc5\x4e\x8f\x47\xcb\xcc\xcd\x52\x9a\x87\xab\x15\xa0\xf4\xa0\xb8\x31\x21\x55\xc8\xbf\x01\xb2\xad\xc3\x42\x82\xd0\x66\x19\xee\x75\xf9\x35\xd9\x90\x5f\xdd\xb0\x5c\x60\x7e\xd2\xca\x42\x1e\x2b\x61\xe8\x04\x28\x82\x12\x04\xad\x54\x55\x77\xc7\x78\x5d\x5e\xd7\x2c\x18\x28\xc2\x82\x08\x09\xec\xe1\x10\x20\x6e\xad\x0a\x99\x49\xd3\xe8\xd5\xef\x5f\x00\xc1\x00\x88\x8e\x97\x39\x76\xf2\xea\xdb\x6f\xbf\x71\x3f\x9b\xf1\x7d\x4f\xf5\xd4\xb4\x40\x10\xfd\x82\x97\xb7\x3e\x04\xac\x31\x3c\xa1\x8f\x3c\x53\x58\x68\x20\xce\x00\xaf\xd6\x21\x34\x4c\x5e\x44\x0d\xa5\x8e\x91\xc8\xa1\xfd\x1d\xa8\x1a\x3d\x5c\x16\xf2\xed\xa0\xba\xf5\x22\x94\x6b\x3b\xdf\xb8\x2e\xaf\x4b\xa0\x4c\x32\xc0\x5f\xef\xad\x2a\x91\x49\x2d\xae\xf7\xc2\x4a\xe2\x21\x81\x5a\x23\x38\x20\xcc\x09\x02\x82\xa9\x0b\xeb\x2e\xf1\x12\x46\xf5\x7a\x6f\xae\xd4\x74\xc6\xab\x69\xa6\x96\xd7\x7b\x87\x88\xee\xb9\x97\x45\x9e\xf1\x2a\xbf\xde\x9b\xf4\x7d\xcc\x09\xdf\x84\xcb\x26\xab\xbe\x7d\x13\x91\xc0\xee\x23\x5f\x4d\xcd\x67\xf0\x13\x48\x4c\xae\xa1\x13\xd3\xd9\xfe\x57\xfb\xe8\x0c\xe3\xab\x95\xe0\x95\x39\x52\xb2\xd6\xa2\x98\x33\xae\x03\xe0\xe0\xeb\x0f\x97\xd4\x3b\x8a\x37\x41\x26\x25\x37\x0c\x78\x3e\x65\xff\xab\x1a\xb3\x7e\x86\x0e\xb1\x42\x6f\x7b\x7c\xfe\x13\x38\x52\x58\xf1\x3f\xfd\x09\x83\xe4\x0f\x31\x1c\x1e\x68\xc5\xba\x11\x52\xf4\x02\x2f\x91\xb6\x50\xb6\x8e\xfd\x3d\x5f\xe3\xb1\x9d\x33\xcb\x67\x68\x1f\x27\x51\x3a\x0e\x9f\xd0\xc3\x16\x1e\x24\x41\x1e\x48\x1f\x36\x6c\x21\x78\x8e\xe7\x4e\x18\x06\x65\x78\xa5\xe9\x72\xca\xbe\x8e\xba\xf7\x73\x24\xd6\xfa\xe0\xcf\xd4\xca\x7f\x09\xa8\xb5\x99\xcf\xe5\x27\x76\x50\x89\xa5\xba\xb3\x77\x06\xee\x09\xac\xe6\xa1\x65\x20\x6e\x91\x5b\xd8\x3b\x2f\x23\x98\xcf\x3d\x0a\x5d\xe9\xd1\xb9\x0f\xc6\x4f\xfa\x2e\xc6\x5e\xb4\x83\x70\xe0\x0e\xeb\x0d\xae\x5c\x8e\xeb\x6d\xb4\x3f\x60\xc3\x96\x82\x3a\xa1\x0a\x8e\xbd\x54\x94\xd1\x50\xf3\x5a\x6a\xcf\x5c\x02\xc8\x7c\x7c\x6b\x7a\x6e\xe2\x80\x66\x9e\xdf\x2e\xe5\x27\xe0\x05\x4e\x27\x07\x29\xce\xc3\xdb\x64\xd7\x35\x67\xbe\xe0\xc3\x3a\x26\x4c\x2b\x1b\x83\x90\x0e\x63\xb0\x79\x96\xb4\x18\xe1\xa9\xff\xf2\x28\xa0\xe5\xec\x1d\x26\x83\xf8\x85\xd8\x63\x1e\x40\x0d\x92\xce\xf3\x27\x4c\x0c\x02\xa8\x03\xd9\x17\xa1\x84\xdc\xd8\x22\x2d\x60\x0b\x6d\x46\x53\x6f\xa7\xf1\xe8\x07\xe2\xc4\x2d\xf4\x43\xd2\x2e\xa2\xaa\x84\xb0\x75\xae\xaa\x20\x7a\xb2\x3b\x98\x13\x14\x0a\x50\xe0\xaa\xe8\x1f\x98\x96\x55\x6a\x1f\x2c\x80\x52\x64\x72\x9d\xb7\xc7\x0f\xc4\xef\x9b\x11\x6e\x49\x52\x89\x0e\x46\x11\xd4\x38\xdb\x23\x88\x66\x1e\x2e\x13\x2e\xbf\x0d\xde\x63\xf7\x52\x2f\xb0\xba\x36\x6c\xde\xf0\xf1\x23\x07\xf8\xf7\x7d\xe1\x6d\xaf\xa3\xe7\x96\x7c\x5c\x00\x76\xd7\xc8\xd8\xce\x2e\x59\xee\xbb\x14\x82\xe5\x1a\x2f\x02\xc3\xd7\xb0\xc0\xb1\x2b\x4b\xe0\xc5\xa6\xd6\x07\x1d\x2f\xf1\x80\x98\xb3\x79\xbb\x11\x89\xa0\x5a\x50\x1d\x70\x18\x4a\x3b\xf5\x76\x98\xed\xd2\x0f\x48\xcd\x03\x1d\xc8\xc5\x36\xac\x2c\x2b\x75\xe8\x5c\x6f\x6a\x7b\x82\xb0\x3c\x19\x18\x93\x3f\x24\xcf\xea\x59\xab\x45\xaa\x9c\x49\x04\x9c\xa0\x1c\x89\x41\x6a\x5a\x73\x9c\x03\xbd\x29\x6a\x6d\x2d\x53\x14\x78\xda\x0a\x98\x75\xd6\x58\x1b\xe9\xec\x7a\x44\x7b\x55\x41\xf9\x2f\x05\xcb\xcd\xb5\x86\x25\x89\x6f\x5a\x58\x12\x52\x1a\x3a\x40\x12\x34\x14\x1b\x02\xba\xe7\x55\x6e\x56\x76\xb9\xe2\xb5\x9c\xc9\x42\xd6\xeb\x09\x46\xa6\x12\xa6\xc4\x01\x3f\xcc\xdd\x27\xe2\x2a\xfa\x08\x0c\x33\x5f\x17\x39\x54\xa2\x51\x77\xce\x90\x82\x79\xb6\xaf\x62\xeb\xa7\x51\x08\xc4\x52\xd6\x46\x2e\xe2\x15\x18\x58\x49\xe4\x41\x89\x8d\x43\x1a\x11\xf7\xc9\x96\xe1\xda\x1a\xc9\xda\x91\x4b\xd6\x8a\x77\x72\x7e\x66\xcf\x81\xbc\x2d\x8d\xc2\x40\xeb\xbd\x09\x93\x12\xe2\xbf\x5b\xf0\x17\xca\x86\xb9\xe4\xd5\x47\x34\x76\xd3\x39\x9d\xb8\x58\xe1\x08\x8d\xa3\x45\xdd\x49\xd3\xec\x72\x56\xd3\x7a\xbc\xb5\xa9\xca\x03\x87\x05\x61\x86\x5a\xd4\x4e\x34\x12\x26\x3a\x4f\x97\xed\x4b\xd7\x39\x3f\xf1\x31\x4f\x46\x8e\xc4\xa3\x65\x47\xea\xf0\xed\x31\x3a\xf3\x6c\x1e\x2b\x4f\x50\xe8\x1e\x05\x1f\x97\xb3\x2a\xd4\x9e\x80\x22\x4a\x67\x8c\xb0\x33\xef\x46\xf9\x3e\x8d\x6d\x70\x8b\x72\xe4\x75\x91\x58\x92\xab\x77\x97\xb1\x0d\x7f\xda\xd2\x80\xdd\x3d\x6a\xb4\x17\x0a\x7f\xd3\x5e\x10\x33\xef\x9b\x9f\x26\xec\xdb\x6f\xbf\x81\xd5\x5a\x36\x45\x2d\x57\x85\xcd\xc2\xec\x29\x11\xd6\xde\x66\xf3\xf5\x04\x6c\xb6\x42\x4f\x30\xf8\xc2\xe9\x30\xd4\xc7\xa7\x40\x11\x05\x95\x0e\x62\xef\x5a\xb5\xe5\xa1\x07\x60\x3f\x5e\xbc\xac\x17\x95\x6a\x6e\xd1\x1c\x73\xf9\xe1\x0c\x86\x49\x89\xf0\x0d\x6d\x49\x9b\xe9\xa2\xcd\x43\xd9\xbc\x29\xe6\xb2\x28\xac\xee\x60\x5b\xb8\x89\x5f\x7e\x38\x7b\xf2\x3d\xbc\x7a\x77\xf9\xf4\x61\x58\x2d\xde\x3e\xd2\x4e\x37\xdc\xcc\x0c\x76\x94\xe8\x30\x9c\xc1\x22\x6c\xe8\xc4\x87\x61\xc0\xf4\x70\xd5\x53\xc5\xf3\xef\x31\xe2\x24\xe1\xae\x7c\x17\x3c\x0d\x13\x18\xa7\xea\xf6\x82\x75\x5f\xf1\xfc\x88\x02\x58\x46\xdd\xb1\xd6\x11\x15\x7e\x68\x24\x7a\xda\x7a\xa0\x12\xaf\x8e\x59\x73\xb3\x37\xc3\x0b\x6e\xce\x42\x2c\xac\x41\x0d\x52\x38\x5b\x05\x5f\x8b\x8a\x69\x91\x35\x50\x4b\xa0\x6d\xdd\xdc\xc6\x65\x0c\xe7\x3a\x6d\xcb\x44\xf1\x8a\x47\xdc\x58\xfb\xb8\x2f\x92\xeb\x81\x35\x99\xfe\xa0\xf6\xb4\x08\x0a\x14\x50\xf8\xb6\xcb\x31\xdc\x58\xbb\x81\x93\x44\x8e\x89\xaf\x53\x57\x75\xa1\x2f\x45\x56\x89\x7a\x6a\x05\x34\xe7\x97\x72\x96\x00\xb8\x12\x2c\xe6\xd7\x3a\x32\xcd\xe6\xcf\x42\x62\x49\xb1\x09\xa9\x3d\xd2\x55\xce\x59\x21\xe6\x75\x78\x67\x3c\x4d\xf2\x5e\xcf\xc7\x35\xcc\x24\x2d\x9d\x5d\xba\x67\x29\xb9\x0c\xdf\x74\x37\x9e\x0f\xc2\x32\x4b\x6d\x2f\x30\x55\x22\x9b\x05\x7e\xfe\xd6\x7a\x98\x61\x52\xce\x85\x5b\x2b\x8a\x33\x33\x2f\x1a\x15\xdf\x2c\x84\xb3\x1b\x1a\x86\xeb\x78\x32\x2f\x54\xe9\xed\x91\xf6\x11\x2a\xf3\x66\x7e\xa2\xc4\x95\x9d\x17\x90\xac\xdc\x19\xd1\xaf\x81\x52\xae\xf7\xac\xb5\x07\x65\x21\x18\xfa\xac\x6d\x44\x9e\xb4\xfa\xa6\xcd\x87\x4d\xb4\x56\x46\x55\x82\x20\xe5\x0a\x45\x38\xb3\x98\xb7\x26\xb9\x97\x68\x46\x4f\x92\x70\x24\x0a\x23\xdd\x74\x3a\xa3\x86\xc1\x01\x85\x8c\x2a\xd6\x2e\x1a\x48\x19\x2e\x97\x05\x28\x9a\x94\xbf\xe9\x5c\x85\x1e\xaf\x1d\x56\x78\x87\x15\xde\xf9\x66\x3f\x17\xdf\xec\x58\xac\x30\xde\x77\x41\xc6\x0c\x0b\x1a\x9e\x89\x05\xbf\x93\xaa\xf2\x0a\x54\xc4\x33\xb6\xd7\xff\x3b\x21\xee\x5b\xca\x98\xdd\xf7\x9f\x18\xcd\x1b\x7d\xe0\xcd\x28\x77\x72\xcf\x2b\x7d\xe9\x03\x6c\xde\x3b\xe2\xab\xed\xec\x00\x46\x3b\x56\xf3\x87\x66\x07\xb0\xbd\x06\x02\xca\x4c\xd5\x0b\xeb\x7f\x84\x74\x16\x64\xbc\x80\x42\xea\x90\x97\xae\xe6\x47\x54\x8c\xb3\x64\x2f\xa7\xbf\x1f\xe4\xe6\xd0\x59\x42\xcc\x25\xd9\x2a\x87\xda\x41\x54\x8b\x0e\xbe\x6b\xa8\x47\x35\xf5\xad\x02\x06\x84\x43\x9c\xb2\x37\x3c\x5b\x30\x23\x97\xc4\xb2\x95\x04\x3b\xc8\x0c\x1c\xbd\x98\x0a\x8d\xb3\x42\xdd\xca\x8c\x17\xec\x87\x8b\x44\x91\x14\x4c\x29\x66\x34\x7a\xa9\x4d\xfb\x49\xe0\xc9\x09\x2b\x21\xe0\x58\x0e\xec\x12\x91\xa3\x16\x4a\x96\xe0\x1a\x9b\x06\xa9\x2a\x2c\xc4\x12\x61\xf9\x9c\xf8\x1e\x55\x0e\x32\xb3\x70\x9e\x25\xfb\x6d\x42\x14\x7a\x29\x07\x4b\x78\xd4\xe1\x36\xd9\xe1\x85\x9d\x81\x2c\x44\x62\x64\xab\x74\xcb\x23\xb5\xbf\x88\x84\xc8\xa6\x3b\xd9\xab\xd5\xa8\xbd\x4c\x6f\xa3\xa3\x55\x4c\xe7\x62\x65\x20\x97\x64\x82\x11\x6e\x29\xdc\x61\x04\x51\xf6\x6e\x31\x33\xb4\x46\x96\x81\x07\x6f\x76\x34\xf0\x0d\x7b\x1e\xb4\x7b\xdc\xd6\x3f\x76\xd7\xfd\x41\x10\x58\xc5\xf5\xf9\x36\x5e\x40\x56\xfa\x87\xf3\x5d\xe8\x60\x2c\x0f\x1d\xb6\xfc\x47\xcd\x47\x42\x78\xfa\xde\x79\x20\xd3\x7d\x5c\x4a\x96\x61\xa6\x6b\x64\xa6\x61\xfd\xd5\xb4\xea\x3f\x8a\x2e\xac\x0f\x8c\x9e\x41\x1e\x67\x2a\x34\xcc\xb3\xcc\xba\x3f\x3e\xc7\x03\xe9\xea\x02\xf5\x9f\x45\x6c\xf2\xf9\x1c\x43\x90\x74\x9f\xff\x20\x4e\x86\x2e\x54\xa4\xa3\xf6\xbe\x63\xbd\x66\xd8\x74\x69\x48\x40\x95\xc3\x7b\xbf\xbb\x72\x3f\x87\x2b\xf7\xf3\xe4\xbc\x43\x28\xf2\x4e\xe3\x38\xa7\x5b\x6c\x4c\xb0\x35\x81\x76\x98\xf2\xcf\xc2\x5c\x30\x84\x29\xf7\xdb\x68\x57\xaf\xb3\x7f\x4f\x79\x0e\x76\xf0\xf2\x5f\x3b\x78\xed\x8b\x30\x5f\x3c\x10\x5a\x1e\x93\xda\x93\x02\xcc\xbb\xcc\x78\x2c\xc3\x34\x8d\x63\xe1\x54\xa0\xaf\x19\xad\xda\x4e\x30\x55\xc7\x20\x2b\xb2\x1f\xcc\xd5\x95\x89\x0a\x53\x0a\xc3\xe5\xec\xdd\xec\x58\xac\x2a\xac\xf5\x33\x5c\x1e\x62\xe5\xd2\x1e\xf6\x25\x3b\x44\x66\xba\x22\x06\x5e\xc6\x02\x34\x35\x4b\x5c\xd5\x1a\xcb\x0b\x94\xac\xa4\x82\x9d\x64\x43\xc2\xf4\x31\x34\x54\xf4\xd1\x3f\x00\x2f\x42\xd9\x1a\xc3\x04\xfc\x56\xf8\x4e\xf9\x22\xcc\x13\xcd\x3e\xf8\xca\xa4\x28\xce\x10\x22\xe4\x48\x67\x6a\x25\x08\xe7\xaa\xa3\x90\x36\x44\xec\x69\xa6\xdd\x79\x01\x2c\xac\x4d\x52\xca\xb4\x58\xf2\xb2\x96\x99\xfe\x63\x50\x46\x11\x72\xd5\x52\x95\x4e\x59\x53\xe3\x76\x5d\x57\x40\x2d\x9f\x81\xa1\xdc\x8e\x1c\x55\x0f\xad\x1c\x4a\x07\x25\x8f\x2e\xc1\x00\xfc\xed\x7e\xa1\x0a\xe1\x3a\xaf\xb1\x14\x42\x90\xec\x3b\xea\x98\x7a\xf2\x0b\xe0\x44\xc1\xd9\xda\xff\xec\xf5\x97\x1f\xcc\x2e\x41\xda\xe0\xd6\x04\xe0\x1b\xdb\x76\xf7\xb8\xe3\x6e\x56\xdc\x6d\x2e\x88\xc5\x79\xff\x5e\xfb\x44\x3a\xad\x9d\x22\x39\x99\xa6\x62\xa6\xf1\xac\x1b\x6d\xe4\x6d\xbb\xc5\x9d\x05\xf9\xdc\x37\x7a\xd4\x37\x90\x23\xec\x6b\xa6\xee\x4b\xdf\xf3\x93\xee\xf5\x76\x38\x03\xe2\x09\x63\x39\x7b\xf4\xa9\x2d\xd8\x3b\x61\x35\xc7\xb1\x77\x5f\x98\x80\xd8\xbb\xf9\xa1\xc3\xde\x55\x39\xca\xb8\x9a\xa2\x76\x1b\x19\x82\x7b\x62\x21\x5f\xaa\x56\x99\x2a\x88\xc0\x0d\x93\x75\x85\xa9\x19\x67\x65\xb3\x14\x15\x28\x71\x0a\x53\x5d\xe6\xae\x0f\x28\x16\x97\x60\xe6\x46\xc8\xa1\x68\xee\x9c\x94\xba\xb6\x3e\x87\xac\x0d\x44\x5e\x04\xa1\x8e\x89\x95\x8d\x49\xa1\xa9\x65\x31\x95\x65\xad\xeb\x6a\x7a\x56\xd6\x3f\x54\x97\x1e\x21\x4b\x53\xea\x59\x02\x7a\xca\x0e\xae\x4e\xcf\x27\xec\xc7\xd7\xe7\x00\x8f\xba\x3c\xbd\x3a\x3f\xb4\xa5\x04\x3a\xc6\x18\x98\x66\x0b\x59\x19\xcc\x3a\x0f\xdc\xf3\x57\xa7\xe7\x5b\x67\xd6\x8e\x49\xcf\x4c\xed\x38\x31\xb5\xf1\x74\x37\x84\x80\xed\x34\xf6\xe1\xf7\x01\xe0\xdd\xfb\x73\x5a\x46\xac\xa1\xbc\xd2\x01\xcf\xed\xe8\x65\xc2\x65\x8c\x4d\x1b\x2a\x04\x45\xf8\x60\x6e\x58\xa8\xb1\xc2\x57\xab\x42\x06\x70\x7c\xcb\xa4\x80\x6d\xb2\x1f\xda\xd6\xe4\xc0\x26\x87\x7a\x3b\x15\x5e\x2d\x55\x34\x0b\xe9\xf8\x9d\x0b\xd3\x53\x39\x3b\x00\x6b\x01\x81\x3f\xad\x1c\xe3\xd8\x9e\xb5\x0d\x78\x5b\xc0\xe1\x84\xfd\x70\x31\xca\x3e\x10\x4c\x8c\xf1\xac\x52\x1a\x8f\x03\x49\x3a\x49\xd5\xd7\x70\x73\x08\xfc\xf2\xfc\x34\x2c\x50\x9b\x3e\x7e\x68\x57\xf1\x46\x8d\xb8\x67\x88\x32\xa3\x2f\xb7\x17\xee\xc0\xa6\xd0\x33\x2b\xa3\x0a\x81\x99\xe7\x45\xa9\x11\x5e\xc8\x6b\x6f\x1c\x0a\x2f\x30\xa3\x04\x68\x45\xd1\x8b\x6b\x7b\x16\x0e\xdb\xd1\xfe\x1b\x7c\x44\x4f\xa9\x17\x06\xfe\xb6\x7f\x79\x68\x70\x3f\xbd\x59\xac\xdc\x78\x82\xbb\xea\xd2\x19\xa4\x1e\x80\x1a\x4d\xbf\x0e\xc1\xf9\xfc\x88\xd4\xed\xbe\x66\x85\x32\x5c\xbb\x54\xb9\x18\x4d\xa2\xe1\x5a\xfc\x8a\x34\xea\x12\x2b\xe0\xc5\xc7\xcb\xf5\x33\x91\xe8\xf3\x50\x60\x84\x71\x1d\x12\x41\x2f\x03\x29\x0a\x86\x1d\xd4\xb3\xe9\x2c\x0c\x59\x27\x90\x3c\xf5\xff\xc7\xde\xbb\x30\xb7\x91\x5c\x6b\x82\x7f\x25\x03\x77\x36\x44\x3a\x00\x50\x94\xba\xfb\x5e\xcb\x31\xe1\xa5\x25\xb5\xcd\xbd\xdd\x12\x47\x52\xf7\x8d\x99\x46\x4f\x30\x51\x95\x00\xf2\xaa\x50\x09\x57\x56\x91\x82\xc7\x1d\x31\x3f\x64\xf7\xcf\xcd\x2f\xd9\xc8\x73\x4e\xbe\xaa\x12\x2f\x12\xd4\xab\xcb\x11\xb6\x45\x54\x56\x56\x3e\xcf\xfb\x7c\x87\x42\xd2\xcd\xc8\xbb\x07\xd9\x1c\x4e\x7f\x8a\xcd\x12\xc6\x46\x5d\x40\x1d\xf1\xc1\xcc\x3f\xda\xf0\x57\x1b\xb2\xb3\xb2\x27\xd6\x08\x04\xf8\x96\x0f\x68\x25\x4f\x08\x5e\x87\x4b\xda\xc3\x8c\xdb\xdc\xbb\x78\x24\x33\x55\x61\x35\xb6\xc8\x43\x80\x60\x1c\x37\xa2\x58\xb7\xe9\xc4\xab\xd7\xef\x7c\xc8\x16\x38\x3e\xf6\x95\xb6\x21\xfe\x1b\x8f\x56\xea\x38\x5a\x49\xdb\xd9\xad\xcb\x07\x91\x43\xcd\x86\x9b\xdd\x7a\xb7\x5e\xa5\xa2\xb9\x2d\xdd\xc1\xa4\x35\xc8\x15\x73\xe7\x36\xde\x6d\xcc\x08\x47\xdb\x11\x22\xc8\xe3\xb2\x58\x00\x79\x3a\x67\x93\xc1\x90\x4d\x06\x2f\xdd\xbf\x21\xd1\xd4\x46\xf6\xd9\x9f\x37\x88\x69\x81\x34\x23\x6b\x8c\x63\xf6\xa1\xdf\x41\x3e\x2d\x24\xbf\x60\x5a\xc0\xcc\xc7\x56\x57\xec\x65\xb0\xd1\x7f\xf2\x67\x06\x26\xe4\x4a\x6e\x95\xb6\x99\x26\xbc\x10\xb0\x39\x68\xdd\x2c\xe9\x70\xce\x66\xe6\x74\xbd\xa4\x58\x44\x48\x1c\x80\xad\xa2\xde\x4e\x6c\xfd\x51\x08\x62\xaf\x31\xe6\x3a\xe8\xdd\x8e\x87\xba\x3f\xdd\xd0\x7f\x18\x1b\xbf\x56\x0d\xbb\xe5\x54\x3d\xaa\x92\xb5\x80\x02\x38\x88\x58\x03\x06\x7f\xdc\x42\xc2\xdd\xc1\xdc\x2d\x97\x3c\x6d\x83\xc1\x83\x6d\x66\xbf\x04\x5b\xc0\x7e\x1d\xb3\x1f\xe4\x7b\x71\x0b\xc9\xa8\x32\xf9\x35\x4b\xe9\x31\xe1\x87\x76\x81\x16\xae\x54\x56\x56\xf0\x1c\x26\x18\x89\xfd\x3c\x8f\x06\x80\x26\x4e\xf4\x49\x62\x44\x6a\x38\xa2\x13\x2d\xcd\xe6\xe9\xc6\x5c\x43\xfb\xed\x5b\x57\xbe\xc0\xbe\x91\xd8\xaa\x32\xa7\x76\x9e\x27\xd9\x13\x52\x2b\xf6\x9f\x66\x40\xbf\x84\x67\x91\xfd\x7a\x2f\xc6\xbf\xbb\x24\xc1\xbe\x46\xbb\x97\x7b\x85\x87\x6f\x24\xdc\xc7\x57\x0c\x13\xc9\x6c\x5b\x24\xf4\x6e\x6b\xcb\xdd\x6d\x4a\x21\xe8\x51\x58\x10\xd2\x27\xfc\xed\x76\x10\xef\xce\x65\x0c\x63\x6f\x43\x7d\xf1\xad\x4f\x6c\xdc\x1f\x7f\xf8\x15\xa8\x77\x88\x3e\xdc\x31\x39\xa3\xee\x97\x18\x8d\x4b\x4c\x84\xf1\x38\x15\x34\xcc\x5a\xc4\xbc\xf2\x7f\x7b\x7c\x7a\xbf\xe1\xf1\xa5\x88\x06\x27\xcb\x5a\xcc\xc1\x41\x86\x49\x3d\xf8\xd3\xd3\x27\x77\x08\xa2\x35\xe7\xbe\x2f\xdd\xf7\x49\x4a\xf7\xe1\xd2\xf7\xf5\xfb\xfa\xfa\x7d\x7d\xfd\xbe\xbe\x7e\x5f\xe7\xf8\x7d\x25\xf5\xfb\xa2\xac\xa0\xf4\x72\xdc\xb3\xc6\x5f\x92\x8e\x6e\x93\x72\x3a\x3c\xaf\xaf\xf6\xd7\x57\xfb\x3b\xd4\x9c\x92\x16\x9c\x0e\x53\x06\xd2\x7d\xec\x3e\xba\x7d\x45\xb3\xbe\xa2\xd9\x67\x17\x7a\xd5\x87\x39\xf5\x99\x5a\x7d\x45\xb3\x8d\x0a\xde\xef\xa7\xac\x59\x3c\xed\x3b\xd4\x36\xeb\xae\xdb\x9e\x0c\xf1\x41\xaa\x9c\x25\xc5\xcb\xbe\xd4\x59\xb7\xd4\x19\xcd\xa2\x5d\xe7\x6c\x4b\x99\xb3\x23\xd7\x2b\xdb\x90\xb7\x1f\x18\xae\x63\xbb\x61\x02\x82\x2c\x45\x8c\x83\x79\xec\xea\x7d\xb5\x1d\xe0\xec\x68\xe1\x23\x47\xad\x6e\x76\xff\xb8\x8e\xe8\x8a\xf4\x35\xce\xfa\x1a\x67\xbd\x34\xdc\x4b\xc3\xbd\x34\xdc\xd7\x38\xdb\x2e\x1b\xde\xb1\xd0\xd9\x86\x3e\x1e\x50\xea\xeb\x4b\x9e\x7d\xd5\xb4\xfa\x33\x28\x79\x96\x90\xa0\xfa\xd4\xb1\xdf\x5f\xdd\xb3\xc4\x31\x38\x66\x5a\xd7\x06\xca\xd9\x57\x40\xeb\x2b\xa0\xf5\x15\xd0\x3e\xeb\x0a\x68\xd1\xcd\xed\xcb\xa0\xfd\xce\xa5\x8f\x87\x11\x3b\x7a\x89\xa3\xd7\x5b\x3f\x9e\x74\xf3\x70\x82\x4d\x5f\x15\xad\xaf\x8a\xd6\x57\x45\xeb\xab\xa2\xf5\x55\xd1\xfa\xaa\x68\x5f\x7b\x55\xb4\x2d\xa1\x8c\xf7\x8b\x44\xdb\xaf\x3a\x56\x87\xef\xf6\x45\xd2\x3e\x71\x91\xb4\xcf\xe9\x40\x7c\xca\x12\x57\x1b\xf3\x3f\x2e\xda\x75\x63\x58\xc6\x57\x10\x82\xa8\x66\x24\xb9\x45\x1c\x71\x4b\x45\xab\x8b\x30\x2d\x59\xcd\xd8\x23\xea\x11\x83\x5d\xe1\xd0\x3c\x4a\xd5\xb2\x8a\xcd\x2b\x5d\xe4\xff\x7a\x4b\x75\x04\x55\xd9\xf1\x9b\x51\x02\x76\x21\x04\x5f\xbb\x7c\xbb\x79\xa1\xa6\xdc\x65\x48\x1e\x2d\x29\xa5\xaf\x5e\xd5\x57\xaf\xea\xab\x57\x7d\x01\xd5\xab\xba\xaa\xf0\x6f\x7d\x81\xaa\xcf\xaf\x40\x55\xb4\x4d\x50\xa5\xea\xfe\x39\x2f\x87\xd8\x47\xf6\x6c\xbb\xab\x24\x55\x2a\xfc\xb2\xaf\x4b\xf5\x11\xea\x52\x75\x76\xa9\x2f\x4e\xf5\x05\x17\xa7\xea\x4b\x4f\x7d\xfe\xa5\xa7\x54\x6e\xee\x29\x2f\x56\x0b\x7e\x3e\x7e\x7d\x23\x2a\xf3\x89\x6d\xd7\xce\xb6\x61\xba\xae\x1a\xb0\xc7\x77\xcc\xcd\x56\x76\x52\xb6\x69\xfb\xe2\x55\x4d\x89\x4e\x51\xc0\x28\xda\x03\x53\x2f\xff\x5e\x7e\x10\x09\xb5\xe7\x8a\x9e\xb4\x87\x30\xa3\x1f\xef\x3d\x10\xef\xb6\xbd\x8a\x86\x74\xa8\x93\x61\xec\x84\xf7\xff\xd6\xf0\xb2\x96\xf5\x7a\x27\x6b\xec\x78\x0f\xce\xba\x7d\xb4\x69\x69\xb4\x9b\x6f\x9a\xb2\x96\x4b\xb1\x33\x72\x39\x6c\xe7\x14\x12\xee\x83\x1e\x88\xb5\x18\x9d\x06\x5b\x5a\xd9\xc1\x53\x24\x52\x7a\x90\xa8\x45\xfd\x49\x2f\x71\xba\x5c\xf5\x40\xdb\x89\xfb\x0d\x1a\x57\x4d\x09\x72\xa6\x6b\x44\x96\x0a\x00\xb5\x0a\xbf\x40\xa5\x97\x4f\x32\x2b\xe3\x9d\xb2\x25\x2f\x11\x7b\x22\xca\xeb\x03\x8d\x5b\x55\x1e\xf0\xab\x52\x37\x12\x3c\xb8\x15\xba\x53\x83\x78\x6c\x9a\xd6\x95\xca\x7d\x28\xf6\xbf\x37\x53\x51\x08\x34\xbf\x40\xb6\x29\xe2\xf6\xc3\x1d\x14\x5a\x15\xce\x50\x16\x8e\x0e\xa8\x9b\xeb\xd8\xda\x9a\xed\xb1\xab\x2d\x4a\x97\xd7\x09\x72\x51\x73\x59\xe8\x21\xd3\x42\xa4\x3c\x65\xa2\x5c\x18\xf2\x6d\xf4\x01\x7d\xf6\x5e\xac\x34\xb8\xc7\x60\xe3\x69\x15\x31\x18\x7c\xbc\x4c\x81\x0a\x87\x9e\x70\x88\xcb\xec\x1d\xe1\x7d\xc8\xf4\xd7\xe0\x7a\xfe\x12\xdc\xcb\x77\x2e\xe7\x16\x11\xd4\xcf\x2f\x12\x5a\xe5\x46\x4b\x48\x30\x9d\xfd\x82\xa0\x37\xf2\xac\x23\xc5\x3f\x6f\xec\x7f\x57\xc0\x51\xbb\x6d\x0c\x8b\x10\x6d\x4a\x5f\x2f\xe3\xb3\xa2\xb9\x9f\xa4\x5e\xc6\xc6\x6b\xd0\x47\x20\x7d\xea\x98\xe7\xaf\x2c\xfa\x68\xb3\x94\x7f\xdf\xe8\xa3\xed\xb4\x78\x4f\x5a\x69\x53\x7b\x78\x0a\xcc\x3a\x6c\x38\x66\x97\xb5\x37\x5c\xf9\xd0\x55\x1f\xa9\x1c\x22\xf1\x44\x76\xb5\x88\xfa\x12\xb1\x7a\xee\xf4\x09\x7a\x8a\x78\x44\x33\x9e\x09\x76\xf2\xfc\xcd\xe5\xa9\xf7\xa7\x90\xcd\x9d\x6b\x76\x2b\x8a\x02\xe2\x8f\x4b\xc2\xfe\x05\x3f\x88\x2a\x49\x95\x84\x4a\xca\xf8\x7d\x88\x96\x02\x20\x54\xb6\x20\x77\xd6\x4a\xf9\x44\xc5\xaa\x29\xbb\xea\x8f\x5d\x8a\x54\xb0\x71\x92\x43\x90\x0c\xff\x37\x88\xf1\x4e\x40\x78\xab\x40\x43\xdf\xa0\x97\xdf\x4f\x1b\x8f\x32\xb8\xe3\xcd\x3a\x86\x8e\xf2\xe4\xf1\xf9\x1f\x1f\x3f\x79\xf2\xdd\x68\xa5\xf2\x91\x1d\xd1\x78\x99\xb7\xbc\x87\x70\x02\x09\xb8\x92\x83\x12\x1a\x24\x77\xdf\x9c\x8f\xcf\xbf\x45\x26\x24\xc9\x8a\xbf\x50\xa5\xaa\xa8\x0a\x1d\x11\x41\xd8\x3b\x51\x62\x79\x3d\xd4\xe5\xdc\x12\xcd\x04\x87\x50\xa1\x83\xa5\x1b\x67\x20\x01\xa7\x4b\xb4\x55\x9b\xae\x04\x3d\x8f\x90\x46\x05\x1e\xa6\x62\x0d\x3e\x59\x3a\xac\x54\x2b\x2d\x08\x0d\x77\xe0\xb4\xcf\xdf\x5c\xb6\xce\x2e\x1e\xbb\x46\x43\x5c\x01\x65\x04\x00\xc0\xae\x95\x03\x5c\x66\x80\xf9\x9d\x4a\xcc\x91\xb5\xd1\x5c\x2c\x7b\x33\x5d\xde\x81\xca\x05\x9b\x34\x8f\x1f\x3f\xf9\x0e\xbe\xd6\x72\xa0\x98\x8b\x0a\xf0\x5b\x84\xec\x4a\x28\x3b\xf4\xe5\x8a\x2c\xa0\x37\x5c\x16\x9c\x6a\xd9\x21\x40\x1a\x42\x60\xc3\x95\xb1\x2d\xad\x79\xcf\x28\xc6\x68\x74\xab\x04\x33\x37\xe0\x86\x17\x00\x7e\x16\xbe\xdb\x4a\x44\xe0\xb6\x1b\x96\x71\x48\x5f\x98\x98\x5d\xc8\x26\x03\xb6\x94\xf3\x85\x77\xc5\xb8\x85\x33\x4f\xd9\xeb\xe7\x97\x6e\x91\x4f\xb0\xa0\x4c\xc9\x6b\x79\x23\xd8\x0f\xb2\x6c\x3e\x04\x26\x86\xd3\x0e\x48\x54\xd5\x94\x2e\xf2\xbe\x63\x86\x08\x6e\xbb\xdd\x65\x30\xde\x9a\xc5\x53\xd5\xd2\xae\xed\x8b\x57\x6f\xd9\x0f\x18\x24\xf5\xe6\xfb\xe7\xec\xfc\xfc\xc9\xd3\x53\x4b\xd9\x96\x18\x22\x52\xee\x91\x92\x60\x44\x95\xbc\x29\xcc\x5f\x5d\xbe\xe7\x9e\xb1\x85\x2a\x72\x42\x2b\xf5\x3f\x66\xaa\xd4\x75\xc5\x01\xa2\xa1\x05\xda\x0d\xa7\xc6\x92\x00\xb2\x68\x4a\x1d\x13\x58\x38\x31\xd8\x1b\x2e\x8b\xd9\x1b\xba\x62\x16\x20\x4d\x22\x8a\x42\xf0\x51\xa9\x59\x29\x8b\x61\xa2\xbf\xf0\x28\x01\xea\xbb\x37\x28\x4d\xd7\x58\x7f\xc7\x7c\xe0\xf0\xfb\xe9\xd7\xe1\x40\x2e\xea\x2e\xf6\x16\x7e\x18\x74\xbe\x95\x6f\xbe\x8d\x36\x6a\x23\xca\xac\x5f\xa8\x98\x34\x6c\xd8\xb6\x19\x78\x62\xcd\xb2\xd3\x62\x21\xc9\x8e\x48\xf4\x6e\x04\x5a\x95\x6f\xa9\xbf\x14\x3e\x05\x09\x4a\x5b\xf0\x44\x04\x1f\x23\x8f\xbf\x2d\xaa\xa3\xca\xd4\x39\xe8\xec\xf6\x18\x4b\xd4\xe0\xc5\xeb\x9e\x05\x17\xb3\x3a\x6d\x9d\x31\x8e\x44\x29\xa8\xe7\x0a\x2f\xeb\xa8\x76\x6b\xd4\x55\x34\x7e\xa9\xd9\x52\x54\x73\x1f\xb7\x88\xd0\xfc\x10\x68\x03\x24\x20\x68\x3c\x66\x17\xe5\x3a\x32\xec\x17\x05\xc3\x18\x57\xcb\xe6\xf1\x9c\xa2\xc2\x83\x06\x42\x9e\x43\xf5\xcc\xc8\x25\xbf\xd3\x6e\xdc\xf5\x90\xd4\xaa\xa0\xea\xac\x09\x8d\x25\x78\x88\x24\x76\x05\xe7\x39\x67\x27\x00\xab\x0b\x2e\xe3\xbc\x59\x15\xe0\x52\xd2\xa7\x66\x94\xfb\xdc\xe7\xbc\xa9\x30\x27\x89\x66\x30\x64\x02\x80\xba\x01\x14\x9e\x35\xa5\x54\xce\x3c\x49\x78\xf3\xb4\xd1\x38\x1c\x9f\x37\x66\x56\x06\xaa\x92\xb7\xb6\xe2\x3e\x8a\x94\x4b\x4a\x72\x73\x37\xd4\xef\xc3\xc8\x87\xb5\x8c\xcc\xd9\x1c\xd9\xfe\x6b\xb5\x94\xbb\xcd\x0c\x2e\x51\xc9\xf7\x9a\xbe\xc4\xe8\x82\xec\x3d\x21\x5f\x85\x27\x04\x37\xb3\x77\x84\xf4\x8e\x90\x2d\x3a\xd7\x62\x93\xb2\xd5\xdb\xe5\x8e\x6c\x97\x5b\x6c\xd2\x95\x7a\x25\xe9\xab\x56\x92\xee\xa5\x1d\x0d\xf7\x53\x8f\x7a\x03\x6b\xef\x67\x4b\xf9\xd9\x7a\x8b\xd9\xa7\xb1\x98\xb5\xe4\xe8\xde\x80\xb1\xcf\x72\x1d\x6e\xbf\x68\x2d\xf3\x66\x21\x38\xe8\xfa\x58\x3e\xd5\xae\x74\xdd\xbb\x54\xbf\x56\xd1\xed\x13\xba\x54\x13\x4a\x5c\xef\x51\xed\x3d\xaa\xc7\xf7\xa8\x26\x0e\xda\x71\x1c\xaa\x1d\x0a\xdc\xdb\x85\x7b\xbb\x70\x6f\x17\xfe\x32\xec\xc2\x58\xb2\xd1\xdd\xe2\x0b\xcc\x8a\x7e\xfe\xf6\xf2\x45\x25\x6f\xd0\x98\xb1\xe9\x2e\xb7\xdb\xc6\x69\xe1\x94\x6f\x26\xcb\x42\x96\x82\x3d\x7f\x7b\xc9\xa8\x15\x16\x86\x8a\x4a\x1c\x93\xb6\xbd\x4b\x1a\x82\x0a\x83\x1d\x61\x68\x77\xdd\xc1\x4a\xcc\xa5\xae\x01\xf6\x39\xcc\xc1\x30\x63\xca\x71\x96\x77\xca\x2e\x48\x2f\xdd\xf7\x85\xf8\xf0\xb3\x2a\x9a\xe5\xd6\x94\xfa\x4e\xe3\xe4\xe2\x99\xc7\x37\xf8\xf8\xee\xab\x46\x53\xec\xac\x5b\xee\x36\x38\x1e\x1a\xfe\x9e\x4a\x5a\x09\x86\x83\x8d\xee\x98\x96\x91\x5e\xb8\xbf\x29\x5d\xef\x2a\x64\xd8\x6a\x1a\x49\xb8\x90\x70\x42\xc3\xcb\x54\x89\x94\x88\xc8\xb4\xb5\xe9\xa0\xfe\x47\x96\x62\xaa\x56\x0a\xa5\xcf\xa8\x40\x72\x63\x84\x95\x4b\x07\x3b\x47\x00\xf1\x41\x71\x37\x5c\x76\x32\x38\xef\xe1\xd1\xe0\xf5\x02\x0b\x74\x75\xe7\xe2\x9f\xb9\xf2\xda\xe1\x87\xac\xfd\x2a\x9c\x96\x4f\x9e\x82\x51\x3a\x94\x3c\xcb\x85\xae\xff\x70\x0d\x55\xc4\x25\x32\xd8\x82\x43\x02\xbe\x21\xa1\x75\x25\x97\x46\x9f\x83\xbc\xe7\x1b\x5e\xc8\x9c\xd7\x51\x41\x47\xfa\x2c\x71\x0d\xf8\x28\x14\x73\x9b\x94\x93\xf2\x25\x1a\xdf\xf4\x33\x76\x7d\x36\x53\xea\x9a\x0a\xb7\x62\xde\x11\xfe\x34\xc4\xff\x3f\xbb\x06\xc2\x78\x6d\x6b\xaa\x5d\xc7\x6f\xf8\xd2\xdb\xf0\x73\x7e\xcd\x54\xc5\xae\xcf\x44\x9d\x41\xab\x64\xf2\xaf\xe0\xf9\xeb\xb2\x58\x77\xd7\x0f\xa6\x12\xa1\xb0\xc3\x2e\x63\xff\xc1\xaa\x25\xca\x57\xda\x9a\x69\x86\x01\xcb\x19\x68\xb4\x76\x85\x55\x53\xd6\xb6\x4e\x1a\x7e\x39\xd8\xe5\xa9\x52\x85\xe0\xe5\x9d\x4e\xf9\xcb\x1b\x99\xd5\xa4\xb1\x6d\x3a\xde\xb6\x0d\x13\x37\xc0\x91\xc9\x02\x03\xf5\x15\x6b\xe4\xf4\x46\x00\x07\x41\xbe\x56\x90\x70\xc7\x65\xe9\x0b\x1a\x43\x05\x07\x3e\x13\xf5\x3a\x14\xa2\xc2\xc2\xa5\xba\x99\x7a\x03\xd0\xcc\xc8\x28\x63\x16\x14\x05\x34\x9d\x82\x00\x80\x05\x7d\x69\x20\x94\x1b\x9f\x55\xc2\x72\xc1\xab\xd7\x6f\xdf\x51\x42\xef\x78\x3c\x3e\x33\xd7\xc7\x16\x3f\x53\x48\x64\xa9\x22\x9a\x7d\xbf\x87\xb3\xff\xf8\x4a\x6d\x2e\x0a\x51\x8b\xd7\xab\x0d\x52\xd6\x8b\xf0\xb1\x45\x02\x20\xa8\xd8\xfc\x5e\x9a\x49\xd4\x73\x6f\xbd\xfe\x58\xca\xac\xb7\x68\xb5\x52\x86\x41\x92\x27\xf9\x01\xeb\x3a\xc3\xb5\xdc\xab\x98\xcb\x9e\x96\xe8\x03\x5d\xdc\x5e\xb7\x8c\xcf\xca\xbd\x6d\x77\x2d\xa2\xfb\xfd\xdb\xbf\x56\xaa\x59\xbd\xad\x8d\xfc\x3e\x5f\x07\x77\x61\x13\x09\x4e\xbf\x11\x51\x1d\x4d\xcf\x00\x6b\x08\xa8\x80\x2d\x9f\xef\xd0\x27\x80\x52\x46\x8d\xf7\x28\x0f\xc4\xcb\x79\x0a\xe7\x02\x7f\x47\x2e\xbe\x10\x4e\x00\xa4\x9f\xd5\x8c\xcd\x34\x9b\x9b\x31\xeb\x31\x73\x25\xe8\x81\xb2\x15\xf2\x3d\x38\x07\x67\xca\x5c\x1c\x27\x55\xda\xf6\x0c\x60\xb5\x8c\xec\x10\x42\x8e\x41\xbf\x3e\xf9\x17\x9c\x74\xba\xe6\x55\x0d\x33\x05\xf8\xa5\x37\x36\x6e\xd9\x88\x4e\x3f\x36\xba\x7e\xd3\x94\x17\xf7\xd2\x7e\x70\xdb\x3c\xc4\xc2\x8b\x37\x66\x14\xa0\x29\x56\x84\x0c\xd9\x5a\x14\x02\x91\x8a\xf7\xc3\x89\x7a\xb9\xcc\x00\x92\xe0\xd6\xfc\x42\x5b\xea\xc2\x0e\x2c\x54\x20\x25\xce\x3f\x57\x65\x2d\x3e\xd4\x87\x17\x34\x6d\x9d\x35\x3b\xe8\xed\x27\x12\x44\x57\x55\xd5\xd8\x76\x5b\xe9\xd2\xb0\x61\x10\xaf\x81\xfb\x63\x51\x4f\x10\xe4\xe2\x70\x19\x37\x12\x72\xa7\xca\x6e\x76\xb8\xcf\xbb\x65\xdd\x50\xcb\x58\xca\x72\x30\x1c\x2c\xf9\x87\xae\xa2\x61\x7e\xec\x4c\x6f\xc9\x9d\xd8\x6b\xbe\x65\xeb\x2f\x99\xc9\x0d\x11\x5d\x40\xcb\x1b\xb1\x57\xfd\xf4\x21\x7c\xbc\xfb\x05\x59\xfa\x13\x12\x00\x53\xde\xe9\x1b\x77\x10\xf8\xec\x79\xd8\x06\xf2\x80\x4d\x3c\x40\x3b\x67\x4b\x59\x9e\x99\xb5\x41\x91\x25\xba\xec\x00\x26\xfc\x62\xa7\xcf\xe0\x13\xed\xc4\x77\xdf\x3c\xfc\x4e\x98\x6f\xdc\x61\x27\xae\x54\xfe\x42\xea\xaa\x81\xf1\xfc\xa5\xc9\xe7\x62\xab\x1b\x27\xd1\x9c\x0a\xb3\x29\x27\x7a\xe3\xad\x80\x59\x98\xf5\xcb\x5d\x7b\xbc\x8b\xb6\xa2\x2a\xb7\x1c\xa1\x8d\xe7\x6d\x2e\x63\x2f\x11\xf7\xd9\xca\x5f\x87\x1c\xfa\x09\xb2\x86\x6d\x55\xa5\xa9\x58\xf0\x1b\xa9\x2a\x57\x8e\xbd\x7b\x79\xf7\xf1\x53\xb7\x04\x90\x44\x2f\xbb\x6a\x81\xfe\x08\x20\x64\x22\x43\x24\x2e\x35\x85\xb8\x83\xbc\x05\x52\xf4\x70\xa3\xdb\x0f\xb8\x68\x37\x61\xec\x96\xee\xdc\xe3\x9d\x23\x95\xf0\xdc\xfd\xa5\x5d\x1e\xf8\x0d\xaf\xa4\x2a\x2a\x24\x9a\xf6\xee\xf8\xcf\x84\x4e\xb7\x21\x97\xee\xab\x4f\xa4\x04\x80\xde\xc9\xfe\x39\xf2\x83\xbd\x9d\xda\x7b\x88\x78\xf7\xf4\x6e\xef\x49\x2b\x0f\xa3\x46\x3e\x7b\x38\x68\x8a\xb9\xc3\x1b\x78\xc3\x76\x11\x71\xc9\x3f\xfc\x54\xba\xa8\xdb\x04\xf9\x89\x4d\xb8\x56\x9f\x90\x33\xc6\x6b\xb6\x34\x2c\x6b\xd2\xea\x63\x32\x40\x4d\x11\x3d\xce\xa8\x47\x4e\x06\xd6\xff\x3c\x19\x80\x21\xa2\xf1\xed\x19\x9f\xd5\x02\x01\xd8\xec\x97\x86\x4c\x8e\xc5\x98\x89\x1b\x51\x82\xcb\x78\xaa\x11\x3a\x75\xe6\x5b\x89\x1c\xe3\x67\xa3\xd8\x5e\x55\x22\xc8\xff\xaa\x32\xaf\xd6\xce\x2e\x5f\xd6\xbc\x5a\xbb\xde\x35\x44\xf5\x61\x98\xaf\xb9\x8a\x8f\x43\xfb\xf6\xb2\xa9\x31\x27\x00\x3c\xc5\x46\xa9\x70\x30\x71\x60\xd2\x98\x18\x65\xe4\xc2\xcf\xf5\x78\xe5\x7d\x87\x51\xcf\x07\xee\x04\x42\x12\xb7\x07\xb7\x63\x23\x40\xe1\xd7\xb5\x2d\x25\xbb\xff\x86\x80\x19\x69\xcb\xa6\xb0\xb7\x60\x33\xb2\x1b\x03\x16\xa5\xc3\xf7\x65\x32\x38\x7f\xfc\xf8\xff\x3a\xee\x12\xeb\x8d\x51\x1c\x18\x64\xfd\xf7\x46\x54\x6b\xc4\xe8\x85\xb5\xbb\x5d\x28\x2d\x82\x11\x62\xa9\x84\x92\xcf\xbd\x33\x3f\x50\xdd\xa6\xfb\x0a\x64\xdb\x08\x98\x19\x87\x0b\x36\xb9\xbb\x5d\x34\xee\xe7\xde\xa5\x9f\xf7\x16\xe2\x0e\x24\x67\x28\xdd\x06\xbe\xeb\x74\x89\x39\x2f\x05\xa7\xe9\x1c\xa3\x8e\x0c\x93\xac\x2b\x2e\x0b\x3c\xa3\x99\xb9\xcc\x1e\x5d\x94\x33\xbd\xd6\xb5\x58\xee\xf4\x78\xbb\xee\x35\x39\x8c\x07\xc3\x01\x25\x0e\xfd\x4d\xf0\xa2\x5e\x18\x61\x82\x34\x08\xff\x83\xf8\x80\x15\x40\xae\x8c\x6e\xde\x11\xf2\x5a\xef\x77\x56\xc7\xa2\x92\x96\xcd\x72\x2a\x40\x1d\x59\x60\xd3\x96\xae\xbf\xcd\x8e\xd5\x1a\x52\xca\x90\x22\x97\xcd\xd2\x29\x3f\xf7\xfa\x16\x2e\x12\x4d\xb7\xeb\x1d\x0a\x1f\x7b\x18\x8b\xee\xf6\x26\xee\x19\xbb\xe5\x9a\xad\x2a\x95\x09\xad\xfd\x45\x03\xec\x6a\x10\x86\x7c\xc3\xd0\x1d\x69\xf3\x3a\xa6\x4d\x0d\x05\xb7\x8d\xb0\xb3\x16\x46\xe0\x11\xa5\xd7\xa7\xa8\xb3\x94\x8d\x26\xac\x31\x77\x11\xa1\x57\x58\x04\xd2\x25\x5f\x79\xc1\x0b\x92\x41\x6e\x6d\x65\x89\x60\x74\x7e\xe4\x21\x0d\x0d\x7d\xa4\xdd\xd7\xcd\xd7\x20\x4c\x4b\x94\xe0\x1f\x7d\xf1\x97\x10\x81\x94\x6b\x66\xb4\xd4\x72\x8e\x93\x21\xb8\x6d\xa8\x65\x28\x0a\x01\xbd\x9f\xa8\x8a\x08\x37\x87\xae\x55\x53\x53\x85\x91\xf7\x62\x6d\x89\xb6\x19\x7f\x22\x2e\x23\x8c\x47\x42\x59\x95\x1a\xdd\x71\x8a\x0e\x23\xd4\x8d\x2e\x97\x79\xf9\xa8\x66\x2a\xcb\x9a\x0a\x21\xcc\xdd\x8c\x81\xff\xd4\x0b\x61\x64\x4f\x6f\x84\x86\xda\x1a\x22\xf7\xab\x0d\x01\x96\xbc\xa9\x95\x39\x3c\x19\xb0\x68\xb3\x4e\x5b\xb7\x91\x16\x44\xab\x25\x4e\x05\xc6\x05\x99\x41\x35\xb8\xf3\xe7\x4a\x68\xa6\x97\x4a\xd9\x70\x2f\xb3\x3e\xbe\x02\xa3\x58\xae\xea\xb5\x43\x87\x05\x61\x87\x16\x0c\x3b\xfb\x81\x57\x73\x11\xdc\x21\x61\xc4\x62\x8b\x57\x8b\x8b\x8d\x42\x3b\x15\x97\x5f\x55\x6a\x5a\x88\x25\x21\xa3\x9a\xf9\xdb\xf5\x49\x2a\x8e\xc7\x4a\x29\xf5\xbc\xe5\x9d\x5c\xa2\x4f\x24\x41\xe0\xba\x01\x50\x6e\x5e\x30\x52\xff\x46\x50\x29\xd3\x97\x5b\xa2\xea\x46\xfb\x91\x8e\x88\x50\x26\xa2\xf7\x6a\x5e\x04\xcb\xba\x42\x02\xd2\x94\x75\x10\xcf\xd8\xe1\xba\xfb\x7d\xd9\x92\x81\xbf\x8a\xd2\xc6\xb3\x6d\x33\xc4\xb0\xb9\x6b\xe7\x29\x08\xdc\x07\x50\xa1\x5c\x68\xa6\xb9\xae\xc8\xa2\xc6\xec\x45\x67\x6d\xd1\xc5\x07\xe8\x39\xc4\xc7\x42\x2a\x28\x35\xc6\xd3\xb8\x68\x92\xee\x18\xb1\xfc\x0c\x28\xe5\x57\x2f\xfe\xf2\xc8\xa9\x89\x7e\x74\x77\xb4\x7c\xef\x29\x4b\xc0\xb9\xd9\x29\x10\x58\x7f\xd8\x15\x3c\xd9\x21\x08\xc4\x8d\xd9\xdc\x88\x5c\x04\xcf\xcd\xb1\xc6\x82\x99\xed\x92\xbf\x17\xad\xaa\x1c\x1c\x42\x2e\x23\x07\x1c\x23\x0f\x5c\xec\xc6\xe2\xab\x55\x21\xad\xf1\xdc\x52\x38\x97\x83\xd7\x87\x93\xf4\xc6\xf3\xaf\xc4\x58\xf2\x75\x55\x99\xdc\xc7\xa0\xaf\xb1\x78\x90\xbf\x78\xe4\xa5\x16\x25\x44\x2a\xec\x13\x96\x92\xb0\xf0\xc5\x24\x69\x2f\x74\xce\x5d\x44\xf0\x38\x18\x9d\xbb\xbe\xb2\x87\x51\xbb\xfb\x42\x9c\x95\xd4\xa5\xc8\x7d\x82\xd9\x67\x45\x3c\x37\x24\x98\xc9\x87\x4c\x30\xdb\x75\x45\x7a\x13\x78\x9f\x67\xf6\xb0\x26\xf9\xd6\x79\x3b\xba\x41\x3e\x41\xad\x0f\xa1\xa3\x6f\xf7\xe0\x43\x5b\x31\xe6\x05\xa0\x47\x0c\x00\x2d\xf1\x42\xff\xa4\x41\x6c\x87\x80\x3a\x84\xe9\x28\x20\xf0\xcc\x9c\x95\x99\x86\x7f\x26\x28\xad\xd1\x31\xae\x2a\x79\x23\x0b\x31\x17\x2f\x75\xc6\x8b\x0d\x7a\xcd\xa6\x96\x1e\x70\x47\x83\x35\x19\x84\xe5\x8c\x47\x06\x0b\x0c\x8a\x5f\xd9\x97\x99\x70\x6f\x77\x6b\x62\xe5\x61\xd1\x95\x2a\xaa\x47\xec\xe2\xdf\x87\x03\xde\x4a\xfe\x49\x15\xe8\x6a\x37\xa1\x28\x1a\x78\xd5\x92\xbb\x20\x3f\x28\xa7\x56\x51\xda\x9d\xf8\xe0\xaa\xe8\x52\xac\x3f\x68\xf6\x53\x91\xe7\x94\xe4\x66\xc1\x38\xc0\xf6\x0c\xb5\xce\x50\xf1\x27\x4b\x08\x69\xef\x56\xfd\x28\xd7\xc1\xb7\xa2\xfa\x66\x33\x55\xd9\xd1\x88\xd5\x42\x2c\x45\xc5\x6d\x5a\x40\x14\x42\x6f\x4e\x1f\x22\x13\xa4\x31\x07\xa8\x56\x55\x68\xee\x82\x88\x3c\x6d\x93\x8e\x2e\xe1\x23\x94\xf6\x43\xd0\x03\x6c\xce\x6b\x71\x44\x62\xdf\xc9\xe3\xfa\x2d\xd8\x33\xbe\x42\x1d\x4d\xa6\xc2\x4d\x13\x8d\x62\x06\x95\x85\x4f\xc2\x68\x27\x3a\x6f\xa4\xb3\xe5\xae\x80\xa7\x57\xda\x58\xdc\x6b\x19\x14\x8e\xb3\x01\xe8\x1c\xf6\x95\x72\x5f\x40\xed\x6b\xea\x85\xaa\x1e\x81\xc9\x20\xab\x04\x9e\xd9\xff\xae\x1a\x3c\x21\x86\x1d\xa0\x69\xc9\x8f\x0b\xcc\x65\x10\xd3\x98\x9a\x0b\x42\x40\xe1\x25\x7e\x51\xa9\x55\xf8\xf0\xb0\xea\x3f\xbc\x9d\xc3\xb5\x79\x35\x83\x36\xa9\x4b\xe0\x13\xab\xf4\x98\xb1\x97\x70\x7c\x55\xc5\x4a\x59\x74\xce\x6f\x51\x84\xad\xed\xaa\x41\x1e\x18\xc3\x43\xea\x90\x86\xa1\xc4\xae\xcd\x70\xc4\x33\xea\x6c\x81\x8d\xe6\xf3\x44\x5e\x97\x8e\x5c\x53\xd8\x74\x32\xa0\x67\x93\x01\xd5\xf8\x3b\xfa\x31\x0d\x72\xe6\x82\x85\xb5\x59\x5e\x9b\x97\xd5\xb5\x48\x2d\xaa\xcb\x61\xd2\x63\x5a\xd2\xc4\x5a\xfa\x46\xd1\x52\x1e\x7d\x86\x2e\xb9\x2d\x98\xdf\x55\xa5\xb2\x1f\x55\x53\xd6\xef\x8c\x58\xb1\x91\x7e\xc6\xcd\x52\x33\xb5\x1b\x16\xb7\x1c\x6f\x3d\x48\x70\x1c\x00\xa1\x08\xc9\x7d\xf4\x6e\x7c\xac\xa8\x1e\x67\x90\x11\x17\x37\xb6\x24\x6c\x56\xf0\xb9\x25\xd0\x18\x83\x7c\xa7\xfb\xf4\x53\xa9\xf9\x4c\xbc\x5d\xeb\x2c\x59\x00\x31\xd5\x2a\x26\x50\x01\xcb\xb0\x2b\xd3\x40\x6b\xa6\xb1\x79\xcc\xe3\x4a\xa8\x8a\xf5\x92\x67\x0b\xb0\x00\xaf\xe1\xda\x48\x30\xf7\x71\xb6\x2a\xb8\x2c\xe9\x3d\xb2\xb9\x1b\x7a\x9e\x03\xf5\x82\xea\xda\xe6\x1f\xb6\x58\xa6\x06\x1b\xb8\x04\x7f\x89\x96\x39\x64\x9c\x72\x48\xe3\xa2\x84\x33\xbf\x57\x34\x94\x31\x7b\x8b\x61\xf7\x7f\x60\x4b\xc1\x4b\xac\xb1\x1e\x8f\x16\x53\xa0\x6d\x89\x7c\x0b\x4f\xb7\x40\x95\xc8\x9f\x03\x6e\x73\xdf\x3a\xd3\x0d\x17\xc4\xbc\x72\xa3\x64\x4e\x8a\x92\x21\xa6\x71\x86\x9f\xaf\xa6\x7e\x66\x26\x07\x3d\x6a\xfa\x61\xca\xab\xc9\x60\xe8\xfe\xf8\x87\xf9\x43\xd4\xd9\x38\x78\x69\xdc\x7e\x69\x1c\xbe\x34\x0e\x5e\x3a\xe8\x68\xd0\x7e\x5d\xe4\x3b\x98\x57\xba\x9d\x75\x87\xd8\xf2\x9d\x94\xdd\xdd\x65\x64\xce\xf6\x08\x4c\xa8\xcd\xbe\x58\x53\x16\xb6\xc0\xb1\x95\x37\x3c\x08\x3c\x00\x11\x56\x6a\x45\x35\x0a\x1d\x33\x1a\x33\xe4\x56\x7c\xbd\x83\x59\x6d\x18\xfb\x56\x7e\x15\x33\x54\x1c\x36\xb8\x62\xcc\x99\x91\xcb\xf6\x3d\x40\x81\x05\x20\xdf\x49\x8f\x6a\xd7\xf1\x4b\x71\xcc\x22\x2e\xde\x7c\xc0\x76\xed\x2d\xdb\xee\x78\xc1\xfa\x84\x3a\xdb\xe8\xea\xff\xdd\x2e\x84\xbd\xb1\xe8\xda\x02\xa1\x64\x6e\x2e\x2f\x40\x54\x39\xd1\x17\x76\xba\x84\x74\xca\x15\x07\x87\x2d\xbd\x90\x16\x73\x67\xaa\x9a\xca\x3c\x17\xe5\x46\x7a\xd4\x6e\xb1\x91\x16\xb9\x86\x9f\x03\x19\xea\x0c\x26\x49\x88\x42\x0a\xe4\xde\xd8\x4e\x30\xb0\xd9\xa1\x14\x23\x7a\xeb\x38\x24\xc3\x6a\x5c\xdd\x0d\xd3\x2e\x1d\x68\x9f\xec\x21\x97\x2d\x65\xd3\x87\xc8\x03\x9d\x48\x1f\x3a\x50\x34\xd8\x90\x9c\xf6\xdb\x10\xca\x71\x5e\x5e\x3d\xef\x8e\x9d\x1e\xb4\x54\xbe\x40\x75\x25\xd2\x8b\x22\x1e\x08\x78\x7f\xa3\x57\x64\x19\x11\xae\xf4\x71\x37\xfd\xbf\xc2\x92\xa5\xe9\x8f\xd3\xc3\x43\x07\x60\x5f\xdb\x7b\x10\x57\x97\x2f\xd2\x03\xb8\xba\x7c\x71\xe8\xc7\xcd\x2b\xfb\x7f\x58\x55\xa9\x4a\xa8\xee\x51\xf8\x71\xbc\x6f\x2e\x0f\x8b\x05\x99\x7a\x31\x4c\x83\xf8\xb0\x52\xc7\x15\x2b\xe3\x34\x32\x73\xde\x1d\x85\x4b\x98\xf3\xfc\xb3\x7d\x8c\x05\x58\xee\x83\x41\x0c\x87\x7d\x2f\xbd\x60\x36\x45\xfe\x8d\x52\xf5\xf7\xb2\x10\x18\x9e\x93\xc8\xd6\x4b\xb6\x63\xed\x0c\x7e\xbc\x7d\x98\xad\x18\xa0\x6d\x12\x06\x27\x41\x13\x98\xbe\x50\x7a\xad\x94\xaa\xd9\x4c\x16\xc2\x86\x05\x31\x1b\xb7\xe0\x59\x76\xc4\x9e\x03\x5b\x62\xd8\x63\xa9\xca\xd1\xe6\x5e\x51\xe0\x7d\x7b\x65\x4d\xd4\xb9\x28\x1d\x0a\x0c\x42\xea\xe1\x04\x66\xbc\x20\xe0\x1c\xff\x75\xb0\x48\xef\x33\x74\xb3\x17\x10\x3d\x01\x80\x0d\xd3\xa6\x76\xb1\x14\xc4\xa7\xd1\x20\xc5\x6a\xb5\x69\x23\xd2\x02\x42\x6a\x2b\xd2\x2d\x5d\x7e\xe9\x66\xa9\xc8\x48\x37\xab\x30\xa6\x23\x50\xec\xd9\xbb\x85\xd0\xa2\x53\xd5\x26\x78\x0b\xdc\xb7\xce\x7e\x0b\xa2\xca\x61\x04\x1d\x6c\x6c\x1b\x68\xfa\x1b\xf7\x6c\x0f\xb2\xee\xe4\x1c\x88\x96\x0c\x5e\x25\x70\x5c\xb4\x3f\xa1\x06\xa4\x85\x8d\x86\x09\xe1\x28\xd5\x52\xd6\xb5\x11\xa7\xe8\x1c\x3c\xd2\x61\x37\xe6\x3a\xd5\xfc\xbd\x00\x63\x13\xf4\x39\x0e\xe1\x2c\x23\x4d\x2a\x78\x2d\xb4\x04\x75\xd5\xa8\x03\xe9\x83\xef\x37\xc1\x5e\xbc\xb5\x32\x91\x57\x4b\x8f\xee\xb6\x8e\xf0\xe6\x86\x65\xbc\xe3\x24\x4c\x97\xe9\x39\x44\xa8\xe7\x9d\x69\x44\x70\x96\x87\xce\x24\x84\x1d\x47\x00\x54\x7b\xdb\x77\x1e\x84\xaa\x0d\x0b\xee\x1a\x37\x65\x25\xcc\x79\x86\xcc\x7b\xf6\x12\x8d\xcc\x4b\xc0\x14\x8b\xfa\xcd\xc1\xc4\xae\x6d\x21\xfd\x08\xc3\x2a\x3a\x24\x94\xcb\x7f\x9f\x43\xe2\x6b\x39\x75\x97\xd8\x9a\xb7\xbb\xfe\x5b\x7c\x70\xf0\xc2\x46\xb0\x6a\xf7\x39\x18\x6f\x5f\xc2\x00\x52\x63\xee\x1a\xdf\xbb\xc3\xef\xb4\xd9\x57\x16\x0c\xdf\xa4\x9c\x7b\x0c\x87\x3f\xaa\x5c\xf8\xb6\x33\xbe\xc4\x44\x6f\x36\x59\x1c\x6f\x36\x9b\x19\x09\xe3\x66\x55\x34\x73\x59\x6e\xb2\x8a\x95\x8a\x25\x8d\x8b\xef\xac\x17\xc1\xa3\xe5\x68\x88\x0c\x37\xad\x8c\xb4\xf5\xe8\x0f\x8f\x0e\x21\xe8\x87\x39\x93\x3a\xf6\xec\xc3\x90\xb8\x0e\x81\x9f\xba\x03\x9e\xc4\xfe\x09\xff\xdb\x5a\x6e\xa6\xd9\x3b\xdf\x4a\x11\xc9\x1d\x2f\x6d\xbc\xf9\xdb\xde\xdb\x70\xf1\xb6\xbe\xb2\xf3\x34\x6f\x77\xf3\x6d\x5e\x95\xed\x48\xbc\xe9\x97\x76\x00\x79\x40\x9d\xbc\xbb\x81\x79\xc4\x75\xee\x8a\x04\x50\xdd\x9d\x01\x3e\xe6\x32\x8f\xa9\x26\xde\xc8\x7d\xb0\x3e\xe6\x32\xff\x1d\xc0\x7c\x1c\x2a\xd1\x7d\x1c\xa8\x8f\x8d\x37\x73\xd7\xc1\x4d\xbc\xf3\x45\x9e\xdb\xe6\xee\xe7\xb6\xf9\xbd\x9e\xdb\x1d\x12\xf4\xc7\x39\xb6\x1b\x79\xc3\xbe\x35\x52\x93\x87\xf7\x48\x52\xf8\x8e\x33\x4c\xc7\xb0\x5d\x9d\x27\x15\xe4\xb6\xa9\xe5\x26\x9f\x53\xa7\x65\x4a\xc8\x8a\xb1\x79\xa1\x55\xb4\x8f\x36\xd0\xc2\x88\xf7\xa4\x56\x5c\x50\xac\x82\x9a\x91\x2d\x17\x2d\xb0\x2e\x60\xa1\xd3\x65\xe0\xa5\xa5\xd0\x37\x8a\x96\x30\x4b\x88\x71\xe8\x60\x54\x28\x5d\xea\x45\x10\x17\x01\x03\x6d\x2b\xa1\x29\x95\x85\x20\x46\xcb\xf8\xe8\xed\x6f\xfe\x6f\x77\xbb\xd1\xec\xdf\xf9\x7e\xcb\x5f\xd3\x79\x5e\x2b\xf4\xe1\x94\xde\x10\xf3\x2e\x68\xff\xe3\x4f\x6f\xdf\x81\x91\x81\x28\x12\x49\xe6\x1b\x77\x91\x16\xc8\xef\x42\x29\x0b\x0f\xae\xb9\x6c\xdc\xe9\xbc\x8a\x8e\xdf\x3d\x20\x4f\x37\xc8\x51\xdb\x80\xb3\x93\x6f\x7c\x52\xb6\x70\x3c\xca\xb7\x59\x31\xec\xd6\x09\x45\xdd\x73\x23\xaa\x61\xfc\x3c\x32\x46\xa1\x51\xf3\x4f\xfe\xb7\x88\x3f\xa4\x62\xf1\x3c\xf8\xb2\xd9\xc7\x5c\x65\xfa\xac\xe6\xfa\xbd\x3e\xb3\xb5\x91\x04\xd4\x2d\x71\x76\xb0\x33\x4d\xca\x1f\xfc\x24\x3e\xd4\x67\x7b\x68\x7f\x16\xf9\x99\x76\xd8\xe9\x78\x7b\x42\x3b\xb7\x5e\xdb\x4e\xdb\x77\x0b\xe3\xdb\x8e\xe0\xae\x97\x3f\x6b\x94\xbc\x84\xee\xbe\x27\x5e\x5e\xf7\xcd\xdf\x81\x68\xb2\xd1\xde\xf1\x69\x50\xf4\xaa\x29\xcf\xcc\x69\xbf\x98\xcf\x2b\x31\x07\xa7\xf0\x1b\x9a\xde\x46\xac\xe8\xb8\x69\x80\x89\x09\x05\xce\x15\x2b\x14\xa4\xf5\x3d\xc7\x42\x81\x6f\x14\x84\xe8\x29\xc6\xe9\x3d\x43\x0c\x6c\xed\x75\xdf\x64\xe7\x01\xcd\x7c\x5b\x9b\xbe\x9d\x38\xae\xcf\x13\xad\xa8\x36\x50\x10\x0a\xee\x9e\xa0\xa7\xa9\x5d\x99\x6c\x26\xcb\x3c\x1e\x3e\x18\xd9\xfd\xb5\x32\x7b\xad\x41\xe0\x06\x4e\x40\x65\xd7\x5c\xaf\x80\x8b\x3c\xc4\xc3\xdc\x9a\xe6\x23\xcd\x56\xa2\x22\xa0\x7c\x1d\x07\x46\xdc\xfd\xb4\x1e\x92\x37\x7f\x9c\xc4\xf9\x0d\xc7\x28\xdc\xd0\x2d\x47\x28\x68\x46\x10\x42\x54\x54\x12\x2a\x51\x0d\x59\xa1\xe6\x32\xb3\x57\x43\x96\x73\x4c\xc5\x30\xe7\xd9\x9c\xb8\x76\x74\xa4\x2b\x3b\x09\xbe\xf8\xa6\x94\x35\x62\x34\x9a\xee\xff\x22\x4b\x28\x6b\xa0\xaa\x70\x17\xe8\xd7\x3d\x92\xdd\xba\xd7\x62\xfb\x65\x20\x3c\x3b\x78\xcc\x0b\x2b\xf0\x99\xe1\x76\xae\xc9\xb4\x91\x85\xad\x75\x50\x90\x24\x0e\xd6\xea\x60\xa0\x70\xc6\x12\xdf\xd0\xa2\x0e\xce\x17\xbe\x0f\x99\xa7\x3e\xc7\xd7\xc2\x31\x98\xa3\x9b\xcb\x4a\x64\x35\xcb\x16\x48\xb5\x6b\x45\xaf\xd8\xe3\xa7\x6b\xb5\x5c\x79\x81\x2e\x48\xf8\xde\x83\xcf\x9a\xbd\x1f\x27\x48\xc8\x6f\xc3\x3e\xdd\xa5\xcf\x15\xfc\xa2\xb3\x4a\xba\xb9\x82\x47\xcc\xe1\x03\x26\x92\xd2\xf7\x0b\xe1\x58\x16\x42\x00\x44\xb4\x2f\x45\x26\xee\x21\xe7\xd8\xdb\xeb\x3f\xb1\xdb\x87\xb0\x49\x68\x48\xb2\x84\xa0\xe3\x7b\x67\xfc\x25\xd8\x0c\x91\xf2\x3d\xb9\x8d\x65\x07\x8e\x69\x98\x4b\x13\x3c\x1f\x42\x8c\x80\x39\xb5\xa4\x7b\x40\x7d\x3f\x76\x59\x53\x2c\x87\x2d\x44\x1c\xbd\x64\x45\xb6\x79\xa1\xa6\x1c\xc3\xc8\xf4\x8a\x67\x44\x4e\x78\x8e\x38\x1e\x51\x72\xfb\x8d\xe4\xec\x2d\x16\x1c\xd8\xa9\x24\xaa\x42\xbc\x11\xb3\x3e\x97\xb0\x27\xae\x3d\x71\xdd\x9f\xb8\xd2\xad\xe9\x92\x57\x7c\xe0\x0b\x85\x1d\x78\xa9\x1d\x86\x4b\xd0\x11\x6d\x04\x96\x31\xb7\x51\x0b\x17\x90\x5f\x23\xff\x61\x0b\x18\x57\xa2\x6e\xaa\x12\x6a\x7f\x54\x95\x3a\x48\xb2\xa2\x4f\xa1\x1f\x1e\xf3\x57\x53\x56\x04\x7c\x42\xac\x23\xa0\x70\x74\x2b\x29\xf3\x15\x15\x18\x33\x43\x44\x82\xd0\x71\xf0\xd3\x9d\x19\x08\x7d\x7f\x7f\xee\x61\x67\x95\xa4\xf0\xb6\xb7\x07\x64\x19\xbb\xd2\xc3\xd3\x6f\xa4\x20\x4f\xbb\x2d\x53\x18\xd4\x7d\x7a\xf8\x67\x93\x1e\x9e\xa8\x3f\xba\x75\x0f\xef\x7c\x29\x12\x82\x4a\x9f\x1c\xfe\xa5\x73\x9a\xbd\x13\xb7\xb7\x88\xab\xf7\x4c\xd9\x4e\xf4\x7c\x00\x39\xdb\x83\x8e\xf5\x04\xec\x0b\x26\x60\x47\xa6\x5c\x3d\xc9\xfa\x5d\x93\xac\x63\xd1\xaa\xc0\x10\xb0\x15\x4c\xc2\xb6\x22\x41\x36\x54\x9b\x5b\x86\x54\x57\x86\xa7\x6a\xac\xea\xee\xbc\xcb\x4e\x7f\xef\x00\x6b\x1a\x5d\xdc\x1a\xf1\x03\x19\x98\x41\xb6\x9b\xcc\x16\x5e\xd6\x4f\x35\xdb\xa5\xae\xdf\x88\x6a\x9a\x26\x8c\x9b\xc2\x66\x2f\xae\x2e\xe3\x68\xd9\x10\x82\xd2\x3e\x24\x93\xb7\x85\x0b\x85\x81\x59\xba\x81\xee\xb6\x65\x53\xd4\x72\x55\x20\x40\x42\x10\x43\x1b\x20\x50\xf0\x72\xcd\x78\x84\x48\x29\x72\xc6\xe7\xa6\xc7\x1a\x40\xa2\x2d\x68\x71\xd9\x2c\xa9\x32\xaf\xfb\x08\x00\x4e\x97\x6b\xdf\xbb\xf7\x5d\x74\x30\x0e\xf7\x08\x65\x28\x55\xf9\x86\xba\xfe\xe9\xcd\x0f\x89\x55\x79\x15\x37\x20\x22\x83\x09\xa6\x2b\x5e\xd5\x92\x17\xac\xa9\xac\x73\x9b\xb3\x46\x8b\xca\x72\x83\x05\xbf\x11\x8c\x67\x90\xae\x68\xc8\x01\xfb\x43\x94\x3c\x84\x27\x05\x94\x3f\x8e\x4b\x39\x6b\x8a\x62\xc8\x66\xb2\x04\x54\x5c\xb1\x72\x69\x4d\xbc\x5e\xb0\xb7\xd2\x28\x87\x98\xcc\x42\x04\x0c\x46\x64\x7a\x34\x27\xcd\x1d\x17\x50\xfc\xa2\x28\x76\xf8\xc4\x0a\x0a\x2a\x4f\x0b\x48\x36\x89\xdd\x4a\x81\xef\x02\x88\x1c\x4f\x39\x29\xc8\x56\x6f\x14\x56\x9b\xb7\x08\xfe\xd1\x5a\xc1\x66\xf8\x1d\x3a\xc1\xe2\x92\x9a\x4d\x06\x2b\x95\xeb\xc9\xc0\x1c\xe9\xc9\x40\x8b\xac\x12\xb5\x9e\x0c\x4e\x21\x65\xbd\x35\x0f\x4a\xd2\x0f\xde\x35\x97\x76\x32\x38\x1d\x32\x67\x0b\x9b\xaa\x7a\x71\x60\x4e\x09\x7d\x61\x43\xdc\xcf\x9b\xf0\x71\xdb\x67\x72\x6b\x48\xab\x63\x6b\x41\xa4\x4f\xea\x36\x32\x1f\x7f\x63\x0e\x47\x10\xe0\x13\xe0\x99\xfa\xa8\x9e\xbb\xcd\x62\xcb\x0c\x5a\x4c\xd8\x6f\x06\x8a\x30\x9d\xd1\xda\xf7\x2e\x8a\x22\xaa\x4c\x0c\x7f\xda\xfb\x7c\xd0\x20\x91\xe0\x74\x06\xf8\xb3\xf9\x39\x1e\x1c\xfe\x84\xf7\xc5\x9d\xa0\x1f\x7e\x40\x06\x4d\x1f\x37\x0c\x1d\xdd\x9d\x17\x35\x72\x3e\xf1\x86\x92\x2b\xc0\x61\x69\x43\x32\x72\x87\x32\x62\xe6\x38\x66\xd0\x79\x62\x52\xc0\x03\xef\x17\xbe\xde\x0d\xfa\x09\x2d\x08\x5b\x43\xe7\x9c\x7f\x31\xbc\xa3\x47\x77\x2e\xf6\x98\x99\xbd\xa9\xb6\x97\x46\x3f\x99\x1f\xec\x13\x3a\xc0\x1e\xc2\xb7\xb5\xa7\x53\x6b\xa3\x37\xab\x52\x9b\x65\xe1\x0d\xbe\xac\xd0\xde\x0d\xd1\x55\x5e\x02\x86\xe8\xe0\xfd\xcc\xe2\xf5\x4e\x57\x17\x32\x16\xdf\x79\xd8\x6c\xba\xee\x48\xdf\xb2\x66\xe2\x83\xd4\x50\xfc\xc0\xb0\xce\xc0\x34\x07\xd2\x28\x9b\xcb\x1b\x51\x86\x83\x05\xb8\x30\x23\xfc\x21\x3c\x13\x0e\x96\x07\x22\x5a\xef\x6c\xeb\x29\x78\x4f\xc1\x3f\x89\xb3\x6d\x13\xc1\x71\xf5\x3d\xee\x42\x73\x7a\x57\xdc\x17\xe8\x8a\x3b\xc0\x07\xb7\x87\xf3\xad\xf7\xba\x7d\x76\xb4\x7d\x7f\xa3\xf5\x91\xdd\x6d\xbd\x9f\xed\x6b\x62\x32\x07\x1b\xad\x1f\xc0\xc1\xb6\x8f\x67\x6d\x9b\x4b\xad\xf7\xa5\x7d\xa9\x64\xe9\x58\xf4\xa8\x27\x44\xbf\x4f\x42\x74\x4c\x0a\x44\xc2\xf5\x36\x02\x04\xf2\x6f\xaa\x9a\x1c\x28\xc0\xb0\xf1\xee\xfe\x82\xc8\x89\x20\x37\x8d\x0e\xf3\x4e\xd2\x89\xbf\xe4\xba\x1a\xd0\x31\x1e\x0e\x8c\x04\xbe\xd9\xc5\xb5\xd9\xc3\x65\x1d\x5c\xe8\x3f\xb2\x05\xc4\xdc\xc1\xc6\x11\x79\x93\xeb\xe1\x6a\xa3\xe9\x0e\xd2\xe2\x02\x53\xfc\x5e\xdd\x96\xc9\x34\xda\x30\x67\xd6\x3a\xe5\x0e\xe8\xf6\x10\x53\xb6\x15\xb2\xb7\xa6\x09\xe2\x9d\x77\xbb\xcc\x03\x9d\x2a\x52\x2c\x8c\x06\x05\xfe\x30\x99\x9b\x6b\x85\x30\x64\xb4\xeb\x64\x32\x8a\x9c\x12\x00\xa2\x15\xf8\x97\x8c\xda\xc2\xb8\xcd\x1a\xb9\xb8\xba\xf4\xe4\x86\xbe\x37\x44\x25\x0d\xe9\xd5\x8c\xdc\x4a\x56\xab\xb1\xae\x24\x18\x82\x61\x0a\xb8\xdf\xa0\xb7\xed\x32\xc0\xdc\xf7\x84\xa1\xc6\x45\x9e\x53\xfa\x30\x79\x35\x03\x5b\x3e\xa9\x6e\x63\x0b\xd2\x0c\x37\x63\x32\x40\xc0\x4c\x20\xa4\x32\x13\x17\x19\x14\x57\xb3\x8d\x75\xbb\x35\x10\x79\x4e\xaa\x25\x62\xfe\xe3\xc6\x52\x37\x3f\xd9\xe9\xe3\xc8\x5c\x37\x07\x1e\x6b\x35\xb3\xab\xdf\x3e\x71\x63\xf6\x33\xe2\x19\xa0\x08\xe0\x8b\xc0\xf9\xa9\xf3\x4a\xb0\xc9\xc0\x8c\x04\x81\x3f\x61\x28\xe6\x9f\x66\x5c\x93\x41\x3c\xd3\xc9\xc0\x69\xd4\x81\xc6\xec\xac\x88\x01\x37\x37\x4d\xcc\x90\x2d\xe7\x6f\xbd\x42\x82\x44\x25\x00\xbd\x31\x54\xb3\x0f\xb9\x78\xb4\x6d\x9b\x26\xbf\xa9\x37\x30\x0d\xa4\xbb\x24\xf3\x42\xe7\x38\x58\x41\xc8\xce\x9e\x3e\xf9\x9e\xa8\x8a\x39\xdb\x41\x50\xbf\xf7\x94\xe2\xba\xa2\x97\x35\x5a\x59\xd8\x05\x57\x31\xd2\x2c\x1e\xba\x28\xef\xba\x4e\x07\x50\x12\x5e\xac\x16\xbc\xcf\xe7\xec\xf3\x39\x8f\x91\xcf\x49\x87\xe9\x0b\xcb\xea\x64\x2f\x8c\x54\x9c\x41\xfc\x8a\x2c\xd9\xcd\xf9\xf8\xfc\x5f\xcd\x3f\x66\xfc\x46\x41\xe5\xcc\x8d\x94\xfb\xec\xe6\x3c\xce\x06\x32\xe7\x84\xe0\x42\x59\xa1\xca\xb9\xa8\x10\x43\x01\x0a\x5e\x62\xdf\x4f\x9e\xf4\x69\xa4\x47\x4c\x23\xdd\x40\xbf\xfa\x64\xd2\xde\x05\xd3\x2b\xa5\x5f\x48\x32\x29\xdd\xe1\x3b\x78\xd4\x37\xdc\xfe\x2d\xbc\xe9\x01\x5c\xf0\x5d\xae\xf7\xe5\x27\x99\x1e\x8d\x27\xd2\xe4\xee\xc1\x1a\x7b\x7f\x7b\x4f\xec\x7b\x62\xdf\x27\xb7\x46\xbc\xe2\x4b\xf0\xab\xd3\x50\x0f\xf5\xae\xb7\x66\xb8\x85\xe3\x1c\xdb\xd3\xbe\x91\x91\x3d\x68\xea\xeb\xd1\x79\x8d\x3e\x12\xb3\xe9\xfd\x6c\x9f\x9b\x9f\xed\x41\x92\x6e\x37\x8b\x6f\xbd\x27\xee\x4b\xe7\x83\x87\x7a\xe2\x36\x9f\x85\xe3\x78\xe7\xba\xfd\x1f\x39\x0d\xf7\x78\xc4\xb4\xa7\xa2\xbf\x03\x2a\xfa\x20\xe4\xb3\xa7\x9b\x3d\xdd\x3c\x56\x38\x43\xd7\x6a\xd3\xe7\x02\xf7\xb9\xc0\x7d\x2e\x70\x9f\x0b\xdc\xe7\x02\xf7\xb9\xc0\x77\xcf\x05\x0e\x8c\x2c\x9f\x43\x46\xf0\xfd\xa4\xf6\xe3\xfa\x9e\x7b\xc1\xbc\xb7\xa4\xf7\x92\xf0\xe7\x9c\x7b\x7c\x6f\x7f\xe9\xc3\x39\x41\xfb\x6c\xe4\x87\xcc\x46\xbe\x3f\x9b\xe8\xdd\xb1\x3d\x13\xe9\x99\xc8\x17\xe0\x8e\xfd\x2a\xd2\x9f\x7b\x67\xed\x83\x3b\x6b\x1f\x2e\x39\xfa\x68\xcc\xc6\x7c\xac\x77\x26\x7c\x51\xec\xe6\x53\x65\x64\x27\xa4\xc8\xde\x99\xf0\xa5\x73\xbf\x3b\x3a\x13\x1e\xcc\xfb\x7a\x94\x1c\xed\x23\xc8\xe2\x3d\x5d\xfc\xca\xe9\xe2\x71\x09\x62\x4f\x09\x7f\xcf\x94\xf0\xf8\x24\xb0\x4f\x12\xff\xca\x93\xc4\x5b\x8a\x47\x9f\x2a\xbe\xfd\x9c\xed\xc3\x29\x53\xe9\xe2\x66\x18\xc4\x35\xf7\x4f\x1d\xbf\x39\x3f\x52\xf2\xb8\xdb\xe7\x3e\x8b\xbc\xcf\x22\xff\x64\x59\xe4\x58\x33\xb8\x4f\x22\xef\x93\xc8\xef\x9f\x44\x8e\x67\xa9\xcf\x21\xef\x73\xc8\x3f\x56\x0e\x79\x9a\x7a\xf5\x29\xe4\xbd\x1b\xab\x57\x5f\xbf\x90\x14\x72\xbc\xc2\x77\x88\x88\x48\xdf\xfd\xcd\x7c\xe9\x01\x42\x27\x3a\x0c\xaf\x4f\x1f\xef\xd3\xc7\x7b\x42\xdf\x13\xfa\xcf\x85\xd0\x7f\x45\xe9\xe3\x48\x6b\xbf\x84\x80\x04\x1c\xe9\xa1\xf1\x08\xf1\xfc\x36\x73\x9b\x63\x47\x23\x6c\xe2\x61\x5f\x56\xe6\x78\xef\x91\xfb\xe2\x18\xcd\x27\x4e\x1e\xdf\x28\xbb\xf5\xce\xba\x2f\x9d\x09\x1e\xea\xac\xdb\x78\x14\x8e\xe3\xb9\xeb\x74\xdf\x67\x8e\xf7\x24\xf4\x8b\xce\x1c\xef\x1a\x7a\x7b\xa2\xf9\xbb\x27\x9a\x47\xa5\x96\x7d\xda\x78\x9f\x36\xde\xa7\x8d\xf7\x69\xe3\xbf\xeb\xb4\xf1\x47\x7f\x78\xb4\x31\x5d\xdc\xe5\xcd\xd9\x1b\xcb\x1c\xd5\x18\xb3\x47\x7f\x38\x9b\x29\x15\xbd\x0c\x6d\x9b\xa9\xdb\xcd\x47\xd0\xc0\x1c\xb2\xbd\xbb\xed\x13\xd4\x0f\x88\xa8\xe8\xf3\xd3\xfb\xfc\xf4\xde\x54\xdf\x0b\xdc\x5f\x56\x7e\xfa\x3d\x9d\xb1\x0f\xe6\x62\xed\x93\xd3\xfb\xe4\xf4\x9e\x83\xf4\x1c\xa4\xe7\x20\x7d\x72\x7a\xef\x0a\x7e\x58\x57\x70\x9f\x97\xde\x73\x9a\x4f\x9d\x7f\x79\x6c\x37\x6f\xef\xdf\xfd\x9a\xf8\xde\xdd\x5c\x15\x0f\xe5\xd8\x3d\x4a\x52\x7a\x9f\x93\xde\xd3\xc4\x87\xcf\x49\x0f\x4c\x93\x3d\x15\xfc\xfd\x52\xc1\xa3\x93\xbf\x3e\x21\xfd\x2b\x4f\x48\x8f\xf5\x8d\x3e\x1f\xbd\x2f\x5d\xde\x27\x9d\xf7\x49\xe7\x87\x93\x13\x23\xb7\xe5\x4d\x21\xcb\xb9\xe1\x2f\x57\x95\x54\x95\xac\xd7\xcf\x0b\xae\xf5\xd6\x38\x9f\xb0\xa1\x13\x30\x97\x7c\x05\x3e\x52\x8a\x86\x58\x51\x23\x96\x41\x2b\x20\x88\x44\x71\xdc\x23\x23\x21\x1a\x99\x18\xa6\x3d\x66\xef\x8c\x88\x0a\x2b\x40\x3e\x55\x5e\xae\xcd\x0f\x32\xb7\x2d\x77\x46\xf0\x98\xb7\x7b\x51\xf9\xc1\x45\xe5\x68\x09\xdb\x2b\x1a\xfc\x45\xf1\x21\xbc\x9a\xca\xba\xe2\xd5\xda\xca\xb0\x20\x65\x34\xba\xe1\x45\xb1\x66\xab\x4a\xdd\xc8\x5c\x68\x36\x6f\x64\x2e\x0a\xd8\x02\x55\xb2\x5b\x4c\x6d\x96\xba\x7d\x94\x68\x71\x09\x22\x20\x79\xa9\xd1\x2a\x4a\xb4\xb7\x3b\xc2\xe8\xb1\x0b\xae\xd0\xe6\x93\xc0\xcc\xe0\xab\xf1\x29\xf7\x1f\xcd\x54\xa9\x65\x2e\x2a\x74\xf4\x9b\x4d\xcc\xa9\x23\x37\x4e\x43\xca\x57\x2a\xa7\x00\x81\x5c\xc1\x75\xc6\xc8\xa6\x72\xdd\x9a\xce\x98\xbd\x2e\x8b\x35\x84\x70\xc5\x5f\xa4\x3b\xb0\xe4\xd5\x7b\xfc\xd4\x75\x34\xec\xeb\x31\xfb\x9b\xba\x15\x37\xa2\x1a\x32\x39\x63\x4b\x73\x1a\xea\x05\x24\x10\xb5\x7a\x12\xda\xfa\xa8\x6e\x65\xbd\x30\x23\x96\x55\xbb\x33\x0a\x7c\xd2\xa2\x86\x93\x59\x59\x0a\xad\x97\xbc\x28\xcc\x09\xc5\x7b\xa9\x66\x48\xca\xc8\xea\x6c\x27\xde\xfe\x5c\x04\xe1\xb0\x61\x91\x82\x7d\x9b\x2a\x55\x08\x5e\xf6\x1e\x90\xcf\x40\x07\x7a\xe8\x31\xbb\x41\x1d\xcf\xd3\xb2\xaa\x84\x61\x95\x52\x95\xe8\xf0\x4e\x31\xac\xb8\x85\x95\xd2\xe9\x2f\xb8\xae\xd4\xa4\x9c\xe3\xcd\x85\xab\x52\xa8\x5b\x51\xf9\x13\xcb\x5e\x63\x9c\xe5\x2b\xbc\x75\xd4\xeb\x0f\xa6\xd1\x95\x6b\x13\x0a\x7c\xa9\x16\xe6\xb2\x36\xa5\x16\xf5\x18\x65\x68\x17\x71\x68\x84\xfa\x11\xa1\x6d\xcc\xc1\xf2\x44\x50\x0c\xaf\x54\x79\xe5\x46\xe7\xba\x99\x09\x6e\xd6\x78\x64\x9a\x26\x69\x20\xf2\xc2\xce\x5a\x78\x26\x6b\x39\x5a\x9b\x1e\xc1\xb0\x68\x85\x78\x56\x37\xbc\xf0\x4d\x48\x3d\x04\xdf\x4d\x26\xe4\x8d\xb0\x64\x5a\x90\x57\x3b\x0e\x82\x35\x3a\x02\x10\x33\xf4\x56\x49\x20\x8b\x40\x70\x83\x21\x13\x6f\x1f\x0c\x07\xa8\x86\xe2\x4f\x4f\x9f\xec\xd2\xa4\xef\xe4\x5b\xd9\x22\xf2\xec\xb2\x1a\x76\x1a\xa7\xcc\x87\xf1\x62\xee\x56\x5e\x7a\xe3\xde\x27\x35\xee\x49\x6b\xdc\x83\xa9\x91\x79\xaf\xc5\xce\xee\x61\xe8\xf3\xa7\x6d\xdc\x11\xb0\x7b\x93\xdf\x47\x67\x77\xb0\xc1\xb6\xdd\x17\xc1\xe9\xf6\xb6\x2a\x6e\x53\xe5\xee\x69\x5f\x8c\xba\xb6\x85\x4f\xf6\xd5\x15\x5f\xbc\xbc\x7a\xf3\xf2\xf9\xc5\xbb\x97\x2f\xd8\x08\x39\x0b\x5a\x19\x02\xa0\xbf\x58\xec\x95\x46\xa3\x74\xce\x97\xe9\x9a\x05\x77\xc8\xb9\x58\xce\xa2\x77\xc6\xac\xd7\x48\x7f\xef\xf4\xbd\xd7\x48\x7b\x8d\xb4\xd7\x48\xbf\x7c\x16\xdd\x6b\xa4\xbd\x46\xfa\x3b\xd6\x48\x53\xe2\x55\xaf\x97\x7e\xc5\x72\xcb\x67\xa0\x97\x26\x45\xfa\x5e\x3b\xed\xb5\xd3\x07\xd2\x4e\x93\xe7\xed\x98\x3a\x2a\x65\x3f\xf5\x2a\x6a\xaf\xa2\x7e\x4e\xa4\xbe\x57\x51\x7b\x15\xb5\x57\x51\xbf\x7c\x3e\xdd\xab\xa8\xbd\x8a\xfa\x3b\x56\x51\x13\xd2\x55\xaf\xa1\x7e\xc5\x62\xcb\x67\xa0\xa1\xa6\x04\xfa\x5e\x41\xed\x15\xd4\x07\x52\x50\x53\xc7\xed\xbe\xfa\xa9\xa8\xcd\xb9\xd3\x81\xfa\xab\xf2\x2b\x73\xc8\xb6\x13\x4e\xdb\x08\xcf\xb3\x85\xcc\xf3\x67\x16\x30\xf5\x90\x92\xf1\x3c\x87\xa5\xe1\x05\xab\x9a\xb2\x96\x4b\xc1\x88\x5c\x2e\x01\x68\x09\xc0\xa5\xd8\x95\xca\x7b\x68\xa0\x1e\xd8\xe1\x2b\x21\x54\xc7\x92\x86\x8d\x70\xb5\x17\x57\xa2\x6b\x3c\xee\x5e\xe3\xb7\xa6\x8b\x9d\x64\x66\x33\x19\x80\xf7\xef\x0d\x1d\xb0\xe5\x03\x3b\x85\xb4\xb0\x61\x9c\xef\xe8\xc9\x90\xea\x24\xa4\xf4\xb2\xd9\xe7\x27\x9b\x25\x52\x56\xed\xea\x75\xf6\xef\x70\xc9\x6c\xf3\x1d\xe8\x85\xb2\x4f\x2c\x94\x7d\x19\x96\x88\xfd\xa5\xb2\x2d\x52\xd3\xc3\x09\x64\x6f\x89\x19\xec\x24\x94\xa6\x21\x9e\xe9\xd0\x7a\x6b\x28\x11\x68\xec\x70\x5c\xeb\xdd\xd2\x96\x28\x6f\xba\x1f\x79\x59\xde\x44\x74\x30\xd6\x95\x5f\x96\x37\x3f\xf3\xca\x10\x2f\x59\xfe\x27\xa2\x88\xd5\xca\xc1\x6e\x56\xf7\xba\xdf\x99\xaa\x84\xd9\x25\xfc\x06\x5c\x69\x51\xde\x7c\x5f\xa9\x65\x72\x94\xe6\xc1\xf6\x91\x9a\x16\x6f\xe9\x3e\x3f\xf0\x80\xfd\xa7\x60\xdc\xb6\x08\x68\xe2\xfa\xd0\x13\x22\x92\x7c\x2a\x0a\xf6\xf7\x46\x54\x6b\xa6\x6e\x44\xe5\xe1\x8a\x1d\xf5\x1d\x3a\x28\xd3\x8c\x6b\x01\xd6\x9c\x31\x7b\x43\x2c\xef\x9e\x99\xe3\x71\x51\xd0\xe1\xe0\x46\x15\xcd\x52\xfc\xa8\x9a\x32\x85\xa1\xf4\x73\xf0\x74\xcb\xc2\x07\xcd\x1e\x76\xd9\x83\x0f\x21\xd4\x2c\xfc\xbd\x71\xe0\xbb\xc7\xdc\x1e\x2e\x78\xbf\xd4\x56\xfc\xdf\xc3\xc6\xba\x1b\xf9\xc9\xb4\x3f\xeb\x1c\xa9\xe1\x86\x26\xe6\x9a\x24\x9f\xd1\xe7\xb6\x3c\xc3\x65\xdb\x97\x96\x6d\x2b\xfa\xaa\x6b\x55\xf1\x39\x74\xfd\xfc\xed\xe5\x8b\x4a\xde\x88\x6a\x1b\x15\x73\x8d\x58\xc6\x57\x86\xdc\xeb\x04\xde\x3a\x67\xcf\xed\x59\x61\x6f\xf1\x03\xec\xd2\xc8\x48\x33\x9e\x09\x76\xf2\xfc\xed\xe5\x29\xc3\xfd\x66\x39\x76\x96\x8b\x55\xa1\xd6\x22\x67\x8a\x90\xcc\x10\xb2\x6c\xcc\xfe\xbd\x99\x8a\xaa\x14\xb5\xd1\x54\xeb\x9a\x67\x0b\x96\x0b\xf8\xbf\xa0\x5e\x69\xa3\x2d\xfa\x32\xf1\xfc\x5a\x99\x56\xa2\x5a\xca\x52\x38\x47\x13\xbd\x2e\xb5\xd5\x6f\x73\xec\xbd\x10\xf5\x9e\x3d\x18\xea\x1c\x4e\xb6\x14\x22\x07\x51\x70\x2a\xd8\x8a\x6b\x8d\xc3\x5f\x9a\xbd\x19\x33\xbf\x50\x36\x59\x1d\xd1\xc3\x83\x04\xdf\xa4\x4a\x1d\xca\xc3\xa0\x5f\xf4\xe2\x70\xaf\x66\x7f\x55\xa2\x27\xad\x8e\x17\x3e\xdd\xbf\x10\x0a\xa3\xcc\x65\x66\x0e\x52\xcb\xbf\x21\xcc\x95\xb2\xf4\x82\xd0\xe1\xc3\xb5\x9e\x99\xe5\xad\xd5\x9f\x98\xac\xd9\x8f\x3f\xbd\x7d\x67\x96\x28\x82\x7d\x25\xac\x42\xef\xec\x31\xfd\xfd\x55\xd4\x57\x45\x33\x97\xa5\xf9\xf6\xc9\x29\xcb\x78\x51\x10\x68\x08\xaf\xe9\x6b\x18\x2d\x41\x5f\x86\x9e\x00\xfa\x70\x2a\xd8\x77\x4f\x59\xb6\xe0\x15\xcf\x6a\xf3\x71\x55\xb1\x42\x68\x3d\x64\x53\x31\x97\x65\x09\xe0\x17\x65\x6e\xb6\xd6\xfc\x13\xbc\x5c\xbc\x64\x20\x37\x42\xb9\x05\x99\xf9\xb7\xd9\xc9\x2f\x7c\xf4\x8f\xc7\xa3\x3f\x5e\x8c\xfe\xc7\xaf\xa7\xd8\x38\xe7\x7a\x21\x34\x3b\x19\x9d\x0e\x59\xae\x6a\xcd\x4e\xc6\xa7\x54\x00\x34\xe8\x03\xbc\x59\xb7\x42\x94\x5f\x86\x14\x9f\xb6\xa0\xb4\x8e\x0a\x46\x09\x64\x8e\x28\xd9\xdd\x42\x8a\xba\x0f\xc8\x24\xf1\xb5\x71\xc8\xd7\xf6\xb3\xb5\x24\x18\xe2\x91\x8c\x2c\x89\x9e\x77\x16\x91\x0a\x1b\x26\x4b\x48\xb5\xd9\x4c\x6f\x63\xf9\x3c\x98\xca\x21\xfe\x2f\x2f\x79\xdd\xc3\xbe\x92\x38\xf0\xbd\x61\xa5\xf7\x76\x1d\xd3\xae\x92\xd2\x15\xee\x6b\x50\xd9\x44\x6e\xf7\x21\x8a\xd6\x92\x52\xfb\x5a\x27\x9e\x67\x70\x7f\xad\xf6\x70\x5d\x81\x72\xf0\xc6\xd1\xc9\xf6\x27\xe3\xe7\x91\x8c\x22\x35\xb0\xa6\x58\x9f\x21\x8a\x8b\x11\x79\xa8\x78\x98\xcf\xe1\xe0\x4e\xa6\x22\xe3\x8d\x06\x18\x78\xb9\x5c\x15\xe4\x69\xb3\x4c\xee\xb9\xd3\x6c\xae\x9a\x69\x21\xf5\x02\x75\xbe\x93\x53\x73\xac\x16\x2a\x3f\xb5\xc8\x3f\x54\x20\x67\x1f\x15\xc9\x52\x5b\x5b\x7d\x80\x1a\xd2\xa0\xa5\xd3\xcd\x10\xa8\x3e\x5b\x88\xec\x3d\x11\x79\x68\x81\xcd\x97\x70\x6d\x6b\x5e\x37\x08\x77\x7f\xcb\xcd\xfd\x6d\xca\x5a\x16\x41\x5b\xa0\x2a\xd0\xde\x48\x5a\x62\x66\x6e\xc0\xaa\x52\x99\x10\x20\x06\xd5\x0a\x35\x24\x28\x6b\xf2\x8e\xa6\x2c\x3e\x20\x71\x1f\xd1\x8b\x15\xcb\x94\xaa\x72\x59\xc2\x1a\x83\x30\xd4\x5d\x63\x33\x04\xa4\x12\xdb\x87\x6a\xa3\x66\xba\x1b\x21\x35\xcb\x94\xd9\x80\xda\x03\x60\xbb\x43\xf3\x46\xcc\xa5\xae\x2b\x17\xfd\x03\x81\x42\xe6\x15\x51\xf2\x69\x21\x72\xda\x04\xe1\xd1\x97\x7c\xb9\x9d\x5a\xb1\x19\x2f\x34\x05\xf6\x75\xbe\x6b\x63\xf6\xf4\x7b\xb9\x5a\x19\x1a\xf7\xda\xe8\x97\xb7\x52\x8b\xed\xed\xcd\xf6\x45\x5a\x63\x10\xcd\x37\xd3\x80\x0b\xb5\x29\x2c\xeb\x05\x31\x6e\x89\xb3\x6c\xca\x5c\x54\xc5\x1a\x08\x3f\x2e\xaa\x6e\x56\x2b\x55\xd5\xda\x88\xa4\xe5\x1c\xaa\xd6\xdc\x96\xa2\xd2\x0b\xb9\x82\x99\xae\x8c\x32\xac\x75\x20\x90\xd1\x8b\xb4\xc5\x88\x9a\x05\x5b\x6b\x66\xf4\x46\x00\x17\x50\xd1\xdd\x64\xdf\xbf\x0d\x06\x49\x6c\x1a\x3d\xcc\xde\x0b\x6d\x0e\xaf\x2c\x74\x3b\x64\x0b\x44\x5e\x1b\xb3\xc5\x4b\x5f\x6d\x6b\xa1\x4a\x55\x51\x40\x35\xb1\x21\xac\x06\x05\xdb\x64\xf7\x14\xef\x50\xfc\xfd\x70\x63\x93\x61\x5d\x2b\x95\x5f\x96\x33\xf5\xba\x44\x7b\x4b\xd7\x61\x32\x8b\xa3\x38\xe3\xf6\x87\x50\x09\x3f\xfd\xb6\x91\xe1\xa4\x90\xef\xc1\x90\x65\x14\x14\xf8\xc4\x4f\x97\x2f\x86\x4c\xd4\xd9\xf8\x94\xe5\x4d\xe5\x56\xdd\x9f\x17\x0d\x87\x99\x46\x46\xe7\xb0\xdd\x2d\xc1\xcb\xd6\x49\xdb\x85\x8d\xd6\x35\xeb\x6f\x5e\xf7\x17\x95\x06\xee\xc3\x78\x5b\x53\xe6\x1a\x4a\xb5\x99\x23\x12\x59\x76\xcc\x7d\xc4\x2b\x06\x0b\x65\xed\x2e\x30\x0a\xf3\xf9\xce\xf8\xb8\x26\xb3\x9e\xa1\x86\xe2\x43\x6d\x81\xeb\xcd\x20\x5e\xa9\x5c\xb4\x49\xa3\xb9\x1a\xba\x33\x4e\x10\x46\xf5\x4a\x95\x5a\xda\x6a\x6c\x2b\x5e\x69\xab\x99\x41\xbc\x3b\x77\xb2\x4e\xf8\x7d\x5a\x13\xd9\x1d\x09\x7e\x64\xa6\x8a\x42\xdd\x9a\x37\xdd\x43\x33\x4a\x7b\x53\xed\xeb\xb3\xce\x99\xd0\xe1\x91\xa1\x43\x8e\x32\x83\x9c\x2f\x6a\x36\xaf\xd4\x2d\xd6\x38\xc1\xe8\x7d\x31\x93\x1f\xa2\x18\xdf\x31\x9b\x0c\x32\xed\xe5\x3d\xe2\xa5\x2b\x95\x8f\x8d\x6a\x3a\x19\x3c\x03\xab\x27\xa8\xd2\x5b\x5b\x82\x09\x2a\x6c\x8e\x98\x75\x1b\xdf\x69\x64\x6e\x5a\xe3\xed\x38\x31\xbf\xfc\x74\xf9\xe2\x34\xdd\x5e\xac\x16\x62\x29\x2a\x5e\x98\x37\x26\x03\x33\xd5\xc9\x80\xc9\xd9\xac\xcd\x27\x4a\xe6\x9a\x32\x59\x16\xb2\xb4\x4f\x27\x25\xdb\xf1\x9f\x00\x8a\x90\xfb\x1b\x8e\x36\xd7\x21\x53\x8e\xa2\x4e\x06\x70\x86\x27\x83\x49\x39\x29\x77\x8d\x96\x8a\x79\x89\x5b\x47\x1c\x64\x19\x32\xd8\xf3\xf1\xf9\x77\x50\x10\xc6\x52\x1f\xab\x5a\xc1\xd9\xc2\x53\xa7\x89\x8b\x12\x45\x85\x5a\x7a\x30\xef\xc9\xe0\xca\xa8\x4c\xba\x16\x65\x3d\x19\x10\x30\xe2\xcb\xe0\xe3\x38\x85\x1f\xe4\x4c\x64\xeb\xac\x10\x3f\xaa\x5c\x10\x6f\x70\x5d\x67\xbc\x64\x85\xe0\x37\xc2\xdd\x18\x96\x4b\xed\x18\xd2\x99\xaa\x98\x9c\x97\x18\xa0\x6e\xc9\xe7\x98\x5d\xe8\xd6\x24\xbe\x05\xb0\xc5\xf2\x51\xed\x46\xe9\x9b\x0f\xa3\x8f\xc1\x2c\x6d\x23\x55\x0a\xb6\x54\x39\x45\xa2\x86\x46\x5b\x84\x2a\xb4\x76\x5b\xc7\x1b\xfd\xed\xf7\xf6\x54\xbb\x3e\xd0\x11\x90\x6a\xa9\x87\xb0\x7e\xe2\x03\x37\xdc\x18\x0a\xeb\x18\x45\x77\xb9\x34\xfd\xc0\xa9\x58\xf1\x8a\x2f\x4d\x0f\x96\xfb\xe4\x6d\xc9\x2e\xe0\x85\xb4\xbf\xcf\xf9\x8a\x67\xb2\x4e\x70\xc3\x36\xe1\x6e\xbd\x10\x51\x6e\x92\xb2\xba\xd4\xfb\x96\x1b\xa9\x0d\x82\x6c\x5d\x18\x18\x43\x3f\x09\x24\x2d\x20\xeb\x23\xf3\x77\x66\xbb\x76\x1d\x76\xe8\x23\x5e\x73\x82\x68\x9c\xae\x59\x56\x09\xa4\x4d\xcf\xdf\x5e\xbe\x6d\x0d\xd0\xda\x94\x41\x34\xca\xfc\xb0\x1d\x01\x1b\x9b\xd3\x6e\x08\x15\xc8\x72\x36\xc1\xc1\x8a\x2e\x72\xb9\x14\xb9\xe4\xb5\x28\xd6\xe1\x56\x02\x5d\x74\x46\xaf\xcb\xd2\x56\xaa\x03\x06\x52\xa9\x1b\x69\xd8\xbf\x69\x64\x2e\x08\x39\x6c\x28\x7a\xdb\xc8\x46\x16\xf1\x95\xa8\xba\x91\x70\xbd\x70\xd8\x9d\xee\xc2\x30\x0b\x24\xe3\x46\xeb\x57\x20\x84\xc8\x1a\xb8\xf6\xc6\x29\xc3\xbc\x2e\x0a\x10\x17\x6b\x79\x23\x8a\xf5\x30\xec\x9e\xe6\xe9\x4e\xa6\xcd\xc2\x20\x39\x02\x82\xc1\x99\xaa\x90\xad\xa1\x18\xe1\x4a\xf1\xcd\x0a\x90\xc6\x60\x2e\x15\x2e\x4b\x67\xf7\x42\x16\x61\xc6\x3f\x15\xa2\xf4\x93\xa0\x45\x97\xb6\xc0\x25\xc8\x2c\xf4\x69\xf3\x2d\xac\x0e\x7a\xc3\x65\x01\x93\x74\x82\x69\x62\xb6\x8e\xfc\x38\x79\x93\xac\x90\x6d\xd6\x9c\xbc\x00\x37\x5d\x42\x92\xb0\x45\xa4\x5a\x39\x0b\xcf\xad\xd9\xfa\xf7\x04\x0b\x6b\xf7\x7a\x83\x1c\x63\x65\xc7\xd6\x10\x67\xde\xc8\x61\xa6\x01\xb8\xa4\x52\xb7\xc8\xe0\x90\xa8\x01\xa9\x71\x8d\x36\xeb\x1d\xc1\xcc\xe2\xdd\x8b\xf5\x3b\xd8\x39\xab\x3a\x21\x9f\x0e\x08\x9c\xa1\x1f\xd8\x59\xc3\x0b\x76\xf5\xf3\xd9\xd5\xcf\xcf\xd9\x52\x18\xc9\x56\xea\x25\x8e\x12\x18\x04\xd2\x20\x18\x53\x40\x87\xe9\xe8\x4b\x0d\x8f\x87\x6e\xf6\xbc\xf2\x23\x23\x66\x25\xe1\xaa\x5b\x5f\x23\x0c\xd2\xa9\x2b\x21\x43\xb2\x04\x51\x56\xac\xb0\xeb\x0d\x53\x26\x6d\x01\x17\xca\x3e\x00\x12\x87\xc1\xff\x63\x76\x61\x57\x79\xc1\xad\xb3\x89\xdf\x9a\xa1\x58\x73\x5b\xa8\x4d\x12\x57\x9a\x2b\xa2\x45\x73\x51\x33\xde\x15\x98\xbc\x99\x9b\xe8\x36\x4e\x71\xcc\xbe\x57\x15\xa6\x37\x75\x9d\x7a\x6e\xb9\x51\x5c\x72\xab\xa3\x85\x70\xb6\x8d\xf7\x6e\x0f\x46\x86\xcf\xce\x65\xbd\x68\xa6\x86\xc5\xe6\x2a\xd3\x9e\xcf\x8e\x0a\x95\xf1\x62\x44\xeb\x3a\x5e\xd4\xcb\xc2\x4f\xd3\xdc\xc6\x90\xdf\xd8\x11\x21\xdd\xd7\xc8\x80\x50\x01\x85\xdf\xf1\xcf\x25\x5f\xc3\xca\xe4\xb9\x2d\x1f\x2a\xd8\xac\x31\x57\x28\x95\xfb\x71\x40\xd1\xd0\xe1\xe0\xc3\x28\x98\x96\x39\xcd\x23\xdb\x04\x42\x97\xf6\x01\xcc\x8d\x8c\x1c\x66\x37\x76\x98\x37\x4c\x93\x44\x31\x6c\xf2\xae\x16\x45\x20\xe3\x9a\x16\xba\x06\xc5\xd0\xf0\x61\xce\x4a\x90\x1a\xc2\x06\x94\x14\x57\x0a\x3c\x6b\xc0\x57\x9c\x62\x04\x9f\x22\x93\x1e\xc2\x70\x17\x6b\x10\x18\x0a\x65\xb8\x81\xc6\x7c\x93\x86\x54\x53\xd3\xf9\x08\xfb\x1d\x55\xa8\x20\xf3\x8a\x99\x3b\x90\xf1\xca\x47\x08\x20\x4d\x7e\x1f\x4a\xf9\xbc\xa9\x95\x99\x46\x86\x79\x88\x6a\xd5\x14\x1b\x46\x61\x21\xdb\x03\x39\x3e\x50\x2b\x6c\xa7\x2b\xf0\xda\x30\x3b\x08\xe0\x79\xae\xa7\x05\x25\xc2\x79\xdf\x0f\x14\x57\xc5\xa5\x89\xa1\x97\xcd\x39\x36\x7a\x6d\x39\x1f\x9a\x1b\x84\xe5\x84\x09\x9d\xdc\xfc\x8f\x20\xbf\x6d\xe0\x7f\xd0\x01\x0d\x27\x7f\x75\x09\x57\x81\x06\x6e\xb5\x1b\x9b\x09\x6c\x24\x7c\x75\xcb\x44\xa9\x9a\xf9\x82\x24\x9e\xda\x09\x60\x6e\x3b\x9c\x69\x35\x9e\x07\x2f\xd9\x6b\xa3\x89\xbf\xf1\x08\xec\x5d\xb0\xfd\x4c\x55\xa8\xe8\x00\x03\x2e\xfd\x6a\xf6\x2e\xe6\xcf\xc2\x1b\xd0\x1b\xe1\x3f\x86\x11\xde\x39\x92\x23\x27\x6d\xcb\x46\x0a\x97\xc3\x34\x38\x66\xd9\xbe\xb4\x1f\x53\x6f\xb3\x4f\x5b\x4e\x70\xa8\x2f\xd3\xbc\x74\x07\x4f\xa6\x7b\xed\xc8\x7e\x4c\xd3\xef\x5e\x61\x43\xbe\xe1\x46\xce\x96\x5c\x27\x23\x03\x84\x26\x9d\x2e\xb7\xdb\x41\xe2\x00\xf8\x7f\x38\x30\x2d\x2f\x5f\x24\x68\x5d\x61\xa4\x11\x50\x3b\x12\x76\x7f\xff\xb0\x5d\x87\x9d\x44\x60\x5f\x74\x1d\x7c\x0e\xa5\x53\x6a\x0d\xdb\xf0\x7c\x02\x64\x2d\x9f\x9c\xb6\x41\x26\x39\xe0\x24\xa0\x20\x67\x16\xd5\x15\xa6\xdf\x5c\xe5\x20\x4c\x33\x3d\x38\xa2\x82\x06\x7b\xe4\x98\x8a\x64\x51\x05\xdc\xa2\xce\xf0\xf1\x77\x3b\x68\x58\x62\x47\xd5\x68\xf8\x48\xd9\x8c\xaa\x22\xc5\x6d\xb4\xbc\xa8\x3e\x45\x06\x10\x50\xd2\x81\x48\x19\x25\x1f\x05\x76\xab\xea\xe9\xb5\x06\x17\x6d\x08\x27\xa0\x17\xbc\x0a\x27\xae\x96\xa2\xcc\x0a\x54\xd0\xb0\x24\x49\x6e\x18\xcc\xf7\xde\x84\x31\x0c\x3f\x87\x8c\x89\xec\xe1\xae\xb6\xaf\x99\x05\xd4\x76\x30\xff\x3a\x37\x8a\x90\xb5\xfa\xc5\x43\x89\x5f\x0f\x06\x11\xbe\x7f\x61\xb4\x96\xff\x30\xfa\x64\xf0\x5d\xa9\x75\x23\x74\x60\x49\xb1\xef\xc7\xfd\x9b\x41\xa1\xc7\xc1\xea\x01\x38\x4e\x67\xb5\x47\xe1\x86\x14\x65\x94\x04\xdd\xea\xd6\x2a\x1e\x9b\xa3\xae\xac\xd1\x96\x7d\x5d\xbe\xf0\x56\x8f\xd6\xb7\x41\x34\x04\x67\x84\xae\x79\x99\x0f\x99\x18\xcf\xc7\x7e\x4e\x70\xdb\x05\x07\x1d\xd4\x2d\x54\xfb\xf2\x54\x41\x38\x6d\xe7\x48\xd5\x6a\xa5\x0a\x35\x5f\xff\xbb\x58\x27\x34\xe0\xf0\x69\xdb\x29\xff\xde\xfc\x46\x8a\x88\x3f\xdf\xd6\x38\x02\x6b\xcd\x03\x3b\x33\x5c\x57\x5e\x80\xc4\x01\x94\x89\x4c\x61\xb0\x70\x0e\x76\xc3\x45\x08\xdb\x2f\xe3\x67\xac\x4c\xe8\x57\x42\xb3\x13\x5a\x8a\x4c\x2d\x57\xbc\x5c\x8f\x33\xb5\x3c\xfb\x87\x2a\x05\x96\x57\x09\x7f\x35\x32\xb0\x2a\x27\x83\xd3\x7d\x86\xe5\x36\xd3\x8d\xc9\x1d\xa9\x78\x4c\x1c\x14\x00\xb8\x1b\x56\x82\x8a\xcc\xf6\xe2\xc3\x4a\xa1\x56\xa0\x3b\xaf\x6a\x8c\x8d\x06\x6c\x11\x23\x5e\xa8\xdb\x32\x12\x4a\x3b\x47\x15\x4a\xbf\xb8\x4e\x50\xbf\x0d\x2d\x4e\xdd\xe3\x07\xdb\xd4\x0a\xd3\x94\xd9\xc2\x7e\x58\xd6\xbe\xe6\x49\x5d\x49\x71\x13\x90\x8c\x60\x24\xe8\xda\xe2\x5a\xb3\x29\xcf\xde\xdb\x43\xec\x2c\x60\xa0\x1e\xac\x94\xf6\xee\x83\x5c\xce\x40\x0c\xaf\xf1\xd2\x9b\x37\xcc\x90\xfc\xcf\xd1\x4a\x8c\x7d\xc1\xa3\xa9\xb0\x16\x10\xef\x1a\xb1\xf5\x6e\x9c\x0d\x96\xde\x3d\x40\x3d\x3d\x40\x08\x48\x71\x8c\x9d\xac\x7d\x8f\x00\x25\xdb\x6c\x43\x78\x52\xa0\xda\xf5\xc1\x49\x9f\x89\x3a\x72\x60\x70\xd2\xab\x48\xc8\xba\x67\x68\x12\x74\xd6\x07\x26\xf5\x81\x49\x0f\x15\x98\x44\xa7\xf5\x88\x61\x49\x4e\x77\xda\x4d\x08\x21\x24\xe9\x20\xfd\x66\x0f\x73\xde\x0e\xaa\x49\x6f\x76\xe9\xa6\x7d\xd0\x85\x0d\xb3\xdf\x0a\x73\x3d\xc3\xf1\x06\xe3\xb2\x36\x2f\xc0\xb5\x82\xb8\x90\x32\x34\xa5\x99\x66\x7e\xe8\x9e\x72\x18\x0e\xde\x94\x6e\x32\x43\x9b\x05\x65\x38\x61\xa6\x96\xc4\x0d\xef\x95\x51\xda\x21\x2b\x36\xea\xb1\x65\xb3\x5d\xf1\x3a\x5b\x8c\x96\xa2\x9a\x8b\xd1\x7b\xb1\x36\x0a\x05\xaa\x84\x89\x56\x60\x4b\x14\xf3\x35\x58\x13\xaa\xb9\xb8\xc3\xd9\xa3\x51\x6c\x3e\x51\xd6\xd7\xb3\x0b\x61\x30\x6c\x47\xb9\x82\x53\x62\x6f\xce\x1d\x6a\x01\x1a\x10\xfa\x47\xcd\x9c\x80\x6d\x7e\x46\x89\xc8\x7b\x5b\x6c\x2a\x95\xf5\x92\xad\x4b\xbe\xb4\x06\x59\x2b\x6c\x91\x17\x2b\xfc\xb6\x48\xe5\xae\xfc\xa9\xa3\x4c\x3a\x67\x19\x0c\x85\x67\x19\x44\x70\x81\x1b\x42\xd4\x59\x8e\xd2\x28\xf3\x76\x05\x08\x3a\xd8\x25\x11\xf8\x71\x55\x69\xd5\xfd\x16\x27\xf5\xf2\xc3\x8a\x97\x1b\x24\x84\x44\x2b\xc3\xe1\x6f\x43\x10\xba\xce\xf0\xcd\x4b\x56\x1d\x12\xe6\xb5\x3c\xe9\x69\x83\x76\x22\x7f\x87\x92\x9b\x4c\xb9\xd9\xde\x08\x43\xa7\xb3\xda\xcb\x9e\xb5\x6b\x6d\x46\x50\x09\xe7\x61\xda\xb1\x31\xec\x65\x10\xb4\x47\x06\x70\x2b\xf4\x58\x31\xdb\x6b\x2c\x4e\x12\x8d\x48\x8e\x1e\xb3\x8b\x92\x44\x51\x1a\xf5\xda\x26\x87\xbd\x13\xd5\xd2\xf2\x09\x5e\x6a\xb2\x7f\x43\x5d\x41\xdf\x5b\x45\xd3\x01\x83\x7b\xac\x89\xed\x1b\x8f\x45\x9e\x31\xef\x35\x27\x6f\xe7\x31\x72\xf5\x52\x73\x02\x71\xa3\x17\x22\x7b\x9b\xf6\x97\x2c\xbf\x7d\x15\xf8\x81\x10\x60\xf8\x1a\xe6\x96\xa0\x94\x2f\xd2\x74\x2f\xc1\xc1\xec\x45\x6c\x11\xed\x4a\x90\x3b\xcd\x47\x7e\x80\xc3\xd8\x7f\x94\x2c\x4c\xbf\x4c\x06\x95\x42\x4b\x8a\x56\xb3\x7a\x32\xf8\x75\xcc\x5e\xa9\xda\x46\x04\x8a\x9c\x8d\x6c\x54\x25\x32\xb7\xab\x9f\x09\x6a\x53\xcb\xe5\xaa\x58\xb3\x19\x97\x85\x51\xe5\x55\x29\x90\xb1\xc1\x9b\x87\x28\xee\xc3\x81\x67\xe2\x09\xb4\x00\xcf\xe0\x7d\xa1\xe1\x16\xd7\xc7\x08\x41\xc7\x1f\x91\xcc\x5a\xaa\x83\x5e\xc5\x9b\x6d\xeb\x95\xe2\xbd\x3e\x12\xf5\x2a\x62\xb5\x89\xd1\x07\x9c\x39\x01\xdd\xe7\x87\x15\x27\xf4\xd9\xca\xd9\xad\xc1\x27\x8d\x77\x95\xc8\x0a\x2e\x97\x1b\x63\x9a\x8f\x7f\x5c\x80\xb6\x07\x1f\x8d\x31\x26\x5f\x08\x08\x15\x4f\x22\x40\xc2\x97\xfe\x82\x11\x50\x3f\x92\x87\x3f\x95\xc8\x1e\x34\x09\x56\x66\xa1\x6e\x3b\xc3\x7e\x6e\x86\x11\xa2\xe1\x86\x73\x34\xcc\x61\xaa\x9a\x32\x1f\x33\x34\xa6\x41\x68\xd3\x90\x45\x1f\xb9\xb4\x61\x5e\xe6\x88\x62\xf0\xe8\x83\x31\xec\xcd\x05\x84\x93\x29\xf2\x49\x36\x7d\x4c\xd7\x54\x28\xc0\xee\x32\x62\xb5\xdb\xa6\x2c\x59\xd1\xd1\xe9\x61\x26\x3f\x17\x21\x64\x17\x94\x51\x68\xc9\x8a\x75\x9a\xe3\x68\x9e\x91\x2e\xd7\x5b\xb5\x7a\xab\xd6\x83\x58\xb5\xa2\x53\x76\x3c\xd3\x16\x92\xf5\x0b\x97\x31\xb5\x8d\x46\xb6\xdb\x7a\xfc\x0f\x4c\x9d\xa8\xd1\xf9\xe1\x92\x97\x2a\x9b\x85\x16\x18\xbd\x0c\xcd\xb0\x0e\xc6\x33\x77\x5a\xfd\x43\x30\x2a\x4d\xca\x49\xd9\xf9\x58\x8f\xa1\xf1\x99\xd3\xe1\x9e\xec\x7d\x5a\x0c\x8d\x2f\x81\xf2\xdd\x19\xfa\x21\x17\x1a\x72\x6c\x90\xb6\x9c\x11\x61\x71\xf9\x87\x0b\x7e\x23\x55\x35\x66\x57\x14\x54\xea\x9c\xf5\x81\x83\x19\xe3\x0d\xee\x14\x63\xe3\xc9\x10\x86\x5d\x0d\x07\x98\x58\x9a\xdc\x9e\xba\xd1\x76\xd4\x1d\x22\x46\x67\x30\x31\x50\xb3\xd2\xf5\xda\x26\xa3\xda\x5b\xd1\x21\xa5\x2e\xc3\x6f\xc8\xe4\x58\x8c\xf1\xd5\x76\xea\xec\x7d\xe7\x88\x73\x3b\xd8\xaf\xdc\x5a\xa5\x7d\x59\x0e\x7d\xee\x98\x92\x7f\xfb\x13\xbb\xa4\xff\x54\xfb\x94\x06\xb0\x89\x29\xf5\xaa\xc0\xe7\xc1\x82\x0e\x51\x05\xda\x7b\x79\x24\x6d\xa0\x23\x50\xf5\x1a\x41\xaf\x11\x3c\x88\x46\xd0\x39\x69\x0f\xa7\x15\x10\x8c\xe1\x01\x14\x94\x72\x9e\x82\x80\x59\x1f\x59\x18\xd8\x28\xa7\xc2\x01\x45\x8c\xd9\x1b\x48\x7f\x2e\xd5\x2d\x1a\xa5\x9c\x31\xac\xe5\xb3\x74\xc8\x12\x37\x92\x3b\xde\x67\x7f\xad\x00\x6e\x13\xd3\x7e\xd8\xad\x80\xdb\x80\x8e\x3c\x5e\x68\x15\x27\x18\x83\x33\x12\xf1\x38\x5f\x7e\xe0\x59\x4d\x75\xa1\x96\x62\x39\xf5\x79\x84\x7b\x01\xb1\x62\xb7\x64\x22\x4b\x0a\x35\xed\x16\x36\x51\x06\xdc\x8c\x9d\xd4\xf3\x52\x64\x42\x6b\x5e\xad\xa3\xc8\xcc\x95\xb3\x0e\xba\xe4\xbb\x30\x01\x7a\xa5\xf2\x47\xda\xce\x30\xcc\x3c\x6b\x9b\xfc\x56\x4e\xf6\x80\x75\x0e\x92\x6d\x7e\x94\x73\xc2\x9b\xb0\xd6\x3d\x76\x59\xfb\xa1\xd6\x15\x2f\x35\xbe\x09\x9d\x69\x57\x7d\x6e\xd3\xa7\x31\x8c\xb4\x6d\xd6\x34\x0b\xb0\x05\xdc\xe1\x00\x6c\x87\x7c\xf3\xc8\xf7\x90\x81\xac\xc3\x30\x35\x3e\x00\x7f\x68\xfd\xfe\x2a\x19\x59\xfd\x2a\x70\x80\x77\xb7\xc8\x6d\xe0\xdd\x0d\xa5\xc9\xe1\x1d\x70\x79\x77\x84\xad\xa4\xda\x6f\x81\xd4\xd9\x28\xd3\xee\x90\x81\xec\x05\x1d\x0c\x07\xda\xa2\xa2\x1a\x6d\x1f\x16\xb5\x2b\x1a\xd9\xd6\x5d\xc1\xc8\xe2\xc3\x6c\x46\x09\x8c\x53\x53\xe1\xb8\x40\xe8\xfa\x82\x97\x79\x21\xac\xbc\x44\x92\x78\x27\x30\x3e\x8c\x67\x6f\xc5\xb1\x6f\x0c\x59\x4f\x9f\x8c\x77\xce\xdb\x6f\x63\x9f\x2d\xd2\x4a\x87\xfa\x19\xce\x9b\xea\x5c\x3b\xca\xdb\xe2\x75\x1d\xfa\x1a\x74\xbf\x89\xc2\xde\x53\x2d\xb0\xf0\xc8\x77\x57\x0b\xb0\x87\x03\x8e\xae\xd3\xb2\xf6\x3e\xbc\xa8\x7f\xd9\xe3\xeb\xb4\xb1\x7b\x9f\xdb\x7c\xd3\x19\x7d\x59\x55\x29\x9c\xe8\x77\x20\x45\xeb\x9a\x09\xf3\x9c\x89\x32\x03\x5c\x1c\x43\xca\x08\xb2\xa5\x8d\xf1\x03\x85\x05\x79\xb9\x8e\x28\x23\x64\x30\x01\x21\x44\x5e\xb4\x9f\xba\xf8\x60\x4a\x22\x4e\xf6\xb7\xa1\x5f\x95\xae\xb0\x1d\x5d\x4b\x0f\xf4\xa1\x9b\xcc\x30\xb5\x59\x53\x14\xeb\x80\xe9\x7f\xb4\xb9\x26\x02\x77\xdc\x59\xf8\x71\xa3\x4c\xf9\xd3\x0a\x91\x2d\x68\xe8\xf4\xd5\x61\x98\xff\x10\x71\x54\x82\xf8\x8c\x61\x02\xda\x19\x32\x1d\x74\x27\xb8\xb0\x36\x59\xcd\xe1\xce\xd4\xca\x08\xe8\xda\x1c\xd3\xb2\x66\xff\xc1\x65\xfd\xbd\xaa\x2e\x9c\x45\x00\xd1\x64\x1c\xea\xcd\xc7\x5d\xc6\x3b\x78\x8b\xd1\x82\x71\xe7\xeb\x92\x30\x80\xdc\xf7\xba\x3c\xb8\x4d\x85\xae\xcb\xa1\x14\x13\x5f\xdb\x45\x26\xdd\x4a\x6e\xa7\x8d\xd0\xcc\x9b\xea\x79\xb9\x85\x22\xd9\xeb\xea\x56\x64\xb7\xe8\xbb\x34\x82\xea\x3c\xc5\xa1\x6a\xb7\x6d\xb2\xb0\x2b\xbe\xf1\xd3\xfe\x58\xbf\x68\x6d\x0a\xed\x2f\xa9\xc8\x94\xe4\x5f\xa8\xf9\x5c\xe4\x43\x66\x44\x7a\xc7\xea\x8c\xd6\x4a\xb2\x2a\xd3\xa2\xd4\xb2\x96\x37\x91\x5c\x9d\x4e\x0f\x92\x49\xd6\x2d\x97\x22\x18\xf1\x2d\xd7\xe1\xa8\xef\x97\x37\x6a\xfa\xbe\x47\xb5\x45\x78\x7d\xd7\xe1\x88\x73\x3c\x76\x1e\x92\xa8\x39\xd9\x24\xe2\x3a\x06\xac\x90\x60\x2a\x88\xb3\x18\x03\x64\x90\xdd\x47\x25\x4b\x43\xa8\xfd\xc8\x3f\xc8\x65\xb3\x64\x65\x03\x7a\x97\x9a\xb1\xa6\x94\x7f\x6f\xbc\x96\xb6\xe4\x25\x9f\xc7\xf9\x85\xa1\x68\x47\x8a\x5a\xa3\x63\xf8\x83\x8b\x48\x1a\x92\x1a\x41\x98\x9c\xbc\x85\xe0\x11\x00\x55\xe7\xdf\x42\x38\x40\x57\x70\x18\xa1\x36\xa8\xe3\x4c\x0c\xe1\x84\xd5\xb7\x32\x23\x38\x34\x48\x99\xaa\x9a\x42\x30\xbe\x5a\x15\xd2\x02\xd9\xc5\xe3\x77\xdf\x87\x14\xc2\x9c\xf1\xa5\x32\xe7\xb8\x29\x6a\xb9\x2a\xb0\x1e\x84\x85\x10\x70\x59\x7d\x84\x50\x10\xb2\x18\x48\x12\xb2\x6e\x32\x00\x57\xa0\x77\x5c\xb0\xa7\x5f\x3f\x17\xf2\x43\x18\x26\x76\x6a\x4d\x09\xf1\x22\x91\xc7\xec\x90\x72\xa0\xdb\x60\x2d\xa8\x16\x4a\x17\xc7\x66\x47\xc4\x7c\x1b\xf5\xc6\xf4\x48\xb2\x43\x25\x74\x53\xd4\x61\x02\xf0\x5f\x45\xed\x1a\x1a\xc6\x87\x09\x97\x36\x9f\x32\x74\x91\x12\x87\x8e\x43\xa6\x7d\x2e\x6e\x80\xe6\x63\xd4\x57\x5e\xd5\x32\x6b\x0a\x28\x8c\x62\x23\x66\xc5\x1c\x11\xeb\xa2\xfc\x2d\x38\x0b\x00\xda\x63\x8f\x09\xa0\x1d\x41\x90\x2c\x14\x9f\xd0\x35\x2f\x6b\x88\xb7\x29\x45\x37\x9e\x47\x83\x6b\x33\x48\x12\xf5\x21\xf1\xe2\x83\x91\xe4\x01\x5f\xa7\x9c\x6b\x56\xc8\xf7\xe2\x19\x1b\x45\x73\x62\x93\x81\x26\x13\xd7\x64\x00\xc0\x10\x93\xc1\xf9\x93\xa7\xdf\xb0\xbf\xca\xbf\x4c\x06\xc1\xec\x64\xc9\x26\x2e\xb1\x71\xec\x03\xdc\xcd\xae\xfd\x43\x95\xe2\xbf\x36\x7a\x24\xb8\xae\xcf\x27\x83\xee\x27\x00\x98\x45\xeb\xe0\x13\x8f\xd3\x1f\x88\xfb\x5d\x28\x5d\x1b\xf5\xe9\xbf\xbe\x07\x80\x10\x3e\xcd\xce\x9f\x3c\x45\xc4\xb5\x18\x2c\xaf\x5e\x54\x42\x00\xa2\x14\xda\x3e\x30\x98\x0e\x2e\x49\xa9\x82\x8d\xd1\xad\xd4\x69\xce\x32\x51\x01\x6d\xcf\xd4\x72\x2a\x4b\xa0\xe8\x66\x89\x4a\x65\xcd\xa1\x61\xdd\x6d\x87\x23\xe5\x53\x0a\xcb\xbc\x15\xfd\x05\xea\xde\x88\x00\x70\xca\xb8\x17\x9f\x8b\x1b\x0e\x09\xd1\xa3\x0e\x7a\xe5\x1f\xa2\x52\x76\x15\x56\x95\xca\x9b\xcc\x21\x98\x69\x97\x15\x07\x47\x20\x17\x99\xcc\x6d\x12\x23\x5f\xad\x2a\x45\xd5\x2a\x00\xe4\xc6\x4e\x68\x03\xc2\x14\x81\x45\xdd\x1f\x63\x6a\x97\x33\x3d\x38\x2d\x1b\x54\xf7\xde\xab\x71\x5c\xaf\x46\xb6\x11\xc4\xee\x79\x70\xce\x6a\x87\x43\x8b\xf8\x71\x49\x86\x29\x31\x19\x37\xa0\xa3\x6f\x10\x1c\xd3\xde\xb1\xe8\x09\xe8\xc7\x14\x17\x19\xde\xa2\x20\x08\x15\x35\x17\x5e\x53\x94\xc7\xaa\x12\x37\x52\x35\xc4\xb7\xb4\x83\xa0\xd3\x62\x69\xe8\x22\xd8\x95\xb2\xa6\xaa\x44\x59\x17\x6b\x28\x03\x83\x80\x59\xe7\xe3\x27\xa7\xce\x9a\xc9\xf5\x33\x60\xaf\x5d\x72\x0d\xc6\xdd\xe9\xba\x16\x7a\xd8\x4e\x39\xe9\x88\x02\xb5\xf2\xd1\x92\x4e\x46\x31\x7c\x15\x38\xa9\xa8\x87\xc4\x98\x03\x3d\x2d\x1a\x5c\x53\xfa\xef\x43\xe6\x3c\x85\x89\x02\x18\xab\xb9\xd4\x6e\x54\x77\x91\x06\xc7\x76\xc7\xc7\xff\xad\xe1\xa0\x9c\xf4\x21\x14\x9f\x43\x3c\xfd\x3b\x6b\x05\x34\xbc\xaf\x54\xa1\x68\xb0\x14\xbc\x04\xe0\x8e\x4b\xaf\xab\x4f\x05\xe3\xec\xc5\xab\xb7\x66\x85\x72\xb5\x34\xdc\xe9\x04\xea\x74\x50\x52\xd0\x90\x3d\xf9\x36\x2c\x10\x72\x3a\x66\xef\x14\x13\xa5\x6e\x2a\x6f\x15\xf4\x00\x53\x99\x2a\x67\x85\x74\xa8\x8e\x08\x50\x17\x66\x06\xc6\xb5\x91\x86\x24\x26\x99\xa5\x14\x65\xee\x0e\x31\x65\xa4\x67\x5a\xea\x6c\x34\x69\x1e\x3f\x7e\x9a\x35\x8d\xcc\xe1\x5f\x86\xde\xb1\xb9\x28\x8d\x76\x65\x84\x46\x80\x14\x86\xab\x5f\x09\xf3\x09\x31\xa2\x79\xc0\x2a\x20\x2f\x12\xa5\x2d\xd1\x5f\x03\x70\x34\x48\xb7\x01\x55\x01\x28\x1d\x73\xd5\x5f\x87\x31\x5a\x3e\x3e\xcb\x3c\xfa\x12\xbc\x70\x71\x74\x8a\x91\x63\x6c\x8c\x72\xc2\xea\x1f\x3c\x0d\x10\x13\xcd\x72\x21\x2c\x00\xd4\xe7\xe7\x60\x38\x6a\xa3\x6e\xf8\xc4\x3c\x27\x28\x18\x05\xd3\xd2\xed\x36\x95\xf2\x2f\x92\x1e\x80\xbd\x22\x20\x01\x38\x60\xca\x35\xc9\xf8\xad\xd2\x59\x97\x33\x4c\xf3\xea\xf4\xd2\xe9\x01\xa0\xa0\x01\xc2\x24\x76\xcb\xc8\xe5\xb2\x41\xb1\xe3\xb8\x95\xea\x3a\x62\x44\xda\x78\x1e\x18\xf5\x23\x31\xd5\x19\xd4\x1d\xaf\x73\x2b\x69\x55\x31\x43\xa2\xec\x4d\x5d\x0a\x51\x7b\x0d\x2b\x2a\x6e\xcd\x63\xf7\x01\x8f\xbf\x43\xf4\xf3\xa4\x54\xe5\x88\x56\x32\xba\xed\xa7\xa4\xa9\x71\x1b\x0a\x62\x6e\x71\xa1\xca\xb9\xa8\x9c\x50\xb8\x41\xf4\xf2\xe0\x73\x6a\xaa\x55\x21\x6a\x64\x33\xde\x6c\x5f\x89\xa5\xba\x41\x2e\x6e\x68\x2f\xa4\x29\xa8\x6a\xeb\x06\x1d\xe4\x5f\xea\x98\x18\xce\xba\x3c\xe9\x4e\xf5\xe5\x8e\x18\xc9\xb3\x51\xab\xdc\x03\x94\x22\xf1\xc6\x06\x7c\x8a\x0d\xd0\xba\x7d\x54\xcf\xe7\x21\xff\x1e\x12\xd5\xb3\xd7\x6e\xde\x23\xbe\x67\xb3\x99\x23\x09\x13\xba\xe4\xab\xd1\x7b\xc0\x1d\x22\x10\xb2\x5f\xb7\x80\x89\x2e\xf9\xaa\x17\x02\xfb\x60\xa1\x87\x08\x16\xda\x7c\x6c\x8f\x16\x34\x44\x9f\xe8\x13\x0a\x7a\xba\xdf\x27\x14\x7c\x89\x84\xb0\x4f\x28\xf8\x08\x09\x05\x1b\xa8\xe4\x57\x98\x56\xb0\x69\xa6\x87\x26\x17\x6c\x5b\xb1\xc3\x58\xd1\xf1\x13\x0d\x36\x7c\xa8\x4f\x37\xf8\x7d\x30\xa8\x4f\x9f\x6e\xb0\x49\xe8\xea\x93\x0e\x7a\x3d\xe2\x01\xf5\x88\x87\x4b\x3d\xd8\x44\xba\xfb\x04\x84\x3e\x01\xa1\x4f\x40\xf8\x22\x12\x10\xb6\x09\x6c\x7d\x1a\x42\x9f\x86\x70\x1c\x35\xe2\xd0\x64\x84\xed\xfd\x1c\x7c\x98\xfb\xc4\x84\xcf\x24\x31\x21\xda\xa0\x3e\x3d\xa1\x4f\x4f\xe8\xd3\x13\xee\x76\x69\xee\x46\x49\x77\xa4\x2a\x24\xda\xfe\xfe\x12\x16\xfa\x7c\x85\x2d\x0c\x76\x2a\x6a\x74\x4c\xed\x55\x41\xea\x85\x2d\x10\x49\x87\x23\x51\x1a\x91\x3d\xb7\x25\x08\x6d\x28\x07\xbb\x34\xab\x30\xe3\x99\x80\x88\xc3\xd3\x96\x60\x16\xd6\x30\x8e\xa2\x67\xf6\x2e\xa0\x48\xa3\xea\x94\x50\xbc\xa4\xd2\x35\x50\x3f\xd1\x28\x82\xb6\x86\x22\x7d\x62\x8f\x32\x8a\x54\x27\x25\xae\x66\xcb\xa3\x90\xce\xba\x55\x58\x11\xc7\xa6\xb1\x55\x3c\xb4\x8e\x95\xc7\x96\x39\x09\xac\xda\x44\x71\x89\xf8\x80\x7d\x42\x15\x85\xa8\xcc\xe0\x75\x64\x08\x6a\x95\x5e\x41\x1c\x6d\x7a\x3d\x2c\xca\xe3\x8a\xc6\xec\xd7\x43\xbb\x0e\xbc\x59\x73\x5b\xf6\xb4\x53\xa7\xbe\x3d\xc5\xde\x9d\xf7\xd9\x5a\x4b\x7b\x7b\xe4\xa7\x75\xe7\xb9\x7f\x81\xbd\x60\xb3\xda\xba\x57\x45\xb8\x3f\x19\xba\x73\xe4\x7a\x70\x58\x3a\xda\x87\x94\x3a\x91\xf3\xbb\x30\x84\xd6\xb0\xdc\x42\x68\x3d\x64\x53\x31\x97\x25\x14\x23\x37\x47\x5f\xd8\xca\xe3\x20\xe1\xa2\x39\xa7\x6c\x96\xa2\x92\x99\x7f\x9b\x9d\xfc\xc2\x47\xff\x78\x3c\xfa\xe3\xc5\xe8\x7f\xfc\x7a\x8a\x8d\x73\xae\x17\x42\xb3\x93\xd1\xe9\x90\x41\xec\xee\xc9\xf8\x14\x6f\x53\xd8\x07\x54\xe8\xbb\x15\xa2\xfc\xca\xfd\xa2\xbe\xde\xc7\x61\x22\x65\x8b\x8f\x1f\x58\x9e\x32\xf5\xf6\x11\xfd\x74\xad\xee\xf7\x08\x1e\xf4\x0d\x37\xc4\x0c\xc6\x5c\xa7\xf7\xc8\x7d\x1e\x3c\xe6\xc0\xaa\x56\x24\x73\x1e\xc3\x13\xd7\x96\x63\x7b\x0f\x5c\xef\x81\x7b\x08\x0f\x5c\xfb\x9c\x1d\xcd\xf3\x96\x22\xc1\xfb\xd0\xc8\x1d\x76\x7a\xd7\x6e\xb7\x66\x8e\xaa\xc3\x1b\x47\x36\x3b\x95\x78\xa3\xe7\x91\x04\x23\x35\x30\xae\x58\xb1\x23\x02\x8c\x59\x92\x6d\x9b\xd6\xc9\x54\x64\xdc\xe8\x63\xb2\x86\x14\x54\x4a\x07\xb0\x2c\xf0\xb9\xd3\x7b\xae\x9a\x69\x21\xf5\x02\x6d\x13\x27\xa7\xe6\x80\x2d\x54\x4e\x12\x82\xb3\xa8\xef\xa3\x40\x59\xe2\x6b\x1d\x6e\xd4\xd0\xda\x20\x9d\x92\x4a\xa9\x21\x0b\x91\xbd\x0f\xad\x94\xde\x1e\x68\xcd\xc7\x66\x04\xb7\xdc\xdc\xe4\xa6\xac\x65\xd1\xb2\x68\x3a\x9b\xfe\x54\xcc\x14\x16\xd3\xcc\x84\xb0\xf5\x98\x40\x7f\xa2\x3a\xc4\x38\xe5\x8e\x4d\x89\x65\x0a\xea\x37\xc1\x1a\x83\xa8\xd4\x5d\x63\x33\x04\xa4\x17\xdb\x87\xea\x92\x50\x3b\x1b\x01\x29\xf7\x60\xf7\xf2\x85\xf9\xdd\xa1\x79\x83\x9a\xb1\x4f\x54\x9d\x53\x29\x03\xeb\x7d\xc3\x4d\xb0\x99\x8f\x52\x07\x91\x9f\xb5\x62\x33\x5e\x68\x31\x4c\x7f\x17\x4a\x79\x4c\x05\xd3\xef\xe5\x6a\x65\xa8\xdd\x6b\xa3\x7d\xde\x4a\x52\xd1\x37\xb6\xcf\xa0\x98\x59\xda\x64\x3b\xd3\x7f\xad\x54\xb3\xda\x58\xad\xc2\x16\x6a\x9a\x51\x22\x55\x2e\xaa\x62\x0d\x2c\x80\x1c\x32\x98\xcc\xaf\x8d\xc0\x5a\xce\x01\x5f\xe1\xb6\x14\x95\x5e\xc8\x15\x26\x5e\x1a\x55\x59\xeb\x40\x5c\x73\x01\x6b\xb0\xc5\x53\x01\x26\x27\x84\x35\x18\xb3\x37\x51\xc9\x60\x5b\xcb\xf7\xfb\xb7\xc1\x20\x89\x6b\x63\xf6\xa7\xb3\x95\x92\x11\xac\x93\x0d\x14\xf8\x48\x87\x07\x38\x49\xed\x9e\xe2\x1d\x8a\xbf\x1f\x6e\x6c\xd2\xde\xb5\x52\xf9\x65\x39\x53\xaf\xcb\x1f\xd3\xf0\x11\x97\x33\xb0\xa4\x9a\x59\x56\x46\x44\x89\xdb\x1f\x42\x25\xfc\xf4\xdb\x26\x88\x13\x48\xfa\x5c\xa9\xfc\x15\xa4\xcb\xad\x54\xfe\xd3\xe5\x8b\x21\x13\x75\x36\x3e\xb5\x06\x41\xaa\x15\x63\xcf\x0b\xe6\x9a\xd2\xc8\xe8\x1c\xb6\xbb\x85\x23\x45\x4c\xb7\x63\xd9\xa0\xaa\x23\x66\x89\xe1\x75\x7f\x51\x69\xe0\xf6\xa4\xeb\xf6\x94\xb9\x86\xb4\x45\x73\x44\x22\x13\x17\xe2\x19\x98\x2b\x06\x0b\x15\x95\xf2\x85\x02\xb8\xed\xf1\x71\x4d\xce\x29\x43\x0d\xc5\x87\xda\xe6\x97\x99\x41\xbc\x52\xb9\x68\x93\x46\x67\xec\x8f\x73\x8e\x8d\xa0\x01\x49\xc6\xae\x84\xee\x8a\x57\xda\xea\x6d\x54\x6f\xc7\x4a\x3d\xe1\xf7\x9d\xab\xa1\x33\x12\xfc\x88\x07\x15\x70\x0f\xcd\x28\xed\x4d\xb5\xaf\xcf\x3a\x67\x42\x87\x47\x86\x0e\x39\x4a\x0f\x10\x01\x32\xaf\xd4\xad\x4f\xe6\x5f\x55\x62\x26\x3f\xb8\x5e\xb1\x88\xca\x64\x90\x69\x2f\xfe\x11\x43\x5d\xa9\x7c\x6c\x14\xd7\xc9\xe0\x99\xf9\x24\x2a\xda\x5b\x5b\x82\x81\x2a\x6c\x0e\x3f\x6c\x7e\xa7\x91\xb9\x69\x8d\xb7\xe3\xc4\xfc\xf2\xd3\xe5\x8b\xd3\x74\x7b\xb1\x5a\x88\xa5\xa8\x78\x61\xde\x98\x0c\xcc\x54\x27\x03\x26\x67\xb3\x36\x9f\x28\x99\x6b\x1a\xc7\xa7\x4c\x4a\xb6\xe3\x3f\x51\xfc\x87\xbb\xe1\xe8\x54\x1d\x62\xfe\x2a\x50\xd4\xc9\x00\xce\x30\xe2\x41\xec\x1a\x2d\x0a\xc7\xa5\xb8\xf5\xf0\x04\x51\xa5\xe8\xf3\xf1\xf9\x77\xb6\x32\x33\x50\x1f\xab\x69\x61\x79\x66\xb2\xd8\x22\x17\xb5\x75\x95\x01\xfc\xc5\xcc\x7b\x32\xf0\xd1\x0c\x93\x01\x9c\xc0\xc9\xe0\x65\xf0\x71\x9c\xc2\x0f\x72\x26\xb2\x75\x56\x88\x1f\x01\x8e\x05\x78\x83\xeb\x3a\xe3\x25\x2b\x04\xbf\x11\xee\xc6\xb0\x5c\x6a\xc7\x90\xce\x54\xc5\xe4\xdc\x10\xc4\xc0\x0f\x37\x66\x17\xba\x35\x89\x6f\xa1\xfc\x73\xf9\x28\xa8\xfe\xec\x9a\x0f\xa3\x8f\xc1\x2c\x6d\x23\x08\x11\x52\x39\x01\x3b\x84\xd6\x6b\x44\xa5\xb0\xd6\x65\xc7\x1b\xfd\xed\xf7\xd6\x56\xbb\x3e\x4b\x17\x17\x20\xf5\x10\xd6\xcf\x22\x93\xdc\x48\x1e\xd4\x8d\x87\x53\xe1\xf2\xfe\x5d\x10\x75\x5b\xb2\x0b\x78\xa1\xee\xc2\xc0\x6c\x27\xdc\xad\x17\x22\xca\x4d\x52\x56\x97\x7a\xdf\x72\x23\xb5\x99\x6d\x08\x40\x89\xa0\xb8\x3f\xc2\xb3\x44\x89\xaf\x2e\x47\xd4\x75\xd8\xa1\x8f\x78\xcd\x31\xab\xd4\x9c\x6a\x30\xa6\x9b\x3e\x37\x27\x96\xa1\x68\x14\x20\xca\x78\xff\x8d\x85\x3f\x00\x59\xce\xd5\x00\x27\xd1\x45\xda\xd2\x4c\xc5\x3a\xdc\x4a\xf4\x6b\xb9\xfa\xe3\xa5\x45\x36\x00\x06\x12\xd4\x43\x87\x0b\x62\xe3\xc8\x60\x08\x46\x67\x67\x53\x69\xed\x60\x40\xd5\x8d\x84\xeb\x85\xc3\xee\x74\x17\x86\x59\x20\x19\x17\x39\xd3\x6a\xe9\x81\x46\x36\x4f\x19\xe6\x75\x51\x80\xb8\x58\xcb\x1b\x51\x50\x82\x71\x6e\xbd\x33\x58\xc2\x32\xf2\x59\x98\xe7\x28\x47\x20\x86\x8a\xaa\x90\xad\xa1\x18\xe1\xa0\x1b\x66\x05\x48\x63\x30\x97\x0a\x97\xa5\xb3\x7b\x21\x8b\x30\xe3\x9f\x0a\x51\xfa\x49\x6c\xc0\x47\x81\x4f\xdf\x1f\x1d\x05\x6d\x94\x6d\xd6\x9c\xbc\x00\x37\x5d\x42\x92\x30\x4d\x24\xc8\x8d\x0e\xf2\xc9\x79\xcd\x8c\x4a\x1c\xa2\x3a\x6d\x90\x63\xac\xec\xd8\x1a\xe2\xcc\xdb\x3c\xcc\x34\xb0\xfe\xbc\x6e\x91\xc1\x21\x51\x03\x52\xe3\x1a\x6d\xd6\x3b\xa0\xed\xf6\xee\xc5\xfa\x1d\xec\x9c\x55\x9d\x90\x4f\x07\x04\xce\xd0\x0f\xec\xac\xe1\x05\xbb\xfa\xf9\xec\xea\xe7\xe7\x6c\x29\x8c\x64\x2b\xf5\x12\x47\x89\x00\x07\x4b\x82\xa7\x8a\xe8\x30\x1d\x7d\x40\xbf\xc9\xc5\xd0\xcd\x9e\x57\x7e\x64\xc4\xac\x24\x5c\x75\xe4\xd5\x86\x10\x18\x85\xd4\xaa\x2b\x51\x2c\x20\x11\x44\x59\xb1\xc2\xae\x37\x4c\x99\xb4\x05\x5c\x28\xfb\x40\x51\x5e\xb7\x61\xb2\xec\xc2\xae\xf2\x82\x5b\x57\x14\xbf\x35\x43\xb1\xd6\xb7\x50\x9b\x24\xae\x34\x57\x44\x8b\xe6\xa2\x66\xbc\x2b\x30\x79\x23\x38\xd1\x6d\x9c\x22\x62\x5a\x2d\xad\xf5\x22\xf6\x6e\xba\xe5\x46\x71\xc9\xad\x8e\x16\xc2\x59\x39\x82\xec\x52\xc3\x67\xe7\xb2\x5e\x34\x53\xc3\x62\x73\x95\x69\xcf\x67\x47\x00\xf4\x34\xb2\xc8\x28\x8b\x7a\x59\xf8\x69\x9a\xdb\x18\xf2\x1b\x3b\x22\x87\x5b\xb4\x84\x73\x8a\x20\x6a\x95\xfd\x93\xc0\xf9\x78\x9e\xe3\x69\x80\x3b\xdf\xec\x2a\xeb\xda\x89\x49\x3c\x08\x77\xcc\x99\x2d\x5e\x51\xc5\xbd\x4d\x06\x8b\x17\x2f\xaf\xde\xbc\x7c\x7e\xf1\xee\xe5\x0b\x36\x42\x89\x6f\x6e\xd4\x10\x6b\x50\x0d\xea\xdc\x33\x00\x0e\x5b\x55\x22\xb3\x99\x34\xfe\x73\x67\xd4\x66\xcc\xde\x0a\x41\x08\x04\x85\xe0\x5a\x18\x39\x9e\xf4\xa8\xf6\xde\x8d\x5d\xc7\x9b\xaa\x82\xef\x51\x00\xfc\x00\x77\x34\x7c\xaa\xe3\x8c\xbe\xd0\x00\x4c\x40\x80\x07\xde\x17\x0d\x70\x5d\xbb\x1d\xd1\x48\xe1\xdf\x87\x3a\x43\xec\x76\xb6\x41\x46\xa9\x51\x04\x11\xbe\xce\x70\xe0\x95\x14\xdb\x29\x95\x33\xb6\x83\x68\x2d\x1d\x01\x35\x78\x3f\x13\xd7\x61\x11\x72\xf3\xcc\x43\x2a\x80\x96\x5c\xce\x87\xe6\x3e\x62\x21\x63\x21\x6d\x99\x67\x0f\xb7\x12\xd6\x36\xf7\x1c\x81\xc2\x00\x4a\xb8\x58\x34\x70\xab\x2b\xd9\xc3\x62\xf4\x05\x75\xcb\x44\xa9\x9a\xf9\x82\xe4\xa7\xda\x89\x73\x6e\x3b\x9c\xc9\x36\x9e\x07\x2f\xd9\x6b\xa3\xd7\x83\x7e\x2e\xca\x4c\x58\x4a\x23\xcb\xda\x59\xe0\x33\x55\xa1\xda\x04\xec\xbc\xf4\xab\xd9\xbb\xb3\x3f\x0b\x57\x43\x6f\xdc\xff\x18\xc6\x7d\xe7\xb4\x8e\x1c\xc2\x2d\x8b\x2b\x5c\x8e\x92\x4a\xc9\x3f\xac\xcf\x54\x6f\xb3\x76\x5b\x2e\x74\x27\xbf\xa9\x79\xf3\xae\x5e\x53\xf7\xee\x43\xf8\x4c\x4d\xe7\x7b\x05\x67\xf9\x86\x1b\x19\x5d\x72\xd9\x2c\xba\xa7\xc3\xa8\xeb\x30\xbf\x1d\x14\x0f\x90\x35\x30\x02\xfe\xf2\x45\x82\xf4\x15\x46\xd4\x01\x9d\x26\xe1\x54\xf0\x0f\x37\x84\xb1\x3b\x2a\x80\x0e\x0d\x1f\x49\x6f\xb8\x48\x8c\x51\xe9\x75\xd0\xbb\x38\xcf\x53\xc8\xbd\xbf\x0d\x71\x76\x89\x88\xd4\x56\xbe\xc0\x21\xd1\x1b\x64\xf2\x3a\x72\xfc\xc6\xa6\xac\x84\xcb\x17\xdd\xe1\xe3\xef\x76\xd0\xb0\xa6\x8e\xaa\xd1\xf0\x91\xb2\x19\xc5\x47\x8a\xdb\xc8\x12\x8d\xca\x58\x64\x4e\x01\x95\x1f\x88\x94\x11\xda\x08\x02\x94\x14\x47\xcc\xd3\x26\x33\x02\x49\x4e\x00\xc6\x1b\x4c\x5c\x2d\x45\x99\x15\xa8\xee\x99\x79\x11\x18\x56\x00\xd5\x3a\x0c\x3f\x87\x8c\x89\xac\xeb\x16\x7f\x16\x66\x01\x90\xa9\xe6\x5f\xe7\x46\xad\xb2\x36\xc4\x78\x28\xf1\xeb\x75\x88\xfc\xeb\xdf\xbf\x30\x3a\x10\x04\xff\x05\xdf\x95\x5a\x37\x42\x07\x76\x99\x16\xb2\x18\xf5\x1f\x26\x6d\x05\x69\x40\xde\x07\x80\xc2\x0d\xa9\xdd\x28\x09\xba\xd5\xad\x55\x3c\x36\x47\x5d\x59\xa3\x2d\xfb\xba\x7c\xe1\x6d\x28\xad\x6f\x83\x68\x08\xae\x0d\x00\xab\xa5\x6a\xeb\x6e\x4e\x70\xbd\x05\x07\x8d\xd6\x2d\x54\xdb\xcf\xe0\x42\x07\x93\x01\xb0\x84\xba\xf6\xef\x80\xab\xd3\x3e\x58\xe1\xd3\xb6\xc7\xff\xbd\xf9\xcd\x03\x26\xd3\xf9\xb6\xa6\x16\x58\x6b\x1e\x58\xad\xe1\xce\xf2\x02\x24\x0e\x20\x45\x0e\x76\x4f\xd6\x68\x8a\x01\x1d\xc8\x22\x65\x3b\x88\x4c\xf8\x8c\x95\x09\xfd\x4a\x68\x76\x42\x4b\x91\xa9\xe5\x8a\x97\xeb\x71\xa6\x96\x80\xc7\x8b\x55\xe8\xc3\x5f\x8d\x0c\xac\xca\xc9\xe0\x74\x9f\x61\xb9\xcd\x74\x63\x72\x47\x2a\x1e\x13\x07\x05\x00\xee\x86\x95\xa0\x22\x27\x80\xf8\xb0\x52\xa8\x15\xe8\xce\xab\x9a\x15\x7c\x2a\x0a\x80\x20\x34\xe2\x85\xba\x2d\x23\xa1\xb4\x73\x54\x8d\x30\x1c\xc0\x86\x82\xb6\x1c\xda\xaf\xba\xc7\x0f\xb6\xa9\x15\x12\x2a\xb3\x85\xfd\xb0\x0f\x9c\xae\x44\x5d\x49\x71\x13\x90\x8c\x60\x24\x84\x50\xaa\x35\x9b\xf2\xec\xbd\x3d\xc4\xce\x9e\x56\x63\x42\x84\xf6\xce\x88\x5c\xce\x40\x0c\xaf\x09\xb8\x8f\xd0\x13\xfd\xcf\xd1\x4a\x8c\x23\x3c\x68\xb2\xa7\x78\x47\x8b\x12\x04\xd5\x6d\x2d\xba\x16\x85\xf9\x5e\x0a\xf0\x56\xfe\x9f\x62\x1b\xfb\x71\xf5\x3d\xe2\xa0\x6c\xb3\x0d\x51\x50\x81\x92\xd7\xc7\x40\x7d\x26\x8a\xc9\x81\x31\x50\xaf\x22\xf9\xea\x18\x11\x50\xd0\x63\x1f\xff\xd4\xc7\x3f\x3d\x68\xfc\x13\x9d\xdb\x63\x47\x3f\x39\x55\x6a\x37\x5d\x84\xc8\xa7\x83\x34\x9d\x3d\xec\x7c\x3b\x88\x28\xbd\xd9\x25\xa3\xf6\x41\x67\xb0\xee\x5b\xe6\xc6\xd9\x7b\x1f\x8e\x37\x18\x97\x35\x86\x01\x74\x29\x84\x9f\x94\xa1\x8d\xcd\x34\xf3\x43\xf7\x84\xc4\xb0\xf6\xa6\x74\x93\x19\xfa\xaa\x06\x53\x91\xa9\x25\xb1\xc9\xe3\x00\x30\xa6\xd4\xd2\x36\xf4\xe2\x8a\xd7\xd9\x62\xb4\x14\xd5\x5c\x8c\xde\x8b\xb5\x51\x37\x50\x43\x4c\xb4\x02\x4b\xa3\x98\xaf\xc1\xd6\x50\xcd\x0f\x49\x29\x4e\x0d\x65\xc7\x01\x8b\xaa\xf8\x6f\x39\x61\x11\x08\x6d\x5c\xc4\x22\x00\x5f\xa7\xb2\x08\x88\x54\x3b\x4b\xc0\x0b\x77\xea\x4f\x38\xdf\xdc\xba\xe4\x4b\x6b\xb8\xb5\x42\x19\xf9\xce\xc2\x6f\x8b\x54\x3e\xcd\x9f\x3a\x4a\x67\x5c\x56\x81\x67\x19\xc4\x8d\x81\xf3\x43\xd4\x19\xe2\xd4\x96\xcc\x5b\x1d\x20\xd4\x61\x97\xbc\xe0\xc7\x55\xa5\x75\xfa\x5b\xca\x17\xfc\xb0\xe2\xe5\x06\xf9\x21\xd1\xca\xf0\xff\x5b\xed\xb2\x8d\x12\xc3\x07\xb4\x0e\x52\x9b\x84\x79\x2d\x4f\xe7\xe7\x22\xc4\x37\x81\x40\xcb\x94\x73\xef\x8d\x30\x04\x3c\xab\xbd\x8c\x5a\xbb\xd6\x54\x35\xe4\x66\xbf\x8d\x61\x2f\x83\x50\x41\x32\x94\x5b\x91\xc8\x8a\xe3\x5e\xb3\xf1\x55\x4c\x42\x0a\xa4\xc7\xec\xa2\x24\x91\xd5\x42\x57\x5b\xd0\xde\x77\xa2\x5a\x5a\x06\xc2\x4b\x4d\x76\x72\xc0\x9b\xf6\xbd\x55\x34\x1d\x9f\xe4\xe8\x34\xb6\x7d\xa3\xc0\xc8\x1f\xe7\x7d\xf5\x01\x5a\xc6\x5d\x89\x83\x45\xd1\x48\xcd\x09\xe4\x90\x5e\xc4\xec\x6d\xdf\x5f\xb2\x60\x97\xa8\x53\xf0\x25\x48\x77\xb1\x3d\x1d\xc2\x1a\x5f\xc3\xdc\x12\x94\xf2\x45\x9a\xee\x25\x38\x98\xbd\x88\x2d\xa2\x5d\x09\x72\xbb\xf9\x78\x13\x70\x53\xfb\x8f\x92\x25\xea\x97\xc9\xa0\x52\x68\x71\xd1\x6a\x56\x4f\x06\xbf\x8e\xd9\x2b\x55\xdb\x38\x44\x91\xb3\x91\x8d\xe5\x44\xe6\x76\xf5\xb3\x46\xf3\x88\xc6\x52\x45\x33\x2e\x0b\xa3\xf2\xab\x52\x20\x63\x83\x37\x0f\x51\xf0\x87\x03\xcf\xc4\xbb\x4b\x71\xe5\x19\x3c\x0a\x97\x09\xae\x8f\x71\x89\x8e\x3f\x46\x50\x2b\xe4\x7d\xbc\xd9\xb6\x5e\xf7\x83\x4a\x08\x39\x73\x77\xf8\xc1\xb0\xe2\x24\x43\xd3\x91\xc3\x29\xf2\xad\x92\x46\xbe\x4a\x64\x05\x97\xcb\x8d\x91\xd4\xc7\x3f\x2e\x40\xdb\x83\x8f\xba\x08\x5c\x20\xd6\x2f\x04\x04\xa8\xa7\x86\x8a\x0b\xfd\x17\x8c\xbb\xfa\x91\xa2\x10\x52\x41\x3e\x41\x93\x60\x65\x16\xaa\x5b\x27\xec\xb9\x19\x86\x0e\xb0\x73\xc2\x39\x1a\xe6\x00\x75\xdc\xc6\x0c\x8d\x6e\x10\x50\x35\x64\xd1\x47\x2e\x6d\x70\x19\x54\xad\xd2\x2d\x28\x93\xe3\x32\xec\x03\xd1\xa4\x92\x6c\xfa\xe8\x8e\xab\x50\x8a\xdd\x65\xe7\x6a\xb7\x4d\x19\xbb\xa2\xf3\x93\xae\x76\xd8\x1b\xbb\x3e\x1b\x63\x57\x12\x82\x33\x56\x6c\x8e\xa8\x8d\x46\x5a\x5d\x6f\xf8\xea\x0d\x5f\x0f\x67\xf8\x8a\x8e\xda\x91\xad\x5f\x3d\x74\x7f\x4f\x96\x7b\x05\xf1\x4b\x24\x80\x3d\x74\xff\x47\x80\xee\x4f\x13\xc9\xaf\x10\xb9\x7f\xc3\x44\x0f\x05\xee\xdf\xb2\x5e\x07\xb1\xa1\xe3\xc3\xf6\xa7\xbf\xd3\xa3\xf6\xff\x3e\x78\xd3\xa7\x47\xed\xdf\x20\x6e\xf5\x9a\x43\xaf\x39\x3c\x9c\xe6\xf0\x70\x98\xfd\x1b\xc8\x76\x0f\xd9\xdf\x43\xf6\xf7\x90\xfd\x5f\x04\x64\xff\x16\x51\xad\x47\xec\xef\x11\xfb\x8f\xa2\x3e\x1c\x0a\xd8\xbf\xb5\x9b\x43\x4f\x72\x0f\xd7\xff\x99\xc0\xf5\x87\xfb\xd3\xa3\xf5\xf7\x68\xfd\x3d\x5a\xff\x9d\xee\xcc\x9d\xa8\xe8\x0e\xac\xfe\x6e\xd3\xdf\x1f\x54\x3f\xeb\xb1\xfa\xf7\x64\xae\x71\xbe\xc9\xce\x93\x12\x35\x27\x53\x06\xa6\x4d\x39\x73\x45\x21\xc1\xc2\x10\xe7\x51\x06\xc0\x27\xbb\xcf\x4b\x96\x46\x88\xfb\x91\x7f\x90\xcb\x66\xc9\xca\x06\x94\x34\x35\x63\x4d\x29\xff\xde\x78\x95\x6e\xc9\x4b\x3e\x8f\x13\x1e\x43\x11\x90\xb4\xba\x46\xc7\x78\x0c\x17\x91\xd4\x24\x35\x62\x4c\x39\xb9\x0c\xb1\x31\x00\x89\xcf\xbf\x85\x68\x87\x08\x4d\x84\xd0\x0d\xbe\xe3\x4c\x0c\xe1\x98\xd5\xb7\x32\x23\xb4\x37\xc8\xe1\xaa\x9a\x42\x30\xbe\x5a\x15\xd2\xe2\xf4\xc5\xe3\x77\xdf\x87\x9c\xc6\x9c\xf1\xa5\x32\x87\xb9\x29\x6a\xb9\x2a\x00\x12\x45\x5b\x4c\x03\x97\x66\x48\x90\x09\x21\xdb\x29\x65\x01\x18\x0f\xd4\xd2\xc5\x92\xfa\x55\x73\x11\x45\x04\xcc\x62\x27\xd4\x94\x10\x8e\x12\x39\xdf\x64\x59\x8b\x39\xc8\xec\x78\x43\xf0\xa7\xa7\x4f\x52\x67\xb3\x03\xef\x61\xe8\x25\xc4\xea\xea\x91\x39\x9d\xa0\xc2\xf9\xb3\x1a\x35\x30\x87\xf6\x39\x58\x2a\xcd\x9f\x6f\x50\x14\xdb\x1a\xbb\xdf\x6e\xdc\x0a\xaf\xce\xdc\x73\x2b\xd8\x05\xb1\x57\xbb\x64\xbc\x46\xe6\x03\xc3\x9b\xc0\x3f\xe1\x8d\xb3\x83\x21\x35\x4f\xc5\xed\x77\x1a\x77\x23\xf8\xdb\x4d\xac\x58\x6a\x07\x8a\x78\x57\x60\xad\xc5\x4c\x54\xeb\x1f\xad\xd5\xd8\xa6\x5f\x2e\xd7\x86\xa9\x50\x2e\x2b\xe4\x18\xde\x9c\x4f\x06\x29\xa2\x65\x87\xda\x19\x87\xed\xb5\x65\x23\xcd\x1a\x5d\xab\xa5\xbf\xc7\xfe\xe3\x00\x97\x89\x03\x13\x5b\x03\xe4\x0e\xa2\x77\x55\x53\x1a\xba\x3a\x7e\xc3\x6f\x5f\xda\x73\x00\x32\x81\x59\xfd\xce\xa0\x1b\x99\x13\x10\x94\xcc\x0d\xe3\x9e\x49\x51\x39\xf3\x85\xd1\x04\x6f\x64\xde\xf0\xc2\x6e\xf6\x19\x41\x15\xa2\x15\x03\xac\x40\x9a\xe5\x98\x0d\xd1\x48\xbd\x30\x24\x09\x12\x1d\x4a\x4a\x08\x77\x06\x51\x8c\xb8\x07\x4c\x20\x07\x7b\x87\x9f\xcc\x78\xc1\x4e\xcc\x21\x2a\x0a\xe1\x3e\xa4\x01\x3e\xf2\x14\xef\xf9\x4f\x97\x2f\x00\xb5\x44\xf0\x92\x00\xd1\x20\x75\x71\x21\x58\x65\x6e\x16\xab\x2b\xb9\x62\x27\xed\x21\x9e\x5a\x48\xfa\xb6\x77\xeb\xe2\xea\x92\x0c\x1f\x0e\x03\xee\x56\x4c\x17\x4a\xbd\x27\x0a\x03\xb0\x4c\x84\x7d\x09\xba\x2c\xa6\x45\x3a\xe4\x2f\xb3\x3e\x80\x3f\x52\x20\xf8\x59\xa1\xe6\x46\xea\xa9\x0c\x05\x0a\xbf\x49\xbd\x22\x58\xbe\xbd\xa9\x04\x23\x87\x78\x2b\xbc\x31\x12\x9d\xa1\xe3\x15\xcb\xc5\xb4\x99\xcf\x29\x39\xfe\x20\xb3\x46\xcc\xb1\x92\x07\xe0\xd7\x63\x51\x10\x5c\xdb\x7d\x49\x08\xb6\x0e\x68\x08\x8f\x29\x08\x1d\xa6\xbd\xe8\x86\xbb\x2a\xaf\xe9\x06\x9a\x46\xba\x29\xea\x2e\xd5\xe8\x34\xed\x0c\xb2\xdd\xa2\x73\x6b\xed\xf3\x10\x00\xe9\xda\x1e\x08\xba\xc3\xd7\x16\x3f\xec\x1a\x07\x72\x1d\xeb\x5e\x21\xc2\x23\xa6\xf8\xc0\x69\xb6\xa7\x42\x6a\x26\x3e\xac\x44\x86\x19\x09\xc0\xef\xaf\xbd\x37\xeb\xda\x83\x49\x05\x14\x83\x3e\x86\xa3\xe8\x10\xbe\x6b\xfc\x00\x5a\xed\x8d\x74\x0e\x06\xda\x05\xbf\x09\x52\xf9\xb5\xfc\x87\x20\x90\x23\x26\xcb\x55\x53\x63\x73\x07\x42\x07\x8d\x1c\x29\x0b\xf8\xa2\xaa\x72\x51\xb1\x13\xf1\x77\x43\x0e\xde\xcb\x32\x1f\x7a\x87\x7a\x23\xc3\xbf\x10\x7e\xc8\xf0\xf7\xf0\x17\x08\x40\x39\xed\x2c\x01\xa5\x89\x00\xe6\x72\x53\xf3\x5a\xd8\x7c\x66\xb8\x34\x65\xa9\x6a\x9f\x9c\xb1\x26\x44\x34\x80\xff\x15\x76\x3d\x9c\x7f\xc2\x2c\xbe\x2c\x44\x59\x17\x6b\x02\x98\xfc\x08\x54\x95\x8e\x60\xe7\x80\xe1\xef\x81\xa1\x17\xb0\xb0\xe0\x37\x77\xbc\x34\xa2\xdc\xd6\x0b\xa3\x02\x55\xdc\xc2\x0a\xdb\x53\x15\x34\x9a\x71\x09\xf0\x7a\x74\xd0\xc6\x68\x71\xb9\x0e\x01\x2b\x37\xbd\xc4\x10\x41\x2d\x13\x22\xb7\x00\x7d\xed\x5e\x3a\xc0\x02\xb0\xf8\x2d\x1b\x18\x9d\x6b\x44\x26\x94\x45\xe3\xe0\xce\x82\x4f\x1a\xa9\x2f\x50\xe0\x83\xb1\xc0\x71\x84\x23\xde\xfa\x76\xad\xd8\xf5\x5b\x7c\xe5\xda\xbc\x4e\x83\xde\xf7\xd5\xef\x71\x28\xd7\x98\xd6\x8e\x09\xfe\x88\x30\xe6\x16\xb3\x74\x2f\x92\xc2\x74\x4d\xd3\xab\x9b\xaa\x04\x4f\x96\x35\x60\x3d\x79\xfc\x38\x5e\x20\xf7\x42\x88\x6e\x6b\xf1\x33\xeb\xaa\x81\x74\x7a\xd2\x53\xa8\xad\x63\x9e\xa2\xcc\x81\x8b\xdc\x4f\x61\xb1\x61\x05\x47\x67\xdf\xa8\xd9\x39\x5b\x66\xa6\x56\xd2\x9c\x15\xc3\x14\x9d\xa7\x33\xc6\xd8\x72\x74\xa7\x91\xf9\xf5\x3d\x79\x54\xa4\x55\xed\x8c\x60\x78\x58\x8e\x76\x23\xc5\xed\xbe\xfc\xcc\xb4\xdd\xcc\xcd\x5a\x6b\xbc\x1b\xd1\xbf\x8f\x5d\xe8\xe3\xea\x3e\xd7\xf0\x80\xca\x2b\x8b\x6d\xce\x96\x52\x0c\x79\x8d\x63\x10\x3e\x03\xa7\x7b\x37\xf6\xa0\x85\xa9\x8b\xec\xc9\x62\xd4\x60\x9c\x54\x6e\x91\x27\x3b\x29\xb5\xc3\x95\xdb\x12\xe9\x3e\x83\xf7\x17\xfa\xe1\x46\x4f\x43\xde\x41\x46\xef\xad\xfb\x1f\x57\x0d\xb8\x1f\x11\x06\xcd\xd8\x9a\xbd\x9e\xab\xa2\x59\x96\x2f\xdc\xb2\x6e\x25\xc9\x5b\xdf\x0c\xa0\xff\x21\xf8\xac\x59\x96\x68\x36\x43\x9d\x0f\xd0\x70\x57\x95\xc4\xfa\x1e\xfb\x61\xa7\x41\x93\xe1\xe0\x3f\xb5\x2a\xaf\x78\xbd\x48\xda\x29\xfc\xf8\x12\x16\x0a\xfb\x17\xd2\xa1\x45\xb3\xe4\xe6\x5c\xf1\x1c\xf4\xc9\xf0\xb9\xa5\xe7\x38\xee\xa4\xd9\xd4\x9a\x8c\xda\x9f\xc1\xdf\x49\x1e\x50\x2b\xf4\x14\xb0\xd7\x2b\x51\x1a\x8d\x17\xd2\xcb\xfc\xa9\xa5\x83\xee\xbf\x04\x82\xcf\x23\x33\xdf\x47\x2c\xe8\x09\x0c\x6b\x0e\x48\x6b\x55\xc9\x25\xaf\xd6\xa1\xb4\x41\x0b\x5c\x2b\xc6\xb5\x86\x98\xbf\x92\xc8\x9e\xb6\xcd\x00\xb4\x9b\xda\x49\x27\x0a\x23\x99\x05\x5c\x42\x40\x8b\x0d\x68\xdc\xa2\x99\x82\x0d\xe6\xf5\xc5\xe5\x19\x8d\x7f\x14\xc5\xba\x9e\x4d\x0b\x35\x3d\x5b\x72\x5d\x8b\xea\x8c\x0e\xa5\x3e\x7b\x32\x7e\x6c\x08\x9b\x51\x06\x46\x40\xdd\x10\xc0\x88\x8a\x75\xa4\x96\xd2\x6d\x68\x67\x31\xed\x13\x62\x1c\x80\x2c\xcc\xfe\x9f\xb7\xaf\x5f\xb1\x95\xf9\xf5\x04\xbc\x17\xe8\x81\x32\x8a\x05\xb3\x8a\xca\xa9\xc7\x8a\x16\x86\xcf\x80\xa7\x8a\xcf\x8d\x0e\x50\x33\x01\x25\x6f\x5a\x06\xa1\x5a\x19\xc1\x35\x6f\x32\xd4\xd2\x90\x39\xb5\x77\x27\xe9\x20\x4f\x3a\xc7\x41\xfb\x4a\x9d\x32\x78\xe0\xc9\xdb\xc6\x6e\x57\x95\x54\x55\x12\x92\xde\x3e\xb1\x22\x27\x1a\x31\xe9\x50\x11\x13\x45\xa3\xc8\x8d\x60\x72\xb9\x52\x15\x18\x82\x5a\x67\x1a\x3c\x43\x9c\xec\xbb\xa0\xd0\xe9\x31\xfb\x41\xdd\x8a\x8a\x8c\xa9\x94\x7f\xe8\xed\xc0\x0b\x39\x87\xca\xa7\xf4\xf9\x31\xc3\x1b\x4f\x61\x2b\xe4\x97\x50\x4b\x59\x13\xcc\x36\x98\xca\x8d\x50\x03\xd5\x22\x74\x26\x4a\x5e\x49\x15\x8a\xbb\x68\x07\xe4\xae\x4b\x36\x87\x6c\x47\xb0\x68\x97\xec\xf1\x5e\x96\x5a\xdb\xa4\x03\xb1\x66\x2e\x1a\xae\xd0\xde\x77\xef\xd3\x9c\xff\x07\xb0\x35\xb7\x08\xb3\x65\x18\x87\x10\x73\xc7\x77\x3d\x8f\x5e\xa8\xdb\xd0\x8a\xeb\xb1\xc7\xec\xd4\xa9\x98\xd6\x9b\x9d\xf9\x2d\x16\xce\xa4\x43\xc0\x3d\xd0\x49\x07\xd3\x94\x9e\x04\x6c\xc5\x8c\xa7\x75\x8d\xdd\xa1\x25\xb3\x91\xb5\x03\xda\x11\x8e\xd9\x05\x59\x3a\xa8\xa4\x10\xaf\xc4\x33\x36\x62\xd7\xaf\x54\x29\xae\x9f\x01\xf5\xb5\x6f\x57\xe8\x56\xb5\x66\x0e\x23\xa0\x38\x4d\x01\xab\x5a\x39\xa7\x5b\xad\x00\x1c\xdd\x99\x46\x48\x95\xa7\x52\xcd\xf1\x10\xc7\xe6\x73\xff\x81\xa6\x97\xeb\x67\x60\x06\x45\x61\x16\xd5\x5b\x2c\xbc\xa5\x40\xa3\xb5\x21\x80\xd6\x50\x53\x2b\x96\xab\xae\xb2\xef\x4b\x02\x05\xae\xbe\x49\xc9\xc0\x61\x02\x06\x07\x7f\xd4\x91\x21\x91\xe2\xe9\xaa\x0a\x99\x35\x1d\x83\x70\x5d\xdd\x88\x9f\xca\xf7\xa5\xba\x2d\xbf\xc7\x40\x38\x34\x90\x53\x6d\x20\x33\x6b\x68\x1b\x7c\x3f\x18\x5c\x27\xaa\xd0\x93\x33\x6a\xd5\xdd\x57\xfb\x7a\xf7\x98\xd9\xf8\xc1\xd0\x4a\x83\x8d\xc7\xcc\xd5\x57\x83\xca\x08\xd7\xf6\x70\x5c\x07\x55\x73\xdc\x1a\x1f\x5f\x60\xa4\x9e\x83\x8b\x75\x5c\x79\xb1\xdb\xff\x11\x25\xbc\xbb\xc8\x76\x81\x54\x17\x05\xbe\x06\x6a\x5a\x14\x93\x85\x18\x8d\xae\x58\xb9\x37\xf5\x8f\x19\xbb\xac\x35\x32\x41\x0b\xec\x6a\x31\xf8\x51\xda\x99\x34\x8f\x1f\x3f\xcd\xc6\x70\xca\xa0\x4c\x91\xf9\x5b\x8c\xc3\x9f\x01\x12\x9f\x7e\xef\x33\xe9\x7a\x8d\xff\xeb\xd2\xf8\xc3\x84\x80\x8f\x00\x13\xde\xa2\xbb\xd6\xe9\x86\x25\x8b\x42\x1d\x01\xce\x28\x5f\xad\x04\xaf\x8e\xaf\x81\x6f\xa0\x36\xbb\xf2\xd6\xc8\x62\x1c\xc7\xca\xf2\xac\x6e\x78\x01\xd6\x64\x0f\x38\xbd\x89\x04\x7e\xb4\x99\xec\x95\x98\x76\x24\xc2\xde\x49\x5f\x3b\x56\xbf\xc7\x49\x72\x3b\xd2\x68\x9e\xab\x32\xbf\x33\x1f\x73\x2f\x7b\xdf\x90\x75\x55\x38\xe5\xac\xa9\x40\xba\xcd\x5c\x53\x4b\xf3\x57\x6a\x67\x0a\x37\x99\x2a\xe8\xe0\x76\x38\x50\xc1\x75\xfd\xae\xe2\x10\xa2\xa5\xca\x77\xc9\x08\xac\x6e\x1b\x8c\x17\xac\x6d\x64\x96\x1f\x58\xed\x9a\x19\x59\xcf\x50\x44\x55\xba\x80\x60\x10\x26\x41\x2e\x3d\x46\xd4\xd6\x70\x73\xc0\x9b\xf5\xbd\x78\xb5\x77\xe4\xd4\x5e\xf7\x0c\xaf\xaa\x0f\x8c\xd3\x04\x45\x89\x53\x73\xf3\xd8\x80\xb7\xc3\x75\x8a\x67\xe3\xef\xf8\x5d\x8c\x3a\x1a\x9a\x05\x18\xdd\xaa\x2a\x1f\x7a\xca\xce\xa8\x5d\x60\x5c\xc4\xf5\x7b\xa4\xf7\xfa\xfc\x2e\x2a\xd4\x0e\xc3\x8e\xbe\x01\x7c\xc7\x30\x9d\x77\x50\x47\xee\x7b\x14\xa8\x49\xd6\x4e\xc7\xe5\x6d\xd5\x6b\xdb\x58\x45\xc1\x87\xde\x81\xd2\x29\xcb\xac\x68\x72\xc1\x5e\xea\x9a\x53\xd5\xb1\x21\x83\xea\x8d\x17\x59\x26\x56\x35\xf9\x17\xdf\x81\xe7\x92\xd7\xf7\x8f\x78\xd8\x15\xa3\x77\xa4\x6b\xbf\x13\x0f\x7a\xcb\x7b\x31\xbe\xe8\x46\x19\xb7\xcf\x85\xfd\xac\xa4\xcb\xad\x58\xd1\x58\x34\xce\xfb\x58\x77\x6d\xea\xdd\x43\x11\x8e\x24\x09\xf4\x19\xb4\x9f\xa5\xc0\xbc\x6f\xca\xea\xb1\x74\xef\xfb\x25\xb6\x1e\x69\x14\xc0\x0e\xee\x42\x4c\xe1\xc5\x44\x8e\x9a\xc6\x18\xaa\xea\x86\x8e\xe5\x96\xe9\x6f\x45\xd5\x2d\x9a\x8a\x17\x03\xba\x27\xdd\xc0\x32\x5e\x8b\xb9\xaa\x92\x68\xb6\xfe\x59\x4c\xec\xc1\x68\x20\xf2\x50\x9d\x01\xd3\x6f\xcb\x0d\x30\x15\x85\x2a\xe7\x30\x0d\x2c\x84\xf1\x88\x17\xc5\xa3\x53\x9f\x48\xe7\xeb\x90\xca\x12\x0c\x1b\xb9\xd4\x99\xba\x11\xd5\x9a\xe5\x2a\x6b\x20\xff\x1e\x49\x2a\x44\xa9\x4c\xd7\xce\x0d\x03\xc9\x2d\x58\x70\x41\x96\x37\x8a\xe0\x6e\x19\x54\xed\xbe\x7e\xdf\x4c\x45\x56\x17\x58\x86\xb1\x28\xae\x0f\x43\x6a\x4c\x93\x93\xf7\x44\x4e\x40\x2a\x11\x95\x2d\xc7\x61\x4b\x75\x86\xca\x9d\x0d\xae\x2c\x55\xb5\x04\xbc\x42\x2f\x34\x81\xcd\x4f\x96\xf3\xa6\xe0\xd5\x98\x36\xd4\xaf\x97\x0f\x33\xc5\x92\x2a\xb6\x4c\x06\x52\x2e\x8a\x70\xbb\x36\x9f\xbc\xf6\xfe\x5d\xbb\x74\x98\xc9\x93\xba\xd3\x66\xd7\xfe\x3d\x39\x29\xfb\x64\xc7\xc4\x60\xdb\x9d\xd5\xd3\x4f\x33\x84\x4b\x9c\x0c\x70\x60\xe6\x8e\x4d\x06\x69\x2f\x0c\x1e\xc4\xae\x0f\x06\x7e\xb7\x63\xa0\xbf\xc2\x24\xcd\xd0\xaf\x04\xf7\x01\x3d\x7b\x49\x73\x35\x3c\xcf\xb1\x08\x0b\xbb\xc6\x2b\x8c\xf6\xae\xc0\xd2\x45\xbf\x90\xa4\x40\xbf\x8d\xc7\x63\xfa\x1d\x87\x80\x3f\x5f\x8f\xd9\x8f\x8d\xae\xd9\x92\xd7\x84\x65\x15\xd5\x5e\xda\xc4\x20\x4f\x02\x43\x1c\xbb\xc6\x6e\xe1\x4e\x8f\xc3\xce\xc7\x9d\x91\x5d\x9f\xd2\xf7\xa6\x02\x72\xbe\x0b\x75\x2b\xaa\x8c\xeb\x34\x10\xa5\x5e\xa8\xaa\x76\x74\xa7\x25\x48\xbb\x67\xb8\x2e\xe6\x4f\x22\x2b\x56\x66\xb7\x2b\x37\x74\x36\xc6\x07\xbb\x86\x38\x51\x18\x84\x37\x44\x5e\xc3\x4d\x59\xee\x98\xee\x1e\x57\xd6\x5e\xa9\xc4\x2a\xd0\x13\x77\xc2\xed\xdf\xa9\xf3\xb5\x65\x38\xd1\x59\x77\x3f\xe7\x74\x1b\x3f\x81\x23\xaa\x65\xa0\xb8\x03\xdb\x79\xdb\xb5\x58\xf1\x96\xbd\x4a\x56\xd1\xdd\x73\x06\xab\x6d\xec\x06\x0e\xf3\x00\x5d\xb9\x46\xc4\xd0\x99\x02\xed\xdd\x7a\x8d\x36\x85\x36\xa7\x65\xfc\x2c\xf4\x9d\xa1\x8c\x1f\xfc\xa4\x45\x6d\xe4\x38\x7f\xa2\x9f\xbf\x79\xf1\x00\x21\x2d\x9b\x3c\x80\xbf\x0d\x69\xb6\x9d\x61\x63\xa1\x59\x3a\x73\xe6\x46\xe1\x0f\x0e\xce\x0a\x01\x19\x3a\xce\xac\x7b\x52\xb5\xf1\x78\xfc\xf1\xc9\xd5\x26\x37\x7e\x82\x24\x21\xf5\x41\x9f\xe3\x3a\xa6\xec\x86\xb8\x00\xcb\x89\x29\x54\x7b\x85\x3e\x9a\x89\x11\x89\x2a\x84\x0e\x24\x1c\x79\xa9\x38\x82\x94\xbf\xaf\x55\xd0\xde\xd6\xc6\xc5\x87\x3e\x7d\x04\xca\x47\x39\x10\x44\xda\x0a\xeb\x68\x27\x25\x36\x44\x06\x16\x74\x1c\xc0\x5f\x47\x60\x12\x54\x7c\xc1\xe6\x90\x06\xee\xd5\x61\x2b\xb4\x1d\xd7\xda\x8c\xd2\x8e\x84\xca\x69\xfb\x06\x95\x21\x7f\xb7\x7c\xad\xfd\xc7\xda\x48\x1c\x41\xb9\x64\x59\xb2\x19\xbf\x51\x90\x31\x46\x37\x92\x5d\x7f\x18\xd9\x57\x47\x0d\xae\xc9\x08\xbf\x76\x6d\xeb\xff\x43\x18\x33\xf8\xa0\x2c\x69\xf8\xe5\x0f\xbf\x8e\x71\xba\x63\x85\xb3\xff\xf9\x29\x52\xb5\xeb\x38\x9e\xc0\xd7\xf4\x70\x55\xae\x6b\xae\xdf\xeb\x33\x0e\x51\xd7\x61\xcd\x0f\x80\xc8\x80\x4d\x1e\xb9\x2b\xd5\xfe\x61\x14\x1e\xa5\x7f\x59\x55\x4d\x29\xcb\xf9\xc8\x8c\xaa\xd1\x76\x1a\xe6\x97\x78\x22\x1b\x22\x11\x82\x0c\x71\x24\x7d\x5d\x9e\x64\x7e\x0e\xce\x46\x58\x98\x62\x03\x69\x80\x2c\x42\xac\x45\x37\x62\x0a\xb9\x17\x84\x82\x8c\xa0\xb3\x3c\xe5\x8a\x67\xd7\xcf\xf1\x0d\x0c\x0e\xbf\x7e\xe5\x20\x33\x53\xfc\x2a\x20\xd0\x9d\x01\xbb\x90\x84\x56\x46\x89\x61\x91\xe6\x88\x86\x21\x0b\x5b\xe9\x9b\x35\xd7\x94\x4e\x2c\xf1\xd1\xe7\xcb\x55\x43\xa5\xa4\x31\x2d\x43\x96\x74\x43\xe8\xb0\xbb\x8f\x98\xd7\xcc\x08\x12\xe2\x8a\xab\x0b\xed\x18\x04\xaa\xfe\x50\x6a\xde\x1c\x8a\x91\x91\x4c\x26\x03\xa8\x44\x87\x08\xef\x46\x74\xe1\x53\x75\x03\xb0\xa2\x71\xab\x56\x2f\x7a\x18\x66\x7c\x55\x18\xc7\x53\x88\x0f\x32\x53\xf3\x8a\xaf\x16\x08\x4e\x3e\x66\x93\xc1\xbf\x77\xfb\xd0\x4c\xd7\xbc\xa2\xa4\x14\xce\x26\x83\x1b\x33\x0a\x48\xbe\xe4\x50\x80\x92\xb6\x0f\x30\x7a\x28\x01\xf3\x04\x52\x41\xf8\x7f\xaa\xca\xf6\x72\x4a\xaf\xd8\x48\xb8\x62\x4d\x56\x52\x98\xe5\x64\x00\xf0\x38\x93\x81\x39\x21\x93\xc1\x54\xd4\xe6\xdf\x98\x74\x82\xa1\x14\x51\xc7\xb2\x0c\x3a\x06\xde\xa3\xb1\x4e\xb6\xc6\x34\xd0\x99\xac\x34\x64\xc0\xff\xf5\x02\xc5\x37\xa3\xd0\xd5\xdc\xfe\x1b\xbe\xc5\x4e\xb0\xa6\xc9\x5f\x2f\x50\x41\x8c\x32\x40\x4a\x23\x1c\xce\x66\xf2\x03\x95\xbb\xd7\xf8\xbe\xaa\xf0\xdd\xd3\xa1\xcd\x55\x2b\x41\xa4\x84\x10\x2a\xcc\xca\x0e\xa6\x4c\x33\x8e\x46\x8b\x55\x4d\x30\xb1\xd1\x8e\xd6\x9e\x49\xbb\xde\xcf\xd8\xcd\xf9\xe3\x21\xbb\x79\x32\x64\x37\xe7\xe6\xbf\x90\xcb\x0c\x7f\x3d\x36\xff\x7a\x3a\x64\x37\x4f\x21\xbd\xd9\xfc\xf4\x04\x46\x84\xed\xe0\x9f\x4f\x86\x6c\xa6\xd4\x39\xfe\xef\xe3\x7b\xe4\xdc\x1c\x89\x1f\xfd\xec\x63\x23\x1e\xce\xa2\x12\x88\x36\x0f\x66\x1f\x79\x80\x8e\x7f\x7e\xc8\xb8\x8e\xdd\x40\x32\xdb\xdf\x6c\xd9\x75\xf6\x75\xa4\xee\xc8\xb2\x20\xa7\xc3\x06\xd5\x2f\x7a\xcc\x6c\xd9\x5b\x32\x29\xb9\x3a\xc6\xe0\xd9\x05\xa8\x0b\x73\xe9\x2c\x21\x46\x7b\x53\x40\x51\xdf\x2d\xc4\xda\x06\x24\x06\x15\x32\x17\xbc\x0c\x7a\x95\x18\xa1\xfc\x09\xe4\x33\xe7\xaa\x49\x67\x44\xd2\x33\xb7\x0b\xb4\x01\x86\x75\xaf\x78\x55\xcb\x0c\x94\x41\x6e\x06\x5f\xdb\x90\xbb\x9d\xbb\xf2\x89\x68\x80\xf7\xd1\x82\xce\x5b\xab\x4a\xe4\x3f\x6f\x64\xda\xf1\x73\xa0\x8f\x08\x23\x17\x72\xeb\xf8\x53\x74\x3a\x6e\x0d\x45\x17\x50\x90\x99\x30\xc5\x8c\xf4\x57\xf1\xec\x3d\xd9\xcc\xb5\x08\xb8\x31\x26\x4c\x73\xb6\x74\xd8\x6a\x10\x4d\x0c\xd1\xe9\x30\x04\xdf\x56\x96\x50\x1c\x0c\xf5\x1c\x27\x49\x2e\x1b\x4c\x41\xd6\x2a\xea\x05\xec\xdb\xaa\x28\x08\x64\xcf\x2c\x82\x5e\x44\x2d\xbc\x2f\xd6\xf1\x9d\x13\x51\x6a\x84\x00\x29\x15\x53\x45\x1e\xe1\x86\x17\x62\x06\xa1\xdc\x24\x23\x87\xfc\xa7\x12\x4b\x45\x29\xa5\x95\xd0\xae\x10\x8c\x1b\x39\xd9\xf9\xa9\x64\xad\x13\x64\xd0\x1f\x40\xf6\x7c\xec\x83\x5c\xc6\xb1\x60\x7b\x6d\x24\x07\x2c\xaf\xb1\xc6\x52\x7b\x28\xe5\xdb\xfe\x8e\x56\x2a\xf6\xe8\xd1\x00\x0f\xc6\x07\x1e\x84\x58\xff\x7c\x68\x68\x6e\xe7\xd5\x28\x13\xce\x65\x9d\xaa\xca\x5a\x16\xf6\x48\xac\x40\x79\x75\x80\x37\x94\xcf\x53\x88\x75\x01\xe8\x11\xf8\x0f\x29\xf8\x3b\x41\xc9\x37\xb4\x0c\xf3\x41\x7c\xc4\x6a\x46\x0f\x1d\x60\x94\x2c\xd9\x3b\xb8\x5b\xaa\xa9\x57\x4d\xbd\x53\x89\x82\x2a\xe0\xa2\xcc\xc4\x19\x14\xfe\x06\xe5\x89\x7c\x48\x86\xa3\xe8\xb3\x7f\xa9\x44\x26\x24\x28\x43\x4e\x9b\x1a\x71\x3d\xaa\xb1\x3c\x7b\xa8\x11\x19\x51\xbc\x54\x6e\x4c\x20\x58\x5a\x1d\x77\x08\xf9\x07\xe5\xbc\xb0\x51\xfb\x86\xe1\xac\x0a\xbe\x76\xb0\x52\x73\xef\x8b\xef\x6a\x42\x50\xdd\xe6\x13\x91\xe3\x4e\x4e\x0f\x62\x53\x59\x65\x38\x95\x29\x13\x28\xca\x5e\x14\x90\x3a\x4c\xc3\x4f\x4d\xd4\x68\x36\x91\xa2\x4d\x15\xb7\x29\x24\xb7\x86\xd0\x07\xd3\x28\xf0\x2f\xc6\x1d\xe3\x66\x09\xc6\xd9\x2d\xaf\x20\x9d\x61\x21\x38\xe9\x56\x64\xee\xbf\x01\x4c\x08\x9b\x41\x1b\x1a\x39\x21\x4a\x39\xad\xd7\xda\x21\x49\x55\xfe\x07\x76\xbc\x79\xda\xbe\x0d\x64\xe2\x56\xae\x5a\x79\x8e\xdf\x72\x43\x73\x87\xb6\x56\xe8\xcf\x40\x13\xf3\x98\xfd\xc8\xd7\x11\x26\x17\x46\x29\xfb\x65\x81\x38\x65\xb3\x1a\xc8\x57\xda\xfd\x6e\x58\xf4\xd8\x84\x81\xd9\xd3\x99\x5a\x2e\x45\x99\xc3\x01\xb3\xbb\x52\x8a\x5b\x01\xc9\xda\xa1\x12\x6a\x1e\x22\x6a\x80\xaa\x5c\x9e\x85\xae\xf9\x54\x16\xb2\x5e\x0f\x6d\xad\x30\xa0\xf4\x69\x9f\xcc\xf6\x44\x97\x50\x85\x35\xbf\x51\x21\xb3\xff\xf3\xbf\xff\xdf\x9b\xf3\xff\xf3\xbf\xff\xbf\x21\xfc\xeb\x09\x68\x2f\xf0\xa7\xa8\xb3\x7d\x8d\x87\xd1\x22\xf0\xfa\x60\x17\x09\x00\x44\x5c\x63\x97\x7e\xe5\x93\xce\x89\x0d\x14\x98\x0c\x5a\x71\xba\x22\xfd\x08\x52\xa8\xa1\x22\x54\x9b\x0d\x14\x40\x32\xc8\x20\xbb\xa6\xed\x25\xa0\xa8\x3d\xee\xd1\x43\xcb\xa4\x3f\xbb\x91\xc2\xa4\x91\xf8\x77\x27\x8d\x7b\x00\x4a\xf2\xac\xe0\x73\x44\xa6\x95\xe5\xfc\x2c\x97\x1a\xff\x15\x4f\x06\xa4\x08\x14\xcd\xed\xd9\x93\x1c\x83\x15\x2e\xae\x2e\x75\xda\xde\x44\x0c\x27\x29\x0b\x06\x01\x63\xed\xbb\xe0\x6d\x8b\xb0\xfe\x6d\xb3\x62\xe7\x50\x85\x76\xc6\x77\xa0\xff\x5b\xa7\x89\x08\x10\x92\x23\x5b\x00\xb5\xff\xaf\xad\xd3\x12\x0e\xbe\x99\x56\x21\xba\x58\x6b\x06\xc1\x53\x67\x41\xbe\x85\x40\xf9\xf0\x49\xea\x3c\x6c\x32\xa9\x2d\xf8\xcd\x83\x1f\x8e\xb7\xe1\xa4\x1e\x56\x75\x6f\xb1\xa5\xa3\x49\x57\xd1\x14\x8e\xd6\x6b\x70\x6b\x8e\x28\x09\x06\x63\x7d\x9b\xf1\x62\x3b\xa6\xcf\xd6\x37\x9d\xb7\x89\x12\x68\x6c\x18\x86\xa1\x54\xe6\x71\x70\xea\x50\x3c\x8c\x15\xa9\x7d\x52\x29\xde\x88\x55\x21\x33\xae\x21\x59\xd3\x06\x44\x46\x3f\x26\x22\x5d\xa7\xa2\xb0\x55\xf4\xd2\x49\x9e\x9d\x26\x51\x6c\x9c\xcf\xf6\x24\x9b\x3f\x68\xbc\x9d\xf4\x4d\xc0\xc0\x73\x48\x19\x70\xe1\x71\x55\xae\x71\x94\x63\x4d\x1f\xb8\x1e\xb3\xd7\x86\x35\xbb\x7e\x35\x5c\x77\x5b\x0e\x3d\xce\x23\x25\xbf\x02\x18\x3a\x03\x2f\x37\xbe\x0c\x43\x25\xff\x96\x83\x43\x51\xf0\xc7\x4a\x64\xd7\xbe\x3d\x89\x3f\xb7\xaa\x7a\x8f\xa4\xe5\x6f\xaa\x92\xff\x50\x65\xcd\x8b\x2b\x95\x5f\x34\xb5\x82\x1d\xaa\x42\x2d\x13\x42\xb3\x2c\xdc\x9f\xd4\xc1\x32\x38\x6f\xaf\x35\xa2\xe2\x0b\x27\x46\xa7\xe3\x04\xf8\xf9\x81\xd9\xe9\x32\x44\x48\xb1\x09\xb1\x1e\x9d\x3d\x8c\x9c\x80\x1d\xf0\xaf\x48\x67\x85\x9e\xa9\x6a\x99\x8c\xef\x7a\x40\x77\xc6\xbf\xc0\x62\x8c\xc2\xe3\x8a\x26\x72\x57\xeb\x19\x83\x4b\xac\x70\x60\xf3\x48\xe9\x8c\xa4\x18\xea\x10\xc3\x50\xda\x27\x81\x3a\xa2\x77\xae\xcf\xe0\xc3\xd7\xd1\x45\x01\x8b\xbb\x95\xcf\x28\x8c\x12\x8b\x53\xe3\x0a\xa5\xc5\x88\xf6\x55\x49\xa6\x5e\x84\x2d\x8e\x7c\xe2\x8d\x22\x5f\x51\xf7\x0f\x75\xde\xf1\x88\x1f\x69\x67\x36\x2e\x3d\xe1\x03\x39\x7c\x1f\x55\xb2\xbf\xbe\x7c\xb7\x25\x3c\x7b\xc7\xba\x77\xda\x3c\x08\xad\x79\xe8\xb5\x47\x5a\x73\xb4\xd5\x6f\x8f\xfa\x0e\xf7\xe2\xf1\x27\x88\x27\x09\x19\xe0\x81\x26\xef\xce\xab\x5b\x98\x27\x3e\xdf\xc5\x3d\x99\x07\x63\x77\x41\xb8\x1e\xad\xd5\xf3\x87\xf4\x11\x8b\x7b\xf3\x5a\xf3\x90\xfd\x81\x02\x9d\x0c\xc5\x3e\xdb\x30\x96\x94\x2a\xfe\x07\x76\xf5\xd3\xbb\x96\x9e\x2d\x92\x3d\xd4\xfc\xbd\x48\x9c\x72\x14\x02\x50\x83\x41\x1c\x37\x4a\x85\xa6\x8c\x92\x75\x0d\x38\x93\xe2\x43\x26\x56\x75\xb4\x52\x35\x2f\xff\xc1\x71\x00\x67\x57\xaf\xdf\xbe\x3b\xbb\xba\x78\xf7\xfc\x6f\x9d\xb1\x74\xac\x24\x9d\x8f\x74\x3a\xed\x88\x28\x1f\xef\x84\xdd\xed\x70\xe9\x88\xbc\xd0\x5c\x20\xa2\xb2\x2d\x92\xe9\x7d\x65\xb2\x56\xc2\xbc\x95\x19\xdb\x0a\xab\xe9\x3e\xf6\xe3\xb4\xd7\x9b\x54\x28\x3c\xe9\x3c\x7d\xcd\x81\xd4\x21\x0d\x06\x28\x85\x6b\x4e\xc2\x8a\x51\x03\x6f\xce\xaf\x89\xee\x51\x46\xc2\xc7\xd3\x4c\x50\x54\x3e\x34\x33\x70\xf7\x0a\xd0\x25\x0d\x96\x80\xee\x22\x55\x65\x79\xc6\xce\xc7\x3b\x0f\xb2\x85\x67\x71\x01\xf6\xe9\x93\x7d\xed\xbe\x86\x17\x86\x74\x3f\x9b\xdd\xf1\x64\xf7\x87\x92\x03\xde\x76\x59\x15\x05\x6d\x90\x23\x6c\xfb\x08\x3e\xe2\x6e\x3e\x7c\x72\x64\xe7\xec\x3c\x20\x17\x3a\xa2\x76\x18\xe8\x9c\x7b\x93\x1f\xff\x4e\x1c\x01\xef\xed\x53\x6c\x29\xea\x85\xca\xef\x48\x72\x5a\x71\x4e\x09\x08\xe6\xb8\x81\xb5\x0e\xda\xe8\xb0\x9b\xa7\xd6\x74\x56\x2b\x30\x5b\xc6\xc6\x33\xc2\x90\x04\xfb\xd9\xf1\xcf\xa0\x61\xbf\x38\xac\xab\x4a\xad\x8e\x7d\xe6\xda\xbd\xdf\xeb\x24\xbc\x24\xf8\x8f\x17\x14\xcf\xbc\xf3\x18\x24\x5f\xb0\xde\x4e\xeb\x27\x81\x32\x07\x01\xb6\x48\x24\x48\xc0\x00\x72\x91\xbb\x18\xea\x3d\x6b\x20\xb4\x70\xb7\x3a\xa2\x79\x53\x15\x49\xc7\xe0\xb1\xb9\xb7\x59\xff\x6d\x2b\x04\xc2\x57\x88\x60\x51\xae\xf1\xe4\xa1\x58\x06\x62\xaf\x0d\x2b\x42\xe8\x1e\x30\x46\x5b\x98\xf9\x67\x6c\xaa\x54\x31\x64\xb2\xac\xbf\xfb\x66\xc8\x66\x85\xe2\xf0\x0f\x9c\xd0\x90\xfd\xf2\x2b\x38\xbc\x66\x3c\x13\xff\xeb\xb7\x21\x5b\xf2\xd5\x2f\xf8\x28\xfc\x1d\xce\x77\x29\x8b\xf1\xf1\x85\x97\xf6\xf1\xdb\xb1\x12\x41\x53\xa4\x14\xe6\xc7\x11\x5d\x5a\x0c\xef\x32\xa7\x25\x2e\x6f\xfb\xa2\xe2\xb3\x9a\x7d\xc3\x4e\x16\x75\xbd\x7a\x76\x76\xf6\x9f\x5a\x95\x23\x1b\x01\x59\xcd\xcf\x4e\x77\x9f\x16\xbc\xd1\x89\x63\xf2\x5f\xbc\xfd\xbd\xf3\xcc\xfb\x0c\x2f\x1f\xc6\x67\xd6\x5a\x91\xd7\xd5\x5f\x94\x2a\xe2\x2f\x5f\x25\xa6\xf1\xf0\x9f\x2f\x8a\xd7\xe1\x72\x3d\xb0\xeb\xb0\x4b\x20\x87\x03\x5e\xae\x3f\xf5\x10\x48\xd5\x4c\x39\xed\x50\x07\x85\x03\x6c\xff\xf0\xe8\x6d\x46\x19\x46\x5b\x7a\x14\xc9\xec\xfc\x86\x14\x6a\xc9\x31\xce\x8f\x4a\xec\x05\x2a\x74\xc7\xf7\x6e\x5f\xb2\x4d\xe7\xbc\x16\x51\x6f\x07\x82\x2a\x3d\x0c\x8b\x43\x97\xa7\xeb\x2c\xd8\xbb\x9d\x65\x8c\x3e\xc6\x5e\x86\x44\xef\x33\x19\xd9\xeb\x0a\xeb\xf5\x5c\xc0\xd9\xc6\x61\x6e\x67\x6a\xa2\x6c\x96\x1f\xf7\x52\xc0\xb0\x28\x88\xf4\xa1\xbe\x60\x3e\x90\x15\x8d\x96\x37\x82\x4a\xd2\x04\x73\x0c\x7c\x5f\xbe\x95\x2c\xb7\xb5\x72\x22\xc9\x03\xac\x49\x5a\x42\xda\x17\x9b\x33\x90\x47\xe9\x77\x32\xe9\x5a\x54\x06\xfa\x19\x85\x00\x0b\x65\x8f\x26\x7a\xc7\x1c\xc3\x26\x24\xc3\x8a\xfc\xd9\xa4\x9c\x94\x23\x36\xd5\xaa\xc4\x43\x2d\xf3\x67\x86\xc4\x68\x97\x86\xce\x2e\x5f\x50\xe9\x2d\xce\x9e\x7c\x63\x74\xb5\x8a\x67\xb5\xa8\x34\x5b\x88\x0f\xd6\xf8\x3e\x62\x4d\x25\x9f\x99\xa1\xfe\xf4\xe6\x92\x71\xcd\x56\xbc\xa2\x64\xb6\xbf\xaa\x82\x97\x73\x56\x8a\xfa\xac\xa9\x8a\xf1\x95\x79\x40\xd8\xb2\xa6\xed\x88\x89\x25\x97\x05\xbc\x0b\xff\x62\x3c\xcf\x2b\xa1\xf5\xc6\x5e\x4c\x23\xec\xe6\x82\x5a\x8e\xd8\x42\x69\xc8\x7c\x33\x63\x47\x29\xa9\x05\x47\x00\x75\x7e\x4a\x76\x09\x78\x02\xa2\x86\x17\xc8\xf9\xcf\x75\x58\xc3\xf5\xcd\xf7\xcf\xd9\xf9\xe3\xa7\x46\x54\xa2\x12\xe4\x4f\xc7\xe7\xec\x97\x37\xdf\x3f\x37\xbf\xfe\x3a\x66\x23\x26\x57\x37\xdf\xc0\x78\x2f\xaf\x6e\xbe\x61\x97\x57\x9b\x46\x8a\x83\xbc\xbc\xc2\x57\xbe\xb3\xaf\x7c\xb7\xdf\x2b\x99\xcc\x2b\x33\x9d\xe7\x97\x2f\xde\x6c\x6f\x0e\x2d\x46\x6c\xc9\x33\xd3\xfe\xc7\x8b\xe7\xbb\x96\x10\x5f\x33\x0d\x47\xac\x69\x60\xc7\x4b\xf6\xd3\x4f\x97\x2f\x28\x7e\x15\xc5\xf0\x66\xb5\xc2\x3c\xbc\x70\x79\x30\x86\x6f\x2e\x3e\xb0\x93\x3f\xcb\xd3\xff\xf9\xcb\xe3\xd1\x1f\xf9\x68\xf6\xeb\xff\xfa\xb7\xdf\x46\x7f\x76\x7f\x7c\xb3\xdf\x1f\xe7\x4f\x7e\xfb\x2f\x34\x82\xa7\x6e\x08\x4f\x8f\x38\x86\xa7\xee\xaf\xa7\xfb\x0c\xe2\x1b\x37\x88\x6f\x8e\x38\x88\x6f\xe2\x41\xfc\xdb\x1f\xf9\xf4\xd7\xf4\xb8\x82\xa1\x7c\xeb\x86\xf2\xed\x11\x87\xf2\xed\xa1\x43\x91\x7a\x5a\xe2\xb1\x7d\xfb\x97\x57\xe7\x8f\x99\xaa\xf0\x5f\x4f\x6d\xae\x03\x5d\x7f\xc8\x48\x9d\x0c\x1e\x3f\x7d\x72\xfe\xaf\xdf\x9e\x3f\xfe\xe6\xa9\xcd\x92\xf8\xe3\xbf\xfe\xdb\xc8\xfd\x7a\x3e\x19\x50\x9f\xe7\x8f\xc3\x5e\x77\xf7\x45\x6f\x3d\xf5\x6f\x6d\x18\x41\xe2\x7b\x59\x25\x72\x59\x67\xbc\x02\xc2\x86\x7f\x31\xf3\xa7\xed\x21\xb9\x92\xff\xf3\xe4\xcf\xcf\x60\xe7\x60\x2d\x4e\xfe\xfc\x0c\xff\xfd\xf4\xb7\xd3\x3f\xff\xf3\xdb\x5f\xce\x47\xdf\xfe\x4a\x0f\xbf\xf9\xed\x9f\xdf\x9d\xfc\xf9\xd9\xe3\xf3\xf3\x7f\xc2\xf2\xe2\xef\xa7\xee\xd5\x7f\x3e\xfd\xe5\x9b\x7f\xb5\x8d\x9f\xfe\xf6\xcf\xa7\xa6\xf1\x2f\x8f\x47\xdf\xfe\xfa\xcf\x5f\xbe\xfb\xb7\xb8\xf5\xf9\x6f\xff\x3c\xf9\xf3\xb3\x27\xe7\x4f\xcf\xff\x79\xfe\x6f\x8f\x1f\xff\xf3\xe9\xb7\x93\x49\x6e\xbe\x69\xfe\xef\xfc\xfc\xb7\xd3\xff\xe2\x4b\x58\x96\xaa\x64\xb9\x9c\x9b\xb9\x78\x8a\xbc\x94\x1f\x30\x2e\x71\xc4\xb4\x36\x3b\xc7\x7e\x1a\xbf\x1d\x33\xad\x32\xc9\x0b\x43\xd0\x1a\xc0\xae\xa5\x89\x7b\xd6\x10\xcc\x1b\xbf\xf8\xcb\x88\xfd\xfa\x67\xf3\xcf\x27\xfe\x9f\xdf\xc0\x91\x58\x88\x0f\x99\x2a\x54\x05\x5b\xb1\x10\x1f\x78\x2e\x32\xb9\xc4\xf0\x48\xa8\x72\x94\x0b\xbb\x19\xff\xf2\x3d\xfc\xe7\x59\xfa\x43\xff\xf2\xe7\x13\x3a\x6e\x17\xa3\xef\xcd\xca\xfe\x33\xfc\xf3\x3b\x33\xd9\x11\xab\xe6\x53\xff\xb5\x37\x7f\xfd\x4b\xe7\x2b\xd5\x7c\x6a\x3f\x57\xcd\xa7\x27\x4f\xbe\xfd\x76\x48\xff\xfd\x23\xec\xfe\x74\x5d\x8b\x67\x6c\xca\xb5\xf8\xee\x1b\xa8\x0a\x98\x9b\x9d\x96\x25\xaf\xd6\x0c\xb2\xf1\x46\x50\xd2\xf3\x56\xc1\xf1\x28\xd7\x2e\x33\xdf\x31\x36\xc3\x26\xcd\x4a\xe6\x18\xdf\x1e\x9e\xb6\x27\x8f\x1f\x7f\x37\x7a\x7c\x3e\x7a\xfc\x64\x32\x68\xb1\x91\x59\x53\x14\x23\x78\x45\x96\x86\xa7\x3c\x7d\xfa\xf4\x8f\xa6\xb3\x06\xa3\xab\xa1\x43\xfa\x77\xbb\xd3\x27\xac\xd4\xd8\x5f\x87\x76\x43\x51\x0b\x20\xde\x2f\xec\xcb\xb0\x1a\xcb\x15\xaf\xe5\xb4\x10\x78\x3c\xde\x66\xbc\x08\xba\x27\x89\x01\x67\x62\x7a\x70\xb3\x01\x78\xae\xf6\x94\xce\xbf\x19\x9d\x3f\x19\x9d\x7f\xfb\xee\xfc\x8f\xcf\x9e\x3e\x7e\xf6\xe4\xf1\xf8\xf1\xe3\xc7\xff\xa3\x33\x41\xd3\xc1\x08\x3a\xf0\x13\x4c\xfa\x3a\xb1\x0a\xc9\x66\xa4\x9c\x07\x16\x95\x49\x48\x1e\x0e\x96\xfc\xc3\x65\x2b\xec\x3b\x0d\xd5\xfc\xdd\x37\xd4\xfc\x07\x51\xce\xd1\x33\xbb\x5f\xfb\x64\x8d\xd5\x1d\xef\xb4\xe4\x51\xbc\x99\x61\xe3\x5c\x35\x53\xf4\x1f\x2c\x65\x79\xd0\x04\x64\x79\xd8\x04\x64\x79\xf8\x04\x3a\x02\xf5\xd6\x09\x50\x09\xc5\x48\x41\xdf\xf6\x42\xa9\xea\x8f\xa0\xe6\x0d\x07\x65\x53\x14\x7c\x8a\x8a\x4a\x57\x31\x50\xa5\xf8\xd4\x26\x85\x15\xaf\x8d\xdc\x9a\xbc\x48\xf4\x2c\xb9\x77\x9f\x81\x06\xbd\xfa\x4c\xc7\xe5\xe3\xc5\x36\x6f\x6c\x17\x0a\xa3\x96\x75\x74\x4c\xba\x10\x78\x5d\x83\x32\xa0\xfc\xb5\x6f\x6e\x70\xbe\x3e\x84\x11\x48\x62\x39\x15\x79\x2e\x72\x17\x6e\xd4\xd5\x0c\xb7\xb7\x0f\xbc\xb8\xb6\xd4\x3d\x46\x48\x60\x39\x61\x6a\x1e\x56\x37\xb4\xc5\x92\x5e\x93\x17\x1d\x78\xc8\xbb\xf5\x4a\xfc\x28\x28\x9d\xdd\xc3\x63\xa2\x4e\x09\x60\x7e\x36\xb6\xcb\x3a\x01\x11\x95\x27\xa8\xce\x36\x6b\x2a\xf0\xe1\x55\xc2\x2c\x46\x56\x53\x40\x12\x0d\xc0\xbe\x86\xd9\xf3\x2d\xb8\xf2\x28\x57\xde\xe9\xaa\x8c\x37\xb5\x5a\xf2\xda\xa6\x02\x47\x0b\xb1\x21\x1f\xbe\x35\xa6\xa9\xa0\xc8\xfe\x69\x53\xb3\x5c\x09\x0d\xe9\x45\x58\xf0\x0e\x9e\xca\xd0\xaf\x68\x5e\xc6\x92\xe8\x1e\x3f\xe0\xa4\x59\x99\xa6\xed\x61\x7b\x00\x80\xd3\x74\x00\x6e\x34\x58\x59\xd6\x23\x55\x8d\xe8\x90\x6c\xdf\xe1\xa8\x6d\x90\x99\x42\xfb\xeb\x00\x8c\xa4\x76\x35\x22\x7d\xa5\x05\xa8\x6e\x6b\x6d\x05\xb6\x44\x2d\x85\x95\x0f\xf1\x40\xac\xea\x35\x73\x15\x08\x68\xa5\x20\x73\xcb\xfc\xc6\x35\xcb\x16\xb2\xc8\x11\xce\x6f\xfd\x7a\x06\xb8\x52\xa2\xb2\xa5\x13\x66\x81\x6c\xa7\x4a\x17\xd6\xef\x7f\x24\xea\xa4\xc1\xce\x70\x7e\x8a\x9d\x3c\x9b\x94\x8c\xb1\x11\x7c\xe2\x99\x1d\x6b\xf4\x1b\x0e\x79\x52\x3e\x39\x65\x60\x54\xb6\x6f\x04\xaf\xa7\x3b\xe8\x76\x01\x3f\x8d\xc7\x63\xf6\x0f\x51\x29\xb3\x20\x4b\x55\x89\xdd\x5b\x54\x48\x5d\x8f\x96\x7c\x35\x7a\x2f\xd6\x09\xa7\xfd\xe6\xb6\xb6\x06\x21\xd6\xef\xc6\xb8\x29\x57\x2c\xb1\xfb\x1a\x2c\xf3\xf5\x92\xaf\xae\x8d\x54\x45\xb1\xd7\x56\x54\x86\xfe\x20\x6a\xdc\x15\x60\xcc\xc5\x07\xbb\xca\x4b\xbe\x1a\x9b\x65\x05\xe8\x88\x9a\xcf\x11\xa6\xdc\x26\x73\xd8\xf2\xca\x98\x9a\x08\xa7\xc5\x15\x76\x9c\x24\xc6\x6f\x06\x32\x19\x30\x47\x39\x6d\x28\xe8\x64\xb0\xe4\xab\xc9\x60\xcc\x2e\x0a\xad\x86\x9e\xa2\xe8\xe0\x52\x38\xf4\x2a\x8f\x9b\x15\x84\x7e\x1a\x71\xb4\x82\x5d\xc9\x29\x00\xd4\xe6\x12\xc0\xd1\xc2\xa8\xcf\xa6\x12\xec\xa4\x54\xac\x14\xda\x5a\xba\x9d\x33\xeb\x94\xa6\x29\x98\xe7\x26\xc1\xd7\xe1\x53\x74\xf6\x21\x53\x90\x00\xf7\x55\x85\x33\x6e\x19\xdb\x87\x66\x56\x90\xc9\x68\x16\x43\xe9\xa8\x57\x43\x70\xc8\x70\x84\x36\xa3\xa2\x20\xdc\x46\x43\xc0\x0f\xc3\x4d\x4a\xaf\xf1\x3e\x67\x09\xef\x5e\xf7\x1c\x05\x54\xd5\x26\x78\x30\x09\x41\x17\x2b\x55\xa8\xb9\x2d\xb7\xef\xf7\x30\x2a\xb9\x1f\x9f\x08\x0b\xa5\x09\x4b\xf4\x94\xad\x94\xd6\xa0\x42\xe0\xe6\xda\xfb\x7a\xcd\x6b\xb5\x94\xd9\xf5\x33\x0f\x4d\x01\xe4\x43\x20\x41\xd6\x3e\xd5\x0c\xab\xf8\x0f\x51\x91\xb0\xbb\x3e\xa6\x4b\x79\x01\xbd\xd0\x97\x6d\x6d\x44\xf3\x46\x25\x8a\x35\xab\xc4\xaa\xe0\x99\xcd\x8d\x70\xc8\x8d\xf1\x5c\xa8\x27\xca\x95\x76\xc5\xc3\xcb\xb5\xc3\x96\x85\xd1\x9d\xe0\x71\x1a\xd2\x00\x86\xe6\xea\x9b\xf3\xf3\xe4\x94\x5d\x6b\x51\x5f\x5b\xe2\xf1\x56\xd4\x1e\xec\xc2\x16\x86\x31\xab\xe5\x18\x82\xab\xf8\x8d\xe8\x9d\x71\xc1\x53\xf2\xbf\xbe\xe4\xd9\x82\x3a\x44\x2a\xdc\x3e\xf6\x43\x8f\x82\x8a\x3d\x44\x9b\x6d\x68\x06\x12\x00\x5a\x66\x20\xd8\x76\xaa\x01\xed\xd8\x44\x37\xe8\xb5\xf1\xa4\x7c\x7a\x8a\x54\xc4\xce\x0f\x3d\xc3\xb4\xd5\x15\x69\xcb\x4b\xbe\xa2\x1a\xad\x28\x1b\xc8\x8a\x89\x42\x00\x02\x99\xbd\x2a\xa5\x2a\x47\x48\x65\xde\x8b\x35\xf5\x65\xb3\xd7\x6d\x75\x26\xf3\xea\x72\xcc\x5e\x23\x92\x48\x00\x63\xc3\x9a\x15\x84\x6c\x54\x94\xbb\x62\x3e\x68\x28\x93\xdd\xbb\xd4\x69\xe4\x41\x3d\x59\x37\x18\x43\x20\x60\x57\x51\x4a\x98\x94\x61\xee\x1c\x4e\x1a\xaf\xa7\x59\xa2\x74\x0e\x58\x72\xa1\x77\x5c\x3e\xb7\x1f\xd1\xdd\xa3\xed\x3b\xc2\xe5\x83\xf3\x6d\x99\x2d\x75\x1b\xdd\xc3\x27\x1b\xef\xe1\xbc\xe2\x65\x53\xf0\xaa\xb5\xc1\xb0\xa3\x1e\x70\x00\xff\x3e\x79\x2f\xd6\x23\x3c\x8f\x2b\x2e\x2b\x7d\x0a\x1f\x81\x5a\x52\x24\x15\x81\x9b\xa0\xb4\xde\xad\x9a\xba\x84\xac\x28\x68\x86\xd1\x57\x27\x90\x51\x9d\x19\x31\xc1\xfc\x38\x35\x9f\x2b\xe5\xaa\x29\x38\xc5\x8b\x6a\xb1\xe2\x15\xaf\xe1\xeb\xaa\xd2\x1e\x7b\x92\x3a\x0c\x33\x11\xa7\x62\xc1\x6f\xa4\x6a\x2a\x47\x57\xcd\x58\xe9\x66\x1e\x95\xca\xc0\x1a\xec\x49\x64\x76\x9e\x9c\x0d\x72\xe5\x8e\x83\xb4\x49\x1a\xd5\xb5\x5a\x79\xd8\x32\xca\x10\xcd\x45\xa6\xa0\x60\xaa\xae\xc5\x0a\x37\x81\x82\x8a\xf6\x04\xb3\x0a\x22\x92\x28\xbc\x01\xf7\x81\xcf\x66\x90\x9e\x4f\xbd\x54\x22\x6b\x2a\x2d\x6f\x44\xb1\x46\x01\x58\xdf\xca\x3a\x5b\x08\xcd\xa6\x50\x1e\x5d\x11\xa6\xa6\xfb\xba\xdf\x32\x39\x03\xc6\x2c\xf2\x90\x57\x9a\x6d\x4c\xe8\x6f\x71\x32\xb2\xcb\x86\x0d\x07\x06\x47\xca\x31\x6c\x80\xab\x0a\x1d\xe0\x63\xc4\x1c\x07\xf1\x5b\x55\x53\x99\xe7\xa2\x4c\x49\xd5\x47\x0d\x88\x4a\x7b\xe8\xee\x1b\xe1\x73\xc4\x10\x99\xe3\x75\x65\xad\x62\xc7\xec\x11\x62\x40\x8e\xd9\x61\xe8\xe3\xbe\x57\x70\xda\x86\xc9\xef\x1f\x71\x44\x6f\xc4\xf5\x84\x90\xbc\x62\x7e\x45\x74\x9a\x31\x36\x29\x0c\x58\x42\xd7\x23\x72\x73\x35\x6b\x3f\x1e\xb3\x1f\xb9\x34\x4c\x02\xb2\x23\xa8\xec\x24\x64\x3b\x11\xde\x47\x53\x41\x50\xfd\xc3\x07\x61\xd1\x26\x1e\xb2\x30\xe6\x85\x70\x5d\x52\x53\x67\x74\x5f\xad\xcc\x14\xb2\x72\xb8\xfa\x36\x2f\xc0\xb6\x23\x12\xb3\xfe\x18\x33\x0e\x4f\xd9\x21\x13\x0f\xde\x8b\xcf\x45\x72\x05\x48\x79\x87\x23\xf0\x00\xb3\x7a\x2b\xaa\x1b\x99\x89\x37\x16\x5f\x62\xdb\x4c\xda\x6d\xd9\x42\x81\x40\xe0\xa2\x2e\xc1\x12\x42\xad\xc6\x85\x98\xf3\x6c\x4d\xf0\xe8\x7b\x00\x74\x00\x02\x1e\xc1\x93\x76\x13\x2c\x77\xa7\xe5\x87\x70\x9a\x9a\xc6\xe0\x2a\xa8\x6d\xc4\xc2\x84\x8f\xa6\xf1\x30\xa1\xa0\x63\xd0\x39\xfe\x70\xc8\x17\x56\xc9\xec\xac\x95\xad\xf4\x19\x14\x4e\xfd\xe9\xcd\x0f\x98\x2e\xc3\x6b\xe2\xd8\xe6\x23\xb6\x6a\x9c\x15\x48\x20\xad\x31\xdb\x24\x7b\x18\x85\x37\xf1\x35\x80\x00\x8e\xbf\x46\x83\x67\xf0\x6c\xcf\x2f\xb2\x6b\xd3\xfa\x3a\x48\x49\xb7\xe1\x12\xd0\x8b\x05\xb0\x3b\x1f\x7d\xf7\xed\xb7\x4f\xbf\x1d\x62\x61\x0e\x23\x31\x9c\xc6\xd7\xf6\x9b\x6f\x20\x10\x05\xe4\x86\x5b\x5e\xe5\xce\x05\x05\x08\x0d\x7b\x15\xc3\x3c\x7e\x44\xad\x2d\x45\x07\xc8\x16\xcf\x55\x39\x93\xf3\x6d\x17\x21\xd1\xdc\xa7\x9c\xa2\xad\xc5\x55\x28\x34\x73\x5e\x62\xee\xd1\xbb\x1f\xde\x9a\x66\x25\x05\x87\x38\xad\xd0\xd6\xfb\xdb\x19\x52\x9a\xf1\xbf\x34\x65\x9e\xca\x84\xb1\x4f\x30\xca\xef\xea\xe5\x8f\xce\x61\xf9\xfc\x82\x4d\xf1\x11\xee\xb2\xdd\x59\xab\x98\x59\x13\x69\x38\x92\x47\xda\xca\x97\x99\xf9\x38\x44\xc5\x0a\x30\x02\x36\x65\x00\x15\xa3\xd7\xba\x16\x4b\x43\x88\x75\xcd\x2a\xa5\x8c\xf2\x85\x12\x9b\x5b\x73\x07\x25\xd9\x3d\xb1\xc1\xbe\x4e\xd7\xb5\xb0\x18\x0d\x32\x75\x1f\xed\x81\x95\x1d\x6a\x13\xdc\x45\x6f\x4a\x72\x05\x14\x5f\x22\x6b\xb5\x0d\x8c\xa0\x58\x15\x4e\xd1\x76\x53\x01\x1b\x11\x01\x54\xda\x1b\x20\xc1\xba\x0d\xb2\xac\xd9\x28\x9b\x59\x88\xc0\x9d\x84\x7d\xb8\x56\x8d\xbd\x0f\x8d\x16\x08\xbe\x21\x33\xf1\x00\xb5\x18\x3b\x64\xda\x87\x9b\xc7\x2b\x65\xe6\x37\x97\x37\x94\x0a\x54\x10\xf0\xb7\xa5\x5a\x34\xb9\x21\xe6\x3e\xf3\x32\x37\x17\xd0\xd0\x1e\x80\x17\x3e\xb9\x06\x49\x5b\x3c\x3b\x3b\x5b\x28\x5d\x3f\x33\x17\xfb\xcc\x50\xa5\xeb\xd3\x31\x7b\x19\x00\x48\xa8\x19\xbb\x6e\xaa\x02\xd3\xc0\xed\xa4\x37\x2c\xab\x51\xe5\xaf\x4d\x77\x8e\x74\x18\x3d\x04\xf6\x10\x14\x72\xb7\x39\x76\xb5\xe3\x95\xfe\x13\x81\xed\x07\xab\xeb\xea\x8e\xea\x5a\x70\x0a\x55\x83\x98\xac\xa5\x9c\x2f\x08\xf0\x4b\xab\xc2\x22\x73\xb8\x1c\x80\x17\xaf\xde\xc2\xbc\xd5\x32\x38\xa0\x1a\x0b\x20\x0c\x11\x14\xdd\xef\xc5\xb5\x11\xcd\x70\xa4\xd0\x17\x93\xe5\x88\x86\x04\x1d\x71\x0b\xc9\xe6\xa9\x61\xc1\xd7\x02\xeb\x99\x48\x55\x60\x7d\xe6\xb1\x9d\xba\xd1\xd2\x79\xa1\xc1\x4f\x00\xa1\x5c\x36\xce\x0a\xd6\xe8\xaa\x10\x5c\x83\x82\x46\x62\x21\x80\x3c\xb1\x6b\xb3\x7d\x05\x76\x60\x56\xfa\xfc\xc9\xbf\x8e\x1f\x8f\x1f\x8f\xcf\xaf\x51\xaf\xa5\xbe\xcd\x49\x95\xfa\xfd\x9a\x35\x65\x21\xb4\x86\x53\x09\xd9\x8e\x80\x7f\xc3\x32\x80\x19\x54\x66\x7d\xa3\xdb\xc1\x30\x6b\x02\x96\xce\xaa\x89\xa6\x8d\x91\x37\xdd\xf5\xc5\x9f\x71\x61\x4b\x81\x14\x03\xa8\x19\x14\x35\x70\xb8\x46\xee\xc2\xbd\x6d\xb2\x05\x56\x4b\x30\x8f\xad\xf1\xa8\x58\x93\x8b\xa4\x54\xe5\x08\x2a\x35\x4f\x0b\x81\x91\x81\x43\x38\x0e\x82\x6b\x68\x02\x59\xd0\xcd\xca\x6c\x13\x67\xa5\xb8\xb5\xa7\xc0\x9d\x24\x3c\xa0\xee\xa8\x4d\x06\x90\xa9\x3f\x19\xfc\x09\x8e\x88\x39\xc9\xf4\x68\x2e\x89\xc0\x52\x93\x67\x67\x67\x93\x01\x74\x73\xc1\x2c\x03\xb6\xfc\x90\xb2\x3f\x67\xce\x7a\x4b\x86\x42\x5e\xda\xfc\x77\xf4\x5b\x90\x75\x05\x06\xf7\xd3\x9b\x1f\xc6\xec\xbf\xab\x06\xda\xda\x23\x0a\x1d\xd7\x0a\xc2\x42\x50\x6e\x9f\xca\xba\xe2\x95\xeb\x86\x08\x96\xbb\x86\x98\x8d\x02\x91\xae\x43\xc6\xed\x6c\x83\x8a\xe7\x38\xe2\xba\x16\xcb\x95\x05\x92\x36\x1f\x23\x38\x78\x60\xa3\x5a\x66\x8c\x37\xf5\x02\x91\x88\x26\x03\xf3\xe4\x99\x0d\x4c\xf9\xbf\x27\x03\xcc\x9a\xae\x7d\xce\xf5\xf7\x15\x9f\xa3\xa9\xec\x64\x32\xf8\x97\xf1\x78\x3c\x19\xa0\x95\xe7\xef\x8d\xa8\xd6\x6c\xc5\x2b\xbe\x14\x10\x13\x74\x32\x19\xfc\xd9\x3e\x27\x03\x02\xf5\x32\x24\xad\xe5\xe0\x62\x5a\xf7\x15\x4f\xef\xa5\xce\x75\x2b\xce\xee\xc1\xe4\xb7\xd5\x88\x36\xf7\x87\x27\x4a\xf7\xee\x10\x77\xfd\x0b\x6f\xc4\x8d\x14\xb7\x3f\x6f\x46\xe0\x6f\x49\x24\x2d\xae\x1f\x0a\x20\xd2\x8a\x1e\x68\xc5\x96\x80\x8e\xa8\xaa\x4e\xa1\x61\xc7\xe0\x20\x50\x09\xab\x4d\x4b\xfd\x31\x0a\x09\x87\x73\x41\x80\xd0\xf4\x2a\x6c\xa9\x35\x10\xb7\xb4\x72\xad\x85\x7c\xa6\x14\xc0\x15\x70\x17\xf3\xcb\xf5\xf3\xd6\x9b\xd7\x1e\x39\xd2\xac\x05\x8d\x8c\x89\x0f\x00\x33\x8a\xbc\x24\x30\xaf\x05\xd5\x5e\x04\xc1\x2e\x3b\x98\xb2\xd2\x1b\x1c\xa9\x0a\x7f\x6d\xdd\x4e\x16\x63\xcf\x7b\x35\x3d\xd8\x74\x6c\xdc\x22\x9c\xc9\x38\x01\x8b\x4d\xd7\xc1\x20\x86\xd1\xf9\x32\x03\x9a\x71\x59\x6c\x04\xe2\x37\x5f\xe6\x1e\x1f\xd4\x4d\x31\x83\x75\x77\x71\x63\x1e\xa5\xd0\xc2\x93\x3b\xdc\xd0\x32\xf7\xee\x6d\x5b\x5e\x0f\x52\xc8\x6c\x0b\x0c\x1b\x27\x5a\xe6\x2b\x7b\x0f\x43\xa6\xd0\x52\x25\xcc\x90\x3f\x19\x98\x66\xea\xfc\xdd\x87\x8e\x00\xbc\xdb\x38\x3c\x5a\x10\x92\xbe\x35\x77\xb5\xdd\xb8\x85\xb2\x16\x6c\x31\xa5\x43\x07\x74\x78\x17\x66\x51\x23\x8d\xf6\x99\x0b\x6d\x7e\xf0\xb5\xf7\x06\xc3\x81\xad\x06\xd7\xa1\x2b\xdd\xc6\x89\x94\xa3\x56\x93\x36\xfe\x5d\x50\x24\x1f\x21\x38\x2c\xa4\x6b\xad\xc6\x96\x19\x2d\xd7\x7c\x25\xc7\xc4\xe2\xc6\x99\x5a\x9e\xdd\x9c\x4f\x06\x29\xed\xd5\x0e\xb5\x9b\x67\x4b\xbd\xb6\x20\xee\xd3\x40\x0e\x36\xe9\xc8\xd5\xc6\xbf\x07\x1a\x65\x5c\x46\xcd\x86\xba\xbc\xe1\xb7\x2f\xed\x61\x00\x57\x6d\x23\x13\xa8\x72\x8d\xcc\x89\x38\x79\x5e\xee\xae\x6c\x50\xc7\x8f\x36\xfb\xcc\x23\x3d\x5e\xba\x80\xed\x1c\x51\xde\x1a\xa9\x17\x28\x17\xdb\x1a\x54\x6a\xe6\x73\xe6\x03\xe0\x7b\xc3\x8f\x6f\xa5\x16\xf4\xc9\x8c\x17\xec\xc4\x1c\xa2\xa2\x10\xee\x43\x1a\x20\x09\x11\x54\x9e\xfd\x74\xf9\x02\x60\x7e\x05\x2f\x09\xb8\x12\x6c\xf9\x0b\xc1\x2a\xd5\x94\x39\xab\x2b\xb9\x62\x27\xed\x21\x9e\xb2\xa9\xa8\x6f\x85\x40\xfa\x17\x04\x03\x05\x74\x93\xe0\x7b\xbd\xa0\x63\x68\x49\x6d\xab\x2e\x53\x8f\x36\xee\x47\x37\x12\x71\x86\x67\x10\x90\x5a\x55\xa2\xc0\xd2\xa9\x85\x9a\x33\x51\xd6\x50\xe5\x2c\xfc\xa6\xa5\x2c\x00\xa0\x6f\xaf\x2b\x09\x53\x14\xc6\xd2\xe4\x12\x91\x08\x2b\x96\x8b\x69\x33\x9f\xdf\xbf\xf0\x67\xf2\x00\x1c\x97\x8c\xe0\x02\xef\x4b\x47\xb0\x75\x84\x8b\x1b\x91\x11\x3a\x51\x7b\x11\x0f\x77\x5f\x5e\xbb\xfa\x91\x95\xd0\x4d\x51\x6f\x2a\x0a\x14\x34\xdd\xc0\xae\x7d\x8b\xce\xd5\xb5\xcf\x43\x40\xc0\x6b\x7b\x2a\xe8\x22\x5f\xdb\x78\xaa\x6b\x1c\xc8\x35\x1e\x15\xc0\xdd\x9a\x35\xc5\x30\x38\xef\x10\x88\x84\x47\x3a\xd0\xde\x91\xa7\x5b\xec\xf4\x9a\x5d\xfb\x88\xab\x6b\x62\xcb\x3a\x22\x1b\xf4\x31\x1c\x45\x87\xfa\x5d\xe3\x07\x60\x0e\xa0\x63\x80\x3a\xe7\xc2\x62\xc0\xb3\xaf\xe5\x3f\x84\x0f\xb7\x59\x35\x75\xe0\x9f\x76\x8d\x1c\x3d\x2b\x83\xdf\xc0\x1d\x7e\x82\xc8\xa5\x71\x51\x98\x71\x23\xc3\xbf\xc0\xca\x19\xc6\xb9\x8d\x9d\x69\xf2\xb4\xb3\x04\x41\xf4\xda\xb2\x01\x78\x75\x80\x40\xd3\x54\x7a\xc2\x42\x32\xe9\x31\xbb\x28\xd7\xe4\xb8\x45\x40\x0d\xbb\x1e\x2e\x9a\xce\x2c\xbe\x2c\x44\x59\x17\x6b\x97\x24\xf6\xe0\xa4\x95\x8e\x60\xa2\x12\xb2\xf9\x3d\x36\xb9\xd1\x6f\xee\x78\x69\x67\x62\x13\x1f\xea\x8a\xbb\x3a\xcc\x72\xd6\x66\xb8\x46\x36\x01\x03\x27\x76\xe1\x30\x8c\x72\xc3\x7c\x97\x10\x10\xb9\xe9\x25\x43\x5f\xe0\x4c\x8a\xdc\x26\xcd\xb5\x7b\x71\x68\xea\x2e\xb6\x08\x21\x6d\x9d\xdd\x1f\x0e\x01\x9e\x6b\xd3\x9d\xe9\xb8\xa9\xc2\x82\xc7\xbe\xb6\x46\x70\xfe\xc3\xb1\xc0\x71\x84\x23\xde\xfa\x76\xad\xd8\xf5\x5b\x7c\xe5\xda\xbc\x4e\x83\xde\xf7\xd5\xef\x71\x28\xd7\x84\x55\xa1\x6e\xa0\x16\x91\xaa\x84\x5f\xcc\xd2\xbd\x48\xa5\xaf\xaf\x69\x7a\xa0\xc9\x1b\xcd\xdb\xc2\x01\x3d\x79\xfc\x38\x5e\x20\xf7\x42\xdb\x22\x99\x29\x52\x61\x3c\x1e\x9a\xad\xab\x6d\x39\xa8\xc0\x8a\x77\xf7\x2c\xf5\x6d\x01\x59\x8e\xce\xc3\xc1\x51\xed\x0d\xe5\x99\x5a\x19\x81\x5f\x19\xce\xe8\xea\xd2\x7a\x64\x35\x30\xf5\x58\xba\xd3\xc8\x3d\x8b\xd6\xed\x59\xa1\x7a\x67\x31\xfb\x8f\xc0\xd6\x8c\xe2\xb5\x2f\x53\x33\x6d\x37\xb3\xb4\xd6\x42\xef\x2e\xc7\xd1\x17\xa9\x3e\x6e\x91\xea\xbe\xa2\xf3\xf1\x2a\x3a\x57\x5e\x6d\x6c\xb3\xb7\x94\x8a\xe8\xe2\x63\x75\x58\xda\xbf\x75\x37\x8e\x6e\xbc\xd9\xa4\xeb\x22\x77\x76\xf2\x6a\x87\x3f\xb7\x65\xd3\x7d\x66\xe0\x6f\xf5\x03\x4f\x81\xc6\x7d\x54\x2b\xc3\xa6\x85\x7a\x00\xfd\xe0\x08\xd4\x79\x3b\x44\xf5\xde\x20\x5c\xed\x37\x43\xbb\x92\x2d\x20\x41\x61\x29\x86\xf9\x01\x12\xe4\xaa\x92\x40\x11\xf6\x2c\xda\x01\x4d\x86\x10\x45\x91\x86\x5e\x76\x4f\x92\x91\x17\x57\xd6\xd9\xce\xb4\x84\xaa\x64\x1e\x99\xf2\x04\x90\x09\x30\x2b\x36\x82\x28\xb5\x28\xc2\x46\x89\x30\x94\x0c\x23\x09\xe7\x46\xd4\xac\x31\x9c\xb1\x83\x95\xaa\x8c\x7c\x94\x37\x99\x08\xd2\x66\x9c\x3b\x12\x17\x22\xe9\xb3\x6f\xa1\x6f\x74\x2c\x30\xf6\x2f\x9c\xc2\xa2\x59\x72\x73\x51\x78\x0e\xfa\x72\xf8\xdc\x72\xa9\x2d\xdf\xda\x0b\x2e\xc2\xc5\x08\x58\xdc\x08\x08\x39\xf5\xd7\xb0\x33\x2b\x90\xe9\x1e\x99\xcd\x7a\xc4\x82\x9e\x56\xab\x42\xa2\x38\x07\x8e\x11\xc2\x0a\x0c\x04\x29\x3a\x1d\xb5\x62\x5c\x6b\xaa\xbb\x63\x8b\x17\xdb\x60\x61\xc0\xb8\xc7\x76\xd2\x49\xf9\xb8\xe2\xe6\x83\x71\xd5\x94\xb9\xac\x17\xcd\x14\x6c\x4c\xaf\x2f\x2e\xcf\x68\xfc\xa3\x08\xd7\xe9\x6c\x5a\xa8\xe9\xd9\x92\xeb\x5a\x54\x67\xd6\x9e\x79\xf6\x64\xfc\xd8\x90\x6b\xa3\xe7\x8c\x10\x0f\x2b\x5d\x40\x72\xdf\x22\x11\x9d\x8d\x82\x07\x9e\xe4\x6d\xdc\xa1\x55\x25\x55\x25\xeb\x75\x22\x8a\x83\x9e\x58\x81\x94\x72\x74\x70\x5f\x5c\x72\x74\xc1\x6b\x79\x23\x98\x5c\x82\x8f\xad\xb4\xd1\x2a\x6e\xb3\xa8\x94\x1f\xee\x0b\xa8\x7b\x7a\xcc\x7e\x50\xb7\xae\x00\x21\xba\xec\x8c\x00\x2e\xd1\xa4\xbe\x90\x73\xa3\x14\xda\xcf\x8f\x99\x2d\x73\x83\x41\xef\xe8\x27\x53\x36\xa5\xa7\x64\x85\x5c\x4a\xf3\x4f\x8c\x95\xd1\x99\x28\x79\x25\x55\x28\x0c\xa3\xa9\x90\xbb\x2e\x5d\x95\x0e\xc0\x6b\x7c\xbc\x57\x00\x88\x4f\x99\x8b\x57\xc9\xe5\x22\x95\xfb\x1f\xdf\x4f\x73\x84\x8e\x1e\xc2\x92\xa6\xeb\xfb\xf8\xb9\x36\xbd\x93\x70\x77\x91\x54\xeb\x8b\xcd\x85\x15\xcb\x38\x7b\xfe\x66\x27\xba\x3e\x39\x9c\xb6\x95\x9a\xee\x9d\x41\xbf\x0b\x67\x50\x14\x14\x76\xfd\xcb\x64\x40\x67\x78\x32\xf8\xf5\xfa\xc0\x1a\xf3\xf6\x50\x25\xe0\x71\xc9\xbf\xe9\x67\x68\x8e\x72\xb2\x16\x8f\x37\x4a\x5a\x53\xb3\x9d\x62\xaa\x84\xef\x33\x36\x62\xd7\xaf\x54\x29\xae\x9f\x61\x79\x1f\x7a\xbb\xc2\xa4\x0d\x6b\x44\xc3\x50\xa8\x30\x3d\xf5\xd6\x85\xc0\xd4\x0a\x6a\xaf\x3a\xc3\x9b\x8d\x6a\x49\x6f\xe4\xc8\x3b\x68\x9f\x05\xcb\x8c\x0b\x8a\xbe\x5d\x15\x21\x5e\xda\x15\xaf\x15\xcb\x55\xd7\x94\xe4\x6b\x93\x05\xb1\x6a\x93\x92\x41\xb4\x00\x98\xb3\x3c\xa9\x44\x99\x80\xcc\x1a\x07\x02\xbf\xa1\x4a\x0b\x6d\x83\xef\xdf\x26\x02\xe8\xf0\x25\x2d\xea\x24\x6b\x4c\xbc\xd1\xdd\xef\x54\xb7\x47\x73\x8b\xbb\x48\x4f\xaa\x73\x65\x5b\xa1\x61\x1a\x13\x1e\x1f\xce\x89\x8e\xf4\x3d\xe9\x49\x3f\xbe\x16\xf3\x40\x0e\xd3\x4d\xe5\x3b\xef\x50\x14\x30\x0e\x9c\x8e\x81\xbc\xbd\xac\x81\x98\xf2\xb9\x8d\x4a\xf4\x64\x74\xcc\xd8\x65\xad\x51\x2e\x83\xcc\xd7\xa9\xab\x03\x40\x32\x2c\x16\xd9\x82\xfa\x0f\x60\x61\x8f\xea\xec\xe3\xcf\x41\x4d\x2e\x43\xcd\xc2\xaa\xeb\x37\xe7\xe3\xf3\xef\x86\x6c\x55\xf0\xb2\xa4\x9b\x04\x45\x28\xe1\xba\x99\xa7\x4f\x9e\x8c\xd9\x4f\x1a\xa8\x43\xb0\xcd\xb4\xbe\x37\xe7\x1b\x4b\x9d\xba\xa8\xb7\x3d\xca\xd8\x24\xca\x1b\xf6\xe6\xb0\xde\x1c\xf6\xb9\x9a\xc3\xac\xab\xe9\x60\xf7\x51\x64\xd3\xf7\x78\x13\xb6\x44\x4d\x42\x2c\x58\x89\xac\x2d\xdd\x5a\xdf\xf4\x2d\xb7\x3e\x99\xa8\xaa\x1a\x5f\xad\x04\xaf\x1e\xc8\x32\xb5\xa9\x4c\xb5\x19\xfc\xa1\xe0\xff\x94\xcb\xb9\x6f\x35\xeb\x8f\x39\x9d\x07\x80\xbf\xdf\x63\x01\x1f\x8a\x6b\xed\x74\xac\x44\x6e\x98\xe0\x58\x3e\x1c\x23\xf5\xc5\x81\xef\xc0\x51\xdd\xcb\xde\xad\x6a\xbd\x7c\x5e\xbb\xa8\x40\xeb\x73\xd5\xbb\x1d\x33\x58\xa9\x9d\x1c\x89\xec\x78\x74\x98\x13\x05\xd4\x74\xfd\xae\xe2\xa5\x86\x8e\xdf\xc9\x94\x7d\xa5\xdb\x86\x99\x9f\x10\x8b\x8c\x24\x5c\x1a\x58\xed\x9a\xd9\xba\xcf\x46\xff\xa2\x1b\xe3\xcb\x53\xdf\xcf\x7f\x08\xa3\x04\xca\x05\xde\xc9\xee\x80\xad\xdb\xd2\xdb\x84\x46\xce\x26\xe4\x9e\xe1\xf5\x35\x3c\xc1\xae\x37\x9f\xaa\xa6\xa6\xa9\xb9\x79\x24\xa5\xe2\x4a\x70\x9d\x62\xe6\xf8\x3b\x7e\x17\x41\x84\x86\x66\x01\x46\xb7\xaa\xca\x87\x9e\xe4\x33\x6a\x17\x58\xe3\x71\xfd\x1e\xe9\xbd\x3e\xbf\x8b\x32\x45\xf5\x60\xbc\x43\x1b\xbf\x01\x0c\xc9\x70\xa3\x77\x00\x28\xf3\x3d\x6a\x0b\xa4\x48\x24\x3f\xb7\xdd\xe8\x53\x5b\x74\xa1\xee\x87\xde\x81\x45\xc6\xaa\xaf\x2f\x75\xcd\xa7\x85\xd4\x0b\x91\x0f\x19\xd4\xbc\xbe\xa0\xb2\xfc\x20\x6f\xbc\x03\xa7\x3f\xaf\xef\x1f\x31\x14\x51\x00\x38\x2c\x0f\x77\xf7\x7f\x90\x3b\x02\x10\xb7\xbc\x17\x17\xd0\xd8\x28\x7a\x52\xe0\xca\xae\x8b\x8e\x9a\x7a\x2f\x7b\x3e\xb4\xec\xe9\x2c\x22\xf1\x5a\x22\xe2\x08\xe2\x20\xf8\x18\x85\x5d\x9b\xfa\xb1\x6a\x76\xef\xd0\x04\x7f\xeb\x65\xea\xcf\x50\xa6\x36\x34\x02\x25\xea\x8f\x27\xbb\xed\x2b\x58\xb9\xb1\x3d\x1c\x69\x05\x16\x71\x17\xda\x0a\x2f\xb6\xe4\x73\x88\xd6\x0b\x4b\xef\x49\xbd\x4d\x3e\xdf\x46\x68\x57\x45\x53\x71\x00\x4e\x30\x37\xa6\x6b\x51\xe7\xb5\x98\xab\x2a\x55\xbb\x26\x78\x16\xd3\x7e\x30\x69\x88\x9c\xb5\xea\x36\xb7\xdd\x9d\x53\x51\xa8\x72\x0e\xd3\x80\xec\x39\xf6\x88\x17\xc5\x23\x0f\xe1\xc2\x56\x0d\x31\x58\x26\x4b\x30\xbb\xe4\x52\x67\xea\x46\x54\x6b\x57\x73\x47\x23\x85\x6d\x08\xa5\xd6\xba\xfe\xcc\xca\xa0\xe9\x9b\xfd\xff\xec\xfd\x89\x72\x1b\xc9\xb9\x27\x8a\xbf\x4a\x06\x3d\x11\x24\xfb\x0f\x80\xa4\xa4\xee\xe3\xa6\x63\xc2\x7f\x5a\x4b\x9b\xd3\x5a\x78\x49\xca\x9e\x33\xa6\xcf\x55\xa2\x2a\x01\xa4\x59\xa8\x2c\x57\x56\x91\x82\xdd\x1d\x31\x0f\x72\xef\xcb\xcd\x93\xdc\xc8\x6f\xc9\xcc\x5a\xb0\x50\x02\xd5\x6a\x1b\x27\x8e\x6d\x11\x95\x95\x95\xeb\xb7\x7f\xbf\x4f\xe7\x77\x94\xbe\x68\x11\xb3\x05\x52\xf4\x92\x2a\x13\x53\x05\x41\xd2\x0f\xb4\x13\xf7\x13\x96\x5b\x22\x2c\x94\x48\xca\xb5\x62\x19\xcb\x37\xd6\x04\x39\x60\x19\xa1\x4e\xb2\x45\x24\x48\x81\x91\x53\xe7\xd3\x3a\x93\xe5\x88\x36\x34\xaa\xf9\xe7\x43\xb7\x23\x1f\x82\x47\xdf\xa3\x80\xd1\x0f\xee\x93\x1f\x22\x18\x34\x5a\x3a\xb0\xa3\xf7\xca\x43\x6e\xd7\x7e\xec\x9d\x14\x3f\x59\x33\x31\xd8\x76\x6f\xe6\x0d\xd3\x8c\x4d\xf3\x37\x7b\x38\x30\x77\xd1\x6e\xf6\xfa\xdd\x96\x78\x10\xbb\x4e\x4b\xf8\x9d\xc7\x40\x7f\xc5\x69\xfa\xb1\xff\x1c\xee\xc3\xa6\xb5\xf2\x1f\x5a\x1b\x9f\x7e\xc7\x21\xe0\xcf\x5c\xb8\x78\x2e\x2b\xca\x7d\x8f\x47\xb6\x94\x5f\x1e\x44\x66\x42\xf1\x01\xbb\x85\x3b\x3d\x8a\x3b\x1f\x75\x46\xf6\xe1\x30\x2a\x76\x9a\x65\x22\x33\xf7\x88\xc6\xde\x2f\x58\xcf\x4c\x59\x79\xba\xd3\x12\xae\xfd\x33\x5c\x97\x19\xa4\xdf\xc3\xdf\x2c\xc7\x87\xc2\xa7\x6c\x01\x7d\xb4\x6b\x88\x13\x85\x41\x04\x33\xe9\x07\xb8\x29\xf3\x35\xd3\xdd\xc4\xb5\x43\x57\xaa\x67\x15\xe8\x89\x3f\xe1\xfc\x77\xdf\xf9\x5a\x31\x9c\xc6\x59\xf7\x3f\xa7\x74\x1b\x7f\x29\xcf\x6d\xcb\x86\xf1\x09\xbc\xe7\xaa\x6b\xe3\x92\x2d\x0b\x97\x2e\x1b\x17\xd0\x9b\xb8\x56\xf1\x1c\x38\xd1\x04\xd2\xe1\x24\x0e\x9b\x98\xa2\x07\xad\x23\xc6\x76\x02\xb9\x9a\xc2\x06\xba\xe3\x5f\xd6\x32\x76\x4a\x06\x5f\x55\x42\x0f\x31\xbe\x18\xcf\xf5\x35\xa8\xd3\xa6\xae\x8a\xba\x6a\xba\xf3\x7b\xaa\x77\x7b\xec\x80\x23\x48\xb1\x86\xaa\xdd\x24\x56\x39\x15\xd0\x1e\xfd\xa6\x54\x89\xd2\x77\xee\x99\xa7\x3f\x43\x69\x87\x90\xa1\xd2\xf4\xea\x8b\x73\x9f\x31\x3c\x20\xf9\x11\x5c\x78\xec\x5c\x55\xd6\x8f\x97\x61\xcb\x82\x4b\xf1\xda\x14\xc3\xcc\x89\x79\x18\x5c\xad\xca\x21\x7b\x75\xf9\x1d\x77\xb9\xe7\x75\x55\x03\xa7\xf1\x75\x68\xc8\x99\x2c\x2a\xff\xbe\x29\x97\xbe\x1e\x61\x35\x78\x14\x34\x8a\x04\x49\xb5\x2d\x32\xe9\xd1\x42\xe5\x34\xe8\xcd\x6d\xe6\x65\xdb\x00\x0e\x5f\x5e\x45\xe8\x44\xa8\xfd\xdc\xc8\x1f\x5d\x15\x24\xe0\x35\xca\xe8\x27\xab\x2a\xa7\x30\x04\x82\xf9\xfc\xf2\xc5\x63\x85\x1d\x2e\x8b\xc8\xf8\x79\x40\x97\xa9\x33\x76\xf8\x99\xe9\x9a\xa3\xda\xf8\x03\x6d\x0f\xe3\xe8\x77\x3c\xc4\x9f\xc9\x39\x47\xa3\xd1\x97\x67\x89\x4b\x61\x79\x96\x40\xf2\x30\xc8\x6d\x53\x7a\x70\x37\x08\xc4\x9a\x26\x17\x6c\xaf\xd0\x97\x35\x77\x23\xf7\x86\xa0\xae\x1e\x17\x79\x5f\x84\x57\x9f\x27\x3d\x56\x1e\x64\xd5\xac\xee\xb6\x0e\xda\x8f\x43\xa0\xc8\x78\x12\xdc\xa2\x01\x73\x13\x3c\xd9\x14\x1e\x42\xf0\x02\xb6\x32\xa5\x9c\xaa\x51\x03\xa0\xba\x99\x92\x84\x0b\x8e\xb5\xa3\x78\x98\x10\xda\xd9\xc0\xde\x96\xd9\xbd\x5c\x44\x00\x9f\x40\xb9\x28\x26\x80\x2d\x30\xcc\x93\xf9\x50\x77\xe9\x64\x07\xf1\x0b\xfc\xa7\x58\xc6\x2e\x42\x11\xb2\x2d\x18\xa1\xc8\x1f\x7b\xea\x13\x4c\x7c\x06\x4e\x14\x9f\x40\xfe\x58\x71\x81\xc3\xf4\x06\xa5\x3a\x6f\x4c\x30\x41\x53\xe5\x7a\xf8\x44\x82\xee\x00\x81\x7e\x13\x58\xc7\x53\x98\xd5\x87\x00\xfd\xb9\x96\x85\x55\xd2\xde\xda\x23\x09\x59\x3d\xf1\x07\x1c\x2b\xc3\x23\x1f\x38\x57\xfb\x87\x61\x7c\xee\x7f\x43\x58\x8d\xc0\x3a\x6a\x3f\x42\xf7\x4b\x0b\x7a\xb2\x3f\x96\x2d\x82\xbf\x46\x31\xa0\xa7\x3e\xb7\x29\xe2\xfa\xdc\xf7\x33\x45\xa5\x99\x97\xd2\x31\x47\xf7\x08\x06\x63\xe8\x58\x9b\xcf\x6e\x1b\x42\x67\x69\x5f\x30\x8e\xf8\xf0\x1c\xdf\xc0\xe4\xa3\x0f\x6f\xf9\x9d\xf4\x83\x3f\x40\x10\xcb\x11\x3f\xe8\x15\xbb\x5b\x85\xd0\x5b\xb3\x89\xcb\x98\x33\x21\xba\x87\x88\x83\xf8\xc9\xaa\xc9\xcd\xe4\x46\x62\x43\xa7\x60\xfa\xa6\xb2\x43\xe3\xc5\x25\x02\xc4\x97\x20\x83\x8d\x8a\xf2\x3f\x0f\xf6\xee\x1a\x05\x9e\x9b\xcb\x1a\x5d\xa1\x66\xba\x80\xbf\x50\x44\x18\xfa\x8b\x27\x2f\x11\x5b\x7a\x96\xb9\x7b\x57\x49\xb4\x69\xc0\x60\x6d\xbc\xd4\x44\xc2\x7e\xc1\x55\x8e\xca\x66\xbb\x35\x5e\x26\x0b\xdd\x35\xd3\xf7\xa1\x18\x60\xc8\xbb\x7d\x4c\x99\x62\x89\x36\xbe\x5a\xce\xc0\xc8\x4a\x27\x5b\x32\x91\xfd\xc0\xfb\xf1\x81\xec\xda\x13\xff\x13\xdd\xf8\xd0\xc0\x0d\x6e\x6c\xaa\x59\x84\x42\x25\xde\x71\x4c\x7b\xf4\xa2\xc5\xb0\xad\xd0\x28\x66\x18\x00\xe6\x15\x35\xec\xc4\xdc\x04\x92\x71\xb7\x34\x4e\xf5\x2e\x8a\x4b\x8d\xb3\x9f\xdd\x01\x8b\xf6\xc0\xae\xdd\x84\xbe\xe1\xb7\x47\x7f\xfd\xe0\x45\x9c\x37\x77\x20\x74\x4c\x71\x88\x0f\x5c\x63\xf6\xdf\xe4\xde\x30\x11\xd2\x39\xe7\x45\x4d\xf8\x72\x98\xe7\xac\x73\x12\x5d\xe8\x14\x85\x68\x53\xc2\x54\xef\x31\x58\x50\x09\x8a\x80\x3e\x41\x6e\x00\x6d\xc5\xcd\x1e\x40\x77\x65\xfa\x56\xdd\xec\x0d\x84\xae\x90\xe1\x5b\x00\x37\x1c\x9b\x3b\x80\x9d\x6a\xb6\x6a\xf5\x62\x07\x31\x8e\x02\x07\x10\xab\x8f\x3a\x31\xd3\x52\x16\x33\xae\x1a\x72\xb3\xf7\x63\xb7\x0f\x2b\x6c\x25\x4b\xca\xf2\x96\xe2\x66\xef\xce\x8d\x02\xf0\xe1\x64\xc9\xf5\x2c\xd0\xba\x22\x3d\x4c\x22\xe4\x56\xcb\xbf\x39\xaa\x86\xbd\x1c\xd2\x2b\x9c\x7f\x91\x2d\xc8\x77\x0a\xb3\xbc\xd9\x93\x59\x31\x93\x5c\x1a\xcf\x11\x83\x9b\x3d\xca\xe2\xc6\xe8\xd1\x46\xc7\x3a\x8f\x3a\xe6\x4a\xdf\x70\x6d\x31\xa4\x18\x4f\xc7\x78\x21\x7e\x38\x43\x03\x8e\xc2\xc2\xc0\xf4\x6f\xf8\x96\x38\xb8\x07\x54\xd9\x1f\xce\xd0\x44\xdc\x48\xa9\xce\x8d\xb0\xf5\x64\xa2\x3f\x0a\x0b\x41\xac\x16\xdf\x07\x4e\x55\xcc\xe4\xe1\x80\x11\x20\x72\x30\x2a\x41\xd6\x81\x9b\x47\x63\xca\x34\xe3\xc6\x68\x47\xe2\x2c\x67\x44\x2c\x1e\xad\xaf\xec\x4f\xeb\x7d\x2a\xee\x4e\x8e\x07\xe2\xee\xc9\x40\xdc\x9d\xb8\xff\x00\x71\x84\xbf\x8e\xdd\xbf\x9e\x0e\xc4\xdd\x53\xa0\x97\xee\xa7\x27\x30\x22\x6c\x07\xff\x7c\x32\x10\x13\x63\x4e\xf0\xbf\x8f\x7f\x51\xb5\x36\x68\x0b\xec\x1a\xdd\x2e\xf2\xcd\x46\xaa\xf4\xa3\xe5\x1c\x3c\xae\x3f\xe6\xb1\x7a\xff\xd3\xa3\x8c\xbe\x21\x10\x6d\xb7\xeb\x48\x0a\x78\x3c\x1f\xd8\x95\x8f\xf4\x78\xb0\x21\xb2\x2f\x4a\x6d\xd3\xf0\xb4\x35\xd9\xdd\x14\xb6\xb1\xc4\x50\xde\x78\x0c\xe4\x2f\x72\xc0\x41\x61\x54\x5f\xfb\x00\xea\x2c\x38\x02\xc5\x4c\x0b\xbd\x73\x11\xf7\xb9\x9e\xa9\x05\xe7\x3b\x85\xfc\x17\xc8\x59\x0a\xbd\x6a\xcc\xa5\xf8\xa5\x2c\x0d\x3e\xe2\xa5\x3f\x6b\x86\x9e\xf9\xad\xa0\x5d\x70\xa2\x75\x21\xcb\x4a\x27\x60\x3f\x97\x16\xb2\x5f\x28\xa3\x67\xed\xd6\xfc\x92\x44\x33\xc4\xbb\x61\x1a\x88\x29\x55\xba\x3c\x6f\xa8\xf9\x9c\xcb\x9b\x44\xd2\x7e\x37\xf8\x85\x31\x3e\x1d\x1f\x54\x77\xaa\x0c\x99\x34\x23\x71\x5d\xca\xe4\x96\x54\x7d\x1b\xe5\xf4\x10\x78\x93\x14\x73\x3d\xa5\xfc\x1a\xc8\x36\x85\x34\x58\x18\x42\x68\xab\x73\xa1\xaa\x84\xab\x6d\x33\x50\xc8\xbc\x46\x38\x24\x6b\x1a\xbd\x40\x84\x80\xc9\x32\x55\x82\x35\xc2\x2d\x82\x9d\x35\x5a\x84\xb8\x36\xcf\xad\x0f\xa0\x58\x91\x1b\x66\x6e\x84\xc9\x52\x8f\x3e\x03\xa2\x96\x9a\x54\x88\x04\x0b\x26\x9f\x98\x6b\x43\xb4\xba\x62\x33\x5b\xd5\xc9\x5c\xa2\x48\x09\xca\x58\xf2\xe2\x1f\x46\x54\x50\x44\x04\xf6\x41\xe1\x77\x1f\xe0\x62\x04\x19\xf2\x7e\xa6\x33\xe8\xdf\x29\x4d\x94\xfe\x19\xfa\xfb\x85\x90\xe2\x36\x3d\x6e\x8f\xcb\xd9\x1e\x8f\x8a\xff\xe9\xa1\xd9\x80\x9d\x57\x1b\xd0\x1c\x1e\x0b\xc7\x94\x6c\x41\xdf\x20\xa1\x1b\x85\xfe\x3d\xbc\xb0\x72\xfa\x6f\xeb\x3d\xfa\x74\x0f\xd0\x45\x4f\x5b\x5f\x7f\x4a\xa2\xad\x93\x12\x92\x02\x14\x1c\x99\xcb\x0e\x82\xe3\x88\x5f\x0d\x86\xe1\x1a\x5d\xc5\xa0\xed\x1e\xee\x3c\x4d\x9e\xb5\xa4\xde\x36\xd0\x97\xa4\x1f\x25\xfe\x04\x19\x47\xdb\xb6\x91\xa5\x3d\x5b\xa7\xde\x6a\x2b\xc2\xfb\x23\xf1\x67\x47\x7a\x69\xe7\xb0\xcc\xa2\x6b\x14\x05\x9c\x35\x3b\xc6\xc3\xa6\x84\x14\xf7\xb2\x04\x5b\xd8\x4c\x49\x52\xb0\x29\xea\xe3\x0e\x8b\x68\x12\x2e\x51\x6c\x4c\x07\xeb\x77\xbf\x35\x97\x87\xa4\x4d\xfe\x67\xec\x78\xf9\xb4\x43\x1b\xc0\x37\x2a\x75\x1a\x4c\xa0\x60\x77\xe5\xa1\xf9\x4b\x57\x19\x0c\x6b\xc1\x48\x83\x91\x78\x23\x17\xbe\xd2\x95\x9b\x3b\x66\xd7\x85\x65\xf9\xc0\x45\x27\x91\x4d\xb6\xfb\x5d\xb2\xe8\x8d\x95\x25\x4c\xaa\xc4\xcc\xe7\x2a\x4f\xe1\x94\xf1\xae\xe4\xea\x5e\x01\x04\x56\x6c\x89\x70\x0f\x11\x8b\xcd\x94\x3e\x3f\xdd\x56\x12\x9d\x0b\x03\xa1\x27\x10\x4e\x0e\x8c\xeb\x53\x00\x02\x62\x3b\x86\xfb\x6d\x80\x70\x99\xff\xe7\x7f\xff\x3f\x77\x27\xff\xe7\x7f\xff\xbf\x03\xf8\xd7\x13\x38\x9e\xf0\xa7\xaa\x92\x4d\x6d\x71\x8d\x45\x90\xd5\xc3\x6d\x73\x60\xf9\xc1\x2e\xc3\xca\xf7\x1a\xcb\x97\x70\x10\xb2\xad\x7e\xba\x2d\x77\xed\xd5\xf9\x0c\xb3\x6c\x83\x76\x36\xbc\x50\x0f\xa3\x9d\x5d\x5b\xf2\x32\x2a\xfa\xe5\x0d\xc1\xc4\x60\x7b\x8b\x28\x28\x0a\xa2\x9d\x64\x72\x2a\x54\x2e\xc7\x99\xce\xa7\x47\xa9\xb6\xf8\xaf\xe6\xea\x83\xe0\x86\x7a\x11\xdf\x0f\x2d\x31\xc2\xf6\xec\xe2\xdc\xf6\x7b\x82\x88\xa9\xf7\x8a\xdf\x51\xbe\x43\xfb\xbe\xb6\x96\xaf\xed\x98\xec\x1c\xfc\xd8\x53\x79\x0d\x86\x2a\xf6\x25\xaa\xa8\x50\x41\xc3\x68\x45\xed\xff\x7b\xeb\x44\xc7\x83\xdf\x8e\xff\xa7\x7b\x80\x97\xfb\x83\xee\x56\x9f\xe6\x0d\xfc\x39\xcd\x23\x1d\xbf\xf0\x09\xe7\xba\x39\xc7\x5f\xf0\x48\x37\x3d\x48\xbf\x72\xa3\xd8\xaf\xd3\xfa\x13\x8d\xfa\x2a\x91\xd9\x6a\x5c\xda\x95\x6f\xfa\x18\x1c\x4a\xba\xe7\xd8\x67\x05\x45\x18\x55\x7c\xea\x50\x99\x68\x6a\xe1\x9b\x24\x3b\x5f\xaa\x22\xd3\x89\xb4\x80\x04\xc5\x99\x49\x8d\x1f\x7b\x52\xce\xc6\x2a\xbb\x52\x99\x4a\x2a\x53\xf6\x23\x48\x75\x9a\x34\xf2\x53\x02\x94\x14\xc5\x3f\x80\xcd\xa4\x83\x0d\x05\x75\xde\x3c\xda\x23\x90\x2e\x5c\x95\x0f\x38\xca\x91\xa5\x0f\x7c\x18\x89\x77\x4e\x10\xf2\xfd\x62\xe5\x58\x53\x63\x1e\x42\x13\xa4\x8a\x62\x2c\xa8\xa6\x83\x0f\x2d\xc5\x97\x61\xa8\xe4\x9c\xf3\x90\x9e\x06\xfe\x28\x54\xf2\x21\xb4\x27\x92\x70\x6f\xca\x5b\x24\x92\x7f\x34\xa5\xfe\x87\xc9\x2b\x99\x5d\x98\xf4\xac\xae\x0c\xec\x50\x19\x9b\x28\x20\x33\x02\x1d\x1a\x40\xeb\xc2\x32\x44\x15\x6c\xd1\x6f\x81\x2f\x1c\x00\x0d\x02\x37\x40\xa6\x3e\x0a\x9e\x2e\x55\x6f\x66\xb4\x2d\x9f\x76\x28\xe3\x70\x65\xd8\x81\xf0\x8a\xf6\x8e\x9f\x89\x29\xe7\xbd\xe9\x15\x8f\x18\x32\xf1\x1b\x58\x8c\x61\x7c\x5c\xd1\x2b\x55\x2a\x8c\x0b\xa7\x88\x6e\x16\xc5\x18\xed\x88\xce\x48\x9f\x2c\x83\x55\xb1\x3b\x27\x81\x0b\xb3\x93\xef\xee\x08\x3e\xfc\xa1\x71\x51\xc0\xc9\xc5\xd2\x30\xa5\x32\x61\x49\x76\x2a\xda\xde\x2b\xb4\xb5\xaf\x4a\x6f\x72\x74\xdc\x62\xcb\x27\xbe\x50\xc9\xa8\xa4\xee\x1f\xeb\xbc\xe3\x11\xdf\xd2\xce\x2c\x5d\x7a\xc2\xb8\xf5\x18\xb5\x26\x17\x3f\xbc\xbc\x5e\x91\x27\xb9\x66\xdd\x3b\x6d\x1e\x85\xd6\x3c\xf6\xda\x23\xad\xd9\xda\xea\xb7\x47\xfd\x09\xf7\xe2\xf8\x97\x0a\xe2\x8e\xb9\xe0\x03\xdd\x27\x9d\x57\x57\x70\x50\x7c\xbe\x8e\x85\x8a\x2b\x9f\x93\xeb\x13\xe1\x98\x86\xab\x88\x49\xf4\x9f\xb3\x66\x6f\xc1\x50\x31\x10\xdf\x50\x8a\x81\x23\xdb\x47\x4b\xc6\xd2\x67\xfd\xf8\x46\x5c\xbc\xbf\x6e\x99\x36\x54\x6f\x0f\x15\x16\xcf\xeb\xaf\xf7\x40\xa5\x9b\x00\x90\x9c\x50\x97\x28\xbf\x7b\x51\x41\xd5\x04\xf5\x31\x51\x45\xd5\x58\xa9\x4a\xe6\xff\x90\x38\x80\xa3\x8b\x77\x57\xd7\x47\x17\x67\xd7\xcf\xff\xd8\x19\x4b\xc7\x3a\xd5\xf9\x48\xa7\xd3\x8e\x9c\xf2\x85\x8f\xd9\xa7\x9d\x30\xdb\x20\x34\x34\x21\x48\x68\x6a\x0b\x67\x76\x53\xe9\xac\x29\x68\x59\x96\x1e\xdb\x86\x02\x99\xa9\x96\x63\xb0\xbd\xe8\xa4\x82\xe0\x71\x97\xfd\x17\x1e\x88\x1e\x52\x63\x40\x80\xfb\x20\x49\x6c\x71\xaa\xed\xdd\xc9\x07\xa2\x80\x94\x1f\xfc\x85\x95\x17\x94\x9c\x1f\x8a\xe2\xb1\x7e\x19\xe8\xba\x46\xeb\x40\xb7\x12\x94\x7a\x95\x9e\x8a\x93\xd1\xda\x23\xcd\xb0\x9c\x3e\xdd\xb5\xff\x8c\x7f\xf0\x5f\xc3\xab\x43\x4a\x2d\x27\x5c\x3f\x59\xff\xa1\xde\x01\xaf\xba\xb6\x86\xe2\x44\xc9\xbd\xba\x7a\x04\x5f\x7a\x4b\xbf\x10\x90\x49\xe7\x14\x3d\x36\x7b\xda\xb6\x02\xf9\xa7\x46\xd4\xe7\x66\x74\x29\xbc\xd3\xcc\x4c\x8d\x0c\x6e\x73\x55\xcd\x4c\xfa\x89\xb4\xc8\x60\x50\xfc\x9f\x9e\x2e\x1b\x4e\xab\x01\x9b\x6b\x39\x98\xfe\xee\x29\x1b\xfc\xa8\x14\xdf\x72\x6b\xe6\x23\x9d\xcb\x76\x6d\xf7\x47\x38\x87\xed\x4f\x7c\xfe\xc1\xe8\xaf\x90\xbf\xe2\x54\xf4\xbe\xc0\xce\x75\xf6\xc3\x41\x61\xec\x08\xf3\xb0\x21\x75\xc0\x28\x52\x95\xfa\x54\x47\xe8\x62\xfd\x09\x69\x41\x32\x77\x84\x79\x2a\xbb\xfa\x65\x24\x4a\xb7\x13\xab\x96\x09\xc4\xb5\x18\x0b\x2f\x5f\x50\x55\x66\x78\x42\x65\xd3\x31\x00\x10\x71\x69\x1b\xe0\xa2\xa7\x50\x38\x7d\x20\x74\x5e\x7d\xf7\x6c\x20\x26\x99\x91\xf0\x0f\x9c\xd5\x40\xfc\xe5\xaf\xe0\x55\x9d\xc8\x44\xfd\xf3\xe7\x81\x98\xcb\xe2\x2f\xf8\x28\xfe\x1d\xce\x7c\xae\xb3\xed\x57\x27\xef\x3f\x8d\x9b\xd7\x5a\x47\x12\xe2\x7e\x1c\xd2\x6d\xc6\x68\x4c\x77\x6e\x1a\xa0\xbe\xe2\x45\x29\x27\x95\x78\x26\x0e\x66\x55\x55\x9c\x1e\x1d\xfd\xcd\x9a\x7c\x88\x17\x7d\x64\xca\xe9\xd1\xe1\xfa\x73\x83\x57\xbd\xe7\xc0\xfc\xb7\xe0\x29\xe9\x3c\x0b\xde\xe9\xf3\x47\x74\x71\xf6\x17\xeb\x6f\x7c\xfe\xa2\x67\x2e\x5f\x68\x0c\x59\xf6\x2e\x5e\xb8\x2f\xe1\xf3\xed\xd2\xd0\xc1\x9e\xcc\x17\x5f\xc5\x38\x48\x75\xed\x73\xb9\xfa\x4c\x16\xe9\x15\xdc\x00\x35\xef\x94\x6b\xf4\x32\x34\xb2\xc4\xbc\xd7\x97\xa2\xa5\x25\x86\xea\x4e\x94\xac\xea\x32\x56\xc9\x3b\x91\x1f\xfc\x12\x37\x9d\x42\x11\xf0\x65\x01\x22\x68\x3f\xe0\x71\x85\xd4\xae\x04\xdc\xa7\x69\x94\x17\x75\x77\x22\x0e\x4c\x09\x9e\xd7\xf2\x70\x79\x5a\xe1\xd9\xc5\xf9\x23\x72\x50\xf4\x73\xfb\x1e\xa3\x7d\xf7\xd7\xfb\x97\xbb\x1c\x1c\x74\x10\x51\xd2\xaf\x69\x78\xef\xca\x2b\x20\x60\x67\x70\x43\x7e\xee\x96\x31\xe8\x90\x39\x95\xd7\xf3\x5f\xe0\x6a\xc1\xd8\x28\x9a\xfc\x51\x3f\xe3\xbe\x42\xfe\xb8\x37\xf2\xa3\x9e\x37\x66\x1b\x39\x18\x43\x2b\x9d\xaf\x6a\xe5\x65\x9f\xc7\x5a\x9d\x7e\x79\x6c\xd3\x22\x11\x91\x30\x4c\xbf\x93\xc9\x99\xe1\xdb\xe8\x67\x94\x36\xb8\x5c\x1c\xba\x10\x3c\x03\x8e\x9b\x70\xf6\x55\x7a\x7a\x93\xdf\xe4\x43\x31\xb6\x26\xc7\x83\xae\xd3\x53\x47\xb2\xac\x87\xaa\x12\xe7\x2f\xb0\x72\xb8\x90\xe2\xc9\x33\xa7\x3c\x96\x32\x81\x6a\xd5\x33\xf5\x91\x9d\x03\x43\x51\x97\xfa\xd4\x0d\xf5\xfd\xe5\xb9\x90\x56\x14\xb2\x24\x84\x8b\x1f\x4c\x26\xf3\xa9\xc8\x55\x75\x54\x97\xd9\xe8\xc2\x3d\xa0\x5a\x2d\xae\xed\x50\xa8\xb9\xd4\x19\xbc\x0b\xff\xe2\x42\xed\x4b\x7b\x71\x8d\xb0\x9b\x33\x6a\x39\x84\x9a\xea\xb9\x9c\x2b\x37\x76\x14\xc7\x5a\x90\x65\x90\xd4\x97\x8b\x73\xc0\x1c\x53\x15\xd6\xaf\xc7\x50\x10\x69\xbd\xbb\x78\xbc\x10\x97\xaf\x9e\x8b\x93\xe3\xa7\x4e\x26\x53\x80\x5e\x2d\x9e\x8e\x4e\xc4\x5f\x2e\x5f\x3d\x77\xbf\xfe\x75\x24\x86\x42\x17\x77\xcf\x4e\xb1\xaa\xfc\xdd\x33\x28\x2d\xdf\x3f\x52\x1c\xe4\xf9\x05\xbe\xf2\x1d\xbf\xf2\xdd\x66\xaf\x24\x3a\x2d\xdd\x74\x9e\x9f\xbf\xb8\x5c\xdd\x1c\x5a\x0c\xc5\x5c\x26\xae\xfd\x9b\xb3\xe7\xeb\x96\x10\x5f\x73\x0d\x87\xa2\xae\x61\xc7\x73\xf1\xfe\xfd\xf9\x0b\x0a\xd3\x46\xa1\xbf\x2e\x0a\x04\xe7\x88\x97\x07\x03\x54\xa7\xea\xa3\x38\xf8\xbd\x3e\xfc\xaf\xbf\x1c\x0f\xbf\x97\xc3\xc9\x5f\xff\xf9\xdb\x9f\x87\xbf\xf7\x7f\x3c\xdb\xec\x8f\x93\x27\x3f\xff\x37\x1a\xc1\x53\x3f\x84\xa7\x5b\x1c\xc3\x53\xff\xd7\xd3\x4d\x06\xf1\xcc\x0f\xe2\xd9\x16\x07\xf1\xac\x39\x88\xdf\x7e\x2f\xc7\x7f\xed\x1f\x57\x34\x94\x6f\xfd\x50\xbe\xdd\xe2\x50\xbe\x7d\xe8\x50\xb4\x1d\xe7\x78\x6c\xaf\xfe\xf0\xf6\xe4\x58\x98\x12\xff\xf5\x94\xd3\x9f\xe8\xfa\x03\x4c\xcd\xcd\xde\xf1\xd3\x27\x27\xff\xf1\xed\xc9\xf1\xb3\xa7\x9c\x38\xf5\xfd\x7f\xfc\x76\xe8\x7f\x3d\xb9\xd9\xa3\x3e\x4f\x8e\xe3\x5e\xd7\xf7\x45\x6f\x3d\x0d\x6f\x2d\x19\x41\xcf\xf7\x92\x52\xa5\xba\x4a\x64\x09\x84\x0d\xff\x12\xee\x4f\xee\xa1\x77\x25\xff\xeb\xe0\xf7\xa7\xb0\x73\xb0\x16\x07\xbf\x3f\xc5\x7f\x3f\xfd\xf9\xf0\xf7\x3f\x7d\xfb\x97\x93\xe1\xb7\x7f\xa5\x87\xcf\x7e\xfe\xe9\xbb\x83\xdf\x9f\x1e\x9f\x9c\xfc\x04\xcb\x8b\xbf\x1f\xfa\x57\x7f\x7a\xfa\x97\x67\xff\xc1\x8d\x9f\xfe\xfc\xd3\x53\xd7\xf8\x2f\xc7\xc3\x6f\xff\xfa\xd3\x5f\xbe\xfb\x6d\xb3\xf5\xc9\xcf\x3f\x1d\xfc\xfe\xf4\xc9\xc9\xd3\x93\x9f\x4e\x7e\x7b\x7c\xfc\xd3\xd3\x6f\x6f\x6e\x52\xf7\x4d\xf7\x3f\x27\x27\x3f\x1f\xfe\x37\x4a\x7a\xcb\x17\x90\x62\x97\xea\xa9\x9b\x4b\xa0\xc8\x73\xfd\x11\xa3\x6c\x87\xc2\x5a\xb7\x73\xe2\xfd\xe8\x6a\x24\xac\x49\xb4\xcc\x1c\x41\xab\xa1\x02\x0c\x4d\x3c\xb0\x86\x68\xde\xf8\xc5\xbf\x0c\xc5\x5f\x7f\xef\xfe\xf9\x24\xfc\xf3\x19\x1c\x89\x99\xfa\x98\x98\xcc\x94\xb0\x15\x33\xf5\x51\xa6\x2a\xd1\x73\x0c\xf6\x85\x72\xc2\xa9\xe2\xcd\xf8\xcd\x2b\xf8\xbf\xd3\xfe\x0f\xfd\xe6\xf7\x07\x74\xdc\xce\x86\xaf\xdc\xca\xfe\x14\xff\xf9\x9d\x9b\xec\x50\x94\xd3\x71\xf8\xda\xe5\x0f\x7f\xe8\x7c\xa5\x9c\x8e\xf9\x73\xe5\x74\x7c\xf0\xe4\xdb\x6f\x07\xf4\x9f\xef\x61\xf7\xc7\x8b\x4a\x9d\x8a\xb1\xb4\xea\xbb\x67\x42\xe5\xee\xc5\x54\x8c\x75\x2e\xcb\x85\x00\xe4\x84\xa1\x28\xa4\xb5\xf7\x06\x8e\x47\xbe\xf0\x70\x5d\x9e\xb1\x39\x36\xe9\x56\x32\xc5\x0c\x8e\xf8\xb4\x3d\x39\x3e\xfe\x6e\x78\x7c\x32\x3c\x7e\x72\xb3\xd7\x62\x23\x93\x3a\xcb\x86\xf0\x8a\xce\x1d\x4f\x79\xfa\xf4\xe9\xf7\xae\x33\x2a\x01\x02\x1d\xfa\x72\x20\xcd\x4e\x9f\x88\xdc\x62\x7f\x1d\xda\x0d\x85\x23\x81\x78\xbf\xe0\x97\x61\x35\x10\x89\x21\x53\x78\x3c\xae\x12\x99\x45\xdd\x93\xc4\x80\x33\x71\x3d\xf8\xd9\x00\x8e\x6f\x7b\x4a\x27\xcf\x86\x27\x4f\x86\x27\xdf\x5e\x9f\x7c\x7f\xfa\xf4\xf8\xf4\xc9\xf1\xe8\xf8\xf8\xf8\x7f\x75\x26\xe8\x3a\x18\x42\x07\x61\x82\xbd\xbe\x58\xac\xf4\xb9\x1c\x4d\xf3\x4b\x88\xcf\x24\x38\x0f\xf6\xe6\xf2\xe3\x79\x2b\xb1\xa1\xbf\xea\xd1\x77\xcf\xa8\xf9\x6b\x95\x4f\xd1\x7d\xbc\x59\xfb\xa6\x6e\xb0\xd9\x3b\x2d\xc9\x14\xaf\x67\xdc\x38\x35\xf5\x18\xbd\x1a\x73\x9d\x3f\x68\x02\x3a\x7f\xd8\x04\x74\xfe\xf0\x09\x74\x44\xeb\x95\x13\x70\x4a\x6e\x91\xa9\x86\xea\xbf\xea\x85\xdc\x54\x5f\x4a\x09\x1c\xec\xe5\x75\x96\xc9\x31\x2a\x2f\x5d\x3d\xc1\xe4\xea\xab\xb0\x58\x14\xb2\x72\x62\x6c\xef\xbd\xa2\x67\xbd\xbb\xf8\x15\xa8\xb2\x38\xfe\xaf\x79\x70\x21\xd0\x6d\xf9\x3e\x77\x81\xf3\x2a\x5d\x35\x4e\x4d\x17\x44\xbb\x6b\xd7\x06\x9c\xf0\xf6\x6d\x8e\x8e\x5b\x03\xce\x46\xcd\xc7\x2a\x4d\x55\xea\xe3\xa4\xba\x2a\xe3\xea\xf6\x91\xd3\x59\x56\x8c\xa5\x53\x73\xf9\x36\x6e\x2e\x7e\xf4\x5d\x08\xae\x54\xfc\x8e\x3c\xff\xc0\x5c\xae\x17\x85\x7a\xa3\x08\x93\x28\xa0\xec\xa3\xb2\x09\x70\xe0\x6c\x88\x62\x77\x25\x62\x78\x46\xa5\xd1\x27\x75\x09\xde\xc6\x52\xb9\xc5\x48\x2a\x8a\xa4\xa2\x01\xf0\x6b\x08\x81\xd4\xaa\xe6\xd4\x00\x3c\xf2\x4a\xac\x90\x75\x65\xe6\xb2\x62\xd8\x80\x4d\x70\x80\x5a\x63\x1a\x2b\x4a\x00\x19\xd7\x55\x28\xc0\x85\xd5\xe6\xe1\xa9\x8e\x3d\xa0\xee\x65\xc7\xe1\x17\x11\x40\xd1\x41\x5d\xb8\xa6\xed\x61\x07\x14\xa7\xc3\xfe\x18\xe8\xc6\x60\x75\x5e\x0d\x4d\x39\xa4\x43\xb2\x7a\x87\x1b\x6d\xa3\x04\x2c\xda\x5f\x0f\x77\xaa\xad\x50\x1a\x16\x3c\x2a\x64\xe8\xd4\x61\x6f\x44\x38\xa7\x2c\x00\xca\x3e\x18\xe0\x81\x28\xaa\x85\xf0\x05\xfe\x68\xa5\x20\x5f\xd1\xfd\x26\xad\x48\x66\x3a\x4b\x11\x0b\x7c\xf1\x6e\x02\x28\xb4\xaa\xe4\xca\x84\x93\x48\xe8\x8b\x2a\xb1\x85\x1f\x89\x4e\x59\x30\x40\x9c\x1c\x62\x27\xa7\x37\xb9\x10\x62\x08\x9f\x38\xe5\xb1\x36\x7e\xc3\x21\xdf\xe4\x4f\x0e\x05\xd8\xb1\xf9\x8d\xe8\xf5\xfe\x0e\xba\x5d\xc0\x4f\xa3\xd1\x48\xfc\x43\x95\xc6\x2d\xc8\xdc\x94\x6a\xfd\x16\x65\xda\x56\xc3\xb9\x2c\x86\xb7\x6a\xd1\x13\x5e\xb0\xbc\xad\x00\xe8\x6a\x08\x39\x90\x39\x05\x7c\xc1\x95\x72\x0b\xd3\x7d\x0d\x96\xf9\xc3\x5c\x16\x1f\x9c\xb8\x45\xe1\xef\x2c\x43\x43\x7f\x10\x24\x2e\xb9\xdc\x56\xaa\x3e\xf2\x2a\xcf\x65\x31\x72\xcb\x0a\xe8\xc0\x95\x9c\x62\xc9\x25\xce\xf9\xa9\xa9\x42\x13\x26\xe4\xc2\x69\xc1\x73\x3e\x73\x02\x60\xff\x40\x6e\xf6\x02\x60\x16\xc7\xb0\xde\xec\xcd\x65\x71\xb3\x37\x12\x67\x99\x35\x83\x40\x51\xe2\x32\x7b\x1e\xeb\x36\xa0\xec\x46\x31\xab\x4e\x4e\x2d\x61\x57\x52\x8a\x5c\xe5\xfc\x13\x38\x5a\x18\xae\x5a\x97\x4a\x1c\xe4\x46\xe4\xca\xb2\x49\xdd\xbb\xd3\x0e\x69\x9a\x4a\x04\x96\x12\x7d\x1d\x3e\x45\x67\x3f\x86\x23\x33\x25\xce\xb8\x65\xd5\x1f\xb8\x59\x41\xfe\xae\x5b\x0c\x63\x1b\xbd\x3a\x82\x43\x16\x25\x8f\x10\x85\xe0\x38\x8e\x80\x3f\x0c\x65\xb5\x7f\x8d\x37\x39\x4b\x78\xf7\xba\xe7\x28\xa2\xaa\x9c\x07\x24\x34\x84\x87\x14\x26\x33\xd3\x05\x21\x45\x87\x3d\x84\xa5\xe9\x3f\x11\x8c\xc3\x0f\x4b\xf4\x54\x14\xc6\x5a\xd0\x2d\x70\x73\xf9\xbe\x7e\x90\x95\x99\xeb\xe4\xc3\x69\xc0\xda\x01\xf2\x81\xce\x07\x69\x43\x5a\xa2\xca\x2b\x48\xe2\x02\x0d\x83\x77\x7d\x44\x97\xf2\x0c\x7a\xa1\x2f\x33\x6e\x9c\x7b\xa3\x54\xd9\x42\x94\xaa\xc8\x64\xc2\xe9\x29\x1e\xf1\xbd\x39\x17\xea\x89\xb0\x02\x78\x2e\x4e\x97\xe3\xea\x14\x30\xba\x03\x3c\x4e\x03\x1a\xc0\xc0\x5d\x7d\x77\x7e\x9e\x1c\x8a\x0f\x56\x55\x1f\x98\x78\x5c\xa9\x2a\x00\xe3\x70\xdd\x55\x4e\xec\x80\x35\x61\x11\x16\xb7\x3e\xdc\x61\x2b\xe7\x8a\x3d\xc0\x2f\x65\x32\xa3\x0e\x91\x0a\xb7\x8f\xfd\x20\x94\x50\xc0\x1e\x1a\x9b\xed\x68\x06\x12\x00\x5a\x66\x20\xd8\x3c\xd5\x88\x76\x2c\xa3\x1b\xf4\xda\xe8\x26\x7f\x7a\x88\x54\x84\xe7\x87\xbe\x69\xda\xea\x92\xd4\xe8\xb9\x2c\x2c\x06\x79\xa2\x6c\xa0\x4b\xa1\x32\x05\x78\xc5\x7c\x55\x72\x93\x0f\x91\xca\xdc\xaa\x05\xf5\xc5\xe8\x0d\x5c\x3f\xd8\xbd\x3a\x1f\x89\x77\x88\x3a\x14\x61\x11\x8a\xba\x80\x40\x92\x92\xd2\x87\xdc\x07\x1d\x65\xe2\xbd\xeb\x3b\x8d\x14\x8b\x02\xd3\xf4\x83\x71\x04\x02\x76\x15\xa5\x84\x9b\x3c\x4e\xb1\xc4\x49\xe3\xf5\x74\x4b\xd4\x9f\x2a\xd8\xbb\xd0\x6b\x2e\x9f\xdf\x8f\xc6\xdd\xa3\xed\xdb\xc2\xe5\x83\xf3\xcd\xcc\x96\xba\x6d\xdc\xc3\x27\x4b\xef\xe1\xb4\x94\x79\x9d\xc9\xb2\xb5\xc1\xb0\xa3\x01\x70\x03\xff\x3e\xb8\x55\x8b\x21\x9e\xc7\x42\xea\xd2\x1e\xc2\x47\xa0\xc2\x36\x49\x45\xe0\x3f\xc8\xd9\x15\x56\x51\x97\x90\x98\x06\xcd\x30\x4e\xec\x00\x70\x04\x12\x27\x26\xb8\x1f\xc7\xee\x73\xb9\x2e\xea\x4c\x52\x8c\xab\x55\x85\x2c\x01\xdd\x2d\xa9\x4c\x69\x03\x52\x3d\x75\x18\x27\xac\x8e\xd5\x4c\xde\x69\x53\x97\x9e\xae\xba\xb1\xd2\xcd\xdc\x2a\x95\x81\x35\xd8\x90\xc8\xac\x3d\x39\x4b\xe4\xca\x35\x07\x69\x99\x34\x6a\x2b\x53\x04\xb8\x38\x4a\x24\x4e\x55\x62\x52\x10\xee\x2a\x55\xe0\x26\x70\xe2\xe6\x66\x88\xa4\x9d\xac\x49\xda\x07\x39\x99\x00\x28\x05\xf5\x52\xaa\xa4\x2e\xad\xbe\x53\xd9\x02\x05\x60\x7b\xaf\xab\x64\xa6\x2c\xc0\x7d\xba\xf3\x8d\x08\xfc\xfe\xeb\x61\xcb\xf4\x04\x18\xb3\x4a\x63\x5e\xe9\xb6\xb1\x47\x89\x6b\x26\xae\xfb\xa4\xe9\x78\x60\x70\xa4\x3c\xc3\x06\xfc\xd1\xd8\xd3\x3e\xc2\xaa\x45\x20\x7e\x9b\x72\xac\xd3\x54\xe5\x7d\x52\xf5\xf6\x23\xb4\xfa\xfd\x77\x5b\x89\x36\xda\x76\xb8\xce\x96\xfb\x63\xeb\xd9\xd6\xbb\x85\x78\x94\xad\xf7\x1a\x7b\xca\x3f\x3f\x8c\x6e\xc9\x5a\x6c\x1e\x11\x45\x6f\x34\xcb\xa7\x22\x05\xc6\xdc\x91\xc6\x81\xc7\xd8\xa9\x38\xa0\x0a\xdd\x96\xc8\xf0\xcd\xa4\xfd\x78\x24\xde\x48\xed\xf8\x08\x64\x7e\x00\xe2\x0d\x65\x72\x11\x10\x4e\x5d\x42\xae\xc0\x17\x8a\x14\xa3\x3d\x7d\xc8\xea\xb8\x17\xe2\xc5\xe9\x9b\xbf\xa0\x7b\xcd\xb2\x55\x07\xa2\x98\x73\x1e\xb8\x1d\x91\xa2\xc5\x17\x9b\x76\x7c\xe8\x1e\x32\xfb\xe8\xbd\xe6\x09\xe9\x5d\x06\xd2\xf4\xe1\x30\x3c\xd6\xd4\xae\x54\x79\xa7\x13\x75\xc9\xc0\x2b\xab\xa6\xd3\x6e\x2b\x66\x06\x44\x08\x1f\x2e\x0a\xb6\x13\x6a\x35\xca\xd4\x54\x26\x0b\x2a\xc4\xb4\x01\x72\x0d\xe0\x06\x53\xe5\x83\x6e\x2e\xe9\x7a\xbc\x87\x18\x9d\xd3\xd2\x18\x7c\x49\xe9\xa5\x38\xe8\xf0\xd1\x7e\x2c\x74\xf7\x28\xee\x1c\x7f\x78\xc8\x17\x8a\xde\x44\x34\x4c\xfe\x41\x81\x92\x91\x47\xdf\x5f\xbe\xc6\xa4\x20\xc9\xf5\xed\xab\x76\x51\xf7\xb1\xc2\x0c\xce\x64\x99\xb4\xe2\x54\xe4\x9e\xaf\x41\x89\x91\xe6\xd7\x68\xf0\x02\x9e\x6d\xf8\x45\xf1\xc1\xb5\xfe\x10\xe5\xac\x73\xe4\x05\xf4\xc2\xf0\x98\x27\xc3\xef\xbe\xfd\xf6\xe9\xb7\x03\x2c\x06\xe8\x64\x8c\xc3\xe6\x05\x7e\xf6\xec\x69\x03\x58\xbc\x85\x2b\x1e\x26\xd6\xef\x82\x78\xfa\xe4\xd1\x42\x81\xfb\x8a\x72\xaf\xb8\x0d\x3d\xcd\x43\x8a\x2d\x9a\x68\x7c\xdd\x77\x37\xf1\x39\xa6\x59\x5d\xbf\xbe\x72\xcd\x72\x0a\x36\xf1\xca\x24\xad\xfc\xfa\x30\xd8\x44\xfe\xa1\xce\xd3\xbe\x7c\x1f\x7e\x82\x51\x88\x17\x2f\xdf\x78\x07\xe8\xf3\x33\x31\xc6\x47\xb8\xd5\xbc\xbd\x1d\x70\xe6\x68\x24\xfb\x96\xc5\xd2\xc4\x7d\x1c\x22\x79\x11\xf5\xb9\xce\x23\x34\x22\xbb\xb0\x95\x9a\x3b\xba\x6c\x2b\x51\x1a\xe3\x74\x36\x14\xf4\xfc\xc2\x7b\xb4\xda\xee\xb1\x8d\x36\x77\xbc\xa8\x14\xa3\x6b\xe8\xbe\x4b\xc9\xa7\x56\x77\x48\x4e\x74\x21\x83\x05\x8a\x17\x54\xbc\x44\x76\xcb\x0d\x9c\x7c\x59\x66\x5e\x3f\x0f\x10\xbb\x4e\xc1\x22\x0c\x5c\x5f\xab\x1e\x8c\xe2\x20\x02\xbb\x8d\xe2\x4c\x4a\x04\x43\x27\x78\xd5\x85\xa9\xf9\x52\x00\xac\x31\x7d\xe7\xb1\x2a\xd4\x77\x08\x76\x88\x98\x6f\x2e\x97\x9b\xe4\x54\xdf\x51\xc2\x53\x46\x25\x86\x98\x7e\xd1\x0c\x07\x98\xf0\x2d\xf3\xd4\x5d\x45\x47\x85\xa0\xc8\xc4\xc1\x07\x90\xd2\xd5\xe9\xd1\xd1\xcc\xd8\xea\xd4\x5d\xf1\x23\x47\x9f\x3e\x1c\x8e\xc4\xcb\x08\xff\xc3\x4c\xc4\x87\xba\xcc\x30\xf7\x9d\x67\xbe\x64\x6d\xaf\x67\x4a\x7c\x70\xdd\x79\x22\xe2\x74\x18\xd8\x48\x50\xe6\xfd\x0e\xf1\x92\x37\x97\xfb\x77\x54\xd6\x2b\x5a\x62\x86\xf4\x23\xf8\x68\x30\x34\x40\xa0\xd7\x5c\x4f\x67\x04\x91\x67\x4d\xc6\xc0\x2a\x3e\x8d\xe1\xc5\xdb\x2b\x98\xb7\x99\x47\xa7\xd4\x62\xa9\xb5\x01\x96\x5f\x0a\x1b\xf2\xc1\xc9\x6c\x38\x52\xe8\x4b\xe8\x7c\x48\x43\x82\x8e\x24\x83\x18\x06\xba\x98\xc9\x85\xc2\x1a\x8a\xda\x64\xb0\xec\x87\x23\x9e\xba\xd3\xf0\x65\x66\xc1\xc7\x00\xf1\x61\x1c\xbc\x05\x6b\x74\x91\x29\x69\x41\xb9\x23\x79\x11\xa3\x7a\x3f\xb8\xed\xcb\xb0\x03\xb7\xd2\x27\x4f\xfe\x63\x74\x3c\x3a\x1e\x9d\x7c\x40\x9d\x98\xfa\x76\xc7\x55\xdb\xdb\x85\xa8\xf3\x4c\x59\x0b\x47\x13\xb2\x3b\x01\x62\x49\x24\x00\xd1\x69\xdc\xfa\x36\xae\x88\xc0\xc4\x0f\x58\x3a\x56\x31\x5d\x1b\x27\x88\xfa\x3b\x8c\x3f\xe3\xc2\xe6\x0a\xc9\x06\x90\x34\x28\x9f\xe6\xa1\xb3\xfc\xad\xbb\xaa\x93\x19\xd6\x65\x73\x8f\xd9\xf0\x94\x2d\xc8\xbd\x92\x9b\x7c\xe8\x4e\x95\x1c\x67\x0a\xc3\x0d\x07\x70\x1c\x94\xb4\xd0\x04\x52\xbf\xeb\xc2\x6d\x93\x14\xb9\xba\xe7\x53\xe0\x4f\x12\x1e\x50\x7f\xd4\x6e\xf6\x00\x9e\xe0\x66\xef\x77\x70\x44\xdc\x49\xa6\x47\x53\x4d\x54\x96\x9a\x9c\x1e\x1d\xdd\xec\x41\x37\x67\x82\x59\x31\x73\x46\xca\x76\xf5\xc0\xf6\x6c\x64\x94\x39\x27\xfd\xa3\xcf\x83\x2c\x33\x30\xb8\xf7\x97\xaf\x47\xe2\x3f\x4d\x0d\x6d\xf9\x88\x42\xc7\x95\x81\x58\x13\x14\xe8\xc7\xba\x2a\x65\xe9\xbb\x21\xaa\xe5\xaf\x21\x26\xd4\x40\x20\xed\x40\x48\x9e\x2d\x1b\xda\x34\x4d\xfc\xac\xaa\xd4\xbc\xe0\x4a\x22\xee\x63\x54\x73\x0a\x18\xaa\xd5\x89\x90\x75\x35\x43\xb0\xab\x9b\x3d\xf7\xe4\x94\xa3\x5d\xfe\xff\x37\x7b\x98\x2a\x5e\x85\x44\xf3\x57\xa5\x9c\xa2\x99\xed\xe0\x66\xef\x37\xa3\xd1\xe8\x66\x0f\x2d\x44\x7f\xaf\x55\xb9\x10\x85\x2c\xe5\x5c\x41\xa0\xd1\xc1\xcd\xde\xef\xf9\x39\x19\x1f\xa8\x97\x01\xa9\x33\x0f\x2e\xe5\xbb\x15\x69\xb5\xa9\xf1\x75\xca\x58\x1e\xf9\xdc\xcd\xff\xab\x96\x60\x30\x5a\xc5\xd1\xb9\x0d\x21\x38\xe9\x8f\x2a\x1d\x62\xda\x66\x4f\x3d\x5c\x92\x78\xc0\xdd\x59\x94\xe6\x0e\x70\xd9\xb0\x78\xa8\xc6\x93\x53\xda\x19\xa6\xc8\xd6\x79\xf8\xc3\x9d\x19\xc8\x1c\x72\xcb\xfc\x9f\x67\x6f\x5e\x03\x05\x66\xeb\x09\xc8\xcf\xb0\x7a\x07\xb8\x11\x67\xf6\x3c\xaf\xbe\x7b\xe6\xfe\x02\x70\x0d\x53\xda\x70\x03\x1a\xaa\x9f\x8f\x1f\x06\x43\x21\x82\x8f\xfd\x9d\x26\x44\xb0\xe3\xf4\x7f\xa7\xa7\xff\x9d\xab\xca\xe9\x69\xae\xd2\xb7\x30\x11\x6c\x43\xbf\x03\xf4\x38\xfd\x92\x0b\x71\xf0\xd6\xd3\xa3\x6e\x03\xbe\x23\xe0\x40\x1c\x84\x12\xaf\x37\x7b\x37\x7b\x02\x42\x17\x75\x4e\xaf\x51\xe8\xd8\xd5\x39\x55\x2c\x3a\xe4\x81\x42\x60\x5b\x73\x94\x34\xd0\x63\xf1\x93\x38\x11\x3f\x81\xdf\xee\x27\xf1\xbd\x88\xda\xdb\xf6\x0b\x61\x62\x71\x7f\x3f\x75\x7f\xeb\xe9\x84\xaa\x2a\x45\x4b\xb1\xb4\x5f\xdb\xd7\xb1\x6d\x14\x61\x5a\xdf\xce\x4d\x69\xe9\x30\xdc\xbe\x74\x56\x03\x87\xb1\xf7\xff\xbb\xd9\x73\x3d\xee\x0d\x6f\xf6\x96\xee\x62\x73\xd0\x8d\x49\xfd\xd4\xf9\x44\x4f\xa3\x9e\x4d\xee\x59\x0c\x8c\xaa\xe3\xcd\x0c\xd3\xc4\x4d\x7e\xf9\xb1\x30\xb9\xca\x3b\xbb\xd0\x3c\x02\xfd\x5d\x45\x9f\xfa\x51\x8b\x9f\xc4\x1b\xf7\x5f\x3f\xb8\xff\xba\x76\xff\x75\xe1\xfe\xeb\xa5\x86\x93\x89\x01\xde\x92\x14\x9b\x2b\x14\x46\xa1\xbc\x90\xae\xec\xef\xc4\x95\x52\x08\x5c\x73\x7a\x74\x54\xcc\x16\x56\x27\x76\x94\x6b\x5b\x8d\xa6\xe6\xee\x28\xa9\xeb\xa3\xf7\xae\xdd\x11\x7e\x7f\x34\xab\xe6\x59\x38\x93\xad\x91\x86\x31\xcd\x61\x03\x60\x1f\x6e\xdd\xe8\xdc\xe0\xdc\xd8\xdc\xd0\xdc\xc8\x5a\x57\xe6\xe4\xf8\xc9\x33\xf1\xdf\xc5\xc9\x8f\x1a\x6c\xad\x27\xc7\xc7\xc7\xee\xcf\xdb\xdf\x89\x73\x91\xea\x34\xdf\xaf\x44\x32\x33\x86\x38\x47\x22\x0b\x5d\xf9\x6b\x3d\x6a\x0f\xa7\xb5\xac\x78\x26\xd4\xaa\xb3\xe0\xc6\xfa\x72\x45\x03\x47\x2e\xde\x3a\x5e\x5e\x55\x9e\xcd\x93\x90\x58\xcd\x4a\xa5\x00\x7f\x22\x27\x37\xe8\xdc\x32\x88\xa8\x63\xd7\x82\x09\x0c\xd5\xf1\x66\xae\xe9\xcb\x30\x30\xb4\x23\xe4\x99\x3f\xf9\xaf\xef\x9e\x0e\x4f\x1c\x35\x98\xcb\x69\xae\xab\x3a\x55\xae\x93\x12\x8b\x44\xb3\xaf\xcd\x80\x33\x56\xe6\xe2\xa9\xe0\x48\x53\x30\xd7\xdb\x91\xc0\x51\x5b\x91\xc9\x92\x42\x1a\xa0\x75\x51\xaa\x44\x5b\x15\x74\x56\x59\x14\xe8\xf4\x2d\x4d\x0d\x09\xaa\x75\x31\x12\x07\x2f\x47\xd3\xd1\xa9\x38\x1e\x9d\xcc\x09\x5e\xc6\x3f\x74\x54\xf7\x64\x3e\x3a\x44\x93\x34\x93\x33\xce\x6e\xe5\xe2\x6b\x35\x78\xa6\xf5\x44\xdc\x7b\xcf\x72\x34\x12\x3b\x97\x80\x1c\x4d\x2b\xa2\x15\xd2\x69\x40\x0c\x90\x22\xe6\x2c\x14\xe4\x09\x74\x52\xfa\x44\x50\x2e\xaa\x51\xaa\xb9\x82\xa5\xab\xa2\x6a\xfb\x54\x0a\x02\xd6\x28\x45\x19\x25\xaa\x73\x4b\x8e\x48\x74\x57\x4d\x25\x14\xff\x50\xb9\x6b\xad\x6d\x84\xf4\x04\xe3\xf9\x83\x9a\x98\x32\xb0\x0e\xf8\xb4\x1f\x1c\x2f\x60\x51\x03\x5a\xf4\xcd\x5e\x22\x73\x93\x03\x90\x9d\xdb\xfa\x9b\x3d\x32\xda\xcf\x95\xcc\x49\xe8\xe5\xe3\x78\x44\x43\xe4\x2e\x64\xfa\xb7\x1a\xbc\x04\x75\xe1\x56\x27\x35\xf7\xb9\x38\xa0\x02\x1e\x01\x3e\x07\xf9\x61\x52\x82\xcc\x0b\xd0\xbd\xf4\x6f\x9d\x8b\x37\x6e\x50\xd6\xca\x43\xac\x80\xe1\xbe\x06\x0e\x2f\x39\x12\x6f\x0d\xed\x39\x25\xb1\x67\xc6\x82\xe3\x6a\x0c\x8f\x26\xa5\x4c\x88\x1c\x20\x69\x0d\x1e\x20\x0c\x56\x71\x4d\x09\xee\xd3\x1f\xed\x03\xb7\x85\x30\x85\x43\xe0\xfe\x74\xc8\x20\x28\x97\xfc\x70\x23\xe2\xba\x7a\x9a\xfb\x1e\x0d\x85\xbf\x90\xbc\x0d\x96\x22\x3c\xf9\x4e\xd4\x52\x53\x59\xe9\x3b\x05\x0b\xff\x12\x65\x3b\x0b\x73\x38\x19\x7d\xeb\xbb\x88\xa0\xb8\xa4\x15\x37\x7b\x27\xdf\x1e\x1f\xcf\x6f\xf6\xa8\xd9\x0f\x7a\x45\xc3\xa7\xdf\xbd\xd1\xae\xa5\xbb\xbf\x4c\x6c\xdc\x10\xfe\xde\xd8\xd0\xb7\x2f\xff\xf4\xf2\x12\x22\x9a\xa8\xfe\x7e\xb6\x68\x23\xd4\x48\x4c\x4c\x06\xf1\x16\xe4\x1d\x96\x6d\xae\x67\x98\x92\x04\xa2\xea\xcc\x64\x8a\x9e\x33\x8c\xa8\xfa\xa8\x4a\x77\xf7\x46\x38\x88\x7c\x18\x4e\x0c\x85\x86\x60\xa5\x98\xca\xfd\x37\x1c\x7c\x58\x5a\x93\x4f\x29\x8e\x65\x01\xe2\xe4\xbd\xca\xf0\x88\x39\xb2\xe2\x68\x64\x28\x28\x37\x54\x1c\x61\x94\x93\x9f\xba\x79\x28\x47\xe2\xe0\xca\x70\x29\x3c\x77\x1f\x9a\x8f\x07\x78\xfa\x1c\x8d\x4d\xf5\x64\x02\xe4\x14\xc3\x64\x42\xbe\x95\x5b\x17\xb8\xe9\xac\xd1\x68\x6c\xac\x13\x02\x38\xa2\x6b\x66\x79\x73\x03\x92\xd3\x7d\xa9\x61\xd5\x40\x93\x84\x7a\x38\xee\xb6\x3a\xad\x57\x66\x62\x26\xf3\x14\x44\x3e\x88\x5e\x27\x32\x32\x33\x45\x08\xd9\x92\x34\xd3\x44\xba\x4f\x68\x77\x40\x9c\x38\x6e\x4a\xf4\x6e\x3b\x2d\x11\x65\x7c\x90\x45\x69\xed\x7d\xb3\x76\xba\x7d\xb0\x04\xae\x31\x8e\xad\x10\x93\x21\xc8\xf7\x6c\x6e\xea\xbc\x5a\x25\x29\x47\xcd\x9a\x76\x6c\x1a\xa8\xbf\x9d\x79\x3d\x57\xa5\xac\xc0\xab\x91\xc6\x5a\x10\x20\xc6\xf0\xf5\xe3\x98\xc1\x89\xb4\x9e\x5b\x98\x42\x95\x54\x14\xd9\xdd\xf2\x7c\x32\x7a\xa1\x12\x06\x83\xa8\x79\x0d\xa9\x6c\x60\x7c\x9e\xa5\xc5\x6c\xfb\x75\xa0\x86\xd0\x0d\x54\xd8\x95\x59\x8f\xc1\xd9\x63\xea\xac\x35\x47\x0e\xa8\xab\x4d\xa2\xa7\x37\x30\x5d\xae\xa8\xc5\x7f\x76\x71\xfe\x03\x97\x34\x5d\xb6\x35\xdc\xa6\x69\x8b\xc4\xcc\x37\xe0\x15\x1c\x4b\xe5\x6b\x0d\xf8\xaa\x04\x6e\xdf\x26\xaa\x2c\x9b\x38\xcd\x12\xcb\xa3\x6e\x08\x3e\xef\xcb\x75\x75\x41\xe7\x7d\x88\x64\xef\xa0\xff\xd4\xaa\x26\x1b\x41\x38\xab\x94\x21\x41\x98\xee\xf4\xe8\x63\xb9\x0f\x24\xbd\x22\x73\x0e\x19\x99\xb0\x2c\x6d\x05\xf0\xd4\xd3\x1c\xe8\x27\xe3\x12\x93\x12\x9e\xc9\x4a\x41\x81\x04\x32\x0f\x51\x70\x18\xc7\x63\x94\x0a\xc2\x33\xea\x3c\xea\x01\xcf\x60\x2f\x3c\xe2\x54\x57\xe4\xf4\x38\x4a\xcc\x7c\xee\x04\xd1\xc5\x11\xd4\x96\xd0\xe3\xda\xdd\xed\xa3\x54\xdd\xa9\xec\xc8\xea\xe9\x50\x96\xc9\x4c\x57\x0a\x82\xde\x18\xe8\xfe\xce\x69\xfc\x26\xb7\xa3\x79\xfa\x9b\x18\xd4\xb4\x73\xcb\xfb\xcb\xed\x73\x55\x7a\xef\x3e\x42\xe7\xa3\x5f\x31\x8e\x28\x04\x94\xe1\x08\xe2\x29\xc4\xa1\x84\x0b\x1d\xd6\x12\x44\xb4\x7c\xc2\xf8\xd7\x5e\xc9\xf3\xc0\x46\x68\xa8\x03\xcd\xd7\xd6\xe3\xb9\x63\xbb\x11\x66\xd1\x48\x3c\x47\x1b\xda\x58\x85\xa8\xae\xf3\x3c\xd4\xf7\x7f\xf4\x95\x04\x6c\x8e\xa1\x5b\xb2\xde\xb5\x7c\x98\x7b\xa9\x7d\x21\x22\x1f\x0c\xdf\xa0\xa5\x47\xbd\xdd\xa2\x0d\x57\x1e\xee\x20\xe5\xa7\x85\xf8\x10\x2e\xa2\x56\x94\x66\x2c\xc7\xd9\xc2\x97\x66\x27\xe4\x67\x2e\xf1\xb5\xde\xf0\xec\x69\x4c\xb0\x36\x3b\x1a\x33\xba\x3b\x19\x01\xf1\xa0\xb1\xbd\x32\xe5\x0b\xae\xd0\xe3\x81\xaf\x4b\xca\xc2\xfd\xc3\x82\x5c\x1f\xe7\x2f\x2e\xfb\x2a\x47\x40\xc8\x97\x99\xf0\xa9\x80\xa4\x55\x06\xd6\x2b\x7d\xc6\x6a\x45\x12\x06\x15\x46\xc5\xe3\x85\xeb\xcb\x21\x44\xee\xad\x99\xca\x0a\x5f\x3b\xbf\x84\x20\x24\xb6\xda\x12\x63\x9d\x43\x82\xaf\xaa\xee\x4d\x79\x3b\x54\x8e\x7b\xc3\x67\xef\xe5\x22\x48\x70\xe2\x39\xf5\xe0\xd8\x06\x0b\xcf\xb2\x70\x74\xaa\xd4\x90\xee\xd5\x1c\x9c\x84\x10\x67\x04\x6f\x80\xe1\x93\x84\xb5\xc0\xba\x7e\x70\x84\xc1\xc2\x61\x26\x21\x48\x10\x1e\x29\x3b\xf0\xc3\x8d\x9c\x03\x68\x89\xcf\xa7\x8a\x4b\x03\xba\x29\xbb\xae\x51\x1c\xf5\xf5\x04\x10\x6a\x0d\x22\xc6\x30\x30\x15\x16\x99\x16\x0b\x82\xbd\xf3\xdb\x28\xb0\x9f\x96\xd8\xcd\x8a\x06\xf6\x2a\x98\x13\x4f\x29\x44\x18\x58\x6b\x0b\x58\xd3\x93\xbc\xf3\x0b\x9c\xa1\xfb\xe4\x80\x63\xdf\xa9\x5b\x58\x6e\x06\xaf\xc3\x11\xa2\x55\xba\xd9\x01\x13\x0b\x91\x19\x73\x6b\x85\xac\xc4\xff\x1c\xbe\x32\xe5\xbd\x2c\x53\x95\xba\x7f\x71\xf1\x04\x53\x8a\xff\x39\xbc\x54\x32\x1b\x9e\x17\xd1\x6f\x44\x2e\x46\x97\x6a\x6e\x2a\x48\xf5\xa6\xc2\xd7\xb2\xc2\x92\x81\x87\xee\x20\x4c\x55\x63\xca\xe7\x17\x9f\x51\xcc\x62\xc5\x2d\xb8\x5a\x76\xd2\x21\x9e\x77\x83\x9a\x94\x5c\x0d\x2b\xd4\x30\xf4\x7c\x97\x0b\xf1\xb4\xa9\xc8\x16\x87\xbf\xfc\x12\xaf\x31\xca\xae\x10\x3e\x96\xf6\xb9\xa1\xf0\xb2\x7c\x49\xd7\x18\x71\xbb\xf2\xcf\x6b\x6d\x57\x8a\xa7\x71\xbb\x26\xca\x19\x3f\x19\xa0\x80\x9d\x99\x7b\x7f\x4d\x2b\xe3\xcb\x91\x79\xba\x2b\x2b\x01\x23\x58\x27\xfc\xc0\x56\xee\x64\x9e\xc7\x97\x79\x68\xa1\xfb\x4b\xfa\xdb\xfe\xbd\x7e\x9c\x2b\xe6\x65\xf1\x9f\x77\xa2\xd8\x16\x45\xb1\x4f\x26\x4f\x7e\x3f\x1e\x42\x4d\x2e\xa3\xdc\xba\x15\xc4\xe4\xd2\xc3\x84\x46\x49\x57\x41\x24\x94\x61\xf3\xc0\x34\x47\x45\xd8\xd1\x00\xe7\x23\x87\xd2\x4d\xcb\x77\xe9\x7c\x5a\x67\xb2\x7c\x8b\x7f\x86\xf7\xf7\xe8\x9c\x01\xff\x19\xf7\x50\x9b\x44\x56\x6a\x6a\xca\x3e\x98\xbd\xe8\x59\xf3\x92\x78\x71\x56\xa5\xa2\x55\x62\xc3\x4f\x6a\xac\x9c\xcc\x02\xa4\x03\x5c\xe4\x62\x5f\x66\xd9\xfe\xe1\x83\x52\x60\xa6\xac\xb7\xf6\xdc\x5b\x96\x63\x83\xe8\x8b\x3f\xd3\xf0\x02\xfe\xaa\x78\x09\x49\x6a\x7a\x5e\x64\xbc\x07\x8d\x96\xa4\xf2\x62\x35\x24\x1a\x3c\x96\xcf\x7b\x05\xf6\xbd\x80\xb3\x4b\x15\xcb\x7d\xb8\xbd\x8c\x6a\x4e\x12\x29\x9c\xc4\x22\x14\xe0\x83\xde\xec\xf5\xca\xfc\xfd\x97\xff\x96\x2e\x3f\x64\x6f\xb9\x7f\x73\xd0\xa2\x1f\x19\xad\xe5\x2b\x63\xf6\x3b\x0d\xa3\x23\xb5\x3f\x31\x26\x5e\xec\x87\x28\x2d\x45\x56\x97\x32\x6b\xe8\x2e\x7e\x35\x57\x86\xc4\xf5\x4c\x28\x3c\x8b\xb0\x74\x75\xe3\xf4\x37\x8e\xbb\x93\xe9\x72\x53\x2d\x29\x04\x33\x33\x65\xb5\xa4\xac\x68\x78\xd6\x3c\xaa\xb6\x9e\x4e\x31\xf4\x1c\x5a\x50\x49\xd0\xe5\xd3\xda\xe0\x54\x36\xee\x5a\x77\x20\xd1\x53\xaf\x6b\xd1\x6f\xfd\x6b\x2a\x28\xdc\x1e\xc1\x5b\x22\xc9\x02\x6c\x81\x7e\x3f\x00\xfb\x99\x3b\x32\x85\xfc\x7b\xad\xb2\x05\xa9\x00\xad\x6f\x82\x87\x03\x2c\xe6\x09\xe6\xa1\x95\xca\x89\x91\x98\x24\x00\xc0\xc6\x90\x39\x43\x49\x11\x50\x8f\xdc\xf5\x8e\xd5\xc3\xf9\x13\x80\x99\x4a\x9f\x0e\x40\xf3\x81\x75\xdc\xd6\x63\x95\x54\x99\x78\xfe\xfa\x5c\x78\xdc\xc9\x25\x40\xfb\xa0\x6a\x92\xe0\xf2\x47\x69\x7b\xe2\x1b\x21\x0a\x47\xda\x19\xb1\x3b\x0e\x98\x6c\x2a\xa9\x83\x86\xd2\xdb\xa4\x37\xda\xb2\x00\x83\x46\x59\x70\x67\xdc\x97\xba\xaa\x54\xce\xf2\x0b\x24\x05\x43\xb9\xcf\x91\xf8\x53\x23\xe1\x2a\x4a\x16\xc1\xa5\x85\x0a\xd9\x5c\x0c\x0d\x30\xf9\xa1\xf4\x98\xae\x7c\xe1\x6c\x00\xbf\xca\x9b\x39\xd2\x10\x12\x17\x74\x50\x99\x53\xd5\x6e\x06\xeb\x63\x49\x09\xc1\x95\x21\x00\x23\x54\xe4\x6c\xf8\x8c\x5a\xd5\x47\x0b\x13\xe5\xcd\x34\xe3\xe4\x40\xe1\x23\xe5\xeb\xaa\xb3\xd2\x0d\x9c\x40\xc8\xf2\x45\x24\x6a\x1a\x24\x7e\x80\x9d\x48\x52\x47\xf1\x9e\xea\x4e\xe5\xae\x5f\x5d\x89\x69\x29\xd3\xda\x5d\xdd\x65\xc5\xf6\xc7\xfd\x5a\xcd\xb8\x73\x19\x59\x9d\x71\x87\x47\x60\x8b\x03\xcc\x2a\xce\x93\xac\x4e\x95\x75\xba\xda\x00\x5e\x18\x88\x7b\xa7\x96\x0e\x08\xab\x70\x40\x82\xc7\x40\x14\xf8\x73\xaa\x32\xe5\xfe\xc4\xff\x4d\x4c\x96\x61\x74\xe4\x80\xd0\x7e\xcd\xc7\xc5\xc3\xb8\xcd\xdd\x32\xa1\xfb\xae\x69\x74\xe9\x35\x78\xae\xe5\x39\xed\xe2\x69\x4b\xb8\xce\x67\x33\x9d\xbb\x13\x71\x80\x65\x5c\xa9\x54\x80\x14\x14\x08\xd3\x1d\x42\x19\xc6\xbc\x4f\xaa\xe5\x61\x2f\xbf\xfa\x6c\x0b\x34\x0b\x43\x1b\x28\x61\x71\xd3\x8e\x6c\x7e\xe9\x0b\x51\xa0\xa0\xc4\xb1\xa8\x58\xee\xa0\x63\x73\x8b\xaa\x66\xc5\x9a\xb4\x64\x99\x2c\x21\x51\xc0\x9d\x18\x4f\x63\x28\x9a\xab\xc1\x76\x1f\x24\x93\x4d\x23\xa5\x17\x1e\xb1\x6e\xb2\x53\xf5\xbe\x88\xaa\xb7\x74\x49\xe3\xa7\x7c\x9b\x3b\x07\x00\x57\xb3\xe7\x20\x4e\x4c\x5f\xbc\xda\x4e\x8f\xdb\xa6\x49\x7d\x45\xa1\xbf\x70\x97\x3b\x4e\xaa\xee\x75\x0f\x77\x18\x9d\xc5\xbd\x97\x77\xbb\x8a\xbd\x57\x0b\x3f\xc3\x5c\x16\x77\xf3\x10\x95\x34\xae\xaf\xbe\x82\xb4\xb6\xca\xac\x37\x4c\x8d\xa1\xf6\xfe\x9d\xd4\x19\x46\xd8\x3e\xc4\xdc\xc5\x7e\x06\xba\x56\xa5\x31\x15\x06\xb4\xd2\xde\x60\x66\x8f\x63\x4f\x04\x21\xbc\xd2\xcd\xca\xf3\x59\xe9\x3e\xd8\x91\xd3\x9d\xb7\xf0\xd7\x43\xda\x76\x7e\xb0\x9d\x1f\x6c\xe7\x07\x7b\x90\x1f\x4c\x16\x7a\x15\x83\x7a\x88\xd9\xe6\x93\x59\xf2\x16\x3c\x50\xcf\x4d\x8e\x91\xfa\xab\xd8\xb3\x6f\x14\xc4\x9b\x54\x55\x52\x67\x58\x52\xc7\xe4\x4a\x48\xa7\xb5\x54\xa1\xfc\x76\x09\x4a\xa0\xad\xdc\xe5\x63\xb6\xe5\x38\xf2\x65\xd7\xac\xd5\xcb\x65\xe1\x99\xaf\x81\x35\xd8\xcb\xa4\xad\xae\x4b\x99\x5b\x18\xc7\xb5\x06\x53\x72\xa9\xa4\x05\x35\x66\xae\xac\x95\xd3\x9e\xa0\xa7\x9e\xd7\x7a\x4a\xb6\xb6\xdb\xb0\xa0\xe0\x9e\x20\xc6\x28\xa9\xc5\x9c\xd4\xe0\x5b\xb3\xd1\xc9\x2d\x01\x99\xaf\xa0\x28\x15\xa0\x8c\x10\xa1\x0b\x09\xa6\x08\x92\x32\xa3\x1a\x0a\xd9\x02\x63\xe9\xfc\xda\x82\xe1\x25\x1d\x09\x84\x33\x43\xf2\xe9\xb8\x06\xe0\x6c\x50\x72\x5e\x28\x8a\x00\xe3\xf2\x3d\xba\xb5\x45\x83\x09\x75\x03\x4c\x30\x49\x54\x51\xf1\x71\xfc\xf4\x4b\x03\xeb\xf6\x73\x58\xe6\xce\x12\xd2\x03\x64\xbc\xb3\x7a\x2e\x73\x47\x5c\x52\xf7\x65\xe1\x9f\xa1\x8d\xd5\x0d\x9f\x0f\x8f\x1c\x73\xf5\xc8\xb0\xa2\xa3\x46\xd0\xb2\xc7\x71\x5b\x51\xa1\xd4\x8c\x11\xa2\xe7\x07\x95\x53\x84\x5d\x77\x80\xdd\x36\x71\x98\x9f\x1b\xc1\x88\x51\xee\x46\xd3\xd0\x26\x10\x62\xbf\x4b\xf7\xd2\x02\x7e\xd8\x58\x5a\x42\x05\x42\xa2\x0c\x99\x61\x39\x68\xff\x93\xfe\xce\xb4\xe5\x7b\x91\x2d\xc4\xc9\x13\x0c\x0c\x85\x4f\x53\xcd\x4a\xff\x11\xfb\x97\x8f\x7f\x1d\xf5\x0c\x59\x5b\xf1\xfd\xa0\x35\x1e\x27\xb8\xd4\x70\xf1\x20\xdf\x15\x42\x92\x4b\x85\xb7\xd1\xd7\x56\xeb\xdc\x46\xe5\xc7\xbb\x36\x41\x19\x31\x52\xe9\xaa\xf5\x68\x3e\xee\xf7\xb8\x14\x6f\x51\x9a\x69\x29\xe7\x80\x66\x18\xa5\x7b\xc5\xfb\x8f\xfa\x10\xbc\xe8\xab\x3d\xf2\x84\xf6\x2d\x5d\xbb\xe8\x44\x5c\x94\x26\xad\x13\x27\x13\x70\x34\xea\x44\x27\xf1\x7d\x84\x3a\x45\xee\xc8\xa0\xf8\x2c\xd4\x47\x37\x7f\x2f\xa8\x12\xf2\xa2\xcc\x75\x3e\xb5\x21\xa1\x16\xee\xcb\xa0\xe1\xe2\xaa\x02\x06\x9c\x04\x3b\x35\xd8\xa9\x4a\x95\x0a\x29\xa6\xb5\x2c\x65\x5e\x29\x95\x82\x9a\x00\x8c\x1d\xa5\xcb\x38\x85\xdc\xcb\x74\x1e\x9c\x30\x32\x66\xce\xb1\x44\xaa\xcf\x2e\x5a\x51\xfb\xb5\xc7\x7a\x4f\xe6\xf1\x49\x73\xc1\x06\x9c\xb7\x7a\x0d\xc8\x87\x80\x2f\x33\xe0\xb2\x0a\xbd\x1f\xe8\x87\x8b\xe2\xd8\xfc\xe8\x68\x45\x12\xaa\xc0\x52\xca\x13\x63\x46\x24\x7e\x8c\x12\x33\x3f\x0a\x12\xec\x16\x3d\x9f\x40\x6e\x36\xe7\x60\x60\x82\x7d\x07\xd3\x58\x5d\xce\x32\x6e\xc8\x04\x86\x32\xdd\x08\x3b\x09\xcc\xb9\x24\x01\x39\x8a\x1a\xca\x05\xae\x4e\x61\xdf\x29\x77\x5b\x56\xee\xd2\x72\x71\x59\xf7\x2c\x26\xa4\x9f\xd0\xfa\x0c\x1a\x25\x30\x65\x25\xe6\x26\xf5\xf5\xb9\x6c\x9c\x92\xed\xf6\xd9\x2d\xb7\x05\xc5\xeb\xcc\x9d\x6c\x44\x7a\x00\x68\xa6\x68\xea\xf8\x59\x91\xea\x52\x25\x95\xbe\xf3\x75\x9b\x2d\x54\x51\x8a\x4a\x37\x63\xbe\x87\x45\xaf\x49\x1e\xe0\xd3\x8a\xd2\x24\xca\x02\x8f\xf6\x76\x1f\x94\x7e\x05\xd4\x29\x8c\x88\xcb\xa9\x18\x8a\xb3\x2c\x3b\x85\x4c\xe5\xb4\x5c\x40\x86\xb2\xad\xe4\x54\x85\x04\x0f\xea\x2e\x06\xe3\xd8\xc0\x59\x00\xb4\xe6\x8d\xcc\xa5\x23\xe6\xdd\xba\x2c\xd1\x53\x64\xd8\x60\xa6\x92\x16\x40\xf6\x1d\xd1\xf4\x10\x0e\x80\x7d\xe6\x16\x09\xb1\xc9\xbc\x50\x32\x97\xb7\x44\xc6\xad\x2f\xc6\x19\xd3\x43\xf6\x5c\x51\x0e\x89\x04\x90\xf7\x93\x27\xbf\x8d\x91\xfe\x9d\xb6\x84\xe7\x10\xb4\x21\x62\x20\xa2\x28\x75\x0e\x12\x4b\xd4\xb6\x5d\xe1\xc4\x9f\x46\xc0\x94\x87\x6a\x6b\x8e\x2a\xd4\xb9\x4e\x4c\xaa\x8e\x7e\x73\x6e\x2f\x5c\x2f\x3b\x83\xe8\x17\x0e\x6c\x79\x88\xdf\xe5\x05\x78\xc6\x36\xa0\xda\x8d\x86\xfd\x54\x1b\xbc\x6c\x3b\xaa\xbd\xa3\xda\xbf\x6a\xaa\x3d\x2d\x65\xa2\x2e\x54\xa9\x4d\x7a\xa5\x9c\x10\xd6\x23\x02\x3a\x12\xeb\xcb\x62\xe8\x5c\x58\x6c\x28\xc6\x98\x05\x59\x05\x7c\xef\x20\x92\xa2\x0f\x3a\x6d\x47\x15\xe4\x26\x1f\x72\x42\x1f\xe3\x4c\xc7\x34\x1c\x30\xa5\xc3\x56\x61\x2f\x42\xcf\xe7\x2a\x75\x5c\x22\x5b\x04\xd4\x6d\x1f\x62\x90\xeb\x0c\xd5\x13\x46\xc6\x84\x39\xb9\x5d\xd4\x26\xc4\x0b\x05\x00\x45\x10\x39\x63\xe8\x9e\x26\xb2\x92\x04\x23\x1d\x4d\x88\x3e\x32\x69\xe2\x44\x12\xf6\x35\x26\x70\xf6\x8c\x71\x33\xe5\x66\xc7\x14\xb6\x67\x4a\x36\x65\x31\x93\x39\x33\x86\xaa\xe7\x10\xbf\x70\xab\x92\x40\xed\x36\x51\x20\x3c\x0c\x9b\x50\x2f\x4a\x53\xc8\x29\x1c\xef\x0b\x93\xe9\x64\x31\x88\x34\x35\x7f\x52\x52\xdf\x81\xbb\x03\x27\xa3\xff\x18\x89\x2b\x3c\xee\x78\xf6\xe8\xd3\xb4\x0b\x16\xf2\x5a\x61\x54\xb0\x56\x13\x80\xdc\x3b\x9a\xa0\x9e\x54\x01\xb0\x03\x3e\xbe\xd9\x13\x13\x9d\x43\x4a\x6a\x19\x25\xfe\x62\x26\xe5\x11\x87\xc2\xf8\x1d\xc3\xee\xf7\x6d\x78\xc9\x52\x70\x1e\x01\x34\x45\x43\x37\x65\x77\x6e\xcc\xcc\xac\xaa\xd0\x16\x00\xdb\x6a\xaa\x59\x7f\x84\x99\x9b\xb3\x37\x10\x74\x57\xf5\x0d\xdd\xeb\x49\x9d\x4d\x74\x96\x39\x49\x09\x89\x82\x24\xfe\x48\x16\x08\x59\x96\xee\xea\x99\xba\x82\xb5\x70\xdf\x64\x33\xfa\x40\x48\xf1\xec\xf8\x7b\xf1\xdc\xe4\x93\x4c\x27\x15\x5b\xb4\x42\xf2\x6a\x55\x97\x39\xba\x29\x3f\xdd\x98\x74\xd1\x98\x07\x15\xd3\x68\x2c\x4c\x2f\x03\x21\xfc\xff\x54\xcc\xcc\xbd\x98\xca\x72\x2c\xa7\x4e\x09\xe6\xc8\x9a\x40\x7c\x55\x89\x89\xb7\x4b\xb6\xe1\x5d\xeb\x7c\x2e\xdf\x05\x20\x86\x4c\xc9\x0a\xdc\x32\x6d\x21\x89\x3f\x0d\xc1\x4e\xea\xa3\x46\x58\xf7\x70\x74\xac\xaa\xbc\xf3\x82\xed\x40\xd1\x19\xe1\xe4\x44\x26\x19\x43\x6f\xd1\x68\x7e\x6c\x24\xce\xbc\xfd\xae\xc1\x81\xf6\x71\x0e\xfb\x62\x48\xe7\xba\x79\xee\xed\xef\xc4\xfe\x1f\x64\x72\x3b\x05\x40\x00\xd7\x0a\x1d\xa5\x10\x51\xd0\x5c\x38\x03\x40\x55\x44\x37\x9b\x9d\xf0\x0c\xc6\xbe\xa7\xdf\x89\xfd\x57\xa6\x54\x51\xb7\x22\x91\x36\x91\x29\xa6\x59\xc3\xfa\x00\x47\xc7\xfe\x2c\xb2\xc8\x4e\x87\x13\xdf\xc7\x36\x6d\x06\xcd\x53\xb5\xb1\xf1\x80\xab\x50\xad\x94\x40\xeb\x32\x2a\x2f\x7f\x5f\xca\xa2\x00\x08\x38\x37\x05\x2c\x68\xe5\x5b\xa0\x9b\x99\xe2\x79\xac\x0f\x73\x8c\xd0\x72\x2a\x03\x20\x39\x70\x08\xfe\xc7\xd5\xbb\xb7\x40\xbc\x0b\x59\x56\x3a\xa9\x01\x54\x5d\xfb\xe6\x90\xf6\x6b\x88\xf9\x58\xf6\x61\x53\x82\x30\x97\x4e\x98\xcb\x02\x6b\x29\xe8\x5c\xfc\xcd\x6e\x29\x7d\x3a\xac\xcf\xcb\x8f\x6e\x26\x1b\x88\xe9\x8d\x86\x6c\x3f\x47\xd4\x25\x43\x3f\x32\xae\x1d\x83\xb3\x01\xdf\x9c\xaa\x0a\x00\xb7\x1c\xe7\x67\xaa\x3e\x12\x17\x99\xcc\x73\xaa\xbe\x00\x74\x57\x66\x48\xea\x4f\x7e\xbb\xce\x71\xa0\x60\x20\x7b\x50\xc5\x35\xa9\x76\x7e\xf8\x47\x17\xfa\x71\x9d\xbb\xd8\xaa\x81\x23\xe3\x96\x20\x06\x89\x74\x4b\x83\x88\x7b\xfc\xfb\x5c\x6a\x32\x1e\x13\x48\x58\x20\x88\x04\xef\x0d\x90\xe8\xfb\x6f\x39\x4e\x66\xff\x53\x0e\x4b\xa3\x5a\x6e\x3f\xb2\xa8\x1f\xb2\x97\x69\xc7\x3c\x78\x70\xcb\xe0\x19\x87\x0b\x59\x78\xe8\x71\x74\xfd\x21\x68\x99\xbb\x9b\x41\x3c\x5d\x7c\xe6\x30\x77\x52\xe9\xd7\x61\xaa\x78\x05\x1b\xfd\xa7\x93\x55\xe4\x8f\xdb\x60\x04\x37\xec\x8e\x02\xa7\x0c\xd7\x6a\xca\xb1\x64\xa1\x8c\x6a\xc2\x10\xd0\xff\x75\xa9\xd5\xc0\xa3\xa8\xa1\x72\x82\x08\x2b\x32\x99\x39\xda\x1e\xd7\x3f\x12\xfb\xa3\xfd\xee\x5e\x53\x28\x76\x65\x55\x36\x89\xd0\x74\x08\x44\x04\x2a\x55\x98\xc8\x95\xe6\x24\x9d\x18\x8f\xb9\xd1\x9f\x74\xfb\x3b\xf4\xe2\x92\x53\x58\x29\x86\x01\x1b\x43\xcf\x58\x05\x29\xaa\x8b\x64\x1d\x5f\xc7\x02\x08\x73\x59\xd9\x53\xb1\x3f\x39\x25\x1c\x2e\x39\x47\x44\x2e\xb5\xef\x58\x98\x2a\x3d\x34\x99\x7f\xd0\xce\x48\x97\x1e\x06\x53\xf0\x7a\xc1\x80\x61\x2d\xdc\x6f\x6e\x46\xfb\x77\xf4\x01\x38\xff\xbd\x5f\x88\x9e\xf0\x27\x80\x00\x01\xa3\xa4\xa1\x7a\x27\x11\x7e\xd8\x17\xc4\x11\xfb\x9a\xfa\x87\x92\x21\xbd\xfd\x47\x4f\x30\x0e\x1e\xfd\x55\xd8\x13\x74\xa2\x7d\x11\x90\xfd\x5b\xea\xce\x31\xeb\xde\xde\xc2\x03\xbc\xde\x14\x65\x13\x0f\x6a\xdf\xc2\x1a\x30\xe5\x01\xb6\xa1\x4b\x81\x75\xd8\x58\x44\x3c\x77\x5f\xbf\x85\x50\x96\xc2\x36\x36\x1e\x0f\xa9\x2f\x15\xe4\x0f\x0e\x90\x30\xf7\x46\xe4\x12\x45\x5c\xa7\x2a\xa0\x43\x57\x1e\xa6\x0f\xd7\x30\xc0\xcd\xb0\x65\x56\xe7\xc2\xea\xa9\xe5\x2b\xed\x0f\x7a\x3a\x84\xb2\x29\xc3\x54\x4f\x26\x1d\xe6\xfd\x59\x37\xf3\x07\xb5\x89\x68\x12\x5a\x05\x7c\x01\x12\x41\x1e\x22\xa0\xec\xcc\x89\xbb\x08\xbf\x5f\x2b\x03\x0c\xc1\xcb\x4b\x4f\x68\xab\x81\xbb\xf1\x16\xb0\xcd\x72\x5b\x95\x12\x30\xb2\x9c\x7e\x23\xab\xb0\xa6\x21\x26\x8a\x97\x22\x28\xd3\x25\x9b\x4a\xdc\x12\x2b\x3f\xe3\x50\x48\xc6\x4d\x3a\x35\x89\x3d\xf2\xc0\xd7\x47\x10\xdb\x32\x94\x85\xe6\xf9\x39\xed\xd7\x1e\xf9\x43\x32\xf4\x1f\x9c\x00\xb6\x1a\x04\x91\x00\x59\x8a\xad\x86\x75\x6e\x55\xb5\x6d\x19\x00\x32\x71\x7f\xa4\xf3\xb8\x94\xd0\x70\xa3\x28\xad\x56\x8a\x1f\x7c\x10\xbf\x14\x3f\x42\x6d\xc5\x46\x85\xc6\x89\x81\x34\x5b\x8f\x75\x22\x7c\x74\x64\x6d\xd5\xa4\x06\xd4\x2f\x5f\x9e\x8a\x02\x86\x60\x5d\x44\x5a\x63\xdd\x63\x63\x6e\xeb\x22\xd8\xa0\x11\xc8\x6b\x26\xef\xb0\x48\x61\x59\x69\x40\x48\x43\xd3\x39\x9c\x92\x4d\x52\x44\x38\x37\xb7\xa3\x3f\xf9\xbc\xd7\xa5\xd7\x75\xfb\x0b\xbf\x49\x56\x73\xa3\xe1\xd2\x0d\x08\x39\x3a\xbf\x92\x4d\xf0\xc5\x52\x1f\xb0\x11\x71\x81\xd5\xed\x6f\x46\x44\x41\x56\xee\x05\x13\x92\x46\x46\xc4\x0d\x0e\xfb\x66\xcf\x5b\xc1\x6e\x38\xb4\xf2\x66\x8f\x4d\x1c\x28\xcf\x64\x8b\x10\x3d\xe4\x0b\x4b\x6d\x94\xde\x14\x50\xbb\x1e\xb2\x6a\x51\x8a\xdd\xa3\x2d\x5a\x03\x66\xe4\x73\x16\xf0\xc8\x2f\x1a\x2c\x64\xb4\x88\xcc\x15\x41\x08\xf5\xe7\xf9\x9c\xfc\xf6\x90\x73\x87\x92\x19\xd4\x7a\x55\xaa\xe0\xb2\x6e\x9d\x7a\x15\x9b\xe4\x8f\xad\x5e\xe7\xcd\x92\x9d\x9a\x18\x04\x67\x17\xe7\x3d\x79\x4f\xc1\x76\x38\xef\x2e\xc1\x92\xc4\xcf\xd5\x09\x93\xcd\xaf\xf6\x7d\xc7\x4c\xe2\x75\x6d\x44\xad\x5b\x2e\x37\xea\x93\x4f\x20\x86\x11\x4a\x7e\x63\x8c\x5a\xa6\x2b\x2f\x89\xc4\xbb\xb9\xf5\x04\xc6\xb8\xf3\x8d\x18\x54\xd4\x56\xd4\xb9\x9c\x8f\xf5\xb4\x36\xb5\x6d\x5e\x37\x09\x99\xfb\x23\xe1\x0e\x8e\xa3\x92\xf9\x7e\x25\x64\x6e\xf2\xc5\x9c\x9a\x62\x4a\x6c\x63\x6a\xa0\x6b\xdc\x19\x1d\x55\x33\x16\x89\xf1\x14\x35\xea\x09\x31\x20\xfb\xdf\x4d\x6a\x5b\x99\x39\xdb\x40\x33\xac\xa9\xf1\x90\x2b\xbf\x35\xc6\xf5\x65\x48\xc2\xc6\xbc\xad\xd5\x7e\xd5\xde\x45\xc9\xbe\xbf\xc6\xfd\xdb\x32\xcf\x7b\xbc\x7d\x24\xac\xee\xec\xa5\x13\xc4\x57\x6d\x60\xa3\x21\x60\xb2\x5a\xcc\x20\x1f\xe1\x2f\x5e\x0f\x5c\xb3\x56\xd7\x18\x15\x8f\x55\xcb\xbb\xcb\x43\xbf\x77\x3e\xff\x8e\x6b\x7e\x9f\xde\xe4\xe2\x1b\x71\x3e\x81\x22\xe8\x8e\x96\x9d\x61\xc5\xf2\x52\xbc\x81\x28\x0c\x95\x62\x52\x49\xae\xee\x9b\xd1\xc2\xbe\x5a\x69\xf3\x75\x0c\xce\xa1\x97\x7a\x5e\x88\x7d\xf1\xec\x8f\x64\x6f\x64\xa7\xb3\x3f\x18\x73\x3b\x97\xe5\xed\x69\xdc\xc1\x01\xc7\x29\x23\x43\x83\x88\x81\xb1\x02\x43\x14\xa4\xe3\xa4\x87\x68\x44\x81\x3a\x99\x10\x49\x76\xd9\x52\x64\x3c\x4e\x81\x55\xd5\x48\xbc\xcb\x85\xad\xa1\xf2\x80\x13\xeb\x4a\x65\x2b\xb2\x72\x40\x77\x04\x62\x0d\x9d\x8d\x69\x38\xa2\xa5\x19\x71\xfe\x8f\xeb\x32\x0a\x09\x86\x1a\x93\x15\x98\x0b\x4a\x55\x28\x59\x01\x48\x01\xd6\x1f\x05\x4c\x70\x0d\x85\x33\x16\xf8\xb3\xed\xcc\xfe\x65\x59\x9a\xf2\x54\x7c\x23\x0b\x3d\xba\x42\xbf\x2b\xd8\x01\x9c\x62\x08\x68\xbe\xbf\xa3\xd2\xa5\x21\xd8\x19\xb0\x7d\xad\xca\x2d\xce\x1e\x5d\x6d\x58\xaf\x1c\x84\x06\xf5\xb1\x7a\xb0\xab\xb6\x59\x32\xdf\x5d\x9e\xeb\xfe\xf2\xff\x0f\xf1\xd4\xb5\x3a\xdd\xd8\x3b\xf7\x5a\x8e\x55\x76\xa5\xd0\x53\xb9\x32\x7f\x54\x64\xae\xa9\xb0\xd4\x96\x72\xf3\xe1\x37\xb2\xf1\x40\xfa\x17\x5b\x65\xbd\xd9\x01\x4d\x9b\x14\x2a\x64\x26\x98\x65\x05\x9f\xe5\x32\xd2\x55\x32\x7b\xf9\xb1\x28\x95\x0d\xe9\x3f\x67\x6f\x5f\x50\x44\x12\xda\xd5\x5a\xdf\xa6\x3c\x31\x70\x7f\x52\x08\xc2\x48\x9c\x09\x47\x58\x96\x35\xcd\x8d\x6f\xb9\xd6\xcc\xd4\x1e\x52\x4f\x36\x46\x7b\xd0\x0d\xa4\x82\xd6\x10\x88\xbc\xcc\xd1\x1c\x72\x3d\x53\x8d\x5f\xa2\xf9\x3e\x4a\x3a\x56\x63\x87\x2f\xc3\x87\x21\x22\x2a\xda\x8c\x25\x93\xa4\x9d\x8a\xed\xa5\xff\xbc\x55\x8b\x01\x98\x84\x7e\xc6\x12\xc1\x6e\xed\x09\x4d\x26\x7e\xc6\x0e\xfa\xa8\x1b\xd7\x83\xb6\xc2\x8d\xe2\x4e\x66\xee\x8a\x93\xf5\x14\xe1\xa9\xfd\xf9\x88\x96\xd6\xa9\x2c\xc6\xaa\x60\x96\x75\x1d\xdc\xec\xdd\xaa\x85\x53\x67\x80\x8e\x15\x84\x17\x0d\x0f\xce\x41\xcd\x61\xdd\xc7\x3b\xf5\x4b\xb9\x08\x62\x3e\x50\xb1\x1b\xc4\x60\x46\xb9\x73\x83\x3d\xf1\x87\xa5\xaf\x6e\xed\x56\x93\xce\x96\x6e\xd9\xa7\x5d\xeb\xb8\x87\x87\xdc\xf0\x68\x45\xc8\x1a\xc8\x4f\x10\x47\x9b\x57\x13\xd7\x78\x80\x36\x71\x5c\x7a\x0f\xc6\xcd\x8d\x4b\x95\x51\x3c\x22\xee\x24\x68\x1e\x68\x00\x5d\xc3\x90\x6f\x95\xbb\x08\xdc\x5b\x97\x23\xbb\xe7\x5d\x24\x2d\xb5\x08\x19\x66\x6e\x52\xee\x07\x9f\x6a\xe4\xe7\x21\x0b\x42\x68\x31\x7d\x65\xe6\x9a\x45\x99\xdd\xb1\x24\x33\x3b\x7c\x92\x06\xd6\xd3\xc8\x56\xa5\xac\xd4\x74\x01\x59\x5b\xe5\x14\xf2\xba\xfc\xf8\xbb\x79\x53\xbc\x4e\x0d\x50\xf4\x5b\xb5\xd8\xb7\xb8\x6a\xee\x12\xcc\x74\xc1\xf5\xce\xe0\x92\xb0\xed\x18\x63\x27\xb9\x0b\x3c\xb7\xe7\xf9\x40\xbc\x35\x95\xfb\x9f\x97\x1f\x7d\xb5\xfe\x17\x46\xd9\xb7\xa6\x82\x5f\xfa\x71\x7c\xa0\xcb\x1e\x6d\x0e\x6f\x10\xe1\x19\x71\x91\xd9\xd8\x30\x6c\x29\x4e\xb1\x79\x13\xcf\x21\x24\x9d\x06\xd2\xb9\x8a\x71\x8c\x24\xe6\xe9\xf4\xf5\x41\xe3\x37\x65\x63\xf8\x2b\xba\xa3\xae\x10\x51\x0b\x9e\xa0\xa5\x1f\x8b\x77\x93\x25\x09\xd4\x73\xb7\x43\x3a\xc1\x72\xf3\x88\x29\xf4\x79\xf9\xa4\x0f\x11\x6a\xd7\xc1\xe0\x00\xe4\x08\x17\x4a\x65\xa6\x42\xdc\x8b\x2d\x38\x51\x9e\x13\xa4\x21\x71\xb0\x14\x55\x04\x5c\x73\xa9\x70\x62\xbb\xc8\x8d\xc7\xf6\xaf\xf8\x03\xd4\xb3\xc1\x61\x4f\xb7\xc5\xf7\x59\x08\xbc\x94\xf7\x2f\xb9\x10\xda\x0e\x6b\x74\xcb\x6e\x1e\x8e\x37\xec\x09\x6e\x61\xaf\x26\x5c\x59\x1f\x97\xf8\x65\xc7\xfb\x19\x82\xa2\xb6\xd5\x1b\x55\xc9\xcf\x08\x11\xf4\x5d\x2c\x27\x84\xbd\x67\x74\x73\xb9\x86\x3f\xb0\x86\x7a\xba\x36\x02\x7f\x1e\x3b\x55\x8e\xf6\x02\x45\x00\xbb\xc8\xab\x99\xaa\x74\x12\x21\x06\x01\x03\x99\xc9\x3b\x45\x55\x88\x41\xc9\xcb\x3c\xf7\xbc\x93\xa5\x36\xb5\xf5\xf8\x89\x41\xe7\xf0\xf7\xc2\x43\xb4\x81\x70\x49\x71\x1b\xff\x44\x7d\xcc\x0d\x67\x20\x78\x60\x3f\x6f\x50\xb0\xd7\xb8\xeb\x57\xf7\x15\xec\xa5\x27\x51\x50\x2d\x63\x4e\x40\x80\x94\xfb\xdb\x31\x8d\xb9\xae\x18\x9f\x90\xca\x0b\x99\x09\x44\x38\x58\x1f\x64\x4c\x58\x67\xcd\x5c\x91\x08\xa9\x62\x26\x09\x4b\x12\x96\x2e\xe0\x2e\x44\x29\x0c\xda\x03\x26\x32\x25\x8e\x2a\x04\x6b\x6b\xe1\x01\x2a\xd5\xec\xbf\x24\x82\x1e\x91\x03\xb7\x25\xe8\xcd\x04\x8a\x01\xb7\xa7\x32\x6e\x98\xa5\x56\x64\x05\xce\xd5\xc7\x8a\x85\x1f\x3f\x92\xb0\x0f\xcf\x71\x55\x90\xbb\x43\x4a\xb1\xad\x1c\x81\xc1\x9b\x18\x58\x25\xc7\x61\xf3\x92\x71\xb5\x62\x28\xc5\xcc\x21\xa6\x6e\xde\x9c\xe2\xcf\x05\xc3\x20\xc5\x4e\x8a\x89\xba\x17\x73\x9d\xd7\x6e\xb9\x60\xb3\x0b\x69\xad\x4a\xbd\x8e\xdb\x63\x16\xe1\xd5\xc6\x44\x2a\x06\x17\x40\xbc\x4a\xdc\x49\x5c\x4a\x8e\xae\x46\x33\x63\x22\x33\x5e\x29\x5a\x69\x32\x9b\xeb\xd2\x56\x3e\xcb\x66\x10\x57\x6d\x85\xf1\x94\x2a\x51\xda\x2f\x65\x65\x6e\x55\x4e\x16\x17\xce\xd0\x21\xb0\x80\x5e\x19\x10\x41\x20\x75\x3e\x3d\xaf\xd4\xfc\x39\x57\xf4\x69\x7b\xb1\xdb\x6d\x7c\x70\x91\x3f\x67\xb6\x1e\x5b\xb7\xdd\x79\x45\x47\x8e\x46\x0f\xdb\x81\xf2\x0b\x97\x04\x25\x33\x69\x80\xb8\x87\x36\x3c\x41\x2f\x15\xd2\xaf\x78\x84\x48\xf3\x50\x29\x09\xf7\xa6\xa4\xb5\x66\xc1\xde\x12\x94\x43\x73\x54\x7e\xe4\x3c\x28\x2b\x6a\xcc\xe1\xf6\xea\x62\x33\x0b\x22\x53\x93\x0a\x9d\xdd\x98\x45\x49\x65\xa5\x48\x8c\x6c\xd4\xd2\x6c\x0e\x14\x76\x77\x5e\x40\xcc\xf7\x01\x05\x96\x8d\x15\x95\x6c\xf2\xa0\x13\xc9\xac\xce\x21\xcb\xd3\x84\xa7\x15\x7b\x40\x18\x1b\x03\x1a\x1d\x86\xf9\x94\x8a\x96\x0e\xcf\x65\x7b\x4e\x38\x91\x4e\x3e\xc7\x83\x66\xc2\x9c\xdc\x64\x29\x57\x56\xba\x3b\x19\x9d\x7c\x2b\x52\x34\xc0\x59\xc0\x91\xe1\x6f\xe0\xd9\xf7\x05\xb1\x6a\x1b\xe1\xb1\xf5\x9d\x94\x6f\x94\xad\xf4\x1c\x72\xc0\xbf\xc1\x3b\xa8\xff\x41\xa6\xc7\x90\x6b\x10\xe0\x86\x1a\x65\x9f\x81\xb0\x2e\xeb\x1b\x8b\x04\x03\x8d\x28\xe9\x0f\x0c\x86\xdd\x14\x7e\x61\x4d\xf8\xc6\x15\x55\xe1\x85\x0c\xdd\xa6\xdb\x14\xc9\xc8\xbe\x8d\xe4\xd3\x18\x6c\x33\x08\x4c\x71\x01\x2a\x20\x93\x01\x67\x16\xd3\x04\x2a\x55\xce\x75\x4e\xa8\x23\x9c\x5d\x03\x37\xdb\x63\x97\x6c\x0e\x5d\x8b\x50\xa8\x40\xa1\x44\x9d\xcf\xc9\xfe\x0c\xf9\x06\x71\x09\x74\x55\x8e\xc4\x45\x1b\x61\x16\x6b\xb4\x8f\xc4\xa5\x92\xe9\xd0\xb1\xb4\x47\x97\x63\x12\x93\x23\x8c\x46\xb2\x18\x42\x17\x26\x1b\xca\x3c\x1d\x7a\x72\x9e\x2c\xfa\x81\xb5\xb2\xc9\x6b\x9d\xdf\xf6\xa0\x39\xd0\x13\x94\x71\xdf\x5f\xbe\x6e\x8b\xb6\x7e\x5f\x36\x9a\x3f\x44\xc1\xbc\xbc\xb8\x7c\xf9\xfc\xec\xfa\xe5\x0b\xf1\xa3\x57\xfb\xb9\x60\x9d\x29\x84\x4f\xb4\xe1\xfe\x7d\x98\xe5\xc9\xe8\xc9\xb1\x3b\xc1\x90\x8c\xd5\x24\x37\xda\x8a\x82\x22\x97\xf1\xd8\x46\x90\xc0\x27\xa3\x27\x27\xfc\xda\xd6\x1d\x9b\x4e\x20\xd9\x20\xba\x2f\x6a\xb6\x34\xed\x40\xb6\x62\xfa\x80\x0c\x6e\x18\xd4\x97\x65\xe6\xfe\xcf\x4e\x03\x67\xf7\x44\x1f\x24\x5a\xb7\x51\xd0\x1a\xd0\xb1\x80\x56\x7f\x4a\xad\x5f\x14\x4a\xdc\xec\xfd\xe1\xdd\xbb\x1f\xdf\x9c\x5d\xfe\x78\xb3\x17\xa8\x1a\xe6\xcf\x20\x25\xf3\x75\xf1\xbc\x2b\x82\xf4\x97\x69\x8e\x4c\xdf\xed\x60\x26\xa7\x84\x8f\xcd\x4d\x24\x94\xc3\xcc\x2b\xd1\x90\x97\xf6\x2d\xa0\x23\x96\x6a\x29\x01\x93\xd6\xd6\x73\xd5\xea\xc8\xcb\x07\xb2\xc2\x9a\xe1\x1c\x99\x0f\xb4\xe4\x4e\x66\xa1\xe0\x29\xe2\x59\x62\x27\x91\xf4\x82\xc7\x4f\x81\xd9\x6d\x21\x78\xce\xb8\x1e\x91\xcd\x03\xed\xa9\x21\xa7\x94\x2b\x7b\x33\xd0\x72\x7c\x5e\x2d\x2d\x41\xea\xf9\x5a\x03\x48\xba\xb5\x11\xd4\x13\x61\x4b\x43\x48\x2e\xe3\x53\x2f\xeb\xb6\x37\x1c\x7f\x67\x7e\xd8\xb2\xf9\x61\xb9\x1a\x71\x4d\x20\xd4\x20\x80\xe2\x3d\x8e\x12\x9a\x1d\x13\x05\x0e\x44\x32\xb8\x3b\x41\x24\x6e\x58\x08\x02\xf4\x5a\x3d\xf3\x8f\x2b\x9d\xb3\x6d\xc0\x6b\x06\x74\x3c\x29\x78\x39\x80\xfa\xb9\x15\x03\x25\x89\x73\x52\x5b\x92\x30\x95\xb9\x2d\x4a\x75\x07\x4a\x17\x12\x1b\xf2\x20\xc1\xf5\x0e\x32\x72\xb7\xea\xbc\xfa\x98\xa8\xa2\xf2\xa9\xd0\x3e\xf2\x9c\x3f\x72\xe8\xa9\x2f\x8d\x2f\xda\x40\xd9\x1e\x8a\x8e\x22\xd8\xfc\xde\xfa\x3b\x11\xd2\xac\xdb\xaf\x81\xbf\x09\xd0\x0a\x4b\x8a\x48\x63\xf8\xa3\xb4\x56\x84\x58\xad\x49\xdd\x38\x40\x00\xab\x2c\x5b\x88\x89\xbe\x83\xa7\x13\x3d\xa9\x94\xca\x59\xd5\x38\xc4\x5c\x82\xa6\x96\xc2\x20\xf2\x79\x34\x97\x41\x87\x2c\x50\xd5\x5c\x41\x75\x74\x9f\x9d\x1c\x7b\xef\xed\x4b\x37\x04\x95\x92\x5a\x50\x99\x29\x0e\xd0\x57\xdc\xa5\x19\x81\x0e\xe1\xa7\x4c\x86\x9b\x5c\xa9\xd4\x76\x55\x2d\xcc\xad\xab\x51\x80\x07\xb7\x2f\x86\xcf\xa3\xdc\x4f\x21\x7b\x8d\x1d\x27\x11\xf2\x9d\xfb\xf4\xbd\xe6\x74\x61\xfa\x8a\xdb\x19\xa2\x6b\xa8\x43\x36\xb4\x00\x8f\xa1\x82\x5a\x8e\xd7\x7c\xfc\xef\x6e\xb2\x30\xb9\xb5\xcb\x02\xfd\xc2\x80\x21\xcd\x94\x0f\x37\x28\x9d\xe0\xd3\x18\xd7\x55\xf8\x99\x88\x81\xcd\x65\x61\x67\xa6\x8a\xa0\x6f\x75\x1e\x2d\x88\x6f\xef\x0f\x32\xab\x36\x70\x85\x86\x5e\xbc\xf3\xd0\x86\x08\x75\x9f\x0e\x04\x8b\x6a\x58\x8a\x16\x23\x00\x84\x9c\x54\x04\x9f\x85\x4a\x60\x6b\x31\x48\x7b\x6c\xa8\x53\x2a\xd2\x14\x9b\x45\x74\x75\x89\x39\x8d\x80\xa8\xe8\x3b\xbe\xd9\xe3\x29\xdf\xec\x8d\x42\xd9\x5b\x26\xde\x20\xfc\x7b\x24\x75\x2c\xb1\x00\xac\xd7\x49\x05\x65\x1d\x81\x84\xc2\xce\xc1\x01\x90\xb1\xdb\xdf\x6b\x35\x6d\x55\x99\x2d\x8f\xc4\x0a\x1b\xb6\x6c\x82\x92\xa8\x82\x7f\xbf\x81\x67\xd1\xab\xc8\xc2\x90\x63\xb7\x76\xdb\xd5\x15\x5c\x59\x06\xce\x6a\xa9\x93\x2a\xe8\x6f\xa0\x2c\xd2\x58\x7c\x8a\xfb\x82\xd6\x0d\x73\x43\x9a\x38\x0a\xea\x4e\x95\x8b\x6a\xb6\x0c\x3f\x6f\x67\x7f\xdd\x9e\xfd\x35\x6b\x47\x2c\x6c\x71\x6b\xa1\xef\x87\x6d\x2d\x58\xda\x7a\x10\x2f\xc1\x00\x47\x5e\xf3\x8f\x7a\x5e\xcf\x1b\x86\x08\xbc\x94\x96\xcc\x5c\x75\x99\x53\x05\x9f\x20\x36\x3b\x82\x0b\x2c\x17\xf5\x7a\x15\x1c\x5f\x4d\xa9\x0f\xa7\xf6\x81\x09\xea\x07\x4e\xc3\x8f\x0c\x2e\xc1\xfa\xe9\xe4\x74\x3c\x64\x1d\x45\xd4\x53\x4d\x28\x0c\x0f\x96\x63\xcf\x5e\x57\x19\xe3\x88\x9c\xb9\xf3\x57\x51\x76\x1b\xce\x1d\xd9\x2a\xce\x4d\xdd\xb3\x21\xa1\x0a\xc8\x2f\x8e\xa4\x61\x39\x68\x6f\x99\x3c\xc0\xc2\xfa\x08\x8c\xe2\x7e\x39\x64\x3a\x86\xc2\xac\x04\xd2\xcd\x6f\xf3\xf6\x39\x1a\x36\xd1\x59\x05\x20\x82\x8e\xc3\x38\x82\xd1\x42\x10\x6e\xc8\x1b\x78\x69\x12\x15\x57\xe3\x08\xdc\xa8\xa3\x88\x03\xeb\x69\x88\x3f\x4d\x1c\xda\xc6\xd5\x4b\x66\xc6\x58\x34\x6d\x55\x86\xa9\x25\xed\x85\x5b\x16\x59\x4e\x6b\xd0\x38\x7c\x0e\x21\x43\x0a\x67\x19\x8f\x27\x18\x38\xfd\xea\x9e\x4f\x84\x3f\x52\x41\xec\x60\x49\xa6\x35\x01\x6d\xd1\x11\xda\x14\xb9\xbc\xe2\x20\xab\xc8\x7c\xd4\x3b\xa1\x55\x64\x5f\x4f\x5a\x44\x9f\x93\xd6\xe8\x5c\xfa\x80\xad\xc8\xa0\xcc\x3b\xd5\x67\x0b\xf5\x63\xef\x35\x80\x6a\x6b\xc9\xaa\x4b\x01\x26\xfe\x86\x78\x79\x82\x0f\xdc\x90\xc1\xd3\x06\x51\xb0\xcf\x03\x79\x2a\xb3\x53\x50\x8f\x6c\xad\xd2\x5e\xc6\x0a\x6a\x5a\x30\x71\xf2\x0c\x52\x4f\x47\x43\x24\xb3\x35\x73\x55\xe9\xb9\x72\x73\xa7\xb2\x31\xee\x16\xb6\x64\xa7\x20\x4a\xb8\x1d\x55\xb9\xad\x4b\xe5\xf3\x9e\x89\x56\x33\x32\x1c\xae\x1a\x4e\x19\x2e\x26\x88\x3d\xc2\xce\x65\x96\xa9\x12\xed\x85\xd6\xc7\xa6\x2f\x44\x26\xcb\xa9\x8f\xbf\x72\x37\x1e\xbb\x47\x65\xd2\x2a\x28\xed\x14\xec\xe2\xde\xa2\x7e\x3e\x69\xdc\x2f\x62\x05\x41\x9d\x84\xef\x28\xf2\x75\x55\xdd\x0a\x37\xb1\xc1\xeb\x5e\x5a\xc6\xa6\x62\x95\xd9\x43\xfe\x36\x64\x19\x94\xf0\xa5\x75\x1b\x9c\x90\x3d\x46\xdb\x06\x2a\xca\x36\x2c\x79\xff\xea\x89\x58\x9d\x25\x78\xe3\x2e\xec\xda\x75\x80\x56\x81\xf4\x59\xc0\x81\x69\xaf\x95\x63\x69\x10\x35\x03\x07\xd9\xdf\x46\xcb\x09\x10\x33\x3d\x9d\x65\x8b\x38\xaa\x92\x03\x80\x7a\xbe\x45\xaa\xa6\x9b\x62\xe8\x89\x52\x76\x7b\x3e\xec\xda\x7e\x2d\x2b\xec\x0e\xb0\xa9\xab\xe5\x38\x62\xf8\xdc\xeb\xa1\x6e\x7e\x47\x48\x38\x91\xbf\x5f\xa3\xb3\x03\xe4\xaf\x2a\x06\x1d\x63\xa6\x24\xb3\x6c\x20\x4a\x35\x95\x65\x0a\x3e\x1e\x30\x61\x2c\x84\x4c\x2a\x7d\xa7\xab\x05\xc2\xc5\xf2\x5f\x1b\x5e\x8d\xfb\xfe\x83\xf0\x67\x14\xd1\x4d\xc9\x50\x93\xbe\x64\x1a\xb9\x50\xd3\x56\x71\x15\xe2\x59\xd5\x4c\xcd\x91\x98\xd9\xaa\x54\x12\x12\x3a\x64\x9a\x86\x62\x5d\xd8\x76\x6e\xee\x80\x23\x46\x42\xbb\xb8\x42\x00\x87\xf6\x36\xf7\x19\x86\x3e\xcf\xc8\x89\x38\x9c\x29\x66\x66\xbf\xcc\xab\xd5\x69\x41\xdd\xd6\x84\x49\x63\xca\xdb\x49\x66\xee\x87\x3a\x1d\x08\x89\x79\xde\x57\xe4\x4d\xa9\x7c\x1d\xa1\x25\x15\xc1\x02\x23\x44\xdd\xc1\xbd\xd7\x17\x79\xb6\xf5\xac\xe7\xc8\x1a\xd6\x1c\x89\x67\xef\xad\xb1\x60\xd9\x39\x9f\x77\xde\x4d\x85\xfa\x5b\x0d\xd4\xfa\x56\x91\xe6\x5d\x0c\x33\x27\xd8\x8b\x68\x1c\xa4\xd2\x23\x39\xc8\x55\xa2\xac\x95\x28\x44\x56\x25\x78\x1e\x9a\xe3\x93\xd1\x48\x22\x1f\x59\xe2\xb5\x10\x9f\x2a\x01\x26\x12\x5f\xe5\x6f\xb9\xde\x67\xaf\x7b\xd1\x97\x5f\xf9\x67\x6c\xc5\x06\x73\xad\x9e\xeb\x1c\xe2\xcd\xf8\xa6\x86\x02\x6b\x84\x02\x40\xeb\x11\x25\x4b\xc1\x3a\x95\xaa\x89\x37\xee\xfd\xfe\x9e\x99\x82\xa8\x7d\x2a\x6e\x3c\x76\x45\x7f\x22\xd5\x24\x42\xbf\x58\x82\x79\x81\xc1\x60\x81\x5f\x02\x90\x05\x2f\x22\x8f\xcf\x46\xd7\x95\xc4\xe6\xf8\xd3\x60\x14\xff\x3c\x60\x31\x8f\xd3\x01\xa1\xc3\x4b\xd0\x6f\x63\xe0\xdb\x3c\x86\x27\xa7\x5b\xc1\x57\x49\x40\x0f\x01\xe5\x96\xf4\xea\x5e\xc4\xbb\x62\x29\xec\xfc\xbb\x22\x82\x6e\x87\x33\x49\x20\xdb\xfe\x1d\x32\xcf\x64\x4a\xa6\x48\xd6\xb4\x15\x3d\xd7\x1c\x53\x1e\x48\x5c\xc4\x8b\x00\x3b\x7a\x17\xc3\x53\x36\x81\xcd\x41\x32\xda\x3f\x2b\x8a\x6c\xb1\x0f\xc7\x63\xff\x3d\xd0\xbd\xfd\x7e\x4c\xf0\xde\xd2\x08\xbe\x18\x82\x13\x12\x2b\x39\x87\x08\x6b\xae\x39\xe0\x57\x45\xdc\xab\x12\x21\x22\xdc\xbd\x22\x9d\x86\xc0\x47\x38\xec\xd1\x49\xe6\x8d\xd5\xa0\x91\x6d\xa1\x2e\xc1\x27\x07\x04\xf9\x03\xb3\x21\xb1\x7e\x18\x2e\xf9\x1b\x9d\x94\x86\x2b\x4e\x2c\xa5\xe8\xdc\x08\x2a\x74\x06\xba\x03\x3f\x81\xd6\x3b\x77\x2d\x10\xe7\x53\x20\x35\x2b\x4a\x95\xe8\xfe\x5c\xc2\x88\xab\xba\xad\x1e\x56\x54\xb8\xe1\xd3\x19\x54\x08\x11\x5a\x35\x8d\xd0\x0a\xd2\x4c\x1b\x01\x4d\x20\xc1\x33\x8e\x6b\x7f\x50\x13\x99\x28\xb9\xcc\x66\x94\x38\x01\x61\x43\xd4\x16\x4f\xff\x06\x1c\xc9\xd1\x66\xb9\x04\x26\xf1\x2c\x3c\x24\x1a\x50\xe7\x01\xa9\x04\x22\xb1\x09\xc3\x5a\x16\x08\xe6\xe3\xed\xb0\x4d\x36\x15\x45\x38\x8d\x17\x90\x43\x0b\xbe\x97\xca\x98\x0c\x53\x44\x2b\x43\x45\x55\xbd\x75\x42\x96\x63\x5d\x95\x8e\xdd\x84\xf0\xbb\x6b\x5f\x05\xce\x54\x68\xd0\x00\xd5\x1a\x0a\xea\x7a\x8f\x07\xa8\x27\x20\xc8\xc3\xdd\x03\x65\x11\xd2\xd0\xbd\x42\xd4\xb2\x7a\xf5\x8b\x9f\x6e\x2d\x87\xd3\x5a\xa7\xea\x28\x5e\xa3\x4f\xcf\x21\x18\xec\x11\x62\x57\x7f\xb9\xe1\xeb\x56\x09\x3c\x6a\x4c\xdb\x1d\xe9\x61\xa1\x1e\xf7\x28\x4e\xbc\x4f\xa9\xa6\x5b\xa5\xf3\x69\xad\xed\x2c\x3a\x3c\xb0\x25\x60\x0c\x42\xf0\xf2\x3c\x0d\x65\xf4\x1c\x7b\x09\x6c\x92\x3e\x6a\x7b\xed\x06\x20\x23\x2d\x48\xa4\xd7\xd3\x59\x25\x72\x73\x8f\x39\x02\xbe\x86\xad\xb6\x62\x6a\x08\xba\x8f\x5c\xaf\x1a\xa2\xda\x08\xe6\x11\x8f\x25\x80\x12\x03\x7d\xf5\xd8\xc1\xbd\x3e\x2f\x28\x30\x80\x55\x66\x80\xa0\x76\x57\xed\x79\xbb\x09\xca\x78\x81\x04\x77\x4c\xb0\x34\xd0\xb8\x20\x4c\xb0\xc2\x82\xc2\xca\x7c\xe3\xdc\x87\xf7\x34\x33\xd7\x38\x54\x2f\x17\x33\x59\x14\x2a\xb7\x43\x4a\xd6\x83\xfa\x4c\x42\x3a\x12\xe4\x34\x9c\x42\x96\x30\x57\x26\xe4\xb6\x69\x54\x6f\xc4\xdf\xc0\x35\xe2\x4f\xfa\x31\x23\xf7\xbf\x7c\xf5\xfc\xe9\xd3\xa7\xdf\x63\x9e\xb5\x44\x43\xb3\xce\xc5\xfb\xeb\xe7\xa0\xe3\x6c\x12\xef\xf1\xb6\xce\x32\xaf\x9b\x3d\xbe\x27\xd3\x07\xd6\x6e\xa3\x8e\x0e\xa7\x40\xfe\xb0\x01\xe4\xf3\xdb\x10\xb7\x46\x60\xcf\xbe\xda\x35\xb3\x7b\xb6\x66\x18\xc4\x5b\x9e\xd4\x4e\x14\x45\x3d\xd9\xed\x16\x6d\xa5\xae\x22\x20\xd7\x16\x94\x2d\xaf\x2f\x14\x93\xf6\xfe\x55\x1e\x66\xf3\x24\x66\xd6\x20\xaf\x7f\xc3\x9e\xd2\xb1\xc2\x02\xe6\x0a\x00\x76\xc3\x1e\x6d\xa6\xf5\x75\xbe\xb2\x04\x03\xbe\x3d\x90\xcb\x57\xcf\x05\x1c\x22\xb8\x74\x92\xb0\x38\x85\xac\x3c\x7d\x89\x55\x8b\x80\x1d\x4c\x68\xd8\x4d\x6a\x40\x64\x3c\xb6\x60\xbb\x15\x90\x7e\x45\x1b\x20\xba\xc1\xca\x4b\xef\x38\xca\x3a\xe0\x83\xec\x6e\x01\x62\x91\xe3\x62\x22\x80\xeb\x78\xe1\xad\x65\xcd\x80\x4c\x30\x88\x72\xbd\x1a\xbc\x8b\x6c\x00\x3c\x88\xfc\xb4\x1a\xa5\x76\xd8\xb2\x46\x55\x66\x3b\xf0\x3e\x28\x28\xe8\xc6\x5f\x73\xf4\xf0\x30\xb2\x21\xc2\xea\x70\x1c\x23\x95\xbe\x31\xe8\x17\x57\x6d\x08\x63\x6f\xa4\x1d\x89\xb3\x86\x67\xae\xd3\xd0\xe7\x59\x81\x45\x7c\xd0\x58\xa6\x71\x66\x92\x5b\xb7\xd6\xef\xf8\x33\xbd\x27\x0a\xf0\xe8\x22\xe7\x7c\x14\x11\x8b\x41\x81\x58\x8a\x1c\x6c\x31\x04\xd8\x0e\xc0\xa8\x95\x2f\x48\x3e\x10\x32\xab\x66\xa6\x9e\xce\x84\x0e\x9c\x99\x8f\xa4\x20\xd5\xa9\x11\x0c\x1d\xad\x72\x51\x6a\xf4\xc7\x60\x54\xaa\x9e\xab\x46\x99\xbd\x01\xa3\x3b\xa2\xcf\x80\xe2\x84\xd1\xfa\x59\x98\x14\x11\xd0\xb0\x27\x9d\x8b\xa7\xc7\x7c\x4f\x71\x97\x7f\xac\xc7\xee\x21\x1b\xd3\x65\x02\xe7\xcc\x52\xa2\x6e\x74\xbe\xf8\xbe\x82\xc9\x4f\x4f\xf3\x10\x62\xcb\x01\xa5\xa1\x24\x62\x61\xd2\x91\x38\xa3\x9d\x95\x55\xf4\x51\x74\xc2\x34\x3e\x8a\x3e\x6a\x31\x93\x65\xda\xf7\x91\x83\xab\xf3\x1f\x7e\x3c\x7f\xfd\xfa\xb0\xf3\x39\xe4\x83\xf0\x95\x24\x53\x32\xaf\x8b\x01\x9b\x4b\x68\x10\x81\x80\x40\x41\xa4\xf3\xbc\xe3\xc0\xa0\xba\x8d\x08\x81\x53\x61\xc6\x64\x4c\xb3\xd0\x15\xeb\x86\x09\x3e\x24\x7f\x5c\x63\x9d\x63\x20\xea\xbc\xd2\x19\x64\x78\xa5\x73\x9d\x6b\x48\x90\xc2\xc2\x24\xa4\x7e\xc3\x2e\x02\xe8\x3e\x18\x91\x83\x83\xa4\x6a\x5d\xb4\x16\x6d\x4c\x3d\x06\x36\x1c\xc2\xee\x65\x6f\xda\x8b\x67\xd2\xd2\xc9\x04\x97\x3e\x11\x81\x55\x2c\x6b\x33\x32\xf2\x25\x03\x19\xb7\xca\xc8\x02\x35\x58\x0e\x48\x8e\xea\x5f\xb7\x42\x41\x74\x6f\xfc\x31\x2a\xd5\xd4\xed\xee\x62\x24\x00\xfc\x52\x79\x13\x57\x43\x55\x9f\x84\x0b\x5d\x98\x1c\xe9\x62\x62\xe6\x85\xc9\xbd\x2b\x82\xae\x9b\x3f\xac\xd8\x53\x70\xf3\x03\x4c\x3b\x45\x8d\x74\x89\x52\x0b\xc3\xc0\x62\xb1\x04\x9d\x0d\xa0\x1f\xad\x6c\x33\x1e\xdc\x1d\x39\x66\x84\xc4\x5a\x47\xe2\x55\x20\x94\xa1\x68\x09\x96\x85\x88\x0c\x8f\xde\x63\x03\x82\xd6\x48\x88\x77\x20\x70\x69\x2b\xde\xbe\xbb\x16\x2a\x07\x60\xaa\xb4\x11\x9e\x9d\x57\x58\x0d\xcd\xc2\x0d\x06\xab\x65\x5e\x89\x52\xdb\x5b\x4c\x7d\xac\x93\xdb\x88\x4a\x8f\x62\x8a\x8d\xee\xfc\x99\x74\x4a\x8d\x2f\x7e\xb6\xa0\x32\x3f\x20\x52\x17\xee\x66\x58\x84\x1d\x82\x22\x7e\x28\x00\xea\xb0\x5a\x01\xe6\x9c\x19\x45\x98\x97\xce\x71\x1e\x3e\x20\x5c\xe3\x7d\x64\xeb\x86\x14\x56\x57\xb5\xaf\x5e\x11\xf4\x80\xb0\x7b\xf1\x9e\xf2\x3e\xa3\x55\x29\x7c\x38\x8e\xd7\xd7\x56\xdc\x4b\x8d\x91\x31\x88\x69\x4a\x64\x0d\x59\x3b\x85\xc2\x79\xf5\x0c\x6f\x25\x78\xd9\x20\x68\xe7\xd0\x8d\xde\xad\x66\x4a\x0c\x7a\xe9\x40\x64\x3c\x73\x59\x35\x87\x31\x20\xf7\x10\x84\xba\x03\xd4\xab\x92\xa9\xe3\x7e\x23\xf1\x67\x72\x04\xfa\xbd\x84\x15\x6a\x00\xc6\x93\x93\xb8\x54\x10\x5e\x45\x22\xf7\xdc\x69\x44\x60\x97\x9d\x5b\x95\xdd\x91\x69\x9b\x35\xc5\xbb\x3a\xcb\x55\x09\xac\x9e\x5f\x01\x03\x11\x19\xc8\xa3\xa1\x3d\x20\x71\x74\xe3\x7c\x61\x2a\x6a\xa8\xfa\xd5\xbe\x1f\xa2\xa7\x74\x79\x31\x86\x4f\x82\xed\x62\xa2\x3f\x0e\x7c\x78\x79\x23\x3a\xcc\x08\xee\xd8\xb1\x5c\x04\x35\x05\xf5\xee\xdd\xdb\xd7\xff\x29\xce\x5f\x41\x6b\xe8\x15\x37\xb7\x41\x8e\xb9\x24\x50\x08\x21\xf5\xc2\x9d\xfb\x18\x32\x46\xe8\xcd\xfb\x79\x99\xe1\xa1\x0b\xd3\x4b\x88\x5e\x75\xf4\x31\x01\xf0\x5a\x48\xa6\xf1\x92\x0a\xa1\xec\x5a\x10\xda\x12\x33\x1f\x43\xda\x07\x99\x0b\x68\x02\xb6\x9e\x4c\xf4\x47\x14\x06\x7c\xd9\x22\x7c\x7d\x46\x32\x15\xe8\xb1\x60\xc9\xa3\xca\x94\x75\xa6\x2c\x0b\x5c\x61\xbe\x83\x38\x8d\xa9\x2a\xeb\x3c\x89\xf9\x4d\xa6\xf2\x69\xa8\x68\x8e\x5f\xe5\x24\x79\x98\x2a\xa0\x85\x84\xa0\x43\x1a\x5e\x23\x42\x0f\x38\x59\x67\xf9\xba\x1e\x7d\xde\x26\x54\xba\x91\x75\xdb\x6e\xfc\x87\x23\x61\x1c\x3f\x00\x85\x25\x86\x50\x75\x52\xc9\x74\xe0\xb5\x11\xca\x3f\xa1\x66\x4f\x8e\x4f\xc4\x73\xca\x19\x30\xa5\xf8\xf6\xf8\x18\x57\xf3\x12\x8b\x45\x62\x28\x03\x3b\xaf\xa2\x82\x92\xcd\xe3\x92\xc4\x25\x84\x26\x00\xd3\x4f\x17\x02\x35\x84\x2c\x33\x55\xc5\x19\x66\x71\xc0\x11\x1a\x5c\x4a\xe5\x78\xc5\x01\x9f\xd9\x6c\xd1\x15\xa2\x31\x29\xcd\x77\x7b\xe9\xde\x18\xa2\x40\x86\x75\x8f\x0f\x61\x29\xcf\xc8\x17\x09\xcc\x41\x4f\x04\xdf\x88\x56\x09\x9b\x47\xe6\xf8\x3a\x55\xf3\xc2\x2c\x4d\x51\x98\xae\x28\x9b\x7a\x26\x30\x8c\x20\xf1\x99\x4a\x6d\xac\x68\x8e\x07\x8f\xea\x9c\x1a\x66\xab\x16\x8e\x1e\xc0\x02\x6d\x94\xc3\xb0\x99\xbe\x98\x2d\x01\x04\x79\x83\xf8\x1f\x14\xad\x86\xf1\x83\x1e\xc7\xa1\x1b\x52\x04\x64\x73\x2a\x73\xfd\x0f\x54\x1e\xdd\x86\x4e\x4d\xe9\xfe\x3c\xb0\x89\x29\xc8\x06\x07\xe1\x5a\x87\x91\xa1\x4d\x52\x8d\xf0\x90\xce\x85\x81\x46\x45\x46\xee\x43\x41\xe9\x21\x19\xd7\xfa\x80\x0a\xe8\x49\x4f\xb4\xf5\x5a\x2b\x1d\x4d\xf5\x73\x0c\x74\xf3\xd8\x97\xb0\xc6\xa3\x88\x88\xd1\x91\x33\xb1\x01\xc1\xe7\x73\x72\x62\x5c\x73\x1f\x1d\x4a\xdf\xc1\xcd\x75\x02\x18\xf5\x12\x0c\x7a\x73\x63\x9d\x42\x0c\x48\x9a\x1c\xa9\x3e\x33\xb5\x55\xb7\x4a\x15\x9a\x8b\x01\xa2\xbd\xb7\x5a\x14\xe4\x51\xc3\x3b\x99\xef\x63\x54\x2f\xd6\x99\xaf\xb0\x02\x58\xaa\x4a\x48\xeb\x68\xa4\x7b\x9d\x05\x0f\x0e\xed\x36\xeb\xe7\xfb\x16\xa8\xc3\x80\xc2\x87\x71\x87\xfc\x8f\x24\x6a\x04\x08\x72\x7f\xb2\x65\x51\x64\x0b\x51\xc8\x6a\x86\xae\xc5\x9b\xbd\x44\x0f\x93\x94\x91\x59\x5a\x38\xef\x96\x1d\x1f\x44\x1a\xfc\xea\xb1\x93\xd5\x0f\x0f\x03\xdb\x9a\xf6\xdc\x20\x75\x3e\x0e\xdc\x4e\x8f\xbb\xd9\x1d\x92\xbc\x97\x8f\x03\xb5\xe2\x4c\x2e\xa2\xaf\x8e\x1a\x83\x80\xe3\xad\xad\x23\x71\x6e\x03\x9f\x69\x56\x51\xf5\xf6\xda\x48\x41\xb7\x66\xae\x62\x2f\x80\x5c\x50\x79\x9a\x10\x4b\x64\x22\x35\x5b\xb5\x28\x8b\x53\x02\xa3\xba\xfe\x68\xfd\x8d\x7d\xb0\x23\x4f\x65\x8b\x52\xcf\x65\xa9\x01\xed\x8e\xf2\xff\x20\x88\x80\xec\xab\x22\xd0\x45\xa2\x00\x8d\x08\xf6\xb0\xb6\xbd\x41\xa7\x0f\xbd\xca\x41\x7d\xb1\xbf\x81\xb5\xeb\x23\xc5\x7e\x51\xfb\x37\x03\xad\xdb\xb1\x27\x1d\x7f\xa1\x4d\x41\x71\x5a\x39\xc5\x29\xef\x6e\x5d\x84\x57\x15\x59\xca\xdb\x68\x47\xe8\x96\xa5\x3a\x44\x37\x7b\xa1\x29\x46\x99\xc7\x8f\xc8\xa3\x99\xc8\xdc\xe4\x10\x10\xd7\x4c\x6a\x19\x89\xb7\xa6\x6a\xb8\x72\x30\x9f\x28\x08\x24\x63\x25\x80\xd0\x92\x6a\x10\x46\x35\x14\x8d\xdc\x88\x48\x1a\x41\x8d\xc0\xd8\x10\xb4\xc7\x52\x1b\x5a\xab\x1c\xd3\x65\xbd\x53\x8a\x17\x6f\xaf\xfe\xef\xd7\x67\x7f\x78\xf9\x7a\x2b\x3b\xe8\xc7\xd7\x5f\xf6\xec\x3e\x57\xe5\x25\xc7\xf7\xac\x47\xd5\xe0\xc2\x48\x44\x31\xa3\x64\xbf\xf3\x89\x38\x7b\xfd\xda\xb7\x8b\x95\x1d\x48\xb5\x04\x69\x97\x34\xe7\xa6\x31\x85\xd7\xa2\x55\xe4\x29\x96\x89\x83\x4a\x1b\x11\xec\x98\x20\x92\xea\x06\x91\x78\xa0\x7c\xc7\x8a\x2e\x7c\x80\xe2\xb4\x4d\xc8\x13\xe7\x37\x7d\x94\x6e\xf8\x31\x0a\x9f\x80\x10\x8b\x5a\x71\x74\x42\x08\xa1\x08\x29\xec\x26\x57\xc1\xef\x1e\x3a\x79\x1c\x5a\xf8\xae\xb1\x63\x4b\xb4\x9f\x18\x52\xa9\xd6\xe9\xe6\x90\x4a\x6b\xc3\xfc\xce\x72\x4e\x89\x8d\x62\x9e\x5b\x35\xe9\xbf\x44\xc2\xee\x9b\x08\x16\xc1\x5d\x2f\x27\xf6\xce\xb5\x45\xf0\x4f\x9f\xf3\x3a\xe0\x8c\x1e\xd7\x27\x24\x41\x07\xe9\x19\xe3\xc6\x42\x44\x83\xc9\x63\x67\xa9\x29\x7b\x40\xf7\xbc\xd3\xa8\x86\x4a\xef\x0a\x79\xa3\x0d\xb8\x49\x0d\xe4\x86\xcd\x92\x84\xc1\x93\x3a\x8f\x7c\x12\x18\x1b\x81\xba\x7b\xa8\xb0\xb5\x7a\x64\x9b\x7a\x9f\x1e\x98\xe6\xfc\xeb\x4b\x4f\xbe\xfa\xd7\x4f\x4f\x1e\xc0\x8d\xee\xcc\xfc\xfd\xf9\x0b\xe6\x6d\x24\xf4\x38\x1a\xa8\xc9\xcb\x8c\x1c\x8a\x52\x01\x9b\x0e\x38\xf6\x75\x06\xe1\x35\xe8\xc9\x4d\xdf\x92\x69\x80\x90\x7a\x81\x04\xe4\x4e\x7f\x3c\x23\x6f\x12\x7b\xfc\x2a\x13\x25\xd6\x5d\xbc\xbf\x8e\x1d\xb1\x9b\x9e\xdc\xcf\x11\x5c\x6a\xbd\x59\x75\xa5\x0d\xe3\x6f\x7a\xa4\xd1\x4d\xa3\x52\x9a\xb4\xfb\x51\xe2\x77\x5a\xdf\x58\x15\xfd\xd2\x68\x19\x5c\x62\x2a\x47\x97\x54\x8e\x4a\x2c\x29\x51\x99\xaa\x00\x11\x85\xcb\x09\x80\x7d\xec\x3e\x0f\xe1\x1c\x20\xa9\x35\x7e\xf1\x84\x86\x84\x01\x1f\xf8\x80\xa7\x91\x2c\x45\xbe\xd4\xe2\x80\x3c\x66\xbe\x9c\x1a\x48\x59\x03\x61\x81\x60\x96\x9c\x01\x1a\x3a\x40\xdd\x69\x0d\x2a\x5b\x14\xe8\x49\x39\x63\xa4\x38\xe0\x3d\x7a\x28\x5c\x5b\x37\x1c\x15\xad\x6e\xbd\x17\x15\x3c\x89\xb0\xcc\xec\x0a\xee\xc1\x58\xc6\xc2\xae\x03\x71\xf6\xf6\x05\x23\xe8\x80\x54\xe6\xed\x6c\x37\x7b\xa1\xf6\x24\xf7\x13\xd7\x7c\x8d\x70\x59\xf0\xc5\x20\xa3\x74\x3c\x15\xb7\x6a\x31\x44\x2a\x80\x81\x3e\xe8\xa2\x22\x9f\x33\x9f\x04\xf8\x83\xfc\x01\x71\xdc\x36\xd4\x9e\x1d\x89\x6b\xd3\x42\x2b\xf1\xae\x46\xcc\x60\xbd\x41\xdf\xb8\xba\xd9\x8b\xed\xf2\x26\x9a\xda\x00\xad\xd8\xf7\xda\x2a\xf1\xec\xc9\x13\x71\xf0\x3e\x27\x6b\x3c\x98\x86\x5f\x42\xd9\xfe\xc3\xde\x02\xae\xdd\x04\xf7\x20\x70\xad\x58\xdc\xd6\x0c\x41\x18\xf4\x01\xd9\xab\x65\xb7\xcd\x4a\xdb\xb5\x8f\xc3\x2f\x9c\xd0\xb7\x42\x35\x5e\x37\xd2\xed\xe8\x84\x4b\x79\xd4\x56\x3f\xbf\x29\x65\x7f\x48\xe8\xe0\x05\x96\x3d\x09\xb1\x81\x0c\x4c\xb7\x8c\x8e\xf6\xbe\x80\x02\x08\x70\x52\xc0\x44\xeb\x02\x27\x2c\x82\xfe\x53\xcd\x44\x78\x1b\xf8\x31\xb0\x4e\x1b\x4b\xc5\x53\x55\x09\x09\xcc\x97\x6a\x8c\x07\xd1\x30\x0a\x63\x24\xc0\x06\x4e\xe3\xba\xcd\xcd\x3d\x1b\x68\x28\x1b\x83\x37\xe0\xae\x93\x1b\xb0\xab\x0f\xb6\xab\x0f\xf6\x6b\x4b\x5c\xde\x00\x38\xd2\xd7\x3b\xff\x62\xe0\x91\x5b\x89\x55\x88\x22\x98\x3f\x5d\x54\x8d\x3a\xd9\x58\x80\xec\x25\x67\xeb\xd0\x75\x97\xbe\x14\xc4\xca\x0e\xea\x2e\x3f\x42\xe8\xff\x8c\xf3\xc5\xa3\xd5\xdb\xa1\xed\xfe\xf2\xd4\x6a\x09\xda\x2e\xe6\x96\x07\x9d\x41\x26\xde\x89\x1b\xb2\x7a\x5d\x9b\xc7\xb1\x82\xf5\x33\xe9\x1d\x2c\xef\x0e\x96\xf7\x2b\x82\xe5\xdd\x40\xac\x7c\x00\x55\xa6\x24\xd3\xe5\x14\x98\xf0\x03\x7c\xb4\x86\x13\x1a\xf5\x9d\x42\x3b\x79\x52\xaa\x2a\xca\x3a\x80\x84\x2e\x22\x4c\x91\x55\xeb\xe2\xec\xfa\xf9\x1f\xbd\x1b\x6b\x6c\xd2\x9e\xc2\x6a\x9f\x29\x5c\x57\xc9\x6c\x03\x78\xbc\xb8\x5d\x14\x88\x86\x13\x03\xb3\x30\xd8\xb0\xc1\x9b\x9f\x43\xf1\x35\x6f\xd5\x8b\xdf\x84\xac\x1e\xe9\x71\x2c\xa5\xb0\x75\xa1\x4a\x32\x9f\x62\x5e\x19\x35\xdd\xc9\xc1\x5f\x9c\xb3\xa4\xe5\xe2\xb2\xee\x59\xcc\x3f\xc3\xf6\xe2\xfa\x0c\xda\x50\xca\x0d\x98\xa2\x18\x07\xd0\x1d\x10\x4e\xd7\x02\x53\x94\xce\xd1\x92\x0e\x4e\xf7\x68\xea\xf8\x59\x0a\x75\x77\xf7\x83\xc1\xab\xea\xac\xc2\xb0\x46\x42\xef\x62\x44\x19\x8a\x53\xf7\x51\xdc\x64\xaa\xa0\x6a\x85\x55\x00\x5f\xe1\xd2\x11\xbe\x8a\x82\x3a\x15\x43\x71\x96\x65\xa7\xe0\x50\x4c\xcb\x85\x28\xeb\x3c\x54\xdb\x44\xeb\x86\x8f\x43\x7c\x40\xa9\x04\xca\x6f\x7d\xb3\x2c\x5d\x34\x7e\x8a\x6c\x0f\x6f\xbe\xb5\x26\xd1\x60\x69\xf5\x4e\x2f\x8c\xa2\x34\xa5\x50\x60\x75\xf1\x90\x18\x73\x79\x1b\xd2\x48\x29\x40\x2f\x46\xa9\x66\xdb\x1e\xa4\xd1\xa3\x1b\xac\x14\x27\x4f\x7e\xeb\xda\x96\x32\x01\xdc\xb8\xcc\x70\x7c\x04\xc8\x77\x24\x2d\x88\xa2\xd4\x39\x66\x17\x84\xb6\x03\x4c\xb5\xc5\x92\xdc\xe3\x45\x38\x8d\x26\x93\xf9\x74\x64\xca\x29\x10\x93\x3a\xd7\x89\x49\xd5\xd1\x6f\xce\xed\x85\xeb\xa5\x9d\x10\xe1\x1d\xb5\x13\xaa\x44\xb2\x08\x0c\xf7\x00\x72\xb2\xf1\xe8\x1c\xc1\x33\x74\x84\x1d\x82\x8f\xd8\xc7\xfa\xb9\x37\x73\x93\x0f\x7d\x00\x45\x32\xa3\xe2\x55\x07\xff\xc3\x9a\xfc\x02\x81\x1d\xdf\xa8\x72\xaa\xe8\xdf\x57\x5c\xf9\x22\xfc\x78\xd8\x9f\x49\x6d\xca\x3e\x27\xf9\x2b\x43\x61\xde\x3e\x61\xeb\x06\x9b\xde\xec\x89\xb3\xc6\x1c\xc0\x36\xe0\x28\x1a\x66\x18\xf2\xd1\x1d\xca\x04\xa6\x0d\xb1\x00\x99\x4e\x30\xae\x14\x43\x3b\xcc\x3d\xad\x28\xa2\xbd\x15\xca\x14\x19\x66\x0a\x24\x0a\x71\x38\x83\xc3\x9d\x71\x23\xda\xd3\xf7\x9f\x7f\xa8\x55\x6c\x27\x71\x3d\x48\xe2\xfa\x4c\xc3\x55\x09\xc9\x14\x7a\x3d\x73\x8d\x1b\xfa\xed\x9f\xd4\xd9\x44\x67\x19\x84\x6d\x4f\x30\x09\x34\xf2\x8e\x1e\x30\xfa\x04\xda\x76\x07\x42\x55\xc9\xe8\x10\x92\xf5\x65\x59\x6a\x04\x89\x5a\xcf\x44\xd7\x03\x42\x37\xea\x9b\x56\xb2\x9c\xaa\xaa\x5d\x1b\x6f\x63\x7b\x63\x6f\x67\xef\xcf\x5f\x6c\x1d\xf4\xf7\xd2\x98\xea\x42\x56\xb3\x95\xcb\xee\x1b\x51\x0d\x04\x48\x3a\x81\xbf\x03\x36\x95\xac\x44\x69\x4c\xd5\xc8\xe4\x39\x15\x37\x7b\x47\x33\x25\xb3\x6a\xf6\x8f\x9b\xbd\x81\xfb\xcb\x7d\xfc\x66\x6f\x9d\xeb\x03\x3a\xef\xaa\xc8\x05\x0f\xb4\x39\x3c\x1a\x0a\x65\x3b\x2c\x1b\xd8\x17\xab\xe7\x83\x37\xfe\x2c\x4d\x4b\x65\xed\x1f\x16\xe8\x7a\x7f\x7e\xfe\xe2\x72\xd5\x12\x2f\x7d\x49\xcc\x54\x56\xd8\x98\x3a\x34\x02\x0d\x22\x27\xa7\xc4\x97\x7d\xe4\x1b\xc7\xf2\x39\x82\x3b\x68\x16\x2b\x0c\xbd\xc1\x27\xc2\x1b\xf3\x56\xe9\xa3\xde\xdd\x09\x6f\xee\x0d\xf6\x6c\x3c\xf0\xee\x96\x25\x8d\xd9\x77\xd3\x95\xe1\xfb\xc0\xd2\x31\x9a\x8a\xed\xc6\x89\xcc\x29\xec\x13\x6d\x2b\xe7\x17\x88\x84\x3a\xad\x4b\x25\x18\x37\x74\x83\x89\xf7\x72\xb3\xe6\x98\xbb\x32\x31\xf5\xc7\x32\x2f\xc7\xcb\xdb\x5a\x23\xf3\xc7\x10\x87\x18\x89\x8b\xeb\x0a\x82\x5c\x32\x36\x77\x38\x31\xe2\xf1\x14\x30\x22\xc5\xcc\xd8\x0a\xa3\x1f\xf9\x5f\xa7\x85\x29\xab\x81\x9b\x9d\x71\x73\x84\x3f\xb7\x7e\xc7\xb1\xba\xe5\xca\xd3\xe7\xeb\x5f\x4a\x8e\x0c\x0f\x1e\x77\x84\x61\x22\xa0\xec\x7c\xbf\xe2\x16\xc8\x96\x37\x2e\xa3\xb8\xd3\x42\xb6\x0e\xe7\x9c\xf6\x88\x64\x57\xf5\x74\x8a\xa9\xb2\x7f\xbc\xbe\xbe\xe0\xbd\x72\x6d\x43\xf8\x04\xd6\xad\x19\x88\x63\xa1\x7d\x32\xde\xda\x60\xf0\xa7\x4f\x30\x79\x18\x7c\x31\xdd\xef\x42\xf9\x1e\xa7\xe3\x62\x79\x98\x1e\x79\xbd\x84\x9c\x82\x91\xc0\x54\x33\xfc\x0b\x16\x18\xb7\x5c\x38\x89\xc7\xdc\xe7\x58\x1e\x1d\x7a\x22\x14\xae\x96\xa4\xec\xe5\x5d\x0e\x4c\x81\x2f\xfa\x24\x93\xde\x7c\x7b\x27\x5e\x9a\x72\x8e\xf5\x25\x17\x7c\x9c\x08\x1c\x1a\x8f\x76\x90\xe0\xc3\x60\xb7\x00\x92\x83\x57\xeb\x05\x2d\xdb\x4e\xe8\xdc\xb2\x99\x0f\xaa\xd7\xf4\xe5\x51\xcc\xea\xb9\xcc\x87\xa5\x92\x29\x90\xec\xe8\xb1\x4f\xd9\xa1\xea\x4d\x1c\xe2\xc7\x12\x63\x2f\xcb\xf8\x37\x30\x28\x3a\x26\xef\x0e\x7d\xdf\x6a\x52\x07\x4b\xd7\xf3\x7e\xb6\x68\xad\x22\x21\x4c\x60\x18\xc8\x2b\xa9\xb3\xba\x74\x5a\x21\x2e\x7a\x88\x8f\xf5\x08\xe9\x18\x29\x1d\x87\xcb\xc4\x61\x3c\x11\x1a\xe9\x19\x27\x27\x25\x99\x2c\xa9\x00\x7b\x8e\xc4\x8e\x76\x14\x88\x9d\xd3\x8c\x3d\x58\xbb\xb9\x53\x65\xa9\x53\x47\x63\xfa\x05\x02\xcf\x21\x7b\xf9\xa2\x89\x6b\x51\x42\xa8\xf5\x3b\x28\xe8\xe5\xe4\xdb\x2b\x8c\x2b\xbb\xd9\x73\x1c\x3c\x9a\xe9\xa3\x1f\x00\x5b\xa8\x04\x42\x0e\x69\xf0\xdb\x0b\x13\x7b\xa8\x81\xb8\x49\xe2\x36\x36\x0c\xe3\x6b\xcf\x65\x6d\x57\x06\x7b\x45\xcd\xd8\x90\x4a\x85\xc8\x1a\x07\x64\x8c\x50\xbf\x22\x2a\xe7\x3d\xc1\xbd\x88\x6b\xb8\x25\xd2\x2a\x4b\x49\x20\x75\x56\xe9\x22\x53\x68\x33\x43\xfd\x41\xe5\x89\xa9\x73\x80\x0e\x5e\x2f\xd0\x00\x43\xea\x97\x6a\x09\x75\xb9\x0f\xf7\x0f\xca\x89\x49\xcc\x88\x72\x17\x80\x20\xe9\x25\xe6\xc5\x00\xff\x71\x54\x18\x20\xdd\x5a\x95\x98\xde\x00\x35\x07\x17\x95\x48\x0d\x42\xd0\x15\xc6\x56\x13\xfd\x51\x30\xba\x10\x5a\x41\x08\x4f\xb9\xc2\x73\xe5\x04\x95\x33\xa7\xf3\xe0\x24\xff\xa1\x4a\x33\xd4\x79\xaa\x3e\x3a\x72\x2e\x7c\x2a\xd2\x42\xc8\xa2\x50\xb2\x6c\xc4\x87\x23\xba\x4f\x5c\xeb\x15\x06\x6f\xb9\x72\x01\xd9\x6a\x66\x12\xab\x42\x34\xd7\x74\x24\xde\x11\xaf\x86\x68\xc9\x97\xa8\x15\x42\x51\x7c\x71\x03\x91\x3e\x37\x7b\x94\x7c\x80\x2b\xe6\x7f\x64\x1d\x05\xe1\xf4\xfc\x12\xe2\x8b\xa0\xb7\xfd\xe5\xf8\xaf\xa3\x0d\x7a\xc0\x54\x66\x1c\xbc\x0f\xb0\xa7\x2e\xfa\xf1\xf7\x3e\x8b\xa7\x60\xd6\x38\xfd\x01\x8b\x30\x12\xb1\xf8\xe2\x1d\x02\x8c\xcd\x23\xed\x50\x53\x5c\x4c\x09\x89\x8c\x4b\x2a\xb1\x7d\x2a\x61\x5e\x36\xa8\x4f\xa6\xbf\x8f\xa3\x9c\xbc\x08\x62\xe5\x6a\x3a\x40\x0d\xb9\x02\x75\x45\x18\xa3\xda\xa7\x3b\xf3\x0d\xc5\xdb\xf6\xe6\xec\x3f\x23\xd0\xb0\x48\x67\xac\x0c\x13\x93\xf8\xf5\x1e\x8a\x12\x15\x9f\xbb\x86\xcc\x53\xe0\x3d\xfe\x82\x4b\x71\x15\x17\x81\xf4\xea\x0b\xe0\x05\x87\x0b\xe8\x6d\xe6\x00\xe4\xd3\x88\xc6\x27\x88\xab\x38\xbf\x8f\xea\x11\x79\xfd\xd7\x0b\xa7\x8c\x66\x08\x4e\x6b\xdf\xfb\x20\x46\x2f\x8b\x71\xbd\x01\x6b\x80\x5b\xf1\xd9\x23\x2c\x70\x72\x32\x0c\x7c\x6a\x1f\x7f\x64\x83\x72\x94\x40\x01\x96\xe8\xf3\x48\x1d\xa8\xda\x32\x03\xcc\x61\xdd\x48\xda\xba\x3e\xdd\x00\x17\x91\x17\x17\xe9\x76\x48\x68\x8a\x9f\x22\xa5\xe2\xbd\xc3\x3e\x55\x4a\x54\xe9\x71\x5c\xf6\x31\xa3\x72\x87\x1d\x50\x50\xfb\xa7\x8f\xc0\xaf\x61\xcd\xdb\x2c\xa0\x6f\xee\x24\xb5\xc4\x93\x7c\x40\xd9\x08\xf7\x55\xf7\x64\x0b\x1f\x15\xef\x72\xcc\x16\x0c\x51\xee\xa8\x9f\x41\x82\x7e\x0c\x1a\xc2\x68\x4c\xfe\x13\x4e\x7d\xf9\xa5\x95\x81\xfe\xc8\x51\x8f\x89\xf7\xd9\xeb\x23\x0e\xee\x43\xd5\x45\xa4\x3f\x08\x42\x0f\xdd\x93\xf9\x0a\x4d\x3d\x1e\x79\xb5\xdf\x9b\x02\x09\xef\x90\xbd\xbe\x14\x85\xec\x7c\x12\x12\xd6\x07\x71\x26\xbc\x47\x25\x8b\x01\x5e\xbc\xd0\x1d\x20\x0c\x11\x04\x31\x1d\x89\x2b\xb7\xa3\x24\xe3\xa0\x3e\x88\x6e\xc9\x58\xf7\xc3\xb4\x20\x79\x0b\xa6\x73\x99\x81\x1d\xa4\x02\x0f\x9b\xeb\x74\x18\xa5\x01\x52\x47\x55\x93\xa5\xf9\x3e\x67\xe6\x1e\xd1\xab\x2a\x03\x30\x21\x7e\x94\xde\x27\xd7\xe9\x7e\x43\xc3\xc3\xfa\xb0\x5c\xdc\xcd\xd1\xd2\x6d\x0a\xd0\x64\x4b\xb6\xea\x6b\x4a\xd5\x88\x69\xce\xc6\x12\xf5\xb5\xe3\xd0\xab\x78\x28\x34\x20\x78\x43\x39\xa6\xec\xac\x8e\x29\x8d\xf9\xea\xd9\xc5\x79\x9c\x43\x16\x55\x75\xa8\x4a\x99\x5b\xb7\x47\x56\xc4\xb8\x3d\x39\x42\xce\xe0\xdb\x85\x2f\x71\x90\x98\xac\x9e\x13\xb2\xfa\xdf\x6b\x9d\xdc\x82\x5f\xf0\x4e\xab\xfb\x66\x0a\x76\xaf\x11\xb1\x61\x78\x86\x8e\x5e\x04\xfa\xed\x9e\x9b\xfb\x5d\x30\xdd\x97\x30\x36\xb6\x97\xbe\xa7\x16\x75\xab\x49\x54\x72\x1b\x04\x16\x6c\x10\x6a\x51\xb1\xc1\x0e\x4b\xd5\x3a\x7e\x8d\x87\x2c\x94\xc6\x49\x54\x96\x59\x51\xa8\x52\x94\xe6\x9e\xd1\x5f\x20\xdb\x3f\xc8\x46\x51\x6b\xec\x3f\xe2\xef\x8f\x23\x0f\xc0\x2d\x7a\xde\x9a\xed\x2e\x84\x6f\x17\xc2\xf7\x09\x16\x37\x47\xbd\xba\x95\x38\xcc\x7d\x28\xfb\x4c\xa1\xc7\x8d\xca\xd9\x55\x4b\x15\xdb\xf6\xe1\xbe\x34\xf7\xbd\x6e\xd0\x47\x32\x20\xf5\x5f\xa8\x87\xbc\xec\x06\xfc\x30\x36\xd9\xf9\xdc\x3a\xb6\xd9\x7e\x21\x42\xe2\xec\xd1\x1a\x89\x16\x05\x22\x87\x1b\x77\xdd\xda\xb8\x5e\x36\x47\x49\x7e\xd0\xc4\x8b\x42\x83\xc6\x98\x1c\xbf\xd3\xa6\xd4\xd5\xa2\xcb\xfb\x1a\x63\x6f\x4f\x25\x36\x0f\x00\x49\x02\x9b\x86\x58\x6e\x3e\x00\xc8\x01\x37\x97\x65\x71\x41\x20\xa7\x75\xc2\xb8\x7c\xd1\x88\x18\x8c\xec\x5d\xa1\x72\x27\x54\x80\x1a\x4b\xb9\xe5\x65\x70\x4b\xd1\x77\xc4\x19\xd7\x30\xa0\x26\x11\x92\x3f\xe4\xe8\xce\x0b\x03\x3a\x66\xd0\xdb\x01\xc0\x6b\x80\x70\x31\x29\x81\x43\x83\xbc\x8c\x1d\xc5\x68\x75\x30\x74\xe4\x33\xfb\x6e\xa1\xf7\xa3\x02\x17\x51\x29\x1b\x88\x24\x00\x3c\x93\x45\x8c\x84\x48\xdb\x8a\x12\x24\xa4\x39\xba\x51\xed\x63\xaf\xfb\x58\xcc\xc9\x02\x4c\x5e\xee\x5d\xd9\x9c\x77\x8a\x79\x7a\xc8\x02\x6d\x53\x03\x71\x03\x69\x96\x0b\x9a\xea\x6a\x56\x8f\x47\x89\x99\x1f\xbd\x3b\x3b\x3f\xa2\x95\x1b\x52\x5c\x08\x85\x82\x8d\x33\x33\x3e\x9a\x4b\x5b\xa9\x92\x8b\x72\xd8\xa3\x27\xa3\x63\x47\xad\x1c\x49\x1c\x62\xf4\x97\x9b\xb9\xd3\xc0\x7b\x77\xb0\x5f\x6b\xca\x19\x4a\xae\x7d\x3e\xe0\x01\xe3\x04\xae\x38\x18\xfe\x78\x76\xa3\x35\xe8\x09\xc3\x4c\xa2\xcc\x4f\x5c\x9b\x38\x61\xa9\x32\x09\x11\x8e\x6e\xaf\xcb\x4a\xfa\xea\x6c\xfe\x94\x00\x70\xa0\x24\x60\x13\xf0\x44\xdb\x91\x78\x6d\xee\x55\x49\x02\x01\xda\x3a\x21\x1d\x3f\x85\x52\x70\x33\x3d\xc5\x18\x48\xfc\xfc\x48\x3c\x27\xb1\x34\x46\x97\xe7\x52\xf8\x3a\xc7\x62\x3c\x8a\x13\xd0\x6d\xa2\x72\x59\x6a\x63\x23\x15\x6b\xaa\xef\x00\x6b\xb4\xdd\xf3\x66\x0a\x4d\xd5\x5b\x96\xa4\xa2\x82\x24\x32\x6f\xde\x96\x40\xc7\xdb\xf7\x65\x20\x6c\x9d\xcc\xc0\x80\x0c\x13\x1f\xf0\x92\x0e\xe8\xb0\x83\x89\x87\xc4\xab\x5f\xe0\x88\x7d\x9e\x79\x10\x08\xe6\x06\x61\xd7\x71\x3b\x2c\x51\xe6\xd1\x9e\xa4\xf0\x6a\x4f\x07\x47\x3a\x91\xad\x9c\xd9\x5d\xf0\xc2\x17\x4a\xce\x41\xd3\x20\x26\x15\xf4\x24\xe9\xc4\x8f\x45\xaa\x12\xf0\xfa\x70\xf5\xc5\xca\x78\x3f\x08\xa6\xef\x60\x33\x09\x96\x07\x2c\x09\x5d\xf1\xf5\x90\x65\xcc\x9f\x7d\xa5\x29\x47\x69\x6e\xf6\xde\x9a\x5c\xdd\xec\x35\x0a\x2f\xfa\x62\x81\x03\x32\xc0\x50\x53\x1c\x4a\xab\x31\x78\x18\x6a\x0f\xb9\x04\x22\x81\xa3\xf9\x64\x91\x8d\xdf\xe7\xc4\x89\x9b\x3d\x71\x40\x26\x5d\x59\x67\xd5\x61\xa7\xbf\x4e\xd6\x1f\xcb\x0e\xfd\xd9\xba\x60\xfb\xd3\xb9\xcf\xee\xbf\x3b\x19\xab\x4a\x9e\xb0\x59\x04\xc4\x3a\xdc\x51\xd0\xe7\xc1\x40\xb9\xab\x4a\xfb\x15\x07\xc3\x7a\x79\x76\x1d\xb5\xbb\x34\xf7\x9e\x87\xa6\xfa\x4e\xa7\xb5\x93\x84\xdc\x8f\x39\xda\x77\xd6\x4b\x9a\xa0\x5f\xf7\x04\xed\xc1\xcf\x5d\x05\x1f\xb4\x71\xf6\x64\x48\xf7\xcf\xd4\x83\x61\x74\x95\x6f\x72\x02\x30\x25\xe2\x18\x7a\x5c\x25\x3b\xf0\x7c\xfa\x60\x92\x19\x59\x7d\xf7\x0c\x4b\xd8\x55\xdf\x3d\x3b\x1c\x08\x0a\xd2\xb6\x03\x61\xf5\xbc\xc8\xa0\x3a\x0c\x08\x78\x80\x7b\x6a\x1c\x93\xcf\x32\x64\x67\x5e\x36\x6c\x38\x5d\x3b\xc3\x21\xf9\x2f\xf2\x44\x40\x84\x91\x9f\xdf\x06\xf1\xa1\x9c\x46\x84\xd0\x0d\xe9\x72\x3b\x88\x8f\x50\x66\x03\x48\x2c\xab\x86\xb0\x13\x09\xbb\xe5\x11\x1d\x4b\x95\xa9\x3b\x99\x57\x34\x52\x14\xbc\x6a\x4b\x50\x4b\x16\x84\x19\xee\x18\x63\xdc\x89\x05\x94\xe6\x7e\xc0\x25\x66\x03\x05\x19\x84\x9a\xb2\x63\x15\xd0\x15\x5d\x1b\x60\x87\xa6\xae\x8a\xba\x8a\x4a\x5b\xb1\x93\xc9\x7f\x46\xb0\x30\xb2\xff\xdc\xb8\x4d\xa8\x54\xba\x3f\xa0\xd1\xf9\x91\x87\x2c\x97\x76\xc1\x1e\x27\x1e\x97\x75\x8e\xe1\x57\xf0\x3e\x28\x48\x00\xfd\x99\x07\xf9\x09\xd2\x30\xee\xb4\xad\xc1\x7d\xd7\x11\xa1\x1e\x41\xb5\x7d\xce\x13\x84\xad\x34\x4b\x58\x50\xe4\xb5\xf5\x9a\x5e\xd3\xfb\xb1\xd2\x71\x18\x33\xa6\xb1\xb4\xca\x17\x61\x6e\xb2\xb6\xc2\x64\x3a\x59\xa0\xa0\x42\x3d\x33\x49\x45\x5d\x51\x9c\x4f\x3c\xa3\x1a\xb4\x80\x82\xd9\x95\x37\x89\xf9\x13\x34\xe1\x6d\x8f\x38\x4d\x33\x9a\xa0\x05\xb9\xee\x25\x7a\x72\xb8\x47\x78\x31\x54\x66\x63\xb2\x96\x87\xf1\x05\x8f\xba\x0d\xb6\x99\xe7\x33\x45\xc5\xfe\xbc\x4a\x8c\x5e\x2b\x2c\xfd\xf3\xa7\xde\x72\xb1\xe4\x3c\x28\x64\x69\xbd\xd2\x36\x57\xa9\x96\xde\x11\x1a\x35\xee\xb7\x0e\xaa\x3c\xc9\x0c\xd5\xc8\xb5\x95\x18\x22\x50\x8d\xb6\x58\xa7\x12\xa2\x2c\xe0\x3a\x0c\x28\x5f\x88\x17\x0e\x9e\xa8\x3c\x31\x69\x28\x2d\xfd\xe0\x40\xc0\xb2\xce\xa1\xba\xc5\xa5\xbc\x87\xf0\x48\x8b\x67\xee\x53\xcd\x2a\xdd\xf3\xbb\x9c\xa5\xf4\x7e\xfa\x61\x16\x92\xc6\x97\x36\x60\x46\xbe\x31\x63\x80\x10\x95\x80\x04\xc6\xb9\x2c\x6f\x3d\x54\x77\xef\xbd\x59\xc7\xab\xc8\x1c\x42\xd1\x4e\x1d\x9e\xb5\x34\x6c\xe3\x8f\x4d\x05\x96\xda\xc5\x60\xd6\xde\x31\x0d\x17\x37\x93\x00\x91\x27\x73\xab\x97\x46\x03\x2e\x8b\xc7\x38\x18\x97\x5a\x4d\x0e\x39\x2a\x23\x7c\x95\xc2\x49\x83\xe2\x4c\x4b\xb5\x6f\x37\xfa\xde\x66\xf1\x69\xbe\xd7\x01\x00\x3b\x9a\x89\xb8\x06\x08\xa1\x57\x32\xb3\x6a\x20\xde\xe7\xb7\xb9\xb9\xef\xff\x40\xbf\x32\x7a\x4d\xb7\xcc\x6d\xa3\xef\xbc\x87\x63\xf8\x20\x92\x88\x51\xc4\x0b\xdc\xaa\xfc\x4d\x6a\x10\x94\x13\xf6\xf0\x8b\xc0\x2d\x1c\xd1\x74\x84\x95\x19\x06\xa3\x59\xc7\x40\xec\xcb\xb9\x06\xc5\x2c\x21\xbe\xb9\xb9\x8f\x60\x0f\x19\xc5\x3f\x46\x43\x9d\x99\xdc\x71\xb2\x7c\x11\xf3\xd5\x71\x5d\x45\x0a\x7e\x54\x93\x1b\x4b\x96\xf9\x5a\x9e\x78\x54\x66\x32\x4f\x33\x26\xd7\xa1\x97\xed\x2b\xc1\x6b\x8a\x1a\x72\x3d\x43\x29\xee\x4b\x59\x14\xca\xa9\xfb\x80\xc2\x0e\x24\x00\x4b\x1b\x82\xc5\x8a\xea\xb6\x3b\xdd\xa8\x2c\xb1\x1c\x4c\x69\x67\x32\xa3\xe4\xbd\xff\x3c\x7b\xf3\x1a\x96\xda\x51\xbf\x91\x10\x7f\xc6\xde\x70\xfd\x7c\x12\x33\xe8\xfa\x80\x02\x44\x05\x2a\x20\x11\x13\x6a\xec\xcd\x4c\x1a\xd5\x79\x07\x0b\x5c\x21\x93\x5b\x77\xdf\xcc\x64\xa2\xca\x9e\xa5\xd9\x7e\x05\xc5\x46\x5d\xab\x55\x4b\x16\x15\x7b\xc3\x8a\x84\x3e\x85\xb4\x89\xd1\xeb\xda\x22\x1c\x6f\x03\xd7\xb8\x28\x4d\x65\xc6\xf5\x84\x17\xd1\xad\xe2\x51\x9d\x47\x7f\x31\x40\x61\x80\x25\xf4\x2e\xd2\x98\x15\x37\x32\x48\xae\xa1\x1c\xd2\x0b\x8c\x00\x82\x12\x24\xb9\xf8\xc1\xd0\x00\xd7\x7a\x48\x29\x38\x00\x90\xe2\x72\xd3\x43\x26\xf1\xe7\x2e\xbe\x96\xc9\x87\xb9\x9a\xa2\xd1\x6d\x52\xa2\x67\xde\xb2\x37\x18\x6a\x61\xca\x4a\xc0\xcb\xf8\x97\x13\xf5\xb2\x1a\xe9\xc1\x5b\x7e\x91\x9e\x51\x16\x31\xd0\xfa\xd0\x17\xc4\x18\x60\xe9\x21\x00\x44\xcd\xe3\x4f\x42\xcf\x4d\xe8\x78\x53\xa3\x28\x7c\x2f\xcb\x94\x11\x21\x47\x82\xc1\x86\x41\x65\x3c\x76\xbb\xf3\xfd\xf7\xdf\x0f\xe8\x3f\x28\x5b\x59\x7d\xa7\x46\x3d\x41\x77\x6c\xd0\x83\x3c\x5e\xaa\xe8\xd9\x4c\x8b\x02\xf5\xfd\xe3\xa6\xa9\x10\x76\x59\xec\xc6\x65\xa0\x6a\x1c\xac\x61\x26\xe2\xfd\xf5\x73\xbc\x11\x56\xe7\x89\x12\xef\x73\xfd\x51\xa8\xc2\x24\x33\x71\xf2\xfd\x7f\x1c\x0f\x8f\x4f\x86\xc7\x27\xd7\xc7\xc7\xa7\xf0\xff\xff\xab\x3d\xd3\x63\x78\xde\x68\x42\x93\xff\x7e\x78\xf2\x64\xf8\xf4\xe4\xfa\xc9\xd3\xd3\x6f\xbf\x3f\xfd\xf6\xfb\xff\x15\xad\xc2\x26\x00\xff\x9f\x49\x9a\x16\x85\x5a\x57\xac\x94\xdb\x44\xfe\xe0\xa6\xd2\xea\xe3\x07\x18\x12\xc1\x27\xb0\x43\x32\x3b\x62\x3a\x60\x05\x4a\x54\x1e\xbb\xf6\x87\x1e\x81\x10\xc4\xd6\xca\x42\x87\x64\x82\xf3\x05\x9b\xaf\xb8\x02\x69\x84\xa8\x1f\x0c\x76\xee\x72\xfb\x02\xaa\xc4\x0e\x74\x9e\x39\x8e\xce\x73\xd9\x99\x0c\x77\xe8\x63\xff\xa6\x06\xaa\x06\xfa\xc8\xaa\x7b\xdf\x68\xd8\x8f\x85\x02\x8b\xd3\x83\x85\x72\x96\x65\xbe\xc2\x43\xde\xc4\x3b\x09\xf5\xae\xb1\x0c\x10\x6d\x9e\x6b\x17\x23\xa8\xec\x2e\xe8\x0e\x16\x65\x07\x8b\xf2\xeb\x83\x45\xd9\x51\xfe\xaf\x97\xf2\xff\xd9\xd1\xd7\x97\xee\x63\xab\xc8\x3e\x34\x88\x55\x7b\x1f\x81\xab\xee\x48\xa3\x92\x58\xc3\x20\x8a\x20\xdf\xd0\xfa\x43\xcf\x3a\x6a\xcd\x32\x23\xee\x3b\x2e\xbf\x71\x7a\x93\x8b\x6f\xc4\xf9\x04\x04\x38\x77\x6a\xce\xd2\x14\x25\xbd\x37\x54\xe3\xe0\x14\xa3\x09\xd5\x3d\x99\x1c\x1a\xc2\xe4\xa8\xfd\xfa\x0b\xc4\xa7\x3e\xf5\xc1\xe2\x6d\xe9\x53\xcf\xc1\x52\x59\xa9\xcc\xd7\xe2\xe4\xba\x97\x9d\xce\x5e\x3a\xf2\x74\x2a\xbe\x09\x69\xf8\x8e\xbc\xcd\xe7\xa0\x6b\xfe\x8e\x2c\x1a\xe8\x68\x9f\x43\x39\xac\x5b\xa7\x6b\xe5\x16\xf2\xa1\x96\xaa\x30\x5b\x30\x55\x06\xc3\xd0\x67\xc4\x35\x7f\x96\x29\x12\x9c\x99\x5f\x0d\xb2\xe7\xba\x53\xba\x83\xf6\xdc\x41\x7b\xee\xa0\x3d\x77\x71\xc1\xff\xba\xd0\x9e\xbd\xc4\x7c\x15\x74\x54\xd4\x8e\x4b\xc3\xa2\xf5\x3d\x4b\x11\xe9\xc3\x22\xde\x65\x1e\x6a\x06\x73\x9c\x19\x24\x0d\x5f\x1b\xb0\x82\xba\xb3\x3c\x40\xce\x27\xc9\xac\x17\x82\x30\x1b\x1f\x91\x16\xac\x3e\xe8\xbb\xce\xc5\xc2\xd4\xa5\xef\x7a\x10\xd3\x55\x30\x01\x21\xad\x7b\xe7\x0d\x50\xd0\xdc\x93\x43\x6c\x33\x12\xff\x69\x6a\xd4\x37\xb9\x26\x22\xd6\xcd\x56\x25\xb6\xbf\x93\xa5\x36\xb5\x15\x45\x56\x4f\x35\xba\xcd\x71\xf0\x47\x47\xe2\x9c\xfb\x22\x43\xf8\x29\x8e\xec\xcd\xe2\xec\xe2\x9c\x3e\x4b\xc6\xe7\x7f\xde\xe4\x37\x15\xaf\xaf\xb7\x99\x7d\xf8\x9b\x35\xf9\xe9\xcd\xde\x00\x0d\x50\x37\x7b\x1f\x5c\xb3\x37\x8b\x0b\xfc\x16\xb7\xa7\xae\xb8\xf5\x9c\x9e\x43\xf3\x9f\xf1\x93\xf8\xcb\x59\xe3\x73\x67\xa8\x2d\x33\x01\xe2\xd7\x25\xfe\x8c\x6f\xd3\x44\x5e\x7e\xfc\x22\x13\x69\xec\xe5\x23\x4e\xe7\x1d\x3a\xaa\xef\x75\x89\xbe\x5f\xf4\xf8\x82\x0e\x97\x19\x73\x0b\x89\x90\xd5\x0c\x1d\xc7\xb7\x78\xfe\x4e\xf1\x23\x37\x40\xce\x6f\xf6\x4e\x6f\xf6\xa2\xc9\xdf\xec\x0d\xf0\x61\x60\xf6\xd0\xe4\xee\xc4\x3f\x09\xb3\xe0\x9e\xe2\xbe\x68\x3e\xdc\xba\x8a\x86\x7d\x7a\xb3\x37\x31\x86\x9e\xfc\x3c\xa0\x49\x5c\x19\xcc\x32\x9e\xc9\xa2\x50\xb9\xfd\xbd\x78\xa1\x10\xe6\x07\x52\xde\x21\x0d\xd7\xcd\xdf\xc9\xb8\x0b\x39\xcf\xdc\xb1\xf5\xde\x09\x4e\x85\x06\x2f\x04\x83\xf6\x80\x73\xa2\x71\x5f\xe2\xdd\x75\xba\x22\x54\x3f\x83\x9e\x41\x4b\x96\xf7\xe4\x41\xc7\xda\x82\x95\x29\x55\x8a\x8e\x12\x70\x5e\xe4\xee\xa4\x60\x05\x67\x27\x58\x7f\x74\x07\x44\x81\xc3\x05\x42\x42\x8a\x85\x38\xa8\x41\xeb\x76\x84\x05\x65\x15\xb7\x6c\x87\x38\x90\x2a\xae\xc7\xc6\x17\xd1\xf5\x44\x27\x85\xcf\xe1\xbe\xe5\x52\x2f\x40\x83\xb0\xca\x73\xe8\x4d\x4c\xea\x9c\x3c\x10\x3a\xb7\x95\x04\x9c\x40\x24\x1d\xb0\xd9\x38\xca\x70\x02\x70\x16\x8e\x14\xc4\x27\x71\x20\xaa\xba\x04\xa9\x50\x57\x61\x78\xec\x45\x63\xb7\xe6\xa2\xe0\x5c\xec\xca\x94\xbe\x31\x34\xe5\x35\x3c\xb8\x7e\xf7\xe2\xdd\xa9\x63\xa8\x18\x7e\x6a\x15\xb9\x16\xab\x46\xfd\x7b\x14\xeb\x6a\xf4\xd8\x72\xc7\xfe\x8e\x90\x27\xb7\x5d\x86\x30\xe1\xaa\x68\x34\x02\x95\x8e\x0e\x3f\x1b\x04\xb9\x7d\x8f\x37\x32\xf4\x6b\xcb\x55\xef\xc7\x50\x6d\x54\x54\xa6\x10\x99\xe3\xa8\xa1\xb0\x2f\xd5\xe7\x2e\x54\x29\xee\x25\xc4\x32\x71\xc1\x7d\x8b\x01\x9e\x19\x82\x42\x79\xaa\x8c\xab\x10\xdd\x46\xa6\x3f\xf7\xca\x5d\xd6\x3e\x32\x24\xdc\xff\x75\x28\x91\x10\xbd\xc4\x08\x1a\x8f\x46\x23\x71\x74\x44\x2a\x17\x5a\x20\x1d\xc5\x71\x87\x48\x1c\x98\xf1\xdf\xc4\x37\xdd\x0f\x1e\x8a\x2b\x55\xfd\x50\x9a\xba\xa0\x8b\xef\x04\xbb\x83\xe9\xdd\xad\xf8\xc6\x31\xda\xbb\x93\x51\xfb\xe1\xa1\xf8\xa7\xa0\x47\x68\xdb\xe4\xb1\xb9\x4f\x0c\xa6\x77\xb7\x87\xe2\xe7\xdf\x89\x4e\x97\x87\xe2\x9b\xf6\x6f\xc0\x22\xa3\x65\xf7\xe6\x55\x38\x54\x00\xdf\x06\xd2\x8a\x56\x79\xa2\x90\x91\x39\x01\x91\x96\x1a\x6d\x66\xd9\x82\xa5\x44\xd7\x01\xfb\x6b\x19\x10\x00\x17\xdf\x1d\xb7\x90\x1c\xed\x4b\xa4\x3f\xd8\xcc\xba\xd4\xb6\xf3\xb9\x86\x8a\xd6\xdd\x58\x69\x97\xa6\xeb\xc3\x61\x2a\x85\x8e\xaa\x9b\x56\xb3\xc6\xb5\xb3\x44\xdc\xb0\x24\xe2\xb0\x9a\x95\xa6\x9e\xce\x9a\xc0\x7e\x2c\xd3\xa4\x4a\x66\x61\x91\x82\x39\x9b\x84\x70\x09\xf2\xc1\x50\xe7\x23\xd1\xbc\xc0\x36\x76\x8b\x32\xb9\x72\xe4\xc3\x6f\xec\x44\x49\x70\x56\x0d\x87\x10\x35\x35\x08\xb1\x59\xaa\x4a\x46\x21\x52\xd8\xdd\x7c\xf2\x79\xd6\x95\xac\x36\x8a\xab\xb9\x94\xf7\x7b\x83\xbd\xe7\x18\xb9\xfc\x32\x4f\x4c\x8a\x6e\x79\xfa\xc5\x8d\xa1\xab\xd1\xb6\x9b\x77\xd6\xb8\xd5\x00\x9c\xea\xfc\x6f\x5e\x2f\x0c\xaf\x12\xfb\x97\xf2\x7e\x5f\xa0\xa8\xfe\x3e\x0f\xc5\xef\x11\x2d\x38\x37\xfe\xc5\x5e\xdb\x60\x3c\xcc\x65\xa3\x00\x3b\x8b\x40\x24\xc7\xc8\xef\x8e\x01\x0b\x7e\x38\x9e\x1d\xe2\x88\xfa\x06\x13\xf5\x07\x21\x12\x7d\x03\x72\xeb\xd9\x27\x06\x23\x99\x06\xb9\x17\x79\x07\x46\xb8\xc4\x5c\x98\xe9\x39\xe6\xa7\x73\x1d\x6e\x88\x9e\x42\x6b\x19\x86\x4f\x79\xe9\x93\x10\x41\x9c\x86\x63\x2b\xa0\x8c\xd9\x02\x22\x41\x41\x6e\x09\x71\x2c\xa9\xc9\x15\x1f\x4c\xb7\x11\x08\x7b\x07\x31\x0c\x12\xed\xde\xda\xa9\x85\x70\xb4\xf1\x82\x63\x19\xc3\x55\xc1\x1a\xe3\x45\x05\x71\x1a\x5f\xe8\x7a\xd7\x95\xce\x8e\x74\x5e\xd9\xaa\x1c\x9d\xe7\xd5\xbb\xf2\x0a\x7b\x5a\x71\xcd\xa3\x66\x94\xf2\x0e\xa5\x03\xb8\x84\x2b\xec\x04\x26\x20\x3d\x7d\x22\x1a\xc9\x61\x02\x3c\x16\x70\x2e\x74\x8e\x62\x81\x29\x31\x3a\x26\x8a\xee\xc0\xf2\xe9\x71\xbc\xc7\xc0\xad\x63\x51\x9a\xb4\x4e\x94\x15\x48\x7b\x6d\x3d\x57\x5c\x5c\x36\x27\x33\x1e\x63\x02\x11\x01\x5a\x98\x1a\x54\x22\x79\xa7\x30\xbc\x96\xe0\x73\x07\x1c\xa1\x88\x57\xda\x8f\x5c\x26\xb0\x7f\xe4\x03\x30\x9c\xf1\xb4\x72\xbb\x74\x5e\x0d\x4d\x39\x0c\x1b\xf3\xa0\xd5\x67\xbf\xf9\x79\x3e\x31\xab\x97\x7c\x62\x82\xfd\x85\xde\x82\xf5\x8f\x53\x30\x66\xe6\x5e\xdc\xab\xfd\x2c\x13\xf7\x54\xe1\x20\xd5\x96\xc1\x39\x28\xa8\x78\xe3\xb0\xc0\xb9\xfc\x9b\x29\xf7\x06\x7b\x73\x9d\xc3\xff\x4e\x75\x15\xc0\x96\xa7\xba\x7a\x6e\xe6\x73\x5d\xe1\xbf\xaf\x4b\xa5\xae\x2a\x59\xa9\xbd\xc1\xde\xb8\xd6\x59\xfa\x02\xff\x3d\x35\xe1\x15\x77\x2f\x75\x06\x91\x12\x45\x26\x2b\x37\x8e\x2e\xf9\x0b\x2f\xf7\x9d\x79\xdf\x45\xdf\xc3\x30\xa4\x25\x4f\xc3\x20\x97\x34\x58\x75\xdd\xc2\x4c\xfa\x9e\xe2\x5a\xf5\x3e\x81\xd5\xeb\x7b\xe2\x17\xe1\x93\x2e\x31\xe2\x45\x04\xc3\x83\xff\x89\x25\xfb\xa3\xbb\x13\x99\x15\x33\xc9\xb0\xc9\x57\x95\x29\xe5\x34\x46\xd9\x5e\x76\xd6\xce\xd0\x63\x4c\x88\x14\x20\xdb\xe7\x09\x58\xcf\x20\xc2\x2d\x32\xa2\xba\x5b\xe9\xee\x4d\x8a\xfa\x11\xc3\x86\x46\x4f\x91\x13\x59\xcf\x8f\x2b\x43\xa5\x3a\xd0\x01\x19\x0a\x83\xfa\x0c\xec\xb1\x53\x6d\xf2\x0d\xc0\x92\x64\xa1\x71\x66\xe7\x2f\xfa\xc1\x69\x62\x08\x13\x37\x74\xf7\xb1\x30\xb1\x5e\x16\x03\x13\x91\xe3\x8c\x97\x69\x09\x16\x53\xb4\x3c\xd1\xf4\x79\x22\x1c\xdc\x8c\x13\xb2\x2a\x98\x5d\x40\x34\x67\xa6\xcb\xc6\xe9\x50\x11\x95\x0d\xa9\x39\x45\x97\xb7\xc6\xf2\x00\xa0\xed\x56\x71\xef\x4c\xdb\x6a\xc8\x4d\x14\xa8\x2a\xad\x51\xac\x9d\x27\x6f\x64\x1c\x6c\x4a\x85\xd3\x79\xbb\xdb\x1b\x1b\x74\x34\xda\x53\x71\xa0\x46\xd3\x11\x88\x56\xbd\xf8\x3d\x5b\x3e\xf6\x1b\x1f\xf8\x9b\x5c\x50\xe3\xb8\x94\xab\x0c\xa9\x1d\x9b\xfa\xd2\xdc\x0b\x2b\x22\xa9\x77\xde\x8a\x5d\xe0\xd2\xaf\xd0\xfa\xef\x81\xbe\xb4\x15\x37\xf5\xf1\xf1\xd3\x04\x72\x1d\xe1\x9f\x6a\x84\xbf\x78\x1c\x49\xfc\x71\x6b\x65\x0e\x07\x78\xa7\x7a\xcb\x38\x50\x8e\x1e\xe2\x2b\xba\x66\x1c\x15\x8c\x66\x1f\x4a\x8e\x5a\xa0\x7c\x1e\x55\xb4\x02\xaa\x56\x2d\xb2\x4d\x86\x49\xbc\xc2\x8f\xb1\x43\x6f\x46\x4b\xe8\x8d\x1b\xe0\xaa\x04\x83\x1e\x0e\x6b\x89\x4f\x35\x78\x28\xa0\xee\xaf\xe0\xb1\xf0\x9c\xf4\xbd\x4f\x62\xb2\x8f\xb6\x00\x38\xf1\xad\x14\xaa\xdc\x0a\x07\xb8\x42\xe2\xbc\x8d\x9e\x88\xbe\x6f\x87\x33\x6d\x94\x0a\xf4\xc2\x07\xf8\x76\xc2\x22\x6c\xa3\x37\x21\x01\x24\x45\x95\x18\x3f\x64\x9a\x91\x3f\x1b\xe4\xff\xf8\x1c\x9c\x0e\xfb\xca\xa4\xad\xae\x7d\x3a\x0d\xa7\x4e\x34\xc7\xf9\x1a\x72\x6e\xf4\x5c\x35\x33\x37\xa2\x34\x1c\x2e\x3d\xee\x34\x67\xca\xd8\x04\xec\x78\x30\x0c\x7e\x1e\xe1\xb8\xa6\x0c\x87\x75\x40\xb3\x0f\xc8\x59\x82\x08\xe8\xd5\x29\x44\x66\x0c\xfb\x9c\xfe\x80\xb9\x08\xbd\xdc\xfd\x7c\x22\xac\xaa\x06\x2d\xd6\x8d\x9b\x39\xf2\xfe\xd4\xa9\xef\x21\xa4\x7a\x84\x25\xbc\x97\x16\xe1\x56\x21\xe7\xb1\x2e\x36\x00\xf8\xfb\xee\xd9\xaa\x9c\xaa\xeb\xd9\xaf\x3d\x7d\xaa\xd1\xf9\x46\x02\xe5\xa6\x09\x81\xee\x24\x6d\xe9\x7e\xaf\x8b\xa6\x39\xf3\xa1\x32\xcd\xf7\xd6\xa6\xa4\xec\x62\x62\xbe\x70\x4c\xcc\x27\x06\xb6\x7c\x32\x0b\xdd\x45\xb8\x3c\xa2\x8c\xfb\xf5\x85\x93\x7c\xba\x6e\xbb\x25\x4a\x75\x45\xa2\xf6\x72\xa0\xf0\x76\xeb\xae\x08\xfe\x09\x6e\xd1\xcf\x95\xc3\x56\xd1\xd6\xcd\xa4\x6c\xfb\xf8\x62\xf6\x6a\x5b\x96\x3b\xf8\x26\x7f\xb9\xce\x26\x73\x3e\x01\x9f\x6f\xef\xac\xe4\xb4\x54\x8a\xa1\x10\xc0\x8f\xe8\xdd\x42\xb6\x69\xdc\x80\xa8\x8c\xbc\x85\x78\xe0\x24\x0b\x20\xd3\xb2\x0a\xc9\x5c\xef\x9c\x4c\x76\xaf\x29\x4a\x28\x34\xce\xd4\xa4\xc2\x4d\x1f\x45\x83\xf1\x9c\xc0\xdd\x27\x3b\x0b\x29\x28\x1a\x1c\x71\xdd\x9d\xa3\xba\x01\x14\xc4\xeb\x3a\x71\xad\xef\x4b\x5d\xc5\x48\xd9\x03\x61\x0d\xcb\x43\x7e\x10\xec\x99\xd7\xb9\xb0\x8b\x3c\x69\xd4\x42\xca\x9a\x38\x17\xb1\xf9\x78\x39\xb6\xc8\x75\xe0\x4f\xa1\xc2\x1d\x8a\x76\xd2\xa7\x6c\x76\xc5\xed\x7d\xac\xf9\xf4\x39\x90\x91\x9f\xcc\x1e\x22\xb4\x8d\x3e\x7b\xdf\x5c\x16\xc3\x5b\xb5\xb0\x5e\xc4\xff\xeb\x0a\xab\xe0\x5c\x16\x28\xcf\x35\x24\x90\x65\x32\xa3\xbb\x3f\x8e\x39\xf3\xed\x29\x54\xd9\x77\x28\xbf\xd0\xa2\xf4\x99\xb7\xd7\xae\x88\xef\xf0\xfc\xc5\xfa\x85\x59\x4d\xe7\x3f\xd7\x14\xbf\x65\x2d\x72\x0d\x33\xa8\x53\x5d\x39\x16\xb4\x61\xb6\x41\x22\x0b\xcc\xe6\x84\x60\x93\x59\xb3\x36\x8c\x77\x9c\xb5\xcc\xd7\x94\x73\x06\xdf\x12\x99\x99\xae\x93\x64\x21\x80\x65\x6f\xb0\x07\x2f\x9c\xbf\x40\x65\x74\xaa\xa8\x95\xb2\xd5\xfb\xcb\xf3\xbd\xc1\xde\x9d\x2a\xc7\x7b\x83\xbd\xda\xaa\xb2\x47\xec\xcd\xb9\x52\x4b\x9f\xb5\x25\x3c\x24\x96\x55\xe7\x96\x33\x55\x53\x71\xab\x16\x9c\xab\x23\x0b\x0e\x54\x42\x97\x70\x4e\xb3\xa0\x0c\x8b\x08\xd1\x90\x4a\x5f\x60\x68\xa2\x23\xf9\x77\xe6\x36\x58\xef\x39\xb9\x96\xa9\x5a\x32\x93\x3a\x8f\x0b\xe6\xc8\xda\x51\xe1\x8a\x12\xb4\x06\xf0\xb7\x29\xd9\x83\x0e\xe8\x2d\xe9\x5c\x5b\xe0\x3e\xf4\x0d\xa8\xdb\xa0\xbc\x6e\x08\xf9\x56\x61\x5e\xb2\x0c\xf8\x91\xd1\x98\x51\xbe\xa6\xc2\x17\x10\x57\x65\x0b\x93\x7b\x28\x4e\xaf\x7c\xc6\x5d\x31\xa9\x03\x11\xaf\xf2\xfe\xf3\x91\xf8\x51\x2d\x3c\x95\xaf\x73\xfd\xf7\x5a\x65\x1e\xc5\x73\x11\x1d\x0f\x44\xe4\x9c\x17\x26\xe7\xbc\x94\x3b\xa3\x53\xb4\x22\x26\x26\xcb\x34\xd2\x0d\xf0\x07\x88\xc2\xa4\x56\x25\x75\xa9\xab\x05\x82\xf6\x8c\xfc\xcc\x59\x30\xc4\xdf\x0f\x21\x6d\xac\x56\x31\x54\xa4\x9d\x99\xb2\x1a\x89\xb3\xd6\x42\xb4\x9d\x29\x1e\xd5\x0d\x8e\x5a\xdf\x79\x0c\xd8\x29\x17\x8d\x73\xd5\x4d\x28\xdb\x29\x58\x5b\x56\xb0\xf8\xda\xf7\xc4\x13\xb9\x23\x46\xa7\xf9\xfc\xc5\x20\xc2\x7b\x00\x6f\xbe\x0c\x85\xa8\x7b\x19\xbe\x9e\x3b\xd9\xcc\xe4\xee\x8d\xf7\xb6\x2f\xfd\xef\x3c\x6a\x81\xf5\xb3\x5b\x1e\xf2\x35\x7c\x6a\xd4\xbc\xc6\x4e\x3d\x70\x1f\x02\x77\xfe\x4e\x79\xdb\xaa\xf2\x86\x4c\xa2\x7b\xe3\xdc\xe1\x78\x0d\x11\x90\x92\x23\x7c\x90\x58\xdf\xcb\x08\x20\xa4\xdf\x72\xe7\x16\xf3\xd2\x6d\xf0\x92\xf4\x36\xa8\xb4\xa0\x72\x5e\x7d\x26\xea\xda\x52\xe5\x68\xa8\x05\x36\x12\x2f\xb8\x1c\x1e\xa2\xc7\xb9\xb3\xf9\x9a\x65\x08\xbf\xc6\x88\xae\x67\xf2\xa1\xdf\xd1\xb8\x86\xfa\x43\xe5\x21\x37\xeb\xe0\x2c\xb9\xe4\x71\xa2\xbd\x0f\xba\x5d\x86\x00\x1a\xc2\xe7\x3a\x85\x67\x06\x3e\x2a\x07\xef\x00\x57\x66\x8a\xfa\xe3\x1c\xba\x32\xf5\x35\xb6\x5a\x1c\xef\x80\xb0\x7c\x1c\xbd\x19\xb2\x2f\x5c\x62\xe1\xb5\xc3\x01\x62\x0a\x39\x82\xc5\xaa\x55\x88\x28\x1e\x30\xee\x19\x44\xfc\x04\xf6\x67\x4a\x31\x57\xe5\x34\xc2\x7d\x91\xdd\xa4\x86\x10\xe5\x15\xa2\x85\xdd\x95\xa0\x23\x2d\x05\xe5\x38\x63\x1b\x88\x4e\x80\xaa\xa8\x23\xf1\x8e\x98\xdc\x64\xe9\xfe\x08\xf1\x2e\xcf\x16\x4e\x92\x99\xc2\x8e\xf3\x92\x08\x3a\x77\x39\x83\x20\x7f\x72\x76\x20\x07\x57\x86\xed\xbb\x54\x89\xd2\x77\x2a\x6d\x80\xee\xf4\xa0\x13\xc5\x4b\xcf\x30\x4f\x20\x02\xf8\x43\xf3\x59\x36\xf5\x37\x3a\x29\x0d\x1b\xd6\x23\x69\xac\x07\x9b\x85\x9f\x05\x10\x6e\x1c\x95\xfb\x09\x6c\xd7\xb9\xaf\x15\x16\x0a\x6e\xcb\x55\xe1\x18\x9c\x57\xbe\xc1\x51\x6e\xe3\xc1\xf3\xab\xfe\x48\xf3\x59\x8e\x7b\x6c\x1e\xe6\x49\xa5\xca\x38\xbe\x9d\x98\xaa\x3f\x68\x51\x14\x7a\x88\x2c\xa4\x83\xed\x8e\xc8\xa7\x1c\x23\xca\x9b\x7f\xcd\x52\xc9\xe7\x1f\x1e\xec\xf1\x6a\x89\x61\xfe\x3a\x5a\x1a\x5f\xad\xb8\x30\x45\x9d\x01\x07\x74\x84\x53\x70\x95\x9f\x9e\xc5\x02\x1a\xc7\x85\xd9\x30\xe0\xee\x95\x29\x85\xc5\x52\x9d\x93\x3a\xf3\x9d\xdb\x41\x84\x97\x08\x09\x9f\x0c\x2c\xec\x7a\x7e\xce\x36\x16\xec\x8a\x4a\x7d\x62\x67\x6e\xed\x6c\xf8\x42\x0b\x62\xa0\xd1\xaf\xbb\xd7\x75\x65\x86\x61\x02\xde\x0e\x80\x6f\xbd\x41\xff\xce\x36\x0a\x0d\x83\x7a\x0c\x1b\x7a\x7e\xd1\xe7\xf1\xc0\xbd\x3e\xbf\xb0\x03\x24\xab\x21\xf9\x80\xef\x81\x29\xf5\x54\xe7\x3e\x91\x00\xa4\x34\x4a\x65\x16\x45\x69\x3e\xea\xd5\x65\xd6\xba\x82\x28\x2a\x49\x7d\xce\x97\xa9\x6a\x01\x2e\x04\x44\xb5\x7b\x6f\xfb\x41\x2e\xe9\xe3\xbb\x1a\xec\x72\x99\xb7\x67\xaa\x3e\x85\x1e\x31\xf8\x25\x0a\x72\xd0\xcd\x16\xa9\x52\xdd\x2b\xd9\x9d\x05\xc1\xec\x51\x44\x3b\xd7\xe3\xd9\x94\x74\xe8\x96\xd8\xca\x8f\x88\xb8\x20\x39\x84\x21\x48\xf8\x99\xc4\x3e\x6f\x48\x69\x50\xc5\x96\x96\x27\x42\x6f\x71\x16\x42\xe3\x15\xe2\x76\xb5\xad\x98\xdd\x55\x65\x6d\x97\x6d\x23\xa8\xd1\x9d\x41\xff\x49\x95\x63\xa6\xdc\xc1\x16\xe2\xb8\xeb\x78\x49\xd1\x71\x42\xf2\x78\xb5\x8c\xde\xd1\x4d\xe5\x72\x2b\xe6\x5e\x95\xc3\x04\x9c\x97\x50\x53\x18\x83\xc4\x1f\xec\xb5\x3b\x6a\x6e\xcb\x51\xbc\x2d\x1b\x26\x67\x86\xd3\xf3\xa0\x52\x9a\x1b\x80\x82\x32\x25\xde\xc8\x02\xd3\x16\xdd\x1e\x62\xb8\x59\xe7\x54\xf4\x8d\x50\xcf\x60\x0f\x23\x5e\x40\x78\xb8\x73\x2f\x7e\x25\xda\xef\xd6\xdd\x8b\xac\x1a\xa0\x85\x6f\xe7\x43\xfc\xb7\xf6\x21\x36\xcd\xbd\x1b\x92\x18\xc8\x85\xbb\xf4\x87\x76\x05\x9d\x69\xb6\x8c\x43\x5b\xfc\x81\x81\x95\x8c\xac\xc2\xed\x42\x09\x4b\x5c\x62\x4b\x6a\xc1\xc2\x07\x99\xa7\x60\x9a\xc6\xc4\x67\x85\x61\x91\x58\x42\xb9\x6c\x20\x8b\x37\x6a\x2d\x92\xbb\xd2\x33\xe1\x38\x1a\x27\x71\x87\x6b\x75\x3d\x07\xee\xed\xad\x9c\xf7\x15\xeb\xbd\x8c\x1f\x37\xc9\xaf\x5f\x13\x2f\x74\xe5\x72\xae\x22\x60\x57\x02\x2d\x27\xc8\xd2\x91\x78\x6f\xf1\x12\x7a\xbf\x17\x11\x68\x2b\xc2\x9a\x53\x8e\x30\x27\x54\x01\xa2\x17\xce\x10\x3e\xab\xe7\x45\xe6\xab\x36\xab\x3b\x05\x85\xba\x6d\x54\xf9\x27\xaa\x96\xa4\x2d\x27\x44\x3d\x4c\x10\x2d\xe3\xa3\xd2\xbf\x1a\x4b\x56\x82\x0a\x9e\x96\x75\xa6\xa8\x48\x14\x10\x81\x9b\xfc\x26\x7f\x15\xf2\x75\x4e\xc5\x7e\x61\x52\xbb\xef\xb1\x5c\xdd\x5f\x23\xfc\xf1\x28\x33\xd3\xf0\x00\x25\x8d\xa9\xa3\x2c\x7e\x56\x66\xc2\xed\xbf\x09\x0d\x25\x22\x99\xd1\x20\xc8\xdd\xab\xcb\xf8\x45\xff\x85\xd6\x6b\x71\x93\xb8\xf3\x23\x9b\xc8\x4c\xb5\xda\xba\x9f\x9a\x9d\xba\xb9\x9d\x4f\x9c\x02\x93\x26\x80\xc0\x6a\x03\x84\x5b\x85\xa0\x61\x3a\x45\x86\x08\xcb\x02\x9a\x8e\xca\x6d\x5d\x46\x07\x99\x0d\xfa\xe6\x4e\x95\x99\x2c\x50\x2c\x43\x58\x16\x88\xa3\x73\x1f\xe9\x3f\x07\xdd\x89\x37\xe6\xa3\x49\x39\xf0\x57\x80\x4a\x22\x3c\xe4\x40\x7c\x4a\x1c\xff\x32\xa1\x68\x05\xed\x69\x35\x8d\xe0\x69\x72\xc8\xb7\x6b\x78\xaa\x8c\xc8\x54\x05\x09\x61\x1a\x92\x0f\x2b\xb0\x2a\x99\x94\xfd\x16\xbe\xa6\x2a\x89\x1f\x9b\xa4\x9f\xfc\xd0\x4f\xa2\xce\x2e\xce\x3f\x91\x4a\x35\x87\xb0\x0d\x5a\xb5\xa1\xb4\xa6\x9b\x69\x3d\x9f\x30\xd8\x55\x15\xd0\x7a\x1f\x40\xf5\xaf\xde\xa7\x7c\x18\x57\x3e\x5c\x95\x8d\x15\x1d\xe8\xde\xe7\x54\xf1\x78\x0b\xd9\x27\x7c\x6a\x2f\x80\x6e\xaf\x3a\xac\xd8\xa2\x21\x16\x27\x26\x9f\xe8\x69\x5d\x06\xe1\x97\xfd\xa5\x53\xcd\x68\x80\xb0\xd4\x75\x46\x85\xc0\x66\xe6\x9e\x6a\x86\xa3\x72\x89\x5a\xb6\xd3\x70\xa7\xa6\xd4\x08\xa4\x48\xe6\xa5\x75\xd2\x3d\x74\xba\x93\xee\x77\x29\x2a\xbf\x52\xd1\xbb\x8f\x15\x30\x54\x83\x77\xfe\x4e\x0c\x41\x0e\x41\x34\xd1\x58\x67\xba\xa2\x74\x10\x47\xda\x74\x3e\x29\xa5\x8f\x02\xd8\x66\xce\x8a\x99\xeb\x0a\xac\x70\x3d\x02\xd1\x3b\xff\xac\x29\x11\x11\xd6\xa9\x1b\x32\x3a\xb1\x72\x83\x16\x3a\xaa\xb7\x88\x10\x24\x4d\xe3\x10\x21\x25\x30\x60\x6f\x48\xaa\x87\xc2\xce\x4e\x78\xd0\xb9\x2f\xca\x6e\xd1\x36\x57\xe7\x74\x19\xc7\xa6\x9a\x41\xd7\x54\x9a\xf1\x81\x22\x1f\xd0\x8f\xae\xb8\x07\xb4\x8a\xea\xb3\x45\xa1\x08\xe4\x28\x09\x61\x11\x51\x39\x7d\xb6\xbf\x57\x23\x71\xe6\x1b\x20\x1c\x63\x95\xcc\xc4\xbc\xce\x2a\x5d\x64\x8a\x6b\x91\x76\xa7\xf4\xea\xfc\xf2\xea\x1a\x5b\x03\x97\xac\xb1\x26\x61\x6d\x19\x22\x87\x0b\xf5\x10\x81\x85\xb1\x68\x2b\xde\x9a\x9c\xca\x0f\x50\x0c\x8b\x93\xa6\x4a\x9d\xa6\x2a\x07\x78\x15\x47\x59\x93\xd9\x10\x24\x26\x10\x50\x2b\xbe\x4e\xcc\x21\xdd\xe6\x8d\x04\xd2\x76\x9c\xba\x5b\x50\xb7\x4c\x00\xfe\xe1\x26\x56\xae\x5e\xd9\x4f\x55\xee\xc3\x37\x3f\xa7\x9e\xf0\xa6\x39\x36\x4d\x3e\x07\x5f\xdd\x50\x95\xc4\x37\xd6\x22\x4a\xfa\x56\x7d\xf6\x2a\x78\xda\xb4\x8e\xef\x2c\x56\xff\x8a\x16\x2b\x12\xa3\x76\x26\xab\x9d\xc9\x2a\x9c\x86\x07\x11\x1a\x20\x4d\x6b\x09\x8d\x6b\x05\x85\x0f\xc3\x36\x52\x25\xb9\xc9\x24\x60\xfe\x40\x5a\x5a\xcc\xbf\x46\xec\xf7\xa7\x9a\x2b\xa1\x18\x1a\x8a\xe8\x66\x42\x06\x16\xb4\xd5\x1c\x50\x11\xe6\xd2\xaa\x84\xa9\x05\x34\x3c\xdc\x2c\x1e\xb2\x9b\x80\xd7\x1f\x01\xe3\x38\x1c\xf2\x57\x10\x0b\xfc\x94\x3c\x43\x8c\x4c\x2c\x65\x93\xe1\x2e\xd3\xda\x40\x39\xeb\xab\x66\xe3\x9f\x45\x22\x48\x89\xab\x49\x26\xab\x8e\xd2\x7a\xb3\x77\xb3\xe7\x6d\x22\x50\x9b\x86\x3b\x49\x63\xc3\x5c\xbf\xb5\x02\xd7\xd3\xbf\xf1\x30\x19\x25\x37\x39\x9b\x9f\xde\x5f\xbe\xee\x2f\xce\x13\x37\x20\xca\xa2\x80\xf5\xbc\xbf\x7c\x2d\x0a\x59\xcd\x68\xa6\x41\x60\x81\x03\xe1\xae\xf8\x37\xc8\xed\x01\x6b\x86\xe1\xf9\xc0\xd3\x4d\x85\x3b\x27\x75\x96\x0d\xc4\x44\x23\xcc\x9e\x2a\x38\x34\xc1\xf5\x3a\x12\x2f\xd1\xb4\x05\xf8\xd9\x37\x7b\xee\x8a\x94\x3a\xb1\x37\x7b\x62\x28\x5e\x9b\x69\xd8\x45\xa8\x0a\xc9\xe7\x5e\x70\x33\x78\x67\xa6\x64\x56\xcd\xfe\xf1\x8d\x7f\xc9\x49\x2a\xf8\xa3\x48\x66\x2a\xb9\xb5\x0f\x5a\xae\x5f\x5e\x6a\xa5\x92\x8d\x3a\x7d\x98\xe0\xda\x3a\x3b\x1e\xde\xaa\x54\x28\x89\x41\x54\x28\x56\x31\x7c\xa8\x29\x6b\x43\xdb\xe6\xb2\xcb\xb0\xdc\x04\x17\xac\xe2\x94\xd0\x81\xc6\xb6\xc7\x10\x15\x5b\xd6\xfc\x9f\xc9\x79\x0d\x3f\x2f\x09\x11\x01\x5f\x35\x99\xff\x7a\x0d\xb4\xe2\x8c\x5c\xea\x36\xae\x04\xef\x29\x8e\x9e\x10\xde\xa0\x14\x73\x35\x1f\xab\x12\x25\x25\x5f\xd9\xec\xbd\xff\xfe\xea\x8b\x1f\xc6\xf1\xb0\x4d\x73\xef\xad\x98\x9a\x15\x07\x4e\xbe\xef\x46\x08\x38\x42\x73\xb8\x6c\xc6\x6b\xc6\xf9\xb0\x11\xde\xa9\x72\xbc\x64\x84\xf0\x28\xaa\x5d\x16\xc6\xb3\x7a\x10\xee\xbd\xcf\x33\xd3\xae\xcc\x6a\x58\xe2\x1c\xda\x8c\x3d\x53\xce\xc2\xd7\x98\x74\x50\xf9\x80\x96\x5d\x02\xc2\x2e\x01\x61\x97\x80\xf0\x6f\xa8\xd0\xee\x12\x10\x76\x6a\xf4\x2f\x91\x80\xf0\xeb\x31\x68\xff\xfa\x33\x25\x48\x02\xd9\xe5\x4b\xec\xf2\x25\x76\xf9\x12\xbb\x7c\x89\x5d\xbe\xc4\x2e\x5f\xe2\xdf\x34\x5f\xa2\xfa\x65\x29\xe4\x2e\x6d\x63\x97\xb6\xf1\x65\xd2\x36\x96\x78\xb7\x3f\x27\xd1\xa3\x8b\x12\xb7\xdd\xa4\x90\x25\x52\xea\xc3\x8d\x6c\xbb\x04\x91\x7f\x19\xeb\xc4\x63\xb9\xdb\x1b\x36\xd9\x9d\xcf\x7d\xe7\x73\x6f\x1d\x89\x07\x11\x9d\x5d\xca\xc8\x2e\x65\x64\x97\x32\xb2\x4b\x19\xf9\xf2\x29\x23\x4b\x44\xa6\xaf\x39\x71\x64\x55\xf2\xc2\xbf\x4d\xd2\x04\xed\xdb\x2e\x75\x62\x27\xf7\xee\x52\x27\x76\xa9\x13\xbb\xd4\x89\x5d\xea\xc4\x17\x49\x9d\x68\xf0\x9d\x2f\x9c\x40\xd1\xfd\xf6\x83\x94\xac\x5d\x32\xc5\xbf\x1e\x97\x7b\x64\xeb\xce\x2e\xa5\x62\x67\xde\x59\x22\x72\x7f\x02\xe9\xd9\xa5\x57\xec\xd2\x2b\x76\xe9\x15\xbb\xf4\x8a\x5d\x7a\x45\x9b\xcf\xee\x92\x2c\x76\x49\x16\xdb\x4b\xb2\xe8\x3f\x54\x9b\x31\xec\xb1\xaa\x76\x99\x16\xbb\x4c\x8b\x5d\xa6\xc5\x2e\xd3\xe2\xeb\xd3\x76\x77\x99\x16\x3b\xed\xfa\x5f\x2f\xd3\x42\xbc\x78\x79\x71\xf9\xf2\xf9\xd9\xf5\xcb\x17\xa7\x4e\xec\x12\x57\x8d\xc8\x4f\x1a\xaa\xad\x8b\xc2\x94\x4e\x73\xd4\x49\x69\x84\x55\x89\x81\xb0\x56\x5b\x29\x09\x66\xd1\x30\x94\xd1\x73\x90\xec\x43\x0f\xde\xa1\xa5\x50\x31\xa8\x42\x19\x7e\x0a\x33\xae\x2d\xcc\x7c\x97\xf1\xe1\x25\x73\x14\x84\x76\x09\x1f\xbb\x84\x8f\x5d\xc2\xc7\x2e\xe1\x63\x97\xf0\xb1\x4b\xf8\xd8\x25\x7c\x7c\x22\x85\xec\x08\x38\x97\x4b\x68\xf0\x26\xa2\xce\x2e\x7d\x64\x97\x3e\xb2\x4b\x1f\x79\x94\xf4\x91\x7e\x91\xf7\xc1\x76\xc3\x5d\xf2\xc8\xbf\x8c\xc1\xe5\xb1\xc2\x0b\x62\x2b\xf3\x2e\xb8\x60\x17\x5c\xd0\x3c\x11\x0f\xa1\x38\xbb\xcc\x91\x5d\xe6\xc8\x2e\x73\x64\x97\x39\xf2\xe5\x33\x47\xfa\xa5\xa5\xaf\x39\x71\x64\x57\x71\x64\x57\x71\x24\x3a\xba\xbb\xdc\x99\x9d\xd8\xbf\xcb\x9d\xd9\xe5\xce\xec\x72\x67\x76\xb9\x33\x5f\x24\x77\x26\x66\x3b\x5f\x38\x75\xa6\xf3\xe9\x87\xe8\x98\xbb\xc4\x99\x7f\x3d\x16\xf7\xb8\x96\xad\x5d\xde\xcc\xce\xb4\xd5\x2f\x6d\x3f\x9c\xee\xec\xb2\x66\x76\x59\x33\xbb\xac\x99\x5d\xd6\xcc\x2e\x6b\xa6\xc5\x64\x77\x49\x33\xbb\xa4\x99\xed\x25\xcd\xf4\x9e\xa9\x88\x5b\xa3\xd8\x34\x9c\x9a\xf0\x2a\xfe\xd4\x89\x2d\x60\x18\xb4\x8f\x2a\x79\x5e\x2a\xc8\x79\x90\xd9\x4a\x87\x78\xa3\x25\x6b\x81\x4e\x9b\x53\x1f\x55\x32\x44\x3e\xce\xe9\x23\x95\x11\x24\x66\xb9\xfd\x75\xe4\x88\xde\x83\x47\x10\x25\x51\x95\x32\xb7\x10\x41\xf3\x50\x3c\xa1\x9d\x62\xb1\xb3\x9d\x7d\x45\xf2\xbe\xe3\xa3\x3d\x01\x78\x85\x4a\xc4\xcc\x64\xc0\x6c\x82\xcb\xa4\x90\xd6\xdd\x13\x3a\x3d\x78\x5d\x38\xe4\xc9\xdf\x08\x27\xcc\x21\x6d\x47\xd7\x00\x5b\x6e\xdc\xa9\xa2\x90\x19\xe6\xde\x49\xdc\xfb\x40\xd8\x3a\x99\x39\x31\x48\x53\xca\x93\xb2\xec\x89\x80\x13\x2a\x93\x4a\xdf\xad\xb5\xc7\x79\x22\x12\x78\x5a\x1f\x11\x19\x2d\x21\x22\x6e\xe6\x14\x29\xd8\x1b\x7e\x4a\x91\xa3\xe0\x82\xcd\x32\x8c\xd6\xa5\x15\xa0\xf5\x80\x58\x6a\x58\x3a\x38\x1a\x31\xf1\x60\xc7\xae\x5f\x2b\x9f\xbf\xe5\xa4\x15\x83\x6b\x96\x54\xec\x69\x79\xec\xa9\x52\x54\xe8\x0a\x62\xfe\x99\x14\x19\x16\x73\x5b\xe4\x9d\x86\xbb\x3d\x7e\x71\x45\x47\x7f\x3d\xcf\xd0\x15\xb6\xa6\x7d\xdd\xf4\x44\x77\xc2\x02\xc3\x1d\x59\xcb\x34\xa2\x13\xdf\x93\x29\x15\x1e\x82\x9f\xae\xac\x55\x88\x79\x0e\x87\x2b\x55\x8e\x2e\xb0\x53\x69\x3e\x97\x48\x20\xc7\x0a\x52\x02\x25\x1c\x5f\x20\x68\xac\x72\x52\x97\x45\x69\xe6\x45\x3c\xc6\xb1\x31\x99\x92\x8d\xf0\xec\x5e\xb9\x16\x83\xb2\xb5\x8d\xe2\xb1\x7b\x86\xa5\xf2\xc4\xd4\xa0\xe1\x22\x2f\xa5\x50\xe9\xc4\xa4\xca\x06\x22\xf0\xec\xf8\xc4\xfd\x31\x9d\x2a\x0b\xa4\xbb\x28\xd5\x9d\x36\xae\x5d\x74\xa3\xee\x15\xd0\x4e\x70\x92\x6f\xfd\xb6\xf0\x84\xb6\x7b\x43\x7c\xaf\x5b\x3c\xc8\x9e\x56\x6d\x26\xfe\x10\x0d\xc3\xc3\x1c\x2f\x27\xa7\xac\x86\xbd\xaa\x8c\xa3\x4d\x10\x40\x70\x6d\x6e\x15\x52\xb7\xe7\x30\xb6\x1f\xd5\xe2\x85\xac\x24\x5a\xb6\x55\x6e\x35\x9c\x1d\x30\x62\x58\xe2\x01\x60\x10\x21\x12\x07\x3a\xee\x98\xfa\xa6\x44\x03\x9d\x0f\xe7\x6a\x6e\x4a\xf7\xa0\xba\x57\x2a\x67\x4e\xea\xbe\xe2\x04\x33\xa6\xa9\x45\x69\x30\xbc\xfe\x65\xf4\xa3\xae\xac\xca\x26\xdc\xbf\xac\x44\xa6\xa4\x05\x4e\x5b\x94\xc6\x9d\x7c\x27\xae\x68\xe9\x08\xb5\x12\x85\x2a\x29\x19\x67\x03\x89\x0d\x47\xf1\xdc\xfd\x30\x01\x19\xf0\x45\xaf\x77\xe9\xe2\xe5\x1b\x9f\x1e\x44\x03\xbf\x7e\x7d\x25\x92\xf0\x9e\x15\x07\x21\xcb\x38\x0e\x97\xb7\x03\xc7\xe5\x64\xbe\x38\xec\xb5\xa6\x24\xf1\x0a\xaf\xfe\x70\x51\xea\x3b\x27\xa5\xde\xaa\x45\x48\x39\x1e\x9b\x3b\x15\x8f\xa3\xf7\x23\xea\x63\xa1\xd1\xc9\xbc\x22\x22\xfe\x65\xb7\x91\xd0\x79\x4a\xb3\x93\x02\x88\x9f\xbf\xe4\x9e\xe0\xc5\xa7\x0a\xbe\xf3\x99\x7e\x34\x1f\x29\xef\x0e\x61\x8f\xee\x03\x67\x13\x84\xbf\xb1\x92\xa5\x93\xd6\xe0\x17\x16\xf2\x23\x21\x6d\x02\xa9\x18\x44\xc0\x9b\x37\xff\xa1\x31\xcf\xeb\x42\x87\x3f\xe7\x86\x5f\x46\x74\x76\xd9\xad\xf6\x14\x97\x55\x07\x6f\x84\x94\x63\x53\x57\x42\x8a\x89\xd4\x99\x4a\xe3\xe4\x38\x3e\x8c\x6d\xca\x8b\xcc\x8c\x3b\x9c\x29\x99\xaa\x72\x93\x9b\x62\xd2\x1e\x56\x00\xc9\x31\x14\x40\xd2\xf9\x90\xcf\x73\xa2\x7d\xe9\x64\x4f\xb9\x7b\x32\x55\xe5\xde\x60\x0f\x39\x29\xfe\xf4\xf4\x89\xdb\x7f\x1c\x58\xf7\x8b\x7f\x84\xdf\x89\xa4\xc1\x27\x69\x0a\xeb\x3f\xb7\x69\xd6\xf9\x06\x4a\xf1\x9a\x70\x91\xcd\x0f\x01\x85\x6a\x7e\xa2\x7a\x6b\x77\xfa\xed\x4e\xbf\xdd\xe9\xb7\xff\xee\xfa\x6d\x1f\x11\xf9\xd7\x54\x6f\x7b\x67\xba\x4d\xed\x76\xe9\x52\x6e\x89\xb6\x7f\x8e\x6e\xbb\x74\x6c\x5f\x8b\x6a\xfb\xa8\x5c\x71\xa7\xfb\xec\x74\x9f\x9d\xee\xf3\x55\xeb\x3e\xb7\xf5\x58\x0d\xe5\x74\x5a\xaa\xa9\xac\x4c\xec\x17\x72\x6b\x33\xd5\xb6\x2a\x7d\xce\xe8\xd9\xc5\xb9\x93\x4c\xf4\xea\x30\xff\xd0\x2a\x8e\x7f\x67\x20\x06\x74\x7e\x8b\x42\x96\x95\x4e\xea\x4c\x96\x02\x5c\x4e\x24\x87\x8e\xc4\x5b\x39\x57\x18\x8a\x31\x56\xe2\x66\x8f\x64\xd1\x11\xf8\x0a\x6f\xf6\x76\xf2\xee\x4e\xde\xfd\x15\xcb\xbb\xdb\x89\xdf\x6a\x86\x2d\xaf\x90\xa1\xbd\x14\x1c\xcb\x06\xee\xfe\x65\xc6\x11\x96\x7c\x0a\x87\x2f\x68\x9b\x80\xdf\x00\x60\x7e\x74\x59\xd7\x50\xc6\x16\xed\x88\xe2\x14\x9a\xb4\x63\xd4\xa0\x1d\x1b\x4a\xb9\x7e\xf0\xa9\x2a\xf5\x1d\xf0\xe4\x30\x09\x32\xa1\x60\x96\xe2\x63\x8e\x75\xbd\x9c\xfa\xf0\x30\xdd\x4f\x23\xb9\x4d\x89\xf6\x13\xfb\xe8\x48\xb2\x9f\xd6\xcf\x73\x93\xa3\x35\x66\x33\x3e\xe0\x9b\x0b\x6c\x31\x26\xc2\xeb\x4e\x80\x22\xb2\x1a\x71\x0d\x59\x35\x19\x04\x5c\xfd\x35\xe1\x75\xf0\xcc\x9f\xa9\x6e\x98\x9d\xb4\xd5\xb5\x93\xef\x34\x0b\x0c\xdd\xf1\xbe\x76\x32\x5a\xc5\x88\x1e\x89\x1f\x73\xe5\xdf\x63\x8f\x8c\xc9\x19\xdc\x06\x03\x0a\x31\x8f\x6f\x2b\x62\xc4\x1c\x11\x65\x7a\x6c\x68\xf5\x5c\xe6\xc3\x52\xc9\x54\x8e\x33\x25\xa8\x1d\x4b\x3c\xee\xe6\xa6\xaa\x92\x3a\xb3\x74\x37\x32\x98\x8d\x1f\xfa\x92\xec\x58\x69\xfb\xf8\x24\xa2\x09\x0e\xdc\x3c\x87\xf7\xa6\x4c\x07\x81\x82\x0a\x7c\xc7\x0b\x74\x7e\x99\xf6\xed\x46\x9f\x5c\xaf\xda\xf2\xc1\xa8\x3d\xba\xa6\xff\x06\xd0\x77\x47\xdc\xaf\x4b\x37\xbc\x57\x32\xb3\x6a\x20\x08\xe1\xa1\xf7\x73\xf8\x43\x47\x28\x5b\x14\xde\x02\x0a\x18\x40\x9d\x0f\x7d\x75\x02\xd7\xba\xe0\xfb\x66\xcb\x66\x40\x5f\x74\xb5\xf0\xee\xec\x82\xf0\xbf\x12\xd9\xea\xb3\x82\xf0\x3f\x8d\xa3\xed\x62\xf2\xbf\x4a\x99\xee\x51\x62\xf2\x3f\x51\xb7\xfb\x6c\x62\xb5\xce\xc0\xd5\x6c\xf9\xf9\x62\xea\x08\x81\xef\x60\xf3\xdd\x01\x26\xfc\x2c\x95\x0e\x44\x35\x83\xd4\xf2\x85\xa9\x31\xb0\xdb\xf1\xce\xca\x88\x54\x5b\xf8\x67\x64\x89\x70\xa4\x0a\xff\xd9\x64\x00\xbd\x04\x12\xd4\xd1\x8b\x52\x9b\x52\x57\x8b\x37\x3a\xd7\xf3\x7a\x8e\xb8\xdb\x8e\xda\xf1\x83\x2e\x05\x4d\xe4\x1f\xea\x3c\xcd\xfa\xbc\x72\x67\xf8\x04\x2f\xe0\xc5\xcb\x37\x82\xed\x28\xcf\xcf\xc4\x18\x1f\x61\xf4\x34\x43\xd3\xd5\x64\x0d\x27\x10\x02\xd5\x14\x87\xf7\x6d\x40\xd4\x8e\xcc\x2d\xe2\x7c\x22\xea\xdc\xc7\x67\x0f\x84\x5d\xd8\x4a\xcd\x11\xfb\x4a\x94\xc6\x54\x56\x98\xbc\x89\x5f\x06\x2b\x07\x79\x79\x9d\xf3\x1f\x79\x01\xc7\x8b\xca\x49\x60\x1f\x87\x01\x08\x6b\x98\x31\x54\xa9\xa3\x6d\x95\x99\x6b\x10\xfc\x37\x81\x0b\x09\xa9\xec\x90\x8d\x0f\xa4\x83\x46\x33\x33\xb6\xea\xbd\x89\xbd\x9b\xd2\xff\x99\xb8\x55\x5e\xcf\xf9\xab\x05\xfd\x8c\xdf\xc3\xef\x13\x0f\x9a\xc9\x3b\xe5\x4d\x79\x23\xf1\x47\xc0\xe3\x0c\x2f\x60\x80\xba\x37\xb2\x4f\x79\x2e\x85\xcf\xbb\x1f\x2f\x88\xca\x59\xc8\x58\x44\x6c\xaf\xd0\x81\xc9\x55\x03\xb6\x1c\x64\x4a\x66\x9f\xd6\xb3\x4d\xec\x78\xae\xa7\xb3\xca\x27\x6c\x02\xaa\x22\x02\x84\x8a\xde\xd9\xdd\x11\x16\x78\x0d\x31\xc7\x34\xc4\xfb\x99\xc9\x78\xa0\x53\x05\x16\x9a\x59\x73\x52\x98\xf8\x51\x94\x7a\x2e\xcb\x85\xb0\xa6\x04\xb9\x82\xb2\x6a\xf2\xee\xa7\xe6\xf5\x7c\xc0\xd9\x93\xd8\x97\xad\x44\x5e\x43\x98\x78\x65\x60\xc2\xb6\x12\x07\x4f\x8e\xc5\x58\x4d\x1c\xcd\x3e\x39\x3e\xc4\x6f\x20\xc2\x5d\xef\x57\xe0\x24\x66\xc5\x4c\x8e\x55\xa5\x13\x99\x01\x5a\xba\x2c\xb5\x0d\xb0\x07\x31\x5e\x03\x4b\x10\xe2\xe0\xee\x64\x34\x96\x25\x7f\xea\xee\x64\x34\x31\xe6\x50\xfc\x59\xed\xa7\x20\x47\xcc\xe7\x2a\x4f\x85\x35\x73\x55\x41\x64\x7b\xa6\x6f\xd5\xa9\xf8\x86\xb8\x86\x38\x50\x1f\x13\x55\x54\x80\xce\x99\xc3\x16\x1c\xba\xdd\x3f\xf9\xed\xf1\xf1\x31\x90\xa3\x0b\x29\xaf\x94\x15\x07\xff\x1f\x7b\xff\xda\xdc\xc6\x8d\x35\x88\xe3\xef\xff\x9f\x02\xc5\xad\xa7\x6c\xa7\x28\x5a\x4e\x26\xb3\x4f\xb2\x35\x2f\x14\xd9\x4e\xb4\xb1\x1d\x8e\x24\x27\xfb\xdf\x51\x6a\x06\xec\x06\x49\x44\xcd\x46\x0f\x80\x96\xcc\x6c\xf9\xbb\xff\x0a\xe7\x00\x68\x74\x37\xfa\x42\x99\xb4\x9d\x0c\x9f\xad\x9d\x58\x6c\xdc\x71\x70\xee\x97\x9f\x0a\x96\x5f\xad\xf9\x52\x4f\xc9\x73\xc6\x4d\x2b\x1b\x8f\x03\x13\xe0\x0b\x85\x02\x00\xb0\xbc\x2f\x4f\x4f\x4f\xd5\x38\x63\x3a\xcf\x21\xd7\x3b\xbb\xba\xe5\xc5\xf5\xab\xab\x9f\x0d\x76\xda\xc6\xbc\xcd\x22\xcd\x1c\x7e\x53\x4d\xb5\x6f\x0d\xc9\xa1\x76\x34\x82\x57\x83\xd7\x66\xf5\xe5\xe6\x6f\x2d\x45\xbe\xca\x60\xec\x44\x94\x92\xae\x0c\x25\x26\xff\x7f\x51\xd6\x0c\x49\x6b\x46\x2a\x54\x56\x65\x2c\x6c\xfb\xaa\xa9\x4a\x93\xd8\x10\x05\x2c\xaf\x0a\x88\x30\x48\x93\x2c\xbc\x87\x80\xf9\x8a\x02\x88\xcd\x7e\xe2\xd6\x4a\x2e\x34\xea\x0e\x43\x0b\xba\xc8\x09\x58\x0c\xfe\xf2\x97\xaf\x00\xfd\x99\x51\x82\x39\x72\x9e\x4d\xad\x53\xbe\x7d\xc3\xac\xca\x66\xe9\xc4\x1c\x8f\x8e\xee\xaa\x04\x1c\xd0\x88\xa5\x40\xa5\xb2\x6c\x8b\xc0\x5a\x3b\x38\x06\x7e\x7c\x88\xb0\x15\xdf\x14\xe6\xf0\x58\x66\x48\xa9\xdf\x4e\x6e\xee\x3d\xb3\x63\x49\x2c\x7e\x60\x41\x66\x59\x66\x68\xe6\x1b\x92\x2c\x77\x61\x04\xed\xc6\x6b\x09\x9d\xef\xba\x78\xfa\x46\xb6\x11\x73\x08\x3e\x79\x6d\x13\x21\xcf\x08\x09\xb2\x00\x4d\xc9\xcd\xe4\xee\xd9\xcd\xa4\x23\x95\x62\x8d\x48\x76\x4d\xeb\x1a\x00\x7f\x20\x45\x86\x8b\x00\xfc\x62\xae\xc6\x61\xc4\x70\x55\x1c\x22\x56\xcc\x27\xc3\x45\x62\x7c\x09\x21\xaf\xad\x36\x79\x05\x91\x4b\xe6\x42\x69\x4e\x7e\x67\x52\x0c\x20\xb8\xc6\x3a\xda\xb8\xad\x1b\xa9\x5d\x71\x03\xb2\x5c\x3f\x52\xc1\x9a\x28\xae\x08\x53\x07\x59\xbc\x68\x63\xd8\xd5\x86\x66\xd9\x94\x14\x52\x2c\xe8\x02\x92\xd9\x42\xa3\x67\xa7\x0a\x98\x5d\x08\x98\x12\x4b\xc2\xfe\x5d\x56\x19\xa9\x1d\x9e\xe6\x98\xb4\xb6\xca\x06\x63\xb9\xf7\x26\x9f\x60\x10\x67\xa9\x59\x75\x8a\x6e\x69\xd4\x9d\x94\x7d\x1c\x8d\x71\xb8\x22\x37\x13\x80\x31\x83\x23\x6f\x26\x53\xc2\xb5\x85\x69\x73\x62\x68\xd2\xc9\x45\x5e\x6f\xd5\x18\x45\x4d\x2d\xf7\x02\x41\x5e\xf6\x1c\x33\xf6\x8e\x27\x62\x25\x69\xb1\xe6\xf0\x86\x66\xe4\x66\xf2\x63\x7b\x0c\x83\x7c\xa8\xd4\x8e\xe9\xbb\x99\xdc\x99\x55\x68\x83\xbd\xb0\x96\x07\x86\xeb\x61\xf8\xbf\x3d\xd8\xc7\x66\x27\x1b\xfa\x9b\xf0\x44\xf4\x89\xed\x22\x0a\xf4\x23\xca\xac\xcb\x91\x0b\x69\x04\x2a\x73\x33\x21\x42\x92\x9b\xc9\x82\x69\xf3\x6f\xa8\x2e\x82\xfa\x9d\xfa\xc0\x3c\x0f\x06\x06\x38\x52\x18\x8a\xa9\x30\x3b\xe9\x92\x4b\x05\xe9\xa8\xbf\x3f\x23\x37\xe5\xe9\xe9\x57\x8c\x98\x21\xdd\xbf\x61\x2e\xf2\x18\x93\xf8\x7e\x7f\x86\xb8\xce\x9d\x18\x6c\x33\x17\x44\x95\xcb\x25\x7f\xe7\x1d\x13\xa0\xbf\x90\xd8\xf7\x89\xcf\x34\x03\x2e\x00\x96\x28\xe6\xab\xfa\x96\xed\x8e\x6b\xab\xc5\x58\x23\x7c\xa6\x6e\xb5\x4e\x53\xe0\xce\xfb\x5b\x72\xf7\xec\x74\x4a\xee\xbe\x9c\x92\xbb\x67\xe6\xff\x83\x75\x17\xfe\x3a\x35\xff\xfa\x6a\x4a\xee\xbe\x02\x83\xaf\xf9\xe9\x4b\xf4\x8a\x83\x76\xf0\xcf\x2f\xa7\x64\x29\xc4\x33\xfc\xdf\xd3\x51\xce\x63\x3d\x52\xcf\x2e\x32\x48\x0b\xbd\x7d\xb8\x2c\x33\x68\xc2\x6e\xb6\x7d\x88\xe6\x7a\xc8\x8f\xcf\xea\xa5\x22\x8a\xb3\x73\x9b\xfb\xd8\xd1\xc5\x4a\xa7\x5a\x70\xbb\xac\x87\x06\x20\x3e\x4c\xc1\x50\xe9\x86\xdf\xc7\xa4\x81\x0d\x2d\x4e\x6e\xd9\x56\x79\xa5\xed\xaf\x3d\x32\xc3\x86\x16\x4d\x91\xa2\x80\xec\x1e\x1b\x26\x57\xcc\x8c\x33\xf9\xd6\xa9\x7e\x23\xad\x60\x81\x6c\x65\x1a\x41\x87\xbd\x81\x59\x6c\xb7\x0f\x84\xb4\x16\xc4\xf6\x40\x5a\xb3\xad\x75\x94\x68\x70\x49\xee\xd6\x0d\xa3\x91\x6c\x2d\x43\x3b\x08\x63\x2e\xf7\x57\x3b\x38\x3c\x96\x16\xcd\x31\x6f\x7d\xb1\xe6\x3d\xa1\xe6\xe1\x90\xf8\xc3\xf0\xb8\x86\x87\x8b\xb0\xbf\x4b\x12\x08\xb3\x98\x97\x51\x6a\x27\x38\xb8\x47\x01\xec\x9d\x61\x53\x80\x2e\xb2\xc5\x5a\x88\xdb\x19\x79\x6e\x13\xcc\x68\x61\x78\x43\xe0\xf5\x16\x34\xb9\xbd\xa7\x32\x45\x84\xaa\x39\x66\x1f\x9a\x91\x7f\x99\x51\xff\x15\x46\x8c\xdb\x7a\x0f\x30\x9b\xa3\x0c\xcf\x4e\xfe\xfa\xf5\xd7\x5f\x7d\x6d\x3d\x79\x15\xbf\x63\x4f\x1e\x88\xfc\xea\x4e\x38\x3b\xc0\x13\x7a\xe1\x1c\x0d\xf5\xff\x81\xca\xe4\xa3\x52\xf7\x73\x53\xea\xfe\x11\x0d\xf5\x4d\x04\xf2\xd9\x5b\xeb\x5b\x0b\xfe\xc4\x26\xfb\xe8\x01\xee\x65\xa0\x0f\x31\xde\x37\x07\x3b\x5a\xf0\x8f\x16\xfc\xa3\x05\xff\xe0\x16\xfc\xe6\xb3\x3b\x9a\xf1\xff\x8c\x9c\xd7\xc7\x32\xe3\xb7\x98\xfb\xa3\x2d\xff\x73\x64\xfb\x3e\xb5\x2d\xbf\x05\x26\xfb\xc1\x5d\x47\xab\xfe\xd1\xaa\x7f\xb4\xea\x1f\xad\xfa\x47\xab\xfe\xd1\xaa\x7f\xb4\xea\x7f\x4e\x56\x7d\xa4\xd4\x47\xd3\xfe\xd1\xb4\x7f\x34\xed\x1f\x4d\xfb\x7f\x4e\xd3\x7e\x07\x8e\xdb\x93\x68\x73\x34\xf2\x3f\x40\xfd\xf0\x1f\x60\xe9\xef\xde\xf2\x87\x00\xde\xd1\xe6\x7f\xb4\xf9\x8f\xb2\xf9\x5b\xf6\x28\x63\xf2\x64\x43\x73\xba\x62\xf2\x29\xd6\x1f\xab\x52\x91\x9d\x69\x4d\x93\xf5\x73\x66\xfe\xf7\xdc\x37\x3f\x0f\xab\x94\xf5\xe2\xb5\xe1\xee\x41\x9d\xbe\x8c\x6d\x40\xd4\xb5\x46\x20\x73\xb2\xf1\x01\x86\x34\x2d\xcf\x51\x92\x09\x3b\x5f\x1a\x69\x31\xe1\x19\x93\x57\xdb\x3c\x99\x4c\x27\xf5\x1f\x5e\x09\x51\xcc\x99\xe4\x22\x6d\xeb\x5f\x86\x47\x8b\x64\x67\x73\xdf\x89\x2c\x73\xf3\x9e\x0a\x18\x9c\x27\x24\x13\xa2\x30\xf0\x21\x5d\x13\x00\xab\x94\x29\xb3\xf8\x0a\xf5\x82\xb4\xed\x0a\x7b\xd3\x44\x97\x50\x12\x20\xfc\x28\x64\x86\x39\x1e\x24\x5f\xad\x90\xb3\xa5\xb0\x44\x30\xf4\x24\x6b\x02\x05\xae\x50\x37\x89\x02\xd9\x32\xa3\x2b\xc2\x72\x14\xf2\x84\xac\x04\x3e\xbf\x16\x23\x0d\x29\xb2\xa4\x99\x62\x66\x68\x5b\x23\xc9\x71\x0c\xa5\xb2\xbd\x3b\xa4\xb3\xce\x23\xed\x39\x9f\x7a\x4b\xf7\x8a\xe9\x46\x94\x39\x30\x16\xba\xaa\x81\xef\x8f\x54\x6d\xf3\x04\x0f\x43\xe1\x71\xde\x53\xae\x7d\x2a\x15\x55\x26\x09\x53\xe6\xa9\x40\x2a\x95\xd2\x9e\xc0\x85\x82\x3a\x0d\x5a\x90\xaf\x89\x62\x49\xb0\xbd\x0f\x33\xcc\x3d\x77\xcf\xe0\xe1\xea\x58\x3f\x44\x13\xeb\x8f\x78\xa0\xe7\x57\x97\x57\x7c\x95\xf3\x7c\x35\xfa\x51\x76\x74\x89\xe4\xc4\x72\xa9\x04\x03\x5b\xeb\xf9\xd5\x25\x51\x7c\x95\x47\x59\x8e\xf0\x0d\x9e\x33\xa9\x5f\xf2\xcc\x20\xde\x1f\xd9\x16\xfe\xd5\x7a\x59\xbe\x4d\x6b\x8d\x89\xfd\xe2\x00\x62\xc9\x33\x06\xd4\xc2\x62\x0b\x80\x76\x12\xe6\x83\xf9\x3f\x5f\x9f\x7e\x43\xce\xcf\x6a\x8a\x0b\x27\xc0\x70\xa5\xca\x9a\xde\x36\xaa\x0a\x74\xcb\x6c\x2d\xe6\x16\x3f\x8c\x5f\xcb\xe5\xd5\x99\x79\x5f\x2f\xce\x9f\x5f\x9d\xd5\x12\xd5\xec\xb2\xa0\x7d\xa1\xf0\xda\x75\xef\x8a\xc0\x07\x3b\xf7\xa3\xef\x58\xf7\x21\xe4\x7d\x9e\x95\x4a\x33\xe9\xfa\x55\x60\x54\xff\xe0\x6e\x6b\x0a\x72\x5f\xc6\xf4\x15\x6a\xae\xaf\x00\x38\xeb\x1b\xf4\x6d\x30\x83\x53\x77\x13\xcb\x8a\x31\xd9\xd7\xf0\x15\x70\x41\xd6\xaa\x1c\x6f\x52\x5f\x6a\xf5\xbe\x5b\x0f\x20\xbe\xd7\xf6\x73\x88\xb6\xdb\xeb\xe3\xc0\x19\x4e\x54\x22\x0a\x96\x0e\xbe\x95\x8e\x0d\x0e\x2c\xdc\xb5\x73\x0b\xcf\x58\xbe\xd2\x6b\x83\xe6\x53\xf7\x05\x70\x4b\x7d\x7e\xaf\x8f\x58\xf1\x3b\x96\xef\x0b\x5b\x77\xc1\xd3\xde\xcf\x7e\x2c\x32\xd8\xed\x02\x46\x42\x6b\x1b\x97\x8d\xea\x17\x66\xf9\x0b\x40\xc6\xb0\x01\xfd\x68\xcc\x2b\x3f\x2b\x19\xaa\x92\x61\x9c\x6d\xe8\x04\x6d\x1a\x63\x34\x94\x6d\xfc\x36\x43\xfc\x36\x1b\xa4\x80\xef\x47\xbc\xfa\xe8\xf1\xf4\xf5\xf8\x28\x07\x73\x62\x57\xf1\xd1\x0e\xa8\x07\x75\x76\x9d\x50\x77\x97\x43\x1c\x51\xc6\xf4\x89\xb3\x4c\x7a\xee\xe3\xc0\x67\x33\x88\xe6\x5b\x47\x93\x0d\xf4\xd8\xf7\xc9\xe0\x7c\x27\x25\x4e\x78\xe8\x13\xf9\x70\xf6\x76\x6f\xcc\xed\x43\xf8\xe4\x4c\x94\xe9\x1c\xd3\xf4\xed\xc0\xfe\x74\xf6\xaa\xf8\x9e\x05\x55\xa8\x83\xae\x38\x20\xe4\x9b\x13\xd3\xd9\xa5\x06\x1c\x64\x7b\xde\xd0\x0d\x32\x39\xa2\x4c\x71\xa6\x0e\x9e\xb9\xd1\x20\x42\xaf\x6a\x0d\xbc\x99\x9a\x1a\x61\x52\x58\x1f\x9a\x70\x65\x8d\xa2\xe3\x86\xa2\x45\x7d\xe5\xde\x0c\xea\x73\xfc\x88\x06\x5e\x71\x12\xab\x2f\x51\xa3\x3c\xe6\x1e\xc6\xe0\x3e\xa7\x6c\x23\xf2\x2b\xa6\x1f\xc0\xdf\x0e\xf5\xed\x67\x6f\x23\xbd\x07\xb9\x5b\x91\x27\xa8\x6e\xf5\x9d\x8d\x08\x1c\xf1\xa3\xeb\x6c\xd9\xbe\xf1\x8e\x96\x5e\x27\x56\xba\x5a\x6a\x29\x7c\x87\x7a\x85\xe8\xe3\x87\x7a\xac\xa0\x28\xa1\x01\x11\x90\xaf\xab\x41\xb3\xed\x8c\xbc\xa2\x72\x55\x59\x32\xfe\x46\x36\x02\x2c\xd6\x90\x32\xde\x48\xda\x7e\x60\x2c\x6a\x08\x9f\xcf\xe7\x6f\xc9\x63\x83\xdc\x72\xa6\xef\x85\xbc\x7d\x42\x32\x51\x33\xec\x1e\x5e\x7d\xf5\x9c\x15\x99\xd8\x9a\x7b\x7b\x08\x6c\x0c\x75\x1e\x00\x8e\x48\xf7\x1d\xa0\xc3\xf7\xc6\x4b\x9f\x46\x97\x63\xbe\x75\xa9\xad\xba\xc7\xea\x03\xa0\x7a\xd3\x08\x04\xf9\x06\x7b\x07\x21\x3f\xb2\xda\x0f\x10\x0d\x1e\x59\xeb\x1c\xd2\xde\xf6\x1e\xcb\xe1\x5f\x06\xc7\x99\x6d\x3a\x5f\xc7\x60\xfd\x7f\x68\x8d\xd2\x73\x56\x48\x06\xc5\x0d\x1f\xf6\x66\xfa\x3b\x47\xde\xcc\x02\xce\xce\x76\x1b\x54\xed\x1a\x5e\x90\xe7\xab\xb9\x48\xd5\xdf\xe7\x57\xf0\x2e\xaa\x5f\xbe\x2b\xa5\xd2\xa0\xdc\x5d\x71\x23\x4d\x5d\x32\x2d\xb7\xe7\xa2\xcc\x75\x44\xad\xdb\xea\xd7\xde\xcd\x8b\xf9\xe5\x8b\xf3\xb3\xeb\x17\xcf\xbf\x05\x27\x8c\x5a\xf3\xf6\xdb\xc8\x45\xca\xc0\x13\x0e\x0d\xd6\x85\x48\xb1\xa6\xe9\xc2\x34\x47\x37\x0e\xcc\xfe\xec\xcd\xf2\xa6\x07\x14\xea\x28\x25\x9b\x81\x1b\x04\x00\xbd\xf3\xd4\xcf\x84\xb8\x25\x3c\xd7\x82\x5c\x52\xcd\x5e\xf1\x0d\xd7\xa3\xab\x65\x34\x0f\x6a\xf4\xe6\xfe\x5e\x44\x9e\x3d\x6e\xad\x60\xd2\xba\x5d\x45\x76\x39\xb4\xbd\x6a\xd9\x38\x6c\xb8\xea\x65\x26\xa8\x46\x15\x72\xeb\xe2\x5a\x0b\x97\xad\x36\xed\xf5\x4a\xa6\x25\xb7\x8c\x33\xbc\x3e\x9a\xe1\x6a\x6a\x46\x47\x02\x43\xa0\x43\xf8\x1d\xcd\xd0\x4b\x42\x41\xc3\x13\xf3\xb4\x4f\xf0\xa9\x7f\x54\x92\xf5\xc2\x3a\x3b\x3f\xe0\xf1\x0d\x74\xed\x27\x57\xed\xce\xe3\x89\x95\xeb\xeb\x48\x95\xfb\xfb\x2d\x78\x61\xab\xef\xa8\x4e\xd6\xc3\x64\xaa\x3e\x4a\x0f\x91\xaa\x35\x6c\xdf\xbd\x77\x17\x77\xd8\xb9\x32\x84\x20\xad\x72\xfa\xa4\x54\xe4\x6c\x80\x48\x2d\xa9\x81\xb4\x6a\x48\xf0\x2b\xe7\xf9\x6a\x5f\x14\xaa\xe7\xa4\x3a\xaf\xb7\xdd\xb6\x11\x36\x55\xa9\xd5\xea\xeb\x66\x46\x58\xb1\xa5\x76\x2d\x64\x93\x39\x66\x98\xb7\x7e\x51\x85\x48\x49\xb2\xa6\xf9\x2a\xd0\xba\xa5\x2c\xa3\x5b\x97\x4e\x9c\xab\x4a\x55\xa7\x05\xf9\x4d\xa0\xbf\xd1\x06\x6d\x55\x85\xd0\xb6\xc8\x6a\x59\x24\x62\x63\x06\x75\x13\x63\x89\xa1\xb4\x4c\xac\x1b\xd1\x1d\x93\x34\xcb\x22\xb7\xa6\x5c\x97\x3f\x34\x11\xf5\x20\x9a\xa1\x59\xff\xa1\x4f\xb9\xaf\xff\xb8\xf7\xdc\x18\x61\xfc\xa3\xb6\x46\xff\xe6\xdb\x7e\x4d\xdf\xb9\x9f\xd4\x9c\x49\x18\xfe\xc1\x4f\x3e\x3a\x47\xcf\xcb\x8f\xb5\x6f\x23\x00\x67\xa3\x3f\x24\x22\x50\x66\xdf\x47\x74\xf0\xc7\x43\x07\x1d\x10\xdc\x3a\xde\x4d\xa4\x95\x03\xb5\x0d\x7d\xc7\x37\xe5\x26\xba\xdc\x1a\x60\xd1\xd4\x7a\x73\xd3\xbc\xfe\x20\x6d\x28\x52\xd5\x0d\x58\x2b\x98\x03\xfa\x4a\xa6\xca\x4c\x1b\x5e\x6a\xc9\xee\x99\x84\xf3\xca\x10\x24\xeb\x20\x68\x65\x25\xfb\xcd\xc7\x91\x7d\xa8\xeb\xdc\x47\xc2\x8c\xaf\xb9\x94\x42\x3e\xcc\x34\xb9\xd3\x40\x3b\xe0\xca\xc8\x50\x43\x48\x33\xec\x32\x80\x3d\x5d\xcb\x26\x10\x96\x0b\x05\x0a\x7f\xdf\x60\x17\x84\x3a\x76\xfe\x36\x90\x8f\xeb\xf8\x67\x42\xb1\x63\x0e\xb8\xfb\x9c\x7a\x90\xae\x75\xc8\x76\x5a\x7c\x40\xad\x75\xc8\xf2\xa8\x8c\x9c\x65\x99\x47\x85\xd6\x7f\x07\x51\x6a\xbd\x7d\x0f\xee\x2d\xc1\x89\xe8\xd1\x88\x85\x3d\x02\xf7\x6c\xf4\x44\xa6\x69\x2a\x99\x52\x4c\x39\x3f\x71\x45\x37\xcc\x4f\xaa\xaa\x50\x4d\x9c\x19\x5b\x51\x6d\xc9\x03\x78\xc3\x6d\xfd\x6a\x60\x87\x16\xbd\x11\x43\x32\x32\x16\xdd\x6f\xe5\x16\x77\x6a\xe3\x44\x83\xc0\x27\x46\x83\x53\x72\xc8\xde\x9d\x89\x6a\xe1\x4d\x37\xe4\xfe\x88\x41\xff\x83\xec\x86\x84\x68\xfb\x9d\x09\x04\x0e\x17\xa7\x11\x98\x22\x27\xf8\x11\xa6\xf8\x7c\x31\xfb\xf7\x54\x2e\xe8\x8a\x9d\x9b\x56\x89\x16\xf2\x01\x38\x7d\xe4\x10\xfd\xd8\xbc\x7b\x90\x21\x3c\xfe\x02\xbc\xdb\x9a\xfd\x27\xd3\x80\x63\xfd\xfe\xdc\xa1\xf2\xef\xcf\x2f\x56\xb9\xb9\xbb\x4b\x1f\xbc\xdd\xc3\xe9\xba\x7e\x3d\xcc\xad\x6d\xd2\x46\xb6\x2b\x5c\x10\x49\xdc\x8a\x88\xc1\x7a\xe6\x79\x8c\x53\xbd\x8e\xe5\x3d\xa3\x9b\x6f\x2d\xd8\x39\x10\x42\xc8\x22\xcb\x99\xe4\x49\x7b\x85\x33\xf2\xfa\xed\xd5\x35\x04\xa8\x6c\xf3\x84\xa5\x95\x2f\x63\x22\x24\x2a\x7d\xa1\x36\x18\xb8\x24\x5a\x8f\xc6\xba\x2d\x7c\x46\x7e\x39\xbb\x7c\x73\xf1\xe6\xfb\x6f\xfb\x67\x82\x08\x88\xdc\xc6\x45\x2c\x19\xd5\x75\x5d\x53\xe0\x9e\x18\xb9\xb0\xd6\xe6\x56\x49\xb3\x8d\xf7\x55\xb1\x91\x0e\x10\xc1\x58\x7d\x85\x1b\x68\x2c\x0a\xfc\x58\xd0\xaf\x97\xc3\x68\x1f\xe4\x3d\x3f\xc2\x66\x5b\x5b\xd3\x24\x56\x8c\xf6\x1f\x3b\x3f\xe6\xda\x90\x0f\xc1\x06\x78\x61\xd5\xe3\x7b\x8d\x0d\xc7\xe3\x82\x31\x03\xb8\x62\x7e\x75\x0b\x26\xa4\x16\x73\x10\x13\x39\xbf\x01\x34\x30\x17\xd2\xfc\x74\x86\xc4\x12\x98\xb2\xfc\x92\xa9\xca\x70\x30\x9d\xa0\x83\xc8\xb9\xc8\x73\xbc\x6f\xc4\x11\xce\x64\xa0\xa9\xd4\x17\x56\xa9\x08\x0e\x63\x34\x65\xf2\x45\x16\x69\x8a\x86\x9d\x45\xb9\x5a\xf1\x7c\xd5\xc6\x1f\x6e\x09\xad\xc3\xb1\x84\xdc\x01\xe7\xc5\xdc\x91\x76\xc0\x00\xe6\x01\x11\x91\x93\xc7\xd6\xe3\xf5\x74\x06\xff\x0f\x0f\x26\xcb\x50\xe1\xb9\xa4\x09\x53\xf1\x32\x7c\xad\xdd\x45\x0c\xe3\xf5\x16\xde\x65\x5e\xf9\xa7\x8c\x77\x82\x55\x08\x21\x16\x1f\x13\x37\x24\x41\x1f\xa6\x0d\x67\x57\xb9\x37\x14\x52\xbc\xdb\xba\xe0\x40\x2c\xc1\xd8\x13\x6f\x1a\x44\x9b\x0f\x96\x13\x15\x9b\x42\xe4\x2c\xd7\x50\x0d\xb9\xed\xf3\xd0\xd8\x4d\xcb\x17\xa4\xeb\x6e\xdb\x59\x78\xc4\x3d\xc9\x44\xbe\x32\xab\xaf\x7b\x25\x9b\x7e\x10\x58\xef\x87\x22\x16\x1c\xd5\xfe\x3c\xda\x02\xb8\x8a\x14\xe6\xf6\x1f\x9b\x38\x2d\x09\x3e\x69\x61\x9d\xbc\x03\x0f\x71\xf2\xe8\x8b\x47\x96\x69\xbb\x99\x18\x00\xb2\x6e\xe0\x81\x13\x75\x38\xc6\xcd\x84\x3c\x5a\x0a\x51\x75\xb1\x03\xc2\x8f\xe6\xe3\x49\xed\xab\x9f\xc4\x7e\xc6\x08\x38\x83\x20\xdb\x49\x02\xc1\xd5\xee\x9e\xe7\xaa\x07\xa3\x36\xdd\x0c\xc2\x17\x16\x31\x58\xd9\x4f\xe3\xd0\x8a\x6f\x4e\x24\xcb\x28\xc4\xeb\x21\xc9\x19\xd4\x4f\x0c\x80\x60\x7c\x1d\xe8\x87\x54\xc3\x1e\x11\xaf\xa3\xf0\x7b\x2d\xaf\x4e\x7d\xfd\x62\x49\xb0\xad\xe1\x9a\xb0\x31\xbe\xc9\x0f\x5c\x7a\x7d\x81\xad\xf5\x37\x91\x67\x84\xa5\xae\x35\x70\xc0\x29\xe1\x37\x67\x6d\xe5\x39\x91\x6c\x89\x24\x5f\xfd\x2f\xcf\x3f\x4b\x9a\xa7\x62\xe3\x5f\x59\x73\x28\x83\x77\xbe\xfc\xa2\xf1\xeb\xfe\x84\x87\x79\x34\x80\xa8\xb0\xe1\xc0\x3e\x74\xc8\xa7\x4f\x68\x93\xa2\x47\x0a\x32\x90\x78\x79\x1a\xa2\x45\x6a\xa9\x44\x0e\xc9\xe4\x57\x75\x78\x6b\x37\x1c\x71\x9e\xea\xc3\x8f\x63\x47\xe9\x00\xf1\xb1\xdd\xfb\xc0\xec\x21\xfc\x49\x8d\xc1\xe9\xe3\x43\xc2\x86\x81\x6a\x95\xe6\x36\x11\x86\x13\x9a\x87\xd8\x0a\x18\x08\x8c\xd3\x8e\xab\x6a\x92\xfb\xef\xe3\x49\x4e\x56\x61\x92\x13\xfc\xc3\xc0\x15\xaf\xb2\x59\xd4\xd6\x18\x25\xe9\xe1\x4e\x9b\xe6\x54\xbb\xb5\xea\xdd\xe1\xdf\x3b\xce\xb1\x2f\x03\xe8\x0f\xf3\xb3\x07\x48\x8e\xdd\xbd\xfa\x85\xc5\x5a\xbf\xa1\x1b\xfc\x41\x48\xfe\xbb\x19\x2d\x9b\x8b\xf4\xac\xd4\x42\x25\xb4\xee\x52\x32\xed\x6a\xf3\xb6\x80\xff\xbe\x14\x72\xc1\xd3\x94\xe5\xbf\xf0\x3c\x15\xf7\xdd\xed\x9f\x8b\xfb\x1c\xfe\x75\xa5\xe9\x82\x67\xfc\x77\xd8\xcb\xe8\x5e\xa3\xe7\xb9\x16\x19\x93\x34\x07\x1b\x4e\xd7\xd2\x15\xbb\x7c\x71\x75\x8d\x48\x40\x75\xb7\x3b\x9f\xbf\xbd\x40\x53\xbb\x5d\xed\xd0\x99\xd8\xd6\x97\x8c\xa6\x86\x64\xa9\xe7\x2c\xa3\x91\xfc\x47\x3b\x4e\x17\xe1\xc9\x76\xe9\xdf\xf0\xf2\xa1\x4b\xcd\x24\x18\x42\x6c\x26\x01\xc3\x8e\x9e\xcf\xdf\x12\x05\x71\xf0\xca\xa6\xd5\x31\x82\xee\x2d\x2f\x8a\xe1\xc4\x1b\xe3\xa9\xcb\xae\x77\x3c\x76\xe3\x5d\x03\x60\x2e\x81\xda\xbe\xd1\xc5\x23\x67\xef\x34\x49\x5d\x2f\xa7\x6b\xf8\x78\x1b\x8d\x3d\x81\x5d\x36\xdb\x31\x46\x6d\xbf\x86\xb9\xb3\x79\x26\x7c\x5f\xe4\x32\xc0\x09\xc7\x45\xf1\xa2\xe5\x2a\x17\x9a\xe0\x59\x98\x53\x21\x0b\x96\x89\x7b\x42\xf3\x6d\x95\xc3\xc7\x86\xb9\x68\xb2\xa1\x29\x23\x69\x29\xd1\x4b\xcc\xab\x52\x0f\x7e\x78\xf1\xb7\x35\xf6\xd4\xa2\xbd\x21\x35\x55\xfc\x55\xd8\x0d\xe2\x01\x4a\xd7\xcb\xeb\xaf\xa9\x64\x44\x43\x0e\x95\x94\x50\x15\x34\x58\x30\xf0\xe8\x67\xda\x8b\x80\xc8\xfc\x6b\xbe\x61\x98\x63\x05\xca\xe7\xb3\xe5\x92\x25\xda\x27\x6e\xe1\x56\xed\xf2\xc3\xfc\x0c\xaf\x28\xe5\x4a\xb2\x15\x95\x69\xed\x65\x42\xfe\xc0\x32\x37\xb3\x6d\xd1\x4d\x09\x83\xb6\x69\x8a\x99\x48\x9b\xeb\xfc\x14\xd7\xd4\xe7\x8d\x38\xd8\x65\xc0\x21\xb1\x52\x20\xc2\xe6\xb9\x91\x6a\xdc\x88\x70\x77\x15\xa4\x1f\x7c\x9f\x15\x99\x19\xbb\x4d\xdf\xc3\x27\x62\xf5\x3f\xe0\x5b\x65\x79\xc5\xaa\x94\x90\xeb\x56\x95\xab\x15\xe4\x82\x2c\x81\xd8\xf2\x7c\xf5\xd4\x61\x2d\xcc\x3b\xd7\xe9\x7f\x96\x8a\x72\x91\xb1\x9e\xf5\x77\x90\xef\xb1\x9b\x89\x77\xef\x47\xb8\xb8\x89\x8f\x87\x6e\x1b\x64\x7e\xf4\xd6\x6a\xdd\x48\x42\x4b\x65\xa5\x4f\xf3\x3c\x03\x6d\x87\xd5\xe7\x40\x4a\x50\x97\xd4\x4e\xaf\x25\xa4\x5a\xac\xd4\xbf\x3e\xcf\x05\xde\xb0\x55\x34\x4c\x5d\x5a\x30\x03\xcd\xa5\x72\x10\x8e\x01\x30\x64\xc3\xb4\xe4\x89\x72\x1a\xa6\x70\xd0\x2a\x43\x0a\x2a\x97\x62\x9a\xe1\x4f\x62\x2c\xf9\xdf\x62\xf1\x00\x2e\xb7\xbb\x57\x3f\x97\x5b\xeb\x37\xde\x05\xe8\x7f\x8b\xc5\x60\x70\x82\x6f\xd3\x63\xd9\x70\x6d\xda\xa6\x8d\xdf\xc4\x62\xdf\x7e\xe4\xbf\x89\xc5\x9e\x1c\xc8\xf7\x25\xd1\xfc\x58\x2e\x18\x84\xed\x5c\xad\xa9\x64\xe9\xe8\xdb\xee\xeb\x17\xb9\x6f\x05\xad\xc8\x62\x4b\x16\x42\xaf\x49\x63\x75\x4e\xdb\x68\x75\xb1\xa2\x4c\x23\x1f\xf1\xdc\x0c\x7b\x63\xb5\xe7\x56\xd7\x33\x18\xb2\x1d\x84\x49\x4d\xa6\x93\x17\xef\x30\xc3\x32\xfc\xfe\xb3\xc8\xca\x0d\x9b\x67\xe5\x8a\x1b\x61\xff\xad\x62\xd6\xc5\xe0\x2c\x49\x44\x99\xeb\x73\xc9\x52\x74\x13\x32\xb2\xc5\x99\xb9\xfb\xb7\xb9\xa6\xab\x15\x4b\xa1\xbf\x91\x98\x45\xa9\x99\xcb\x19\xc1\xeb\xb2\xc5\x1b\x91\xb2\xd7\x22\xe7\x5a\xc8\x40\x3b\x0f\xb1\xb4\x3e\xa4\x0a\xfe\x3a\xbf\x78\x7e\x69\x27\x48\xa8\x66\xa6\x9f\xf9\xc9\x4c\x6a\xfe\x6b\x7f\x17\xf2\x1a\xd3\x00\xb9\xd3\xc6\x1b\x80\x15\x28\x3b\x5d\x5f\xd4\x45\x7b\xf8\x76\x52\x94\x66\x13\x9f\x93\x03\xff\x32\xe4\x6d\x0e\xec\x0a\xa4\xf4\xa3\xb6\x39\x68\xb3\xa6\x84\x2f\x49\x6c\x69\xf0\xb4\x20\xeb\x39\xf6\x82\x18\x9f\x3c\x12\xed\x15\xb7\x8d\x45\x8e\xbd\xad\x28\x28\x6d\x86\xb1\xd2\xb6\xb3\x23\x1b\xd4\x6c\xe8\xb2\x8a\x8e\xdc\x3e\xdb\xb6\x66\xba\xd9\x84\xa4\x4c\x33\xb9\x01\x3d\xe6\xbd\xc1\x0a\xb7\x3c\x4f\x9d\x43\x9a\x69\xed\x0e\x45\xc8\x5a\xb2\xba\x0e\x63\x46\x08\x9c\xbb\x84\xf8\x75\x29\x81\x6b\x5d\x76\x56\x04\x8f\x0e\xc4\xec\x8e\x58\x7c\x5f\x07\xea\xae\x90\x75\x38\x29\x8e\x60\x45\x2e\x81\xc5\xf5\xb0\xc5\x73\x17\x71\xde\x71\x68\xd5\x0b\xea\x1a\x3e\x8c\xfc\x73\x30\x00\xb9\x6b\xf9\xbb\x2a\xfd\x7f\xdf\x1c\xb1\x17\x16\xa3\x22\x6d\x60\xaf\x3f\x98\xea\x85\x60\x9e\xbf\xd6\xfb\xc2\x27\xe1\x47\x4a\x77\x79\x19\xdd\xb8\xac\x6d\x19\xef\x6a\xda\xb0\x8e\x15\xf8\x63\xcd\xc0\x55\x03\x29\x48\x9c\xe8\x46\xbb\x99\xcc\xc8\x05\x28\x94\x3d\x11\x44\x27\xa3\xc5\xd6\x1e\x3d\x91\xac\x10\x8d\xcd\xc0\xa6\x31\x43\x28\x06\x3e\x18\xb4\x7f\x07\x6b\x72\x4c\x99\xf3\x01\xfa\xf1\xfc\x75\x3c\xde\xb3\x85\x59\x5b\x3b\xce\x9b\x4d\x7a\x44\x12\xc0\x9c\xb6\x8a\x43\x0e\x7f\xd5\x59\x92\xfd\x30\xb7\x0d\xfc\x1c\x5d\xf1\x28\x09\x0a\x23\x5e\x40\x86\x84\x93\xf5\x50\x42\x5e\x89\xdc\xd0\x51\xec\xa3\xe2\xfe\x9a\x09\xcd\x32\xb8\x82\xfa\xad\x58\xbe\x84\x6e\xd1\x95\x8b\xd0\xd4\xd6\x10\x11\x4b\x92\xb3\x7b\x3b\x29\x74\xf3\xef\x66\x3f\xe7\xd2\x4d\x42\xdb\x78\xbe\xab\x69\xe4\xb4\x5c\x56\x26\xb0\x88\xe1\xdb\x4c\xac\xa0\x6f\x3e\xbf\x81\xfd\x40\x16\xeb\xda\x4b\xdb\xdf\xbe\x7a\xd9\x89\xd6\xd6\xca\x9e\xd6\xae\x54\x0a\xd0\x1c\x06\xee\x72\xa1\x5d\xb4\x4a\xd4\xe6\xe9\xa0\xe9\x70\xc7\x53\x48\xcd\xe5\x4a\xd3\xe0\xb0\xe6\x10\xdc\xb8\x87\x11\x39\xf6\x19\x00\xff\x00\xf1\x05\x58\xd3\x07\xbb\x76\x0c\xf7\xee\x17\x67\x3a\x58\xdb\x41\x03\x0c\xf2\xb4\x36\xd7\x4f\xc0\x59\x1b\xb6\x30\x9a\x68\xce\xf0\x81\x91\x14\x46\x93\x69\x2c\x70\xbc\x23\x46\x77\x32\x85\xe2\x35\x6c\x59\x66\x91\xe6\xad\x68\xc9\x20\x96\x22\xfa\x63\x23\x9e\xa3\xf9\x25\xe2\xbd\x3c\x99\xf6\xf8\xd5\x4d\xa6\x75\xd3\xc9\x64\x5a\x17\x32\x27\xd3\x2a\xc7\x62\xfd\x57\x91\xb2\x8b\xf9\xd9\xeb\xd6\x8f\xaf\xf8\x92\x25\xdb\x24\xab\x37\x9f\x33\xa9\xb8\xd2\x2c\xd7\x48\x18\xbf\xe3\x39\xc2\x61\xd0\x44\xa4\xdf\x9f\xd7\x7e\xb9\x64\x45\xc6\x13\xda\x3c\x36\xfb\xb3\x35\x03\x86\xbf\xa3\x3a\xe8\xef\xa5\xd0\xb4\x7e\x01\xf5\x1d\x56\xe9\x36\xab\xdf\xae\xaf\x5f\x9d\x2d\x35\x93\x2f\x79\xce\xd5\xba\x76\x23\x6d\x26\x3f\x0e\x2c\x0f\x4a\x7f\xd8\xc5\x64\xc6\xfb\x1e\x8c\xdb\x1c\x93\xe8\xf1\x7d\xc7\x6b\x78\x40\xd6\xb0\x4e\xd6\x3a\xd2\xf3\x70\x1c\xf6\x60\x66\xb4\xf7\xf1\x87\xbe\x7b\x1a\x89\x4e\x7f\x92\x76\xc7\x83\x6d\x77\x30\x4f\x46\x47\xc4\xfc\x43\x32\x23\x74\xfb\xcf\xb4\x7b\x1e\x6e\xc3\x83\xd9\x1f\xde\x77\xe0\xe0\x07\xc4\xb5\x77\xed\x58\x89\x4d\x18\xdf\x7e\x88\x4d\x0e\x84\xeb\xbf\x8f\x52\x94\x9d\xa3\x87\xbb\x36\xd8\xee\x77\xb0\x0b\x1d\x8a\x8d\x7e\xdf\x4d\x26\x1f\x16\x61\x39\xb4\xe7\x46\xe7\x83\x6f\xbc\x37\x9c\xb4\xb9\xfb\x18\x2b\xf0\x81\x51\x54\xa3\xce\x23\x32\xca\xc7\x39\x98\xc1\x68\xb2\xf7\xbd\x9c\xd0\x83\xa3\x11\xba\x4e\xa5\xbb\xff\xc1\xce\x63\x6c\x0c\x86\x39\x09\xcb\x0d\x77\x39\x5e\x3f\xc8\xb5\x7a\x5f\xdb\x18\xe5\x3c\xfe\xbe\xc9\xbb\xee\xe2\x15\xd4\xb5\xbb\x5a\x97\x83\xdd\x53\x8f\x93\xd3\xfb\x26\x07\xbe\x8b\x15\xa8\x6b\x57\xb5\x2e\x07\xdb\x55\x8f\x51\xeb\x7d\x5b\xe8\xda\xcd\xde\xd1\x49\x5f\xd1\xea\xd1\xdc\x12\xda\x40\xb8\xd5\xac\x45\xbc\xae\x31\xed\x5e\xb7\x20\xb9\x8f\xf3\xe8\x35\xfc\xbc\x8f\x4b\x56\xdd\x29\xee\x77\xbd\xf3\x48\xc7\x83\xdd\xfc\xd0\x22\x9d\x6a\xae\x21\x31\xb6\x37\xdb\x6a\x33\x72\xaf\xad\x7e\x87\xdb\x6a\xff\x12\xdd\x4e\x63\x62\x70\x74\xbb\x91\x86\xe3\xf7\x1c\xe9\x7c\xd0\x8d\x0f\x2d\x16\xbc\xa2\x87\x44\xfd\xd6\x31\x0c\xf5\x18\x77\x1e\x43\xa3\x1c\xec\x60\x76\x5a\x3e\xfa\x8d\xd7\x35\x1d\xed\x03\xa9\x37\x18\xb9\xff\x7a\xa7\xc3\x6d\xb7\x67\x71\xe8\x6a\x1c\xd1\xda\x44\x4a\x00\xb4\x5b\x8d\xdb\x67\xd5\xf3\x60\x5b\x1c\x5c\x5c\xb0\xcf\x86\x1a\xaa\x6b\xa3\xf5\x66\x3b\xed\xb4\xde\xf5\xd0\x9b\xee\x59\x68\xe8\x48\xde\x54\xb2\x45\xf6\x1d\x6d\x38\x76\xe7\xd1\xce\x07\xdc\xfb\xf0\x62\xcd\xee\xaf\x7a\xd9\xcd\xab\x9d\xb9\xcd\x86\x35\xe2\xf0\x1b\xed\x5c\x22\xec\xae\xa5\x17\xed\x2a\x18\xf4\xc0\x7d\x7e\x8c\x0d\xf6\x2e\x10\x76\x19\xd5\xc6\x47\x2b\xce\xb7\x9a\x8d\xdc\x6d\xac\xeb\xe1\x76\x3c\xb8\x50\xb3\xeb\x1e\xfd\x76\xbb\xfe\x7d\x67\xdb\x71\xfb\xef\xee\x7f\xb0\x43\x18\xb9\x64\x73\x12\xc7\x02\xf5\x7b\x2e\x50\x7f\xac\x11\xbf\xaf\x1a\xf1\x7b\x08\xdc\x1f\x63\xc8\x39\x40\x0d\x99\xfd\x67\xed\x3e\x40\xb2\xe7\x03\xe4\xc2\xdd\x7b\x7e\xcf\xc3\xa4\x1a\x3c\x70\x9a\xae\x83\xe5\x8a\x39\x50\xda\x89\x7d\x06\x25\xee\xd3\xf5\x7b\xbf\xae\xc5\x3b\x8f\x36\xa8\xc5\xd9\x7d\xc4\x01\x65\xc9\x83\x06\x1c\x54\x42\xec\x3c\xea\x6e\x12\xfc\xee\xc3\xf7\x49\xcc\x3b\x8f\x36\x2c\x9c\x3e\x74\xc8\x3e\xd1\xef\x01\x63\x8e\x10\xa9\x76\x1e\xb5\x5b\x7e\xd9\x7d\xa8\x7e\x49\x61\xf7\xf1\x86\xf9\xf0\x9d\xc7\x1c\xcb\xd6\x3e\xc0\x85\x6b\xf0\xb1\xf7\x38\x70\x0d\xea\xa4\x7b\xdd\xb7\x22\xbd\xc7\x54\x47\x81\x2e\xb5\x58\xeb\x2a\x0a\xa5\xf6\xbd\x37\x5e\xa5\xd1\xb2\x27\x6a\xa5\xde\x32\x92\x13\xbd\x2a\x35\xbb\x53\x04\xcb\xb8\x74\x5c\xb1\x1d\xb7\xbd\x59\xdb\x8d\xfa\x5c\x5a\xfd\x82\x33\xbe\x64\x27\x80\x42\xff\x14\xd9\x96\x87\xa8\x4c\x1f\x24\x0f\x18\x1c\xfa\x01\xd9\x74\x2e\xe8\x66\x3c\x1c\x3b\x9c\x83\xb1\x28\x57\x90\x4b\x9f\xca\x6d\xfd\x67\xe7\xb8\xfe\x9a\xaa\xdb\x2b\xfe\x3b\x8b\xfc\x74\x31\xbf\xfb\x4b\xfc\xe7\xbf\xb6\x81\xbf\x35\x5e\xf4\x14\xc2\x16\x55\x1e\x43\x75\x4b\x94\xf9\xc1\xc0\x11\xf8\x91\x27\x3c\x95\xf1\xe8\x81\x5e\x68\x8e\xad\x7f\x70\x19\xa6\xd5\x88\xa5\xa4\x25\xcd\x4e\x94\xa6\xc9\xed\x87\xaf\xea\xaf\xa3\x56\xf5\xd7\x43\xae\x2a\x0a\x15\xad\x55\xa9\x48\xab\x48\xb0\x87\xfd\x5a\x0b\xf8\xc0\x6a\xc0\x5c\x61\x18\x81\x5d\x2a\xa9\x2d\x15\x24\xee\xc8\x04\x9b\x52\x81\xec\x2c\x96\x24\xe5\x4b\x28\x11\xae\xc9\xc5\x9c\x2c\xe9\x86\x67\x5b\x83\x00\x73\x52\x07\xe6\x96\xb6\x60\x60\x57\xbb\x6e\xe6\x70\x89\x48\x46\xb1\x9a\x03\xa8\x65\xd0\xb8\x37\x88\x5f\x22\x23\x8c\x4b\x63\x79\x4d\x79\xae\x5f\x7b\xb7\x0c\x33\xd6\x8b\x3b\x0e\xc9\x73\x2e\xa9\x66\x21\xfa\x89\x7c\xb3\xd1\x1a\x52\x97\xc5\xf7\x92\x26\x2c\x16\x6f\x57\xff\x30\x17\xa9\x1b\xe3\x9a\x6f\x98\x28\xcd\xb2\x20\x58\xd3\x17\xda\xfc\x9d\x5d\xaf\x25\x53\x6b\x91\x99\x0e\x6f\xf3\x35\xa3\x99\x5e\x6f\xff\xaf\xc8\x83\x0f\x2d\xf4\x15\xd9\x4e\xb4\x68\x3b\xe6\xba\xd3\xb2\x64\x3e\x3e\xe8\x8d\x78\x01\x25\xa0\x19\x81\xee\x98\xbd\x01\x02\x36\x98\x59\x2a\x24\xc3\xcb\x85\x3e\xc1\xd8\x72\x50\x49\xcd\x45\x4a\x64\x99\x43\x21\x4f\x91\xdb\x08\x06\x73\x45\xba\xca\x62\xc9\x95\x8f\x48\xc3\x71\xe3\xa1\x43\xdd\x9b\xef\x7e\xcd\xcd\xab\x30\xaf\x80\x6f\x0c\x77\xce\x75\xb6\x85\x44\xe9\x12\x42\xc8\x21\xaf\x9f\x2d\xb4\x86\x4f\x96\xa8\x0d\x05\x1d\x2b\xbc\x42\x21\xb1\x9c\x89\x69\x97\xf5\xdc\xc2\x48\x34\x59\x03\x8f\x68\x54\x4d\x73\xd5\xfb\x2e\x20\x83\x81\x52\x94\xfc\x2e\x72\x18\xdf\x02\xcf\xa8\xb2\x32\x1d\x40\xdb\x15\xcf\xa4\x79\xad\x5d\x47\x55\x72\x5c\xfe\xbd\xe5\xf6\x08\xf5\x60\x03\xab\xc6\x98\xb3\x32\x0f\x22\x93\x17\x6c\x29\xa4\xa1\x19\xf2\xd6\x34\xe3\x9a\x94\xee\x09\xcc\xc8\x6b\x8b\x59\xdf\xc0\xe0\x0a\x83\x97\xe1\x26\x6d\x01\xcc\x47\x58\x98\x06\x43\xa8\x30\xcd\xf3\x4b\xd0\x6c\xe6\xc9\x76\x6a\x0e\x47\x9a\xce\x98\x54\xaf\x5d\x08\xc7\x71\xa4\x06\x60\xec\x80\x66\x89\x85\x50\x1a\xd7\xab\x60\xdc\x3d\x07\x62\xb5\x11\x48\x3c\x20\xab\xd5\x6e\xdc\x91\xfb\xa4\x8a\xf4\x41\x67\xbe\xc7\x3c\x70\x2d\xd4\x17\xc9\x0a\xd7\x6c\x53\x65\xf4\x32\x2c\x79\xc0\xaf\xbb\x6a\x4c\xf8\x34\x44\x0e\x2f\x80\xa5\xf8\x86\xf6\xb7\xea\x6e\xf4\xbf\x1b\x7a\x3a\xf4\x43\xf7\x17\x36\xea\xa9\x77\x50\x95\xd6\x96\xfe\xaf\x1d\x3d\xc8\x4b\xe3\x27\x32\x2b\x6b\xa1\x34\x43\x3a\xba\xcf\x01\xd7\xac\x49\xc6\xa8\x0a\x60\xac\xb6\x08\xf2\x38\x17\x24\x83\x24\xad\xe6\x5d\x7f\xf5\xc4\xec\x1c\x09\x8c\x0d\xc5\x84\x2d\x9b\x23\x7a\x23\xf4\x25\xa3\xe9\x98\x2d\x7f\x12\x89\x6b\x37\x85\x59\x0f\x93\xb4\x9b\xeb\x4f\x2f\xb7\x34\x34\xd4\x60\xda\xdf\x9f\xcf\x33\xca\x37\xd8\xad\xa6\x67\xc0\xf1\x1a\x1a\x97\x26\x9b\xd2\xd5\xbd\x8d\x09\xee\xa2\x0d\x7b\x04\xf7\xc2\xef\xcc\x86\xf0\x22\x23\xd3\xfa\x99\x24\x66\xe0\x3d\xa2\x88\xd8\xc6\x5b\xfb\xb9\x6b\x37\xea\xb4\x0c\xdb\x75\x1e\xca\x0a\x1c\x5b\xef\xa7\x08\xb6\x8c\x02\xcc\x87\xbf\xb2\x4b\x94\x04\x1e\xfe\xba\xa2\x03\xf4\xbf\xaa\x36\x90\x61\xf8\xba\x1a\x2c\x8a\x82\x35\x10\xa0\xc4\x1e\xe6\xd0\x36\x7f\x5a\xda\xf7\xe6\xe5\x15\x8a\x0c\xd7\x6c\x53\x18\x58\x78\xc9\x33\x36\xa7\x7a\x8d\x1f\x2e\xf2\x44\xc2\x52\x86\x9a\xff\x20\x94\x36\xff\x6d\x4d\x10\x7c\x68\x0e\xe6\x3f\xb5\x9e\x70\x67\xcb\xd6\xc1\xf2\x8e\x96\x55\x3e\x04\xfb\xdd\xb3\x2e\x58\x0a\xc8\xd0\xc5\xef\xb9\x61\x54\xce\x12\xcd\xef\xd8\x73\x46\xd3\x8c\xe7\x0c\x69\xb1\xb2\xfe\xf5\x7e\x34\x95\xc8\x72\xb1\xc0\x54\x6b\x33\xe2\xe5\x76\x64\x12\xee\x58\x26\x0a\x98\xc3\x20\x03\xcd\x94\x46\x99\x25\xdb\x56\x62\x4e\x2e\x34\x14\x0b\x30\x04\x86\x92\x4d\x99\x69\x7e\x82\x5a\x8a\x9d\x54\x12\xb1\xfb\x18\x3c\x93\x37\x2f\xaf\xf6\x72\x1c\x39\x31\x23\xd5\x8e\x62\x64\xa9\x97\x10\x02\x63\x05\x9e\xfc\x57\xb3\xce\x36\xcf\x6c\x56\x3e\xff\x99\x48\xfb\x68\xac\xe0\x68\x05\x4a\xcb\x96\x19\x7e\x45\x0b\xd7\x86\xcc\x7f\x1e\x5d\x86\x26\x0a\xad\xb1\xe4\xc8\x91\x76\x5e\xfd\x84\x5f\x3b\x4e\xcf\x26\x98\x68\xc0\x94\xc3\x01\x9f\x1a\xa6\xda\x08\x61\x60\xf3\x01\x3c\x8d\xdf\x37\x02\x4f\x6d\xcf\xe3\x96\xd7\x87\x6c\x62\xcc\x7d\x57\x63\xb7\x64\xc8\x83\xef\x8a\xb0\x53\xc8\x64\x53\x11\x3a\xd4\xc4\x51\x45\x28\xd1\x76\x1c\x0c\x46\x71\x83\xb4\xb1\x30\x42\x1c\xcf\x57\xb3\xc3\x5e\x61\xa5\xb8\xeb\xc0\xd6\x63\x0e\x23\xb8\xba\x07\x9d\x83\xe9\xdf\x73\x04\x87\xd3\x01\xf6\x5a\x6e\xfb\x08\x6f\x9f\x03\x77\x3f\x17\x5b\xef\x39\x44\x65\xaf\x21\x4f\x92\x61\xa6\xa0\x63\x8f\x1a\xad\xb3\x65\x6b\xf1\xba\xa3\x65\x5b\xd8\xab\x5a\x06\x09\x36\x13\x9a\x13\xf6\x8e\x83\x3a\x63\x89\x5a\x0c\xd6\x68\x19\x29\xe3\x02\xb2\xbc\xaa\x64\xdf\xc6\xd0\x50\xc4\xea\xa6\x3c\x3d\xfd\x2a\xf9\x1b\x39\x9d\x8e\x1b\x93\x2b\x57\xc1\xe0\xe3\x26\x7c\x1b\xb6\xd0\xf7\x80\xce\xb0\x63\x7c\x2f\xfc\xc4\xba\x8f\xcf\xf8\x77\x79\x35\x68\x40\x75\x4d\x7a\x2c\xa7\xb6\x49\xac\x2c\x33\x2c\x8e\x28\x16\x5a\x4b\x3f\x30\xe1\x9f\x1b\xd4\x46\x6f\x99\x13\xf9\xbc\xf2\xff\x8d\xf0\xae\x18\x86\x87\x9e\xde\xa3\x00\xa2\xde\x7f\x07\x88\x38\x1f\x86\x88\xe1\xda\x56\x97\x5d\xb5\xad\x64\xb5\xba\x7a\x19\x92\xfd\x24\x83\x74\xb0\xf1\xf9\x82\xc6\x08\x27\x99\x5e\xe0\x18\x11\x64\x31\x00\x1e\xd1\x11\x86\x00\xa4\xd6\xad\xc3\x29\xa3\xd5\xa6\x1f\x8a\xda\xad\xfb\x00\xaa\xd5\x3a\x06\x5b\xd6\xa9\xf8\xdf\xa6\xd1\xde\x60\x0a\x46\xdb\x3b\x44\x4d\x3b\x8f\xb4\xb3\x62\x43\xa3\x61\x8f\x02\x09\x97\x6c\xb3\x24\xfb\x1c\x6c\x50\x00\x72\xab\x34\xdb\xfc\xa1\xbd\x3f\xba\x5d\xc2\x7a\x1e\x4e\x77\xa8\x4e\xef\x6b\xe9\x8a\xd7\x19\xe9\xf7\x61\xfb\xfd\xc8\xb6\x86\x33\xae\x3d\x96\xab\xb3\x6b\x71\xcb\x72\x57\x5d\xf0\x52\x08\x7d\x7e\x06\xad\xfa\xea\x67\x87\x9d\xfa\xea\x66\x07\xed\xba\x8b\xb9\xba\xe4\x65\xda\xb4\x7d\x40\x45\xd7\x91\x60\x5e\xed\x2c\x92\x7a\xce\x7d\xf3\xd5\x48\x84\xd0\x24\x31\x7b\x5f\x42\x72\x36\x42\x4b\xbd\x16\x92\xeb\xaa\x0e\x29\xcf\x93\xac\x4c\xd1\x9e\xd0\xd8\xca\x23\xe5\x36\xc3\x12\xc9\xb4\x15\x95\x9c\x13\x03\x25\x77\x34\xe3\x29\x99\xbf\x78\x7d\xc2\xf2\x44\x98\x31\xce\xcf\xc8\xa2\xcc\xd3\x2c\x5e\x45\x25\x7e\x8d\x5d\x5e\x0c\xf5\x66\xa1\x00\x04\x65\xac\x2c\xa0\xa1\xfd\x2a\x5c\x43\x21\xf9\x9d\xd9\xea\xe5\xd5\x19\xb9\x65\x5b\x5f\x52\x56\xf1\x55\x6b\x87\xb8\x3f\x75\x40\x37\x88\x01\x37\xc9\xbe\x37\xd6\x1f\x2b\x36\xe6\xa1\x3d\x84\x63\xb1\x5d\x07\x09\x4e\xad\xdd\x70\xd1\xf9\xfe\xc7\xb3\x37\xea\xe2\xee\xf7\x73\xe5\x58\x46\x78\xb9\xf6\x81\xc4\x70\x50\x5d\x3f\x58\xc4\xfa\xef\x00\x1a\x55\xf7\x61\xf0\x68\xb6\xed\x03\x91\x46\xdb\x08\x98\xd8\x16\x90\x97\x79\xbf\x09\xcf\x83\xa1\x3f\xb3\xc4\xe7\x63\xbd\x97\x7b\x00\x66\x6c\x28\x62\x2f\xd4\x74\x0f\x32\x1e\x74\xae\xaf\x5f\x0d\x82\x8c\x6f\xd3\x03\x2a\xae\x4d\x1b\x44\xae\xaf\x5f\x9d\x40\x15\x88\x93\xa5\x5d\xe7\x41\x2b\xfe\xee\xeb\x92\x3b\x6c\x84\x5d\x17\x1a\x69\x5e\x5d\xde\x17\x34\xcb\xbe\x20\x2c\x2f\x37\x86\xe7\x60\x29\xd4\x07\x56\xe0\xd4\x02\xee\x2a\x3e\x85\x33\x78\x6e\x35\xec\x51\xe4\x25\x06\x03\x72\x67\x78\x9c\x76\x14\xdd\x23\x0b\x9e\x53\x69\x19\x08\x4c\x57\x6b\xd0\xed\xb6\xca\x64\x6e\xae\x03\x47\xaf\x6d\x6f\x8a\xe5\xca\x03\xc2\x0d\x6a\xd5\x76\xa9\xc5\x9c\xb1\xd4\x3a\xdb\x60\x35\x19\xcc\xf8\x6c\x0b\x0c\xa1\x4a\x2c\x27\x05\x55\x96\xb2\x63\x31\x53\x03\x56\x92\x9b\xd5\x60\x7b\xac\x80\xd3\x0a\x65\x72\xcb\xb7\x00\x04\x4b\x28\xa8\xd4\xae\x50\x9b\x61\x22\xec\x54\xb7\xb9\xb8\xb7\x29\xd4\xed\x29\xc1\xec\xaa\x2c\x0a\x21\x6d\x4a\x79\xdb\x14\x4f\xba\xaa\xce\x0c\x85\x40\xcd\x6e\xed\x5a\x46\xf9\x1c\x3a\x7d\x35\xe4\x99\x55\x5c\xe4\xa8\x9c\xc5\x8f\xcf\xb7\x39\xdd\xf0\xa4\xf1\x6d\x9c\x8d\x73\x3a\x79\x99\xb1\x77\x61\x4e\xed\xe7\x3c\x92\x98\xb3\x7b\xa2\x8e\x32\xd6\x91\xa6\x24\x2c\x70\x5d\x84\x1f\x3c\x50\x28\x5b\x7e\xc6\xfa\x7b\xdd\x73\xbd\xe6\x39\xa1\x39\x61\xf9\x1d\x97\x22\xdf\x60\x19\x12\xaa\xdd\x49\x2b\x92\xe2\x44\xb5\x01\x7d\x61\x7c\xe5\x1c\x17\x3b\x52\x90\x77\x9f\x6d\xc7\xb6\x62\x6d\xfd\xbe\xbc\x51\x61\xfe\x73\x7d\x7f\xad\x4d\x89\x52\x13\xda\xcc\xdd\x8c\x3c\x34\xa0\x1f\xe5\xcd\x0b\x06\x8e\x42\xd3\x83\x58\xd6\x87\xf6\x86\xfe\xc0\xa4\x11\x7e\xe7\x0a\x8b\x6a\x79\xc0\x84\xf3\xdc\x92\x7b\xba\x9d\x92\x7b\x91\x3f\xea\xb7\x57\x60\x8c\xb4\x8d\xb3\x76\xe1\xbd\xca\xbe\x40\x9a\x6f\xcd\xfd\xac\x88\x80\xa4\xce\xe0\x7b\xe3\xcd\x22\x35\x8b\x49\xfc\xf8\x63\x90\xd7\xe1\x04\xe1\x1b\x78\x66\xbf\xcc\x32\xb4\x76\xd8\xc7\x99\x72\x09\x08\x1d\x7c\x8c\xf0\xe5\x41\xbb\x8c\xbd\xab\xe3\x33\xb7\x1b\xc5\xa8\x34\xcf\xd3\x6c\xc4\x66\x0b\xa7\x99\xc1\x72\x32\x85\x57\xbf\x6d\xa0\xc1\xa8\xe5\x66\xac\x1f\x41\xc3\x90\x33\xca\x7b\xa0\xcb\xd5\xa3\xd7\x71\xe0\x10\x69\x77\xe2\xbb\xda\x47\x4c\xf5\xb8\x99\x9a\xaa\x0b\x28\x38\x14\x8d\xd8\x9c\x9b\x2f\x3b\x65\xcb\x6e\xf7\x08\x38\x9e\x3b\x26\x2d\x84\xe7\x2c\x61\x4a\x19\xe2\x50\x23\x96\x90\xe5\xbf\x5c\x30\x99\x33\xcd\x54\xad\xcc\xf6\x10\x5e\x5f\xf0\x3c\xad\x0a\xa1\xa3\x57\xdb\xef\xdf\xd5\x7e\xb4\xe5\x97\xea\x3f\x06\xfd\x7e\xa0\x32\x7d\x49\x79\x36\x99\x5a\xec\x34\x97\x62\xc9\xad\xdd\x2e\xa9\x15\x67\x59\x0b\xa5\x8d\x6c\xfc\x13\xba\x39\x33\x68\xd0\xaa\xb4\xce\x0b\x0d\x98\x0c\xfe\x79\x67\xfe\x23\xc4\xe6\x2a\x11\x92\x9d\xa5\xbf\x99\x05\x09\xe8\x69\x30\x09\xc4\x0e\x4c\xa6\x93\x32\x2d\x2e\xd2\x8c\x55\x8e\xe9\x89\xc8\x73\x2d\x69\x72\x8b\xff\x5e\xf2\x55\x4d\x89\x69\x90\xcb\x5c\x48\x6d\xb7\x00\x73\xdd\xf3\xfc\xd6\x1c\xa1\xd9\x88\x5a\x8b\xfb\x1f\xc0\x0f\xfb\x35\xee\xfe\xa5\x90\x2e\xa9\xc4\x74\x92\x32\xcd\x12\xfd\x4a\x24\x34\x7b\x6d\xd6\xd2\xa2\x53\xc7\x14\x14\x7b\x4e\x41\x11\x82\x69\xeb\x44\x83\x8f\x91\x82\xf9\x5d\xc5\xe7\x77\xa9\xa2\x3f\xb0\x24\xff\x02\xfa\x96\xe6\x1a\x41\x89\x1f\x2c\xe5\x53\xa1\x11\xe4\x55\xc1\x57\x35\x74\x3b\x31\xdd\x9d\x1d\x5d\x6a\x42\x15\x59\x52\x4d\x33\xb8\x2e\xf6\x8e\xeb\x28\x3d\x6b\xbd\xa8\x48\x81\x97\xff\xa8\xea\xfe\xc9\x0e\xb5\x74\xcc\xc2\xe0\xdf\x12\xa2\x92\x2c\x55\x77\x05\x16\xc3\x92\x37\xb6\x68\x8b\x53\xde\x2d\x24\x4f\x57\x8c\x68\x49\x97\x4b\x48\x9d\xba\x01\xbe\xc8\x88\x2c\xa2\xd4\x8a\xa7\x7e\xb0\x6a\x80\x25\xf0\x32\x96\xf3\x4a\xa7\x24\x17\x44\x2c\x97\x27\xb6\x01\x0e\x89\x47\x86\x9a\xd0\x82\x49\x23\xe5\x75\x14\x42\x6a\xa1\xb9\x8e\x5a\x3b\x75\x8b\xc2\x5a\xdc\x13\xb1\xd4\x70\x4d\x35\x12\xef\x32\xaf\xf8\x6b\x22\x80\x8c\x96\x92\x19\xd1\xb5\x0a\x68\x58\x81\x80\x65\xf9\xae\xd3\xfd\xf9\xa6\x56\x18\x3c\xb6\x0f\xfc\x54\x11\x49\xff\xd3\x89\xf3\x3d\x6d\x14\xc7\x2f\x10\xd1\x8c\xe1\x4d\xb0\x92\x60\x2c\xd9\xa7\x23\xd3\x38\x55\x0b\xd0\x9a\x74\x21\x92\x66\xbc\xd6\x20\xac\x83\xb5\xb1\x01\x0e\xce\xb3\x09\xc7\x32\xb7\x9f\x99\xe6\x0e\xb0\xa6\x86\x68\x78\x99\xc2\x8f\x54\xaf\x81\xd6\x02\x8d\x26\x5d\xee\x10\x2b\x7c\x03\x2f\x4b\x14\xfe\x97\x3b\x4e\xc9\x3d\x5b\x54\x58\xd1\xa0\xce\xa7\x29\x5b\x94\xab\xa7\x46\xb2\x5d\xda\x6a\x44\x72\x46\xaa\x61\xec\x4f\xca\x43\x30\xfe\x00\xb5\x8d\x5c\x55\xc7\x16\x9f\x12\xa0\x32\x2b\x56\x7c\x4f\xa3\xa5\xa3\xc2\xaf\x98\x89\x68\x43\x0b\xf3\xca\xec\x07\x0c\x88\x86\xc7\x29\x44\x66\x75\x2b\xb8\x33\x10\x0c\xd0\x75\x84\xc0\xfd\x3e\x65\xef\x0a\x26\xb9\x91\x12\x68\x56\xf3\x5b\x6e\x72\x4f\x15\x97\x3e\xaf\xd1\xfc\x56\x0d\x98\x28\x3b\xd5\xda\x44\xbb\x4d\x84\x86\x81\x37\xb8\xa1\x00\x0e\xd7\x62\x2f\x92\xac\x59\x72\x1b\xa1\x69\x1e\x4a\xc0\xd3\xc6\x93\xb6\x6f\x9f\x9d\x7e\xf9\xf5\x5f\x63\x00\xd2\x62\xcc\xda\xeb\x6c\xb4\x00\x32\x96\x8b\xfc\x84\x6d\x0a\x6d\x84\xb8\xa0\x4e\x1b\xa1\xd6\x2d\x14\x6a\xe4\xe8\x6d\x58\xdd\x13\x50\x4a\xa2\x4b\x9a\x11\x37\x64\x14\x9b\x79\x26\xb0\xed\x87\x6a\xbf\x54\x8f\xdf\xfd\x72\xf8\xb7\x7f\x31\xbf\x86\x99\x5a\x4f\x1f\x18\xd5\xc8\x52\xef\x6a\xcb\xbc\xfb\x28\x4b\xfc\xf9\xaa\xb5\xbc\x63\x0a\xaf\x7d\xa5\xf0\x8a\xca\x43\x6d\xcf\xd6\x56\x9b\x31\xaf\xba\x8e\x12\xfb\x1e\xf4\xb3\x2f\xff\x27\x3c\xe9\x67\xe6\x49\xff\xe5\x9b\x87\xf2\xb0\x9b\x28\x95\x02\x52\x54\xb1\x84\x36\xba\x0b\xb8\xbb\x80\x4a\x45\x5f\x6d\x5b\xae\x8a\x06\x04\xd6\x9a\xb8\x93\x39\x01\x95\x8f\x39\x90\x13\xea\xbf\x21\x44\xba\xa8\x46\xcb\x2c\x17\x52\x18\x39\x78\x46\x7e\x06\xd1\xc4\x1b\x7c\xd1\xdc\x7b\x31\x27\x8b\x4c\x24\xb7\x0a\xf4\xab\x8a\x59\x01\x06\xb5\xea\x50\x91\x99\x4a\xba\x61\xda\x9d\x70\x66\x00\x19\xbd\xd8\xdd\x61\xd9\x70\x4b\xb7\x1e\xd0\x4d\x29\x80\x42\x08\x68\x53\x62\xc3\x44\xce\xc8\x3d\x08\x5d\x19\xbf\x85\x33\x61\xef\x0a\xa1\x98\x79\x4c\xd6\xc4\x27\x72\xa4\xdd\x06\xcf\xc1\x16\x90\x92\xdf\x71\xc5\xd1\x79\x17\x6a\x87\xa0\xd6\x2a\x98\x1b\x94\x2b\x54\x6a\x9e\x94\x19\x95\xa4\x28\xa5\x19\x77\x4a\x28\xc9\xb8\x02\xd5\x9b\xdf\xa1\x5d\x41\x2a\x80\xb6\x01\x47\x69\x00\x81\x03\x2c\xdc\x4c\x1c\x94\x9c\x3e\xfd\xef\x9b\x49\x5b\xdc\x00\xcd\x72\xb0\xff\x4c\x88\x62\x61\xb8\xaa\x8a\xc6\xbb\x3c\xd4\xe6\xc2\x1a\xc3\x53\xc0\xfe\xbf\x33\x29\xfc\x7a\xda\x53\x2c\x79\x66\x79\x43\x8d\xb5\xf4\xb5\x20\xbf\x99\xdb\xc2\xa7\xe0\xec\x1d\x45\x91\xf1\x4a\x53\x6e\x8e\x7d\x46\xce\x72\x02\xa4\xc5\xe1\x26\x95\x71\x2c\x16\xee\xad\x05\x76\xe9\x10\xe4\x8d\x36\xb0\xe0\x18\x03\xf0\xa4\x52\xd2\xed\x64\x3a\xe1\x9a\x6d\x42\x52\xed\x2d\xe9\x75\x05\x43\x0b\x62\x83\x8f\x5e\x29\x2f\x36\x27\xca\xfc\x76\x42\xd3\xdf\x76\x03\x52\xab\x4d\x06\xe7\x07\x90\x31\xfe\x71\xf2\xec\xf4\xf4\x74\x4a\xcc\xff\xfe\x3a\xce\xc7\xa2\x52\x7d\x44\xbc\xb3\xed\x27\xef\x61\xe1\x04\x19\x00\x43\xd4\x56\x3f\x5e\xb0\x15\xcf\xcd\xa5\x9e\xb0\x3c\x35\xff\x9d\xa2\x9b\x85\xe2\x77\xec\x09\x5e\x8a\x41\xe3\x58\x55\x53\x95\x1b\xd4\xd8\x0a\x99\xe2\xa3\xa9\x44\x3d\x73\x27\x96\x35\x05\xf8\x28\x73\x87\x38\x52\xf2\xf8\xf4\xe4\xf4\x89\x35\x85\xc0\xb4\x8e\x47\x90\x34\x4f\xc5\x26\xdb\x92\x64\x2d\x14\xcb\xa3\x98\xa4\x4f\x03\xd3\x36\x3b\x77\x37\x76\xc7\x60\xf5\x2b\xb6\xb8\xbc\xc1\x68\x5b\x51\x92\x7b\x07\x4a\x46\x0c\x5a\x63\xe0\xbd\xc5\xc2\xd1\x55\x35\xf4\x4c\xed\x02\x84\xb5\xef\x4e\xbe\xca\x04\xa8\xd0\x09\x4f\x33\x46\xde\x3e\x9f\x87\x62\xb4\x3b\x93\x5b\x56\x68\x22\x0a\x96\x93\xc7\x6c\xb6\x9a\x91\x47\x5f\x7e\x7d\xba\x51\x8f\xa6\xe4\xd1\x97\xea\xd1\x93\x4e\x71\x8b\xfc\x04\x8e\xff\x05\xb8\x41\x1a\x6e\x16\xb0\x87\xb9\x1e\x23\x16\xfc\xad\x54\x4c\x42\x4a\xa0\xfd\xc9\x65\x95\x9a\xac\xb5\x7b\xff\xa9\xe2\x79\xfc\x4f\x87\x67\x7c\x7e\x71\x53\x1d\x2e\x3e\xb0\xae\x89\x88\xd4\x60\xec\xd3\x44\xec\xaa\x3d\x8e\x09\x99\x3b\x8d\x11\x67\x56\x77\x1c\xa2\xc9\x4c\xee\xd4\xbd\xe3\x4a\x76\xd7\xa4\xc7\xce\x62\xa4\x4a\x3d\xd2\x35\xa2\x36\x68\xab\xb3\x1e\xa8\x50\xdf\xd0\x77\x73\x26\xcf\x85\x64\x93\xe9\x64\x03\x25\xd1\x75\x52\xbc\x50\x46\x42\x01\xa3\x7f\xa5\xa3\xd6\x49\x71\x9e\x09\xc5\x7e\xa1\xdc\xc5\xd4\xb5\x55\xc9\xc1\x78\xb1\x10\x37\xfb\xad\xca\x57\x04\x41\x6f\x81\xd7\xc1\x9b\xb3\xeb\x00\xdd\x58\x4b\xa4\xd9\x70\xc1\x24\xf8\x90\x18\x2a\x46\x1e\x9f\x42\x1e\x11\x46\xef\xd0\x9a\x90\xf1\x8d\xe1\x51\xd4\x09\x47\x36\x95\xaf\x72\x48\xb3\xc0\xf3\x27\x23\xdd\x00\x37\xb1\x0a\xca\x1b\x9e\x37\x43\xbc\x90\x76\x8a\xa5\x5b\xe4\x09\xac\x0e\xea\xcd\xb2\x44\x48\x0c\xf7\x72\x25\x9f\xa7\x44\xb2\x15\x95\x29\x04\xd9\xdb\x3e\xd0\xfe\x75\x75\x12\xc0\x0a\x57\x27\xf3\xb7\xee\x9d\x8d\xdd\x4a\xec\x9e\xda\x41\x35\xed\x46\x51\xf4\x5f\x41\x1c\xcb\x35\x9a\x09\xcf\x5f\xfd\x74\xf5\xe2\x9f\xbf\x9c\x5d\x5c\xa3\xaf\x8f\x2b\x39\xbc\xa1\xe6\xb8\x72\xe7\x7f\x60\xbb\x81\xa8\x3b\x73\x54\xe2\xaf\xa7\x3d\xd4\x01\x99\x24\xbd\x3f\xdc\x1f\x87\xe4\xd8\x59\xb4\x9b\x45\x4f\xe3\xfa\x7c\x24\x31\x84\x5d\x7e\x9c\x6d\xee\xdf\xc9\xf9\x41\x78\x7a\x0c\x7a\x8b\xf6\x1c\xad\x17\x49\x99\xa6\x3c\xdb\x03\xc6\x53\xff\x2e\x99\xa4\x29\xfb\x0e\x2c\x12\xd5\xdf\x67\x19\xd8\xd2\x42\xc3\xdb\x86\xe7\x81\x86\x3a\x82\xed\xc2\xbe\x11\x84\x17\x7c\x26\x9a\x65\x99\x0a\x59\x6e\x2d\xc8\x95\xc1\x77\x81\xc5\x94\x2f\x49\xa9\x9c\x1e\xa3\x28\x0d\xa6\x74\xea\xa3\x4a\xa2\x8d\x2b\x1f\xeb\xfb\xea\x59\xcb\x77\xdc\xe7\x7a\x59\x70\xef\xa6\xe3\xe7\x59\xde\x6f\xa8\xbc\x25\x98\x99\x31\xd0\xf0\xc2\x52\xc7\xad\x6f\x58\x86\x38\x9d\x92\xaf\x9e\xfd\x3a\x1e\x37\xf7\x99\x09\x6a\x9f\x9b\xf8\xda\x46\x1f\x80\x88\xe0\x97\x2a\xcb\xcc\x0a\xd8\xde\x40\xe0\x5e\xee\xd7\xc0\xc3\x3e\xdb\x00\x27\xbb\xfe\xf2\xcb\xcd\xa3\x27\xfb\xc3\x47\xaa\x67\x17\xaa\x2b\x70\xe2\x83\x96\xde\x85\x83\xfe\xc0\xc8\xa7\xc9\xe1\x8d\x43\x3c\x8d\x5e\xa3\xb4\x9c\x7b\x42\x38\x3d\x08\x65\x3a\x51\xc9\x9a\xa5\x25\xd6\x7c\x66\xef\x20\x72\xe0\xfc\xe2\xf9\xa5\x32\x9f\x8c\x5c\xa7\xcf\x2e\xe7\xc8\x7b\xd5\x18\xb1\x97\x3c\xc8\x6a\x57\xa6\x45\x27\x3f\x56\x1b\xb3\x6d\x47\x09\xbe\xa2\x66\xd5\xe9\x6c\xcc\x4f\x8f\x54\xe0\x12\x04\xba\x61\xb3\x6d\xce\x64\xe8\xda\xa4\x45\x99\xac\xad\xe1\xd4\xa0\x22\x83\x1c\xca\x02\x9b\x3b\x67\xf4\xdd\x94\x1b\xfb\x7b\xee\x77\x9f\xf0\xa9\xfb\x7b\x8d\x6b\xd9\xc3\x7b\x6f\x2b\x13\xfc\xcd\xb7\xd1\x04\x7c\x22\x67\x97\xf3\xd0\xfb\x54\x16\xff\xb4\x2c\xaf\xe1\x7e\xcd\x9f\x34\xcf\x45\x99\x23\x06\xa7\x77\x82\xa7\x84\xe6\xea\x9e\x81\x6a\xca\x74\x36\xb4\x80\x33\xab\xee\x86\x87\x67\x96\x75\x5a\x69\xa4\xa2\x34\xe6\x43\x10\xd8\xee\x97\x71\x68\xe4\xd5\x7c\x49\x31\xc6\xb0\xfa\xec\x76\xa5\xed\x9f\x28\x09\x78\xb7\x3e\x83\x62\x80\x3f\x54\x4c\x29\x10\x5d\xc0\x79\xda\x88\x05\x8c\xdf\x61\x54\xcd\xcb\x8b\x37\xe8\x44\x6b\xb5\xe3\x76\x0c\xae\xc8\xe9\xd4\xeb\xad\x19\x60\x15\x9c\xcb\xba\x50\x37\xe6\x14\x87\x88\x95\xab\xe1\x98\xd8\x49\x8c\x3b\x06\x60\x93\x5b\x67\xf1\x19\xef\x3a\x40\x9e\x31\xf5\xd8\x0e\x97\xff\xf6\xf9\x9c\x14\x34\xb9\x65\xfa\xf3\xdd\xef\x47\xa7\xd7\x1d\x2a\x95\x31\x44\x3b\xde\xb5\xa2\xdc\xbf\xf0\x3c\x15\xf7\xea\xe9\x0f\x6f\xae\xf6\xa6\x0e\xb1\x8a\xf9\x37\x74\x63\x10\x20\x5a\x10\x7f\xe6\x85\xf7\x15\x7c\x7e\x75\x19\xa1\xb1\xfe\x53\x97\x5b\xf7\xd5\x65\x9b\xfb\xbf\x5f\x33\x30\xa5\x98\xe5\x17\x22\xe3\xe6\x3a\x1c\x61\x5d\x30\x1b\x08\x60\x73\xbc\x9a\xb1\x63\xf8\x38\x5c\x6e\xdb\x72\x55\x7d\xf4\xd1\x1d\xe6\xdf\x96\xe1\x77\x36\x88\xa6\x0d\xc4\xf0\xfb\x5a\xb8\x40\x04\x67\x05\x75\xe6\x3f\x5c\x67\x94\x68\xf9\xc3\x6a\x93\x06\xf7\x29\x62\x55\xb4\xab\xb1\xc6\xda\x9f\x2f\xe6\x66\x4a\xb0\xbb\xfa\xd7\x65\x04\x0f\x60\x30\x32\x41\xd3\x05\xcd\x28\x44\x82\x3e\x30\xc4\xd0\x13\xde\x0a\x66\x67\x2f\xde\x69\xd3\xc9\x46\x34\xa4\x2e\xf2\xb9\x0f\x4a\x3b\xba\xb8\x30\x1f\xfb\xb2\xa9\x5c\x95\x18\xfe\x23\x96\x84\x61\x97\xd4\x9b\xa6\x95\x8d\xaa\x03\xff\x12\xc8\x52\x82\x63\x0e\x02\xa9\xb9\xee\x16\x14\x22\x03\x90\x7e\xb7\xbd\xea\x66\x3d\x2e\x5a\x6d\x08\xcf\x53\x88\x64\x55\x1e\x20\xeb\xc7\xe4\x40\xd2\xf2\x17\xd6\xc7\xd3\xee\x16\xd3\x4c\x16\x45\xb6\x85\xdc\x6c\x92\xd9\xb1\xe2\x12\x6a\x1e\x05\xd3\x10\x3e\x5b\x47\x44\x3a\x1c\x2e\x3e\xf8\xaa\xaf\x5f\x59\x81\x60\xcc\x25\xfb\xc6\x15\xf2\xf1\x08\x47\x0b\xe7\xa3\x73\xfd\xea\x0a\x5f\xab\xbb\xc7\xc8\x35\xd6\xaf\x2c\xa1\xcf\xa9\x8e\xcc\x7b\x7e\x66\x7e\xb7\xae\xec\x61\x28\xee\x62\x6b\x2e\xea\xb1\xde\x16\x3c\xa1\x59\xb6\x25\x92\xd1\x14\x79\x38\xda\x8a\x4d\x56\x36\x74\xf8\xc9\x8c\xd8\x01\x35\xbd\x05\x7c\xc8\x12\x66\xce\x8d\x41\xfe\x66\x62\xa3\x9f\x9b\x67\x1c\x48\xe2\x66\x5a\xf0\x71\xa3\xf1\x00\xe3\x6b\x59\x2a\x83\xab\xda\x2b\x80\xa8\x7f\xc0\xbc\x51\x17\x40\x26\x75\xc7\x09\xd8\x2f\xbb\x9e\x81\xf3\xfb\x0c\x22\xb4\x97\x1c\x8f\xc0\x8d\xd8\x71\x08\x4c\xea\xd1\xc7\xe0\xda\x46\x43\x8c\x81\xe7\x83\xc7\xaa\x00\x24\x22\x4b\xa2\xa5\x5e\xb3\x5c\xdb\x44\x23\x51\x77\xa2\x5c\xb1\xa4\x8c\x29\xd1\xed\x14\x15\xa1\xa0\x49\xc2\x20\x70\xcb\x85\xc8\xdc\x31\xc9\x97\x5b\xa7\xa4\x81\x25\x54\x73\xcf\xc8\x4b\x43\x21\x83\x34\x5c\xf1\xb7\x7a\xcb\xb6\xf1\x9b\xf9\x11\x3f\xec\xe1\x62\x6e\xd9\xd6\x5d\x8e\x1b\x34\x7e\x37\x55\x7e\x82\xc1\xab\xb9\xed\x8a\x81\xdf\xdb\xcd\x20\x34\xc7\x29\xee\x95\xff\x66\x10\x5a\x3d\x9e\xce\x3a\xc9\xa0\x26\xed\x02\xad\x14\x55\xc9\x83\xc0\xc7\xc8\xd0\xde\xd0\x4f\xae\xf6\x9e\xe8\xca\x60\x1f\xf4\x6d\xa8\xcf\x66\xfd\xda\xc0\xdb\xce\x3a\xaa\x79\x67\x5f\xc0\x5a\xd6\x6b\xa2\x72\x8e\x35\x5f\xf7\x89\x5a\x5f\xd1\x05\xcb\xe6\x92\x41\x19\x86\x7e\xea\xd9\x68\x6a\x81\x09\x64\x46\xe7\xec\x12\xc4\x96\x06\xdb\x08\x22\x48\xaa\xd8\x40\xa4\x3d\x1c\xd3\x30\x2c\xcb\x3c\xa9\xdf\x5d\x94\x86\x66\x66\x05\x80\x90\x99\x82\xd5\xb6\xe8\x29\xb6\x68\x2d\xfd\xad\x5d\x0c\x3a\x0b\x2e\xb7\x98\x2b\xfa\x66\xb2\x92\xa2\x2c\xd4\xcd\x24\x06\x33\x7e\x92\x36\xe6\xb4\xb9\xf2\x28\xb1\x6f\x0f\x02\x1f\xcd\xed\xa2\xcb\xfd\x9a\xaf\x0c\x49\xf6\xbb\xe3\x8a\xac\xf8\x1d\xa6\xdb\xc7\xd4\xd6\x70\x4a\x6b\x6f\x2e\x32\x8b\x36\xdd\x97\x34\x53\xe3\xfb\xa7\x02\x74\x39\xf5\x61\x22\x78\xe1\xc3\x60\x43\xcd\x83\x73\xe8\x05\x0d\xdf\x72\x2f\x90\x61\xb9\x12\x48\xc8\xe1\xd9\x1a\x60\x65\xb7\x75\x8d\xdf\x10\xe3\x05\xc7\xa2\x86\xa1\x26\xa2\x69\xbb\x06\x5b\x1e\xea\xd6\xb0\x8d\xd5\x8b\x74\x80\x11\x39\xcb\x32\xc7\x1b\xdb\xf6\x15\xca\x67\x5c\xe3\xad\x82\x2f\x23\x79\x2c\x24\xa1\x0b\xf3\xcf\x27\x5e\xfe\x09\x12\xd0\x27\x22\x57\x3c\x65\x92\xa5\x84\x92\x25\x47\xdf\x2e\x83\x23\xbc\x1e\x5f\xa4\x3b\x29\xe8\xfa\xc0\x99\xd5\x01\x19\xf7\xd8\x62\x31\xa3\xbb\x72\xdb\xf1\xbb\xa9\x7c\x31\x73\x0c\xa1\xda\x1f\x38\xb2\x15\x4d\xb6\x8e\xbd\xeb\x05\xc7\x5a\xcb\x38\x38\x56\x50\xe8\x02\x47\x58\x15\x36\xe2\x99\x7a\xf3\x2a\xa9\x21\xce\x0b\xcc\x22\xef\x1d\x8f\x9e\x5a\xd4\x8d\x66\x19\xaa\xd0\x7f\x09\x4e\x2e\x1c\x00\xbd\x8f\xac\xce\xd5\x45\x61\x58\x27\x71\xd3\x44\x8d\x00\xe0\x52\x02\xd6\xe5\xef\xda\x80\xbb\xe0\x79\xfa\x33\x93\x8b\x48\x88\xbc\x59\xb2\x83\x2b\x08\xf1\x31\xe4\x7d\x6a\xdd\xdd\xf8\xb2\x1e\x2a\x6b\x03\x72\xdd\x3e\x69\x51\x20\x47\x6f\xc9\xe0\xdb\xcb\x57\xb8\x02\x94\x1d\xb8\x52\xa5\x03\x43\x3f\x34\x7a\x27\x06\xc7\x06\x42\xc7\x86\xe9\x35\xea\x16\xf9\xa6\xc0\xac\x0a\x28\x39\x85\x87\xe4\x4e\x31\xfc\xed\x91\xf2\xe9\x29\x16\x3c\x33\x58\xd0\x87\x2a\x21\xf0\x83\x8e\xd4\x47\xf7\xa0\x8b\x92\xc8\xc3\x93\xa7\x79\x35\xa9\x75\x13\xb6\x64\x26\xea\x76\x65\xa3\x9e\xb5\x2e\x22\x98\xc0\x86\x4f\x5f\x5f\xcf\xaf\x6a\x5e\xab\xf8\x32\xc0\x41\x38\x78\x14\xa3\x60\x2b\x1e\x8c\x00\xbe\x8c\x23\xae\xd4\x3a\x3d\x1e\xe6\x52\x83\xc1\x6b\xd7\x1a\xf5\xea\xd7\xba\x5b\x17\x67\x0e\xcc\x29\xe3\xea\xf1\x5f\x4e\x6d\x96\x86\xe1\xbe\xd4\x4f\x59\x7f\x84\x2f\xad\x87\xa7\xed\xb3\x04\x03\x0f\xf0\x45\x88\x26\x6c\x60\xbd\x85\x8c\x19\x99\x23\xe5\xe4\xbf\x57\xf3\x18\x08\x44\x39\x7a\x4a\x6e\xff\x5b\x3d\x45\x8f\x58\x37\x85\x72\xc4\x96\x5b\x55\xb7\x4f\x97\x54\x79\xae\xe6\x75\x23\x6e\xdc\xf6\xf9\xd7\xbf\x80\x20\x60\x66\x32\x00\xd3\x21\xcc\x83\xe4\x59\x9d\x07\x5f\xd6\x71\x86\x5b\xab\x69\x36\x25\x7c\xc6\x66\xe1\x46\x03\x33\x8e\x39\x08\xbc\xbd\x5a\x7f\xc9\x74\x29\x73\x05\xda\x09\x29\x85\x24\x98\xc6\xd4\xf4\x90\x8c\x26\x6b\x70\xee\xe8\x30\x47\xd7\x14\x23\x91\x87\xd0\x50\x9d\x34\x0c\x50\x11\x6d\x89\x27\xfb\x81\xda\x04\x1e\x63\x75\xbd\x27\xe4\x0c\x5e\xb4\xf3\xcc\x50\x96\xa3\xae\x6d\xca\x6a\x56\x11\x14\xa6\xe1\x15\x1b\xae\xfc\x3b\x9e\xa7\x37\x39\x21\x8f\x23\x67\xe9\xd0\x14\x93\x4f\x48\xb1\xa6\xe0\x0d\xbe\xf4\xd0\x52\x85\x05\xb8\xca\x1b\x66\x1c\x83\x49\xc4\x32\xae\xde\xb0\x51\x7a\x5c\xc1\xb6\x01\xd7\xe1\x03\x14\x32\xa4\x10\x53\x33\x8e\x01\x67\x08\xec\x6b\xef\x2d\x3c\x82\x9b\xfc\xc4\x0c\x13\xd3\xf4\xa8\x5a\x51\x2a\x7c\x25\x6e\x25\xd3\x86\xda\xc7\xcc\x08\x13\xa9\x5b\x5e\xa0\x40\xe2\x9e\xb4\xd7\xcd\xf0\x3c\xae\xf2\x69\xb1\x10\x83\xae\x92\x7e\xda\xca\x5d\xb2\x53\x29\xf7\xde\xfa\xed\x9f\xd3\x64\xcd\xce\x69\x11\x7f\x1c\x6f\x1a\x2d\x6a\x38\xa3\x49\x59\xb9\x22\x89\x6d\x26\x96\x24\x01\x2d\xb8\xad\x9b\xc4\x73\x7c\x93\x5c\xe4\x53\xa2\x44\x88\x2a\x2a\x29\xdc\x7a\xa6\xe7\x29\xda\x21\x69\x16\x76\x23\x74\x61\xb0\x06\x4c\x98\xf1\x15\x37\xb3\x20\xeb\x0d\xa4\x1e\x4f\xb5\xb9\x22\x9a\x19\xe1\x79\x0b\x6b\x61\x29\xe6\x6d\x70\xe6\x68\xb1\xb4\x85\xc2\x82\x4a\x2d\x36\x06\x33\xfa\x12\x0b\xc9\x0c\x50\x8d\xa0\x04\xb6\xe5\x81\x48\x41\x38\xfa\x20\x2d\x28\xfc\xa3\x1c\xb5\x6e\xff\x82\x0f\xb5\xf4\xda\x04\x83\xab\xd7\x99\xaa\xb4\x8b\x0d\x16\xd9\xeb\x12\x1b\x54\x4c\xd2\x5c\x41\xf4\x46\x46\xb7\x58\xae\xa8\x04\x91\x0d\x5f\xc4\x18\x87\xe3\xbe\x57\x54\xe9\x3b\xdf\x4f\x03\x36\xb0\x2d\xde\xfa\x43\xa0\x3a\xb0\xfe\x87\x4f\x85\xde\x51\x9e\xc1\xab\x8b\xec\xfc\x9e\xf1\xd5\x3a\x42\xbe\xaf\x31\xb7\x14\x93\x3c\xc1\x84\x29\x45\xc6\xad\x3a\xc4\x8b\x2b\x10\xa1\x10\xbc\xcf\xe6\xa9\xaf\x58\x0e\x79\x98\xac\x79\x0d\xa7\x0a\x35\x61\xa4\x10\x8a\x6b\x7e\x87\xb1\x31\xab\xf0\x3d\x74\xd3\xd8\xa1\x84\x1c\xbb\x18\x0c\x1e\xa2\x7f\x6e\x1a\xd4\x62\xbd\xe6\x20\xac\xf6\xc9\x29\xd8\x22\x30\x3f\x40\x90\x5c\x99\x68\x8b\xe7\xad\xb8\xeb\x71\xb7\x53\x3c\xd1\x82\x0f\x09\x0d\x15\x8e\x9f\x54\xef\x12\xfe\xf0\x3c\xcf\x64\x3a\x59\x53\x99\xce\x45\x7a\xb6\x04\xd8\xdc\x5e\x6d\x37\x18\x98\xf0\x0b\x02\xc4\x74\x42\xb3\x7b\xba\x55\xe7\x86\x92\x9c\x65\x06\xfe\xdc\xa0\xed\x74\x14\x5d\x2d\x5b\xbb\xfe\xc5\x3c\xd4\xb3\x8e\xe6\x0d\x82\x37\x0d\xf0\x36\xd0\x33\xc8\x1a\xe4\xbc\x55\x51\x7d\x90\x06\x04\x8d\xb0\x3b\x96\x5b\x23\x3e\xd0\x70\x89\x89\xec\x90\x96\x6f\x90\x75\x9c\x91\x5f\x1c\xcf\x04\xf2\x6e\x35\xa5\x55\xc0\x04\xb4\xe2\x96\x17\xaa\x45\x49\xbd\xff\x5d\x30\x31\xce\x69\x04\x75\x9e\x43\xc5\xb5\xe0\x2b\xbe\x0e\xac\xc0\x16\x67\xbc\x8e\xc9\x3c\xf6\x9c\xcc\xa3\x82\xf2\xb6\x50\xe2\xd5\x01\x21\xc1\x1f\x12\xd7\x1e\x87\xd1\x8d\xfb\x61\x96\x1a\x0a\x0d\x88\xe6\xee\x7f\x90\x91\xdc\xdd\xf8\xe4\x9f\x97\x66\xe3\x57\x95\x94\x40\xed\x08\x3e\x2b\x96\x1b\x09\xb3\x3b\x6a\x88\x3d\x04\xc7\x7b\x5f\x1a\x94\xa0\x6e\xb7\x77\x34\x59\x66\x4d\x55\x9d\x21\xab\x77\x4c\x6e\xc9\xf0\x5a\x4c\xef\x19\xf9\xa1\x77\x8f\x41\xb8\x2f\x9c\xbf\x25\x18\x62\xb9\xf3\x3a\xa7\xa4\xe6\xbe\xfa\xec\xe4\xd9\xe9\xe9\x48\xe7\xd5\x63\x28\xf3\xfe\x42\x99\x8b\x1e\x52\xd0\xf3\x14\x43\xdd\xf0\x92\xeb\x00\x99\x3a\x2d\x8e\xda\xf7\x7b\xf4\x54\xc8\x52\xee\xf7\xef\x6b\xa4\xf3\xa1\xab\x6f\x59\x39\x0e\xb0\x70\x9c\xc1\xaf\xfb\x21\xec\x51\x03\x1b\x8d\xe0\x6f\x1a\xc7\x35\xa6\x47\x6d\x9d\xa3\x98\x28\x37\xc9\x99\xf5\xca\xe8\xe5\xa7\x9a\x8d\x9b\xc8\xa4\x72\xed\xa8\xdd\x52\x04\xb6\x46\xd8\x1d\x2a\x9d\xa3\x41\x4e\x5a\x91\x0d\xdb\x2c\xdc\x8b\x5e\x54\xc2\x6b\x3a\xe4\x6a\x6c\x33\x7d\x5b\xdc\x35\x99\x5a\x7b\xc4\x7c\xc0\x5e\x31\xef\xd5\xe8\x37\x98\x0f\xcb\x3c\x39\x8d\x25\x0d\xa3\xbf\x81\x8f\x5f\x43\xd8\x7a\xc2\xa4\xa6\x3c\xb7\x26\x29\x64\x37\x52\x02\x65\xe9\x75\x33\x30\x0a\xb0\xdf\x43\x45\x9c\x86\x6d\xc9\xda\x68\xc3\x63\x18\xb3\x2b\xab\x50\x57\x15\xe2\x87\xd0\x54\x91\x2a\xb2\x60\x99\xc8\x57\x96\x40\x55\xf1\xf2\x17\xe0\xa2\x04\x3a\x2b\xd8\x62\xd3\x28\x68\x25\x19\xec\xed\xcd\xc0\x74\xe3\xcd\x3c\x60\x2c\x7c\xd0\x96\xaf\x1a\x1b\x7c\xd8\x2b\xad\x9f\xdb\xf0\x03\x6a\xce\xba\xd3\xa3\x1b\x21\xc2\xd4\x9b\xc6\x64\x19\xc3\x80\x06\x17\x87\x6f\x69\x94\xbb\xd4\x74\xe2\x1e\x6c\x44\xde\x08\xf0\x41\x17\x5a\x0e\xad\x8f\x4d\xac\x8c\x16\x55\xbf\xac\x87\x5e\x6a\x1b\x3f\x75\xfa\x4c\x5d\x20\x9c\x71\x5b\xf6\xaa\x06\xcd\x16\xc1\xbc\x44\x25\x78\xa9\xb4\xd8\x54\x5f\xa7\x95\x1b\x60\x42\x73\x6b\x60\x90\x27\xee\x75\xbe\x8c\x7a\x4f\x42\xba\xaf\x40\x40\x09\x06\xe1\x61\xe6\x9c\xc6\x7a\xfc\xa8\xe1\xc9\x0c\x3a\x1b\x0c\xc3\x6d\xfb\x9c\xc6\x01\x22\x12\x8c\x71\xc8\xbf\xde\x76\x34\xee\x6f\x52\xe7\x4f\x80\xfa\x73\xcd\x9b\xe8\x3f\xf0\xc9\xc0\x3e\x4c\x69\x96\x5e\x8b\x73\x5a\xd0\x84\xeb\xed\xa5\x59\x89\xdb\x6b\x44\x1e\x6f\x0e\xd2\x81\x4e\x1b\x9b\xff\x8c\x89\x45\xb0\x97\xf7\x63\x4e\x24\xba\xe1\xcb\x8e\x6e\x91\x93\x00\x67\x20\xc0\x1f\x12\xa4\x5a\x90\x08\xfd\x57\xb5\xa6\xc5\x60\xc2\x83\xce\x0d\x75\x2d\xa3\x5a\x7d\x40\x10\x43\xe0\xd8\xe5\x16\x59\xae\x4a\x09\x88\x78\x25\x44\x4a\x54\x01\xae\x5d\x8f\x69\xae\xf9\x89\xa3\x97\x4f\xfe\x08\x04\x33\x3c\x80\x87\x13\xcd\xda\x83\x1a\xea\x31\x7c\x41\xe3\x29\x6f\xb8\xfc\x5d\x90\xde\x18\xe2\x1b\xb6\xec\xa1\xbd\x16\x3e\x76\x22\xbd\xf7\x5e\x07\x78\x70\x1a\xdc\xf6\x02\xfb\x20\x31\xe8\x61\xa4\xb8\x76\x46\x4d\x4a\x8c\x1f\x3f\x88\x10\x37\xc9\xcc\xee\x04\xb9\xd3\x59\xee\xa0\x9a\xfc\x00\xad\x78\x5d\x7e\x5c\x95\xef\x73\x35\x41\x32\x57\x3c\xa0\x40\xbd\x0f\x27\x9a\xb3\x15\xfd\x18\xca\xfe\x16\x2c\x8c\x79\x79\xc3\xaf\xbe\xb7\x8c\xde\x40\x67\xeb\x87\x54\xf1\x21\x96\x4b\x48\xcc\xc3\x18\x4f\x98\x06\x23\x57\x0d\x65\x6a\xbf\x55\x19\xda\xf4\xf7\xaa\x7d\x70\x86\x94\xab\x82\x25\xa0\x33\xc1\x15\xb4\xf5\xd8\x66\x36\xc8\xea\x0f\x6a\x2d\x9c\x22\xe6\x05\x5a\x11\xd7\xbd\xae\xf3\xad\xe6\x19\xff\x1d\x18\xb8\x2b\x33\xc1\xdc\x2c\xe3\x81\xca\x92\xda\x9e\x87\x01\x2b\x3e\xf5\x38\x90\x0c\x26\x1a\x51\xc4\xd1\xb4\x0b\x39\x5f\xc5\xf3\x55\x16\x98\xff\xa1\x58\x07\x3e\x5c\xf3\xf8\x17\x3c\x87\xf0\x37\xeb\x41\xe3\xaf\x62\x10\x98\x1f\x16\xee\xd2\x13\x4c\x62\x31\x5e\xa5\x36\x05\x37\xc8\xc0\x69\xa4\xf3\x85\xf4\x7a\x75\x75\x21\xc4\x5f\xbc\x5a\x39\x9c\x75\x94\x7f\xcf\x83\x1d\x18\x9b\xa2\xf8\x70\xd9\x33\xd7\xf4\xb3\xf4\xa8\xfd\x04\x6e\xb4\x1b\xaa\x6d\x1d\x8b\xc3\xba\xcb\x7e\xf0\x15\x37\x78\xf6\xa1\x6b\x0e\x9a\x7f\x32\xb7\xfa\xc3\xf9\xd2\x3f\xf8\x34\xe3\x68\xb3\xe7\x3c\xa3\x1d\x22\xe8\x10\x29\x50\x88\xf0\x3a\x69\x4f\xdc\x25\xb7\x9a\x07\xd2\x41\x08\x19\x41\x76\xf8\x73\xfb\xce\x21\x19\x16\x55\x8a\xaf\x72\x3c\x49\x64\x83\x83\x31\xc9\xe3\x2d\xa1\xef\xb8\x7a\x02\x49\x59\x78\x1a\x66\x17\x85\x4c\x44\xcf\xc6\x1a\xb2\xc2\x85\xf6\x9d\x16\x79\xfc\x6e\x68\xc6\xd3\x19\x79\x59\x66\xd9\xd6\x2e\x94\xa5\x78\xf1\x1b\x5a\x28\xd7\x60\x6f\x25\xc3\x22\xc0\xb0\x60\x9a\x56\x9e\x18\x63\x02\x00\x8f\x7e\xdf\x47\xbf\xef\xf1\x7e\xdf\xd7\xd7\xf3\xab\xa3\xdf\xf7\xd1\xef\xbb\xd3\xef\x7b\x3f\x99\x2b\x8e\xae\xe1\x47\xd7\xf0\xa3\x6b\x78\xcd\x35\x7c\x3a\x79\x77\x72\xeb\x55\x66\x27\xe6\xe4\x4e\xdc\xcc\x5a\x6c\x78\x32\x39\x3a\x8f\x1f\x9d\xc7\x8f\xce\xe3\x47\xe7\xf1\xc3\x3b\x8f\xef\x9a\xac\xfb\x73\x71\x36\x47\xe9\xe8\x22\xd7\x4c\x06\xae\x95\x67\x72\xd5\xab\xb2\x8e\xb5\x6f\x69\xa9\xe3\x1a\x87\x66\xd7\x9e\x12\xbf\xc7\xb2\x85\x07\xf5\x74\x6e\xb8\x0c\x77\x79\x0a\xff\x10\x6b\xe6\x78\x20\xf3\x0e\xa1\x08\x5c\xa5\x19\x66\xef\x38\x6a\xcf\x2c\x8f\xa2\xd7\x50\xfb\x4a\x23\xa5\x34\x93\x56\x4e\x57\xf6\x00\x79\x6e\x2b\xd2\x19\x66\xfc\xe8\x68\xfb\x71\x1d\x6d\x3f\x4c\xaf\xf2\x63\xb9\x60\x9e\xb3\xdc\x29\xeb\x5b\xbc\x57\x85\x2d\xe0\x16\xdb\x79\x33\xe3\x8a\x48\x46\x53\x26\x5f\x64\xbe\x4a\x6b\xab\xcc\xe4\xb1\x0a\xea\xa1\xd1\xc9\x70\x65\xcf\x66\x05\x8a\x3f\x79\x65\x4f\xd4\x0f\x9d\x8b\x5c\xe3\x11\x0e\x56\x38\x8c\x34\xf5\xb5\x0e\x33\x61\x0b\x4a\x62\x83\xaa\xf6\x21\x94\xba\x6b\x56\x48\x34\xd8\xb9\xb3\xa2\xfb\x41\xea\x2d\xae\x85\xd2\xdf\x1a\x9e\x34\xac\xba\xf8\x34\x3e\x7f\x77\x84\xcd\x0b\xaf\x5e\xa1\xd2\x55\x44\x40\x2d\x40\x25\x48\xf9\xee\x53\xc2\x68\xb2\x06\xb6\xc3\xe1\x75\xab\x7c\x86\x7a\x42\xf7\x23\x94\xb5\x58\x82\x8b\xd5\x66\x55\x6b\x2a\x6d\x92\x3e\x23\xf5\x56\x06\x2f\xd8\xfd\xfe\xe5\xdb\x86\x7e\xba\x4f\xaa\x55\x0c\x5c\x53\xc6\x54\x6e\xfc\xe1\x63\x57\x6e\x7c\x16\xc3\x09\x47\x2a\xbd\xbf\x70\x98\x06\x8d\x8b\xe4\xae\x09\xbf\xd7\x08\x57\xa3\xaa\xd1\x92\xe0\x58\x84\xb9\xc6\x78\x2c\x1f\x88\x10\xeb\x0b\x68\xa1\xc3\x31\x95\x09\x5f\x1f\xb8\x32\x61\x0d\x60\xe3\xca\x04\x26\x13\x43\xc8\x57\xec\xa7\xe5\x1b\x91\x32\x75\x2d\xae\xe2\xe6\xb8\x79\x47\xcb\x20\x1f\xb6\xfd\x5e\x57\xc3\x80\xcc\x2a\x72\xa8\x5f\x57\xe6\x29\x59\x32\xaa\xb8\x2b\x8e\x25\xcb\x3c\xc7\xec\xd1\x85\x48\xa7\x4d\x15\x92\x16\x85\x02\xaf\x61\xc5\x0c\x30\x41\x0f\x88\x52\xf5\x63\xc4\x34\x3d\x56\x97\xb1\x66\x59\x01\x56\x15\x29\xee\x82\x51\x1f\x29\x57\xb9\x99\xe6\x09\x9b\x91\x4a\x4d\x88\x81\xb9\x44\x43\xe6\x70\x2d\x20\x3e\xd5\x2b\x34\xc9\xcd\x64\xc3\xf3\x97\x76\x5e\xbb\xff\x97\x3c\x4f\x6f\x26\xcd\xd5\xe4\xc2\xb0\xff\x9a\x49\x72\xef\xc4\x75\x5f\x57\x07\x9f\x2a\xc6\xd2\xce\xc8\x8b\x77\x74\x53\x64\xec\x5b\xa7\xbd\x76\xb5\xa6\x95\x91\xeb\xb9\x22\x5f\x9f\x9e\x3a\x7d\x98\xb5\xeb\x44\x07\x22\x5f\x9d\xc2\xd1\xe5\xad\xb3\x33\x5b\x80\xca\xd7\xa5\x04\x75\x7e\x63\xa5\x70\x2b\x3e\x12\xf7\xd9\xd7\xa7\x55\x03\x91\xb3\x30\xfc\x37\x4c\xf2\xec\x12\x3f\x07\x17\xfe\xf8\xeb\xff\x3a\x39\xf9\xfa\xf4\xbf\x88\x79\x28\xa9\x4f\xee\x6c\xb6\x51\xaf\xb3\xfd\xc4\xe7\xe7\x85\x05\x78\x8d\xae\x01\xa4\xb1\xa2\x50\x21\xd2\x0b\xf3\x52\x69\xf6\x1d\x4d\x6e\xc5\x72\x79\x65\xd8\xa8\x34\xf2\xbc\xe6\x1d\x2d\xbd\x1f\x21\x7e\x24\x0b\xfc\x0a\xf0\x55\xe6\xf6\x10\x41\xe7\x69\x64\x3a\x2c\xb5\xe8\x55\xd2\xe6\xc0\x36\x1d\xf5\xdf\x9c\x55\xcf\x1f\x97\x11\x2d\x10\xac\xeb\xe9\xb2\x1f\x3f\x53\x4f\x6a\x55\x7a\x47\x26\xcc\x29\x44\xfa\x9a\xbe\x1b\xb1\xef\x56\xab\xa0\x28\xd5\x9e\xf6\xdb\x75\x0f\x3b\x1d\xc3\xe9\x03\xcf\xc1\x32\x27\x31\x57\x5f\xfc\x82\xbc\x4d\x65\xf2\x71\x3d\x10\x1f\x35\xb3\x00\xa3\x1e\x54\xcd\xc8\xdc\x08\xf1\x09\xcd\x49\xb2\x16\x42\x39\xaf\x19\xd7\x32\x25\x25\xea\xa0\x6b\x35\x41\x71\x64\xc3\x41\x59\x66\x1d\x70\x16\x55\x4a\x24\x1c\xb2\x5c\x57\x13\x41\xc2\x5f\x9c\xc4\xa6\x26\xcc\x1f\x39\xcb\xdf\x96\xd0\x7c\xdb\x68\x1b\xee\xc2\xb9\xd6\x9b\x63\xbc\x99\xd8\x83\x0c\x0c\x17\x13\xb7\x12\x60\x91\x5d\xbe\xb9\x35\x93\x7b\xf7\x10\x8c\x88\xc2\xf6\xd8\xe3\xec\xdc\x86\x16\x27\xb7\x6c\x0b\xfa\x43\x3f\xdc\x1b\xeb\xf8\xd6\xc9\xfd\x6d\x68\xd1\xab\x82\xdc\x4f\xfd\xbf\x81\x51\xfa\x88\xfc\xae\xae\x18\x0f\x51\x31\xb8\x73\x1d\xad\xda\x8c\xf6\x1e\xab\x9a\xb0\xed\x2d\xb3\xda\x7a\x3c\xc3\x4a\x4b\x54\x6e\x76\x29\xf8\xe7\xc1\x57\x1b\x53\x8f\x25\x27\x69\x06\x16\x3a\xb1\xf4\x8e\xe4\xd0\x32\x50\xae\x82\xa6\xcd\x88\x3f\x56\x7d\x4a\x7e\xda\x70\x7c\x6b\x56\x84\xa6\xd2\xca\xc8\xd4\x75\xe6\x8a\xb0\x7f\x97\xfc\x8e\x66\xd6\x5e\x58\xd5\x76\x72\x58\xc8\x89\xdf\xc2\x56\xc5\x6d\xe9\x66\xf7\xf8\x5c\xc2\xcd\x0f\x3f\x93\x7c\xd4\xeb\x98\xda\x03\x8f\xe1\x41\xfc\xe0\x71\x0b\x10\x64\x3c\x63\xdb\x07\xb7\x1c\xe4\xdd\x04\xb1\x37\x0d\xaa\xf1\xa7\x33\xf2\xc2\xfe\xe8\xfa\x38\x39\x55\xe4\xac\x73\x00\x73\x71\xb6\x2e\xbf\xd3\xf1\x78\x9e\x01\x87\x99\x91\xe7\x76\x86\xda\xc0\x06\xff\x59\xfe\xa0\xd1\xa1\x39\x55\xb5\x40\x60\x51\x72\x11\x5b\x7d\x00\x08\x55\x1d\x5c\x00\x91\xbc\x72\x2e\x42\x17\xb7\x69\x6b\x42\x0f\x13\x8d\x96\xf5\xda\xfa\xc8\xb8\xb9\x0c\x11\x5b\xeb\x0e\xf5\xf7\x92\x95\xec\xca\xb0\xec\x91\x15\x4c\xab\xc0\x9f\xaa\xdd\xdc\xc2\x7b\x9e\x92\xda\x23\x71\x84\xb7\xb1\xfe\x2c\xab\x89\xe7\x1f\x0a\x94\xaa\x56\xd3\xa7\x23\xfb\x73\xf8\x39\x56\x71\xa1\x22\x5c\x01\xe5\x73\x56\x7a\x87\x40\x20\xb3\x73\x6d\x24\xd0\x94\x33\x55\x91\xb6\x42\xa4\x8f\x14\xb9\x99\x98\x2d\xcf\x6a\x8b\xba\x99\x58\x36\xd7\xb9\x1d\x70\xd5\xa6\x8d\xc1\x64\x7b\x09\xc8\x8c\x3c\xde\x91\x98\xd8\x9d\xed\x68\xd4\x6d\xa4\x0a\x88\xc0\x1a\x32\x47\xd5\x1a\x8e\xb4\x43\xf9\x3e\xe3\x0d\x50\x90\xa6\xf6\x55\x87\xaf\xf2\x59\xf0\x35\x34\x34\xda\xdc\xb6\x87\xf6\x3c\x1e\xe5\x0b\x11\xee\xa0\x2f\xc2\xf3\x4d\x98\x2b\xda\x30\x64\x90\x2a\xda\x7a\x54\x5b\xe1\x12\x14\x73\xf0\xf6\x57\x4c\x13\xea\x72\x4f\x83\xe4\xb2\x43\x05\xb0\x71\xeb\x3e\xea\xea\xf7\xab\xab\x3f\xea\xe5\xf6\x9a\xa6\xa6\x0f\x2f\xcc\xc3\xcf\x91\xfc\xd7\x9f\x07\x66\xa8\x6d\x62\x24\x6a\xf8\xa4\x48\xe1\xc3\xac\x96\x66\x17\xde\xdd\xf0\x25\xd7\x63\x08\x4c\xb3\xfd\x0e\x74\x26\xec\x7a\xf4\x77\xf8\x54\x48\xcf\xba\xf3\xba\xcb\xf8\x1e\xc2\x4e\x3a\xbc\x69\x9b\xcd\x6a\xc7\xec\x6c\x52\x1e\x05\x62\x04\x0b\xbe\x8a\xda\x7d\xe3\xeb\x45\x67\xe4\x5a\x65\xa5\x19\x81\x42\x88\x7c\x89\x7d\x0d\xd6\xfd\xc7\xcd\x84\xa1\xfe\x73\x96\x88\xcd\xcd\xe4\x57\xd0\x34\xc1\x63\x72\xd5\x1e\xa1\xf0\x76\x50\x2a\xc9\x87\xd0\x1b\x5e\x19\xf8\xbd\xc6\x18\x53\xa2\xca\x64\x4d\xa8\xaa\x7f\x78\x4a\x29\xbd\x99\xc0\x85\xd5\x7f\x5f\x2c\x16\x37\x93\x19\x39\x6b\x6c\xcd\x47\x2e\x3f\xd2\xae\x26\x12\x79\xf4\xf4\xd1\xbe\xc9\x7c\xe3\x82\x86\xef\xc6\x2b\xf1\x9a\x37\xb2\xdb\x5d\xec\x79\x1b\x47\xe2\xfa\x79\xb8\xa6\xd4\x6e\xff\x15\xa3\x4a\x9f\xd9\x4a\xfd\xe9\x4e\xf8\xbe\xdd\x75\x04\xea\xef\x19\xe1\x48\x01\x8e\x6c\xef\x1f\xfd\x65\x4e\xeb\x69\x01\xe2\x21\xe5\xaa\x1e\x8b\x3d\x45\x2f\xeb\x20\x6c\xa0\x4a\x73\x51\xe9\x9b\xfc\x57\xc5\x34\xd2\xb4\x85\xb0\x9a\x90\x2a\xa3\xe7\xcd\x24\x29\x4a\x4f\xc1\x36\x6c\x23\xe4\xf6\x66\xe2\xa2\x1a\x6e\x26\xcf\x6e\x26\x5e\x2f\x45\x8b\x22\xe3\xe6\xf4\x7c\xd5\x46\x4b\x29\x4f\x4d\x23\x1c\x12\xda\x9a\xd3\xa6\x49\x22\xca\x1c\xaa\xaf\x07\x91\x53\xa0\x8f\x1d\xe2\x61\x1f\xae\x74\xaa\xe7\x41\x78\x10\xf3\x3b\x52\x6d\x53\x9b\x69\x27\x3d\x8c\xbf\xd3\xd7\xe2\xa1\x78\xb4\xd5\x73\x57\x34\x5a\x1b\xe0\x88\x45\x8f\x58\xf4\x88\x45\x8f\x58\xf4\x0f\x83\x45\x51\xfd\xdd\x9b\x95\x0b\x8d\x1e\x95\x57\xac\x37\xdd\xa1\xe9\xdb\x3c\x30\xad\xfc\x69\xbb\x6a\xbc\x3c\x81\xe0\x4b\x52\x79\xe6\x97\xe8\x74\x92\x61\x56\x53\xf4\x4a\x72\x96\xa6\x7d\xa7\x5f\x09\xf1\xa6\x33\x7f\xe0\x5c\x0f\xc8\xaa\x12\x0e\x56\xc1\x29\x0e\x37\xc5\x1d\xf9\x3a\xd1\x5d\xdb\x3a\x54\x06\x81\x79\xc3\x94\xdb\x7f\x8b\xad\xc0\xad\x20\x8b\x64\xdd\x74\x57\x15\x0e\xf5\xd7\x6d\xbd\xa4\x34\xc7\xe3\xb4\x6e\x39\x36\xe3\x82\x11\xcf\x6d\x3b\x4c\x86\xa2\x08\xcf\xef\xc4\x2d\x03\xe7\x2c\x1b\x30\xc5\x9a\x66\x3a\x85\xed\xec\x40\x00\x1e\x09\x9b\x11\x20\xc3\x09\xcd\x51\x99\x47\xe5\x82\x6b\x49\xe5\xd6\x66\x81\x2b\x25\x9b\x91\x0b\x04\xa9\xc2\x51\x2d\x37\x37\x64\x27\x48\x98\x82\xdb\x52\x0c\x86\x7a\x18\x74\x51\xcb\x45\x34\xb3\x3e\xad\xea\x6a\x97\xea\x04\xeb\xb5\x56\xbd\xc5\x74\xe0\xd4\x06\xb7\xba\x6b\xac\xb6\x2c\x73\x33\xd9\xec\x92\xde\xbf\x70\xa7\x3d\x50\xf9\xba\xfb\xb5\x90\x05\xab\xac\xf7\xa5\x0c\x33\x80\x8e\xb0\xd6\xb5\xc2\xcf\xa2\x6b\xdb\x11\x57\x5d\xb1\xfe\xbc\xa9\xae\x51\x00\xe5\xce\xea\x6c\x70\x55\xda\x34\x69\xc7\x4d\xcd\x68\x23\xce\x09\x90\x82\xa0\xb6\xed\x86\x2b\x05\xfe\xed\x42\x92\x9c\x67\x6d\x8b\x34\xdc\xf7\x80\x41\x7a\x98\x3d\x74\xab\x6c\xef\xcf\x9b\xe4\xab\xed\xed\x66\x85\xa7\x10\x89\x5b\xef\x91\x33\x04\xdc\xa0\xf5\xb4\xda\xbd\x55\xae\xb9\x62\xcd\x10\x32\x7e\x33\xf9\xc2\x10\xe5\xc0\x70\x80\xc4\xfe\x90\x5e\x19\xfb\xf3\xc7\xb0\x00\xd1\x95\x20\x23\x3c\xdc\x01\x37\x8c\x86\x17\x45\xcb\x83\x02\x7d\xf9\xa9\xc4\x08\x50\x03\x83\x50\x58\xa5\x05\x35\xb9\x2f\xc1\x0c\x3e\x07\x42\xa6\x4c\x06\xfe\x04\x87\xf3\x0f\xeb\x3b\xda\x7d\xb1\x26\x76\x8e\x1d\x1f\x7a\xaf\x0c\xe7\x1c\x67\x78\x9e\x64\x65\xca\xba\x29\x8c\x85\xfa\x86\x63\x87\x53\xcd\xd6\x90\x40\xe8\x2e\xd8\x7c\xbe\x95\x47\x0d\x3e\x00\x8f\x54\x1c\xa2\x68\x76\x30\x12\xc4\x86\x6b\x23\x13\x7a\xf9\x00\xb7\x19\xb8\x47\x38\x30\x68\xb8\xfc\x38\x66\xa9\xcb\xbb\x25\xee\xf0\x63\x01\xcc\x82\x51\x0c\x82\xa6\x71\xe8\xb3\xae\xa0\x6c\x1b\xe2\x01\x47\xbd\x17\x6c\x69\x38\x9a\x46\x97\x36\xde\x73\x3e\x30\x1e\xbf\x1a\x90\x96\xec\xc4\x3d\x14\xf4\xbf\x31\x12\xad\x32\x74\x17\xd7\x37\x8c\x08\x17\x51\xb1\xee\x3b\x2f\xd6\x35\x2f\xb2\xf1\x4c\x03\x1e\xe4\x06\x7a\xdd\x4c\x5a\x37\x55\xf7\x8c\x01\x47\x6c\x49\x37\xec\x5e\xc8\x5b\x8c\xd3\x0e\x6a\x36\xd9\x6a\x4d\xaa\xa2\xef\x3c\xb7\x5b\x09\x7c\xd4\xb1\xcc\x92\xae\x57\x57\x0a\xfa\x50\x45\x94\x10\xb9\xf9\xaf\xc1\xa5\x2e\x8b\x89\x2a\xa1\x8c\xfe\x3e\x7c\x85\xae\x30\x26\x07\x0d\x0b\xed\xf3\xb3\x99\x68\x76\x39\x41\x60\xec\x71\x3c\x20\x04\xa5\x0e\x23\x07\x12\x14\x68\x65\x89\xc0\x37\xc7\x88\xd9\x3d\xed\xa2\x60\x72\xc3\x23\xec\xf9\x1c\x7e\xef\xd9\x05\x48\xc7\x22\x83\x9c\x28\x36\xb9\x0e\x85\xb5\x59\xb4\xec\x1a\x1b\xfe\xab\x90\xec\xce\x56\x7e\x4e\x59\x46\xb7\xed\x4e\x7b\xdc\x90\x50\xfa\xbb\x28\x60\xcf\xed\x97\xdd\x80\x1b\x1e\x35\xf5\xce\x56\x08\x46\x4b\xc8\x6e\xb6\x10\x65\xbe\xef\xa5\xbf\xec\x80\xaa\xb9\xff\xd6\xb3\x7c\x2a\x9b\x0b\xaf\x80\x0a\x72\xd6\x4c\x6b\xa1\x19\x98\x99\xaa\x6a\x02\x9b\x63\xa9\xb2\x79\xd9\xf7\xb9\x33\xc9\x3a\xee\x04\x3f\xec\x74\x25\x16\x6b\xfa\x3b\xd9\xfb\x35\x48\xd6\x79\x0b\xee\xd3\xee\x08\xd2\x77\xdd\x11\x4b\xee\x75\x5f\x5d\x81\x4d\xf6\xcb\x48\xd0\xb2\x17\x60\x33\x01\xec\x71\x85\xff\x76\xde\xa0\xed\x25\x56\x8e\xa2\x3b\x23\x56\x25\x64\x95\x9d\xc0\x31\x82\xd5\x51\xc3\xa4\x7b\xdc\x84\x64\x10\x8b\x16\x55\xef\x41\x90\x5a\x74\x03\xb5\x15\xe3\x10\x3c\x5f\x3d\x2d\x73\xff\xef\xc0\xd4\xed\x90\x12\x26\x21\x52\xb5\x0c\x91\x8e\x4c\x14\x7b\xc5\xaa\xbd\x09\x2a\x77\xbe\x11\x49\xf3\x5b\x97\x44\x29\x74\x2d\x72\x52\xbe\xcf\x2f\xe7\x11\xd7\xde\xb6\xf2\x81\x7c\xb6\x19\x63\x3c\xab\x2d\xd2\x6b\x51\x88\x4c\xac\xb6\x57\x50\x51\x61\xc8\x78\x12\xed\x30\xd2\xeb\xa8\xd5\xf7\x68\x2e\xf9\x54\xe6\x12\xcb\xbe\x9f\x8b\x5c\x69\x49\x79\xb4\xc2\xc8\xf3\x56\x9b\xea\x80\xed\x35\xba\x32\x1c\x49\xd0\x06\xe5\x07\xab\x9a\x07\x8d\x5c\x23\x90\x0a\x07\x81\x38\x02\x9e\x93\x7f\x19\x2c\x00\x6e\xe4\xba\x06\x1b\xc1\xb4\xff\x9a\x91\x7f\x75\x7d\x9c\x81\xaf\xdf\x15\x04\x0d\x0b\xa9\xfe\xe5\x05\x11\xab\xb0\xa1\x0a\x45\x1b\x0a\x42\x4c\x5a\x26\xcc\xe7\xde\x54\x8f\x5c\xa1\x9b\x35\x07\x45\xa2\xcd\x5f\xac\xa6\xe4\x92\x81\x06\x1b\x00\xe4\x1c\xb9\xc8\x0c\x82\xfb\xed\x07\x72\xc5\x34\xf0\x20\x57\x9a\x6a\xb6\x2c\x33\xf8\x61\x46\x5e\x40\xde\xae\xc5\xd6\x89\x47\x0f\x95\xd9\x69\xc1\x67\x60\x94\xb8\x7b\x36\xbb\xee\xd8\xf9\xd1\xf1\xe7\x93\x3b\xfe\x84\x9a\xce\xa7\xe6\xbe\x9e\xf6\xdd\xd7\x68\xa4\xdc\x93\xae\xfe\xa1\x35\x1b\xc6\xa0\xe8\xee\xa2\x0d\x9d\x58\x7a\x44\xa5\x86\x23\xea\x3e\x5a\xba\x3f\xd3\x07\xfd\x10\x4b\xf7\xe7\x61\x25\xee\xac\x4a\x32\x17\x15\x9d\xee\xa9\x46\x72\x90\x5d\x74\x54\x24\xf9\x68\x46\xef\x91\xd8\xf5\xc1\xd5\x4b\x22\x53\x1e\x4b\x98\xfc\x91\x4b\x98\xe0\x85\x36\x8a\x93\x0c\x11\xd9\x48\xf3\x91\xe2\x4f\xb3\x0a\xca\x68\xe1\xc7\x76\xe8\x0c\xf2\xab\x7d\x07\x4e\x77\x2d\x36\x62\xc5\x72\x26\x4a\x55\x95\xc4\xf3\x4a\x92\x2a\x1c\x13\xec\xfb\x90\x12\x9c\x3c\x86\xf4\xdb\x5c\x7b\x75\x34\xa4\x61\xbe\x78\xf9\xd2\x86\x6b\x8a\xaa\x08\x56\x9a\x06\x41\xa3\x98\xf9\xb4\x84\x3c\xab\x66\xfc\x2c\x23\x98\x95\xbc\xa6\xcb\x30\x00\xe5\x6a\xf0\x99\x25\xb8\x94\x32\x22\xf7\x49\x46\x7c\x1e\x2c\x9a\x68\xec\x60\x13\x67\x99\x0d\xe0\xde\x9e\xec\x3d\x86\x2f\x28\x55\x32\x1c\x66\x74\xd6\xd3\xba\xca\x0d\x66\x4b\xc2\x08\x1f\x31\x05\x1b\xf0\x9b\xcf\x35\xaf\x52\x4d\x06\xfa\xa9\x63\x68\xe2\x91\xe7\xfa\x0f\xe0\xb9\x3e\x0c\x57\x1f\x4b\xe8\x1c\x4b\xe8\xd4\x21\xe2\x67\x91\x95\x1b\x30\xd0\xf0\x7c\x35\x44\xbb\x5b\x8d\x47\x52\xee\x5a\xbf\xa3\xd2\xf2\x53\x61\xe1\x05\xcf\x53\x5b\x87\xa5\x33\xab\xd6\x77\xad\x36\x2e\x1c\xcf\xd7\x50\xc9\x89\x72\x5f\x72\x72\x07\x57\x5b\x59\x7b\x0b\xe6\x8a\x62\xff\x0c\xc8\xdc\xa9\x13\x73\x91\x9f\x34\xab\x7d\xa2\x7b\x00\x22\x7d\xa8\x14\x6a\x06\x81\x72\x13\x24\x17\xe4\x9e\x72\x43\x01\x62\x89\xb6\x78\x3c\xcf\xd6\x5f\x4f\x4f\x1f\x94\x67\xeb\x48\x9d\x3e\x26\x75\xca\x98\x8e\xa5\x73\xca\x98\x3e\xcb\x45\xbe\xdd\x88\x52\x9d\x95\x7a\x6d\xa6\x4c\x22\x39\xa7\xfb\x71\x46\xa7\x67\x9a\xf7\x61\xcc\x32\x71\xaf\x08\x75\x53\x85\x87\x4b\x5c\xc2\xe2\x8c\x69\xe2\x4a\x4a\x5d\xfa\xef\x8e\xfd\xc7\xf2\x38\x66\x7a\x9b\x51\x36\x47\x86\x9d\xd6\x56\xed\x8a\x5e\x01\x5f\x0b\x19\xe5\x52\x42\x63\x13\xcf\xc8\x59\x7b\x31\xe8\xce\x0a\x05\x85\x9d\x47\xa9\xda\x2a\xcd\x36\xdf\xfa\x01\x10\xdf\xd0\x30\x98\xb7\x6a\x55\xe6\xc1\x6a\x6a\x0f\xc1\xe7\xec\xfd\xc0\xbb\x7a\xf0\x15\xf9\x0d\xb4\x2f\xa9\x3a\x1c\xeb\x33\xa9\xaa\xcc\xd0\x92\x65\x2e\xd9\x4e\xd5\xac\x7e\xe4\x23\x0c\x88\x19\xd3\xb1\x0c\x6f\x3d\xc0\x07\x22\xf7\x62\x2d\xc4\x6d\x7b\xbd\xf6\x43\xff\x6a\x5d\xa3\x05\xa3\x12\x12\x99\xde\xb2\x7c\x9f\x0b\xff\x05\xc7\x6f\x2f\xfb\xdd\xd7\xa7\xdf\xb4\xd7\x6c\x7e\xed\x5f\x30\xb6\xb0\x39\xba\xcd\xbd\x2d\x31\xd5\xf2\x1e\xd7\xfc\x7f\xbe\x3e\xfd\xa6\xb9\xe0\x01\x25\xd6\xee\x68\x63\x24\x24\xc7\xcf\x6f\x64\xe7\xc8\x46\x7e\xdd\xe5\x09\x09\x19\x30\x93\x63\x5f\xd0\x46\xa4\x11\x36\x78\x63\x3d\x05\xc0\xab\x3e\x1c\x9a\x6c\x6c\x16\x12\x5a\x14\x19\x94\x67\x18\xc2\x79\x2d\x8e\xf5\x0c\xb2\xc6\x9e\x19\xdc\x09\x58\xc7\x9e\xd9\xcc\xfd\x03\xa7\x28\x95\x65\xc3\xae\x4a\x58\xf8\x19\x38\x52\x5d\xb2\x3b\xce\xee\xc9\xd9\xfc\x02\x3d\x7c\x35\x93\x1b\xb0\x5f\x86\x6b\xec\x50\x75\x7d\xc8\xbb\x73\x4b\x6b\xcd\xb3\x97\xa7\x56\x5d\xdc\xc3\x01\x37\x3a\xdc\x68\xf0\xd9\xa9\x2e\x43\xb3\x7d\x75\x74\xed\x54\xd2\xcb\xa0\x70\x7d\xc6\xf4\x30\x9f\xde\x95\xf8\x99\x76\x66\x7b\x6e\x4c\x11\x66\x77\x26\x8f\x6d\xa8\x9a\x4d\xeb\xec\x73\xc1\xf9\xb4\xf4\x46\xa6\x7a\xbe\xcd\xe9\x86\x27\x7e\x00\x1b\x99\xf3\xd8\x9c\xd0\x93\x6f\x0d\xcb\x98\x62\x0b\x0a\x02\x96\xe1\x94\x90\x5f\x33\x3c\x17\x67\x59\x3a\xad\xd4\x4b\x18\x70\xa3\x81\x35\x4b\xb9\x92\x65\xa1\x89\x4f\x98\xe9\x8a\x13\x9b\xc9\x69\xa2\x2b\x3d\xdb\x8f\x8d\x37\x63\xad\xfd\xdf\x92\x9b\x89\x5d\x79\xac\xf8\xed\x74\x02\x0c\x08\x4b\xdf\xe6\x8a\x2e\xd9\xd5\x56\x25\x3a\xaa\x93\x84\x24\xf7\x94\x28\x56\x50\x09\x10\x7d\x6f\xb8\x32\xe7\x81\x53\x42\x6f\x43\xec\x4d\x77\x22\xa4\xfd\x27\x29\xc0\xf1\x2f\x57\xe4\x31\x43\x86\x9c\xe7\xe4\x8b\x27\x33\xf2\x36\xec\xe0\x52\x9b\x98\x97\x7d\xcb\x64\xce\xb2\x99\x5a\x6f\xbe\x98\xba\x3f\x36\x6a\x55\xfd\xa1\xd8\x66\x4a\x96\x6a\xb6\x41\x27\xaa\x2f\x90\xed\xc8\x99\x9e\x7d\xe1\xfc\x40\xdd\x32\x80\x39\xa2\x1b\xa6\x0a\x9a\x18\xd6\x08\x7c\x5c\x35\xb1\x3b\x0e\xcd\xfa\x84\xbc\x84\xa2\x32\x36\x33\xf4\xcd\x24\x9c\xd9\x8c\xcd\x8b\xbb\xbf\xcc\xa4\x28\x35\x9b\x6d\x78\xfe\xcf\x62\xa3\xcb\x9b\x49\x75\xc6\xff\xf8\x75\x87\xf2\xcd\x47\x7d\xde\xde\x25\x49\xda\xe2\xfe\x1a\x2f\xbf\xce\x0a\x57\xe1\x20\x6b\x71\xdf\xa2\x3e\xf6\x25\x3d\xf2\xb9\xde\x21\x4b\x66\xc8\xbe\x7e\xbe\xcf\x5d\x7d\x0b\xc5\x1b\x1d\x07\x02\x7f\x11\x17\xdb\xf0\x2d\x59\xd2\x4c\x31\x28\xb6\x88\xa8\xbe\xf9\x5d\xcb\x92\xe1\x4f\x50\xe8\xef\xfa\xfa\x95\x79\x0c\x5f\x6e\x00\x75\x7c\x00\x2f\xdb\xe2\x05\x69\x93\xd7\x68\xdf\x57\xc5\x2f\x3c\xf0\xba\xcc\x00\x9f\xff\x5d\x19\x4e\xe5\x5b\xc7\x1c\xb4\xaf\x06\xee\xe1\xcc\xef\xc6\xde\xc8\xd7\x9b\x9b\x49\xf0\xfd\x6d\x4e\x9b\x2d\xbe\x3a\x55\x7b\xb8\xb4\x80\xab\x98\x4e\x12\x40\xd3\xcf\x25\xbf\x8b\xf9\x29\xa7\xf0\x7b\x55\x2c\xcf\xf1\x70\xc8\x84\x09\xb2\xa1\x39\x2f\x4a\x83\x5f\x48\x62\xf1\xbd\xcd\x58\xbf\x16\x4a\x93\xc7\xf8\xe3\xd2\x11\x0f\xcd\x36\xe9\x93\xa1\xbb\xbb\xf6\x77\x14\x16\x97\xad\x54\x11\x70\x05\xa2\xd4\x84\x62\xc5\x4a\xd0\x67\x4a\xb6\x10\x42\xbb\x90\x53\x43\x86\x14\xd0\xf7\x5b\xc6\x8a\x50\xb1\xe3\xed\x5c\xd4\xa6\x7f\x12\x09\xcd\x2c\x6b\x52\x23\xaf\x6e\xe5\x71\xfa\x8a\x5f\x2f\x85\x88\xd8\x48\xab\x6f\x8e\x27\x91\xe6\xdf\xf8\xb3\x2b\x33\xe4\xec\x7d\xb6\xc2\x02\x37\xc2\x78\x9e\x66\x55\xc1\x6a\xcb\x3a\x31\x28\xec\x80\x81\xa9\x39\xa1\x64\x61\xf6\xc5\x96\x4b\x21\x35\x59\x50\xc5\xd5\x20\x97\xf2\x79\x1c\x67\xdf\x31\xaa\x39\x93\x7f\xff\xa9\xb3\x12\x36\xf9\xbb\xb8\xb2\xd5\x10\xce\xf1\x0c\xd7\x9c\x49\x43\x59\xb6\xdf\x12\x2d\x0a\x92\x19\x72\xe3\xe1\xcf\x9c\xac\xe9\x71\x9e\x51\x65\xa0\xf4\x2c\x07\x7d\x0c\xf9\xae\x94\x0a\xf3\x0a\x40\x85\x5e\xa6\xf4\x0b\x3c\x46\x30\x81\x1a\xf4\xb2\x90\xa2\x5c\xad\x35\x29\x0b\x9b\x9b\x5e\xaf\x19\xf7\xe1\x59\x49\x30\x97\x19\x1f\xe7\xfb\x43\x1c\xbf\x21\x00\xd1\x7a\x4a\xb6\x94\xc4\xf3\x37\x91\xc3\xaf\xbe\xd5\xfd\xb2\x2b\x06\x9b\x55\x2c\xb6\x2b\xb7\x61\x5a\x3b\x84\x78\xb1\x34\x12\xd3\xd4\xe3\x0c\xd0\x99\x56\x2a\x7b\x8a\x7f\x21\x90\x2b\xf7\x2e\x10\x41\x0b\x1c\xc9\x70\x07\x59\x09\xd4\x82\xe7\x4a\x33\x9a\x3a\xcf\x03\x83\x5d\x1e\xa9\x60\xba\xe1\x77\xb0\x3b\x49\x48\xd6\x34\x5f\xb9\xd2\x1a\x10\x53\xa8\xe9\x2d\x33\xaf\xcf\xb0\x4b\x22\xb7\x15\x0e\x9c\xda\x6d\x89\xe5\x1c\xdc\xcd\xce\xc8\x73\x69\x03\x72\x7d\x92\x4e\xe0\xec\x0c\xd3\x84\x25\x61\x6d\xfc\x03\xcc\x53\x5f\x4a\x70\x79\x39\xcf\x76\x62\x43\xdd\xbd\x89\x0d\xe5\x11\x22\x5c\xfb\xec\x10\x94\x39\xc7\x14\x7f\xc1\x1b\xe5\xaa\x2a\x01\xb3\xf3\x3d\xda\x12\x33\x30\x8a\x1d\x35\x92\xc7\xdc\x5e\xa1\x6d\x8c\xed\x86\x6f\xf1\x79\xff\x15\x56\x85\xc5\xfd\x29\x83\x77\x31\x0f\x43\x08\x6e\x59\x81\x06\x86\x6d\x9e\x54\xf4\x3c\x88\x02\xac\xf6\x3e\x8c\xc1\x60\x79\xaf\x69\x71\x96\xa7\x57\x2c\x91\x4c\x9f\x03\xd4\x3c\x67\x1a\xeb\x1c\x5c\x69\x23\x59\xad\xb6\xed\x9b\x38\x1f\xdb\x15\xdf\x1f\x6a\x5e\x72\x5b\x2e\xd7\xa6\xdb\xdf\xd0\x02\xd0\x99\x82\xfe\xd6\xef\xc7\x56\x23\xb3\xde\x1b\xb5\x4d\xfc\x42\x75\xb2\xee\xdc\x09\xde\xe1\x2b\xb1\x7a\x4d\xdf\xbd\x8c\xd7\x04\x79\x4d\xdf\xf1\x4d\xb9\x21\x79\xb9\x59\x30\x09\x65\x06\x3c\xa1\xca\x04\x96\xdf\xab\xc2\x0d\x9b\xd9\x6a\x69\xd5\xfa\x00\xef\xd5\x08\x80\x12\x6b\x86\x00\x2f\x97\x50\x83\x51\x82\x55\x61\xec\xbc\x99\x8c\x85\x2f\xec\xeb\x71\x46\xd9\xc6\x01\x5d\xf1\xdf\x63\xde\x27\xe4\xdf\x25\xcd\x35\xd7\xdb\x9a\xa0\xb7\xb1\xc7\x56\xab\xe3\xd3\x3a\x38\x87\x10\x30\x5e\x52\x0a\x8d\x96\x97\x86\x14\xfb\xf5\x6b\x7e\x33\x31\x0c\xd5\xcd\xe4\xcb\xaf\xff\xfa\x23\xbf\x99\x1c\x4e\x53\xa1\x25\x5f\xad\xec\x0a\x61\x3d\x60\x74\x0b\x00\xea\xd9\xa9\x59\x4d\x17\x3c\xb1\x5c\x5f\x6f\x63\x1e\x90\xc1\x47\xa8\x8b\x1e\xfc\x09\xb9\x38\xad\x30\xe0\xca\xd3\x57\x85\x17\x0f\xb6\x53\xbe\x29\x0c\x7b\x0f\x7a\xcd\x05\xcf\xc0\xb9\xa0\xad\x3f\x8a\x16\x05\x3c\x9b\x5f\x84\x44\x2f\xec\x92\x09\x43\x25\xe1\xa6\x43\xd9\xa1\xea\x41\xd2\x12\xb5\xa6\x96\xda\x78\x8f\x2d\xbb\x56\x00\x14\xfc\x92\x78\x9b\x9c\x64\x46\xe0\x37\x52\x3a\xa7\x6e\xbb\x7e\xca\x08\xf3\x65\x53\xfd\x98\xb3\x7f\x7a\x97\xa7\xb3\xca\x35\x69\x56\x48\xa1\xc5\xa2\x5c\x76\xdc\x61\x51\x9e\xbf\xbc\xfa\x7b\x29\x74\x44\xe3\x17\x7c\xf4\x75\x1e\xcf\xe7\x6f\xc9\xf9\xcb\x2b\xf2\x6f\xfb\xeb\x52\xc8\x84\x6d\xdc\xf3\x0f\xc9\x04\x44\x75\xd9\x82\x1a\xa6\x57\xc6\x37\x5c\x1f\x82\x8a\x63\xac\x7b\x80\x16\x24\x04\x98\x58\x97\x38\x6d\x2f\x7b\x14\xb7\x54\x6d\x78\xce\x24\x17\x11\x03\xe0\xf9\xfc\x6d\xbd\x89\xa3\xb0\xf5\x83\x29\xf0\x9b\xd5\xc3\x24\x45\x39\x4b\x96\xea\x9f\xf8\xeb\x3f\xcb\x43\x9c\x02\x1e\x2f\xe4\x30\x68\xdc\x04\x90\x73\xc9\x54\x99\x01\x51\x4c\xf9\x12\x9c\xe5\xb4\x5f\x16\x2e\xd9\x29\xbf\xad\xc0\x02\xbd\x1c\x76\x08\x64\x15\xa6\x34\x95\xda\x4b\x81\x70\xc8\x98\x9e\x46\xb2\x2a\x41\x4d\x03\x85\x9c\x6e\x86\xc5\xda\x56\x0a\x1d\x83\x13\x66\x1b\xa6\xe9\x2c\xac\x92\x8e\xd7\x84\x15\xd0\xe5\x5c\x64\x3c\x89\x51\xde\xf9\xdb\x5a\x8b\x58\x0d\x8e\x02\xbf\x20\x5b\x8a\x06\x5a\x2e\x99\xbf\x4c\xdb\x9f\x2c\x19\xd5\x86\x0b\x5a\x19\x8c\x80\x04\xc6\xe7\x9c\xf8\x03\x48\x06\x37\x93\x5c\xe4\xac\xf3\xf1\xdb\x5d\x5e\x9a\xab\x4b\x78\xc6\x7a\xc0\x9e\xb8\x13\x91\xb6\x31\x47\x35\x0f\x02\xf5\x41\x0e\x70\xf7\x57\xa0\xd6\x42\x6a\xe6\x79\x72\xfb\x0c\x91\x57\x90\x72\x4b\x68\x58\xd0\xd0\x92\x84\x06\xac\xee\x13\x52\x3f\x7a\x99\xdf\xe7\x6c\x51\xae\x8c\xa8\xf1\x03\x28\x1b\xa4\xf2\xe5\x7e\xf7\x7f\xd6\x30\x63\x8d\x1b\x1b\x71\xc2\xa0\xca\xec\x29\x3d\x5c\x85\xf9\x9d\x69\x4d\x93\xf5\x73\x66\xfe\xb7\xef\xb8\xda\xad\xfd\x89\x01\x25\x86\x0f\x4f\xed\x97\xc4\x77\xb0\xca\x2d\xba\x62\x84\x42\x13\x43\xc4\x9e\xa6\xcc\xfd\xd3\xa0\x09\xf4\x4a\x52\x75\x4f\x6d\xef\x6e\x3d\x0d\x33\x59\x29\x2f\x3d\x81\x2f\x0e\x7b\xc7\x92\x12\xce\x8f\xe6\x5b\x3b\x81\x1d\xbc\x72\x6e\x52\x07\x92\x68\xa1\xa4\xb5\x15\x22\xac\x92\x13\x05\x53\x55\x98\xc6\x2e\xf3\xa2\xf5\xb9\xc2\x43\xc0\x2d\xe7\xa0\x06\xb8\x63\xce\x85\x70\x1b\xd0\x0d\x77\x18\x92\x2d\x6d\x71\x30\x30\xc3\x9a\x1d\xf1\x65\x4d\x02\x36\x58\x2e\x35\xa2\x31\x4b\xd1\x91\xd3\x49\x84\x88\xf7\xf0\xdc\xf8\x12\xa5\xeb\x96\x27\x7c\x40\x55\x80\x57\x06\x33\x0a\xce\x1d\xf2\x35\x60\x9c\x70\x97\x79\x62\xe3\x21\x4e\xf0\xa4\x4f\xec\xba\x80\x9f\x42\x2c\x05\x69\xea\x10\xeb\x5a\xfd\x9b\x3d\x73\xf0\x7b\x5a\xb1\x9c\x49\x9a\x4d\x2d\x63\x5e\x61\xdd\x8c\xd1\x3b\x16\xa2\x5d\xb0\x2a\x06\xa8\x77\x57\x85\x4c\xc7\x33\xed\x02\xf0\xf6\x7b\x76\xb0\x6d\xb9\x4b\xe7\xf0\x85\x3a\x15\xc3\xc5\x53\x30\x97\xc3\x19\xe3\xe2\xbc\x93\xff\x32\xe4\x0a\xa0\x82\xba\xd8\x6c\x68\x9e\xaa\xa9\x4d\xe0\xe4\xd0\xa6\x81\xde\xa9\x85\xda\xa9\x19\xd4\x7a\x09\x15\x42\xea\xa5\x90\xf7\x54\xa6\x0e\xad\x7f\x14\x86\x6e\x0f\xe6\xd4\x81\x0b\x41\x8b\x5b\xd7\x2d\x5c\xb9\xb3\xc6\xa3\x0f\x4d\x17\x89\xe1\x76\xfc\x74\x6f\x84\x66\xdf\x06\xdf\x79\x8e\x2d\xb0\x26\xb1\x95\x83\x00\x64\x3d\x18\x4a\x46\xd3\x9f\xf2\x6c\x3b\x37\x2d\xb0\xc2\xdf\x67\x6d\x97\x1e\x3a\x48\xb0\x01\xbc\x12\x0e\x60\x3b\x8f\xb4\xd1\xae\x82\x6b\xf8\x00\x40\xd7\x5b\x4a\xde\x34\x78\x3a\x6a\x59\x20\xa2\xbc\x11\x29\xb3\xf9\xa1\xcd\x3c\xed\x65\x5d\xfb\x22\xc1\x95\xdd\x0a\x50\x0f\x95\x5c\x94\x0a\xb2\x4d\x93\x60\x84\x50\xf6\xb1\xa7\xe8\xce\x2c\x87\xd4\x38\x5a\x38\x4a\x68\x39\x6a\x18\xdc\xbc\xce\x42\x87\xea\x56\xbc\x73\x35\x23\x67\xf0\x09\xc6\xb6\xbf\x01\x72\xfc\x97\x61\xe0\xfe\x35\x85\x08\x7d\x65\xfe\x8b\x27\x74\x62\xb3\x87\xa4\xff\x22\x37\xe5\xe9\xe9\x97\x7f\x25\xff\x02\x17\x6d\xff\x33\x88\xaa\xd8\xb9\x51\x53\x2f\x17\x36\x36\xc8\x4d\x63\x40\x23\x2c\x9c\x67\x98\xb9\x25\x92\xc8\x7f\x34\xf7\xfd\xeb\xe3\x5d\xcc\xc4\x8a\xaf\xf2\x93\x42\x8a\x42\x28\x9a\xa9\xa7\x06\xaf\xc3\xff\x9c\xd0\x6a\xc4\xd9\x26\x7d\x42\x52\x91\x54\x25\xab\x79\x8e\xca\x99\xc3\xbc\x05\xc9\x36\xe2\x0e\x19\xab\xe0\x06\x03\xc1\x11\xf0\xbb\x93\x1b\xc3\x22\xcc\x33\x72\x96\x81\x85\x5d\xf3\x3b\x96\x6d\xa7\xa0\xf2\xdc\x65\xa0\xe0\xdd\x21\x81\xbe\x67\x92\xd9\x5a\x9b\x1b\x24\x76\x34\x77\xca\x4a\xb8\x46\x42\x37\xa2\xcc\xeb\x05\x4c\xfe\x17\x56\xf8\x44\x85\xd1\xd4\xce\x6e\x86\xa8\x01\x40\xa0\x21\xb3\x47\x07\x30\xf9\xd3\x4f\xaf\x0d\xed\xe5\xd6\xc4\xd7\x31\xab\x9f\x0b\x11\x7f\x35\x45\x03\xf8\x82\x49\xec\xc3\x4d\x29\xdb\x18\x98\xaa\xa6\x82\xc4\x0f\xa6\xc5\xd0\x5c\x01\x96\xf9\xc7\xcd\xc4\x80\xfb\xcd\x64\x37\x0f\x0d\x48\x1e\x06\x76\xa0\x08\xde\xf1\xdf\x82\xf2\xce\x35\x9d\x1d\x25\x0b\xf8\x2c\x96\x04\xb3\x90\x81\xe6\xdf\xbc\x90\x29\xd1\x6c\x53\x08\x49\x25\xcf\xb6\xce\xf9\xb7\xd1\x06\x64\x1b\xe8\xef\x99\x44\x50\xa1\x4e\xcd\x55\x67\x06\x10\x5c\x0a\x6c\xf6\x2e\x61\x0c\x01\xc7\x0c\x61\x84\x2f\x99\xfe\x7d\x7e\x35\x23\x3f\xf9\x2c\xc6\x7c\xd9\xf8\x08\xaf\xfc\x2b\x46\x4e\x0f\xae\x21\x53\x09\xcd\x1c\xcc\x2e\xb6\xa1\xf1\x82\x05\xd0\xa8\x25\x5d\x2e\x79\x62\xa4\x10\x4c\xe7\xb1\xd8\x36\x4f\x24\xb8\xcf\x67\xa7\xe3\x54\xb0\xf5\x3d\x77\x5c\x62\x75\x26\x8d\x8b\x6c\xde\x48\xc1\xa4\x0d\x32\x00\x64\x88\x95\xdf\xa5\xe5\x51\x51\x63\xe2\xde\xee\x21\x84\xd1\xc3\x1f\xeb\x48\xc5\x36\xbb\xe3\x60\x6f\xf8\x81\xca\x88\x6c\xff\x9a\x16\xe0\xf2\xcd\x57\x39\xcd\x5c\xed\x28\xe1\xd4\xdc\xdc\x57\x7b\xb4\xda\xee\xb5\xe1\xfe\xdc\x88\x44\xaf\x25\x53\x10\xbe\xd3\x50\x63\xff\x3f\x97\x35\x7e\x46\xef\x28\x87\x8a\xe9\x37\x13\x74\x71\x00\x8d\xf2\xfb\x19\xb9\x16\x84\xbd\x2b\x32\x9e\x70\x9d\x6d\x9d\x20\x35\x85\xdc\x4e\x84\x92\xd3\xff\x22\x42\x92\x67\xa7\xa7\xff\x55\x4d\x02\x12\x4a\x1e\x24\x68\xf6\x01\xca\x07\x57\x90\xfb\x8c\x84\x73\x51\x6d\x3f\xb8\x0b\x70\x0a\x69\x6c\xf8\x5b\x82\xda\x2f\xb3\x5f\xf3\xdd\xd0\x90\xa5\x6a\x7d\xff\xaf\xda\x57\x0e\x91\xb8\x2f\x25\x43\x5b\x80\xfd\xc8\x37\x74\xd5\xe8\x7b\x33\x79\x66\xbe\x46\x1c\x2b\x9d\x25\x8e\x66\xf3\x9a\x8b\x65\x0c\x61\xe2\x46\x5e\xd3\x77\x73\x91\x7e\x2f\x69\xd2\xa9\x02\x72\x86\x21\xe7\x87\xb7\x32\x8d\x9d\x86\xe5\x71\x15\xce\xf3\xc4\x59\x7a\x21\x81\x17\xba\xe9\xd2\x5a\x5a\x35\x2b\x88\x5a\xb5\xb8\x12\x4b\x1d\x81\x27\xab\x54\xdc\x18\x09\xed\xba\x92\xbf\xd0\x36\x0b\xe4\x97\x24\xd4\xe6\xf7\x9c\x43\x19\xdc\x6b\x37\x95\xc8\x83\x8d\xb8\xf0\x23\xec\x9e\x96\x98\xbf\x30\x9c\x53\x39\xbe\xfd\x39\x6a\xea\xb9\x52\x25\x23\xff\xe3\xaf\x7f\xf9\xfa\x2b\xc4\x18\x64\xc1\xd6\xf4\xce\xc8\xb1\x6b\xaa\x80\x4a\x18\xf9\x9a\xc9\x9a\x60\x98\x94\x52\xb2\xdc\x00\xf2\x6f\xa5\xa1\x21\x77\x4c\x4a\x9e\x5a\x26\xb2\x76\x56\xb1\x35\x4c\x9d\xc0\x4e\x73\x23\x8b\x49\x46\x15\x6b\xf7\x04\xd5\xc2\xbd\x4d\xec\x0e\xd9\x6a\xab\x44\x9f\x78\x48\xb0\x34\x1b\xba\xb4\xe4\xef\x6c\x6a\x64\xb2\x2c\x41\x05\x27\x59\xc6\x20\xb8\xe7\xa0\x96\xb9\x94\xe1\xfa\x55\x13\xb5\xf1\x0d\x43\x99\x1f\x56\x08\xb1\x29\x5a\xe0\x0e\x31\x4d\x66\x62\x98\x76\x52\x16\x4e\xf4\x47\x10\xb8\xe5\x20\x2f\xd9\x63\x6b\x00\x4c\x80\x0c\x47\x93\x18\x0b\xf2\x3c\x37\xf0\x7c\xc9\x92\x8c\xf2\xcd\x07\xa3\xc5\x0d\x0e\x47\x24\x8e\xa7\xdc\x8d\xe2\xa0\x0b\xbc\x4d\xd7\xa8\x3a\x14\x6a\xa3\x4c\x83\xc8\x2f\x56\x37\xc4\xdb\x01\xf1\x39\x59\x89\x02\x0f\xa2\x08\x30\x91\x65\x32\x2c\x83\x5b\x95\xff\x40\x3f\x97\x42\x32\xa5\x20\x63\x7f\x13\x47\xb7\xf0\x0a\x22\xe9\x2f\xbf\x37\x28\xfa\x60\x48\xd5\x1a\xbc\xd6\xe2\x9e\xdc\xb3\x2c\xab\x76\x61\xe0\xdf\x6a\xe5\xfc\x2e\xaa\xc5\xc7\x5d\x26\x3e\x00\xed\xcd\xed\xd0\xd7\x92\xe6\x0a\xfa\x76\x61\xbf\xe7\xa1\x5b\x3b\xde\x6c\x78\x53\x6b\xf4\xc5\xbd\xa7\x5c\x7b\xbd\x95\x1f\xd3\x65\xea\x45\x27\x5f\xbf\x57\xb7\x2f\x73\x44\xb8\xf0\x8f\x60\x32\x77\x8f\xb3\x5b\xc8\xb1\x78\x3b\xd0\xe7\x19\x5c\x66\x24\x3c\xc8\xa3\x5d\xd3\x96\x7f\x3d\xec\x62\xba\x83\xb2\xdc\x1e\xcc\x95\x58\x46\xd8\xf7\x1d\x9f\x63\x07\x55\x79\x00\x97\xf2\x69\x18\x8b\xca\x79\xdb\x99\x8d\xd7\xe0\x89\xe3\xd5\x0f\x92\x15\x42\x06\xea\x4c\x94\x4f\xf7\xfe\x42\xcc\x65\x0c\xb0\x05\x3b\xdd\x4b\x48\xcf\x50\x67\xc9\x68\xb2\x6e\x5c\x17\x0e\x36\xfe\xaa\xd4\x27\xbc\xa8\x3d\x9e\xf9\x92\xf2\xec\xea\x9e\x16\x3f\x45\xbc\xba\xaa\x6f\x44\xb3\x2c\x53\x4d\xbf\x05\xf3\x1d\x5c\xb3\x34\x95\xda\x48\x8f\xea\x9e\x42\xe9\x58\x17\xb1\x1a\xd8\x6b\x0f\x61\x77\x43\xe3\xb1\x39\x32\x23\xfd\xca\x92\x59\x2f\x32\x5a\x5a\x5c\x13\xfa\x58\x48\xaa\xd6\x27\x99\x10\x45\x64\xa1\x63\x54\x8d\x56\xf7\xfc\x3d\xd5\x31\x0f\xa6\xf0\xab\xf5\xac\x42\x18\x75\x96\x48\x0f\xa4\x66\x48\x15\x18\xb3\x18\xdc\x31\xca\x21\x84\x66\xc5\x9a\x3e\x65\xef\x0c\xac\x6e\x58\xae\x69\x16\xe8\xbc\x03\xd3\xee\x46\xa4\xb6\x46\x05\x67\x09\xdb\x30\x9a\x21\xcf\x58\xf2\x4c\x9f\x40\xaa\xfd\x20\xba\xdc\x86\x6a\xdf\x84\xb1\x59\x68\xd0\x80\xca\x2c\x6e\x02\xf8\xfd\x9f\x7e\xba\x95\xd8\xbf\x0b\x10\x23\xa9\x48\x20\xdd\x42\x3d\x5c\xcb\x4d\x4a\xb6\xa2\x04\xfd\xa3\x37\xf3\xf9\xb3\x01\x9f\xb3\x5f\x80\xdf\xb8\x37\xdf\x13\x51\x4a\x43\xb1\xdd\xf9\x42\x74\x88\x01\x75\xeb\x41\x7e\x0b\x0e\x4f\x85\x50\x68\x7b\xd2\xa2\xb6\x50\x7b\xf2\x81\x2d\xcd\xaf\x61\x4a\x94\xd8\x30\xef\xa6\x89\x9a\x35\xb0\x32\x87\xb6\x72\x8b\x2b\xa1\xa9\x5f\x7d\xd8\x36\xa1\x12\x92\x83\x26\x42\xc8\xd4\x4a\x08\x18\xbf\xa8\xa5\xa0\x4e\x9a\xb0\x93\x7f\xe8\x7b\xae\x02\xa3\x21\xf1\x3f\x3b\x5f\xb3\xe4\xf6\x25\x38\x3c\xe5\x31\x57\x85\x76\x1b\xa7\xd5\x48\x1d\xcb\xb1\x60\xfa\x9e\xb1\x9c\x24\xa6\x59\x55\x08\xc8\x3a\xbd\x99\x8b\xcb\xd9\x3d\x49\xa9\xa6\x07\x37\xa8\xfb\x35\x75\xbf\x6e\xc9\x32\x41\x9d\xed\xe9\xca\x40\x57\x02\x18\xb3\x16\x1d\x68\x15\x8f\x4b\xdc\xb3\xce\xb6\x8e\x5d\x36\xf7\x66\xa3\xd6\x7d\x9e\x87\x01\x93\xfd\x97\x7b\x35\xd9\xaf\x29\x97\x05\xcf\x5f\x47\x83\x63\x83\x8f\x8d\xf0\x96\x9a\xcd\xc4\x87\x6d\x05\xc9\x4b\x2a\x17\x9a\x85\xe4\xe9\x0a\x4d\xb0\x76\x3c\x48\x35\xc7\x30\xbf\x83\x0e\x2e\x04\x0c\x06\x56\xd9\xe8\xed\x7c\x20\xd0\xd9\x24\x66\x60\xa2\x14\x34\x5d\xd0\x0c\x4e\x67\x41\x93\x5b\x6b\x43\xdd\x28\x96\xdd\x19\x04\x68\x15\xb0\x76\x51\x5a\x82\xcb\x8b\x35\x12\xa2\xff\xbb\xb8\xcf\xdd\x80\x36\xdf\x06\xc6\xb8\xdc\x4c\x0a\x29\x36\x5c\x25\xa5\x28\xd5\x09\x2e\xdb\x90\x5c\x78\xd1\xd1\x3d\x05\xed\x67\x38\x82\xdd\xe1\xc9\x1d\xd3\x6b\xd3\x17\xff\xcf\x59\x51\xdd\xfe\x61\xa7\x55\x38\x29\x93\xc4\xb4\x0f\x62\x35\xed\x68\xe8\xcb\xe2\x46\x71\xff\x97\x0a\x92\x0b\xbd\x36\x68\xe9\x26\xff\x1e\x4d\xb9\x06\xa2\x44\x6e\x13\x87\x98\xe9\x4e\x4e\xdc\x52\x36\x22\x65\x7f\x0b\xd7\x85\x07\xb2\xe6\xec\xae\x5a\xd1\x9b\xb3\xeb\x29\x59\x30\x84\xf0\xf6\x31\x10\xaa\x54\xb9\xb1\x22\x2e\x7b\xc7\x95\x86\xec\x63\x20\xd0\xb5\x4e\xc5\xd0\x9b\x94\x24\x0b\x79\x40\xdd\xad\xc3\x75\x34\xc4\x8c\x53\x92\x42\x40\xb1\x4d\xf1\x06\xf4\x9f\xe9\x7b\x21\x6f\x5d\xf6\x9c\xf0\x1d\xc5\x2e\x3b\xe6\x36\xb4\x66\x34\xd3\xeb\xdf\xbf\xe3\x79\x7a\xd6\x15\xb3\xdb\x6e\xd3\x13\xbe\x6b\x1b\x3b\x93\x76\x18\xc5\xfb\xb1\x0d\xa1\x1b\x91\x73\x2d\xa4\x9f\x0f\x97\x56\xf7\x10\xfa\xf2\x7f\x42\x60\xee\xb3\xde\xd3\x99\x47\x6b\x13\x04\x1f\xdd\x79\x80\x65\xd8\x8a\x5f\x80\x33\x21\xae\xca\x1d\x89\xcf\xe7\xe2\xc3\x99\x81\x7c\x22\xa9\x1a\x0c\xb4\xfa\xf8\xc7\xf3\xec\xf4\xcb\xbf\xfc\xf7\x38\x3d\xcc\x5a\xeb\x62\x88\x38\xb6\xdb\x0c\x13\x47\xd3\xe7\xb3\x23\x8a\x85\xc8\x32\xc3\x9b\x6b\x9e\xcc\x45\xfa\xf6\xf2\xd5\x67\x4b\xff\x40\x21\xf4\xfd\xf9\x0f\x7c\xb5\xbe\x76\x52\xf3\x9c\xc9\x84\xe5\x11\x78\xee\x69\xec\xe1\xdb\xfe\x29\x96\x06\xaa\x6e\x49\xa9\xc0\xe5\x6a\x89\x85\x65\xcc\x96\x61\x10\xb2\xa2\x72\x61\xfe\x9b\x88\x2c\xc3\xe8\x08\xe0\xdd\x21\x63\x04\x91\x65\x8e\x59\x9e\x8a\x6a\xf0\x84\x66\x49\x99\xb9\x84\x38\x41\x84\x08\xea\x63\xad\xc2\x05\xf2\xa3\x7d\x34\xc9\xb0\xbd\x89\xa8\x1c\x8f\x3b\x16\x77\x4c\xae\x21\xe4\x29\x8f\x49\xf0\xff\x3d\xd2\xb8\x63\xef\xe0\x95\xb8\x1f\x7d\x5f\x91\xb6\xfd\xd7\x65\x55\x5a\xc3\xf7\x95\xb3\x3b\x0c\x68\x9c\x91\x57\xe2\x9e\x29\x1d\x8e\xa2\x45\xb3\x17\xa4\xa2\xfa\x4f\xbb\xd7\x91\x7a\x6a\x18\xcc\x2a\xa9\xbf\x3f\x3f\x5b\x45\xd8\xd1\x56\x13\x6f\x10\x75\x7a\x66\xcb\x67\xd2\x9c\x94\x39\xda\x95\x37\xc1\x7d\xa2\xb7\x5b\x63\x73\x87\x34\x85\x1e\xf4\x60\x47\x45\xbc\xef\x80\x08\xd1\x17\x47\x3d\x97\xa2\xf8\x2e\x56\xf8\xac\xd1\xc0\x9d\xfd\x82\x7b\x7a\xee\x5a\x90\xe5\xfd\x86\xca\x5b\x02\x19\x2d\x50\x26\x96\xb7\x70\x31\xa9\x14\x45\x01\xb6\x31\x27\x01\x20\xff\xed\x13\xde\xdd\x73\xc3\xd8\xa2\xc3\x04\x1c\xc7\x3f\x4e\xa7\xe4\xab\x67\xbf\xce\xc8\x6b\x5f\xea\xcf\xf9\xf3\x83\x6a\x01\x3d\x7b\x60\x82\xc5\x61\xe2\x2d\x78\xe0\xe1\xb4\x60\x95\x54\x6d\x1d\xda\xed\x0a\x2a\xd6\x61\x4a\x32\x7e\x8b\xaa\xf2\x93\x42\x8a\x77\x5b\xbc\xe2\xca\x21\x34\x88\xbf\x5c\x04\x16\x3e\x23\xba\xbc\xa6\xb7\xec\x62\x7e\x0d\xa7\xf8\x56\xf3\xec\x7c\x4d\x6d\x69\xc6\xb6\xba\xe8\xd9\x58\x84\x69\x6f\xe5\x35\x55\xff\x2e\x99\xa4\x29\xeb\xbd\xde\x5a\xb3\x07\x5d\xf2\xd5\x9b\xb3\xeb\xfd\xdf\xeb\x2f\x54\x1a\x0e\xe4\x5b\x32\x07\xa3\x1e\xd9\x50\x6d\x8d\x12\x16\x51\xba\x20\x34\x89\xf6\x56\x4c\x9a\x49\x25\xdd\x30\x28\x4b\x96\x07\x37\xf2\x9f\x04\x25\x7f\x19\x07\x25\x98\x4a\xe6\x35\xdb\x24\xab\x37\xc2\x26\x2f\x8b\x26\xbd\xe8\x68\x08\x4e\xf9\x10\x56\xdb\xb2\xe8\xc1\xb4\xb2\x16\x61\x86\x83\x90\x8d\x19\xc5\x08\xb3\x7e\x98\x7a\xb2\x2b\xbe\xb4\x3e\x06\x31\xd3\x06\x96\x1f\x95\x02\x2a\x63\x49\x0a\xe7\x0b\xde\x56\x86\xf9\xc4\x38\xd1\xc3\x87\xd6\xdd\xd3\xad\x1f\xde\x79\x95\xaa\xe6\x3e\x47\xc5\x03\x1c\xd3\x69\xee\xaf\xc0\x86\x01\xbf\xb3\xf9\x45\x87\x67\x5c\xf8\xd5\x23\x38\xe7\xc9\x06\xfa\x27\x67\x5d\xa6\x19\x88\x58\x70\x9d\x95\xea\xba\x8a\xde\xfc\xbc\x7c\xa8\xea\x7e\xcc\x79\xea\x73\xcf\x84\xf1\x9c\x3b\xbb\xa8\xd9\xd3\x8a\xba\xa7\x55\xdf\xdc\x39\x9a\x7f\x7a\x7f\x98\x3f\xfd\x19\x8e\xa4\xc0\x66\xdb\xb6\xc6\x61\xe4\x89\x9f\xb9\x42\xcc\xae\x76\xc7\x1b\xba\x61\x7f\x73\x7f\xfc\xdd\x45\x5f\x3f\x66\xb3\xd5\x8c\x24\x45\xf9\xb7\x2f\x4f\x4f\x37\x53\xc4\x8b\x7f\x7b\xf6\xf5\xe9\xf7\x4f\x48\x41\xb9\xf4\x86\x47\xeb\x7f\x51\x15\x45\xf4\x9e\xa7\x86\x38\x07\x57\x60\x3d\x58\x2b\x9a\x34\x23\xe7\xde\xab\x27\x29\xca\xa9\x43\xbe\x55\x6c\x85\xd2\x42\x3a\x26\x1b\x92\xc0\x40\x94\xb7\x1d\x08\x42\x5b\xca\x02\xed\xb4\x06\xd9\x30\x78\xfb\xdf\x3e\x7d\x5a\x8f\x63\x49\x45\xa2\x9e\x96\x8a\xc9\x93\x55\xc9\x53\x66\xb0\x41\x51\x6a\xf0\xe4\xb5\x2b\xf6\x9e\xd1\x29\xd3\x94\x67\x87\xc3\xe4\x16\x89\x85\xb6\x9a\x9a\x3b\x52\xcc\x41\xd8\x69\x49\x6d\x5e\x33\x1b\x05\x28\x99\xe2\xbf\x83\xb1\x02\xd3\xb6\xcc\x6c\xf6\x47\x92\x09\x71\x6b\x73\x05\x34\x9c\xf2\x5f\x58\x57\x4c\xeb\xf0\x88\x3a\x82\x58\x0e\x08\x2d\x08\xcb\x15\x6a\xd6\x6d\xde\x22\xc7\x23\xd0\xb0\xf2\xee\x1e\x6d\xb3\x21\xc8\x62\x92\x9a\xbe\x10\x82\x35\xcb\x8a\x2a\x22\x8c\xa7\x06\x53\x2f\xb7\x84\x2e\x20\xdd\x49\x10\x87\xda\x48\x6e\xe3\x13\x9f\x5b\xaf\x54\xf2\xaf\x1f\x83\x79\xff\x45\x2c\x64\x54\x84\x0d\xef\xa3\xb2\xe0\xfd\x58\x41\x33\x86\x3f\xd7\x9c\xb2\xff\x48\x7e\xfd\x9f\x47\xf0\x6c\x5c\xc7\x6b\x2f\x16\xe1\x20\xa2\xfd\xae\x7f\xf7\xd9\x54\x9b\xb7\xef\x12\x1a\x81\xcf\xa1\x80\x1c\x5b\x21\xaf\xc8\x07\xd5\xdf\x9f\xf3\x19\x65\x02\xe2\xd6\xda\x87\xf3\x0a\x3f\x34\xc2\x6c\x5c\x28\x8a\x58\x12\xdb\xd3\x01\xeb\x3f\x5e\x89\x95\x22\x3f\xe1\xf7\x1a\x94\xae\xcb\xc5\x2c\x11\x9b\xd0\x88\xee\x71\xf7\xc9\x82\x2a\xf6\x74\x91\x89\xc5\xd3\x0d\x55\x9a\x49\x0c\x18\x72\xc1\x36\x2b\xf1\xa4\x0b\x2c\xc3\x2c\x6f\x2f\xe1\xf7\x6f\x89\x66\xef\xf4\x80\x62\xa1\x3e\x73\x95\x9c\x0d\xdc\x08\x9e\xcd\xec\xae\xeb\xd9\x56\xdf\x4f\x27\x9b\xa8\xe8\xd2\x3e\xb5\x8b\x25\xb8\x43\x4c\x3d\x28\x20\x02\x04\x46\x18\xa9\xa5\x97\x43\x65\x99\xd9\x7c\xbb\x2e\x33\x8b\xc8\x21\x70\xca\x25\xda\xc4\x06\x20\x8a\xa0\xa1\x85\x2a\x2c\x1e\xa1\xb7\xf6\x1b\x84\x87\xda\xc0\xa7\x50\x44\x03\x92\x6b\x56\x30\x47\xa9\xf1\x7a\x5d\x1b\xcd\xc8\x79\x36\x59\x12\xa6\xf3\x12\x39\x71\x9b\xab\x8b\xd1\x86\x82\xba\x2f\x56\x7f\x72\xe8\x40\x42\x58\xa1\xab\x2f\x1f\xb2\x35\xc0\xed\xaf\x19\x85\x86\x00\xe5\xd9\x96\x6c\xb8\xaa\xb2\x19\x34\xce\x76\x8c\x8b\xca\x86\xbe\xfb\xa9\x60\x79\x47\x92\x9d\xf0\xab\x79\x85\x6f\x7c\xb2\x9d\x76\x7a\x1d\x51\xb0\x1c\xdd\xbc\xdc\x82\x0b\x29\x0c\x81\xfb\xa8\xa9\x52\xc4\xb2\x69\xd2\x68\xc7\x0c\x1a\xf4\xf2\x48\xe1\x16\x80\xee\xd4\xb8\x6b\xf8\xbf\x71\x95\x14\x36\xe0\x8d\x1e\x3f\x37\x70\x20\x76\xe9\x1c\xfc\xb1\x55\x95\xb5\xcc\xa9\xc9\x32\x47\x1d\x21\x57\x55\x98\xef\xc1\xb2\x87\x55\x21\x50\xb0\x36\xe7\x8c\x45\xd3\x0d\x57\x90\x10\x56\xe4\x7e\x52\x9b\x3e\x23\xaa\xe4\xf4\x92\x2c\xfa\xf5\xf1\x1c\xf8\xa3\xd9\x95\xa6\xba\x54\x33\x57\xdb\xed\x1f\x77\x55\xf1\x3b\x33\xdf\xaf\x53\xa2\xd7\xa5\x22\x14\x15\x22\xf9\xca\x39\x7b\x07\x85\xcb\x53\x96\x70\x85\xce\x6a\x17\xc8\xcd\xf9\x9d\xe1\xa4\x66\x25\x34\x53\xa2\x72\x0f\x0d\x6c\x4e\x90\x5f\x0b\x10\x25\xa6\x43\xb3\x59\x9f\x68\x72\x0b\xab\x44\x27\x7e\xac\xdf\xd3\xd0\xc8\x3e\x1b\x2b\x53\x99\x7e\xaf\xcc\xbc\x4e\x01\xdb\x59\x58\xa4\xab\x65\xcb\x2e\x18\x42\xab\x45\x75\x80\x08\x8d\xe8\x5e\xd7\x89\xc1\x70\xd3\xca\xed\xf5\x8d\x9b\xc2\x3b\x34\x85\x8a\x24\xa4\xb9\xf6\x43\x21\xc5\x1d\x38\xf9\x83\xdb\x3e\x54\x1d\x11\x00\x8f\x40\x69\xd1\x3a\x6a\x5e\xee\x9a\xde\x39\x11\xcb\x67\xf1\x01\x44\x89\x61\xd5\xe0\x0d\x69\x01\x4f\xb2\x9c\xdd\x13\x4a\x32\x5c\x15\xfa\x0e\x54\xa9\xe7\x30\xf1\x80\xd5\x1c\x82\xb2\x0c\xd8\x2e\x54\x01\xfa\xac\xc9\x3e\x4d\x11\xfe\xce\xde\x15\x1c\xdc\xa9\xbc\x57\xaf\xbd\x44\x07\xd0\x2c\x25\x65\x8e\xcb\xb5\x58\x1d\x3b\x72\x15\xc4\x35\xc0\xca\x90\x3b\x97\x5b\xf2\xec\x54\x4d\x21\xc0\xea\xc7\x17\xf3\x93\xd3\xd3\xd3\x6f\x40\xe3\x01\x1e\x64\x00\x7f\xd3\x60\x7e\xe8\x49\x6d\xee\xed\x3b\x9a\xf9\x80\x53\xa6\x2b\x42\x51\x35\x77\x77\xd8\xc8\x29\xd2\xbe\x97\x8f\x92\x52\xc4\x3e\x89\x96\xb1\x37\x8c\xf3\x14\x19\x93\x60\x9e\x35\x84\x13\xe2\x47\x2c\x36\x0a\xc3\x06\x3b\x69\x0f\x1c\x8f\x1b\x1f\x8f\x00\x85\x5b\x8a\x96\xe6\x93\x8c\x1b\x91\xcb\xb9\x6e\xc0\xf8\x4f\x82\x67\xf6\x97\x1d\x5e\x19\x62\x93\xd7\xf4\xdd\xc5\x86\xae\x62\xa4\x29\xd2\xa8\x0a\xb4\xa9\x10\x2e\xc7\x2f\x5d\xd8\x0a\x3b\xba\xc0\x9a\x8b\x25\x39\x79\xd6\x0e\x42\x4e\x68\xe1\xf9\x06\x5b\xa8\x1c\xe3\xf4\xda\x4d\xd1\x00\x04\xf2\xa5\x2e\x65\x7e\x98\x8b\xf6\x0a\x77\xeb\xaa\x69\x1f\x89\xdf\xa3\xad\x92\x08\x76\xfc\xb2\x16\x86\xb7\xf3\x05\x5c\xc2\x98\x3d\x9e\x0f\x9d\x4d\x1d\xa2\x5b\xfa\x1f\x60\xf1\x4e\x68\x28\x84\xd2\x2a\x5c\x26\x5a\x22\x20\x77\x27\x5f\xd6\x3e\xa4\x82\x61\xae\x0e\xa4\x41\xb3\x3a\xba\xe4\xab\x5c\xb8\x08\xa7\x6a\x2e\xcc\x02\xa1\x74\x6d\x20\xbe\xd9\xb0\x94\x53\xcd\xb2\xad\x99\x83\xe6\x9e\xac\x71\x05\xca\x6b\x34\x2a\xa2\xc0\x21\x7c\x88\x2b\x20\x5c\x18\x27\xeb\xc4\xb6\x9d\xc7\xf0\x48\x35\xca\x36\x71\x45\x9e\x6d\x66\xe4\xbb\x52\xbb\x7d\x62\xbf\xb7\x20\x0a\xd5\x8e\xcf\xa0\x9d\x2a\xf0\x70\xba\xc3\x24\x0e\x5a\xad\x33\x4e\xf7\x2c\x50\x43\x96\x26\xb7\x90\x2a\xc3\x70\xd0\x54\xf3\x56\x1e\xb2\x9b\xc9\xb3\x7d\x1a\x2c\x3b\x57\xd3\x07\x5d\x91\xe3\xe9\x81\x2e\xab\x7f\x50\xf5\x77\x70\xb1\xec\xb8\x46\x08\x76\xc6\xab\x74\xa9\x55\x80\xcb\x78\x18\xfc\x3a\x6c\xf2\x4b\x37\xdc\xd4\x26\x34\xf4\x8d\x96\x1a\x84\x18\x80\xb5\x9a\xaa\xd3\xbc\x7d\x4d\x73\x0d\x0b\x03\xab\x1c\x20\x57\x60\x66\xcd\xe0\xaf\xd1\xd5\x29\x88\x7d\x30\x38\xce\x7c\xa9\xd2\xce\x1c\x9c\x03\xc7\x73\xa8\x14\xb6\xb6\x58\x13\x9e\xa1\xd5\x7c\x21\x3d\xf7\x6b\x7a\xa4\xba\x96\xef\x4c\x8f\x16\x78\xdf\x7c\xf1\xa6\x0b\x0a\xa6\x36\xbc\xf1\x4d\x9b\xd1\x96\x4c\x4b\x23\xb3\x07\xc9\x79\x1a\x0b\x00\x1b\xa5\xaa\xbe\x04\x8c\xc5\xc1\xf2\x6c\x09\xb1\x81\xf2\x8d\x67\xe9\x6f\x6d\x60\x0f\x3e\x9a\xfd\x18\xee\x46\x88\xcd\x09\x94\x81\x3c\xa1\xe9\x6f\xf6\x6d\x3b\x65\x70\x4d\xc2\x1a\xb4\xda\x9e\x18\xc1\x66\x0a\xe2\xcd\xaf\x1f\x45\x20\xab\xc5\x6c\x61\xd1\x5e\x8c\xf1\xb3\xba\xe9\x48\xb4\xdc\xc9\x37\xdf\x7c\x33\x8e\x40\x15\x22\x3d\xbf\x78\x7e\x19\x53\x6d\x32\x62\xbe\x34\xb2\x9b\xd7\x72\x45\x4f\x03\xdc\xce\x73\xb3\xd0\x3c\xa5\x19\x38\xe1\x82\x58\x70\x91\xfb\x2c\xd2\x1b\xe0\x62\xb5\x4d\x8c\x2e\x16\x1a\x93\x45\x79\xbb\x9b\x7b\xf0\x3b\xeb\xbf\xac\xbf\x58\x05\xe5\x60\xc5\xdb\x14\x3a\x28\x1a\x72\xe1\x3d\xb4\x61\xbd\x2e\x63\x62\xb0\x5e\x97\x2f\x23\x88\xca\x35\x98\xc5\x6c\x3c\xbe\xa2\x11\xfa\xb0\x42\xa4\x73\x9e\xaa\x57\x7c\x13\x73\x36\x98\x07\x5f\x9b\x59\x0d\x02\x29\x97\x63\x00\xb5\xa1\xb0\x45\x2b\xe7\xde\x15\x9a\x1a\x6a\x43\x7d\x54\x4e\xb9\x19\x6b\xe8\x18\xde\xca\x21\xda\xbe\x2b\x17\x06\xb3\x14\x12\x6c\x61\x95\x78\xe3\x58\x91\x0a\x76\x9f\x8d\x53\x19\x14\x22\x55\x73\x26\xcf\xa3\xa5\x5d\x83\x8f\x3d\x87\x6b\x84\xdb\x02\x7c\x12\xcc\xeb\xb1\x16\x5d\xcc\xd5\x41\x30\x3e\x5e\x55\x69\x24\xc2\x7c\xd4\xc8\x2a\x1d\xe2\x44\x8f\x2a\x86\x21\x15\xc3\x48\xce\xbb\x88\xba\x63\x17\x4d\x3f\xec\x9e\x82\x52\x9f\x75\x52\xae\x67\xa7\x5f\x8e\x95\x41\x0a\x29\x0c\x43\xfe\x23\x38\x62\x38\x65\x77\xe4\x68\x62\xcd\xc0\xa7\x05\xd5\xd0\x00\x8d\xad\x28\x44\x26\xa5\x00\x39\xc3\xfa\xb3\x2c\x33\xba\x52\xbe\xda\x25\xa6\x69\x67\xef\x0a\x96\x68\x35\x23\x3f\xe9\x35\x93\xf7\xbc\xe1\x2c\x0d\x2c\x36\xd5\x46\x70\x86\x21\x21\xbc\x6e\x5b\x1f\x10\x58\x42\x9d\xac\x41\x99\x83\xe3\x1d\x2a\x59\x54\x3b\xc9\xe5\x60\x40\x23\x7c\xc4\xe5\x5a\x96\x34\xd0\x24\x53\x55\x69\xf0\xdd\x41\x8c\x70\x86\xb1\x8a\x26\x79\xf1\x3c\x7a\x55\xf6\x5b\xe5\x73\xa4\x20\xdb\xd3\xda\x70\x5f\xfc\xdf\x46\x3a\xf2\x85\x15\x38\xb0\xbd\x89\x35\x9d\xd2\x9c\xb0\x77\xb6\x68\x94\x1b\x87\x3c\xe6\x33\x36\x23\x49\x26\xca\xd4\xfd\xf6\x04\xde\x64\x89\x39\x3b\x2a\x7b\x66\x55\x3a\xe3\x40\x71\xa5\x0f\x57\x48\xc3\xf2\xfd\x9e\xd4\x08\x0a\xfd\x6f\xa1\xba\x9d\x12\x82\x8f\xd6\xfd\x88\xd5\x92\x72\xa1\x51\x0f\x73\xbe\x25\x2c\xd7\x74\xc5\x42\x2f\x04\x97\x08\x3b\x74\xce\x0d\x5a\x42\xdc\x50\xc3\xa8\x6b\xfd\x13\xd8\x3b\xc3\x34\xf1\x3b\xa8\x8b\xe8\x82\xbd\x57\x25\x95\x34\xd7\x86\x32\xfd\x5d\x5c\x11\xcd\x0d\x36\xa8\x7c\x15\xbc\xd3\x41\x65\xa6\x37\xdb\x46\x0e\xf1\x66\x52\x67\x1b\xfe\xfe\xd3\x95\xdf\xd9\x1f\x3c\xd9\xf1\x87\x1a\xf9\xc3\x5c\x8c\x6d\x10\xa8\x65\x6a\x74\x85\x7f\x18\x4d\x4f\x80\x8d\x1c\xa2\x1f\x4e\xb2\x6c\xd4\x3f\x7d\x5a\xaf\x2b\xf9\x39\x13\x99\x53\xf2\xd8\x06\x1e\xa5\x4f\xc6\xd1\x1a\xc9\x56\x5c\x69\xb9\xed\xf0\x3b\xab\x7d\xee\x4a\xca\x06\x8e\x68\x5b\x52\x94\x59\x16\x4f\xc3\x06\x5f\x1e\x92\x7c\xcd\x4d\x3f\x2f\xb3\xac\x9d\x7d\xad\xf1\xf5\x8f\x90\x7e\x0d\x95\xa4\x70\x1e\x0f\xf0\x6b\x6b\x6c\xb8\xfb\xba\xdc\x89\xd8\x0b\xc3\x34\x6a\xa2\x3a\x31\x7b\x23\x61\xf2\xb5\x2b\x17\xbc\x06\x71\x59\x36\xf5\xda\x1f\xee\x24\x47\x7a\xb7\x39\xf4\x8d\x29\x4e\xcf\xe7\x6f\x23\xec\x15\x60\xcb\xcb\x56\x43\xeb\x06\xd1\xf0\x8d\x48\x8a\x12\xb3\x85\xd6\x08\x83\x76\x35\xd8\xd0\x81\xc8\x7a\xfa\xe8\xb5\x41\x49\x98\xde\x37\x70\x6d\xf3\x05\x6d\xf1\xb3\x35\x63\x59\xea\x48\x28\xb9\x99\x60\x70\xda\xcd\xc4\xd6\x6a\x30\xb3\x05\x2e\xc4\x66\xb2\x9b\x89\xbd\x8d\x9b\x09\x36\x58\x6c\x5b\xe9\x20\xdd\xb4\xfe\x17\x3b\x93\xdd\x97\xb8\x63\xf2\x5e\x72\x8d\x85\x24\xfc\x02\xd2\x71\x43\xc5\x88\x36\x54\x90\xba\x33\x80\xd3\x3e\xe4\x4b\xf8\x66\xe4\x3e\x00\x2b\x8f\xb2\xf1\xd7\x66\xb9\x5a\x83\x26\xe0\xf1\x5b\x1a\x03\xc5\xd7\xaa\xfa\x57\x5e\x86\x6d\xd4\xad\xaa\x8d\xf2\xa7\xad\x51\x75\x33\x79\xca\x74\xf2\x14\xcf\x0e\x9c\x5b\xe2\x3c\x94\x14\x42\x67\xd1\x88\xe0\x4b\xfb\xa5\x96\x9c\xdd\x35\x77\xee\x6f\xb6\xbc\x51\xa0\xd8\xb0\x1f\xee\xbe\xc4\x1c\x0f\x58\x61\xb0\xa1\xf8\xf0\x43\xf7\xb2\x2f\xc3\x4c\x36\xd6\xe3\x39\xaf\x6a\x95\x47\xb6\xd1\x6e\xe3\x37\x14\xa9\x75\x5e\x55\xd4\xb9\x6e\x8a\x38\xd6\x7d\x1c\xe2\x3c\xef\x6b\x9d\xbc\x16\x2c\xf8\x51\x59\x8f\x3c\x72\x36\xbf\xb0\x4f\xca\x7b\x5a\xd2\x9c\xd0\xc2\xbc\x24\xf4\xec\xb3\xff\x6e\x8e\x00\x49\x75\x90\xec\xa1\xdf\xfa\xc7\x4c\xdc\xad\x6b\x05\x3f\x1d\x4e\xd6\x35\x66\x28\x5a\x6f\x27\x54\x0d\x21\x7b\x5b\xdb\x93\x35\x6c\x8f\xbb\xdd\x32\xff\x29\x4f\x22\xda\xa1\x4b\xfc\xd0\x21\xd2\x42\x5c\x71\x73\x55\xc2\xd9\x7a\x0b\x91\xaa\x29\xf8\x9b\xe8\xb5\x50\x2c\x56\x06\x0d\xf4\x4a\xde\x9a\x09\x98\x0e\x93\x62\x14\x22\x45\x5f\x19\x9b\x63\xf7\x1d\x1f\x57\x28\xc1\x96\x8b\xbc\xc4\x7b\xbc\xe6\x1b\x26\xca\x18\x77\x15\x6b\xe6\x90\xa0\xb6\x7f\xba\xaa\xd8\xae\x04\xa5\x0f\x6a\x30\x6c\x52\xa1\x49\x26\x0c\xc4\xd8\x04\xf2\xfe\xe3\x09\x90\x46\x97\x19\x9e\xbd\x63\x09\xda\x25\x20\x61\xfc\x67\xcd\xc3\xee\x39\x46\x50\x31\xc9\x69\xc6\x7f\x67\x60\xef\x36\x8c\x51\x04\x65\x44\x1a\xa1\x3d\xca\x5b\xaa\xa2\x19\x9d\xcc\x11\x3b\x33\xbb\xc8\x19\x31\xd2\x3a\xdc\xdb\x8c\xfc\xc2\x2a\x0c\x4e\xbe\xc8\x85\xfe\xa2\xce\xdc\xd4\x8d\x96\xd6\x6c\x6d\x0f\xcb\xc0\x6a\x2a\x92\x5b\x26\xad\x57\x30\x9e\x9a\x2d\x54\x4d\x90\xcf\x4d\xc8\xb3\xd9\x37\x04\x03\x47\xcf\xca\xa5\xf2\x7e\xee\x0b\x9a\xdc\x32\x48\xa7\x8b\x49\x32\x9f\x9d\x7e\xf3\xf5\x37\x90\xfd\x2e\x70\x4f\xff\x38\x9e\x69\x61\x54\xbc\x73\x48\x68\xb1\x6c\x9d\xfe\x79\x08\x19\xd7\xaf\xae\xbe\x13\x42\x2b\x2d\x69\xc4\x9f\xbb\xdd\xa6\x59\x7d\x21\xc4\x45\x0b\xd7\x68\x46\x2e\xaa\x5a\x96\x8a\x65\x4b\x8f\x7a\x29\xf4\x03\xa7\xf8\xaa\xe3\xb4\xad\xfe\xaa\x68\xc3\x27\xa1\x0b\xd7\x40\x53\x0d\x9d\xb3\xab\xc2\x30\xa9\xf3\x70\x2d\x96\xd2\x3a\xc3\xd8\x01\xdd\x6f\x5a\x3e\x9c\x4a\x8b\xc2\x72\x72\xe8\x56\x24\x96\x8d\x07\x5f\x3b\xa1\x30\xb5\xea\x43\x31\x88\x73\xb8\x02\x74\xa8\x99\xdc\x4c\x5d\x59\xb7\x16\x35\x6a\x56\xd0\xeb\xc6\xe3\x6a\x2d\xee\x7f\xe0\x69\xca\xf2\xd7\x4c\x4b\x9e\xa8\x97\x42\x76\xd6\x97\x87\x20\x79\xc9\xee\xc0\x9a\xed\x1e\x6b\x95\x8b\x72\x2b\x4a\x72\x4f\xb1\x96\x9e\x19\x97\xac\x61\x60\xb2\xc1\x91\xad\x6c\xab\xc3\x41\x36\x3c\x17\xd2\x0f\xc5\x15\xd9\x30\x6a\x00\x61\x59\x66\x53\x1b\x9d\x69\xfd\x60\xee\x9d\xec\xbc\x60\x2e\xfb\x2f\x02\x09\xca\x3e\xa6\x2f\x62\x8d\x0d\xfd\x4d\x48\x14\x94\x67\xf6\x17\x33\x09\xfe\x82\xde\xc3\xdf\x92\x47\xcf\x66\xcf\xfe\xfa\xc8\x86\xfd\x97\xb2\x30\x64\xd3\x55\xc5\xaf\x06\x84\x1c\x43\x10\xe2\x61\xb6\x86\xb9\x62\xc1\x4d\xbc\x10\x52\x43\x48\x02\x3a\x60\x68\x9e\x30\x5f\x7f\x86\xbd\xd3\x2e\xc7\xad\x39\x00\xf3\x06\xbc\xee\xc7\x1d\xc5\xb4\x26\xd7\x60\x86\x59\x55\xca\x42\x72\xef\x93\x02\xf9\x92\xc0\x7f\x9a\x19\xfc\xe2\xbc\xdf\x36\xe2\x0e\x6d\x26\x08\x7b\x38\x8d\xe3\x4f\xa8\x1e\xa1\x61\xf4\x09\x40\xe6\x54\x47\x6a\x1a\xd5\x3e\x7b\xbb\x04\xc5\x04\x45\x80\xd7\xb9\x64\x89\x16\x72\xeb\xc4\x11\xef\xb1\x4c\x1e\x63\xe7\x27\xd6\x13\x56\x18\x3c\x3f\x25\x56\x78\x71\x63\x78\x23\x4a\x83\x03\x39\xc0\xb3\x05\x8d\x1d\xaa\x48\xab\xc9\x42\x3e\xc8\x79\x2f\xb0\x7b\x5c\x9e\x75\x09\xac\x9c\xb0\xbc\xdc\x29\xf2\x06\x57\x06\xf4\x1a\x16\x02\x96\x2e\xab\x5b\x74\xf1\xc2\x5c\xd5\x98\x85\xad\x28\x65\x3b\x53\xc0\xc0\xfd\xbc\xbd\x7c\xd5\x73\x3d\x6f\x2f\x5f\xb9\xdb\x31\xff\x04\x1e\x0a\x42\x8e\x00\x96\x82\xdd\xe2\x35\x7c\xda\xc3\x85\x5c\x33\x9f\xd9\xd9\xfe\xc0\x68\x1a\x2b\x0d\xd3\x6e\x53\xcb\xdf\xa8\x32\x9e\x30\x1b\x4c\xfc\xc3\xf5\xf5\x9c\xac\xa1\x8d\xaa\x25\x1c\xaf\x6e\xc2\x32\xdf\xe6\x00\x0e\xcd\x91\x86\x86\x09\x48\x81\x47\x31\x72\x3d\x33\x04\x48\xc7\xee\x0a\x88\xf9\x55\xb0\xdf\x0f\x55\x63\x0f\x56\xc7\x80\x3b\x90\x8c\x6e\x30\x0c\x25\xc7\x74\x1b\x17\x69\xc6\x3a\x45\x88\xfe\xf6\x4d\x8d\x2d\x08\x10\x10\x97\x8d\x9d\xcc\x91\xd9\x5e\xce\xa2\xcb\xd3\xac\x56\xd7\x2b\x68\x61\x2e\xba\xd4\x62\x63\x4e\x84\x62\x32\x70\xa1\x3e\x42\x59\x86\x26\x2b\x20\x59\xb6\x05\x3f\xf1\xdc\x25\x67\xb2\xaa\x14\xcc\x83\x1c\xdd\x9e\x0f\x8a\xed\x91\x3b\xfe\xb2\xde\xa7\xdc\xb1\xcd\x93\x1e\xf7\xbe\xda\xe7\xe0\x9a\x5c\x1e\x79\x97\x33\xcb\xb4\x5b\x4b\x91\x63\xa0\xa6\x13\xf3\x5a\x45\xc2\xac\x95\xe5\xa0\x59\xb4\xb8\xaa\x7b\x56\x0f\xe7\xc0\x9a\x12\x06\x08\x0f\xa6\xa3\x4d\x3f\x35\xd0\x8a\x85\x35\x4a\x5d\x18\xab\x6a\x15\xf1\xe1\x0d\x7f\x85\x7a\x3a\xaf\xaa\x00\x9e\x61\xfe\xa0\xfc\xe5\x52\x32\xb5\x06\x70\x47\xfd\xa0\xaf\xf3\x8d\x07\x86\xa5\xbe\xd5\xe1\x1c\x3d\x51\x0b\xd6\x19\x7d\x58\xfb\x0c\xef\xaa\x2b\xf0\xd0\x17\x1b\x37\xe2\x66\x46\x13\xac\xf5\x9e\x8b\xfc\xc4\x9a\xdb\x2b\x7f\x1d\xb4\x16\x3b\x43\x7e\x66\x30\xdc\x16\x53\x51\x06\x05\xbf\x5f\x80\xa3\x95\xd5\xf1\x07\xbf\x5f\x62\x02\x0a\x9b\x9e\xd2\x30\x8e\x19\x5d\x05\x82\x8a\xb7\x03\xfe\x01\x6c\x8c\x9d\xf4\x0d\x4e\xbd\xdb\x80\x5c\xff\x5e\xb3\x21\x7f\x94\x38\x77\xb8\xd5\xca\x20\x10\x0f\x72\x07\xfd\x72\x52\x94\xe8\x3b\x64\x83\xdd\x8f\x51\xec\x7f\x9a\x28\xf6\x3a\x10\x7e\xcc\x38\xf6\xab\xda\xcc\x23\x22\xd9\x7f\xba\x3a\x06\xaf\x1f\x04\x51\xe9\x4c\x9d\x33\xa9\x5f\xf2\x58\x15\xc4\xe0\xa3\x0f\x05\x30\xff\x0e\xe4\xcd\x77\x5f\x9f\x7e\x43\x6a\xba\x20\x21\x81\x1d\xbf\x9a\x91\xc7\xe7\x67\xa0\x11\x99\xda\x38\x10\x78\x9f\xa6\x51\x1e\x58\xa7\x02\x1d\xcd\x13\x0c\x54\x0b\x26\x05\x39\x23\x53\x73\xc9\xef\xa8\x66\x3f\xb2\x2d\xfe\x6a\x09\x8f\xb3\x17\x4e\x01\x79\x66\xcb\x13\x73\x95\x2c\xad\x69\x61\xc0\x6e\x68\x05\x78\xac\xeb\xaa\x03\x8b\x69\x51\x2e\x32\x9e\xf8\x14\xb4\x60\x54\xa2\x77\x55\xe5\xd9\x4a\xc4\x2e\xa8\x52\xd5\xef\x95\xf5\xe2\xe4\xc4\xcc\x76\x92\x72\x09\x6f\xe4\x33\x57\x77\x77\xc3\x00\x2f\xd6\x4c\x5e\x95\x3c\x6a\xe6\xba\x7e\x75\x15\x36\xa8\x6c\xfd\x58\x1e\xcf\xd5\x80\x4a\xa0\x0d\x51\xd8\xc8\x9d\xb1\x5b\x86\x75\x9e\xa7\xd2\xe9\x2e\x33\x05\x3e\x9d\x98\xf0\x0f\xc3\x2f\x14\xa9\x9e\xae\xc8\x68\xbe\x9a\x09\xb9\x82\x5c\xf8\x89\xdc\x16\x5a\x3c\xd5\x99\x7a\xfa\x3f\x8a\xdb\xd5\x89\xef\xf1\xe4\xb3\x3e\xf2\x1a\x8a\x1e\x51\xb2\x50\x67\xea\x35\xcf\xbb\xf5\x7e\xaf\xae\xaa\xcf\xcd\xf4\x8e\xd7\xaf\xae\xbc\x02\x2f\x20\xd1\xff\x91\xe7\xde\x03\xea\x75\x64\x12\x45\x7a\x0d\x7c\xd3\x87\xfa\x0a\x6c\x0a\x38\x06\xbc\x50\x61\x87\x01\x0a\xfb\x23\x1e\x92\x28\x44\x26\x56\x5b\x5b\xb3\x7f\x2e\x32\x1e\x93\x2b\xaf\x63\xcd\x7c\x8c\x90\xe3\x05\x40\xed\x02\x5f\x50\x2f\x33\x23\xd0\x90\x1b\x09\xba\xd2\xbc\xba\x64\xee\x3e\x73\xb9\xe9\xd7\x98\xe0\x8f\xee\x8f\xe8\xf6\x18\x3b\x72\x2c\x69\x3e\x87\x34\xec\xcf\x79\x44\x19\xd6\x68\xe0\x61\xd2\x2c\x16\x34\xa6\xf6\xac\x2b\x8a\x15\x8a\x73\x8a\x51\x99\xac\x91\x43\xad\x74\xe0\x7a\xcd\x65\x4a\x0a\x2a\xf5\xd6\x95\x7f\xc7\x44\xf0\x87\x30\xd9\xd5\x4c\x92\xcd\xdd\x84\x00\x7d\x2f\xe4\x6d\x26\x68\x0a\x6e\x4a\x5b\x9f\xac\xbe\x67\xa9\x81\x5b\x4a\xa9\xe4\xd3\x8c\x2f\xd8\x3b\x96\x84\x89\x60\x2c\xcf\x7a\x62\xfb\x3c\xc5\x21\x9e\x42\xb3\xbe\x0b\xb9\xd2\x54\xab\xb3\xd5\xaa\xab\xdc\xd1\x0f\xe2\x3e\xc8\xda\x0d\x16\x20\x97\xaf\x18\xb5\x25\x34\xf1\xbb\x0d\x73\x1f\x3b\x43\x3b\x28\xff\x0e\x9d\x90\xdc\xaa\x79\xd0\x5f\x5d\x1a\x19\x6e\x28\x87\xf8\x1e\xf5\x13\x86\xa8\x3d\x87\xb2\x03\x2c\x4f\x40\x12\xf9\x87\xab\x76\x13\x0e\x01\xb4\xc6\x0c\xf1\xd4\x0c\xf1\x34\x1c\x62\x3a\xa9\x38\xf8\x30\x9b\x0f\xbe\xaf\xa7\xfd\x39\x75\xa6\x61\x69\x9d\x8c\xe9\xaa\x97\x39\xdd\x67\x33\x7b\xe6\x67\x35\x2f\xdc\x5d\x7a\x79\x67\xdd\xc9\xaf\xef\x47\x76\xfb\x85\x2d\xd6\x42\xdc\x36\xe6\xfc\xf6\xff\x4d\xae\x92\x35\xdb\xd0\x80\x31\xf0\x32\x5d\x51\x93\xe4\x00\xaa\xae\xaf\x23\x46\x09\xf7\xa5\xf2\x42\xa2\x48\x91\x0c\x97\x56\x9b\xcf\x6a\xb2\xd4\xfe\xea\xb5\x21\x26\xee\xaa\xf0\x9e\x3a\x07\xdd\x05\xa3\x12\xe4\xb6\x5b\x96\x37\xd7\xb4\xc0\x10\x1f\xeb\xd6\x0e\x4d\x24\xbb\xe3\xec\x5e\xcd\xea\x2d\x03\x3b\x77\xc4\x98\xfa\xe1\x30\xf7\x90\xbb\xac\x20\x61\xd7\xab\x74\xbd\x59\xda\x7d\xa9\xb5\x36\xed\xf4\x26\xc2\xa2\x9a\x47\xd4\xb7\x7b\xe4\x2b\xab\x06\x29\x4c\xef\x71\xbd\xc4\x37\x93\xb3\xbd\x41\x00\xac\xe0\x6d\x4e\x47\xec\xa6\xd1\xaa\x67\x3f\x65\xfe\xc9\x76\xf4\x11\xc1\xe8\xff\x7c\x7d\xfa\xcd\x07\xe0\x03\x70\x35\x3c\x3f\x8b\xf3\xb3\xe1\xd7\xa6\x19\x99\x92\xf9\x8b\xd7\x27\x2c\x4f\x44\xda\x90\x9b\x17\x65\x9e\x66\x98\x39\x06\x42\x88\x68\xbe\xf5\x8e\x28\x41\x72\x5d\x1a\xf3\x73\xb4\x62\xf8\x62\x0b\x9e\x4a\x96\x31\xb1\xf7\x03\x35\x00\xad\xd5\x1c\xe7\xb0\xb6\x1e\xef\xf8\x67\x33\x42\x53\xc3\x2c\x4a\x60\x23\xeb\x09\x7a\xac\x08\x7e\x2e\x36\x1b\x91\xbf\xa1\x1b\x86\xe6\x48\xab\xc4\x8e\xb6\xfd\x49\xae\x68\x6e\x5f\xa7\x9b\xbc\xbd\xee\x88\x47\x71\x1b\x04\xf2\x32\xcb\x06\x6f\xf5\xca\xf9\x78\xa5\x6f\x44\xca\x90\x22\x5d\x81\x62\xab\x7e\xad\xf5\x8b\xea\xee\xe5\x70\x27\xe6\x3f\xf0\x1e\x64\xe4\xee\xd9\xac\xd9\xd4\xba\xfd\x98\x7d\x40\xc1\x57\x0c\xbf\xc6\x98\xae\x6c\xeb\x50\xab\x4f\x38\x63\x64\x74\x49\x6d\x1d\xb1\x35\x4b\x6e\x21\xc1\x31\x4b\x1d\xcb\x61\xb9\x58\x05\x4c\x30\x54\x36\x52\x61\xba\xa1\x8c\x69\x5b\x7d\xec\x6c\x7e\x81\x57\xe0\x55\xa7\x18\xba\x9c\x64\x54\x29\x6b\x86\x56\x84\x3a\x01\x15\x56\x55\x94\xba\xa1\x50\x99\x45\xf4\x99\x75\x58\xa7\x05\xef\x94\x8e\xcf\xe6\x17\x4e\x34\x76\x05\x26\x81\xd9\xf4\x53\x2a\x38\x79\xef\x5f\xe2\x73\x3f\x23\x60\x60\x41\x56\x9c\xb7\x4a\x06\x5d\x95\xef\xba\x63\x52\x83\xa7\xdd\x2a\x37\x97\x64\x47\xf3\xd6\x3e\x6b\xdd\x75\x87\x8d\xb2\x41\x15\x77\x2b\x19\xe4\x9b\x2e\xf3\x60\x04\xf4\xa8\x39\x78\x3a\x68\xaf\xd7\x8e\x66\xaf\x3c\x26\xd6\xde\x5b\x62\x6d\xe5\xdf\x78\xe3\x65\xfb\x02\xcc\x20\x2a\xba\xc3\xa2\x9a\xdc\xa3\x36\xd3\x3d\x69\x33\xce\x20\xf1\x9a\x41\x48\x7a\xe4\xed\x0f\x91\xac\xa7\xa6\xe3\xd3\x58\xc7\x06\xa1\x72\xe9\x33\x37\xe9\x53\x08\x9c\x3c\xa9\xf2\x79\x9c\x58\xa7\xfc\xa7\xb4\x28\x90\xea\x35\xf9\xf0\x73\xd3\xe3\xdc\x77\xb0\xc2\x7b\x9d\x2d\xef\x25\x6e\x56\x05\x90\x9a\xc5\x43\xfd\x36\x9e\x4c\xa6\x13\x83\x21\x60\xe8\xab\x35\x35\x1f\xa7\x13\x5b\xa4\xae\x9a\x6a\x32\x9d\x74\x26\x31\x99\xfc\xda\xc4\x24\x6e\xe8\xd6\x6d\xd9\x0f\x04\xd3\xe8\x37\xe2\x42\xc0\xc6\xb3\xb2\x2d\xda\xc7\x32\x70\x7b\x10\xc1\xd2\xee\xd5\xca\x0f\x6a\x97\x30\x70\x8a\xef\xdb\xa7\xd2\x7e\xc8\xf5\x06\xb5\x01\x3a\x77\xa8\xa0\xad\x0f\x13\xf2\x65\x34\x17\x02\xca\xf0\xd9\x68\xda\x5a\x92\x17\xd4\xd0\xf8\x28\x9d\xf6\xb7\x21\xae\x6c\xec\xd1\xf4\x6d\xc8\x9c\x48\x37\x04\xb4\xce\xa6\xb3\x69\x3b\xef\x91\x79\xaa\xbe\xcc\x77\xb0\x39\xe7\x0c\x02\x2e\xd5\x8f\x6c\x92\xa2\xbd\x71\xd4\x6d\x08\x8f\x31\x0d\xf5\x26\xe3\x6e\xb8\xd5\xad\x75\xd9\xfb\xba\xaf\xfe\x05\x9a\x5d\x1e\x49\xfa\x91\xa4\x7f\xa6\x24\x7d\x8f\xda\xab\x8e\xf7\xd2\x22\x9f\xe3\x50\xff\xce\xc3\xf6\xa2\xcd\x9d\x47\x1b\x78\xd4\x71\x76\xc2\x1f\x12\x5d\xd0\xc4\xcb\x4a\x95\x75\xa1\x4b\x2e\xb2\x86\x05\x6b\x79\x51\x95\xdf\xf2\xd9\x77\x67\xe7\xce\xb8\x20\xcb\x8c\x45\x84\x87\x90\x97\x50\x05\x4b\xda\x6c\xc0\x11\xfb\x1c\xb1\xcf\x67\x8a\x7d\xa6\x08\xb2\x6d\x9a\x5f\xb0\xc4\x7b\x78\xa9\xd0\xc4\x66\x5f\xc1\x10\xdd\xb6\x6e\x5a\x9e\xf7\x30\x0f\x72\x56\x7f\x90\x66\x8e\x5e\xfc\x37\xf2\x61\xc3\x38\xbb\xe3\x83\x2b\xbb\xf1\x7e\x9c\x00\x07\xe1\xf1\x02\x68\x99\x34\xde\x82\xf5\x3f\xa0\x03\xe8\xa1\x85\x0a\xbe\x8f\xfb\x40\x9d\xcd\x2f\xe0\x4b\xd3\xba\x49\xf3\x4a\xf1\x31\x23\xae\xd5\xd4\xfb\xf0\xe1\x6b\x7d\xe3\x12\x31\x83\xac\xe7\x50\x52\x95\xb7\x28\xf0\x7a\x72\x41\x57\x37\x93\x2f\x6e\x26\xf8\x99\x29\x30\x15\xf9\x79\xa2\x80\xd2\xe1\xbb\x55\x5b\x34\xaa\x67\x10\x51\x95\x99\x4b\xb2\x8b\xef\xe0\x05\x07\x5b\x6c\xa9\xb0\x1c\xe3\xca\xf5\x6b\x2f\x16\x3d\xe6\x60\x9d\xb1\x65\x5a\xc7\xb8\xd8\x1a\x7d\x3e\xea\x08\x27\xee\x4f\xa8\x79\xc0\x61\x16\xeb\x83\x9e\xaf\x9f\x47\x91\xc7\x3c\x4f\xb2\x12\x14\x88\x65\xee\x7f\x4f\x7d\xf7\x27\xd1\xdd\x89\xdc\x67\x49\x8b\xc6\xf3\xbc\xa9\x37\xf0\x93\xe7\x22\x3f\x69\xae\x10\x14\xb4\xd1\x65\xc2\x07\x72\x33\x79\xba\x14\xe2\x69\xf3\xa3\x2a\x17\xf8\x5d\x2c\xc9\x52\x88\x78\x86\x04\x9a\x8a\x3c\x8b\x48\x43\x97\xf6\x8b\x1f\xd1\x35\xad\x30\x26\xc6\x43\x49\x47\x85\x68\x15\x9c\x68\xbf\xf5\x84\x29\xb3\x2e\xe5\x88\x3b\x94\xf6\xd5\xbb\x3e\x07\xbe\xf9\x5e\x6a\x66\x5e\x44\x7b\xcd\x6f\x15\xf3\x26\x78\xaf\xa6\x3e\xf0\xcb\x32\x23\xc4\x1e\xd6\x90\x8e\xda\x46\xba\x55\xe8\x36\x29\x95\x16\x9b\x7f\xba\xdf\x1d\xe2\xc5\xb0\xc3\x57\x5c\x69\x5b\x5d\xa5\x0f\xff\xb6\x1a\x7b\x65\x33\x28\xa8\xa1\x9a\xaf\x9d\xc0\xea\x9c\xb9\x24\x19\x5d\xb0\xcc\x7e\x15\x52\x1d\x75\xbd\x47\xd6\xec\x8f\xcb\x9a\x01\x30\x5f\x59\x58\x8e\x97\xad\xc3\x6f\x18\x02\x66\x3a\xda\x50\x75\xe7\x36\xe9\x92\xd7\xdb\x53\x6c\x3e\x94\xca\xb3\x05\xc0\x0e\xea\x2c\xe8\x35\xcf\x57\x51\xe2\x8a\x8f\xed\xd5\xfe\x16\x15\x7f\xbd\xa3\x64\xe4\x0f\xc1\x3f\xe0\xad\x38\x8c\x79\x7e\x76\x59\xde\xa9\x5d\x68\x90\xb6\x59\x09\x43\x40\x1c\x4a\xe9\x93\x08\x1d\x0f\x9d\xfe\xe4\xbe\xe2\x60\x86\xac\x98\xae\x7c\xc3\x94\xa6\x9b\x62\x32\x9d\xc0\xf0\x47\xe9\xf1\xe0\x28\xaa\x79\x25\xad\x53\x35\x6c\x01\xc4\xad\x62\x59\x65\x4c\x70\x61\xfb\x54\xb7\x3e\xd6\x84\x82\xb3\x5c\xba\x11\x8f\x48\x72\xbf\x48\x32\x78\x4e\x6d\x3f\xdb\x86\x97\x28\xb6\x8d\x4a\xc1\x9d\x08\xcd\xa3\xb3\xea\x70\x2d\xf0\x87\x9c\x86\x75\x40\x84\x87\xb3\x60\x4d\x36\x05\xe3\x98\x61\x72\x7c\x1e\x10\xe8\x87\xb1\x02\x59\xb6\x25\xbf\xd9\xa4\x16\xe8\xcb\x6e\x47\xb4\xe1\x00\xdc\xe7\xf5\xf9\x77\xc9\xe4\xd6\x0f\xbd\x64\xc8\xd0\xf9\x91\x67\x58\xa7\x20\x63\x4b\x4d\x16\x19\xcd\x6f\x6d\x7a\xf4\x6a\xe3\x8f\x14\x70\xb3\xbe\xa8\x84\x1b\x6a\x85\xf9\x09\x5c\xea\x86\x0f\xb2\x2d\xd4\xc9\xc3\xfb\x10\xc3\xb5\x0b\x9e\x63\x01\x23\x56\x65\x08\xaa\x1b\x41\x1c\x7d\xb8\x67\x58\xf9\x08\xb2\xe5\x7d\xd0\xea\xae\xf9\x06\x1e\xe0\x9d\x23\x01\x6d\x78\xa9\xd5\x32\xb7\x88\x1f\xe3\x0c\xf8\x43\xac\x2e\x33\x2f\x61\xb8\xf8\x3a\x33\xff\x3d\xcf\x53\x71\x3f\x74\x22\xd8\x8a\x3c\xfe\xc7\xb5\x3b\xc3\x93\x5f\xe0\xa7\x29\xf1\xbf\xfc\xfa\x04\x9f\xb4\x3f\x35\xd5\x38\x37\xef\x2d\x9a\xda\x8a\x53\x48\x7e\x21\xfe\x96\xea\xaa\x71\xd5\x0e\x07\x4c\xca\x8d\xf9\x93\xdf\x55\x4d\x1e\x0b\x49\x7e\x67\x52\xf8\xf0\xbe\xa0\x0f\x66\xf9\xd5\x34\x67\x90\xea\x03\x7b\x3c\x99\x8d\xc9\xa5\x3e\xd2\xa2\xdc\xc4\xa3\xd3\x3e\x35\xf9\xd3\xf6\xb1\xf7\xb6\xaf\xd4\xea\x75\x00\x1e\xd9\x09\xe0\xea\xd7\x0f\x62\x48\x8c\xa0\x33\x92\x29\x31\x4d\x91\x50\x38\x96\xca\xe6\x4d\xb1\xa6\x63\x7e\xe7\x13\xb1\x54\xdc\x8a\x0d\xfd\xb4\x8c\xe0\x00\xd7\x82\xe1\x23\x47\x56\xe4\xd0\xac\x88\x0f\xd3\x19\x87\x87\x28\x14\xdb\x8f\x32\x24\xaa\x27\x06\xa8\x0f\x67\x39\xa4\xef\x51\x65\x1d\x52\x67\x31\xd6\xf9\xfd\x91\x85\xd9\x37\x0b\x43\x53\xaa\xe9\xd0\x5d\x0d\x50\x5e\xae\xf4\x6b\xa6\xe9\x07\x98\x14\xfd\x10\x1f\x24\x59\xed\x8c\x07\xbf\xb4\xdd\x2f\x30\xdc\x97\xa3\x3a\xac\x1f\x11\x56\x6d\x5d\x94\x30\x67\x81\xa8\xb6\xd8\x22\xe3\x47\xf3\x74\x6a\x73\xc1\x1a\x4e\x6b\xea\xd9\xab\x01\x04\x68\x3a\xb7\xf1\x5f\x1e\xe5\x32\x61\xa2\x48\x4c\x52\x88\x87\x8f\x3c\xe7\xc7\xe3\x39\x1f\x0e\xfe\xb5\x71\x1e\x0c\xc6\x47\xfd\xe6\x9f\x98\x62\x1f\xe9\xde\x51\xbf\xf9\x99\xea\x37\xbf\x7c\xa0\x7e\x33\x60\x30\xf7\xa9\xe1\x3c\x6a\x37\x8f\xda\xcd\x23\x8a\xdc\x8b\x76\x73\x3f\x42\x5c\x84\xcd\x3e\xea\xe7\xfa\xf4\x73\x9d\x35\xe1\x8f\x6a\xba\x4f\xae\xa6\x03\x48\xf9\x70\x39\xf3\xc1\x4c\xfe\x51\x67\xf7\x9f\x4a\x60\xff\x28\x3a\xbb\x2f\x8f\x3a\xbb\xa3\xce\x6e\xac\xb4\xd0\x87\x07\x5d\xbd\xc6\x96\xd2\xef\x85\xfd\x30\x52\xec\x88\x34\xef\x70\xaf\xf0\x15\x22\xed\x97\x33\xe7\x8e\x5f\x6b\xc9\x55\xa5\xfa\x83\x50\x70\xfb\xd5\x29\xfe\xaa\x7c\x97\x16\xb0\x9d\x4c\xf8\x52\x48\x08\x1b\xb7\xed\xf5\x1a\x09\x30\x24\x0c\xde\x94\x99\xe6\x45\xc6\xaa\x54\xf4\x7a\x1d\xe4\xb1\x86\x32\x97\x62\xe9\x86\x1a\x40\xc9\x35\x57\x8f\x40\xbc\x54\x47\xd9\xe8\xa8\xbc\xf9\xe3\x23\xc0\x0a\x9c\x23\x42\xa6\x7d\x7a\xf8\x50\x6c\xde\xb0\xa0\x8c\x2b\xbe\x67\x90\x29\x14\x83\x02\xff\x2e\x99\x5f\x53\x61\xfe\x80\xac\xa3\xfb\xf1\x09\xf9\x13\x48\x46\x47\x87\x85\x8f\x2f\x09\xed\x5b\xc8\xd9\x17\x69\x1e\x12\x56\x3a\xba\x3c\x48\x68\x69\x2a\x3a\x8f\x02\xcb\xe7\x27\xb0\xc4\x84\x15\x9f\x5e\xd2\x5d\x6e\x0d\x8b\xef\x4b\x5c\x69\x42\xed\xac\x8f\xa1\x3c\x0a\x2e\xff\xb9\x82\xcb\x4e\x92\x47\x1f\x9e\xac\xfa\xbb\x0c\x22\xae\x56\x80\xad\x84\xd5\x87\x18\x9b\x6d\x51\x08\xf0\x00\x85\xe9\x16\x1d\xc9\x81\xa8\xa2\xaa\x12\xc1\x18\x37\x83\xe9\x04\x86\x18\xeb\x6e\xe0\x97\x43\xba\x33\x57\x19\xe9\x06\x20\xb7\x10\xe9\x4c\x15\x2c\x99\x55\x35\x36\xa2\xb6\x2f\x5c\x41\xb4\x08\x98\xcd\xca\x8f\xdb\xf4\xe6\x22\xf8\xed\x5e\x48\x48\xeb\xa4\xe2\x69\x95\xba\x18\xb6\x7d\xb0\x24\x7b\x20\xc2\x3b\x01\xcc\x1b\x91\xb2\x11\xb0\x12\x34\x1b\x06\x13\x28\x64\x34\x00\x21\xa1\x98\x68\x99\xb0\x4e\x78\x39\x52\xce\xa3\xbc\xf8\x27\xa7\x3b\x68\x5d\x40\xca\xd3\x2b\xa1\x61\xb5\xc0\x2c\x13\xf7\xe6\x3a\x20\x87\xad\xb2\x90\x8f\xf2\x1a\xc0\xe2\x1d\xcd\x42\x69\xa4\x2e\x87\x88\x2c\x63\x89\x17\x2f\xcc\xf1\xfb\x3e\xbd\x02\xce\x87\x39\x33\x39\x41\xef\x8f\x87\x91\x43\x29\xf1\x13\x24\xc7\x7c\xb8\x98\xd5\xce\xa4\xd2\xdf\x3e\x00\xc2\x7d\x09\x72\x7d\xf4\x66\x48\x70\x6b\x34\xad\x0b\x6c\xc1\xc7\x21\x52\x73\x94\xc7\x3e\xa9\x3c\xf6\xca\xde\x18\xe4\x85\xdf\xb4\xae\xec\xc3\x44\xae\x4a\xd2\x8a\xf0\x33\x47\x11\xeb\x70\xa4\xae\x91\x56\x45\xd3\x3c\xa5\x32\xc5\xe7\xe9\xda\x7d\xe4\xf5\x7e\xee\x52\x5f\x2f\xef\xbd\x13\x12\x9d\x8b\x74\x04\xcf\x5e\xb5\x1a\x66\xd9\x8d\x3c\xf5\x10\x8e\xbd\x12\xbf\x8e\x08\xf6\xe0\x08\x36\x38\xec\x0e\x97\x0c\xe5\xcb\x23\x84\xb5\x27\x6b\x4c\xdf\x3d\xd7\x6b\x9b\x86\x18\x0a\x6f\x00\xd3\x88\xf7\x79\x38\xac\xdc\x52\x4b\x1c\x51\xf3\x51\x0a\xf9\x94\x52\xc8\x27\xe5\xe8\x3f\x3a\x87\xfe\x21\x0a\xc4\x07\x12\xa6\x21\xe6\xbe\xde\xb2\xce\xdb\x57\xdf\x8e\xac\xfd\xe7\x41\x79\x06\x58\xfb\x42\xa4\x87\xe7\xec\x03\xa6\xe7\x48\x3d\x8e\x8c\xfd\xe7\xcc\xd8\x07\xa0\x3a\x0e\x7d\xa2\xf5\xe7\x68\xbc\x39\x1a\x6f\x76\x81\x97\xa3\xed\xe6\x3f\x90\x14\x1f\xe9\xde\x51\x6a\x3a\xda\x6e\x8e\xb6\x9b\x8f\x69\xbb\x69\x91\x9b\xa3\xe9\xe6\xcf\x45\x54\x3e\xad\xe9\xa6\xcd\xcd\x1c\x05\xbc\xa3\x80\xf7\x59\x0a\x78\x6d\x50\xdd\x05\x83\x1e\xed\x36\xff\x91\xd8\xf5\x0f\x68\xb7\xe9\x50\x48\x1c\xf1\xf2\x51\x00\x39\x9a\x6d\x3e\x27\xb3\x4d\xc7\x43\x7d\x18\x55\x3a\x1a\x6d\xfe\x4c\x64\xe7\x93\x1a\x6d\x5a\x0c\xcf\x91\x74\x1c\x59\xfa\xcf\x98\xa5\xaf\x99\x6c\xde\xff\xff\xfe\xbf\x00\x00\x00\xff\xff\x9f\xf3\xee\xca\x7c\xfe\x14\x00") diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/BUILD b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/BUILD index 979f7a35203..8f870ab9b7e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/BUILD @@ -23,7 +23,7 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/restmapper:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/config.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/config.go index 8eb1c095d83..d79cfaeb26b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/config.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/config.go @@ -21,7 +21,7 @@ import ( "net/http" "time" - "k8s.io/klog" + "k8s.io/klog/v2" utilwait "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/admission" diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/BUILD b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/BUILD index ba70ad6e388..106f075aa0a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/BUILD @@ -27,8 +27,6 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/authentication/token/union:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//staging/src/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile:go_default_library", - "//staging/src/k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth:go_default_library", "//staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc:go_default_library", "//staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook:go_default_library", "//staging/src/k8s.io/client-go/plugin/pkg/client/auth:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/config.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/config.go index 537ecbcacec..bf3881c3cbd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/config.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/config.go @@ -36,8 +36,6 @@ import ( tokenunion "k8s.io/apiserver/pkg/authentication/token/union" "k8s.io/apiserver/pkg/server/dynamiccertificates" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile" - "k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth" "k8s.io/apiserver/plugin/pkg/authenticator/token/oidc" "k8s.io/apiserver/plugin/pkg/authenticator/token/webhook" @@ -49,7 +47,6 @@ import ( // Config contains the data on how to authenticate a request to the Kube API Server type Config struct { Anonymous bool - BasicAuthFile string BootstrapToken bool TokenAuthFile string @@ -107,22 +104,6 @@ func (config Config) New() (authenticator.Request, *spec.SecurityDefinitions, er authenticators = append(authenticators, authenticator.WrapAudienceAgnosticRequest(config.APIAudiences, requestHeaderAuthenticator)) } - // basic auth - if len(config.BasicAuthFile) > 0 { - basicAuth, err := newAuthenticatorFromBasicAuthFile(config.BasicAuthFile) - if err != nil { - return nil, nil, err - } - authenticators = append(authenticators, authenticator.WrapAudienceAgnosticRequest(config.APIAudiences, basicAuth)) - - securityDefinitions["HTTPBasic"] = &spec.SecurityScheme{ - SecuritySchemeProps: spec.SecuritySchemeProps{ - Type: "basic", - Description: "HTTP Basic authentication", - }, - } - } - // X509 methods if config.ClientCAContentProvider != nil { certAuth := x509.NewDynamic(config.ClientCAContentProvider.VerifyOptions, x509.CommonNameUserConversion) @@ -233,16 +214,6 @@ func IsValidServiceAccountKeyFile(file string) bool { return err == nil } -// newAuthenticatorFromBasicAuthFile returns an authenticator.Request or an error -func newAuthenticatorFromBasicAuthFile(basicAuthFile string) (authenticator.Request, error) { - basicAuthenticator, err := passwordfile.NewCSV(basicAuthFile) - if err != nil { - return nil, err - } - - return basicauth.New(basicAuthenticator), nil -} - // newAuthenticatorFromTokenFile returns an authenticator.Token or an error func newAuthenticatorFromTokenFile(tokenAuthFile string) (authenticator.Token, error) { tokenAuthenticator, err := tokenfile.NewCSV(tokenAuthFile) diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authorizer/config.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authorizer/config.go index cdbc11f48f3..0a1b1ca85c2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authorizer/config.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authorizer/config.go @@ -86,6 +86,7 @@ func (config Config) New() (authorizer.Authorizer, authorizer.RuleResolver, erro ) nodeAuthorizer := node.NewAuthorizer(graph, nodeidentifier.NewDefaultNodeIdentifier(), bootstrappolicy.NodeRules()) authorizers = append(authorizers, nodeAuthorizer) + ruleResolvers = append(ruleResolvers, nodeAuthorizer) case modes.ModeAlwaysAllow: alwaysAllowAuthorizer := authorizerfactory.NewAlwaysAllowAuthorizer() diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder.go index 35e8ef16207..eaf38a5fe38 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder.go @@ -57,6 +57,7 @@ func NewStorageFactoryConfig() *StorageFactoryConfig { networking.Resource("ingresses").WithVersion("v1beta1"), networking.Resource("ingressclasses").WithVersion("v1beta1"), apisstorage.Resource("csidrivers").WithVersion("v1beta1"), + apisstorage.Resource("csistoragecapacities").WithVersion("v1alpha1"), } return &StorageFactoryConfig{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/BUILD b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/BUILD index f0b9aabbeb8..bd631e32707 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/BUILD @@ -70,7 +70,7 @@ go_library( "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/featuregate:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/authentication.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/authentication.go index 1c5a02dbb64..ca774cdb0d6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/authentication.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/authentication.go @@ -35,7 +35,7 @@ import ( "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" cliflag "k8s.io/component-base/cli/flag" - "k8s.io/klog" + "k8s.io/klog/v2" openapicommon "k8s.io/kube-openapi/pkg/common" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" "k8s.io/kubernetes/pkg/features" @@ -50,7 +50,6 @@ type BuiltInAuthenticationOptions struct { BootstrapToken *BootstrapTokenAuthenticationOptions ClientCert *genericoptions.ClientCertAuthenticationOptions OIDC *OIDCAuthenticationOptions - PasswordFile *PasswordFileAuthenticationOptions RequestHeader *genericoptions.RequestHeaderAuthenticationOptions ServiceAccounts *ServiceAccountAuthenticationOptions TokenFile *TokenFileAuthenticationOptions @@ -80,16 +79,13 @@ type OIDCAuthenticationOptions struct { RequiredClaims map[string]string } -type PasswordFileAuthenticationOptions struct { - BasicAuthFile string -} - type ServiceAccountAuthenticationOptions struct { - KeyFiles []string - Lookup bool - Issuer string - JWKSURI string - MaxExpiration time.Duration + KeyFiles []string + Lookup bool + Issuer string + JWKSURI string + MaxExpiration time.Duration + ExtendExpiration bool } type TokenFileAuthenticationOptions struct { @@ -115,7 +111,6 @@ func (s *BuiltInAuthenticationOptions) WithAll() *BuiltInAuthenticationOptions { WithBootstrapToken(). WithClientCert(). WithOIDC(). - WithPasswordFile(). WithRequestHeader(). WithServiceAccounts(). WithTokenFile(). @@ -142,11 +137,6 @@ func (s *BuiltInAuthenticationOptions) WithOIDC() *BuiltInAuthenticationOptions return s } -func (s *BuiltInAuthenticationOptions) WithPasswordFile() *BuiltInAuthenticationOptions { - s.PasswordFile = &PasswordFileAuthenticationOptions{} - return s -} - func (s *BuiltInAuthenticationOptions) WithRequestHeader() *BuiltInAuthenticationOptions { s.RequestHeader = &genericoptions.RequestHeaderAuthenticationOptions{} return s @@ -281,13 +271,6 @@ func (s *BuiltInAuthenticationOptions) AddFlags(fs *pflag.FlagSet) { "Repeat this flag to specify multiple claims.") } - if s.PasswordFile != nil { - fs.StringVar(&s.PasswordFile.BasicAuthFile, "basic-auth-file", s.PasswordFile.BasicAuthFile, ""+ - "If set, the file that will be used to admit requests to the secure port of the API server "+ - "via http basic authentication.") - fs.MarkDeprecated("basic-auth-file", "Basic authentication mode is deprecated and will be removed in a future release. It is not recommended for production environments.") - } - if s.RequestHeader != nil { s.RequestHeader.AddFlags(fs) } @@ -329,6 +312,12 @@ func (s *BuiltInAuthenticationOptions) AddFlags(fs *pflag.FlagSet) { fs.DurationVar(&s.ServiceAccounts.MaxExpiration, "service-account-max-token-expiration", s.ServiceAccounts.MaxExpiration, ""+ "The maximum validity duration of a token created by the service account token issuer. If an otherwise valid "+ "TokenRequest with a validity duration larger than this value is requested, a token will be issued with a validity duration of this value.") + + fs.BoolVar(&s.ServiceAccounts.ExtendExpiration, "service-account-extend-token-expiration", s.ServiceAccounts.ExtendExpiration, ""+ + "Turns on projected service account expiration extension during token generation, "+ + "which helps safe transition from legacy token to bound service account token feature. "+ + "If this flag is enabled, admission injected tokens would be extended up to 1 year to "+ + "prevent unexpected failure during transition, ignoring value of service-account-max-token-expiration.") } if s.TokenFile != nil { @@ -384,10 +373,6 @@ func (s *BuiltInAuthenticationOptions) ToAuthenticationConfig() (kubeauthenticat ret.OIDCRequiredClaims = s.OIDC.RequiredClaims } - if s.PasswordFile != nil { - ret.BasicAuthFile = s.PasswordFile.BasicAuthFile - } - if s.RequestHeader != nil { var err error ret.RequestHeaderConfig, err = s.RequestHeader.ToAuthenticationRequestHeaderConfig() @@ -454,8 +439,6 @@ func (o *BuiltInAuthenticationOptions) ApplyTo(authInfo *genericapiserver.Authen } } - authInfo.SupportsBasicAuth = o.PasswordFile != nil && len(o.PasswordFile.BasicAuthFile) > 0 - authInfo.APIAudiences = o.APIAudiences if o.ServiceAccounts != nil && o.ServiceAccounts.Issuer != "" && len(o.APIAudiences) == 0 { authInfo.APIAudiences = authenticator.Audiences{o.ServiceAccounts.Issuer} diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/server/insecure_handler.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/server/insecure_handler.go index c3b87bc9edb..ce8c387b847 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/server/insecure_handler.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/server/insecure_handler.go @@ -41,6 +41,7 @@ func BuildInsecureHandlerChain(apiHandler http.Handler, c *server.Config) http.H handler = genericfilters.WithTimeoutForNonLongRunningRequests(handler, c.LongRunningFunc, c.RequestTimeout) handler = genericfilters.WithWaitGroup(handler, c.LongRunningFunc, c.HandlerChainWaitGroup) handler = genericapifilters.WithRequestInfo(handler, server.NewRequestInfoResolver(c)) + handler = genericapifilters.WithWarningRecorder(handler) handler = genericapifilters.WithCacheControl(handler) handler = genericfilters.WithPanicRecovery(handler) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/BUILD index 7728b49129f..96acbf5d3c6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/BUILD @@ -11,8 +11,8 @@ go_library( deps = [ "//pkg/kubectl/cmd/auth:go_default_library", "//pkg/kubectl/cmd/convert:go_default_library", - "//pkg/kubectl/cmd/cp:go_default_library", "//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library", + "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd:go_default_library", @@ -25,6 +25,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/cmd/clusterinfo:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/completion:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/config:go_default_library", + "//staging/src/k8s.io/kubectl/pkg/cmd/cp:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/create:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/delete:go_default_library", "//staging/src/k8s.io/kubectl/pkg/cmd/describe:go_default_library", @@ -55,6 +56,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/cmd/wait:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/i18n:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", + "//staging/src/k8s.io/kubectl/pkg/util/term:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", ], @@ -84,7 +86,6 @@ filegroup( ":package-srcs", "//pkg/kubectl/cmd/auth:all-srcs", "//pkg/kubectl/cmd/convert:all-srcs", - "//pkg/kubectl/cmd/cp:all-srcs", "//pkg/kubectl/cmd/plugin/testdata:all-srcs", ], tags = ["automanaged"], diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/auth/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/auth/BUILD index b9840301ea2..d92dcd07b40 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/auth/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/auth/BUILD @@ -39,7 +39,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/rbac:go_default_library", "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/auth/reconcile.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/auth/reconcile.go index 2e94c9aab42..6514f080355 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/auth/reconcile.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/auth/reconcile.go @@ -22,7 +22,7 @@ import ( "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/klog" + "k8s.io/klog/v2" rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd.go index 98b9a98adc2..f0fced8adb6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd.go @@ -28,6 +28,7 @@ import ( "github.com/spf13/cobra" + "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" cliflag "k8s.io/component-base/cli/flag" cmdpkg "k8s.io/kubectl/pkg/cmd" @@ -40,6 +41,7 @@ import ( "k8s.io/kubectl/pkg/cmd/clusterinfo" "k8s.io/kubectl/pkg/cmd/completion" cmdconfig "k8s.io/kubectl/pkg/cmd/config" + "k8s.io/kubectl/pkg/cmd/cp" "k8s.io/kubectl/pkg/cmd/create" "k8s.io/kubectl/pkg/cmd/delete" "k8s.io/kubectl/pkg/cmd/describe" @@ -69,9 +71,9 @@ import ( "k8s.io/kubectl/pkg/cmd/wait" "k8s.io/kubectl/pkg/util/i18n" "k8s.io/kubectl/pkg/util/templates" + "k8s.io/kubectl/pkg/util/term" "k8s.io/kubernetes/pkg/kubectl/cmd/auth" "k8s.io/kubernetes/pkg/kubectl/cmd/convert" - "k8s.io/kubernetes/pkg/kubectl/cmd/cp" "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/kubectl/pkg/cmd/kustomize" @@ -428,6 +430,9 @@ func HandlePluginCommand(pluginHandler PluginHandler, cmdArgs []string) error { // NewKubectlCommand creates the `kubectl` command and its nested children. func NewKubectlCommand(in io.Reader, out, err io.Writer) *cobra.Command { + warningHandler := rest.NewWarningWriter(err, rest.WarningWriterOptions{Deduplicate: true, Color: term.AllowsColorOutput(err)}) + warningsAsErrors := false + // Parent command to which all subcommands are added. cmds := &cobra.Command{ Use: "kubectl", @@ -441,10 +446,25 @@ func NewKubectlCommand(in io.Reader, out, err io.Writer) *cobra.Command { // Hook before and after Run initialize and write profiles to disk, // respectively. PersistentPreRunE: func(*cobra.Command, []string) error { + rest.SetDefaultWarningHandler(warningHandler) return initProfiling() }, PersistentPostRunE: func(*cobra.Command, []string) error { - return flushProfiling() + if err := flushProfiling(); err != nil { + return err + } + if warningsAsErrors { + count := warningHandler.WarningCount() + switch count { + case 0: + // no warnings + case 1: + return fmt.Errorf("%d warning received", count) + default: + return fmt.Errorf("%d warnings received", count) + } + } + return nil }, BashCompletionFunction: bashCompletionFunc, } @@ -458,6 +478,8 @@ func NewKubectlCommand(in io.Reader, out, err io.Writer) *cobra.Command { addProfilingFlags(flags) + flags.BoolVar(&warningsAsErrors, "warnings-as-errors", warningsAsErrors, "Treat warnings received from the server as errors and exit with a non-zero exit code") + kubeConfigFlags := genericclioptions.NewConfigFlags(true).WithDeprecatedPasswordFlag() kubeConfigFlags.AddFlags(flags) matchVersionKubeConfigFlags := cmdutil.NewMatchVersionFlags(kubeConfigFlags) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/convert/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/convert/BUILD index a7e95ca51f1..5796767e597 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/convert/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/convert/BUILD @@ -37,7 +37,7 @@ go_library( "//staging/src/k8s.io/kubectl/pkg/util/templates:go_default_library", "//staging/src/k8s.io/kubectl/pkg/validation:go_default_library", "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/convert/convert.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/convert/convert.go index 6200fd2ec84..b8460e3ff33 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/convert/convert.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/convert/convert.go @@ -20,7 +20,7 @@ import ( "fmt" "github.com/spf13/cobra" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD index 64106eac63b..7efbf4a6927 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD @@ -13,6 +13,7 @@ go_library( "doc.go", "errors.go", "kubelet.go", + "kubelet_dockershim.go", "kubelet_getters.go", "kubelet_network.go", "kubelet_network_linux.go", @@ -28,6 +29,7 @@ go_library( "reason_cache.go", "runonce.go", "runtime.go", + "time_cache.go", "util.go", "volume_host.go", ], @@ -42,17 +44,19 @@ go_library( "//pkg/apis/core/v1/helper/qos:go_default_library", "//pkg/features:go_default_library", "//pkg/fieldpath:go_default_library", - "//pkg/kubelet/apis:go_default_library", "//pkg/kubelet/apis/config:go_default_library", "//pkg/kubelet/apis/podresources:go_default_library", "//pkg/kubelet/cadvisor:go_default_library", "//pkg/kubelet/certificate:go_default_library", - "//pkg/kubelet/checkpointmanager:go_default_library", "//pkg/kubelet/cloudresource:go_default_library", "//pkg/kubelet/cm:go_default_library", "//pkg/kubelet/config:go_default_library", "//pkg/kubelet/configmap:go_default_library", "//pkg/kubelet/container:go_default_library", + "//pkg/kubelet/cri/remote:go_default_library", + "//pkg/kubelet/cri/streaming:go_default_library", + "//pkg/kubelet/cri/streaming/portforward:go_default_library", + "//pkg/kubelet/cri/streaming/remotecommand:go_default_library", "//pkg/kubelet/dockershim:go_default_library", "//pkg/kubelet/dockershim/remote:go_default_library", "//pkg/kubelet/envvars:go_default_library", @@ -61,6 +65,7 @@ go_library( "//pkg/kubelet/images:go_default_library", "//pkg/kubelet/kubeletconfig:go_default_library", "//pkg/kubelet/kuberuntime:go_default_library", + "//pkg/kubelet/legacy:go_default_library", "//pkg/kubelet/lifecycle:go_default_library", "//pkg/kubelet/logs:go_default_library", "//pkg/kubelet/metrics:go_default_library", @@ -76,15 +81,11 @@ go_library( "//pkg/kubelet/preemption:go_default_library", "//pkg/kubelet/prober:go_default_library", "//pkg/kubelet/prober/results:go_default_library", - "//pkg/kubelet/remote:go_default_library", "//pkg/kubelet/runtimeclass:go_default_library", "//pkg/kubelet/secret:go_default_library", "//pkg/kubelet/server:go_default_library", "//pkg/kubelet/server/metrics:go_default_library", - "//pkg/kubelet/server/portforward:go_default_library", - "//pkg/kubelet/server/remotecommand:go_default_library", "//pkg/kubelet/server/stats:go_default_library", - "//pkg/kubelet/server/streaming:go_default_library", "//pkg/kubelet/stats:go_default_library", "//pkg/kubelet/status:go_default_library", "//pkg/kubelet/sysctl:go_default_library", @@ -145,12 +146,14 @@ go_library( "//third_party/forked/golang/expansion:go_default_library", "//vendor/github.com/golang/groupcache/lru:go_default_library", "//vendor/github.com/google/cadvisor/info/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/github.com/google/cadvisor/info/v2:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/integer:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", "//vendor/k8s.io/utils/path:go_default_library", + "//vendor/k8s.io/utils/strings:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:windows": [ "//pkg/kubelet/winstats:go_default_library", @@ -177,18 +180,20 @@ go_test( "pod_workers_test.go", "reason_cache_test.go", "runonce_test.go", + "time_cache_test.go", ], embed = [":go_default_library"], deps = [ "//pkg/apis/core/install:go_default_library", "//pkg/features:go_default_library", - "//pkg/kubelet/apis:go_default_library", "//pkg/kubelet/cadvisor/testing:go_default_library", "//pkg/kubelet/cm:go_default_library", "//pkg/kubelet/config:go_default_library", "//pkg/kubelet/configmap:go_default_library", "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/container/testing:go_default_library", + "//pkg/kubelet/cri/streaming/portforward:go_default_library", + "//pkg/kubelet/cri/streaming/remotecommand:go_default_library", "//pkg/kubelet/eviction:go_default_library", "//pkg/kubelet/images:go_default_library", "//pkg/kubelet/lifecycle:go_default_library", @@ -202,8 +207,6 @@ go_test( "//pkg/kubelet/prober/results:go_default_library", "//pkg/kubelet/prober/testing:go_default_library", "//pkg/kubelet/secret:go_default_library", - "//pkg/kubelet/server/portforward:go_default_library", - "//pkg/kubelet/server/remotecommand:go_default_library", "//pkg/kubelet/server/stats:go_default_library", "//pkg/kubelet/stats:go_default_library", "//pkg/kubelet/status:go_default_library", @@ -213,7 +216,7 @@ go_test( "//pkg/kubelet/util/queue:go_default_library", "//pkg/kubelet/util/sliceutils:go_default_library", "//pkg/kubelet/volumemanager:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/util/taints:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/awsebs:go_default_library", @@ -250,6 +253,7 @@ go_test( "//staging/src/k8s.io/client-go/util/testing:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", "//staging/src/k8s.io/component-base/version:go_default_library", + "//vendor/github.com/golang/groupcache/lru:go_default_library", "//vendor/github.com/google/cadvisor/info/v1:go_default_library", "//vendor/github.com/google/cadvisor/info/v2:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", @@ -280,7 +284,6 @@ filegroup( "//pkg/kubelet/apis:all-srcs", "//pkg/kubelet/cadvisor:all-srcs", "//pkg/kubelet/certificate:all-srcs", - "//pkg/kubelet/checkpoint:all-srcs", "//pkg/kubelet/checkpointmanager:all-srcs", "//pkg/kubelet/client:all-srcs", "//pkg/kubelet/cloudresource:all-srcs", @@ -288,6 +291,8 @@ filegroup( "//pkg/kubelet/config:all-srcs", "//pkg/kubelet/configmap:all-srcs", "//pkg/kubelet/container:all-srcs", + "//pkg/kubelet/cri/remote:all-srcs", + "//pkg/kubelet/cri/streaming:all-srcs", "//pkg/kubelet/custommetrics:all-srcs", "//pkg/kubelet/dockershim:all-srcs", "//pkg/kubelet/envvars:all-srcs", @@ -297,6 +302,7 @@ filegroup( "//pkg/kubelet/kubeletconfig:all-srcs", "//pkg/kubelet/kuberuntime:all-srcs", "//pkg/kubelet/leaky:all-srcs", + "//pkg/kubelet/legacy:all-srcs", "//pkg/kubelet/lifecycle:all-srcs", "//pkg/kubelet/logs:all-srcs", "//pkg/kubelet/metrics:all-srcs", @@ -310,7 +316,6 @@ filegroup( "//pkg/kubelet/preemption:all-srcs", "//pkg/kubelet/prober:all-srcs", "//pkg/kubelet/qos:all-srcs", - "//pkg/kubelet/remote:all-srcs", "//pkg/kubelet/runtimeclass:all-srcs", "//pkg/kubelet/secret:all-srcs", "//pkg/kubelet/server:all-srcs", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS index 1d6ee7cf65f..5a4a26a1071 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS @@ -4,12 +4,13 @@ approvers: - Random-Liu - dchen1107 - derekwaynecarr -- tallclair - vishh - yujuhong - dashpole +- sjenning reviewers: - sig-node-reviewers +- tallclair labels: - area/kubelet - sig/node diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/BUILD index 38505ce069e..086ad1cc5b5 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/BUILD @@ -8,7 +8,6 @@ load( go_library( name = "go_default_library", srcs = [ - "well_known_annotations.go", "well_known_annotations_windows.go", "well_known_labels.go", ], diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/BUILD index eab836ff812..53d67a8ee21 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/BUILD @@ -21,6 +21,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/component-base/config:go_default_library", ], ) @@ -45,10 +46,16 @@ filegroup( go_test( name = "go_default_test", - srcs = ["helpers_test.go"], + srcs = [ + "helpers_test.go", + "register_test.go", + ], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", + "//staging/src/k8s.io/component-base/config/testing:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/helpers.go index 0217fadb616..49ff40fc546 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/helpers.go @@ -26,5 +26,6 @@ func KubeletConfigurationPathRefs(kc *KubeletConfiguration) []*string { paths = append(paths, &kc.TLSCertFile) paths = append(paths, &kc.TLSPrivateKeyFile) paths = append(paths, &kc.ResolverConfig) + paths = append(paths, &kc.VolumePluginDir) return paths } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/scheme/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/scheme/BUILD index bf40b15a5f0..d1e0439a4dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/scheme/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/scheme/BUILD @@ -30,9 +30,11 @@ filegroup( go_test( name = "go_default_test", srcs = ["scheme_test.go"], + data = glob(["testdata/**"]), embed = [":go_default_library"], deps = [ "//pkg/kubelet/apis/config/fuzzer:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip:go_default_library", + "//staging/src/k8s.io/component-base/config/testing:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/types.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/types.go index cf7fd978d96..92a61d53d30 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/types.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/types.go @@ -19,6 +19,7 @@ package config import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + componentbaseconfig "k8s.io/component-base/config" ) // HairpinMode denotes how the kubelet should configure networking to handle @@ -74,6 +75,9 @@ const ( type KubeletConfiguration struct { metav1.TypeMeta + // enableServer enables Kubelet's secured server. + // Note: Kubelet's insecure port is controlled by the readOnlyPort option. + EnableServer bool // staticPodPath is the path to the directory containing local (static) pods to // run, or the path to a single static pod file. StaticPodPath string @@ -97,6 +101,12 @@ type KubeletConfiguration struct { // readOnlyPort is the read-only port for the Kubelet to serve on with // no authentication/authorization (set to 0 to disable) ReadOnlyPort int32 + // volumePluginDir is the full path of the directory in which to search + // for additional third party volume plugins. + VolumePluginDir string + // providerID, if set, sets the unique id of the instance that an external provider (i.e. cloudprovider) + // can use to identify a specific node + ProviderID string // tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert, // if any, concatenated after server cert). If tlsCertFile and // tlsPrivateKeyFile are not provided, a self-signed certificate @@ -113,8 +123,7 @@ type KubeletConfiguration struct { TLSMinVersion string // rotateCertificates enables client certificate rotation. The Kubelet will request a // new certificate from the certificates.k8s.io API. This requires an approver to approve the - // certificate signing requests. The RotateKubeletClientCertificate feature - // must be enabled. + // certificate signing requests. RotateCertificates bool // serverTLSBootstrap enables server certificate bootstrap. Instead of self // signing a serving certificate, the Kubelet will request a certificate from @@ -238,6 +247,9 @@ type KubeletConfiguration struct { // ResolverConfig is the resolver configuration file used as the basis // for the container DNS resolution configuration. ResolverConfig string + // RunOnce causes the Kubelet to check the API server once for pods, + // run those in addition to the pods specified by static pod files, and exit. + RunOnce bool // cpuCFSQuota enables CPU CFS quota enforcement for containers that // specify CPU limits CPUCFSQuota bool @@ -245,6 +257,8 @@ type KubeletConfiguration struct { CPUCFSQuotaPeriod metav1.Duration // maxOpenFiles is Number of files that can be opened by Kubelet process. MaxOpenFiles int64 + // nodeStatusMaxImages caps the number of images reported in Node.Status.Images. + NodeStatusMaxImages int32 // contentType is contentType of requests sent to apiserver. ContentType string // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver @@ -308,6 +322,13 @@ type KubeletConfiguration struct { // These sysctls are namespaced but not allowed by default. For example: "kernel.msg*,net.ipv4.route.min_pmtu" // +optional AllowedUnsafeSysctls []string + // kernelMemcgNotification if enabled, the kubelet will integrate with the kernel memcg + // notification to determine if memory eviction thresholds are crossed rather than polling. + KernelMemcgNotification bool + // Rootless enables the rootless cgroup manager. + // Requires cgroup v2 and systemd. + // Requires the Rootless feature gate to be enabled. + Rootless bool /* the following fields are meant for Node Allocatable */ @@ -341,6 +362,11 @@ type KubeletConfiguration struct { // The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, // rather than being surprised when they are permanently removed in the release after that. ShowHiddenMetricsForVersion string + // Logging specifies the options of logging. + // Refer [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information. + Logging componentbaseconfig.LoggingConfiguration + // EnableSystemLogHandler enables /logs handler. + EnableSystemLogHandler bool } // KubeletAuthorizationMode denotes the authorization mode for the kubelet @@ -399,7 +425,7 @@ type KubeletWebhookAuthentication struct { CacheTTL metav1.Duration } -// KubeletAnonymousAuthentication enables anonymous requests to the kubetlet server. +// KubeletAnonymousAuthentication enables anonymous requests to the kubelet server. type KubeletAnonymousAuthentication struct { // enabled allows anonymous requests to the kubelet server. // Requests that are not rejected by another authentication method are treated as anonymous requests. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/BUILD index c747871adbc..40aac29fe9c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/BUILD @@ -27,6 +27,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/component-base/config/v1alpha1:go_default_library", "//staging/src/k8s.io/kubelet/config/v1beta1:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/defaults.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/defaults.go index 61daafc113d..5cf26ad7a0d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/defaults.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kruntime "k8s.io/apimachinery/pkg/runtime" + componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1" kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1" // TODO: Cut references to k8s.io/kubernetes, eventually there should be none from this package "k8s.io/kubernetes/pkg/kubelet/qos" @@ -33,6 +34,7 @@ const ( // TODO: Move these constants to k8s.io/kubelet/config/v1beta1 instead? DefaultIPTablesMasqueradeBit = 14 DefaultIPTablesDropBit = 15 + DefaultVolumePluginDir = "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/" ) var ( @@ -47,6 +49,9 @@ func addDefaultingFuncs(scheme *kruntime.Scheme) error { } func SetDefaults_KubeletConfiguration(obj *kubeletconfigv1beta1.KubeletConfiguration) { + if obj.EnableServer == nil { + obj.EnableServer = utilpointer.BoolPtr(true) + } if obj.SyncFrequency == zeroDuration { obj.SyncFrequency = metav1.Duration{Duration: 1 * time.Minute} } @@ -175,6 +180,9 @@ func SetDefaults_KubeletConfiguration(obj *kubeletconfigv1beta1.KubeletConfigura if obj.CPUCFSQuotaPeriod == nil { obj.CPUCFSQuotaPeriod = &metav1.Duration{Duration: 100 * time.Millisecond} } + if obj.NodeStatusMaxImages == nil { + obj.NodeStatusMaxImages = utilpointer.Int32Ptr(50) + } if obj.MaxOpenFiles == 0 { obj.MaxOpenFiles = 1000000 } @@ -223,4 +231,12 @@ func SetDefaults_KubeletConfiguration(obj *kubeletconfigv1beta1.KubeletConfigura if obj.EnforceNodeAllocatable == nil { obj.EnforceNodeAllocatable = DefaultNodeAllocatableEnforcement } + if obj.VolumePluginDir == "" { + obj.VolumePluginDir = DefaultVolumePluginDir + } + // Use the Default LoggingConfiguration option + componentbaseconfigv1alpha1.RecommendedLoggingConfiguration(&obj.Logging) + if obj.EnableSystemLogHandler == nil { + obj.EnableSystemLogHandler = utilpointer.BoolPtr(true) + } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/zz_generated.conversion.go index 0ec24bd53e7..590bf57c8bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/zz_generated.conversion.go @@ -26,6 +26,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" + v1alpha1 "k8s.io/component-base/config/v1alpha1" v1beta1 "k8s.io/kubelet/config/v1beta1" config "k8s.io/kubernetes/pkg/kubelet/apis/config" ) @@ -207,6 +208,9 @@ func Convert_config_KubeletAuthorization_To_v1beta1_KubeletAuthorization(in *con } func autoConvert_v1beta1_KubeletConfiguration_To_config_KubeletConfiguration(in *v1beta1.KubeletConfiguration, out *config.KubeletConfiguration, s conversion.Scope) error { + if err := v1.Convert_Pointer_bool_To_bool(&in.EnableServer, &out.EnableServer, s); err != nil { + return err + } out.StaticPodPath = in.StaticPodPath out.SyncFrequency = in.SyncFrequency out.FileCheckFrequency = in.FileCheckFrequency @@ -280,12 +284,16 @@ func autoConvert_v1beta1_KubeletConfiguration_To_config_KubeletConfiguration(in return err } out.ResolverConfig = in.ResolverConfig + out.RunOnce = in.RunOnce if err := v1.Convert_Pointer_bool_To_bool(&in.CPUCFSQuota, &out.CPUCFSQuota, s); err != nil { return err } if err := v1.Convert_Pointer_v1_Duration_To_v1_Duration(&in.CPUCFSQuotaPeriod, &out.CPUCFSQuotaPeriod, s); err != nil { return err } + if err := v1.Convert_Pointer_int32_To_int32(&in.NodeStatusMaxImages, &out.NodeStatusMaxImages, s); err != nil { + return err + } out.MaxOpenFiles = in.MaxOpenFiles out.ContentType = in.ContentType if err := v1.Convert_Pointer_int32_To_int32(&in.KubeAPIQPS, &out.KubeAPIQPS, s); err != nil { @@ -324,6 +332,7 @@ func autoConvert_v1beta1_KubeletConfiguration_To_config_KubeletConfiguration(in return err } out.ConfigMapAndSecretChangeDetectionStrategy = config.ResourceChangeDetectionStrategy(in.ConfigMapAndSecretChangeDetectionStrategy) + out.Rootless = in.Rootless out.SystemReserved = *(*map[string]string)(unsafe.Pointer(&in.SystemReserved)) out.KubeReserved = *(*map[string]string)(unsafe.Pointer(&in.KubeReserved)) out.ReservedSystemCPUs = in.ReservedSystemCPUs @@ -332,6 +341,15 @@ func autoConvert_v1beta1_KubeletConfiguration_To_config_KubeletConfiguration(in out.KubeReservedCgroup = in.KubeReservedCgroup out.EnforceNodeAllocatable = *(*[]string)(unsafe.Pointer(&in.EnforceNodeAllocatable)) out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls)) + out.VolumePluginDir = in.VolumePluginDir + out.ProviderID = in.ProviderID + out.KernelMemcgNotification = in.KernelMemcgNotification + if err := v1alpha1.Convert_v1alpha1_LoggingConfiguration_To_config_LoggingConfiguration(&in.Logging, &out.Logging, s); err != nil { + return err + } + if err := v1.Convert_Pointer_bool_To_bool(&in.EnableSystemLogHandler, &out.EnableSystemLogHandler, s); err != nil { + return err + } return nil } @@ -341,6 +359,9 @@ func Convert_v1beta1_KubeletConfiguration_To_config_KubeletConfiguration(in *v1b } func autoConvert_config_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in *config.KubeletConfiguration, out *v1beta1.KubeletConfiguration, s conversion.Scope) error { + if err := v1.Convert_bool_To_Pointer_bool(&in.EnableServer, &out.EnableServer, s); err != nil { + return err + } out.StaticPodPath = in.StaticPodPath out.SyncFrequency = in.SyncFrequency out.FileCheckFrequency = in.FileCheckFrequency @@ -350,6 +371,8 @@ func autoConvert_config_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in out.Address = in.Address out.Port = in.Port out.ReadOnlyPort = in.ReadOnlyPort + out.VolumePluginDir = in.VolumePluginDir + out.ProviderID = in.ProviderID out.TLSCertFile = in.TLSCertFile out.TLSPrivateKeyFile = in.TLSPrivateKeyFile out.TLSCipherSuites = *(*[]string)(unsafe.Pointer(&in.TLSCipherSuites)) @@ -414,6 +437,7 @@ func autoConvert_config_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in return err } out.ResolverConfig = in.ResolverConfig + out.RunOnce = in.RunOnce if err := v1.Convert_bool_To_Pointer_bool(&in.CPUCFSQuota, &out.CPUCFSQuota, s); err != nil { return err } @@ -421,6 +445,9 @@ func autoConvert_config_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in return err } out.MaxOpenFiles = in.MaxOpenFiles + if err := v1.Convert_int32_To_Pointer_int32(&in.NodeStatusMaxImages, &out.NodeStatusMaxImages, s); err != nil { + return err + } out.ContentType = in.ContentType if err := v1.Convert_int32_To_Pointer_int32(&in.KubeAPIQPS, &out.KubeAPIQPS, s); err != nil { return err @@ -459,6 +486,8 @@ func autoConvert_config_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in } out.ConfigMapAndSecretChangeDetectionStrategy = v1beta1.ResourceChangeDetectionStrategy(in.ConfigMapAndSecretChangeDetectionStrategy) out.AllowedUnsafeSysctls = *(*[]string)(unsafe.Pointer(&in.AllowedUnsafeSysctls)) + out.KernelMemcgNotification = in.KernelMemcgNotification + out.Rootless = in.Rootless out.SystemReserved = *(*map[string]string)(unsafe.Pointer(&in.SystemReserved)) out.KubeReserved = *(*map[string]string)(unsafe.Pointer(&in.KubeReserved)) out.SystemReservedCgroup = in.SystemReservedCgroup @@ -466,6 +495,12 @@ func autoConvert_config_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in out.EnforceNodeAllocatable = *(*[]string)(unsafe.Pointer(&in.EnforceNodeAllocatable)) out.ReservedSystemCPUs = in.ReservedSystemCPUs out.ShowHiddenMetricsForVersion = in.ShowHiddenMetricsForVersion + if err := v1alpha1.Convert_config_LoggingConfiguration_To_v1alpha1_LoggingConfiguration(&in.Logging, &out.Logging, s); err != nil { + return err + } + if err := v1.Convert_bool_To_Pointer_bool(&in.EnableSystemLogHandler, &out.EnableSystemLogHandler, s); err != nil { + return err + } return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/BUILD index 36bb98442ff..447b9d3b1a5 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/BUILD @@ -22,6 +22,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//staging/src/k8s.io/component-base/logs:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation.go index 03681306850..9afa64205e0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation.go @@ -23,6 +23,7 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" utilvalidation "k8s.io/apimachinery/pkg/util/validation" utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/component-base/logs" "k8s.io/component-base/metrics" "k8s.io/kubernetes/pkg/features" kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" @@ -83,6 +84,9 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error if kc.KubeAPIQPS < 0 { allErrors = append(allErrors, fmt.Errorf("invalid configuration: KubeAPIQPS (--kube-api-qps) %v must not be a negative number", kc.KubeAPIQPS)) } + if kc.NodeStatusMaxImages < -1 { + allErrors = append(allErrors, fmt.Errorf("invalid configuration: NodeStatusMaxImages (--node-status-max-images) must be -1 or greater")) + } if kc.MaxOpenFiles < 0 { allErrors = append(allErrors, fmt.Errorf("invalid configuration: MaxOpenFiles (--max-open-files) %v must not be a negative number", kc.MaxOpenFiles)) } @@ -107,9 +111,6 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error if kc.RegistryPullQPS < 0 { allErrors = append(allErrors, fmt.Errorf("invalid configuration: RegistryPullQPS (--registry-qps) %v must not be a negative number", kc.RegistryPullQPS)) } - if kc.RotateCertificates && !localFeatureGate.Enabled(features.RotateKubeletClientCertificate) { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: RotateCertificates %v requires feature gate RotateKubeletClientCertificate", kc.RotateCertificates)) - } if kc.ServerTLSBootstrap && !localFeatureGate.Enabled(features.RotateKubeletServerCertificate) { allErrors = append(allErrors, fmt.Errorf("invalid configuration: ServerTLSBootstrap %v requires feature gate RotateKubeletServerCertificate", kc.ServerTLSBootstrap)) } @@ -158,5 +159,12 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error allErrors = append(allErrors, err) } allErrors = append(allErrors, metrics.ValidateShowHiddenMetricsVersion(kc.ShowHiddenMetricsForVersion)...) + + logOption := logs.NewOptions() + if kc.Logging.Format != "" { + logOption.LogFormat = kc.Logging.Format + } + allErrors = append(allErrors, logOption.Validate()...) + return utilerrors.NewAggregate(allErrors) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/zz_generated.deepcopy.go index 35acde4a0d6..87b3969325c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/zz_generated.deepcopy.go @@ -185,6 +185,7 @@ func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) { *out = make([]string, len(*in)) copy(*out, *in) } + out.Logging = in.Logging return } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/resourcemetrics/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/resourcemetrics/v1alpha1/BUILD index fc194ac2ba1..97ae7c573e0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/resourcemetrics/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/resourcemetrics/v1alpha1/BUILD @@ -5,11 +5,6 @@ go_library( srcs = ["config.go"], importpath = "k8s.io/kubernetes/pkg/kubelet/apis/resourcemetrics/v1alpha1", visibility = ["//visibility:public"], - deps = [ - "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", - "//pkg/kubelet/server/stats:go_default_library", - "//staging/src/k8s.io/component-base/metrics:go_default_library", - ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/resourcemetrics/v1alpha1/config.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/resourcemetrics/v1alpha1/config.go index 54d6fc21daa..6f0799cfa28 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/resourcemetrics/v1alpha1/config.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/resourcemetrics/v1alpha1/config.go @@ -16,110 +16,8 @@ limitations under the License. package v1alpha1 -import ( - "time" - - "k8s.io/component-base/metrics" - summary "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1" - "k8s.io/kubernetes/pkg/kubelet/server/stats" -) - -// This file contains a series of deprecated metrics which we emit them by endpoint `/metrics/resource/v1alpha1`. -// These metrics have been adapted to new endpoint `/metrics/resource` as well as new `Desc`s. -// In general, we don't need to maintain these deprecated metrics any more. -// TODO(RainbowMango): Remove this file in release 1.20.0+. +// TODO(RainbowMango): We don't need to maintain this package anymore. +// This package will be remove in release 1.20.0+. More details please refer to https://github.com/kubernetes/kubernetes/pull/86282. // Version is the string representation of the version of this configuration const Version = "v1alpha1" - -var ( - nodeCPUUsageDesc = metrics.NewDesc("node_cpu_usage_seconds_total", - "Cumulative cpu time consumed by the node in core-seconds", - nil, - nil, - metrics.ALPHA, - "1.18.0") - - nodeMemoryUsageDesc = metrics.NewDesc("node_memory_working_set_bytes", - "Current working set of the node in bytes", - nil, - nil, - metrics.ALPHA, - "1.18.0") - - containerCPUUsageDesc = metrics.NewDesc("container_cpu_usage_seconds_total", - "Cumulative cpu time consumed by the container in core-seconds", - []string{"container", "pod", "namespace"}, - nil, - metrics.ALPHA, - "1.18.0") - - containerMemoryUsageDesc = metrics.NewDesc("container_memory_working_set_bytes", - "Current working set of the container in bytes", - []string{"container", "pod", "namespace"}, - nil, - metrics.ALPHA, - "1.18.0") -) - -// getNodeCPUMetrics returns CPU utilization of a node. -func getNodeCPUMetrics(s summary.NodeStats) (*float64, time.Time) { - if s.CPU == nil { - return nil, time.Time{} - } - v := float64(*s.CPU.UsageCoreNanoSeconds) / float64(time.Second) - return &v, s.CPU.Time.Time -} - -// getNodeMemoryMetrics returns memory utilization of a node. -func getNodeMemoryMetrics(s summary.NodeStats) (*float64, time.Time) { - if s.Memory == nil { - return nil, time.Time{} - } - v := float64(*s.Memory.WorkingSetBytes) - return &v, s.Memory.Time.Time -} - -// getContainerCPUMetrics returns CPU utilization of a container. -func getContainerCPUMetrics(s summary.ContainerStats) (*float64, time.Time) { - if s.CPU == nil { - return nil, time.Time{} - } - v := float64(*s.CPU.UsageCoreNanoSeconds) / float64(time.Second) - return &v, s.CPU.Time.Time -} - -// getContainerMemoryMetrics returns memory utilization of a container. -func getContainerMemoryMetrics(s summary.ContainerStats) (*float64, time.Time) { - if s.Memory == nil { - return nil, time.Time{} - } - v := float64(*s.Memory.WorkingSetBytes) - return &v, s.Memory.Time.Time -} - -// Config is the v1alpha1 resource metrics definition -func Config() stats.ResourceMetricsConfig { - return stats.ResourceMetricsConfig{ - NodeMetrics: []stats.NodeResourceMetric{ - { - Desc: nodeCPUUsageDesc, - ValueFn: getNodeCPUMetrics, - }, - { - Desc: nodeMemoryUsageDesc, - ValueFn: getNodeMemoryMetrics, - }, - }, - ContainerMetrics: []stats.ContainerResourceMetric{ - { - Desc: containerCPUUsageDesc, - ValueFn: getContainerCPUMetrics, - }, - { - Desc: containerMemoryUsageDesc, - ValueFn: getContainerMemoryMetrics, - }, - }, - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1/types.go index afec6d0cf9f..50622f5170e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1/types.go @@ -91,6 +91,13 @@ const ( SystemContainerPods = "pods" ) +// ProcessStats are stats pertaining to processes. +type ProcessStats struct { + // Number of processes + // +optional + ProcessCount *uint64 `json:"process_count,omitempty"` +} + // PodStats holds pod-level unprocessed sample stats. type PodStats struct { // Reference to the measured Pod. @@ -119,6 +126,9 @@ type PodStats struct { // EphemeralStorage reports the total filesystem usage for the containers and emptyDir-backed volumes in the measured Pod. // +optional EphemeralStorage *FsStats `json:"ephemeral-storage,omitempty"` + // ProcessStats pertaining to processes. + // +optional + ProcessStats *ProcessStats `json:"process_stats,omitempty"` } // ContainerStats holds container-level unprocessed sample stats. @@ -252,7 +262,7 @@ type AcceleratorStats struct { // VolumeStats contains data about Volume filesystem usage. type VolumeStats struct { // Embedded FsStats - FsStats + FsStats `json:",inline"` // Name is the name given to the Volume // +optional Name string `json:"name,omitempty"` diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/well_known_labels.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/well_known_labels.go index a38ad13b545..1472f692080 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/well_known_labels.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/well_known_labels.go @@ -25,14 +25,10 @@ import ( const ( // LabelOS is a label to indicate the operating system of the node. - // The OS labels are promoted to GA in 1.14. kubelet applies both beta - // and GA labels to ensure backward compatibility. - // TODO: stop applying the beta OS labels in Kubernetes 1.18. + // The OS labels are promoted to GA in 1.14. kubelet applies GA labels and stop applying the beta OS labels in Kubernetes 1.19. LabelOS = "beta.kubernetes.io/os" // LabelArch is a label to indicate the architecture of the node. - // The Arch labels are promoted to GA in 1.14. kubelet applies both beta - // and GA labels to ensure backward compatibility. - // TODO: stop applying the beta Arch labels in Kubernetes 1.18. + // The Arch labels are promoted to GA in 1.14. kubelet applies GA labels and stop applying the beta Arch labels in Kubernetes 1.19. LabelArch = "beta.kubernetes.io/arch" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/BUILD index f3d64675cee..673068e7f78 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/BUILD @@ -10,6 +10,7 @@ go_library( name = "go_default_library", srcs = [ "cadvisor_linux.go", + "cadvisor_linux_docker.go", "cadvisor_unsupported.go", "cadvisor_windows.go", "doc.go", @@ -29,6 +30,8 @@ go_library( "//vendor/github.com/google/cadvisor/info/v2:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:android": [ + "//pkg/features:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//vendor/github.com/google/cadvisor/cache/memory:go_default_library", "//vendor/github.com/google/cadvisor/container:go_default_library", "//vendor/github.com/google/cadvisor/container/containerd/install:go_default_library", @@ -41,9 +44,12 @@ go_library( "//vendor/github.com/google/cadvisor/utils/cloudinfo/azure:go_default_library", "//vendor/github.com/google/cadvisor/utils/cloudinfo/gce:go_default_library", "//vendor/github.com/google/cadvisor/utils/sysfs:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ + "//pkg/features:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//vendor/github.com/google/cadvisor/cache/memory:go_default_library", "//vendor/github.com/google/cadvisor/container:go_default_library", "//vendor/github.com/google/cadvisor/container/containerd/install:go_default_library", @@ -56,7 +62,8 @@ go_library( "//vendor/github.com/google/cadvisor/utils/cloudinfo/azure:go_default_library", "//vendor/github.com/google/cadvisor/utils/cloudinfo/gce:go_default_library", "//vendor/github.com/google/cadvisor/utils/sysfs:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", ], "@io_bazel_rules_go//go/platform:windows": [ "//pkg/kubelet/winstats:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux.go index 2c3535de4d1..26b4ba0b5e6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux.go @@ -29,7 +29,6 @@ import ( // Register supported container handlers. _ "github.com/google/cadvisor/container/containerd/install" _ "github.com/google/cadvisor/container/crio/install" - _ "github.com/google/cadvisor/container/docker/install" _ "github.com/google/cadvisor/container/systemd/install" "github.com/google/cadvisor/cache/memory" @@ -39,7 +38,10 @@ import ( cadvisorapiv2 "github.com/google/cadvisor/info/v2" "github.com/google/cadvisor/manager" "github.com/google/cadvisor/utils/sysfs" - "k8s.io/klog" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/klog/v2" + kubefeatures "k8s.io/kubernetes/pkg/features" + "k8s.io/utils/pointer" ) type cadvisorClient struct { @@ -90,12 +92,18 @@ func New(imageFsInfoProvider ImageFsInfoProvider, rootPath string, cgroupRoots [ cadvisormetrics.AppMetrics: struct{}{}, cadvisormetrics.ProcessMetrics: struct{}{}, } - if usingLegacyStats { + if usingLegacyStats || utilfeature.DefaultFeatureGate.Enabled(kubefeatures.LocalStorageCapacityIsolation) { includedMetrics[cadvisormetrics.DiskUsageMetrics] = struct{}{} } + duration := maxHousekeepingInterval + housekeepingConfig := manager.HouskeepingConfig{ + Interval: &duration, + AllowDynamic: pointer.BoolPtr(allowDynamicHousekeeping), + } + // Create the cAdvisor container manager. - m, err := manager.New(memory.New(statsCacheDuration, nil), sysFs, maxHousekeepingInterval, allowDynamicHousekeeping, includedMetrics, http.DefaultClient, cgroupRoots) + m, err := manager.New(memory.New(statsCacheDuration, nil), sysFs, housekeepingConfig, includedMetrics, http.DefaultClient, cgroupRoots, "") if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux_docker.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux_docker.go new file mode 100644 index 00000000000..46802f7c52f --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux_docker.go @@ -0,0 +1,25 @@ +// +build linux,!dockerless + +/* +Copyright 2020 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 cadvisor + +import ( + // We only want to perform this docker specific cadvisor init when we are not + // using the `dockerless` build tag. + _ "github.com/google/cadvisor/container/docker/install" +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_unsupported.go index 4fd923e9fe7..36ac4d547f4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_unsupported.go @@ -54,6 +54,10 @@ func (cu *cadvisorUnsupported) ContainerInfoV2(name string, options cadvisorapiv return nil, errUnsupported } +func (cu *cadvisorUnsupported) GetRequestedContainersInfo(containerName string, options cadvisorapiv2.RequestOptions) (map[string]*cadvisorapi.ContainerInfo, error) { + return nil, errUnsupported +} + func (cu *cadvisorUnsupported) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error) { return nil, errUnsupported } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_windows.go index 2ef909762fe..b6b1407ac9c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_windows.go @@ -58,6 +58,10 @@ func (cu *cadvisorClient) ContainerInfoV2(name string, options cadvisorapiv2.Req return cu.winStatsClient.WinContainerInfos() } +func (cu *cadvisorClient) GetRequestedContainersInfo(containerName string, options cadvisorapiv2.RequestOptions) (map[string]*cadvisorapi.ContainerInfo, error) { + return nil, nil +} + func (cu *cadvisorClient) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error) { return nil, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/types.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/types.go index 72ffcec23d4..be1f478a4c7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/types.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/types.go @@ -28,6 +28,7 @@ type Interface interface { DockerContainer(name string, req *cadvisorapi.ContainerInfoRequest) (cadvisorapi.ContainerInfo, error) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) + GetRequestedContainersInfo(containerName string, options cadvisorapiv2.RequestOptions) (map[string]*cadvisorapi.ContainerInfo, error) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error) MachineInfo() (*cadvisorapi.MachineInfo, error) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/BUILD index d61c8184961..cf75b4e7f5a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/BUILD @@ -16,19 +16,18 @@ go_library( deps = [ "//pkg/kubelet/apis/config:go_default_library", "//pkg/kubelet/metrics:go_default_library", - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/util/certificate:go_default_library", "//staging/src/k8s.io/client-go/util/connrotation:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap/BUILD index b27bf57f02b..64a57490866 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap/BUILD @@ -11,12 +11,16 @@ go_test( srcs = ["bootstrap_test.go"], embed = [":go_default_library"], deps = [ - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", + "//staging/src/k8s.io/client-go/testing:go_default_library", "//staging/src/k8s.io/client-go/util/keyutil:go_default_library", ], ) @@ -26,12 +30,12 @@ go_library( srcs = ["bootstrap.go"], importpath = "k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap", deps = [ - "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd:go_default_library", "//staging/src/k8s.io/client-go/tools/clientcmd/api:go_default_library", @@ -40,7 +44,7 @@ go_library( "//staging/src/k8s.io/client-go/util/certificate:go_default_library", "//staging/src/k8s.io/client-go/util/certificate/csr:go_default_library", "//staging/src/k8s.io/client-go/util/keyutil:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap/bootstrap.go b/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap/bootstrap.go index dda60479d95..f6b129dc869 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap/bootstrap.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap/bootstrap.go @@ -29,14 +29,14 @@ import ( "path/filepath" "time" - "k8s.io/klog" + "k8s.io/klog/v2" - certificates "k8s.io/api/certificates/v1beta1" + certificatesv1 "k8s.io/api/certificates/v1" "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" + clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/scheme" - certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" restclient "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" @@ -105,7 +105,7 @@ func LoadClientConfig(kubeconfigPath, bootstrapPath, certDir string) (certConfig // The kubeconfig at bootstrapPath is used to request a client certificate from the API server. // On success, a kubeconfig file referencing the generated key and obtained certificate is written to kubeconfigPath. // The certificate and key file are stored in certDir. -func LoadClientCert(kubeconfigPath, bootstrapPath, certDir string, nodeName types.NodeName) error { +func LoadClientCert(ctx context.Context, kubeconfigPath, bootstrapPath, certDir string, nodeName types.NodeName) error { // Short-circuit if the kubeconfig file exists and is valid. ok, err := isClientConfigStillValid(kubeconfigPath) if err != nil { @@ -123,7 +123,7 @@ func LoadClientCert(kubeconfigPath, bootstrapPath, certDir string, nodeName type return fmt.Errorf("unable to load bootstrap kubeconfig: %v", err) } - bootstrapClient, err := certificatesv1beta1.NewForConfig(bootstrapClientConfig) + bootstrapClient, err := clientset.NewForConfig(bootstrapClientConfig) if err != nil { return fmt.Errorf("unable to create certificates signing request client: %v", err) } @@ -156,11 +156,11 @@ func LoadClientCert(kubeconfigPath, bootstrapPath, certDir string, nodeName type } } - if err := waitForServer(*bootstrapClientConfig, 1*time.Minute); err != nil { + if err := waitForServer(ctx, *bootstrapClientConfig, 1*time.Minute); err != nil { klog.Warningf("Error waiting for apiserver to come up: %v", err) } - certData, err := requestNodeCertificate(bootstrapClient.CertificateSigningRequests(), keyData, nodeName) + certData, err := requestNodeCertificate(ctx, bootstrapClient, keyData, nodeName) if err != nil { return err } @@ -278,7 +278,7 @@ func verifyKeyData(data []byte) bool { return err == nil } -func waitForServer(cfg restclient.Config, deadline time.Duration) error { +func waitForServer(ctx context.Context, cfg restclient.Config, deadline time.Duration) error { cfg.NegotiatedSerializer = scheme.Codecs.WithoutConversion() cfg.Timeout = 1 * time.Second cli, err := restclient.UnversionedRESTClientFor(&cfg) @@ -286,12 +286,12 @@ func waitForServer(cfg restclient.Config, deadline time.Duration) error { return fmt.Errorf("couldn't create client: %v", err) } - ctx, cancel := context.WithTimeout(context.TODO(), deadline) + ctx, cancel := context.WithTimeout(ctx, deadline) defer cancel() var connected bool wait.JitterUntil(func() { - if _, err := cli.Get().AbsPath("/healthz").Do(context.TODO()).Raw(); err != nil { + if _, err := cli.Get().AbsPath("/healthz").Do(ctx).Raw(); err != nil { klog.Infof("Failed to connect to apiserver: %v", err) return } @@ -312,7 +312,7 @@ func waitForServer(cfg restclient.Config, deadline time.Duration) error { // certificate (pem-encoded). If there is any errors, or the watch timeouts, it // will return an error. This is intended for use on nodes (kubelet and // kubeadm). -func requestNodeCertificate(client certificatesv1beta1.CertificateSigningRequestInterface, privateKeyData []byte, nodeName types.NodeName) (certData []byte, err error) { +func requestNodeCertificate(ctx context.Context, client clientset.Interface, privateKeyData []byte, nodeName types.NodeName) (certData []byte, err error) { subject := &pkix.Name{ Organization: []string{"system:nodes"}, CommonName: "system:node:" + string(nodeName), @@ -327,10 +327,10 @@ func requestNodeCertificate(client certificatesv1beta1.CertificateSigningRequest return nil, fmt.Errorf("unable to generate certificate request: %v", err) } - usages := []certificates.KeyUsage{ - certificates.UsageDigitalSignature, - certificates.UsageKeyEncipherment, - certificates.UsageClientAuth, + usages := []certificatesv1.KeyUsage{ + certificatesv1.UsageDigitalSignature, + certificatesv1.UsageKeyEncipherment, + certificatesv1.UsageClientAuth, } // The Signer interface contains the Public() method to get the public key. @@ -344,16 +344,16 @@ func requestNodeCertificate(client certificatesv1beta1.CertificateSigningRequest return nil, err } - req, err := csr.RequestCertificate(client, csrData, name, certificates.KubeAPIServerClientKubeletSignerName, usages, privateKey) + reqName, reqUID, err := csr.RequestCertificate(client, csrData, name, certificatesv1.KubeAPIServerClientKubeletSignerName, usages, privateKey) if err != nil { return nil, err } - ctx, cancel := context.WithTimeout(context.Background(), 3600*time.Second) + ctx, cancel := context.WithTimeout(ctx, 3600*time.Second) defer cancel() klog.V(2).Infof("Waiting for client certificate to be issued") - return csr.WaitForCertificate(ctx, client, req) + return csr.WaitForCertificate(ctx, client, reqName, reqUID) } // This digest should include all the relevant pieces of the CSR we care about. @@ -361,7 +361,7 @@ func requestNodeCertificate(client certificatesv1beta1.CertificateSigningRequest // regenerate every loop and we include usages which are not contained in the // CSR. This needs to be kept up to date as we add new fields to the node // certificates and with ensureCompatible. -func digestedName(publicKey interface{}, subject *pkix.Name, usages []certificates.KeyUsage) (string, error) { +func digestedName(publicKey interface{}, subject *pkix.Name, usages []certificatesv1.KeyUsage) (string, error) { hash := sha512.New512_256() // Here we make sure two different inputs can't write the same stream diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/kubelet.go b/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/kubelet.go index 8c3b26523cd..af2d21717dc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/kubelet.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/kubelet.go @@ -26,11 +26,10 @@ import ( "sort" "time" - certificates "k8s.io/api/certificates/v1beta1" + certificates "k8s.io/api/certificates/v1" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" clientset "k8s.io/client-go/kubernetes" - certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" "k8s.io/client-go/util/certificate" compbasemetrics "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" @@ -41,9 +40,11 @@ import ( // NewKubeletServerCertificateManager creates a certificate manager for the kubelet when retrieving a server certificate // or returns an error. func NewKubeletServerCertificateManager(kubeClient clientset.Interface, kubeCfg *kubeletconfig.KubeletConfiguration, nodeName types.NodeName, getAddresses func() []v1.NodeAddress, certDirectory string) (certificate.Manager, error) { - var certSigningRequestClient certificatesclient.CertificateSigningRequestInterface - if kubeClient != nil && kubeClient.CertificatesV1beta1() != nil { - certSigningRequestClient = kubeClient.CertificatesV1beta1().CertificateSigningRequests() + var clientsetFn certificate.ClientsetFunc + if kubeClient != nil { + clientsetFn = func(current *tls.Certificate) (clientset.Interface, error) { + return kubeClient, nil + } } certificateStore, err := certificate.NewFileStore( "kubelet-server", @@ -103,9 +104,7 @@ func NewKubeletServerCertificateManager(kubeClient clientset.Interface, kubeCfg } m, err := certificate.NewManager(&certificate.Config{ - ClientFn: func(current *tls.Certificate) (certificatesclient.CertificateSigningRequestInterface, error) { - return certSigningRequestClient, nil - }, + ClientsetFn: clientsetFn, GetTemplate: getTemplate, SignerName: certificates.KubeletServingSignerName, Usages: []certificates.KeyUsage{ @@ -142,7 +141,7 @@ func NewKubeletServerCertificateManager(kubeClient clientset.Interface, kubeCfg }, func() float64 { if c := m.Current(); c != nil && c.Leaf != nil { - return c.Leaf.NotAfter.Sub(time.Now()).Seconds() + return math.Trunc(c.Leaf.NotAfter.Sub(time.Now()).Seconds()) } return math.Inf(1) }, @@ -198,7 +197,7 @@ func NewKubeletClientCertificateManager( bootstrapKeyData []byte, certFile string, keyFile string, - clientFn certificate.CSRClientFunc, + clientsetFn certificate.ClientsetFunc, ) (certificate.Manager, error) { certificateStore, err := certificate.NewFileStore( @@ -210,16 +209,6 @@ func NewKubeletClientCertificateManager( if err != nil { return nil, fmt.Errorf("failed to initialize client certificate store: %v", err) } - var certificateExpiration = compbasemetrics.NewGauge( - &compbasemetrics.GaugeOpts{ - Namespace: metrics.KubeletSubsystem, - Subsystem: "certificate_manager", - Name: "client_expiration_seconds", - Help: "Gauge of the lifetime of a certificate. The value is the date the certificate will expire in seconds since January 1, 1970 UTC.", - StabilityLevel: compbasemetrics.ALPHA, - }, - ) - legacyregistry.Register(certificateExpiration) var certificateRenewFailure = compbasemetrics.NewCounter( &compbasemetrics.CounterOpts{ Namespace: metrics.KubeletSubsystem, @@ -232,7 +221,7 @@ func NewKubeletClientCertificateManager( legacyregistry.Register(certificateRenewFailure) m, err := certificate.NewManager(&certificate.Config{ - ClientFn: clientFn, + ClientsetFn: clientsetFn, Template: &x509.CertificateRequest{ Subject: pkix.Name{ CommonName: fmt.Sprintf("system:node:%s", nodeName), @@ -269,5 +258,6 @@ func NewKubeletClientCertificateManager( if err != nil { return nil, fmt.Errorf("failed to initialize client certificate manager: %v", err) } + return m, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/transport.go b/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/transport.go index 261c4a53608..d19c4ecbcec 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/transport.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/transport.go @@ -23,7 +23,7 @@ import ( "net/http" "time" - "k8s.io/klog" + "k8s.io/klog/v2" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/wait" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/checkpoint/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/checkpoint/BUILD deleted file mode 100644 index d8d1fe7fd30..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/checkpoint/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["checkpoint.go"], - importpath = "k8s.io/kubernetes/pkg/kubelet/checkpoint", - visibility = ["//visibility:public"], - deps = [ - "//pkg/apis/core:go_default_library", - "//pkg/kubelet/checkpointmanager:go_default_library", - "//pkg/kubelet/checkpointmanager/checksum:go_default_library", - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["checkpoint_test.go"], - embed = [":go_default_library"], - deps = [ - "//pkg/apis/core:go_default_library", - "//pkg/kubelet/checkpointmanager:go_default_library", - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/checkpoint/checkpoint.go b/vendor/k8s.io/kubernetes/pkg/kubelet/checkpoint/checkpoint.go deleted file mode 100644 index 17036e3b765..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/checkpoint/checkpoint.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2017 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 checkpoint - -import ( - "encoding/json" - "fmt" - - "k8s.io/klog" - - "k8s.io/api/core/v1" - "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" - "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/checksum" -) - -const ( - // Delimiter used on checkpoints written to disk - delimiter = "_" - podPrefix = "Pod" -) - -// PodCheckpoint defines the operations to retrieve pod -type PodCheckpoint interface { - checkpointmanager.Checkpoint - GetPod() *v1.Pod -} - -// Data to be stored as checkpoint -type Data struct { - Pod *v1.Pod - Checksum checksum.Checksum -} - -// NewPodCheckpoint returns new pod checkpoint -func NewPodCheckpoint(pod *v1.Pod) PodCheckpoint { - return &Data{Pod: pod} -} - -// MarshalCheckpoint returns marshalled data -func (cp *Data) MarshalCheckpoint() ([]byte, error) { - cp.Checksum = checksum.New(*cp.Pod) - return json.Marshal(*cp) -} - -// UnmarshalCheckpoint returns unmarshalled data -func (cp *Data) UnmarshalCheckpoint(blob []byte) error { - return json.Unmarshal(blob, cp) -} - -// VerifyChecksum verifies that passed checksum is same as calculated checksum -func (cp *Data) VerifyChecksum() error { - return cp.Checksum.Verify(*cp.Pod) -} - -// GetPod retrieves the pod from the checkpoint -func (cp *Data) GetPod() *v1.Pod { - return cp.Pod -} - -// checkAnnotations will validate the checkpoint annotations exist on the Pod -func checkAnnotations(pod *v1.Pod) bool { - if podAnnotations := pod.GetAnnotations(); podAnnotations != nil { - if podAnnotations[core.BootstrapCheckpointAnnotationKey] == "true" { - return true - } - } - return false -} - -//getPodKey returns the full qualified path for the pod checkpoint -func getPodKey(pod *v1.Pod) string { - return fmt.Sprintf("%s%s%v.yaml", podPrefix, delimiter, pod.GetUID()) -} - -// LoadPods Loads All Checkpoints from disk -func LoadPods(cpm checkpointmanager.CheckpointManager) ([]*v1.Pod, error) { - pods := make([]*v1.Pod, 0) - - checkpointKeys, err := cpm.ListCheckpoints() - if err != nil { - klog.Errorf("Failed to list checkpoints: %v", err) - } - - for _, key := range checkpointKeys { - checkpoint := NewPodCheckpoint(nil) - err := cpm.GetCheckpoint(key, checkpoint) - if err != nil { - klog.Errorf("Failed to retrieve checkpoint for pod %q: %v", key, err) - continue - } - pods = append(pods, checkpoint.GetPod()) - } - return pods, nil -} - -// WritePod a checkpoint to a file on disk if annotation is present -func WritePod(cpm checkpointmanager.CheckpointManager, pod *v1.Pod) error { - var err error - if checkAnnotations(pod) { - data := NewPodCheckpoint(pod) - err = cpm.CreateCheckpoint(getPodKey(pod), data) - } else { - // This is to handle an edge where a pod update could remove - // an annotation and the checkpoint should then be removed. - err = cpm.RemoveCheckpoint(getPodKey(pod)) - } - return err -} - -// DeletePod deletes a checkpoint from disk if present -func DeletePod(cpm checkpointmanager.CheckpointManager, pod *v1.Pod) error { - return cpm.RemoveCheckpoint(getPodKey(pod)) -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client.go b/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client.go index eb0f332ba0f..d14249962a6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client.go @@ -42,9 +42,6 @@ type KubeletClientConfig struct { // ReadOnlyPort specifies the Port for ReadOnly communications. ReadOnlyPort uint - // EnableHTTPs specifies if traffic should be encrypted. - EnableHTTPS bool - // PreferredAddressTypes - used to select an address from Node.NodeStatus.Addresses PreferredAddressTypes []string @@ -144,7 +141,7 @@ func (c *KubeletClientConfig) transportConfig() *transport.Config { }, BearerToken: c.BearerToken, } - if c.EnableHTTPS && !cfg.HasCA() { + if !cfg.HasCA() { cfg.TLS.Insecure = true } return cfg @@ -181,11 +178,6 @@ type NodeConnectionInfoGetter struct { // NewNodeConnectionInfoGetter creates a new NodeConnectionInfoGetter. func NewNodeConnectionInfoGetter(nodes NodeGetter, config KubeletClientConfig) (ConnectionInfoGetter, error) { - scheme := "http" - if config.EnableHTTPS { - scheme = "https" - } - transport, err := MakeTransport(&config) if err != nil { return nil, err @@ -202,7 +194,7 @@ func NewNodeConnectionInfoGetter(nodes NodeGetter, config KubeletClientConfig) ( return &NodeConnectionInfoGetter{ nodes: nodes, - scheme: scheme, + scheme: "https", defaultPort: int(config.Port), transport: transport, insecureSkipTLSVerifyTransport: insecureSkipTLSVerifyTransport, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cloudresource/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cloudresource/BUILD index 8de49d6aca8..1f5a1e5fbf5 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cloudresource/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cloudresource/BUILD @@ -10,7 +10,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cloudresource/cloud_request_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cloudresource/cloud_request_manager.go index 879e131e375..889c29b1907 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cloudresource/cloud_request_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cloudresource/cloud_request_manager.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" ) // SyncManager is an interface for making requests to a cloud provider diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/BUILD index 723197f1dd3..0dc99bc343b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/BUILD @@ -36,21 +36,26 @@ go_library( "//pkg/kubelet/lifecycle:go_default_library", "//pkg/kubelet/pluginmanager/cache:go_default_library", "//pkg/kubelet/status:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//pkg/kubelet/cadvisor:go_default_library", + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/utils/mount:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//pkg/api/v1/resource:go_default_library", "//pkg/apis/core/v1/helper:go_default_library", "//pkg/apis/core/v1/helper/qos:go_default_library", "//pkg/kubelet/cadvisor:go_default_library", - "//pkg/kubelet/cm/cpumanager/containermap:go_default_library", + "//pkg/kubelet/cm/containermap:go_default_library", "//pkg/kubelet/cm/cpumanager/topology:go_default_library", "//pkg/kubelet/cm/devicemanager:go_default_library", "//pkg/kubelet/cm/util:go_default_library", @@ -70,6 +75,7 @@ go_library( "//vendor/github.com/docker/go-units:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs:go_default_library", + "//vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/configs:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/system:go_default_library", @@ -92,17 +98,27 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/kubelet/cadvisor:go_default_library", + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/utils/mount:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/cadvisor:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//pkg/kubelet/cadvisor:go_default_library", + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/utils/mount:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//pkg/api/v1/resource:go_default_library", "//pkg/apis/core/v1/helper:go_default_library", "//pkg/apis/core/v1/helper/qos:go_default_library", "//pkg/kubelet/cadvisor:go_default_library", - "//pkg/kubelet/cm/cpumanager/containermap:go_default_library", + "//pkg/kubelet/cm/containermap:go_default_library", "//pkg/kubelet/cm/cpumanager/topology:go_default_library", "//pkg/kubelet/cm/devicemanager:go_default_library", "//pkg/kubelet/cm/util:go_default_library", @@ -122,6 +138,7 @@ go_library( "//vendor/github.com/docker/go-units:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs:go_default_library", + "//vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/configs:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/system:go_default_library", @@ -183,6 +200,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", + "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", @@ -195,6 +213,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", + "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", @@ -214,6 +233,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", + "//pkg/kubelet/cm/containermap:all-srcs", "//pkg/kubelet/cm/cpumanager:all-srcs", "//pkg/kubelet/cm/cpuset:all-srcs", "//pkg/kubelet/cm/devicemanager:all-srcs", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/OWNERS index 84117d262fd..94a3d54d2bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/OWNERS @@ -4,11 +4,9 @@ approvers: - Random-Liu - dchen1107 - derekwaynecarr -- tallclair - vishh - yujuhong - ConnorDoyle -- sjenning - klueska reviewers: - sig-node-reviewers diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_linux.go index c377186e97d..23944c31001 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_linux.go @@ -18,23 +18,27 @@ package cm import ( "fmt" + "io/ioutil" "os" "path" "path/filepath" - "strconv" "strings" + "sync" "time" libcontainercgroups "github.com/opencontainers/runc/libcontainer/cgroups" cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" + cgroupfs2 "github.com/opencontainers/runc/libcontainer/cgroups/fs2" + cgroupsystemd "github.com/opencontainers/runc/libcontainer/cgroups/systemd" libcontainerconfigs "github.com/opencontainers/runc/libcontainer/configs" - "k8s.io/klog" + "k8s.io/klog/v2" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" utilfeature "k8s.io/apiserver/pkg/util/feature" kubefeatures "k8s.io/kubernetes/pkg/features" + cmutil "k8s.io/kubernetes/pkg/kubelet/cm/util" "k8s.io/kubernetes/pkg/kubelet/metrics" ) @@ -44,9 +48,13 @@ type libcontainerCgroupManagerType string const ( // libcontainerCgroupfs means use libcontainer with cgroupfs libcontainerCgroupfs libcontainerCgroupManagerType = "cgroupfs" + // libcontainerSystemd means use libcontainer with systemd + libcontainerSystemd libcontainerCgroupManagerType = "systemd" // noneDriver is the name of the "NOP" driver, which is used when // cgroup is not accessible noneDriver = "none" + // systemdSuffix is the cgroup name suffix for systemd + systemdSuffix string = ".slice" ) var RootCgroupName = CgroupName([]string{}) @@ -63,10 +71,49 @@ func NewCgroupName(base CgroupName, components ...string) CgroupName { panic(fmt.Errorf("invalid character in component [%q] of CgroupName", component)) } } - // copy data from the base cgroup to eliminate cases where CgroupNames share underlying slices. See #68416 - baseCopy := make([]string, len(base)) - copy(baseCopy, base) - return CgroupName(append(baseCopy, components...)) + return CgroupName(append(append([]string{}, base...), components...)) +} + +func escapeSystemdCgroupName(part string) string { + return strings.Replace(part, "-", "_", -1) +} + +func unescapeSystemdCgroupName(part string) string { + return strings.Replace(part, "_", "-", -1) +} + +// cgroupName.ToSystemd converts the internal cgroup name to a systemd name. +// For example, the name {"kubepods", "burstable", "pod1234-abcd-5678-efgh"} becomes +// "/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod1234_abcd_5678_efgh.slice" +// This function always expands the systemd name into the cgroupfs form. If only +// the last part is needed, use path.Base(...) on it to discard the rest. +func (cgroupName CgroupName) ToSystemd() string { + if len(cgroupName) == 0 || (len(cgroupName) == 1 && cgroupName[0] == "") { + return "/" + } + newparts := []string{} + for _, part := range cgroupName { + part = escapeSystemdCgroupName(part) + newparts = append(newparts, part) + } + + result, err := cgroupsystemd.ExpandSlice(strings.Join(newparts, "-") + systemdSuffix) + if err != nil { + // Should never happen... + panic(fmt.Errorf("error converting cgroup name [%v] to systemd format: %v", cgroupName, err)) + } + return result +} + +func ParseSystemdToCgroupName(name string) CgroupName { + driverName := path.Base(name) + driverName = strings.TrimSuffix(driverName, systemdSuffix) + parts := strings.Split(driverName, "-") + result := []string{} + for _, part := range parts { + result = append(result, unescapeSystemdCgroupName(part)) + } + return CgroupName(result) } func (cgroupName CgroupName) ToCgroupfs() string { @@ -81,26 +128,46 @@ func ParseCgroupfsToCgroupName(name string) CgroupName { return CgroupName(components) } +func IsSystemdStyleName(name string) bool { + return strings.HasSuffix(name, systemdSuffix) +} + // libcontainerAdapter provides a simplified interface to libcontainer based on libcontainer type. type libcontainerAdapter struct { // cgroupManagerType defines how to interface with libcontainer cgroupManagerType libcontainerCgroupManagerType + rootless bool } // newLibcontainerAdapter returns a configured libcontainerAdapter for specified manager. // it does any initialization required by that manager to function. -func newLibcontainerAdapter(cgroupManagerType libcontainerCgroupManagerType) *libcontainerAdapter { - return &libcontainerAdapter{cgroupManagerType: cgroupManagerType} +func newLibcontainerAdapter(cgroupManagerType libcontainerCgroupManagerType, rootless bool) *libcontainerAdapter { + return &libcontainerAdapter{cgroupManagerType: cgroupManagerType, rootless: rootless} } // newManager returns an implementation of cgroups.Manager func (l *libcontainerAdapter) newManager(cgroups *libcontainerconfigs.Cgroup, paths map[string]string) (libcontainercgroups.Manager, error) { switch l.cgroupManagerType { case libcontainerCgroupfs: - return &cgroupfs.Manager{ - Cgroups: cgroups, - Paths: paths, - }, nil + if l.rootless { + return nil, fmt.Errorf("cgroup manager %v does not support rootless", l.cgroupManagerType) + } + if libcontainercgroups.IsCgroup2UnifiedMode() { + return cgroupfs2.NewManager(cgroups, paths["memory"], false) + } + return cgroupfs.NewManager(cgroups, paths, false), nil + case libcontainerSystemd: + // this means you asked systemd to manage cgroups, but systemd was not on the host, so all you can do is panic... + if !cgroupsystemd.IsRunningSystemd() { + panic("systemd cgroup manager not available") + } + if libcontainercgroups.IsCgroup2UnifiedMode() { + return cgroupsystemd.NewUnifiedManager(cgroups, paths["memory"], l.rootless), nil + } + if l.rootless { + return nil, fmt.Errorf("cgroup manager %v requires cgroup v2 for rootless", l.cgroupManagerType) + } + return cgroupsystemd.NewLegacyManager(cgroups, paths), nil } return nil, fmt.Errorf("invalid cgroup manager configuration") } @@ -126,15 +193,13 @@ type cgroupManagerImpl struct { subsystems *CgroupSubsystems // simplifies interaction with libcontainer and its cgroup managers adapter *libcontainerAdapter - // is the host running on cgroup v2 - cgroupv2 bool } // Make sure that cgroupManagerImpl implements the CgroupManager interface var _ CgroupManager = &cgroupManagerImpl{} // NewCgroupManager is a factory method that returns a CgroupManager -func NewCgroupManager(cs *CgroupSubsystems, cgroupDriver string) (CgroupManager, error) { +func NewCgroupManager(cs *CgroupSubsystems, cgroupDriver string, rootless bool) (CgroupManager, error) { if cgroupDriver == noneDriver { if !utilfeature.DefaultFeatureGate.Enabled(kubefeatures.SupportNoneCgroupDriver) { return nil, fmt.Errorf("cgroup driver %q requires SupportNoneCgroupDriver feature gate", cgroupDriver) @@ -144,21 +209,32 @@ func NewCgroupManager(cs *CgroupSubsystems, cgroupDriver string) (CgroupManager, return cm, nil } managerType := libcontainerCgroupfs + if cgroupDriver == string(libcontainerSystemd) { + managerType = libcontainerSystemd + } + if rootless && !utilfeature.DefaultFeatureGate.Enabled(kubefeatures.Rootless) { + return nil, fmt.Errorf("rootless requires Rootless feature gate") + } return &cgroupManagerImpl{ subsystems: cs, - adapter: newLibcontainerAdapter(managerType), - cgroupv2: libcontainercgroups.IsCgroup2UnifiedMode(), + adapter: newLibcontainerAdapter(managerType, rootless), }, nil } // Name converts the cgroup to the driver specific value in cgroupfs form. // This always returns a valid cgroupfs path even when systemd driver is in use! func (m *cgroupManagerImpl) Name(name CgroupName) string { + if m.adapter.cgroupManagerType == libcontainerSystemd { + return name.ToSystemd() + } return name.ToCgroupfs() } // CgroupName converts the literal cgroupfs name on the host to an internal identifier. func (m *cgroupManagerImpl) CgroupName(name string) CgroupName { + if m.adapter.cgroupManagerType == libcontainerSystemd { + return ParseSystemdToCgroupName(name) + } return ParseCgroupfsToCgroupName(name) } @@ -172,8 +248,45 @@ func (m *cgroupManagerImpl) buildCgroupPaths(name CgroupName) map[string]string return cgroupPaths } +// buildCgroupUnifiedPath builds a path to the specified name. +func (m *cgroupManagerImpl) buildCgroupUnifiedPath(name CgroupName) string { + cgroupFsAdaptedName := m.Name(name) + return path.Join(cmutil.CgroupRoot, cgroupFsAdaptedName) +} + +// TODO(filbranden): This logic belongs in libcontainer/cgroup/systemd instead. +// It should take a libcontainerconfigs.Cgroup.Path field (rather than Name and Parent) +// and split it appropriately, using essentially the logic below. +// This was done for cgroupfs in opencontainers/runc#497 but a counterpart +// for systemd was never introduced. +func updateSystemdCgroupInfo(cgroupConfig *libcontainerconfigs.Cgroup, cgroupName CgroupName) { + dir, base := path.Split(cgroupName.ToSystemd()) + if dir == "/" { + dir = "-.slice" + } else { + dir = path.Base(dir) + } + cgroupConfig.Parent = dir + cgroupConfig.Name = base +} + // Exists checks if all subsystem cgroups already exist func (m *cgroupManagerImpl) Exists(name CgroupName) bool { + if libcontainercgroups.IsCgroup2UnifiedMode() { + cgroupPath := m.buildCgroupUnifiedPath(name) + neededControllers := getSupportedUnifiedControllers() + enabledControllers, err := readUnifiedControllers(cgroupPath) + if err != nil { + return false + } + difference := neededControllers.Difference(enabledControllers) + if difference.Len() > 0 { + klog.V(4).Infof("The Cgroup %v has some missing controllers: %v", name, difference) + return false + } + return true + } + // Get map of all cgroup paths on the system for the particular cgroup cgroupPaths := m.buildCgroupPaths(name) @@ -223,7 +336,15 @@ func (m *cgroupManagerImpl) Destroy(cgroupConfig *CgroupConfig) error { libcontainerCgroupConfig := &libcontainerconfigs.Cgroup{} // libcontainer consumes a different field and expects a different syntax // depending on the cgroup driver in use, so we need this conditional here. - libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() + if m.adapter.cgroupManagerType == libcontainerSystemd { + updateSystemdCgroupInfo(libcontainerCgroupConfig, cgroupConfig.Name) + } else { + if libcontainercgroups.IsCgroup2UnifiedMode() { + libcontainerCgroupConfig.Path = m.buildCgroupUnifiedPath(cgroupConfig.Name) + } else { + libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() + } + } manager, err := m.adapter.newManager(libcontainerCgroupConfig, cgroupPaths) if err != nil { @@ -262,7 +383,7 @@ func getSupportedSubsystems() map[subsystem]bool { return supportedSubsystems } -// setSupportedSubsystems sets cgroup resource limits only on the supported +// setSupportedSubsystemsV1 sets cgroup resource limits on cgroup v1 only on the supported // subsystems. ie. cpu and memory. We don't use libcontainer's cgroup/fs/Set() // method as it doesn't allow us to skip updates on the devices cgroup // Allowing or denying all devices by writing 'a' to devices.allow or devices.deny is @@ -271,7 +392,7 @@ func getSupportedSubsystems() map[subsystem]bool { // We would like to skip setting any values on the device cgroup in this case // but this is not possible with libcontainers Set() method // See https://github.com/opencontainers/runc/issues/932 -func setSupportedSubsystems(cgroupConfig *libcontainerconfigs.Cgroup, cgroupv2 bool) error { +func setSupportedSubsystemsV1(cgroupConfig *libcontainerconfigs.Cgroup) error { for sys, required := range getSupportedSubsystems() { if _, ok := cgroupConfig.Paths[sys.Name()]; !ok { if required { @@ -288,8 +409,148 @@ func setSupportedSubsystems(cgroupConfig *libcontainerconfigs.Cgroup, cgroupv2 b return nil } +// getCpuWeight converts from the range [2, 262144] to [1, 10000] +func getCpuWeight(cpuShares *uint64) uint64 { + if cpuShares == nil { + return 0 + } + if *cpuShares >= 262144 { + return 10000 + } + return 1 + ((*cpuShares-2)*9999)/262142 +} + +// readUnifiedControllers reads the controllers available at the specified cgroup +func readUnifiedControllers(path string) (sets.String, error) { + controllersFileContent, err := ioutil.ReadFile(filepath.Join(path, "cgroup.controllers")) + if err != nil { + return nil, err + } + controllers := strings.Fields(string(controllersFileContent)) + return sets.NewString(controllers...), nil +} + +var ( + availableRootControllersOnce sync.Once + availableRootControllers sets.String +) + +// getSupportedUnifiedControllers returns a set of supported controllers when running on cgroup v2 +func getSupportedUnifiedControllers() sets.String { + // This is the set of controllers used by the Kubelet + supportedControllers := sets.NewString("cpu", "cpuset", "memory", "hugetlb") + if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.SupportPodPidsLimit) || utilfeature.DefaultFeatureGate.Enabled(kubefeatures.SupportNodePidsLimit) { + supportedControllers.Insert("pids") + } + // Memoize the set of controllers that are present in the root cgroup + availableRootControllersOnce.Do(func() { + var err error + availableRootControllers, err = readUnifiedControllers(cmutil.CgroupRoot) + if err != nil { + panic(fmt.Errorf("cannot read cgroup controllers at %s", cmutil.CgroupRoot)) + } + }) + // Return the set of controllers that are supported both by the Kubelet and by the kernel + return supportedControllers.Intersection(availableRootControllers) +} + +// propagateControllers on an unified hierarchy enables all the supported controllers for the specified cgroup +func propagateControllers(path string) error { + if err := os.MkdirAll(path, 0755); err != nil { + return fmt.Errorf("failed to create cgroup %q : %v", path, err) + } + + // Retrieve all the supported controllers from the cgroup root + controllersFileContent, err := ioutil.ReadFile(filepath.Join(cmutil.CgroupRoot, "cgroup.controllers")) + if err != nil { + return fmt.Errorf("failed to read controllers from %q : %v", cmutil.CgroupRoot, err) + } + + supportedControllers := getSupportedUnifiedControllers() + + // The retrieved content looks like: "cpuset cpu io memory hugetlb pids". Prepend each of the controllers + // with '+', so we have something like "+cpuset +cpu +io +memory +hugetlb +pids" + controllers := "" + for _, controller := range strings.Fields(string(controllersFileContent)) { + // ignore controllers we don't care about + if !supportedControllers.Has(controller) { + continue + } + + sep := " +" + if controllers == "" { + sep = "+" + } + controllers = controllers + sep + controller + } + + current := cmutil.CgroupRoot + relPath, err := filepath.Rel(cmutil.CgroupRoot, path) + if err != nil { + return fmt.Errorf("failed to get relative path to cgroup root from %q: %v", path, err) + } + // Write the controllers list to each "cgroup.subtree_control" file until it reaches the parent cgroup. + // For the /foo/bar/baz cgroup, controllers must be enabled sequentially in the files: + // - /sys/fs/cgroup/foo/cgroup.subtree_control + // - /sys/fs/cgroup/foo/bar/cgroup.subtree_control + for _, p := range strings.Split(filepath.Dir(relPath), "/") { + current = filepath.Join(current, p) + if err := ioutil.WriteFile(filepath.Join(current, "cgroup.subtree_control"), []byte(controllers), 0755); err != nil { + return fmt.Errorf("failed to enable controllers on %q: %v", cmutil.CgroupRoot, err) + } + } + return nil +} + +// setResourcesV2 sets cgroup resource limits on cgroup v2 +func setResourcesV2(cgroupConfig *libcontainerconfigs.Cgroup, rootless bool) error { + if err := propagateControllers(cgroupConfig.Path); err != nil { + return err + } + if !rootless { + cgroupConfig.Resources.Devices = []*libcontainerconfigs.DeviceRule{ + { + Type: 'a', + Permissions: "rwm", + Allow: true, + Minor: libcontainerconfigs.Wildcard, + Major: libcontainerconfigs.Wildcard, + }, + } + } + cgroupConfig.Resources.SkipDevices = true + + // if the hugetlb controller is missing + supportedControllers := getSupportedUnifiedControllers() + if !supportedControllers.Has("hugetlb") { + cgroupConfig.Resources.HugetlbLimit = nil + // the cgroup is not present, but its not required so skip it + klog.V(6).Infof("Optional subsystem not supported: hugetlb") + } + + manager, err := cgroupfs2.NewManager(cgroupConfig, cgroupConfig.Path, rootless) + if err != nil { + return fmt.Errorf("failed to create cgroup v2 manager: %v", err) + } + config := &libcontainerconfigs.Config{ + Cgroups: cgroupConfig, + } + return manager.Set(config) +} + func (m *cgroupManagerImpl) toResources(resourceConfig *ResourceConfig) *libcontainerconfigs.Resources { - resources := &libcontainerconfigs.Resources{} + resources := &libcontainerconfigs.Resources{ + Devices: []*libcontainerconfigs.DeviceRule{ + { + Type: 'a', + Permissions: "rwm", + Allow: true, + Minor: libcontainerconfigs.Wildcard, + Major: libcontainerconfigs.Wildcard, + }, + }, + SkipDevices: true, + } if resourceConfig == nil { return resources } @@ -297,30 +558,17 @@ func (m *cgroupManagerImpl) toResources(resourceConfig *ResourceConfig) *libcont resources.Memory = *resourceConfig.Memory } if resourceConfig.CpuShares != nil { - if m.cgroupv2 { - // Convert from the range [2-262144] to [1-10000] - resources.CpuWeight = (1 + ((*resourceConfig.CpuShares-2)*9999)/262142) + if libcontainercgroups.IsCgroup2UnifiedMode() { + resources.CpuWeight = getCpuWeight(resourceConfig.CpuShares) } else { resources.CpuShares = *resourceConfig.CpuShares } } - if m.cgroupv2 { - quota := "max" - period := "100000" - if resourceConfig.CpuQuota != nil { - quota = strconv.FormatInt(*resourceConfig.CpuQuota, 10) - } - if resourceConfig.CpuPeriod != nil { - period = strconv.FormatUint(*resourceConfig.CpuPeriod, 10) - } - resources.CpuMax = fmt.Sprintf("%s %s", quota, period) - } else { - if resourceConfig.CpuQuota != nil { - resources.CpuQuota = *resourceConfig.CpuQuota - } - if resourceConfig.CpuPeriod != nil { - resources.CpuPeriod = *resourceConfig.CpuPeriod - } + if resourceConfig.CpuQuota != nil { + resources.CpuQuota = *resourceConfig.CpuQuota + } + if resourceConfig.CpuPeriod != nil { + resources.CpuPeriod = *resourceConfig.CpuPeriod } if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.SupportPodPidsLimit) || utilfeature.DefaultFeatureGate.Enabled(kubefeatures.SupportNodePidsLimit) { if resourceConfig.PidsLimit != nil { @@ -366,22 +614,36 @@ func (m *cgroupManagerImpl) Update(cgroupConfig *CgroupConfig) error { resourceConfig := cgroupConfig.ResourceParameters resources := m.toResources(resourceConfig) - cgroupPaths := m.buildCgroupPaths(cgroupConfig.Name) - libcontainerCgroupConfig := &libcontainerconfigs.Cgroup{ Resources: resources, - Paths: cgroupPaths, } + + unified := libcontainercgroups.IsCgroup2UnifiedMode() + if unified { + libcontainerCgroupConfig.Path = m.buildCgroupUnifiedPath(cgroupConfig.Name) + } else { + libcontainerCgroupConfig.Paths = m.buildCgroupPaths(cgroupConfig.Name) + } + // libcontainer consumes a different field and expects a different syntax // depending on the cgroup driver in use, so we need this conditional here. - libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() + if m.adapter.cgroupManagerType == libcontainerSystemd { + updateSystemdCgroupInfo(libcontainerCgroupConfig, cgroupConfig.Name) + } if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.SupportPodPidsLimit) && cgroupConfig.ResourceParameters != nil && cgroupConfig.ResourceParameters.PidsLimit != nil { libcontainerCgroupConfig.PidsLimit = *cgroupConfig.ResourceParameters.PidsLimit } - if err := setSupportedSubsystems(libcontainerCgroupConfig, m.cgroupv2); err != nil { - return fmt.Errorf("failed to set supported cgroup subsystems for cgroup %v: %v", cgroupConfig.Name, err) + if unified { + rootless := m.adapter.rootless + if err := setResourcesV2(libcontainerCgroupConfig, rootless); err != nil { + return fmt.Errorf("failed to set resources for cgroup %v: %v", cgroupConfig.Name, err) + } + } else { + if err := setSupportedSubsystemsV1(libcontainerCgroupConfig); err != nil { + return fmt.Errorf("failed to set supported cgroup subsystems for cgroup %v: %v", cgroupConfig.Name, err) + } } return nil } @@ -400,7 +662,15 @@ func (m *cgroupManagerImpl) Create(cgroupConfig *CgroupConfig) error { } // libcontainer consumes a different field and expects a different syntax // depending on the cgroup driver in use, so we need this conditional here. - libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() + if m.adapter.cgroupManagerType == libcontainerSystemd { + updateSystemdCgroupInfo(libcontainerCgroupConfig, cgroupConfig.Name) + } else { + if libcontainercgroups.IsCgroup2UnifiedMode() { + libcontainerCgroupConfig.Path = m.buildCgroupUnifiedPath(cgroupConfig.Name) + } else { + libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() + } + } if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.SupportPodPidsLimit) && cgroupConfig.ResourceParameters != nil && cgroupConfig.ResourceParameters.PidsLimit != nil { libcontainerCgroupConfig.PidsLimit = *cgroupConfig.ResourceParameters.PidsLimit @@ -523,10 +793,25 @@ func toResourceStats(stats *libcontainercgroups.Stats) *ResourceStats { // Get sets the ResourceParameters of the specified cgroup as read from the cgroup fs func (m *cgroupManagerImpl) GetResourceStats(name CgroupName) (*ResourceStats, error) { - cgroupPaths := m.buildCgroupPaths(name) - stats, err := getStatsSupportedSubsystems(cgroupPaths) - if err != nil { - return nil, fmt.Errorf("failed to get stats supported cgroup subsystems for cgroup %v: %v", name, err) + var err error + var stats *libcontainercgroups.Stats + if libcontainercgroups.IsCgroup2UnifiedMode() { + cgroupPath := m.buildCgroupUnifiedPath(name) + manager, err := cgroupfs2.NewManager(nil, cgroupPath, m.adapter.rootless) + if err != nil { + return nil, fmt.Errorf("failed to create cgroup v2 manager: %v", err) + } + + stats, err = manager.GetStats() + if err != nil { + return nil, fmt.Errorf("failed to get stats for cgroup %v: %v", name, err) + } + } else { + cgroupPaths := m.buildCgroupPaths(name) + stats, err = getStatsSupportedSubsystems(cgroupPaths) + if err != nil { + return nil, fmt.Errorf("failed to get stats supported cgroup subsystems for cgroup %v: %v", name, err) + } } return toResourceStats(stats), nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_unsupported.go index 5654d737fd6..e8aaf2d2ba4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_unsupported.go @@ -30,8 +30,8 @@ type CgroupSubsystems struct { MountPoints map[string]string } -func NewCgroupManager(_ interface{}) (CgroupManager, error) { - return &unsupportedCgroupManager{}, nil +func NewCgroupManager(_ interface{}) CgroupManager { + return &unsupportedCgroupManager{} } func (m *unsupportedCgroupManager) Name(_ CgroupName) string { @@ -73,7 +73,7 @@ func (m *unsupportedCgroupManager) ReduceCPULimits(cgroupName CgroupName) error var RootCgroupName = CgroupName([]string{}) func NewCgroupName(base CgroupName, components ...string) CgroupName { - return CgroupName(append(base, components...)) + return append(append([]string{}, base...), components...) } func (cgroupName CgroupName) ToSystemd() string { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager.go index 8e60fab396d..7a6a70741cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager.go @@ -31,7 +31,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" "k8s.io/kubernetes/pkg/kubelet/status" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" "fmt" "strconv" @@ -91,7 +91,7 @@ type ContainerManager interface { // Otherwise, it updates allocatableResource in nodeInfo if necessary, // to make sure it is at least equal to the pod's requested capacity for // any registered device plugin resource - UpdatePluginResources(*schedulernodeinfo.NodeInfo, *lifecycle.PodAdmitAttributes) error + UpdatePluginResources(*schedulerframework.NodeInfo, *lifecycle.PodAdmitAttributes) error InternalContainerLifecycle() InternalContainerLifecycle @@ -135,6 +135,7 @@ type NodeConfig struct { EnforceCPULimits bool CPUCFSQuotaPeriod time.Duration ExperimentalTopologyManagerPolicy string + Rootless bool } type NodeAllocatableConfig struct { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux.go index 2b7cd6c5699..d2f9c32f2cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux.go @@ -30,10 +30,11 @@ import ( "time" "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/cgroups/fs" + cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" + cgroupfs2 "github.com/opencontainers/runc/libcontainer/cgroups/fs2" "github.com/opencontainers/runc/libcontainer/configs" libcontainersystem "github.com/opencontainers/runc/libcontainer/system" - "k8s.io/klog" + "k8s.io/klog/v2" utilio "k8s.io/utils/io" "k8s.io/utils/mount" utilpath "k8s.io/utils/path" @@ -50,8 +51,8 @@ import ( kubefeatures "k8s.io/kubernetes/pkg/features" podresourcesapi "k8s.io/kubernetes/pkg/kubelet/apis/podresources/v1alpha1" "k8s.io/kubernetes/pkg/kubelet/cadvisor" + "k8s.io/kubernetes/pkg/kubelet/cm/containermap" "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager" - "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap" cputopology "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology" "k8s.io/kubernetes/pkg/kubelet/cm/devicemanager" "k8s.io/kubernetes/pkg/kubelet/cm/topologymanager" @@ -63,7 +64,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/qos" "k8s.io/kubernetes/pkg/kubelet/stats/pidlimit" "k8s.io/kubernetes/pkg/kubelet/status" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" "k8s.io/kubernetes/pkg/util/oom" "k8s.io/kubernetes/pkg/util/procfs" utilsysctl "k8s.io/kubernetes/pkg/util/sysctl" @@ -92,17 +93,21 @@ type systemContainer struct { // Function that ensures the state of the container. // m is the cgroup manager for the specified container. - ensureStateFunc func(m *fs.Manager) error + ensureStateFunc func(m cgroups.Manager) error // Manager for the cgroups of the external container. - manager *fs.Manager + manager cgroups.Manager } -func newSystemCgroups(containerName string) *systemContainer { +func newSystemCgroups(containerName string) (*systemContainer, error) { + manager, err := createManager(containerName) + if err != nil { + return nil, err + } return &systemContainer{ name: containerName, - manager: createManager(containerName), - } + manager: manager, + }, nil } type containerManagerImpl struct { @@ -163,6 +168,7 @@ func validateSystemRequirements(mountUtil mount.Interface) (features, error) { } if cgroups.IsCgroup2UnifiedMode() { + f.cpuHardcapping = true return f, nil } @@ -253,7 +259,7 @@ func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.I // Turn CgroupRoot from a string (in cgroupfs path format) to internal CgroupName cgroupRoot := ParseCgroupfsToCgroupName(nodeConfig.CgroupRoot) - cgroupManager, err := NewCgroupManager(subsystems, nodeConfig.CgroupDriver) + cgroupManager, err := NewCgroupManager(subsystems, nodeConfig.CgroupDriver, nodeConfig.Rootless) if err != nil { return nil, err } @@ -262,6 +268,12 @@ func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.I if nodeConfig.CgroupDriver == noneDriver { return nil, fmt.Errorf("invalid configuration: cgroups-per-qos is not supported for %s cgroup driver", nodeConfig.CgroupDriver) } + + if nodeConfig.Rootless { + // TODO(AkihiroSuda): support rootless + return nil, fmt.Errorf("invalid configuration: cgroups-per-qos is not supported for rootless") + } + // this does default to / when enabled, but this tests against regressions. if nodeConfig.CgroupRoot == "" { return nil, fmt.Errorf("invalid configuration: cgroups-per-qos was specified and cgroup-root was not specified. To enable the QoS cgroup hierarchy you need to specify a valid cgroup-root") @@ -271,7 +283,7 @@ func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.I // of note, we always use the cgroupfs driver when performing this check since // the input is provided in that format. // this is important because we do not want any name conversion to occur. - if !cgroupManager.Exists(cgroupRoot) && nodeConfig.CgroupDriver != noneDriver { + if !cgroupManager.Exists(cgroupRoot) { return nil, fmt.Errorf("invalid configuration: cgroup-root %q doesn't exist", cgroupRoot) } klog.Infof("container manager verified user specified cgroup-root exists: %v", cgroupRoot) @@ -362,7 +374,8 @@ func (cm *containerManagerImpl) NewPodContainerManager() PodContainerManager { } } return &podContainerManagerNoop{ - cgroupRoot: cm.cgroupRoot, + cgroupRoot: cm.cgroupRoot, + rootlessSystemd: cm.NodeConfig.Rootless && cm.NodeConfig.CgroupDriver == "systemd", } } @@ -371,17 +384,29 @@ func (cm *containerManagerImpl) InternalContainerLifecycle() InternalContainerLi } // Create a cgroup container manager. -func createManager(containerName string) *fs.Manager { - allowAllDevices := true - return &fs.Manager{ - Cgroups: &configs.Cgroup{ - Parent: "/", - Name: containerName, - Resources: &configs.Resources{ - AllowAllDevices: &allowAllDevices, +func createManager(containerName string) (cgroups.Manager, error) { + cg := &configs.Cgroup{ + Parent: "/", + Name: containerName, + Resources: &configs.Resources{ + Devices: []*configs.DeviceRule{ + { + Type: 'a', + Permissions: "rwm", + Allow: true, + Minor: configs.Wildcard, + Major: configs.Wildcard, + }, }, + SkipDevices: true, }, } + + if cgroups.IsCgroup2UnifiedMode() { + return cgroupfs2.NewManager(cg, "", false) + + } + return cgroupfs.NewManager(cg, nil, false), nil } type KernelTunableBehavior string @@ -493,27 +518,34 @@ func (cm *containerManagerImpl) setupNode(activePods ActivePodsFunc) error { if cm.SystemCgroupsName == "/" { return fmt.Errorf("system container cannot be root (\"/\")") } - cont := newSystemCgroups(cm.SystemCgroupsName) - cont.ensureStateFunc = func(manager *fs.Manager) error { + if cm.Rootless { + return fmt.Errorf("rootless does not support SystemCgroupsName") + } + cont, err := newSystemCgroups(cm.SystemCgroupsName) + if err != nil { + return err + } + cont.ensureStateFunc = func(manager cgroups.Manager) error { return ensureSystemCgroups("/", manager) } systemContainers = append(systemContainers, cont) } if cm.KubeletCgroupsName != "" { - cont := newSystemCgroups(cm.KubeletCgroupsName) - allowAllDevices := true - manager := fs.Manager{ - Cgroups: &configs.Cgroup{ - Parent: "/", - Name: cm.KubeletCgroupsName, - Resources: &configs.Resources{ - AllowAllDevices: &allowAllDevices, - }, - }, + if cm.Rootless { + return fmt.Errorf("rootless does not support KubeletCgroupsName") } - cont.ensureStateFunc = func(_ *fs.Manager) error { - return ensureProcessInContainerWithOOMScore(os.Getpid(), qos.KubeletOOMScoreAdj, &manager) + cont, err := newSystemCgroups(cm.KubeletCgroupsName) + if err != nil { + return err + } + + manager, err := createManager(cm.KubeletCgroupsName) + if err != nil { + return err + } + cont.ensureStateFunc = func(_ cgroups.Manager) error { + return ensureProcessInContainerWithOOMScore(os.Getpid(), qos.KubeletOOMScoreAdj, manager) } systemContainers = append(systemContainers, cont) } else { @@ -686,7 +718,7 @@ func (cm *containerManagerImpl) GetResources(pod *v1.Pod, container *v1.Containe return opts, nil } -func (cm *containerManagerImpl) UpdatePluginResources(node *schedulernodeinfo.NodeInfo, attrs *lifecycle.PodAdmitAttributes) error { +func (cm *containerManagerImpl) UpdatePluginResources(node *schedulerframework.NodeInfo, attrs *lifecycle.PodAdmitAttributes) error { return cm.deviceManager.UpdatePluginResources(node, attrs) } @@ -831,7 +863,7 @@ func getPidsForProcess(name, pidFile string) ([]int, error) { // Temporarily export the function to be used by dockershim. // TODO(yujuhong): Move this function to dockershim once kubelet migrates to // dockershim as the default. -func EnsureDockerInContainer(dockerAPIVersion *utilversion.Version, oomScoreAdj int, manager *fs.Manager) error { +func EnsureDockerInContainer(dockerAPIVersion *utilversion.Version, oomScoreAdj int, manager cgroups.Manager) error { type process struct{ name, file string } dockerProcs := []process{{dockerProcessName, dockerPidFile}} if dockerAPIVersion.AtLeast(containerdAPIVersion) { @@ -855,7 +887,7 @@ func EnsureDockerInContainer(dockerAPIVersion *utilversion.Version, oomScoreAdj return utilerrors.NewAggregate(errs) } -func ensureProcessInContainerWithOOMScore(pid int, oomScoreAdj int, manager *fs.Manager) error { +func ensureProcessInContainerWithOOMScore(pid int, oomScoreAdj int, manager cgroups.Manager) error { if runningInHost, err := isProcessRunningInHost(pid); err != nil { // Err on the side of caution. Avoid moving the docker daemon unless we are able to identify its context. return err @@ -872,10 +904,18 @@ func ensureProcessInContainerWithOOMScore(pid int, oomScoreAdj int, manager *fs. errs = append(errs, fmt.Errorf("failed to find container of PID %d: %v", pid, err)) } - if cont != manager.Cgroups.Name { + name := "" + cgroups, err := manager.GetCgroups() + if err != nil { + errs = append(errs, fmt.Errorf("failed to get cgroups for %d: %v", pid, err)) + } else { + name = cgroups.Name + } + + if cont != name { err = manager.Apply(pid) if err != nil { - errs = append(errs, fmt.Errorf("failed to move PID %d (in %q) to %q: %v", pid, cont, manager.Cgroups.Name, err)) + errs = append(errs, fmt.Errorf("failed to move PID %d (in %q) to %q: %v", pid, cont, name, err)) } } } @@ -900,7 +940,10 @@ func getContainer(pid int) (string, error) { } if cgroups.IsCgroup2UnifiedMode() { - c, _ := cgs[""] + c, found := cgs[""] + if !found { + return "", cgroups.NewNotFoundError("unified") + } return c, nil } @@ -946,7 +989,7 @@ func getContainer(pid int) (string, error) { // The reason of leaving kernel threads at root cgroup is that we don't want to tie the // execution of these threads with to-be defined /system quota and create priority inversions. // -func ensureSystemCgroups(rootCgroupPath string, manager *fs.Manager) error { +func ensureSystemCgroups(rootCgroupPath string, manager cgroups.Manager) error { // Move non-kernel PIDs to the system container. // Only keep errors on latest attempt. var finalErr error @@ -977,7 +1020,13 @@ func ensureSystemCgroups(rootCgroupPath string, manager *fs.Manager) error { for _, pid := range pids { err := manager.Apply(pid) if err != nil { - finalErr = fmt.Errorf("failed to move PID %d into the system container %q: %v", pid, manager.Cgroups.Name, err) + name := "" + cgroups, err := manager.GetCgroups() + if err == nil { + name = cgroups.Name + } + + finalErr = fmt.Errorf("failed to move PID %d into the system container %q: %v", pid, name, err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_stub.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_stub.go index 3ed3d264052..3d89a67d554 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_stub.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_stub.go @@ -18,7 +18,7 @@ package cm import ( v1 "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/resource" internalapi "k8s.io/cri-api/pkg/apis" @@ -30,7 +30,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" "k8s.io/kubernetes/pkg/kubelet/status" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) type containerManagerStub struct { @@ -97,7 +97,7 @@ func (cm *containerManagerStub) GetResources(pod *v1.Pod, container *v1.Containe return &kubecontainer.RunContainerOptions{}, nil } -func (cm *containerManagerStub) UpdatePluginResources(*schedulernodeinfo.NodeInfo, *lifecycle.PodAdmitAttributes) error { +func (cm *containerManagerStub) UpdatePluginResources(*schedulerframework.NodeInfo, *lifecycle.PodAdmitAttributes) error { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_windows.go index 50e25ca4b58..574b78813ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_windows.go @@ -24,7 +24,7 @@ package cm import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" v1 "k8s.io/api/core/v1" @@ -42,7 +42,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" "k8s.io/kubernetes/pkg/kubelet/status" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) type containerManagerImpl struct { @@ -165,7 +165,7 @@ func (cm *containerManagerImpl) GetResources(pod *v1.Pod, container *v1.Containe return &kubecontainer.RunContainerOptions{}, nil } -func (cm *containerManagerImpl) UpdatePluginResources(*schedulernodeinfo.NodeInfo, *lifecycle.PodAdmitAttributes) error { +func (cm *containerManagerImpl) UpdatePluginResources(*schedulerframework.NodeInfo, *lifecycle.PodAdmitAttributes) error { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/containermap/BUILD similarity index 88% rename from vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap/BUILD rename to vendor/k8s.io/kubernetes/pkg/kubelet/cm/containermap/BUILD index a7f53443c77..5260916cf67 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/containermap/BUILD @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", srcs = ["container_map.go"], - importpath = "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap", + importpath = "k8s.io/kubernetes/pkg/kubelet/cm/containermap", visibility = ["//visibility:public"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap/container_map.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/containermap/container_map.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap/container_map.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cm/containermap/container_map.go diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/BUILD index 45092994ef0..318e901da01 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/BUILD @@ -14,7 +14,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/apis/core/v1/helper/qos:go_default_library", - "//pkg/kubelet/cm/cpumanager/containermap:go_default_library", + "//pkg/kubelet/cm/containermap:go_default_library", "//pkg/kubelet/cm/cpumanager/state:go_default_library", "//pkg/kubelet/cm/cpumanager/topology:go_default_library", "//pkg/kubelet/cm/cpuset:go_default_library", @@ -27,7 +27,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", "//vendor/github.com/google/cadvisor/info/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -43,7 +43,7 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//pkg/kubelet/cm/cpumanager/containermap:go_default_library", + "//pkg/kubelet/cm/containermap:go_default_library", "//pkg/kubelet/cm/cpumanager/state:go_default_library", "//pkg/kubelet/cm/cpumanager/topology:go_default_library", "//pkg/kubelet/cm/cpuset:go_default_library", @@ -69,7 +69,6 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/kubelet/cm/cpumanager/containermap:all-srcs", "//pkg/kubelet/cm/cpumanager/state:all-srcs", "//pkg/kubelet/cm/cpumanager/topology:all-srcs", ], diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/OWNERS index c0aaa5bbdc4..951ab1b6383 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/OWNERS @@ -4,7 +4,6 @@ approvers: - derekwaynecarr - vishh - ConnorDoyle -- sjenning - balajismaniam reviewers: - klueska diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_assignment.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_assignment.go index 5e9b8802298..f646f80811a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_assignment.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_assignment.go @@ -20,7 +20,7 @@ import ( "fmt" "sort" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology" "k8s.io/kubernetes/pkg/kubelet/cm/cpuset" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_manager.go index 98e1f4a0c2e..6acd8ebc660 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_manager.go @@ -25,10 +25,10 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap" + "k8s.io/kubernetes/pkg/kubelet/cm/containermap" "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state" "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology" "k8s.io/kubernetes/pkg/kubelet/cm/cpuset" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/fake_cpu_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/fake_cpu_manager.go index b5537f787b6..d8d707173bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/fake_cpu_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/fake_cpu_manager.go @@ -18,8 +18,8 @@ package cpumanager import ( "k8s.io/api/core/v1" - "k8s.io/klog" - "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap" + "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/kubelet/cm/containermap" "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state" "k8s.io/kubernetes/pkg/kubelet/cm/topologymanager" "k8s.io/kubernetes/pkg/kubelet/config" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_none.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_none.go index bc71fe8f29d..0f9bfff9e13 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_none.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_none.go @@ -18,7 +18,7 @@ package cpumanager import ( "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state" "k8s.io/kubernetes/pkg/kubelet/cm/topologymanager" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_static.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_static.go index c7b3172ea4f..ad3f876ab89 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_static.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_static.go @@ -20,7 +20,7 @@ import ( "fmt" v1 "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" v1qos "k8s.io/kubernetes/pkg/apis/core/v1/helper/qos" "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state" "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/BUILD index 438737c9d18..f2f271a4889 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/BUILD @@ -6,7 +6,6 @@ go_library( "checkpoint.go", "state.go", "state_checkpoint.go", - "state_file.go", "state_mem.go", ], importpath = "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state", @@ -15,27 +14,22 @@ go_library( "//pkg/kubelet/checkpointmanager:go_default_library", "//pkg/kubelet/checkpointmanager/checksum:go_default_library", "//pkg/kubelet/checkpointmanager/errors:go_default_library", - "//pkg/kubelet/cm/cpumanager/containermap:go_default_library", + "//pkg/kubelet/cm/containermap:go_default_library", "//pkg/kubelet/cm/cpuset:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) go_test( name = "go_default_test", - srcs = [ - "state_checkpoint_test.go", - "state_compatibility_test.go", - "state_file_test.go", - ], + srcs = ["state_checkpoint_test.go"], embed = [":go_default_library"], deps = [ "//pkg/kubelet/checkpointmanager:go_default_library", - "//pkg/kubelet/cm/cpumanager/containermap:go_default_library", + "//pkg/kubelet/cm/containermap:go_default_library", "//pkg/kubelet/cm/cpumanager/state/testing:go_default_library", "//pkg/kubelet/cm/cpuset:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_checkpoint.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_checkpoint.go index de82f69d5c1..951f9da7f92 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_checkpoint.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_checkpoint.go @@ -21,10 +21,10 @@ import ( "path" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/errors" - "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap" + "k8s.io/kubernetes/pkg/kubelet/cm/containermap" "k8s.io/kubernetes/pkg/kubelet/cm/cpuset" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_file.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_file.go deleted file mode 100644 index b61505a3de4..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_file.go +++ /dev/null @@ -1,278 +0,0 @@ -/* -Copyright 2017 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 state - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "os" - "sync" - - "k8s.io/klog" - "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap" - "k8s.io/kubernetes/pkg/kubelet/cm/cpuset" -) - -type stateFileDataV1 struct { - PolicyName string `json:"policyName"` - DefaultCPUSet string `json:"defaultCpuSet"` - Entries map[string]string `json:"entries,omitempty"` -} - -type stateFileDataV2 struct { - PolicyName string `json:"policyName"` - DefaultCPUSet string `json:"defaultCpuSet"` - Entries map[string]map[string]string `json:"entries,omitempty"` -} - -var _ State = &stateFile{} - -type stateFile struct { - sync.RWMutex - stateFilePath string - policyName string - cache State - initialContainers containermap.ContainerMap -} - -// NewFileState creates new State for keeping track of cpu/pod assignment with file backend -func NewFileState(filePath string, policyName string, initialContainers containermap.ContainerMap) (State, error) { - stateFile := &stateFile{ - stateFilePath: filePath, - cache: NewMemoryState(), - policyName: policyName, - initialContainers: initialContainers, - } - - if err := stateFile.tryRestoreState(); err != nil { - // could not restore state, init new state file - klog.Errorf("[cpumanager] state file: unable to restore state from disk (%v)"+ - " We cannot guarantee sane CPU affinity for existing containers."+ - " Please drain this node and delete the CPU manager state file \"%s\" before restarting Kubelet.", - err, stateFile.stateFilePath) - return nil, err - } - - return stateFile, nil -} - -// migrateV1StateToV2State() converts state from the v1 format to the v2 format -func (sf *stateFile) migrateV1StateToV2State(src *stateFileDataV1, dst *stateFileDataV2) error { - if src.PolicyName != "" { - dst.PolicyName = src.PolicyName - } - if src.DefaultCPUSet != "" { - dst.DefaultCPUSet = src.DefaultCPUSet - } - for containerID, cset := range src.Entries { - podUID, containerName, err := sf.initialContainers.GetContainerRef(containerID) - if err != nil { - return fmt.Errorf("containerID '%v' not found in initial containers list", containerID) - } - if dst.Entries == nil { - dst.Entries = make(map[string]map[string]string) - } - if _, exists := dst.Entries[podUID]; !exists { - dst.Entries[podUID] = make(map[string]string) - } - dst.Entries[podUID][containerName] = cset - } - return nil -} - -// tryRestoreState tries to read state file, upon any error, -// err message is logged and state is left clean. un-initialized -func (sf *stateFile) tryRestoreState() error { - sf.Lock() - defer sf.Unlock() - var err error - var content []byte - - content, err = ioutil.ReadFile(sf.stateFilePath) - - // If the state file does not exist or has zero length, write a new file. - if os.IsNotExist(err) || len(content) == 0 { - err := sf.storeState() - if err != nil { - return err - } - klog.Infof("[cpumanager] state file: created new state file \"%s\"", sf.stateFilePath) - return nil - } - - // Fail on any other file read error. - if err != nil { - return err - } - - // File exists; try to read it. - var readStateV1 stateFileDataV1 - var readStateV2 stateFileDataV2 - - if err = json.Unmarshal(content, &readStateV1); err != nil { - readStateV1 = stateFileDataV1{} // reset it back to 0 - if err = json.Unmarshal(content, &readStateV2); err != nil { - klog.Errorf("[cpumanager] state file: could not unmarshal, corrupted state file - \"%s\"", sf.stateFilePath) - return err - } - } - - if err = sf.migrateV1StateToV2State(&readStateV1, &readStateV2); err != nil { - klog.Errorf("[cpumanager] state file: could not migrate v1 state to v2 state - \"%s\"", sf.stateFilePath) - return err - } - - if sf.policyName != readStateV2.PolicyName { - return fmt.Errorf("policy configured \"%s\" != policy from state file \"%s\"", sf.policyName, readStateV2.PolicyName) - } - - var tmpDefaultCPUSet cpuset.CPUSet - if tmpDefaultCPUSet, err = cpuset.Parse(readStateV2.DefaultCPUSet); err != nil { - klog.Errorf("[cpumanager] state file: could not parse state file - [defaultCpuSet:\"%s\"]", readStateV2.DefaultCPUSet) - return err - } - - var tmpContainerCPUSet cpuset.CPUSet - tmpAssignments := ContainerCPUAssignments{} - for pod := range readStateV2.Entries { - tmpAssignments[pod] = make(map[string]cpuset.CPUSet) - for container, cpuString := range readStateV2.Entries[pod] { - if tmpContainerCPUSet, err = cpuset.Parse(cpuString); err != nil { - klog.Errorf("[cpumanager] state file: could not parse state file - pod: %s, container: %s, cpuset: \"%s\"", pod, container, cpuString) - return err - } - tmpAssignments[pod][container] = tmpContainerCPUSet - } - } - - sf.cache.SetDefaultCPUSet(tmpDefaultCPUSet) - sf.cache.SetCPUAssignments(tmpAssignments) - - klog.V(2).Infof("[cpumanager] state file: restored state from state file \"%s\"", sf.stateFilePath) - klog.V(2).Infof("[cpumanager] state file: defaultCPUSet: %s", tmpDefaultCPUSet.String()) - - return nil -} - -// saves state to a file, caller is responsible for locking -func (sf *stateFile) storeState() error { - var content []byte - var err error - - data := stateFileDataV2{ - PolicyName: sf.policyName, - DefaultCPUSet: sf.cache.GetDefaultCPUSet().String(), - Entries: map[string]map[string]string{}, - } - - assignments := sf.cache.GetCPUAssignments() - for pod := range assignments { - data.Entries[pod] = map[string]string{} - for container, cset := range assignments[pod] { - data.Entries[pod][container] = cset.String() - } - } - - if content, err = json.Marshal(data); err != nil { - return fmt.Errorf("[cpumanager] state file: could not serialize state to json") - } - - if err = ioutil.WriteFile(sf.stateFilePath, content, 0644); err != nil { - return fmt.Errorf("[cpumanager] state file not written") - } - - return nil -} - -func (sf *stateFile) GetCPUSet(podUID string, containerName string) (cpuset.CPUSet, bool) { - sf.RLock() - defer sf.RUnlock() - - res, ok := sf.cache.GetCPUSet(podUID, containerName) - return res, ok -} - -func (sf *stateFile) GetDefaultCPUSet() cpuset.CPUSet { - sf.RLock() - defer sf.RUnlock() - - return sf.cache.GetDefaultCPUSet() -} - -func (sf *stateFile) GetCPUSetOrDefault(podUID string, containerName string) cpuset.CPUSet { - sf.RLock() - defer sf.RUnlock() - - return sf.cache.GetCPUSetOrDefault(podUID, containerName) -} - -func (sf *stateFile) GetCPUAssignments() ContainerCPUAssignments { - sf.RLock() - defer sf.RUnlock() - return sf.cache.GetCPUAssignments() -} - -func (sf *stateFile) SetCPUSet(podUID string, containerName string, cset cpuset.CPUSet) { - sf.Lock() - defer sf.Unlock() - sf.cache.SetCPUSet(podUID, containerName, cset) - err := sf.storeState() - if err != nil { - klog.Warningf("store state to checkpoint error: %v", err) - } -} - -func (sf *stateFile) SetDefaultCPUSet(cset cpuset.CPUSet) { - sf.Lock() - defer sf.Unlock() - sf.cache.SetDefaultCPUSet(cset) - err := sf.storeState() - if err != nil { - klog.Warningf("store state to checkpoint error: %v", err) - } -} - -func (sf *stateFile) SetCPUAssignments(a ContainerCPUAssignments) { - sf.Lock() - defer sf.Unlock() - sf.cache.SetCPUAssignments(a) - err := sf.storeState() - if err != nil { - klog.Warningf("store state to checkpoint error: %v", err) - } -} - -func (sf *stateFile) Delete(podUID string, containerName string) { - sf.Lock() - defer sf.Unlock() - sf.cache.Delete(podUID, containerName) - err := sf.storeState() - if err != nil { - klog.Warningf("store state to checkpoint error: %v", err) - } -} - -func (sf *stateFile) ClearState() { - sf.Lock() - defer sf.Unlock() - sf.cache.ClearState() - err := sf.storeState() - if err != nil { - klog.Warningf("store state to checkpoint error: %v", err) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_mem.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_mem.go index 25ab6889bc8..894a6ccccfc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_mem.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/state_mem.go @@ -19,7 +19,7 @@ package state import ( "sync" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/cm/cpuset" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology/BUILD index bd5fb095200..a54c6ad95ee 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology/BUILD @@ -11,7 +11,7 @@ go_library( deps = [ "//pkg/kubelet/cm/cpuset:go_default_library", "//vendor/github.com/google/cadvisor/info/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology/topology.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology/topology.go index 54a5394503f..cd2646afb84 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology/topology.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology/topology.go @@ -22,7 +22,7 @@ import ( "strings" cadvisorapi "github.com/google/cadvisor/info/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/cm/cpuset" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/BUILD index 9b81edc1961..d2e3ef73fe4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/BUILD @@ -5,7 +5,7 @@ go_library( srcs = ["cpuset.go"], importpath = "k8s.io/kubernetes/pkg/kubelet/cm/cpuset", visibility = ["//visibility:public"], - deps = ["//vendor/k8s.io/klog:go_default_library"], + deps = ["//vendor/k8s.io/klog/v2:go_default_library"], ) go_test( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/OWNERS index e6f9bfdad6a..fe38ab54ee9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/OWNERS @@ -4,4 +4,3 @@ approvers: - derekwaynecarr - vishh - ConnorDoyle -- sjenning diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/cpuset.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/cpuset.go index 45df61866e3..ae2062bd8a8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/cpuset.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/cpuset.go @@ -19,7 +19,7 @@ package cpuset import ( "bytes" "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" "reflect" "sort" "strconv" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/BUILD index 3299f7f4e9a..daa43895eed 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/BUILD @@ -28,7 +28,7 @@ go_library( "//pkg/kubelet/lifecycle:go_default_library", "//pkg/kubelet/metrics:go_default_library", "//pkg/kubelet/pluginmanager/cache:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/util/selinux:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", @@ -38,7 +38,7 @@ go_library( "//staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1:go_default_library", "//staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -57,7 +57,7 @@ go_test( "//pkg/kubelet/config:go_default_library", "//pkg/kubelet/lifecycle:go_default_library", "//pkg/kubelet/pluginmanager:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/device_plugin_stub.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/device_plugin_stub.go index 25feaf0fe03..bf9e96a9c1b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/device_plugin_stub.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/device_plugin_stub.go @@ -18,7 +18,6 @@ package devicemanager import ( "context" - "log" "net" "os" "path" @@ -27,16 +26,18 @@ import ( "google.golang.org/grpc" + "k8s.io/klog/v2" pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1" watcherapi "k8s.io/kubelet/pkg/apis/pluginregistration/v1" ) // Stub implementation for DevicePlugin. type Stub struct { - devs []*pluginapi.Device - socket string - resourceName string - preStartContainerFlag bool + devs []*pluginapi.Device + socket string + resourceName string + preStartContainerFlag bool + getPreferredAllocationFlag bool stop chan interface{} wg sync.WaitGroup @@ -47,12 +48,24 @@ type Stub struct { // allocFunc is used for handling allocation request allocFunc stubAllocFunc + // getPreferredAllocFunc is used for handling getPreferredAllocation request + getPreferredAllocFunc stubGetPreferredAllocFunc + registrationStatus chan watcherapi.RegistrationStatus // for testing endpoint string // for testing } -// stubAllocFunc is the function called when receive an allocation request from Kubelet +// stubGetPreferredAllocFunc is the function called when a getPreferredAllocation request is received from Kubelet +type stubGetPreferredAllocFunc func(r *pluginapi.PreferredAllocationRequest, devs map[string]pluginapi.Device) (*pluginapi.PreferredAllocationResponse, error) + +func defaultGetPreferredAllocFunc(r *pluginapi.PreferredAllocationRequest, devs map[string]pluginapi.Device) (*pluginapi.PreferredAllocationResponse, error) { + var response pluginapi.PreferredAllocationResponse + + return &response, nil +} + +// stubAllocFunc is the function called when an allocation request is received from Kubelet type stubAllocFunc func(r *pluginapi.AllocateRequest, devs map[string]pluginapi.Device) (*pluginapi.AllocateResponse, error) func defaultAllocFunc(r *pluginapi.AllocateRequest, devs map[string]pluginapi.Device) (*pluginapi.AllocateResponse, error) { @@ -62,20 +75,27 @@ func defaultAllocFunc(r *pluginapi.AllocateRequest, devs map[string]pluginapi.De } // NewDevicePluginStub returns an initialized DevicePlugin Stub. -func NewDevicePluginStub(devs []*pluginapi.Device, socket string, name string, preStartContainerFlag bool) *Stub { +func NewDevicePluginStub(devs []*pluginapi.Device, socket string, name string, preStartContainerFlag bool, getPreferredAllocationFlag bool) *Stub { return &Stub{ - devs: devs, - socket: socket, - resourceName: name, - preStartContainerFlag: preStartContainerFlag, + devs: devs, + socket: socket, + resourceName: name, + preStartContainerFlag: preStartContainerFlag, + getPreferredAllocationFlag: getPreferredAllocationFlag, stop: make(chan interface{}), update: make(chan []*pluginapi.Device), - allocFunc: defaultAllocFunc, + allocFunc: defaultAllocFunc, + getPreferredAllocFunc: defaultGetPreferredAllocFunc, } } +// SetGetPreferredAllocFunc sets allocFunc of the device plugin +func (m *Stub) SetGetPreferredAllocFunc(f stubGetPreferredAllocFunc) { + m.getPreferredAllocFunc = f +} + // SetAllocFunc sets allocFunc of the device plugin func (m *Stub) SetAllocFunc(f stubAllocFunc) { m.allocFunc = f @@ -108,7 +128,7 @@ func (m *Stub) Start() error { return err } conn.Close() - log.Println("Starting to serve on", m.socket) + klog.Infof("Starting to serve on %v", m.socket) return nil } @@ -130,7 +150,7 @@ func (m *Stub) Stop() error { // GetInfo is the RPC which return pluginInfo func (m *Stub) GetInfo(ctx context.Context, req *watcherapi.InfoRequest) (*watcherapi.PluginInfo, error) { - log.Println("GetInfo") + klog.Info("GetInfo") return &watcherapi.PluginInfo{ Type: watcherapi.DevicePlugin, Name: m.resourceName, @@ -144,7 +164,7 @@ func (m *Stub) NotifyRegistrationStatus(ctx context.Context, status *watcherapi. m.registrationStatus <- *status } if !status.PluginRegistered { - log.Println("Registration failed: ", status.Error) + klog.Infof("Registration failed: %v", status.Error) } return &watcherapi.RegistrationStatusResponse{}, nil } @@ -153,11 +173,11 @@ func (m *Stub) NotifyRegistrationStatus(ctx context.Context, status *watcherapi. func (m *Stub) Register(kubeletEndpoint, resourceName string, pluginSockDir string) error { if pluginSockDir != "" { if _, err := os.Stat(pluginSockDir + "DEPRECATION"); err == nil { - log.Println("Deprecation file found. Skip registration.") + klog.Info("Deprecation file found. Skip registration.") return nil } } - log.Println("Deprecation file not found. Invoke registration") + klog.Info("Deprecation file not found. Invoke registration") ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() @@ -174,7 +194,10 @@ func (m *Stub) Register(kubeletEndpoint, resourceName string, pluginSockDir stri Version: pluginapi.Version, Endpoint: path.Base(m.socket), ResourceName: resourceName, - Options: &pluginapi.DevicePluginOptions{PreStartRequired: m.preStartContainerFlag}, + Options: &pluginapi.DevicePluginOptions{ + PreStartRequired: m.preStartContainerFlag, + GetPreferredAllocationAvailable: m.getPreferredAllocationFlag, + }, } _, err = client.Register(context.Background(), reqt) @@ -186,18 +209,22 @@ func (m *Stub) Register(kubeletEndpoint, resourceName string, pluginSockDir stri // GetDevicePluginOptions returns DevicePluginOptions settings for the device plugin. func (m *Stub) GetDevicePluginOptions(ctx context.Context, e *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error) { - return &pluginapi.DevicePluginOptions{PreStartRequired: m.preStartContainerFlag}, nil + options := &pluginapi.DevicePluginOptions{ + PreStartRequired: m.preStartContainerFlag, + GetPreferredAllocationAvailable: m.getPreferredAllocationFlag, + } + return options, nil } // PreStartContainer resets the devices received func (m *Stub) PreStartContainer(ctx context.Context, r *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error) { - log.Printf("PreStartContainer, %+v", r) + klog.Infof("PreStartContainer, %+v", r) return &pluginapi.PreStartContainerResponse{}, nil } // ListAndWatch lists devices and update that list according to the Update call func (m *Stub) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error { - log.Println("ListAndWatch") + klog.Info("ListAndWatch") s.Send(&pluginapi.ListAndWatchResponse{Devices: m.devs}) @@ -216,9 +243,22 @@ func (m *Stub) Update(devs []*pluginapi.Device) { m.update <- devs } +// GetPreferredAllocation gets the preferred allocation from a set of available devices +func (m *Stub) GetPreferredAllocation(ctx context.Context, r *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error) { + klog.Infof("GetPreferredAllocation, %+v", r) + + devs := make(map[string]pluginapi.Device) + + for _, dev := range m.devs { + devs[dev.ID] = *dev + } + + return m.getPreferredAllocFunc(r, devs) +} + // Allocate does a mock allocation func (m *Stub) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error) { - log.Printf("Allocate, %+v", r) + klog.Infof("Allocate, %+v", r) devs := make(map[string]pluginapi.Device) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/endpoint.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/endpoint.go index ccb01be3ffd..eaef0df39aa 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/endpoint.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/endpoint.go @@ -24,7 +24,7 @@ import ( "time" "google.golang.org/grpc" - "k8s.io/klog" + "k8s.io/klog/v2" pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1" ) @@ -35,6 +35,7 @@ import ( type endpoint interface { run() stop() + getPreferredAllocation(available, mustInclude []string, size int) (*pluginapi.PreferredAllocationResponse, error) allocate(devs []string) (*pluginapi.AllocateResponse, error) preStartContainer(devs []string) (*pluginapi.PreStartContainerResponse, error) callback(resourceName string, devices []pluginapi.Device) @@ -138,6 +139,22 @@ func (e *endpointImpl) setStopTime(t time.Time) { e.stopTime = t } +// getPreferredAllocation issues GetPreferredAllocation gRPC call to the device plugin. +func (e *endpointImpl) getPreferredAllocation(available, mustInclude []string, size int) (*pluginapi.PreferredAllocationResponse, error) { + if e.isStopped() { + return nil, fmt.Errorf(errEndpointStopped, e) + } + return e.client.GetPreferredAllocation(context.Background(), &pluginapi.PreferredAllocationRequest{ + ContainerRequests: []*pluginapi.ContainerPreferredAllocationRequest{ + { + AvailableDeviceIDs: available, + MustIncludeDeviceIDs: mustInclude, + AllocationSize: int32(size), + }, + }, + }) +} + // allocate issues Allocate gRPC call to the device plugin. func (e *endpointImpl) allocate(devs []string) (*pluginapi.AllocateResponse, error) { if e.isStopped() { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager.go index 65b91393ae4..5d1925f9458 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager.go @@ -27,7 +27,7 @@ import ( "time" "google.golang.org/grpc" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" @@ -43,12 +43,11 @@ import ( cputopology "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology" "k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/checkpoint" "k8s.io/kubernetes/pkg/kubelet/cm/topologymanager" - "k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/bitmask" "k8s.io/kubernetes/pkg/kubelet/config" "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/metrics" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" "k8s.io/kubernetes/pkg/util/selinux" ) @@ -391,7 +390,7 @@ func (m *ManagerImpl) Allocate(pod *v1.Pod, container *v1.Container) error { } // UpdatePluginResources updates node resources based on devices already allocated to pods. -func (m *ManagerImpl) UpdatePluginResources(node *schedulernodeinfo.NodeInfo, attrs *lifecycle.PodAdmitAttributes) error { +func (m *ManagerImpl) UpdatePluginResources(node *schedulerframework.NodeInfo, attrs *lifecycle.PodAdmitAttributes) error { pod := attrs.Pod m.mutex.Lock() @@ -658,49 +657,107 @@ func (m *ManagerImpl) devicesToAllocate(podUID, contName, resource string, requi return nil, nil } klog.V(3).Infof("Needs to allocate %d %q for pod %q container %q", needed, resource, podUID, contName) - // Needs to allocate additional devices. + // Check if resource registered with devicemanager if _, ok := m.healthyDevices[resource]; !ok { return nil, fmt.Errorf("can't allocate unregistered device %s", resource) } - devices = sets.NewString() - // Allocates from reusableDevices list first. - for device := range reusableDevices { - devices.Insert(device) - needed-- - if needed == 0 { - return devices, nil + + // Declare the list of allocated devices. + // This will be populated and returned below. + allocated := sets.NewString() + + // Create a closure to help with device allocation + // Returns 'true' once no more devices need to be allocated. + allocateRemainingFrom := func(devices sets.String) bool { + for device := range devices.Difference(allocated) { + m.allocatedDevices[resource].Insert(device) + allocated.Insert(device) + needed-- + if needed == 0 { + return true + } } + return false } + + // Allocates from reusableDevices list first. + if allocateRemainingFrom(reusableDevices) { + return allocated, nil + } + // Needs to allocate additional devices. if m.allocatedDevices[resource] == nil { m.allocatedDevices[resource] = sets.NewString() } + // Gets Devices in use. devicesInUse := m.allocatedDevices[resource] - // Gets a list of available devices. + // Gets Available devices. available := m.healthyDevices[resource].Difference(devicesInUse) if available.Len() < needed { return nil, fmt.Errorf("requested number of devices unavailable for %s. Requested: %d, Available: %d", resource, needed, available.Len()) } - // By default, pull devices from the unsorted list of available devices. - allocated := available.UnsortedList()[:needed] - // If topology alignment is desired, update allocated to the set of devices - // with the best alignment. - hint := m.topologyAffinityStore.GetAffinity(podUID, contName) - if m.deviceHasTopologyAlignment(resource) && hint.NUMANodeAffinity != nil { - allocated = m.takeByTopology(resource, available, hint.NUMANodeAffinity, needed) + + // Filters available Devices based on NUMA affinity. + aligned, unaligned, noAffinity := m.filterByAffinity(podUID, contName, resource, available) + + // If we can allocate all remaining devices from the set of aligned ones, then + // give the plugin the chance to influence which ones to allocate from that set. + if needed < aligned.Len() { + // First allocate from the preferred devices list (if available). + preferred, err := m.callGetPreferredAllocationIfAvailable(podUID, contName, resource, aligned.Union(allocated), allocated, required) + if err != nil { + return nil, err + } + if allocateRemainingFrom(preferred.Intersection(aligned)) { + return allocated, nil + } + // Then fallback to allocate from the aligned set if no preferred list + // is returned (or not enough devices are returned in that list). + if allocateRemainingFrom(aligned) { + return allocated, nil + } + + return nil, fmt.Errorf("unexpectedly allocated less resources than required. Requested: %d, Got: %d", required, required-needed) } - // Updates m.allocatedDevices with allocated devices to prevent them - // from being allocated to other pods/containers, given that we are - // not holding lock during the rpc call. - for _, device := range allocated { - m.allocatedDevices[resource].Insert(device) - devices.Insert(device) + + // If we can't allocate all remaining devices from the set of aligned ones, + // then start by first allocating all of the aligned devices (to ensure + // that the alignment guaranteed by the TopologyManager is honored). + if allocateRemainingFrom(aligned) { + return allocated, nil } - return devices, nil + + // Then give the plugin the chance to influence the decision on any + // remaining devices to allocate. + preferred, err := m.callGetPreferredAllocationIfAvailable(podUID, contName, resource, available.Union(allocated), allocated, required) + if err != nil { + return nil, err + } + if allocateRemainingFrom(preferred.Intersection(available)) { + return allocated, nil + } + + // Finally, if the plugin did not return a preferred allocation (or didn't + // return a large enough one), then fall back to allocating the remaining + // devices from the 'unaligned' and 'noAffinity' sets. + if allocateRemainingFrom(unaligned) { + return allocated, nil + } + if allocateRemainingFrom(noAffinity) { + return allocated, nil + } + + return nil, fmt.Errorf("unexpectedly allocated less resources than required. Requested: %d, Got: %d", required, required-needed) } -func (m *ManagerImpl) takeByTopology(resource string, available sets.String, affinity bitmask.BitMask, request int) []string { +func (m *ManagerImpl) filterByAffinity(podUID, contName, resource string, available sets.String) (sets.String, sets.String, sets.String) { + // If alignment information is not available, just pass the available list back. + hint := m.topologyAffinityStore.GetAffinity(podUID, contName) + if !m.deviceHasTopologyAlignment(resource) || hint.NUMANodeAffinity == nil { + return sets.NewString(), sets.NewString(), available + } + // Build a map of NUMA Nodes to the devices associated with them. A // device may be associated to multiple NUMA nodes at the same time. If an // available device does not have any NUMA Nodes associated with it, add it @@ -754,7 +811,7 @@ func (m *ManagerImpl) takeByTopology(resource string, available sets.String, aff if perNodeDevices[n].Has(d) { if n == nodeWithoutTopology { withoutTopology = append(withoutTopology, d) - } else if affinity.IsSet(n) { + } else if hint.NUMANodeAffinity.IsSet(n) { fromAffinity = append(fromAffinity, d) } else { notFromAffinity = append(notFromAffinity, d) @@ -764,8 +821,8 @@ func (m *ManagerImpl) takeByTopology(resource string, available sets.String, aff } } - // Concatenate the lists above return the first 'request' devices from it.. - return append(append(fromAffinity, notFromAffinity...), withoutTopology...)[:request] + // Return all three lists containing the full set of devices across them. + return sets.NewString(fromAffinity...), sets.NewString(notFromAffinity...), sets.NewString(withoutTopology...) } // allocateContainerResources attempts to allocate all of required device @@ -920,13 +977,39 @@ func (m *ManagerImpl) callPreStartContainerIfNeeded(podUID, contName, resource s return nil } +// callGetPreferredAllocationIfAvailable issues GetPreferredAllocation grpc +// call for device plugin resource with GetPreferredAllocationAvailable option set. +func (m *ManagerImpl) callGetPreferredAllocationIfAvailable(podUID, contName, resource string, available, mustInclude sets.String, size int) (sets.String, error) { + eI, ok := m.endpoints[resource] + if !ok { + return nil, fmt.Errorf("endpoint not found in cache for a registered resource: %s", resource) + } + + if eI.opts == nil || !eI.opts.GetPreferredAllocationAvailable { + klog.V(4).Infof("Plugin options indicate to skip GetPreferredAllocation for resource: %s", resource) + return nil, nil + } + + m.mutex.Unlock() + klog.V(4).Infof("Issuing a GetPreferredAllocation call for container, %s, of pod %s", contName, podUID) + resp, err := eI.e.getPreferredAllocation(available.UnsortedList(), mustInclude.UnsortedList(), size) + m.mutex.Lock() + if err != nil { + return nil, fmt.Errorf("device plugin GetPreferredAllocation rpc failed with err: %v", err) + } + if resp != nil && len(resp.ContainerResponses) > 0 { + return sets.NewString(resp.ContainerResponses[0].DeviceIDs...), nil + } + return sets.NewString(), nil +} + // sanitizeNodeAllocatable scans through allocatedDevices in the device manager // and if necessary, updates allocatableResource in nodeInfo to at least equal to // the allocated capacity. This allows pods that have already been scheduled on // the node to pass GeneralPredicates admission checking even upon device plugin failure. -func (m *ManagerImpl) sanitizeNodeAllocatable(node *schedulernodeinfo.NodeInfo) { - var newAllocatableResource *schedulernodeinfo.Resource - allocatableResource := node.AllocatableResource() +func (m *ManagerImpl) sanitizeNodeAllocatable(node *schedulerframework.NodeInfo) { + var newAllocatableResource *schedulerframework.Resource + allocatableResource := node.Allocatable if allocatableResource.ScalarResources == nil { allocatableResource.ScalarResources = make(map[v1.ResourceName]int64) } @@ -944,7 +1027,7 @@ func (m *ManagerImpl) sanitizeNodeAllocatable(node *schedulernodeinfo.NodeInfo) newAllocatableResource.ScalarResources[v1.ResourceName(resource)] = int64(needed) } if newAllocatableResource != nil { - node.SetAllocatableResource(newAllocatableResource) + node.Allocatable = newAllocatableResource } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager_stub.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager_stub.go index ed6fb41e58e..4c42686045c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager_stub.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager_stub.go @@ -23,7 +23,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/config" "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) // ManagerStub provides a simple stub implementation for the Device Manager. @@ -50,7 +50,7 @@ func (h *ManagerStub) Allocate(pod *v1.Pod, container *v1.Container) error { } // UpdatePluginResources simply returns nil. -func (h *ManagerStub) UpdatePluginResources(node *schedulernodeinfo.NodeInfo, attrs *lifecycle.PodAdmitAttributes) error { +func (h *ManagerStub) UpdatePluginResources(node *schedulerframework.NodeInfo, attrs *lifecycle.PodAdmitAttributes) error { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/pod_devices.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/pod_devices.go index 4e45facf434..399bf21999c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/pod_devices.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/pod_devices.go @@ -17,7 +17,7 @@ limitations under the License. package devicemanager import ( - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/sets" pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/topology_hints.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/topology_hints.go index ff7c7e9fb2d..ab5b0859b3d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/topology_hints.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/topology_hints.go @@ -19,7 +19,7 @@ package devicemanager import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/klog" + "k8s.io/klog/v2" pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1" "k8s.io/kubernetes/pkg/kubelet/cm/topologymanager" "k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/bitmask" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/types.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/types.go index 9fcafe53ec4..0b891b129a4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/types.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/types.go @@ -26,7 +26,7 @@ import ( kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) // Manager manages all the Device Plugins running on a node. @@ -44,7 +44,7 @@ type Manager interface { // UpdatePluginResources updates node resources based on devices already // allocated to pods. The node object is provided for the device manager to // update the node capacity to reflect the currently available devices. - UpdatePluginResources(node *schedulernodeinfo.NodeInfo, attrs *lifecycle.PodAdmitAttributes) error + UpdatePluginResources(node *schedulerframework.NodeInfo, attrs *lifecycle.PodAdmitAttributes) error // Stop stops the manager. Stop() error diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_linux.go index 82bb674bfa1..9b115ab5380 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_linux.go @@ -27,7 +27,7 @@ import ( libcontainercgroups "github.com/opencontainers/runc/libcontainer/cgroups" - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/kubernetes/pkg/api/v1/resource" @@ -38,8 +38,11 @@ import ( ) const ( - // Taken from lmctfy https://github.com/google/lmctfy/blob/master/lmctfy/controllers/cpu_controller.cc - MinShares = 2 + // These limits are defined in the kernel: + // https://github.com/torvalds/linux/blob/0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7/kernel/sched/sched.h#L427-L428 + MinShares = 2 + MaxShares = 262144 + SharesPerCPU = 1024 MilliCPUToCPU = 1000 @@ -88,6 +91,9 @@ func MilliCPUToShares(milliCPU int64) uint64 { if shares < MinShares { return MinShares } + if shares > MaxShares { + return MaxShares + } return uint64(shares) } @@ -276,9 +282,14 @@ func GetPodCgroupNameSuffix(podUID types.UID) string { } // NodeAllocatableRoot returns the literal cgroup path for the node allocatable cgroup -func NodeAllocatableRoot(cgroupRoot, cgroupDriver string) string { - root := ParseCgroupfsToCgroupName(cgroupRoot) - nodeAllocatableRoot := NewCgroupName(root, defaultNodeAllocatableCgroupName) +func NodeAllocatableRoot(cgroupRoot string, cgroupsPerQOS bool, cgroupDriver string) string { + nodeAllocatableRoot := ParseCgroupfsToCgroupName(cgroupRoot) + if cgroupsPerQOS { + nodeAllocatableRoot = NewCgroupName(nodeAllocatableRoot, defaultNodeAllocatableCgroupName) + } + if libcontainerCgroupManagerType(cgroupDriver) == libcontainerSystemd { + return nodeAllocatableRoot.ToSystemd() + } return nodeAllocatableRoot.ToCgroupfs() } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_unsupported.go index f8b6fd31b0d..fe9d532beb9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_unsupported.go @@ -61,7 +61,7 @@ func GetPodCgroupNameSuffix(podUID types.UID) string { } // NodeAllocatableRoot returns the literal cgroup path for the node allocatable cgroup -func NodeAllocatableRoot(cgroupRoot, cgroupDriver string) string { +func NodeAllocatableRoot(cgroupRoot string, cgroupsPerQOS bool, cgroupDriver string) string { return "" } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/node_container_manager_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/node_container_manager_linux.go index 96eb8bdfba0..fc7864dacc2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/node_container_manager_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/node_container_manager_linux.go @@ -26,7 +26,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/stats/pidlimit" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/pod_container_manager_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/pod_container_manager_linux.go index 02059eeed18..f05da3f5035 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/pod_container_manager_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/pod_container_manager_linux.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" v1qos "k8s.io/kubernetes/pkg/apis/core/v1/helper/qos" kubefeatures "k8s.io/kubernetes/pkg/features" ) @@ -187,7 +187,7 @@ func (m *podContainerManagerImpl) tryKillingCgroupProcesses(podCgroup CgroupName func (m *podContainerManagerImpl) Destroy(podCgroup CgroupName) error { // Try killing all the processes attached to the pod cgroup if err := m.tryKillingCgroupProcesses(podCgroup); err != nil { - klog.V(3).Infof("failed to kill all the processes attached to the %v cgroups", podCgroup) + klog.Warningf("failed to kill all the processes attached to the %v cgroups", podCgroup) return fmt.Errorf("failed to kill all the processes attached to the %v cgroups : %v", podCgroup, err) } @@ -197,6 +197,7 @@ func (m *podContainerManagerImpl) Destroy(podCgroup CgroupName) error { ResourceParameters: &ResourceConfig{}, } if err := m.cgroupManager.Destroy(containerConfig); err != nil { + klog.Warningf("failed to delete cgroup paths for %v : %v", podCgroup, err) return fmt.Errorf("failed to delete cgroup paths for %v : %v", podCgroup, err) } return nil @@ -292,7 +293,8 @@ func (m *podContainerManagerImpl) GetAllPodsFromCgroups() (map[types.UID]CgroupN // enabled, so Exists() returns true always as the cgroupRoot // is expected to always exist. type podContainerManagerNoop struct { - cgroupRoot CgroupName + cgroupRoot CgroupName + rootlessSystemd bool } // Make sure that podContainerManagerStub implements the PodContainerManager interface @@ -307,6 +309,10 @@ func (m *podContainerManagerNoop) EnsureExists(_ *v1.Pod) error { } func (m *podContainerManagerNoop) GetPodContainerName(_ *v1.Pod) (CgroupName, string) { + if m.rootlessSystemd { + // "user.slice" is set to PodConfig.Linux.CgroupParent + return m.cgroupRoot, "user.slice" + } return m.cgroupRoot, "" } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/qos_container_manager_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/qos_container_manager_linux.go index c097f801eb2..eb8fc7d3da3 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/qos_container_manager_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/qos_container_manager_linux.go @@ -22,7 +22,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/wait" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/BUILD index 5d15446fd2e..deb00046ac7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/BUILD @@ -18,7 +18,7 @@ go_library( "//pkg/kubelet/cm/topologymanager/bitmask:go_default_library", "//pkg/kubelet/lifecycle:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/fake_topology_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/fake_topology_manager.go index f5ae1ef7ec8..95b19345d60 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/fake_topology_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/fake_topology_manager.go @@ -18,7 +18,7 @@ package topologymanager import ( "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/lifecycle" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy.go index 3921bcc24aa..08a4d9e28e2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy.go @@ -17,7 +17,7 @@ limitations under the License. package topologymanager import ( - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/bitmask" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy_restricted.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy_restricted.go index c3321c2030e..5ee2f245d63 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy_restricted.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy_restricted.go @@ -35,10 +35,7 @@ func (p *restrictedPolicy) Name() string { } func (p *restrictedPolicy) canAdmitPodResult(hint *TopologyHint) bool { - if !hint.Preferred { - return false - } - return true + return hint.Preferred } func (p *restrictedPolicy) Merge(providersHints []map[string][]TopologyHint) (TopologyHint, bool) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy_single_numa_node.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy_single_numa_node.go index 0e94c282d48..e26f4cb796b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy_single_numa_node.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy_single_numa_node.go @@ -40,10 +40,7 @@ func (p *singleNumaNodePolicy) Name() string { } func (p *singleNumaNodePolicy) canAdmitPodResult(hint *TopologyHint) bool { - if !hint.Preferred { - return false - } - return true + return hint.Preferred } // Return hints that have valid bitmasks with exactly one bit set. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/topology_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/topology_manager.go index b5b50772d88..04f0d0ecbdc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/topology_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/topology_manager.go @@ -21,7 +21,7 @@ import ( "sync" "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" cputopology "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology" "k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/bitmask" "k8s.io/kubernetes/pkg/kubelet/lifecycle" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/config/BUILD index b34fb86f199..b090d49d644 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/BUILD @@ -25,8 +25,6 @@ go_library( "//pkg/apis/core/v1:go_default_library", "//pkg/apis/core/validation:go_default_library", "//pkg/features:go_default_library", - "//pkg/kubelet/checkpoint:go_default_library", - "//pkg/kubelet/checkpointmanager:go_default_library", "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/events:go_default_library", "//pkg/kubelet/types:go_default_library", @@ -46,7 +44,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/io:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:android": [ @@ -77,8 +75,6 @@ go_test( "//pkg/apis/core:go_default_library", "//pkg/apis/core/v1:go_default_library", "//pkg/apis/core/validation:go_default_library", - "//pkg/kubelet/checkpoint:go_default_library", - "//pkg/kubelet/checkpointmanager:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/securitycontext:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go index 6ddf219b4f1..84280cd435e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go @@ -43,7 +43,7 @@ import ( kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/util/hash" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -138,7 +138,7 @@ func tryDecodeSinglePod(data []byte, defaultFn defaultFunc) (parsed bool, pod *v opts := validation.PodValidationOptions{ AllowMultipleHugePageResources: utilfeature.DefaultFeatureGate.Enabled(features.HugePageStorageMediumSize), } - if errs := validation.ValidatePod(newPod, opts); len(errs) > 0 { + if errs := validation.ValidatePodCreate(newPod, opts); len(errs) > 0 { return true, pod, fmt.Errorf("invalid pod: %v", errs) } v1Pod := &v1.Pod{} @@ -172,7 +172,7 @@ func tryDecodePodList(data []byte, defaultFn defaultFunc) (parsed bool, pods v1. if err = defaultFn(newPod); err != nil { return true, pods, err } - if errs := validation.ValidatePod(newPod, opts); len(errs) > 0 { + if errs := validation.ValidatePodCreate(newPod, opts); len(errs) > 0 { err = fmt.Errorf("invalid pod: %v", errs) return true, pods, err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/config.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/config.go index bf37b56ace9..b04fdb8f967 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/config.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/config.go @@ -25,9 +25,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/tools/record" - "k8s.io/klog" - "k8s.io/kubernetes/pkg/kubelet/checkpoint" - "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/events" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" @@ -63,9 +61,8 @@ type PodConfig struct { updates chan kubetypes.PodUpdate // contains the list of all configured sources - sourcesLock sync.Mutex - sources sets.String - checkpointManager checkpointmanager.CheckpointManager + sourcesLock sync.Mutex + sources sets.String } // NewPodConfig creates an object that can merge many configuration sources into a stream @@ -111,24 +108,6 @@ func (c *PodConfig) Sync() { c.pods.Sync() } -// Restore restores pods from the checkpoint path, *once* -func (c *PodConfig) Restore(path string, updates chan<- interface{}) error { - if c.checkpointManager != nil { - return nil - } - var err error - c.checkpointManager, err = checkpointmanager.NewCheckpointManager(path) - if err != nil { - return err - } - pods, err := checkpoint.LoadPods(c.checkpointManager) - if err != nil { - return err - } - updates <- kubetypes.PodUpdate{Pods: pods, Op: kubetypes.RESTORE, Source: kubetypes.ApiserverSource} - return nil -} - // podStorage manages the current pod state at any point in time and ensures updates // to the channel are delivered in order. Note that this object is an in-memory source of // "truth" and on creation contains zero entries. Once all previously read sources are @@ -173,7 +152,7 @@ func (s *podStorage) Merge(source string, change interface{}) error { defer s.updateLock.Unlock() seenBefore := s.sourcesSeen.Has(source) - adds, updates, deletes, removes, reconciles, restores := s.merge(source, change) + adds, updates, deletes, removes, reconciles := s.merge(source, change) firstSet := !seenBefore && s.sourcesSeen.Has(source) // deliver update notifications @@ -191,9 +170,6 @@ func (s *podStorage) Merge(source string, change interface{}) error { if len(deletes.Pods) > 0 { s.updates <- *deletes } - if len(restores.Pods) > 0 { - s.updates <- *restores - } if firstSet && len(adds.Pods) == 0 && len(updates.Pods) == 0 && len(deletes.Pods) == 0 { // Send an empty update when first seeing the source and there are // no ADD or UPDATE or DELETE pods from the source. This signals kubelet that @@ -230,7 +206,7 @@ func (s *podStorage) Merge(source string, change interface{}) error { return nil } -func (s *podStorage) merge(source string, change interface{}) (adds, updates, deletes, removes, reconciles, restores *kubetypes.PodUpdate) { +func (s *podStorage) merge(source string, change interface{}) (adds, updates, deletes, removes, reconciles *kubetypes.PodUpdate) { s.podLock.Lock() defer s.podLock.Unlock() @@ -239,7 +215,6 @@ func (s *podStorage) merge(source string, change interface{}) (adds, updates, de deletePods := []*v1.Pod{} removePods := []*v1.Pod{} reconcilePods := []*v1.Pod{} - restorePods := []*v1.Pod{} pods := s.pods[source] if pods == nil { @@ -312,9 +287,6 @@ func (s *podStorage) merge(source string, change interface{}) (adds, updates, de removePods = append(removePods, existing) } } - case kubetypes.RESTORE: - klog.V(4).Infof("Restoring pods for source %s", source) - restorePods = append(restorePods, update.Pods...) default: klog.Warningf("Received invalid update type: %v", update) @@ -328,9 +300,8 @@ func (s *podStorage) merge(source string, change interface{}) (adds, updates, de deletes = &kubetypes.PodUpdate{Op: kubetypes.DELETE, Pods: copyPods(deletePods), Source: source} removes = &kubetypes.PodUpdate{Op: kubetypes.REMOVE, Pods: copyPods(removePods), Source: source} reconciles = &kubetypes.PodUpdate{Op: kubetypes.RECONCILE, Pods: copyPods(reconcilePods), Source: source} - restores = &kubetypes.PodUpdate{Op: kubetypes.RESTORE, Pods: copyPods(restorePods), Source: source} - return adds, updates, deletes, removes, reconciles, restores + return adds, updates, deletes, removes, reconciles } func (s *podStorage) markSourceSet(source string) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/file.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/file.go index dd3b38f7c4a..68b5d3d22bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/file.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/file.go @@ -24,7 +24,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_linux.go index ad730e47e34..f1938afa1a5 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_linux.go @@ -26,7 +26,7 @@ import ( "time" "github.com/fsnotify/fsnotify" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/wait" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_unsupported.go index e6f02de0fc9..5b58246763a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_unsupported.go @@ -21,7 +21,7 @@ package config import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" ) func (s *sourceFile) startWatch() { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/flags.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/flags.go index dfdd5d0ab5f..bc1b13abcf0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/flags.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/flags.go @@ -46,8 +46,6 @@ type ContainerRuntimeOptions struct { // DockershimRootDirectory is the path to the dockershim root directory. Defaults to // /var/lib/dockershim if unset. Exposed for integration testing (e.g. in OpenShift). DockershimRootDirectory string - // Enable dockershim only mode. - ExperimentalDockershim bool // PodSandboxImage is the image whose network/ipc namespaces // containers in each pod will use. PodSandboxImage string @@ -89,8 +87,6 @@ func (s *ContainerRuntimeOptions) AddFlags(fs *pflag.FlagSet) { fs.MarkDeprecated("redirect-container-streaming", "Container streaming redirection will be removed from the kubelet in v1.20, and this flag will be removed in v1.22. For more details, see http://git.k8s.io/enhancements/keps/sig-node/20191205-container-streaming-requests.md") // Docker-specific settings. - fs.BoolVar(&s.ExperimentalDockershim, "experimental-dockershim", s.ExperimentalDockershim, "Enable dockershim only mode. In this mode, kubelet will only start dockershim without any other functionalities. This flag only serves test purpose, please do not use it unless you are conscious of what you are doing. [default=false]") - fs.MarkHidden("experimental-dockershim") fs.StringVar(&s.DockershimRootDirectory, "experimental-dockershim-root-directory", s.DockershimRootDirectory, "Path to the dockershim root directory.") fs.MarkHidden("experimental-dockershim-root-directory") fs.StringVar(&s.PodSandboxImage, "pod-infra-container-image", s.PodSandboxImage, fmt.Sprintf("The image whose network/ipc namespaces containers in each pod will use. %s", dockerOnlyWarning)) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/http.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/http.go index 8beb3c99835..710abb089b0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/http.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/http.go @@ -28,7 +28,7 @@ import ( kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" utilio "k8s.io/utils/io" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/container/BUILD index 6d99107060c..970139acaeb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/BUILD @@ -5,7 +5,6 @@ go_library( srcs = [ "cache.go", "container_gc.go", - "container_reference_manager.go", "helpers.go", "os.go", "ref.go", @@ -37,7 +36,7 @@ go_library( "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", "//third_party/forked/golang/expansion:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_gc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_gc.go index 790596b2289..1b3cb192c21 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_gc.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_gc.go @@ -20,11 +20,11 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" ) -// Specified a policy for garbage collecting containers. -type ContainerGCPolicy struct { +// GCPolicy specifies a policy for garbage collecting containers. +type GCPolicy struct { // Minimum age at which a container can be garbage collected, zero for no limit. MinAge time.Duration @@ -36,10 +36,10 @@ type ContainerGCPolicy struct { MaxContainers int } -// Manages garbage collection of dead containers. +// GC manages garbage collection of dead containers. // // Implementation is thread-compatible. -type ContainerGC interface { +type GC interface { // Garbage collect containers. GarbageCollect() error // Deletes all unused containers, including containers belonging to pods that are terminated but not deleted @@ -58,14 +58,14 @@ type realContainerGC struct { runtime Runtime // Policy for garbage collection. - policy ContainerGCPolicy + policy GCPolicy // sourcesReadyProvider provides the readiness of kubelet configuration sources. sourcesReadyProvider SourcesReadyProvider } -// New ContainerGC instance with the specified policy. -func NewContainerGC(runtime Runtime, policy ContainerGCPolicy, sourcesReadyProvider SourcesReadyProvider) (ContainerGC, error) { +// NewContainerGC creates a new instance of GC with the specified policy. +func NewContainerGC(runtime Runtime, policy GCPolicy, sourcesReadyProvider SourcesReadyProvider) (GC, error) { if policy.MinAge < 0 { return nil, fmt.Errorf("invalid minimum garbage collection age: %v", policy.MinAge) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_reference_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_reference_manager.go deleted file mode 100644 index d41d05a9332..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_reference_manager.go +++ /dev/null @@ -1,60 +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 container - -import ( - "sync" - - "k8s.io/api/core/v1" -) - -// RefManager manages the references for the containers. -// The references are used for reporting events such as creation, -// failure, etc. This manager is thread-safe, no locks are necessary -// for the caller. -type RefManager struct { - sync.RWMutex - containerIDToRef map[ContainerID]*v1.ObjectReference -} - -// NewRefManager creates and returns a container reference manager -// with empty contents. -func NewRefManager() *RefManager { - return &RefManager{containerIDToRef: make(map[ContainerID]*v1.ObjectReference)} -} - -// SetRef stores a reference to a pod's container, associating it with the given container ID. -func (c *RefManager) SetRef(id ContainerID, ref *v1.ObjectReference) { - c.Lock() - defer c.Unlock() - c.containerIDToRef[id] = ref -} - -// ClearRef forgets the given container id and its associated container reference. -func (c *RefManager) ClearRef(id ContainerID) { - c.Lock() - defer c.Unlock() - delete(c.containerIDToRef, id) -} - -// GetRef returns the container reference of the given ID, or (nil, false) if none is stored. -func (c *RefManager) GetRef(id ContainerID) (ref *v1.ObjectReference, ok bool) { - c.RLock() - defer c.RUnlock() - ref, ok = c.containerIDToRef[id] - return ref, ok -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go index b15be2d7500..87bb684fc62 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go @@ -22,7 +22,7 @@ import ( "hash/fnv" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" @@ -102,14 +102,14 @@ func HashContainer(container *v1.Container) uint64 { hash := fnv.New32a() // Omit nil or empty field when calculating hash value // Please see https://github.com/kubernetes/kubernetes/issues/53644 - containerJson, _ := json.Marshal(container) - hashutil.DeepHashObject(hash, containerJson) + containerJSON, _ := json.Marshal(container) + hashutil.DeepHashObject(hash, containerJSON) return uint64(hash.Sum32()) } -// EnvVarsToMap constructs a map of environment name to value from a slice +// envVarsToMap constructs a map of environment name to value from a slice // of env vars. -func EnvVarsToMap(envs []EnvVar) map[string]string { +func envVarsToMap(envs []EnvVar) map[string]string { result := map[string]string{} for _, env := range envs { result[env.Name] = env.Value @@ -117,9 +117,9 @@ func EnvVarsToMap(envs []EnvVar) map[string]string { return result } -// V1EnvVarsToMap constructs a map of environment name to value from a slice +// v1EnvVarsToMap constructs a map of environment name to value from a slice // of env vars. -func V1EnvVarsToMap(envs []v1.EnvVar) map[string]string { +func v1EnvVarsToMap(envs []v1.EnvVar) map[string]string { result := map[string]string{} for _, env := range envs { result[env.Name] = env.Value @@ -132,7 +132,7 @@ func V1EnvVarsToMap(envs []v1.EnvVar) map[string]string { // container environment definitions. This does *not* include valueFrom substitutions. // TODO: callers should use ExpandContainerCommandAndArgs with a fully resolved list of environment. func ExpandContainerCommandOnlyStatic(containerCommand []string, envs []v1.EnvVar) (command []string) { - mapping := expansion.MappingFuncFor(V1EnvVarsToMap(envs)) + mapping := expansion.MappingFuncFor(v1EnvVarsToMap(envs)) if len(containerCommand) != 0 { for _, cmd := range containerCommand { command = append(command, expansion.Expand(cmd, mapping)) @@ -141,9 +141,10 @@ func ExpandContainerCommandOnlyStatic(containerCommand []string, envs []v1.EnvVa return command } +// ExpandContainerVolumeMounts expands the subpath of the given VolumeMount by replacing variable references with the values of given EnvVar. func ExpandContainerVolumeMounts(mount v1.VolumeMount, envs []EnvVar) (string, error) { - envmap := EnvVarsToMap(envs) + envmap := envVarsToMap(envs) missingKeys := sets.NewString() expanded := expansion.Expand(mount.SubPathExpr, func(key string) string { value, ok := envmap[key] @@ -159,8 +160,9 @@ func ExpandContainerVolumeMounts(mount v1.VolumeMount, envs []EnvVar) (string, e return expanded, nil } +// ExpandContainerCommandAndArgs expands the given Container's command by replacing variable references `with the values of given EnvVar. func ExpandContainerCommandAndArgs(container *v1.Container, envs []EnvVar) (command []string, args []string) { - mapping := expansion.MappingFuncFor(EnvVarsToMap(envs)) + mapping := expansion.MappingFuncFor(envVarsToMap(envs)) if len(container.Command) != 0 { for _, cmd := range container.Command { @@ -177,7 +179,7 @@ func ExpandContainerCommandAndArgs(container *v1.Container, envs []EnvVar) (comm return command, args } -// Create an event recorder to record object's event except implicitly required container's, like infra container. +// FilterEventRecorder creates an event recorder to record object's event except implicitly required container's, like infra container. func FilterEventRecorder(recorder record.EventRecorder) record.EventRecorder { return &innerEventRecorder{ recorder: recorder, @@ -220,11 +222,13 @@ func (irecorder *innerEventRecorder) AnnotatedEventf(object runtime.Object, anno } +// IsHostNetworkPod returns whether the host networking requested for the given Pod. // Pod must not be nil. func IsHostNetworkPod(pod *v1.Pod) bool { return pod.Spec.HostNetwork } +// ConvertPodStatusToRunningPod returns Pod given PodStatus and container runtime string. // TODO(random-liu): Convert PodStatus to running Pod, should be deprecated soon func ConvertPodStatusToRunningPod(runtimeName string, podStatus *PodStatus) Pod { runningPod := Pod{ @@ -258,11 +262,11 @@ func ConvertPodStatusToRunningPod(runtimeName string, podStatus *PodStatus) Pod } // SandboxToContainerState converts runtimeapi.PodSandboxState to -// kubecontainer.ContainerState. +// kubecontainer.State. // This is only needed because we need to return sandboxes as if they were // kubecontainer.Containers to avoid substantial changes to PLEG. // TODO: Remove this once it becomes obsolete. -func SandboxToContainerState(state runtimeapi.PodSandboxState) ContainerState { +func SandboxToContainerState(state runtimeapi.PodSandboxState) State { switch state { case runtimeapi.PodSandboxState_SANDBOX_READY: return ContainerStateRunning @@ -283,7 +287,7 @@ func FormatPod(pod *Pod) string { // GetContainerSpec gets the container spec by containerName. func GetContainerSpec(pod *v1.Pod, containerName string) *v1.Container { var containerSpec *v1.Container - podutil.VisitContainers(&pod.Spec, func(c *v1.Container) bool { + podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), func(c *v1.Container, containerType podutil.ContainerType) bool { if containerName == c.Name { containerSpec = c return false @@ -296,7 +300,7 @@ func GetContainerSpec(pod *v1.Pod, containerName string) *v1.Container { // HasPrivilegedContainer returns true if any of the containers in the pod are privileged. func HasPrivilegedContainer(pod *v1.Pod) bool { var hasPrivileged bool - podutil.VisitContainers(&pod.Spec, func(c *v1.Container) bool { + podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), func(c *v1.Container, containerType podutil.ContainerType) bool { if c.SecurityContext != nil && c.SecurityContext.Privileged != nil && *c.SecurityContext.Privileged { hasPrivileged = true return false diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go index bd27ae9f079..dae825b957b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go @@ -38,6 +38,9 @@ type OSInterface interface { Pipe() (r *os.File, w *os.File, err error) ReadDir(dirname string) ([]os.FileInfo, error) Glob(pattern string) ([]string, error) + Open(name string) (*os.File, error) + OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) + Rename(oldpath, newpath string) error } // RealOS is used to dispatch the real system level operations. @@ -105,3 +108,18 @@ func (RealOS) ReadDir(dirname string) ([]os.FileInfo, error) { func (RealOS) Glob(pattern string) ([]string, error) { return filepath.Glob(pattern) } + +// Open will call os.Open to return the file. +func (RealOS) Open(name string) (*os.File, error) { + return os.Open(name) +} + +// OpenFile will call os.OpenFile to return the file. +func (RealOS) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) { + return os.OpenFile(name, flag, perm) +} + +// Rename will call os.Rename to rename a file. +func (RealOS) Rename(oldpath, newpath string) error { + return os.Rename(oldpath, newpath) +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go index 7e3f188bc88..3d366dc188c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go @@ -19,14 +19,15 @@ package container import ( "fmt" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" ref "k8s.io/client-go/tools/reference" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/features" ) -var ImplicitContainerPrefix string = "implicitly required container " +// ImplicitContainerPrefix is a container name prefix that will indicate that container was started implicitly (like the pod infra container). +var ImplicitContainerPrefix = "implicitly required container " // GenerateContainerRef returns an *v1.ObjectReference which references the given container // within the given pod. Returns an error if the reference can't be constructed or the diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/resize.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/resize.go index 34e40a95b46..921c43564b4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/resize.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/resize.go @@ -21,7 +21,7 @@ import ( "k8s.io/client-go/tools/remotecommand" ) -// handleResizing spawns a goroutine that processes the resize channel, calling resizeFunc for each +// HandleResizing spawns a goroutine that processes the resize channel, calling resizeFunc for each // remotecommand.TerminalSize received from the channel. The resize channel must be closed elsewhere to stop the // goroutine. func HandleResizing(resize <-chan remotecommand.TerminalSize, resizeFunc func(size remotecommand.TerminalSize)) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go index 71f6dc20f7e..30f815b0718 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go @@ -25,15 +25,16 @@ import ( "strings" "time" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/remotecommand" "k8s.io/client-go/util/flowcontrol" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/volume" ) +// Version interface allow to consume the runtime versions - compare and format to string. type Version interface { // Compare compares two versions of the runtime. On success it returns -1 // if the version is less than the other, 1 if it is greater than the other, @@ -47,7 +48,11 @@ type Version interface { // value of a Container's Image field, but in the future it will include more detailed // information about the different image types. type ImageSpec struct { + // ID of the image. Image string + // The annotations for the image. + // This should be passed to CRI during image pulls and returned when images are listed. + Annotations []Annotation } // ImageStats contains statistics about all the images currently available. @@ -83,13 +88,13 @@ type Runtime interface { GetPods(all bool) ([]*Pod, error) // GarbageCollect removes dead containers using the specified container gc policy // If allSourcesReady is not true, it means that kubelet doesn't have the - // complete list of pods from all avialble sources (e.g., apiserver, http, + // complete list of pods from all available sources (e.g., apiserver, http, // file). In this case, garbage collector should refrain itself from aggressive // behavior such as removing all containers of unrecognized pods (yet). // If evictNonDeletedPods is set to true, containers and sandboxes belonging to pods // that are terminated, but not deleted will be evicted. Otherwise, only deleted pods will be GC'd. // TODO: Revisit this method and make it cleaner. - GarbageCollect(gcPolicy ContainerGCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error + GarbageCollect(gcPolicy GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error // Syncs the running pod into the desired pod. SyncPod(pod *v1.Pod, podStatus *PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) PodSyncResult // KillPod kills all the containers of a pod. Pod may be nil, running pod must not be. @@ -126,6 +131,7 @@ type StreamingRuntime interface { GetPortForward(podName, podNamespace string, podUID types.UID, ports []int32) (*url.URL, error) } +// ImageService interfaces allows to work with image service. type ImageService interface { // PullImage pulls an image from the network to local storage using the supplied // secrets if necessary. It returns a reference (digest or ID) to the pulled image. @@ -141,11 +147,13 @@ type ImageService interface { ImageStats() (*ImageStats, error) } -type ContainerAttacher interface { +// Attacher interface allows to attach a container. +type Attacher interface { AttachContainer(id ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) (err error) } -type ContainerCommandRunner interface { +// CommandRunner interface allows to run command in a container. +type CommandRunner interface { // RunInContainer synchronously executes the command in the container, and returns the output. // If the command completes with a non-0 exit code, a k8s.io/utils/exec.ExitError will be returned. RunInContainer(id ContainerID, cmd []string, timeout time.Duration) ([]byte, error) @@ -163,7 +171,7 @@ type Pod struct { // running containers, or mixed with dead ones (when GetPods(true)). Containers []*Container // List of sandboxes associated with this pod. The sandboxes are converted - // to Container temporariliy to avoid substantial changes to other + // to Container temporarily to avoid substantial changes to other // components. This is only populated by kuberuntime. // TODO: use the runtimeApi.PodSandbox type directly. Sandboxes []*Container @@ -187,11 +195,12 @@ type ContainerID struct { ID string } +// BuildContainerID returns the ContainerID given type and id. func BuildContainerID(typ, ID string) ContainerID { return ContainerID{Type: typ, ID: ID} } -// Convenience method for creating a ContainerID from an ID string. +// ParseContainerID is a convenience method for creating a ContainerID from an ID string. func ParseContainerID(containerID string) ContainerID { var id ContainerID if err := id.ParseString(containerID); err != nil { @@ -200,6 +209,7 @@ func ParseContainerID(containerID string) ContainerID { return id } +// ParseString converts given string into ContainerID func (c *ContainerID) ParseString(data string) error { // Trim the quotes and split the type and ID. parts := strings.Split(strings.Trim(data, "\""), "://") @@ -214,14 +224,17 @@ func (c *ContainerID) String() string { return fmt.Sprintf("%s://%s", c.Type, c.ID) } +// IsEmpty returns whether given ContainerID is empty. func (c *ContainerID) IsEmpty() bool { return *c == ContainerID{} } +// MarshalJSON formats a given ContainerID into a byte array. func (c *ContainerID) MarshalJSON() ([]byte, error) { return []byte(fmt.Sprintf("%q", c.String())), nil } +// UnmarshalJSON parses ContainerID from a given array of bytes. func (c *ContainerID) UnmarshalJSON(data []byte) error { return c.ParseString(string(data)) } @@ -229,6 +242,7 @@ func (c *ContainerID) UnmarshalJSON(data []byte) error { // DockerID is an ID of docker container. It is a type to make it clear when we're working with docker container Ids type DockerID string +// ContainerID converts DockerID into a ContainerID. func (id DockerID) ContainerID() ContainerID { return ContainerID{ Type: "docker", @@ -236,14 +250,18 @@ func (id DockerID) ContainerID() ContainerID { } } -type ContainerState string +// State represents the state of a container +type State string const ( - ContainerStateCreated ContainerState = "created" - ContainerStateRunning ContainerState = "running" - ContainerStateExited ContainerState = "exited" - // This unknown encompasses all the states that we currently don't care. - ContainerStateUnknown ContainerState = "unknown" + // ContainerStateCreated indicates a container that has been created (e.g. with docker create) but not started. + ContainerStateCreated State = "created" + // ContainerStateRunning indicates a currently running container. + ContainerStateRunning State = "running" + // ContainerStateExited indicates a container that ran and completed ("stopped" in other contexts, although a created container is technically also "stopped"). + ContainerStateExited State = "exited" + // ContainerStateUnknown encompasses all the states that we currently don't care about (like restarting, paused, dead). + ContainerStateUnknown State = "unknown" ) // Container provides the runtime information for a container, such as ID, hash, @@ -264,7 +282,7 @@ type Container struct { // not managed by kubelet. Hash uint64 // State is the state of the container. - State ContainerState + State State } // PodStatus represents the status of the pod and its containers. @@ -279,20 +297,20 @@ type PodStatus struct { // All IPs assigned to this pod IPs []string // Status of containers in the pod. - ContainerStatuses []*ContainerStatus + ContainerStatuses []*Status // Status of the pod sandbox. // Only for kuberuntime now, other runtime may keep it nil. SandboxStatuses []*runtimeapi.PodSandboxStatus } -// ContainerStatus represents the status of a container. -type ContainerStatus struct { +// Status represents the status of a container. +type Status struct { // ID of the container. ID ContainerID // Name of the container. Name string // Status of the container. - State ContainerState + State State // Creation time of the container. CreatedAt time.Time // Start time of the container. @@ -319,7 +337,7 @@ type ContainerStatus struct { // FindContainerStatusByName returns container status in the pod status with the given name. // When there are multiple containers' statuses with the same name, the first match will be returned. -func (podStatus *PodStatus) FindContainerStatusByName(containerName string) *ContainerStatus { +func (podStatus *PodStatus) FindContainerStatusByName(containerName string) *Status { for _, containerStatus := range podStatus.ContainerStatuses { if containerStatus.Name == containerName { return containerStatus @@ -328,9 +346,9 @@ func (podStatus *PodStatus) FindContainerStatusByName(containerName string) *Con return nil } -// Get container status of all the running containers in a pod -func (podStatus *PodStatus) GetRunningContainerStatuses() []*ContainerStatus { - runningContainerStatuses := []*ContainerStatus{} +// GetRunningContainerStatuses returns container status of all the running containers in a pod +func (podStatus *PodStatus) GetRunningContainerStatuses() []*Status { + runningContainerStatuses := []*Status{} for _, containerStatus := range podStatus.ContainerStatuses { if containerStatus.State == ContainerStateRunning { runningContainerStatuses = append(runningContainerStatuses, containerStatus) @@ -339,7 +357,7 @@ func (podStatus *PodStatus) GetRunningContainerStatuses() []*ContainerStatus { return runningContainerStatuses } -// Basic information about a container image. +// Image contains basic information about a container image. type Image struct { // ID of the image. ID string @@ -349,18 +367,23 @@ type Image struct { RepoDigests []string // The size of the image in bytes. Size int64 + // ImageSpec for the image which include annotations. + Spec ImageSpec } +// EnvVar represents the environment variable. type EnvVar struct { Name string Value string } +// Annotation represents an annotation. type Annotation struct { Name string Value string } +// Mount represents a volume mount. type Mount struct { // Name of the volume mount. // TODO(yifan): Remove this field, as this is not representing the unique name of the mount, @@ -378,6 +401,7 @@ type Mount struct { Propagation runtimeapi.MountPropagation } +// PortMapping contains information about the port mapping. type PortMapping struct { // Name of the port mapping Name string @@ -391,6 +415,7 @@ type PortMapping struct { HostIP string } +// DeviceInfo contains information about the device. type DeviceInfo struct { // Path on host for mapping PathOnHost string @@ -447,6 +472,7 @@ type VolumeInfo struct { InnerVolumeSpecName string } +// VolumeMap represents the map of volumes. type VolumeMap map[string]VolumeInfo // RuntimeConditionType is the types of required runtime conditions. @@ -477,9 +503,9 @@ func (r *RuntimeStatus) GetRuntimeCondition(t RuntimeConditionType) *RuntimeCond } // String formats the runtime status into human readable string. -func (s *RuntimeStatus) String() string { +func (r *RuntimeStatus) String() string { var ss []string - for _, c := range s.Conditions { + for _, c := range r.Conditions { ss = append(ss, c.String()) } return fmt.Sprintf("Runtime Conditions: %s", strings.Join(ss, ", ")) @@ -502,6 +528,7 @@ func (c *RuntimeCondition) String() string { return fmt.Sprintf("%s=%t reason:%s message:%s", c.Type, c.Status, c.Reason, c.Message) } +// Pods represents the list of pods type Pods []*Pod // FindPodByID finds and returns a pod in the pod list by UID. It will return an empty pod @@ -548,6 +575,7 @@ func (p *Pod) FindContainerByName(containerName string) *Container { return nil } +// FindContainerByID returns a container in the pod with the given ContainerID. func (p *Pod) FindContainerByID(id ContainerID) *Container { for _, c := range p.Containers { if c.ID == id { @@ -557,6 +585,7 @@ func (p *Pod) FindContainerByID(id ContainerID) *Container { return nil } +// FindSandboxByID returns a sandbox in the pod with the given ContainerID. func (p *Pod) FindSandboxByID(id ContainerID) *Container { for _, c := range p.Sandboxes { if c.ID == id { @@ -595,12 +624,12 @@ func GetPodFullName(pod *v1.Pod) string { return pod.Name + "_" + pod.Namespace } -// Build the pod full name from pod name and namespace. +// BuildPodFullName builds the pod full name from pod name and namespace. func BuildPodFullName(name, namespace string) string { return name + "_" + namespace } -// Parse the pod full name. +// ParsePodFullName parsed the pod full name. func ParsePodFullName(podFullName string) (string, string, error) { parts := strings.Split(podFullName, "_") if len(parts) != 2 || parts[0] == "" || parts[1] == "" { @@ -613,8 +642,8 @@ func ParsePodFullName(podFullName string) (string, string, error) { // completely optional settings. type Option func(Runtime) -// Sort the container statuses by creation time. -type SortContainerStatusesByCreationTime []*ContainerStatus +// SortContainerStatusesByCreationTime sorts the container statuses by creation time. +type SortContainerStatusesByCreationTime []*Status func (s SortContainerStatusesByCreationTime) Len() int { return len(s) } func (s SortContainerStatusesByCreationTime) Swap(i, j int) { s[i], s[j] = s[j], s[i] } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache.go index d15852f886a..0d7a1d399c8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache.go @@ -26,6 +26,7 @@ var ( defaultCachePeriod = time.Second * 2 ) +// RuntimeCache is in interface for obtaining cached Pods. type RuntimeCache interface { GetPods() ([]*Pod, error) ForceUpdateIfOlder(time.Time) error diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_fake.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_fake.go index 59a6288d536..0c07c7edfd2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_fake.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_fake.go @@ -16,7 +16,7 @@ limitations under the License. package container -// TestRunTimeCache embeds runtimeCache with some additional methods for testing. +// TestRuntimeCache embeds runtimeCache with some additional methods for testing. // It must be declared in the container package to have visibility to runtimeCache. // It cannot be in a "..._test.go" file in order for runtime_cache_test.go to have cross-package visibility to it. // (cross-package declarations in test files cannot be used from dot imports if this package is vendored) @@ -24,18 +24,21 @@ type TestRuntimeCache struct { runtimeCache } +// UpdateCacheWithLock updates the cache with the lock. func (r *TestRuntimeCache) UpdateCacheWithLock() error { r.Lock() defer r.Unlock() return r.updateCache() } +// GetCachedPods returns the cached pods. func (r *TestRuntimeCache) GetCachedPods() []*Pod { r.Lock() defer r.Unlock() return r.pods } +// NewTestRuntimeCache creates a new instance of TestRuntimeCache. func NewTestRuntimeCache(getter podsGetter) *TestRuntimeCache { return &TestRuntimeCache{ runtimeCache: runtimeCache{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result.go index ef1b2a97d5e..39ab04a3cac 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result.go @@ -25,7 +25,7 @@ import ( // TODO(random-liu): We need to better organize runtime errors for introspection. -// Container Terminated and Kubelet is backing off the restart +// ErrCrashLoopBackOff returned when a container Terminated and Kubelet is backing off the restart. var ErrCrashLoopBackOff = errors.New("CrashLoopBackOff") var ( @@ -35,18 +35,16 @@ var ( ) var ( - ErrRunContainer = errors.New("RunContainerError") - ErrKillContainer = errors.New("KillContainerError") - ErrVerifyNonRoot = errors.New("VerifyNonRootError") - ErrRunInitContainer = errors.New("RunInitContainerError") + // ErrRunContainer returned when runtime failed to start any of pod's container. + ErrRunContainer = errors.New("RunContainerError") + // ErrKillContainer returned when runtime failed to kill any of pod's containers. + ErrKillContainer = errors.New("KillContainerError") + // ErrCreatePodSandbox returned when runtime failed to create a sandbox for pod. ErrCreatePodSandbox = errors.New("CreatePodSandboxError") + // ErrConfigPodSandbox returned when runetime failed to get pod sandbox config from pod. ErrConfigPodSandbox = errors.New("ConfigPodSandboxError") - ErrKillPodSandbox = errors.New("KillPodSandboxError") -) - -var ( - ErrSetupNetwork = errors.New("SetupNetworkError") - ErrTeardownNetwork = errors.New("TeardownNetworkError") + // ErrKillPodSandbox returned when runtime failed to stop pod's sandbox. + ErrKillPodSandbox = errors.New("KillPodSandboxError") ) // SyncAction indicates different kind of actions in SyncPod() and KillPod(). Now there are only actions @@ -54,14 +52,22 @@ var ( type SyncAction string const ( - StartContainer SyncAction = "StartContainer" - KillContainer SyncAction = "KillContainer" - SetupNetwork SyncAction = "SetupNetwork" - TeardownNetwork SyncAction = "TeardownNetwork" - InitContainer SyncAction = "InitContainer" + // StartContainer action + StartContainer SyncAction = "StartContainer" + // KillContainer action + KillContainer SyncAction = "KillContainer" + // SetupNetwork action + SetupNetwork SyncAction = "SetupNetwork" + // TeardownNetwork action + TeardownNetwork SyncAction = "TeardownNetwork" + // InitContainer action + InitContainer SyncAction = "InitContainer" + // CreatePodSandbox action CreatePodSandbox SyncAction = "CreatePodSandbox" + // ConfigPodSandbox action ConfigPodSandbox SyncAction = "ConfigPodSandbox" - KillPodSandbox SyncAction = "KillPodSandbox" + // KillPodSandbox action + KillPodSandbox SyncAction = "KillPodSandbox" ) // SyncResult is the result of sync action. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/BUILD similarity index 75% rename from vendor/k8s.io/kubernetes/pkg/kubelet/remote/BUILD rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/BUILD index b607db4aeff..5ea0f5db56b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/BUILD @@ -14,14 +14,14 @@ go_library( "remote_runtime.go", "utils.go", ], - importpath = "k8s.io/kubernetes/pkg/kubelet/remote", + importpath = "k8s.io/kubernetes/pkg/kubelet/cri/remote", deps = [ - "//pkg/kubelet/util:go_default_library", - "//pkg/kubelet/util/logreduction:go_default_library", + "//pkg/kubelet/cri/remote/util:go_default_library", + "//staging/src/k8s.io/component-base/logs/logreduction:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) @@ -37,7 +37,8 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/kubelet/remote/fake:all-srcs", + "//pkg/kubelet/cri/remote/fake:all-srcs", + "//pkg/kubelet/cri/remote/util:all-srcs", ], tags = ["automanaged"], ) @@ -47,7 +48,7 @@ go_test( srcs = ["remote_runtime_test.go"], embed = [":go_default_library"], deps = [ - "//pkg/kubelet/remote/fake:go_default_library", + "//pkg/kubelet/cri/remote/fake:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/testing:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/remote/OWNERS rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/doc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/doc.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/remote/doc.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/doc.go diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_image.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_image.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_image.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_image.go index 5de56e2f3d4..e8089f666d0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_image.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_image.go @@ -23,11 +23,11 @@ import ( "time" "google.golang.org/grpc" - "k8s.io/klog" + "k8s.io/klog/v2" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/kubernetes/pkg/kubelet/util" + "k8s.io/kubernetes/pkg/kubelet/cri/remote/util" ) // RemoteImageService is a gRPC implementation of internalapi.ImageManagerService. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_runtime.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_runtime.go similarity index 76% rename from vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_runtime.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_runtime.go index 30ee914094e..24b6012b911 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_runtime.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_runtime.go @@ -24,12 +24,12 @@ import ( "time" "google.golang.org/grpc" - "k8s.io/klog" + "k8s.io/klog/v2" + "k8s.io/component-base/logs/logreduction" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/kubernetes/pkg/kubelet/util" - "k8s.io/kubernetes/pkg/kubelet/util/logreduction" + "k8s.io/kubernetes/pkg/kubelet/cri/remote/util" utilexec "k8s.io/utils/exec" ) @@ -71,6 +71,8 @@ func NewRemoteRuntimeService(endpoint string, connectionTimeout time.Duration) ( // Version returns the runtime name, runtime version and runtime API version. func (r *RemoteRuntimeService) Version(apiVersion string) (*runtimeapi.VersionResponse, error) { + klog.V(10).Infof("[RemoteRuntimeService] Version (apiVersion=%v, timeout=%v)", apiVersion, r.timeout) + ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -82,6 +84,8 @@ func (r *RemoteRuntimeService) Version(apiVersion string) (*runtimeapi.VersionRe return nil, err } + klog.V(10).Infof("[RemoteRuntimeService] Version Response (typedVersion=%v)", typedVersion) + if typedVersion.Version == "" || typedVersion.RuntimeName == "" || typedVersion.RuntimeApiVersion == "" || typedVersion.RuntimeVersion == "" { return nil, fmt.Errorf("not all fields are set in VersionResponse (%q)", *typedVersion) } @@ -94,7 +98,11 @@ func (r *RemoteRuntimeService) Version(apiVersion string) (*runtimeapi.VersionRe func (r *RemoteRuntimeService) RunPodSandbox(config *runtimeapi.PodSandboxConfig, runtimeHandler string) (string, error) { // Use 2 times longer timeout for sandbox operation (4 mins by default) // TODO: Make the pod sandbox timeout configurable. - ctx, cancel := getContextWithTimeout(r.timeout * 2) + timeout := r.timeout * 2 + + klog.V(10).Infof("[RemoteRuntimeService] RunPodSandbox (config=%v, runtimeHandler=%v, timeout=%v)", config, runtimeHandler, timeout) + + ctx, cancel := getContextWithTimeout(timeout) defer cancel() resp, err := r.runtimeClient.RunPodSandbox(ctx, &runtimeapi.RunPodSandboxRequest{ @@ -112,12 +120,16 @@ func (r *RemoteRuntimeService) RunPodSandbox(config *runtimeapi.PodSandboxConfig return "", errors.New(errorMessage) } + klog.V(10).Infof("[RemoteRuntimeService] RunPodSandbox Response (PodSandboxId=%v)", resp.PodSandboxId) + return resp.PodSandboxId, nil } // StopPodSandbox stops the sandbox. If there are any running containers in the // sandbox, they should be forced to termination. func (r *RemoteRuntimeService) StopPodSandbox(podSandBoxID string) error { + klog.V(10).Infof("[RemoteRuntimeService] StopPodSandbox (podSandboxID=%v, timeout=%v)", podSandBoxID, r.timeout) + ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -129,12 +141,15 @@ func (r *RemoteRuntimeService) StopPodSandbox(podSandBoxID string) error { return err } + klog.V(10).Infof("[RemoteRuntimeService] StopPodSandbox Response (podSandboxID=%v)", podSandBoxID) + return nil } // RemovePodSandbox removes the sandbox. If there are any containers in the // sandbox, they should be forcibly removed. func (r *RemoteRuntimeService) RemovePodSandbox(podSandBoxID string) error { + klog.V(10).Infof("[RemoteRuntimeService] RemovePodSandbox (podSandboxID=%v, timeout=%v)", podSandBoxID, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -146,11 +161,14 @@ func (r *RemoteRuntimeService) RemovePodSandbox(podSandBoxID string) error { return err } + klog.V(10).Infof("[RemoteRuntimeService] RemovePodSandbox Response (podSandboxID=%v)", podSandBoxID) + return nil } // PodSandboxStatus returns the status of the PodSandbox. func (r *RemoteRuntimeService) PodSandboxStatus(podSandBoxID string) (*runtimeapi.PodSandboxStatus, error) { + klog.V(10).Infof("[RemoteRuntimeService] PodSandboxStatus (podSandboxID=%v, timeout=%v)", podSandBoxID, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -161,6 +179,8 @@ func (r *RemoteRuntimeService) PodSandboxStatus(podSandBoxID string) (*runtimeap return nil, err } + klog.V(10).Infof("[RemoteRuntimeService] PodSandboxStatus Response (podSandboxID=%v, status=%v)", podSandBoxID, resp.Status) + if resp.Status != nil { if err := verifySandboxStatus(resp.Status); err != nil { return nil, err @@ -172,6 +192,7 @@ func (r *RemoteRuntimeService) PodSandboxStatus(podSandBoxID string) (*runtimeap // ListPodSandbox returns a list of PodSandboxes. func (r *RemoteRuntimeService) ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([]*runtimeapi.PodSandbox, error) { + klog.V(10).Infof("[RemoteRuntimeService] ListPodSandbox (filter=%v, timeout=%v)", filter, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -183,11 +204,14 @@ func (r *RemoteRuntimeService) ListPodSandbox(filter *runtimeapi.PodSandboxFilte return nil, err } + klog.V(10).Infof("[RemoteRuntimeService] ListPodSandbox Response (filter=%v, items=%v)", filter, resp.Items) + return resp.Items, nil } // CreateContainer creates a new container in the specified PodSandbox. func (r *RemoteRuntimeService) CreateContainer(podSandBoxID string, config *runtimeapi.ContainerConfig, sandboxConfig *runtimeapi.PodSandboxConfig) (string, error) { + klog.V(10).Infof("[RemoteRuntimeService] CreateContainer (podSandBoxID=%v, timeout=%v)", podSandBoxID, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -201,6 +225,7 @@ func (r *RemoteRuntimeService) CreateContainer(podSandBoxID string, config *runt return "", err } + klog.V(10).Infof("[RemoteRuntimeService] CreateContainer (podSandBoxID=%v, ContainerId=%v)", podSandBoxID, resp.ContainerId) if resp.ContainerId == "" { errorMessage := fmt.Sprintf("ContainerId is not set for container %q", config.GetMetadata()) klog.Errorf("CreateContainer failed: %s", errorMessage) @@ -212,6 +237,7 @@ func (r *RemoteRuntimeService) CreateContainer(podSandBoxID string, config *runt // StartContainer starts the container. func (r *RemoteRuntimeService) StartContainer(containerID string) error { + klog.V(10).Infof("[RemoteRuntimeService] StartContainer (containerID=%v, timeout=%v)", containerID, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -222,12 +248,14 @@ func (r *RemoteRuntimeService) StartContainer(containerID string) error { klog.Errorf("StartContainer %q from runtime service failed: %v", containerID, err) return err } + klog.V(10).Infof("[RemoteRuntimeService] StartContainer Response (containerID=%v)", containerID) return nil } // StopContainer stops a running container with a grace period (i.e., timeout). func (r *RemoteRuntimeService) StopContainer(containerID string, timeout int64) error { + klog.V(10).Infof("[RemoteRuntimeService] StopContainer (containerID=%v, timeout=%v)", containerID, timeout) // Use timeout + default timeout (2 minutes) as timeout to leave extra time // for SIGKILL container and request latency. t := r.timeout + time.Duration(timeout)*time.Second @@ -243,6 +271,7 @@ func (r *RemoteRuntimeService) StopContainer(containerID string, timeout int64) klog.Errorf("StopContainer %q from runtime service failed: %v", containerID, err) return err } + klog.V(10).Infof("[RemoteRuntimeService] StopContainer Response (containerID=%v)", containerID) return nil } @@ -250,6 +279,7 @@ func (r *RemoteRuntimeService) StopContainer(containerID string, timeout int64) // RemoveContainer removes the container. If the container is running, the container // should be forced to removal. func (r *RemoteRuntimeService) RemoveContainer(containerID string) error { + klog.V(10).Infof("[RemoteRuntimeService] RemoveContainer (containerID=%v, timeout=%v)", containerID, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -261,12 +291,14 @@ func (r *RemoteRuntimeService) RemoveContainer(containerID string) error { klog.Errorf("RemoveContainer %q from runtime service failed: %v", containerID, err) return err } + klog.V(10).Infof("[RemoteRuntimeService] RemoveContainer Response (containerID=%v)", containerID) return nil } // ListContainers lists containers by filters. func (r *RemoteRuntimeService) ListContainers(filter *runtimeapi.ContainerFilter) ([]*runtimeapi.Container, error) { + klog.V(10).Infof("[RemoteRuntimeService] ListContainers (filter=%v, timeout=%v)", filter, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -277,12 +309,14 @@ func (r *RemoteRuntimeService) ListContainers(filter *runtimeapi.ContainerFilter klog.Errorf("ListContainers with filter %+v from runtime service failed: %v", filter, err) return nil, err } + klog.V(10).Infof("[RemoteRuntimeService] ListContainers Response (filter=%v, containers=%v)", filter, resp.Containers) return resp.Containers, nil } // ContainerStatus returns the container status. func (r *RemoteRuntimeService) ContainerStatus(containerID string) (*runtimeapi.ContainerStatus, error) { + klog.V(10).Infof("[RemoteRuntimeService] ContainerStatus (containerID=%v, timeout=%v)", containerID, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -297,6 +331,7 @@ func (r *RemoteRuntimeService) ContainerStatus(containerID string) (*runtimeapi. return nil, err } r.logReduction.ClearID(containerID) + klog.V(10).Infof("[RemoteRuntimeService] ContainerStatus Response (containerID=%v, status=%v)", containerID, resp.Status) if resp.Status != nil { if err := verifyContainerStatus(resp.Status); err != nil { @@ -310,6 +345,7 @@ func (r *RemoteRuntimeService) ContainerStatus(containerID string) (*runtimeapi. // UpdateContainerResources updates a containers resource config func (r *RemoteRuntimeService) UpdateContainerResources(containerID string, resources *runtimeapi.LinuxContainerResources) error { + klog.V(10).Infof("[RemoteRuntimeService] UpdateContainerResources (containerID=%v, timeout=%v)", containerID, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -321,6 +357,7 @@ func (r *RemoteRuntimeService) UpdateContainerResources(containerID string, reso klog.Errorf("UpdateContainerResources %q from runtime service failed: %v", containerID, err) return err } + klog.V(10).Infof("[RemoteRuntimeService] UpdateContainerResources Response (containerID=%v)", containerID) return nil } @@ -328,6 +365,7 @@ func (r *RemoteRuntimeService) UpdateContainerResources(containerID string, reso // ExecSync executes a command in the container, and returns the stdout output. // If command exits with a non-zero exit code, an error is returned. func (r *RemoteRuntimeService) ExecSync(containerID string, cmd []string, timeout time.Duration) (stdout []byte, stderr []byte, err error) { + klog.V(10).Infof("[RemoteRuntimeService] ExecSync (containerID=%v, timeout=%v)", containerID, timeout) // Do not set timeout when timeout is 0. var ctx context.Context var cancel context.CancelFunc @@ -352,6 +390,7 @@ func (r *RemoteRuntimeService) ExecSync(containerID string, cmd []string, timeou return nil, nil, err } + klog.V(10).Infof("[RemoteRuntimeService] ExecSync Response (containerID=%v, ExitCode=%v)", containerID, resp.ExitCode) err = nil if resp.ExitCode != 0 { err = utilexec.CodeExitError{ @@ -365,6 +404,7 @@ func (r *RemoteRuntimeService) ExecSync(containerID string, cmd []string, timeou // Exec prepares a streaming endpoint to execute a command in the container, and returns the address. func (r *RemoteRuntimeService) Exec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error) { + klog.V(10).Infof("[RemoteRuntimeService] Exec (timeout=%v)", r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -373,6 +413,7 @@ func (r *RemoteRuntimeService) Exec(req *runtimeapi.ExecRequest) (*runtimeapi.Ex klog.Errorf("Exec %s '%s' from runtime service failed: %v", req.ContainerId, strings.Join(req.Cmd, " "), err) return nil, err } + klog.V(10).Info("[RemoteRuntimeService] Exec Response") if resp.Url == "" { errorMessage := "URL is not set" @@ -385,6 +426,7 @@ func (r *RemoteRuntimeService) Exec(req *runtimeapi.ExecRequest) (*runtimeapi.Ex // Attach prepares a streaming endpoint to attach to a running container, and returns the address. func (r *RemoteRuntimeService) Attach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error) { + klog.V(10).Infof("[RemoteRuntimeService] Attach (containerId=%v, timeout=%v)", req.ContainerId, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -393,10 +435,11 @@ func (r *RemoteRuntimeService) Attach(req *runtimeapi.AttachRequest) (*runtimeap klog.Errorf("Attach %s from runtime service failed: %v", req.ContainerId, err) return nil, err } + klog.V(10).Infof("[RemoteRuntimeService] Attach Response (containerId=%v)", req.ContainerId) if resp.Url == "" { errorMessage := "URL is not set" - klog.Errorf("Exec failed: %s", errorMessage) + klog.Errorf("Attach failed: %s", errorMessage) return nil, errors.New(errorMessage) } return resp, nil @@ -404,6 +447,7 @@ func (r *RemoteRuntimeService) Attach(req *runtimeapi.AttachRequest) (*runtimeap // PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address. func (r *RemoteRuntimeService) PortForward(req *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error) { + klog.V(10).Infof("[RemoteRuntimeService] PortForward (podSandboxID=%v, port=%v, timeout=%v)", req.PodSandboxId, req.Port, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -412,10 +456,11 @@ func (r *RemoteRuntimeService) PortForward(req *runtimeapi.PortForwardRequest) ( klog.Errorf("PortForward %s from runtime service failed: %v", req.PodSandboxId, err) return nil, err } + klog.V(10).Infof("[RemoteRuntimeService] PortForward Response (podSandboxID=%v)", req.PodSandboxId) if resp.Url == "" { errorMessage := "URL is not set" - klog.Errorf("Exec failed: %s", errorMessage) + klog.Errorf("PortForward failed: %s", errorMessage) return nil, errors.New(errorMessage) } @@ -426,6 +471,7 @@ func (r *RemoteRuntimeService) PortForward(req *runtimeapi.PortForwardRequest) ( // update payload currently supported is the pod CIDR assigned to a node, // and the runtime service just proxies it down to the network plugin. func (r *RemoteRuntimeService) UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeConfig) error { + klog.V(10).Infof("[RemoteRuntimeService] UpdateRuntimeConfig (runtimeConfig=%v, timeout=%v)", runtimeConfig, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -439,12 +485,14 @@ func (r *RemoteRuntimeService) UpdateRuntimeConfig(runtimeConfig *runtimeapi.Run if err != nil { return err } + klog.V(10).Infof("[RemoteRuntimeService] UpdateRuntimeConfig Response (runtimeConfig=%v)", runtimeConfig) return nil } // Status returns the status of the runtime. func (r *RemoteRuntimeService) Status() (*runtimeapi.RuntimeStatus, error) { + klog.V(10).Infof("[RemoteRuntimeService] Status (timeout=%v)", r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -454,6 +502,8 @@ func (r *RemoteRuntimeService) Status() (*runtimeapi.RuntimeStatus, error) { return nil, err } + klog.V(10).Infof("[RemoteRuntimeService] Status Response (status=%v)", resp.Status) + if resp.Status == nil || len(resp.Status.Conditions) < 2 { errorMessage := "RuntimeReady or NetworkReady condition are not set" klog.Errorf("Status failed: %s", errorMessage) @@ -465,6 +515,7 @@ func (r *RemoteRuntimeService) Status() (*runtimeapi.RuntimeStatus, error) { // ContainerStats returns the stats of the container. func (r *RemoteRuntimeService) ContainerStats(containerID string) (*runtimeapi.ContainerStats, error) { + klog.V(10).Infof("[RemoteRuntimeService] ContainerStats (containerID=%v, timeout=%v)", containerID, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -473,16 +524,18 @@ func (r *RemoteRuntimeService) ContainerStats(containerID string) (*runtimeapi.C }) if err != nil { if r.logReduction.ShouldMessageBePrinted(err.Error(), containerID) { - klog.Errorf("ContainerStatus %q from runtime service failed: %v", containerID, err) + klog.Errorf("ContainerStats %q from runtime service failed: %v", containerID, err) } return nil, err } r.logReduction.ClearID(containerID) + klog.V(10).Infof("[RemoteRuntimeService] ContainerStats Response (containerID=%v, stats=%v)", containerID, resp.GetStats()) return resp.GetStats(), nil } func (r *RemoteRuntimeService) ListContainerStats(filter *runtimeapi.ContainerStatsFilter) ([]*runtimeapi.ContainerStats, error) { + klog.V(10).Infof("[RemoteRuntimeService] ListContainerStats (filter=%v)", filter) // Do not set timeout, because writable layer stats collection takes time. // TODO(random-liu): Should we assume runtime should cache the result, and set timeout here? ctx, cancel := getContextWithCancel() @@ -495,11 +548,13 @@ func (r *RemoteRuntimeService) ListContainerStats(filter *runtimeapi.ContainerSt klog.Errorf("ListContainerStats with filter %+v from runtime service failed: %v", filter, err) return nil, err } + klog.V(10).Infof("[RemoteRuntimeService] ListContainerStats Response (filter=%v, stats=%v)", filter, resp.GetStats()) return resp.GetStats(), nil } func (r *RemoteRuntimeService) ReopenContainerLog(containerID string) error { + klog.V(10).Infof("[RemoteRuntimeService] ReopenContainerLog (containerID=%v, timeout=%v)", containerID, r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -508,5 +563,7 @@ func (r *RemoteRuntimeService) ReopenContainerLog(containerID string) error { klog.Errorf("ReopenContainerLog %q from runtime service failed: %v", containerID, err) return err } + + klog.V(10).Infof("[RemoteRuntimeService] ReopenContainerLog Response (containerID=%v)", containerID) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/BUILD new file mode 100644 index 00000000000..5b91eec3236 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/BUILD @@ -0,0 +1,89 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "util_unix.go", + "util_unsupported.go", + "util_windows.go", + ], + importpath = "k8s.io/kubernetes/pkg/kubelet/cri/remote/util", + visibility = ["//visibility:public"], + deps = select({ + "@io_bazel_rules_go//go/platform:android": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], + "@io_bazel_rules_go//go/platform:darwin": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], + "@io_bazel_rules_go//go/platform:freebsd": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], + "@io_bazel_rules_go//go/platform:ios": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], + "@io_bazel_rules_go//go/platform:linux": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], + "@io_bazel_rules_go//go/platform:windows": [ + "//vendor/github.com/Microsoft/go-winio:go_default_library", + ], + "//conditions:default": [], + }), +) + +go_test( + name = "go_default_test", + srcs = [ + "util_unix_test.go", + "util_windows_test.go", + ], + embed = [":go_default_library"], + deps = select({ + "@io_bazel_rules_go//go/platform:android": [ + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/github.com/stretchr/testify/require:go_default_library", + ], + "@io_bazel_rules_go//go/platform:darwin": [ + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/github.com/stretchr/testify/require:go_default_library", + ], + "@io_bazel_rules_go//go/platform:freebsd": [ + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/github.com/stretchr/testify/require:go_default_library", + ], + "@io_bazel_rules_go//go/platform:ios": [ + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/github.com/stretchr/testify/require:go_default_library", + ], + "@io_bazel_rules_go//go/platform:linux": [ + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/github.com/stretchr/testify/require:go_default_library", + ], + "@io_bazel_rules_go//go/platform:windows": [ + "//vendor/github.com/Microsoft/go-winio:go_default_library", + "//vendor/github.com/stretchr/testify/assert:go_default_library", + "//vendor/github.com/stretchr/testify/require:go_default_library", + ], + "//conditions:default": [], + }), +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_unix.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_unix.go new file mode 100644 index 00000000000..ef067bd4c46 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_unix.go @@ -0,0 +1,145 @@ +// +build freebsd linux darwin + +/* +Copyright 2017 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 util + +import ( + "context" + "fmt" + "io/ioutil" + "net" + "net/url" + "os" + "path/filepath" + + "golang.org/x/sys/unix" + "k8s.io/klog/v2" +) + +const ( + // unixProtocol is the network protocol of unix socket. + unixProtocol = "unix" +) + +// CreateListener creates a listener on the specified endpoint. +func CreateListener(endpoint string) (net.Listener, error) { + protocol, addr, err := parseEndpointWithFallbackProtocol(endpoint, unixProtocol) + if err != nil { + return nil, err + } + if protocol != unixProtocol { + return nil, fmt.Errorf("only support unix socket endpoint") + } + + // Unlink to cleanup the previous socket file. + err = unix.Unlink(addr) + if err != nil && !os.IsNotExist(err) { + return nil, fmt.Errorf("failed to unlink socket file %q: %v", addr, err) + } + + if err := os.MkdirAll(filepath.Dir(addr), 0750); err != nil { + return nil, fmt.Errorf("error creating socket directory %q: %v", filepath.Dir(addr), err) + } + + // Create the socket on a tempfile and move it to the destination socket to handle improper cleanup + file, err := ioutil.TempFile(filepath.Dir(addr), "") + if err != nil { + return nil, fmt.Errorf("failed to create temporary file: %v", err) + } + + if err := os.Remove(file.Name()); err != nil { + return nil, fmt.Errorf("failed to remove temporary file: %v", err) + } + + l, err := net.Listen(protocol, file.Name()) + if err != nil { + return nil, err + } + + if err = os.Rename(file.Name(), addr); err != nil { + return nil, fmt.Errorf("failed to move temporary file to addr %q: %v", addr, err) + } + + return l, nil +} + +// GetAddressAndDialer returns the address parsed from the given endpoint and a context dialer. +func GetAddressAndDialer(endpoint string) (string, func(ctx context.Context, addr string) (net.Conn, error), error) { + protocol, addr, err := parseEndpointWithFallbackProtocol(endpoint, unixProtocol) + if err != nil { + return "", nil, err + } + if protocol != unixProtocol { + return "", nil, fmt.Errorf("only support unix socket endpoint") + } + + return addr, dial, nil +} + +func dial(ctx context.Context, addr string) (net.Conn, error) { + return (&net.Dialer{}).DialContext(ctx, unixProtocol, addr) +} + +func parseEndpointWithFallbackProtocol(endpoint string, fallbackProtocol string) (protocol string, addr string, err error) { + if protocol, addr, err = parseEndpoint(endpoint); err != nil && protocol == "" { + fallbackEndpoint := fallbackProtocol + "://" + endpoint + protocol, addr, err = parseEndpoint(fallbackEndpoint) + if err == nil { + klog.Warningf("Using %q as endpoint is deprecated, please consider using full url format %q.", endpoint, fallbackEndpoint) + } + } + return +} + +func parseEndpoint(endpoint string) (string, string, error) { + u, err := url.Parse(endpoint) + if err != nil { + return "", "", err + } + + switch u.Scheme { + case "tcp": + return "tcp", u.Host, nil + + case "unix": + return "unix", u.Path, nil + + case "": + return "", "", fmt.Errorf("using %q as endpoint is deprecated, please consider using full url format", endpoint) + + default: + return u.Scheme, "", fmt.Errorf("protocol %q not supported", u.Scheme) + } +} + +// IsUnixDomainSocket returns whether a given file is a AF_UNIX socket file +func IsUnixDomainSocket(filePath string) (bool, error) { + fi, err := os.Stat(filePath) + if err != nil { + return false, fmt.Errorf("stat file %s failed: %v", filePath, err) + } + if fi.Mode()&os.ModeSocket == 0 { + return false, nil + } + return true, nil +} + +// NormalizePath is a no-op for Linux for now +func NormalizePath(path string) string { + return path +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_unsupported.go new file mode 100644 index 00000000000..dbf86a5a43b --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_unsupported.go @@ -0,0 +1,55 @@ +// +build !freebsd,!linux,!windows,!darwin + +/* +Copyright 2017 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 util + +import ( + "context" + "fmt" + "net" + "time" +) + +// CreateListener creates a listener on the specified endpoint. +func CreateListener(endpoint string) (net.Listener, error) { + return nil, fmt.Errorf("CreateListener is unsupported in this build") +} + +// GetAddressAndDialer returns the address parsed from the given endpoint and a context dialer. +func GetAddressAndDialer(endpoint string) (string, func(ctx context.Context, addr string) (net.Conn, error), error) { + return "", nil, fmt.Errorf("GetAddressAndDialer is unsupported in this build") +} + +// LockAndCheckSubPath empty implementation +func LockAndCheckSubPath(volumePath, subPath string) ([]uintptr, error) { + return []uintptr{}, nil +} + +// UnlockPath empty implementation +func UnlockPath(fileHandles []uintptr) { +} + +// LocalEndpoint empty implementation +func LocalEndpoint(path, file string) (string, error) { + return "", fmt.Errorf("LocalEndpoints are unsupported in this build") +} + +// GetBootTime empty implementation +func GetBootTime() (time.Time, error) { + return time.Time{}, fmt.Errorf("GetBootTime is unsupported in this build") +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_windows.go new file mode 100644 index 00000000000..bc62eaa3641 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/util/util_windows.go @@ -0,0 +1,149 @@ +// +build windows + +/* +Copyright 2017 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 util + +import ( + "context" + "fmt" + "net" + "net/url" + "strings" + "syscall" + "time" + + "github.com/Microsoft/go-winio" +) + +const ( + tcpProtocol = "tcp" + npipeProtocol = "npipe" +) + +// CreateListener creates a listener on the specified endpoint. +func CreateListener(endpoint string) (net.Listener, error) { + protocol, addr, err := parseEndpoint(endpoint) + if err != nil { + return nil, err + } + + switch protocol { + case tcpProtocol: + return net.Listen(tcpProtocol, addr) + + case npipeProtocol: + return winio.ListenPipe(addr, nil) + + default: + return nil, fmt.Errorf("only support tcp and npipe endpoint") + } +} + +// GetAddressAndDialer returns the address parsed from the given endpoint and a context dialer. +func GetAddressAndDialer(endpoint string) (string, func(ctx context.Context, addr string) (net.Conn, error), error) { + protocol, addr, err := parseEndpoint(endpoint) + if err != nil { + return "", nil, err + } + + if protocol == tcpProtocol { + return addr, tcpDial, nil + } + + if protocol == npipeProtocol { + return addr, npipeDial, nil + } + + return "", nil, fmt.Errorf("only support tcp and npipe endpoint") +} + +func tcpDial(ctx context.Context, addr string) (net.Conn, error) { + return (&net.Dialer{}).DialContext(ctx, tcpProtocol, addr) +} + +func npipeDial(ctx context.Context, addr string) (net.Conn, error) { + return winio.DialPipeContext(ctx, addr) +} + +func parseEndpoint(endpoint string) (string, string, error) { + // url.Parse doesn't recognize \, so replace with / first. + endpoint = strings.Replace(endpoint, "\\", "/", -1) + u, err := url.Parse(endpoint) + if err != nil { + return "", "", err + } + + if u.Scheme == "tcp" { + return "tcp", u.Host, nil + } else if u.Scheme == "npipe" { + if strings.HasPrefix(u.Path, "//./pipe") { + return "npipe", u.Path, nil + } + + // fallback host if not provided. + host := u.Host + if host == "" { + host = "." + } + return "npipe", fmt.Sprintf("//%s%s", host, u.Path), nil + } else if u.Scheme == "" { + return "", "", fmt.Errorf("Using %q as endpoint is deprecated, please consider using full url format", endpoint) + } else { + return u.Scheme, "", fmt.Errorf("protocol %q not supported", u.Scheme) + } +} + +var tickCount = syscall.NewLazyDLL("kernel32.dll").NewProc("GetTickCount64") + +// GetBootTime returns the time at which the machine was started, truncated to the nearest second +func GetBootTime() (time.Time, error) { + currentTime := time.Now() + output, _, err := tickCount.Call() + if errno, ok := err.(syscall.Errno); !ok || errno != 0 { + return time.Time{}, err + } + return currentTime.Add(-time.Duration(output) * time.Millisecond).Truncate(time.Second), nil +} + +// IsUnixDomainSocket returns whether a given file is a AF_UNIX socket file +func IsUnixDomainSocket(filePath string) (bool, error) { + // Due to the absence of golang support for os.ModeSocket in Windows (https://github.com/golang/go/issues/33357) + // we need to dial the file and check if we receive an error to determine if a file is Unix Domain Socket file. + + // Note that querrying for the Reparse Points (https://docs.microsoft.com/en-us/windows/win32/fileio/reparse-points) + // for the file (using FSCTL_GET_REPARSE_POINT) and checking for reparse tag: reparseTagSocket + // does NOT work in 1809 if the socket file is created within a bind mounted directory by a container + // and the FSCTL is issued in the host by the kubelet. + + c, err := net.Dial("unix", filePath) + if err == nil { + c.Close() + return true, nil + } + return false, nil +} + +// NormalizePath converts FS paths returned by certain go frameworks (like fsnotify) +// to native Windows paths that can be passed to Windows specific code +func NormalizePath(path string) string { + path = strings.ReplaceAll(path, "/", "\\") + if strings.HasPrefix(path, "\\") { + path = "c:" + path + } + return path +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/utils.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/utils.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/remote/utils.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/utils.go diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/BUILD similarity index 78% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/BUILD rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/BUILD index d133e06be93..ff26feedfed 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/BUILD @@ -13,10 +13,10 @@ go_library( "request_cache.go", "server.go", ], - importpath = "k8s.io/kubernetes/pkg/kubelet/server/streaming", + importpath = "k8s.io/kubernetes/pkg/kubelet/cri/streaming", deps = [ - "//pkg/kubelet/server/portforward:go_default_library", - "//pkg/kubelet/server/remotecommand:go_default_library", + "//pkg/kubelet/cri/streaming/portforward:go_default_library", + "//pkg/kubelet/cri/streaming/remotecommand:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/remotecommand:go_default_library", @@ -36,8 +36,8 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//pkg/apis/core:go_default_library", - "//pkg/kubelet/server/portforward:go_default_library", + "//pkg/kubelet/cri/streaming/portforward:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", "//staging/src/k8s.io/client-go/tools/remotecommand:go_default_library", @@ -57,6 +57,10 @@ filegroup( filegroup( name = "all-srcs", - srcs = [":package-srcs"], + srcs = [ + ":package-srcs", + "//pkg/kubelet/cri/streaming/portforward:all-srcs", + "//pkg/kubelet/cri/streaming/remotecommand:all-srcs", + ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/errors.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/errors.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/errors.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/errors.go diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/BUILD similarity index 83% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/BUILD rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/BUILD index 46c57de81bf..59c7f9b110d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/BUILD @@ -14,16 +14,16 @@ go_library( "portforward.go", "websocket.go", ], - importpath = "k8s.io/kubernetes/pkg/kubelet/server/portforward", + importpath = "k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward", deps = [ - "//pkg/apis/core:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/httplog:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/wsstream:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -35,7 +35,7 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//pkg/apis/core:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/constants.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/constants.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/constants.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/constants.go diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/httpstream.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/httpstream.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/httpstream.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/httpstream.go index 4b5e66d6607..41911305487 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/httpstream.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/httpstream.go @@ -24,13 +24,13 @@ import ( "sync" "time" + api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/httpstream" "k8s.io/apimachinery/pkg/util/httpstream/spdy" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/klog" + "k8s.io/klog/v2" ) func handleHTTPStreams(req *http.Request, w http.ResponseWriter, portForwarder PortForwarder, podName string, uid types.UID, supportedPortForwardProtocols []string, idleTimeout, streamCreationTimeout time.Duration) error { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/portforward.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/portforward.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/portforward.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/portforward.go diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/websocket.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/websocket.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/websocket.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/websocket.go index 69502a6997d..8b5428cb6d8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/websocket.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward/websocket.go @@ -26,13 +26,13 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" + api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/server/httplog" "k8s.io/apiserver/pkg/util/wsstream" - api "k8s.io/kubernetes/pkg/apis/core" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/BUILD similarity index 87% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/BUILD rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/BUILD index fef6fec9c2c..3cd81c00c33 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/BUILD @@ -14,9 +14,9 @@ go_library( "httpstream.go", "websocket.go", ], - importpath = "k8s.io/kubernetes/pkg/kubelet/server/remotecommand", + importpath = "k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand", deps = [ - "//pkg/apis/core:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", @@ -27,7 +27,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/server/httplog:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/wsstream:go_default_library", "//staging/src/k8s.io/client-go/tools/remotecommand:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/attach.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/attach.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/attach.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/attach.go diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/doc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/doc.go similarity index 88% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/doc.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/doc.go index a78404cb8bb..bf0d010b91e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package remotecommand contains functions related to executing commands in and attaching to pods. -package remotecommand // import "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" +package remotecommand diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/exec.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/exec.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/exec.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/exec.go diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/httpstream.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/httpstream.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/httpstream.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/httpstream.go index 833762d83f5..9be6c4345e2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/httpstream.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/httpstream.go @@ -24,6 +24,7 @@ import ( "net/http" "time" + api "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/httpstream" @@ -32,9 +33,8 @@ import ( "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/util/wsstream" "k8s.io/client-go/tools/remotecommand" - api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Options contains details about which streams are required for @@ -411,6 +411,7 @@ func (*v1ProtocolHandler) supportsTerminalResizing() bool { return false } func handleResizeEvents(stream io.Reader, channel chan<- remotecommand.TerminalSize) { defer runtime.HandleCrash() + defer close(channel) decoder := json.NewDecoder(stream) for { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/websocket.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/websocket.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/websocket.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand/websocket.go diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/request_cache.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/request_cache.go diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/server.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/server.go index 8ee4d5565f0..03b812107fb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/server.go @@ -35,8 +35,8 @@ import ( remotecommandconsts "k8s.io/apimachinery/pkg/util/remotecommand" "k8s.io/client-go/tools/remotecommand" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/kubernetes/pkg/kubelet/server/portforward" - remotecommandserver "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" + "k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward" + remotecommandserver "k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand" ) // Server is the library interface to serve the stream requests. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/BUILD index 6fd54ad24d2..f9f2dcce3cb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/BUILD @@ -42,6 +42,7 @@ go_library( "//pkg/kubelet/checkpointmanager/checksum:go_default_library", "//pkg/kubelet/checkpointmanager/errors:go_default_library", "//pkg/kubelet/container:go_default_library", + "//pkg/kubelet/cri/streaming:go_default_library", "//pkg/kubelet/dockershim/cm:go_default_library", "//pkg/kubelet/dockershim/libdocker:go_default_library", "//pkg/kubelet/dockershim/metrics:go_default_library", @@ -49,13 +50,11 @@ go_library( "//pkg/kubelet/dockershim/network/cni:go_default_library", "//pkg/kubelet/dockershim/network/hostport:go_default_library", "//pkg/kubelet/dockershim/network/kubenet:go_default_library", - "//pkg/kubelet/kuberuntime:go_default_library", "//pkg/kubelet/leaky:go_default_library", - "//pkg/kubelet/server/streaming:go_default_library", + "//pkg/kubelet/legacy:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/kubelet/util/cache:go_default_library", "//pkg/kubelet/util/ioutils:go_default_library", - "//pkg/security/apparmor:go_default_library", "//pkg/util/parsers:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -71,14 +70,13 @@ go_library( "//vendor/github.com/docker/docker/api/types/strslice:go_default_library", "//vendor/github.com/docker/docker/pkg/jsonmessage:go_default_library", "//vendor/github.com/docker/go-connections/nat:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:windows": [ "//pkg/kubelet/apis:go_default_library", "//pkg/kubelet/winstats:go_default_library", "//vendor/github.com/Microsoft/hcsshim:go_default_library", - "//vendor/github.com/docker/docker/pkg/sysinfo:go_default_library", "//vendor/golang.org/x/sys/windows/registry:go_default_library", ], "//conditions:default": [], @@ -112,7 +110,7 @@ go_test( "//pkg/kubelet/dockershim/network/testing:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/kubelet/util/cache:go_default_library", - "//pkg/security/apparmor:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", "//vendor/github.com/blang/semver:go_default_library", @@ -124,12 +122,6 @@ go_test( "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", ] + select({ - "@io_bazel_rules_go//go/platform:android": [ - "//staging/src/k8s.io/api/core/v1:go_default_library", - ], - "@io_bazel_rules_go//go/platform:linux": [ - "//staging/src/k8s.io/api/core/v1:go_default_library", - ], "@io_bazel_rules_go//go/platform:windows": [ "//vendor/golang.org/x/sys/windows/registry:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/BUILD index fa9b5981131..88028832095 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/BUILD @@ -15,14 +15,18 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/kubelet/dockershim/cm", deps = select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//pkg/kubelet/dockershim/libdocker:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//pkg/kubelet/cm:go_default_library", "//pkg/kubelet/dockershim/libdocker:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/version:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/configs:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:darwin": [ "//pkg/kubelet/dockershim/libdocker:go_default_library", @@ -33,17 +37,24 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//pkg/kubelet/dockershim/libdocker:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/kubelet/dockershim/libdocker:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/dockershim/libdocker:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//pkg/kubelet/dockershim/libdocker:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//pkg/kubelet/cm:go_default_library", "//pkg/kubelet/dockershim/libdocker:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/version:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/configs:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:nacl": [ "//pkg/kubelet/dockershim/libdocker:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager.go index 45abfcedb15..088bb6bbae9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_linux.go index da38ec0d1b1..4430efb538c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_linux.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,!dockerless /* Copyright 2016 The Kubernetes Authors. @@ -25,11 +25,12 @@ import ( "strconv" "time" - "github.com/opencontainers/runc/libcontainer/cgroups/fs" + "github.com/opencontainers/runc/libcontainer/cgroups" + cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" "github.com/opencontainers/runc/libcontainer/configs" utilversion "k8s.io/apimachinery/pkg/util/version" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" kubecm "k8s.io/kubernetes/pkg/kubelet/cm" "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" @@ -68,7 +69,7 @@ type containerManager struct { // Name of the cgroups. cgroupsName string // Manager for the cgroups. - cgroupsManager *fs.Manager + cgroupsManager cgroups.Manager } func (m *containerManager) Start() error { @@ -103,7 +104,7 @@ func (m *containerManager) doWork() { } } -func createCgroupManager(name string) (*fs.Manager, error) { +func createCgroupManager(name string) (cgroups.Manager, error) { var memoryLimit uint64 memoryCapacity, err := getMemoryCapacity() @@ -118,19 +119,25 @@ func createCgroupManager(name string) (*fs.Manager, error) { } klog.V(2).Infof("Configure resource-only container %q with memory limit: %d", name, memoryLimit) - allowAllDevices := true - cm := &fs.Manager{ - Cgroups: &configs.Cgroup{ - Parent: "/", - Name: name, - Resources: &configs.Resources{ - Memory: int64(memoryLimit), - MemorySwap: -1, - AllowAllDevices: &allowAllDevices, + cg := &configs.Cgroup{ + Parent: "/", + Name: name, + Resources: &configs.Resources{ + Memory: int64(memoryLimit), + MemorySwap: -1, + SkipDevices: true, + Devices: []*configs.DeviceRule{ + { + Minor: configs.Wildcard, + Major: configs.Wildcard, + Type: 'a', + Permissions: "rwm", + Allow: true, + }, }, }, } - return cm, nil + return cgroupfs.NewManager(cg, nil, false), nil } // getMemoryCapacity returns the memory capacity on the machine in bytes. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_unsupported.go index 736c6ebd16d..3cf286fa8dc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows +// +build !linux,!windows,!dockerless /* Copyright 2016 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_windows.go index 0c2ad462099..3d42314a61f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_windows.go @@ -1,4 +1,4 @@ -// +build windows +// +build windows,!dockerless /* Copyright 2017 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/convert.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/convert.go index e38d4971127..1400d123bed 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/convert.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/convert.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/doc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/doc.go index 82f3fbe7032..2e9fda933f3 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/doc.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_checkpoint.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_checkpoint.go index 24769dd69d6..4d881f7771a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_checkpoint.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_checkpoint.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2017 The Kubernetes Authors. @@ -61,9 +63,9 @@ type CheckpointData struct { type PodSandboxCheckpoint struct { // Version of the pod sandbox checkpoint schema. Version string `json:"version"` - // Pod name of the sandbox. Same as the pod name in the PodSpec. + // Pod name of the sandbox. Same as the pod name in the Pod ObjectMeta. Name string `json:"name"` - // Pod namespace of the sandbox. Same as the pod namespace in the PodSpec. + // Pod namespace of the sandbox. Same as the pod namespace in the Pod ObjectMeta. Namespace string `json:"namespace"` // Data to checkpoint for pod sandbox. Data *CheckpointData `json:"data,omitempty"` diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container.go index d1397478763..01b865f9d2a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. @@ -27,7 +29,7 @@ import ( dockercontainer "github.com/docker/docker/api/types/container" dockerfilters "github.com/docker/docker/api/types/filters" dockerstrslice "github.com/docker/docker/api/types/strslice" - "k8s.io/klog" + "k8s.io/klog/v2" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_unsupported.go index e3848320ba1..a9ed72bd003 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_unsupported.go @@ -1,4 +1,4 @@ -// +build !windows +// +build !windows,!dockerless /* Copyright 2019 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_windows.go index 17b01c9c79d..57a7f8d8313 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_windows.go @@ -1,4 +1,4 @@ -// +build windows +// +build windows,!dockerless /* Copyright 2019 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image.go index 356f34d0ec9..de213fd426e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. @@ -26,7 +28,7 @@ import ( "github.com/docker/docker/pkg/jsonmessage" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_linux.go index 25e3d7a074e..b46d04b4937 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_linux.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,!dockerless /* Copyright 2017 The Kubernetes Authors. @@ -24,7 +24,7 @@ import ( "path/filepath" "time" - "k8s.io/klog" + "k8s.io/klog/v2" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_unsupported.go index f6c1c72055b..282e8e7296e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows +// +build !linux,!windows,!dockerless /* Copyright 2016 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_windows.go index 3d559392ce1..90da2e0f1ad 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_windows.go @@ -1,4 +1,4 @@ -// +build windows +// +build windows,!dockerless /* Copyright 2016 The Kubernetes Authors. @@ -22,7 +22,7 @@ import ( "context" "time" - "k8s.io/klog" + "k8s.io/klog/v2" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "k8s.io/kubernetes/pkg/kubelet/winstats" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_legacy_service.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_legacy_service.go index 5026722303d..7e58333bff7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_legacy_service.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_legacy_service.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. @@ -30,27 +32,19 @@ import ( "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubetypes "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/kuberuntime" "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" ) -// DockerLegacyService interface embeds some legacy methods for backward compatibility. -// This file/interface will be removed in the near future. Do not modify or add -// more functions. -type DockerLegacyService interface { - // GetContainerLogs gets logs for a specific container. - GetContainerLogs(context.Context, *v1.Pod, kubecontainer.ContainerID, *v1.PodLogOptions, io.Writer, io.Writer) error - - // IsCRISupportedLogDriver checks whether the logging driver used by docker is - // supported by native CRI integration. - // TODO(resouer): remove this when deprecating unsupported log driver - IsCRISupportedLogDriver() (bool, error) - - kuberuntime.LegacyLogProvider -} +// We define `DockerLegacyService` in `pkg/kubelet/legacy`, instead of in this +// file. We make this decision because `pkg/kubelet` depends on +// `DockerLegacyService`, and we want to be able to build the `kubelet` without +// relying on `github.com/docker/docker` or `pkg/kubelet/dockershim`. +// +// See https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/20200205-build-kubelet-without-docker.md +// for details. // GetContainerLogs get container logs directly from docker daemon. func (d *dockerService) GetContainerLogs(_ context.Context, pod *v1.Pod, containerID kubecontainer.ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) error { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_logs.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_logs.go index 8a157ce8baf..760ff654028 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_logs.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_logs.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go index 0a077204782..81f8b771897 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. @@ -29,7 +31,7 @@ import ( dockerfilters "github.com/docker/docker/api/types/filters" utilerrors "k8s.io/apimachinery/pkg/util/errors" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/errors" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -657,10 +659,7 @@ func (ds *dockerService) makeSandboxDockerConfig(c *runtimeapi.PodSandboxConfig, } // Set security options. - securityOpts, err := ds.getSecurityOpts(c.GetLinux().GetSecurityContext().GetSeccompProfilePath(), securityOptSeparator) - if err != nil { - return nil, fmt.Errorf("failed to generate sandbox security options for sandbox %q: %v", c.Metadata.Name, err) - } + securityOpts := ds.getSandBoxSecurityOpts(securityOptSeparator) hc.SecurityOpt = append(hc.SecurityOpt, securityOpts...) applyExperimentalCreateConfig(createConfig, c.Annotations) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service.go index 227bef8211a..d9665698cc3 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. @@ -27,7 +29,7 @@ import ( "github.com/blang/semver" dockertypes "github.com/docker/docker/api/types" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" @@ -35,12 +37,13 @@ import ( "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/errors" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/cri/streaming" "k8s.io/kubernetes/pkg/kubelet/dockershim/cm" "k8s.io/kubernetes/pkg/kubelet/dockershim/network" "k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni" "k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport" "k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet" - "k8s.io/kubernetes/pkg/kubelet/server/streaming" + "k8s.io/kubernetes/pkg/kubelet/legacy" "k8s.io/kubernetes/pkg/kubelet/util/cache" "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" @@ -97,7 +100,7 @@ type DockerService interface { http.Handler // For supporting legacy features. - DockerLegacyService + legacy.DockerLegacyService } // NetworkPluginSettings is the subset of kubelet runtime args we pass diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats.go index 0a186cac31c..c68df6279bc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2019 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_linux.go index 11d6add29c4..811bb066aaf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_linux.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,!dockerless /* Copyright 2017 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_unsupported.go index 736215a9d64..560e243671b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows +// +build !linux,!windows,!dockerless /* Copyright 2017 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_windows.go index cd457d9f1b2..510362dede7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_windows.go @@ -1,4 +1,4 @@ -// +build windows +// +build windows,!dockerless /* Copyright 2017 The Kubernetes Authors. @@ -24,7 +24,7 @@ import ( "github.com/Microsoft/hcsshim" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" ) func (ds *dockerService) getContainerStats(containerID string) (*runtimeapi.ContainerStats, error) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming.go index 76b2fecd11b..91e194570eb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. @@ -28,7 +30,7 @@ import ( "k8s.io/client-go/tools/remotecommand" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/server/streaming" + "k8s.io/kubernetes/pkg/kubelet/cri/streaming" "k8s.io/kubernetes/pkg/kubelet/util/ioutils" utilexec "k8s.io/utils/exec" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_others.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_others.go index 75570086894..05035231fd2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_others.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_others.go @@ -1,4 +1,4 @@ -// +build !windows +// +build !windows,!dockerless /* Copyright 2019 The Kubernetes Authors. @@ -25,7 +25,7 @@ import ( "os/exec" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" ) func (r *streamingRuntime) portForward(podSandboxID string, port int32, stream io.ReadWriteCloser) error { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_windows.go index 151bd86066c..64c5ba18833 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_windows.go @@ -1,4 +1,4 @@ -// +build windows +// +build windows,!dockerless /* Copyright 2019 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/doc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/dockershim_nodocker.go similarity index 80% rename from vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/doc.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/dockershim_nodocker.go index 09f36e9aa81..1f5720a10af 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/dockershim_nodocker.go @@ -1,5 +1,7 @@ +// +build dockerless + /* -Copyright 2018 The Kubernetes Authors. +Copyright 2020 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. @@ -14,4 +16,4 @@ See the License for the specific language governing permissions and limitations under the License. */ -package auditsink // import "k8s.io/kubernetes/pkg/registry/auditregistration/auditsink" +package dockershim diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/exec.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/exec.go index 4b0d085b5a1..0d864edfe3a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/exec.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/exec.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2015 The Kubernetes Authors. @@ -22,7 +24,7 @@ import ( "time" dockertypes "github.com/docker/docker/api/types" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/client-go/tools/remotecommand" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers.go index 9883d901261..5bbae893e81 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. @@ -29,14 +31,14 @@ import ( dockercontainer "github.com/docker/docker/api/types/container" dockerfilters "github.com/docker/docker/api/types/filters" dockernat "github.com/docker/go-connections/nat" - "k8s.io/klog" + "k8s.io/klog/v2" + v1 "k8s.io/api/core/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "k8s.io/kubernetes/pkg/credentialprovider" "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/security/apparmor" "k8s.io/kubernetes/pkg/util/parsers" ) @@ -52,7 +54,7 @@ var ( // if a container starts but the executable file is not found, runc gives a message that matches startRE = regexp.MustCompile(`\\\\\\\"(.*)\\\\\\\": executable file not found`) - defaultSeccompOpt = []dockerOpt{{"seccomp", "unconfined", ""}} + defaultSeccompOpt = []dockerOpt{{"seccomp", v1.SeccompProfileNameUnconfined, ""}} ) // generateEnvList converts KeyValue list to a list of strings, in the form of @@ -361,18 +363,18 @@ func ensureSandboxImageExists(client libdocker.Interface, image string) error { } func getAppArmorOpts(profile string) ([]dockerOpt, error) { - if profile == "" || profile == apparmor.ProfileRuntimeDefault { + if profile == "" || profile == v1.AppArmorBetaProfileRuntimeDefault { // The docker applies the default profile by default. return nil, nil } // Return unconfined profile explicitly - if profile == apparmor.ProfileNameUnconfined { - return []dockerOpt{{"apparmor", apparmor.ProfileNameUnconfined, ""}}, nil + if profile == v1.AppArmorBetaProfileNameUnconfined { + return []dockerOpt{{"apparmor", v1.AppArmorBetaProfileNameUnconfined, ""}}, nil } // Assume validation has already happened. - profileName := strings.TrimPrefix(profile, apparmor.ProfileNamePrefix) + profileName := strings.TrimPrefix(profile, v1.AppArmorBetaProfileNamePrefix) return []dockerOpt{{"apparmor", profileName, ""}}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_linux.go index 11931a9ba9a..a892499e754 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_linux.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,!dockerless /* Copyright 2015 The Kubernetes Authors. @@ -30,7 +30,7 @@ import ( "github.com/blang/semver" dockertypes "github.com/docker/docker/api/types" dockercontainer "github.com/docker/docker/api/types/container" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" ) @@ -48,8 +48,14 @@ func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) return seccompSecurityOpts, nil } +func (ds *dockerService) getSandBoxSecurityOpts(separator rune) []string { + // run sandbox with no-new-privileges and using runtime/default + // sending no "seccomp=" means docker will use default profile + return []string{"no-new-privileges"} +} + func getSeccompDockerOpts(seccompProfile string) ([]dockerOpt, error) { - if seccompProfile == "" || seccompProfile == "unconfined" { + if seccompProfile == "" || seccompProfile == v1.SeccompProfileNameUnconfined { // return early the default return defaultSeccompOpt, nil } @@ -59,12 +65,12 @@ func getSeccompDockerOpts(seccompProfile string) ([]dockerOpt, error) { return nil, nil } - if !strings.HasPrefix(seccompProfile, "localhost/") { + if !strings.HasPrefix(seccompProfile, v1.SeccompLocalhostProfileNamePrefix) { return nil, fmt.Errorf("unknown seccomp profile option: %s", seccompProfile) } // get the full path of seccomp profile when prefixed with 'localhost/'. - fname := strings.TrimPrefix(seccompProfile, "localhost/") + fname := strings.TrimPrefix(seccompProfile, v1.SeccompLocalhostProfileNamePrefix) if !filepath.IsAbs(fname) { return nil, fmt.Errorf("seccomp profile path must be absolute, but got relative path %q", fname) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_unsupported.go index 623e0b56b44..cdf7128fd5b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows +// +build !linux,!windows,!dockerless /* Copyright 2015 The Kubernetes Authors. @@ -24,7 +24,7 @@ import ( "github.com/blang/semver" dockertypes "github.com/docker/docker/api/types" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" ) func DefaultMemorySwap() int64 { @@ -36,6 +36,11 @@ func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) return nil, nil } +func (ds *dockerService) getSandBoxSecurityOpts(separator rune) []string { + klog.Warningf("getSandBoxSecurityOpts is unsupported in this build") + return nil +} + func (ds *dockerService) updateCreateConfig( createConfig *dockertypes.ContainerCreateConfig, config *runtimeapi.ContainerConfig, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_windows.go index 42d32839b5b..119fcc66294 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_windows.go @@ -1,4 +1,4 @@ -// +build windows +// +build windows,!dockerless /* Copyright 2015 The Kubernetes Authors. @@ -20,13 +20,13 @@ package dockershim import ( "os" + "runtime" "github.com/blang/semver" dockertypes "github.com/docker/docker/api/types" dockercontainer "github.com/docker/docker/api/types/container" dockerfilters "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/pkg/sysinfo" - "k8s.io/klog" + "k8s.io/klog/v2" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" @@ -43,6 +43,12 @@ func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) return nil, nil } +func (ds *dockerService) getSandBoxSecurityOpts(separator rune) []string { + // Currently, Windows container does not support privileged mode, so no no-new-privileges flag can be returned directly like Linux + // If the future Windows container has new support for privileged mode, we can adjust it here + return nil +} + // applyExperimentalCreateConfig applys experimental configures from sandbox annotations. func applyExperimentalCreateConfig(createConfig *dockertypes.ContainerCreateConfig, annotations map[string]string) { if kubeletapis.ShouldIsolatedByHyperV(annotations) { @@ -75,7 +81,7 @@ func (ds *dockerService) updateCreateConfig( Memory: rOpts.MemoryLimitInBytes, CPUShares: rOpts.CpuShares, CPUCount: rOpts.CpuCount, - NanoCPUs: rOpts.CpuMaximum * int64(sysinfo.NumCPU()) * (1e9 / 10000), + NanoCPUs: rOpts.CpuMaximum * int64(runtime.NumCPU()) * (1e9 / 10000), } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/BUILD index f706d66e3e8..81e960570be 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/BUILD @@ -41,7 +41,7 @@ go_library( "//vendor/github.com/docker/docker/pkg/jsonmessage:go_default_library", "//vendor/github.com/docker/docker/pkg/stdcopy:go_default_library", "//vendor/github.com/opencontainers/go-digest:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/client.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/client.go index 72af28d05d2..2e454ebc56d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/client.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/client.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2014 The Kubernetes Authors. @@ -23,7 +25,7 @@ import ( dockercontainer "github.com/docker/docker/api/types/container" dockerimagetypes "github.com/docker/docker/api/types/image" dockerapi "github.com/docker/docker/client" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -73,7 +75,7 @@ type Interface interface { func getDockerClient(dockerEndpoint string) (*dockerapi.Client, error) { if len(dockerEndpoint) > 0 { klog.Infof("Connecting to docker on %s", dockerEndpoint) - return dockerapi.NewClient(dockerEndpoint, "", nil, nil) + return dockerapi.NewClientWithOpts(dockerapi.WithHost(dockerEndpoint), dockerapi.WithVersion("")) } return dockerapi.NewClientWithOpts(dockerapi.FromEnv) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/fake_client.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/fake_client.go index d75728d2e17..27d38ebfd93 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/fake_client.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/fake_client.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/helpers.go index 171b247f8f0..84aa0a2d16b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/helpers.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2014 The Kubernetes Authors. @@ -23,7 +25,7 @@ import ( dockerref "github.com/docker/distribution/reference" dockertypes "github.com/docker/docker/api/types" godigest "github.com/opencontainers/go-digest" - "k8s.io/klog" + "k8s.io/klog/v2" ) // ParseDockerTimestamp parses the timestamp returned by Interface from string to time.Time diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/instrumented_client.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/instrumented_client.go index d2cefafb729..d6c80e3dee7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/instrumented_client.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/instrumented_client.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2015 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/kube_docker_client.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/kube_docker_client.go index 7f961297a53..804b5cd9fda 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/kube_docker_client.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/kube_docker_client.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. @@ -28,7 +30,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" dockertypes "github.com/docker/docker/api/types" dockercontainer "github.com/docker/docker/api/types/container" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/metrics/metrics.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/metrics/metrics.go index 16be68982bc..73fd251707c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/metrics/metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/metrics/metrics.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2015 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming.go index f464dab2831..47e55a05733 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/BUILD index f8d3b314fd0..fa8fddd2b8b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/BUILD index 1b3df59a867..1c723a0d1dc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", "//vendor/github.com/containernetworking/cni/libcni:go_default_library", "//vendor/github.com/containernetworking/cni/pkg/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:windows": [ diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni.go index 5c471f9272d..d977abd027b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2014 The Kubernetes Authors. @@ -30,7 +32,7 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types" "k8s.io/apimachinery/pkg/util/wait" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/dockershim/network" @@ -92,15 +94,15 @@ type cniPortMapping struct { // see: https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md and // https://github.com/containernetworking/plugins/blob/master/plugins/meta/bandwidth/README.md type cniBandwidthEntry struct { - // IngressRate is the bandwidth rate in bits per second for traffic through container. 0 for no limit. If ingressRate is set, ingressBurst must also be set + // IngressRate is the bandwidth rate in bits per second for traffic through container. 0 for no limit. If IngressRate is set, IngressBurst must also be set IngressRate int `json:"ingressRate,omitempty"` - // IngressBurst is the bandwidth burst in bits for traffic through container. 0 for no limit. If ingressBurst is set, ingressRate must also be set - // NOTE: it's not used for now and default to 0. + // IngressBurst is the bandwidth burst in bits for traffic through container. 0 for no limit. If IngressBurst is set, IngressRate must also be set + // NOTE: it's not used for now and defaults to 0. If IngressRate is set IngressBurst will be math.MaxInt32 ~ 2Gbit IngressBurst int `json:"ingressBurst,omitempty"` - // EgressRate is the bandwidth is the bandwidth rate in bits per second for traffic through container. 0 for no limit. If egressRate is set, egressBurst must also be set + // EgressRate is the bandwidth is the bandwidth rate in bits per second for traffic through container. 0 for no limit. If EgressRate is set, EgressBurst must also be set EgressRate int `json:"egressRate,omitempty"` - // EgressBurst is the bandwidth burst in bits for traffic through container. 0 for no limit. If egressBurst is set, egressRate must also be set - // NOTE: it's not used for now and default to 0. + // EgressBurst is the bandwidth burst in bits for traffic through container. 0 for no limit. If EgressBurst is set, EgressRate must also be set + // NOTE: it's not used for now and defaults to 0. If EgressRate is set EgressBurst will be math.MaxInt32 ~ 2Gbit EgressBurst int `json:"egressBurst,omitempty"` } @@ -436,11 +438,13 @@ func (plugin *cniNetworkPlugin) buildCNIRuntimeConf(podName string, podNs string // https://github.com/containernetworking/plugins/blob/master/plugins/meta/bandwidth/README.md // Rates are in bits per second, burst values are in bits. bandwidthParam.IngressRate = int(ingress.Value()) - bandwidthParam.IngressBurst = math.MaxInt32 // no limit + // Limit IngressBurst to math.MaxInt32, in practice limiting to 2Gbit is the equivalent of setting no limit + bandwidthParam.IngressBurst = math.MaxInt32 } if egress != nil { bandwidthParam.EgressRate = int(egress.Value()) - bandwidthParam.EgressBurst = math.MaxInt32 // no limit + // Limit EgressBurst to math.MaxInt32, in practice limiting to 2Gbit is the equivalent of setting no limit + bandwidthParam.EgressBurst = math.MaxInt32 } rt.CapabilityArgs[bandwidthCapability] = bandwidthParam } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_others.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_others.go index 55487454310..3c2c4852b71 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_others.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_others.go @@ -1,4 +1,4 @@ -// +build !windows +// +build !windows,!dockerless /* Copyright 2017 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_windows.go index 316d4df9b99..e76f69816c9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_windows.go @@ -1,4 +1,4 @@ -// +build windows +// +build windows,!dockerless /* Copyright 2017 The Kubernetes Authors. @@ -21,13 +21,13 @@ package cni import ( "context" "fmt" - "time" - cniTypes020 "github.com/containernetworking/cni/pkg/types/020" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/dockershim/network" + "net" + "time" ) func getLoNetwork(binDirs []string) *cniNetwork { @@ -67,7 +67,14 @@ func (plugin *cniNetworkPlugin) GetPodNetworkStatus(namespace string, name strin klog.Errorf("error while cni parsing result: %s", err) return nil, err } - return &network.PodNetworkStatus{IP: result020.IP4.IP.IP}, nil + + var list = []net.IP{result020.IP4.IP.IP} + + if result020.IP6 != nil { + list = append(list, result020.IP6.IP.IP) + } + + return &network.PodNetworkStatus{IP: result020.IP4.IP.IP, IPs: list}, nil } // buildDNSCapabilities builds cniDNSConfig from runtimeapi.DNSConfig. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/BUILD index 86afb9b03cd..6173ad306d3 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/BUILD @@ -22,7 +22,7 @@ go_library( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/fake_iptables.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/fake_iptables.go index 0c96e7a78b8..9080a58b3d5 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/fake_iptables.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/fake_iptables.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. @@ -40,7 +42,7 @@ type fakeTable struct { type fakeIPTables struct { tables map[string]*fakeTable builtinChains map[string]sets.String - ipv6 bool + protocol utiliptables.Protocol } func NewFakeIPTables() *fakeIPTables { @@ -51,7 +53,7 @@ func NewFakeIPTables() *fakeIPTables { string(utiliptables.TableNAT): sets.NewString("PREROUTING", "INPUT", "OUTPUT", "POSTROUTING"), string(utiliptables.TableMangle): sets.NewString("PREROUTING", "INPUT", "FORWARD", "OUTPUT", "POSTROUTING"), }, - ipv6: false, + protocol: utiliptables.ProtocolIPv4, } } @@ -223,8 +225,12 @@ func (f *fakeIPTables) DeleteRule(tableName utiliptables.Table, chainName utilip return nil } -func (f *fakeIPTables) IsIpv6() bool { - return f.ipv6 +func (f *fakeIPTables) IsIPv6() bool { + return f.protocol == utiliptables.ProtocolIPv6 +} + +func (f *fakeIPTables) Protocol() utiliptables.Protocol { + return f.protocol } func saveChain(chain *fakeChain, data *bytes.Buffer) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport.go index 3c01b6e866d..2656aa37935 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2017 The Kubernetes Authors. @@ -21,7 +23,7 @@ import ( "net" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" utiliptables "k8s.io/kubernetes/pkg/util/iptables" @@ -137,7 +139,7 @@ func ensureKubeHostportChains(iptables utiliptables.Interface, natInterfaceName if natInterfaceName != "" && natInterfaceName != "lo" { // Need to SNAT traffic from localhost localhost := "127.0.0.0/8" - if iptables.IsIpv6() { + if iptables.IsIPv6() { localhost = "::1/128" } args = []string{"-m", "comment", "--comment", "SNAT for localhost access to hostports", "-o", natInterfaceName, "-s", localhost, "-j", "MASQUERADE"} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport_manager.go index 9d1286aaaf2..4c3006092f3 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport_manager.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2017 The Kubernetes Authors. @@ -28,7 +30,7 @@ import ( v1 "k8s.io/api/core/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/klog" + "k8s.io/klog/v2" iptablesproxy "k8s.io/kubernetes/pkg/proxy/iptables" "k8s.io/kubernetes/pkg/util/conntrack" utiliptables "k8s.io/kubernetes/pkg/util/iptables" @@ -88,10 +90,10 @@ func (hm *hostportManager) Add(id string, podPortMapping *PodPortMapping, natInt return fmt.Errorf("invalid or missing IP of pod %s", podFullName) } podIP := podPortMapping.IP.String() - isIpv6 := utilnet.IsIPv6(podPortMapping.IP) + isIPv6 := utilnet.IsIPv6(podPortMapping.IP) - if isIpv6 != hm.iptables.IsIpv6() { - return fmt.Errorf("HostPortManager IP family mismatch: %v, isIPv6 - %v", podIP, isIpv6) + if isIPv6 != hm.iptables.IsIPv6() { + return fmt.Errorf("HostPortManager IP family mismatch: %v, isIPv6 - %v", podIP, isIPv6) } if err = ensureKubeHostportChains(hm.iptables, natInterfaceName); err != nil { @@ -180,9 +182,9 @@ func (hm *hostportManager) Add(id string, podPortMapping *PodPortMapping, natInt // create a new conntrack entry without any DNAT. That will result in blackhole of the traffic even after correct // iptables rules have been added back. if hm.execer != nil && hm.conntrackFound { - klog.Infof("Starting to delete udp conntrack entries: %v, isIPv6 - %v", conntrackPortsToRemove, isIpv6) + klog.Infof("Starting to delete udp conntrack entries: %v, isIPv6 - %v", conntrackPortsToRemove, isIPv6) for _, port := range conntrackPortsToRemove { - err = conntrack.ClearEntriesForPort(hm.execer, port, isIpv6, v1.ProtocolUDP) + err = conntrack.ClearEntriesForPort(hm.execer, port, isIPv6, v1.ProtocolUDP) if err != nil { klog.Errorf("Failed to clear udp conntrack for port %d, error: %v", port, err) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport_syncer.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport_syncer.go index 2d8b1bf4368..cef1deaec93 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport_syncer.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport_syncer.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2014 The Kubernetes Authors. @@ -26,7 +28,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" iptablesproxy "k8s.io/kubernetes/pkg/proxy/iptables" @@ -199,7 +201,7 @@ func (h *hostportSyncer) SyncHostports(natInterfaceName string, activePodPortMap klog.V(4).Infof("syncHostportsRules took %v", time.Since(start)) }() - hostportPodMap, err := gatherAllHostports(activePodPortMappings, h.iptables.IsIpv6()) + hostportPodMap, err := gatherAllHostports(activePodPortMappings, h.iptables.IsIPv6()) if err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/BUILD index 358c95116d6..6597874820e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/BUILD @@ -15,6 +15,11 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet", deps = select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//pkg/kubelet/apis/config:go_default_library", + "//pkg/kubelet/container:go_default_library", + "//pkg/kubelet/dockershim/network:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//pkg/features:go_default_library", "//pkg/kubelet/apis/config:go_default_library", @@ -34,7 +39,7 @@ go_library( "//vendor/github.com/containernetworking/cni/pkg/types/020:go_default_library", "//vendor/github.com/vishvananda/netlink:go_default_library", "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], @@ -53,11 +58,21 @@ go_library( "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/dockershim/network:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/kubelet/apis/config:go_default_library", + "//pkg/kubelet/container:go_default_library", + "//pkg/kubelet/dockershim/network:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/apis/config:go_default_library", "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/dockershim/network:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//pkg/kubelet/apis/config:go_default_library", + "//pkg/kubelet/container:go_default_library", + "//pkg/kubelet/dockershim/network:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//pkg/features:go_default_library", "//pkg/kubelet/apis/config:go_default_library", @@ -77,7 +92,7 @@ go_library( "//vendor/github.com/containernetworking/cni/pkg/types/020:go_default_library", "//vendor/github.com/vishvananda/netlink:go_default_library", "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet.go index 146ae732e70..558cf0bdfbe 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_linux.go index bf7a828ec2d..40158ea619b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_linux.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux,!dockerless /* Copyright 2014 The Kubernetes Authors. @@ -35,7 +35,7 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" utilnet "k8s.io/apimachinery/pkg/util/net" utilsets "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/klog" + "k8s.io/klog/v2" kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/dockershim/network" @@ -122,8 +122,8 @@ type kubenetNetworkPlugin struct { func NewPlugin(networkPluginDirs []string, cacheDir string) network.NetworkPlugin { execer := utilexec.New() - iptInterface := utiliptables.New(execer, utiliptables.ProtocolIpv4) - iptInterfacev6 := utiliptables.New(execer, utiliptables.ProtocolIpv6) + iptInterface := utiliptables.New(execer, utiliptables.ProtocolIPv4) + iptInterfacev6 := utiliptables.New(execer, utiliptables.ProtocolIPv6) return &kubenetNetworkPlugin{ podIPs: make(map[kubecontainer.ContainerID]utilsets.String), execer: utilexec.New(), diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_unsupported.go index 5b7ef00cb26..05d9c66fcf2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux +// +build !linux,!dockerless /* Copyright 2014 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/metrics/metrics.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/metrics/metrics.go index b5da24400a6..eaa05f0649d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/metrics/metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/metrics/metrics.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/network.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/network.go index fbd1ba12550..a609c8cf8d9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/network.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/network.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2014 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/plugins.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/plugins.go index 9c904202ba3..29b8a7e2c46 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/plugins.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/plugins.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2014 The Kubernetes Authors. @@ -27,7 +29,7 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" utilsets "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" - "k8s.io/klog" + "k8s.io/klog/v2" kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/BUILD index cd5e929f5dd..ac203624c91 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/BUILD @@ -14,7 +14,7 @@ go_library( "//pkg/kubelet/util:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/docker_server.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/docker_server.go index 167843dd321..e5be0d6875b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/docker_server.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/docker_server.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. @@ -21,7 +23,7 @@ import ( "google.golang.org/grpc" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/dockershim" "k8s.io/kubernetes/pkg/kubelet/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context.go index 38fed8daded..571fdd33767 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/selinux_util.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/selinux_util.go index 1cd05f04642..00565596273 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/selinux_util.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/selinux_util.go @@ -1,3 +1,5 @@ +// +build !dockerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/BUILD index 796449f531d..a7315f84063 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/BUILD @@ -69,7 +69,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:android": [ "//vendor/golang.org/x/sys/unix:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go index b92267ed740..ade19e9be16 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go @@ -22,7 +22,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" @@ -325,7 +325,7 @@ func (m *managerImpl) synchronize(diskInfoProvider DiskInfoProvider, podFunc Act // evict pods if there is a resource usage violation from local volume temporary storage // If eviction happens in localStorageEviction function, skip the rest of eviction action if utilfeature.DefaultFeatureGate.Enabled(features.LocalStorageCapacityIsolation) { - if evictedPods := m.localStorageEviction(summary, activePods); len(evictedPods) > 0 { + if evictedPods := m.localStorageEviction(activePods, statsFunc); len(evictedPods) > 0 { return evictedPods } } @@ -455,8 +455,7 @@ func (m *managerImpl) reclaimNodeLevelResources(signalToReclaim evictionapi.Sign // localStorageEviction checks the EmptyDir volume usage for each pod and determine whether it exceeds the specified limit and needs // to be evicted. It also checks every container in the pod, if the container overlay usage exceeds the limit, the pod will be evicted too. -func (m *managerImpl) localStorageEviction(summary *statsapi.Summary, pods []*v1.Pod) []*v1.Pod { - statsFunc := cachedStatsFunc(summary.Pods) +func (m *managerImpl) localStorageEviction(pods []*v1.Pod, statsFunc statsFunc) []*v1.Pod { evicted := []*v1.Pod{} for _, pod := range pods { podStats, ok := statsFunc(pod) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers.go index e4b304c98e0..b65e29357f1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers.go @@ -26,7 +26,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/api/v1/pod" v1resource "k8s.io/kubernetes/pkg/api/v1/resource" statsapi "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1" @@ -165,7 +165,7 @@ func addAllocatableThresholds(thresholds []evictionapi.Threshold) []evictionapi. }) } } - return append(thresholds, additionalThresholds...) + return append(append([]evictionapi.Threshold{}, thresholds...), additionalThresholds...) } // parseThresholdStatements parses the input statements into a list of Threshold objects. @@ -329,6 +329,15 @@ func memoryUsage(memStats *statsapi.MemoryStats) *resource.Quantity { return resource.NewQuantity(usage, resource.BinarySI) } +// processUsage converts working set into a process count. +func processUsage(processStats *statsapi.ProcessStats) uint64 { + if processStats == nil || processStats.ProcessCount == nil { + return 0 + } + usage := uint64(*processStats.ProcessCount) + return usage +} + // localVolumeNames returns the set of volumes for the pod that are local // TODO: summary API should report what volumes consume local storage rather than hard-code here. func localVolumeNames(pod *v1.Pod) []string { @@ -573,6 +582,23 @@ func memory(stats statsFunc) cmpFunc { } } +// process compares pods by largest consumer of process number relative to request. +func process(stats statsFunc) cmpFunc { + return func(p1, p2 *v1.Pod) int { + p1Stats, p1Found := stats(p1) + p2Stats, p2Found := stats(p2) + if !p1Found || !p2Found { + // prioritize evicting the pod for which no stats were found + return cmpBool(!p1Found, !p2Found) + } + + p1Process := processUsage(p1Stats.ProcessStats) + p2Process := processUsage(p2Stats.ProcessStats) + // prioritize evicting the pod which has the larger consumption of process + return int(p2Process - p1Process) + } +} + // exceedDiskRequests compares whether or not pods' disk usage exceeds their requests func exceedDiskRequests(stats statsFunc, fsStatsToMeasure []fsStatsType, diskResource v1.ResourceName) cmpFunc { return func(p1, p2 *v1.Pod) int { @@ -647,7 +673,7 @@ func rankMemoryPressure(pods []*v1.Pod, stats statsFunc) { // rankPIDPressure orders the input pods by priority in response to PID pressure. func rankPIDPressure(pods []*v1.Pod, stats statsFunc) { - orderedBy(priority).Sort(pods) + orderedBy(priority, process(stats)).Sort(pods) } // rankDiskPressureFunc returns a rankFunc that measures the specified fs stats. @@ -780,7 +806,7 @@ func thresholdsMet(thresholds []evictionapi.Threshold, observations signalObserv } func debugLogObservations(logPrefix string, observations signalObservations) { - if !klog.V(3) { + if !klog.V(3).Enabled() { return } for k, v := range observations { @@ -793,7 +819,7 @@ func debugLogObservations(logPrefix string, observations signalObservations) { } func debugLogThresholdsWithObservation(logPrefix string, thresholds []evictionapi.Threshold, observations signalObservations) { - if !klog.V(3) { + if !klog.V(3).Enabled() { return } for i := range thresholds { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/memory_threshold_notifier.go b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/memory_threshold_notifier.go index b60393e8c64..9497a838194 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/memory_threshold_notifier.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/memory_threshold_notifier.go @@ -20,7 +20,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/resource" statsapi "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_linux.go index 7ca6704d2db..270a7452db9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_linux.go @@ -22,7 +22,7 @@ import ( "time" "golang.org/x/sys/unix" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_unsupported.go index afa92fe5fce..c82954e25dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_unsupported.go @@ -18,7 +18,7 @@ limitations under the License. package eviction -import "k8s.io/klog" +import "k8s.io/klog/v2" // NewCgroupNotifier creates a cgroup notifier that does nothing because cgroups do not exist on non-linux systems. func NewCgroupNotifier(path, attribute string, threshold int64) (CgroupNotifier, error) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/images/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/images/BUILD index fdcb40d3272..2dc53de9f46 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/images/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/images/BUILD @@ -22,7 +22,6 @@ go_library( "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/events:go_default_library", "//pkg/kubelet/util/sliceutils:go_default_library", - "//pkg/util/parsers:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", @@ -31,7 +30,7 @@ go_library( "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", "//vendor/github.com/docker/distribution/reference:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/images/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/images/OWNERS deleted file mode 100644 index 0fcf4abf564..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/images/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -approvers: -- sjenning diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_gc_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_gc_manager.go index f625cac20d7..9ed01d7d421 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_gc_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_gc_manager.go @@ -24,7 +24,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/errors" @@ -190,7 +190,6 @@ func (im *realImageGCManager) Start() { }, 5*time.Minute, wait.NeverStop) // Start a goroutine periodically updates image cache. - // TODO(random-liu): Merge this with the previous loop. go wait.Until(func() { images, err := im.runtime.ListImages() if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager.go index 791fed00725..d41ebcebc38 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager.go @@ -18,17 +18,17 @@ package images import ( "fmt" + "time" dockerref "github.com/docker/distribution/reference" v1 "k8s.io/api/core/v1" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/events" - "k8s.io/kubernetes/pkg/util/parsers" ) // imageManager provides the functionalities for image pulling. @@ -87,7 +87,7 @@ func (m *imageManager) logIt(ref *v1.ObjectReference, eventtype, event, prefix, // EnsureImageExists pulls the image for the specified pod and container, and returns // (imageRef, error message, error). func (m *imageManager) EnsureImageExists(pod *v1.Pod, container *v1.Container, pullSecrets []v1.Secret, podSandboxConfig *runtimeapi.PodSandboxConfig) (string, string, error) { - logPrefix := fmt.Sprintf("%s/%s", pod.Name, container.Image) + logPrefix := fmt.Sprintf("%s/%s/%s", pod.Namespace, pod.Name, container.Image) ref, err := kubecontainer.GenerateContainerRef(pod, container) if err != nil { klog.Errorf("Couldn't make a ref to pod %v, container %v: '%v'", pod.Name, container.Name, err) @@ -101,7 +101,18 @@ func (m *imageManager) EnsureImageExists(pod *v1.Pod, container *v1.Container, p return "", msg, ErrInvalidImageName } - spec := kubecontainer.ImageSpec{Image: image} + var podAnnotations []kubecontainer.Annotation + for k, v := range pod.GetAnnotations() { + podAnnotations = append(podAnnotations, kubecontainer.Annotation{ + Name: k, + Value: v, + }) + } + + spec := kubecontainer.ImageSpec{ + Image: image, + Annotations: podAnnotations, + } imageRef, err := m.imageService.GetImageRef(spec) if err != nil { msg := fmt.Sprintf("Failed to inspect image %q: %v", container.Image, err) @@ -128,6 +139,7 @@ func (m *imageManager) EnsureImageExists(pod *v1.Pod, container *v1.Container, p return "", msg, ErrImagePullBackOff } m.logIt(ref, v1.EventTypeNormal, events.PullingImage, logPrefix, fmt.Sprintf("Pulling image %q", container.Image), klog.Info) + startTime := time.Now() pullChan := make(chan pullResult) m.puller.pullImage(spec, pullSecrets, pullChan, podSandboxConfig) imagePullResult := <-pullChan @@ -141,7 +153,7 @@ func (m *imageManager) EnsureImageExists(pod *v1.Pod, container *v1.Container, p return "", imagePullResult.err.Error(), ErrImagePull } - m.logIt(ref, v1.EventTypeNormal, events.PulledImage, logPrefix, fmt.Sprintf("Successfully pulled image %q", container.Image), klog.Info) + m.logIt(ref, v1.EventTypeNormal, events.PulledImage, logPrefix, fmt.Sprintf("Successfully pulled image %q in %v", container.Image, time.Since(startTime)), klog.Info) m.backOff.GC() return imagePullResult.imageRef, "", nil } @@ -161,7 +173,7 @@ func applyDefaultImageTag(image string) (string, error) { // image to be fully qualified as docker.io/$name if it's a short name // (e.g. just busybox). We don't want that to happen to keep the CRI // agnostic wrt image names and default hostnames. - image = image + ":" + parsers.DefaultImageTag + image = image + ":latest" } return image, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go index 5869bc9e894..2fdd321e583 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go @@ -17,7 +17,6 @@ limitations under the License. package kubelet import ( - "context" "crypto/tls" "fmt" "math" @@ -32,6 +31,8 @@ import ( "sync/atomic" "time" + "k8s.io/client-go/informers" + cadvisorapi "github.com/google/cadvisor/info/v1" utilexec "k8s.io/utils/exec" "k8s.io/utils/integer" @@ -57,7 +58,7 @@ import ( "k8s.io/client-go/util/flowcontrol" cloudprovider "k8s.io/cloud-provider" internalapi "k8s.io/cri-api/pkg/apis" - "k8s.io/klog" + "k8s.io/klog/v2" pluginwatcherapi "k8s.io/kubelet/pkg/apis/pluginregistration/v1" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/features" @@ -65,19 +66,19 @@ import ( "k8s.io/kubernetes/pkg/kubelet/apis/podresources" "k8s.io/kubernetes/pkg/kubelet/cadvisor" kubeletcertificate "k8s.io/kubernetes/pkg/kubelet/certificate" - "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" "k8s.io/kubernetes/pkg/kubelet/cloudresource" "k8s.io/kubernetes/pkg/kubelet/cm" "k8s.io/kubernetes/pkg/kubelet/config" "k8s.io/kubernetes/pkg/kubelet/configmap" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/dockershim" - dockerremote "k8s.io/kubernetes/pkg/kubelet/dockershim/remote" + "k8s.io/kubernetes/pkg/kubelet/cri/remote" + "k8s.io/kubernetes/pkg/kubelet/cri/streaming" "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/eviction" "k8s.io/kubernetes/pkg/kubelet/images" "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" "k8s.io/kubernetes/pkg/kubelet/kuberuntime" + "k8s.io/kubernetes/pkg/kubelet/legacy" "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/logs" "k8s.io/kubernetes/pkg/kubelet/metrics" @@ -92,13 +93,11 @@ import ( "k8s.io/kubernetes/pkg/kubelet/preemption" "k8s.io/kubernetes/pkg/kubelet/prober" proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" - "k8s.io/kubernetes/pkg/kubelet/remote" "k8s.io/kubernetes/pkg/kubelet/runtimeclass" "k8s.io/kubernetes/pkg/kubelet/secret" "k8s.io/kubernetes/pkg/kubelet/server" servermetrics "k8s.io/kubernetes/pkg/kubelet/server/metrics" serverstats "k8s.io/kubernetes/pkg/kubelet/server/stats" - "k8s.io/kubernetes/pkg/kubelet/server/streaming" "k8s.io/kubernetes/pkg/kubelet/stats" "k8s.io/kubernetes/pkg/kubelet/status" "k8s.io/kubernetes/pkg/kubelet/sysctl" @@ -113,7 +112,6 @@ import ( "k8s.io/kubernetes/pkg/security/apparmor" sysctlwhitelist "k8s.io/kubernetes/pkg/security/podsecuritypolicy/sysctl" utilipt "k8s.io/kubernetes/pkg/util/iptables" - nodeutil "k8s.io/kubernetes/pkg/util/node" "k8s.io/kubernetes/pkg/util/oom" "k8s.io/kubernetes/pkg/util/selinux" "k8s.io/kubernetes/pkg/volume" @@ -136,11 +134,6 @@ const ( // MaxContainerBackOff is the max backoff period, exported for the e2e test MaxContainerBackOff = 300 * time.Second - // Capacity of the channel for storing pods to kill. A small number should - // suffice because a goroutine is dedicated to check the channel and does - // not block on anything else. - podKillingChannelCapacity = 50 - // Period for performing global cleanup tasks. housekeepingPeriod = time.Second * 2 @@ -197,46 +190,13 @@ type Bootstrap interface { GetConfiguration() kubeletconfiginternal.KubeletConfiguration BirthCry() StartGarbageCollection() - ListenAndServe(address net.IP, port uint, tlsOptions *server.TLSOptions, auth server.AuthInterface, enableCAdvisorJSONEndpoints, enableDebuggingHandlers, enableContentionProfiling bool) + ListenAndServe(address net.IP, port uint, tlsOptions *server.TLSOptions, auth server.AuthInterface, enableCAdvisorJSONEndpoints, enableDebuggingHandlers, enableContentionProfiling, enableSystemLogHandler bool) ListenAndServeReadOnly(address net.IP, port uint, enableCAdvisorJSONEndpoints bool) ListenAndServePodResources() Run(<-chan kubetypes.PodUpdate) RunOnce(<-chan kubetypes.PodUpdate) ([]RunPodResult, error) } -// Builder creates and initializes a Kubelet instance -type Builder func(kubeCfg *kubeletconfiginternal.KubeletConfiguration, - kubeDeps *Dependencies, - crOptions *config.ContainerRuntimeOptions, - containerRuntime string, - runtimeCgroups string, - hostnameOverride string, - nodeIP string, - providerID string, - cloudProvider string, - certDirectory string, - rootDirectory string, - registerNode bool, - registerWithTaints []api.Taint, - allowedUnsafeSysctls []string, - remoteRuntimeEndpoint string, - remoteImageEndpoint string, - experimentalMounterPath string, - experimentalKernelMemcgNotification bool, - experimentalCheckNodeCapabilitiesBeforeMount bool, - experimentalNodeAllocatableIgnoreEvictionThreshold bool, - minimumGCAge metav1.Duration, - maxPerPodContainerCount int32, - maxContainerCount int32, - masterServiceNamespace string, - registerSchedulable bool, - nonMasqueradeCIDR string, - keepTerminatedPodVolumes bool, - nodeLabels map[string]string, - seccompProfileRoot string, - bootstrapCheckpointPath string, - nodeStatusMaxImages int32) (Bootstrap, error) - // Dependencies is a bin for things we might consider "injected dependencies" -- objects constructed // at runtime that are necessary for running the Kubelet. This is a temporary solution for grouping // these objects while we figure out a more comprehensive dependency injection story for the Kubelet. @@ -248,7 +208,7 @@ type Dependencies struct { CAdvisorInterface cadvisor.Interface Cloud cloudprovider.Interface ContainerManager cm.ContainerManager - DockerClientConfig *dockershim.ClientConfig + DockerOptions *DockerOptions EventClient v1core.EventsGetter HeartbeatClient clientset.Interface OnHeartbeatFailure func() @@ -267,14 +227,23 @@ type Dependencies struct { RemoteRuntimeService internalapi.RuntimeService RemoteImageService internalapi.ImageManagerService criHandler http.Handler - dockerLegacyService dockershim.DockerLegacyService + dockerLegacyService legacy.DockerLegacyService // remove it after cadvisor.UsingLegacyCadvisorStats dropped. useLegacyCadvisorStats bool } +// DockerOptions contains docker specific configuration. Importantly, since it +// lives outside of `dockershim`, it should not depend on the `docker/docker` +// client library. +type DockerOptions struct { + DockerEndpoint string + RuntimeRequestTimeout time.Duration + ImagePullProgressDeadline time.Duration +} + // makePodSourceConfig creates a config.PodConfig from the given // KubeletConfiguration or returns an error. -func makePodSourceConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies, nodeName types.NodeName, bootstrapCheckpointPath string) (*config.PodConfig, error) { +func makePodSourceConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies, nodeName types.NodeName) (*config.PodConfig, error) { manifestURLHeader := make(http.Header) if len(kubeCfg.StaticPodURLHeader) > 0 { for k, v := range kubeCfg.StaticPodURLHeader { @@ -299,20 +268,7 @@ func makePodSourceConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, ku config.NewSourceURL(kubeCfg.StaticPodURL, manifestURLHeader, nodeName, kubeCfg.HTTPCheckFrequency.Duration, cfg.Channel(kubetypes.HTTPSource)) } - // Restore from the checkpoint path - // NOTE: This MUST happen before creating the apiserver source - // below, or the checkpoint would override the source of truth. - var updatechannel chan<- interface{} - if bootstrapCheckpointPath != "" { - klog.Infof("Adding checkpoint path: %v", bootstrapCheckpointPath) - updatechannel = cfg.Channel(kubetypes.ApiserverSource) - err := cfg.Restore(bootstrapCheckpointPath, updatechannel) - if err != nil { - return nil, err - } - } - if kubeDeps.KubeClient != nil { klog.Infof("Watching apiserver") if updatechannel == nil { @@ -341,46 +297,17 @@ func PreInitRuntimeService(kubeCfg *kubeletconfiginternal.KubeletConfiguration, switch containerRuntime { case kubetypes.DockerContainerRuntime: - // TODO: These need to become arguments to a standalone docker shim. - pluginSettings := dockershim.NetworkPluginSettings{ - HairpinMode: kubeletconfiginternal.HairpinMode(kubeCfg.HairpinMode), - NonMasqueradeCIDR: nonMasqueradeCIDR, - PluginName: crOptions.NetworkPluginName, - PluginConfDir: crOptions.CNIConfDir, - PluginBinDirString: crOptions.CNIBinDir, - PluginCacheDir: crOptions.CNICacheDir, - MTU: int(crOptions.NetworkPluginMTU), - } - - // Create and start the CRI shim running as a grpc server. - streamingConfig := getStreamingConfig(kubeCfg, kubeDeps, crOptions) - ds, err := dockershim.NewDockerService(kubeDeps.DockerClientConfig, crOptions.PodSandboxImage, streamingConfig, - &pluginSettings, runtimeCgroups, kubeCfg.CgroupDriver, crOptions.DockershimRootDirectory, !crOptions.RedirectContainerStreaming) - if err != nil { - return err - } - if crOptions.RedirectContainerStreaming { - kubeDeps.criHandler = ds - } - - // The unix socket for kubelet <-> dockershim communication, dockershim start before runtime service init. - klog.V(5).Infof("RemoteRuntimeEndpoint: %q, RemoteImageEndpoint: %q", + if err := runDockershim( + kubeCfg, + kubeDeps, + crOptions, + runtimeCgroups, remoteRuntimeEndpoint, - remoteImageEndpoint) - klog.V(2).Infof("Starting the GRPC server for the docker CRI shim.") - dockerServer := dockerremote.NewDockerServer(remoteRuntimeEndpoint, ds) - if err := dockerServer.Start(); err != nil { + remoteImageEndpoint, + nonMasqueradeCIDR, + ); err != nil { return err } - - // Create dockerLegacyService when the logging driver is not supported. - supported, err := ds.IsCRISupportedLogDriver() - if err != nil { - return err - } - if !supported { - kubeDeps.dockerLegacyService = ds - } case kubetypes.RemoteContainerRuntime: // No-op. break @@ -407,7 +334,9 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies, crOptions *config.ContainerRuntimeOptions, containerRuntime string, - hostnameOverride string, + hostname string, + hostnameOverridden bool, + nodeName types.NodeName, nodeIP string, providerID string, cloudProvider string, @@ -417,7 +346,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, registerWithTaints []api.Taint, allowedUnsafeSysctls []string, experimentalMounterPath string, - experimentalKernelMemcgNotification bool, + kernelMemcgNotification bool, experimentalCheckNodeCapabilitiesBeforeMount bool, experimentalNodeAllocatableIgnoreEvictionThreshold bool, minimumGCAge metav1.Duration, @@ -428,7 +357,6 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, keepTerminatedPodVolumes bool, nodeLabels map[string]string, seccompProfileRoot string, - bootstrapCheckpointPath string, nodeStatusMaxImages int32) (*Kubelet, error) { if rootDirectory == "" { return nil, fmt.Errorf("invalid root directory %q", rootDirectory) @@ -449,36 +377,15 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, } } - hostname, err := nodeutil.GetHostname(hostnameOverride) - if err != nil { - return nil, err - } - // Query the cloud provider for our node name, default to hostname - nodeName := types.NodeName(hostname) - if kubeDeps.Cloud != nil { - var err error - instances, ok := kubeDeps.Cloud.Instances() - if !ok { - return nil, fmt.Errorf("failed to get instances from cloud provider") - } - - nodeName, err = instances.CurrentNodeName(context.TODO(), hostname) - if err != nil { - return nil, fmt.Errorf("error fetching current instance name from cloud provider: %v", err) - } - - klog.V(2).Infof("cloud provider determined current node name to be %s", nodeName) - } - if kubeDeps.PodConfig == nil { var err error - kubeDeps.PodConfig, err = makePodSourceConfig(kubeCfg, kubeDeps, nodeName, bootstrapCheckpointPath) + kubeDeps.PodConfig, err = makePodSourceConfig(kubeCfg, kubeDeps, nodeName) if err != nil { return nil, err } } - containerGCPolicy := kubecontainer.ContainerGCPolicy{ + containerGCPolicy := kubecontainer.GCPolicy{ MinAge: minimumGCAge.Duration, MaxPerPodContainer: int(maxPerPodContainerCount), MaxContainers: int(maxContainerCount), @@ -507,17 +414,22 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, PressureTransitionPeriod: kubeCfg.EvictionPressureTransitionPeriod.Duration, MaxPodGracePeriodSeconds: int64(kubeCfg.EvictionMaxPodGracePeriod), Thresholds: thresholds, - KernelMemcgNotification: experimentalKernelMemcgNotification, + KernelMemcgNotification: kernelMemcgNotification, PodCgroupRoot: kubeDeps.ContainerManager.GetPodCgroupRoot(), } - serviceIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) + var serviceLister corelisters.ServiceLister + var serviceHasSynced cache.InformerSynced if kubeDeps.KubeClient != nil { - serviceLW := cache.NewListWatchFromClient(kubeDeps.KubeClient.CoreV1().RESTClient(), "services", metav1.NamespaceAll, fields.Everything()) - r := cache.NewReflector(serviceLW, &v1.Service{}, serviceIndexer, 0) - go r.Run(wait.NeverStop) + kubeInformers := informers.NewSharedInformerFactory(kubeDeps.KubeClient, 0) + serviceLister = kubeInformers.Core().V1().Services().Lister() + serviceHasSynced = kubeInformers.Core().V1().Services().Informer().HasSynced + kubeInformers.Start(wait.NeverStop) + } else { + serviceIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) + serviceLister = corelisters.NewServiceLister(serviceIndexer) + serviceHasSynced = func() bool { return true } } - serviceLister := corelisters.NewServiceLister(serviceIndexer) nodeIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) if kubeDeps.KubeClient != nil { @@ -538,8 +450,6 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, Namespace: "", } - containerRefManager := kubecontainer.NewRefManager() - oomWatcher, err := oomwatcher.NewWatcher(kubeDeps.Recorder) if err != nil { return nil, err @@ -556,15 +466,15 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, } httpClient := &http.Client{} parsedNodeIP := net.ParseIP(nodeIP) - protocol := utilipt.ProtocolIpv4 + protocol := utilipt.ProtocolIPv4 if utilnet.IsIPv6(parsedNodeIP) { klog.V(0).Infof("IPv6 node IP (%s), assume IPv6 operation", nodeIP) - protocol = utilipt.ProtocolIpv6 + protocol = utilipt.ProtocolIPv6 } klet := &Kubelet{ hostname: hostname, - hostnameOverridden: len(hostnameOverride) > 0, + hostnameOverridden: hostnameOverridden, nodeName: nodeName, kubeClient: kubeDeps.KubeClient, heartbeatClient: kubeDeps.HeartbeatClient, @@ -577,6 +487,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, registerSchedulable: registerSchedulable, dnsConfigurer: dns.NewConfigurer(kubeDeps.Recorder, nodeRef, parsedNodeIP, clusterDNS, kubeCfg.ClusterDomain, kubeCfg.ResolverConfig), serviceLister: serviceLister, + serviceHasSynced: serviceHasSynced, nodeLister: nodeLister, masterServiceNamespace: masterServiceNamespace, streamingConnectionIdleTimeout: kubeCfg.StreamingConnectionIdleTimeout.Duration, @@ -614,6 +525,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, experimentalHostUserNamespaceDefaulting: utilfeature.DefaultFeatureGate.Enabled(features.ExperimentalHostUserNamespaceDefaultingGate), keepTerminatedPodVolumes: keepTerminatedPodVolumes, nodeStatusMaxImages: nodeStatusMaxImages, + lastContainerStartedTime: newTimeCache(), } if klet.cloud != nil { @@ -649,24 +561,17 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, if err != nil { return nil, err } - klet.machineInfo = machineInfo + klet.setCachedMachineInfo(machineInfo) imageBackOff := flowcontrol.NewBackOff(backOffPeriod, MaxContainerBackOff) klet.livenessManager = proberesults.NewManager() klet.startupManager = proberesults.NewManager() - klet.podCache = kubecontainer.NewCache() - var checkpointManager checkpointmanager.CheckpointManager - if bootstrapCheckpointPath != "" { - checkpointManager, err = checkpointmanager.NewCheckpointManager(bootstrapCheckpointPath) - if err != nil { - return nil, fmt.Errorf("failed to initialize checkpoint manager: %+v", err) - } - } + // podManager is also responsible for keeping secretManager and configMapManager contents up-to-date. mirrorPodClient := kubepod.NewBasicMirrorClient(klet.kubeClient, string(nodeName), nodeLister) - klet.podManager = kubepod.NewBasicPodManager(mirrorPodClient, secretManager, configMapManager, checkpointManager) + klet.podManager = kubepod.NewBasicPodManager(mirrorPodClient, secretManager, configMapManager) klet.statusManager = status.NewManager(klet.kubeClient, klet.podManager, klet) @@ -680,12 +585,27 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, klet.runtimeClassManager = runtimeclass.NewManager(kubeDeps.KubeClient) } + if containerRuntime == kubetypes.RemoteContainerRuntime && utilfeature.DefaultFeatureGate.Enabled(features.CRIContainerLogRotation) { + // setup containerLogManager for CRI container runtime + containerLogManager, err := logs.NewContainerLogManager( + klet.runtimeService, + kubeDeps.OSInterface, + kubeCfg.ContainerLogMaxSize, + int(kubeCfg.ContainerLogMaxFiles), + ) + if err != nil { + return nil, fmt.Errorf("failed to initialize container log manager: %v", err) + } + klet.containerLogManager = containerLogManager + } else { + klet.containerLogManager = logs.NewStubContainerLogManager() + } + runtime, err := kuberuntime.NewKubeGenericRuntimeManager( kubecontainer.FilterEventRecorder(kubeDeps.Recorder), klet.livenessManager, klet.startupManager, seccompProfileRoot, - containerRefManager, machineInfo, klet, kubeDeps.OSInterface, @@ -701,6 +621,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps.RemoteImageService, kubeDeps.ContainerManager.InternalContainerLifecycle(), kubeDeps.dockerLegacyService, + klet.containerLogManager, klet.runtimeClassManager, ) if err != nil { @@ -758,21 +679,6 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, } klet.imageManager = imageManager - if containerRuntime == kubetypes.RemoteContainerRuntime && utilfeature.DefaultFeatureGate.Enabled(features.CRIContainerLogRotation) { - // setup containerLogManager for CRI container runtime - containerLogManager, err := logs.NewContainerLogManager( - klet.runtimeService, - kubeCfg.ContainerLogMaxSize, - int(kubeCfg.ContainerLogMaxFiles), - ) - if err != nil { - return nil, fmt.Errorf("failed to initialize container log manager: %v", err) - } - klet.containerLogManager = containerLogManager - } else { - klet.containerLogManager = logs.NewStubContainerLogManager() - } - if kubeCfg.ServerTLSBootstrap && kubeDeps.TLSOptions != nil && utilfeature.DefaultFeatureGate.Enabled(features.RotateKubeletServerCertificate) { klet.serverCertificateManager, err = kubeletcertificate.NewKubeletServerCertificateManager(klet.kubeClient, kubeCfg, klet.nodeName, klet.getLastObservedNodeAddresses, certDirectory) if err != nil { @@ -792,7 +698,6 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, klet.livenessManager, klet.startupManager, klet.runner, - containerRefManager, kubeDeps.Recorder) tokenManager := token.NewManager(kubeDeps.KubeClient) @@ -841,7 +746,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, klet.podWorkers = newPodWorkers(klet.syncPod, kubeDeps.Recorder, klet.workQueue, klet.resyncInterval, backOffPeriod, klet.podCache) klet.backOff = flowcontrol.NewBackOff(backOffPeriod, MaxContainerBackOff) - klet.podKillingCh = make(chan *kubecontainer.PodPair, podKillingChannelCapacity) + klet.podKiller = NewPodKiller(klet) etcHostsPathFunc := func(podUID types.UID) string { return getEtcHostsPath(klet.getPodDir(podUID)) } // setup eviction manager @@ -942,7 +847,7 @@ type Kubelet struct { // Optional, defaults to /logs/ from /var/log logServer http.Handler // Optional, defaults to simple Docker implementation - runner kubecontainer.ContainerCommandRunner + runner kubecontainer.CommandRunner // cAdvisor used for container information. cadvisor cadvisor.Interface @@ -963,6 +868,9 @@ type Kubelet struct { masterServiceNamespace string // serviceLister knows how to list services serviceLister serviceLister + // serviceHasSynced indicates whether services have been sync'd at least once. + // Check this before trusting a response from the lister. + serviceHasSynced cache.InformerSynced // nodeLister knows how to list nodes nodeLister corelisters.NodeLister @@ -990,7 +898,7 @@ type Kubelet struct { recorder record.EventRecorder // Policy for handling garbage collection of dead containers. - containerGC kubecontainer.ContainerGC + containerGC kubecontainer.GC // Manager for image garbage collection. imageManager images.ImageGCManager @@ -1005,7 +913,8 @@ type Kubelet struct { configMapManager configmap.Manager // Cached MachineInfo returned by cadvisor. - machineInfo *cadvisorapi.MachineInfo + machineInfoLock sync.RWMutex + machineInfo *cadvisorapi.MachineInfo // Handles certificate rotations. serverCertificateManager certificate.Manager @@ -1070,6 +979,9 @@ type Kubelet struct { // lastStatusReportTime is the time when node status was last reported. lastStatusReportTime time.Time + // lastContainerStartedTime is the time of the last ContainerStarted event observed per pod + lastContainerStartedTime *timeCache + // syncNodeStatusMux is a lock on updating the node status, because this path is not thread-safe. // This lock is used by Kubelet.syncNodeStatus function and shouldn't be used anywhere else. syncNodeStatusMux sync.Mutex @@ -1127,8 +1039,8 @@ type Kubelet struct { // Container restart Backoff backOff *flowcontrol.Backoff - // Channel for sending pods to kill. - podKillingCh chan *kubecontainer.PodPair + // Pod killer handles pods to be killed + podKiller PodKiller // Information about the ports which are opened by daemons on Node running this Kubelet server. daemonEndpoints *v1.NodeDaemonEndpoints @@ -1210,7 +1122,7 @@ type Kubelet struct { // dockerLegacyService contains some legacy methods for backward compatibility. // It should be set only when docker is using non json-file logging driver. - dockerLegacyService dockershim.DockerLegacyService + dockerLegacyService legacy.DockerLegacyService // StatsProvider provides the node and the container stats. *stats.StatsProvider @@ -1338,7 +1250,7 @@ func (kl *Kubelet) initializeModules() error { // If the container logs directory does not exist, create it. if _, err := os.Stat(ContainerLogsDir); err != nil { if err := kl.os.MkdirAll(ContainerLogsDir, 0755); err != nil { - klog.Errorf("Failed to create directory %q: %v", ContainerLogsDir, err) + return fmt.Errorf("failed to create directory %q: %v", ContainerLogsDir, err) } } @@ -1437,7 +1349,7 @@ func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) { // Start a goroutine responsible for killing pods (that are not properly // handled by pod workers). - go wait.Until(kl.podKiller, 1*time.Second, wait.NeverStop) + go wait.Until(kl.podKiller.PerformPodKillingWork, 1*time.Second, wait.NeverStop) // Start component sync loops. kl.statusManager.Start() @@ -1750,6 +1662,13 @@ func (kl *Kubelet) deletePod(pod *v1.Pod) error { } kl.podWorkers.ForgetWorker(pod.UID) + // make sure our runtimeCache is at least as fresh as the last container started event we observed. + // this ensures we correctly send graceful deletion signals to all containers we've reported started. + if lastContainerStarted, ok := kl.lastContainerStartedTime.Get(pod.UID); ok { + if err := kl.runtimeCache.ForceUpdateIfOlder(lastContainerStarted); err != nil { + return fmt.Errorf("error updating containers: %v", err) + } + } // Runtime cache may not have been updated to with the pod, but it's okay // because the periodic cleanup routine will attempt to delete again later. runningPods, err := kl.runtimeCache.GetPods() @@ -1762,7 +1681,7 @@ func (kl *Kubelet) deletePod(pod *v1.Pod) error { } podPair := kubecontainer.PodPair{APIPod: pod, RunningPod: &runningPod} - kl.podKillingCh <- &podPair + kl.podKiller.KillPod(&podPair) // TODO: delete the mirror pod here? // We leave the volume/directory cleanup to the periodic cleanup routine. @@ -1924,29 +1843,22 @@ func (kl *Kubelet) syncLoopIteration(configCh <-chan kubetypes.PodUpdate, handle klog.V(2).Infof("SyncLoop (DELETE, %q): %q", u.Source, format.Pods(u.Pods)) // DELETE is treated as a UPDATE because of graceful deletion. handler.HandlePodUpdates(u.Pods) - case kubetypes.RESTORE: - klog.V(2).Infof("SyncLoop (RESTORE, %q): %q", u.Source, format.Pods(u.Pods)) - // These are pods restored from the checkpoint. Treat them as new - // pods. - handler.HandlePodAdditions(u.Pods) case kubetypes.SET: // TODO: Do we want to support this? klog.Errorf("Kubelet does not support snapshot update") + default: + klog.Errorf("Invalid event type received: %d.", u.Op) } - if u.Op != kubetypes.RESTORE { - // If the update type is RESTORE, it means that the update is from - // the pod checkpoints and may be incomplete. Do not mark the - // source as ready. + kl.sourcesReady.AddSource(u.Source) - // Mark the source ready after receiving at least one update from the - // source. Once all the sources are marked ready, various cleanup - // routines will start reclaiming resources. It is important that this - // takes place only after kubelet calls the update handler to process - // the update to ensure the internal pod cache is up-to-date. - kl.sourcesReady.AddSource(u.Source) - } case e := <-plegCh: + if e.Type == pleg.ContainerStarted { + // record the most recent time we observed a container start for this pod. + // this lets us selectively invalidate the runtimeCache when processing a delete for this pod + // to make sure we don't miss handling graceful termination for containers we reported as having started. + kl.lastContainerStartedTime.Add(e.ID, time.Now()) + } if isSyncPodWorthy(e) { // PLEG event for a pod; sync it. if pod, ok := kl.podManager.GetPodByUID(e.ID); ok { @@ -2110,6 +2022,9 @@ func (kl *Kubelet) HandlePodRemoves(pods []*v1.Pod) { kl.handleMirrorPod(pod, start) continue } + if _, ok := kl.podManager.GetMirrorPodByPod(pod); ok { + kl.podKiller.MarkMirrorPodPendingTermination(pod) + } // Deletion is allowed to fail because the periodic cleanup routine // will trigger deletion again. if err := kl.deletePod(pod); err != nil { @@ -2222,8 +2137,8 @@ func (kl *Kubelet) ResyncInterval() time.Duration { } // ListenAndServe runs the kubelet HTTP server. -func (kl *Kubelet) ListenAndServe(address net.IP, port uint, tlsOptions *server.TLSOptions, auth server.AuthInterface, enableCAdvisorJSONEndpoints, enableDebuggingHandlers, enableContentionProfiling bool) { - server.ListenAndServeKubeletServer(kl, kl.resourceAnalyzer, address, port, tlsOptions, auth, enableCAdvisorJSONEndpoints, enableDebuggingHandlers, enableContentionProfiling, kl.redirectContainerStreaming, kl.criHandler) +func (kl *Kubelet) ListenAndServe(address net.IP, port uint, tlsOptions *server.TLSOptions, auth server.AuthInterface, enableCAdvisorJSONEndpoints, enableDebuggingHandlers, enableContentionProfiling, enableSystemLogHandler bool) { + server.ListenAndServeKubeletServer(kl, kl.resourceAnalyzer, address, port, tlsOptions, auth, enableCAdvisorJSONEndpoints, enableDebuggingHandlers, enableContentionProfiling, kl.redirectContainerStreaming, enableSystemLogHandler, kl.criHandler) } // ListenAndServeReadOnly runs the kubelet HTTP server in read-only mode. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim.go new file mode 100644 index 00000000000..05ebebaec2e --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim.go @@ -0,0 +1,83 @@ +// +build !dockerless + +/* +Copyright 2020 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 kubelet + +import ( + "k8s.io/klog/v2" + + kubeletconfiginternal "k8s.io/kubernetes/pkg/kubelet/apis/config" + "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/dockershim" + dockerremote "k8s.io/kubernetes/pkg/kubelet/dockershim/remote" +) + +func runDockershim(kubeCfg *kubeletconfiginternal.KubeletConfiguration, + kubeDeps *Dependencies, + crOptions *config.ContainerRuntimeOptions, + runtimeCgroups string, + remoteRuntimeEndpoint string, + remoteImageEndpoint string, + nonMasqueradeCIDR string) error { + pluginSettings := dockershim.NetworkPluginSettings{ + HairpinMode: kubeletconfiginternal.HairpinMode(kubeCfg.HairpinMode), + NonMasqueradeCIDR: nonMasqueradeCIDR, + PluginName: crOptions.NetworkPluginName, + PluginConfDir: crOptions.CNIConfDir, + PluginBinDirString: crOptions.CNIBinDir, + PluginCacheDir: crOptions.CNICacheDir, + MTU: int(crOptions.NetworkPluginMTU), + } + + // Create and start the CRI shim running as a grpc server. + streamingConfig := getStreamingConfig(kubeCfg, kubeDeps, crOptions) + dockerClientConfig := &dockershim.ClientConfig{ + DockerEndpoint: kubeDeps.DockerOptions.DockerEndpoint, + RuntimeRequestTimeout: kubeDeps.DockerOptions.RuntimeRequestTimeout, + ImagePullProgressDeadline: kubeDeps.DockerOptions.ImagePullProgressDeadline, + } + ds, err := dockershim.NewDockerService(dockerClientConfig, crOptions.PodSandboxImage, streamingConfig, + &pluginSettings, runtimeCgroups, kubeCfg.CgroupDriver, crOptions.DockershimRootDirectory, !crOptions.RedirectContainerStreaming) + if err != nil { + return err + } + if crOptions.RedirectContainerStreaming { + kubeDeps.criHandler = ds + } + + // The unix socket for kubelet <-> dockershim communication, dockershim start before runtime service init. + klog.V(5).Infof("RemoteRuntimeEndpoint: %q, RemoteImageEndpoint: %q", + remoteRuntimeEndpoint, + remoteImageEndpoint) + klog.V(2).Infof("Starting the GRPC server for the docker CRI shim.") + dockerServer := dockerremote.NewDockerServer(remoteRuntimeEndpoint, ds) + if err := dockerServer.Start(); err != nil { + return err + } + + // Create dockerLegacyService when the logging driver is not supported. + supported, err := ds.IsCRISupportedLogDriver() + if err != nil { + return err + } + if !supported { + kubeDeps.dockerLegacyService = ds + } + + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim_nodocker.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim_nodocker.go new file mode 100644 index 00000000000..7ee122f0c4f --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim_nodocker.go @@ -0,0 +1,36 @@ +// +build dockerless + +/* +Copyright 2020 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 kubelet + +import ( + "fmt" + kubeletconfiginternal "k8s.io/kubernetes/pkg/kubelet/apis/config" + "k8s.io/kubernetes/pkg/kubelet/config" +) + +func runDockershim(kubeCfg *kubeletconfiginternal.KubeletConfiguration, + kubeDeps *Dependencies, + crOptions *config.ContainerRuntimeOptions, + runtimeCgroups string, + remoteRuntimeEndpoint string, + remoteImageEndpoint string, + nonMasqueradeCIDR string) error { + + return fmt.Errorf("trying to use docker runtime when Kubelet was compiled without docker support") +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters.go index 3dfed31904d..aed08db4c2f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters.go @@ -24,9 +24,11 @@ import ( "path/filepath" cadvisorapiv1 "github.com/google/cadvisor/info/v1" - "k8s.io/klog" + cadvisorv2 "github.com/google/cadvisor/info/v2" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilpath "k8s.io/utils/path" + utilstrings "k8s.io/utils/strings" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" @@ -35,6 +37,7 @@ import ( kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubelettypes "k8s.io/kubernetes/pkg/kubelet/types" utilnode "k8s.io/kubernetes/pkg/util/node" + "k8s.io/kubernetes/pkg/volume/csi" ) // getRootDir returns the full path to the directory under which kubelet can @@ -170,7 +173,7 @@ func (kl *Kubelet) GetPods() []*v1.Pod { for _, p := range pods { if kubelettypes.IsStaticPod(p) { if status, ok := kl.statusManager.GetPodStatus(p.UID); ok { - klog.V(2).Infof("status for pod %v updated to %v", p.Name, status) + klog.V(2).InfoS("Pod status updated", "pod", klog.KObj(p), "status", status.Phase) p.Status = status } } @@ -310,8 +313,22 @@ func (kl *Kubelet) getPodVolumePathListFromDisk(podUID types.UID) ([]string, err if err != nil { return volumes, fmt.Errorf("could not read directory %s: %v", volumePluginPath, err) } - for _, volumeDir := range volumeDirs { - volumes = append(volumes, filepath.Join(volumePluginPath, volumeDir)) + unescapePluginName := utilstrings.UnescapeQualifiedName(volumePluginName) + + if unescapePluginName != csi.CSIPluginName { + for _, volumeDir := range volumeDirs { + volumes = append(volumes, filepath.Join(volumePluginPath, volumeDir)) + } + } else { + // For CSI volumes, the mounted volume path has an extra sub path "/mount", so also add it + // to the list if the mounted path exists. + for _, volumeDir := range volumeDirs { + path := filepath.Join(volumePluginPath, volumeDir) + csimountpath := csi.GetCSIMounterPath(path) + if pathExists, _ := mount.PathExists(csimountpath); pathExists { + volumes = append(volumes, csimountpath) + } + } } } return volumes, nil @@ -323,10 +340,15 @@ func (kl *Kubelet) getMountedVolumePathListFromDisk(podUID types.UID) ([]string, if err != nil { return mountedVolumes, err } + // Only use IsLikelyNotMountPoint to check might not cover all cases. For CSI volumes that + // either: 1) don't mount or 2) bind mount in the rootfs, the mount check will not work as expected. + // We plan to remove this mountpoint check as a condition before deleting pods since it is + // not reliable and the condition might be different for different types of volumes. But it requires + // a reliable way to clean up unused volume dir to avoid problems during pod deletion. See discussion in issue #74650 for _, volumePath := range volumePaths { isNotMount, err := kl.mounter.IsLikelyNotMountPoint(volumePath) if err != nil { - return mountedVolumes, err + return mountedVolumes, fmt.Errorf("fail to check mount point %q: %v", volumePath, err) } if !isNotMount { mountedVolumes = append(mountedVolumes, volumePath) @@ -348,6 +370,11 @@ func (kl *Kubelet) podVolumeSubpathsDirExists(podUID types.UID) (bool, error) { return true, nil } +// GetRequestedContainersInfo returns container info. +func (kl *Kubelet) GetRequestedContainersInfo(containerName string, options cadvisorv2.RequestOptions) (map[string]*cadvisorapiv1.ContainerInfo, error) { + return kl.cadvisor.GetRequestedContainersInfo(containerName, options) +} + // GetVersionInfo returns information about the version of cAdvisor in use. func (kl *Kubelet) GetVersionInfo() (*cadvisorapiv1.VersionInfo, error) { return kl.cadvisor.VersionInfo() @@ -355,5 +382,13 @@ func (kl *Kubelet) GetVersionInfo() (*cadvisorapiv1.VersionInfo, error) { // GetCachedMachineInfo assumes that the machine info can't change without a reboot func (kl *Kubelet) GetCachedMachineInfo() (*cadvisorapiv1.MachineInfo, error) { + kl.machineInfoLock.RLock() + defer kl.machineInfoLock.RUnlock() return kl.machineInfo, nil } + +func (kl *Kubelet) setCachedMachineInfo(info *cadvisorapiv1.MachineInfo) { + kl.machineInfoLock.Lock() + defer kl.machineInfoLock.Unlock() + kl.machineInfo = info +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go index d4627c8aed9..de4c8174f6d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go @@ -21,7 +21,7 @@ import ( "k8s.io/api/core/v1" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" utiliptables "k8s.io/kubernetes/pkg/util/iptables" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_linux.go index cd6b4367e82..6b0ab9a4df9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_linux.go @@ -23,7 +23,7 @@ import ( "time" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" utiliptables "k8s.io/kubernetes/pkg/util/iptables" ) @@ -80,7 +80,7 @@ func (kl *Kubelet) syncNetworkUtil() { // drop all non-local packets to localhost if they're not part of an existing // forwarded connection. See #90259 - if !kl.iptClient.IsIpv6() { // ipv6 doesn't have this issue + if !kl.iptClient.IsIPv6() { // ipv6 doesn't have this issue if _, err := kl.iptClient.EnsureRule(utiliptables.Append, utiliptables.TableFilter, KubeFirewallChain, "-m", "comment", "--comment", "block incoming localnet connections", "--dst", "127.0.0.0/8", @@ -145,9 +145,6 @@ func (kl *Kubelet) syncNetworkUtil() { } if kl.iptClient.HasRandomFully() { masqRule = append(masqRule, "--random-fully") - klog.V(3).Info("Using `--random-fully` in the MASQUERADE rule for iptables") - } else { - klog.V(2).Info("Not using `--random-fully` in the MASQUERADE rule for iptables because the local version of iptables does not support it") } if _, err := kl.iptClient.EnsureRule(utiliptables.Append, utiliptables.TableNAT, KubePostroutingChain, masqRule...); err != nil { klog.Errorf("Failed to ensure SNAT rule for packets marked by %v in %v chain %v: %v", KubeMarkMasqChain, utiliptables.TableNAT, KubePostroutingChain, err) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go index 5f10945b041..bb4a7e379d3 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go @@ -31,12 +31,12 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/sets" cloudprovider "k8s.io/cloud-provider" cloudproviderapi "k8s.io/cloud-provider/api" - "k8s.io/klog" + "k8s.io/klog/v2" k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" - kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/nodestatus" "k8s.io/kubernetes/pkg/kubelet/util" @@ -104,10 +104,6 @@ func (kl *Kubelet) tryRegisterWithAPIServer(node *v1.Node) bool { } originalNode := existingNode.DeepCopy() - if originalNode == nil { - klog.Errorf("Nil %q node object", kl.nodeName) - return false - } klog.Infof("Node %s was previously registered", kl.nodeName) @@ -117,6 +113,7 @@ func (kl *Kubelet) tryRegisterWithAPIServer(node *v1.Node) bool { requiresUpdate := kl.reconcileCMADAnnotationWithExistingNode(node, existingNode) requiresUpdate = kl.updateDefaultLabels(node, existingNode) || requiresUpdate requiresUpdate = kl.reconcileExtendedResource(node, existingNode) || requiresUpdate + requiresUpdate = kl.reconcileHugePageResource(node, existingNode) || requiresUpdate if requiresUpdate { if _, _, err := nodeutil.PatchNodeStatus(kl.kubeClient.CoreV1(), types.NodeName(kl.nodeName), originalNode, existingNode); err != nil { klog.Errorf("Unable to reconcile node %q with API server: error updating node: %v", kl.nodeName, err) @@ -127,6 +124,53 @@ func (kl *Kubelet) tryRegisterWithAPIServer(node *v1.Node) bool { return true } +// reconcileHugePageResource will update huge page capacity for each page size and remove huge page sizes no longer supported +func (kl *Kubelet) reconcileHugePageResource(initialNode, existingNode *v1.Node) bool { + requiresUpdate := false + supportedHugePageResources := sets.String{} + + for resourceName := range initialNode.Status.Capacity { + if !v1helper.IsHugePageResourceName(resourceName) { + continue + } + supportedHugePageResources.Insert(string(resourceName)) + + initialCapacity := initialNode.Status.Capacity[resourceName] + initialAllocatable := initialNode.Status.Allocatable[resourceName] + + capacity, resourceIsSupported := existingNode.Status.Capacity[resourceName] + allocatable := existingNode.Status.Allocatable[resourceName] + + // Add or update capacity if it the size was previously unsupported or has changed + if !resourceIsSupported || capacity.Cmp(initialCapacity) != 0 { + existingNode.Status.Capacity[resourceName] = initialCapacity.DeepCopy() + requiresUpdate = true + } + + // Add or update allocatable if it the size was previously unsupported or has changed + if !resourceIsSupported || allocatable.Cmp(initialAllocatable) != 0 { + existingNode.Status.Allocatable[resourceName] = initialAllocatable.DeepCopy() + requiresUpdate = true + } + + } + + for resourceName := range existingNode.Status.Capacity { + if !v1helper.IsHugePageResourceName(resourceName) { + continue + } + + // If huge page size no longer is supported, we remove it from the node + if !supportedHugePageResources.Has(string(resourceName)) { + delete(existingNode.Status.Capacity, resourceName) + delete(existingNode.Status.Allocatable, resourceName) + klog.Infof("Removing now unsupported huge page resource named: %s", resourceName) + requiresUpdate = true + } + } + return requiresUpdate +} + // Zeros out extended resource capacity during reconciliation. func (kl *Kubelet) reconcileExtendedResource(initialNode, node *v1.Node) bool { requiresUpdate := false @@ -157,8 +201,6 @@ func (kl *Kubelet) updateDefaultLabels(initialNode, existingNode *v1.Node) bool v1.LabelOSStable, v1.LabelArchStable, v1.LabelWindowsBuild, - kubeletapis.LabelOS, - kubeletapis.LabelArch, } needsUpdate := false @@ -221,11 +263,9 @@ func (kl *Kubelet) initialNode(ctx context.Context) (*v1.Node, error) { ObjectMeta: metav1.ObjectMeta{ Name: string(kl.nodeName), Labels: map[string]string{ - v1.LabelHostname: kl.hostname, - v1.LabelOSStable: goruntime.GOOS, - v1.LabelArchStable: goruntime.GOARCH, - kubeletapis.LabelOS: goruntime.GOOS, - kubeletapis.LabelArch: goruntime.GOARCH, + v1.LabelHostname: kl.hostname, + v1.LabelOSStable: goruntime.GOOS, + v1.LabelArchStable: goruntime.GOARCH, }, }, Spec: v1.NodeSpec{ @@ -291,17 +331,17 @@ func (kl *Kubelet) initialNode(ctx context.Context) (*v1.Node, error) { node.Annotations = make(map[string]string) } - klog.Infof("Setting node annotation to enable volume controller attach/detach") + klog.V(2).Infof("Setting node annotation to enable volume controller attach/detach") node.Annotations[volutil.ControllerManagedAttachAnnotation] = "true" } else { - klog.Infof("Controller attach/detach is disabled for this node; Kubelet will attach and detach volumes") + klog.V(2).Infof("Controller attach/detach is disabled for this node; Kubelet will attach and detach volumes") } if kl.keepTerminatedPodVolumes { if node.Annotations == nil { node.Annotations = make(map[string]string) } - klog.Infof("Setting node annotation to keep pod volumes of terminated pods attached to the node") + klog.V(2).Infof("Setting node annotation to keep pod volumes of terminated pods attached to the node") node.Annotations[volutil.KeepTerminatedPodVolumesAnnotation] = "true" } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go index bfacfc7dfb1..386f82d1591 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go @@ -41,7 +41,7 @@ import ( utilvalidation "k8s.io/apimachinery/pkg/util/validation" utilfeature "k8s.io/apiserver/pkg/util/feature" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/api/v1/resource" podshelper "k8s.io/kubernetes/pkg/apis/core/pods" @@ -51,13 +51,14 @@ import ( "k8s.io/kubernetes/pkg/fieldpath" "k8s.io/kubernetes/pkg/kubelet/cm" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward" + remotecommandserver "k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand" "k8s.io/kubernetes/pkg/kubelet/envvars" "k8s.io/kubernetes/pkg/kubelet/eviction" "k8s.io/kubernetes/pkg/kubelet/images" - "k8s.io/kubernetes/pkg/kubelet/server/portforward" - remotecommandserver "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" "k8s.io/kubernetes/pkg/kubelet/status" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/pkg/kubelet/util" "k8s.io/kubernetes/pkg/kubelet/util/format" volumeutil "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/pkg/volume/util/hostutil" @@ -70,6 +71,11 @@ import ( const ( managedHostsHeader = "# Kubernetes-managed hosts file.\n" managedHostsHeaderWithHostNetwork = "# Kubernetes-managed hosts file (host network).\n" + + // Capacity of the channel for storing pods to kill. A small number should + // suffice because a goroutine is dedicated to check the channel and does + // not block on anything else. + podKillingChannelCapacity = 50 ) // Get a list of pods that have data directories. @@ -167,10 +173,6 @@ func makeMounts(pod *v1.Pod, podDir string, container *v1.Container, hostName, h return nil, cleanupAction, fmt.Errorf("volume subpaths are disabled") } - if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeSubpathEnvExpansion) { - return nil, cleanupAction, fmt.Errorf("volume subpath expansion is disabled") - } - subPath, err = kubecontainer.ExpandContainerVolumeMounts(mount, expandEnvs) if err != nil { @@ -451,12 +453,18 @@ func (kl *Kubelet) GenerateRunContainerOptions(pod *v1.Pod, container *v1.Contai if err != nil { return nil, nil, err } - + // The value of hostname is the short host name and it is sent to makeMounts to create /etc/hosts file. hostname, hostDomainName, err := kl.GeneratePodHostNameAndDomain(pod) if err != nil { return nil, nil, err } - opts.Hostname = hostname + // nodename will be equals to hostname if SetHostnameAsFQDN is nil or false. If SetHostnameFQDN + // is true and hostDomainName is defined, nodename will be the FQDN (hostname.hostDomainName) + nodename, err := util.GetNodenameForKernel(hostname, hostDomainName, pod.Spec.SetHostnameAsFQDN) + if err != nil { + return nil, nil, err + } + opts.Hostname = nodename podName := volumeutil.GetUniquePodName(pod) volumes := kl.volumeManager.GetMountedVolumesForPod(podName) @@ -562,6 +570,18 @@ func (kl *Kubelet) makeEnvironmentVariables(pod *v1.Pod, container *v1.Container return nil, fmt.Errorf("nil pod.spec.enableServiceLinks encountered, cannot construct envvars") } + // If the pod originates from the kube-api, when we know that the kube-apiserver is responding and the kubelet's credentials are valid. + // Knowing this, it is reasonable to wait until the service lister has synchronized at least once before attempting to build + // a service env var map. This doesn't present the race below from happening entirely, but it does prevent the "obvious" + // failure case of services simply not having completed a list operation that can reasonably be expected to succeed. + // One common case this prevents is a kubelet restart reading pods before services and some pod not having the + // KUBERNETES_SERVICE_HOST injected because we didn't wait a short time for services to sync before proceeding. + // The KUBERNETES_SERVICE_HOST link is special because it is unconditionally injected into pods and is read by the + // in-cluster-config for pod clients + if !kubetypes.IsStaticPod(pod) && !kl.serviceHasSynced() { + return nil, fmt.Errorf("services have not yet been read at least once, cannot construct envvars") + } + var result []kubecontainer.EnvVar // Note: These are added to the docker Config, but are not included in the checksum computed // by kubecontainer.HashContainer(...). That way, we can still determine whether an @@ -1010,6 +1030,23 @@ func (kl *Kubelet) removeOrphanedPodStatuses(pods []*v1.Pod, mirrorPods []*v1.Po kl.statusManager.RemoveOrphanedStatuses(podUIDs) } +// deleteOrphanedMirrorPods checks whether pod killer has done with orphaned mirror pod. +// If pod killing is done, podManager.DeleteMirrorPod() is called to delete mirror pod +// from the API server +func (kl *Kubelet) deleteOrphanedMirrorPods() { + podFullNames := kl.podManager.GetOrphanedMirrorPodNames() + for _, podFullname := range podFullNames { + if !kl.podKiller.IsMirrorPodPendingTerminationByPodName(podFullname) { + _, err := kl.podManager.DeleteMirrorPod(podFullname, nil) + if err != nil { + klog.Errorf("encountered error when deleting mirror pod %q : %v", podFullname, err) + } else { + klog.V(3).Infof("deleted pod %q", podFullname) + } + } + } +} + // HandlePodCleanups performs a series of cleanup work, including terminating // pod workers, killing unwanted pods, and removing orphaned volumes/pod // directories. @@ -1061,7 +1098,7 @@ func (kl *Kubelet) HandlePodCleanups() error { } for _, pod := range runningPods { if _, found := desiredPods[pod.ID]; !found { - kl.podKillingCh <- &kubecontainer.PodPair{APIPod: nil, RunningPod: pod} + kl.podKiller.KillPod(&kubecontainer.PodPair{APIPod: nil, RunningPod: pod}) } } @@ -1089,24 +1126,112 @@ func (kl *Kubelet) HandlePodCleanups() error { } // Remove any orphaned mirror pods. - kl.podManager.DeleteOrphanedMirrorPods() + kl.deleteOrphanedMirrorPods() // Remove any cgroups in the hierarchy for pods that are no longer running. if kl.cgroupsPerQOS { - kl.cleanupOrphanedPodCgroups(cgroupPods, activePods) + pcm := kl.containerManager.NewPodContainerManager() + kl.cleanupOrphanedPodCgroups(pcm, cgroupPods, activePods) } kl.backOff.GC() return nil } -// podKiller launches a goroutine to kill a pod received from the channel if +// PodKiller handles requests for killing pods +type PodKiller interface { + // KillPod receives pod speficier representing the pod to kill + KillPod(pair *kubecontainer.PodPair) + // PerformPodKillingWork performs the actual pod killing work via calling CRI + // It returns after its Close() func is called and all outstanding pod killing requests are served + PerformPodKillingWork() + // After Close() is called, this pod killer wouldn't accept any more pod killing requests + Close() + // IsMirrorPodPendingTerminationByPodName checks whether the mirror pod for the given full pod name is pending termination + IsMirrorPodPendingTerminationByPodName(podFullname string) bool + // IsMirrorPodPendingTerminationByUID checks whether the mirror pod for the given uid is pending termination + IsMirrorPodPendingTerminationByUID(uid types.UID) bool + // MarkMirrorPodPendingTermination marks the mirror pod entering grace period of termination + MarkMirrorPodPendingTermination(pod *v1.Pod) +} + +// podKillerWithChannel is an implementation of PodKiller which receives pod killing requests via channel +type podKillerWithChannel struct { + // Channel for getting pods to kill. + podKillingCh chan *kubecontainer.PodPair + // lock for synchronization between HandlePodCleanups and pod killer + podKillingLock *sync.Mutex + // mirrorPodTerminationMap keeps track of the progress of mirror pod termination + // The key is the UID of the pod and the value is the full name of the pod + mirrorPodTerminationMap map[string]string + // killPod is the func which invokes runtime to kill the pod + killPod func(pod *v1.Pod, runningPod *kubecontainer.Pod, status *kubecontainer.PodStatus, gracePeriodOverride *int64) error +} + +// NewPodKiller returns a functional PodKiller +func NewPodKiller(kl *Kubelet) PodKiller { + podKiller := &podKillerWithChannel{ + podKillingCh: make(chan *kubecontainer.PodPair, podKillingChannelCapacity), + podKillingLock: &sync.Mutex{}, + mirrorPodTerminationMap: make(map[string]string), + killPod: kl.killPod, + } + return podKiller +} + +// IsMirrorPodPendingTerminationByUID checks whether the pod for the given uid is pending termination +func (pk *podKillerWithChannel) IsMirrorPodPendingTerminationByUID(uid types.UID) bool { + pk.podKillingLock.Lock() + defer pk.podKillingLock.Unlock() + _, ok := pk.mirrorPodTerminationMap[string(uid)] + return ok +} + +// IsMirrorPodPendingTerminationByPodName checks whether the given pod is in grace period of termination +func (pk *podKillerWithChannel) IsMirrorPodPendingTerminationByPodName(podFullname string) bool { + pk.podKillingLock.Lock() + defer pk.podKillingLock.Unlock() + for _, name := range pk.mirrorPodTerminationMap { + if name == podFullname { + return true + } + } + return false +} + +func (pk *podKillerWithChannel) markMirrorPodTerminated(uid string) { + pk.podKillingLock.Lock() + klog.V(4).Infof("marking pod termination %q", uid) + delete(pk.mirrorPodTerminationMap, uid) + pk.podKillingLock.Unlock() +} + +// MarkMirrorPodPendingTermination marks the pod entering grace period of termination +func (pk *podKillerWithChannel) MarkMirrorPodPendingTermination(pod *v1.Pod) { + fullname := kubecontainer.GetPodFullName(pod) + klog.V(3).Infof("marking pod pending termination %q", string(pod.UID)) + pk.podKillingLock.Lock() + pk.mirrorPodTerminationMap[string(pod.UID)] = fullname + pk.podKillingLock.Unlock() +} + +// Close closes the channel through which requests are delivered +func (pk *podKillerWithChannel) Close() { + close(pk.podKillingCh) +} + +// KillPod sends pod killing request to the killer +func (pk *podKillerWithChannel) KillPod(pair *kubecontainer.PodPair) { + pk.podKillingCh <- pair +} + +// PerformPodKillingWork launches a goroutine to kill a pod received from the channel if // another goroutine isn't already in action. -func (kl *Kubelet) podKiller() { +func (pk *podKillerWithChannel) PerformPodKillingWork() { killing := sets.NewString() // guard for the killing set lock := sync.Mutex{} - for podPair := range kl.podKillingCh { + for podPair := range pk.podKillingCh { runningPod := podPair.RunningPod apiPod := podPair.APIPod @@ -1120,13 +1245,14 @@ func (kl *Kubelet) podKiller() { if !exists { go func(apiPod *v1.Pod, runningPod *kubecontainer.Pod) { klog.V(2).Infof("Killing unwanted pod %q", runningPod.Name) - err := kl.killPod(apiPod, runningPod, nil, nil) + err := pk.killPod(apiPod, runningPod, nil, nil) if err != nil { klog.Errorf("Failed killing the pod %q: %v", runningPod.Name, err) } lock.Lock() killing.Delete(string(runningPod.ID)) lock.Unlock() + pk.markMirrorPodTerminated(string(runningPod.ID)) }(apiPod, runningPod) } } @@ -1479,7 +1605,7 @@ func (kl *Kubelet) convertStatusToAPIStatus(pod *v1.Pod, podStatus *kubecontaine // convertToAPIContainerStatuses converts the given internal container // statuses into API container statuses. func (kl *Kubelet) convertToAPIContainerStatuses(pod *v1.Pod, podStatus *kubecontainer.PodStatus, previousStatus []v1.ContainerStatus, containers []v1.Container, hasInitContainers, isInitContainer bool) []v1.ContainerStatus { - convertContainerStatus := func(cs *kubecontainer.ContainerStatus) *v1.ContainerStatus { + convertContainerStatus := func(cs *kubecontainer.Status) *v1.ContainerStatus { cid := cs.ID.String() status := &v1.ContainerStatus{ Name: cs.Name, @@ -1606,18 +1732,17 @@ func (kl *Kubelet) convertToAPIContainerStatuses(pod *v1.Pod, podStatus *kubecon statuses[container.Name] = status } + // Sort the container statuses since clients of this interface expect the list + // of containers in a pod has a deterministic order. + if isInitContainer { + return kubetypes.SortStatusesOfInitContainers(pod, statuses) + } var containerStatuses []v1.ContainerStatus for _, status := range statuses { containerStatuses = append(containerStatuses, *status) } - // Sort the container statuses since clients of this interface expect the list - // of containers in a pod has a deterministic order. - if isInitContainer { - kubetypes.SortInitContainerStatuses(pod, containerStatuses) - } else { - sort.Sort(kubetypes.SortedContainerStatuses(containerStatuses)) - } + sort.Sort(kubetypes.SortedContainerStatuses(containerStatuses)) return containerStatuses } @@ -1712,13 +1837,12 @@ func (kl *Kubelet) GetPortForward(podName, podNamespace string, podUID types.UID // cleanupOrphanedPodCgroups removes cgroups that should no longer exist. // it reconciles the cached state of cgroupPods with the specified list of runningPods -func (kl *Kubelet) cleanupOrphanedPodCgroups(cgroupPods map[types.UID]cm.CgroupName, activePods []*v1.Pod) { +func (kl *Kubelet) cleanupOrphanedPodCgroups(pcm cm.PodContainerManager, cgroupPods map[types.UID]cm.CgroupName, activePods []*v1.Pod) { // Add all running pods to the set that we want to preserve podSet := sets.NewString() for _, pod := range activePods { podSet.Insert(string(pod.UID)) } - pcm := kl.containerManager.NewPodContainerManager() // Iterate over all the found pods to verify if they should be running for uid, val := range cgroupPods { @@ -1727,6 +1851,11 @@ func (kl *Kubelet) cleanupOrphanedPodCgroups(cgroupPods map[types.UID]cm.CgroupN continue } + // if the pod is within termination grace period, we shouldn't cleanup the underlying cgroup + if kl.podKiller.IsMirrorPodPendingTerminationByUID(uid) { + klog.V(3).Infof("pod %q is pending termination", uid) + continue + } // If volumes have not been unmounted/detached, do not delete the cgroup // so any memory backed volumes don't have their charges propagated to the // parent croup. If the volumes still exist, reduce the cpu shares for any diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources.go index be6d29738ba..a453e015553 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources.go @@ -19,7 +19,7 @@ package kubelet import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" "k8s.io/kubernetes/pkg/api/v1/resource" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go index fd12a66c279..ac8e3e2baee 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/util/removeall" "k8s.io/kubernetes/pkg/volume" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/BUILD index 483c295725a..12bb01b11ce 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/BUILD @@ -28,7 +28,7 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/configsync.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/configsync.go index b2de60c7c07..fc8706bbc18 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/configsync.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/configsync.go @@ -22,7 +22,7 @@ import ( "os" "time" - "k8s.io/klog" + "k8s.io/klog/v2" apiv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/codec/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/codec/BUILD index e27dc027a87..78801be11b8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/codec/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/codec/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", "//staging/src/k8s.io/component-base/codec:go_default_library", "//vendor/github.com/pkg/errors:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/codec/codec.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/codec/codec.go index 887355801e8..c4adc4fc7c4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/codec/codec.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/codec/codec.go @@ -20,7 +20,7 @@ import ( "fmt" "github.com/pkg/errors" - "k8s.io/klog" + "k8s.io/klog/v2" // ensure the core apis are installed _ "k8s.io/kubernetes/pkg/apis/core/install" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/log/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/log/BUILD index f47e2eead47..082117e939f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/log/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/log/BUILD @@ -9,7 +9,7 @@ go_library( name = "go_default_library", srcs = ["log.go"], importpath = "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/log", - deps = ["//vendor/k8s.io/klog:go_default_library"], + deps = ["//vendor/k8s.io/klog/v2:go_default_library"], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/log/log.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/log/log.go index 6e68b46a0fe..ff76ff8f029 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/log/log.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/log/log.go @@ -19,7 +19,7 @@ package log import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" ) const logFmt = "kubelet config controller: %s" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/BUILD index 3b3d3feeff7..19306019ceb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/BUILD @@ -9,6 +9,7 @@ load( go_library( name = "go_default_library", srcs = [ + "convert.go", "doc.go", "fake_kuberuntime_manager.go", "helpers.go", @@ -40,13 +41,14 @@ go_library( "//pkg/kubelet/images:go_default_library", "//pkg/kubelet/kuberuntime/logs:go_default_library", "//pkg/kubelet/lifecycle:go_default_library", + "//pkg/kubelet/logs:go_default_library", "//pkg/kubelet/metrics:go_default_library", "//pkg/kubelet/prober/results:go_default_library", "//pkg/kubelet/runtimeclass:go_default_library", "//pkg/kubelet/types:go_default_library", + "//pkg/kubelet/util:go_default_library", "//pkg/kubelet/util/cache:go_default_library", "//pkg/kubelet/util/format:go_default_library", - "//pkg/kubelet/util/logreduction:go_default_library", "//pkg/security/apparmor:go_default_library", "//pkg/securitycontext:go_default_library", "//pkg/util/parsers:go_default_library", @@ -64,12 +66,13 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/tools/reference:go_default_library", "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", + "//staging/src/k8s.io/component-base/logs/logreduction:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", "//vendor/github.com/armon/circbuf:go_default_library", "//vendor/github.com/google/cadvisor/info/v1:go_default_library", "//vendor/google.golang.org/grpc/status:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:android": [ "//pkg/apis/core/v1/helper:go_default_library", @@ -83,7 +86,6 @@ go_library( ], "@io_bazel_rules_go//go/platform:windows": [ "//pkg/kubelet/apis:go_default_library", - "//vendor/github.com/docker/docker/pkg/sysinfo:go_default_library", ], "//conditions:default": [], }), @@ -92,6 +94,7 @@ go_library( go_test( name = "go_default_test", srcs = [ + "convert_test.go", "helpers_linux_test.go", "helpers_test.go", "instrumented_services_test.go", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/convert.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/convert.go new file mode 100644 index 00000000000..6b80477ce48 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/convert.go @@ -0,0 +1,62 @@ +/* +Copyright 2020 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 kuberuntime + +import ( + "sort" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" +) + +// This file contains help function to kuberuntime types to CRI runtime API types, or vice versa. + +func toKubeContainerImageSpec(image *runtimeapi.Image) kubecontainer.ImageSpec { + var annotations []kubecontainer.Annotation + + if image.Spec != nil && len(image.Spec.Annotations) > 0 { + annotationKeys := make([]string, 0, len(image.Spec.Annotations)) + for k := range image.Spec.Annotations { + annotationKeys = append(annotationKeys, k) + } + sort.Strings(annotationKeys) + for _, k := range annotationKeys { + annotations = append(annotations, kubecontainer.Annotation{ + Name: k, + Value: image.Spec.Annotations[k], + }) + } + } + + return kubecontainer.ImageSpec{ + Image: image.Id, + Annotations: annotations, + } +} + +func toRuntimeAPIImageSpec(imageSpec kubecontainer.ImageSpec) *runtimeapi.ImageSpec { + var annotations = make(map[string]string) + if imageSpec.Annotations != nil { + for _, a := range imageSpec.Annotations { + annotations[a.Name] = a.Value + } + } + return &runtimeapi.ImageSpec{ + Image: imageSpec.Image, + Annotations: annotations, + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go index 2552ebe8d3c..a7190df2087 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go @@ -25,14 +25,15 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/flowcontrol" + "k8s.io/component-base/logs/logreduction" internalapi "k8s.io/cri-api/pkg/apis" "k8s.io/kubernetes/pkg/credentialprovider" "k8s.io/kubernetes/pkg/kubelet/cm" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/images" "k8s.io/kubernetes/pkg/kubelet/lifecycle" + "k8s.io/kubernetes/pkg/kubelet/logs" proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" - "k8s.io/kubernetes/pkg/kubelet/util/logreduction" ) const ( @@ -73,22 +74,26 @@ func (f *fakePodStateProvider) IsPodTerminated(uid types.UID) bool { func newFakeKubeRuntimeManager(runtimeService internalapi.RuntimeService, imageService internalapi.ImageManagerService, machineInfo *cadvisorapi.MachineInfo, osInterface kubecontainer.OSInterface, runtimeHelper kubecontainer.RuntimeHelper, keyring credentialprovider.DockerKeyring) (*kubeGenericRuntimeManager, error) { recorder := &record.FakeRecorder{} + logManager, err := logs.NewContainerLogManager(runtimeService, osInterface, "1", 2) + if err != nil { + return nil, err + } kubeRuntimeManager := &kubeGenericRuntimeManager{ - recorder: recorder, - cpuCFSQuota: false, - cpuCFSQuotaPeriod: metav1.Duration{Duration: time.Microsecond * 100}, - livenessManager: proberesults.NewManager(), - startupManager: proberesults.NewManager(), - containerRefManager: kubecontainer.NewRefManager(), - machineInfo: machineInfo, - osInterface: osInterface, - runtimeHelper: runtimeHelper, - runtimeService: runtimeService, - imageService: imageService, - keyring: keyring, - seccompProfileRoot: fakeSeccompProfileRoot, - internalLifecycle: cm.NewFakeInternalContainerLifecycle(), - logReduction: logreduction.NewLogReduction(identicalErrorDelay), + recorder: recorder, + cpuCFSQuota: false, + cpuCFSQuotaPeriod: metav1.Duration{Duration: time.Microsecond * 100}, + livenessManager: proberesults.NewManager(), + startupManager: proberesults.NewManager(), + machineInfo: machineInfo, + osInterface: osInterface, + runtimeHelper: runtimeHelper, + runtimeService: runtimeService, + imageService: imageService, + keyring: keyring, + seccompProfileRoot: fakeSeccompProfileRoot, + internalLifecycle: cm.NewFakeInternalContainerLifecycle(), + logReduction: logreduction.NewLogReduction(identicalErrorDelay), + logManager: logManager, } typedVersion, err := runtimeService.Version(kubeRuntimeAPIVersion) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go index 2d970333b3b..cdf4121a38c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go @@ -22,10 +22,10 @@ import ( "strconv" "strings" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) @@ -48,14 +48,14 @@ func (p podSandboxByCreated) Len() int { return len(p) } func (p podSandboxByCreated) Swap(i, j int) { p[i], p[j] = p[j], p[i] } func (p podSandboxByCreated) Less(i, j int) bool { return p[i].CreatedAt > p[j].CreatedAt } -type containerStatusByCreated []*kubecontainer.ContainerStatus +type containerStatusByCreated []*kubecontainer.Status func (c containerStatusByCreated) Len() int { return len(c) } func (c containerStatusByCreated) Swap(i, j int) { c[i], c[j] = c[j], c[i] } func (c containerStatusByCreated) Less(i, j int) bool { return c[i].CreatedAt.After(c[j].CreatedAt) } -// toKubeContainerState converts runtimeapi.ContainerState to kubecontainer.ContainerState. -func toKubeContainerState(state runtimeapi.ContainerState) kubecontainer.ContainerState { +// toKubeContainerState converts runtimeapi.ContainerState to kubecontainer.State. +func toKubeContainerState(state runtimeapi.ContainerState) kubecontainer.State { switch state { case runtimeapi.ContainerState_CONTAINER_CREATED: return kubecontainer.ContainerStateCreated @@ -141,7 +141,7 @@ func (m *kubeGenericRuntimeManager) getImageUser(image string) (*int64, string, // isInitContainerFailed returns true if container has exited and exitcode is not zero // or is in unknown state. -func isInitContainerFailed(status *kubecontainer.ContainerStatus) bool { +func isInitContainerFailed(status *kubecontainer.Status) bool { if status.State == kubecontainer.ContainerStateExited && status.ExitCode != 0 { return true } @@ -202,31 +202,57 @@ func toKubeRuntimeStatus(status *runtimeapi.RuntimeStatus) *kubecontainer.Runtim return &kubecontainer.RuntimeStatus{Conditions: conditions} } -// getSeccompProfileFromAnnotations gets seccomp profile from annotations. -// It gets pod's profile if containerName is empty. -func (m *kubeGenericRuntimeManager) getSeccompProfileFromAnnotations(annotations map[string]string, containerName string) string { - // try the pod profile. - profile, profileOK := annotations[v1.SeccompPodAnnotationKey] +func fieldProfile(scmp *v1.SeccompProfile, profileRootPath string) string { + if scmp == nil { + return "" + } + if scmp.Type == v1.SeccompProfileTypeRuntimeDefault { + return v1.SeccompProfileRuntimeDefault + } + if scmp.Type == v1.SeccompProfileTypeLocalhost && scmp.LocalhostProfile != nil && len(*scmp.LocalhostProfile) > 0 { + fname := filepath.Join(profileRootPath, *scmp.LocalhostProfile) + return v1.SeccompLocalhostProfileNamePrefix + fname + } + if scmp.Type == v1.SeccompProfileTypeUnconfined { + return v1.SeccompProfileNameUnconfined + } + return "" +} + +func annotationProfile(profile, profileRootPath string) string { + if strings.HasPrefix(profile, v1.SeccompLocalhostProfileNamePrefix) { + name := strings.TrimPrefix(profile, v1.SeccompLocalhostProfileNamePrefix) + fname := filepath.Join(profileRootPath, filepath.FromSlash(name)) + return v1.SeccompLocalhostProfileNamePrefix + fname + } + return profile +} + +func (m *kubeGenericRuntimeManager) getSeccompProfile(annotations map[string]string, containerName string, + podSecContext *v1.PodSecurityContext, containerSecContext *v1.SecurityContext) string { + // container fields are applied first + if containerSecContext != nil && containerSecContext.SeccompProfile != nil { + return fieldProfile(containerSecContext.SeccompProfile, m.seccompProfileRoot) + } + + // if container field does not exist, try container annotation (deprecated) if containerName != "" { - // try the container profile. - cProfile, cProfileOK := annotations[v1.SeccompContainerAnnotationKeyPrefix+containerName] - if cProfileOK { - profile = cProfile - profileOK = cProfileOK + if profile, ok := annotations[v1.SeccompContainerAnnotationKeyPrefix+containerName]; ok { + return annotationProfile(profile, m.seccompProfileRoot) } } - if !profileOK { - return "" + // when container seccomp is not defined, try to apply from pod field + if podSecContext != nil && podSecContext.SeccompProfile != nil { + return fieldProfile(podSecContext.SeccompProfile, m.seccompProfileRoot) } - if strings.HasPrefix(profile, "localhost/") { - name := strings.TrimPrefix(profile, "localhost/") - fname := filepath.Join(m.seccompProfileRoot, filepath.FromSlash(name)) - return "localhost/" + fname + // as last resort, try to apply pod annotation (deprecated) + if profile, ok := annotations[v1.SeccompPodAnnotationKey]; ok { + return annotationProfile(profile, m.seccompProfileRoot) } - return profile + return "" } func ipcNamespaceForPod(pod *v1.Pod) runtimeapi.NamespaceMode { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go index 89be5366b4f..af361122c35 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go @@ -34,7 +34,7 @@ import ( grpcstatus "google.golang.org/grpc/status" "github.com/armon/circbuf" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -143,12 +143,6 @@ func (m *kubeGenericRuntimeManager) startContainer(podSandboxID string, podSandb } // Step 2: create the container. - ref, err := kubecontainer.GenerateContainerRef(pod, container) - if err != nil { - klog.Errorf("Can't make a ref to pod %q, container %v: %v", format.Pod(pod), container.Name, err) - } - klog.V(4).Infof("Generating ref for container %s: %#v", container.Name, ref) - // For a new container, the RestartCount should be 0 restartCount := 0 containerStatus := podStatus.FindContainerStatusByName(container.Name) @@ -187,13 +181,6 @@ func (m *kubeGenericRuntimeManager) startContainer(podSandboxID string, podSandb } m.recordContainerEvent(pod, container, containerID, v1.EventTypeNormal, events.CreatedContainer, fmt.Sprintf("Created container %s", container.Name)) - if ref != nil { - m.containerRefManager.SetRef(kubecontainer.ContainerID{ - Type: m.runtimeName, - ID: containerID, - }, ref) - } - // Step 3: start the container. err = m.runtimeService.StartContainer(containerID) if err != nil { @@ -212,7 +199,7 @@ func (m *kubeGenericRuntimeManager) startContainer(podSandboxID string, podSandb sandboxMeta.Namespace) containerLog := filepath.Join(podSandboxConfig.LogDirectory, containerConfig.LogPath) // only create legacy symlink if containerLog path exists (or the error is not IsNotExist). - // Because if containerLog path does not exist, only dandling legacySymlink is created. + // Because if containerLog path does not exist, only dangling legacySymlink is created. // This dangling legacySymlink is later removed by container gc, so it does not make sense // to create it in the first place. it happens when journald logging driver is used with docker. if _, err := m.osInterface.Stat(containerLog); !os.IsNotExist(err) { @@ -441,7 +428,7 @@ func (m *kubeGenericRuntimeManager) readLastStringFromContainerLogs(path string) } // getPodContainerStatuses gets all containers' statuses for the pod. -func (m *kubeGenericRuntimeManager) getPodContainerStatuses(uid kubetypes.UID, name, namespace string) ([]*kubecontainer.ContainerStatus, error) { +func (m *kubeGenericRuntimeManager) getPodContainerStatuses(uid kubetypes.UID, name, namespace string) ([]*kubecontainer.Status, error) { // Select all containers of the given pod. containers, err := m.runtimeService.ListContainers(&runtimeapi.ContainerFilter{ LabelSelector: map[string]string{types.KubernetesPodUIDLabel: string(uid)}, @@ -451,7 +438,7 @@ func (m *kubeGenericRuntimeManager) getPodContainerStatuses(uid kubetypes.UID, n return nil, err } - statuses := make([]*kubecontainer.ContainerStatus, len(containers)) + statuses := make([]*kubecontainer.Status, len(containers)) // TODO: optimization: set maximum number of containers per container name to examine. for i, c := range containers { status, err := m.runtimeService.ContainerStatus(c.Id) @@ -494,10 +481,10 @@ func (m *kubeGenericRuntimeManager) getPodContainerStatuses(uid kubetypes.UID, n return statuses, nil } -func toKubeContainerStatus(status *runtimeapi.ContainerStatus, runtimeName string) *kubecontainer.ContainerStatus { +func toKubeContainerStatus(status *runtimeapi.ContainerStatus, runtimeName string) *kubecontainer.Status { annotatedInfo := getContainerInfoFromAnnotations(status.Annotations) labeledInfo := getContainerInfoFromLabels(status.Labels) - cStatus := &kubecontainer.ContainerStatus{ + cStatus := &kubecontainer.Status{ ID: kubecontainer.ContainerID{ Type: runtimeName, ID: status.Id, @@ -642,10 +629,10 @@ func (m *kubeGenericRuntimeManager) killContainer(pod *v1.Pod, containerID kubec } if gracePeriodOverride != nil { gracePeriod = *gracePeriodOverride - klog.V(3).Infof("Killing container %q, but using %d second grace period override", containerID, gracePeriod) + klog.V(3).Infof("Killing container %q, but using a %d second grace period override", containerID, gracePeriod) } - klog.V(2).Infof("Killing container %q with %d second grace period", containerID.String(), gracePeriod) + klog.V(2).Infof("Killing container %q with a %d second grace period", containerID.String(), gracePeriod) err := m.runtimeService.StopContainer(containerID.ID, gracePeriod) if err != nil { @@ -654,8 +641,6 @@ func (m *kubeGenericRuntimeManager) killContainer(pod *v1.Pod, containerID kubec klog.V(3).Infof("Container %q exited normally", containerID.String()) } - m.containerRefManager.ClearRef(containerID) - return err } @@ -719,13 +704,6 @@ func (m *kubeGenericRuntimeManager) pruneInitContainersBeforeStart(pod *v1.Pod, utilruntime.HandleError(fmt.Errorf("failed to remove pod init container %q: %v; Skipping pod %q", status.Name, err, format.Pod(pod))) continue } - - // remove any references to this container - if _, ok := m.containerRefManager.GetRef(status.ID); ok { - m.containerRefManager.ClearRef(status.ID) - } else { - klog.Warningf("No ref for container %q", status.ID) - } } } } @@ -751,12 +729,6 @@ func (m *kubeGenericRuntimeManager) purgeInitContainers(pod *v1.Pod, podStatus * utilruntime.HandleError(fmt.Errorf("failed to remove pod init container %q: %v; Skipping pod %q", status.Name, err, format.Pod(pod))) continue } - // Remove any references to this container - if _, ok := m.containerRefManager.GetRef(status.ID); ok { - m.containerRefManager.ClearRef(status.ID) - } else { - klog.Warningf("No ref for container %q", status.ID) - } } } } @@ -765,7 +737,7 @@ func (m *kubeGenericRuntimeManager) purgeInitContainers(pod *v1.Pod, podStatus * // index of next init container to start, or done if there are no further init containers. // Status is only returned if an init container is failed, in which case next will // point to the current container. -func findNextInitContainerToRun(pod *v1.Pod, podStatus *kubecontainer.PodStatus) (status *kubecontainer.ContainerStatus, next *v1.Container, done bool) { +func findNextInitContainerToRun(pod *v1.Pod, podStatus *kubecontainer.PodStatus) (status *kubecontainer.Status, next *v1.Container, done bool) { if len(pod.Spec.InitContainers) == 0 { return nil, nil, true } @@ -883,19 +855,19 @@ func (m *kubeGenericRuntimeManager) removeContainer(containerID string) error { // removeContainerLog removes the container log. func (m *kubeGenericRuntimeManager) removeContainerLog(containerID string) error { - // Remove the container log. + // Use log manager to remove rotated logs. + err := m.logManager.Clean(containerID) + if err != nil { + return err + } + status, err := m.runtimeService.ContainerStatus(containerID) if err != nil { return fmt.Errorf("failed to get container status %q: %v", containerID, err) } - labeledInfo := getContainerInfoFromLabels(status.Labels) - path := status.GetLogPath() - if err := m.osInterface.Remove(path); err != nil && !os.IsNotExist(err) { - return fmt.Errorf("failed to remove container %q log %q: %v", containerID, path, err) - } - // Remove the legacy container log symlink. // TODO(random-liu): Remove this after cluster logging supports CRI container log path. + labeledInfo := getContainerInfoFromLabels(status.Labels) legacySymlink := legacyLogSymlink(containerID, labeledInfo.ContainerName, labeledInfo.PodName, labeledInfo.PodNamespace) if err := m.osInterface.Remove(legacySymlink); err != nil && !os.IsNotExist(err) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_linux.go index 5da5735b559..0f4fab34c04 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_linux.go @@ -25,7 +25,7 @@ import ( v1 "k8s.io/api/core/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" kubefeatures "k8s.io/kubernetes/pkg/features" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_windows.go index 7adb387d4f2..eeb08d79bf1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_windows.go @@ -20,8 +20,7 @@ package kuberuntime import ( "fmt" - - "github.com/docker/docker/pkg/sysinfo" + "runtime" "k8s.io/api/core/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" @@ -31,7 +30,7 @@ import ( kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/securitycontext" - "k8s.io/klog" + "k8s.io/klog/v2" ) // applyPlatformSpecificContainerConfig applies platform specific configurations to runtimeapi.ContainerConfig. @@ -85,7 +84,7 @@ func (m *kubeGenericRuntimeManager) generateWindowsContainerConfig(container *v1 // https://github.com/opencontainers/runtime-spec/blob/ad53dcdc39f1f7f7472b10aa0a45648fe4865496/config-windows.md#cpu // If both CpuWeight and CpuMaximum are set - ContainerD catches this invalid case and returns an error instead. - cpuMaximum := 10000 * cpuLimit.MilliValue() / int64(sysinfo.NumCPU()) / 1000 + cpuMaximum := 10000 * cpuLimit.MilliValue() / int64(runtime.NumCPU()) / 1000 // TODO: This should be reviewed or removed once Hyper-V support is implemented with CRI-ContainerD // in a future release. cpuCount may or may not be required if cpuMaximum is set. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go index b139dba9272..8c4f786db9b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) @@ -125,6 +125,9 @@ func (cgc *containerGC) enforceMaxContainersPerEvictUnit(evictUnits containersBy func (cgc *containerGC) removeOldestN(containers []containerGCInfo, toRemove int) []containerGCInfo { // Remove from oldest to newest (last to first). numToKeep := len(containers) - toRemove + if numToKeep > 0 { + sort.Sort(byCreated(containers)) + } for i := len(containers) - 1; i >= numToKeep; i-- { if containers[i].unknown { // Containers in known state could be running, we should try @@ -151,8 +154,11 @@ func (cgc *containerGC) removeOldestN(containers []containerGCInfo, toRemove int // removeOldestNSandboxes removes the oldest inactive toRemove sandboxes and // returns the resulting slice. func (cgc *containerGC) removeOldestNSandboxes(sandboxes []sandboxGCInfo, toRemove int) { - // Remove from oldest to newest (last to first). numToKeep := len(sandboxes) - toRemove + if numToKeep > 0 { + sort.Sort(sandboxByCreated(sandboxes)) + } + // Remove from oldest to newest (last to first). for i := len(sandboxes) - 1; i >= numToKeep; i-- { if !sandboxes[i].active { cgc.removeSandbox(sandboxes[i].id) @@ -210,16 +216,11 @@ func (cgc *containerGC) evictableContainers(minAge time.Duration) (containersByE evictUnits[key] = append(evictUnits[key], containerInfo) } - // Sort the containers by age. - for uid := range evictUnits { - sort.Sort(byCreated(evictUnits[uid])) - } - return evictUnits, nil } // evict all containers that are evictable -func (cgc *containerGC) evictContainers(gcPolicy kubecontainer.ContainerGCPolicy, allSourcesReady bool, evictTerminatedPods bool) error { +func (cgc *containerGC) evictContainers(gcPolicy kubecontainer.GCPolicy, allSourcesReady bool, evictTerminatedPods bool) error { // Separate containers by evict units. evictUnits, err := cgc.evictableContainers(gcPolicy.MinAge) if err != nil { @@ -309,11 +310,6 @@ func (cgc *containerGC) evictSandboxes(evictTerminatedPods bool) error { sandboxesByPod[podUID] = append(sandboxesByPod[podUID], sandboxInfo) } - // Sort the sandboxes by age. - for uid := range sandboxesByPod { - sort.Sort(sandboxByCreated(sandboxesByPod[uid])) - } - for podUID, sandboxes := range sandboxesByPod { if cgc.podStateProvider.IsPodDeleted(podUID) || (cgc.podStateProvider.IsPodTerminated(podUID) && evictTerminatedPods) { // Remove all evictable sandboxes if the pod has been removed. @@ -356,9 +352,35 @@ func (cgc *containerGC) evictPodLogsDirectories(allSourcesReady bool) error { logSymlinks, _ := osInterface.Glob(filepath.Join(legacyContainerLogsDir, fmt.Sprintf("*.%s", legacyLogSuffix))) for _, logSymlink := range logSymlinks { if _, err := osInterface.Stat(logSymlink); os.IsNotExist(err) { + if containerID, err := getContainerIDFromLegacyLogSymlink(logSymlink); err == nil { + status, err := cgc.manager.runtimeService.ContainerStatus(containerID) + if err != nil { + // TODO: we should handle container not found (i.e. container was deleted) case differently + // once https://github.com/kubernetes/kubernetes/issues/63336 is resolved + klog.Infof("Error getting ContainerStatus for containerID %q: %v", containerID, err) + } else if status.State != runtimeapi.ContainerState_CONTAINER_EXITED { + // Here is how container log rotation works (see containerLogManager#rotateLatestLog): + // + // 1. rename current log to rotated log file whose filename contains current timestamp (fmt.Sprintf("%s.%s", log, timestamp)) + // 2. reopen the container log + // 3. if #2 fails, rename rotated log file back to container log + // + // There is small but indeterministic amount of time during which log file doesn't exist (between steps #1 and #2, between #1 and #3). + // Hence the symlink may be deemed unhealthy during that period. + // See https://github.com/kubernetes/kubernetes/issues/52172 + // + // We only remove unhealthy symlink for dead containers + klog.V(5).Infof("Container %q is still running, not removing symlink %q.", containerID, logSymlink) + continue + } + } else { + klog.V(4).Infof("unable to obtain container Id: %v", err) + } err := osInterface.Remove(logSymlink) if err != nil { klog.Errorf("Failed to remove container log dead symlink %q: %v", logSymlink, err) + } else { + klog.V(4).Infof("removed symlink %s", logSymlink) } } } @@ -375,7 +397,7 @@ func (cgc *containerGC) evictPodLogsDirectories(allSourcesReady bool) error { // * removes oldest dead containers by enforcing gcPolicy.MaxContainers. // * gets evictable sandboxes which are not ready and contains no containers. // * removes evictable sandboxes. -func (cgc *containerGC) GarbageCollect(gcPolicy kubecontainer.ContainerGCPolicy, allSourcesReady bool, evictTerminatedPods bool) error { +func (cgc *containerGC) GarbageCollect(gcPolicy kubecontainer.GCPolicy, allSourcesReady bool, evictTerminatedPods bool) error { errors := []error{} // Remove evictable containers if err := cgc.evictContainers(gcPolicy, allSourcesReady, evictTerminatedPods); err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go index fcab3f5314b..146e5aac408 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go @@ -17,10 +17,10 @@ limitations under the License. package kuberuntime import ( - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" credentialprovidersecrets "k8s.io/kubernetes/pkg/credentialprovider/secrets" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/util/parsers" @@ -40,7 +40,8 @@ func (m *kubeGenericRuntimeManager) PullImage(image kubecontainer.ImageSpec, pul return "", err } - imgSpec := &runtimeapi.ImageSpec{Image: img} + imgSpec := toRuntimeAPIImageSpec(image) + creds, withCredentials := keyring.Lookup(repoToPull) if !withCredentials { klog.V(3).Infof("Pulling image %q without credentials", img) @@ -80,7 +81,7 @@ func (m *kubeGenericRuntimeManager) PullImage(image kubecontainer.ImageSpec, pul // GetImageRef gets the ID of the image which has already been in // the local storage. It returns ("", nil) if the image isn't in the local storage. func (m *kubeGenericRuntimeManager) GetImageRef(image kubecontainer.ImageSpec) (string, error) { - status, err := m.imageService.ImageStatus(&runtimeapi.ImageSpec{Image: image.Image}) + status, err := m.imageService.ImageStatus(toRuntimeAPIImageSpec(image)) if err != nil { klog.Errorf("ImageStatus for image %q failed: %v", image, err) return "", err @@ -107,6 +108,7 @@ func (m *kubeGenericRuntimeManager) ListImages() ([]kubecontainer.Image, error) Size: int64(img.Size_), RepoTags: img.RepoTags, RepoDigests: img.RepoDigests, + Spec: toKubeContainerImageSpec(img), }) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go index 9035f6a9be0..67d121d7321 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -24,7 +24,7 @@ import ( "time" cadvisorapi "github.com/google/cadvisor/info/v1" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -35,6 +35,7 @@ import ( "k8s.io/client-go/tools/record" ref "k8s.io/client-go/tools/reference" "k8s.io/client-go/util/flowcontrol" + "k8s.io/component-base/logs/logreduction" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -45,12 +46,12 @@ import ( "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/images" "k8s.io/kubernetes/pkg/kubelet/lifecycle" + "k8s.io/kubernetes/pkg/kubelet/logs" proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" "k8s.io/kubernetes/pkg/kubelet/runtimeclass" "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/cache" "k8s.io/kubernetes/pkg/kubelet/util/format" - "k8s.io/kubernetes/pkg/kubelet/util/logreduction" ) const ( @@ -79,10 +80,9 @@ type podStateProvider interface { } type kubeGenericRuntimeManager struct { - runtimeName string - recorder record.EventRecorder - osInterface kubecontainer.OSInterface - containerRefManager *kubecontainer.RefManager + runtimeName string + recorder record.EventRecorder + osInterface kubecontainer.OSInterface // machineInfo contains the machine information. machineInfo *cadvisorapi.MachineInfo @@ -128,6 +128,9 @@ type kubeGenericRuntimeManager struct { // A shim to legacy functions for backward compatibility. legacyLogProvider LegacyLogProvider + // Manage container logs. + logManager logs.ContainerLogManager + // Manage RuntimeClass resources. runtimeClassManager *runtimeclass.Manager @@ -139,7 +142,7 @@ type kubeGenericRuntimeManager struct { type KubeGenericRuntime interface { kubecontainer.Runtime kubecontainer.StreamingRuntime - kubecontainer.ContainerCommandRunner + kubecontainer.CommandRunner } // LegacyLogProvider gives the ability to use unsupported docker log drivers (e.g. journald) @@ -154,7 +157,6 @@ func NewKubeGenericRuntimeManager( livenessManager proberesults.Manager, startupManager proberesults.Manager, seccompProfileRoot string, - containerRefManager *kubecontainer.RefManager, machineInfo *cadvisorapi.MachineInfo, podStateProvider podStateProvider, osInterface kubecontainer.OSInterface, @@ -170,6 +172,7 @@ func NewKubeGenericRuntimeManager( imageService internalapi.ImageManagerService, internalLifecycle cm.InternalContainerLifecycle, legacyLogProvider LegacyLogProvider, + logManager logs.ContainerLogManager, runtimeClassManager *runtimeclass.Manager, ) (KubeGenericRuntime, error) { kubeRuntimeManager := &kubeGenericRuntimeManager{ @@ -179,7 +182,6 @@ func NewKubeGenericRuntimeManager( seccompProfileRoot: seccompProfileRoot, livenessManager: livenessManager, startupManager: startupManager, - containerRefManager: containerRefManager, machineInfo: machineInfo, osInterface: osInterface, runtimeHelper: runtimeHelper, @@ -188,6 +190,7 @@ func NewKubeGenericRuntimeManager( keyring: credentialprovider.NewDockerKeyring(), internalLifecycle: internalLifecycle, legacyLogProvider: legacyLogProvider, + logManager: logManager, runtimeClassManager: runtimeClassManager, logReduction: logreduction.NewLogReduction(identicalErrorDelay), } @@ -456,7 +459,7 @@ func (m *kubeGenericRuntimeManager) podSandboxChanged(pod *v1.Pod, podStatus *ku return false, sandboxStatus.Metadata.Attempt, sandboxStatus.Id } -func containerChanged(container *v1.Container, containerStatus *kubecontainer.ContainerStatus) (uint64, uint64, bool) { +func containerChanged(container *v1.Container, containerStatus *kubecontainer.Status) (uint64, uint64, bool) { expectedHash := kubecontainer.HashContainer(container) return expectedHash, containerStatus.Hash, containerStatus.Hash != expectedHash } @@ -718,7 +721,7 @@ func (m *kubeGenericRuntimeManager) SyncPod(pod *v1.Pod, podStatus *kubecontaine var msg string var err error - klog.V(4).Infof("Creating sandbox for pod %q", format.Pod(pod)) + klog.V(4).Infof("Creating PodSandbox for pod %q", format.Pod(pod)) createSandboxResult := kubecontainer.NewSyncResult(kubecontainer.CreatePodSandbox, format.Pod(pod)) result.AddSyncResult(createSandboxResult) podSandboxID, msg, err = m.createPodSandbox(pod, podContainerChanges.Attempt) @@ -796,9 +799,9 @@ func (m *kubeGenericRuntimeManager) SyncPod(pod *v1.Pod, podStatus *kubecontaine // repetitive log spam switch { case err == images.ErrImagePullBackOff: - klog.V(3).Infof("%v start failed: %v: %s", typeName, err, msg) + klog.V(3).Infof("%v %+v start failed in pod %v: %v: %s", typeName, spec.container, format.Pod(pod), err, msg) default: - utilruntime.HandleError(fmt.Errorf("%v start failed: %v: %s", typeName, err, msg)) + utilruntime.HandleError(fmt.Errorf("%v %+v start failed in pod %v: %v: %s", typeName, spec.container, format.Pod(pod), err, msg)) } return err } @@ -838,7 +841,7 @@ func (m *kubeGenericRuntimeManager) SyncPod(pod *v1.Pod, podStatus *kubecontaine // If a container is still in backoff, the function will return a brief backoff error and // a detailed error message. func (m *kubeGenericRuntimeManager) doBackOff(pod *v1.Pod, container *v1.Container, podStatus *kubecontainer.PodStatus, backOff *flowcontrol.Backoff) (bool, string, error) { - var cStatus *kubecontainer.ContainerStatus + var cStatus *kubecontainer.Status for _, c := range podStatus.ContainerStatuses { if c.Name == container.Name && c.State == kubecontainer.ContainerStateExited { cStatus = c @@ -966,7 +969,7 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(uid kubetypes.UID, name, namesp } // GarbageCollect removes dead containers using the specified container gc policy. -func (m *kubeGenericRuntimeManager) GarbageCollect(gcPolicy kubecontainer.ContainerGCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error { +func (m *kubeGenericRuntimeManager) GarbageCollect(gcPolicy kubecontainer.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error { return m.containerGC.GarbageCollect(gcPolicy, allSourcesReady, evictNonDeletedPods) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go index 07824b3fbfd..0978044f753 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go @@ -22,14 +22,15 @@ import ( "net/url" "sort" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" kubetypes "k8s.io/apimachinery/pkg/types" utilfeature "k8s.io/apiserver/pkg/util/feature" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/pkg/kubelet/util" "k8s.io/kubernetes/pkg/kubelet/util/format" ) @@ -96,11 +97,15 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxConfig(pod *v1.Pod, attemp if !kubecontainer.IsHostNetworkPod(pod) { // TODO: Add domain support in new runtime interface - hostname, _, err := m.runtimeHelper.GeneratePodHostNameAndDomain(pod) + podHostname, podDomain, err := m.runtimeHelper.GeneratePodHostNameAndDomain(pod) if err != nil { return nil, err } - podSandboxConfig.Hostname = hostname + podHostname, err = util.GetNodenameForKernel(podHostname, podDomain, pod.Spec.SetHostnameAsFQDN) + if err != nil { + return nil, err + } + podSandboxConfig.Hostname = podHostname } logDir := BuildPodLogsDirectory(pod.Namespace, pod.Name, pod.UID) @@ -143,8 +148,11 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxLinuxConfig(pod *v1.Pod) ( lc := &runtimeapi.LinuxPodSandboxConfig{ CgroupParent: cgroupParent, SecurityContext: &runtimeapi.LinuxSandboxSecurityContext{ - Privileged: kubecontainer.HasPrivilegedContainer(pod), - SeccompProfilePath: m.getSeccompProfileFromAnnotations(pod.Annotations, ""), + Privileged: kubecontainer.HasPrivilegedContainer(pod), + + // Forcing sandbox to run as `runtime/default` allow users to + // use least privileged seccomp profiles at pod level. Issue #84623 + SeccompProfilePath: v1.SeccompProfileRuntimeDefault, }, } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels.go index e3a67eb1aab..6f9e15fd882 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels.go @@ -22,7 +22,7 @@ import ( "k8s.io/api/core/v1" kubetypes "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/format" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/legacy.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/legacy.go index ae208a01a20..1187123ad7f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/legacy.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/legacy.go @@ -19,6 +19,7 @@ package kuberuntime import ( "fmt" "path" + "strings" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) @@ -44,6 +45,25 @@ func legacyLogSymlink(containerID string, containerName, podName, podNamespace s containerName, containerID) } +// getContainerIDFromLegacyLogSymlink returns error if container Id cannot be parsed +func getContainerIDFromLegacyLogSymlink(logSymlink string) (string, error) { + parts := strings.Split(logSymlink, "-") + if len(parts) == 0 { + return "", fmt.Errorf("unable to find separator in %q", logSymlink) + } + containerIDWithSuffix := parts[len(parts)-1] + suffix := fmt.Sprintf(".%s", legacyLogSuffix) + if !strings.HasSuffix(containerIDWithSuffix, suffix) { + return "", fmt.Errorf("%q doesn't end with %q", logSymlink, suffix) + } + containerIDWithoutSuffix := strings.TrimSuffix(containerIDWithSuffix, suffix) + // container can be retrieved with container Id as short as 6 characters + if len(containerIDWithoutSuffix) < 6 { + return "", fmt.Errorf("container Id %q is too short", containerIDWithoutSuffix) + } + return containerIDWithoutSuffix, nil +} + func logSymlink(containerLogsDir, podFullName, containerName, containerID string) string { suffix := fmt.Sprintf(".%s", legacyLogSuffix) logPath := fmt.Sprintf("%s_%s-%s", podFullName, containerName, containerID) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/BUILD index 2387f385377..42cde17e300 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/BUILD @@ -11,9 +11,8 @@ go_library( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", - "//vendor/github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog:go_default_library", "//vendor/github.com/fsnotify/fsnotify:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/logs.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/logs.go index f71baec5188..80809fa4e7a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/logs.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/logs.go @@ -29,9 +29,8 @@ import ( "path/filepath" "time" - "github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog" "github.com/fsnotify/fsnotify" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" internalapi "k8s.io/cri-api/pkg/apis" @@ -168,13 +167,24 @@ func parseCRILog(log []byte, msg *logMessage) error { return nil } +// jsonLog is a log message, typically a single entry from a given log stream. +// since the data structure is originally from docker, we should be careful to +// with any changes to jsonLog +type jsonLog struct { + // Log is the log message + Log string `json:"log,omitempty"` + // Stream is the log source + Stream string `json:"stream,omitempty"` + // Created is the created timestamp of log + Created time.Time `json:"time"` +} + // parseDockerJSONLog parses logs in Docker JSON log format. Docker JSON log format // example: // {"log":"content 1","stream":"stdout","time":"2016-10-20T18:39:20.57606443Z"} // {"log":"content 2","stream":"stderr","time":"2016-10-20T18:39:20.57606444Z"} func parseDockerJSONLog(log []byte, msg *logMessage) error { - var l = &jsonlog.JSONLog{} - l.Reset() + var l = &jsonLog{} // TODO: JSON decoding is fairly expensive, we should evaluate this. if err := json.Unmarshal(log, l); err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/security_context.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/security_context.go index 47d524256da..c8ebe103dbf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/security_context.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/security_context.go @@ -19,7 +19,7 @@ package kuberuntime import ( "fmt" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" "k8s.io/kubernetes/pkg/security/apparmor" "k8s.io/kubernetes/pkg/securitycontext" @@ -37,7 +37,7 @@ func (m *kubeGenericRuntimeManager) determineEffectiveSecurityContext(pod *v1.Po } // set SeccompProfilePath. - synthesized.SeccompProfilePath = m.getSeccompProfileFromAnnotations(pod.Annotations, container.Name) + synthesized.SeccompProfilePath = m.getSeccompProfile(pod.Annotations, container.Name, pod.Spec.SecurityContext, container.SecurityContext) // set ApparmorProfile. synthesized.ApparmorProfile = apparmor.GetProfileNameFromPodAnnotations(pod.Annotations, container.Name) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/legacy/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/legacy/BUILD new file mode 100644 index 00000000000..c420c57af3c --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/legacy/BUILD @@ -0,0 +1,27 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["logs.go"], + importpath = "k8s.io/kubernetes/pkg/kubelet/legacy", + visibility = ["//visibility:public"], + deps = [ + "//pkg/kubelet/container:go_default_library", + "//pkg/kubelet/kuberuntime:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/legacy/logs.go b/vendor/k8s.io/kubernetes/pkg/kubelet/legacy/logs.go new file mode 100644 index 00000000000..d4b938a05c7 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/legacy/logs.go @@ -0,0 +1,53 @@ +/* +Copyright 2020 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 legacy + +import ( + "context" + "io" + + "k8s.io/api/core/v1" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/kuberuntime" +) + +// DockerLegacyService interface is used throughout `pkg/kubelet`. +// It used to live in the `pkg/kubelet/dockershim` package. While we +// would eventually like to remove it entirely, we need to give users some form +// of warning. +// +// By including the interface in +// `pkg/kubelet/legacy/logs.go`, we ensure the interface is +// available to `pkg/kubelet`, even when we are building with the `dockerless` +// tag (i.e. not compiling the dockershim). +// While the interface always exists, there will be no implementations of the +// interface when building with the `dockerless` tag. The lack of +// implementations should not be an issue, as we only expect `pkg/kubelet` code +// to need an implementation of the `DockerLegacyService` when we are using +// docker. If we are using docker, but building with the `dockerless` tag, than +// this will be just one of many things that breaks. +type DockerLegacyService interface { + // GetContainerLogs gets logs for a specific container. + GetContainerLogs(context.Context, *v1.Pod, kubecontainer.ContainerID, *v1.PodLogOptions, io.Writer, io.Writer) error + + // IsCRISupportedLogDriver checks whether the logging driver used by docker is + // supported by native CRI integration. + // TODO(resouer): remove this when deprecating unsupported log driver + IsCRISupportedLogDriver() (bool, error) + + kuberuntime.LegacyLogProvider +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/BUILD index 3b57741a58d..05f2963b1ce 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/BUILD @@ -26,12 +26,12 @@ go_library( "//pkg/scheduler/framework/plugins/nodename:go_default_library", "//pkg/scheduler/framework/plugins/nodeports:go_default_library", "//pkg/scheduler/framework/plugins/noderesources:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/security/apparmor:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/io:go_default_library", ], ) @@ -49,7 +49,7 @@ go_test( "//pkg/kubelet/util/format:go_default_library", "//pkg/scheduler/framework/plugins/nodename:go_default_library", "//pkg/scheduler/framework/plugins/nodeports:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/admission_failure_handler_stub.go b/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/admission_failure_handler_stub.go index 09f7dc1999d..d22df740955 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/admission_failure_handler_stub.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/admission_failure_handler_stub.go @@ -26,10 +26,12 @@ type AdmissionFailureHandlerStub struct{} var _ AdmissionFailureHandler = &AdmissionFailureHandlerStub{} +// NewAdmissionFailureHandlerStub returns an instance of AdmissionFailureHandlerStub. func NewAdmissionFailureHandlerStub() *AdmissionFailureHandlerStub { return &AdmissionFailureHandlerStub{} } +// HandleAdmissionFailure simply passes admission rejection on, with no special handling. func (n *AdmissionFailureHandlerStub) HandleAdmissionFailure(admitPod *v1.Pod, failureReasons []PredicateFailureReason) ([]PredicateFailureReason, error) { return failureReasons, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/doc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/doc.go index a6be2c40cc8..eab81169a0e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/doc.go @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Handlers for pod lifecycle events and interfaces to integrate -// with kubelet admission, synchronization, and eviction of pods. +// Package lifecycle contains handlers for pod lifecycle events and interfaces +// to integrate with kubelet admission, synchronization, and eviction of pods. package lifecycle // import "k8s.io/kubernetes/pkg/kubelet/lifecycle" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/handlers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/handlers.go index c0885ee79b1..b71682f4beb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/handlers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/handlers.go @@ -25,7 +25,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/format" @@ -37,9 +37,9 @@ const ( maxRespBodyLength = 10 * 1 << 10 // 10KB ) -type HandlerRunner struct { +type handlerRunner struct { httpGetter kubetypes.HTTPGetter - commandRunner kubecontainer.ContainerCommandRunner + commandRunner kubecontainer.CommandRunner containerManager podStatusProvider } @@ -47,15 +47,16 @@ type podStatusProvider interface { GetPodStatus(uid types.UID, name, namespace string) (*kubecontainer.PodStatus, error) } -func NewHandlerRunner(httpGetter kubetypes.HTTPGetter, commandRunner kubecontainer.ContainerCommandRunner, containerManager podStatusProvider) kubecontainer.HandlerRunner { - return &HandlerRunner{ +// NewHandlerRunner returns a configured lifecycle handler for a container. +func NewHandlerRunner(httpGetter kubetypes.HTTPGetter, commandRunner kubecontainer.CommandRunner, containerManager podStatusProvider) kubecontainer.HandlerRunner { + return &handlerRunner{ httpGetter: httpGetter, commandRunner: commandRunner, containerManager: containerManager, } } -func (hr *HandlerRunner) Run(containerID kubecontainer.ContainerID, pod *v1.Pod, container *v1.Container, handler *v1.Handler) (string, error) { +func (hr *handlerRunner) Run(containerID kubecontainer.ContainerID, pod *v1.Pod, container *v1.Container, handler *v1.Handler) (string, error) { switch { case handler.Exec != nil: var msg string @@ -104,7 +105,7 @@ func resolvePort(portReference intstr.IntOrString, container *v1.Container) (int return -1, fmt.Errorf("couldn't find port: %v in %v", portReference, container) } -func (hr *HandlerRunner) runHTTPHandler(pod *v1.Pod, container *v1.Container, handler *v1.Handler) (string, error) { +func (hr *handlerRunner) runHTTPHandler(pod *v1.Pod, container *v1.Container, handler *v1.Handler) (string, error) { host := handler.HTTPGet.Host if len(host) == 0 { status, err := hr.containerManager.GetPodStatus(pod.UID, pod.Name, pod.Namespace) @@ -129,10 +130,10 @@ func (hr *HandlerRunner) runHTTPHandler(pod *v1.Pod, container *v1.Container, ha } url := fmt.Sprintf("http://%s/%s", net.JoinHostPort(host, strconv.Itoa(port)), handler.HTTPGet.Path) resp, err := hr.httpGetter.Get(url) - return getHttpRespBody(resp), err + return getHTTPRespBody(resp), err } -func getHttpRespBody(resp *http.Response) string { +func getHTTPRespBody(resp *http.Response) string { if resp == nil { return "" } @@ -144,6 +145,8 @@ func getHttpRespBody(resp *http.Response) string { return "" } +// NewAppArmorAdmitHandler returns a PodAdmitHandler which is used to evaluate +// if a pod can be admitted from the perspective of AppArmor. func NewAppArmorAdmitHandler(validator apparmor.Validator) PodAdmitHandler { return &appArmorAdmitHandler{ Validator: validator, @@ -171,6 +174,8 @@ func (a *appArmorAdmitHandler) Admit(attrs *PodAdmitAttributes) PodAdmitResult { } } +// NewNoNewPrivsAdmitHandler returns a PodAdmitHandler which is used to evaluate +// if a pod can be admitted from the perspective of NoNewPrivs. func NewNoNewPrivsAdmitHandler(runtime kubecontainer.Runtime) PodAdmitHandler { return &noNewPrivsAdmitHandler{ Runtime: runtime, @@ -236,6 +241,8 @@ func noNewPrivsRequired(pod *v1.Pod) bool { return false } +// NewProcMountAdmitHandler returns a PodAdmitHandler which is used to evaluate +// if a pod can be admitted from the perspective of ProcMount. func NewProcMountAdmitHandler(runtime kubecontainer.Runtime) PodAdmitHandler { return &procMountAdmitHandler{ Runtime: runtime, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/predicate.go b/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/predicate.go index 2a0ef704636..5991ea77303 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/predicate.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/predicate.go @@ -19,22 +19,21 @@ package lifecycle import ( "fmt" - "k8s.io/klog" + v1 "k8s.io/api/core/v1" + "k8s.io/klog/v2" + v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" + "k8s.io/kubernetes/pkg/kubelet/util/format" pluginhelper "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources" - - "k8s.io/api/core/v1" - v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" - "k8s.io/kubernetes/pkg/kubelet/util/format" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) type getNodeAnyWayFuncType func() (*v1.Node, error) -type pluginResourceUpdateFuncType func(*schedulernodeinfo.NodeInfo, *PodAdmitAttributes) error +type pluginResourceUpdateFuncType func(*schedulerframework.NodeInfo, *PodAdmitAttributes) error // AdmissionFailureHandler is an interface which defines how to deal with a failure to admit a pod. // This allows for the graceful handling of pod admission failure. @@ -50,7 +49,9 @@ type predicateAdmitHandler struct { var _ PodAdmitHandler = &predicateAdmitHandler{} -func NewPredicateAdmitHandler(getNodeAnyWayFunc getNodeAnyWayFuncType, admissionFailureHandler AdmissionFailureHandler, pluginResourceUpdateFunc pluginResourceUpdateFuncType) *predicateAdmitHandler { +// NewPredicateAdmitHandler returns a PodAdmitHandler which is used to evaluates +// if a pod can be admitted from the perspective of predicates. +func NewPredicateAdmitHandler(getNodeAnyWayFunc getNodeAnyWayFuncType, admissionFailureHandler AdmissionFailureHandler, pluginResourceUpdateFunc pluginResourceUpdateFuncType) PodAdmitHandler { return &predicateAdmitHandler{ getNodeAnyWayFunc, pluginResourceUpdateFunc, @@ -70,7 +71,7 @@ func (w *predicateAdmitHandler) Admit(attrs *PodAdmitAttributes) PodAdmitResult } admitPod := attrs.Pod pods := attrs.OtherPods - nodeInfo := schedulernodeinfo.NewNodeInfo(pods...) + nodeInfo := schedulerframework.NewNodeInfo(pods...) nodeInfo.SetNode(node) // ensure the node has enough plugin resources for that required in pods if err = w.pluginResourceUpdateFunc(nodeInfo, attrs); err != nil { @@ -156,7 +157,7 @@ func (w *predicateAdmitHandler) Admit(attrs *PodAdmitAttributes) PodAdmitResult } } -func removeMissingExtendedResources(pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *v1.Pod { +func removeMissingExtendedResources(pod *v1.Pod, nodeInfo *schedulerframework.NodeInfo) *v1.Pod { podCopy := pod.DeepCopy() for i, c := range pod.Spec.Containers { // We only handle requests in Requests but not Limits because the @@ -165,7 +166,7 @@ func removeMissingExtendedResources(pod *v1.Pod, nodeInfo *schedulernodeinfo.Nod podCopy.Spec.Containers[i].Resources.Requests = make(v1.ResourceList) for rName, rQuant := range c.Resources.Requests { if v1helper.IsExtendedResourceName(rName) { - if _, found := nodeInfo.AllocatableResource().ScalarResources[rName]; !found { + if _, found := nodeInfo.Allocatable.ScalarResources[rName]; !found { continue } } @@ -220,13 +221,13 @@ func (e *PredicateFailureError) GetReason() string { } // GeneralPredicates checks a group of predicates that the kubelet cares about. -func GeneralPredicates(pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) ([]PredicateFailureReason, error) { +func GeneralPredicates(pod *v1.Pod, nodeInfo *schedulerframework.NodeInfo) ([]PredicateFailureReason, error) { if nodeInfo.Node() == nil { return nil, fmt.Errorf("node not found") } var reasons []PredicateFailureReason - for _, r := range noderesources.Fits(pod, nodeInfo, nil) { + for _, r := range noderesources.Fits(pod, nodeInfo) { reasons = append(reasons, &InsufficientResourceError{ ResourceName: r.ResourceName, Requested: r.Requested, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/logs/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/logs/BUILD index 0aafd835ec0..0b7a608c050 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/logs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/logs/BUILD @@ -9,12 +9,13 @@ go_library( importpath = "k8s.io/kubernetes/pkg/kubelet/logs", visibility = ["//visibility:public"], deps = [ + "//pkg/kubelet/container:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -23,6 +24,7 @@ go_test( srcs = ["container_log_manager_test.go"], embed = [":go_default_library"], deps = [ + "//pkg/kubelet/container:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/testing:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager.go index ac1b3d93513..56e4f31169d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager.go @@ -24,15 +24,17 @@ import ( "path/filepath" "sort" "strings" + "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/util/clock" "k8s.io/apimachinery/pkg/util/wait" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) const ( @@ -55,6 +57,8 @@ type ContainerLogManager interface { // TODO(random-liu): Add RotateLogs function and call it under disk pressure. // Start container log manager. Start() + // Clean removes all logs of specified container. + Clean(containerID string) error } // LogRotatePolicy is a policy for container log rotation. The policy applies to all @@ -142,12 +146,14 @@ func parseMaxSize(size string) (int64, error) { type containerLogManager struct { runtimeService internalapi.RuntimeService + osInterface kubecontainer.OSInterface policy LogRotatePolicy clock clock.Clock + mutex sync.Mutex } // NewContainerLogManager creates a new container log manager. -func NewContainerLogManager(runtimeService internalapi.RuntimeService, maxSize string, maxFiles int) (ContainerLogManager, error) { +func NewContainerLogManager(runtimeService internalapi.RuntimeService, osInterface kubecontainer.OSInterface, maxSize string, maxFiles int) (ContainerLogManager, error) { if maxFiles <= 1 { return nil, fmt.Errorf("invalid MaxFiles %d, must be > 1", maxFiles) } @@ -157,12 +163,14 @@ func NewContainerLogManager(runtimeService internalapi.RuntimeService, maxSize s } // policy LogRotatePolicy return &containerLogManager{ + osInterface: osInterface, runtimeService: runtimeService, policy: LogRotatePolicy{ MaxSize: parsedMaxSize, MaxFiles: maxFiles, }, clock: clock.RealClock{}, + mutex: sync.Mutex{}, }, nil } @@ -176,7 +184,32 @@ func (c *containerLogManager) Start() { }, logMonitorPeriod) } +// Clean removes all logs of specified container (including rotated one). +func (c *containerLogManager) Clean(containerID string) error { + c.mutex.Lock() + defer c.mutex.Unlock() + status, err := c.runtimeService.ContainerStatus(containerID) + if err != nil { + return fmt.Errorf("failed to get container status %q: %v", containerID, err) + } + pattern := fmt.Sprintf("%s*", status.GetLogPath()) + logs, err := c.osInterface.Glob(pattern) + if err != nil { + return fmt.Errorf("failed to list all log files with pattern %q: %v", pattern, err) + } + + for _, l := range logs { + if err := c.osInterface.Remove(l); err != nil && !os.IsNotExist(err) { + return fmt.Errorf("failed to remove container %q log %q: %v", containerID, l, err) + } + } + + return nil +} + func (c *containerLogManager) rotateLogs() error { + c.mutex.Lock() + defer c.mutex.Unlock() // TODO(#59998): Use kubelet pod cache. containers, err := c.runtimeService.ListContainers(&runtimeapi.ContainerFilter{}) if err != nil { @@ -197,7 +230,7 @@ func (c *containerLogManager) rotateLogs() error { continue } path := status.GetLogPath() - info, err := os.Stat(path) + info, err := c.osInterface.Stat(path) if err != nil { if !os.IsNotExist(err) { klog.Errorf("Failed to stat container log %q: %v", path, err) @@ -211,7 +244,7 @@ func (c *containerLogManager) rotateLogs() error { continue } // The container log should be recovered. - info, err = os.Stat(path) + info, err = c.osInterface.Stat(path) if err != nil { klog.Errorf("Failed to stat container log %q after reopen: %v", path, err) continue @@ -269,7 +302,7 @@ func (c *containerLogManager) rotateLog(id, log string) error { func (c *containerLogManager) cleanupUnusedLogs(logs []string) ([]string, error) { inuse, unused := filterUnusedLogs(logs) for _, l := range unused { - if err := os.Remove(l); err != nil { + if err := c.osInterface.Remove(l); err != nil { return nil, fmt.Errorf("failed to remove unused log %q: %v", l, err) } } @@ -322,7 +355,7 @@ func (c *containerLogManager) removeExcessLogs(logs []string) ([]string, error) } i := 0 for ; i < len(logs)-maxRotatedFiles; i++ { - if err := os.Remove(logs[i]); err != nil { + if err := c.osInterface.Remove(logs[i]); err != nil { return nil, fmt.Errorf("failed to remove old log %q: %v", logs[i], err) } } @@ -332,19 +365,19 @@ func (c *containerLogManager) removeExcessLogs(logs []string) ([]string, error) // compressLog compresses a log to log.gz with gzip. func (c *containerLogManager) compressLog(log string) error { - r, err := os.Open(log) + r, err := c.osInterface.Open(log) if err != nil { return fmt.Errorf("failed to open log %q: %v", log, err) } defer r.Close() tmpLog := log + tmpSuffix - f, err := os.OpenFile(tmpLog, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) + f, err := c.osInterface.OpenFile(tmpLog, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) if err != nil { return fmt.Errorf("failed to create temporary log %q: %v", tmpLog, err) } defer func() { // Best effort cleanup of tmpLog. - os.Remove(tmpLog) + c.osInterface.Remove(tmpLog) }() defer f.Close() w := gzip.NewWriter(f) @@ -353,11 +386,11 @@ func (c *containerLogManager) compressLog(log string) error { return fmt.Errorf("failed to compress %q to %q: %v", log, tmpLog, err) } compressedLog := log + compressSuffix - if err := os.Rename(tmpLog, compressedLog); err != nil { + if err := c.osInterface.Rename(tmpLog, compressedLog); err != nil { return fmt.Errorf("failed to rename %q to %q: %v", tmpLog, compressedLog, err) } // Remove old log file. - if err := os.Remove(log); err != nil { + if err := c.osInterface.Remove(log); err != nil { return fmt.Errorf("failed to remove log %q after compress: %v", log, err) } return nil @@ -368,14 +401,14 @@ func (c *containerLogManager) compressLog(log string) error { func (c *containerLogManager) rotateLatestLog(id, log string) error { timestamp := c.clock.Now().Format(timestampFormat) rotated := fmt.Sprintf("%s.%s", log, timestamp) - if err := os.Rename(log, rotated); err != nil { + if err := c.osInterface.Rename(log, rotated); err != nil { return fmt.Errorf("failed to rotate log %q to %q: %v", log, rotated, err) } if err := c.runtimeService.ReopenContainerLog(id); err != nil { // Rename the rotated log back, so that we can try rotating it again // next round. // If kubelet gets restarted at this point, we'll lose original log. - if renameErr := os.Rename(rotated, log); renameErr != nil { + if renameErr := c.osInterface.Rename(rotated, log); renameErr != nil { // This shouldn't happen. // Report an error if this happens, because we will lose original // log. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager_stub.go b/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager_stub.go index a6e0729f19d..27db1e42cbf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager_stub.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager_stub.go @@ -20,6 +20,10 @@ type containerLogManagerStub struct{} func (*containerLogManagerStub) Start() {} +func (*containerLogManagerStub) Clean(containerID string) error { + return nil +} + // NewStubContainerLogManager returns an empty ContainerLogManager which does nothing. func NewStubContainerLogManager() ContainerLogManager { return &containerLogManagerStub{} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/BUILD index 5f3d8f606b0..6e7ecadc169 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/BUILD @@ -17,7 +17,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/BUILD index 25398793eab..ca5de3e11b5 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/BUILD @@ -15,7 +15,7 @@ go_library( "//pkg/kubelet/server/stats:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/log_metrics.go b/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/log_metrics.go index a793429501a..4982b5f2236 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/log_metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/log_metrics.go @@ -18,7 +18,7 @@ package collectors import ( "k8s.io/component-base/metrics" - "k8s.io/klog" + "k8s.io/klog/v2" statsapi "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/resource_metrics.go b/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/resource_metrics.go index 71cf9f7d749..00945f4ca6b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/resource_metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/resource_metrics.go @@ -20,7 +20,7 @@ import ( "time" "k8s.io/component-base/metrics" - "k8s.io/klog" + "k8s.io/klog/v2" summary "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1" "k8s.io/kubernetes/pkg/kubelet/server/stats" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/metrics.go b/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/metrics.go index 9de5c757731..96c83683fe8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/metrics.go @@ -27,7 +27,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) @@ -349,7 +349,7 @@ var ( RunningPodCount = metrics.NewGauge( &metrics.GaugeOpts{ Subsystem: KubeletSubsystem, - Name: "running_pod_count", + Name: "running_pods", Help: "Number of pods currently running", StabilityLevel: metrics.ALPHA, }, @@ -358,7 +358,7 @@ var ( RunningContainerCount = metrics.NewGaugeVec( &metrics.GaugeOpts{ Subsystem: KubeletSubsystem, - Name: "running_container_count", + Name: "running_containers", Help: "Number of containers currently running", StabilityLevel: metrics.ALPHA, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/BUILD index b0adf8b96c4..f2d6cd1611c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/BUILD @@ -13,7 +13,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/io:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/dns.go b/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/dns.go index f09b6f111d7..247036383c8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/dns.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/dns.go @@ -33,7 +33,7 @@ import ( kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/util/format" - "k8s.io/klog" + "k8s.io/klog/v2" utilio "k8s.io/utils/io" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/nodelease/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/nodelease/BUILD index 598cba3b85a..f4a5456f879 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/nodelease/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/nodelease/BUILD @@ -14,7 +14,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/nodelease/controller.go b/vendor/k8s.io/kubernetes/pkg/kubelet/nodelease/controller.go index 4641a06b7fd..424bd9ba5b7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/nodelease/controller.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/nodelease/controller.go @@ -31,7 +31,7 @@ import ( coordclientset "k8s.io/client-go/kubernetes/typed/coordination/v1" "k8s.io/utils/pointer" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/BUILD index fcf5f4e9c30..c6535d8559a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/BUILD @@ -8,7 +8,6 @@ go_library( deps = [ "//pkg/apis/core/v1/helper:go_default_library", "//pkg/features:go_default_library", - "//pkg/kubelet/apis:go_default_library", "//pkg/kubelet/cadvisor:go_default_library", "//pkg/kubelet/cm:go_default_library", "//pkg/kubelet/container:go_default_library", @@ -21,9 +20,10 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", + "//staging/src/k8s.io/cloud-provider/api:go_default_library", "//staging/src/k8s.io/component-base/version:go_default_library", "//vendor/github.com/google/cadvisor/info/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/setters.go b/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/setters.go index ef535bc72bd..b286e7be3e1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/setters.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/setters.go @@ -33,17 +33,17 @@ import ( utilnet "k8s.io/apimachinery/pkg/util/net" utilfeature "k8s.io/apiserver/pkg/util/feature" cloudprovider "k8s.io/cloud-provider" + cloudproviderapi "k8s.io/cloud-provider/api" "k8s.io/component-base/version" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/features" - kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" "k8s.io/kubernetes/pkg/kubelet/cadvisor" "k8s.io/kubernetes/pkg/kubelet/cm" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/volume" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -82,7 +82,7 @@ func NodeAddress(nodeIP net.IP, // typically Kubelet.nodeIP if node.ObjectMeta.Annotations == nil { node.ObjectMeta.Annotations = make(map[string]string) } - node.ObjectMeta.Annotations[kubeletapis.AnnotationProvidedIPAddr] = nodeIP.String() + node.ObjectMeta.Annotations[cloudproviderapi.AnnotationAlphaProvidedIPAddr] = nodeIP.String() } // If --cloud-provider=external and node address is already set, @@ -317,13 +317,11 @@ func MachineInfo(nodeName string, } devicePluginCapacity, devicePluginAllocatable, removedDevicePlugins = devicePluginResourceCapacityFunc() - if devicePluginCapacity != nil { - for k, v := range devicePluginCapacity { - if old, ok := node.Status.Capacity[k]; !ok || old.Value() != v.Value() { - klog.V(2).Infof("Update capacity for %s to %d", k, v.Value()) - } - node.Status.Capacity[k] = v + for k, v := range devicePluginCapacity { + if old, ok := node.Status.Capacity[k]; !ok || old.Value() != v.Value() { + klog.V(2).Infof("Update capacity for %s to %d", k, v.Value()) } + node.Status.Capacity[k] = v } for _, removedResource := range removedDevicePlugins { @@ -365,13 +363,11 @@ func MachineInfo(nodeName string, node.Status.Allocatable[k] = value } - if devicePluginAllocatable != nil { - for k, v := range devicePluginAllocatable { - if old, ok := node.Status.Allocatable[k]; !ok || old.Value() != v.Value() { - klog.V(2).Infof("Update allocatable for %s to %d", k, v.Value()) - } - node.Status.Allocatable[k] = v + for k, v := range devicePluginAllocatable { + if old, ok := node.Status.Allocatable[k]; !ok || old.Value() != v.Value() { + klog.V(2).Infof("Update allocatable for %s to %d", k, v.Value()) } + node.Status.Allocatable[k] = v } // for every huge page reservation, we need to remove it from allocatable memory for k, v := range node.Status.Capacity { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/oom/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/oom/BUILD index d9e826b155c..e38b2f80a37 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/oom/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/oom/BUILD @@ -12,11 +12,14 @@ go_library( deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//vendor/github.com/google/cadvisor/utils/oomparser:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:darwin": [ "//staging/src/k8s.io/client-go/tools/record:go_default_library", @@ -27,14 +30,20 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//staging/src/k8s.io/client-go/tools/record:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//staging/src/k8s.io/client-go/tools/record:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//staging/src/k8s.io/client-go/tools/record:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//vendor/github.com/google/cadvisor/utils/oomparser:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:nacl": [ "//staging/src/k8s.io/client-go/tools/record:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/oom/oom_watcher_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/oom/oom_watcher_linux.go index 698da28e5db..21dc7231559 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/oom/oom_watcher_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/oom/oom_watcher_linux.go @@ -24,7 +24,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/record" - "k8s.io/klog" + "k8s.io/klog/v2" "github.com/google/cadvisor/utils/oomparser" ) @@ -72,7 +72,7 @@ func (ow *realWatcher) Start(ref *v1.ObjectReference) error { defer runtime.HandleCrash() for event := range outStream { - if event.ContainerName == recordEventContainerName { + if event.VictimContainerName == recordEventContainerName { klog.V(1).Infof("Got sys oom event: %v", event) eventMsg := "System OOM encountered" if event.ProcessName != "" && event.Pid != 0 { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/BUILD index 1f3a3be0fdd..4e92c1be90f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/BUILD @@ -22,7 +22,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go index 64d6d257c0b..bad984fb094 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/metrics" ) @@ -67,7 +67,7 @@ type GenericPLEG struct { } // plegContainerState has a one-to-one mapping to the -// kubecontainer.ContainerState except for the non-existent state. This state +// kubecontainer.State except for the non-existent state. This state // is introduced here to complete the state transition scenarios. type plegContainerState string @@ -83,7 +83,7 @@ const ( relistThreshold = 3 * time.Minute ) -func convertState(state kubecontainer.ContainerState) plegContainerState { +func convertState(state kubecontainer.State) plegContainerState { switch state { case kubecontainer.ContainerStateCreated: // kubelet doesn't use the "created" state yet, hence convert it to "unknown". @@ -423,8 +423,7 @@ func getContainerState(pod *kubecontainer.Pod, cid *kubecontainer.ContainerID) p } func updateRunningPodAndContainerMetrics(pods []*kubecontainer.Pod) { - // Set the number of running pods in the parameter - metrics.RunningPodCount.Set(float64(len(pods))) + runningSandboxNum := 0 // intermediate map to store the count of each "container_state" containerStateCount := make(map[string]int) @@ -434,10 +433,23 @@ func updateRunningPodAndContainerMetrics(pods []*kubecontainer.Pod) { // update the corresponding "container_state" in map to set value for the gaugeVec metrics containerStateCount[string(container.State)]++ } + + sandboxes := pod.Sandboxes + + for _, sandbox := range sandboxes { + if sandbox.State == kubecontainer.ContainerStateRunning { + runningSandboxNum++ + // every pod should only have one running sandbox + break + } + } } for key, value := range containerStateCount { metrics.RunningContainerCount.WithLabelValues(key).Set(float64(value)) } + + // Set the number of running pods in the parameter + metrics.RunningPodCount.Set(float64(runningSandboxNum)) } func (pr podRecords) getOld(id types.UID) *kubecontainer.Pod { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/BUILD index cc7187c871d..dc38fb0bc94 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/BUILD @@ -14,7 +14,7 @@ go_library( "//pkg/kubelet/pluginmanager/reconciler:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/BUILD index 0ad63ca5bac..8792e432354 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/BUILD @@ -9,7 +9,7 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache", visibility = ["//visibility:public"], - deps = ["//vendor/k8s.io/klog:go_default_library"], + deps = ["//vendor/k8s.io/klog/v2:go_default_library"], ) go_test( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go index f95b815e89c..1fac9d9465a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go @@ -25,7 +25,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" ) // ActualStateOfWorld defines a set of thread-safe operations for the kubelet diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/desired_state_of_world.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/desired_state_of_world.go index 729904e1c47..d8f504d0b62 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/desired_state_of_world.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/desired_state_of_world.go @@ -25,7 +25,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" ) // DesiredStateOfWorld defines a set of thread-safe operations for the kubelet diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/operationexecutor/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/operationexecutor/BUILD index 859bde70415..228b7632a86 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/operationexecutor/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/operationexecutor/BUILD @@ -15,7 +15,7 @@ go_library( "//staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1:go_default_library", "//vendor/github.com/pkg/errors:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/operationexecutor/operation_generator.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/operationexecutor/operation_generator.go index c1eb242f452..bc643e458f2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/operationexecutor/operation_generator.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/operationexecutor/operation_generator.go @@ -26,7 +26,7 @@ import ( "net" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "github.com/pkg/errors" "google.golang.org/grpc" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/plugin_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/plugin_manager.go index 3b0ad82040d..2697fda873f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/plugin_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/plugin_manager.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/record" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/config" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/metrics" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/BUILD index b8cbf8ccdd7..33e6cd05717 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/BUILD @@ -18,7 +18,7 @@ go_library( "//staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1:go_default_library", "//vendor/github.com/fsnotify/fsnotify:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -31,7 +31,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/example_handler.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/example_handler.go index 70dcb21bd42..8b8228af867 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/example_handler.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/example_handler.go @@ -26,7 +26,7 @@ import ( "time" "google.golang.org/grpc" - "k8s.io/klog" + "k8s.io/klog/v2" registerapi "k8s.io/kubelet/pkg/apis/pluginregistration/v1" v1beta1 "k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/example_plugin_apis/v1beta1" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/example_plugin.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/example_plugin.go index ac4cd855c02..d0859cc8967 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/example_plugin.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/example_plugin.go @@ -26,7 +26,7 @@ import ( "time" "google.golang.org/grpc" - "k8s.io/klog" + "k8s.io/klog/v2" registerapi "k8s.io/kubelet/pkg/apis/pluginregistration/v1" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go index d6ba3687f25..f4cacfe0316 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go @@ -21,10 +21,9 @@ import ( "os" "runtime" "strings" - "time" "github.com/fsnotify/fsnotify" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" "k8s.io/kubernetes/pkg/kubelet/util" @@ -36,7 +35,6 @@ type Watcher struct { path string fs utilfs.Filesystem fsWatcher *fsnotify.Watcher - stopped chan struct{} desiredStateOfWorld cache.DesiredStateOfWorld } @@ -53,8 +51,6 @@ func NewWatcher(sockDir string, desiredStateOfWorld cache.DesiredStateOfWorld) * func (w *Watcher) Start(stopCh <-chan struct{}) error { klog.V(2).Infof("Plugin Watcher Start at %s", w.path) - w.stopped = make(chan struct{}) - // Creating the directory to be watched if it doesn't exist yet, // and walks through the directory to discover the existing plugins. if err := w.init(); err != nil { @@ -73,7 +69,6 @@ func (w *Watcher) Start(stopCh <-chan struct{}) error { } go func(fsWatcher *fsnotify.Watcher) { - defer close(w.stopped) for { select { case event := <-fsWatcher.Events: @@ -93,14 +88,6 @@ func (w *Watcher) Start(stopCh <-chan struct{}) error { } continue case <-stopCh: - // In case of plugin watcher being stopped by plugin manager, stop - // probing the creation/deletion of plugin sockets. - // Also give all pending go routines a chance to complete - select { - case <-w.stopped: - case <-time.After(11 * time.Second): - klog.Errorf("timeout on stopping watcher") - } w.fsWatcher.Close() return } @@ -123,6 +110,12 @@ func (w *Watcher) init() error { // Walks through the plugin directory discover any existing plugin sockets. // Ignore all errors except root dir not being walkable func (w *Watcher) traversePluginDir(dir string) error { + // watch the new dir + err := w.fsWatcher.Add(dir) + if err != nil { + return fmt.Errorf("failed to watch %s, err: %v", w.path, err) + } + // traverse existing children in the dir return w.fs.Walk(dir, func(path string, info os.FileInfo, err error) error { if err != nil { if path == dir { @@ -133,6 +126,11 @@ func (w *Watcher) traversePluginDir(dir string) error { return nil } + // do not call fsWatcher.Add twice on the root dir to avoid potential problems. + if path == dir { + return nil + } + switch mode := info.Mode(); { case mode.IsDir(): if err := w.fsWatcher.Add(path); err != nil { @@ -191,7 +189,6 @@ func (w *Watcher) handlePluginRegistration(socketPath string) error { if runtime.GOOS == "windows" { socketPath = util.NormalizePath(socketPath) } - //TODO: Implement rate limiting to mitigate any DOS kind of attacks. // Update desired state of world list of plugins // If the socket path does exist in the desired world cache, there's still // a possibility that it has been deleted and recreated again before it is diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/reconciler/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/reconciler/BUILD index 969fe326640..d4f4962f9f7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/reconciler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/reconciler/BUILD @@ -11,7 +11,7 @@ go_library( "//pkg/util/goroutinemap:go_default_library", "//pkg/util/goroutinemap/exponentialbackoff:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/reconciler/reconciler.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/reconciler/reconciler.go index 11d02116be2..bd43f295d8a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/reconciler/reconciler.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/reconciler/reconciler.go @@ -24,7 +24,7 @@ import ( "time" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/operationexecutor" "k8s.io/kubernetes/pkg/util/goroutinemap" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/BUILD index 49a0baa8fc3..78a3b0f4632 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/BUILD @@ -14,8 +14,6 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/kubelet/pod", deps = [ - "//pkg/kubelet/checkpoint:go_default_library", - "//pkg/kubelet/checkpointmanager:go_default_library", "//pkg/kubelet/configmap:go_default_library", "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/secret:go_default_library", @@ -25,7 +23,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/mirror_client.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/mirror_client.go index 3ead280e658..6cfa476bda2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/mirror_client.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/mirror_client.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" clientset "k8s.io/client-go/kubernetes" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go index 98f8f00f74f..215a7a155d6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go @@ -19,12 +19,8 @@ package pod import ( "sync" - "k8s.io/klog" - "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/kubernetes/pkg/kubelet/checkpoint" - "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" "k8s.io/kubernetes/pkg/kubelet/configmap" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/secret" @@ -77,10 +73,8 @@ type Manager interface { // this means deleting the mappings related to mirror pods. For non- // mirror pods, this means deleting from indexes for all non-mirror pods. DeletePod(pod *v1.Pod) - // DeleteOrphanedMirrorPods deletes all mirror pods which do not have - // associated static pods. This method sends deletion requests to the API - // server, but does NOT modify the internal pod storage in basicManager. - DeleteOrphanedMirrorPods() + // GetOrphanedMirrorPodNames returns names of orphaned mirror pods + GetOrphanedMirrorPodNames() []string // TranslatePodUID returns the actual UID of a pod. If the UID belongs to // a mirror pod, returns the UID of its static pod. Otherwise, returns the // original UID. @@ -120,20 +114,18 @@ type basicManager struct { translationByUID map[kubetypes.MirrorPodUID]kubetypes.ResolvedPodUID // basicManager is keeping secretManager and configMapManager up-to-date. - secretManager secret.Manager - configMapManager configmap.Manager - checkpointManager checkpointmanager.CheckpointManager + secretManager secret.Manager + configMapManager configmap.Manager // A mirror pod client to create/delete mirror pods. MirrorClient } // NewBasicPodManager returns a functional Manager. -func NewBasicPodManager(client MirrorClient, secretManager secret.Manager, configMapManager configmap.Manager, cpm checkpointmanager.CheckpointManager) Manager { +func NewBasicPodManager(client MirrorClient, secretManager secret.Manager, configMapManager configmap.Manager) Manager { pm := &basicManager{} pm.secretManager = secretManager pm.configMapManager = configMapManager - pm.checkpointManager = cpm pm.MirrorClient = client pm.SetPods(nil) return pm @@ -161,11 +153,6 @@ func (pm *basicManager) UpdatePod(pod *v1.Pod) { pm.lock.Lock() defer pm.lock.Unlock() pm.updatePodsInternal(pod) - if pm.checkpointManager != nil { - if err := checkpoint.WritePod(pm.checkpointManager, pod); err != nil { - klog.Errorf("Error writing checkpoint for pod: %v", pod.GetName()) - } - } } func isPodInTerminatedState(pod *v1.Pod) bool { @@ -244,11 +231,6 @@ func (pm *basicManager) DeletePod(pod *v1.Pod) { delete(pm.podByUID, kubetypes.ResolvedPodUID(pod.UID)) delete(pm.podByFullName, podFullName) } - if pm.checkpointManager != nil { - if err := checkpoint.DeletePod(pm.checkpointManager, pod); err != nil { - klog.Errorf("Error deleting checkpoint for pod: %v", pod.GetName()) - } - } } func (pm *basicManager) GetPods() []*v1.Pod { @@ -323,7 +305,7 @@ func (pm *basicManager) GetUIDTranslations() (podToMirror map[kubetypes.Resolved return podToMirror, mirrorToPod } -func (pm *basicManager) getOrphanedMirrorPodNames() []string { +func (pm *basicManager) GetOrphanedMirrorPodNames() []string { pm.lock.RLock() defer pm.lock.RUnlock() var podFullNames []string @@ -335,13 +317,6 @@ func (pm *basicManager) getOrphanedMirrorPodNames() []string { return podFullNames } -func (pm *basicManager) DeleteOrphanedMirrorPods() { - podFullNames := pm.getOrphanedMirrorPodNames() - for _, podFullName := range podFullNames { - pm.MirrorClient.DeleteMirrorPod(podFullName, nil) - } -} - func (pm *basicManager) IsMirrorPodOf(mirrorPod, pod *v1.Pod) bool { // Check name and namespace first. if pod.Name != mirrorPod.Name || pod.Namespace != mirrorPod.Namespace { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor.go index 1da02a0bdf6..4000cfb9c18 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_container_deletor.go @@ -20,7 +20,7 @@ import ( "sort" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) @@ -30,7 +30,7 @@ const ( containerDeletorBufferLimit = 50 ) -type containerStatusbyCreatedList []*kubecontainer.ContainerStatus +type containerStatusbyCreatedList []*kubecontainer.Status type podContainerDeletor struct { worker chan<- kubecontainer.ContainerID @@ -48,7 +48,9 @@ func newPodContainerDeletor(runtime kubecontainer.Runtime, containersToKeep int) go wait.Until(func() { for { id := <-buffer - runtime.DeleteContainer(id) + if err := runtime.DeleteContainer(id); err != nil { + klog.Warningf("[pod_container_deletor] DeleteContainer returned error for (id=%v): %v", id, err) + } } }, 0, wait.NeverStop) @@ -61,7 +63,7 @@ func newPodContainerDeletor(runtime kubecontainer.Runtime, containersToKeep int) // getContainersToDeleteInPod returns the exited containers in a pod whose name matches the name inferred from filterContainerId (if not empty), ordered by the creation time from the latest to the earliest. // If filterContainerID is empty, all dead containers in the pod are returned. func getContainersToDeleteInPod(filterContainerID string, podStatus *kubecontainer.PodStatus, containersToKeep int) containerStatusbyCreatedList { - matchedContainer := func(filterContainerId string, podStatus *kubecontainer.PodStatus) *kubecontainer.ContainerStatus { + matchedContainer := func(filterContainerId string, podStatus *kubecontainer.PodStatus) *kubecontainer.Status { if filterContainerId == "" { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go index 29dbe8ef5fd..2fecf534b71 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/record" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/eviction" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/preemption/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/preemption/BUILD index 30fd520efcb..96671988d05 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/preemption/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/preemption/BUILD @@ -21,7 +21,7 @@ go_library( "//pkg/kubelet/util/format:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/preemption/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/preemption/OWNERS deleted file mode 100644 index 0fcf4abf564..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/preemption/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -approvers: -- sjenning diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/preemption/preemption.go b/vendor/k8s.io/kubernetes/pkg/kubelet/preemption/preemption.go index cee1f96a399..04db4ae0dc1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/preemption/preemption.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/preemption/preemption.go @@ -22,7 +22,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/client-go/tools/record" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/api/v1/resource" v1qos "k8s.io/kubernetes/pkg/apis/core/v1/helper/qos" "k8s.io/kubernetes/pkg/kubelet/events" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/BUILD index 516e70996b5..3e7e315acf2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/BUILD @@ -35,7 +35,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) @@ -71,7 +71,7 @@ go_test( "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/OWNERS similarity index 65% rename from vendor/k8s.io/kubernetes/pkg/kubelet/eviction/OWNERS rename to vendor/k8s.io/kubernetes/pkg/kubelet/prober/OWNERS index 0fcf4abf564..9faddd8e7eb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/OWNERS @@ -1,4 +1,5 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sjenning +- tallclair +- sig-node-approvers diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober.go b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober.go index 5ac781d0b2e..713adf3cd0e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober.go @@ -39,7 +39,7 @@ import ( tcpprobe "k8s.io/kubernetes/pkg/probe/tcp" "k8s.io/utils/exec" - "k8s.io/klog" + "k8s.io/klog/v2" ) const maxProbeRetries = 3 @@ -47,24 +47,22 @@ const maxProbeRetries = 3 // Prober helps to check the liveness/readiness/startup of a container. type prober struct { exec execprobe.Prober - // probe types needs different httprobe instances so they don't - // share a connection pool which can cause collsions to the + // probe types needs different httpprobe instances so they don't + // share a connection pool which can cause collisions to the // same host:port and transient failures. See #49740. readinessHTTP httpprobe.Prober livenessHTTP httpprobe.Prober startupHTTP httpprobe.Prober tcp tcpprobe.Prober - runner kubecontainer.ContainerCommandRunner + runner kubecontainer.CommandRunner - refManager *kubecontainer.RefManager - recorder record.EventRecorder + recorder record.EventRecorder } // NewProber creates a Prober, it takes a command runner and // several container info managers. func newProber( - runner kubecontainer.ContainerCommandRunner, - refManager *kubecontainer.RefManager, + runner kubecontainer.CommandRunner, recorder record.EventRecorder) *prober { const followNonLocalRedirects = false @@ -75,21 +73,16 @@ func newProber( startupHTTP: httpprobe.New(followNonLocalRedirects), tcp: tcpprobe.New(), runner: runner, - refManager: refManager, recorder: recorder, } } // recordContainerEvent should be used by the prober for all container related events. -func (pb *prober) recordContainerEvent(pod *v1.Pod, container *v1.Container, containerID kubecontainer.ContainerID, eventType, reason, message string, args ...interface{}) { - var err error - ref, hasRef := pb.refManager.GetRef(containerID) - if !hasRef { - ref, err = kubecontainer.GenerateContainerRef(pod, container) - if err != nil { - klog.Errorf("Can't make a ref to pod %q, container %v: %v", format.Pod(pod), container.Name, err) - return - } +func (pb *prober) recordContainerEvent(pod *v1.Pod, container *v1.Container, eventType, reason, message string, args ...interface{}) { + ref, err := kubecontainer.GenerateContainerRef(pod, container) + if err != nil { + klog.Errorf("Can't make a ref to pod %q, container %v: %v", format.Pod(pod), container.Name, err) + return } pb.recorder.Eventf(ref, eventType, reason, message, args...) } @@ -119,15 +112,15 @@ func (pb *prober) probe(probeType probeType, pod *v1.Pod, status v1.PodStatus, c // Probe failed in one way or another. if err != nil { klog.V(1).Infof("%s probe for %q errored: %v", probeType, ctrName, err) - pb.recordContainerEvent(pod, &container, containerID, v1.EventTypeWarning, events.ContainerUnhealthy, "%s probe errored: %v", probeType, err) + pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, events.ContainerUnhealthy, "%s probe errored: %v", probeType, err) } else { // result != probe.Success klog.V(1).Infof("%s probe for %q failed (%v): %s", probeType, ctrName, result, output) - pb.recordContainerEvent(pod, &container, containerID, v1.EventTypeWarning, events.ContainerUnhealthy, "%s probe failed: %v", probeType, output) + pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, events.ContainerUnhealthy, "%s probe failed: %s", probeType, output) } return results.Failure, err } if result == probe.Warning { - pb.recordContainerEvent(pod, &container, containerID, v1.EventTypeWarning, events.ContainerProbeWarning, "%s probe warning: %v", probeType, output) + pb.recordContainerEvent(pod, &container, v1.EventTypeWarning, events.ContainerProbeWarning, "%s probe warning: %s", probeType, output) klog.V(3).Infof("%s probe for %q succeeded with a warning: %s", probeType, ctrName, output) } else { klog.V(3).Infof("%s probe for %q succeeded", probeType, ctrName) @@ -163,7 +156,7 @@ func buildHeader(headerList []v1.HTTPHeader) http.Header { func (pb *prober) runProbe(probeType probeType, p *v1.Probe, pod *v1.Pod, status v1.PodStatus, container v1.Container, containerID kubecontainer.ContainerID) (probe.Result, string, error) { timeout := time.Duration(p.TimeoutSeconds) * time.Second if p.Exec != nil { - klog.V(4).Infof("Exec-Probe Pod: %v, Container: %v, Command: %v", pod, container, p.Exec.Command) + klog.V(4).Infof("Exec-Probe Pod: %v, Container: %v, Command: %v", pod.Name, container.Name, p.Exec.Command) command := kubecontainer.ExpandContainerCommandOnlyStatic(p.Exec.Command, container.Env) return pb.exec.Probe(pb.newExecInContainer(container, containerID, command, timeout)) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober_manager.go index e108ec27db2..7777830e297 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober_manager.go @@ -26,7 +26,7 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/tools/record" "k8s.io/component-base/metrics" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/prober/results" @@ -103,11 +103,10 @@ func NewManager( statusManager status.Manager, livenessManager results.Manager, startupManager results.Manager, - runner kubecontainer.ContainerCommandRunner, - refManager *kubecontainer.RefManager, + runner kubecontainer.CommandRunner, recorder record.EventRecorder) Manager { - prober := newProber(runner, refManager, recorder) + prober := newProber(runner, recorder) readinessManager := results.NewManager() return &manager{ statusManager: statusManager, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/worker.go b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/worker.go index a7882d72c59..1efffe5888f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/worker.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/worker.go @@ -23,7 +23,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/component-base/metrics" - "k8s.io/klog" + "k8s.io/klog/v2" podutil "k8s.io/kubernetes/pkg/api/v1/pod" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/prober/results" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/qos/doc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/qos/doc.go index 6210ed45e48..ed440f5984b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/qos/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/qos/doc.go @@ -18,8 +18,8 @@ limitations under the License. // For each resource (memory, CPU) Kubelet supports three classes of containers. // Memory guaranteed containers will receive the highest priority and will get all the resources // they need. -// Burstable containers will be guaranteed their request and can “burst” and use more resources +// Burstable containers will be guaranteed their request and can "burst" and use more resources // when available. -// Best-Effort containers, which don’t specify a request, can use resources only if not being used +// Best-Effort containers, which don't specify a request, can use resources only if not being used // by other pods. package qos // import "k8s.io/kubernetes/pkg/kubelet/qos" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go b/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go index f4f28a87fca..1da9c225186 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go @@ -22,7 +22,7 @@ import ( "time" "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/format" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/runtime.go b/vendor/k8s.io/kubernetes/pkg/kubelet/runtime.go index 37eb446ccee..9ee5ece1ff4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/runtime.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/runtime.go @@ -128,9 +128,7 @@ func (s *runtimeState) storageErrors() error { return utilerrors.NewAggregate(errs) } -func newRuntimeState( - runtimeSyncThreshold time.Duration, -) *runtimeState { +func newRuntimeState(runtimeSyncThreshold time.Duration) *runtimeState { return &runtimeState{ lastBaseRuntimeSync: time.Time{}, baseRuntimeSyncThreshold: runtimeSyncThreshold, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/server/BUILD index a18f1b5e83b..29fad991b98 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/BUILD @@ -18,20 +18,20 @@ go_library( "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/core:go_default_library", "//pkg/apis/core/v1/validation:go_default_library", + "//pkg/features:go_default_library", "//pkg/kubelet/apis/podresources:go_default_library", "//pkg/kubelet/apis/podresources/v1alpha1:go_default_library", "//pkg/kubelet/apis/resourcemetrics/v1alpha1:go_default_library", "//pkg/kubelet/container:go_default_library", + "//pkg/kubelet/cri/streaming:go_default_library", + "//pkg/kubelet/cri/streaming/portforward:go_default_library", + "//pkg/kubelet/cri/streaming/remotecommand:go_default_library", "//pkg/kubelet/metrics/collectors:go_default_library", "//pkg/kubelet/prober:go_default_library", "//pkg/kubelet/server/metrics:go_default_library", - "//pkg/kubelet/server/portforward:go_default_library", - "//pkg/kubelet/server/remotecommand:go_default_library", "//pkg/kubelet/server/stats:go_default_library", - "//pkg/kubelet/server/streaming:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/kubelet/util:go_default_library", - "//pkg/util/configz:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", @@ -39,22 +39,27 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/proxy:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/healthz:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/httplog:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/routes:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/flushwriter:go_default_library", + "//staging/src/k8s.io/component-base/configz:go_default_library", "//staging/src/k8s.io/component-base/logs:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/github.com/emicklei/go-restful:go_default_library", "//vendor/github.com/google/cadvisor/container:go_default_library", "//vendor/github.com/google/cadvisor/info/v1:go_default_library", + "//vendor/github.com/google/cadvisor/info/v2:go_default_library", "//vendor/github.com/google/cadvisor/metrics:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + "//vendor/k8s.io/utils/clock:go_default_library", ], ) @@ -72,10 +77,10 @@ go_test( "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", "//pkg/kubelet/cm:go_default_library", "//pkg/kubelet/container:go_default_library", - "//pkg/kubelet/server/portforward:go_default_library", - "//pkg/kubelet/server/remotecommand:go_default_library", + "//pkg/kubelet/cri/streaming:go_default_library", + "//pkg/kubelet/cri/streaming/portforward:go_default_library", + "//pkg/kubelet/cri/streaming/remotecommand:go_default_library", "//pkg/kubelet/server/stats:go_default_library", - "//pkg/kubelet/server/streaming:go_default_library", "//pkg/volume:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -89,6 +94,7 @@ go_test( "//staging/src/k8s.io/client-go/util/testing:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2:go_default_library", "//vendor/github.com/google/cadvisor/info/v1:go_default_library", + "//vendor/github.com/google/cadvisor/info/v2:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", "//vendor/golang.org/x/net/websocket:go_default_library", @@ -108,10 +114,7 @@ filegroup( srcs = [ ":package-srcs", "//pkg/kubelet/server/metrics:all-srcs", - "//pkg/kubelet/server/portforward:all-srcs", - "//pkg/kubelet/server/remotecommand:all-srcs", "//pkg/kubelet/server/stats:all-srcs", - "//pkg/kubelet/server/streaming:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/server/OWNERS similarity index 72% rename from vendor/k8s.io/kubernetes/pkg/kubelet/metrics/OWNERS rename to vendor/k8s.io/kubernetes/pkg/kubelet/server/OWNERS index 0fcf4abf564..99f049723cc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/OWNERS @@ -1,4 +1,5 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- sjenning +- tallclair +- cheftako diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/auth.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/auth.go index 285c3c4c195..164984a073c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/auth.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/auth.go @@ -24,7 +24,7 @@ import ( "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/klog" + "k8s.io/klog/v2" ) // KubeletAuth implements AuthInterface diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go index 5822b7303b9..d4d2c9245b7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go @@ -35,10 +35,12 @@ import ( "github.com/emicklei/go-restful" cadvisormetrics "github.com/google/cadvisor/container" cadvisorapi "github.com/google/cadvisor/info/v1" + cadvisorv2 "github.com/google/cadvisor/info/v2" "github.com/google/cadvisor/metrics" "google.golang.org/grpc" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/kubelet/metrics/collectors" + "k8s.io/utils/clock" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -47,31 +49,34 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/proxy" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/server/healthz" "k8s.io/apiserver/pkg/server/httplog" "k8s.io/apiserver/pkg/server/routes" + utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/apiserver/pkg/util/flushwriter" + "k8s.io/component-base/configz" "k8s.io/component-base/logs" compbasemetrics "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" "k8s.io/kubernetes/pkg/api/legacyscheme" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/core/v1/validation" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/kubelet/apis/podresources" podresourcesapi "k8s.io/kubernetes/pkg/kubelet/apis/podresources/v1alpha1" "k8s.io/kubernetes/pkg/kubelet/apis/resourcemetrics/v1alpha1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/cri/streaming" + "k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward" + remotecommandserver "k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand" "k8s.io/kubernetes/pkg/kubelet/prober" servermetrics "k8s.io/kubernetes/pkg/kubelet/server/metrics" - "k8s.io/kubernetes/pkg/kubelet/server/portforward" - remotecommandserver "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" "k8s.io/kubernetes/pkg/kubelet/server/stats" - "k8s.io/kubernetes/pkg/kubelet/server/streaming" kubelettypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util" - "k8s.io/kubernetes/pkg/util/configz" ) const ( @@ -89,7 +94,8 @@ type Server struct { auth AuthInterface host HostInterface restfulCont containerInterface - metricsBuckets map[string]bool + metricsBuckets sets.String + metricsMethodBuckets sets.String resourceAnalyzer stats.ResourceAnalyzer redirectContainerStreaming bool } @@ -140,10 +146,11 @@ func ListenAndServeKubeletServer( enableCAdvisorJSONEndpoints, enableDebuggingHandlers, enableContentionProfiling, - redirectContainerStreaming bool, + redirectContainerStreaming, + enableSystemLogHandler bool, criHandler http.Handler) { klog.Infof("Starting to listen on %s:%d", address, port) - handler := NewServer(host, resourceAnalyzer, auth, enableCAdvisorJSONEndpoints, enableDebuggingHandlers, enableContentionProfiling, redirectContainerStreaming, criHandler) + handler := NewServer(host, resourceAnalyzer, auth, enableCAdvisorJSONEndpoints, enableDebuggingHandlers, enableContentionProfiling, redirectContainerStreaming, enableSystemLogHandler, criHandler) s := &http.Server{ Addr: net.JoinHostPort(address.String(), strconv.FormatUint(uint64(port), 10)), Handler: &handler, @@ -165,7 +172,7 @@ func ListenAndServeKubeletServer( // ListenAndServeKubeletReadOnlyServer initializes a server to respond to HTTP network requests on the Kubelet. func ListenAndServeKubeletReadOnlyServer(host HostInterface, resourceAnalyzer stats.ResourceAnalyzer, address net.IP, port uint, enableCAdvisorJSONEndpoints bool) { klog.V(1).Infof("Starting to listen read-only on %s:%d", address, port) - s := NewServer(host, resourceAnalyzer, nil, enableCAdvisorJSONEndpoints, false, false, false, nil) + s := NewServer(host, resourceAnalyzer, nil, enableCAdvisorJSONEndpoints, false, false, false, false, nil) server := &http.Server{ Addr: net.JoinHostPort(address.String(), strconv.FormatUint(uint64(port), 10)), @@ -219,14 +226,16 @@ func NewServer( enableCAdvisorJSONEndpoints, enableDebuggingHandlers, enableContentionProfiling, - redirectContainerStreaming bool, + redirectContainerStreaming, + enableSystemLogHandler bool, criHandler http.Handler) Server { server := Server{ host: host, resourceAnalyzer: resourceAnalyzer, auth: auth, restfulCont: &filteringContainer{Container: restful.NewContainer()}, - metricsBuckets: make(map[string]bool), + metricsBuckets: sets.NewString(), + metricsMethodBuckets: sets.NewString("OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT"), redirectContainerStreaming: redirectContainerStreaming, } if auth != nil { @@ -235,6 +244,9 @@ func NewServer( server.InstallDefaultHandlers(enableCAdvisorJSONEndpoints) if enableDebuggingHandlers { server.InstallDebuggingHandlers(criHandler) + // To maintain backward compatibility serve logs only when enableDebuggingHandlers is also enabled + // see https://github.com/kubernetes/kubernetes/pull/87273 + server.InstallSystemLogHandler(enableSystemLogHandler) if enableContentionProfiling { goruntime.SetBlockProfileRate(1) } @@ -285,16 +297,24 @@ func (s *Server) InstallAuthFilter() { // addMetricsBucketMatcher adds a regexp matcher and the relevant bucket to use when // it matches. Please be aware this is not thread safe and should not be used dynamically func (s *Server) addMetricsBucketMatcher(bucket string) { - s.metricsBuckets[bucket] = true + s.metricsBuckets.Insert(bucket) } // getMetricBucket find the appropriate metrics reporting bucket for the given path func (s *Server) getMetricBucket(path string) string { root := getURLRootPath(path) - if s.metricsBuckets[root] == true { + if s.metricsBuckets.Has(root) { return root } - return "Invalid path" + return "other" +} + +// getMetricMethodBucket checks for unknown or invalid HTTP verbs +func (s *Server) getMetricMethodBucket(method string) string { + if s.metricsMethodBuckets.Has(method) { + return method + } + return "other" } // InstallDefaultHandlers registers the default set of supported HTTP request @@ -332,17 +352,28 @@ func (s *Server) InstallDefaultHandlers(enableCAdvisorJSONEndpoints bool) { r := compbasemetrics.NewKubeRegistry() includedMetrics := cadvisormetrics.MetricSet{ - cadvisormetrics.CpuUsageMetrics: struct{}{}, - cadvisormetrics.MemoryUsageMetrics: struct{}{}, - cadvisormetrics.CpuLoadMetrics: struct{}{}, - cadvisormetrics.DiskIOMetrics: struct{}{}, - cadvisormetrics.DiskUsageMetrics: struct{}{}, - cadvisormetrics.NetworkUsageMetrics: struct{}{}, - cadvisormetrics.AcceleratorUsageMetrics: struct{}{}, - cadvisormetrics.AppMetrics: struct{}{}, - cadvisormetrics.ProcessMetrics: struct{}{}, + cadvisormetrics.CpuUsageMetrics: struct{}{}, + cadvisormetrics.MemoryUsageMetrics: struct{}{}, + cadvisormetrics.CpuLoadMetrics: struct{}{}, + cadvisormetrics.DiskIOMetrics: struct{}{}, + cadvisormetrics.DiskUsageMetrics: struct{}{}, + cadvisormetrics.NetworkUsageMetrics: struct{}{}, + cadvisormetrics.AppMetrics: struct{}{}, + cadvisormetrics.ProcessMetrics: struct{}{}, } - r.RawMustRegister(metrics.NewPrometheusCollector(prometheusHostAdapter{s.host}, containerPrometheusLabelsFunc(s.host), includedMetrics)) + + // Only add the Accelerator metrics if the feature is inactive + // Note: Accelerator metrics will be removed in the future, hence the feature gate. + if !utilfeature.DefaultFeatureGate.Enabled(features.DisableAcceleratorUsageMetrics) { + includedMetrics.Add(cadvisormetrics.MetricKind(cadvisormetrics.AcceleratorUsageMetrics)) + } + + cadvisorOpts := cadvisorv2.RequestOptions{ + IdType: cadvisorv2.TypeName, + Count: 1, + Recursive: true, + } + r.RawMustRegister(metrics.NewPrometheusCollector(prometheusHostAdapter{s.host}, containerPrometheusLabelsFunc(s.host), includedMetrics, clock.RealClock{}, cadvisorOpts)) s.restfulCont.Handle(cadvisorMetricsPath, compbasemetrics.HandlerFor(r, compbasemetrics.HandlerOpts{ErrorHandling: compbasemetrics.ContinueOnError}), ) @@ -350,7 +381,7 @@ func (s *Server) InstallDefaultHandlers(enableCAdvisorJSONEndpoints bool) { // deprecated endpoint which will be removed in release 1.20.0+. s.addMetricsBucketMatcher("metrics/resource/v1alpha1") v1alpha1ResourceRegistry := compbasemetrics.NewKubeRegistry() - v1alpha1ResourceRegistry.CustomMustRegister(stats.NewPrometheusResourceMetricCollector(s.resourceAnalyzer, v1alpha1.Config())) + v1alpha1ResourceRegistry.CustomMustRegister(stats.NewPrometheusResourceMetricCollector(s.resourceAnalyzer, stats.Config())) s.restfulCont.Handle(path.Join(resourceMetricsPath, v1alpha1.Version), compbasemetrics.HandlerFor(v1alpha1ResourceRegistry, compbasemetrics.HandlerOpts{ErrorHandling: compbasemetrics.ContinueOnError}), ) @@ -458,19 +489,6 @@ func (s *Server) InstallDebuggingHandlers(criHandler http.Handler) { Operation("getPortForward")) s.restfulCont.Add(ws) - s.addMetricsBucketMatcher("logs") - ws = new(restful.WebService) - ws. - Path(logsPath) - ws.Route(ws.GET(""). - To(s.getLogs). - Operation("getLogs")) - ws.Route(ws.GET("/{logpath:*}"). - To(s.getLogs). - Operation("getLogs"). - Param(ws.PathParameter("logpath", "path to the log").DataType("string"))) - s.restfulCont.Add(ws) - s.addMetricsBucketMatcher("containerLogs") ws = new(restful.WebService) ws. @@ -549,6 +567,28 @@ func (s *Server) InstallDebuggingDisabledHandlers() { } } +// InstallSystemLogHandler registers the HTTP request patterns for logs endpoint. +func (s *Server) InstallSystemLogHandler(enableSystemLogHandler bool) { + s.addMetricsBucketMatcher("logs") + if enableSystemLogHandler { + ws := new(restful.WebService) + ws.Path(logsPath) + ws.Route(ws.GET(""). + To(s.getLogs). + Operation("getLogs")) + ws.Route(ws.GET("/{logpath:*}"). + To(s.getLogs). + Operation("getLogs"). + Param(ws.PathParameter("logpath", "path to the log").DataType("string"))) + s.restfulCont.Add(ws) + } else { + h := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Error(w, "logs endpoint is disabled.", http.StatusMethodNotAllowed) + }) + s.restfulCont.Handle(logsPath, h) + } +} + // Checks if kubelet's sync loop that updates containers is working. func (s *Server) syncLoopHealthCheck(req *http.Request) error { duration := s.host.ResyncInterval() * 2 @@ -908,7 +948,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) { serverType = "readwrite" } - method, path := req.Method, s.getMetricBucket(req.URL.Path) + method, path := s.getMetricMethodBucket(req.Method), s.getMetricBucket(req.URL.Path) longRunning := strconv.FormatBool(isLongRunningRequest(path)) @@ -929,13 +969,8 @@ type prometheusHostAdapter struct { host HostInterface } -func (a prometheusHostAdapter) SubcontainersInfo(containerName string, query *cadvisorapi.ContainerInfoRequest) ([]*cadvisorapi.ContainerInfo, error) { - all, err := a.host.GetRawContainerInfo(containerName, query, true) - items := make([]*cadvisorapi.ContainerInfo, 0, len(all)) - for _, v := range all { - items = append(items, v) - } - return items, err +func (a prometheusHostAdapter) GetRequestedContainersInfo(containerName string, options cadvisorv2.RequestOptions) (map[string]*cadvisorapi.ContainerInfo, error) { + return a.host.GetRequestedContainersInfo(containerName, options) } func (a prometheusHostAdapter) GetVersionInfo() (*cadvisorapi.VersionInfo, error) { return a.host.GetVersionInfo() diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/BUILD index 878382309f3..401de4ab181 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/BUILD @@ -29,7 +29,9 @@ go_library( "//staging/src/k8s.io/component-base/metrics:go_default_library", "//vendor/github.com/emicklei/go-restful:go_default_library", "//vendor/github.com/google/cadvisor/info/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/github.com/google/cadvisor/info/v2:go_default_library", + "//vendor/github.com/pkg/errors:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -49,11 +51,14 @@ go_test( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/testutil:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/mock:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//pkg/kubelet/cm:go_default_library", + "//vendor/github.com/google/gofuzz:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//pkg/kubelet/cm:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", @@ -70,10 +75,18 @@ go_test( "//pkg/kubelet/cm:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/kubelet/cm:go_default_library", + "//vendor/github.com/google/gofuzz:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/cm:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//pkg/kubelet/cm:go_default_library", + "//vendor/github.com/google/gofuzz:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//pkg/kubelet/cm:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/fs_resource_analyzer.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/fs_resource_analyzer.go index b09eafc1bb3..cf93ece833c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/fs_resource_analyzer.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/fs_resource_analyzer.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" ) type statCache map[types.UID]*volumeStatCalculator diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/handler.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/handler.go index c6dd5a0c569..7a5c165ef32 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/handler.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/handler.go @@ -26,7 +26,9 @@ import ( restful "github.com/emicklei/go-restful" cadvisorapi "github.com/google/cadvisor/info/v1" - "k8s.io/klog" + cadvisorv2 "github.com/google/cadvisor/info/v2" + "github.com/pkg/errors" + "k8s.io/klog/v2" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -75,6 +77,9 @@ type Provider interface { // containerName. If subcontainers is true, this function will return the // information of all the sub-containers as well. GetRawContainerInfo(containerName string, req *cadvisorapi.ContainerInfoRequest, subcontainers bool) (map[string]*cadvisorapi.ContainerInfo, error) + // GetRequestedContainersInfo returns the information of the container with + // the containerName, and with the specified cAdvisor options. + GetRequestedContainersInfo(containerName string, options cadvisorv2.RequestOptions) (map[string]*cadvisorapi.ContainerInfo, error) // The following information is provided by Kubelet. // @@ -215,13 +220,16 @@ func (h *handler) handleStats(request *restful.Request, response *restful.Respon // If "only_cpu_and_memory" GET param is true then only cpu and memory is returned in response. func (h *handler) handleSummary(request *restful.Request, response *restful.Response) { onlyCPUAndMemory := false - request.Request.ParseForm() + err := request.Request.ParseForm() + if err != nil { + handleError(response, "/stats/summary", errors.Wrapf(err, "parse form failed")) + return + } if onlyCluAndMemoryParam, found := request.Request.Form["only_cpu_and_memory"]; found && len(onlyCluAndMemoryParam) == 1 && onlyCluAndMemoryParam[0] == "true" { onlyCPUAndMemory = true } var summary *statsapi.Summary - var err error if onlyCPUAndMemory { summary, err = h.summaryProvider.GetCPUAndMemoryStats() } else { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/prometheus_resource_metrics.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/prometheus_resource_metrics.go index 7d0c76fc929..cb1500158d1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/prometheus_resource_metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/prometheus_resource_metrics.go @@ -20,10 +20,81 @@ import ( "time" "k8s.io/component-base/metrics" - "k8s.io/klog" + "k8s.io/klog/v2" stats "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1" ) +// This file contains a series of deprecated metrics which we emit them by endpoint `/metrics/resource/v1alpha1`. +// These metrics have been adapted to new endpoint `/metrics/resource` as well as new `Desc`s. +// In general, we don't need to maintain these deprecated metrics any more. +// TODO(RainbowMango): Remove this file in release 1.20.0+. + +var ( + nodeCPUUsageDesc = metrics.NewDesc("node_cpu_usage_seconds_total", + "Cumulative cpu time consumed by the node in core-seconds", + nil, + nil, + metrics.ALPHA, + "1.18.0") + + nodeMemoryUsageDesc = metrics.NewDesc("node_memory_working_set_bytes", + "Current working set of the node in bytes", + nil, + nil, + metrics.ALPHA, + "1.18.0") + + containerCPUUsageDesc = metrics.NewDesc("container_cpu_usage_seconds_total", + "Cumulative cpu time consumed by the container in core-seconds", + []string{"container", "pod", "namespace"}, + nil, + metrics.ALPHA, + "1.18.0") + + containerMemoryUsageDesc = metrics.NewDesc("container_memory_working_set_bytes", + "Current working set of the container in bytes", + []string{"container", "pod", "namespace"}, + nil, + metrics.ALPHA, + "1.18.0") +) + +// getNodeCPUMetrics returns CPU utilization of a node. +func getNodeCPUMetrics(s stats.NodeStats) (*float64, time.Time) { + if s.CPU == nil { + return nil, time.Time{} + } + v := float64(*s.CPU.UsageCoreNanoSeconds) / float64(time.Second) + return &v, s.CPU.Time.Time +} + +// getNodeMemoryMetrics returns memory utilization of a node. +func getNodeMemoryMetrics(s stats.NodeStats) (*float64, time.Time) { + if s.Memory == nil { + return nil, time.Time{} + } + v := float64(*s.Memory.WorkingSetBytes) + return &v, s.Memory.Time.Time +} + +// getContainerCPUMetrics returns CPU utilization of a container. +func getContainerCPUMetrics(s stats.ContainerStats) (*float64, time.Time) { + if s.CPU == nil { + return nil, time.Time{} + } + v := float64(*s.CPU.UsageCoreNanoSeconds) / float64(time.Second) + return &v, s.CPU.Time.Time +} + +// getContainerMemoryMetrics returns memory utilization of a container. +func getContainerMemoryMetrics(s stats.ContainerStats) (*float64, time.Time) { + if s.Memory == nil { + return nil, time.Time{} + } + v := float64(*s.Memory.WorkingSetBytes) + return &v, s.Memory.Time.Time +} + // NodeResourceMetric describes a metric for the node type NodeResourceMetric struct { Desc *metrics.Desc @@ -50,6 +121,32 @@ type ResourceMetricsConfig struct { ContainerMetrics []ContainerResourceMetric } +// Config is the v1alpha1 resource metrics definition +func Config() ResourceMetricsConfig { + return ResourceMetricsConfig{ + NodeMetrics: []NodeResourceMetric{ + { + Desc: nodeCPUUsageDesc, + ValueFn: getNodeCPUMetrics, + }, + { + Desc: nodeMemoryUsageDesc, + ValueFn: getNodeMemoryMetrics, + }, + }, + ContainerMetrics: []ContainerResourceMetric{ + { + Desc: containerCPUUsageDesc, + ValueFn: getContainerCPUMetrics, + }, + { + Desc: containerMemoryUsageDesc, + ValueFn: getContainerMemoryMetrics, + }, + }, + } +} + // NewPrometheusResourceMetricCollector returns a metrics.StableCollector which exports resource metrics func NewPrometheusResourceMetricCollector(provider SummaryProvider, config ResourceMetricsConfig) metrics.StableCollector { return &resourceMetricCollector{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/summary.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/summary.go index ac7c04c6283..edf69fc7a8f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/summary.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/summary.go @@ -19,7 +19,7 @@ package stats import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" statsapi "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/summary_sys_containers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/summary_sys_containers.go index 4526f2a7695..40e794a79f0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/summary_sys_containers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/summary_sys_containers.go @@ -19,7 +19,7 @@ limitations under the License. package stats import ( - "k8s.io/klog" + "k8s.io/klog/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" statsapi "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/volume_stat_calculator.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/volume_stat_calculator.go index 2b474c70fc7..f0e3e993d94 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/volume_stat_calculator.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/volume_stat_calculator.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/util/format" "k8s.io/kubernetes/pkg/volume" - "k8s.io/klog" + "k8s.io/klog/v2" ) // volumeStatCalculator calculates volume metrics for a given pod periodically in the background and caches the result diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/BUILD index 8fad51f373a..0ad89ab92ce 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/BUILD @@ -33,7 +33,7 @@ go_library( "//vendor/github.com/google/cadvisor/fs:go_default_library", "//vendor/github.com/google/cadvisor/info/v1:go_default_library", "//vendor/github.com/google/cadvisor/info/v2:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:windows": [ "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cadvisor_stats_provider.go b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cadvisor_stats_provider.go index 49ab4985f18..7fd131abc80 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cadvisor_stats_provider.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cadvisor_stats_provider.go @@ -23,7 +23,7 @@ import ( "strings" cadvisorapiv2 "github.com/google/cadvisor/info/v2" - "k8s.io/klog" + "k8s.io/klog/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -120,7 +120,7 @@ func (p *cadvisorStatsProvider) ListPodStats() ([]statsapi.PodStats, error) { if containerName == leaky.PodInfraContainerName { // Special case for infrastructure container which is hidden from // the user and has network stats. - podStats.Network = cadvisorInfoToNetworkStats("pod:"+ref.Namespace+"_"+ref.Name, &cinfo) + podStats.Network = cadvisorInfoToNetworkStats(&cinfo) } else { podStats.Containers = append(podStats.Containers, *cadvisorInfoToContainerStats(containerName, &cinfo, &rootFsInfo, &imageFsInfo)) } @@ -135,7 +135,7 @@ func (p *cadvisorStatsProvider) ListPodStats() ([]statsapi.PodStats, error) { if vstats, found := p.resourceAnalyzer.GetPodVolumeStats(podUID); found { ephemeralStats = make([]statsapi.VolumeStats, len(vstats.EphemeralVolumes)) copy(ephemeralStats, vstats.EphemeralVolumes) - podStats.VolumeStats = append(vstats.EphemeralVolumes, vstats.PersistentVolumes...) + podStats.VolumeStats = append(append([]statsapi.VolumeStats{}, vstats.EphemeralVolumes...), vstats.PersistentVolumes...) } podStats.EphemeralStorage = calcEphemeralStorage(podStats.Containers, ephemeralStats, &rootFsInfo, nil, false) // Lookup the pod-level cgroup's CPU and memory stats @@ -144,6 +144,7 @@ func (p *cadvisorStatsProvider) ListPodStats() ([]statsapi.PodStats, error) { cpu, memory := cadvisorInfoToCPUandMemoryStats(podInfo) podStats.CPU = cpu podStats.Memory = memory + podStats.ProcessStats = cadvisorInfoToProcessStats(podInfo) } status, found := p.statusProvider.GetPodStatus(podUID) @@ -289,8 +290,14 @@ func isPodManagedContainer(cinfo *cadvisorapiv2.ContainerInfo) bool { // getCadvisorPodInfoFromPodUID returns a pod cgroup information by matching the podUID with its CgroupName identifier base name func getCadvisorPodInfoFromPodUID(podUID types.UID, infos map[string]cadvisorapiv2.ContainerInfo) *cadvisorapiv2.ContainerInfo { for key, info := range infos { - // Take last component only. - key = path.Base(key) + if cm.IsSystemdStyleName(key) { + // Convert to internal cgroup name and take the last component only. + internalCgroupName := cm.ParseSystemdToCgroupName(key) + key = internalCgroupName[len(internalCgroupName)-1] + } else { + // Take last component only. + key = path.Base(key) + } if cm.GetPodCgroupNameSuffix(podUID) == key { return &info } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cri_stats_provider.go b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cri_stats_provider.go index 737ae59844e..6027f7095d6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cri_stats_provider.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cri_stats_provider.go @@ -32,7 +32,7 @@ import ( "k8s.io/apimachinery/pkg/types" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" - "k8s.io/klog" + "k8s.io/klog/v2" statsapi "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1" "k8s.io/kubernetes/pkg/kubelet/cadvisor" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -199,6 +199,7 @@ func (p *criStatsProvider) listPodStats(updateCPUNanoCoreUsage bool) ([]statsapi cs := p.makeContainerStats(stats, container, &rootFsInfo, fsIDtoInfo, podSandbox.GetMetadata(), updateCPUNanoCoreUsage) p.addPodNetworkStats(ps, podSandboxID, caInfos, cs, containerNetworkStats[podSandboxID]) p.addPodCPUMemoryStats(ps, types.UID(podSandbox.Metadata.Uid), allInfos, cs) + p.addProcessStats(ps, types.UID(podSandbox.Metadata.Uid), allInfos, cs) // If cadvisor stats is available for the container, use it to populate // container stats @@ -411,7 +412,7 @@ func (p *criStatsProvider) makePodStorageStats(s *statsapi.PodStats, rootFsInfo } ephemeralStats := make([]statsapi.VolumeStats, len(vstats.EphemeralVolumes)) copy(ephemeralStats, vstats.EphemeralVolumes) - s.VolumeStats = append(vstats.EphemeralVolumes, vstats.PersistentVolumes...) + s.VolumeStats = append(append([]statsapi.VolumeStats{}, vstats.EphemeralVolumes...), vstats.PersistentVolumes...) s.EphemeralStorage = calcEphemeralStorage(s.Containers, ephemeralStats, rootFsInfo, logStats, true) } @@ -425,7 +426,7 @@ func (p *criStatsProvider) addPodNetworkStats( caPodSandbox, found := caInfos[podSandboxID] // try get network stats from cadvisor first. if found { - networkStats := cadvisorInfoToNetworkStats(ps.PodRef.Name, &caPodSandbox) + networkStats := cadvisorInfoToNetworkStats(&caPodSandbox) if networkStats != nil { ps.Network = networkStats return @@ -491,6 +492,20 @@ func (p *criStatsProvider) addPodCPUMemoryStats( } } +func (p *criStatsProvider) addProcessStats( + ps *statsapi.PodStats, + podUID types.UID, + allInfos map[string]cadvisorapiv2.ContainerInfo, + cs *statsapi.ContainerStats, +) { + // try get process stats from cadvisor only. + info := getCadvisorPodInfoFromPodUID(podUID, allInfos) + if info != nil { + ps.ProcessStats = cadvisorInfoToProcessStats(info) + return + } +} + func (p *criStatsProvider) makeContainerStats( stats *runtimeapi.ContainerStats, container *runtimeapi.Container, @@ -685,6 +700,7 @@ func (p *criStatsProvider) cleanupOutdatedCaches() { for k, v := range p.cpuUsageCache { if v == nil { delete(p.cpuUsageCache, k) + continue } if time.Since(time.Unix(0, v.stats.Timestamp)) > defaultCachePeriod { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cri_stats_provider_windows.go b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cri_stats_provider_windows.go index d1892e92998..0b38c69a6f0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cri_stats_provider_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/cri_stats_provider_windows.go @@ -26,7 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/klog" + "k8s.io/klog/v2" statsapi "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/helper.go b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/helper.go index 2c8a78c9362..e34d9d5ca8c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/helper.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/helper.go @@ -23,7 +23,7 @@ import ( cadvisorapiv1 "github.com/google/cadvisor/info/v1" cadvisorapiv2 "github.com/google/cadvisor/info/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog" + "k8s.io/klog/v2" statsapi "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1" "k8s.io/kubernetes/pkg/kubelet/cadvisor" ) @@ -153,9 +153,18 @@ func cadvisorInfoToContainerCPUAndMemoryStats(name string, info *cadvisorapiv2.C return result } +func cadvisorInfoToProcessStats(info *cadvisorapiv2.ContainerInfo) *statsapi.ProcessStats { + cstat, found := latestContainerStats(info) + if !found || cstat.Processes == nil { + return nil + } + num := cstat.Processes.ProcessCount + return &statsapi.ProcessStats{ProcessCount: uint64Ptr(num)} +} + // cadvisorInfoToNetworkStats returns the statsapi.NetworkStats converted from // the container info from cadvisor. -func cadvisorInfoToNetworkStats(name string, info *cadvisorapiv2.ContainerInfo) *statsapi.NetworkStats { +func cadvisorInfoToNetworkStats(info *cadvisorapiv2.ContainerInfo) *statsapi.NetworkStats { if !info.Spec.HasNetwork { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/pidlimit/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/pidlimit/BUILD index ce128b9e8e5..5317dfd86db 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/pidlimit/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/pidlimit/BUILD @@ -12,6 +12,9 @@ go_library( deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -25,9 +28,15 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//pkg/kubelet/apis/stats/v1alpha1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/stats_provider.go b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/stats_provider.go index b33ce5cd609..3b0f8542c85 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/stats/stats_provider.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/stats/stats_provider.go @@ -114,7 +114,7 @@ func (p *StatsProvider) GetCgroupStats(cgroupName string, updateStats bool) (*st } // Rootfs and imagefs doesn't make sense for raw cgroup. s := cadvisorInfoToContainerStats(cgroupName, info, nil, nil) - n := cadvisorInfoToNetworkStats(cgroupName, info) + n := cadvisorInfoToNetworkStats(info) return s, n, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/status/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/status/BUILD index 314a4065555..0bb5d3f162f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/status/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/status/BUILD @@ -28,7 +28,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go index 9ca4a49ebcf..e4c30ffbfd9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go @@ -32,7 +32,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" podutil "k8s.io/kubernetes/pkg/api/v1/pod" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubepod "k8s.io/kubernetes/pkg/kubelet/pod" @@ -189,12 +189,6 @@ func (m *manager) SetPodStatus(pod *v1.Pod, status v1.PodStatus) { m.podStatusesLock.Lock() defer m.podStatusesLock.Unlock() - for _, c := range pod.Status.Conditions { - if !kubetypes.PodConditionByKubelet(c.Type) { - klog.Errorf("Kubelet is trying to update pod condition %q for pod %q. "+ - "But it is not owned by kubelet.", string(c.Type), format.Pod(pod)) - } - } // Make sure we're caching a deep copy. status = *status.DeepCopy() diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/sysctl/namespace.go b/vendor/k8s.io/kubernetes/pkg/kubelet/sysctl/namespace.go index 1619998f3f8..c1c93ed5f8b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/sysctl/namespace.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/sysctl/namespace.go @@ -25,28 +25,28 @@ type Namespace string const ( // the Linux IPC namespace - IpcNamespace = Namespace("ipc") + ipcNamespace = Namespace("ipc") // the network namespace - NetNamespace = Namespace("net") + netNamespace = Namespace("net") // the zero value if no namespace is known - UnknownNamespace = Namespace("") + unknownNamespace = Namespace("") ) var namespaces = map[string]Namespace{ - "kernel.sem": IpcNamespace, + "kernel.sem": ipcNamespace, } var prefixNamespaces = map[string]Namespace{ - "kernel.shm": IpcNamespace, - "kernel.msg": IpcNamespace, - "fs.mqueue.": IpcNamespace, - "net.": NetNamespace, + "kernel.shm": ipcNamespace, + "kernel.msg": ipcNamespace, + "fs.mqueue.": ipcNamespace, + "net.": netNamespace, } // NamespacedBy returns the namespace of the Linux kernel for a sysctl, or -// UnknownNamespace if the sysctl is not known to be namespaced. +// unknownNamespace if the sysctl is not known to be namespaced. func NamespacedBy(val string) Namespace { if ns, found := namespaces[val]; found { return ns @@ -56,5 +56,5 @@ func NamespacedBy(val string) Namespace { return ns } } - return UnknownNamespace + return unknownNamespace } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/sysctl/whitelist.go b/vendor/k8s.io/kubernetes/pkg/kubelet/sysctl/whitelist.go index 067409a7e8f..f259bc1b61c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/sysctl/whitelist.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/sysctl/whitelist.go @@ -58,13 +58,13 @@ func NewWhitelist(patterns []string) (*patternWhitelist, error) { if strings.HasSuffix(s, "*") { prefix := s[:len(s)-1] ns := NamespacedBy(prefix) - if ns == UnknownNamespace { + if ns == unknownNamespace { return nil, fmt.Errorf("the sysctls %q are not known to be namespaced", s) } w.prefixes[prefix] = ns } else { ns := NamespacedBy(s) - if ns == UnknownNamespace { + if ns == unknownNamespace { return nil, fmt.Errorf("the sysctl %q are not known to be namespaced", s) } w.sysctls[s] = ns @@ -83,20 +83,20 @@ func NewWhitelist(patterns []string) (*patternWhitelist, error) { func (w *patternWhitelist) validateSysctl(sysctl string, hostNet, hostIPC bool) error { nsErrorFmt := "%q not allowed with host %s enabled" if ns, found := w.sysctls[sysctl]; found { - if ns == IpcNamespace && hostIPC { + if ns == ipcNamespace && hostIPC { return fmt.Errorf(nsErrorFmt, sysctl, ns) } - if ns == NetNamespace && hostNet { + if ns == netNamespace && hostNet { return fmt.Errorf(nsErrorFmt, sysctl, ns) } return nil } for p, ns := range w.prefixes { if strings.HasPrefix(sysctl, p) { - if ns == IpcNamespace && hostIPC { + if ns == ipcNamespace && hostIPC { return fmt.Errorf(nsErrorFmt, sysctl, ns) } - if ns == NetNamespace && hostNet { + if ns == netNamespace && hostNet { return fmt.Errorf(nsErrorFmt, sysctl, ns) } return nil diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/time_cache.go b/vendor/k8s.io/kubernetes/pkg/kubelet/time_cache.go new file mode 100644 index 00000000000..66528e25729 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/time_cache.go @@ -0,0 +1,67 @@ +/* +Copyright 2020 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 kubelet + +import ( + "sync" + "time" + + "github.com/golang/groupcache/lru" + + "k8s.io/apimachinery/pkg/types" +) + +// timeCache stores a time keyed by uid +type timeCache struct { + lock sync.RWMutex + cache *lru.Cache +} + +// maxTimeCacheEntries is the cache entry number in lru cache. 1000 is a proper number +// for our 100 pods per node target. If we support more pods per node in the future, we +// may want to increase the number. +const maxTimeCacheEntries = 1000 + +func newTimeCache() *timeCache { + return &timeCache{cache: lru.New(maxTimeCacheEntries)} +} + +func (c *timeCache) Add(uid types.UID, t time.Time) { + c.lock.Lock() + defer c.lock.Unlock() + c.cache.Add(uid, t) +} + +func (c *timeCache) Remove(uid types.UID) { + c.lock.Lock() + defer c.lock.Unlock() + c.cache.Remove(uid) +} + +func (c *timeCache) Get(uid types.UID) (time.Time, bool) { + c.lock.RLock() + defer c.lock.RUnlock() + value, ok := c.cache.Get(uid) + if !ok { + return time.Time{}, false + } + t, ok := value.(time.Time) + if !ok { + return time.Time{}, false + } + return t, true +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/token/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/token/BUILD index 6db84d1254a..d317fbe9083 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/token/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/token/BUILD @@ -27,7 +27,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/token/token_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/token/token_manager.go index 72c067f74ac..3eff42b9c9b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/token/token_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/token/token_manager.go @@ -32,7 +32,7 @@ import ( "k8s.io/apimachinery/pkg/util/clock" "k8s.io/apimachinery/pkg/util/wait" clientset "k8s.io/client-go/kubernetes" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -168,7 +168,9 @@ func (m *Manager) expired(t *authenticationv1.TokenRequest) bool { // ttl, or if the token is older than 24 hours. func (m *Manager) requiresRefresh(tr *authenticationv1.TokenRequest) bool { if tr.Spec.ExpirationSeconds == nil { - klog.Errorf("expiration seconds was nil for tr: %#v", tr) + cpy := tr.DeepCopy() + cpy.Status.Token = "" + klog.Errorf("expiration seconds was nil for tr: %#v", cpy) return false } now := m.clock.Now() diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go index d3c06c8e755..8b64ea1de3c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go @@ -48,8 +48,6 @@ const ( // Pods with the given ids have unexpected status in this source, // kubelet should reconcile status with this source RECONCILE - // Pods with the given ids have been restored from a checkpoint. - RESTORE // These constants identify the sources of pods // Updates from a file diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/types.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/types.go index a840e7de84e..b20d289a4b6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/types/types.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/types.go @@ -87,6 +87,17 @@ func SortInitContainerStatuses(p *v1.Pod, statuses []v1.ContainerStatus) { } } +func SortStatusesOfInitContainers(p *v1.Pod, statusMap map[string]*v1.ContainerStatus) []v1.ContainerStatus { + containers := p.Spec.InitContainers + statuses := []v1.ContainerStatus{} + for _, container := range containers { + if status, found := statusMap[container.Name]; found { + statuses = append(statuses, *status) + } + } + return statuses +} + // Reservation represents reserved resources for non-pod components. type Reservation struct { // System represents resources reserved for non-kubernetes components. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/util/BUILD index b07f4504775..5adac63deed 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/BUILD @@ -9,34 +9,31 @@ load( go_test( name = "go_default_test", srcs = [ + "util_test.go", "util_unix_test.go", "util_windows_test.go", ], embed = [":go_default_library"], - deps = select({ + deps = [ + "//vendor/github.com/stretchr/testify/assert:go_default_library", + ] + select({ "@io_bazel_rules_go//go/platform:android": [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", ], "@io_bazel_rules_go//go/platform:darwin": [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", ], "@io_bazel_rules_go//go/platform:freebsd": [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", ], "@io_bazel_rules_go//go/platform:ios": [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", ], "@io_bazel_rules_go//go/platform:windows": [ "//vendor/github.com/Microsoft/go-winio:go_default_library", - "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", ], "//conditions:default": [], @@ -60,23 +57,23 @@ go_library( ] + select({ "@io_bazel_rules_go//go/platform:android": [ "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:darwin": [ "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:windows": [ "//vendor/github.com/Microsoft/go-winio:go_default_library", @@ -99,7 +96,6 @@ filegroup( "//pkg/kubelet/util/cache:all-srcs", "//pkg/kubelet/util/format:all-srcs", "//pkg/kubelet/util/ioutils:all-srcs", - "//pkg/kubelet/util/logreduction:all-srcs", "//pkg/kubelet/util/manager:all-srcs", "//pkg/kubelet/util/queue:all-srcs", "//pkg/kubelet/util/sliceutils:all-srcs", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go index 6fc278b164c..e05296e01e4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go @@ -30,6 +30,9 @@ type podHandler func(*v1.Pod) string // Pod returns a string representing a pod in a consistent human readable format, // with pod UID as part of the string. func Pod(pod *v1.Pod) string { + if pod == nil { + return "" + } return PodDesc(pod.Name, pod.Namespace, pod.UID) } @@ -44,6 +47,9 @@ func PodDesc(podName, podNamespace string, podUID types.UID) string { // PodWithDeletionTimestamp is the same as Pod. In addition, it prints the // deletion timestamp of the pod if it's not nil. func PodWithDeletionTimestamp(pod *v1.Pod) string { + if pod == nil { + return "" + } var deletionTimestamp string if pod.DeletionTimestamp != nil { deletionTimestamp = ":DeletionTimestamp=" + pod.DeletionTimestamp.UTC().Format(time.RFC3339) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/BUILD index c88f7023e68..2b569138a75 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/BUILD @@ -25,7 +25,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/storage/etcd3:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/watch_based_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/watch_based_manager.go index 56ff2af0eb5..4dfe1037539 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/watch_based_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/watch_based_manager.go @@ -24,7 +24,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/client-go/tools/cache" - "k8s.io/klog" + "k8s.io/klog/v2" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/util.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util.go index ba52058a10b..1c0bf91b5d9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/util.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util.go @@ -17,6 +17,8 @@ limitations under the License. package util import ( + "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -25,3 +27,19 @@ import ( func FromApiserverCache(opts *metav1.GetOptions) { opts.ResourceVersion = "0" } + +// GetNodenameForKernel gets hostname value to set in the hostname field (the nodename field of struct utsname) of the pod. +func GetNodenameForKernel(hostname string, hostDomainName string, setHostnameAsFQDN *bool) (string, error) { + kernelHostname := hostname + // FQDN has to be 64 chars to fit in the Linux nodename kernel field (specification 64 chars and the null terminating char). + const fqdnMaxLen = 64 + if len(hostDomainName) > 0 && setHostnameAsFQDN != nil && *setHostnameAsFQDN == true { + fqdn := fmt.Sprintf("%s.%s", hostname, hostDomainName) + // FQDN has to be shorter than hostnameMaxLen characters. + if len(fqdn) > fqdnMaxLen { + return "", fmt.Errorf("Failed to construct FQDN from pod hostname and cluster domain, FQDN %s is too long (%d characters is the max, %d characters requested)", fqdn, fqdnMaxLen, len(fqdn)) + } + kernelHostname = fqdn + } + return kernelHostname, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_unix.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_unix.go index bcd8090b616..4aa5e5b5548 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_unix.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/util_unix.go @@ -28,7 +28,7 @@ import ( "path/filepath" "golang.org/x/sys/unix" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -56,7 +56,7 @@ func CreateListener(endpoint string) (net.Listener, error) { return nil, fmt.Errorf("error creating socket directory %q: %v", filepath.Dir(addr), err) } - // Create the socket on a tempfile and move it to the destination socket to handle improprer cleanup + // Create the socket on a tempfile and move it to the destination socket to handle improper cleanup file, err := ioutil.TempFile(filepath.Dir(addr), "") if err != nil { return nil, fmt.Errorf("failed to create temporary file: %v", err) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go index a1baaa28bb4..b9b6a0eae7b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go @@ -21,7 +21,7 @@ import ( "net" "runtime" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" "k8s.io/utils/mount" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/BUILD index 94f95200682..0d6a83efa05 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/BUILD @@ -38,7 +38,7 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/csi-translation-lib:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/BUILD index cfe44cf64a9..6a526caf3c8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/BUILD @@ -25,7 +25,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -43,6 +43,7 @@ go_test( "//pkg/volume/util/operationexecutor:go_default_library", "//pkg/volume/util/types:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world.go index c5d84ee3cde..d04385d259d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world.go @@ -27,7 +27,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" @@ -265,6 +265,10 @@ type attachedVolume struct { // deviceMountPath contains the path on the node where the device should // be mounted after it is attached. deviceMountPath string + + // volumeInUseErrorForExpansion indicates volume driver has previously returned volume-in-use error + // for this volume and volume expansion on this node should not be retried + volumeInUseErrorForExpansion bool } // The mountedPod object represents a pod for which the kubelet volume manager @@ -381,6 +385,17 @@ func (asw *actualStateOfWorld) GetDeviceMountState(volumeName v1.UniqueVolumeNam return volumeObj.deviceMountState } +func (asw *actualStateOfWorld) MarkForInUseExpansionError(volumeName v1.UniqueVolumeName) { + asw.Lock() + defer asw.Unlock() + + volumeObj, ok := asw.attachedVolumes[volumeName] + if ok { + volumeObj.volumeInUseErrorForExpansion = true + asw.attachedVolumes[volumeName] = volumeObj + } +} + func (asw *actualStateOfWorld) GetVolumeMountState(volumeName v1.UniqueVolumeName, podName volumetypes.UniquePodName) operationexecutor.VolumeMountState { asw.RLock() defer asw.RUnlock() @@ -672,6 +687,7 @@ func (asw *actualStateOfWorld) PodExistsInVolume( return true, volumeObj.devicePath, newRemountRequiredError(volumeObj.volumeName, podObj.podName) } if podObj.fsResizeRequired && + !volumeObj.volumeInUseErrorForExpansion && utilfeature.DefaultFeatureGate.Enabled(features.ExpandInUsePersistentVolumes) { return true, volumeObj.devicePath, newFsResizeRequiredError(volumeObj.volumeName, podObj.podName) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world.go index 7d4ee41be37..8445e8ea3c6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world.go @@ -263,7 +263,7 @@ func (dsw *desiredStateOfWorld) AddPodToVolume( if volumeSpec.Volume.EmptyDir != nil && volumeSpec.Volume.EmptyDir.SizeLimit != nil && volumeSpec.Volume.EmptyDir.SizeLimit.Value() > 0 && - volumeSpec.Volume.EmptyDir.SizeLimit.Value() < sizeLimit.Value() { + (sizeLimit.Value() == 0 || volumeSpec.Volume.EmptyDir.SizeLimit.Value() < sizeLimit.Value()) { sizeLimit = resource.NewQuantity(volumeSpec.Volume.EmptyDir.SizeLimit.Value(), resource.BinarySI) } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/BUILD index cc3044a4bbf..42d1dea1625 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/BUILD @@ -29,7 +29,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go index 683acfb307b..9df3ea9cc0c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go @@ -27,7 +27,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -316,7 +316,7 @@ func (dswp *desiredStateOfWorldPopulator) processPodVolumes( } pvc, volumeSpec, volumeGidValue, err := - dswp.createVolumeSpec(podVolume, pod.Name, pod.Namespace, mounts, devices) + dswp.createVolumeSpec(podVolume, pod, mounts, devices) if err != nil { klog.Errorf( "Error processing volume %q for pod %q: %v", @@ -491,29 +491,50 @@ func (dswp *desiredStateOfWorldPopulator) deleteProcessedPod( // specified volume. It dereference any PVC to get PV objects, if needed. // Returns an error if unable to obtain the volume at this time. func (dswp *desiredStateOfWorldPopulator) createVolumeSpec( - podVolume v1.Volume, podName string, podNamespace string, mounts, devices sets.String) (*v1.PersistentVolumeClaim, *volume.Spec, string, error) { - if pvcSource := - podVolume.VolumeSource.PersistentVolumeClaim; pvcSource != nil { + podVolume v1.Volume, pod *v1.Pod, mounts, devices sets.String) (*v1.PersistentVolumeClaim, *volume.Spec, string, error) { + pvcSource := podVolume.VolumeSource.PersistentVolumeClaim + ephemeral := false + if pvcSource == nil && + podVolume.VolumeSource.Ephemeral != nil && + utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume) { + // Generic ephemeral inline volumes are handled the + // same way as a PVC reference. The only additional + // constraint (checked below) is that the PVC must be + // owned by the pod. + pvcSource = &v1.PersistentVolumeClaimVolumeSource{ + ClaimName: pod.Name + "-" + podVolume.Name, + ReadOnly: podVolume.VolumeSource.Ephemeral.ReadOnly, + } + ephemeral = true + } + if pvcSource != nil { klog.V(5).Infof( "Found PVC, ClaimName: %q/%q", - podNamespace, + pod.Namespace, pvcSource.ClaimName) // If podVolume is a PVC, fetch the real PV behind the claim pvc, err := dswp.getPVCExtractPV( - podNamespace, pvcSource.ClaimName) + pod.Namespace, pvcSource.ClaimName) if err != nil { return nil, nil, "", fmt.Errorf( "error processing PVC %s/%s: %v", - podNamespace, + pod.Namespace, pvcSource.ClaimName, err) } + if ephemeral && !metav1.IsControlledBy(pvc, pod) { + return nil, nil, "", fmt.Errorf( + "error processing PVC %s/%s: not the ephemeral PVC for the pod", + pod.Namespace, + pvcSource.ClaimName, + ) + } pvName, pvcUID := pvc.Spec.VolumeName, pvc.UID klog.V(5).Infof( "Found bound PV for PVC (ClaimName %q/%q pvcUID %v): pvName=%q", - podNamespace, + pod.Namespace, pvcSource.ClaimName, pvcUID, pvName) @@ -524,7 +545,7 @@ func (dswp *desiredStateOfWorldPopulator) createVolumeSpec( if err != nil { return nil, nil, "", fmt.Errorf( "error processing PVC %s/%s: %v", - podNamespace, + pod.Namespace, pvcSource.ClaimName, err) } @@ -533,7 +554,7 @@ func (dswp *desiredStateOfWorldPopulator) createVolumeSpec( "Extracted volumeSpec (%v) from bound PV (pvName %q) and PVC (ClaimName %q/%q pvcUID %v)", volumeSpec.Name(), pvName, - podNamespace, + pod.Namespace, pvcSource.ClaimName, pvcUID) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/BUILD index f70e7a9090c..8bc35e6b2a2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/BUILD @@ -27,7 +27,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/path:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", @@ -58,7 +58,7 @@ go_test( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go index 4fdf6ce32ab..4ad616b1634 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go @@ -28,7 +28,7 @@ import ( "path/filepath" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilpath "k8s.io/utils/path" utilstrings "k8s.io/utils/strings" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go index 300cf7159b8..db3f7844040 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go @@ -24,7 +24,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" v1 "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/BUILD index 53f98edbf7b..42dcc0ca22f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/BUILD @@ -21,7 +21,7 @@ go_library( "//vendor/github.com/google/cadvisor/info/v2:go_default_library", "//vendor/golang.org/x/sys/windows:go_default_library", "//vendor/golang.org/x/sys/windows/registry:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "//conditions:default": [], }), diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/network_stats.go b/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/network_stats.go index 5ff1d2a7be4..d3acda6d54e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/network_stats.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/network_stats.go @@ -23,7 +23,7 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounter_nodestats.go b/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounter_nodestats.go index 4d8a2355197..265debf096c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounter_nodestats.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounter_nodestats.go @@ -32,7 +32,7 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" "golang.org/x/sys/windows" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" ) // MemoryStatusEx is the same as Windows structure MEMORYSTATUSEX diff --git a/vendor/k8s.io/kubernetes/pkg/master/BUILD b/vendor/k8s.io/kubernetes/pkg/master/BUILD index e1936a103a6..7ed2daa55af 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/master/BUILD @@ -16,7 +16,6 @@ go_library( "//pkg/apis/admission/install:go_default_library", "//pkg/apis/admissionregistration/install:go_default_library", "//pkg/apis/apps/install:go_default_library", - "//pkg/apis/auditregistration/install:go_default_library", "//pkg/apis/authentication/install:go_default_library", "//pkg/apis/authorization/install:go_default_library", "//pkg/apis/autoscaling/install:go_default_library", @@ -45,7 +44,6 @@ go_library( "//pkg/master/tunneler:go_default_library", "//pkg/registry/admissionregistration/rest:go_default_library", "//pkg/registry/apps/rest:go_default_library", - "//pkg/registry/auditregistration/rest:go_default_library", "//pkg/registry/authentication/rest:go_default_library", "//pkg/registry/authorization/rest:go_default_library", "//pkg/registry/autoscaling/rest:go_default_library", @@ -74,7 +72,6 @@ go_library( "//staging/src/k8s.io/api/admissionregistration/v1:go_default_library", "//staging/src/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", "//staging/src/k8s.io/api/authentication/v1:go_default_library", "//staging/src/k8s.io/api/authentication/v1beta1:go_default_library", "//staging/src/k8s.io/api/authorization/v1:go_default_library", @@ -85,11 +82,13 @@ go_library( "//staging/src/k8s.io/api/batch/v1:go_default_library", "//staging/src/k8s.io/api/batch/v1beta1:go_default_library", "//staging/src/k8s.io/api/batch/v2alpha1:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/api/coordination/v1:go_default_library", "//staging/src/k8s.io/api/coordination/v1beta1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", "//staging/src/k8s.io/api/events/v1beta1:go_default_library", "//staging/src/k8s.io/api/extensions/v1beta1:go_default_library", "//staging/src/k8s.io/api/flowcontrol/v1alpha1:go_default_library", @@ -127,7 +126,7 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/integer:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], @@ -159,6 +158,7 @@ go_test( "//pkg/registry/registrytest:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/apitesting/naming:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/master/OWNERS b/vendor/k8s.io/kubernetes/pkg/master/OWNERS index 4d9ecc9f957..77950e3559a 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/master/OWNERS @@ -31,7 +31,6 @@ reviewers: - janetkuo - justinsb - ncdc -- tallclair - mwielgus - timothysc - soltysh diff --git a/vendor/k8s.io/kubernetes/pkg/master/controller.go b/vendor/k8s.io/kubernetes/pkg/master/controller.go index 3d57de45b70..8503a82c192 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/controller.go +++ b/vendor/k8s.io/kubernetes/pkg/master/controller.go @@ -33,7 +33,7 @@ import ( genericapiserver "k8s.io/apiserver/pkg/server" corev1client "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/rest" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/master/reconcilers" "k8s.io/kubernetes/pkg/registry/core/rangeallocation" corerest "k8s.io/kubernetes/pkg/registry/core/rest" diff --git a/vendor/k8s.io/kubernetes/pkg/master/controller/clusterauthenticationtrust/BUILD b/vendor/k8s.io/kubernetes/pkg/master/controller/clusterauthenticationtrust/BUILD index ee7fbe893fe..481c611871b 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/controller/clusterauthenticationtrust/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/master/controller/clusterauthenticationtrust/BUILD @@ -22,7 +22,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/cert:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/master/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go b/vendor/k8s.io/kubernetes/pkg/master/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go index e7322fc5f6c..5fb1c8daaa6 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/master/controller/clusterauthenticationtrust/cluster_authentication_trust_controller.go @@ -43,7 +43,7 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/cert" "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/master/controller/crdregistration/BUILD b/vendor/k8s.io/kubernetes/pkg/master/controller/crdregistration/BUILD index 3890ca6b0c7..d1fcb0fc595 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/controller/crdregistration/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/master/controller/crdregistration/BUILD @@ -22,7 +22,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/master/controller/crdregistration/crdregistration_controller.go b/vendor/k8s.io/kubernetes/pkg/master/controller/crdregistration/crdregistration_controller.go index 26cab14b3f4..f74b49e9625 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/controller/crdregistration/crdregistration_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/master/controller/crdregistration/crdregistration_controller.go @@ -20,7 +20,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" crdinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/master/import_known_versions.go b/vendor/k8s.io/kubernetes/pkg/master/import_known_versions.go index b7b01e4bdc6..5c71e5fca77 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/import_known_versions.go +++ b/vendor/k8s.io/kubernetes/pkg/master/import_known_versions.go @@ -21,7 +21,6 @@ import ( _ "k8s.io/kubernetes/pkg/apis/admission/install" _ "k8s.io/kubernetes/pkg/apis/admissionregistration/install" _ "k8s.io/kubernetes/pkg/apis/apps/install" - _ "k8s.io/kubernetes/pkg/apis/auditregistration/install" _ "k8s.io/kubernetes/pkg/apis/authentication/install" _ "k8s.io/kubernetes/pkg/apis/authorization/install" _ "k8s.io/kubernetes/pkg/apis/autoscaling/install" diff --git a/vendor/k8s.io/kubernetes/pkg/master/master.go b/vendor/k8s.io/kubernetes/pkg/master/master.go index cf74eeb6b52..faf03a21936 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/master.go +++ b/vendor/k8s.io/kubernetes/pkg/master/master.go @@ -28,7 +28,6 @@ import ( admissionregistrationv1 "k8s.io/api/admissionregistration/v1" admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" appsv1 "k8s.io/api/apps/v1" - auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1" authenticationv1 "k8s.io/api/authentication/v1" authenticationv1beta1 "k8s.io/api/authentication/v1beta1" authorizationapiv1 "k8s.io/api/authorization/v1" @@ -39,11 +38,13 @@ import ( batchapiv1 "k8s.io/api/batch/v1" batchapiv1beta1 "k8s.io/api/batch/v1beta1" batchapiv2alpha1 "k8s.io/api/batch/v2alpha1" + certificatesapiv1 "k8s.io/api/certificates/v1" certificatesapiv1beta1 "k8s.io/api/certificates/v1beta1" coordinationapiv1 "k8s.io/api/coordination/v1" coordinationapiv1beta1 "k8s.io/api/coordination/v1beta1" apiv1 "k8s.io/api/core/v1" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" + eventsv1 "k8s.io/api/events/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsapiv1beta1 "k8s.io/api/extensions/v1beta1" flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -88,12 +89,11 @@ import ( "k8s.io/kubernetes/pkg/serviceaccount" nodeutil "k8s.io/kubernetes/pkg/util/node" - "k8s.io/klog" + "k8s.io/klog/v2" // RESTStorage installers admissionregistrationrest "k8s.io/kubernetes/pkg/registry/admissionregistration/rest" appsrest "k8s.io/kubernetes/pkg/registry/apps/rest" - auditregistrationrest "k8s.io/kubernetes/pkg/registry/auditregistration/rest" authenticationrest "k8s.io/kubernetes/pkg/registry/authentication/rest" authorizationrest "k8s.io/kubernetes/pkg/registry/authorization/rest" autoscalingrest "k8s.io/kubernetes/pkg/registry/autoscaling/rest" @@ -190,6 +190,7 @@ type ExtraConfig struct { ServiceAccountIssuer serviceaccount.TokenGenerator ServiceAccountMaxExpiration time.Duration + ExtendExpiration bool // ServiceAccountIssuerDiscovery ServiceAccountIssuerURL string @@ -397,6 +398,7 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) ServiceNodePortRange: c.ExtraConfig.ServiceNodePortRange, LoopbackClientConfig: c.GenericConfig.LoopbackClientConfig, ServiceAccountIssuer: c.ExtraConfig.ServiceAccountIssuer, + ExtendExpiration: c.ExtraConfig.ExtendExpiration, ServiceAccountMaxExpiration: c.ExtraConfig.ServiceAccountMaxExpiration, APIAudiences: c.GenericConfig.Authentication.APIAudiences, } @@ -413,7 +415,6 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) // TODO: describe the priority all the way down in the RESTStorageProviders and plumb it back through the various discovery // handlers that we have. restStorageProviders := []RESTStorageProvider{ - auditregistrationrest.RESTStorageProvider{}, authenticationrest.RESTStorageProvider{Authenticator: c.GenericConfig.Authentication.Authenticator, APIAudiences: c.GenericConfig.Authentication.APIAudiences}, authorizationrest.RESTStorageProvider{Authorizer: c.GenericConfig.Authorization.Authorizer, RuleResolver: c.GenericConfig.RuleResolver}, autoscalingrest.RESTStorageProvider{}, @@ -432,7 +433,7 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) flowcontrolrest.RESTStorageProvider{}, // keep apps after extensions so legacy clients resolve the extensions versions of shared resource names. // See https://github.com/kubernetes/kubernetes/issues/42392 - appsrest.RESTStorageProvider{}, + appsrest.StorageProvider{}, admissionregistrationrest.RESTStorageProvider{}, eventsrest.RESTStorageProvider{TTL: c.ExtraConfig.EventTTL}, } @@ -607,10 +608,12 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig { autoscalingapiv2beta2.SchemeGroupVersion, batchapiv1.SchemeGroupVersion, batchapiv1beta1.SchemeGroupVersion, + certificatesapiv1.SchemeGroupVersion, certificatesapiv1beta1.SchemeGroupVersion, coordinationapiv1.SchemeGroupVersion, coordinationapiv1beta1.SchemeGroupVersion, discoveryv1beta1.SchemeGroupVersion, + eventsv1.SchemeGroupVersion, eventsv1beta1.SchemeGroupVersion, extensionsapiv1beta1.SchemeGroupVersion, networkingapiv1.SchemeGroupVersion, @@ -630,7 +633,6 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig { ) // disable alpha versions explicitly so we have a full list of what's possible to serve ret.DisableVersions( - auditregistrationv1alpha1.SchemeGroupVersion, batchapiv2alpha1.SchemeGroupVersion, nodev1alpha1.SchemeGroupVersion, rbacv1alpha1.SchemeGroupVersion, diff --git a/vendor/k8s.io/kubernetes/pkg/master/ports/BUILD b/vendor/k8s.io/kubernetes/pkg/master/ports/BUILD index 69886813804..047289610e3 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/ports/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/master/ports/BUILD @@ -12,6 +12,9 @@ go_library( "ports.go", ], importpath = "k8s.io/kubernetes/pkg/master/ports", + deps = [ + "//staging/src/k8s.io/cloud-provider:go_default_library", + ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/master/ports/ports.go b/vendor/k8s.io/kubernetes/pkg/master/ports/ports.go index 23faba1d3ec..40ce21a7673 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/ports/ports.go +++ b/vendor/k8s.io/kubernetes/pkg/master/ports/ports.go @@ -16,6 +16,10 @@ limitations under the License. package ports +import ( + "k8s.io/cloud-provider" +) + const ( // ProxyStatusPort is the default port for the proxy metrics server. // May be overridden by a flag at startup. @@ -23,18 +27,10 @@ const ( // KubeletPort is the default port for the kubelet server on each host machine. // May be overridden by a flag at startup. KubeletPort = 10250 - // InsecureSchedulerPort is the default port for the scheduler status server. - // May be overridden by a flag at startup. - // Deprecated: use the secure KubeSchedulerPort instead. - InsecureSchedulerPort = 10251 // InsecureKubeControllerManagerPort is the default port for the controller manager status server. // May be overridden by a flag at startup. // Deprecated: use the secure KubeControllerManagerPort instead. InsecureKubeControllerManagerPort = 10252 - // InsecureCloudControllerManagerPort is the default port for the cloud controller manager server. - // This value may be overridden by a flag at startup. - // Deprecated: use the secure CloudControllerManagerPort instead. - InsecureCloudControllerManagerPort = 10253 // KubeletReadOnlyPort exposes basic read-only services from the kubelet. // May be overridden by a flag at startup. // This is necessary for heapster to collect monitoring stats from the kubelet @@ -49,9 +45,5 @@ const ( KubeControllerManagerPort = 10257 // CloudControllerManagerPort is the default port for the cloud controller manager server. // This value may be overridden by a flag at startup. - CloudControllerManagerPort = 10258 - - // KubeSchedulerPort is the default port for the scheduler status server. - // May be overridden by a flag at startup. - KubeSchedulerPort = 10259 + CloudControllerManagerPort = cloudprovider.CloudControllerManagerPort ) diff --git a/vendor/k8s.io/kubernetes/pkg/master/reconcilers/BUILD b/vendor/k8s.io/kubernetes/pkg/master/reconcilers/BUILD index a0a16d2a2c7..ec54ef5b47b 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/reconcilers/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/master/reconcilers/BUILD @@ -26,7 +26,7 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/util/retry:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/master/reconcilers/endpointsadapter.go b/vendor/k8s.io/kubernetes/pkg/master/reconcilers/endpointsadapter.go index b3d456059b8..54e74c15bae 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/reconcilers/endpointsadapter.go +++ b/vendor/k8s.io/kubernetes/pkg/master/reconcilers/endpointsadapter.go @@ -193,3 +193,17 @@ func allAddressesIPv6(addresses []corev1.EndpointAddress) bool { return true } + +// setSkipMirrorTrue sets endpointslice.kubernetes.io/skip-mirror to true. It +// returns true if this has resulted in a change to the Endpoints resource. +func setSkipMirrorTrue(e *corev1.Endpoints) bool { + skipMirrorVal, ok := e.Labels[discovery.LabelSkipMirror] + if !ok || skipMirrorVal != "true" { + if e.Labels == nil { + e.Labels = map[string]string{} + } + e.Labels[discovery.LabelSkipMirror] = "true" + return true + } + return false +} diff --git a/vendor/k8s.io/kubernetes/pkg/master/reconcilers/lease.go b/vendor/k8s.io/kubernetes/pkg/master/reconcilers/lease.go index 735e97bf723..f7e0ba50f19 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/reconcilers/lease.go +++ b/vendor/k8s.io/kubernetes/pkg/master/reconcilers/lease.go @@ -28,7 +28,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -63,7 +63,12 @@ var _ Leases = &storageLeases{} // ListLeases retrieves a list of the current master IPs from storage func (s *storageLeases) ListLeases() ([]string, error) { ipInfoList := &corev1.EndpointsList{} - if err := s.storage.List(apirequest.NewDefaultContext(), s.baseKey, "0", storage.Everything, ipInfoList); err != nil { + storageOpts := storage.ListOptions{ + ResourceVersion: "0", + ResourceVersionMatch: metav1.ResourceVersionMatchNotOlderThan, + Predicate: storage.Everything, + } + if err := s.storage.List(apirequest.NewDefaultContext(), s.baseKey, storageOpts, ipInfoList); err != nil { return nil, err } @@ -191,9 +196,13 @@ func (r *leaseEndpointReconciler) doReconcile(serviceName string, endpointPorts return fmt.Errorf("no master IPs were listed in storage, refusing to erase all endpoints for the kubernetes service") } + // Don't use the EndpointSliceMirroring controller to mirror this to + // EndpointSlices. This may change in the future. + skipMirrorChanged := setSkipMirrorTrue(e) + // Next, we compare the current list of endpoints with the list of master IP keys formatCorrect, ipCorrect, portsCorrect := checkEndpointSubsetFormatWithLease(e, masterIPs, endpointPorts, reconcilePorts) - if formatCorrect && ipCorrect && portsCorrect { + if !skipMirrorChanged && formatCorrect && ipCorrect && portsCorrect { return r.epAdapter.EnsureEndpointSliceFromEndpoints(corev1.NamespaceDefault, e) } diff --git a/vendor/k8s.io/kubernetes/pkg/master/reconcilers/mastercount.go b/vendor/k8s.io/kubernetes/pkg/master/reconcilers/mastercount.go index 2d37df3e2a6..f2fc6ad92f7 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/reconcilers/mastercount.go +++ b/vendor/k8s.io/kubernetes/pkg/master/reconcilers/mastercount.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/util/retry" - "k8s.io/klog" + "k8s.io/klog/v2" endpointsv1 "k8s.io/kubernetes/pkg/api/v1/endpoints" ) @@ -76,6 +76,11 @@ func (r *masterCountEndpointReconciler) ReconcileEndpoints(serviceName string, i }, } } + + // Don't use the EndpointSliceMirroring controller to mirror this to + // EndpointSlices. This may change in the future. + skipMirrorChanged := setSkipMirrorTrue(e) + if errors.IsNotFound(err) { // Simply create non-existing endpoints for the service. e.Subsets = []corev1.EndpointSubset{{ @@ -99,7 +104,8 @@ func (r *masterCountEndpointReconciler) ReconcileEndpoints(serviceName string, i _, err = r.epAdapter.Update(metav1.NamespaceDefault, e) return err } - if ipCorrect && portsCorrect { + + if !skipMirrorChanged && ipCorrect && portsCorrect { return r.epAdapter.EnsureEndpointSliceFromEndpoints(metav1.NamespaceDefault, e) } if !ipCorrect { diff --git a/vendor/k8s.io/kubernetes/pkg/master/services.go b/vendor/k8s.io/kubernetes/pkg/master/services.go index 5b4d3897853..972f25c404e 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/services.go +++ b/vendor/k8s.io/kubernetes/pkg/master/services.go @@ -20,7 +20,7 @@ import ( "fmt" "net" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/integer" utilnet "k8s.io/utils/net" diff --git a/vendor/k8s.io/kubernetes/pkg/master/tunneler/BUILD b/vendor/k8s.io/kubernetes/pkg/master/tunneler/BUILD index 9dbaecd6edb..f6c7a435e75 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/tunneler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/master/tunneler/BUILD @@ -24,7 +24,7 @@ go_library( "//pkg/ssh:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/path:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh.go b/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh.go index 684ba812f7b..643f6c35534 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh.go +++ b/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/util/clock" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/ssh" utilpath "k8s.io/utils/path" ) diff --git a/vendor/k8s.io/kubernetes/pkg/printers/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/printers/internalversion/BUILD index 729c906cf76..dae3120f513 100644 --- a/vendor/k8s.io/kubernetes/pkg/printers/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/printers/internalversion/BUILD @@ -80,6 +80,7 @@ go_library( "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/install:go_default_library", "//pkg/apis/storage/util:go_default_library", + "//pkg/features:go_default_library", "//pkg/printers:go_default_library", "//pkg/util/node:go_default_library", "//staging/src/k8s.io/api/apps/v1beta1:go_default_library", @@ -96,12 +97,14 @@ go_library( "//staging/src/k8s.io/api/rbac/v1beta1:go_default_library", "//staging/src/k8s.io/api/scheduling/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", + "//staging/src/k8s.io/api/storage/v1alpha1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/duration:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/printers/internalversion/printers.go b/vendor/k8s.io/kubernetes/pkg/printers/internalversion/printers.go index fabba32196d..9aea4aee9f6 100644 --- a/vendor/k8s.io/kubernetes/pkg/printers/internalversion/printers.go +++ b/vendor/k8s.io/kubernetes/pkg/printers/internalversion/printers.go @@ -39,12 +39,14 @@ import ( rbacv1beta1 "k8s.io/api/rbac/v1beta1" schedulingv1 "k8s.io/api/scheduling/v1" storagev1 "k8s.io/api/storage/v1" + storagev1alpha1 "k8s.io/api/storage/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/duration" "k8s.io/apimachinery/pkg/util/sets" + utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/kubernetes/pkg/apis/admissionregistration" "k8s.io/kubernetes/pkg/apis/apps" "k8s.io/kubernetes/pkg/apis/autoscaling" @@ -63,6 +65,7 @@ import ( "k8s.io/kubernetes/pkg/apis/scheduling" "k8s.io/kubernetes/pkg/apis/storage" storageutil "k8s.io/kubernetes/pkg/apis/storage/util" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/printers" "k8s.io/kubernetes/pkg/util/node" ) @@ -509,12 +512,27 @@ func AddHandlers(h printers.PrintHandler) { {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "AttachRequired", Type: "boolean", Description: storagev1.CSIDriverSpec{}.SwaggerDoc()["attachRequired"]}, {Name: "PodInfoOnMount", Type: "boolean", Description: storagev1.CSIDriverSpec{}.SwaggerDoc()["podInfoOnMount"]}, + } + if utilfeature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity) { + csiDriverColumnDefinitions = append(csiDriverColumnDefinitions, metav1.TableColumnDefinition{ + Name: "StorageCapacity", Type: "boolean", Description: storagev1.CSIDriverSpec{}.SwaggerDoc()["storageCapacity"], + }) + } + csiDriverColumnDefinitions = append(csiDriverColumnDefinitions, []metav1.TableColumnDefinition{ {Name: "Modes", Type: "string", Description: storagev1.CSIDriverSpec{}.SwaggerDoc()["volumeLifecycleModes"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, - } + }...) h.TableHandler(csiDriverColumnDefinitions, printCSIDriver) h.TableHandler(csiDriverColumnDefinitions, printCSIDriverList) + csiStorageCapacityColumnDefinitions := []metav1.TableColumnDefinition{ + {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, + {Name: "StorageClassName", Type: "string", Description: storagev1alpha1.CSIStorageCapacity{}.SwaggerDoc()["storageClassName"]}, + {Name: "Capacity", Type: "string", Description: storagev1alpha1.CSIStorageCapacity{}.SwaggerDoc()["capacity"]}, + } + h.TableHandler(csiStorageCapacityColumnDefinitions, printCSIStorageCapacity) + h.TableHandler(csiStorageCapacityColumnDefinitions, printCSIStorageCapacityList) + mutatingWebhookColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Webhooks", Type: "integer", Description: "Webhooks indicates the number of webhooks registered in this configuration"}, @@ -655,6 +673,16 @@ func listWithMoreString(list []string, more bool, count, max int) string { return ret } +// translateMicroTimestampSince returns the elapsed time since timestamp in +// human-readable approximation. +func translateMicroTimestampSince(timestamp metav1.MicroTime) string { + if timestamp.IsZero() { + return "" + } + + return duration.HumanDuration(time.Since(timestamp.Time)) +} + // translateTimestampSince returns the elapsed time since timestamp in // human-readable approximation. func translateTimestampSince(timestamp metav1.Time) string { @@ -1347,7 +1375,15 @@ func printCSIDriver(obj *storage.CSIDriver, options printers.GenerateOptions) ([ modes = "" } - row.Cells = append(row.Cells, obj.Name, attachRequired, podInfoOnMount, modes, translateTimestampSince(obj.CreationTimestamp)) + row.Cells = append(row.Cells, obj.Name, attachRequired, podInfoOnMount) + if utilfeature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity) { + storageCapacity := false + if obj.Spec.StorageCapacity != nil { + storageCapacity = *obj.Spec.StorageCapacity + } + row.Cells = append(row.Cells, storageCapacity) + } + row.Cells = append(row.Cells, modes, translateTimestampSince(obj.CreationTimestamp)) return []metav1.TableRow{row}, nil } @@ -1363,6 +1399,32 @@ func printCSIDriverList(list *storage.CSIDriverList, options printers.GenerateOp return rows, nil } +func printCSIStorageCapacity(obj *storage.CSIStorageCapacity, options printers.GenerateOptions) ([]metav1.TableRow, error) { + row := metav1.TableRow{ + Object: runtime.RawExtension{Object: obj}, + } + + capacity := "" + if obj.Capacity != nil { + capacity = obj.Capacity.String() + } + + row.Cells = append(row.Cells, obj.Name, obj.StorageClassName, capacity) + return []metav1.TableRow{row}, nil +} + +func printCSIStorageCapacityList(list *storage.CSIStorageCapacityList, options printers.GenerateOptions) ([]metav1.TableRow, error) { + rows := make([]metav1.TableRow, 0, len(list.Items)) + for i := range list.Items { + r, err := printCSIStorageCapacity(&list.Items[i], options) + if err != nil { + return nil, err + } + rows = append(rows, r...) + } + return rows, nil +} + func printMutatingWebhook(obj *admissionregistration.MutatingWebhookConfiguration, options printers.GenerateOptions) ([]metav1.TableRow, error) { row := metav1.TableRow{ Object: runtime.RawExtension{Object: obj}, @@ -1660,11 +1722,28 @@ func printEvent(obj *api.Event, options printers.GenerateOptions) ([]metav1.Tabl } firstTimestamp := translateTimestampSince(obj.FirstTimestamp) + if obj.FirstTimestamp.IsZero() { + firstTimestamp = translateMicroTimestampSince(obj.EventTime) + } + lastTimestamp := translateTimestampSince(obj.LastTimestamp) if obj.LastTimestamp.IsZero() { lastTimestamp = firstTimestamp } + count := obj.Count + if obj.Series != nil { + lastTimestamp = translateMicroTimestampSince(obj.Series.LastObservedTime) + // When a series is created for the first time, its count is set to 1. + // However, for a series to be created, there needs to be an isomorphic + // singleton event created beforehand. This singleton event is not + // counted in the series count which is why one is added here. + count = obj.Series.Count + 1 + } else if count == 0 { + // Singleton events don't have a count set in the new API. + count = 1 + } + var target string if len(obj.InvolvedObject.Name) > 0 { target = fmt.Sprintf("%s/%s", strings.ToLower(obj.InvolvedObject.Kind), obj.InvolvedObject.Name) @@ -1678,10 +1757,10 @@ func printEvent(obj *api.Event, options printers.GenerateOptions) ([]metav1.Tabl obj.Reason, target, obj.InvolvedObject.FieldPath, - formatEventSource(obj.Source), + formatEventSource(obj.Source, obj.ReportingController, obj.ReportingInstance), strings.TrimSpace(obj.Message), firstTimestamp, - int64(obj.Count), + int64(count), obj.Name, ) } else { @@ -1768,10 +1847,7 @@ func printCertificateSigningRequest(obj *certificates.CertificateSigningRequest, row := metav1.TableRow{ Object: runtime.RawExtension{Object: obj}, } - status, err := extractCSRStatus(obj) - if err != nil { - return nil, err - } + status := extractCSRStatus(obj) signerName := "" if obj.Spec.SignerName != "" { signerName = obj.Spec.SignerName @@ -1780,16 +1856,16 @@ func printCertificateSigningRequest(obj *certificates.CertificateSigningRequest, return []metav1.TableRow{row}, nil } -func extractCSRStatus(csr *certificates.CertificateSigningRequest) (string, error) { - var approved, denied bool +func extractCSRStatus(csr *certificates.CertificateSigningRequest) string { + var approved, denied, failed bool for _, c := range csr.Status.Conditions { switch c.Type { case certificates.CertificateApproved: approved = true case certificates.CertificateDenied: denied = true - default: - return "", fmt.Errorf("unknown csr condition %q", c) + case certificates.CertificateFailed: + failed = true } } var status string @@ -1801,10 +1877,13 @@ func extractCSRStatus(csr *certificates.CertificateSigningRequest) (string, erro } else { status += "Pending" } + if failed { + status += ",Failed" + } if len(csr.Status.Certificate) > 0 { status += ",Issued" } - return status, nil + return status } func printCertificateSigningRequestList(list *certificates.CertificateSigningRequestList, options printers.GenerateOptions) ([]metav1.TableRow, error) { @@ -1920,11 +1999,19 @@ func formatHPAMetrics(specs []autoscaling.MetricSpec, statuses []autoscaling.Met } list = append(list, fmt.Sprintf("%s/%s", current, spec.Pods.Target.AverageValue.String())) case autoscaling.ObjectMetricSourceType: - current := "" - if len(statuses) > i && statuses[i].Object != nil { - current = statuses[i].Object.Current.Value.String() + if spec.Object.Target.AverageValue != nil { + current := "" + if len(statuses) > i && statuses[i].Object != nil && statuses[i].Object.Current.AverageValue != nil { + current = statuses[i].Object.Current.AverageValue.String() + } + list = append(list, fmt.Sprintf("%s/%s (avg)", current, spec.Object.Target.AverageValue.String())) + } else { + current := "" + if len(statuses) > i && statuses[i].Object != nil { + current = statuses[i].Object.Current.Value.String() + } + list = append(list, fmt.Sprintf("%s/%s", current, spec.Object.Target.Value.String())) } - list = append(list, fmt.Sprintf("%s/%s", current, spec.Object.Target.Value.String())) case autoscaling.ResourceMetricSourceType: if spec.Resource.Target.AverageValue != nil { current := "" @@ -2160,13 +2247,29 @@ func layoutContainerCells(containers []api.Container) (names string, images stri return namesBuffer.String(), imagesBuffer.String() } -// formatEventSource formats EventSource as a comma separated string excluding Host when empty -func formatEventSource(es api.EventSource) string { - EventSourceString := []string{es.Component} - if len(es.Host) > 0 { - EventSourceString = append(EventSourceString, es.Host) +// formatEventSource formats EventSource as a comma separated string excluding Host when empty. +// It uses reportingController when Source.Component is empty and reportingInstance when Source.Host is empty +func formatEventSource(es api.EventSource, reportingController, reportingInstance string) string { + return formatEventSourceComponentInstance( + firstNonEmpty(es.Component, reportingController), + firstNonEmpty(es.Host, reportingInstance), + ) +} + +func firstNonEmpty(ss ...string) string { + for _, s := range ss { + if len(s) > 0 { + return s + } } - return strings.Join(EventSourceString, ", ") + return "" +} + +func formatEventSourceComponentInstance(component, instance string) string { + if len(instance) == 0 { + return component + } + return component + ", " + instance } func printControllerRevision(obj *apps.ControllerRevision, options printers.GenerateOptions) ([]metav1.TableRow, error) { diff --git a/vendor/k8s.io/kubernetes/pkg/probe/exec/BUILD b/vendor/k8s.io/kubernetes/pkg/probe/exec/BUILD index a22faf032c2..ce381191610 100644 --- a/vendor/k8s.io/kubernetes/pkg/probe/exec/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/probe/exec/BUILD @@ -13,7 +13,7 @@ go_library( deps = [ "//pkg/kubelet/util/ioutils:go_default_library", "//pkg/probe:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/probe/exec/exec.go b/vendor/k8s.io/kubernetes/pkg/probe/exec/exec.go index b8cfe0d2ad7..9aa894672ad 100644 --- a/vendor/k8s.io/kubernetes/pkg/probe/exec/exec.go +++ b/vendor/k8s.io/kubernetes/pkg/probe/exec/exec.go @@ -22,7 +22,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/util/ioutils" "k8s.io/kubernetes/pkg/probe" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/exec" ) diff --git a/vendor/k8s.io/kubernetes/pkg/probe/http/BUILD b/vendor/k8s.io/kubernetes/pkg/probe/http/BUILD index 3541c2569d7..e16bcdfe679 100644 --- a/vendor/k8s.io/kubernetes/pkg/probe/http/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/probe/http/BUILD @@ -14,7 +14,7 @@ go_library( "//pkg/probe:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/component-base/version:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/io:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/probe/http/http.go b/vendor/k8s.io/kubernetes/pkg/probe/http/http.go index 84aae213195..02cdcc045c8 100644 --- a/vendor/k8s.io/kubernetes/pkg/probe/http/http.go +++ b/vendor/k8s.io/kubernetes/pkg/probe/http/http.go @@ -28,7 +28,7 @@ import ( "k8s.io/component-base/version" "k8s.io/kubernetes/pkg/probe" - "k8s.io/klog" + "k8s.io/klog/v2" utilio "k8s.io/utils/io" ) diff --git a/vendor/k8s.io/kubernetes/pkg/probe/tcp/BUILD b/vendor/k8s.io/kubernetes/pkg/probe/tcp/BUILD index 929f1e4fad3..16bf0e04eb4 100644 --- a/vendor/k8s.io/kubernetes/pkg/probe/tcp/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/probe/tcp/BUILD @@ -12,7 +12,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/probe/tcp", deps = [ "//pkg/probe:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/probe/tcp/tcp.go b/vendor/k8s.io/kubernetes/pkg/probe/tcp/tcp.go index 7b183e0b45a..771bc047710 100644 --- a/vendor/k8s.io/kubernetes/pkg/probe/tcp/tcp.go +++ b/vendor/k8s.io/kubernetes/pkg/probe/tcp/tcp.go @@ -23,7 +23,7 @@ import ( "k8s.io/kubernetes/pkg/probe" - "k8s.io/klog" + "k8s.io/klog/v2" ) // New creates Prober. diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/BUILD index 0957cc9a36c..8b3ac576e71 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/BUILD @@ -27,7 +27,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/types.go b/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/types.go index c500d5ee75f..40a0ce5999a 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/types.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/types.go @@ -120,6 +120,8 @@ type KubeProxyConfiguration struct { // metricsBindAddress is the IP address and port for the metrics server to serve on, // defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces) MetricsBindAddress string + // BindAddressHardFail, if true, kube-proxy will treat failure to bind to a port as fatal and exit + BindAddressHardFail bool // enableProfiling enables profiling via web interface on /debug/pprof handler. // Profiling handlers will be handled by metrics server. EnableProfiling bool diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/defaults.go index a80f94313a6..4831809bb0d 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/defaults.go @@ -61,6 +61,9 @@ func SetDefaults_KubeProxyConfiguration(obj *kubeproxyconfigv1alpha1.KubeProxyCo if obj.IPTables.SyncPeriod.Duration == 0 { obj.IPTables.SyncPeriod = metav1.Duration{Duration: 30 * time.Second} } + if obj.IPTables.MinSyncPeriod.Duration == 0 { + obj.IPTables.MinSyncPeriod = metav1.Duration{Duration: 1 * time.Second} + } if obj.IPVS.SyncPeriod.Duration == 0 { obj.IPVS.SyncPeriod = metav1.Duration{Duration: 30 * time.Second} } diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/zz_generated.conversion.go index 55e035ce0b1..a2db00348b0 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/zz_generated.conversion.go @@ -96,6 +96,7 @@ func autoConvert_v1alpha1_KubeProxyConfiguration_To_config_KubeProxyConfiguratio out.BindAddress = in.BindAddress out.HealthzBindAddress = in.HealthzBindAddress out.MetricsBindAddress = in.MetricsBindAddress + out.BindAddressHardFail = in.BindAddressHardFail out.EnableProfiling = in.EnableProfiling out.ClusterCIDR = in.ClusterCIDR out.HostnameOverride = in.HostnameOverride @@ -135,6 +136,7 @@ func autoConvert_config_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguratio out.BindAddress = in.BindAddress out.HealthzBindAddress = in.HealthzBindAddress out.MetricsBindAddress = in.MetricsBindAddress + out.BindAddressHardFail = in.BindAddressHardFail out.EnableProfiling = in.EnableProfiling out.ClusterCIDR = in.ClusterCIDR out.HostnameOverride = in.HostnameOverride diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/config/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/config/BUILD index b8223cbf40a..06e1ff8da5d 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/config/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/config/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/informers/discovery/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/config/config.go b/vendor/k8s.io/kubernetes/pkg/proxy/config/config.go index 2f073e8f06e..129c22a8958 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/config/config.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/config/config.go @@ -20,13 +20,13 @@ import ( "fmt" "time" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" discovery "k8s.io/api/discovery/v1beta1" utilruntime "k8s.io/apimachinery/pkg/util/runtime" coreinformers "k8s.io/client-go/informers/core/v1" discoveryinformers "k8s.io/client-go/informers/discovery/v1beta1" "k8s.io/client-go/tools/cache" - "k8s.io/klog" + "k8s.io/klog/v2" ) // ServiceHandler is an abstract interface of objects which receive @@ -381,7 +381,7 @@ type NodeHandler interface { // OnNodeUpdate is called whenever modification of an existing // node object is observed. OnNodeUpdate(oldNode, node *v1.Node) - // OnNodeDelete is called whever deletion of an existing node + // OnNodeDelete is called whenever deletion of an existing node // object is observed. OnNodeDelete(node *v1.Node) // OnNodeSynced is called once all the initial event handlers were diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/endpoints.go b/vendor/k8s.io/kubernetes/pkg/proxy/endpoints.go index 35c2fc58893..b797a01e10d 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/endpoints.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/endpoints.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" discovery "k8s.io/api/discovery/v1beta1" @@ -94,6 +94,10 @@ func newBaseEndpointInfo(IP string, port int, isLocal bool, topology map[string] type makeEndpointFunc func(info *BaseEndpointInfo) Endpoint +// This handler is invoked by the apply function on every change. This function should not modify the +// EndpointsMap's but just use the changes for any Proxier specific cleanup. +type processEndpointsMapChangeFunc func(oldEndpointsMap, newEndpointsMap EndpointsMap) + // EndpointChangeTracker carries state about uncommitted changes to an arbitrary number of // Endpoints, keyed by their namespace and name. type EndpointChangeTracker struct { @@ -104,7 +108,8 @@ type EndpointChangeTracker struct { // items maps a service to is endpointsChange. items map[types.NamespacedName]*endpointsChange // makeEndpointInfo allows proxier to inject customized information when processing endpoint. - makeEndpointInfo makeEndpointFunc + makeEndpointInfo makeEndpointFunc + processEndpointsMapChange processEndpointsMapChangeFunc // endpointSliceCache holds a simplified version of endpoint slices. endpointSliceCache *EndpointSliceCache // isIPv6Mode indicates if change tracker is under IPv6/IPv4 mode. Nil means not applicable. @@ -116,14 +121,15 @@ type EndpointChangeTracker struct { } // NewEndpointChangeTracker initializes an EndpointsChangeMap -func NewEndpointChangeTracker(hostname string, makeEndpointInfo makeEndpointFunc, isIPv6Mode *bool, recorder record.EventRecorder, endpointSlicesEnabled bool) *EndpointChangeTracker { +func NewEndpointChangeTracker(hostname string, makeEndpointInfo makeEndpointFunc, isIPv6Mode *bool, recorder record.EventRecorder, endpointSlicesEnabled bool, processEndpointsMapChange processEndpointsMapChangeFunc) *EndpointChangeTracker { ect := &EndpointChangeTracker{ - hostname: hostname, - items: make(map[types.NamespacedName]*endpointsChange), - makeEndpointInfo: makeEndpointInfo, - isIPv6Mode: isIPv6Mode, - recorder: recorder, - lastChangeTriggerTimes: make(map[types.NamespacedName][]time.Time), + hostname: hostname, + items: make(map[types.NamespacedName]*endpointsChange), + makeEndpointInfo: makeEndpointInfo, + isIPv6Mode: isIPv6Mode, + recorder: recorder, + lastChangeTriggerTimes: make(map[types.NamespacedName][]time.Time), + processEndpointsMapChange: processEndpointsMapChange, } if endpointSlicesEnabled { ect.endpointSliceCache = NewEndpointSliceCache(hostname, isIPv6Mode, recorder, makeEndpointInfo) @@ -176,6 +182,10 @@ func (ect *EndpointChangeTracker) Update(previous, current *v1.Endpoints) bool { // there will be no network programming for them and thus no network programming latency metric // should be exported. delete(ect.lastChangeTriggerTimes, namespacedName) + } else { + for spn, eps := range change.current { + klog.V(2).Infof("Service port %s updated: %d endpoints", spn, len(eps)) + } } metrics.EndpointChangesPending.Set(float64(len(ect.items))) @@ -384,6 +394,7 @@ func (ect *EndpointChangeTracker) endpointsToEndpointsMap(endpoints *v1.Endpoint // The changes map is cleared after applying them. // In addition it returns (via argument) and resets the lastChangeTriggerTimes for all endpoints // that were changed and will result in syncing the proxy rules. +// apply triggers processEndpointsMapChange on every change. func (em EndpointsMap) apply(ect *EndpointChangeTracker, staleEndpoints *[]ServiceEndpoint, staleServiceNames *[]ServicePortName, lastChangeTriggerTimes *map[types.NamespacedName][]time.Time) { if ect == nil { @@ -392,6 +403,9 @@ func (em EndpointsMap) apply(ect *EndpointChangeTracker, staleEndpoints *[]Servi changes := ect.checkoutChanges() for _, change := range changes { + if ect.processEndpointsMapChange != nil { + ect.processEndpointsMapChange(change.previous, change.current) + } em.unmerge(change.previous) em.merge(change.current) detectStaleConnections(change.previous, change.current, staleEndpoints, staleServiceNames) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/endpointslicecache.go b/vendor/k8s.io/kubernetes/pkg/proxy/endpointslicecache.go index e75b6848527..756f3b9d507 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/endpointslicecache.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/endpointslicecache.go @@ -27,7 +27,7 @@ import ( discovery "k8s.io/api/discovery/v1beta1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "k8s.io/klog" + "k8s.io/klog/v2" utilproxy "k8s.io/kubernetes/pkg/proxy/util" utilnet "k8s.io/utils/net" ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/BUILD index d99782630f7..91468cd13f4 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/BUILD @@ -20,10 +20,9 @@ go_library( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//vendor/github.com/lithammer/dedent:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/proxier_health.go b/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/proxier_health.go index afeb4fff657..ba8cefaaa60 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/proxier_health.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/proxier_health.go @@ -22,17 +22,13 @@ import ( "sync/atomic" "time" - "k8s.io/klog" - "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/clock" - "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/tools/record" + "k8s.io/klog/v2" api "k8s.io/kubernetes/pkg/apis/core" ) -var proxierHealthzRetryInterval = 60 * time.Second - // ProxierHealthUpdater allows callers to update healthz timestamp only. type ProxierHealthUpdater interface { // QueuedUpdate should be called when the proxier receives a Service or Endpoints @@ -43,8 +39,8 @@ type ProxierHealthUpdater interface { // rules to reflect the current state. Updated() - // Run starts the healthz http server and returns. - Run() + // Run starts the healthz HTTP server and blocks until it exits. + Run() error } var _ ProxierHealthUpdater = &proxierHealthServer{} @@ -92,31 +88,28 @@ func (hs *proxierHealthServer) QueuedUpdate() { hs.lastQueued.Store(hs.clock.Now()) } -// Run starts the healthz http server and returns. -func (hs *proxierHealthServer) Run() { +// Run starts the healthz HTTP server and blocks until it exits. +func (hs *proxierHealthServer) Run() error { serveMux := http.NewServeMux() serveMux.Handle("/healthz", healthzHandler{hs: hs}) server := hs.httpFactory.New(hs.addr, serveMux) - go wait.Until(func() { - klog.V(3).Infof("Starting goroutine for proxier healthz on %s", hs.addr) - - listener, err := hs.listener.Listen(hs.addr) - if err != nil { - msg := fmt.Sprintf("Failed to start proxier healthz on %s: %v", hs.addr, err) - if hs.recorder != nil { - hs.recorder.Eventf(hs.nodeRef, api.EventTypeWarning, "FailedToStartProxierHealthcheck", msg) - } - klog.Error(msg) - return + listener, err := hs.listener.Listen(hs.addr) + if err != nil { + msg := fmt.Sprintf("failed to start proxier healthz on %s: %v", hs.addr, err) + // TODO(thockin): move eventing back to caller + if hs.recorder != nil { + hs.recorder.Eventf(hs.nodeRef, api.EventTypeWarning, "FailedToStartProxierHealthcheck", msg) } + return fmt.Errorf("%v", msg) + } - if err := server.Serve(listener); err != nil { - klog.Errorf("Proxier healthz closed with error: %v", err) - return - } - klog.Error("Unexpected proxier healthz closed.") - }, proxierHealthzRetryInterval, wait.NeverStop) + klog.V(3).Infof("starting healthz on %s", hs.addr) + + if err := server.Serve(listener); err != nil { + return fmt.Errorf("proxier healthz closed with error: %v", err) + } + return nil } type healthzHandler struct { diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/service_health.go b/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/service_health.go index 03b8bf35b5b..4d2fea18cf9 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/service_health.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/service_health.go @@ -24,7 +24,7 @@ import ( "sync" "github.com/lithammer/dedent" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/BUILD index 1773b637e91..98ffef7f2f4 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/BUILD @@ -28,7 +28,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], @@ -57,7 +57,7 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/exec/testing:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go index acabff676c3..61161aecb5e 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go @@ -39,7 +39,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/tools/record" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/proxy" "k8s.io/kubernetes/pkg/proxy/healthcheck" @@ -269,10 +269,8 @@ func NewProxier(ipt utiliptables.Interface, nodePortAddresses []string, ) (*Proxier, error) { // Set the route_localnet sysctl we need for - if val, _ := sysctl.GetSysctl(sysctlRouteLocalnet); val != 1 { - if err := sysctl.SetSysctl(sysctlRouteLocalnet, 1); err != nil { - return nil, fmt.Errorf("can't set sysctl %s: %v", sysctlRouteLocalnet, err) - } + if err := utilproxy.EnsureSysctl(sysctl, sysctlRouteLocalnet, 1); err != nil { + return nil, err } // Proxy needs br_netfilter and bridge-nf-call-iptables=1 when containers @@ -285,18 +283,24 @@ func NewProxier(ipt utiliptables.Interface, // Generate the masquerade mark to use for SNAT rules. masqueradeValue := 1 << uint(masqueradeBit) masqueradeMark := fmt.Sprintf("%#08x", masqueradeValue) + klog.V(2).Infof("iptables(%s) masquerade mark: %s", ipt.Protocol(), masqueradeMark) endpointSlicesEnabled := utilfeature.DefaultFeatureGate.Enabled(features.EndpointSliceProxying) serviceHealthServer := healthcheck.NewServiceHealthServer(hostname, recorder) - isIPv6 := ipt.IsIpv6() + isIPv6 := ipt.IsIPv6() + var incorrectAddresses []string + nodePortAddresses, incorrectAddresses = utilproxy.FilterIncorrectCIDRVersion(nodePortAddresses, isIPv6) + if len(incorrectAddresses) > 0 { + klog.Warning("NodePortAddresses of wrong family; ", incorrectAddresses) + } proxier := &Proxier{ portsMap: make(map[utilproxy.LocalPort]utilproxy.Closeable), serviceMap: make(proxy.ServiceMap), - serviceChanges: proxy.NewServiceChangeTracker(newServiceInfo, &isIPv6, recorder), + serviceChanges: proxy.NewServiceChangeTracker(newServiceInfo, &isIPv6, recorder, nil), endpointsMap: make(proxy.EndpointsMap), - endpointsChanges: proxy.NewEndpointChangeTracker(hostname, newEndpointInfo, &isIPv6, recorder, endpointSlicesEnabled), + endpointsChanges: proxy.NewEndpointChangeTracker(hostname, newEndpointInfo, &isIPv6, recorder, endpointSlicesEnabled, nil), syncPeriod: syncPeriod, iptables: ipt, masqueradeAll: masqueradeAll, @@ -319,15 +323,25 @@ func NewProxier(ipt utiliptables.Interface, nodePortAddresses: nodePortAddresses, networkInterfacer: utilproxy.RealNetwork{}, } + burstSyncs := 2 - klog.V(3).Infof("minSyncPeriod: %v, syncPeriod: %v, burstSyncs: %d", minSyncPeriod, syncPeriod, burstSyncs) + klog.V(2).Infof("iptables(%s) sync params: minSyncPeriod=%v, syncPeriod=%v, burstSyncs=%d", + ipt.Protocol(), minSyncPeriod, syncPeriod, burstSyncs) // We pass syncPeriod to ipt.Monitor, which will call us only if it needs to. // We need to pass *some* maxInterval to NewBoundedFrequencyRunner anyway though. // time.Hour is arbitrary. proxier.syncRunner = async.NewBoundedFrequencyRunner("sync-runner", proxier.syncProxyRules, minSyncPeriod, time.Hour, burstSyncs) + go ipt.Monitor(utiliptables.Chain("KUBE-PROXY-CANARY"), []utiliptables.Table{utiliptables.TableMangle, utiliptables.TableNAT, utiliptables.TableFilter}, proxier.syncProxyRules, syncPeriod, wait.NeverStop) + + if ipt.HasRandomFully() { + klog.V(2).Infof("iptables(%s) supports --random-fully", ipt.Protocol()) + } else { + klog.V(2).Infof("iptables(%s) does not support --random-fully", ipt.Protocol()) + } + return proxier, nil } @@ -348,16 +362,17 @@ func NewDualStackProxier( nodePortAddresses []string, ) (proxy.Provider, error) { // Create an ipv4 instance of the single-stack proxier + nodePortAddresses4, nodePortAddresses6 := utilproxy.FilterIncorrectCIDRVersion(nodePortAddresses, false) ipv4Proxier, err := NewProxier(ipt[0], sysctl, exec, syncPeriod, minSyncPeriod, masqueradeAll, masqueradeBit, localDetectors[0], hostname, - nodeIP[0], recorder, healthzServer, nodePortAddresses) + nodeIP[0], recorder, healthzServer, nodePortAddresses4) if err != nil { return nil, fmt.Errorf("unable to create ipv4 proxier: %v", err) } ipv6Proxier, err := NewProxier(ipt[1], sysctl, exec, syncPeriod, minSyncPeriod, masqueradeAll, masqueradeBit, localDetectors[1], hostname, - nodeIP[1], recorder, healthzServer, nodePortAddresses) + nodeIP[1], recorder, healthzServer, nodePortAddresses6) if err != nil { return nil, fmt.Errorf("unable to create ipv6 proxier: %v", err) } @@ -496,6 +511,7 @@ func (proxier *Proxier) Sync() { if proxier.healthzServer != nil { proxier.healthzServer.QueuedUpdate() } + metrics.SyncProxyRulesLastQueuedTimestamp.SetToCurrentTime() proxier.syncRunner.Run() } @@ -505,6 +521,9 @@ func (proxier *Proxier) SyncLoop() { if proxier.healthzServer != nil { proxier.healthzServer.Updated() } + + // synthesize "last change queued" time as the informers are syncing. + metrics.SyncProxyRulesLastQueuedTimestamp.SetToCurrentTime() proxier.syncRunner.Loop(wait.NeverStop) } @@ -541,7 +560,7 @@ func (proxier *Proxier) OnServiceDelete(service *v1.Service) { } -// OnServiceSynced is called once all the initial even handlers were +// OnServiceSynced is called once all the initial event handlers were // called and the state is fully propagated to local cache. func (proxier *Proxier) OnServiceSynced() { proxier.mu.Lock() @@ -663,7 +682,7 @@ func (proxier *Proxier) OnNodeUpdate(oldNode, node *v1.Node) { proxier.syncProxyRules() } -// OnNodeDelete is called whever deletion of an existing node +// OnNodeDelete is called whenever deletion of an existing node // object is observed. func (proxier *Proxier) OnNodeDelete(node *v1.Node) { if node.Name != proxier.hostname { @@ -722,32 +741,33 @@ func servicePortEndpointChainName(servicePortName string, protocol string, endpo return utiliptables.Chain("KUBE-SEP-" + encoded[:16]) } -// After a UDP endpoint has been removed, we must flush any pending conntrack entries to it, or else we -// risk sending more traffic to it, all of which will be lost (because UDP). +// After a UDP or SCTP endpoint has been removed, we must flush any pending conntrack entries to it, or else we +// risk sending more traffic to it, all of which will be lost. // This assumes the proxier mutex is held // TODO: move it to util func (proxier *Proxier) deleteEndpointConnections(connectionMap []proxy.ServiceEndpoint) { for _, epSvcPair := range connectionMap { - if svcInfo, ok := proxier.serviceMap[epSvcPair.ServicePortName]; ok && svcInfo.Protocol() == v1.ProtocolUDP { + if svcInfo, ok := proxier.serviceMap[epSvcPair.ServicePortName]; ok && conntrack.IsClearConntrackNeeded(svcInfo.Protocol()) { endpointIP := utilproxy.IPPart(epSvcPair.Endpoint) nodePort := svcInfo.NodePort() + svcProto := svcInfo.Protocol() var err error if nodePort != 0 { - err = conntrack.ClearEntriesForPortNAT(proxier.exec, endpointIP, nodePort, v1.ProtocolUDP) + err = conntrack.ClearEntriesForPortNAT(proxier.exec, endpointIP, nodePort, svcProto) } else { - err = conntrack.ClearEntriesForNAT(proxier.exec, svcInfo.ClusterIP().String(), endpointIP, v1.ProtocolUDP) + err = conntrack.ClearEntriesForNAT(proxier.exec, svcInfo.ClusterIP().String(), endpointIP, svcProto) } if err != nil { klog.Errorf("Failed to delete %s endpoint connections, error: %v", epSvcPair.ServicePortName.String(), err) } for _, extIP := range svcInfo.ExternalIPStrings() { - err := conntrack.ClearEntriesForNAT(proxier.exec, extIP, endpointIP, v1.ProtocolUDP) + err := conntrack.ClearEntriesForNAT(proxier.exec, extIP, endpointIP, svcProto) if err != nil { klog.Errorf("Failed to delete %s endpoint connections for externalIP %s, error: %v", epSvcPair.ServicePortName.String(), extIP, err) } } for _, lbIP := range svcInfo.LoadBalancerIPStrings() { - err := conntrack.ClearEntriesForNAT(proxier.exec, lbIP, endpointIP, v1.ProtocolUDP) + err := conntrack.ClearEntriesForNAT(proxier.exec, lbIP, endpointIP, svcProto) if err != nil { klog.Errorf("Failed to delete %s endpoint connections for LoabBalancerIP %s, error: %v", epSvcPair.ServicePortName.String(), lbIP, err) } @@ -786,7 +806,7 @@ func (proxier *Proxier) syncProxyRules() { start := time.Now() defer func() { metrics.SyncProxyRulesLatency.Observe(metrics.SinceInSeconds(start)) - klog.V(4).Infof("syncProxyRules took %v", time.Since(start)) + klog.V(2).Infof("syncProxyRules took %v", time.Since(start)) }() localAddrs, err := utilproxy.GetLocalAddrs() @@ -799,6 +819,11 @@ func (proxier *Proxier) syncProxyRules() { localAddrSet := utilnet.IPSet{} localAddrSet.Insert(localAddrs...) + nodeAddresses, err := utilproxy.GetNodeAddresses(proxier.nodePortAddresses, proxier.networkInterfacer) + if err != nil { + klog.Errorf("Failed to get node ip address matching nodeport cidrs %v, services with nodeport may not work as intended: %v", proxier.nodePortAddresses, err) + } + // We assume that if this was called, we really want to sync them, // even if nothing changed in the meantime. In other words, callers are // responsible for detecting no-op changes and not calling this function. @@ -808,8 +833,8 @@ func (proxier *Proxier) syncProxyRules() { staleServices := serviceUpdateResult.UDPStaleClusterIP // merge stale services gathered from updateEndpointsMap for _, svcPortName := range endpointUpdateResult.StaleServiceNames { - if svcInfo, ok := proxier.serviceMap[svcPortName]; ok && svcInfo != nil && svcInfo.Protocol() == v1.ProtocolUDP { - klog.V(2).Infof("Stale udp service %v -> %s", svcPortName, svcInfo.ClusterIP().String()) + if svcInfo, ok := proxier.serviceMap[svcPortName]; ok && svcInfo != nil && conntrack.IsClearConntrackNeeded(svcInfo.Protocol()) { + klog.V(2).Infof("Stale %s service %v -> %s", strings.ToLower(string(svcInfo.Protocol())), svcPortName, svcInfo.ClusterIP().String()) staleServices.Insert(svcInfo.ClusterIP().String()) for _, extIP := range svcInfo.ExternalIPStrings() { staleServices.Insert(extIP) @@ -817,7 +842,7 @@ func (proxier *Proxier) syncProxyRules() { } } - klog.V(3).Info("Syncing iptables rules") + klog.V(2).Info("Syncing iptables rules") success := false defer func() { @@ -918,9 +943,6 @@ func (proxier *Proxier) syncProxyRules() { } if proxier.iptables.HasRandomFully() { masqRule = append(masqRule, "--random-fully") - klog.V(3).Info("Using `--random-fully` in the MASQUERADE rule for iptables") - } else { - klog.V(3).Info("Not using `--random-fully` in the MASQUERADE rule for iptables because the local version of iptables does not support it") } writeLine(proxier.natRules, masqRule...) @@ -1043,7 +1065,7 @@ func (proxier *Proxier) syncProxyRules() { // If the "external" IP happens to be an IP that is local to this // machine, hold the local port open so no other process can open it // (because the socket might open but it would never work). - if localAddrSet.Len() > 0 && (svcInfo.Protocol() != v1.ProtocolSCTP) && localAddrSet.Has(net.ParseIP(externalIP)) { + if (svcInfo.Protocol() != v1.ProtocolSCTP) && localAddrSet.Has(net.ParseIP(externalIP)) { lp := utilproxy.LocalPort{ Description: "externalIP for " + svcNameString, IP: externalIP, @@ -1198,14 +1220,12 @@ func (proxier *Proxier) syncProxyRules() { if svcInfo.NodePort() != 0 { // Hold the local port open so no other process can open it // (because the socket might open but it would never work). - addresses, err := utilproxy.GetNodeAddresses(proxier.nodePortAddresses, proxier.networkInterfacer) - if err != nil { - klog.Errorf("Failed to get node ip address matching nodeport cidr: %v", err) + if len(nodeAddresses) == 0 { continue } lps := make([]utilproxy.LocalPort, 0) - for address := range addresses { + for address := range nodeAddresses { lp := utilproxy.LocalPort{ Description: "nodePort for " + svcNameString, IP: address, @@ -1467,36 +1487,31 @@ func (proxier *Proxier) syncProxyRules() { // Finally, tail-call to the nodeports chain. This needs to be after all // other service portal rules. - addresses, err := utilproxy.GetNodeAddresses(proxier.nodePortAddresses, proxier.networkInterfacer) - if err != nil { - klog.Errorf("Failed to get node ip address matching nodeport cidr") - } else { - isIPv6 := proxier.iptables.IsIpv6() - for address := range addresses { - // TODO(thockin, m1093782566): If/when we have dual-stack support we will want to distinguish v4 from v6 zero-CIDRs. - if utilproxy.IsZeroCIDR(address) { - args = append(args[:0], - "-A", string(kubeServicesChain), - "-m", "comment", "--comment", `"kubernetes service nodeports; NOTE: this must be the last rule in this chain"`, - "-m", "addrtype", "--dst-type", "LOCAL", - "-j", string(kubeNodePortsChain)) - writeLine(proxier.natRules, args...) - // Nothing else matters after the zero CIDR. - break - } - // Ignore IP addresses with incorrect version - if isIPv6 && !utilnet.IsIPv6String(address) || !isIPv6 && utilnet.IsIPv6String(address) { - klog.Errorf("IP address %s has incorrect IP version", address) - continue - } - // create nodeport rules for each IP one by one + isIPv6 := proxier.iptables.IsIPv6() + for address := range nodeAddresses { + // TODO(thockin, m1093782566): If/when we have dual-stack support we will want to distinguish v4 from v6 zero-CIDRs. + if utilproxy.IsZeroCIDR(address) { args = append(args[:0], "-A", string(kubeServicesChain), "-m", "comment", "--comment", `"kubernetes service nodeports; NOTE: this must be the last rule in this chain"`, - "-d", address, + "-m", "addrtype", "--dst-type", "LOCAL", "-j", string(kubeNodePortsChain)) writeLine(proxier.natRules, args...) + // Nothing else matters after the zero CIDR. + break } + // Ignore IP addresses with incorrect version + if isIPv6 && !utilnet.IsIPv6String(address) || !isIPv6 && utilnet.IsIPv6String(address) { + klog.Errorf("IP address %s has incorrect IP version", address) + continue + } + // create nodeport rules for each IP one by one + args = append(args[:0], + "-A", string(kubeServicesChain), + "-m", "comment", "--comment", `"kubernetes service nodeports; NOTE: this must be the last rule in this chain"`, + "-d", address, + "-j", string(kubeNodePortsChain)) + writeLine(proxier.natRules, args...) } // Drop the packets in INVALID state, which would potentially cause diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/BUILD index 9da47dbd4f7..371017c947f 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/BUILD @@ -78,7 +78,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ] + select({ diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/README.md b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/README.md index 93636437bba..5dcaa530f65 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/README.md +++ b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/README.md @@ -62,7 +62,7 @@ IPVS proxier will fall back on IPTABLES in the following scenarios. **1. kube-proxy starts with --masquerade-all=true** -If kube-proxy starts with `--masquerade-all=true`, IPVS proxier will masquerade all traffic accessing service Cluster IP, which behaves the same as what IPTABLES proxier. Suppose kube-proxy have flag `--masquerade-all=true` specified, then the IPTABLES installed by IPVS proxier should be like what is shown below. +If kube-proxy starts with `--masquerade-all=true`, IPVS proxier will masquerade all traffic accessing service Cluster IP, which behaves the same as what IPTABLES proxier. Suppose kube-proxy has flag `--masquerade-all=true` specified, then the IPTABLES installed by IPVS proxier should be like what is shown below. ```shell # iptables -t nat -nL @@ -133,7 +133,7 @@ ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 match-set KUBE-CLU For loadBalancer type service, IPVS proxier will install IPTABLES with match of ipset `KUBE-LOAD-BALANCER`. Specially when service's `LoadBalancerSourceRanges` is specified or specified `externalTrafficPolicy=local`, IPVS proxier will create ipset sets `KUBE-LOAD-BALANCER-LOCAL`/`KUBE-LOAD-BALANCER-FW`/`KUBE-LOAD-BALANCER-SOURCE-CIDR` -and install IPTABLES accordingly, which should looks like what is shown below. +and install IPTABLES accordingly, which should look like what is shown below. ```shell # iptables -t nat -nL @@ -184,7 +184,7 @@ ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 match-set KUBE-LOA For NodePort type service, IPVS proxier will install IPTABLES with match of ipset `KUBE-NODE-PORT-TCP/KUBE-NODE-PORT-UDP`. When specified `externalTrafficPolicy=local`, IPVS proxier will create ipset sets `KUBE-NODE-PORT-LOCAL-TCP/KUBE-NODE-PORT-LOCAL-UDP` -and install IPTABLES accordingly, which should looks like what is shown below. +and install IPTABLES accordingly, which should look like what is shown below. Suppose service with TCP type nodePort. @@ -223,7 +223,7 @@ KUBE-NODE-PORT all -- 0.0.0.0/0 0.0.0.0/0 match-set KUB **5. Service with externalIPs specified** For service with `externalIPs` specified, IPVS proxier will install IPTABLES with match of ipset `KUBE-EXTERNAL-IP`, -Suppose we have service with `externalIPs` specified, IPTABLES rules should looks like what is shown below. +Suppose we have service with `externalIPs` specified, IPTABLES rules should look like what is shown below. ```shell Chain PREROUTING (policy ACCEPT) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/graceful_termination.go b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/graceful_termination.go index c7f0897fad1..f4bdd3cb502 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/graceful_termination.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/graceful_termination.go @@ -18,12 +18,11 @@ package ipvs import ( "fmt" - "strings" "sync" "time" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" utilipvs "k8s.io/kubernetes/pkg/util/ipvs" ) @@ -164,10 +163,10 @@ func (m *GracefulTerminationManager) deleteRsFunc(rsToDelete *listItem) (bool, e } for _, rs := range rss { if rsToDelete.RealServer.Equal(rs) { - // For UDP traffic, no graceful termination, we immediately delete the RS + // For UDP and SCTP traffic, no graceful termination, we immediately delete the RS // (existing connections will be deleted on the next packet because sysctlExpireNoDestConn=1) // For other protocols, don't delete until all connections have expired) - if strings.ToUpper(rsToDelete.VirtualServer.Protocol) != "UDP" && rs.ActiveConn+rs.InactiveConn != 0 { + if utilipvs.IsRsGracefulTerminationNeeded(rsToDelete.VirtualServer.Protocol) && rs.ActiveConn+rs.InactiveConn != 0 { klog.V(5).Infof("Not deleting, RS %v: %v ActiveConn, %v InactiveConn", rsToDelete.String(), rs.ActiveConn, rs.InactiveConn) return false, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/ipset.go b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/ipset.go index 7b75ec879c2..4ed9790cc7c 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/ipset.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/ipset.go @@ -24,7 +24,7 @@ import ( "fmt" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/netlink_linux.go b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/netlink_linux.go index f99d34f558c..cb27c620807 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/netlink_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/netlink_linux.go @@ -135,7 +135,7 @@ func (h *netlinkHandle) ListBindAddress(devName string) ([]string, error) { // 172.17.0.1 dev docker0 scope host src 172.17.0.1 // 192.168.122.1 dev virbr0 scope host src 192.168.122.1 // Then cut the unique src IP fields, -// --> result set: [10.0.0.1, 10.0.0.10, 10.0.0.252, 100.106.89.164, 127.0.0.1, 192.168.122.1] +// --> result set: [10.0.0.1, 10.0.0.10, 10.0.0.252, 100.106.89.164, 127.0.0.1, 172.17.0.1, 192.168.122.1] // If dev is specified, it's equivalent to exec: // $ ip route show table local type local proto kernel dev kube-ipvs0 diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/proxier.go b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/proxier.go index a042b4e177a..872cbe990e7 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/proxier.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/proxier.go @@ -31,7 +31,7 @@ import ( "sync/atomic" "time" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" utilnet "k8s.io/utils/net" @@ -88,6 +88,8 @@ const ( // DefaultDummyDevice is the default dummy interface which ipvs service address will bind to it. DefaultDummyDevice = "kube-ipvs0" + + connReuseMinSupportedKernelVersion = "4.1" ) // iptablesJumpChain is tables of iptables chains that ipvs proxier used to install iptables or cleanup iptables. @@ -260,9 +262,10 @@ type Proxier struct { gracefuldeleteManager *GracefulTerminationManager } -// IPGetter helps get node network interface IP +// IPGetter helps get node network interface IP and IPs binded to the IPVS dummy interface type IPGetter interface { NodeIPs() ([]net.IP, error) + BindedIPs() (sets.String, error) } // realIPGetter is a real NodeIP handler, it implements IPGetter. @@ -284,7 +287,7 @@ type realIPGetter struct { // 172.17.0.1 dev docker0 scope host src 172.17.0.1 // 192.168.122.1 dev virbr0 scope host src 192.168.122.1 // Then filter out dev==kube-ipvs0, and cut the unique src IP fields, -// Node IP set: [100.106.89.164, 127.0.0.1, 192.168.122.1] +// Node IP set: [100.106.89.164, 127.0.0.1, 172.17.0.1, 192.168.122.1] func (r *realIPGetter) NodeIPs() (ips []net.IP, err error) { // Pass in empty filter device name for list all LOCAL type addresses. nodeAddress, err := r.nl.GetLocalAddresses("", DefaultDummyDevice) @@ -298,6 +301,11 @@ func (r *realIPGetter) NodeIPs() (ips []net.IP, err error) { return ips, nil } +// BindedIPs returns all addresses that are binded to the IPVS dummy interface kube-ipvs0 +func (r *realIPGetter) BindedIPs() (sets.String, error) { + return r.nl.GetLocalAddresses(DefaultDummyDevice, "") +} + // Proxier implements proxy.Provider var _ proxy.Provider = &Proxier{} @@ -342,12 +350,11 @@ func NewProxier(ipt utiliptables.Interface, healthzServer healthcheck.ProxierHealthUpdater, scheduler string, nodePortAddresses []string, + kernelHandler KernelHandler, ) (*Proxier, error) { // Set the route_localnet sysctl we need for - if val, _ := sysctl.GetSysctl(sysctlRouteLocalnet); val != 1 { - if err := sysctl.SetSysctl(sysctlRouteLocalnet, 1); err != nil { - return nil, fmt.Errorf("can't set sysctl %s: %v", sysctlRouteLocalnet, err) - } + if err := utilproxy.EnsureSysctl(sysctl, sysctlRouteLocalnet, 1); err != nil { + return nil, err } // Proxy needs br_netfilter and bridge-nf-call-iptables=1 when containers @@ -358,53 +365,51 @@ func NewProxier(ipt utiliptables.Interface, } // Set the conntrack sysctl we need for - if val, _ := sysctl.GetSysctl(sysctlVSConnTrack); val != 1 { - if err := sysctl.SetSysctl(sysctlVSConnTrack, 1); err != nil { - return nil, fmt.Errorf("can't set sysctl %s: %v", sysctlVSConnTrack, err) - } + if err := utilproxy.EnsureSysctl(sysctl, sysctlVSConnTrack, 1); err != nil { + return nil, err } - // Set the connection reuse mode - if val, _ := sysctl.GetSysctl(sysctlConnReuse); val != 0 { - if err := sysctl.SetSysctl(sysctlConnReuse, 0); err != nil { - return nil, fmt.Errorf("can't set sysctl %s: %v", sysctlConnReuse, err) + kernelVersionStr, err := kernelHandler.GetKernelVersion() + if err != nil { + return nil, fmt.Errorf("error determining kernel version to find required kernel modules for ipvs support: %v", err) + } + kernelVersion, err := version.ParseGeneric(kernelVersionStr) + if err != nil { + return nil, fmt.Errorf("error parsing kernel version %q: %v", kernelVersionStr, err) + } + if kernelVersion.LessThan(version.MustParseGeneric(connReuseMinSupportedKernelVersion)) { + klog.Errorf("can't set sysctl %s, kernel version must be at least %s", sysctlConnReuse, connReuseMinSupportedKernelVersion) + } else { + // Set the connection reuse mode + if err := utilproxy.EnsureSysctl(sysctl, sysctlConnReuse, 0); err != nil { + return nil, err } } // Set the expire_nodest_conn sysctl we need for - if val, _ := sysctl.GetSysctl(sysctlExpireNoDestConn); val != 1 { - if err := sysctl.SetSysctl(sysctlExpireNoDestConn, 1); err != nil { - return nil, fmt.Errorf("can't set sysctl %s: %v", sysctlExpireNoDestConn, err) - } + if err := utilproxy.EnsureSysctl(sysctl, sysctlExpireNoDestConn, 1); err != nil { + return nil, err } // Set the expire_quiescent_template sysctl we need for - if val, _ := sysctl.GetSysctl(sysctlExpireQuiescentTemplate); val != 1 { - if err := sysctl.SetSysctl(sysctlExpireQuiescentTemplate, 1); err != nil { - return nil, fmt.Errorf("can't set sysctl %s: %v", sysctlExpireQuiescentTemplate, err) - } + if err := utilproxy.EnsureSysctl(sysctl, sysctlExpireQuiescentTemplate, 1); err != nil { + return nil, err } // Set the ip_forward sysctl we need for - if val, _ := sysctl.GetSysctl(sysctlForward); val != 1 { - if err := sysctl.SetSysctl(sysctlForward, 1); err != nil { - return nil, fmt.Errorf("can't set sysctl %s: %v", sysctlForward, err) - } + if err := utilproxy.EnsureSysctl(sysctl, sysctlForward, 1); err != nil { + return nil, err } if strictARP { // Set the arp_ignore sysctl we need for - if val, _ := sysctl.GetSysctl(sysctlArpIgnore); val != 1 { - if err := sysctl.SetSysctl(sysctlArpIgnore, 1); err != nil { - return nil, fmt.Errorf("can't set sysctl %s: %v", sysctlArpIgnore, err) - } + if err := utilproxy.EnsureSysctl(sysctl, sysctlArpIgnore, 1); err != nil { + return nil, err } // Set the arp_announce sysctl we need for - if val, _ := sysctl.GetSysctl(sysctlArpAnnounce); val != 2 { - if err := sysctl.SetSysctl(sysctlArpAnnounce, 2); err != nil { - return nil, fmt.Errorf("can't set sysctl %s: %v", sysctlArpAnnounce, err) - } + if err := utilproxy.EnsureSysctl(sysctl, sysctlArpAnnounce, 2); err != nil { + return nil, err } } @@ -434,12 +439,17 @@ func NewProxier(ipt utiliptables.Interface, endpointSlicesEnabled := utilfeature.DefaultFeatureGate.Enabled(features.EndpointSliceProxying) + var incorrectAddresses []string + nodePortAddresses, incorrectAddresses = utilproxy.FilterIncorrectCIDRVersion(nodePortAddresses, isIPv6) + if len(incorrectAddresses) > 0 { + klog.Warning("NodePortAddresses of wrong family; ", incorrectAddresses) + } proxier := &Proxier{ portsMap: make(map[utilproxy.LocalPort]utilproxy.Closeable), serviceMap: make(proxy.ServiceMap), - serviceChanges: proxy.NewServiceChangeTracker(newServiceInfo, &isIPv6, recorder), + serviceChanges: proxy.NewServiceChangeTracker(newServiceInfo, &isIPv6, recorder, nil), endpointsMap: make(proxy.EndpointsMap), - endpointsChanges: proxy.NewEndpointChangeTracker(hostname, nil, &isIPv6, recorder, endpointSlicesEnabled), + endpointsChanges: proxy.NewEndpointChangeTracker(hostname, nil, &isIPv6, recorder, endpointSlicesEnabled, nil), syncPeriod: syncPeriod, minSyncPeriod: minSyncPeriod, excludeCIDRs: parseExcludedCIDRs(excludeCIDRs), @@ -475,7 +485,8 @@ func NewProxier(ipt utiliptables.Interface, proxier.ipsetList[is.name] = NewIPSet(ipset, is.name, is.setType, isIPv6, is.comment) } burstSyncs := 2 - klog.V(3).Infof("minSyncPeriod: %v, syncPeriod: %v, burstSyncs: %d", minSyncPeriod, syncPeriod, burstSyncs) + klog.V(2).Infof("ipvs(%s) sync params: minSyncPeriod=%v, syncPeriod=%v, burstSyncs=%d", + ipt.Protocol(), minSyncPeriod, syncPeriod, burstSyncs) proxier.syncRunner = async.NewBoundedFrequencyRunner("sync-runner", proxier.syncProxyRules, minSyncPeriod, syncPeriod, burstSyncs) proxier.gracefuldeleteManager.Run() return proxier, nil @@ -504,16 +515,19 @@ func NewDualStackProxier( healthzServer healthcheck.ProxierHealthUpdater, scheduler string, nodePortAddresses []string, + kernelHandler KernelHandler, ) (proxy.Provider, error) { safeIpset := newSafeIpset(ipset) + nodePortAddresses4, nodePortAddresses6 := utilproxy.FilterIncorrectCIDRVersion(nodePortAddresses, false) + // Create an ipv4 instance of the single-stack proxier ipv4Proxier, err := NewProxier(ipt[0], ipvs, safeIpset, sysctl, exec, syncPeriod, minSyncPeriod, filterCIDRs(false, excludeCIDRs), strictARP, tcpTimeout, tcpFinTimeout, udpTimeout, masqueradeAll, masqueradeBit, localDetectors[0], hostname, nodeIP[0], - recorder, healthzServer, scheduler, nodePortAddresses) + recorder, healthzServer, scheduler, nodePortAddresses4, kernelHandler) if err != nil { return nil, fmt.Errorf("unable to create ipv4 proxier: %v", err) } @@ -522,7 +536,7 @@ func NewDualStackProxier( exec, syncPeriod, minSyncPeriod, filterCIDRs(true, excludeCIDRs), strictARP, tcpTimeout, tcpFinTimeout, udpTimeout, masqueradeAll, masqueradeBit, localDetectors[1], hostname, nodeIP[1], - nil, nil, scheduler, nodePortAddresses) + nil, nil, scheduler, nodePortAddresses6, kernelHandler) if err != nil { return nil, fmt.Errorf("unable to create ipv6 proxier: %v", err) } @@ -592,7 +606,7 @@ func (handle *LinuxKernelHandler) GetModules() ([]string, error) { } ipvsModules := utilipvs.GetRequiredIPVSModules(kernelVersion) - var bmods []string + var bmods, lmods []string // Find out loaded kernel modules. If this is a full static kernel it will try to verify if the module is compiled using /boot/config-KERNELVERSION modulesFile, err := os.Open("/proc/modules") @@ -634,11 +648,15 @@ func (handle *LinuxKernelHandler) GetModules() ([]string, error) { if err != nil { klog.Warningf("Failed to load kernel module %v with modprobe. "+ "You can ignore this message when kube-proxy is running inside container without mounting /lib/modules", module) + } else { + lmods = append(lmods, module) } } } - return append(mods, bmods...), nil + mods = append(mods, bmods...) + mods = append(mods, lmods...) + return mods, nil } // getFirstColumn reads all the content from r into memory and return a @@ -806,6 +824,7 @@ func (proxier *Proxier) Sync() { if proxier.healthzServer != nil { proxier.healthzServer.QueuedUpdate() } + metrics.SyncProxyRulesLastQueuedTimestamp.SetToCurrentTime() proxier.syncRunner.Run() } @@ -815,6 +834,8 @@ func (proxier *Proxier) SyncLoop() { if proxier.healthzServer != nil { proxier.healthzServer.Updated() } + // synthesize "last change queued" time as the informers are syncing. + metrics.SyncProxyRulesLastQueuedTimestamp.SetToCurrentTime() proxier.syncRunner.Loop(wait.NeverStop) } @@ -964,7 +985,7 @@ func (proxier *Proxier) OnNodeUpdate(oldNode, node *v1.Node) { proxier.syncProxyRules() } -// OnNodeDelete is called whever deletion of an existing node +// OnNodeDelete is called whenever deletion of an existing node // object is observed. func (proxier *Proxier) OnNodeDelete(node *v1.Node) { if node.Name != proxier.hostname { @@ -1024,8 +1045,8 @@ func (proxier *Proxier) syncProxyRules() { staleServices := serviceUpdateResult.UDPStaleClusterIP // merge stale services gathered from updateEndpointsMap for _, svcPortName := range endpointUpdateResult.StaleServiceNames { - if svcInfo, ok := proxier.serviceMap[svcPortName]; ok && svcInfo != nil && svcInfo.Protocol() == v1.ProtocolUDP { - klog.V(2).Infof("Stale udp service %v -> %s", svcPortName, svcInfo.ClusterIP().String()) + if svcInfo, ok := proxier.serviceMap[svcPortName]; ok && svcInfo != nil && conntrack.IsClearConntrackNeeded(svcInfo.Protocol()) { + klog.V(2).Infof("Stale %s service %v -> %s", strings.ToLower(string(svcInfo.Protocol())), svcPortName, svcInfo.ClusterIP().String()) staleServices.Insert(svcInfo.ClusterIP().String()) for _, extIP := range svcInfo.ExternalIPStrings() { staleServices.Insert(extIP) @@ -1074,6 +1095,11 @@ func (proxier *Proxier) syncProxyRules() { // activeBindAddrs represents ip address successfully bind to DefaultDummyDevice in this round of sync activeBindAddrs := map[string]bool{} + bindedAddresses, err := proxier.ipGetter.BindedIPs() + if err != nil { + klog.Errorf("error listing addresses binded to dummy interface, error: %v", err) + } + hasNodePort := false for _, svc := range proxier.serviceMap { svcInfo, ok := svc.(*serviceInfo) @@ -1096,8 +1122,7 @@ func (proxier *Proxier) syncProxyRules() { nodeAddrSet, err := utilproxy.GetNodeAddresses(proxier.nodePortAddresses, proxier.networkInterfacer) if err != nil { klog.Errorf("Failed to get node ip address matching nodeport cidr: %v", err) - } - if err == nil && nodeAddrSet.Len() > 0 { + } else { nodeAddresses = nodeAddrSet.List() for _, address := range nodeAddresses { if utilproxy.IsZeroCIDR(address) { @@ -1183,7 +1208,7 @@ func (proxier *Proxier) syncProxyRules() { serv.Timeout = uint32(svcInfo.StickyMaxAgeSeconds()) } // We need to bind ClusterIP to dummy interface, so set `bindAddr` parameter to `true` in syncService() - if err := proxier.syncService(svcNameString, serv, true); err == nil { + if err := proxier.syncService(svcNameString, serv, true, bindedAddresses); err == nil { activeIPVSServices[serv.String()] = true activeBindAddrs[serv.Address.String()] = true // ExternalTrafficPolicy only works for NodePort and external LB traffic, does not affect ClusterIP @@ -1200,7 +1225,7 @@ func (proxier *Proxier) syncProxyRules() { // If the "external" IP happens to be an IP that is local to this // machine, hold the local port open so no other process can open it // (because the socket might open but it would never work). - if localAddrSet.Len() > 0 && (svcInfo.Protocol() != v1.ProtocolSCTP) && localAddrSet.Has(net.ParseIP(externalIP)) { + if (svcInfo.Protocol() != v1.ProtocolSCTP) && localAddrSet.Has(net.ParseIP(externalIP)) { // We do not start listening on SCTP ports, according to our agreement in the SCTP support KEP lp := utilproxy.LocalPort{ Description: "externalIP for " + svcNameString, @@ -1264,7 +1289,7 @@ func (proxier *Proxier) syncProxyRules() { serv.Flags |= utilipvs.FlagPersistent serv.Timeout = uint32(svcInfo.StickyMaxAgeSeconds()) } - if err := proxier.syncService(svcNameString, serv, true); err == nil { + if err := proxier.syncService(svcNameString, serv, true, bindedAddresses); err == nil { activeIPVSServices[serv.String()] = true activeBindAddrs[serv.Address.String()] = true @@ -1370,7 +1395,7 @@ func (proxier *Proxier) syncProxyRules() { serv.Flags |= utilipvs.FlagPersistent serv.Timeout = uint32(svcInfo.StickyMaxAgeSeconds()) } - if err := proxier.syncService(svcNameString, serv, true); err == nil { + if err := proxier.syncService(svcNameString, serv, true, bindedAddresses); err == nil { activeIPVSServices[serv.String()] = true activeBindAddrs[serv.Address.String()] = true if err := proxier.syncEndpoint(svcName, svcInfo.OnlyNodeLocalEndpoints(), serv); err != nil { @@ -1527,7 +1552,7 @@ func (proxier *Proxier) syncProxyRules() { serv.Timeout = uint32(svcInfo.StickyMaxAgeSeconds()) } // There is no need to bind Node IP to dummy interface, so set parameter `bindAddr` to `false`. - if err := proxier.syncService(svcNameString, serv, false); err == nil { + if err := proxier.syncService(svcNameString, serv, false, bindedAddresses); err == nil { activeIPVSServices[serv.String()] = true if err := proxier.syncEndpoint(svcName, svcInfo.OnlyNodeLocalEndpoints(), serv); err != nil { klog.Errorf("Failed to sync endpoint for service: %v, err: %v", serv, err) @@ -1880,25 +1905,26 @@ func (proxier *Proxier) getExistingChains(buffer *bytes.Buffer, table utiliptabl return nil } -// After a UDP endpoint has been removed, we must flush any pending conntrack entries to it, or else we +// After a UDP or SCTP endpoint has been removed, we must flush any pending conntrack entries to it, or else we // risk sending more traffic to it, all of which will be lost (because UDP). // This assumes the proxier mutex is held func (proxier *Proxier) deleteEndpointConnections(connectionMap []proxy.ServiceEndpoint) { for _, epSvcPair := range connectionMap { - if svcInfo, ok := proxier.serviceMap[epSvcPair.ServicePortName]; ok && svcInfo.Protocol() == v1.ProtocolUDP { + if svcInfo, ok := proxier.serviceMap[epSvcPair.ServicePortName]; ok && conntrack.IsClearConntrackNeeded(svcInfo.Protocol()) { endpointIP := utilproxy.IPPart(epSvcPair.Endpoint) - err := conntrack.ClearEntriesForNAT(proxier.exec, svcInfo.ClusterIP().String(), endpointIP, v1.ProtocolUDP) + svcProto := svcInfo.Protocol() + err := conntrack.ClearEntriesForNAT(proxier.exec, svcInfo.ClusterIP().String(), endpointIP, svcProto) if err != nil { klog.Errorf("Failed to delete %s endpoint connections, error: %v", epSvcPair.ServicePortName.String(), err) } for _, extIP := range svcInfo.ExternalIPStrings() { - err := conntrack.ClearEntriesForNAT(proxier.exec, extIP, endpointIP, v1.ProtocolUDP) + err := conntrack.ClearEntriesForNAT(proxier.exec, extIP, endpointIP, svcProto) if err != nil { klog.Errorf("Failed to delete %s endpoint connections for externalIP %s, error: %v", epSvcPair.ServicePortName.String(), extIP, err) } } for _, lbIP := range svcInfo.LoadBalancerIPStrings() { - err := conntrack.ClearEntriesForNAT(proxier.exec, lbIP, endpointIP, v1.ProtocolUDP) + err := conntrack.ClearEntriesForNAT(proxier.exec, lbIP, endpointIP, svcProto) if err != nil { klog.Errorf("Failed to delete %s endpoint connections for LoadBalancerIP %s, error: %v", epSvcPair.ServicePortName.String(), lbIP, err) } @@ -1907,7 +1933,7 @@ func (proxier *Proxier) deleteEndpointConnections(connectionMap []proxy.ServiceE } } -func (proxier *Proxier) syncService(svcName string, vs *utilipvs.VirtualServer, bindAddr bool) error { +func (proxier *Proxier) syncService(svcName string, vs *utilipvs.VirtualServer, bindAddr bool, bindedAddresses sets.String) error { appliedVirtualServer, _ := proxier.ipvs.GetVirtualServer(vs) if appliedVirtualServer == nil || !appliedVirtualServer.Equal(vs) { if appliedVirtualServer == nil { @@ -1928,9 +1954,14 @@ func (proxier *Proxier) syncService(svcName string, vs *utilipvs.VirtualServer, } } - // bind service address to dummy interface even if service not changed, - // in case that service IP was removed by other processes + // bind service address to dummy interface if bindAddr { + // always attempt to bind if bindedAddresses is nil, + // otherwise check if it's already binded and return early + if bindedAddresses != nil && bindedAddresses.Has(vs.Address.String()) { + return nil + } + klog.V(4).Infof("Bind addr %s", vs.Address.String()) _, err := proxier.netlinkHandle.EnsureAddressBind(vs.Address.String(), DefaultDummyDevice) if err != nil { @@ -1938,6 +1969,7 @@ func (proxier *Proxier) syncService(svcName string, vs *utilipvs.VirtualServer, return err } } + return nil } @@ -2093,10 +2125,10 @@ func (proxier *Proxier) isIPInExcludeCIDRs(ip net.IP) bool { func (proxier *Proxier) getLegacyBindAddr(activeBindAddrs map[string]bool, currentBindAddrs []string) map[string]bool { legacyAddrs := make(map[string]bool) - isIpv6 := utilnet.IsIPv6(proxier.nodeIP) + isIPv6 := utilnet.IsIPv6(proxier.nodeIP) for _, addr := range currentBindAddrs { - addrIsIpv6 := utilnet.IsIPv6(net.ParseIP(addr)) - if addrIsIpv6 && !isIpv6 || !addrIsIpv6 && isIpv6 { + addrIsIPv6 := utilnet.IsIPv6(net.ParseIP(addr)) + if addrIsIPv6 && !isIPv6 || !addrIsIPv6 && isIPv6 { continue } if _, ok := activeBindAddrs[addr]; !ok { diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/metaproxier/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/metaproxier/BUILD index cbe5ad577c0..8960baf81a7 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/metaproxier/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/metaproxier/BUILD @@ -9,9 +9,10 @@ go_library( deps = [ "//pkg/proxy:go_default_library", "//pkg/proxy/config:go_default_library", + "//pkg/proxy/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/metaproxier/meta_proxier.go b/vendor/k8s.io/kubernetes/pkg/proxy/metaproxier/meta_proxier.go index 21cae0d9947..9dfdfdb02ee 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/metaproxier/meta_proxier.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/metaproxier/meta_proxier.go @@ -19,10 +19,11 @@ package metaproxier import ( "fmt" - "k8s.io/api/core/v1" - "k8s.io/klog" + v1 "k8s.io/api/core/v1" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/proxy" "k8s.io/kubernetes/pkg/proxy/config" + utilproxy "k8s.io/kubernetes/pkg/proxy/util" utilnet "k8s.io/utils/net" @@ -62,33 +63,41 @@ func (proxier *metaProxier) SyncLoop() { // OnServiceAdd is called whenever creation of new service object is observed. func (proxier *metaProxier) OnServiceAdd(service *v1.Service) { - if *(service.Spec.IPFamily) == v1.IPv4Protocol { - proxier.ipv4Proxier.OnServiceAdd(service) + if utilproxy.ShouldSkipService(service) { return } - proxier.ipv6Proxier.OnServiceAdd(service) + if utilnet.IsIPv6String(service.Spec.ClusterIP) { + proxier.ipv6Proxier.OnServiceAdd(service) + } else { + proxier.ipv4Proxier.OnServiceAdd(service) + } } // OnServiceUpdate is called whenever modification of an existing // service object is observed. func (proxier *metaProxier) OnServiceUpdate(oldService, service *v1.Service) { - // IPFamily is immutable, hence we only need to check on the new service - if *(service.Spec.IPFamily) == v1.IPv4Protocol { - proxier.ipv4Proxier.OnServiceUpdate(oldService, service) + if utilproxy.ShouldSkipService(service) { return } - - proxier.ipv6Proxier.OnServiceUpdate(oldService, service) + // IPFamily is immutable, hence we only need to check on the new service + if utilnet.IsIPv6String(service.Spec.ClusterIP) { + proxier.ipv6Proxier.OnServiceUpdate(oldService, service) + } else { + proxier.ipv4Proxier.OnServiceUpdate(oldService, service) + } } // OnServiceDelete is called whenever deletion of an existing service // object is observed. func (proxier *metaProxier) OnServiceDelete(service *v1.Service) { - if *(service.Spec.IPFamily) == v1.IPv4Protocol { - proxier.ipv4Proxier.OnServiceDelete(service) + if utilproxy.ShouldSkipService(service) { return } - proxier.ipv6Proxier.OnServiceDelete(service) + if utilnet.IsIPv6String(service.Spec.ClusterIP) { + proxier.ipv6Proxier.OnServiceDelete(service) + } else { + proxier.ipv4Proxier.OnServiceDelete(service) + } } // OnServiceSynced is called once all the initial event handlers were diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/metrics/metrics.go b/vendor/k8s.io/kubernetes/pkg/proxy/metrics/metrics.go index 31fecbd2a14..e917704c7c5 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/metrics/metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/metrics/metrics.go @@ -125,6 +125,18 @@ var ( StabilityLevel: metrics.ALPHA, }, ) + + // SyncProxyRulesLastQueuedTimestamp is the last time a proxy sync was + // requested. If this is much larger than + // kubeproxy_sync_proxy_rules_last_timestamp_seconds, then something is hung. + SyncProxyRulesLastQueuedTimestamp = metrics.NewGauge( + &metrics.GaugeOpts{ + Subsystem: kubeProxySubsystem, + Name: "sync_proxy_rules_last_queued_timestamp_seconds", + Help: "The last time a sync of proxy rules was queued", + StabilityLevel: metrics.ALPHA, + }, + ) ) var registerMetricsOnce sync.Once @@ -140,6 +152,7 @@ func RegisterMetrics() { legacyregistry.MustRegister(ServiceChangesPending) legacyregistry.MustRegister(ServiceChangesTotal) legacyregistry.MustRegister(IptablesRestoreFailuresTotal) + legacyregistry.MustRegister(SyncProxyRulesLastQueuedTimestamp) }) } diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/service.go b/vendor/k8s.io/kubernetes/pkg/proxy/service.go index 7fb28b52808..189feab64e1 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/service.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/service.go @@ -23,9 +23,9 @@ import ( "strings" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/tools/record" @@ -198,6 +198,10 @@ func (sct *ServiceChangeTracker) newBaseServiceInfo(port *v1.ServicePort, servic type makeServicePortFunc func(*v1.ServicePort, *v1.Service, *BaseServiceInfo) ServicePort +// This handler is invoked by the apply function on every change. This function should not modify the +// ServiceMap's but just use the changes for any Proxier specific cleanup. +type processServiceMapChangeFunc func(previous, current ServiceMap) + // serviceChange contains all changes to services that happened since proxy rules were synced. For a single object, // changes are accumulated, i.e. previous is state from before applying the changes, // current is state after applying all of the changes. @@ -214,19 +218,21 @@ type ServiceChangeTracker struct { // items maps a service to its serviceChange. items map[types.NamespacedName]*serviceChange // makeServiceInfo allows proxier to inject customized information when processing service. - makeServiceInfo makeServicePortFunc + makeServiceInfo makeServicePortFunc + processServiceMapChange processServiceMapChangeFunc // isIPv6Mode indicates if change tracker is under IPv6/IPv4 mode. Nil means not applicable. isIPv6Mode *bool recorder record.EventRecorder } // NewServiceChangeTracker initializes a ServiceChangeTracker -func NewServiceChangeTracker(makeServiceInfo makeServicePortFunc, isIPv6Mode *bool, recorder record.EventRecorder) *ServiceChangeTracker { +func NewServiceChangeTracker(makeServiceInfo makeServicePortFunc, isIPv6Mode *bool, recorder record.EventRecorder, processServiceMapChange processServiceMapChangeFunc) *ServiceChangeTracker { return &ServiceChangeTracker{ - items: make(map[types.NamespacedName]*serviceChange), - makeServiceInfo: makeServiceInfo, - isIPv6Mode: isIPv6Mode, - recorder: recorder, + items: make(map[types.NamespacedName]*serviceChange), + makeServiceInfo: makeServiceInfo, + isIPv6Mode: isIPv6Mode, + recorder: recorder, + processServiceMapChange: processServiceMapChange, } } @@ -263,6 +269,8 @@ func (sct *ServiceChangeTracker) Update(previous, current *v1.Service) bool { // if change.previous equal to change.current, it means no change if reflect.DeepEqual(change.previous, change.current) { delete(sct.items, namespacedName) + } else { + klog.V(2).Infof("Service %s updated: %d ports", namespacedName, len(change.current)) } metrics.ServiceChangesPending.Set(float64(len(sct.items))) return len(sct.items) > 0 @@ -305,8 +313,8 @@ func (sct *ServiceChangeTracker) serviceToServiceMap(service *v1.Service) Servic if service == nil { return nil } - svcName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} - if utilproxy.ShouldSkipService(svcName, service) { + + if utilproxy.ShouldSkipService(service) { return nil } @@ -320,6 +328,7 @@ func (sct *ServiceChangeTracker) serviceToServiceMap(service *v1.Service) Servic } serviceMap := make(ServiceMap) + svcName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} for i := range service.Spec.Ports { servicePort := &service.Spec.Ports[i] svcPortName := ServicePortName{NamespacedName: svcName, Port: servicePort.Name, Protocol: servicePort.Protocol} @@ -335,10 +344,14 @@ func (sct *ServiceChangeTracker) serviceToServiceMap(service *v1.Service) Servic // apply the changes to ServiceMap and update the stale udp cluster IP set. The UDPStaleClusterIP argument is passed in to store the // udp protocol service cluster ip when service is deleted from the ServiceMap. +// apply triggers processServiceMapChange on every change. func (sm *ServiceMap) apply(changes *ServiceChangeTracker, UDPStaleClusterIP sets.String) { changes.lock.Lock() defer changes.lock.Unlock() for _, change := range changes.items { + if changes.processServiceMapChange != nil { + changes.processServiceMapChange(change.previous, change.current) + } sm.merge(change.current) // filter out the Update event of current changes from previous changes before calling unmerge() so that can // skip deleting the Update events. diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/types.go b/vendor/k8s.io/kubernetes/pkg/proxy/types.go index fae2c549ce3..2d0f9e42856 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/types.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/types.go @@ -49,7 +49,14 @@ type ServicePortName struct { } func (spn ServicePortName) String() string { - return fmt.Sprintf("%s:%s", spn.NamespacedName.String(), spn.Port) + return fmt.Sprintf("%s%s", spn.NamespacedName.String(), fmtPortName(spn.Port)) +} + +func fmtPortName(in string) string { + if in == "" { + return "" + } + return fmt.Sprintf(":%s", in) } // ServicePort is an interface which abstracts information about a service. diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/BUILD index f492370995b..031194b7ae2 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/BUILD @@ -35,10 +35,13 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/cloud-provider/service/helpers:go_default_library", "//vendor/github.com/opencontainers/runc/libcontainer/system:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], @@ -51,9 +54,15 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//vendor/golang.org/x/sys/unix:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//vendor/golang.org/x/sys/unix:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxier.go b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxier.go index 362868b28f9..e93e44073f0 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxier.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxier.go @@ -34,7 +34,7 @@ import ( "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" servicehelper "k8s.io/cloud-provider/service/helpers" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/proxy" "k8s.io/kubernetes/pkg/proxy/config" utilproxy "k8s.io/kubernetes/pkg/proxy/util" @@ -213,7 +213,7 @@ func NewCustomProxier(loadBalancer LoadBalancer, listenIP net.IP, iptables iptab if !libcontainersystem.RunningInUserNS() { return nil, fmt.Errorf("failed to set open file handler limit to 64000: %v", err) } - klog.Errorf("failed to set open file handler limit to 64000: %v (running in UserNS)", err) + klog.Errorf("failed to set open file handler limit to 64000: %v (running in UserNS, ignoring the error)", err) } proxyPorts := newPortAllocator(pr) @@ -350,7 +350,7 @@ func (proxier *Proxier) Sync() { func (proxier *Proxier) syncProxyRules() { start := time.Now() defer func() { - klog.V(2).Infof("userspace syncProxyRules took %v", time.Since(start)) + klog.V(4).Infof("userspace syncProxyRules took %v", time.Since(start)) }() // don't sync rules till we've received services and endpoints @@ -371,7 +371,7 @@ func (proxier *Proxier) syncProxyRules() { proxier.mu.Lock() defer proxier.mu.Unlock() - klog.V(2).Infof("userspace proxy: processing %d service events", len(changes)) + klog.V(4).Infof("userspace proxy: processing %d service events", len(changes)) for _, change := range changes { existingPorts := proxier.mergeService(change.current) proxier.unmergeService(change.previous, existingPorts) @@ -493,12 +493,11 @@ func (proxier *Proxier) mergeService(service *v1.Service) sets.String { if service == nil { return nil } - svcName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} - if utilproxy.ShouldSkipService(svcName, service) { - klog.V(3).Infof("Skipping service %s due to clusterIP = %q", svcName, service.Spec.ClusterIP) + if utilproxy.ShouldSkipService(service) { return nil } existingPorts := sets.NewString() + svcName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} for i := range service.Spec.Ports { servicePort := &service.Spec.Ports[i] serviceName := proxy.ServicePortName{NamespacedName: svcName, Port: servicePort.Name} @@ -555,12 +554,12 @@ func (proxier *Proxier) unmergeService(service *v1.Service, existingPorts sets.S if service == nil { return } - svcName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} - if utilproxy.ShouldSkipService(svcName, service) { - klog.V(3).Infof("Skipping service %s due to clusterIP = %q", svcName, service.Spec.ClusterIP) + + if utilproxy.ShouldSkipService(service) { return } staleUDPServices := sets.NewString() + svcName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} for i := range service.Spec.Ports { servicePort := &service.Spec.Ports[i] if existingPorts.Has(servicePort.Name) { @@ -625,18 +624,26 @@ func (proxier *Proxier) serviceChange(previous, current *v1.Service, detail stri } } +// OnServiceAdd is called whenever creation of new service object +// is observed. func (proxier *Proxier) OnServiceAdd(service *v1.Service) { proxier.serviceChange(nil, service, "OnServiceAdd") } +// OnServiceUpdate is called whenever modification of an existing +// service object is observed. func (proxier *Proxier) OnServiceUpdate(oldService, service *v1.Service) { proxier.serviceChange(oldService, service, "OnServiceUpdate") } +// OnServiceDelete is called whenever deletion of an existing service +// object is observed. func (proxier *Proxier) OnServiceDelete(service *v1.Service) { proxier.serviceChange(service, nil, "OnServiceDelete") } +// OnServiceSynced is called once all the initial event handlers were +// called and the state is fully propagated to local cache. func (proxier *Proxier) OnServiceSynced() { klog.V(2).Infof("userspace OnServiceSynced") @@ -653,18 +660,26 @@ func (proxier *Proxier) OnServiceSynced() { go proxier.syncProxyRules() } +// OnEndpointsAdd is called whenever creation of new endpoints object +// is observed. func (proxier *Proxier) OnEndpointsAdd(endpoints *v1.Endpoints) { proxier.loadBalancer.OnEndpointsAdd(endpoints) } +// OnEndpointsUpdate is called whenever modification of an existing +// endpoints object is observed. func (proxier *Proxier) OnEndpointsUpdate(oldEndpoints, endpoints *v1.Endpoints) { proxier.loadBalancer.OnEndpointsUpdate(oldEndpoints, endpoints) } +// OnEndpointsDelete is called whenever deletion of an existing endpoints +// object is observed. func (proxier *Proxier) OnEndpointsDelete(endpoints *v1.Endpoints) { proxier.loadBalancer.OnEndpointsDelete(endpoints) } +// OnEndpointsSynced is called once all the initial event handlers were +// called and the state is fully propagated to local cache. func (proxier *Proxier) OnEndpointsSynced() { klog.V(2).Infof("userspace OnEndpointsSynced") proxier.loadBalancer.OnEndpointsSynced() diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxysocket.go b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxysocket.go index 46d565d79fb..3acb559fde1 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxysocket.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxysocket.go @@ -27,7 +27,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/proxy" ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/roundrobin.go b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/roundrobin.go index 29259a4bc3a..1a223bdd145 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/roundrobin.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/roundrobin.go @@ -27,7 +27,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/proxy" "k8s.io/kubernetes/pkg/proxy/util" "k8s.io/kubernetes/pkg/util/slice" diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/util/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/util/BUILD index 8f17dea73f8..4f1ce9864b1 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/util/BUILD @@ -12,12 +12,13 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/apis/core/v1/helper:go_default_library", + "//pkg/util/sysctl:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) @@ -34,7 +35,6 @@ go_test( "//pkg/proxy/util/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/util/endpoints.go b/vendor/k8s.io/kubernetes/pkg/proxy/util/endpoints.go index 0a65f43955e..0e017c54b11 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/util/endpoints.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/util/endpoints.go @@ -21,7 +21,7 @@ import ( "net" "strconv" - "k8s.io/klog" + "k8s.io/klog/v2" ) // IPPart returns just the IP part of an IP or IP:port or endpoint string. If the IP diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/BUILD index bca5202699a..2995c239cf2 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/BUILD @@ -7,7 +7,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/util/iptables:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/traffic.go b/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/traffic.go index 1ec572921fe..d630bedf5ad 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/traffic.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/traffic.go @@ -20,7 +20,7 @@ import ( "fmt" "net" - "k8s.io/klog" + "k8s.io/klog/v2" utiliptables "k8s.io/kubernetes/pkg/util/iptables" utilnet "k8s.io/utils/net" ) @@ -66,8 +66,8 @@ type detectLocalByCIDR struct { // NewDetectLocalByCIDR implements the LocalTrafficDetector interface using a CIDR. This can be used when a single CIDR // range can be used to capture the notion of local traffic. func NewDetectLocalByCIDR(cidr string, ipt utiliptables.Interface) (LocalTrafficDetector, error) { - if utilnet.IsIPv6CIDRString(cidr) != ipt.IsIpv6() { - return nil, fmt.Errorf("CIDR %s has incorrect IP version: expect isIPv6=%t", cidr, ipt.IsIpv6()) + if utilnet.IsIPv6CIDRString(cidr) != ipt.IsIPv6() { + return nil, fmt.Errorf("CIDR %s has incorrect IP version: expect isIPv6=%t", cidr, ipt.IsIPv6()) } _, _, err := net.ParseCIDR(cidr) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/util/port.go b/vendor/k8s.io/kubernetes/pkg/proxy/util/port.go index bb8de546ae0..e256bd9ec44 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/util/port.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/util/port.go @@ -21,7 +21,7 @@ import ( "net" "strconv" - "k8s.io/klog" + "k8s.io/klog/v2" ) // LocalPort describes a port on specific IP address and protocol diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/util/utils.go b/vendor/k8s.io/kubernetes/pkg/proxy/util/utils.go index d172f7c91b5..6745b9966cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/util/utils.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/util/utils.go @@ -29,9 +29,10 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/tools/record" helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" + utilsysctl "k8s.io/kubernetes/pkg/util/sysctl" utilnet "k8s.io/utils/net" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -151,15 +152,15 @@ func GetLocalAddrs() ([]net.IP, error) { } // ShouldSkipService checks if a given service should skip proxying -func ShouldSkipService(svcName types.NamespacedName, service *v1.Service) bool { +func ShouldSkipService(service *v1.Service) bool { // if ClusterIP is "None" or empty, skip proxying if !helper.IsServiceIPSet(service) { - klog.V(3).Infof("Skipping service %s due to clusterIP = %q", svcName, service.Spec.ClusterIP) + klog.V(3).Infof("Skipping service %s in namespace %s due to clusterIP = %q", service.Name, service.Namespace, service.Spec.ClusterIP) return true } // Even if ClusterIP is set, ServiceTypeExternalName services don't get proxied if service.Spec.Type == v1.ServiceTypeExternalName { - klog.V(3).Infof("Skipping service %s due to Type=ExternalName", svcName) + klog.V(3).Infof("Skipping service %s in namespace %s due to Type=ExternalName", service.Name, service.Namespace) return true } return false @@ -186,29 +187,35 @@ func GetNodeAddresses(cidrs []string, nw NetworkInterfacer) (sets.String, error) uniqueAddressList.Insert(cidr) } } + + itfs, err := nw.Interfaces() + if err != nil { + return nil, fmt.Errorf("error listing all interfaces from host, error: %v", err) + } + // Second round of iteration to parse IPs based on cidr. for _, cidr := range cidrs { if IsZeroCIDR(cidr) { continue } + _, ipNet, _ := net.ParseCIDR(cidr) - itfs, err := nw.Interfaces() - if err != nil { - return nil, fmt.Errorf("error listing all interfaces from host, error: %v", err) - } for _, itf := range itfs { addrs, err := nw.Addrs(&itf) if err != nil { return nil, fmt.Errorf("error getting address from interface %s, error: %v", itf.Name, err) } + for _, addr := range addrs { if addr == nil { continue } + ip, _, err := net.ParseCIDR(addr.String()) if err != nil { return nil, fmt.Errorf("error parsing CIDR for interface %s, error: %v", itf.Name, err) } + if ipNet.Contains(ip) { if utilnet.IsIPv6(ip) && !uniqueAddressList.Has(IPv6ZeroCIDR) { uniqueAddressList.Insert(ip.String()) @@ -220,6 +227,11 @@ func GetNodeAddresses(cidrs []string, nw NetworkInterfacer) (sets.String, error) } } } + + if uniqueAddressList.Len() == 0 { + return nil, fmt.Errorf("no addresses found for cidrs %v", cidrs) + } + return uniqueAddressList, nil } @@ -294,3 +306,14 @@ func ShuffleStrings(s []string) []string { } return shuffled } + +// EnsureSysctl sets a kernel sysctl to a given numeric value. +func EnsureSysctl(sysctl utilsysctl.Interface, name string, newVal int) error { + if oldVal, _ := sysctl.GetSysctl(name); oldVal != newVal { + if err := sysctl.SetSysctl(name, newVal); err != nil { + return fmt.Errorf("can't set sysctl %s to %d: %v", name, newVal, err) + } + klog.V(1).Infof("Changed sysctl %q: %d -> %d", name, oldVal, newVal) + } + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/BUILD index 0e86edc9627..5817e7ad0bf 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/BUILD @@ -15,26 +15,28 @@ go_library( "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:windows": [ - "//pkg/api/v1/service:go_default_library", "//pkg/apis/core/v1/helper:go_default_library", + "//pkg/features:go_default_library", "//pkg/proxy:go_default_library", "//pkg/proxy/apis/config:go_default_library", "//pkg/proxy/config:go_default_library", "//pkg/proxy/healthcheck:go_default_library", + "//pkg/proxy/metaproxier:go_default_library", "//pkg/proxy/metrics:go_default_library", + "//pkg/proxy/util:go_default_library", "//pkg/util/async:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/features:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//vendor/github.com/Microsoft/hcsshim:go_default_library", "//vendor/github.com/Microsoft/hcsshim/hcn:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", ], "//conditions:default": [], }), @@ -65,11 +67,14 @@ go_test( "@io_bazel_rules_go//go/platform:windows": [ "//pkg/proxy:go_default_library", "//pkg/proxy/healthcheck:go_default_library", + "//pkg/proxy/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/discovery/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//vendor/github.com/Microsoft/hcsshim/hcn:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", ], "//conditions:default": [], }), diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV1.go b/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV1.go index 3787f4514ef..ae31ffea97e 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV1.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV1.go @@ -22,7 +22,7 @@ import ( "encoding/json" "fmt" "github.com/Microsoft/hcsshim" - "k8s.io/klog" + "k8s.io/klog/v2" "net" "strings" ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV2.go b/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV2.go index 4898c2474f2..54c6b92a01c 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV2.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV2.go @@ -23,13 +23,18 @@ import ( "fmt" "github.com/Microsoft/hcsshim/hcn" - "k8s.io/klog" + "k8s.io/klog/v2" "strings" ) type hnsV2 struct{} +var ( + // LoadBalancerFlagsIPv6 enables IPV6. + LoadBalancerFlagsIPv6 hcn.LoadBalancerFlags = 2 +) + func (hns hnsV2) getNetworkByName(name string) (*hnsNetworkInfo, error) { hnsnetwork, err := hcn.GetNetworkByName(name) if err != nil { @@ -90,10 +95,14 @@ func (hns hnsV2) getEndpointByIpAddress(ip string, networkName string) (*endpoin equal := false if endpoint.IpConfigurations != nil && len(endpoint.IpConfigurations) > 0 { equal = endpoint.IpConfigurations[0].IpAddress == ip + + if !equal && len(endpoint.IpConfigurations) > 1 { + equal = endpoint.IpConfigurations[1].IpAddress == ip + } } if equal && strings.EqualFold(endpoint.HostComputeNetwork, hnsnetwork.Id) { return &endpointsInfo{ - ip: endpoint.IpConfigurations[0].IpAddress, + ip: ip, isLocal: uint32(endpoint.Flags&hcn.EndpointFlagsRemoteEndpoint) == 0, //TODO: Change isLocal to isRemote macAddress: endpoint.MacAddress, hnsID: endpoint.Id, @@ -232,16 +241,41 @@ func (hns hnsV2) getLoadBalancer(endpoints []endpointsInfo, flags loadBalancerFl lbFlags |= hcn.LoadBalancerFlagsDSR } - lb, err := hcn.AddLoadBalancer( - hnsEndpoints, - lbFlags, - lbPortMappingFlags, - sourceVip, - vips, - protocol, - internalPort, - externalPort, - ) + if flags.isIPv6 { + lbFlags |= LoadBalancerFlagsIPv6 + } + + lbDistributionType := hcn.LoadBalancerDistributionNone + + if flags.sessionAffinity { + lbDistributionType = hcn.LoadBalancerDistributionSourceIP + } + + loadBalancer := &hcn.HostComputeLoadBalancer{ + SourceVIP: sourceVip, + PortMappings: []hcn.LoadBalancerPortMapping{ + { + Protocol: uint32(protocol), + InternalPort: internalPort, + ExternalPort: externalPort, + DistributionType: lbDistributionType, + Flags: lbPortMappingFlags, + }, + }, + FrontendVIPs: vips, + SchemaVersion: hcn.SchemaVersion{ + Major: 2, + Minor: 0, + }, + Flags: lbFlags, + } + + for _, endpoint := range hnsEndpoints { + loadBalancer.HostComputeEndpoints = append(loadBalancer.HostComputeEndpoints, endpoint.Id) + } + + lb, err := loadBalancer.Create() + if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/proxier.go b/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/proxier.go index 51c203b54ab..a2ae3495099 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/proxier.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/proxier.go @@ -23,33 +23,35 @@ import ( "fmt" "net" "os" - "reflect" + "strconv" "sync" "sync/atomic" "time" "github.com/Microsoft/hcsshim" "github.com/Microsoft/hcsshim/hcn" + discovery "k8s.io/api/discovery/v1beta1" "github.com/davecgh/go-spew/spew" - "k8s.io/klog" - - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" - genericfeatures "k8s.io/apiserver/pkg/features" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/tools/record" - apiservice "k8s.io/kubernetes/pkg/api/v1/service" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/apis/core/v1/helper" + "k8s.io/kubernetes/pkg/features" + kubefeatures "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/proxy" "k8s.io/kubernetes/pkg/proxy/apis/config" proxyconfig "k8s.io/kubernetes/pkg/proxy/config" "k8s.io/kubernetes/pkg/proxy/healthcheck" + "k8s.io/kubernetes/pkg/proxy/metaproxier" "k8s.io/kubernetes/pkg/proxy/metrics" + utilproxy "k8s.io/kubernetes/pkg/proxy/util" "k8s.io/kubernetes/pkg/util/async" + utilnet "k8s.io/utils/net" ) // KernelCompatTester tests whether the required kernel capabilities are @@ -95,34 +97,27 @@ type loadBalancerInfo struct { } type loadBalancerFlags struct { - isILB bool - isDSR bool - localRoutedVIP bool - useMUX bool - preserveDIP bool + isILB bool + isDSR bool + localRoutedVIP bool + useMUX bool + preserveDIP bool + sessionAffinity bool + isIPv6 bool } // internal struct for string service information type serviceInfo struct { - clusterIP net.IP - port int - protocol v1.Protocol - nodePort int - targetPort int - loadBalancerStatus v1.LoadBalancerStatus - sessionAffinityType v1.ServiceAffinity - stickyMaxAgeSeconds int - externalIPs []*externalIPInfo - loadBalancerIngressIPs []*loadBalancerIngressInfo - loadBalancerSourceRanges []string - onlyNodeLocalEndpoints bool - healthCheckNodePort int - hnsID string - nodePorthnsID string - policyApplied bool - remoteEndpoint *endpointsInfo - hns HostNetworkService - preserveDIP bool + *proxy.BaseServiceInfo + targetPort int + externalIPs []*externalIPInfo + loadBalancerIngressIPs []*loadBalancerIngressInfo + hnsID string + nodePorthnsID string + policyApplied bool + remoteEndpoint *endpointsInfo + hns HostNetworkService + preserveDIP bool } type hnsNetworkInfo struct { @@ -140,7 +135,7 @@ type remoteSubnetInfo struct { } func Log(v interface{}, message string, level klog.Level) { - klog.V(level).Infof("%s, %s", message, spew.Sdump(v)) + klog.V(level).Infof("%s, %s", message, spewSdump(v)) } func LogJson(v interface{}, message string, level klog.Level) { @@ -150,6 +145,12 @@ func LogJson(v interface{}, message string, level klog.Level) { } } +func spewSdump(v interface{}) string { + scs := spew.NewDefaultConfig() + scs.DisableMethods = true + return scs.Sdump(v) +} + // internal struct for endpoints information type endpointsInfo struct { ip string @@ -157,31 +158,147 @@ type endpointsInfo struct { isLocal bool macAddress string hnsID string - refCount uint16 + refCount *uint16 providerAddress string hns HostNetworkService } +// String is part of proxy.Endpoint interface. +func (info *endpointsInfo) String() string { + return net.JoinHostPort(info.ip, strconv.Itoa(int(info.port))) +} + +// GetIsLocal is part of proxy.Endpoint interface. +func (info *endpointsInfo) GetIsLocal() bool { + return info.isLocal +} + +// GetTopology returns the topology information of the endpoint. +func (info *endpointsInfo) GetTopology() map[string]string { + return nil +} + +// IP returns just the IP part of the endpoint, it's a part of proxy.Endpoint interface. +func (info *endpointsInfo) IP() string { + return info.ip +} + +// Port returns just the Port part of the endpoint. +func (info *endpointsInfo) Port() (int, error) { + return int(info.port), nil +} + +// Equal is part of proxy.Endpoint interface. +func (info *endpointsInfo) Equal(other proxy.Endpoint) bool { + return info.String() == other.String() && info.GetIsLocal() == other.GetIsLocal() +} + //Uses mac prefix and IPv4 address to return a mac address //This ensures mac addresses are unique for proper load balancing -//Does not support IPv6 and returns a dummy mac +//There is a possibility of MAC collisions but this Mac address is used for remote endpoints only +//and not sent on the wire. func conjureMac(macPrefix string, ip net.IP) string { if ip4 := ip.To4(); ip4 != nil { a, b, c, d := ip4[0], ip4[1], ip4[2], ip4[3] return fmt.Sprintf("%v-%02x-%02x-%02x-%02x", macPrefix, a, b, c, d) + } else if ip6 := ip.To16(); ip6 != nil { + a, b, c, d := ip6[15], ip6[14], ip6[13], ip6[12] + return fmt.Sprintf("%v-%02x-%02x-%02x-%02x", macPrefix, a, b, c, d) } return "02-11-22-33-44-55" } -func newEndpointInfo(ip string, port uint16, isLocal bool, hns HostNetworkService) *endpointsInfo { +func (proxier *Proxier) endpointsMapChange(oldEndpointsMap, newEndpointsMap proxy.EndpointsMap) { + for svcPortName := range oldEndpointsMap { + proxier.onEndpointsMapChange(&svcPortName) + } + + for svcPortName := range newEndpointsMap { + proxier.onEndpointsMapChange(&svcPortName) + } +} + +func (proxier *Proxier) onEndpointsMapChange(svcPortName *proxy.ServicePortName) { + + svc, exists := proxier.serviceMap[*svcPortName] + + if exists { + svcInfo, ok := svc.(*serviceInfo) + + if !ok { + klog.Errorf("Failed to cast serviceInfo %q", svcPortName.String()) + return + } + + klog.V(3).Infof("Endpoints are modified. Service [%v] is stale", *svcPortName) + svcInfo.cleanupAllPolicies(proxier.endpointsMap[*svcPortName]) + } else { + // If no service exists, just cleanup the remote endpoints + klog.V(3).Infof("Endpoints are orphaned. Cleaning up") + // Cleanup Endpoints references + epInfos, exists := proxier.endpointsMap[*svcPortName] + + if exists { + // Cleanup Endpoints references + for _, ep := range epInfos { + epInfo, ok := ep.(*endpointsInfo) + + if ok { + epInfo.Cleanup() + } + + } + } + } +} + +func (proxier *Proxier) serviceMapChange(previous, current proxy.ServiceMap) { + for svcPortName := range current { + proxier.onServiceMapChange(&svcPortName) + } + + for svcPortName := range previous { + if _, ok := current[svcPortName]; ok { + continue + } + proxier.onServiceMapChange(&svcPortName) + } +} + +func (proxier *Proxier) onServiceMapChange(svcPortName *proxy.ServicePortName) { + + svc, exists := proxier.serviceMap[*svcPortName] + + if exists { + svcInfo, ok := svc.(*serviceInfo) + + if !ok { + klog.Errorf("Failed to cast serviceInfo %q", svcPortName.String()) + return + } + + klog.V(3).Infof("Updating existing service port %q at %s:%d/%s", svcPortName, svcInfo.ClusterIP(), svcInfo.Port(), svcInfo.Protocol()) + svcInfo.cleanupAllPolicies(proxier.endpointsMap[*svcPortName]) + } +} + +// returns a new proxy.Endpoint which abstracts a endpointsInfo +func (proxier *Proxier) newEndpointInfo(baseInfo *proxy.BaseEndpointInfo) proxy.Endpoint { + + portNumber, err := baseInfo.Port() + + if err != nil { + portNumber = 0 + } + info := &endpointsInfo{ - ip: ip, - port: port, - isLocal: isLocal, - macAddress: conjureMac("02-11", net.ParseIP(ip)), - refCount: 0, + ip: baseInfo.IP(), + port: uint16(portNumber), + isLocal: baseInfo.GetIsLocal(), + macAddress: conjureMac("02-11", net.ParseIP(baseInfo.IP())), + refCount: new(uint16), hnsID: "", - hns: hns, + hns: proxier.hns, } return info @@ -200,36 +317,36 @@ func newSourceVIP(hns HostNetworkService, network string, ip string, mac string, func (ep *endpointsInfo) Cleanup() { Log(ep, "Endpoint Cleanup", 3) - ep.refCount-- + if ep.refCount != nil { + *ep.refCount-- + } + // Remove the remote hns endpoint, if no service is referring it // Never delete a Local Endpoint. Local Endpoints are already created by other entities. // Remove only remote endpoints created by this service - if ep.refCount <= 0 && !ep.isLocal { + if (ep.refCount == nil || *ep.refCount <= 0) && !ep.GetIsLocal() { klog.V(4).Infof("Removing endpoints for %v, since no one is referencing it", ep) err := ep.hns.deleteEndpoint(ep.hnsID) if err == nil { ep.hnsID = "" } else { - klog.Errorf("Endpoint deletion failed for %v: %v", ep.ip, err) + klog.Errorf("Endpoint deletion failed for %v: %v", ep.IP(), err) } } } -// returns a new serviceInfo struct -func newServiceInfo(svcPortName proxy.ServicePortName, port *v1.ServicePort, service *v1.Service, hns HostNetworkService) *serviceInfo { - onlyNodeLocalEndpoints := false - if apiservice.RequestsOnlyLocalTraffic(service) { - onlyNodeLocalEndpoints = true +func (refCountMap endPointsReferenceCountMap) getRefCount(hnsID string) *uint16 { + refCount, exists := refCountMap[hnsID] + if !exists { + refCountMap[hnsID] = new(uint16) + refCount = refCountMap[hnsID] } + return refCount +} - // set default session sticky max age 180min=10800s - stickyMaxAgeSeconds := 10800 - if service.Spec.SessionAffinity == v1.ServiceAffinityClientIP && service.Spec.SessionAffinityConfig != nil { - stickyMaxAgeSeconds = int(*service.Spec.SessionAffinityConfig.ClientIP.TimeoutSeconds) - } - - klog.Infof("Service %q preserve-destination: %v", svcPortName.NamespacedName.String(), service.Annotations["preserve-destination"]) - +// returns a new proxy.ServicePort which abstracts a serviceInfo +func (proxier *Proxier) newServiceInfo(port *v1.ServicePort, service *v1.Service, baseInfo *proxy.BaseServiceInfo) proxy.ServicePort { + info := &serviceInfo{BaseServiceInfo: baseInfo} preserveDIP := service.Annotations["preserve-destination"] == "true" err := hcn.DSRSupported() if err != nil { @@ -241,215 +358,44 @@ func newServiceInfo(svcPortName proxy.ServicePortName, port *v1.ServicePort, ser if port.TargetPort.Type == intstr.Int { targetPort = port.TargetPort.IntValue() } - info := &serviceInfo{ - clusterIP: net.ParseIP(service.Spec.ClusterIP), - port: int(port.Port), - protocol: port.Protocol, - nodePort: int(port.NodePort), - targetPort: targetPort, - // Deep-copy in case the service instance changes - loadBalancerStatus: *service.Status.LoadBalancer.DeepCopy(), - sessionAffinityType: service.Spec.SessionAffinity, - stickyMaxAgeSeconds: stickyMaxAgeSeconds, - loadBalancerSourceRanges: make([]string, len(service.Spec.LoadBalancerSourceRanges)), - onlyNodeLocalEndpoints: onlyNodeLocalEndpoints, - hns: hns, - preserveDIP: preserveDIP, - } - copy(info.loadBalancerSourceRanges, service.Spec.LoadBalancerSourceRanges) + info.preserveDIP = preserveDIP + info.targetPort = targetPort + info.hns = proxier.hns + for _, eip := range service.Spec.ExternalIPs { info.externalIPs = append(info.externalIPs, &externalIPInfo{ip: eip}) } + for _, ingress := range service.Status.LoadBalancer.Ingress { info.loadBalancerIngressIPs = append(info.loadBalancerIngressIPs, &loadBalancerIngressInfo{ip: ingress.IP}) } - - if apiservice.NeedsHealthCheck(service) { - p := service.Spec.HealthCheckNodePort - if p == 0 { - klog.Errorf("Service %q has no healthcheck nodeport", svcPortName.NamespacedName.String()) - } else { - info.healthCheckNodePort = int(p) - } - } - return info } -type endpointsChange struct { - previous proxyEndpointsMap - current proxyEndpointsMap -} - -type endpointsChangeMap struct { - lock sync.Mutex - hostname string - items map[types.NamespacedName]*endpointsChange -} - -type serviceChange struct { - previous proxyServiceMap - current proxyServiceMap -} - -type serviceChangeMap struct { - lock sync.Mutex - items map[types.NamespacedName]*serviceChange -} - -type updateEndpointMapResult struct { - hcEndpoints map[types.NamespacedName]int - staleEndpoints map[endpointServicePair]bool - staleServiceNames map[proxy.ServicePortName]bool -} - -type updateServiceMapResult struct { - hcServices map[types.NamespacedName]uint16 - staleServices sets.String -} -type proxyServiceMap map[proxy.ServicePortName]*serviceInfo -type proxyEndpointsMap map[proxy.ServicePortName][]*endpointsInfo - -func newEndpointsChangeMap(hostname string) endpointsChangeMap { - return endpointsChangeMap{ - hostname: hostname, - items: make(map[types.NamespacedName]*endpointsChange), - } -} - -func (ecm *endpointsChangeMap) update(namespacedName *types.NamespacedName, previous, current *v1.Endpoints, hns HostNetworkService) bool { - ecm.lock.Lock() - defer ecm.lock.Unlock() - - change, exists := ecm.items[*namespacedName] - if !exists { - change = &endpointsChange{} - change.previous = endpointsToEndpointsMap(previous, ecm.hostname, hns) - ecm.items[*namespacedName] = change - } - change.current = endpointsToEndpointsMap(current, ecm.hostname, hns) - if reflect.DeepEqual(change.previous, change.current) { - delete(ecm.items, *namespacedName) - } - return len(ecm.items) > 0 -} - -func newServiceChangeMap() serviceChangeMap { - return serviceChangeMap{ - items: make(map[types.NamespacedName]*serviceChange), - } -} - -func (scm *serviceChangeMap) update(namespacedName *types.NamespacedName, previous, current *v1.Service, hns HostNetworkService) bool { - scm.lock.Lock() - defer scm.lock.Unlock() - - change, exists := scm.items[*namespacedName] - if !exists { - // Service is Added - change = &serviceChange{} - change.previous = serviceToServiceMap(previous, hns) - scm.items[*namespacedName] = change - } - change.current = serviceToServiceMap(current, hns) - if reflect.DeepEqual(change.previous, change.current) { - delete(scm.items, *namespacedName) - } - return len(scm.items) > 0 -} - -func (sm *proxyServiceMap) merge(other proxyServiceMap, curEndpoints proxyEndpointsMap) sets.String { - existingPorts := sets.NewString() - for svcPortName, info := range other { - existingPorts.Insert(svcPortName.Port) - svcInfo, exists := (*sm)[svcPortName] - if !exists { - klog.V(1).Infof("Adding new service port %q at %s:%d/%s", svcPortName, info.clusterIP, info.port, info.protocol) - } else { - klog.V(1).Infof("Updating existing service port %q at %s:%d/%s", svcPortName, info.clusterIP, info.port, info.protocol) - svcInfo.cleanupAllPolicies(curEndpoints[svcPortName]) - delete(*sm, svcPortName) +func (network hnsNetworkInfo) findRemoteSubnetProviderAddress(ip string) string { + var providerAddress string + for _, rs := range network.remoteSubnets { + _, ipNet, err := net.ParseCIDR(rs.destinationPrefix) + if err != nil { + klog.Fatalf("%v", err) } - (*sm)[svcPortName] = info - } - return existingPorts -} - -func (sm *proxyServiceMap) unmerge(other proxyServiceMap, existingPorts, staleServices sets.String, curEndpoints proxyEndpointsMap) { - for svcPortName := range other { - if existingPorts.Has(svcPortName.Port) { - continue + if ipNet.Contains(net.ParseIP(ip)) { + providerAddress = rs.providerAddress } - info, exists := (*sm)[svcPortName] - if exists { - klog.V(1).Infof("Removing service port %q", svcPortName) - if info.protocol == v1.ProtocolUDP { - staleServices.Insert(info.clusterIP.String()) - } - info.cleanupAllPolicies(curEndpoints[svcPortName]) - delete(*sm, svcPortName) - } else { - klog.Errorf("Service port %q removed, but doesn't exists", svcPortName) + if ip == rs.providerAddress { + providerAddress = rs.providerAddress } } + + return providerAddress } -func (em proxyEndpointsMap) merge(other proxyEndpointsMap, curServices proxyServiceMap) { - // Endpoint Update/Add - for svcPortName := range other { - epInfos, exists := em[svcPortName] - if exists { - // - info, exists := curServices[svcPortName] - klog.V(1).Infof("Updating existing service port %q at %s:%d/%s", svcPortName, info.clusterIP, info.port, info.protocol) - if exists { - klog.V(2).Infof("Endpoints are modified. Service [%v] is stale", svcPortName) - info.cleanupAllPolicies(epInfos) - } else { - // If no service exists, just cleanup the remote endpoints - klog.V(2).Infof("Endpoints are orphaned. Cleaning up") - // Cleanup Endpoints references - for _, ep := range epInfos { - ep.Cleanup() - } - - } - - delete(em, svcPortName) - } - em[svcPortName] = other[svcPortName] - } -} - -func (em proxyEndpointsMap) unmerge(other proxyEndpointsMap, curServices proxyServiceMap) { - // Endpoint Update/Removal - for svcPortName := range other { - info, exists := curServices[svcPortName] - if exists { - klog.V(2).Infof("Service [%v] is stale", info) - info.cleanupAllPolicies(em[svcPortName]) - } else { - // If no service exists, just cleanup the remote endpoints - klog.V(2).Infof("Endpoints are orphaned. Cleaning up") - // Cleanup Endpoints references - epInfos, exists := em[svcPortName] - if exists { - for _, ep := range epInfos { - ep.Cleanup() - } - } - } - - delete(em, svcPortName) - } -} +type endPointsReferenceCountMap map[string]*uint16 // Proxier is an hns based proxy for connections between a localhost:lport // and services that provide the actual backends. type Proxier struct { - // EndpointSlice support has not been added for this proxier yet. - proxyconfig.NoopEndpointSliceHandler // TODO(imroc): implement node handler for winkernel proxier. proxyconfig.NoopNodeHandler @@ -457,21 +403,22 @@ type Proxier struct { // services that happened since policies were synced. For a single object, // changes are accumulated, i.e. previous is state from before all of them, // current is state after applying all of those. - endpointsChanges endpointsChangeMap - serviceChanges serviceChangeMap - - mu sync.Mutex // protects the following fields - serviceMap proxyServiceMap - endpointsMap proxyEndpointsMap - portsMap map[localPort]closeable + endpointsChanges *proxy.EndpointChangeTracker + serviceChanges *proxy.ServiceChangeTracker + endPointsRefCount endPointsReferenceCountMap + mu sync.Mutex // protects the following fields + serviceMap proxy.ServiceMap + endpointsMap proxy.EndpointsMap + portsMap map[utilproxy.LocalPort]utilproxy.Closeable // endpointsSynced and servicesSynced are set to true when corresponding // objects are synced after startup. This is used to avoid updating hns policies // with some partial data after kube-proxy restart. - endpointsSynced bool - servicesSynced bool - initialized int32 - syncRunner *async.BoundedFrequencyRunner // governs calls to syncProxyRules - + endpointsSynced bool + endpointSlicesSynced bool + servicesSynced bool + isIPv6Mode bool + initialized int32 + syncRunner *async.BoundedFrequencyRunner // governs calls to syncProxyRules // These are effectively const and do not need the mutex to be held. masqueradeAll bool masqueradeMark string @@ -488,11 +435,12 @@ type Proxier struct { // precomputing some number of those and cache for future reuse. precomputedProbabilities []string - hns HostNetworkService - network hnsNetworkInfo - sourceVip string - hostMac string - isDSR bool + hns HostNetworkService + network hnsNetworkInfo + sourceVip string + hostMac string + isDSR bool + supportedFeatures hcn.SupportedFeatures } type localPort struct { @@ -591,7 +539,7 @@ func NewProxier( klog.V(1).Infof("Hns Network loaded with info = %v", hnsNetworkInfo) isDSR := config.EnableDSR - if isDSR && !utilfeature.DefaultFeatureGate.Enabled(genericfeatures.WinDSR) { + if isDSR && !utilfeature.DefaultFeatureGate.Enabled(kubefeatures.WinDSR) { return nil, fmt.Errorf("WinDSR feature gate not enabled") } err = hcn.DSRSupported() @@ -602,7 +550,7 @@ func NewProxier( var sourceVip string var hostMac string if hnsNetworkInfo.networkType == "Overlay" { - if !utilfeature.DefaultFeatureGate.Enabled(genericfeatures.WinOverlay) { + if !utilfeature.DefaultFeatureGate.Enabled(kubefeatures.WinOverlay) { return nil, fmt.Errorf("WinOverlay feature gate not enabled") } err = hcn.RemoteSubnetSupported() @@ -630,12 +578,13 @@ func NewProxier( } } + isIPv6 := utilnet.IsIPv6(nodeIP) + endpointSlicesEnabled := utilfeature.DefaultFeatureGate.Enabled(features.WindowsEndpointSliceProxying) proxier := &Proxier{ - portsMap: make(map[localPort]closeable), - serviceMap: make(proxyServiceMap), - serviceChanges: newServiceChangeMap(), - endpointsMap: make(proxyEndpointsMap), - endpointsChanges: newEndpointsChangeMap(hostname), + endPointsRefCount: make(endPointsReferenceCountMap), + portsMap: make(map[utilproxy.LocalPort]utilproxy.Closeable), + serviceMap: make(proxy.ServiceMap), + endpointsMap: make(proxy.EndpointsMap), masqueradeAll: masqueradeAll, masqueradeMark: masqueradeMark, clusterCIDR: clusterCIDR, @@ -649,13 +598,51 @@ func NewProxier( sourceVip: sourceVip, hostMac: hostMac, isDSR: isDSR, + supportedFeatures: supportedFeatures, + isIPv6Mode: isIPv6, } + serviceChanges := proxy.NewServiceChangeTracker(proxier.newServiceInfo, &isIPv6, recorder, proxier.serviceMapChange) + endPointChangeTracker := proxy.NewEndpointChangeTracker(hostname, proxier.newEndpointInfo, &isIPv6, recorder, endpointSlicesEnabled, proxier.endpointsMapChange) + proxier.endpointsChanges = endPointChangeTracker + proxier.serviceChanges = serviceChanges + burstSyncs := 2 klog.V(3).Infof("minSyncPeriod: %v, syncPeriod: %v, burstSyncs: %d", minSyncPeriod, syncPeriod, burstSyncs) proxier.syncRunner = async.NewBoundedFrequencyRunner("sync-runner", proxier.syncProxyRules, minSyncPeriod, syncPeriod, burstSyncs) return proxier, nil +} +func NewDualStackProxier( + syncPeriod time.Duration, + minSyncPeriod time.Duration, + masqueradeAll bool, + masqueradeBit int, + clusterCIDR string, + hostname string, + nodeIP [2]net.IP, + recorder record.EventRecorder, + healthzServer healthcheck.ProxierHealthUpdater, + config config.KubeProxyWinkernelConfiguration, +) (proxy.Provider, error) { + + // Create an ipv4 instance of the single-stack proxier + ipv4Proxier, err := NewProxier(syncPeriod, minSyncPeriod, masqueradeAll, masqueradeBit, + clusterCIDR, hostname, nodeIP[0], recorder, healthzServer, config) + + if err != nil { + return nil, fmt.Errorf("unable to create ipv4 proxier: %v, hostname: %s, clusterCIDR : %s, nodeIP:%v", err, hostname, clusterCIDR, nodeIP[0]) + } + + ipv6Proxier, err := NewProxier(syncPeriod, minSyncPeriod, masqueradeAll, masqueradeBit, + clusterCIDR, hostname, nodeIP[1], recorder, healthzServer, config) + if err != nil { + return nil, fmt.Errorf("unable to create ipv6 proxier: %v, hostname: %s, clusterCIDR : %s, nodeIP:%v", err, hostname, clusterCIDR, nodeIP[1]) + } + + // Return a meta-proxier that dispatch calls between the two + // single-stack proxier instances + return metaproxier.NewMetaProxier(ipv4Proxier, ipv6Proxier), nil } // CleanupLeftovers removes all hns rules created by the Proxier @@ -669,13 +656,16 @@ func CleanupLeftovers() (encounteredError bool) { return encounteredError } -func (svcInfo *serviceInfo) cleanupAllPolicies(endpoints []*endpointsInfo) { +func (svcInfo *serviceInfo) cleanupAllPolicies(endpoints []proxy.Endpoint) { Log(svcInfo, "Service Cleanup", 3) // Skip the svcInfo.policyApplied check to remove all the policies svcInfo.deleteAllHnsLoadBalancerPolicy() // Cleanup Endpoints references for _, ep := range endpoints { - ep.Cleanup() + epInfo, ok := ep.(*endpointsInfo) + if ok { + epInfo.Cleanup() + } } if svcInfo.remoteEndpoint != nil { svcInfo.remoteEndpoint.Cleanup() @@ -737,6 +727,7 @@ func (proxier *Proxier) Sync() { if proxier.healthzServer != nil { proxier.healthzServer.QueuedUpdate() } + metrics.SyncProxyRulesLastQueuedTimestamp.SetToCurrentTime() proxier.syncRunner.Run() } @@ -746,6 +737,8 @@ func (proxier *Proxier) SyncLoop() { if proxier.healthzServer != nil { proxier.healthzServer.Updated() } + // synthesize "last change queued" time as the informers are syncing. + metrics.SyncProxyRulesLastQueuedTimestamp.SetToCurrentTime() proxier.syncRunner.Loop(wait.NeverStop) } @@ -761,31 +754,36 @@ func (proxier *Proxier) isInitialized() bool { return atomic.LoadInt32(&proxier.initialized) > 0 } +// OnServiceAdd is called whenever creation of new service object +// is observed. func (proxier *Proxier) OnServiceAdd(service *v1.Service) { - namespacedName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} - if proxier.serviceChanges.update(&namespacedName, nil, service, proxier.hns) && proxier.isInitialized() { - proxier.Sync() - } + proxier.OnServiceUpdate(nil, service) } +// OnServiceUpdate is called whenever modification of an existing +// service object is observed. func (proxier *Proxier) OnServiceUpdate(oldService, service *v1.Service) { - namespacedName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} - if proxier.serviceChanges.update(&namespacedName, oldService, service, proxier.hns) && proxier.isInitialized() { + if proxier.serviceChanges.Update(oldService, service) && proxier.isInitialized() { proxier.Sync() } } +// OnServiceDelete is called whenever deletion of an existing service +// object is observed. func (proxier *Proxier) OnServiceDelete(service *v1.Service) { - namespacedName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} - if proxier.serviceChanges.update(&namespacedName, service, nil, proxier.hns) && proxier.isInitialized() { - proxier.Sync() - } + proxier.OnServiceUpdate(service, nil) } +// OnServiceSynced is called once all the initial event handlers were +// called and the state is fully propagated to local cache. func (proxier *Proxier) OnServiceSynced() { proxier.mu.Lock() proxier.servicesSynced = true - proxier.setInitialized(proxier.servicesSynced && proxier.endpointsSynced) + if utilfeature.DefaultFeatureGate.Enabled(features.WindowsEndpointSliceProxying) { + proxier.setInitialized(proxier.endpointSlicesSynced) + } else { + proxier.setInitialized(proxier.endpointsSynced) + } proxier.mu.Unlock() // Sync unconditionally - this is called once per lifetime. @@ -806,57 +804,29 @@ func shouldSkipService(svcName types.NamespacedName, service *v1.Service) bool { return false } -// is updated by this function (based on the given changes). -// map is cleared after applying them. -func (proxier *Proxier) updateServiceMap() (result updateServiceMapResult) { - result.staleServices = sets.NewString() - - serviceMap := proxier.serviceMap - changes := &proxier.serviceChanges - - func() { - changes.lock.Lock() - defer changes.lock.Unlock() - for _, change := range changes.items { - existingPorts := serviceMap.merge(change.current, proxier.endpointsMap) - serviceMap.unmerge(change.previous, existingPorts, result.staleServices, proxier.endpointsMap) - } - changes.items = make(map[types.NamespacedName]*serviceChange) - }() - - // TODO: If this will appear to be computationally expensive, consider - // computing this incrementally similarly to serviceMap. - result.hcServices = make(map[types.NamespacedName]uint16) - for svcPortName, info := range serviceMap { - if info.healthCheckNodePort != 0 { - result.hcServices[svcPortName.NamespacedName] = uint16(info.healthCheckNodePort) - } - } - - return result -} - +// OnEndpointsAdd is called whenever creation of new endpoints object +// is observed. func (proxier *Proxier) OnEndpointsAdd(endpoints *v1.Endpoints) { - namespacedName := types.NamespacedName{Namespace: endpoints.Namespace, Name: endpoints.Name} - if proxier.endpointsChanges.update(&namespacedName, nil, endpoints, proxier.hns) && proxier.isInitialized() { - proxier.Sync() - } + proxier.OnEndpointsUpdate(nil, endpoints) } +// OnEndpointsUpdate is called whenever modification of an existing +// endpoints object is observed. func (proxier *Proxier) OnEndpointsUpdate(oldEndpoints, endpoints *v1.Endpoints) { - namespacedName := types.NamespacedName{Namespace: endpoints.Namespace, Name: endpoints.Name} - if proxier.endpointsChanges.update(&namespacedName, oldEndpoints, endpoints, proxier.hns) && proxier.isInitialized() { + + if proxier.endpointsChanges.Update(oldEndpoints, endpoints) && proxier.isInitialized() { proxier.Sync() } } +// OnEndpointsDelete is called whenever deletion of an existing endpoints +// object is observed. func (proxier *Proxier) OnEndpointsDelete(endpoints *v1.Endpoints) { - namespacedName := types.NamespacedName{Namespace: endpoints.Namespace, Name: endpoints.Name} - if proxier.endpointsChanges.update(&namespacedName, endpoints, nil, proxier.hns) && proxier.isInitialized() { - proxier.Sync() - } + proxier.OnEndpointsUpdate(endpoints, nil) } +// OnEndpointsSynced is called once all the initial event handlers were +// called and the state is fully propagated to local cache. func (proxier *Proxier) OnEndpointsSynced() { proxier.mu.Lock() proxier.endpointsSynced = true @@ -867,8 +837,49 @@ func (proxier *Proxier) OnEndpointsSynced() { proxier.syncProxyRules() } +// OnEndpointSliceAdd is called whenever creation of a new endpoint slice object +// is observed. +func (proxier *Proxier) OnEndpointSliceAdd(endpointSlice *discovery.EndpointSlice) { + if proxier.endpointsChanges.EndpointSliceUpdate(endpointSlice, false) && proxier.isInitialized() { + proxier.Sync() + } +} + +// OnEndpointSliceUpdate is called whenever modification of an existing endpoint +// slice object is observed. +func (proxier *Proxier) OnEndpointSliceUpdate(_, endpointSlice *discovery.EndpointSlice) { + if proxier.endpointsChanges.EndpointSliceUpdate(endpointSlice, false) && proxier.isInitialized() { + proxier.Sync() + } +} + +// OnEndpointSliceDelete is called whenever deletion of an existing endpoint slice +// object is observed. +func (proxier *Proxier) OnEndpointSliceDelete(endpointSlice *discovery.EndpointSlice) { + if proxier.endpointsChanges.EndpointSliceUpdate(endpointSlice, true) && proxier.isInitialized() { + proxier.Sync() + } +} + +// OnEndpointSlicesSynced is called once all the initial event handlers were +// called and the state is fully propagated to local cache. +func (proxier *Proxier) OnEndpointSlicesSynced() { + proxier.mu.Lock() + proxier.endpointSlicesSynced = true + proxier.setInitialized(proxier.servicesSynced) + proxier.mu.Unlock() + + // Sync unconditionally - this is called once per lifetime. + proxier.syncProxyRules() +} + func (proxier *Proxier) cleanupAllPolicies() { - for svcName, svcInfo := range proxier.serviceMap { + for svcName, svc := range proxier.serviceMap { + svcInfo, ok := svc.(*serviceInfo) + if !ok { + klog.Errorf("Failed to cast serviceInfo %q", svcName.String()) + continue + } svcInfo.cleanupAllPolicies(proxier.endpointsMap[svcName]) } } @@ -886,118 +897,6 @@ func isNetworkNotFoundError(err error) bool { return false } -// is updated by this function (based on the given changes). -// map is cleared after applying them. -func (proxier *Proxier) updateEndpointsMap() (result updateEndpointMapResult) { - result.staleEndpoints = make(map[endpointServicePair]bool) - result.staleServiceNames = make(map[proxy.ServicePortName]bool) - - endpointsMap := proxier.endpointsMap - changes := &proxier.endpointsChanges - - func() { - changes.lock.Lock() - defer changes.lock.Unlock() - for _, change := range changes.items { - endpointsMap.unmerge(change.previous, proxier.serviceMap) - endpointsMap.merge(change.current, proxier.serviceMap) - } - changes.items = make(map[types.NamespacedName]*endpointsChange) - }() - - // TODO: If this will appear to be computationally expensive, consider - // computing this incrementally similarly to endpointsMap. - result.hcEndpoints = make(map[types.NamespacedName]int) - localIPs := getLocalIPs(endpointsMap) - for nsn, ips := range localIPs { - result.hcEndpoints[nsn] = len(ips) - } - - return result -} -func getLocalIPs(endpointsMap proxyEndpointsMap) map[types.NamespacedName]sets.String { - localIPs := make(map[types.NamespacedName]sets.String) - for svcPortName := range endpointsMap { - for _, ep := range endpointsMap[svcPortName] { - if ep.isLocal { - nsn := svcPortName.NamespacedName - if localIPs[nsn] == nil { - localIPs[nsn] = sets.NewString() - } - localIPs[nsn].Insert(ep.ip) // just the IP part - } - } - } - return localIPs -} - -// Translates single Endpoints object to proxyEndpointsMap. -// This function is used for incremental updated of endpointsMap. -// -// NOTE: endpoints object should NOT be modified. -func endpointsToEndpointsMap(endpoints *v1.Endpoints, hostname string, hns HostNetworkService) proxyEndpointsMap { - if endpoints == nil { - return nil - } - - endpointsMap := make(proxyEndpointsMap) - // We need to build a map of portname -> all ip:ports for that - // portname. Explode Endpoints.Subsets[*] into this structure. - for i := range endpoints.Subsets { - ss := &endpoints.Subsets[i] - for i := range ss.Ports { - port := &ss.Ports[i] - if port.Port == 0 { - klog.Warningf("Ignoring invalid endpoint port %s", port.Name) - continue - } - svcPortName := proxy.ServicePortName{ - NamespacedName: types.NamespacedName{Namespace: endpoints.Namespace, Name: endpoints.Name}, - Port: port.Name, - } - for i := range ss.Addresses { - addr := &ss.Addresses[i] - if addr.IP == "" { - klog.Warningf("Ignoring invalid endpoint port %s with empty host", port.Name) - continue - } - isLocal := addr.NodeName != nil && *addr.NodeName == hostname - epInfo := newEndpointInfo(addr.IP, uint16(port.Port), isLocal, hns) - endpointsMap[svcPortName] = append(endpointsMap[svcPortName], epInfo) - } - if klog.V(3) { - newEPList := []*endpointsInfo{} - for _, ep := range endpointsMap[svcPortName] { - newEPList = append(newEPList, ep) - } - klog.Infof("Setting endpoints for %q to %+v", svcPortName, newEPList) - } - } - } - return endpointsMap -} - -// Translates single Service object to proxyServiceMap. -// -// NOTE: service object should NOT be modified. -func serviceToServiceMap(service *v1.Service, hns HostNetworkService) proxyServiceMap { - if service == nil { - return nil - } - svcName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} - if shouldSkipService(svcName, service) { - return nil - } - - serviceMap := make(proxyServiceMap) - for i := range service.Spec.Ports { - servicePort := &service.Spec.Ports[i] - svcPortName := proxy.ServicePortName{NamespacedName: svcName, Port: servicePort.Name} - serviceMap[svcPortName] = newServiceInfo(svcPortName, servicePort, service, hns) - } - return serviceMap -} - // This is where all of the hns save/restore calls happen. // assumes proxier.mu is held func (proxier *Proxier) syncProxyRules() { @@ -1010,7 +909,7 @@ func (proxier *Proxier) syncProxyRules() { klog.V(4).Infof("syncProxyRules took %v", time.Since(start)) }() // don't sync rules till we've received services and endpoints - if !proxier.endpointsSynced || !proxier.servicesSynced { + if !proxier.isInitialized() { klog.V(2).Info("Not syncing hns until Services and Endpoints have been received from master") return } @@ -1032,15 +931,15 @@ func (proxier *Proxier) syncProxyRules() { // We assume that if this was called, we really want to sync them, // even if nothing changed in the meantime. In other words, callers are // responsible for detecting no-op changes and not calling this function. - serviceUpdateResult := proxier.updateServiceMap() - endpointUpdateResult := proxier.updateEndpointsMap() + serviceUpdateResult := proxy.UpdateServiceMap(proxier.serviceMap, proxier.serviceChanges) + endpointUpdateResult := proxier.endpointsMap.Update(proxier.endpointsChanges) - staleServices := serviceUpdateResult.staleServices + staleServices := serviceUpdateResult.UDPStaleClusterIP // merge stale services gathered from updateEndpointsMap - for svcPortName := range endpointUpdateResult.staleServiceNames { - if svcInfo, ok := proxier.serviceMap[svcPortName]; ok && svcInfo != nil && svcInfo.protocol == v1.ProtocolUDP { - klog.V(2).Infof("Stale udp service %v -> %s", svcPortName, svcInfo.clusterIP.String()) - staleServices.Insert(svcInfo.clusterIP.String()) + for _, svcPortName := range endpointUpdateResult.StaleServiceNames { + if svcInfo, ok := proxier.serviceMap[svcPortName]; ok && svcInfo != nil && svcInfo.Protocol() == v1.ProtocolUDP { + klog.V(2).Infof("Stale udp service %v -> %s", svcPortName, svcInfo.ClusterIP().String()) + staleServices.Insert(svcInfo.ClusterIP().String()) } } @@ -1058,18 +957,24 @@ func (proxier *Proxier) syncProxyRules() { klog.V(3).Infof("Syncing Policies") // Program HNS by adding corresponding policies for each service. - for svcName, svcInfo := range proxier.serviceMap { + for svcName, svc := range proxier.serviceMap { + svcInfo, ok := svc.(*serviceInfo) + if !ok { + klog.Errorf("Failed to cast serviceInfo %q", svcName.String()) + continue + } + if svcInfo.policyApplied { - klog.V(4).Infof("Policy already applied for %s", spew.Sdump(svcInfo)) + klog.V(4).Infof("Policy already applied for %s", spewSdump(svcInfo)) continue } if proxier.network.networkType == "Overlay" { - serviceVipEndpoint, _ := hns.getEndpointByIpAddress(svcInfo.clusterIP.String(), hnsNetworkName) + serviceVipEndpoint, _ := hns.getEndpointByIpAddress(svcInfo.ClusterIP().String(), hnsNetworkName) if serviceVipEndpoint == nil { - klog.V(4).Infof("No existing remote endpoint for service VIP %v", svcInfo.clusterIP.String()) + klog.V(4).Infof("No existing remote endpoint for service VIP %v", svcInfo.ClusterIP().String()) hnsEndpoint := &endpointsInfo{ - ip: svcInfo.clusterIP.String(), + ip: svcInfo.ClusterIP().String(), isLocal: false, macAddress: proxier.hostMac, providerAddress: proxier.nodeIP.String(), @@ -1081,7 +986,8 @@ func (proxier *Proxier) syncProxyRules() { continue } - newHnsEndpoint.refCount++ + newHnsEndpoint.refCount = proxier.endPointsRefCount.getRefCount(newHnsEndpoint.hnsID) + *newHnsEndpoint.refCount++ svcInfo.remoteEndpoint = newHnsEndpoint } } @@ -1093,7 +999,14 @@ func (proxier *Proxier) syncProxyRules() { containsPublicIP := false containsNodeIP := false - for _, ep := range proxier.endpointsMap[svcName] { + for _, epInfo := range proxier.endpointsMap[svcName] { + + ep, ok := epInfo.(*endpointsInfo) + if !ok { + klog.Errorf("Failed to cast endpointsInfo %q", svcName.String()) + continue + } + var newHnsEndpoint *endpointsInfo hnsNetworkName := proxier.network.name var err error @@ -1113,11 +1026,11 @@ func (proxier *Proxier) syncProxyRules() { // First check if an endpoint resource exists for this IP, on the current host // A Local endpoint could exist here already // A remote endpoint was already created and proxy was restarted - newHnsEndpoint, err = hns.getEndpointByIpAddress(ep.ip, hnsNetworkName) + newHnsEndpoint, err = hns.getEndpointByIpAddress(ep.IP(), hnsNetworkName) } if newHnsEndpoint == nil { - if ep.isLocal { - klog.Errorf("Local endpoint not found for %v: err: %v on network %s", ep.ip, err, hnsNetworkName) + if ep.GetIsLocal() { + klog.Errorf("Local endpoint not found for %v: err: %v on network %s", ep.IP(), err, hnsNetworkName) continue } @@ -1131,24 +1044,10 @@ func (proxier *Proxier) syncProxyRules() { return } proxier.network = *updatedNetwork - var providerAddress string - for _, rs := range proxier.network.remoteSubnets { - _, ipNet, err := net.ParseCIDR(rs.destinationPrefix) - if err != nil { - klog.Fatalf("%v", err) - } - if ipNet.Contains(net.ParseIP(ep.ip)) { - providerAddress = rs.providerAddress - } - if ep.ip == rs.providerAddress { - providerAddress = rs.providerAddress - containsNodeIP = true - } - } + providerAddress := proxier.network.findRemoteSubnetProviderAddress(ep.IP()) if len(providerAddress) == 0 { - klog.Infof("Could not find provider address for %s. Assuming it is a public IP", ep.ip) + klog.Infof("Could not find provider address for %s. Assuming it is a public IP", ep.IP()) providerAddress = proxier.nodeIP.String() - containsPublicIP = true } hnsEndpoint := &endpointsInfo{ @@ -1160,10 +1059,11 @@ func (proxier *Proxier) syncProxyRules() { newHnsEndpoint, err = hns.createEndpoint(hnsEndpoint, hnsNetworkName) if err != nil { - klog.Errorf("Remote endpoint creation failed: %v, %s", err, spew.Sdump(hnsEndpoint)) + klog.Errorf("Remote endpoint creation failed: %v, %s", err, spewSdump(hnsEndpoint)) continue } } else { + hnsEndpoint := &endpointsInfo{ ip: ep.ip, isLocal: false, @@ -1178,18 +1078,34 @@ func (proxier *Proxier) syncProxyRules() { } } + if proxier.network.networkType == "Overlay" { + providerAddress := proxier.network.findRemoteSubnetProviderAddress(ep.IP()) + + isNodeIP := (ep.IP() == providerAddress) + isPublicIP := (len(providerAddress) == 0) + klog.Infof("Endpoint %s on overlay network %s is classified as NodeIp: %v, Public Ip: %v", ep.IP(), hnsNetworkName, isNodeIP, isPublicIP) + + containsNodeIP = containsNodeIP || isNodeIP + containsPublicIP = containsPublicIP || isPublicIP + } + // Save the hnsId for reference LogJson(newHnsEndpoint, "Hns Endpoint resource", 1) hnsEndpoints = append(hnsEndpoints, *newHnsEndpoint) - if newHnsEndpoint.isLocal { + if newHnsEndpoint.GetIsLocal() { hnsLocalEndpoints = append(hnsLocalEndpoints, *newHnsEndpoint) + } else { + // We only share the refCounts for remote endpoints + ep.refCount = proxier.endPointsRefCount.getRefCount(newHnsEndpoint.hnsID) } + ep.hnsID = newHnsEndpoint.hnsID - ep.refCount++ + *ep.refCount++ + Log(ep, "Endpoint resource found", 3) } - klog.V(3).Infof("Associated endpoints [%s] for service [%s]", spew.Sdump(hnsEndpoints), svcName) + klog.V(3).Infof("Associated endpoints [%s] for service [%s]", spewSdump(hnsEndpoints), svcName) if len(svcInfo.hnsID) > 0 { // This should not happen @@ -1201,20 +1117,26 @@ func (proxier *Proxier) syncProxyRules() { continue } - klog.V(4).Infof("Trying to Apply Policies for service %s", spew.Sdump(svcInfo)) + klog.V(4).Infof("Trying to Apply Policies for service %s", spewSdump(svcInfo)) var hnsLoadBalancer *loadBalancerInfo var sourceVip = proxier.sourceVip if containsPublicIP || containsNodeIP { sourceVip = proxier.nodeIP.String() } + + sessionAffinityClientIP := svcInfo.SessionAffinityType() == v1.ServiceAffinityClientIP + if sessionAffinityClientIP && !proxier.supportedFeatures.SessionAffinity { + klog.Warningf("Session Affinity is not supported on this version of Windows.") + } + hnsLoadBalancer, err := hns.getLoadBalancer( hnsEndpoints, - loadBalancerFlags{isDSR: proxier.isDSR}, + loadBalancerFlags{isDSR: proxier.isDSR, isIPv6: proxier.isIPv6Mode, sessionAffinity: sessionAffinityClientIP}, sourceVip, - svcInfo.clusterIP.String(), - Enum(svcInfo.protocol), + svcInfo.ClusterIP().String(), + Enum(svcInfo.Protocol()), uint16(svcInfo.targetPort), - uint16(svcInfo.port), + uint16(svcInfo.Port()), ) if err != nil { klog.Errorf("Policy creation failed: %v", err) @@ -1222,10 +1144,10 @@ func (proxier *Proxier) syncProxyRules() { } svcInfo.hnsID = hnsLoadBalancer.hnsID - klog.V(3).Infof("Hns LoadBalancer resource created for cluster ip resources %v, Id [%s]", svcInfo.clusterIP, hnsLoadBalancer.hnsID) + klog.V(3).Infof("Hns LoadBalancer resource created for cluster ip resources %v, Id [%s]", svcInfo.ClusterIP(), hnsLoadBalancer.hnsID) // If nodePort is specified, user should be able to use nodeIP:nodePort to reach the backend endpoints - if svcInfo.nodePort > 0 { + if svcInfo.NodePort() > 0 { // If the preserve-destination service annotation is present, we will disable routing mesh for NodePort. // This means that health services can use Node Port without falsely getting results from a different node. nodePortEndpoints := hnsEndpoints @@ -1234,12 +1156,12 @@ func (proxier *Proxier) syncProxyRules() { } hnsLoadBalancer, err := hns.getLoadBalancer( nodePortEndpoints, - loadBalancerFlags{localRoutedVIP: true}, + loadBalancerFlags{localRoutedVIP: true, sessionAffinity: sessionAffinityClientIP, isIPv6: proxier.isIPv6Mode}, sourceVip, "", - Enum(svcInfo.protocol), + Enum(svcInfo.Protocol()), uint16(svcInfo.targetPort), - uint16(svcInfo.nodePort), + uint16(svcInfo.NodePort()), ) if err != nil { klog.Errorf("Policy creation failed: %v", err) @@ -1247,7 +1169,7 @@ func (proxier *Proxier) syncProxyRules() { } svcInfo.nodePorthnsID = hnsLoadBalancer.hnsID - klog.V(3).Infof("Hns LoadBalancer resource created for nodePort resources %v, Id [%s]", svcInfo.clusterIP, hnsLoadBalancer.hnsID) + klog.V(3).Infof("Hns LoadBalancer resource created for nodePort resources %v, Id [%s]", svcInfo.ClusterIP(), hnsLoadBalancer.hnsID) } // Create a Load Balancer Policy for each external IP @@ -1255,12 +1177,12 @@ func (proxier *Proxier) syncProxyRules() { // Try loading existing policies, if already available hnsLoadBalancer, err = hns.getLoadBalancer( hnsEndpoints, - loadBalancerFlags{}, + loadBalancerFlags{sessionAffinity: sessionAffinityClientIP, isIPv6: proxier.isIPv6Mode}, sourceVip, externalIP.ip, - Enum(svcInfo.protocol), + Enum(svcInfo.Protocol()), uint16(svcInfo.targetPort), - uint16(svcInfo.port), + uint16(svcInfo.Port()), ) if err != nil { klog.Errorf("Policy creation failed: %v", err) @@ -1278,12 +1200,12 @@ func (proxier *Proxier) syncProxyRules() { } hnsLoadBalancer, err := hns.getLoadBalancer( lbIngressEndpoints, - loadBalancerFlags{isDSR: svcInfo.preserveDIP || proxier.isDSR, useMUX: svcInfo.preserveDIP, preserveDIP: svcInfo.preserveDIP}, + loadBalancerFlags{isDSR: svcInfo.preserveDIP || proxier.isDSR, useMUX: svcInfo.preserveDIP, preserveDIP: svcInfo.preserveDIP, sessionAffinity: sessionAffinityClientIP, isIPv6: proxier.isIPv6Mode}, sourceVip, lbIngressIP.ip, - Enum(svcInfo.protocol), + Enum(svcInfo.Protocol()), uint16(svcInfo.targetPort), - uint16(svcInfo.port), + uint16(svcInfo.Port()), ) if err != nil { klog.Errorf("Policy creation failed: %v", err) @@ -1304,10 +1226,10 @@ func (proxier *Proxier) syncProxyRules() { // Update service healthchecks. The endpoints list might include services that are // not "OnlyLocal", but the services list will not, and the serviceHealthServer // will just drop those endpoints. - if err := proxier.serviceHealthServer.SyncServices(serviceUpdateResult.hcServices); err != nil { + if err := proxier.serviceHealthServer.SyncServices(serviceUpdateResult.HCServiceNodePorts); err != nil { klog.Errorf("Error syncing healthcheck services: %v", err) } - if err := proxier.serviceHealthServer.SyncEndpoints(endpointUpdateResult.hcEndpoints); err != nil { + if err := proxier.serviceHealthServer.SyncEndpoints(endpointUpdateResult.HCEndpointsLocalIPSize); err != nil { klog.Errorf("Error syncing healthcheck endpoints: %v", err) } @@ -1318,9 +1240,10 @@ func (proxier *Proxier) syncProxyRules() { klog.V(5).Infof("Pending delete stale service IP %s connections", svcIP) } -} - -type endpointServicePair struct { - endpoint string - servicePortName proxy.ServicePortName + // remove stale endpoint refcount entries + for hnsID, referenceCount := range proxier.endPointsRefCount { + if *referenceCount <= 0 { + delete(proxier.endPointsRefCount, hnsID) + } + } } diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/BUILD index eebb3ab3579..1b6df844031 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/BUILD @@ -29,7 +29,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//vendor/github.com/miekg/dns:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxier.go b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxier.go index b3fc33d5f65..1fd1fcbaaa3 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxier.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxier.go @@ -25,7 +25,7 @@ import ( "sync/atomic" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" @@ -213,7 +213,7 @@ func (proxier *Proxier) addServicePortPortal(servicePortPortalName ServicePortPo return nil, fmt.Errorf("could not parse ip '%q'", listenIP) } // add the IP address. Node port binds to all interfaces. - args := proxier.netshIpv4AddressAddArgs(serviceIP) + args := proxier.netshIPv4AddressAddArgs(serviceIP) if existed, err := proxier.netsh.EnsureIPAddress(args, serviceIP); err != nil { return nil, err } else if !existed { @@ -262,7 +262,7 @@ func (proxier *Proxier) closeServicePortPortal(servicePortPortalName ServicePort // close the PortalProxy by deleting the service IP address if info.portal.ip != allAvailableInterfaces { serviceIP := net.ParseIP(info.portal.ip) - args := proxier.netshIpv4AddressDeleteArgs(serviceIP) + args := proxier.netshIPv4AddressDeleteArgs(serviceIP) if err := proxier.netsh.DeleteIPAddress(args); err != nil { return err } @@ -411,34 +411,50 @@ func (proxier *Proxier) unmergeService(service *v1.Service, existingPortPortals } } +// OnServiceAdd is called whenever creation of new service object +// is observed. func (proxier *Proxier) OnServiceAdd(service *v1.Service) { _ = proxier.mergeService(service) } +// OnServiceUpdate is called whenever modification of an existing +// service object is observed. func (proxier *Proxier) OnServiceUpdate(oldService, service *v1.Service) { existingPortPortals := proxier.mergeService(service) proxier.unmergeService(oldService, existingPortPortals) } +// OnServiceDelete is called whenever deletion of an existing service +// object is observed. func (proxier *Proxier) OnServiceDelete(service *v1.Service) { proxier.unmergeService(service, map[ServicePortPortalName]bool{}) } +// OnServiceSynced is called once all the initial event handlers were +// called and the state is fully propagated to local cache. func (proxier *Proxier) OnServiceSynced() { } +// OnEndpointsAdd is called whenever creation of new endpoints object +// is observed. func (proxier *Proxier) OnEndpointsAdd(endpoints *v1.Endpoints) { proxier.loadBalancer.OnEndpointsAdd(endpoints) } +// OnEndpointsUpdate is called whenever modification of an existing +// endpoints object is observed. func (proxier *Proxier) OnEndpointsUpdate(oldEndpoints, endpoints *v1.Endpoints) { proxier.loadBalancer.OnEndpointsUpdate(oldEndpoints, endpoints) } +// OnEndpointsDelete is called whenever deletion of an existing endpoints +// object is observed. func (proxier *Proxier) OnEndpointsDelete(endpoints *v1.Endpoints) { proxier.loadBalancer.OnEndpointsDelete(endpoints) } +// OnEndpointsSynced is called once all the initial event handlers were +// called and the state is fully propagated to local cache. func (proxier *Proxier) OnEndpointsSynced() { proxier.loadBalancer.OnEndpointsSynced() } @@ -458,7 +474,7 @@ func isClosedError(err error) bool { return strings.HasSuffix(err.Error(), "use of closed network connection") } -func (proxier *Proxier) netshIpv4AddressAddArgs(destIP net.IP) []string { +func (proxier *Proxier) netshIPv4AddressAddArgs(destIP net.IP) []string { intName := proxier.netsh.GetInterfaceToAddIP() args := []string{ "interface", "ipv4", "add", "address", @@ -469,7 +485,7 @@ func (proxier *Proxier) netshIpv4AddressAddArgs(destIP net.IP) []string { return args } -func (proxier *Proxier) netshIpv4AddressDeleteArgs(destIP net.IP) []string { +func (proxier *Proxier) netshIPv4AddressDeleteArgs(destIP net.IP) []string { intName := proxier.netsh.GetInterfaceToAddIP() args := []string{ "interface", "ipv4", "delete", "address", diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxysocket.go b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxysocket.go index 20fdb535e6e..12621cf5ec2 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxysocket.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxysocket.go @@ -30,7 +30,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/proxy" "k8s.io/kubernetes/pkg/util/ipconfig" "k8s.io/utils/exec" diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/roundrobin.go b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/roundrobin.go index 1b943edf5b2..69a014fd5ee 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/roundrobin.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/roundrobin.go @@ -26,7 +26,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/proxy" "k8s.io/kubernetes/pkg/proxy/util" "k8s.io/kubernetes/pkg/util/slice" diff --git a/vendor/k8s.io/kubernetes/pkg/quota/v1/generic/OWNERS b/vendor/k8s.io/kubernetes/pkg/quota/v1/generic/OWNERS index 261ef71a393..4d4f90e4d15 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/v1/generic/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/quota/v1/generic/OWNERS @@ -3,4 +3,3 @@ reviewers: - smarterclayton - derekwaynecarr -- david-mcmahon diff --git a/vendor/k8s.io/kubernetes/pkg/quota/v1/install/registry.go b/vendor/k8s.io/kubernetes/pkg/quota/v1/install/registry.go index b870368530f..28b87159c80 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/v1/install/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/quota/v1/install/registry.go @@ -37,6 +37,16 @@ func NewQuotaConfigurationForControllers(f quota.ListerForResourceFunc) quota.Co // ignoredResources are ignored by quota by default var ignoredResources = map[schema.GroupResource]struct{}{ + // virtual resources that aren't stored and shouldn't be quota-ed + {Group: "", Resource: "bindings"}: {}, + {Group: "", Resource: "componentstatuses"}: {}, + {Group: "authentication.k8s.io", Resource: "tokenreviews"}: {}, + {Group: "authorization.k8s.io", Resource: "subjectaccessreviews"}: {}, + {Group: "authorization.k8s.io", Resource: "selfsubjectaccessreviews"}: {}, + {Group: "authorization.k8s.io", Resource: "localsubjectaccessreviews"}: {}, + {Group: "authorization.k8s.io", Resource: "selfsubjectrulesreviews"}: {}, + + // events haven't been quota-ed before {Group: "", Resource: "events"}: {}, } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/deployment/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/apps/deployment/storage/storage.go index 6a76fbf4ca4..c310d3b6bb1 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/deployment/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/deployment/storage/storage.go @@ -53,6 +53,7 @@ type DeploymentStorage struct { Rollback *RollbackREST } +// NewStorage returns new instance of DeploymentStorage. func NewStorage(optsGetter generic.RESTOptionsGetter) (DeploymentStorage, error) { deploymentRest, deploymentStatusRest, deploymentRollbackRest, err := NewREST(optsGetter) if err != nil { @@ -67,6 +68,7 @@ func NewStorage(optsGetter generic.RESTOptionsGetter) (DeploymentStorage, error) }, nil } +// REST implements a RESTStorage for Deployments. type REST struct { *genericregistry.Store categories []string @@ -111,6 +113,7 @@ func (r *REST) Categories() []string { return r.categories } +// WithCategories sets categories for REST. func (r *REST) WithCategories(categories []string) *REST { r.categories = categories return r @@ -121,6 +124,7 @@ type StatusREST struct { store *genericregistry.Store } +// New returns empty Deployment object. func (r *StatusREST) New() runtime.Object { return &apps.Deployment{} } @@ -163,6 +167,7 @@ func (r *RollbackREST) New() runtime.Object { var _ = rest.NamedCreater(&RollbackREST{}) +// Create runs rollback for deployment func (r *RollbackREST) Create(ctx context.Context, name string, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) { rollback, ok := obj.(*apps.DeploymentRollback) if !ok { @@ -230,6 +235,7 @@ func (r *RollbackREST) setDeploymentRollback(ctx context.Context, deploymentID s return finalDeployment, err } +// ScaleREST implements a Scale for Deployment. type ScaleREST struct { store *genericregistry.Store } @@ -238,6 +244,7 @@ type ScaleREST struct { var _ = rest.Patcher(&ScaleREST{}) var _ = rest.GroupVersionKindProvider(&ScaleREST{}) +// GroupVersionKind returns GroupVersionKind for Deployment Scale object func (r *ScaleREST) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind { switch containingGV { case extensionsv1beta1.SchemeGroupVersion: @@ -256,6 +263,7 @@ func (r *ScaleREST) New() runtime.Object { return &autoscaling.Scale{} } +// Get retrieves object from Scale storage. func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { obj, err := r.store.Get(ctx, name, options) if err != nil { @@ -269,40 +277,12 @@ func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOpt return scale, nil } +// Update alters scale subset of Deployment object. func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { - obj, err := r.store.Get(ctx, name, &metav1.GetOptions{}) - if err != nil { - return nil, false, errors.NewNotFound(apps.Resource("deployments/scale"), name) - } - deployment := obj.(*apps.Deployment) - - oldScale, err := scaleFromDeployment(deployment) - if err != nil { - return nil, false, err - } - - obj, err = objInfo.UpdatedObject(ctx, oldScale) - if err != nil { - return nil, false, err - } - if obj == nil { - return nil, false, errors.NewBadRequest(fmt.Sprintf("nil update passed to Scale")) - } - scale, ok := obj.(*autoscaling.Scale) - if !ok { - return nil, false, errors.NewBadRequest(fmt.Sprintf("expected input object type to be Scale, but %T", obj)) - } - - if errs := autoscalingvalidation.ValidateScale(scale); len(errs) > 0 { - return nil, false, errors.NewInvalid(autoscaling.Kind("Scale"), name, errs) - } - - deployment.Spec.Replicas = scale.Spec.Replicas - deployment.ResourceVersion = scale.ResourceVersion - obj, _, err = r.store.Update( + obj, _, err := r.store.Update( ctx, - deployment.Name, - rest.DefaultUpdatedObjectInfo(deployment), + name, + &scaleUpdatedObjectInfo{name, objInfo}, toScaleCreateValidation(createValidation), toScaleUpdateValidation(updateValidation), false, @@ -311,7 +291,7 @@ func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.Update if err != nil { return nil, false, err } - deployment = obj.(*apps.Deployment) + deployment := obj.(*apps.Deployment) newScale, err := scaleFromDeployment(deployment) if err != nil { return nil, false, errors.NewBadRequest(fmt.Sprintf("%v", err)) @@ -367,3 +347,62 @@ func scaleFromDeployment(deployment *apps.Deployment) (*autoscaling.Scale, error }, }, nil } + +// scaleUpdatedObjectInfo transforms existing deployment -> existing scale -> new scale -> new deployment +type scaleUpdatedObjectInfo struct { + name string + reqObjInfo rest.UpdatedObjectInfo +} + +func (i *scaleUpdatedObjectInfo) Preconditions() *metav1.Preconditions { + return i.reqObjInfo.Preconditions() +} + +func (i *scaleUpdatedObjectInfo) UpdatedObject(ctx context.Context, oldObj runtime.Object) (runtime.Object, error) { + deployment, ok := oldObj.DeepCopyObject().(*apps.Deployment) + if !ok { + return nil, errors.NewBadRequest(fmt.Sprintf("expected existing object type to be Deployment, got %T", deployment)) + } + // if zero-value, the existing object does not exist + if len(deployment.ResourceVersion) == 0 { + return nil, errors.NewNotFound(apps.Resource("deployments/scale"), i.name) + } + + // deployment -> old scale + oldScale, err := scaleFromDeployment(deployment) + if err != nil { + return nil, err + } + + // old scale -> new scale + newScaleObj, err := i.reqObjInfo.UpdatedObject(ctx, oldScale) + if err != nil { + return nil, err + } + if newScaleObj == nil { + return nil, errors.NewBadRequest("nil update passed to Scale") + } + scale, ok := newScaleObj.(*autoscaling.Scale) + if !ok { + return nil, errors.NewBadRequest(fmt.Sprintf("expected input object type to be Scale, but %T", newScaleObj)) + } + + // validate + if errs := autoscalingvalidation.ValidateScale(scale); len(errs) > 0 { + return nil, errors.NewInvalid(autoscaling.Kind("Scale"), deployment.Name, errs) + } + + // validate precondition if specified (resourceVersion matching is handled by storage) + if len(scale.UID) > 0 && scale.UID != deployment.UID { + return nil, errors.NewConflict( + apps.Resource("deployments/scale"), + deployment.Name, + fmt.Errorf("Precondition failed: UID in precondition: %v, UID in object meta: %v", scale.UID, deployment.UID), + ) + } + + // move replicas/resourceVersion fields to object and return + deployment.Spec.Replicas = scale.Spec.Replicas + deployment.ResourceVersion = scale.ResourceVersion + return deployment, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/replicaset/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/apps/replicaset/storage/storage.go index d34bc9d0302..7a751ef0964 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/replicaset/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/replicaset/storage/storage.go @@ -49,6 +49,7 @@ type ReplicaSetStorage struct { Scale *ScaleREST } +// NewStorage returns new instance of ReplicaSetStorage. func NewStorage(optsGetter generic.RESTOptionsGetter) (ReplicaSetStorage, error) { replicaSetRest, replicaSetStatusRest, err := NewREST(optsGetter) if err != nil { @@ -62,6 +63,7 @@ func NewStorage(optsGetter generic.RESTOptionsGetter) (ReplicaSetStorage, error) }, nil } +// REST implements a RESTStorage for ReplicaSet. type REST struct { *genericregistry.Store categories []string @@ -108,6 +110,7 @@ func (r *REST) Categories() []string { return r.categories } +// WithCategories sets categories for REST. func (r *REST) WithCategories(categories []string) *REST { r.categories = categories return r @@ -118,6 +121,7 @@ type StatusREST struct { store *genericregistry.Store } +// New returns empty ReplicaSet object. func (r *StatusREST) New() runtime.Object { return &apps.ReplicaSet{} } @@ -134,6 +138,7 @@ func (r *StatusREST) Update(ctx context.Context, name string, objInfo rest.Updat return r.store.Update(ctx, name, objInfo, createValidation, updateValidation, false, options) } +// ScaleREST implements a Scale for ReplicaSet. type ScaleREST struct { store *genericregistry.Store } @@ -142,6 +147,7 @@ type ScaleREST struct { var _ = rest.Patcher(&ScaleREST{}) var _ = rest.GroupVersionKindProvider(&ScaleREST{}) +// GroupVersionKind returns GroupVersionKind for ReplicaSet Scale object func (r *ScaleREST) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind { switch containingGV { case extensionsv1beta1.SchemeGroupVersion: @@ -160,6 +166,7 @@ func (r *ScaleREST) New() runtime.Object { return &autoscaling.Scale{} } +// Get retrieves object from Scale storage. func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { obj, err := r.store.Get(ctx, name, options) if err != nil { @@ -173,41 +180,12 @@ func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOpt return scale, err } +// Update alters scale subset of ReplicaSet object. func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { - obj, err := r.store.Get(ctx, name, &metav1.GetOptions{}) - if err != nil { - return nil, false, errors.NewNotFound(apps.Resource("replicasets/scale"), name) - } - rs := obj.(*apps.ReplicaSet) - - oldScale, err := scaleFromReplicaSet(rs) - if err != nil { - return nil, false, err - } - - // TODO: should this pass admission? - obj, err = objInfo.UpdatedObject(ctx, oldScale) - if err != nil { - return nil, false, err - } - if obj == nil { - return nil, false, errors.NewBadRequest(fmt.Sprintf("nil update passed to Scale")) - } - scale, ok := obj.(*autoscaling.Scale) - if !ok { - return nil, false, errors.NewBadRequest(fmt.Sprintf("wrong object passed to Scale update: %v", obj)) - } - - if errs := autoscalingvalidation.ValidateScale(scale); len(errs) > 0 { - return nil, false, errors.NewInvalid(autoscaling.Kind("Scale"), scale.Name, errs) - } - - rs.Spec.Replicas = scale.Spec.Replicas - rs.ResourceVersion = scale.ResourceVersion - obj, _, err = r.store.Update( + obj, _, err := r.store.Update( ctx, - rs.Name, - rest.DefaultUpdatedObjectInfo(rs), + name, + &scaleUpdatedObjectInfo{name, objInfo}, toScaleCreateValidation(createValidation), toScaleUpdateValidation(updateValidation), false, @@ -216,7 +194,7 @@ func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.Update if err != nil { return nil, false, err } - rs = obj.(*apps.ReplicaSet) + rs := obj.(*apps.ReplicaSet) newScale, err := scaleFromReplicaSet(rs) if err != nil { return nil, false, errors.NewBadRequest(fmt.Sprintf("%v", err)) @@ -272,3 +250,62 @@ func scaleFromReplicaSet(rs *apps.ReplicaSet) (*autoscaling.Scale, error) { }, }, nil } + +// scaleUpdatedObjectInfo transforms existing replicaset -> existing scale -> new scale -> new replicaset +type scaleUpdatedObjectInfo struct { + name string + reqObjInfo rest.UpdatedObjectInfo +} + +func (i *scaleUpdatedObjectInfo) Preconditions() *metav1.Preconditions { + return i.reqObjInfo.Preconditions() +} + +func (i *scaleUpdatedObjectInfo) UpdatedObject(ctx context.Context, oldObj runtime.Object) (runtime.Object, error) { + replicaset, ok := oldObj.DeepCopyObject().(*apps.ReplicaSet) + if !ok { + return nil, errors.NewBadRequest(fmt.Sprintf("expected existing object type to be ReplicaSet, got %T", replicaset)) + } + // if zero-value, the existing object does not exist + if len(replicaset.ResourceVersion) == 0 { + return nil, errors.NewNotFound(apps.Resource("replicasets/scale"), i.name) + } + + // replicaset -> old scale + oldScale, err := scaleFromReplicaSet(replicaset) + if err != nil { + return nil, err + } + + // old scale -> new scale + newScaleObj, err := i.reqObjInfo.UpdatedObject(ctx, oldScale) + if err != nil { + return nil, err + } + if newScaleObj == nil { + return nil, errors.NewBadRequest("nil update passed to Scale") + } + scale, ok := newScaleObj.(*autoscaling.Scale) + if !ok { + return nil, errors.NewBadRequest(fmt.Sprintf("expected input object type to be Scale, but %T", newScaleObj)) + } + + // validate + if errs := autoscalingvalidation.ValidateScale(scale); len(errs) > 0 { + return nil, errors.NewInvalid(autoscaling.Kind("Scale"), replicaset.Name, errs) + } + + // validate precondition if specified (resourceVersion matching is handled by storage) + if len(scale.UID) > 0 && scale.UID != replicaset.UID { + return nil, errors.NewConflict( + apps.Resource("replicasets/scale"), + replicaset.Name, + fmt.Errorf("Precondition failed: UID in precondition: %v, UID in object meta: %v", scale.UID, replicaset.UID), + ) + } + + // move replicas/resourceVersion fields to object and return + replicaset.Spec.Replicas = scale.Spec.Replicas + replicaset.ResourceVersion = scale.ResourceVersion + return replicaset, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/storage_apps.go b/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/storage_apps.go index 141c1280f2f..5d800a8733d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/storage_apps.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/storage_apps.go @@ -31,25 +31,27 @@ import ( statefulsetstore "k8s.io/kubernetes/pkg/registry/apps/statefulset/storage" ) -type RESTStorageProvider struct{} +// StorageProvider is a struct for apps REST storage. +type StorageProvider struct{} -func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool, error) { +// NewRESTStorage returns APIGroupInfo object. +func (p StorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool, error) { apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(apps.GroupName, legacyscheme.Scheme, legacyscheme.ParameterCodec, legacyscheme.Codecs) // If you add a version here, be sure to add an entry in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go with specific priorities. // TODO refactor the plumbing to provide the information in the APIGroupInfo if apiResourceConfigSource.VersionEnabled(appsapiv1.SchemeGroupVersion) { - if storageMap, err := p.v1Storage(apiResourceConfigSource, restOptionsGetter); err != nil { + storageMap, err := p.v1Storage(apiResourceConfigSource, restOptionsGetter) + if err != nil { return genericapiserver.APIGroupInfo{}, false, err - } else { - apiGroupInfo.VersionedResourcesStorageMap[appsapiv1.SchemeGroupVersion.Version] = storageMap } + apiGroupInfo.VersionedResourcesStorageMap[appsapiv1.SchemeGroupVersion.Version] = storageMap } return apiGroupInfo, true, nil } -func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) { +func (p StorageProvider) v1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) { storage := map[string]rest.Storage{} // deployments @@ -97,6 +99,7 @@ func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.API return storage, nil } -func (p RESTStorageProvider) GroupName() string { +// GroupName returns name of the group +func (p StorageProvider) GroupName() string { return apps.GroupName } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/statefulset/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/apps/statefulset/storage/BUILD index e4369dcfc2c..ac35776facf 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/statefulset/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/statefulset/storage/BUILD @@ -20,6 +20,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/statefulset/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/apps/statefulset/storage/storage.go index cf90cd8dfa2..34e31723f12 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/statefulset/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/statefulset/storage/storage.go @@ -46,6 +46,7 @@ type StatefulSetStorage struct { Scale *ScaleREST } +// NewStorage returns new instance of StatefulSetStorage. func NewStorage(optsGetter generic.RESTOptionsGetter) (StatefulSetStorage, error) { statefulSetRest, statefulSetStatusRest, err := NewREST(optsGetter) if err != nil { @@ -59,7 +60,7 @@ func NewStorage(optsGetter generic.RESTOptionsGetter) (StatefulSetStorage, error }, nil } -// rest implements a RESTStorage for statefulsets against etcd +// REST implements a RESTStorage for statefulsets against etcd type REST struct { *genericregistry.Store } @@ -100,6 +101,7 @@ type StatusREST struct { store *genericregistry.Store } +// New returns empty StatefulSet object. func (r *StatusREST) New() runtime.Object { return &apps.StatefulSet{} } @@ -124,6 +126,7 @@ func (r *REST) ShortNames() []string { return []string{"sts"} } +// ScaleREST implements a Scale for Deployment. type ScaleREST struct { store *genericregistry.Store } @@ -132,6 +135,7 @@ type ScaleREST struct { var _ = rest.Patcher(&ScaleREST{}) var _ = rest.GroupVersionKindProvider(&ScaleREST{}) +// GroupVersionKind returns GroupVersionKind for StatefulSet Scale object func (r *ScaleREST) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind { switch containingGV { case appsv1beta1.SchemeGroupVersion: @@ -148,6 +152,7 @@ func (r *ScaleREST) New() runtime.Object { return &autoscaling.Scale{} } +// Get retrieves object from Scale storage. func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { obj, err := r.store.Get(ctx, name, options) if err != nil { @@ -161,40 +166,12 @@ func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOpt return scale, err } +// Update alters scale subset of StatefulSet object. func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { - obj, err := r.store.Get(ctx, name, &metav1.GetOptions{}) - if err != nil { - return nil, false, err - } - ss := obj.(*apps.StatefulSet) - - oldScale, err := scaleFromStatefulSet(ss) - if err != nil { - return nil, false, err - } - - obj, err = objInfo.UpdatedObject(ctx, oldScale) - if err != nil { - return nil, false, err - } - if obj == nil { - return nil, false, errors.NewBadRequest(fmt.Sprintf("nil update passed to Scale")) - } - scale, ok := obj.(*autoscaling.Scale) - if !ok { - return nil, false, errors.NewBadRequest(fmt.Sprintf("wrong object passed to Scale update: %v", obj)) - } - - if errs := autoscalingvalidation.ValidateScale(scale); len(errs) > 0 { - return nil, false, errors.NewInvalid(autoscaling.Kind("Scale"), scale.Name, errs) - } - - ss.Spec.Replicas = scale.Spec.Replicas - ss.ResourceVersion = scale.ResourceVersion - obj, _, err = r.store.Update( + obj, _, err := r.store.Update( ctx, - ss.Name, - rest.DefaultUpdatedObjectInfo(ss), + name, + &scaleUpdatedObjectInfo{name, objInfo}, toScaleCreateValidation(createValidation), toScaleUpdateValidation(updateValidation), false, @@ -203,7 +180,7 @@ func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.Update if err != nil { return nil, false, err } - ss = obj.(*apps.StatefulSet) + ss := obj.(*apps.StatefulSet) newScale, err := scaleFromStatefulSet(ss) if err != nil { return nil, false, errors.NewBadRequest(fmt.Sprintf("%v", err)) @@ -259,3 +236,62 @@ func scaleFromStatefulSet(ss *apps.StatefulSet) (*autoscaling.Scale, error) { }, }, nil } + +// scaleUpdatedObjectInfo transforms existing statefulset -> existing scale -> new scale -> new statefulset +type scaleUpdatedObjectInfo struct { + name string + reqObjInfo rest.UpdatedObjectInfo +} + +func (i *scaleUpdatedObjectInfo) Preconditions() *metav1.Preconditions { + return i.reqObjInfo.Preconditions() +} + +func (i *scaleUpdatedObjectInfo) UpdatedObject(ctx context.Context, oldObj runtime.Object) (runtime.Object, error) { + statefulset, ok := oldObj.DeepCopyObject().(*apps.StatefulSet) + if !ok { + return nil, errors.NewBadRequest(fmt.Sprintf("expected existing object type to be StatefulSet, got %T", statefulset)) + } + // if zero-value, the existing object does not exist + if len(statefulset.ResourceVersion) == 0 { + return nil, errors.NewNotFound(apps.Resource("statefulsets/scale"), i.name) + } + + // statefulset -> old scale + oldScale, err := scaleFromStatefulSet(statefulset) + if err != nil { + return nil, err + } + + // old scale -> new scale + newScaleObj, err := i.reqObjInfo.UpdatedObject(ctx, oldScale) + if err != nil { + return nil, err + } + if newScaleObj == nil { + return nil, errors.NewBadRequest("nil update passed to Scale") + } + scale, ok := newScaleObj.(*autoscaling.Scale) + if !ok { + return nil, errors.NewBadRequest(fmt.Sprintf("expected input object type to be Scale, but %T", newScaleObj)) + } + + // validate + if errs := autoscalingvalidation.ValidateScale(scale); len(errs) > 0 { + return nil, errors.NewInvalid(autoscaling.Kind("Scale"), statefulset.Name, errs) + } + + // validate precondition if specified (resourceVersion matching is handled by storage) + if len(scale.UID) > 0 && scale.UID != statefulset.UID { + return nil, errors.NewConflict( + apps.Resource("statefulsets/scale"), + statefulset.Name, + fmt.Errorf("Precondition failed: UID in precondition: %v, UID in object meta: %v", scale.UID, statefulset.UID), + ) + } + + // move replicas/resourceVersion fields to object and return + statefulset.Spec.Replicas = scale.Spec.Replicas + statefulset.ResourceVersion = scale.ResourceVersion + return statefulset, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/BUILD deleted file mode 100644 index c34dafb7770..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "strategy.go", - ], - importpath = "k8s.io/kubernetes/pkg/registry/auditregistration/auditsink", - visibility = ["//visibility:public"], - deps = [ - "//pkg/api/legacyscheme:go_default_library", - "//pkg/apis/auditregistration:go_default_library", - "//pkg/apis/auditregistration/validation:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/storage/names:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/registry/auditregistration/auditsink/storage:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/storage/BUILD deleted file mode 100644 index daa0d67de05..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/storage/BUILD +++ /dev/null @@ -1,29 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["storage.go"], - importpath = "k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/storage", - visibility = ["//visibility:public"], - deps = [ - "//pkg/apis/auditregistration:go_default_library", - "//pkg/registry/auditregistration/auditsink:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/storage/storage.go deleted file mode 100644 index 2ef0b5ee6b8..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/storage/storage.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2018 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 storage - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apiserver/pkg/registry/generic" - genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" - "k8s.io/kubernetes/pkg/apis/auditregistration" - auditstrategy "k8s.io/kubernetes/pkg/registry/auditregistration/auditsink" -) - -// REST implements a RESTStorage for audit sink against etcd -type REST struct { - *genericregistry.Store -} - -// NewREST returns a RESTStorage object that will work against audit sinks -func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) { - store := &genericregistry.Store{ - NewFunc: func() runtime.Object { return &auditregistration.AuditSink{} }, - NewListFunc: func() runtime.Object { return &auditregistration.AuditSinkList{} }, - ObjectNameFunc: func(obj runtime.Object) (string, error) { - return obj.(*auditregistration.AuditSink).Name, nil - }, - DefaultQualifiedResource: auditregistration.Resource("auditsinks"), - - CreateStrategy: auditstrategy.Strategy, - UpdateStrategy: auditstrategy.Strategy, - DeleteStrategy: auditstrategy.Strategy, - } - options := &generic.StoreOptions{RESTOptions: optsGetter} - if err := store.CompleteWithOptions(options); err != nil { - return nil, err - } - return &REST{store}, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/strategy.go deleted file mode 100644 index 23c85ccbca6..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/strategy.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright 2018 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 auditsink - -import ( - "context" - "reflect" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/apiserver/pkg/storage/names" - "k8s.io/kubernetes/pkg/api/legacyscheme" - audit "k8s.io/kubernetes/pkg/apis/auditregistration" - "k8s.io/kubernetes/pkg/apis/auditregistration/validation" -) - -// auditSinkStrategy implements verification logic for AuditSink. -type auditSinkStrategy struct { - runtime.ObjectTyper - names.NameGenerator -} - -// Strategy is the default logic that applies when creating and updating AuditSink objects. -var Strategy = auditSinkStrategy{legacyscheme.Scheme, names.SimpleNameGenerator} - -// NamespaceScoped returns false because all AuditSink's need to be cluster scoped -func (auditSinkStrategy) NamespaceScoped() bool { - return false -} - -// PrepareForCreate clears the status of an AuditSink before creation. -func (auditSinkStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { - ic := obj.(*audit.AuditSink) - ic.Generation = 1 -} - -// PrepareForUpdate clears fields that are not allowed to be set by end users on update. -func (auditSinkStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { - newIC := obj.(*audit.AuditSink) - oldIC := old.(*audit.AuditSink) - - // Any changes to the policy or backend increment the generation number - // See metav1.ObjectMeta description for more information on Generation. - if !reflect.DeepEqual(oldIC.Spec, newIC.Spec) { - newIC.Generation = oldIC.Generation + 1 - } -} - -// Validate validates a new auditSink. -func (auditSinkStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { - ic := obj.(*audit.AuditSink) - return validation.ValidateAuditSink(ic) -} - -// Canonicalize normalizes the object after validation. -func (auditSinkStrategy) Canonicalize(obj runtime.Object) { -} - -// AllowCreateOnUpdate is true for auditSink; this means you may create one with a PUT request. -func (auditSinkStrategy) AllowCreateOnUpdate() bool { - return false -} - -// ValidateUpdate is the default update validation for an end user. -func (auditSinkStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - validationErrorList := validation.ValidateAuditSink(obj.(*audit.AuditSink)) - updateErrorList := validation.ValidateAuditSinkUpdate(obj.(*audit.AuditSink), old.(*audit.AuditSink)) - return append(validationErrorList, updateErrorList...) -} - -// AllowUnconditionalUpdate is the default update policy for auditSink objects. Status update should -// only be allowed if version match. -func (auditSinkStrategy) AllowUnconditionalUpdate() bool { - return false -} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/rest/BUILD deleted file mode 100644 index a772ac495a0..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/rest/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["storage_auditregistration.go"], - importpath = "k8s.io/kubernetes/pkg/registry/auditregistration/rest", - visibility = ["//visibility:public"], - deps = [ - "//pkg/api/legacyscheme:go_default_library", - "//pkg/registry/auditregistration/auditsink/storage:go_default_library", - "//staging/src/k8s.io/api/auditregistration/v1alpha1:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/server:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/server/storage:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/rest/storage_auditregistration.go b/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/rest/storage_auditregistration.go deleted file mode 100644 index 4c218c41a90..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/registry/auditregistration/rest/storage_auditregistration.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2018 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 rest - -import ( - auditv1alpha1 "k8s.io/api/auditregistration/v1alpha1" - "k8s.io/apiserver/pkg/registry/generic" - "k8s.io/apiserver/pkg/registry/rest" - genericapiserver "k8s.io/apiserver/pkg/server" - serverstorage "k8s.io/apiserver/pkg/server/storage" - "k8s.io/kubernetes/pkg/api/legacyscheme" - auditstorage "k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/storage" -) - -// RESTStorageProvider is a REST storage provider for audit.k8s.io -type RESTStorageProvider struct{} - -// NewRESTStorage returns a RESTStorageProvider -func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool, error) { - apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(auditv1alpha1.GroupName, legacyscheme.Scheme, legacyscheme.ParameterCodec, legacyscheme.Codecs) - - if apiResourceConfigSource.VersionEnabled(auditv1alpha1.SchemeGroupVersion) { - if storageMap, err := p.v1alpha1Storage(apiResourceConfigSource, restOptionsGetter); err != nil { - return genericapiserver.APIGroupInfo{}, false, err - } else { - apiGroupInfo.VersionedResourcesStorageMap[auditv1alpha1.SchemeGroupVersion.Version] = storageMap - } - } - return apiGroupInfo, true, nil -} - -func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) { - storage := map[string]rest.Storage{} - s, err := auditstorage.NewREST(restOptionsGetter) - storage["auditsinks"] = s - - return storage, err -} - -// GroupName is the group name for the storage provider -func (p RESTStorageProvider) GroupName() string { - return auditv1alpha1.GroupName -} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/BUILD index 4533e49e8b7..fe6f590ef52 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/BUILD @@ -17,7 +17,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/storage.go index 368998df258..c9d24b40b53 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/storage.go @@ -28,7 +28,7 @@ import ( "k8s.io/apiserver/pkg/authentication/authenticator" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/apis/authentication" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/cachesize/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/cachesize/BUILD deleted file mode 100644 index 38369d62566..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/registry/cachesize/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["cachesize.go"], - importpath = "k8s.io/kubernetes/pkg/registry/cachesize", - deps = ["//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/cachesize/OWNERS b/vendor/k8s.io/kubernetes/pkg/registry/cachesize/OWNERS deleted file mode 100644 index 1306faffe2c..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/registry/cachesize/OWNERS +++ /dev/null @@ -1,9 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -reviewers: -- wojtek-t -- gmarek -- soltysh -- madhusudancs -- mml -- caseydavenport diff --git a/vendor/k8s.io/kubernetes/pkg/registry/cachesize/cachesize.go b/vendor/k8s.io/kubernetes/pkg/registry/cachesize/cachesize.go deleted file mode 100644 index 37575af570c..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/registry/cachesize/cachesize.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2014 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 cachesize - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// NewHeuristicWatchCacheSizes returns a map of suggested watch cache sizes based on total -// memory. -func NewHeuristicWatchCacheSizes(expectedRAMCapacityMB int) map[schema.GroupResource]int { - // From our documentation, we officially recommend 120GB machines for - // 2000 nodes, and we scale from that point. Thus we assume ~60MB of - // capacity per node. - // TODO: Revisit this heuristics - clusterSize := expectedRAMCapacityMB / 60 - - // We should specify cache size for a given resource only if it - // is supposed to have non-default value. - // - // TODO: Figure out which resource we should have non-default value. - watchCacheSizes := make(map[schema.GroupResource]int) - watchCacheSizes[schema.GroupResource{Resource: "replicationcontrollers"}] = maxInt(5*clusterSize, 100) - watchCacheSizes[schema.GroupResource{Resource: "endpoints"}] = maxInt(10*clusterSize, 1000) - watchCacheSizes[schema.GroupResource{Resource: "endpointslices", Group: "discovery.k8s.io"}] = maxInt(10*clusterSize, 1000) - watchCacheSizes[schema.GroupResource{Resource: "nodes"}] = maxInt(5*clusterSize, 1000) - watchCacheSizes[schema.GroupResource{Resource: "pods"}] = maxInt(50*clusterSize, 1000) - watchCacheSizes[schema.GroupResource{Resource: "services"}] = maxInt(5*clusterSize, 1000) - watchCacheSizes[schema.GroupResource{Resource: "events"}] = 0 - watchCacheSizes[schema.GroupResource{Resource: "apiservices", Group: "apiregistration.k8s.io"}] = maxInt(5*clusterSize, 1000) - watchCacheSizes[schema.GroupResource{Resource: "leases", Group: "coordination.k8s.io"}] = maxInt(5*clusterSize, 1000) - return watchCacheSizes -} - -func maxInt(a, b int) int { - if a > b { - return a - } - return b -} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/BUILD index 7c4fc9febbc..094ffb1dfa7 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/BUILD @@ -17,10 +17,12 @@ go_library( "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/certificates:go_default_library", "//pkg/apis/certificates/validation:go_default_library", + "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", @@ -34,6 +36,7 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/apis/certificates:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/storage.go index 78d649b5257..8de9d57a58e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/storage.go @@ -109,9 +109,16 @@ func (r *ApprovalREST) New() runtime.Object { return &certificates.CertificateSigningRequest{} } +// Get retrieves the object from the storage. It is required to support Patch. +func (r *ApprovalREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { + return r.store.Get(ctx, name, options) +} + // Update alters the approval subset of an object. func (r *ApprovalREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { // We are explicitly setting forceAllowCreate to false in the call to the underlying storage because // subresources should never allow create on update. return r.store.Update(ctx, name, objInfo, createValidation, updateValidation, false, options) } + +var _ = rest.Patcher(&ApprovalREST{}) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy.go index 1bbebdedde9..fc35c33acfa 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy.go @@ -20,10 +20,12 @@ import ( "context" "fmt" + certificatesv1beta1 "k8s.io/api/certificates/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "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/util/validation/field" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/generic" @@ -94,7 +96,7 @@ func (csrStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object // Validate validates a new CSR. Validation must check for a correct signature. func (csrStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { csr := obj.(*certificates.CertificateSigningRequest) - return validation.ValidateCertificateSigningRequest(csr) + return validation.ValidateCertificateSigningRequestCreate(csr, requestGroupVersion(ctx)) } // Canonicalize normalizes the object after validation (which includes a signature check). @@ -104,7 +106,7 @@ func (csrStrategy) Canonicalize(obj runtime.Object) {} func (csrStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { oldCSR := old.(*certificates.CertificateSigningRequest) newCSR := obj.(*certificates.CertificateSigningRequest) - return validation.ValidateCertificateSigningRequestUpdate(newCSR, oldCSR) + return validation.ValidateCertificateSigningRequestUpdate(newCSR, oldCSR, requestGroupVersion(ctx)) } // If AllowUnconditionalUpdate() is true and the object specified by @@ -142,20 +144,84 @@ func (csrStatusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime. newCSR := obj.(*certificates.CertificateSigningRequest) oldCSR := old.(*certificates.CertificateSigningRequest) - // Updating the Status should only update the Status and not the spec - // or approval conditions. The intent is to separate the concerns of - // approval and certificate issuance. + // Updating /status should not modify spec newCSR.Spec = oldCSR.Spec - newCSR.Status.Conditions = oldCSR.Status.Conditions + + switch requestGroupVersion(ctx) { + case certificatesv1beta1.SchemeGroupVersion: + // Specifically preserve existing Approved/Denied conditions. + // If we cannot (if the status update attempted to add/remove Approved/Denied conditions), revert to old conditions for backwards compatibility. + if !preserveConditionInstances(newCSR, oldCSR, certificates.CertificateApproved) || !preserveConditionInstances(newCSR, oldCSR, certificates.CertificateDenied) { + newCSR.Status.Conditions = oldCSR.Status.Conditions + } + default: + // Specifically preserve existing Approved/Denied conditions. + // Adding/removing Approved/Denied conditions will cause these to fail, + // and the change in Approved/Denied conditions will produce a validation error + preserveConditionInstances(newCSR, oldCSR, certificates.CertificateApproved) + preserveConditionInstances(newCSR, oldCSR, certificates.CertificateDenied) + } + + populateConditionTimestamps(newCSR, oldCSR) +} + +// preserveConditionInstances copies instances of the the specified condition type from oldCSR to newCSR. +// or returns false if the newCSR added or removed instances +func preserveConditionInstances(newCSR, oldCSR *certificates.CertificateSigningRequest, conditionType certificates.RequestConditionType) bool { + oldIndices := findConditionIndices(oldCSR, conditionType) + newIndices := findConditionIndices(newCSR, conditionType) + if len(oldIndices) != len(newIndices) { + // instances were added or removed, we cannot preserve the existing values + return false + } + // preserve the old condition values + for i, oldIndex := range oldIndices { + newCSR.Status.Conditions[newIndices[i]] = oldCSR.Status.Conditions[oldIndex] + } + return true +} + +// findConditionIndices returns the indices of instances of the specified condition type +func findConditionIndices(csr *certificates.CertificateSigningRequest, conditionType certificates.RequestConditionType) []int { + var retval []int + for i, c := range csr.Status.Conditions { + if c.Type == conditionType { + retval = append(retval, i) + } + } + return retval +} + +// nowFunc allows overriding for unit tests +var nowFunc = metav1.Now + +// populateConditionTimestamps sets LastUpdateTime and LastTransitionTime in newCSR if missing +func populateConditionTimestamps(newCSR, oldCSR *certificates.CertificateSigningRequest) { + now := nowFunc() for i := range newCSR.Status.Conditions { if newCSR.Status.Conditions[i].LastUpdateTime.IsZero() { - newCSR.Status.Conditions[i].LastUpdateTime = metav1.Now() + newCSR.Status.Conditions[i].LastUpdateTime = now + } + + // preserve existing lastTransitionTime if the condition with this type/status already exists, + // otherwise set to now. + if newCSR.Status.Conditions[i].LastTransitionTime.IsZero() { + lastTransition := now + for _, oldCondition := range oldCSR.Status.Conditions { + if oldCondition.Type == newCSR.Status.Conditions[i].Type && + oldCondition.Status == newCSR.Status.Conditions[i].Status && + !oldCondition.LastTransitionTime.IsZero() { + lastTransition = oldCondition.LastTransitionTime + break + } + } + newCSR.Status.Conditions[i].LastTransitionTime = lastTransition } } } func (csrStatusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - return validation.ValidateCertificateSigningRequestUpdate(obj.(*certificates.CertificateSigningRequest), old.(*certificates.CertificateSigningRequest)) + return validation.ValidateCertificateSigningRequestStatusUpdate(obj.(*certificates.CertificateSigningRequest), old.(*certificates.CertificateSigningRequest), requestGroupVersion(ctx)) } // Canonicalize normalizes the object after validation. @@ -170,28 +236,22 @@ type csrApprovalStrategy struct { var ApprovalStrategy = csrApprovalStrategy{Strategy} // PrepareForUpdate prepares the new certificate signing request by limiting -// the data that is updated to only the conditions. Also, if there is no -// existing LastUpdateTime on a condition, the current date/time will be set. +// the data that is updated to only the conditions and populating condition timestamps func (csrApprovalStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newCSR := obj.(*certificates.CertificateSigningRequest) oldCSR := old.(*certificates.CertificateSigningRequest) + populateConditionTimestamps(newCSR, oldCSR) + newConditions := newCSR.Status.Conditions + // Updating the approval should only update the conditions. newCSR.Spec = oldCSR.Spec - oldCSR.Status.Conditions = newCSR.Status.Conditions - for i := range newCSR.Status.Conditions { - // The Conditions are an array of values, some of which may be - // pre-existing and unaltered by this update, so a LastUpdateTime is - // added only if one isn't already set. - if newCSR.Status.Conditions[i].LastUpdateTime.IsZero() { - newCSR.Status.Conditions[i].LastUpdateTime = metav1.Now() - } - } newCSR.Status = oldCSR.Status + newCSR.Status.Conditions = newConditions } func (csrApprovalStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - return validation.ValidateCertificateSigningRequestUpdate(obj.(*certificates.CertificateSigningRequest), old.(*certificates.CertificateSigningRequest)) + return validation.ValidateCertificateSigningRequestApprovalUpdate(obj.(*certificates.CertificateSigningRequest), old.(*certificates.CertificateSigningRequest), requestGroupVersion(ctx)) } // GetAttrs returns labels and fields of a given object for filtering purposes. @@ -211,3 +271,11 @@ func SelectableFields(obj *certificates.CertificateSigningRequest) fields.Set { } return generic.MergeFieldsSets(objectMetaFieldsSet, csrSpecificFieldsSet) } + +// requestGroupVersion returns the group/version associated with the given context, or a zero-value group/version +func requestGroupVersion(ctx context.Context) schema.GroupVersion { + if requestInfo, found := genericapirequest.RequestInfoFrom(ctx); found { + return schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion} + } + return schema.GroupVersion{} +} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/BUILD index 4e45ed1d20f..ce1a0f9e9f8 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/BUILD @@ -13,6 +13,7 @@ go_library( "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/certificates:go_default_library", "//pkg/registry/certificates/certificates/storage:go_default_library", + "//staging/src/k8s.io/api/certificates/v1:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/storage_certificates.go b/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/storage_certificates.go index 12d1a7a4862..51d4df034f8 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/storage_certificates.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/storage_certificates.go @@ -17,6 +17,7 @@ limitations under the License. package rest import ( + certificatesapiv1 "k8s.io/api/certificates/v1" certificatesapiv1beta1 "k8s.io/api/certificates/v1beta1" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" @@ -35,11 +36,19 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag // TODO refactor the plumbing to provide the information in the APIGroupInfo if apiResourceConfigSource.VersionEnabled(certificatesapiv1beta1.SchemeGroupVersion) { - if storageMap, err := p.v1beta1Storage(apiResourceConfigSource, restOptionsGetter); err != nil { + storageMap, err := p.v1beta1Storage(apiResourceConfigSource, restOptionsGetter) + if err != nil { return genericapiserver.APIGroupInfo{}, false, err - } else { - apiGroupInfo.VersionedResourcesStorageMap[certificatesapiv1beta1.SchemeGroupVersion.Version] = storageMap } + apiGroupInfo.VersionedResourcesStorageMap[certificatesapiv1beta1.SchemeGroupVersion.Version] = storageMap + } + + if apiResourceConfigSource.VersionEnabled(certificatesapiv1.SchemeGroupVersion) { + storageMap, err := p.v1Storage(apiResourceConfigSource, restOptionsGetter) + if err != nil { + return genericapiserver.APIGroupInfo{}, false, err + } + apiGroupInfo.VersionedResourcesStorageMap[certificatesapiv1.SchemeGroupVersion.Version] = storageMap } return apiGroupInfo, true, nil @@ -59,6 +68,20 @@ func (p RESTStorageProvider) v1beta1Storage(apiResourceConfigSource serverstorag return storage, err } +func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) { + storage := map[string]rest.Storage{} + // certificatesigningrequests + csrStorage, csrStatusStorage, csrApprovalStorage, err := certificatestore.NewREST(restOptionsGetter) + if err != nil { + return storage, err + } + storage["certificatesigningrequests"] = csrStorage + storage["certificatesigningrequests/status"] = csrStatusStorage + storage["certificatesigningrequests/approval"] = csrApprovalStorage + + return storage, err +} + func (p RESTStorageProvider) GroupName() string { return certificates.GroupName } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/event/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/event/BUILD index 7306c1ad42e..8d16680aadf 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/event/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/event/BUILD @@ -20,7 +20,9 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy.go index d253dd53ada..bc57da36809 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy.go @@ -23,7 +23,9 @@ import ( "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/util/validation/field" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/storage" @@ -57,8 +59,9 @@ func (eventStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Obje } func (eventStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { + groupVersion := requestGroupVersion(ctx) event := obj.(*api.Event) - return validation.ValidateEvent(event) + return validation.ValidateEventCreate(event, groupVersion) } // Canonicalize normalizes the object after validation. @@ -70,8 +73,10 @@ func (eventStrategy) AllowCreateOnUpdate() bool { } func (eventStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { + groupVersion := requestGroupVersion(ctx) event := obj.(*api.Event) - return validation.ValidateEvent(event) + oldEvent := obj.(*api.Event) + return validation.ValidateEventUpdate(event, oldEvent, groupVersion) } func (eventStrategy) AllowUnconditionalUpdate() bool { @@ -99,6 +104,10 @@ func Matcher(label labels.Selector, field fields.Selector) storage.SelectionPred // ToSelectableFields returns a field set that represents the object. func ToSelectableFields(event *api.Event) fields.Set { objectMetaFieldsSet := generic.ObjectMetaFieldsSet(&event.ObjectMeta, true) + source := event.Source.Component + if source == "" { + source = event.ReportingController + } specificFieldsSet := fields.Set{ "involvedObject.kind": event.InvolvedObject.Kind, "involvedObject.namespace": event.InvolvedObject.Namespace, @@ -108,8 +117,17 @@ func ToSelectableFields(event *api.Event) fields.Set { "involvedObject.resourceVersion": event.InvolvedObject.ResourceVersion, "involvedObject.fieldPath": event.InvolvedObject.FieldPath, "reason": event.Reason, - "source": event.Source.Component, + "reportingComponent": event.ReportingController, // use the core/v1 field name + "source": source, "type": event.Type, } return generic.MergeFieldsSets(objectMetaFieldsSet, specificFieldsSet) } + +// requestGroupVersion returns the group/version associated with the given context, or a zero-value group/version. +func requestGroupVersion(ctx context.Context) schema.GroupVersion { + if requestInfo, found := genericapirequest.RequestInfoFrom(ctx); found { + return schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion} + } + return schema.GroupVersion{} +} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage.go index dac160ea96a..95af1d4fd1d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage.go @@ -41,6 +41,9 @@ func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) { UpdateStrategy: limitrange.Strategy, DeleteStrategy: limitrange.Strategy, ExportStrategy: limitrange.Strategy, + + // TODO: define table converter that exposes more than name/creation timestamp + TableConvertor: rest.NewDefaultTableConvertor(api.Resource("limitranges")), } options := &generic.StoreOptions{RESTOptions: optsGetter} if err := store.CompleteWithOptions(options); err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage.go index 28aba7778c7..662fa664a38 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage.go @@ -253,7 +253,9 @@ func ShouldDeleteNamespaceDuringUpdate(ctx context.Context, key string, obj, exi } func shouldHaveOrphanFinalizer(options *metav1.DeleteOptions, haveOrphanFinalizer bool) bool { + //lint:ignore SA1019 backwards compatibility if options.OrphanDependents != nil { + //lint:ignore SA1019 backwards compatibility return *options.OrphanDependents } if options.PropagationPolicy != nil { @@ -263,7 +265,9 @@ func shouldHaveOrphanFinalizer(options *metav1.DeleteOptions, haveOrphanFinalize } func shouldHaveDeleteDependentsFinalizer(options *metav1.DeleteOptions, haveDeleteDependentsFinalizer bool) bool { + //lint:ignore SA1019 backwards compatibility if options.OrphanDependents != nil { + //lint:ignore SA1019 backwards compatibility return *options.OrphanDependents == false } if options.PropagationPolicy != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy.go index 1ca914b6a49..aaddb69e72a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy.go @@ -124,12 +124,7 @@ func nodeConfigSourceInUse(node *api.Node) bool { // Validate validates a new node. func (nodeStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { node := obj.(*api.Node) - opts := validation.NodeValidationOptions{ - // This ensures new nodes have no more than one hugepages resource - // TODO: set to false in 1.19; 1.18 servers tolerate multiple hugepages resources on update - ValidateSingleHugePageResource: true, - } - return validation.ValidateNode(node, opts) + return validation.ValidateNode(node) } // Canonicalize normalizes the object after validation. @@ -138,14 +133,8 @@ func (nodeStrategy) Canonicalize(obj runtime.Object) { // ValidateUpdate is the default update validation for an end user. func (nodeStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - oldPassesSingleHugepagesValidation := len(validation.ValidateNodeSingleHugePageResources(old.(*api.Node))) == 0 - opts := validation.NodeValidationOptions{ - // This ensures the new node has no more than one hugepages resource, if the old node did as well. - // TODO: set to false in 1.19; 1.18 servers tolerate relaxed validation on update - ValidateSingleHugePageResource: oldPassesSingleHugepagesValidation, - } - errorList := validation.ValidateNode(obj.(*api.Node), opts) - return append(errorList, validation.ValidateNodeUpdate(obj.(*api.Node), old.(*api.Node), opts)...) + errorList := validation.ValidateNode(obj.(*api.Node)) + return append(errorList, validation.ValidateNodeUpdate(obj.(*api.Node), old.(*api.Node))...) } func (nodeStrategy) AllowUnconditionalUpdate() bool { @@ -196,13 +185,7 @@ func nodeStatusConfigInUse(node *api.Node) bool { } func (nodeStatusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - oldPassesSingleHugepagesValidation := len(validation.ValidateNodeSingleHugePageResources(old.(*api.Node))) == 0 - opts := validation.NodeValidationOptions{ - // This ensures the new node has no more than one hugepages resource, if the old node did as well. - // TODO: set to false in 1.19; 1.18 servers tolerate relaxed validation on update - ValidateSingleHugePageResource: oldPassesSingleHugepagesValidation, - } - return validation.ValidateNodeUpdate(obj.(*api.Node), old.(*api.Node), opts) + return validation.ValidateNodeUpdate(obj.(*api.Node), old.(*api.Node)) } // Canonicalize normalizes the object after validation. diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/BUILD index 5d842a6780e..47b3f479410 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/BUILD @@ -22,6 +22,7 @@ go_library( "//pkg/features:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/proxy/util:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", @@ -49,6 +50,7 @@ go_test( "//pkg/apis/core/install:go_default_library", "//pkg/features:go_default_library", "//pkg/kubelet/client:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -60,6 +62,7 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", + "//vendor/github.com/stretchr/testify/require:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/BUILD index 9ee6edd4f0f..fb3586bba99 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/BUILD @@ -22,11 +22,14 @@ go_test( "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/eviction.go b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/eviction.go index d396cc7ef22..7ed0875af02 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/eviction.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/eviction.go @@ -29,7 +29,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/wait" - genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/util/dryrun" policyclient "k8s.io/client-go/kubernetes/typed/policy/v1beta1" @@ -57,13 +56,13 @@ var EvictionsRetry = wait.Backoff{ Jitter: 0.1, } -func newEvictionStorage(store *genericregistry.Store, podDisruptionBudgetClient policyclient.PodDisruptionBudgetsGetter) *EvictionREST { +func newEvictionStorage(store rest.StandardStorage, podDisruptionBudgetClient policyclient.PodDisruptionBudgetsGetter) *EvictionREST { return &EvictionREST{store: store, podDisruptionBudgetClient: podDisruptionBudgetClient} } // EvictionREST implements the REST endpoint for evicting pods from nodes type EvictionREST struct { - store *genericregistry.Store + store rest.StandardStorage podDisruptionBudgetClient policyclient.PodDisruptionBudgetsGetter } @@ -111,33 +110,75 @@ func (r *EvictionREST) Create(ctx context.Context, name string, obj runtime.Obje return nil, errors.NewBadRequest("name in URL does not match name in Eviction object") } - deletionOptions, err := propagateDryRun(eviction, options) + originalDeleteOptions, err := propagateDryRun(eviction, options) if err != nil { return nil, err } - obj, err = r.store.Get(ctx, eviction.Name, &metav1.GetOptions{}) - if err != nil { - return nil, err - } - pod := obj.(*api.Pod) - if createValidation != nil { if err := createValidation(ctx, eviction.DeepCopyObject()); err != nil { return nil, err } } - // Evicting a terminal pod should result in direct deletion of pod as it already caused disruption by the time we are evicting. - // There is no need to check for pdb. - if pod.Status.Phase == api.PodSucceeded || pod.Status.Phase == api.PodFailed { + var pod *api.Pod + deletedPod := false + // by default, retry conflict errors + shouldRetry := errors.IsConflict + if !resourceVersionIsUnset(originalDeleteOptions) { + // if the original options included a resourceVersion precondition, don't retry + shouldRetry = func(err error) bool { return false } + } + + err = retry.OnError(EvictionsRetry, shouldRetry, func() error { + obj, err = r.store.Get(ctx, eviction.Name, &metav1.GetOptions{}) + if err != nil { + return err + } + pod = obj.(*api.Pod) + + // Evicting a terminal pod should result in direct deletion of pod as it already caused disruption by the time we are evicting. + // There is no need to check for pdb. + if !canIgnorePDB(pod) { + // Pod is not in a state where we can skip checking PDBs, exit the loop, and continue to PDB checks. + return nil + } + + // the PDB can be ignored, so delete the pod + deletionOptions := originalDeleteOptions.DeepCopy() + // We should check if resourceVersion is already set by the requestor + // as it might be older than the pod we just fetched and should be + // honored. + if shouldEnforceResourceVersion(pod) && resourceVersionIsUnset(originalDeleteOptions) { + // Set deletionOptions.Preconditions.ResourceVersion to ensure we're not + // racing with another PDB-impacting process elsewhere. + if deletionOptions.Preconditions == nil { + deletionOptions.Preconditions = &metav1.Preconditions{} + } + deletionOptions.Preconditions.ResourceVersion = &pod.ResourceVersion + } _, _, err = r.store.Delete(ctx, eviction.Name, rest.ValidateAllObjectFunc, deletionOptions) if err != nil { - return nil, err + return err } - return &metav1.Status{ - Status: metav1.StatusSuccess}, nil + deletedPod = true + return nil + }) + switch { + case err != nil: + // this can happen in cases where the PDB can be ignored, but there was a problem issuing the pod delete: + // maybe we conflicted too many times or we didn't have permission or something else weird. + return nil, err + + case deletedPod: + // this happens when we successfully deleted the pod. In this case, we're done executing because we've evicted/deleted the pod + return &metav1.Status{Status: metav1.StatusSuccess}, nil + + default: + // this happens when we didn't have an error and we didn't delete the pod. The only branch that happens on is when + // we cannot ignored the PDB for this pod, so this is the fall through case. } + var rtStatus *metav1.Status var pdbName string err = func() error { @@ -172,7 +213,7 @@ func (r *EvictionREST) Create(ctx context.Context, name string, obj runtime.Obje // If it was false already, or if it becomes false during the course of our retries, // raise an error marked as a 429. - if err = r.checkAndDecrement(pod.Namespace, pod.Name, *pdb, dryrun.IsDryRun(deletionOptions.DryRun)); err != nil { + if err = r.checkAndDecrement(pod.Namespace, pod.Name, *pdb, dryrun.IsDryRun(originalDeleteOptions.DryRun)); err != nil { refresh = true return err } @@ -194,7 +235,7 @@ func (r *EvictionREST) Create(ctx context.Context, name string, obj runtime.Obje // At this point there was either no PDB or we succeeded in decrementing // Try the delete - _, _, err = r.store.Delete(ctx, eviction.Name, rest.ValidateAllObjectFunc, deletionOptions) + _, _, err = r.store.Delete(ctx, eviction.Name, rest.ValidateAllObjectFunc, originalDeleteOptions.DeepCopy()) if err != nil { return nil, err } @@ -203,6 +244,30 @@ func (r *EvictionREST) Create(ctx context.Context, name string, obj runtime.Obje return &metav1.Status{Status: metav1.StatusSuccess}, nil } +// canIgnorePDB returns true for pod conditions that allow the pod to be deleted +// without checking PDBs. +func canIgnorePDB(pod *api.Pod) bool { + if pod.Status.Phase == api.PodSucceeded || pod.Status.Phase == api.PodFailed || + pod.Status.Phase == api.PodPending || !pod.ObjectMeta.DeletionTimestamp.IsZero() { + return true + } + return false +} + +func shouldEnforceResourceVersion(pod *api.Pod) bool { + // We don't need to enforce ResourceVersion for terminal pods + if pod.Status.Phase == api.PodSucceeded || pod.Status.Phase == api.PodFailed || !pod.ObjectMeta.DeletionTimestamp.IsZero() { + return false + } + // Return true for all other pods to ensure we don't race against a pod becoming + // ready and violating PDBs. + return true +} + +func resourceVersionIsUnset(options *metav1.DeleteOptions) bool { + return options.Preconditions == nil || options.Preconditions.ResourceVersion == nil +} + // checkAndDecrement checks if the provided PodDisruptionBudget allows any disruption. func (r *EvictionREST) checkAndDecrement(namespace string, podName string, pdb policyv1beta1.PodDisruptionBudget, dryRun bool) error { if pdb.Status.ObservedGeneration < pdb.Generation { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy.go index b02bafd0e5d..ea4476200b3 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy.go @@ -26,6 +26,7 @@ import ( "strings" "time" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" @@ -74,6 +75,8 @@ func (podStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { } podutil.DropDisabledPodFields(pod, nil) + + applySeccompVersionSkew(pod) } // PrepareForUpdate clears fields that are not allowed to be set by end users on update. @@ -94,6 +97,7 @@ func (podStrategy) Validate(ctx context.Context, obj runtime.Object) field.Error } allErrs := validation.ValidatePodCreate(pod, opts) allErrs = append(allErrs, validation.ValidateConditionalPod(pod, nil, field.NewPath(""))...) + return allErrs } @@ -113,8 +117,7 @@ func (podStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) // Allow multiple huge pages on pod create if feature is enabled or if the old pod already has multiple hugepages specified AllowMultipleHugePageResources: oldFailsSingleHugepagesValidation || utilfeature.DefaultFeatureGate.Enabled(features.HugePageStorageMediumSize), } - errorList := validation.ValidatePod(obj.(*api.Pod), opts) - errorList = append(errorList, validation.ValidatePodUpdate(obj.(*api.Pod), old.(*api.Pod), opts)...) + errorList := validation.ValidatePodUpdate(obj.(*api.Pod), old.(*api.Pod), opts) errorList = append(errorList, validation.ValidateConditionalPod(obj.(*api.Pod), old.(*api.Pod), field.NewPath(""))...) return errorList } @@ -387,7 +390,7 @@ func LogLocation( func podHasContainerWithName(pod *api.Pod, containerName string) bool { var hasContainer bool - podutil.VisitContainers(&pod.Spec, podutil.DefaultContainers, func(c *api.Container, containerType podutil.ContainerType) bool { + podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), func(c *api.Container, containerType podutil.ContainerType) bool { if c.Name == containerName { hasContainer = true return false @@ -554,7 +557,7 @@ func validateContainer(container string, pod *api.Pod) (string, error) { return "", errors.NewBadRequest(fmt.Sprintf("a container name must be specified for pod %s", pod.Name)) default: var containerNames []string - podutil.VisitContainers(&pod.Spec, podutil.DefaultContainers, func(c *api.Container, containerType podutil.ContainerType) bool { + podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), func(c *api.Container, containerType podutil.ContainerType) bool { containerNames = append(containerNames, c.Name) return true }) @@ -569,3 +572,74 @@ func validateContainer(container string, pod *api.Pod) (string, error) { return container, nil } + +// applySeccompVersionSkew implements the version skew behavior described in: +// https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/20190717-seccomp-ga.md#version-skew-strategy +func applySeccompVersionSkew(pod *api.Pod) { + // get possible annotation and field + annotation, hasAnnotation := pod.Annotations[v1.SeccompPodAnnotationKey] + field, hasField := (*api.SeccompProfile)(nil), false + + if pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.SeccompProfile != nil { + field = pod.Spec.SecurityContext.SeccompProfile + hasField = true + } + + // sync field and annotation + if hasField && !hasAnnotation { + newAnnotation := podutil.SeccompAnnotationForField(field) + + if newAnnotation != "" { + if pod.Annotations == nil { + pod.Annotations = map[string]string{} + } + pod.Annotations[v1.SeccompPodAnnotationKey] = newAnnotation + } + } else if hasAnnotation && !hasField { + newField := podutil.SeccompFieldForAnnotation(annotation) + + if newField != nil { + if pod.Spec.SecurityContext == nil { + pod.Spec.SecurityContext = &api.PodSecurityContext{} + } + pod.Spec.SecurityContext.SeccompProfile = newField + } + } + + // Handle the containers of the pod + podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), + func(ctr *api.Container, _ podutil.ContainerType) bool { + // get possible annotation and field + key := api.SeccompContainerAnnotationKeyPrefix + ctr.Name + annotation, hasAnnotation := pod.Annotations[key] + + field, hasField := (*api.SeccompProfile)(nil), false + if ctr.SecurityContext != nil && ctr.SecurityContext.SeccompProfile != nil { + field = ctr.SecurityContext.SeccompProfile + hasField = true + } + + // sync field and annotation + if hasField && !hasAnnotation { + newAnnotation := podutil.SeccompAnnotationForField(field) + + if newAnnotation != "" { + if pod.Annotations == nil { + pod.Annotations = map[string]string{} + } + pod.Annotations[key] = newAnnotation + } + } else if hasAnnotation && !hasField { + newField := podutil.SeccompFieldForAnnotation(annotation) + + if newField != nil { + if ctr.SecurityContext == nil { + ctr.SecurityContext = &api.SecurityContext{} + } + ctr.SecurityContext.SeccompProfile = newField + } + } + + return true + }) +} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/replicationcontroller/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/replicationcontroller/storage/storage.go index db5c2d1a7ae..1eac4333c3d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/replicationcontroller/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/replicationcontroller/storage/storage.go @@ -159,37 +159,10 @@ func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOpt } func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { - obj, err := r.store.Get(ctx, name, &metav1.GetOptions{}) - if err != nil { - return nil, false, errors.NewNotFound(autoscaling.Resource("replicationcontrollers/scale"), name) - } - rc := obj.(*api.ReplicationController) - - oldScale := scaleFromRC(rc) - // TODO: should this pass validation? - obj, err = objInfo.UpdatedObject(ctx, oldScale) - if err != nil { - return nil, false, err - } - - if obj == nil { - return nil, false, errors.NewBadRequest("nil update passed to Scale") - } - scale, ok := obj.(*autoscaling.Scale) - if !ok { - return nil, false, errors.NewBadRequest(fmt.Sprintf("wrong object passed to Scale update: %v", obj)) - } - - if errs := validation.ValidateScale(scale); len(errs) > 0 { - return nil, false, errors.NewInvalid(autoscaling.Kind("Scale"), scale.Name, errs) - } - - rc.Spec.Replicas = scale.Spec.Replicas - rc.ResourceVersion = scale.ResourceVersion - obj, _, err = r.store.Update( + obj, _, err := r.store.Update( ctx, - rc.Name, - rest.DefaultUpdatedObjectInfo(rc), + name, + &scaleUpdatedObjectInfo{name, objInfo}, toScaleCreateValidation(createValidation), toScaleUpdateValidation(updateValidation), false, @@ -198,7 +171,7 @@ func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.Update if err != nil { return nil, false, err } - rc = obj.(*api.ReplicationController) + rc := obj.(*api.ReplicationController) return scaleFromRC(rc), false, nil } @@ -237,3 +210,59 @@ func scaleFromRC(rc *api.ReplicationController) *autoscaling.Scale { }, } } + +// scaleUpdatedObjectInfo transforms existing replication controller -> existing scale -> new scale -> new replication controller +type scaleUpdatedObjectInfo struct { + name string + reqObjInfo rest.UpdatedObjectInfo +} + +func (i *scaleUpdatedObjectInfo) Preconditions() *metav1.Preconditions { + return i.reqObjInfo.Preconditions() +} + +func (i *scaleUpdatedObjectInfo) UpdatedObject(ctx context.Context, oldObj runtime.Object) (runtime.Object, error) { + replicationcontroller, ok := oldObj.DeepCopyObject().(*api.ReplicationController) + if !ok { + return nil, errors.NewBadRequest(fmt.Sprintf("expected existing object type to be ReplicationController, got %T", replicationcontroller)) + } + // if zero-value, the existing object does not exist + if len(replicationcontroller.ResourceVersion) == 0 { + return nil, errors.NewNotFound(api.Resource("replicationcontrollers/scale"), i.name) + } + + // replicationcontroller -> old scale + oldScale := scaleFromRC(replicationcontroller) + + // old scale -> new scale + newScaleObj, err := i.reqObjInfo.UpdatedObject(ctx, oldScale) + if err != nil { + return nil, err + } + if newScaleObj == nil { + return nil, errors.NewBadRequest("nil update passed to Scale") + } + scale, ok := newScaleObj.(*autoscaling.Scale) + if !ok { + return nil, errors.NewBadRequest(fmt.Sprintf("expected input object type to be Scale, but %T", newScaleObj)) + } + + // validate + if errs := validation.ValidateScale(scale); len(errs) > 0 { + return nil, errors.NewInvalid(autoscaling.Kind("Scale"), replicationcontroller.Name, errs) + } + + // validate precondition if specified (resourceVersion matching is handled by storage) + if len(scale.UID) > 0 && scale.UID != replicationcontroller.UID { + return nil, errors.NewConflict( + api.Resource("replicationcontrollers/scale"), + replicationcontroller.Name, + fmt.Errorf("Precondition failed: UID in precondition: %v, UID in object meta: %v", scale.UID, replicationcontroller.UID), + ) + } + + // move replicas/resourceVersion fields to object and return + replicationcontroller.Spec.Replicas = scale.Spec.Replicas + replicationcontroller.ResourceVersion = scale.ResourceVersion + return replicationcontroller, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/rest/BUILD index 44e268ca679..d0bb9e8281e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/rest/BUILD @@ -48,6 +48,7 @@ go_library( "//pkg/registry/core/service/portallocator:go_default_library", "//pkg/registry/core/service/storage:go_default_library", "//pkg/registry/core/serviceaccount/storage:go_default_library", + "//pkg/scheduler/apis/config:go_default_library", "//pkg/serviceaccount:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", @@ -60,7 +61,8 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/rest/storage_core.go b/vendor/k8s.io/kubernetes/pkg/registry/core/rest/storage_core.go index 3236cfecd3e..5286883b514 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/rest/storage_core.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/rest/storage_core.go @@ -21,11 +21,10 @@ import ( "net" "net/http" "net/url" - "strconv" "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" @@ -64,7 +63,9 @@ import ( "k8s.io/kubernetes/pkg/registry/core/service/portallocator" servicestore "k8s.io/kubernetes/pkg/registry/core/service/storage" serviceaccountstore "k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage" + kubeschedulerconfig "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/serviceaccount" + utilsnet "k8s.io/utils/net" ) // LegacyRESTStorageProvider provides information needed to build RESTStorage for core, but @@ -84,6 +85,7 @@ type LegacyRESTStorageProvider struct { ServiceAccountIssuer serviceaccount.TokenGenerator ServiceAccountMaxExpiration time.Duration + ExtendExpiration bool APIAudiences authenticator.Audiences @@ -180,19 +182,14 @@ func (c LegacyRESTStorageProvider) NewLegacyRESTStorage(restOptionsGetter generi var serviceAccountStorage *serviceaccountstore.REST if c.ServiceAccountIssuer != nil && utilfeature.DefaultFeatureGate.Enabled(features.TokenRequest) { - serviceAccountStorage, err = serviceaccountstore.NewREST(restOptionsGetter, c.ServiceAccountIssuer, c.APIAudiences, c.ServiceAccountMaxExpiration, podStorage.Pod.Store, secretStorage.Store) + serviceAccountStorage, err = serviceaccountstore.NewREST(restOptionsGetter, c.ServiceAccountIssuer, c.APIAudiences, c.ServiceAccountMaxExpiration, podStorage.Pod.Store, secretStorage.Store, c.ExtendExpiration) } else { - serviceAccountStorage, err = serviceaccountstore.NewREST(restOptionsGetter, nil, nil, 0, nil, nil) + serviceAccountStorage, err = serviceaccountstore.NewREST(restOptionsGetter, nil, nil, 0, nil, nil, false) } if err != nil { return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err } - serviceRESTStorage, serviceStatusStorage, err := servicestore.NewGenericREST(restOptionsGetter) - if err != nil { - return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err - } - var serviceClusterIPRegistry rangeallocation.RangeRegistry serviceClusterIPRange := c.ServiceIPRange if serviceClusterIPRange.IP == nil { @@ -260,6 +257,11 @@ func (c LegacyRESTStorageProvider) NewLegacyRESTStorage(restOptionsGetter generi return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err } + serviceRESTStorage, serviceStatusStorage, err := servicestore.NewGenericREST(restOptionsGetter, serviceClusterIPRange, secondaryServiceClusterIPAllocator != nil) + if err != nil { + return LegacyRESTStorage{}, genericapiserver.APIGroupInfo{}, err + } + serviceRest, serviceRestProxy := servicestore.NewREST(serviceRESTStorage, endpointsStorage, podStorage.Pod, @@ -338,9 +340,10 @@ type componentStatusStorage struct { } func (s componentStatusStorage) serversToValidate() map[string]*componentstatus.Server { + // this is fragile, which assumes that the default port is being used serversToValidate := map[string]*componentstatus.Server{ "controller-manager": {Addr: "127.0.0.1", Port: ports.InsecureKubeControllerManagerPort, Path: "/healthz"}, - "scheduler": {Addr: "127.0.0.1", Port: ports.InsecureSchedulerPort, Path: "/healthz"}, + "scheduler": {Addr: "127.0.0.1", Port: kubeschedulerconfig.DefaultInsecureSchedulerPort, Path: "/healthz"}, } for ix, machine := range s.storageFactory.Backends() { @@ -361,7 +364,7 @@ func (s componentStatusStorage) serversToValidate() map[string]*componentstatus. klog.Errorf("Failed to split host/port: %s (%v)", etcdUrl.Host, err) continue } - port, _ = strconv.Atoi(portString) + port, _ = utilsnet.ParsePort(portString, true) } else { addr = etcdUrl.Host port = 2379 diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/BUILD index bb5c9d99943..7974b50fe4a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/BUILD @@ -27,6 +27,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/names:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/BUILD index 49eadbe9ad1..242669b6960 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/BUILD @@ -14,6 +14,7 @@ go_test( "//pkg/apis/core:go_default_library", "//pkg/registry/core/service/allocator:go_default_library", "//pkg/registry/registrytest:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/storage:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/etcd3/testing:go_default_library", "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/storage.go index be93bbee34d..19c96164f51 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/storage.go @@ -80,17 +80,12 @@ func NewEtcd(alloc allocator.Snapshottable, baseKey string, resource schema.Grou }, nil } -// Allocate attempts to allocate the item locally and then in etcd. +// Allocate attempts to allocate the item. func (e *Etcd) Allocate(offset int) (bool, error) { e.lock.Lock() defer e.lock.Unlock() - ok, err := e.alloc.Allocate(offset) - if !ok || err != nil { - return ok, err - } - - err = e.tryUpdate(func() error { + err := e.tryUpdate(func() error { ok, err := e.alloc.Allocate(offset) if err != nil { return err @@ -109,49 +104,44 @@ func (e *Etcd) Allocate(offset int) (bool, error) { return true, nil } -// AllocateNext attempts to allocate the next item locally and then in etcd. +// AllocateNext attempts to allocate the next item. func (e *Etcd) AllocateNext() (int, bool, error) { e.lock.Lock() defer e.lock.Unlock() - - offset, ok, err := e.alloc.AllocateNext() - if !ok || err != nil { - return offset, ok, err - } + var offset int + var ok bool + var err error err = e.tryUpdate(func() error { - ok, err := e.alloc.Allocate(offset) + // update the offset here + offset, ok, err = e.alloc.AllocateNext() if err != nil { return err } if !ok { - // update the offset here - offset, ok, err = e.alloc.AllocateNext() - if err != nil { - return err - } - if !ok { - return errorUnableToAllocate - } - return nil + return errorUnableToAllocate } return nil }) - return offset, ok, err + + if err != nil { + if err == errorUnableToAllocate { + return offset, false, nil + } + return offset, false, err + } + return offset, true, nil } -// Release attempts to release the provided item locally and then in etcd. +// Release attempts to release the provided item. func (e *Etcd) Release(item int) error { e.lock.Lock() defer e.lock.Unlock() - if err := e.alloc.Release(item); err != nil { - return err - } - return e.tryUpdate(func() error { return e.alloc.Release(item) }) + } func (e *Etcd) ForEach(fn func(int)) { @@ -172,9 +162,9 @@ func (e *Etcd) tryUpdate(fn func() error) error { if err := e.alloc.Restore(existing.Range, existing.Data); err != nil { return nil, err } - if err := fn(); err != nil { - return nil, err - } + } + if err := fn(); err != nil { + return nil, err } e.last = existing.ResourceVersion rangeSpec, data := e.alloc.Snapshot() @@ -190,7 +180,7 @@ func (e *Etcd) tryUpdate(fn func() error) error { // etcd. If the key does not exist, the object will have an empty ResourceVersion. func (e *Etcd) Get() (*api.RangeAllocation, error) { existing := &api.RangeAllocation{} - if err := e.storage.Get(context.TODO(), e.baseKey, "", existing, true); err != nil { + if err := e.storage.Get(context.TODO(), e.baseKey, storage.GetOptions{IgnoreNotFound: true}, existing); err != nil { return nil, storeerr.InterpretGetError(err, e.resource, "") } return existing, nil diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/utils.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/utils.go index 4691f57a157..baf64506e09 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/utils.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/utils.go @@ -16,49 +16,16 @@ limitations under the License. package allocator -import "math/big" +import ( + "math/big" + "math/bits" +) // countBits returns the number of set bits in n func countBits(n *big.Int) int { var count int = 0 for _, b := range n.Bytes() { - count += int(bitCounts[b]) + count += bits.OnesCount8(uint8(b)) } return count } - -// bitCounts is all of the bits counted for each number between 0-255 -var bitCounts = []int8{ - 0, 1, 1, 2, 1, 2, 2, 3, - 1, 2, 2, 3, 2, 3, 3, 4, - 1, 2, 2, 3, 2, 3, 3, 4, - 2, 3, 3, 4, 3, 4, 4, 5, - 1, 2, 2, 3, 2, 3, 3, 4, - 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, - 3, 4, 4, 5, 4, 5, 5, 6, - 1, 2, 2, 3, 2, 3, 3, 4, - 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, - 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, - 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, - 4, 5, 5, 6, 5, 6, 6, 7, - 1, 2, 2, 3, 2, 3, 3, 4, - 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, - 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, - 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, - 4, 5, 5, 6, 5, 6, 6, 7, - 2, 3, 3, 4, 3, 4, 4, 5, - 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, - 4, 5, 5, 6, 5, 6, 6, 7, - 3, 4, 4, 5, 4, 5, 5, 6, - 4, 5, 5, 6, 5, 6, 6, 7, - 4, 5, 5, 6, 5, 6, 6, 7, - 5, 6, 6, 7, 6, 7, 7, 8, -} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/BUILD index 10db164981f..67b931e3f6d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/BUILD @@ -13,6 +13,7 @@ go_library( deps = [ "//pkg/apis/core:go_default_library", "//pkg/registry/core/service/allocator:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/allocator.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/allocator.go index fb421e4e9c5..634569f767a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/allocator.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/allocator.go @@ -19,10 +19,12 @@ package ipallocator import ( "errors" "fmt" - api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/registry/core/service/allocator" "math/big" "net" + + api "k8s.io/kubernetes/pkg/apis/core" + "k8s.io/kubernetes/pkg/registry/core/service/allocator" + utilnet "k8s.io/utils/net" ) // Interface manages the allocation of IP addresses out of a range. Interface @@ -80,14 +82,28 @@ type Range struct { // NewAllocatorCIDRRange creates a Range over a net.IPNet, calling allocatorFactory to construct the backing store. func NewAllocatorCIDRRange(cidr *net.IPNet, allocatorFactory allocator.AllocatorFactory) (*Range, error) { - max := RangeSize(cidr) - base := bigForIP(cidr.IP) + max := utilnet.RangeSize(cidr) + base := utilnet.BigForIP(cidr.IP) rangeSpec := cidr.String() + if utilnet.IsIPv6CIDR(cidr) { + // Limit the max size, since the allocator keeps a bitmap of that size. + if max > 65536 { + max = 65536 + } + } else { + // Don't use the IPv4 network's broadcast address. + max-- + } + + // Don't use the network's ".0" address. + base.Add(base, big.NewInt(1)) + max-- + r := Range{ net: cidr, - base: base.Add(base, big.NewInt(1)), // don't use the network base - max: maximum(0, int(max-2)), // don't use the network broadcast, + base: base, + max: maximum(0, int(max)), } var err error r.alloc, err = allocatorFactory(r.max, rangeSpec) @@ -169,7 +185,7 @@ func (r *Range) AllocateNext() (net.IP, error) { if !ok { return nil, ErrFull } - return addIPOffset(r.base, offset), nil + return utilnet.AddIPOffset(r.base, offset), nil } // Release releases the IP back to the pool. Releasing an @@ -187,7 +203,7 @@ func (r *Range) Release(ip net.IP) error { // ForEach calls the provided function for each allocated IP. func (r *Range) ForEach(fn func(net.IP)) { r.alloc.ForEach(func(offset int) { - ip, _ := GetIndexedIP(r.net, offset+1) // +1 because Range doesn't store IP 0 + ip, _ := utilnet.GetIndexedIP(r.net, offset+1) // +1 because Range doesn't store IP 0 fn(ip) }) } @@ -245,49 +261,8 @@ func (r *Range) contains(ip net.IP) (bool, int) { return true, offset } -// bigForIP creates a big.Int based on the provided net.IP -func bigForIP(ip net.IP) *big.Int { - b := ip.To4() - if b == nil { - b = ip.To16() - } - return big.NewInt(0).SetBytes(b) -} - -// addIPOffset adds the provided integer offset to a base big.Int representing a -// net.IP -func addIPOffset(base *big.Int, offset int) net.IP { - return net.IP(big.NewInt(0).Add(base, big.NewInt(int64(offset))).Bytes()) -} - // calculateIPOffset calculates the integer offset of ip from base such that // base + offset = ip. It requires ip >= base. func calculateIPOffset(base *big.Int, ip net.IP) int { - return int(big.NewInt(0).Sub(bigForIP(ip), base).Int64()) -} - -// RangeSize returns the size of a range in valid addresses. -func RangeSize(subnet *net.IPNet) int64 { - ones, bits := subnet.Mask.Size() - if bits == 32 && (bits-ones) >= 31 || bits == 128 && (bits-ones) >= 127 { - return 0 - } - // For IPv6, the max size will be limited to 65536 - // This is due to the allocator keeping track of all the - // allocated IP's in a bitmap. This will keep the size of - // the bitmap to 64k. - if bits == 128 && (bits-ones) >= 16 { - return int64(1) << uint(16) - } else { - return int64(1) << uint(bits-ones) - } -} - -// GetIndexedIP returns a net.IP that is subnet.IP + index in the contiguous IP space. -func GetIndexedIP(subnet *net.IPNet, index int) (net.IP, error) { - ip := addIPOffset(bigForIP(subnet.IP), index) - if !subnet.Contains(ip) { - return nil, fmt.Errorf("can't generate IP with index %d from subnet. subnet too small. subnet: %q", index, subnet) - } - return ip, nil + return int(big.NewInt(0).Sub(utilnet.BigForIP(ip), base).Int64()) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/BUILD index f2251bf9c83..4f42bb77b3e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/BUILD @@ -17,7 +17,7 @@ go_library( "//pkg/apis/core:go_default_library", "//pkg/registry/core/service/allocator:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -47,6 +47,7 @@ filegroup( srcs = [ ":package-srcs", "//pkg/registry/core/service/portallocator/controller:all-srcs", + "//pkg/registry/core/service/portallocator/storage:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/allocator.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/allocator.go index 1c639cfde10..13eea2d275e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/allocator.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/allocator.go @@ -24,7 +24,7 @@ import ( api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/registry/core/service/allocator" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Interface manages the allocation of ports out of a range. Interface diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/BUILD index c4ea3f284d0..0b2a189494e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/BUILD @@ -20,6 +20,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair.go index 32ad5b802b0..a7b6d28d2da 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair.go @@ -26,6 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" corev1client "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/tools/record" @@ -200,17 +201,39 @@ func (c *Repair) runOnce() error { return nil } +// collectServiceNodePorts returns nodePorts specified in the Service. +// Please note that: +// 1. same nodePort with *same* protocol will be duplicated as it is +// 2. same nodePort with *different* protocol will be deduplicated func collectServiceNodePorts(service *corev1.Service) []int { - servicePorts := []int{} - for i := range service.Spec.Ports { - servicePort := &service.Spec.Ports[i] - if servicePort.NodePort != 0 { - servicePorts = append(servicePorts, int(servicePort.NodePort)) + var servicePorts []int + // map from nodePort to set of protocols + seen := make(map[int]sets.String) + for _, port := range service.Spec.Ports { + nodePort := int(port.NodePort) + if nodePort == 0 { + continue } + proto := string(port.Protocol) + s := seen[nodePort] + if s == nil { // have not seen this nodePort before + s = sets.NewString(proto) + servicePorts = append(servicePorts, nodePort) + } else if s.Has(proto) { // same nodePort with same protocol + servicePorts = append(servicePorts, nodePort) + } else { // same nodePort with different protocol + s.Insert(proto) + } + seen[nodePort] = s } - if service.Spec.HealthCheckNodePort != 0 { - servicePorts = append(servicePorts, int(service.Spec.HealthCheckNodePort)) + healthPort := int(service.Spec.HealthCheckNodePort) + if healthPort != 0 { + s := seen[healthPort] + // TODO: is it safe to assume the protocol is always TCP? + if s == nil || s.Has(string(corev1.ProtocolTCP)) { + servicePorts = append(servicePorts, healthPort) + } } return servicePorts diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/BUILD index 1ab55ed553c..feb59391435 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/BUILD @@ -29,6 +29,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", @@ -77,7 +78,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/dryrun:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/rest.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/rest.go index 09e90487064..0d5379f8c11 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/rest.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/rest.go @@ -36,7 +36,7 @@ import ( genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/util/dryrun" - "k8s.io/klog" + "k8s.io/klog/v2" apiservice "k8s.io/kubernetes/pkg/api/service" api "k8s.io/kubernetes/pkg/apis/core" @@ -53,14 +53,14 @@ import ( // REST adapts a service registry into apiserver's RESTStorage model. type REST struct { - services ServiceStorage - endpoints EndpointsStorage - serviceIPs ipallocator.Interface - secondaryServiceIPs ipallocator.Interface - defaultServiceIPFamily api.IPFamily - serviceNodePorts portallocator.Interface - proxyTransport http.RoundTripper - pods rest.Getter + strategy rest.RESTCreateUpdateStrategy + services ServiceStorage + endpoints EndpointsStorage + serviceIPs ipallocator.Interface + secondaryServiceIPs ipallocator.Interface + serviceNodePorts portallocator.Interface + proxyTransport http.RoundTripper + pods rest.Getter } // ServiceNodePort includes protocol and port number of a service NodePort. @@ -102,26 +102,20 @@ func NewREST( serviceNodePorts portallocator.Interface, proxyTransport http.RoundTripper, ) (*REST, *registry.ProxyREST) { - // detect this cluster default Service IPFamily (ipfamily of --service-cluster-ip-range) - // we do it once here, to avoid having to do it over and over during ipfamily assignment - serviceIPFamily := api.IPv4Protocol - cidr := serviceIPs.CIDR() - if netutil.IsIPv6CIDR(&cidr) { - serviceIPFamily = api.IPv6Protocol - } - klog.V(0).Infof("the default service ipfamily for this cluster is: %s", string(serviceIPFamily)) + strategy, _ := registry.StrategyForServiceCIDRs(serviceIPs.CIDR(), secondaryServiceIPs != nil) rest := &REST{ - services: services, - endpoints: endpoints, - serviceIPs: serviceIPs, - secondaryServiceIPs: secondaryServiceIPs, - serviceNodePorts: serviceNodePorts, - defaultServiceIPFamily: serviceIPFamily, - proxyTransport: proxyTransport, - pods: pods, + strategy: strategy, + services: services, + endpoints: endpoints, + serviceIPs: serviceIPs, + secondaryServiceIPs: secondaryServiceIPs, + serviceNodePorts: serviceNodePorts, + proxyTransport: proxyTransport, + pods: pods, } + return rest, ®istry.ProxyREST{Redirector: rest, ProxyTransport: proxyTransport} } @@ -177,12 +171,7 @@ func (rs *REST) Export(ctx context.Context, name string, opts metav1.ExportOptio func (rs *REST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) { service := obj.(*api.Service) - // set the service ip family, if it was not already set - if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) && service.Spec.IPFamily == nil { - service.Spec.IPFamily = &rs.defaultServiceIPFamily - } - - if err := rest.BeforeCreate(registry.Strategy, ctx, obj); err != nil { + if err := rest.BeforeCreate(rs.strategy, ctx, obj); err != nil { return nil, err } @@ -228,7 +217,7 @@ func (rs *REST) Create(ctx context.Context, obj runtime.Object, createValidation out, err := rs.services.Create(ctx, service, createValidation, options) if err != nil { - err = rest.CheckGeneratedNameError(registry.Strategy, err, service) + err = rest.CheckGeneratedNameError(rs.strategy, err, service) } if err == nil { @@ -396,7 +385,7 @@ func (rs *REST) Update(ctx context.Context, name string, objInfo rest.UpdatedObj } // Copy over non-user fields - if err := rest.BeforeUpdate(registry.Strategy, ctx, service, oldService); err != nil { + if err := rest.BeforeUpdate(rs.strategy, ctx, service, oldService); err != nil { return nil, false, err } @@ -559,7 +548,7 @@ func (r *REST) getAllocatorByClusterIP(service *api.Service) ipallocator.Interfa } secondaryAllocatorCIDR := r.secondaryServiceIPs.CIDR() - if netutil.IsIPv6String(service.Spec.ClusterIP) && netutil.IsIPv6CIDR(&secondaryAllocatorCIDR) { + if netutil.IsIPv6String(service.Spec.ClusterIP) == netutil.IsIPv6CIDR(&secondaryAllocatorCIDR) { return r.secondaryServiceIPs } @@ -574,7 +563,7 @@ func (r *REST) getAllocatorBySpec(service *api.Service) ipallocator.Interface { } secondaryAllocatorCIDR := r.secondaryServiceIPs.CIDR() - if *(service.Spec.IPFamily) == api.IPv6Protocol && netutil.IsIPv6CIDR(&secondaryAllocatorCIDR) { + if (*(service.Spec.IPFamily) == api.IPv6Protocol) == netutil.IsIPv6CIDR(&secondaryAllocatorCIDR) { return r.secondaryServiceIPs } @@ -599,10 +588,12 @@ func isValidAddress(ctx context.Context, addr *api.EndpointAddress, pods rest.Ge if pod == nil { return fmt.Errorf("pod is missing, skipping (%s/%s)", addr.TargetRef.Namespace, addr.TargetRef.Name) } - if pod.Status.PodIPs[0].IP != addr.IP { - return fmt.Errorf("pod ip doesn't match endpoint ip, skipping: %s vs %s (%s/%s)", pod.Status.PodIPs[0].IP, addr.IP, addr.TargetRef.Namespace, addr.TargetRef.Name) + for _, podIP := range pod.Status.PodIPs { + if podIP.IP == addr.IP { + return nil + } } - return nil + return fmt.Errorf("pod ip(s) doesn't match endpoint ip, skipping: %v vs %s (%s/%s)", pod.Status.PodIPs, addr.IP, addr.TargetRef.Namespace, addr.TargetRef.Name) } // This is O(N), but we expect haystack to be small; @@ -664,6 +655,8 @@ func allocateHealthCheckNodePort(service *api.Service, nodePortOp *portallocator // The return bool value indicates if a cluster IP is allocated successfully. func initClusterIP(service *api.Service, allocator ipallocator.Interface) (bool, error) { + var allocatedIP net.IP + switch { case service.Spec.ClusterIP == "": // Allocate next available. @@ -674,19 +667,32 @@ func initClusterIP(service *api.Service, allocator ipallocator.Interface) (bool, // not really an internal error. return false, errors.NewInternalError(fmt.Errorf("failed to allocate a serviceIP: %v", err)) } + allocatedIP = ip service.Spec.ClusterIP = ip.String() - return true, nil case service.Spec.ClusterIP != api.ClusterIPNone && service.Spec.ClusterIP != "": // Try to respect the requested IP. - if err := allocator.Allocate(net.ParseIP(service.Spec.ClusterIP)); err != nil { + ip := net.ParseIP(service.Spec.ClusterIP) + if err := allocator.Allocate(ip); err != nil { // TODO: when validation becomes versioned, this gets more complicated. el := field.ErrorList{field.Invalid(field.NewPath("spec", "clusterIP"), service.Spec.ClusterIP, err.Error())} return false, errors.NewInvalid(api.Kind("Service"), service.Name, el) } - return true, nil + allocatedIP = ip } - return false, nil + // assuming the object was valid prior to setting, always force the IPFamily + // to match the allocated IP at this point + if allocatedIP != nil { + if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) { + ipFamily := api.IPv4Protocol + if netutil.IsIPv6(allocatedIP) { + ipFamily = api.IPv6Protocol + } + service.Spec.IPFamily = &ipFamily + } + } + + return allocatedIP != nil, nil } func initNodePorts(service *api.Service, nodePortOp *portallocator.PortAllocationOperation) error { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage.go index fa557935a05..4a1da79cb99 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage.go @@ -18,6 +18,7 @@ package storage import ( "context" + "net" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -29,6 +30,7 @@ import ( printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" printerstorage "k8s.io/kubernetes/pkg/printers/storage" "k8s.io/kubernetes/pkg/registry/core/service" + registry "k8s.io/kubernetes/pkg/registry/core/service" ) type GenericREST struct { @@ -36,17 +38,19 @@ type GenericREST struct { } // NewREST returns a RESTStorage object that will work against services. -func NewGenericREST(optsGetter generic.RESTOptionsGetter) (*GenericREST, *StatusREST, error) { +func NewGenericREST(optsGetter generic.RESTOptionsGetter, serviceCIDR net.IPNet, hasSecondary bool) (*GenericREST, *StatusREST, error) { + strategy, _ := registry.StrategyForServiceCIDRs(serviceCIDR, hasSecondary) + store := &genericregistry.Store{ NewFunc: func() runtime.Object { return &api.Service{} }, NewListFunc: func() runtime.Object { return &api.ServiceList{} }, DefaultQualifiedResource: api.Resource("services"), ReturnDeletedObject: true, - CreateStrategy: service.Strategy, - UpdateStrategy: service.Strategy, - DeleteStrategy: service.Strategy, - ExportStrategy: service.Strategy, + CreateStrategy: strategy, + UpdateStrategy: strategy, + DeleteStrategy: strategy, + ExportStrategy: strategy, TableConvertor: printerstorage.TableConvertor{TableGenerator: printers.NewTableGenerator().With(printersinternal.AddHandlers)}, } @@ -56,7 +60,7 @@ func NewGenericREST(optsGetter generic.RESTOptionsGetter) (*GenericREST, *Status } statusStore := *store - statusStore.UpdateStrategy = service.StatusStrategy + statusStore.UpdateStrategy = service.NewServiceStatusStrategy(strategy) return &GenericREST{store}, &StatusREST{store: &statusStore}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy.go index b69bae1ee86..4e160b3cf04 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy.go @@ -19,54 +19,113 @@ package service import ( "context" "fmt" + "net" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/storage/names" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/kubernetes/pkg/api/legacyscheme" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/core/validation" "k8s.io/kubernetes/pkg/features" + netutil "k8s.io/utils/net" ) +type Strategy interface { + rest.RESTCreateUpdateStrategy + rest.RESTExportStrategy +} + // svcStrategy implements behavior for Services type svcStrategy struct { runtime.ObjectTyper names.NameGenerator + + ipFamilies []api.IPFamily } -// Services is the default logic that applies when creating and updating Service -// objects. -var Strategy = svcStrategy{legacyscheme.Scheme, names.SimpleNameGenerator} +// StrategyForServiceCIDRs returns the appropriate service strategy for the given configuration. +func StrategyForServiceCIDRs(primaryCIDR net.IPNet, hasSecondary bool) (Strategy, api.IPFamily) { + // detect this cluster default Service IPFamily (ipfamily of --service-cluster-ip-range) + // we do it once here, to avoid having to do it over and over during ipfamily assignment + serviceIPFamily := api.IPv4Protocol + if netutil.IsIPv6CIDR(&primaryCIDR) { + serviceIPFamily = api.IPv6Protocol + } + + var strategy Strategy + switch { + case hasSecondary && serviceIPFamily == api.IPv4Protocol: + strategy = svcStrategy{ + ObjectTyper: legacyscheme.Scheme, + NameGenerator: names.SimpleNameGenerator, + ipFamilies: []api.IPFamily{api.IPv4Protocol, api.IPv6Protocol}, + } + case hasSecondary && serviceIPFamily == api.IPv6Protocol: + strategy = svcStrategy{ + ObjectTyper: legacyscheme.Scheme, + NameGenerator: names.SimpleNameGenerator, + ipFamilies: []api.IPFamily{api.IPv6Protocol, api.IPv4Protocol}, + } + case serviceIPFamily == api.IPv6Protocol: + strategy = svcStrategy{ + ObjectTyper: legacyscheme.Scheme, + NameGenerator: names.SimpleNameGenerator, + ipFamilies: []api.IPFamily{api.IPv6Protocol}, + } + default: + strategy = svcStrategy{ + ObjectTyper: legacyscheme.Scheme, + NameGenerator: names.SimpleNameGenerator, + ipFamilies: []api.IPFamily{api.IPv4Protocol}, + } + } + return strategy, serviceIPFamily +} // NamespaceScoped is true for services. func (svcStrategy) NamespaceScoped() bool { return true } -// PrepareForCreate clears fields that are not allowed to be set by end users on creation. -func (svcStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { +// PrepareForCreate sets contextual defaults and clears fields that are not allowed to be set by end users on creation. +func (strategy svcStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { service := obj.(*api.Service) service.Status = api.ServiceStatus{} + if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) && service.Spec.IPFamily == nil { + family := strategy.ipFamilies[0] + service.Spec.IPFamily = &family + } + dropServiceDisabledFields(service, nil) } -// PrepareForUpdate clears fields that are not allowed to be set by end users on update. -func (svcStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { +// PrepareForUpdate sets contextual defaults and clears fields that are not allowed to be set by end users on update. +func (strategy svcStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newService := obj.(*api.Service) oldService := old.(*api.Service) newService.Status = oldService.Status + if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) && newService.Spec.IPFamily == nil { + if oldService.Spec.IPFamily != nil { + newService.Spec.IPFamily = oldService.Spec.IPFamily + } else { + family := strategy.ipFamilies[0] + newService.Spec.IPFamily = &family + } + } + dropServiceDisabledFields(newService, oldService) } // Validate validates a new service. -func (svcStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { +func (strategy svcStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { service := obj.(*api.Service) allErrs := validation.ValidateServiceCreate(service) - allErrs = append(allErrs, validation.ValidateConditionalService(service, nil)...) + allErrs = append(allErrs, validation.ValidateConditionalService(service, nil, strategy.ipFamilies)...) return allErrs } @@ -78,9 +137,9 @@ func (svcStrategy) AllowCreateOnUpdate() bool { return true } -func (svcStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { +func (strategy svcStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { allErrs := validation.ValidateServiceUpdate(obj.(*api.Service), old.(*api.Service)) - allErrs = append(allErrs, validation.ValidateConditionalService(obj.(*api.Service), old.(*api.Service))...) + allErrs = append(allErrs, validation.ValidateConditionalService(obj.(*api.Service), old.(*api.Service), strategy.ipFamilies)...) return allErrs } @@ -120,6 +179,7 @@ func dropServiceDisabledFields(newSvc *api.Service, oldSvc *api.Service) { if !utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) && !serviceIPFamilyInUse(oldSvc) { newSvc.Spec.IPFamily = nil } + // Drop TopologyKeys if ServiceTopology is not enabled if !utilfeature.DefaultFeatureGate.Enabled(features.ServiceTopology) && !topologyKeysInUse(oldSvc) { newSvc.Spec.TopologyKeys = nil @@ -146,11 +206,13 @@ func topologyKeysInUse(svc *api.Service) bool { } type serviceStatusStrategy struct { - svcStrategy + Strategy } -// StatusStrategy is the default logic invoked when updating service status. -var StatusStrategy = serviceStatusStrategy{Strategy} +// NewServiceStatusStrategy creates a status strategy for the provided base strategy. +func NewServiceStatusStrategy(strategy Strategy) Strategy { + return serviceStatusStrategy{strategy} +} // PrepareForUpdate clears fields that are not allowed to be set by end users on update of status func (serviceStatusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage.go index 3667fcb7310..ef2b1f4f988 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage.go @@ -38,7 +38,7 @@ type REST struct { } // NewREST returns a RESTStorage object that will work against service accounts. -func NewREST(optsGetter generic.RESTOptionsGetter, issuer token.TokenGenerator, auds authenticator.Audiences, max time.Duration, podStorage, secretStorage *genericregistry.Store) (*REST, error) { +func NewREST(optsGetter generic.RESTOptionsGetter, issuer token.TokenGenerator, auds authenticator.Audiences, max time.Duration, podStorage, secretStorage *genericregistry.Store, extendExpiration bool) (*REST, error) { store := &genericregistry.Store{ NewFunc: func() runtime.Object { return &api.ServiceAccount{} }, NewListFunc: func() runtime.Object { return &api.ServiceAccountList{} }, @@ -65,6 +65,7 @@ func NewREST(optsGetter generic.RESTOptionsGetter, issuer token.TokenGenerator, issuer: issuer, auds: auds, maxExpirationSeconds: int64(max.Seconds()), + extendExpiration: extendExpiration, } } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/token.go b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/token.go index fe8c9bf9063..4732099fcd7 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/token.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/token.go @@ -19,6 +19,7 @@ package storage import ( "context" "fmt" + "time" authenticationapiv1 "k8s.io/api/authentication/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -46,6 +47,7 @@ type TokenREST struct { issuer token.TokenGenerator auds authenticator.Audiences maxExpirationSeconds int64 + extendExpiration bool } var _ = rest.NamedCreater(&TokenREST{}) @@ -121,7 +123,21 @@ func (r *TokenREST) Create(ctx context.Context, name string, obj runtime.Object, out.Spec.ExpirationSeconds = r.maxExpirationSeconds } - sc, pc := token.Claims(*svcacct, pod, secret, out.Spec.ExpirationSeconds, out.Spec.Audiences) + // Tweak expiration for safe transition of projected service account token. + // Warn (instead of fail) after requested expiration time. + // Fail after hard-coded extended expiration time. + // Only perform the extension when token is pod-bound. + var warnAfter int64 + exp := out.Spec.ExpirationSeconds + if r.extendExpiration && pod != nil && out.Spec.ExpirationSeconds == token.WarnOnlyBoundTokenExpirationSeconds { + warnAfter = exp + exp = token.ExpirationExtensionSeconds + } + + // Save current time before building the token, to make sure the expiration + // returned in TokenRequestStatus would be earlier than exp field in token. + nowTime := time.Now() + sc, pc := token.Claims(*svcacct, pod, secret, exp, warnAfter, out.Spec.Audiences) tokdata, err := r.issuer.GenerateToken(sc, pc) if err != nil { return nil, fmt.Errorf("failed to generate token: %v", err) @@ -129,7 +145,7 @@ func (r *TokenREST) Create(ctx context.Context, name string, obj runtime.Object, out.Status = authenticationapi.TokenRequestStatus{ Token: tokdata, - ExpirationTimestamp: metav1.Time{Time: sc.Expiry.Time()}, + ExpirationTimestamp: metav1.Time{Time: nowTime.Add(time.Duration(out.Spec.ExpirationSeconds) * time.Second)}, } return out, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/events/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/events/rest/BUILD index 0fc7536719a..80e21b53ef9 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/events/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/events/rest/BUILD @@ -9,6 +9,7 @@ go_library( "//pkg/api/legacyscheme:go_default_library", "//pkg/apis/events:go_default_library", "//pkg/registry/core/event/storage:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", "//staging/src/k8s.io/api/events/v1beta1:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/events/rest/storage_events.go b/vendor/k8s.io/kubernetes/pkg/registry/events/rest/storage_events.go index 0c9480e63d1..6ee689e10af 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/events/rest/storage_events.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/events/rest/storage_events.go @@ -19,6 +19,7 @@ package rest import ( "time" + eventsapiv1 "k8s.io/api/events/v1" eventsapiv1beta1 "k8s.io/api/events/v1beta1" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" @@ -45,6 +46,13 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag apiGroupInfo.VersionedResourcesStorageMap[eventsapiv1beta1.SchemeGroupVersion.Version] = storageMap } } + if apiResourceConfigSource.VersionEnabled(eventsapiv1.SchemeGroupVersion) { + if storageMap, err := p.v1Storage(apiResourceConfigSource, restOptionsGetter); err != nil { + return genericapiserver.APIGroupInfo{}, false, err + } else { + apiGroupInfo.VersionedResourcesStorageMap[eventsapiv1.SchemeGroupVersion.Version] = storageMap + } + } return apiGroupInfo, true, nil } @@ -61,6 +69,18 @@ func (p RESTStorageProvider) v1beta1Storage(apiResourceConfigSource serverstorag return storage, err } +func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) { + storage := map[string]rest.Storage{} + // events + eventsStorage, err := eventstore.NewREST(restOptionsGetter, uint64(p.TTL.Seconds())) + if err != nil { + return storage, err + } + storage["events"] = eventsStorage + + return storage, err +} + func (p RESTStorageProvider) GroupName() string { return events.GroupName } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/flowcontrol/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/flowcontrol/rest/BUILD index 34735acf467..884bf68bf7d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/flowcontrol/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/flowcontrol/rest/BUILD @@ -22,7 +22,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/server:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/storage:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/flowcontrol/rest/storage_flowcontrol.go b/vendor/k8s.io/kubernetes/pkg/registry/flowcontrol/rest/storage_flowcontrol.go index 8488d49224d..479f636a410 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/flowcontrol/rest/storage_flowcontrol.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/flowcontrol/rest/storage_flowcontrol.go @@ -32,7 +32,7 @@ import ( genericapiserver "k8s.io/apiserver/pkg/server" serverstorage "k8s.io/apiserver/pkg/server/storage" flowcontrolclient "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/flowcontrol" flowcontrolapisv1alpha1 "k8s.io/kubernetes/pkg/apis/flowcontrol/v1alpha1" @@ -46,7 +46,7 @@ var _ genericapiserver.PostStartHookProvider = RESTStorageProvider{} type RESTStorageProvider struct{} // PostStartHookName is the name of the post-start-hook provided by flow-control storage -const PostStartHookName = "apiserver/bootstrap-system-flowcontrol-configuration" +const PostStartHookName = "priority-and-fairness-config-producer" // NewRESTStorage creates a new rest storage for flow-control api models. func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool, error) { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/networking/ingress/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/networking/ingress/BUILD index 3a0e7c67c9e..4302bd4186e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/networking/ingress/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/networking/ingress/BUILD @@ -34,7 +34,6 @@ go_test( "//pkg/apis/core:go_default_library", "//pkg/apis/networking:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/networking/rest/storage_settings.go b/vendor/k8s.io/kubernetes/pkg/registry/networking/rest/storage_settings.go index ec1474887bc..3d9687d5398 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/networking/rest/storage_settings.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/networking/rest/storage_settings.go @@ -65,6 +65,21 @@ func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.API } storage["networkpolicies"] = networkPolicyStorage + // ingresses + ingressStorage, ingressStatusStorage, err := ingressstore.NewREST(restOptionsGetter) + if err != nil { + return storage, err + } + storage["ingresses"] = ingressStorage + storage["ingresses/status"] = ingressStatusStorage + + // ingressclasses + ingressClassStorage, err := ingressclassstore.NewREST(restOptionsGetter) + if err != nil { + return storage, err + } + storage["ingressclasses"] = ingressClassStorage + return storage, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/BUILD index 2bffd61ab87..19c19bedfc7 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/BUILD @@ -15,6 +15,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/storage.go index 7a32c8d7b5e..59347f767a4 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/storage.go @@ -20,6 +20,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/registry/generic" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" + "k8s.io/apiserver/pkg/registry/rest" "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/registry/rbac/clusterrole" ) @@ -39,6 +40,9 @@ func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) { CreateStrategy: clusterrole.Strategy, UpdateStrategy: clusterrole.Strategy, DeleteStrategy: clusterrole.Strategy, + + // TODO: define table converter that exposes more than name/creation timestamp? + TableConvertor: rest.NewDefaultTableConvertor(rbac.Resource("clusterroles")), } options := &generic.StoreOptions{RESTOptions: optsGetter} if err := store.CompleteWithOptions(options); err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/BUILD index 0a6c7efa245..994af7539d8 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/BUILD @@ -43,7 +43,7 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1:go_default_library", "//staging/src/k8s.io/client-go/util/retry:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/storage_rbac.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/storage_rbac.go index 1d29de6b30b..7d1d290c83b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/storage_rbac.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/storage_rbac.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" rbacapiv1 "k8s.io/api/rbac/v1" rbacapiv1alpha1 "k8s.io/api/rbac/v1alpha1" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/BUILD index 3b2548d3991..51844b9d43f 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/BUILD @@ -15,6 +15,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/storage.go index 1c94fb89f95..6e6700ede98 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/storage.go @@ -20,6 +20,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/registry/generic" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" + "k8s.io/apiserver/pkg/registry/rest" "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/registry/rbac/role" ) @@ -39,6 +40,9 @@ func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) { CreateStrategy: role.Strategy, UpdateStrategy: role.Strategy, DeleteStrategy: role.Strategy, + + // TODO: define table converter that exposes more than name/creation timestamp? + TableConvertor: rest.NewDefaultTableConvertor(rbac.Resource("roles")), } options := &generic.StoreOptions{RESTOptions: optsGetter} if err := store.CompleteWithOptions(options); err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/BUILD index 00095ac3612..fecae732c05 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/BUILD @@ -41,7 +41,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule.go index 858ec5509ce..3369566487a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule.go @@ -22,7 +22,7 @@ import ( "fmt" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" rbacv1 "k8s.io/api/rbac/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/BUILD index 08e14847ff4..f8fd1c3f55b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/BUILD @@ -25,7 +25,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/server:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/storage:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/storage_scheduling.go b/vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/storage_scheduling.go index bb476dd3216..a20bca52748 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/storage_scheduling.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/scheduling/rest/storage_scheduling.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/settings/podpreset/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/settings/podpreset/storage/BUILD index eddc3e03bb0..c106c75cf4e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/settings/podpreset/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/settings/podpreset/storage/BUILD @@ -16,6 +16,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//staging/src/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/settings/podpreset/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/settings/podpreset/storage/storage.go index c2a7224db43..9fdd46bda9f 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/settings/podpreset/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/settings/podpreset/storage/storage.go @@ -20,6 +20,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/registry/generic" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" + "k8s.io/apiserver/pkg/registry/rest" settingsapi "k8s.io/kubernetes/pkg/apis/settings" "k8s.io/kubernetes/pkg/registry/settings/podpreset" ) @@ -39,6 +40,9 @@ func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) { CreateStrategy: podpreset.Strategy, UpdateStrategy: podpreset.Strategy, DeleteStrategy: podpreset.Strategy, + + // TODO: define table converter that exposes more than name/creation timestamp + TableConvertor: rest.NewDefaultTableConvertor(settingsapi.Resource("podpresets")), } options := &generic.StoreOptions{RESTOptions: optsGetter} if err := store.CompleteWithOptions(options); err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/csidriver/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/storage/csidriver/strategy.go index a968fcbaf17..ea3dd853ad4 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/storage/csidriver/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/csidriver/strategy.go @@ -43,12 +43,18 @@ func (csiDriverStrategy) NamespaceScoped() bool { return false } -// PrepareForCreate clears the VolumeLifecycleModes field if the corresponding feature is disabled. +// PrepareForCreate clears the fields for which the corresponding feature is disabled. func (csiDriverStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { + csiDriver := obj.(*storage.CSIDriver) + if !utilfeature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity) { + csiDriver.Spec.StorageCapacity = nil + } if !utilfeature.DefaultFeatureGate.Enabled(features.CSIInlineVolume) { - csiDriver := obj.(*storage.CSIDriver) csiDriver.Spec.VolumeLifecycleModes = nil } + if !utilfeature.DefaultFeatureGate.Enabled(features.CSIVolumeFSGroupPolicy) { + csiDriver.Spec.FSGroupPolicy = nil + } } func (csiDriverStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { @@ -68,15 +74,25 @@ func (csiDriverStrategy) AllowCreateOnUpdate() bool { return false } -// PrepareForUpdate clears the VolumeLifecycleModes field if the corresponding feature is disabled and +// PrepareForUpdate clears the fields for which the corresponding feature is disabled and // existing object does not already have that field set. This allows the field to remain when // downgrading to a version that has the feature disabled. func (csiDriverStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { + if old.(*storage.CSIDriver).Spec.StorageCapacity == nil && + !utilfeature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity) { + newCSIDriver := obj.(*storage.CSIDriver) + newCSIDriver.Spec.StorageCapacity = nil + } if old.(*storage.CSIDriver).Spec.VolumeLifecycleModes == nil && !utilfeature.DefaultFeatureGate.Enabled(features.CSIInlineVolume) { newCSIDriver := obj.(*storage.CSIDriver) newCSIDriver.Spec.VolumeLifecycleModes = nil } + if old.(*storage.CSIDriver).Spec.FSGroupPolicy == nil && + !utilfeature.DefaultFeatureGate.Enabled(features.CSIVolumeFSGroupPolicy) { + newCSIDriver := obj.(*storage.CSIDriver) + newCSIDriver.Spec.FSGroupPolicy = nil + } } func (csiDriverStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/BUILD new file mode 100644 index 00000000000..fe95c84fca6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/BUILD @@ -0,0 +1,53 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "strategy.go", + ], + importpath = "k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/legacyscheme:go_default_library", + "//pkg/apis/storage:go_default_library", + "//pkg/apis/storage/validation:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/storage/names:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = ["strategy_test.go"], + embed = [":go_default_library"], + deps = [ + "//pkg/apis/storage:go_default_library", + "//pkg/features:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/endpoints/request:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/registry/storage/csistoragecapacity/storage:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/doc.go b/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/doc.go new file mode 100644 index 00000000000..3b99e2cf6bf --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2020 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 csistoragecapacity provides Registry interface and its REST +// implementation for storing csistoragecapacity api objects. +package csistoragecapacity diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/storage/BUILD new file mode 100644 index 00000000000..d66268f11e2 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/storage/BUILD @@ -0,0 +1,49 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["storage.go"], + importpath = "k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/storage", + visibility = ["//visibility:public"], + deps = [ + "//pkg/apis/storage:go_default_library", + "//pkg/registry/storage/csistoragecapacity:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/registry/rest:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = ["storage_test.go"], + embed = [":go_default_library"], + deps = [ + "//pkg/apis/storage:go_default_library", + "//pkg/apis/storage/install:go_default_library", + "//pkg/registry/registrytest:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/registry/generic:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/registry/generic/testing:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/storage/etcd3/testing:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/storage/storage.go new file mode 100644 index 00000000000..b638d96b0f0 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/storage/storage.go @@ -0,0 +1,59 @@ +/* +Copyright 2020 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 storage + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/generic" + genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" + "k8s.io/apiserver/pkg/registry/rest" + storageapi "k8s.io/kubernetes/pkg/apis/storage" + "k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity" +) + +// CSIStorageCapacityStorage includes storage for CSIStorageCapacity and all subresources +type CSIStorageCapacityStorage struct { + CSIStorageCapacity *REST +} + +// REST object that will work for CSIStorageCapacity +type REST struct { + *genericregistry.Store +} + +// NewStorage returns a RESTStorage object that will work against CSIStorageCapacity +func NewStorage(optsGetter generic.RESTOptionsGetter) (*CSIStorageCapacityStorage, error) { + store := &genericregistry.Store{ + NewFunc: func() runtime.Object { return &storageapi.CSIStorageCapacity{} }, + NewListFunc: func() runtime.Object { return &storageapi.CSIStorageCapacityList{} }, + DefaultQualifiedResource: storageapi.Resource("csistoragecapacities"), + + TableConvertor: rest.NewDefaultTableConvertor(storageapi.Resource("csistoragecapacities")), + + CreateStrategy: csistoragecapacity.Strategy, + UpdateStrategy: csistoragecapacity.Strategy, + DeleteStrategy: csistoragecapacity.Strategy, + } + options := &generic.StoreOptions{RESTOptions: optsGetter} + if err := store.CompleteWithOptions(options); err != nil { + return nil, err + } + + return &CSIStorageCapacityStorage{ + CSIStorageCapacity: &REST{store}, + }, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/strategy.go new file mode 100644 index 00000000000..35e1df57be7 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/strategy.go @@ -0,0 +1,78 @@ +/* +Copyright 2020 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 csistoragecapacity + +import ( + "context" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/storage/names" + "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/apis/storage" + "k8s.io/kubernetes/pkg/apis/storage/validation" +) + +// csiStorageCapacityStrategy implements behavior for CSIStorageCapacity objects +type csiStorageCapacityStrategy struct { + runtime.ObjectTyper + names.NameGenerator +} + +// Strategy is the default logic that applies when creating and updating +// CSIStorageCapacity objects via the REST API. +var Strategy = csiStorageCapacityStrategy{legacyscheme.Scheme, names.SimpleNameGenerator} + +func (csiStorageCapacityStrategy) NamespaceScoped() bool { + return true +} + +// PrepareForCreate is currently a NOP. +func (csiStorageCapacityStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { +} + +func (csiStorageCapacityStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { + csiStorageCapacity := obj.(*storage.CSIStorageCapacity) + + errs := validation.ValidateCSIStorageCapacity(csiStorageCapacity) + errs = append(errs, validation.ValidateCSIStorageCapacity(csiStorageCapacity)...) + + return errs +} + +// Canonicalize normalizes the object after validation. +func (csiStorageCapacityStrategy) Canonicalize(obj runtime.Object) { +} + +func (csiStorageCapacityStrategy) AllowCreateOnUpdate() bool { + return false +} + +// PrepareForUpdate is currently a NOP. +func (csiStorageCapacityStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { +} + +func (csiStorageCapacityStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { + newCSIStorageCapacityObj := obj.(*storage.CSIStorageCapacity) + oldCSIStorageCapacityObj := old.(*storage.CSIStorageCapacity) + errorList := validation.ValidateCSIStorageCapacity(newCSIStorageCapacityObj) + return append(errorList, validation.ValidateCSIStorageCapacityUpdate(newCSIStorageCapacityObj, oldCSIStorageCapacityObj)...) +} + +func (csiStorageCapacityStrategy) AllowUnconditionalUpdate() bool { + return false +} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/BUILD index 8c773060cf3..e7608f24201 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/BUILD @@ -15,6 +15,7 @@ go_library( "//pkg/features:go_default_library", "//pkg/registry/storage/csidriver/storage:go_default_library", "//pkg/registry/storage/csinode/storage:go_default_library", + "//pkg/registry/storage/csistoragecapacity/storage:go_default_library", "//pkg/registry/storage/storageclass/storage:go_default_library", "//pkg/registry/storage/volumeattachment/storage:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/storage_storage.go b/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/storage_storage.go index cb86ab2d3b5..9deb79e0f43 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/storage_storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/storage_storage.go @@ -30,6 +30,7 @@ import ( "k8s.io/kubernetes/pkg/features" csidriverstore "k8s.io/kubernetes/pkg/registry/storage/csidriver/storage" csinodestore "k8s.io/kubernetes/pkg/registry/storage/csinode/storage" + csistoragecapacitystore "k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/storage" storageclassstore "k8s.io/kubernetes/pkg/registry/storage/storageclass/storage" volumeattachmentstore "k8s.io/kubernetes/pkg/registry/storage/volumeattachment/storage" ) @@ -76,6 +77,15 @@ func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstora } storage["volumeattachments"] = volumeAttachmentStorage.VolumeAttachment + // register csistoragecapacity if CSIStorageCapacity feature gate is enabled + if utilfeature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity) { + csiStorageStorage, err := csistoragecapacitystore.NewStorage(restOptionsGetter) + if err != nil { + return storage, err + } + storage["csistoragecapacities"] = csiStorageStorage.CSIStorageCapacity + } + return storage, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/routes/BUILD b/vendor/k8s.io/kubernetes/pkg/routes/BUILD index ef8c18fc19d..96a57471f3b 100644 --- a/vendor/k8s.io/kubernetes/pkg/routes/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/routes/BUILD @@ -16,7 +16,7 @@ go_library( deps = [ "//pkg/serviceaccount:go_default_library", "//vendor/github.com/emicklei/go-restful:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/routes/openidmetadata.go b/vendor/k8s.io/kubernetes/pkg/routes/openidmetadata.go index 64038a5ce94..9ee8b1f175e 100644 --- a/vendor/k8s.io/kubernetes/pkg/routes/openidmetadata.go +++ b/vendor/k8s.io/kubernetes/pkg/routes/openidmetadata.go @@ -21,7 +21,7 @@ import ( restful "github.com/emicklei/go-restful" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/serviceaccount" ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/BUILD index f9904c2931a..f6f77557d85 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/BUILD @@ -11,7 +11,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/api/v1/pod:go_default_library", - "//pkg/controller/volume/scheduling:go_default_library", "//pkg/features:go_default_library", "//pkg/scheduler/algorithmprovider:go_default_library", "//pkg/scheduler/apis/config:go_default_library", @@ -20,22 +19,22 @@ go_library( "//pkg/scheduler/core:go_default_library", "//pkg/scheduler/framework/plugins:go_default_library", "//pkg/scheduler/framework/plugins/defaultbinder:go_default_library", - "//pkg/scheduler/framework/plugins/interpodaffinity:go_default_library", "//pkg/scheduler/framework/plugins/noderesources:go_default_library", "//pkg/scheduler/framework/plugins/queuesort:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", "//pkg/scheduler/internal/cache/debugger:go_default_library", "//pkg/scheduler/internal/queue:go_default_library", "//pkg/scheduler/metrics:go_default_library", "//pkg/scheduler/profile:go_default_library", + "//pkg/scheduler/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", @@ -44,10 +43,9 @@ go_library( "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", - "//staging/src/k8s.io/client-go/listers/policy/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//vendor/github.com/google/go-cmp/cmp:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -60,9 +58,8 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//pkg/api/testing:go_default_library", + "//pkg/apis/core:go_default_library", "//pkg/controller/volume/scheduling:go_default_library", - "//pkg/features:go_default_library", "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/apis/config/scheme:go_default_library", "//pkg/scheduler/core:go_default_library", @@ -75,25 +72,23 @@ go_test( "//pkg/scheduler/framework/plugins/queuesort:go_default_library", "//pkg/scheduler/framework/plugins/serviceaffinity:go_default_library", "//pkg/scheduler/framework/plugins/volumebinding:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", "//pkg/scheduler/internal/cache/fake:go_default_library", "//pkg/scheduler/internal/queue:go_default_library", - "//pkg/scheduler/listers:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//pkg/scheduler/profile:go_default_library", "//pkg/scheduler/testing:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/api/events/v1beta1:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", @@ -123,10 +118,9 @@ filegroup( "//pkg/scheduler/framework:all-srcs", "//pkg/scheduler/internal/cache:all-srcs", "//pkg/scheduler/internal/heap:all-srcs", + "//pkg/scheduler/internal/parallelize:all-srcs", "//pkg/scheduler/internal/queue:all-srcs", - "//pkg/scheduler/listers:all-srcs", "//pkg/scheduler/metrics:all-srcs", - "//pkg/scheduler/nodeinfo:all-srcs", "//pkg/scheduler/profile:all-srcs", "//pkg/scheduler/testing:all-srcs", "//pkg/scheduler/util:all-srcs", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/algorithmprovider/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/algorithmprovider/BUILD index c34ae8b92cc..ac0e8bc5625 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/algorithmprovider/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/algorithmprovider/BUILD @@ -14,7 +14,7 @@ go_library( "//pkg/features:go_default_library", "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/framework/plugins/defaultbinder:go_default_library", - "//pkg/scheduler/framework/plugins/defaultpodtopologyspread:go_default_library", + "//pkg/scheduler/framework/plugins/defaultpreemption:go_default_library", "//pkg/scheduler/framework/plugins/imagelocality:go_default_library", "//pkg/scheduler/framework/plugins/interpodaffinity:go_default_library", "//pkg/scheduler/framework/plugins/nodeaffinity:go_default_library", @@ -26,12 +26,13 @@ go_library( "//pkg/scheduler/framework/plugins/nodevolumelimits:go_default_library", "//pkg/scheduler/framework/plugins/podtopologyspread:go_default_library", "//pkg/scheduler/framework/plugins/queuesort:go_default_library", + "//pkg/scheduler/framework/plugins/selectorspread:go_default_library", "//pkg/scheduler/framework/plugins/tainttoleration:go_default_library", "//pkg/scheduler/framework/plugins/volumebinding:go_default_library", "//pkg/scheduler/framework/plugins/volumerestrictions:go_default_library", "//pkg/scheduler/framework/plugins/volumezone:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -43,7 +44,7 @@ go_test( "//pkg/features:go_default_library", "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/framework/plugins/defaultbinder:go_default_library", - "//pkg/scheduler/framework/plugins/defaultpodtopologyspread:go_default_library", + "//pkg/scheduler/framework/plugins/defaultpreemption:go_default_library", "//pkg/scheduler/framework/plugins/imagelocality:go_default_library", "//pkg/scheduler/framework/plugins/interpodaffinity:go_default_library", "//pkg/scheduler/framework/plugins/nodeaffinity:go_default_library", @@ -55,11 +56,13 @@ go_test( "//pkg/scheduler/framework/plugins/nodevolumelimits:go_default_library", "//pkg/scheduler/framework/plugins/podtopologyspread:go_default_library", "//pkg/scheduler/framework/plugins/queuesort:go_default_library", + "//pkg/scheduler/framework/plugins/selectorspread:go_default_library", "//pkg/scheduler/framework/plugins/tainttoleration:go_default_library", "//pkg/scheduler/framework/plugins/volumebinding:go_default_library", "//pkg/scheduler/framework/plugins/volumerestrictions:go_default_library", "//pkg/scheduler/framework/plugins/volumezone:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//staging/src/k8s.io/component-base/featuregate:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", "//vendor/github.com/google/go-cmp/cmp:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/algorithmprovider/registry.go b/vendor/k8s.io/kubernetes/pkg/scheduler/algorithmprovider/registry.go index a992d63ea21..1a84705a03c 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/algorithmprovider/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/algorithmprovider/registry.go @@ -21,11 +21,11 @@ import ( "strings" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" schedulerapi "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread" + "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity" @@ -37,6 +37,7 @@ import ( "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort" + "k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions" @@ -85,7 +86,9 @@ func getDefaultConfig() *schedulerapi.Plugins { Enabled: []schedulerapi.Plugin{ {Name: noderesources.FitName}, {Name: nodeports.Name}, + {Name: podtopologyspread.Name}, {Name: interpodaffinity.Name}, + {Name: volumebinding.Name}, }, }, Filter: &schedulerapi.PluginSet{ @@ -103,13 +106,19 @@ func getDefaultConfig() *schedulerapi.Plugins { {Name: nodevolumelimits.AzureDiskName}, {Name: volumebinding.Name}, {Name: volumezone.Name}, + {Name: podtopologyspread.Name}, {Name: interpodaffinity.Name}, }, }, + PostFilter: &schedulerapi.PluginSet{ + Enabled: []schedulerapi.Plugin{ + {Name: defaultpreemption.Name}, + }, + }, PreScore: &schedulerapi.PluginSet{ Enabled: []schedulerapi.Plugin{ {Name: interpodaffinity.Name}, - {Name: defaultpodtopologyspread.Name}, + {Name: podtopologyspread.Name}, {Name: tainttoleration.Name}, }, }, @@ -121,10 +130,23 @@ func getDefaultConfig() *schedulerapi.Plugins { {Name: noderesources.LeastAllocatedName, Weight: 1}, {Name: nodeaffinity.Name, Weight: 1}, {Name: nodepreferavoidpods.Name, Weight: 10000}, - {Name: defaultpodtopologyspread.Name, Weight: 1}, + // Weight is doubled because: + // - This is a score coming from user preference. + // - It makes its signal comparable to NodeResourcesLeastAllocated. + {Name: podtopologyspread.Name, Weight: 2}, {Name: tainttoleration.Name, Weight: 1}, }, }, + Reserve: &schedulerapi.PluginSet{ + Enabled: []schedulerapi.Plugin{ + {Name: volumebinding.Name}, + }, + }, + PreBind: &schedulerapi.PluginSet{ + Enabled: []schedulerapi.Plugin{ + {Name: volumebinding.Name}, + }, + }, Bind: &schedulerapi.PluginSet{ Enabled: []schedulerapi.Plugin{ {Name: defaultbinder.Name}, @@ -145,23 +167,13 @@ func getClusterAutoscalerConfig() *schedulerapi.Plugins { } func applyFeatureGates(config *schedulerapi.Plugins) { - // Only add EvenPodsSpread if the feature is enabled. - if utilfeature.DefaultFeatureGate.Enabled(features.EvenPodsSpread) { - klog.Infof("Registering EvenPodsSpread predicate and priority function") - f := schedulerapi.Plugin{Name: podtopologyspread.Name} - config.PreFilter.Enabled = append(config.PreFilter.Enabled, f) - config.Filter.Enabled = append(config.Filter.Enabled, f) - config.PreScore.Enabled = append(config.PreScore.Enabled, f) - s := schedulerapi.Plugin{Name: podtopologyspread.Name, Weight: 1} - config.Score.Enabled = append(config.Score.Enabled, s) - } - - // Prioritizes nodes that satisfy pod's resource limits - if utilfeature.DefaultFeatureGate.Enabled(features.ResourceLimitsPriorityFunction) { - klog.Infof("Registering resourcelimits priority function") - s := schedulerapi.Plugin{Name: noderesources.ResourceLimitsName} + if !utilfeature.DefaultFeatureGate.Enabled(features.DefaultPodTopologySpread) { + // When feature is enabled, the default spreading is done by + // PodTopologySpread plugin, which is enabled by default. + klog.Infof("Registering SelectorSpread plugin") + s := schedulerapi.Plugin{Name: selectorspread.Name} config.PreScore.Enabled = append(config.PreScore.Enabled, s) - s = schedulerapi.Plugin{Name: noderesources.ResourceLimitsName, Weight: 1} + s.Weight = 1 config.Score.Enabled = append(config.Score.Enabled, s) } } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/BUILD index 2c3fec71bae..7291c0c6b7a 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/BUILD @@ -7,11 +7,13 @@ go_library( "legacy_types.go", "register.go", "types.go", + "types_pluginargs.go", "zz_generated.deepcopy.go", ], importpath = "k8s.io/kubernetes/pkg/scheduler/apis/config", visibility = ["//visibility:public"], deps = [ + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", @@ -34,8 +36,7 @@ filegroup( "//pkg/scheduler/apis/config/scheme:all-srcs", "//pkg/scheduler/apis/config/testing:all-srcs", "//pkg/scheduler/apis/config/v1:all-srcs", - "//pkg/scheduler/apis/config/v1alpha1:all-srcs", - "//pkg/scheduler/apis/config/v1alpha2:all-srcs", + "//pkg/scheduler/apis/config/v1beta1:all-srcs", "//pkg/scheduler/apis/config/validation:all-srcs", ], tags = ["automanaged"], diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/legacy_types.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/legacy_types.go index 79eb0daed7e..80ff73671c5 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/legacy_types.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/legacy_types.go @@ -17,8 +17,6 @@ limitations under the License. package config import ( - "time" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -135,100 +133,3 @@ type RequestedToCapacityRatioArguments struct { Shape []UtilizationShapePoint `json:"shape"` Resources []ResourceSpec `json:"resources,omitempty"` } - -// UtilizationShapePoint represents single point of priority function shape -type UtilizationShapePoint struct { - // Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100. - Utilization int32 - // Score assigned to given utilization (y axis). Valid values are 0 to 10. - Score int32 -} - -// ResourceSpec represents single resource for bin packing of priority RequestedToCapacityRatioArguments. -type ResourceSpec struct { - // Name of the resource to be managed by RequestedToCapacityRatio function. - Name string - // Weight of the resource. - Weight int64 -} - -// ExtenderManagedResource describes the arguments of extended resources -// managed by an extender. -type ExtenderManagedResource struct { - // Name is the extended resource name. - Name string - // IgnoredByScheduler indicates whether kube-scheduler should ignore this - // resource when applying predicates. - IgnoredByScheduler bool -} - -// ExtenderTLSConfig contains settings to enable TLS with extender -type ExtenderTLSConfig struct { - // Server should be accessed without verifying the TLS certificate. For testing only. - Insecure bool - // ServerName is passed to the server for SNI and is used in the client to check server - // certificates against. If ServerName is empty, the hostname used to contact the - // server is used. - ServerName string - - // Server requires TLS client certificate authentication - CertFile string - // Server requires TLS client certificate authentication - KeyFile string - // Trusted root certificates for server - CAFile string - - // CertData holds PEM-encoded bytes (typically read from a client certificate file). - // CertData takes precedence over CertFile - CertData []byte - // KeyData holds PEM-encoded bytes (typically read from a client certificate key file). - // KeyData takes precedence over KeyFile - KeyData []byte - // CAData holds PEM-encoded bytes (typically read from a root certificates bundle). - // CAData takes precedence over CAFile - CAData []byte -} - -// Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, -// it is assumed that the extender chose not to provide that extension. -type Extender struct { - // URLPrefix at which the extender is available - URLPrefix string - // Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender. - FilterVerb string - // Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender. - PreemptVerb string - // Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender. - PrioritizeVerb string - // The numeric multiplier for the node scores that the prioritize call generates. - // The weight should be a positive integer - Weight int64 - // Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. - // If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender - // can implement this function. - BindVerb string - // EnableHTTPS specifies whether https should be used to communicate with the extender - EnableHTTPS bool - // TLSConfig specifies the transport layer security config - TLSConfig *ExtenderTLSConfig - // HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize - // timeout is ignored, k8s/other extenders priorities are used to select the node. - HTTPTimeout time.Duration - // NodeCacheCapable specifies that the extender is capable of caching node information, - // so the scheduler should only send minimal information about the eligible nodes - // assuming that the extender already cached full details of all nodes in the cluster - NodeCacheCapable bool - // ManagedResources is a list of extended resources that are managed by - // this extender. - // - A pod will be sent to the extender on the Filter, Prioritize and Bind - // (if the extender is the binder) phases iff the pod requests at least - // one of the extended resources in this list. If empty or unspecified, - // all pods will be sent to this extender. - // - If IgnoredByScheduler is set to true for a resource, kube-scheduler - // will skip checking the resource in predicates. - // +optional - ManagedResources []ExtenderManagedResource - // Ignorable specifies if the extender is ignorable, i.e. scheduling should not - // fail when the extender returns an error or is not reachable. - Ignorable bool -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/register.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/register.go index bb67672faef..81a65d365df 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/register.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/register.go @@ -39,6 +39,15 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &KubeSchedulerConfiguration{}, &Policy{}, + &InterPodAffinityArgs{}, + &NodeLabelArgs{}, + &NodeResourcesFitArgs{}, + &PodTopologySpreadArgs{}, + &RequestedToCapacityRatioArgs{}, + &ServiceAffinityArgs{}, + &VolumeBindingArgs{}, + &NodeResourcesLeastAllocatedArgs{}, + &NodeResourcesMostAllocatedArgs{}, ) scheme.AddKnownTypes(schema.GroupVersion{Group: "", Version: runtime.APIVersionInternal}, &Policy{}) return nil diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/scheme/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/scheme/BUILD index ce8253fb41f..7331f914ffb 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/scheme/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/scheme/BUILD @@ -1,4 +1,4 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", @@ -8,8 +8,7 @@ go_library( deps = [ "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/apis/config/v1:go_default_library", - "//pkg/scheduler/apis/config/v1alpha1:go_default_library", - "//pkg/scheduler/apis/config/v1alpha2:go_default_library", + "//pkg/scheduler/apis/config/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", @@ -29,3 +28,19 @@ filegroup( tags = ["automanaged"], visibility = ["//visibility:public"], ) + +go_test( + name = "go_default_test", + srcs = ["scheme_test.go"], + embed = [":go_default_library"], + deps = [ + "//pkg/scheduler/apis/config:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/kube-scheduler/config/v1beta1:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", + "//vendor/sigs.k8s.io/yaml:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/scheme/scheme.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/scheme/scheme.go index de5810801d3..f50a1a33d8f 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/scheme/scheme.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/scheme/scheme.go @@ -22,8 +22,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" kubeschedulerconfig "k8s.io/kubernetes/pkg/scheduler/apis/config" kubeschedulerconfigv1 "k8s.io/kubernetes/pkg/scheduler/apis/config/v1" - kubeschedulerconfigv1alpha1 "k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1" - kubeschedulerconfigv1alpha2 "k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2" + kubeschedulerconfigv1beta1 "k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1" ) var ( @@ -42,7 +41,6 @@ func init() { func AddToScheme(scheme *runtime.Scheme) { utilruntime.Must(kubeschedulerconfig.AddToScheme(scheme)) utilruntime.Must(kubeschedulerconfigv1.AddToScheme(scheme)) - utilruntime.Must(kubeschedulerconfigv1alpha1.AddToScheme(scheme)) - utilruntime.Must(kubeschedulerconfigv1alpha2.AddToScheme(scheme)) - utilruntime.Must(scheme.SetVersionPriority(kubeschedulerconfigv1alpha2.SchemeGroupVersion, kubeschedulerconfigv1alpha1.SchemeGroupVersion)) + utilruntime.Must(kubeschedulerconfigv1beta1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(kubeschedulerconfigv1beta1.SchemeGroupVersion)) } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types.go index a21d16fd2ff..2aaee6a866e 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types.go @@ -38,6 +38,15 @@ const ( // SchedulerDefaultProviderName defines the default provider names SchedulerDefaultProviderName = "DefaultProvider" + + // DefaultInsecureSchedulerPort is the default port for the scheduler status server. + // May be overridden by a flag at startup. + // Deprecated: use the secure KubeSchedulerPort instead. + DefaultInsecureSchedulerPort = 10251 + + // DefaultKubeSchedulerPort is the default port for the scheduler status server. + // May be overridden by a flag at startup. + DefaultKubeSchedulerPort = 10259 ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -48,11 +57,11 @@ type KubeSchedulerConfiguration struct { // AlgorithmSource specifies the scheduler algorithm source. // TODO(#87526): Remove AlgorithmSource from this package - // DEPRECATED: AlgorithmSource is removed in the v1alpha2 ComponentConfig + // DEPRECATED: AlgorithmSource is removed in the v1beta1 ComponentConfig AlgorithmSource SchedulerAlgorithmSource // LeaderElection defines the configuration of leader election client. - LeaderElection KubeSchedulerLeaderElectionConfiguration + LeaderElection componentbaseconfig.LeaderElectionConfiguration // ClientConnection specifies the kubeconfig file and client connection // settings for the proxy server to use when communicating with the apiserver. @@ -68,10 +77,7 @@ type KubeSchedulerConfiguration struct { // TODO: We might wanna make this a substruct like Debugging componentbaseconfig.DebuggingConfiguration componentbaseconfig.DebuggingConfiguration - // DisablePreemption disables the pod preemption feature. - DisablePreemption bool - - // PercentageOfNodeToScore is the percentage of all nodes that once found feasible + // PercentageOfNodesToScore is the percentage of all nodes that once found feasible // for running a pod, the scheduler stops its search for more feasible nodes in // the cluster. This helps improve scheduler's performance. Scheduler always tries to find // at least "minFeasibleNodesToFind" feasible nodes no matter what the value of this flag is. @@ -81,11 +87,6 @@ type KubeSchedulerConfiguration struct { // nodes will be scored. PercentageOfNodesToScore int32 - // Duration to wait for a binding operation to complete before timing out - // Value must be non-negative integer. The value zero indicates no waiting. - // If this value is nil, the default value will be used. - BindTimeoutSeconds int64 - // PodInitialBackoffSeconds is the initial backoff for unschedulable pods. // If specified, it must be greater than 0. If this value is null, the default value (1s) // will be used. @@ -164,12 +165,6 @@ type SchedulerPolicyConfigMapSource struct { Name string } -// KubeSchedulerLeaderElectionConfiguration expands LeaderElectionConfiguration -// to include scheduler specific configuration. -type KubeSchedulerLeaderElectionConfiguration struct { - componentbaseconfig.LeaderElectionConfiguration -} - // Plugins include multiple extension points. When specified, the list of plugins for // a particular extension point are the only ones enabled. If an extension point is // omitted from the config, then the default set of plugins is used for that extension point. @@ -185,13 +180,17 @@ type Plugins struct { // Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod. Filter *PluginSet + // PostFilter is a list of plugins that are invoked after filtering phase, no matter whether filtering succeeds or not. + PostFilter *PluginSet + // PreScore is a list of plugins that are invoked before scoring. PreScore *PluginSet // Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase. Score *PluginSet - // Reserve is a list of plugins invoked when reserving a node to run the pod. + // Reserve is a list of plugins invoked when reserving/unreserving resources + // after a node is assigned to run the pod. Reserve *PluginSet // Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod. @@ -206,9 +205,6 @@ type Plugins struct { // PostBind is a list of plugins that should be invoked after a pod is successfully bound. PostBind *PluginSet - - // Unreserve is a list of plugins invoked when a pod that was previously reserved is rejected in a later phase. - Unreserve *PluginSet } // PluginSet specifies enabled and disabled plugins for an extension point. @@ -237,7 +233,7 @@ type PluginConfig struct { // Name defines the name of plugin being configured Name string // Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure. - Args runtime.Unknown + Args runtime.Object } /* @@ -279,6 +275,7 @@ func (p *Plugins) Append(src *Plugins) { p.QueueSort = appendPluginSet(p.QueueSort, src.QueueSort) p.PreFilter = appendPluginSet(p.PreFilter, src.PreFilter) p.Filter = appendPluginSet(p.Filter, src.Filter) + p.PostFilter = appendPluginSet(p.PostFilter, src.PostFilter) p.PreScore = appendPluginSet(p.PreScore, src.PreScore) p.Score = appendPluginSet(p.Score, src.Score) p.Reserve = appendPluginSet(p.Reserve, src.Reserve) @@ -286,7 +283,6 @@ func (p *Plugins) Append(src *Plugins) { p.PreBind = appendPluginSet(p.PreBind, src.PreBind) p.Bind = appendPluginSet(p.Bind, src.Bind) p.PostBind = appendPluginSet(p.PostBind, src.PostBind) - p.Unreserve = appendPluginSet(p.Unreserve, src.Unreserve) } // Apply merges the plugin configuration from custom plugins, handling disabled sets. @@ -298,6 +294,7 @@ func (p *Plugins) Apply(customPlugins *Plugins) { p.QueueSort = mergePluginSets(p.QueueSort, customPlugins.QueueSort) p.PreFilter = mergePluginSets(p.PreFilter, customPlugins.PreFilter) p.Filter = mergePluginSets(p.Filter, customPlugins.Filter) + p.PostFilter = mergePluginSets(p.PostFilter, customPlugins.PostFilter) p.PreScore = mergePluginSets(p.PreScore, customPlugins.PreScore) p.Score = mergePluginSets(p.Score, customPlugins.Score) p.Reserve = mergePluginSets(p.Reserve, customPlugins.Reserve) @@ -305,7 +302,6 @@ func (p *Plugins) Apply(customPlugins *Plugins) { p.PreBind = mergePluginSets(p.PreBind, customPlugins.PreBind) p.Bind = mergePluginSets(p.Bind, customPlugins.Bind) p.PostBind = mergePluginSets(p.PostBind, customPlugins.PostBind) - p.Unreserve = mergePluginSets(p.Unreserve, customPlugins.Unreserve) } func mergePluginSets(defaultPluginSet, customPluginSet *PluginSet) *PluginSet { @@ -337,3 +333,84 @@ func mergePluginSets(defaultPluginSet, customPluginSet *PluginSet) *PluginSet { return &PluginSet{Enabled: enabledPlugins} } + +// Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, +// it is assumed that the extender chose not to provide that extension. +type Extender struct { + // URLPrefix at which the extender is available + URLPrefix string + // Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender. + FilterVerb string + // Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender. + PreemptVerb string + // Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender. + PrioritizeVerb string + // The numeric multiplier for the node scores that the prioritize call generates. + // The weight should be a positive integer + Weight int64 + // Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. + // If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender + // can implement this function. + BindVerb string + // EnableHTTPS specifies whether https should be used to communicate with the extender + EnableHTTPS bool + // TLSConfig specifies the transport layer security config + TLSConfig *ExtenderTLSConfig + // HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize + // timeout is ignored, k8s/other extenders priorities are used to select the node. + HTTPTimeout metav1.Duration + // NodeCacheCapable specifies that the extender is capable of caching node information, + // so the scheduler should only send minimal information about the eligible nodes + // assuming that the extender already cached full details of all nodes in the cluster + NodeCacheCapable bool + // ManagedResources is a list of extended resources that are managed by + // this extender. + // - A pod will be sent to the extender on the Filter, Prioritize and Bind + // (if the extender is the binder) phases iff the pod requests at least + // one of the extended resources in this list. If empty or unspecified, + // all pods will be sent to this extender. + // - If IgnoredByScheduler is set to true for a resource, kube-scheduler + // will skip checking the resource in predicates. + // +optional + ManagedResources []ExtenderManagedResource + // Ignorable specifies if the extender is ignorable, i.e. scheduling should not + // fail when the extender returns an error or is not reachable. + Ignorable bool +} + +// ExtenderManagedResource describes the arguments of extended resources +// managed by an extender. +type ExtenderManagedResource struct { + // Name is the extended resource name. + Name string + // IgnoredByScheduler indicates whether kube-scheduler should ignore this + // resource when applying predicates. + IgnoredByScheduler bool +} + +// ExtenderTLSConfig contains settings to enable TLS with extender +type ExtenderTLSConfig struct { + // Server should be accessed without verifying the TLS certificate. For testing only. + Insecure bool + // ServerName is passed to the server for SNI and is used in the client to check server + // certificates against. If ServerName is empty, the hostname used to contact the + // server is used. + ServerName string + + // Server requires TLS client certificate authentication + CertFile string + // Server requires TLS client certificate authentication + KeyFile string + // Trusted root certificates for server + CAFile string + + // CertData holds PEM-encoded bytes (typically read from a client certificate file). + // CertData takes precedence over CertFile + CertData []byte + // KeyData holds PEM-encoded bytes (typically read from a client certificate key file). + // KeyData takes precedence over KeyFile + KeyData []byte + // CAData holds PEM-encoded bytes (typically read from a root certificates bundle). + // CAData takes precedence over CAFile + CAData []byte +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types_pluginargs.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types_pluginargs.go new file mode 100644 index 00000000000..24dd2f6ffda --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types_pluginargs.go @@ -0,0 +1,160 @@ +/* +Copyright 2020 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 config + +import ( + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin. +type InterPodAffinityArgs struct { + metav1.TypeMeta + + // HardPodAffinityWeight is the scoring weight for existing pods with a + // matching hard affinity to the incoming pod. + HardPodAffinityWeight int32 +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NodeLabelArgs holds arguments used to configure the NodeLabel plugin. +type NodeLabelArgs struct { + metav1.TypeMeta + + // PresentLabels should be present for the node to be considered a fit for hosting the pod + PresentLabels []string + // AbsentLabels should be absent for the node to be considered a fit for hosting the pod + AbsentLabels []string + // Nodes that have labels in the list will get a higher score. + PresentLabelsPreference []string + // Nodes that don't have labels in the list will get a higher score. + AbsentLabelsPreference []string +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin. +type NodeResourcesFitArgs struct { + metav1.TypeMeta + + // IgnoredResources is the list of resources that NodeResources fit filter + // should ignore. + IgnoredResources []string + // IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore. + // e.g. if group is ["example.com"], it will ignore all resource names that begin + // with "example.com", such as "example.com/aaa" and "example.com/bbb". + // A resource group name can't contain '/'. + IgnoredResourceGroups []string +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin. +type PodTopologySpreadArgs struct { + metav1.TypeMeta + + // DefaultConstraints defines topology spread constraints to be applied to + // pods that don't define any in `pod.spec.topologySpreadConstraints`. + // `topologySpreadConstraint.labelSelectors` must be empty, as they are + // deduced the pods' membership to Services, Replication Controllers, Replica + // Sets or Stateful Sets. + // Empty by default. + DefaultConstraints []v1.TopologySpreadConstraint +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// RequestedToCapacityRatioArgs holds arguments used to configure RequestedToCapacityRatio plugin. +type RequestedToCapacityRatioArgs struct { + metav1.TypeMeta + + // Points defining priority function shape + Shape []UtilizationShapePoint + // Resources to be considered when scoring. + // The default resource set includes "cpu" and "memory" with an equal weight. + // Allowed weights go from 1 to 100. + Resources []ResourceSpec +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NodeResourcesLeastAllocatedArgs holds arguments used to configure NodeResourcesLeastAllocated plugin. +type NodeResourcesLeastAllocatedArgs struct { + metav1.TypeMeta + + // Resources to be considered when scoring. + // The default resource set includes "cpu" and "memory" with an equal weight. + // Allowed weights go from 1 to 100. + Resources []ResourceSpec +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NodeResourcesMostAllocatedArgs holds arguments used to configure NodeResourcesMostAllocated plugin. +type NodeResourcesMostAllocatedArgs struct { + metav1.TypeMeta + + // Resources to be considered when scoring. + // The default resource set includes "cpu" and "memory" with an equal weight. + // Allowed weights go from 1 to 100. + Resources []ResourceSpec +} + +// UtilizationShapePoint represents a single point of a priority function shape. +type UtilizationShapePoint struct { + // Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100. + Utilization int32 + // Score assigned to a given utilization (y axis). Valid values are 0 to 10. + Score int32 +} + +// ResourceSpec represents single resource. +type ResourceSpec struct { + // Name of the resource. + Name string + // Weight of the resource. + Weight int64 +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ServiceAffinityArgs holds arguments used to configure the ServiceAffinity plugin. +type ServiceAffinityArgs struct { + metav1.TypeMeta + + // AffinityLabels are homogeneous for pods that are scheduled to a node. + // (i.e. it returns true IFF this pod can be added to this node such that all other pods in + // the same service are running on nodes with the exact same values for Labels). + AffinityLabels []string + // AntiAffinityLabelsPreference are the labels to consider for service anti affinity scoring. + AntiAffinityLabelsPreference []string +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin. +type VolumeBindingArgs struct { + metav1.TypeMeta + + // BindTimeoutSeconds is the timeout in seconds in volume binding operation. + // Value must be non-negative integer. The value zero indicates no waiting. + // If this value is nil, the default value will be used. + BindTimeoutSeconds int64 +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/BUILD index 9a0724a1327..0adeafa6e3d 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/BUILD @@ -1,8 +1,9 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", srcs = [ + "conversion.go", "doc.go", "register.go", "zz_generated.conversion.go", @@ -33,3 +34,15 @@ filegroup( tags = ["automanaged"], visibility = ["//visibility:public"], ) + +go_test( + name = "go_default_test", + srcs = ["conversion_test.go"], + embed = [":go_default_library"], + deps = [ + "//pkg/scheduler/apis/config:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/kube-scheduler/config/v1:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/conversion.go new file mode 100644 index 00000000000..06a6c7073f7 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/conversion.go @@ -0,0 +1,95 @@ +/* +Copyright 2020 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 v1 + +import ( + "k8s.io/apimachinery/pkg/conversion" + v1 "k8s.io/kube-scheduler/config/v1" + "k8s.io/kubernetes/pkg/scheduler/apis/config" +) + +func Convert_v1_LegacyExtender_To_config_Extender(in *v1.LegacyExtender, out *config.Extender, s conversion.Scope) error { + out.URLPrefix = in.URLPrefix + out.FilterVerb = in.FilterVerb + out.PreemptVerb = in.PreemptVerb + out.PrioritizeVerb = in.PrioritizeVerb + out.Weight = in.Weight + out.BindVerb = in.BindVerb + out.EnableHTTPS = in.EnableHTTPS + out.HTTPTimeout.Duration = in.HTTPTimeout + out.NodeCacheCapable = in.NodeCacheCapable + out.Ignorable = in.Ignorable + + if in.TLSConfig != nil { + out.TLSConfig = &config.ExtenderTLSConfig{} + if err := Convert_v1_ExtenderTLSConfig_To_config_ExtenderTLSConfig(in.TLSConfig, out.TLSConfig, s); err != nil { + return err + } + } else { + out.TLSConfig = nil + } + + if in.ManagedResources != nil { + out.ManagedResources = make([]config.ExtenderManagedResource, len(in.ManagedResources)) + for i, res := range in.ManagedResources { + err := Convert_v1_ExtenderManagedResource_To_config_ExtenderManagedResource(&res, &out.ManagedResources[i], s) + if err != nil { + return err + } + } + } else { + out.ManagedResources = nil + } + + return nil +} + +func Convert_config_Extender_To_v1_LegacyExtender(in *config.Extender, out *v1.LegacyExtender, s conversion.Scope) error { + out.URLPrefix = in.URLPrefix + out.FilterVerb = in.FilterVerb + out.PreemptVerb = in.PreemptVerb + out.PrioritizeVerb = in.PrioritizeVerb + out.Weight = in.Weight + out.BindVerb = in.BindVerb + out.EnableHTTPS = in.EnableHTTPS + out.HTTPTimeout = in.HTTPTimeout.Duration + out.NodeCacheCapable = in.NodeCacheCapable + out.Ignorable = in.Ignorable + + if in.TLSConfig != nil { + out.TLSConfig = &v1.ExtenderTLSConfig{} + if err := Convert_config_ExtenderTLSConfig_To_v1_ExtenderTLSConfig(in.TLSConfig, out.TLSConfig, s); err != nil { + return err + } + } else { + out.TLSConfig = nil + } + + if in.ManagedResources != nil { + out.ManagedResources = make([]v1.ExtenderManagedResource, len(in.ManagedResources)) + for i, res := range in.ManagedResources { + err := Convert_config_ExtenderManagedResource_To_v1_ExtenderManagedResource(&res, &out.ManagedResources[i], s) + if err != nil { + return err + } + } + } else { + out.ManagedResources = nil + } + + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/zz_generated.conversion.go index c918b819fe9..79c3a50a8a2 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1/zz_generated.conversion.go @@ -21,7 +21,6 @@ limitations under the License. package v1 import ( - time "time" unsafe "unsafe" conversion "k8s.io/apimachinery/pkg/conversion" @@ -37,16 +36,6 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*v1.Extender)(nil), (*config.Extender)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_Extender_To_config_Extender(a.(*v1.Extender), b.(*config.Extender), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.Extender)(nil), (*v1.Extender)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_Extender_To_v1_Extender(a.(*config.Extender), b.(*v1.Extender), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*v1.ExtenderManagedResource)(nil), (*config.ExtenderManagedResource)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_ExtenderManagedResource_To_config_ExtenderManagedResource(a.(*v1.ExtenderManagedResource), b.(*config.ExtenderManagedResource), scope) }); err != nil { @@ -187,51 +176,19 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*config.Extender)(nil), (*v1.LegacyExtender)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_Extender_To_v1_LegacyExtender(a.(*config.Extender), b.(*v1.LegacyExtender), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1.LegacyExtender)(nil), (*config.Extender)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_LegacyExtender_To_config_Extender(a.(*v1.LegacyExtender), b.(*config.Extender), scope) + }); err != nil { + return err + } return nil } -func autoConvert_v1_Extender_To_config_Extender(in *v1.Extender, out *config.Extender, s conversion.Scope) error { - out.URLPrefix = in.URLPrefix - out.FilterVerb = in.FilterVerb - out.PreemptVerb = in.PreemptVerb - out.PrioritizeVerb = in.PrioritizeVerb - out.Weight = in.Weight - out.BindVerb = in.BindVerb - out.EnableHTTPS = in.EnableHTTPS - out.TLSConfig = (*config.ExtenderTLSConfig)(unsafe.Pointer(in.TLSConfig)) - out.HTTPTimeout = time.Duration(in.HTTPTimeout) - out.NodeCacheCapable = in.NodeCacheCapable - out.ManagedResources = *(*[]config.ExtenderManagedResource)(unsafe.Pointer(&in.ManagedResources)) - out.Ignorable = in.Ignorable - return nil -} - -// Convert_v1_Extender_To_config_Extender is an autogenerated conversion function. -func Convert_v1_Extender_To_config_Extender(in *v1.Extender, out *config.Extender, s conversion.Scope) error { - return autoConvert_v1_Extender_To_config_Extender(in, out, s) -} - -func autoConvert_config_Extender_To_v1_Extender(in *config.Extender, out *v1.Extender, s conversion.Scope) error { - out.URLPrefix = in.URLPrefix - out.FilterVerb = in.FilterVerb - out.PreemptVerb = in.PreemptVerb - out.PrioritizeVerb = in.PrioritizeVerb - out.Weight = in.Weight - out.BindVerb = in.BindVerb - out.EnableHTTPS = in.EnableHTTPS - out.TLSConfig = (*v1.ExtenderTLSConfig)(unsafe.Pointer(in.TLSConfig)) - out.HTTPTimeout = time.Duration(in.HTTPTimeout) - out.NodeCacheCapable = in.NodeCacheCapable - out.ManagedResources = *(*[]v1.ExtenderManagedResource)(unsafe.Pointer(&in.ManagedResources)) - out.Ignorable = in.Ignorable - return nil -} - -// Convert_config_Extender_To_v1_Extender is an autogenerated conversion function. -func Convert_config_Extender_To_v1_Extender(in *config.Extender, out *v1.Extender, s conversion.Scope) error { - return autoConvert_config_Extender_To_v1_Extender(in, out, s) -} - func autoConvert_v1_ExtenderManagedResource_To_config_ExtenderManagedResource(in *v1.ExtenderManagedResource, out *config.ExtenderManagedResource, s conversion.Scope) error { out.Name = in.Name out.IgnoredByScheduler = in.IgnoredByScheduler @@ -335,7 +292,17 @@ func Convert_config_LabelsPresence_To_v1_LabelsPresence(in *config.LabelsPresenc func autoConvert_v1_Policy_To_config_Policy(in *v1.Policy, out *config.Policy, s conversion.Scope) error { out.Predicates = *(*[]config.PredicatePolicy)(unsafe.Pointer(&in.Predicates)) out.Priorities = *(*[]config.PriorityPolicy)(unsafe.Pointer(&in.Priorities)) - out.Extenders = *(*[]config.Extender)(unsafe.Pointer(&in.Extenders)) + if in.Extenders != nil { + in, out := &in.Extenders, &out.Extenders + *out = make([]config.Extender, len(*in)) + for i := range *in { + if err := Convert_v1_LegacyExtender_To_config_Extender(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Extenders = nil + } out.HardPodAffinitySymmetricWeight = in.HardPodAffinitySymmetricWeight out.AlwaysCheckAllPredicates = in.AlwaysCheckAllPredicates return nil @@ -349,7 +316,17 @@ func Convert_v1_Policy_To_config_Policy(in *v1.Policy, out *config.Policy, s con func autoConvert_config_Policy_To_v1_Policy(in *config.Policy, out *v1.Policy, s conversion.Scope) error { out.Predicates = *(*[]v1.PredicatePolicy)(unsafe.Pointer(&in.Predicates)) out.Priorities = *(*[]v1.PriorityPolicy)(unsafe.Pointer(&in.Priorities)) - out.Extenders = *(*[]v1.Extender)(unsafe.Pointer(&in.Extenders)) + if in.Extenders != nil { + in, out := &in.Extenders, &out.Extenders + *out = make([]v1.LegacyExtender, len(*in)) + for i := range *in { + if err := Convert_config_Extender_To_v1_LegacyExtender(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Extenders = nil + } out.HardPodAffinitySymmetricWeight = in.HardPodAffinitySymmetricWeight out.AlwaysCheckAllPredicates = in.AlwaysCheckAllPredicates return nil diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/BUILD deleted file mode 100644 index cc1874253c7..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/BUILD +++ /dev/null @@ -1,63 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "defaults.go", - "doc.go", - "register.go", - "zz_generated.conversion.go", - "zz_generated.deepcopy.go", - "zz_generated.defaults.go", - ], - importpath = "k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//pkg/apis/core:go_default_library", - "//pkg/master/ports:go_default_library", - "//pkg/scheduler/apis/config:go_default_library", - "//pkg/scheduler/framework/plugins:go_default_library", - "//pkg/scheduler/framework/plugins/interpodaffinity:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//staging/src/k8s.io/component-base/config/v1alpha1:go_default_library", - "//staging/src/k8s.io/kube-scheduler/config/v1alpha1:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "conversion_test.go", - "defaults_test.go", - ], - embed = [":go_default_library"], - deps = [ - "//pkg/scheduler/apis/config:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/component-base/config:go_default_library", - "//staging/src/k8s.io/component-base/config/v1alpha1:go_default_library", - "//staging/src/k8s.io/kube-scheduler/config/v1alpha1:go_default_library", - "//vendor/github.com/google/go-cmp/cmp:go_default_library", - "//vendor/k8s.io/utils/pointer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/conversion.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/conversion.go deleted file mode 100644 index 55ae5ed7ba2..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/conversion.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright 2019 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 v1alpha1 - -import ( - "fmt" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/kube-scheduler/config/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity" -) - -// Convert_v1alpha1_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration converts to the internal. -func Convert_v1alpha1_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(in *v1alpha1.KubeSchedulerConfiguration, out *config.KubeSchedulerConfiguration, s conversion.Scope) error { - if err := autoConvert_v1alpha1_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(in, out, s); err != nil { - return err - } - var profile config.KubeSchedulerProfile - if err := metav1.Convert_Pointer_string_To_string(&in.SchedulerName, &profile.SchedulerName, s); err != nil { - return err - } - if in.Plugins != nil { - profile.Plugins = &config.Plugins{} - if err := Convert_v1alpha1_Plugins_To_config_Plugins(in.Plugins, profile.Plugins, s); err != nil { - return err - } - } else { - profile.Plugins = nil - } - if in.PluginConfig != nil { - profile.PluginConfig = make([]config.PluginConfig, len(in.PluginConfig)) - for i := range in.PluginConfig { - if err := Convert_v1alpha1_PluginConfig_To_config_PluginConfig(&in.PluginConfig[i], &profile.PluginConfig[i], s); err != nil { - return err - } - } - } - if in.HardPodAffinitySymmetricWeight != nil { - args := interpodaffinity.Args{HardPodAffinityWeight: in.HardPodAffinitySymmetricWeight} - plCfg := plugins.NewPluginConfig(interpodaffinity.Name, args) - profile.PluginConfig = append(profile.PluginConfig, plCfg) - } - out.Profiles = []config.KubeSchedulerProfile{profile} - return nil -} - -func Convert_config_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in *config.KubeSchedulerConfiguration, out *v1alpha1.KubeSchedulerConfiguration, s conversion.Scope) error { - // Conversion from internal to v1alpha1 is not relevant for kube-scheduler. - return autoConvert_config_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in, out, s) -} - -// Convert_v1alpha1_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration handles deprecated parameters for leader election. -func Convert_v1alpha1_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration(in *v1alpha1.KubeSchedulerLeaderElectionConfiguration, out *config.KubeSchedulerLeaderElectionConfiguration, s conversion.Scope) error { - if err := autoConvert_v1alpha1_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration(in, out, s); err != nil { - return err - } - if len(in.ResourceNamespace) > 0 && len(in.LockObjectNamespace) == 0 { - out.ResourceNamespace = in.ResourceNamespace - } else if len(in.ResourceNamespace) == 0 && len(in.LockObjectNamespace) > 0 { - out.ResourceNamespace = in.LockObjectNamespace - } else if len(in.ResourceNamespace) > 0 && len(in.LockObjectNamespace) > 0 { - if in.ResourceNamespace == in.LockObjectNamespace { - out.ResourceNamespace = in.ResourceNamespace - } else { - return fmt.Errorf("ResourceNamespace and LockObjectNamespace are both set and do not match, ResourceNamespace: %s, LockObjectNamespace: %s", in.ResourceNamespace, in.LockObjectNamespace) - } - } - - if len(in.ResourceName) > 0 && len(in.LockObjectName) == 0 { - out.ResourceName = in.ResourceName - } else if len(in.ResourceName) == 0 && len(in.LockObjectName) > 0 { - out.ResourceName = in.LockObjectName - } else if len(in.ResourceName) > 0 && len(in.LockObjectName) > 0 { - if in.ResourceName == in.LockObjectName { - out.ResourceName = in.ResourceName - } else { - return fmt.Errorf("ResourceName and LockObjectName are both set and do not match, ResourceName: %s, LockObjectName: %s", in.ResourceName, in.LockObjectName) - } - } - return nil -} - -// Convert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha1_KubeSchedulerLeaderElectionConfiguration handles deprecated parameters for leader election. -func Convert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha1_KubeSchedulerLeaderElectionConfiguration(in *config.KubeSchedulerLeaderElectionConfiguration, out *v1alpha1.KubeSchedulerLeaderElectionConfiguration, s conversion.Scope) error { - if err := autoConvert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha1_KubeSchedulerLeaderElectionConfiguration(in, out, s); err != nil { - return err - } - out.ResourceNamespace = in.ResourceNamespace - out.LockObjectNamespace = in.ResourceNamespace - out.ResourceName = in.ResourceName - out.LockObjectName = in.ResourceName - return nil -} - -func Convert_v1alpha1_Plugins_To_config_Plugins(in *v1alpha1.Plugins, out *config.Plugins, s conversion.Scope) error { - if err := autoConvert_v1alpha1_Plugins_To_config_Plugins(in, out, s); err != nil { - return err - } - - if in.PostFilter != nil { - postFilter, preScore := &in.PostFilter, &out.PreScore - *preScore = new(config.PluginSet) - if err := Convert_v1alpha1_PluginSet_To_config_PluginSet(*postFilter, *preScore, s); err != nil { - return err - } - } else { - out.PreScore = nil - } - - return nil -} - -func Convert_config_Plugins_To_v1alpha1_Plugins(in *config.Plugins, out *v1alpha1.Plugins, s conversion.Scope) error { - if err := autoConvert_config_Plugins_To_v1alpha1_Plugins(in, out, s); err != nil { - return err - } - - if in.PreScore != nil { - preScore, postFilter := &in.PreScore, &out.PostFilter - *postFilter = new(v1alpha1.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha1_PluginSet(*preScore, *postFilter, s); err != nil { - return err - } - } else { - out.PostFilter = nil - } - - return nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/defaults.go deleted file mode 100644 index b298e8d9ac8..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/defaults.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -Copyright 2018 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 v1alpha1 - -import ( - "net" - "strconv" - - "k8s.io/apimachinery/pkg/runtime" - componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1" - kubeschedulerconfigv1alpha1 "k8s.io/kube-scheduler/config/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/apis/config" - - // this package shouldn't really depend on other k8s.io/kubernetes code - api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/master/ports" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - -// SetDefaults_KubeSchedulerConfiguration sets additional defaults -func SetDefaults_KubeSchedulerConfiguration(obj *kubeschedulerconfigv1alpha1.KubeSchedulerConfiguration) { - if obj.SchedulerName == nil { - val := api.DefaultSchedulerName - obj.SchedulerName = &val - } - - if obj.AlgorithmSource.Policy == nil && - (obj.AlgorithmSource.Provider == nil || len(*obj.AlgorithmSource.Provider) == 0) { - val := kubeschedulerconfigv1alpha1.SchedulerDefaultProviderName - obj.AlgorithmSource.Provider = &val - } - - if policy := obj.AlgorithmSource.Policy; policy != nil { - if policy.ConfigMap != nil && len(policy.ConfigMap.Namespace) == 0 { - obj.AlgorithmSource.Policy.ConfigMap.Namespace = api.NamespaceSystem - } - } - - // For Healthz and Metrics bind addresses, we want to check: - // 1. If the value is nil, default to 0.0.0.0 and default scheduler port - // 2. If there is a value set, attempt to split it. If it's just a port (ie, ":1234"), default to 0.0.0.0 with that port - // 3. If splitting the value fails, check if the value is even a valid IP. If so, use that with the default port. - // Otherwise use the default bind address - defaultBindAddress := net.JoinHostPort("0.0.0.0", strconv.Itoa(ports.InsecureSchedulerPort)) - if obj.HealthzBindAddress == nil { - obj.HealthzBindAddress = &defaultBindAddress - } else { - if host, port, err := net.SplitHostPort(*obj.HealthzBindAddress); err == nil { - if len(host) == 0 { - host = "0.0.0.0" - } - hostPort := net.JoinHostPort(host, port) - obj.HealthzBindAddress = &hostPort - } else { - // Something went wrong splitting the host/port, could just be a missing port so check if the - // existing value is a valid IP address. If so, use that with the default scheduler port - if host := net.ParseIP(*obj.HealthzBindAddress); host != nil { - hostPort := net.JoinHostPort(*obj.HealthzBindAddress, strconv.Itoa(ports.InsecureSchedulerPort)) - obj.HealthzBindAddress = &hostPort - } else { - // TODO: in v1beta1 we should let this error instead of stomping with a default value - obj.HealthzBindAddress = &defaultBindAddress - } - } - } - - if obj.MetricsBindAddress == nil { - obj.MetricsBindAddress = &defaultBindAddress - } else { - if host, port, err := net.SplitHostPort(*obj.MetricsBindAddress); err == nil { - if len(host) == 0 { - host = "0.0.0.0" - } - hostPort := net.JoinHostPort(host, port) - obj.MetricsBindAddress = &hostPort - } else { - // Something went wrong splitting the host/port, could just be a missing port so check if the - // existing value is a valid IP address. If so, use that with the default scheduler port - if host := net.ParseIP(*obj.MetricsBindAddress); host != nil { - hostPort := net.JoinHostPort(*obj.MetricsBindAddress, strconv.Itoa(ports.InsecureSchedulerPort)) - obj.MetricsBindAddress = &hostPort - } else { - // TODO: in v1beta1 we should let this error instead of stomping with a default value - obj.MetricsBindAddress = &defaultBindAddress - } - } - } - - if obj.DisablePreemption == nil { - disablePreemption := false - obj.DisablePreemption = &disablePreemption - } - - if obj.PercentageOfNodesToScore == nil { - percentageOfNodesToScore := int32(config.DefaultPercentageOfNodesToScore) - obj.PercentageOfNodesToScore = &percentageOfNodesToScore - } - - if len(obj.LeaderElection.ResourceLock) == 0 { - obj.LeaderElection.ResourceLock = "endpointsleases" - } - if len(obj.LeaderElection.LockObjectNamespace) == 0 && len(obj.LeaderElection.ResourceNamespace) == 0 { - obj.LeaderElection.LockObjectNamespace = kubeschedulerconfigv1alpha1.SchedulerDefaultLockObjectNamespace - } - if len(obj.LeaderElection.LockObjectName) == 0 && len(obj.LeaderElection.ResourceName) == 0 { - obj.LeaderElection.LockObjectName = kubeschedulerconfigv1alpha1.SchedulerDefaultLockObjectName - } - - if len(obj.ClientConnection.ContentType) == 0 { - obj.ClientConnection.ContentType = "application/vnd.kubernetes.protobuf" - } - // Scheduler has an opinion about QPS/Burst, setting specific defaults for itself, instead of generic settings. - if obj.ClientConnection.QPS == 0.0 { - obj.ClientConnection.QPS = 50.0 - } - if obj.ClientConnection.Burst == 0 { - obj.ClientConnection.Burst = 100 - } - - // Use the default LeaderElectionConfiguration options - componentbaseconfigv1alpha1.RecommendedDefaultLeaderElectionConfiguration(&obj.LeaderElection.LeaderElectionConfiguration) - - if obj.BindTimeoutSeconds == nil { - val := int64(600) - obj.BindTimeoutSeconds = &val - } - - if obj.PodInitialBackoffSeconds == nil { - val := int64(1) - obj.PodInitialBackoffSeconds = &val - } - - if obj.PodMaxBackoffSeconds == nil { - val := int64(10) - obj.PodMaxBackoffSeconds = &val - } - - // Enable profiling by default in the scheduler - if obj.EnableProfiling == nil { - enableProfiling := true - obj.EnableProfiling = &enableProfiling - } - - // Enable contention profiling by default if profiling is enabled - if *obj.EnableProfiling && obj.EnableContentionProfiling == nil { - enableContentionProfiling := true - obj.EnableContentionProfiling = &enableContentionProfiling - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/doc.go deleted file mode 100644 index 44518561fdd..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/doc.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2018 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. -*/ - -// +k8s:deepcopy-gen=package -// +k8s:conversion-gen=k8s.io/kubernetes/pkg/scheduler/apis/config -// +k8s:conversion-gen-external-types=k8s.io/kube-scheduler/config/v1alpha1 -// +k8s:defaulter-gen=TypeMeta -// +k8s:defaulter-gen-input=../../../../../vendor/k8s.io/kube-scheduler/config/v1alpha1 -// +groupName=kubescheduler.config.k8s.io - -package v1alpha1 // import "k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1" diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index 1bd3b1a3efb..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,624 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - unsafe "unsafe" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1" - v1alpha1 "k8s.io/kube-scheduler/config/v1alpha1" - config "k8s.io/kubernetes/pkg/scheduler/apis/config" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*v1alpha1.Plugin)(nil), (*config.Plugin)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_Plugin_To_config_Plugin(a.(*v1alpha1.Plugin), b.(*config.Plugin), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.Plugin)(nil), (*v1alpha1.Plugin)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_Plugin_To_v1alpha1_Plugin(a.(*config.Plugin), b.(*v1alpha1.Plugin), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.PluginConfig)(nil), (*config.PluginConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_PluginConfig_To_config_PluginConfig(a.(*v1alpha1.PluginConfig), b.(*config.PluginConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.PluginConfig)(nil), (*v1alpha1.PluginConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_PluginConfig_To_v1alpha1_PluginConfig(a.(*config.PluginConfig), b.(*v1alpha1.PluginConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.PluginSet)(nil), (*config.PluginSet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_PluginSet_To_config_PluginSet(a.(*v1alpha1.PluginSet), b.(*config.PluginSet), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.PluginSet)(nil), (*v1alpha1.PluginSet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_PluginSet_To_v1alpha1_PluginSet(a.(*config.PluginSet), b.(*v1alpha1.PluginSet), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.SchedulerAlgorithmSource)(nil), (*config.SchedulerAlgorithmSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_SchedulerAlgorithmSource_To_config_SchedulerAlgorithmSource(a.(*v1alpha1.SchedulerAlgorithmSource), b.(*config.SchedulerAlgorithmSource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.SchedulerAlgorithmSource)(nil), (*v1alpha1.SchedulerAlgorithmSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_SchedulerAlgorithmSource_To_v1alpha1_SchedulerAlgorithmSource(a.(*config.SchedulerAlgorithmSource), b.(*v1alpha1.SchedulerAlgorithmSource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.SchedulerPolicyConfigMapSource)(nil), (*config.SchedulerPolicyConfigMapSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_SchedulerPolicyConfigMapSource_To_config_SchedulerPolicyConfigMapSource(a.(*v1alpha1.SchedulerPolicyConfigMapSource), b.(*config.SchedulerPolicyConfigMapSource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.SchedulerPolicyConfigMapSource)(nil), (*v1alpha1.SchedulerPolicyConfigMapSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_SchedulerPolicyConfigMapSource_To_v1alpha1_SchedulerPolicyConfigMapSource(a.(*config.SchedulerPolicyConfigMapSource), b.(*v1alpha1.SchedulerPolicyConfigMapSource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.SchedulerPolicyFileSource)(nil), (*config.SchedulerPolicyFileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_SchedulerPolicyFileSource_To_config_SchedulerPolicyFileSource(a.(*v1alpha1.SchedulerPolicyFileSource), b.(*config.SchedulerPolicyFileSource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.SchedulerPolicyFileSource)(nil), (*v1alpha1.SchedulerPolicyFileSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_SchedulerPolicyFileSource_To_v1alpha1_SchedulerPolicyFileSource(a.(*config.SchedulerPolicyFileSource), b.(*v1alpha1.SchedulerPolicyFileSource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha1.SchedulerPolicySource)(nil), (*config.SchedulerPolicySource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_SchedulerPolicySource_To_config_SchedulerPolicySource(a.(*v1alpha1.SchedulerPolicySource), b.(*config.SchedulerPolicySource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.SchedulerPolicySource)(nil), (*v1alpha1.SchedulerPolicySource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_SchedulerPolicySource_To_v1alpha1_SchedulerPolicySource(a.(*config.SchedulerPolicySource), b.(*v1alpha1.SchedulerPolicySource), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*config.KubeSchedulerConfiguration)(nil), (*v1alpha1.KubeSchedulerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(a.(*config.KubeSchedulerConfiguration), b.(*v1alpha1.KubeSchedulerConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*config.KubeSchedulerLeaderElectionConfiguration)(nil), (*v1alpha1.KubeSchedulerLeaderElectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha1_KubeSchedulerLeaderElectionConfiguration(a.(*config.KubeSchedulerLeaderElectionConfiguration), b.(*v1alpha1.KubeSchedulerLeaderElectionConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*config.Plugins)(nil), (*v1alpha1.Plugins)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_Plugins_To_v1alpha1_Plugins(a.(*config.Plugins), b.(*v1alpha1.Plugins), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1alpha1.KubeSchedulerConfiguration)(nil), (*config.KubeSchedulerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(a.(*v1alpha1.KubeSchedulerConfiguration), b.(*config.KubeSchedulerConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1alpha1.KubeSchedulerLeaderElectionConfiguration)(nil), (*config.KubeSchedulerLeaderElectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration(a.(*v1alpha1.KubeSchedulerLeaderElectionConfiguration), b.(*config.KubeSchedulerLeaderElectionConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1alpha1.Plugins)(nil), (*config.Plugins)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_Plugins_To_config_Plugins(a.(*v1alpha1.Plugins), b.(*config.Plugins), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(in *v1alpha1.KubeSchedulerConfiguration, out *config.KubeSchedulerConfiguration, s conversion.Scope) error { - // WARNING: in.SchedulerName requires manual conversion: does not exist in peer-type - if err := Convert_v1alpha1_SchedulerAlgorithmSource_To_config_SchedulerAlgorithmSource(&in.AlgorithmSource, &out.AlgorithmSource, s); err != nil { - return err - } - // WARNING: in.HardPodAffinitySymmetricWeight requires manual conversion: does not exist in peer-type - if err := Convert_v1alpha1_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil { - return err - } - if err := componentbaseconfigv1alpha1.Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(&in.ClientConnection, &out.ClientConnection, s); err != nil { - return err - } - if err := v1.Convert_Pointer_string_To_string(&in.HealthzBindAddress, &out.HealthzBindAddress, s); err != nil { - return err - } - if err := v1.Convert_Pointer_string_To_string(&in.MetricsBindAddress, &out.MetricsBindAddress, s); err != nil { - return err - } - if err := componentbaseconfigv1alpha1.Convert_v1alpha1_DebuggingConfiguration_To_config_DebuggingConfiguration(&in.DebuggingConfiguration, &out.DebuggingConfiguration, s); err != nil { - return err - } - if err := v1.Convert_Pointer_bool_To_bool(&in.DisablePreemption, &out.DisablePreemption, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int32_To_int32(&in.PercentageOfNodesToScore, &out.PercentageOfNodesToScore, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int64_To_int64(&in.BindTimeoutSeconds, &out.BindTimeoutSeconds, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int64_To_int64(&in.PodInitialBackoffSeconds, &out.PodInitialBackoffSeconds, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int64_To_int64(&in.PodMaxBackoffSeconds, &out.PodMaxBackoffSeconds, s); err != nil { - return err - } - // WARNING: in.Plugins requires manual conversion: does not exist in peer-type - // WARNING: in.PluginConfig requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_config_KubeSchedulerConfiguration_To_v1alpha1_KubeSchedulerConfiguration(in *config.KubeSchedulerConfiguration, out *v1alpha1.KubeSchedulerConfiguration, s conversion.Scope) error { - if err := Convert_config_SchedulerAlgorithmSource_To_v1alpha1_SchedulerAlgorithmSource(&in.AlgorithmSource, &out.AlgorithmSource, s); err != nil { - return err - } - if err := Convert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha1_KubeSchedulerLeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil { - return err - } - if err := componentbaseconfigv1alpha1.Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(&in.ClientConnection, &out.ClientConnection, s); err != nil { - return err - } - if err := v1.Convert_string_To_Pointer_string(&in.HealthzBindAddress, &out.HealthzBindAddress, s); err != nil { - return err - } - if err := v1.Convert_string_To_Pointer_string(&in.MetricsBindAddress, &out.MetricsBindAddress, s); err != nil { - return err - } - if err := componentbaseconfigv1alpha1.Convert_config_DebuggingConfiguration_To_v1alpha1_DebuggingConfiguration(&in.DebuggingConfiguration, &out.DebuggingConfiguration, s); err != nil { - return err - } - if err := v1.Convert_bool_To_Pointer_bool(&in.DisablePreemption, &out.DisablePreemption, s); err != nil { - return err - } - if err := v1.Convert_int32_To_Pointer_int32(&in.PercentageOfNodesToScore, &out.PercentageOfNodesToScore, s); err != nil { - return err - } - if err := v1.Convert_int64_To_Pointer_int64(&in.BindTimeoutSeconds, &out.BindTimeoutSeconds, s); err != nil { - return err - } - if err := v1.Convert_int64_To_Pointer_int64(&in.PodInitialBackoffSeconds, &out.PodInitialBackoffSeconds, s); err != nil { - return err - } - if err := v1.Convert_int64_To_Pointer_int64(&in.PodMaxBackoffSeconds, &out.PodMaxBackoffSeconds, s); err != nil { - return err - } - // WARNING: in.Profiles requires manual conversion: does not exist in peer-type - // WARNING: in.Extenders requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha1_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration(in *v1alpha1.KubeSchedulerLeaderElectionConfiguration, out *config.KubeSchedulerLeaderElectionConfiguration, s conversion.Scope) error { - if err := componentbaseconfigv1alpha1.Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(&in.LeaderElectionConfiguration, &out.LeaderElectionConfiguration, s); err != nil { - return err - } - // WARNING: in.LockObjectNamespace requires manual conversion: does not exist in peer-type - // WARNING: in.LockObjectName requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha1_KubeSchedulerLeaderElectionConfiguration(in *config.KubeSchedulerLeaderElectionConfiguration, out *v1alpha1.KubeSchedulerLeaderElectionConfiguration, s conversion.Scope) error { - if err := componentbaseconfigv1alpha1.Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(&in.LeaderElectionConfiguration, &out.LeaderElectionConfiguration, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_Plugin_To_config_Plugin(in *v1alpha1.Plugin, out *config.Plugin, s conversion.Scope) error { - out.Name = in.Name - if err := v1.Convert_Pointer_int32_To_int32(&in.Weight, &out.Weight, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_Plugin_To_config_Plugin is an autogenerated conversion function. -func Convert_v1alpha1_Plugin_To_config_Plugin(in *v1alpha1.Plugin, out *config.Plugin, s conversion.Scope) error { - return autoConvert_v1alpha1_Plugin_To_config_Plugin(in, out, s) -} - -func autoConvert_config_Plugin_To_v1alpha1_Plugin(in *config.Plugin, out *v1alpha1.Plugin, s conversion.Scope) error { - out.Name = in.Name - if err := v1.Convert_int32_To_Pointer_int32(&in.Weight, &out.Weight, s); err != nil { - return err - } - return nil -} - -// Convert_config_Plugin_To_v1alpha1_Plugin is an autogenerated conversion function. -func Convert_config_Plugin_To_v1alpha1_Plugin(in *config.Plugin, out *v1alpha1.Plugin, s conversion.Scope) error { - return autoConvert_config_Plugin_To_v1alpha1_Plugin(in, out, s) -} - -func autoConvert_v1alpha1_PluginConfig_To_config_PluginConfig(in *v1alpha1.PluginConfig, out *config.PluginConfig, s conversion.Scope) error { - out.Name = in.Name - out.Args = in.Args - return nil -} - -// Convert_v1alpha1_PluginConfig_To_config_PluginConfig is an autogenerated conversion function. -func Convert_v1alpha1_PluginConfig_To_config_PluginConfig(in *v1alpha1.PluginConfig, out *config.PluginConfig, s conversion.Scope) error { - return autoConvert_v1alpha1_PluginConfig_To_config_PluginConfig(in, out, s) -} - -func autoConvert_config_PluginConfig_To_v1alpha1_PluginConfig(in *config.PluginConfig, out *v1alpha1.PluginConfig, s conversion.Scope) error { - out.Name = in.Name - out.Args = in.Args - return nil -} - -// Convert_config_PluginConfig_To_v1alpha1_PluginConfig is an autogenerated conversion function. -func Convert_config_PluginConfig_To_v1alpha1_PluginConfig(in *config.PluginConfig, out *v1alpha1.PluginConfig, s conversion.Scope) error { - return autoConvert_config_PluginConfig_To_v1alpha1_PluginConfig(in, out, s) -} - -func autoConvert_v1alpha1_PluginSet_To_config_PluginSet(in *v1alpha1.PluginSet, out *config.PluginSet, s conversion.Scope) error { - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]config.Plugin, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_Plugin_To_config_Plugin(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Enabled = nil - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]config.Plugin, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_Plugin_To_config_Plugin(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Disabled = nil - } - return nil -} - -// Convert_v1alpha1_PluginSet_To_config_PluginSet is an autogenerated conversion function. -func Convert_v1alpha1_PluginSet_To_config_PluginSet(in *v1alpha1.PluginSet, out *config.PluginSet, s conversion.Scope) error { - return autoConvert_v1alpha1_PluginSet_To_config_PluginSet(in, out, s) -} - -func autoConvert_config_PluginSet_To_v1alpha1_PluginSet(in *config.PluginSet, out *v1alpha1.PluginSet, s conversion.Scope) error { - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]v1alpha1.Plugin, len(*in)) - for i := range *in { - if err := Convert_config_Plugin_To_v1alpha1_Plugin(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Enabled = nil - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]v1alpha1.Plugin, len(*in)) - for i := range *in { - if err := Convert_config_Plugin_To_v1alpha1_Plugin(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Disabled = nil - } - return nil -} - -// Convert_config_PluginSet_To_v1alpha1_PluginSet is an autogenerated conversion function. -func Convert_config_PluginSet_To_v1alpha1_PluginSet(in *config.PluginSet, out *v1alpha1.PluginSet, s conversion.Scope) error { - return autoConvert_config_PluginSet_To_v1alpha1_PluginSet(in, out, s) -} - -func autoConvert_v1alpha1_Plugins_To_config_Plugins(in *v1alpha1.Plugins, out *config.Plugins, s conversion.Scope) error { - if in.QueueSort != nil { - in, out := &in.QueueSort, &out.QueueSort - *out = new(config.PluginSet) - if err := Convert_v1alpha1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.QueueSort = nil - } - if in.PreFilter != nil { - in, out := &in.PreFilter, &out.PreFilter - *out = new(config.PluginSet) - if err := Convert_v1alpha1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PreFilter = nil - } - if in.Filter != nil { - in, out := &in.Filter, &out.Filter - *out = new(config.PluginSet) - if err := Convert_v1alpha1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Filter = nil - } - // WARNING: in.PostFilter requires manual conversion: does not exist in peer-type - if in.Score != nil { - in, out := &in.Score, &out.Score - *out = new(config.PluginSet) - if err := Convert_v1alpha1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Score = nil - } - if in.Reserve != nil { - in, out := &in.Reserve, &out.Reserve - *out = new(config.PluginSet) - if err := Convert_v1alpha1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Reserve = nil - } - if in.Permit != nil { - in, out := &in.Permit, &out.Permit - *out = new(config.PluginSet) - if err := Convert_v1alpha1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Permit = nil - } - if in.PreBind != nil { - in, out := &in.PreBind, &out.PreBind - *out = new(config.PluginSet) - if err := Convert_v1alpha1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PreBind = nil - } - if in.Bind != nil { - in, out := &in.Bind, &out.Bind - *out = new(config.PluginSet) - if err := Convert_v1alpha1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Bind = nil - } - if in.PostBind != nil { - in, out := &in.PostBind, &out.PostBind - *out = new(config.PluginSet) - if err := Convert_v1alpha1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PostBind = nil - } - if in.Unreserve != nil { - in, out := &in.Unreserve, &out.Unreserve - *out = new(config.PluginSet) - if err := Convert_v1alpha1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Unreserve = nil - } - return nil -} - -func autoConvert_config_Plugins_To_v1alpha1_Plugins(in *config.Plugins, out *v1alpha1.Plugins, s conversion.Scope) error { - if in.QueueSort != nil { - in, out := &in.QueueSort, &out.QueueSort - *out = new(v1alpha1.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha1_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.QueueSort = nil - } - if in.PreFilter != nil { - in, out := &in.PreFilter, &out.PreFilter - *out = new(v1alpha1.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha1_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PreFilter = nil - } - if in.Filter != nil { - in, out := &in.Filter, &out.Filter - *out = new(v1alpha1.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha1_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Filter = nil - } - // WARNING: in.PreScore requires manual conversion: does not exist in peer-type - if in.Score != nil { - in, out := &in.Score, &out.Score - *out = new(v1alpha1.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha1_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Score = nil - } - if in.Reserve != nil { - in, out := &in.Reserve, &out.Reserve - *out = new(v1alpha1.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha1_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Reserve = nil - } - if in.Permit != nil { - in, out := &in.Permit, &out.Permit - *out = new(v1alpha1.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha1_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Permit = nil - } - if in.PreBind != nil { - in, out := &in.PreBind, &out.PreBind - *out = new(v1alpha1.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha1_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PreBind = nil - } - if in.Bind != nil { - in, out := &in.Bind, &out.Bind - *out = new(v1alpha1.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha1_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Bind = nil - } - if in.PostBind != nil { - in, out := &in.PostBind, &out.PostBind - *out = new(v1alpha1.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha1_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PostBind = nil - } - if in.Unreserve != nil { - in, out := &in.Unreserve, &out.Unreserve - *out = new(v1alpha1.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha1_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Unreserve = nil - } - return nil -} - -func autoConvert_v1alpha1_SchedulerAlgorithmSource_To_config_SchedulerAlgorithmSource(in *v1alpha1.SchedulerAlgorithmSource, out *config.SchedulerAlgorithmSource, s conversion.Scope) error { - out.Policy = (*config.SchedulerPolicySource)(unsafe.Pointer(in.Policy)) - out.Provider = (*string)(unsafe.Pointer(in.Provider)) - return nil -} - -// Convert_v1alpha1_SchedulerAlgorithmSource_To_config_SchedulerAlgorithmSource is an autogenerated conversion function. -func Convert_v1alpha1_SchedulerAlgorithmSource_To_config_SchedulerAlgorithmSource(in *v1alpha1.SchedulerAlgorithmSource, out *config.SchedulerAlgorithmSource, s conversion.Scope) error { - return autoConvert_v1alpha1_SchedulerAlgorithmSource_To_config_SchedulerAlgorithmSource(in, out, s) -} - -func autoConvert_config_SchedulerAlgorithmSource_To_v1alpha1_SchedulerAlgorithmSource(in *config.SchedulerAlgorithmSource, out *v1alpha1.SchedulerAlgorithmSource, s conversion.Scope) error { - out.Policy = (*v1alpha1.SchedulerPolicySource)(unsafe.Pointer(in.Policy)) - out.Provider = (*string)(unsafe.Pointer(in.Provider)) - return nil -} - -// Convert_config_SchedulerAlgorithmSource_To_v1alpha1_SchedulerAlgorithmSource is an autogenerated conversion function. -func Convert_config_SchedulerAlgorithmSource_To_v1alpha1_SchedulerAlgorithmSource(in *config.SchedulerAlgorithmSource, out *v1alpha1.SchedulerAlgorithmSource, s conversion.Scope) error { - return autoConvert_config_SchedulerAlgorithmSource_To_v1alpha1_SchedulerAlgorithmSource(in, out, s) -} - -func autoConvert_v1alpha1_SchedulerPolicyConfigMapSource_To_config_SchedulerPolicyConfigMapSource(in *v1alpha1.SchedulerPolicyConfigMapSource, out *config.SchedulerPolicyConfigMapSource, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - return nil -} - -// Convert_v1alpha1_SchedulerPolicyConfigMapSource_To_config_SchedulerPolicyConfigMapSource is an autogenerated conversion function. -func Convert_v1alpha1_SchedulerPolicyConfigMapSource_To_config_SchedulerPolicyConfigMapSource(in *v1alpha1.SchedulerPolicyConfigMapSource, out *config.SchedulerPolicyConfigMapSource, s conversion.Scope) error { - return autoConvert_v1alpha1_SchedulerPolicyConfigMapSource_To_config_SchedulerPolicyConfigMapSource(in, out, s) -} - -func autoConvert_config_SchedulerPolicyConfigMapSource_To_v1alpha1_SchedulerPolicyConfigMapSource(in *config.SchedulerPolicyConfigMapSource, out *v1alpha1.SchedulerPolicyConfigMapSource, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - return nil -} - -// Convert_config_SchedulerPolicyConfigMapSource_To_v1alpha1_SchedulerPolicyConfigMapSource is an autogenerated conversion function. -func Convert_config_SchedulerPolicyConfigMapSource_To_v1alpha1_SchedulerPolicyConfigMapSource(in *config.SchedulerPolicyConfigMapSource, out *v1alpha1.SchedulerPolicyConfigMapSource, s conversion.Scope) error { - return autoConvert_config_SchedulerPolicyConfigMapSource_To_v1alpha1_SchedulerPolicyConfigMapSource(in, out, s) -} - -func autoConvert_v1alpha1_SchedulerPolicyFileSource_To_config_SchedulerPolicyFileSource(in *v1alpha1.SchedulerPolicyFileSource, out *config.SchedulerPolicyFileSource, s conversion.Scope) error { - out.Path = in.Path - return nil -} - -// Convert_v1alpha1_SchedulerPolicyFileSource_To_config_SchedulerPolicyFileSource is an autogenerated conversion function. -func Convert_v1alpha1_SchedulerPolicyFileSource_To_config_SchedulerPolicyFileSource(in *v1alpha1.SchedulerPolicyFileSource, out *config.SchedulerPolicyFileSource, s conversion.Scope) error { - return autoConvert_v1alpha1_SchedulerPolicyFileSource_To_config_SchedulerPolicyFileSource(in, out, s) -} - -func autoConvert_config_SchedulerPolicyFileSource_To_v1alpha1_SchedulerPolicyFileSource(in *config.SchedulerPolicyFileSource, out *v1alpha1.SchedulerPolicyFileSource, s conversion.Scope) error { - out.Path = in.Path - return nil -} - -// Convert_config_SchedulerPolicyFileSource_To_v1alpha1_SchedulerPolicyFileSource is an autogenerated conversion function. -func Convert_config_SchedulerPolicyFileSource_To_v1alpha1_SchedulerPolicyFileSource(in *config.SchedulerPolicyFileSource, out *v1alpha1.SchedulerPolicyFileSource, s conversion.Scope) error { - return autoConvert_config_SchedulerPolicyFileSource_To_v1alpha1_SchedulerPolicyFileSource(in, out, s) -} - -func autoConvert_v1alpha1_SchedulerPolicySource_To_config_SchedulerPolicySource(in *v1alpha1.SchedulerPolicySource, out *config.SchedulerPolicySource, s conversion.Scope) error { - out.File = (*config.SchedulerPolicyFileSource)(unsafe.Pointer(in.File)) - out.ConfigMap = (*config.SchedulerPolicyConfigMapSource)(unsafe.Pointer(in.ConfigMap)) - return nil -} - -// Convert_v1alpha1_SchedulerPolicySource_To_config_SchedulerPolicySource is an autogenerated conversion function. -func Convert_v1alpha1_SchedulerPolicySource_To_config_SchedulerPolicySource(in *v1alpha1.SchedulerPolicySource, out *config.SchedulerPolicySource, s conversion.Scope) error { - return autoConvert_v1alpha1_SchedulerPolicySource_To_config_SchedulerPolicySource(in, out, s) -} - -func autoConvert_config_SchedulerPolicySource_To_v1alpha1_SchedulerPolicySource(in *config.SchedulerPolicySource, out *v1alpha1.SchedulerPolicySource, s conversion.Scope) error { - out.File = (*v1alpha1.SchedulerPolicyFileSource)(unsafe.Pointer(in.File)) - out.ConfigMap = (*v1alpha1.SchedulerPolicyConfigMapSource)(unsafe.Pointer(in.ConfigMap)) - return nil -} - -// Convert_config_SchedulerPolicySource_To_v1alpha1_SchedulerPolicySource is an autogenerated conversion function. -func Convert_config_SchedulerPolicySource_To_v1alpha1_SchedulerPolicySource(in *config.SchedulerPolicySource, out *v1alpha1.SchedulerPolicySource, s conversion.Scope) error { - return autoConvert_config_SchedulerPolicySource_To_v1alpha1_SchedulerPolicySource(in, out, s) -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/conversion.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/conversion.go deleted file mode 100644 index 4d65e6ea672..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/conversion.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2020 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 v1alpha2 - -import ( - conversion "k8s.io/apimachinery/pkg/conversion" - v1alpha2 "k8s.io/kube-scheduler/config/v1alpha2" - "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/utils/pointer" -) - -func Convert_v1alpha2_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(in *v1alpha2.KubeSchedulerConfiguration, out *config.KubeSchedulerConfiguration, s conversion.Scope) error { - if err := autoConvert_v1alpha2_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(in, out, s); err != nil { - return err - } - out.AlgorithmSource.Provider = pointer.StringPtr(v1alpha2.SchedulerDefaultProviderName) - return nil -} - -func Convert_config_KubeSchedulerConfiguration_To_v1alpha2_KubeSchedulerConfiguration(in *config.KubeSchedulerConfiguration, out *v1alpha2.KubeSchedulerConfiguration, s conversion.Scope) error { - return autoConvert_config_KubeSchedulerConfiguration_To_v1alpha2_KubeSchedulerConfiguration(in, out, s) -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/zz_generated.conversion.go deleted file mode 100644 index d5c4ef58133..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/zz_generated.conversion.go +++ /dev/null @@ -1,600 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - unsafe "unsafe" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - v1alpha1 "k8s.io/component-base/config/v1alpha1" - configv1 "k8s.io/kube-scheduler/config/v1" - v1alpha2 "k8s.io/kube-scheduler/config/v1alpha2" - config "k8s.io/kubernetes/pkg/scheduler/apis/config" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*v1alpha2.KubeSchedulerLeaderElectionConfiguration)(nil), (*config.KubeSchedulerLeaderElectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration(a.(*v1alpha2.KubeSchedulerLeaderElectionConfiguration), b.(*config.KubeSchedulerLeaderElectionConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.KubeSchedulerLeaderElectionConfiguration)(nil), (*v1alpha2.KubeSchedulerLeaderElectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha2_KubeSchedulerLeaderElectionConfiguration(a.(*config.KubeSchedulerLeaderElectionConfiguration), b.(*v1alpha2.KubeSchedulerLeaderElectionConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.KubeSchedulerProfile)(nil), (*config.KubeSchedulerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_KubeSchedulerProfile_To_config_KubeSchedulerProfile(a.(*v1alpha2.KubeSchedulerProfile), b.(*config.KubeSchedulerProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.KubeSchedulerProfile)(nil), (*v1alpha2.KubeSchedulerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_KubeSchedulerProfile_To_v1alpha2_KubeSchedulerProfile(a.(*config.KubeSchedulerProfile), b.(*v1alpha2.KubeSchedulerProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.Plugin)(nil), (*config.Plugin)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_Plugin_To_config_Plugin(a.(*v1alpha2.Plugin), b.(*config.Plugin), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.Plugin)(nil), (*v1alpha2.Plugin)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_Plugin_To_v1alpha2_Plugin(a.(*config.Plugin), b.(*v1alpha2.Plugin), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.PluginConfig)(nil), (*config.PluginConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_PluginConfig_To_config_PluginConfig(a.(*v1alpha2.PluginConfig), b.(*config.PluginConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.PluginConfig)(nil), (*v1alpha2.PluginConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_PluginConfig_To_v1alpha2_PluginConfig(a.(*config.PluginConfig), b.(*v1alpha2.PluginConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.PluginSet)(nil), (*config.PluginSet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_PluginSet_To_config_PluginSet(a.(*v1alpha2.PluginSet), b.(*config.PluginSet), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.PluginSet)(nil), (*v1alpha2.PluginSet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_PluginSet_To_v1alpha2_PluginSet(a.(*config.PluginSet), b.(*v1alpha2.PluginSet), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.Plugins)(nil), (*config.Plugins)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_Plugins_To_config_Plugins(a.(*v1alpha2.Plugins), b.(*config.Plugins), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.Plugins)(nil), (*v1alpha2.Plugins)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_Plugins_To_v1alpha2_Plugins(a.(*config.Plugins), b.(*v1alpha2.Plugins), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*config.KubeSchedulerConfiguration)(nil), (*v1alpha2.KubeSchedulerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_KubeSchedulerConfiguration_To_v1alpha2_KubeSchedulerConfiguration(a.(*config.KubeSchedulerConfiguration), b.(*v1alpha2.KubeSchedulerConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1alpha2.KubeSchedulerConfiguration)(nil), (*config.KubeSchedulerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(a.(*v1alpha2.KubeSchedulerConfiguration), b.(*config.KubeSchedulerConfiguration), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha2_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(in *v1alpha2.KubeSchedulerConfiguration, out *config.KubeSchedulerConfiguration, s conversion.Scope) error { - if err := Convert_v1alpha2_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil { - return err - } - if err := v1alpha1.Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(&in.ClientConnection, &out.ClientConnection, s); err != nil { - return err - } - if err := v1.Convert_Pointer_string_To_string(&in.HealthzBindAddress, &out.HealthzBindAddress, s); err != nil { - return err - } - if err := v1.Convert_Pointer_string_To_string(&in.MetricsBindAddress, &out.MetricsBindAddress, s); err != nil { - return err - } - if err := v1alpha1.Convert_v1alpha1_DebuggingConfiguration_To_config_DebuggingConfiguration(&in.DebuggingConfiguration, &out.DebuggingConfiguration, s); err != nil { - return err - } - if err := v1.Convert_Pointer_bool_To_bool(&in.DisablePreemption, &out.DisablePreemption, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int32_To_int32(&in.PercentageOfNodesToScore, &out.PercentageOfNodesToScore, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int64_To_int64(&in.BindTimeoutSeconds, &out.BindTimeoutSeconds, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int64_To_int64(&in.PodInitialBackoffSeconds, &out.PodInitialBackoffSeconds, s); err != nil { - return err - } - if err := v1.Convert_Pointer_int64_To_int64(&in.PodMaxBackoffSeconds, &out.PodMaxBackoffSeconds, s); err != nil { - return err - } - if in.Profiles != nil { - in, out := &in.Profiles, &out.Profiles - *out = make([]config.KubeSchedulerProfile, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_KubeSchedulerProfile_To_config_KubeSchedulerProfile(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Profiles = nil - } - out.Extenders = *(*[]config.Extender)(unsafe.Pointer(&in.Extenders)) - return nil -} - -func autoConvert_config_KubeSchedulerConfiguration_To_v1alpha2_KubeSchedulerConfiguration(in *config.KubeSchedulerConfiguration, out *v1alpha2.KubeSchedulerConfiguration, s conversion.Scope) error { - // WARNING: in.AlgorithmSource requires manual conversion: does not exist in peer-type - if err := Convert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha2_KubeSchedulerLeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil { - return err - } - if err := v1alpha1.Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(&in.ClientConnection, &out.ClientConnection, s); err != nil { - return err - } - if err := v1.Convert_string_To_Pointer_string(&in.HealthzBindAddress, &out.HealthzBindAddress, s); err != nil { - return err - } - if err := v1.Convert_string_To_Pointer_string(&in.MetricsBindAddress, &out.MetricsBindAddress, s); err != nil { - return err - } - if err := v1alpha1.Convert_config_DebuggingConfiguration_To_v1alpha1_DebuggingConfiguration(&in.DebuggingConfiguration, &out.DebuggingConfiguration, s); err != nil { - return err - } - if err := v1.Convert_bool_To_Pointer_bool(&in.DisablePreemption, &out.DisablePreemption, s); err != nil { - return err - } - if err := v1.Convert_int32_To_Pointer_int32(&in.PercentageOfNodesToScore, &out.PercentageOfNodesToScore, s); err != nil { - return err - } - if err := v1.Convert_int64_To_Pointer_int64(&in.BindTimeoutSeconds, &out.BindTimeoutSeconds, s); err != nil { - return err - } - if err := v1.Convert_int64_To_Pointer_int64(&in.PodInitialBackoffSeconds, &out.PodInitialBackoffSeconds, s); err != nil { - return err - } - if err := v1.Convert_int64_To_Pointer_int64(&in.PodMaxBackoffSeconds, &out.PodMaxBackoffSeconds, s); err != nil { - return err - } - if in.Profiles != nil { - in, out := &in.Profiles, &out.Profiles - *out = make([]v1alpha2.KubeSchedulerProfile, len(*in)) - for i := range *in { - if err := Convert_config_KubeSchedulerProfile_To_v1alpha2_KubeSchedulerProfile(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Profiles = nil - } - out.Extenders = *(*[]configv1.Extender)(unsafe.Pointer(&in.Extenders)) - return nil -} - -func autoConvert_v1alpha2_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration(in *v1alpha2.KubeSchedulerLeaderElectionConfiguration, out *config.KubeSchedulerLeaderElectionConfiguration, s conversion.Scope) error { - if err := v1alpha1.Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(&in.LeaderElectionConfiguration, &out.LeaderElectionConfiguration, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration is an autogenerated conversion function. -func Convert_v1alpha2_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration(in *v1alpha2.KubeSchedulerLeaderElectionConfiguration, out *config.KubeSchedulerLeaderElectionConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha2_KubeSchedulerLeaderElectionConfiguration_To_config_KubeSchedulerLeaderElectionConfiguration(in, out, s) -} - -func autoConvert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha2_KubeSchedulerLeaderElectionConfiguration(in *config.KubeSchedulerLeaderElectionConfiguration, out *v1alpha2.KubeSchedulerLeaderElectionConfiguration, s conversion.Scope) error { - if err := v1alpha1.Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(&in.LeaderElectionConfiguration, &out.LeaderElectionConfiguration, s); err != nil { - return err - } - return nil -} - -// Convert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha2_KubeSchedulerLeaderElectionConfiguration is an autogenerated conversion function. -func Convert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha2_KubeSchedulerLeaderElectionConfiguration(in *config.KubeSchedulerLeaderElectionConfiguration, out *v1alpha2.KubeSchedulerLeaderElectionConfiguration, s conversion.Scope) error { - return autoConvert_config_KubeSchedulerLeaderElectionConfiguration_To_v1alpha2_KubeSchedulerLeaderElectionConfiguration(in, out, s) -} - -func autoConvert_v1alpha2_KubeSchedulerProfile_To_config_KubeSchedulerProfile(in *v1alpha2.KubeSchedulerProfile, out *config.KubeSchedulerProfile, s conversion.Scope) error { - if err := v1.Convert_Pointer_string_To_string(&in.SchedulerName, &out.SchedulerName, s); err != nil { - return err - } - if in.Plugins != nil { - in, out := &in.Plugins, &out.Plugins - *out = new(config.Plugins) - if err := Convert_v1alpha2_Plugins_To_config_Plugins(*in, *out, s); err != nil { - return err - } - } else { - out.Plugins = nil - } - out.PluginConfig = *(*[]config.PluginConfig)(unsafe.Pointer(&in.PluginConfig)) - return nil -} - -// Convert_v1alpha2_KubeSchedulerProfile_To_config_KubeSchedulerProfile is an autogenerated conversion function. -func Convert_v1alpha2_KubeSchedulerProfile_To_config_KubeSchedulerProfile(in *v1alpha2.KubeSchedulerProfile, out *config.KubeSchedulerProfile, s conversion.Scope) error { - return autoConvert_v1alpha2_KubeSchedulerProfile_To_config_KubeSchedulerProfile(in, out, s) -} - -func autoConvert_config_KubeSchedulerProfile_To_v1alpha2_KubeSchedulerProfile(in *config.KubeSchedulerProfile, out *v1alpha2.KubeSchedulerProfile, s conversion.Scope) error { - if err := v1.Convert_string_To_Pointer_string(&in.SchedulerName, &out.SchedulerName, s); err != nil { - return err - } - if in.Plugins != nil { - in, out := &in.Plugins, &out.Plugins - *out = new(v1alpha2.Plugins) - if err := Convert_config_Plugins_To_v1alpha2_Plugins(*in, *out, s); err != nil { - return err - } - } else { - out.Plugins = nil - } - out.PluginConfig = *(*[]v1alpha2.PluginConfig)(unsafe.Pointer(&in.PluginConfig)) - return nil -} - -// Convert_config_KubeSchedulerProfile_To_v1alpha2_KubeSchedulerProfile is an autogenerated conversion function. -func Convert_config_KubeSchedulerProfile_To_v1alpha2_KubeSchedulerProfile(in *config.KubeSchedulerProfile, out *v1alpha2.KubeSchedulerProfile, s conversion.Scope) error { - return autoConvert_config_KubeSchedulerProfile_To_v1alpha2_KubeSchedulerProfile(in, out, s) -} - -func autoConvert_v1alpha2_Plugin_To_config_Plugin(in *v1alpha2.Plugin, out *config.Plugin, s conversion.Scope) error { - out.Name = in.Name - if err := v1.Convert_Pointer_int32_To_int32(&in.Weight, &out.Weight, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_Plugin_To_config_Plugin is an autogenerated conversion function. -func Convert_v1alpha2_Plugin_To_config_Plugin(in *v1alpha2.Plugin, out *config.Plugin, s conversion.Scope) error { - return autoConvert_v1alpha2_Plugin_To_config_Plugin(in, out, s) -} - -func autoConvert_config_Plugin_To_v1alpha2_Plugin(in *config.Plugin, out *v1alpha2.Plugin, s conversion.Scope) error { - out.Name = in.Name - if err := v1.Convert_int32_To_Pointer_int32(&in.Weight, &out.Weight, s); err != nil { - return err - } - return nil -} - -// Convert_config_Plugin_To_v1alpha2_Plugin is an autogenerated conversion function. -func Convert_config_Plugin_To_v1alpha2_Plugin(in *config.Plugin, out *v1alpha2.Plugin, s conversion.Scope) error { - return autoConvert_config_Plugin_To_v1alpha2_Plugin(in, out, s) -} - -func autoConvert_v1alpha2_PluginConfig_To_config_PluginConfig(in *v1alpha2.PluginConfig, out *config.PluginConfig, s conversion.Scope) error { - out.Name = in.Name - out.Args = in.Args - return nil -} - -// Convert_v1alpha2_PluginConfig_To_config_PluginConfig is an autogenerated conversion function. -func Convert_v1alpha2_PluginConfig_To_config_PluginConfig(in *v1alpha2.PluginConfig, out *config.PluginConfig, s conversion.Scope) error { - return autoConvert_v1alpha2_PluginConfig_To_config_PluginConfig(in, out, s) -} - -func autoConvert_config_PluginConfig_To_v1alpha2_PluginConfig(in *config.PluginConfig, out *v1alpha2.PluginConfig, s conversion.Scope) error { - out.Name = in.Name - out.Args = in.Args - return nil -} - -// Convert_config_PluginConfig_To_v1alpha2_PluginConfig is an autogenerated conversion function. -func Convert_config_PluginConfig_To_v1alpha2_PluginConfig(in *config.PluginConfig, out *v1alpha2.PluginConfig, s conversion.Scope) error { - return autoConvert_config_PluginConfig_To_v1alpha2_PluginConfig(in, out, s) -} - -func autoConvert_v1alpha2_PluginSet_To_config_PluginSet(in *v1alpha2.PluginSet, out *config.PluginSet, s conversion.Scope) error { - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]config.Plugin, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_Plugin_To_config_Plugin(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Enabled = nil - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]config.Plugin, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_Plugin_To_config_Plugin(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Disabled = nil - } - return nil -} - -// Convert_v1alpha2_PluginSet_To_config_PluginSet is an autogenerated conversion function. -func Convert_v1alpha2_PluginSet_To_config_PluginSet(in *v1alpha2.PluginSet, out *config.PluginSet, s conversion.Scope) error { - return autoConvert_v1alpha2_PluginSet_To_config_PluginSet(in, out, s) -} - -func autoConvert_config_PluginSet_To_v1alpha2_PluginSet(in *config.PluginSet, out *v1alpha2.PluginSet, s conversion.Scope) error { - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]v1alpha2.Plugin, len(*in)) - for i := range *in { - if err := Convert_config_Plugin_To_v1alpha2_Plugin(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Enabled = nil - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]v1alpha2.Plugin, len(*in)) - for i := range *in { - if err := Convert_config_Plugin_To_v1alpha2_Plugin(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Disabled = nil - } - return nil -} - -// Convert_config_PluginSet_To_v1alpha2_PluginSet is an autogenerated conversion function. -func Convert_config_PluginSet_To_v1alpha2_PluginSet(in *config.PluginSet, out *v1alpha2.PluginSet, s conversion.Scope) error { - return autoConvert_config_PluginSet_To_v1alpha2_PluginSet(in, out, s) -} - -func autoConvert_v1alpha2_Plugins_To_config_Plugins(in *v1alpha2.Plugins, out *config.Plugins, s conversion.Scope) error { - if in.QueueSort != nil { - in, out := &in.QueueSort, &out.QueueSort - *out = new(config.PluginSet) - if err := Convert_v1alpha2_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.QueueSort = nil - } - if in.PreFilter != nil { - in, out := &in.PreFilter, &out.PreFilter - *out = new(config.PluginSet) - if err := Convert_v1alpha2_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PreFilter = nil - } - if in.Filter != nil { - in, out := &in.Filter, &out.Filter - *out = new(config.PluginSet) - if err := Convert_v1alpha2_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Filter = nil - } - if in.PreScore != nil { - in, out := &in.PreScore, &out.PreScore - *out = new(config.PluginSet) - if err := Convert_v1alpha2_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PreScore = nil - } - if in.Score != nil { - in, out := &in.Score, &out.Score - *out = new(config.PluginSet) - if err := Convert_v1alpha2_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Score = nil - } - if in.Reserve != nil { - in, out := &in.Reserve, &out.Reserve - *out = new(config.PluginSet) - if err := Convert_v1alpha2_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Reserve = nil - } - if in.Permit != nil { - in, out := &in.Permit, &out.Permit - *out = new(config.PluginSet) - if err := Convert_v1alpha2_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Permit = nil - } - if in.PreBind != nil { - in, out := &in.PreBind, &out.PreBind - *out = new(config.PluginSet) - if err := Convert_v1alpha2_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PreBind = nil - } - if in.Bind != nil { - in, out := &in.Bind, &out.Bind - *out = new(config.PluginSet) - if err := Convert_v1alpha2_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Bind = nil - } - if in.PostBind != nil { - in, out := &in.PostBind, &out.PostBind - *out = new(config.PluginSet) - if err := Convert_v1alpha2_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PostBind = nil - } - if in.Unreserve != nil { - in, out := &in.Unreserve, &out.Unreserve - *out = new(config.PluginSet) - if err := Convert_v1alpha2_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Unreserve = nil - } - return nil -} - -// Convert_v1alpha2_Plugins_To_config_Plugins is an autogenerated conversion function. -func Convert_v1alpha2_Plugins_To_config_Plugins(in *v1alpha2.Plugins, out *config.Plugins, s conversion.Scope) error { - return autoConvert_v1alpha2_Plugins_To_config_Plugins(in, out, s) -} - -func autoConvert_config_Plugins_To_v1alpha2_Plugins(in *config.Plugins, out *v1alpha2.Plugins, s conversion.Scope) error { - if in.QueueSort != nil { - in, out := &in.QueueSort, &out.QueueSort - *out = new(v1alpha2.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha2_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.QueueSort = nil - } - if in.PreFilter != nil { - in, out := &in.PreFilter, &out.PreFilter - *out = new(v1alpha2.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha2_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PreFilter = nil - } - if in.Filter != nil { - in, out := &in.Filter, &out.Filter - *out = new(v1alpha2.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha2_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Filter = nil - } - if in.PreScore != nil { - in, out := &in.PreScore, &out.PreScore - *out = new(v1alpha2.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha2_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PreScore = nil - } - if in.Score != nil { - in, out := &in.Score, &out.Score - *out = new(v1alpha2.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha2_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Score = nil - } - if in.Reserve != nil { - in, out := &in.Reserve, &out.Reserve - *out = new(v1alpha2.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha2_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Reserve = nil - } - if in.Permit != nil { - in, out := &in.Permit, &out.Permit - *out = new(v1alpha2.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha2_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Permit = nil - } - if in.PreBind != nil { - in, out := &in.PreBind, &out.PreBind - *out = new(v1alpha2.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha2_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PreBind = nil - } - if in.Bind != nil { - in, out := &in.Bind, &out.Bind - *out = new(v1alpha2.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha2_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Bind = nil - } - if in.PostBind != nil { - in, out := &in.PostBind, &out.PostBind - *out = new(v1alpha2.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha2_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.PostBind = nil - } - if in.Unreserve != nil { - in, out := &in.Unreserve, &out.Unreserve - *out = new(v1alpha2.PluginSet) - if err := Convert_config_PluginSet_To_v1alpha2_PluginSet(*in, *out, s); err != nil { - return err - } - } else { - out.Unreserve = nil - } - return nil -} - -// Convert_config_Plugins_To_v1alpha2_Plugins is an autogenerated conversion function. -func Convert_config_Plugins_To_v1alpha2_Plugins(in *config.Plugins, out *v1alpha2.Plugins, s conversion.Scope) error { - return autoConvert_config_Plugins_To_v1alpha2_Plugins(in, out, s) -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/BUILD similarity index 68% rename from vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/BUILD rename to vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/BUILD index c58b6c35ca6..47edd92fa12 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/BUILD @@ -11,18 +11,21 @@ go_library( "zz_generated.deepcopy.go", "zz_generated.defaults.go", ], - importpath = "k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2", + importpath = "k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1", visibility = ["//visibility:public"], deps = [ "//pkg/apis/core:go_default_library", - "//pkg/master/ports:go_default_library", + "//pkg/features:go_default_library", "//pkg/scheduler/apis/config:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/config/v1alpha1:go_default_library", "//staging/src/k8s.io/kube-scheduler/config/v1:go_default_library", - "//staging/src/k8s.io/kube-scheduler/config/v1alpha2:go_default_library", + "//staging/src/k8s.io/kube-scheduler/config/v1beta1:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ], ) @@ -35,11 +38,17 @@ go_test( ], embed = [":go_default_library"], deps = [ + "//pkg/features:go_default_library", "//pkg/scheduler/apis/config:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/config/v1alpha1:go_default_library", - "//staging/src/k8s.io/kube-scheduler/config/v1alpha2:go_default_library", + "//staging/src/k8s.io/component-base/featuregate:go_default_library", + "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", + "//staging/src/k8s.io/kube-scheduler/config/v1beta1:go_default_library", "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/conversion.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/conversion.go new file mode 100644 index 00000000000..bbdecd73241 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/conversion.go @@ -0,0 +1,109 @@ +/* +Copyright 2020 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 v1beta1 + +import ( + "fmt" + "sync" + + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/kube-scheduler/config/v1beta1" + "k8s.io/kubernetes/pkg/scheduler/apis/config" + "k8s.io/utils/pointer" +) + +var ( + // pluginArgConversionScheme is a scheme with internal and v1beta1 registered, + // used for defaulting/converting typed PluginConfig Args. + // Access via getPluginArgConversionScheme() + pluginArgConversionScheme *runtime.Scheme + initPluginArgConversionScheme sync.Once +) + +func getPluginArgConversionScheme() *runtime.Scheme { + initPluginArgConversionScheme.Do(func() { + // set up the scheme used for plugin arg conversion + pluginArgConversionScheme = runtime.NewScheme() + utilruntime.Must(AddToScheme(pluginArgConversionScheme)) + utilruntime.Must(config.AddToScheme(pluginArgConversionScheme)) + }) + return pluginArgConversionScheme +} + +func Convert_v1beta1_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(in *v1beta1.KubeSchedulerConfiguration, out *config.KubeSchedulerConfiguration, s conversion.Scope) error { + if err := autoConvert_v1beta1_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(in, out, s); err != nil { + return err + } + out.AlgorithmSource.Provider = pointer.StringPtr(v1beta1.SchedulerDefaultProviderName) + return convertToInternalPluginConfigArgs(out) +} + +// convertToInternalPluginConfigArgs converts PluginConfig#Args into internal +// types using a scheme, after applying defaults. +func convertToInternalPluginConfigArgs(out *config.KubeSchedulerConfiguration) error { + scheme := getPluginArgConversionScheme() + for i := range out.Profiles { + for j := range out.Profiles[i].PluginConfig { + args := out.Profiles[i].PluginConfig[j].Args + if args == nil { + continue + } + if _, isUnknown := args.(*runtime.Unknown); isUnknown { + continue + } + scheme.Default(args) + internalArgs, err := scheme.ConvertToVersion(args, config.SchemeGroupVersion) + if err != nil { + return fmt.Errorf("converting .Profiles[%d].PluginConfig[%d].Args into internal type: %w", i, j, err) + } + out.Profiles[i].PluginConfig[j].Args = internalArgs + } + } + return nil +} + +func Convert_config_KubeSchedulerConfiguration_To_v1beta1_KubeSchedulerConfiguration(in *config.KubeSchedulerConfiguration, out *v1beta1.KubeSchedulerConfiguration, s conversion.Scope) error { + if err := autoConvert_config_KubeSchedulerConfiguration_To_v1beta1_KubeSchedulerConfiguration(in, out, s); err != nil { + return err + } + return convertToExternalPluginConfigArgs(out) +} + +// convertToExternalPluginConfigArgs converts PluginConfig#Args into +// external (versioned) types using a scheme. +func convertToExternalPluginConfigArgs(out *v1beta1.KubeSchedulerConfiguration) error { + scheme := getPluginArgConversionScheme() + for i := range out.Profiles { + for j := range out.Profiles[i].PluginConfig { + args := out.Profiles[i].PluginConfig[j].Args + if args.Object == nil { + continue + } + if _, isUnknown := args.Object.(*runtime.Unknown); isUnknown { + continue + } + externalArgs, err := scheme.ConvertToVersion(args.Object, SchemeGroupVersion) + if err != nil { + return err + } + out.Profiles[i].PluginConfig[j].Args.Object = externalArgs + } + } + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/defaults.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/defaults.go similarity index 65% rename from vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/defaults.go rename to vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/defaults.go index 894214c57aa..ebf3b0f2353 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/defaults.go @@ -14,31 +14,38 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha2 +package v1beta1 import ( "net" "strconv" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/util/feature" componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1" - "k8s.io/kube-scheduler/config/v1alpha2" + "k8s.io/kube-scheduler/config/v1beta1" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/utils/pointer" // this package shouldn't really depend on other k8s.io/kubernetes code api "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/master/ports" ) +var defaultResourceSpec = []v1beta1.ResourceSpec{ + {Name: string(corev1.ResourceCPU), Weight: 1}, + {Name: string(corev1.ResourceMemory), Weight: 1}, +} + func addDefaultingFuncs(scheme *runtime.Scheme) error { return RegisterDefaults(scheme) } // SetDefaults_KubeSchedulerConfiguration sets additional defaults -func SetDefaults_KubeSchedulerConfiguration(obj *v1alpha2.KubeSchedulerConfiguration) { +func SetDefaults_KubeSchedulerConfiguration(obj *v1beta1.KubeSchedulerConfiguration) { if len(obj.Profiles) == 0 { - obj.Profiles = append(obj.Profiles, v1alpha2.KubeSchedulerProfile{}) + obj.Profiles = append(obj.Profiles, v1beta1.KubeSchedulerProfile{}) } // Only apply a default scheduler name when there is a single profile. // Validation will ensure that every profile has a non-empty unique name. @@ -51,7 +58,7 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1alpha2.KubeSchedulerConfigura // 2. If there is a value set, attempt to split it. If it's just a port (ie, ":1234"), default to 0.0.0.0 with that port // 3. If splitting the value fails, check if the value is even a valid IP. If so, use that with the default port. // Otherwise use the default bind address - defaultBindAddress := net.JoinHostPort("0.0.0.0", strconv.Itoa(ports.InsecureSchedulerPort)) + defaultBindAddress := net.JoinHostPort("0.0.0.0", strconv.Itoa(config.DefaultInsecureSchedulerPort)) if obj.HealthzBindAddress == nil { obj.HealthzBindAddress = &defaultBindAddress } else { @@ -65,7 +72,7 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1alpha2.KubeSchedulerConfigura // Something went wrong splitting the host/port, could just be a missing port so check if the // existing value is a valid IP address. If so, use that with the default scheduler port if host := net.ParseIP(*obj.HealthzBindAddress); host != nil { - hostPort := net.JoinHostPort(*obj.HealthzBindAddress, strconv.Itoa(ports.InsecureSchedulerPort)) + hostPort := net.JoinHostPort(*obj.HealthzBindAddress, strconv.Itoa(config.DefaultInsecureSchedulerPort)) obj.HealthzBindAddress = &hostPort } else { // TODO: in v1beta1 we should let this error instead of stomping with a default value @@ -87,7 +94,7 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1alpha2.KubeSchedulerConfigura // Something went wrong splitting the host/port, could just be a missing port so check if the // existing value is a valid IP address. If so, use that with the default scheduler port if host := net.ParseIP(*obj.MetricsBindAddress); host != nil { - hostPort := net.JoinHostPort(*obj.MetricsBindAddress, strconv.Itoa(ports.InsecureSchedulerPort)) + hostPort := net.JoinHostPort(*obj.MetricsBindAddress, strconv.Itoa(config.DefaultInsecureSchedulerPort)) obj.MetricsBindAddress = &hostPort } else { // TODO: in v1beta1 we should let this error instead of stomping with a default value @@ -96,11 +103,6 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1alpha2.KubeSchedulerConfigura } } - if obj.DisablePreemption == nil { - disablePreemption := false - obj.DisablePreemption = &disablePreemption - } - if obj.PercentageOfNodesToScore == nil { percentageOfNodesToScore := int32(config.DefaultPercentageOfNodesToScore) obj.PercentageOfNodesToScore = &percentageOfNodesToScore @@ -110,10 +112,10 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1alpha2.KubeSchedulerConfigura obj.LeaderElection.ResourceLock = "endpointsleases" } if len(obj.LeaderElection.ResourceNamespace) == 0 { - obj.LeaderElection.ResourceNamespace = v1alpha2.SchedulerDefaultLockObjectNamespace + obj.LeaderElection.ResourceNamespace = v1beta1.SchedulerDefaultLockObjectNamespace } if len(obj.LeaderElection.ResourceName) == 0 { - obj.LeaderElection.ResourceName = v1alpha2.SchedulerDefaultLockObjectName + obj.LeaderElection.ResourceName = v1beta1.SchedulerDefaultLockObjectName } if len(obj.ClientConnection.ContentType) == 0 { @@ -128,12 +130,7 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1alpha2.KubeSchedulerConfigura } // Use the default LeaderElectionConfiguration options - componentbaseconfigv1alpha1.RecommendedDefaultLeaderElectionConfiguration(&obj.LeaderElection.LeaderElectionConfiguration) - - if obj.BindTimeoutSeconds == nil { - val := int64(600) - obj.BindTimeoutSeconds = &val - } + componentbaseconfigv1alpha1.RecommendedDefaultLeaderElectionConfiguration(&obj.LeaderElection) if obj.PodInitialBackoffSeconds == nil { val := int64(1) @@ -157,3 +154,61 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1alpha2.KubeSchedulerConfigura obj.EnableContentionProfiling = &enableContentionProfiling } } + +func SetDefaults_InterPodAffinityArgs(obj *v1beta1.InterPodAffinityArgs) { + // Note that an object is created manually in cmd/kube-scheduler/app/options/deprecated.go + // DeprecatedOptions#ApplyTo. + // Update that object if a new default field is added here. + if obj.HardPodAffinityWeight == nil { + obj.HardPodAffinityWeight = pointer.Int32Ptr(1) + } +} + +func SetDefaults_NodeResourcesLeastAllocatedArgs(obj *v1beta1.NodeResourcesLeastAllocatedArgs) { + if len(obj.Resources) == 0 { + // If no resources specified, used the default set. + obj.Resources = append(obj.Resources, defaultResourceSpec...) + } +} + +func SetDefaults_NodeResourcesMostAllocatedArgs(obj *v1beta1.NodeResourcesMostAllocatedArgs) { + if len(obj.Resources) == 0 { + // If no resources specified, used the default set. + obj.Resources = append(obj.Resources, defaultResourceSpec...) + } +} + +func SetDefaults_RequestedToCapacityRatioArgs(obj *v1beta1.RequestedToCapacityRatioArgs) { + if len(obj.Resources) == 0 { + // If no resources specified, used the default set. + obj.Resources = append(obj.Resources, defaultResourceSpec...) + } +} + +func SetDefaults_VolumeBindingArgs(obj *v1beta1.VolumeBindingArgs) { + if obj.BindTimeoutSeconds == nil { + obj.BindTimeoutSeconds = pointer.Int64Ptr(600) + } +} + +func SetDefaults_PodTopologySpreadArgs(obj *v1beta1.PodTopologySpreadArgs) { + if !feature.DefaultFeatureGate.Enabled(features.DefaultPodTopologySpread) { + // When feature is disabled, the default spreading is done by legacy + // SelectorSpread plugin. + return + } + if obj.DefaultConstraints == nil { + obj.DefaultConstraints = []corev1.TopologySpreadConstraint{ + { + TopologyKey: corev1.LabelHostname, + WhenUnsatisfiable: corev1.ScheduleAnyway, + MaxSkew: 3, + }, + { + TopologyKey: corev1.LabelZoneFailureDomainStable, + WhenUnsatisfiable: corev1.ScheduleAnyway, + MaxSkew: 5, + }, + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/doc.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/doc.go similarity index 88% rename from vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/doc.go rename to vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/doc.go index 3af8038cb17..3b17e8f9ec1 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/doc.go @@ -16,9 +16,9 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:conversion-gen=k8s.io/kubernetes/pkg/scheduler/apis/config -// +k8s:conversion-gen-external-types=k8s.io/kube-scheduler/config/v1alpha2 +// +k8s:conversion-gen-external-types=k8s.io/kube-scheduler/config/v1beta1 // +k8s:defaulter-gen=TypeMeta -// +k8s:defaulter-gen-input=../../../../../vendor/k8s.io/kube-scheduler/config/v1alpha2 +// +k8s:defaulter-gen-input=../../../../../vendor/k8s.io/kube-scheduler/config/v1beta1 // +groupName=kubescheduler.config.k8s.io -package v1alpha2 // import "k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2" +package v1beta1 // import "k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1" diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/register.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/register.go similarity index 87% rename from vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/register.go rename to vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/register.go index 0799cd437cb..fa00e5e2a9c 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/register.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/register.go @@ -14,22 +14,22 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha2 +package v1beta1 import ( - "k8s.io/kube-scheduler/config/v1alpha2" + "k8s.io/kube-scheduler/config/v1beta1" ) // GroupName is the group name used in this package -const GroupName = v1alpha2.GroupName +const GroupName = v1beta1.GroupName // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = v1alpha2.SchemeGroupVersion +var SchemeGroupVersion = v1beta1.SchemeGroupVersion var ( // localSchemeBuilder extends the SchemeBuilder instance with the external types. In this package, // defaulting and conversion init funcs are registered as well. - localSchemeBuilder = &v1alpha2.SchemeBuilder + localSchemeBuilder = &v1beta1.SchemeBuilder // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = localSchemeBuilder.AddToScheme ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/zz_generated.conversion.go new file mode 100644 index 00000000000..b10fecad617 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/zz_generated.conversion.go @@ -0,0 +1,985 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1beta1 + +import ( + unsafe "unsafe" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + v1alpha1 "k8s.io/component-base/config/v1alpha1" + v1 "k8s.io/kube-scheduler/config/v1" + v1beta1 "k8s.io/kube-scheduler/config/v1beta1" + config "k8s.io/kubernetes/pkg/scheduler/apis/config" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1beta1.Extender)(nil), (*config.Extender)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Extender_To_config_Extender(a.(*v1beta1.Extender), b.(*config.Extender), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.Extender)(nil), (*v1beta1.Extender)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_Extender_To_v1beta1_Extender(a.(*config.Extender), b.(*v1beta1.Extender), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.InterPodAffinityArgs)(nil), (*config.InterPodAffinityArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_InterPodAffinityArgs_To_config_InterPodAffinityArgs(a.(*v1beta1.InterPodAffinityArgs), b.(*config.InterPodAffinityArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.InterPodAffinityArgs)(nil), (*v1beta1.InterPodAffinityArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_InterPodAffinityArgs_To_v1beta1_InterPodAffinityArgs(a.(*config.InterPodAffinityArgs), b.(*v1beta1.InterPodAffinityArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.KubeSchedulerProfile)(nil), (*config.KubeSchedulerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeSchedulerProfile_To_config_KubeSchedulerProfile(a.(*v1beta1.KubeSchedulerProfile), b.(*config.KubeSchedulerProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.KubeSchedulerProfile)(nil), (*v1beta1.KubeSchedulerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_KubeSchedulerProfile_To_v1beta1_KubeSchedulerProfile(a.(*config.KubeSchedulerProfile), b.(*v1beta1.KubeSchedulerProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.NodeLabelArgs)(nil), (*config.NodeLabelArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NodeLabelArgs_To_config_NodeLabelArgs(a.(*v1beta1.NodeLabelArgs), b.(*config.NodeLabelArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.NodeLabelArgs)(nil), (*v1beta1.NodeLabelArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_NodeLabelArgs_To_v1beta1_NodeLabelArgs(a.(*config.NodeLabelArgs), b.(*v1beta1.NodeLabelArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.NodeResourcesFitArgs)(nil), (*config.NodeResourcesFitArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NodeResourcesFitArgs_To_config_NodeResourcesFitArgs(a.(*v1beta1.NodeResourcesFitArgs), b.(*config.NodeResourcesFitArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.NodeResourcesFitArgs)(nil), (*v1beta1.NodeResourcesFitArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_NodeResourcesFitArgs_To_v1beta1_NodeResourcesFitArgs(a.(*config.NodeResourcesFitArgs), b.(*v1beta1.NodeResourcesFitArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.NodeResourcesLeastAllocatedArgs)(nil), (*config.NodeResourcesLeastAllocatedArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NodeResourcesLeastAllocatedArgs_To_config_NodeResourcesLeastAllocatedArgs(a.(*v1beta1.NodeResourcesLeastAllocatedArgs), b.(*config.NodeResourcesLeastAllocatedArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.NodeResourcesLeastAllocatedArgs)(nil), (*v1beta1.NodeResourcesLeastAllocatedArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_NodeResourcesLeastAllocatedArgs_To_v1beta1_NodeResourcesLeastAllocatedArgs(a.(*config.NodeResourcesLeastAllocatedArgs), b.(*v1beta1.NodeResourcesLeastAllocatedArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.NodeResourcesMostAllocatedArgs)(nil), (*config.NodeResourcesMostAllocatedArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_NodeResourcesMostAllocatedArgs_To_config_NodeResourcesMostAllocatedArgs(a.(*v1beta1.NodeResourcesMostAllocatedArgs), b.(*config.NodeResourcesMostAllocatedArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.NodeResourcesMostAllocatedArgs)(nil), (*v1beta1.NodeResourcesMostAllocatedArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_NodeResourcesMostAllocatedArgs_To_v1beta1_NodeResourcesMostAllocatedArgs(a.(*config.NodeResourcesMostAllocatedArgs), b.(*v1beta1.NodeResourcesMostAllocatedArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Plugin)(nil), (*config.Plugin)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Plugin_To_config_Plugin(a.(*v1beta1.Plugin), b.(*config.Plugin), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.Plugin)(nil), (*v1beta1.Plugin)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_Plugin_To_v1beta1_Plugin(a.(*config.Plugin), b.(*v1beta1.Plugin), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.PluginConfig)(nil), (*config.PluginConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PluginConfig_To_config_PluginConfig(a.(*v1beta1.PluginConfig), b.(*config.PluginConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.PluginConfig)(nil), (*v1beta1.PluginConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_PluginConfig_To_v1beta1_PluginConfig(a.(*config.PluginConfig), b.(*v1beta1.PluginConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.PluginSet)(nil), (*config.PluginSet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PluginSet_To_config_PluginSet(a.(*v1beta1.PluginSet), b.(*config.PluginSet), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.PluginSet)(nil), (*v1beta1.PluginSet)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_PluginSet_To_v1beta1_PluginSet(a.(*config.PluginSet), b.(*v1beta1.PluginSet), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.Plugins)(nil), (*config.Plugins)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Plugins_To_config_Plugins(a.(*v1beta1.Plugins), b.(*config.Plugins), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.Plugins)(nil), (*v1beta1.Plugins)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_Plugins_To_v1beta1_Plugins(a.(*config.Plugins), b.(*v1beta1.Plugins), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.PodTopologySpreadArgs)(nil), (*config.PodTopologySpreadArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PodTopologySpreadArgs_To_config_PodTopologySpreadArgs(a.(*v1beta1.PodTopologySpreadArgs), b.(*config.PodTopologySpreadArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.PodTopologySpreadArgs)(nil), (*v1beta1.PodTopologySpreadArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_PodTopologySpreadArgs_To_v1beta1_PodTopologySpreadArgs(a.(*config.PodTopologySpreadArgs), b.(*v1beta1.PodTopologySpreadArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.RequestedToCapacityRatioArgs)(nil), (*config.RequestedToCapacityRatioArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_RequestedToCapacityRatioArgs_To_config_RequestedToCapacityRatioArgs(a.(*v1beta1.RequestedToCapacityRatioArgs), b.(*config.RequestedToCapacityRatioArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.RequestedToCapacityRatioArgs)(nil), (*v1beta1.RequestedToCapacityRatioArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_RequestedToCapacityRatioArgs_To_v1beta1_RequestedToCapacityRatioArgs(a.(*config.RequestedToCapacityRatioArgs), b.(*v1beta1.RequestedToCapacityRatioArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ResourceSpec)(nil), (*config.ResourceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ResourceSpec_To_config_ResourceSpec(a.(*v1beta1.ResourceSpec), b.(*config.ResourceSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ResourceSpec)(nil), (*v1beta1.ResourceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ResourceSpec_To_v1beta1_ResourceSpec(a.(*config.ResourceSpec), b.(*v1beta1.ResourceSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ServiceAffinityArgs)(nil), (*config.ServiceAffinityArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ServiceAffinityArgs_To_config_ServiceAffinityArgs(a.(*v1beta1.ServiceAffinityArgs), b.(*config.ServiceAffinityArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ServiceAffinityArgs)(nil), (*v1beta1.ServiceAffinityArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ServiceAffinityArgs_To_v1beta1_ServiceAffinityArgs(a.(*config.ServiceAffinityArgs), b.(*v1beta1.ServiceAffinityArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.UtilizationShapePoint)(nil), (*config.UtilizationShapePoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_UtilizationShapePoint_To_config_UtilizationShapePoint(a.(*v1beta1.UtilizationShapePoint), b.(*config.UtilizationShapePoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.UtilizationShapePoint)(nil), (*v1beta1.UtilizationShapePoint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_UtilizationShapePoint_To_v1beta1_UtilizationShapePoint(a.(*config.UtilizationShapePoint), b.(*v1beta1.UtilizationShapePoint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.VolumeBindingArgs)(nil), (*config.VolumeBindingArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_VolumeBindingArgs_To_config_VolumeBindingArgs(a.(*v1beta1.VolumeBindingArgs), b.(*config.VolumeBindingArgs), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.VolumeBindingArgs)(nil), (*v1beta1.VolumeBindingArgs)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_VolumeBindingArgs_To_v1beta1_VolumeBindingArgs(a.(*config.VolumeBindingArgs), b.(*v1beta1.VolumeBindingArgs), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*config.KubeSchedulerConfiguration)(nil), (*v1beta1.KubeSchedulerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_KubeSchedulerConfiguration_To_v1beta1_KubeSchedulerConfiguration(a.(*config.KubeSchedulerConfiguration), b.(*v1beta1.KubeSchedulerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta1.KubeSchedulerConfiguration)(nil), (*config.KubeSchedulerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(a.(*v1beta1.KubeSchedulerConfiguration), b.(*config.KubeSchedulerConfiguration), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_Extender_To_config_Extender(in *v1beta1.Extender, out *config.Extender, s conversion.Scope) error { + out.URLPrefix = in.URLPrefix + out.FilterVerb = in.FilterVerb + out.PreemptVerb = in.PreemptVerb + out.PrioritizeVerb = in.PrioritizeVerb + out.Weight = in.Weight + out.BindVerb = in.BindVerb + out.EnableHTTPS = in.EnableHTTPS + out.TLSConfig = (*config.ExtenderTLSConfig)(unsafe.Pointer(in.TLSConfig)) + out.HTTPTimeout = in.HTTPTimeout + out.NodeCacheCapable = in.NodeCacheCapable + out.ManagedResources = *(*[]config.ExtenderManagedResource)(unsafe.Pointer(&in.ManagedResources)) + out.Ignorable = in.Ignorable + return nil +} + +// Convert_v1beta1_Extender_To_config_Extender is an autogenerated conversion function. +func Convert_v1beta1_Extender_To_config_Extender(in *v1beta1.Extender, out *config.Extender, s conversion.Scope) error { + return autoConvert_v1beta1_Extender_To_config_Extender(in, out, s) +} + +func autoConvert_config_Extender_To_v1beta1_Extender(in *config.Extender, out *v1beta1.Extender, s conversion.Scope) error { + out.URLPrefix = in.URLPrefix + out.FilterVerb = in.FilterVerb + out.PreemptVerb = in.PreemptVerb + out.PrioritizeVerb = in.PrioritizeVerb + out.Weight = in.Weight + out.BindVerb = in.BindVerb + out.EnableHTTPS = in.EnableHTTPS + out.TLSConfig = (*v1.ExtenderTLSConfig)(unsafe.Pointer(in.TLSConfig)) + out.HTTPTimeout = in.HTTPTimeout + out.NodeCacheCapable = in.NodeCacheCapable + out.ManagedResources = *(*[]v1.ExtenderManagedResource)(unsafe.Pointer(&in.ManagedResources)) + out.Ignorable = in.Ignorable + return nil +} + +// Convert_config_Extender_To_v1beta1_Extender is an autogenerated conversion function. +func Convert_config_Extender_To_v1beta1_Extender(in *config.Extender, out *v1beta1.Extender, s conversion.Scope) error { + return autoConvert_config_Extender_To_v1beta1_Extender(in, out, s) +} + +func autoConvert_v1beta1_InterPodAffinityArgs_To_config_InterPodAffinityArgs(in *v1beta1.InterPodAffinityArgs, out *config.InterPodAffinityArgs, s conversion.Scope) error { + if err := metav1.Convert_Pointer_int32_To_int32(&in.HardPodAffinityWeight, &out.HardPodAffinityWeight, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_InterPodAffinityArgs_To_config_InterPodAffinityArgs is an autogenerated conversion function. +func Convert_v1beta1_InterPodAffinityArgs_To_config_InterPodAffinityArgs(in *v1beta1.InterPodAffinityArgs, out *config.InterPodAffinityArgs, s conversion.Scope) error { + return autoConvert_v1beta1_InterPodAffinityArgs_To_config_InterPodAffinityArgs(in, out, s) +} + +func autoConvert_config_InterPodAffinityArgs_To_v1beta1_InterPodAffinityArgs(in *config.InterPodAffinityArgs, out *v1beta1.InterPodAffinityArgs, s conversion.Scope) error { + if err := metav1.Convert_int32_To_Pointer_int32(&in.HardPodAffinityWeight, &out.HardPodAffinityWeight, s); err != nil { + return err + } + return nil +} + +// Convert_config_InterPodAffinityArgs_To_v1beta1_InterPodAffinityArgs is an autogenerated conversion function. +func Convert_config_InterPodAffinityArgs_To_v1beta1_InterPodAffinityArgs(in *config.InterPodAffinityArgs, out *v1beta1.InterPodAffinityArgs, s conversion.Scope) error { + return autoConvert_config_InterPodAffinityArgs_To_v1beta1_InterPodAffinityArgs(in, out, s) +} + +func autoConvert_v1beta1_KubeSchedulerConfiguration_To_config_KubeSchedulerConfiguration(in *v1beta1.KubeSchedulerConfiguration, out *config.KubeSchedulerConfiguration, s conversion.Scope) error { + if err := v1alpha1.Convert_v1alpha1_LeaderElectionConfiguration_To_config_LeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil { + return err + } + if err := v1alpha1.Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(&in.ClientConnection, &out.ClientConnection, s); err != nil { + return err + } + if err := metav1.Convert_Pointer_string_To_string(&in.HealthzBindAddress, &out.HealthzBindAddress, s); err != nil { + return err + } + if err := metav1.Convert_Pointer_string_To_string(&in.MetricsBindAddress, &out.MetricsBindAddress, s); err != nil { + return err + } + if err := v1alpha1.Convert_v1alpha1_DebuggingConfiguration_To_config_DebuggingConfiguration(&in.DebuggingConfiguration, &out.DebuggingConfiguration, s); err != nil { + return err + } + if err := metav1.Convert_Pointer_int32_To_int32(&in.PercentageOfNodesToScore, &out.PercentageOfNodesToScore, s); err != nil { + return err + } + if err := metav1.Convert_Pointer_int64_To_int64(&in.PodInitialBackoffSeconds, &out.PodInitialBackoffSeconds, s); err != nil { + return err + } + if err := metav1.Convert_Pointer_int64_To_int64(&in.PodMaxBackoffSeconds, &out.PodMaxBackoffSeconds, s); err != nil { + return err + } + if in.Profiles != nil { + in, out := &in.Profiles, &out.Profiles + *out = make([]config.KubeSchedulerProfile, len(*in)) + for i := range *in { + if err := Convert_v1beta1_KubeSchedulerProfile_To_config_KubeSchedulerProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Profiles = nil + } + out.Extenders = *(*[]config.Extender)(unsafe.Pointer(&in.Extenders)) + return nil +} + +func autoConvert_config_KubeSchedulerConfiguration_To_v1beta1_KubeSchedulerConfiguration(in *config.KubeSchedulerConfiguration, out *v1beta1.KubeSchedulerConfiguration, s conversion.Scope) error { + // WARNING: in.AlgorithmSource requires manual conversion: does not exist in peer-type + if err := v1alpha1.Convert_config_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration(&in.LeaderElection, &out.LeaderElection, s); err != nil { + return err + } + if err := v1alpha1.Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(&in.ClientConnection, &out.ClientConnection, s); err != nil { + return err + } + if err := metav1.Convert_string_To_Pointer_string(&in.HealthzBindAddress, &out.HealthzBindAddress, s); err != nil { + return err + } + if err := metav1.Convert_string_To_Pointer_string(&in.MetricsBindAddress, &out.MetricsBindAddress, s); err != nil { + return err + } + if err := v1alpha1.Convert_config_DebuggingConfiguration_To_v1alpha1_DebuggingConfiguration(&in.DebuggingConfiguration, &out.DebuggingConfiguration, s); err != nil { + return err + } + if err := metav1.Convert_int32_To_Pointer_int32(&in.PercentageOfNodesToScore, &out.PercentageOfNodesToScore, s); err != nil { + return err + } + if err := metav1.Convert_int64_To_Pointer_int64(&in.PodInitialBackoffSeconds, &out.PodInitialBackoffSeconds, s); err != nil { + return err + } + if err := metav1.Convert_int64_To_Pointer_int64(&in.PodMaxBackoffSeconds, &out.PodMaxBackoffSeconds, s); err != nil { + return err + } + if in.Profiles != nil { + in, out := &in.Profiles, &out.Profiles + *out = make([]v1beta1.KubeSchedulerProfile, len(*in)) + for i := range *in { + if err := Convert_config_KubeSchedulerProfile_To_v1beta1_KubeSchedulerProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Profiles = nil + } + out.Extenders = *(*[]v1beta1.Extender)(unsafe.Pointer(&in.Extenders)) + return nil +} + +func autoConvert_v1beta1_KubeSchedulerProfile_To_config_KubeSchedulerProfile(in *v1beta1.KubeSchedulerProfile, out *config.KubeSchedulerProfile, s conversion.Scope) error { + if err := metav1.Convert_Pointer_string_To_string(&in.SchedulerName, &out.SchedulerName, s); err != nil { + return err + } + if in.Plugins != nil { + in, out := &in.Plugins, &out.Plugins + *out = new(config.Plugins) + if err := Convert_v1beta1_Plugins_To_config_Plugins(*in, *out, s); err != nil { + return err + } + } else { + out.Plugins = nil + } + if in.PluginConfig != nil { + in, out := &in.PluginConfig, &out.PluginConfig + *out = make([]config.PluginConfig, len(*in)) + for i := range *in { + if err := Convert_v1beta1_PluginConfig_To_config_PluginConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.PluginConfig = nil + } + return nil +} + +// Convert_v1beta1_KubeSchedulerProfile_To_config_KubeSchedulerProfile is an autogenerated conversion function. +func Convert_v1beta1_KubeSchedulerProfile_To_config_KubeSchedulerProfile(in *v1beta1.KubeSchedulerProfile, out *config.KubeSchedulerProfile, s conversion.Scope) error { + return autoConvert_v1beta1_KubeSchedulerProfile_To_config_KubeSchedulerProfile(in, out, s) +} + +func autoConvert_config_KubeSchedulerProfile_To_v1beta1_KubeSchedulerProfile(in *config.KubeSchedulerProfile, out *v1beta1.KubeSchedulerProfile, s conversion.Scope) error { + if err := metav1.Convert_string_To_Pointer_string(&in.SchedulerName, &out.SchedulerName, s); err != nil { + return err + } + if in.Plugins != nil { + in, out := &in.Plugins, &out.Plugins + *out = new(v1beta1.Plugins) + if err := Convert_config_Plugins_To_v1beta1_Plugins(*in, *out, s); err != nil { + return err + } + } else { + out.Plugins = nil + } + if in.PluginConfig != nil { + in, out := &in.PluginConfig, &out.PluginConfig + *out = make([]v1beta1.PluginConfig, len(*in)) + for i := range *in { + if err := Convert_config_PluginConfig_To_v1beta1_PluginConfig(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.PluginConfig = nil + } + return nil +} + +// Convert_config_KubeSchedulerProfile_To_v1beta1_KubeSchedulerProfile is an autogenerated conversion function. +func Convert_config_KubeSchedulerProfile_To_v1beta1_KubeSchedulerProfile(in *config.KubeSchedulerProfile, out *v1beta1.KubeSchedulerProfile, s conversion.Scope) error { + return autoConvert_config_KubeSchedulerProfile_To_v1beta1_KubeSchedulerProfile(in, out, s) +} + +func autoConvert_v1beta1_NodeLabelArgs_To_config_NodeLabelArgs(in *v1beta1.NodeLabelArgs, out *config.NodeLabelArgs, s conversion.Scope) error { + out.PresentLabels = *(*[]string)(unsafe.Pointer(&in.PresentLabels)) + out.AbsentLabels = *(*[]string)(unsafe.Pointer(&in.AbsentLabels)) + out.PresentLabelsPreference = *(*[]string)(unsafe.Pointer(&in.PresentLabelsPreference)) + out.AbsentLabelsPreference = *(*[]string)(unsafe.Pointer(&in.AbsentLabelsPreference)) + return nil +} + +// Convert_v1beta1_NodeLabelArgs_To_config_NodeLabelArgs is an autogenerated conversion function. +func Convert_v1beta1_NodeLabelArgs_To_config_NodeLabelArgs(in *v1beta1.NodeLabelArgs, out *config.NodeLabelArgs, s conversion.Scope) error { + return autoConvert_v1beta1_NodeLabelArgs_To_config_NodeLabelArgs(in, out, s) +} + +func autoConvert_config_NodeLabelArgs_To_v1beta1_NodeLabelArgs(in *config.NodeLabelArgs, out *v1beta1.NodeLabelArgs, s conversion.Scope) error { + out.PresentLabels = *(*[]string)(unsafe.Pointer(&in.PresentLabels)) + out.AbsentLabels = *(*[]string)(unsafe.Pointer(&in.AbsentLabels)) + out.PresentLabelsPreference = *(*[]string)(unsafe.Pointer(&in.PresentLabelsPreference)) + out.AbsentLabelsPreference = *(*[]string)(unsafe.Pointer(&in.AbsentLabelsPreference)) + return nil +} + +// Convert_config_NodeLabelArgs_To_v1beta1_NodeLabelArgs is an autogenerated conversion function. +func Convert_config_NodeLabelArgs_To_v1beta1_NodeLabelArgs(in *config.NodeLabelArgs, out *v1beta1.NodeLabelArgs, s conversion.Scope) error { + return autoConvert_config_NodeLabelArgs_To_v1beta1_NodeLabelArgs(in, out, s) +} + +func autoConvert_v1beta1_NodeResourcesFitArgs_To_config_NodeResourcesFitArgs(in *v1beta1.NodeResourcesFitArgs, out *config.NodeResourcesFitArgs, s conversion.Scope) error { + out.IgnoredResources = *(*[]string)(unsafe.Pointer(&in.IgnoredResources)) + out.IgnoredResourceGroups = *(*[]string)(unsafe.Pointer(&in.IgnoredResourceGroups)) + return nil +} + +// Convert_v1beta1_NodeResourcesFitArgs_To_config_NodeResourcesFitArgs is an autogenerated conversion function. +func Convert_v1beta1_NodeResourcesFitArgs_To_config_NodeResourcesFitArgs(in *v1beta1.NodeResourcesFitArgs, out *config.NodeResourcesFitArgs, s conversion.Scope) error { + return autoConvert_v1beta1_NodeResourcesFitArgs_To_config_NodeResourcesFitArgs(in, out, s) +} + +func autoConvert_config_NodeResourcesFitArgs_To_v1beta1_NodeResourcesFitArgs(in *config.NodeResourcesFitArgs, out *v1beta1.NodeResourcesFitArgs, s conversion.Scope) error { + out.IgnoredResources = *(*[]string)(unsafe.Pointer(&in.IgnoredResources)) + out.IgnoredResourceGroups = *(*[]string)(unsafe.Pointer(&in.IgnoredResourceGroups)) + return nil +} + +// Convert_config_NodeResourcesFitArgs_To_v1beta1_NodeResourcesFitArgs is an autogenerated conversion function. +func Convert_config_NodeResourcesFitArgs_To_v1beta1_NodeResourcesFitArgs(in *config.NodeResourcesFitArgs, out *v1beta1.NodeResourcesFitArgs, s conversion.Scope) error { + return autoConvert_config_NodeResourcesFitArgs_To_v1beta1_NodeResourcesFitArgs(in, out, s) +} + +func autoConvert_v1beta1_NodeResourcesLeastAllocatedArgs_To_config_NodeResourcesLeastAllocatedArgs(in *v1beta1.NodeResourcesLeastAllocatedArgs, out *config.NodeResourcesLeastAllocatedArgs, s conversion.Scope) error { + out.Resources = *(*[]config.ResourceSpec)(unsafe.Pointer(&in.Resources)) + return nil +} + +// Convert_v1beta1_NodeResourcesLeastAllocatedArgs_To_config_NodeResourcesLeastAllocatedArgs is an autogenerated conversion function. +func Convert_v1beta1_NodeResourcesLeastAllocatedArgs_To_config_NodeResourcesLeastAllocatedArgs(in *v1beta1.NodeResourcesLeastAllocatedArgs, out *config.NodeResourcesLeastAllocatedArgs, s conversion.Scope) error { + return autoConvert_v1beta1_NodeResourcesLeastAllocatedArgs_To_config_NodeResourcesLeastAllocatedArgs(in, out, s) +} + +func autoConvert_config_NodeResourcesLeastAllocatedArgs_To_v1beta1_NodeResourcesLeastAllocatedArgs(in *config.NodeResourcesLeastAllocatedArgs, out *v1beta1.NodeResourcesLeastAllocatedArgs, s conversion.Scope) error { + out.Resources = *(*[]v1beta1.ResourceSpec)(unsafe.Pointer(&in.Resources)) + return nil +} + +// Convert_config_NodeResourcesLeastAllocatedArgs_To_v1beta1_NodeResourcesLeastAllocatedArgs is an autogenerated conversion function. +func Convert_config_NodeResourcesLeastAllocatedArgs_To_v1beta1_NodeResourcesLeastAllocatedArgs(in *config.NodeResourcesLeastAllocatedArgs, out *v1beta1.NodeResourcesLeastAllocatedArgs, s conversion.Scope) error { + return autoConvert_config_NodeResourcesLeastAllocatedArgs_To_v1beta1_NodeResourcesLeastAllocatedArgs(in, out, s) +} + +func autoConvert_v1beta1_NodeResourcesMostAllocatedArgs_To_config_NodeResourcesMostAllocatedArgs(in *v1beta1.NodeResourcesMostAllocatedArgs, out *config.NodeResourcesMostAllocatedArgs, s conversion.Scope) error { + out.Resources = *(*[]config.ResourceSpec)(unsafe.Pointer(&in.Resources)) + return nil +} + +// Convert_v1beta1_NodeResourcesMostAllocatedArgs_To_config_NodeResourcesMostAllocatedArgs is an autogenerated conversion function. +func Convert_v1beta1_NodeResourcesMostAllocatedArgs_To_config_NodeResourcesMostAllocatedArgs(in *v1beta1.NodeResourcesMostAllocatedArgs, out *config.NodeResourcesMostAllocatedArgs, s conversion.Scope) error { + return autoConvert_v1beta1_NodeResourcesMostAllocatedArgs_To_config_NodeResourcesMostAllocatedArgs(in, out, s) +} + +func autoConvert_config_NodeResourcesMostAllocatedArgs_To_v1beta1_NodeResourcesMostAllocatedArgs(in *config.NodeResourcesMostAllocatedArgs, out *v1beta1.NodeResourcesMostAllocatedArgs, s conversion.Scope) error { + out.Resources = *(*[]v1beta1.ResourceSpec)(unsafe.Pointer(&in.Resources)) + return nil +} + +// Convert_config_NodeResourcesMostAllocatedArgs_To_v1beta1_NodeResourcesMostAllocatedArgs is an autogenerated conversion function. +func Convert_config_NodeResourcesMostAllocatedArgs_To_v1beta1_NodeResourcesMostAllocatedArgs(in *config.NodeResourcesMostAllocatedArgs, out *v1beta1.NodeResourcesMostAllocatedArgs, s conversion.Scope) error { + return autoConvert_config_NodeResourcesMostAllocatedArgs_To_v1beta1_NodeResourcesMostAllocatedArgs(in, out, s) +} + +func autoConvert_v1beta1_Plugin_To_config_Plugin(in *v1beta1.Plugin, out *config.Plugin, s conversion.Scope) error { + out.Name = in.Name + if err := metav1.Convert_Pointer_int32_To_int32(&in.Weight, &out.Weight, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_Plugin_To_config_Plugin is an autogenerated conversion function. +func Convert_v1beta1_Plugin_To_config_Plugin(in *v1beta1.Plugin, out *config.Plugin, s conversion.Scope) error { + return autoConvert_v1beta1_Plugin_To_config_Plugin(in, out, s) +} + +func autoConvert_config_Plugin_To_v1beta1_Plugin(in *config.Plugin, out *v1beta1.Plugin, s conversion.Scope) error { + out.Name = in.Name + if err := metav1.Convert_int32_To_Pointer_int32(&in.Weight, &out.Weight, s); err != nil { + return err + } + return nil +} + +// Convert_config_Plugin_To_v1beta1_Plugin is an autogenerated conversion function. +func Convert_config_Plugin_To_v1beta1_Plugin(in *config.Plugin, out *v1beta1.Plugin, s conversion.Scope) error { + return autoConvert_config_Plugin_To_v1beta1_Plugin(in, out, s) +} + +func autoConvert_v1beta1_PluginConfig_To_config_PluginConfig(in *v1beta1.PluginConfig, out *config.PluginConfig, s conversion.Scope) error { + out.Name = in.Name + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.Args, &out.Args, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_PluginConfig_To_config_PluginConfig is an autogenerated conversion function. +func Convert_v1beta1_PluginConfig_To_config_PluginConfig(in *v1beta1.PluginConfig, out *config.PluginConfig, s conversion.Scope) error { + return autoConvert_v1beta1_PluginConfig_To_config_PluginConfig(in, out, s) +} + +func autoConvert_config_PluginConfig_To_v1beta1_PluginConfig(in *config.PluginConfig, out *v1beta1.PluginConfig, s conversion.Scope) error { + out.Name = in.Name + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.Args, &out.Args, s); err != nil { + return err + } + return nil +} + +// Convert_config_PluginConfig_To_v1beta1_PluginConfig is an autogenerated conversion function. +func Convert_config_PluginConfig_To_v1beta1_PluginConfig(in *config.PluginConfig, out *v1beta1.PluginConfig, s conversion.Scope) error { + return autoConvert_config_PluginConfig_To_v1beta1_PluginConfig(in, out, s) +} + +func autoConvert_v1beta1_PluginSet_To_config_PluginSet(in *v1beta1.PluginSet, out *config.PluginSet, s conversion.Scope) error { + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = make([]config.Plugin, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Plugin_To_config_Plugin(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Enabled = nil + } + if in.Disabled != nil { + in, out := &in.Disabled, &out.Disabled + *out = make([]config.Plugin, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Plugin_To_config_Plugin(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Disabled = nil + } + return nil +} + +// Convert_v1beta1_PluginSet_To_config_PluginSet is an autogenerated conversion function. +func Convert_v1beta1_PluginSet_To_config_PluginSet(in *v1beta1.PluginSet, out *config.PluginSet, s conversion.Scope) error { + return autoConvert_v1beta1_PluginSet_To_config_PluginSet(in, out, s) +} + +func autoConvert_config_PluginSet_To_v1beta1_PluginSet(in *config.PluginSet, out *v1beta1.PluginSet, s conversion.Scope) error { + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = make([]v1beta1.Plugin, len(*in)) + for i := range *in { + if err := Convert_config_Plugin_To_v1beta1_Plugin(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Enabled = nil + } + if in.Disabled != nil { + in, out := &in.Disabled, &out.Disabled + *out = make([]v1beta1.Plugin, len(*in)) + for i := range *in { + if err := Convert_config_Plugin_To_v1beta1_Plugin(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Disabled = nil + } + return nil +} + +// Convert_config_PluginSet_To_v1beta1_PluginSet is an autogenerated conversion function. +func Convert_config_PluginSet_To_v1beta1_PluginSet(in *config.PluginSet, out *v1beta1.PluginSet, s conversion.Scope) error { + return autoConvert_config_PluginSet_To_v1beta1_PluginSet(in, out, s) +} + +func autoConvert_v1beta1_Plugins_To_config_Plugins(in *v1beta1.Plugins, out *config.Plugins, s conversion.Scope) error { + if in.QueueSort != nil { + in, out := &in.QueueSort, &out.QueueSort + *out = new(config.PluginSet) + if err := Convert_v1beta1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.QueueSort = nil + } + if in.PreFilter != nil { + in, out := &in.PreFilter, &out.PreFilter + *out = new(config.PluginSet) + if err := Convert_v1beta1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.PreFilter = nil + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(config.PluginSet) + if err := Convert_v1beta1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.Filter = nil + } + if in.PostFilter != nil { + in, out := &in.PostFilter, &out.PostFilter + *out = new(config.PluginSet) + if err := Convert_v1beta1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.PostFilter = nil + } + if in.PreScore != nil { + in, out := &in.PreScore, &out.PreScore + *out = new(config.PluginSet) + if err := Convert_v1beta1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.PreScore = nil + } + if in.Score != nil { + in, out := &in.Score, &out.Score + *out = new(config.PluginSet) + if err := Convert_v1beta1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.Score = nil + } + if in.Reserve != nil { + in, out := &in.Reserve, &out.Reserve + *out = new(config.PluginSet) + if err := Convert_v1beta1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.Reserve = nil + } + if in.Permit != nil { + in, out := &in.Permit, &out.Permit + *out = new(config.PluginSet) + if err := Convert_v1beta1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.Permit = nil + } + if in.PreBind != nil { + in, out := &in.PreBind, &out.PreBind + *out = new(config.PluginSet) + if err := Convert_v1beta1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.PreBind = nil + } + if in.Bind != nil { + in, out := &in.Bind, &out.Bind + *out = new(config.PluginSet) + if err := Convert_v1beta1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.Bind = nil + } + if in.PostBind != nil { + in, out := &in.PostBind, &out.PostBind + *out = new(config.PluginSet) + if err := Convert_v1beta1_PluginSet_To_config_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.PostBind = nil + } + return nil +} + +// Convert_v1beta1_Plugins_To_config_Plugins is an autogenerated conversion function. +func Convert_v1beta1_Plugins_To_config_Plugins(in *v1beta1.Plugins, out *config.Plugins, s conversion.Scope) error { + return autoConvert_v1beta1_Plugins_To_config_Plugins(in, out, s) +} + +func autoConvert_config_Plugins_To_v1beta1_Plugins(in *config.Plugins, out *v1beta1.Plugins, s conversion.Scope) error { + if in.QueueSort != nil { + in, out := &in.QueueSort, &out.QueueSort + *out = new(v1beta1.PluginSet) + if err := Convert_config_PluginSet_To_v1beta1_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.QueueSort = nil + } + if in.PreFilter != nil { + in, out := &in.PreFilter, &out.PreFilter + *out = new(v1beta1.PluginSet) + if err := Convert_config_PluginSet_To_v1beta1_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.PreFilter = nil + } + if in.Filter != nil { + in, out := &in.Filter, &out.Filter + *out = new(v1beta1.PluginSet) + if err := Convert_config_PluginSet_To_v1beta1_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.Filter = nil + } + if in.PostFilter != nil { + in, out := &in.PostFilter, &out.PostFilter + *out = new(v1beta1.PluginSet) + if err := Convert_config_PluginSet_To_v1beta1_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.PostFilter = nil + } + if in.PreScore != nil { + in, out := &in.PreScore, &out.PreScore + *out = new(v1beta1.PluginSet) + if err := Convert_config_PluginSet_To_v1beta1_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.PreScore = nil + } + if in.Score != nil { + in, out := &in.Score, &out.Score + *out = new(v1beta1.PluginSet) + if err := Convert_config_PluginSet_To_v1beta1_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.Score = nil + } + if in.Reserve != nil { + in, out := &in.Reserve, &out.Reserve + *out = new(v1beta1.PluginSet) + if err := Convert_config_PluginSet_To_v1beta1_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.Reserve = nil + } + if in.Permit != nil { + in, out := &in.Permit, &out.Permit + *out = new(v1beta1.PluginSet) + if err := Convert_config_PluginSet_To_v1beta1_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.Permit = nil + } + if in.PreBind != nil { + in, out := &in.PreBind, &out.PreBind + *out = new(v1beta1.PluginSet) + if err := Convert_config_PluginSet_To_v1beta1_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.PreBind = nil + } + if in.Bind != nil { + in, out := &in.Bind, &out.Bind + *out = new(v1beta1.PluginSet) + if err := Convert_config_PluginSet_To_v1beta1_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.Bind = nil + } + if in.PostBind != nil { + in, out := &in.PostBind, &out.PostBind + *out = new(v1beta1.PluginSet) + if err := Convert_config_PluginSet_To_v1beta1_PluginSet(*in, *out, s); err != nil { + return err + } + } else { + out.PostBind = nil + } + return nil +} + +// Convert_config_Plugins_To_v1beta1_Plugins is an autogenerated conversion function. +func Convert_config_Plugins_To_v1beta1_Plugins(in *config.Plugins, out *v1beta1.Plugins, s conversion.Scope) error { + return autoConvert_config_Plugins_To_v1beta1_Plugins(in, out, s) +} + +func autoConvert_v1beta1_PodTopologySpreadArgs_To_config_PodTopologySpreadArgs(in *v1beta1.PodTopologySpreadArgs, out *config.PodTopologySpreadArgs, s conversion.Scope) error { + out.DefaultConstraints = *(*[]corev1.TopologySpreadConstraint)(unsafe.Pointer(&in.DefaultConstraints)) + return nil +} + +// Convert_v1beta1_PodTopologySpreadArgs_To_config_PodTopologySpreadArgs is an autogenerated conversion function. +func Convert_v1beta1_PodTopologySpreadArgs_To_config_PodTopologySpreadArgs(in *v1beta1.PodTopologySpreadArgs, out *config.PodTopologySpreadArgs, s conversion.Scope) error { + return autoConvert_v1beta1_PodTopologySpreadArgs_To_config_PodTopologySpreadArgs(in, out, s) +} + +func autoConvert_config_PodTopologySpreadArgs_To_v1beta1_PodTopologySpreadArgs(in *config.PodTopologySpreadArgs, out *v1beta1.PodTopologySpreadArgs, s conversion.Scope) error { + out.DefaultConstraints = *(*[]corev1.TopologySpreadConstraint)(unsafe.Pointer(&in.DefaultConstraints)) + return nil +} + +// Convert_config_PodTopologySpreadArgs_To_v1beta1_PodTopologySpreadArgs is an autogenerated conversion function. +func Convert_config_PodTopologySpreadArgs_To_v1beta1_PodTopologySpreadArgs(in *config.PodTopologySpreadArgs, out *v1beta1.PodTopologySpreadArgs, s conversion.Scope) error { + return autoConvert_config_PodTopologySpreadArgs_To_v1beta1_PodTopologySpreadArgs(in, out, s) +} + +func autoConvert_v1beta1_RequestedToCapacityRatioArgs_To_config_RequestedToCapacityRatioArgs(in *v1beta1.RequestedToCapacityRatioArgs, out *config.RequestedToCapacityRatioArgs, s conversion.Scope) error { + out.Shape = *(*[]config.UtilizationShapePoint)(unsafe.Pointer(&in.Shape)) + out.Resources = *(*[]config.ResourceSpec)(unsafe.Pointer(&in.Resources)) + return nil +} + +// Convert_v1beta1_RequestedToCapacityRatioArgs_To_config_RequestedToCapacityRatioArgs is an autogenerated conversion function. +func Convert_v1beta1_RequestedToCapacityRatioArgs_To_config_RequestedToCapacityRatioArgs(in *v1beta1.RequestedToCapacityRatioArgs, out *config.RequestedToCapacityRatioArgs, s conversion.Scope) error { + return autoConvert_v1beta1_RequestedToCapacityRatioArgs_To_config_RequestedToCapacityRatioArgs(in, out, s) +} + +func autoConvert_config_RequestedToCapacityRatioArgs_To_v1beta1_RequestedToCapacityRatioArgs(in *config.RequestedToCapacityRatioArgs, out *v1beta1.RequestedToCapacityRatioArgs, s conversion.Scope) error { + out.Shape = *(*[]v1beta1.UtilizationShapePoint)(unsafe.Pointer(&in.Shape)) + out.Resources = *(*[]v1beta1.ResourceSpec)(unsafe.Pointer(&in.Resources)) + return nil +} + +// Convert_config_RequestedToCapacityRatioArgs_To_v1beta1_RequestedToCapacityRatioArgs is an autogenerated conversion function. +func Convert_config_RequestedToCapacityRatioArgs_To_v1beta1_RequestedToCapacityRatioArgs(in *config.RequestedToCapacityRatioArgs, out *v1beta1.RequestedToCapacityRatioArgs, s conversion.Scope) error { + return autoConvert_config_RequestedToCapacityRatioArgs_To_v1beta1_RequestedToCapacityRatioArgs(in, out, s) +} + +func autoConvert_v1beta1_ResourceSpec_To_config_ResourceSpec(in *v1beta1.ResourceSpec, out *config.ResourceSpec, s conversion.Scope) error { + out.Name = in.Name + out.Weight = in.Weight + return nil +} + +// Convert_v1beta1_ResourceSpec_To_config_ResourceSpec is an autogenerated conversion function. +func Convert_v1beta1_ResourceSpec_To_config_ResourceSpec(in *v1beta1.ResourceSpec, out *config.ResourceSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ResourceSpec_To_config_ResourceSpec(in, out, s) +} + +func autoConvert_config_ResourceSpec_To_v1beta1_ResourceSpec(in *config.ResourceSpec, out *v1beta1.ResourceSpec, s conversion.Scope) error { + out.Name = in.Name + out.Weight = in.Weight + return nil +} + +// Convert_config_ResourceSpec_To_v1beta1_ResourceSpec is an autogenerated conversion function. +func Convert_config_ResourceSpec_To_v1beta1_ResourceSpec(in *config.ResourceSpec, out *v1beta1.ResourceSpec, s conversion.Scope) error { + return autoConvert_config_ResourceSpec_To_v1beta1_ResourceSpec(in, out, s) +} + +func autoConvert_v1beta1_ServiceAffinityArgs_To_config_ServiceAffinityArgs(in *v1beta1.ServiceAffinityArgs, out *config.ServiceAffinityArgs, s conversion.Scope) error { + out.AffinityLabels = *(*[]string)(unsafe.Pointer(&in.AffinityLabels)) + out.AntiAffinityLabelsPreference = *(*[]string)(unsafe.Pointer(&in.AntiAffinityLabelsPreference)) + return nil +} + +// Convert_v1beta1_ServiceAffinityArgs_To_config_ServiceAffinityArgs is an autogenerated conversion function. +func Convert_v1beta1_ServiceAffinityArgs_To_config_ServiceAffinityArgs(in *v1beta1.ServiceAffinityArgs, out *config.ServiceAffinityArgs, s conversion.Scope) error { + return autoConvert_v1beta1_ServiceAffinityArgs_To_config_ServiceAffinityArgs(in, out, s) +} + +func autoConvert_config_ServiceAffinityArgs_To_v1beta1_ServiceAffinityArgs(in *config.ServiceAffinityArgs, out *v1beta1.ServiceAffinityArgs, s conversion.Scope) error { + out.AffinityLabels = *(*[]string)(unsafe.Pointer(&in.AffinityLabels)) + out.AntiAffinityLabelsPreference = *(*[]string)(unsafe.Pointer(&in.AntiAffinityLabelsPreference)) + return nil +} + +// Convert_config_ServiceAffinityArgs_To_v1beta1_ServiceAffinityArgs is an autogenerated conversion function. +func Convert_config_ServiceAffinityArgs_To_v1beta1_ServiceAffinityArgs(in *config.ServiceAffinityArgs, out *v1beta1.ServiceAffinityArgs, s conversion.Scope) error { + return autoConvert_config_ServiceAffinityArgs_To_v1beta1_ServiceAffinityArgs(in, out, s) +} + +func autoConvert_v1beta1_UtilizationShapePoint_To_config_UtilizationShapePoint(in *v1beta1.UtilizationShapePoint, out *config.UtilizationShapePoint, s conversion.Scope) error { + out.Utilization = in.Utilization + out.Score = in.Score + return nil +} + +// Convert_v1beta1_UtilizationShapePoint_To_config_UtilizationShapePoint is an autogenerated conversion function. +func Convert_v1beta1_UtilizationShapePoint_To_config_UtilizationShapePoint(in *v1beta1.UtilizationShapePoint, out *config.UtilizationShapePoint, s conversion.Scope) error { + return autoConvert_v1beta1_UtilizationShapePoint_To_config_UtilizationShapePoint(in, out, s) +} + +func autoConvert_config_UtilizationShapePoint_To_v1beta1_UtilizationShapePoint(in *config.UtilizationShapePoint, out *v1beta1.UtilizationShapePoint, s conversion.Scope) error { + out.Utilization = in.Utilization + out.Score = in.Score + return nil +} + +// Convert_config_UtilizationShapePoint_To_v1beta1_UtilizationShapePoint is an autogenerated conversion function. +func Convert_config_UtilizationShapePoint_To_v1beta1_UtilizationShapePoint(in *config.UtilizationShapePoint, out *v1beta1.UtilizationShapePoint, s conversion.Scope) error { + return autoConvert_config_UtilizationShapePoint_To_v1beta1_UtilizationShapePoint(in, out, s) +} + +func autoConvert_v1beta1_VolumeBindingArgs_To_config_VolumeBindingArgs(in *v1beta1.VolumeBindingArgs, out *config.VolumeBindingArgs, s conversion.Scope) error { + if err := metav1.Convert_Pointer_int64_To_int64(&in.BindTimeoutSeconds, &out.BindTimeoutSeconds, s); err != nil { + return err + } + return nil +} + +// Convert_v1beta1_VolumeBindingArgs_To_config_VolumeBindingArgs is an autogenerated conversion function. +func Convert_v1beta1_VolumeBindingArgs_To_config_VolumeBindingArgs(in *v1beta1.VolumeBindingArgs, out *config.VolumeBindingArgs, s conversion.Scope) error { + return autoConvert_v1beta1_VolumeBindingArgs_To_config_VolumeBindingArgs(in, out, s) +} + +func autoConvert_config_VolumeBindingArgs_To_v1beta1_VolumeBindingArgs(in *config.VolumeBindingArgs, out *v1beta1.VolumeBindingArgs, s conversion.Scope) error { + if err := metav1.Convert_int64_To_Pointer_int64(&in.BindTimeoutSeconds, &out.BindTimeoutSeconds, s); err != nil { + return err + } + return nil +} + +// Convert_config_VolumeBindingArgs_To_v1beta1_VolumeBindingArgs is an autogenerated conversion function. +func Convert_config_VolumeBindingArgs_To_v1beta1_VolumeBindingArgs(in *config.VolumeBindingArgs, out *v1beta1.VolumeBindingArgs, s conversion.Scope) error { + return autoConvert_config_VolumeBindingArgs_To_v1beta1_VolumeBindingArgs(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/zz_generated.deepcopy.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/zz_generated.deepcopy.go rename to vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/zz_generated.deepcopy.go index 54d7f7c454d..016d58c856a 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/zz_generated.deepcopy.go @@ -18,4 +18,4 @@ limitations under the License. // Code generated by deepcopy-gen. DO NOT EDIT. -package v1alpha2 +package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/zz_generated.defaults.go new file mode 100644 index 00000000000..a6a78548741 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1/zz_generated.defaults.go @@ -0,0 +1,76 @@ +// +build !ignore_autogenerated + +/* +Copyright 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. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" + v1beta1 "k8s.io/kube-scheduler/config/v1beta1" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&v1beta1.InterPodAffinityArgs{}, func(obj interface{}) { SetObjectDefaults_InterPodAffinityArgs(obj.(*v1beta1.InterPodAffinityArgs)) }) + scheme.AddTypeDefaultingFunc(&v1beta1.KubeSchedulerConfiguration{}, func(obj interface{}) { + SetObjectDefaults_KubeSchedulerConfiguration(obj.(*v1beta1.KubeSchedulerConfiguration)) + }) + scheme.AddTypeDefaultingFunc(&v1beta1.NodeResourcesLeastAllocatedArgs{}, func(obj interface{}) { + SetObjectDefaults_NodeResourcesLeastAllocatedArgs(obj.(*v1beta1.NodeResourcesLeastAllocatedArgs)) + }) + scheme.AddTypeDefaultingFunc(&v1beta1.NodeResourcesMostAllocatedArgs{}, func(obj interface{}) { + SetObjectDefaults_NodeResourcesMostAllocatedArgs(obj.(*v1beta1.NodeResourcesMostAllocatedArgs)) + }) + scheme.AddTypeDefaultingFunc(&v1beta1.PodTopologySpreadArgs{}, func(obj interface{}) { SetObjectDefaults_PodTopologySpreadArgs(obj.(*v1beta1.PodTopologySpreadArgs)) }) + scheme.AddTypeDefaultingFunc(&v1beta1.RequestedToCapacityRatioArgs{}, func(obj interface{}) { + SetObjectDefaults_RequestedToCapacityRatioArgs(obj.(*v1beta1.RequestedToCapacityRatioArgs)) + }) + scheme.AddTypeDefaultingFunc(&v1beta1.VolumeBindingArgs{}, func(obj interface{}) { SetObjectDefaults_VolumeBindingArgs(obj.(*v1beta1.VolumeBindingArgs)) }) + return nil +} + +func SetObjectDefaults_InterPodAffinityArgs(in *v1beta1.InterPodAffinityArgs) { + SetDefaults_InterPodAffinityArgs(in) +} + +func SetObjectDefaults_KubeSchedulerConfiguration(in *v1beta1.KubeSchedulerConfiguration) { + SetDefaults_KubeSchedulerConfiguration(in) +} + +func SetObjectDefaults_NodeResourcesLeastAllocatedArgs(in *v1beta1.NodeResourcesLeastAllocatedArgs) { + SetDefaults_NodeResourcesLeastAllocatedArgs(in) +} + +func SetObjectDefaults_NodeResourcesMostAllocatedArgs(in *v1beta1.NodeResourcesMostAllocatedArgs) { + SetDefaults_NodeResourcesMostAllocatedArgs(in) +} + +func SetObjectDefaults_PodTopologySpreadArgs(in *v1beta1.PodTopologySpreadArgs) { + SetDefaults_PodTopologySpreadArgs(in) +} + +func SetObjectDefaults_RequestedToCapacityRatioArgs(in *v1beta1.RequestedToCapacityRatioArgs) { + SetDefaults_RequestedToCapacityRatioArgs(in) +} + +func SetObjectDefaults_VolumeBindingArgs(in *v1beta1.VolumeBindingArgs) { + SetDefaults_VolumeBindingArgs(in) +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/BUILD index edea5e2bba6..a259578e3ac 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/BUILD @@ -2,13 +2,17 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", - srcs = ["validation.go"], + srcs = [ + "validation.go", + "validation_pluginargs.go", + ], importpath = "k8s.io/kubernetes/pkg/scheduler/apis/config/validation", visibility = ["//visibility:public"], deps = [ "//pkg/apis/core/v1/helper:go_default_library", "//pkg/scheduler/apis/config:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library", @@ -20,10 +24,14 @@ go_library( go_test( name = "go_default_test", - srcs = ["validation_test.go"], + srcs = [ + "validation_pluginargs_test.go", + "validation_test.go", + ], embed = [":go_default_library"], deps = [ "//pkg/scheduler/apis/config:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/component-base/config:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/validation.go index 35107339307..e48ae5dc6b7 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/validation.go @@ -35,7 +35,7 @@ import ( func ValidateKubeSchedulerConfiguration(cc *config.KubeSchedulerConfiguration) field.ErrorList { allErrs := field.ErrorList{} allErrs = append(allErrs, componentbasevalidation.ValidateClientConnectionConfiguration(&cc.ClientConnection, field.NewPath("clientConnection"))...) - allErrs = append(allErrs, validateKubeSchedulerLeaderElectionConfiguration(field.NewPath("leaderElection"), &cc.LeaderElection)...) + allErrs = append(allErrs, componentbasevalidation.ValidateLeaderElectionConfiguration(&cc.LeaderElection, field.NewPath("leaderElection"))...) profilesPath := field.NewPath("profiles") if len(cc.Profiles) == 0 { @@ -103,15 +103,6 @@ func validateCommonQueueSort(path *field.Path, profiles []config.KubeSchedulerPr return allErrs } -func validateKubeSchedulerLeaderElectionConfiguration(fldPath *field.Path, cc *config.KubeSchedulerLeaderElectionConfiguration) field.ErrorList { - allErrs := field.ErrorList{} - if !cc.LeaderElectionConfiguration.LeaderElect { - return allErrs - } - allErrs = append(allErrs, componentbasevalidation.ValidateLeaderElectionConfiguration(&cc.LeaderElectionConfiguration, fldPath)...) - return allErrs -} - // ValidatePolicy checks for errors in the Config // It does not return early so that it can find as many errors as possible func ValidatePolicy(policy config.Policy) error { diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/validation_pluginargs.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/validation_pluginargs.go new file mode 100644 index 00000000000..860c1abe535 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/validation/validation_pluginargs.go @@ -0,0 +1,214 @@ +/* +Copyright 2020 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 validation + +import ( + "fmt" + + v1 "k8s.io/api/core/v1" + metav1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/kubernetes/pkg/scheduler/apis/config" +) + +// ValidateInterPodAffinityArgs validates that InterPodAffinityArgs are correct. +func ValidateInterPodAffinityArgs(args config.InterPodAffinityArgs) error { + return ValidateHardPodAffinityWeight(field.NewPath("hardPodAffinityWeight"), args.HardPodAffinityWeight) +} + +// ValidateHardPodAffinityWeight validates that weight is within allowed range. +func ValidateHardPodAffinityWeight(path *field.Path, w int32) error { + const ( + minHardPodAffinityWeight = 0 + maxHardPodAffinityWeight = 100 + ) + + if w < minHardPodAffinityWeight || w > maxHardPodAffinityWeight { + msg := fmt.Sprintf("not in valid range [%d-%d]", minHardPodAffinityWeight, maxHardPodAffinityWeight) + return field.Invalid(path, w, msg) + } + return nil +} + +// ValidateNodeLabelArgs validates that NodeLabelArgs are correct. +func ValidateNodeLabelArgs(args config.NodeLabelArgs) error { + if err := validateNoConflict(args.PresentLabels, args.AbsentLabels); err != nil { + return err + } + if err := validateNoConflict(args.PresentLabelsPreference, args.AbsentLabelsPreference); err != nil { + return err + } + return nil +} + +// validateNoConflict validates that presentLabels and absentLabels do not conflict. +func validateNoConflict(presentLabels []string, absentLabels []string) error { + m := make(map[string]struct{}, len(presentLabels)) + for _, l := range presentLabels { + m[l] = struct{}{} + } + for _, l := range absentLabels { + if _, ok := m[l]; ok { + return fmt.Errorf("detecting at least one label (e.g., %q) that exist in both the present(%+v) and absent(%+v) label list", l, presentLabels, absentLabels) + } + } + return nil +} + +// ValidatePodTopologySpreadArgs validates that PodTopologySpreadArgs are correct. +// It replicates the validation from pkg/apis/core/validation.validateTopologySpreadConstraints +// with an additional check for .labelSelector to be nil. +func ValidatePodTopologySpreadArgs(args *config.PodTopologySpreadArgs) error { + var allErrs field.ErrorList + path := field.NewPath("defaultConstraints") + + for i, c := range args.DefaultConstraints { + p := path.Index(i) + if c.MaxSkew <= 0 { + f := p.Child("maxSkew") + allErrs = append(allErrs, field.Invalid(f, c.MaxSkew, "must be greater than zero")) + } + allErrs = append(allErrs, validateTopologyKey(p.Child("topologyKey"), c.TopologyKey)...) + if err := validateWhenUnsatisfiable(p.Child("whenUnsatisfiable"), c.WhenUnsatisfiable); err != nil { + allErrs = append(allErrs, err) + } + if c.LabelSelector != nil { + f := field.Forbidden(p.Child("labelSelector"), "constraint must not define a selector, as they deduced for each pod") + allErrs = append(allErrs, f) + } + if err := validateConstraintNotRepeat(path, args.DefaultConstraints, i); err != nil { + allErrs = append(allErrs, err) + } + } + if len(allErrs) == 0 { + return nil + } + return allErrs.ToAggregate() +} + +func validateTopologyKey(p *field.Path, v string) field.ErrorList { + var allErrs field.ErrorList + if len(v) == 0 { + allErrs = append(allErrs, field.Required(p, "can not be empty")) + } else { + allErrs = append(allErrs, metav1validation.ValidateLabelName(v, p)...) + } + return allErrs +} + +func validateWhenUnsatisfiable(p *field.Path, v v1.UnsatisfiableConstraintAction) *field.Error { + supportedScheduleActions := sets.NewString(string(v1.DoNotSchedule), string(v1.ScheduleAnyway)) + + if len(v) == 0 { + return field.Required(p, "can not be empty") + } + if !supportedScheduleActions.Has(string(v)) { + return field.NotSupported(p, v, supportedScheduleActions.List()) + } + return nil +} + +func validateConstraintNotRepeat(path *field.Path, constraints []v1.TopologySpreadConstraint, idx int) *field.Error { + c := &constraints[idx] + for i := range constraints[:idx] { + other := &constraints[i] + if c.TopologyKey == other.TopologyKey && c.WhenUnsatisfiable == other.WhenUnsatisfiable { + return field.Duplicate(path.Index(idx), fmt.Sprintf("{%v, %v}", c.TopologyKey, c.WhenUnsatisfiable)) + } + } + return nil +} + +// ValidateRequestedToCapacityRatioArgs validates that RequestedToCapacityRatioArgs are correct. +func ValidateRequestedToCapacityRatioArgs(args config.RequestedToCapacityRatioArgs) error { + if err := validateFunctionShape(args.Shape); err != nil { + return err + } + if err := validateResourcesNoMax(args.Resources); err != nil { + return err + } + return nil +} + +func validateFunctionShape(shape []config.UtilizationShapePoint) error { + const ( + minUtilization = 0 + maxUtilization = 100 + minScore = 0 + maxScore = int32(config.MaxCustomPriorityScore) + ) + + if len(shape) == 0 { + return fmt.Errorf("at least one point must be specified") + } + + for i := 1; i < len(shape); i++ { + if shape[i-1].Utilization >= shape[i].Utilization { + return fmt.Errorf("utilization values must be sorted. Utilization[%d]==%d >= Utilization[%d]==%d", i-1, shape[i-1].Utilization, i, shape[i].Utilization) + } + } + + for i, point := range shape { + if point.Utilization < minUtilization { + return fmt.Errorf("utilization values must not be less than %d. Utilization[%d]==%d", minUtilization, i, point.Utilization) + } + if point.Utilization > maxUtilization { + return fmt.Errorf("utilization values must not be greater than %d. Utilization[%d]==%d", maxUtilization, i, point.Utilization) + } + if point.Score < minScore { + return fmt.Errorf("score values must not be less than %d. Score[%d]==%d", minScore, i, point.Score) + } + if point.Score > maxScore { + return fmt.Errorf("score values must not be greater than %d. Score[%d]==%d", maxScore, i, point.Score) + } + } + + return nil +} + +// TODO potentially replace with validateResources +func validateResourcesNoMax(resources []config.ResourceSpec) error { + for _, r := range resources { + if r.Weight < 1 { + return fmt.Errorf("resource %s weight %d must not be less than 1", string(r.Name), r.Weight) + } + } + return nil +} + +// ValidateNodeResourcesLeastAllocatedArgs validates that NodeResourcesLeastAllocatedArgs are correct. +func ValidateNodeResourcesLeastAllocatedArgs(args *config.NodeResourcesLeastAllocatedArgs) error { + return validateResources(args.Resources) +} + +// ValidateNodeResourcesMostAllocatedArgs validates that NodeResourcesMostAllocatedArgs are correct. +func ValidateNodeResourcesMostAllocatedArgs(args *config.NodeResourcesMostAllocatedArgs) error { + return validateResources(args.Resources) +} + +func validateResources(resources []config.ResourceSpec) error { + for _, resource := range resources { + if resource.Weight <= 0 { + return fmt.Errorf("resource Weight of %v should be a positive value, got %v", resource.Name, resource.Weight) + } + if resource.Weight > 100 { + return fmt.Errorf("resource Weight of %v should be less than 100, got %v", resource.Name, resource.Weight) + } + } + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/zz_generated.deepcopy.go index 4b7c92369ca..cda2ce45aa2 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/zz_generated.deepcopy.go @@ -21,6 +21,7 @@ limitations under the License. package config import ( + v1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -32,6 +33,7 @@ func (in *Extender) DeepCopyInto(out *Extender) { *out = new(ExtenderTLSConfig) (*in).DeepCopyInto(*out) } + out.HTTPTimeout = in.HTTPTimeout if in.ManagedResources != nil { in, out := &in.ManagedResources, &out.ManagedResources *out = make([]ExtenderManagedResource, len(*in)) @@ -97,6 +99,31 @@ func (in *ExtenderTLSConfig) DeepCopy() *ExtenderTLSConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InterPodAffinityArgs) DeepCopyInto(out *InterPodAffinityArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InterPodAffinityArgs. +func (in *InterPodAffinityArgs) DeepCopy() *InterPodAffinityArgs { + if in == nil { + return nil + } + out := new(InterPodAffinityArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *InterPodAffinityArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeSchedulerConfiguration) DeepCopyInto(out *KubeSchedulerConfiguration) { *out = *in @@ -140,23 +167,6 @@ func (in *KubeSchedulerConfiguration) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeSchedulerLeaderElectionConfiguration) DeepCopyInto(out *KubeSchedulerLeaderElectionConfiguration) { - *out = *in - out.LeaderElectionConfiguration = in.LeaderElectionConfiguration - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerLeaderElectionConfiguration. -func (in *KubeSchedulerLeaderElectionConfiguration) DeepCopy() *KubeSchedulerLeaderElectionConfiguration { - if in == nil { - return nil - } - out := new(KubeSchedulerLeaderElectionConfiguration) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeSchedulerProfile) DeepCopyInto(out *KubeSchedulerProfile) { *out = *in @@ -222,6 +232,146 @@ func (in *LabelsPresence) DeepCopy() *LabelsPresence { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeLabelArgs) DeepCopyInto(out *NodeLabelArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.PresentLabels != nil { + in, out := &in.PresentLabels, &out.PresentLabels + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AbsentLabels != nil { + in, out := &in.AbsentLabels, &out.AbsentLabels + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PresentLabelsPreference != nil { + in, out := &in.PresentLabelsPreference, &out.PresentLabelsPreference + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AbsentLabelsPreference != nil { + in, out := &in.AbsentLabelsPreference, &out.AbsentLabelsPreference + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeLabelArgs. +func (in *NodeLabelArgs) DeepCopy() *NodeLabelArgs { + if in == nil { + return nil + } + out := new(NodeLabelArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeLabelArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourcesFitArgs) DeepCopyInto(out *NodeResourcesFitArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.IgnoredResources != nil { + in, out := &in.IgnoredResources, &out.IgnoredResources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.IgnoredResourceGroups != nil { + in, out := &in.IgnoredResourceGroups, &out.IgnoredResourceGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesFitArgs. +func (in *NodeResourcesFitArgs) DeepCopy() *NodeResourcesFitArgs { + if in == nil { + return nil + } + out := new(NodeResourcesFitArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeResourcesFitArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourcesLeastAllocatedArgs) DeepCopyInto(out *NodeResourcesLeastAllocatedArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]ResourceSpec, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesLeastAllocatedArgs. +func (in *NodeResourcesLeastAllocatedArgs) DeepCopy() *NodeResourcesLeastAllocatedArgs { + if in == nil { + return nil + } + out := new(NodeResourcesLeastAllocatedArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeResourcesLeastAllocatedArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeResourcesMostAllocatedArgs) DeepCopyInto(out *NodeResourcesMostAllocatedArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]ResourceSpec, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeResourcesMostAllocatedArgs. +func (in *NodeResourcesMostAllocatedArgs) DeepCopy() *NodeResourcesMostAllocatedArgs { + if in == nil { + return nil + } + out := new(NodeResourcesMostAllocatedArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NodeResourcesMostAllocatedArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Plugin) DeepCopyInto(out *Plugin) { *out = *in @@ -241,7 +391,9 @@ func (in *Plugin) DeepCopy() *Plugin { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PluginConfig) DeepCopyInto(out *PluginConfig) { *out = *in - in.Args.DeepCopyInto(&out.Args) + if in.Args != nil { + out.Args = in.Args.DeepCopyObject() + } return } @@ -299,6 +451,11 @@ func (in *Plugins) DeepCopyInto(out *Plugins) { *out = new(PluginSet) (*in).DeepCopyInto(*out) } + if in.PostFilter != nil { + in, out := &in.PostFilter, &out.PostFilter + *out = new(PluginSet) + (*in).DeepCopyInto(*out) + } if in.PreScore != nil { in, out := &in.PreScore, &out.PreScore *out = new(PluginSet) @@ -334,11 +491,6 @@ func (in *Plugins) DeepCopyInto(out *Plugins) { *out = new(PluginSet) (*in).DeepCopyInto(*out) } - if in.Unreserve != nil { - in, out := &in.Unreserve, &out.Unreserve - *out = new(PluginSet) - (*in).DeepCopyInto(*out) - } return } @@ -352,6 +504,38 @@ func (in *Plugins) DeepCopy() *Plugins { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodTopologySpreadArgs) DeepCopyInto(out *PodTopologySpreadArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.DefaultConstraints != nil { + in, out := &in.DefaultConstraints, &out.DefaultConstraints + *out = make([]v1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTopologySpreadArgs. +func (in *PodTopologySpreadArgs) DeepCopy() *PodTopologySpreadArgs { + if in == nil { + return nil + } + out := new(PodTopologySpreadArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PodTopologySpreadArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Policy) DeepCopyInto(out *Policy) { *out = *in @@ -497,6 +681,41 @@ func (in *PriorityPolicy) DeepCopy() *PriorityPolicy { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequestedToCapacityRatioArgs) DeepCopyInto(out *RequestedToCapacityRatioArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Shape != nil { + in, out := &in.Shape, &out.Shape + *out = make([]UtilizationShapePoint, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]ResourceSpec, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestedToCapacityRatioArgs. +func (in *RequestedToCapacityRatioArgs) DeepCopy() *RequestedToCapacityRatioArgs { + if in == nil { + return nil + } + out := new(RequestedToCapacityRatioArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RequestedToCapacityRatioArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RequestedToCapacityRatioArguments) DeepCopyInto(out *RequestedToCapacityRatioArguments) { *out = *in @@ -644,6 +863,41 @@ func (in *ServiceAffinity) DeepCopy() *ServiceAffinity { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceAffinityArgs) DeepCopyInto(out *ServiceAffinityArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.AffinityLabels != nil { + in, out := &in.AffinityLabels, &out.AffinityLabels + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AntiAffinityLabelsPreference != nil { + in, out := &in.AntiAffinityLabelsPreference, &out.AntiAffinityLabelsPreference + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAffinityArgs. +func (in *ServiceAffinityArgs) DeepCopy() *ServiceAffinityArgs { + if in == nil { + return nil + } + out := new(ServiceAffinityArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ServiceAffinityArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceAntiAffinity) DeepCopyInto(out *ServiceAntiAffinity) { *out = *in @@ -675,3 +929,28 @@ func (in *UtilizationShapePoint) DeepCopy() *UtilizationShapePoint { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeBindingArgs) DeepCopyInto(out *VolumeBindingArgs) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeBindingArgs. +func (in *VolumeBindingArgs) DeepCopy() *VolumeBindingArgs { + if in == nil { + return nil + } + out := new(VolumeBindingArgs) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VolumeBindingArgs) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/core/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/core/BUILD index baa45505b3f..738289a2d8a 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/core/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/core/BUILD @@ -10,27 +10,24 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/api/v1/pod:go_default_library", + "//pkg/features:go_default_library", "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", - "//pkg/scheduler/internal/queue:go_default_library", - "//pkg/scheduler/listers:go_default_library", + "//pkg/scheduler/internal/parallelize:go_default_library", "//pkg/scheduler/metrics:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//pkg/scheduler/profile:go_default_library", "//pkg/scheduler/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", - "//staging/src/k8s.io/client-go/listers/policy/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", - "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//staging/src/k8s.io/kube-scheduler/extender/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", ], ) @@ -43,33 +40,21 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//pkg/api/v1/pod:go_default_library", - "//pkg/controller/volume/scheduling:go_default_library", "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/framework/plugins/defaultbinder:go_default_library", - "//pkg/scheduler/framework/plugins/defaultpodtopologyspread:go_default_library", - "//pkg/scheduler/framework/plugins/interpodaffinity:go_default_library", - "//pkg/scheduler/framework/plugins/nodeaffinity:go_default_library", - "//pkg/scheduler/framework/plugins/nodelabel:go_default_library", - "//pkg/scheduler/framework/plugins/nodename:go_default_library", "//pkg/scheduler/framework/plugins/noderesources:go_default_library", - "//pkg/scheduler/framework/plugins/nodeunschedulable:go_default_library", "//pkg/scheduler/framework/plugins/podtopologyspread:go_default_library", "//pkg/scheduler/framework/plugins/queuesort:go_default_library", - "//pkg/scheduler/framework/plugins/tainttoleration:go_default_library", - "//pkg/scheduler/framework/plugins/volumerestrictions:go_default_library", - "//pkg/scheduler/framework/plugins/volumezone:go_default_library", + "//pkg/scheduler/framework/plugins/selectorspread:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", + "//pkg/scheduler/framework/v1alpha1/fake:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", "//pkg/scheduler/internal/queue:go_default_library", - "//pkg/scheduler/listers:go_default_library", - "//pkg/scheduler/listers/fake:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//pkg/scheduler/profile:go_default_library", "//pkg/scheduler/testing:go_default_library", "//pkg/scheduler/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", @@ -78,7 +63,6 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", - "//staging/src/k8s.io/kube-scheduler/extender/v1:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/core/extender.go b/vendor/k8s.io/kubernetes/pkg/scheduler/core/extender.go index 2bcbb990c2d..b0e883f8d03 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/core/extender.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/core/extender.go @@ -24,14 +24,13 @@ import ( "strings" "time" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/sets" restclient "k8s.io/client-go/rest" extenderv1 "k8s.io/kube-scheduler/extender/v1" schedulerapi "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/listers" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) const ( @@ -39,55 +38,7 @@ const ( DefaultExtenderTimeout = 5 * time.Second ) -// SchedulerExtender is an interface for external processes to influence scheduling -// decisions made by Kubernetes. This is typically needed for resources not directly -// managed by Kubernetes. -type SchedulerExtender interface { - // Name returns a unique name that identifies the extender. - Name() string - - // Filter based on extender-implemented predicate functions. The filtered list is - // expected to be a subset of the supplied list. failedNodesMap optionally contains - // the list of failed nodes and failure reasons. - Filter(pod *v1.Pod, nodes []*v1.Node) (filteredNodes []*v1.Node, failedNodesMap extenderv1.FailedNodesMap, err error) - - // Prioritize based on extender-implemented priority functions. The returned scores & weight - // are used to compute the weighted score for an extender. The weighted scores are added to - // the scores computed by Kubernetes scheduler. The total scores are used to do the host selection. - Prioritize(pod *v1.Pod, nodes []*v1.Node) (hostPriorities *extenderv1.HostPriorityList, weight int64, err error) - - // Bind delegates the action of binding a pod to a node to the extender. - Bind(binding *v1.Binding) error - - // IsBinder returns whether this extender is configured for the Bind method. - IsBinder() bool - - // IsInterested returns true if at least one extended resource requested by - // this pod is managed by this extender. - IsInterested(pod *v1.Pod) bool - - // ProcessPreemption returns nodes with their victim pods processed by extender based on - // given: - // 1. Pod to schedule - // 2. Candidate nodes and victim pods (nodeToVictims) generated by previous scheduling process. - // 3. nodeNameToInfo to restore v1.Node from node name if extender cache is enabled. - // The possible changes made by extender may include: - // 1. Subset of given candidate nodes after preemption phase of extender. - // 2. A different set of victim pod for every given candidate node after preemption phase of extender. - ProcessPreemption( - pod *v1.Pod, - nodeToVictims map[*v1.Node]*extenderv1.Victims, - nodeInfos listers.NodeInfoLister) (map[*v1.Node]*extenderv1.Victims, error) - - // SupportsPreemption returns if the scheduler extender support preemption or not. - SupportsPreemption() bool - - // IsIgnorable returns true indicates scheduling should not fail when this extender - // is unavailable. This gives scheduler ability to fail fast and tolerate non-critical extenders as well. - IsIgnorable() bool -} - -// HTTPExtender implements the SchedulerExtender interface. +// HTTPExtender implements the Extender interface. type HTTPExtender struct { extenderURL string preemptVerb string @@ -132,9 +83,9 @@ func makeTransport(config *schedulerapi.Extender) (http.RoundTripper, error) { } // NewHTTPExtender creates an HTTPExtender object. -func NewHTTPExtender(config *schedulerapi.Extender) (SchedulerExtender, error) { - if config.HTTPTimeout.Nanoseconds() == 0 { - config.HTTPTimeout = time.Duration(DefaultExtenderTimeout) +func NewHTTPExtender(config *schedulerapi.Extender) (framework.Extender, error) { + if config.HTTPTimeout.Duration.Nanoseconds() == 0 { + config.HTTPTimeout.Duration = time.Duration(DefaultExtenderTimeout) } transport, err := makeTransport(config) @@ -143,7 +94,7 @@ func NewHTTPExtender(config *schedulerapi.Extender) (SchedulerExtender, error) { } client := &http.Client{ Transport: transport, - Timeout: config.HTTPTimeout, + Timeout: config.HTTPTimeout.Duration, } managedResources := sets.NewString() for _, r := range config.ManagedResources { @@ -213,9 +164,9 @@ func (h *HTTPExtender) SupportsPreemption() bool { // ProcessPreemption returns filtered candidate nodes and victims after running preemption logic in extender. func (h *HTTPExtender) ProcessPreemption( pod *v1.Pod, - nodeToVictims map[*v1.Node]*extenderv1.Victims, - nodeInfos listers.NodeInfoLister, -) (map[*v1.Node]*extenderv1.Victims, error) { + nodeNameToVictims map[string]*extenderv1.Victims, + nodeInfos framework.NodeInfoLister, +) (map[string]*extenderv1.Victims, error) { var ( result extenderv1.ExtenderPreemptionResult args *extenderv1.ExtenderPreemptionArgs @@ -227,13 +178,12 @@ func (h *HTTPExtender) ProcessPreemption( if h.nodeCacheCapable { // If extender has cached node info, pass NodeNameToMetaVictims in args. - nodeNameToMetaVictims := convertToNodeNameToMetaVictims(nodeToVictims) + nodeNameToMetaVictims := convertToNodeNameToMetaVictims(nodeNameToVictims) args = &extenderv1.ExtenderPreemptionArgs{ Pod: pod, NodeNameToMetaVictims: nodeNameToMetaVictims, } } else { - nodeNameToVictims := convertToNodeNameToVictims(nodeToVictims) args = &extenderv1.ExtenderPreemptionArgs{ Pod: pod, NodeNameToVictims: nodeNameToVictims, @@ -245,22 +195,22 @@ func (h *HTTPExtender) ProcessPreemption( } // Extender will always return NodeNameToMetaVictims. - // So let's convert it to NodeToVictims by using NodeNameToInfo. - newNodeToVictims, err := h.convertToNodeToVictims(result.NodeNameToMetaVictims, nodeInfos) + // So let's convert it to NodeNameToVictims by using . + newNodeNameToVictims, err := h.convertToNodeNameToVictims(result.NodeNameToMetaVictims, nodeInfos) if err != nil { return nil, err } - // Do not override nodeToVictims - return newNodeToVictims, nil + // Do not override . + return newNodeNameToVictims, nil } -// convertToNodeToVictims converts "nodeNameToMetaVictims" from object identifiers, +// convertToNodeNameToVictims converts "nodeNameToMetaVictims" from object identifiers, // such as UIDs and names, to object pointers. -func (h *HTTPExtender) convertToNodeToVictims( +func (h *HTTPExtender) convertToNodeNameToVictims( nodeNameToMetaVictims map[string]*extenderv1.MetaVictims, - nodeInfos listers.NodeInfoLister, -) (map[*v1.Node]*extenderv1.Victims, error) { - nodeToVictims := map[*v1.Node]*extenderv1.Victims{} + nodeInfos framework.NodeInfoLister, +) (map[string]*extenderv1.Victims, error) { + nodeNameToVictims := map[string]*extenderv1.Victims{} for nodeName, metaVictims := range nodeNameToMetaVictims { nodeInfo, err := nodeInfos.Get(nodeName) if err != nil { @@ -276,9 +226,9 @@ func (h *HTTPExtender) convertToNodeToVictims( } victims.Pods = append(victims.Pods, pod) } - nodeToVictims[nodeInfo.Node()] = victims + nodeNameToVictims[nodeName] = victims } - return nodeToVictims, nil + return nodeNameToVictims, nil } // convertPodUIDToPod returns v1.Pod object for given MetaPod and node info. @@ -287,10 +237,10 @@ func (h *HTTPExtender) convertToNodeToVictims( // and extender, i.e. when the pod is not found in nodeInfo.Pods. func (h *HTTPExtender) convertPodUIDToPod( metaPod *extenderv1.MetaPod, - nodeInfo *schedulernodeinfo.NodeInfo) (*v1.Pod, error) { - for _, pod := range nodeInfo.Pods() { - if string(pod.UID) == metaPod.UID { - return pod, nil + nodeInfo *framework.NodeInfo) (*v1.Pod, error) { + for _, p := range nodeInfo.Pods { + if string(p.Pod.UID) == metaPod.UID { + return p.Pod, nil } } return nil, fmt.Errorf("extender: %v claims to preempt pod (UID: %v) on node: %v, but the pod is not found on that node", @@ -299,10 +249,10 @@ func (h *HTTPExtender) convertPodUIDToPod( // convertToNodeNameToMetaVictims converts from struct type to meta types. func convertToNodeNameToMetaVictims( - nodeToVictims map[*v1.Node]*extenderv1.Victims, + nodeNameToVictims map[string]*extenderv1.Victims, ) map[string]*extenderv1.MetaVictims { - nodeNameToVictims := map[string]*extenderv1.MetaVictims{} - for node, victims := range nodeToVictims { + nodeNameToMetaVictims := map[string]*extenderv1.MetaVictims{} + for node, victims := range nodeNameToVictims { metaVictims := &extenderv1.MetaVictims{ Pods: []*extenderv1.MetaPod{}, } @@ -312,20 +262,9 @@ func convertToNodeNameToMetaVictims( } metaVictims.Pods = append(metaVictims.Pods, metaPod) } - nodeNameToVictims[node.GetName()] = metaVictims + nodeNameToMetaVictims[node] = metaVictims } - return nodeNameToVictims -} - -// convertToNodeNameToVictims converts from node type to node name as key. -func convertToNodeNameToVictims( - nodeToVictims map[*v1.Node]*extenderv1.Victims, -) map[string]*extenderv1.Victims { - nodeNameToVictims := map[string]*extenderv1.Victims{} - for node, victims := range nodeToVictims { - nodeNameToVictims[node.GetName()] = victims - } - return nodeNameToVictims + return nodeNameToMetaVictims } // Filter based on extender implemented predicate functions. The filtered list is diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/core/generic_scheduler.go b/vendor/k8s.io/kubernetes/pkg/scheduler/core/generic_scheduler.go index cbd76275740..491d6a3eaa5 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/core/generic_scheduler.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/core/generic_scheduler.go @@ -19,7 +19,6 @@ package core import ( "context" "fmt" - "math" "math/rand" "sort" "strings" @@ -27,23 +26,20 @@ import ( "sync/atomic" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" - policy "k8s.io/api/policy/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" + utilfeature "k8s.io/apiserver/pkg/util/feature" corelisters "k8s.io/client-go/listers/core/v1" - policylisters "k8s.io/client-go/listers/policy/v1beta1" - "k8s.io/client-go/util/workqueue" extenderv1 "k8s.io/kube-scheduler/extender/v1" podutil "k8s.io/kubernetes/pkg/api/v1/pod" + "k8s.io/kubernetes/pkg/features" + "k8s.io/kubernetes/pkg/scheduler/framework/runtime" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache" - internalqueue "k8s.io/kubernetes/pkg/scheduler/internal/queue" - "k8s.io/kubernetes/pkg/scheduler/listers" + "k8s.io/kubernetes/pkg/scheduler/internal/parallelize" "k8s.io/kubernetes/pkg/scheduler/metrics" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" "k8s.io/kubernetes/pkg/scheduler/profile" "k8s.io/kubernetes/pkg/scheduler/util" utiltrace "k8s.io/utils/trace" @@ -103,14 +99,9 @@ func (f *FitError) Error() string { // TODO: Rename this type. type ScheduleAlgorithm interface { Schedule(context.Context, *profile.Profile, *framework.CycleState, *v1.Pod) (scheduleResult ScheduleResult, err error) - // Preempt receives scheduling errors for a pod and tries to create room for - // the pod by preempting lower priority pods if possible. - // It returns the node where preemption happened, a list of preempted pods, a - // list of pods whose nominated node name should be removed, and error if any. - Preempt(context.Context, *profile.Profile, *framework.CycleState, *v1.Pod, error) (selectedNode *v1.Node, preemptedPods []*v1.Pod, cleanupNominatedPods []*v1.Pod, err error) - // Prioritizers returns a slice of priority config. This is exposed for + // Extenders returns a slice of extender config. This is exposed for // testing. - Extenders() []SchedulerExtender + Extenders() []framework.Extender } // ScheduleResult represents the result of one pod scheduled. It will contain @@ -126,14 +117,11 @@ type ScheduleResult struct { type genericScheduler struct { cache internalcache.Cache - schedulingQueue internalqueue.SchedulingQueue - extenders []SchedulerExtender + extenders []framework.Extender nodeInfoSnapshot *internalcache.Snapshot pvcLister corelisters.PersistentVolumeClaimLister - pdbLister policylisters.PodDisruptionBudgetLister disablePreemption bool percentageOfNodesToScore int32 - enableNonPreempting bool nextStartNodeIndex int } @@ -165,21 +153,14 @@ func (g *genericScheduler) Schedule(ctx context.Context, prof *profile.Profile, return result, ErrNoNodesAvailable } - // Run "prefilter" plugins. - preFilterStatus := prof.RunPreFilterPlugins(ctx, state, pod) - if !preFilterStatus.IsSuccess() { - return result, preFilterStatus.AsError() - } - trace.Step("Running prefilter plugins done") - startPredicateEvalTime := time.Now() - filteredNodes, filteredNodesStatuses, err := g.findNodesThatFitPod(ctx, prof, state, pod) + feasibleNodes, filteredNodesStatuses, err := g.findNodesThatFitPod(ctx, prof, state, pod) if err != nil { return result, err } trace.Step("Computing predicates done") - if len(filteredNodes) == 0 { + if len(feasibleNodes) == 0 { return result, &FitError{ Pod: pod, NumAllNodes: g.nodeInfoSnapshot.NumNodes(), @@ -187,28 +168,21 @@ func (g *genericScheduler) Schedule(ctx context.Context, prof *profile.Profile, } } - // Run "prescore" plugins. - prescoreStatus := prof.RunPreScorePlugins(ctx, state, pod, filteredNodes) - if !prescoreStatus.IsSuccess() { - return result, prescoreStatus.AsError() - } - trace.Step("Running prescore plugins done") - metrics.DeprecatedSchedulingAlgorithmPredicateEvaluationSecondsDuration.Observe(metrics.SinceInSeconds(startPredicateEvalTime)) metrics.DeprecatedSchedulingDuration.WithLabelValues(metrics.PredicateEvaluation).Observe(metrics.SinceInSeconds(startPredicateEvalTime)) startPriorityEvalTime := time.Now() // When only one node after predicate, just use it. - if len(filteredNodes) == 1 { + if len(feasibleNodes) == 1 { metrics.DeprecatedSchedulingAlgorithmPriorityEvaluationSecondsDuration.Observe(metrics.SinceInSeconds(startPriorityEvalTime)) return ScheduleResult{ - SuggestedHost: filteredNodes[0].Name, + SuggestedHost: feasibleNodes[0].Name, EvaluatedNodes: 1 + len(filteredNodesStatuses), FeasibleNodes: 1, }, nil } - priorityList, err := g.prioritizeNodes(ctx, prof, state, pod, filteredNodes) + priorityList, err := g.prioritizeNodes(ctx, prof, state, pod, feasibleNodes) if err != nil { return result, err } @@ -221,12 +195,12 @@ func (g *genericScheduler) Schedule(ctx context.Context, prof *profile.Profile, return ScheduleResult{ SuggestedHost: host, - EvaluatedNodes: len(filteredNodes) + len(filteredNodesStatuses), - FeasibleNodes: len(filteredNodes), + EvaluatedNodes: len(feasibleNodes) + len(filteredNodesStatuses), + FeasibleNodes: len(feasibleNodes), }, err } -func (g *genericScheduler) Extenders() []SchedulerExtender { +func (g *genericScheduler) Extenders() []framework.Extender { return g.extenders } @@ -255,136 +229,6 @@ func (g *genericScheduler) selectHost(nodeScoreList framework.NodeScoreList) (st return selected, nil } -// preempt finds nodes with pods that can be preempted to make room for "pod" to -// schedule. It chooses one of the nodes and preempts the pods on the node and -// returns 1) the node, 2) the list of preempted pods if such a node is found, -// 3) A list of pods whose nominated node name should be cleared, and 4) any -// possible error. -// Preempt does not update its snapshot. It uses the same snapshot used in the -// scheduling cycle. This is to avoid a scenario where preempt finds feasible -// nodes without preempting any pod. When there are many pending pods in the -// scheduling queue a nominated pod will go back to the queue and behind -// other pods with the same priority. The nominated pod prevents other pods from -// using the nominated resources and the nominated pod could take a long time -// before it is retried after many other pending pods. -func (g *genericScheduler) Preempt(ctx context.Context, prof *profile.Profile, state *framework.CycleState, pod *v1.Pod, scheduleErr error) (*v1.Node, []*v1.Pod, []*v1.Pod, error) { - // Scheduler may return various types of errors. Consider preemption only if - // the error is of type FitError. - fitError, ok := scheduleErr.(*FitError) - if !ok || fitError == nil { - return nil, nil, nil, nil - } - if !podEligibleToPreemptOthers(pod, g.nodeInfoSnapshot.NodeInfos(), g.enableNonPreempting) { - klog.V(5).Infof("Pod %v/%v is not eligible for more preemption.", pod.Namespace, pod.Name) - return nil, nil, nil, nil - } - allNodes, err := g.nodeInfoSnapshot.NodeInfos().List() - if err != nil { - return nil, nil, nil, err - } - if len(allNodes) == 0 { - return nil, nil, nil, ErrNoNodesAvailable - } - potentialNodes := nodesWherePreemptionMightHelp(allNodes, fitError) - if len(potentialNodes) == 0 { - klog.V(3).Infof("Preemption will not help schedule pod %v/%v on any node.", pod.Namespace, pod.Name) - // In this case, we should clean-up any existing nominated node name of the pod. - return nil, nil, []*v1.Pod{pod}, nil - } - var pdbs []*policy.PodDisruptionBudget - if g.pdbLister != nil { - pdbs, err = g.pdbLister.List(labels.Everything()) - if err != nil { - return nil, nil, nil, err - } - } - nodeToVictims, err := g.selectNodesForPreemption(ctx, prof, state, pod, potentialNodes, pdbs) - if err != nil { - return nil, nil, nil, err - } - - // We will only check nodeToVictims with extenders that support preemption. - // Extenders which do not support preemption may later prevent preemptor from being scheduled on the nominated - // node. In that case, scheduler will find a different host for the preemptor in subsequent scheduling cycles. - nodeToVictims, err = g.processPreemptionWithExtenders(pod, nodeToVictims) - if err != nil { - return nil, nil, nil, err - } - - candidateNode := pickOneNodeForPreemption(nodeToVictims) - if candidateNode == nil { - return nil, nil, nil, nil - } - - // Lower priority pods nominated to run on this node, may no longer fit on - // this node. So, we should remove their nomination. Removing their - // nomination updates these pods and moves them to the active queue. It - // lets scheduler find another place for them. - nominatedPods := g.getLowerPriorityNominatedPods(pod, candidateNode.Name) - return candidateNode, nodeToVictims[candidateNode].Pods, nominatedPods, nil -} - -// processPreemptionWithExtenders processes preemption with extenders -func (g *genericScheduler) processPreemptionWithExtenders( - pod *v1.Pod, - nodeToVictims map[*v1.Node]*extenderv1.Victims, -) (map[*v1.Node]*extenderv1.Victims, error) { - if len(nodeToVictims) > 0 { - for _, extender := range g.extenders { - if extender.SupportsPreemption() && extender.IsInterested(pod) { - newNodeToVictims, err := extender.ProcessPreemption( - pod, - nodeToVictims, - g.nodeInfoSnapshot.NodeInfos(), - ) - if err != nil { - if extender.IsIgnorable() { - klog.Warningf("Skipping extender %v as it returned error %v and has ignorable flag set", - extender, err) - continue - } - return nil, err - } - - // Replace nodeToVictims with new result after preemption. So the - // rest of extenders can continue use it as parameter. - nodeToVictims = newNodeToVictims - - // If node list becomes empty, no preemption can happen regardless of other extenders. - if len(nodeToVictims) == 0 { - break - } - } - } - } - - return nodeToVictims, nil -} - -// getLowerPriorityNominatedPods returns pods whose priority is smaller than the -// priority of the given "pod" and are nominated to run on the given node. -// Note: We could possibly check if the nominated lower priority pods still fit -// and return those that no longer fit, but that would require lots of -// manipulation of NodeInfo and PreFilter state per nominated pod. It may not be -// worth the complexity, especially because we generally expect to have a very -// small number of nominated pods per node. -func (g *genericScheduler) getLowerPriorityNominatedPods(pod *v1.Pod, nodeName string) []*v1.Pod { - pods := g.schedulingQueue.NominatedPodsForNode(nodeName) - - if len(pods) == 0 { - return nil - } - - var lowerPriorityPods []*v1.Pod - podPriority := podutil.GetPodPriority(pod) - for _, p := range pods { - if podutil.GetPodPriority(p) < podPriority { - lowerPriorityPods = append(lowerPriorityPods, p) - } - } - return lowerPriorityPods -} - // numFeasibleNodesToFind returns the number of feasible nodes that once found, the scheduler stops // its search for more feasible nodes. func (g *genericScheduler) numFeasibleNodesToFind(numAllNodes int32) (numNodes int32) { @@ -413,16 +257,36 @@ func (g *genericScheduler) numFeasibleNodesToFind(numAllNodes int32) (numNodes i // filter plugins and filter extenders. func (g *genericScheduler) findNodesThatFitPod(ctx context.Context, prof *profile.Profile, state *framework.CycleState, pod *v1.Pod) ([]*v1.Node, framework.NodeToStatusMap, error) { filteredNodesStatuses := make(framework.NodeToStatusMap) - filtered, err := g.findNodesThatPassFilters(ctx, prof, state, pod, filteredNodesStatuses) + + // Run "prefilter" plugins. + s := prof.RunPreFilterPlugins(ctx, state, pod) + if !s.IsSuccess() { + if !s.IsUnschedulable() { + return nil, nil, s.AsError() + } + // All nodes will have the same status. Some non trivial refactoring is + // needed to avoid this copy. + allNodes, err := g.nodeInfoSnapshot.NodeInfos().List() + if err != nil { + return nil, nil, err + } + for _, n := range allNodes { + filteredNodesStatuses[n.Node().Name] = s + } + return nil, filteredNodesStatuses, nil + + } + + feasibleNodes, err := g.findNodesThatPassFilters(ctx, prof, state, pod, filteredNodesStatuses) if err != nil { return nil, nil, err } - filtered, err = g.findNodesThatPassExtenders(pod, filtered, filteredNodesStatuses) + feasibleNodes, err = g.findNodesThatPassExtenders(pod, feasibleNodes, filteredNodesStatuses) if err != nil { return nil, nil, err } - return filtered, filteredNodesStatuses, nil + return feasibleNodes, filteredNodesStatuses, nil } // findNodesThatPassFilters finds the nodes that fit the filter plugins. @@ -434,38 +298,39 @@ func (g *genericScheduler) findNodesThatPassFilters(ctx context.Context, prof *p numNodesToFind := g.numFeasibleNodesToFind(int32(len(allNodes))) - // Create filtered list with enough space to avoid growing it + // Create feasible list with enough space to avoid growing it // and allow assigning. - filtered := make([]*v1.Node, numNodesToFind) + feasibleNodes := make([]*v1.Node, numNodesToFind) if !prof.HasFilterPlugins() { - for i := range filtered { - filtered[i] = allNodes[i].Node() + length := len(allNodes) + for i := range feasibleNodes { + feasibleNodes[i] = allNodes[(g.nextStartNodeIndex+i)%length].Node() } - g.nextStartNodeIndex = (g.nextStartNodeIndex + len(filtered)) % len(allNodes) - return filtered, nil + g.nextStartNodeIndex = (g.nextStartNodeIndex + len(feasibleNodes)) % length + return feasibleNodes, nil } - errCh := util.NewErrorChannel() + errCh := parallelize.NewErrorChannel() var statusesLock sync.Mutex - var filteredLen int32 + var feasibleNodesLen int32 ctx, cancel := context.WithCancel(ctx) checkNode := func(i int) { // We check the nodes starting from where we left off in the previous scheduling cycle, // this is to make sure all nodes have the same chance of being examined across pods. nodeInfo := allNodes[(g.nextStartNodeIndex+i)%len(allNodes)] - fits, status, err := g.podPassesFiltersOnNode(ctx, prof, state, pod, nodeInfo) + fits, status, err := PodPassesFiltersOnNode(ctx, prof.PreemptHandle(), state, pod, nodeInfo) if err != nil { errCh.SendErrorWithCancel(err, cancel) return } if fits { - length := atomic.AddInt32(&filteredLen, 1) + length := atomic.AddInt32(&feasibleNodesLen, 1) if length > numNodesToFind { cancel() - atomic.AddInt32(&filteredLen, -1) + atomic.AddInt32(&feasibleNodesLen, -1) } else { - filtered[length-1] = nodeInfo.Node() + feasibleNodes[length-1] = nodeInfo.Node() } } else { statusesLock.Lock() @@ -482,32 +347,32 @@ func (g *genericScheduler) findNodesThatPassFilters(ctx context.Context, prof *p // We record Filter extension point latency here instead of in framework.go because framework.RunFilterPlugins // function is called for each node, whereas we want to have an overall latency for all nodes per scheduling cycle. // Note that this latency also includes latency for `addNominatedPods`, which calls framework.RunPreFilterAddPod. - metrics.FrameworkExtensionPointDuration.WithLabelValues(framework.Filter, statusCode.String()).Observe(metrics.SinceInSeconds(beginCheckNode)) + metrics.FrameworkExtensionPointDuration.WithLabelValues(runtime.Filter, statusCode.String(), prof.Name).Observe(metrics.SinceInSeconds(beginCheckNode)) }() // Stops searching for more nodes once the configured number of feasible nodes // are found. - workqueue.ParallelizeUntil(ctx, 16, len(allNodes), checkNode) - processedNodes := int(filteredLen) + len(statuses) + parallelize.Until(ctx, len(allNodes), checkNode) + processedNodes := int(feasibleNodesLen) + len(statuses) g.nextStartNodeIndex = (g.nextStartNodeIndex + processedNodes) % len(allNodes) - filtered = filtered[:filteredLen] + feasibleNodes = feasibleNodes[:feasibleNodesLen] if err := errCh.ReceiveError(); err != nil { statusCode = framework.Error return nil, err } - return filtered, nil + return feasibleNodes, nil } -func (g *genericScheduler) findNodesThatPassExtenders(pod *v1.Pod, filtered []*v1.Node, statuses framework.NodeToStatusMap) ([]*v1.Node, error) { +func (g *genericScheduler) findNodesThatPassExtenders(pod *v1.Pod, feasibleNodes []*v1.Node, statuses framework.NodeToStatusMap) ([]*v1.Node, error) { for _, extender := range g.extenders { - if len(filtered) == 0 { + if len(feasibleNodes) == 0 { break } if !extender.IsInterested(pod) { continue } - filteredList, failedMap, err := extender.Filter(pod, filtered) + feasibleList, failedMap, err := extender.Filter(pod, feasibleNodes) if err != nil { if extender.IsIgnorable() { klog.Warningf("Skipping extender %v as it returned error %v and has ignorable flag set", @@ -524,20 +389,20 @@ func (g *genericScheduler) findNodesThatPassExtenders(pod *v1.Pod, filtered []*v statuses[failedNodeName].AppendReason(failedMsg) } } - filtered = filteredList + feasibleNodes = feasibleList } - return filtered, nil + return feasibleNodes, nil } // addNominatedPods adds pods with equal or greater priority which are nominated // to run on the node. It returns 1) whether any pod was added, 2) augmented cycleState, // 3) augmented nodeInfo. -func (g *genericScheduler) addNominatedPods(ctx context.Context, prof *profile.Profile, pod *v1.Pod, state *framework.CycleState, nodeInfo *schedulernodeinfo.NodeInfo) (bool, *framework.CycleState, *schedulernodeinfo.NodeInfo, error) { - if g.schedulingQueue == nil || nodeInfo == nil || nodeInfo.Node() == nil { +func addNominatedPods(ctx context.Context, ph framework.PreemptHandle, pod *v1.Pod, state *framework.CycleState, nodeInfo *framework.NodeInfo) (bool, *framework.CycleState, *framework.NodeInfo, error) { + if ph == nil || nodeInfo == nil || nodeInfo.Node() == nil { // This may happen only in tests. return false, state, nodeInfo, nil } - nominatedPods := g.schedulingQueue.NominatedPodsForNode(nodeInfo.Node().Name) + nominatedPods := ph.NominatedPodsForNode(nodeInfo.Node().Name) if len(nominatedPods) == 0 { return false, state, nodeInfo, nil } @@ -547,7 +412,7 @@ func (g *genericScheduler) addNominatedPods(ctx context.Context, prof *profile.P for _, p := range nominatedPods { if podutil.GetPodPriority(p) >= podutil.GetPodPriority(pod) && p.UID != pod.UID { nodeInfoOut.AddPod(p) - status := prof.RunPreFilterExtensionAddPod(ctx, stateOut, pod, p, nodeInfoOut) + status := ph.RunPreFilterExtensionAddPod(ctx, stateOut, pod, p, nodeInfoOut) if !status.IsSuccess() { return false, state, nodeInfo, status.AsError() } @@ -557,7 +422,7 @@ func (g *genericScheduler) addNominatedPods(ctx context.Context, prof *profile.P return podsAdded, stateOut, nodeInfoOut, nil } -// podPassesFiltersOnNode checks whether a node given by NodeInfo satisfies the +// PodPassesFiltersOnNode checks whether a node given by NodeInfo satisfies the // filter plugins. // This function is called from two different places: Schedule and Preempt. // When it is called from Schedule, we want to test whether the pod is @@ -567,12 +432,13 @@ func (g *genericScheduler) addNominatedPods(ctx context.Context, prof *profile.P // and add the nominated pods. Removal of the victims is done by // SelectVictimsOnNode(). Preempt removes victims from PreFilter state and // NodeInfo before calling this function. -func (g *genericScheduler) podPassesFiltersOnNode( +// TODO: move this out so that plugins don't need to depend on pkg. +func PodPassesFiltersOnNode( ctx context.Context, - prof *profile.Profile, + ph framework.PreemptHandle, state *framework.CycleState, pod *v1.Pod, - info *schedulernodeinfo.NodeInfo, + info *framework.NodeInfo, ) (bool, *framework.Status, error) { var status *framework.Status @@ -600,7 +466,7 @@ func (g *genericScheduler) podPassesFiltersOnNode( nodeInfoToUse := info if i == 0 { var err error - podsAdded, stateToUse, nodeInfoToUse, err = g.addNominatedPods(ctx, prof, pod, state, info) + podsAdded, stateToUse, nodeInfoToUse, err = addNominatedPods(ctx, ph, pod, state, info) if err != nil { return false, nil, err } @@ -608,7 +474,7 @@ func (g *genericScheduler) podPassesFiltersOnNode( break } - statusMap := prof.RunFilterPlugins(ctx, stateToUse, pod, nodeInfoToUse) + statusMap := ph.RunFilterPlugins(ctx, stateToUse, pod, nodeInfoToUse) status = statusMap.Merge() if !status.IsSuccess() && !status.IsUnschedulable() { return false, status, status.AsError() @@ -643,10 +509,22 @@ func (g *genericScheduler) prioritizeNodes( return result, nil } + // Run PreScore plugins. + preScoreStatus := prof.RunPreScorePlugins(ctx, state, pod, nodes) + if !preScoreStatus.IsSuccess() { + return nil, preScoreStatus.AsError() + } + // Run the Score plugins. scoresMap, scoreStatus := prof.RunScorePlugins(ctx, state, pod, nodes) if !scoreStatus.IsSuccess() { - return framework.NodeScoreList{}, scoreStatus.AsError() + return nil, scoreStatus.AsError() + } + + if klog.V(10).Enabled() { + for plugin, nodeScoreList := range scoresMap { + klog.Infof("Plugin %s scores on %v/%v => %v", plugin, pod.Namespace, pod.Name, nodeScoreList) + } } // Summarize all scores. @@ -682,7 +560,7 @@ func (g *genericScheduler) prioritizeNodes( mu.Lock() for i := range *prioritizedList { host, score := (*prioritizedList)[i].Host, (*prioritizedList)[i].Score - if klog.V(10) { + if klog.V(10).Enabled() { klog.Infof("%v -> %v: %v, Score: (%d)", util.GetPodFullName(pod), host, g.extenders[extIndex].Name(), score) } combinedScores[host] += score * weight @@ -699,7 +577,7 @@ func (g *genericScheduler) prioritizeNodes( } } - if klog.V(10) { + if klog.V(10).Enabled() { for i := range result { klog.Infof("Host %s => Score %d", result[i].Name, result[i].Score) } @@ -707,370 +585,6 @@ func (g *genericScheduler) prioritizeNodes( return result, nil } -// pickOneNodeForPreemption chooses one node among the given nodes. It assumes -// pods in each map entry are ordered by decreasing priority. -// It picks a node based on the following criteria: -// 1. A node with minimum number of PDB violations. -// 2. A node with minimum highest priority victim is picked. -// 3. Ties are broken by sum of priorities of all victims. -// 4. If there are still ties, node with the minimum number of victims is picked. -// 5. If there are still ties, node with the latest start time of all highest priority victims is picked. -// 6. If there are still ties, the first such node is picked (sort of randomly). -// The 'minNodes1' and 'minNodes2' are being reused here to save the memory -// allocation and garbage collection time. -func pickOneNodeForPreemption(nodesToVictims map[*v1.Node]*extenderv1.Victims) *v1.Node { - if len(nodesToVictims) == 0 { - return nil - } - minNumPDBViolatingPods := int64(math.MaxInt32) - var minNodes1 []*v1.Node - lenNodes1 := 0 - for node, victims := range nodesToVictims { - if len(victims.Pods) == 0 { - // We found a node that doesn't need any preemption. Return it! - // This should happen rarely when one or more pods are terminated between - // the time that scheduler tries to schedule the pod and the time that - // preemption logic tries to find nodes for preemption. - return node - } - numPDBViolatingPods := victims.NumPDBViolations - if numPDBViolatingPods < minNumPDBViolatingPods { - minNumPDBViolatingPods = numPDBViolatingPods - minNodes1 = nil - lenNodes1 = 0 - } - if numPDBViolatingPods == minNumPDBViolatingPods { - minNodes1 = append(minNodes1, node) - lenNodes1++ - } - } - if lenNodes1 == 1 { - return minNodes1[0] - } - - // There are more than one node with minimum number PDB violating pods. Find - // the one with minimum highest priority victim. - minHighestPriority := int32(math.MaxInt32) - var minNodes2 = make([]*v1.Node, lenNodes1) - lenNodes2 := 0 - for i := 0; i < lenNodes1; i++ { - node := minNodes1[i] - victims := nodesToVictims[node] - // highestPodPriority is the highest priority among the victims on this node. - highestPodPriority := podutil.GetPodPriority(victims.Pods[0]) - if highestPodPriority < minHighestPriority { - minHighestPriority = highestPodPriority - lenNodes2 = 0 - } - if highestPodPriority == minHighestPriority { - minNodes2[lenNodes2] = node - lenNodes2++ - } - } - if lenNodes2 == 1 { - return minNodes2[0] - } - - // There are a few nodes with minimum highest priority victim. Find the - // smallest sum of priorities. - minSumPriorities := int64(math.MaxInt64) - lenNodes1 = 0 - for i := 0; i < lenNodes2; i++ { - var sumPriorities int64 - node := minNodes2[i] - for _, pod := range nodesToVictims[node].Pods { - // We add MaxInt32+1 to all priorities to make all of them >= 0. This is - // needed so that a node with a few pods with negative priority is not - // picked over a node with a smaller number of pods with the same negative - // priority (and similar scenarios). - sumPriorities += int64(podutil.GetPodPriority(pod)) + int64(math.MaxInt32+1) - } - if sumPriorities < minSumPriorities { - minSumPriorities = sumPriorities - lenNodes1 = 0 - } - if sumPriorities == minSumPriorities { - minNodes1[lenNodes1] = node - lenNodes1++ - } - } - if lenNodes1 == 1 { - return minNodes1[0] - } - - // There are a few nodes with minimum highest priority victim and sum of priorities. - // Find one with the minimum number of pods. - minNumPods := math.MaxInt32 - lenNodes2 = 0 - for i := 0; i < lenNodes1; i++ { - node := minNodes1[i] - numPods := len(nodesToVictims[node].Pods) - if numPods < minNumPods { - minNumPods = numPods - lenNodes2 = 0 - } - if numPods == minNumPods { - minNodes2[lenNodes2] = node - lenNodes2++ - } - } - if lenNodes2 == 1 { - return minNodes2[0] - } - - // There are a few nodes with same number of pods. - // Find the node that satisfies latest(earliestStartTime(all highest-priority pods on node)) - latestStartTime := util.GetEarliestPodStartTime(nodesToVictims[minNodes2[0]]) - if latestStartTime == nil { - // If the earliest start time of all pods on the 1st node is nil, just return it, - // which is not expected to happen. - klog.Errorf("earliestStartTime is nil for node %s. Should not reach here.", minNodes2[0]) - return minNodes2[0] - } - nodeToReturn := minNodes2[0] - for i := 1; i < lenNodes2; i++ { - node := minNodes2[i] - // Get earliest start time of all pods on the current node. - earliestStartTimeOnNode := util.GetEarliestPodStartTime(nodesToVictims[node]) - if earliestStartTimeOnNode == nil { - klog.Errorf("earliestStartTime is nil for node %s. Should not reach here.", node) - continue - } - if earliestStartTimeOnNode.After(latestStartTime.Time) { - latestStartTime = earliestStartTimeOnNode - nodeToReturn = node - } - } - - return nodeToReturn -} - -// selectNodesForPreemption finds all the nodes with possible victims for -// preemption in parallel. -func (g *genericScheduler) selectNodesForPreemption( - ctx context.Context, - prof *profile.Profile, - state *framework.CycleState, - pod *v1.Pod, - potentialNodes []*schedulernodeinfo.NodeInfo, - pdbs []*policy.PodDisruptionBudget, -) (map[*v1.Node]*extenderv1.Victims, error) { - nodeToVictims := map[*v1.Node]*extenderv1.Victims{} - var resultLock sync.Mutex - - checkNode := func(i int) { - nodeInfoCopy := potentialNodes[i].Clone() - stateCopy := state.Clone() - pods, numPDBViolations, fits := g.selectVictimsOnNode(ctx, prof, stateCopy, pod, nodeInfoCopy, pdbs) - if fits { - resultLock.Lock() - victims := extenderv1.Victims{ - Pods: pods, - NumPDBViolations: int64(numPDBViolations), - } - nodeToVictims[potentialNodes[i].Node()] = &victims - resultLock.Unlock() - } - } - workqueue.ParallelizeUntil(context.TODO(), 16, len(potentialNodes), checkNode) - return nodeToVictims, nil -} - -// filterPodsWithPDBViolation groups the given "pods" into two groups of "violatingPods" -// and "nonViolatingPods" based on whether their PDBs will be violated if they are -// preempted. -// This function is stable and does not change the order of received pods. So, if it -// receives a sorted list, grouping will preserve the order of the input list. -func filterPodsWithPDBViolation(pods []*v1.Pod, pdbs []*policy.PodDisruptionBudget) (violatingPods, nonViolatingPods []*v1.Pod) { - pdbsAllowed := make([]int32, len(pdbs)) - for i, pdb := range pdbs { - pdbsAllowed[i] = pdb.Status.DisruptionsAllowed - } - - for _, obj := range pods { - pod := obj - pdbForPodIsViolated := false - // A pod with no labels will not match any PDB. So, no need to check. - if len(pod.Labels) != 0 { - for i, pdb := range pdbs { - if pdb.Namespace != pod.Namespace { - continue - } - selector, err := metav1.LabelSelectorAsSelector(pdb.Spec.Selector) - if err != nil { - continue - } - // A PDB with a nil or empty selector matches nothing. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - // We have found a matching PDB. - if pdbsAllowed[i] <= 0 { - pdbForPodIsViolated = true - break - } else { - pdbsAllowed[i]-- - } - } - } - if pdbForPodIsViolated { - violatingPods = append(violatingPods, pod) - } else { - nonViolatingPods = append(nonViolatingPods, pod) - } - } - return violatingPods, nonViolatingPods -} - -// selectVictimsOnNode finds minimum set of pods on the given node that should -// be preempted in order to make enough room for "pod" to be scheduled. The -// minimum set selected is subject to the constraint that a higher-priority pod -// is never preempted when a lower-priority pod could be (higher/lower relative -// to one another, not relative to the preemptor "pod"). -// The algorithm first checks if the pod can be scheduled on the node when all the -// lower priority pods are gone. If so, it sorts all the lower priority pods by -// their priority and then puts them into two groups of those whose PodDisruptionBudget -// will be violated if preempted and other non-violating pods. Both groups are -// sorted by priority. It first tries to reprieve as many PDB violating pods as -// possible and then does them same for non-PDB-violating pods while checking -// that the "pod" can still fit on the node. -// NOTE: This function assumes that it is never called if "pod" cannot be scheduled -// due to pod affinity, node affinity, or node anti-affinity reasons. None of -// these predicates can be satisfied by removing more pods from the node. -func (g *genericScheduler) selectVictimsOnNode( - ctx context.Context, - prof *profile.Profile, - state *framework.CycleState, - pod *v1.Pod, - nodeInfo *schedulernodeinfo.NodeInfo, - pdbs []*policy.PodDisruptionBudget, -) ([]*v1.Pod, int, bool) { - var potentialVictims []*v1.Pod - - removePod := func(rp *v1.Pod) error { - if err := nodeInfo.RemovePod(rp); err != nil { - return err - } - status := prof.RunPreFilterExtensionRemovePod(ctx, state, pod, rp, nodeInfo) - if !status.IsSuccess() { - return status.AsError() - } - return nil - } - addPod := func(ap *v1.Pod) error { - nodeInfo.AddPod(ap) - status := prof.RunPreFilterExtensionAddPod(ctx, state, pod, ap, nodeInfo) - if !status.IsSuccess() { - return status.AsError() - } - return nil - } - // As the first step, remove all the lower priority pods from the node and - // check if the given pod can be scheduled. - podPriority := podutil.GetPodPriority(pod) - for _, p := range nodeInfo.Pods() { - if podutil.GetPodPriority(p) < podPriority { - potentialVictims = append(potentialVictims, p) - if err := removePod(p); err != nil { - return nil, 0, false - } - } - } - // If the new pod does not fit after removing all the lower priority pods, - // we are almost done and this node is not suitable for preemption. The only - // condition that we could check is if the "pod" is failing to schedule due to - // inter-pod affinity to one or more victims, but we have decided not to - // support this case for performance reasons. Having affinity to lower - // priority pods is not a recommended configuration anyway. - if fits, _, err := g.podPassesFiltersOnNode(ctx, prof, state, pod, nodeInfo); !fits { - if err != nil { - klog.Warningf("Encountered error while selecting victims on node %v: %v", nodeInfo.Node().Name, err) - } - - return nil, 0, false - } - var victims []*v1.Pod - numViolatingVictim := 0 - sort.Slice(potentialVictims, func(i, j int) bool { return util.MoreImportantPod(potentialVictims[i], potentialVictims[j]) }) - // Try to reprieve as many pods as possible. We first try to reprieve the PDB - // violating victims and then other non-violating ones. In both cases, we start - // from the highest priority victims. - violatingVictims, nonViolatingVictims := filterPodsWithPDBViolation(potentialVictims, pdbs) - reprievePod := func(p *v1.Pod) (bool, error) { - if err := addPod(p); err != nil { - return false, err - } - fits, _, _ := g.podPassesFiltersOnNode(ctx, prof, state, pod, nodeInfo) - if !fits { - if err := removePod(p); err != nil { - return false, err - } - victims = append(victims, p) - klog.V(5).Infof("Pod %v/%v is a potential preemption victim on node %v.", p.Namespace, p.Name, nodeInfo.Node().Name) - } - return fits, nil - } - for _, p := range violatingVictims { - if fits, err := reprievePod(p); err != nil { - klog.Warningf("Failed to reprieve pod %q: %v", p.Name, err) - return nil, 0, false - } else if !fits { - numViolatingVictim++ - } - } - // Now we try to reprieve non-violating victims. - for _, p := range nonViolatingVictims { - if _, err := reprievePod(p); err != nil { - klog.Warningf("Failed to reprieve pod %q: %v", p.Name, err) - return nil, 0, false - } - } - return victims, numViolatingVictim, true -} - -// nodesWherePreemptionMightHelp returns a list of nodes with failed predicates -// that may be satisfied by removing pods from the node. -func nodesWherePreemptionMightHelp(nodes []*schedulernodeinfo.NodeInfo, fitErr *FitError) []*schedulernodeinfo.NodeInfo { - var potentialNodes []*schedulernodeinfo.NodeInfo - for _, node := range nodes { - name := node.Node().Name - // We reply on the status by each plugin - 'Unschedulable' or 'UnschedulableAndUnresolvable' - // to determine whether preemption may help or not on the node. - if fitErr.FilteredNodesStatuses[name].Code() == framework.UnschedulableAndUnresolvable { - continue - } - klog.V(3).Infof("Node %v is a potential node for preemption.", name) - potentialNodes = append(potentialNodes, node) - } - return potentialNodes -} - -// podEligibleToPreemptOthers determines whether this pod should be considered -// for preempting other pods or not. If this pod has already preempted other -// pods and those are in their graceful termination period, it shouldn't be -// considered for preemption. -// We look at the node that is nominated for this pod and as long as there are -// terminating pods on the node, we don't consider this for preempting more pods. -func podEligibleToPreemptOthers(pod *v1.Pod, nodeInfos listers.NodeInfoLister, enableNonPreempting bool) bool { - if enableNonPreempting && pod.Spec.PreemptionPolicy != nil && *pod.Spec.PreemptionPolicy == v1.PreemptNever { - klog.V(5).Infof("Pod %v/%v is not eligible for preemption because it has a preemptionPolicy of %v", pod.Namespace, pod.Name, v1.PreemptNever) - return false - } - nomNodeName := pod.Status.NominatedNodeName - if len(nomNodeName) > 0 { - if nodeInfo, _ := nodeInfos.Get(nomNodeName); nodeInfo != nil { - podPriority := podutil.GetPodPriority(pod) - for _, p := range nodeInfo.Pods() { - if p.DeletionTimestamp != nil && podutil.GetPodPriority(p) < podPriority { - // There is a terminating pod on the nominated node. - return false - } - } - } - } - return true -} - // podPassesBasicChecks makes sanity checks on the pod if it can be scheduled. func podPassesBasicChecks(pod *v1.Pod, pvcLister corelisters.PersistentVolumeClaimLister) error { // Check PVCs used by the pod @@ -1078,11 +592,19 @@ func podPassesBasicChecks(pod *v1.Pod, pvcLister corelisters.PersistentVolumeCla manifest := &(pod.Spec) for i := range manifest.Volumes { volume := &manifest.Volumes[i] - if volume.PersistentVolumeClaim == nil { - // Volume is not a PVC, ignore + var pvcName string + ephemeral := false + switch { + case volume.PersistentVolumeClaim != nil: + pvcName = volume.PersistentVolumeClaim.ClaimName + case volume.Ephemeral != nil && + utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume): + pvcName = pod.Name + "-" + volume.Name + ephemeral = true + default: + // Volume is not using a PVC, ignore continue } - pvcName := volume.PersistentVolumeClaim.ClaimName pvc, err := pvcLister.PersistentVolumeClaims(namespace).Get(pvcName) if err != nil { // The error has already enough context ("persistentvolumeclaim "myclaim" not found") @@ -1092,6 +614,11 @@ func podPassesBasicChecks(pod *v1.Pod, pvcLister corelisters.PersistentVolumeCla if pvc.DeletionTimestamp != nil { return fmt.Errorf("persistentvolumeclaim %q is being deleted", pvc.Name) } + + if ephemeral && + !metav1.IsControlledBy(pvc, pod) { + return fmt.Errorf("persistentvolumeclaim %q was not created for the pod", pvc.Name) + } } return nil @@ -1100,23 +627,17 @@ func podPassesBasicChecks(pod *v1.Pod, pvcLister corelisters.PersistentVolumeCla // NewGenericScheduler creates a genericScheduler object. func NewGenericScheduler( cache internalcache.Cache, - podQueue internalqueue.SchedulingQueue, nodeInfoSnapshot *internalcache.Snapshot, - extenders []SchedulerExtender, + extenders []framework.Extender, pvcLister corelisters.PersistentVolumeClaimLister, - pdbLister policylisters.PodDisruptionBudgetLister, disablePreemption bool, - percentageOfNodesToScore int32, - enableNonPreempting bool) ScheduleAlgorithm { + percentageOfNodesToScore int32) ScheduleAlgorithm { return &genericScheduler{ cache: cache, - schedulingQueue: podQueue, extenders: extenders, nodeInfoSnapshot: nodeInfoSnapshot, pvcLister: pvcLister, - pdbLister: pdbLister, disablePreemption: disablePreemption, percentageOfNodesToScore: percentageOfNodesToScore, - enableNonPreempting: enableNonPreempting, } } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/eventhandlers.go b/vendor/k8s.io/kubernetes/pkg/scheduler/eventhandlers.go index abeb455621c..1809fc84645 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/eventhandlers.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/eventhandlers.go @@ -20,7 +20,7 @@ import ( "fmt" "reflect" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" @@ -206,10 +206,6 @@ func (sched *Scheduler) deletePodFromSchedulingQueue(obj interface{}) { if err := sched.SchedulingQueue.Delete(pod); err != nil { utilruntime.HandleError(fmt.Errorf("unable to dequeue %T: %v", obj, err)) } - if sched.VolumeBinder != nil { - // Volume binder only wants to keep unassigned pods - sched.VolumeBinder.DeletePodBindings(pod) - } prof, err := sched.profileForPod(pod) if err != nil { // This shouldn't happen, because we only accept for scheduling the pods @@ -247,6 +243,15 @@ func (sched *Scheduler) updatePodInCache(oldObj, newObj interface{}) { return } + // A Pod delete event followed by an immediate Pod add event may be merged + // into a Pod update event. In this case, we should invalidate the old Pod, and + // then add the new Pod. + if oldPod.UID != newPod.UID { + sched.deletePodFromCache(oldObj) + sched.addPodToCache(newObj) + return + } + // NOTE: Updates must be written to scheduler cache before invalidating // equivalence cache, because we could snapshot equivalence cache after the // invalidation and then snapshot the cache itself. If the cache is diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/factory.go b/vendor/k8s.io/kubernetes/pkg/scheduler/factory.go index 03d3275f881..8165968d28a 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/factory.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/factory.go @@ -29,28 +29,22 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/informers" coreinformers "k8s.io/client-go/informers/core/v1" clientset "k8s.io/client-go/kubernetes" corelisters "k8s.io/client-go/listers/core/v1" - policylisters "k8s.io/client-go/listers/policy/v1beta1" "k8s.io/client-go/tools/cache" - "k8s.io/klog" - "k8s.io/kubernetes/pkg/controller/volume/scheduling" - kubefeatures "k8s.io/kubernetes/pkg/features" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/scheduler/algorithmprovider" schedulerapi "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" "k8s.io/kubernetes/pkg/scheduler/core" frameworkplugins "k8s.io/kubernetes/pkg/scheduler/framework/plugins" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort" + frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache" cachedebugger "k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger" @@ -58,11 +52,6 @@ import ( "k8s.io/kubernetes/pkg/scheduler/profile" ) -const ( - initialGetBackoff = 100 * time.Millisecond - maximalGetBackoff = time.Minute -) - // Binder knows how to write a binding. type Binder interface { Bind(binding *v1.Binding) error @@ -84,9 +73,6 @@ type Configurator struct { schedulerCache internalcache.Cache - // Handles volume binding decisions - volumeBinder scheduling.SchedulerVolumeBinder - // Disable pod preemption or not. disablePreemption bool @@ -96,39 +82,41 @@ type Configurator struct { // percentageOfNodesToScore specifies percentage of all nodes to score in each scheduling cycle. percentageOfNodesToScore int32 - bindTimeoutSeconds int64 - podInitialBackoffSeconds int64 podMaxBackoffSeconds int64 - enableNonPreempting bool - - profiles []schedulerapi.KubeSchedulerProfile - registry framework.Registry - nodeInfoSnapshot *internalcache.Snapshot - extenders []schedulerapi.Extender + profiles []schedulerapi.KubeSchedulerProfile + registry frameworkruntime.Registry + nodeInfoSnapshot *internalcache.Snapshot + extenders []schedulerapi.Extender + frameworkCapturer FrameworkCapturer } -func (c *Configurator) buildFramework(p schedulerapi.KubeSchedulerProfile) (framework.Framework, error) { - return framework.NewFramework( +func (c *Configurator) buildFramework(p schedulerapi.KubeSchedulerProfile, opts ...frameworkruntime.Option) (framework.Framework, error) { + if c.frameworkCapturer != nil { + c.frameworkCapturer(p) + } + opts = append([]frameworkruntime.Option{ + frameworkruntime.WithClientSet(c.client), + frameworkruntime.WithInformerFactory(c.informerFactory), + frameworkruntime.WithSnapshotSharedLister(c.nodeInfoSnapshot), + frameworkruntime.WithRunAllFilters(c.alwaysCheckAllPredicates), + }, opts...) + return frameworkruntime.NewFramework( c.registry, p.Plugins, p.PluginConfig, - framework.WithClientSet(c.client), - framework.WithInformerFactory(c.informerFactory), - framework.WithSnapshotSharedLister(c.nodeInfoSnapshot), - framework.WithRunAllFilters(c.alwaysCheckAllPredicates), - framework.WithVolumeBinder(c.volumeBinder), + opts..., ) } // create a scheduler from a set of registered plugins. func (c *Configurator) create() (*Scheduler, error) { - var extenders []core.SchedulerExtender + var extenders []framework.Extender var ignoredExtendedResources []string if len(c.extenders) != 0 { - var ignorableExtenders []core.SchedulerExtender + var ignorableExtenders []framework.Extender for ii := range c.extenders { klog.V(2).Infof("Creating extender with config %+v", c.extenders[ii]) extender, err := core.NewHTTPExtender(&c.extenders[ii]) @@ -151,23 +139,27 @@ func (c *Configurator) create() (*Scheduler, error) { } // If there are any extended resources found from the Extenders, append them to the pluginConfig for each profile. - // This should only have an effect on ComponentConfig v1alpha2, where it is possible to configure Extenders and + // This should only have an effect on ComponentConfig v1beta1, where it is possible to configure Extenders and // plugin args (and in which case the extender ignored resources take precedence). // For earlier versions, using both policy and custom plugin config is disallowed, so this should be the only // plugin config for this plugin. if len(ignoredExtendedResources) > 0 { for i := range c.profiles { prof := &c.profiles[i] - prof.PluginConfig = append(prof.PluginConfig, - frameworkplugins.NewPluginConfig( - noderesources.FitName, - noderesources.FitArgs{IgnoredResources: ignoredExtendedResources}, - ), - ) + pc := schedulerapi.PluginConfig{ + Name: noderesources.FitName, + Args: &schedulerapi.NodeResourcesFitArgs{ + IgnoredResources: ignoredExtendedResources, + }, + } + prof.PluginConfig = append(prof.PluginConfig, pc) } } - profiles, err := profile.NewMap(c.profiles, c.buildFramework, c.recorderFactory) + // The nominator will be passed all the way to framework instantiation. + nominator := internalqueue.NewPodNominator() + profiles, err := profile.NewMap(c.profiles, c.buildFramework, c.recorderFactory, + frameworkruntime.WithPodNominator(nominator)) if err != nil { return nil, fmt.Errorf("initializing profiles: %v", err) } @@ -180,6 +172,7 @@ func (c *Configurator) create() (*Scheduler, error) { lessFn, internalqueue.WithPodInitialBackoffDuration(time.Duration(c.podInitialBackoffSeconds)*time.Second), internalqueue.WithPodMaxBackoffDuration(time.Duration(c.podMaxBackoffSeconds)*time.Second), + internalqueue.WithPodNominator(nominator), ) // Setup cache debugger. @@ -193,14 +186,11 @@ func (c *Configurator) create() (*Scheduler, error) { algo := core.NewGenericScheduler( c.schedulerCache, - podQueue, c.nodeInfoSnapshot, extenders, c.informerFactory.Core().V1().PersistentVolumeClaims().Lister(), - GetPodDisruptionBudgetLister(c.informerFactory), c.disablePreemption, c.percentageOfNodesToScore, - c.enableNonPreempting, ) return &Scheduler{ @@ -208,9 +198,8 @@ func (c *Configurator) create() (*Scheduler, error) { Algorithm: algo, Profiles: profiles, NextPod: internalqueue.MakeNextPodFunc(podQueue), - Error: MakeDefaultErrorFunc(c.client, podQueue, c.schedulerCache), + Error: MakeDefaultErrorFunc(c.client, c.informerFactory.Core().V1().Pods().Lister(), podQueue, c.schedulerCache), StopEverything: c.StopEverything, - VolumeBinder: c.volumeBinder, SchedulingQueue: podQueue, }, nil } @@ -276,9 +265,8 @@ func (c *Configurator) createFromConfig(policy schedulerapi.Policy) (*Scheduler, // HardPodAffinitySymmetricWeight in the policy config takes precedence over // CLI configuration. if policy.HardPodAffinitySymmetricWeight != 0 { - v := policy.HardPodAffinitySymmetricWeight - args.InterPodAffinityArgs = &interpodaffinity.Args{ - HardPodAffinityWeight: &v, + args.InterPodAffinityArgs = &schedulerapi.InterPodAffinityArgs{ + HardPodAffinityWeight: policy.HardPodAffinitySymmetricWeight, } } @@ -320,16 +308,12 @@ func (c *Configurator) createFromConfig(policy schedulerapi.Policy) (*Scheduler, } for i := range c.profiles { prof := &c.profiles[i] - if prof.Plugins != nil { - return nil, errors.New("using Plugins and Policy simultaneously is not supported") - } + // Plugins are empty when using Policy. prof.Plugins = &schedulerapi.Plugins{} prof.Plugins.Append(&defPlugins) - if len(prof.PluginConfig) != 0 { - return nil, errors.New("using PluginConfig and Policy simultaneously is not supported") - } - prof.PluginConfig = append(prof.PluginConfig, defPluginConfig...) + // PluginConfig is ignored when using Policy. + prof.PluginConfig = defPluginConfig } return c.create() @@ -338,7 +322,7 @@ func (c *Configurator) createFromConfig(policy schedulerapi.Policy) (*Scheduler, // mergePluginConfigsFromPolicy merges the giving plugin configs ensuring that, // if a plugin name is repeated, the arguments are the same. func mergePluginConfigsFromPolicy(pc1, pc2 []schedulerapi.PluginConfig) ([]schedulerapi.PluginConfig, error) { - args := make(map[string]runtime.Unknown) + args := make(map[string]runtime.Object) for _, c := range pc1 { args[c.Name] = c.Args } @@ -452,77 +436,41 @@ func NewPodInformer(client clientset.Interface, resyncPeriod time.Duration) core } // MakeDefaultErrorFunc construct a function to handle pod scheduler error -func MakeDefaultErrorFunc(client clientset.Interface, podQueue internalqueue.SchedulingQueue, schedulerCache internalcache.Cache) func(*framework.PodInfo, error) { - return func(podInfo *framework.PodInfo, err error) { +func MakeDefaultErrorFunc(client clientset.Interface, podLister corelisters.PodLister, podQueue internalqueue.SchedulingQueue, schedulerCache internalcache.Cache) func(*framework.QueuedPodInfo, error) { + return func(podInfo *framework.QueuedPodInfo, err error) { pod := podInfo.Pod if err == core.ErrNoNodesAvailable { - klog.V(2).Infof("Unable to schedule %v/%v: no nodes are registered to the cluster; waiting", pod.Namespace, pod.Name) - } else { - if _, ok := err.(*core.FitError); ok { - klog.V(2).Infof("Unable to schedule %v/%v: no fit: %v; waiting", pod.Namespace, pod.Name, err) - } else if apierrors.IsNotFound(err) { - klog.V(2).Infof("Unable to schedule %v/%v: possibly due to node not found: %v; waiting", pod.Namespace, pod.Name, err) - if errStatus, ok := err.(apierrors.APIStatus); ok && errStatus.Status().Details.Kind == "node" { - nodeName := errStatus.Status().Details.Name - // when node is not found, We do not remove the node right away. Trying again to get - // the node and if the node is still not found, then remove it from the scheduler cache. - _, err := client.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) - if err != nil && apierrors.IsNotFound(err) { - node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: nodeName}} - if err := schedulerCache.RemoveNode(&node); err != nil { - klog.V(4).Infof("Node %q is not found; failed to remove it from the cache.", node.Name) - } + klog.V(2).InfoS("Unable to schedule pod; no nodes are registered to the cluster; waiting", "pod", klog.KObj(pod)) + } else if _, ok := err.(*core.FitError); ok { + klog.V(2).InfoS("Unable to schedule pod; no fit; waiting", "pod", klog.KObj(pod), "err", err) + } else if apierrors.IsNotFound(err) { + klog.V(2).Infof("Unable to schedule %v/%v: possibly due to node not found: %v; waiting", pod.Namespace, pod.Name, err) + if errStatus, ok := err.(apierrors.APIStatus); ok && errStatus.Status().Details.Kind == "node" { + nodeName := errStatus.Status().Details.Name + // when node is not found, We do not remove the node right away. Trying again to get + // the node and if the node is still not found, then remove it from the scheduler cache. + _, err := client.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) + if err != nil && apierrors.IsNotFound(err) { + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: nodeName}} + if err := schedulerCache.RemoveNode(&node); err != nil { + klog.V(4).Infof("Node %q is not found; failed to remove it from the cache.", node.Name) } } - } else { - klog.Errorf("Error scheduling %v/%v: %v; retrying", pod.Namespace, pod.Name, err) } + } else { + klog.ErrorS(err, "Error scheduling pod; retrying", "pod", klog.KObj(pod)) } - podSchedulingCycle := podQueue.SchedulingCycle() - // Retry asynchronously. - // Note that this is extremely rudimentary and we need a more real error handling path. - go func() { - defer utilruntime.HandleCrash() - podID := types.NamespacedName{ - Namespace: pod.Namespace, - Name: pod.Name, - } - - // An unschedulable pod will be placed in the unschedulable queue. - // This ensures that if the pod is nominated to run on a node, - // scheduler takes the pod into account when running predicates for the node. - // Get the pod again; it may have changed/been scheduled already. - getBackoff := initialGetBackoff - for { - pod, err := client.CoreV1().Pods(podID.Namespace).Get(context.TODO(), podID.Name, metav1.GetOptions{}) - if err == nil { - if len(pod.Spec.NodeName) == 0 { - podInfo.Pod = pod - if err := podQueue.AddUnschedulableIfNotPresent(podInfo, podSchedulingCycle); err != nil { - klog.Error(err) - } - } - break - } - if apierrors.IsNotFound(err) { - klog.Warningf("A pod %v no longer exists", podID) - return - } - klog.Errorf("Error getting pod %v for retry: %v; retrying...", podID, err) - if getBackoff = getBackoff * 2; getBackoff > maximalGetBackoff { - getBackoff = maximalGetBackoff - } - time.Sleep(getBackoff) - } - }() + // Check if the Pod exists in informer cache. + cachedPod, err := podLister.Pods(pod.Namespace).Get(pod.Name) + if err != nil { + klog.Warningf("Pod %v/%v doesn't exist in informer cache: %v", pod.Namespace, pod.Name, err) + return + } + // As is from SharedInformer, we need to do a DeepCopy() here. + podInfo.Pod = cachedPod.DeepCopy() + if err := podQueue.AddUnschedulableIfNotPresent(podInfo, podQueue.SchedulingCycle()); err != nil { + klog.Error(err) + } } } - -// GetPodDisruptionBudgetLister returns pdb lister from the given informer factory. Returns nil if PodDisruptionBudget feature is disabled. -func GetPodDisruptionBudgetLister(informerFactory informers.SharedInformerFactory) policylisters.PodDisruptionBudgetLister { - if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.PodDisruptionBudget) { - return informerFactory.Policy().V1beta1().PodDisruptionBudgets().Lister() - } - return nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/BUILD index 03dd18f3875..91620cf86fc 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/BUILD @@ -9,10 +9,9 @@ go_library( importpath = "k8s.io/kubernetes/pkg/scheduler/framework/plugins", visibility = ["//visibility:public"], deps = [ - "//pkg/features:go_default_library", "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/framework/plugins/defaultbinder:go_default_library", - "//pkg/scheduler/framework/plugins/defaultpodtopologyspread:go_default_library", + "//pkg/scheduler/framework/plugins/defaultpreemption:go_default_library", "//pkg/scheduler/framework/plugins/imagelocality:go_default_library", "//pkg/scheduler/framework/plugins/interpodaffinity:go_default_library", "//pkg/scheduler/framework/plugins/nodeaffinity:go_default_library", @@ -25,16 +24,15 @@ go_library( "//pkg/scheduler/framework/plugins/nodevolumelimits:go_default_library", "//pkg/scheduler/framework/plugins/podtopologyspread:go_default_library", "//pkg/scheduler/framework/plugins/queuesort:go_default_library", + "//pkg/scheduler/framework/plugins/selectorspread:go_default_library", "//pkg/scheduler/framework/plugins/serviceaffinity:go_default_library", "//pkg/scheduler/framework/plugins/tainttoleration:go_default_library", "//pkg/scheduler/framework/plugins/volumebinding:go_default_library", "//pkg/scheduler/framework/plugins/volumerestrictions:go_default_library", "//pkg/scheduler/framework/plugins/volumezone:go_default_library", - "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -50,7 +48,7 @@ filegroup( srcs = [ ":package-srcs", "//pkg/scheduler/framework/plugins/defaultbinder:all-srcs", - "//pkg/scheduler/framework/plugins/defaultpodtopologyspread:all-srcs", + "//pkg/scheduler/framework/plugins/defaultpreemption:all-srcs", "//pkg/scheduler/framework/plugins/examples:all-srcs", "//pkg/scheduler/framework/plugins/helper:all-srcs", "//pkg/scheduler/framework/plugins/imagelocality:all-srcs", @@ -65,6 +63,7 @@ filegroup( "//pkg/scheduler/framework/plugins/nodevolumelimits:all-srcs", "//pkg/scheduler/framework/plugins/podtopologyspread:all-srcs", "//pkg/scheduler/framework/plugins/queuesort:all-srcs", + "//pkg/scheduler/framework/plugins/selectorspread:all-srcs", "//pkg/scheduler/framework/plugins/serviceaffinity:all-srcs", "//pkg/scheduler/framework/plugins/tainttoleration:all-srcs", "//pkg/scheduler/framework/plugins/volumebinding:all-srcs", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/BUILD index e39de91ed18..003165618a2 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/BUILD @@ -10,7 +10,7 @@ go_library( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -19,7 +19,7 @@ go_test( srcs = ["default_binder_test.go"], embed = [":go_default_library"], deps = [ - "//pkg/scheduler/framework/v1alpha1:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go index 73525b17052..f3319dba412 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go @@ -22,7 +22,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/klog" + "k8s.io/klog/v2" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) @@ -37,7 +37,7 @@ type DefaultBinder struct { var _ framework.BindPlugin = &DefaultBinder{} // New creates a DefaultBinder. -func New(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { return &DefaultBinder{handle: handle}, nil } @@ -53,7 +53,7 @@ func (b DefaultBinder) Bind(ctx context.Context, state *framework.CycleState, p ObjectMeta: metav1.ObjectMeta{Namespace: p.Namespace, Name: p.Name, UID: p.UID}, Target: v1.ObjectReference{Kind: "Node", Name: nodeName}, } - err := b.handle.ClientSet().CoreV1().Pods(binding.Namespace).Bind(context.TODO(), binding, metav1.CreateOptions{}) + err := b.handle.ClientSet().CoreV1().Pods(binding.Namespace).Bind(ctx, binding, metav1.CreateOptions{}) if err != nil { return framework.NewStatus(framework.Error, err.Error()) } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/BUILD new file mode 100644 index 00000000000..2159a2e9bb8 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/BUILD @@ -0,0 +1,82 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "candidate.go", + "default_preemption.go", + ], + importpath = "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption", + visibility = ["//visibility:public"], + deps = [ + "//pkg/api/v1/pod:go_default_library", + "//pkg/features:go_default_library", + "//pkg/scheduler/core:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", + "//pkg/scheduler/internal/parallelize:go_default_library", + "//pkg/scheduler/metrics:go_default_library", + "//pkg/scheduler/util:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//staging/src/k8s.io/client-go/informers:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/listers/policy/v1beta1:go_default_library", + "//staging/src/k8s.io/kube-scheduler/extender/v1:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) + +go_test( + name = "go_default_test", + srcs = ["default_preemption_test.go"], + embed = [":go_default_library"], + deps = [ + "//pkg/controller/volume/scheduling:go_default_library", + "//pkg/scheduler/framework/plugins/defaultbinder:go_default_library", + "//pkg/scheduler/framework/plugins/interpodaffinity:go_default_library", + "//pkg/scheduler/framework/plugins/nodeaffinity:go_default_library", + "//pkg/scheduler/framework/plugins/nodelabel:go_default_library", + "//pkg/scheduler/framework/plugins/nodename:go_default_library", + "//pkg/scheduler/framework/plugins/noderesources:go_default_library", + "//pkg/scheduler/framework/plugins/nodeunschedulable:go_default_library", + "//pkg/scheduler/framework/plugins/podtopologyspread:go_default_library", + "//pkg/scheduler/framework/plugins/queuesort:go_default_library", + "//pkg/scheduler/framework/plugins/tainttoleration:go_default_library", + "//pkg/scheduler/framework/plugins/volumerestrictions:go_default_library", + "//pkg/scheduler/framework/plugins/volumezone:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", + "//pkg/scheduler/internal/cache:go_default_library", + "//pkg/scheduler/internal/queue:go_default_library", + "//pkg/scheduler/testing:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/client-go/informers:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + "//staging/src/k8s.io/client-go/testing:go_default_library", + "//staging/src/k8s.io/client-go/tools/events:go_default_library", + "//staging/src/k8s.io/kube-scheduler/extender/v1:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/candidate.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/candidate.go new file mode 100644 index 00000000000..6bd86cf22e3 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/candidate.go @@ -0,0 +1,45 @@ +/* +Copyright 2020 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 defaultpreemption + +import ( + extenderv1 "k8s.io/kube-scheduler/extender/v1" +) + +// Candidate represents a nominated node on which the preemptor can be scheduled, +// along with the list of victims that should be evicted for the preemptor to fit the node. +type Candidate interface { + // Victims wraps a list of to-be-preempted Pods and the number of PDB violation. + Victims() *extenderv1.Victims + // Name returns the target node name where the preemptor gets nominated to run. + Name() string +} + +type candidate struct { + victims *extenderv1.Victims + name string +} + +// Victims returns s.victims. +func (s *candidate) Victims() *extenderv1.Victims { + return s.victims +} + +// Name returns s.name. +func (s *candidate) Name() string { + return s.name +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go new file mode 100644 index 00000000000..6fd6b0dc415 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go @@ -0,0 +1,709 @@ +/* +Copyright 2020 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 defaultpreemption + +import ( + "context" + "math" + "sort" + "sync" + "time" + + "k8s.io/klog/v2" + + v1 "k8s.io/api/core/v1" + policy "k8s.io/api/policy/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" + policylisters "k8s.io/client-go/listers/policy/v1beta1" + extenderv1 "k8s.io/kube-scheduler/extender/v1" + podutil "k8s.io/kubernetes/pkg/api/v1/pod" + kubefeatures "k8s.io/kubernetes/pkg/features" + "k8s.io/kubernetes/pkg/scheduler/core" + framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" + "k8s.io/kubernetes/pkg/scheduler/internal/parallelize" + "k8s.io/kubernetes/pkg/scheduler/metrics" + "k8s.io/kubernetes/pkg/scheduler/util" +) + +const ( + // Name of the plugin used in the plugin registry and configurations. + Name = "DefaultPreemption" +) + +// DefaultPreemption is a PostFilter plugin implements the preemption logic. +type DefaultPreemption struct { + fh framework.FrameworkHandle + pdbLister policylisters.PodDisruptionBudgetLister +} + +var _ framework.PostFilterPlugin = &DefaultPreemption{} + +// Name returns name of the plugin. It is used in logs, etc. +func (pl *DefaultPreemption) Name() string { + return Name +} + +// New initializes a new plugin and returns it. +func New(_ runtime.Object, fh framework.FrameworkHandle) (framework.Plugin, error) { + pl := DefaultPreemption{ + fh: fh, + pdbLister: getPDBLister(fh.SharedInformerFactory()), + } + return &pl, nil +} + +// PostFilter invoked at the postFilter extension point. +func (pl *DefaultPreemption) PostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status) { + preemptionStartTime := time.Now() + defer func() { + metrics.PreemptionAttempts.Inc() + metrics.SchedulingAlgorithmPreemptionEvaluationDuration.Observe(metrics.SinceInSeconds(preemptionStartTime)) + metrics.DeprecatedSchedulingDuration.WithLabelValues(metrics.PreemptionEvaluation).Observe(metrics.SinceInSeconds(preemptionStartTime)) + }() + + nnn, err := pl.preempt(ctx, state, pod, m) + if err != nil { + return nil, framework.NewStatus(framework.Error, err.Error()) + } + if nnn == "" { + return nil, framework.NewStatus(framework.Unschedulable) + } + return &framework.PostFilterResult{NominatedNodeName: nnn}, framework.NewStatus(framework.Success) +} + +// preempt finds nodes with pods that can be preempted to make room for "pod" to +// schedule. It chooses one of the nodes and preempts the pods on the node and +// returns 1) the node name which is picked up for preemption, 2) any possible error. +// preempt does not update its snapshot. It uses the same snapshot used in the +// scheduling cycle. This is to avoid a scenario where preempt finds feasible +// nodes without preempting any pod. When there are many pending pods in the +// scheduling queue a nominated pod will go back to the queue and behind +// other pods with the same priority. The nominated pod prevents other pods from +// using the nominated resources and the nominated pod could take a long time +// before it is retried after many other pending pods. +func (pl *DefaultPreemption) preempt(ctx context.Context, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (string, error) { + cs := pl.fh.ClientSet() + ph := pl.fh.PreemptHandle() + nodeLister := pl.fh.SnapshotSharedLister().NodeInfos() + + // 0) Fetch the latest version of . + // TODO(Huang-Wei): get pod from informer cache instead of API server. + pod, err := util.GetUpdatedPod(cs, pod) + if err != nil { + klog.Errorf("Error getting the updated preemptor pod object: %v", err) + return "", err + } + + // 1) Ensure the preemptor is eligible to preempt other pods. + if !PodEligibleToPreemptOthers(pod, nodeLister, m[pod.Status.NominatedNodeName]) { + klog.V(5).Infof("Pod %v/%v is not eligible for more preemption.", pod.Namespace, pod.Name) + return "", nil + } + + // 2) Find all preemption candidates. + candidates, err := FindCandidates(ctx, cs, state, pod, m, ph, nodeLister, pl.pdbLister) + if err != nil || len(candidates) == 0 { + return "", err + } + + // 3) Interact with registered Extenders to filter out some candidates if needed. + candidates, err = CallExtenders(ph.Extenders(), pod, nodeLister, candidates) + if err != nil { + return "", err + } + + // 4) Find the best candidate. + bestCandidate := SelectCandidate(candidates) + if bestCandidate == nil || len(bestCandidate.Name()) == 0 { + return "", nil + } + + // 5) Perform preparation work before nominating the selected candidate. + if err := PrepareCandidate(bestCandidate, pl.fh, cs, pod); err != nil { + return "", err + } + + return bestCandidate.Name(), nil +} + +// FindCandidates calculates a slice of preemption candidates. +// Each candidate is executable to make the given schedulable. +func FindCandidates(ctx context.Context, cs kubernetes.Interface, state *framework.CycleState, pod *v1.Pod, + m framework.NodeToStatusMap, ph framework.PreemptHandle, nodeLister framework.NodeInfoLister, + pdbLister policylisters.PodDisruptionBudgetLister) ([]Candidate, error) { + allNodes, err := nodeLister.List() + if err != nil { + return nil, err + } + if len(allNodes) == 0 { + return nil, core.ErrNoNodesAvailable + } + + potentialNodes := nodesWherePreemptionMightHelp(allNodes, m) + if len(potentialNodes) == 0 { + klog.V(3).Infof("Preemption will not help schedule pod %v/%v on any node.", pod.Namespace, pod.Name) + // In this case, we should clean-up any existing nominated node name of the pod. + if err := util.ClearNominatedNodeName(cs, pod); err != nil { + klog.Errorf("Cannot clear 'NominatedNodeName' field of pod %v/%v: %v", pod.Namespace, pod.Name, err) + // We do not return as this error is not critical. + } + return nil, nil + } + if klog.V(5).Enabled() { + var sample []string + for i := 0; i < 10 && i < len(potentialNodes); i++ { + sample = append(sample, potentialNodes[i].Node().Name) + } + klog.Infof("%v potential nodes for preemption, first %v are: %v", len(potentialNodes), len(sample), sample) + } + pdbs, err := getPodDisruptionBudgets(pdbLister) + if err != nil { + return nil, err + } + return dryRunPreemption(ctx, ph, state, pod, potentialNodes, pdbs), nil +} + +// PodEligibleToPreemptOthers determines whether this pod should be considered +// for preempting other pods or not. If this pod has already preempted other +// pods and those are in their graceful termination period, it shouldn't be +// considered for preemption. +// We look at the node that is nominated for this pod and as long as there are +// terminating pods on the node, we don't consider this for preempting more pods. +func PodEligibleToPreemptOthers(pod *v1.Pod, nodeInfos framework.NodeInfoLister, nominatedNodeStatus *framework.Status) bool { + if pod.Spec.PreemptionPolicy != nil && *pod.Spec.PreemptionPolicy == v1.PreemptNever { + klog.V(5).Infof("Pod %v/%v is not eligible for preemption because it has a preemptionPolicy of %v", pod.Namespace, pod.Name, v1.PreemptNever) + return false + } + nomNodeName := pod.Status.NominatedNodeName + if len(nomNodeName) > 0 { + // If the pod's nominated node is considered as UnschedulableAndUnresolvable by the filters, + // then the pod should be considered for preempting again. + if nominatedNodeStatus.Code() == framework.UnschedulableAndUnresolvable { + return true + } + + if nodeInfo, _ := nodeInfos.Get(nomNodeName); nodeInfo != nil { + podPriority := podutil.GetPodPriority(pod) + for _, p := range nodeInfo.Pods { + if p.Pod.DeletionTimestamp != nil && podutil.GetPodPriority(p.Pod) < podPriority { + // There is a terminating pod on the nominated node. + return false + } + } + } + } + return true +} + +// nodesWherePreemptionMightHelp returns a list of nodes with failed predicates +// that may be satisfied by removing pods from the node. +func nodesWherePreemptionMightHelp(nodes []*framework.NodeInfo, m framework.NodeToStatusMap) []*framework.NodeInfo { + var potentialNodes []*framework.NodeInfo + for _, node := range nodes { + name := node.Node().Name + // We reply on the status by each plugin - 'Unschedulable' or 'UnschedulableAndUnresolvable' + // to determine whether preemption may help or not on the node. + if m[name].Code() == framework.UnschedulableAndUnresolvable { + continue + } + potentialNodes = append(potentialNodes, node) + } + return potentialNodes +} + +// dryRunPreemption simulates Preemption logic on in parallel, +// and returns all possible preemption candidates. +func dryRunPreemption(ctx context.Context, fh framework.PreemptHandle, state *framework.CycleState, + pod *v1.Pod, potentialNodes []*framework.NodeInfo, pdbs []*policy.PodDisruptionBudget) []Candidate { + var resultLock sync.Mutex + var candidates []Candidate + + checkNode := func(i int) { + nodeInfoCopy := potentialNodes[i].Clone() + stateCopy := state.Clone() + pods, numPDBViolations, fits := selectVictimsOnNode(ctx, fh, stateCopy, pod, nodeInfoCopy, pdbs) + if fits { + resultLock.Lock() + victims := extenderv1.Victims{ + Pods: pods, + NumPDBViolations: int64(numPDBViolations), + } + c := candidate{ + victims: &victims, + name: nodeInfoCopy.Node().Name, + } + candidates = append(candidates, &c) + resultLock.Unlock() + } + } + parallelize.Until(ctx, len(potentialNodes), checkNode) + return candidates +} + +// CallExtenders calls given to select the list of feasible candidates. +// We will only check with extenders that support preemption. +// Extenders which do not support preemption may later prevent preemptor from being scheduled on the nominated +// node. In that case, scheduler will find a different host for the preemptor in subsequent scheduling cycles. +func CallExtenders(extenders []framework.Extender, pod *v1.Pod, nodeLister framework.NodeInfoLister, + candidates []Candidate) ([]Candidate, error) { + if len(extenders) == 0 { + return candidates, nil + } + + // Migrate candidate slice to victimsMap to adapt to the Extender interface. + // It's only applicable for candidate slice that have unique nominated node name. + victimsMap := candidatesToVictimsMap(candidates) + if len(victimsMap) == 0 { + return candidates, nil + } + for _, extender := range extenders { + if !extender.SupportsPreemption() || !extender.IsInterested(pod) { + continue + } + nodeNameToVictims, err := extender.ProcessPreemption(pod, victimsMap, nodeLister) + if err != nil { + if extender.IsIgnorable() { + klog.Warningf("Skipping extender %v as it returned error %v and has ignorable flag set", + extender, err) + continue + } + return nil, err + } + // Replace victimsMap with new result after preemption. So the + // rest of extenders can continue use it as parameter. + victimsMap = nodeNameToVictims + + // If node list becomes empty, no preemption can happen regardless of other extenders. + if len(victimsMap) == 0 { + break + } + } + + var newCandidates []Candidate + for nodeName := range victimsMap { + newCandidates = append(newCandidates, &candidate{ + victims: victimsMap[nodeName], + name: nodeName, + }) + } + return newCandidates, nil +} + +// This function is not applicable for out-of-tree preemption plugins that exercise +// different preemption candidates on the same nominated node. +func candidatesToVictimsMap(candidates []Candidate) map[string]*extenderv1.Victims { + m := make(map[string]*extenderv1.Victims) + for _, c := range candidates { + m[c.Name()] = c.Victims() + } + return m +} + +// SelectCandidate chooses the best-fit candidate from given and return it. +func SelectCandidate(candidates []Candidate) Candidate { + if len(candidates) == 0 { + return nil + } + if len(candidates) == 1 { + return candidates[0] + } + + victimsMap := candidatesToVictimsMap(candidates) + candidateNode := pickOneNodeForPreemption(victimsMap) + + // Same as candidatesToVictimsMap, this logic is not applicable for out-of-tree + // preemption plugins that exercise different candidates on the same nominated node. + for _, candidate := range candidates { + if candidateNode == candidate.Name() { + return candidate + } + } + // We shouldn't reach here. + klog.Errorf("None candidate can be picked from %v.", candidates) + // To not break the whole flow, return the first candidate. + return candidates[0] +} + +// pickOneNodeForPreemption chooses one node among the given nodes. It assumes +// pods in each map entry are ordered by decreasing priority. +// It picks a node based on the following criteria: +// 1. A node with minimum number of PDB violations. +// 2. A node with minimum highest priority victim is picked. +// 3. Ties are broken by sum of priorities of all victims. +// 4. If there are still ties, node with the minimum number of victims is picked. +// 5. If there are still ties, node with the latest start time of all highest priority victims is picked. +// 6. If there are still ties, the first such node is picked (sort of randomly). +// The 'minNodes1' and 'minNodes2' are being reused here to save the memory +// allocation and garbage collection time. +func pickOneNodeForPreemption(nodesToVictims map[string]*extenderv1.Victims) string { + if len(nodesToVictims) == 0 { + return "" + } + minNumPDBViolatingPods := int64(math.MaxInt32) + var minNodes1 []string + lenNodes1 := 0 + for node, victims := range nodesToVictims { + numPDBViolatingPods := victims.NumPDBViolations + if numPDBViolatingPods < minNumPDBViolatingPods { + minNumPDBViolatingPods = numPDBViolatingPods + minNodes1 = nil + lenNodes1 = 0 + } + if numPDBViolatingPods == minNumPDBViolatingPods { + minNodes1 = append(minNodes1, node) + lenNodes1++ + } + } + if lenNodes1 == 1 { + return minNodes1[0] + } + + // There are more than one node with minimum number PDB violating pods. Find + // the one with minimum highest priority victim. + minHighestPriority := int32(math.MaxInt32) + var minNodes2 = make([]string, lenNodes1) + lenNodes2 := 0 + for i := 0; i < lenNodes1; i++ { + node := minNodes1[i] + victims := nodesToVictims[node] + // highestPodPriority is the highest priority among the victims on this node. + highestPodPriority := podutil.GetPodPriority(victims.Pods[0]) + if highestPodPriority < minHighestPriority { + minHighestPriority = highestPodPriority + lenNodes2 = 0 + } + if highestPodPriority == minHighestPriority { + minNodes2[lenNodes2] = node + lenNodes2++ + } + } + if lenNodes2 == 1 { + return minNodes2[0] + } + + // There are a few nodes with minimum highest priority victim. Find the + // smallest sum of priorities. + minSumPriorities := int64(math.MaxInt64) + lenNodes1 = 0 + for i := 0; i < lenNodes2; i++ { + var sumPriorities int64 + node := minNodes2[i] + for _, pod := range nodesToVictims[node].Pods { + // We add MaxInt32+1 to all priorities to make all of them >= 0. This is + // needed so that a node with a few pods with negative priority is not + // picked over a node with a smaller number of pods with the same negative + // priority (and similar scenarios). + sumPriorities += int64(podutil.GetPodPriority(pod)) + int64(math.MaxInt32+1) + } + if sumPriorities < minSumPriorities { + minSumPriorities = sumPriorities + lenNodes1 = 0 + } + if sumPriorities == minSumPriorities { + minNodes1[lenNodes1] = node + lenNodes1++ + } + } + if lenNodes1 == 1 { + return minNodes1[0] + } + + // There are a few nodes with minimum highest priority victim and sum of priorities. + // Find one with the minimum number of pods. + minNumPods := math.MaxInt32 + lenNodes2 = 0 + for i := 0; i < lenNodes1; i++ { + node := minNodes1[i] + numPods := len(nodesToVictims[node].Pods) + if numPods < minNumPods { + minNumPods = numPods + lenNodes2 = 0 + } + if numPods == minNumPods { + minNodes2[lenNodes2] = node + lenNodes2++ + } + } + if lenNodes2 == 1 { + return minNodes2[0] + } + + // There are a few nodes with same number of pods. + // Find the node that satisfies latest(earliestStartTime(all highest-priority pods on node)) + latestStartTime := util.GetEarliestPodStartTime(nodesToVictims[minNodes2[0]]) + if latestStartTime == nil { + // If the earliest start time of all pods on the 1st node is nil, just return it, + // which is not expected to happen. + klog.Errorf("earliestStartTime is nil for node %s. Should not reach here.", minNodes2[0]) + return minNodes2[0] + } + nodeToReturn := minNodes2[0] + for i := 1; i < lenNodes2; i++ { + node := minNodes2[i] + // Get earliest start time of all pods on the current node. + earliestStartTimeOnNode := util.GetEarliestPodStartTime(nodesToVictims[node]) + if earliestStartTimeOnNode == nil { + klog.Errorf("earliestStartTime is nil for node %s. Should not reach here.", node) + continue + } + if earliestStartTimeOnNode.After(latestStartTime.Time) { + latestStartTime = earliestStartTimeOnNode + nodeToReturn = node + } + } + + return nodeToReturn +} + +// selectVictimsOnNode finds minimum set of pods on the given node that should +// be preempted in order to make enough room for "pod" to be scheduled. The +// minimum set selected is subject to the constraint that a higher-priority pod +// is never preempted when a lower-priority pod could be (higher/lower relative +// to one another, not relative to the preemptor "pod"). +// The algorithm first checks if the pod can be scheduled on the node when all the +// lower priority pods are gone. If so, it sorts all the lower priority pods by +// their priority and then puts them into two groups of those whose PodDisruptionBudget +// will be violated if preempted and other non-violating pods. Both groups are +// sorted by priority. It first tries to reprieve as many PDB violating pods as +// possible and then does them same for non-PDB-violating pods while checking +// that the "pod" can still fit on the node. +// NOTE: This function assumes that it is never called if "pod" cannot be scheduled +// due to pod affinity, node affinity, or node anti-affinity reasons. None of +// these predicates can be satisfied by removing more pods from the node. +func selectVictimsOnNode( + ctx context.Context, + ph framework.PreemptHandle, + state *framework.CycleState, + pod *v1.Pod, + nodeInfo *framework.NodeInfo, + pdbs []*policy.PodDisruptionBudget, +) ([]*v1.Pod, int, bool) { + var potentialVictims []*v1.Pod + + removePod := func(rp *v1.Pod) error { + if err := nodeInfo.RemovePod(rp); err != nil { + return err + } + status := ph.RunPreFilterExtensionRemovePod(ctx, state, pod, rp, nodeInfo) + if !status.IsSuccess() { + return status.AsError() + } + return nil + } + addPod := func(ap *v1.Pod) error { + nodeInfo.AddPod(ap) + status := ph.RunPreFilterExtensionAddPod(ctx, state, pod, ap, nodeInfo) + if !status.IsSuccess() { + return status.AsError() + } + return nil + } + // As the first step, remove all the lower priority pods from the node and + // check if the given pod can be scheduled. + podPriority := podutil.GetPodPriority(pod) + for _, p := range nodeInfo.Pods { + if podutil.GetPodPriority(p.Pod) < podPriority { + potentialVictims = append(potentialVictims, p.Pod) + if err := removePod(p.Pod); err != nil { + return nil, 0, false + } + } + } + + // No potential victims are found, and so we don't need to evaluate the node again since its state didn't change. + if len(potentialVictims) == 0 { + return nil, 0, false + } + + // If the new pod does not fit after removing all the lower priority pods, + // we are almost done and this node is not suitable for preemption. The only + // condition that we could check is if the "pod" is failing to schedule due to + // inter-pod affinity to one or more victims, but we have decided not to + // support this case for performance reasons. Having affinity to lower + // priority pods is not a recommended configuration anyway. + if fits, _, err := core.PodPassesFiltersOnNode(ctx, ph, state, pod, nodeInfo); !fits { + if err != nil { + klog.Warningf("Encountered error while selecting victims on node %v: %v", nodeInfo.Node().Name, err) + } + + return nil, 0, false + } + var victims []*v1.Pod + numViolatingVictim := 0 + sort.Slice(potentialVictims, func(i, j int) bool { return util.MoreImportantPod(potentialVictims[i], potentialVictims[j]) }) + // Try to reprieve as many pods as possible. We first try to reprieve the PDB + // violating victims and then other non-violating ones. In both cases, we start + // from the highest priority victims. + violatingVictims, nonViolatingVictims := filterPodsWithPDBViolation(potentialVictims, pdbs) + reprievePod := func(p *v1.Pod) (bool, error) { + if err := addPod(p); err != nil { + return false, err + } + fits, _, _ := core.PodPassesFiltersOnNode(ctx, ph, state, pod, nodeInfo) + if !fits { + if err := removePod(p); err != nil { + return false, err + } + victims = append(victims, p) + klog.V(5).Infof("Pod %v/%v is a potential preemption victim on node %v.", p.Namespace, p.Name, nodeInfo.Node().Name) + } + return fits, nil + } + for _, p := range violatingVictims { + if fits, err := reprievePod(p); err != nil { + klog.Warningf("Failed to reprieve pod %q: %v", p.Name, err) + return nil, 0, false + } else if !fits { + numViolatingVictim++ + } + } + // Now we try to reprieve non-violating victims. + for _, p := range nonViolatingVictims { + if _, err := reprievePod(p); err != nil { + klog.Warningf("Failed to reprieve pod %q: %v", p.Name, err) + return nil, 0, false + } + } + return victims, numViolatingVictim, true +} + +// PrepareCandidate does some preparation work before nominating the selected candidate: +// - Evict the victim pods +// - Reject the victim pods if they are in waitingPod map +// - Clear the low-priority pods' nominatedNodeName status if needed +func PrepareCandidate(c Candidate, fh framework.FrameworkHandle, cs kubernetes.Interface, pod *v1.Pod) error { + for _, victim := range c.Victims().Pods { + if err := util.DeletePod(cs, victim); err != nil { + klog.Errorf("Error preempting pod %v/%v: %v", victim.Namespace, victim.Name, err) + return err + } + // If the victim is a WaitingPod, send a reject message to the PermitPlugin + if waitingPod := fh.GetWaitingPod(victim.UID); waitingPod != nil { + waitingPod.Reject("preempted") + } + fh.EventRecorder().Eventf(victim, pod, v1.EventTypeNormal, "Preempted", "Preempting", "Preempted by %v/%v on node %v", + pod.Namespace, pod.Name, c.Name()) + } + metrics.PreemptionVictims.Observe(float64(len(c.Victims().Pods))) + + // Lower priority pods nominated to run on this node, may no longer fit on + // this node. So, we should remove their nomination. Removing their + // nomination updates these pods and moves them to the active queue. It + // lets scheduler find another place for them. + nominatedPods := getLowerPriorityNominatedPods(fh.PreemptHandle(), pod, c.Name()) + if err := util.ClearNominatedNodeName(cs, nominatedPods...); err != nil { + klog.Errorf("Cannot clear 'NominatedNodeName' field: %v", err) + // We do not return as this error is not critical. + } + + return nil +} + +// getLowerPriorityNominatedPods returns pods whose priority is smaller than the +// priority of the given "pod" and are nominated to run on the given node. +// Note: We could possibly check if the nominated lower priority pods still fit +// and return those that no longer fit, but that would require lots of +// manipulation of NodeInfo and PreFilter state per nominated pod. It may not be +// worth the complexity, especially because we generally expect to have a very +// small number of nominated pods per node. +func getLowerPriorityNominatedPods(pn framework.PodNominator, pod *v1.Pod, nodeName string) []*v1.Pod { + pods := pn.NominatedPodsForNode(nodeName) + + if len(pods) == 0 { + return nil + } + + var lowerPriorityPods []*v1.Pod + podPriority := podutil.GetPodPriority(pod) + for _, p := range pods { + if podutil.GetPodPriority(p) < podPriority { + lowerPriorityPods = append(lowerPriorityPods, p) + } + } + return lowerPriorityPods +} + +// filterPodsWithPDBViolation groups the given "pods" into two groups of "violatingPods" +// and "nonViolatingPods" based on whether their PDBs will be violated if they are +// preempted. +// This function is stable and does not change the order of received pods. So, if it +// receives a sorted list, grouping will preserve the order of the input list. +func filterPodsWithPDBViolation(pods []*v1.Pod, pdbs []*policy.PodDisruptionBudget) (violatingPods, nonViolatingPods []*v1.Pod) { + pdbsAllowed := make([]int32, len(pdbs)) + for i, pdb := range pdbs { + pdbsAllowed[i] = pdb.Status.DisruptionsAllowed + } + + for _, obj := range pods { + pod := obj + pdbForPodIsViolated := false + // A pod with no labels will not match any PDB. So, no need to check. + if len(pod.Labels) != 0 { + for i, pdb := range pdbs { + if pdb.Namespace != pod.Namespace { + continue + } + selector, err := metav1.LabelSelectorAsSelector(pdb.Spec.Selector) + if err != nil { + continue + } + // A PDB with a nil or empty selector matches nothing. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + + // Existing in DisruptedPods means it has been processed in API server, + // we don't treat it as a violating case. + if _, exist := pdb.Status.DisruptedPods[pod.Name]; exist { + continue + } + // Only decrement the matched pdb when it's not in its ; + // otherwise we may over-decrement the budget number. + pdbsAllowed[i]-- + // We have found a matching PDB. + if pdbsAllowed[i] < 0 { + pdbForPodIsViolated = true + } + } + } + if pdbForPodIsViolated { + violatingPods = append(violatingPods, pod) + } else { + nonViolatingPods = append(nonViolatingPods, pod) + } + } + return violatingPods, nonViolatingPods +} + +func getPDBLister(informerFactory informers.SharedInformerFactory) policylisters.PodDisruptionBudgetLister { + if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.PodDisruptionBudget) { + return informerFactory.Policy().V1beta1().PodDisruptionBudgets().Lister() + } + return nil +} + +func getPodDisruptionBudgets(pdbLister policylisters.PodDisruptionBudgetLister) ([]*policy.PodDisruptionBudget, error) { + if pdbLister != nil { + return pdbLister.List(labels.Everything()) + } + return nil, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality/BUILD index f9fe7982073..9cd2d89ae39 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality/BUILD @@ -7,8 +7,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", - "//pkg/util/parsers:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", ], @@ -19,9 +17,9 @@ go_test( srcs = ["image_locality_test.go"], embed = [":go_default_library"], deps = [ + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", - "//pkg/util/parsers:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality/image_locality.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality/image_locality.go index 619d5db883f..4eb61c7ad1b 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality/image_locality.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality/image_locality.go @@ -24,16 +24,14 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" - "k8s.io/kubernetes/pkg/util/parsers" ) // The two thresholds are used as bounds for the image score range. They correspond to a reasonable size range for // container images compressed and stored in registries; 90%ile of images on dockerhub drops into this range. const ( - mb int64 = 1024 * 1024 - minThreshold int64 = 23 * mb - maxThreshold int64 = 1000 * mb + mb int64 = 1024 * 1024 + minThreshold int64 = 23 * mb + maxContainerThreshold int64 = 1000 * mb ) // ImageLocality is a score plugin that favors nodes that already have requested pod container's images. @@ -64,7 +62,7 @@ func (pl *ImageLocality) Score(ctx context.Context, state *framework.CycleState, } totalNumNodes := len(nodeInfos) - score := calculatePriority(sumImageScores(nodeInfo, pod.Spec.Containers, totalNumNodes)) + score := calculatePriority(sumImageScores(nodeInfo, pod.Spec.Containers, totalNumNodes), len(pod.Spec.Containers)) return score, nil } @@ -75,13 +73,14 @@ func (pl *ImageLocality) ScoreExtensions() framework.ScoreExtensions { } // New initializes a new plugin and returns it. -func New(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, h framework.FrameworkHandle) (framework.Plugin, error) { return &ImageLocality{handle: h}, nil } // calculatePriority returns the priority of a node. Given the sumScores of requested images on the node, the node's // priority is obtained by scaling the maximum priority value with a ratio proportional to the sumScores. -func calculatePriority(sumScores int64) int64 { +func calculatePriority(sumScores int64, numContainers int) int64 { + maxThreshold := maxContainerThreshold * int64(numContainers) if sumScores < minThreshold { sumScores = minThreshold } else if sumScores > maxThreshold { @@ -94,16 +93,13 @@ func calculatePriority(sumScores int64) int64 { // sumImageScores returns the sum of image scores of all the containers that are already on the node. // Each image receives a raw score of its size, scaled by scaledImageScore. The raw scores are later used to calculate // the final score. Note that the init containers are not considered for it's rare for users to deploy huge init containers. -func sumImageScores(nodeInfo *schedulernodeinfo.NodeInfo, containers []v1.Container, totalNumNodes int) int64 { +func sumImageScores(nodeInfo *framework.NodeInfo, containers []v1.Container, totalNumNodes int) int64 { var sum int64 - imageStates := nodeInfo.ImageStates() - for _, container := range containers { - if state, ok := imageStates[normalizedImageName(container.Image)]; ok { + if state, ok := nodeInfo.ImageStates[normalizedImageName(container.Image)]; ok { sum += scaledImageScore(state, totalNumNodes) } } - return sum } @@ -111,7 +107,7 @@ func sumImageScores(nodeInfo *schedulernodeinfo.NodeInfo, containers []v1.Contai // The size of the image is used as the base score, scaled by a factor which considers how much nodes the image has "spread" to. // This heuristic aims to mitigate the undesirable "node heating problem", i.e., pods get assigned to the same or // a few nodes due to image locality. -func scaledImageScore(imageState *schedulernodeinfo.ImageStateSummary, totalNumNodes int) int64 { +func scaledImageScore(imageState *framework.ImageStateSummary, totalNumNodes int) int64 { spread := float64(imageState.NumNodes) / float64(totalNumNodes) return int64(float64(imageState.Size) * spread) } @@ -123,7 +119,7 @@ func scaledImageScore(imageState *schedulernodeinfo.ImageStateSummary, totalNumN // in node status; note that if users consistently use one registry format, this should not happen. func normalizedImageName(name string) string { if strings.LastIndex(name, ":") <= strings.LastIndex(name, "/") { - name = name + ":" + parsers.DefaultImageTag + name = name + ":latest" } return name } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/BUILD index e9339eced84..3600870ef5b 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/BUILD @@ -10,19 +10,14 @@ go_library( importpath = "k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity", visibility = ["//visibility:public"], deps = [ + "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/apis/config/validation:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/listers:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/internal/parallelize:go_default_library", "//pkg/scheduler/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", - "//vendor/k8s.io/utils/pointer:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -34,13 +29,12 @@ go_test( ], embed = [":go_default_library"], deps = [ + "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/utils/pointer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go index af035260623..596f1b95df3 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go @@ -19,16 +19,12 @@ package interpodaffinity import ( "context" "fmt" - "sync" + "sync/atomic" - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/util/workqueue" - "k8s.io/klog" + v1 "k8s.io/api/core/v1" + "k8s.io/klog/v2" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + "k8s.io/kubernetes/pkg/scheduler/internal/parallelize" schedutil "k8s.io/kubernetes/pkg/scheduler/util" ) @@ -55,6 +51,8 @@ type preFilterState struct { topologyToMatchedAffinityTerms topologyToMatchedTermCount // A map of topology pairs to the number of existing pods that match the anti-affinity terms of the "pod". topologyToMatchedAntiAffinityTerms topologyToMatchedTermCount + // podInfo of the incoming pod. + podInfo *framework.PodInfo } // Clone the prefilter state. @@ -67,45 +65,27 @@ func (s *preFilterState) Clone() framework.StateData { copy.topologyToMatchedAffinityTerms = s.topologyToMatchedAffinityTerms.clone() copy.topologyToMatchedAntiAffinityTerms = s.topologyToMatchedAntiAffinityTerms.clone() copy.topologyToMatchedExistingAntiAffinityTerms = s.topologyToMatchedExistingAntiAffinityTerms.clone() + // No need to deep copy the podInfo because it shouldn't change. + copy.podInfo = s.podInfo return © } // updateWithPod updates the preFilterState counters with the (anti)affinity matches for the given pod. -func (s *preFilterState) updateWithPod(updatedPod, pod *v1.Pod, node *v1.Node, multiplier int64) error { +func (s *preFilterState) updateWithPod(updatedPod *v1.Pod, node *v1.Node, multiplier int64) error { if s == nil { return nil } // Update matching existing anti-affinity terms. - updatedPodAffinity := updatedPod.Spec.Affinity - if updatedPodAffinity != nil && updatedPodAffinity.PodAntiAffinity != nil { - antiAffinityTerms, err := getAffinityTerms(pod, schedutil.GetPodAntiAffinityTerms(updatedPodAffinity.PodAntiAffinity)) - if err != nil { - return fmt.Errorf("error in getting anti-affinity terms of Pod %v: %v", updatedPod.Name, err) - } - s.topologyToMatchedExistingAntiAffinityTerms.updateWithAntiAffinityTerms(pod, node, antiAffinityTerms, multiplier) - } + // TODO(#91058): AddPod/RemovePod should pass a *framework.PodInfo type instead of *v1.Pod. + updatedPodInfo := framework.NewPodInfo(updatedPod) + s.topologyToMatchedExistingAntiAffinityTerms.updateWithAntiAffinityTerms(s.podInfo.Pod, node, updatedPodInfo.RequiredAntiAffinityTerms, multiplier) // Update matching incoming pod (anti)affinity terms. - affinity := pod.Spec.Affinity - podNodeName := updatedPod.Spec.NodeName - if affinity != nil && len(podNodeName) > 0 { - if affinity.PodAffinity != nil { - affinityTerms, err := getAffinityTerms(pod, schedutil.GetPodAffinityTerms(affinity.PodAffinity)) - if err != nil { - return fmt.Errorf("error in getting affinity terms of Pod %v: %v", pod.Name, err) - } - s.topologyToMatchedAffinityTerms.updateWithAffinityTerms(updatedPod, node, affinityTerms, multiplier) - } - if affinity.PodAntiAffinity != nil { - antiAffinityTerms, err := getAffinityTerms(pod, schedutil.GetPodAntiAffinityTerms(affinity.PodAntiAffinity)) - if err != nil { - klog.Errorf("error in getting anti-affinity terms of Pod %v: %v", pod.Name, err) - } - s.topologyToMatchedAntiAffinityTerms.updateWithAntiAffinityTerms(updatedPod, node, antiAffinityTerms, multiplier) - } - } + s.topologyToMatchedAffinityTerms.updateWithAffinityTerms(updatedPod, node, s.podInfo.RequiredAffinityTerms, multiplier) + s.topologyToMatchedAntiAffinityTerms.updateWithAntiAffinityTerms(updatedPod, node, s.podInfo.RequiredAntiAffinityTerms, multiplier) + return nil } @@ -132,11 +112,11 @@ func (m topologyToMatchedTermCount) clone() topologyToMatchedTermCount { // updateWithAffinityTerms updates the topologyToMatchedTermCount map with the specified value // for each affinity term if "targetPod" matches ALL terms. -func (m topologyToMatchedTermCount) updateWithAffinityTerms(targetPod *v1.Pod, targetPodNode *v1.Node, affinityTerms []*affinityTerm, value int64) { +func (m topologyToMatchedTermCount) updateWithAffinityTerms(targetPod *v1.Pod, targetPodNode *v1.Node, affinityTerms []framework.AffinityTerm, value int64) { if podMatchesAllAffinityTerms(targetPod, affinityTerms) { for _, t := range affinityTerms { - if topologyValue, ok := targetPodNode.Labels[t.topologyKey]; ok { - pair := topologyPair{key: t.topologyKey, value: topologyValue} + if topologyValue, ok := targetPodNode.Labels[t.TopologyKey]; ok { + pair := topologyPair{key: t.TopologyKey, value: topologyValue} m[pair] += value // value could be a negative value, hence we delete the entry if // the entry is down to zero. @@ -148,14 +128,14 @@ func (m topologyToMatchedTermCount) updateWithAffinityTerms(targetPod *v1.Pod, t } } -// updateAntiAffinityTerms updates the topologyToMatchedTermCount map with the specified value +// updateWithAntiAffinityTerms updates the topologyToMatchedTermCount map with the specified value // for each anti-affinity term matched the target pod. -func (m topologyToMatchedTermCount) updateWithAntiAffinityTerms(targetPod *v1.Pod, targetPodNode *v1.Node, antiAffinityTerms []*affinityTerm, value int64) { +func (m topologyToMatchedTermCount) updateWithAntiAffinityTerms(targetPod *v1.Pod, targetPodNode *v1.Node, antiAffinityTerms []framework.AffinityTerm, value int64) { // Check anti-affinity terms. for _, a := range antiAffinityTerms { - if schedutil.PodMatchesTermsNamespaceAndSelector(targetPod, a.namespaces, a.selector) { - if topologyValue, ok := targetPodNode.Labels[a.topologyKey]; ok { - pair := topologyPair{key: a.topologyKey, value: topologyValue} + if schedutil.PodMatchesTermsNamespaceAndSelector(targetPod, a.Namespaces, a.Selector) { + if topologyValue, ok := targetPodNode.Labels[a.TopologyKey]; ok { + pair := topologyPair{key: a.TopologyKey, value: topologyValue} m[pair] += value // value could be a negative value, hence we delete the entry if // the entry is down to zero. @@ -167,39 +147,13 @@ func (m topologyToMatchedTermCount) updateWithAntiAffinityTerms(targetPod *v1.Po } } -// A processed version of v1.PodAffinityTerm. -type affinityTerm struct { - namespaces sets.String - selector labels.Selector - topologyKey string -} - -// getAffinityTerms receives a Pod and affinity terms and returns the namespaces and -// selectors of the terms. -func getAffinityTerms(pod *v1.Pod, v1Terms []v1.PodAffinityTerm) ([]*affinityTerm, error) { - if v1Terms == nil { - return nil, nil - } - - var terms []*affinityTerm - for _, term := range v1Terms { - namespaces := schedutil.GetNamespacesFromPodAffinityTerm(pod, &term) - selector, err := metav1.LabelSelectorAsSelector(term.LabelSelector) - if err != nil { - return nil, err - } - terms = append(terms, &affinityTerm{namespaces: namespaces, selector: selector, topologyKey: term.TopologyKey}) - } - return terms, nil -} - // podMatchesAllAffinityTerms returns true IFF the given pod matches all the given terms. -func podMatchesAllAffinityTerms(pod *v1.Pod, terms []*affinityTerm) bool { +func podMatchesAllAffinityTerms(pod *v1.Pod, terms []framework.AffinityTerm) bool { if len(terms) == 0 { return false } for _, term := range terms { - if !schedutil.PodMatchesTermsNamespaceAndSelector(pod, term.namespaces, term.selector) { + if !schedutil.PodMatchesTermsNamespaceAndSelector(pod, term.Namespaces, term.Selector) { return false } } @@ -209,19 +163,9 @@ func podMatchesAllAffinityTerms(pod *v1.Pod, terms []*affinityTerm) bool { // getTPMapMatchingExistingAntiAffinity calculates the following for each existing pod on each node: // (1) Whether it has PodAntiAffinity // (2) Whether any AffinityTerm matches the incoming pod -func getTPMapMatchingExistingAntiAffinity(pod *v1.Pod, allNodes []*nodeinfo.NodeInfo) (topologyToMatchedTermCount, error) { - errCh := schedutil.NewErrorChannel() - var lock sync.Mutex - topologyMap := make(topologyToMatchedTermCount) - - appendResult := func(toAppend topologyToMatchedTermCount) { - lock.Lock() - defer lock.Unlock() - topologyMap.append(toAppend) - } - - ctx, cancel := context.WithCancel(context.Background()) - +func getTPMapMatchingExistingAntiAffinity(pod *v1.Pod, allNodes []*framework.NodeInfo) topologyToMatchedTermCount { + topoMaps := make([]topologyToMatchedTermCount, len(allNodes)) + index := int32(-1) processNode := func(i int) { nodeInfo := allNodes[i] node := nodeInfo.Node() @@ -229,60 +173,38 @@ func getTPMapMatchingExistingAntiAffinity(pod *v1.Pod, allNodes []*nodeinfo.Node klog.Error("node not found") return } - for _, existingPod := range nodeInfo.PodsWithAffinity() { - existingPodTopologyMaps, err := getMatchingAntiAffinityTopologyPairsOfPod(pod, existingPod, node) - if err != nil { - errCh.SendErrorWithCancel(err, cancel) - return - } - if existingPodTopologyMaps != nil { - appendResult(existingPodTopologyMaps) - } + topoMap := make(topologyToMatchedTermCount) + for _, existingPod := range nodeInfo.PodsWithAffinity { + topoMap.updateWithAntiAffinityTerms(pod, node, existingPod.RequiredAntiAffinityTerms, 1) + } + if len(topoMap) != 0 { + topoMaps[atomic.AddInt32(&index, 1)] = topoMap } } - workqueue.ParallelizeUntil(ctx, 16, len(allNodes), processNode) + parallelize.Until(context.Background(), len(allNodes), processNode) - if err := errCh.ReceiveError(); err != nil { - return nil, err + result := make(topologyToMatchedTermCount) + for i := 0; i <= int(index); i++ { + result.append(topoMaps[i]) } - return topologyMap, nil + return result } // getTPMapMatchingIncomingAffinityAntiAffinity finds existing Pods that match affinity terms of the given "pod". // It returns a topologyToMatchedTermCount that are checked later by the affinity // predicate. With this topologyToMatchedTermCount available, the affinity predicate does not // need to check all the pods in the cluster. -func getTPMapMatchingIncomingAffinityAntiAffinity(pod *v1.Pod, allNodes []*nodeinfo.NodeInfo) (topologyToMatchedTermCount, topologyToMatchedTermCount, error) { - topologyPairsAffinityPodsMap := make(topologyToMatchedTermCount) - topologyToMatchedExistingAntiAffinityTerms := make(topologyToMatchedTermCount) - affinity := pod.Spec.Affinity - if affinity == nil || (affinity.PodAffinity == nil && affinity.PodAntiAffinity == nil) { - return topologyPairsAffinityPodsMap, topologyToMatchedExistingAntiAffinityTerms, nil - } - - var lock sync.Mutex - appendResult := func(nodeName string, nodeTopologyPairsAffinityPodsMap, nodeTopologyPairsAntiAffinityPodsMap topologyToMatchedTermCount) { - lock.Lock() - defer lock.Unlock() - if len(nodeTopologyPairsAffinityPodsMap) > 0 { - topologyPairsAffinityPodsMap.append(nodeTopologyPairsAffinityPodsMap) - } - if len(nodeTopologyPairsAntiAffinityPodsMap) > 0 { - topologyToMatchedExistingAntiAffinityTerms.append(nodeTopologyPairsAntiAffinityPodsMap) - } - } - - affinityTerms, err := getAffinityTerms(pod, schedutil.GetPodAffinityTerms(affinity.PodAffinity)) - if err != nil { - return nil, nil, err - } - - antiAffinityTerms, err := getAffinityTerms(pod, schedutil.GetPodAntiAffinityTerms(affinity.PodAntiAffinity)) - if err != nil { - return nil, nil, err +func getTPMapMatchingIncomingAffinityAntiAffinity(podInfo *framework.PodInfo, allNodes []*framework.NodeInfo) (topologyToMatchedTermCount, topologyToMatchedTermCount) { + affinityCounts := make(topologyToMatchedTermCount) + antiAffinityCounts := make(topologyToMatchedTermCount) + if len(podInfo.RequiredAffinityTerms) == 0 && len(podInfo.RequiredAntiAffinityTerms) == 0 { + return affinityCounts, antiAffinityCounts } + affinityCountsList := make([]topologyToMatchedTermCount, len(allNodes)) + antiAffinityCountsList := make([]topologyToMatchedTermCount, len(allNodes)) + index := int32(-1) processNode := func(i int) { nodeInfo := allNodes[i] node := nodeInfo.Node() @@ -290,46 +212,36 @@ func getTPMapMatchingIncomingAffinityAntiAffinity(pod *v1.Pod, allNodes []*nodei klog.Error("node not found") return } - nodeTopologyPairsAffinityPodsMap := make(topologyToMatchedTermCount) - nodeTopologyPairsAntiAffinityPodsMap := make(topologyToMatchedTermCount) - for _, existingPod := range nodeInfo.Pods() { + affinity := make(topologyToMatchedTermCount) + antiAffinity := make(topologyToMatchedTermCount) + for _, existingPod := range nodeInfo.Pods { // Check affinity terms. - nodeTopologyPairsAffinityPodsMap.updateWithAffinityTerms(existingPod, node, affinityTerms, 1) + affinity.updateWithAffinityTerms(existingPod.Pod, node, podInfo.RequiredAffinityTerms, 1) // Check anti-affinity terms. - nodeTopologyPairsAntiAffinityPodsMap.updateWithAntiAffinityTerms(existingPod, node, antiAffinityTerms, 1) + antiAffinity.updateWithAntiAffinityTerms(existingPod.Pod, node, podInfo.RequiredAntiAffinityTerms, 1) } - if len(nodeTopologyPairsAffinityPodsMap) > 0 || len(nodeTopologyPairsAntiAffinityPodsMap) > 0 { - appendResult(node.Name, nodeTopologyPairsAffinityPodsMap, nodeTopologyPairsAntiAffinityPodsMap) + if len(affinity) > 0 || len(antiAffinity) > 0 { + k := atomic.AddInt32(&index, 1) + affinityCountsList[k] = affinity + antiAffinityCountsList[k] = antiAffinity } } - workqueue.ParallelizeUntil(context.Background(), 16, len(allNodes), processNode) + parallelize.Until(context.Background(), len(allNodes), processNode) - return topologyPairsAffinityPodsMap, topologyToMatchedExistingAntiAffinityTerms, nil -} + for i := 0; i <= int(index); i++ { + affinityCounts.append(affinityCountsList[i]) + antiAffinityCounts.append(antiAffinityCountsList[i]) + } -// targetPodMatchesAffinityOfPod returns true if "targetPod" matches ALL affinity terms of -// "pod". This function does not check topology. -// So, whether the targetPod actually matches or not needs further checks for a specific -// node. -func targetPodMatchesAffinityOfPod(pod, targetPod *v1.Pod) bool { - affinity := pod.Spec.Affinity - if affinity == nil || affinity.PodAffinity == nil { - return false - } - affinityTerms, err := getAffinityTerms(pod, schedutil.GetPodAffinityTerms(affinity.PodAffinity)) - if err != nil { - klog.Errorf("error in getting affinity terms of Pod %v", pod.Name) - return false - } - return podMatchesAllAffinityTerms(targetPod, affinityTerms) + return affinityCounts, antiAffinityCounts } // PreFilter invoked at the prefilter extension point. func (pl *InterPodAffinity) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) *framework.Status { - var allNodes []*nodeinfo.NodeInfo - var havePodsWithAffinityNodes []*nodeinfo.NodeInfo + var allNodes []*framework.NodeInfo + var havePodsWithAffinityNodes []*framework.NodeInfo var err error if allNodes, err = pl.sharedLister.NodeInfos().List(); err != nil { return framework.NewStatus(framework.Error, fmt.Sprintf("failed to list NodeInfos: %v", err)) @@ -338,22 +250,23 @@ func (pl *InterPodAffinity) PreFilter(ctx context.Context, cycleState *framework return framework.NewStatus(framework.Error, fmt.Sprintf("failed to list NodeInfos with pods with affinity: %v", err)) } - // existingPodAntiAffinityMap will be used later for efficient check on existing pods' anti-affinity - existingPodAntiAffinityMap, err := getTPMapMatchingExistingAntiAffinity(pod, havePodsWithAffinityNodes) - if err != nil { - return framework.NewStatus(framework.Error, fmt.Sprintf("calculating preFilterState: %v", err)) + podInfo := framework.NewPodInfo(pod) + if podInfo.ParseError != nil { + return framework.NewStatus(framework.UnschedulableAndUnresolvable, fmt.Sprintf("parsing pod: %+v", podInfo.ParseError)) } + + // existingPodAntiAffinityMap will be used later for efficient check on existing pods' anti-affinity + existingPodAntiAffinityMap := getTPMapMatchingExistingAntiAffinity(pod, havePodsWithAffinityNodes) + // incomingPodAffinityMap will be used later for efficient check on incoming pod's affinity // incomingPodAntiAffinityMap will be used later for efficient check on incoming pod's anti-affinity - incomingPodAffinityMap, incomingPodAntiAffinityMap, err := getTPMapMatchingIncomingAffinityAntiAffinity(pod, allNodes) - if err != nil { - return framework.NewStatus(framework.Error, fmt.Sprintf("calculating preFilterState: %v", err)) - } + incomingPodAffinityMap, incomingPodAntiAffinityMap := getTPMapMatchingIncomingAffinityAntiAffinity(podInfo, allNodes) s := &preFilterState{ topologyToMatchedAffinityTerms: incomingPodAffinityMap, topologyToMatchedAntiAffinityTerms: incomingPodAntiAffinityMap, topologyToMatchedExistingAntiAffinityTerms: existingPodAntiAffinityMap, + podInfo: podInfo, } cycleState.Write(preFilterStateKey, s) @@ -366,22 +279,22 @@ func (pl *InterPodAffinity) PreFilterExtensions() framework.PreFilterExtensions } // AddPod from pre-computed data in cycleState. -func (pl *InterPodAffinity) AddPod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *InterPodAffinity) AddPod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { state, err := getPreFilterState(cycleState) if err != nil { return framework.NewStatus(framework.Error, err.Error()) } - state.updateWithPod(podToAdd, podToSchedule, nodeInfo.Node(), 1) + state.updateWithPod(podToAdd, nodeInfo.Node(), 1) return nil } // RemovePod from pre-computed data in cycleState. -func (pl *InterPodAffinity) RemovePod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *InterPodAffinity) RemovePod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { state, err := getPreFilterState(cycleState) if err != nil { return framework.NewStatus(framework.Error, err.Error()) } - state.updateWithPod(podToRemove, podToSchedule, nodeInfo.Node(), -1) + state.updateWithPod(podToRemove, nodeInfo.Node(), -1) return nil } @@ -401,147 +314,86 @@ func getPreFilterState(cycleState *framework.CycleState) (*preFilterState, error // Checks if scheduling the pod onto this node would break any anti-affinity // terms indicated by the existing pods. -func (pl *InterPodAffinity) satisfiesExistingPodsAntiAffinity(pod *v1.Pod, state *preFilterState, nodeInfo *nodeinfo.NodeInfo) (bool, error) { - node := nodeInfo.Node() - topologyMap := state.topologyToMatchedExistingAntiAffinityTerms - - // Iterate over topology pairs to get any of the pods being affected by - // the scheduled pod anti-affinity terms - for topologyKey, topologyValue := range node.Labels { - if topologyMap[topologyPair{key: topologyKey, value: topologyValue}] > 0 { - klog.V(10).Infof("Cannot schedule pod %+v onto node %v", pod.Name, node.Name) - return false, nil - } - } - return true, nil -} - -// nodeMatchesAllTopologyTerms checks whether "nodeInfo" matches topology of all the "terms" for the given "pod". -func nodeMatchesAllTopologyTerms(pod *v1.Pod, topologyPairs topologyToMatchedTermCount, nodeInfo *nodeinfo.NodeInfo, terms []v1.PodAffinityTerm) bool { - node := nodeInfo.Node() - for _, term := range terms { - if topologyValue, ok := node.Labels[term.TopologyKey]; ok { - pair := topologyPair{key: term.TopologyKey, value: topologyValue} - if topologyPairs[pair] <= 0 { +func satisfyExistingPodsAntiAffinity(state *preFilterState, nodeInfo *framework.NodeInfo) bool { + if len(state.topologyToMatchedExistingAntiAffinityTerms) > 0 { + // Iterate over topology pairs to get any of the pods being affected by + // the scheduled pod anti-affinity terms + for topologyKey, topologyValue := range nodeInfo.Node().Labels { + tp := topologyPair{key: topologyKey, value: topologyValue} + if state.topologyToMatchedExistingAntiAffinityTerms[tp] > 0 { return false } - } else { - return false } } return true } -// nodeMatchesAnyTopologyTerm checks whether "nodeInfo" matches -// topology of any "term" for the given "pod". -func nodeMatchesAnyTopologyTerm(pod *v1.Pod, topologyPairs topologyToMatchedTermCount, nodeInfo *nodeinfo.NodeInfo, terms []v1.PodAffinityTerm) bool { - node := nodeInfo.Node() - for _, term := range terms { - if topologyValue, ok := node.Labels[term.TopologyKey]; ok { - pair := topologyPair{key: term.TopologyKey, value: topologyValue} - if topologyPairs[pair] > 0 { - return true +// Checks if the node satisifies the incoming pod's anti-affinity rules. +func satisfyPodAntiAffinity(state *preFilterState, nodeInfo *framework.NodeInfo) bool { + for _, term := range state.podInfo.RequiredAntiAffinityTerms { + if topologyValue, ok := nodeInfo.Node().Labels[term.TopologyKey]; ok { + tp := topologyPair{key: term.TopologyKey, value: topologyValue} + if state.topologyToMatchedAntiAffinityTerms[tp] > 0 { + return false } } } - return false + return true } -// getMatchingAntiAffinityTopologyPairs calculates the following for "existingPod" on given node: -// (1) Whether it has PodAntiAffinity -// (2) Whether ANY AffinityTerm matches the incoming pod -func getMatchingAntiAffinityTopologyPairsOfPod(newPod *v1.Pod, existingPod *v1.Pod, node *v1.Node) (topologyToMatchedTermCount, error) { - affinity := existingPod.Spec.Affinity - if affinity == nil || affinity.PodAntiAffinity == nil { - return nil, nil - } - - topologyMap := make(topologyToMatchedTermCount) - for _, term := range schedutil.GetPodAntiAffinityTerms(affinity.PodAntiAffinity) { - selector, err := metav1.LabelSelectorAsSelector(term.LabelSelector) - if err != nil { - return nil, err - } - namespaces := schedutil.GetNamespacesFromPodAffinityTerm(existingPod, &term) - if schedutil.PodMatchesTermsNamespaceAndSelector(newPod, namespaces, selector) { - if topologyValue, ok := node.Labels[term.TopologyKey]; ok { - pair := topologyPair{key: term.TopologyKey, value: topologyValue} - topologyMap[pair]++ - } - } - } - return topologyMap, nil -} - -// satisfiesPodsAffinityAntiAffinity checks if scheduling the pod onto this node would break any term of this pod. -// This function returns two boolean flags. The first boolean flag indicates whether the pod matches affinity rules -// or not. The second boolean flag indicates if the pod matches anti-affinity rules. -func (pl *InterPodAffinity) satisfiesPodsAffinityAntiAffinity(pod *v1.Pod, - state *preFilterState, nodeInfo *nodeinfo.NodeInfo, - affinity *v1.Affinity) (bool, bool, error) { - node := nodeInfo.Node() - if node == nil { - return false, false, fmt.Errorf("node not found") - } - - // Check all affinity terms. - topologyToMatchedAffinityTerms := state.topologyToMatchedAffinityTerms - if affinityTerms := schedutil.GetPodAffinityTerms(affinity.PodAffinity); len(affinityTerms) > 0 { - matchExists := nodeMatchesAllTopologyTerms(pod, topologyToMatchedAffinityTerms, nodeInfo, affinityTerms) - if !matchExists { - // This pod may the first pod in a series that have affinity to themselves. In order - // to not leave such pods in pending state forever, we check that if no other pod - // in the cluster matches the namespace and selector of this pod and the pod matches - // its own terms, then we allow the pod to pass the affinity check. - if len(topologyToMatchedAffinityTerms) != 0 || !targetPodMatchesAffinityOfPod(pod, pod) { - return false, false, nil +// Checks if the node satisfies the incoming pod's affinity rules. +func satisfyPodAffinity(state *preFilterState, nodeInfo *framework.NodeInfo) bool { + podsExist := true + for _, term := range state.podInfo.RequiredAffinityTerms { + if topologyValue, ok := nodeInfo.Node().Labels[term.TopologyKey]; ok { + tp := topologyPair{key: term.TopologyKey, value: topologyValue} + if state.topologyToMatchedAffinityTerms[tp] <= 0 { + podsExist = false } + } else { + // All topology labels must exist on the node. + return false } } - // Check all anti-affinity terms. - topologyToMatchedAntiAffinityTerms := state.topologyToMatchedAntiAffinityTerms - if antiAffinityTerms := schedutil.GetPodAntiAffinityTerms(affinity.PodAntiAffinity); len(antiAffinityTerms) > 0 { - matchExists := nodeMatchesAnyTopologyTerm(pod, topologyToMatchedAntiAffinityTerms, nodeInfo, antiAffinityTerms) - if matchExists { - return true, false, nil + if !podsExist { + // This pod may be the first pod in a series that have affinity to themselves. In order + // to not leave such pods in pending state forever, we check that if no other pod + // in the cluster matches the namespace and selector of this pod, the pod matches + // its own terms, and the node has all the requested topologies, then we allow the pod + // to pass the affinity check. + podInfo := state.podInfo + if len(state.topologyToMatchedAffinityTerms) == 0 && podMatchesAllAffinityTerms(podInfo.Pod, podInfo.RequiredAffinityTerms) { + return true } + return false } - - return true, true, nil + return true } // Filter invoked at the filter extension point. // It checks if a pod can be scheduled on the specified node with pod affinity/anti-affinity configuration. -func (pl *InterPodAffinity) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *InterPodAffinity) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { + if nodeInfo.Node() == nil { + return framework.NewStatus(framework.Error, "node not found") + } + state, err := getPreFilterState(cycleState) if err != nil { return framework.NewStatus(framework.Error, err.Error()) } - if s, err := pl.satisfiesExistingPodsAntiAffinity(pod, state, nodeInfo); !s || err != nil { - if err != nil { - return framework.NewStatus(framework.Error, err.Error()) - } - return framework.NewStatus(framework.Unschedulable, ErrReasonAffinityNotMatch, ErrReasonExistingAntiAffinityRulesNotMatch) + if !satisfyPodAffinity(state, nodeInfo) { + return framework.NewStatus(framework.UnschedulableAndUnresolvable, ErrReasonAffinityNotMatch, ErrReasonAffinityRulesNotMatch) } - // Now check if requirements will be satisfied on this node. - affinity := pod.Spec.Affinity - if affinity == nil || (affinity.PodAffinity == nil && affinity.PodAntiAffinity == nil) { - return nil - } - if satisfiesAffinity, satisfiesAntiAffinity, err := pl.satisfiesPodsAffinityAntiAffinity(pod, state, nodeInfo, affinity); err != nil || !satisfiesAffinity || !satisfiesAntiAffinity { - if err != nil { - return framework.NewStatus(framework.Error, err.Error()) - } - - if !satisfiesAffinity { - return framework.NewStatus(framework.UnschedulableAndUnresolvable, ErrReasonAffinityNotMatch, ErrReasonAffinityRulesNotMatch) - } - + if !satisfyPodAntiAffinity(state, nodeInfo) { return framework.NewStatus(framework.Unschedulable, ErrReasonAffinityNotMatch, ErrReasonAntiAffinityRulesNotMatch) } + if !satisfyExistingPodsAntiAffinity(state, nodeInfo) { + return framework.NewStatus(framework.Unschedulable, ErrReasonAffinityNotMatch, ErrReasonExistingAntiAffinityRulesNotMatch) + } + return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go index f9fd6ec1c29..b4953ad4397 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go @@ -18,34 +18,18 @@ package interpodaffinity import ( "fmt" - "sync" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/kubernetes/pkg/scheduler/apis/config" + "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - schedulerlisters "k8s.io/kubernetes/pkg/scheduler/listers" - "k8s.io/utils/pointer" ) const ( // Name is the name of the plugin used in the plugin registry and configurations. Name = "InterPodAffinity" - - // DefaultHardPodAffinityWeight is the default HardPodAffinityWeight. - DefaultHardPodAffinityWeight int32 = 1 - // MinHardPodAffinityWeight is the minimum HardPodAffinityWeight. - MinHardPodAffinityWeight int32 = 0 - // MaxHardPodAffinityWeight is the maximum HardPodAffinityWeight. - MaxHardPodAffinityWeight int32 = 100 ) -// Args holds the args that are used to configure the plugin. -type Args struct { - // HardPodAffinityWeight is the scoring weight for existing pods with a - // matching hard affinity to the incoming pod. - HardPodAffinityWeight *int32 `json:"hardPodAffinityWeight,omitempty"` -} - var _ framework.PreFilterPlugin = &InterPodAffinity{} var _ framework.FilterPlugin = &InterPodAffinity{} var _ framework.PreScorePlugin = &InterPodAffinity{} @@ -53,9 +37,8 @@ var _ framework.ScorePlugin = &InterPodAffinity{} // InterPodAffinity is a plugin that checks inter pod affinity type InterPodAffinity struct { - Args - sharedLister schedulerlisters.SharedLister - sync.Mutex + args config.InterPodAffinityArgs + sharedLister framework.SharedLister } // Name returns name of the plugin. It is used in logs, etc. @@ -65,41 +48,31 @@ func (pl *InterPodAffinity) Name() string { // BuildArgs returns the args that were used to build the plugin. func (pl *InterPodAffinity) BuildArgs() interface{} { - return pl.Args + return pl.args } // New initializes a new plugin and returns it. -func New(plArgs *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error) { +func New(plArgs runtime.Object, h framework.FrameworkHandle) (framework.Plugin, error) { if h.SnapshotSharedLister() == nil { return nil, fmt.Errorf("SnapshotSharedlister is nil") } - pl := &InterPodAffinity{ + args, err := getArgs(plArgs) + if err != nil { + return nil, err + } + if err := validation.ValidateInterPodAffinityArgs(args); err != nil { + return nil, err + } + return &InterPodAffinity{ + args: args, sharedLister: h.SnapshotSharedLister(), - } - if err := framework.DecodeInto(plArgs, &pl.Args); err != nil { - return nil, err - } - if err := validateArgs(&pl.Args); err != nil { - return nil, err - } - if pl.HardPodAffinityWeight == nil { - pl.HardPodAffinityWeight = pointer.Int32Ptr(DefaultHardPodAffinityWeight) - } - return pl, nil + }, nil } -func validateArgs(args *Args) error { - if args.HardPodAffinityWeight == nil { - return nil +func getArgs(obj runtime.Object) (config.InterPodAffinityArgs, error) { + ptr, ok := obj.(*config.InterPodAffinityArgs) + if !ok { + return config.InterPodAffinityArgs{}, fmt.Errorf("want args to be of type InterPodAffinityArgs, got %T", obj) } - return ValidateHardPodAffinityWeight(field.NewPath("hardPodAffinityWeight"), *args.HardPodAffinityWeight) -} - -// ValidateHardPodAffinityWeight validates that weight is within allowed range. -func ValidateHardPodAffinityWeight(path *field.Path, w int32) error { - if w < MinHardPodAffinityWeight || w > MaxHardPodAffinityWeight { - msg := fmt.Sprintf("not in valid range [%d-%d]", MinHardPodAffinityWeight, MaxHardPodAffinityWeight) - return field.Invalid(path, w, msg) - } - return nil + return *ptr, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go index fe80c1a3872..c27ae5f41ef 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go @@ -19,24 +19,23 @@ package interpodaffinity import ( "context" "fmt" + "sync/atomic" v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/util/workqueue" - "k8s.io/klog" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + "k8s.io/kubernetes/pkg/scheduler/internal/parallelize" schedutil "k8s.io/kubernetes/pkg/scheduler/util" ) // preScoreStateKey is the key in CycleState to InterPodAffinity pre-computed data for Scoring. const preScoreStateKey = "PreScore" + Name +type scoreMap map[string]map[string]int64 + // preScoreState computed at PreScore and used at Score. type preScoreState struct { - topologyScore map[string]map[string]int64 - affinityTerms []*weightedAffinityTerm - antiAffinityTerms []*weightedAffinityTerm + topologyScore scoreMap + podInfo *framework.PodInfo } // Clone implements the mandatory Clone interface. We don't really copy the data since @@ -45,40 +44,8 @@ func (s *preScoreState) Clone() framework.StateData { return s } -// A "processed" representation of v1.WeightedAffinityTerm. -type weightedAffinityTerm struct { - affinityTerm - weight int32 -} - -func newWeightedAffinityTerm(pod *v1.Pod, term *v1.PodAffinityTerm, weight int32) (*weightedAffinityTerm, error) { - namespaces := schedutil.GetNamespacesFromPodAffinityTerm(pod, term) - selector, err := metav1.LabelSelectorAsSelector(term.LabelSelector) - if err != nil { - return nil, err - } - return &weightedAffinityTerm{affinityTerm: affinityTerm{namespaces: namespaces, selector: selector, topologyKey: term.TopologyKey}, weight: weight}, nil -} - -func getWeightedAffinityTerms(pod *v1.Pod, v1Terms []v1.WeightedPodAffinityTerm) ([]*weightedAffinityTerm, error) { - if v1Terms == nil { - return nil, nil - } - - var terms []*weightedAffinityTerm - for i := range v1Terms { - p, err := newWeightedAffinityTerm(pod, &v1Terms[i].PodAffinityTerm, v1Terms[i].Weight) - if err != nil { - return nil, err - } - terms = append(terms, p) - } - return terms, nil -} - -func (pl *InterPodAffinity) processTerm( - state *preScoreState, - term *weightedAffinityTerm, +func (m scoreMap) processTerm( + term *framework.WeightedAffinityTerm, podToCheck *v1.Pod, fixedNode *v1.Node, multiplier int, @@ -87,83 +54,74 @@ func (pl *InterPodAffinity) processTerm( return } - match := schedutil.PodMatchesTermsNamespaceAndSelector(podToCheck, term.namespaces, term.selector) - tpValue, tpValueExist := fixedNode.Labels[term.topologyKey] + match := schedutil.PodMatchesTermsNamespaceAndSelector(podToCheck, term.Namespaces, term.Selector) + tpValue, tpValueExist := fixedNode.Labels[term.TopologyKey] if match && tpValueExist { - pl.Lock() - if state.topologyScore[term.topologyKey] == nil { - state.topologyScore[term.topologyKey] = make(map[string]int64) + if m[term.TopologyKey] == nil { + m[term.TopologyKey] = make(map[string]int64) } - state.topologyScore[term.topologyKey][tpValue] += int64(term.weight * int32(multiplier)) - pl.Unlock() + m[term.TopologyKey][tpValue] += int64(term.Weight * int32(multiplier)) } return } -func (pl *InterPodAffinity) processTerms(state *preScoreState, terms []*weightedAffinityTerm, podToCheck *v1.Pod, fixedNode *v1.Node, multiplier int) error { +func (m scoreMap) processTerms(terms []framework.WeightedAffinityTerm, podToCheck *v1.Pod, fixedNode *v1.Node, multiplier int) { for _, term := range terms { - pl.processTerm(state, term, podToCheck, fixedNode, multiplier) + m.processTerm(&term, podToCheck, fixedNode, multiplier) } - return nil } -func (pl *InterPodAffinity) processExistingPod(state *preScoreState, existingPod *v1.Pod, existingPodNodeInfo *nodeinfo.NodeInfo, incomingPod *v1.Pod) error { - existingPodAffinity := existingPod.Spec.Affinity - existingHasAffinityConstraints := existingPodAffinity != nil && existingPodAffinity.PodAffinity != nil - existingHasAntiAffinityConstraints := existingPodAffinity != nil && existingPodAffinity.PodAntiAffinity != nil +func (m scoreMap) append(other scoreMap) { + for topology, oScores := range other { + scores := m[topology] + if scores == nil { + m[topology] = oScores + continue + } + for k, v := range oScores { + scores[k] += v + } + } +} + +func (pl *InterPodAffinity) processExistingPod( + state *preScoreState, + existingPod *framework.PodInfo, + existingPodNodeInfo *framework.NodeInfo, + incomingPod *v1.Pod, + topoScore scoreMap, +) { existingPodNode := existingPodNodeInfo.Node() // For every soft pod affinity term of , if matches the term, // increment for every node in the cluster with the same // value as that of `s node by the term`s weight. - pl.processTerms(state, state.affinityTerms, existingPod, existingPodNode, 1) + topoScore.processTerms(state.podInfo.PreferredAffinityTerms, existingPod.Pod, existingPodNode, 1) // For every soft pod anti-affinity term of , if matches the term, // decrement for every node in the cluster with the same // value as that of `s node by the term`s weight. - pl.processTerms(state, state.antiAffinityTerms, existingPod, existingPodNode, -1) + topoScore.processTerms(state.podInfo.PreferredAntiAffinityTerms, existingPod.Pod, existingPodNode, -1) - if existingHasAffinityConstraints { - // For every hard pod affinity term of , if matches the term, - // increment for every node in the cluster with the same - // value as that of 's node by the constant - if *pl.HardPodAffinityWeight > 0 { - terms := existingPodAffinity.PodAffinity.RequiredDuringSchedulingIgnoredDuringExecution - // TODO: Uncomment this block when implement RequiredDuringSchedulingRequiredDuringExecution. - //if len(existingPodAffinity.PodAffinity.RequiredDuringSchedulingRequiredDuringExecution) != 0 { - // terms = append(terms, existingPodAffinity.PodAffinity.RequiredDuringSchedulingRequiredDuringExecution...) - //} - for i := range terms { - term := &terms[i] - processedTerm, err := newWeightedAffinityTerm(existingPod, term, *pl.HardPodAffinityWeight) - if err != nil { - return err - } - pl.processTerm(state, processedTerm, incomingPod, existingPodNode, 1) - } - } - // For every soft pod affinity term of , if matches the term, - // increment for every node in the cluster with the same - // value as that of 's node by the term's weight. - terms, err := getWeightedAffinityTerms(existingPod, existingPodAffinity.PodAffinity.PreferredDuringSchedulingIgnoredDuringExecution) - if err != nil { - klog.Error(err) - return nil + // For every hard pod affinity term of , if matches the term, + // increment for every node in the cluster with the same + // value as that of 's node by the constant + if pl.args.HardPodAffinityWeight > 0 { + for _, term := range existingPod.RequiredAffinityTerms { + t := framework.WeightedAffinityTerm{AffinityTerm: term, Weight: pl.args.HardPodAffinityWeight} + topoScore.processTerm(&t, incomingPod, existingPodNode, 1) } + } - pl.processTerms(state, terms, incomingPod, existingPodNode, 1) - } - if existingHasAntiAffinityConstraints { - // For every soft pod anti-affinity term of , if matches the term, - // decrement for every node in the cluster with the same - // value as that of 's node by the term's weight. - terms, err := getWeightedAffinityTerms(existingPod, existingPodAffinity.PodAntiAffinity.PreferredDuringSchedulingIgnoredDuringExecution) - if err != nil { - return err - } - pl.processTerms(state, terms, incomingPod, existingPodNode, -1) - } - return nil + // For every soft pod affinity term of , if matches the term, + // increment for every node in the cluster with the same + // value as that of 's node by the term's weight. + topoScore.processTerms(existingPod.PreferredAffinityTerms, incomingPod, existingPodNode, 1) + + // For every soft pod anti-affinity term of , if matches the term, + // decrement for every node in the cluster with the same + // value as that of 's node by the term's weight. + topoScore.processTerms(existingPod.PreferredAntiAffinityTerms, incomingPod, existingPodNode, -1) } // PreScore builds and writes cycle state used by Score and NormalizeScore. @@ -179,7 +137,7 @@ func (pl *InterPodAffinity) PreScore( } if pl.sharedLister == nil { - return framework.NewStatus(framework.Error, fmt.Sprintf("BuildTopologyPairToScore with empty shared lister")) + return framework.NewStatus(framework.Error, fmt.Sprintf("InterPodAffinity PreScore with empty shared lister found")) } affinity := pod.Spec.Affinity @@ -188,40 +146,33 @@ func (pl *InterPodAffinity) PreScore( // Unless the pod being scheduled has affinity terms, we only // need to process nodes hosting pods with affinity. - allNodes, err := pl.sharedLister.NodeInfos().HavePodsWithAffinityList() - if err != nil { - framework.NewStatus(framework.Error, fmt.Sprintf("get pods with affinity list error, err: %v", err)) - } + var allNodes []*framework.NodeInfo + var err error if hasAffinityConstraints || hasAntiAffinityConstraints { allNodes, err = pl.sharedLister.NodeInfos().List() if err != nil { framework.NewStatus(framework.Error, fmt.Sprintf("get all nodes from shared lister error, err: %v", err)) } + } else { + allNodes, err = pl.sharedLister.NodeInfos().HavePodsWithAffinityList() + if err != nil { + framework.NewStatus(framework.Error, fmt.Sprintf("get pods with affinity list error, err: %v", err)) + } } - var affinityTerms []*weightedAffinityTerm - var antiAffinityTerms []*weightedAffinityTerm - if hasAffinityConstraints { - if affinityTerms, err = getWeightedAffinityTerms(pod, affinity.PodAffinity.PreferredDuringSchedulingIgnoredDuringExecution); err != nil { - klog.Error(err) - return nil - } - } - if hasAntiAffinityConstraints { - if antiAffinityTerms, err = getWeightedAffinityTerms(pod, affinity.PodAntiAffinity.PreferredDuringSchedulingIgnoredDuringExecution); err != nil { - klog.Error(err) - return nil - } + podInfo := framework.NewPodInfo(pod) + if podInfo.ParseError != nil { + // Ideally we never reach here, because errors will be caught by PreFilter + return framework.NewStatus(framework.Error, fmt.Sprintf("parsing pod: %+v", podInfo.ParseError)) } state := &preScoreState{ - topologyScore: make(map[string]map[string]int64), - affinityTerms: affinityTerms, - antiAffinityTerms: antiAffinityTerms, + topologyScore: make(map[string]map[string]int64), + podInfo: podInfo, } - errCh := schedutil.NewErrorChannel() - ctx, cancel := context.WithCancel(pCtx) + topoScores := make([]scoreMap, len(allNodes)) + index := int32(-1) processNode := func(i int) { nodeInfo := allNodes[i] if nodeInfo.Node() == nil { @@ -229,22 +180,24 @@ func (pl *InterPodAffinity) PreScore( } // Unless the pod being scheduled has affinity terms, we only // need to process pods with affinity in the node. - podsToProcess := nodeInfo.PodsWithAffinity() + podsToProcess := nodeInfo.PodsWithAffinity if hasAffinityConstraints || hasAntiAffinityConstraints { // We need to process all the pods. - podsToProcess = nodeInfo.Pods() + podsToProcess = nodeInfo.Pods } + topoScore := make(scoreMap) for _, existingPod := range podsToProcess { - if err := pl.processExistingPod(state, existingPod, nodeInfo, pod); err != nil { - errCh.SendErrorWithCancel(err, cancel) - return - } + pl.processExistingPod(state, existingPod, nodeInfo, pod, topoScore) + } + if len(topoScore) > 0 { + topoScores[atomic.AddInt32(&index, 1)] = topoScore } } - workqueue.ParallelizeUntil(ctx, 16, len(allNodes), processNode) - if err := errCh.ReceiveError(); err != nil { - return framework.NewStatus(framework.Error, err.Error()) + parallelize.Until(context.Background(), len(allNodes), processNode) + + for i := 0; i <= int(index); i++ { + state.topologyScore.append(topoScores[i]) } cycleState.Write(preScoreStateKey, state) @@ -265,8 +218,9 @@ func getPreScoreState(cycleState *framework.CycleState) (*preScoreState, error) } // Score invoked at the Score extension point. -// The "score" returned in this function is the matching number of pods on the `nodeName`, +// The "score" returned in this function is the sum of weights got from cycleState which have its topologyKey matching with the node's labels. // it is normalized later. +// Note: the returned "score" is positive for pod-affinity, and negative for pod-antiaffinity. func (pl *InterPodAffinity) Score(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) { nodeInfo, err := pl.sharedLister.NodeInfos().Get(nodeName) if err != nil || nodeInfo.Node() == nil { @@ -289,8 +243,6 @@ func (pl *InterPodAffinity) Score(ctx context.Context, cycleState *framework.Cyc } // NormalizeScore normalizes the score for each filteredNode. -// The basic rule is: the bigger the score(matching number of pods) is, the smaller the -// final normalized score will be. func (pl *InterPodAffinity) NormalizeScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status { s, err := getPreScoreState(cycleState) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/legacy_registry.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/legacy_registry.go index 25f0750a195..dc2ca2f8684 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/legacy_registry.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/legacy_registry.go @@ -17,15 +17,10 @@ limitations under the License. package plugins import ( - "encoding/json" - - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" - "k8s.io/kubernetes/pkg/features" + + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity" @@ -37,6 +32,7 @@ import ( "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeunschedulable" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread" + "k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding" @@ -77,8 +73,6 @@ const ( // ImageLocalityPriority defines the name of prioritizer function that prioritizes nodes that have images // requested by the pod present. ImageLocalityPriority = "ImageLocalityPriority" - // ResourceLimitsPriority defines the nodes of prioritizer function ResourceLimitsPriority. - ResourceLimitsPriority = "ResourceLimitsPriority" // EvenPodsSpreadPriority defines the name of prioritizer function that prioritizes nodes // which have pods and labels matching the incoming pod's topologySpreadConstraints. EvenPodsSpreadPriority = "EvenPodsSpreadPriority" @@ -164,15 +158,15 @@ type ConfigProducerArgs struct { // Weight used for priority functions. Weight int32 // NodeLabelArgs is the args for the NodeLabel plugin. - NodeLabelArgs *nodelabel.Args + NodeLabelArgs *config.NodeLabelArgs // RequestedToCapacityRatioArgs is the args for the RequestedToCapacityRatio plugin. - RequestedToCapacityRatioArgs *noderesources.RequestedToCapacityRatioArgs + RequestedToCapacityRatioArgs *config.RequestedToCapacityRatioArgs // ServiceAffinityArgs is the args for the ServiceAffinity plugin. - ServiceAffinityArgs *serviceaffinity.Args + ServiceAffinityArgs *config.ServiceAffinityArgs // NodeResourcesFitArgs is the args for the NodeResources fit filter. - NodeResourcesFitArgs *noderesources.FitArgs + NodeResourcesFitArgs *config.NodeResourcesFitArgs // InterPodAffinityArgs is the args for InterPodAffinity plugin - InterPodAffinityArgs *interpodaffinity.Args + InterPodAffinityArgs *config.InterPodAffinityArgs } // ConfigProducer returns the set of plugins and their configuration for a @@ -202,6 +196,7 @@ func NewLegacyRegistry() *LegacyRegistry { PodToleratesNodeTaintsPred, CheckVolumeBindingPred, CheckNodeUnschedulablePred, + EvenPodsSpreadPred, ), // Used as the default set of predicates if Policy was specified, but priorities was nil. @@ -214,6 +209,7 @@ func NewLegacyRegistry() *LegacyRegistry { NodeAffinityPriority: 1, TaintTolerationPriority: 1, ImageLocalityPriority: 1, + EvenPodsSpreadPriority: 2, }, PredicateToConfigProducer: make(map[string]ConfigProducer), @@ -226,7 +222,8 @@ func NewLegacyRegistry() *LegacyRegistry { plugins.Filter = appendToPluginSet(plugins.Filter, noderesources.FitName, nil) plugins.PreFilter = appendToPluginSet(plugins.PreFilter, noderesources.FitName, nil) if args.NodeResourcesFitArgs != nil { - pluginConfig = append(pluginConfig, NewPluginConfig(noderesources.FitName, args.NodeResourcesFitArgs)) + pluginConfig = append(pluginConfig, + config.PluginConfig{Name: noderesources.FitName, Args: args.NodeResourcesFitArgs}) } plugins.Filter = appendToPluginSet(plugins.Filter, nodename.Name, nil) plugins.Filter = appendToPluginSet(plugins.Filter, nodeports.Name, nil) @@ -244,7 +241,8 @@ func NewLegacyRegistry() *LegacyRegistry { plugins.Filter = appendToPluginSet(plugins.Filter, noderesources.FitName, nil) plugins.PreFilter = appendToPluginSet(plugins.PreFilter, noderesources.FitName, nil) if args.NodeResourcesFitArgs != nil { - pluginConfig = append(pluginConfig, NewPluginConfig(noderesources.FitName, args.NodeResourcesFitArgs)) + pluginConfig = append(pluginConfig, + config.PluginConfig{Name: noderesources.FitName, Args: args.NodeResourcesFitArgs}) } return }) @@ -271,7 +269,10 @@ func NewLegacyRegistry() *LegacyRegistry { }) registry.registerPredicateConfigProducer(CheckVolumeBindingPred, func(args ConfigProducerArgs) (plugins config.Plugins, pluginConfig []config.PluginConfig) { + plugins.PreFilter = appendToPluginSet(plugins.PreFilter, volumebinding.Name, nil) plugins.Filter = appendToPluginSet(plugins.Filter, volumebinding.Name, nil) + plugins.Reserve = appendToPluginSet(plugins.Reserve, volumebinding.Name, nil) + plugins.PreBind = appendToPluginSet(plugins.PreBind, volumebinding.Name, nil) return }) registry.registerPredicateConfigProducer(NoDiskConflictPred, @@ -319,7 +320,8 @@ func NewLegacyRegistry() *LegacyRegistry { func(args ConfigProducerArgs) (plugins config.Plugins, pluginConfig []config.PluginConfig) { plugins.Filter = appendToPluginSet(plugins.Filter, nodelabel.Name, nil) if args.NodeLabelArgs != nil { - pluginConfig = append(pluginConfig, NewPluginConfig(nodelabel.Name, args.NodeLabelArgs)) + pluginConfig = append(pluginConfig, + config.PluginConfig{Name: nodelabel.Name, Args: args.NodeLabelArgs}) } return }) @@ -327,17 +329,24 @@ func NewLegacyRegistry() *LegacyRegistry { func(args ConfigProducerArgs) (plugins config.Plugins, pluginConfig []config.PluginConfig) { plugins.Filter = appendToPluginSet(plugins.Filter, serviceaffinity.Name, nil) if args.ServiceAffinityArgs != nil { - pluginConfig = append(pluginConfig, NewPluginConfig(serviceaffinity.Name, args.ServiceAffinityArgs)) + pluginConfig = append(pluginConfig, + config.PluginConfig{Name: serviceaffinity.Name, Args: args.ServiceAffinityArgs}) } plugins.PreFilter = appendToPluginSet(plugins.PreFilter, serviceaffinity.Name, nil) return }) + registry.registerPredicateConfigProducer(EvenPodsSpreadPred, + func(_ ConfigProducerArgs) (plugins config.Plugins, pluginConfig []config.PluginConfig) { + plugins.PreFilter = appendToPluginSet(plugins.PreFilter, podtopologyspread.Name, nil) + plugins.Filter = appendToPluginSet(plugins.Filter, podtopologyspread.Name, nil) + return + }) // Register Priorities. registry.registerPriorityConfigProducer(SelectorSpreadPriority, func(args ConfigProducerArgs) (plugins config.Plugins, pluginConfig []config.PluginConfig) { - plugins.Score = appendToPluginSet(plugins.Score, defaultpodtopologyspread.Name, &args.Weight) - plugins.PreScore = appendToPluginSet(plugins.PreScore, defaultpodtopologyspread.Name, nil) + plugins.Score = appendToPluginSet(plugins.Score, selectorspread.Name, &args.Weight) + plugins.PreScore = appendToPluginSet(plugins.PreScore, selectorspread.Name, nil) return }) registry.registerPriorityConfigProducer(TaintTolerationPriority, @@ -361,7 +370,8 @@ func NewLegacyRegistry() *LegacyRegistry { plugins.PreScore = appendToPluginSet(plugins.PreScore, interpodaffinity.Name, nil) plugins.Score = appendToPluginSet(plugins.Score, interpodaffinity.Name, &args.Weight) if args.InterPodAffinityArgs != nil { - pluginConfig = append(pluginConfig, NewPluginConfig(interpodaffinity.Name, args.InterPodAffinityArgs)) + pluginConfig = append(pluginConfig, + config.PluginConfig{Name: interpodaffinity.Name, Args: args.InterPodAffinityArgs}) } return }) @@ -389,11 +399,11 @@ func NewLegacyRegistry() *LegacyRegistry { func(args ConfigProducerArgs) (plugins config.Plugins, pluginConfig []config.PluginConfig) { plugins.Score = appendToPluginSet(plugins.Score, noderesources.RequestedToCapacityRatioName, &args.Weight) if args.RequestedToCapacityRatioArgs != nil { - pluginConfig = append(pluginConfig, NewPluginConfig(noderesources.RequestedToCapacityRatioName, args.RequestedToCapacityRatioArgs)) + pluginConfig = append(pluginConfig, + config.PluginConfig{Name: noderesources.RequestedToCapacityRatioName, Args: args.RequestedToCapacityRatioArgs}) } return }) - registry.registerPriorityConfigProducer(nodelabel.Name, func(args ConfigProducerArgs) (plugins config.Plugins, pluginConfig []config.PluginConfig) { // If there are n LabelPreference priorities in the policy, the weight for the corresponding @@ -402,7 +412,8 @@ func NewLegacyRegistry() *LegacyRegistry { weight := args.Weight * int32(len(args.NodeLabelArgs.PresentLabelsPreference)+len(args.NodeLabelArgs.AbsentLabelsPreference)) plugins.Score = appendToPluginSet(plugins.Score, nodelabel.Name, &weight) if args.NodeLabelArgs != nil { - pluginConfig = append(pluginConfig, NewPluginConfig(nodelabel.Name, args.NodeLabelArgs)) + pluginConfig = append(pluginConfig, + config.PluginConfig{Name: nodelabel.Name, Args: args.NodeLabelArgs}) } return }) @@ -414,46 +425,17 @@ func NewLegacyRegistry() *LegacyRegistry { weight := args.Weight * int32(len(args.ServiceAffinityArgs.AntiAffinityLabelsPreference)) plugins.Score = appendToPluginSet(plugins.Score, serviceaffinity.Name, &weight) if args.ServiceAffinityArgs != nil { - pluginConfig = append(pluginConfig, NewPluginConfig(serviceaffinity.Name, args.ServiceAffinityArgs)) + pluginConfig = append(pluginConfig, + config.PluginConfig{Name: serviceaffinity.Name, Args: args.ServiceAffinityArgs}) } return }) - - // The following two features are the last ones to be supported as predicate/priority. - // Once they graduate to GA, there will be no more checking for featue gates here. - // Only register EvenPodsSpread predicate & priority if the feature is enabled - if utilfeature.DefaultFeatureGate.Enabled(features.EvenPodsSpread) { - klog.Infof("Registering EvenPodsSpread predicate and priority function") - - registry.registerPredicateConfigProducer(EvenPodsSpreadPred, - func(_ ConfigProducerArgs) (plugins config.Plugins, pluginConfig []config.PluginConfig) { - plugins.PreFilter = appendToPluginSet(plugins.PreFilter, podtopologyspread.Name, nil) - plugins.Filter = appendToPluginSet(plugins.Filter, podtopologyspread.Name, nil) - return - }) - registry.DefaultPredicates.Insert(EvenPodsSpreadPred) - - registry.registerPriorityConfigProducer(EvenPodsSpreadPriority, - func(args ConfigProducerArgs) (plugins config.Plugins, pluginConfig []config.PluginConfig) { - plugins.PreScore = appendToPluginSet(plugins.PreScore, podtopologyspread.Name, nil) - plugins.Score = appendToPluginSet(plugins.Score, podtopologyspread.Name, &args.Weight) - return - }) - registry.DefaultPriorities[EvenPodsSpreadPriority] = 1 - } - - // Prioritizes nodes that satisfy pod's resource limits - if utilfeature.DefaultFeatureGate.Enabled(features.ResourceLimitsPriorityFunction) { - klog.Infof("Registering resourcelimits priority function") - - registry.registerPriorityConfigProducer(ResourceLimitsPriority, - func(args ConfigProducerArgs) (plugins config.Plugins, pluginConfig []config.PluginConfig) { - plugins.PreScore = appendToPluginSet(plugins.PreScore, noderesources.ResourceLimitsName, nil) - plugins.Score = appendToPluginSet(plugins.Score, noderesources.ResourceLimitsName, &args.Weight) - return - }) - registry.DefaultPriorities[ResourceLimitsPriority] = 1 - } + registry.registerPriorityConfigProducer(EvenPodsSpreadPriority, + func(args ConfigProducerArgs) (plugins config.Plugins, pluginConfig []config.PluginConfig) { + plugins.PreScore = appendToPluginSet(plugins.PreScore, podtopologyspread.Name, nil) + plugins.Score = appendToPluginSet(plugins.Score, podtopologyspread.Name, &args.Weight) + return + }) return registry } @@ -486,19 +468,6 @@ func appendToPluginSet(set *config.PluginSet, name string, weight *int32) *confi return set } -// NewPluginConfig builds a PluginConfig with the struct of args marshaled. -// It panics if it fails to marshal. -func NewPluginConfig(pluginName string, args interface{}) config.PluginConfig { - encoding, err := json.Marshal(args) - if err != nil { - klog.Fatalf("failed to marshal %+v: %v", args, err) - } - return config.PluginConfig{ - Name: pluginName, - Args: runtime.Unknown{Raw: encoding}, - } -} - // ProcessPredicatePolicy given a PredicatePolicy, return the plugin name implementing the predicate and update // the ConfigProducerArgs if necessary. func (lr *LegacyRegistry) ProcessPredicatePolicy(policy config.PredicatePolicy, pluginArgs *ConfigProducerArgs) string { @@ -525,7 +494,7 @@ func (lr *LegacyRegistry) ProcessPredicatePolicy(policy config.PredicatePolicy, if policy.Argument.ServiceAffinity != nil { // map LabelsPresence policy to ConfigProducerArgs that's used to configure the ServiceAffinity plugin. if pluginArgs.ServiceAffinityArgs == nil { - pluginArgs.ServiceAffinityArgs = &serviceaffinity.Args{} + pluginArgs.ServiceAffinityArgs = &config.ServiceAffinityArgs{} } pluginArgs.ServiceAffinityArgs.AffinityLabels = append(pluginArgs.ServiceAffinityArgs.AffinityLabels, policy.Argument.ServiceAffinity.Labels...) @@ -538,7 +507,7 @@ func (lr *LegacyRegistry) ProcessPredicatePolicy(policy config.PredicatePolicy, if policy.Argument.LabelsPresence != nil { // Map LabelPresence policy to ConfigProducerArgs that's used to configure the NodeLabel plugin. if pluginArgs.NodeLabelArgs == nil { - pluginArgs.NodeLabelArgs = &nodelabel.Args{} + pluginArgs.NodeLabelArgs = &config.NodeLabelArgs{} } if policy.Argument.LabelsPresence.Presence { pluginArgs.NodeLabelArgs.PresentLabels = append(pluginArgs.NodeLabelArgs.PresentLabels, policy.Argument.LabelsPresence.Labels...) @@ -586,7 +555,7 @@ func (lr *LegacyRegistry) ProcessPriorityPolicy(policy config.PriorityPolicy, co // This name is then used to find the registered plugin and run the plugin instead of the priority. priorityName = serviceaffinity.Name if configProducerArgs.ServiceAffinityArgs == nil { - configProducerArgs.ServiceAffinityArgs = &serviceaffinity.Args{} + configProducerArgs.ServiceAffinityArgs = &config.ServiceAffinityArgs{} } configProducerArgs.ServiceAffinityArgs.AntiAffinityLabelsPreference = append( configProducerArgs.ServiceAffinityArgs.AntiAffinityLabelsPreference, @@ -600,7 +569,7 @@ func (lr *LegacyRegistry) ProcessPriorityPolicy(policy config.PriorityPolicy, co // This name is then used to find the registered plugin and run the plugin instead of the priority. priorityName = nodelabel.Name if configProducerArgs.NodeLabelArgs == nil { - configProducerArgs.NodeLabelArgs = &nodelabel.Args{} + configProducerArgs.NodeLabelArgs = &config.NodeLabelArgs{} } if policy.Argument.LabelPreference.Presence { configProducerArgs.NodeLabelArgs.PresentLabelsPreference = append( @@ -616,9 +585,27 @@ func (lr *LegacyRegistry) ProcessPriorityPolicy(policy config.PriorityPolicy, co } if policy.Argument.RequestedToCapacityRatioArguments != nil { - configProducerArgs.RequestedToCapacityRatioArgs = &noderesources.RequestedToCapacityRatioArgs{ - RequestedToCapacityRatioArguments: *policy.Argument.RequestedToCapacityRatioArguments, + policyArgs := policy.Argument.RequestedToCapacityRatioArguments + args := &config.RequestedToCapacityRatioArgs{} + + args.Shape = make([]config.UtilizationShapePoint, len(policyArgs.Shape)) + for i, s := range policyArgs.Shape { + args.Shape[i] = config.UtilizationShapePoint{ + Utilization: s.Utilization, + Score: s.Score, + } } + + args.Resources = make([]config.ResourceSpec, len(policyArgs.Resources)) + for i, r := range policyArgs.Resources { + args.Resources[i] = config.ResourceSpec{ + Name: r.Name, + Weight: r.Weight, + } + } + + configProducerArgs.RequestedToCapacityRatioArgs = args + // We do not allow specifying the name for custom plugins, see #83472 priorityName = noderesources.RequestedToCapacityRatioName } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/BUILD index 1cd808e4ae6..9bbb9ba0dfa 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/BUILD @@ -9,7 +9,6 @@ go_library( "//pkg/apis/core/v1/helper:go_default_library", "//pkg/scheduler/framework/plugins/helper:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", @@ -36,9 +35,9 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/apis/core:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go index 92eaf138110..4309c00be83 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go @@ -26,7 +26,6 @@ import ( v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" pluginhelper "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) // NodeAffinity is a plugin that checks if a pod node selector matches the node label. @@ -51,7 +50,7 @@ func (pl *NodeAffinity) Name() string { } // Filter invoked at the filter extension point. -func (pl *NodeAffinity) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *NodeAffinity) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { node := nodeInfo.Node() if node == nil { return framework.NewStatus(framework.Error, "node not found") @@ -114,6 +113,6 @@ func (pl *NodeAffinity) ScoreExtensions() framework.ScoreExtensions { } // New initializes a new plugin and returns it. -func New(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, h framework.FrameworkHandle) (framework.Plugin, error) { return &NodeAffinity{handle: h}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodelabel/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodelabel/BUILD index 34252117507..8fde2c0d3e9 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodelabel/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodelabel/BUILD @@ -6,8 +6,9 @@ go_library( importpath = "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodelabel", visibility = ["//visibility:public"], deps = [ + "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/apis/config/validation:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", @@ -19,12 +20,12 @@ go_test( srcs = ["node_label_test.go"], embed = [":go_default_library"], deps = [ + "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodelabel/node_label.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodelabel/node_label.go index d4de829eafc..34e73bb56e4 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodelabel/node_label.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodelabel/node_label.go @@ -23,8 +23,9 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/kubernetes/pkg/scheduler/apis/config" + "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) // Name of this plugin. @@ -35,54 +36,35 @@ const ( ErrReasonPresenceViolated = "node(s) didn't have the requested labels" ) -// Args holds the args that are used to configure the plugin. -type Args struct { - // PresentLabels should be present for the node to be considered a fit for hosting the pod - PresentLabels []string `json:"presentLabels,omitempty"` - // AbsentLabels should be absent for the node to be considered a fit for hosting the pod - AbsentLabels []string `json:"absentLabels,omitempty"` - // Nodes that have labels in the list will get a higher score. - PresentLabelsPreference []string `json:"presentLabelsPreference,omitempty"` - // Nodes that don't have labels in the list will get a higher score. - AbsentLabelsPreference []string `json:"absentLabelsPreference,omitempty"` -} - -// validateArgs validates that presentLabels and absentLabels do not conflict. -func validateNoConflict(presentLabels []string, absentLabels []string) error { - m := make(map[string]struct{}, len(presentLabels)) - for _, l := range presentLabels { - m[l] = struct{}{} - } - for _, l := range absentLabels { - if _, ok := m[l]; ok { - return fmt.Errorf("detecting at least one label (e.g., %q) that exist in both the present(%+v) and absent(%+v) label list", l, presentLabels, absentLabels) - } - } - return nil -} - // New initializes a new plugin and returns it. -func New(plArgs *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { - args := Args{} - if err := framework.DecodeInto(plArgs, &args); err != nil { +func New(plArgs runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { + args, err := getArgs(plArgs) + if err != nil { return nil, err } - if err := validateNoConflict(args.PresentLabels, args.AbsentLabels); err != nil { - return nil, err - } - if err := validateNoConflict(args.PresentLabelsPreference, args.AbsentLabelsPreference); err != nil { + + if err := validation.ValidateNodeLabelArgs(args); err != nil { return nil, err } + return &NodeLabel{ handle: handle, - Args: args, + args: args, }, nil } +func getArgs(obj runtime.Object) (config.NodeLabelArgs, error) { + ptr, ok := obj.(*config.NodeLabelArgs) + if !ok { + return config.NodeLabelArgs{}, fmt.Errorf("want args to be of type NodeLabelArgs, got %T", obj) + } + return *ptr, nil +} + // NodeLabel checks whether a pod can fit based on the node labels which match a filter that it requests. type NodeLabel struct { handle framework.FrameworkHandle - Args + args config.NodeLabelArgs } var _ framework.FilterPlugin = &NodeLabel{} @@ -102,7 +84,7 @@ func (pl *NodeLabel) Name() string { // Alternately, eliminating nodes that have a certain label, regardless of value, is also useful // A node may have a label with "retiring" as key and the date as the value // and it may be desirable to avoid scheduling new pods on this node. -func (pl *NodeLabel) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *NodeLabel) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { node := nodeInfo.Node() if node == nil { return framework.NewStatus(framework.Error, "node not found") @@ -117,7 +99,7 @@ func (pl *NodeLabel) Filter(ctx context.Context, _ *framework.CycleState, pod *v } return true } - if check(pl.PresentLabels, true) && check(pl.AbsentLabels, false) { + if check(pl.args.PresentLabels, true) && check(pl.args.AbsentLabels, false) { return nil } @@ -133,18 +115,18 @@ func (pl *NodeLabel) Score(ctx context.Context, state *framework.CycleState, pod node := nodeInfo.Node() score := int64(0) - for _, label := range pl.PresentLabelsPreference { + for _, label := range pl.args.PresentLabelsPreference { if labels.Set(node.Labels).Has(label) { score += framework.MaxNodeScore } } - for _, label := range pl.AbsentLabelsPreference { + for _, label := range pl.args.AbsentLabelsPreference { if !labels.Set(node.Labels).Has(label) { score += framework.MaxNodeScore } } // Take average score for each label to ensure the score doesn't exceed MaxNodeScore. - score /= int64(len(pl.PresentLabelsPreference) + len(pl.AbsentLabelsPreference)) + score /= int64(len(pl.args.PresentLabelsPreference) + len(pl.args.AbsentLabelsPreference)) return score, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/BUILD index d8ba4fe7002..7d7f4dbe599 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/BUILD @@ -7,7 +7,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", ], @@ -33,7 +32,6 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/node_name.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/node_name.go index b50b2f3f7b4..8d1a50666c9 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/node_name.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/node_name.go @@ -22,7 +22,6 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) // NodeName is a plugin that checks if a pod spec node name matches the current node. @@ -44,7 +43,7 @@ func (pl *NodeName) Name() string { } // Filter invoked at the filter extension point. -func (pl *NodeName) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *NodeName) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { if nodeInfo.Node() == nil { return framework.NewStatus(framework.Error, "node not found") } @@ -55,11 +54,11 @@ func (pl *NodeName) Filter(ctx context.Context, _ *framework.CycleState, pod *v1 } // Fits actually checks if the pod fits the node. -func Fits(pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) bool { +func Fits(pod *v1.Pod, nodeInfo *framework.NodeInfo) bool { return len(pod.Spec.NodeName) == 0 || pod.Spec.NodeName == nodeInfo.Node().Name } // New initializes a new plugin and returns it. -func New(_ *runtime.Unknown, _ framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, _ framework.FrameworkHandle) (framework.Plugin, error) { return &NodeName{}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/BUILD index 86d07e5e01e..ea6ae77fbce 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/BUILD @@ -7,7 +7,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", ], @@ -33,7 +32,6 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/node_ports.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/node_ports.go index db20a3ca4e4..f3332fff919 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/node_ports.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/node_ports.go @@ -23,12 +23,12 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) // NodePorts is a plugin that checks if a node has free ports for the requested pod ports. type NodePorts struct{} +var _ framework.PreFilterPlugin = &NodePorts{} var _ framework.FilterPlugin = &NodePorts{} const ( @@ -98,7 +98,7 @@ func getPreFilterState(cycleState *framework.CycleState) (preFilterState, error) } // Filter invoked at the filter extension point. -func (pl *NodePorts) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *NodePorts) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { wantPorts, err := getPreFilterState(cycleState) if err != nil { return framework.NewStatus(framework.Error, err.Error()) @@ -113,13 +113,13 @@ func (pl *NodePorts) Filter(ctx context.Context, cycleState *framework.CycleStat } // Fits checks if the pod fits the node. -func Fits(pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) bool { +func Fits(pod *v1.Pod, nodeInfo *framework.NodeInfo) bool { return fitsPorts(getContainerPorts(pod), nodeInfo) } -func fitsPorts(wantPorts []*v1.ContainerPort, nodeInfo *nodeinfo.NodeInfo) bool { +func fitsPorts(wantPorts []*v1.ContainerPort, nodeInfo *framework.NodeInfo) bool { // try to see whether existingPorts and wantPorts will conflict or not - existingPorts := nodeInfo.UsedPorts() + existingPorts := nodeInfo.UsedPorts for _, cp := range wantPorts { if existingPorts.CheckConflict(cp.HostIP, string(cp.Protocol), cp.HostPort) { return false @@ -129,6 +129,6 @@ func fitsPorts(wantPorts []*v1.ContainerPort, nodeInfo *nodeinfo.NodeInfo) bool } // New initializes a new plugin and returns it. -func New(_ *runtime.Unknown, _ framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, _ framework.FrameworkHandle) (framework.Plugin, error) { return &NodePorts{}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodepreferavoidpods/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodepreferavoidpods/BUILD index 7beedb8fed2..6aa284192d3 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodepreferavoidpods/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodepreferavoidpods/BUILD @@ -19,6 +19,7 @@ go_test( srcs = ["node_prefer_avoid_pods_test.go"], embed = [":go_default_library"], deps = [ + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodepreferavoidpods/node_prefer_avoid_pods.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodepreferavoidpods/node_prefer_avoid_pods.go index 8450f6b707f..8daff1a0907 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodepreferavoidpods/node_prefer_avoid_pods.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodepreferavoidpods/node_prefer_avoid_pods.go @@ -87,6 +87,6 @@ func (pl *NodePreferAvoidPods) ScoreExtensions() framework.ScoreExtensions { } // New initializes a new plugin and returns it. -func New(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, h framework.FrameworkHandle) (framework.Plugin, error) { return &NodePreferAvoidPods{handle: h}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/BUILD index f049b383872..4d09304432a 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/BUILD @@ -9,7 +9,6 @@ go_library( "most_allocated.go", "requested_to_capacity_ratio.go", "resource_allocation.go", - "resource_limits.go", "test_util.go", ], importpath = "k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources", @@ -18,16 +17,18 @@ go_library( "//pkg/apis/core/v1/helper:go_default_library", "//pkg/features:go_default_library", "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/apis/config/validation:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//pkg/scheduler/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -53,19 +54,18 @@ go_test( "least_allocated_test.go", "most_allocated_test.go", "requested_to_capacity_ratio_test.go", - "resource_limits_test.go", ], embed = [":go_default_library"], deps = [ "//pkg/apis/core/v1/helper:go_default_library", "//pkg/features:go_default_library", + "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go index c4d4c9d0cf3..95495e6d18f 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go @@ -53,10 +53,9 @@ func (ba *BalancedAllocation) Score(ctx context.Context, state *framework.CycleS } // ba.score favors nodes with balanced resource usage rate. - // It should **NOT** be used alone, and **MUST** be used together - // with NodeResourcesLeastAllocated plugin. It calculates the difference between the cpu and memory fraction - // of capacity, and prioritizes the host based on how close the two metrics are to each other. - // Detail: score = 10 - variance(cpuFraction,memoryFraction,volumeFraction)*10. The algorithm is partly inspired by: + // It calculates the difference between the cpu and memory fraction of capacity, + // and prioritizes the host based on how close the two metrics are to each other. + // Detail: score = (1 - variance(cpuFraction,memoryFraction,volumeFraction)) * MaxNodeScore. The algorithm is partly inspired by: // "Wei Huang et al. An Energy Efficient Virtual Machine Placement Algorithm with Balanced // Resource Utilization" return ba.score(pod, nodeInfo) @@ -68,7 +67,7 @@ func (ba *BalancedAllocation) ScoreExtensions() framework.ScoreExtensions { } // NewBalancedAllocation initializes a new plugin and returns it. -func NewBalancedAllocation(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error) { +func NewBalancedAllocation(_ runtime.Object, h framework.FrameworkHandle) (framework.Plugin, error) { return &BalancedAllocation{ handle: h, resourceAllocationScorer: resourceAllocationScorer{ @@ -99,15 +98,15 @@ func balancedResourceScorer(requested, allocable resourceToValueMap, includeVolu mean := (cpuFraction + memoryFraction + volumeFraction) / float64(3) variance := float64((((cpuFraction - mean) * (cpuFraction - mean)) + ((memoryFraction - mean) * (memoryFraction - mean)) + ((volumeFraction - mean) * (volumeFraction - mean))) / float64(3)) // Since the variance is between positive fractions, it will be positive fraction. 1-variance lets the - // score to be higher for node which has least variance and multiplying it with 10 provides the scaling + // score to be higher for node which has least variance and multiplying it with `MaxNodeScore` provides the scaling // factor needed. return int64((1 - variance) * float64(framework.MaxNodeScore)) } // Upper and lower boundary of difference between cpuFraction and memoryFraction are -1 and 1 - // respectively. Multiplying the absolute value of the difference by 10 scales the value to - // 0-10 with 0 representing well balanced allocation and 10 poorly balanced. Subtracting it from - // 10 leads to the score which also scales from 0 to 10 while 10 representing well balanced. + // respectively. Multiplying the absolute value of the difference by `MaxNodeScore` scales the value to + // 0-MaxNodeScore with 0 representing well balanced allocation and `MaxNodeScore` poorly balanced. Subtracting it from + // `MaxNodeScore` leads to the score which also scales from 0 to `MaxNodeScore` while `MaxNodeScore` representing well balanced. diff := math.Abs(cpuFraction - memoryFraction) return int64((1 - diff) * float64(framework.MaxNodeScore)) } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/fit.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/fit.go index 683d5105bd3..3d3dc25d876 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/fit.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/fit.go @@ -19,15 +19,18 @@ package noderesources import ( "context" "fmt" + "strings" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" + metav1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/validation/field" utilfeature "k8s.io/apiserver/pkg/util/feature" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/features" + "k8s.io/kubernetes/pkg/scheduler/apis/config" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) var _ framework.PreFilterPlugin = &Fit{} @@ -44,19 +47,13 @@ const ( // Fit is a plugin that checks if a node has sufficient resources. type Fit struct { - ignoredResources sets.String -} - -// FitArgs holds the args that are used to configure the plugin. -type FitArgs struct { - // IgnoredResources is the list of resources that NodeResources fit filter - // should ignore. - IgnoredResources []string `json:"ignoredResources,omitempty"` + ignoredResources sets.String + ignoredResourceGroups sets.String } // preFilterState computed at PreFilter and used at Filter. type preFilterState struct { - schedulernodeinfo.Resource + framework.Resource } // Clone the prefilter state. @@ -69,7 +66,59 @@ func (f *Fit) Name() string { return FitName } -// computePodResourceRequest returns a schedulernodeinfo.Resource that covers the largest +func validateFitArgs(args config.NodeResourcesFitArgs) error { + var allErrs field.ErrorList + resPath := field.NewPath("ignoredResources") + for i, res := range args.IgnoredResources { + path := resPath.Index(i) + if errs := metav1validation.ValidateLabelName(res, path); len(errs) != 0 { + allErrs = append(allErrs, errs...) + } + } + + groupPath := field.NewPath("ignoredResourceGroups") + for i, group := range args.IgnoredResourceGroups { + path := groupPath.Index(i) + if strings.Contains(group, "/") { + allErrs = append(allErrs, field.Invalid(path, group, "resource group name can't contain '/'")) + } + if errs := metav1validation.ValidateLabelName(group, path); len(errs) != 0 { + allErrs = append(allErrs, errs...) + } + } + + if len(allErrs) == 0 { + return nil + } + return allErrs.ToAggregate() +} + +// NewFit initializes a new plugin and returns it. +func NewFit(plArgs runtime.Object, _ framework.FrameworkHandle) (framework.Plugin, error) { + args, err := getFitArgs(plArgs) + if err != nil { + return nil, err + } + + if err := validateFitArgs(args); err != nil { + return nil, err + } + + return &Fit{ + ignoredResources: sets.NewString(args.IgnoredResources...), + ignoredResourceGroups: sets.NewString(args.IgnoredResourceGroups...), + }, nil +} + +func getFitArgs(obj runtime.Object) (config.NodeResourcesFitArgs, error) { + ptr, ok := obj.(*config.NodeResourcesFitArgs) + if !ok { + return config.NodeResourcesFitArgs{}, fmt.Errorf("want args to be of type NodeResourcesFitArgs, got %T", obj) + } + return *ptr, nil +} + +// computePodResourceRequest returns a framework.Resource that covers the largest // width in each resource dimension. Because init-containers run sequentially, we collect // the max in each dimension iteratively. In contrast, we sum the resource vectors for // regular containers since they run simultaneously. @@ -143,13 +192,13 @@ func getPreFilterState(cycleState *framework.CycleState) (*preFilterState, error // Filter invoked at the filter extension point. // Checks if a node has sufficient resources, such as cpu, memory, gpu, opaque int resources etc to run a pod. // It returns a list of insufficient resources, if empty, then the node has all the resources requested by the pod. -func (f *Fit) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *framework.Status { +func (f *Fit) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { s, err := getPreFilterState(cycleState) if err != nil { return framework.NewStatus(framework.Error, err.Error()) } - insufficientResources := fitsRequest(s, nodeInfo, f.ignoredResources) + insufficientResources := fitsRequest(s, nodeInfo, f.ignoredResources, f.ignoredResourceGroups) if len(insufficientResources) != 0 { // We will keep all failure reasons. @@ -174,28 +223,24 @@ type InsufficientResource struct { } // Fits checks if node have enough resources to host the pod. -func Fits(pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo, ignoredExtendedResources sets.String) []InsufficientResource { - return fitsRequest(computePodResourceRequest(pod), nodeInfo, ignoredExtendedResources) +func Fits(pod *v1.Pod, nodeInfo *framework.NodeInfo) []InsufficientResource { + return fitsRequest(computePodResourceRequest(pod), nodeInfo, nil, nil) } -func fitsRequest(podRequest *preFilterState, nodeInfo *schedulernodeinfo.NodeInfo, ignoredExtendedResources sets.String) []InsufficientResource { +func fitsRequest(podRequest *preFilterState, nodeInfo *framework.NodeInfo, ignoredExtendedResources, ignoredResourceGroups sets.String) []InsufficientResource { insufficientResources := make([]InsufficientResource, 0, 4) - allowedPodNumber := nodeInfo.AllowedPodNumber() - if len(nodeInfo.Pods())+1 > allowedPodNumber { + allowedPodNumber := nodeInfo.Allocatable.AllowedPodNumber + if len(nodeInfo.Pods)+1 > allowedPodNumber { insufficientResources = append(insufficientResources, InsufficientResource{ v1.ResourcePods, "Too many pods", 1, - int64(len(nodeInfo.Pods())), + int64(len(nodeInfo.Pods)), int64(allowedPodNumber), }) } - if ignoredExtendedResources == nil { - ignoredExtendedResources = sets.NewString() - } - if podRequest.MilliCPU == 0 && podRequest.Memory == 0 && podRequest.EphemeralStorage == 0 && @@ -203,65 +248,56 @@ func fitsRequest(podRequest *preFilterState, nodeInfo *schedulernodeinfo.NodeInf return insufficientResources } - allocatable := nodeInfo.AllocatableResource() - if allocatable.MilliCPU < podRequest.MilliCPU+nodeInfo.RequestedResource().MilliCPU { + if nodeInfo.Allocatable.MilliCPU < podRequest.MilliCPU+nodeInfo.Requested.MilliCPU { insufficientResources = append(insufficientResources, InsufficientResource{ v1.ResourceCPU, "Insufficient cpu", podRequest.MilliCPU, - nodeInfo.RequestedResource().MilliCPU, - allocatable.MilliCPU, + nodeInfo.Requested.MilliCPU, + nodeInfo.Allocatable.MilliCPU, }) } - if allocatable.Memory < podRequest.Memory+nodeInfo.RequestedResource().Memory { + if nodeInfo.Allocatable.Memory < podRequest.Memory+nodeInfo.Requested.Memory { insufficientResources = append(insufficientResources, InsufficientResource{ v1.ResourceMemory, "Insufficient memory", podRequest.Memory, - nodeInfo.RequestedResource().Memory, - allocatable.Memory, + nodeInfo.Requested.Memory, + nodeInfo.Allocatable.Memory, }) } - if allocatable.EphemeralStorage < podRequest.EphemeralStorage+nodeInfo.RequestedResource().EphemeralStorage { + if nodeInfo.Allocatable.EphemeralStorage < podRequest.EphemeralStorage+nodeInfo.Requested.EphemeralStorage { insufficientResources = append(insufficientResources, InsufficientResource{ v1.ResourceEphemeralStorage, "Insufficient ephemeral-storage", podRequest.EphemeralStorage, - nodeInfo.RequestedResource().EphemeralStorage, - allocatable.EphemeralStorage, + nodeInfo.Requested.EphemeralStorage, + nodeInfo.Allocatable.EphemeralStorage, }) } for rName, rQuant := range podRequest.ScalarResources { if v1helper.IsExtendedResourceName(rName) { - // If this resource is one of the extended resources that should be - // ignored, we will skip checking it. - if ignoredExtendedResources.Has(string(rName)) { + // If this resource is one of the extended resources that should be ignored, we will skip checking it. + // rName is guaranteed to have a slash due to API validation. + var rNamePrefix string + if ignoredResourceGroups.Len() > 0 { + rNamePrefix = strings.Split(string(rName), "/")[0] + } + if ignoredExtendedResources.Has(string(rName)) || ignoredResourceGroups.Has(rNamePrefix) { continue } } - if allocatable.ScalarResources[rName] < rQuant+nodeInfo.RequestedResource().ScalarResources[rName] { + if nodeInfo.Allocatable.ScalarResources[rName] < rQuant+nodeInfo.Requested.ScalarResources[rName] { insufficientResources = append(insufficientResources, InsufficientResource{ rName, fmt.Sprintf("Insufficient %v", rName), podRequest.ScalarResources[rName], - nodeInfo.RequestedResource().ScalarResources[rName], - allocatable.ScalarResources[rName], + nodeInfo.Requested.ScalarResources[rName], + nodeInfo.Allocatable.ScalarResources[rName], }) } } return insufficientResources } - -// NewFit initializes a new plugin and returns it. -func NewFit(plArgs *runtime.Unknown, _ framework.FrameworkHandle) (framework.Plugin, error) { - args := &FitArgs{} - if err := framework.DecodeInto(plArgs, args); err != nil { - return nil, err - } - - fit := &Fit{} - fit.ignoredResources = sets.NewString(args.IgnoredResources...) - return fit, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/least_allocated.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/least_allocated.go index 9f987fe2fc7..e8d186e0eb9 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/least_allocated.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/least_allocated.go @@ -22,6 +22,8 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/kubernetes/pkg/scheduler/apis/config" + "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) @@ -53,7 +55,7 @@ func (la *LeastAllocated) Score(ctx context.Context, state *framework.CycleState // prioritizes based on the minimum of the average of the fraction of requested to capacity. // // Details: - // (cpu((capacity-sum(requested))*10/capacity) + memory((capacity-sum(requested))*10/capacity))/2 + // (cpu((capacity-sum(requested))*MaxNodeScore/capacity) + memory((capacity-sum(requested))*MaxNodeScore/capacity))/weightSum return la.score(pod, nodeInfo) } @@ -63,29 +65,45 @@ func (la *LeastAllocated) ScoreExtensions() framework.ScoreExtensions { } // NewLeastAllocated initializes a new plugin and returns it. -func NewLeastAllocated(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error) { +func NewLeastAllocated(laArgs runtime.Object, h framework.FrameworkHandle) (framework.Plugin, error) { + args, ok := laArgs.(*config.NodeResourcesLeastAllocatedArgs) + if !ok { + return nil, fmt.Errorf("want args to be of type NodeResourcesLeastAllocatedArgs, got %T", laArgs) + } + + if err := validation.ValidateNodeResourcesLeastAllocatedArgs(args); err != nil { + return nil, err + } + + resToWeightMap := make(resourceToWeightMap) + for _, resource := range (*args).Resources { + resToWeightMap[v1.ResourceName(resource.Name)] = resource.Weight + } + return &LeastAllocated{ handle: h, resourceAllocationScorer: resourceAllocationScorer{ - LeastAllocatedName, - leastResourceScorer, - defaultRequestedRatioResources, + Name: LeastAllocatedName, + scorer: leastResourceScorer(resToWeightMap), + resourceToWeightMap: resToWeightMap, }, }, nil } -func leastResourceScorer(requested, allocable resourceToValueMap, includeVolumes bool, requestedVolumes int, allocatableVolumes int) int64 { - var nodeScore, weightSum int64 - for resource, weight := range defaultRequestedRatioResources { - resourceScore := leastRequestedScore(requested[resource], allocable[resource]) - nodeScore += resourceScore * weight - weightSum += weight +func leastResourceScorer(resToWeightMap resourceToWeightMap) func(resourceToValueMap, resourceToValueMap, bool, int, int) int64 { + return func(requested, allocable resourceToValueMap, includeVolumes bool, requestedVolumes int, allocatableVolumes int) int64 { + var nodeScore, weightSum int64 + for resource, weight := range resToWeightMap { + resourceScore := leastRequestedScore(requested[resource], allocable[resource]) + nodeScore += resourceScore * weight + weightSum += weight + } + return nodeScore / weightSum } - return nodeScore / weightSum } -// The unused capacity is calculated on a scale of 0-10 -// 0 being the lowest priority and 10 being the highest. +// The unused capacity is calculated on a scale of 0-MaxNodeScore +// 0 being the lowest priority and `MaxNodeScore` being the highest. // The more unused resources the higher the score is. func leastRequestedScore(requested, capacity int64) int64 { if capacity == 0 { diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/most_allocated.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/most_allocated.go index 380f74d40cf..67aa2a6394f 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/most_allocated.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/most_allocated.go @@ -22,6 +22,8 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/kubernetes/pkg/scheduler/apis/config" + "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) @@ -51,7 +53,7 @@ func (ma *MostAllocated) Score(ctx context.Context, state *framework.CycleState, // ma.score favors nodes with most requested resources. // It calculates the percentage of memory and CPU requested by pods scheduled on the node, and prioritizes // based on the maximum of the average of the fraction of requested to capacity. - // Details: (cpu(10 * sum(requested) / capacity) + memory(10 * sum(requested) / capacity)) / 2 + // Details: (cpu(MaxNodeScore * sum(requested) / capacity) + memory(MaxNodeScore * sum(requested) / capacity)) / weightSum return ma.score(pod, nodeInfo) } @@ -61,35 +63,48 @@ func (ma *MostAllocated) ScoreExtensions() framework.ScoreExtensions { } // NewMostAllocated initializes a new plugin and returns it. -func NewMostAllocated(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error) { +func NewMostAllocated(maArgs runtime.Object, h framework.FrameworkHandle) (framework.Plugin, error) { + args, ok := maArgs.(*config.NodeResourcesMostAllocatedArgs) + if !ok { + return nil, fmt.Errorf("want args to be of type NodeResourcesMostAllocatedArgs, got %T", args) + } + + if err := validation.ValidateNodeResourcesMostAllocatedArgs(args); err != nil { + return nil, err + } + + resToWeightMap := make(resourceToWeightMap) + for _, resource := range (*args).Resources { + resToWeightMap[v1.ResourceName(resource.Name)] = resource.Weight + } + return &MostAllocated{ handle: h, resourceAllocationScorer: resourceAllocationScorer{ - MostAllocatedName, - mostResourceScorer, - defaultRequestedRatioResources, + Name: MostAllocatedName, + scorer: mostResourceScorer(resToWeightMap), + resourceToWeightMap: resToWeightMap, }, }, nil } -func mostResourceScorer(requested, allocable resourceToValueMap, includeVolumes bool, requestedVolumes int, allocatableVolumes int) int64 { - var nodeScore, weightSum int64 - for resource, weight := range defaultRequestedRatioResources { - resourceScore := mostRequestedScore(requested[resource], allocable[resource]) - nodeScore += resourceScore * weight - weightSum += weight +func mostResourceScorer(resToWeightMap resourceToWeightMap) func(requested, allocable resourceToValueMap, includeVolumes bool, requestedVolumes int, allocatableVolumes int) int64 { + return func(requested, allocable resourceToValueMap, includeVolumes bool, requestedVolumes int, allocatableVolumes int) int64 { + var nodeScore, weightSum int64 + for resource, weight := range resToWeightMap { + resourceScore := mostRequestedScore(requested[resource], allocable[resource]) + nodeScore += resourceScore * weight + weightSum += weight + } + return (nodeScore / weightSum) } - return (nodeScore / weightSum) - } -// The used capacity is calculated on a scale of 0-10 -// 0 being the lowest priority and 10 being the highest. +// The used capacity is calculated on a scale of 0-MaxNodeScore (MaxNodeScore is +// constant with value set to 100). +// 0 being the lowest priority and 100 being the highest. // The more resources are used the higher the score is. This function -// is almost a reversed version of least_requested_priority.calculateUnusedScore -// (10 - calculateUnusedScore). The main difference is in rounding. It was added to -// keep the final formula clean and not to modify the widely used (by users -// in their default scheduling policies) calculateUsedScore. +// is almost a reversed version of noderesources.leastRequestedScore. func mostRequestedScore(requested, capacity int64) int64 { if capacity == 0 { return 0 diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio.go index 43f1c917e3d..436cf09cf56 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio.go @@ -23,8 +23,8 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/klog" "k8s.io/kubernetes/pkg/scheduler/apis/config" + "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) @@ -33,15 +33,8 @@ const ( RequestedToCapacityRatioName = "RequestedToCapacityRatio" minUtilization = 0 maxUtilization = 100 - minScore = 0 - maxScore = framework.MaxNodeScore ) -// RequestedToCapacityRatioArgs holds the args that are used to configure the plugin. -type RequestedToCapacityRatioArgs struct { - config.RequestedToCapacityRatioArguments -} - type functionShape []functionShapePoint type functionShapePoint struct { @@ -52,9 +45,13 @@ type functionShapePoint struct { } // NewRequestedToCapacityRatio initializes a new plugin and returns it. -func NewRequestedToCapacityRatio(plArgs *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { - args := &config.RequestedToCapacityRatioArguments{} - if err := framework.DecodeInto(plArgs, args); err != nil { +func NewRequestedToCapacityRatio(plArgs runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { + args, err := getRequestedToCapacityRatioArgs(plArgs) + if err != nil { + return nil, err + } + + if err := validation.ValidateRequestedToCapacityRatioArgs(args); err != nil { return nil, err } @@ -69,10 +66,6 @@ func NewRequestedToCapacityRatio(plArgs *runtime.Unknown, handle framework.Frame }) } - if err := validateFunctionShape(shape); err != nil { - return nil, err - } - resourceToWeightMap := make(resourceToWeightMap) for _, resource := range args.Resources { resourceToWeightMap[v1.ResourceName(resource.Name)] = resource.Weight @@ -81,10 +74,6 @@ func NewRequestedToCapacityRatio(plArgs *runtime.Unknown, handle framework.Frame resourceToWeightMap[v1.ResourceName(resource.Name)] = 1 } } - if len(args.Resources) == 0 { - // If no resources specified, used the default set. - resourceToWeightMap = defaultRequestedRatioResources - } return &RequestedToCapacityRatio{ handle: handle, @@ -96,6 +85,14 @@ func NewRequestedToCapacityRatio(plArgs *runtime.Unknown, handle framework.Frame }, nil } +func getRequestedToCapacityRatioArgs(obj runtime.Object) (config.RequestedToCapacityRatioArgs, error) { + ptr, ok := obj.(*config.RequestedToCapacityRatioArgs) + if !ok { + return config.RequestedToCapacityRatioArgs{}, fmt.Errorf("want args to be of type RequestedToCapacityRatioArgs, got %T", obj) + } + return *ptr, nil +} + // RequestedToCapacityRatio is a score plugin that allow users to apply bin packing // on core resources like CPU, Memory as well as extended resources like accelerators. type RequestedToCapacityRatio struct { @@ -124,54 +121,8 @@ func (pl *RequestedToCapacityRatio) ScoreExtensions() framework.ScoreExtensions return nil } -func validateFunctionShape(shape functionShape) error { - if len(shape) == 0 { - return fmt.Errorf("at least one point must be specified") - } - - for i := 1; i < len(shape); i++ { - if shape[i-1].utilization >= shape[i].utilization { - return fmt.Errorf("utilization values must be sorted. Utilization[%d]==%d >= Utilization[%d]==%d", i-1, shape[i-1].utilization, i, shape[i].utilization) - } - } - - for i, point := range shape { - if point.utilization < minUtilization { - return fmt.Errorf("utilization values must not be less than %d. Utilization[%d]==%d", minUtilization, i, point.utilization) - } - if point.utilization > maxUtilization { - return fmt.Errorf("utilization values must not be greater than %d. Utilization[%d]==%d", maxUtilization, i, point.utilization) - } - if point.score < minScore { - return fmt.Errorf("score values must not be less than %d. Score[%d]==%d", minScore, i, point.score) - } - if int64(point.score) > maxScore { - return fmt.Errorf("score values not be greater than %d. Score[%d]==%d", maxScore, i, point.score) - } - } - - return nil -} - -func validateResourceWeightMap(resourceToWeightMap resourceToWeightMap) error { - if len(resourceToWeightMap) == 0 { - return fmt.Errorf("resourceToWeightMap cannot be nil") - } - - for resource, weight := range resourceToWeightMap { - if weight < 1 { - return fmt.Errorf("resource %s weight %d must not be less than 1", string(resource), weight) - } - } - return nil -} - func buildRequestedToCapacityRatioScorerFunction(scoringFunctionShape functionShape, resourceToWeightMap resourceToWeightMap) func(resourceToValueMap, resourceToValueMap, bool, int, int) int64 { rawScoringFunction := buildBrokenLinearFunction(scoringFunctionShape) - err := validateResourceWeightMap(resourceToWeightMap) - if err != nil { - klog.Error(err) - } resourceScoringFunction := func(requested, capacity int64) int64 { if capacity == 0 || requested > capacity { return rawScoringFunction(maxUtilization) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_allocation.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_allocation.go index 11cefa648be..11b14edcf4a 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_allocation.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_allocation.go @@ -19,11 +19,10 @@ package noderesources import ( v1 "k8s.io/api/core/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/features" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" schedutil "k8s.io/kubernetes/pkg/scheduler/util" ) @@ -46,7 +45,7 @@ type resourceToValueMap map[v1.ResourceName]int64 // score will use `scorer` function to calculate the score. func (r *resourceAllocationScorer) score( pod *v1.Pod, - nodeInfo *schedulernodeinfo.NodeInfo) (int64, *framework.Status) { + nodeInfo *framework.NodeInfo) (int64, *framework.Status) { node := nodeInfo.Node() if node == nil { return 0, framework.NewStatus(framework.Error, "node not found") @@ -67,7 +66,7 @@ func (r *resourceAllocationScorer) score( } else { score = r.scorer(requested, allocatable, false, 0, 0) } - if klog.V(10) { + if klog.V(10).Enabled() { if len(pod.Spec.Volumes) >= 0 && utilfeature.DefaultFeatureGate.Enabled(features.BalanceAttachedNodeVolumes) && nodeInfo.TransientInfo != nil { klog.Infof( "%v -> %v: %v, map of allocatable resources %v, map of requested resources %v , allocatable volumes %d, requested volumes %d, score %d", @@ -90,24 +89,22 @@ func (r *resourceAllocationScorer) score( } // calculateResourceAllocatableRequest returns resources Allocatable and Requested values -func calculateResourceAllocatableRequest(nodeInfo *schedulernodeinfo.NodeInfo, pod *v1.Pod, resource v1.ResourceName) (int64, int64) { - allocatable := nodeInfo.AllocatableResource() - requested := nodeInfo.RequestedResource() +func calculateResourceAllocatableRequest(nodeInfo *framework.NodeInfo, pod *v1.Pod, resource v1.ResourceName) (int64, int64) { podRequest := calculatePodResourceRequest(pod, resource) switch resource { case v1.ResourceCPU: - return allocatable.MilliCPU, (nodeInfo.NonZeroRequest().MilliCPU + podRequest) + return nodeInfo.Allocatable.MilliCPU, (nodeInfo.NonZeroRequested.MilliCPU + podRequest) case v1.ResourceMemory: - return allocatable.Memory, (nodeInfo.NonZeroRequest().Memory + podRequest) + return nodeInfo.Allocatable.Memory, (nodeInfo.NonZeroRequested.Memory + podRequest) case v1.ResourceEphemeralStorage: - return allocatable.EphemeralStorage, (requested.EphemeralStorage + podRequest) + return nodeInfo.Allocatable.EphemeralStorage, (nodeInfo.Requested.EphemeralStorage + podRequest) default: if v1helper.IsScalarResourceName(resource) { - return allocatable.ScalarResources[resource], (requested.ScalarResources[resource] + podRequest) + return nodeInfo.Allocatable.ScalarResources[resource], (nodeInfo.Requested.ScalarResources[resource] + podRequest) } } - if klog.V(10) { + if klog.V(10).Enabled() { klog.Infof("requested resource %v not considered for node score calculation", resource, ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_limits.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_limits.go deleted file mode 100644 index 9919d6c5e38..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_limits.go +++ /dev/null @@ -1,161 +0,0 @@ -/* -Copyright 2019 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 noderesources - -import ( - "context" - "fmt" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" -) - -// ResourceLimits is a score plugin that increases score of input node by 1 if the node satisfies -// input pod's resource limits -type ResourceLimits struct { - handle framework.FrameworkHandle -} - -var _ = framework.PreScorePlugin(&ResourceLimits{}) -var _ = framework.ScorePlugin(&ResourceLimits{}) - -const ( - // ResourceLimitsName is the name of the plugin used in the plugin registry and configurations. - ResourceLimitsName = "NodeResourceLimits" - - // preScoreStateKey is the key in CycleState to NodeResourceLimits pre-computed data. - // Using the name of the plugin will likely help us avoid collisions with other plugins. - preScoreStateKey = "PreScore" + ResourceLimitsName -) - -// preScoreState computed at PreScore and used at Score. -type preScoreState struct { - podResourceRequest *schedulernodeinfo.Resource -} - -// Clone the preScore state. -func (s *preScoreState) Clone() framework.StateData { - return s -} - -// Name returns name of the plugin. It is used in logs, etc. -func (rl *ResourceLimits) Name() string { - return ResourceLimitsName -} - -// PreScore builds and writes cycle state used by Score and NormalizeScore. -func (rl *ResourceLimits) PreScore( - pCtx context.Context, - cycleState *framework.CycleState, - pod *v1.Pod, - nodes []*v1.Node, -) *framework.Status { - if len(nodes) == 0 { - // No nodes to score. - return nil - } - - if rl.handle.SnapshotSharedLister() == nil { - return framework.NewStatus(framework.Error, fmt.Sprintf("empty shared lister")) - } - s := &preScoreState{ - podResourceRequest: getResourceLimits(pod), - } - cycleState.Write(preScoreStateKey, s) - return nil -} - -func getPodResource(cycleState *framework.CycleState) (*schedulernodeinfo.Resource, error) { - c, err := cycleState.Read(preScoreStateKey) - if err != nil { - return nil, fmt.Errorf("Error reading %q from cycleState: %v", preScoreStateKey, err) - } - - s, ok := c.(*preScoreState) - if !ok { - return nil, fmt.Errorf("%+v convert to ResourceLimits.preScoreState error", c) - } - return s.podResourceRequest, nil -} - -// Score invoked at the Score extension point. -// The "score" returned in this function is the matching number of pods on the `nodeName`. -// Currently works as follows: -// If a node does not publish its allocatable resources (cpu and memory both), the node score is not affected. -// If a pod does not specify its cpu and memory limits both, the node score is not affected. -// If one or both of cpu and memory limits of the pod are satisfied, the node is assigned a score of 1. -// Rationale of choosing the lowest score of 1 is that this is mainly selected to break ties between nodes that have -// same scores assigned by one of least and most requested priority functions. -func (rl *ResourceLimits) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) { - nodeInfo, err := rl.handle.SnapshotSharedLister().NodeInfos().Get(nodeName) - if err != nil || nodeInfo.Node() == nil { - return 0, framework.NewStatus(framework.Error, fmt.Sprintf("getting node %q from Snapshot: %v, node is nil: %v", nodeName, err, nodeInfo.Node() == nil)) - } - allocatableResources := nodeInfo.AllocatableResource() - podLimits, err := getPodResource(state) - if err != nil { - return 0, framework.NewStatus(framework.Error, err.Error()) - } - - cpuScore := computeScore(podLimits.MilliCPU, allocatableResources.MilliCPU) - memScore := computeScore(podLimits.Memory, allocatableResources.Memory) - - score := int64(0) - if cpuScore == 1 || memScore == 1 { - score = 1 - } - return score, nil -} - -// ScoreExtensions of the Score plugin. -func (rl *ResourceLimits) ScoreExtensions() framework.ScoreExtensions { - return nil -} - -// NewResourceLimits initializes a new plugin and returns it. -func NewResourceLimits(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error) { - return &ResourceLimits{handle: h}, nil -} - -// getResourceLimits computes resource limits for input pod. -// The reason to create this new function is to be consistent with other -// priority functions because most or perhaps all priority functions work -// with schedulernodeinfo.Resource. -func getResourceLimits(pod *v1.Pod) *schedulernodeinfo.Resource { - result := &schedulernodeinfo.Resource{} - for _, container := range pod.Spec.Containers { - result.Add(container.Resources.Limits) - } - - // take max_resource(sum_pod, any_init_container) - for _, container := range pod.Spec.InitContainers { - result.SetMaxResource(container.Resources.Limits) - } - - return result -} - -// computeScore returns 1 if limit value is less than or equal to allocatable -// value, otherwise it returns 0. -func computeScore(limit, allocatable int64) int64 { - if limit != 0 && allocatable != 0 && limit <= allocatable { - return 1 - } - return 0 -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeunschedulable/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeunschedulable/BUILD index 1eec42697e4..4b5b01cb82b 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeunschedulable/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeunschedulable/BUILD @@ -8,7 +8,6 @@ go_library( deps = [ "//pkg/apis/core/v1/helper:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", ], @@ -20,7 +19,6 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go index a226d8b6224..ffc85e32c21 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go @@ -23,7 +23,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) // NodeUnschedulable is a plugin that priorities nodes according to the node annotation @@ -49,7 +48,7 @@ func (pl *NodeUnschedulable) Name() string { } // Filter invoked at the filter extension point. -func (pl *NodeUnschedulable) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *NodeUnschedulable) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { if nodeInfo == nil || nodeInfo.Node() == nil { return framework.NewStatus(framework.UnschedulableAndUnresolvable, ErrReasonUnknownCondition) } @@ -66,6 +65,6 @@ func (pl *NodeUnschedulable) Filter(ctx context.Context, _ *framework.CycleState } // New initializes a new plugin and returns it. -func New(_ *runtime.Unknown, _ framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, _ framework.FrameworkHandle) (framework.Plugin, error) { return &NodeUnschedulable{}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/BUILD index ac4878a5564..4f3242ab737 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/BUILD @@ -13,7 +13,6 @@ go_library( "//pkg/apis/core/v1/helper:go_default_library", "//pkg/features:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//pkg/volume/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", @@ -26,7 +25,7 @@ go_library( "//staging/src/k8s.io/client-go/listers/storage/v1:go_default_library", "//staging/src/k8s.io/csi-translation-lib:go_default_library", "//staging/src/k8s.io/csi-translation-lib/plugins:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -40,8 +39,7 @@ go_test( deps = [ "//pkg/features:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/listers/fake:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/framework/v1alpha1/fake:go_default_library", "//pkg/volume/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/csi.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/csi.go index 89a17d218cb..c05b49cd846 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/csi.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/csi.go @@ -29,11 +29,9 @@ import ( csitrans "k8s.io/csi-translation-lib" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" volumeutil "k8s.io/kubernetes/pkg/volume/util" - "k8s.io/klog" + "k8s.io/klog/v2" ) // InTreeToCSITranslator contains methods required to check migratable status @@ -69,7 +67,7 @@ func (pl *CSILimits) Name() string { } // Filter invoked at the filter extension point. -func (pl *CSILimits) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *CSILimits) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { // If the new pod doesn't have any volume attached to it, the predicate will always be true if len(pod.Spec.Volumes) == 0 { return nil @@ -104,18 +102,16 @@ func (pl *CSILimits) Filter(ctx context.Context, _ *framework.CycleState, pod *v } attachedVolumes := make(map[string]string) - for _, existingPod := range nodeInfo.Pods() { - if err := pl.filterAttachableVolumes(csiNode, existingPod.Spec.Volumes, existingPod.Namespace, attachedVolumes); err != nil { + for _, existingPod := range nodeInfo.Pods { + if err := pl.filterAttachableVolumes(csiNode, existingPod.Pod.Spec.Volumes, existingPod.Pod.Namespace, attachedVolumes); err != nil { return framework.NewStatus(framework.Error, err.Error()) } } attachedVolumeCount := map[string]int{} for volumeUniqueName, volumeLimitKey := range attachedVolumes { - if _, ok := newVolumes[volumeUniqueName]; ok { - // Don't count single volume used in multiple pods more than once - delete(newVolumes, volumeUniqueName) - } + // Don't count single volume used in multiple pods more than once + delete(newVolumes, volumeUniqueName) attachedVolumeCount[volumeLimitKey]++ } @@ -270,7 +266,7 @@ func (pl *CSILimits) getCSIDriverInfoFromSC(csiNode *storagev1.CSINode, pvc *v1. } // NewCSI initializes a new plugin and returns it. -func NewCSI(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { +func NewCSI(_ runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { informerFactory := handle.SharedInformerFactory() pvLister := informerFactory.Core().V1().PersistentVolumes().Lister() pvcLister := informerFactory.Core().V1().PersistentVolumeClaims().Lister() @@ -286,9 +282,9 @@ func NewCSI(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plu }, nil } -func getVolumeLimits(nodeInfo *schedulernodeinfo.NodeInfo, csiNode *storagev1.CSINode) map[v1.ResourceName]int64 { +func getVolumeLimits(nodeInfo *framework.NodeInfo, csiNode *storagev1.CSINode) map[v1.ResourceName]int64 { // TODO: stop getting values from Node object in v1.18 - nodeVolumeLimits := nodeInfo.VolumeLimits() + nodeVolumeLimits := volumeLimits(nodeInfo) if csiNode != nil { for i := range csiNode.Spec.Drivers { d := csiNode.Spec.Drivers[i] diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/non_csi.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/non_csi.go index 617b65a0e9a..030d86d3ca6 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/non_csi.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/non_csi.go @@ -32,11 +32,10 @@ import ( corelisters "k8s.io/client-go/listers/core/v1" storagelisters "k8s.io/client-go/listers/storage/v1" csilibplugins "k8s.io/csi-translation-lib/plugins" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" kubefeatures "k8s.io/kubernetes/pkg/features" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" volumeutil "k8s.io/kubernetes/pkg/volume/util" ) @@ -69,7 +68,7 @@ const ( const AzureDiskName = "AzureDiskLimits" // NewAzureDisk returns function that initializes a new plugin and returns it. -func NewAzureDisk(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { +func NewAzureDisk(_ runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { informerFactory := handle.SharedInformerFactory() return newNonCSILimitsWithInformerFactory(azureDiskVolumeFilterType, informerFactory), nil } @@ -78,7 +77,7 @@ func NewAzureDisk(_ *runtime.Unknown, handle framework.FrameworkHandle) (framewo const CinderName = "CinderLimits" // NewCinder returns function that initializes a new plugin and returns it. -func NewCinder(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { +func NewCinder(_ runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { informerFactory := handle.SharedInformerFactory() return newNonCSILimitsWithInformerFactory(cinderVolumeFilterType, informerFactory), nil } @@ -87,7 +86,7 @@ func NewCinder(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework. const EBSName = "EBSLimits" // NewEBS returns function that initializes a new plugin and returns it. -func NewEBS(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { +func NewEBS(_ runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { informerFactory := handle.SharedInformerFactory() return newNonCSILimitsWithInformerFactory(ebsVolumeFilterType, informerFactory), nil } @@ -96,7 +95,7 @@ func NewEBS(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plu const GCEPDName = "GCEPDLimits" // NewGCEPD returns function that initializes a new plugin and returns it. -func NewGCEPD(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { +func NewGCEPD(_ runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { informerFactory := handle.SharedInformerFactory() return newNonCSILimitsWithInformerFactory(gcePDVolumeFilterType, informerFactory), nil } @@ -196,7 +195,7 @@ func (pl *nonCSILimits) Name() string { } // Filter invoked at the filter extension point. -func (pl *nonCSILimits) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *nonCSILimits) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { // If a pod doesn't have any volume attached to it, the predicate will always be true. // Thus we make a fast path for it, to avoid unnecessary computations in this case. if len(pod.Spec.Volumes) == 0 { @@ -236,8 +235,8 @@ func (pl *nonCSILimits) Filter(ctx context.Context, _ *framework.CycleState, pod // count unique volumes existingVolumes := make(map[string]bool) - for _, existingPod := range nodeInfo.Pods() { - if err := pl.filterVolumes(existingPod.Spec.Volumes, existingPod.Namespace, existingVolumes); err != nil { + for _, existingPod := range nodeInfo.Pods { + if err := pl.filterVolumes(existingPod.Pod.Spec.Volumes, existingPod.Pod.Namespace, existingVolumes); err != nil { return framework.NewStatus(framework.Error, err.Error()) } } @@ -245,14 +244,12 @@ func (pl *nonCSILimits) Filter(ctx context.Context, _ *framework.CycleState, pod // filter out already-mounted volumes for k := range existingVolumes { - if _, ok := newVolumes[k]; ok { - delete(newVolumes, k) - } + delete(newVolumes, k) } numNewVolumes := len(newVolumes) maxAttachLimit := pl.maxVolumeFunc(node) - volumeLimits := nodeInfo.VolumeLimits() + volumeLimits := volumeLimits(nodeInfo) if maxAttachLimitFromAllocatable, ok := volumeLimits[pl.volumeLimitKey]; ok { maxAttachLimit = int(maxAttachLimitFromAllocatable) } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/utils.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/utils.go index aadcc243e0e..3fd98da1485 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/utils.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/utils.go @@ -19,12 +19,14 @@ package nodevolumelimits import ( "strings" - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/util/sets" utilfeature "k8s.io/apiserver/pkg/util/feature" csilibplugins "k8s.io/csi-translation-lib/plugins" + v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/features" + framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) // isCSIMigrationOn returns a boolean value indicating whether @@ -79,3 +81,14 @@ func isCSIMigrationOn(csiNode *storagev1.CSINode, pluginName string) bool { return mpaSet.Has(pluginName) } + +// volumeLimits returns volume limits associated with the node. +func volumeLimits(n *framework.NodeInfo) map[v1.ResourceName]int64 { + volumeLimits := map[v1.ResourceName]int64{} + for k, v := range n.Allocatable.ScalarResources { + if v1helper.IsAttachableVolumeResourceName(k) { + volumeLimits[k] = v + } + } + return volumeLimits +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/BUILD index 2829a8ad5d4..f696c10da00 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/BUILD @@ -11,22 +11,20 @@ go_library( importpath = "k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread", visibility = ["//visibility:public"], deps = [ + "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/apis/config/validation:go_default_library", "//pkg/scheduler/framework/plugins/helper:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/listers:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/internal/parallelize:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/listers/apps/v1:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", - "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -34,14 +32,14 @@ go_test( name = "go_default_test", srcs = [ "filtering_test.go", - "plugin_test.go", "scoring_test.go", ], embed = [":go_default_library"], deps = [ + "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/internal/parallelize:go_default_library", "//pkg/scheduler/testing:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/common.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/common.go index b87af00c88e..df95d4dd64c 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/common.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/common.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" + framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) type topologyPair struct { @@ -41,7 +42,7 @@ type topologySpreadConstraint struct { // .DefaultConstraints and the selectors from the services, replication // controllers, replica sets and stateful sets that match the pod. func (pl *PodTopologySpread) defaultConstraints(p *v1.Pod, action v1.UnsatisfiableConstraintAction) ([]topologySpreadConstraint, error) { - constraints, err := filterTopologySpreadConstraints(pl.DefaultConstraints, action) + constraints, err := filterTopologySpreadConstraints(pl.args.DefaultConstraints, action) if err != nil || len(constraints) == 0 { return nil, err } @@ -82,3 +83,17 @@ func filterTopologySpreadConstraints(constraints []v1.TopologySpreadConstraint, } return result, nil } + +func countPodsMatchSelector(podInfos []*framework.PodInfo, selector labels.Selector, ns string) int { + count := 0 + for _, p := range podInfos { + // Bypass terminating Pod (see #87621). + if p.Pod.DeletionTimestamp != nil || p.Pod.Namespace != ns { + continue + } + if selector.Matches(labels.Set(p.Pod.Labels)) { + count++ + } + } + return count +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go index 448d47f309b..c6aa6414970 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go @@ -20,15 +20,14 @@ import ( "context" "fmt" "math" - "sync" + "sync/atomic" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/util/workqueue" - "k8s.io/klog" - pluginhelper "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" + "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + "k8s.io/kubernetes/pkg/scheduler/internal/parallelize" ) const preFilterStateKey = "PreFilter" + Name @@ -48,12 +47,11 @@ type preFilterState struct { // it's not guaranteed to be the 2nd minimum match number. TpKeyToCriticalPaths map[string]*criticalPaths // TpPairToMatchNum is keyed with topologyPair, and valued with the number of matching pods. - TpPairToMatchNum map[topologyPair]int32 + TpPairToMatchNum map[topologyPair]*int32 } // Clone makes a copy of the given state. func (s *preFilterState) Clone() framework.StateData { - // s could be nil when EvenPodsSpread feature is disabled if s == nil { return nil } @@ -61,14 +59,15 @@ func (s *preFilterState) Clone() framework.StateData { // Constraints are shared because they don't change. Constraints: s.Constraints, TpKeyToCriticalPaths: make(map[string]*criticalPaths, len(s.TpKeyToCriticalPaths)), - TpPairToMatchNum: make(map[topologyPair]int32, len(s.TpPairToMatchNum)), + TpPairToMatchNum: make(map[topologyPair]*int32, len(s.TpPairToMatchNum)), } for tpKey, paths := range s.TpKeyToCriticalPaths { copy.TpKeyToCriticalPaths[tpKey] = &criticalPaths{paths[0], paths[1]} } for tpPair, matchNum := range s.TpPairToMatchNum { copyPair := topologyPair{key: tpPair.key, value: tpPair.value} - copy.TpPairToMatchNum[copyPair] = matchNum + copyCount := *matchNum + copy.TpPairToMatchNum[copyPair] = ©Count } return © } @@ -137,9 +136,9 @@ func (s *preFilterState) updateWithPod(updatedPod, preemptorPod *v1.Pod, node *v k, v := constraint.TopologyKey, node.Labels[constraint.TopologyKey] pair := topologyPair{key: k, value: v} - s.TpPairToMatchNum[pair] = s.TpPairToMatchNum[pair] + delta + *s.TpPairToMatchNum[pair] += delta - s.TpKeyToCriticalPaths[k].update(v, s.TpPairToMatchNum[pair]) + s.TpKeyToCriticalPaths[k].update(v, *s.TpPairToMatchNum[pair]) } } @@ -159,7 +158,7 @@ func (pl *PodTopologySpread) PreFilterExtensions() framework.PreFilterExtensions } // AddPod from pre-computed data in cycleState. -func (pl *PodTopologySpread) AddPod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *PodTopologySpread) AddPod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { s, err := getPreFilterState(cycleState) if err != nil { return framework.NewStatus(framework.Error, err.Error()) @@ -170,7 +169,7 @@ func (pl *PodTopologySpread) AddPod(ctx context.Context, cycleState *framework.C } // RemovePod from pre-computed data in cycleState. -func (pl *PodTopologySpread) RemovePod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *PodTopologySpread) RemovePod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { s, err := getPreFilterState(cycleState) if err != nil { return framework.NewStatus(framework.Error, err.Error()) @@ -219,55 +218,47 @@ func (pl *PodTopologySpread) calPreFilterState(pod *v1.Pod) (*preFilterState, er return &preFilterState{}, nil } - var lock sync.Mutex - - // TODO(Huang-Wei): It might be possible to use "make(map[topologyPair]*int32)". - // In that case, need to consider how to init each tpPairToCount[pair] in an atomic fashion. s := preFilterState{ Constraints: constraints, TpKeyToCriticalPaths: make(map[string]*criticalPaths, len(constraints)), - TpPairToMatchNum: make(map[topologyPair]int32), + TpPairToMatchNum: make(map[topologyPair]*int32, sizeHeuristic(len(allNodes), constraints)), } - addTopologyPairMatchNum := func(pair topologyPair, num int32) { - lock.Lock() - s.TpPairToMatchNum[pair] += num - lock.Unlock() + for _, n := range allNodes { + node := n.Node() + if node == nil { + klog.Error("node not found") + continue + } + // In accordance to design, if NodeAffinity or NodeSelector is defined, + // spreading is applied to nodes that pass those filters. + if !helper.PodMatchesNodeSelectorAndAffinityTerms(pod, node) { + continue + } + // Ensure current node's labels contains all topologyKeys in 'Constraints'. + if !nodeLabelsMatchSpreadConstraints(node.Labels, constraints) { + continue + } + for _, c := range constraints { + pair := topologyPair{key: c.TopologyKey, value: node.Labels[c.TopologyKey]} + s.TpPairToMatchNum[pair] = new(int32) + } } processNode := func(i int) { nodeInfo := allNodes[i] node := nodeInfo.Node() - if node == nil { - klog.Error("node not found") - return - } - // In accordance to design, if NodeAffinity or NodeSelector is defined, - // spreading is applied to nodes that pass those filters. - if !pluginhelper.PodMatchesNodeSelectorAndAffinityTerms(pod, node) { - return - } - // Ensure current node's labels contains all topologyKeys in 'Constraints'. - if !nodeLabelsMatchSpreadConstraints(node.Labels, constraints) { - return - } for _, constraint := range constraints { - matchTotal := int32(0) - // nodeInfo.Pods() can be empty; or all pods don't fit - for _, existingPod := range nodeInfo.Pods() { - // Bypass terminating Pod (see #87621). - if existingPod.DeletionTimestamp != nil || existingPod.Namespace != pod.Namespace { - continue - } - if constraint.Selector.Matches(labels.Set(existingPod.Labels)) { - matchTotal++ - } - } pair := topologyPair{key: constraint.TopologyKey, value: node.Labels[constraint.TopologyKey]} - addTopologyPairMatchNum(pair, matchTotal) + tpCount := s.TpPairToMatchNum[pair] + if tpCount == nil { + continue + } + count := countPodsMatchSelector(nodeInfo.Pods, constraint.Selector, pod.Namespace) + atomic.AddInt32(tpCount, int32(count)) } } - workqueue.ParallelizeUntil(context.Background(), 16, len(allNodes), processNode) + parallelize.Until(context.Background(), len(allNodes), processNode) // calculate min match for each topology pair for i := 0; i < len(constraints); i++ { @@ -275,14 +266,14 @@ func (pl *PodTopologySpread) calPreFilterState(pod *v1.Pod) (*preFilterState, er s.TpKeyToCriticalPaths[key] = newCriticalPaths() } for pair, num := range s.TpPairToMatchNum { - s.TpKeyToCriticalPaths[pair.key].update(pair.value, num) + s.TpKeyToCriticalPaths[pair.key].update(pair.value, *num) } return &s, nil } // Filter invoked at the filter extension point. -func (pl *PodTopologySpread) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *PodTopologySpread) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { node := nodeInfo.Node() if node == nil { return framework.NewStatus(framework.Error, "node not found") @@ -304,7 +295,7 @@ func (pl *PodTopologySpread) Filter(ctx context.Context, cycleState *framework.C tpVal, ok := node.Labels[c.TopologyKey] if !ok { klog.V(5).Infof("node '%s' doesn't have required label '%s'", node.Name, tpKey) - return framework.NewStatus(framework.Unschedulable, ErrReasonConstraintsNotMatch) + return framework.NewStatus(framework.UnschedulableAndUnresolvable, ErrReasonNodeLabelNotMatch) } selfMatchNum := int32(0) @@ -322,7 +313,10 @@ func (pl *PodTopologySpread) Filter(ctx context.Context, cycleState *framework.C // judging criteria: // 'existing matching num' + 'if self-match (1 or 0)' - 'global min matching num' <= 'maxSkew' minMatchNum := paths[0].MatchNum - matchNum := s.TpPairToMatchNum[pair] + matchNum := int32(0) + if tpCount := s.TpPairToMatchNum[pair]; tpCount != nil { + matchNum = *tpCount + } skew := matchNum + selfMatchNum - minMatchNum if skew > c.MaxSkew { klog.V(5).Infof("node '%s' failed spreadConstraint[%s]: MatchNum(%d) + selfMatchNum(%d) - minMatchNum(%d) > maxSkew(%d)", node.Name, tpKey, matchNum, selfMatchNum, minMatchNum, c.MaxSkew) @@ -332,3 +326,12 @@ func (pl *PodTopologySpread) Filter(ctx context.Context, cycleState *framework.C return nil } + +func sizeHeuristic(nodes int, constraints []topologySpreadConstraint) int { + for _, c := range constraints { + if c.TopologyKey == v1.LabelHostname { + return nodes + } + } + return 0 +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go index e68eacbca86..581eb98a774 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go @@ -19,44 +19,26 @@ package podtopologyspread import ( "fmt" - "k8s.io/api/core/v1" - metav1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/client-go/informers" appslisters "k8s.io/client-go/listers/apps/v1" corelisters "k8s.io/client-go/listers/core/v1" + "k8s.io/kubernetes/pkg/scheduler/apis/config" + "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - schedulerlisters "k8s.io/kubernetes/pkg/scheduler/listers" ) const ( // ErrReasonConstraintsNotMatch is used for PodTopologySpread filter error. ErrReasonConstraintsNotMatch = "node(s) didn't match pod topology spread constraints" + // ErrReasonNodeLabelNotMatch is used when the node doesn't hold the required label. + ErrReasonNodeLabelNotMatch = ErrReasonConstraintsNotMatch + " (missing required label)" ) -var ( - supportedScheduleActions = sets.NewString(string(v1.DoNotSchedule), string(v1.ScheduleAnyway)) -) - -// Args holds the arguments to configure the plugin. -type Args struct { - // DefaultConstraints defines topology spread constraints to be applied to - // pods that don't define any in `pod.spec.topologySpreadConstraints`. - // `topologySpreadConstraint.labelSelectors` must be empty, as they are - // deduced the pods' membership to Services, Replication Controllers, Replica - // Sets or Stateful Sets. - // Empty by default. - // +optional - // +listType=atomic - DefaultConstraints []v1.TopologySpreadConstraint `json:"defaultConstraints"` -} - // PodTopologySpread is a plugin that ensures pod's topologySpreadConstraints is satisfied. type PodTopologySpread struct { - Args - sharedLister schedulerlisters.SharedLister + args config.PodTopologySpreadArgs + sharedLister framework.SharedLister services corelisters.ServiceLister replicationCtrls corelisters.ReplicationControllerLister replicaSets appslisters.ReplicaSetLister @@ -80,22 +62,26 @@ func (pl *PodTopologySpread) Name() string { // BuildArgs returns the arguments used to build the plugin. func (pl *PodTopologySpread) BuildArgs() interface{} { - return pl.Args + return pl.args } // New initializes a new plugin and returns it. -func New(args *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error) { +func New(plArgs runtime.Object, h framework.FrameworkHandle) (framework.Plugin, error) { if h.SnapshotSharedLister() == nil { return nil, fmt.Errorf("SnapshotSharedlister is nil") } - pl := &PodTopologySpread{sharedLister: h.SnapshotSharedLister()} - if err := framework.DecodeInto(args, &pl.Args); err != nil { + args, err := getArgs(plArgs) + if err != nil { return nil, err } - if err := validateArgs(&pl.Args); err != nil { + if err := validation.ValidatePodTopologySpreadArgs(&args); err != nil { return nil, err } - if len(pl.DefaultConstraints) != 0 { + pl := &PodTopologySpread{ + sharedLister: h.SnapshotSharedLister(), + args: args, + } + if len(pl.args.DefaultConstraints) != 0 { if h.SharedInformerFactory() == nil { return nil, fmt.Errorf("SharedInformerFactory is nil") } @@ -104,70 +90,17 @@ func New(args *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, return pl, nil } +func getArgs(obj runtime.Object) (config.PodTopologySpreadArgs, error) { + ptr, ok := obj.(*config.PodTopologySpreadArgs) + if !ok { + return config.PodTopologySpreadArgs{}, fmt.Errorf("want args to be of type PodTopologySpreadArgs, got %T", obj) + } + return *ptr, nil +} + func (pl *PodTopologySpread) setListers(factory informers.SharedInformerFactory) { pl.services = factory.Core().V1().Services().Lister() pl.replicationCtrls = factory.Core().V1().ReplicationControllers().Lister() pl.replicaSets = factory.Apps().V1().ReplicaSets().Lister() pl.statefulSets = factory.Apps().V1().StatefulSets().Lister() } - -// validateArgs replicates the validation from -// pkg/apis/core/validation.validateTopologySpreadConstraints. -// This has the additional check for .labelSelector to be nil. -func validateArgs(args *Args) error { - var allErrs field.ErrorList - path := field.NewPath("defaultConstraints") - for i, c := range args.DefaultConstraints { - p := path.Index(i) - if c.MaxSkew <= 0 { - f := p.Child("maxSkew") - allErrs = append(allErrs, field.Invalid(f, c.MaxSkew, "must be greater than zero")) - } - allErrs = append(allErrs, validateTopologyKey(p.Child("topologyKey"), c.TopologyKey)...) - if err := validateWhenUnsatisfiable(p.Child("whenUnsatisfiable"), c.WhenUnsatisfiable); err != nil { - allErrs = append(allErrs, err) - } - if c.LabelSelector != nil { - f := field.Forbidden(p.Child("labelSelector"), "constraint must not define a selector, as they deduced for each pod") - allErrs = append(allErrs, f) - } - if err := validateConstraintNotRepeat(path, args.DefaultConstraints, i); err != nil { - allErrs = append(allErrs, err) - } - } - if len(allErrs) == 0 { - return nil - } - return allErrs.ToAggregate() -} - -func validateTopologyKey(p *field.Path, v string) field.ErrorList { - var allErrs field.ErrorList - if len(v) == 0 { - allErrs = append(allErrs, field.Required(p, "can not be empty")) - } else { - allErrs = append(allErrs, metav1validation.ValidateLabelName(v, p)...) - } - return allErrs -} - -func validateWhenUnsatisfiable(p *field.Path, v v1.UnsatisfiableConstraintAction) *field.Error { - if len(v) == 0 { - return field.Required(p, "can not be empty") - } - if !supportedScheduleActions.Has(string(v)) { - return field.NotSupported(p, v, supportedScheduleActions.List()) - } - return nil -} - -func validateConstraintNotRepeat(path *field.Path, constraints []v1.TopologySpreadConstraint, idx int) *field.Error { - c := &constraints[idx] - for i := range constraints[:idx] { - other := &constraints[i] - if c.TopologyKey == other.TopologyKey && c.WhenUnsatisfiable == other.WhenUnsatisfiable { - return field.Duplicate(path.Index(idx), fmt.Sprintf("{%v, %v}", c.TopologyKey, c.WhenUnsatisfiable)) - } - } - return nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go index ccdc048c4dc..760b8580c62 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go @@ -23,12 +23,10 @@ import ( "sync/atomic" v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/util/workqueue" - "k8s.io/klog" pluginhelper "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" + "k8s.io/kubernetes/pkg/scheduler/internal/parallelize" ) const preScoreStateKey = "PreScore" + Name @@ -37,10 +35,14 @@ const preScoreStateKey = "PreScore" + Name // Fields are exported for comparison during testing. type preScoreState struct { Constraints []topologySpreadConstraint - // NodeNameSet is a string set holding all node names which have all Constraints[*].topologyKey present. - NodeNameSet sets.String + // IgnoredNodes is a set of node names which miss some Constraints[*].topologyKey. + IgnoredNodes sets.String // TopologyPairToPodCounts is keyed with topologyPair, and valued with the number of matching pods. TopologyPairToPodCounts map[topologyPair]*int64 + // TopologyNormalizingWeight is the weight we give to the counts per topology. + // This allows the pod counts of smaller topologies to not be watered down by + // bigger ones. + TopologyNormalizingWeight []float64 } // Clone implements the mandatory Clone interface. We don't really copy the data since @@ -50,9 +52,10 @@ func (s *preScoreState) Clone() framework.StateData { } // initPreScoreState iterates "filteredNodes" to filter out the nodes which -// don't have required topologyKey(s), and initialize two maps: +// don't have required topologyKey(s), and initialize: // 1) s.TopologyPairToPodCounts: keyed with both eligible topology pair and node names. -// 2) s.NodeNameSet: keyed with node name, and valued with a *int64 pointer for eligible node only. +// 2) s.IgnoredNodes: the set of nodes that shouldn't be scored. +// 3) s.TopologyNormalizingWeight: The weight to be given to each constraint based on the number of values in a topology. func (pl *PodTopologySpread) initPreScoreState(s *preScoreState, pod *v1.Pod, filteredNodes []*v1.Node) error { var err error if len(pod.Spec.TopologySpreadConstraints) > 0 { @@ -69,19 +72,34 @@ func (pl *PodTopologySpread) initPreScoreState(s *preScoreState, pod *v1.Pod, fi if len(s.Constraints) == 0 { return nil } + topoSize := make([]int, len(s.Constraints)) for _, node := range filteredNodes { if !nodeLabelsMatchSpreadConstraints(node.Labels, s.Constraints) { + // Nodes which don't have all required topologyKeys present are ignored + // when scoring later. + s.IgnoredNodes.Insert(node.Name) continue } - for _, constraint := range s.Constraints { + for i, constraint := range s.Constraints { + // per-node counts are calculated during Score. + if constraint.TopologyKey == v1.LabelHostname { + continue + } pair := topologyPair{key: constraint.TopologyKey, value: node.Labels[constraint.TopologyKey]} if s.TopologyPairToPodCounts[pair] == nil { s.TopologyPairToPodCounts[pair] = new(int64) + topoSize[i]++ } } - s.NodeNameSet.Insert(node.Name) - // For those nodes which don't have all required topologyKeys present, it's intentional to leave - // their entries absent in NodeNameSet, so that we're able to score them to 0 afterwards. + } + + s.TopologyNormalizingWeight = make([]float64, len(s.Constraints)) + for i, c := range s.Constraints { + sz := topoSize[i] + if c.TopologyKey == v1.LabelHostname { + sz = len(filteredNodes) - len(s.IgnoredNodes) + } + s.TopologyNormalizingWeight[i] = topologyNormalizingWeight(sz) } return nil } @@ -104,7 +122,7 @@ func (pl *PodTopologySpread) PreScore( } state := &preScoreState{ - NodeNameSet: sets.String{}, + IgnoredNodes: sets.NewString(), TopologyPairToPodCounts: make(map[topologyPair]*int64), } err = pl.initPreScoreState(state, pod, filteredNodes) @@ -135,25 +153,16 @@ func (pl *PodTopologySpread) PreScore( pair := topologyPair{key: c.TopologyKey, value: node.Labels[c.TopologyKey]} // If current topology pair is not associated with any candidate node, // continue to avoid unnecessary calculation. - if state.TopologyPairToPodCounts[pair] == nil { + // Per-node counts are also skipped, as they are done during Score. + tpCount := state.TopologyPairToPodCounts[pair] + if tpCount == nil { continue } - - // indicates how many pods (on current node) match the . - matchSum := int64(0) - for _, existingPod := range nodeInfo.Pods() { - // Bypass terminating Pod (see #87621). - if existingPod.DeletionTimestamp != nil || existingPod.Namespace != pod.Namespace { - continue - } - if c.Selector.Matches(labels.Set(existingPod.Labels)) { - matchSum++ - } - } - atomic.AddInt64(state.TopologyPairToPodCounts[pair], matchSum) + count := countPodsMatchSelector(nodeInfo.Pods, c.Selector, pod.Namespace) + atomic.AddInt64(tpCount, int64(count)) } } - workqueue.ParallelizeUntil(ctx, 16, len(allNodes), processAllNode) + parallelize.Until(ctx, len(allNodes), processAllNode) cycleState.Write(preScoreStateKey, state) return nil @@ -175,21 +184,26 @@ func (pl *PodTopologySpread) Score(ctx context.Context, cycleState *framework.Cy } // Return if the node is not qualified. - if _, ok := s.NodeNameSet[node.Name]; !ok { + if s.IgnoredNodes.Has(node.Name) { return 0, nil } // For each present , current node gets a credit of . // And we sum up and return it as this node's score. - var score int64 - for _, c := range s.Constraints { + var score float64 + for i, c := range s.Constraints { if tpVal, ok := node.Labels[c.TopologyKey]; ok { - pair := topologyPair{key: c.TopologyKey, value: tpVal} - matchSum := *s.TopologyPairToPodCounts[pair] - score += matchSum + var cnt int64 + if c.TopologyKey == v1.LabelHostname { + cnt = int64(countPodsMatchSelector(nodeInfo.Pods, c.Selector, pod.Namespace)) + } else { + pair := topologyPair{key: c.TopologyKey, value: tpVal} + cnt = *s.TopologyPairToPodCounts[pair] + } + score += scoreForCount(cnt, c.MaxSkew, s.TopologyNormalizingWeight[i]) } } - return score, nil + return int64(score), nil } // NormalizeScore invoked after scoring all nodes. @@ -202,48 +216,41 @@ func (pl *PodTopologySpread) NormalizeScore(ctx context.Context, cycleState *fra return nil } - // Calculate the summed score and . + // Calculate and var minScore int64 = math.MaxInt64 - var total int64 + var maxScore int64 for _, score := range scores { - // it's mandatory to check if is present in m.NodeNameSet - if _, ok := s.NodeNameSet[score.Name]; !ok { + // it's mandatory to check if is present in m.IgnoredNodes + if s.IgnoredNodes.Has(score.Name) { continue } - total += score.Score if score.Score < minScore { minScore = score.Score } + if score.Score > maxScore { + maxScore = score.Score + } } - maxMinDiff := total - minScore for i := range scores { nodeInfo, err := pl.sharedLister.NodeInfos().Get(scores[i].Name) if err != nil { return framework.NewStatus(framework.Error, err.Error()) } node := nodeInfo.Node() - // Debugging purpose: print the score for each node. - // Score must be a pointer here, otherwise it's always 0. - if klog.V(10) { - defer func(score *int64, nodeName string) { - klog.Infof("%v -> %v: PodTopologySpread NormalizeScore, Score: (%d)", pod.Name, nodeName, *score) - }(&scores[i].Score, node.Name) - } - if maxMinDiff == 0 { - scores[i].Score = framework.MaxNodeScore - continue - } - - if _, ok := s.NodeNameSet[node.Name]; !ok { + if s.IgnoredNodes.Has(node.Name) { scores[i].Score = 0 continue } - flippedScore := total - scores[i].Score - fScore := float64(framework.MaxNodeScore) * (float64(flippedScore) / float64(maxMinDiff)) - scores[i].Score = int64(fScore) + if maxScore == 0 { + scores[i].Score = framework.MaxNodeScore + continue + } + + s := scores[i].Score + scores[i].Score = framework.MaxNodeScore * (maxScore + minScore - s) / maxScore } return nil } @@ -265,3 +272,24 @@ func getPreScoreState(cycleState *framework.CycleState) (*preScoreState, error) } return s, nil } + +// topologyNormalizingWeight calculates the weight for the topology, based on +// the number of values that exist for a topology. +// Since is at least 1 (all nodes that passed the Filters are in the +// same topology), and k8s supports 5k nodes, the result is in the interval +// <1.09, 8.52>. +// +// Note: could also be zero when no nodes have the required topologies, +// however we don't care about topology weight in this case as we return a 0 +// score for all nodes. +func topologyNormalizingWeight(size int) float64 { + return math.Log(float64(size + 2)) +} + +// scoreForCount calculates the score based on number of matching pods in a +// topology domain, the constraint's maxSkew and the topology weight. +// `maxSkew-1` is added to the score so that differences between topology +// domains get watered down, controlling the tolerance of the score to skews. +func scoreForCount(cnt int64, maxSkew int32, tpWeight float64) float64 { + return float64(cnt)*tpWeight + float64(maxSkew-1) +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort/priority_sort.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort/priority_sort.go index fe126b710a9..8c08b37ef6a 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort/priority_sort.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort/priority_sort.go @@ -37,14 +37,14 @@ func (pl *PrioritySort) Name() string { // Less is the function used by the activeQ heap algorithm to sort pods. // It sorts pods based on their priority. When priorities are equal, it uses -// PodInfo.timestamp. -func (pl *PrioritySort) Less(pInfo1, pInfo2 *framework.PodInfo) bool { +// PodQueueInfo.timestamp. +func (pl *PrioritySort) Less(pInfo1, pInfo2 *framework.QueuedPodInfo) bool { p1 := pod.GetPodPriority(pInfo1.Pod) p2 := pod.GetPodPriority(pInfo2.Pod) return (p1 > p2) || (p1 == p2 && pInfo1.Timestamp.Before(pInfo2.Timestamp)) } // New initializes a new plugin and returns it. -func New(plArgs *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { return &PrioritySort{}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/registry.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/registry.go index d3dd8543c02..5083f55eeb7 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/registry.go @@ -18,7 +18,7 @@ package plugins import ( "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread" + "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity" @@ -31,20 +31,21 @@ import ( "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort" + "k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone" - framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" + "k8s.io/kubernetes/pkg/scheduler/framework/runtime" ) // NewInTreeRegistry builds the registry with all the in-tree plugins. // A scheduler that runs out of tree plugins can register additional plugins // through the WithFrameworkOutOfTreeRegistry option. -func NewInTreeRegistry() framework.Registry { - return framework.Registry{ - defaultpodtopologyspread.Name: defaultpodtopologyspread.New, +func NewInTreeRegistry() runtime.Registry { + return runtime.Registry{ + selectorspread.Name: selectorspread.New, imagelocality.Name: imagelocality.New, tainttoleration.Name: tainttoleration.New, nodename.Name: nodename.New, @@ -58,7 +59,6 @@ func NewInTreeRegistry() framework.Registry { noderesources.MostAllocatedName: noderesources.NewMostAllocated, noderesources.LeastAllocatedName: noderesources.NewLeastAllocated, noderesources.RequestedToCapacityRatioName: noderesources.NewRequestedToCapacityRatio, - noderesources.ResourceLimitsName: noderesources.NewResourceLimits, volumebinding.Name: volumebinding.New, volumerestrictions.Name: volumerestrictions.New, volumezone.Name: volumezone.New, @@ -72,5 +72,6 @@ func NewInTreeRegistry() framework.Registry { serviceaffinity.Name: serviceaffinity.New, queuesort.Name: queuesort.New, defaultbinder.Name: defaultbinder.New, + defaultpreemption.Name: defaultpreemption.New, } } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread/BUILD similarity index 84% rename from vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread/BUILD rename to vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread/BUILD index f8902b3bcf2..177a45bfbca 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread/BUILD @@ -2,34 +2,33 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "go_default_library", - srcs = ["default_pod_topology_spread.go"], - importpath = "k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread", + srcs = ["selector_spread.go"], + importpath = "k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread", visibility = ["//visibility:public"], deps = [ "//pkg/scheduler/framework/plugins/helper:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/listers:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//pkg/util/node:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/client-go/listers/apps/v1:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", ], ) go_test( name = "go_default_test", srcs = [ - "default_pod_topology_spread_perf_test.go", - "default_pod_topology_spread_test.go", + "selector_spread_perf_test.go", + "selector_spread_test.go", ], embed = [":go_default_library"], deps = [ + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", + "//pkg/scheduler/internal/parallelize:go_default_library", "//pkg/scheduler/testing:go_default_library", "//staging/src/k8s.io/api/apps/v1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread/default_pod_topology_spread.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread/selector_spread.go similarity index 74% rename from vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread/default_pod_topology_spread.go rename to vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread/selector_spread.go index cf7b324d69b..4700ca24903 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread/default_pod_topology_spread.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread/selector_spread.go @@ -14,14 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -package defaultpodtopologyspread +package selectorspread import ( "context" "fmt" - "k8s.io/klog" - v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" @@ -29,26 +27,25 @@ import ( corelisters "k8s.io/client-go/listers/core/v1" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - sharedlisters "k8s.io/kubernetes/pkg/scheduler/listers" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" utilnode "k8s.io/kubernetes/pkg/util/node" ) -// DefaultPodTopologySpread is a plugin that calculates selector spread priority. -type DefaultPodTopologySpread struct { - sharedLister sharedlisters.SharedLister +// SelectorSpread is a plugin that calculates selector spread priority. +type SelectorSpread struct { + sharedLister framework.SharedLister services corelisters.ServiceLister replicationControllers corelisters.ReplicationControllerLister replicaSets appslisters.ReplicaSetLister statefulSets appslisters.StatefulSetLister } -var _ framework.ScorePlugin = &DefaultPodTopologySpread{} +var _ framework.PreScorePlugin = &SelectorSpread{} +var _ framework.ScorePlugin = &SelectorSpread{} const ( // Name is the name of the plugin used in the plugin registry and configurations. - Name = "DefaultPodTopologySpread" - // preScoreStateKey is the key in CycleState to DefaultPodTopologySpread pre-computed data for Scoring. + Name = "SelectorSpread" + // preScoreStateKey is the key in CycleState to SelectorSpread pre-computed data for Scoring. preScoreStateKey = "PreScore" + Name // When zone information is present, give 2/3 of the weighting to zone spreading, 1/3 to node spreading @@ -57,7 +54,7 @@ const ( ) // Name returns name of the plugin. It is used in logs, etc. -func (pl *DefaultPodTopologySpread) Name() string { +func (pl *SelectorSpread) Name() string { return Name } @@ -72,18 +69,18 @@ func (s *preScoreState) Clone() framework.StateData { return s } -// skipDefaultPodTopologySpread returns true if the pod's TopologySpreadConstraints are specified. +// skipSelectorSpread returns true if the pod's TopologySpreadConstraints are specified. // Note that this doesn't take into account default constraints defined for // the PodTopologySpread plugin. -func skipDefaultPodTopologySpread(pod *v1.Pod) bool { +func skipSelectorSpread(pod *v1.Pod) bool { return len(pod.Spec.TopologySpreadConstraints) != 0 } // Score invoked at the Score extension point. // The "score" returned in this function is the matching number of pods on the `nodeName`, // it is normalized later. -func (pl *DefaultPodTopologySpread) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) { - if skipDefaultPodTopologySpread(pod) { +func (pl *SelectorSpread) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) { + if skipSelectorSpread(pod) { return 0, nil } @@ -107,12 +104,12 @@ func (pl *DefaultPodTopologySpread) Score(ctx context.Context, state *framework. } // NormalizeScore invoked after scoring all nodes. -// For this plugin, it calculates the source of each node +// For this plugin, it calculates the score of each node // based on the number of existing matching pods on the node // where zone information is included on the nodes, it favors nodes // in zones with fewer existing matching pods. -func (pl *DefaultPodTopologySpread) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status { - if skipDefaultPodTopologySpread(pod) { +func (pl *SelectorSpread) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status { + if skipSelectorSpread(pod) { return nil } @@ -126,7 +123,7 @@ func (pl *DefaultPodTopologySpread) NormalizeScore(ctx context.Context, state *f } nodeInfo, err := pl.sharedLister.NodeInfos().Get(scores[i].Name) if err != nil { - return framework.NewStatus(framework.Error, err.Error()) + return framework.NewStatus(framework.Error, fmt.Sprintf("getting node %q from Snapshot: %v", scores[i].Name, err)) } zoneID := utilnode.GetZoneKey(nodeInfo.Node()) if zoneID == "" { @@ -157,7 +154,7 @@ func (pl *DefaultPodTopologySpread) NormalizeScore(ctx context.Context, state *f if haveZones { nodeInfo, err := pl.sharedLister.NodeInfos().Get(scores[i].Name) if err != nil { - return framework.NewStatus(framework.Error, err.Error()) + return framework.NewStatus(framework.Error, fmt.Sprintf("getting node %q from Snapshot: %v", scores[i].Name, err)) } zoneID := utilnode.GetZoneKey(nodeInfo.Node()) @@ -170,22 +167,20 @@ func (pl *DefaultPodTopologySpread) NormalizeScore(ctx context.Context, state *f } } scores[i].Score = int64(fScore) - if klog.V(10) { - klog.Infof( - "%v -> %v: SelectorSpreadPriority, Score: (%d)", pod.Name, scores[i].Name, int64(fScore), - ) - } } return nil } // ScoreExtensions of the Score plugin. -func (pl *DefaultPodTopologySpread) ScoreExtensions() framework.ScoreExtensions { +func (pl *SelectorSpread) ScoreExtensions() framework.ScoreExtensions { return pl } // PreScore builds and writes cycle state used by Score and NormalizeScore. -func (pl *DefaultPodTopologySpread) PreScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodes []*v1.Node) *framework.Status { +func (pl *SelectorSpread) PreScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodes []*v1.Node) *framework.Status { + if skipSelectorSpread(pod) { + return nil + } var selector labels.Selector selector = helper.DefaultSelector( pod, @@ -202,7 +197,7 @@ func (pl *DefaultPodTopologySpread) PreScore(ctx context.Context, cycleState *fr } // New initializes a new plugin and returns it. -func New(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { sharedLister := handle.SnapshotSharedLister() if sharedLister == nil { return nil, fmt.Errorf("SnapshotSharedLister is nil") @@ -211,7 +206,7 @@ func New(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin if sharedInformerFactory == nil { return nil, fmt.Errorf("SharedInformerFactory is nil") } - return &DefaultPodTopologySpread{ + return &SelectorSpread{ sharedLister: sharedLister, services: sharedInformerFactory.Core().V1().Services().Lister(), replicationControllers: sharedInformerFactory.Core().V1().ReplicationControllers().Lister(), @@ -221,16 +216,16 @@ func New(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin } // countMatchingPods counts pods based on namespace and matching all selectors -func countMatchingPods(namespace string, selector labels.Selector, nodeInfo *schedulernodeinfo.NodeInfo) int { - if len(nodeInfo.Pods()) == 0 || selector.Empty() { +func countMatchingPods(namespace string, selector labels.Selector, nodeInfo *framework.NodeInfo) int { + if len(nodeInfo.Pods) == 0 || selector.Empty() { return 0 } count := 0 - for _, pod := range nodeInfo.Pods() { + for _, p := range nodeInfo.Pods { // Ignore pods being deleted for spreading purposes // Similar to how it is done for SelectorSpreadPriority - if namespace == pod.Namespace && pod.DeletionTimestamp == nil { - if selector.Matches(labels.Set(pod.Labels)) { + if namespace == p.Pod.Namespace && p.Pod.DeletionTimestamp == nil { + if selector.Matches(labels.Set(p.Pod.Labels)) { count++ } } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity/BUILD index b2b8552cb95..ac005623cc3 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity/BUILD @@ -6,10 +6,9 @@ go_library( importpath = "k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity", visibility = ["//visibility:public"], deps = [ + "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/framework/plugins/helper:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/listers:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", @@ -22,10 +21,10 @@ go_test( srcs = ["service_affinity_test.go"], embed = [":go_default_library"], deps = [ + "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", + "//pkg/scheduler/framework/v1alpha1/fake:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", - "//pkg/scheduler/listers/fake:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity/service_affinity.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity/service_affinity.go index 6a438a59115..2bff04bcafe 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity/service_affinity.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity/service_affinity.go @@ -24,10 +24,9 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" corelisters "k8s.io/client-go/listers/core/v1" + "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - schedulerlisters "k8s.io/kubernetes/pkg/scheduler/listers" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) const ( @@ -42,16 +41,6 @@ const ( ErrReason = "node(s) didn't match service affinity" ) -// Args holds the args that are used to configure the plugin. -type Args struct { - // Labels are homogeneous for pods that are scheduled to a node. - // (i.e. it returns true IFF this pod can be added to this node such that all other pods in - // the same service are running on nodes with the exact same values for Labels). - AffinityLabels []string `json:"affinityLabels,omitempty"` - // AntiAffinityLabelsPreference are the labels to consider for service anti affinity scoring. - AntiAffinityLabelsPreference []string `json:"antiAffinityLabelsPreference,omitempty"` -} - // preFilterState computed at PreFilter and used at Filter. type preFilterState struct { matchingPodList []*v1.Pod @@ -74,13 +63,12 @@ func (s *preFilterState) Clone() framework.StateData { } // New initializes a new plugin and returns it. -func New(plArgs *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { - args := Args{} - if err := framework.DecodeInto(plArgs, &args); err != nil { +func New(plArgs runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { + args, err := getArgs(plArgs) + if err != nil { return nil, err } - informerFactory := handle.SharedInformerFactory() - serviceLister := informerFactory.Core().V1().Services().Lister() + serviceLister := handle.SharedInformerFactory().Core().V1().Services().Lister() return &ServiceAffinity{ sharedLister: handle.SnapshotSharedLister(), @@ -89,10 +77,18 @@ func New(plArgs *runtime.Unknown, handle framework.FrameworkHandle) (framework.P }, nil } +func getArgs(obj runtime.Object) (config.ServiceAffinityArgs, error) { + ptr, ok := obj.(*config.ServiceAffinityArgs) + if !ok { + return config.ServiceAffinityArgs{}, fmt.Errorf("want args to be of type ServiceAffinityArgs, got %T", obj) + } + return *ptr, nil +} + // ServiceAffinity is a plugin that checks service affinity. type ServiceAffinity struct { - args Args - sharedLister schedulerlisters.SharedLister + args config.ServiceAffinityArgs + sharedLister framework.SharedLister serviceLister corelisters.ServiceLister } @@ -115,13 +111,13 @@ func (pl *ServiceAffinity) createPreFilterState(pod *v1.Pod) (*preFilterState, e return nil, fmt.Errorf("listing pod services: %v", err.Error()) } selector := createSelectorFromLabels(pod.Labels) - allMatches, err := pl.sharedLister.Pods().List(selector) - if err != nil { - return nil, fmt.Errorf("listing pods: %v", err.Error()) - } // consider only the pods that belong to the same namespace - matchingPodList := filterPodsByNamespace(allMatches, pod.Namespace) + nodeInfos, err := pl.sharedLister.NodeInfos().List() + if err != nil { + return nil, fmt.Errorf("listing nodeInfos: %v", err.Error()) + } + matchingPodList := filterPods(nodeInfos, selector, pod.Namespace) return &preFilterState{ matchingPodList: matchingPodList, @@ -131,10 +127,13 @@ func (pl *ServiceAffinity) createPreFilterState(pod *v1.Pod) (*preFilterState, e // PreFilter invoked at the prefilter extension point. func (pl *ServiceAffinity) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) *framework.Status { + if len(pl.args.AffinityLabels) == 0 { + return nil + } + s, err := pl.createPreFilterState(pod) if err != nil { return framework.NewStatus(framework.Error, fmt.Sprintf("could not create preFilterState: %v", err)) - } cycleState.Write(preFilterStateKey, s) return nil @@ -142,11 +141,14 @@ func (pl *ServiceAffinity) PreFilter(ctx context.Context, cycleState *framework. // PreFilterExtensions returns prefilter extensions, pod add and remove. func (pl *ServiceAffinity) PreFilterExtensions() framework.PreFilterExtensions { + if len(pl.args.AffinityLabels) == 0 { + return nil + } return pl } // AddPod from pre-computed data in cycleState. -func (pl *ServiceAffinity) AddPod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *ServiceAffinity) AddPod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { s, err := getPreFilterState(cycleState) if err != nil { return framework.NewStatus(framework.Error, err.Error()) @@ -167,7 +169,7 @@ func (pl *ServiceAffinity) AddPod(ctx context.Context, cycleState *framework.Cyc } // RemovePod from pre-computed data in cycleState. -func (pl *ServiceAffinity) RemovePod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *ServiceAffinity) RemovePod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { s, err := getPreFilterState(cycleState) if err != nil { return framework.NewStatus(framework.Error, err.Error()) @@ -230,7 +232,7 @@ func getPreFilterState(cycleState *framework.CycleState) (*preFilterState, error // - L is a label that the ServiceAffinity object needs as a matching constraint. // - L is not defined in the pod itself already. // - and SOME pod, from a service, in the same namespace, ALREADY scheduled onto a node, has a matching value. -func (pl *ServiceAffinity) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *ServiceAffinity) Filter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { if len(pl.args.AffinityLabels) == 0 { return nil } @@ -289,15 +291,15 @@ func (pl *ServiceAffinity) Score(ctx context.Context, state *framework.CycleStat selector = labels.NewSelector() } - if len(nodeInfo.Pods()) == 0 || selector.Empty() { + if len(nodeInfo.Pods) == 0 || selector.Empty() { return 0, nil } var score int64 - for _, existingPod := range nodeInfo.Pods() { + for _, existingPod := range nodeInfo.Pods { // Ignore pods being deleted for spreading purposes // Similar to how it is done for SelectorSpreadPriority - if pod.Namespace == existingPod.Namespace && existingPod.DeletionTimestamp == nil { - if selector.Matches(labels.Set(existingPod.Labels)) { + if pod.Namespace == existingPod.Pod.Namespace && existingPod.Pod.DeletionTimestamp == nil { + if selector.Matches(labels.Set(existingPod.Pod.Labels)) { score++ } } @@ -332,7 +334,7 @@ func (pl *ServiceAffinity) NormalizeScore(ctx context.Context, _ *framework.Cycl // we need to modify the old priority to be able to handle multiple labels so that it can be mapped // to a single plugin. // TODO: This will be deprecated soon. -func (pl *ServiceAffinity) updateNodeScoresForLabel(sharedLister schedulerlisters.SharedLister, mapResult framework.NodeScoreList, reduceResult []float64, label string) error { +func (pl *ServiceAffinity) updateNodeScoresForLabel(sharedLister framework.SharedLister, mapResult framework.NodeScoreList, reduceResult []float64, label string) error { var numServicePods int64 var labelValue string podCounts := map[string]int64{} @@ -403,15 +405,21 @@ func createSelectorFromLabels(aL map[string]string) labels.Selector { return labels.Set(aL).AsSelector() } -// filterPodsByNamespace filters pods outside a namespace from the given list. -func filterPodsByNamespace(pods []*v1.Pod, ns string) []*v1.Pod { - filtered := []*v1.Pod{} - for _, nsPod := range pods { - if nsPod.Namespace == ns { - filtered = append(filtered, nsPod) +// filterPods filters pods outside a namespace from the given list. +func filterPods(nodeInfos []*framework.NodeInfo, selector labels.Selector, ns string) []*v1.Pod { + maxSize := 0 + for _, n := range nodeInfos { + maxSize += len(n.Pods) + } + pods := make([]*v1.Pod, 0, maxSize) + for _, n := range nodeInfos { + for _, p := range n.Pods { + if p.Pod.Namespace == ns && selector.Matches(labels.Set(p.Pod.Labels)) { + pods = append(pods, p.Pod) + } } } - return filtered + return pods } // findLabelsInSet gets as many key/value pairs as possible out of a label set. diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/BUILD index 92b150da4e1..52557086536 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/BUILD @@ -9,7 +9,6 @@ go_library( "//pkg/apis/core/v1/helper:go_default_library", "//pkg/scheduler/framework/plugins/helper:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", ], @@ -34,9 +33,9 @@ go_test( srcs = ["taint_toleration_test.go"], embed = [":go_default_library"], deps = [ + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go index 75a7f3adaa1..8e6f11047b1 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go @@ -25,7 +25,6 @@ import ( v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" pluginhelper "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) // TaintToleration is a plugin that checks if a pod tolerates a node's taints. @@ -52,22 +51,17 @@ func (pl *TaintToleration) Name() string { } // Filter invoked at the filter extension point. -func (pl *TaintToleration) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *TaintToleration) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { if nodeInfo == nil || nodeInfo.Node() == nil { return framework.NewStatus(framework.Error, "invalid nodeInfo") } - taints, err := nodeInfo.Taints() - if err != nil { - return framework.NewStatus(framework.Error, err.Error()) - } - filterPredicate := func(t *v1.Taint) bool { // PodToleratesNodeTaints is only interested in NoSchedule and NoExecute taints. return t.Effect == v1.TaintEffectNoSchedule || t.Effect == v1.TaintEffectNoExecute } - taint, isUntolerated := v1helper.FindMatchingUntoleratedTaint(taints, pod.Spec.Tolerations, filterPredicate) + taint, isUntolerated := v1helper.FindMatchingUntoleratedTaint(nodeInfo.Node().Spec.Taints, pod.Spec.Tolerations, filterPredicate) if !isUntolerated { return nil } @@ -168,6 +162,6 @@ func (pl *TaintToleration) ScoreExtensions() framework.ScoreExtensions { } // New initializes a new plugin and returns it. -func New(_ *runtime.Unknown, h framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, h framework.FrameworkHandle) (framework.Plugin, error) { return &TaintToleration{handle: h}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/BUILD index dc0fd182127..dd70db1ea9d 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/BUILD @@ -7,10 +7,13 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/controller/volume/scheduling:go_default_library", + "//pkg/features:go_default_library", + "//pkg/scheduler/apis/config:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -33,9 +36,16 @@ go_test( srcs = ["volume_binding_test.go"], embed = [":go_default_library"], deps = [ + "//pkg/controller/volume/persistentvolume/util:go_default_library", "//pkg/controller/volume/scheduling:go_default_library", + "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/api/storage/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/client-go/informers:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/OWNERS b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/OWNERS new file mode 100644 index 00000000000..1ec0f1b7735 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/OWNERS @@ -0,0 +1,6 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +reviewers: +- sig-storage-reviewers +labels: +- sig/storage diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go index e1e7d987c81..52c316de348 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go @@ -18,20 +18,57 @@ package volumebinding import ( "context" + "errors" + "fmt" + "time" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/controller/volume/scheduling" + "k8s.io/kubernetes/pkg/features" + "k8s.io/kubernetes/pkg/scheduler/apis/config" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) -// VolumeBinding is a plugin that binds pod volumes in scheduling. -type VolumeBinding struct { - binder scheduling.SchedulerVolumeBinder +const ( + // DefaultBindTimeoutSeconds defines the default bind timeout in seconds + DefaultBindTimeoutSeconds = 600 + + stateKey framework.StateKey = Name +) + +// the state is initialized in PreFilter phase. because we save the pointer in +// framework.CycleState, in the later phases we don't need to call Write method +// to update the value +type stateData struct { + skip bool // set true if pod does not have PVCs + boundClaims []*v1.PersistentVolumeClaim + claimsToBind []*v1.PersistentVolumeClaim + allBound bool + // podVolumesByNode holds the pod's volume information found in the Filter + // phase for each node + // it's initialized in the PreFilter phase + podVolumesByNode map[string]*scheduling.PodVolumes } +func (d *stateData) Clone() framework.StateData { + return d +} + +// VolumeBinding is a plugin that binds pod volumes in scheduling. +// In the Filter phase, pod binding cache is created for the pod and used in +// Reserve and PreBind phases. +type VolumeBinding struct { + Binder scheduling.SchedulerVolumeBinder + GenericEphemeralVolumeFeatureEnabled bool +} + +var _ framework.PreFilterPlugin = &VolumeBinding{} var _ framework.FilterPlugin = &VolumeBinding{} +var _ framework.ReservePlugin = &VolumeBinding{} +var _ framework.PreBindPlugin = &VolumeBinding{} // Name is the name of the plugin used in Registry and configurations. const Name = "VolumeBinding" @@ -41,15 +78,58 @@ func (pl *VolumeBinding) Name() string { return Name } -func podHasPVCs(pod *v1.Pod) bool { +func (pl *VolumeBinding) podHasPVCs(pod *v1.Pod) bool { for _, vol := range pod.Spec.Volumes { - if vol.PersistentVolumeClaim != nil { + if vol.PersistentVolumeClaim != nil || + pl.GenericEphemeralVolumeFeatureEnabled && vol.Ephemeral != nil { return true } } return false } +// PreFilter invoked at the prefilter extension point to check if pod has all +// immediate PVCs bound. If not all immediate PVCs are bound, an +// UnschedulableAndUnresolvable is returned. +func (pl *VolumeBinding) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) *framework.Status { + // If pod does not reference any PVC, we don't need to do anything. + if !pl.podHasPVCs(pod) { + state.Write(stateKey, &stateData{skip: true}) + return nil + } + boundClaims, claimsToBind, unboundClaimsImmediate, err := pl.Binder.GetPodVolumes(pod) + if err != nil { + return framework.NewStatus(framework.Error, err.Error()) + } + if len(unboundClaimsImmediate) > 0 { + // Return UnschedulableAndUnresolvable error if immediate claims are + // not bound. Pod will be moved to active/backoff queues once these + // claims are bound by PV controller. + status := framework.NewStatus(framework.UnschedulableAndUnresolvable) + status.AppendReason("pod has unbound immediate PersistentVolumeClaims") + return status + } + state.Write(stateKey, &stateData{boundClaims: boundClaims, claimsToBind: claimsToBind, podVolumesByNode: make(map[string]*scheduling.PodVolumes)}) + return nil +} + +// PreFilterExtensions returns prefilter extensions, pod add and remove. +func (pl *VolumeBinding) PreFilterExtensions() framework.PreFilterExtensions { + return nil +} + +func getStateData(cs *framework.CycleState) (*stateData, error) { + state, err := cs.Read(stateKey) + if err != nil { + return nil, err + } + s, ok := state.(*stateData) + if !ok { + return nil, errors.New("unable to convert state into stateData") + } + return s, nil +} + // Filter invoked at the filter extension point. // It evaluates if a pod can fit due to the volumes it requests, // for both bound and unbound PVCs. @@ -60,19 +140,27 @@ func podHasPVCs(pod *v1.Pod) bool { // For PVCs that are unbound, it tries to find available PVs that can satisfy the PVC requirements // and that the PV node affinity is satisfied by the given node. // +// If storage capacity tracking is enabled, then enough space has to be available +// for the node and volumes that still need to be created. +// // The predicate returns true if all bound PVCs have compatible PVs with the node, and if all unbound // PVCs can be matched with an available and node-compatible PV. -func (pl *VolumeBinding) Filter(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *framework.Status { +func (pl *VolumeBinding) Filter(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { node := nodeInfo.Node() if node == nil { return framework.NewStatus(framework.Error, "node not found") } - // If pod does not request any PVC, we don't need to do anything. - if !podHasPVCs(pod) { + + state, err := getStateData(cs) + if err != nil { + return framework.NewStatus(framework.Error, err.Error()) + } + + if state.skip { return nil } - reasons, err := pl.binder.FindPodVolumes(pod, node) + podVolumes, reasons, err := pl.Binder.FindPodVolumes(pod, state.boundClaims, state.claimsToBind, node) if err != nil { return framework.NewStatus(framework.Error, err.Error()) @@ -85,12 +173,111 @@ func (pl *VolumeBinding) Filter(ctx context.Context, cs *framework.CycleState, p } return status } + + cs.Lock() + state.podVolumesByNode[node.Name] = podVolumes + cs.Unlock() return nil } -// New initializes a new plugin with volume binder and returns it. -func New(_ *runtime.Unknown, fh framework.FrameworkHandle) (framework.Plugin, error) { +// Reserve reserves volumes of pod and saves binding status in cycle state. +func (pl *VolumeBinding) Reserve(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status { + state, err := getStateData(cs) + if err != nil { + return framework.NewStatus(framework.Error, err.Error()) + } + // we don't need to hold the lock as only one node will be reserved for the given pod + podVolumes, ok := state.podVolumesByNode[nodeName] + if ok { + allBound, err := pl.Binder.AssumePodVolumes(pod, nodeName, podVolumes) + if err != nil { + return framework.NewStatus(framework.Error, err.Error()) + } + state.allBound = allBound + } else { + // may not exist if the pod does not reference any PVC + state.allBound = true + } + return nil +} + +// PreBind will make the API update with the assumed bindings and wait until +// the PV controller has completely finished the binding operation. +// +// If binding errors, times out or gets undone, then an error will be returned to +// retry scheduling. +func (pl *VolumeBinding) PreBind(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status { + s, err := getStateData(cs) + if err != nil { + return framework.NewStatus(framework.Error, err.Error()) + } + if s.allBound { + // no need to bind volumes + return nil + } + // we don't need to hold the lock as only one node will be pre-bound for the given pod + podVolumes, ok := s.podVolumesByNode[nodeName] + if !ok { + return framework.NewStatus(framework.Error, fmt.Sprintf("no pod volumes found for node %q", nodeName)) + } + klog.V(5).Infof("Trying to bind volumes for pod \"%v/%v\"", pod.Namespace, pod.Name) + err = pl.Binder.BindPodVolumes(pod, podVolumes) + if err != nil { + klog.V(1).Infof("Failed to bind volumes for pod \"%v/%v\": %v", pod.Namespace, pod.Name, err) + return framework.NewStatus(framework.Error, err.Error()) + } + klog.V(5).Infof("Success binding volumes for pod \"%v/%v\"", pod.Namespace, pod.Name) + return nil +} + +// Unreserve clears assumed PV and PVC cache. +// It's idempotent, and does nothing if no cache found for the given pod. +func (pl *VolumeBinding) Unreserve(ctx context.Context, cs *framework.CycleState, pod *v1.Pod, nodeName string) { + s, err := getStateData(cs) + if err != nil { + return + } + // we don't need to hold the lock as only one node may be unreserved + podVolumes, ok := s.podVolumesByNode[nodeName] + if !ok { + return + } + pl.Binder.RevertAssumedPodVolumes(podVolumes) + return +} + +// New initializes a new plugin and returns it. +func New(plArgs runtime.Object, fh framework.FrameworkHandle) (framework.Plugin, error) { + args, ok := plArgs.(*config.VolumeBindingArgs) + if !ok { + return nil, fmt.Errorf("want args to be of type VolumeBindingArgs, got %T", plArgs) + } + if err := validateArgs(args); err != nil { + return nil, err + } + podInformer := fh.SharedInformerFactory().Core().V1().Pods() + nodeInformer := fh.SharedInformerFactory().Core().V1().Nodes() + pvcInformer := fh.SharedInformerFactory().Core().V1().PersistentVolumeClaims() + pvInformer := fh.SharedInformerFactory().Core().V1().PersistentVolumes() + storageClassInformer := fh.SharedInformerFactory().Storage().V1().StorageClasses() + csiNodeInformer := fh.SharedInformerFactory().Storage().V1().CSINodes() + var capacityCheck *scheduling.CapacityCheck + if utilfeature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity) { + capacityCheck = &scheduling.CapacityCheck{ + CSIDriverInformer: fh.SharedInformerFactory().Storage().V1().CSIDrivers(), + CSIStorageCapacityInformer: fh.SharedInformerFactory().Storage().V1alpha1().CSIStorageCapacities(), + } + } + binder := scheduling.NewVolumeBinder(fh.ClientSet(), podInformer, nodeInformer, csiNodeInformer, pvcInformer, pvInformer, storageClassInformer, capacityCheck, time.Duration(args.BindTimeoutSeconds)*time.Second) return &VolumeBinding{ - binder: fh.VolumeBinder(), + Binder: binder, + GenericEphemeralVolumeFeatureEnabled: utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume), }, nil } + +func validateArgs(args *config.VolumeBindingArgs) error { + if args.BindTimeoutSeconds <= 0 { + return fmt.Errorf("invalid BindTimeoutSeconds: %d, must be positive integer", args.BindTimeoutSeconds) + } + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/BUILD index 927cba1ebf5..997d00086db 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/BUILD @@ -7,7 +7,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", ], @@ -33,7 +32,6 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go index 33299b29e26..410fdb6d873 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go @@ -22,7 +22,6 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) // VolumeRestrictions is a plugin that checks volume restrictions. @@ -43,12 +42,7 @@ func (pl *VolumeRestrictions) Name() string { return Name } -func isVolumeConflict(volume v1.Volume, pod *v1.Pod) bool { - // fast path if there is no conflict checking targets. - if volume.GCEPersistentDisk == nil && volume.AWSElasticBlockStore == nil && volume.RBD == nil && volume.ISCSI == nil { - return false - } - +func isVolumeConflict(volume *v1.Volume, pod *v1.Pod) bool { for _, existingVolume := range pod.Spec.Volumes { // Same GCE disk mounted by multiple pods conflicts unless all pods mount it read-only. if volume.GCEPersistentDisk != nil && existingVolume.GCEPersistentDisk != nil { @@ -118,10 +112,16 @@ func haveOverlap(a1, a2 []string) bool { // - AWS EBS forbids any two pods mounting the same volume ID // - Ceph RBD forbids if any two pods share at least same monitor, and match pool and image, and the image is read-only // - ISCSI forbids if any two pods share at least same IQN and ISCSI volume is read-only -func (pl *VolumeRestrictions) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { - for _, v := range pod.Spec.Volumes { - for _, ev := range nodeInfo.Pods() { - if isVolumeConflict(v, ev) { +func (pl *VolumeRestrictions) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { + for i := range pod.Spec.Volumes { + v := &pod.Spec.Volumes[i] + // fast path if there is no conflict checking targets. + if v.GCEPersistentDisk == nil && v.AWSElasticBlockStore == nil && v.RBD == nil && v.ISCSI == nil { + continue + } + + for _, ev := range nodeInfo.Pods { + if isVolumeConflict(v, ev.Pod) { return framework.NewStatus(framework.Unschedulable, ErrReasonDiskConflict) } } @@ -130,6 +130,6 @@ func (pl *VolumeRestrictions) Filter(ctx context.Context, _ *framework.CycleStat } // New initializes a new plugin and returns it. -func New(_ *runtime.Unknown, _ framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, _ framework.FrameworkHandle) (framework.Plugin, error) { return &VolumeRestrictions{}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone/BUILD index 7c2400e9cd5..762d6b72f28 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone/BUILD @@ -8,14 +8,14 @@ go_library( deps = [ "//pkg/apis/core/v1/helper:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/listers/storage/v1:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -25,8 +25,7 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/scheduler/framework/v1alpha1:go_default_library", - "//pkg/scheduler/listers/fake:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/framework/v1alpha1/fake:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone/volume_zone.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone/volume_zone.go index 1340f5421f0..c62b2ea3f73 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone/volume_zone.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone/volume_zone.go @@ -23,13 +23,13 @@ import ( v1 "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" corelisters "k8s.io/client-go/listers/core/v1" storagelisters "k8s.io/client-go/listers/storage/v1" volumehelpers "k8s.io/cloud-provider/volume/helpers" - "k8s.io/klog" + "k8s.io/klog/v2" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" - "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) // VolumeZone is a plugin that checks volume zone. @@ -49,6 +49,13 @@ const ( ErrReasonConflict = "node(s) had no available volume zone" ) +var volumeZoneLabels = sets.NewString( + v1.LabelZoneFailureDomain, + v1.LabelZoneRegion, + v1.LabelZoneFailureDomainStable, + v1.LabelZoneRegionStable, +) + // Name returns name of the plugin. It is used in logs, etc. func (pl *VolumeZone) Name() string { return Name @@ -70,7 +77,7 @@ func (pl *VolumeZone) Name() string { // determining the zone of a volume during scheduling, and that is likely to // require calling out to the cloud provider. It seems that we are moving away // from inline volume declarations anyway. -func (pl *VolumeZone) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status { +func (pl *VolumeZone) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { // If a pod doesn't have any volume attached to it, the predicate will always be true. // Thus we make a fast path for it, to avoid unnecessary computations in this case. if len(pod.Spec.Volumes) == 0 { @@ -82,7 +89,7 @@ func (pl *VolumeZone) Filter(ctx context.Context, _ *framework.CycleState, pod * } nodeConstraints := make(map[string]string) for k, v := range node.ObjectMeta.Labels { - if k != v1.LabelZoneFailureDomain && k != v1.LabelZoneRegion { + if !volumeZoneLabels.Has(k) { continue } nodeConstraints[k] = v @@ -145,7 +152,7 @@ func (pl *VolumeZone) Filter(ctx context.Context, _ *framework.CycleState, pod * } for k, v := range pv.ObjectMeta.Labels { - if k != v1.LabelZoneFailureDomain && k != v1.LabelZoneRegion { + if !volumeZoneLabels.Has(k) { continue } nodeV, _ := nodeConstraints[k] @@ -165,7 +172,7 @@ func (pl *VolumeZone) Filter(ctx context.Context, _ *framework.CycleState, pod * } // New initializes a new plugin and returns it. -func New(_ *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error) { +func New(_ runtime.Object, handle framework.FrameworkHandle) (framework.Plugin, error) { informerFactory := handle.SharedInformerFactory() pvLister := informerFactory.Core().V1().PersistentVolumes().Lister() pvcLister := informerFactory.Core().V1().PersistentVolumeClaims().Lister() diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/BUILD new file mode 100644 index 00000000000..78d1912d59f --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/BUILD @@ -0,0 +1,67 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "framework.go", + "metrics_recorder.go", + "registry.go", + "waiting_pods_map.go", + ], + importpath = "k8s.io/kubernetes/pkg/scheduler/framework/runtime", + visibility = ["//visibility:public"], + deps = [ + "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/apis/config/scheme:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", + "//pkg/scheduler/internal/parallelize:go_default_library", + "//pkg/scheduler/metrics:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/json:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/client-go/informers:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/tools/events:go_default_library", + "//staging/src/k8s.io/component-base/metrics:go_default_library", + "//staging/src/k8s.io/kube-scheduler/config/v1beta1:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + "//vendor/sigs.k8s.io/yaml:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = [ + "framework_test.go", + "registry_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", + "//pkg/scheduler/metrics:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", + "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", + "//vendor/github.com/prometheus/client_model/go:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:public"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/framework.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/framework.go similarity index 60% rename from vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/framework.go rename to vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/framework.go index 4924a51db2a..553b7e6da39 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/framework.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/framework.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package runtime import ( "context" @@ -28,14 +28,14 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/informers" clientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/util/workqueue" - "k8s.io/klog" - "k8s.io/kubernetes/pkg/controller/volume/scheduling" + "k8s.io/client-go/tools/events" + "k8s.io/klog/v2" + "k8s.io/kube-scheduler/config/v1beta1" "k8s.io/kubernetes/pkg/scheduler/apis/config" - schedulerlisters "k8s.io/kubernetes/pkg/scheduler/listers" + "k8s.io/kubernetes/pkg/scheduler/apis/config/scheme" + framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" + "k8s.io/kubernetes/pkg/scheduler/internal/parallelize" "k8s.io/kubernetes/pkg/scheduler/metrics" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" - schedutil "k8s.io/kubernetes/pkg/scheduler/util" ) const ( @@ -46,6 +46,7 @@ const ( preFilter = "PreFilter" preFilterExtensionAddPod = "PreFilterExtensionAddPod" preFilterExtensionRemovePod = "PreFilterExtensionRemovePod" + postFilter = "PostFilter" preScore = "PreScore" score = "Score" scoreExtensionNormalize = "ScoreExtensionNormalize" @@ -57,30 +58,35 @@ const ( permit = "Permit" ) -// framework is the component responsible for initializing and running scheduler +var configDecoder = scheme.Codecs.UniversalDecoder() + +// frameworkImpl is the component responsible for initializing and running scheduler // plugins. -type framework struct { +type frameworkImpl struct { registry Registry - snapshotSharedLister schedulerlisters.SharedLister + snapshotSharedLister framework.SharedLister waitingPods *waitingPodsMap pluginNameToWeightMap map[string]int - queueSortPlugins []QueueSortPlugin - preFilterPlugins []PreFilterPlugin - filterPlugins []FilterPlugin - preScorePlugins []PreScorePlugin - scorePlugins []ScorePlugin - reservePlugins []ReservePlugin - preBindPlugins []PreBindPlugin - bindPlugins []BindPlugin - postBindPlugins []PostBindPlugin - unreservePlugins []UnreservePlugin - permitPlugins []PermitPlugin + queueSortPlugins []framework.QueueSortPlugin + preFilterPlugins []framework.PreFilterPlugin + filterPlugins []framework.FilterPlugin + postFilterPlugins []framework.PostFilterPlugin + preScorePlugins []framework.PreScorePlugin + scorePlugins []framework.ScorePlugin + reservePlugins []framework.ReservePlugin + preBindPlugins []framework.PreBindPlugin + bindPlugins []framework.BindPlugin + postBindPlugins []framework.PostBindPlugin + permitPlugins []framework.PermitPlugin clientSet clientset.Interface + eventRecorder events.EventRecorder informerFactory informers.SharedInformerFactory - volumeBinder scheduling.SchedulerVolumeBinder metricsRecorder *metricsRecorder + profileName string + + preemptHandle framework.PreemptHandle // Indicates that RunFilterPlugins should accumulate all failed statuses and not return // after the first failure. @@ -89,7 +95,7 @@ type framework struct { // extensionPoint encapsulates desired and applied set of plugins at a specific extension // point. This is used to simplify iterating over all extension points supported by the -// framework. +// frameworkImpl. type extensionPoint struct { // the set of plugins to be configured at this extension point. plugins *config.PluginSet @@ -98,17 +104,17 @@ type extensionPoint struct { slicePtr interface{} } -func (f *framework) getExtensionPoints(plugins *config.Plugins) []extensionPoint { +func (f *frameworkImpl) getExtensionPoints(plugins *config.Plugins) []extensionPoint { return []extensionPoint{ {plugins.PreFilter, &f.preFilterPlugins}, {plugins.Filter, &f.filterPlugins}, + {plugins.PostFilter, &f.postFilterPlugins}, {plugins.Reserve, &f.reservePlugins}, {plugins.PreScore, &f.preScorePlugins}, {plugins.Score, &f.scorePlugins}, {plugins.PreBind, &f.preBindPlugins}, {plugins.Bind, &f.bindPlugins}, {plugins.PostBind, &f.postBindPlugins}, - {plugins.Unreserve, &f.unreservePlugins}, {plugins.Permit, &f.permitPlugins}, {plugins.QueueSort, &f.queueSortPlugins}, } @@ -116,24 +122,34 @@ func (f *framework) getExtensionPoints(plugins *config.Plugins) []extensionPoint type frameworkOptions struct { clientSet clientset.Interface + eventRecorder events.EventRecorder informerFactory informers.SharedInformerFactory - snapshotSharedLister schedulerlisters.SharedLister + snapshotSharedLister framework.SharedLister metricsRecorder *metricsRecorder - volumeBinder scheduling.SchedulerVolumeBinder + profileName string + podNominator framework.PodNominator + extenders []framework.Extender runAllFilters bool } -// Option for the framework. +// Option for the frameworkImpl. type Option func(*frameworkOptions) -// WithClientSet sets clientSet for the scheduling framework. +// WithClientSet sets clientSet for the scheduling frameworkImpl. func WithClientSet(clientSet clientset.Interface) Option { return func(o *frameworkOptions) { o.clientSet = clientSet } } -// WithInformerFactory sets informer factory for the scheduling framework. +// WithEventRecorder sets clientSet for the scheduling frameworkImpl. +func WithEventRecorder(recorder events.EventRecorder) Option { + return func(o *frameworkOptions) { + o.eventRecorder = recorder + } +} + +// WithInformerFactory sets informer factory for the scheduling frameworkImpl. func WithInformerFactory(informerFactory informers.SharedInformerFactory) Option { return func(o *frameworkOptions) { o.informerFactory = informerFactory @@ -141,7 +157,7 @@ func WithInformerFactory(informerFactory informers.SharedInformerFactory) Option } // WithSnapshotSharedLister sets the SharedLister of the snapshot. -func WithSnapshotSharedLister(snapshotSharedLister schedulerlisters.SharedLister) Option { +func WithSnapshotSharedLister(snapshotSharedLister framework.SharedLister) Option { return func(o *frameworkOptions) { o.snapshotSharedLister = snapshotSharedLister } @@ -155,6 +171,13 @@ func WithRunAllFilters(runAllFilters bool) Option { } } +// WithProfileName sets the profile name. +func WithProfileName(name string) Option { + return func(o *frameworkOptions) { + o.profileName = name + } +} + // withMetricsRecorder is only used in tests. func withMetricsRecorder(recorder *metricsRecorder) Option { return func(o *frameworkOptions) { @@ -162,10 +185,17 @@ func withMetricsRecorder(recorder *metricsRecorder) Option { } } -// WithVolumeBinder sets volume binder for the scheduling framework. -func WithVolumeBinder(binder scheduling.SchedulerVolumeBinder) Option { +// WithPodNominator sets podNominator for the scheduling frameworkImpl. +func WithPodNominator(nominator framework.PodNominator) Option { return func(o *frameworkOptions) { - o.volumeBinder = binder + o.podNominator = nominator + } +} + +// WithExtenders sets extenders for the scheduling frameworkImpl. +func WithExtenders(extenders []framework.Extender) Option { + return func(o *frameworkOptions) { + o.extenders = extenders } } @@ -173,26 +203,46 @@ var defaultFrameworkOptions = frameworkOptions{ metricsRecorder: newMetricsRecorder(1000, time.Second), } -var _ Framework = &framework{} +// TODO(#91029): move this to frameworkImpl runtime package. +var _ framework.PreemptHandle = &preemptHandle{} + +type preemptHandle struct { + extenders []framework.Extender + framework.PodNominator + framework.PluginsRunner +} + +// Extenders returns the registered extenders. +func (ph *preemptHandle) Extenders() []framework.Extender { + return ph.extenders +} + +var _ framework.Framework = &frameworkImpl{} // NewFramework initializes plugins given the configuration and the registry. -func NewFramework(r Registry, plugins *config.Plugins, args []config.PluginConfig, opts ...Option) (Framework, error) { +func NewFramework(r Registry, plugins *config.Plugins, args []config.PluginConfig, opts ...Option) (framework.Framework, error) { options := defaultFrameworkOptions for _, opt := range opts { opt(&options) } - f := &framework{ + f := &frameworkImpl{ registry: r, snapshotSharedLister: options.snapshotSharedLister, pluginNameToWeightMap: make(map[string]int), waitingPods: newWaitingPodsMap(), clientSet: options.clientSet, + eventRecorder: options.eventRecorder, informerFactory: options.informerFactory, - volumeBinder: options.volumeBinder, metricsRecorder: options.metricsRecorder, + profileName: options.profileName, runAllFilters: options.runAllFilters, } + f.preemptHandle = &preemptHandle{ + extenders: options.extenders, + PodNominator: options.podNominator, + PluginsRunner: f, + } if plugins == nil { return f, nil } @@ -200,16 +250,16 @@ func NewFramework(r Registry, plugins *config.Plugins, args []config.PluginConfi // get needed plugins from config pg := f.pluginsNeeded(plugins) - pluginConfig := make(map[string]*runtime.Unknown, 0) + pluginConfig := make(map[string]runtime.Object, len(args)) for i := range args { name := args[i].Name if _, ok := pluginConfig[name]; ok { return nil, fmt.Errorf("repeated config for plugin %s", name) } - pluginConfig[name] = &args[i].Args + pluginConfig[name] = args[i].Args } - pluginsMap := make(map[string]Plugin) + pluginsMap := make(map[string]framework.Plugin) var totalPriority int64 for name, factory := range r { // initialize only needed plugins. @@ -217,7 +267,11 @@ func NewFramework(r Registry, plugins *config.Plugins, args []config.PluginConfi continue } - p, err := factory(pluginConfig[name], f) + args, err := getPluginArgsOrDefault(pluginConfig, name) + if err != nil { + return nil, fmt.Errorf("getting args for Plugin %q: %w", name, err) + } + p, err := factory(args, f) if err != nil { return nil, fmt.Errorf("error initializing plugin %q: %v", name, err) } @@ -230,10 +284,10 @@ func NewFramework(r Registry, plugins *config.Plugins, args []config.PluginConfi f.pluginNameToWeightMap[name] = 1 } // Checks totalPriority against MaxTotalScore to avoid overflow - if int64(f.pluginNameToWeightMap[name])*MaxNodeScore > MaxTotalScore-totalPriority { + if int64(f.pluginNameToWeightMap[name])*framework.MaxNodeScore > framework.MaxTotalScore-totalPriority { return nil, fmt.Errorf("total score of Score plugins could overflow") } - totalPriority += int64(f.pluginNameToWeightMap[name]) * MaxNodeScore + totalPriority += int64(f.pluginNameToWeightMap[name]) * framework.MaxNodeScore } for _, e := range f.getExtensionPoints(plugins) { @@ -263,7 +317,26 @@ func NewFramework(r Registry, plugins *config.Plugins, args []config.PluginConfi return f, nil } -func updatePluginList(pluginList interface{}, pluginSet *config.PluginSet, pluginsMap map[string]Plugin) error { +// getPluginArgsOrDefault returns a configuration provided by the user or builds +// a default from the scheme. Returns `nil, nil` if the plugin does not have a +// defined arg types, such as in-tree plugins that don't require configuration +// or out-of-tree plugins. +func getPluginArgsOrDefault(pluginConfig map[string]runtime.Object, name string) (runtime.Object, error) { + res, ok := pluginConfig[name] + if ok { + return res, nil + } + // Use defaults from latest config API version. + gvk := v1beta1.SchemeGroupVersion.WithKind(name + "Args") + obj, _, err := configDecoder.Decode(nil, &gvk, nil) + if runtime.IsNotRegisteredError(err) { + // This plugin is out-of-tree or doesn't require configuration. + return nil, nil + } + return obj, err +} + +func updatePluginList(pluginList interface{}, pluginSet *config.PluginSet, pluginsMap map[string]framework.Plugin) error { if pluginSet == nil { return nil } @@ -294,15 +367,15 @@ func updatePluginList(pluginList interface{}, pluginSet *config.PluginSet, plugi } // QueueSortFunc returns the function to sort pods in scheduling queue -func (f *framework) QueueSortFunc() LessFunc { +func (f *frameworkImpl) QueueSortFunc() framework.LessFunc { if f == nil { - // If framework is nil, simply keep their order unchanged. + // If frameworkImpl is nil, simply keep their order unchanged. // NOTE: this is primarily for tests. - return func(_, _ *PodInfo) bool { return false } + return func(_, _ *framework.QueuedPodInfo) bool { return false } } if len(f.queueSortPlugins) == 0 { - panic("No QueueSort plugin is registered in the framework.") + panic("No QueueSort plugin is registered in the frameworkImpl.") } // Only one QueueSort plugin can be enabled. @@ -313,29 +386,27 @@ func (f *framework) QueueSortFunc() LessFunc { // *Status and its code is set to non-success if any of the plugins returns // anything but Success. If a non-success status is returned, then the scheduling // cycle is aborted. -func (f *framework) RunPreFilterPlugins(ctx context.Context, state *CycleState, pod *v1.Pod) (status *Status) { +func (f *frameworkImpl) RunPreFilterPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (status *framework.Status) { startTime := time.Now() defer func() { - metrics.FrameworkExtensionPointDuration.WithLabelValues(preFilter, status.Code().String()).Observe(metrics.SinceInSeconds(startTime)) + metrics.FrameworkExtensionPointDuration.WithLabelValues(preFilter, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) }() for _, pl := range f.preFilterPlugins { status = f.runPreFilterPlugin(ctx, pl, state, pod) if !status.IsSuccess() { if status.IsUnschedulable() { - msg := fmt.Sprintf("rejected by %q at prefilter: %v", pl.Name(), status.Message()) - klog.V(4).Infof(msg) - return NewStatus(status.Code(), msg) + return status } - msg := fmt.Sprintf("error while running %q prefilter plugin for pod %q: %v", pl.Name(), pod.Name, status.Message()) + msg := fmt.Sprintf("prefilter plugin %q failed for pod %q: %v", pl.Name(), pod.Name, status.Message()) klog.Error(msg) - return NewStatus(Error, msg) + return framework.NewStatus(framework.Error, msg) } } return nil } -func (f *framework) runPreFilterPlugin(ctx context.Context, pl PreFilterPlugin, state *CycleState, pod *v1.Pod) *Status { +func (f *frameworkImpl) runPreFilterPlugin(ctx context.Context, pl framework.PreFilterPlugin, state *framework.CycleState, pod *v1.Pod) *framework.Status { if !state.ShouldRecordPluginMetrics() { return pl.PreFilter(ctx, state, pod) } @@ -348,13 +419,13 @@ func (f *framework) runPreFilterPlugin(ctx context.Context, pl PreFilterPlugin, // RunPreFilterExtensionAddPod calls the AddPod interface for the set of configured // PreFilter plugins. It returns directly if any of the plugins return any // status other than Success. -func (f *framework) RunPreFilterExtensionAddPod( +func (f *frameworkImpl) RunPreFilterExtensionAddPod( ctx context.Context, - state *CycleState, + state *framework.CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, - nodeInfo *schedulernodeinfo.NodeInfo, -) (status *Status) { + nodeInfo *framework.NodeInfo, +) (status *framework.Status) { for _, pl := range f.preFilterPlugins { if pl.PreFilterExtensions() == nil { continue @@ -364,14 +435,14 @@ func (f *framework) RunPreFilterExtensionAddPod( msg := fmt.Sprintf("error while running AddPod for plugin %q while scheduling pod %q: %v", pl.Name(), podToSchedule.Name, status.Message()) klog.Error(msg) - return NewStatus(Error, msg) + return framework.NewStatus(framework.Error, msg) } } return nil } -func (f *framework) runPreFilterExtensionAddPod(ctx context.Context, pl PreFilterPlugin, state *CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *Status { +func (f *frameworkImpl) runPreFilterExtensionAddPod(ctx context.Context, pl framework.PreFilterPlugin, state *framework.CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { if !state.ShouldRecordPluginMetrics() { return pl.PreFilterExtensions().AddPod(ctx, state, podToSchedule, podToAdd, nodeInfo) } @@ -384,13 +455,13 @@ func (f *framework) runPreFilterExtensionAddPod(ctx context.Context, pl PreFilte // RunPreFilterExtensionRemovePod calls the RemovePod interface for the set of configured // PreFilter plugins. It returns directly if any of the plugins return any // status other than Success. -func (f *framework) RunPreFilterExtensionRemovePod( +func (f *frameworkImpl) RunPreFilterExtensionRemovePod( ctx context.Context, - state *CycleState, + state *framework.CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, - nodeInfo *schedulernodeinfo.NodeInfo, -) (status *Status) { + nodeInfo *framework.NodeInfo, +) (status *framework.Status) { for _, pl := range f.preFilterPlugins { if pl.PreFilterExtensions() == nil { continue @@ -400,14 +471,14 @@ func (f *framework) RunPreFilterExtensionRemovePod( msg := fmt.Sprintf("error while running RemovePod for plugin %q while scheduling pod %q: %v", pl.Name(), podToSchedule.Name, status.Message()) klog.Error(msg) - return NewStatus(Error, msg) + return framework.NewStatus(framework.Error, msg) } } return nil } -func (f *framework) runPreFilterExtensionRemovePod(ctx context.Context, pl PreFilterPlugin, state *CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *Status { +func (f *frameworkImpl) runPreFilterExtensionRemovePod(ctx context.Context, pl framework.PreFilterPlugin, state *framework.CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { if !state.ShouldRecordPluginMetrics() { return pl.PreFilterExtensions().RemovePod(ctx, state, podToSchedule, podToAdd, nodeInfo) } @@ -421,25 +492,21 @@ func (f *framework) runPreFilterExtensionRemovePod(ctx context.Context, pl PreFi // the given node. If any of these plugins doesn't return "Success", the // given node is not suitable for running pod. // Meanwhile, the failure message and status are set for the given node. -func (f *framework) RunFilterPlugins( +func (f *frameworkImpl) RunFilterPlugins( ctx context.Context, - state *CycleState, + state *framework.CycleState, pod *v1.Pod, - nodeInfo *schedulernodeinfo.NodeInfo, -) PluginToStatus { - var firstFailedStatus *Status - statuses := make(PluginToStatus) + nodeInfo *framework.NodeInfo, +) framework.PluginToStatus { + statuses := make(framework.PluginToStatus) for _, pl := range f.filterPlugins { pluginStatus := f.runFilterPlugin(ctx, pl, state, pod, nodeInfo) - if len(statuses) == 0 { - firstFailedStatus = pluginStatus - } if !pluginStatus.IsSuccess() { if !pluginStatus.IsUnschedulable() { // Filter plugins are not supposed to return any status other than // Success or Unschedulable. - firstFailedStatus = NewStatus(Error, fmt.Sprintf("running %q filter plugin for pod %q: %v", pl.Name(), pod.Name, pluginStatus.Message())) - return map[string]*Status{pl.Name(): firstFailedStatus} + errStatus := framework.NewStatus(framework.Error, fmt.Sprintf("running %q filter plugin for pod %q: %v", pl.Name(), pod.Name, pluginStatus.Message())) + return map[string]*framework.Status{pl.Name(): errStatus} } statuses[pl.Name()] = pluginStatus if !f.runAllFilters { @@ -452,7 +519,7 @@ func (f *framework) RunFilterPlugins( return statuses } -func (f *framework) runFilterPlugin(ctx context.Context, pl FilterPlugin, state *CycleState, pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *Status { +func (f *frameworkImpl) runFilterPlugin(ctx context.Context, pl framework.FilterPlugin, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status { if !state.ShouldRecordPluginMetrics() { return pl.Filter(ctx, state, pod, nodeInfo) } @@ -462,31 +529,64 @@ func (f *framework) runFilterPlugin(ctx context.Context, pl FilterPlugin, state return status } -// RunPreScorePlugins runs the set of configured pre-score plugins. If any -// of these plugins returns any status other than "Success", the given pod is rejected. -func (f *framework) RunPreScorePlugins( - ctx context.Context, - state *CycleState, - pod *v1.Pod, - nodes []*v1.Node, -) (status *Status) { +// RunPostFilterPlugins runs the set of configured PostFilter plugins until the first +// Success or Error is met, otherwise continues to execute all plugins. +func (f *frameworkImpl) RunPostFilterPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, filteredNodeStatusMap framework.NodeToStatusMap) (_ *framework.PostFilterResult, status *framework.Status) { startTime := time.Now() defer func() { - metrics.FrameworkExtensionPointDuration.WithLabelValues(preScore, status.Code().String()).Observe(metrics.SinceInSeconds(startTime)) + metrics.FrameworkExtensionPointDuration.WithLabelValues(postFilter, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) + }() + + statuses := make(framework.PluginToStatus) + for _, pl := range f.postFilterPlugins { + r, s := f.runPostFilterPlugin(ctx, pl, state, pod, filteredNodeStatusMap) + if s.IsSuccess() { + return r, s + } else if !s.IsUnschedulable() { + // Any status other than Success or Unschedulable is Error. + return nil, framework.NewStatus(framework.Error, s.Message()) + } + statuses[pl.Name()] = s + } + + return nil, statuses.Merge() +} + +func (f *frameworkImpl) runPostFilterPlugin(ctx context.Context, pl framework.PostFilterPlugin, state *framework.CycleState, pod *v1.Pod, filteredNodeStatusMap framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status) { + if !state.ShouldRecordPluginMetrics() { + return pl.PostFilter(ctx, state, pod, filteredNodeStatusMap) + } + startTime := time.Now() + r, s := pl.PostFilter(ctx, state, pod, filteredNodeStatusMap) + f.metricsRecorder.observePluginDurationAsync(postFilter, pl.Name(), s, metrics.SinceInSeconds(startTime)) + return r, s +} + +// RunPreScorePlugins runs the set of configured pre-score plugins. If any +// of these plugins returns any status other than "Success", the given pod is rejected. +func (f *frameworkImpl) RunPreScorePlugins( + ctx context.Context, + state *framework.CycleState, + pod *v1.Pod, + nodes []*v1.Node, +) (status *framework.Status) { + startTime := time.Now() + defer func() { + metrics.FrameworkExtensionPointDuration.WithLabelValues(preScore, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) }() for _, pl := range f.preScorePlugins { status = f.runPreScorePlugin(ctx, pl, state, pod, nodes) if !status.IsSuccess() { msg := fmt.Sprintf("error while running %q prescore plugin for pod %q: %v", pl.Name(), pod.Name, status.Message()) klog.Error(msg) - return NewStatus(Error, msg) + return framework.NewStatus(framework.Error, msg) } } return nil } -func (f *framework) runPreScorePlugin(ctx context.Context, pl PreScorePlugin, state *CycleState, pod *v1.Pod, nodes []*v1.Node) *Status { +func (f *frameworkImpl) runPreScorePlugin(ctx context.Context, pl framework.PreScorePlugin, state *framework.CycleState, pod *v1.Pod, nodes []*v1.Node) *framework.Status { if !state.ShouldRecordPluginMetrics() { return pl.PreScore(ctx, state, pod, nodes) } @@ -500,20 +600,20 @@ func (f *framework) runPreScorePlugin(ctx context.Context, pl PreScorePlugin, st // stores for each scoring plugin name the corresponding NodeScoreList(s). // It also returns *Status, which is set to non-success if any of the plugins returns // a non-success status. -func (f *framework) RunScorePlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodes []*v1.Node) (ps PluginToNodeScores, status *Status) { +func (f *frameworkImpl) RunScorePlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodes []*v1.Node) (ps framework.PluginToNodeScores, status *framework.Status) { startTime := time.Now() defer func() { - metrics.FrameworkExtensionPointDuration.WithLabelValues(score, status.Code().String()).Observe(metrics.SinceInSeconds(startTime)) + metrics.FrameworkExtensionPointDuration.WithLabelValues(score, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) }() - pluginToNodeScores := make(PluginToNodeScores, len(f.scorePlugins)) + pluginToNodeScores := make(framework.PluginToNodeScores, len(f.scorePlugins)) for _, pl := range f.scorePlugins { - pluginToNodeScores[pl.Name()] = make(NodeScoreList, len(nodes)) + pluginToNodeScores[pl.Name()] = make(framework.NodeScoreList, len(nodes)) } ctx, cancel := context.WithCancel(ctx) - errCh := schedutil.NewErrorChannel() + errCh := parallelize.NewErrorChannel() // Run Score method for each node in parallel. - workqueue.ParallelizeUntil(ctx, 16, len(nodes), func(index int) { + parallelize.Until(ctx, len(nodes), func(index int) { for _, pl := range f.scorePlugins { nodeName := nodes[index].Name s, status := f.runScorePlugin(ctx, pl, state, pod, nodeName) @@ -521,7 +621,7 @@ func (f *framework) RunScorePlugins(ctx context.Context, state *CycleState, pod errCh.SendErrorWithCancel(fmt.Errorf(status.Message()), cancel) return } - pluginToNodeScores[pl.Name()][index] = NodeScore{ + pluginToNodeScores[pl.Name()][index] = framework.NodeScore{ Name: nodeName, Score: int64(s), } @@ -530,11 +630,11 @@ func (f *framework) RunScorePlugins(ctx context.Context, state *CycleState, pod if err := errCh.ReceiveError(); err != nil { msg := fmt.Sprintf("error while running score plugin for pod %q: %v", pod.Name, err) klog.Error(msg) - return nil, NewStatus(Error, msg) + return nil, framework.NewStatus(framework.Error, msg) } // Run NormalizeScore method for each ScorePlugin in parallel. - workqueue.ParallelizeUntil(ctx, 16, len(f.scorePlugins), func(index int) { + parallelize.Until(ctx, len(f.scorePlugins), func(index int) { pl := f.scorePlugins[index] nodeScoreList := pluginToNodeScores[pl.Name()] if pl.ScoreExtensions() == nil { @@ -550,11 +650,11 @@ func (f *framework) RunScorePlugins(ctx context.Context, state *CycleState, pod if err := errCh.ReceiveError(); err != nil { msg := fmt.Sprintf("error while running normalize score plugin for pod %q: %v", pod.Name, err) klog.Error(msg) - return nil, NewStatus(Error, msg) + return nil, framework.NewStatus(framework.Error, msg) } // Apply score defaultWeights for each ScorePlugin in parallel. - workqueue.ParallelizeUntil(ctx, 16, len(f.scorePlugins), func(index int) { + parallelize.Until(ctx, len(f.scorePlugins), func(index int) { pl := f.scorePlugins[index] // Score plugins' weight has been checked when they are initialized. weight := f.pluginNameToWeightMap[pl.Name()] @@ -562,8 +662,8 @@ func (f *framework) RunScorePlugins(ctx context.Context, state *CycleState, pod for i, nodeScore := range nodeScoreList { // return error if score plugin returns invalid score. - if nodeScore.Score > int64(MaxNodeScore) || nodeScore.Score < int64(MinNodeScore) { - err := fmt.Errorf("score plugin %q returns an invalid score %v, it should in the range of [%v, %v] after normalizing", pl.Name(), nodeScore.Score, MinNodeScore, MaxNodeScore) + if nodeScore.Score > int64(framework.MaxNodeScore) || nodeScore.Score < int64(framework.MinNodeScore) { + err := fmt.Errorf("score plugin %q returns an invalid score %v, it should in the range of [%v, %v] after normalizing", pl.Name(), nodeScore.Score, framework.MinNodeScore, framework.MaxNodeScore) errCh.SendErrorWithCancel(err, cancel) return } @@ -573,13 +673,13 @@ func (f *framework) RunScorePlugins(ctx context.Context, state *CycleState, pod if err := errCh.ReceiveError(); err != nil { msg := fmt.Sprintf("error while applying score defaultWeights for pod %q: %v", pod.Name, err) klog.Error(msg) - return nil, NewStatus(Error, msg) + return nil, framework.NewStatus(framework.Error, msg) } return pluginToNodeScores, nil } -func (f *framework) runScorePlugin(ctx context.Context, pl ScorePlugin, state *CycleState, pod *v1.Pod, nodeName string) (int64, *Status) { +func (f *frameworkImpl) runScorePlugin(ctx context.Context, pl framework.ScorePlugin, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) { if !state.ShouldRecordPluginMetrics() { return pl.Score(ctx, state, pod, nodeName) } @@ -589,7 +689,7 @@ func (f *framework) runScorePlugin(ctx context.Context, pl ScorePlugin, state *C return s, status } -func (f *framework) runScoreExtension(ctx context.Context, pl ScorePlugin, state *CycleState, pod *v1.Pod, nodeScoreList NodeScoreList) *Status { +func (f *frameworkImpl) runScoreExtension(ctx context.Context, pl framework.ScorePlugin, state *framework.CycleState, pod *v1.Pod, nodeScoreList framework.NodeScoreList) *framework.Status { if !state.ShouldRecordPluginMetrics() { return pl.ScoreExtensions().NormalizeScore(ctx, state, pod, nodeScoreList) } @@ -602,23 +702,23 @@ func (f *framework) runScoreExtension(ctx context.Context, pl ScorePlugin, state // RunPreBindPlugins runs the set of configured prebind plugins. It returns a // failure (bool) if any of the plugins returns an error. It also returns an // error containing the rejection message or the error occurred in the plugin. -func (f *framework) RunPreBindPlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodeName string) (status *Status) { +func (f *frameworkImpl) RunPreBindPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (status *framework.Status) { startTime := time.Now() defer func() { - metrics.FrameworkExtensionPointDuration.WithLabelValues(preBind, status.Code().String()).Observe(metrics.SinceInSeconds(startTime)) + metrics.FrameworkExtensionPointDuration.WithLabelValues(preBind, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) }() for _, pl := range f.preBindPlugins { status = f.runPreBindPlugin(ctx, pl, state, pod, nodeName) if !status.IsSuccess() { msg := fmt.Sprintf("error while running %q prebind plugin for pod %q: %v", pl.Name(), pod.Name, status.Message()) klog.Error(msg) - return NewStatus(Error, msg) + return framework.NewStatus(framework.Error, msg) } } return nil } -func (f *framework) runPreBindPlugin(ctx context.Context, pl PreBindPlugin, state *CycleState, pod *v1.Pod, nodeName string) *Status { +func (f *frameworkImpl) runPreBindPlugin(ctx context.Context, pl framework.PreBindPlugin, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status { if !state.ShouldRecordPluginMetrics() { return pl.PreBind(ctx, state, pod, nodeName) } @@ -629,30 +729,30 @@ func (f *framework) runPreBindPlugin(ctx context.Context, pl PreBindPlugin, stat } // RunBindPlugins runs the set of configured bind plugins until one returns a non `Skip` status. -func (f *framework) RunBindPlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodeName string) (status *Status) { +func (f *frameworkImpl) RunBindPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (status *framework.Status) { startTime := time.Now() defer func() { - metrics.FrameworkExtensionPointDuration.WithLabelValues(bind, status.Code().String()).Observe(metrics.SinceInSeconds(startTime)) + metrics.FrameworkExtensionPointDuration.WithLabelValues(bind, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) }() if len(f.bindPlugins) == 0 { - return NewStatus(Skip, "") + return framework.NewStatus(framework.Skip, "") } for _, bp := range f.bindPlugins { status = f.runBindPlugin(ctx, bp, state, pod, nodeName) - if status != nil && status.Code() == Skip { + if status != nil && status.Code() == framework.Skip { continue } if !status.IsSuccess() { msg := fmt.Sprintf("plugin %q failed to bind pod \"%v/%v\": %v", bp.Name(), pod.Namespace, pod.Name, status.Message()) klog.Error(msg) - return NewStatus(Error, msg) + return framework.NewStatus(framework.Error, msg) } return status } return status } -func (f *framework) runBindPlugin(ctx context.Context, bp BindPlugin, state *CycleState, pod *v1.Pod, nodeName string) *Status { +func (f *frameworkImpl) runBindPlugin(ctx context.Context, bp framework.BindPlugin, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status { if !state.ShouldRecordPluginMetrics() { return bp.Bind(ctx, state, pod, nodeName) } @@ -663,17 +763,17 @@ func (f *framework) runBindPlugin(ctx context.Context, bp BindPlugin, state *Cyc } // RunPostBindPlugins runs the set of configured postbind plugins. -func (f *framework) RunPostBindPlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodeName string) { +func (f *frameworkImpl) RunPostBindPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) { startTime := time.Now() defer func() { - metrics.FrameworkExtensionPointDuration.WithLabelValues(postBind, Success.String()).Observe(metrics.SinceInSeconds(startTime)) + metrics.FrameworkExtensionPointDuration.WithLabelValues(postBind, framework.Success.String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) }() for _, pl := range f.postBindPlugins { f.runPostBindPlugin(ctx, pl, state, pod, nodeName) } } -func (f *framework) runPostBindPlugin(ctx context.Context, pl PostBindPlugin, state *CycleState, pod *v1.Pod, nodeName string) { +func (f *frameworkImpl) runPostBindPlugin(ctx context.Context, pl framework.PostBindPlugin, state *framework.CycleState, pod *v1.Pod, nodeName string) { if !state.ShouldRecordPluginMetrics() { pl.PostBind(ctx, state, pod, nodeName) return @@ -683,26 +783,28 @@ func (f *framework) runPostBindPlugin(ctx context.Context, pl PostBindPlugin, st f.metricsRecorder.observePluginDurationAsync(postBind, pl.Name(), nil, metrics.SinceInSeconds(startTime)) } -// RunReservePlugins runs the set of configured reserve plugins. If any of these -// plugins returns an error, it does not continue running the remaining ones and -// returns the error. In such case, pod will not be scheduled. -func (f *framework) RunReservePlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodeName string) (status *Status) { +// RunReservePluginsReserve runs the Reserve method in the set of configured +// reserve plugins. If any of these plugins returns an error, it does not +// continue running the remaining ones and returns the error. In such a case, +// the pod will not be scheduled and the caller will be expected to call +// RunReservePluginsUnreserve. +func (f *frameworkImpl) RunReservePluginsReserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (status *framework.Status) { startTime := time.Now() defer func() { - metrics.FrameworkExtensionPointDuration.WithLabelValues(reserve, status.Code().String()).Observe(metrics.SinceInSeconds(startTime)) + metrics.FrameworkExtensionPointDuration.WithLabelValues(reserve, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) }() for _, pl := range f.reservePlugins { - status = f.runReservePlugin(ctx, pl, state, pod, nodeName) + status = f.runReservePluginReserve(ctx, pl, state, pod, nodeName) if !status.IsSuccess() { - msg := fmt.Sprintf("error while running %q reserve plugin for pod %q: %v", pl.Name(), pod.Name, status.Message()) + msg := fmt.Sprintf("error while running Reserve in %q reserve plugin for pod %q: %v", pl.Name(), pod.Name, status.Message()) klog.Error(msg) - return NewStatus(Error, msg) + return framework.NewStatus(framework.Error, msg) } } return nil } -func (f *framework) runReservePlugin(ctx context.Context, pl ReservePlugin, state *CycleState, pod *v1.Pod, nodeName string) *Status { +func (f *frameworkImpl) runReservePluginReserve(ctx context.Context, pl framework.ReservePlugin, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status { if !state.ShouldRecordPluginMetrics() { return pl.Reserve(ctx, state, pod, nodeName) } @@ -712,18 +814,21 @@ func (f *framework) runReservePlugin(ctx context.Context, pl ReservePlugin, stat return status } -// RunUnreservePlugins runs the set of configured unreserve plugins. -func (f *framework) RunUnreservePlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodeName string) { +// RunReservePluginsUnreserve runs the Unreserve method in the set of +// configured reserve plugins. +func (f *frameworkImpl) RunReservePluginsUnreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) { startTime := time.Now() defer func() { - metrics.FrameworkExtensionPointDuration.WithLabelValues(unreserve, Success.String()).Observe(metrics.SinceInSeconds(startTime)) + metrics.FrameworkExtensionPointDuration.WithLabelValues(unreserve, framework.Success.String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) }() - for _, pl := range f.unreservePlugins { - f.runUnreservePlugin(ctx, pl, state, pod, nodeName) + // Execute the Unreserve operation of each reserve plugin in the + // *reverse* order in which the Reserve operation was executed. + for i := len(f.reservePlugins) - 1; i >= 0; i-- { + f.runReservePluginUnreserve(ctx, f.reservePlugins[i], state, pod, nodeName) } } -func (f *framework) runUnreservePlugin(ctx context.Context, pl UnreservePlugin, state *CycleState, pod *v1.Pod, nodeName string) { +func (f *frameworkImpl) runReservePluginUnreserve(ctx context.Context, pl framework.ReservePlugin, state *framework.CycleState, pod *v1.Pod, nodeName string) { if !state.ShouldRecordPluginMetrics() { pl.Unreserve(ctx, state, pod, nodeName) return @@ -739,46 +844,46 @@ func (f *framework) runUnreservePlugin(ctx context.Context, pl UnreservePlugin, // plugins returns "Wait", then this function will create and add waiting pod // to a map of currently waiting pods and return status with "Wait" code. // Pod will remain waiting pod for the minimum duration returned by the permit plugins. -func (f *framework) RunPermitPlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodeName string) (status *Status) { +func (f *frameworkImpl) RunPermitPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (status *framework.Status) { startTime := time.Now() defer func() { - metrics.FrameworkExtensionPointDuration.WithLabelValues(permit, status.Code().String()).Observe(metrics.SinceInSeconds(startTime)) + metrics.FrameworkExtensionPointDuration.WithLabelValues(permit, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) }() pluginsWaitTime := make(map[string]time.Duration) - statusCode := Success + statusCode := framework.Success for _, pl := range f.permitPlugins { status, timeout := f.runPermitPlugin(ctx, pl, state, pod, nodeName) if !status.IsSuccess() { if status.IsUnschedulable() { msg := fmt.Sprintf("rejected pod %q by permit plugin %q: %v", pod.Name, pl.Name(), status.Message()) klog.V(4).Infof(msg) - return NewStatus(status.Code(), msg) + return framework.NewStatus(status.Code(), msg) } - if status.Code() == Wait { + if status.Code() == framework.Wait { // Not allowed to be greater than maxTimeout. if timeout > maxTimeout { timeout = maxTimeout } pluginsWaitTime[pl.Name()] = timeout - statusCode = Wait + statusCode = framework.Wait } else { msg := fmt.Sprintf("error while running %q permit plugin for pod %q: %v", pl.Name(), pod.Name, status.Message()) klog.Error(msg) - return NewStatus(Error, msg) + return framework.NewStatus(framework.Error, msg) } } } - if statusCode == Wait { + if statusCode == framework.Wait { waitingPod := newWaitingPod(pod, pluginsWaitTime) f.waitingPods.add(waitingPod) msg := fmt.Sprintf("one or more plugins asked to wait and no plugin rejected pod %q", pod.Name) klog.V(4).Infof(msg) - return NewStatus(Wait, msg) + return framework.NewStatus(framework.Wait, msg) } return nil } -func (f *framework) runPermitPlugin(ctx context.Context, pl PermitPlugin, state *CycleState, pod *v1.Pod, nodeName string) (*Status, time.Duration) { +func (f *frameworkImpl) runPermitPlugin(ctx context.Context, pl framework.PermitPlugin, state *framework.CycleState, pod *v1.Pod, nodeName string) (*framework.Status, time.Duration) { if !state.ShouldRecordPluginMetrics() { return pl.Permit(ctx, state, pod, nodeName) } @@ -789,7 +894,7 @@ func (f *framework) runPermitPlugin(ctx context.Context, pl PermitPlugin, state } // WaitOnPermit will block, if the pod is a waiting pod, until the waiting pod is rejected or allowed. -func (f *framework) WaitOnPermit(ctx context.Context, pod *v1.Pod) (status *Status) { +func (f *frameworkImpl) WaitOnPermit(ctx context.Context, pod *v1.Pod) (status *framework.Status) { waitingPod := f.waitingPods.get(pod.UID) if waitingPod == nil { return nil @@ -805,11 +910,11 @@ func (f *framework) WaitOnPermit(ctx context.Context, pod *v1.Pod) (status *Stat if s.IsUnschedulable() { msg := fmt.Sprintf("pod %q rejected while waiting on permit: %v", pod.Name, s.Message()) klog.V(4).Infof(msg) - return NewStatus(s.Code(), msg) + return framework.NewStatus(s.Code(), msg) } msg := fmt.Sprintf("error received while waiting on permit for pod %q: %v", pod.Name, s.Message()) klog.Error(msg) - return NewStatus(Error, msg) + return framework.NewStatus(framework.Error, msg) } return nil } @@ -818,17 +923,17 @@ func (f *framework) WaitOnPermit(ctx context.Context, pod *v1.Pod) (status *Stat // snapshot. The snapshot is taken at the beginning of a scheduling cycle and remains // unchanged until a pod finishes "Reserve". There is no guarantee that the information // remains unchanged after "Reserve". -func (f *framework) SnapshotSharedLister() schedulerlisters.SharedLister { +func (f *frameworkImpl) SnapshotSharedLister() framework.SharedLister { return f.snapshotSharedLister } // IterateOverWaitingPods acquires a read lock and iterates over the WaitingPods map. -func (f *framework) IterateOverWaitingPods(callback func(WaitingPod)) { +func (f *frameworkImpl) IterateOverWaitingPods(callback func(framework.WaitingPod)) { f.waitingPods.iterate(callback) } // GetWaitingPod returns a reference to a WaitingPod given its UID. -func (f *framework) GetWaitingPod(uid types.UID) WaitingPod { +func (f *frameworkImpl) GetWaitingPod(uid types.UID) framework.WaitingPod { if wp := f.waitingPods.get(uid); wp != nil { return wp } @@ -836,7 +941,7 @@ func (f *framework) GetWaitingPod(uid types.UID) WaitingPod { } // RejectWaitingPod rejects a WaitingPod given its UID. -func (f *framework) RejectWaitingPod(uid types.UID) { +func (f *frameworkImpl) RejectWaitingPod(uid types.UID) { waitingPod := f.waitingPods.get(uid) if waitingPod != nil { waitingPod.Reject("removed") @@ -844,18 +949,23 @@ func (f *framework) RejectWaitingPod(uid types.UID) { } // HasFilterPlugins returns true if at least one filter plugin is defined. -func (f *framework) HasFilterPlugins() bool { +func (f *frameworkImpl) HasFilterPlugins() bool { return len(f.filterPlugins) > 0 } +// HasPostFilterPlugins returns true if at least one postFilter plugin is defined. +func (f *frameworkImpl) HasPostFilterPlugins() bool { + return len(f.postFilterPlugins) > 0 +} + // HasScorePlugins returns true if at least one score plugin is defined. -func (f *framework) HasScorePlugins() bool { +func (f *frameworkImpl) HasScorePlugins() bool { return len(f.scorePlugins) > 0 } // ListPlugins returns a map of extension point name to plugin names configured at each extension -// point. Returns nil if no plugins where configred. -func (f *framework) ListPlugins() map[string][]config.Plugin { +// point. Returns nil if no plugins where configured. +func (f *frameworkImpl) ListPlugins() map[string][]config.Plugin { m := make(map[string][]config.Plugin) for _, e := range f.getExtensionPoints(&config.Plugins{}) { @@ -863,7 +973,7 @@ func (f *framework) ListPlugins() map[string][]config.Plugin { extName := plugins.Type().Elem().Name() var cfgs []config.Plugin for i := 0; i < plugins.Len(); i++ { - name := plugins.Index(i).Interface().(Plugin).Name() + name := plugins.Index(i).Interface().(framework.Plugin).Name() p := config.Plugin{Name: name} if extName == "ScorePlugin" { // Weights apply only to score plugins. @@ -882,21 +992,21 @@ func (f *framework) ListPlugins() map[string][]config.Plugin { } // ClientSet returns a kubernetes clientset. -func (f *framework) ClientSet() clientset.Interface { +func (f *frameworkImpl) ClientSet() clientset.Interface { return f.clientSet } +// EventRecorder returns an event recorder. +func (f *frameworkImpl) EventRecorder() events.EventRecorder { + return f.eventRecorder +} + // SharedInformerFactory returns a shared informer factory. -func (f *framework) SharedInformerFactory() informers.SharedInformerFactory { +func (f *frameworkImpl) SharedInformerFactory() informers.SharedInformerFactory { return f.informerFactory } -// VolumeBinder returns the volume binder used by scheduler. -func (f *framework) VolumeBinder() scheduling.SchedulerVolumeBinder { - return f.volumeBinder -} - -func (f *framework) pluginsNeeded(plugins *config.Plugins) map[string]config.Plugin { +func (f *frameworkImpl) pluginsNeeded(plugins *config.Plugins) map[string]config.Plugin { pgMap := make(map[string]config.Plugin) if plugins == nil { @@ -916,3 +1026,8 @@ func (f *framework) pluginsNeeded(plugins *config.Plugins) map[string]config.Plu } return pgMap } + +// PreemptHandle returns the internal preemptHandle object. +func (f *frameworkImpl) PreemptHandle() framework.PreemptHandle { + return f.preemptHandle +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/metrics_recorder.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/metrics_recorder.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/metrics_recorder.go rename to vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/metrics_recorder.go index 7751b0def37..8454afa28d2 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/metrics_recorder.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/metrics_recorder.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package runtime import ( "time" k8smetrics "k8s.io/component-base/metrics" + "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" "k8s.io/kubernetes/pkg/scheduler/metrics" ) @@ -62,7 +63,7 @@ func newMetricsRecorder(bufferSize int, interval time.Duration) *metricsRecorder // observePluginDurationAsync observes the plugin_execution_duration_seconds metric. // The metric will be flushed to Prometheus asynchronously. -func (r *metricsRecorder) observePluginDurationAsync(extensionPoint, pluginName string, status *Status, value float64) { +func (r *metricsRecorder) observePluginDurationAsync(extensionPoint, pluginName string, status *v1alpha1.Status, value float64) { newMetric := &frameworkMetric{ metric: metrics.PluginExecutionDuration, labelValues: []string{pluginName, extensionPoint, status.Code().String()}, diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/registry.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/registry.go similarity index 84% rename from vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/registry.go rename to vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/registry.go index 39432f1e6fe..a1a1df45a6c 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/registry.go @@ -14,22 +14,30 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package runtime import ( "fmt" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/json" + "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" "sigs.k8s.io/yaml" ) // PluginFactory is a function that builds a plugin. -type PluginFactory = func(configuration *runtime.Unknown, f FrameworkHandle) (Plugin, error) +type PluginFactory = func(configuration runtime.Object, f v1alpha1.FrameworkHandle) (v1alpha1.Plugin, error) // DecodeInto decodes configuration whose type is *runtime.Unknown to the interface into. -func DecodeInto(configuration *runtime.Unknown, into interface{}) error { - if configuration == nil || configuration.Raw == nil { +func DecodeInto(obj runtime.Object, into interface{}) error { + if obj == nil { + return nil + } + configuration, ok := obj.(*runtime.Unknown) + if !ok { + return fmt.Errorf("want args of type runtime.Unknown, got %T", obj) + } + if configuration.Raw == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/waiting_pods_map.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/waiting_pods_map.go similarity index 91% rename from vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/waiting_pods_map.go rename to vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/waiting_pods_map.go index 28c58c40635..25cde8f06dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/waiting_pods_map.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/waiting_pods_map.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package runtime import ( "fmt" @@ -23,6 +23,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) // waitingPodsMap a thread-safe map used to maintain pods waiting in the permit phase. @@ -60,7 +61,7 @@ func (m *waitingPodsMap) get(uid types.UID) *waitingPod { } // iterate acquires a read lock and iterates over the WaitingPods map. -func (m *waitingPodsMap) iterate(callback func(WaitingPod)) { +func (m *waitingPodsMap) iterate(callback func(v1alpha1.WaitingPod)) { m.mu.RLock() defer m.mu.RUnlock() for _, v := range m.pods { @@ -72,11 +73,11 @@ func (m *waitingPodsMap) iterate(callback func(WaitingPod)) { type waitingPod struct { pod *v1.Pod pendingPlugins map[string]*time.Timer - s chan *Status + s chan *v1alpha1.Status mu sync.RWMutex } -var _ WaitingPod = &waitingPod{} +var _ v1alpha1.WaitingPod = &waitingPod{} // newWaitingPod returns a new waitingPod instance. func newWaitingPod(pod *v1.Pod, pluginsMaxWaitTime map[string]time.Duration) *waitingPod { @@ -86,7 +87,7 @@ func newWaitingPod(pod *v1.Pod, pluginsMaxWaitTime map[string]time.Duration) *wa // by using non-blocking send to this channel. This channel has a buffer of size 1 // to ensure that non-blocking send will not be ignored - possible situation when // receiving from this channel happens after non-blocking send. - s: make(chan *Status, 1), + s: make(chan *v1alpha1.Status, 1), } wp.pendingPlugins = make(map[string]*time.Timer, len(pluginsMaxWaitTime)) @@ -142,7 +143,7 @@ func (w *waitingPod) Allow(pluginName string) { // The select clause works as a non-blocking send. // If there is no receiver, it's a no-op (default case). select { - case w.s <- NewStatus(Success, ""): + case w.s <- v1alpha1.NewStatus(v1alpha1.Success, ""): default: } } @@ -158,7 +159,7 @@ func (w *waitingPod) Reject(msg string) { // The select clause works as a non-blocking send. // If there is no receiver, it's a no-op (default case). select { - case w.s <- NewStatus(Unschedulable, msg): + case w.s <- v1alpha1.NewStatus(v1alpha1.Unschedulable, msg): default: } } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/BUILD index 4a03bc53cca..bb970d6311d 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/BUILD @@ -4,32 +4,30 @@ go_library( name = "go_default_library", srcs = [ "cycle_state.go", - "framework.go", + "extender.go", "interface.go", - "metrics_recorder.go", - "registry.go", - "waiting_pods_map.go", + "listers.go", + "types.go", ], importpath = "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1", visibility = ["//visibility:public"], deps = [ - "//pkg/controller/volume/scheduling:go_default_library", + "//pkg/apis/core/v1/helper:go_default_library", + "//pkg/features:go_default_library", "//pkg/scheduler/apis/config:go_default_library", - "//pkg/scheduler/listers:go_default_library", - "//pkg/scheduler/metrics:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//pkg/scheduler/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/json:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", - "//staging/src/k8s.io/component-base/metrics:go_default_library", - "//vendor/k8s.io/klog:go_default_library", - "//vendor/sigs.k8s.io/yaml:go_default_library", + "//staging/src/k8s.io/client-go/tools/events:go_default_library", + "//staging/src/k8s.io/kube-scheduler/extender/v1:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -42,7 +40,10 @@ filegroup( filegroup( name = "all-srcs", - srcs = [":package-srcs"], + srcs = [ + ":package-srcs", + "//pkg/scheduler/framework/v1alpha1/fake:all-srcs", + ], tags = ["automanaged"], visibility = ["//visibility:public"], ) @@ -51,20 +52,14 @@ go_test( name = "go_default_test", srcs = [ "cycle_state_test.go", - "framework_test.go", "interface_test.go", - "registry_test.go", + "types_test.go", ], embed = [":go_default_library"], deps = [ - "//pkg/scheduler/apis/config:go_default_library", - "//pkg/scheduler/metrics:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/github.com/prometheus/client_model/go:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/extender.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/extender.go new file mode 100644 index 00000000000..4118394391a --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/extender.go @@ -0,0 +1,70 @@ +/* +Copyright 2020 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 v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" + extenderv1 "k8s.io/kube-scheduler/extender/v1" +) + +// Extender is an interface for external processes to influence scheduling +// decisions made by Kubernetes. This is typically needed for resources not directly +// managed by Kubernetes. +type Extender interface { + // Name returns a unique name that identifies the extender. + Name() string + + // Filter based on extender-implemented predicate functions. The filtered list is + // expected to be a subset of the supplied list. failedNodesMap optionally contains + // the list of failed nodes and failure reasons. + Filter(pod *v1.Pod, nodes []*v1.Node) (filteredNodes []*v1.Node, failedNodesMap extenderv1.FailedNodesMap, err error) + + // Prioritize based on extender-implemented priority functions. The returned scores & weight + // are used to compute the weighted score for an extender. The weighted scores are added to + // the scores computed by Kubernetes scheduler. The total scores are used to do the host selection. + Prioritize(pod *v1.Pod, nodes []*v1.Node) (hostPriorities *extenderv1.HostPriorityList, weight int64, err error) + + // Bind delegates the action of binding a pod to a node to the extender. + Bind(binding *v1.Binding) error + + // IsBinder returns whether this extender is configured for the Bind method. + IsBinder() bool + + // IsInterested returns true if at least one extended resource requested by + // this pod is managed by this extender. + IsInterested(pod *v1.Pod) bool + + // ProcessPreemption returns nodes with their victim pods processed by extender based on + // given: + // 1. Pod to schedule + // 2. Candidate nodes and victim pods (nodeNameToVictims) generated by previous scheduling process. + // The possible changes made by extender may include: + // 1. Subset of given candidate nodes after preemption phase of extender. + // 2. A different set of victim pod for every given candidate node after preemption phase of extender. + ProcessPreemption( + pod *v1.Pod, + nodeNameToVictims map[string]*extenderv1.Victims, + nodeInfos NodeInfoLister, + ) (map[string]*extenderv1.Victims, error) + + // SupportsPreemption returns if the scheduler extender support preemption or not. + SupportsPreemption() bool + + // IsIgnorable returns true indicates scheduling should not fail when this extender + // is unavailable. This gives scheduler ability to fail fast and tolerate non-critical extenders as well. + IsIgnorable() bool +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/interface.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/interface.go index 85ec941bec6..8427f9b7f7f 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/interface.go @@ -29,10 +29,8 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/informers" clientset "k8s.io/client-go/kubernetes" - "k8s.io/kubernetes/pkg/controller/volume/scheduling" + "k8s.io/client-go/tools/events" "k8s.io/kubernetes/pkg/scheduler/apis/config" - schedulerlisters "k8s.io/kubernetes/pkg/scheduler/listers" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) // NodeScoreList declares a list of nodes and their scores. @@ -212,34 +210,8 @@ type Plugin interface { Name() string } -// PodInfo is a wrapper to a Pod with additional information for purposes such as tracking -// the timestamp when it's added to the queue or recording per-pod metrics. -type PodInfo struct { - Pod *v1.Pod - // The time pod added to the scheduling queue. - Timestamp time.Time - // Number of schedule attempts before successfully scheduled. - // It's used to record the # attempts metric. - Attempts int - // The time when the pod is added to the queue for the first time. The pod may be added - // back to the queue multiple times before it's successfully scheduled. - // It shouldn't be updated once initialized. It's used to record the e2e scheduling - // latency for a pod. - InitialAttemptTimestamp time.Time -} - -// DeepCopy returns a deep copy of the PodInfo object. -func (podInfo *PodInfo) DeepCopy() *PodInfo { - return &PodInfo{ - Pod: podInfo.Pod.DeepCopy(), - Timestamp: podInfo.Timestamp, - Attempts: podInfo.Attempts, - InitialAttemptTimestamp: podInfo.InitialAttemptTimestamp, - } -} - // LessFunc is the function to sort pod info -type LessFunc func(podInfo1, podInfo2 *PodInfo) bool +type LessFunc func(podInfo1, podInfo2 *QueuedPodInfo) bool // QueueSortPlugin is an interface that must be implemented by "QueueSort" plugins. // These plugins are used to sort pods in the scheduling queue. Only one queue sort @@ -247,7 +219,7 @@ type LessFunc func(podInfo1, podInfo2 *PodInfo) bool type QueueSortPlugin interface { Plugin // Less are used to sort pods in the scheduling queue. - Less(*PodInfo, *PodInfo) bool + Less(*QueuedPodInfo, *QueuedPodInfo) bool } // PreFilterExtensions is an interface that is included in plugins that allow specifying @@ -256,10 +228,10 @@ type QueueSortPlugin interface { type PreFilterExtensions interface { // AddPod is called by the framework while trying to evaluate the impact // of adding podToAdd to the node while scheduling podToSchedule. - AddPod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *Status + AddPod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *NodeInfo) *Status // RemovePod is called by the framework while trying to evaluate the impact // of removing podToRemove from the node while scheduling podToSchedule. - RemovePod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *Status + RemovePod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo *NodeInfo) *Status } // PreFilterPlugin is an interface that must be implemented by "prefilter" plugins. @@ -299,7 +271,24 @@ type FilterPlugin interface { // For example, during preemption, we may pass a copy of the original // nodeInfo object that has some pods removed from it to evaluate the // possibility of preempting them to schedule the target pod. - Filter(ctx context.Context, state *CycleState, pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *Status + Filter(ctx context.Context, state *CycleState, pod *v1.Pod, nodeInfo *NodeInfo) *Status +} + +// PostFilterPlugin is an interface for PostFilter plugins. These plugins are called +// after a pod cannot be scheduled. +type PostFilterPlugin interface { + Plugin + // PostFilter is called by the scheduling framework. + // A PostFilter plugin should return one of the following statuses: + // - Unschedulable: the plugin gets executed successfully but the pod cannot be made schedulable. + // - Success: the plugin gets executed successfully and the pod can be made schedulable. + // - Error: the plugin aborts due to some internal error. + // + // Informational plugins should be configured ahead of other ones, and always return Unschedulable status. + // Optionally, a non-nil PostFilterResult may be returned along with a Success status. For example, + // a preemption plugin may choose to return nominatedNodeName, so that framework can reuse that to update the + // preemptor pod's .spec.status.nominatedNodeName field. + PostFilter(ctx context.Context, state *CycleState, pod *v1.Pod, filteredNodeStatusMap NodeToStatusMap) (*PostFilterResult, *Status) } // PreScorePlugin is an interface for Pre-score plugin. Pre-score is an @@ -335,17 +324,24 @@ type ScorePlugin interface { ScoreExtensions() ScoreExtensions } -// ReservePlugin is an interface for Reserve plugins. These plugins are called -// at the reservation point. These are meant to update the state of the plugin. -// This concept used to be called 'assume' in the original scheduler. -// These plugins should return only Success or Error in Status.code. However, -// the scheduler accepts other valid codes as well. Anything other than Success -// will lead to rejection of the pod. +// ReservePlugin is an interface for plugins with Reserve and Unreserve +// methods. These are meant to update the state of the plugin. This concept +// used to be called 'assume' in the original scheduler. These plugins should +// return only Success or Error in Status.code. However, the scheduler accepts +// other valid codes as well. Anything other than Success will lead to +// rejection of the pod. type ReservePlugin interface { Plugin // Reserve is called by the scheduling framework when the scheduler cache is - // updated. + // updated. If this method returns a failed Status, the scheduler will call + // the Unreserve method for all enabled ReservePlugins. Reserve(ctx context.Context, state *CycleState, p *v1.Pod, nodeName string) *Status + // Unreserve is called by the scheduling framework when a reserved pod was + // rejected, an error occurred during reservation of subsequent plugins, or + // in a later phase. The Unreserve method implementation must be idempotent + // and may be called by the scheduler even if the corresponding Reserve + // method for the same plugin was not called. + Unreserve(ctx context.Context, state *CycleState, p *v1.Pod, nodeName string) } // PreBindPlugin is an interface that must be implemented by "prebind" plugins. @@ -368,17 +364,6 @@ type PostBindPlugin interface { PostBind(ctx context.Context, state *CycleState, p *v1.Pod, nodeName string) } -// UnreservePlugin is an interface for Unreserve plugins. This is an informational -// extension point. If a pod was reserved and then rejected in a later phase, then -// un-reserve plugins will be notified. Un-reserve plugins should clean up state -// associated with the reserved Pod. -type UnreservePlugin interface { - Plugin - // Unreserve is called by the scheduling framework when a reserved pod was - // rejected in a later phase. - Unreserve(ctx context.Context, state *CycleState, p *v1.Pod, nodeName string) -} - // PermitPlugin is an interface that must be implemented by "permit" plugins. // These plugins are called before a pod is bound to a node. type PermitPlugin interface { @@ -425,17 +410,23 @@ type Framework interface { // preemption, we may pass a copy of the original nodeInfo object that has some pods // removed from it to evaluate the possibility of preempting them to // schedule the target pod. - RunFilterPlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) PluginToStatus + RunFilterPlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodeInfo *NodeInfo) PluginToStatus + + // RunPostFilterPlugins runs the set of configured PostFilter plugins. + // PostFilter plugins can either be informational, in which case should be configured + // to execute first and return Unschedulable status, or ones that try to change the + // cluster state to make the pod potentially schedulable in a future scheduling cycle. + RunPostFilterPlugins(ctx context.Context, state *CycleState, pod *v1.Pod, filteredNodeStatusMap NodeToStatusMap) (*PostFilterResult, *Status) // RunPreFilterExtensionAddPod calls the AddPod interface for the set of configured // PreFilter plugins. It returns directly if any of the plugins return any // status other than Success. - RunPreFilterExtensionAddPod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *Status + RunPreFilterExtensionAddPod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *NodeInfo) *Status // RunPreFilterExtensionRemovePod calls the RemovePod interface for the set of configured // PreFilter plugins. It returns directly if any of the plugins return any // status other than Success. - RunPreFilterExtensionRemovePod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *Status + RunPreFilterExtensionRemovePod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *NodeInfo) *Status // RunPreScorePlugins runs the set of configured pre-score plugins. If any // of these plugins returns any status other than "Success", the given pod is rejected. @@ -457,13 +448,15 @@ type Framework interface { // RunPostBindPlugins runs the set of configured postbind plugins. RunPostBindPlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodeName string) - // RunReservePlugins runs the set of configured reserve plugins. If any of these - // plugins returns an error, it does not continue running the remaining ones and - // returns the error. In such case, pod will not be scheduled. - RunReservePlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodeName string) *Status + // RunReservePluginsReserve runs the Reserve method of the set of + // configured reserve plugins. If any of these calls returns an error, it + // does not continue running the remaining ones and returns the error. In + // such case, pod will not be scheduled. + RunReservePluginsReserve(ctx context.Context, state *CycleState, pod *v1.Pod, nodeName string) *Status - // RunUnreservePlugins runs the set of configured unreserve plugins. - RunUnreservePlugins(ctx context.Context, state *CycleState, pod *v1.Pod, nodeName string) + // RunReservePluginsUnreserve runs the Unreserve method of the set of + // configured reserve plugins. + RunReservePluginsUnreserve(ctx context.Context, state *CycleState, pod *v1.Pod, nodeName string) // RunPermitPlugins runs the set of configured permit plugins. If any of these // plugins returns a status other than "Success" or "Wait", it does not continue @@ -486,6 +479,9 @@ type Framework interface { // HasFilterPlugins returns true if at least one filter plugin is defined. HasFilterPlugins() bool + // HasPostFilterPlugins returns true if at least one postFilter plugin is defined. + HasPostFilterPlugins() bool + // HasScorePlugins returns true if at least one score plugin is defined. HasScorePlugins() bool @@ -504,7 +500,7 @@ type FrameworkHandle interface { // cycle (pre-bind/bind/post-bind/un-reserve plugin) should not use it, // otherwise a concurrent read/write error might occur, they should use scheduler // cache instead. - SnapshotSharedLister() schedulerlisters.SharedLister + SnapshotSharedLister() SharedLister // IterateOverWaitingPods acquires a read lock and iterates over the WaitingPods map. IterateOverWaitingPods(callback func(WaitingPod)) @@ -518,8 +514,51 @@ type FrameworkHandle interface { // ClientSet returns a kubernetes clientSet. ClientSet() clientset.Interface + // EventRecorder returns an event recorder. + EventRecorder() events.EventRecorder + SharedInformerFactory() informers.SharedInformerFactory - // VolumeBinder returns the volume binder used by scheduler. - VolumeBinder() scheduling.SchedulerVolumeBinder + // TODO: unroll the wrapped interfaces to FrameworkHandle. + PreemptHandle() PreemptHandle +} + +// PostFilterResult wraps needed info for scheduler framework to act upon PostFilter phase. +type PostFilterResult struct { + NominatedNodeName string +} + +// PreemptHandle incorporates all needed logic to run preemption logic. +type PreemptHandle interface { + // PodNominator abstracts operations to maintain nominated Pods. + PodNominator + // PluginsRunner abstracts operations to run some plugins. + PluginsRunner + // Extenders returns registered scheduler extenders. + Extenders() []Extender +} + +// PodNominator abstracts operations to maintain nominated Pods. +type PodNominator interface { + // AddNominatedPod adds the given pod to the nominated pod map or + // updates it if it already exists. + AddNominatedPod(pod *v1.Pod, nodeName string) + // DeleteNominatedPodIfExists deletes nominatedPod from internal cache. It's a no-op if it doesn't exist. + DeleteNominatedPodIfExists(pod *v1.Pod) + // UpdateNominatedPod updates the with . + UpdateNominatedPod(oldPod, newPod *v1.Pod) + // NominatedPodsForNode returns nominatedPods on the given node. + NominatedPodsForNode(nodeName string) []*v1.Pod +} + +// PluginsRunner abstracts operations to run some plugins. +// This is used by preemption PostFilter plugins when evaluating the feasibility of +// scheduling the pod on nodes when certain running pods get evicted. +type PluginsRunner interface { + // RunFilterPlugins runs the set of configured filter plugins for pod on the given node. + RunFilterPlugins(context.Context, *CycleState, *v1.Pod, *NodeInfo) PluginToStatus + // RunPreFilterExtensionAddPod calls the AddPod interface for the set of configured PreFilter plugins. + RunPreFilterExtensionAddPod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToAdd *v1.Pod, nodeInfo *NodeInfo) *Status + // RunPreFilterExtensionRemovePod calls the RemovePod interface for the set of configured PreFilter plugins. + RunPreFilterExtensionRemovePod(ctx context.Context, state *CycleState, podToSchedule *v1.Pod, podToRemove *v1.Pod, nodeInfo *NodeInfo) *Status } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/listers.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/listers.go new file mode 100644 index 00000000000..e6bc9b43db1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/listers.go @@ -0,0 +1,32 @@ +/* +Copyright 2019 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 v1alpha1 + +// NodeInfoLister interface represents anything that can list/get NodeInfo objects from node name. +type NodeInfoLister interface { + // Returns the list of NodeInfos. + List() ([]*NodeInfo, error) + // Returns the list of NodeInfos of nodes with pods with affinity terms. + HavePodsWithAffinityList() ([]*NodeInfo, error) + // Returns the NodeInfo of the given node name. + Get(nodeName string) (*NodeInfo, error) +} + +// SharedLister groups scheduler-specific listers. +type SharedLister interface { + NodeInfos() NodeInfoLister +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/nodeinfo/node_info.go b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/types.go similarity index 55% rename from vendor/k8s.io/kubernetes/pkg/scheduler/nodeinfo/node_info.go rename to vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/types.go index 085b65188c9..c878a7c9ffa 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/nodeinfo/node_info.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1/types.go @@ -14,27 +14,168 @@ See the License for the specific language governing permissions and limitations under the License. */ -package nodeinfo +package v1alpha1 import ( "errors" "fmt" "sync" "sync/atomic" + "time" - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/sets" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/features" schedutil "k8s.io/kubernetes/pkg/scheduler/util" ) -var ( - emptyResource = Resource{} - generation int64 -) +var generation int64 + +// QueuedPodInfo is a Pod wrapper with additional information related to +// the pod's status in the scheduling queue, such as the timestamp when +// it's added to the queue. +type QueuedPodInfo struct { + Pod *v1.Pod + // The time pod added to the scheduling queue. + Timestamp time.Time + // Number of schedule attempts before successfully scheduled. + // It's used to record the # attempts metric. + Attempts int + // The time when the pod is added to the queue for the first time. The pod may be added + // back to the queue multiple times before it's successfully scheduled. + // It shouldn't be updated once initialized. It's used to record the e2e scheduling + // latency for a pod. + InitialAttemptTimestamp time.Time +} + +// DeepCopy returns a deep copy of the QueuedPodInfo object. +func (pqi *QueuedPodInfo) DeepCopy() *QueuedPodInfo { + return &QueuedPodInfo{ + Pod: pqi.Pod.DeepCopy(), + Timestamp: pqi.Timestamp, + Attempts: pqi.Attempts, + InitialAttemptTimestamp: pqi.InitialAttemptTimestamp, + } +} + +// PodInfo is a wrapper to a Pod with additional pre-computed information to +// accelerate processing. This information is typically immutable (e.g., pre-processed +// inter-pod affinity selectors). +type PodInfo struct { + Pod *v1.Pod + RequiredAffinityTerms []AffinityTerm + RequiredAntiAffinityTerms []AffinityTerm + PreferredAffinityTerms []WeightedAffinityTerm + PreferredAntiAffinityTerms []WeightedAffinityTerm + ParseError error +} + +// AffinityTerm is a processed version of v1.PodAffinityTerm. +type AffinityTerm struct { + Namespaces sets.String + Selector labels.Selector + TopologyKey string +} + +// WeightedAffinityTerm is a "processed" representation of v1.WeightedAffinityTerm. +type WeightedAffinityTerm struct { + AffinityTerm + Weight int32 +} + +func newAffinityTerm(pod *v1.Pod, term *v1.PodAffinityTerm) (*AffinityTerm, error) { + namespaces := schedutil.GetNamespacesFromPodAffinityTerm(pod, term) + selector, err := metav1.LabelSelectorAsSelector(term.LabelSelector) + if err != nil { + return nil, err + } + return &AffinityTerm{Namespaces: namespaces, Selector: selector, TopologyKey: term.TopologyKey}, nil +} + +// getAffinityTerms receives a Pod and affinity terms and returns the namespaces and +// selectors of the terms. +func getAffinityTerms(pod *v1.Pod, v1Terms []v1.PodAffinityTerm) ([]AffinityTerm, error) { + if v1Terms == nil { + return nil, nil + } + + var terms []AffinityTerm + for _, term := range v1Terms { + t, err := newAffinityTerm(pod, &term) + if err != nil { + // We get here if the label selector failed to process + return nil, err + } + terms = append(terms, *t) + } + return terms, nil +} + +// getWeightedAffinityTerms returns the list of processed affinity terms. +func getWeightedAffinityTerms(pod *v1.Pod, v1Terms []v1.WeightedPodAffinityTerm) ([]WeightedAffinityTerm, error) { + if v1Terms == nil { + return nil, nil + } + + var terms []WeightedAffinityTerm + for _, term := range v1Terms { + t, err := newAffinityTerm(pod, &term.PodAffinityTerm) + if err != nil { + // We get here if the label selector failed to process + return nil, err + } + terms = append(terms, WeightedAffinityTerm{AffinityTerm: *t, Weight: term.Weight}) + } + return terms, nil +} + +// NewPodInfo return a new PodInfo +func NewPodInfo(pod *v1.Pod) *PodInfo { + var preferredAffinityTerms []v1.WeightedPodAffinityTerm + var preferredAntiAffinityTerms []v1.WeightedPodAffinityTerm + if affinity := pod.Spec.Affinity; affinity != nil { + if a := affinity.PodAffinity; a != nil { + preferredAffinityTerms = a.PreferredDuringSchedulingIgnoredDuringExecution + } + if a := affinity.PodAntiAffinity; a != nil { + preferredAntiAffinityTerms = a.PreferredDuringSchedulingIgnoredDuringExecution + } + } + + // Attempt to parse the affinity terms + var parseErr error + requiredAffinityTerms, err := getAffinityTerms(pod, schedutil.GetPodAffinityTerms(pod.Spec.Affinity)) + if err != nil { + parseErr = fmt.Errorf("requiredAffinityTerms: %w", err) + } + requiredAntiAffinityTerms, err := getAffinityTerms(pod, schedutil.GetPodAntiAffinityTerms(pod.Spec.Affinity)) + if err != nil { + parseErr = fmt.Errorf("requiredAntiAffinityTerms: %w", err) + } + weightedAffinityTerms, err := getWeightedAffinityTerms(pod, preferredAffinityTerms) + if err != nil { + parseErr = fmt.Errorf("preferredAffinityTerms: %w", err) + } + weightedAntiAffinityTerms, err := getWeightedAffinityTerms(pod, preferredAntiAffinityTerms) + if err != nil { + parseErr = fmt.Errorf("preferredAntiAffinityTerms: %w", err) + } + + return &PodInfo{ + Pod: pod, + RequiredAffinityTerms: requiredAffinityTerms, + RequiredAntiAffinityTerms: requiredAntiAffinityTerms, + PreferredAffinityTerms: weightedAffinityTerms, + PreferredAntiAffinityTerms: weightedAntiAffinityTerms, + ParseError: parseErr, + } +} // ImageStateSummary provides summarized information about the state of an image. type ImageStateSummary struct { @@ -49,44 +190,40 @@ type NodeInfo struct { // Overall node information. node *v1.Node - pods []*v1.Pod - podsWithAffinity []*v1.Pod - usedPorts HostPortInfo + // Pods running on the node. + Pods []*PodInfo + + // The subset of pods with affinity. + PodsWithAffinity []*PodInfo + + // Ports allocated on the node. + UsedPorts HostPortInfo // Total requested resources of all pods on this node. This includes assumed // pods, which scheduler has sent for binding, but may not be scheduled yet. - requestedResource *Resource + Requested *Resource // Total requested resources of all pods on this node with a minimum value // applied to each container's CPU and memory requests. This does not reflect // the actual resource requests for this node, but is used to avoid scheduling // many zero-request pods onto one node. - nonzeroRequest *Resource + NonZeroRequested *Resource // We store allocatedResources (which is Node.Status.Allocatable.*) explicitly // as int64, to avoid conversions and accessing map. - allocatableResource *Resource + Allocatable *Resource - // Cached taints of the node for faster lookup. - taints []v1.Taint - taintsErr error - - // imageStates holds the entry of an image if and only if this image is on the node. The entry can be used for + // ImageStates holds the entry of an image if and only if this image is on the node. The entry can be used for // checking an image's existence and advanced usage (e.g., image locality scheduling policy) based on the image // state information. - imageStates map[string]*ImageStateSummary + ImageStates map[string]*ImageStateSummary // TransientInfo holds the information pertaining to a scheduling cycle. This will be destructed at the end of // scheduling cycle. // TODO: @ravig. Remove this once we have a clear approach for message passing across predicates and priorities. TransientInfo *TransientSchedulerInfo - // Cached conditions of node for faster lookup. - memoryPressureCondition v1.ConditionStatus - diskPressureCondition v1.ConditionStatus - pidPressureCondition v1.ConditionStatus - // Whenever NodeInfo changes, generation is bumped. // This is used to avoid cloning it if the object didn't change. - generation int64 + Generation int64 } //initializeNodeTransientInfo initializes transient information pertaining to node. @@ -270,13 +407,13 @@ func (r *Resource) SetMaxResource(rl v1.ResourceList) { // the returned object. func NewNodeInfo(pods ...*v1.Pod) *NodeInfo { ni := &NodeInfo{ - requestedResource: &Resource{}, - nonzeroRequest: &Resource{}, - allocatableResource: &Resource{}, - TransientInfo: NewTransientSchedulerInfo(), - generation: nextGeneration(), - usedPorts: make(HostPortInfo), - imageStates: make(map[string]*ImageStateSummary), + Requested: &Resource{}, + NonZeroRequested: &Resource{}, + Allocatable: &Resource{}, + TransientInfo: NewTransientSchedulerInfo(), + Generation: nextGeneration(), + UsedPorts: make(HostPortInfo), + ImageStates: make(map[string]*ImageStateSummary), } for _, pod := range pods { ni.AddPod(pod) @@ -292,214 +429,72 @@ func (n *NodeInfo) Node() *v1.Node { return n.node } -// Pods return all pods scheduled (including assumed to be) on this node. -func (n *NodeInfo) Pods() []*v1.Pod { - if n == nil { - return nil - } - return n.pods -} - -// SetPods sets all pods scheduled (including assumed to be) on this node. -func (n *NodeInfo) SetPods(pods []*v1.Pod) { - n.pods = pods -} - -// UsedPorts returns used ports on this node. -func (n *NodeInfo) UsedPorts() HostPortInfo { - if n == nil { - return nil - } - return n.usedPorts -} - -// SetUsedPorts sets the used ports on this node. -func (n *NodeInfo) SetUsedPorts(newUsedPorts HostPortInfo) { - n.usedPorts = newUsedPorts -} - -// ImageStates returns the state information of all images. -func (n *NodeInfo) ImageStates() map[string]*ImageStateSummary { - if n == nil { - return nil - } - return n.imageStates -} - -// SetImageStates sets the state information of all images. -func (n *NodeInfo) SetImageStates(newImageStates map[string]*ImageStateSummary) { - n.imageStates = newImageStates -} - -// PodsWithAffinity return all pods with (anti)affinity constraints on this node. -func (n *NodeInfo) PodsWithAffinity() []*v1.Pod { - if n == nil { - return nil - } - return n.podsWithAffinity -} - -// AllowedPodNumber returns the number of the allowed pods on this node. -func (n *NodeInfo) AllowedPodNumber() int { - if n == nil || n.allocatableResource == nil { - return 0 - } - return n.allocatableResource.AllowedPodNumber -} - -// Taints returns the taints list on this node. -func (n *NodeInfo) Taints() ([]v1.Taint, error) { - if n == nil { - return nil, nil - } - return n.taints, n.taintsErr -} - -// SetTaints sets the taints list on this node. -func (n *NodeInfo) SetTaints(newTaints []v1.Taint) { - n.taints = newTaints -} - -// RequestedResource returns aggregated resource request of pods on this node. -func (n *NodeInfo) RequestedResource() Resource { - if n == nil { - return emptyResource - } - return *n.requestedResource -} - -// SetRequestedResource sets the aggregated resource request of pods on this node. -func (n *NodeInfo) SetRequestedResource(newResource *Resource) { - n.requestedResource = newResource -} - -// NonZeroRequest returns aggregated nonzero resource request of pods on this node. -func (n *NodeInfo) NonZeroRequest() Resource { - if n == nil { - return emptyResource - } - return *n.nonzeroRequest -} - -// SetNonZeroRequest sets the aggregated nonzero resource request of pods on this node. -func (n *NodeInfo) SetNonZeroRequest(newResource *Resource) { - n.nonzeroRequest = newResource -} - -// AllocatableResource returns allocatable resources on a given node. -func (n *NodeInfo) AllocatableResource() Resource { - if n == nil { - return emptyResource - } - return *n.allocatableResource -} - -// SetAllocatableResource sets the allocatableResource information of given node. -func (n *NodeInfo) SetAllocatableResource(allocatableResource *Resource) { - n.allocatableResource = allocatableResource - n.generation = nextGeneration() -} - -// GetGeneration returns the generation on this node. -func (n *NodeInfo) GetGeneration() int64 { - if n == nil { - return 0 - } - return n.generation -} - -// SetGeneration sets the generation on this node. This is for testing only. -func (n *NodeInfo) SetGeneration(newGeneration int64) { - n.generation = newGeneration -} - // Clone returns a copy of this node. func (n *NodeInfo) Clone() *NodeInfo { clone := &NodeInfo{ - node: n.node, - requestedResource: n.requestedResource.Clone(), - nonzeroRequest: n.nonzeroRequest.Clone(), - allocatableResource: n.allocatableResource.Clone(), - taintsErr: n.taintsErr, - TransientInfo: n.TransientInfo, - memoryPressureCondition: n.memoryPressureCondition, - diskPressureCondition: n.diskPressureCondition, - pidPressureCondition: n.pidPressureCondition, - usedPorts: make(HostPortInfo), - imageStates: n.imageStates, - generation: n.generation, + node: n.node, + Requested: n.Requested.Clone(), + NonZeroRequested: n.NonZeroRequested.Clone(), + Allocatable: n.Allocatable.Clone(), + TransientInfo: n.TransientInfo, + UsedPorts: make(HostPortInfo), + ImageStates: n.ImageStates, + Generation: n.Generation, } - if len(n.pods) > 0 { - clone.pods = append([]*v1.Pod(nil), n.pods...) + if len(n.Pods) > 0 { + clone.Pods = append([]*PodInfo(nil), n.Pods...) } - if len(n.usedPorts) > 0 { + if len(n.UsedPorts) > 0 { // HostPortInfo is a map-in-map struct // make sure it's deep copied - for ip, portMap := range n.usedPorts { - clone.usedPorts[ip] = make(map[ProtocolPort]struct{}) + for ip, portMap := range n.UsedPorts { + clone.UsedPorts[ip] = make(map[ProtocolPort]struct{}) for protocolPort, v := range portMap { - clone.usedPorts[ip][protocolPort] = v + clone.UsedPorts[ip][protocolPort] = v } } } - if len(n.podsWithAffinity) > 0 { - clone.podsWithAffinity = append([]*v1.Pod(nil), n.podsWithAffinity...) - } - if len(n.taints) > 0 { - clone.taints = append([]v1.Taint(nil), n.taints...) + if len(n.PodsWithAffinity) > 0 { + clone.PodsWithAffinity = append([]*PodInfo(nil), n.PodsWithAffinity...) } return clone } -// VolumeLimits returns volume limits associated with the node -func (n *NodeInfo) VolumeLimits() map[v1.ResourceName]int64 { - volumeLimits := map[v1.ResourceName]int64{} - for k, v := range n.AllocatableResource().ScalarResources { - if v1helper.IsAttachableVolumeResourceName(k) { - volumeLimits[k] = v - } - } - return volumeLimits -} - // String returns representation of human readable format of this NodeInfo. func (n *NodeInfo) String() string { - podKeys := make([]string, len(n.pods)) - for i, pod := range n.pods { - podKeys[i] = pod.Name + podKeys := make([]string, len(n.Pods)) + for i, p := range n.Pods { + podKeys[i] = p.Pod.Name } return fmt.Sprintf("&NodeInfo{Pods:%v, RequestedResource:%#v, NonZeroRequest: %#v, UsedPort: %#v, AllocatableResource:%#v}", - podKeys, n.requestedResource, n.nonzeroRequest, n.usedPorts, n.allocatableResource) -} - -func hasPodAffinityConstraints(pod *v1.Pod) bool { - affinity := pod.Spec.Affinity - return affinity != nil && (affinity.PodAffinity != nil || affinity.PodAntiAffinity != nil) + podKeys, n.Requested, n.NonZeroRequested, n.UsedPorts, n.Allocatable) } // AddPod adds pod information to this NodeInfo. func (n *NodeInfo) AddPod(pod *v1.Pod) { + podInfo := NewPodInfo(pod) res, non0CPU, non0Mem := calculateResource(pod) - n.requestedResource.MilliCPU += res.MilliCPU - n.requestedResource.Memory += res.Memory - n.requestedResource.EphemeralStorage += res.EphemeralStorage - if n.requestedResource.ScalarResources == nil && len(res.ScalarResources) > 0 { - n.requestedResource.ScalarResources = map[v1.ResourceName]int64{} + n.Requested.MilliCPU += res.MilliCPU + n.Requested.Memory += res.Memory + n.Requested.EphemeralStorage += res.EphemeralStorage + if n.Requested.ScalarResources == nil && len(res.ScalarResources) > 0 { + n.Requested.ScalarResources = map[v1.ResourceName]int64{} } for rName, rQuant := range res.ScalarResources { - n.requestedResource.ScalarResources[rName] += rQuant + n.Requested.ScalarResources[rName] += rQuant } - n.nonzeroRequest.MilliCPU += non0CPU - n.nonzeroRequest.Memory += non0Mem - n.pods = append(n.pods, pod) - if hasPodAffinityConstraints(pod) { - n.podsWithAffinity = append(n.podsWithAffinity, pod) + n.NonZeroRequested.MilliCPU += non0CPU + n.NonZeroRequested.Memory += non0Mem + n.Pods = append(n.Pods, podInfo) + affinity := pod.Spec.Affinity + if affinity != nil && (affinity.PodAffinity != nil || affinity.PodAntiAffinity != nil) { + n.PodsWithAffinity = append(n.PodsWithAffinity, podInfo) } // Consume ports when pods added. - n.UpdateUsedPorts(pod, true) + n.updateUsedPorts(podInfo.Pod, true) - n.generation = nextGeneration() + n.Generation = nextGeneration() } // RemovePod subtracts pod information from this NodeInfo. @@ -509,48 +504,48 @@ func (n *NodeInfo) RemovePod(pod *v1.Pod) error { return err } - for i := range n.podsWithAffinity { - k2, err := GetPodKey(n.podsWithAffinity[i]) + for i := range n.PodsWithAffinity { + k2, err := GetPodKey(n.PodsWithAffinity[i].Pod) if err != nil { klog.Errorf("Cannot get pod key, err: %v", err) continue } if k1 == k2 { // delete the element - n.podsWithAffinity[i] = n.podsWithAffinity[len(n.podsWithAffinity)-1] - n.podsWithAffinity = n.podsWithAffinity[:len(n.podsWithAffinity)-1] + n.PodsWithAffinity[i] = n.PodsWithAffinity[len(n.PodsWithAffinity)-1] + n.PodsWithAffinity = n.PodsWithAffinity[:len(n.PodsWithAffinity)-1] break } } - for i := range n.pods { - k2, err := GetPodKey(n.pods[i]) + for i := range n.Pods { + k2, err := GetPodKey(n.Pods[i].Pod) if err != nil { klog.Errorf("Cannot get pod key, err: %v", err) continue } if k1 == k2 { // delete the element - n.pods[i] = n.pods[len(n.pods)-1] - n.pods = n.pods[:len(n.pods)-1] + n.Pods[i] = n.Pods[len(n.Pods)-1] + n.Pods = n.Pods[:len(n.Pods)-1] // reduce the resource data res, non0CPU, non0Mem := calculateResource(pod) - n.requestedResource.MilliCPU -= res.MilliCPU - n.requestedResource.Memory -= res.Memory - n.requestedResource.EphemeralStorage -= res.EphemeralStorage - if len(res.ScalarResources) > 0 && n.requestedResource.ScalarResources == nil { - n.requestedResource.ScalarResources = map[v1.ResourceName]int64{} + n.Requested.MilliCPU -= res.MilliCPU + n.Requested.Memory -= res.Memory + n.Requested.EphemeralStorage -= res.EphemeralStorage + if len(res.ScalarResources) > 0 && n.Requested.ScalarResources == nil { + n.Requested.ScalarResources = map[v1.ResourceName]int64{} } for rName, rQuant := range res.ScalarResources { - n.requestedResource.ScalarResources[rName] -= rQuant + n.Requested.ScalarResources[rName] -= rQuant } - n.nonzeroRequest.MilliCPU -= non0CPU - n.nonzeroRequest.Memory -= non0Mem + n.NonZeroRequested.MilliCPU -= non0CPU + n.NonZeroRequested.Memory -= non0Mem // Release ports when remove Pods. - n.UpdateUsedPorts(pod, false) + n.updateUsedPorts(pod, false) - n.generation = nextGeneration() + n.Generation = nextGeneration() n.resetSlicesIfEmpty() return nil } @@ -560,11 +555,11 @@ func (n *NodeInfo) RemovePod(pod *v1.Pod) error { // resets the slices to nil so that we can do DeepEqual in unit tests. func (n *NodeInfo) resetSlicesIfEmpty() { - if len(n.podsWithAffinity) == 0 { - n.podsWithAffinity = nil + if len(n.PodsWithAffinity) == 0 { + n.PodsWithAffinity = nil } - if len(n.pods) == 0 { - n.pods = nil + if len(n.Pods) == 0 { + n.Pods = nil } } @@ -606,16 +601,16 @@ func calculateResource(pod *v1.Pod) (res Resource, non0CPU int64, non0Mem int64) return } -// UpdateUsedPorts updates the UsedPorts of NodeInfo. -func (n *NodeInfo) UpdateUsedPorts(pod *v1.Pod, add bool) { +// updateUsedPorts updates the UsedPorts of NodeInfo. +func (n *NodeInfo) updateUsedPorts(pod *v1.Pod, add bool) { for j := range pod.Spec.Containers { container := &pod.Spec.Containers[j] for k := range container.Ports { podPort := &container.Ports[k] if add { - n.usedPorts.Add(podPort.HostIP, string(podPort.Protocol), podPort.HostPort) + n.UsedPorts.Add(podPort.HostIP, string(podPort.Protocol), podPort.HostPort) } else { - n.usedPorts.Remove(podPort.HostIP, string(podPort.Protocol), podPort.HostPort) + n.UsedPorts.Remove(podPort.HostIP, string(podPort.Protocol), podPort.HostPort) } } } @@ -624,28 +619,18 @@ func (n *NodeInfo) UpdateUsedPorts(pod *v1.Pod, add bool) { // SetNode sets the overall node information. func (n *NodeInfo) SetNode(node *v1.Node) error { n.node = node - - n.allocatableResource = NewResource(node.Status.Allocatable) - - n.taints = node.Spec.Taints - for i := range node.Status.Conditions { - cond := &node.Status.Conditions[i] - switch cond.Type { - case v1.NodeMemoryPressure: - n.memoryPressureCondition = cond.Status - case v1.NodeDiskPressure: - n.diskPressureCondition = cond.Status - case v1.NodePIDPressure: - n.pidPressureCondition = cond.Status - default: - // We ignore other conditions. - } - } + n.Allocatable = NewResource(node.Status.Allocatable) n.TransientInfo = NewTransientSchedulerInfo() - n.generation = nextGeneration() + n.Generation = nextGeneration() return nil } +// RemoveNode removes the node object, leaving all other tracking information. +func (n *NodeInfo) RemoveNode() { + n.node = nil + n.Generation = nextGeneration() +} + // FilterOutPods receives a list of pods and filters out those whose node names // are equal to the node of this NodeInfo, but are not found in the pods of this NodeInfo. // @@ -669,8 +654,8 @@ func (n *NodeInfo) FilterOutPods(pods []*v1.Pod) []*v1.Pod { if err != nil { continue } - for _, np := range n.Pods() { - npodkey, _ := GetPodKey(np) + for _, np := range n.Pods { + npodkey, _ := GetPodKey(np.Pod) if npodkey == podKey { filtered = append(filtered, p) break @@ -689,17 +674,116 @@ func GetPodKey(pod *v1.Pod) (string, error) { return uid, nil } -// Filter implements PodFilter interface. It returns false only if the pod node name -// matches NodeInfo.node and the pod is not found in the pods list. Otherwise, -// returns true. -func (n *NodeInfo) Filter(pod *v1.Pod) bool { - if pod.Spec.NodeName != n.node.Name { - return true +// DefaultBindAllHostIP defines the default ip address used to bind to all host. +const DefaultBindAllHostIP = "0.0.0.0" + +// ProtocolPort represents a protocol port pair, e.g. tcp:80. +type ProtocolPort struct { + Protocol string + Port int32 +} + +// NewProtocolPort creates a ProtocolPort instance. +func NewProtocolPort(protocol string, port int32) *ProtocolPort { + pp := &ProtocolPort{ + Protocol: protocol, + Port: port, } - for _, p := range n.pods { - if p.Name == pod.Name && p.Namespace == pod.Namespace { - return true + + if len(pp.Protocol) == 0 { + pp.Protocol = string(v1.ProtocolTCP) + } + + return pp +} + +// HostPortInfo stores mapping from ip to a set of ProtocolPort +type HostPortInfo map[string]map[ProtocolPort]struct{} + +// Add adds (ip, protocol, port) to HostPortInfo +func (h HostPortInfo) Add(ip, protocol string, port int32) { + if port <= 0 { + return + } + + h.sanitize(&ip, &protocol) + + pp := NewProtocolPort(protocol, port) + if _, ok := h[ip]; !ok { + h[ip] = map[ProtocolPort]struct{}{ + *pp: {}, + } + return + } + + h[ip][*pp] = struct{}{} +} + +// Remove removes (ip, protocol, port) from HostPortInfo +func (h HostPortInfo) Remove(ip, protocol string, port int32) { + if port <= 0 { + return + } + + h.sanitize(&ip, &protocol) + + pp := NewProtocolPort(protocol, port) + if m, ok := h[ip]; ok { + delete(m, *pp) + if len(h[ip]) == 0 { + delete(h, ip) } } +} + +// Len returns the total number of (ip, protocol, port) tuple in HostPortInfo +func (h HostPortInfo) Len() int { + length := 0 + for _, m := range h { + length += len(m) + } + return length +} + +// CheckConflict checks if the input (ip, protocol, port) conflicts with the existing +// ones in HostPortInfo. +func (h HostPortInfo) CheckConflict(ip, protocol string, port int32) bool { + if port <= 0 { + return false + } + + h.sanitize(&ip, &protocol) + + pp := NewProtocolPort(protocol, port) + + // If ip is 0.0.0.0 check all IP's (protocol, port) pair + if ip == DefaultBindAllHostIP { + for _, m := range h { + if _, ok := m[*pp]; ok { + return true + } + } + return false + } + + // If ip isn't 0.0.0.0, only check IP and 0.0.0.0's (protocol, port) pair + for _, key := range []string{DefaultBindAllHostIP, ip} { + if m, ok := h[key]; ok { + if _, ok2 := m[*pp]; ok2 { + return true + } + } + } + return false } + +// sanitize the parameters +func (h HostPortInfo) sanitize(ip, protocol *string) { + if len(*ip) == 0 { + *ip = DefaultBindAllHostIP + } + if len(*protocol) == 0 { + *protocol = string(v1.ProtocolTCP) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/BUILD index b9484a3320a..a359f89db2c 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/BUILD @@ -12,16 +12,14 @@ go_library( visibility = ["//pkg/scheduler:__subpackages__"], deps = [ "//pkg/features:go_default_library", - "//pkg/scheduler/listers:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/metrics:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//pkg/util/node:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -35,7 +33,7 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/features:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/util:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/cache.go b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/cache.go index 275cd75570a..e0f44e78d59 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/cache.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/cache.go @@ -22,15 +22,13 @@ import ( "time" v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" - schedulerlisters "k8s.io/kubernetes/pkg/scheduler/listers" + framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" "k8s.io/kubernetes/pkg/scheduler/metrics" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) var ( @@ -51,7 +49,7 @@ func New(ttl time.Duration, stop <-chan struct{}) Cache { // linked list. When a NodeInfo is updated, it goes to the head of the list. // The items closer to the head are the most recently updated items. type nodeInfoListItem struct { - info *schedulernodeinfo.NodeInfo + info *framework.NodeInfo next *nodeInfoListItem prev *nodeInfoListItem } @@ -93,8 +91,8 @@ type imageState struct { } // createImageStateSummary returns a summarizing snapshot of the given image's state. -func (cache *schedulerCache) createImageStateSummary(state *imageState) *schedulernodeinfo.ImageStateSummary { - return &schedulernodeinfo.ImageStateSummary{ +func (cache *schedulerCache) createImageStateSummary(state *imageState) *framework.ImageStateSummary { + return &framework.ImageStateSummary{ Size: state.size, NumNodes: len(state.nodes), } @@ -115,7 +113,7 @@ func newSchedulerCache(ttl, period time.Duration, stop <-chan struct{}) *schedul } // newNodeInfoListItem initializes a new nodeInfoListItem. -func newNodeInfoListItem(ni *schedulernodeinfo.NodeInfo) *nodeInfoListItem { +func newNodeInfoListItem(ni *framework.NodeInfo) *nodeInfoListItem { return &nodeInfoListItem{ info: ni, } @@ -180,7 +178,7 @@ func (cache *schedulerCache) Dump() *Dump { cache.mu.RLock() defer cache.mu.RUnlock() - nodes := make(map[string]*schedulernodeinfo.NodeInfo, len(cache.nodes)) + nodes := make(map[string]*framework.NodeInfo, len(cache.nodes)) for k, v := range cache.nodes { nodes[k] = v.info.Clone() } @@ -219,7 +217,7 @@ func (cache *schedulerCache) UpdateSnapshot(nodeSnapshot *Snapshot) error { // Start from the head of the NodeInfo doubly linked list and update snapshot // of NodeInfos updated after the last snapshot. for node := cache.headNode; node != nil; node = node.next { - if node.info.GetGeneration() <= snapshotGeneration { + if node.info.Generation <= snapshotGeneration { // all the nodes are updated before the existing snapshot. We are done. break } @@ -231,14 +229,14 @@ func (cache *schedulerCache) UpdateSnapshot(nodeSnapshot *Snapshot) error { existing, ok := nodeSnapshot.nodeInfoMap[np.Name] if !ok { updateAllLists = true - existing = &schedulernodeinfo.NodeInfo{} + existing = &framework.NodeInfo{} nodeSnapshot.nodeInfoMap[np.Name] = existing } clone := node.info.Clone() // We track nodes that have pods with affinity, here we check if this node changed its // status from having pods with affinity to NOT having pods with affinity or the other // way around. - if (len(existing.PodsWithAffinity()) > 0) != (len(clone.PodsWithAffinity()) > 0) { + if (len(existing.PodsWithAffinity) > 0) != (len(clone.PodsWithAffinity) > 0) { updateNodesHavePodsWithAffinity = true } // We need to preserve the original pointer of the NodeInfo struct since it @@ -248,7 +246,7 @@ func (cache *schedulerCache) UpdateSnapshot(nodeSnapshot *Snapshot) error { } // Update the snapshot generation with the latest NodeInfo generation. if cache.headNode != nil { - nodeSnapshot.generation = cache.headNode.info.GetGeneration() + nodeSnapshot.generation = cache.headNode.info.Generation } if len(nodeSnapshot.nodeInfoMap) > len(cache.nodes) { @@ -277,16 +275,16 @@ func (cache *schedulerCache) UpdateSnapshot(nodeSnapshot *Snapshot) error { } func (cache *schedulerCache) updateNodeInfoSnapshotList(snapshot *Snapshot, updateAll bool) { - snapshot.havePodsWithAffinityNodeInfoList = make([]*schedulernodeinfo.NodeInfo, 0, cache.nodeTree.numNodes) + snapshot.havePodsWithAffinityNodeInfoList = make([]*framework.NodeInfo, 0, cache.nodeTree.numNodes) if updateAll { // Take a snapshot of the nodes order in the tree - snapshot.nodeInfoList = make([]*schedulernodeinfo.NodeInfo, 0, cache.nodeTree.numNodes) + snapshot.nodeInfoList = make([]*framework.NodeInfo, 0, cache.nodeTree.numNodes) cache.nodeTree.resetExhausted() for i := 0; i < cache.nodeTree.numNodes; i++ { nodeName := cache.nodeTree.next() if n := snapshot.nodeInfoMap[nodeName]; n != nil { snapshot.nodeInfoList = append(snapshot.nodeInfoList, n) - if len(n.PodsWithAffinity()) > 0 { + if len(n.PodsWithAffinity) > 0 { snapshot.havePodsWithAffinityNodeInfoList = append(snapshot.havePodsWithAffinityNodeInfoList, n) } } else { @@ -295,7 +293,7 @@ func (cache *schedulerCache) updateNodeInfoSnapshotList(snapshot *Snapshot, upda } } else { for _, n := range snapshot.nodeInfoList { - if len(n.PodsWithAffinity()) > 0 { + if len(n.PodsWithAffinity) > 0 { snapshot.havePodsWithAffinityNodeInfoList = append(snapshot.havePodsWithAffinityNodeInfoList, n) } } @@ -316,12 +314,9 @@ func (cache *schedulerCache) removeDeletedNodesFromSnapshot(snapshot *Snapshot) } } -func (cache *schedulerCache) List(selector labels.Selector) ([]*v1.Pod, error) { - alwaysTrue := func(p *v1.Pod) bool { return true } - return cache.FilteredList(alwaysTrue, selector) -} - -func (cache *schedulerCache) FilteredList(podFilter schedulerlisters.PodFilter, selector labels.Selector) ([]*v1.Pod, error) { +// PodCount returns the number of pods in the cache (including those from deleted nodes). +// DO NOT use outside of tests. +func (cache *schedulerCache) PodCount() (int, error) { cache.mu.RLock() defer cache.mu.RUnlock() // podFilter is expected to return true for most or all of the pods. We @@ -329,21 +324,17 @@ func (cache *schedulerCache) FilteredList(podFilter schedulerlisters.PodFilter, // pre-allocating capacity. maxSize := 0 for _, n := range cache.nodes { - maxSize += len(n.info.Pods()) + maxSize += len(n.info.Pods) } - pods := make([]*v1.Pod, 0, maxSize) + count := 0 for _, n := range cache.nodes { - for _, pod := range n.info.Pods() { - if podFilter(pod) && selector.Matches(labels.Set(pod.Labels)) { - pods = append(pods, pod) - } - } + count += len(n.info.Pods) } - return pods, nil + return count, nil } func (cache *schedulerCache) AssumePod(pod *v1.Pod) error { - key, err := schedulernodeinfo.GetPodKey(pod) + key, err := framework.GetPodKey(pod) if err != nil { return err } @@ -369,7 +360,7 @@ func (cache *schedulerCache) FinishBinding(pod *v1.Pod) error { // finishBinding exists to make tests determinitistic by injecting now as an argument func (cache *schedulerCache) finishBinding(pod *v1.Pod, now time.Time) error { - key, err := schedulernodeinfo.GetPodKey(pod) + key, err := framework.GetPodKey(pod) if err != nil { return err } @@ -388,7 +379,7 @@ func (cache *schedulerCache) finishBinding(pod *v1.Pod, now time.Time) error { } func (cache *schedulerCache) ForgetPod(pod *v1.Pod) error { - key, err := schedulernodeinfo.GetPodKey(pod) + key, err := framework.GetPodKey(pod) if err != nil { return err } @@ -420,7 +411,7 @@ func (cache *schedulerCache) ForgetPod(pod *v1.Pod) error { func (cache *schedulerCache) addPod(pod *v1.Pod) { n, ok := cache.nodes[pod.Spec.NodeName] if !ok { - n = newNodeInfoListItem(schedulernodeinfo.NewNodeInfo()) + n = newNodeInfoListItem(framework.NewNodeInfo()) cache.nodes[pod.Spec.NodeName] = n } n.info.AddPod(pod) @@ -429,13 +420,6 @@ func (cache *schedulerCache) addPod(pod *v1.Pod) { // Assumes that lock is already acquired. func (cache *schedulerCache) updatePod(oldPod, newPod *v1.Pod) error { - if _, ok := cache.nodes[newPod.Spec.NodeName]; !ok { - // The node might have been deleted already. - // This is not a problem in the case where a pod update arrives before the - // node creation, because we will always have a create pod event before - // that, which will create the placeholder node item. - return nil - } if err := cache.removePod(oldPod); err != nil { return err } @@ -444,23 +428,28 @@ func (cache *schedulerCache) updatePod(oldPod, newPod *v1.Pod) error { } // Assumes that lock is already acquired. -// Removes a pod from the cached node info. When a node is removed, some pod -// deletion events might arrive later. This is not a problem, as the pods in -// the node are assumed to be removed already. +// Removes a pod from the cached node info. If the node information was already +// removed and there are no more pods left in the node, cleans up the node from +// the cache. func (cache *schedulerCache) removePod(pod *v1.Pod) error { n, ok := cache.nodes[pod.Spec.NodeName] if !ok { + klog.Errorf("node %v not found when trying to remove pod %v", pod.Spec.NodeName, pod.Name) return nil } if err := n.info.RemovePod(pod); err != nil { return err } - cache.moveNodeInfoToHead(pod.Spec.NodeName) + if len(n.info.Pods) == 0 && n.info.Node() == nil { + cache.removeNodeInfoFromList(pod.Spec.NodeName) + } else { + cache.moveNodeInfoToHead(pod.Spec.NodeName) + } return nil } func (cache *schedulerCache) AddPod(pod *v1.Pod) error { - key, err := schedulernodeinfo.GetPodKey(pod) + key, err := framework.GetPodKey(pod) if err != nil { return err } @@ -497,7 +486,7 @@ func (cache *schedulerCache) AddPod(pod *v1.Pod) error { } func (cache *schedulerCache) UpdatePod(oldPod, newPod *v1.Pod) error { - key, err := schedulernodeinfo.GetPodKey(oldPod) + key, err := framework.GetPodKey(oldPod) if err != nil { return err } @@ -525,7 +514,7 @@ func (cache *schedulerCache) UpdatePod(oldPod, newPod *v1.Pod) error { } func (cache *schedulerCache) RemovePod(pod *v1.Pod) error { - key, err := schedulernodeinfo.GetPodKey(pod) + key, err := framework.GetPodKey(pod) if err != nil { return err } @@ -554,7 +543,7 @@ func (cache *schedulerCache) RemovePod(pod *v1.Pod) error { } func (cache *schedulerCache) IsAssumedPod(pod *v1.Pod) (bool, error) { - key, err := schedulernodeinfo.GetPodKey(pod) + key, err := framework.GetPodKey(pod) if err != nil { return false, err } @@ -572,7 +561,7 @@ func (cache *schedulerCache) IsAssumedPod(pod *v1.Pod) (bool, error) { // GetPod might return a pod for which its node has already been deleted from // the main cache. This is useful to properly process pod update events. func (cache *schedulerCache) GetPod(pod *v1.Pod) (*v1.Pod, error) { - key, err := schedulernodeinfo.GetPodKey(pod) + key, err := framework.GetPodKey(pod) if err != nil { return nil, err } @@ -594,7 +583,7 @@ func (cache *schedulerCache) AddNode(node *v1.Node) error { n, ok := cache.nodes[node.Name] if !ok { - n = newNodeInfoListItem(schedulernodeinfo.NewNodeInfo()) + n = newNodeInfoListItem(framework.NewNodeInfo()) cache.nodes[node.Name] = n } else { cache.removeNodeImageStates(n.info.Node()) @@ -612,7 +601,7 @@ func (cache *schedulerCache) UpdateNode(oldNode, newNode *v1.Node) error { n, ok := cache.nodes[newNode.Name] if !ok { - n = newNodeInfoListItem(schedulernodeinfo.NewNodeInfo()) + n = newNodeInfoListItem(framework.NewNodeInfo()) cache.nodes[newNode.Name] = n cache.nodeTree.addNode(newNode) } else { @@ -625,21 +614,30 @@ func (cache *schedulerCache) UpdateNode(oldNode, newNode *v1.Node) error { return n.info.SetNode(newNode) } -// RemoveNode removes a node from the cache. -// Some nodes might still have pods because their deletion events didn't arrive -// yet. For most intents and purposes, those pods are removed from the cache, -// having it's source of truth in the cached nodes. -// However, some information on pods (assumedPods, podStates) persist. These -// caches will be eventually consistent as pod deletion events arrive. +// RemoveNode removes a node from the cache's tree. +// The node might still have pods because their deletion events didn't arrive +// yet. Those pods are considered removed from the cache, being the node tree +// the source of truth. +// However, we keep a ghost node with the list of pods until all pod deletion +// events have arrived. A ghost node is skipped from snapshots. func (cache *schedulerCache) RemoveNode(node *v1.Node) error { cache.mu.Lock() defer cache.mu.Unlock() - _, ok := cache.nodes[node.Name] + n, ok := cache.nodes[node.Name] if !ok { return fmt.Errorf("node %v is not found", node.Name) } - cache.removeNodeInfoFromList(node.Name) + n.info.RemoveNode() + // We remove NodeInfo for this node only if there aren't any pods on this node. + // We can't do it unconditionally, because notifications about pods are delivered + // in a different watch, and thus can potentially be observed later, even though + // they happened before node removal. + if len(n.info.Pods) == 0 { + cache.removeNodeInfoFromList(node.Name) + } else { + cache.moveNodeInfoToHead(node.Name) + } if err := cache.nodeTree.removeNode(node); err != nil { return err } @@ -649,8 +647,8 @@ func (cache *schedulerCache) RemoveNode(node *v1.Node) error { // addNodeImageStates adds states of the images on given node to the given nodeInfo and update the imageStates in // scheduler cache. This function assumes the lock to scheduler cache has been acquired. -func (cache *schedulerCache) addNodeImageStates(node *v1.Node, nodeInfo *schedulernodeinfo.NodeInfo) { - newSum := make(map[string]*schedulernodeinfo.ImageStateSummary) +func (cache *schedulerCache) addNodeImageStates(node *v1.Node, nodeInfo *framework.NodeInfo) { + newSum := make(map[string]*framework.ImageStateSummary) for _, image := range node.Status.Images { for _, name := range image.Names { @@ -671,7 +669,7 @@ func (cache *schedulerCache) addNodeImageStates(node *v1.Node, nodeInfo *schedul } } } - nodeInfo.SetImageStates(newSum) + nodeInfo.ImageStates = newSum } // removeNodeImageStates removes the given node record from image entries having the node @@ -720,7 +718,7 @@ func (cache *schedulerCache) cleanupAssumedPods(now time.Time) { klog.Fatal("Key found in assumed set but not in podStates. Potentially a logical error.") } if !ps.bindingFinished { - klog.V(3).Infof("Couldn't expire cache for pod %v/%v. Binding is still in progress.", + klog.V(5).Infof("Couldn't expire cache for pod %v/%v. Binding is still in progress.", ps.pod.Namespace, ps.pod.Name) continue } @@ -742,19 +740,6 @@ func (cache *schedulerCache) expirePod(key string, ps *podState) error { return nil } -// GetNodeInfo returns cached data for the node name. -func (cache *schedulerCache) GetNodeInfo(nodeName string) (*v1.Node, error) { - cache.mu.RLock() - defer cache.mu.RUnlock() - - n, ok := cache.nodes[nodeName] - if !ok { - return nil, fmt.Errorf("node %q not found in cache", nodeName) - } - - return n.info.Node(), nil -} - // updateMetrics updates cache size metric values for pods, assumed pods, and nodes func (cache *schedulerCache) updateMetrics() { metrics.CacheSize.WithLabelValues("assumed_pods").Set(float64(len(cache.assumedPods))) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/BUILD index bab16194a5f..19d87e7b145 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/BUILD @@ -12,13 +12,13 @@ go_library( importpath = "k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger", visibility = ["//pkg/scheduler:__subpackages__"], deps = [ + "//pkg/scheduler/framework/v1alpha1:go_default_library", "//pkg/scheduler/internal/cache:go_default_library", "//pkg/scheduler/internal/queue:go_default_library", - "//pkg/scheduler/nodeinfo:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -27,7 +27,7 @@ go_test( srcs = ["comparer_test.go"], embed = [":go_default_library"], deps = [ - "//pkg/scheduler/nodeinfo:go_default_library", + "//pkg/scheduler/framework/v1alpha1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/comparer.go b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/comparer.go index 38c7cd7311b..432113f72cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/comparer.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/comparer.go @@ -23,10 +23,10 @@ import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" corelisters "k8s.io/client-go/listers/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" + framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache" internalqueue "k8s.io/kubernetes/pkg/scheduler/internal/queue" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) // CacheComparer is an implementation of the Scheduler's cache comparer. @@ -68,7 +68,7 @@ func (c *CacheComparer) Compare() error { } // CompareNodes compares actual nodes with cached nodes. -func (c *CacheComparer) CompareNodes(nodes []*v1.Node, nodeinfos map[string]*schedulernodeinfo.NodeInfo) (missed, redundant []string) { +func (c *CacheComparer) CompareNodes(nodes []*v1.Node, nodeinfos map[string]*framework.NodeInfo) (missed, redundant []string) { actual := []string{} for _, node := range nodes { actual = append(actual, node.Name) @@ -83,7 +83,7 @@ func (c *CacheComparer) CompareNodes(nodes []*v1.Node, nodeinfos map[string]*sch } // ComparePods compares actual pods with cached pods. -func (c *CacheComparer) ComparePods(pods, waitingPods []*v1.Pod, nodeinfos map[string]*schedulernodeinfo.NodeInfo) (missed, redundant []string) { +func (c *CacheComparer) ComparePods(pods, waitingPods []*v1.Pod, nodeinfos map[string]*framework.NodeInfo) (missed, redundant []string) { actual := []string{} for _, pod := range pods { actual = append(actual, string(pod.UID)) @@ -91,8 +91,8 @@ func (c *CacheComparer) ComparePods(pods, waitingPods []*v1.Pod, nodeinfos map[s cached := []string{} for _, nodeinfo := range nodeinfos { - for _, pod := range nodeinfo.Pods() { - cached = append(cached, string(pod.UID)) + for _, p := range nodeinfo.Pods { + cached = append(cached, string(p.Pod.UID)) } } for _, pod := range waitingPods { diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/dumper.go b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/dumper.go index 601e13c9011..63792166088 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/dumper.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/dumper.go @@ -20,12 +20,12 @@ import ( "fmt" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" + framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache" "k8s.io/kubernetes/pkg/scheduler/internal/queue" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" ) // CacheDumper writes some information from the scheduler cache and the scheduling queue to the @@ -45,8 +45,8 @@ func (d *CacheDumper) DumpAll() { func (d *CacheDumper) dumpNodes() { dump := d.cache.Dump() klog.Info("Dump of cached NodeInfo") - for _, nodeInfo := range dump.Nodes { - klog.Info(d.printNodeInfo(nodeInfo)) + for name, nodeInfo := range dump.Nodes { + klog.Info(d.printNodeInfo(name, nodeInfo)) } } @@ -61,16 +61,16 @@ func (d *CacheDumper) dumpSchedulingQueue() { } // printNodeInfo writes parts of NodeInfo to a string. -func (d *CacheDumper) printNodeInfo(n *schedulernodeinfo.NodeInfo) string { +func (d *CacheDumper) printNodeInfo(name string, n *framework.NodeInfo) string { var nodeData strings.Builder - nodeData.WriteString(fmt.Sprintf("\nNode name: %+v\nRequested Resources: %+v\nAllocatable Resources:%+v\nScheduled Pods(number: %v):\n", - n.Node().Name, n.RequestedResource(), n.AllocatableResource(), len(n.Pods()))) + nodeData.WriteString(fmt.Sprintf("\nNode name: %s\nDeleted: %t\nRequested Resources: %+v\nAllocatable Resources:%+v\nScheduled Pods(number: %v):\n", + name, n.Node() == nil, n.Requested, n.Allocatable, len(n.Pods))) // Dumping Pod Info - for _, p := range n.Pods() { - nodeData.WriteString(printPod(p)) + for _, p := range n.Pods { + nodeData.WriteString(printPod(p.Pod)) } // Dumping nominated pods info on the node - nominatedPods := d.podQueue.NominatedPodsForNode(n.Node().Name) + nominatedPods := d.podQueue.NominatedPodsForNode(name) if len(nominatedPods) != 0 { nodeData.WriteString(fmt.Sprintf("Nominated Pods(number: %v):\n", len(nominatedPods))) for _, p := range nominatedPods { diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/interface.go b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/interface.go index ceb3e3ae3b0..e9ab9db8fac 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/interface.go @@ -17,9 +17,8 @@ limitations under the License. package cache import ( - v1 "k8s.io/api/core/v1" - schedulerlisters "k8s.io/kubernetes/pkg/scheduler/listers" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + "k8s.io/api/core/v1" + framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) // Cache collects pods' information and provides node-level aggregated information. @@ -57,7 +56,8 @@ import ( // - Both "Expired" and "Deleted" are valid end states. In case of some problems, e.g. network issue, // a pod might have changed its state (e.g. added and deleted) without delivering notification to the cache. type Cache interface { - schedulerlisters.PodLister + // PodCount returns the number of pods in the cache (including those from deleted nodes). + PodCount() (int, error) // AssumePod assumes a pod scheduled and aggregates the pod's information into its node. // The implementation also decides the policy to expire pod before being confirmed (receiving Add event). @@ -108,5 +108,5 @@ type Cache interface { // Dump is a dump of the cache state. type Dump struct { AssumedPods map[string]bool - Nodes map[string]*schedulernodeinfo.NodeInfo + Nodes map[string]*framework.NodeInfo } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/node_tree.go b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/node_tree.go index 4a81182f7eb..0b8eb1708da 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/node_tree.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/node_tree.go @@ -20,7 +20,7 @@ import ( "fmt" "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" utilnode "k8s.io/kubernetes/pkg/util/node" ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/snapshot.go b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/snapshot.go index 3300bb9ac6f..a63f67431ee 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/snapshot.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/snapshot.go @@ -20,41 +20,39 @@ import ( "fmt" v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" - schedulerlisters "k8s.io/kubernetes/pkg/scheduler/listers" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" + framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) // Snapshot is a snapshot of cache NodeInfo and NodeTree order. The scheduler takes a // snapshot at the beginning of each scheduling cycle and uses it for its operations in that cycle. type Snapshot struct { // nodeInfoMap a map of node name to a snapshot of its NodeInfo. - nodeInfoMap map[string]*schedulernodeinfo.NodeInfo + nodeInfoMap map[string]*framework.NodeInfo // nodeInfoList is the list of nodes as ordered in the cache's nodeTree. - nodeInfoList []*schedulernodeinfo.NodeInfo + nodeInfoList []*framework.NodeInfo // havePodsWithAffinityNodeInfoList is the list of nodes with at least one pod declaring affinity terms. - havePodsWithAffinityNodeInfoList []*schedulernodeinfo.NodeInfo + havePodsWithAffinityNodeInfoList []*framework.NodeInfo generation int64 } -var _ schedulerlisters.SharedLister = &Snapshot{} +var _ framework.SharedLister = &Snapshot{} // NewEmptySnapshot initializes a Snapshot struct and returns it. func NewEmptySnapshot() *Snapshot { return &Snapshot{ - nodeInfoMap: make(map[string]*schedulernodeinfo.NodeInfo), + nodeInfoMap: make(map[string]*framework.NodeInfo), } } // NewSnapshot initializes a Snapshot struct and returns it. func NewSnapshot(pods []*v1.Pod, nodes []*v1.Node) *Snapshot { nodeInfoMap := createNodeInfoMap(pods, nodes) - nodeInfoList := make([]*schedulernodeinfo.NodeInfo, 0, len(nodeInfoMap)) - havePodsWithAffinityNodeInfoList := make([]*schedulernodeinfo.NodeInfo, 0, len(nodeInfoMap)) + nodeInfoList := make([]*framework.NodeInfo, 0, len(nodeInfoMap)) + havePodsWithAffinityNodeInfoList := make([]*framework.NodeInfo, 0, len(nodeInfoMap)) for _, v := range nodeInfoMap { nodeInfoList = append(nodeInfoList, v) - if len(v.PodsWithAffinity()) > 0 { + if len(v.PodsWithAffinity) > 0 { havePodsWithAffinityNodeInfoList = append(havePodsWithAffinityNodeInfoList, v) } } @@ -70,12 +68,12 @@ func NewSnapshot(pods []*v1.Pod, nodes []*v1.Node) *Snapshot { // createNodeInfoMap obtains a list of pods and pivots that list into a map // where the keys are node names and the values are the aggregated information // for that node. -func createNodeInfoMap(pods []*v1.Pod, nodes []*v1.Node) map[string]*schedulernodeinfo.NodeInfo { - nodeNameToInfo := make(map[string]*schedulernodeinfo.NodeInfo) +func createNodeInfoMap(pods []*v1.Pod, nodes []*v1.Node) map[string]*framework.NodeInfo { + nodeNameToInfo := make(map[string]*framework.NodeInfo) for _, pod := range pods { nodeName := pod.Spec.NodeName if _, ok := nodeNameToInfo[nodeName]; !ok { - nodeNameToInfo[nodeName] = schedulernodeinfo.NewNodeInfo() + nodeNameToInfo[nodeName] = framework.NewNodeInfo() } nodeNameToInfo[nodeName].AddPod(pod) } @@ -83,22 +81,22 @@ func createNodeInfoMap(pods []*v1.Pod, nodes []*v1.Node) map[string]*schedulerno for _, node := range nodes { if _, ok := nodeNameToInfo[node.Name]; !ok { - nodeNameToInfo[node.Name] = schedulernodeinfo.NewNodeInfo() + nodeNameToInfo[node.Name] = framework.NewNodeInfo() } nodeInfo := nodeNameToInfo[node.Name] nodeInfo.SetNode(node) - nodeInfo.SetImageStates(getNodeImageStates(node, imageExistenceMap)) + nodeInfo.ImageStates = getNodeImageStates(node, imageExistenceMap) } return nodeNameToInfo } // getNodeImageStates returns the given node's image states based on the given imageExistence map. -func getNodeImageStates(node *v1.Node, imageExistenceMap map[string]sets.String) map[string]*schedulernodeinfo.ImageStateSummary { - imageStates := make(map[string]*schedulernodeinfo.ImageStateSummary) +func getNodeImageStates(node *v1.Node, imageExistenceMap map[string]sets.String) map[string]*framework.ImageStateSummary { + imageStates := make(map[string]*framework.ImageStateSummary) for _, image := range node.Status.Images { for _, name := range image.Names { - imageStates[name] = &schedulernodeinfo.ImageStateSummary{ + imageStates[name] = &framework.ImageStateSummary{ Size: image.SizeBytes, NumNodes: len(imageExistenceMap[name]), } @@ -124,13 +122,8 @@ func createImageExistenceMap(nodes []*v1.Node) map[string]sets.String { return imageExistenceMap } -// Pods returns a PodLister -func (s *Snapshot) Pods() schedulerlisters.PodLister { - return podLister(s.nodeInfoList) -} - // NodeInfos returns a NodeInfoLister. -func (s *Snapshot) NodeInfos() schedulerlisters.NodeInfoLister { +func (s *Snapshot) NodeInfos() framework.NodeInfoLister { return s } @@ -139,46 +132,18 @@ func (s *Snapshot) NumNodes() int { return len(s.nodeInfoList) } -type podLister []*schedulernodeinfo.NodeInfo - -// List returns the list of pods in the snapshot. -func (p podLister) List(selector labels.Selector) ([]*v1.Pod, error) { - alwaysTrue := func(*v1.Pod) bool { return true } - return p.FilteredList(alwaysTrue, selector) -} - -// FilteredList returns a filtered list of pods in the snapshot. -func (p podLister) FilteredList(filter schedulerlisters.PodFilter, selector labels.Selector) ([]*v1.Pod, error) { - // podFilter is expected to return true for most or all of the pods. We - // can avoid expensive array growth without wasting too much memory by - // pre-allocating capacity. - maxSize := 0 - for _, n := range p { - maxSize += len(n.Pods()) - } - pods := make([]*v1.Pod, 0, maxSize) - for _, n := range p { - for _, pod := range n.Pods() { - if filter(pod) && selector.Matches(labels.Set(pod.Labels)) { - pods = append(pods, pod) - } - } - } - return pods, nil -} - // List returns the list of nodes in the snapshot. -func (s *Snapshot) List() ([]*schedulernodeinfo.NodeInfo, error) { +func (s *Snapshot) List() ([]*framework.NodeInfo, error) { return s.nodeInfoList, nil } // HavePodsWithAffinityList returns the list of nodes with at least one pods with inter-pod affinity -func (s *Snapshot) HavePodsWithAffinityList() ([]*schedulernodeinfo.NodeInfo, error) { +func (s *Snapshot) HavePodsWithAffinityList() ([]*framework.NodeInfo, error) { return s.havePodsWithAffinityNodeInfoList, nil } // Get returns the NodeInfo of the given node name. -func (s *Snapshot) Get(nodeName string) (*schedulernodeinfo.NodeInfo, error) { +func (s *Snapshot) Get(nodeName string) (*framework.NodeInfo, error) { if v, ok := s.nodeInfoMap[nodeName]; ok && v.Node() != nil { return v, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/parallelize/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/parallelize/BUILD new file mode 100644 index 00000000000..d78eb1121ed --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/parallelize/BUILD @@ -0,0 +1,32 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "error_channel.go", + "parallelism.go", + ], + importpath = "k8s.io/kubernetes/pkg/scheduler/internal/parallelize", + visibility = ["//pkg/scheduler:__subpackages__"], + deps = ["//staging/src/k8s.io/client-go/util/workqueue:go_default_library"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) + +go_test( + name = "go_default_test", + srcs = ["error_channel_test.go"], + embed = [":go_default_library"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/util/error_channel.go b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/parallelize/error_channel.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/scheduler/util/error_channel.go rename to vendor/k8s.io/kubernetes/pkg/scheduler/internal/parallelize/error_channel.go index ef300a79d90..2eff825bae8 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/util/error_channel.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/parallelize/error_channel.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util +package parallelize import "context" diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/parallelize/parallelism.go b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/parallelize/parallelism.go new file mode 100644 index 00000000000..ab337deeca1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/parallelize/parallelism.go @@ -0,0 +1,43 @@ +/* +Copyright 2020 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 parallelize + +import ( + "context" + "math" + + "k8s.io/client-go/util/workqueue" +) + +const parallelism = 16 + +// chunkSizeFor returns a chunk size for the given number of items to use for +// parallel work. The size aims to produce good CPU utilization. +func chunkSizeFor(n int) workqueue.Options { + s := int(math.Sqrt(float64(n))) + if r := n/parallelism + 1; s > r { + s = r + } else if s < 1 { + s = 1 + } + return workqueue.WithChunkSize(s) +} + +// Until is a wrapper around workqueue.ParallelizeUntil to use in scheduling algorithms. +func Until(ctx context.Context, pieces int, doWorkPiece workqueue.DoWorkPieceFunc) { + workqueue.ParallelizeUntil(ctx, parallelism, pieces, doWorkPiece, chunkSizeFor(pieces)) +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/BUILD index cec893da3de..ab10f365df1 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/BUILD @@ -18,7 +18,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/scheduling_queue.go b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/scheduling_queue.go index a6ca8127c63..3ec0e6f159b 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/scheduling_queue.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/scheduling_queue.go @@ -29,7 +29,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -65,33 +65,28 @@ const ( // The interface follows a pattern similar to cache.FIFO and cache.Heap and // makes it easy to use those data structures as a SchedulingQueue. type SchedulingQueue interface { + framework.PodNominator Add(pod *v1.Pod) error // AddUnschedulableIfNotPresent adds an unschedulable pod back to scheduling queue. // The podSchedulingCycle represents the current scheduling cycle number which can be // returned by calling SchedulingCycle(). - AddUnschedulableIfNotPresent(pod *framework.PodInfo, podSchedulingCycle int64) error + AddUnschedulableIfNotPresent(pod *framework.QueuedPodInfo, podSchedulingCycle int64) error // SchedulingCycle returns the current number of scheduling cycle which is // cached by scheduling queue. Normally, incrementing this number whenever // a pod is popped (e.g. called Pop()) is enough. SchedulingCycle() int64 // Pop removes the head of the queue and returns it. It blocks if the // queue is empty and waits until a new item is added to the queue. - Pop() (*framework.PodInfo, error) + Pop() (*framework.QueuedPodInfo, error) Update(oldPod, newPod *v1.Pod) error Delete(pod *v1.Pod) error MoveAllToActiveOrBackoffQueue(event string) AssignedPodAdded(pod *v1.Pod) AssignedPodUpdated(pod *v1.Pod) - NominatedPodsForNode(nodeName string) []*v1.Pod PendingPods() []*v1.Pod // Close closes the SchedulingQueue so that the goroutine which is // waiting to pop items can exit gracefully. Close() - // UpdateNominatedPodForNode adds the given pod to the nominated pod map or - // updates it if it already exists. - UpdateNominatedPodForNode(pod *v1.Pod, nodeName string) - // DeleteNominatedPodIfExists deletes nominatedPod from internal cache - DeleteNominatedPodIfExists(pod *v1.Pod) // NumUnschedulablePods returns the number of unschedulable pods exist in the SchedulingQueue. NumUnschedulablePods() int // Run starts the goroutines managing the queue. @@ -116,6 +111,9 @@ func NominatedNodeName(pod *v1.Pod) string { // is called unschedulableQ. The third queue holds pods that are moved from // unschedulable queues and will be moved to active queue when backoff are completed. type PriorityQueue struct { + // PodNominator abstracts the operations to maintain nominated Pods. + framework.PodNominator + stop chan struct{} clock util.Clock @@ -135,9 +133,6 @@ type PriorityQueue struct { podBackoffQ *heap.Heap // unschedulableQ holds pods that have been tried and determined unschedulable. unschedulableQ *UnschedulablePodsMap - // nominatedPods is a structures that stores pods which are nominated to run - // on nodes. - nominatedPods *nominatedPodMap // schedulingCycle represents sequence number of scheduling cycle and is incremented // when a pod is popped. schedulingCycle int64 @@ -156,6 +151,7 @@ type priorityQueueOptions struct { clock util.Clock podInitialBackoffDuration time.Duration podMaxBackoffDuration time.Duration + podNominator framework.PodNominator } // Option configures a PriorityQueue @@ -168,20 +164,27 @@ func WithClock(clock util.Clock) Option { } } -// WithPodInitialBackoffDuration sets pod initial backoff duration for PriorityQueue, +// WithPodInitialBackoffDuration sets pod initial backoff duration for PriorityQueue. func WithPodInitialBackoffDuration(duration time.Duration) Option { return func(o *priorityQueueOptions) { o.podInitialBackoffDuration = duration } } -// WithPodMaxBackoffDuration sets pod max backoff duration for PriorityQueue, +// WithPodMaxBackoffDuration sets pod max backoff duration for PriorityQueue. func WithPodMaxBackoffDuration(duration time.Duration) Option { return func(o *priorityQueueOptions) { o.podMaxBackoffDuration = duration } } +// WithPodNominator sets pod nominator for PriorityQueue. +func WithPodNominator(pn framework.PodNominator) Option { + return func(o *priorityQueueOptions) { + o.podNominator = pn + } +} + var defaultPriorityQueueOptions = priorityQueueOptions{ clock: util.RealClock{}, podInitialBackoffDuration: DefaultPodInitialBackoffDuration, @@ -191,9 +194,9 @@ var defaultPriorityQueueOptions = priorityQueueOptions{ // Making sure that PriorityQueue implements SchedulingQueue. var _ SchedulingQueue = &PriorityQueue{} -// newPodInfoNoTimestamp builds a PodInfo object without timestamp. -func newPodInfoNoTimestamp(pod *v1.Pod) *framework.PodInfo { - return &framework.PodInfo{ +// newQueuedPodInfoNoTimestamp builds a QueuedPodInfo object without timestamp. +func newQueuedPodInfoNoTimestamp(pod *v1.Pod) *framework.QueuedPodInfo { + return &framework.QueuedPodInfo{ Pod: pod, } } @@ -209,19 +212,23 @@ func NewPriorityQueue( } comp := func(podInfo1, podInfo2 interface{}) bool { - pInfo1 := podInfo1.(*framework.PodInfo) - pInfo2 := podInfo2.(*framework.PodInfo) + pInfo1 := podInfo1.(*framework.QueuedPodInfo) + pInfo2 := podInfo2.(*framework.QueuedPodInfo) return lessFn(pInfo1, pInfo2) } + if options.podNominator == nil { + options.podNominator = NewPodNominator() + } + pq := &PriorityQueue{ + PodNominator: options.podNominator, clock: options.clock, stop: make(chan struct{}), podInitialBackoffDuration: options.podInitialBackoffDuration, podMaxBackoffDuration: options.podMaxBackoffDuration, activeQ: heap.NewWithRecorder(podInfoKeyFunc, comp, metrics.NewActivePodsRecorder()), unschedulableQ: newUnschedulablePodsMap(metrics.NewUnschedulablePodsRecorder()), - nominatedPods: newNominatedPodMap(), moveRequestCycle: -1, } pq.cond.L = &pq.lock @@ -241,7 +248,7 @@ func (p *PriorityQueue) Run() { func (p *PriorityQueue) Add(pod *v1.Pod) error { p.lock.Lock() defer p.lock.Unlock() - pInfo := p.newPodInfo(pod) + pInfo := p.newQueuedPodInfo(pod) if err := p.activeQ.Add(pInfo); err != nil { klog.Errorf("Error adding pod %v to the scheduling queue: %v", nsNameForPod(pod), err) return err @@ -255,7 +262,7 @@ func (p *PriorityQueue) Add(pod *v1.Pod) error { klog.Errorf("Error: pod %v is already in the podBackoff queue.", nsNameForPod(pod)) } metrics.SchedulerQueueIncomingPods.WithLabelValues("active", PodAdd).Inc() - p.nominatedPods.add(pod, "") + p.PodNominator.AddNominatedPod(pod, "") p.cond.Broadcast() return nil @@ -271,7 +278,7 @@ func nsNameForPod(pod *v1.Pod) ktypes.NamespacedName { // isPodBackingoff returns true if a pod is still waiting for its backoff timer. // If this returns true, the pod should not be re-tried. -func (p *PriorityQueue) isPodBackingoff(podInfo *framework.PodInfo) bool { +func (p *PriorityQueue) isPodBackingoff(podInfo *framework.QueuedPodInfo) bool { boTime := p.getBackoffTime(podInfo) return boTime.After(p.clock.Now()) } @@ -287,7 +294,7 @@ func (p *PriorityQueue) SchedulingCycle() int64 { // the queue, unless it is already in the queue. Normally, PriorityQueue puts // unschedulable pods in `unschedulableQ`. But if there has been a recent move // request, then the pod is put in `podBackoffQ`. -func (p *PriorityQueue) AddUnschedulableIfNotPresent(pInfo *framework.PodInfo, podSchedulingCycle int64) error { +func (p *PriorityQueue) AddUnschedulableIfNotPresent(pInfo *framework.QueuedPodInfo, podSchedulingCycle int64) error { p.lock.Lock() defer p.lock.Unlock() pod := pInfo.Pod @@ -316,9 +323,8 @@ func (p *PriorityQueue) AddUnschedulableIfNotPresent(pInfo *framework.PodInfo, p metrics.SchedulerQueueIncomingPods.WithLabelValues("unschedulable", ScheduleAttemptFailure).Inc() } - p.nominatedPods.add(pod, "") + p.PodNominator.AddNominatedPod(pod, "") return nil - } // flushBackoffQCompleted Moves all pods from backoffQ which have completed backoff in to activeQ @@ -330,8 +336,8 @@ func (p *PriorityQueue) flushBackoffQCompleted() { if rawPodInfo == nil { return } - pod := rawPodInfo.(*framework.PodInfo).Pod - boTime := p.getBackoffTime(rawPodInfo.(*framework.PodInfo)) + pod := rawPodInfo.(*framework.QueuedPodInfo).Pod + boTime := p.getBackoffTime(rawPodInfo.(*framework.QueuedPodInfo)) if boTime.After(p.clock.Now()) { return } @@ -352,7 +358,7 @@ func (p *PriorityQueue) flushUnschedulableQLeftover() { p.lock.Lock() defer p.lock.Unlock() - var podsToMove []*framework.PodInfo + var podsToMove []*framework.QueuedPodInfo currentTime := p.clock.Now() for _, pInfo := range p.unschedulableQ.podInfoMap { lastScheduleTime := pInfo.Timestamp @@ -369,7 +375,7 @@ func (p *PriorityQueue) flushUnschedulableQLeftover() { // Pop removes the head of the active queue and returns it. It blocks if the // activeQ is empty and waits until a new item is added to the queue. It // increments scheduling cycle when a pod is popped. -func (p *PriorityQueue) Pop() (*framework.PodInfo, error) { +func (p *PriorityQueue) Pop() (*framework.QueuedPodInfo, error) { p.lock.Lock() defer p.lock.Unlock() for p.activeQ.Len() == 0 { @@ -385,7 +391,7 @@ func (p *PriorityQueue) Pop() (*framework.PodInfo, error) { if err != nil { return nil, err } - pInfo := obj.(*framework.PodInfo) + pInfo := obj.(*framework.QueuedPodInfo) pInfo.Attempts++ p.schedulingCycle++ return pInfo, err @@ -413,17 +419,17 @@ func (p *PriorityQueue) Update(oldPod, newPod *v1.Pod) error { defer p.lock.Unlock() if oldPod != nil { - oldPodInfo := newPodInfoNoTimestamp(oldPod) + oldPodInfo := newQueuedPodInfoNoTimestamp(oldPod) // If the pod is already in the active queue, just update it there. if oldPodInfo, exists, _ := p.activeQ.Get(oldPodInfo); exists { - p.nominatedPods.update(oldPod, newPod) + p.PodNominator.UpdateNominatedPod(oldPod, newPod) err := p.activeQ.Update(updatePod(oldPodInfo, newPod)) return err } // If the pod is in the backoff queue, update it there. if oldPodInfo, exists, _ := p.podBackoffQ.Get(oldPodInfo); exists { - p.nominatedPods.update(oldPod, newPod) + p.PodNominator.UpdateNominatedPod(oldPod, newPod) p.podBackoffQ.Delete(oldPodInfo) err := p.activeQ.Add(updatePod(oldPodInfo, newPod)) if err == nil { @@ -435,7 +441,7 @@ func (p *PriorityQueue) Update(oldPod, newPod *v1.Pod) error { // If the pod is in the unschedulable queue, updating it may make it schedulable. if usPodInfo := p.unschedulableQ.get(newPod); usPodInfo != nil { - p.nominatedPods.update(oldPod, newPod) + p.PodNominator.UpdateNominatedPod(oldPod, newPod) if isPodUpdated(oldPod, newPod) { p.unschedulableQ.delete(usPodInfo.Pod) err := p.activeQ.Add(updatePod(usPodInfo, newPod)) @@ -449,9 +455,9 @@ func (p *PriorityQueue) Update(oldPod, newPod *v1.Pod) error { return nil } // If pod is not in any of the queues, we put it in the active queue. - err := p.activeQ.Add(p.newPodInfo(newPod)) + err := p.activeQ.Add(p.newQueuedPodInfo(newPod)) if err == nil { - p.nominatedPods.add(newPod, "") + p.PodNominator.AddNominatedPod(newPod, "") p.cond.Broadcast() } return err @@ -462,10 +468,10 @@ func (p *PriorityQueue) Update(oldPod, newPod *v1.Pod) error { func (p *PriorityQueue) Delete(pod *v1.Pod) error { p.lock.Lock() defer p.lock.Unlock() - p.nominatedPods.delete(pod) - err := p.activeQ.Delete(newPodInfoNoTimestamp(pod)) + p.PodNominator.DeleteNominatedPodIfExists(pod) + err := p.activeQ.Delete(newQueuedPodInfoNoTimestamp(pod)) if err != nil { // The item was probably not found in the activeQ. - p.podBackoffQ.Delete(newPodInfoNoTimestamp(pod)) + p.podBackoffQ.Delete(newQueuedPodInfoNoTimestamp(pod)) p.unschedulableQ.delete(pod) } return nil @@ -494,17 +500,15 @@ func (p *PriorityQueue) AssignedPodUpdated(pod *v1.Pod) { func (p *PriorityQueue) MoveAllToActiveOrBackoffQueue(event string) { p.lock.Lock() defer p.lock.Unlock() - unschedulablePods := make([]*framework.PodInfo, 0, len(p.unschedulableQ.podInfoMap)) + unschedulablePods := make([]*framework.QueuedPodInfo, 0, len(p.unschedulableQ.podInfoMap)) for _, pInfo := range p.unschedulableQ.podInfoMap { unschedulablePods = append(unschedulablePods, pInfo) } p.movePodsToActiveOrBackoffQueue(unschedulablePods, event) - p.moveRequestCycle = p.schedulingCycle - p.cond.Broadcast() } // NOTE: this function assumes lock has been acquired in caller -func (p *PriorityQueue) movePodsToActiveOrBackoffQueue(podInfoList []*framework.PodInfo, event string) { +func (p *PriorityQueue) movePodsToActiveOrBackoffQueue(podInfoList []*framework.QueuedPodInfo, event string) { for _, pInfo := range podInfoList { pod := pInfo.Pod if p.isPodBackingoff(pInfo) { @@ -530,49 +534,38 @@ func (p *PriorityQueue) movePodsToActiveOrBackoffQueue(podInfoList []*framework. // getUnschedulablePodsWithMatchingAffinityTerm returns unschedulable pods which have // any affinity term that matches "pod". // NOTE: this function assumes lock has been acquired in caller. -func (p *PriorityQueue) getUnschedulablePodsWithMatchingAffinityTerm(pod *v1.Pod) []*framework.PodInfo { - var podsToMove []*framework.PodInfo +func (p *PriorityQueue) getUnschedulablePodsWithMatchingAffinityTerm(pod *v1.Pod) []*framework.QueuedPodInfo { + var podsToMove []*framework.QueuedPodInfo for _, pInfo := range p.unschedulableQ.podInfoMap { up := pInfo.Pod - affinity := up.Spec.Affinity - if affinity != nil && affinity.PodAffinity != nil { - terms := util.GetPodAffinityTerms(affinity.PodAffinity) - for _, term := range terms { - namespaces := util.GetNamespacesFromPodAffinityTerm(up, &term) - selector, err := metav1.LabelSelectorAsSelector(term.LabelSelector) - if err != nil { - klog.Errorf("Error getting label selectors for pod: %v.", up.Name) - } - if util.PodMatchesTermsNamespaceAndSelector(pod, namespaces, selector) { - podsToMove = append(podsToMove, pInfo) - break - } + terms := util.GetPodAffinityTerms(up.Spec.Affinity) + for _, term := range terms { + namespaces := util.GetNamespacesFromPodAffinityTerm(up, &term) + selector, err := metav1.LabelSelectorAsSelector(term.LabelSelector) + if err != nil { + klog.Errorf("Error getting label selectors for pod: %v.", up.Name) + } + if util.PodMatchesTermsNamespaceAndSelector(pod, namespaces, selector) { + podsToMove = append(podsToMove, pInfo) + break } } + } return podsToMove } -// NominatedPodsForNode returns pods that are nominated to run on the given node, -// but they are waiting for other pods to be removed from the node before they -// can be actually scheduled. -func (p *PriorityQueue) NominatedPodsForNode(nodeName string) []*v1.Pod { - p.lock.RLock() - defer p.lock.RUnlock() - return p.nominatedPods.podsForNode(nodeName) -} - // PendingPods returns all the pending pods in the queue. This function is // used for debugging purposes in the scheduler cache dumper and comparer. func (p *PriorityQueue) PendingPods() []*v1.Pod { p.lock.RLock() defer p.lock.RUnlock() - result := []*v1.Pod{} + var result []*v1.Pod for _, pInfo := range p.activeQ.List() { - result = append(result, pInfo.(*framework.PodInfo).Pod) + result = append(result, pInfo.(*framework.QueuedPodInfo).Pod) } for _, pInfo := range p.podBackoffQ.List() { - result = append(result, pInfo.(*framework.PodInfo).Pod) + result = append(result, pInfo.(*framework.QueuedPodInfo).Pod) } for _, pInfo := range p.unschedulableQ.podInfoMap { result = append(result, pInfo.Pod) @@ -589,26 +582,36 @@ func (p *PriorityQueue) Close() { p.cond.Broadcast() } -// DeleteNominatedPodIfExists deletes pod nominatedPods. -func (p *PriorityQueue) DeleteNominatedPodIfExists(pod *v1.Pod) { - p.lock.Lock() - p.nominatedPods.delete(pod) - p.lock.Unlock() +// DeleteNominatedPodIfExists deletes from nominatedPods. +func (npm *nominatedPodMap) DeleteNominatedPodIfExists(pod *v1.Pod) { + npm.Lock() + npm.delete(pod) + npm.Unlock() } -// UpdateNominatedPodForNode adds a pod to the nominated pods of the given node. +// AddNominatedPod adds a pod to the nominated pods of the given node. // This is called during the preemption process after a node is nominated to run // the pod. We update the structure before sending a request to update the pod // object to avoid races with the following scheduling cycles. -func (p *PriorityQueue) UpdateNominatedPodForNode(pod *v1.Pod, nodeName string) { - p.lock.Lock() - p.nominatedPods.add(pod, nodeName) - p.lock.Unlock() +func (npm *nominatedPodMap) AddNominatedPod(pod *v1.Pod, nodeName string) { + npm.Lock() + npm.add(pod, nodeName) + npm.Unlock() +} + +// NominatedPodsForNode returns pods that are nominated to run on the given node, +// but they are waiting for other pods to be removed from the node. +func (npm *nominatedPodMap) NominatedPodsForNode(nodeName string) []*v1.Pod { + npm.RLock() + defer npm.RUnlock() + // TODO: we may need to return a copy of []*Pods to avoid modification + // on the caller side. + return npm.nominatedPods[nodeName] } func (p *PriorityQueue) podsCompareBackoffCompleted(podInfo1, podInfo2 interface{}) bool { - pInfo1 := podInfo1.(*framework.PodInfo) - pInfo2 := podInfo2.(*framework.PodInfo) + pInfo1 := podInfo1.(*framework.QueuedPodInfo) + pInfo2 := podInfo2.(*framework.QueuedPodInfo) bo1 := p.getBackoffTime(pInfo1) bo2 := p.getBackoffTime(pInfo2) return bo1.Before(bo2) @@ -621,10 +624,10 @@ func (p *PriorityQueue) NumUnschedulablePods() int { return len(p.unschedulableQ.podInfoMap) } -// newPodInfo builds a PodInfo object. -func (p *PriorityQueue) newPodInfo(pod *v1.Pod) *framework.PodInfo { +// newQueuedPodInfo builds a QueuedPodInfo object. +func (p *PriorityQueue) newQueuedPodInfo(pod *v1.Pod) *framework.QueuedPodInfo { now := p.clock.Now() - return &framework.PodInfo{ + return &framework.QueuedPodInfo{ Pod: pod, Timestamp: now, InitialAttemptTimestamp: now, @@ -632,7 +635,7 @@ func (p *PriorityQueue) newPodInfo(pod *v1.Pod) *framework.PodInfo { } // getBackoffTime returns the time that podInfo completes backoff -func (p *PriorityQueue) getBackoffTime(podInfo *framework.PodInfo) time.Time { +func (p *PriorityQueue) getBackoffTime(podInfo *framework.QueuedPodInfo) time.Time { duration := p.calculateBackoffDuration(podInfo) backoffTime := podInfo.Timestamp.Add(duration) return backoffTime @@ -640,7 +643,7 @@ func (p *PriorityQueue) getBackoffTime(podInfo *framework.PodInfo) time.Time { // calculateBackoffDuration is a helper function for calculating the backoffDuration // based on the number of attempts the pod has made. -func (p *PriorityQueue) calculateBackoffDuration(podInfo *framework.PodInfo) time.Duration { +func (p *PriorityQueue) calculateBackoffDuration(podInfo *framework.QueuedPodInfo) time.Duration { duration := p.podInitialBackoffDuration for i := 1; i < podInfo.Attempts; i++ { duration = duration * 2 @@ -651,8 +654,8 @@ func (p *PriorityQueue) calculateBackoffDuration(podInfo *framework.PodInfo) tim return duration } -func updatePod(oldPodInfo interface{}, newPod *v1.Pod) *framework.PodInfo { - pInfo := oldPodInfo.(*framework.PodInfo) +func updatePod(oldPodInfo interface{}, newPod *v1.Pod) *framework.QueuedPodInfo { + pInfo := oldPodInfo.(*framework.QueuedPodInfo) pInfo.Pod = newPod return pInfo } @@ -660,8 +663,8 @@ func updatePod(oldPodInfo interface{}, newPod *v1.Pod) *framework.PodInfo { // UnschedulablePodsMap holds pods that cannot be scheduled. This data structure // is used to implement unschedulableQ. type UnschedulablePodsMap struct { - // podInfoMap is a map key by a pod's full-name and the value is a pointer to the PodInfo. - podInfoMap map[string]*framework.PodInfo + // podInfoMap is a map key by a pod's full-name and the value is a pointer to the QueuedPodInfo. + podInfoMap map[string]*framework.QueuedPodInfo keyFunc func(*v1.Pod) string // metricRecorder updates the counter when elements of an unschedulablePodsMap // get added or removed, and it does nothing if it's nil @@ -669,7 +672,7 @@ type UnschedulablePodsMap struct { } // Add adds a pod to the unschedulable podInfoMap. -func (u *UnschedulablePodsMap) addOrUpdate(pInfo *framework.PodInfo) { +func (u *UnschedulablePodsMap) addOrUpdate(pInfo *framework.QueuedPodInfo) { podID := u.keyFunc(pInfo.Pod) if _, exists := u.podInfoMap[podID]; !exists && u.metricRecorder != nil { u.metricRecorder.Inc() @@ -686,9 +689,9 @@ func (u *UnschedulablePodsMap) delete(pod *v1.Pod) { delete(u.podInfoMap, podID) } -// Get returns the PodInfo if a pod with the same key as the key of the given "pod" +// Get returns the QueuedPodInfo if a pod with the same key as the key of the given "pod" // is found in the map. It returns nil otherwise. -func (u *UnschedulablePodsMap) get(pod *v1.Pod) *framework.PodInfo { +func (u *UnschedulablePodsMap) get(pod *v1.Pod) *framework.QueuedPodInfo { podKey := u.keyFunc(pod) if pInfo, exists := u.podInfoMap[podKey]; exists { return pInfo @@ -698,7 +701,7 @@ func (u *UnschedulablePodsMap) get(pod *v1.Pod) *framework.PodInfo { // Clear removes all the entries from the unschedulable podInfoMap. func (u *UnschedulablePodsMap) clear() { - u.podInfoMap = make(map[string]*framework.PodInfo) + u.podInfoMap = make(map[string]*framework.QueuedPodInfo) if u.metricRecorder != nil { u.metricRecorder.Clear() } @@ -707,7 +710,7 @@ func (u *UnschedulablePodsMap) clear() { // newUnschedulablePodsMap initializes a new object of UnschedulablePodsMap. func newUnschedulablePodsMap(metricRecorder metrics.MetricRecorder) *UnschedulablePodsMap { return &UnschedulablePodsMap{ - podInfoMap: make(map[string]*framework.PodInfo), + podInfoMap: make(map[string]*framework.QueuedPodInfo), keyFunc: util.GetPodFullName, metricRecorder: metricRecorder, } @@ -725,6 +728,8 @@ type nominatedPodMap struct { // nominatedPodToNode is map keyed by a Pod UID to the node name where it is // nominated. nominatedPodToNode map[ktypes.UID]string + + sync.RWMutex } func (npm *nominatedPodMap) add(p *v1.Pod, nodeName string) { @@ -766,7 +771,10 @@ func (npm *nominatedPodMap) delete(p *v1.Pod) { delete(npm.nominatedPodToNode, p.UID) } -func (npm *nominatedPodMap) update(oldPod, newPod *v1.Pod) { +// UpdateNominatedPod updates the with . +func (npm *nominatedPodMap) UpdateNominatedPod(oldPod, newPod *v1.Pod) { + npm.Lock() + defer npm.Unlock() // In some cases, an Update event with no "NominatedNode" present is received right // after a node("NominatedNode") is reserved for this pod in memory. // In this case, we need to keep reserving the NominatedNode when updating the pod pointer. @@ -787,14 +795,8 @@ func (npm *nominatedPodMap) update(oldPod, newPod *v1.Pod) { npm.add(newPod, nodeName) } -func (npm *nominatedPodMap) podsForNode(nodeName string) []*v1.Pod { - if list, ok := npm.nominatedPods[nodeName]; ok { - return list - } - return nil -} - -func newNominatedPodMap() *nominatedPodMap { +// NewPodNominator creates a nominatedPodMap as a backing of framework.PodNominator. +func NewPodNominator() framework.PodNominator { return &nominatedPodMap{ nominatedPods: make(map[string][]*v1.Pod), nominatedPodToNode: make(map[ktypes.UID]string), @@ -803,8 +805,8 @@ func newNominatedPodMap() *nominatedPodMap { // MakeNextPodFunc returns a function to retrieve the next pod from a given // scheduling queue -func MakeNextPodFunc(queue SchedulingQueue) func() *framework.PodInfo { - return func() *framework.PodInfo { +func MakeNextPodFunc(queue SchedulingQueue) func() *framework.QueuedPodInfo { + return func() *framework.QueuedPodInfo { podInfo, err := queue.Pop() if err == nil { klog.V(4).Infof("About to try and schedule pod %v/%v", podInfo.Pod.Namespace, podInfo.Pod.Name) @@ -816,5 +818,5 @@ func MakeNextPodFunc(queue SchedulingQueue) func() *framework.PodInfo { } func podInfoKeyFunc(obj interface{}) (string, error) { - return cache.MetaNamespaceKeyFunc(obj.(*framework.PodInfo).Pod) + return cache.MetaNamespaceKeyFunc(obj.(*framework.QueuedPodInfo).Pod) } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/listers/listers.go b/vendor/k8s.io/kubernetes/pkg/scheduler/listers/listers.go deleted file mode 100644 index 5efcbc82b29..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/listers/listers.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright 2019 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 listers - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" - v1listers "k8s.io/client-go/listers/core/v1" - schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo" -) - -// PodFilter is a function to filter a pod. If pod passed return true else return false. -type PodFilter func(*v1.Pod) bool - -// PodLister interface represents anything that can list pods for a scheduler. -type PodLister interface { - // Returns the list of pods. - List(labels.Selector) ([]*v1.Pod, error) - // This is similar to "List()", but the returned slice does not - // contain pods that don't pass `podFilter`. - FilteredList(podFilter PodFilter, selector labels.Selector) ([]*v1.Pod, error) -} - -// NodeInfoLister interface represents anything that can list/get NodeInfo objects from node name. -type NodeInfoLister interface { - // Returns the list of NodeInfos. - List() ([]*schedulernodeinfo.NodeInfo, error) - // Returns the list of NodeInfos of nodes with pods with affinity terms. - HavePodsWithAffinityList() ([]*schedulernodeinfo.NodeInfo, error) - // Returns the NodeInfo of the given node name. - Get(nodeName string) (*schedulernodeinfo.NodeInfo, error) -} - -// SharedLister groups scheduler-specific listers. -type SharedLister interface { - Pods() PodLister - NodeInfos() NodeInfoLister -} - -// GetPodServices gets the services that have the selector that match the labels on the given pod. -// TODO: this should be moved to ServiceAffinity plugin once that plugin is ready. -func GetPodServices(serviceLister v1listers.ServiceLister, pod *v1.Pod) ([]*v1.Service, error) { - allServices, err := serviceLister.Services(pod.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - var services []*v1.Service - for i := range allServices { - service := allServices[i] - if service.Spec.Selector == nil { - // services with nil selectors match nothing, not everything. - continue - } - selector := labels.Set(service.Spec.Selector).AsSelectorPreValidated() - if selector.Matches(labels.Set(pod.Labels)) { - services = append(services, service) - } - } - - return services, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/BUILD index 7cd56dda5b3..e31dcb266c8 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/BUILD @@ -7,6 +7,7 @@ go_library( srcs = [ "metric_recorder.go", "metrics.go", + "profile_metrics.go", ], importpath = "k8s.io/kubernetes/pkg/scheduler/metrics", deps = [ diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/metrics.go b/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/metrics.go index 297fc46407a..08167a356a3 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/metrics.go @@ -54,21 +54,12 @@ var ( Name: "schedule_attempts_total", Help: "Number of attempts to schedule pods, by the result. 'unschedulable' means a pod could not be scheduled, while 'error' means an internal scheduler problem.", StabilityLevel: metrics.ALPHA, - }, []string{"result"}) - // PodScheduleSuccesses counts how many pods were scheduled. - // This metric will be initialized again in Register() to assure the metric is not no-op metric. - PodScheduleSuccesses = scheduleAttempts.With(metrics.Labels{"result": "scheduled"}) - // PodScheduleFailures counts how many pods could not be scheduled. - // This metric will be initialized again in Register() to assure the metric is not no-op metric. - PodScheduleFailures = scheduleAttempts.With(metrics.Labels{"result": "unschedulable"}) - // PodScheduleErrors counts how many pods could not be scheduled due to a scheduler error. - // This metric will be initialized again in Register() to assure the metric is not no-op metric. - PodScheduleErrors = scheduleAttempts.With(metrics.Labels{"result": "error"}) + }, []string{"result", "profile"}) DeprecatedSchedulingDuration = metrics.NewSummaryVec( &metrics.SummaryOpts{ Subsystem: SchedulerSubsystem, Name: DeprecatedSchedulingDurationName, - Help: "Scheduling latency in seconds split by sub-parts of the scheduling operation", + Help: "Scheduling latency in seconds split by sub-parts of the scheduling operation (Deprecated since 1.19.0)", // Make the sliding window of 5h. // TODO: The value for this should be based on some SLI definition (long term). MaxAge: 5 * time.Hour, @@ -77,15 +68,14 @@ var ( }, []string{OperationLabel}, ) - E2eSchedulingLatency = metrics.NewHistogram( + e2eSchedulingLatency = metrics.NewHistogramVec( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, Name: "e2e_scheduling_duration_seconds", Help: "E2e scheduling latency in seconds (scheduling algorithm + binding)", Buckets: metrics.ExponentialBuckets(0.001, 2, 15), StabilityLevel: metrics.ALPHA, - }, - ) + }, []string{"result", "profile"}) SchedulingAlgorithmLatency = metrics.NewHistogram( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, @@ -99,7 +89,7 @@ var ( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, Name: "scheduling_algorithm_predicate_evaluation_seconds", - Help: "Scheduling algorithm predicate evaluation duration in seconds", + Help: "Scheduling algorithm predicate evaluation duration in seconds (Deprecated since 1.19.0)", Buckets: metrics.ExponentialBuckets(0.001, 2, 15), StabilityLevel: metrics.ALPHA, DeprecatedVersion: "1.19.0", @@ -109,7 +99,7 @@ var ( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, Name: "scheduling_algorithm_priority_evaluation_seconds", - Help: "Scheduling algorithm priority evaluation duration in seconds", + Help: "Scheduling algorithm priority evaluation duration in seconds (Deprecated since 1.19.0)", Buckets: metrics.ExponentialBuckets(0.001, 2, 15), StabilityLevel: metrics.ALPHA, DeprecatedVersion: "1.19.0", @@ -136,7 +126,7 @@ var ( PreemptionVictims = metrics.NewHistogram( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, - Name: "pod_preemption_victims", + Name: "preemption_victims", Help: "Number of selected preemption victims", // we think #victims>50 is pretty rare, therefore [50, +Inf) is considered a single bucket. Buckets: metrics.LinearBuckets(5, 5, 10), @@ -145,7 +135,7 @@ var ( PreemptionAttempts = metrics.NewCounter( &metrics.CounterOpts{ Subsystem: SchedulerSubsystem, - Name: "total_preemption_attempts", + Name: "preemption_attempts_total", Help: "Total preemption attempts in the cluster till now", StabilityLevel: metrics.ALPHA, }) @@ -164,15 +154,16 @@ var ( StabilityLevel: metrics.ALPHA, }, []string{"work"}) - PodSchedulingDuration = metrics.NewHistogram( + PodSchedulingDuration = metrics.NewHistogramVec( &metrics.HistogramOpts{ Subsystem: SchedulerSubsystem, Name: "pod_scheduling_duration_seconds", Help: "E2e latency for a pod being scheduled which may include multiple scheduling attempts.", - // Start with 1ms with the last bucket being [~16s, Inf) - Buckets: metrics.ExponentialBuckets(0.001, 2, 15), + // Start with 10ms with the last bucket being [~88m, Inf). + Buckets: metrics.ExponentialBuckets(0.01, 2, 20), StabilityLevel: metrics.ALPHA, - }) + }, + []string{"attempts"}) PodSchedulingAttempts = metrics.NewHistogram( &metrics.HistogramOpts{ @@ -192,7 +183,7 @@ var ( Buckets: metrics.ExponentialBuckets(0.0001, 2, 12), StabilityLevel: metrics.ALPHA, }, - []string{"extension_point", "status"}) + []string{"extension_point", "status", "profile"}) PluginExecutionDuration = metrics.NewHistogramVec( &metrics.HistogramOpts{ @@ -235,7 +226,7 @@ var ( metricsList = []metrics.Registerable{ scheduleAttempts, DeprecatedSchedulingDuration, - E2eSchedulingLatency, + e2eSchedulingLatency, SchedulingAlgorithmLatency, BindingLatency, DeprecatedSchedulingAlgorithmPredicateEvaluationSecondsDuration, @@ -261,16 +252,19 @@ var registerMetrics sync.Once func Register() { // Register the metrics. registerMetrics.Do(func() { - for _, metric := range metricsList { - legacyregistry.MustRegister(metric) - } + RegisterMetrics(metricsList...) volumeschedulingmetrics.RegisterVolumeSchedulingMetrics() - PodScheduleSuccesses = scheduleAttempts.With(metrics.Labels{"result": "scheduled"}) - PodScheduleFailures = scheduleAttempts.With(metrics.Labels{"result": "unschedulable"}) - PodScheduleErrors = scheduleAttempts.With(metrics.Labels{"result": "error"}) }) } +// RegisterMetrics registers a list of metrics. +// This function is exported because it is intended to be used by out-of-tree plugins to register their custom metrics. +func RegisterMetrics(extraMetrics ...metrics.Registerable) { + for _, metric := range extraMetrics { + legacyregistry.MustRegister(metric) + } +} + // GetGather returns the gatherer. It used by test case outside current package. func GetGather() metrics.Gatherer { return legacyregistry.DefaultGatherer diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/profile_metrics.go b/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/profile_metrics.go new file mode 100644 index 00000000000..c570e28a9bd --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/profile_metrics.go @@ -0,0 +1,48 @@ +/* +Copyright 2020 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 metrics + +// This file contains helpers for metrics that are associated to a profile. + +var ( + scheduledResult = "scheduled" + unschedulableResult = "unschedulable" + errorResult = "error" +) + +// PodScheduled can records a successful scheduling attempt and the duration +// since `start`. +func PodScheduled(profile string, duration float64) { + observeScheduleAttemptAndLatency(scheduledResult, profile, duration) +} + +// PodUnschedulable can records a scheduling attempt for an unschedulable pod +// and the duration since `start`. +func PodUnschedulable(profile string, duration float64) { + observeScheduleAttemptAndLatency(unschedulableResult, profile, duration) +} + +// PodScheduleError can records a scheduling attempt that had an error and the +// duration since `start`. +func PodScheduleError(profile string, duration float64) { + observeScheduleAttemptAndLatency(errorResult, profile, duration) +} + +func observeScheduleAttemptAndLatency(result, profile string, duration float64) { + e2eSchedulingLatency.WithLabelValues(result, profile).Observe(duration) + scheduleAttempts.WithLabelValues(result, profile).Inc() +} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/nodeinfo/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/nodeinfo/BUILD deleted file mode 100644 index 73db356e5dc..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/nodeinfo/BUILD +++ /dev/null @@ -1,49 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "host_ports.go", - "node_info.go", - ], - importpath = "k8s.io/kubernetes/pkg/scheduler/nodeinfo", - visibility = ["//visibility:public"], - deps = [ - "//pkg/apis/core/v1/helper:go_default_library", - "//pkg/features:go_default_library", - "//pkg/scheduler/util:go_default_library", - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "host_ports_test.go", - "node_info_test.go", - ], - embed = [":go_default_library"], - deps = [ - "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/nodeinfo/host_ports.go b/vendor/k8s.io/kubernetes/pkg/scheduler/nodeinfo/host_ports.go deleted file mode 100644 index 8f1090ff706..00000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/nodeinfo/host_ports.go +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright 2018 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 nodeinfo - -import ( - "k8s.io/api/core/v1" -) - -// DefaultBindAllHostIP defines the default ip address used to bind to all host. -const DefaultBindAllHostIP = "0.0.0.0" - -// ProtocolPort represents a protocol port pair, e.g. tcp:80. -type ProtocolPort struct { - Protocol string - Port int32 -} - -// NewProtocolPort creates a ProtocolPort instance. -func NewProtocolPort(protocol string, port int32) *ProtocolPort { - pp := &ProtocolPort{ - Protocol: protocol, - Port: port, - } - - if len(pp.Protocol) == 0 { - pp.Protocol = string(v1.ProtocolTCP) - } - - return pp -} - -// HostPortInfo stores mapping from ip to a set of ProtocolPort -type HostPortInfo map[string]map[ProtocolPort]struct{} - -// Add adds (ip, protocol, port) to HostPortInfo -func (h HostPortInfo) Add(ip, protocol string, port int32) { - if port <= 0 { - return - } - - h.sanitize(&ip, &protocol) - - pp := NewProtocolPort(protocol, port) - if _, ok := h[ip]; !ok { - h[ip] = map[ProtocolPort]struct{}{ - *pp: {}, - } - return - } - - h[ip][*pp] = struct{}{} -} - -// Remove removes (ip, protocol, port) from HostPortInfo -func (h HostPortInfo) Remove(ip, protocol string, port int32) { - if port <= 0 { - return - } - - h.sanitize(&ip, &protocol) - - pp := NewProtocolPort(protocol, port) - if m, ok := h[ip]; ok { - delete(m, *pp) - if len(h[ip]) == 0 { - delete(h, ip) - } - } -} - -// Len returns the total number of (ip, protocol, port) tuple in HostPortInfo -func (h HostPortInfo) Len() int { - length := 0 - for _, m := range h { - length += len(m) - } - return length -} - -// CheckConflict checks if the input (ip, protocol, port) conflicts with the existing -// ones in HostPortInfo. -func (h HostPortInfo) CheckConflict(ip, protocol string, port int32) bool { - if port <= 0 { - return false - } - - h.sanitize(&ip, &protocol) - - pp := NewProtocolPort(protocol, port) - - // If ip is 0.0.0.0 check all IP's (protocol, port) pair - if ip == DefaultBindAllHostIP { - for _, m := range h { - if _, ok := m[*pp]; ok { - return true - } - } - return false - } - - // If ip isn't 0.0.0.0, only check IP and 0.0.0.0's (protocol, port) pair - for _, key := range []string{DefaultBindAllHostIP, ip} { - if m, ok := h[key]; ok { - if _, ok2 := m[*pp]; ok2 { - return true - } - } - } - - return false -} - -// sanitize the parameters -func (h HostPortInfo) sanitize(ip, protocol *string) { - if len(*ip) == 0 { - *ip = DefaultBindAllHostIP - } - if len(*protocol) == 0 { - *protocol = string(v1.ProtocolTCP) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/profile/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/profile/BUILD index fce95fc5ae6..8dee306ce40 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/profile/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/profile/BUILD @@ -7,6 +7,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", @@ -35,9 +36,10 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/scheduler/apis/config:go_default_library", + "//pkg/scheduler/framework/runtime:go_default_library", "//pkg/scheduler/framework/v1alpha1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", - "//staging/src/k8s.io/api/events/v1beta1:go_default_library", + "//staging/src/k8s.io/api/events/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/tools/events:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/profile/profile.go b/vendor/k8s.io/kubernetes/pkg/scheduler/profile/profile.go index 39f94b9ba19..0dc28324502 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/profile/profile.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/profile/profile.go @@ -26,6 +26,7 @@ import ( "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/events" "k8s.io/kubernetes/pkg/scheduler/apis/config" + frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" ) @@ -33,24 +34,28 @@ import ( type RecorderFactory func(string) events.EventRecorder // FrameworkFactory builds a Framework for a given profile configuration. -type FrameworkFactory func(config.KubeSchedulerProfile) (framework.Framework, error) +type FrameworkFactory func(config.KubeSchedulerProfile, ...frameworkruntime.Option) (framework.Framework, error) // Profile is a scheduling profile. type Profile struct { framework.Framework Recorder events.EventRecorder + Name string } // NewProfile builds a Profile for the given configuration. -func NewProfile(cfg config.KubeSchedulerProfile, frameworkFact FrameworkFactory, recorderFact RecorderFactory) (*Profile, error) { - f, err := frameworkFact(cfg) +func NewProfile(cfg config.KubeSchedulerProfile, frameworkFact FrameworkFactory, recorderFact RecorderFactory, + opts ...frameworkruntime.Option) (*Profile, error) { + recorder := recorderFact(cfg.SchedulerName) + opts = append(opts, frameworkruntime.WithEventRecorder(recorder), frameworkruntime.WithProfileName(cfg.SchedulerName)) + fwk, err := frameworkFact(cfg, opts...) if err != nil { return nil, err } - r := recorderFact(cfg.SchedulerName) return &Profile{ - Framework: f, - Recorder: r, + Name: cfg.SchedulerName, + Framework: fwk, + Recorder: recorder, }, nil } @@ -58,7 +63,8 @@ func NewProfile(cfg config.KubeSchedulerProfile, frameworkFact FrameworkFactory, type Map map[string]*Profile // NewMap builds the profiles given by the configuration, indexed by name. -func NewMap(cfgs []config.KubeSchedulerProfile, frameworkFact FrameworkFactory, recorderFact RecorderFactory) (Map, error) { +func NewMap(cfgs []config.KubeSchedulerProfile, frameworkFact FrameworkFactory, recorderFact RecorderFactory, + opts ...frameworkruntime.Option) (Map, error) { m := make(Map) v := cfgValidator{m: m} @@ -66,7 +72,7 @@ func NewMap(cfgs []config.KubeSchedulerProfile, frameworkFact FrameworkFactory, if err := v.validate(cfg); err != nil { return nil, err } - p, err := NewProfile(cfg, frameworkFact, recorderFact) + p, err := NewProfile(cfg, frameworkFact, recorderFact, opts...) if err != nil { return nil, fmt.Errorf("creating profile for scheduler name %s: %v", cfg.SchedulerName, err) } @@ -91,7 +97,7 @@ func NewRecorderFactory(b events.EventBroadcaster) RecorderFactory { type cfgValidator struct { m Map queueSort string - queueSortArgs runtime.Unknown + queueSortArgs runtime.Object } func (v *cfgValidator) validate(cfg config.KubeSchedulerProfile) error { @@ -108,7 +114,7 @@ func (v *cfgValidator) validate(cfg config.KubeSchedulerProfile) error { return fmt.Errorf("one queue sort plugin required for profile with scheduler name %q", cfg.SchedulerName) } queueSort := cfg.Plugins.QueueSort.Enabled[0].Name - var queueSortArgs runtime.Unknown + var queueSortArgs runtime.Object for _, plCfg := range cfg.PluginConfig { if plCfg.Name == queueSort { queueSortArgs = plCfg.Args @@ -123,7 +129,7 @@ func (v *cfgValidator) validate(cfg config.KubeSchedulerProfile) error { return fmt.Errorf("different queue sort plugins for profile %q: %q, first: %q", cfg.SchedulerName, queueSort, v.queueSort) } if !cmp.Equal(v.queueSortArgs, queueSortArgs) { - return fmt.Errorf("different queue sort plugin args for profile %q: %s", cfg.SchedulerName, queueSortArgs.Raw) + return fmt.Errorf("different queue sort plugin args for profile %q", cfg.SchedulerName) } return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/scheduler.go b/vendor/k8s.io/kubernetes/pkg/scheduler/scheduler.go index e0bc2759bc4..7181e67ee3c 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/scheduler.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/scheduler.go @@ -22,58 +22,39 @@ import ( "io/ioutil" "math/rand" "os" + "strconv" "time" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" - utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/informers" coreinformers "k8s.io/client-go/informers/core/v1" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" - "k8s.io/klog" + "k8s.io/klog/v2" podutil "k8s.io/kubernetes/pkg/api/v1/pod" - "k8s.io/kubernetes/pkg/controller/volume/scheduling" - kubefeatures "k8s.io/kubernetes/pkg/features" schedulerapi "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/scheme" "k8s.io/kubernetes/pkg/scheduler/core" frameworkplugins "k8s.io/kubernetes/pkg/scheduler/framework/plugins" + frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime" framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1" internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache" internalqueue "k8s.io/kubernetes/pkg/scheduler/internal/queue" "k8s.io/kubernetes/pkg/scheduler/metrics" "k8s.io/kubernetes/pkg/scheduler/profile" + "k8s.io/kubernetes/pkg/scheduler/util" ) const ( - // BindTimeoutSeconds defines the default bind timeout - BindTimeoutSeconds = 100 // SchedulerError is the reason recorded for events when an error occurs during scheduling a pod. SchedulerError = "SchedulerError" // Percentage of plugin metrics to be sampled. pluginMetricsSamplePercent = 10 ) -// podConditionUpdater updates the condition of a pod based on the passed -// PodCondition -// TODO (ahmad-diaa): Remove type and replace it with scheduler methods -type podConditionUpdater interface { - update(pod *v1.Pod, podCondition *v1.PodCondition) error -} - -// PodPreemptor has methods needed to delete a pod and to update 'NominatedPod' -// field of the preemptor pod. -// TODO (ahmad-diaa): Remove type and replace it with scheduler methods -type podPreemptor interface { - getUpdatedPod(pod *v1.Pod) (*v1.Pod, error) - deletePod(pod *v1.Pod) error - setNominatedNodeName(pod *v1.Pod, nominatedNode string) error - removeNominatedNodeName(pod *v1.Pod) error -} - // Scheduler watches for new unscheduled pods. It attempts to find // nodes that they fit on and writes bindings back to the api server. type Scheduler struct { @@ -82,33 +63,20 @@ type Scheduler struct { SchedulerCache internalcache.Cache Algorithm core.ScheduleAlgorithm - // PodConditionUpdater is used only in case of scheduling errors. If we succeed - // with scheduling, PodScheduled condition will be updated in apiserver in /bind - // handler so that binding and setting PodCondition it is atomic. - podConditionUpdater podConditionUpdater - // PodPreemptor is used to evict pods and update 'NominatedNode' field of - // the preemptor pod. - podPreemptor podPreemptor // NextPod should be a function that blocks until the next pod // is available. We don't use a channel for this, because scheduling // a pod may take some amount of time and we don't want pods to get // stale while they sit in a channel. - NextPod func() *framework.PodInfo + NextPod func() *framework.QueuedPodInfo // Error is called if there is an error. It is passed the pod in // question, and the error - Error func(*framework.PodInfo, error) + Error func(*framework.QueuedPodInfo, error) // Close this to shut down the scheduler. StopEverything <-chan struct{} - // VolumeBinder handles PVC/PV binding for the pod. - VolumeBinder scheduling.SchedulerVolumeBinder - - // Disable pod preemption or not. - DisablePreemption bool - // SchedulingQueue holds pods to be scheduled SchedulingQueue internalqueue.SchedulingQueue @@ -116,6 +84,8 @@ type Scheduler struct { Profiles profile.Map scheduledPodsHasSynced func() bool + + client clientset.Interface } // Cache returns the cache in scheduler for test to check the data in scheduler. @@ -125,15 +95,14 @@ func (sched *Scheduler) Cache() internalcache.Cache { type schedulerOptions struct { schedulerAlgorithmSource schedulerapi.SchedulerAlgorithmSource - disablePreemption bool percentageOfNodesToScore int32 - bindTimeoutSeconds int64 podInitialBackoffSeconds int64 podMaxBackoffSeconds int64 // Contains out-of-tree plugins to be merged with the in-tree registry. - frameworkOutOfTreeRegistry framework.Registry + frameworkOutOfTreeRegistry frameworkruntime.Registry profiles []schedulerapi.KubeSchedulerProfile extenders []schedulerapi.Extender + frameworkCapturer FrameworkCapturer } // Option configures a Scheduler @@ -154,13 +123,6 @@ func WithAlgorithmSource(source schedulerapi.SchedulerAlgorithmSource) Option { } } -// WithPreemptionDisabled sets disablePreemption for Scheduler, the default value is false -func WithPreemptionDisabled(disablePreemption bool) Option { - return func(o *schedulerOptions) { - o.disablePreemption = disablePreemption - } -} - // WithPercentageOfNodesToScore sets percentageOfNodesToScore for Scheduler, the default value is 50 func WithPercentageOfNodesToScore(percentageOfNodesToScore int32) Option { return func(o *schedulerOptions) { @@ -168,16 +130,9 @@ func WithPercentageOfNodesToScore(percentageOfNodesToScore int32) Option { } } -// WithBindTimeoutSeconds sets bindTimeoutSeconds for Scheduler, the default value is 100 -func WithBindTimeoutSeconds(bindTimeoutSeconds int64) Option { - return func(o *schedulerOptions) { - o.bindTimeoutSeconds = bindTimeoutSeconds - } -} - // WithFrameworkOutOfTreeRegistry sets the registry for out-of-tree plugins. Those plugins // will be appended to the default registry. -func WithFrameworkOutOfTreeRegistry(registry framework.Registry) Option { +func WithFrameworkOutOfTreeRegistry(registry frameworkruntime.Registry) Option { return func(o *schedulerOptions) { o.frameworkOutOfTreeRegistry = registry } @@ -204,6 +159,16 @@ func WithExtenders(e ...schedulerapi.Extender) Option { } } +// FrameworkCapturer is used for registering a notify function in building framework. +type FrameworkCapturer func(schedulerapi.KubeSchedulerProfile) + +// WithBuildFrameworkCapturer sets a notify function for getting buildFramework details. +func WithBuildFrameworkCapturer(fc FrameworkCapturer) Option { + return func(o *schedulerOptions) { + o.frameworkCapturer = fc + } +} + var defaultSchedulerOptions = schedulerOptions{ profiles: []schedulerapi.KubeSchedulerProfile{ // Profiles' default plugins are set from the algorithm provider. @@ -212,9 +177,7 @@ var defaultSchedulerOptions = schedulerOptions{ schedulerAlgorithmSource: schedulerapi.SchedulerAlgorithmSource{ Provider: defaultAlgorithmSourceProviderName(), }, - disablePreemption: false, percentageOfNodesToScore: schedulerapi.DefaultPercentageOfNodesToScore, - bindTimeoutSeconds: BindTimeoutSeconds, podInitialBackoffSeconds: int64(internalqueue.DefaultPodInitialBackoffDuration.Seconds()), podMaxBackoffSeconds: int64(internalqueue.DefaultPodMaxBackoffDuration.Seconds()), } @@ -238,15 +201,6 @@ func New(client clientset.Interface, } schedulerCache := internalcache.New(30*time.Second, stopEverything) - volumeBinder := scheduling.NewVolumeBinder( - client, - informerFactory.Core().V1().Nodes(), - informerFactory.Storage().V1().CSINodes(), - informerFactory.Core().V1().PersistentVolumeClaims(), - informerFactory.Core().V1().PersistentVolumes(), - informerFactory.Storage().V1().StorageClasses(), - time.Duration(options.bindTimeoutSeconds)*time.Second, - ) registry := frameworkplugins.NewInTreeRegistry() if err := registry.Merge(options.frameworkOutOfTreeRegistry); err != nil { @@ -260,19 +214,16 @@ func New(client clientset.Interface, recorderFactory: recorderFactory, informerFactory: informerFactory, podInformer: podInformer, - volumeBinder: volumeBinder, schedulerCache: schedulerCache, StopEverything: stopEverything, - disablePreemption: options.disablePreemption, percentageOfNodesToScore: options.percentageOfNodesToScore, - bindTimeoutSeconds: options.bindTimeoutSeconds, podInitialBackoffSeconds: options.podInitialBackoffSeconds, podMaxBackoffSeconds: options.podMaxBackoffSeconds, - enableNonPreempting: utilfeature.DefaultFeatureGate.Enabled(kubefeatures.NonPreemptingPriority), profiles: append([]schedulerapi.KubeSchedulerProfile(nil), options.profiles...), registry: registry, nodeInfoSnapshot: snapshot, extenders: options.extenders, + frameworkCapturer: options.frameworkCapturer, } metrics.Register() @@ -313,10 +264,8 @@ func New(client clientset.Interface, return nil, fmt.Errorf("unsupported algorithm source: %v", source) } // Additional tweaks to the config produced by the configurator. - sched.DisablePreemption = options.disablePreemption sched.StopEverything = stopEverything - sched.podConditionUpdater = &podConditionUpdaterImpl{client} - sched.podPreemptor = &podPreemptorImpl{client} + sched.client = client sched.scheduledPodsHasSynced = podInformer.Informer().HasSynced addAllEventHandlers(sched, informerFactory, podInformer) @@ -369,104 +318,44 @@ func (sched *Scheduler) Run(ctx context.Context) { sched.SchedulingQueue.Close() } -// recordFailedSchedulingEvent records an event for the pod that indicates the -// pod has failed to schedule. -// NOTE: This function modifies "pod". "pod" should be copied before being passed. -func (sched *Scheduler) recordSchedulingFailure(prof *profile.Profile, podInfo *framework.PodInfo, err error, reason string, message string) { +// recordSchedulingFailure records an event for the pod that indicates the +// pod has failed to schedule. Also, update the pod condition and nominated node name if set. +func (sched *Scheduler) recordSchedulingFailure(prof *profile.Profile, podInfo *framework.QueuedPodInfo, err error, reason string, nominatedNode string) { sched.Error(podInfo, err) + + // Update the scheduling queue with the nominated pod information. Without + // this, there would be a race condition between the next scheduling cycle + // and the time the scheduler receives a Pod Update for the nominated pod. + // Here we check for nil only for tests. + if sched.SchedulingQueue != nil { + sched.SchedulingQueue.AddNominatedPod(podInfo.Pod, nominatedNode) + } + pod := podInfo.Pod - prof.Recorder.Eventf(pod, nil, v1.EventTypeWarning, "FailedScheduling", "Scheduling", message) - if err := sched.podConditionUpdater.update(pod, &v1.PodCondition{ + prof.Recorder.Eventf(pod, nil, v1.EventTypeWarning, "FailedScheduling", "Scheduling", err.Error()) + if err := updatePod(sched.client, pod, &v1.PodCondition{ Type: v1.PodScheduled, Status: v1.ConditionFalse, Reason: reason, Message: err.Error(), - }); err != nil { - klog.Errorf("Error updating the condition of the pod %s/%s: %v", pod.Namespace, pod.Name, err) + }, nominatedNode); err != nil { + klog.Errorf("Error updating pod %s/%s: %v", pod.Namespace, pod.Name, err) } } -// preempt tries to create room for a pod that has failed to schedule, by preempting lower priority pods if possible. -// If it succeeds, it adds the name of the node where preemption has happened to the pod spec. -// It returns the node name and an error if any. -func (sched *Scheduler) preempt(ctx context.Context, prof *profile.Profile, state *framework.CycleState, preemptor *v1.Pod, scheduleErr error) (string, error) { - preemptor, err := sched.podPreemptor.getUpdatedPod(preemptor) - if err != nil { - klog.Errorf("Error getting the updated preemptor pod object: %v", err) - return "", err +func updatePod(client clientset.Interface, pod *v1.Pod, condition *v1.PodCondition, nominatedNode string) error { + klog.V(3).Infof("Updating pod condition for %s/%s to (%s==%s, Reason=%s)", pod.Namespace, pod.Name, condition.Type, condition.Status, condition.Reason) + podCopy := pod.DeepCopy() + // NominatedNodeName is updated only if we are trying to set it, and the value is + // different from the existing one. + if !podutil.UpdatePodCondition(&podCopy.Status, condition) && + (len(nominatedNode) == 0 || pod.Status.NominatedNodeName == nominatedNode) { + return nil } - - node, victims, nominatedPodsToClear, err := sched.Algorithm.Preempt(ctx, prof, state, preemptor, scheduleErr) - if err != nil { - klog.Errorf("Error preempting victims to make room for %v/%v: %v", preemptor.Namespace, preemptor.Name, err) - return "", err + if nominatedNode != "" { + podCopy.Status.NominatedNodeName = nominatedNode } - var nodeName = "" - if node != nil { - nodeName = node.Name - // Update the scheduling queue with the nominated pod information. Without - // this, there would be a race condition between the next scheduling cycle - // and the time the scheduler receives a Pod Update for the nominated pod. - sched.SchedulingQueue.UpdateNominatedPodForNode(preemptor, nodeName) - - // Make a call to update nominated node name of the pod on the API server. - err = sched.podPreemptor.setNominatedNodeName(preemptor, nodeName) - if err != nil { - klog.Errorf("Error in preemption process. Cannot set 'NominatedPod' on pod %v/%v: %v", preemptor.Namespace, preemptor.Name, err) - sched.SchedulingQueue.DeleteNominatedPodIfExists(preemptor) - return "", err - } - - for _, victim := range victims { - if err := sched.podPreemptor.deletePod(victim); err != nil { - klog.Errorf("Error preempting pod %v/%v: %v", victim.Namespace, victim.Name, err) - return "", err - } - // If the victim is a WaitingPod, send a reject message to the PermitPlugin - if waitingPod := prof.GetWaitingPod(victim.UID); waitingPod != nil { - waitingPod.Reject("preempted") - } - prof.Recorder.Eventf(victim, preemptor, v1.EventTypeNormal, "Preempted", "Preempting", "Preempted by %v/%v on node %v", preemptor.Namespace, preemptor.Name, nodeName) - - } - metrics.PreemptionVictims.Observe(float64(len(victims))) - } - // Clearing nominated pods should happen outside of "if node != nil". Node could - // be nil when a pod with nominated node name is eligible to preempt again, - // but preemption logic does not find any node for it. In that case Preempt() - // function of generic_scheduler.go returns the pod itself for removal of - // the 'NominatedPod' field. - for _, p := range nominatedPodsToClear { - rErr := sched.podPreemptor.removeNominatedNodeName(p) - if rErr != nil { - klog.Errorf("Cannot remove 'NominatedPod' field of pod: %v", rErr) - // We do not return as this error is not critical. - } - } - return nodeName, err -} - -// bindVolumes will make the API update with the assumed bindings and wait until -// the PV controller has completely finished the binding operation. -// -// If binding errors, times out or gets undone, then an error will be returned to -// retry scheduling. -func (sched *Scheduler) bindVolumes(assumed *v1.Pod) error { - klog.V(5).Infof("Trying to bind volumes for pod \"%v/%v\"", assumed.Namespace, assumed.Name) - err := sched.VolumeBinder.BindPodVolumes(assumed) - if err != nil { - klog.V(1).Infof("Failed to bind volumes for pod \"%v/%v\": %v", assumed.Namespace, assumed.Name, err) - - // Unassume the Pod and retry scheduling - if forgetErr := sched.SchedulerCache.ForgetPod(assumed); forgetErr != nil { - klog.Errorf("scheduler cache ForgetPod failed: %v", forgetErr) - } - - return err - } - - klog.V(5).Infof("Success binding volumes for pod \"%v/%v\"", assumed.Namespace, assumed.Name) - return nil + return util.PatchPod(client, pod, podCopy) } // assume signals to the cache that a pod is already in the cache, so that binding can be asynchronous. @@ -533,9 +422,6 @@ func (sched *Scheduler) finishBinding(prof *profile.Profile, assumed *v1.Pod, ta } if err != nil { klog.V(1).Infof("Failed to bind pod: %v/%v", assumed.Namespace, assumed.Name) - if err := sched.SchedulerCache.ForgetPod(assumed); err != nil { - klog.Errorf("scheduler cache ForgetPod failed: %v", err) - } return } @@ -577,29 +463,34 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) { // preempt, with the expectation that the next time the pod is tried for scheduling it // will fit due to the preemption. It is also possible that a different pod will schedule // into the resources that were preempted, but this is harmless. + nominatedNode := "" if fitError, ok := err.(*core.FitError); ok { - if sched.DisablePreemption { - klog.V(3).Infof("Pod priority feature is not enabled or preemption is disabled by scheduler configuration." + - " No preemption is performed.") + if !prof.HasPostFilterPlugins() { + klog.V(3).Infof("No PostFilter plugins are registered, so no preemption will be performed.") } else { - preemptionStartTime := time.Now() - sched.preempt(schedulingCycleCtx, prof, state, pod, fitError) - metrics.PreemptionAttempts.Inc() - metrics.SchedulingAlgorithmPreemptionEvaluationDuration.Observe(metrics.SinceInSeconds(preemptionStartTime)) - metrics.DeprecatedSchedulingDuration.WithLabelValues(metrics.PreemptionEvaluation).Observe(metrics.SinceInSeconds(preemptionStartTime)) + // Run PostFilter plugins to try to make the pod schedulable in a future scheduling cycle. + result, status := prof.RunPostFilterPlugins(ctx, state, pod, fitError.FilteredNodesStatuses) + if status.Code() == framework.Error { + klog.Errorf("Status after running PostFilter plugins for pod %v/%v: %v", pod.Namespace, pod.Name, status) + } else { + klog.V(5).Infof("Status after running PostFilter plugins for pod %v/%v: %v", pod.Namespace, pod.Name, status) + } + if status.IsSuccess() && result != nil { + nominatedNode = result.NominatedNodeName + } } // Pod did not fit anywhere, so it is counted as a failure. If preemption // succeeds, the pod should get counted as a success the next time we try to // schedule it. (hopefully) - metrics.PodScheduleFailures.Inc() + metrics.PodUnschedulable(prof.Name, metrics.SinceInSeconds(start)) } else if err == core.ErrNoNodesAvailable { // No nodes available is counted as unschedulable rather than an error. - metrics.PodScheduleFailures.Inc() + metrics.PodUnschedulable(prof.Name, metrics.SinceInSeconds(start)) } else { - klog.Errorf("error selecting node for pod: %v", err) - metrics.PodScheduleErrors.Inc() + klog.ErrorS(err, "Error selecting node for pod", "pod", klog.KObj(pod)) + metrics.PodScheduleError(prof.Name, metrics.SinceInSeconds(start)) } - sched.recordSchedulingFailure(prof, podInfo.DeepCopy(), err, v1.PodReasonUnschedulable, err.Error()) + sched.recordSchedulingFailure(prof, podInfo, err, v1.PodReasonUnschedulable, nominatedNode) return } metrics.SchedulingAlgorithmLatency.Observe(metrics.SinceInSeconds(start)) @@ -607,41 +498,28 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) { // This allows us to keep scheduling without waiting on binding to occur. assumedPodInfo := podInfo.DeepCopy() assumedPod := assumedPodInfo.Pod - - // Assume volumes first before assuming the pod. - // - // If all volumes are completely bound, then allBound is true and binding will be skipped. - // - // Otherwise, binding of volumes is started after the pod is assumed, but before pod binding. - // - // This function modifies 'assumedPod' if volume binding is required. - allBound, err := sched.VolumeBinder.AssumePodVolumes(assumedPod, scheduleResult.SuggestedHost) - if err != nil { - sched.recordSchedulingFailure(prof, assumedPodInfo, err, SchedulerError, - fmt.Sprintf("AssumePodVolumes failed: %v", err)) - metrics.PodScheduleErrors.Inc() - return - } - - // Run "reserve" plugins. - if sts := prof.RunReservePlugins(schedulingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost); !sts.IsSuccess() { - sched.recordSchedulingFailure(prof, assumedPodInfo, sts.AsError(), SchedulerError, sts.Message()) - metrics.PodScheduleErrors.Inc() - return - } - // assume modifies `assumedPod` by setting NodeName=scheduleResult.SuggestedHost err = sched.assume(assumedPod, scheduleResult.SuggestedHost) if err != nil { + metrics.PodScheduleError(prof.Name, metrics.SinceInSeconds(start)) // This is most probably result of a BUG in retrying logic. // We report an error here so that pod scheduling can be retried. // This relies on the fact that Error will check if the pod has been bound // to a node and if so will not add it back to the unscheduled pods queue // (otherwise this would cause an infinite loop). - sched.recordSchedulingFailure(prof, assumedPodInfo, err, SchedulerError, fmt.Sprintf("AssumePod failed: %v", err)) - metrics.PodScheduleErrors.Inc() - // trigger un-reserve plugins to clean up state associated with the reserved Pod - prof.RunUnreservePlugins(schedulingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) + sched.recordSchedulingFailure(prof, assumedPodInfo, err, SchedulerError, "") + return + } + + // Run the Reserve method of reserve plugins. + if sts := prof.RunReservePluginsReserve(schedulingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost); !sts.IsSuccess() { + metrics.PodScheduleError(prof.Name, metrics.SinceInSeconds(start)) + // trigger un-reserve to clean up state associated with the reserved Pod + prof.RunReservePluginsUnreserve(schedulingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) + if forgetErr := sched.Cache().ForgetPod(assumedPod); forgetErr != nil { + klog.Errorf("scheduler cache ForgetPod failed: %v", forgetErr) + } + sched.recordSchedulingFailure(prof, assumedPodInfo, sts.AsError(), SchedulerError, "") return } @@ -650,18 +528,18 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) { if runPermitStatus.Code() != framework.Wait && !runPermitStatus.IsSuccess() { var reason string if runPermitStatus.IsUnschedulable() { - metrics.PodScheduleFailures.Inc() + metrics.PodUnschedulable(prof.Name, metrics.SinceInSeconds(start)) reason = v1.PodReasonUnschedulable } else { - metrics.PodScheduleErrors.Inc() + metrics.PodScheduleError(prof.Name, metrics.SinceInSeconds(start)) reason = SchedulerError } + // One of the plugins returned status different than success or wait. + prof.RunReservePluginsUnreserve(schedulingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) if forgetErr := sched.Cache().ForgetPod(assumedPod); forgetErr != nil { klog.Errorf("scheduler cache ForgetPod failed: %v", forgetErr) } - // One of the plugins returned status different than success or wait. - prof.RunUnreservePlugins(schedulingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - sched.recordSchedulingFailure(prof, assumedPodInfo, runPermitStatus.AsError(), reason, runPermitStatus.Message()) + sched.recordSchedulingFailure(prof, assumedPodInfo, runPermitStatus.AsError(), reason, "") return } @@ -676,64 +554,51 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) { if !waitOnPermitStatus.IsSuccess() { var reason string if waitOnPermitStatus.IsUnschedulable() { - metrics.PodScheduleFailures.Inc() + metrics.PodUnschedulable(prof.Name, metrics.SinceInSeconds(start)) reason = v1.PodReasonUnschedulable } else { - metrics.PodScheduleErrors.Inc() + metrics.PodScheduleError(prof.Name, metrics.SinceInSeconds(start)) reason = SchedulerError } + // trigger un-reserve plugins to clean up state associated with the reserved Pod + prof.RunReservePluginsUnreserve(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) if forgetErr := sched.Cache().ForgetPod(assumedPod); forgetErr != nil { klog.Errorf("scheduler cache ForgetPod failed: %v", forgetErr) } - // trigger un-reserve plugins to clean up state associated with the reserved Pod - prof.RunUnreservePlugins(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - sched.recordSchedulingFailure(prof, assumedPodInfo, waitOnPermitStatus.AsError(), reason, waitOnPermitStatus.Message()) + sched.recordSchedulingFailure(prof, assumedPodInfo, waitOnPermitStatus.AsError(), reason, "") return } - // Bind volumes first before Pod - if !allBound { - err := sched.bindVolumes(assumedPod) - if err != nil { - sched.recordSchedulingFailure(prof, assumedPodInfo, err, "VolumeBindingFailed", err.Error()) - metrics.PodScheduleErrors.Inc() - // trigger un-reserve plugins to clean up state associated with the reserved Pod - prof.RunUnreservePlugins(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - return - } - } - // Run "prebind" plugins. preBindStatus := prof.RunPreBindPlugins(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) if !preBindStatus.IsSuccess() { - var reason string - metrics.PodScheduleErrors.Inc() - reason = SchedulerError + metrics.PodScheduleError(prof.Name, metrics.SinceInSeconds(start)) + // trigger un-reserve plugins to clean up state associated with the reserved Pod + prof.RunReservePluginsUnreserve(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) if forgetErr := sched.Cache().ForgetPod(assumedPod); forgetErr != nil { klog.Errorf("scheduler cache ForgetPod failed: %v", forgetErr) } - // trigger un-reserve plugins to clean up state associated with the reserved Pod - prof.RunUnreservePlugins(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - sched.recordSchedulingFailure(prof, assumedPodInfo, preBindStatus.AsError(), reason, preBindStatus.Message()) + sched.recordSchedulingFailure(prof, assumedPodInfo, preBindStatus.AsError(), SchedulerError, "") return } err := sched.bind(bindingCycleCtx, prof, assumedPod, scheduleResult.SuggestedHost, state) - metrics.E2eSchedulingLatency.Observe(metrics.SinceInSeconds(start)) if err != nil { - metrics.PodScheduleErrors.Inc() + metrics.PodScheduleError(prof.Name, metrics.SinceInSeconds(start)) // trigger un-reserve plugins to clean up state associated with the reserved Pod - prof.RunUnreservePlugins(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - sched.recordSchedulingFailure(prof, assumedPodInfo, err, SchedulerError, fmt.Sprintf("Binding rejected: %v", err)) + prof.RunReservePluginsUnreserve(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) + if err := sched.SchedulerCache.ForgetPod(assumedPod); err != nil { + klog.Errorf("scheduler cache ForgetPod failed: %v", err) + } + sched.recordSchedulingFailure(prof, assumedPodInfo, fmt.Errorf("Binding rejected: %v", err), SchedulerError, "") } else { // Calculating nodeResourceString can be heavy. Avoid it if klog verbosity is below 2. - if klog.V(2) { - klog.Infof("pod %v/%v is bound successfully on node %q, %d nodes evaluated, %d nodes were found feasible.", assumedPod.Namespace, assumedPod.Name, scheduleResult.SuggestedHost, scheduleResult.EvaluatedNodes, scheduleResult.FeasibleNodes) + if klog.V(2).Enabled() { + klog.InfoS("Successfully bound pod to node", "pod", klog.KObj(pod), "node", scheduleResult.SuggestedHost, "evaluatedNodes", scheduleResult.EvaluatedNodes, "feasibleNodes", scheduleResult.FeasibleNodes) } - - metrics.PodScheduleSuccesses.Inc() + metrics.PodScheduled(prof.Name, metrics.SinceInSeconds(start)) metrics.PodSchedulingAttempts.Observe(float64(podInfo.Attempts)) - metrics.PodSchedulingDuration.Observe(metrics.SinceInSeconds(podInfo.InitialAttemptTimestamp)) + metrics.PodSchedulingDuration.WithLabelValues(getAttemptsLabel(podInfo)).Observe(metrics.SinceInSeconds(podInfo.InitialAttemptTimestamp)) // Run "postbind" plugins. prof.RunPostBindPlugins(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) @@ -741,6 +606,15 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) { }() } +func getAttemptsLabel(p *framework.QueuedPodInfo) string { + // We breakdown the pod scheduling duration by attempts capped to a limit + // to avoid ending up with a high cardinality metric. + if p.Attempts >= 15 { + return "15+" + } + return strconv.Itoa(p.Attempts) +} + func (sched *Scheduler) profileForPod(pod *v1.Pod) (*profile.Profile, error) { prof, ok := sched.Profiles[pod.Spec.SchedulerName] if !ok { @@ -768,45 +642,6 @@ func (sched *Scheduler) skipPodSchedule(prof *profile.Profile, pod *v1.Pod) bool return false } -type podConditionUpdaterImpl struct { - Client clientset.Interface -} - -func (p *podConditionUpdaterImpl) update(pod *v1.Pod, condition *v1.PodCondition) error { - klog.V(3).Infof("Updating pod condition for %s/%s to (%s==%s, Reason=%s)", pod.Namespace, pod.Name, condition.Type, condition.Status, condition.Reason) - if podutil.UpdatePodCondition(&pod.Status, condition) { - _, err := p.Client.CoreV1().Pods(pod.Namespace).UpdateStatus(context.TODO(), pod, metav1.UpdateOptions{}) - return err - } - return nil -} - -type podPreemptorImpl struct { - Client clientset.Interface -} - -func (p *podPreemptorImpl) getUpdatedPod(pod *v1.Pod) (*v1.Pod, error) { - return p.Client.CoreV1().Pods(pod.Namespace).Get(context.TODO(), pod.Name, metav1.GetOptions{}) -} - -func (p *podPreemptorImpl) deletePod(pod *v1.Pod) error { - return p.Client.CoreV1().Pods(pod.Namespace).Delete(context.TODO(), pod.Name, metav1.DeleteOptions{}) -} - -func (p *podPreemptorImpl) setNominatedNodeName(pod *v1.Pod, nominatedNodeName string) error { - podCopy := pod.DeepCopy() - podCopy.Status.NominatedNodeName = nominatedNodeName - _, err := p.Client.CoreV1().Pods(pod.Namespace).UpdateStatus(context.TODO(), podCopy, metav1.UpdateOptions{}) - return err -} - -func (p *podPreemptorImpl) removeNominatedNodeName(pod *v1.Pod) error { - if len(pod.Status.NominatedNodeName) == 0 { - return nil - } - return p.setNominatedNodeName(pod, "") -} - func defaultAlgorithmSourceProviderName() *string { provider := schedulerapi.SchedulerDefaultProviderName return &provider diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/util/BUILD b/vendor/k8s.io/kubernetes/pkg/scheduler/util/BUILD index 93d34c34c82..0b292065e0e 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/util/BUILD @@ -9,7 +9,6 @@ load( go_test( name = "go_default_test", srcs = [ - "error_channel_test.go", "non_zero_test.go", "topologies_test.go", "utils_test.go", @@ -20,8 +19,11 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/selection:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + "//staging/src/k8s.io/client-go/testing:go_default_library", "//staging/src/k8s.io/kube-scheduler/extender/v1:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", ], @@ -31,7 +33,6 @@ go_library( name = "go_default_library", srcs = [ "clock.go", - "error_channel.go", "non_zero.go", "topologies.go", "utils.go", @@ -44,10 +45,14 @@ go_library( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/kube-scheduler/extender/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/util/utils.go b/vendor/k8s.io/kubernetes/pkg/scheduler/util/utils.go index 77cd9a0da22..05e822e67d9 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/util/utils.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/util/utils.go @@ -17,11 +17,18 @@ limitations under the License. package util import ( + "context" + "encoding/json" + "fmt" "time" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog" + "k8s.io/apimachinery/pkg/types" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apimachinery/pkg/util/strategicpatch" + "k8s.io/client-go/kubernetes" + "k8s.io/klog/v2" extenderv1 "k8s.io/kube-scheduler/extender/v1" podutil "k8s.io/kubernetes/pkg/api/v1/pod" ) @@ -83,29 +90,76 @@ func MoreImportantPod(pod1, pod2 *v1.Pod) bool { } // GetPodAffinityTerms gets pod affinity terms by a pod affinity object. -func GetPodAffinityTerms(podAffinity *v1.PodAffinity) (terms []v1.PodAffinityTerm) { - if podAffinity != nil { - if len(podAffinity.RequiredDuringSchedulingIgnoredDuringExecution) != 0 { - terms = podAffinity.RequiredDuringSchedulingIgnoredDuringExecution +func GetPodAffinityTerms(affinity *v1.Affinity) (terms []v1.PodAffinityTerm) { + if affinity != nil && affinity.PodAffinity != nil { + if len(affinity.PodAffinity.RequiredDuringSchedulingIgnoredDuringExecution) != 0 { + terms = affinity.PodAffinity.RequiredDuringSchedulingIgnoredDuringExecution } // TODO: Uncomment this block when implement RequiredDuringSchedulingRequiredDuringExecution. - //if len(podAffinity.RequiredDuringSchedulingRequiredDuringExecution) != 0 { - // terms = append(terms, podAffinity.RequiredDuringSchedulingRequiredDuringExecution...) + //if len(affinity.PodAffinity.RequiredDuringSchedulingRequiredDuringExecution) != 0 { + // terms = append(terms, affinity.PodAffinity.RequiredDuringSchedulingRequiredDuringExecution...) //} } return terms } // GetPodAntiAffinityTerms gets pod affinity terms by a pod anti-affinity. -func GetPodAntiAffinityTerms(podAntiAffinity *v1.PodAntiAffinity) (terms []v1.PodAffinityTerm) { - if podAntiAffinity != nil { - if len(podAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution) != 0 { - terms = podAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution +func GetPodAntiAffinityTerms(affinity *v1.Affinity) (terms []v1.PodAffinityTerm) { + if affinity != nil && affinity.PodAntiAffinity != nil { + if len(affinity.PodAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution) != 0 { + terms = affinity.PodAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution } // TODO: Uncomment this block when implement RequiredDuringSchedulingRequiredDuringExecution. - //if len(podAntiAffinity.RequiredDuringSchedulingRequiredDuringExecution) != 0 { - // terms = append(terms, podAntiAffinity.RequiredDuringSchedulingRequiredDuringExecution...) + //if len(affinity.PodAntiAffinity.RequiredDuringSchedulingRequiredDuringExecution) != 0 { + // terms = append(terms, affinity.PodAntiAffinity.RequiredDuringSchedulingRequiredDuringExecution...) //} } return terms } + +// PatchPod calculates the delta bytes change from to , +// and then submit a request to API server to patch the pod changes. +func PatchPod(cs kubernetes.Interface, old *v1.Pod, new *v1.Pod) error { + oldData, err := json.Marshal(old) + if err != nil { + return err + } + + newData, err := json.Marshal(new) + if err != nil { + return err + } + patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, &v1.Pod{}) + if err != nil { + return fmt.Errorf("failed to create merge patch for pod %q/%q: %v", old.Namespace, old.Name, err) + } + _, err = cs.CoreV1().Pods(old.Namespace).Patch(context.TODO(), old.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}, "status") + return err +} + +// GetUpdatedPod returns the latest version of from API server. +func GetUpdatedPod(cs kubernetes.Interface, pod *v1.Pod) (*v1.Pod, error) { + return cs.CoreV1().Pods(pod.Namespace).Get(context.TODO(), pod.Name, metav1.GetOptions{}) +} + +// DeletePod deletes the given from API server +func DeletePod(cs kubernetes.Interface, pod *v1.Pod) error { + return cs.CoreV1().Pods(pod.Namespace).Delete(context.TODO(), pod.Name, metav1.DeleteOptions{}) +} + +// ClearNominatedNodeName internally submit a patch request to API server +// to set each pods[*].Status.NominatedNodeName> to "". +func ClearNominatedNodeName(cs kubernetes.Interface, pods ...*v1.Pod) utilerrors.Aggregate { + var errs []error + for _, p := range pods { + if len(p.Status.NominatedNodeName) == 0 { + continue + } + podCopy := p.DeepCopy() + podCopy.Status.NominatedNodeName = "" + if err := PatchPod(cs, p, podCopy); err != nil { + errs = append(errs, err) + } + } + return utilerrors.NewAggregate(errs) +} diff --git a/vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go b/vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go index 2c67ff57861..010710e904b 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go @@ -22,29 +22,11 @@ import ( "k8s.io/api/core/v1" ) -// TODO: Move these values into the API package. -const ( - // The prefix to an annotation key specifying a container profile. - ContainerAnnotationKeyPrefix = "container.apparmor.security.beta.kubernetes.io/" - // The annotation key specifying the default AppArmor profile. - DefaultProfileAnnotationKey = "apparmor.security.beta.kubernetes.io/defaultProfileName" - // The annotation key specifying the allowed AppArmor profiles. - AllowedProfilesAnnotationKey = "apparmor.security.beta.kubernetes.io/allowedProfileNames" - - // The profile specifying the runtime default. - ProfileRuntimeDefault = "runtime/default" - // The prefix for specifying profiles loaded on the node. - ProfileNamePrefix = "localhost/" - - // Unconfined profile - ProfileNameUnconfined = "unconfined" -) - // Checks whether app armor is required for pod to be run. func isRequired(pod *v1.Pod) bool { for key, value := range pod.Annotations { - if strings.HasPrefix(key, ContainerAnnotationKeyPrefix) { - return value != ProfileNameUnconfined + if strings.HasPrefix(key, v1.AppArmorBetaContainerAnnotationKeyPrefix) { + return value != v1.AppArmorBetaProfileNameUnconfined } } return false @@ -58,7 +40,7 @@ func GetProfileName(pod *v1.Pod, containerName string) string { // GetProfileNameFromPodAnnotations gets the name of the profile to use with container from // pod annotations func GetProfileNameFromPodAnnotations(annotations map[string]string, containerName string) string { - return annotations[ContainerAnnotationKeyPrefix+containerName] + return annotations[v1.AppArmorBetaContainerAnnotationKeyPrefix+containerName] } // SetProfileName sets the name of the profile to use with the container. @@ -66,7 +48,7 @@ func SetProfileName(pod *v1.Pod, containerName, profileName string) error { if pod.Annotations == nil { pod.Annotations = map[string]string{} } - pod.Annotations[ContainerAnnotationKeyPrefix+containerName] = profileName + pod.Annotations[v1.AppArmorBetaContainerAnnotationKeyPrefix+containerName] = profileName return nil } @@ -75,6 +57,6 @@ func SetProfileNameFromPodAnnotations(annotations map[string]string, containerNa if annotations == nil { return nil } - annotations[ContainerAnnotationKeyPrefix+containerName] = profileName + annotations[v1.AppArmorBetaContainerAnnotationKeyPrefix+containerName] = profileName return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go b/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go index 1742b4e040d..210ff99fe10 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go +++ b/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go @@ -25,7 +25,7 @@ import ( "path" "strings" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" podutil "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/features" @@ -79,7 +79,7 @@ func (v *validator) Validate(pod *v1.Pod) error { } var retErr error - podutil.VisitContainers(&pod.Spec, func(container *v1.Container) bool { + podutil.VisitContainers(&pod.Spec, podutil.AllContainers, func(container *v1.Container, containerType podutil.ContainerType) bool { retErr = validateProfile(GetProfileName(pod, container.Name), loadedProfiles) if retErr != nil { return false @@ -125,8 +125,8 @@ func validateProfile(profile string, loadedProfiles map[string]bool) error { return err } - if strings.HasPrefix(profile, ProfileNamePrefix) { - profileName := strings.TrimPrefix(profile, ProfileNamePrefix) + if strings.HasPrefix(profile, v1.AppArmorBetaProfileNamePrefix) { + profileName := strings.TrimPrefix(profile, v1.AppArmorBetaProfileNamePrefix) if !loadedProfiles[profileName] { return fmt.Errorf("profile %q is not loaded", profileName) } @@ -137,10 +137,10 @@ func validateProfile(profile string, loadedProfiles map[string]bool) error { // ValidateProfileFormat checks the format of the profile. func ValidateProfileFormat(profile string) error { - if profile == "" || profile == ProfileRuntimeDefault || profile == ProfileNameUnconfined { + if profile == "" || profile == v1.AppArmorBetaProfileRuntimeDefault || profile == v1.AppArmorBetaProfileNameUnconfined { return nil } - if !strings.HasPrefix(profile, ProfileNamePrefix) { + if !strings.HasPrefix(profile, v1.AppArmorBetaProfileNamePrefix) { return fmt.Errorf("invalid AppArmor profile name: %q", profile) } return nil diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/BUILD b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/BUILD index 15a1df6789a..eb60ea12175 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/BUILD @@ -32,6 +32,7 @@ go_library( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", ], @@ -48,6 +49,7 @@ go_test( "//pkg/security/apparmor:go_default_library", "//pkg/security/podsecuritypolicy/seccomp:go_default_library", "//pkg/security/podsecuritypolicy/util:go_default_library", + "//plugin/pkg/admission/serviceaccount:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/BUILD b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/BUILD index e88c89af2dc..06297479ae0 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/BUILD @@ -14,6 +14,7 @@ go_library( "//pkg/apis/core:go_default_library", "//pkg/security/apparmor:go_default_library", "//pkg/util/maps:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", ], ) @@ -24,8 +25,8 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/apis/core:go_default_library", - "//pkg/security/apparmor:go_default_library", "//pkg/util/maps:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/github.com/davecgh/go-spew/spew:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/strategy.go b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/strategy.go index 9f6affdd2b3..31a06c9198c 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/strategy.go @@ -20,6 +20,7 @@ import ( "fmt" "strings" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/validation/field" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/security/apparmor" @@ -47,7 +48,7 @@ var _ Strategy = &strategy{} // NewStrategy creates a new strategy that enforces AppArmor profile constraints. func NewStrategy(pspAnnotations map[string]string) Strategy { var allowedProfiles map[string]bool - if allowed, ok := pspAnnotations[apparmor.AllowedProfilesAnnotationKey]; ok { + if allowed, ok := pspAnnotations[v1.AppArmorBetaAllowedProfilesAnnotationKey]; ok { profiles := strings.Split(allowed, ",") allowedProfiles = make(map[string]bool, len(profiles)) for _, p := range profiles { @@ -55,16 +56,16 @@ func NewStrategy(pspAnnotations map[string]string) Strategy { } } return &strategy{ - defaultProfile: pspAnnotations[apparmor.DefaultProfileAnnotationKey], + defaultProfile: pspAnnotations[v1.AppArmorBetaDefaultProfileAnnotationKey], allowedProfiles: allowedProfiles, - allowedProfilesString: pspAnnotations[apparmor.AllowedProfilesAnnotationKey], + allowedProfilesString: pspAnnotations[v1.AppArmorBetaAllowedProfilesAnnotationKey], } } func (s *strategy) Generate(annotations map[string]string, container *api.Container) (map[string]string, error) { copy := maps.CopySS(annotations) - if annotations[apparmor.ContainerAnnotationKeyPrefix+container.Name] != "" { + if annotations[v1.AppArmorBetaContainerAnnotationKeyPrefix+container.Name] != "" { // Profile already set, nothing to do. return copy, nil } @@ -78,7 +79,7 @@ func (s *strategy) Generate(annotations map[string]string, container *api.Contai copy = map[string]string{} } // Add the default profile. - copy[apparmor.ContainerAnnotationKeyPrefix+container.Name] = s.defaultProfile + copy[v1.AppArmorBetaContainerAnnotationKeyPrefix+container.Name] = s.defaultProfile return copy, nil } @@ -90,7 +91,7 @@ func (s *strategy) Validate(pod *api.Pod, container *api.Container) field.ErrorL } allErrs := field.ErrorList{} - fieldPath := field.NewPath("pod", "metadata", "annotations").Key(apparmor.ContainerAnnotationKeyPrefix + container.Name) + fieldPath := field.NewPath("pod", "metadata", "annotations").Key(v1.AppArmorBetaContainerAnnotationKeyPrefix + container.Name) profile := apparmor.GetProfileNameFromPodAnnotations(pod.Annotations, container.Name) if profile == "" { diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/provider.go b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/provider.go index a995346d589..d3ee1dcbc75 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/provider.go +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/provider.go @@ -22,6 +22,7 @@ import ( corev1 "k8s.io/api/core/v1" policy "k8s.io/api/policy/v1beta1" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation/field" utilfeature "k8s.io/apiserver/pkg/util/feature" podutil "k8s.io/kubernetes/pkg/api/pod" @@ -238,7 +239,7 @@ func (s *simpleProvider) ValidatePod(pod *api.Pod) field.ErrorList { allErrs = append(allErrs, validateRuntimeClassName(pod.Spec.RuntimeClassName, s.psp.Spec.RuntimeClass.AllowedRuntimeClassNames)...) } - pods.VisitContainersWithPath(&pod.Spec, func(c *api.Container, p *field.Path) bool { + pods.VisitContainersWithPath(&pod.Spec, field.NewPath("spec"), func(c *api.Container, p *field.Path) bool { allErrs = append(allErrs, s.validateContainer(pod, c, p)...) return true }) @@ -259,7 +260,7 @@ func (s *simpleProvider) validatePodVolumes(pod *api.Pod) field.ErrorList { continue } - if !allowsAllVolumeTypes && !allowedVolumes.Has(string(fsType)) { + if !allowsAllVolumeTypes && !allowsVolumeType(allowedVolumes, fsType, v) { allErrs = append(allErrs, field.Invalid( field.NewPath("spec", "volumes").Index(i), string(fsType), fmt.Sprintf("%s volumes are not allowed to be used", string(fsType)))) @@ -275,7 +276,7 @@ func (s *simpleProvider) validatePodVolumes(pod *api.Pod) field.ErrorList { fmt.Sprintf("is not allowed to be used"))) } else if mustBeReadOnly { // Ensure all the VolumeMounts that use this volume are read-only - pods.VisitContainersWithPath(&pod.Spec, func(c *api.Container, p *field.Path) bool { + pods.VisitContainersWithPath(&pod.Spec, field.NewPath("spec"), func(c *api.Container, p *field.Path) bool { for i, cv := range c.VolumeMounts { if cv.Name == v.Name && !cv.ReadOnly { allErrs = append(allErrs, field.Invalid(p.Child("volumeMounts").Index(i).Child("readOnly"), cv.ReadOnly, "must be read-only")) @@ -449,3 +450,15 @@ func validateRuntimeClassName(actual *string, validNames []string) field.ErrorLi } return field.ErrorList{field.Invalid(field.NewPath("spec", "runtimeClassName"), *actual, "")} } + +func allowsVolumeType(allowedVolumes sets.String, fsType policy.FSType, volume api.Volume) bool { + if allowedVolumes.Has(string(fsType)) { + return true + } + + // if secret volume is allowed, all the projected volume sources that projected service account token volumes expose are allowed, regardless of psp. + if allowedVolumes.Has(string(policy.Secret)) && fsType == policy.Projected && psputil.IsOnlyServiceAccountTokenSources(volume.VolumeSource.Projected) { + return true + } + return false +} diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/BUILD b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/BUILD index 49f4a846c26..bce686a3621 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/BUILD @@ -11,6 +11,7 @@ go_library( srcs = ["strategy.go"], importpath = "k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp", deps = [ + "//pkg/api/pod:go_default_library", "//pkg/apis/core:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", ], @@ -22,6 +23,7 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/apis/core:go_default_library", + "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/strategy.go b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/strategy.go index 0c8d3faf9e5..5fee30cb1f4 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/strategy.go @@ -21,6 +21,7 @@ import ( "strings" "k8s.io/apimachinery/pkg/util/validation/field" + podutil "k8s.io/kubernetes/pkg/api/pod" api "k8s.io/kubernetes/pkg/apis/core" ) @@ -83,6 +84,10 @@ func (s *strategy) Generate(annotations map[string]string, pod *api.Pod) (string // Profile already set, nothing to do. return annotations[api.SeccompPodAnnotationKey], nil } + if pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.SeccompProfile != nil { + // Profile field already set, translate to annotation + return podutil.SeccompAnnotationForField(pod.Spec.SecurityContext.SeccompProfile), nil + } return s.defaultProfile, nil } @@ -92,6 +97,10 @@ func (s *strategy) ValidatePod(pod *api.Pod) field.ErrorList { allErrs := field.ErrorList{} podSpecFieldPath := field.NewPath("pod", "metadata", "annotations").Key(api.SeccompPodAnnotationKey) podProfile := pod.Annotations[api.SeccompPodAnnotationKey] + // if the annotation is not set, see if the field is set and derive the corresponding annotation value + if len(podProfile) == 0 && pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.SeccompProfile != nil { + podProfile = podutil.SeccompAnnotationForField(pod.Spec.SecurityContext.SeccompProfile) + } if !s.allowAnyProfile && len(s.allowedProfiles) == 0 && podProfile != "" { allErrs = append(allErrs, field.Forbidden(podSpecFieldPath, "seccomp may not be set")) @@ -141,9 +150,19 @@ func (s *strategy) profileAllowed(profile string) bool { // profileForContainer returns the container profile if set, otherwise the pod profile. func profileForContainer(pod *api.Pod, container *api.Container) string { + if container.SecurityContext != nil && container.SecurityContext.SeccompProfile != nil { + // derive the annotation value from the container field + return podutil.SeccompAnnotationForField(container.SecurityContext.SeccompProfile) + } containerProfile, ok := pod.Annotations[api.SeccompContainerAnnotationKeyPrefix+container.Name] if ok { + // return the existing container annotation return containerProfile } + if pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.SeccompProfile != nil { + // derive the annotation value from the pod field + return podutil.SeccompAnnotationForField(pod.Spec.SecurityContext.SeccompProfile) + } + // return the existing pod annotation return pod.Annotations[api.SeccompPodAnnotationKey] } diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/util/BUILD b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/util/BUILD index 7e4100e0095..64421e26912 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/util/BUILD @@ -26,6 +26,7 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/apis/core:go_default_library", + "//pkg/serviceaccount:go_default_library", "//staging/src/k8s.io/api/policy/v1beta1:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/util/util.go b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/util/util.go index 3620adca7a0..c607a23a640 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/util/util.go +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/util/util.go @@ -68,6 +68,7 @@ func GetAllFSTypesAsSet() sets.String { string(policy.PortworxVolume), string(policy.ScaleIO), string(policy.CSI), + string(policy.Ephemeral), ) return fstypes } @@ -131,6 +132,8 @@ func GetVolumeFSType(v api.Volume) (policy.FSType, error) { return policy.ScaleIO, nil case v.CSI != nil: return policy.CSI, nil + case v.Ephemeral != nil: + return policy.Ephemeral, nil } return "", fmt.Errorf("unknown volume type for volume: %#v", v) @@ -242,3 +245,28 @@ func EqualStringSlices(a, b []string) bool { } return true } + +func IsOnlyServiceAccountTokenSources(v *api.ProjectedVolumeSource) bool { + for _, s := range v.Sources { + // reject any projected source that does not match any of our expected source types + if s.ServiceAccountToken == nil && s.ConfigMap == nil && s.DownwardAPI == nil { + return false + } + if t := s.ServiceAccountToken; t != nil && (t.Path != "token" || t.Audience != "") { + return false + } + + if s.ConfigMap != nil && s.ConfigMap.LocalObjectReference.Name != "kube-root-ca.crt" { + return false + } + + if s.DownwardAPI != nil { + for _, d := range s.DownwardAPI.Items { + if d.Path != "namespace" || d.FieldRef == nil || d.FieldRef.APIVersion != "v1" || d.FieldRef.FieldPath != "metadata.namespace" { + return false + } + } + } + } + return true +} diff --git a/vendor/k8s.io/kubernetes/pkg/securitycontext/BUILD b/vendor/k8s.io/kubernetes/pkg/securitycontext/BUILD index 9ef45c6e212..36b665b7de1 100644 --- a/vendor/k8s.io/kubernetes/pkg/securitycontext/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/securitycontext/BUILD @@ -32,6 +32,7 @@ go_test( "//pkg/apis/core:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/securitycontext/util.go b/vendor/k8s.io/kubernetes/pkg/securitycontext/util.go index f399dca3f8c..e960dc9325f 100644 --- a/vendor/k8s.io/kubernetes/pkg/securitycontext/util.go +++ b/vendor/k8s.io/kubernetes/pkg/securitycontext/util.go @@ -17,7 +17,7 @@ limitations under the License. package securitycontext import ( - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" ) // HasPrivilegedRequest returns the value of SecurityContext.Privileged, taking into account @@ -124,6 +124,25 @@ func DetermineEffectiveSecurityContext(pod *v1.Pod, container *v1.Container) *v1 return effectiveSc } +// DetermineEffectiveRunAsUser returns a pointer of UID from the provided pod's +// and container's security context and a bool value to indicate if it is absent. +// Container's runAsUser take precedence in cases where both are set. +func DetermineEffectiveRunAsUser(pod *v1.Pod, container *v1.Container) (*int64, bool) { + var runAsUser *int64 + if pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.RunAsUser != nil { + runAsUser = new(int64) + *runAsUser = *pod.Spec.SecurityContext.RunAsUser + } + if container.SecurityContext != nil && container.SecurityContext.RunAsUser != nil { + runAsUser = new(int64) + *runAsUser = *container.SecurityContext.RunAsUser + } + if runAsUser == nil { + return nil, false + } + return runAsUser, true +} + func securityContextFromPodSecurityContext(pod *v1.Pod) *v1.SecurityContext { if pod.Spec.SecurityContext == nil { return nil diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/BUILD b/vendor/k8s.io/kubernetes/pkg/serviceaccount/BUILD index d28601f8f66..b6bc1740345 100644 --- a/vendor/k8s.io/kubernetes/pkg/serviceaccount/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/BUILD @@ -12,6 +12,7 @@ go_library( "claims.go", "jwt.go", "legacy.go", + "metrics.go", "openidmetadata.go", "util.go", ], @@ -21,12 +22,15 @@ go_library( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/audit:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", + "//staging/src/k8s.io/component-base/metrics:go_default_library", + "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/gopkg.in/square/go-jose.v2:go_default_library", "//vendor/gopkg.in/square/go-jose.v2/jwt:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -57,7 +61,9 @@ go_test( "//pkg/controller/serviceaccount:go_default_library", "//pkg/routes:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/claims.go b/vendor/k8s.io/kubernetes/pkg/serviceaccount/claims.go index 3d48b6f2dce..af5210ccd83 100644 --- a/vendor/k8s.io/kubernetes/pkg/serviceaccount/claims.go +++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/claims.go @@ -17,17 +17,27 @@ limitations under the License. package serviceaccount import ( + "context" "errors" "fmt" "time" "gopkg.in/square/go-jose.v2/jwt" - "k8s.io/klog" + "k8s.io/apiserver/pkg/audit" + "k8s.io/klog/v2" apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/kubernetes/pkg/apis/core" ) +const ( + // Injected bound service account token expiration which triggers monitoring of its time-bound feature. + WarnOnlyBoundTokenExpirationSeconds = 60*60 + 7 + + // Extended expiration for those modifed tokens involved in safe rollout if time-bound feature. + ExpirationExtensionSeconds = 24 * 365 * 60 * 60 +) + // time.Now stubbed out to allow testing var now = time.Now @@ -36,10 +46,11 @@ type privateClaims struct { } type kubernetes struct { - Namespace string `json:"namespace,omitempty"` - Svcacct ref `json:"serviceaccount,omitempty"` - Pod *ref `json:"pod,omitempty"` - Secret *ref `json:"secret,omitempty"` + Namespace string `json:"namespace,omitempty"` + Svcacct ref `json:"serviceaccount,omitempty"` + Pod *ref `json:"pod,omitempty"` + Secret *ref `json:"secret,omitempty"` + WarnAfter jwt.NumericDate `json:"warnafter,omitempty"` } type ref struct { @@ -47,7 +58,7 @@ type ref struct { UID string `json:"uid,omitempty"` } -func Claims(sa core.ServiceAccount, pod *core.Pod, secret *core.Secret, expirationSeconds int64, audience []string) (*jwt.Claims, interface{}) { +func Claims(sa core.ServiceAccount, pod *core.Pod, secret *core.Secret, expirationSeconds, warnafter int64, audience []string) (*jwt.Claims, interface{}) { now := now() sc := &jwt.Claims{ Subject: apiserverserviceaccount.MakeUsername(sa.Namespace, sa.Name), @@ -77,6 +88,11 @@ func Claims(sa core.ServiceAccount, pod *core.Pod, secret *core.Secret, expirati UID: string(secret.UID), } } + + if warnafter != 0 { + pc.Kubernetes.WarnAfter = jwt.NewNumericDate(now.Add(time.Duration(warnafter) * time.Second)) + } + return sc, pc } @@ -92,14 +108,15 @@ type validator struct { var _ = Validator(&validator{}) -func (v *validator) Validate(_ string, public *jwt.Claims, privateObj interface{}) (*ServiceAccountInfo, error) { +func (v *validator) Validate(ctx context.Context, _ string, public *jwt.Claims, privateObj interface{}) (*ServiceAccountInfo, error) { private, ok := privateObj.(*privateClaims) if !ok { klog.Errorf("jwt validator expected private claim of type *privateClaims but got: %T", privateObj) return nil, errors.New("Token could not be validated.") } + nowTime := now() err := public.Validate(jwt.Expected{ - Time: now(), + Time: nowTime, }) switch { case err == nil: @@ -110,6 +127,8 @@ func (v *validator) Validate(_ string, public *jwt.Claims, privateObj interface{ return nil, errors.New("Token could not be validated.") } + // consider things deleted prior to now()-leeway to be invalid + invalidIfDeletedBefore := nowTime.Add(-jwt.DefaultLeeway) namespace := private.Kubernetes.Namespace saref := private.Kubernetes.Svcacct podref := private.Kubernetes.Pod @@ -120,7 +139,7 @@ func (v *validator) Validate(_ string, public *jwt.Claims, privateObj interface{ klog.V(4).Infof("Could not retrieve service account %s/%s: %v", namespace, saref.Name, err) return nil, err } - if serviceAccount.DeletionTimestamp != nil { + if serviceAccount.DeletionTimestamp != nil && serviceAccount.DeletionTimestamp.Time.Before(invalidIfDeletedBefore) { klog.V(4).Infof("Service account has been deleted %s/%s", namespace, saref.Name) return nil, fmt.Errorf("ServiceAccount %s/%s has been deleted", namespace, saref.Name) } @@ -136,7 +155,7 @@ func (v *validator) Validate(_ string, public *jwt.Claims, privateObj interface{ klog.V(4).Infof("Could not retrieve bound secret %s/%s for service account %s/%s: %v", namespace, secref.Name, namespace, saref.Name, err) return nil, errors.New("Token has been invalidated") } - if secret.DeletionTimestamp != nil { + if secret.DeletionTimestamp != nil && secret.DeletionTimestamp.Time.Before(invalidIfDeletedBefore) { klog.V(4).Infof("Bound secret is deleted and awaiting removal: %s/%s for service account %s/%s", namespace, secref.Name, namespace, saref.Name) return nil, errors.New("Token has been invalidated") } @@ -154,7 +173,7 @@ func (v *validator) Validate(_ string, public *jwt.Claims, privateObj interface{ klog.V(4).Infof("Could not retrieve bound pod %s/%s for service account %s/%s: %v", namespace, podref.Name, namespace, saref.Name, err) return nil, errors.New("Token has been invalidated") } - if pod.DeletionTimestamp != nil { + if pod.DeletionTimestamp != nil && pod.DeletionTimestamp.Time.Before(invalidIfDeletedBefore) { klog.V(4).Infof("Bound pod is deleted and awaiting removal: %s/%s for service account %s/%s", namespace, podref.Name, namespace, saref.Name) return nil, errors.New("Token has been invalidated") } @@ -166,6 +185,19 @@ func (v *validator) Validate(_ string, public *jwt.Claims, privateObj interface{ podUID = podref.UID } + // Check special 'warnafter' field for projected service account token transition. + warnafter := private.Kubernetes.WarnAfter + if warnafter != 0 { + if nowTime.After(warnafter.Time()) { + secondsAfterWarn := nowTime.Unix() - warnafter.Time().Unix() + auditInfo := fmt.Sprintf("subject: %s, seconds after warning threshold: %d", public.Subject, secondsAfterWarn) + audit.AddAuditAnnotation(ctx, "authentication.k8s.io/stale-token", auditInfo) + staleTokensTotal.Inc() + } else { + validTokensTotal.Inc() + } + } + return &ServiceAccountInfo{ Namespace: private.Kubernetes.Namespace, Name: private.Kubernetes.Svcacct.Name, diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go index 24be9629d31..441666ee668 100644 --- a/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go +++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go @@ -33,6 +33,7 @@ import ( v1 "k8s.io/api/core/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/authentication/authenticator" ) @@ -244,7 +245,7 @@ type Validator interface { // Validate validates a token and returns user information or an error. // Validator can assume that the issuer and signature of a token are already // verified when this function is called. - Validate(tokenData string, public *jwt.Claims, private interface{}) (*ServiceAccountInfo, error) + Validate(ctx context.Context, tokenData string, public *jwt.Claims, private interface{}) (*ServiceAccountInfo, error) // NewPrivateClaims returns a struct that the authenticator should // deserialize the JWT payload into. The authenticator may then pass this // struct back to the Validator as the 'private' argument to a Validate() @@ -287,6 +288,8 @@ func (j *jwtTokenAuthenticator) AuthenticateToken(ctx context.Context, tokenData tokenAudiences := authenticator.Audiences(public.Audience) if len(tokenAudiences) == 0 { // only apiserver audiences are allowed for legacy tokens + audit.AddAuditAnnotation(ctx, "authentication.k8s.io/legacy-token", public.Subject) + legacyTokensTotal.Inc() tokenAudiences = j.implicitAuds } @@ -303,7 +306,7 @@ func (j *jwtTokenAuthenticator) AuthenticateToken(ctx context.Context, tokenData // If we get here, we have a token with a recognized signature and // issuer string. - sa, err := j.validator.Validate(tokenData, public, private) + sa, err := j.validator.Validate(ctx, tokenData, public, private) if err != nil { return nil, false, err } diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/legacy.go b/vendor/k8s.io/kubernetes/pkg/serviceaccount/legacy.go index 4739493ee4b..0f6cbfd034f 100644 --- a/vendor/k8s.io/kubernetes/pkg/serviceaccount/legacy.go +++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/legacy.go @@ -18,11 +18,12 @@ package serviceaccount import ( "bytes" + "context" "errors" "fmt" "gopkg.in/square/go-jose.v2/jwt" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount" @@ -62,7 +63,7 @@ type legacyValidator struct { var _ = Validator(&legacyValidator{}) -func (v *legacyValidator) Validate(tokenData string, public *jwt.Claims, privateObj interface{}) (*ServiceAccountInfo, error) { +func (v *legacyValidator) Validate(ctx context.Context, tokenData string, public *jwt.Claims, privateObj interface{}) (*ServiceAccountInfo, error) { private, ok := privateObj.(*legacyPrivateClaims) if !ok { klog.Errorf("jwt validator expected private claim of type *legacyPrivateClaims but got: %T", privateObj) diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/metrics.go b/vendor/k8s.io/kubernetes/pkg/serviceaccount/metrics.go new file mode 100644 index 00000000000..2c614a9f930 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/metrics.go @@ -0,0 +1,69 @@ +/* +Copyright 2020 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 serviceaccount + +import ( + "sync" + + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" +) + +const kubeServiceAccountSubsystem = "serviceaccount" + +var ( + // LegacyTokensTotal is the number of legacy tokens used against apiserver. + legacyTokensTotal = metrics.NewCounter( + &metrics.CounterOpts{ + Subsystem: kubeServiceAccountSubsystem, + Name: "legacy_tokens_total", + Help: "Cumulative legacy service account tokens used", + StabilityLevel: metrics.ALPHA, + }, + ) + + // StaleTokensTotal is the number of stale projected tokens not refreshed on + // client side. + staleTokensTotal = metrics.NewCounter( + &metrics.CounterOpts{ + Subsystem: kubeServiceAccountSubsystem, + Name: "stale_tokens_total", + Help: "Cumulative stale projected service account tokens used", + StabilityLevel: metrics.ALPHA, + }, + ) + + // ValidTokensTotal is the number of valid projected tokens used. + validTokensTotal = metrics.NewCounter( + &metrics.CounterOpts{ + Subsystem: kubeServiceAccountSubsystem, + Name: "valid_tokens_total", + Help: "Cumulative valid projected service account tokens used", + StabilityLevel: metrics.ALPHA, + }, + ) +) + +var registerMetricsOnce sync.Once + +func RegisterMetrics() { + registerMetricsOnce.Do(func() { + legacyregistry.MustRegister(legacyTokensTotal) + legacyregistry.MustRegister(staleTokensTotal) + legacyregistry.MustRegister(validTokensTotal) + }) +} diff --git a/vendor/k8s.io/kubernetes/pkg/ssh/BUILD b/vendor/k8s.io/kubernetes/pkg/ssh/BUILD index ac08e456edf..abf92918b3a 100644 --- a/vendor/k8s.io/kubernetes/pkg/ssh/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/ssh/BUILD @@ -13,7 +13,7 @@ go_test( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//vendor/golang.org/x/crypto/ssh:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -28,7 +28,7 @@ go_library( "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/golang.org/x/crypto/ssh:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/ssh/ssh.go b/vendor/k8s.io/kubernetes/pkg/ssh/ssh.go index 5b6072244ac..0f4fab5a155 100644 --- a/vendor/k8s.io/kubernetes/pkg/ssh/ssh.go +++ b/vendor/k8s.io/kubernetes/pkg/ssh/ssh.go @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// WARNING: DO NOT add new use-caes to this package as it is deprecated and slated for deletion. + package ssh import ( @@ -43,7 +45,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" - "k8s.io/klog" + "k8s.io/klog/v2" ) /* diff --git a/vendor/k8s.io/kubernetes/pkg/util/async/BUILD b/vendor/k8s.io/kubernetes/pkg/util/async/BUILD index c201c307be9..651e634c27e 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/async/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/async/BUILD @@ -15,7 +15,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/util/async", deps = [ "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/async/bounded_frequency_runner.go b/vendor/k8s.io/kubernetes/pkg/util/async/bounded_frequency_runner.go index 385b81f5e29..5a719dfaee6 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/async/bounded_frequency_runner.go +++ b/vendor/k8s.io/kubernetes/pkg/util/async/bounded_frequency_runner.go @@ -23,7 +23,7 @@ import ( "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" ) // BoundedFrequencyRunner manages runs of a user-provided function. diff --git a/vendor/k8s.io/kubernetes/pkg/util/bandwidth/BUILD b/vendor/k8s.io/kubernetes/pkg/util/bandwidth/BUILD index 068367e5edd..e01b4dcf30d 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/bandwidth/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/bandwidth/BUILD @@ -22,12 +22,12 @@ go_library( ] + select({ "@io_bazel_rules_go//go/platform:android": [ "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], "//conditions:default": [], diff --git a/vendor/k8s.io/kubernetes/pkg/util/bandwidth/linux.go b/vendor/k8s.io/kubernetes/pkg/util/bandwidth/linux.go index d841f305ab4..c105fdea5c2 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/bandwidth/linux.go +++ b/vendor/k8s.io/kubernetes/pkg/util/bandwidth/linux.go @@ -31,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/utils/exec" - "k8s.io/klog" + "k8s.io/klog/v2" ) var ( diff --git a/vendor/k8s.io/kubernetes/pkg/util/conntrack/conntrack.go b/vendor/k8s.io/kubernetes/pkg/util/conntrack/conntrack.go index 06b76edc6dc..204e05dd1e5 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/conntrack/conntrack.go +++ b/vendor/k8s.io/kubernetes/pkg/util/conntrack/conntrack.go @@ -21,7 +21,7 @@ import ( "strconv" "strings" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/utils/exec" utilnet "k8s.io/utils/net" ) @@ -103,7 +103,7 @@ func ClearEntriesForNAT(execer exec.Interface, origin, dest string, protocol v1. // TODO: Better handling for deletion failure. When failure occur, stale udp connection may not get flushed. // These stale udp connection will keep black hole traffic. Making this a best effort operation for now, since it // is expensive to baby sit all udp connections to kubernetes services. - return fmt.Errorf("error deleting conntrack entries for UDP peer {%s, %s}, error: %v", origin, dest, err) + return fmt.Errorf("error deleting conntrack entries for %s peer {%s, %s}, error: %v", protoStr(protocol), origin, dest, err) } return nil } @@ -119,7 +119,12 @@ func ClearEntriesForPortNAT(execer exec.Interface, dest string, port int, protoc parameters := parametersWithFamily(utilnet.IsIPv6String(dest), "-D", "-p", protoStr(protocol), "--dport", strconv.Itoa(port), "--dst-nat", dest) err := Exec(execer, parameters...) if err != nil && !strings.Contains(err.Error(), NoConnectionToDelete) { - return fmt.Errorf("error deleting conntrack entries for UDP port: %d, error: %v", port, err) + return fmt.Errorf("error deleting conntrack entries for %s port: %d, error: %v", protoStr(protocol), port, err) } return nil } + +// IsClearConntrackNeeded returns true if protocol requires conntrack cleanup for the stale connections +func IsClearConntrackNeeded(proto v1.Protocol) bool { + return proto == v1.ProtocolUDP || proto == v1.ProtocolSCTP +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/ebtables/ebtables.go b/vendor/k8s.io/kubernetes/pkg/util/ebtables/ebtables.go index 4e88d19e62c..4ff25b0b242 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/ebtables/ebtables.go +++ b/vendor/k8s.io/kubernetes/pkg/util/ebtables/ebtables.go @@ -43,6 +43,7 @@ type Table string const ( TableNAT Table = "nat" TableFilter Table = "filter" + TableBroute Table = "broute" ) type Chain string @@ -52,6 +53,7 @@ const ( ChainPrerouting Chain = "PREROUTING" ChainOutput Chain = "OUTPUT" ChainInput Chain = "INPUT" + ChainBrouting Chain = "BROUTING" ) type operation string @@ -75,6 +77,8 @@ type Interface interface { // Input args must follow the format and sequence of ebtables list output. Otherwise, EnsureRule will always create // new rules and causing duplicates. EnsureRule(position RulePosition, table Table, chain Chain, args ...string) (bool, error) + // DeleteRule checks if the specified rule is present and, if so, deletes it. + DeleteRule(table Table, chain Chain, args ...string) error // EnsureChain checks if the specified chain is present and, if not, creates it. If the rule existed, return true. EnsureChain(table Table, chain Chain) (bool, error) // DeleteChain deletes the specified chain. If the chain did not exist, return error. @@ -139,6 +143,27 @@ func (runner *runner) EnsureRule(position RulePosition, table Table, chain Chain return exist, nil } +func (runner *runner) DeleteRule(table Table, chain Chain, args ...string) error { + exist := true + fullArgs := makeFullArgs(table, opListChain, chain, fullMac) + out, err := runner.exec.Command(cmdebtables, fullArgs...).CombinedOutput() + if err != nil { + exist = false + } else { + exist = checkIfRuleExists(string(out), args...) + } + + if !exist { + return nil + } + fullArgs = makeFullArgs(table, opDeleteRule, chain, args...) + out, err = runner.exec.Command(cmdebtables, fullArgs...).CombinedOutput() + if err != nil { + return fmt.Errorf("Failed to delete rule: %v, output: %s", err, out) + } + return nil +} + func (runner *runner) EnsureChain(table Table, chain Chain) (bool, error) { exist := true diff --git a/vendor/k8s.io/kubernetes/pkg/util/flag/BUILD b/vendor/k8s.io/kubernetes/pkg/util/flag/BUILD index 976dd85000b..4e5ac790111 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/flag/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/flag/BUILD @@ -13,7 +13,7 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/net:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/flag/flags.go b/vendor/k8s.io/kubernetes/pkg/util/flag/flags.go index 1d57c3e8d6b..7c489e93ab3 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/flag/flags.go +++ b/vendor/k8s.io/kubernetes/pkg/util/flag/flags.go @@ -19,21 +19,13 @@ package flag import ( "fmt" "net" - "strconv" "github.com/spf13/pflag" - "k8s.io/klog" utilnet "k8s.io/apimachinery/pkg/util/net" + utilsnet "k8s.io/utils/net" ) -// PrintFlags logs the flags in the flagset -func PrintFlags(flags *pflag.FlagSet) { - flags.VisitAll(func(flag *pflag.Flag) { - klog.V(1).Infof("FLAG: --%s=%q", flag.Name, flag.Value) - }) -} - // TODO(mikedanese): remove these flag wrapper types when we remove command line flags var ( @@ -109,7 +101,7 @@ func (v IPPortVar) Set(s string) error { if net.ParseIP(host) == nil { return fmt.Errorf("%q is not a valid IP address", host) } - if _, err := strconv.Atoi(port); err != nil { + if _, err := utilsnet.ParsePort(port, true); err != nil { return fmt.Errorf("%q is not a valid number", port) } *v.Val = s diff --git a/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/BUILD b/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/BUILD index 92688fde686..823a4ffdef4 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/BUILD @@ -13,7 +13,7 @@ go_library( deps = [ "//pkg/util/goroutinemap/exponentialbackoff:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/goroutinemap.go b/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/goroutinemap.go index 9b6eb731927..f66dc82f0b9 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/goroutinemap.go +++ b/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/goroutinemap.go @@ -26,7 +26,7 @@ import ( "sync" k8sRuntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff" ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/ipconfig/BUILD b/vendor/k8s.io/kubernetes/pkg/util/ipconfig/BUILD index 39504f89bbb..18ef0f8dea8 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/ipconfig/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/ipconfig/BUILD @@ -14,7 +14,7 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/util/ipconfig", deps = [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/ipconfig/ipconfig.go b/vendor/k8s.io/kubernetes/pkg/util/ipconfig/ipconfig.go index cd8ba2951bb..0d208c3e5a2 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/ipconfig/ipconfig.go +++ b/vendor/k8s.io/kubernetes/pkg/util/ipconfig/ipconfig.go @@ -20,7 +20,7 @@ import ( "runtime" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/ipset/BUILD b/vendor/k8s.io/kubernetes/pkg/util/ipset/BUILD index 186fa432043..f442a3a2ea8 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/ipset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/ipset/BUILD @@ -9,7 +9,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/util/ipset", visibility = ["//visibility:public"], deps = [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/ipset/ipset.go b/vendor/k8s.io/kubernetes/pkg/util/ipset/ipset.go index 454157ca5f6..52b646c231d 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/ipset/ipset.go +++ b/vendor/k8s.io/kubernetes/pkg/util/ipset/ipset.go @@ -24,7 +24,7 @@ import ( "strconv" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/iptables/BUILD b/vendor/k8s.io/kubernetes/pkg/util/iptables/BUILD index 81d3ce9bd41..505b2260257 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/iptables/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/iptables/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/version:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", ] + select({ diff --git a/vendor/k8s.io/kubernetes/pkg/util/iptables/OWNERS b/vendor/k8s.io/kubernetes/pkg/util/iptables/OWNERS index ceb274ac52e..cc5f832961a 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/iptables/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/util/iptables/OWNERS @@ -3,12 +3,12 @@ reviewers: - dcbw - thockin - - eparis - danwinship approvers: - dcbw - thockin - - eparis - danwinship +emeritus_approvers: + - eparis labels: - sig/network diff --git a/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go index e1f68be5938..728d5b30c09 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go +++ b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" utilversion "k8s.io/apimachinery/pkg/util/version" utilwait "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" utiltrace "k8s.io/utils/trace" ) @@ -55,8 +55,10 @@ type Interface interface { EnsureRule(position RulePosition, table Table, chain Chain, args ...string) (bool, error) // DeleteRule checks if the specified rule is present and, if so, deletes it. DeleteRule(table Table, chain Chain, args ...string) error - // IsIpv6 returns true if this is managing ipv6 tables - IsIpv6() bool + // IsIPv6 returns true if this is managing ipv6 tables. + IsIPv6() bool + // Protocol returns the IP family this instance is managing, + Protocol() Protocol // SaveInto calls `iptables-save` for table and stores result in a given buffer. SaveInto(table Table, buffer *bytes.Buffer) error // Restore runs `iptables-restore` passing data through []byte. @@ -87,13 +89,13 @@ type Interface interface { } // Protocol defines the ip protocol either ipv4 or ipv6 -type Protocol byte +type Protocol string const ( - // ProtocolIpv4 represents ipv4 protocol in iptables - ProtocolIpv4 Protocol = iota + 1 - // ProtocolIpv6 represents ipv6 protocol in iptables - ProtocolIpv6 + // ProtocolIPv4 represents ipv4 protocol in iptables + ProtocolIPv4 Protocol = "IPv4" + // ProtocolIPv6 represents ipv6 protocol in iptables + ProtocolIPv6 Protocol = "IPv6" ) // Table represents different iptable like filter,nat, mangle and raw @@ -319,8 +321,12 @@ func (runner *runner) DeleteRule(table Table, chain Chain, args ...string) error return nil } -func (runner *runner) IsIpv6() bool { - return runner.protocol == ProtocolIpv6 +func (runner *runner) IsIPv6() bool { + return runner.protocol == ProtocolIPv6 +} + +func (runner *runner) Protocol() Protocol { + return runner.protocol } // SaveInto is part of Interface. @@ -410,14 +416,14 @@ func (runner *runner) restoreInternal(args []string, data []byte, flush FlushFla } func iptablesSaveCommand(protocol Protocol) string { - if protocol == ProtocolIpv6 { + if protocol == ProtocolIPv6 { return cmdIP6TablesSave } return cmdIPTablesSave } func iptablesRestoreCommand(protocol Protocol) string { - if protocol == ProtocolIpv6 { + if protocol == ProtocolIPv6 { return cmdIP6TablesRestore } return cmdIPTablesRestore @@ -425,7 +431,7 @@ func iptablesRestoreCommand(protocol Protocol) string { } func iptablesCommand(protocol Protocol) string { - if protocol == ProtocolIpv6 { + if protocol == ProtocolIPv6 { return cmdIP6Tables } return cmdIPTables @@ -601,6 +607,9 @@ func (runner *runner) chainExists(table Table, chain Chain) (bool, error) { runner.mu.Lock() defer runner.mu.Unlock() + trace := utiltrace.New("iptables Monitor CANARY check") + defer trace.LogIfLong(2 * time.Second) + _, err := runner.run(opListChain, fullArgs) return err == nil, err } @@ -611,7 +620,7 @@ const ( opCreateChain operation = "-N" opFlushChain operation = "-F" opDeleteChain operation = "-X" - opListChain operation = "-L" + opListChain operation = "-S" opAppendRule operation = "-A" opCheckRule operation = "-C" opDeleteRule operation = "-D" diff --git a/vendor/k8s.io/kubernetes/pkg/util/ipvs/BUILD b/vendor/k8s.io/kubernetes/pkg/util/ipvs/BUILD index 25f7f4f7908..ddc7c45e917 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/ipvs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/ipvs/BUILD @@ -17,10 +17,10 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/version:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:android": [ - "//third_party/forked/ipvs:go_default_library", + "//vendor/github.com/moby/ipvs:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ - "//third_party/forked/ipvs:go_default_library", + "//vendor/github.com/moby/ipvs:go_default_library", ], "//conditions:default": [], }), @@ -38,9 +38,13 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/util/version:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//vendor/k8s.io/utils/exec:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ - "//third_party/forked/ipvs:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/github.com/moby/ipvs:go_default_library", + "//vendor/github.com/pkg/errors:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], "@io_bazel_rules_go//go/platform:darwin": [ @@ -52,12 +56,19 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/exec:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/k8s.io/utils/exec:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/exec:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//vendor/k8s.io/utils/exec:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ - "//third_party/forked/ipvs:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/github.com/moby/ipvs:go_default_library", + "//vendor/github.com/pkg/errors:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], "@io_bazel_rules_go//go/platform:nacl": [ diff --git a/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs.go b/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs.go index 13eef323c70..a9bb32f1be6 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs.go +++ b/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs.go @@ -19,6 +19,7 @@ package ipvs import ( "net" "strconv" + "strings" "time" "k8s.io/apimachinery/pkg/util/version" @@ -133,3 +134,8 @@ func GetRequiredIPVSModules(kernelVersion *version.Version) []string { return []string{KernelModuleIPVS, KernelModuleIPVSRR, KernelModuleIPVSWRR, KernelModuleIPVSSH, KernelModuleNfConntrack} } + +// IsRsGracefulTerminationNeeded returns true if protocol requires graceful termination for the stale connections +func IsRsGracefulTerminationNeeded(proto string) bool { + return !strings.EqualFold(proto, "UDP") && !strings.EqualFold(proto, "SCTP") +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs_linux.go b/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs_linux.go index 846bdb3621d..37821707236 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs_linux.go @@ -19,7 +19,6 @@ limitations under the License. package ipvs import ( - "errors" "fmt" "net" "strings" @@ -27,8 +26,10 @@ import ( "syscall" "time" - "k8s.io/klog" - libipvs "k8s.io/kubernetes/third_party/forked/ipvs" + libipvs "github.com/moby/ipvs" + "github.com/pkg/errors" + + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" ) @@ -59,7 +60,7 @@ func New(exec utilexec.Interface) Interface { func (runner *runner) AddVirtualServer(vs *VirtualServer) error { svc, err := toIPVSService(vs) if err != nil { - return err + return errors.Wrap(err, "could not convert local virtual server to IPVS service") } runner.mu.Lock() defer runner.mu.Unlock() @@ -70,7 +71,7 @@ func (runner *runner) AddVirtualServer(vs *VirtualServer) error { func (runner *runner) UpdateVirtualServer(vs *VirtualServer) error { svc, err := toIPVSService(vs) if err != nil { - return err + return errors.Wrap(err, "could not convert local virtual server to IPVS service") } runner.mu.Lock() defer runner.mu.Unlock() @@ -81,7 +82,7 @@ func (runner *runner) UpdateVirtualServer(vs *VirtualServer) error { func (runner *runner) DeleteVirtualServer(vs *VirtualServer) error { svc, err := toIPVSService(vs) if err != nil { - return err + return errors.Wrap(err, "could not convert local virtual server to IPVS service") } runner.mu.Lock() defer runner.mu.Unlock() @@ -92,18 +93,18 @@ func (runner *runner) DeleteVirtualServer(vs *VirtualServer) error { func (runner *runner) GetVirtualServer(vs *VirtualServer) (*VirtualServer, error) { svc, err := toIPVSService(vs) if err != nil { - return nil, err + return nil, errors.Wrap(err, "could not convert local virtual server to IPVS service") } runner.mu.Lock() ipvsSvc, err := runner.ipvsHandle.GetService(svc) runner.mu.Unlock() if err != nil { - return nil, err + return nil, errors.Wrap(err, "could not get IPVS service") } vServ, err := toVirtualServer(ipvsSvc) if err != nil { - return nil, err + return nil, errors.Wrap(err, "could not convert IPVS service to local virtual server") } return vServ, nil } @@ -114,13 +115,13 @@ func (runner *runner) GetVirtualServers() ([]*VirtualServer, error) { ipvsSvcs, err := runner.ipvsHandle.GetServices() runner.mu.Unlock() if err != nil { - return nil, err + return nil, errors.Wrap(err, "could not get IPVS services") } vss := make([]*VirtualServer, 0) for _, ipvsSvc := range ipvsSvcs { vs, err := toVirtualServer(ipvsSvc) if err != nil { - return nil, err + return nil, errors.Wrap(err, "could not convert IPVS service to local virtual server") } vss = append(vss, vs) } @@ -138,11 +139,11 @@ func (runner *runner) Flush() error { func (runner *runner) AddRealServer(vs *VirtualServer, rs *RealServer) error { svc, err := toIPVSService(vs) if err != nil { - return err + return errors.Wrap(err, "could not convert local virtual server to IPVS service") } dst, err := toIPVSDestination(rs) if err != nil { - return err + return errors.Wrap(err, "could not convert local real server to IPVS destination") } runner.mu.Lock() defer runner.mu.Unlock() @@ -153,11 +154,11 @@ func (runner *runner) AddRealServer(vs *VirtualServer, rs *RealServer) error { func (runner *runner) DeleteRealServer(vs *VirtualServer, rs *RealServer) error { svc, err := toIPVSService(vs) if err != nil { - return err + return errors.Wrap(err, "could not convert local virtual server to IPVS service") } dst, err := toIPVSDestination(rs) if err != nil { - return err + return errors.Wrap(err, "could not convert local real server to IPVS destination") } runner.mu.Lock() defer runner.mu.Unlock() @@ -167,11 +168,11 @@ func (runner *runner) DeleteRealServer(vs *VirtualServer, rs *RealServer) error func (runner *runner) UpdateRealServer(vs *VirtualServer, rs *RealServer) error { svc, err := toIPVSService(vs) if err != nil { - return err + return errors.Wrap(err, "could not convert local virtual server to IPVS service") } dst, err := toIPVSDestination(rs) if err != nil { - return err + return errors.Wrap(err, "could not convert local real server to IPVS destination") } runner.mu.Lock() defer runner.mu.Unlock() @@ -182,20 +183,20 @@ func (runner *runner) UpdateRealServer(vs *VirtualServer, rs *RealServer) error func (runner *runner) GetRealServers(vs *VirtualServer) ([]*RealServer, error) { svc, err := toIPVSService(vs) if err != nil { - return nil, err + return nil, errors.Wrap(err, "could not convert local virtual server to IPVS service") } runner.mu.Lock() dsts, err := runner.ipvsHandle.GetDestinations(svc) runner.mu.Unlock() if err != nil { - return nil, err + return nil, errors.Wrap(err, "could not get IPVS destination for service") } rss := make([]*RealServer, 0) for _, dst := range dsts { dst, err := toRealServer(dst) // TODO: aggregate errors? if err != nil { - return nil, err + return nil, errors.Wrap(err, "could not convert IPVS destination to local real server") } rss = append(rss, dst) } diff --git a/vendor/k8s.io/kubernetes/pkg/util/netsh/BUILD b/vendor/k8s.io/kubernetes/pkg/util/netsh/BUILD index a356f094a9e..a98e15e5696 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/netsh/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/netsh/BUILD @@ -14,7 +14,7 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/util/netsh", deps = [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/netsh/netsh.go b/vendor/k8s.io/kubernetes/pkg/util/netsh/netsh.go index 580e1482f52..b02c2df6b24 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/netsh/netsh.go +++ b/vendor/k8s.io/kubernetes/pkg/util/netsh/netsh.go @@ -23,7 +23,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/node/BUILD b/vendor/k8s.io/kubernetes/pkg/util/node/BUILD index 7b4dd14e26c..96013df5ace 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/node/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/node/BUILD @@ -19,7 +19,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/node/node.go b/vendor/k8s.io/kubernetes/pkg/util/node/node.go index 4830f52abf1..2d3f470b79e 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/node/node.go +++ b/vendor/k8s.io/kubernetes/pkg/util/node/node.go @@ -25,7 +25,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" diff --git a/vendor/k8s.io/kubernetes/pkg/util/oom/BUILD b/vendor/k8s.io/kubernetes/pkg/util/oom/BUILD index 36f7a8a57c0..252d192b0df 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/oom/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/oom/BUILD @@ -19,11 +19,11 @@ go_library( deps = select({ "@io_bazel_rules_go//go/platform:android": [ "//pkg/kubelet/cm/util:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ "//pkg/kubelet/cm/util:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "//conditions:default": [], }), diff --git a/vendor/k8s.io/kubernetes/pkg/util/oom/oom_linux.go b/vendor/k8s.io/kubernetes/pkg/util/oom/oom_linux.go index 243c30d0cc4..f81eab99bd0 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/oom/oom_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/util/oom/oom_linux.go @@ -29,7 +29,7 @@ import ( cmutil "k8s.io/kubernetes/pkg/kubelet/cm/util" - "k8s.io/klog" + "k8s.io/klog/v2" ) func NewOOMAdjuster() *OOMAdjuster { diff --git a/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go b/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go index a6d97043d49..ef869cd768e 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go +++ b/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go @@ -26,11 +26,6 @@ import ( dockerref "github.com/docker/distribution/reference" ) -const ( - // DefaultImageTag is the default tag for docker image. - DefaultImageTag = "latest" -) - // ParseImageName parses a docker image string into three parts: repo, tag and digest. // If both tag and digest are empty, a default image tag will be returned. func ParseImageName(image string) (string, string, string, error) { @@ -53,7 +48,7 @@ func ParseImageName(image string) (string, string, string, error) { } // If no tag was specified, use the default "latest". if len(tag) == 0 && len(digest) == 0 { - tag = DefaultImageTag + tag = "latest" } return repoToPull, tag, digest, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/util/procfs/BUILD b/vendor/k8s.io/kubernetes/pkg/util/procfs/BUILD index d612a9a1251..13de800b1b7 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/procfs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/procfs/BUILD @@ -19,11 +19,11 @@ go_library( deps = select({ "@io_bazel_rules_go//go/platform:android": [ "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "//conditions:default": [], }), diff --git a/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_linux.go b/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_linux.go index 9a186f4fe98..fdb6ea76eae 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_linux.go @@ -33,7 +33,7 @@ import ( "unicode" utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/klog" + "k8s.io/klog/v2" ) // ProcFS provides a helper for getting container name via pid. diff --git a/vendor/k8s.io/kubernetes/pkg/util/resizefs/BUILD b/vendor/k8s.io/kubernetes/pkg/util/resizefs/BUILD index b4144f1255e..7578dd40b83 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/resizefs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/resizefs/BUILD @@ -9,8 +9,11 @@ go_library( importpath = "k8s.io/kubernetes/pkg/util/resizefs", visibility = ["//visibility:public"], deps = select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//vendor/k8s.io/utils/mount:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], "@io_bazel_rules_go//go/platform:darwin": [ @@ -22,11 +25,17 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/mount:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/k8s.io/utils/mount:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/mount:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//vendor/k8s.io/utils/mount:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], "@io_bazel_rules_go//go/platform:nacl": [ diff --git a/vendor/k8s.io/kubernetes/pkg/util/resizefs/resizefs_linux.go b/vendor/k8s.io/kubernetes/pkg/util/resizefs/resizefs_linux.go index 5ec8a387766..9df5a88eeda 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/resizefs/resizefs_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/util/resizefs/resizefs_linux.go @@ -21,7 +21,7 @@ package resizefs import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/rlimit/rlimit_linux.go b/vendor/k8s.io/kubernetes/pkg/util/rlimit/rlimit_linux.go index 17e8a713179..ef14f883811 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/rlimit/rlimit_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/util/rlimit/rlimit_linux.go @@ -22,6 +22,7 @@ import ( "golang.org/x/sys/unix" ) -func RlimitNumFiles(maxOpenFiles uint64) { - unix.Setrlimit(unix.RLIMIT_NOFILE, &unix.Rlimit{Max: maxOpenFiles, Cur: maxOpenFiles}) +// SetNumFiles sets the linux rlimit for the maximum open files. +func SetNumFiles(maxOpenFiles uint64) error { + return unix.Setrlimit(unix.RLIMIT_NOFILE, &unix.Rlimit{Max: maxOpenFiles, Cur: maxOpenFiles}) } diff --git a/vendor/k8s.io/kubernetes/pkg/util/rlimit/rlimit_unsupported.go b/vendor/k8s.io/kubernetes/pkg/util/rlimit/rlimit_unsupported.go index 25f57be2c31..44011948342 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/rlimit/rlimit_unsupported.go +++ b/vendor/k8s.io/kubernetes/pkg/util/rlimit/rlimit_unsupported.go @@ -22,6 +22,7 @@ import ( "errors" ) -func RlimitNumFiles(maxOpenFiles uint64) error { +// SetNumFiles sets the rlimit for the maximum open files. +func SetNumFiles(maxOpenFiles uint64) error { return errors.New("SetRLimit unsupported in this platform") } diff --git a/vendor/k8s.io/kubernetes/pkg/util/tolerations/BUILD b/vendor/k8s.io/kubernetes/pkg/util/tolerations/BUILD index 0224bc0ba63..54e2e33d805 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/tolerations/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/tolerations/BUILD @@ -16,7 +16,7 @@ go_library( deps = [ "//pkg/apis/core:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/tolerations/tolerations.go b/vendor/k8s.io/kubernetes/pkg/util/tolerations/tolerations.go index 316b6437244..073aa901ab9 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/tolerations/tolerations.go +++ b/vendor/k8s.io/kubernetes/pkg/util/tolerations/tolerations.go @@ -18,7 +18,7 @@ package tolerations import ( apiequality "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/klog" + "k8s.io/klog/v2" api "k8s.io/kubernetes/pkg/apis/core" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/BUILD index 720b13406dc..e346c141720 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/BUILD @@ -35,7 +35,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/cache:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ] + select({ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/OWNERS index 985ab40a80f..6b5f6ba5041 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/OWNERS @@ -1,21 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: -- saad-ali -- thockin -- jsafrane -- rootfs -- gnufied -- msau42 +- sig-storage-approvers reviewers: -- saad-ali -- jsafrane -- rootfs -- jingxu97 -- msau42 -- gnufied -- verult -- davidz627 -- humblec +- sig-storage-reviewers labels: - sig/storage diff --git a/vendor/k8s.io/kubernetes/pkg/volume/awsebs/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/awsebs/BUILD index c206467ec59..d99ff7e3951 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/awsebs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/awsebs/BUILD @@ -31,7 +31,7 @@ go_library( "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/aws:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", ], @@ -57,7 +57,7 @@ go_test( "//staging/src/k8s.io/client-go/util/testing:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/aws:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/awsebs/attacher.go b/vendor/k8s.io/kubernetes/pkg/volume/awsebs/attacher.go index 35bf55df8fe..f68471cf31e 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/awsebs/attacher.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/awsebs/attacher.go @@ -27,7 +27,7 @@ import ( "strconv" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" v1 "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs.go b/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs.go index a5ae720ac43..225278cce44 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs.go @@ -28,7 +28,7 @@ import ( "strconv" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" v1 "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs_block.go b/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs_block.go index 86e380288e6..a9c4eca3228 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs_block.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs_block.go @@ -24,7 +24,7 @@ import ( "strconv" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_util.go b/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_util.go index 93f5ee5a2ea..ce513d1b1bb 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_util.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_util.go @@ -26,7 +26,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" v1 "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/BUILD index e5ad7ccd410..b2029d31467 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/BUILD @@ -36,12 +36,15 @@ go_library( "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", ] + select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//vendor/k8s.io/utils/exec:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//vendor/k8s.io/utils/exec:go_default_library", ], @@ -54,9 +57,15 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//vendor/k8s.io/utils/exec:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/k8s.io/utils/exec:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/exec:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//vendor/k8s.io/utils/exec:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//vendor/k8s.io/utils/exec:go_default_library", ], @@ -112,7 +121,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/client-go/util/testing:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/attacher.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/attacher.go index 3516cfc4050..60bb9a66110 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/attacher.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/attacher.go @@ -27,8 +27,8 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" - "k8s.io/klog" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" + "k8s.io/klog/v2" "k8s.io/utils/mount" v1 "k8s.io/api/core/v1" @@ -202,8 +202,8 @@ func (a *azureDiskAttacher) GetDeviceMountPath(spec *volume.Spec) (string, error return makeGlobalPDPath(a.plugin.host, volumeSource.DataDiskURI, isManagedDisk) } -func (attacher *azureDiskAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMountPath string) error { - mounter := attacher.plugin.host.GetMounter(azureDataDiskPluginName) +func (a *azureDiskAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMountPath string) error { + mounter := a.plugin.host.GetMounter(azureDataDiskPluginName) notMnt, err := mounter.IsLikelyNotMountPoint(deviceMountPath) if err != nil { @@ -242,7 +242,7 @@ func (attacher *azureDiskAttacher) MountDevice(spec *volume.Spec, devicePath str options := []string{} if notMnt { - diskMounter := util.NewSafeFormatAndMountFromHost(azureDataDiskPluginName, attacher.plugin.host) + diskMounter := util.NewSafeFormatAndMountFromHost(azureDataDiskPluginName, a.plugin.host) mountOptions := util.MountOptionFromSpec(spec, options...) if runtime.GOOS == "windows" { // only parse devicePath on Windows node @@ -284,8 +284,8 @@ func (d *azureDiskDetacher) Detach(diskURI string, nodeName types.NodeName) erro } // UnmountDevice unmounts the volume on the node -func (detacher *azureDiskDetacher) UnmountDevice(deviceMountPath string) error { - err := mount.CleanupMountPoint(deviceMountPath, detacher.plugin.host.GetMounter(detacher.plugin.GetPluginName()), false) +func (d *azureDiskDetacher) UnmountDevice(deviceMountPath string) error { + err := mount.CleanupMountPoint(deviceMountPath, d.plugin.host.GetMounter(d.plugin.GetPluginName()), false) if err == nil { klog.V(2).Infof("azureDisk - Device %s was unmounted", deviceMountPath) } else { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common.go index c8cd1361ce1..f9d995610c2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common.go @@ -26,7 +26,7 @@ import ( "regexp" libstrings "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" @@ -39,7 +39,7 @@ import ( ) const ( - defaultStorageAccountType = compute.StandardLRS + defaultStorageAccountType = compute.StandardSSDLRS defaultAzureDiskKind = v1.AzureManagedDisk defaultAzureDataDiskCachingMode = v1.AzureDataDiskCachingReadOnly ) @@ -59,13 +59,12 @@ var ( string(api.AzureDataDiskCachingReadWrite)) supportedDiskKinds = sets.NewString( - string(api.AzureSharedBlobDisk), - string(api.AzureDedicatedBlobDisk), + string(api.AzureSharedBlobDisk), // deprecated + string(api.AzureDedicatedBlobDisk), // deprecated string(api.AzureManagedDisk)) // only for Windows node - winDiskNumRE = regexp.MustCompile(`/dev/disk(.+)`) - winDiskNumFormat = "/dev/disk%d" + winDiskNumRE = regexp.MustCompile(`/dev/disk(.+)`) ) func getPath(uid types.UID, volName string, host volume.VolumeHost) string { @@ -73,16 +72,16 @@ func getPath(uid types.UID, volName string, host volume.VolumeHost) string { } // creates a unique path for disks (even if they share the same *.vhd name) -func makeGlobalPDPath(host volume.VolumeHost, diskUri string, isManaged bool) (string, error) { - diskUri = libstrings.ToLower(diskUri) // always lower uri because users may enter it in caps. +func makeGlobalPDPath(host volume.VolumeHost, diskURI string, isManaged bool) (string, error) { + diskURI = libstrings.ToLower(diskURI) // always lower uri because users may enter it in caps. uniqueDiskNameTemplate := "%s%s" - hashedDiskUri := azure.MakeCRC32(diskUri) + hashedDiskURI := azure.MakeCRC32(diskURI) prefix := "b" if isManaged { prefix = "m" } - // "{m for managed b for blob}{hashed diskUri or DiskId depending on disk kind }" - diskName := fmt.Sprintf(uniqueDiskNameTemplate, prefix, hashedDiskUri) + // "{m for managed b for blob}{hashed diskURI or DiskId depending on disk kind }" + diskName := fmt.Sprintf(uniqueDiskNameTemplate, prefix, hashedDiskURI) pdPath := filepath.Join(host.GetPluginDir(azureDataDiskPluginName), util.MountsInGlobalPDPath, diskName) return pdPath, nil diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common_linux.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common_linux.go index 9da9adfef03..10460585a83 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common_linux.go @@ -25,7 +25,7 @@ import ( "strconv" libstrings "strings" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" ) @@ -73,17 +73,17 @@ func getDiskLinkByDevName(io ioHandler, devLinkPath, devName string) (string, er } func scsiHostRescan(io ioHandler, exec utilexec.Interface) { - scsi_path := "/sys/class/scsi_host/" - if dirs, err := io.ReadDir(scsi_path); err == nil { + scsiPath := "/sys/class/scsi_host/" + if dirs, err := io.ReadDir(scsiPath); err == nil { for _, f := range dirs { - name := scsi_path + f.Name() + "/scan" + name := scsiPath + f.Name() + "/scan" data := []byte("- - -") if err = io.WriteFile(name, data, 0666); err != nil { klog.Warningf("failed to rescan scsi host %s", name) } } } else { - klog.Warningf("failed to read %s, err %v", scsi_path, err) + klog.Warningf("failed to read %s, err %v", scsiPath, err) } } @@ -95,8 +95,8 @@ func findDiskByLun(lun int, io ioHandler, exec utilexec.Interface) (string, erro // finds a device mounted to "current" node func findDiskByLunWithConstraint(lun int, io ioHandler, azureDisks []string) (string, error) { var err error - sys_path := "/sys/bus/scsi/devices" - if dirs, err := io.ReadDir(sys_path); err == nil { + sysPath := "/sys/bus/scsi/devices" + if dirs, err := io.ReadDir(sysPath); err == nil { for _, f := range dirs { name := f.Name() // look for path like /sys/bus/scsi/devices/3:0:0:1 @@ -128,7 +128,7 @@ func findDiskByLunWithConstraint(lun int, io ioHandler, azureDisks []string) (st if lun == l { // find the matching LUN // read vendor and model to ensure it is a VHD disk - vendorPath := filepath.Join(sys_path, name, "vendor") + vendorPath := filepath.Join(sysPath, name, "vendor") vendorBytes, err := io.ReadFile(vendorPath) if err != nil { klog.Errorf("failed to read device vendor, err: %v", err) @@ -140,7 +140,7 @@ func findDiskByLunWithConstraint(lun int, io ioHandler, azureDisks []string) (st continue } - modelPath := filepath.Join(sys_path, name, "model") + modelPath := filepath.Join(sysPath, name, "model") modelBytes, err := io.ReadFile(modelPath) if err != nil { klog.Errorf("failed to read device model, err: %v", err) @@ -153,7 +153,7 @@ func findDiskByLunWithConstraint(lun int, io ioHandler, azureDisks []string) (st } // find a disk, validate name - dir := filepath.Join(sys_path, name, "block") + dir := filepath.Join(sysPath, name, "block") if dev, err := io.ReadDir(dir); err == nil { found := false devName := dev[0].Name() diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common_windows.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common_windows.go index 0b8f9004d68..5ce95b9f3f4 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_common_windows.go @@ -25,11 +25,13 @@ import ( "strconv" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" "k8s.io/utils/mount" ) +var winDiskNumFormat = "/dev/disk%d" + func scsiHostRescan(io ioHandler, exec utilexec.Interface) { cmd := "Update-HostStorageCache" output, err := exec.Command("powershell", "/c", cmd).CombinedOutput() diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd.go index 13b8e10aef4..1a1b2bb944b 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd.go @@ -23,9 +23,9 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" @@ -36,7 +36,7 @@ import ( "k8s.io/legacy-cloud-providers/azure" ) -// interface exposed by the cloud provider implementing Disk functionality +// DiskController interface exposed by the cloud provider implementing Disk functionality type DiskController interface { CreateBlobDisk(dataDiskName string, storageAccountType storage.SkuName, sizeGB int) (string, error) DeleteBlobDisk(diskUri string) error diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_block.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_block.go index d610afd06d7..bda1a00c66b 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_block.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_block.go @@ -22,7 +22,7 @@ import ( "fmt" "path/filepath" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_max_disk_count.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_max_disk_count.go index 000311c18f8..8a41a46e864 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_max_disk_count.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_max_disk_count.go @@ -71,12 +71,16 @@ var maxDataDiskCountMap = map[string]int64{ "STANDARD_D15_V2": 64, "STANDARD_D16AS_V4": 32, "STANDARD_D16A_V4": 32, + "STANDARD_D16DS_V4": 32, + "STANDARD_D16D_V4": 32, "STANDARD_D16S_V3": 32, "STANDARD_D16_V3": 32, "STANDARD_D1_V2": 4, "STANDARD_D2": 8, "STANDARD_D2AS_V4": 4, "STANDARD_D2A_V4": 4, + "STANDARD_D2DS_V4": 4, + "STANDARD_D2D_V4": 4, "STANDARD_D2S_V3": 4, "STANDARD_D2_V2": 8, "STANDARD_D2_V2_PROMO": 8, @@ -84,6 +88,8 @@ var maxDataDiskCountMap = map[string]int64{ "STANDARD_D3": 16, "STANDARD_D32AS_V4": 32, "STANDARD_D32A_V4": 32, + "STANDARD_D32DS_V4": 32, + "STANDARD_D32D_V4": 32, "STANDARD_D32S_V3": 32, "STANDARD_D32_V3": 32, "STANDARD_D3_V2": 16, @@ -91,10 +97,14 @@ var maxDataDiskCountMap = map[string]int64{ "STANDARD_D4": 32, "STANDARD_D48AS_V4": 32, "STANDARD_D48A_V4": 32, + "STANDARD_D48DS_V4": 32, + "STANDARD_D48D_V4": 32, "STANDARD_D48S_V3": 32, "STANDARD_D48_V3": 32, "STANDARD_D4AS_V4": 8, "STANDARD_D4A_V4": 8, + "STANDARD_D4DS_V4": 8, + "STANDARD_D4D_V4": 8, "STANDARD_D4S_V3": 8, "STANDARD_D4_V2": 32, "STANDARD_D4_V2_PROMO": 32, @@ -103,10 +113,14 @@ var maxDataDiskCountMap = map[string]int64{ "STANDARD_D5_V2_PROMO": 64, "STANDARD_D64AS_V4": 32, "STANDARD_D64A_V4": 32, + "STANDARD_D64DS_V4": 32, + "STANDARD_D64D_V4": 32, "STANDARD_D64S_V3": 32, "STANDARD_D64_V3": 32, "STANDARD_D8AS_V4": 16, "STANDARD_D8A_V4": 16, + "STANDARD_D8DS_V4": 16, + "STANDARD_D8D_V4": 16, "STANDARD_D8S_V3": 16, "STANDARD_D8_V3": 16, "STANDARD_D96AS_V4": 32, @@ -150,47 +164,71 @@ var maxDataDiskCountMap = map[string]int64{ "STANDARD_DS4_V2_PROMO": 32, "STANDARD_DS5_V2": 64, "STANDARD_DS5_V2_PROMO": 64, + "STANDARD_E16-4DS_V4": 32, "STANDARD_E16-4S_V3": 32, + "STANDARD_E16-8DS_V4": 32, "STANDARD_E16-8S_V3": 32, "STANDARD_E16AS_V4": 32, "STANDARD_E16A_V4": 32, + "STANDARD_E16DS_V4": 32, + "STANDARD_E16D_V4": 32, "STANDARD_E16S_V3": 32, "STANDARD_E16_V3": 32, "STANDARD_E20AS_V4": 32, "STANDARD_E20A_V4": 32, + "STANDARD_E20DS_V4": 32, + "STANDARD_E20D_V4": 32, "STANDARD_E20S_V3": 32, "STANDARD_E20_V3": 32, "STANDARD_E2AS_V4": 4, "STANDARD_E2A_V4": 4, + "STANDARD_E2DS_V4": 4, + "STANDARD_E2D_V4": 4, "STANDARD_E2S_V3": 4, "STANDARD_E2_V3": 4, + "STANDARD_E32-16DS_V4": 32, "STANDARD_E32-16S_V3": 32, + "STANDARD_E32-8DS_V4": 32, "STANDARD_E32-8S_V3": 32, "STANDARD_E32AS_V4": 32, "STANDARD_E32A_V4": 32, + "STANDARD_E32DS_V4": 32, + "STANDARD_E32D_V4": 32, "STANDARD_E32S_V3": 32, "STANDARD_E32_V3": 32, + "STANDARD_E4-2DS_V4": 8, "STANDARD_E4-2S_V3": 8, "STANDARD_E48AS_V4": 32, "STANDARD_E48A_V4": 32, + "STANDARD_E48DS_V4": 32, + "STANDARD_E48D_V4": 32, "STANDARD_E48S_V3": 32, "STANDARD_E48_V3": 32, "STANDARD_E4AS_V4": 8, "STANDARD_E4A_V4": 8, + "STANDARD_E4DS_V4": 8, + "STANDARD_E4D_V4": 8, "STANDARD_E4S_V3": 8, "STANDARD_E4_V3": 8, + "STANDARD_E64-16DS_V4": 32, "STANDARD_E64-16S_V3": 32, "STANDARD_E64-32S_V3": 32, "STANDARD_E64AS_V4": 32, "STANDARD_E64A_V4": 32, + "STANDARD_E64DS_V4": 32, + "STANDARD_E64D_V4": 32, "STANDARD_E64IS_V3": 32, "STANDARD_E64I_V3": 32, "STANDARD_E64S_V3": 32, "STANDARD_E64_V3": 32, + "STANDARD_E8-2DS_V4": 16, "STANDARD_E8-2S_V3": 16, + "STANDARD_E8-4DS_V4": 16, "STANDARD_E8-4S_V3": 16, "STANDARD_E8AS_V4": 16, "STANDARD_E8A_V4": 16, + "STANDARD_E8DS_V4": 16, + "STANDARD_E8D_V4": 16, "STANDARD_E8S_V3": 16, "STANDARD_E8_V3": 16, "STANDARD_E96AS_V4": 32, @@ -268,6 +306,8 @@ var maxDataDiskCountMap = map[string]int64{ "STANDARD_M32LS": 32, "STANDARD_M32MS": 32, "STANDARD_M32TS": 32, + "STANDARD_M416-208MS_V2": 64, + "STANDARD_M416-208S_V2": 64, "STANDARD_M416MS_V2": 64, "STANDARD_M416S_V2": 64, "STANDARD_M64-16MS": 64, diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_mounter.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_mounter.go index ed2b49a6b35..3a5749ab38a 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_mounter.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_mounter.go @@ -23,7 +23,7 @@ import ( "os" "runtime" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" v1 "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_provision.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_provision.go index d391b07e16c..4c8daf23b15 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_provision.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_provision.go @@ -93,26 +93,11 @@ func parseZoned(zonedString string, kind v1.AzureDataDiskKind) (bool, error) { } func (p *azureDiskProvisioner) Provision(selectedNode *v1.Node, allowedTopologies []v1.TopologySelectorTerm) (*v1.PersistentVolume, error) { - if !util.AccessModesContainedInAll(p.plugin.GetAccessModes(), p.options.PVC.Spec.AccessModes) { - return nil, fmt.Errorf("invalid AccessModes %v: only AccessModes %v are supported", p.options.PVC.Spec.AccessModes, p.plugin.GetAccessModes()) - } - supportedModes := p.plugin.GetAccessModes() - // perform static validation first if p.options.PVC.Spec.Selector != nil { return nil, fmt.Errorf("azureDisk - claim.Spec.Selector is not supported for dynamic provisioning on Azure disk") } - if len(p.options.PVC.Spec.AccessModes) > 1 { - return nil, fmt.Errorf("AzureDisk - multiple access modes are not supported on AzureDisk plugin") - } - - if len(p.options.PVC.Spec.AccessModes) == 1 { - if p.options.PVC.Spec.AccessModes[0] != supportedModes[0] { - return nil, fmt.Errorf("AzureDisk - mode %s is not supported by AzureDisk plugin (supported mode is %s)", p.options.PVC.Spec.AccessModes[0], supportedModes) - } - } - var ( location, account string storageAccountType, fsType string @@ -133,6 +118,9 @@ func (p *azureDiskProvisioner) Provision(selectedNode *v1.Node, allowedTopologie diskIopsReadWrite string diskMbpsReadWrite string diskEncryptionSetID string + customTags string + + maxShares int ) // maxLength = 79 - (4 for ".vhd") = 75 name := util.GenerateVolumeName(p.options.ClusterName, p.options.PVName, 75) @@ -177,13 +165,47 @@ func (p *azureDiskProvisioner) Provision(selectedNode *v1.Node, allowedTopologie diskMbpsReadWrite = v case "diskencryptionsetid": diskEncryptionSetID = v + case "tags": + customTags = v case azure.WriteAcceleratorEnabled: writeAcceleratorEnabled = v + case "maxshares": + maxShares, err = strconv.Atoi(v) + if err != nil { + return nil, fmt.Errorf("parse %s failed with error: %v", v, err) + } + if maxShares < 1 { + return nil, fmt.Errorf("parse %s returned with invalid value: %d", v, maxShares) + } default: return nil, fmt.Errorf("AzureDisk - invalid option %s in storage class", k) } } + supportedModes := p.plugin.GetAccessModes() + if maxShares < 2 { + // only do AccessModes validation when maxShares < 2 + if !util.AccessModesContainedInAll(p.plugin.GetAccessModes(), p.options.PVC.Spec.AccessModes) { + return nil, fmt.Errorf("invalid AccessModes %v: only AccessModes %v are supported with maxShares(%d) < 2", p.options.PVC.Spec.AccessModes, p.plugin.GetAccessModes(), maxShares) + } + + if len(p.options.PVC.Spec.AccessModes) > 1 { + return nil, fmt.Errorf("AzureDisk - multiple access modes are not supported on AzureDisk plugin with maxShares(%d) < 2", maxShares) + } + + if len(p.options.PVC.Spec.AccessModes) == 1 { + if p.options.PVC.Spec.AccessModes[0] != supportedModes[0] { + return nil, fmt.Errorf("AzureDisk - mode %s is not supported by AzureDisk plugin (supported mode is %s) with maxShares(%d) < 2", p.options.PVC.Spec.AccessModes[0], supportedModes, maxShares) + } + } + } else { + supportedModes = []v1.PersistentVolumeAccessMode{ + v1.ReadWriteOnce, + v1.ReadOnlyMany, + v1.ReadWriteMany, + } + } + // normalize values skuName, err := normalizeStorageAccountType(storageAccountType) if err != nil { @@ -242,9 +264,14 @@ func (p *azureDiskProvisioner) Provision(selectedNode *v1.Node, allowedTopologie diskURI := "" labels := map[string]string{} if kind == v1.AzureManagedDisk { - tags := make(map[string]string) + tags, err := azure.ConvertTagsToMap(customTags) + if err != nil { + return nil, err + } if p.options.CloudTags != nil { - tags = *(p.options.CloudTags) + for k, v := range *(p.options.CloudTags) { + tags[k] = v + } } if strings.EqualFold(writeAcceleratorEnabled, "true") { tags[azure.WriteAcceleratorEnabled] = "true" @@ -261,6 +288,7 @@ func (p *azureDiskProvisioner) Provision(selectedNode *v1.Node, allowedTopologie DiskIOPSReadWrite: diskIopsReadWrite, DiskMBpsReadWrite: diskMbpsReadWrite, DiskEncryptionSetID: diskEncryptionSetID, + MaxShares: int32(maxShares), } diskURI, err = diskController.CreateManagedDisk(volumeOptions) if err != nil { @@ -270,7 +298,7 @@ func (p *azureDiskProvisioner) Provision(selectedNode *v1.Node, allowedTopologie if err != nil { return nil, err } - } else { + } else { // Attention: blob disk feature is deprecated if kind == v1.AzureDedicatedBlobDisk { _, diskURI, _, err = diskController.CreateVolume(name, account, storageAccountType, location, requestGiB) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/BUILD index 493559403e3..0fcbef38088 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/BUILD @@ -22,8 +22,9 @@ go_library( "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/fileclient:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go index 368c31ef853..fbc3b1a4735 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go @@ -25,7 +25,7 @@ import ( "runtime" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" @@ -165,22 +165,31 @@ func (plugin *azureFilePlugin) ExpandVolumeDevice( return oldSize, fmt.Errorf("invalid PV spec") } shareName := spec.PersistentVolume.Spec.AzureFile.ShareName - azure, err := getAzureCloudProvider(plugin.host.GetCloudProvider()) + azure, resourceGroup, err := getAzureCloudProvider(plugin.host.GetCloudProvider()) if err != nil { return oldSize, err } + if spec.PersistentVolume.ObjectMeta.Annotations[resourceGroupAnnotation] != "" { + resourceGroup = spec.PersistentVolume.ObjectMeta.Annotations[resourceGroupAnnotation] + } secretName, secretNamespace, err := getSecretNameAndNamespace(spec, spec.PersistentVolume.Spec.ClaimRef.Namespace) if err != nil { return oldSize, err } - accountName, accountKey, err := (&azureSvc{}).GetAzureCredentials(plugin.host, secretNamespace, secretName) + accountName, _, err := (&azureSvc{}).GetAzureCredentials(plugin.host, secretNamespace, secretName) if err != nil { return oldSize, err } - if err := azure.ResizeFileShare(accountName, accountKey, shareName, int(volumehelpers.RoundUpToGiB(newSize))); err != nil { + requestGiB, err := volumehelpers.RoundUpToGiBInt(newSize) + + if err != nil { + return oldSize, err + } + + if err := azure.ResizeFileShare(resourceGroup, accountName, shareName, requestGiB); err != nil { return oldSize, err } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_provision.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_provision.go index bdae2a3660c..d547fc6e9b0 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_provision.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_provision.go @@ -29,44 +29,52 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" cloudprovider "k8s.io/cloud-provider" volumehelpers "k8s.io/cloud-provider/volume/helpers" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" "k8s.io/legacy-cloud-providers/azure" + "k8s.io/legacy-cloud-providers/azure/clients/fileclient" utilstrings "k8s.io/utils/strings" ) -var _ volume.DeletableVolumePlugin = &azureFilePlugin{} -var _ volume.ProvisionableVolumePlugin = &azureFilePlugin{} +var ( + _ volume.DeletableVolumePlugin = &azureFilePlugin{} + _ volume.ProvisionableVolumePlugin = &azureFilePlugin{} + + resourceGroupAnnotation = "kubernetes.io/azure-file-resource-group" +) // Abstract interface to file share operations. // azure cloud provider should implement it type azureCloudProvider interface { // create a file share - CreateFileShare(shareName, accountName, accountType, accountKind, resourceGroup, location string, requestGiB int) (string, string, error) + CreateFileShare(account *azure.AccountOptions, fileShare *fileclient.ShareOptions) (string, string, error) // delete a file share - DeleteFileShare(accountName, accountKey, shareName string) error + DeleteFileShare(resourceGroup, accountName, shareName string) error // resize a file share - ResizeFileShare(accountName, accountKey, name string, sizeGiB int) error + ResizeFileShare(resourceGroup, accountName, name string, sizeGiB int) error } type azureFileDeleter struct { *azureFile - accountName, accountKey, shareName string - azureProvider azureCloudProvider + resourceGroup, accountName, shareName string + azureProvider azureCloudProvider } func (plugin *azureFilePlugin) NewDeleter(spec *volume.Spec) (volume.Deleter, error) { - azure, err := getAzureCloudProvider(plugin.host.GetCloudProvider()) + azure, resourceGroup, err := getAzureCloudProvider(plugin.host.GetCloudProvider()) if err != nil { klog.V(4).Infof("failed to get azure provider") return nil, err } + if spec.PersistentVolume != nil && spec.PersistentVolume.ObjectMeta.Annotations[resourceGroupAnnotation] != "" { + resourceGroup = spec.PersistentVolume.ObjectMeta.Annotations[resourceGroupAnnotation] + } - return plugin.newDeleterInternal(spec, &azureSvc{}, azure) + return plugin.newDeleterInternal(spec, &azureSvc{}, azure, resourceGroup) } -func (plugin *azureFilePlugin) newDeleterInternal(spec *volume.Spec, util azureUtil, azure azureCloudProvider) (volume.Deleter, error) { +func (plugin *azureFilePlugin) newDeleterInternal(spec *volume.Spec, util azureUtil, azure azureCloudProvider, resourceGroup string) (volume.Deleter, error) { if spec.PersistentVolume != nil && spec.PersistentVolume.Spec.AzureFile == nil { return nil, fmt.Errorf("invalid PV spec") } @@ -76,24 +84,25 @@ func (plugin *azureFilePlugin) newDeleterInternal(spec *volume.Spec, util azureU return nil, err } shareName := spec.PersistentVolume.Spec.AzureFile.ShareName - if accountName, accountKey, err := util.GetAzureCredentials(plugin.host, secretNamespace, secretName); err != nil { + if accountName, _, err := util.GetAzureCredentials(plugin.host, secretNamespace, secretName); err != nil { return nil, err } else { + return &azureFileDeleter{ azureFile: &azureFile{ volName: spec.Name(), plugin: plugin, }, + resourceGroup: resourceGroup, shareName: shareName, accountName: accountName, - accountKey: accountKey, azureProvider: azure, }, nil } } func (plugin *azureFilePlugin) NewProvisioner(options volume.VolumeOptions) (volume.Provisioner, error) { - azure, err := getAzureCloudProvider(plugin.host.GetCloudProvider()) + azure, resourceGroup, err := getAzureCloudProvider(plugin.host.GetCloudProvider()) if err != nil { klog.V(4).Infof("failed to get azure provider") return nil, err @@ -101,6 +110,9 @@ func (plugin *azureFilePlugin) NewProvisioner(options volume.VolumeOptions) (vol if len(options.PVC.Spec.AccessModes) == 0 { options.PVC.Spec.AccessModes = plugin.GetAccessModes() } + if resourceGroup != "" { + options.PVC.ObjectMeta.Annotations[resourceGroupAnnotation] = resourceGroup + } return plugin.newProvisionerInternal(options, azure) } @@ -124,7 +136,7 @@ func (f *azureFileDeleter) GetPath() string { func (f *azureFileDeleter) Delete() error { klog.V(4).Infof("deleting volume %s", f.shareName) - return f.azureProvider.DeleteFileShare(f.accountName, f.accountKey, f.shareName) + return f.azureProvider.DeleteFileShare(f.resourceGroup, f.accountName, f.shareName) } type azureFileProvisioner struct { @@ -144,10 +156,14 @@ func (a *azureFileProvisioner) Provision(selectedNode *v1.Node, allowedTopologie return nil, fmt.Errorf("%s does not support block volume provisioning", a.plugin.GetPluginName()) } - var sku, resourceGroup, location, account, shareName string + var sku, resourceGroup, location, account, shareName, customTags string capacity := a.options.PVC.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)] - requestGiB := int(volumehelpers.RoundUpToGiB(capacity)) + requestGiB, err := volumehelpers.RoundUpToGiBInt(capacity) + if err != nil { + return nil, err + } + secretNamespace := a.options.PVC.Namespace // Apply ProvisionerParameters (case-insensitive). We leave validation of // the values to the cloud provider. @@ -165,6 +181,8 @@ func (a *azureFileProvisioner) Provision(selectedNode *v1.Node, allowedTopologie resourceGroup = v case "sharename": shareName = v + case "tags": + customTags = v default: return nil, fmt.Errorf("invalid option %q for volume plugin %s", k, a.plugin.GetPluginName()) } @@ -174,18 +192,43 @@ func (a *azureFileProvisioner) Provision(selectedNode *v1.Node, allowedTopologie return nil, fmt.Errorf("claim.Spec.Selector is not supported for dynamic provisioning on Azure file") } + tags, err := azure.ConvertTagsToMap(customTags) + if err != nil { + return nil, err + } + if shareName == "" { // File share name has a length limit of 63, and it cannot contain two consecutive '-'s. name := util.GenerateVolumeName(a.options.ClusterName, a.options.PVName, 63) shareName = strings.Replace(name, "--", "-", -1) } + if resourceGroup == "" { + resourceGroup = a.options.PVC.ObjectMeta.Annotations[resourceGroupAnnotation] + } + // when use azure file premium, account kind should be specified as FileStorage accountKind := string(storage.StorageV2) if strings.HasPrefix(strings.ToLower(sku), "premium") { accountKind = string(storage.FileStorage) } - account, key, err := a.azureProvider.CreateFileShare(shareName, account, sku, accountKind, resourceGroup, location, requestGiB) + + accountOptions := &azure.AccountOptions{ + Name: account, + Type: sku, + Kind: accountKind, + ResourceGroup: resourceGroup, + Location: location, + Tags: tags, + } + + shareOptions := &fileclient.ShareOptions{ + Name: shareName, + Protocol: storage.SMB, + RequestGiB: requestGiB, + } + + account, key, err := a.azureProvider.CreateFileShare(accountOptions, shareOptions) if err != nil { return nil, err } @@ -202,6 +245,7 @@ func (a *azureFileProvisioner) Provision(selectedNode *v1.Node, allowedTopologie Labels: map[string]string{}, Annotations: map[string]string{ util.VolumeDynamicallyCreatedByKey: "azure-file-dynamic-provisioner", + resourceGroupAnnotation: resourceGroup, }, }, Spec: v1.PersistentVolumeSpec{ @@ -224,11 +268,11 @@ func (a *azureFileProvisioner) Provision(selectedNode *v1.Node, allowedTopologie } // Return cloud provider -func getAzureCloudProvider(cloudProvider cloudprovider.Interface) (azureCloudProvider, error) { +func getAzureCloudProvider(cloudProvider cloudprovider.Interface) (azureCloudProvider, string, error) { azureCloudProvider, ok := cloudProvider.(*azure.Cloud) if !ok || azureCloudProvider == nil { - return nil, fmt.Errorf("Failed to get Azure Cloud Provider. GetCloudProvider returned %v instead", cloudProvider) + return nil, "", fmt.Errorf("Failed to get Azure Cloud Provider. GetCloudProvider returned %v instead", cloudProvider) } - return azureCloudProvider, nil + return azureCloudProvider, azureCloudProvider.ResourceGroup, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cinder/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/cinder/BUILD index 3f7cea52c4a..da954ec8f2d 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cinder/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/cinder/BUILD @@ -30,7 +30,7 @@ go_library( "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/openstack:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/keymutex:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", @@ -57,7 +57,7 @@ go_test( "//staging/src/k8s.io/client-go/util/testing:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/openstack:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cinder/attacher.go b/vendor/k8s.io/kubernetes/pkg/volume/cinder/attacher.go index ebf84d31d0f..fa84629ca41 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cinder/attacher.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/cinder/attacher.go @@ -29,7 +29,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" "k8s.io/kubernetes/pkg/volume" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go index 28c5e85d2d0..b2b82ad3a71 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go @@ -25,7 +25,7 @@ import ( "path" "path/filepath" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/keymutex" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" @@ -570,6 +570,10 @@ func (c *cinderVolumeProvisioner) Provision(selectedNode *v1.Node, allowedTopolo return nil, err } + if fstype == "" { + fstype = "ext4" + } + volumeMode := c.options.PVC.Spec.VolumeMode if volumeMode != nil && *volumeMode == v1.PersistentVolumeBlock { // Block volumes should not have any FSType diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_block.go b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_block.go index 5c4273b95b0..f17eb6177bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_block.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_block.go @@ -22,7 +22,7 @@ import ( "fmt" "path/filepath" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_util.go b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_util.go index a129746a9f7..8d82c06ff33 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_util.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_util.go @@ -28,7 +28,7 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/configmap/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/configmap/BUILD index ab7d2571142..a94eaff96e8 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/configmap/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/configmap/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go b/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go index 0e74dd0a1d8..35613125c2b 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go @@ -19,7 +19,7 @@ package configmap import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csi/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/csi/BUILD index aba96023f37..eb5c727f7a7 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/csi/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/csi/BUILD @@ -40,7 +40,7 @@ go_library( "//vendor/google.golang.org/grpc:go_default_library", "//vendor/google.golang.org/grpc/codes:go_default_library", "//vendor/google.golang.org/grpc/status:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", ], @@ -90,7 +90,7 @@ go_test( "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/google.golang.org/grpc/codes:go_default_library", "//vendor/google.golang.org/grpc/status:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_attacher.go b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_attacher.go index 6211a9abfb9..e429dc9a645 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_attacher.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_attacher.go @@ -26,7 +26,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_block.go b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_block.go index 2d8d31fd897..e5ca3efec40 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_block.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_block.go @@ -77,7 +77,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/util/removeall" "k8s.io/kubernetes/pkg/volume" volumetypes "k8s.io/kubernetes/pkg/volume/util/types" @@ -94,7 +94,6 @@ type csiBlockMapper struct { readOnly bool spec *volume.Spec podUID types.UID - volumeInfo map[string]string } var _ volume.BlockVolumeMapper = &csiBlockMapper{} @@ -108,9 +107,9 @@ func (m *csiBlockMapper) GetGlobalMapPath(spec *volume.Spec) (string, error) { return dir, nil } -// getStagingPath returns a staging path for a directory (on the node) that should be used on NodeStageVolume/NodeUnstageVolume +// GetStagingPath returns a staging path for a directory (on the node) that should be used on NodeStageVolume/NodeUnstageVolume // Example: plugins/kubernetes.io/csi/volumeDevices/staging/{specName} -func (m *csiBlockMapper) getStagingPath() string { +func (m *csiBlockMapper) GetStagingPath() string { return filepath.Join(m.plugin.host.GetVolumeDevicePluginDir(CSIPluginName), "staging", m.specName) } @@ -144,7 +143,7 @@ func (m *csiBlockMapper) stageVolumeForBlock( ) (string, error) { klog.V(4).Infof(log("blockMapper.stageVolumeForBlock called")) - stagingPath := m.getStagingPath() + stagingPath := m.GetStagingPath() klog.V(4).Infof(log("blockMapper.stageVolumeForBlock stagingPath set [%s]", stagingPath)) // Check whether "STAGE_UNSTAGE_VOLUME" is set @@ -238,7 +237,7 @@ func (m *csiBlockMapper) publishVolumeForBlock( ctx, m.volumeID, m.readOnly, - m.getStagingPath(), + m.GetStagingPath(), publishPath, accessMode, publishVolumeInfo, @@ -256,26 +255,26 @@ func (m *csiBlockMapper) publishVolumeForBlock( } // SetUpDevice ensures the device is attached returns path where the device is located. -func (m *csiBlockMapper) SetUpDevice() error { +func (m *csiBlockMapper) SetUpDevice() (string, error) { if !m.plugin.blockEnabled { - return errors.New("CSIBlockVolume feature not enabled") + return "", errors.New("CSIBlockVolume feature not enabled") } klog.V(4).Infof(log("blockMapper.SetUpDevice called")) // Get csiSource from spec if m.spec == nil { - return errors.New(log("blockMapper.SetUpDevice spec is nil")) + return "", errors.New(log("blockMapper.SetUpDevice spec is nil")) } csiSource, err := getCSISourceFromSpec(m.spec) if err != nil { - return errors.New(log("blockMapper.SetUpDevice failed to get CSI persistent source: %v", err)) + return "", errors.New(log("blockMapper.SetUpDevice failed to get CSI persistent source: %v", err)) } driverName := csiSource.Driver skip, err := m.plugin.skipAttach(driverName) if err != nil { - return errors.New(log("blockMapper.SetupDevice failed to check CSIDriver for %s: %v", driverName, err)) + return "", errors.New(log("blockMapper.SetupDevice failed to check CSIDriver for %s: %v", driverName, err)) } var attachment *storage.VolumeAttachment @@ -285,7 +284,7 @@ func (m *csiBlockMapper) SetUpDevice() error { attachID := getAttachmentName(csiSource.VolumeHandle, csiSource.Driver, nodeName) attachment, err = m.k8s.StorageV1().VolumeAttachments().Get(context.TODO(), attachID, meta.GetOptions{}) if err != nil { - return errors.New(log("blockMapper.SetupDevice failed to get volume attachment [id=%v]: %v", attachID, err)) + return "", errors.New(log("blockMapper.SetupDevice failed to get volume attachment [id=%v]: %v", attachID, err)) } } @@ -300,11 +299,11 @@ func (m *csiBlockMapper) SetUpDevice() error { csiClient, err := m.csiClientGetter.Get() if err != nil { - return errors.New(log("blockMapper.SetUpDevice failed to get CSI client: %v", err)) + return "", errors.New(log("blockMapper.SetUpDevice failed to get CSI client: %v", err)) } // Call NodeStageVolume - _, err = m.stageVolumeForBlock(ctx, csiClient, accessMode, csiSource, attachment) + stagingPath, err := m.stageVolumeForBlock(ctx, csiClient, accessMode, csiSource, attachment) if err != nil { if volumetypes.IsOperationFinishedError(err) { cleanupErr := m.cleanupOrphanDeviceFiles() @@ -313,10 +312,10 @@ func (m *csiBlockMapper) SetUpDevice() error { klog.V(4).Infof("Failed to clean up block volume directory %s", cleanupErr) } } - return err + return "", err } - return nil + return stagingPath, nil } func (m *csiBlockMapper) MapPodDevice() (string, error) { @@ -436,7 +435,7 @@ func (m *csiBlockMapper) TearDownDevice(globalMapPath, devicePath string) error } // Call NodeUnstageVolume - stagingPath := m.getStagingPath() + stagingPath := m.GetStagingPath() if _, err := os.Stat(stagingPath); err != nil { if os.IsNotExist(err) { klog.V(4).Infof(log("blockMapper.TearDownDevice stagingPath(%s) has already been deleted, skip calling NodeUnstageVolume", stagingPath)) @@ -472,7 +471,7 @@ func (m *csiBlockMapper) cleanupOrphanDeviceFiles() error { // Remove artifacts of NodeStage. // stagingPath: xxx/plugins/kubernetes.io/csi/volumeDevices/staging/ - stagingPath := m.getStagingPath() + stagingPath := m.GetStagingPath() if err := os.Remove(stagingPath); err != nil && !os.IsNotExist(err) { return errors.New(log("failed to delete volume staging path [%s]: %v", stagingPath, err)) } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_client.go b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_client.go index c1d548c9f53..9c06736f790 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_client.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_client.go @@ -23,7 +23,6 @@ import ( "io" "net" "sync" - "time" csipbv1 "github.com/container-storage-interface/spec/lib/go/csi" "google.golang.org/grpc" @@ -31,7 +30,7 @@ import ( "google.golang.org/grpc/status" api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/volume" volumetypes "k8s.io/kubernetes/pkg/volume/util/types" ) @@ -55,7 +54,7 @@ type csiClient interface { fsType string, mountOptions []string, ) error - NodeExpandVolume(ctx context.Context, volumeid, volumePath string, newSize resource.Quantity) (resource.Quantity, error) + NodeExpandVolume(ctx context.Context, rsOpts csiResizeOptions) (resource.Quantity, error) NodeUnpublishVolume( ctx context.Context, volID string, @@ -96,6 +95,20 @@ type csiDriverClient struct { nodeV1ClientCreator nodeV1ClientCreator } +type csiResizeOptions struct { + volumeID string + // volumePath is path where volume is available. It could be: + // - path where node is staged if NodeExpandVolume is called after NodeStageVolume + // - path where volume is published if NodeExpandVolume is called after NodePublishVolume + // DEPRECATION NOTICE: in future NodeExpandVolume will be always called after NodePublish + volumePath string + stagingTargetPath string + fsType string + accessMode api.PersistentVolumeAccessMode + newSize resource.Quantity + mountOptions []string +} + var _ csiClient = &csiDriverClient{} type nodeV1ClientCreator func(addr csiAddr) ( @@ -104,12 +117,6 @@ type nodeV1ClientCreator func(addr csiAddr) ( err error, ) -const ( - initialDuration = 1 * time.Second - factor = 2.0 - steps = 5 -) - // newV1NodeClient creates a new NodeClient with the internally used gRPC // connection set up. It also returns a closer which must to be called to close // the gRPC connection when the NodeClient is not used anymore. @@ -252,36 +259,61 @@ func (c *csiDriverClient) NodePublishVolume( return err } -func (c *csiDriverClient) NodeExpandVolume(ctx context.Context, volumeID, volumePath string, newSize resource.Quantity) (resource.Quantity, error) { +func (c *csiDriverClient) NodeExpandVolume(ctx context.Context, opts csiResizeOptions) (resource.Quantity, error) { if c.nodeV1ClientCreator == nil { - return newSize, fmt.Errorf("version of CSI driver does not support volume expansion") + return opts.newSize, fmt.Errorf("version of CSI driver does not support volume expansion") } - if volumeID == "" { - return newSize, errors.New("missing volume id") + if opts.volumeID == "" { + return opts.newSize, errors.New("missing volume id") } - if volumePath == "" { - return newSize, errors.New("missing volume path") + if opts.volumePath == "" { + return opts.newSize, errors.New("missing volume path") } - if newSize.Value() < 0 { - return newSize, errors.New("size can not be less than 0") + if opts.newSize.Value() < 0 { + return opts.newSize, errors.New("size can not be less than 0") } nodeClient, closer, err := c.nodeV1ClientCreator(c.addr) if err != nil { - return newSize, err + return opts.newSize, err } defer closer.Close() req := &csipbv1.NodeExpandVolumeRequest{ - VolumeId: volumeID, - VolumePath: volumePath, - CapacityRange: &csipbv1.CapacityRange{RequiredBytes: newSize.Value()}, + VolumeId: opts.volumeID, + VolumePath: opts.volumePath, + CapacityRange: &csipbv1.CapacityRange{RequiredBytes: opts.newSize.Value()}, + VolumeCapability: &csipbv1.VolumeCapability{ + AccessMode: &csipbv1.VolumeCapability_AccessMode{ + Mode: asCSIAccessModeV1(opts.accessMode), + }, + }, } + + // not all CSI drivers support NodeStageUnstage and hence the StagingTargetPath + // should only be set when available + if opts.stagingTargetPath != "" { + req.StagingTargetPath = opts.stagingTargetPath + } + + if opts.fsType == fsTypeBlockName { + req.VolumeCapability.AccessType = &csipbv1.VolumeCapability_Block{ + Block: &csipbv1.VolumeCapability_BlockVolume{}, + } + } else { + req.VolumeCapability.AccessType = &csipbv1.VolumeCapability_Mount{ + Mount: &csipbv1.VolumeCapability_MountVolume{ + FsType: opts.fsType, + MountFlags: opts.mountOptions, + }, + } + } + resp, err := nodeClient.NodeExpandVolume(ctx, req) if err != nil { - return newSize, err + return opts.newSize, err } updatedQuantity := resource.NewQuantity(resp.CapacityBytes, resource.BinarySI) return *updatedQuantity, nil diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_mounter.go b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_mounter.go index 87c5c3dc050..4195ab38759 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_mounter.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_mounter.go @@ -25,10 +25,9 @@ import ( "path/filepath" "strconv" - "k8s.io/klog" + "k8s.io/klog/v2" api "k8s.io/api/core/v1" - v1 "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" @@ -66,6 +65,7 @@ type csiMountMgr struct { plugin *csiPlugin driverName csiDriverName volumeLifecycleMode storage.VolumeLifecycleMode + fsGroupPolicy storage.FSGroupPolicy volumeID string specVolumeID string readOnly bool @@ -73,7 +73,6 @@ type csiMountMgr struct { spec *volume.Spec pod *api.Pod podUID types.UID - options volume.VolumeOptions publishContext map[string]string kubeVolHost volume.KubeletVolumeHost volume.MetricsProvider @@ -83,7 +82,7 @@ type csiMountMgr struct { var _ volume.Volume = &csiMountMgr{} func (c *csiMountMgr) GetPath() string { - dir := filepath.Join(getTargetPath(c.podUID, c.specVolumeID, c.plugin.host), "/mount") + dir := GetCSIMounterPath(filepath.Join(getTargetPath(c.podUID, c.specVolumeID, c.plugin.host))) klog.V(4).Info(log("mounter.GetPath generated [%s]", dir)) return dir } @@ -278,17 +277,16 @@ func (c *csiMountMgr) SetUpAt(dir string, mounterArgs volume.MounterArgs) error klog.V(2).Info(log("error checking for SELinux support: %s", err)) } - // apply volume ownership - // The following logic is derived from https://github.com/kubernetes/kubernetes/issues/66323 - // if fstype is "", then skip fsgroup (could be indication of non-block filesystem) - // if fstype is provided and pv.AccessMode == ReadWriteOnly, then apply fsgroup - err = c.applyFSGroup(fsType, mounterArgs.FsGroup, mounterArgs.FSGroupChangePolicy) - if err != nil { - // At this point mount operation is successful: - // 1. Since volume can not be used by the pod because of invalid permissions, we must return error - // 2. Since mount is successful, we must record volume as mounted in uncertain state, so it can be - // cleaned up. - return volumetypes.NewUncertainProgressError(fmt.Sprintf("applyFSGroup failed for vol %s: %v", c.volumeID, err)) + if c.supportsFSGroup(fsType, mounterArgs.FsGroup, c.fsGroupPolicy) { + err := volume.SetVolumeOwnership(c, mounterArgs.FsGroup, mounterArgs.FSGroupChangePolicy) + if err != nil { + // At this point mount operation is successful: + // 1. Since volume can not be used by the pod because of invalid permissions, we must return error + // 2. Since mount is successful, we must record volume as mounted in uncertain state, so it can be + // cleaned up. + return volumetypes.NewUncertainProgressError(fmt.Sprintf("applyFSGroup failed for vol %s: %v", c.volumeID, err)) + } + klog.V(4).Info(log("mounter.SetupAt fsGroup [%d] applied successfully to %s", *mounterArgs.FsGroup, c.volumeID)) } klog.V(4).Infof(log("mounter.SetUp successfully requested NodePublish [%s]", dir)) @@ -373,41 +371,30 @@ func (c *csiMountMgr) TearDownAt(dir string) error { return nil } -// applyFSGroup applies the volume ownership it derives its logic -// from https://github.com/kubernetes/kubernetes/issues/66323 -// 1) if fstype is "", then skip fsgroup (could be indication of non-block filesystem) -// 2) if fstype is provided and pv.AccessMode == ReadWriteOnly and !c.spec.ReadOnly then apply fsgroup -func (c *csiMountMgr) applyFSGroup(fsType string, fsGroup *int64, fsGroupChangePolicy *v1.PodFSGroupChangePolicy) error { - if fsGroup != nil { - if fsType == "" { - klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, fsType not provided")) - return nil - } - - accessModes := c.spec.PersistentVolume.Spec.AccessModes - if c.spec.PersistentVolume.Spec.AccessModes == nil { - klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, access modes not provided")) - return nil - } - if !hasReadWriteOnce(accessModes) { - klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, only support ReadWriteOnce access mode")) - return nil - } - - if c.readOnly { - klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, volume is readOnly")) - return nil - } - - err := volume.SetVolumeOwnership(c, fsGroup, fsGroupChangePolicy) - if err != nil { - return err - } - - klog.V(4).Info(log("mounter.SetupAt fsGroup [%d] applied successfully to %s", *fsGroup, c.volumeID)) +func (c *csiMountMgr) supportsFSGroup(fsType string, fsGroup *int64, driverPolicy storage.FSGroupPolicy) bool { + if fsGroup == nil || driverPolicy == storage.NoneFSGroupPolicy || c.readOnly { + return false } - return nil + if driverPolicy == storage.FileFSGroupPolicy { + return true + } + + if fsType == "" { + klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, fsType not provided")) + return false + } + + accessModes := c.spec.PersistentVolume.Spec.AccessModes + if c.spec.PersistentVolume.Spec.AccessModes == nil { + klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, access modes not provided")) + return false + } + if !hasReadWriteOnce(accessModes) { + klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, only support ReadWriteOnce access mode")) + return false + } + return true } // isDirMounted returns the !notMounted result from IsLikelyNotMountPoint check diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go index d23385798a6..c71caec7223 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go @@ -25,7 +25,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" api "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1" @@ -226,6 +226,9 @@ func (p *csiPlugin) Init(host volume.VolumeHost) error { csitranslationplugins.AzureFileInTreePluginName: func() bool { return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigration) && utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationAzureFile) }, + csitranslationplugins.VSphereInTreePluginName: func() bool { + return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigration) && utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationvSphere) + }, } // Initializing the label management channels @@ -381,6 +384,11 @@ func (p *csiPlugin) NewMounter( return nil, err } + fsGroupPolicy, err := p.getFSGroupPolicy(driverName) + if err != nil { + return nil, err + } + k8s := p.host.GetKubeClient() if k8s == nil { return nil, errors.New(log("failed to get a kubernetes client")) @@ -399,6 +407,7 @@ func (p *csiPlugin) NewMounter( podUID: pod.UID, driverName: csiDriverName(driverName), volumeLifecycleMode: volumeLifecycleMode, + fsGroupPolicy: fsGroupPolicy, volumeID: volumeHandle, specVolumeID: spec.Name(), readOnly: readOnly, @@ -847,6 +856,46 @@ func (p *csiPlugin) getVolumeLifecycleMode(spec *volume.Spec) (storage.VolumeLif return storage.VolumeLifecyclePersistent, nil } +// getFSGroupPolicy returns if the CSI driver supports a volume in the given mode. +// An error indicates that it isn't supported and explains why. +func (p *csiPlugin) getFSGroupPolicy(driver string) (storage.FSGroupPolicy, error) { + if !utilfeature.DefaultFeatureGate.Enabled(features.CSIVolumeFSGroupPolicy) { + // feature is disabled, default to ReadWriteOnceWithFSTypeFSGroupPolicy + return storage.ReadWriteOnceWithFSTypeFSGroupPolicy, nil + } + + // Retrieve CSIDriver. It's not an error if that isn't + // possible (we don't have the lister if CSIDriverRegistry is + // disabled) or the driver isn't found (CSIDriver is + // optional) + var csiDriver *storage.CSIDriver + if p.csiDriverLister != nil { + kletHost, ok := p.host.(volume.KubeletVolumeHost) + if ok { + if err := kletHost.WaitForCacheSync(); err != nil { + return storage.ReadWriteOnceWithFSTypeFSGroupPolicy, err + } + } + + c, err := p.csiDriverLister.Get(driver) + if err != nil && !apierrors.IsNotFound(err) { + // Some internal error. + return storage.ReadWriteOnceWithFSTypeFSGroupPolicy, err + } + csiDriver = c + } + + // If the csiDriver isn't defined, return the default behavior + if csiDriver == nil { + return storage.ReadWriteOnceWithFSTypeFSGroupPolicy, nil + } + // If the csiDriver exists but the fsGroupPolicy isn't defined, return an error + if csiDriver.Spec.FSGroupPolicy == nil || *csiDriver.Spec.FSGroupPolicy == "" { + return storage.ReadWriteOnceWithFSTypeFSGroupPolicy, errors.New(log("expected valid fsGroupPolicy, received nil value or empty string")) + } + return *csiDriver.Spec.FSGroupPolicy, nil +} + func (p *csiPlugin) getPublishContext(client clientset.Interface, handle, driver, nodeName string) (map[string]string, error) { skip, err := p.skipAttach(driver) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_util.go b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_util.go index 96b3c497f0e..e15addfd1e9 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_util.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_util.go @@ -29,7 +29,7 @@ import ( meta "k8s.io/apimachinery/pkg/apis/meta/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/kubernetes" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" utilstrings "k8s.io/utils/strings" @@ -171,3 +171,8 @@ func getPVSourceFromSpec(spec *volume.Spec) (*api.CSIPersistentVolumeSource, err } return pvSrc, nil } + +// GetCSIMounterPath returns the mounter path given the base path. +func GetCSIMounterPath(path string) string { + return filepath.Join(path, "/mount") +} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csi/expander.go b/vendor/k8s.io/kubernetes/pkg/volume/csi/expander.go index 8c1ca274d5f..bfa6d714716 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/csi/expander.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/csi/expander.go @@ -21,12 +21,15 @@ import ( "errors" "fmt" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" api "k8s.io/api/core/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" + volumetypes "k8s.io/kubernetes/pkg/volume/util/types" ) var _ volume.NodeExpandableVolumePlugin = &csiPlugin{} @@ -94,14 +97,55 @@ func (c *csiPlugin) nodeExpandWithClient( return false, nil } - volumeTargetPath := resizeOptions.DeviceMountPath - if !fsVolume { - volumeTargetPath = resizeOptions.DevicePath + pv := resizeOptions.VolumeSpec.PersistentVolume + if pv == nil { + return false, fmt.Errorf("Expander.NodeExpand failed to find associated PersistentVolume for plugin %s", c.GetPluginName()) } - _, err = csClient.NodeExpandVolume(ctx, csiSource.VolumeHandle, volumeTargetPath, resizeOptions.NewSize) + opts := csiResizeOptions{ + volumePath: resizeOptions.DeviceMountPath, + stagingTargetPath: resizeOptions.DeviceStagePath, + volumeID: csiSource.VolumeHandle, + newSize: resizeOptions.NewSize, + fsType: csiSource.FSType, + accessMode: api.ReadWriteOnce, + mountOptions: pv.Spec.MountOptions, + } + + if !fsVolume { + // for block volumes the volumePath in CSI NodeExpandvolumeRequest is + // basically same as DevicePath because block devices are not mounted and hence + // DeviceMountPath does not get populated in resizeOptions.DeviceMountPath + opts.volumePath = resizeOptions.DevicePath + opts.fsType = fsTypeBlockName + } + + if pv.Spec.AccessModes != nil { + opts.accessMode = pv.Spec.AccessModes[0] + } + + _, err = csClient.NodeExpandVolume(ctx, opts) if err != nil { - return false, fmt.Errorf("Expander.NodeExpand failed to expand the volume : %v", err) + if inUseError(err) { + failedConditionErr := fmt.Errorf("Expander.NodeExpand failed to expand the volume : %w", volumetypes.NewFailedPreconditionError(err.Error())) + return false, failedConditionErr + } + return false, fmt.Errorf("Expander.NodeExpand failed to expand the volume : %w", err) } return true, nil } + +func inUseError(err error) bool { + st, ok := status.FromError(err) + if !ok { + // not a grpc error + return false + } + // if this is a failed precondition error then that means driver does not support expansion + // of in-use volumes + // More info - https://github.com/container-storage-interface/spec/blob/master/spec.md#controllerexpandvolume-errors + if st.Code() == codes.FailedPrecondition { + return true + } + return false +} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/BUILD index 198fd220827..f74ced56a9e 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/nodeinfomanager.go b/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/nodeinfomanager.go index 76b4cc0da1f..25aea9f48dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/nodeinfomanager.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/nodeinfomanager.go @@ -38,7 +38,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" utilfeature "k8s.io/apiserver/pkg/util/feature" clientset "k8s.io/client-go/kubernetes" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" nodeutil "k8s.io/kubernetes/pkg/util/node" "k8s.io/kubernetes/pkg/volume" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/csimigration/plugin_manager.go b/vendor/k8s.io/kubernetes/pkg/volume/csimigration/plugin_manager.go index cab93506823..1d635166aed 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/csimigration/plugin_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/csimigration/plugin_manager.go @@ -68,6 +68,8 @@ func (pm PluginManager) IsMigrationCompleteForPlugin(pluginName string) bool { return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationAzureDiskComplete) case csilibplugins.CinderInTreePluginName: return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationOpenStackComplete) + case csilibplugins.VSphereInTreePluginName: + return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationvSphereComplete) default: return false } @@ -92,6 +94,8 @@ func (pm PluginManager) IsMigrationEnabledForPlugin(pluginName string) bool { return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationAzureDisk) case csilibplugins.CinderInTreePluginName: return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationOpenStack) + case csilibplugins.VSphereInTreePluginName: + return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationvSphere) default: return false } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/BUILD index cece3c521e2..f2c87f1365b 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/BUILD @@ -18,7 +18,7 @@ go_library( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi.go b/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi.go index a1779c0dac9..9fd3e26b3e2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi.go @@ -23,7 +23,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/api/v1/resource" "k8s.io/kubernetes/pkg/fieldpath" "k8s.io/kubernetes/pkg/volume" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/emptydir/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/emptydir/BUILD index b220a50107e..004445d24a1 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/emptydir/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/emptydir/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", ] + select({ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir.go b/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir.go index 0a25d2b684c..07384cc9e05 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir.go @@ -21,7 +21,7 @@ import ( "os" "path/filepath" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir_linux.go b/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir_linux.go index 63a25dc4ed0..dfcbc97a9b9 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir_linux.go @@ -24,7 +24,7 @@ import ( "golang.org/x/sys/unix" "k8s.io/apimachinery/pkg/api/resource" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" "k8s.io/api/core/v1" @@ -69,7 +69,11 @@ func getPageSize(path string, mounter mount.Interface) (*resource.Quantity, erro // NOTE: Adding suffix 'i' as result should be comparable with a medium size. // pagesize mount option is specified without a suffix, // e.g. pagesize=2M or pagesize=1024M for x86 CPUs - pageSize, err := resource.ParseQuantity(strings.TrimPrefix(opt, prefix) + "i") + trimmedOpt := strings.TrimPrefix(opt, prefix) + if !strings.HasSuffix(trimmedOpt, "i") { + trimmedOpt = trimmedOpt + "i" + } + pageSize, err := resource.ParseQuantity(trimmedOpt) if err != nil { return nil, fmt.Errorf("error getting page size from '%s' mount option: %v", opt, err) } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/BUILD index 9cb8aceaa93..eec4318788f 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/BUILD @@ -37,7 +37,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//vendor/github.com/fsnotify/fsnotify:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/attacher-defaults.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/attacher-defaults.go index 876ddc00b91..25146cb1b81 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/attacher-defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/attacher-defaults.go @@ -19,7 +19,7 @@ package flexvolume import ( "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/attacher.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/attacher.go index 3b98eefa079..51587f3e0d4 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/attacher.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/attacher.go @@ -21,7 +21,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/volume" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/detacher-defaults.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/detacher-defaults.go index 323164300b7..e38dd820f10 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/detacher-defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/detacher-defaults.go @@ -19,7 +19,7 @@ package flexvolume import ( "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/detacher.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/detacher.go index 6fe368b2437..a18f7be57e0 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/detacher.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/detacher.go @@ -20,7 +20,7 @@ import ( "fmt" "os" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/driver-call.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/driver-call.go index 189a40f1d62..55617e7c3fc 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/driver-call.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/driver-call.go @@ -22,7 +22,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/volume" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/expander-defaults.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/expander-defaults.go index 1699a0844ca..978877d6667 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/expander-defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/expander-defaults.go @@ -20,7 +20,7 @@ import ( "fmt" "k8s.io/apimachinery/pkg/api/resource" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter-defaults.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter-defaults.go index d535fac6a7a..0449330af33 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter-defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter-defaults.go @@ -17,7 +17,7 @@ limitations under the License. package flexvolume import ( - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/volume" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/plugin-defaults.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/plugin-defaults.go index 97871eb2340..d72089de973 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/plugin-defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/plugin-defaults.go @@ -17,7 +17,7 @@ limitations under the License. package flexvolume import ( - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/volume" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/plugin.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/plugin.go index 6ca9ba7dc55..73f6e2c7153 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/plugin.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/plugin.go @@ -25,7 +25,7 @@ import ( api "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" "k8s.io/utils/exec" @@ -34,8 +34,7 @@ import ( ) const ( - flexVolumePluginName = "kubernetes.io/flexvolume" - flexVolumePluginNamePrefix = "flexvolume-" + flexVolumePluginName = "kubernetes.io/flexvolume" ) // FlexVolumePlugin object. @@ -114,7 +113,7 @@ func (plugin *flexVolumePlugin) getExecutable() string { // Name is part of the volume.VolumePlugin interface. func (plugin *flexVolumePlugin) GetPluginName() string { - return flexVolumePluginNamePrefix + plugin.driverName + return plugin.driverName } // GetVolumeName is part of the volume.VolumePlugin interface. diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/probe.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/probe.go index dc01825aae6..965c97fba7b 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/probe.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/probe.go @@ -25,7 +25,7 @@ import ( "github.com/fsnotify/fsnotify" "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/klog" + "k8s.io/klog/v2" utilfs "k8s.io/kubernetes/pkg/util/filesystem" "k8s.io/kubernetes/pkg/volume" "k8s.io/utils/exec" @@ -140,7 +140,7 @@ func (prober *flexVolumeProber) newProbeEvent(driverDirName string, op volume.Pr probeEvent.PluginName = plugin.GetPluginName() } else if op == volume.ProbeRemove { driverName := utilstrings.UnescapeQualifiedName(driverDirName) - probeEvent.PluginName = flexVolumePluginNamePrefix + driverName + probeEvent.PluginName = driverName } else { return probeEvent, fmt.Errorf("Unknown Operation on directory: %s. ", driverDirName) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter-defaults.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter-defaults.go index 8eca3ad9748..b449617dff8 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter-defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter-defaults.go @@ -17,7 +17,7 @@ limitations under the License. package flexvolume import ( - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter.go index 7970cb77a2c..8dcdf9d351b 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/unmounter.go @@ -20,7 +20,7 @@ import ( "fmt" "os" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/exec" "k8s.io/utils/mount" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/util.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/util.go index c38b858e6f9..4be464e43e3 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/util.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/util.go @@ -21,7 +21,7 @@ import ( "fmt" "os" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" "k8s.io/kubernetes/pkg/volume" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/gcepd/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/gcepd/BUILD index beb5e00862a..b2acce05a39 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/gcepd/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/gcepd/BUILD @@ -29,7 +29,7 @@ go_library( "//staging/src/k8s.io/cloud-provider/volume:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/gce:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/path:go_default_library", @@ -60,7 +60,7 @@ go_test( "//staging/src/k8s.io/cloud-provider/volume:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/gce:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/gcepd/attacher.go b/vendor/k8s.io/kubernetes/pkg/volume/gcepd/attacher.go index 43c03564c59..312ff4bffd5 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/gcepd/attacher.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/gcepd/attacher.go @@ -29,7 +29,7 @@ import ( "strconv" "time" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" "k8s.io/utils/mount" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd.go b/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd.go index 17e82836c01..d43167a5922 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd.go @@ -26,7 +26,7 @@ import ( "runtime" "strconv" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd_block.go b/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd_block.go index 1f5be234734..ebab380608c 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd_block.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd_block.go @@ -23,7 +23,7 @@ import ( "path/filepath" "strconv" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_util.go b/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_util.go index ce18270a1b1..7f81eabfda3 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_util.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_util.go @@ -25,7 +25,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/exec" "k8s.io/utils/mount" utilpath "k8s.io/utils/path" @@ -101,7 +101,10 @@ func (util *GCEDiskUtil) CreateVolume(c *gcePersistentDiskProvisioner, node *v1. name := volumeutil.GenerateVolumeName(c.options.ClusterName, c.options.PVName, 63) // GCE PD name can have up to 63 characters capacity := c.options.PVC.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)] // GCE PDs are allocated in chunks of GiBs - requestGB := volumehelpers.RoundUpToGiB(capacity) + requestGB, err := volumehelpers.RoundUpToGiB(capacity) + if err != nil { + return "", 0, nil, "", err + } // Apply Parameters. // Values for parameter "replication-type" are canonicalized to lower case. @@ -159,7 +162,7 @@ func (util *GCEDiskUtil) CreateVolume(c *gcePersistentDiskProvisioner, node *v1. name, diskType, selectedZones, - int64(requestGB), + requestGB, *c.options.CloudTags) if err != nil { klog.V(2).Infof("Error creating regional GCE PD volume: %v", err) @@ -176,7 +179,7 @@ func (util *GCEDiskUtil) CreateVolume(c *gcePersistentDiskProvisioner, node *v1. name, diskType, selectedZone, - int64(requestGB), + requestGB, *c.options.CloudTags) if err != nil { klog.V(2).Infof("Error creating single-zone GCE PD volume: %v", err) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/hostpath/host_path.go b/vendor/k8s.io/kubernetes/pkg/volume/hostpath/host_path.go index 40dfcaabe7a..3fa56d5c8c2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/hostpath/host_path.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/hostpath/host_path.go @@ -370,7 +370,11 @@ func (ftc *fileTypeChecker) IsFile() bool { if !ftc.Exists() { return false } - return !ftc.IsDir() + pathType, err := ftc.hu.GetFileType(ftc.path) + if err != nil { + return false + } + return string(pathType) == string(v1.HostPathFile) } func (ftc *fileTypeChecker) MakeFile() error { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/BUILD index 846edeb3975..8eeb58e0351 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/BUILD @@ -20,11 +20,12 @@ go_library( "//pkg/kubelet/config:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", + "//pkg/volume/util/types:go_default_library", "//pkg/volume/util/volumepathhandler:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/keymutex:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/attacher.go b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/attacher.go index 959e0ab8ec5..50888f262fe 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/attacher.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/attacher.go @@ -21,7 +21,7 @@ import ( "os" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/keymutex" "k8s.io/utils/mount" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/disk_manager.go b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/disk_manager.go index 928e8d85625..a06da76d100 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/disk_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/disk_manager.go @@ -20,7 +20,7 @@ import ( "os" v1 "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" "k8s.io/kubernetes/pkg/volume" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi.go b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi.go index 36bce8d189a..bec8b37be81 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi.go @@ -24,7 +24,7 @@ import ( "strconv" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" "k8s.io/utils/keymutex" "k8s.io/utils/mount" @@ -38,7 +38,7 @@ import ( "k8s.io/kubernetes/pkg/volume/util/volumepathhandler" ) -// This is the primary entrypoint for volume plugins. +// ProbeVolumePlugins is the primary entrypoint for volume plugins. func ProbeVolumePlugins() []volume.VolumePlugin { return []volume.VolumePlugin{&iscsiPlugin{}} } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_util.go b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_util.go index b46ecd9f235..405ebf296eb 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_util.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_util.go @@ -29,7 +29,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" "k8s.io/utils/mount" @@ -37,6 +37,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/config" "k8s.io/kubernetes/pkg/volume" volumeutil "k8s.io/kubernetes/pkg/volume/util" + "k8s.io/kubernetes/pkg/volume/util/types" ) const ( @@ -106,11 +107,18 @@ func updateISCSIDiscoverydb(b iscsiDiskMounter, tp string) error { } func updateISCSINode(b iscsiDiskMounter, tp string) error { + // setting node.session.scan to manual to handle https://github.com/kubernetes/kubernetes/issues/90982 + out, err := execWithLog(b, "iscsiadm", "-m", "node", "-p", tp, "-T", b.Iqn, "-I", b.Iface, "-o", "update", "-n", "node.session.scan", "-v", "manual") + if err != nil { + // don't fail if iscsiadm fails or the version does not support node.session.scan - log a warning to highlight the potential exposure + klog.Warningf("iscsi: failed to update node with node.session.scan=manual, possible exposure to issue 90982: %v", out) + } + if !b.chapSession { return nil } - out, err := execWithLog(b, "iscsiadm", "-m", "node", "-p", tp, "-T", b.Iqn, "-I", b.Iface, "-o", "update", "-n", "node.session.auth.authmethod", "-v", "CHAP") + out, err = execWithLog(b, "iscsiadm", "-m", "node", "-p", tp, "-T", b.Iqn, "-I", b.Iface, "-o", "update", "-n", "node.session.auth.authmethod", "-v", "CHAP") if err != nil { return fmt.Errorf("iscsi: failed to update node with CHAP, output: %v", out) } @@ -194,7 +202,9 @@ func (util *ISCSIUtil) MakeGlobalVDPDName(iscsi iscsiDisk) string { return makeVDPDNameInternal(iscsi.plugin.host, iscsi.Portals[0], iscsi.Iqn, iscsi.Lun, iscsi.Iface) } -func (util *ISCSIUtil) persistISCSI(conf iscsiDisk, mnt string) error { +// persistISCSIFile saves iSCSI volume configuration for DetachDisk +// into given directory. +func (util *ISCSIUtil) persistISCSIFile(conf iscsiDisk, mnt string) error { file := filepath.Join(mnt, "iscsi.json") fp, err := os.Create(file) if err != nil { @@ -457,61 +467,48 @@ func (util *ISCSIUtil) AttachDisk(b iscsiDiskMounter) (string, error) { } klog.V(5).Infof("iscsi: AttachDisk devicePath: %s", devicePath) - // run global mount path related operations based on volumeMode - return globalPDPathOperation(b)(b, devicePath, util) + + if err = util.persistISCSI(b); err != nil { + // Return uncertain error so kubelet calls Unmount / Unmap when the pod + // is deleted. + return "", types.NewUncertainProgressError(err.Error()) + } + return devicePath, nil } -// globalPDPathOperation returns global mount path related operations based on volumeMode. -// If the volumeMode is 'Filesystem' or not defined, plugin needs to create a dir, persist -// iscsi configurations, and then format/mount the volume. -// If the volumeMode is 'Block', plugin creates a dir and persists iscsi configurations. -// Since volume type is block, plugin doesn't need to format/mount the volume. -func globalPDPathOperation(b iscsiDiskMounter) func(iscsiDiskMounter, string, *ISCSIUtil) (string, error) { +// persistISCSI saves iSCSI volume configuration for DetachDisk into global +// mount / map directory. +func (util *ISCSIUtil) persistISCSI(b iscsiDiskMounter) error { klog.V(5).Infof("iscsi: AttachDisk volumeMode: %s", b.volumeMode) + var globalPDPath string if b.volumeMode == v1.PersistentVolumeBlock { - // If the volumeMode is 'Block', plugin don't need to format the volume. - return func(b iscsiDiskMounter, devicePath string, util *ISCSIUtil) (string, error) { - globalPDPath := b.manager.MakeGlobalVDPDName(*b.iscsiDisk) - // Create dir like /var/lib/kubelet/plugins/kubernetes.io/iscsi/volumeDevices/{ifaceName}/{portal-some_iqn-lun-lun_id} - if err := os.MkdirAll(globalPDPath, 0750); err != nil { - klog.Errorf("iscsi: failed to mkdir %s, error", globalPDPath) - return "", err - } - // Persist iscsi disk config to json file for DetachDisk path - util.persistISCSI(*(b.iscsiDisk), globalPDPath) - - return devicePath, nil - } + globalPDPath = b.manager.MakeGlobalVDPDName(*b.iscsiDisk) + } else { + globalPDPath = b.manager.MakeGlobalPDName(*b.iscsiDisk) } - // If the volumeMode is 'Filesystem', plugin needs to format the volume - // and mount it to globalPDPath. - return func(b iscsiDiskMounter, devicePath string, util *ISCSIUtil) (string, error) { - globalPDPath := b.manager.MakeGlobalPDName(*b.iscsiDisk) + if err := os.MkdirAll(globalPDPath, 0750); err != nil { + klog.Errorf("iscsi: failed to mkdir %s, error", globalPDPath) + return err + } + + if b.volumeMode == v1.PersistentVolumeFilesystem { notMnt, err := b.mounter.IsLikelyNotMountPoint(globalPDPath) - if err != nil && !os.IsNotExist(err) { - return "", fmt.Errorf("Heuristic determination of mount point failed:%v", err) - } - // Return confirmed devicePath to caller - if !notMnt { - klog.Infof("iscsi: %s already mounted", globalPDPath) - return devicePath, nil - } - // Create dir like /var/lib/kubelet/plugins/kubernetes.io/iscsi/{ifaceName}/{portal-some_iqn-lun-lun_id} - if err := os.MkdirAll(globalPDPath, 0750); err != nil { - klog.Errorf("iscsi: failed to mkdir %s, error", globalPDPath) - return "", err - } - // Persist iscsi disk config to json file for DetachDisk path - util.persistISCSI(*(b.iscsiDisk), globalPDPath) - - err = b.mounter.FormatAndMount(devicePath, globalPDPath, b.fsType, nil) if err != nil { - klog.Errorf("iscsi: failed to mount iscsi volume %s [%s] to %s, error %v", devicePath, b.fsType, globalPDPath, err) + return err + } + if !notMnt { + // The volume is already mounted, therefore the previous WaitForAttach must have + // persisted the volume metadata. In addition, the metadata is actually *inside* + // globalPDPath and we can't write it here, because it was shadowed by the volume + // mount. + klog.V(4).Infof("Skipping persistISCSI, the volume is already mounted at %s", globalPDPath) + return nil } - - return devicePath, nil } + + // Persist iscsi disk config to json file for DetachDisk path + return util.persistISCSIFile(*(b.iscsiDisk), globalPDPath) } // Delete 1 block device of the form "sd*" @@ -974,7 +971,7 @@ func ignoreExitCodes(err error, ignoredExitCodes ...int) error { func execWithLog(b iscsiDiskMounter, cmd string, args ...string) (string, error) { start := time.Now() out, err := b.exec.Command(cmd, args...).CombinedOutput() - if klog.V(5) { + if klog.V(5).Enabled() { d := time.Since(start) klog.V(5).Infof("Executed %s %v in %v, err: %v", cmd, args, d, err) klog.V(5).Infof("Output: %s", string(out)) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/local/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/local/BUILD index 1fcbe6c957f..dbda937f912 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/local/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/local/BUILD @@ -18,7 +18,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/keymutex:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/volume/local/local.go b/vendor/k8s.io/kubernetes/pkg/volume/local/local.go index f5e27f3c9f9..8e4ae6f55ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/local/local.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/local/local.go @@ -23,7 +23,7 @@ import ( "runtime" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -360,8 +360,7 @@ func (dm *deviceMounter) MountDevice(spec *volume.Spec, devicePath string, devic switch fileType { case hostutil.FileTypeBlockDev: // local volume plugin does not implement AttachableVolumePlugin interface, so set devicePath to Path in PV spec directly - devicePath = spec.PersistentVolume.Spec.Local.Path - return dm.mountLocalBlockDevice(spec, devicePath, deviceMountPath) + return dm.mountLocalBlockDevice(spec, spec.PersistentVolume.Spec.Local.Path, deviceMountPath) case hostutil.FileTypeDirectory: // if the given local volume path is of already filesystem directory, return directly return nil @@ -611,8 +610,8 @@ var _ volume.BlockVolumeMapper = &localVolumeMapper{} var _ volume.CustomBlockVolumeMapper = &localVolumeMapper{} // SetUpDevice prepares the volume to the node by the plugin specific way. -func (m *localVolumeMapper) SetUpDevice() error { - return nil +func (m *localVolumeMapper) SetUpDevice() (string, error) { + return "", nil } // MapPodDevice provides physical device path for the local PV. @@ -622,6 +621,11 @@ func (m *localVolumeMapper) MapPodDevice() (string, error) { return globalPath, nil } +// GetStagingPath returns +func (m *localVolumeMapper) GetStagingPath() string { + return "" +} + // localVolumeUnmapper implements the BlockVolumeUnmapper interface for local volumes. type localVolumeUnmapper struct { *localVolume diff --git a/vendor/k8s.io/kubernetes/pkg/volume/nfs/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/nfs/BUILD index 624a7898a2e..ad77dc5836c 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/nfs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/nfs/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go b/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go index 41b2e1dd9bb..8aebd644e2a 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go @@ -21,7 +21,7 @@ import ( "os" "runtime" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/plugins.go b/vendor/k8s.io/kubernetes/pkg/volume/plugins.go index 8e2e5731cda..9feccd04286 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/plugins.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/plugins.go @@ -22,7 +22,7 @@ import ( "strings" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/exec" "k8s.io/utils/mount" @@ -115,6 +115,9 @@ type NodeResizeOptions struct { // it would be location where volume was mounted for the pod DeviceMountPath string + // DeviceStagingPath stores location where the volume is staged + DeviceStagePath string + NewSize resource.Quantity OldSize resource.Quantity @@ -706,7 +709,7 @@ func (pm *VolumePluginMgr) FindPluginByName(name string) (VolumePlugin, error) { } if len(matches) == 0 { - return nil, fmt.Errorf("no volume plugin matched") + return nil, fmt.Errorf("no volume plugin matched name: %s", name) } if len(matches) > 1 { matchedPluginNames := []string{} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/projected/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/projected/BUILD index d3685747bf5..99eb31bbf9d 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/projected/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/projected/BUILD @@ -22,11 +22,12 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/client-go/testing:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", ], ) @@ -48,7 +49,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/projected/projected.go b/vendor/k8s.io/kubernetes/pkg/volume/projected/projected.go index 0f65a97610c..21bd164aa2b 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/projected/projected.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/projected/projected.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/configmap" @@ -196,7 +196,7 @@ func (s *projectedVolumeMounter) SetUpAt(dir string, mounterArgs volume.MounterA return err } - data, err := s.collectData() + data, err := s.collectData(mounterArgs) if err != nil { klog.Errorf("Error preparing data for projected volume %v for pod %v/%v: %s", s.volName, s.pod.Namespace, s.pod.Name, err.Error()) return err @@ -248,7 +248,7 @@ func (s *projectedVolumeMounter) SetUpAt(dir string, mounterArgs volume.MounterA return nil } -func (s *projectedVolumeMounter) collectData() (map[string]volumeutil.FileProjection, error) { +func (s *projectedVolumeMounter) collectData(mounterArgs volume.MounterArgs) (map[string]volumeutil.FileProjection, error) { if s.source.DefaultMode == nil { return nil, fmt.Errorf("No defaultMode used, not even the default value for it") } @@ -328,6 +328,13 @@ func (s *projectedVolumeMounter) collectData() (map[string]volumeutil.FileProjec } tp := source.ServiceAccountToken + // When FsGroup is set, we depend on SetVolumeOwnership to + // change from 0600 to 0640. + mode := *s.source.DefaultMode + if mounterArgs.FsUser != nil || mounterArgs.FsGroup != nil { + mode = 0600 + } + var auds []string if len(tp.Audience) != 0 { auds = []string{tp.Audience} @@ -349,8 +356,9 @@ func (s *projectedVolumeMounter) collectData() (map[string]volumeutil.FileProjec continue } payload[tp.Path] = volumeutil.FileProjection{ - Data: []byte(tr.Status.Token), - Mode: 0600, + Data: []byte(tr.Status.Token), + Mode: mode, + FsUser: mounterArgs.FsUser, } } } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/secret/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/secret/BUILD index cb168c9532d..c4405c2a5e1 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/secret/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/secret/BUILD @@ -20,7 +20,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", ], diff --git a/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go b/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go index a195c59ddd8..98d067a6eb8 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go @@ -19,7 +19,7 @@ package secret import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/BUILD index 8f7f6d583a9..8cb989f7ae7 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/BUILD @@ -22,6 +22,7 @@ go_library( "//pkg/api/legacyscheme:go_default_library", "//pkg/api/v1/pod:go_default_library", "//pkg/apis/core/v1/helper:go_default_library", + "//pkg/securitycontext:go_default_library", "//pkg/util/resizefs:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/util/types:go_default_library", @@ -40,7 +41,7 @@ go_library( "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/component-base/metrics:go_default_library", "//staging/src/k8s.io/component-base/metrics/legacyregistry:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", @@ -71,6 +72,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", + "//vendor/k8s.io/utils/pointer:go_default_library", ] + select({ "@io_bazel_rules_go//go/platform:android": [ "//staging/src/k8s.io/client-go/util/testing:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer.go b/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer.go index ef1939e7c9e..c6fb49192e8 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer.go @@ -27,7 +27,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/sets" ) @@ -63,8 +63,9 @@ type AtomicWriter struct { // FileProjection contains file Data and access Mode type FileProjection struct { - Data []byte - Mode int32 + Data []byte + Mode int32 + FsUser *int64 } // NewAtomicWriter creates a new AtomicWriter configured to write to the given @@ -378,14 +379,12 @@ func (w *AtomicWriter) writePayloadToDir(payload map[string]FileProjection, dir fullPath := filepath.Join(dir, userVisiblePath) baseDir, _ := filepath.Split(fullPath) - err := os.MkdirAll(baseDir, os.ModePerm) - if err != nil { + if err := os.MkdirAll(baseDir, os.ModePerm); err != nil { klog.Errorf("%s: unable to create directory %s: %v", w.logContext, baseDir, err) return err } - err = ioutil.WriteFile(fullPath, content, mode) - if err != nil { + if err := ioutil.WriteFile(fullPath, content, mode); err != nil { klog.Errorf("%s: unable to write file %s with mode %v: %v", w.logContext, fullPath, mode, err) return err } @@ -393,9 +392,17 @@ func (w *AtomicWriter) writePayloadToDir(payload map[string]FileProjection, dir // open(2) to create the file, so the final mode used is "mode & // ~umask". But we want to make sure the specified mode is used // in the file no matter what the umask is. - err = os.Chmod(fullPath, mode) - if err != nil { - klog.Errorf("%s: unable to write file %s with mode %v: %v", w.logContext, fullPath, mode, err) + if err := os.Chmod(fullPath, mode); err != nil { + klog.Errorf("%s: unable to change file %s with mode %v: %v", w.logContext, fullPath, mode, err) + return err + } + + if fileProjection.FsUser == nil { + continue + } + if err := os.Chown(fullPath, int(*fileProjection.FsUser), -1); err != nil { + klog.Errorf("%s: unable to change file %s with owner %v: %v", w.logContext, fullPath, int(*fileProjection.FsUser), err) + return err } } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_linux.go b/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_linux.go index d63aeb4d7da..cba90ffd2fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_linux.go @@ -26,7 +26,7 @@ import ( "strconv" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" ) // FindMultipathDeviceForDevice given a device name like /dev/sdx, find the devicemapper parent diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/fs/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/fs/BUILD index 07da6389c2b..b51ee597b53 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/fs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/fs/BUILD @@ -10,6 +10,9 @@ go_library( importpath = "k8s.io/kubernetes/pkg/volume/util/fs", visibility = ["//visibility:public"], deps = select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ "//pkg/volume/util/fsquota:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", @@ -26,11 +29,17 @@ go_library( "@io_bazel_rules_go//go/platform:freebsd": [ "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//pkg/volume/util/fsquota:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//vendor/golang.org/x/sys/unix:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ "//pkg/volume/util/fsquota:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go b/vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go index 2796e93d19e..0050c5fe48c 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go @@ -30,7 +30,7 @@ import ( "k8s.io/kubernetes/pkg/volume/util/fsquota" ) -// FSInfo linux returns (available bytes, byte capacity, byte usage, total inodes, inodes free, inode usage, error) +// FsInfo linux returns (available bytes, byte capacity, byte usage, total inodes, inodes free, inode usage, error) // for the filesystem that path resides upon. func FsInfo(path string) (int64, int64, int64, int64, int64, int64, error) { statfs := &unix.Statfs_t{} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/BUILD index 523b56debbc..dddf0a26ef6 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/BUILD @@ -21,13 +21,13 @@ go_library( "//pkg/volume/util/fsquota/common:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ "//pkg/volume/util/fsquota/common:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "//conditions:default": [], }), diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/BUILD index 60d8b5bfc43..443359abc38 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/BUILD @@ -10,10 +10,10 @@ go_library( visibility = ["//visibility:public"], deps = select({ "@io_bazel_rules_go//go/platform:android": [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "//conditions:default": [], }), diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/quota_linux_common.go b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/quota_linux_common.go index f73e7c7b8b1..c7232e8de63 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/quota_linux_common.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/quota_linux_common.go @@ -33,11 +33,6 @@ const ( BadQuotaID QuotaID = 0 ) -const ( - acct = iota - enforcing = iota -) - // QuotaType -- type of quota to be applied type QuotaType int diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/quota_linux_common_impl.go b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/quota_linux_common_impl.go index 7f17b10baa4..f405ef350d2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/quota_linux_common_impl.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/common/quota_linux_common_impl.go @@ -30,7 +30,7 @@ import ( "sync" "syscall" - "k8s.io/klog" + "k8s.io/klog/v2" ) var quotaCmd string diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/project.go b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/project.go index 9f2b5460bca..42122436042 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/project.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/project.go @@ -165,7 +165,7 @@ func readProjectFiles(projects *os.File, projid *os.File) projectsList { func findAvailableQuota(path string, idMap map[common.QuotaID]bool) (common.QuotaID, error) { unusedQuotasSearched := 0 - for id := common.FirstQuota; id == id; id++ { + for id := common.FirstQuota; true; id++ { if _, ok := idMap[id]; !ok { isInUse, err := getApplier(path).QuotaIDIsInUse(id) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/quota_linux.go b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/quota_linux.go index 319ae0e0829..59470bfcb36 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/quota_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/fsquota/quota_linux.go @@ -25,7 +25,7 @@ import ( "path/filepath" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" "k8s.io/apimachinery/pkg/api/resource" @@ -303,6 +303,7 @@ func SupportsQuotas(m mount.Interface, path string) (bool, error) { // AssignQuota chooses the quota ID based on the pod UID and path. // If the pod UID is identical to another one known, it may (but presently // doesn't) choose the same quota ID as other volumes in the pod. +//lint:ignore SA4009 poduid is overwritten by design, see comment below func AssignQuota(m mount.Interface, path string, poduid types.UID, bytes *resource.Quantity) error { if bytes == nil { return fmt.Errorf("Attempting to assign null quota to %s", path) @@ -316,7 +317,7 @@ func AssignQuota(m mount.Interface, path string, poduid types.UID, bytes *resour // Current policy is to set individual quotas on each volumes. // If we decide later that we want to assign one quota for all // volumes in a pod, we can simply remove this line of code. - // If and when we decide permanently that we're going to adop + // If and when we decide permanently that we're going to adopt // one quota per volume, we can rip all of the pod code out. poduid = types.UID(uuid.NewUUID()) if pod, ok := dirPodMap[path]; ok && pod != poduid { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/BUILD index 71cb37e5913..1ac512b6164 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/BUILD @@ -16,16 +16,16 @@ go_library( ] + select({ "@io_bazel_rules_go//go/platform:android": [ "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/path:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/path:go_default_library", ], "@io_bazel_rules_go//go/platform:windows": [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/path:go_default_library", ], "//conditions:default": [], diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_linux.go b/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_linux.go index 8e7efc129fc..b4856a70027 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_linux.go @@ -27,7 +27,7 @@ import ( "syscall" "golang.org/x/sys/unix" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilpath "k8s.io/utils/path" ) @@ -158,6 +158,11 @@ func (hu *HostUtil) EvalHostSymlinks(pathname string) (string, error) { return filepath.EvalSymlinks(pathname) } +// FindMountInfo returns the mount info on the given path. +func (hu *HostUtil) FindMountInfo(path string) (mount.MountInfo, error) { + return findMountInfo(path, procMountInfoPath) +} + // isShared returns true, if given path is on a mount point that has shared // mount propagation. func isShared(mount string, mountInfoPath string) (bool, error) { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_windows.go b/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_windows.go index d8d05365f1d..79845aa938c 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_windows.go @@ -25,7 +25,7 @@ import ( "path/filepath" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilpath "k8s.io/utils/path" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/nested_volumes.go b/vendor/k8s.io/kubernetes/pkg/volume/util/nested_volumes.go index 5a728a8397a..51a53d79a18 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/nested_volumes.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/nested_volumes.go @@ -23,7 +23,7 @@ import ( "sort" "strings" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" podutil "k8s.io/kubernetes/pkg/api/v1/pod" ) @@ -73,7 +73,7 @@ func getNestedMountpoints(name, baseDir string, pod v1.Pod) ([]string, error) { } var retErr error - podutil.VisitContainers(&pod.Spec, func(c *v1.Container) bool { + podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), func(c *v1.Container, containerType podutil.ContainerType) bool { retErr = checkContainer(c) if retErr != nil { return false diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/BUILD index 5e287a0aba9..0c0c3ff3e2d 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/BUILD @@ -16,7 +16,7 @@ go_library( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/nestedpendingoperations.go b/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/nestedpendingoperations.go index a889a5b188f..4bd83d2f0e3 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/nestedpendingoperations.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/nestedpendingoperations.go @@ -31,7 +31,7 @@ import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" k8sRuntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff" volumetypes "k8s.io/kubernetes/pkg/volume/util/types" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/BUILD index f9bb907bbab..e880a055fa4 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/BUILD @@ -33,7 +33,7 @@ go_library( "//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/errors:go_default_library", "//staging/src/k8s.io/csi-translation-lib:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor.go b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor.go index 0a438c54a17..e4c287381d4 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor.go @@ -24,7 +24,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" v1 "k8s.io/api/core/v1" @@ -202,6 +202,10 @@ type ActualStateOfWorldMounterUpdater interface { // GetVolumeMountState returns mount state of the volume for the Pod GetVolumeMountState(volumName v1.UniqueVolumeName, podName volumetypes.UniquePodName) VolumeMountState + + // MarkForInUseExpansionError marks the volume to have in-use error during expansion. + // volume expansion must not be retried for this volume + MarkForInUseExpansionError(volumeName v1.UniqueVolumeName) } // ActualStateOfWorldAttacherUpdater defines a set of operations updating the diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go index 98a5572568d..52052e0748f 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go @@ -34,7 +34,7 @@ import ( "k8s.io/client-go/tools/record" volerr "k8s.io/cloud-provider/volume/errors" csitrans "k8s.io/csi-translation-lib" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" kevents "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/volume" @@ -603,12 +603,17 @@ func (og *operationGenerator) GenerateMountVolumeFunc( return volumeToMount.GenerateError("MountVolume.MarkDeviceAsMounted failed", markDeviceMountedErr) } + // If volume expansion is performed after MountDevice but before SetUp then + // deviceMountPath and deviceStagePath is going to be the same. + // Deprecation: Calling NodeExpandVolume after NodeStage/MountDevice will be deprecated + // in a future version of k8s. resizeOptions.DeviceMountPath = deviceMountPath + resizeOptions.DeviceStagePath = deviceMountPath resizeOptions.CSIVolumePhase = volume.CSIVolumeStaged // NodeExpandVolume will resize the file system if user has requested a resize of // underlying persistent volume and is allowed to do so. - resizeDone, resizeError = og.nodeExpandVolume(volumeToMount, resizeOptions) + resizeDone, resizeError = og.nodeExpandVolume(volumeToMount, actualStateOfWorld, resizeOptions) if resizeError != nil { klog.Errorf("MountVolume.NodeExpandVolume failed with %v", resizeError) @@ -627,6 +632,7 @@ func (og *operationGenerator) GenerateMountVolumeFunc( // Execute mount mountErr := volumeMounter.SetUp(volume.MounterArgs{ + FsUser: ioutil.FsUserFrom(volumeToMount.Pod), FsGroup: fsGroup, DesiredSize: volumeToMount.DesiredSizeLimit, FSGroupChangePolicy: fsGroupChangePolicy, @@ -663,7 +669,7 @@ func (og *operationGenerator) GenerateMountVolumeFunc( // - Volume does not support DeviceMounter interface. // - In case of CSI the volume does not have node stage_unstage capability. if !resizeDone { - _, resizeError = og.nodeExpandVolume(volumeToMount, resizeOptions) + _, resizeError = og.nodeExpandVolume(volumeToMount, actualStateOfWorld, resizeOptions) if resizeError != nil { klog.Errorf("MountVolume.NodeExpandVolume failed with %v", resizeError) return volumeToMount.GenerateError("MountVolume.Setup failed while expanding volume", resizeError) @@ -834,8 +840,15 @@ func (og *operationGenerator) GenerateUnmountDeviceFunc( deviceMountPath, err := volumeDeviceMounter.GetDeviceMountPath(deviceToDetach.VolumeSpec) if err != nil { - // On failure, return error. Caller will log and retry. - return deviceToDetach.GenerateError("GetDeviceMountPath failed", err) + // On failure other than "does not exist", return error. Caller will log and retry. + if !strings.Contains(err.Error(), "does not exist") { + return deviceToDetach.GenerateError("GetDeviceMountPath failed", err) + } + // If the mount path could not be found, don't fail the unmount, but instead log a warning and proceed, + // using the value from deviceToDetach.DeviceMountPath, so that the device can be marked as unmounted + deviceMountPath = deviceToDetach.DeviceMountPath + klog.Warningf(deviceToDetach.GenerateMsg(fmt.Sprintf( + "GetDeviceMountPath failed, but unmount operation will proceed using deviceMountPath=%s: %v", deviceMountPath, err), "")) } refs, err := deviceMountableVolumePlugin.GetDeviceMountRefs(deviceMountPath) @@ -938,6 +951,7 @@ func (og *operationGenerator) GenerateMapVolumeFunc( mapVolumeFunc := func() (simpleErr error, detailedErr error) { var devicePath string + var stagingPath string // Set up global map path under the given plugin directory using symbolic link globalMapPath, err := blockVolumeMapper.GetGlobalMapPath(volumeToMount.VolumeSpec) @@ -961,7 +975,8 @@ func (og *operationGenerator) GenerateMapVolumeFunc( } // Call SetUpDevice if blockVolumeMapper implements CustomBlockVolumeMapper if customBlockVolumeMapper, ok := blockVolumeMapper.(volume.CustomBlockVolumeMapper); ok { - mapErr := customBlockVolumeMapper.SetUpDevice() + var mapErr error + stagingPath, mapErr = customBlockVolumeMapper.SetUpDevice() if mapErr != nil { og.markDeviceErrorState(volumeToMount, devicePath, globalMapPath, mapErr, actualStateOfWorld) // On failure, return error. Caller will log and retry. @@ -1064,10 +1079,11 @@ func (og *operationGenerator) GenerateMapVolumeFunc( klog.V(verbosity).Infof(detailedMsg) resizeOptions := volume.NodeResizeOptions{ - DevicePath: devicePath, - CSIVolumePhase: volume.CSIVolumePublished, + DevicePath: devicePath, + DeviceStagePath: stagingPath, + CSIVolumePhase: volume.CSIVolumePublished, } - _, resizeError := og.nodeExpandVolume(volumeToMount, resizeOptions) + _, resizeError := og.nodeExpandVolume(volumeToMount, actualStateOfWorld, resizeOptions) if resizeError != nil { klog.Errorf("MapVolume.NodeExpandVolume failed with %v", resizeError) return volumeToMount.GenerateError("MapVolume.MarkVolumeAsMounted failed while expanding volume", resizeError) @@ -1482,40 +1498,64 @@ func (og *operationGenerator) GenerateExpandInUseVolumeFunc( var simpleErr, detailedErr error resizeOptions := volume.NodeResizeOptions{ VolumeSpec: volumeToMount.VolumeSpec, + DevicePath: volumeToMount.DevicePath, + } + fsVolume, err := util.CheckVolumeModeFilesystem(volumeToMount.VolumeSpec) + if err != nil { + return volumeToMount.GenerateError("NodeExpandvolume.CheckVolumeModeFilesystem failed", err) } - attachableVolumePlugin, _ := - og.volumePluginMgr.FindAttachablePluginBySpec(volumeToMount.VolumeSpec) + if fsVolume { + volumeMounter, newMounterErr := volumePlugin.NewMounter( + volumeToMount.VolumeSpec, + volumeToMount.Pod, + volume.VolumeOptions{}) + if newMounterErr != nil { + return volumeToMount.GenerateError("NodeExpandVolume.NewMounter initialization failed", newMounterErr) + } - if attachableVolumePlugin != nil { - volumeAttacher, _ := attachableVolumePlugin.NewAttacher() - if volumeAttacher != nil { - resizeOptions.CSIVolumePhase = volume.CSIVolumeStaged - resizeOptions.DevicePath = volumeToMount.DevicePath - dmp, err := volumeAttacher.GetDeviceMountPath(volumeToMount.VolumeSpec) + resizeOptions.DeviceMountPath = volumeMounter.GetPath() + + deviceMountableVolumePlugin, _ := og.volumePluginMgr.FindDeviceMountablePluginBySpec(volumeToMount.VolumeSpec) + var volumeDeviceMounter volume.DeviceMounter + if deviceMountableVolumePlugin != nil { + volumeDeviceMounter, _ = deviceMountableVolumePlugin.NewDeviceMounter() + } + + if volumeDeviceMounter != nil { + deviceStagePath, err := volumeDeviceMounter.GetDeviceMountPath(volumeToMount.VolumeSpec) if err != nil { return volumeToMount.GenerateError("NodeExpandVolume.GetDeviceMountPath failed", err) } - resizeOptions.DeviceMountPath = dmp - resizeDone, simpleErr, detailedErr = og.doOnlineExpansion(volumeToMount, actualStateOfWorld, resizeOptions) - if simpleErr != nil || detailedErr != nil { - return simpleErr, detailedErr - } - if resizeDone { - return nil, nil - } + resizeOptions.DeviceStagePath = deviceStagePath + } + } else { + // Get block volume mapper plugin + blockVolumePlugin, err := + og.volumePluginMgr.FindMapperPluginBySpec(volumeToMount.VolumeSpec) + if err != nil { + return volumeToMount.GenerateError("MapVolume.FindMapperPluginBySpec failed", err) + } + + if blockVolumePlugin == nil { + return volumeToMount.GenerateError("MapVolume.FindMapperPluginBySpec failed to find BlockVolumeMapper plugin. Volume plugin is nil.", nil) + } + + blockVolumeMapper, newMapperErr := blockVolumePlugin.NewBlockVolumeMapper( + volumeToMount.VolumeSpec, + volumeToMount.Pod, + volume.VolumeOptions{}) + if newMapperErr != nil { + return volumeToMount.GenerateError("MapVolume.NewBlockVolumeMapper initialization failed", newMapperErr) + } + + // if plugin supports custom mappers lets add DeviceStagePath + if customBlockVolumeMapper, ok := blockVolumeMapper.(volume.CustomBlockVolumeMapper); ok { + resizeOptions.DeviceStagePath = customBlockVolumeMapper.GetStagingPath() } } - // if we are here that means volume plugin does not support attach interface - volumeMounter, newMounterErr := volumePlugin.NewMounter( - volumeToMount.VolumeSpec, - volumeToMount.Pod, - volume.VolumeOptions{}) - if newMounterErr != nil { - return volumeToMount.GenerateError("NodeExpandVolume.NewMounter initialization failed", newMounterErr) - } - resizeOptions.DeviceMountPath = volumeMounter.GetPath() + // if we are doing online expansion then volume is already published resizeOptions.CSIVolumePhase = volume.CSIVolumePublished resizeDone, simpleErr, detailedErr = og.doOnlineExpansion(volumeToMount, actualStateOfWorld, resizeOptions) if simpleErr != nil || detailedErr != nil { @@ -1547,10 +1587,10 @@ func (og *operationGenerator) doOnlineExpansion(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater, resizeOptions volume.NodeResizeOptions) (bool, error, error) { - resizeDone, err := og.nodeExpandVolume(volumeToMount, resizeOptions) + resizeDone, err := og.nodeExpandVolume(volumeToMount, actualStateOfWorld, resizeOptions) if err != nil { - klog.Errorf("NodeExpandVolume.NodeExpandVolume failed : %v", err) e1, e2 := volumeToMount.GenerateError("NodeExpandVolume.NodeExpandVolume failed", err) + klog.Errorf(e2.Error()) return false, e1, e2 } if resizeDone { @@ -1565,7 +1605,10 @@ func (og *operationGenerator) doOnlineExpansion(volumeToMount VolumeToMount, return false, nil, nil } -func (og *operationGenerator) nodeExpandVolume(volumeToMount VolumeToMount, rsOpts volume.NodeResizeOptions) (bool, error) { +func (og *operationGenerator) nodeExpandVolume( + volumeToMount VolumeToMount, + actualStateOfWorld ActualStateOfWorldMounterUpdater, + rsOpts volume.NodeResizeOptions) (bool, error) { if !utilfeature.DefaultFeatureGate.Enabled(features.ExpandPersistentVolumes) { klog.V(4).Infof("Resizing is not enabled for this volume %s", volumeToMount.VolumeName) return true, nil @@ -1609,7 +1652,15 @@ func (og *operationGenerator) nodeExpandVolume(volumeToMount VolumeToMount, rsOp rsOpts.OldSize = pvcStatusCap resizeDone, resizeErr := expandableVolumePlugin.NodeExpand(rsOpts) if resizeErr != nil { - return false, fmt.Errorf("MountVolume.NodeExpandVolume failed : %v", resizeErr) + // if driver returned FailedPrecondition error that means + // volume expansion should not be retried on this node but + // expansion operation should not block mounting + if volumetypes.IsFailedPreconditionError(resizeErr) { + actualStateOfWorld.MarkForInUseExpansionError(volumeToMount.VolumeName) + klog.Errorf(volumeToMount.GenerateErrorDetailed("MountVolume.NodeExapndVolume failed with %v", resizeErr).Error()) + return true, nil + } + return false, resizeErr } // Volume resizing is not done but it did not error out. This could happen if a CSI volume // does not have node stage_unstage capability but was asked to resize the volume before diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/recyclerclient/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/recyclerclient/BUILD index 3ea30eb4491..54fde842be6 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/recyclerclient/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/recyclerclient/BUILD @@ -12,7 +12,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/watch:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/recyclerclient/recycler_client.go b/vendor/k8s.io/kubernetes/pkg/volume/util/recyclerclient/recycler_client.go index b1ca71f9035..7e2df6c111b 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/recyclerclient/recycler_client.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/recyclerclient/recycler_client.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" - "k8s.io/klog" + "k8s.io/klog/v2" ) // RecycleEventRecorder is a func that defines how to record RecycleEvent. diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/BUILD index 3830dc9ae00..ff6b29374e0 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/BUILD @@ -11,9 +11,14 @@ go_library( importpath = "k8s.io/kubernetes/pkg/volume/util/subpath", visibility = ["//visibility:public"], deps = select({ + "@io_bazel_rules_go//go/platform:aix": [ + "//vendor/k8s.io/utils/mount:go_default_library", + "//vendor/k8s.io/utils/nsenter:go_default_library", + ], "@io_bazel_rules_go//go/platform:android": [ + "//pkg/volume/util/hostutil:go_default_library", "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], "@io_bazel_rules_go//go/platform:darwin": [ @@ -28,13 +33,22 @@ go_library( "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/nsenter:go_default_library", ], + "@io_bazel_rules_go//go/platform:illumos": [ + "//vendor/k8s.io/utils/mount:go_default_library", + "//vendor/k8s.io/utils/nsenter:go_default_library", + ], "@io_bazel_rules_go//go/platform:ios": [ "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/nsenter:go_default_library", ], + "@io_bazel_rules_go//go/platform:js": [ + "//vendor/k8s.io/utils/mount:go_default_library", + "//vendor/k8s.io/utils/nsenter:go_default_library", + ], "@io_bazel_rules_go//go/platform:linux": [ + "//pkg/volume/util/hostutil:go_default_library", "//vendor/golang.org/x/sys/unix:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], "@io_bazel_rules_go//go/platform:nacl": [ @@ -58,7 +72,7 @@ go_library( "//vendor/k8s.io/utils/nsenter:go_default_library", ], "@io_bazel_rules_go//go/platform:windows": [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/nsenter:go_default_library", ], @@ -75,11 +89,11 @@ go_test( embed = [":go_default_library"], deps = select({ "@io_bazel_rules_go//go/platform:android": [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], "@io_bazel_rules_go//go/platform:windows": [ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_linux.go b/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_linux.go index 0663a72c50d..706e1f83da8 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_linux.go @@ -28,7 +28,8 @@ import ( "syscall" "golang.org/x/sys/unix" - "k8s.io/klog" + "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/volume/util/hostutil" "k8s.io/utils/mount" ) @@ -108,9 +109,21 @@ func prepareSubpathTarget(mounter mount.Interface, subpath Subpath) (bool, strin notMount = true } if !notMount { - // It's already mounted - klog.V(5).Infof("Skipping bind-mounting subpath %s: already mounted", bindPathTarget) - return true, bindPathTarget, nil + linuxHostUtil := hostutil.NewHostUtil() + mntInfo, err := linuxHostUtil.FindMountInfo(bindPathTarget) + if err != nil { + return false, "", fmt.Errorf("error calling findMountInfo for %s: %s", bindPathTarget, err) + } + if mntInfo.Root != subpath.Path { + // It's already mounted but not what we want, unmount it + if err = mounter.Unmount(bindPathTarget); err != nil { + return false, "", fmt.Errorf("error ummounting %s: %s", bindPathTarget, err) + } + } else { + // It's already mounted + klog.V(5).Infof("Skipping bind-mounting subpath %s: already mounted", bindPathTarget) + return true, bindPathTarget, nil + } } // bindPathTarget is in /var/lib/kubelet and thus reachable without any @@ -229,7 +242,7 @@ func doCleanSubPaths(mounter mount.Interface, podDir string, volumeName string) // scan /var/lib/kubelet/pods//volume-subpaths///* fullContainerDirPath := filepath.Join(subPathDir, containerDir.Name()) - err = filepath.Walk(fullContainerDirPath, func(path string, info os.FileInfo, err error) error { + err = filepath.Walk(fullContainerDirPath, func(path string, info os.FileInfo, _ error) error { if path == fullContainerDirPath { // Skip top level directory return nil diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_windows.go b/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_windows.go index f8c227e4fc1..2e08449c889 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_windows.go @@ -21,15 +21,20 @@ package subpath import ( "fmt" "os" + "os/exec" "path/filepath" "strings" "syscall" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" "k8s.io/utils/nsenter" ) +// MaxPathLength is the maximum length of Windows path. Normally, it is 260, but if long path is enable, +// the max number is 32,767 +const MaxPathLength = 32767 + type subpath struct{} // New returns a subpath.Interface for the current system @@ -43,6 +48,93 @@ func NewNSEnter(mounter mount.Interface, ne *nsenter.Nsenter, rootDir string) In return nil } +// isDriveLetterPath returns true if the given path is empty or it ends with ":" or ":\" or ":\\" +func isDriveLetterorEmptyPath(path string) bool { + if path == "" || strings.HasSuffix(path, ":\\\\") || strings.HasSuffix(path, ":") || strings.HasSuffix(path, ":\\") { + return true + } + return false +} + +// isVolumePrefix returns true if the given path name starts with "Volume" or volume prefix including +// "\\.\", "\\?\" for device path or "UNC" or "\\" for UNC path. Otherwise, it returns false. +func isDeviceOrUncPath(path string) bool { + if strings.HasPrefix(path, "Volume") || strings.HasPrefix(path, "\\\\?\\") || strings.HasPrefix(path, "\\\\.\\") || strings.HasPrefix(path, "UNC") { + return true + } + return false +} + +// getUpperPath removes the last level of directory. +func getUpperPath(path string) string { + sep := fmt.Sprintf("%c", filepath.Separator) + upperpath := strings.TrimSuffix(path, sep) + return filepath.Dir(upperpath) +} + +// Check whether a directory/file is a link type or not +// LinkType could be SymbolicLink, Junction, or HardLink +func isLinkPath(path string) (bool, error) { + cmd := fmt.Sprintf("(Get-Item -Path %s).LinkType", path) + output, err := exec.Command("powershell", "/c", cmd).CombinedOutput() + if err != nil { + return false, err + } + if strings.TrimSpace(string(output)) != "" { + return true, nil + } + return false, nil +} + +// evalSymlink returns the path name after the evaluation of any symbolic links. +// If the path after evaluation is a device path or network connection, the original path is returned +func evalSymlink(path string) (string, error) { + path = mount.NormalizeWindowsPath(path) + if isDeviceOrUncPath(path) || isDriveLetterorEmptyPath(path) { + klog.V(4).Infof("Path '%s' is not a symlink, return its original form.", path) + return path, nil + } + upperpath := path + base := "" + for i := 0; i < MaxPathLength; i++ { + isLink, err := isLinkPath(upperpath) + if err != nil { + return "", err + } + if isLink { + break + } + // continue to check next layer + base = filepath.Join(filepath.Base(upperpath), base) + upperpath = getUpperPath(upperpath) + if isDriveLetterorEmptyPath(upperpath) { + klog.V(4).Infof("Path '%s' is not a symlink, return its original form.", path) + return path, nil + } + } + // This command will give the target path of a given symlink + cmd := fmt.Sprintf("(Get-Item -Path %s).Target", upperpath) + output, err := exec.Command("powershell", "/c", cmd).CombinedOutput() + if err != nil { + return "", err + } + klog.V(4).Infof("evaluate path %s: symlink from %s to %s", path, upperpath, string(output)) + linkedPath := strings.TrimSpace(string(output)) + if linkedPath == "" || isDeviceOrUncPath(linkedPath) { + klog.V(4).Infof("Path '%s' has a target %s. Return its original form.", path, linkedPath) + return path, nil + } + // If the target is not an absoluate path, join iit with the current upperpath + if !filepath.IsAbs(linkedPath) { + linkedPath = filepath.Join(getUpperPath(upperpath), linkedPath) + } + nextLink, err := evalSymlink(linkedPath) + if err != nil { + return path, err + } + return filepath.Join(nextLink, base), nil +} + // check whether hostPath is within volume path // this func will lock all intermediate subpath directories, need to close handle outside of this func after container started func lockAndCheckSubPath(volumePath, hostPath string) ([]uintptr, error) { @@ -50,11 +142,12 @@ func lockAndCheckSubPath(volumePath, hostPath string) ([]uintptr, error) { return []uintptr{}, nil } - finalSubPath, err := filepath.EvalSymlinks(hostPath) + finalSubPath, err := evalSymlink(hostPath) if err != nil { - return []uintptr{}, fmt.Errorf("cannot read link %s: %s", hostPath, err) + return []uintptr{}, fmt.Errorf("cannot evaluate link %s: %s", hostPath, err) } - finalVolumePath, err := filepath.EvalSymlinks(volumePath) + + finalVolumePath, err := evalSymlink(volumePath) if err != nil { return []uintptr{}, fmt.Errorf("cannot read link %s: %s", volumePath, err) } @@ -162,7 +255,7 @@ func (sp *subpath) CleanSubPaths(podDir string, volumeName string) error { // SafeMakeDir makes sure that the created directory does not escape given base directory mis-using symlinks. func (sp *subpath) SafeMakeDir(subdir string, base string, perm os.FileMode) error { - realBase, err := filepath.EvalSymlinks(base) + realBase, err := evalSymlink(base) if err != nil { return fmt.Errorf("error resolving symlinks in %s: %s", base, err) } @@ -201,11 +294,11 @@ func doSafeMakeDir(pathname string, base string, perm os.FileMode) error { } // Ensure the existing directory is inside allowed base - fullExistingPath, err := filepath.EvalSymlinks(existingPath) + fullExistingPath, err := evalSymlink(existingPath) if err != nil { return fmt.Errorf("error opening existing directory %s: %s", existingPath, err) } - fullBasePath, err := filepath.EvalSymlinks(base) + fullBasePath, err := evalSymlink(base) if err != nil { return fmt.Errorf("cannot read link %s: %s", base, err) } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/types/types.go b/vendor/k8s.io/kubernetes/pkg/volume/util/types/types.go index 8dab5fcfa83..a06e5e18295 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/types/types.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/types/types.go @@ -54,6 +54,28 @@ func (o *GeneratedOperations) Run() (eventErr, detailedErr error) { return o.OperationFunc() } +// FailedPrecondition error indicates CSI operation returned failed precondition +// error +type FailedPrecondition struct { + msg string +} + +func (err *FailedPrecondition) Error() string { + return err.msg +} + +// NewFailedPreconditionError returns a new FailedPrecondition error instance +func NewFailedPreconditionError(msg string) *FailedPrecondition { + return &FailedPrecondition{msg: msg} +} + +// IsFailedPreconditionError checks if given error is of type that indicates +// operation failed with precondition +func IsFailedPreconditionError(err error) bool { + var failedPreconditionError *FailedPrecondition + return errors.As(err, &failedPreconditionError) +} + // TransientOperationFailure indicates operation failed with a transient error // and may fix itself when retried. type TransientOperationFailure struct { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/util.go b/vendor/k8s.io/kubernetes/pkg/volume/util/util.go index 2f2ce7ef0f9..426d4250a94 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/util.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/util.go @@ -26,7 +26,7 @@ import ( "runtime" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" @@ -43,6 +43,7 @@ import ( "k8s.io/kubernetes/pkg/api/legacyscheme" podutil "k8s.io/kubernetes/pkg/api/v1/pod" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" + "k8s.io/kubernetes/pkg/securitycontext" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util/types" "k8s.io/kubernetes/pkg/volume/util/volumepathhandler" @@ -592,7 +593,7 @@ func GetPodVolumeNames(pod *v1.Pod) (mounts sets.String, devices sets.String) { mounts = sets.NewString() devices = sets.NewString() - podutil.VisitContainers(&pod.Spec, func(container *v1.Container) bool { + podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), func(container *v1.Container, containerType podutil.ContainerType) bool { if container.VolumeMounts != nil { for _, mount := range container.VolumeMounts { mounts.Insert(mount.Name) @@ -608,6 +609,27 @@ func GetPodVolumeNames(pod *v1.Pod) (mounts sets.String, devices sets.String) { return } +// FsUserFrom returns FsUser of pod, which is determined by the runAsUser +// attributes. +func FsUserFrom(pod *v1.Pod) *int64 { + var fsUser *int64 + // Exclude ephemeral containers because SecurityContext is not allowed. + podutil.VisitContainers(&pod.Spec, podutil.InitContainers|podutil.Containers, func(container *v1.Container, containerType podutil.ContainerType) bool { + runAsUser, ok := securitycontext.DetermineEffectiveRunAsUser(pod, container) + // One container doesn't specify user or there are more than one + // non-root UIDs. + if !ok || (fsUser != nil && *fsUser != *runAsUser) { + fsUser = nil + return false + } + if fsUser == nil { + fsUser = runAsUser + } + return true + }) + return fsUser +} + // HasMountRefs checks if the given mountPath has mountRefs. // TODO: this is a workaround for the unmount device issue caused by gci mounter. // In GCI cluster, if gci mounter is used for mounting, the container started by mounter diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/BUILD index fdbc4b8b33e..7d0d82fee55 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/BUILD @@ -11,7 +11,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ] + select({ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/volume_path_handler.go b/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/volume_path_handler.go index 6f198302dc0..1b3a8f936aa 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/volume_path_handler.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/volume_path_handler.go @@ -22,7 +22,7 @@ import ( "os" "path/filepath" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" "k8s.io/utils/mount" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/volume_path_handler_linux.go b/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/volume_path_handler_linux.go index 66cc7c73f08..cf50fb2496c 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/volume_path_handler_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/volumepathhandler/volume_path_handler_linux.go @@ -30,7 +30,7 @@ import ( "golang.org/x/sys/unix" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // AttachFileDevice takes a path to a regular file and makes it available as an diff --git a/vendor/k8s.io/kubernetes/pkg/volume/volume.go b/vendor/k8s.io/kubernetes/pkg/volume/volume.go index 6e3f1bdef35..85b8c4aaa52 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/volume.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/volume.go @@ -103,6 +103,10 @@ type Attributes struct { // MounterArgs provides more easily extensible arguments to Mounter type MounterArgs struct { + // When FsUser is set, the ownership of the volume will be modified to be + // owned and writable by FsUser. Otherwise, there is no side effects. + // Currently only supported with projected service account tokens. + FsUser *int64 FsGroup *int64 FSGroupChangePolicy *v1.PodFSGroupChangePolicy DesiredSize *resource.Quantity @@ -126,7 +130,7 @@ type Mounter interface { // SetUp prepares and mounts/unpacks the volume to a // self-determined directory path. The mount point and its - // content should be owned by 'fsGroup' so that it can be + // content should be owned by `fsUser` or 'fsGroup' so that it can be // accessed by the pod. This may be called more than once, so // implementations must be idempotent. // It could return following types of errors: @@ -137,7 +141,7 @@ type Mounter interface { // SetUpAt prepares and mounts/unpacks the volume to the // specified directory path, which may or may not exist yet. - // The mount point and its content should be owned by + // The mount point and its content should be owned by `fsUser` // 'fsGroup' so that it can be accessed by the pod. This may // be called more than once, so implementations must be // idempotent. @@ -170,14 +174,19 @@ type CustomBlockVolumeMapper interface { // For most in-tree plugins, attacher.Attach() and attacher.WaitForAttach() // will do necessary works. // This may be called more than once, so implementations must be idempotent. - SetUpDevice() error + // SetUpDevice returns stagingPath if device setup was successful + SetUpDevice() (stagingPath string, err error) // MapPodDevice maps the block device to a path and return the path. // Unique device path across kubelet node reboot is required to avoid // unexpected block volume destruction. // If empty string is returned, the path retuned by attacher.Attach() and // attacher.WaitForAttach() will be used. - MapPodDevice() (string, error) + MapPodDevice() (publishPath string, err error) + + // GetStagingPath returns path that was used for staging the volume + // it is mainly used by CSI plugins + GetStagingPath() string } // BlockVolumeUnmapper interface is an unmapper interface for block volume. diff --git a/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go b/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go index fdbd9016806..d7b8e87c7da 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go @@ -26,7 +26,7 @@ import ( v1 "k8s.io/api/core/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/BUILD index 37855c50d5a..d4828ec3580 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/BUILD @@ -20,6 +20,7 @@ go_library( ], importpath = "k8s.io/kubernetes/pkg/volume/vsphere_volume", deps = [ + "//pkg/features:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//pkg/volume/util/volumepathhandler:go_default_library", @@ -27,11 +28,12 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/vsphere:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/keymutex:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", "//vendor/k8s.io/utils/strings:go_default_library", @@ -57,7 +59,7 @@ go_test( "//staging/src/k8s.io/cloud-provider/fake:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/vsphere:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/attacher.go b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/attacher.go index 8c247167858..7dd0a042c8e 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/attacher.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/attacher.go @@ -25,7 +25,7 @@ import ( "runtime" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/keymutex" "k8s.io/utils/mount" @@ -161,7 +161,7 @@ func (attacher *vsphereVMDKAttacher) WaitForAttach(spec *volume.Spec, devicePath } if devicePath == "" { - return "", fmt.Errorf("WaitForAttach failed for VMDK %q: devicePath is empty.", volumeSource.VolumePath) + return "", fmt.Errorf("WaitForAttach failed for VMDK %q: devicePath is empty", volumeSource.VolumePath) } ticker := time.NewTicker(checkSleepDuration) @@ -184,7 +184,7 @@ func (attacher *vsphereVMDKAttacher) WaitForAttach(spec *volume.Spec, devicePath return path, nil } case <-timer.C: - return "", fmt.Errorf("Could not find attached VMDK %q. Timeout waiting for mount paths to be created.", volumeSource.VolumePath) + return "", fmt.Errorf("could not find attached VMDK %q. Timeout waiting for mount paths to be created", volumeSource.VolumePath) } } } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go index 8f03f9ec1ae..10f146baf6e 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go @@ -25,7 +25,8 @@ import ( "runtime" "strings" - "k8s.io/klog" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" @@ -34,6 +35,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" volumehelpers "k8s.io/cloud-provider/volume/helpers" + + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" ) @@ -70,6 +73,11 @@ func (plugin *vsphereVolumePlugin) GetPluginName() string { return vsphereVolumePluginName } +func (plugin *vsphereVolumePlugin) IsMigratedToCSI() bool { + return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigration) && + utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationvSphere) +} + func (plugin *vsphereVolumePlugin) GetVolumeName(spec *volume.Spec) (string, error) { volumeSource, _, err := getVolumeSource(spec) if err != nil { @@ -456,7 +464,7 @@ func getVolumeSource( return spec.PersistentVolume.Spec.VsphereVolume, spec.ReadOnly, nil } - return nil, false, fmt.Errorf("Spec does not reference a VSphere volume type") + return nil, false, fmt.Errorf("spec does not reference a VSphere volume type") } func getNodeName(node *v1.Node) string { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_block.go b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_block.go index 657fd611ebe..1ca2fd749c2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_block.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_block.go @@ -23,7 +23,7 @@ import ( "path/filepath" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/mount" utilstrings "k8s.io/utils/strings" diff --git a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_util.go b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_util.go index 88db47a87b9..b42eede1aa8 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_util.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_util.go @@ -28,7 +28,7 @@ import ( "k8s.io/api/core/v1" cloudprovider "k8s.io/cloud-provider" volumehelpers "k8s.io/cloud-provider/volume/helpers" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/volume" volumeutil "k8s.io/kubernetes/pkg/volume/util" "k8s.io/legacy-cloud-providers/vsphere" @@ -63,7 +63,7 @@ const ( IopsLimitCapabilityMin = 0 ) -var ErrProbeVolume = errors.New("Error scanning attached volumes") +var ErrProbeVolume = errors.New("error scanning attached volumes") type VsphereDiskUtil struct{} @@ -129,7 +129,7 @@ func (util *VsphereDiskUtil) CreateVolume(v *vsphereVolumeProvisioner, selectedN if volumeOptions.VSANStorageProfileData != "" { if volumeOptions.StoragePolicyName != "" { - return nil, fmt.Errorf("Cannot specify storage policy capabilities along with storage policy name. Please specify only one") + return nil, fmt.Errorf("cannot specify storage policy capabilities along with storage policy name. Please specify only one") } volumeOptions.VSANStorageProfileData = "(" + volumeOptions.VSANStorageProfileData + ")" } @@ -186,12 +186,12 @@ func getVolPathfromVolumeName(deviceMountPath string) string { func getCloudProvider(cloud cloudprovider.Interface) (*vsphere.VSphere, error) { if cloud == nil { klog.Errorf("Cloud provider not initialized properly") - return nil, errors.New("Cloud provider not initialized properly") + return nil, errors.New("cloud provider not initialized properly") } vs, ok := cloud.(*vsphere.VSphere) if !ok || vs == nil { - return nil, errors.New("Invalid cloud provider: expected vSphere") + return nil, errors.New("invalid cloud provider: expected vSphere") } return vs, nil } @@ -201,55 +201,55 @@ func validateVSANCapability(capabilityName string, capabilityValue string) (stri var capabilityData string capabilityIntVal, ok := verifyCapabilityValueIsInteger(capabilityValue) if !ok { - return "", fmt.Errorf("Invalid value for %s. The capabilityValue: %s must be a valid integer value", capabilityName, capabilityValue) + return "", fmt.Errorf("invalid value for %s. The capabilityValue: %s must be a valid integer value", capabilityName, capabilityValue) } switch strings.ToLower(capabilityName) { case HostFailuresToTolerateCapability: if capabilityIntVal >= HostFailuresToTolerateCapabilityMin && capabilityIntVal <= HostFailuresToTolerateCapabilityMax { capabilityData = " (\"hostFailuresToTolerate\" i" + capabilityValue + ")" } else { - return "", fmt.Errorf(`Invalid value for hostFailuresToTolerate. - The default value is %d, minimum value is %d and maximum value is %d.`, + return "", fmt.Errorf(`invalid value for hostFailuresToTolerate. + The default value is %d, minimum value is %d and maximum value is %d`, 1, HostFailuresToTolerateCapabilityMin, HostFailuresToTolerateCapabilityMax) } case ForceProvisioningCapability: if capabilityIntVal >= ForceProvisioningCapabilityMin && capabilityIntVal <= ForceProvisioningCapabilityMax { capabilityData = " (\"forceProvisioning\" i" + capabilityValue + ")" } else { - return "", fmt.Errorf(`Invalid value for forceProvisioning. - The value can be either %d or %d.`, + return "", fmt.Errorf(`invalid value for forceProvisioning. + The value can be either %d or %d`, ForceProvisioningCapabilityMin, ForceProvisioningCapabilityMax) } case CacheReservationCapability: if capabilityIntVal >= CacheReservationCapabilityMin && capabilityIntVal <= CacheReservationCapabilityMax { capabilityData = " (\"cacheReservation\" i" + strconv.Itoa(capabilityIntVal*10000) + ")" } else { - return "", fmt.Errorf(`Invalid value for cacheReservation. - The minimum percentage is %d and maximum percentage is %d.`, + return "", fmt.Errorf(`invalid value for cacheReservation. + The minimum percentage is %d and maximum percentage is %d`, CacheReservationCapabilityMin, CacheReservationCapabilityMax) } case DiskStripesCapability: if capabilityIntVal >= DiskStripesCapabilityMin && capabilityIntVal <= DiskStripesCapabilityMax { capabilityData = " (\"stripeWidth\" i" + capabilityValue + ")" } else { - return "", fmt.Errorf(`Invalid value for diskStripes. - The minimum value is %d and maximum value is %d.`, + return "", fmt.Errorf(`invalid value for diskStripes. + The minimum value is %d and maximum value is %d`, DiskStripesCapabilityMin, DiskStripesCapabilityMax) } case ObjectSpaceReservationCapability: if capabilityIntVal >= ObjectSpaceReservationCapabilityMin && capabilityIntVal <= ObjectSpaceReservationCapabilityMax { capabilityData = " (\"proportionalCapacity\" i" + capabilityValue + ")" } else { - return "", fmt.Errorf(`Invalid value for ObjectSpaceReservation. - The minimum percentage is %d and maximum percentage is %d.`, + return "", fmt.Errorf(`invalid value for ObjectSpaceReservation. + The minimum percentage is %d and maximum percentage is %d`, ObjectSpaceReservationCapabilityMin, ObjectSpaceReservationCapabilityMax) } case IopsLimitCapability: if capabilityIntVal >= IopsLimitCapabilityMin { capabilityData = " (\"iopsLimit\" i" + capabilityValue + ")" } else { - return "", fmt.Errorf(`Invalid value for iopsLimit. - The value should be greater than %d.`, IopsLimitCapabilityMin) + return "", fmt.Errorf(`invalid value for iopsLimit. + The value should be greater than %d`, IopsLimitCapabilityMin) } } return capabilityData, nil diff --git a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_util_windows.go b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_util_windows.go index a57b176371e..dd088c57ea2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_util_windows.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_util_windows.go @@ -25,7 +25,7 @@ import ( "os/exec" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" ) type diskInfoResult struct { diff --git a/vendor/k8s.io/kubernetes/pkg/windows/service/BUILD b/vendor/k8s.io/kubernetes/pkg/windows/service/BUILD index e518a527080..3d84765d667 100644 --- a/vendor/k8s.io/kubernetes/pkg/windows/service/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/windows/service/BUILD @@ -14,7 +14,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/server:go_default_library", "//vendor/golang.org/x/sys/windows:go_default_library", "//vendor/golang.org/x/sys/windows/svc:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], "//conditions:default": [], }), diff --git a/vendor/k8s.io/kubernetes/pkg/windows/service/service.go b/vendor/k8s.io/kubernetes/pkg/windows/service/service.go index 35d8e19bbc7..cd50e924e05 100644 --- a/vendor/k8s.io/kubernetes/pkg/windows/service/service.go +++ b/vendor/k8s.io/kubernetes/pkg/windows/service/service.go @@ -23,7 +23,7 @@ import ( "time" "k8s.io/apiserver/pkg/server" - "k8s.io/klog" + "k8s.io/klog/v2" "golang.org/x/sys/windows" "golang.org/x/sys/windows/svc" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/BUILD index 0bd72814c6d..18a7c611020 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/BUILD @@ -12,7 +12,7 @@ go_library( importpath = "k8s.io/kubernetes/plugin/pkg/admission/admit", deps = [ "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/admission.go index ca04ce00cee..e2cc6caabbd 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/admission.go @@ -21,7 +21,7 @@ import ( "io" "k8s.io/apiserver/pkg/admission" - "k8s.io/klog" + "k8s.io/klog/v2" ) // PluginName indicates name of admission plugin. diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission.go index 0b78124cebb..9786b964263 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission.go @@ -66,7 +66,7 @@ func (a *AlwaysPullImages) Admit(ctx context.Context, attributes admission.Attri return apierrors.NewBadRequest("Resource was marked with kind Pod but was unable to be converted") } - pods.VisitContainersWithPath(&pod.Spec, func(c *api.Container, _ *field.Path) bool { + pods.VisitContainersWithPath(&pod.Spec, field.NewPath("spec"), func(c *api.Container, _ *field.Path) bool { c.ImagePullPolicy = api.PullAlways return true }) @@ -86,7 +86,7 @@ func (*AlwaysPullImages) Validate(ctx context.Context, attributes admission.Attr } var allErrs []error - pods.VisitContainersWithPath(&pod.Spec, func(c *api.Container, p *field.Path) bool { + pods.VisitContainersWithPath(&pod.Spec, field.NewPath("spec"), func(c *api.Container, p *field.Path) bool { if c.ImagePullPolicy != api.PullAlways { allErrs = append(allErrs, admission.NewForbidden(attributes, field.NotSupported(p.Child("imagePullPolicy"), c.ImagePullPolicy, []string{string(api.PullAlways)}), diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/BUILD index 1f0e16a427f..adf66fda569 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/BUILD @@ -27,6 +27,6 @@ go_library( deps = [ "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/approval/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/approval/BUILD index b9ee5de335f..3fc477f7091 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/approval/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/approval/BUILD @@ -11,7 +11,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/initializer:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/approval/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/approval/admission.go index 65214427092..248f9058c38 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/approval/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/approval/admission.go @@ -21,7 +21,7 @@ import ( "fmt" "io" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apiserver/pkg/admission" genericadmissioninit "k8s.io/apiserver/pkg/admission/initializer" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/signing/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/signing/BUILD index 9579c8ae801..175ef63cb82 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/signing/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/signing/BUILD @@ -8,10 +8,11 @@ go_library( deps = [ "//pkg/apis/certificates:go_default_library", "//plugin/pkg/admission/certificates:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/initializer:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/signing/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/signing/admission.go index 1b26c439d9e..2cd2b2e2740 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/signing/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/signing/admission.go @@ -22,12 +22,12 @@ import ( "io" "reflect" - "k8s.io/klog" + "k8s.io/klog/v2" + apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apiserver/pkg/admission" genericadmissioninit "k8s.io/apiserver/pkg/admission/initializer" "k8s.io/apiserver/pkg/authorization/authorizer" - api "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/plugin/pkg/admission/certificates" ) @@ -73,10 +73,10 @@ func NewPlugin() *Plugin { var csrGroupResource = api.Resource("certificatesigningrequests") -// Validate verifies that the requesting user has permission to approve +// Validate verifies that the requesting user has permission to sign // CertificateSigningRequests for the specified signerName. func (p *Plugin) Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error { - // Ignore all calls to anything other than 'certificatesigningrequests/approval'. + // Ignore all calls to anything other than 'certificatesigningrequests/status'. // Ignore all operations other than UPDATE. if a.GetSubresource() != "status" || a.GetResource().GroupResource() != csrGroupResource { @@ -92,8 +92,8 @@ func (p *Plugin) Validate(ctx context.Context, a admission.Attributes, o admissi return admission.NewForbidden(a, fmt.Errorf("expected type CertificateSigningRequest, got: %T", a.GetObject())) } - // only run if the status.certificate field has been changed - if reflect.DeepEqual(oldCSR.Status.Certificate, csr.Status.Certificate) { + // only run if the status.certificate or status.conditions field has been changed + if reflect.DeepEqual(oldCSR.Status.Certificate, csr.Status.Certificate) && apiequality.Semantic.DeepEqual(oldCSR.Status.Conditions, csr.Status.Conditions) { return nil } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/subjectrestriction/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/subjectrestriction/BUILD index f73da8a6e02..87d5f937f1f 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/subjectrestriction/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/subjectrestriction/BUILD @@ -9,7 +9,7 @@ go_library( "//pkg/apis/certificates:go_default_library", "//staging/src/k8s.io/api/certificates/v1beta1:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/subjectrestriction/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/subjectrestriction/admission.go index e1efff256bb..20da7dd7612 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/subjectrestriction/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/subjectrestriction/admission.go @@ -23,7 +23,7 @@ import ( certificatesv1beta1 "k8s.io/api/certificates/v1beta1" "k8s.io/apiserver/pkg/admission" - "k8s.io/klog" + "k8s.io/klog/v2" certificatesapi "k8s.io/kubernetes/pkg/apis/certificates" ) @@ -75,7 +75,7 @@ func (p *Plugin) Validate(_ context.Context, a admission.Attributes, _ admission return nil } - csrParsed, err := certificatesapi.ParseCSR(csr) + csrParsed, err := certificatesapi.ParseCSR(csr.Spec.Request) if err != nil { return admission.NewForbidden(a, fmt.Errorf("failed to parse CSR: %v", err)) } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/util.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/util.go index ad58bad49dc..42cbb659879 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/util.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/certificates/util.go @@ -22,7 +22,7 @@ import ( "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/klog" + "k8s.io/klog/v2" ) // IsAuthorizedForSignerName returns true if 'info' is authorized to perform the given diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/defaultingressclass/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/defaultingressclass/BUILD index 65399b5bb88..367c3cf3b3d 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/defaultingressclass/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/defaultingressclass/BUILD @@ -7,16 +7,15 @@ go_library( visibility = ["//visibility:public"], deps = [ "//pkg/apis/networking:go_default_library", - "//pkg/features:go_default_library", + "//staging/src/k8s.io/api/networking/v1:go_default_library", "//staging/src/k8s.io/api/networking/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/initializer:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", - "//staging/src/k8s.io/client-go/listers/networking/v1beta1:go_default_library", - "//staging/src/k8s.io/component-base/featuregate:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//staging/src/k8s.io/client-go/listers/networking/v1:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -28,6 +27,7 @@ go_test( "//pkg/apis/core:go_default_library", "//pkg/apis/networking:go_default_library", "//pkg/controller:go_default_library", + "//staging/src/k8s.io/api/networking/v1:go_default_library", "//staging/src/k8s.io/api/networking/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/defaultingressclass/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/defaultingressclass/admission.go index 71e830fe55b..454e703ed9e 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/defaultingressclass/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/defaultingressclass/admission.go @@ -21,17 +21,16 @@ import ( "fmt" "io" + networkingv1 "k8s.io/api/networking/v1" networkingv1beta1 "k8s.io/api/networking/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/apiserver/pkg/admission" genericadmissioninitializer "k8s.io/apiserver/pkg/admission/initializer" "k8s.io/client-go/informers" - networkingv1beta1listers "k8s.io/client-go/listers/networking/v1beta1" - "k8s.io/component-base/featuregate" - "k8s.io/klog" + networkingv1listers "k8s.io/client-go/listers/networking/v1" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/apis/networking" - "k8s.io/kubernetes/pkg/features" ) const ( @@ -50,10 +49,7 @@ func Register(plugins *admission.Plugins) { // classDefaulterPlugin holds state for and implements the admission plugin. type classDefaulterPlugin struct { *admission.Handler - lister networkingv1beta1listers.IngressClassLister - - inspectedFeatures bool - defaultIngressClassEnabled bool + lister networkingv1listers.IngressClassLister } var _ admission.Interface = &classDefaulterPlugin{} @@ -67,31 +63,16 @@ func newPlugin() *classDefaulterPlugin { } } -// InspectFeatureGates allows setting bools without taking a dep on a global variable -func (a *classDefaulterPlugin) InspectFeatureGates(featureGates featuregate.FeatureGate) { - a.defaultIngressClassEnabled = featureGates.Enabled(features.DefaultIngressClass) - a.inspectedFeatures = true -} - // SetExternalKubeInformerFactory sets a lister and readyFunc for this // classDefaulterPlugin using the provided SharedInformerFactory. func (a *classDefaulterPlugin) SetExternalKubeInformerFactory(f informers.SharedInformerFactory) { - if !a.defaultIngressClassEnabled { - return - } - informer := f.Networking().V1beta1().IngressClasses() + informer := f.Networking().V1().IngressClasses() a.lister = informer.Lister() a.SetReadyFunc(informer.Informer().HasSynced) } // ValidateInitialization ensures lister is set. func (a *classDefaulterPlugin) ValidateInitialization() error { - if !a.inspectedFeatures { - return fmt.Errorf("InspectFeatureGates was not called") - } - if !a.defaultIngressClassEnabled { - return nil - } if a.lister == nil { return fmt.Errorf("missing lister") } @@ -101,10 +82,7 @@ func (a *classDefaulterPlugin) ValidateInitialization() error { // Admit sets the default value of a Ingress's class if the user did not specify // a class. func (a *classDefaulterPlugin) Admit(ctx context.Context, attr admission.Attributes, o admission.ObjectInterfaces) error { - if !a.defaultIngressClassEnabled { - return nil - } - if attr.GetResource().GroupResource() != networkingv1beta1.Resource("ingresses") { + if attr.GetResource().GroupResource() != networkingv1.Resource("ingresses") { return nil } @@ -147,13 +125,13 @@ func (a *classDefaulterPlugin) Admit(ctx context.Context, attr admission.Attribu } // getDefaultClass returns the default IngressClass from the store, or nil. -func getDefaultClass(lister networkingv1beta1listers.IngressClassLister) (*networkingv1beta1.IngressClass, error) { +func getDefaultClass(lister networkingv1listers.IngressClassLister) (*networkingv1.IngressClass, error) { list, err := lister.List(labels.Everything()) if err != nil { return nil, err } - defaultClasses := []*networkingv1beta1.IngressClass{} + defaultClasses := []*networkingv1.IngressClass{} for _, class := range list { if class.Annotations[networkingv1beta1.AnnotationIsDefaultIngressClass] == "true" { defaultClasses = append(defaultClasses, class) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/BUILD index 8d68d1840b8..0d5d74fe444 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/BUILD @@ -12,7 +12,7 @@ go_library( importpath = "k8s.io/kubernetes/plugin/pkg/admission/deny", deps = [ "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission.go index ee0712b8633..a162b3b5a68 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission.go @@ -21,7 +21,7 @@ import ( "errors" "io" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apiserver/pkg/admission" ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/BUILD index d03d66924a4..c7500ef3afa 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/BUILD @@ -17,7 +17,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/initializer:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission.go index 1a0051dd978..059651c02b9 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission.go @@ -26,7 +26,7 @@ import ( "k8s.io/apiserver/pkg/admission" genericadmissioninitializer "k8s.io/apiserver/pkg/admission/initializer" "k8s.io/client-go/kubernetes" - "k8s.io/klog" + "k8s.io/klog/v2" podutil "k8s.io/kubernetes/pkg/api/v1/pod" ) @@ -149,7 +149,7 @@ func (d *DenyExec) Validate(ctx context.Context, a admission.Attributes, o admis // isPrivileged will return true a pod has any privileged containers func isPrivileged(pod *corev1.Pod) bool { var privileged bool - podutil.VisitContainers(&pod.Spec, func(c *corev1.Container) bool { + podutil.VisitContainers(&pod.Spec, podutil.AllContainers, func(c *corev1.Container, containerType podutil.ContainerType) bool { if c.SecurityContext == nil || c.SecurityContext.Privileged == nil { return true } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/BUILD index 20630ea3644..360e5b5b09d 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/BUILD @@ -26,7 +26,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission.go index ddd06b43b56..572fe67e77e 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission.go @@ -27,7 +27,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/imagepolicy/v1alpha1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/config.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/config.go index cbe2ece4a31..84e19349359 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/config.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/config.go @@ -22,7 +22,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/noderestriction/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/noderestriction/BUILD index e9dfae55fe9..736a3d046b6 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/noderestriction/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/noderestriction/BUILD @@ -32,7 +32,6 @@ go_library( "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/component-base/featuregate:go_default_library", - "//vendor/k8s.io/klog:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/noderestriction/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/noderestriction/admission.go index 5488c68c3b5..4ec35894e8f 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/noderestriction/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/noderestriction/admission.go @@ -34,7 +34,6 @@ import ( "k8s.io/client-go/informers" corev1lister "k8s.io/client-go/listers/core/v1" "k8s.io/component-base/featuregate" - "k8s.io/klog" podutil "k8s.io/kubernetes/pkg/api/pod" authenticationapi "k8s.io/kubernetes/pkg/apis/authentication" coordapi "k8s.io/kubernetes/pkg/apis/coordination" @@ -257,12 +256,12 @@ func (p *Plugin) admitPodCreate(nodeName string, a admission.Attributes) error { return admission.NewForbidden(a, fmt.Errorf("node %q can not create pods that reference a service account", nodeName)) } hasSecrets := false - podutil.VisitPodSecretNames(pod, func(name string) (shouldContinue bool) { hasSecrets = true; return false }) + podutil.VisitPodSecretNames(pod, func(name string) (shouldContinue bool) { hasSecrets = true; return false }, podutil.AllContainers) if hasSecrets { return admission.NewForbidden(a, fmt.Errorf("node %q can not create pods that reference secrets", nodeName)) } hasConfigMaps := false - podutil.VisitPodConfigmapNames(pod, func(name string) (shouldContinue bool) { hasConfigMaps = true; return false }) + podutil.VisitPodConfigmapNames(pod, func(name string) (shouldContinue bool) { hasConfigMaps = true; return false }, podutil.AllContainers) if hasConfigMaps { return admission.NewForbidden(a, fmt.Errorf("node %q can not create pods that reference configmaps", nodeName)) } @@ -406,14 +405,9 @@ func (p *Plugin) admitNode(nodeName string, a admission.Attributes) error { // Don't allow a node to register with labels outside the allowed set. // This would allow a node to add or modify its labels in a way that would let it steer privileged workloads to itself. modifiedLabels := getModifiedLabels(node.Labels, nil) - if forbiddenLabels := p.getForbiddenCreateLabels(modifiedLabels); len(forbiddenLabels) > 0 { + if forbiddenLabels := p.getForbiddenLabels(modifiedLabels); len(forbiddenLabels) > 0 { return admission.NewForbidden(a, fmt.Errorf("node %q is not allowed to set the following labels: %s", nodeName, strings.Join(forbiddenLabels.List(), ", "))) } - // check and warn if nodes set labels on create that would have been forbidden on update - // TODO(liggitt): in 1.19, expand getForbiddenCreateLabels to match getForbiddenUpdateLabels and drop this - if forbiddenUpdateLabels := p.getForbiddenUpdateLabels(modifiedLabels); len(forbiddenUpdateLabels) > 0 { - klog.Warningf("node %q added disallowed labels on node creation: %s", nodeName, strings.Join(forbiddenUpdateLabels.List(), ", ")) - } } if requestedName != nodeName { return admission.NewForbidden(a, fmt.Errorf("node %q is not allowed to modify node %q", nodeName, requestedName)) @@ -445,7 +439,7 @@ func (p *Plugin) admitNode(nodeName string, a admission.Attributes) error { // Don't allow a node to update labels outside the allowed set. // This would allow a node to add or modify its labels in a way that would let it steer privileged workloads to itself. modifiedLabels := getModifiedLabels(node.Labels, oldNode.Labels) - if forbiddenUpdateLabels := p.getForbiddenUpdateLabels(modifiedLabels); len(forbiddenUpdateLabels) > 0 { + if forbiddenUpdateLabels := p.getForbiddenLabels(modifiedLabels); len(forbiddenUpdateLabels) > 0 { return admission.NewForbidden(a, fmt.Errorf("is not allowed to modify labels: %s", strings.Join(forbiddenUpdateLabels.List(), ", "))) } } @@ -487,26 +481,8 @@ func getLabelNamespace(key string) string { return "" } -// getForbiddenCreateLabels returns the set of labels that may not be set by the node. -// TODO(liggitt): in 1.19, expand to match getForbiddenUpdateLabels() -func (p *Plugin) getForbiddenCreateLabels(modifiedLabels sets.String) sets.String { - if len(modifiedLabels) == 0 { - return nil - } - - forbiddenLabels := sets.NewString() - for label := range modifiedLabels { - namespace := getLabelNamespace(label) - // forbid kubelets from setting node-restriction labels - if namespace == v1.LabelNamespaceNodeRestriction || strings.HasSuffix(namespace, "."+v1.LabelNamespaceNodeRestriction) { - forbiddenLabels.Insert(label) - } - } - return forbiddenLabels -} - -// getForbiddenLabels returns the set of labels that may not be set by the node on update. -func (p *Plugin) getForbiddenUpdateLabels(modifiedLabels sets.String) sets.String { +// getForbiddenLabels returns the set of labels that may not be added, removed, or modified by the node on create or update. +func (p *Plugin) getForbiddenLabels(modifiedLabels sets.String) sets.String { if len(modifiedLabels) == 0 { return nil } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/BUILD index 5a59f437f96..1cb6bf33699 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/BUILD @@ -22,7 +22,7 @@ go_library( "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission.go index ddc5fb55b4c..5a379bd88ef 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission.go @@ -22,7 +22,7 @@ import ( "io" "reflect" - "k8s.io/klog" + "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podpreset/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podpreset/BUILD index 3e8e50d48ea..b1ffd757c43 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podpreset/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podpreset/BUILD @@ -47,7 +47,7 @@ go_library( "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/listers/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podpreset/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podpreset/admission.go index 53e4a61b3f2..833acbe43de 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podpreset/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podpreset/admission.go @@ -23,7 +23,7 @@ import ( "reflect" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" settingsv1alpha1 "k8s.io/api/settings/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" @@ -186,7 +186,7 @@ func safeToApplyPodPresetsOnPod(pod *api.Pod, podPresets []*settingsv1alpha1.Pod if _, err := mergeVolumes(pod.Spec.Volumes, podPresets); err != nil { errs = append(errs, err) } - pods.VisitContainersWithPath(&pod.Spec, func(c *api.Container, _ *field.Path) bool { + pods.VisitContainersWithPath(&pod.Spec, field.NewPath("spec"), func(c *api.Container, _ *field.Path) bool { if err := safeToApplyPodPresetsOnContainer(c, podPresets); err != nil { errs = append(errs, err) } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction/BUILD index be1c59bed73..39913f47d68 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction/BUILD @@ -53,7 +53,7 @@ go_library( "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes:go_default_library", "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction/admission.go index 25bfdc37551..4e20ee96558 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction/admission.go @@ -22,7 +22,7 @@ import ( "fmt" "io" - "k8s.io/klog" + "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -127,6 +127,7 @@ func (p *Plugin) Validate(ctx context.Context, a admission.Attributes, o admissi pod := a.GetObject().(*api.Pod) if len(pod.Spec.Tolerations) > 0 { whitelist, err := p.getNamespaceTolerationsWhitelist(a.GetNamespace()) + whitelistScope := "namespace" if err != nil { return err } @@ -135,12 +136,13 @@ func (p *Plugin) Validate(ctx context.Context, a admission.Attributes, o admissi // fall back to cluster's whitelist of tolerations. if whitelist == nil { whitelist = p.pluginConfig.Whitelist + whitelistScope = "cluster" } if len(whitelist) > 0 { // check if the merged pod tolerations satisfy its namespace whitelist if !tolerations.VerifyAgainstWhitelist(pod.Spec.Tolerations, whitelist) { - return fmt.Errorf("pod tolerations (possibly merged with namespace default tolerations) conflict with its namespace whitelist") + return fmt.Errorf("pod tolerations (possibly merged with namespace default tolerations) conflict with its %s whitelist", whitelistScope) } } } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/priority/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/priority/BUILD index daf148908fb..7e385377e65 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/priority/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/priority/BUILD @@ -24,7 +24,7 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/component-base/featuregate/testing:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/priority/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/priority/admission.go index c414535aa25..d88b05beadc 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/priority/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/priority/admission.go @@ -163,6 +163,9 @@ func (p *Plugin) admitPod(a admission.Attributes) error { if pod.Spec.Priority == nil && oldPod.Spec.Priority != nil { pod.Spec.Priority = oldPod.Spec.Priority } + if pod.Spec.PreemptionPolicy == nil && oldPod.Spec.PreemptionPolicy != nil { + pod.Spec.PreemptionPolicy = oldPod.Spec.PreemptionPolicy + } return nil } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/BUILD index 33aa9c427ef..8f4d5ee1fd5 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/BUILD @@ -43,7 +43,7 @@ go_library( "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library", "//staging/src/k8s.io/client-go/util/workqueue:go_default_library", "//vendor/github.com/hashicorp/golang-lru:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/controller.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/controller.go index ae6807edd9f..510db4f6f44 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/controller.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/controller.go @@ -23,7 +23,7 @@ import ( "sync" "time" - "k8s.io/klog" + "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -43,7 +43,7 @@ import ( // Evaluator is used to see if quota constraints are satisfied. type Evaluator interface { // Evaluate takes an operation and checks to see if quota constraints are satisfied. It returns an error if they are not. - // The default implementation process related operations in chunks when possible. + // The default implementation processes related operations in chunks when possible. Evaluate(a admission.Attributes) error } @@ -618,7 +618,7 @@ func (e *quotaEvaluator) Evaluate(a admission.Attributes) error { select { case <-waiter.finished: case <-time.After(10 * time.Second): - return apierrors.NewInternalError(fmt.Errorf("resource quota evaluates timeout")) + return apierrors.NewInternalError(fmt.Errorf("resource quota evaluation timed out")) } return waiter.result diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/runtimeclass/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/runtimeclass/BUILD index 04b2d5221eb..e8932e2f18d 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/runtimeclass/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/runtimeclass/BUILD @@ -14,9 +14,12 @@ go_library( "//staging/src/k8s.io/api/node/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/initializer:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1:go_default_library", "//staging/src/k8s.io/client-go/listers/node/v1beta1:go_default_library", "//staging/src/k8s.io/component-base/featuregate:go_default_library", ], @@ -28,6 +31,8 @@ go_test( embed = [":go_default_library"], deps = [ "//pkg/apis/core:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/features:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/node/v1beta1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", @@ -35,6 +40,10 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", + "//staging/src/k8s.io/client-go/informers:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes:go_default_library", + "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", + "//staging/src/k8s.io/component-base/featuregate:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/runtimeclass/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/runtimeclass/admission.go index 4af7e826683..5b087082509 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/runtimeclass/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/runtimeclass/admission.go @@ -29,9 +29,12 @@ import ( v1beta1 "k8s.io/api/node/v1beta1" apiequality "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/admission" genericadmissioninitailizer "k8s.io/apiserver/pkg/admission/initializer" "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" + nodev1beta1client "k8s.io/client-go/kubernetes/typed/node/v1beta1" nodev1beta1listers "k8s.io/client-go/listers/node/v1beta1" "k8s.io/component-base/featuregate" api "k8s.io/kubernetes/pkg/apis/core" @@ -58,6 +61,7 @@ func Register(plugins *admission.Plugins) { type RuntimeClass struct { *admission.Handler runtimeClassLister nodev1beta1listers.RuntimeClassLister + runtimeClassClient nodev1beta1client.RuntimeClassInterface inspectedFeatures bool runtimeClassEnabled bool @@ -68,6 +72,12 @@ var _ admission.MutationInterface = &RuntimeClass{} var _ admission.ValidationInterface = &RuntimeClass{} var _ genericadmissioninitailizer.WantsExternalKubeInformerFactory = &RuntimeClass{} +var _ genericadmissioninitailizer.WantsExternalKubeClientSet = &RuntimeClass{} + +// SetExternalKubeClientSet sets the client for the plugin +func (r *RuntimeClass) SetExternalKubeClientSet(client kubernetes.Interface) { + r.runtimeClassClient = client.NodeV1beta1().RuntimeClasses() +} // InspectFeatureGates allows setting bools without taking a dep on a global variable func (r *RuntimeClass) InspectFeatureGates(featureGates featuregate.FeatureGate) { @@ -97,6 +107,9 @@ func (r *RuntimeClass) ValidateInitialization() error { if r.runtimeClassLister == nil { return fmt.Errorf("missing RuntimeClass lister") } + if r.runtimeClassClient == nil { + return fmt.Errorf("missing RuntimeClass client") + } return nil } @@ -111,7 +124,7 @@ func (r *RuntimeClass) Admit(ctx context.Context, attributes admission.Attribute return nil } - pod, runtimeClass, err := r.prepareObjects(attributes) + pod, runtimeClass, err := r.prepareObjects(ctx, attributes) if err != nil { return err } @@ -139,7 +152,7 @@ func (r *RuntimeClass) Validate(ctx context.Context, attributes admission.Attrib return nil } - pod, runtimeClass, err := r.prepareObjects(attributes) + pod, runtimeClass, err := r.prepareObjects(ctx, attributes) if err != nil { return err } @@ -160,7 +173,7 @@ func NewRuntimeClass() *RuntimeClass { } // prepareObjects returns pod and runtimeClass types from the given admission attributes -func (r *RuntimeClass) prepareObjects(attributes admission.Attributes) (pod *api.Pod, runtimeClass *v1beta1.RuntimeClass, err error) { +func (r *RuntimeClass) prepareObjects(ctx context.Context, attributes admission.Attributes) (pod *api.Pod, runtimeClass *v1beta1.RuntimeClass, err error) { pod, ok := attributes.GetObject().(*api.Pod) if !ok { return nil, nil, apierrors.NewBadRequest("Resource was marked with kind Pod but was unable to be converted") @@ -173,7 +186,11 @@ func (r *RuntimeClass) prepareObjects(attributes admission.Attributes) (pod *api // get RuntimeClass object runtimeClass, err = r.runtimeClassLister.Get(*pod.Spec.RuntimeClassName) if apierrors.IsNotFound(err) { - return pod, nil, admission.NewForbidden(attributes, fmt.Errorf("pod rejected: RuntimeClass %q not found", *pod.Spec.RuntimeClassName)) + // if not found, our informer cache could be lagging, do a live lookup + runtimeClass, err = r.runtimeClassClient.Get(ctx, *pod.Spec.RuntimeClassName, metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + return pod, nil, admission.NewForbidden(attributes, fmt.Errorf("pod rejected: RuntimeClass %q not found", *pod.Spec.RuntimeClassName)) + } } // return the pod and runtimeClass. diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/BUILD index 6295537458e..fd057d7b2e3 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/BUILD @@ -28,7 +28,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/listers/policy/v1beta1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission.go index 63e9456ba5d..e1edb1159a2 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission.go @@ -23,7 +23,7 @@ import ( "sort" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" policyv1beta1 "k8s.io/api/policy/v1beta1" apiequality "k8s.io/apimachinery/pkg/api/equality" @@ -127,7 +127,7 @@ func (p *Plugin) Admit(ctx context.Context, a admission.Attributes, o admission. // compute the context. Mutation is allowed. ValidatedPSPAnnotation is not taken into account. allowedPod, pspName, validationErrs, err := p.computeSecurityContext(ctx, a, pod, true, "") if err != nil { - return admission.NewForbidden(a, err) + return admission.NewForbidden(a, fmt.Errorf("PodSecurityPolicy: %w", err)) } if allowedPod != nil { *pod = *allowedPod @@ -145,8 +145,8 @@ func (p *Plugin) Admit(ctx context.Context, a admission.Attributes, o admission. } // we didn't validate against any provider, reject the pod and give the errors for each attempt - klog.V(4).Infof("unable to validate pod %s (generate: %s) in namespace %s against any pod security policy: %v", pod.Name, pod.GenerateName, a.GetNamespace(), validationErrs) - return admission.NewForbidden(a, fmt.Errorf("unable to validate against any pod security policy: %v", validationErrs)) + klog.V(4).Infof("unable to admit pod %s (generate: %s) in namespace %s against any pod security policy: %v", pod.Name, pod.GenerateName, a.GetNamespace(), validationErrs) + return admission.NewForbidden(a, fmt.Errorf("PodSecurityPolicy: unable to admit pod: %v", validationErrs)) } // Validate verifies attributes against the PodSecurityPolicy @@ -162,7 +162,7 @@ func (p *Plugin) Validate(ctx context.Context, a admission.Attributes, o admissi // compute the context. Mutation is not allowed. ValidatedPSPAnnotation is used as a hint to gain same speed-up. allowedPod, pspName, validationErrs, err := p.computeSecurityContext(ctx, a, pod, false, pod.ObjectMeta.Annotations[psputil.ValidatedPSPAnnotation]) if err != nil { - return admission.NewForbidden(a, err) + return admission.NewForbidden(a, fmt.Errorf("PodSecurityPolicy: %w", err)) } if apiequality.Semantic.DeepEqual(pod, allowedPod) { key := auditKeyPrefix + "/" + "validate-policy" @@ -174,7 +174,7 @@ func (p *Plugin) Validate(ctx context.Context, a admission.Attributes, o admissi // we didn't validate against any provider, reject the pod and give the errors for each attempt klog.V(4).Infof("unable to validate pod %s (generate: %s) in namespace %s against any pod security policy: %v", pod.Name, pod.GenerateName, a.GetNamespace(), validationErrs) - return admission.NewForbidden(a, fmt.Errorf("unable to validate against any pod security policy: %v", validationErrs)) + return admission.NewForbidden(a, fmt.Errorf("PodSecurityPolicy: unable to validate pod: %v", validationErrs)) } func shouldIgnore(a admission.Attributes) (bool, error) { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go index 610d39f4251..2b85ddd3f18 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go @@ -216,7 +216,7 @@ func (s *Plugin) Validate(ctx context.Context, a admission.Attributes, o admissi podutil.VisitPodSecretNames(pod, func(name string) bool { hasSecrets = true return false - }) + }, podutil.AllContainers) if hasSecrets { return admission.NewForbidden(a, fmt.Errorf("a mirror pod may not reference secrets")) } @@ -467,9 +467,10 @@ func (s *Plugin) mountServiceAccountToken(serviceAccount *corev1.ServiceAccount, tokenVolumeName = s.generateName(ServiceAccountVolumeName + "-") } else { // Try naming the volume the same as the serviceAccountToken, and uniquify if needed - tokenVolumeName = serviceAccountToken + // Replace dots because volumeMountName can't contain it + tokenVolumeName = strings.Replace(serviceAccountToken, ".", "-", -1) if allVolumeNames.Has(tokenVolumeName) { - tokenVolumeName = s.generateName(fmt.Sprintf("%s-", serviceAccountToken)) + tokenVolumeName = s.generateName(fmt.Sprintf("%s-", tokenVolumeName)) } } } @@ -524,42 +525,7 @@ func (s *Plugin) createVolume(tokenVolumeName, secretName string) api.Volume { return api.Volume{ Name: tokenVolumeName, VolumeSource: api.VolumeSource{ - Projected: &api.ProjectedVolumeSource{ - Sources: []api.VolumeProjection{ - { - ServiceAccountToken: &api.ServiceAccountTokenProjection{ - Path: "token", - ExpirationSeconds: 60 * 60, - }, - }, - { - ConfigMap: &api.ConfigMapProjection{ - LocalObjectReference: api.LocalObjectReference{ - Name: "kube-root-ca.crt", - }, - Items: []api.KeyToPath{ - { - Key: "ca.crt", - Path: "ca.crt", - }, - }, - }, - }, - { - DownwardAPI: &api.DownwardAPIProjection{ - Items: []api.DownwardAPIVolumeFile{ - { - Path: "namespace", - FieldRef: &api.ObjectFieldSelector{ - APIVersion: "v1", - FieldPath: "metadata.namespace", - }, - }, - }, - }, - }, - }, - }, + Projected: TokenVolumeSource(), }, } } @@ -572,3 +538,43 @@ func (s *Plugin) createVolume(tokenVolumeName, secretName string) api.Volume { }, } } + +// TokenVolumeSource returns the projected volume source for service account token. +func TokenVolumeSource() *api.ProjectedVolumeSource { + return &api.ProjectedVolumeSource{ + Sources: []api.VolumeProjection{ + { + ServiceAccountToken: &api.ServiceAccountTokenProjection{ + Path: "token", + ExpirationSeconds: serviceaccount.WarnOnlyBoundTokenExpirationSeconds, + }, + }, + { + ConfigMap: &api.ConfigMapProjection{ + LocalObjectReference: api.LocalObjectReference{ + Name: "kube-root-ca.crt", + }, + Items: []api.KeyToPath{ + { + Key: "ca.crt", + Path: "ca.crt", + }, + }, + }, + }, + { + DownwardAPI: &api.DownwardAPIProjection{ + Items: []api.DownwardAPIVolumeFile{ + { + Path: "namespace", + FieldRef: &api.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "metadata.namespace", + }, + }, + }, + }, + }, + }, + } +} diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/persistentvolume/label/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/persistentvolume/label/BUILD index 86b8a7c9c04..2e8e0b54dd3 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/persistentvolume/label/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/persistentvolume/label/BUILD @@ -24,7 +24,7 @@ go_library( "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/volume:go_default_library", "//staging/src/k8s.io/cloud-provider/volume/helpers:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/persistentvolume/label/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/persistentvolume/label/admission.go index 62fe2b3a5fe..6c5608f25f6 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/persistentvolume/label/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/persistentvolume/label/admission.go @@ -30,7 +30,7 @@ import ( cloudprovider "k8s.io/cloud-provider" cloudvolume "k8s.io/cloud-provider/volume" volumehelpers "k8s.io/cloud-provider/volume/helpers" - "k8s.io/klog" + "k8s.io/klog/v2" api "k8s.io/kubernetes/pkg/apis/core" k8s_api_v1 "k8s.io/kubernetes/pkg/apis/core/v1" persistentvolume "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageclass/setdefault/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageclass/setdefault/BUILD index 7e2c02a979c..e7ec9a9c8cc 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageclass/setdefault/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageclass/setdefault/BUILD @@ -21,7 +21,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/admission/initializer:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/listers/storage/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -38,7 +38,7 @@ go_test( "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/testing:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageclass/setdefault/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageclass/setdefault/admission.go index 8302efb77e1..33f85d4d256 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageclass/setdefault/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageclass/setdefault/admission.go @@ -21,7 +21,7 @@ import ( "fmt" "io" - "k8s.io/klog" + "k8s.io/klog/v2" storagev1 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/api/errors" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageobjectinuseprotection/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageobjectinuseprotection/BUILD index e1eb709df74..1e4f1633a8e 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageobjectinuseprotection/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageobjectinuseprotection/BUILD @@ -12,7 +12,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library", "//staging/src/k8s.io/apiserver/pkg/admission/initializer:go_default_library", "//staging/src/k8s.io/component-base/featuregate:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageobjectinuseprotection/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageobjectinuseprotection/admission.go index 908193d6e5e..a3c6a1e5c4b 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageobjectinuseprotection/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storage/storageobjectinuseprotection/admission.go @@ -23,7 +23,7 @@ import ( "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/admission/initializer" "k8s.io/component-base/featuregate" - "k8s.io/klog" + "k8s.io/klog/v2" api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/features" volumeutil "k8s.io/kubernetes/pkg/volume/util" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap/BUILD index ddec1e72747..262782a571d 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap/BUILD @@ -34,7 +34,7 @@ go_library( "//staging/src/k8s.io/cluster-bootstrap/token/api:go_default_library", "//staging/src/k8s.io/cluster-bootstrap/util/secrets:go_default_library", "//staging/src/k8s.io/cluster-bootstrap/util/tokens:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap/bootstrap.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap/bootstrap.go index bdafe1cc693..4f6f04a2e43 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap/bootstrap.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap/bootstrap.go @@ -25,7 +25,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/BUILD index 44e712e0be5..ae4bdb39455 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/BUILD @@ -52,6 +52,7 @@ go_library( "//staging/src/k8s.io/api/rbac/v1:go_default_library", "//staging/src/k8s.io/api/storage/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/client-go/informers/core/v1:go_default_library", @@ -61,7 +62,7 @@ go_library( "//third_party/forked/gonum/graph:go_default_library", "//third_party/forked/gonum/graph/simple:go_default_library", "//third_party/forked/gonum/graph/traverse:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/graph.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/graph.go index e0076feca65..2e0b95cc145 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/graph.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/graph.go @@ -20,8 +20,10 @@ import ( "sync" corev1 "k8s.io/api/core/v1" + utilfeature "k8s.io/apiserver/pkg/util/feature" pvutil "k8s.io/kubernetes/pkg/api/v1/persistentvolume" podutil "k8s.io/kubernetes/pkg/api/v1/pod" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/third_party/forked/gonum/graph" "k8s.io/kubernetes/third_party/forked/gonum/graph/simple" ) @@ -375,8 +377,14 @@ func (g *Graph) AddPod(pod *corev1.Pod) { }) for _, v := range pod.Spec.Volumes { + claimName := "" if v.PersistentVolumeClaim != nil { - pvcVertex := g.getOrCreateVertex_locked(pvcVertexType, pod.Namespace, v.PersistentVolumeClaim.ClaimName) + claimName = v.PersistentVolumeClaim.ClaimName + } else if v.Ephemeral != nil && utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume) { + claimName = pod.Name + "-" + v.Name + } + if claimName != "" { + pvcVertex := g.getOrCreateVertex_locked(pvcVertexType, pod.Namespace, claimName) e := newDestinationEdge(pvcVertex, podVertex, nodeVertex) g.graph.SetEdge(e) g.addEdgeToDestinationIndex_locked(e) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/graph_populator.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/graph_populator.go index f49aed10982..4f418280829 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/graph_populator.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/graph_populator.go @@ -18,7 +18,7 @@ package node import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/node_authorizer.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/node_authorizer.go index ff7b709d28b..39157c73f6c 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/node_authorizer.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/node/node_authorizer.go @@ -20,10 +20,11 @@ import ( "context" "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" rbacv1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/component-base/featuregate" @@ -58,8 +59,11 @@ type NodeAuthorizer struct { features featuregate.FeatureGate } +var _ = authorizer.Authorizer(&NodeAuthorizer{}) +var _ = authorizer.RuleResolver(&NodeAuthorizer{}) + // NewAuthorizer returns a new node authorizer -func NewAuthorizer(graph *Graph, identifier nodeidentifier.NodeIdentifier, rules []rbacv1.PolicyRule) authorizer.Authorizer { +func NewAuthorizer(graph *Graph, identifier nodeidentifier.NodeIdentifier, rules []rbacv1.PolicyRule) *NodeAuthorizer { return &NodeAuthorizer{ graph: graph, identifier: identifier, @@ -79,6 +83,14 @@ var ( csiNodeResource = storageapi.Resource("csinodes") ) +func (r *NodeAuthorizer) RulesFor(user user.Info, namespace string) ([]authorizer.ResourceRuleInfo, []authorizer.NonResourceRuleInfo, bool, error) { + if _, isNode := r.identifier.NodeIdentity(user); isNode { + // indicate nodes do not have fully enumerated permissions + return nil, nil, true, fmt.Errorf("node authorizer does not support user rule resolution") + } + return nil, nil, false, nil +} + func (r *NodeAuthorizer) Authorize(ctx context.Context, attrs authorizer.Attributes) (authorizer.Decision, string, error) { nodeName, isNode := r.identifier.NodeIdentity(attrs.GetUser()) if !isNode { @@ -139,12 +151,12 @@ func (r *NodeAuthorizer) authorizeStatusUpdate(nodeName string, startingType ver case "update", "patch": // ok default: - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "can only get/update/patch this type", nil } if attrs.GetSubresource() != "status" { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "can only update status subresource", nil } @@ -154,11 +166,11 @@ func (r *NodeAuthorizer) authorizeStatusUpdate(nodeName string, startingType ver // authorizeGet authorizes "get" requests to objects of the specified type if they are related to the specified node func (r *NodeAuthorizer) authorizeGet(nodeName string, startingType vertexType, attrs authorizer.Attributes) (authorizer.Decision, string, error) { if attrs.GetVerb() != "get" { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "can only get individual resources of this type", nil } if len(attrs.GetSubresource()) > 0 { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "cannot get subresource", nil } return r.authorize(nodeName, startingType, attrs) @@ -171,16 +183,16 @@ func (r *NodeAuthorizer) authorizeReadNamespacedObject(nodeName string, starting case "get", "list", "watch": //ok default: - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "can only read resources of this type", nil } if len(attrs.GetSubresource()) > 0 { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "cannot read subresource", nil } if len(attrs.GetNamespace()) == 0 { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "can only read namespaced object of this type", nil } return r.authorize(nodeName, startingType, attrs) @@ -188,18 +200,18 @@ func (r *NodeAuthorizer) authorizeReadNamespacedObject(nodeName string, starting func (r *NodeAuthorizer) authorize(nodeName string, startingType vertexType, attrs authorizer.Attributes) (authorizer.Decision, string, error) { if len(attrs.GetName()) == 0 { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "No Object name found", nil } ok, err := r.hasPathFrom(nodeName, startingType, attrs.GetNamespace(), attrs.GetName()) if err != nil { - klog.V(2).Infof("NODE DENY: %v", err) - return authorizer.DecisionNoOpinion, fmt.Sprintf("no relationship found between node %q and this object", nodeName), nil + klog.V(2).InfoS("NODE DENY", "err", err) + return authorizer.DecisionNoOpinion, fmt.Sprintf("no relationship found between node '%s' and this object", nodeName), nil } if !ok { - klog.V(2).Infof("NODE DENY: %q %#v", nodeName, attrs) - return authorizer.DecisionNoOpinion, fmt.Sprintf("no relationship found between node %q and this object", nodeName), nil + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) + return authorizer.DecisionNoOpinion, fmt.Sprintf("no relationship found between node '%s' and this object", nodeName), nil } return authorizer.DecisionAllow, "", nil } @@ -208,23 +220,23 @@ func (r *NodeAuthorizer) authorize(nodeName string, startingType vertexType, att // subresource of pods running on a node func (r *NodeAuthorizer) authorizeCreateToken(nodeName string, startingType vertexType, attrs authorizer.Attributes) (authorizer.Decision, string, error) { if attrs.GetVerb() != "create" || len(attrs.GetName()) == 0 { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "can only create tokens for individual service accounts", nil } if attrs.GetSubresource() != "token" { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "can only create token subresource of serviceaccount", nil } ok, err := r.hasPathFrom(nodeName, startingType, attrs.GetNamespace(), attrs.GetName()) if err != nil { klog.V(2).Infof("NODE DENY: %v", err) - return authorizer.DecisionNoOpinion, fmt.Sprintf("no relationship found between node %q and this object", nodeName), nil + return authorizer.DecisionNoOpinion, fmt.Sprintf("no relationship found between node '%s' and this object", nodeName), nil } if !ok { - klog.V(2).Infof("NODE DENY: %q %#v", nodeName, attrs) - return authorizer.DecisionNoOpinion, fmt.Sprintf("no relationship found between node %q and this object", nodeName), nil + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) + return authorizer.DecisionNoOpinion, fmt.Sprintf("no relationship found between node '%s' and this object", nodeName), nil } return authorizer.DecisionAllow, "", nil } @@ -237,13 +249,13 @@ func (r *NodeAuthorizer) authorizeLease(nodeName string, attrs authorizer.Attrib case "get", "create", "update", "patch", "delete": //ok default: - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "can only get, create, update, patch, or delete a node lease", nil } // the request must be against the system namespace reserved for node leases if attrs.GetNamespace() != api.NamespaceNodeLease { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, fmt.Sprintf("can only access leases in the %q system namespace", api.NamespaceNodeLease), nil } @@ -251,7 +263,7 @@ func (r *NodeAuthorizer) authorizeLease(nodeName string, attrs authorizer.Attrib // note we skip this check for create, since the authorizer doesn't know the name on create // the noderestriction admission plugin is capable of performing this check at create time if verb != "create" && attrs.GetName() != nodeName { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "can only access node lease with the same name as the requesting node", nil } @@ -266,12 +278,12 @@ func (r *NodeAuthorizer) authorizeCSINode(nodeName string, attrs authorizer.Attr case "get", "create", "update", "patch", "delete": //ok default: - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "can only get, create, update, patch, or delete a CSINode", nil } if len(attrs.GetSubresource()) > 0 { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "cannot authorize CSINode subresources", nil } @@ -279,7 +291,7 @@ func (r *NodeAuthorizer) authorizeCSINode(nodeName string, attrs authorizer.Attr // note we skip this check for create, since the authorizer doesn't know the name on create // the noderestriction admission plugin is capable of performing this check at create time if verb != "create" && attrs.GetName() != nodeName { - klog.V(2).Infof("NODE DENY: %s %#v", nodeName, attrs) + klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) return authorizer.DecisionNoOpinion, "can only access CSINode with the same name as the requesting node", nil } @@ -293,12 +305,12 @@ func (r *NodeAuthorizer) hasPathFrom(nodeName string, startingType vertexType, s nodeVertex, exists := r.graph.getVertex_rlocked(nodeVertexType, "", nodeName) if !exists { - return false, fmt.Errorf("unknown node %q cannot get %s %s/%s", nodeName, vertexTypes[startingType], startingNamespace, startingName) + return false, fmt.Errorf("unknown node '%s' cannot get %s %s/%s", nodeName, vertexTypes[startingType], startingNamespace, startingName) } startingVertex, exists := r.graph.getVertex_rlocked(startingType, startingNamespace, startingName) if !exists { - return false, fmt.Errorf("node %q cannot get unknown %s %s/%s", nodeName, vertexTypes[startingType], startingNamespace, startingName) + return false, fmt.Errorf("node '%s' cannot get unknown %s %s/%s", nodeName, vertexTypes[startingType], startingNamespace, startingName) } // Fast check to see if we know of a destination edge @@ -330,7 +342,7 @@ func (r *NodeAuthorizer) hasPathFrom(nodeName string, startingType vertexType, s return found }) if !found { - return false, fmt.Errorf("node %q cannot get %s %s/%s, no relationship to this object was found in the node authorizer graph", nodeName, vertexTypes[startingType], startingNamespace, startingName) + return false, fmt.Errorf("node '%s' cannot get %s %s/%s, no relationship to this object was found in the node authorizer graph", nodeName, vertexTypes[startingType], startingNamespace, startingName) } return true, nil } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/BUILD index 772cc13ae34..ac153ef428c 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/BUILD @@ -22,7 +22,7 @@ go_library( "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", "//staging/src/k8s.io/client-go/listers/rbac/v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD index 97b595f1ab7..ca943f5e9c4 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD @@ -22,9 +22,10 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount:go_default_library", "//staging/src/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go index 6a937800fe8..f11a0412223 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go @@ -19,7 +19,7 @@ package bootstrappolicy import ( "strings" - "k8s.io/klog" + "k8s.io/klog/v2" capi "k8s.io/api/certificates/v1beta1" rbacv1 "k8s.io/api/rbac/v1" @@ -160,6 +160,22 @@ func buildControllerRoles() ([]rbacv1.ClusterRole, []rbacv1.ClusterRoleBinding) eventsRule(), }, }) + + addControllerRole(&controllerRoles, &controllerRoleBindings, rbacv1.ClusterRole{ + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "endpointslicemirroring-controller"}, + Rules: []rbacv1.PolicyRule{ + rbacv1helpers.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("services", "endpoints").RuleOrDie(), + // The controller needs to be able to set a service's finalizers to be able to create an EndpointSlice + // resource that is owned by the service and sets blockOwnerDeletion=true in its ownerRef. + rbacv1helpers.NewRule("update").Groups(legacyGroup).Resources("services/finalizers").RuleOrDie(), + // The controller needs to be able to set a service's finalizers to be able to create an EndpointSlice + // resource that is owned by the endpoint and sets blockOwnerDeletion=true in its ownerRef. + // see https://github.com/openshift/kubernetes/blob/8691466059314c3f7d6dcffcbb76d14596ca716c/pkg/controller/endpointslicemirroring/utils.go#L87-L88 + rbacv1helpers.NewRule("update").Groups(legacyGroup).Resources("endpoints/finalizers").RuleOrDie(), + rbacv1helpers.NewRule("get", "list", "create", "update", "delete").Groups(discoveryGroup).Resources("endpointslices").RuleOrDie(), + eventsRule(), + }, + }) } if utilfeature.DefaultFeatureGate.Enabled(features.ExpandPersistentVolumes) { @@ -178,6 +194,17 @@ func buildControllerRoles() ([]rbacv1.ClusterRole, []rbacv1.ClusterRoleBinding) }) } + if utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume) { + addControllerRole(&controllerRoles, &controllerRoleBindings, rbacv1.ClusterRole{ + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "ephemeral-volume-controller"}, + Rules: []rbacv1.PolicyRule{ + rbacv1helpers.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("pods").RuleOrDie(), + rbacv1helpers.NewRule("get", "list", "watch", "create").Groups(legacyGroup).Resources("persistentvolumeclaims").RuleOrDie(), + eventsRule(), + }, + }) + } + addControllerRole(&controllerRoles, &controllerRoleBindings, rbacv1.ClusterRole{ ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "generic-garbage-collector"}, Rules: []rbacv1.PolicyRule{ diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/namespace_policy.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/namespace_policy.go index 1fbacefa24a..745b498ad7d 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/namespace_policy.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/namespace_policy.go @@ -19,7 +19,7 @@ package bootstrappolicy import ( "strings" - "k8s.io/klog" + "k8s.io/klog/v2" rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go index eb0ed61003b..c3624119d2e 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go @@ -22,6 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/apiserver/pkg/authentication/user" utilfeature "k8s.io/apiserver/pkg/util/feature" rbacv1helpers "k8s.io/kubernetes/pkg/apis/rbac/v1" @@ -486,8 +487,6 @@ func ClusterRoles() []rbacv1.ClusterRole { if utilfeature.DefaultFeatureGate.Enabled(features.ServiceAccountIssuerDiscovery) { // Add the cluster role for reading the ServiceAccountIssuerDiscovery endpoints - // but do not bind it explicitly. Leave the decision of who can read it up - // to cluster admins. roles = append(roles, rbacv1.ClusterRole{ ObjectMeta: metav1.ObjectMeta{Name: "system:service-account-issuer-discovery"}, Rules: []rbacv1.PolicyRule{ @@ -542,6 +541,12 @@ func ClusterRoles() []rbacv1.ClusterRole { // Needed for volume limits rbacv1helpers.NewRule(Read...).Groups(storageGroup).Resources("csinodes").RuleOrDie(), } + if utilfeature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity) { + kubeSchedulerRules = append(kubeSchedulerRules, + rbacv1helpers.NewRule(Read...).Groups(storageGroup).Resources("csidrivers").RuleOrDie(), + rbacv1helpers.NewRule(Read...).Groups(storageGroup).Resources("csistoragecapacities").RuleOrDie(), + ) + } roles = append(roles, rbacv1.ClusterRole{ // a role to use for the kube-scheduler ObjectMeta: metav1.ObjectMeta{Name: "system:kube-scheduler"}, @@ -575,6 +580,20 @@ func ClusterRoleBindings() []rbacv1.ClusterRoleBinding { }, } + if utilfeature.DefaultFeatureGate.Enabled(features.ServiceAccountIssuerDiscovery) { + // Allow all in-cluster workloads (via their service accounts) to read the OIDC discovery endpoints. + // Users with certain forms of write access (create pods, create secrets, create service accounts, etc) + // can gain access to a service account identity which would allow them to access this information. + // This includes the issuer URL, which is already present in the SA token JWT. Similarly, SAs can + // already gain this same info via introspection of their own token. Since this discovery endpoint + // points to what issued all service account tokens, it seems fitting for SAs to have this access. + // Defer to the cluster admin with regard to binding directly to all authenticated and/or + // unauthenticated users. + rolebindings = append(rolebindings, + rbacv1helpers.NewClusterBinding("system:service-account-issuer-discovery").Groups(serviceaccount.AllServiceAccountsGroup).BindingOrDie(), + ) + } + addClusterRoleBindingLabel(rolebindings) return rolebindings diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/rbac.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/rbac.go index 69e8a2f19d3..4f25d137263 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/rbac.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/rbac.go @@ -22,7 +22,7 @@ import ( "context" "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" rbacv1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/labels" @@ -82,7 +82,7 @@ func (r *RBACAuthorizer) Authorize(ctx context.Context, requestAttributes author // Build a detailed log of the denial. // Make the whole block conditional so we don't do a lot of string-building we won't use. - if klog.V(5) { + if klog.V(5).Enabled() { var operation string if requestAttributes.IsResourceRequest() { b := &bytes.Buffer{} @@ -116,7 +116,7 @@ func (r *RBACAuthorizer) Authorize(ctx context.Context, requestAttributes author scope = "cluster-wide" } - klog.Infof("RBAC DENY: user %q groups %q cannot %s %s", requestAttributes.GetUser().GetName(), requestAttributes.GetUser().GetGroups(), operation, scope) + klog.Infof("RBAC: no rules authorize user %q with groups %q to %s %s", requestAttributes.GetUser().GetName(), requestAttributes.GetUser().GetGroups(), operation, scope) } reason := "" diff --git a/vendor/k8s.io/kubernetes/third_party/forked/ipvs/BUILD b/vendor/k8s.io/kubernetes/third_party/forked/ipvs/BUILD deleted file mode 100644 index e5c57650351..00000000000 --- a/vendor/k8s.io/kubernetes/third_party/forked/ipvs/BUILD +++ /dev/null @@ -1,49 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -licenses(["notice"]) - -go_library( - name = "go_default_library", - srcs = [ - "constants.go", - "ipvs.go", - "netlink.go", - ], - importpath = "k8s.io/kubernetes/third_party/forked/ipvs", - visibility = ["//visibility:public"], - deps = select({ - "@io_bazel_rules_go//go/platform:android": [ - "//vendor/github.com/sirupsen/logrus:go_default_library", - "//vendor/github.com/vishvananda/netlink/nl:go_default_library", - "//vendor/github.com/vishvananda/netns:go_default_library", - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:linux": [ - "//vendor/github.com/sirupsen/logrus:go_default_library", - "//vendor/github.com/vishvananda/netlink/nl:go_default_library", - "//vendor/github.com/vishvananda/netns:go_default_library", - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "//conditions:default": [], - }), -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - srcs = ["netlink_test.go"], - embed = [":go_default_library"], -) diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/BUILD b/vendor/k8s.io/legacy-cloud-providers/aws/BUILD index 0a4b5b69107..47d1f0ff5a7 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/aws/BUILD @@ -67,7 +67,7 @@ go_library( "//vendor/github.com/aws/aws-sdk-go/service/kms:go_default_library", "//vendor/github.com/aws/aws-sdk-go/service/sts:go_default_library", "//vendor/gopkg.in/gcfg.v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -86,13 +86,16 @@ go_test( "//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/cloud-provider/volume:go_default_library", "//vendor/github.com/aws/aws-sdk-go/aws:go_default_library", + "//vendor/github.com/aws/aws-sdk-go/aws/awserr:go_default_library", "//vendor/github.com/aws/aws-sdk-go/service/ec2:go_default_library", "//vendor/github.com/aws/aws-sdk-go/service/elb:go_default_library", + "//vendor/github.com/aws/aws-sdk-go/service/elbv2:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/mock:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/OWNERS b/vendor/k8s.io/legacy-cloud-providers/aws/OWNERS index 4ea2cf34336..091c62914c3 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/OWNERS +++ b/vendor/k8s.io/legacy-cloud-providers/aws/OWNERS @@ -2,18 +2,18 @@ approvers: - justinsb -- zmerlynn - gnufied - jsafrane - micahhausler -- mcrute - m00nf1sh reviewers: - gnufied - jsafrane - justinsb -- zmerlynn - chrislovecnm - nckturner - micahhausler - m00nf1sh +emeritus_approvers: +- zmerlynn +- mcrute diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/aws.go b/vendor/k8s.io/legacy-cloud-providers/aws/aws.go index 4a3b2307ee1..6aeaaa7e09c 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/aws.go +++ b/vendor/k8s.io/legacy-cloud-providers/aws/aws.go @@ -49,7 +49,7 @@ import ( "github.com/aws/aws-sdk-go/service/sts" "gopkg.in/gcfg.v1" v1 "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -211,6 +211,12 @@ const ServiceAnnotationLoadBalancerHCInterval = "service.beta.kubernetes.io/aws- // static IP addresses for the NLB. Only supported on elbv2 (NLB) const ServiceAnnotationLoadBalancerEIPAllocations = "service.beta.kubernetes.io/aws-load-balancer-eip-allocations" +// ServiceAnnotationLoadBalancerTargetNodeLabels is the annotation used on the service +// to specify a comma-separated list of key-value pairs which will be used to select +// the target nodes for the load balancer +// For example: "Key1=Val1,Key2=Val2,KeyNoVal1=,KeyNoVal2" +const ServiceAnnotationLoadBalancerTargetNodeLabels = "service.beta.kubernetes.io/aws-load-balancer-target-node-labels" + // Event key when a volume is stuck on attaching state when being attached to a volume const volumeAttachmentStuck = "VolumeAttachmentStuck" @@ -251,6 +257,14 @@ const ( filterNodeLimit = 150 ) +const ( + // represents expected attachment status of a volume after attach + volumeAttachedStatus = "attached" + + // represents expected attachment status of a volume after detach + volumeDetachedStatus = "detached" +) + // awsTagNameMasterRoles is a set of well-known AWS tag names that indicate the instance is a master // The major consequence is that it is then not considered for AWS zone discovery for dynamic volume creation. var awsTagNameMasterRoles = sets.NewString("kubernetes.io/role/master", "k8s.io/role/master") @@ -1363,7 +1377,7 @@ func (c *Cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, c.clientBuilder = clientBuilder c.kubeClient = clientBuilder.ClientOrDie("aws-cloud-provider") c.eventBroadcaster = record.NewBroadcaster() - c.eventBroadcaster.StartLogging(klog.Infof) + c.eventBroadcaster.StartStructuredLogging(0) c.eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: c.kubeClient.CoreV1().Events("")}) c.eventRecorder = c.eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "aws-cloud-provider"}) } @@ -1388,6 +1402,12 @@ func (c *Cloud) Instances() (cloudprovider.Instances, bool) { return c, true } +// InstancesV2 returns an implementation of InstancesV2 for Amazon Web Services. +// TODO: implement ONLY for external cloud provider +func (c *Cloud) InstancesV2() (cloudprovider.InstancesV2, bool) { + return nil, false +} + // Zones returns an implementation of Zones for Amazon Web Services. func (c *Cloud) Zones() (cloudprovider.Zones, bool) { return c, true @@ -1416,7 +1436,9 @@ func (c *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.No // We want the IPs to end up in order by interface (in particular, we want eth0's // IPs first), but macs isn't necessarily sorted in that order so we have to // explicitly order by device-number (device-number == the "0" in "eth0"). - macIPs := make(map[int]string) + + var macIDs []string + macDevNum := make(map[string]int) for _, macID := range strings.Split(macs, "\n") { if macID == "" { continue @@ -1431,18 +1453,22 @@ func (c *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.No klog.Warningf("Bad device-number %q for interface %s\n", numStr, macID) continue } + macIDs = append(macIDs, macID) + macDevNum[macID] = num + } + + // Sort macIDs by interface device-number + sort.Slice(macIDs, func(i, j int) bool { + return macDevNum[macIDs[i]] < macDevNum[macIDs[j]] + }) + + for _, macID := range macIDs { ipPath := path.Join("network/interfaces/macs/", macID, "local-ipv4s") - macIPs[num], err = c.metadata.GetMetadata(ipPath) + internalIPs, err := c.metadata.GetMetadata(ipPath) if err != nil { return nil, fmt.Errorf("error querying AWS metadata for %q: %q", ipPath, err) } - } - for i := 0; i < len(macIPs); i++ { - internalIPs := macIPs[i] - if internalIPs == "" { - continue - } for _, internalIP := range strings.Split(internalIPs, "\n") { if internalIP == "" { continue @@ -1891,12 +1917,8 @@ func (c *Cloud) getMountDevice( volumeStatus := map[EBSVolumeID]string{} // for better logging of volume status for _, blockDevice := range info.BlockDeviceMappings { name := aws.StringValue(blockDevice.DeviceName) - if strings.HasPrefix(name, "/dev/sd") { - name = name[7:] - } - if strings.HasPrefix(name, "/dev/xvd") { - name = name[8:] - } + name = strings.TrimPrefix(name, "/dev/sd") + name = strings.TrimPrefix(name, "/dev/xvd") if len(name) < 1 || len(name) > 2 { klog.Warningf("Unexpected EBS DeviceName: %q", aws.StringValue(blockDevice.DeviceName)) } @@ -1929,7 +1951,6 @@ func (c *Cloud) getMountDevice( // AWS API returns consistent result next time (i.e. the volume is detached). status := volumeStatus[mappingVolumeID] klog.Warningf("Got assignment call for already-assigned volume: %s@%s, volume status: %s", mountDevice, mappingVolumeID, status) - return mountDevice, false, fmt.Errorf("volume is still being detached from the node") } return mountDevice, true, nil } @@ -2130,7 +2151,7 @@ func (c *Cloud) applyUnSchedulableTaint(nodeName types.NodeName, reason string) // waitForAttachmentStatus polls until the attachment status is the expected value // On success, it returns the last attachment state. -func (d *awsDisk) waitForAttachmentStatus(status string, expectedInstance, expectedDevice string) (*ec2.VolumeAttachment, error) { +func (d *awsDisk) waitForAttachmentStatus(status string, expectedInstance, expectedDevice string, alreadyAttached bool) (*ec2.VolumeAttachment, error) { backoff := wait.Backoff{ Duration: volumeAttachmentStatusPollDelay, Factor: volumeAttachmentStatusFactor, @@ -2155,7 +2176,7 @@ func (d *awsDisk) waitForAttachmentStatus(status string, expectedInstance, expec if err != nil { // The VolumeNotFound error is special -- we don't need to wait for it to repeat if isAWSErrorVolumeNotFound(err) { - if status == "detached" { + if status == volumeDetachedStatus { // The disk doesn't exist, assume it's detached, log warning and stop waiting klog.Warningf("Waiting for volume %q to be detached but the volume does not exist", d.awsID) stateStr := "detached" @@ -2164,7 +2185,7 @@ func (d *awsDisk) waitForAttachmentStatus(status string, expectedInstance, expec } return true, nil } - if status == "attached" { + if status == volumeAttachedStatus { // The disk doesn't exist, complain, give up waiting and report error klog.Warningf("Waiting for volume %q to be attached but the volume does not exist", d.awsID) return false, err @@ -2199,7 +2220,7 @@ func (d *awsDisk) waitForAttachmentStatus(status string, expectedInstance, expec } } if attachmentStatus == "" { - attachmentStatus = "detached" + attachmentStatus = volumeDetachedStatus } if attachment != nil { // AWS eventual consistency can go back in time. @@ -2228,6 +2249,13 @@ func (d *awsDisk) waitForAttachmentStatus(status string, expectedInstance, expec } } + // if we expected volume to be attached and it was reported as already attached via DescribeInstance call + // but DescribeVolume told us volume is detached, we will short-circuit this long wait loop and return error + // so as AttachDisk can be retried without waiting for 20 minutes. + if (status == volumeAttachedStatus) && alreadyAttached && (attachmentStatus != status) { + return false, fmt.Errorf("attachment of disk %q failed, expected device to be attached but was %s", d.name, attachmentStatus) + } + if attachmentStatus == status { // Attachment is in requested state, finish waiting return true, nil @@ -2373,7 +2401,7 @@ func (c *Cloud) AttachDisk(diskName KubernetesVolumeID, nodeName types.NodeName) klog.V(2).Infof("AttachVolume volume=%q instance=%q request returned %v", disk.awsID, awsInstance.awsID, attachResponse) } - attachment, err := disk.waitForAttachmentStatus("attached", awsInstance.awsID, ec2Device) + attachment, err := disk.waitForAttachmentStatus("attached", awsInstance.awsID, ec2Device, alreadyAttached) if err != nil { if err == wait.ErrWaitTimeout { @@ -2451,7 +2479,7 @@ func (c *Cloud) DetachDisk(diskName KubernetesVolumeID, nodeName types.NodeName) return "", errors.New("no response from DetachVolume") } - attachment, err := diskInfo.disk.waitForAttachmentStatus("detached", awsInstance.awsID, "") + attachment, err := diskInfo.disk.waitForAttachmentStatus("detached", awsInstance.awsID, "", false) if err != nil { return "", err } @@ -2826,7 +2854,10 @@ func (c *Cloud) ResizeDisk( return oldSize, descErr } // AWS resizes in chunks of GiB (not GB) - requestGiB := volumehelpers.RoundUpToGiB(newSize) + requestGiB, err := volumehelpers.RoundUpToGiB(newSize) + if err != nil { + return oldSize, err + } newSizeQuant := resource.MustParse(fmt.Sprintf("%dGi", requestGiB)) // If disk already if of greater or equal size than requested we return @@ -3551,7 +3582,7 @@ func (c *Cloud) buildELBSecurityGroupList(serviceName types.NamespacedName, load // Create a security group for the load balancer sgName := "k8s-elb-" + loadBalancerName sgDescription := fmt.Sprintf("Security group for Kubernetes ELB %s (%v)", loadBalancerName, serviceName) - securityGroupID, err = c.ensureSecurityGroup(sgName, sgDescription, getLoadBalancerAdditionalTags(annotations)) + securityGroupID, err = c.ensureSecurityGroup(sgName, sgDescription, getKeyValuePropertiesFromAnnotation(annotations, ServiceAnnotationLoadBalancerAdditionalTags)) if err != nil { klog.Errorf("Error creating load balancer security group: %q", err) return nil, setupSg, err @@ -3567,6 +3598,37 @@ func (c *Cloud) buildELBSecurityGroupList(serviceName types.NamespacedName, load return sgList, setupSg, nil } +// sortELBSecurityGroupList returns a list of sorted securityGroupIDs based on the original order +// from buildELBSecurityGroupList. The logic is: +// * securityGroups specified by ServiceAnnotationLoadBalancerSecurityGroups appears first in order +// * securityGroups specified by ServiceAnnotationLoadBalancerExtraSecurityGroups appears last in order +func (c *Cloud) sortELBSecurityGroupList(securityGroupIDs []string, annotations map[string]string) { + annotatedSGList := getSGListFromAnnotation(annotations[ServiceAnnotationLoadBalancerSecurityGroups]) + annotatedExtraSGList := getSGListFromAnnotation(annotations[ServiceAnnotationLoadBalancerExtraSecurityGroups]) + annotatedSGIndex := make(map[string]int, len(annotatedSGList)) + annotatedExtraSGIndex := make(map[string]int, len(annotatedExtraSGList)) + + for i, sgID := range annotatedSGList { + annotatedSGIndex[sgID] = i + } + for i, sgID := range annotatedExtraSGList { + annotatedExtraSGIndex[sgID] = i + } + sgOrderMapping := make(map[string]int, len(securityGroupIDs)) + for _, sgID := range securityGroupIDs { + if i, ok := annotatedSGIndex[sgID]; ok { + sgOrderMapping[sgID] = i + } else if j, ok := annotatedExtraSGIndex[sgID]; ok { + sgOrderMapping[sgID] = len(annotatedSGIndex) + 1 + j + } else { + sgOrderMapping[sgID] = len(annotatedSGIndex) + } + } + sort.Slice(securityGroupIDs, func(i, j int) bool { + return sgOrderMapping[securityGroupIDs[i]] < sgOrderMapping[securityGroupIDs[j]] + }) +} + // buildListener creates a new listener from the given port, adding an SSL certificate // if indicated by the appropriate annotations. func buildListener(port v1.ServicePort, annotations map[string]string, sslPorts *portSets) (*elb.Listener, error) { @@ -3624,9 +3686,10 @@ func (c *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, apiS sslPorts := getPortSets(annotations[ServiceAnnotationLoadBalancerSSLPorts]) for _, port := range apiService.Spec.Ports { - if port.Protocol != v1.ProtocolTCP { - return nil, fmt.Errorf("Only TCP LoadBalancer is supported for AWS ELB") + if err := checkProtocol(port, annotations); err != nil { + return nil, err } + if port.NodePort == 0 { klog.Errorf("Ignoring port without NodePort defined: %v", port) continue @@ -3646,7 +3709,7 @@ func (c *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, apiS } certificateARN := annotations[ServiceAnnotationLoadBalancerCertificate] - if certificateARN != "" && (sslPorts == nil || sslPorts.numbers.Has(int64(port.Port)) || sslPorts.names.Has(port.Name)) { + if port.Protocol != v1.ProtocolUDP && certificateARN != "" && (sslPorts == nil || sslPorts.numbers.Has(int64(port.Port)) || sslPorts.names.Has(port.Name)) { portMapping.FrontendProtocol = elbv2.ProtocolEnumTls portMapping.SSLCertificateARN = certificateARN portMapping.SSLPolicy = annotations[ServiceAnnotationLoadBalancerSSLNegotiationPolicy] @@ -3657,19 +3720,20 @@ func (c *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, apiS } v2Mappings = append(v2Mappings, portMapping) + } else { + listener, err := buildListener(port, annotations, sslPorts) + if err != nil { + return nil, err + } + listeners = append(listeners, listener) } - listener, err := buildListener(port, annotations, sslPorts) - if err != nil { - return nil, err - } - listeners = append(listeners, listener) } if apiService.Spec.LoadBalancerIP != "" { return nil, fmt.Errorf("LoadBalancerIP cannot be specified for AWS ELB") } - instances, err := c.findInstancesForELB(nodes) + instances, err := c.findInstancesForELB(nodes, annotations) if err != nil { return nil, err } @@ -3979,7 +4043,7 @@ func (c *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, apiS } } - err = c.updateInstanceSecurityGroupsForLoadBalancer(loadBalancer, instances) + err = c.updateInstanceSecurityGroupsForLoadBalancer(loadBalancer, instances, annotations) if err != nil { klog.Warningf("Error opening ingress rules for the load balancer to the instances: %q", err) return nil, err @@ -4137,26 +4201,18 @@ func (c *Cloud) getTaggedSecurityGroups() (map[string]*ec2.SecurityGroup, error) // Open security group ingress rules on the instances so that the load balancer can talk to them // Will also remove any security groups ingress rules for the load balancer that are _not_ needed for allInstances -func (c *Cloud) updateInstanceSecurityGroupsForLoadBalancer(lb *elb.LoadBalancerDescription, instances map[InstanceID]*ec2.Instance) error { +func (c *Cloud) updateInstanceSecurityGroupsForLoadBalancer(lb *elb.LoadBalancerDescription, instances map[InstanceID]*ec2.Instance, annotations map[string]string) error { if c.cfg.Global.DisableSecurityGroupIngress { return nil } // Determine the load balancer security group id - loadBalancerSecurityGroupID := "" - for _, securityGroup := range lb.SecurityGroups { - if aws.StringValue(securityGroup) == "" { - continue - } - if loadBalancerSecurityGroupID != "" { - // We create LBs with one SG - klog.Warningf("Multiple security groups for load balancer: %q", aws.StringValue(lb.LoadBalancerName)) - } - loadBalancerSecurityGroupID = *securityGroup - } - if loadBalancerSecurityGroupID == "" { + lbSecurityGroupIDs := aws.StringValueSlice(lb.SecurityGroups) + if len(lbSecurityGroupIDs) == 0 { return fmt.Errorf("could not determine security group for load balancer: %s", aws.StringValue(lb.LoadBalancerName)) } + c.sortELBSecurityGroupList(lbSecurityGroupIDs, annotations) + loadBalancerSecurityGroupID := lbSecurityGroupIDs[0] // Get the actual list of groups that allow ingress from the load-balancer var actualGroups []*ec2.SecurityGroup @@ -4332,7 +4388,7 @@ func (c *Cloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName strin { // De-authorize the load balancer security group from the instances security group - err = c.updateInstanceSecurityGroupsForLoadBalancer(lb, nil) + err = c.updateInstanceSecurityGroupsForLoadBalancer(lb, nil, service.Annotations) if err != nil { klog.Errorf("Error deregistering load balancer from instance security groups: %q", err) return err @@ -4453,7 +4509,7 @@ func (c *Cloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName strin // UpdateLoadBalancer implements LoadBalancer.UpdateLoadBalancer func (c *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error { - instances, err := c.findInstancesForELB(nodes) + instances, err := c.findInstancesForELB(nodes, service.Annotations) if err != nil { return err } @@ -4497,7 +4553,7 @@ func (c *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, serv return nil } - err = c.updateInstanceSecurityGroupsForLoadBalancer(lb, instances) + err = c.updateInstanceSecurityGroupsForLoadBalancer(lb, instances, service.Annotations) if err != nil { return err } @@ -4703,6 +4759,18 @@ func (c *Cloud) nodeNameToProviderID(nodeName types.NodeName) (InstanceID, error return KubernetesInstanceID(node.Spec.ProviderID).MapToAWSInstanceID() } +func checkProtocol(port v1.ServicePort, annotations map[string]string) error { + // nlb supports tcp, udp + if isNLB(annotations) && (port.Protocol == v1.ProtocolTCP || port.Protocol == v1.ProtocolUDP) { + return nil + } + // elb only supports tcp + if !isNLB(annotations) && port.Protocol == v1.ProtocolTCP { + return nil + } + return fmt.Errorf("Protocol %s not supported by LoadBalancer", port.Protocol) +} + func setNodeDisk( nodeDiskMap map[types.NodeName]map[KubernetesVolumeID]bool, volumeID KubernetesVolumeID, @@ -4719,7 +4787,7 @@ func setNodeDisk( } func getInitialAttachDetachDelay(status string) time.Duration { - if status == "detached" { + if status == volumeDetachedStatus { return volumeDetachmentStatusInitialDelay } return volumeAttachmentStatusInitialDelay diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/aws_fakes.go b/vendor/k8s.io/legacy-cloud-providers/aws/aws_fakes.go index 17383e52b6b..0113c55554f 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/aws_fakes.go +++ b/vendor/k8s.io/legacy-cloud-providers/aws/aws_fakes.go @@ -29,7 +29,7 @@ import ( "github.com/aws/aws-sdk-go/service/elb" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/aws/aws-sdk-go/service/kms" - "k8s.io/klog" + "k8s.io/klog/v2" ) // FakeAWSServices is an fake AWS session used for testing @@ -358,7 +358,12 @@ func (m *FakeMetadata) GetMetadata(key string) (string, error) { if len(keySplit) == 5 && keySplit[4] == "device-number" { for i, macElem := range m.aws.networkInterfacesMacs { if macParam == macElem { - return fmt.Sprintf("%d\n", i), nil + n := i + if n > 0 { + // Introduce an artificial gap, just to test eg: [eth0, eth2] + n++ + } + return fmt.Sprintf("%d\n", n), nil } } } diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/aws_instancegroups.go b/vendor/k8s.io/legacy-cloud-providers/aws/aws_instancegroups.go index c97c96ed6f0..7315776cbc6 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/aws_instancegroups.go +++ b/vendor/k8s.io/legacy-cloud-providers/aws/aws_instancegroups.go @@ -23,7 +23,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/autoscaling" - "k8s.io/klog" + "k8s.io/klog/v2" ) // AWSCloud implements InstanceGroups @@ -35,8 +35,7 @@ var _ InstanceGroups = &Cloud{} func ResizeInstanceGroup(asg ASG, instanceGroupName string, size int) error { request := &autoscaling.UpdateAutoScalingGroupInput{ AutoScalingGroupName: aws.String(instanceGroupName), - MinSize: aws.Int64(int64(size)), - MaxSize: aws.Int64(int64(size)), + DesiredCapacity: aws.Int64(int64(size)), } if _, err := asg.UpdateAutoScalingGroup(request); err != nil { return fmt.Errorf("error resizing AWS autoscaling group: %q", err) diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer.go b/vendor/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer.go index 9021b64e138..2b90906572e 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer.go +++ b/vendor/k8s.io/legacy-cloud-providers/aws/aws_loadbalancer.go @@ -32,7 +32,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elb" "github.com/aws/aws-sdk-go/service/elbv2" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" @@ -84,12 +84,11 @@ type nlbPortMapping struct { SSLPolicy string } -// getLoadBalancerAdditionalTags converts the comma separated list of key-value -// pairs in the ServiceAnnotationLoadBalancerAdditionalTags annotation and returns -// it as a map. -func getLoadBalancerAdditionalTags(annotations map[string]string) map[string]string { +// getKeyValuePropertiesFromAnnotation converts the comma separated list of key-value +// pairs from the specified annotation and returns it as a map. +func getKeyValuePropertiesFromAnnotation(annotations map[string]string, annotation string) map[string]string { additionalTags := make(map[string]string) - if additionalTagsList, ok := annotations[ServiceAnnotationLoadBalancerAdditionalTags]; ok { + if additionalTagsList, ok := annotations[annotation]; ok { additionalTagsList = strings.TrimSpace(additionalTagsList) // Break up list of "Key1=Val,Key2=Val2" @@ -123,7 +122,7 @@ func (c *Cloud) ensureLoadBalancerv2(namespacedName types.NamespacedName, loadBa dirty := false // Get additional tags set by the user - tags := getLoadBalancerAdditionalTags(annotations) + tags := getKeyValuePropertiesFromAnnotation(annotations, ServiceAnnotationLoadBalancerAdditionalTags) // Add default tags tags[TagNameKubernetesService] = namespacedName.String() tags = c.tagging.buildTags(ResourceLifecycleOwned, tags) @@ -186,9 +185,12 @@ func (c *Cloud) ensureLoadBalancerv2(namespacedName types.NamespacedName, loadBa } // actual maps FrontendPort to an elbv2.Listener - actual := map[int64]*elbv2.Listener{} + actual := map[int64]map[string]*elbv2.Listener{} for _, listener := range listenerDescriptions.Listeners { - actual[*listener.Port] = listener + if actual[*listener.Port] == nil { + actual[*listener.Port] = map[string]*elbv2.Listener{} + } + actual[*listener.Port][*listener.Protocol] = listener } actualTargetGroups, err := c.elbv2.DescribeTargetGroups( @@ -208,10 +210,11 @@ func (c *Cloud) ensureLoadBalancerv2(namespacedName types.NamespacedName, loadBa // Handle additions/modifications for _, mapping := range mappings { frontendPort := mapping.FrontendPort + frontendProtocol := mapping.FrontendProtocol nodePort := mapping.TrafficPort // modifications - if listener, ok := actual[frontendPort]; ok { + if listener, ok := actual[frontendPort][frontendProtocol]; ok { listenerNeedsModification := false if aws.StringValue(listener.Protocol) != mapping.FrontendProtocol { @@ -316,23 +319,27 @@ func (c *Cloud) ensureLoadBalancerv2(namespacedName types.NamespacedName, loadBa dirty = true } - frontEndPorts := map[int64]bool{} + frontEndPorts := map[int64]map[string]bool{} for i := range mappings { - frontEndPorts[mappings[i].FrontendPort] = true + if frontEndPorts[mappings[i].FrontendPort] == nil { + frontEndPorts[mappings[i].FrontendPort] = map[string]bool{} + } + frontEndPorts[mappings[i].FrontendPort][mappings[i].FrontendProtocol] = true } // handle deletions - for port, listener := range actual { - if _, ok := frontEndPorts[port]; !ok { - err := c.deleteListenerV2(listener) - if err != nil { - return nil, err + for port := range actual { + for protocol := range actual[port] { + if _, ok := frontEndPorts[port][protocol]; !ok { + err := c.deleteListenerV2(actual[port][protocol]) + if err != nil { + return nil, err + } + dirty = true } - dirty = true } } } - if err := c.reconcileLBAttributes(aws.StringValue(loadBalancer.LoadBalancerArn), annotations); err != nil { return nil, err } @@ -452,13 +459,14 @@ var invalidELBV2NameRegex = regexp.MustCompile("[^[:alnum:]]") // buildTargetGroupName will build unique name for targetGroup of service & port. // the name is in format k8s-{namespace:8}-{name:8}-{uuid:10} (chosen to benefit most common use cases). -// Note: targetProtocol & targetType are included since they cannot be modified on existing targetGroup. -func (c *Cloud) buildTargetGroupName(serviceName types.NamespacedName, servicePort int64, targetProtocol string, targetType string) string { +// Note: nodePort & targetProtocol & targetType are included since they cannot be modified on existing targetGroup. +func (c *Cloud) buildTargetGroupName(serviceName types.NamespacedName, servicePort int64, nodePort int64, targetProtocol string, targetType string) string { hasher := sha1.New() _, _ = hasher.Write([]byte(c.tagging.clusterID())) _, _ = hasher.Write([]byte(serviceName.Namespace)) _, _ = hasher.Write([]byte(serviceName.Name)) _, _ = hasher.Write([]byte(strconv.FormatInt(servicePort, 10))) + _, _ = hasher.Write([]byte(strconv.FormatInt(nodePort, 10))) _, _ = hasher.Write([]byte(targetProtocol)) _, _ = hasher.Write([]byte(targetType)) tgUUID := hex.EncodeToString(hasher.Sum(nil)) @@ -527,7 +535,7 @@ func (c *Cloud) ensureTargetGroup(targetGroup *elbv2.TargetGroup, serviceName ty dirty := false if targetGroup == nil { targetType := "instance" - name := c.buildTargetGroupName(serviceName, mapping.FrontendPort, mapping.TrafficProtocol, targetType) + name := c.buildTargetGroupName(serviceName, mapping.FrontendPort, mapping.TrafficPort, mapping.TrafficProtocol, targetType) klog.Infof("Creating load balancer target group for %v with name: %s", serviceName, name) input := &elbv2.CreateTargetGroupInput{ VpcId: aws.String(vpcID), @@ -608,7 +616,9 @@ func (c *Cloud) ensureTargetGroup(targetGroup *elbv2.TargetGroup, serviceName ty } actualIDs := []string{} for _, healthDescription := range healthResponse.TargetHealthDescriptions { - if healthDescription.TargetHealth.Reason != nil { + if aws.StringValue(healthDescription.TargetHealth.State) == elbv2.TargetHealthStateEnumHealthy { + actualIDs = append(actualIDs, *healthDescription.Target.Id) + } else if healthDescription.TargetHealth.Reason != nil { switch aws.StringValue(healthDescription.TargetHealth.Reason) { case elbv2.TargetHealthReasonEnumTargetDeregistrationInProgress: // We don't need to count this instance in service if it is @@ -719,6 +729,9 @@ func (c *Cloud) getVpcCidrBlocks() ([]string, error) { cidrBlocks := make([]string, 0, len(vpcs.Vpcs[0].CidrBlockAssociationSet)) for _, cidr := range vpcs.Vpcs[0].CidrBlockAssociationSet { + if aws.StringValue(cidr.CidrBlockState.State) != ec2.VpcCidrBlockStateCodeAssociated { + continue + } cidrBlocks = append(cidrBlocks, aws.StringValue(cidr.CidrBlock)) } return cidrBlocks, nil @@ -763,10 +776,14 @@ func (c *Cloud) updateInstanceSecurityGroupsForNLB(lbName string, instances map[ { clientPorts := sets.Int64{} + clientProtocol := "tcp" healthCheckPorts := sets.Int64{} for _, port := range portMappings { clientPorts.Insert(port.TrafficPort) healthCheckPorts.Insert(port.HealthCheckPort) + if port.TrafficProtocol == string(v1.ProtocolUDP) { + clientProtocol = "udp" + } } clientRuleAnnotation := fmt.Sprintf("%s=%s", NLBClientRuleDescription, lbName) healthRuleAnnotation := fmt.Sprintf("%s=%s", NLBHealthCheckRuleDescription, lbName) @@ -780,14 +797,14 @@ func (c *Cloud) updateInstanceSecurityGroupsForNLB(lbName string, instances map[ if err := c.updateInstanceSecurityGroupForNLBTraffic(sgID, sgPerms, healthRuleAnnotation, "tcp", healthCheckPorts, vpcCIDRs); err != nil { return err } - if err := c.updateInstanceSecurityGroupForNLBTraffic(sgID, sgPerms, clientRuleAnnotation, "tcp", clientPorts, clientCIDRs); err != nil { + if err := c.updateInstanceSecurityGroupForNLBTraffic(sgID, sgPerms, clientRuleAnnotation, clientProtocol, clientPorts, clientCIDRs); err != nil { return err } } else { if err := c.updateInstanceSecurityGroupForNLBTraffic(sgID, sgPerms, healthRuleAnnotation, "tcp", nil, nil); err != nil { return err } - if err := c.updateInstanceSecurityGroupForNLBTraffic(sgID, sgPerms, clientRuleAnnotation, "tcp", nil, nil); err != nil { + if err := c.updateInstanceSecurityGroupForNLBTraffic(sgID, sgPerms, clientRuleAnnotation, clientProtocol, nil, nil); err != nil { return err } } @@ -936,7 +953,7 @@ func (c *Cloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadBala } // Get additional tags set by the user - tags := getLoadBalancerAdditionalTags(annotations) + tags := getKeyValuePropertiesFromAnnotation(annotations, ServiceAnnotationLoadBalancerAdditionalTags) // Add default tags tags[TagNameKubernetesService] = namespacedName.String() @@ -1125,7 +1142,7 @@ func (c *Cloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadBala { // Add additional tags klog.V(2).Infof("Creating additional load balancer tags for %s", loadBalancerName) - tags := getLoadBalancerAdditionalTags(annotations) + tags := getKeyValuePropertiesFromAnnotation(annotations, ServiceAnnotationLoadBalancerAdditionalTags) if len(tags) > 0 { err := c.addLoadBalancerTags(loadBalancerName, tags) if err != nil { @@ -1518,9 +1535,12 @@ func proxyProtocolEnabled(backend *elb.BackendServerDescription) bool { // findInstancesForELB gets the EC2 instances corresponding to the Nodes, for setting up an ELB // We ignore Nodes (with a log message) where the instanceid cannot be determined from the provider, // and we ignore instances which are not found -func (c *Cloud) findInstancesForELB(nodes []*v1.Node) (map[InstanceID]*ec2.Instance, error) { +func (c *Cloud) findInstancesForELB(nodes []*v1.Node, annotations map[string]string) (map[InstanceID]*ec2.Instance, error) { + + targetNodes := filterTargetNodes(nodes, annotations) + // Map to instance ids ignoring Nodes where we cannot find the id (but logging) - instanceIDs := mapToAWSInstanceIDsTolerant(nodes) + instanceIDs := mapToAWSInstanceIDsTolerant(targetNodes) cacheCriteria := cacheCriteria{ // MaxAge not required, because we only care about security groups, which should not change @@ -1536,3 +1556,35 @@ func (c *Cloud) findInstancesForELB(nodes []*v1.Node) (map[InstanceID]*ec2.Insta return instances, nil } + +// filterTargetNodes uses node labels to filter the nodes that should be targeted by the ELB, +// checking if all the labels provided in an annotation are present in the nodes +func filterTargetNodes(nodes []*v1.Node, annotations map[string]string) []*v1.Node { + + targetNodeLabels := getKeyValuePropertiesFromAnnotation(annotations, ServiceAnnotationLoadBalancerTargetNodeLabels) + + if len(targetNodeLabels) == 0 { + return nodes + } + + targetNodes := make([]*v1.Node, 0, len(nodes)) + + for _, node := range nodes { + if node.Labels != nil && len(node.Labels) > 0 { + allFiltersMatch := true + + for targetLabelKey, targetLabelValue := range targetNodeLabels { + if nodeLabelValue, ok := node.Labels[targetLabelKey]; !ok || (nodeLabelValue != targetLabelValue && targetLabelValue != "") { + allFiltersMatch = false + break + } + } + + if allFiltersMatch { + targetNodes = append(targetNodes, node) + } + } + } + + return targetNodes +} diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/aws_routes.go b/vendor/k8s.io/legacy-cloud-providers/aws/aws_routes.go index 3c37a12928d..ed6e276cb22 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/aws_routes.go +++ b/vendor/k8s.io/legacy-cloud-providers/aws/aws_routes.go @@ -24,7 +24,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "k8s.io/klog" + "k8s.io/klog/v2" cloudprovider "k8s.io/cloud-provider" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/instances.go b/vendor/k8s.io/legacy-cloud-providers/aws/instances.go index 53f2939d7cd..a62e7ccf395 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/instances.go +++ b/vendor/k8s.io/legacy-cloud-providers/aws/instances.go @@ -28,7 +28,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/api/core/v1" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/log_handler.go b/vendor/k8s.io/legacy-cloud-providers/aws/log_handler.go index 15c13e11e3e..a66d9a95f3e 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/log_handler.go +++ b/vendor/k8s.io/legacy-cloud-providers/aws/log_handler.go @@ -20,7 +20,7 @@ package aws import ( "github.com/aws/aws-sdk-go/aws/request" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Handler for aws-sdk-go that logs all requests diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/retry_handler.go b/vendor/k8s.io/legacy-cloud-providers/aws/retry_handler.go index ddb1d0061b3..58b0d68a741 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/retry_handler.go +++ b/vendor/k8s.io/legacy-cloud-providers/aws/retry_handler.go @@ -26,7 +26,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/tags.go b/vendor/k8s.io/legacy-cloud-providers/aws/tags.go index b5509c042f2..9ec0cf67e2f 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/tags.go +++ b/vendor/k8s.io/legacy-cloud-providers/aws/tags.go @@ -24,7 +24,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/wait" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/aws/volumes.go b/vendor/k8s.io/legacy-cloud-providers/aws/volumes.go index 099a377a2fa..d94348646c6 100644 --- a/vendor/k8s.io/legacy-cloud-providers/aws/volumes.go +++ b/vendor/k8s.io/legacy-cloud-providers/aws/volumes.go @@ -24,7 +24,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" csimigration "k8s.io/csi-translation-lib/plugins" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/types" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/BUILD index 7426cf9da39..5f1287be000 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/BUILD @@ -63,25 +63,36 @@ go_library( "//staging/src/k8s.io/legacy-cloud-providers/azure/auth:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/cache:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/diskclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/fileclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/publicipclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/routeclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/routeclient/mockrouteclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/routetableclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/mockroutetableclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/subnetclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/mocksubnetclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmssclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/storage:go_default_library", @@ -91,7 +102,7 @@ go_library( "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/golang/mock/gomock:go_default_library", "//vendor/github.com/rubiojr/go-vhd/vhd:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", ], @@ -100,11 +111,15 @@ go_library( go_test( name = "go_default_test", srcs = [ + "azure_backoff_test.go", + "azure_blobDiskController_test.go", "azure_config_test.go", "azure_controller_common_test.go", "azure_controller_standard_test.go", + "azure_controller_vmss_test.go", "azure_instances_test.go", "azure_loadbalancer_test.go", + "azure_managedDiskController_test.go", "azure_ratelimit_test.go", "azure_routes_test.go", "azure_standard_test.go", @@ -121,22 +136,41 @@ go_test( embed = [":go_default_library"], deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//staging/src/k8s.io/client-go/informers:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/fake:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider/service/helpers:go_default_library", + "//staging/src/k8s.io/cloud-provider/volume:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/auth:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/cache:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/fileclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/fileclient/mockfileclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/routeclient/mockrouteclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/mockroutetableclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/mockstorageaccountclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/mocksubnetclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/mockvmsets:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/storage:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/golang/mock/gomock:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/OWNERS b/vendor/k8s.io/legacy-cloud-providers/azure/OWNERS index 2859c506d6e..7ec0f8ac243 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/OWNERS +++ b/vendor/k8s.io/legacy-cloud-providers/azure/OWNERS @@ -6,6 +6,7 @@ approvers: - feiskyer - karataliu - khenidak +- nilo19 reviewers: - andyzhangx - aramase @@ -15,3 +16,4 @@ reviewers: - karataliu - khenidak - ritazh +- nilo19 diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/auth/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/auth/BUILD index 36c4dabe596..b3432a358bc 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/auth/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/auth/BUILD @@ -19,7 +19,7 @@ go_library( "//vendor/github.com/Azure/go-autorest/autorest/adal:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/golang.org/x/crypto/pkcs12:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/auth/azure_auth.go b/vendor/k8s.io/legacy-cloud-providers/azure/auth/azure_auth.go index e01e0c5b3ed..bf82fc96b7b 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/auth/azure_auth.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/auth/azure_auth.go @@ -27,7 +27,7 @@ import ( "github.com/Azure/go-autorest/autorest/azure" "golang.org/x/crypto/pkcs12" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure.go index 4c0de1e29c4..fcccf578680 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure.go @@ -42,11 +42,12 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/record" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/legacy-cloud-providers/azure/auth" azcache "k8s.io/legacy-cloud-providers/azure/cache" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/diskclient" + "k8s.io/legacy-cloud-providers/azure/clients/fileclient" "k8s.io/legacy-cloud-providers/azure/clients/interfaceclient" "k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient" "k8s.io/legacy-cloud-providers/azure/clients/publicipclient" @@ -61,6 +62,12 @@ import ( "k8s.io/legacy-cloud-providers/azure/clients/vmssclient" "k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient" "k8s.io/legacy-cloud-providers/azure/retry" + + // ensure the newly added package from azure-sdk-for-go is in vendor/ + _ "k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient" + // ensure the newly added package from azure-sdk-for-go is in vendor/ + _ "k8s.io/legacy-cloud-providers/azure/clients/deploymentclient" + "sigs.k8s.io/yaml" ) @@ -234,7 +241,7 @@ type Cloud struct { StorageAccountClient storageaccountclient.Interface DisksClient diskclient.Interface SnapshotsClient snapshotclient.Interface - FileClient FileClient + FileClient fileclient.Interface VirtualMachineScaleSetsClient vmssclient.Interface VirtualMachineScaleSetVMsClient vmssvmclient.Interface VirtualMachineSizesClient vmsizeclient.Interface @@ -246,7 +253,7 @@ type Cloud struct { // ipv6DualStack allows overriding for unit testing. It's normally initialized from featuregates ipv6DualStackEnabled bool // Lock for access to node caches, includes nodeZones, nodeResourceGroups, and unmanagedNodes. - nodeCachesLock sync.Mutex + nodeCachesLock sync.RWMutex // nodeZones is a mapping from Zone to a sets.String of Node's names in the Zone // it is updated by the nodeInformer nodeZones map[string]sets.String @@ -262,7 +269,7 @@ type Cloud struct { // routeCIDRs holds cache for route CIDRs. routeCIDRs map[string]string - kubeClient clientset.Interface + KubeClient clientset.Interface eventBroadcaster record.EventBroadcaster eventRecorder record.EventRecorder routeUpdater *delayedRouteUpdater @@ -384,7 +391,7 @@ func (az *Cloud) InitializeCloudFromConfig(config *Config, fromSecret bool) erro // No credentials provided, useInstanceMetadata should be enabled for Kubelet. // TODO(feiskyer): print different error message for Kubelet and controller-manager, as they're // requiring different credential settings. - if !config.UseInstanceMetadata && az.Config.CloudConfigType == cloudConfigTypeFile { + if !config.UseInstanceMetadata && config.CloudConfigType == cloudConfigTypeFile { return fmt.Errorf("useInstanceMetadata must be enabled without Azure credentials") } @@ -547,6 +554,8 @@ func (az *Cloud) configAzureClients( loadBalancerClientConfig := azClientConfig.WithRateLimiter(az.Config.LoadBalancerRateLimit) securityGroupClientConfig := azClientConfig.WithRateLimiter(az.Config.SecurityGroupRateLimit) publicIPClientConfig := azClientConfig.WithRateLimiter(az.Config.PublicIPAddressRateLimit) + // TODO(ZeroMagic): add azurefileRateLimit + fileClientConfig := azClientConfig.WithRateLimiter(nil) // If uses network resources in different AAD Tenant, update Authorizer for VM/VMSS client config if multiTenantServicePrincipalToken != nil { @@ -589,8 +598,7 @@ func (az *Cloud) configAzureClients( az.LoadBalancerClient = loadbalancerclient.New(loadBalancerClientConfig) az.SecurityGroupsClient = securitygroupclient.New(securityGroupClientConfig) az.PublicIPAddressesClient = publicipclient.New(publicIPClientConfig) - // fileClient is not based on armclient, but it's still backoff retried. - az.FileClient = newAzureFileClient(&az.Environment, azClientConfig.Backoff) + az.FileClient = fileclient.New(fileClientConfig) } func (az *Cloud) getAzureClientConfig(servicePrincipalToken *adal.ServicePrincipalToken) *azclients.ClientConfig { @@ -639,9 +647,9 @@ func parseConfig(configReader io.Reader) (*Config, error) { // Initialize passes a Kubernetes clientBuilder interface to the cloud provider func (az *Cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{}) { - az.kubeClient = clientBuilder.ClientOrDie("azure-cloud-provider") + az.KubeClient = clientBuilder.ClientOrDie("azure-cloud-provider") az.eventBroadcaster = record.NewBroadcaster() - az.eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: az.kubeClient.CoreV1().Events("")}) + az.eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: az.KubeClient.CoreV1().Events("")}) az.eventRecorder = az.eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "azure-cloud-provider"}) az.InitializeCloudFromSecret() } @@ -656,6 +664,12 @@ func (az *Cloud) Instances() (cloudprovider.Instances, bool) { return az, true } +// InstancesV2 returns an instancesV2 interface. Also returns true if the interface is supported, false otherwise. +// TODO: implement ONLY for external cloud provider +func (az *Cloud) InstancesV2() (cloudprovider.InstancesV2, bool) { + return nil, false +} + // Zones returns a zones interface. Also returns true if the interface is supported, false otherwise. func (az *Cloud) Zones() (cloudprovider.Zones, bool) { return az, true @@ -799,8 +813,8 @@ func (az *Cloud) GetActiveZones() (sets.String, error) { return nil, fmt.Errorf("Azure cloud provider doesn't have informers set") } - az.nodeCachesLock.Lock() - defer az.nodeCachesLock.Unlock() + az.nodeCachesLock.RLock() + defer az.nodeCachesLock.RUnlock() if !az.nodeInformerSynced() { return nil, fmt.Errorf("node informer is not synced when trying to GetActiveZones") } @@ -826,8 +840,8 @@ func (az *Cloud) GetNodeResourceGroup(nodeName string) (string, error) { return az.ResourceGroup, nil } - az.nodeCachesLock.Lock() - defer az.nodeCachesLock.Unlock() + az.nodeCachesLock.RLock() + defer az.nodeCachesLock.RUnlock() if !az.nodeInformerSynced() { return "", fmt.Errorf("node informer is not synced when trying to GetNodeResourceGroup") } @@ -848,8 +862,8 @@ func (az *Cloud) GetResourceGroups() (sets.String, error) { return sets.NewString(az.ResourceGroup), nil } - az.nodeCachesLock.Lock() - defer az.nodeCachesLock.Unlock() + az.nodeCachesLock.RLock() + defer az.nodeCachesLock.RUnlock() if !az.nodeInformerSynced() { return nil, fmt.Errorf("node informer is not synced when trying to GetResourceGroups") } @@ -869,8 +883,8 @@ func (az *Cloud) GetUnmanagedNodes() (sets.String, error) { return nil, nil } - az.nodeCachesLock.Lock() - defer az.nodeCachesLock.Unlock() + az.nodeCachesLock.RLock() + defer az.nodeCachesLock.RUnlock() if !az.nodeInformerSynced() { return nil, fmt.Errorf("node informer is not synced when trying to GetUnmanagedNodes") } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_backoff.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_backoff.go index d17bb0cb5eb..c0091e3ce38 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_backoff.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_backoff.go @@ -22,7 +22,7 @@ import ( "net/http" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" "github.com/Azure/go-autorest/autorest/to" @@ -31,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" "k8s.io/legacy-cloud-providers/azure/retry" ) @@ -40,8 +40,8 @@ const ( // not active means the instance is under deleting from Azure VMSS. vmssVMNotActiveErrorMessage = "not an active Virtual Machine Scale Set VM instanceId" - // operationCancledErrorMessage means the operation is canceled by another new operation. - operationCancledErrorMessage = "canceledandsupersededduetoanotheroperation" + // operationCanceledErrorMessage means the operation is canceled by another new operation. + operationCanceledErrorMessage = "canceledandsupersededduetoanotheroperation" ) // RequestBackoff if backoff is disabled in cloud provider it @@ -166,8 +166,8 @@ func (az *Cloud) CreateOrUpdateSecurityGroup(service *v1.Service, sg network.Sec } // Invalidate the cache because another new operation has canceled the current request. - if strings.Contains(strings.ToLower(rerr.Error().Error()), operationCancledErrorMessage) { - klog.V(3).Infof("SecurityGroup cache for %s is cleanup because CreateOrUpdateSecurityGroup is canceld by another operation", *sg.Name) + if strings.Contains(strings.ToLower(rerr.Error().Error()), operationCanceledErrorMessage) { + klog.V(3).Infof("SecurityGroup cache for %s is cleanup because CreateOrUpdateSecurityGroup is canceled by another operation", *sg.Name) az.nsgCache.Delete(*sg.Name) } @@ -194,7 +194,7 @@ func (az *Cloud) CreateOrUpdateLB(service *v1.Service, lb network.LoadBalancer) az.lbCache.Delete(*lb.Name) } // Invalidate the cache because another new operation has canceled the current request. - if strings.Contains(strings.ToLower(rerr.Error().Error()), operationCancledErrorMessage) { + if strings.Contains(strings.ToLower(rerr.Error().Error()), operationCanceledErrorMessage) { klog.V(3).Infof("LoadBalancer cache for %s is cleanup because CreateOrUpdate is canceled by another operation", *lb.Name) az.lbCache.Delete(*lb.Name) } @@ -317,7 +317,7 @@ func (az *Cloud) CreateOrUpdateRouteTable(routeTable network.RouteTable) error { az.rtCache.Delete(*routeTable.Name) } // Invalidate the cache because another new operation has canceled the current request. - if strings.Contains(strings.ToLower(rerr.Error().Error()), operationCancledErrorMessage) { + if strings.Contains(strings.ToLower(rerr.Error().Error()), operationCanceledErrorMessage) { klog.V(3).Infof("Route table cache for %s is cleanup because CreateOrUpdateRouteTable is canceld by another operation", *routeTable.Name) az.rtCache.Delete(*routeTable.Name) } @@ -342,7 +342,7 @@ func (az *Cloud) CreateOrUpdateRoute(route network.Route) error { az.rtCache.Delete(az.RouteTableName) } // Invalidate the cache because another new operation has canceled the current request. - if strings.Contains(strings.ToLower(rerr.Error().Error()), operationCancledErrorMessage) { + if strings.Contains(strings.ToLower(rerr.Error().Error()), operationCanceledErrorMessage) { klog.V(3).Infof("Route cache for %s is cleanup because CreateOrUpdateRouteTable is canceld by another operation", *route.Name) az.rtCache.Delete(az.RouteTableName) } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go index 9dc6c458af4..6819a998817 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go @@ -37,9 +37,10 @@ import ( kwait "k8s.io/apimachinery/pkg/util/wait" volerr "k8s.io/cloud-provider/volume/errors" - "k8s.io/klog" + "k8s.io/klog/v2" ) +// Attention: blob disk feature is deprecated const ( vhdContainerName = "vhds" useHTTPSForBlobBasedDisk = true @@ -84,7 +85,15 @@ func (c *BlobDiskController) initStorageAccounts() { // If no storage account is given, search all the storage accounts associated with the resource group and pick one that // fits storage type and location. func (c *BlobDiskController) CreateVolume(blobName, accountName, accountType, location string, requestGB int) (string, string, int, error) { - account, key, err := c.common.cloud.EnsureStorageAccount(accountName, accountType, string(defaultStorageAccountKind), c.common.resourceGroup, location, dedicatedDiskAccountNamePrefix) + accountOptions := &AccountOptions{ + Name: accountName, + Type: accountType, + Kind: string(defaultStorageAccountKind), + ResourceGroup: c.common.resourceGroup, + Location: location, + EnableHTTPSTrafficOnly: true, + } + account, key, err := c.common.cloud.EnsureStorageAccount(accountOptions, dedicatedDiskAccountNamePrefix) if err != nil { return "", "", 0, fmt.Errorf("could not get storage key for storage account %s: %v", accountName, err) } @@ -344,7 +353,7 @@ func (c *BlobDiskController) ensureDefaultContainer(storageAccountName string) e } // account exists but not ready yet - if provisionState != storage.ProvisioningStateSucceeded { + if provisionState != storage.Succeeded { // we don't want many attempts to validate the account readiness // here hence we are locking counter := 1 @@ -375,7 +384,7 @@ func (c *BlobDiskController) ensureDefaultContainer(storageAccountName string) e return false, nil // error performing the query - retryable } - if provisionState == storage.ProvisioningStateSucceeded { + if provisionState == storage.Succeeded { return true, nil } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_config.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_config.go index cf953b331a2..8f5dcfe99b5 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_config.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_config.go @@ -23,7 +23,7 @@ import ( "fmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "sigs.k8s.io/yaml" ) @@ -69,7 +69,7 @@ func (az *Cloud) getConfigFromSecret() (*Config, error) { return nil, nil } - secret, err := az.kubeClient.CoreV1().Secrets(cloudConfigNamespace).Get(context.TODO(), cloudConfigSecretName, metav1.GetOptions{}) + secret, err := az.KubeClient.CoreV1().Secrets(cloudConfigNamespace).Get(context.TODO(), cloudConfigSecretName, metav1.GetOptions{}) if err != nil { return nil, fmt.Errorf("failed to get secret %s: %v", cloudConfigSecretName, err) } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go index e36bd3e7184..5e396c80dfa 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go @@ -28,13 +28,13 @@ import ( "sync" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "k8s.io/apimachinery/pkg/types" kwait "k8s.io/apimachinery/pkg/util/wait" cloudprovider "k8s.io/cloud-provider" volerr "k8s.io/cloud-provider/volume/errors" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" "k8s.io/legacy-cloud-providers/azure/retry" ) @@ -141,7 +141,7 @@ func (c *controllerCommon) AttachDisk(isManagedDisk bool, diskName, diskURI stri return -1, rerr.Error() } - if disk.ManagedBy != nil { + if disk.ManagedBy != nil && (disk.MaxShares == nil || *disk.MaxShares <= 1) { attachErr := fmt.Sprintf( "disk(%s) already attached to node(%s), could not be attached to node(%s)", diskURI, *disk.ManagedBy, nodeName) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go index 0c5f95e9c2a..54ca4f880ff 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go @@ -22,11 +22,11 @@ import ( "net/http" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/go-autorest/autorest/to" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go index 77577411136..344e4f03d4a 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go @@ -22,11 +22,11 @@ import ( "net/http" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/go-autorest/autorest/to" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_fakes.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_fakes.go index 696a0beabc6..59e260cdec7 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_fakes.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_fakes.go @@ -19,748 +19,30 @@ limitations under the License. package azure import ( - "context" - "errors" "fmt" - "math/rand" - "net/http" - "sync" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" - "github.com/Azure/go-autorest/autorest/to" "github.com/golang/mock/gomock" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/tools/record" "k8s.io/legacy-cloud-providers/azure/auth" + "k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient" + "k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient" + "k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient" + "k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient" "k8s.io/legacy-cloud-providers/azure/clients/routeclient/mockrouteclient" "k8s.io/legacy-cloud-providers/azure/clients/routetableclient/mockroutetableclient" + "k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient" "k8s.io/legacy-cloud-providers/azure/clients/subnetclient/mocksubnetclient" - "k8s.io/legacy-cloud-providers/azure/retry" + "k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient" + "k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient" + "k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient" ) var ( errPreconditionFailedEtagMismatch = fmt.Errorf("PreconditionFailedEtagMismatch") ) -type fakeAzureLBClient struct { - mutex *sync.Mutex - FakeStore map[string]map[string]network.LoadBalancer -} - -func newFakeAzureLBClient() *fakeAzureLBClient { - fLBC := &fakeAzureLBClient{} - fLBC.FakeStore = make(map[string]map[string]network.LoadBalancer) - fLBC.mutex = &sync.Mutex{} - return fLBC -} - -func (fLBC *fakeAzureLBClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters network.LoadBalancer, etag string) *retry.Error { - fLBC.mutex.Lock() - defer fLBC.mutex.Unlock() - - if _, ok := fLBC.FakeStore[resourceGroupName]; !ok { - fLBC.FakeStore[resourceGroupName] = make(map[string]network.LoadBalancer) - } - - // For dynamic ip allocation, just fill in the PrivateIPAddress - if parameters.FrontendIPConfigurations != nil { - for idx, config := range *parameters.FrontendIPConfigurations { - if config.PrivateIPAllocationMethod == network.Dynamic { - // Here we randomly assign an ip as private ip - // It doesn't smart enough to know whether it is in the subnet's range - (*parameters.FrontendIPConfigurations)[idx].PrivateIPAddress = getRandomIPPtr() - } - } - } - fLBC.FakeStore[resourceGroupName][loadBalancerName] = parameters - - return nil -} - -func (fLBC *fakeAzureLBClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string) *retry.Error { - fLBC.mutex.Lock() - defer fLBC.mutex.Unlock() - - if rgLBs, ok := fLBC.FakeStore[resourceGroupName]; ok { - if _, ok := rgLBs[loadBalancerName]; ok { - delete(rgLBs, loadBalancerName) - return nil - } - } - - return nil -} - -func (fLBC *fakeAzureLBClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, expand string) (result network.LoadBalancer, err *retry.Error) { - fLBC.mutex.Lock() - defer fLBC.mutex.Unlock() - if _, ok := fLBC.FakeStore[resourceGroupName]; ok { - if entity, ok := fLBC.FakeStore[resourceGroupName][loadBalancerName]; ok { - return entity, nil - } - } - return result, retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such LB")) -} - -func (fLBC *fakeAzureLBClient) List(ctx context.Context, resourceGroupName string) (result []network.LoadBalancer, err *retry.Error) { - fLBC.mutex.Lock() - defer fLBC.mutex.Unlock() - - var value []network.LoadBalancer - if _, ok := fLBC.FakeStore[resourceGroupName]; ok { - for _, v := range fLBC.FakeStore[resourceGroupName] { - value = append(value, v) - } - } - return value, nil -} - -type fakeAzurePIPClient struct { - mutex *sync.Mutex - FakeStore map[string]map[string]network.PublicIPAddress - SubscriptionID string -} - -const publicIPAddressIDTemplate = "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/publicIPAddresses/%s" - -// returns the full identifier of a publicIPAddress. -func getpublicIPAddressID(subscriptionID string, resourceGroupName, pipName string) string { - return fmt.Sprintf( - publicIPAddressIDTemplate, - subscriptionID, - resourceGroupName, - pipName) -} - -func newFakeAzurePIPClient(subscriptionID string) *fakeAzurePIPClient { - fAPC := &fakeAzurePIPClient{} - fAPC.FakeStore = make(map[string]map[string]network.PublicIPAddress) - fAPC.SubscriptionID = subscriptionID - fAPC.mutex = &sync.Mutex{} - return fAPC -} - -func (fAPC *fakeAzurePIPClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters network.PublicIPAddress) *retry.Error { - fAPC.mutex.Lock() - defer fAPC.mutex.Unlock() - - if _, ok := fAPC.FakeStore[resourceGroupName]; !ok { - fAPC.FakeStore[resourceGroupName] = make(map[string]network.PublicIPAddress) - } - - // assign id - pipID := getpublicIPAddressID(fAPC.SubscriptionID, resourceGroupName, publicIPAddressName) - parameters.ID = &pipID - - // only create in the case user has not provided - if parameters.PublicIPAddressPropertiesFormat != nil && - parameters.PublicIPAddressPropertiesFormat.PublicIPAllocationMethod == network.Static { - // assign ip - parameters.IPAddress = getRandomIPPtr() - } - - fAPC.FakeStore[resourceGroupName][publicIPAddressName] = parameters - - return nil -} - -func (fAPC *fakeAzurePIPClient) Delete(ctx context.Context, resourceGroupName string, publicIPAddressName string) *retry.Error { - fAPC.mutex.Lock() - defer fAPC.mutex.Unlock() - - if rgPIPs, ok := fAPC.FakeStore[resourceGroupName]; ok { - if _, ok := rgPIPs[publicIPAddressName]; ok { - delete(rgPIPs, publicIPAddressName) - return nil - } - } - - return retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such PIP")) -} - -func (fAPC *fakeAzurePIPClient) Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (result network.PublicIPAddress, err *retry.Error) { - fAPC.mutex.Lock() - defer fAPC.mutex.Unlock() - if _, ok := fAPC.FakeStore[resourceGroupName]; ok { - if entity, ok := fAPC.FakeStore[resourceGroupName][publicIPAddressName]; ok { - return entity, nil - } - } - return result, retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such PIP")) -} - -func (fAPC *fakeAzurePIPClient) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result network.PublicIPAddress, err *retry.Error) { - fAPC.mutex.Lock() - defer fAPC.mutex.Unlock() - if _, ok := fAPC.FakeStore[resourceGroupName]; ok { - if entity, ok := fAPC.FakeStore[resourceGroupName][publicIPAddressName]; ok { - return entity, nil - } - } - return result, retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such PIP")) -} - -func (fAPC *fakeAzurePIPClient) List(ctx context.Context, resourceGroupName string) (result []network.PublicIPAddress, err *retry.Error) { - fAPC.mutex.Lock() - defer fAPC.mutex.Unlock() - - var value []network.PublicIPAddress - if _, ok := fAPC.FakeStore[resourceGroupName]; ok { - for _, v := range fAPC.FakeStore[resourceGroupName] { - value = append(value, v) - } - } - - return value, nil -} - -func (fAPC *fakeAzurePIPClient) setFakeStore(store map[string]map[string]network.PublicIPAddress) { - fAPC.mutex.Lock() - defer fAPC.mutex.Unlock() - - fAPC.FakeStore = store -} - -type fakeAzureInterfacesClient struct { - mutex *sync.Mutex - FakeStore map[string]map[string]network.Interface -} - -func newFakeAzureInterfacesClient() *fakeAzureInterfacesClient { - fIC := &fakeAzureInterfacesClient{} - fIC.FakeStore = make(map[string]map[string]network.Interface) - fIC.mutex = &sync.Mutex{} - - return fIC -} - -func (fIC *fakeAzureInterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters network.Interface) *retry.Error { - fIC.mutex.Lock() - defer fIC.mutex.Unlock() - - if _, ok := fIC.FakeStore[resourceGroupName]; !ok { - fIC.FakeStore[resourceGroupName] = make(map[string]network.Interface) - } - fIC.FakeStore[resourceGroupName][networkInterfaceName] = parameters - - return nil -} - -func (fIC *fakeAzureInterfacesClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (result network.Interface, err *retry.Error) { - fIC.mutex.Lock() - defer fIC.mutex.Unlock() - if _, ok := fIC.FakeStore[resourceGroupName]; ok { - if entity, ok := fIC.FakeStore[resourceGroupName][networkInterfaceName]; ok { - return entity, nil - } - } - return result, retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such Interface")) -} - -func (fIC *fakeAzureInterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result network.Interface, err *retry.Error) { - fIC.mutex.Lock() - defer fIC.mutex.Unlock() - if _, ok := fIC.FakeStore[resourceGroupName]; ok { - if entity, ok := fIC.FakeStore[resourceGroupName][networkInterfaceName]; ok { - return entity, nil - } - } - return result, retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such Interface")) -} - -func (fIC *fakeAzureInterfacesClient) Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string) *retry.Error { - return nil -} - -func (fIC *fakeAzureInterfacesClient) setFakeStore(store map[string]map[string]network.Interface) { - fIC.mutex.Lock() - defer fIC.mutex.Unlock() - - fIC.FakeStore = store -} - -type fakeAzureVirtualMachinesClient struct { - mutex *sync.Mutex - FakeStore map[string]map[string]compute.VirtualMachine -} - -func newFakeAzureVirtualMachinesClient() *fakeAzureVirtualMachinesClient { - fVMC := &fakeAzureVirtualMachinesClient{} - fVMC.FakeStore = make(map[string]map[string]compute.VirtualMachine) - fVMC.mutex = &sync.Mutex{} - return fVMC -} - -func (fVMC *fakeAzureVirtualMachinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachine, source string) *retry.Error { - fVMC.mutex.Lock() - defer fVMC.mutex.Unlock() - - if _, ok := fVMC.FakeStore[resourceGroupName]; !ok { - fVMC.FakeStore[resourceGroupName] = make(map[string]compute.VirtualMachine) - } - fVMC.FakeStore[resourceGroupName][VMName] = parameters - - return nil -} - -func (fVMC *fakeAzureVirtualMachinesClient) Update(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachineUpdate, source string) *retry.Error { - fVMC.mutex.Lock() - defer fVMC.mutex.Unlock() - - if _, ok := fVMC.FakeStore[resourceGroupName]; !ok { - fVMC.FakeStore[resourceGroupName] = make(map[string]compute.VirtualMachine) - } - - return nil -} - -func (fVMC *fakeAzureVirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, err *retry.Error) { - fVMC.mutex.Lock() - defer fVMC.mutex.Unlock() - if _, ok := fVMC.FakeStore[resourceGroupName]; ok { - if entity, ok := fVMC.FakeStore[resourceGroupName][VMName]; ok { - return entity, nil - } - } - return result, retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such VM")) -} - -func (fVMC *fakeAzureVirtualMachinesClient) List(ctx context.Context, resourceGroupName string) (result []compute.VirtualMachine, err *retry.Error) { - fVMC.mutex.Lock() - defer fVMC.mutex.Unlock() - - result = []compute.VirtualMachine{} - if _, ok := fVMC.FakeStore[resourceGroupName]; ok { - for _, v := range fVMC.FakeStore[resourceGroupName] { - result = append(result, v) - } - } - - return result, nil -} - -func (fVMC *fakeAzureVirtualMachinesClient) Delete(ctx context.Context, resourceGroupName string, VMName string) *retry.Error { - return nil -} - -func (fVMC *fakeAzureVirtualMachinesClient) setFakeStore(store map[string]map[string]compute.VirtualMachine) { - fVMC.mutex.Lock() - defer fVMC.mutex.Unlock() - - fVMC.FakeStore = store -} - -type fakeAzureNSGClient struct { - mutex *sync.Mutex - FakeStore map[string]map[string]network.SecurityGroup -} - -func newFakeAzureNSGClient() *fakeAzureNSGClient { - fNSG := &fakeAzureNSGClient{} - fNSG.FakeStore = make(map[string]map[string]network.SecurityGroup) - fNSG.mutex = &sync.Mutex{} - return fNSG -} - -func (fNSG *fakeAzureNSGClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters network.SecurityGroup, etag string) *retry.Error { - fNSG.mutex.Lock() - defer fNSG.mutex.Unlock() - - if _, ok := fNSG.FakeStore[resourceGroupName]; !ok { - fNSG.FakeStore[resourceGroupName] = make(map[string]network.SecurityGroup) - } - - if nsg, ok := fNSG.FakeStore[resourceGroupName][networkSecurityGroupName]; ok { - if etag != "" && to.String(nsg.Etag) != "" && etag != to.String(nsg.Etag) { - return retry.GetError(&http.Response{ - StatusCode: http.StatusPreconditionFailed, - }, errPreconditionFailedEtagMismatch) - } - } - fNSG.FakeStore[resourceGroupName][networkSecurityGroupName] = parameters - - return nil -} - -func (fNSG *fakeAzureNSGClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) *retry.Error { - fNSG.mutex.Lock() - defer fNSG.mutex.Unlock() - - if rgSGs, ok := fNSG.FakeStore[resourceGroupName]; ok { - if _, ok := rgSGs[networkSecurityGroupName]; ok { - delete(rgSGs, networkSecurityGroupName) - return nil - } - } - - return retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such NSG")) -} - -func (fNSG *fakeAzureNSGClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand string) (result network.SecurityGroup, err *retry.Error) { - fNSG.mutex.Lock() - defer fNSG.mutex.Unlock() - if _, ok := fNSG.FakeStore[resourceGroupName]; ok { - if entity, ok := fNSG.FakeStore[resourceGroupName][networkSecurityGroupName]; ok { - return entity, nil - } - } - return result, retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such NSG")) -} - -func (fNSG *fakeAzureNSGClient) List(ctx context.Context, resourceGroupName string) (result []network.SecurityGroup, err *retry.Error) { - fNSG.mutex.Lock() - defer fNSG.mutex.Unlock() - - var value []network.SecurityGroup - if _, ok := fNSG.FakeStore[resourceGroupName]; ok { - for _, v := range fNSG.FakeStore[resourceGroupName] { - value = append(value, v) - } - } - - return value, nil -} - -func getRandomIPPtr() *string { - return to.StringPtr(fmt.Sprintf("%d.%d.%d.%d", rand.Intn(256), rand.Intn(256), rand.Intn(256), rand.Intn(256))) -} - -type fakeVirtualMachineScaleSetVMsClient struct { - mutex *sync.Mutex - FakeStore map[string]map[string]compute.VirtualMachineScaleSetVM -} - -func newFakeVirtualMachineScaleSetVMsClient() *fakeVirtualMachineScaleSetVMsClient { - fVMC := &fakeVirtualMachineScaleSetVMsClient{} - fVMC.FakeStore = make(map[string]map[string]compute.VirtualMachineScaleSetVM) - fVMC.mutex = &sync.Mutex{} - - return fVMC -} - -func (fVMC *fakeVirtualMachineScaleSetVMsClient) setFakeStore(store map[string]map[string]compute.VirtualMachineScaleSetVM) { - fVMC.mutex.Lock() - defer fVMC.mutex.Unlock() - - fVMC.FakeStore = store -} - -func (fVMC *fakeVirtualMachineScaleSetVMsClient) List(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, expand string) (result []compute.VirtualMachineScaleSetVM, err *retry.Error) { - fVMC.mutex.Lock() - defer fVMC.mutex.Unlock() - - result = []compute.VirtualMachineScaleSetVM{} - if _, ok := fVMC.FakeStore[resourceGroupName]; ok { - for _, v := range fVMC.FakeStore[resourceGroupName] { - result = append(result, v) - } - } - - return result, nil -} - -func (fVMC *fakeVirtualMachineScaleSetVMsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand compute.InstanceViewTypes) (result compute.VirtualMachineScaleSetVM, err *retry.Error) { - fVMC.mutex.Lock() - defer fVMC.mutex.Unlock() - - vmKey := fmt.Sprintf("%s_%s", VMScaleSetName, instanceID) - if scaleSetMap, ok := fVMC.FakeStore[resourceGroupName]; ok { - if entity, ok := scaleSetMap[vmKey]; ok { - return entity, nil - } - } - - return result, retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such VirtualMachineScaleSetVM")) -} - -func (fVMC *fakeVirtualMachineScaleSetVMsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters compute.VirtualMachineScaleSetVM, source string) *retry.Error { - fVMC.mutex.Lock() - defer fVMC.mutex.Unlock() - - vmKey := fmt.Sprintf("%s_%s", VMScaleSetName, instanceID) - if scaleSetMap, ok := fVMC.FakeStore[resourceGroupName]; ok { - if _, ok := scaleSetMap[vmKey]; ok { - scaleSetMap[vmKey] = parameters - } - } - - return nil -} - -func (fVMC *fakeVirtualMachineScaleSetVMsClient) UpdateVMs(ctx context.Context, resourceGroupName string, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string) *retry.Error { - return nil -} - -type fakeVirtualMachineScaleSetsClient struct { - mutex *sync.Mutex - FakeStore map[string]map[string]compute.VirtualMachineScaleSet -} - -func newFakeVirtualMachineScaleSetsClient() *fakeVirtualMachineScaleSetsClient { - fVMSSC := &fakeVirtualMachineScaleSetsClient{} - fVMSSC.FakeStore = make(map[string]map[string]compute.VirtualMachineScaleSet) - fVMSSC.mutex = &sync.Mutex{} - - return fVMSSC -} - -func (fVMSSC *fakeVirtualMachineScaleSetsClient) setFakeStore(store map[string]map[string]compute.VirtualMachineScaleSet) { - fVMSSC.mutex.Lock() - defer fVMSSC.mutex.Unlock() - - fVMSSC.FakeStore = store -} - -func (fVMSSC *fakeVirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) *retry.Error { - fVMSSC.mutex.Lock() - defer fVMSSC.mutex.Unlock() - - if _, ok := fVMSSC.FakeStore[resourceGroupName]; !ok { - fVMSSC.FakeStore[resourceGroupName] = make(map[string]compute.VirtualMachineScaleSet) - } - fVMSSC.FakeStore[resourceGroupName][VMScaleSetName] = parameters - - return nil -} - -func (fVMSSC *fakeVirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSet, err *retry.Error) { - fVMSSC.mutex.Lock() - defer fVMSSC.mutex.Unlock() - - if scaleSetMap, ok := fVMSSC.FakeStore[resourceGroupName]; ok { - if entity, ok := scaleSetMap[VMScaleSetName]; ok { - return entity, nil - } - } - - return result, retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such ScaleSet")) -} - -func (fVMSSC *fakeVirtualMachineScaleSetsClient) List(ctx context.Context, resourceGroupName string) (result []compute.VirtualMachineScaleSet, err *retry.Error) { - fVMSSC.mutex.Lock() - defer fVMSSC.mutex.Unlock() - - result = []compute.VirtualMachineScaleSet{} - if _, ok := fVMSSC.FakeStore[resourceGroupName]; ok { - for _, v := range fVMSSC.FakeStore[resourceGroupName] { - result = append(result, v) - } - } - - return result, nil -} - -func (fVMSSC *fakeVirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) *retry.Error { - return nil -} - -func (fVMSSC *fakeVirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) *retry.Error { - return nil -} - -type fakeFileClient struct { -} - -func (fFC *fakeFileClient) createFileShare(accountName, accountKey, name string, sizeGiB int) error { - return nil -} - -func (fFC *fakeFileClient) deleteFileShare(accountName, accountKey, name string) error { - return nil -} - -func (fFC *fakeFileClient) resizeFileShare(accountName, accountKey, name string, sizeGiB int) error { - return nil -} - -type fakeStorageAccountClient struct { - mutex *sync.Mutex - FakeStore map[string]map[string]storage.Account - Keys storage.AccountListKeysResult - Accounts []storage.Account - Err error -} - -func newFakeStorageAccountClient() *fakeStorageAccountClient { - fSAC := &fakeStorageAccountClient{} - fSAC.FakeStore = make(map[string]map[string]storage.Account) - fSAC.mutex = &sync.Mutex{} - return fSAC -} - -func (fSAC *fakeStorageAccountClient) Create(ctx context.Context, resourceGroupName string, accountName string, parameters storage.AccountCreateParameters) *retry.Error { - fSAC.mutex.Lock() - defer fSAC.mutex.Unlock() - - if _, ok := fSAC.FakeStore[resourceGroupName]; !ok { - fSAC.FakeStore[resourceGroupName] = make(map[string]storage.Account) - } - fSAC.FakeStore[resourceGroupName][accountName] = storage.Account{ - Name: &accountName, - Sku: parameters.Sku, - Kind: parameters.Kind, - Location: parameters.Location, - Identity: parameters.Identity, - Tags: parameters.Tags, - AccountProperties: &storage.AccountProperties{}, - } - - return nil -} - -func (fSAC *fakeStorageAccountClient) Delete(ctx context.Context, resourceGroupName string, accountName string) *retry.Error { - fSAC.mutex.Lock() - defer fSAC.mutex.Unlock() - - if rgAccounts, ok := fSAC.FakeStore[resourceGroupName]; ok { - if _, ok := rgAccounts[accountName]; ok { - delete(rgAccounts, accountName) - return nil - } - } - - return retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such StorageAccount")) -} - -func (fSAC *fakeStorageAccountClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result storage.AccountListKeysResult, err *retry.Error) { - return fSAC.Keys, nil -} - -func (fSAC *fakeStorageAccountClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result []storage.Account, err *retry.Error) { - return fSAC.Accounts, nil -} - -func (fSAC *fakeStorageAccountClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string) (result storage.Account, err *retry.Error) { - fSAC.mutex.Lock() - defer fSAC.mutex.Unlock() - - if _, ok := fSAC.FakeStore[resourceGroupName]; ok { - if entity, ok := fSAC.FakeStore[resourceGroupName][accountName]; ok { - return entity, nil - } - } - - return result, retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such StorageAccount")) -} - -type fakeDisksClient struct { - mutex *sync.Mutex - FakeStore map[string]map[string]compute.Disk -} - -func newFakeDisksClient() *fakeDisksClient { - fDC := &fakeDisksClient{} - fDC.FakeStore = make(map[string]map[string]compute.Disk) - fDC.mutex = &sync.Mutex{} - return fDC -} - -func (fDC *fakeDisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, diskParameter compute.Disk) *retry.Error { - fDC.mutex.Lock() - defer fDC.mutex.Unlock() - - provisioningStateSucceeded := string(compute.ProvisioningStateSucceeded) - diskParameter.DiskProperties = &compute.DiskProperties{ProvisioningState: &provisioningStateSucceeded} - diskParameter.ID = &diskName - - if _, ok := fDC.FakeStore[resourceGroupName]; !ok { - fDC.FakeStore[resourceGroupName] = make(map[string]compute.Disk) - } - fDC.FakeStore[resourceGroupName][diskName] = diskParameter - - return nil -} - -func (fDC *fakeDisksClient) Delete(ctx context.Context, resourceGroupName string, diskName string) *retry.Error { - fDC.mutex.Lock() - defer fDC.mutex.Unlock() - - if rgDisks, ok := fDC.FakeStore[resourceGroupName]; ok { - if _, ok := rgDisks[diskName]; ok { - delete(rgDisks, diskName) - return nil - } - } - - return retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such Disk")) -} - -func (fDC *fakeDisksClient) Get(ctx context.Context, resourceGroupName string, diskName string) (result compute.Disk, err *retry.Error) { - fDC.mutex.Lock() - defer fDC.mutex.Unlock() - - if _, ok := fDC.FakeStore[resourceGroupName]; ok { - if entity, ok := fDC.FakeStore[resourceGroupName][diskName]; ok { - return entity, nil - } - } - - return result, retry.GetError( - &http.Response{ - StatusCode: http.StatusNotFound, - }, - errors.New("Not such Disk")) -} - // GetTestCloud returns a fake azure cloud for unit tests in Azure related CSI drivers func GetTestCloud(ctrl *gomock.Controller) (az *Cloud) { az = &Cloud{ @@ -779,6 +61,7 @@ func GetTestCloud(ctrl *gomock.Controller) (az *Cloud) { SecurityGroupName: "nsg", RouteTableName: "rt", PrimaryAvailabilitySetName: "as", + PrimaryScaleSetName: "vmss", MaximumLoadBalancerRuleCount: 250, VMType: vmTypeStandard, }, @@ -789,24 +72,24 @@ func GetTestCloud(ctrl *gomock.Controller) (az *Cloud) { routeCIDRs: map[string]string{}, eventRecorder: &record.FakeRecorder{}, } - az.DisksClient = newFakeDisksClient() - az.InterfacesClient = newFakeAzureInterfacesClient() - az.LoadBalancerClient = newFakeAzureLBClient() - az.PublicIPAddressesClient = newFakeAzurePIPClient(az.Config.SubscriptionID) + az.DisksClient = mockdiskclient.NewMockInterface(ctrl) + az.InterfacesClient = mockinterfaceclient.NewMockInterface(ctrl) + az.LoadBalancerClient = mockloadbalancerclient.NewMockInterface(ctrl) + az.PublicIPAddressesClient = mockpublicipclient.NewMockInterface(ctrl) az.RoutesClient = mockrouteclient.NewMockInterface(ctrl) az.RouteTablesClient = mockroutetableclient.NewMockInterface(ctrl) - az.SecurityGroupsClient = newFakeAzureNSGClient() + az.SecurityGroupsClient = mocksecuritygroupclient.NewMockInterface(ctrl) az.SubnetsClient = mocksubnetclient.NewMockInterface(ctrl) - az.VirtualMachineScaleSetsClient = newFakeVirtualMachineScaleSetsClient() - az.VirtualMachineScaleSetVMsClient = newFakeVirtualMachineScaleSetVMsClient() - az.VirtualMachinesClient = newFakeAzureVirtualMachinesClient() + az.VirtualMachineScaleSetsClient = mockvmssclient.NewMockInterface(ctrl) + az.VirtualMachineScaleSetVMsClient = mockvmssvmclient.NewMockInterface(ctrl) + az.VirtualMachinesClient = mockvmclient.NewMockInterface(ctrl) az.vmSet = newAvailabilitySet(az) az.vmCache, _ = az.newVMCache() az.lbCache, _ = az.newLBCache() az.nsgCache, _ = az.newNSGCache() az.rtCache, _ = az.newRouteTableCache() - common := &controllerCommon{cloud: az} + common := &controllerCommon{cloud: az, resourceGroup: "rg", location: "westus"} az.controllerCommon = common az.ManagedDiskController = &ManagedDiskController{common: common} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_file.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_file.go index ad158ecc9f9..04b6c2e7b8c 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_file.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_file.go @@ -19,123 +19,23 @@ limitations under the License. package azure import ( - "fmt" - "net/http" - - azs "github.com/Azure/azure-sdk-for-go/storage" - "github.com/Azure/go-autorest/autorest/azure" - - "k8s.io/klog" - "k8s.io/legacy-cloud-providers/azure/retry" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" + "k8s.io/legacy-cloud-providers/azure/clients/fileclient" ) -const ( - useHTTPS = true -) - -var ( - // refer https://github.com/Azure/azure-sdk-for-go/blob/master/storage/client.go#L88. - defaultValidStatusCodes = []int{ - http.StatusRequestTimeout, // 408 - http.StatusInternalServerError, // 500 - http.StatusBadGateway, // 502 - http.StatusServiceUnavailable, // 503 - http.StatusGatewayTimeout, // 504 - } -) - -// FileClient is the interface for creating file shares, interface for test -// injection. -type FileClient interface { - createFileShare(accountName, accountKey, name string, sizeGiB int) error - deleteFileShare(accountName, accountKey, name string) error - resizeFileShare(accountName, accountKey, name string, sizeGiB int) error -} - // create file share -func (az *Cloud) createFileShare(accountName, accountKey, name string, sizeGiB int) error { - return az.FileClient.createFileShare(accountName, accountKey, name, sizeGiB) +func (az *Cloud) createFileShare(resourceGroupName, accountName string, shareOptions *fileclient.ShareOptions) error { + return az.FileClient.CreateFileShare(resourceGroupName, accountName, shareOptions) } -func (az *Cloud) deleteFileShare(accountName, accountKey, name string) error { - return az.FileClient.deleteFileShare(accountName, accountKey, name) +func (az *Cloud) deleteFileShare(resourceGroupName, accountName, name string) error { + return az.FileClient.DeleteFileShare(resourceGroupName, accountName, name) } -func (az *Cloud) resizeFileShare(accountName, accountKey, name string, sizeGiB int) error { - return az.FileClient.resizeFileShare(accountName, accountKey, name, sizeGiB) +func (az *Cloud) resizeFileShare(resourceGroupName, accountName, name string, sizeGiB int) error { + return az.FileClient.ResizeFileShare(resourceGroupName, accountName, name, sizeGiB) } -type azureFileClient struct { - env *azure.Environment - backoff *retry.Backoff -} - -func newAzureFileClient(env *azure.Environment, backoff *retry.Backoff) *azureFileClient { - return &azureFileClient{ - env: env, - backoff: backoff, - } -} - -func (f *azureFileClient) createFileShare(accountName, accountKey, name string, sizeGiB int) error { - fileClient, err := f.getFileSvcClient(accountName, accountKey) - if err != nil { - return err - } - share := fileClient.GetShareReference(name) - share.Properties.Quota = sizeGiB - newlyCreated, err := share.CreateIfNotExists(nil) - if err != nil { - return fmt.Errorf("failed to create file share, err: %v", err) - } - if !newlyCreated { - klog.V(2).Infof("file share(%s) under account(%s) already exists", name, accountName) - } - return nil -} - -// delete a file share -func (f *azureFileClient) deleteFileShare(accountName, accountKey, name string) error { - fileClient, err := f.getFileSvcClient(accountName, accountKey) - if err != nil { - return err - } - return fileClient.GetShareReference(name).Delete(nil) -} - -func (f *azureFileClient) resizeFileShare(accountName, accountKey, name string, sizeGiB int) error { - fileClient, err := f.getFileSvcClient(accountName, accountKey) - if err != nil { - return err - } - share := fileClient.GetShareReference(name) - if share.Properties.Quota >= sizeGiB { - klog.Warningf("file share size(%dGi) is already greater or equal than requested size(%dGi), accountName: %s, shareName: %s", - share.Properties.Quota, sizeGiB, accountName, name) - return nil - } - share.Properties.Quota = sizeGiB - if err = share.SetProperties(nil); err != nil { - return fmt.Errorf("failed to set quota on file share %s, err: %v", name, err) - } - klog.V(4).Infof("resize file share completed, accountName: %s, shareName: %s, sizeGiB: %d", accountName, name, sizeGiB) - return nil -} - -func (f *azureFileClient) getFileSvcClient(accountName, accountKey string) (*azs.FileServiceClient, error) { - fileClient, err := azs.NewClient(accountName, accountKey, f.env.StorageEndpointSuffix, azs.DefaultAPIVersion, useHTTPS) - if err != nil { - return nil, fmt.Errorf("error creating azure client: %v", err) - } - - if f.backoff != nil { - fileClient.Sender = &azs.DefaultSender{ - RetryAttempts: f.backoff.Steps, - ValidStatusCodes: defaultValidStatusCodes, - RetryDuration: f.backoff.Duration, - } - } - - fc := fileClient.GetFileService() - return &fc, nil +func (az *Cloud) getFileShare(resourceGroupName, accountName, name string) (storage.FileShare, error) { + return az.FileClient.GetFileShare(resourceGroupName, accountName, name) } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_instances.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_instances.go index 91d5a59c942..a0f19f85fbe 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_instances.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_instances.go @@ -27,14 +27,15 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" ) const ( - vmPowerStatePrefix = "PowerState/" - vmPowerStateStopped = "stopped" - vmPowerStateDeallocated = "deallocated" + vmPowerStatePrefix = "PowerState/" + vmPowerStateStopped = "stopped" + vmPowerStateDeallocated = "deallocated" + vmPowerStateDeallocating = "deallocating" // nodeNameEnvironmentName is the environment variable name for getting node name. // It is only used for out-of-tree cloud provider. @@ -45,6 +46,26 @@ var ( errNodeNotInitialized = fmt.Errorf("providerID is empty, the node is not initialized yet") ) +func (az *Cloud) addressGetter(nodeName types.NodeName) ([]v1.NodeAddress, error) { + ip, publicIP, err := az.getIPForMachine(nodeName) + if err != nil { + klog.V(2).Infof("NodeAddresses(%s) abort backoff: %v", nodeName, err) + return nil, err + } + + addresses := []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: ip}, + {Type: v1.NodeHostName, Address: string(nodeName)}, + } + if len(publicIP) > 0 { + addresses = append(addresses, v1.NodeAddress{ + Type: v1.NodeExternalIP, + Address: publicIP, + }) + } + return addresses, nil +} + // NodeAddresses returns the addresses of the specified instance. func (az *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error) { // Returns nil for unmanaged nodes because azure cloud provider couldn't fetch information for them. @@ -57,26 +78,6 @@ func (az *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.N return nil, nil } - addressGetter := func(nodeName types.NodeName) ([]v1.NodeAddress, error) { - ip, publicIP, err := az.getIPForMachine(nodeName) - if err != nil { - klog.V(2).Infof("NodeAddresses(%s) abort backoff: %v", nodeName, err) - return nil, err - } - - addresses := []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: ip}, - {Type: v1.NodeHostName, Address: string(name)}, - } - if len(publicIP) > 0 { - addresses = append(addresses, v1.NodeAddress{ - Type: v1.NodeExternalIP, - Address: publicIP, - }) - } - return addresses, nil - } - if az.UseInstanceMetadata { metadata, err := az.metadata.GetMetadata(azcache.CacheReadTypeDefault) if err != nil { @@ -95,59 +96,62 @@ func (az *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.N // Not local instance, get addresses from Azure ARM API. if !isLocalInstance { if az.vmSet != nil { - return addressGetter(name) + return az.addressGetter(name) } // vmSet == nil indicates credentials are not provided. return nil, fmt.Errorf("no credentials provided for Azure cloud provider") } - if len(metadata.Network.Interface) == 0 { - return nil, fmt.Errorf("no interface is found for the instance") - } - - // Use ip address got from instance metadata. - ipAddress := metadata.Network.Interface[0] - addresses := []v1.NodeAddress{ - {Type: v1.NodeHostName, Address: string(name)}, - } - if len(ipAddress.IPV4.IPAddress) > 0 && len(ipAddress.IPV4.IPAddress[0].PrivateIP) > 0 { - address := ipAddress.IPV4.IPAddress[0] - addresses = append(addresses, v1.NodeAddress{ - Type: v1.NodeInternalIP, - Address: address.PrivateIP, - }) - if len(address.PublicIP) > 0 { - addresses = append(addresses, v1.NodeAddress{ - Type: v1.NodeExternalIP, - Address: address.PublicIP, - }) - } - } - if len(ipAddress.IPV6.IPAddress) > 0 && len(ipAddress.IPV6.IPAddress[0].PrivateIP) > 0 { - address := ipAddress.IPV6.IPAddress[0] - addresses = append(addresses, v1.NodeAddress{ - Type: v1.NodeInternalIP, - Address: address.PrivateIP, - }) - if len(address.PublicIP) > 0 { - addresses = append(addresses, v1.NodeAddress{ - Type: v1.NodeExternalIP, - Address: address.PublicIP, - }) - } - } - - if len(addresses) == 1 { - // No IP addresses is got from instance metadata service, clean up cache and report errors. - az.metadata.imsCache.Delete(metadataCacheKey) - return nil, fmt.Errorf("get empty IP addresses from instance metadata service") - } - - return addresses, nil + return az.getLocalInstanceNodeAddresses(metadata.Network.Interface, string(name)) } - return addressGetter(name) + return az.addressGetter(name) +} + +func (az *Cloud) getLocalInstanceNodeAddresses(netInterfaces []NetworkInterface, nodeName string) ([]v1.NodeAddress, error) { + if len(netInterfaces) == 0 { + return nil, fmt.Errorf("no interface is found for the instance") + } + + // Use ip address got from instance metadata. + netInterface := netInterfaces[0] + addresses := []v1.NodeAddress{ + {Type: v1.NodeHostName, Address: nodeName}, + } + if len(netInterface.IPV4.IPAddress) > 0 && len(netInterface.IPV4.IPAddress[0].PrivateIP) > 0 { + address := netInterface.IPV4.IPAddress[0] + addresses = append(addresses, v1.NodeAddress{ + Type: v1.NodeInternalIP, + Address: address.PrivateIP, + }) + if len(address.PublicIP) > 0 { + addresses = append(addresses, v1.NodeAddress{ + Type: v1.NodeExternalIP, + Address: address.PublicIP, + }) + } + } + if len(netInterface.IPV6.IPAddress) > 0 && len(netInterface.IPV6.IPAddress[0].PrivateIP) > 0 { + address := netInterface.IPV6.IPAddress[0] + addresses = append(addresses, v1.NodeAddress{ + Type: v1.NodeInternalIP, + Address: address.PrivateIP, + }) + if len(address.PublicIP) > 0 { + addresses = append(addresses, v1.NodeAddress{ + Type: v1.NodeExternalIP, + Address: address.PublicIP, + }) + } + } + + if len(addresses) == 1 { + // No IP addresses is got from instance metadata service, clean up cache and report errors. + az.metadata.imsCache.Delete(metadataCacheKey) + return nil, fmt.Errorf("get empty IP addresses from instance metadata service") + } + return addresses, nil } // NodeAddressesByProviderID returns the node addresses of an instances with the specified unique providerID @@ -231,7 +235,8 @@ func (az *Cloud) InstanceShutdownByProviderID(ctx context.Context, providerID st } klog.V(5).Infof("InstanceShutdownByProviderID gets power status %q for node %q", powerStatus, nodeName) - return strings.ToLower(powerStatus) == vmPowerStateStopped || strings.ToLower(powerStatus) == vmPowerStateDeallocated, nil + status := strings.ToLower(powerStatus) + return status == vmPowerStateStopped || status == vmPowerStateDeallocated || status == vmPowerStateDeallocating, nil } func (az *Cloud) isCurrentInstance(name types.NodeName, metadataVMName string) (bool, error) { @@ -294,32 +299,35 @@ func (az *Cloud) InstanceID(ctx context.Context, name types.NodeName) (string, e // vmSet == nil indicates credentials are not provided. return "", fmt.Errorf("no credentials provided for Azure cloud provider") } - - // Get resource group name and subscription ID. - resourceGroup := strings.ToLower(metadata.Compute.ResourceGroup) - subscriptionID := strings.ToLower(metadata.Compute.SubscriptionID) - - // Compose instanceID based on nodeName for standard instance. - if metadata.Compute.VMScaleSetName == "" { - return az.getStandardMachineID(subscriptionID, resourceGroup, nodeName), nil - } - - // Get scale set name and instanceID from vmName for vmss. - ssName, instanceID, err := extractVmssVMName(metadata.Compute.Name) - if err != nil { - if err == ErrorNotVmssInstance { - // Compose machineID for standard Node. - return az.getStandardMachineID(subscriptionID, resourceGroup, nodeName), nil - } - return "", err - } - // Compose instanceID based on ssName and instanceID for vmss instance. - return az.getVmssMachineID(subscriptionID, resourceGroup, ssName, instanceID), nil + return az.getLocalInstanceProviderID(metadata, nodeName) } return az.vmSet.GetInstanceIDByNodeName(nodeName) } +func (az *Cloud) getLocalInstanceProviderID(metadata *InstanceMetadata, nodeName string) (string, error) { + // Get resource group name and subscription ID. + resourceGroup := strings.ToLower(metadata.Compute.ResourceGroup) + subscriptionID := strings.ToLower(metadata.Compute.SubscriptionID) + + // Compose instanceID based on nodeName for standard instance. + if metadata.Compute.VMScaleSetName == "" { + return az.getStandardMachineID(subscriptionID, resourceGroup, nodeName), nil + } + + // Get scale set name and instanceID from vmName for vmss. + ssName, instanceID, err := extractVmssVMName(metadata.Compute.Name) + if err != nil { + if err == ErrorNotVmssInstance { + // Compose machineID for standard Node. + return az.getStandardMachineID(subscriptionID, resourceGroup, nodeName), nil + } + return "", err + } + // Compose instanceID based on ssName and instanceID for vmss instance. + return az.getVmssMachineID(subscriptionID, resourceGroup, ssName, instanceID), nil +} + // InstanceTypeByProviderID returns the cloudprovider instance type of the node with the specified unique providerID // This method will not be called from the node that is requesting this ID. i.e. metadata service // and other local methods cannot be used here diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go index 9938651264b..e12b9accb50 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go @@ -34,7 +34,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" cloudprovider "k8s.io/cloud-provider" servicehelpers "k8s.io/cloud-provider/service/helpers" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" utilnet "k8s.io/utils/net" ) @@ -267,26 +267,24 @@ func (az *Cloud) getServiceLoadBalancer(service *v1.Service, clusterName string, } // check if the service already has a load balancer - if existingLBs != nil { - for i := range existingLBs { - existingLB := existingLBs[i] - if strings.EqualFold(*existingLB.Name, defaultLBName) { - defaultLB = &existingLB - } - if isInternalLoadBalancer(&existingLB) != isInternal { - continue - } - status, err = az.getServiceLoadBalancerStatus(service, &existingLB) - if err != nil { - return nil, nil, false, err - } - if status == nil { - // service is not on this load balancer - continue - } - - return &existingLB, status, true, nil + for i := range existingLBs { + existingLB := existingLBs[i] + if strings.EqualFold(*existingLB.Name, defaultLBName) { + defaultLB = &existingLB } + if isInternalLoadBalancer(&existingLB) != isInternal { + continue + } + status, err = az.getServiceLoadBalancerStatus(service, &existingLB) + if err != nil { + return nil, nil, false, err + } + if status == nil { + // service is not on this load balancer + continue + } + + return &existingLB, status, true, nil } hasMode, _, _ := getServiceLoadBalancerMode(service) @@ -1736,7 +1734,7 @@ func subnet(service *v1.Service) *string { // getServiceLoadBalancerMode parses the mode value. // if the value is __auto__ it returns isAuto = TRUE. -// if anything else it returns the unique VM set names after triming spaces. +// if anything else it returns the unique VM set names after trimming spaces. func getServiceLoadBalancerMode(service *v1.Service) (hasMode bool, isAuto bool, vmSetNames []string) { mode, hasMode := service.Annotations[ServiceAnnotationLoadBalancerMode] mode = strings.TrimSpace(mode) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go index c4ed30da2ba..2168498c733 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go @@ -25,7 +25,7 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/go-autorest/autorest/to" v1 "k8s.io/api/core/v1" @@ -33,7 +33,7 @@ import ( kwait "k8s.io/apimachinery/pkg/util/wait" cloudvolume "k8s.io/cloud-provider/volume" volumehelpers "k8s.io/cloud-provider/volume/helpers" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -75,6 +75,8 @@ type ManagedDiskOptions struct { SourceType string // ResourceId of the disk encryption set to use for enabling encryption at rest. DiskEncryptionSetID string + // The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + MaxShares int32 } //CreateManagedDisk : create managed disk @@ -126,15 +128,15 @@ func (c *ManagedDiskController) CreateManagedDisk(options *ManagedDiskOptions) ( } diskProperties.DiskIOPSReadWrite = to.Int64Ptr(diskIOPSReadWrite) - diskMBpsReadWrite := int32(defaultDiskMBpsReadWrite) + diskMBpsReadWrite := int64(defaultDiskMBpsReadWrite) if options.DiskMBpsReadWrite != "" { v, err := strconv.Atoi(options.DiskMBpsReadWrite) if err != nil { return "", fmt.Errorf("AzureDisk - failed to parse DiskMBpsReadWrite: %v", err) } - diskMBpsReadWrite = int32(v) + diskMBpsReadWrite = int64(v) } - diskProperties.DiskMBpsReadWrite = to.Int32Ptr(diskMBpsReadWrite) + diskProperties.DiskMBpsReadWrite = to.Int64Ptr(diskMBpsReadWrite) } else { if options.DiskIOPSReadWrite != "" { return "", fmt.Errorf("AzureDisk - DiskIOPSReadWrite parameter is only applicable in UltraSSD_LRS disk type") @@ -154,6 +156,10 @@ func (c *ManagedDiskController) CreateManagedDisk(options *ManagedDiskOptions) ( } } + if options.MaxShares > 1 { + diskProperties.MaxShares = &options.MaxShares + } + model := compute.Disk{ Location: &c.common.location, Tags: newTags, @@ -278,7 +284,11 @@ func (c *ManagedDiskController) ResizeDisk(diskURI string, oldSize resource.Quan } // Azure resizes in chunks of GiB (not GB) - requestGiB := int32(volumehelpers.RoundUpToGiB(newSize)) + requestGiB, err := volumehelpers.RoundUpToGiBInt32(newSize) + if err != nil { + return oldSize, err + } + newSizeQuant := resource.MustParse(fmt.Sprintf("%dGi", requestGiB)) klog.V(2).Infof("azureDisk - begin to resize disk(%s) with new size(%d), old size(%v)", diskName, requestGiB, oldSize) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go index e25ce1c6516..d6797b28088 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go @@ -29,8 +29,9 @@ import ( "github.com/Azure/go-autorest/autorest/to" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" utilnet "k8s.io/utils/net" ) @@ -90,9 +91,12 @@ func newDelayedRouteUpdater(az *Cloud, interval time.Duration) *delayedRouteUpda // run starts the updater reconciling loop. func (d *delayedRouteUpdater) run() { - for { + err := wait.PollImmediateInfinite(d.interval, func() (bool, error) { d.updateRoutes() - time.Sleep(d.interval) + return false, nil + }) + if err != nil { // this should never happen, if it does, panic + panic(err) } } @@ -405,7 +409,7 @@ func mapNodeNameToRouteName(ipv6DualStackEnabled bool, nodeName types.NodeName, // Used with mapNodeNameToRouteName. See comment on mapNodeNameToRouteName. func mapRouteNameToNodeName(ipv6DualStackEnabled bool, routeName string) types.NodeName { if !ipv6DualStackEnabled { - return types.NodeName(fmt.Sprintf("%s", routeName)) + return types.NodeName(routeName) } parts := strings.Split(routeName, routeNameSeparator) nodeName := parts[0] diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_standard.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_standard.go index 5920ed22aaf..e9a2f049c12 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_standard.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_standard.go @@ -28,7 +28,7 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" "github.com/Azure/go-autorest/autorest/to" @@ -38,7 +38,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/uuid" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" "k8s.io/component-base/featuregate" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_storage.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_storage.go index 9ca06434a1a..a653bfcf823 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_storage.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_storage.go @@ -23,7 +23,8 @@ import ( "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" - "k8s.io/klog" + "k8s.io/klog/v2" + "k8s.io/legacy-cloud-providers/azure/clients/fileclient" ) const ( @@ -36,26 +37,37 @@ const ( // CreateFileShare creates a file share, using a matching storage account type, account kind, etc. // storage account will be created if specified account is not found -func (az *Cloud) CreateFileShare(shareName, accountName, accountType, accountKind, resourceGroup, location string, requestGiB int) (string, string, error) { - if resourceGroup == "" { - resourceGroup = az.resourceGroup +func (az *Cloud) CreateFileShare(accountOptions *AccountOptions, shareOptions *fileclient.ShareOptions) (string, string, error) { + if accountOptions == nil { + return "", "", fmt.Errorf("account options is nil") + } + if shareOptions == nil { + return "", "", fmt.Errorf("share options is nil") + } + if accountOptions.ResourceGroup == "" { + accountOptions.ResourceGroup = az.resourceGroup } - account, key, err := az.EnsureStorageAccount(accountName, accountType, accountKind, resourceGroup, location, fileShareAccountNamePrefix) + accountOptions.EnableHTTPSTrafficOnly = true + if shareOptions.Protocol == storage.NFS { + accountOptions.EnableHTTPSTrafficOnly = false + } + + accountName, accountKey, err := az.EnsureStorageAccount(accountOptions, fileShareAccountNamePrefix) if err != nil { - return "", "", fmt.Errorf("could not get storage key for storage account %s: %v", accountName, err) + return "", "", fmt.Errorf("could not get storage key for storage account %s: %v", accountOptions.Name, err) } - if err := az.createFileShare(account, key, shareName, requestGiB); err != nil { - return "", "", fmt.Errorf("failed to create share %s in account %s: %v", shareName, account, err) + if err := az.createFileShare(accountOptions.ResourceGroup, accountName, shareOptions); err != nil { + return "", "", fmt.Errorf("failed to create share %s in account %s: %v", shareOptions.Name, accountName, err) } - klog.V(4).Infof("created share %s in account %s", shareName, account) - return account, key, nil + klog.V(4).Infof("created share %s in account %s", shareOptions.Name, accountOptions.Name) + return accountName, accountKey, nil } // DeleteFileShare deletes a file share using storage account name and key -func (az *Cloud) DeleteFileShare(accountName, accountKey, shareName string) error { - if err := az.deleteFileShare(accountName, accountKey, shareName); err != nil { +func (az *Cloud) DeleteFileShare(resourceGroup, accountName, shareName string) error { + if err := az.deleteFileShare(resourceGroup, accountName, shareName); err != nil { return err } klog.V(4).Infof("share %s deleted", shareName) @@ -63,6 +75,11 @@ func (az *Cloud) DeleteFileShare(accountName, accountKey, shareName string) erro } // ResizeFileShare resizes a file share -func (az *Cloud) ResizeFileShare(accountName, accountKey, name string, sizeGiB int) error { - return az.resizeFileShare(accountName, accountKey, name, sizeGiB) +func (az *Cloud) ResizeFileShare(resourceGroup, accountName, name string, sizeGiB int) error { + return az.resizeFileShare(resourceGroup, accountName, name, sizeGiB) +} + +// GetFileShare gets a file share +func (az *Cloud) GetFileShare(resourceGroupName, accountName, name string) (storage.FileShare, error) { + return az.getFileShare(resourceGroupName, accountName, name) } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go index c1abf1b26c1..bfc153171d5 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go @@ -23,11 +23,17 @@ import ( "strings" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" - "github.com/Azure/go-autorest/autorest/to" - "k8s.io/klog" + "k8s.io/klog/v2" ) +// AccountOptions contains the fields which are used to create storage account. +type AccountOptions struct { + Name, Type, Kind, ResourceGroup, Location string + EnableHTTPSTrafficOnly bool + Tags map[string]string +} + type accountWithLocation struct { Name, StorageType, Location string } @@ -90,7 +96,16 @@ func (az *Cloud) GetStorageAccesskey(account, resourceGroup string) (string, err } // EnsureStorageAccount search storage account, create one storage account(with genAccountNamePrefix) if not found, return accountName, accountKey -func (az *Cloud) EnsureStorageAccount(accountName, accountType, accountKind, resourceGroup, location, genAccountNamePrefix string) (string, string, error) { +func (az *Cloud) EnsureStorageAccount(accountOptions *AccountOptions, genAccountNamePrefix string) (string, string, error) { + if accountOptions == nil { + return "", "", fmt.Errorf("account options is nil") + } + accountName := accountOptions.Name + accountType := accountOptions.Type + accountKind := accountOptions.Kind + resourceGroup := accountOptions.ResourceGroup + location := accountOptions.Location + enableHTTPSTrafficOnly := accountOptions.EnableHTTPSTrafficOnly if len(accountName) == 0 { // find a storage account that matches accountType accounts, err := az.getStorageAccounts(accountType, accountKind, resourceGroup, location) @@ -118,13 +133,20 @@ func (az *Cloud) EnsureStorageAccount(accountName, accountType, accountKind, res if accountKind != "" { kind = storage.Kind(accountKind) } - klog.V(2).Infof("azure - no matching account found, begin to create a new account %s in resource group %s, location: %s, accountType: %s, accountKind: %s", - accountName, resourceGroup, location, accountType, kind) + if len(accountOptions.Tags) == 0 { + accountOptions.Tags = make(map[string]string) + } + accountOptions.Tags["created-by"] = "azure" + tags := convertMaptoMapPointer(accountOptions.Tags) + + klog.V(2).Infof("azure - no matching account found, begin to create a new account %s in resource group %s, location: %s, accountType: %s, accountKind: %s, tags: %+v", + accountName, resourceGroup, location, accountType, kind, accountOptions.Tags) + cp := storage.AccountCreateParameters{ Sku: &storage.Sku{Name: storage.SkuName(accountType)}, Kind: kind, - AccountPropertiesCreateParameters: &storage.AccountPropertiesCreateParameters{EnableHTTPSTrafficOnly: to.BoolPtr(true)}, - Tags: map[string]*string{"created-by": to.StringPtr("azure")}, + AccountPropertiesCreateParameters: &storage.AccountPropertiesCreateParameters{EnableHTTPSTrafficOnly: &enableHTTPSTrafficOnly}, + Tags: tags, Location: &location} ctx, cancel := getContextWithCancel() diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_utils.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_utils.go index 78ca666bddd..a539e044fb4 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_utils.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_utils.go @@ -20,9 +20,16 @@ package azure import ( "context" + "fmt" + "strings" "sync" ) +const ( + tagsDelimiter = "," + tagKeyValueDelimiter = "=" +) + // lockMap used to lock on entries type lockMap struct { sync.Mutex @@ -74,3 +81,37 @@ func (lm *lockMap) unlockEntry(entry string) { func getContextWithCancel() (context.Context, context.CancelFunc) { return context.WithCancel(context.Background()) } + +// ConvertTagsToMap convert the tags from string to map +// the valid tags fomat is "key1=value1,key2=value2", which could be converted to +// {"key1": "value1", "key2": "value2"} +func ConvertTagsToMap(tags string) (map[string]string, error) { + m := make(map[string]string) + if tags == "" { + return m, nil + } + s := strings.Split(tags, tagsDelimiter) + for _, tag := range s { + kv := strings.Split(tag, tagKeyValueDelimiter) + if len(kv) != 2 { + return nil, fmt.Errorf("Tags '%s' are invalid, the format should like: 'key1=value1,key2=value2'", tags) + } + key := strings.TrimSpace(kv[0]) + if key == "" { + return nil, fmt.Errorf("Tags '%s' are invalid, the format should like: 'key1=value1,key2=value2'", tags) + } + value := strings.TrimSpace(kv[1]) + m[key] = value + } + + return m, nil +} + +func convertMaptoMapPointer(origin map[string]string) map[string]*string { + newly := make(map[string]*string) + for k, v := range origin { + value := v + newly[k] = &value + } + return newly +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go index 948c281a1eb..89ac79cb6d4 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go @@ -19,7 +19,7 @@ limitations under the License. package azure import ( - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" v1 "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss.go index 3a25ddf8405..c1ce257c5d3 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss.go @@ -27,7 +27,7 @@ import ( "strings" "sync" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" "github.com/Azure/go-autorest/autorest/to" @@ -35,7 +35,7 @@ import ( "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" utilnet "k8s.io/utils/net" ) @@ -44,7 +44,7 @@ var ( // virtualMachineScaleSetsDeallocating indicates VMSS instances are in Deallocating state. virtualMachineScaleSetsDeallocating = "Deallocating" - // ErrorNotVmssInstance indicates an instance is not belongint to any vmss. + // ErrorNotVmssInstance indicates an instance is not belonging to any vmss. ErrorNotVmssInstance = errors.New("not a vmss instance") scaleSetNameRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/Microsoft.Compute/virtualMachineScaleSets/(.+)/virtualMachines(?:.*)`) @@ -83,13 +83,16 @@ type scaleSet struct { // newScaleSet creates a new scaleSet. func newScaleSet(az *Cloud) (VMSet, error) { - var err error + if az.Config.VmssVirtualMachinesCacheTTLInSeconds == 0 { + az.Config.VmssVirtualMachinesCacheTTLInSeconds = vmssVirtualMachinesCacheTTLDefaultInSeconds + } ss := &scaleSet{ Cloud: az, availabilitySet: newAvailabilitySet(az), vmssVMCache: &sync.Map{}, } + var err error if !ss.DisableAvailabilitySetNodes { ss.availabilitySetNodesCache, err = ss.newAvailabilitySetNodesCache() if err != nil { @@ -335,7 +338,7 @@ func (ss *scaleSet) GetNodeNameByProviderID(providerID string) (types.NodeName, // NodeName is not part of providerID for vmss instances. scaleSetName, err := extractScaleSetNameByProviderID(providerID) if err != nil { - klog.V(4).Infof("Can not extract scale set name from providerID (%s), assuming it is mananaged by availability set: %v", providerID, err) + klog.V(4).Infof("Can not extract scale set name from providerID (%s), assuming it is managed by availability set: %v", providerID, err) return ss.availabilitySet.GetNodeNameByProviderID(providerID) } @@ -346,7 +349,7 @@ func (ss *scaleSet) GetNodeNameByProviderID(providerID string) (types.NodeName, instanceID, err := getLastSegment(providerID, "/") if err != nil { - klog.V(4).Infof("Can not extract instanceID from providerID (%s), assuming it is mananaged by availability set: %v", providerID, err) + klog.V(4).Infof("Can not extract instanceID from providerID (%s), assuming it is managed by availability set: %v", providerID, err) return ss.availabilitySet.GetNodeNameByProviderID(providerID) } @@ -467,11 +470,11 @@ func (ss *scaleSet) GetIPByNodeName(nodeName string) (string, string, error) { if len(matches) == 7 { resourceGroupName := matches[1] virtualMachineScaleSetName := matches[2] - virtualmachineIndex := matches[3] + virtualMachineIndex := matches[3] networkInterfaceName := matches[4] IPConfigurationName := matches[5] publicIPAddressName := matches[6] - pip, existsPip, err := ss.getVMSSPublicIPAddress(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName) + pip, existsPip, err := ss.getVMSSPublicIPAddress(resourceGroupName, virtualMachineScaleSetName, virtualMachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName) if err != nil { klog.Errorf("ss.getVMSSPublicIPAddress() failed with error: %v", err) return "", "", err @@ -487,11 +490,11 @@ func (ss *scaleSet) GetIPByNodeName(nodeName string) (string, string, error) { return internalIP, publicIP, nil } -func (ss *scaleSet) getVMSSPublicIPAddress(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string) (network.PublicIPAddress, bool, error) { +func (ss *scaleSet) getVMSSPublicIPAddress(resourceGroupName string, virtualMachineScaleSetName string, virtualMachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string) (network.PublicIPAddress, bool, error) { ctx, cancel := getContextWithCancel() defer cancel() - pip, err := ss.PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, "") + pip, err := ss.PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress(ctx, resourceGroupName, virtualMachineScaleSetName, virtualMachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, "") exists, rerr := checkResourceExistsFromError(err) if rerr != nil { return pip, false, rerr.Error() @@ -591,6 +594,36 @@ func extractResourceGroupByProviderID(providerID string) (string, error) { return matches[1], nil } +// listScaleSets lists all scale sets with orchestrationMode ScaleSetVM. +func (ss *scaleSet) listScaleSets(resourceGroup string) ([]string, error) { + ctx, cancel := getContextWithCancel() + defer cancel() + + allScaleSets, rerr := ss.VirtualMachineScaleSetsClient.List(ctx, resourceGroup) + if rerr != nil { + klog.Errorf("VirtualMachineScaleSetsClient.List failed: %v", rerr) + return nil, rerr.Error() + } + + ssNames := make([]string, 0) + for _, vmss := range allScaleSets { + name := *vmss.Name + if vmss.Sku != nil && to.Int64(vmss.Sku.Capacity) == 0 { + klog.V(3).Infof("Capacity of VMSS %q is 0, skipping", name) + continue + } + + if vmss.VirtualMachineScaleSetProperties == nil || vmss.VirtualMachineScaleSetProperties.VirtualMachineProfile == nil { + klog.V(3).Infof("VMSS %q orchestrationMode is VirtualMachine, skipping", name) + continue + } + + ssNames = append(ssNames, name) + } + + return ssNames, nil +} + // getNodeIdentityByNodeName use the VMSS cache to find a node's resourcegroup and vmss, returned in a nodeIdentity. func (ss *scaleSet) getNodeIdentityByNodeName(nodeName string, crt azcache.AzureCacheReadType) (*nodeIdentity, error) { getter := func(nodeName string, crt azcache.AzureCacheReadType) (*nodeIdentity, error) { @@ -801,7 +834,7 @@ func (ss *scaleSet) GetPrimaryInterface(nodeName string) (network.Interface, err exists, realErr := checkResourceExistsFromError(rerr) if realErr != nil { klog.Errorf("error: ss.GetPrimaryInterface(%s), ss.GetVirtualMachineScaleSetNetworkInterface.Get(%s, %s, %s), err=%v", nodeName, resourceGroup, ssName, nicName, realErr) - return network.Interface{}, err + return network.Interface{}, realErr.Error() } if !exists { @@ -882,7 +915,7 @@ func (ss *scaleSet) getConfigForScaleSetByIPFamily(config *compute.VirtualMachin } } - return nil, fmt.Errorf("failed to find a IPconfiguration(IPv6=%v) for the scale set VM %q", IPv6, nodeName) + return nil, fmt.Errorf("failed to find a IPconfiguration(IPv6=%v) for the scale set VM %q", IPv6, nodeName) } // EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is @@ -926,6 +959,9 @@ func (ss *scaleSet) EnsureHostInPool(service *v1.Service, nodeName types.NodeNam return "", "", "", nil, err } } else { + // For IPv6 or dualstack service, we need to pick the right IP configuration based on the cluster ip family + // IPv6 configuration is only supported as non-primary, so we need to fetch the ip configuration where the + // privateIPAddressVersion matches the clusterIP family primaryIPConfiguration, err = ss.getConfigForScaleSetByIPFamily(primaryNetworkInterfaceConfiguration, vmName, ipv6) if err != nil { return "", "", "", nil, err @@ -1051,7 +1087,7 @@ func (ss *scaleSet) ensureVMSSInPool(service *v1.Service, nodes []*v1.Node, back } if vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations == nil { - klog.V(4).Infof("EnsureHostInPool: cannot obtain the primary network interface configuration, of vmss %s", vmssName) + klog.V(4).Infof("EnsureHostInPool: cannot obtain the primary network interface configuration of vmss %s", vmssName) continue } vmssNIC := *vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations @@ -1059,10 +1095,22 @@ func (ss *scaleSet) ensureVMSSInPool(service *v1.Service, nodes []*v1.Node, back if err != nil { return err } - primaryIPConfig, err := getPrimaryIPConfigFromVMSSNetworkConfig(primaryNIC) - if err != nil { - return err + var primaryIPConfig *compute.VirtualMachineScaleSetIPConfiguration + ipv6 := utilnet.IsIPv6String(service.Spec.ClusterIP) + // Find primary network interface configuration. + if !ss.Cloud.ipv6DualStackEnabled && !ipv6 { + // Find primary IP configuration. + primaryIPConfig, err = getPrimaryIPConfigFromVMSSNetworkConfig(primaryNIC) + if err != nil { + return err + } + } else { + primaryIPConfig, err = ss.getConfigForScaleSetByIPFamily(primaryNIC, "", ipv6) + if err != nil { + return err + } } + loadBalancerBackendAddressPools := []compute.SubResource{} if primaryIPConfig.LoadBalancerBackendAddressPools != nil { loadBalancerBackendAddressPools = *primaryIPConfig.LoadBalancerBackendAddressPools diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go index b7436040030..7cea160c044 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go @@ -25,11 +25,11 @@ import ( "sync" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/go-autorest/autorest/to" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" ) @@ -154,9 +154,6 @@ func (ss *scaleSet) gcVMSSVMCache() error { // newVMSSVirtualMachinesCache instanciates a new VMs cache for VMs belonging to the provided VMSS. func (ss *scaleSet) newVMSSVirtualMachinesCache(resourceGroupName, vmssName, cacheKey string) (*azcache.TimedCache, error) { - if ss.Config.VmssVirtualMachinesCacheTTLInSeconds == 0 { - ss.Config.VmssVirtualMachinesCacheTTLInSeconds = vmssVirtualMachinesCacheTTLDefaultInSeconds - } vmssVirtualMachinesCacheTTL := time.Duration(ss.Config.VmssVirtualMachinesCacheTTLInSeconds) * time.Second getter := func(key string) (interface{}, error) { diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_wrap.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_wrap.go index d0f4a254db1..12d61419429 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_wrap.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_wrap.go @@ -25,13 +25,13 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" "github.com/Azure/go-autorest/autorest/to" "k8s.io/apimachinery/pkg/types" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" "k8s.io/legacy-cloud-providers/azure/retry" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_zones.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_zones.go index c6a5e96a418..36c78002dee 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_zones.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_zones.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/types" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" azcache "k8s.io/legacy-cloud-providers/azure/cache" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/BUILD index 38048941035..f2adee987c6 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/BUILD @@ -28,7 +28,10 @@ filegroup( srcs = [ ":package-srcs", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:all-srcs", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient:all-srcs", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient:all-srcs", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/diskclient:all-srcs", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/fileclient:all-srcs", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient:all-srcs", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient:all-srcs", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/publicipclient:all-srcs", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/armclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/armclient/BUILD index 6fed3c8cf7f..74dc22cddbc 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/armclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/armclient/BUILD @@ -15,7 +15,7 @@ go_library( "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/armclient/azure_armclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/armclient/azure_armclient.go index 036f0651fc5..c595e9d068a 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/armclient/azure_armclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/armclient/azure_armclient.go @@ -34,7 +34,7 @@ import ( "github.com/Azure/go-autorest/autorest/azure" "k8s.io/client-go/pkg/version" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/legacy-cloud-providers/azure/retry" ) @@ -285,7 +285,7 @@ func (c *Client) SendAsync(ctx context.Context, request *http.Request) (*azure.F future, err := azure.NewFutureFromResponse(asyncResponse) if err != nil { - klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "sendAsync.responed", request.URL.String(), err) + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "sendAsync.respond", request.URL.String(), err) return nil, asyncResponse, retry.GetError(asyncResponse, err) } @@ -337,7 +337,7 @@ func (c *Client) PutResource(ctx context.Context, resourceID string, parameters } // PutResources puts a list of resources from resources map[resourceID]parameters. -// Those resources sync requests are sequential while async requests are concurent. It 's especially +// Those resources sync requests are sequential while async requests are concurrent. It's especially // useful when the ARM API doesn't support concurrent requests. func (c *Client) PutResources(ctx context.Context, resources map[string]interface{}) map[string]*PutResourcesResponse { if len(resources) == 0 { diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/azure_client_config.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/azure_client_config.go index 65ebe74eba6..cd1f8775289 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/azure_client_config.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/azure_client_config.go @@ -32,6 +32,7 @@ type ClientConfig struct { Authorizer autorest.Authorizer RateLimitConfig *RateLimitConfig Backoff *retry.Backoff + UserAgent string } // WithRateLimiter returns a new ClientConfig with rateLimitConfig set. diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/BUILD new file mode 100644 index 00000000000..abbb1526082 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/BUILD @@ -0,0 +1,60 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "azure_containerserviceclient.go", + "doc.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient", + importpath = "k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/metrics:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/mockcontainerserviceclient:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) + +go_test( + name = "go_default_test", + srcs = ["azure_containerserviceclient_test.go"], + embed = [":go_default_library"], + deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/stretchr/testify/assert:go_default_library", + ], +) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/azure_containerserviceclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/azure_containerserviceclient.go new file mode 100644 index 00000000000..0681a275e0c --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/azure_containerserviceclient.go @@ -0,0 +1,412 @@ +// +build !providerless + +/* +Copyright 2020 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 containerserviceclient + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/to" + + "k8s.io/client-go/util/flowcontrol" + "k8s.io/klog/v2" + azclients "k8s.io/legacy-cloud-providers/azure/clients" + "k8s.io/legacy-cloud-providers/azure/clients/armclient" + "k8s.io/legacy-cloud-providers/azure/metrics" + "k8s.io/legacy-cloud-providers/azure/retry" +) + +var _ Interface = &Client{} + +// Client implements ContainerService client Interface. +type Client struct { + armClient armclient.Interface + subscriptionID string + + // Rate limiting configures. + rateLimiterReader flowcontrol.RateLimiter + rateLimiterWriter flowcontrol.RateLimiter + + // ARM throttling configures. + RetryAfterReader time.Time + RetryAfterWriter time.Time +} + +// New creates a new ContainerServiceClient client with ratelimiting. +func New(config *azclients.ClientConfig) *Client { + baseURI := config.ResourceManagerEndpoint + authorizer := config.Authorizer + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) + rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) + + klog.V(2).Infof("Azure ContainerServiceClient (read ops) using rate limit config: QPS=%g, bucket=%d", + config.RateLimitConfig.CloudProviderRateLimitQPS, + config.RateLimitConfig.CloudProviderRateLimitBucket) + klog.V(2).Infof("Azure ContainerServiceClient (write ops) using rate limit config: QPS=%g, bucket=%d", + config.RateLimitConfig.CloudProviderRateLimitQPSWrite, + config.RateLimitConfig.CloudProviderRateLimitBucketWrite) + + client := &Client{ + armClient: armClient, + rateLimiterReader: rateLimiterReader, + rateLimiterWriter: rateLimiterWriter, + subscriptionID: config.SubscriptionID, + } + + return client +} + +// Get gets a ManagedCluster. +func (c *Client) Get(ctx context.Context, resourceGroupName string, managedClusterName string) (containerservice.ManagedCluster, *retry.Error) { + mc := metrics.NewMetricContext("managed_clusters", "get", resourceGroupName, c.subscriptionID, "") + + // Report errors if the client is rate limited. + if !c.rateLimiterReader.TryAccept() { + mc.RateLimitedCount() + return containerservice.ManagedCluster{}, retry.GetRateLimitError(false, "GetManagedCluster") + } + + // Report errors if the client is throttled. + if c.RetryAfterReader.After(time.Now()) { + mc.ThrottledCount() + rerr := retry.GetThrottlingError("GetManagedCluster", "client throttled", c.RetryAfterReader) + return containerservice.ManagedCluster{}, rerr + } + + result, rerr := c.getManagedCluster(ctx, resourceGroupName, managedClusterName) + mc.Observe(rerr.Error()) + if rerr != nil { + if rerr.IsThrottled() { + // Update RetryAfterReader so that no more requests would be sent until RetryAfter expires. + c.RetryAfterReader = rerr.RetryAfter + } + + return result, rerr + } + + return result, nil +} + +// getManagedCluster gets a ManagedCluster. +func (c *Client) getManagedCluster(ctx context.Context, resourceGroupName string, managedClusterName string) (containerservice.ManagedCluster, *retry.Error) { + resourceID := armclient.GetResourceID( + c.subscriptionID, + resourceGroupName, + "Microsoft.ContainerService/managedClusters", + managedClusterName, + ) + result := containerservice.ManagedCluster{} + + response, rerr := c.armClient.GetResource(ctx, resourceID, "") + defer c.armClient.CloseResponse(ctx, response) + if rerr != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "managedcluster.get.request", resourceID, rerr.Error()) + return result, rerr + } + + err := autorest.Respond( + response, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result)) + if err != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "managedcluster.get.respond", resourceID, err) + return result, retry.GetError(response, err) + } + + result.Response = autorest.Response{Response: response} + return result, nil +} + +// List gets a list of ManagedClusters in the resource group. +func (c *Client) List(ctx context.Context, resourceGroupName string) ([]containerservice.ManagedCluster, *retry.Error) { + mc := metrics.NewMetricContext("managed_clusters", "list", resourceGroupName, c.subscriptionID, "") + + // Report errors if the client is rate limited. + if !c.rateLimiterReader.TryAccept() { + mc.RateLimitedCount() + return nil, retry.GetRateLimitError(false, "ListManagedCluster") + } + + // Report errors if the client is throttled. + if c.RetryAfterReader.After(time.Now()) { + mc.ThrottledCount() + rerr := retry.GetThrottlingError("ListManagedCluster", "client throttled", c.RetryAfterReader) + return nil, rerr + } + + result, rerr := c.listManagedCluster(ctx, resourceGroupName) + mc.Observe(rerr.Error()) + if rerr != nil { + if rerr.IsThrottled() { + // Update RetryAfterReader so that no more requests would be sent until RetryAfter expires. + c.RetryAfterReader = rerr.RetryAfter + } + + return result, rerr + } + + return result, nil +} + +// listManagedCluster gets a list of ManagedClusters in the resource group. +func (c *Client) listManagedCluster(ctx context.Context, resourceGroupName string) ([]containerservice.ManagedCluster, *retry.Error) { + resourceID := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.ContainerService/managedClusters", + autorest.Encode("path", c.subscriptionID), + autorest.Encode("path", resourceGroupName)) + result := make([]containerservice.ManagedCluster, 0) + page := &ManagedClusterResultPage{} + page.fn = c.listNextResults + + resp, rerr := c.armClient.GetResource(ctx, resourceID, "") + defer c.armClient.CloseResponse(ctx, resp) + if rerr != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "managedcluster.list.request", resourceID, rerr.Error()) + return result, rerr + } + + var err error + page.mclr, err = c.listResponder(resp) + if err != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "managedcluster.list.respond", resourceID, err) + return result, retry.GetError(resp, err) + } + + for page.NotDone() { + result = append(result, *page.Response().Value...) + if err = page.NextWithContext(ctx); err != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "managedcluster.list.next", resourceID, err) + return result, retry.GetError(page.Response().Response.Response, err) + } + } + + return result, nil +} + +func (c *Client) listResponder(resp *http.Response) (result containerservice.ManagedClusterListResult, err error) { + err = autorest.Respond( + resp, + autorest.ByIgnoring(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result)) + result.Response = autorest.Response{Response: resp} + return +} + +// managedClusterListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (c *Client) managedClusterListResultPreparer(ctx context.Context, mclr containerservice.ManagedClusterListResult) (*http.Request, error) { + if mclr.NextLink == nil || len(to.String(mclr.NextLink)) < 1 { + return nil, nil + } + + decorators := []autorest.PrepareDecorator{ + autorest.WithBaseURL(to.String(mclr.NextLink)), + } + return c.armClient.PrepareGetRequest(ctx, decorators...) +} + +// listNextResults retrieves the next set of results, if any. +func (c *Client) listNextResults(ctx context.Context, lastResults containerservice.ManagedClusterListResult) (result containerservice.ManagedClusterListResult, err error) { + req, err := c.managedClusterListResultPreparer(ctx, lastResults) + if err != nil { + return result, autorest.NewErrorWithError(err, "managedclusterclient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, rerr := c.armClient.Send(ctx, req) + defer c.armClient.CloseResponse(ctx, resp) + if rerr != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(rerr.Error(), "managedclusterclient", "listNextResults", resp, "Failure sending next results request") + } + + result, err = c.listResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedclusterclient", "listNextResults", resp, "Failure responding to next results request") + } + + return +} + +// ManagedClusterResultPage contains a page of ManagedCluster values. +type ManagedClusterResultPage struct { + fn func(context.Context, containerservice.ManagedClusterListResult) (containerservice.ManagedClusterListResult, error) + mclr containerservice.ManagedClusterListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ManagedClusterResultPage) NextWithContext(ctx context.Context) (err error) { + next, err := page.fn(ctx, page.mclr) + if err != nil { + return err + } + page.mclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ManagedClusterResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ManagedClusterResultPage) NotDone() bool { + return !page.mclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ManagedClusterResultPage) Response() containerservice.ManagedClusterListResult { + return page.mclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ManagedClusterResultPage) Values() []containerservice.ManagedCluster { + if page.mclr.IsEmpty() { + return nil + } + return *page.mclr.Value +} + +// CreateOrUpdate creates or updates a ManagedCluster. +func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedClusterName string, parameters containerservice.ManagedCluster, etag string) *retry.Error { + mc := metrics.NewMetricContext("managed_clusters", "create_or_update", resourceGroupName, c.subscriptionID, "") + + // Report errors if the client is rate limited. + if !c.rateLimiterWriter.TryAccept() { + mc.RateLimitedCount() + return retry.GetRateLimitError(true, "CreateOrUpdateManagedCluster") + } + + // Report errors if the client is throttled. + if c.RetryAfterWriter.After(time.Now()) { + mc.ThrottledCount() + rerr := retry.GetThrottlingError("CreateOrUpdateManagedCluster", "client throttled", c.RetryAfterWriter) + return rerr + } + + rerr := c.createOrUpdateManagedCluster(ctx, resourceGroupName, managedClusterName, parameters, etag) + mc.Observe(rerr.Error()) + if rerr != nil { + if rerr.IsThrottled() { + // Update RetryAfterReader so that no more requests would be sent until RetryAfter expires. + c.RetryAfterWriter = rerr.RetryAfter + } + + return rerr + } + + return nil +} + +// createOrUpdateManagedCluster creates or updates a ManagedCluster. +func (c *Client) createOrUpdateManagedCluster(ctx context.Context, resourceGroupName string, managedClusterName string, parameters containerservice.ManagedCluster, etag string) *retry.Error { + resourceID := armclient.GetResourceID( + c.subscriptionID, + resourceGroupName, + "Microsoft.ContainerService/managedClusters", + managedClusterName, + ) + decorators := []autorest.PrepareDecorator{ + autorest.WithPathParameters("{resourceID}", map[string]interface{}{"resourceID": resourceID}), + autorest.WithJSON(parameters), + } + if etag != "" { + decorators = append(decorators, autorest.WithHeader("If-Match", autorest.String(etag))) + } + + response, rerr := c.armClient.PutResourceWithDecorators(ctx, resourceID, parameters, decorators) + defer c.armClient.CloseResponse(ctx, response) + if rerr != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "managedCluster.put.request", resourceID, rerr.Error()) + return rerr + } + + if response != nil && response.StatusCode != http.StatusNoContent { + _, rerr = c.createOrUpdateResponder(response) + if rerr != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "managedCluster.put.respond", resourceID, rerr.Error()) + return rerr + } + } + + return nil +} + +func (c *Client) createOrUpdateResponder(resp *http.Response) (*containerservice.ManagedCluster, *retry.Error) { + result := &containerservice.ManagedCluster{} + err := autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result)) + result.Response = autorest.Response{Response: resp} + return result, retry.GetError(resp, err) +} + +// Delete deletes a ManagedCluster by name. +func (c *Client) Delete(ctx context.Context, resourceGroupName string, managedClusterName string) *retry.Error { + mc := metrics.NewMetricContext("managed_clusters", "delete", resourceGroupName, c.subscriptionID, "") + + // Report errors if the client is rate limited. + if !c.rateLimiterWriter.TryAccept() { + mc.RateLimitedCount() + return retry.GetRateLimitError(true, "DeleteManagedCluster") + } + + // Report errors if the client is throttled. + if c.RetryAfterWriter.After(time.Now()) { + mc.ThrottledCount() + rerr := retry.GetThrottlingError("DeleteManagedCluster", "client throttled", c.RetryAfterWriter) + return rerr + } + + rerr := c.deleteManagedCluster(ctx, resourceGroupName, managedClusterName) + mc.Observe(rerr.Error()) + if rerr != nil { + if rerr.IsThrottled() { + // Update RetryAfterReader so that no more requests would be sent until RetryAfter expires. + c.RetryAfterWriter = rerr.RetryAfter + } + + return rerr + } + + return nil +} + +// deleteManagedCluster deletes a ManagedCluster by name. +func (c *Client) deleteManagedCluster(ctx context.Context, resourceGroupName string, managedClusterName string) *retry.Error { + resourceID := armclient.GetResourceID( + c.subscriptionID, + resourceGroupName, + "Microsoft.ContainerService/managedClusters", + managedClusterName, + ) + + return c.armClient.DeleteResource(ctx, resourceID, "") +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/doc.go new file mode 100644 index 00000000000..cb4292f4302 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/doc.go @@ -0,0 +1,20 @@ +// +build !providerless + +/* +Copyright 2020 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 containerserviceclient implements the client for azure container service. +package containerserviceclient // import "k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/interface.go new file mode 100644 index 00000000000..aa94e1cb38c --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/interface.go @@ -0,0 +1,42 @@ +// +build !providerless + +/* +Copyright 2020 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 containerserviceclient + +import ( + "context" + + "k8s.io/legacy-cloud-providers/azure/retry" + + "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice" +) + +const ( + // APIVersion is the API version for containerservice. + APIVersion = "2020-04-01" +) + +// Interface is the client interface for ContainerService. +// Don't forget to run the following command to generate the mock client: +// mockgen -source=$GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/interface.go -package=mockcontainerserviceclient Interface > $GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient/mockcontainerserviceclient/interface.go +type Interface interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, managedClusterName string, parameters containerservice.ManagedCluster, etag string) *retry.Error + Delete(ctx context.Context, resourceGroupName string, managedClusterName string) *retry.Error + Get(ctx context.Context, resourceGroupName string, managedClusterName string) (containerservice.ManagedCluster, *retry.Error) + List(ctx context.Context, resourceGroupName string) ([]containerservice.ManagedCluster, *retry.Error) +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/BUILD new file mode 100644 index 00000000000..cf55de61bc9 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/BUILD @@ -0,0 +1,60 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = [ + "azure_deploymentclient.go", + "doc.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient", + importpath = "k8s.io/legacy-cloud-providers/azure/clients/deploymentclient", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/metrics:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/mockdeploymentclient:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) + +go_test( + name = "go_default_test", + srcs = ["azure_deploymentclient_test.go"], + embed = [":go_default_library"], + deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + "//vendor/github.com/stretchr/testify/assert:go_default_library", + ], +) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/azure_deploymentclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/azure_deploymentclient.go new file mode 100644 index 00000000000..b9e00740eca --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/azure_deploymentclient.go @@ -0,0 +1,452 @@ +// +build !providerless + +/* +Copyright 2020 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 deploymentclient + +import ( + "context" + "fmt" + "net/http" + "time" + + "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/to" + + "k8s.io/client-go/util/flowcontrol" + "k8s.io/klog/v2" + azclients "k8s.io/legacy-cloud-providers/azure/clients" + "k8s.io/legacy-cloud-providers/azure/clients/armclient" + "k8s.io/legacy-cloud-providers/azure/metrics" + "k8s.io/legacy-cloud-providers/azure/retry" +) + +var _ Interface = &Client{} + +// Client implements ContainerService client Interface. +type Client struct { + armClient armclient.Interface + subscriptionID string + + // Rate limiting configures. + rateLimiterReader flowcontrol.RateLimiter + rateLimiterWriter flowcontrol.RateLimiter + + // ARM throttling configures. + RetryAfterReader time.Time + RetryAfterWriter time.Time +} + +// New creates a new ContainerServiceClient client with ratelimiting. +func New(config *azclients.ClientConfig) *Client { + baseURI := config.ResourceManagerEndpoint + authorizer := config.Authorizer + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) + rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) + + klog.V(2).Infof("Azure DeploymentClient (read ops) using rate limit config: QPS=%g, bucket=%d", + config.RateLimitConfig.CloudProviderRateLimitQPS, + config.RateLimitConfig.CloudProviderRateLimitBucket) + klog.V(2).Infof("Azure DeploymentClient (write ops) using rate limit config: QPS=%g, bucket=%d", + config.RateLimitConfig.CloudProviderRateLimitQPSWrite, + config.RateLimitConfig.CloudProviderRateLimitBucketWrite) + + client := &Client{ + armClient: armClient, + rateLimiterReader: rateLimiterReader, + rateLimiterWriter: rateLimiterWriter, + subscriptionID: config.SubscriptionID, + } + + return client +} + +// Get gets a deployment +func (c *Client) Get(ctx context.Context, resourceGroupName string, deploymentName string) (resources.DeploymentExtended, *retry.Error) { + mc := metrics.NewMetricContext("deployments", "get", resourceGroupName, c.subscriptionID, "") + + // Report errors if the client is rate limited. + if !c.rateLimiterReader.TryAccept() { + mc.RateLimitedCount() + return resources.DeploymentExtended{}, retry.GetRateLimitError(false, "GetDeployment") + } + + // Report errors if the client is throttled. + if c.RetryAfterReader.After(time.Now()) { + mc.ThrottledCount() + rerr := retry.GetThrottlingError("GetDeployment", "client throttled", c.RetryAfterReader) + return resources.DeploymentExtended{}, rerr + } + + result, rerr := c.getDeployment(ctx, resourceGroupName, deploymentName) + mc.Observe(rerr.Error()) + if rerr != nil { + if rerr.IsThrottled() { + // Update RetryAfterReader so that no more requests would be sent until RetryAfter expires. + c.RetryAfterReader = rerr.RetryAfter + } + + return result, rerr + } + + return result, nil +} + +// getDeployment gets a deployment. +func (c *Client) getDeployment(ctx context.Context, resourceGroupName string, deploymentName string) (resources.DeploymentExtended, *retry.Error) { + resourceID := armclient.GetResourceID( + c.subscriptionID, + resourceGroupName, + "Microsoft.Resources/deployments", + deploymentName, + ) + result := resources.DeploymentExtended{} + + response, rerr := c.armClient.GetResource(ctx, resourceID, "") + defer c.armClient.CloseResponse(ctx, response) + if rerr != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.get.request", resourceID, rerr.Error()) + return result, rerr + } + + err := autorest.Respond( + response, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result)) + if err != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.get.respond", resourceID, err) + return result, retry.GetError(response, err) + } + + result.Response = autorest.Response{Response: response} + return result, nil +} + +// List gets a list of deployments in the resource group. +func (c *Client) List(ctx context.Context, resourceGroupName string) ([]resources.DeploymentExtended, *retry.Error) { + mc := metrics.NewMetricContext("deployments", "list", resourceGroupName, c.subscriptionID, "") + + // Report errors if the client is rate limited. + if !c.rateLimiterReader.TryAccept() { + mc.RateLimitedCount() + return nil, retry.GetRateLimitError(false, "ListDeployment") + } + + // Report errors if the client is throttled. + if c.RetryAfterReader.After(time.Now()) { + mc.ThrottledCount() + rerr := retry.GetThrottlingError("ListDeployment", "client throttled", c.RetryAfterReader) + return nil, rerr + } + + result, rerr := c.listDeployment(ctx, resourceGroupName) + mc.Observe(rerr.Error()) + if rerr != nil { + if rerr.IsThrottled() { + // Update RetryAfterReader so that no more requests would be sent until RetryAfter expires. + c.RetryAfterReader = rerr.RetryAfter + } + + return result, rerr + } + + return result, nil +} + +// listDeployment gets a list of deployments in the resource group. +func (c *Client) listDeployment(ctx context.Context, resourceGroupName string) ([]resources.DeploymentExtended, *retry.Error) { + resourceID := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Resources/deployments", + autorest.Encode("path", c.subscriptionID), + autorest.Encode("path", resourceGroupName)) + result := make([]resources.DeploymentExtended, 0) + page := &DeploymentResultPage{} + page.fn = c.listNextResults + + resp, rerr := c.armClient.GetResource(ctx, resourceID, "") + defer c.armClient.CloseResponse(ctx, resp) + if rerr != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.list.request", resourceID, rerr.Error()) + return result, rerr + } + + var err error + page.dplr, err = c.listResponder(resp) + if err != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.list.respond", resourceID, err) + return result, retry.GetError(resp, err) + } + + for page.NotDone() { + result = append(result, *page.Response().Value...) + if err = page.NextWithContext(ctx); err != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.list.next", resourceID, err) + return result, retry.GetError(page.Response().Response.Response, err) + } + } + + return result, nil +} + +func (c *Client) listResponder(resp *http.Response) (result resources.DeploymentListResult, err error) { + err = autorest.Respond( + resp, + autorest.ByIgnoring(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result)) + result.Response = autorest.Response{Response: resp} + return +} + +// deploymentListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (c *Client) deploymentListResultPreparer(ctx context.Context, dplr resources.DeploymentListResult) (*http.Request, error) { + if dplr.NextLink == nil || len(to.String(dplr.NextLink)) < 1 { + return nil, nil + } + + decorators := []autorest.PrepareDecorator{ + autorest.WithBaseURL(to.String(dplr.NextLink)), + } + return c.armClient.PrepareGetRequest(ctx, decorators...) +} + +// listNextResults retrieves the next set of results, if any. +func (c *Client) listNextResults(ctx context.Context, lastResults resources.DeploymentListResult) (result resources.DeploymentListResult, err error) { + req, err := c.deploymentListResultPreparer(ctx, lastResults) + if err != nil { + return result, autorest.NewErrorWithError(err, "deploymentclient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, rerr := c.armClient.Send(ctx, req) + defer c.armClient.CloseResponse(ctx, resp) + if rerr != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(rerr.Error(), "deploymentclient", "listNextResults", resp, "Failure sending next results request") + } + + result, err = c.listResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "deploymentclient", "listNextResults", resp, "Failure responding to next results request") + } + + return +} + +// DeploymentResultPage contains a page of deployments values. +type DeploymentResultPage struct { + fn func(context.Context, resources.DeploymentListResult) (resources.DeploymentListResult, error) + dplr resources.DeploymentListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *DeploymentResultPage) NextWithContext(ctx context.Context) (err error) { + next, err := page.fn(ctx, page.dplr) + if err != nil { + return err + } + page.dplr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *DeploymentResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page DeploymentResultPage) NotDone() bool { + return !page.dplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page DeploymentResultPage) Response() resources.DeploymentListResult { + return page.dplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page DeploymentResultPage) Values() []resources.DeploymentExtended { + if page.dplr.IsEmpty() { + return nil + } + return *page.dplr.Value +} + +// CreateOrUpdate creates or updates a deployment. +func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, deploymentName string, parameters resources.Deployment, etag string) *retry.Error { + mc := metrics.NewMetricContext("deployments", "create_or_update", resourceGroupName, c.subscriptionID, "") + + // Report errors if the client is rate limited. + if !c.rateLimiterWriter.TryAccept() { + mc.RateLimitedCount() + return retry.GetRateLimitError(true, "CreateOrUpdateDeployment") + } + + // Report errors if the client is throttled. + if c.RetryAfterWriter.After(time.Now()) { + mc.ThrottledCount() + rerr := retry.GetThrottlingError("CreateOrUpdateDeployment", "client throttled", c.RetryAfterWriter) + return rerr + } + + rerr := c.createOrUpdateDeployment(ctx, resourceGroupName, deploymentName, parameters, etag) + mc.Observe(rerr.Error()) + if rerr != nil { + if rerr.IsThrottled() { + // Update RetryAfterReader so that no more requests would be sent until RetryAfter expires. + c.RetryAfterWriter = rerr.RetryAfter + } + + return rerr + } + + return nil +} + +func (c *Client) createOrUpdateDeployment(ctx context.Context, resourceGroupName string, deploymentName string, parameters resources.Deployment, etag string) *retry.Error { + resourceID := armclient.GetResourceID( + c.subscriptionID, + resourceGroupName, + "Microsoft.Resources/deployments", + deploymentName, + ) + decorators := []autorest.PrepareDecorator{ + autorest.WithPathParameters("{resourceID}", map[string]interface{}{"resourceID": resourceID}), + autorest.WithJSON(parameters), + } + if etag != "" { + decorators = append(decorators, autorest.WithHeader("If-Match", autorest.String(etag))) + } + + response, rerr := c.armClient.PutResourceWithDecorators(ctx, resourceID, parameters, decorators) + defer c.armClient.CloseResponse(ctx, response) + if rerr != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.put.request", resourceID, rerr.Error()) + return rerr + } + + if response != nil && response.StatusCode != http.StatusNoContent { + _, rerr = c.createOrUpdateResponder(response) + if rerr != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.put.respond", resourceID, rerr.Error()) + return rerr + } + } + + return nil +} + +func (c *Client) createOrUpdateResponder(resp *http.Response) (*resources.DeploymentExtended, *retry.Error) { + result := &resources.DeploymentExtended{} + err := autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result)) + result.Response = autorest.Response{Response: resp} + return result, retry.GetError(resp, err) +} + +// Delete deletes a deployment by name. +func (c *Client) Delete(ctx context.Context, resourceGroupName string, deploymentName string) *retry.Error { + mc := metrics.NewMetricContext("deployments", "delete", resourceGroupName, c.subscriptionID, "") + + // Report errors if the client is rate limited. + if !c.rateLimiterWriter.TryAccept() { + mc.RateLimitedCount() + return retry.GetRateLimitError(true, "DeleteDeployment") + } + + // Report errors if the client is throttled. + if c.RetryAfterWriter.After(time.Now()) { + mc.ThrottledCount() + rerr := retry.GetThrottlingError("DeleteDeployment", "client throttled", c.RetryAfterWriter) + return rerr + } + + rerr := c.deleteDeployment(ctx, resourceGroupName, deploymentName) + mc.Observe(rerr.Error()) + if rerr != nil { + if rerr.IsThrottled() { + // Update RetryAfterReader so that no more requests would be sent until RetryAfter expires. + c.RetryAfterWriter = rerr.RetryAfter + } + + return rerr + } + + return nil +} + +// deleteDeployment deletes a deployment by name. +func (c *Client) deleteDeployment(ctx context.Context, resourceGroupName string, deploymentName string) *retry.Error { + resourceID := armclient.GetResourceID( + c.subscriptionID, + resourceGroupName, + "Microsoft.Resources/deployments", + deploymentName, + ) + + return c.armClient.DeleteResource(ctx, resourceID, "") +} + +// ExportTemplate exports the template used for specified deployment +func (c *Client) ExportTemplate(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExportResult, rerr *retry.Error) { + mc := metrics.NewMetricContext("deployments", "export_template", resourceGroupName, c.subscriptionID, "") + + // Report errors if the client is rate limited. + if !c.rateLimiterWriter.TryAccept() { + mc.RateLimitedCount() + return resources.DeploymentExportResult{}, retry.GetRateLimitError(true, "ExportTemplateDeployment") + } + + // Report errors if the client is throttled. + if c.RetryAfterWriter.After(time.Now()) { + mc.ThrottledCount() + rerr := retry.GetThrottlingError("CreateOrUpdateDeployment", "client throttled", c.RetryAfterWriter) + return resources.DeploymentExportResult{}, rerr + } + + resourceID := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Resources/deployments/%s/exportTemplate", + autorest.Encode("path", c.subscriptionID), + autorest.Encode("path", resourceGroupName), + autorest.Encode("path", deploymentName)) + response, rerr := c.armClient.PostResource(ctx, resourceID, "exportTemplate", struct{}{}) + defer c.armClient.CloseResponse(ctx, response) + if rerr != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.exportTemplate.request", resourceID, rerr.Error()) + return + } + + err := autorest.Respond( + response, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result)) + if err != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.exportTemplate.respond", resourceID, err) + return result, retry.GetError(response, err) + } + + result.Response = autorest.Response{Response: response} + return +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/doc.go new file mode 100644 index 00000000000..93b4333bcd5 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/doc.go @@ -0,0 +1,20 @@ +// +build !providerless + +/* +Copyright 2020 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 deploymentclient implements the client for azure deployments. +package deploymentclient // import "k8s.io/legacy-cloud-providers/azure/clients/deploymentclient" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/interface.go new file mode 100644 index 00000000000..296d0c1aba5 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/interface.go @@ -0,0 +1,42 @@ +// +build !providerless + +/* +Copyright 2020 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 deploymentclient + +import ( + "context" + + "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources" + "k8s.io/legacy-cloud-providers/azure/retry" +) + +const ( + // APIVersion is the API version for resources. + APIVersion = "2017-05-10" +) + +// Interface is the client interface for Deployments. +// Don't forget to run the following command to generate the mock client: +// mockgen -source=$GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/interface.go -package=mockdeploymentclient Interface > $GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers/azure/clients/deploymentclient/mockdeploymentclient/interface.go +type Interface interface { + Get(ctx context.Context, resourceGroupName string, deploymentName string) (resources.DeploymentExtended, *retry.Error) + List(ctx context.Context, resourceGroupName string) ([]resources.DeploymentExtended, *retry.Error) + ExportTemplate(ctx context.Context, resourceGroupName string, deploymentName string) (result resources.DeploymentExportResult, rerr *retry.Error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, managedClusterName string, parameters resources.Deployment, etag string) *retry.Error + Delete(ctx context.Context, resourceGroupName string, deploymentName string) *retry.Error +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/BUILD index 47a714646cd..f162bab2db3 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/BUILD @@ -16,10 +16,10 @@ go_library( "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/metrics:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -31,7 +31,8 @@ go_test( "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/golang/mock/gomock:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/azure_diskclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/azure_diskclient.go index d61e91abc17..396510e6463 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/azure_diskclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/azure_diskclient.go @@ -23,12 +23,12 @@ import ( "net/http" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -55,7 +55,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure DisksClient (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/interface.go index 004fe1e09df..3f4be1e5939 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/interface.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/interface.go @@ -21,13 +21,13 @@ package diskclient import ( "context" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "k8s.io/legacy-cloud-providers/azure/retry" ) const ( // APIVersion is the API version for compute. - APIVersion = "2019-07-01" + APIVersion = "2019-11-01" ) // Interface is the client interface for Disks. diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/BUILD new file mode 100644 index 00000000000..7bf9623fd94 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/BUILD @@ -0,0 +1,31 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient", + importpath = "k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/doc.go new file mode 100644 index 00000000000..440b3b8a985 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/doc.go @@ -0,0 +1,20 @@ +// +build !providerless + +/* +Copyright 2020 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 mockdiskclient implements the mock client for Disks. +package mockdiskclient // import "k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/interface.go new file mode 100644 index 00000000000..dfd26723592 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/interface.go @@ -0,0 +1,94 @@ +// +build !providerless + +/* +Copyright 2020 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 mockdiskclient + +import ( + context "context" + reflect "reflect" + + compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" + gomock "github.com/golang/mock/gomock" + retry "k8s.io/legacy-cloud-providers/azure/retry" +) + +// MockInterface is a mock of Interface interface +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Get mocks base method +func (m *MockInterface) Get(ctx context.Context, resourceGroupName, diskName string) (compute.Disk, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, diskName) + ret0, _ := ret[0].(compute.Disk) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// Get indicates an expected call of Get +func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, diskName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, diskName) +} + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, diskName string, diskParameter compute.Disk) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, diskName, diskParameter) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, diskName, diskParameter interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, diskName, diskParameter) +} + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, diskName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, diskName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, diskName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, diskName) +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/BUILD new file mode 100644 index 00000000000..379b18e11a0 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/BUILD @@ -0,0 +1,35 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "azure_fileclient.go", + "doc.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient", + importpath = "k8s.io/legacy-cloud-providers/azure/clients/fileclient", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/fileclient/mockfileclient:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/azure_fileclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/azure_fileclient.go new file mode 100644 index 00000000000..197a7c29f82 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/azure_fileclient.go @@ -0,0 +1,120 @@ +// +build !providerless + +/* +Copyright 2020 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 fileclient + +import ( + "context" + "fmt" + "net/http" + "strings" + + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" + + "k8s.io/klog/v2" + azclients "k8s.io/legacy-cloud-providers/azure/clients" +) + +// Client implements the azure file client interface +type Client struct { + fileSharesClient storage.FileSharesClient +} + +// ShareOptions contains the fields which are used to create file share. +type ShareOptions struct { + Name string + Protocol storage.EnabledProtocols + RequestGiB int +} + +// New creates a azure file client +func New(config *azclients.ClientConfig) *Client { + client := storage.NewFileSharesClientWithBaseURI(config.ResourceManagerEndpoint, config.SubscriptionID) + client.Authorizer = config.Authorizer + + return &Client{ + fileSharesClient: client, + } +} + +// CreateFileShare creates a file share +func (c *Client) CreateFileShare(resourceGroupName, accountName string, shareOptions *ShareOptions) error { + if shareOptions == nil { + return fmt.Errorf("share options is nil") + } + result, err := c.GetFileShare(resourceGroupName, accountName, shareOptions.Name) + if err == nil { + klog.V(2).Infof("file share(%s) under account(%s) rg(%s) already exists", shareOptions.Name, accountName, resourceGroupName) + return nil + } else if result.Response.Response == nil || (err != nil && result.Response.Response.StatusCode != http.StatusNotFound && !strings.Contains(err.Error(), "ShareNotFound")) { + return fmt.Errorf("failed to get file share(%s), err: %v", shareOptions.Name, err) + } + + quota := int32(shareOptions.RequestGiB) + fileShareProperties := &storage.FileShareProperties{ + ShareQuota: "a, + } + if shareOptions.Protocol == storage.NFS { + fileShareProperties.EnabledProtocols = shareOptions.Protocol + } + fileShare := storage.FileShare{ + Name: &shareOptions.Name, + FileShareProperties: fileShareProperties, + } + _, err = c.fileSharesClient.Create(context.Background(), resourceGroupName, accountName, shareOptions.Name, fileShare) + + return err +} + +// DeleteFileShare deletes a file share +func (c *Client) DeleteFileShare(resourceGroupName, accountName, name string) error { + _, err := c.fileSharesClient.Delete(context.Background(), resourceGroupName, accountName, name) + + return err +} + +// ResizeFileShare resizes a file share +func (c *Client) ResizeFileShare(resourceGroupName, accountName, name string, sizeGiB int) error { + quota := int32(sizeGiB) + + share, err := c.fileSharesClient.Get(context.Background(), resourceGroupName, accountName, name, storage.Stats) + if err != nil { + return fmt.Errorf("failed to get file share(%s), : %v", name, err) + } + if *share.FileShareProperties.ShareQuota >= quota { + klog.Warningf("file share size(%dGi) is already greater or equal than requested size(%dGi), accountName: %s, shareName: %s", + share.FileShareProperties.ShareQuota, sizeGiB, accountName, name) + return nil + + } + + share.FileShareProperties.ShareQuota = "a + _, err = c.fileSharesClient.Update(context.Background(), resourceGroupName, accountName, name, share) + if err != nil { + return fmt.Errorf("failed to update quota on file share(%s), err: %v", name, err) + } + + klog.V(4).Infof("resize file share completed, resourceGroupName(%s), accountName: %s, shareName: %s, sizeGiB: %d", resourceGroupName, accountName, name, sizeGiB) + + return nil +} + +// GetFileShare gets a file share +func (c *Client) GetFileShare(resourceGroupName, accountName, name string) (storage.FileShare, error) { + return c.fileSharesClient.Get(context.Background(), resourceGroupName, accountName, name, storage.Stats) +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/doc.go new file mode 100644 index 00000000000..81d7a527003 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/doc.go @@ -0,0 +1,20 @@ +// +build !providerless + +/* +Copyright 2020 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 fileclient implements the client for azure file. +package fileclient // import "k8s.io/legacy-cloud-providers/azure/clients/fileclient" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/interface.go new file mode 100644 index 00000000000..0646763aa9c --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/fileclient/interface.go @@ -0,0 +1,32 @@ +// +build !providerless + +/* +Copyright 2020 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 fileclient + +import ( + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage" +) + +// Interface is the client interface for creating file shares, interface for test injection. +// mockgen -source=$GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers/azure/clients/fileclient/interface.go -package=mockfileclient Interface > $GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers/azure/clients/fileclient/mockfileclient/interface.go +type Interface interface { + CreateFileShare(resourceGroupName, accountName string, shareOptions *ShareOptions) error + DeleteFileShare(resourceGroupName, accountName, name string) error + ResizeFileShare(resourceGroupName, accountName, name string, sizeGiB int) error + GetFileShare(resourceGroupName, accountName, name string) (storage.FileShare, error) +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/BUILD index d392c806bac..2c84d4679ca 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/BUILD @@ -19,7 +19,7 @@ go_library( "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -31,6 +31,7 @@ go_test( "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/azure_interfaceclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/azure_interfaceclient.go index 69e68b3c961..c4c1a6fcb10 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/azure_interfaceclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/azure_interfaceclient.go @@ -29,7 +29,7 @@ import ( "github.com/Azure/go-autorest/autorest/azure" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -56,7 +56,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure InterfacesClient (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/BUILD new file mode 100644 index 00000000000..e04b515f1bb --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/BUILD @@ -0,0 +1,31 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient", + importpath = "k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/doc.go new file mode 100644 index 00000000000..7698ec6def0 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/doc.go @@ -0,0 +1,20 @@ +// +build !providerless + +/* +Copyright 2020 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 mockinterfaceclient implements the mock client for network interfaces. +package mockinterfaceclient // import "k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/interface.go new file mode 100644 index 00000000000..8050fd634ab --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/interface.go @@ -0,0 +1,109 @@ +// +build !providerless + +/* +Copyright 2020 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 mockinterfaceclient + +import ( + context "context" + reflect "reflect" + + network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" + gomock "github.com/golang/mock/gomock" + retry "k8s.io/legacy-cloud-providers/azure/retry" +) + +// MockInterface is a mock of Interface interface +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Get mocks base method +func (m *MockInterface) Get(ctx context.Context, resourceGroupName, networkInterfaceName, expand string) (network.Interface, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, networkInterfaceName, expand) + ret0, _ := ret[0].(network.Interface) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// Get indicates an expected call of Get +func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, networkInterfaceName, expand interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, networkInterfaceName, expand) +} + +// GetVirtualMachineScaleSetNetworkInterface mocks base method +func (m *MockInterface) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand string) (network.Interface, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetVirtualMachineScaleSetNetworkInterface", ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) + ret0, _ := ret[0].(network.Interface) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// GetVirtualMachineScaleSetNetworkInterface indicates an expected call of GetVirtualMachineScaleSetNetworkInterface +func (mr *MockInterfaceMockRecorder) GetVirtualMachineScaleSetNetworkInterface(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVirtualMachineScaleSetNetworkInterface", reflect.TypeOf((*MockInterface)(nil).GetVirtualMachineScaleSetNetworkInterface), ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) +} + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, networkInterfaceName string, parameters network.Interface) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, networkInterfaceName, parameters) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, networkInterfaceName, parameters interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, networkInterfaceName, parameters) +} + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, networkInterfaceName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, networkInterfaceName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, networkInterfaceName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, networkInterfaceName) +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/BUILD index 0359de1f74c..60885a8a974 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/BUILD @@ -20,7 +20,7 @@ go_library( "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -32,6 +32,7 @@ go_test( "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/azure_loadbalancerclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/azure_loadbalancerclient.go index cf497a9c7ba..8ef0f5fbedf 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/azure_loadbalancerclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/azure_loadbalancerclient.go @@ -30,7 +30,7 @@ import ( "github.com/Azure/go-autorest/autorest/to" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -57,7 +57,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure LoadBalancersClient (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/BUILD new file mode 100644 index 00000000000..3f823f0ea08 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/BUILD @@ -0,0 +1,31 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient", + importpath = "k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/doc.go new file mode 100644 index 00000000000..5735f84bfae --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/doc.go @@ -0,0 +1,20 @@ +// +build !providerless + +/* +Copyright 2020 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 mockloadbalancerclient implements the mock client for LoadBalancer. +package mockloadbalancerclient // import "k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/interface.go new file mode 100644 index 00000000000..8459a6b602f --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/interface.go @@ -0,0 +1,109 @@ +// +build !providerless + +/* +Copyright 2020 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 mockloadbalancerclient + +import ( + context "context" + reflect "reflect" + + network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" + gomock "github.com/golang/mock/gomock" + retry "k8s.io/legacy-cloud-providers/azure/retry" +) + +// MockInterface is a mock of Interface interface +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Get mocks base method +func (m *MockInterface) Get(ctx context.Context, resourceGroupName, loadBalancerName, expand string) (network.LoadBalancer, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, loadBalancerName, expand) + ret0, _ := ret[0].(network.LoadBalancer) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// Get indicates an expected call of Get +func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, loadBalancerName, expand interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, loadBalancerName, expand) +} + +// List mocks base method +func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]network.LoadBalancer, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) + ret0, _ := ret[0].([]network.LoadBalancer) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// List indicates an expected call of List +func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) +} + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, loadBalancerName string, parameters network.LoadBalancer, etag string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, loadBalancerName, parameters, etag) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, loadBalancerName, parameters, etag interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, loadBalancerName, parameters, etag) +} + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, loadBalancerName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, loadBalancerName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, loadBalancerName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, loadBalancerName) +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/BUILD index f6b744b475f..94d81d2478b 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/BUILD @@ -20,7 +20,7 @@ go_library( "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -29,9 +29,11 @@ go_test( srcs = ["azure_publicipclient_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/azure_publicipclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/azure_publicipclient.go index 05364e5b4f8..c15b9ff2eaa 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/azure_publicipclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/azure_publicipclient.go @@ -30,7 +30,7 @@ import ( "github.com/Azure/go-autorest/autorest/to" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -57,7 +57,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure PublicIPAddressesClient (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/BUILD new file mode 100644 index 00000000000..468f5b94921 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/BUILD @@ -0,0 +1,31 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient", + importpath = "k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/doc.go new file mode 100644 index 00000000000..1b4891aee2f --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/doc.go @@ -0,0 +1,20 @@ +// +build !providerless + +/* +Copyright 2020 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 mockpublicipclient implements the mock client for PublicIPAddress. +package mockpublicipclient // import "k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/interface.go new file mode 100644 index 00000000000..f94022423f4 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/interface.go @@ -0,0 +1,124 @@ +// +build !providerless + +/* +Copyright 2020 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 mockpublicipclient + +import ( + context "context" + reflect "reflect" + + network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" + gomock "github.com/golang/mock/gomock" + retry "k8s.io/legacy-cloud-providers/azure/retry" +) + +// MockInterface is a mock of Interface interface +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Get mocks base method +func (m *MockInterface) Get(ctx context.Context, resourceGroupName, publicIPAddressName, expand string) (network.PublicIPAddress, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, publicIPAddressName, expand) + ret0, _ := ret[0].(network.PublicIPAddress) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// Get indicates an expected call of Get +func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, publicIPAddressName, expand interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, publicIPAddressName, expand) +} + +// GetVirtualMachineScaleSetPublicIPAddress mocks base method +func (m *MockInterface) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand string) (network.PublicIPAddress, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetVirtualMachineScaleSetPublicIPAddress", ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand) + ret0, _ := ret[0].(network.PublicIPAddress) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// GetVirtualMachineScaleSetPublicIPAddress indicates an expected call of GetVirtualMachineScaleSetPublicIPAddress +func (mr *MockInterfaceMockRecorder) GetVirtualMachineScaleSetPublicIPAddress(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVirtualMachineScaleSetPublicIPAddress", reflect.TypeOf((*MockInterface)(nil).GetVirtualMachineScaleSetPublicIPAddress), ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand) +} + +// List mocks base method +func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]network.PublicIPAddress, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) + ret0, _ := ret[0].([]network.PublicIPAddress) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// List indicates an expected call of List +func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) +} + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, publicIPAddressName string, parameters network.PublicIPAddress) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, publicIPAddressName, parameters) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, publicIPAddressName, parameters interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, publicIPAddressName, parameters) +} + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, publicIPAddressName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, publicIPAddressName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, publicIPAddressName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, publicIPAddressName) +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/BUILD index 2d2ee97c014..1ddcf7db638 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/BUILD @@ -19,7 +19,7 @@ go_library( "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -28,9 +28,11 @@ go_test( srcs = ["azure_routeclient_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/golang/mock/gomock:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/azure_routeclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/azure_routeclient.go index 1e78c633aa0..ba36ffb9c0a 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/azure_routeclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/azure_routeclient.go @@ -28,7 +28,7 @@ import ( "github.com/Azure/go-autorest/autorest/azure" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -55,7 +55,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure RoutesClient (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/BUILD index 9086aee0257..2c4a0860512 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/BUILD @@ -19,7 +19,7 @@ go_library( "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -28,9 +28,11 @@ go_test( srcs = ["azure_routetableclient_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/azure_routetableclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/azure_routetableclient.go index 167bb0df377..cc5d3fec762 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/azure_routetableclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/azure_routetableclient.go @@ -28,7 +28,7 @@ import ( "github.com/Azure/go-autorest/autorest/azure" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -55,7 +55,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure RouteTablesClient (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/BUILD index 7c6031f5481..9bf929c4f52 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/BUILD @@ -20,7 +20,7 @@ go_library( "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -29,9 +29,11 @@ go_test( srcs = ["azure_securitygroupclient_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/azure_securitygroupclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/azure_securitygroupclient.go index d828679d966..9071708d3fa 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/azure_securitygroupclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/azure_securitygroupclient.go @@ -30,7 +30,7 @@ import ( "github.com/Azure/go-autorest/autorest/to" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -57,7 +57,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure SecurityGroupsClient (read ops) using rate limit config: QPS=%g, bucket=%d", @@ -309,7 +309,7 @@ func (c *Client) Delete(ctx context.Context, resourceGroupName string, networkSe return nil } -// deleteNSG deletes a PublicIPAddress by name. +// deleteNSG deletes a SecurityGroup by name. func (c *Client) deleteNSG(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) *retry.Error { resourceID := armclient.GetResourceID( c.subscriptionID, diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/BUILD new file mode 100644 index 00000000000..26d4497e9a8 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/BUILD @@ -0,0 +1,31 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient", + importpath = "k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/doc.go new file mode 100644 index 00000000000..81031c69499 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/doc.go @@ -0,0 +1,20 @@ +// +build !providerless + +/* +Copyright 2020 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 mocksecuritygroupclient implements the mock client for SecurityGroups. +package mocksecuritygroupclient // import "k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/interface.go new file mode 100644 index 00000000000..095aa68c4bb --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/interface.go @@ -0,0 +1,109 @@ +// +build !providerless + +/* +Copyright 2020 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 mocksecuritygroupclient + +import ( + context "context" + reflect "reflect" + + network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" + gomock "github.com/golang/mock/gomock" + retry "k8s.io/legacy-cloud-providers/azure/retry" +) + +// MockInterface is a mock of Interface interface +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Get mocks base method +func (m *MockInterface) Get(ctx context.Context, resourceGroupName, networkSecurityGroupName, expand string) (network.SecurityGroup, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, networkSecurityGroupName, expand) + ret0, _ := ret[0].(network.SecurityGroup) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// Get indicates an expected call of Get +func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, networkSecurityGroupName, expand interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, networkSecurityGroupName, expand) +} + +// List mocks base method +func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]network.SecurityGroup, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) + ret0, _ := ret[0].([]network.SecurityGroup) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// List indicates an expected call of List +func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) +} + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, networkSecurityGroupName string, parameters network.SecurityGroup, etag string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, networkSecurityGroupName, parameters, etag) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, parameters, etag interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, networkSecurityGroupName, parameters, etag) +} + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, networkSecurityGroupName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, networkSecurityGroupName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, networkSecurityGroupName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, networkSecurityGroupName) +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/BUILD index f495e83f632..2fcb0313315 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/BUILD @@ -16,11 +16,11 @@ go_library( "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/metrics:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -29,10 +29,12 @@ go_test( srcs = ["azure_snapshotclient_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/golang/mock/gomock:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/azure_snapshotclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/azure_snapshotclient.go index c5830f7c9c6..56cf31f6a24 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/azure_snapshotclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/azure_snapshotclient.go @@ -24,13 +24,13 @@ import ( "net/http" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/to" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -57,7 +57,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure SnapshotClient (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/interface.go index e98bd1d1c27..a031b910f29 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/interface.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/snapshotclient/interface.go @@ -21,7 +21,7 @@ package snapshotclient import ( "context" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "k8s.io/legacy-cloud-providers/azure/retry" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/BUILD index 710c4c9c85b..396823b9aef 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/BUILD @@ -20,7 +20,7 @@ go_library( "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -29,9 +29,11 @@ go_test( srcs = ["azure_storageaccountclient_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/azure_storageaccountclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/azure_storageaccountclient.go index ee7820afd4a..1f1558980c9 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/azure_storageaccountclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient/azure_storageaccountclient.go @@ -30,7 +30,7 @@ import ( "github.com/Azure/go-autorest/autorest/to" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -57,7 +57,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure StorageAccountClient (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/BUILD index f1592e0532f..34e04209a3f 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/BUILD @@ -20,7 +20,7 @@ go_library( "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -29,9 +29,11 @@ go_test( srcs = ["azure_subnetclient_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/azure_subnetclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/azure_subnetclient.go index 87e93d463c6..9536b26cbe8 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/azure_subnetclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/azure_subnetclient.go @@ -29,7 +29,7 @@ import ( "github.com/Azure/go-autorest/autorest/to" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -56,7 +56,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure SubnetsClient (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/BUILD index dbdb1ad25ac..72c070260c0 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/BUILD @@ -16,11 +16,11 @@ go_library( "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/metrics:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -29,10 +29,12 @@ go_test( srcs = ["azure_vmclient_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/golang/mock/gomock:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/azure_vmclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/azure_vmclient.go index 3ed35e8f56d..3950e5304a6 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/azure_vmclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/azure_vmclient.go @@ -24,13 +24,13 @@ import ( "net/http" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/to" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -57,7 +57,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure VirtualMachine client (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/interface.go index ad63e8b515e..22c6b1cf168 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/interface.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/interface.go @@ -21,7 +21,7 @@ package vmclient import ( "context" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "k8s.io/legacy-cloud-providers/azure/retry" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/BUILD new file mode 100644 index 00000000000..3318fca517b --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/BUILD @@ -0,0 +1,31 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient", + importpath = "k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/doc.go new file mode 100644 index 00000000000..19cd7052237 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/doc.go @@ -0,0 +1,20 @@ +// +build !providerless + +/* +Copyright 2020 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 mockvmclient implements the mock client for VirtualMachines. +package mockvmclient // import "k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/interface.go new file mode 100644 index 00000000000..bacceeb9376 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/interface.go @@ -0,0 +1,123 @@ +// +build !providerless + +/* +Copyright 2020 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 mockvmclient + +import ( + context "context" + reflect "reflect" + + compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" + gomock "github.com/golang/mock/gomock" + retry "k8s.io/legacy-cloud-providers/azure/retry" +) + +// MockInterface is a mock of Interface interface +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Get mocks base method +func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMName string, expand compute.InstanceViewTypes) (compute.VirtualMachine, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, VMName, expand) + ret0, _ := ret[0].(compute.VirtualMachine) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// Get indicates an expected call of Get +func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, VMName, expand interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, VMName, expand) +} + +// List mocks base method +func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachine, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) + ret0, _ := ret[0].([]compute.VirtualMachine) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// List indicates an expected call of List +func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) +} + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, VMName string, parameters compute.VirtualMachine, source string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, VMName, parameters, source) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, VMName, parameters, source interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, VMName, parameters, source) +} + +// Update mocks base method +func (m *MockInterface) Update(ctx context.Context, resourceGroupName, VMName string, parameters compute.VirtualMachineUpdate, source string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, VMName, parameters, source) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Update indicates an expected call of Update +func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, VMName, parameters, source interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, VMName, parameters, source) +} + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, VMName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, VMName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, VMName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, VMName) +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/BUILD index 588fb5ad3a9..00bd45b76e3 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/BUILD @@ -16,10 +16,10 @@ go_library( "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/metrics:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -28,11 +28,14 @@ go_test( srcs = ["azure_vmsizeclient_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/golang/mock/gomock:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", ], diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/azure_vmsizeclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/azure_vmsizeclient.go index 371a6c30f5e..d9790b5b4dc 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/azure_vmsizeclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/azure_vmsizeclient.go @@ -24,12 +24,12 @@ import ( "net/http" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -56,7 +56,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure VirtualMachineSizesClient (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/interface.go index 604c08cd1e0..a93c00dd379 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/interface.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient/interface.go @@ -21,7 +21,7 @@ package vmsizeclient import ( "context" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "k8s.io/legacy-cloud-providers/azure/retry" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/BUILD index 76f19faf8c5..e90d2d3bbec 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/BUILD @@ -16,11 +16,11 @@ go_library( "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/metrics:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -29,11 +29,14 @@ go_test( srcs = ["azure_vmssclient_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/golang/mock/gomock:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/azure_vmssclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/azure_vmssclient.go index 4b23444d147..40914a2bf89 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/azure_vmssclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/azure_vmssclient.go @@ -24,13 +24,13 @@ import ( "net/http" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/to" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -57,7 +57,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure VirtualMachineScaleSetClient (read ops) using rate limit config: QPS=%g, bucket=%d", @@ -234,6 +234,49 @@ func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, V return nil } +// CreateOrUpdateAsync sends the request to arm client and DO NOT wait for the response +func (c *Client) CreateOrUpdateAsync(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) (*azure.Future, *retry.Error) { + mc := metrics.NewMetricContext("vmss", "create_or_update_async", resourceGroupName, c.subscriptionID, "") + + // Report errors if the client is rate limited. + if !c.rateLimiterWriter.TryAccept() { + mc.RateLimitedCount() + return nil, retry.GetRateLimitError(true, "VMSSCreateOrUpdateAsync") + } + + // Report errors if the client is throttled. + if c.RetryAfterWriter.After(time.Now()) { + mc.ThrottledCount() + rerr := retry.GetThrottlingError("VMSSCreateOrUpdateAsync", "client throttled", c.RetryAfterWriter) + return nil, rerr + } + + resourceID := armclient.GetResourceID( + c.subscriptionID, + resourceGroupName, + "Microsoft.Compute/virtualMachineScaleSets", + VMScaleSetName, + ) + + future, rerr := c.armClient.PutResourceAsync(ctx, resourceID, parameters) + mc.Observe(rerr.Error()) + if rerr != nil { + if rerr.IsThrottled() { + // Update RetryAfterReader so that no more requests would be sent until RetryAfter expires. + c.RetryAfterWriter = rerr.RetryAfter + } + + return nil, rerr + } + + return future, nil +} + +// WaitForAsyncOperationResult waits for the response of the request +func (c *Client) WaitForAsyncOperationResult(ctx context.Context, future *azure.Future) (*http.Response, error) { + return c.armClient.WaitForAsyncOperationResult(ctx, future, "VMSSWaitForAsyncOperationResult") +} + // createOrUpdateVMSS creates or updates a VirtualMachineScaleSet. func (c *Client) createOrUpdateVMSS(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) *retry.Error { resourceID := armclient.GetResourceID( @@ -391,6 +434,53 @@ func (c *Client) DeleteInstances(ctx context.Context, resourceGroupName string, return nil } +// DeleteInstancesAsync sends the delete request to ARM client and DOEST NOT wait on the future +func (c *Client) DeleteInstancesAsync(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) { + mc := metrics.NewMetricContext("vmss", "delete_instances_async", resourceGroupName, c.subscriptionID, "") + + // Report errors if the client is rate limited. + if !c.rateLimiterWriter.TryAccept() { + mc.RateLimitedCount() + return nil, retry.GetRateLimitError(true, "VMSSDeleteInstancesAsync") + } + + // Report errors if the client is throttled. + if c.RetryAfterWriter.After(time.Now()) { + mc.ThrottledCount() + rerr := retry.GetThrottlingError("VMSSDeleteInstancesAsync", "client throttled", c.RetryAfterWriter) + return nil, rerr + } + + resourceID := armclient.GetResourceID( + c.subscriptionID, + resourceGroupName, + "Microsoft.Compute/virtualMachineScaleSets", + vmScaleSetName, + ) + + response, rerr := c.armClient.PostResource(ctx, resourceID, "delete", vmInstanceIDs) + defer c.armClient.CloseResponse(ctx, response) + + if rerr != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmss.deletevms.request", resourceID, rerr.Error()) + return nil, rerr + } + + err := autorest.Respond(response, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted)) + if err != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmss.deletevms.respond", resourceID, rerr.Error()) + return nil, retry.GetError(response, err) + } + + future, err := azure.NewFutureFromResponse(response) + if err != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmss.deletevms.future", resourceID, rerr.Error()) + return nil, retry.NewError(false, err) + } + + return &future, nil +} + // deleteVMSSInstances deletes the instances for a VirtualMachineScaleSet. func (c *Client) deleteVMSSInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) *retry.Error { resourceID := armclient.GetResourceID( diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/interface.go index 545cb5f2a99..2c971eb0ccd 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/interface.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/interface.go @@ -20,8 +20,11 @@ package vmssclient import ( "context" + "net/http" + + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" + "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" "k8s.io/legacy-cloud-providers/azure/retry" ) @@ -43,6 +46,15 @@ type Interface interface { // CreateOrUpdate creates or updates a VirtualMachineScaleSet. CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) *retry.Error + // CreateOrUpdateSync sends the request to arm client and DO NOT wait for the response + CreateOrUpdateAsync(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) (*azure.Future, *retry.Error) + + // WaitForAsyncOperationResult waits for the response of the request + WaitForAsyncOperationResult(ctx context.Context, future *azure.Future) (*http.Response, error) + // DeleteInstances deletes the instances for a VirtualMachineScaleSet. DeleteInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) *retry.Error + + // DeleteInstancesAsync sends the delete request to the ARM client and DOEST NOT wait on the future + DeleteInstancesAsync(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/BUILD new file mode 100644 index 00000000000..2ffffb33bfd --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/BUILD @@ -0,0 +1,32 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient", + importpath = "k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/doc.go new file mode 100644 index 00000000000..7b691179e5d --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/doc.go @@ -0,0 +1,20 @@ +// +build !providerless + +/* +Copyright 2019 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 mockvmssclient implements the mock client for VMSS. +package mockvmssclient // import "k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/interface.go new file mode 100644 index 00000000000..232cdd569c3 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/interface.go @@ -0,0 +1,156 @@ +// +build !providerless + +/* +Copyright 2019 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 mockvmssclient + +import ( + context "context" + http "net/http" + reflect "reflect" + + compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" + azure "github.com/Azure/go-autorest/autorest/azure" + gomock "github.com/golang/mock/gomock" + retry "k8s.io/legacy-cloud-providers/azure/retry" +) + +// MockInterface is a mock of Interface interface +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Get mocks base method +func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetName string) (compute.VirtualMachineScaleSet, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, VMScaleSetName) + ret0, _ := ret[0].(compute.VirtualMachineScaleSet) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// Get indicates an expected call of Get +func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, VMScaleSetName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, VMScaleSetName) +} + +// List mocks base method +func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) + ret0, _ := ret[0].([]compute.VirtualMachineScaleSet) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// List indicates an expected call of List +func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) +} + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, VMScaleSetName, parameters) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, VMScaleSetName, parameters interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, VMScaleSetName, parameters) +} + +// CreateOrUpdateAsync mocks base method +func (m *MockInterface) CreateOrUpdateAsync(ctx context.Context, resourceGroupName, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) (*azure.Future, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdateAsync", ctx, resourceGroupName, VMScaleSetName, parameters) + ret0, _ := ret[0].(*azure.Future) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// CreateOrUpdateAsync indicates an expected call of CreateOrUpdateAsync +func (mr *MockInterfaceMockRecorder) CreateOrUpdateAsync(ctx, resourceGroupName, VMScaleSetName, parameters interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdateAsync", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdateAsync), ctx, resourceGroupName, VMScaleSetName, parameters) +} + +// WaitForAsyncOperationResult mocks base method +func (m *MockInterface) WaitForAsyncOperationResult(ctx context.Context, future *azure.Future) (*http.Response, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "WaitForAsyncOperationResult", ctx, future) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// WaitForAsyncOperationResult indicates an expected call of WaitForAsyncOperationResult +func (mr *MockInterfaceMockRecorder) WaitForAsyncOperationResult(ctx, future interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForAsyncOperationResult", reflect.TypeOf((*MockInterface)(nil).WaitForAsyncOperationResult), ctx, future) +} + +// DeleteInstances mocks base method +func (m *MockInterface) DeleteInstances(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteInstances", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// DeleteInstances indicates an expected call of DeleteInstances +func (mr *MockInterfaceMockRecorder) DeleteInstances(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstances", reflect.TypeOf((*MockInterface)(nil).DeleteInstances), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) +} + +// DeleteInstancesAsync mocks base method +func (m *MockInterface) DeleteInstancesAsync(ctx context.Context, resourceGroupName, VMScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteInstancesAsync", ctx, resourceGroupName, VMScaleSetName, vmInstanceIDs) + ret0, _ := ret[0].(*azure.Future) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// DeleteInstancesAsync indicates an expected call of DeleteInstancesAsync +func (mr *MockInterfaceMockRecorder) DeleteInstancesAsync(ctx, resourceGroupName, VMScaleSetName, vmInstanceIDs interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstancesAsync", reflect.TypeOf((*MockInterface)(nil).DeleteInstancesAsync), ctx, resourceGroupName, VMScaleSetName, vmInstanceIDs) +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/BUILD index 51ac9588479..b1b538132d6 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/BUILD @@ -17,11 +17,11 @@ go_library( "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/metrics:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -30,10 +30,12 @@ go_test( srcs = ["azure_vmssvmclient_test.go"], embed = [":go_default_library"], deps = [ + "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/mockarmclient:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/golang/mock/gomock:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/azure_vmssvmclient.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/azure_vmssvmclient.go index a087493c737..02c197176d1 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/azure_vmssvmclient.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/azure_vmssvmclient.go @@ -24,14 +24,14 @@ import ( "net/http" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/to" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/client-go/util/flowcontrol" - "k8s.io/klog" + "k8s.io/klog/v2" azclients "k8s.io/legacy-cloud-providers/azure/clients" "k8s.io/legacy-cloud-providers/azure/clients/armclient" "k8s.io/legacy-cloud-providers/azure/metrics" @@ -58,7 +58,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, baseURI, "", APIVersion, config.Location, config.Backoff) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) klog.V(2).Infof("Azure vmssVM client (read ops) using rate limit config: QPS=%g, bucket=%d", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/interface.go index 19d84c35f10..dc4bc11784d 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/interface.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/interface.go @@ -21,7 +21,7 @@ package vmssvmclient import ( "context" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" "k8s.io/legacy-cloud-providers/azure/retry" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/BUILD new file mode 100644 index 00000000000..99d0d278c06 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/BUILD @@ -0,0 +1,31 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "interface.go", + ], + importmap = "k8s.io/kubernetes/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient", + importpath = "k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient", + visibility = ["//visibility:public"], + deps = [ + "//staging/src/k8s.io/legacy-cloud-providers/azure/retry:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute:go_default_library", + "//vendor/github.com/golang/mock/gomock:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/doc.go new file mode 100644 index 00000000000..0910283933d --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/doc.go @@ -0,0 +1,20 @@ +// +build !providerless + +/* +Copyright 2019 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 mockvmssvmclient implements the mock client for VirtualMachineScaleSetVM. +package mockvmssvmclient // import "k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/interface.go b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/interface.go new file mode 100644 index 00000000000..92a20606a15 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/interface.go @@ -0,0 +1,109 @@ +// +build !providerless + +/* +Copyright 2019 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 mockvmssvmclient + +import ( + context "context" + reflect "reflect" + + compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" + gomock "github.com/golang/mock/gomock" + retry "k8s.io/legacy-cloud-providers/azure/retry" +) + +// MockInterface is a mock of Interface interface +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// Get mocks base method +func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetName, instanceID string, expand compute.InstanceViewTypes) (compute.VirtualMachineScaleSetVM, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, VMScaleSetName, instanceID, expand) + ret0, _ := ret[0].(compute.VirtualMachineScaleSetVM) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// Get indicates an expected call of Get +func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, VMScaleSetName, instanceID, expand interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, VMScaleSetName, instanceID, expand) +} + +// List mocks base method +func (m *MockInterface) List(ctx context.Context, resourceGroupName, virtualMachineScaleSetName, expand string) ([]compute.VirtualMachineScaleSetVM, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", ctx, resourceGroupName, virtualMachineScaleSetName, expand) + ret0, _ := ret[0].([]compute.VirtualMachineScaleSetVM) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// List indicates an expected call of List +func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName, virtualMachineScaleSetName, expand interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName, virtualMachineScaleSetName, expand) +} + +// Update mocks base method +func (m *MockInterface) Update(ctx context.Context, resourceGroupName, VMScaleSetName, instanceID string, parameters compute.VirtualMachineScaleSetVM, source string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Update indicates an expected call of Update +func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source) +} + +// UpdateVMs mocks base method +func (m *MockInterface) UpdateVMs(ctx context.Context, resourceGroupName, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateVMs", ctx, resourceGroupName, VMScaleSetName, instances, source) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// UpdateVMs indicates an expected call of UpdateVMs +func (mr *MockInterfaceMockRecorder) UpdateVMs(ctx, resourceGroupName, VMScaleSetName, instances, source interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVMs", reflect.TypeOf((*MockInterface)(nil).UpdateVMs), ctx, resourceGroupName, VMScaleSetName, instances, source) +} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/retry/BUILD b/vendor/k8s.io/legacy-cloud-providers/azure/retry/BUILD index 6db50eb4594..5e39a289e59 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/retry/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/azure/retry/BUILD @@ -13,7 +13,7 @@ go_library( deps = [ "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/mocks:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -25,6 +25,7 @@ go_test( ], embed = [":go_default_library"], deps = [ + "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/mocks:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", ], diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/retry/azure_error.go b/vendor/k8s.io/legacy-cloud-providers/azure/retry/azure_error.go index e2fffdbcdf9..02403e7ef01 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/retry/azure_error.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/retry/azure_error.go @@ -27,7 +27,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/retry/azure_retry.go b/vendor/k8s.io/legacy-cloud-providers/azure/retry/azure_retry.go index 64d9f0fa461..4a6adc930e8 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/retry/azure_retry.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/retry/azure_retry.go @@ -26,7 +26,7 @@ import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/mocks" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Ensure package autorest/mocks is imported and vendored. diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/BUILD b/vendor/k8s.io/legacy-cloud-providers/gce/BUILD index ac5e44c148a..aa96aaf32b2 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/gce/BUILD @@ -24,6 +24,7 @@ go_library( "gce_loadbalancer.go", "gce_loadbalancer_external.go", "gce_loadbalancer_internal.go", + "gce_loadbalancer_metrics.go", "gce_loadbalancer_naming.go", "gce_networkendpointgroup.go", "gce_routes.go", @@ -84,7 +85,7 @@ go_library( "//vendor/google.golang.org/api/option:go_default_library", "//vendor/google.golang.org/api/tpu/v1:go_default_library", "//vendor/gopkg.in/gcfg.v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/net:go_default_library", ], ) @@ -98,6 +99,7 @@ go_test( "gce_healthchecks_test.go", "gce_loadbalancer_external_test.go", "gce_loadbalancer_internal_test.go", + "gce_loadbalancer_metrics_test.go", "gce_loadbalancer_test.go", "gce_loadbalancer_utils_test.go", "gce_test.go", @@ -116,6 +118,7 @@ go_test( "//vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud:go_default_library", "//vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta:go_default_library", "//vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/mock:go_default_library", + "//vendor/github.com/google/go-cmp/cmp:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", "//vendor/golang.org/x/oauth2/google:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce.go index c4c33e446ba..61d30b5b8e0 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce.go @@ -54,7 +54,7 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/client-go/util/flowcontrol" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -99,6 +99,13 @@ type Cloud struct { // for the cloudprovider to start watching the configmap. ClusterID ClusterID + // initializer is used for lazy initialization of subnetworkURL + // and isLegacyNetwork fields if they are not passed via the config. + // The reason is to avoid GCE API calls to initialize them if they + // will never be used. This is especially important when + // it is run from Kubelets, as there can be thousands of them. + subnetworkURLAndIsLegacyNetworkInitializer sync.Once + service *compute.Service serviceBeta *computebeta.Service serviceAlpha *computealpha.Service @@ -115,10 +122,14 @@ type Cloud struct { // managedZones will be set to the 1 zone if running a single zone cluster // it will be set to ALL zones in region for any multi-zone cluster // Use GetAllCurrentZones to get only zones that contain nodes - managedZones []string - networkURL string - isLegacyNetwork bool - subnetworkURL string + managedZones []string + networkURL string + // unsafeIsLegacyNetwork should be used only via IsLegacyNetwork() accessor, + // to ensure it was properly initialized. + unsafeIsLegacyNetwork bool + // unsafeSubnetworkURL should be used only via SubnetworkURL() accessor, + // to ensure it was properly initialized. + unsafeSubnetworkURL string secondaryRangeName string networkProjectID string onXPN bool @@ -152,6 +163,8 @@ type Cloud struct { // Keep a reference of this around so we can inject a new cloud.RateLimiter implementation. s *cloud.Service + + metricsCollector loadbalancerMetricsCollector } // ConfigGlobal is the in memory representation of the gce.conf config data @@ -465,32 +478,12 @@ func CreateGCECloud(config *CloudConfig) (*Cloud, error) { subnetURL = config.SubnetworkURL } else if config.SubnetworkName != "" { subnetURL = gceSubnetworkURL(config.APIEndpoint, netProjID, config.Region, config.SubnetworkName) - } else { - // Determine the type of network and attempt to discover the correct subnet for AUTO mode. - // Gracefully fail because kubelet calls CreateGCECloud without any config, and minions - // lack the proper credentials for API calls. - if networkName := lastComponent(networkURL); networkName != "" { - var n *compute.Network - if n, err = getNetwork(service, netProjID, networkName); err != nil { - klog.Warningf("Could not retrieve network %q; err: %v", networkName, err) - } else { - switch typeOfNetwork(n) { - case netTypeLegacy: - klog.Infof("Network %q is type legacy - no subnetwork", networkName) - isLegacyNetwork = true - case netTypeCustom: - klog.Warningf("Network %q is type custom - cannot auto select a subnetwork", networkName) - case netTypeAuto: - subnetURL, err = determineSubnetURL(service, netProjID, networkName, config.Region) - if err != nil { - klog.Warningf("Could not determine subnetwork for network %q and region %v; err: %v", networkName, config.Region, err) - } else { - klog.Infof("Auto selecting subnetwork %q", subnetURL) - } - } - } - } } + // If neither SubnetworkURL nor SubnetworkName are provided, defer to + // lazy initialization. Determining subnetURL and isLegacyNetwork requires + // GCE API call. Given that it's not used in many cases and the fact that + // the provider is initialized also for Kubelets (and there can be thousands + // of them) we defer to lazy initialization here. if len(config.ManagedZones) == 0 { config.ManagedZones, err = getZonesForRegion(service, config.ProjectID, config.Region) @@ -518,8 +511,8 @@ func CreateGCECloud(config *CloudConfig) (*Cloud, error) { localZone: config.Zone, managedZones: config.ManagedZones, networkURL: networkURL, - isLegacyNetwork: isLegacyNetwork, - subnetworkURL: subnetURL, + unsafeIsLegacyNetwork: isLegacyNetwork, + unsafeSubnetworkURL: subnetURL, secondaryRangeName: config.SecondaryRangeName, nodeTags: config.NodeTags, nodeInstancePrefix: config.NodeInstancePrefix, @@ -527,6 +520,7 @@ func CreateGCECloud(config *CloudConfig) (*Cloud, error) { operationPollRateLimiter: operationPollRateLimiter, AlphaFeatureGate: config.AlphaFeatureGate, nodeZones: map[string]sets.String{}, + metricsCollector: newLoadBalancerMetrics(), } gce.manager = &gceServiceManager{gce} @@ -542,6 +536,45 @@ func CreateGCECloud(config *CloudConfig) (*Cloud, error) { return gce, nil } +// initializeNetworkConfig() is supposed to be called under sync.Once() +// for accessors to subnetworkURL and isLegacyNetwork fields. +func (g *Cloud) initializeSubnetworkURLAndIsLegacyNetwork() { + if g.unsafeSubnetworkURL != "" { + // This has already been initialized via the config. + return + } + + var subnetURL string + var isLegacyNetwork bool + + // Determine the type of network and attempt to discover the correct subnet for AUTO mode. + // Gracefully fail because kubelet calls CreateGCECloud without any config, and minions + // lack the proper credentials for API calls. + if networkName := lastComponent(g.NetworkURL()); networkName != "" { + if n, err := getNetwork(g.service, g.NetworkProjectID(), networkName); err != nil { + klog.Warningf("Could not retrieve network %q; err: %v", networkName, err) + } else { + switch typeOfNetwork(n) { + case netTypeLegacy: + klog.Infof("Network %q is type legacy - no subnetwork", networkName) + isLegacyNetwork = true + case netTypeCustom: + klog.Warningf("Network %q is type custom - cannot auto select a subnetwork", networkName) + case netTypeAuto: + subnetURL, err = determineSubnetURL(g.service, g.NetworkProjectID(), networkName, g.Region()) + if err != nil { + klog.Warningf("Could not determine subnetwork for network %q and region %v; err: %v", networkName, g.Region(), err) + } else { + klog.Infof("Auto selecting subnetwork %q", subnetURL) + } + } + } + } + + g.unsafeSubnetworkURL = subnetURL + g.unsafeIsLegacyNetwork = isLegacyNetwork +} + // SetRateLimiter adds a custom cloud.RateLimiter implementation. // WARNING: Calling this could have unexpected behavior if you have in-flight // requests. It is best to use this immediately after creating a Cloud. @@ -613,6 +646,7 @@ func (g *Cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, g.eventRecorder = g.eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "g-cloudprovider"}) go g.watchClusterID(stop) + go g.metricsCollector.Run(stop) } // LoadBalancer returns an implementation of LoadBalancer for Google Compute Engine. @@ -625,6 +659,12 @@ func (g *Cloud) Instances() (cloudprovider.Instances, bool) { return g, true } +// InstancesV2 returns an implementation of InstancesV2 for Google Compute Engine. +// TODO: implement ONLY for external cloud provider +func (g *Cloud) InstancesV2() (cloudprovider.InstancesV2, bool) { + return nil, false +} + // Zones returns an implementation of Zones for Google Compute Engine. func (g *Cloud) Zones() (cloudprovider.Zones, bool) { return g, true @@ -672,12 +712,14 @@ func (g *Cloud) NetworkURL() string { // SubnetworkURL returns the subnetwork url func (g *Cloud) SubnetworkURL() string { - return g.subnetworkURL + g.subnetworkURLAndIsLegacyNetworkInitializer.Do(g.initializeSubnetworkURLAndIsLegacyNetwork) + return g.unsafeSubnetworkURL } // IsLegacyNetwork returns true if the cluster is still running a legacy network configuration. func (g *Cloud) IsLegacyNetwork() bool { - return g.isLegacyNetwork + g.subnetworkURLAndIsLegacyNetworkInitializer.Do(g.initializeSubnetworkURLAndIsLegacyNetwork) + return g.unsafeIsLegacyNetwork } // SetInformers sets up the zone handlers we need watching for node changes. diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_address_manager.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_address_manager.go index 82466ea3fc5..324c8ac31d1 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_address_manager.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_address_manager.go @@ -25,7 +25,7 @@ import ( compute "google.golang.org/api/compute/v1" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" - "k8s.io/klog" + "k8s.io/klog/v2" ) type addressManager struct { diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_addresses.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_addresses.go index b161a498652..2bdbb7ba9ec 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_addresses.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_addresses.go @@ -21,9 +21,8 @@ package gce import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" - computealpha "google.golang.org/api/compute/v0.alpha" computebeta "google.golang.org/api/compute/v0.beta" compute "google.golang.org/api/compute/v1" @@ -80,15 +79,6 @@ func (g *Cloud) ReserveRegionAddress(addr *compute.Address, region string) error return mc.Observe(g.c.Addresses().Insert(ctx, meta.RegionalKey(addr.Name, region), addr)) } -// ReserveAlphaRegionAddress creates an Alpha, regional address. -func (g *Cloud) ReserveAlphaRegionAddress(addr *computealpha.Address, region string) error { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("reserve", region) - return mc.Observe(g.c.AlphaAddresses().Insert(ctx, meta.RegionalKey(addr.Name, region), addr)) -} - // ReserveBetaRegionAddress creates a beta region address func (g *Cloud) ReserveBetaRegionAddress(addr *computebeta.Address, region string) error { ctx, cancel := cloud.ContextWithCallTimeout() @@ -117,16 +107,6 @@ func (g *Cloud) GetRegionAddress(name, region string) (*compute.Address, error) return v, mc.Observe(err) } -// GetAlphaRegionAddress returns the Alpha, regional address by name. -func (g *Cloud) GetAlphaRegionAddress(name, region string) (*computealpha.Address, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - - mc := newAddressMetricContext("get", region) - v, err := g.c.AlphaAddresses().Get(ctx, meta.RegionalKey(name, region)) - return v, mc.Observe(err) -} - // GetBetaRegionAddress returns the beta region address by name func (g *Cloud) GetBetaRegionAddress(name, region string) (*computebeta.Address, error) { ctx, cancel := cloud.ContextWithCallTimeout() @@ -185,14 +165,12 @@ func (g *Cloud) GetBetaRegionAddressByIP(region, ipAddress string) (*computebeta return nil, makeGoogleAPINotFoundError(fmt.Sprintf("Address with IP %q was not found in region %q", ipAddress, region)) } -// TODO(#51665): retire this function once Network Tiers becomes Beta in GCP. func (g *Cloud) getNetworkTierFromAddress(name, region string) (string, error) { - if !g.AlphaFeatureGate.Enabled(AlphaFeatureNetworkTiers) { - return cloud.NetworkTierDefault.ToGCEValue(), nil - } - addr, err := g.GetAlphaRegionAddress(name, region) + + addr, err := g.GetRegionAddress(name, region) if err != nil { - return handleAlphaNetworkTierGetError(err) + // Can't get the network tier, just return an error. + return "", err } return addr.NetworkTier, nil } diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_alpha.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_alpha.go index 8cccd66a2ca..98c31e5acbf 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_alpha.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_alpha.go @@ -19,11 +19,6 @@ limitations under the License. package gce const ( - // AlphaFeatureNetworkTiers allows Services backed by a GCP load balancer to choose - // what network tier to use. Currently supports "Standard" and "Premium" (default). - // - // alpha: v1.8 (for Services) - AlphaFeatureNetworkTiers = "NetworkTiers" // AlphaFeatureILBSubsets allows InternalLoadBalancer services to include a subset // of cluster nodes as backends instead of all nodes. AlphaFeatureILBSubsets = "ILBSubsets" diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_annotations.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_annotations.go index 2280f26d917..46131accab1 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_annotations.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_annotations.go @@ -21,7 +21,7 @@ package gce import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" "k8s.io/api/core/v1" diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_clusterid.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_clusterid.go index 824381b2b9d..3664d1c237b 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_clusterid.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_clusterid.go @@ -35,7 +35,7 @@ import ( "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_clusters.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_clusters.go index f313b3bac1c..5be0696fe38 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_clusters.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_clusters.go @@ -23,7 +23,7 @@ import ( "fmt" "google.golang.org/api/container/v1" - "k8s.io/klog" + "k8s.io/klog/v2" ) func newClustersMetricContext(request, zone string) *metricContext { diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_disks.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_disks.go index 0600f087172..8cadf0a6952 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_disks.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_disks.go @@ -25,7 +25,7 @@ import ( "net/http" "strings" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/types" @@ -39,7 +39,7 @@ import ( "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" compute "google.golang.org/api/compute/v1" "google.golang.org/api/googleapi" - "k8s.io/klog" + "k8s.io/klog/v2" ) // DiskType defines a specific type for holding disk types (eg. pd-ssd) @@ -809,7 +809,11 @@ func (g *Cloud) ResizeDisk(diskToResize string, oldSize resource.Quantity, newSi } // GCE resizes in chunks of GiBs - requestGIB := volumehelpers.RoundUpToGiB(newSize) + requestGIB, err := volumehelpers.RoundUpToGiB(newSize) + if err != nil { + return oldSize, err + } + newSizeQuant := resource.MustParse(fmt.Sprintf("%dGi", requestGIB)) // If disk is already of size equal or greater than requested size, we simply return diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_fake.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_fake.go index 72936211fdc..4f9a8d080fa 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_fake.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_fake.go @@ -76,6 +76,7 @@ func NewFakeGCECloud(vals TestClusterValues) *Cloud { networkProjectID: vals.ProjectID, ClusterID: fakeClusterID(vals.ClusterID), onXPN: vals.OnXPN, + metricsCollector: newLoadBalancerMetrics(), } c := cloud.NewMockGCE(&gceProjectRouter{gce}) gce.c = c diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_forwardingrule.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_forwardingrule.go index 21b361f219c..3a20c3b6191 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_forwardingrule.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_forwardingrule.go @@ -182,14 +182,11 @@ func (g *Cloud) DeleteRegionForwardingRule(name, region string) error { return mc.Observe(g.c.ForwardingRules().Delete(ctx, meta.RegionalKey(name, region))) } -// TODO(#51665): retire this function once Network Tiers becomes Beta in GCP. func (g *Cloud) getNetworkTierFromForwardingRule(name, region string) (string, error) { - if !g.AlphaFeatureGate.Enabled(AlphaFeatureNetworkTiers) { - return cloud.NetworkTierDefault.ToGCEValue(), nil - } - fwdRule, err := g.GetAlphaRegionForwardingRule(name, region) + fwdRule, err := g.GetRegionForwardingRule(name, region) if err != nil { - return handleAlphaNetworkTierGetError(err) + // Can't get the network tier, just return an error. + return "", err } return fwdRule.NetworkTier, nil } diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_healthchecks.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_healthchecks.go index 7bb222b2941..cf71eca28be 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_healthchecks.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_healthchecks.go @@ -19,7 +19,7 @@ limitations under the License. package gce import ( - "k8s.io/klog" + "k8s.io/klog/v2" computealpha "google.golang.org/api/compute/v0.alpha" computebeta "google.golang.org/api/compute/v0.beta" diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_instances.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_instances.go index f2e33f97bd1..6a1e1acb9f9 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_instances.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_instances.go @@ -29,7 +29,7 @@ import ( "cloud.google.com/go/compute/metadata" computebeta "google.golang.org/api/compute/v0.beta" compute "google.golang.org/api/compute/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" @@ -42,7 +42,10 @@ import ( ) const ( - defaultZone = "" + defaultZone = "" + networkInterfaceIP = "instance/network-interfaces/%s/ip" + networkInterfaceAccessConfigs = "instance/network-interfaces/%s/access-configs" + networkInterfaceExternalIP = "instance/network-interfaces/%s/access-configs/%s/external-ip" ) func newInstancesMetricContext(request, zone string) *metricContext { @@ -83,29 +86,85 @@ func (g *Cloud) ToInstanceReferences(zone string, instanceNames []string) (refs } // NodeAddresses is an implementation of Instances.NodeAddresses. -func (g *Cloud) NodeAddresses(_ context.Context, _ types.NodeName) ([]v1.NodeAddress, error) { - internalIP, err := metadata.Get("instance/network-interfaces/0/ip") - if err != nil { - return nil, fmt.Errorf("couldn't get internal IP: %v", err) - } - externalIP, err := metadata.Get("instance/network-interfaces/0/access-configs/0/external-ip") - if err != nil { - return nil, fmt.Errorf("couldn't get external IP: %v", err) - } - addresses := []v1.NodeAddress{ - {Type: v1.NodeInternalIP, Address: internalIP}, - {Type: v1.NodeExternalIP, Address: externalIP}, +func (g *Cloud) NodeAddresses(ctx context.Context, nodeName types.NodeName) ([]v1.NodeAddress, error) { + timeoutCtx, cancel := context.WithTimeout(ctx, 1*time.Hour) + defer cancel() + + instanceName := string(nodeName) + + if g.useMetadataServer { + // Use metadata server if possible + if g.isCurrentInstance(instanceName) { + + nics, err := metadata.Get("instance/network-interfaces/") + if err != nil { + return nil, fmt.Errorf("couldn't get network interfaces: %v", err) + } + + nicsArr := strings.Split(nics, "/\n") + nodeAddresses := []v1.NodeAddress{} + + for _, nic := range nicsArr { + + if nic == "" { + continue + } + + internalIP, err := metadata.Get(fmt.Sprintf(networkInterfaceIP, nic)) + if err != nil { + return nil, fmt.Errorf("couldn't get internal IP: %v", err) + } + nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeInternalIP, Address: internalIP}) + + acs, err := metadata.Get(fmt.Sprintf(networkInterfaceAccessConfigs, nic)) + if err != nil { + return nil, fmt.Errorf("couldn't get access configs: %v", err) + } + + acsArr := strings.Split(acs, "/\n") + + for _, ac := range acsArr { + + if ac == "" { + continue + } + + externalIP, err := metadata.Get(fmt.Sprintf(networkInterfaceExternalIP, nic, ac)) + if err != nil { + return nil, fmt.Errorf("couldn't get external IP: %v", err) + } + + if externalIP != "" { + nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeExternalIP, Address: externalIP}) + } + } + } + + internalDNSFull, err := metadata.Get("instance/hostname") + if err != nil { + klog.Warningf("couldn't get full internal DNS name: %v", err) + } else { + nodeAddresses = append(nodeAddresses, + v1.NodeAddress{Type: v1.NodeInternalDNS, Address: internalDNSFull}, + v1.NodeAddress{Type: v1.NodeHostName, Address: internalDNSFull}, + ) + } + return nodeAddresses, nil + } } - if internalDNSFull, err := metadata.Get("instance/hostname"); err != nil { - klog.Warningf("couldn't get full internal DNS name: %v", err) - } else { - addresses = append(addresses, - v1.NodeAddress{Type: v1.NodeInternalDNS, Address: internalDNSFull}, - v1.NodeAddress{Type: v1.NodeHostName, Address: internalDNSFull}, - ) + // Use GCE API + instanceObj, err := g.getInstanceByName(instanceName) + if err != nil { + return nil, fmt.Errorf("couldn't get instance details: %v", err) } - return addresses, nil + + instance, err := g.c.Instances().Get(timeoutCtx, meta.ZonalKey(canonicalizeInstanceName(instanceObj.Name), instanceObj.Zone)) + if err != nil { + return []v1.NodeAddress{}, fmt.Errorf("error while querying for instance: %v", err) + } + + return nodeAddressesFromInstance(instance) } // NodeAddressesByProviderID will not be called from the node that is requesting this ID. @@ -124,17 +183,7 @@ func (g *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string return []v1.NodeAddress{}, fmt.Errorf("error while querying for providerID %q: %v", providerID, err) } - if len(instance.NetworkInterfaces) < 1 { - return []v1.NodeAddress{}, fmt.Errorf("could not find network interfaces for providerID %q", providerID) - } - networkInterface := instance.NetworkInterfaces[0] - - nodeAddresses := []v1.NodeAddress{{Type: v1.NodeInternalIP, Address: networkInterface.NetworkIP}} - for _, config := range networkInterface.AccessConfigs { - nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeExternalIP, Address: config.NatIP}) - } - - return nodeAddresses, nil + return nodeAddressesFromInstance(instance) } // instanceByProviderID returns the cloudprovider instance of the node @@ -161,6 +210,22 @@ func (g *Cloud) InstanceShutdownByProviderID(ctx context.Context, providerID str return false, cloudprovider.NotImplemented } +func nodeAddressesFromInstance(instance *compute.Instance) ([]v1.NodeAddress, error) { + if len(instance.NetworkInterfaces) < 1 { + return nil, fmt.Errorf("could not find network interfaces for instanceID %q", instance.Id) + } + nodeAddresses := []v1.NodeAddress{} + + for _, nic := range instance.NetworkInterfaces { + nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeInternalIP, Address: nic.NetworkIP}) + for _, config := range nic.AccessConfigs { + nodeAddresses = append(nodeAddresses, v1.NodeAddress{Type: v1.NodeExternalIP, Address: config.NatIP}) + } + } + + return nodeAddresses, nil +} + // InstanceTypeByProviderID returns the cloudprovider instance type of the node // with the specified unique providerID This method will not be called from the // node that is requesting this ID. i.e. metadata service and other local @@ -361,21 +426,20 @@ func (g *Cloud) CurrentNodeName(ctx context.Context, hostname string) (types.Nod return types.NodeName(hostname), nil } -// AliasRanges returns a list of CIDR ranges that are assigned to the +// AliasRangesByProviderID returns a list of CIDR ranges that are assigned to the // `node` for allocation to pods. Returns a list of the form // "/". -func (g *Cloud) AliasRanges(nodeName types.NodeName) (cidrs []string, err error) { +func (g *Cloud) AliasRangesByProviderID(providerID string) (cidrs []string, err error) { ctx, cancel := cloud.ContextWithCallTimeout() defer cancel() - var instance *gceInstance - instance, err = g.getInstanceByName(mapNodeNameToInstanceName(nodeName)) + _, zone, name, err := splitProviderID(providerID) if err != nil { - return + return nil, err } var res *computebeta.Instance - res, err = g.c.BetaInstances().Get(ctx, meta.ZonalKey(instance.Name, lastComponent(instance.Zone))) + res, err = g.c.BetaInstances().Get(ctx, meta.ZonalKey(canonicalizeInstanceName(name), zone)) if err != nil { return } @@ -388,28 +452,29 @@ func (g *Cloud) AliasRanges(nodeName types.NodeName) (cidrs []string, err error) return } -// AddAliasToInstance adds an alias to the given instance from the named +// AddAliasToInstanceByProviderID adds an alias to the given instance from the named // secondary range. -func (g *Cloud) AddAliasToInstance(nodeName types.NodeName, alias *net.IPNet) error { +func (g *Cloud) AddAliasToInstanceByProviderID(providerID string, alias *net.IPNet) error { ctx, cancel := cloud.ContextWithCallTimeout() defer cancel() - v1instance, err := g.getInstanceByName(mapNodeNameToInstanceName(nodeName)) + _, zone, name, err := splitProviderID(providerID) if err != nil { return err } - instance, err := g.c.BetaInstances().Get(ctx, meta.ZonalKey(v1instance.Name, lastComponent(v1instance.Zone))) + + instance, err := g.c.BetaInstances().Get(ctx, meta.ZonalKey(canonicalizeInstanceName(name), zone)) if err != nil { return err } switch len(instance.NetworkInterfaces) { case 0: - return fmt.Errorf("instance %q has no network interfaces", nodeName) + return fmt.Errorf("instance %q has no network interfaces", providerID) case 1: default: klog.Warningf("Instance %q has more than one network interface, using only the first (%v)", - nodeName, instance.NetworkInterfaces) + providerID, instance.NetworkInterfaces) } iface := &computebeta.NetworkInterface{} @@ -420,7 +485,7 @@ func (g *Cloud) AddAliasToInstance(nodeName types.NodeName, alias *net.IPNet) er SubnetworkRangeName: g.secondaryRangeName, }) - mc := newInstancesMetricContext("add_alias", v1instance.Zone) + mc := newInstancesMetricContext("add_alias", zone) err = g.c.BetaInstances().UpdateNetworkInterface(ctx, meta.ZonalKey(instance.Name, lastComponent(instance.Zone)), iface.Name, iface) return mc.Observe(err) } diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_interfaces.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_interfaces.go index 7097ddd5a33..3a85c7c52d9 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_interfaces.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_interfaces.go @@ -19,7 +19,6 @@ limitations under the License. package gce import ( - computealpha "google.golang.org/api/compute/v0.alpha" computebeta "google.golang.org/api/compute/v0.beta" compute "google.golang.org/api/compute/v1" ) @@ -34,16 +33,11 @@ type CloudAddressService interface { DeleteRegionAddress(name, region string) error // TODO: Mock Global endpoints - // Alpha API. - GetAlphaRegionAddress(name, region string) (*computealpha.Address, error) - ReserveAlphaRegionAddress(addr *computealpha.Address, region string) error - // Beta API ReserveBetaRegionAddress(address *computebeta.Address, region string) error GetBetaRegionAddress(name string, region string) (*computebeta.Address, error) GetBetaRegionAddressByIP(region, ipAddress string) (*computebeta.Address, error) - // TODO(#51665): Remove this once the Network Tiers becomes Alpha in GCP. getNetworkTierFromAddress(name, region string) (string, error) } @@ -54,10 +48,6 @@ type CloudForwardingRuleService interface { CreateRegionForwardingRule(rule *compute.ForwardingRule, region string) error DeleteRegionForwardingRule(name, region string) error - // Alpha API. - GetAlphaRegionForwardingRule(name, region string) (*computealpha.ForwardingRule, error) - CreateAlphaRegionForwardingRule(rule *computealpha.ForwardingRule, region string) error - - // Needed for the Alpha "Network Tiers" feature. + // Needed for the "Network Tiers" feature. getNetworkTierFromForwardingRule(name, region string) (string, error) } diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer.go index d3e01e19db5..5e4bb55f817 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer.go @@ -27,7 +27,7 @@ import ( "strings" "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" cloudprovider "k8s.io/cloud-provider" diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go index e4b885a1f6f..f9dc2e14156 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go @@ -34,7 +34,7 @@ import ( utilnet "k8s.io/utils/net" compute "google.golang.org/api/compute/v1" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -81,9 +81,7 @@ func (g *Cloud) ensureExternalLoadBalancer(clusterName string, clusterID string, return nil, err } klog.V(4).Infof("ensureExternalLoadBalancer(%s): Desired network tier %q.", lbRefStr, netTier) - if g.AlphaFeatureGate.Enabled(AlphaFeatureNetworkTiers) { - g.deleteWrongNetworkTieredResources(loadBalancerName, lbRefStr, netTier) - } + g.deleteWrongNetworkTieredResources(loadBalancerName, lbRefStr, netTier) // Check if the forwarding rule exists, and if so, what its IP is. fwdRuleExists, fwdRuleNeedsUpdate, fwdRuleIP, err := g.forwardingRuleNeedsUpdate(loadBalancerName, g.region, requestedIP, ports) @@ -1072,9 +1070,6 @@ func ensureStaticIP(s CloudAddressService, name, serviceName, region, existingIP } func (g *Cloud) getServiceNetworkTier(svc *v1.Service) (cloud.NetworkTier, error) { - if !g.AlphaFeatureGate.Enabled(AlphaFeatureNetworkTiers) { - return cloud.NetworkTierDefault, nil - } tier, err := GetServiceNetworkTier(svc) if err != nil { // Returns an error if the annotation is invalid. diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go index 9c6ce9a071c..ef285b308ec 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go @@ -28,14 +28,13 @@ import ( "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" - computebeta "google.golang.org/api/compute/v0.beta" compute "google.golang.org/api/compute/v1" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" cloudprovider "k8s.io/cloud-provider" servicehelpers "k8s.io/cloud-provider/service/helpers" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( @@ -64,6 +63,16 @@ func (g *Cloud) ensureInternalLoadBalancer(clusterName, clusterID string, svc *v return nil, cloudprovider.ImplementedElsewhere } + nm := types.NamespacedName{Name: svc.Name, Namespace: svc.Namespace} + + var serviceState L4ILBServiceState + // Mark the service InSuccess state as false to begin with. + // This will be updated to true if the VIP is configured successfully. + serviceState.InSuccess = false + defer func() { + g.metricsCollector.SetL4ILBService(nm.String(), serviceState) + }() + loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, svc) klog.V(2).Infof("ensureInternalLoadBalancer(%v): Attaching %q finalizer", loadBalancerName, ILBFinalizerV1) if err := addFinalizer(svc, g.client.CoreV1(), ILBFinalizerV1); err != nil { @@ -71,14 +80,13 @@ func (g *Cloud) ensureInternalLoadBalancer(clusterName, clusterID string, svc *v return nil, err } - nm := types.NamespacedName{Name: svc.Name, Namespace: svc.Namespace} ports, _, protocol := getPortsAndProtocol(svc.Spec.Ports) if protocol != v1.ProtocolTCP && protocol != v1.ProtocolUDP { return nil, fmt.Errorf("Invalid protocol %s, only TCP and UDP are supported", string(protocol)) } scheme := cloud.SchemeInternal options := getILBOptions(svc) - if g.isLegacyNetwork { + if g.IsLegacyNetwork() { g.eventRecorder.Event(svc, v1.EventTypeWarning, "ILBOptionsIgnored", "Internal LoadBalancer options are not supported with Legacy Networks.") options = ILBOptions{} } @@ -171,24 +179,28 @@ func (g *Cloud) ensureInternalLoadBalancer(clusterName, clusterID string, svc *v return nil, err } - newFRC := &forwardingRuleComposite{ - name: loadBalancerName, - description: &forwardingRuleDescription{ServiceName: nm.String()}, - ipAddress: ipToUse, - backendService: backendServiceLink, - ports: ports, - ipProtocol: string(protocol), - lbScheme: string(scheme), + fwdRuleDescription := &forwardingRuleDescription{ServiceName: nm.String()} + fwdRuleDescriptionString, err := fwdRuleDescription.marshal() + if err != nil { + return nil, err + } + newFwdRule := &compute.ForwardingRule{ + Name: loadBalancerName, + Description: fwdRuleDescriptionString, + IPAddress: ipToUse, + BackendService: backendServiceLink, + Ports: ports, + IPProtocol: string(protocol), + LoadBalancingScheme: string(scheme), // Given that CreateGCECloud will attempt to determine the subnet based off the network, // the subnetwork should rarely be unknown. - subnetwork: subnetworkURL, - network: g.networkURL, + Subnetwork: subnetworkURL, + Network: g.networkURL, } if options.AllowGlobalAccess { - newFRC.allowGlobalAccess = options.AllowGlobalAccess - newFRC.description.APIVersion = meta.VersionBeta + newFwdRule.AllowGlobalAccess = options.AllowGlobalAccess } - if err := g.ensureInternalForwardingRule(existingFwdRule, newFRC); err != nil { + if err := g.ensureInternalForwardingRule(existingFwdRule, newFwdRule); err != nil { return nil, err } @@ -210,6 +222,18 @@ func (g *Cloud) ensureInternalLoadBalancer(clusterName, clusterID string, svc *v return nil, err } + serviceState.InSuccess = true + if options.AllowGlobalAccess { + serviceState.EnabledGlobalAccess = true + } + // SubnetName is overridden to nil value if Alpha feature gate for custom subnet + // is not enabled. So, a non empty subnet name at this point implies that the + // feature is in use. + if options.SubnetName != "" { + serviceState.EnabledCustomSubnet = true + } + klog.V(6).Infof("Internal Loadbalancer for Service %s ensured, updating its state %v in metrics cache", nm, serviceState) + status := &v1.LoadBalancerStatus{} status.Ingress = []v1.LoadBalancerIngress{{IP: updatedFwdRule.IPAddress}} return status, nil @@ -264,6 +288,7 @@ func (g *Cloud) updateInternalLoadBalancer(clusterName, clusterID string, svc *v func (g *Cloud) ensureInternalLoadBalancerDeleted(clusterName, clusterID string, svc *v1.Service) error { loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, svc) + svcNamespacedName := types.NamespacedName{Name: svc.Name, Namespace: svc.Namespace} _, _, protocol := getPortsAndProtocol(svc.Spec.Ports) scheme := cloud.SchemeInternal sharedBackend := shareBackendService(svc) @@ -323,10 +348,12 @@ func (g *Cloud) ensureInternalLoadBalancerDeleted(clusterName, clusterID string, klog.V(2).Infof("ensureInternalLoadBalancerDeleted(%v): Removing %q finalizer", loadBalancerName, ILBFinalizerV1) if err := removeFinalizer(svc, g.client.CoreV1(), ILBFinalizerV1); err != nil { - klog.Errorf("Failed to remove finalizer '%s' on service %s/%s - %v", ILBFinalizerV1, svc.Namespace, svc.Name, err) + klog.Errorf("Failed to remove finalizer '%s' on service %s - %v", ILBFinalizerV1, svcNamespacedName, err) return err } + klog.V(6).Infof("Internal Loadbalancer for Service %s deleted, removing its state from metrics cache", svcNamespacedName) + g.metricsCollector.DeleteL4ILBService(svcNamespacedName.String()) return nil } @@ -882,116 +909,6 @@ func getILBOptions(svc *v1.Service) ILBOptions { } } -// forwardingRuleComposite is a composite type encapsulating both the GA and Beta ForwardingRules. -// It exposes methods to compute the ForwardingRule object based on the given parameters and to compare 2 composite types -// based on the version string. -type forwardingRuleComposite struct { - allowGlobalAccess bool - name string - description *forwardingRuleDescription - ipAddress string - backendService string - ports []string - ipProtocol string - lbScheme string - subnetwork string - network string -} - -func (f *forwardingRuleComposite) Version() meta.Version { - return f.description.APIVersion -} - -func (f *forwardingRuleComposite) Equal(other *forwardingRuleComposite) bool { - return (f.ipAddress == "" || other.ipAddress == "" || f.ipAddress == other.ipAddress) && - f.ipProtocol == other.ipProtocol && - f.lbScheme == other.lbScheme && - equalStringSets(f.ports, other.ports) && - f.backendService == other.backendService && - f.allowGlobalAccess == other.allowGlobalAccess && - f.subnetwork == other.subnetwork -} - -// toForwardingRuleComposite converts a compute beta or GA ForwardingRule into the composite type -func toForwardingRuleComposite(rule interface{}) (frc *forwardingRuleComposite, err error) { - switch fr := rule.(type) { - case *compute.ForwardingRule: - frc = &forwardingRuleComposite{ - name: fr.Name, - ipAddress: fr.IPAddress, - description: &forwardingRuleDescription{APIVersion: meta.VersionGA}, - backendService: fr.BackendService, - ports: fr.Ports, - ipProtocol: fr.IPProtocol, - lbScheme: fr.LoadBalancingScheme, - subnetwork: fr.Subnetwork, - network: fr.Network, - } - if fr.Description != "" { - err = frc.description.unmarshal(fr.Description) - } - return frc, err - case *computebeta.ForwardingRule: - frc = &forwardingRuleComposite{ - name: fr.Name, - ipAddress: fr.IPAddress, - description: &forwardingRuleDescription{APIVersion: meta.VersionBeta}, - backendService: fr.BackendService, - ports: fr.Ports, - ipProtocol: fr.IPProtocol, - lbScheme: fr.LoadBalancingScheme, - subnetwork: fr.Subnetwork, - network: fr.Network, - allowGlobalAccess: fr.AllowGlobalAccess, - } - if fr.Description != "" { - err = frc.description.unmarshal(fr.Description) - } - return frc, err - default: - return nil, fmt.Errorf("Invalid object type %T to compute ForwardingRuleComposite from", fr) - } -} - -// ToBeta returns a Beta ForwardingRule from the composite type. -func (f *forwardingRuleComposite) ToBeta() (*computebeta.ForwardingRule, error) { - descStr, err := f.description.marshal() - if err != nil { - return nil, fmt.Errorf("Failed to compute description for beta forwarding rule %s, err: %v", f.name, err) - } - return &computebeta.ForwardingRule{ - Name: f.name, - Description: descStr, - IPAddress: f.ipAddress, - BackendService: f.backendService, - Ports: f.ports, - IPProtocol: f.ipProtocol, - LoadBalancingScheme: f.lbScheme, - Subnetwork: f.subnetwork, - Network: f.network, - AllowGlobalAccess: f.allowGlobalAccess, - }, nil -} - -// ToGA returns a GA ForwardingRule from the composite type. -func (f *forwardingRuleComposite) ToGA() (*compute.ForwardingRule, error) { - descStr, err := f.description.marshal() - if err != nil { - return nil, fmt.Errorf("Failed to compute description for GA forwarding rule %s, err: %v", f.name, err) - } - return &compute.ForwardingRule{ - Name: f.name, - Description: descStr, - IPAddress: f.ipAddress, - BackendService: f.backendService, - Ports: f.ports, - IPProtocol: f.ipProtocol, - LoadBalancingScheme: f.lbScheme, - Subnetwork: f.subnetwork, - Network: f.network, - }, nil -} - type forwardingRuleDescription struct { ServiceName string `json:"kubernetes.io/service-name"` APIVersion meta.Version `json:"kubernetes.io/api-version,omitempty"` @@ -1025,32 +942,10 @@ func getFwdRuleAPIVersion(rule *compute.ForwardingRule) (meta.Version, error) { return d.APIVersion, nil } -func (g *Cloud) ensureInternalForwardingRule(existingFwdRule *compute.ForwardingRule, newFRC *forwardingRuleComposite) (err error) { +func (g *Cloud) ensureInternalForwardingRule(existingFwdRule, newFwdRule *compute.ForwardingRule) (err error) { if existingFwdRule != nil { - version, err := getFwdRuleAPIVersion(existingFwdRule) - if err != nil { - return err - } - var oldFRC *forwardingRuleComposite - switch version { - case meta.VersionBeta: - var betaRule *computebeta.ForwardingRule - betaRule, err = g.GetBetaRegionForwardingRule(existingFwdRule.Name, g.region) - if err != nil { - return err - } - oldFRC, err = toForwardingRuleComposite(betaRule) - case meta.VersionGA: - oldFRC, err = toForwardingRuleComposite(existingFwdRule) - default: - klog.Errorf("invalid version string for %s, assuming GA", existingFwdRule.Name) - oldFRC, err = toForwardingRuleComposite(existingFwdRule) - } - if err != nil { - return err - } - if oldFRC.Equal(newFRC) { - klog.V(4).Infof("oldFRC == newFRC, no updates needed (oldFRC == %+v)", oldFRC) + if forwardingRulesEqual(existingFwdRule, newFwdRule) { + klog.V(4).Infof("existingFwdRule == newFwdRule, no updates needed (existingFwdRule == %+v)", existingFwdRule) return nil } klog.V(2).Infof("ensureInternalLoadBalancer(%v): deleting existing forwarding rule with IP address %v", existingFwdRule.Name, existingFwdRule.IPAddress) @@ -1060,23 +955,20 @@ func (g *Cloud) ensureInternalForwardingRule(existingFwdRule *compute.Forwarding } // At this point, the existing rule has been deleted if required. // Create the rule based on the api version determined - if newFRC.Version() == meta.VersionBeta { - klog.V(2).Infof("ensureInternalLoadBalancer(%v): creating beta forwarding rule", newFRC.name) - var betaRule *computebeta.ForwardingRule - betaRule, err = newFRC.ToBeta() - if err != nil { - return err - } - err = g.CreateBetaRegionForwardingRule(betaRule, g.region) - } else { - var gaRule *compute.ForwardingRule - klog.V(2).Infof("ensureInternalLoadBalancer(%v): creating ga forwarding rule", newFRC.name) - gaRule, err = newFRC.ToGA() - if err != nil { - return err - } - err = g.CreateRegionForwardingRule(gaRule, g.region) + klog.V(2).Infof("ensureInternalLoadBalancer(%v): creating forwarding rule", newFwdRule.Name) + if err = g.CreateRegionForwardingRule(newFwdRule, g.region); err != nil { + return err } - klog.V(2).Infof("ensureInternalLoadBalancer(%v): created forwarding rule, err : %s", newFRC.name, err) - return err + klog.V(2).Infof("ensureInternalLoadBalancer(%v): created forwarding rule", newFwdRule.Name) + return nil +} + +func forwardingRulesEqual(old, new *compute.ForwardingRule) bool { + return (old.IPAddress == "" || new.IPAddress == "" || old.IPAddress == new.IPAddress) && + old.IPProtocol == new.IPProtocol && + old.LoadBalancingScheme == new.LoadBalancingScheme && + equalStringSets(old.Ports, new.Ports) && + old.BackendService == new.BackendService && + old.AllowGlobalAccess == new.AllowGlobalAccess && + old.Subnetwork == new.Subnetwork } diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_metrics.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_metrics.go new file mode 100644 index 00000000000..b2d223b2636 --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_metrics.go @@ -0,0 +1,181 @@ +// +build !providerless + +/* +Copyright 2020 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 gce + +import ( + "sync" + "time" + + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" + "k8s.io/klog/v2" +) + +const ( + label = "feature" +) + +var ( + metricsInterval = 10 * time.Minute + l4ILBCount = metrics.NewGaugeVec( + &metrics.GaugeOpts{ + Name: "number_of_l4_ilbs", + Help: "Number of L4 ILBs", + StabilityLevel: metrics.ALPHA, + }, + []string{label}, + ) +) + +// init registers L4 internal loadbalancer usage metrics. +func init() { + klog.V(3).Infof("Registering Service Controller loadbalancer usage metrics %v", l4ILBCount) + legacyregistry.MustRegister(l4ILBCount) +} + +// LoadBalancerMetrics is a cache that contains loadbalancer service resource +// states for computing usage metrics. +type LoadBalancerMetrics struct { + // l4ILBServiceMap is a map of service key and L4 ILB service state. + l4ILBServiceMap map[string]L4ILBServiceState + + sync.Mutex +} + +type feature string + +func (f feature) String() string { + return string(f) +} + +const ( + l4ILBService = feature("L4ILBService") + l4ILBGlobalAccess = feature("L4ILBGlobalAccess") + l4ILBCustomSubnet = feature("L4ILBCustomSubnet") + // l4ILBInSuccess feature specifies that ILB VIP is configured. + l4ILBInSuccess = feature("L4ILBInSuccess") + // l4ILBInInError feature specifies that an error had occurred for this service + // in ensureInternalLoadbalancer method. + l4ILBInError = feature("L4ILBInError") +) + +// L4ILBServiceState contains Internal Loadbalancer feature states as specified +// in k8s Service. +type L4ILBServiceState struct { + // EnabledGlobalAccess specifies if Global Access is enabled. + EnabledGlobalAccess bool + // EnabledCustomSubNet specifies if Custom Subnet is enabled. + EnabledCustomSubnet bool + // InSuccess specifies if the ILB service VIP is configured. + InSuccess bool +} + +// loadbalancerMetricsCollector is an interface to update/delete L4 loadbalancer +// states in the cache that is used for computing L4 Loadbalancer usage metrics. +type loadbalancerMetricsCollector interface { + // Run starts a goroutine to compute and export metrics a periodic interval. + Run(stopCh <-chan struct{}) + // SetL4ILBService adds/updates L4 ILB service state for given service key. + SetL4ILBService(svcKey string, state L4ILBServiceState) + // DeleteL4ILBService removes the given L4 ILB service key. + DeleteL4ILBService(svcKey string) +} + +// newLoadBalancerMetrics initializes LoadBalancerMetrics and starts a goroutine +// to compute and export metrics periodically. +func newLoadBalancerMetrics() loadbalancerMetricsCollector { + return &LoadBalancerMetrics{ + l4ILBServiceMap: make(map[string]L4ILBServiceState), + } +} + +// Run implements loadbalancerMetricsCollector. +func (lm *LoadBalancerMetrics) Run(stopCh <-chan struct{}) { + klog.V(3).Infof("Loadbalancer Metrics initialized. Metrics will be exported at an interval of %v", metricsInterval) + // Compute and export metrics periodically. + go func() { + // Wait for service states to be populated in the cache before computing metrics. + time.Sleep(metricsInterval) + wait.Until(lm.export, metricsInterval, stopCh) + }() + <-stopCh +} + +// SetL4ILBService implements loadbalancerMetricsCollector. +func (lm *LoadBalancerMetrics) SetL4ILBService(svcKey string, state L4ILBServiceState) { + lm.Lock() + defer lm.Unlock() + + if lm.l4ILBServiceMap == nil { + klog.Fatalf("Loadbalancer Metrics failed to initialize correctly.") + } + lm.l4ILBServiceMap[svcKey] = state +} + +// DeleteL4ILBService implements loadbalancerMetricsCollector. +func (lm *LoadBalancerMetrics) DeleteL4ILBService(svcKey string) { + lm.Lock() + defer lm.Unlock() + + delete(lm.l4ILBServiceMap, svcKey) +} + +// export computes and exports loadbalancer usage metrics. +func (lm *LoadBalancerMetrics) export() { + ilbCount := lm.computeL4ILBMetrics() + klog.V(5).Infof("Exporting L4 ILB usage metrics: %#v", ilbCount) + for feature, count := range ilbCount { + l4ILBCount.With(map[string]string{label: feature.String()}).Set(float64(count)) + } + klog.V(5).Infof("L4 ILB usage metrics exported.") +} + +// computeL4ILBMetrics aggregates L4 ILB metrics in the cache. +func (lm *LoadBalancerMetrics) computeL4ILBMetrics() map[feature]int { + lm.Lock() + defer lm.Unlock() + klog.V(4).Infof("Computing L4 ILB usage metrics from service state map: %#v", lm.l4ILBServiceMap) + counts := map[feature]int{ + l4ILBService: 0, + l4ILBGlobalAccess: 0, + l4ILBCustomSubnet: 0, + l4ILBInSuccess: 0, + l4ILBInError: 0, + } + + for key, state := range lm.l4ILBServiceMap { + klog.V(6).Infof("ILB Service %s has EnabledGlobalAccess: %t, EnabledCustomSubnet: %t, InSuccess: %t", key, state.EnabledGlobalAccess, state.EnabledCustomSubnet, state.InSuccess) + counts[l4ILBService]++ + if !state.InSuccess { + counts[l4ILBInError]++ + // Skip counting other features if the service is in error state. + continue + } + counts[l4ILBInSuccess]++ + if state.EnabledGlobalAccess { + counts[l4ILBGlobalAccess]++ + } + if state.EnabledCustomSubnet { + counts[l4ILBCustomSubnet]++ + } + } + klog.V(4).Info("L4 ILB usage metrics computed.") + return counts +} diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_routes.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_routes.go index 098058de28d..00c4d48618d 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_routes.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_routes.go @@ -27,7 +27,7 @@ import ( "google.golang.org/api/compute/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" + "k8s.io/klog/v2" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter" "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_tpu.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_tpu.go index 27f472fb0e3..7e639067c92 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_tpu.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_tpu.go @@ -27,7 +27,7 @@ import ( "google.golang.org/api/googleapi" tpuapi "google.golang.org/api/tpu/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/wait" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/gce/gce_util.go b/vendor/k8s.io/legacy-cloud-providers/gce/gce_util.go index 4c1bcea3dfb..fd2989a3adc 100644 --- a/vendor/k8s.io/legacy-cloud-providers/gce/gce_util.go +++ b/vendor/k8s.io/legacy-cloud-providers/gce/gce_util.go @@ -281,18 +281,6 @@ func makeGoogleAPINotFoundError(message string) error { return &googleapi.Error{Code: http.StatusNotFound, Message: message} } -// TODO(#51665): Remove this once Network Tiers becomes Beta in GCP. -func handleAlphaNetworkTierGetError(err error) (string, error) { - if isForbidden(err) { - // Network tier is still an Alpha feature in GCP, and not every project - // is whitelisted to access the API. If we cannot access the API, just - // assume the tier is premium. - return cloud.NetworkTierDefault.ToGCEValue(), nil - } - // Can't get the network tier, just return an error. - return "", err -} - // containsCIDR returns true if outer contains inner. func containsCIDR(outer, inner *net.IPNet) bool { return outer.Contains(firstIPInRange(inner)) && outer.Contains(lastIPInRange(inner)) diff --git a/vendor/k8s.io/legacy-cloud-providers/openstack/BUILD b/vendor/k8s.io/legacy-cloud-providers/openstack/BUILD index 7f989c1fde3..fbd9cfa8c1a 100644 --- a/vendor/k8s.io/legacy-cloud-providers/openstack/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/openstack/BUILD @@ -65,7 +65,7 @@ go_library( "//vendor/github.com/gophercloud/gophercloud/pagination:go_default_library", "//vendor/github.com/mitchellh/mapstructure:go_default_library", "//vendor/gopkg.in/gcfg.v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", "//vendor/k8s.io/utils/mount:go_default_library", ], diff --git a/vendor/k8s.io/legacy-cloud-providers/openstack/metadata.go b/vendor/k8s.io/legacy-cloud-providers/openstack/metadata.go index c1b65de0c4d..638108caeca 100644 --- a/vendor/k8s.io/legacy-cloud-providers/openstack/metadata.go +++ b/vendor/k8s.io/legacy-cloud-providers/openstack/metadata.go @@ -29,7 +29,7 @@ import ( "path/filepath" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/exec" "k8s.io/utils/mount" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/openstack/openstack.go b/vendor/k8s.io/legacy-cloud-providers/openstack/openstack.go index 2c2d25251d1..15d9a869b53 100644 --- a/vendor/k8s.io/legacy-cloud-providers/openstack/openstack.go +++ b/vendor/k8s.io/legacy-cloud-providers/openstack/openstack.go @@ -52,7 +52,7 @@ import ( certutil "k8s.io/client-go/util/cert" cloudprovider "k8s.io/cloud-provider" nodehelpers "k8s.io/cloud-provider/node/helpers" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_instances.go b/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_instances.go index 3d817985da5..48f9a65be78 100644 --- a/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_instances.go +++ b/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_instances.go @@ -26,7 +26,7 @@ import ( "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" v1 "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/types" cloudprovider "k8s.io/cloud-provider" @@ -62,6 +62,12 @@ func (os *OpenStack) Instances() (cloudprovider.Instances, bool) { }, true } +// InstancesV2 returns an implementation of InstancesV2 for OpenStack. +// TODO: implement ONLY for external cloud provider +func (os *OpenStack) InstancesV2() (cloudprovider.InstancesV2, bool) { + return nil, false +} + // CurrentNodeName implements Instances.CurrentNodeName // Note this is *not* necessarily the same as hostname. func (i *Instances) CurrentNodeName(ctx context.Context, hostname string) (types.NodeName, error) { diff --git a/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_loadbalancer.go b/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_loadbalancer.go index 0a4c7b5a363..73d33fa46e0 100644 --- a/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_loadbalancer.go +++ b/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_loadbalancer.go @@ -39,7 +39,7 @@ import ( "github.com/gophercloud/gophercloud/openstack/networking/v2/networks" neutronports "github.com/gophercloud/gophercloud/openstack/networking/v2/ports" "github.com/gophercloud/gophercloud/pagination" - "k8s.io/klog" + "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_routes.go b/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_routes.go index d8e85db4dbb..de8eb08ac75 100644 --- a/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_routes.go +++ b/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_routes.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/types" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" ) var errNoRouterID = errors.New("router-id not set in cloud provider config") diff --git a/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_volumes.go b/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_volumes.go index 4e36987c9df..4b72a5b0339 100644 --- a/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_volumes.go +++ b/vendor/k8s.io/legacy-cloud-providers/openstack/openstack_volumes.go @@ -43,7 +43,7 @@ import ( volumes_v2 "github.com/gophercloud/gophercloud/openstack/blockstorage/v2/volumes" volumes_v3 "github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes" "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach" - "k8s.io/klog" + "k8s.io/klog/v2" ) type volumeService interface { @@ -419,7 +419,12 @@ func (os *OpenStack) ExpandVolume(volumeID string, oldSize resource.Quantity, ne } if volume.Status != volumeAvailableStatus { // cinder volume can not be expanded if its status is not available - return oldSize, fmt.Errorf("volume in %s status can not be expanded, it must be available and not attached to a node", volume.Status) + if volume.Status == volumeInUseStatus { + // Send a nice event when the volume is used + return oldSize, fmt.Errorf("PVC used by a Pod can not be expanded, please ensure the PVC is not used by any Pod and is fully detached from a node") + } + // Send not so nice event when the volume is in any other state (deleted, error) + return oldSize, fmt.Errorf("volume in state %q can not be expanded, it must be \"available\"", volume.Status) } // Cinder works with gigabytes, convert to GiB with rounding up diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/BUILD b/vendor/k8s.io/legacy-cloud-providers/vsphere/BUILD index b8a0c1a773c..f0dfe0f1d19 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/BUILD @@ -44,7 +44,7 @@ go_library( "//vendor/github.com/vmware/govmomi/vim25/soap:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/types:go_default_library", "//vendor/gopkg.in/gcfg.v1:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) @@ -79,6 +79,7 @@ go_test( "//vendor/github.com/vmware/govmomi/vapi/tags:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/mo:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/types:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/OWNERS b/vendor/k8s.io/legacy-cloud-providers/vsphere/OWNERS index a0c8991a376..7c97c86e8bf 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/OWNERS +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/OWNERS @@ -4,7 +4,6 @@ approvers: - abrarshivani - baludontu - divyenpatel -- imkin - frapposelli - dougm - SandeepPissay @@ -12,7 +11,8 @@ reviewers: - abrarshivani - baludontu - divyenpatel -- imkin - frapposelli - dougm - SandeepPissay +emeritus_approvers: +- imkin diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go index 64db83926fc..a68be67dfba 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/credentialmanager.go @@ -28,7 +28,7 @@ import ( corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/client-go/listers/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Error Messages @@ -77,6 +77,8 @@ func (secretCredentialManager *SecretCredentialManager) GetCredential(server str klog.Warningf("secret %q not found in namespace %q", secretCredentialManager.SecretName, secretCredentialManager.SecretNamespace) } + // Converting server FQIN to lowercase to consolidate with config parsing approach + server = strings.ToLower(server) credential, found := secretCredentialManager.Cache.GetCredential(server) if !found { klog.Errorf("credentials not found for server %q", server) diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go index bf2f1cd4eaf..196f776599b 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go @@ -28,7 +28,7 @@ import ( v1 "k8s.io/api/core/v1" k8stypes "k8s.io/apimachinery/pkg/types" cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/legacy-cloud-providers/vsphere/vclib" ) @@ -259,6 +259,16 @@ func (nm *NodeManager) GetNode(nodeName k8stypes.NodeName) (v1.Node, error) { return *node, nil } +func (nm *NodeManager) getNodes() map[string]*v1.Node { + nm.registeredNodesLock.RLock() + defer nm.registeredNodesLock.RUnlock() + registeredNodes := make(map[string]*v1.Node, len(nm.registeredNodes)) + for nodeName, node := range nm.registeredNodes { + registeredNodes[nodeName] = node + } + return registeredNodes +} + func (nm *NodeManager) addNode(node *v1.Node) { nm.registeredNodesLock.Lock() nm.registeredNodes[node.ObjectMeta.Name] = node @@ -281,13 +291,40 @@ func (nm *NodeManager) removeNode(node *v1.Node) { // // This method is a getter but it can cause side-effect of updating NodeInfo object. func (nm *NodeManager) GetNodeInfo(nodeName k8stypes.NodeName) (NodeInfo, error) { - getNodeInfo := func(nodeName k8stypes.NodeName) *NodeInfo { - nm.nodeInfoLock.RLock() - nodeInfo := nm.nodeInfoMap[convertToString(nodeName)] - nm.nodeInfoLock.RUnlock() - return nodeInfo + return nm.getRefreshedNodeInfo(nodeName) +} + +// GetNodeDetails returns NodeDetails for all the discovered nodes. +// +// This method is a getter but it can cause side-effect of updating NodeInfo objects. +func (nm *NodeManager) GetNodeDetails() ([]NodeDetails, error) { + var nodeDetails []NodeDetails + + for nodeName, nodeObj := range nm.getNodes() { + nodeInfo, err := nm.GetNodeInfoWithNodeObject(nodeObj) + if err != nil { + return nil, err + } + klog.V(4).Infof("Updated NodeInfo %v for node %q.", nodeInfo, nodeName) + nodeDetails = append(nodeDetails, NodeDetails{nodeName, nodeInfo.vm, nodeInfo.vmUUID, nodeInfo.zone}) } - nodeInfo := getNodeInfo(nodeName) + return nodeDetails, nil +} + +func (nm *NodeManager) refreshNodes() (errList []error) { + for nodeName := range nm.getNodes() { + nodeInfo, err := nm.getRefreshedNodeInfo(convertToK8sType(nodeName)) + if err != nil { + errList = append(errList, err) + continue + } + klog.V(4).Infof("Updated NodeInfo %v for node %q.", nodeInfo, nodeName) + } + return errList +} + +func (nm *NodeManager) getRefreshedNodeInfo(nodeName k8stypes.NodeName) (NodeInfo, error) { + nodeInfo := nm.getNodeInfo(nodeName) var err error if nodeInfo == nil { // Rediscover node if no NodeInfo found. @@ -297,7 +334,7 @@ func (nm *NodeManager) GetNodeInfo(nodeName k8stypes.NodeName) (NodeInfo, error) klog.Errorf("Error %q node info for node %q not found", err, convertToString(nodeName)) return NodeInfo{}, err } - nodeInfo = getNodeInfo(nodeName) + nodeInfo = nm.getNodeInfo(nodeName) } else { // Renew the found NodeInfo to avoid stale vSphere connection. klog.V(4).Infof("Renewing NodeInfo %+v for node %q", nodeInfo, convertToString(nodeName)) @@ -311,31 +348,19 @@ func (nm *NodeManager) GetNodeInfo(nodeName k8stypes.NodeName) (NodeInfo, error) return *nodeInfo, nil } -// GetNodeDetails returns NodeDetails for all the discovered nodes. -// -// This method is a getter but it can cause side-effect of updating NodeInfo objects. -func (nm *NodeManager) GetNodeDetails() ([]NodeDetails, error) { - nm.registeredNodesLock.Lock() - defer nm.registeredNodesLock.Unlock() - var nodeDetails []NodeDetails - - for nodeName, nodeObj := range nm.registeredNodes { - nodeInfo, err := nm.GetNodeInfoWithNodeObject(nodeObj) - if err != nil { - return nil, err - } - klog.V(4).Infof("Updated NodeInfo %v for node %q.", nodeInfo, nodeName) - nodeDetails = append(nodeDetails, NodeDetails{nodeName, nodeInfo.vm, nodeInfo.vmUUID, nodeInfo.zone}) - } - return nodeDetails, nil -} - func (nm *NodeManager) addNodeInfo(nodeName string, nodeInfo *NodeInfo) { nm.nodeInfoLock.Lock() nm.nodeInfoMap[nodeName] = nodeInfo nm.nodeInfoLock.Unlock() } +func (nm *NodeManager) getNodeInfo(nodeName k8stypes.NodeName) *NodeInfo { + nm.nodeInfoLock.RLock() + nodeInfo := nm.nodeInfoMap[convertToString(nodeName)] + nm.nodeInfoLock.RUnlock() + return nodeInfo +} + func (nm *NodeManager) GetVSphereInstance(nodeName k8stypes.NodeName) (VSphereInstance, error) { nodeInfo, err := nm.GetNodeInfo(nodeName) if err != nil { @@ -417,35 +442,7 @@ func (nm *NodeManager) vcConnect(ctx context.Context, vsphereInstance *VSphereIn // // This method is a getter but it can cause side-effect of updating NodeInfo object. func (nm *NodeManager) GetNodeInfoWithNodeObject(node *v1.Node) (NodeInfo, error) { - nodeName := node.Name - getNodeInfo := func(nodeName string) *NodeInfo { - nm.nodeInfoLock.RLock() - nodeInfo := nm.nodeInfoMap[nodeName] - nm.nodeInfoLock.RUnlock() - return nodeInfo - } - nodeInfo := getNodeInfo(nodeName) - var err error - if nodeInfo == nil { - // Rediscover node if no NodeInfo found. - klog.V(4).Infof("No VM found for node %q. Initiating rediscovery.", nodeName) - err = nm.DiscoverNode(node) - if err != nil { - klog.Errorf("Error %q node info for node %q not found", err, nodeName) - return NodeInfo{}, err - } - nodeInfo = getNodeInfo(nodeName) - } else { - // Renew the found NodeInfo to avoid stale vSphere connection. - klog.V(4).Infof("Renewing NodeInfo %+v for node %q", nodeInfo, nodeName) - nodeInfo, err = nm.renewNodeInfo(nodeInfo, true) - if err != nil { - klog.Errorf("Error %q occurred while renewing NodeInfo for %q", err, nodeName) - return NodeInfo{}, err - } - nm.addNodeInfo(nodeName, nodeInfo) - } - return *nodeInfo, nil + return nm.getRefreshedNodeInfo(convertToK8sType(node.Name)) } func (nm *NodeManager) CredentialManager() *SecretCredentialManager { diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/BUILD b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/BUILD index b1297ec4df0..22c3ece53be 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/BUILD @@ -40,7 +40,7 @@ go_library( "//vendor/github.com/vmware/govmomi/vim25/mo:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/soap:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go index 44cc163545a..b726cc1aa49 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go @@ -30,7 +30,7 @@ import ( "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/soap" "k8s.io/client-go/pkg/version" - "k8s.io/klog" + "k8s.io/klog/v2" ) // VSphereConnection contains information for connecting to vCenter @@ -204,7 +204,7 @@ func (connection *VSphereConnection) NewClient(ctx context.Context) (*vim25.Clie if err != nil { return nil, err } - if klog.V(3) { + if klog.V(3).Enabled() { s, err := session.NewManager(client).UserSession(ctx) if err == nil { klog.Infof("New session ID for '%s' = %s", s.UserName, s.Key) diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/datacenter.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/datacenter.go index 11d8aa15192..e27cd092d27 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/datacenter.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/datacenter.go @@ -28,7 +28,7 @@ import ( "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Datacenter extends the govmomi Datacenter object diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/datastore.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/datastore.go index 00fc1f42e26..66f6a3dd877 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/datastore.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/datastore.go @@ -25,7 +25,7 @@ import ( "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Datastore extends the govmomi Datastore object diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/BUILD b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/BUILD index f99517c3c4e..6aaeeb15a19 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/BUILD +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/BUILD @@ -18,7 +18,7 @@ go_library( "//staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib:go_default_library", "//vendor/github.com/vmware/govmomi/object:go_default_library", "//vendor/github.com/vmware/govmomi/vim25/types:go_default_library", - "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/klog/v2:go_default_library", ], ) diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/vdm.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/vdm.go index 08f650c70be..6ef6109fd67 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/vdm.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/vdm.go @@ -23,7 +23,7 @@ import ( "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/legacy-cloud-providers/vsphere/vclib" ) @@ -70,6 +70,11 @@ func (diskManager virtualDiskManager) Create(ctx context.Context, datastore *vcl taskInfo, err := task.WaitForResult(ctx, nil) vclib.RecordvSphereMetric(vclib.APICreateVolume, requestTime, err) if err != nil { + if isAlreadyExists(diskManager.diskPath, err) { + // The disk already exists, log info message and return success + klog.V(vclib.LogLevel).Infof("File: %v already exists", diskManager.diskPath) + return diskManager.diskPath, nil + } klog.Errorf("Failed to complete virtual disk creation: %s. err: %+v", diskManager.diskPath, err) return "", err } diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/virtualdisk.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/virtualdisk.go index 5b8368c69d2..3bb9af0fab4 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/virtualdisk.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/virtualdisk.go @@ -20,7 +20,7 @@ import ( "context" "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/legacy-cloud-providers/vsphere/vclib" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/vmdm.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/vmdm.go index 12827a10623..484d0ee57d2 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/vmdm.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers/vmdm.go @@ -25,7 +25,7 @@ import ( "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/legacy-cloud-providers/vsphere/vclib" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/folder.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/folder.go index 1e4f8e4e888..f2e6d1a17c8 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/folder.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/folder.go @@ -20,7 +20,7 @@ import ( "context" "github.com/vmware/govmomi/object" - "k8s.io/klog" + "k8s.io/klog/v2" ) // Folder extends the govmomi Folder object diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/pbm.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/pbm.go index 05eff9eb3c7..fc234821d75 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/pbm.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/pbm.go @@ -21,7 +21,7 @@ import ( "fmt" "github.com/vmware/govmomi/pbm" - "k8s.io/klog" + "k8s.io/klog/v2" pbmtypes "github.com/vmware/govmomi/pbm/types" "github.com/vmware/govmomi/vim25" diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/utils.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/utils.go index ba646c711ff..8ff97771a95 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/utils.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/utils.go @@ -27,7 +27,7 @@ import ( "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // IsNotFound return true if err is NotFoundError or DefaultNotFoundError diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/virtualmachine.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/virtualmachine.go index 5286f672377..4837b7db373 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/virtualmachine.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/virtualmachine.go @@ -27,7 +27,7 @@ import ( "github.com/vmware/govmomi/vim25" "github.com/vmware/govmomi/vim25/mo" "github.com/vmware/govmomi/vim25/types" - "k8s.io/klog" + "k8s.io/klog/v2" ) // VirtualMachine extends the govmomi VirtualMachine object diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/volumeoptions.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/volumeoptions.go index a8237a1174f..6ff0ad58aec 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/volumeoptions.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/volumeoptions.go @@ -20,7 +20,7 @@ import ( "strings" "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" ) // VolumeOptions specifies various options for a volume. diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere.go index 96ada113059..12da586427a 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere.go @@ -28,6 +28,7 @@ import ( "os" "path" "path/filepath" + "reflect" "runtime" "strings" "sync" @@ -48,7 +49,7 @@ import ( cloudprovider "k8s.io/cloud-provider" nodehelpers "k8s.io/cloud-provider/node/helpers" volumehelpers "k8s.io/cloud-provider/volume/helpers" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/legacy-cloud-providers/vsphere/vclib" "k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers" @@ -98,6 +99,7 @@ type VSphere struct { nodeManager *NodeManager vmUUID string isSecretInfoProvided bool + isSecretManaged bool } // Represents a vSphere instance where one or more kubernetes nodes are running. @@ -175,6 +177,8 @@ type VSphereConfig struct { SecretName string `gcfg:"secret-name"` // Secret Namespace where secret will be present that has vCenter credentials. SecretNamespace string `gcfg:"secret-namespace"` + // Secret changes being ingnored for cloud resources + SecretNotManaged bool `gcfg:"secret-not-managed"` } VirtualCenter map[string]*VirtualCenterConfig @@ -276,6 +280,15 @@ func (vs *VSphere) SetInformers(informerFactory informers.SharedInformerFactory) VirtualCenter: make(map[string]*Credential), }, } + if vs.isSecretManaged { + klog.V(4).Infof("Setting up secret informers for vSphere Cloud Provider") + secretInformer := informerFactory.Core().V1().Secrets().Informer() + secretInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: vs.SecretAdded, + UpdateFunc: vs.SecretUpdated, + }) + klog.V(4).Infof("Secret informers in vSphere cloud provider initialized") + } vs.nodeManager.UpdateCredentialManager(secretCredentialManager) } @@ -530,6 +543,7 @@ func buildVSphereFromConfig(cfg VSphereConfig) (*VSphere, error) { registeredNodes: make(map[string]*v1.Node), }, isSecretInfoProvided: isSecretInfoProvided, + isSecretManaged: !cfg.Global.SecretNotManaged, cfg: &cfg, } return &vs, nil @@ -546,6 +560,12 @@ func (vs *VSphere) Instances() (cloudprovider.Instances, bool) { return vs, true } +// InstancesV2 returns an implementation of InstancesV2 for vSphere. +// TODO: implement ONLY for external cloud provider +func (vs *VSphere) InstancesV2() (cloudprovider.InstancesV2, bool) { + return nil, false +} + func getLocalIP() ([]v1.NodeAddress, error) { // hashtable with VMware-allocated OUIs for MAC filtering // List of official OUIs: http://standards-oui.ieee.org/oui.txt @@ -639,17 +659,25 @@ func (vs *VSphere) getVMFromNodeName(ctx context.Context, nodeName k8stypes.Node // NodeAddresses is an implementation of Instances.NodeAddresses. func (vs *VSphere) NodeAddresses(ctx context.Context, nodeName k8stypes.NodeName) ([]v1.NodeAddress, error) { - // Get local IP addresses if node is local node if vs.hostName == convertToString(nodeName) { - addrs, err := getLocalIP() - if err != nil { - return nil, err - } - // add the hostname address - nodehelpers.AddToNodeAddresses(&addrs, v1.NodeAddress{Type: v1.NodeHostName, Address: vs.hostName}) - return addrs, nil + return vs.getNodeAddressesFromLocalIP() } + return vs.getNodeAddressesFromVM(ctx, nodeName) +} +// getNodeAddressesFromLocalIP get local IP addresses if node is local node. +func (vs *VSphere) getNodeAddressesFromLocalIP() ([]v1.NodeAddress, error) { + addrs, err := getLocalIP() + if err != nil { + return nil, err + } + // add the hostname address + nodehelpers.AddToNodeAddresses(&addrs, v1.NodeAddress{Type: v1.NodeHostName, Address: vs.hostName}) + return addrs, nil +} + +// getNodeAddressesFromVM get vm IP addresses if node is vm. +func (vs *VSphere) getNodeAddressesFromVM(ctx context.Context, nodeName k8stypes.NodeName) ([]v1.NodeAddress, error) { if vs.cfg == nil { return nil, cloudprovider.InstanceNotFound } @@ -1071,11 +1099,11 @@ func (vs *VSphere) DisksAreAttached(nodeVolumes map[k8stypes.NodeName][]string) dcNodes[VC_DC] = append(dcNodes[VC_DC], nodeName) } - for _, nodes := range dcNodes { + for _, nodeNames := range dcNodes { localAttachedMap := make(map[string]map[string]bool) localAttachedMaps = append(localAttachedMaps, localAttachedMap) // Start go routines per VC-DC to check disks are attached - go func() { + go func(nodes []k8stypes.NodeName) { nodesToRetryLocal, err := vs.checkDiskAttached(ctx, nodes, nodeVolumes, localAttachedMap, retry) if err != nil { if !vclib.IsManagedObjectNotFoundError(err) { @@ -1089,7 +1117,7 @@ func (vs *VSphere) DisksAreAttached(nodeVolumes map[k8stypes.NodeName][]string) nodesToRetry = append(nodesToRetry, nodesToRetryLocal...) nodesToRetryMutex.Unlock() wg.Done() - }() + }(nodeNames) wg.Add(1) } wg.Wait() @@ -1459,6 +1487,54 @@ func (vs *VSphere) NodeDeleted(obj interface{}) { } } +// Notification handler when credentials secret is added. +func (vs *VSphere) SecretAdded(obj interface{}) { + secret, ok := obj.(*v1.Secret) + if secret == nil || !ok { + klog.Warningf("Unrecognized secret object %T", obj) + return + } + + if secret.Name != vs.cfg.Global.SecretName || + secret.Namespace != vs.cfg.Global.SecretNamespace { + return + } + + klog.V(4).Infof("secret added: %+v", obj) + vs.refreshNodesForSecretChange() +} + +// Notification handler when credentials secret is updated. +func (vs *VSphere) SecretUpdated(obj interface{}, newObj interface{}) { + oldSecret, ok := obj.(*v1.Secret) + if oldSecret == nil || !ok { + klog.Warningf("Unrecognized secret object %T", obj) + return + } + + secret, ok := newObj.(*v1.Secret) + if secret == nil || !ok { + klog.Warningf("Unrecognized secret object %T", newObj) + return + } + + if secret.Name != vs.cfg.Global.SecretName || + secret.Namespace != vs.cfg.Global.SecretNamespace || + reflect.DeepEqual(secret.Data, oldSecret.Data) { + return + } + + klog.V(4).Infof("secret updated: %+v", newObj) + vs.refreshNodesForSecretChange() +} + +func (vs *VSphere) refreshNodesForSecretChange() { + err := vs.nodeManager.refreshNodes() + if err != nil { + klog.Errorf("failed to rediscover nodes: %v", err) + } +} + func (vs *VSphere) NodeManager() (nodeManager *NodeManager) { if vs == nil { return nil diff --git a/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere_util.go b/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere_util.go index 795f1632afd..a207867289b 100644 --- a/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere_util.go +++ b/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere_util.go @@ -36,7 +36,7 @@ import ( "github.com/vmware/govmomi/vim25/soap" "github.com/vmware/govmomi/vim25/types" v1 "k8s.io/api/core/v1" - "k8s.io/klog" + "k8s.io/klog/v2" k8stypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/version" diff --git a/vendor/k8s.io/utils/clock/README.md b/vendor/k8s.io/utils/clock/README.md new file mode 100644 index 00000000000..ad2a8868aae --- /dev/null +++ b/vendor/k8s.io/utils/clock/README.md @@ -0,0 +1,4 @@ +# Clock + +This package provides an interface for time-based operations. It allows +mocking time for testing. diff --git a/vendor/k8s.io/utils/exec/README.md b/vendor/k8s.io/utils/exec/README.md new file mode 100644 index 00000000000..7944e8dd3be --- /dev/null +++ b/vendor/k8s.io/utils/exec/README.md @@ -0,0 +1,5 @@ +# Exec + +This package provides an interface for `os/exec`. It makes it easier to mock +and replace in tests, especially with the [FakeExec](testing/fake_exec.go) +struct. diff --git a/vendor/k8s.io/utils/io/README.md b/vendor/k8s.io/utils/io/README.md new file mode 100644 index 00000000000..aa4cc41044b --- /dev/null +++ b/vendor/k8s.io/utils/io/README.md @@ -0,0 +1,4 @@ +# IO + +This package provides interfaces for working with file IO. Currently it +provides functionality for consistently reading a file. diff --git a/vendor/k8s.io/utils/mount/fake_mounter.go b/vendor/k8s.io/utils/mount/fake_mounter.go index 8e690bbfc28..f48c2badba6 100644 --- a/vendor/k8s.io/utils/mount/fake_mounter.go +++ b/vendor/k8s.io/utils/mount/fake_mounter.go @@ -21,7 +21,7 @@ import ( "path/filepath" "sync" - "k8s.io/klog" + "k8s.io/klog/v2" ) // FakeMounter implements mount.Interface for tests. diff --git a/vendor/k8s.io/utils/mount/mount.go b/vendor/k8s.io/utils/mount/mount.go index 112d7ebc178..14997a75c9b 100644 --- a/vendor/k8s.io/utils/mount/mount.go +++ b/vendor/k8s.io/utils/mount/mount.go @@ -77,7 +77,7 @@ type Interface interface { var _ Interface = &Mounter{} // MountPoint represents a single line in /proc/mounts or /etc/fstab. -type MountPoint struct { +type MountPoint struct { // nolint: golint Device string Path string Type string @@ -86,7 +86,7 @@ type MountPoint struct { Pass int } -type MountErrorType string +type MountErrorType string // nolint: golint const ( FilesystemMismatch MountErrorType = "FilesystemMismatch" @@ -97,7 +97,7 @@ const ( UnknownMountError MountErrorType = "UnknownMountError" ) -type MountError struct { +type MountError struct { // nolint: golint Type MountErrorType Message string } @@ -346,14 +346,14 @@ func StartsWithBackstep(rel string) bool { return rel == ".." || strings.HasPrefix(filepath.ToSlash(rel), "../") } -// sanitizedOptionsForLogging will return a comma seperated string containing +// sanitizedOptionsForLogging will return a comma separated string containing // options and sensitiveOptions. Each entry in sensitiveOptions will be // replaced with the string sensitiveOptionsRemoved // e.g. o1,o2,, func sanitizedOptionsForLogging(options []string, sensitiveOptions []string) string { - seperator := "" + separator := "" if len(options) > 0 && len(sensitiveOptions) > 0 { - seperator = "," + separator = "," } sensitiveOptionsStart := "" @@ -364,7 +364,7 @@ func sanitizedOptionsForLogging(options []string, sensitiveOptions []string) str } return strings.Join(options, ",") + - seperator + + separator + sensitiveOptionsStart + sensitiveOptionsEnd } diff --git a/vendor/k8s.io/utils/mount/mount_helper_common.go b/vendor/k8s.io/utils/mount/mount_helper_common.go index 36bb32b463d..1d40549b5f4 100644 --- a/vendor/k8s.io/utils/mount/mount_helper_common.go +++ b/vendor/k8s.io/utils/mount/mount_helper_common.go @@ -20,7 +20,7 @@ import ( "fmt" "os" - "k8s.io/klog" + "k8s.io/klog/v2" ) // CleanupMountPoint unmounts the given path and deletes the remaining directory diff --git a/vendor/k8s.io/utils/mount/mount_helper_unix.go b/vendor/k8s.io/utils/mount/mount_helper_unix.go index 1e14d8c96ca..11b70ebc298 100644 --- a/vendor/k8s.io/utils/mount/mount_helper_unix.go +++ b/vendor/k8s.io/utils/mount/mount_helper_unix.go @@ -56,7 +56,7 @@ func IsCorruptedMnt(err error) bool { } // MountInfo represents a single line in /proc//mountinfo. -type MountInfo struct { +type MountInfo struct { // nolint: golint // Unique ID for the mount (maybe reused after umount). ID int // The ID of the parent mount (or of self for the root of this mount namespace's mount tree). diff --git a/vendor/k8s.io/utils/mount/mount_helper_windows.go b/vendor/k8s.io/utils/mount/mount_helper_windows.go index 516f970d282..b308ce76d2f 100644 --- a/vendor/k8s.io/utils/mount/mount_helper_windows.go +++ b/vendor/k8s.io/utils/mount/mount_helper_windows.go @@ -25,7 +25,7 @@ import ( "strings" "syscall" - "k8s.io/klog" + "k8s.io/klog/v2" ) // following failure codes are from https://docs.microsoft.com/en-us/windows/desktop/debug/system-error-codes--1300-1699- diff --git a/vendor/k8s.io/utils/mount/mount_linux.go b/vendor/k8s.io/utils/mount/mount_linux.go index 41f69efe3f0..b7a443fdf6c 100644 --- a/vendor/k8s.io/utils/mount/mount_linux.go +++ b/vendor/k8s.io/utils/mount/mount_linux.go @@ -27,7 +27,7 @@ import ( "strings" "syscall" - "k8s.io/klog" + "k8s.io/klog/v2" utilexec "k8s.io/utils/exec" utilio "k8s.io/utils/io" ) @@ -103,7 +103,7 @@ func (mounter *Mounter) MountSensitive(source string, target string, fstype stri } // doMount runs the mount command. mounterPath is the path to mounter binary if containerized mounter is used. -// sensitiveOptions is an extention of options except they will not be logged (because they may contain sensitive material) +// sensitiveOptions is an extension of options except they will not be logged (because they may contain sensitive material) func (mounter *Mounter) doMount(mounterPath string, mountCmd string, source string, target string, fstype string, options []string, sensitiveOptions []string) error { mountArgs, mountArgsLogStr := MakeMountArgsSensitive(source, target, fstype, options, sensitiveOptions) if len(mounterPath) > 0 { @@ -187,7 +187,7 @@ func MakeMountArgs(source, target, fstype string, options []string) (mountArgs [ } // MakeMountArgsSensitive makes the arguments to the mount(8) command. -// sensitiveOptions is an extention of options except they will not be logged (because they may contain sensitive material) +// sensitiveOptions is an extension of options except they will not be logged (because they may contain sensitive material) func MakeMountArgsSensitive(source, target, fstype string, options []string, sensitiveOptions []string) (mountArgs []string, mountArgsLogStr string) { // Build mount command as follows: // mount [-t $fstype] [-o $options] [$source] $target diff --git a/vendor/k8s.io/utils/mount/mount_windows.go b/vendor/k8s.io/utils/mount/mount_windows.go index a99fdb9ce5b..0534649c062 100644 --- a/vendor/k8s.io/utils/mount/mount_windows.go +++ b/vendor/k8s.io/utils/mount/mount_windows.go @@ -25,10 +25,8 @@ import ( "path/filepath" "strings" - "k8s.io/klog" - utilexec "k8s.io/utils/exec" + "k8s.io/klog/v2" "k8s.io/utils/keymutex" - utilpath "k8s.io/utils/path" ) // Mounter provides the default implementation of mount.Interface @@ -115,10 +113,12 @@ func (mounter *Mounter) MountSensitive(source string, target string, fstype stri } } - if output, err := exec.Command("cmd", "/c", "mklink", "/D", target, bindSource).CombinedOutput(); err != nil { + output, err := exec.Command("cmd", "/c", "mklink", "/D", target, bindSource).CombinedOutput() + if err != nil { klog.Errorf("mklink failed: %v, source(%q) target(%q) output: %q", err, bindSource, target, string(output)) return err } + klog.V(2).Infof("mklink source(%q) on target(%q) successfully, output: %q", bindSource, target, string(output)) return nil } @@ -183,19 +183,10 @@ func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) { if err != nil { return true, err } - // If current file is a symlink, then it is a mountpoint. - if stat.Mode()&os.ModeSymlink != 0 { - target, err := os.Readlink(file) - if err != nil { - return true, fmt.Errorf("readlink error: %v", err) - } - exists, err := utilpath.Exists(utilpath.CheckFollowSymlink, target) - if err != nil { - return true, err - } - return !exists, nil - } + if stat.Mode()&os.ModeSymlink != 0 { + return false, err + } return true, nil } @@ -230,37 +221,38 @@ func (mounter *SafeFormatAndMount) formatAndMountSensitive(source string, target // format disk if it is unformatted(raw) cmd := fmt.Sprintf("Get-Disk -Number %s | Where partitionstyle -eq 'raw' | Initialize-Disk -PartitionStyle MBR -PassThru"+ - " | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem %s -Confirm:$false", source, fstype) + " | New-Partition -UseMaximumSize | Format-Volume -FileSystem %s -Confirm:$false", source, fstype) if output, err := mounter.Exec.Command("powershell", "/c", cmd).CombinedOutput(); err != nil { return fmt.Errorf("diskMount: format disk failed, error: %v, output: %q", err, string(output)) } klog.V(4).Infof("diskMount: Disk successfully formatted, disk: %q, fstype: %q", source, fstype) - driveLetter, err := getDriveLetterByDiskNumber(source, mounter.Exec) + volumeIds, err := listVolumesOnDisk(source) if err != nil { return err } - driverPath := driveLetter + ":" + driverPath := volumeIds[0] target = NormalizeWindowsPath(target) - klog.V(4).Infof("Attempting to formatAndMount disk: %s %s %s", fstype, driverPath, target) - if output, err := mounter.Exec.Command("cmd", "/c", "mklink", "/D", target, driverPath).CombinedOutput(); err != nil { - klog.Errorf("mklink failed: %v, output: %q", err, string(output)) + output, err := mounter.Exec.Command("cmd", "/c", "mklink", "/D", target, driverPath).CombinedOutput() + if err != nil { + klog.Errorf("mklink(%s, %s) failed: %v, output: %q", target, driverPath, err, string(output)) return err } + klog.V(2).Infof("formatAndMount disk(%s) fstype(%s) on(%s) with output(%s) successfully", driverPath, fstype, target, string(output)) return nil } -// Get drive letter according to windows disk number -func getDriveLetterByDiskNumber(diskNum string, exec utilexec.Interface) (string, error) { - cmd := fmt.Sprintf("(Get-Partition -DiskNumber %s).DriveLetter", diskNum) +// ListVolumesOnDisk - returns back list of volumes(volumeIDs) in the disk (requested in diskID). +func listVolumesOnDisk(diskID string) (volumeIDs []string, err error) { + cmd := fmt.Sprintf("(Get-Disk -DeviceId %s | Get-Partition | Get-Volume).UniqueId", diskID) output, err := exec.Command("powershell", "/c", cmd).CombinedOutput() + klog.V(4).Infof("listVolumesOnDisk id from %s: %s", diskID, string(output)) if err != nil { - return "", fmt.Errorf("azureMount: Get Drive Letter failed: %v, output: %q", err, string(output)) + return []string{}, fmt.Errorf("error list volumes on disk. cmd: %s, output: %s, error: %v", cmd, string(output), err) } - if len(string(output)) < 1 { - return "", fmt.Errorf("azureMount: Get Drive Letter failed, output is empty") - } - return string(output)[:1], nil + + volumeIds := strings.Split(strings.TrimSpace(string(output)), "\r\n") + return volumeIds, nil } // getAllParentLinks walks all symbolic links and return all the parent targets recursively diff --git a/vendor/k8s.io/utils/nsenter/README.md b/vendor/k8s.io/utils/nsenter/README.md new file mode 100644 index 00000000000..aaacf8e3d3c --- /dev/null +++ b/vendor/k8s.io/utils/nsenter/README.md @@ -0,0 +1,4 @@ +# NSEnter + +This package provides interfaces for executing and interacting with processes +running within a namespace. diff --git a/vendor/k8s.io/utils/nsenter/nsenter.go b/vendor/k8s.io/utils/nsenter/nsenter.go index a6fa0c22376..545883900f4 100644 --- a/vendor/k8s.io/utils/nsenter/nsenter.go +++ b/vendor/k8s.io/utils/nsenter/nsenter.go @@ -26,7 +26,7 @@ import ( "path/filepath" "strings" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/utils/exec" ) diff --git a/vendor/k8s.io/utils/path/file.go b/vendor/k8s.io/utils/path/file.go index a57285d3b45..319914641ac 100644 --- a/vendor/k8s.io/utils/path/file.go +++ b/vendor/k8s.io/utils/path/file.go @@ -30,7 +30,7 @@ const ( // the symlink exists. CheckFollowSymlink LinkTreatment = iota - // CheckSymlinkOnly does not follow the symlink and verfies only that they + // CheckSymlinkOnly does not follow the symlink and verifies only that they // symlink itself exists. CheckSymlinkOnly ) diff --git a/vendor/k8s.io/utils/pointer/README.md b/vendor/k8s.io/utils/pointer/README.md new file mode 100644 index 00000000000..2ca8073dc73 --- /dev/null +++ b/vendor/k8s.io/utils/pointer/README.md @@ -0,0 +1,3 @@ +# Pointer + +This package provides some functions for pointer-based operations. diff --git a/vendor/k8s.io/utils/trace/README.md b/vendor/k8s.io/utils/trace/README.md new file mode 100644 index 00000000000..1e9c693893d --- /dev/null +++ b/vendor/k8s.io/utils/trace/README.md @@ -0,0 +1,67 @@ +# Trace + +This package provides an interface for recording the latency of operations and logging details +about all operations where the latency exceeds a limit. + +## Usage + +To create a trace: + +```go +func doSomething() { + opTrace := trace.New("operation", Field{Key: "fieldKey1", Value: "fieldValue1"}) + defer opTrace.LogIfLong(100 * time.Millisecond) + // do something +} +``` + +To split an trace into multiple steps: + +```go +func doSomething() { + opTrace := trace.New("operation") + defer opTrace.LogIfLong(100 * time.Millisecond) + // do step 1 + opTrace.Step("step1", Field{Key: "stepFieldKey1", Value: "stepFieldValue1"}) + // do step 2 + opTrace.Step("step2") +} +``` + +To nest traces: + +```go +func doSomething() { + rootTrace := trace.New("rootOperation") + defer rootTrace.LogIfLong(100 * time.Millisecond) + + func() { + nestedTrace := rootTrace.Nest("nested", Field{Key: "nestedFieldKey1", Value: "nestedFieldValue1"}) + defer nestedTrace.LogIfLong(50 * time.Millisecond) + // do nested operation + }() +} +``` + +Traces can also be logged unconditionally or introspected: + +```go +opTrace.TotalTime() // Duration since the Trace was created +opTrace.Log() // unconditionally log the trace +``` + +### Using context.Context to nest traces + +`context.Context` can be used to manage nested traces. Create traces by calling `trace.GetTraceFromContext(ctx).Nest`. +This is safe even if there is no parent trace already in the context because `(*(Trace)nil).Nest()` returns +a top level trace. + +```go +func doSomething(ctx context.Context) { + opTrace := trace.FromContext(ctx).Nest("operation") // create a trace, possibly nested + ctx = trace.ContextWithTrace(ctx, opTrace) // make this trace the parent trace of the context + defer opTrace.LogIfLong(50 * time.Millisecond) + + doSomethingElse(ctx) +} +``` \ No newline at end of file diff --git a/vendor/k8s.io/utils/trace/trace.go b/vendor/k8s.io/utils/trace/trace.go index 3b424104a98..2af4967ca03 100644 --- a/vendor/k8s.io/utils/trace/trace.go +++ b/vendor/k8s.io/utils/trace/trace.go @@ -18,13 +18,18 @@ package trace import ( "bytes" + "context" "fmt" "math/rand" "time" - "k8s.io/klog" + "k8s.io/klog/v2" ) +var klogV = func(lvl klog.Level) bool { + return klog.V(lvl).Enabled() +} + // Field is a key value pair that provides additional details about the trace. type Field struct { Key string @@ -44,19 +49,83 @@ func writeFields(b *bytes.Buffer, l []Field) { } } +func writeTraceItemSummary(b *bytes.Buffer, msg string, totalTime time.Duration, startTime time.Time, fields []Field) { + b.WriteString(fmt.Sprintf("%q ", msg)) + if len(fields) > 0 { + writeFields(b, fields) + b.WriteString(" ") + } + + b.WriteString(fmt.Sprintf("%vms (%v)", durationToMilliseconds(totalTime), startTime.Format("15:04:00.000"))) +} + +func durationToMilliseconds(timeDuration time.Duration) int64 { + return timeDuration.Nanoseconds() / 1e6 +} + +type traceItem interface { + // time returns when the trace was recorded as completed. + time() time.Time + // writeItem outputs the traceItem to the buffer. If stepThreshold is non-nil, only output the + // traceItem if its the duration exceeds the stepThreshold. + // Each line of output is prefixed by formatter to visually indent nested items. + writeItem(b *bytes.Buffer, formatter string, startTime time.Time, stepThreshold *time.Duration) +} + type traceStep struct { stepTime time.Time msg string fields []Field } +func (s traceStep) time() time.Time { + return s.stepTime +} + +func (s traceStep) writeItem(b *bytes.Buffer, formatter string, startTime time.Time, stepThreshold *time.Duration) { + stepDuration := s.stepTime.Sub(startTime) + if stepThreshold == nil || *stepThreshold == 0 || stepDuration >= *stepThreshold || klogV(4) { + b.WriteString(fmt.Sprintf("%s---", formatter)) + writeTraceItemSummary(b, s.msg, stepDuration, s.stepTime, s.fields) + } +} + // Trace keeps track of a set of "steps" and allows us to log a specific // step if it took longer than its share of the total allowed time type Trace struct { - name string - fields []Field - startTime time.Time - steps []traceStep + name string + fields []Field + threshold *time.Duration + startTime time.Time + endTime *time.Time + traceItems []traceItem + parentTrace *Trace +} + +func (t *Trace) time() time.Time { + if t.endTime != nil { + return *t.endTime + } + return t.startTime // if the trace is incomplete, don't assume an end time +} + +func (t *Trace) writeItem(b *bytes.Buffer, formatter string, startTime time.Time, stepThreshold *time.Duration) { + if t.durationIsWithinThreshold() || klogV(4) { + b.WriteString(fmt.Sprintf("%v[", formatter)) + writeTraceItemSummary(b, t.name, t.TotalTime(), t.startTime, t.fields) + if st := t.calculateStepThreshold(); st != nil { + stepThreshold = st + } + t.writeTraceSteps(b, formatter+" ", stepThreshold) + b.WriteString("]") + return + } + // If the trace should not be written, still check for nested traces that should be written + for _, s := range t.traceItems { + if nestedTrace, ok := s.(*Trace); ok { + nestedTrace.writeItem(b, formatter, startTime, stepThreshold) + } + } } // New creates a Trace with the specified name. The name identifies the operation to be traced. The @@ -69,63 +138,145 @@ func New(name string, fields ...Field) *Trace { // how long it took. The Fields add key value pairs to provide additional details about the trace // step. func (t *Trace) Step(msg string, fields ...Field) { - if t.steps == nil { + if t.traceItems == nil { // traces almost always have less than 6 steps, do this to avoid more than a single allocation - t.steps = make([]traceStep, 0, 6) + t.traceItems = make([]traceItem, 0, 6) } - t.steps = append(t.steps, traceStep{stepTime: time.Now(), msg: msg, fields: fields}) + t.traceItems = append(t.traceItems, traceStep{stepTime: time.Now(), msg: msg, fields: fields}) } -// Log is used to dump all the steps in the Trace +// Nest adds a nested trace with the given message and fields and returns it. +// As a convenience, if the receiver is nil, returns a top level trace. This allows +// one to call FromContext(ctx).Nest without having to check if the trace +// in the context is nil. +func (t *Trace) Nest(msg string, fields ...Field) *Trace { + newTrace := New(msg, fields...) + if t != nil { + newTrace.parentTrace = t + t.traceItems = append(t.traceItems, newTrace) + } + return newTrace +} + +// Log is used to dump all the steps in the Trace. It also logs the nested trace messages using indentation. +// If the Trace is nested it is not immediately logged. Instead, it is logged when the trace it is nested within +// is logged. func (t *Trace) Log() { - // an explicit logging request should dump all the steps out at the higher level - t.logWithStepThreshold(0) -} - -func (t *Trace) logWithStepThreshold(stepThreshold time.Duration) { - var buffer bytes.Buffer - tracenum := rand.Int31() endTime := time.Now() - - totalTime := endTime.Sub(t.startTime) - buffer.WriteString(fmt.Sprintf("Trace[%d]: %q ", tracenum, t.name)) - if len(t.fields) > 0 { - writeFields(&buffer, t.fields) - buffer.WriteString(" ") + t.endTime = &endTime + // an explicit logging request should dump all the steps out at the higher level + if t.parentTrace == nil { // We don't start logging until Log or LogIfLong is called on the root trace + t.logTrace() } - buffer.WriteString(fmt.Sprintf("(started: %v) (total time: %v):\n", t.startTime, totalTime)) - lastStepTime := t.startTime - for _, step := range t.steps { - stepDuration := step.stepTime.Sub(lastStepTime) - if stepThreshold == 0 || stepDuration > stepThreshold || klog.V(4) { - buffer.WriteString(fmt.Sprintf("Trace[%d]: [%v] [%v] ", tracenum, step.stepTime.Sub(t.startTime), stepDuration)) - buffer.WriteString(step.msg) - if len(step.fields) > 0 { - buffer.WriteString(" ") - writeFields(&buffer, step.fields) - } - buffer.WriteString("\n") - } - lastStepTime = step.stepTime - } - stepDuration := endTime.Sub(lastStepTime) - if stepThreshold == 0 || stepDuration > stepThreshold || klog.V(4) { - buffer.WriteString(fmt.Sprintf("Trace[%d]: [%v] [%v] END\n", tracenum, endTime.Sub(t.startTime), stepDuration)) - } - - klog.Info(buffer.String()) } -// LogIfLong is used to dump steps that took longer than its share +// LogIfLong only logs the trace if the duration of the trace exceeds the threshold. +// Only steps that took longer than their share or the given threshold are logged. +// If klog is at verbosity level 4 or higher and the trace took longer than the threshold, +// all substeps and subtraces are logged. Otherwise, only those which took longer than +// their own threshold. +// If the Trace is nested it is not immediately logged. Instead, it is logged when the trace it +// is nested within is logged. func (t *Trace) LogIfLong(threshold time.Duration) { - if time.Since(t.startTime) >= threshold { + t.threshold = &threshold + t.Log() +} + +// logTopLevelTraces finds all traces in a hierarchy of nested traces that should be logged but do not have any +// parents that will be logged, due to threshold limits, and logs them as top level traces. +func (t *Trace) logTrace() { + if t.durationIsWithinThreshold() { + var buffer bytes.Buffer + traceNum := rand.Int31() + + totalTime := t.endTime.Sub(t.startTime) + buffer.WriteString(fmt.Sprintf("Trace[%d]: %q ", traceNum, t.name)) + if len(t.fields) > 0 { + writeFields(&buffer, t.fields) + buffer.WriteString(" ") + } + // if any step took more than it's share of the total allowed time, it deserves a higher log level - stepThreshold := threshold / time.Duration(len(t.steps)+1) - t.logWithStepThreshold(stepThreshold) + buffer.WriteString(fmt.Sprintf("(%v) (total time: %vms):", t.startTime.Format("02-Jan-2006 15:04:05.000"), totalTime.Milliseconds())) + stepThreshold := t.calculateStepThreshold() + t.writeTraceSteps(&buffer, fmt.Sprintf("\nTrace[%d]: ", traceNum), stepThreshold) + buffer.WriteString(fmt.Sprintf("\nTrace[%d]: [%v] [%v] END\n", traceNum, t.endTime.Sub(t.startTime), totalTime)) + + klog.Info(buffer.String()) + return } + + // If the trace should not be logged, still check if nested traces should be logged + for _, s := range t.traceItems { + if nestedTrace, ok := s.(*Trace); ok { + nestedTrace.logTrace() + } + } +} + +func (t *Trace) writeTraceSteps(b *bytes.Buffer, formatter string, stepThreshold *time.Duration) { + lastStepTime := t.startTime + for _, stepOrTrace := range t.traceItems { + stepOrTrace.writeItem(b, formatter, lastStepTime, stepThreshold) + lastStepTime = stepOrTrace.time() + } +} + +func (t *Trace) durationIsWithinThreshold() bool { + if t.endTime == nil { // we don't assume incomplete traces meet the threshold + return false + } + return t.threshold == nil || *t.threshold == 0 || t.endTime.Sub(t.startTime) >= *t.threshold } // TotalTime can be used to figure out how long it took since the Trace was created func (t *Trace) TotalTime() time.Duration { return time.Since(t.startTime) } + +// calculateStepThreshold returns a threshold for the individual steps of a trace, or nil if there is no threshold and +// all steps should be written. +func (t *Trace) calculateStepThreshold() *time.Duration { + if t.threshold == nil { + return nil + } + lenTrace := len(t.traceItems) + 1 + traceThreshold := *t.threshold + for _, s := range t.traceItems { + nestedTrace, ok := s.(*Trace) + if ok && nestedTrace.threshold != nil { + traceThreshold = traceThreshold - *nestedTrace.threshold + lenTrace-- + } + } + + // the limit threshold is used when the threshold( + //remaining after subtracting that of the child trace) is getting very close to zero to prevent unnecessary logging + limitThreshold := *t.threshold / 4 + if traceThreshold < limitThreshold { + traceThreshold = limitThreshold + lenTrace = len(t.traceItems) + 1 + } + + stepThreshold := traceThreshold / time.Duration(lenTrace) + return &stepThreshold +} + +// ContextTraceKey provides a common key for traces in context.Context values. +type ContextTraceKey struct{} + +// FromContext returns the trace keyed by ContextTraceKey in the context values, if one +// is present, or nil If there is no trace in the Context. +// It is safe to call Nest() on the returned value even if it is nil because ((*Trace)nil).Nest returns a top level +// trace. +func FromContext(ctx context.Context) *Trace { + if v, ok := ctx.Value(ContextTraceKey{}).(*Trace); ok { + return v + } + return nil +} + +// ContextWithTrace returns a context with trace included in the context values, keyed by ContextTraceKey. +func ContextWithTrace(ctx context.Context, trace *Trace) context.Context { + return context.WithValue(ctx, ContextTraceKey{}, trace) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index cc982da2b3d..f7f52c46010 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,22 +1,24 @@ -# cloud.google.com/go v0.38.0 +# cloud.google.com/go v0.51.0 cloud.google.com/go/compute/metadata -# github.com/Azure/azure-sdk-for-go v35.0.0+incompatible -github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute +# github.com/Azure/azure-sdk-for-go v43.0.0+incompatible +github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute +github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network +github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage github.com/Azure/azure-sdk-for-go/storage github.com/Azure/azure-sdk-for-go/version # github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 github.com/Azure/go-ansiterm github.com/Azure/go-ansiterm/winterm -# github.com/Azure/go-autorest/autorest v0.9.0 +# github.com/Azure/go-autorest/autorest v0.9.6 github.com/Azure/go-autorest/autorest github.com/Azure/go-autorest/autorest/azure -# github.com/Azure/go-autorest/autorest/adal v0.5.0 +# github.com/Azure/go-autorest/autorest/adal v0.8.2 github.com/Azure/go-autorest/autorest/adal -# github.com/Azure/go-autorest/autorest/date v0.1.0 +# github.com/Azure/go-autorest/autorest/date v0.2.0 github.com/Azure/go-autorest/autorest/date -# github.com/Azure/go-autorest/autorest/mocks v0.2.0 +# github.com/Azure/go-autorest/autorest/mocks v0.3.0 github.com/Azure/go-autorest/autorest/mocks # github.com/Azure/go-autorest/autorest/to v0.2.0 github.com/Azure/go-autorest/autorest/to @@ -28,7 +30,7 @@ github.com/Azure/go-autorest/logger github.com/Azure/go-autorest/tracing # github.com/BurntSushi/toml v0.3.1 github.com/BurntSushi/toml -# github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534 +# github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317 github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/filter github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta @@ -42,9 +44,11 @@ github.com/Microsoft/go-winio github.com/Microsoft/go-winio/pkg/etw github.com/Microsoft/go-winio/pkg/etwlogrus github.com/Microsoft/go-winio/pkg/guid -# github.com/Microsoft/hcsshim v0.8.6 => github.com/Microsoft/hcsshim v0.8.7-0.20190926181021-82c7525d98c8 +github.com/Microsoft/go-winio/vhd +# github.com/Microsoft/hcsshim v0.8.10-0.20200715222032-5eafd1556990 => github.com/Microsoft/hcsshim v0.8.9 github.com/Microsoft/hcsshim github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options +github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats github.com/Microsoft/hcsshim/hcn github.com/Microsoft/hcsshim/internal/cni github.com/Microsoft/hcsshim/internal/cow @@ -65,6 +69,7 @@ github.com/Microsoft/hcsshim/internal/schema2 github.com/Microsoft/hcsshim/internal/timeout github.com/Microsoft/hcsshim/internal/vmcompute github.com/Microsoft/hcsshim/internal/wclayer +github.com/Microsoft/hcsshim/osversion # github.com/NYTimes/gziphandler v1.1.1 github.com/NYTimes/gziphandler # github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 @@ -126,7 +131,7 @@ github.com/aws/aws-sdk-go/service/sts/stsiface # github.com/benmoss/go-powershell v0.0.0-00010101000000-000000000000 => github.com/rancher/go-powershell v0.0.0-20200701184732-233247d45373 github.com/benmoss/go-powershell github.com/benmoss/go-powershell/backend -# github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 +# github.com/beorn7/perks v1.0.1 github.com/beorn7/perks/quantile # github.com/blang/semver v3.5.0+incompatible github.com/blang/semver @@ -139,25 +144,32 @@ github.com/canonical/go-dqlite/driver github.com/canonical/go-dqlite/internal/bindings github.com/canonical/go-dqlite/internal/logging github.com/canonical/go-dqlite/internal/protocol +# github.com/cespare/xxhash/v2 v2.1.1 +github.com/cespare/xxhash/v2 # github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 github.com/chai2010/gettext-go/gettext github.com/chai2010/gettext-go/gettext/mo github.com/chai2010/gettext-go/gettext/plural github.com/chai2010/gettext-go/gettext/po -# github.com/checkpoint-restore/go-criu v0.0.0-20181120144056-17b0214f6c48 -github.com/checkpoint-restore/go-criu/rpc -# github.com/cilium/ebpf v0.0.0-20191025125908-95b36a581eed +# github.com/checkpoint-restore/go-criu/v4 v4.1.0 +github.com/checkpoint-restore/go-criu/v4 +github.com/checkpoint-restore/go-criu/v4/rpc +# github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775 github.com/cilium/ebpf github.com/cilium/ebpf/asm github.com/cilium/ebpf/internal +github.com/cilium/ebpf/internal/btf github.com/cilium/ebpf/internal/unix # github.com/container-storage-interface/spec v1.2.0 github.com/container-storage-interface/spec/lib/go/csi -# github.com/containerd/cgroups v0.0.0-00010101000000-000000000000 => github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601 +# github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340 => github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 github.com/containerd/cgroups -# github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 => github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50 +github.com/containerd/cgroups/stats/v1 +github.com/containerd/cgroups/v2 +github.com/containerd/cgroups/v2/stats +# github.com/containerd/console v1.0.0 => github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50 github.com/containerd/console -# github.com/containerd/containerd v1.3.6 => github.com/rancher/containerd v1.3.6-k3s1 +# github.com/containerd/containerd v1.4.0 => github.com/rancher/containerd v1.4.0-k3s1 github.com/containerd/containerd github.com/containerd/containerd/api/events github.com/containerd/containerd/api/services/containers/v1 @@ -189,6 +201,7 @@ github.com/containerd/containerd/cmd/ctr/commands/images github.com/containerd/containerd/cmd/ctr/commands/install github.com/containerd/containerd/cmd/ctr/commands/leases github.com/containerd/containerd/cmd/ctr/commands/namespaces +github.com/containerd/containerd/cmd/ctr/commands/oci github.com/containerd/containerd/cmd/ctr/commands/plugins github.com/containerd/containerd/cmd/ctr/commands/pprof github.com/containerd/containerd/cmd/ctr/commands/run @@ -204,7 +217,6 @@ github.com/containerd/containerd/contrib/apparmor github.com/containerd/containerd/contrib/nvidia github.com/containerd/containerd/contrib/seccomp github.com/containerd/containerd/defaults -github.com/containerd/containerd/dialer github.com/containerd/containerd/diff github.com/containerd/containerd/diff/apply github.com/containerd/containerd/diff/walking @@ -225,12 +237,17 @@ github.com/containerd/containerd/log github.com/containerd/containerd/metadata github.com/containerd/containerd/metadata/boltutil github.com/containerd/containerd/metrics/cgroups +github.com/containerd/containerd/metrics/cgroups/v1 +github.com/containerd/containerd/metrics/cgroups/v2 github.com/containerd/containerd/metrics/types/v1 +github.com/containerd/containerd/metrics/types/v2 github.com/containerd/containerd/mount github.com/containerd/containerd/namespaces github.com/containerd/containerd/oci github.com/containerd/containerd/pkg/dialer github.com/containerd/containerd/pkg/oom +github.com/containerd/containerd/pkg/oom/v1 +github.com/containerd/containerd/pkg/oom/v2 github.com/containerd/containerd/pkg/process github.com/containerd/containerd/pkg/progress github.com/containerd/containerd/pkg/seed @@ -240,8 +257,10 @@ github.com/containerd/containerd/pkg/ttrpcutil github.com/containerd/containerd/platforms github.com/containerd/containerd/plugin github.com/containerd/containerd/reference +github.com/containerd/containerd/reference/docker github.com/containerd/containerd/remotes github.com/containerd/containerd/remotes/docker +github.com/containerd/containerd/remotes/docker/config github.com/containerd/containerd/remotes/docker/schema1 github.com/containerd/containerd/rootfs github.com/containerd/containerd/runtime @@ -285,7 +304,7 @@ github.com/containerd/containerd/snapshots/storage github.com/containerd/containerd/sys github.com/containerd/containerd/sys/reaper github.com/containerd/containerd/version -# github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6 => github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02 +# github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe => github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02 github.com/containerd/continuity github.com/containerd/continuity/devices github.com/containerd/continuity/driver @@ -294,7 +313,7 @@ github.com/containerd/continuity/pathdriver github.com/containerd/continuity/proto github.com/containerd/continuity/syscallx github.com/containerd/continuity/sysx -# github.com/containerd/cri v0.0.0-00010101000000-000000000000 => github.com/rancher/cri v1.3.0-k3s.7 +# github.com/containerd/cri v1.11.1-0.20200820101445-b0cc07999aa5 github.com/containerd/cri github.com/containerd/cri/pkg/annotations github.com/containerd/cri/pkg/api/runtimeoptions/v1 @@ -302,12 +321,15 @@ github.com/containerd/cri/pkg/atomic github.com/containerd/cri/pkg/config github.com/containerd/cri/pkg/constants github.com/containerd/cri/pkg/containerd/opts +github.com/containerd/cri/pkg/containerd/platforms github.com/containerd/cri/pkg/containerd/util github.com/containerd/cri/pkg/ioutil github.com/containerd/cri/pkg/netns github.com/containerd/cri/pkg/os github.com/containerd/cri/pkg/registrar +github.com/containerd/cri/pkg/seccomp github.com/containerd/cri/pkg/server +github.com/containerd/cri/pkg/server/bandwidth github.com/containerd/cri/pkg/server/io github.com/containerd/cri/pkg/store github.com/containerd/cri/pkg/store/container @@ -315,27 +337,44 @@ github.com/containerd/cri/pkg/store/image github.com/containerd/cri/pkg/store/label github.com/containerd/cri/pkg/store/sandbox github.com/containerd/cri/pkg/store/snapshot +github.com/containerd/cri/pkg/streaming +github.com/containerd/cri/pkg/streaming/portforward +github.com/containerd/cri/pkg/streaming/remotecommand github.com/containerd/cri/pkg/util -# github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c => github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c +# github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b => github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c github.com/containerd/fifo -# github.com/containerd/go-cni v0.0.0-20190813230227-49fbd9b210f3 +# github.com/containerd/go-cni v1.0.0 github.com/containerd/go-cni -# github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda +# github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 => github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328 github.com/containerd/go-runc -# github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8 +# github.com/containerd/imgcrypt v1.0.1 +github.com/containerd/imgcrypt +github.com/containerd/imgcrypt/images/encryption +# github.com/containerd/ttrpc v1.0.1 github.com/containerd/ttrpc -# github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20 => github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd +# github.com/containerd/typeurl v1.0.1 => github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd github.com/containerd/typeurl -# github.com/containernetworking/cni v0.7.1 +# github.com/containernetworking/cni v0.8.0 github.com/containernetworking/cni/libcni github.com/containernetworking/cni/pkg/invoke github.com/containernetworking/cni/pkg/types github.com/containernetworking/cni/pkg/types/020 github.com/containernetworking/cni/pkg/types/current +github.com/containernetworking/cni/pkg/utils github.com/containernetworking/cni/pkg/version # github.com/containernetworking/plugins v0.8.2 github.com/containernetworking/plugins/pkg/ns -# github.com/coreos/flannel v0.11.0 => github.com/rancher/flannel v0.12.0-k3s1 +# github.com/containers/ocicrypt v1.0.1 +github.com/containers/ocicrypt +github.com/containers/ocicrypt/blockcipher +github.com/containers/ocicrypt/config +github.com/containers/ocicrypt/keywrap +github.com/containers/ocicrypt/keywrap/jwe +github.com/containers/ocicrypt/keywrap/pgp +github.com/containers/ocicrypt/keywrap/pkcs7 +github.com/containers/ocicrypt/spec +github.com/containers/ocicrypt/utils +# github.com/coreos/flannel v0.12.0 => github.com/rancher/flannel v0.12.0-k3s1 github.com/coreos/flannel/backend github.com/coreos/flannel/backend/extension github.com/coreos/flannel/backend/hostgw @@ -354,9 +393,12 @@ github.com/coreos/go-semver/semver # github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f => github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e github.com/coreos/go-systemd/activation github.com/coreos/go-systemd/daemon -github.com/coreos/go-systemd/dbus github.com/coreos/go-systemd/journal -# github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea +# github.com/coreos/go-systemd/v22 v22.1.0 +github.com/coreos/go-systemd/v22/activation +github.com/coreos/go-systemd/v22/daemon +github.com/coreos/go-systemd/v22/dbus +# github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f github.com/coreos/pkg/capnslog # github.com/cpuguy83/go-md2man/v2 v2.0.0 github.com/cpuguy83/go-md2man/v2/md2man @@ -371,8 +413,7 @@ github.com/dgrijalva/jwt-go # github.com/docker/distribution v2.7.1+incompatible => github.com/docker/distribution v0.0.0-20190205005809-0d3efadf0154 github.com/docker/distribution/digestset github.com/docker/distribution/reference -github.com/docker/distribution/registry/api/errcode -# github.com/docker/docker v1.4.2-0.20191205034852-d163fbba3c82 => github.com/docker/docker v17.12.0-ce-rc1.0.20190219214528-cbe11bdc6da8+incompatible +# github.com/docker/docker v17.12.0-ce-rc1.0.20200821074627-7ae5222c72cc+incompatible => github.com/docker/docker v17.12.0-ce-rc1.0.20190219214528-cbe11bdc6da8+incompatible github.com/docker/docker/api github.com/docker/docker/api/types github.com/docker/docker/api/types/blkiodev @@ -390,21 +431,17 @@ github.com/docker/docker/api/types/time github.com/docker/docker/api/types/versions github.com/docker/docker/api/types/volume github.com/docker/docker/client -github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog github.com/docker/docker/pkg/jsonmessage github.com/docker/docker/pkg/longpath github.com/docker/docker/pkg/mount -github.com/docker/docker/pkg/parsers -github.com/docker/docker/pkg/parsers/operatingsystem github.com/docker/docker/pkg/reexec github.com/docker/docker/pkg/stdcopy github.com/docker/docker/pkg/symlink -github.com/docker/docker/pkg/sysinfo github.com/docker/docker/pkg/system github.com/docker/docker/pkg/term github.com/docker/docker/pkg/term/windows github.com/docker/docker/pkg/truncindex -# github.com/docker/go-connections v0.3.0 +# github.com/docker/go-connections v0.4.0 github.com/docker/go-connections/nat github.com/docker/go-connections/sockets github.com/docker/go-connections/tlsconfig @@ -426,19 +463,23 @@ github.com/emicklei/go-restful/log github.com/erikdubbelboer/gspt # github.com/euank/go-kmsg-parser v2.0.0+incompatible github.com/euank/go-kmsg-parser/kmsgparser -# github.com/evanphx/json-patch v4.5.0+incompatible +# github.com/evanphx/json-patch v4.9.0+incompatible github.com/evanphx/json-patch # github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d github.com/exponent-io/jsonpath # github.com/fatih/camelcase v1.0.0 github.com/fatih/camelcase -# github.com/fsnotify/fsnotify v1.4.7 +# github.com/fsnotify/fsnotify v1.4.9 github.com/fsnotify/fsnotify +# github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa +github.com/fullsailor/pkcs7 # github.com/ghodss/yaml v1.0.0 github.com/ghodss/yaml # github.com/go-bindata/go-bindata v3.1.2+incompatible github.com/go-bindata/go-bindata github.com/go-bindata/go-bindata/go-bindata +# github.com/go-logr/logr v0.2.0 +github.com/go-logr/logr # github.com/go-openapi/analysis v0.19.5 github.com/go-openapi/analysis github.com/go-openapi/analysis/internal @@ -464,11 +505,11 @@ github.com/go-openapi/validate github.com/go-sql-driver/mysql # github.com/go-stack/stack v1.8.0 github.com/go-stack/stack -# github.com/godbus/dbus v0.0.0-20181101234600-2ff6f7ffd60f -github.com/godbus/dbus +# github.com/godbus/dbus/v5 v5.0.3 +github.com/godbus/dbus/v5 # github.com/gofrs/flock v0.7.1 github.com/gofrs/flock -# github.com/gogo/googleapis v1.3.0 +# github.com/gogo/googleapis v1.3.2 github.com/gogo/googleapis/google/rpc # github.com/gogo/protobuf v1.3.1 github.com/gogo/protobuf/gogoproto @@ -476,11 +517,11 @@ github.com/gogo/protobuf/proto github.com/gogo/protobuf/protoc-gen-gogo/descriptor github.com/gogo/protobuf/sortkeys github.com/gogo/protobuf/types -# github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 +# github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 github.com/golang/groupcache/lru # github.com/golang/mock v1.3.1 github.com/golang/mock/gomock -# github.com/golang/protobuf v1.3.2 +# github.com/golang/protobuf v1.4.2 => github.com/golang/protobuf v1.3.5 github.com/golang/protobuf/jsonpb github.com/golang/protobuf/proto github.com/golang/protobuf/protoc-gen-go/descriptor @@ -495,7 +536,7 @@ github.com/golang/protobuf/ptypes/timestamp github.com/golang/protobuf/ptypes/wrappers # github.com/google/btree v1.0.0 github.com/google/btree -# github.com/google/cadvisor v0.35.0 +# github.com/google/cadvisor v0.37.0 github.com/google/cadvisor/accelerators github.com/google/cadvisor/cache/memory github.com/google/cadvisor/collector @@ -507,6 +548,7 @@ github.com/google/cadvisor/container/crio github.com/google/cadvisor/container/crio/install github.com/google/cadvisor/container/docker github.com/google/cadvisor/container/docker/install +github.com/google/cadvisor/container/docker/utils github.com/google/cadvisor/container/libcontainer github.com/google/cadvisor/container/raw github.com/google/cadvisor/container/systemd @@ -519,13 +561,16 @@ github.com/google/cadvisor/info/v2 github.com/google/cadvisor/machine github.com/google/cadvisor/manager github.com/google/cadvisor/metrics +github.com/google/cadvisor/nvm +github.com/google/cadvisor/perf +github.com/google/cadvisor/resctrl +github.com/google/cadvisor/stats github.com/google/cadvisor/storage github.com/google/cadvisor/summary github.com/google/cadvisor/utils github.com/google/cadvisor/utils/cloudinfo github.com/google/cadvisor/utils/cpuload github.com/google/cadvisor/utils/cpuload/netlink -github.com/google/cadvisor/utils/docker github.com/google/cadvisor/utils/oomparser github.com/google/cadvisor/utils/sysfs github.com/google/cadvisor/utils/sysinfo @@ -544,10 +589,12 @@ github.com/google/gofuzz github.com/google/tcpproxy # github.com/google/uuid v1.1.1 github.com/google/uuid -# github.com/googleapis/gnostic v0.3.1 -github.com/googleapis/gnostic/OpenAPIv2 +# github.com/googleapis/gax-go/v2 v2.0.5 +github.com/googleapis/gax-go/v2 +# github.com/googleapis/gnostic v0.4.1 github.com/googleapis/gnostic/compiler github.com/googleapis/gnostic/extensions +github.com/googleapis/gnostic/openapiv2 # github.com/gophercloud/gophercloud v0.1.0 github.com/gophercloud/gophercloud github.com/gophercloud/gophercloud/openstack @@ -595,14 +642,14 @@ github.com/grpc-ecosystem/go-grpc-prometheus github.com/grpc-ecosystem/grpc-gateway/internal github.com/grpc-ecosystem/grpc-gateway/runtime github.com/grpc-ecosystem/grpc-gateway/utilities -# github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce +# github.com/hashicorp/errwrap v1.0.0 github.com/hashicorp/errwrap -# github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874 +# github.com/hashicorp/go-multierror v1.0.0 github.com/hashicorp/go-multierror # github.com/hashicorp/golang-lru v0.5.3 github.com/hashicorp/golang-lru github.com/hashicorp/golang-lru/simplelru -# github.com/imdario/mergo v0.3.7 +# github.com/imdario/mergo v0.3.8 github.com/imdario/mergo # github.com/inconshreveable/mousetrap v1.0.0 github.com/inconshreveable/mousetrap @@ -610,14 +657,15 @@ github.com/inconshreveable/mousetrap github.com/jmespath/go-jmespath # github.com/jonboulle/clockwork v0.1.0 github.com/jonboulle/clockwork -# github.com/json-iterator/go v1.1.8 +# github.com/json-iterator/go v1.1.10 github.com/json-iterator/go # github.com/karrick/godirwalk v1.7.5 github.com/karrick/godirwalk # github.com/konsorten/go-windows-terminal-sequences v1.0.3 github.com/konsorten/go-windows-terminal-sequences -# github.com/kubernetes-sigs/cri-tools v0.0.0-00010101000000-000000000000 => github.com/rancher/cri-tools v1.18.0-k3s1 +# github.com/kubernetes-sigs/cri-tools v0.0.0-00010101000000-000000000000 => github.com/rancher/cri-tools v1.19.0-k3s1 github.com/kubernetes-sigs/cri-tools/cmd/crictl +github.com/kubernetes-sigs/cri-tools/pkg/common github.com/kubernetes-sigs/cri-tools/pkg/version # github.com/lib/pq v1.1.1 github.com/lib/pq @@ -631,29 +679,32 @@ github.com/lithammer/dedent github.com/mailru/easyjson/buffer github.com/mailru/easyjson/jlexer github.com/mailru/easyjson/jwriter -# github.com/mattn/go-shellwords v1.0.5 -github.com/mattn/go-shellwords # github.com/mattn/go-sqlite3 v1.13.0 github.com/mattn/go-sqlite3 -# github.com/matttproud/golang_protobuf_extensions v1.0.1 +# github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 github.com/matttproud/golang_protobuf_extensions/pbutil # github.com/miekg/dns v1.1.4 github.com/miekg/dns # github.com/mindprince/gonvml v0.0.0-20190828220739-9ebdce4bb989 github.com/mindprince/gonvml -# github.com/mistifyio/go-zfs v2.1.1+incompatible +# github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible github.com/mistifyio/go-zfs # github.com/mitchellh/go-wordwrap v1.0.0 github.com/mitchellh/go-wordwrap # github.com/mitchellh/mapstructure v1.1.2 github.com/mitchellh/mapstructure +# github.com/moby/ipvs v1.0.1 +github.com/moby/ipvs # github.com/moby/sys/mountinfo v0.1.3 github.com/moby/sys/mountinfo +# github.com/moby/term v0.0.0-20200312100748-672ec06f55cd +github.com/moby/term +github.com/moby/term/windows # github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.1 github.com/modern-go/reflect2 -# github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618 +# github.com/mrunalp/fileutils v0.0.0-20200520151820-abd8a0e76976 github.com/mrunalp/fileutils # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 github.com/munnerz/goautoneg @@ -661,18 +712,20 @@ github.com/munnerz/goautoneg github.com/mxk/go-flowrate/flowrate # github.com/natefinch/lumberjack v2.0.0+incompatible github.com/natefinch/lumberjack -# github.com/opencontainers/go-digest v1.0.0-rc1 +# github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/go-digest +github.com/opencontainers/go-digest/digestset # github.com/opencontainers/image-spec v1.0.1 github.com/opencontainers/image-spec/identity github.com/opencontainers/image-spec/specs-go github.com/opencontainers/image-spec/specs-go/v1 -# github.com/opencontainers/runc v1.0.0-rc10 +# github.com/opencontainers/runc v1.0.0-rc92 => github.com/opencontainers/runc v1.0.0-rc92 github.com/opencontainers/runc github.com/opencontainers/runc/contrib/cmd/recvtty github.com/opencontainers/runc/libcontainer github.com/opencontainers/runc/libcontainer/apparmor github.com/opencontainers/runc/libcontainer/cgroups +github.com/opencontainers/runc/libcontainer/cgroups/devices github.com/opencontainers/runc/libcontainer/cgroups/ebpf github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter github.com/opencontainers/runc/libcontainer/cgroups/fs @@ -685,7 +738,6 @@ github.com/opencontainers/runc/libcontainer/devices github.com/opencontainers/runc/libcontainer/intelrdt github.com/opencontainers/runc/libcontainer/keys github.com/opencontainers/runc/libcontainer/logs -github.com/opencontainers/runc/libcontainer/mount github.com/opencontainers/runc/libcontainer/nsenter github.com/opencontainers/runc/libcontainer/seccomp github.com/opencontainers/runc/libcontainer/specconv @@ -694,9 +746,9 @@ github.com/opencontainers/runc/libcontainer/system github.com/opencontainers/runc/libcontainer/user github.com/opencontainers/runc/libcontainer/utils github.com/opencontainers/runc/types -# github.com/opencontainers/runtime-spec v1.0.0 => github.com/opencontainers/runtime-spec v0.0.0-20180911193056-5684b8af48c1 +# github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6 => github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6 github.com/opencontainers/runtime-spec/specs-go -# github.com/opencontainers/selinux v1.5.3-0.20200613095409-bb88c45a3863 +# github.com/opencontainers/selinux v1.6.0 github.com/opencontainers/selinux/go-selinux github.com/opencontainers/selinux/go-selinux/label github.com/opencontainers/selinux/pkg/pwalk @@ -710,22 +762,22 @@ github.com/pkg/errors # github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021 github.com/pquerna/cachecontrol github.com/pquerna/cachecontrol/cacheobject -# github.com/prometheus/client_golang v1.1.0 => github.com/prometheus/client_golang v0.9.2 +# github.com/prometheus/client_golang v1.7.1 github.com/prometheus/client_golang/prometheus github.com/prometheus/client_golang/prometheus/internal github.com/prometheus/client_golang/prometheus/promhttp github.com/prometheus/client_golang/prometheus/testutil -# github.com/prometheus/client_model v0.2.0 => github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 +github.com/prometheus/client_golang/prometheus/testutil/promlint +# github.com/prometheus/client_model v0.2.0 github.com/prometheus/client_model/go -# github.com/prometheus/common v0.4.1 => github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 +# github.com/prometheus/common v0.10.0 github.com/prometheus/common/expfmt github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg github.com/prometheus/common/model -# github.com/prometheus/procfs v0.0.2 => github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a +# github.com/prometheus/procfs v0.1.3 github.com/prometheus/procfs +github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util -github.com/prometheus/procfs/nfs -github.com/prometheus/procfs/xfs # github.com/rakelkar/gonetsh v0.0.0-20190930180311-e5c5ffe4bdf0 github.com/rakelkar/gonetsh/netroute github.com/rakelkar/gonetsh/netsh @@ -839,7 +891,7 @@ github.com/rootless-containers/rootlesskit/pkg/port/builtin/parent/udp/udpproxy github.com/rootless-containers/rootlesskit/pkg/port/portutil github.com/rootless-containers/rootlesskit/pkg/sigproxy github.com/rootless-containers/rootlesskit/pkg/sigproxy/signal -# github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c +# github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021 github.com/rubiojr/go-vhd/vhd # github.com/russross/blackfriday v1.5.2 github.com/russross/blackfriday @@ -858,7 +910,7 @@ github.com/soheilhy/cmux # github.com/spf13/afero v1.2.2 github.com/spf13/afero github.com/spf13/afero/mem -# github.com/spf13/cobra v0.0.5 +# github.com/spf13/cobra v1.0.0 github.com/spf13/cobra # github.com/spf13/pflag v1.0.5 github.com/spf13/pflag @@ -866,16 +918,16 @@ github.com/spf13/pflag github.com/syndtr/gocapability/capability # github.com/tchap/go-patricia v2.3.0+incompatible github.com/tchap/go-patricia/patricia -# github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 +# github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 github.com/tmc/grpc-websocket-proxy/wsproxy # github.com/urfave/cli v1.22.2 github.com/urfave/cli # github.com/urfave/cli/v2 v2.2.0 github.com/urfave/cli/v2 -# github.com/vishvananda/netlink v1.0.0 +# github.com/vishvananda/netlink v1.1.0 github.com/vishvananda/netlink github.com/vishvananda/netlink/nl -# github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc +# github.com/vishvananda/netns v0.0.0-20200520041808-52d707b772fe github.com/vishvananda/netns # github.com/vmware/govmomi v0.20.3 github.com/vmware/govmomi/find @@ -904,11 +956,13 @@ github.com/vmware/govmomi/vim25/progress github.com/vmware/govmomi/vim25/soap github.com/vmware/govmomi/vim25/types github.com/vmware/govmomi/vim25/xml +# github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243 +github.com/willf/bitset # github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 github.com/xiang90/probing -# go.etcd.io/bbolt v1.3.3 +# go.etcd.io/bbolt v1.3.5 go.etcd.io/bbolt -# go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f +# go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5 go.etcd.io/etcd/auth go.etcd.io/etcd/auth/authpb go.etcd.io/etcd/client @@ -993,7 +1047,7 @@ go.mongodb.org/mongo-driver/bson/bsonrw go.mongodb.org/mongo-driver/bson/bsontype go.mongodb.org/mongo-driver/bson/primitive go.mongodb.org/mongo-driver/x/bsonx/bsoncore -# go.opencensus.io v0.22.0 +# go.opencensus.io v0.22.2 go.opencensus.io go.opencensus.io/internal go.opencensus.io/internal/tagencoding @@ -1010,7 +1064,7 @@ go.opencensus.io/trace go.opencensus.io/trace/internal go.opencensus.io/trace/propagation go.opencensus.io/trace/tracestate -# go.uber.org/atomic v1.3.2 +# go.uber.org/atomic v1.4.0 go.uber.org/atomic # go.uber.org/multierr v1.1.0 go.uber.org/multierr @@ -1021,9 +1075,10 @@ go.uber.org/zap/internal/bufferpool go.uber.org/zap/internal/color go.uber.org/zap/internal/exit go.uber.org/zap/zapcore -# golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 +# golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 golang.org/x/crypto/bcrypt golang.org/x/crypto/blowfish +golang.org/x/crypto/cast5 golang.org/x/crypto/chacha20 golang.org/x/crypto/cryptobyte golang.org/x/crypto/cryptobyte/asn1 @@ -1032,6 +1087,12 @@ golang.org/x/crypto/ed25519 golang.org/x/crypto/ed25519/internal/edwards25519 golang.org/x/crypto/internal/subtle golang.org/x/crypto/nacl/secretbox +golang.org/x/crypto/openpgp +golang.org/x/crypto/openpgp/armor +golang.org/x/crypto/openpgp/elgamal +golang.org/x/crypto/openpgp/errors +golang.org/x/crypto/openpgp/packet +golang.org/x/crypto/openpgp/s2k golang.org/x/crypto/pbkdf2 golang.org/x/crypto/pkcs12 golang.org/x/crypto/pkcs12/internal/rc2 @@ -1040,7 +1101,10 @@ golang.org/x/crypto/salsa20/salsa golang.org/x/crypto/ssh golang.org/x/crypto/ssh/internal/bcrypt_pbkdf golang.org/x/crypto/ssh/terminal -# golang.org/x/net v0.0.0-20200506145744-7e3656a0809f +# golang.org/x/mod v0.3.0 +golang.org/x/mod/module +golang.org/x/mod/semver +# golang.org/x/net v0.0.0-20200822124328-c89045814202 golang.org/x/net/bpf golang.org/x/net/context golang.org/x/net/context/ctxhttp @@ -1059,7 +1123,7 @@ golang.org/x/net/ipv6 golang.org/x/net/proxy golang.org/x/net/trace golang.org/x/net/websocket -# golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 +# golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 golang.org/x/oauth2 golang.org/x/oauth2/google golang.org/x/oauth2/internal @@ -1069,7 +1133,7 @@ golang.org/x/oauth2/jwt golang.org/x/sync/errgroup golang.org/x/sync/semaphore golang.org/x/sync/singleflight -# golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 +# golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6 golang.org/x/sys/cpu golang.org/x/sys/internal/unsafeheader golang.org/x/sys/unix @@ -1078,7 +1142,7 @@ golang.org/x/sys/windows/registry golang.org/x/sys/windows/svc golang.org/x/sys/windows/svc/debug golang.org/x/sys/windows/svc/mgr -# golang.org/x/text v0.3.2 +# golang.org/x/text v0.3.3 golang.org/x/text/encoding golang.org/x/text/encoding/internal golang.org/x/text/encoding/internal/identifier @@ -1090,22 +1154,23 @@ golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm golang.org/x/text/width -# golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 +# golang.org/x/time v0.0.0-20191024005414-555d28b269f0 golang.org/x/time/rate -# golang.org/x/tools v0.0.0-20191017205301-920acffc3e65 +# golang.org/x/tools v0.0.0-20200616133436-c1934b75d054 golang.org/x/tools/container/intsets golang.org/x/tools/go/ast/astutil -golang.org/x/tools/go/gcexportdata -golang.org/x/tools/go/internal/gcimporter -golang.org/x/tools/go/internal/packagesdriver -golang.org/x/tools/go/packages golang.org/x/tools/imports +golang.org/x/tools/internal/event +golang.org/x/tools/internal/event/core +golang.org/x/tools/internal/event/keys +golang.org/x/tools/internal/event/label golang.org/x/tools/internal/fastwalk +golang.org/x/tools/internal/gocommand golang.org/x/tools/internal/gopathwalk golang.org/x/tools/internal/imports -golang.org/x/tools/internal/module -golang.org/x/tools/internal/semver -golang.org/x/tools/internal/span +# golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 +golang.org/x/xerrors +golang.org/x/xerrors/internal # gonum.org/v1/gonum v0.6.2 gonum.org/v1/gonum/blas gonum.org/v1/gonum/blas/blas64 @@ -1137,21 +1202,21 @@ gonum.org/v1/gonum/lapack gonum.org/v1/gonum/lapack/gonum gonum.org/v1/gonum/lapack/lapack64 gonum.org/v1/gonum/mat -# google.golang.org/api v0.6.1-0.20190607001116-5213b8090861 +# google.golang.org/api v0.15.1 google.golang.org/api/compute/v0.alpha google.golang.org/api/compute/v0.beta google.golang.org/api/compute/v1 google.golang.org/api/container/v1 -google.golang.org/api/gensupport google.golang.org/api/googleapi -google.golang.org/api/googleapi/internal/uritemplates google.golang.org/api/googleapi/transport google.golang.org/api/internal +google.golang.org/api/internal/gensupport +google.golang.org/api/internal/third_party/uritemplates google.golang.org/api/option google.golang.org/api/tpu/v1 google.golang.org/api/transport/http google.golang.org/api/transport/http/internal/propagation -# google.golang.org/appengine v1.6.1 +# google.golang.org/appengine v1.6.5 google.golang.org/appengine google.golang.org/appengine/cloudsql google.golang.org/appengine/internal @@ -1163,11 +1228,11 @@ google.golang.org/appengine/internal/modules google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch -# google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 +# google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63 google.golang.org/genproto/googleapis/api/httpbody google.golang.org/genproto/googleapis/rpc/status google.golang.org/genproto/protobuf/field_mask -# google.golang.org/grpc v1.26.0 +# google.golang.org/grpc v1.31.1 => google.golang.org/grpc v1.27.1 google.golang.org/grpc google.golang.org/grpc/attributes google.golang.org/grpc/backoff @@ -1217,7 +1282,7 @@ gopkg.in/gcfg.v1/types gopkg.in/inf.v0 # gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/natefinch/lumberjack.v2 -# gopkg.in/square/go-jose.v2 v2.2.2 +# gopkg.in/square/go-jose.v2 v2.3.1 => gopkg.in/square/go-jose.v2 v2.2.2 gopkg.in/square/go-jose.v2 gopkg.in/square/go-jose.v2/cipher gopkg.in/square/go-jose.v2/json @@ -1226,7 +1291,9 @@ gopkg.in/square/go-jose.v2/jwt gopkg.in/warnings.v0 # gopkg.in/yaml.v2 v2.3.0 gopkg.in/yaml.v2 -# k8s.io/api v0.18.5 => github.com/rancher/kubernetes/staging/src/k8s.io/api v1.18.8-k3s1 +# gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 +gopkg.in/yaml.v3 +# k8s.io/api v0.19.0 => github.com/rancher/kubernetes/staging/src/k8s.io/api v1.19.0-k3s1 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 k8s.io/api/admissionregistration/v1 @@ -1234,7 +1301,6 @@ k8s.io/api/admissionregistration/v1beta1 k8s.io/api/apps/v1 k8s.io/api/apps/v1beta1 k8s.io/api/apps/v1beta2 -k8s.io/api/auditregistration/v1alpha1 k8s.io/api/authentication/v1 k8s.io/api/authentication/v1beta1 k8s.io/api/authorization/v1 @@ -1245,12 +1311,14 @@ k8s.io/api/autoscaling/v2beta2 k8s.io/api/batch/v1 k8s.io/api/batch/v1beta1 k8s.io/api/batch/v2alpha1 +k8s.io/api/certificates/v1 k8s.io/api/certificates/v1beta1 k8s.io/api/coordination/v1 k8s.io/api/coordination/v1beta1 k8s.io/api/core/v1 k8s.io/api/discovery/v1alpha1 k8s.io/api/discovery/v1beta1 +k8s.io/api/events/v1 k8s.io/api/events/v1beta1 k8s.io/api/extensions/v1beta1 k8s.io/api/flowcontrol/v1alpha1 @@ -1270,7 +1338,7 @@ k8s.io/api/settings/v1alpha1 k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 -# k8s.io/apiextensions-apiserver v0.18.0 => github.com/rancher/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.18.8-k3s1 +# k8s.io/apiextensions-apiserver v0.18.0 => github.com/rancher/kubernetes/staging/src/k8s.io/apiextensions-apiserver v1.19.0-k3s1 k8s.io/apiextensions-apiserver/pkg/apihelpers k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install @@ -1310,7 +1378,7 @@ k8s.io/apiextensions-apiserver/pkg/generated/openapi k8s.io/apiextensions-apiserver/pkg/registry/customresource k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition -# k8s.io/apimachinery v0.18.5 => github.com/rancher/kubernetes/staging/src/k8s.io/apimachinery v1.18.8-k3s1 +# k8s.io/apimachinery v0.19.0 => github.com/rancher/kubernetes/staging/src/k8s.io/apimachinery v1.19.0-k3s1 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors k8s.io/apimachinery/pkg/api/meta @@ -1320,6 +1388,7 @@ k8s.io/apimachinery/pkg/api/validation k8s.io/apimachinery/pkg/api/validation/path k8s.io/apimachinery/pkg/apis/meta/internalversion k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme +k8s.io/apimachinery/pkg/apis/meta/internalversion/validation k8s.io/apimachinery/pkg/apis/meta/v1 k8s.io/apimachinery/pkg/apis/meta/v1/unstructured k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructuredscheme @@ -1372,7 +1441,7 @@ k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/netutil k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/apiserver v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/apiserver v1.18.8-k3s1 +# k8s.io/apiserver v0.19.0 => github.com/rancher/kubernetes/staging/src/k8s.io/apiserver v1.19.0-k3s1 k8s.io/apiserver/pkg/admission k8s.io/apiserver/pkg/admission/configuration k8s.io/apiserver/pkg/admission/initializer @@ -1408,9 +1477,7 @@ k8s.io/apiserver/pkg/apis/config/v1 k8s.io/apiserver/pkg/apis/config/validation k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap k8s.io/apiserver/pkg/audit -k8s.io/apiserver/pkg/audit/event k8s.io/apiserver/pkg/audit/policy -k8s.io/apiserver/pkg/audit/util k8s.io/apiserver/pkg/authentication/authenticator k8s.io/apiserver/pkg/authentication/authenticatorfactory k8s.io/apiserver/pkg/authentication/group @@ -1430,6 +1497,7 @@ k8s.io/apiserver/pkg/authorization/authorizerfactory k8s.io/apiserver/pkg/authorization/path k8s.io/apiserver/pkg/authorization/union k8s.io/apiserver/pkg/endpoints +k8s.io/apiserver/pkg/endpoints/deprecation k8s.io/apiserver/pkg/endpoints/discovery k8s.io/apiserver/pkg/endpoints/filters k8s.io/apiserver/pkg/endpoints/handlers @@ -1440,6 +1508,7 @@ k8s.io/apiserver/pkg/endpoints/handlers/responsewriters k8s.io/apiserver/pkg/endpoints/metrics k8s.io/apiserver/pkg/endpoints/openapi k8s.io/apiserver/pkg/endpoints/request +k8s.io/apiserver/pkg/endpoints/warning k8s.io/apiserver/pkg/features k8s.io/apiserver/pkg/registry/generic k8s.io/apiserver/pkg/registry/generic/registry @@ -1478,6 +1547,7 @@ k8s.io/apiserver/pkg/util/dryrun k8s.io/apiserver/pkg/util/feature k8s.io/apiserver/pkg/util/flowcontrol k8s.io/apiserver/pkg/util/flowcontrol/counter +k8s.io/apiserver/pkg/util/flowcontrol/debug k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise/lockingpromise @@ -1488,21 +1558,17 @@ k8s.io/apiserver/pkg/util/flushwriter k8s.io/apiserver/pkg/util/openapi k8s.io/apiserver/pkg/util/proxy k8s.io/apiserver/pkg/util/shufflesharding -k8s.io/apiserver/pkg/util/term k8s.io/apiserver/pkg/util/webhook k8s.io/apiserver/pkg/util/wsstream +k8s.io/apiserver/pkg/warning k8s.io/apiserver/plugin/pkg/audit/buffered -k8s.io/apiserver/plugin/pkg/audit/dynamic -k8s.io/apiserver/plugin/pkg/audit/dynamic/enforced k8s.io/apiserver/plugin/pkg/audit/log k8s.io/apiserver/plugin/pkg/audit/truncate k8s.io/apiserver/plugin/pkg/audit/webhook -k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile -k8s.io/apiserver/plugin/pkg/authenticator/request/basicauth k8s.io/apiserver/plugin/pkg/authenticator/token/oidc k8s.io/apiserver/plugin/pkg/authenticator/token/webhook k8s.io/apiserver/plugin/pkg/authorizer/webhook -# k8s.io/cli-runtime v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/cli-runtime v1.18.8-k3s1 +# k8s.io/cli-runtime v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/cli-runtime v1.19.0-k3s1 k8s.io/cli-runtime/pkg/genericclioptions k8s.io/cli-runtime/pkg/kustomize k8s.io/cli-runtime/pkg/kustomize/k8sdeps @@ -1515,7 +1581,7 @@ k8s.io/cli-runtime/pkg/kustomize/k8sdeps/transformer/patch k8s.io/cli-runtime/pkg/kustomize/k8sdeps/validator k8s.io/cli-runtime/pkg/printers k8s.io/cli-runtime/pkg/resource -# k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible => github.com/rancher/kubernetes/staging/src/k8s.io/client-go v1.18.8-k3s1 +# k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible => github.com/rancher/kubernetes/staging/src/k8s.io/client-go v1.19.0-k3s1 k8s.io/client-go/discovery k8s.io/client-go/discovery/cached k8s.io/client-go/discovery/cached/disk @@ -1530,8 +1596,6 @@ k8s.io/client-go/informers/apps k8s.io/client-go/informers/apps/v1 k8s.io/client-go/informers/apps/v1beta1 k8s.io/client-go/informers/apps/v1beta2 -k8s.io/client-go/informers/auditregistration -k8s.io/client-go/informers/auditregistration/v1alpha1 k8s.io/client-go/informers/autoscaling k8s.io/client-go/informers/autoscaling/v1 k8s.io/client-go/informers/autoscaling/v2beta1 @@ -1541,6 +1605,7 @@ k8s.io/client-go/informers/batch/v1 k8s.io/client-go/informers/batch/v1beta1 k8s.io/client-go/informers/batch/v2alpha1 k8s.io/client-go/informers/certificates +k8s.io/client-go/informers/certificates/v1 k8s.io/client-go/informers/certificates/v1beta1 k8s.io/client-go/informers/coordination k8s.io/client-go/informers/coordination/v1 @@ -1551,6 +1616,7 @@ k8s.io/client-go/informers/discovery k8s.io/client-go/informers/discovery/v1alpha1 k8s.io/client-go/informers/discovery/v1beta1 k8s.io/client-go/informers/events +k8s.io/client-go/informers/events/v1 k8s.io/client-go/informers/events/v1beta1 k8s.io/client-go/informers/extensions k8s.io/client-go/informers/extensions/v1beta1 @@ -1592,8 +1658,6 @@ k8s.io/client-go/kubernetes/typed/apps/v1beta1 k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake k8s.io/client-go/kubernetes/typed/apps/v1beta2 k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake -k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1 -k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake k8s.io/client-go/kubernetes/typed/authentication/v1 k8s.io/client-go/kubernetes/typed/authentication/v1/fake k8s.io/client-go/kubernetes/typed/authentication/v1beta1 @@ -1614,6 +1678,8 @@ k8s.io/client-go/kubernetes/typed/batch/v1beta1 k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake k8s.io/client-go/kubernetes/typed/batch/v2alpha1 k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake +k8s.io/client-go/kubernetes/typed/certificates/v1 +k8s.io/client-go/kubernetes/typed/certificates/v1/fake k8s.io/client-go/kubernetes/typed/certificates/v1beta1 k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake k8s.io/client-go/kubernetes/typed/coordination/v1 @@ -1626,6 +1692,8 @@ k8s.io/client-go/kubernetes/typed/discovery/v1alpha1 k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake k8s.io/client-go/kubernetes/typed/discovery/v1beta1 k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake +k8s.io/client-go/kubernetes/typed/events/v1 +k8s.io/client-go/kubernetes/typed/events/v1/fake k8s.io/client-go/kubernetes/typed/events/v1beta1 k8s.io/client-go/kubernetes/typed/events/v1beta1/fake k8s.io/client-go/kubernetes/typed/extensions/v1beta1 @@ -1667,19 +1735,20 @@ k8s.io/client-go/listers/admissionregistration/v1beta1 k8s.io/client-go/listers/apps/v1 k8s.io/client-go/listers/apps/v1beta1 k8s.io/client-go/listers/apps/v1beta2 -k8s.io/client-go/listers/auditregistration/v1alpha1 k8s.io/client-go/listers/autoscaling/v1 k8s.io/client-go/listers/autoscaling/v2beta1 k8s.io/client-go/listers/autoscaling/v2beta2 k8s.io/client-go/listers/batch/v1 k8s.io/client-go/listers/batch/v1beta1 k8s.io/client-go/listers/batch/v2alpha1 +k8s.io/client-go/listers/certificates/v1 k8s.io/client-go/listers/certificates/v1beta1 k8s.io/client-go/listers/coordination/v1 k8s.io/client-go/listers/coordination/v1beta1 k8s.io/client-go/listers/core/v1 k8s.io/client-go/listers/discovery/v1alpha1 k8s.io/client-go/listers/discovery/v1beta1 +k8s.io/client-go/listers/events/v1 k8s.io/client-go/listers/events/v1beta1 k8s.io/client-go/listers/extensions/v1beta1 k8s.io/client-go/listers/flowcontrol/v1alpha1 @@ -1707,6 +1776,7 @@ k8s.io/client-go/pkg/apis/clientauthentication/v1beta1 k8s.io/client-go/pkg/version k8s.io/client-go/plugin/pkg/client/auth/exec k8s.io/client-go/rest +k8s.io/client-go/rest/fake k8s.io/client-go/rest/watch k8s.io/client-go/restmapper k8s.io/client-go/scale @@ -1749,21 +1819,25 @@ k8s.io/client-go/util/jsonpath k8s.io/client-go/util/keyutil k8s.io/client-go/util/retry k8s.io/client-go/util/workqueue -# k8s.io/cloud-provider v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/cloud-provider v1.18.8-k3s1 +# k8s.io/cloud-provider v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/cloud-provider v1.19.0-k3s1 k8s.io/cloud-provider k8s.io/cloud-provider/api +k8s.io/cloud-provider/controllers/node +k8s.io/cloud-provider/controllers/nodelifecycle +k8s.io/cloud-provider/controllers/route +k8s.io/cloud-provider/controllers/service k8s.io/cloud-provider/node/helpers k8s.io/cloud-provider/service/helpers k8s.io/cloud-provider/volume k8s.io/cloud-provider/volume/errors k8s.io/cloud-provider/volume/helpers -# k8s.io/cluster-bootstrap v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.18.8-k3s1 +# k8s.io/cluster-bootstrap v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/cluster-bootstrap v1.19.0-k3s1 k8s.io/cluster-bootstrap/token/api k8s.io/cluster-bootstrap/token/jws k8s.io/cluster-bootstrap/token/util k8s.io/cluster-bootstrap/util/secrets k8s.io/cluster-bootstrap/util/tokens -# k8s.io/code-generator v0.18.0 => github.com/rancher/kubernetes/staging/src/k8s.io/code-generator v1.18.8-k3s1 +# k8s.io/code-generator v0.18.0 => github.com/rancher/kubernetes/staging/src/k8s.io/code-generator v1.19.0-k3s1 k8s.io/code-generator/cmd/client-gen/args k8s.io/code-generator/cmd/client-gen/generators k8s.io/code-generator/cmd/client-gen/generators/fake @@ -1778,15 +1852,19 @@ k8s.io/code-generator/cmd/lister-gen/args k8s.io/code-generator/cmd/lister-gen/generators k8s.io/code-generator/pkg/namer k8s.io/code-generator/pkg/util -# k8s.io/component-base v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/component-base v1.18.8-k3s1 +# k8s.io/component-base v0.19.0 => github.com/rancher/kubernetes/staging/src/k8s.io/component-base v1.19.0-k3s1 k8s.io/component-base/cli/flag k8s.io/component-base/cli/globalflag k8s.io/component-base/codec k8s.io/component-base/config +k8s.io/component-base/config/options k8s.io/component-base/config/v1alpha1 k8s.io/component-base/config/validation +k8s.io/component-base/configz k8s.io/component-base/featuregate k8s.io/component-base/logs +k8s.io/component-base/logs/json +k8s.io/component-base/logs/logreduction k8s.io/component-base/metrics k8s.io/component-base/metrics/legacyregistry k8s.io/component-base/metrics/prometheus/ratelimiter @@ -1794,15 +1872,16 @@ k8s.io/component-base/metrics/prometheus/restclient k8s.io/component-base/metrics/prometheus/version k8s.io/component-base/metrics/prometheus/workqueue k8s.io/component-base/metrics/testutil +k8s.io/component-base/term k8s.io/component-base/version k8s.io/component-base/version/verflag -# k8s.io/cri-api v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/cri-api v1.18.8-k3s1 +# k8s.io/cri-api v0.19.0 => github.com/rancher/kubernetes/staging/src/k8s.io/cri-api v1.19.0-k3s1 k8s.io/cri-api/pkg/apis k8s.io/cri-api/pkg/apis/runtime/v1alpha2 -# k8s.io/csi-translation-lib v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/csi-translation-lib v1.18.8-k3s1 +# k8s.io/csi-translation-lib v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/csi-translation-lib v1.19.0-k3s1 k8s.io/csi-translation-lib k8s.io/csi-translation-lib/plugins -# k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 +# k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14 k8s.io/gengo/args k8s.io/gengo/examples/deepcopy-gen/generators k8s.io/gengo/examples/set-gen/sets @@ -1814,7 +1893,9 @@ k8s.io/gengo/types k8s.io/heapster/metrics/api/v1/types # k8s.io/klog v1.0.0 k8s.io/klog -# k8s.io/kube-aggregator v0.18.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kube-aggregator v1.18.8-k3s1 +# k8s.io/klog/v2 v2.2.0 +k8s.io/klog/v2 +# k8s.io/kube-aggregator v0.18.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kube-aggregator v1.19.0-k3s1 k8s.io/kube-aggregator/pkg/apis/apiregistration k8s.io/kube-aggregator/pkg/apis/apiregistration/install k8s.io/kube-aggregator/pkg/apis/apiregistration/v1 @@ -1842,9 +1923,9 @@ k8s.io/kube-aggregator/pkg/controllers/status k8s.io/kube-aggregator/pkg/registry/apiservice k8s.io/kube-aggregator/pkg/registry/apiservice/etcd k8s.io/kube-aggregator/pkg/registry/apiservice/rest -# k8s.io/kube-controller-manager v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kube-controller-manager v1.18.8-k3s1 +# k8s.io/kube-controller-manager v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kube-controller-manager v1.19.0-k3s1 k8s.io/kube-controller-manager/config/v1alpha1 -# k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 +# k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 k8s.io/kube-openapi/pkg/aggregator k8s.io/kube-openapi/pkg/builder k8s.io/kube-openapi/pkg/common @@ -1853,14 +1934,13 @@ k8s.io/kube-openapi/pkg/schemaconv k8s.io/kube-openapi/pkg/util k8s.io/kube-openapi/pkg/util/proto k8s.io/kube-openapi/pkg/util/proto/validation -# k8s.io/kube-proxy v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kube-proxy v1.18.8-k3s1 +# k8s.io/kube-proxy v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kube-proxy v1.19.0-k3s1 k8s.io/kube-proxy/config/v1alpha1 -# k8s.io/kube-scheduler v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kube-scheduler v1.18.8-k3s1 +# k8s.io/kube-scheduler v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kube-scheduler v1.19.0-k3s1 k8s.io/kube-scheduler/config/v1 -k8s.io/kube-scheduler/config/v1alpha1 -k8s.io/kube-scheduler/config/v1alpha2 +k8s.io/kube-scheduler/config/v1beta1 k8s.io/kube-scheduler/extender/v1 -# k8s.io/kubectl v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kubectl v1.18.8-k3s1 +# k8s.io/kubectl v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kubectl v1.19.0-k3s1 k8s.io/kubectl/pkg/apps k8s.io/kubectl/pkg/cmd k8s.io/kubectl/pkg/cmd/annotate @@ -1872,6 +1952,7 @@ k8s.io/kubectl/pkg/cmd/certificates k8s.io/kubectl/pkg/cmd/clusterinfo k8s.io/kubectl/pkg/cmd/completion k8s.io/kubectl/pkg/cmd/config +k8s.io/kubectl/pkg/cmd/cp k8s.io/kubectl/pkg/cmd/create k8s.io/kubectl/pkg/cmd/debug k8s.io/kubectl/pkg/cmd/delete @@ -1935,11 +2016,11 @@ k8s.io/kubectl/pkg/util/storage k8s.io/kubectl/pkg/util/templates k8s.io/kubectl/pkg/util/term k8s.io/kubectl/pkg/validation -# k8s.io/kubelet v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kubelet v1.18.8-k3s1 +# k8s.io/kubelet v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/kubelet v1.19.0-k3s1 k8s.io/kubelet/config/v1beta1 k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1 k8s.io/kubelet/pkg/apis/pluginregistration/v1 -# k8s.io/kubernetes v1.18.0 => github.com/rancher/kubernetes v1.18.8-k3s1 +# k8s.io/kubernetes v1.19.0 => github.com/rancher/kubernetes v1.19.0-k3s1 k8s.io/kubernetes/cmd/cloud-controller-manager/app k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config/scheme @@ -1990,10 +2071,6 @@ k8s.io/kubernetes/pkg/apis/apps/v1 k8s.io/kubernetes/pkg/apis/apps/v1beta1 k8s.io/kubernetes/pkg/apis/apps/v1beta2 k8s.io/kubernetes/pkg/apis/apps/validation -k8s.io/kubernetes/pkg/apis/auditregistration -k8s.io/kubernetes/pkg/apis/auditregistration/install -k8s.io/kubernetes/pkg/apis/auditregistration/v1alpha1 -k8s.io/kubernetes/pkg/apis/auditregistration/validation k8s.io/kubernetes/pkg/apis/authentication k8s.io/kubernetes/pkg/apis/authentication/install k8s.io/kubernetes/pkg/apis/authentication/v1 @@ -2018,6 +2095,7 @@ k8s.io/kubernetes/pkg/apis/batch/v2alpha1 k8s.io/kubernetes/pkg/apis/batch/validation k8s.io/kubernetes/pkg/apis/certificates k8s.io/kubernetes/pkg/apis/certificates/install +k8s.io/kubernetes/pkg/apis/certificates/v1 k8s.io/kubernetes/pkg/apis/certificates/v1beta1 k8s.io/kubernetes/pkg/apis/certificates/validation k8s.io/kubernetes/pkg/apis/coordination @@ -2042,6 +2120,7 @@ k8s.io/kubernetes/pkg/apis/discovery/v1beta1 k8s.io/kubernetes/pkg/apis/discovery/validation k8s.io/kubernetes/pkg/apis/events k8s.io/kubernetes/pkg/apis/events/install +k8s.io/kubernetes/pkg/apis/events/v1 k8s.io/kubernetes/pkg/apis/events/v1beta1 k8s.io/kubernetes/pkg/apis/extensions k8s.io/kubernetes/pkg/apis/extensions/install @@ -2096,7 +2175,6 @@ k8s.io/kubernetes/pkg/apis/storage/validation k8s.io/kubernetes/pkg/auth/authorizer/abac k8s.io/kubernetes/pkg/auth/nodeidentifier k8s.io/kubernetes/pkg/capabilities -k8s.io/kubernetes/pkg/client/leaderelectionconfig k8s.io/kubernetes/pkg/cloudprovider/providers k8s.io/kubernetes/pkg/controller k8s.io/kubernetes/pkg/controller/apis/config @@ -2111,7 +2189,6 @@ k8s.io/kubernetes/pkg/controller/certificates/rootcacertpublisher k8s.io/kubernetes/pkg/controller/certificates/signer k8s.io/kubernetes/pkg/controller/certificates/signer/config k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1 -k8s.io/kubernetes/pkg/controller/cloud k8s.io/kubernetes/pkg/controller/clusterroleaggregation k8s.io/kubernetes/pkg/controller/cronjob k8s.io/kubernetes/pkg/controller/daemon @@ -2130,6 +2207,10 @@ k8s.io/kubernetes/pkg/controller/endpointslice k8s.io/kubernetes/pkg/controller/endpointslice/config k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1 k8s.io/kubernetes/pkg/controller/endpointslice/metrics +k8s.io/kubernetes/pkg/controller/endpointslicemirroring +k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config +k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config/v1alpha1 +k8s.io/kubernetes/pkg/controller/endpointslicemirroring/metrics k8s.io/kubernetes/pkg/controller/garbagecollector k8s.io/kubernetes/pkg/controller/garbagecollector/config k8s.io/kubernetes/pkg/controller/garbagecollector/config/v1alpha1 @@ -2168,8 +2249,6 @@ k8s.io/kubernetes/pkg/controller/replication/config/v1alpha1 k8s.io/kubernetes/pkg/controller/resourcequota k8s.io/kubernetes/pkg/controller/resourcequota/config k8s.io/kubernetes/pkg/controller/resourcequota/config/v1alpha1 -k8s.io/kubernetes/pkg/controller/route -k8s.io/kubernetes/pkg/controller/service k8s.io/kubernetes/pkg/controller/service/config k8s.io/kubernetes/pkg/controller/service/config/v1alpha1 k8s.io/kubernetes/pkg/controller/serviceaccount @@ -2193,6 +2272,8 @@ k8s.io/kubernetes/pkg/controller/volume/attachdetach/populator k8s.io/kubernetes/pkg/controller/volume/attachdetach/reconciler k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater k8s.io/kubernetes/pkg/controller/volume/attachdetach/util +k8s.io/kubernetes/pkg/controller/volume/common +k8s.io/kubernetes/pkg/controller/volume/ephemeral k8s.io/kubernetes/pkg/controller/volume/events k8s.io/kubernetes/pkg/controller/volume/expand k8s.io/kubernetes/pkg/controller/volume/persistentvolume @@ -2220,7 +2301,6 @@ k8s.io/kubernetes/pkg/kubeapiserver/server k8s.io/kubernetes/pkg/kubectl/cmd k8s.io/kubernetes/pkg/kubectl/cmd/auth k8s.io/kubernetes/pkg/kubectl/cmd/convert -k8s.io/kubernetes/pkg/kubectl/cmd/cp k8s.io/kubernetes/pkg/kubelet k8s.io/kubernetes/pkg/kubelet/apis k8s.io/kubernetes/pkg/kubelet/apis/config @@ -2234,15 +2314,14 @@ k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1 k8s.io/kubernetes/pkg/kubelet/cadvisor k8s.io/kubernetes/pkg/kubelet/certificate k8s.io/kubernetes/pkg/kubelet/certificate/bootstrap -k8s.io/kubernetes/pkg/kubelet/checkpoint k8s.io/kubernetes/pkg/kubelet/checkpointmanager k8s.io/kubernetes/pkg/kubelet/checkpointmanager/checksum k8s.io/kubernetes/pkg/kubelet/checkpointmanager/errors k8s.io/kubernetes/pkg/kubelet/client k8s.io/kubernetes/pkg/kubelet/cloudresource k8s.io/kubernetes/pkg/kubelet/cm +k8s.io/kubernetes/pkg/kubelet/cm/containermap k8s.io/kubernetes/pkg/kubelet/cm/cpumanager -k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/containermap k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/topology k8s.io/kubernetes/pkg/kubelet/cm/cpuset @@ -2254,6 +2333,11 @@ k8s.io/kubernetes/pkg/kubelet/cm/util k8s.io/kubernetes/pkg/kubelet/config k8s.io/kubernetes/pkg/kubelet/configmap k8s.io/kubernetes/pkg/kubelet/container +k8s.io/kubernetes/pkg/kubelet/cri/remote +k8s.io/kubernetes/pkg/kubelet/cri/remote/util +k8s.io/kubernetes/pkg/kubelet/cri/streaming +k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward +k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand k8s.io/kubernetes/pkg/kubelet/dockershim k8s.io/kubernetes/pkg/kubelet/dockershim/cm k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker @@ -2281,6 +2365,7 @@ k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/panic k8s.io/kubernetes/pkg/kubelet/kuberuntime k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs k8s.io/kubernetes/pkg/kubelet/leaky +k8s.io/kubernetes/pkg/kubelet/legacy k8s.io/kubernetes/pkg/kubelet/lifecycle k8s.io/kubernetes/pkg/kubelet/logs k8s.io/kubernetes/pkg/kubelet/metrics @@ -2303,15 +2388,11 @@ k8s.io/kubernetes/pkg/kubelet/preemption k8s.io/kubernetes/pkg/kubelet/prober k8s.io/kubernetes/pkg/kubelet/prober/results k8s.io/kubernetes/pkg/kubelet/qos -k8s.io/kubernetes/pkg/kubelet/remote k8s.io/kubernetes/pkg/kubelet/runtimeclass k8s.io/kubernetes/pkg/kubelet/secret k8s.io/kubernetes/pkg/kubelet/server k8s.io/kubernetes/pkg/kubelet/server/metrics -k8s.io/kubernetes/pkg/kubelet/server/portforward -k8s.io/kubernetes/pkg/kubelet/server/remotecommand k8s.io/kubernetes/pkg/kubelet/server/stats -k8s.io/kubernetes/pkg/kubelet/server/streaming k8s.io/kubernetes/pkg/kubelet/stats k8s.io/kubernetes/pkg/kubelet/stats/pidlimit k8s.io/kubernetes/pkg/kubelet/status @@ -2322,7 +2403,6 @@ k8s.io/kubernetes/pkg/kubelet/util k8s.io/kubernetes/pkg/kubelet/util/cache k8s.io/kubernetes/pkg/kubelet/util/format k8s.io/kubernetes/pkg/kubelet/util/ioutils -k8s.io/kubernetes/pkg/kubelet/util/logreduction k8s.io/kubernetes/pkg/kubelet/util/manager k8s.io/kubernetes/pkg/kubelet/util/queue k8s.io/kubernetes/pkg/kubelet/util/sliceutils @@ -2383,9 +2463,6 @@ k8s.io/kubernetes/pkg/registry/apps/replicaset/storage k8s.io/kubernetes/pkg/registry/apps/rest k8s.io/kubernetes/pkg/registry/apps/statefulset k8s.io/kubernetes/pkg/registry/apps/statefulset/storage -k8s.io/kubernetes/pkg/registry/auditregistration/auditsink -k8s.io/kubernetes/pkg/registry/auditregistration/auditsink/storage -k8s.io/kubernetes/pkg/registry/auditregistration/rest k8s.io/kubernetes/pkg/registry/authentication/rest k8s.io/kubernetes/pkg/registry/authentication/tokenreview k8s.io/kubernetes/pkg/registry/authorization/localsubjectaccessreview @@ -2402,7 +2479,6 @@ k8s.io/kubernetes/pkg/registry/batch/cronjob/storage k8s.io/kubernetes/pkg/registry/batch/job k8s.io/kubernetes/pkg/registry/batch/job/storage k8s.io/kubernetes/pkg/registry/batch/rest -k8s.io/kubernetes/pkg/registry/cachesize k8s.io/kubernetes/pkg/registry/certificates/certificates k8s.io/kubernetes/pkg/registry/certificates/certificates/storage k8s.io/kubernetes/pkg/registry/certificates/rest @@ -2501,6 +2577,8 @@ k8s.io/kubernetes/pkg/registry/storage/csidriver k8s.io/kubernetes/pkg/registry/storage/csidriver/storage k8s.io/kubernetes/pkg/registry/storage/csinode k8s.io/kubernetes/pkg/registry/storage/csinode/storage +k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity +k8s.io/kubernetes/pkg/registry/storage/csistoragecapacity/storage k8s.io/kubernetes/pkg/registry/storage/rest k8s.io/kubernetes/pkg/registry/storage/storageclass k8s.io/kubernetes/pkg/registry/storage/storageclass/storage @@ -2512,13 +2590,12 @@ k8s.io/kubernetes/pkg/scheduler/algorithmprovider k8s.io/kubernetes/pkg/scheduler/apis/config k8s.io/kubernetes/pkg/scheduler/apis/config/scheme k8s.io/kubernetes/pkg/scheduler/apis/config/v1 -k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha1 -k8s.io/kubernetes/pkg/scheduler/apis/config/v1alpha2 +k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta1 k8s.io/kubernetes/pkg/scheduler/apis/config/validation k8s.io/kubernetes/pkg/scheduler/core k8s.io/kubernetes/pkg/scheduler/framework/plugins k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder -k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpodtopologyspread +k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper k8s.io/kubernetes/pkg/scheduler/framework/plugins/imagelocality k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity @@ -2532,19 +2609,20 @@ k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeunschedulable k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread k8s.io/kubernetes/pkg/scheduler/framework/plugins/queuesort +k8s.io/kubernetes/pkg/scheduler/framework/plugins/selectorspread k8s.io/kubernetes/pkg/scheduler/framework/plugins/serviceaffinity k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone +k8s.io/kubernetes/pkg/scheduler/framework/runtime k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1 k8s.io/kubernetes/pkg/scheduler/internal/cache k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger k8s.io/kubernetes/pkg/scheduler/internal/heap +k8s.io/kubernetes/pkg/scheduler/internal/parallelize k8s.io/kubernetes/pkg/scheduler/internal/queue -k8s.io/kubernetes/pkg/scheduler/listers k8s.io/kubernetes/pkg/scheduler/metrics -k8s.io/kubernetes/pkg/scheduler/nodeinfo k8s.io/kubernetes/pkg/scheduler/profile k8s.io/kubernetes/pkg/scheduler/util k8s.io/kubernetes/pkg/security/apparmor @@ -2563,7 +2641,6 @@ k8s.io/kubernetes/pkg/ssh k8s.io/kubernetes/pkg/util/async k8s.io/kubernetes/pkg/util/bandwidth k8s.io/kubernetes/pkg/util/config -k8s.io/kubernetes/pkg/util/configz k8s.io/kubernetes/pkg/util/conntrack k8s.io/kubernetes/pkg/util/ebtables k8s.io/kubernetes/pkg/util/filesystem @@ -2682,31 +2759,41 @@ k8s.io/kubernetes/third_party/forked/gonum/graph k8s.io/kubernetes/third_party/forked/gonum/graph/internal/linear k8s.io/kubernetes/third_party/forked/gonum/graph/simple k8s.io/kubernetes/third_party/forked/gonum/graph/traverse -k8s.io/kubernetes/third_party/forked/ipvs -# k8s.io/legacy-cloud-providers v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.18.8-k3s1 +# k8s.io/legacy-cloud-providers v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/legacy-cloud-providers v1.19.0-k3s1 k8s.io/legacy-cloud-providers/aws k8s.io/legacy-cloud-providers/azure k8s.io/legacy-cloud-providers/azure/auth k8s.io/legacy-cloud-providers/azure/cache k8s.io/legacy-cloud-providers/azure/clients k8s.io/legacy-cloud-providers/azure/clients/armclient +k8s.io/legacy-cloud-providers/azure/clients/containerserviceclient +k8s.io/legacy-cloud-providers/azure/clients/deploymentclient k8s.io/legacy-cloud-providers/azure/clients/diskclient +k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient +k8s.io/legacy-cloud-providers/azure/clients/fileclient k8s.io/legacy-cloud-providers/azure/clients/interfaceclient +k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient +k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient k8s.io/legacy-cloud-providers/azure/clients/publicipclient +k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient k8s.io/legacy-cloud-providers/azure/clients/routeclient k8s.io/legacy-cloud-providers/azure/clients/routeclient/mockrouteclient k8s.io/legacy-cloud-providers/azure/clients/routetableclient k8s.io/legacy-cloud-providers/azure/clients/routetableclient/mockroutetableclient k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient +k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient k8s.io/legacy-cloud-providers/azure/clients/snapshotclient k8s.io/legacy-cloud-providers/azure/clients/storageaccountclient k8s.io/legacy-cloud-providers/azure/clients/subnetclient k8s.io/legacy-cloud-providers/azure/clients/subnetclient/mocksubnetclient k8s.io/legacy-cloud-providers/azure/clients/vmclient +k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient k8s.io/legacy-cloud-providers/azure/clients/vmsizeclient k8s.io/legacy-cloud-providers/azure/clients/vmssclient +k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient +k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient k8s.io/legacy-cloud-providers/azure/metrics k8s.io/legacy-cloud-providers/azure/retry k8s.io/legacy-cloud-providers/gce @@ -2714,7 +2801,7 @@ k8s.io/legacy-cloud-providers/openstack k8s.io/legacy-cloud-providers/vsphere k8s.io/legacy-cloud-providers/vsphere/vclib k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers -# k8s.io/metrics v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/metrics v1.18.8-k3s1 +# k8s.io/metrics v0.0.0 => github.com/rancher/kubernetes/staging/src/k8s.io/metrics v1.19.0-k3s1 k8s.io/metrics/pkg/apis/custom_metrics k8s.io/metrics/pkg/apis/custom_metrics/v1beta1 k8s.io/metrics/pkg/apis/custom_metrics/v1beta2 @@ -2730,7 +2817,7 @@ k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1 k8s.io/metrics/pkg/client/custom_metrics k8s.io/metrics/pkg/client/custom_metrics/scheme k8s.io/metrics/pkg/client/external_metrics -# k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 +# k8s.io/utils v0.0.0-20200729134348-d5654de09c73 k8s.io/utils/buffer k8s.io/utils/clock k8s.io/utils/exec @@ -2745,7 +2832,7 @@ k8s.io/utils/path k8s.io/utils/pointer k8s.io/utils/strings k8s.io/utils/trace -# sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7 +# sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9 sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client # sigs.k8s.io/kustomize v2.0.3+incompatible @@ -2771,12 +2858,12 @@ sigs.k8s.io/kustomize/pkg/transformers sigs.k8s.io/kustomize/pkg/transformers/config sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig sigs.k8s.io/kustomize/pkg/types -# sigs.k8s.io/structured-merge-diff/v3 v3.0.0 -sigs.k8s.io/structured-merge-diff/v3/fieldpath -sigs.k8s.io/structured-merge-diff/v3/merge -sigs.k8s.io/structured-merge-diff/v3/schema -sigs.k8s.io/structured-merge-diff/v3/typed -sigs.k8s.io/structured-merge-diff/v3/value +# sigs.k8s.io/structured-merge-diff/v4 v4.0.1 +sigs.k8s.io/structured-merge-diff/v4/fieldpath +sigs.k8s.io/structured-merge-diff/v4/merge +sigs.k8s.io/structured-merge-diff/v4/schema +sigs.k8s.io/structured-merge-diff/v4/typed +sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.2.0 sigs.k8s.io/yaml # vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc diff --git a/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go b/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go index e13b842e80c..6f5110696c8 100644 --- a/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go +++ b/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go @@ -26,7 +26,7 @@ import ( "time" "google.golang.org/grpc" - "k8s.io/klog" + "k8s.io/klog/v2" "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client" ) @@ -51,9 +51,11 @@ type grpcTunnel struct { connsLock sync.RWMutex } -// CreateGrpcTunnel creates a Tunnel to dial to a remote server through a +// CreateSingleUseGrpcTunnel creates a Tunnel to dial to a remote server through a // gRPC based proxy service. -func CreateGrpcTunnel(address string, opts ...grpc.DialOption) (Tunnel, error) { +// Currently, a single tunnel supports a single connection, and the tunnel is closed when the connection is terminated +// The Dial() method of the returned tunnel should only be called once +func CreateSingleUseGrpcTunnel(address string, opts ...grpc.DialOption) (Tunnel, error) { c, err := grpc.Dial(address, opts...) if err != nil { return nil, err @@ -72,12 +74,14 @@ func CreateGrpcTunnel(address string, opts ...grpc.DialOption) (Tunnel, error) { conns: make(map[int64]*conn), } - go tunnel.serve() + go tunnel.serve(c) return tunnel, nil } -func (t *grpcTunnel) serve() { +func (t *grpcTunnel) serve(c *grpc.ClientConn) { + defer c.Close() + for { pkt, err := t.stream.Recv() if err == io.EOF { @@ -130,9 +134,9 @@ func (t *grpcTunnel) serve() { t.connsLock.Lock() delete(t.conns, resp.ConnectID) t.connsLock.Unlock() - } else { - klog.Warningf("connection id %d not recognized", resp.ConnectID) + return } + klog.Warningf("connection id %d not recognized", resp.ConnectID) } } } diff --git a/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/conn.go b/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/conn.go index 4b0ffff13ee..5137ba26699 100644 --- a/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/conn.go +++ b/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/conn.go @@ -22,7 +22,7 @@ import ( "net" "time" - "k8s.io/klog" + "k8s.io/klog/v2" "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client" ) diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v4/LICENSE b/vendor/sigs.k8s.io/structured-merge-diff/v4/LICENSE new file mode 100644 index 00000000000..8dada3edaf5 --- /dev/null +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/doc.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/doc.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/doc.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/doc.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/element.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/element.go similarity index 99% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/element.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/element.go index 1b4872b86c2..1578f64c048 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/element.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/element.go @@ -21,7 +21,7 @@ import ( "sort" "strings" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/value" ) // PathElement describes how to select a child field given a containing object. diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/fromvalue.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/fromvalue.go similarity index 98% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/fromvalue.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/fromvalue.go index 36b2d4a916e..20775ee0223 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/fromvalue.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/fromvalue.go @@ -17,7 +17,7 @@ limitations under the License. package fieldpath import ( - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/value" ) // SetFromValue creates a set containing every leaf field mentioned in v. diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/managers.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/managers.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/managers.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/managers.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/path.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/path.go similarity index 98% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/path.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/path.go index cc7fb9c6759..0413130bd17 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/path.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/path.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/value" ) // Path describes how to select a potentially deeply-nested child field given a diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/pathelementmap.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/pathelementmap.go similarity index 98% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/pathelementmap.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/pathelementmap.go index fc8a1ff3fdd..9b14ca581b0 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/pathelementmap.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/pathelementmap.go @@ -19,7 +19,7 @@ package fieldpath import ( "sort" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/value" ) // PathElementValueMap is a map from PathElement to value.Value. diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/serialize-pe.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/serialize-pe.go similarity index 99% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/serialize-pe.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/serialize-pe.go index fcb6b2fc967..cb18e7b1ca9 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/serialize-pe.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/serialize-pe.go @@ -24,7 +24,7 @@ import ( "strings" jsoniter "github.com/json-iterator/go" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/value" ) var ErrUnknownPathElementType = errors.New("unknown path element type") diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/serialize.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/serialize.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/serialize.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/serialize.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/set.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/set.go similarity index 83% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/set.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/set.go index f280a2fc76a..029c2b6003e 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/fieldpath/set.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/fieldpath/set.go @@ -94,6 +94,22 @@ func (s *Set) Difference(s2 *Set) *Set { } } +// RecursiveDifference returns a Set containing elements which: +// * appear in s +// * do not appear in s2 +// +// Compared to a regular difference, +// this removes every field **and its children** from s that is contained in s2. +// +// For example, with s containing `a.b.c` and s2 containing `a.b`, +// a RecursiveDifference will result in `a`, as the entire node `a.b` gets removed. +func (s *Set) RecursiveDifference(s2 *Set) *Set { + return &Set{ + Members: *s.Members.Difference(&s2.Members), + Children: *s.Children.RecursiveDifference(s2), + } +} + // Size returns the number of members of the set. func (s *Set) Size() int { return s.Members.Size() + s.Children.Size() @@ -333,6 +349,48 @@ func (s *SetNodeMap) Difference(s2 *Set) *SetNodeMap { return out } +// RecursiveDifference returns a SetNodeMap with members that appear in s but not in s2. +// +// Compared to a regular difference, +// this removes every field **and its children** from s that is contained in s2. +// +// For example, with s containing `a.b.c` and s2 containing `a.b`, +// a RecursiveDifference will result in `a`, as the entire node `a.b` gets removed. +func (s *SetNodeMap) RecursiveDifference(s2 *Set) *SetNodeMap { + out := &SetNodeMap{} + + i, j := 0, 0 + for i < len(s.members) && j < len(s2.Children.members) { + if s.members[i].pathElement.Less(s2.Children.members[j].pathElement) { + if !s2.Members.Has(s.members[i].pathElement) { + out.members = append(out.members, setNode{pathElement: s.members[i].pathElement, set: s.members[i].set}) + } + i++ + } else { + if !s2.Children.members[j].pathElement.Less(s.members[i].pathElement) { + if !s2.Members.Has(s.members[i].pathElement) { + diff := s.members[i].set.RecursiveDifference(s2.Children.members[j].set) + if !diff.Empty() { + out.members = append(out.members, setNode{pathElement: s.members[i].pathElement, set: diff}) + } + } + i++ + } + j++ + } + } + + if i < len(s.members) { + for _, c := range s.members[i:] { + if !s2.Members.Has(c.pathElement) { + out.members = append(out.members, c) + } + } + } + + return out +} + // Iterate calls f for each PathElement in the set. func (s *SetNodeMap) Iterate(f func(PathElement)) { for _, n := range s.members { diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/merge/conflict.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/merge/conflict.go similarity index 90% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/merge/conflict.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/merge/conflict.go index 2dbd274ee65..75a492d8ea8 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/merge/conflict.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/merge/conflict.go @@ -21,7 +21,7 @@ import ( "sort" "strings" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" ) // Conflict is a conflict on a specific field with the current manager of @@ -95,6 +95,15 @@ func (c Conflicts) Equals(c2 Conflicts) bool { return true } +// ToSet aggregates conflicts for all managers into a single Set. +func (c Conflicts) ToSet() *fieldpath.Set { + set := fieldpath.NewSet() + for _, conflict := range []Conflict(c) { + set.Insert(conflict.Path) + } + return set +} + // ConflictsFromManagers creates a list of conflicts given Managers sets. func ConflictsFromManagers(sets fieldpath.ManagedFields) Conflicts { conflicts := []Conflict{} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/merge/update.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/merge/update.go similarity index 87% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/merge/update.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/merge/update.go index 3c2a46901a7..e648d8a270f 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/merge/update.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/merge/update.go @@ -16,8 +16,8 @@ package merge import ( "fmt" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" - "sigs.k8s.io/structured-merge-diff/v3/typed" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/typed" ) // Converter is an interface to the conversion logic. The converter @@ -30,7 +30,8 @@ type Converter interface { // Updater is the object used to compute updated FieldSets and also // merge the object on Apply. type Updater struct { - Converter Converter + Converter Converter + IgnoredFields map[fieldpath.APIVersion]*fieldpath.Set enableUnions bool } @@ -50,7 +51,7 @@ func (s *Updater) update(oldObject, newObject *typed.TypedValue, version fieldpa } versions := map[fieldpath.APIVersion]*typed.Comparison{ - version: compare, + version: compare.ExcludeFields(s.IgnoredFields[version]), } for manager, managerSet := range managers { @@ -80,7 +81,7 @@ func (s *Updater) update(oldObject, newObject *typed.TypedValue, version fieldpa if err != nil { return nil, nil, fmt.Errorf("failed to compare objects: %v", err) } - versions[managerSet.APIVersion()] = compare + versions[managerSet.APIVersion()] = compare.ExcludeFields(s.IgnoredFields[managerSet.APIVersion()]) } conflictSet := managerSet.Set().Intersection(compare.Modified.Union(compare.Added)) @@ -135,8 +136,13 @@ func (s *Updater) Update(liveObject, newObject *typed.TypedValue, version fieldp if _, ok := managers[manager]; !ok { managers[manager] = fieldpath.NewVersionedSet(fieldpath.NewSet(), version, false) } + + ignored := s.IgnoredFields[version] + if ignored == nil { + ignored = fieldpath.NewSet() + } managers[manager] = fieldpath.NewVersionedSet( - managers[manager].Set().Union(compare.Modified).Union(compare.Added).Difference(compare.Removed), + managers[manager].Set().Union(compare.Modified).Union(compare.Added).Difference(compare.Removed).RecursiveDifference(ignored), version, false, ) @@ -174,6 +180,15 @@ func (s *Updater) Apply(liveObject, configObject *typed.TypedValue, version fiel if err != nil { return nil, fieldpath.ManagedFields{}, fmt.Errorf("failed to get field set: %v", err) } + + ignored := s.IgnoredFields[version] + if ignored != nil { + set = set.RecursiveDifference(ignored) + // TODO: is this correct. If we don't remove from lastSet pruning might remove the fields? + if lastSet != nil { + lastSet.Set().RecursiveDifference(ignored) + } + } managers[manager] = fieldpath.NewVersionedSet(set, version, true) newObject, err = s.prune(newObject, managers, manager, lastSet) if err != nil { @@ -197,7 +212,7 @@ func shallowCopyManagers(managers fieldpath.ManagedFields) fieldpath.ManagedFiel return newManagers } -// prune will remove a list or map item, iff: +// prune will remove a field, list or map item, iff: // * applyingManager applied it last time // * applyingManager didn't apply it this time // * no other applier claims to manage it @@ -225,18 +240,16 @@ func (s *Updater) prune(merged *typed.TypedValue, managers fieldpath.ManagedFiel return s.Converter.Convert(pruned, managers[applyingManager].APIVersion()) } -// addBackOwnedItems adds back any list and map items that were removed by prune, -// but other appliers (or the current applier's new config) claim to own. +// addBackOwnedItems adds back any fields, list and map items that were removed by prune, +// but other appliers or updaters (or the current applier's new config) claim to own. func (s *Updater) addBackOwnedItems(merged, pruned *typed.TypedValue, managedFields fieldpath.ManagedFields, applyingManager string) (*typed.TypedValue, error) { var err error managedAtVersion := map[fieldpath.APIVersion]*fieldpath.Set{} for _, managerSet := range managedFields { - if managerSet.Applied() { - if _, ok := managedAtVersion[managerSet.APIVersion()]; !ok { - managedAtVersion[managerSet.APIVersion()] = fieldpath.NewSet() - } - managedAtVersion[managerSet.APIVersion()] = managedAtVersion[managerSet.APIVersion()].Union(managerSet.Set()) + if _, ok := managedAtVersion[managerSet.APIVersion()]; !ok { + managedAtVersion[managerSet.APIVersion()] = fieldpath.NewSet() } + managedAtVersion[managerSet.APIVersion()] = managedAtVersion[managerSet.APIVersion()].Union(managerSet.Set()) } for version, managed := range managedAtVersion { merged, err = s.Converter.Convert(merged, version) @@ -266,9 +279,9 @@ func (s *Updater) addBackOwnedItems(merged, pruned *typed.TypedValue, managedFie return pruned, nil } -// addBackDanglingItems makes sure that the only items removed by prune are items that were -// previously owned by the currently applying manager. This will add back unowned items and items -// which are owned by Updaters that shouldn't be removed. +// addBackDanglingItems makes sure that the fields list and map items removed by prune were +// previously owned by the currently applying manager. This will add back fields list and map items +// that are unowned or that are owned by Updaters and shouldn't be removed. func (s *Updater) addBackDanglingItems(merged, pruned *typed.TypedValue, lastSet fieldpath.VersionedSet) (*typed.TypedValue, error) { convertedPruned, err := s.Converter.Convert(pruned, lastSet.APIVersion()) if err != nil { diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/schema/doc.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/schema/doc.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/schema/doc.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/schema/doc.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/schema/elements.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/schema/elements.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/schema/elements.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/schema/elements.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/schema/equals.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/schema/equals.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/schema/equals.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/schema/equals.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/schema/schemaschema.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/schema/schemaschema.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/schema/schemaschema.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/schema/schemaschema.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/doc.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/doc.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/typed/doc.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/typed/doc.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/helpers.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/helpers.go similarity index 97% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/typed/helpers.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/typed/helpers.go index 0834f4d3275..9b6845e8da6 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/helpers.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/helpers.go @@ -21,9 +21,9 @@ import ( "fmt" "strings" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" - "sigs.k8s.io/structured-merge-diff/v3/schema" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/schema" + "sigs.k8s.io/structured-merge-diff/v4/value" ) // ValidationError reports an error about a particular field diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/merge.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/merge.go similarity index 98% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/typed/merge.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/typed/merge.go index e9573cc2310..5112e2536f5 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/merge.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/merge.go @@ -19,9 +19,9 @@ package typed import ( "math" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" - "sigs.k8s.io/structured-merge-diff/v3/schema" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/schema" + "sigs.k8s.io/structured-merge-diff/v4/value" ) type mergingWalker struct { diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/parser.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/parser.go similarity index 98% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/typed/parser.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/typed/parser.go index 845fdfe4ec0..3949a78fc67 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/parser.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/parser.go @@ -20,8 +20,8 @@ import ( "fmt" yaml "gopkg.in/yaml.v2" - "sigs.k8s.io/structured-merge-diff/v3/schema" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/schema" + "sigs.k8s.io/structured-merge-diff/v4/value" ) // YAMLObject is an object encoded in YAML. diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/remove.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/remove.go similarity index 93% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/typed/remove.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/typed/remove.go index f30e02a618f..a2811953016 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/remove.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/remove.go @@ -14,9 +14,9 @@ limitations under the License. package typed import ( - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" - "sigs.k8s.io/structured-merge-diff/v3/schema" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/schema" + "sigs.k8s.io/structured-merge-diff/v4/value" ) type removingWalker struct { @@ -95,10 +95,9 @@ func (w *removingWalker) doMap(t *schema.Map) ValidationErrors { fieldType := t.ElementType if ft, ok := fieldTypes[k]; ok { fieldType = ft - } else { - if w.toRemove.Has(path) { - return true - } + } + if w.toRemove.Has(path) { + return true } if subset := w.toRemove.WithPrefix(pe); !subset.Empty() { val = removeItemsWithSchema(val, subset, w.schema, fieldType) diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/tofieldset.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/tofieldset.go similarity index 96% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/typed/tofieldset.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/typed/tofieldset.go index b3c4ff00217..0662d0f0a80 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/tofieldset.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/tofieldset.go @@ -19,9 +19,9 @@ package typed import ( "sync" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" - "sigs.k8s.io/structured-merge-diff/v3/schema" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/schema" + "sigs.k8s.io/structured-merge-diff/v4/value" ) var tPool = sync.Pool{ diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/typed.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/typed.go similarity index 93% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/typed/typed.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/typed/typed.go index 4aa9a238719..1a99159a6eb 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/typed.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/typed.go @@ -21,9 +21,9 @@ import ( "strings" "sync" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" - "sigs.k8s.io/structured-merge-diff/v3/schema" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/schema" + "sigs.k8s.io/structured-merge-diff/v4/value" ) // AsTyped accepts a value and a type and returns a TypedValue. 'v' must have @@ -61,6 +61,11 @@ type TypedValue struct { schema *schema.Schema } +// TypeRef is the type of the value. +func (tv TypedValue) TypeRef() schema.TypeRef { + return tv.typeRef +} + // AsValue removes the type from the TypedValue and only keeps the value. func (tv TypedValue) AsValue() value.Value { return tv.value @@ -291,3 +296,15 @@ func (c *Comparison) String() string { } return bld.String() } + +// ExcludeFields fields from the compare recursively removes the fields +// from the entire comparison +func (c *Comparison) ExcludeFields(fields *fieldpath.Set) *Comparison { + if fields == nil || fields.Empty() { + return c + } + c.Removed = c.Removed.RecursiveDifference(fields) + c.Modified = c.Modified.RecursiveDifference(fields) + c.Added = c.Added.RecursiveDifference(fields) + return c +} diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/union.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/union.go similarity index 98% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/typed/union.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/typed/union.go index 26526cb8754..1fa5d88ae63 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/union.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/union.go @@ -20,8 +20,8 @@ import ( "fmt" "strings" - "sigs.k8s.io/structured-merge-diff/v3/schema" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/schema" + "sigs.k8s.io/structured-merge-diff/v4/value" ) func normalizeUnions(w *mergingWalker) error { diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/validate.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/validate.go similarity index 97% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/typed/validate.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/typed/validate.go index 5c5a1cb64e0..a2f8f4eff12 100644 --- a/vendor/sigs.k8s.io/structured-merge-diff/v3/typed/validate.go +++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/validate.go @@ -19,9 +19,9 @@ package typed import ( "sync" - "sigs.k8s.io/structured-merge-diff/v3/fieldpath" - "sigs.k8s.io/structured-merge-diff/v3/schema" - "sigs.k8s.io/structured-merge-diff/v3/value" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/schema" + "sigs.k8s.io/structured-merge-diff/v4/value" ) var vPool = sync.Pool{ diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/allocator.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/allocator.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/allocator.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/allocator.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/doc.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/doc.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/doc.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/doc.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/fields.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/fields.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/fields.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/fields.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/jsontagutil.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/jsontagutil.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/jsontagutil.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/jsontagutil.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/list.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/list.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/list.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/list.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/listreflect.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/listreflect.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/listreflect.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/listreflect.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/listunstructured.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/listunstructured.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/listunstructured.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/listunstructured.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/map.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/map.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/map.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/map.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/mapreflect.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/mapreflect.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/mapreflect.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/mapreflect.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/mapunstructured.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/mapunstructured.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/mapunstructured.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/mapunstructured.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/reflectcache.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/reflectcache.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/reflectcache.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/reflectcache.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/scalar.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/scalar.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/scalar.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/scalar.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/structreflect.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/structreflect.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/structreflect.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/structreflect.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/value.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/value.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/value.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/value.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/valuereflect.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/valuereflect.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/valuereflect.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/valuereflect.go diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v3/value/valueunstructured.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/valueunstructured.go similarity index 100% rename from vendor/sigs.k8s.io/structured-merge-diff/v3/value/valueunstructured.go rename to vendor/sigs.k8s.io/structured-merge-diff/v4/value/valueunstructured.go